[SCM] jedit - Java plugin-based editor for programmers branch, master, updated. upstream/4.3.2+dfsg-17-gb7dd5f2
Gabriele Giacone
gg0-guest at alioth.debian.org
Fri Aug 12 22:19:33 UTC 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "jedit - Java plugin-based editor for programmers".
The branch, master has been updated
via b7dd5f2aefcc6796fb33ae366b2163d161bf8629 (commit)
via 548500dce3ed05214866e9944296898203152dd0 (commit)
via a79dc29c90bc842f39bc8ec9e4c0bd02e7b8e61d (commit)
via bce25050bbf495a74de2a830cbc52f6174189d7b (commit)
via 85e23a8049f8fc7576c2d59c2b872498869153b9 (commit)
via 7a97b16f26f21d80ae9355dadc0c1aa3d3cd81b8 (commit)
via 4502a45c7d3f657315e66bc9f5a16096ab0cffab (commit)
via ad6ec8cc8c1d90282498554aa9630eb574f195ba (commit)
from 3d7fe1507cd0eb9d545d1a4b8d00d2adbb90a536 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b7dd5f2aefcc6796fb33ae366b2163d161bf8629
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date: Fri Aug 12 22:15:19 2011 +0200
Remove article from short desc.
commit 548500dce3ed05214866e9944296898203152dd0
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date: Fri Aug 12 22:15:05 2011 +0200
Bump Standards-Version to 3.9.2.
commit a79dc29c90bc842f39bc8ec9e4c0bd02e7b8e61d
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date: Fri Aug 12 21:57:19 2011 +0200
Update doc-base.
commit bce25050bbf495a74de2a830cbc52f6174189d7b
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date: Fri Aug 12 21:42:51 2011 +0200
Add docbook-xml as B-D. Add docbook.catalog in build.properties.
commit 85e23a8049f8fc7576c2d59c2b872498869153b9
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date: Fri Aug 12 21:24:27 2011 +0200
Refresh debian/patches/02build.xml
commit 7a97b16f26f21d80ae9355dadc0c1aa3d3cd81b8
Merge: ad6ec8c 4502a45
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date: Fri Aug 12 20:39:14 2011 +0200
Merge commit 'upstream/4.4.1+dfsg'
commit ad6ec8cc8c1d90282498554aa9630eb574f195ba
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date: Fri Aug 12 19:55:47 2011 +0200
New upstream release 4.4.1
-----------------------------------------------------------------------
Summary of changes:
build-support/README.txt | 12 +-
build-support/build.properties.sample | 340 +-
build-support/ci/ci_release.groovy | 97 +
build-support/ci/copy_properties.groovy | 53 +
build-support/eclipse-formatting.xml | 492 +-
build-support/ivysettings.properties | 1 +
build-support/ivysettings.xml | 13 +
build-support/plugin-build.xml | 1203 +-
build-support/users-guide.xsl | 456 +-
debian/build.properties | 1 +
debian/changelog | 8 +
debian/control | 7 +-
debian/jedit.doc-base.3 | 6 +-
debian/patches/02build.xml | 22 +-
jEdit/.idea/ant.xml | 31 +
jEdit/.idea/compiler.xml | 25 +
jEdit/.idea/copyright/GPL_v2.xml | 9 +
jEdit/.idea/copyright/profiles_settings.xml | 61 +
jEdit/.idea/encodings.xml | 7 +
jEdit/.idea/misc.xml | 437 +
jEdit/.idea/modules.xml | 11 +
jEdit/.idea/projectCodeStyle.xml | 103 +
jEdit/.idea/runConfigurations/jEdit.xml | 37 +
.../runConfigurations/jEdit__background_mode_.xml | 30 +
jEdit/.idea/uiDesigner.xml | 125 +
jEdit/.idea/vcs.xml | 17 +
jEdit/README.SRC.txt | 405 +-
jEdit/build.properties.sample | 168 +-
jEdit/build.xml | 3103 +++--
jEdit/com/microstar/xml/HandlerBase.java | 192 -
jEdit/com/microstar/xml/XmlException.java | 85 -
jEdit/com/microstar/xml/XmlHandler.java | 241 -
jEdit/com/microstar/xml/XmlParser.java | 4377 ------
jEdit/com/microstar/xml/package.html | 6 -
jEdit/de/masters_of_disaster/ant/tasks/ar/Ar.java | 936 +-
.../ant/tasks/ar/ArConstants.java | 124 +-
.../masters_of_disaster/ant/tasks/ar/ArEntry.java | 710 +-
.../ant/tasks/ar/ArOutputStream.java | 334 +-
.../masters_of_disaster/ant/tasks/ar/ArUtils.java | 310 +-
.../ant/tasks/calculatesize/CalculateSize.java | 188 +-
.../de/masters_of_disaster/ant/tasks/deb/Deb.java | 705 +-
jEdit/doc/Apache.LICENSE.txt | 100 +-
jEdit/doc/CHANGES.txt | 3784 +-----
jEdit/doc/COPYING.DOC.txt | 710 +-
jEdit/doc/COPYING.PLUGINS.txt | 42 +-
jEdit/doc/COPYING.txt | 678 +-
jEdit/doc/CORE_GUIDELINES.txt | 124 +-
jEdit/doc/FAQ/faq-contrib.xml | 84 +-
jEdit/doc/FAQ/faq-general.xml | 1297 +-
jEdit/doc/FAQ/faq-install.xml | 558 +-
jEdit/doc/FAQ/faq-intro.xml | 62 +-
jEdit/doc/FAQ/faq-legal.xml | 48 +-
jEdit/doc/FAQ/faq-macros.xml | 266 +-
jEdit/doc/FAQ/faq-plugins.xml | 340 +-
jEdit/doc/FAQ/faq-problems.xml | 840 +-
jEdit/doc/FAQ/faq-use.xml | 1430 +-
jEdit/doc/FAQ/faq.xml | 376 +-
jEdit/doc/README.txt | 235 +-
jEdit/doc/TODO.txt | 453 +-
jEdit/doc/jeditfo.xsl | 114 +-
jEdit/doc/jedithtml.xsl | 510 +-
jEdit/doc/news43/news.xml | 331 -
jEdit/doc/news44/news.xml | 34 +
jEdit/doc/release-procedure.txt | 54 +-
jEdit/doc/tips/tip0.html | 12 +-
jEdit/doc/tips/tip1.html | 4 +-
jEdit/doc/tips/tip10.html | 8 +-
jEdit/doc/tips/tip11.html | 4 +-
jEdit/doc/tips/tip12.html | 4 +-
jEdit/doc/tips/tip13.html | 4 +-
jEdit/doc/tips/tip14.html | 4 +-
jEdit/doc/tips/tip15.html | 24 +-
jEdit/doc/tips/tip16.html | 18 +-
jEdit/doc/tips/tip17.html | 26 +-
jEdit/doc/tips/tip18.html | 6 +-
jEdit/doc/tips/tip19.html | 8 +-
jEdit/doc/tips/tip2.html | 34 +-
jEdit/doc/tips/tip20.html | 4 +-
jEdit/doc/tips/tip21.html | 6 +-
jEdit/doc/tips/tip22.html | 8 +-
jEdit/doc/tips/tip23.html | 4 +-
jEdit/doc/tips/tip24.html | 8 +-
jEdit/doc/tips/tip25.html | 6 +-
jEdit/doc/tips/tip26.html | 4 +-
jEdit/doc/tips/tip27.html | 8 +-
jEdit/doc/tips/tip28.html | 8 +-
jEdit/doc/tips/tip29.html | 26 +-
jEdit/doc/tips/tip3.html | 4 +-
jEdit/doc/tips/tip30.html | 26 +-
jEdit/doc/tips/tip31.html | 24 +-
jEdit/doc/tips/tip32.html | 12 +-
jEdit/doc/tips/tip33.html | 8 +-
jEdit/doc/tips/tip34.html | 44 +-
jEdit/doc/tips/tip35.html | 12 +-
jEdit/doc/tips/tip36.html | 12 +-
jEdit/doc/tips/tip37.html | 6 +-
jEdit/doc/tips/tip38.html | 6 +-
jEdit/doc/tips/tip39.html | 8 +-
jEdit/doc/tips/tip4.html | 10 +-
jEdit/doc/tips/tip40.html | 8 +-
jEdit/doc/tips/tip41.html | 6 +-
jEdit/doc/tips/tip42.html | 2 +-
jEdit/doc/tips/tip43.html | 4 +-
jEdit/doc/tips/tip44.html | 6 +-
jEdit/doc/tips/tip45.html | 20 +-
jEdit/doc/tips/tip46.html | 8 +-
jEdit/doc/tips/tip47.html | 8 +-
jEdit/doc/tips/tip48.html | 8 +-
jEdit/doc/tips/tip49.html | 10 +-
jEdit/doc/tips/tip5.html | 4 +-
jEdit/doc/tips/tip50.html | 8 +-
jEdit/doc/tips/tip51.html | 2 +-
jEdit/doc/tips/tip52.html | 10 +-
jEdit/doc/tips/tip53.html | 8 +-
jEdit/doc/tips/tip54.html | 6 +-
jEdit/doc/tips/tip55.html | 34 +-
jEdit/doc/tips/tip56.html | 34 +-
jEdit/doc/tips/tip57.html | 10 +-
jEdit/doc/tips/tip58.html | 12 +-
jEdit/doc/tips/tip59.html | 38 +-
jEdit/doc/tips/tip6.html | 4 +-
jEdit/doc/tips/tip60.html | 16 +-
jEdit/doc/tips/tip61.html | 12 +-
jEdit/doc/tips/tip62.html | 10 +-
jEdit/doc/tips/tip63.html | 10 +-
jEdit/doc/tips/tip64.html | 4 +-
jEdit/doc/tips/tip65.html | 16 +-
jEdit/doc/tips/tip66.html | 4 +-
jEdit/doc/tips/tip67.html | 10 +-
jEdit/doc/tips/tip68.html | 6 +-
jEdit/doc/tips/tip69.html | 44 +-
jEdit/doc/tips/tip7.html | 4 +-
jEdit/doc/tips/tip70.html | 8 +-
jEdit/doc/tips/tip71.html | 6 +-
jEdit/doc/tips/tip72.html | 16 +-
jEdit/doc/tips/tip73.html | 12 +-
jEdit/doc/tips/tip74.html | 14 +-
jEdit/doc/tips/tip75.html | 38 +-
jEdit/doc/tips/tip76.html | 10 +-
jEdit/doc/tips/tip77.html | 6 +-
jEdit/doc/tips/tip78.html | 4 +-
jEdit/doc/tips/tip79.html | 12 +-
jEdit/doc/tips/tip8.html | 30 +-
jEdit/doc/tips/tip80.html | 16 +-
jEdit/doc/tips/tip81.html | 12 +-
jEdit/doc/tips/tip82.html | 14 +-
jEdit/doc/tips/tip83.html | 10 +-
jEdit/doc/tips/tip84.html | 10 +-
jEdit/doc/tips/tip85.html | 18 +-
jEdit/doc/tips/tip86.html | 10 +-
jEdit/doc/tips/tip87.html | 24 +-
jEdit/doc/tips/tip88.html | 4 +-
jEdit/doc/tips/tip89.html | 52 +-
jEdit/doc/tips/tip9.html | 10 +-
jEdit/doc/tips/tip90.html | 54 +-
jEdit/doc/tips/tip91.html | 20 +-
jEdit/doc/tips/tip92.html | 6 +-
jEdit/doc/tips/tip93.html | 40 +-
jEdit/doc/tips/tip94.html | 38 +-
jEdit/doc/tips/tip95.html | 2 +-
jEdit/doc/tips/tip96.html | 2 +-
jEdit/doc/tips/tip97.html | 20 +-
jEdit/doc/tips/tip98.html | 8 +-
jEdit/doc/users-guide/activity-log.xml | 112 +-
jEdit/doc/users-guide/basics.xml | 1054 +-
jEdit/doc/users-guide/bsh-commands.xml | 1436 +-
jEdit/doc/users-guide/conventions.xml | 239 +-
jEdit/doc/users-guide/customizing.xml | 1320 +-
jEdit/doc/users-guide/dialog-macro.xml | 1290 +-
jEdit/doc/users-guide/files.xml | 1386 +-
jEdit/doc/users-guide/globs.xml | 272 +-
jEdit/doc/users-guide/history.xml | 94 +-
jEdit/doc/users-guide/installing-modes.xml | 145 +-
jEdit/doc/users-guide/launcher-guide.xml | 1072 +-
jEdit/doc/users-guide/macro-basics.xml | 1532 +-
jEdit/doc/users-guide/macro-index.xml | 1494 ++-
jEdit/doc/users-guide/macro-tips.xml | 1840 ++--
jEdit/doc/users-guide/plugin-implement.xml | 2561 ++--
jEdit/doc/users-guide/plugin-intro.xml | 262 +-
jEdit/doc/users-guide/plugin-tips.xml | 320 +-
jEdit/doc/users-guide/regexps.xml | 507 +-
jEdit/doc/users-guide/shortcuts.xml | 1976 ++--
jEdit/doc/users-guide/source-edit.xml | 1242 +-
jEdit/doc/users-guide/starting.xml | 731 +-
jEdit/doc/users-guide/text-edit.xml | 2495 ++--
jEdit/doc/users-guide/updating-modes.xml | 176 +-
jEdit/doc/users-guide/users-guide.xml | 388 +-
jEdit/doc/users-guide/using-macros.xml | 366 +-
jEdit/doc/users-guide/using-plugins.xml | 284 +-
jEdit/doc/users-guide/writing-modes.xml | 1824 ++--
jEdit/doc/welcome.html | 58 +-
jEdit/doclet/GenerateTocXML.java | 232 +-
jEdit/installer/BZip2Constants.java | 168 +-
jEdit/installer/CBZip2InputStream.java | 1906 ++--
jEdit/installer/CBZip2OutputStream.java | 4042 +++---
jEdit/installer/CRC.java | 226 +-
jEdit/installer/ConsoleInstall.java | 276 +-
jEdit/installer/ConsoleProgress.java | 88 +-
jEdit/installer/Install.java | 326 +-
jEdit/installer/InstallThread.java | 228 +-
jEdit/installer/InvalidHeaderException.java | 84 +-
jEdit/installer/NonInteractiveInstall.java | 182 +-
jEdit/installer/OperatingSystem.java | 752 +-
jEdit/installer/Progress.java | 60 +-
jEdit/installer/ServerKiller.java | 266 +-
jEdit/installer/SwingInstall.java | 1568 +-
jEdit/installer/TarBuffer.java | 968 +-
jEdit/installer/TarEntry.java | 1458 +-
jEdit/installer/TarHeader.java | 844 +-
jEdit/installer/TarInputStream.java | 1038 +-
jEdit/installer/TarOutputStream.java | 660 +-
jEdit/installer/VariableGridLayout.java | 334 -
jEdit/installer/done-HalfAnOS.html | 16 +-
jEdit/installer/done-MacOS.html | 26 +-
jEdit/installer/done-Unix.html | 24 +-
jEdit/installer/done-VMS.html | 26 +-
jEdit/installer/done-Windows.html | 14 +-
jEdit/installer/gpl.html | 942 +-
jEdit/installer/install.mf | 2 +-
jEdit/installer/install.props | 132 +-
jEdit/installer/readme.html | 50 +-
jEdit/jEdit.iml | 1 +
jEdit/jEdit.ipr | 1736 ---
jEdit/jars/LatestVersion/LatestVersion.html | 18 -
jEdit/jars/LatestVersion/LatestVersion.iml | 13 -
jEdit/jars/LatestVersion/LatestVersion.props | 42 -
jEdit/jars/LatestVersion/LatestVersion.txt | 1 -
jEdit/jars/LatestVersion/LatestVersionPlugin.java | 99 -
jEdit/jars/LatestVersion/actions.xml | 11 -
jEdit/jars/LatestVersion/build.xml | 23 -
jEdit/jars/MacOSX/MacOSX.iml | 26 +-
jEdit/jars/MacOSX/macosx/MacOSXPlugin.java | 2 +-
jEdit/jars/QuickNotepad/QuickNotepad.iml | 26 +-
jEdit/jars/QuickNotepad/QuickNotepad.java | 488 +-
jEdit/jars/QuickNotepad/QuickNotepad.props | 134 +-
jEdit/jars/QuickNotepad/QuickNotepadActions.java | 60 +-
.../jars/QuickNotepad/QuickNotepadOptionPane.java | 254 +-
jEdit/jars/QuickNotepad/QuickNotepadPlugin.java | 68 +-
jEdit/jars/QuickNotepad/QuickNotepadTextArea.java | 66 +-
jEdit/jars/QuickNotepad/QuickNotepadToolPanel.java | 200 +-
jEdit/jars/QuickNotepad/README.txt | 24 +-
jEdit/jars/QuickNotepad/actions.xml | 58 +-
jEdit/jars/QuickNotepad/build.xml | 46 +-
jEdit/jars/QuickNotepad/changes40.txt | 198 +-
jEdit/jars/QuickNotepad/changes42.txt | 52 +-
jEdit/jars/QuickNotepad/description.html | 16 +-
jEdit/jars/QuickNotepad/dockables.xml | 30 +-
jEdit/jars/QuickNotepad/users-guide.xml | 552 +-
jEdit/macros/C/Include_Guard.bsh | 148 +-
jEdit/macros/C/Toggle_Header_Source.bsh | 362 +-
jEdit/macros/Clipboard/Copy_Lines.bsh | 72 +-
jEdit/macros/Clipboard/Copy_Lines_Containing.bsh | 56 +-
jEdit/macros/Clipboard/Copy_Visible_Lines.bsh | 68 +-
jEdit/macros/Clipboard/Cut_Lines.bsh | 82 +-
jEdit/macros/Clipboard/Cut_Lines_Containing.bsh | 72 +-
jEdit/macros/Editing/Emacs_Ctrl-K.bsh | 134 +-
jEdit/macros/Editing/Emacs_Next_Line.bsh | 86 +-
jEdit/macros/Editing/Emacs_Previous_Line.bsh | 90 +-
jEdit/macros/Editing/Go_to_Column.bsh | 102 +-
jEdit/macros/Editing/Greedy_Backspace.bsh | 162 +-
jEdit/macros/Editing/Greedy_Delete.bsh | 174 +-
jEdit/macros/Editing/Greedy_Left.bsh | 160 +-
jEdit/macros/Editing/Greedy_Right.bsh | 172 +-
jEdit/macros/Editing/Keywords_to_Upper_Case.bsh | 94 +-
jEdit/macros/Editing/Mode_Switcher.bsh | 386 +-
jEdit/macros/Editing/Move_Lines_Down.bsh | 212 +-
jEdit/macros/Editing/Move_Lines_Up.bsh | 220 +-
jEdit/macros/Files/Browse_Directory.bsh | 102 +-
jEdit/macros/Files/Buffer_Switcher.bsh | 522 +-
jEdit/macros/Files/Close_All_Except_Active.bsh | 114 +-
jEdit/macros/Files/Copy_Name_to_Clipboard.bsh | 56 +-
jEdit/macros/Files/Copy_Path_to_Clipboard.bsh | 54 +-
jEdit/macros/Files/Delete_Current.bsh | 150 +-
jEdit/macros/Files/Glob_Close.bsh | 96 +-
jEdit/macros/Files/Insert_Selection.bsh | 106 +-
jEdit/macros/Files/Next_Dirty_Buffer.bsh | 88 +-
jEdit/macros/Files/Open_Path.bsh | 98 +-
jEdit/macros/Files/Open_Selection.bsh | 108 +-
jEdit/macros/Files/Toggle_ReadOnly.bsh | 174 +-
jEdit/macros/Interface/Decrease_Font_Size.bsh | 76 +-
jEdit/macros/Interface/Increase_Font_Size.bsh | 76 +-
jEdit/macros/Interface/Open_Context_Menu.bsh | 56 +-
jEdit/macros/Interface/Reset_TextArea.bsh | 14 +-
jEdit/macros/Interface/Splitpane_Grow.bsh | 115 +-
.../Interface/Toggle_Bottom_Docking_Area.bsh | 88 +-
.../macros/Interface/Toggle_Left_Docking_Area.bsh | 72 +-
.../macros/Interface/Toggle_Right_Docking_Area.bsh | 72 +-
jEdit/macros/Interface/Toggle_Top_Docking_Area.bsh | 72 +-
jEdit/macros/Java/Create_Constructor.bsh | 442 +-
jEdit/macros/Java/Get_Class_Name.bsh | 184 +-
jEdit/macros/Java/Get_Package_Name.bsh | 272 +-
jEdit/macros/Java/Java_File_Save.bsh | 284 +-
jEdit/macros/Java/Make_Get_and_Set_Methods.bsh | 634 +-
.../Java/Preview_JavaDoc_Of_Current_Buffer.bsh | 1648 ++--
jEdit/macros/Misc/Debug_BufferSets.bsh | 18 +-
jEdit/macros/Misc/Display_Abbreviations.bsh | 782 +-
jEdit/macros/Misc/Display_Actions.bsh | 152 +-
jEdit/macros/Misc/Display_Character_Code.bsh | 56 +-
jEdit/macros/Misc/Display_Shortcuts.bsh | 614 +-
jEdit/macros/Misc/Evaluate_Buffer_in_BeanShell.bsh | 122 +-
jEdit/macros/Misc/Hex_Convert.bsh | 212 +-
.../macros/Misc/HyperSearch_Results_to_Buffer.bsh | 196 +-
jEdit/macros/Misc/Make_Bug_Report.bsh | 236 +-
jEdit/macros/Misc/Run_Script.bsh | 252 +-
jEdit/macros/Misc/Show_Threads.bsh | 300 +-
.../Properties/Create_Plugin_Announcement.bsh | 777 +-
.../macros/Properties/Insert_Buffer_Properties.bsh | 452 +-
.../macros/Properties/Look_and_Feel_Properties.bsh | 116 +-
jEdit/macros/Properties/System_Properties.bsh | 110 +-
jEdit/macros/Properties/jEdit_Properties.bsh | 116 +-
jEdit/macros/Text/Add_Prefix_and_Suffix.bsh | 320 +-
jEdit/macros/Text/Color_Picker.bsh | 104 +-
jEdit/macros/Text/Duplicate_Line.bsh | 140 +-
jEdit/macros/Text/Insert_Date.bsh | 160 +-
jEdit/macros/Text/Insert_Tag.bsh | 124 +-
jEdit/macros/Text/Next_Char.bsh | 146 +-
jEdit/macros/Text/Reverse_Lines.bsh | 188 +-
jEdit/macros/Text/Single_Space_Buffer.bsh | 102 +-
jEdit/modes/actionscript.xml | 1658 ++--
jEdit/modes/ada95.xml | 448 +-
jEdit/modes/ant.xml | 348 +
jEdit/modes/antlr.xml | 204 +-
jEdit/modes/apacheconf.xml | 2014 ++--
jEdit/modes/apdl.xml |15072 ++++++++++----------
jEdit/modes/applescript.xml | 560 +-
jEdit/modes/asp.xml | 1036 +-
jEdit/modes/aspect-j.xml | 334 +-
jEdit/modes/assembly-m68k.xml | 1016 +-
jEdit/modes/assembly-macro32.xml | 1154 +-
jEdit/modes/assembly-mcs51.xml | 474 +-
jEdit/modes/assembly-parrot.xml | 276 +-
jEdit/modes/assembly-r2000.xml | 518 +-
jEdit/modes/assembly-x86.xml | 1728 ++--
jEdit/modes/awk.xml | 230 +-
jEdit/modes/b.xml | 406 +-
jEdit/modes/batch.xml | 344 +-
jEdit/modes/bbj.xml | 616 +-
jEdit/modes/bcel.xml | 640 +-
jEdit/modes/bibtex.xml | 1920 ++--
jEdit/modes/c.xml | 818 +-
jEdit/modes/catalog | 1136 +-
jEdit/modes/chill.xml | 268 +-
jEdit/modes/cil.xml | 770 +-
jEdit/modes/clips.xml | 868 +-
jEdit/modes/clojure.xml | 1002 +-
jEdit/modes/cobol.xml | 1996 ++--
jEdit/modes/coldfusion.xml | 1288 +-
jEdit/modes/cplusplus.xml | 250 +-
jEdit/modes/csharp.xml | 376 +-
jEdit/modes/css.xml | 1350 +-
jEdit/modes/csv.xml | 280 +-
jEdit/modes/cvs-commit.xml | 50 +-
jEdit/modes/d.xml | 424 +-
jEdit/modes/django.xml | 404 +-
jEdit/modes/dot.xml | 1248 +-
jEdit/modes/doxygen.xml | 674 +-
jEdit/modes/dsssl.xml | 306 +-
jEdit/modes/eiffel.xml | 230 +-
jEdit/modes/embperl.xml | 102 +-
jEdit/modes/erlang.xml | 534 +-
jEdit/modes/factor.xml | 198 +-
jEdit/modes/fhtml.xml | 50 +-
jEdit/modes/forth.xml | 306 +-
jEdit/modes/fortran.xml | 504 +-
jEdit/modes/foxpro.xml | 3716 +++---
jEdit/modes/freemarker.xml | 408 +-
jEdit/modes/gcbasic.xml | 1788 ++--
jEdit/modes/gettext.xml | 116 +-
jEdit/modes/gnuplot.xml | 540 +-
jEdit/modes/go.xml | 174 +
jEdit/modes/groovy.xml | 524 +-
jEdit/modes/haskell.xml | 300 +-
jEdit/modes/haxe.xml | 177 +
jEdit/modes/hex.xml | 40 +-
jEdit/modes/hlsl.xml | 956 +-
jEdit/modes/htaccess.xml | 1134 +-
jEdit/modes/html.xml | 384 +-
jEdit/modes/hxml.xml | 63 +
jEdit/modes/i4gl.xml | 1330 +-
jEdit/modes/icon.xml | 396 +-
jEdit/modes/idl.xml | 316 +-
jEdit/modes/inform.xml | 410 +-
jEdit/modes/ini.xml | 40 +-
jEdit/modes/inno-setup.xml | 812 +-
jEdit/modes/interlis.xml | 524 +-
jEdit/modes/io.xml | 306 +-
jEdit/modes/java.xml | 556 +-
jEdit/modes/javacc.xml | 137 +-
jEdit/modes/javascript.xml | 1118 +-
jEdit/modes/jcl.xml | 134 +-
jEdit/modes/jhtml.xml | 288 +-
jEdit/modes/jmk.xml | 134 +-
jEdit/modes/json.xml | 28 +
jEdit/modes/jsp.xml | 510 +-
jEdit/modes/latex.xml | 463 +-
jEdit/modes/lilypond.xml | 5359 ++++----
jEdit/modes/lisp.xml | 2074 ++--
jEdit/modes/literate-haskell.xml | 74 +-
jEdit/modes/logtalk.xml | 397 +
jEdit/modes/lotos.xml | 250 +-
jEdit/modes/lua.xml | 476 +-
jEdit/modes/mail.xml | 70 +-
jEdit/modes/makefile.xml | 202 +-
jEdit/modes/maple.xml | 1470 +-
jEdit/modes/maven.xml | 372 +
jEdit/modes/ml.xml | 432 +-
jEdit/modes/modula3.xml | 356 +-
jEdit/modes/moin.xml | 222 +-
jEdit/modes/mqsc.xml | 460 +-
jEdit/modes/myghty.xml | 260 +-
jEdit/modes/mysql.xml | 488 +-
jEdit/modes/n3.xml | 172 +-
jEdit/modes/netrexx.xml | 828 +-
jEdit/modes/nqc.xml | 436 +-
jEdit/modes/nsis2.xml | 969 +-
jEdit/modes/objective-c.xml | 238 +-
jEdit/modes/objectrexx.xml | 490 +-
jEdit/modes/occam.xml | 520 +-
jEdit/modes/omnimark.xml | 910 +-
jEdit/modes/pascal.xml | 442 +-
jEdit/modes/patch.xml | 36 +-
jEdit/modes/perl.xml | 1630 ++--
jEdit/modes/php.xml |10281 +++++++-------
jEdit/modes/pike.xml | 482 +-
jEdit/modes/pl-sql.xml | 1004 +-
jEdit/modes/pl1.xml | 1192 +-
jEdit/modes/plaintex.xml | 2886 ++++
jEdit/modes/pop11.xml | 524 +-
jEdit/modes/postscript.xml | 194 +-
jEdit/modes/povray.xml | 1036 +-
jEdit/modes/powerdynamo.xml | 928 +-
jEdit/modes/progress.xml | 7496 +++++-----
jEdit/modes/prolog.xml | 390 +-
jEdit/modes/props.xml | 54 +-
jEdit/modes/psp.xml | 252 +-
jEdit/modes/ptl.xml | 64 +-
jEdit/modes/pure.xml | 215 +-
jEdit/modes/pvwave.xml | 1444 +-
jEdit/modes/pyrex.xml | 76 +-
jEdit/modes/python.xml | 796 +-
jEdit/modes/quake.xml | 970 +-
jEdit/modes/rcp.xml | 636 +-
jEdit/modes/rd.xml | 140 +-
jEdit/modes/rebol.xml | 1092 +-
jEdit/modes/redcode.xml | 252 +-
jEdit/modes/regex.xml | 121 +
jEdit/modes/relax-ng-compact.xml | 148 +-
jEdit/modes/rest.xml | 270 +-
jEdit/modes/rfc.xml | 56 +-
jEdit/modes/rhtml.xml | 216 +-
jEdit/modes/rib.xml | 438 +-
jEdit/modes/rpmspec.xml | 260 +-
jEdit/modes/rtf.xml | 40 +-
jEdit/modes/ruby.xml | 938 +-
jEdit/modes/rview.xml | 434 +-
jEdit/modes/sas.xml | 899 +-
jEdit/modes/scheme.xml | 472 +-
jEdit/modes/sdl_pr.xml | 456 +-
jEdit/modes/sgml.xml | 94 +-
jEdit/modes/shellscript.xml | 339 +-
jEdit/modes/shtml.xml | 234 +-
jEdit/modes/sip.xml | 102 +
jEdit/modes/slate.xml | 86 +-
jEdit/modes/slax.xml | 150 +
jEdit/modes/smalltalk.xml | 156 +-
jEdit/modes/smarty.xml | 531 +
jEdit/modes/smi-mib.xml | 262 +-
jEdit/modes/splus.xml | 162 +-
jEdit/modes/sql-loader.xml | 244 +-
jEdit/modes/sqr.xml | 304 +-
jEdit/modes/squidconf.xml | 454 +-
jEdit/modes/ssharp.xml | 290 +-
jEdit/modes/stata.xml | 2979 ++++
jEdit/modes/stataado.xml | 2691 ----
jEdit/modes/statado.xml | 2691 ----
jEdit/modes/svn-commit.xml | 44 +-
jEdit/modes/swig.xml | 68 +-
jEdit/modes/tcl.xml | 1370 +-
jEdit/modes/tex.xml | 214 +-
jEdit/modes/texinfo.xml | 40 +-
jEdit/modes/text.xml | 22 +-
jEdit/modes/tld.xml | 260 +
jEdit/modes/tpl.xml | 188 +-
jEdit/modes/tsp.xml | 538 +-
jEdit/modes/tsql.xml | 2038 ++--
jEdit/modes/tthtml.xml | 532 +-
jEdit/modes/turbobasic.xml | 736 +-
jEdit/modes/twiki.xml | 306 +-
jEdit/modes/typoscript.xml | 162 +-
jEdit/modes/url.xml | 166 +
jEdit/modes/uscript.xml | 320 +-
jEdit/modes/vbscript.xml | 1478 +-
jEdit/modes/velocity.xml | 230 +-
jEdit/modes/verilog.xml | 438 +-
jEdit/modes/vhdl.xml | 914 +-
jEdit/modes/visualbasic.xml | 1163 ++
jEdit/modes/xml.xml | 322 +-
jEdit/modes/xq.xml | 918 +-
jEdit/modes/xsl.xml | 894 +-
jEdit/modes/yab.xml | 636 +-
jEdit/modes/yaml.xml | 166 +-
jEdit/modes/zpt.xml | 342 +-
.../jarbundler/AppBundleProperties.java | 674 +-
jEdit/net/sourceforge/jarbundler/DocumentType.java | 376 +-
jEdit/net/sourceforge/jarbundler/HelpBook.java | 142 +-
jEdit/net/sourceforge/jarbundler/JarBundler.java | 2960 ++--
jEdit/net/sourceforge/jarbundler/JavaProperty.java | 128 +-
.../sourceforge/jarbundler/PropertyListWriter.java | 884 +-
jEdit/net/sourceforge/jarbundler/Service.java | 408 +-
jEdit/org/gjt/sp/jedit/Abbrevs.java | 1188 +-
jEdit/org/gjt/sp/jedit/AbstractOptionPane.java | 832 +-
jEdit/org/gjt/sp/jedit/ActionContext.java | 142 +-
jEdit/org/gjt/sp/jedit/ActionListHandler.java | 394 +-
jEdit/org/gjt/sp/jedit/ActionSet.java | 670 +-
jEdit/org/gjt/sp/jedit/Autosave.java | 220 +-
jEdit/org/gjt/sp/jedit/BeanShell.java | 1174 +-
jEdit/org/gjt/sp/jedit/BeanShellAction.java | 408 +-
jEdit/org/gjt/sp/jedit/BeanShellFacade.java | 662 +-
jEdit/org/gjt/sp/jedit/Buffer.java | 4473 +++---
jEdit/org/gjt/sp/jedit/BufferHistory.java | 926 +-
jEdit/org/gjt/sp/jedit/Debug.java | 304 +-
jEdit/org/gjt/sp/jedit/EBComponent.java | 112 +-
jEdit/org/gjt/sp/jedit/EBMessage.java | 198 +-
jEdit/org/gjt/sp/jedit/EBPlugin.java | 116 +-
jEdit/org/gjt/sp/jedit/EditAction.java | 449 +-
jEdit/org/gjt/sp/jedit/EditBus.java | 880 +-
jEdit/org/gjt/sp/jedit/EditPane.java | 2716 ++--
jEdit/org/gjt/sp/jedit/EditPlugin.java | 1700 ++--
jEdit/org/gjt/sp/jedit/EditServer.java | 750 +-
jEdit/org/gjt/sp/jedit/GUIUtilities.java | 4068 +++---
jEdit/org/gjt/sp/jedit/IPropertyManager.java | 78 +-
jEdit/org/gjt/sp/jedit/JARClassLoader.java | 1095 +-
.../org/gjt/sp/jedit/JEditAbstractEditAction.java | 210 +-
jEdit/org/gjt/sp/jedit/JEditActionContext.java | 362 +-
jEdit/org/gjt/sp/jedit/JEditActionSet.java | 943 +-
jEdit/org/gjt/sp/jedit/JEditBeanShellAction.java | 412 +-
jEdit/org/gjt/sp/jedit/JEditKillRing.java | 400 +-
jEdit/org/gjt/sp/jedit/JEditMode.java | 258 +-
jEdit/org/gjt/sp/jedit/JEditRegisterSaver.java | 392 +-
jEdit/org/gjt/sp/jedit/JEditRegistersListener.java | 72 +-
jEdit/org/gjt/sp/jedit/Macros.java | 2083 ++--
jEdit/org/gjt/sp/jedit/Marker.java | 238 +-
jEdit/org/gjt/sp/jedit/MiscUtilities.java | 3731 +++---
jEdit/org/gjt/sp/jedit/Mode.java | 905 +-
jEdit/org/gjt/sp/jedit/ModeCatalogHandler.java | 210 +-
jEdit/org/gjt/sp/jedit/OperatingSystem.java | 748 +-
jEdit/org/gjt/sp/jedit/OptionGroup.java | 406 +-
jEdit/org/gjt/sp/jedit/OptionPane.java | 124 +-
jEdit/org/gjt/sp/jedit/PerspectiveManager.java | 733 +-
jEdit/org/gjt/sp/jedit/PluginJAR.java | 3497 +++---
jEdit/org/gjt/sp/jedit/PropertyManager.java | 380 +-
jEdit/org/gjt/sp/jedit/RegisterSaver.java | 66 +-
jEdit/org/gjt/sp/jedit/Registers.java | 1554 ++-
jEdit/org/gjt/sp/jedit/RegistersListener.java | 62 +-
jEdit/org/gjt/sp/jedit/ServiceListHandler.java | 322 +-
jEdit/org/gjt/sp/jedit/ServiceManager.java | 754 +-
jEdit/org/gjt/sp/jedit/SettingsReloader.java | 189 +-
jEdit/org/gjt/sp/jedit/SettingsXML.java | 386 +-
jEdit/org/gjt/sp/jedit/TextUtilities.java | 2024 ++--
jEdit/org/gjt/sp/jedit/View.java | 4629 +++---
jEdit/org/gjt/sp/jedit/actions.dtd | 32 +-
jEdit/org/gjt/sp/jedit/actions.xml | 3149 +++--
jEdit/org/gjt/sp/jedit/browser.actions.xml | 445 +-
.../gjt/sp/jedit/browser/AbstractBrowserTask.java | 127 +
.../gjt/sp/jedit/browser/BrowserCommandsMenu.java | 638 +-
.../org/gjt/sp/jedit/browser/BrowserIORequest.java | 686 +-
.../org/gjt/sp/jedit/browser/BrowserListener.java | 96 +-
jEdit/org/gjt/sp/jedit/browser/BrowserView.java | 1498 +-
.../org/gjt/sp/jedit/browser/FileCellRenderer.java | 582 +-
.../sp/jedit/browser/ListDirectoryBrowserTask.java | 119 +
jEdit/org/gjt/sp/jedit/browser/VFSBrowser.java | 4232 +++---
.../sp/jedit/browser/VFSDirectoryEntryTable.java | 1327 +-
.../jedit/browser/VFSDirectoryEntryTableModel.java | 946 +-
.../gjt/sp/jedit/browser/VFSFileChooserDialog.java | 1187 +-
.../org/gjt/sp/jedit/browser/VFSFileNameField.java | 572 +-
jEdit/org/gjt/sp/jedit/browser/package.html | 2 +-
jEdit/org/gjt/sp/jedit/buffer/BufferAdapter.java | 277 +-
.../gjt/sp/jedit/buffer/BufferChangeAdapter.java | 252 +-
.../gjt/sp/jedit/buffer/BufferChangeListener.java | 536 +-
jEdit/org/gjt/sp/jedit/buffer/BufferListener.java | 300 +-
.../gjt/sp/jedit/buffer/BufferUndoListener.java | 144 +-
jEdit/org/gjt/sp/jedit/buffer/ContentManager.java | 485 +-
.../jedit/buffer/DefaultFoldHandlerProvider.java | 138 +-
.../org/gjt/sp/jedit/buffer/DummyFoldHandler.java | 112 +-
.../gjt/sp/jedit/buffer/ExplicitFoldHandler.java | 198 +-
jEdit/org/gjt/sp/jedit/buffer/FoldHandler.java | 324 +-
.../gjt/sp/jedit/buffer/FoldHandlerProvider.java | 96 +-
.../org/gjt/sp/jedit/buffer/IndentFoldHandler.java | 272 +-
jEdit/org/gjt/sp/jedit/buffer/JEditBuffer.java | 5586 ++++----
jEdit/org/gjt/sp/jedit/buffer/KillRing.java | 600 +-
jEdit/org/gjt/sp/jedit/buffer/LineManager.java | 724 +-
jEdit/org/gjt/sp/jedit/buffer/PositionManager.java | 418 +-
jEdit/org/gjt/sp/jedit/buffer/UndoManager.java | 1005 +-
jEdit/org/gjt/sp/jedit/buffer/package.html | 4 +-
.../sp/jedit/bufferio/BufferAutosaveRequest.java | 236 +-
.../org/gjt/sp/jedit/bufferio/BufferIORequest.java | 936 +-
.../gjt/sp/jedit/bufferio/BufferInsertRequest.java | 250 +-
.../gjt/sp/jedit/bufferio/BufferLoadRequest.java | 788 +-
.../gjt/sp/jedit/bufferio/BufferSaveRequest.java | 465 +-
.../gjt/sp/jedit/bufferio/MarkersSaveRequest.java | 292 +-
jEdit/org/gjt/sp/jedit/bufferset/BufferSet.java | 112 +-
.../gjt/sp/jedit/bufferset/BufferSetManager.java | 417 +-
jEdit/org/gjt/sp/jedit/catalog.dtd | 20 +-
.../gjt/sp/jedit/datatransfer/JEditDataFlavor.java | 35 +
.../gjt/sp/jedit/datatransfer/JEditRichText.java | 58 +
.../sp/jedit/datatransfer/JEditTransferable.java | 61 +
.../datatransfer/JEditTransferableService.java | 36 +
.../datatransfer/ListVFSFileTransferable.java | 93 +
.../RichJEditTextTransferableService.java | 43 +
.../jedit/datatransfer/RichTextTransferable.java | 62 +
.../datatransfer/StringTransferableService.java | 43 +
.../gjt/sp/jedit/datatransfer/TransferHandler.java | 78 +
jEdit/org/gjt/sp/jedit/dockables.dtd | 22 +-
jEdit/org/gjt/sp/jedit/dockables.xml | 52 +-
jEdit/org/gjt/sp/jedit/gui/AbbrevEditor.java | 462 +-
jEdit/org/gjt/sp/jedit/gui/AboutDialog.java | 652 +-
.../sp/jedit/gui/AbstractContextOptionPane.java | 634 +-
jEdit/org/gjt/sp/jedit/gui/ActionBar.java | 1112 +-
jEdit/org/gjt/sp/jedit/gui/AddAbbrevDialog.java | 252 +-
jEdit/org/gjt/sp/jedit/gui/AnimatedIcon.java | 272 +-
.../org/gjt/sp/jedit/gui/BeanShellErrorDialog.java | 100 +-
jEdit/org/gjt/sp/jedit/gui/BufferOptions.java | 282 +-
jEdit/org/gjt/sp/jedit/gui/BufferSwitcher.java | 239 +-
jEdit/org/gjt/sp/jedit/gui/CloseDialog.java | 522 +-
jEdit/org/gjt/sp/jedit/gui/ColorWellButton.java | 410 +-
jEdit/org/gjt/sp/jedit/gui/CompleteWord.java | 1018 +-
jEdit/org/gjt/sp/jedit/gui/CompletionPopup.java | 1002 +-
jEdit/org/gjt/sp/jedit/gui/ContextAddDialog.java | 39 +-
.../gjt/sp/jedit/gui/DefaultFocusComponent.java | 82 +-
.../org/gjt/sp/jedit/gui/DefaultInputHandler.java | 490 +-
jEdit/org/gjt/sp/jedit/gui/DockableLayout.java | 940 +-
jEdit/org/gjt/sp/jedit/gui/DockablePanel.java | 634 +-
jEdit/org/gjt/sp/jedit/gui/DockableWindow.java | 42 +-
.../gjt/sp/jedit/gui/DockableWindowContainer.java | 72 +-
.../gjt/sp/jedit/gui/DockableWindowFactory.java | 1140 +-
.../gjt/sp/jedit/gui/DockableWindowManager.java | 1500 +-
.../sp/jedit/gui/DockableWindowManagerImpl.java | 98 +-
jEdit/org/gjt/sp/jedit/gui/EditAbbrevDialog.java | 352 +-
jEdit/org/gjt/sp/jedit/gui/EnhancedButton.java | 228 +-
jEdit/org/gjt/sp/jedit/gui/EnhancedDialog.java | 344 +-
jEdit/org/gjt/sp/jedit/gui/ErrorListDialog.java | 438 +-
jEdit/org/gjt/sp/jedit/gui/ExtendedGridLayout.java | 2448 ++--
.../jedit/gui/ExtendedGridLayoutConstraints.java | 952 +-
.../org/gjt/sp/jedit/gui/FilePropertiesDialog.java | 23 +-
jEdit/org/gjt/sp/jedit/gui/FilesChangedDialog.java | 874 +-
jEdit/org/gjt/sp/jedit/gui/FilteredListModel.java | 556 +-
jEdit/org/gjt/sp/jedit/gui/FilteredTableModel.java | 596 +-
.../gjt/sp/jedit/gui/FloatingWindowContainer.java | 436 +-
jEdit/org/gjt/sp/jedit/gui/FontSelector.java | 661 +-
jEdit/org/gjt/sp/jedit/gui/FontSelectorDialog.java | 386 +
jEdit/org/gjt/sp/jedit/gui/GrabKeyDialog.java | 1110 +-
jEdit/org/gjt/sp/jedit/gui/HistoryModel.java | 404 +-
jEdit/org/gjt/sp/jedit/gui/HistoryModelSaver.java | 70 +-
jEdit/org/gjt/sp/jedit/gui/HistoryText.java | 740 +-
jEdit/org/gjt/sp/jedit/gui/HistoryTextArea.java | 402 +-
jEdit/org/gjt/sp/jedit/gui/HistoryTextField.java | 826 +-
jEdit/org/gjt/sp/jedit/gui/IOProgressMonitor.java | 434 +-
jEdit/org/gjt/sp/jedit/gui/InputHandler.java | 1056 +-
jEdit/org/gjt/sp/jedit/gui/JCheckBoxList.java | 700 +-
.../gjt/sp/jedit/gui/JEditHistoryModelSaver.java | 448 +-
jEdit/org/gjt/sp/jedit/gui/KeyEventTranslator.java | 1076 +-
jEdit/org/gjt/sp/jedit/gui/KeyEventWorkaround.java | 785 +-
jEdit/org/gjt/sp/jedit/gui/LogViewer.java | 928 +-
jEdit/org/gjt/sp/jedit/gui/MarkerViewer.java | 568 +-
jEdit/org/gjt/sp/jedit/gui/MutableListModel.java | 58 +-
jEdit/org/gjt/sp/jedit/gui/OptionsDialog.java | 1438 +-
.../org/gjt/sp/jedit/gui/PanelWindowContainer.java | 1906 ++--
.../org/gjt/sp/jedit/gui/PasteFromListDialog.java | 524 +-
jEdit/org/gjt/sp/jedit/gui/PasteSpecialDialog.java | 154 +
jEdit/org/gjt/sp/jedit/gui/PingPongList.java | 342 +
jEdit/org/gjt/sp/jedit/gui/RegisterViewer.java | 811 +-
jEdit/org/gjt/sp/jedit/gui/RolloverButton.java | 310 +-
jEdit/org/gjt/sp/jedit/gui/SelectLineRange.java | 368 +-
.../sp/jedit/gui/ShortcutPrefixActiveEvent.java | 288 +-
jEdit/org/gjt/sp/jedit/gui/SplashScreen.java | 418 +-
jEdit/org/gjt/sp/jedit/gui/StatusBar.java | 986 +-
jEdit/org/gjt/sp/jedit/gui/StyleEditor.java | 417 +-
jEdit/org/gjt/sp/jedit/gui/TaskMonitor.java | 278 +
jEdit/org/gjt/sp/jedit/gui/TextAreaDialog.java | 268 +-
jEdit/org/gjt/sp/jedit/gui/TipOfTheDay.java | 334 +-
jEdit/org/gjt/sp/jedit/gui/ToolBarManager.java | 244 +-
jEdit/org/gjt/sp/jedit/gui/VariableGridLayout.java | 1286 +-
jEdit/org/gjt/sp/jedit/gui/package.html | 2 +-
.../gui/statusbar/BufferSetWidgetFactory.java | 315 +-
.../sp/jedit/gui/statusbar/ClockWidgetFactory.java | 306 +-
.../jedit/gui/statusbar/EncodingWidgetFactory.java | 178 +-
.../sp/jedit/gui/statusbar/FoldWidgetFactory.java | 178 +-
.../jedit/gui/statusbar/LineSepWidgetFactory.java | 230 +-
.../gui/statusbar/MemoryStatusWidgetFactory.java | 502 +-
.../sp/jedit/gui/statusbar/ModeWidgetFactory.java | 180 +-
.../gui/statusbar/MultiSelectWidgetFactory.java | 219 +-
.../gui/statusbar/OverwriteWidgetFactory.java | 230 +-
.../gui/statusbar/RectSelectWidgetFactory.java | 222 +-
.../statusbar/SelectionLengthWidgetFactory.java | 23 +-
.../jedit/gui/statusbar/StatusWidgetFactory.java | 82 +-
.../gjt/sp/jedit/gui/statusbar/ToolTipLabel.java | 82 +-
jEdit/org/gjt/sp/jedit/gui/statusbar/Widget.java | 94 +-
.../sp/jedit/gui/statusbar/WrapWidgetFactory.java | 223 +-
jEdit/org/gjt/sp/jedit/help/HelpHistoryModel.java | 494 +-
.../sp/jedit/help/HelpHistoryModelListener.java | 66 +-
jEdit/org/gjt/sp/jedit/help/HelpIndex.java | 788 +-
jEdit/org/gjt/sp/jedit/help/HelpSearchPanel.java | 598 +-
jEdit/org/gjt/sp/jedit/help/HelpTOCPanel.java | 972 +-
jEdit/org/gjt/sp/jedit/help/HelpViewer.java | 1120 +-
.../org/gjt/sp/jedit/help/HelpViewerInterface.java | 80 +-
jEdit/org/gjt/sp/jedit/help/HistoryButton.java | 364 +-
jEdit/org/gjt/sp/jedit/help/package.html | 16 +-
.../org/gjt/sp/jedit/indent/BracketIndentRule.java | 418 +-
.../sp/jedit/indent/CloseBracketIndentRule.java | 358 +-
jEdit/org/gjt/sp/jedit/indent/DeepIndentRule.java | 462 +-
jEdit/org/gjt/sp/jedit/indent/IndentAction.java | 444 +-
jEdit/org/gjt/sp/jedit/indent/IndentRule.java | 98 +-
.../org/gjt/sp/jedit/indent/IndentRuleFactory.java | 180 +-
.../gjt/sp/jedit/indent/OpenBracketIndentRule.java | 182 +-
.../org/gjt/sp/jedit/indent/RegexpIndentRule.java | 350 +-
jEdit/org/gjt/sp/jedit/indent/WhitespaceRule.java | 160 +-
.../gjt/sp/jedit/input/AbstractInputHandler.java | 852 +-
.../jedit/input/DefaultInputHandlerProvider.java | 86 +-
.../gjt/sp/jedit/input/InputHandlerProvider.java | 62 +-
.../gjt/sp/jedit/input/TextAreaInputHandler.java | 764 +-
jEdit/org/gjt/sp/jedit/io/AutoDetection.java | 454 +-
jEdit/org/gjt/sp/jedit/io/CharsetEncoding.java | 162 +-
jEdit/org/gjt/sp/jedit/io/CopyFileWorker.java | 161 +-
jEdit/org/gjt/sp/jedit/io/Encoding.java | 128 +-
jEdit/org/gjt/sp/jedit/io/EncodingDetector.java | 90 +-
jEdit/org/gjt/sp/jedit/io/EncodingServer.java | 328 +-
jEdit/org/gjt/sp/jedit/io/EncodingWithBOM.java | 364 +-
jEdit/org/gjt/sp/jedit/io/FavoritesVFS.java | 416 +-
jEdit/org/gjt/sp/jedit/io/FileRootsVFS.java | 346 +-
jEdit/org/gjt/sp/jedit/io/FileVFS.java | 1375 +-
jEdit/org/gjt/sp/jedit/io/GlobVFSFileFilter.java | 186 +-
.../org/gjt/sp/jedit/io/RegexEncodingDetector.java | 210 +-
jEdit/org/gjt/sp/jedit/io/UrlVFS.java | 178 +-
jEdit/org/gjt/sp/jedit/io/VFS.java | 2419 ++--
jEdit/org/gjt/sp/jedit/io/VFSFile.java | 1024 +-
jEdit/org/gjt/sp/jedit/io/VFSFileFilter.java | 114 +-
jEdit/org/gjt/sp/jedit/io/VFSManager.java | 946 +-
jEdit/org/gjt/sp/jedit/io/XMLEncodingDetector.java | 202 +-
jEdit/org/gjt/sp/jedit/io/package.html | 2 +-
jEdit/org/gjt/sp/jedit/jEdit.java | 8760 ++++++------
jEdit/org/gjt/sp/jedit/jedit.manifest | 2 +-
jEdit/org/gjt/sp/jedit/jedit.props | 955 +-
jEdit/org/gjt/sp/jedit/jedit_gui.props | 5248 ++++----
jEdit/org/gjt/sp/jedit/jedit_keys.props | 468 +-
jEdit/org/gjt/sp/jedit/killring.dtd | 10 +-
jEdit/org/gjt/sp/jedit/menu/DirectoryProvider.java | 354 +-
.../org/gjt/sp/jedit/menu/DynamicMenuProvider.java | 104 +-
.../sp/jedit/menu/EnhancedCheckBoxMenuItem.java | 380 +-
jEdit/org/gjt/sp/jedit/menu/EnhancedMenu.java | 377 +-
jEdit/org/gjt/sp/jedit/menu/EnhancedMenuItem.java | 391 +-
jEdit/org/gjt/sp/jedit/menu/FavoritesProvider.java | 204 +-
jEdit/org/gjt/sp/jedit/menu/MacrosProvider.java | 178 +-
jEdit/org/gjt/sp/jedit/menu/MarkersProvider.java | 368 +-
jEdit/org/gjt/sp/jedit/menu/PluginsProvider.java | 378 +-
.../sp/jedit/menu/RecentDirectoriesProvider.java | 274 +-
.../org/gjt/sp/jedit/menu/RecentFilesProvider.java | 403 +-
.../sp/jedit/menu/ReloadWithEncodingProvider.java | 318 +-
jEdit/org/gjt/sp/jedit/msg/BufferChanging.java | 132 +-
jEdit/org/gjt/sp/jedit/msg/BufferUpdate.java | 294 +-
.../org/gjt/sp/jedit/msg/DockableWindowUpdate.java | 216 +-
jEdit/org/gjt/sp/jedit/msg/DynamicMenuChanged.java | 138 +-
jEdit/org/gjt/sp/jedit/msg/EditPaneUpdate.java | 202 +-
.../org/gjt/sp/jedit/msg/EditorExitRequested.java | 148 +-
jEdit/org/gjt/sp/jedit/msg/EditorExiting.java | 84 +-
jEdit/org/gjt/sp/jedit/msg/EditorStarted.java | 88 +-
jEdit/org/gjt/sp/jedit/msg/PluginUpdate.java | 269 +-
jEdit/org/gjt/sp/jedit/msg/PositionChanging.java | 90 +-
jEdit/org/gjt/sp/jedit/msg/PropertiesChanged.java | 95 +-
jEdit/org/gjt/sp/jedit/msg/PropertiesChanging.java | 124 +-
jEdit/org/gjt/sp/jedit/msg/RegisterChanged.java | 122 +-
.../gjt/sp/jedit/msg/SearchSettingsChanged.java | 84 +-
jEdit/org/gjt/sp/jedit/msg/VFSPathSelected.java | 98 +-
jEdit/org/gjt/sp/jedit/msg/VFSUpdate.java | 124 +-
jEdit/org/gjt/sp/jedit/msg/ViewUpdate.java | 202 +-
jEdit/org/gjt/sp/jedit/msg/package.html | 2 +-
.../gjt/sp/jedit/options/AbbrevsOptionPane.java | 1014 +-
.../gjt/sp/jedit/options/AppearanceOptionPane.java | 583 +-
.../sp/jedit/options/BrowserColorsOptionPane.java | 814 +-
.../gjt/sp/jedit/options/BrowserOptionPane.java | 340 +-
.../org/gjt/sp/jedit/options/BufferOptionPane.java | 676 +-
.../gjt/sp/jedit/options/ContextOptionPane.java | 123 +-
.../gjt/sp/jedit/options/DockingOptionPane.java | 774 +-
.../gjt/sp/jedit/options/EditingOptionPane.java | 896 +-
.../gjt/sp/jedit/options/EncodingsOptionPane.java | 429 +-
.../gjt/sp/jedit/options/FirewallOptionPane.java | 262 +-
.../gjt/sp/jedit/options/GeneralOptionPane.java | 520 +-
jEdit/org/gjt/sp/jedit/options/GlobalOptions.java | 244 +-
.../org/gjt/sp/jedit/options/GutterOptionPane.java | 824 +-
jEdit/org/gjt/sp/jedit/options/IconTheme.java | 52 +-
.../org/gjt/sp/jedit/options/MouseOptionPane.java | 306 +-
.../sp/jedit/options/PluginManagerOptionPane.java | 771 +-
jEdit/org/gjt/sp/jedit/options/PluginOptions.java | 290 +-
.../org/gjt/sp/jedit/options/PrintOptionPane.java | 248 +-
.../gjt/sp/jedit/options/SaveBackupOptionPane.java | 380 +-
.../gjt/sp/jedit/options/ShortcutsOptionPane.java | 934 +-
.../gjt/sp/jedit/options/StatusBarOptionPane.java | 1016 +-
.../sp/jedit/options/SyntaxHiliteOptionPane.java | 610 +-
.../gjt/sp/jedit/options/TextAreaOptionPane.java | 701 +-
.../gjt/sp/jedit/options/ToolBarOptionPane.java | 1539 +-
jEdit/org/gjt/sp/jedit/options/ViewOptionPane.java | 531 +-
jEdit/org/gjt/sp/jedit/options/mirrors.dtd | 30 +-
jEdit/org/gjt/sp/jedit/options/package.html | 2 +-
jEdit/org/gjt/sp/jedit/package.html | 62 +-
jEdit/org/gjt/sp/jedit/perspective.dtd | 78 +-
jEdit/org/gjt/sp/jedit/pluginmgr/InstallPanel.java | 2310 ++--
.../gjt/sp/jedit/pluginmgr/KeyboardCommand.java | 31 +
jEdit/org/gjt/sp/jedit/pluginmgr/ManagePanel.java | 2678 ++--
jEdit/org/gjt/sp/jedit/pluginmgr/MirrorList.java | 395 +-
.../gjt/sp/jedit/pluginmgr/MirrorListHandler.java | 310 +-
.../gjt/sp/jedit/pluginmgr/PluginDetailPanel.java | 194 +-
jEdit/org/gjt/sp/jedit/pluginmgr/PluginList.java | 1136 +-
.../gjt/sp/jedit/pluginmgr/PluginListHandler.java | 554 +-
.../org/gjt/sp/jedit/pluginmgr/PluginManager.java | 685 +-
.../sp/jedit/pluginmgr/PluginManagerProgress.java | 472 +-
jEdit/org/gjt/sp/jedit/pluginmgr/Roster.java | 966 +-
jEdit/org/gjt/sp/jedit/pluginmgr/package.html | 2 +-
jEdit/org/gjt/sp/jedit/pluginmgr/plugins.dtd | 80 +-
jEdit/org/gjt/sp/jedit/print/BufferPrintable.java | 834 +-
jEdit/org/gjt/sp/jedit/print/BufferPrinter1_3.java | 226 +-
jEdit/org/gjt/sp/jedit/print/BufferPrinter1_4.java | 388 +-
jEdit/org/gjt/sp/jedit/print/package.html | 2 +-
.../gjt/sp/jedit/proto/jeditresource/Handler.java | 98 +-
.../jeditresource/PluginResURLConnection.java | 260 +-
.../gjt/sp/jedit/proto/jeditresource/package.html | 8 +-
jEdit/org/gjt/sp/jedit/recent.dtd | 24 +-
jEdit/org/gjt/sp/jedit/registers.dtd | 12 +-
jEdit/org/gjt/sp/jedit/search/AllBufferSet.java | 214 +-
.../sp/jedit/search/BoyerMooreSearchMatcher.java | 615 +-
jEdit/org/gjt/sp/jedit/search/BufferListSet.java | 284 +-
.../org/gjt/sp/jedit/search/CurrentBufferSet.java | 132 +-
.../org/gjt/sp/jedit/search/DirectoryListSet.java | 348 +-
.../gjt/sp/jedit/search/HyperSearchFileNode.java | 224 +-
.../gjt/sp/jedit/search/HyperSearchFolderNode.java | 112 +-
jEdit/org/gjt/sp/jedit/search/HyperSearchNode.java | 74 +-
.../sp/jedit/search/HyperSearchOperationNode.java | 472 +-
.../gjt/sp/jedit/search/HyperSearchRequest.java | 601 +-
.../org/gjt/sp/jedit/search/HyperSearchResult.java | 483 +-
.../gjt/sp/jedit/search/HyperSearchResults.java | 2224 ++--
.../jedit/search/HyperSearchTreeNodeCallback.java | 68 +-
.../gjt/sp/jedit/search/PatternSearchMatcher.java | 472 +-
.../org/gjt/sp/jedit/search/SearchAndReplace.java | 2782 ++--
jEdit/org/gjt/sp/jedit/search/SearchBar.java | 948 +-
jEdit/org/gjt/sp/jedit/search/SearchDialog.java | 2166 ++--
jEdit/org/gjt/sp/jedit/search/SearchFileSet.java | 118 +-
jEdit/org/gjt/sp/jedit/search/SearchMatcher.java | 127 +-
jEdit/org/gjt/sp/jedit/search/package.html | 2 +-
jEdit/org/gjt/sp/jedit/services.dtd | 16 +-
jEdit/org/gjt/sp/jedit/services.xml | 305 +-
jEdit/org/gjt/sp/jedit/syntax/Chunk.java | 961 +-
.../gjt/sp/jedit/syntax/DefaultTokenHandler.java | 280 +-
.../gjt/sp/jedit/syntax/DisplayTokenHandler.java | 494 +-
.../org/gjt/sp/jedit/syntax/DummyTokenHandler.java | 136 +-
jEdit/org/gjt/sp/jedit/syntax/KeywordMap.java | 494 +-
jEdit/org/gjt/sp/jedit/syntax/ModeProvider.java | 495 +-
jEdit/org/gjt/sp/jedit/syntax/ParserRule.java | 811 +-
jEdit/org/gjt/sp/jedit/syntax/ParserRuleSet.java | 794 +-
jEdit/org/gjt/sp/jedit/syntax/SyntaxStyle.java | 162 +-
jEdit/org/gjt/sp/jedit/syntax/SyntaxUtilities.java | 130 +-
jEdit/org/gjt/sp/jedit/syntax/Token.java | 328 +-
jEdit/org/gjt/sp/jedit/syntax/TokenHandler.java | 116 +-
jEdit/org/gjt/sp/jedit/syntax/TokenMarker.java | 1909 ++--
jEdit/org/gjt/sp/jedit/syntax/XModeHandler.java | 1532 +-
jEdit/org/gjt/sp/jedit/syntax/package.html | 26 +-
jEdit/org/gjt/sp/jedit/syntax/xmode.dtd | 332 +-
jEdit/org/gjt/sp/jedit/textarea/Anchor.java | 310 +-
jEdit/org/gjt/sp/jedit/textarea/AntiAlias.java | 178 +-
jEdit/org/gjt/sp/jedit/textarea/BufferHandler.java | 914 +-
jEdit/org/gjt/sp/jedit/textarea/ChunkCache.java | 1664 ++--
.../org/gjt/sp/jedit/textarea/DisplayManager.java | 1736 ++--
.../gjt/sp/jedit/textarea/ExtensionManager.java | 372 +-
jEdit/org/gjt/sp/jedit/textarea/FirstLine.java | 728 +-
jEdit/org/gjt/sp/jedit/textarea/FoldPainter.java | 6 +-
jEdit/org/gjt/sp/jedit/textarea/Gutter.java | 2265 ++--
.../gjt/sp/jedit/textarea/InputMethodSupport.java | 580 +-
jEdit/org/gjt/sp/jedit/textarea/JEditTextArea.java | 1284 +-
jEdit/org/gjt/sp/jedit/textarea/MouseActions.java | 116 +-
.../sp/jedit/textarea/MouseActionsProvider.java | 66 +-
jEdit/org/gjt/sp/jedit/textarea/MouseHandler.java | 354 +-
jEdit/org/gjt/sp/jedit/textarea/RangeMap.java | 972 +-
.../gjt/sp/jedit/textarea/ScreenLineManager.java | 298 +-
jEdit/org/gjt/sp/jedit/textarea/ScrollLayout.java | 406 +-
.../org/gjt/sp/jedit/textarea/ScrollLineCount.java | 126 +-
.../org/gjt/sp/jedit/textarea/ScrollListener.java | 66 +-
jEdit/org/gjt/sp/jedit/textarea/Selection.java | 1530 +-
.../gjt/sp/jedit/textarea/SelectionManager.java | 860 +-
.../gjt/sp/jedit/textarea/ShapedFoldPainter.java | 6 +-
.../gjt/sp/jedit/textarea/StandaloneTextArea.java | 37 +-
.../org/gjt/sp/jedit/textarea/StatusListener.java | 80 +-
.../gjt/sp/jedit/textarea/StructureMatcher.java | 478 +-
jEdit/org/gjt/sp/jedit/textarea/TextArea.java |12698 +++++++++---------
.../org/gjt/sp/jedit/textarea/TextAreaBorder.java | 112 +-
.../gjt/sp/jedit/textarea/TextAreaDropHandler.java | 197 +-
.../gjt/sp/jedit/textarea/TextAreaException.java | 74 +-
.../gjt/sp/jedit/textarea/TextAreaExtension.java | 258 +-
.../sp/jedit/textarea/TextAreaMouseHandler.java | 1200 +-
.../org/gjt/sp/jedit/textarea/TextAreaPainter.java | 2758 ++--
.../sp/jedit/textarea/TextAreaTransferHandler.java | 969 +-
.../gjt/sp/jedit/textarea/TriangleFoldPainter.java | 4 +-
jEdit/org/gjt/sp/jedit/textarea/package.html | 58 +-
.../org/gjt/sp/jedit/textarea/textarea.actions.xml | 18 +
jEdit/org/gjt/sp/jedit/visitors/JEditVisitor.java | 120 +-
.../gjt/sp/jedit/visitors/JEditVisitorAdapter.java | 124 +-
.../sp/jedit/visitors/SaveCaretInfoVisitor.java | 76 +-
jEdit/org/gjt/sp/util/HtmlUtilities.java | 192 +
jEdit/org/gjt/sp/util/IOUtilities.java | 583 +-
jEdit/org/gjt/sp/util/IntegerArray.java | 178 +-
jEdit/org/gjt/sp/util/Log.java | 1252 +-
jEdit/org/gjt/sp/util/ProgressObserver.java | 114 +-
jEdit/org/gjt/sp/util/PropertiesBean.java | 564 +-
jEdit/org/gjt/sp/util/ReadWriteLock.java | 193 +-
jEdit/org/gjt/sp/util/ReverseCharSequence.java | 134 +-
jEdit/org/gjt/sp/util/SegmentBuffer.java | 140 +-
jEdit/org/gjt/sp/util/SegmentCharSequence.java | 178 +-
jEdit/org/gjt/sp/util/StandardUtilities.java | 1464 +-
jEdit/org/gjt/sp/util/StringList.java | 314 +-
jEdit/org/gjt/sp/util/SyntaxUtilities.java | 460 +-
jEdit/org/gjt/sp/util/Task.java | 154 +
jEdit/org/gjt/sp/util/TaskListener.java | 38 +
jEdit/org/gjt/sp/util/TaskManager.java | 167 +
jEdit/org/gjt/sp/util/ThreadAbortMonitor.java | 62 +-
jEdit/org/gjt/sp/util/ThreadUtilities.java | 177 +
jEdit/org/gjt/sp/util/WorkRequest.java | 267 +-
jEdit/org/gjt/sp/util/WorkThread.java | 489 +-
jEdit/org/gjt/sp/util/WorkThreadPool.java | 972 +-
.../gjt/sp/util/WorkThreadProgressListener.java | 70 +-
jEdit/org/gjt/sp/util/XMLUtilities.java | 404 +-
jEdit/org/gjt/sp/util/package.html | 4 +-
jEdit/package-files/linux/deb/control | 19 +-
jEdit/package-files/linux/deb/jedit.desktop | 1 +
jEdit/package-files/linux/jedit | 2 +-
jEdit/package-files/linux/jedit.1 | 4 +-
jEdit/package-files/linux/rpm/jedit.spec | 3 -
jEdit/package-files/os2/jedit.cmd | 144 +-
jEdit/package-files/windows/jEdit.url | 3 +
jEdit/package-files/windows/jedit.bat | 2 -
jEdit/package-files/windows/jedit.l4j.ini | 1 +
jEdit/package-files/windows/jedit.launch4j.xml | 35 +
jEdit/package-files/windows/win32installer.iss | 619 +-
jEdit/properties/README.txt | 14 +-
jEdit/startup/README.txt | 14 +-
jEdit/startup/startup.bsh | 268 +-
941 files changed, 250387 insertions(+), 250037 deletions(-)
diff --git a/build-support/README.txt b/build-support/README.txt
index 858a83e..eec6224 100644
--- a/build-support/README.txt
+++ b/build-support/README.txt
@@ -1,6 +1,6 @@
-This directory contains common ant build tasks for
-building plugins.
-
-eclipse-formatting.xml is a java formatting file which you can import into
-Eclipse to make your Java code confirm to Slava's style.
-
+This directory contains common ant build tasks for
+building plugins.
+
+eclipse-formatting.xml is a java formatting file which you can import into
+Eclipse to make your Java code confirm to Slava's style.
+
diff --git a/build-support/build.properties.sample b/build-support/build.properties.sample
index 8b02124..034156b 100644
--- a/build-support/build.properties.sample
+++ b/build-support/build.properties.sample
@@ -1,170 +1,170 @@
-# Default properties for plugin-build.xml
-# Uncomment properties and set to desired values.
-# Save to a file named build.properties in one of these locations:
-# - The plugin's main directory (e.g., "plugins/XML/build.properties")
-# - The plugin's parent directory (e.g., "plugins/build.properties")
-# - Your home directory (with or without a leading dot)
-
-
-# jEdit & plugins directory settings
-
-# jEdit install directory
-#jedit.install.dir=../../jEdit
-
-# location where your jars are installed
-#install.dir=${jedit.install.dir}/jars
-
-# Location where the plugins are. This property used when defining dependencies on other plugins.
-# Eg. In your plugin's classpath.
-# <path id="project.class.path">
-# <pathelement location="${jedit.plugins.dir}/ErrorList.jar" />
-# </path>
-#jedit.plugins.dir=${install.dir}
-
-# Location to find built jars (for dependencies)
-#jedit.jars.dir=${install.dir}
-
-# User settings directory
-#jedit.user.home=${user.home}/.jedit
-
-# Top-level of the plugins source tree
-#plugins.srcdir=..
-
-
-# Generic plugin build options
-
-# Where the plugin source is located
-#src.dir=.
-
-# The name of the JAR file
-#jar.file=${ant.project.name}.jar
-
-# The name of the source ZIP file
-#src.zip.file=${ant.project.name}.zip
-
-# The target run when running dist
-#dist.target=dist.nojavadoc
-
-# Where to put temporary build files
-#build.dir=build
-
-# Where to put compiled classes
-#build.classes=${build.dir}/classes
-
-# Where to put generated documentation
-#build.docs=${build.dir}/docs
-
-# Where to put generated javadoc
-#build.javadoc=${build.docs}/javadoc
-
-# Where to put other files
-#build.extras=${build.dir}/extras
-
-# Default compiler flags
-
-# Generate debugging code
-#compiler.debug=off
-#compiler.debuglevel=lines,vars,source
-
-# Generate optimized code
-#compiler.optimize=off
-
-# Deprecation warnings.
-#compiler.deprecation=off
-
-# Verbose compiler messages
-#compiler.verbose=off
-
-# Disable compiler warnings
-#compiler.nowarn=off
-
-# Target JVM version
-#compiler.target=1.4
-
-# Java version of the source files
-#compiler.source=1.4
-
-# List files being compiled
-#compiler.listfiles=no
-
-# Fork the javac compiler
-#compiler.fork=no
-
-# Location for rt.jar and ext dir. By default, these are set to the
-# appropriate value for the running jvm. These are necessary, for example,
-# when compiling a Java 1.5 compatible plugin while running Java 1.6.
-#compiler.bootclasspath=${java.home}/lib/rt.jar
-#compiler.extdirs=${java.ext.dirs}
-
-
-# Documentation build options
-
-# What target to use for the docs
-#docs-proc.target=xsltproc
-
-# Stylesheet file to use
-#user-doc.xsl=${build.support}/users-guide.xsl
-
-# Documentation docbook source
-#user-doc.xml=${basedir}/docs/users-guide.xml
-
-# Documentation output file
-#user-doc.out=${build.docs}/index.html
-
-# Title for javadoc documentation
-#javadoc.title=${ant.project.name} API
-
-# If xsltproc is in your path, uncomment this:
-#xsltproc.executable=xsltproc
-
-# You can specify the absolute path of the win32 or cygwin binary
-# (from the "libxslt" package) of xsltproc here:
-#xsltproc.executable=C:/ppApps/xsltproc/xsltproc.exe
-
-### For generating the docs, adjust the following to your local paths
-### For xsltproc to work, the path to the DocBook stuff MUST NOT contain spaces!
-
-# cygwin "docbook-xml44" and "docbook-xsl" packages
-# can be used to install docbook-xml and docbook-dtd
-# (example windows locations):
-#docbook.catalog=c:/cygwin/usr/share/xml/docbook/4.4/docbook.cat
-#docbook.xsl=c:/cygwin/usr/share/docbook-xsl
-
-# Debian location
-#docbook.xsl=/usr/share/xml/docbook/stylesheet/nwalsh
-#docbook.catalog=/usr/share/xml/docbook/schema/dtd/4.4/docbook.cat
-
-# Fink (Mac OS/X) location
-#docbook.catalog=/sw/share/xml/dtd/docbookx/4.4.0/docbook.cat
-#docbook.xsl=/sw/share/xml/xsl/docbook-xsl
-
-# The name of the xsl stylesheet (without the path info)
-#docbook.xsl.sheet=html/chunk.xsl
-
-# The path to the style sheet to use.
-#docs.style.sheet=${docbook.xsl}/${docbook.xsl.sheet}
-
-# The path to the xsltproc executable
-#xsltproc.executable=C:\\Programme\\xsltproc\\xsltproc.exe
-
-# JUnit options
-
-# Where to find jUnit
-#junit.jar=junit.jar
-
-# The name of the jUnit Testcase
-#junit.testcase=${ant.project.name}TestSuite
-
-# Whether to print a summary
-#junit.printsummary=on
-
-# Whether to halt if an error occurs
-#junit.haltonfailure=off
-
-# Ant Contrib
-
-# Where to find the ant-contrib jar.
-#ant-contrib.jar=ant-contrib-1.0b1.jar
-
-# Where to find the findbugs lib dir.
-#findbugs.lib.dir=<findbugs-install-dir>/lib
+# Default properties for plugin-build.xml
+# Uncomment properties and set to desired values.
+# Save to a file named build.properties in one of these locations:
+# - The plugin's main directory (e.g., "plugins/XML/build.properties")
+# - The plugin's parent directory (e.g., "plugins/build.properties")
+# - Your home directory (with or without a leading dot)
+
+
+# jEdit & plugins directory settings
+
+# jEdit install directory
+#jedit.install.dir=../../jEdit
+
+# location where your jars are installed
+#install.dir=${jedit.install.dir}/jars
+
+# Location where the plugins are. This property used when defining dependencies on other plugins.
+# Eg. In your plugin's classpath.
+# <path id="project.class.path">
+# <pathelement location="${jedit.plugins.dir}/ErrorList.jar" />
+# </path>
+#jedit.plugins.dir=${install.dir}
+
+# Location to find built jars (for dependencies)
+#jedit.jars.dir=${install.dir}
+
+# User settings directory
+#jedit.user.home=${user.home}/.jedit
+
+# Top-level of the plugins source tree
+#plugins.srcdir=..
+
+
+# Generic plugin build options
+
+# Where the plugin source is located
+#src.dir=.
+
+# The name of the JAR file
+#jar.file=${ant.project.name}.jar
+
+# The name of the source ZIP file
+#src.zip.file=${ant.project.name}.zip
+
+# The target run when running dist
+#dist.target=dist.nojavadoc
+
+# Where to put temporary build files
+#build.dir=build
+
+# Where to put compiled classes
+#build.classes=${build.dir}/classes
+
+# Where to put generated documentation
+#build.docs=${build.dir}/docs
+
+# Where to put generated javadoc
+#build.javadoc=${build.docs}/javadoc
+
+# Where to put other files
+#build.extras=${build.dir}/extras
+
+# Default compiler flags
+
+# Generate debugging code
+#compiler.debug=off
+#compiler.debuglevel=lines,vars,source
+
+# Generate optimized code
+#compiler.optimize=off
+
+# Deprecation warnings.
+#compiler.deprecation=off
+
+# Verbose compiler messages
+#compiler.verbose=off
+
+# Disable compiler warnings
+#compiler.nowarn=off
+
+# Target JVM version
+#compiler.target=1.4
+
+# Java version of the source files
+#compiler.source=1.4
+
+# List files being compiled
+#compiler.listfiles=no
+
+# Fork the javac compiler
+#compiler.fork=no
+
+# Location for rt.jar and ext dir. By default, these are set to the
+# appropriate value for the running jvm. These are necessary, for example,
+# when compiling a Java 1.5 compatible plugin while running Java 1.6.
+#compiler.bootclasspath=${java.home}/lib/rt.jar
+#compiler.extdirs=${java.ext.dirs}
+
+
+# Documentation build options
+
+# What target to use for the docs
+#docs-proc.target=xsltproc
+
+# Stylesheet file to use
+#user-doc.xsl=${build.support}/users-guide.xsl
+
+# Documentation docbook source
+#user-doc.xml=${basedir}/docs/users-guide.xml
+
+# Documentation output file
+#user-doc.out=${build.docs}/index.html
+
+# Title for javadoc documentation
+#javadoc.title=${ant.project.name} API
+
+# If xsltproc is in your path, uncomment this:
+#xsltproc.executable=xsltproc
+
+# You can specify the absolute path of the win32 or cygwin binary
+# (from the "libxslt" package) of xsltproc here:
+#xsltproc.executable=C:/ppApps/xsltproc/xsltproc.exe
+
+### For generating the docs, adjust the following to your local paths
+### For xsltproc to work, the path to the DocBook stuff MUST NOT contain spaces!
+
+# cygwin "docbook-xml44" and "docbook-xsl" packages
+# can be used to install docbook-xml and docbook-dtd
+# (example windows locations):
+#docbook.catalog=c:/cygwin/usr/share/xml/docbook/4.4/docbook.cat
+#docbook.xsl=c:/cygwin/usr/share/docbook-xsl
+
+# Debian location
+#docbook.xsl=/usr/share/xml/docbook/stylesheet/nwalsh
+#docbook.catalog=/usr/share/xml/docbook/schema/dtd/4.4/docbook.cat
+
+# Fink (Mac OS/X) location
+#docbook.catalog=/sw/share/xml/dtd/docbookx/4.4.0/docbook.cat
+#docbook.xsl=/sw/share/xml/xsl/docbook-xsl
+
+# The name of the xsl stylesheet (without the path info)
+#docbook.xsl.sheet=html/chunk.xsl
+
+# The path to the style sheet to use.
+#docs.style.sheet=${docbook.xsl}/${docbook.xsl.sheet}
+
+# The path to the xsltproc executable
+#xsltproc.executable=C:\\Programme\\xsltproc\\xsltproc.exe
+
+# JUnit options
+
+# Where to find jUnit
+#junit.jar=junit.jar
+
+# The name of the jUnit Testcase
+#junit.testcase=${ant.project.name}TestSuite
+
+# Whether to print a summary
+#junit.printsummary=on
+
+# Whether to halt if an error occurs
+#junit.haltonfailure=off
+
+# Ant Contrib
+
+# Where to find the ant-contrib jar.
+#ant-contrib.jar=ant-contrib-1.0b1.jar
+
+# Where to find the findbugs lib dir.
+#findbugs.lib.dir=<findbugs-install-dir>/lib
diff --git a/build-support/ci/ci_release.groovy b/build-support/ci/ci_release.groovy
new file mode 100644
index 0000000..75f5914
--- /dev/null
+++ b/build-support/ci/ci_release.groovy
@@ -0,0 +1,97 @@
+#!/usr/bin/env groovy
+
+/**
+ * The Command class makes it easy to create a command line command and execute it.
+ */
+class Command {
+ String name
+ Map options
+ File directory
+
+ Map execute() {
+ run(toParts())
+ }
+
+ protected Map run(List<String> commandParts) {
+ println "Executing: ${commandParts}"
+ def out = new StringBuffer()
+ def err = new StringBuffer()
+ def p = null;
+ long start = System.nanoTime()
+ try {
+ def pb = new ProcessBuilder()
+ pb.command(commandParts.toArray() as String[])
+ pb.directory(directory)
+ p = pb.start()
+ } catch (Exception e) {
+ StringWriter writer = new StringWriter()
+ e.printStackTrace(new PrintWriter(writer))
+ err.append(writer.toString())
+ }
+ p?.waitForProcessOutput(out, err)
+ long end = System.nanoTime()
+ long runtime = end - start
+ def output = [value: p?.exitValue(), out: out.toString(), err: err.toString()]
+ output.execution = [start: start, end: end, runtime: runtime]
+ return output
+ }
+
+ List<String> toParts() {
+ def parts = [name] + options.collect {
+ if(it.value) {
+ if(it.value instanceof Collection) {
+ [it.key, it.value.flatten()]
+ } else {
+ [it.key, it.value]
+ }
+ } else {
+ [it.key]
+ }
+ }
+ parts.flatten()
+ }
+
+ String toString() {
+ return toParts().join(" ")
+ }
+}
+
+
+def props = System.properties
+def env = System.env
+
+String baseUrl = "https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit"
+
+String workspace = props.get("user.dir")
+
+// Delete tag if it already exists
+String tagUrl = "${baseUrl}/branches/ci_release_test/${env.release_tag_name}"
+def command = new Command(name: "svn", options: [
+ "delete": tagUrl,
+ "-m": '"Tag deleted by Hudson CI to be recreated."'
+])
+def output = command.execute()
+// we ignore the output. The tag will be created regardless.
+
+// Create tag
+command = new Command(name: "svn", options: [
+ "copy": ["${baseUrl}/${env.release_branch}", "${tagUrl}"],
+ "-m": "\"Tag created by Hudson CI - Version: ${env.release_version}\""
+])
+output = command.execute()
+
+if(output.value != 0) {
+ println " code: ${output.value}"
+ println " err: ${output.err}"
+ println " out: ${output.out}"
+ System.exit(output.value)
+}
+
+// checkout the new tag.
+command = new Command(name: "svn", options: [
+ "co": [tagUrl, "jedit"]
+])
+output = command.execute()
+if(output.value == 0) {
+ println "Tag checked out into 'jedit' directory"
+}
diff --git a/build-support/ci/copy_properties.groovy b/build-support/ci/copy_properties.groovy
new file mode 100644
index 0000000..93c5bc9
--- /dev/null
+++ b/build-support/ci/copy_properties.groovy
@@ -0,0 +1,53 @@
+#!/usr/bin/env groovy
+/* This script copies properties provided as System properties in Hudson into actual properties files used by jEdit's
+ * Build process.
+ */
+
+def props = System.properties
+def env = System.env
+
+String workspace = props.get("user.dir")
+String storeComment = "## THIS FILE IS GENERATED BASED ON SYSTEM PROPERTIES SUPPLIED TO HUDSON, AND IS USUALLY REPLACED ON EACH BUILD."
+
+println "Copying properties over to appropriate directories"
+def coreProps = new Properties()
+def pluginProps = new Properties()
+props.each { key, value ->
+ if(key.startsWith("je.ci.")) {
+ println "jEdit CI prop found - ${key}: ${value}"
+ if(key.startsWith("je.ci.pl.")) {
+ def cleanKey = key - 'je.ci.pl.'
+ println " clean key: ${cleanKey}"
+ pluginProps.setProperty(cleanKey, value)
+ } else {
+ def cleanKey = key - 'je.ci.'
+ println " clean key: ${cleanKey}"
+ coreProps.setProperty(cleanKey, value)
+ }
+ }
+}
+File corePropsFile = new File(workspace, "jedit/build.properties")
+// make sure stuff exists.
+corePropsFile.parentFile.exists() ?: corePropsFile.parentFile.mkdirs() ?: {
+ System.err.println("'${corePropsFile.parentFile}' did not exist, and could not be created. Exiting.")
+ System.exit(1)
+}()
+corePropsFile.exists() ?: corePropsFile.createNewFile() ?: {
+ System.err.println("'${corePropsFile}' did not exist, and could not be created. Exiting.")
+ System.exit(1)
+}()
+coreProps.store(corePropsFile.newWriter(), storeComment)
+
+File pluginPropsFile = new File(workspace, "jedit/jars/build.properties")
+// make sure stuff exists.
+pluginPropsFile.parentFile.exists() ?: pluginPropsFile.parentFile.mkdirs() ?: {
+ System.err.println("'${pluginPropsFile.parentFile}' did not exist, and could not be created. Exiting.")
+ System.exit(1)
+}()
+pluginPropsFile.exists() ?: pluginPropsFile.createNewFile() ?: {
+ System.err.println("'${pluginPropsFile}' did not exist, and could not be created. Exiting.")
+ System.exit(1)
+}()
+pluginProps.putAll(coreProps)
+pluginProps.store(pluginPropsFile.newWriter(), storeComment)
+/* ::mode=groovy:noTabs=true:maxLineLen=120:wrap=soft:: */
diff --git a/build-support/eclipse-formatting.xml b/build-support/eclipse-formatting.xml
index 67751f4..b03ee7e 100644
--- a/build-support/eclipse-formatting.xml
+++ b/build-support/eclipse-formatting.xml
@@ -1,246 +1,246 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<profiles version="8">
-<profile name="jedit conventions" version="8">
-<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
-<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
-<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
-<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="8"/>
-<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
-</profile>
-</profiles>
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="8">
+<profile name="jedit conventions" version="8">
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="8"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+</profile>
+</profiles>
diff --git a/build-support/ivysettings.properties b/build-support/ivysettings.properties
new file mode 100644
index 0000000..dc610f8
--- /dev/null
+++ b/build-support/ivysettings.properties
@@ -0,0 +1 @@
+mirror=ovh
\ No newline at end of file
diff --git a/build-support/ivysettings.xml b/build-support/ivysettings.xml
new file mode 100644
index 0000000..a1842e4
--- /dev/null
+++ b/build-support/ivysettings.xml
@@ -0,0 +1,13 @@
+<ivysettings>
+ <properties file="ivysettings.properties"/>
+ <resolvers>
+ <ibiblio name="maven" m2compatible="true" usepoms="false"/>
+ <url name="jedit-plugins-resolver">
+ <artifact pattern="jar:http://${mirror}.dl.sourceforge.net/sourceforge/jedit-plugins/[artifact]-[revision]-bin.zip!/[artifact].jar" />
+ </url>
+ </resolvers>
+ <modules>
+ <module organisation="jedit-plugins" name=".*" resolver="jedit-plugins-resolver"/>
+ <module organisation="*" name=".*" resolver="maven"/>
+ </modules>
+</ivysettings>
\ No newline at end of file
diff --git a/build-support/plugin-build.xml b/build-support/plugin-build.xml
index 437f822..0eba4b5 100644
--- a/build-support/plugin-build.xml
+++ b/build-support/plugin-build.xml
@@ -1,575 +1,628 @@
-<project name="jEditPlugin" default="build">
-
- <!-- {{{ Top-Level build file for jEdit plugins. ====== -->
- <!--
- Version: $Id: plugin-build.xml 17425 2010-03-04 04:31:01Z vanza $
- Requires apache Ant 1.6, including optional tasks, and xerces.
-
- :tabSize=4:indentSize=4:noTabs=true:
- :folding=explicit:collapseFolds=2:
-
- To use this file, use the "import" task from ant
- on your plugin's build file, like this:
-
- <import file="../build-support/plugin-build.xml" />
-
- The use of the property is to ease the work of the plugin
- packagers.
-
- General tips:
- - To override properties, either use the several
- options for build.properties files, or declare
- them in you plugin's build file *before* the
- import statement.
- - To override paths and selectors, declare them in
- your build file *after* the import statement.
-
- Some tasks require the ant-contrib library available from
- http://ant-contrib.sourceforge.net. If you have the
- library, specify a property named "ant-contrib.jar" with
- the location of the library. The tasks that need ant-contrib
- are the tasks related to plugin dependencies.
-
- For JUnit support, make sure you have the ant-junit.jar
- library in Ant's lib directory. Specify the location of
- the junit jar file using the property "junit.jar".
- -->
- <!-- ===============================================}}} -->
-
- <!-- {{{ Property definitions ========================= -->
- <!-- First loads options from the user's optional
- build.properties files in the following order:
- current dir, parent dir, $HOME/.build.properties
- and finally $HOME/build.properties . The defines
- several default properties used by the different
- targets. -->
- <!-- ================================================== -->
-
- <property file="${basedir}/build.properties" />
- <property file="${basedir}/../build.properties" />
- <property file="${user.home}/.build.properties" />
- <property file="${user.home}/build.properties" />
- <echo>${java.home}</echo>
- <!-- where to find jEdit and plugins -->
- <property name="sourceforge.user.name"
- value="${user.name}" />
- <property name="jedit.install.dir" value="../../jEdit" />
- <property name="jedit.user.home" value="${user.home}/.jedit" />
- <property name="plugins.srcdir" value=".." />
- <property name="install.dir" value=".." />
-
- <!-- some info about the plugin and where to put it -->
- <property name="src.dir" value="." />
- <property name="jar.file" value="${ant.project.name}.jar" />
- <property name="src.zip.file" value="${ant.project.name}.zip" />
- <property name="dist.target" value="dist.nojavadoc" />
-
- <!-- where files will go -->
- <property name="build.dir" value="build" />
- <property name="build.classes" value="${build.dir}/classes" />
- <property name="build.docs" value="${build.dir}/docs" />
- <property name="build.javadoc" value="${build.docs}/javadoc" />
- <property name="build.extras" value="${build.dir}/extras" />
-
- <!-- default compiler flags -->
- <property name="compiler.debug" value="off" />
- <property name="compiler.debuglevel" value="lines,vars,source" />
- <property name="compiler.optimize" value="off" />
- <property name="compiler.deprecation" value="off" />
- <property name="compiler.verbose" value="off" />
- <property name="compiler.nowarn" value="off" />
- <property name="compiler.target" value="1.5" />
- <property name="compiler.source" value="1.5" />
- <property name="compiler.listfiles" value="no" />
- <property name="compiler.fork" value="no" />
- <property name="compiler.bootclasspath" value="${java.home}/lib/rt.jar"/>
- <property name="compiler.extdirs" value="${java.ext.dirs}"/>
- <property name="compiler.userargs" value="" />
-
- <!-- default documentation options -->
- <property name="docs-proc.target" value="xsltproc" />
- <property name="docbookx.dtd" value="../XML/xml/dtds/docbookx.dtd" />
- <dirname property="build.support" file="${ant.file.jEditPlugin}" />
- <property name="user-doc.xsl" location="${build.support}/users-guide.xsl" />
- <property name="user-doc.xml" value="docs/users-guide.xml" />
- <property name="user-doc.out" value="users-guide.html" />
- <property name="javadoc.title" value="${ant.project.name} API" />
- <property name="docbook.xsl.sheet" value="html/onechunk.xsl" />
- <pathconvert property="docs.style.sheet"
- dirsep="/">
- <path location="${docbook.xsl}/${docbook.xsl.sheet}" />
- </pathconvert>
-
- <property name="xsltproc.executable" value="xsltproc" />
-
- <!-- default junit options -->
- <property name="junit.jar" value="junit.jar" />
- <property name="junit.testcase" value="${ant.project.name}TestSuite" />
- <property name="junit.printsummary" value="on" />
- <property name="junit.haltonfailure" value="off" />
-
- <fail message="The jedit JAR (jedit.jar) is not available in "${jedit.install.dir}"">
- <condition>
- <not>
- <available file="${jedit.install.dir}/jedit.jar"
- type="file" />
- </not>
- </condition>
- </fail>
-
- <!-- default class path; try not to override this,
- since the intention is to add here anything that
- might be needed by all the plugins (such as the
- jedit.jar file and any other jar files that
- jEdit might use in the future. -->
- <path id="default.class.path">
- <pathelement location="${jedit.install.dir}/jedit.jar" />
- <pathelement location="${junit.jar}" />
- </path>
-
- <!-- this is the classpath used by the "compile"
- target. Override this one if you need to. You don't
- need to reference "default.class.path" here - it's added
- automatically to the javac command. -->
- <path id="project.class.path" />
-
- <!-- {{{ Load ant-contrib library ===================== -->
- <taskdef resource="net/sf/antcontrib/antcontrib.properties" onerror="ignore">
- <classpath>
- <pathelement location="${ant-contrib.jar}"/>
- </classpath>
- </taskdef>
- <!-- ===============================================}}} -->
-
- <!-- ===============================================}}} -->
-
- <!-- {{{ Custom javac task ============================ -->
- <presetdef name="jp.javac">
- <javac destdir="${build.classes}"
- debug="${compiler.debug}"
- debuglevel="${compiler.debuglevel}"
- optimize="${compiler.optimize}"
- deprecation="${compiler.deprecation}"
- verbose="${compiler.verbose}"
- nowarn="${compiler.nowarn}"
- target="${compiler.target}"
- source="${compiler.source}"
- listfiles="${compiler.listfiles}"
- fork="${compiler.fork}"
- bootclasspath="${compiler.bootclasspath}"
- extdirs="${compiler.extdirs}"
- >
- <src location="${src.dir}" />
- <compilerarg line="${compiler.userargs}" />
- <classpath refid="default.class.path" />
- <classpath refid="project.class.path" />
- </javac>
- </presetdef>
- <!-- }}} ============================================== -->
-
- <!-- {{{ Compilation and building ===================== -->
-
- <!-- This selector defines the files that will be
- compiled by the "compile" target. Define here which
- files under ${src.dir} will be compiled when the
- "compile" task is called. -->
- <selector id="compileFiles">
- <filename name="**/*.java" />
- </selector>
-
- <!-- This selector defines extra files to be included
- in the plugin's JAR file. The context of the
- selector is the plugin's directory (${basedir}),
- so it will not work for files outside the plugin
- directory. For those cases, use the "build.prepare"
- target. By default, it's empty. -->
- <selector id="packageFiles">
- <size value="0" when="less" />
- </selector>
-
- <!-- This selector defines the doc source files
- The context of the selector is the plugin's directory (${basedir}),
- so it will not work for files outside the plugin
- directory. For those cases, use the "build.prepare"
- target. By default, docs/users-guide.xml is selected. -->
- <selector id="docSrcFiles">
- <filename name="docs/users-guide.xml" />
- </selector>
-
- <!-- This selector defines other files that should be packaged
- in the plugin's jar file; by default it contains actions.xml,
- dockables.xml, services.xml, any files ending in ".props",
- "LICENSE" and "README". The context is "${basedir}". Override
- it if your plugin needs special treatment for these files. -->
- <selector id="extraFiles">
- <and>
- <or>
- <filename name="**/actions.xml" />
- <filename name="**/browser.actions.xml" />
- <filename name="**/dockables.xml" />
- <filename name="**/services.xml" />
- <filename name="**/*.props" />
- <filename name="**/LICENSE" />
- <filename name="**/README" />
- </or>
- </and>
- </selector>
-
- <!-- {{{ Target: compile ============================== -->
- <!-- Compiles all the ".java" files present in the
- directory pointed by the "src.dir" property
- defined above. Classes are put in the directory
- designated in the "build.classes" property.
- The following properties control the behavior of
- the compiler (relates to options to the javac
- ant task, defaults in parethesis):
- compiler.debug: the debug option (off)
- compiler.debuglevel: the debug level (lines,source)
- compiler.optimize: the optimize option (off)
- compiler.deprecation: deprecation option (off)
- compiler.verbose: the verbose option (off)
- compiler.nowarn: the nowarn option (off)
- compiler.target: the target option (1.5)
- compiler.source: the source option (1.5)
- compiler.listfiles: the listfiles option (no) -->
- <target name="compile"
- description="Compile the plugin's classes">
-
- <mkdir dir="${build.classes}" />
- <jp.javac>
- <selector refid="compileFiles" />
- </jp.javac>
-
- </target>
- <!-- ===============================================}}} -->
-
- <!-- {{{ Target: clean ================================ -->
- <!-- Removes the directory defined in the "build"
- property, the "docbook-wrapper.xsl" file and the
- file defined by the property "jar.file" in the
- directory defined by "install.dir". -->
- <target name="clean" description="Cleans project directories">
- <delete dir="${build.dir}" quiet="true" />
- </target>
- <!-- ===============================================}}} -->
-
- <!-- {{{ Target: build ================================ -->
- <!-- This target build the plugin JAR file. It
- depends on two other targets: "compile", defined
- above, and "build.prepare", which is empty in
- this file but can be overriden by the plugin's
- build file.
- This target does the following after that:
- * Copies all files defined by the extraFiles selector
- to the staging area.
- * Copies all files defined by the packageFiles selector
- to the staging area.
- * Creates a JAR with the name defined in
- "jar.file" in the directory defined by
- "install.dir". This JAR will contain the
- contents of the directories defined by
- "build.classes", "build.docs" and "build.extras"
- If you need to have any other files added to the
- JAR, override the "build.prepare" target and use
- it to copy files to one of those three
- directories, or redefine the "extraFiles"
- selector. -->
-
- <target name="build"
- depends="build.prepare,compile"
- description="Builds the plugin JAR file (no docs)">
-
- <mkdir dir="${build.classes}" />
- <mkdir dir="${build.docs}" />
- <delete dir="${build.extras}" failonerror="false" />
- <mkdir dir="${build.extras}" />
- <mkdir dir="${install.dir}" />
-
- <copy todir="${build.extras}" includeEmptyDirs="false">
- <fileset dir="${basedir}">
- <selector refid="extraFiles" />
- </fileset>
- </copy>
-
- <copy todir="${build.extras}" includeEmptyDirs="false">
- <fileset dir="${basedir}">
- <selector refid="packageFiles" />
- </fileset>
- </copy>
-
- <jar jarfile="${install.dir}/${jar.file}">
- <fileset dir="${build.classes}" />
- <fileset dir="${build.docs}" />
- <fileset dir="${build.extras}" />
- </jar>
-
- <antcall target="build.post" />
-
- </target>
- <!-- ===============================================}}} -->
-
- <!-- {{{ Target: build.prepare ======================== -->
- <!-- This implementation does nothing. See the
- "build" target for details. -->
- <target name="build.prepare" />
- <!-- ===============================================}}} -->
-
- <!-- {{{ Target: build.post =========================== -->
- <!-- Called after the build process is finished.
- Plugins can use this to copy extra jar files the
- plugin needs to ${install.dir}.
- By default does nothing. -->
- <target name="build.post" />
- <!-- ===============================================}}} -->
-
- <!-- {{{ Target: dist.nojavadoc ======================= -->
- <!-- Meta-task that builds the user documentation and
- builds the plugin JAR file, but not the javadoc. -->
- <target name="dist.nojavadoc" depends="userdocs,build" />
- <!-- =============================================== }}} -->
-
- <!-- {{{ Target: dist.complete ======================== -->
- <!-- Meta-task that builds the user documentation,
- javadoc documentation and builds the plugin JAR
- file. -->
- <target name="dist.complete" depends="docs,build" />
- <!-- ===============================================}}} -->
-
- <!-- {{{ Target: dist ================================= -->
- <!-- This task calls the target defined in the
- property "dist.target" to build the plugin and
- package it for distribution. Before proceeding,
- it cleans the build directory. -->
- <target name="dist" depends="clean" description="Builds JAR file, with docs">
- <antcall target="${dist.target}" />
- </target>
- <!-- =============================================== }}} -->
-
- <!-- {{{ Target: dist.source ========================== -->
- <!-- Creates a ZIP file of the plugin's source. The
- name of the file is defined in the property
- "src.zip.file" and will be created in the
- directory defined by "install.dir". -->
- <target name="dist.source">
- <delete file="${install.dir}/${src.zip.file}" quiet="true" />
- <zip destfile="${install.dir}/${src.zip.file}">
- <fileset dir="${src.dir}">
- <include name="**/*.*" />
- <exclude name="${build.dir}/**" />
- </fileset>
- </zip>
- </target>
- <!-- ===============================================}}} -->
-
- <!-- {{{ Target: package ============================== -->
- <!-- Convenience target that calls both "docs" and
- "build" to create the plugin jar file. -->
- <target name="package" depends="docs,build" />
- <!-- =============================================== }}} -->
-
- <!-- =============================================== }}} -->
-
- <!-- {{{ Documentation ================================ -->
-
- <!-- {{{ Target: docs ================================= -->
- <!-- Meta-task that calls javadoc and userdocs. -->
- <target name="docs"
- depends="javadoc,userdocs"
- description="Build the User's Guide and Javadoc documentation" />
- <!-- =============================================== }}} -->
-
- <!-- {{{ Target: userdocs ============================= -->
- <target name="userdocs"
- description="Builds the user's guide.">
- <mkdir dir="${build.docs}" />
- <copy todir="${build.docs}" includeEmptyDirs="false">
- <fileset dir="${basedir}">
- <selector refid="docSrcFiles" />
- </fileset>
- </copy>
- <copy tofile="${build.docs}/users-guide.xsl"
- flatten="true"
- file="${user-doc.xsl}">
- <filterset>
- <filter token="docs.style.sheet"
- value="${docs.style.sheet}" />
- </filterset>
- </copy>
- <antcall target="docs-${docs-proc.target}" />
- <antcall target="error-catalog" />
- <delete file="${build.docs}/users-guide.xsl" />
- <delete>
- <fileset dir="${build.docs}">
- <selector refid="docSrcFiles" />
- </fileset>
- </delete>
- </target>
-
- <!-- =============================================== }}} -->
-
- <target name="upload.docs" depends="javadoc, userdocs"
- description="upload documentation to plugins.jedit.org site" >
- <exec dir="${build.docs}" executable="rsync">
- <arg line="-avz ./ ${sourceforge.user.name}@plugins.jedit.org:/home/groups/j/je/jedit-plugins/htdocs/plugindoc/${ant.project.name}" />
- </exec>
- </target>
-
-
- <!-- {{{ Target: javadoc ============================== -->
- <!-- Builds the javadoc documentation for the plugin,
- placing it under "build.javadoc". Your plugin
- build file *must* define a property called
- named "javadoc.packagenames" to be used as the
- "packagenames" option of ant's javadoc task.
- This property is not defined in this file and
- execition will probably fail if it's not defined.
- The title of the documentation is defined in the
- "javadoc.title" property. -->
- <target name="javadoc"
- description="Generates javadoc sourcecode documentation"
- if="javadoc.packagenames">
- <mkdir dir="${build.javadoc}" />
- <javadoc sourcepath="${src.dir}"
- destdir="${build.javadoc}"
- locale="en"
- packagenames="${javadoc.packagenames}"
- windowtitle="${javadoc.title}">
- <classpath refid="default.class.path" />
- <classpath refid="project.class.path" />
- </javadoc>
- </target>
- <!-- =============================================== }}} -->
-
- <!-- {{{ Target: docs-xsltproc ======================== -->
- <!-- Generate docs with xsltproc tool from
- www.xmlsoft.org. This task creates a temporary
- file called "docbook.catalog" containing a
- reference to the Docbook DTD defined in the
- property "docbookx.dtd" above. The style sheet
- used is defined by the property "user-doc.xsl",
- and defaults to "docbook-wrapper.xsl". The XML
- document to be processed is defined by the
- "user-doc.xml" property, and defaults to
- "docs/users-guide.xml". The output is defined in
- the "user-doc.out" property. -->
- <target name="docs-xsltproc" description="Generate user documentation in html format with xsltproc" if="docbook.catalog">
- <exec executable="${xsltproc.executable}" dir="${build.docs}" failonerror="true">
- <arg value="--output" />
- <arg value="${user-doc.out}" />
- <arg value="--catalogs" />
- <arg value="users-guide.xsl" />
- <arg value="${user-doc.xml}" />
- <env key="SGML_CATALOG_FILES"
- file="${docbook.catalog}" />
- </exec>
- </target>
-
- <target name="error-catalog" unless="docbook.catalog" >
- <echo message="docbook.catalog not set" />
- </target>
-
- <!-- ===============================================}}} -->
-
- <target name="docs-none"
- description="no xslt step - HTML docs" />
-
- <!-- {{{ Target: docs-xalan =========================== -->
- <!-- Generate docs with Xalan tool from
- xml.apache.org . Same properties as the
- "docs-xsltproc" target apply here. -->
- <target name="docs-xalan"
- if="docbookx.dtd"
- description="Generate user documentation in html format with xalan (not working)">
- <xslt basedir="."
- destdir="${build.docs}"
- style="${build.docs}/users-guide.xsl"
- includes="${user-doc.xml}">
- <xmlcatalog>
- <dtd publicId="-//OASIS//DTD DocBook XML V4.2//EN"
- location="${docbookx.dtd}" />
- </xmlcatalog>
- </xslt>
- </target>
- <!-- ===============================================}}} -->
-
- <!-- =============================================== }}} -->
-
- <!-- {{{ Unit testing ================================= -->
-
- <!-- {{{ Target: test ================================= -->
- <!-- Meta-task that calls the defined test target. -->
- <target name="test"
- description="Runs the plugin's unit tests.">
- <antcall target="${unit.test.target}" />
- </target>
- <!-- ===============================================}}} -->
-
- <!-- {{{ Target: test-junit============================ -->
- <!-- Executes a jUnit test case defined by the plugin's
- build file. The classpath for the test will be the
- ${build.class} directory, the ${junit.jar} file and
- the default.class.path and project.class.path path
- structures.
- -->
- <target name="test-junit"
- description="Runs the plugin's jUnit tests."
- if="junit.testcase,junit.jar">
-
- <junit printsummary="${junit.printsummary}"
- haltonfailure="${junit.haltonfailure}">
-
- <classpath>
- <pathelement location="${junit.jar}" />
- <pathelement location="${build.classes}" />
- <path refid="default.class.path" />
- <path refid="project.class.path" />
- </classpath>
-
- <test name="${junit.testcase}" />
- </junit>
-
- </target>
- <!-- ===============================================}}} -->
-
- <!-- ===============================================}}} -->
-
- <!--{{{ Dependencies ================================= -->
-
-
- <!-- {{{ Target: build.dependencies =================== -->
- <target name="build.dependencies"
- description="Builds the needed plugins from the available source code."
- if="plugin.dependencies,ant-contrib.jar">
- <foreach list="${plugin.dependencies}"
- target="build.other"
- param="plugin.name"
- delimiter=","
- trim="true" />
- </target>
- <!-- ===============================================}}} -->
-
- <!-- {{{ Target: build.other=========================== -->
- <!-- Builds a plugin from the code available in its
- directory under "plugins.srcdir". This will call
- the "build" target of that plugin's build file.
- Expects the "plugin.name" parameter with the name
- of the plugin's directory. -->
- <target name="build.other">
- <fail message="Can't find plugin: ${plugin.name}">
- <condition>
- <not>
- <available file="${plugins.srcdir}/${plugin.name}/build.xml" />
- </not>
- </condition>
- </fail>
- <ant antfile="${plugins.srcdir}/${plugin.name}/build.xml"
- target="build"
- inheritAll="false"
- inheritRefs="false" />
- </target>
- <!-- ===============================================}}} -->
-
- <!-- ================================================== }}}-->
-
-</project>
-
+<project xmlns:ivy="antlib:org.apache.ivy.ant" name="jEditPlugin" default="build">
+
+ <!-- {{{ Top-Level build file for jEdit plugins. ====== -->
+ <!--
+ Version: $Id: plugin-build.xml 18807 2010-10-21 11:54:20Z kpouer $
+ Requires apache Ant 1.6, including optional tasks, and xerces.
+
+ :tabSize=4:indentSize=4:noTabs=true:
+ :folding=explicit:collapseFolds=2:
+
+ To use this file, use the "import" task from ant
+ on your plugin's build file, like this:
+
+ <import file="../build-support/plugin-build.xml" />
+
+ The use of the property is to ease the work of the plugin
+ packagers.
+
+ General tips:
+ - To override properties, either use the several
+ options for build.properties files, or declare
+ them in you plugin's build file *before* the
+ import statement.
+ - To override paths and selectors, declare them in
+ your build file *after* the import statement.
+
+ Some tasks require the ant-contrib library available from
+ http://ant-contrib.sourceforge.net. If you have the
+ library, specify a property named "ant-contrib.jar" with
+ the location of the library. The tasks that need ant-contrib
+ are the tasks related to plugin dependencies.
+
+ For JUnit support, make sure you have the ant-junit.jar
+ library in Ant's lib directory. Specify the location of
+ the junit jar file using the property "junit.jar".
+ -->
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Property definitions ========================= -->
+ <!-- First loads options from the user's optional
+ build.properties files in the following order:
+ current dir, parent dir, $HOME/.build.properties
+ and finally $HOME/build.properties . The defines
+ several default properties used by the different
+ targets. -->
+ <!-- ================================================== -->
+
+ <property file="${basedir}/build.properties" />
+ <property file="${basedir}/../build.properties" />
+ <property file="${user.home}/.build.properties" />
+ <property file="${user.home}/build.properties" />
+ <echo>${java.home}</echo>
+ <!-- where to find jEdit and plugins -->
+ <property name="sourceforge.user.name"
+ value="${user.name}" />
+ <property name="jedit.install.dir" value="../../jEdit" />
+ <property name="jedit.user.home" value="${user.home}/.jedit" />
+ <property name="plugins.srcdir" value=".." />
+ <property name="install.dir" value=".." />
+
+ <!-- some info about the plugin and where to put it -->
+ <property name="src.dir" value="." />
+ <property name="jar.file" value="${ant.project.name}.jar" />
+ <property name="src.zip.file" value="${ant.project.name}.zip" />
+ <property name="dist.target" value="dist.nojavadoc" />
+
+ <!-- where files will go -->
+ <property name="build.dir" value="build" />
+ <property name="build.classes" value="${build.dir}/classes" />
+ <property name="build.docs" value="${build.dir}/docs" />
+ <property name="build.javadoc" value="${build.docs}/javadoc" />
+ <property name="build.extras" value="${build.dir}/extras" />
+ <property name="build.lib" value="${build.dir}/lib" />
+
+ <!-- default compiler flags -->
+ <property name="compiler.debug" value="off" />
+ <property name="compiler.debuglevel" value="lines,vars,source" />
+ <property name="compiler.optimize" value="off" />
+ <property name="compiler.deprecation" value="off" />
+ <property name="compiler.verbose" value="off" />
+ <property name="compiler.nowarn" value="off" />
+ <property name="compiler.target" value="1.5" />
+ <property name="compiler.source" value="1.5" />
+ <property name="compiler.listfiles" value="no" />
+ <property name="compiler.fork" value="no" />
+ <property name="compiler.bootclasspath" value="${java.home}/lib/rt.jar"/>
+ <property name="compiler.extdirs" value="${java.ext.dirs}"/>
+ <property name="compiler.userargs" value="" />
+
+ <!-- default documentation options -->
+ <property name="docs-proc.target" value="xsltproc" />
+ <property name="docbookx.dtd" value="../XML/xml/dtds/docbookx.dtd" />
+ <dirname property="build.support" file="${ant.file.jEditPlugin}" />
+ <property name="user-doc.xsl" location="${build.support}/users-guide.xsl" />
+ <property name="user-doc.xml" value="docs/users-guide.xml" />
+ <property name="user-doc.out" value="users-guide.html" />
+ <property name="javadoc.title" value="${ant.project.name} API" />
+ <property name="docbook.xsl.sheet" value="html/onechunk.xsl" />
+ <pathconvert property="docs.style.sheet"
+ dirsep="/">
+ <path location="${docbook.xsl}/${docbook.xsl.sheet}" />
+ </pathconvert>
+
+ <property name="xsltproc.executable" value="xsltproc" />
+
+ <!-- default junit options -->
+ <property name="junit.jar" value="junit.jar" />
+ <property name="junit.testcase" value="${ant.project.name}TestSuite" />
+ <property name="junit.printsummary" value="on" />
+ <property name="junit.haltonfailure" value="off" />
+
+ <fail message="The jedit JAR (jedit.jar) is not available in "${jedit.install.dir}"">
+ <condition>
+ <not>
+ <available file="${jedit.install.dir}/jedit.jar"
+ type="file" />
+ </not>
+ </condition>
+ </fail>
+
+ <!-- default class path; try not to override this,
+ since the intention is to add here anything that
+ might be needed by all the plugins (such as the
+ jedit.jar file and any other jar files that
+ jEdit might use in the future. -->
+ <path id="default.class.path">
+ <pathelement location="${jedit.install.dir}/jedit.jar" />
+ <pathelement location="${junit.jar}" />
+ <fileset dir="${build.dir}">
+ <include name="lib/*.jar"/>
+ </fileset>
+ </path>
+
+ <!-- this is the classpath used by the "compile"
+ target. Override this one if you need to. You don't
+ need to reference "default.class.path" here - it's added
+ automatically to the javac command. -->
+ <path id="project.class.path" />
+
+ <!-- {{{ Load ant-contrib library ===================== -->
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties" onerror="ignore">
+ <classpath>
+ <pathelement location="${ant-contrib.jar}"/>
+ </classpath>
+ </taskdef>
+ <!-- ===============================================}}} -->
+
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Custom javac task ============================ -->
+ <presetdef name="jp.javac">
+ <javac destdir="${build.classes}"
+ debug="${compiler.debug}"
+ debuglevel="${compiler.debuglevel}"
+ optimize="${compiler.optimize}"
+ deprecation="${compiler.deprecation}"
+ verbose="${compiler.verbose}"
+ nowarn="${compiler.nowarn}"
+ target="${compiler.target}"
+ source="${compiler.source}"
+ listfiles="${compiler.listfiles}"
+ fork="${compiler.fork}"
+ bootclasspath="${compiler.bootclasspath}"
+ extdirs="${compiler.extdirs}"
+ >
+ <src location="${src.dir}" />
+ <compilerarg line="${compiler.userargs}" />
+ <classpath refid="default.class.path" />
+ <classpath refid="project.class.path" />
+ </javac>
+ </presetdef>
+ <!-- }}} ============================================== -->
+
+ <!-- {{{ Compilation and building ===================== -->
+
+ <!-- This selector defines the files that will be
+ compiled by the "compile" target. Define here which
+ files under ${src.dir} will be compiled when the
+ "compile" task is called. -->
+ <selector id="compileFiles">
+ <filename name="**/*.java" />
+ </selector>
+
+ <!-- This selector defines extra files to be included
+ in the plugin's JAR file. The context of the
+ selector is the plugin's directory (${basedir}),
+ so it will not work for files outside the plugin
+ directory. For those cases, use the "build.prepare"
+ target. By default, it's empty. -->
+ <selector id="packageFiles">
+ <size value="0" when="less" />
+ </selector>
+
+ <!-- This selector defines the doc source files
+ The context of the selector is the plugin's directory (${basedir}),
+ so it will not work for files outside the plugin
+ directory. For those cases, use the "build.prepare"
+ target. By default, docs/users-guide.xml is selected. -->
+ <selector id="docSrcFiles">
+ <filename name="docs/users-guide.xml" />
+ </selector>
+
+ <!-- This selector defines other files that should be packaged
+ in the plugin's jar file; by default it contains actions.xml,
+ dockables.xml, services.xml, any files ending in ".props",
+ "LICENSE" and "README". The context is "${basedir}". Override
+ it if your plugin needs special treatment for these files. -->
+ <selector id="extraFiles">
+ <and>
+ <or>
+ <filename name="**/actions.xml" />
+ <filename name="**/browser.actions.xml" />
+ <filename name="**/dockables.xml" />
+ <filename name="**/services.xml" />
+ <filename name="**/*.props" />
+ <filename name="**/LICENSE" />
+ <filename name="**/README" />
+ </or>
+ </and>
+ </selector>
+
+ <!--{{{ Ivy setup *****============================== -->
+ <property name="ivy.install.version" value="2.2.0" />
+ <condition property="ivy.home" value="${env.IVY_HOME}">
+ <isset property="env.IVY_HOME" />
+ </condition>
+ <property name="ivy.home" value="${user.home}/.ant" />
+ <property name="ivy.jar.dir" value="${ivy.home}/lib" />
+ <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
+ <property name="ivy.settings.file" value="${build.support}/ivysettings.xml" />
+
+ <target name="download-ivy" unless="offline">
+
+ <mkdir dir="${ivy.jar.dir}"/>
+ <!-- download Ivy from web site so that it can be used even without any special installation -->
+ <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
+ dest="${ivy.jar.file}" usetimestamp="true"/>
+ </target>
+
+ <target name="init-ivy" depends="download-ivy">
+ <!-- try to load ivy here from ivy home, in case the user has not already dropped
+ it into ant's lib dir (note that the latter copy will always take precedence).
+ We will not fail as long as local lib dir exists (it may be empty) and
+ ivy is in at least one of ant's lib dir or the local lib dir. -->
+ <path id="ivy.lib.path">
+ <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
+
+ </path>
+ <taskdef resource="org/apache/ivy/ant/antlib.xml"
+ uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
+ </target>
+ <!--}}}-->
+
+ <!--{{{ Target: resolve ============================== -->
+ <target name="checkIvy">
+ <condition property="ivyPresent">
+ <available file="ivy.xml" type="file"/>
+ </condition>
+ </target>
+ <target name="resolve" description="Retrieve dependencies"
+ depends="checkIvy,init-ivy" if="ivyPresent">
+ <echo>ivy.xml present, retrieving dependencies</echo>
+ <ivy:retrieve pattern="${build.lib}/[artifact].[ext]"/>
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: compile ============================== -->
+ <!-- Compiles all the ".java" files present in the
+ directory pointed by the "src.dir" property
+ defined above. Classes are put in the directory
+ designated in the "build.classes" property.
+ The following properties control the behavior of
+ the compiler (relates to options to the javac
+ ant task, defaults in parethesis):
+ compiler.debug: the debug option (off)
+ compiler.debuglevel: the debug level (lines,source)
+ compiler.optimize: the optimize option (off)
+ compiler.deprecation: deprecation option (off)
+ compiler.verbose: the verbose option (off)
+ compiler.nowarn: the nowarn option (off)
+ compiler.target: the target option (1.5)
+ compiler.source: the source option (1.5)
+ compiler.listfiles: the listfiles option (no) -->
+ <target name="compile"
+ description="Compile the plugin's classes" depends="resolve">
+
+ <mkdir dir="${build.classes}" />
+ <jp.javac>
+ <selector refid="compileFiles" />
+ </jp.javac>
+
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: clean ================================ -->
+ <!-- Removes the directory defined in the "build"
+ property, the "docbook-wrapper.xsl" file and the
+ file defined by the property "jar.file" in the
+ directory defined by "install.dir". -->
+ <target name="clean" description="Cleans project directories">
+ <delete dir="${build.dir}" quiet="true" />
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: build ================================ -->
+ <!-- This target build the plugin JAR file. It
+ depends on two other targets: "compile", defined
+ above, and "build.prepare", which is empty in
+ this file but can be overriden by the plugin's
+ build file.
+ This target does the following after that:
+ * Copies all files defined by the extraFiles selector
+ to the staging area.
+ * Copies all files defined by the packageFiles selector
+ to the staging area.
+ * Creates a JAR with the name defined in
+ "jar.file" in the directory defined by
+ "install.dir". This JAR will contain the
+ contents of the directories defined by
+ "build.classes", "build.docs" and "build.extras"
+ If you need to have any other files added to the
+ JAR, override the "build.prepare" target and use
+ it to copy files to one of those three
+ directories, or redefine the "extraFiles"
+ selector. -->
+
+ <target name="build"
+ depends="build.prepare,compile"
+ description="Builds the plugin JAR file (no docs)">
+
+ <mkdir dir="${build.classes}" />
+ <mkdir dir="${build.docs}" />
+ <delete dir="${build.extras}" failonerror="false" />
+ <mkdir dir="${build.extras}" />
+ <mkdir dir="${install.dir}" />
+
+ <copy todir="${build.extras}" includeEmptyDirs="false">
+ <fileset dir="${basedir}">
+ <selector refid="extraFiles" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.extras}" includeEmptyDirs="false">
+ <fileset dir="${basedir}">
+ <selector refid="packageFiles" />
+ </fileset>
+ </copy>
+
+ <jar jarfile="${install.dir}/${jar.file}">
+ <fileset dir="${build.classes}" />
+ <fileset dir="${build.docs}" />
+ <fileset dir="${build.extras}" />
+ </jar>
+
+ <antcall target="build.post" />
+
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: build.prepare ======================== -->
+ <!-- This implementation does nothing. See the
+ "build" target for details. -->
+ <target name="build.prepare" />
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: build.post =========================== -->
+ <!-- Called after the build process is finished.
+ Plugins can use this to copy extra jar files the
+ plugin needs to ${install.dir}.
+ By default does nothing. -->
+ <target name="build.post" />
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: dist.nojavadoc ======================= -->
+ <!-- Meta-task that builds the user documentation and
+ builds the plugin JAR file, but not the javadoc. -->
+ <target name="dist.nojavadoc" depends="userdocs,build" />
+ <!-- =============================================== }}} -->
+
+ <!-- {{{ Target: dist.complete ======================== -->
+ <!-- Meta-task that builds the user documentation,
+ javadoc documentation and builds the plugin JAR
+ file. -->
+ <target name="dist.complete" depends="docs,build" />
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: dist ================================= -->
+ <!-- This task calls the target defined in the
+ property "dist.target" to build the plugin and
+ package it for distribution. Before proceeding,
+ it cleans the build directory. -->
+ <target name="dist" depends="clean" description="Builds JAR file, with docs">
+ <antcall target="${dist.target}" />
+ </target>
+ <!-- =============================================== }}} -->
+
+ <!-- {{{ Target: dist.source ========================== -->
+ <!-- Creates a ZIP file of the plugin's source. The
+ name of the file is defined in the property
+ "src.zip.file" and will be created in the
+ directory defined by "install.dir". -->
+ <target name="dist.source">
+ <delete file="${install.dir}/${src.zip.file}" quiet="true" />
+ <zip destfile="${install.dir}/${src.zip.file}">
+ <fileset dir="${src.dir}">
+ <include name="**/*.*" />
+ <exclude name="${build.dir}/**" />
+ </fileset>
+ </zip>
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: package ============================== -->
+ <!-- Convenience target that calls both "docs" and
+ "build" to create the plugin jar file. -->
+ <target name="package" depends="docs,build" />
+ <!-- =============================================== }}} -->
+
+ <!-- =============================================== }}} -->
+
+ <!-- {{{ Documentation ================================ -->
+
+ <!-- {{{ Target: docs ================================= -->
+ <!-- Meta-task that calls javadoc and userdocs. -->
+ <target name="docs"
+ depends="javadoc,userdocs"
+ description="Build the User's Guide and Javadoc documentation" />
+ <!-- =============================================== }}} -->
+
+ <!-- {{{ Target: userdocs ============================= -->
+ <target name="userdocs"
+ description="Builds the user's guide.">
+ <mkdir dir="${build.docs}" />
+ <copy todir="${build.docs}" includeEmptyDirs="false">
+ <fileset dir="${basedir}">
+ <selector refid="docSrcFiles" />
+ </fileset>
+ </copy>
+ <copy tofile="${build.docs}/users-guide.xsl"
+ flatten="true"
+ file="${user-doc.xsl}">
+ <filterset>
+ <filter token="docs.style.sheet"
+ value="${docs.style.sheet}" />
+ </filterset>
+ </copy>
+ <antcall target="docs-${docs-proc.target}" />
+ <delete file="${build.docs}/users-guide.xsl" />
+ <delete>
+ <fileset dir="${build.docs}">
+ <selector refid="docSrcFiles" />
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- =============================================== }}} -->
+
+ <target name="upload.docs" depends="javadoc, userdocs"
+ description="upload documentation to plugins.jedit.org site" >
+ <exec dir="${build.docs}" executable="rsync">
+ <arg line="-avz ./ ${sourceforge.user.name}@plugins.jedit.org:/home/groups/j/je/jedit-plugins/htdocs/plugindoc/${ant.project.name}" />
+ </exec>
+ </target>
+
+
+ <!-- {{{ Target: javadoc ============================== -->
+ <!-- Builds the javadoc documentation for the plugin,
+ placing it under "build.javadoc". Your plugin
+ build file *must* define a property called
+ named "javadoc.packagenames" to be used as the
+ "packagenames" option of ant's javadoc task.
+ This property is not defined in this file and
+ execition will probably fail if it's not defined.
+ The title of the documentation is defined in the
+ "javadoc.title" property. -->
+ <target name="javadoc"
+ description="Generates javadoc sourcecode documentation"
+ if="javadoc.packagenames">
+ <mkdir dir="${build.javadoc}" />
+ <javadoc sourcepath="${src.dir}"
+ destdir="${build.javadoc}"
+ locale="en"
+ packagenames="${javadoc.packagenames}"
+ windowtitle="${javadoc.title}">
+ <classpath refid="default.class.path" />
+ <classpath refid="project.class.path" />
+ </javadoc>
+ </target>
+ <!-- =============================================== }}} -->
+
+ <!-- {{{ Target: docs-xsltproc ======================== -->
+ <!-- Generate docs with xsltproc tool from
+ www.xmlsoft.org. This task creates a temporary
+ file called "docbook.catalog" containing a
+ reference to the Docbook DTD defined in the
+ property "docbookx.dtd" above. The style sheet
+ used is defined by the property "user-doc.xsl",
+ and defaults to "docbook-wrapper.xsl". The XML
+ document to be processed is defined by the
+ "user-doc.xml" property, and defaults to
+ "docs/users-guide.xml". The output is defined in
+ the "user-doc.out" property. -->
+ <target name="docs-xsltproc" description="Generate user documentation in html format with xsltproc">
+ <fail message="Please set the "docbook.catalog" in build.properties"
+ unless="docbook.catalog" />
+ <fail message="Please set "docbook.xsl" in build.properties"
+ unless="docbook.xsl" />
+
+ <exec executable="${xsltproc.executable}" dir="${build.docs}" failonerror="true">
+ <arg value="--output" />
+ <arg value="${user-doc.out}" />
+ <arg value="--catalogs" />
+ <arg value="users-guide.xsl" />
+ <arg value="${user-doc.xml}" />
+ <env key="SGML_CATALOG_FILES"
+ file="${docbook.catalog}" />
+ </exec>
+ </target>
+
+ <!-- ===============================================}}} -->
+
+ <target name="docs-none"
+ description="no xslt step - HTML docs" />
+
+ <!-- {{{ Target: docs-xalan =========================== -->
+ <!-- Generate docs with Xalan tool from
+ xml.apache.org . Same properties as the
+ "docs-xsltproc" target apply here. -->
+ <target name="docs-xalan"
+ description="Generate user documentation in html format with xalan (not working)">
+ <fail message="Please set the "docbookx.dtd" in build.properties"
+ unless="docbookx.dtd" />
+ <fail message="Please set "docbook.xsl" in build.properties"
+ unless="docbook.xsl" />
+
+ <xslt basedir="."
+ destdir="${build.docs}"
+ style="${build.docs}/users-guide.xsl"
+ includes="${user-doc.xml}">
+ <xmlcatalog>
+ <dtd publicId="-//OASIS//DTD DocBook XML V4.2//EN"
+ location="${docbookx.dtd}" />
+ </xmlcatalog>
+ </xslt>
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- =============================================== }}} -->
+
+ <!-- {{{ Unit testing ================================= -->
+
+ <!-- {{{ Target: test ================================= -->
+ <!-- Meta-task that calls the defined test target. -->
+ <target name="test"
+ description="Runs the plugin's unit tests.">
+ <antcall target="${unit.test.target}" />
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: test-junit============================ -->
+ <!-- Executes a jUnit test case defined by the plugin's
+ build file. The classpath for the test will be the
+ ${build.class} directory, the ${junit.jar} file and
+ the default.class.path and project.class.path path
+ structures.
+ -->
+ <target name="test-junit"
+ description="Runs the plugin's jUnit tests."
+ if="junit.testcase,junit.jar">
+
+ <junit printsummary="${junit.printsummary}"
+ haltonfailure="${junit.haltonfailure}">
+
+ <classpath>
+ <pathelement location="${junit.jar}" />
+ <pathelement location="${build.classes}" />
+ <path refid="default.class.path" />
+ <path refid="project.class.path" />
+ </classpath>
+
+ <test name="${junit.testcase}" />
+ </junit>
+
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- ===============================================}}} -->
+
+ <!--{{{ Dependencies ================================= -->
+
+
+ <!-- {{{ Target: build.dependencies =================== -->
+ <target name="build.dependencies"
+ description="Builds the needed plugins from the available source code."
+ if="plugin.dependencies,ant-contrib.jar">
+ <foreach list="${plugin.dependencies}"
+ target="build.other"
+ param="plugin.name"
+ delimiter=","
+ trim="true" />
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- {{{ Target: build.other=========================== -->
+ <!-- Builds a plugin from the code available in its
+ directory under "plugins.srcdir". This will call
+ the "build" target of that plugin's build file.
+ Expects the "plugin.name" parameter with the name
+ of the plugin's directory. -->
+ <target name="build.other">
+ <fail message="Can't find plugin: ${plugin.name}">
+ <condition>
+ <not>
+ <available file="${plugins.srcdir}/${plugin.name}/build.xml" />
+ </not>
+ </condition>
+ </fail>
+ <ant antfile="${plugins.srcdir}/${plugin.name}/build.xml"
+ target="build"
+ inheritAll="false"
+ inheritRefs="false" />
+ </target>
+ <!-- ===============================================}}} -->
+
+ <!-- ================================================== }}}-->
+
+</project>
+
diff --git a/build-support/users-guide.xsl b/build-support/users-guide.xsl
index cd566ef..72269fd 100644
--- a/build-support/users-guide.xsl
+++ b/build-support/users-guide.xsl
@@ -1,228 +1,228 @@
-<?xml version='1.0'?>
-
-<!-- You should use this XSL stylesheet to create plugin documentation.
-
- If you want all output in a single HTML file, specify the path to
- your DocBook-XSL "html/docbook.xsl" file in the <xsl:import>
- statement below. If you want each chapter to have its own file,
- specify the path to your "html/chunk.xsl".
-
- This stylesheet assumes the user's guide XML source is in a
- subdirectory of the plugin's main dir (e.g., "docs/users-guide.xml").
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version='1.0'
- xmlns="http://www.w3.org/TR/xhtml1/transitional"
- exclude-result-prefixes="#default">
-
-<xsl:import href="file:///@docs.style.sheet@" />
-
-<!-- Swing HTML control doesn't support “ and ” -->
-<xsl:template match="quote">"<xsl:apply-templates/>"</xsl:template>
-
-<xsl:template match="guibutton">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guiicon">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guilabel">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guimenu">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guimenuitem">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guisubmenu">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="image">
- <p><center><img src="{src}" /></center></p>
-</xsl:template>
-
-<xsl:template match="br">
- <br />
-</xsl:template>
-
-<xsl:param name="toc.list.type">ul</xsl:param>
-<xsl:param name="use.id.as.filename">1</xsl:param>
-<xsl:param name="shade.verbatim">1</xsl:param>
-
-<xsl:param name="funcsynopsis.style">ansi</xsl:param>
-<xsl:template match="void"><xsl:apply-templates/></xsl:template>
-
-
-<xsl:param name="chunk.first.sections">1</xsl:param>
-
-<xsl:template match="*" mode="object.title.markup.textonly">
- <xsl:variable name="title">
- <xsl:apply-templates select="." mode="title.markup"/>
- </xsl:variable>
- <xsl:value-of select="$title"/>
-</xsl:template>
-
-<!-- {{{ TOC generation -->
-<xsl:template match="/">
- <xsl:call-template name="toc"/>
-</xsl:template>
-
-<xsl:template name="toc">
- <xsl:apply-templates/>
- <xsl:call-template name="write.chunk">
- <xsl:with-param name="filename" select="'toc.xml'"/>
- <xsl:with-param name="method" select="'xml'"/>
- <xsl:with-param name="indent" select="'yes'"/>
- <xsl:with-param name="content">
- <xsl:call-template name="toc.content"/>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="toc.content">
- <TOC>
- <xsl:apply-templates select="." mode="my.toc"/>
- </TOC>
-</xsl:template>
-
-<xsl:template match="set" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="book" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="book" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon"
- mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="part|reference|preface|chapter|appendix|article"
- mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates
- select="preface|chapter|appendix|refentry|section|sect1"
- mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="section" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="section" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect1" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect2" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect2" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect3" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect3" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect4" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect4" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect5" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect5|colophon" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- </ENTRY>
-</xsl:template>
-
-<!-- }}} -->
-
-
-</xsl:stylesheet>
+<?xml version='1.0'?>
+
+<!-- You should use this XSL stylesheet to create plugin documentation.
+
+ If you want all output in a single HTML file, specify the path to
+ your DocBook-XSL "html/docbook.xsl" file in the <xsl:import>
+ statement below. If you want each chapter to have its own file,
+ specify the path to your "html/chunk.xsl".
+
+ This stylesheet assumes the user's guide XML source is in a
+ subdirectory of the plugin's main dir (e.g., "docs/users-guide.xml").
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default">
+
+<xsl:import href="file:///@docs.style.sheet@" />
+
+<!-- Swing HTML control doesn't support “ and ” -->
+<xsl:template match="quote">"<xsl:apply-templates/>"</xsl:template>
+
+<xsl:template match="guibutton">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guiicon">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guilabel">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guimenu">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guimenuitem">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guisubmenu">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="image">
+ <p><center><img src="{src}" /></center></p>
+</xsl:template>
+
+<xsl:template match="br">
+ <br />
+</xsl:template>
+
+<xsl:param name="toc.list.type">ul</xsl:param>
+<xsl:param name="use.id.as.filename">1</xsl:param>
+<xsl:param name="shade.verbatim">1</xsl:param>
+
+<xsl:param name="funcsynopsis.style">ansi</xsl:param>
+<xsl:template match="void"><xsl:apply-templates/></xsl:template>
+
+
+<xsl:param name="chunk.first.sections">1</xsl:param>
+
+<xsl:template match="*" mode="object.title.markup.textonly">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="title.markup"/>
+ </xsl:variable>
+ <xsl:value-of select="$title"/>
+</xsl:template>
+
+<!-- {{{ TOC generation -->
+<xsl:template match="/">
+ <xsl:call-template name="toc"/>
+</xsl:template>
+
+<xsl:template name="toc">
+ <xsl:apply-templates/>
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="'toc.xml'"/>
+ <xsl:with-param name="method" select="'xml'"/>
+ <xsl:with-param name="indent" select="'yes'"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="toc.content"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="toc.content">
+ <TOC>
+ <xsl:apply-templates select="." mode="my.toc"/>
+ </TOC>
+</xsl:template>
+
+<xsl:template match="set" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="book" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="book" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon"
+ mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="part|reference|preface|chapter|appendix|article"
+ mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates
+ select="preface|chapter|appendix|refentry|section|sect1"
+ mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="section" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="section" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect1" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect2" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect2" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect3" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect3" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect4" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect4" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect5" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect5|colophon" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ </ENTRY>
+</xsl:template>
+
+<!-- }}} -->
+
+
+</xsl:stylesheet>
diff --git a/debian/build.properties b/debian/build.properties
index 9f1f3f6..39c38ad 100644
--- a/debian/build.properties
+++ b/debian/build.properties
@@ -5,6 +5,7 @@
### For generating the docs
config.docbook.xsl=/usr/share/xml/docbook/stylesheet/nwalsh
config.xsltproc.executable=/usr/bin/xsltproc
+config.docbook.catalog=/usr/share/xml/docbook/schema/dtd/4.4/catalog.xml
config.build.debug=true
config.build.debuglevel=lines,vars,source
diff --git a/debian/changelog b/debian/changelog
index 1e0ac83..dcac928 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+jedit (4.4.1+dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * Bump Standards-Version to 3.9.2.
+ * Add docbook-xml as B-D.
+
+ -- Gabriele Giacone <1o5g4r8o at gmail.com> Fri, 12 Aug 2011 22:14:44 +0200
+
jedit (4.3.2+dfsg-3) unstable; urgency=low
* Updated bsh-src version required (Closes: #591153).
diff --git a/debian/control b/debian/control
index eb6bbe1..0745d6f 100644
--- a/debian/control
+++ b/debian/control
@@ -4,9 +4,10 @@ Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Gabriele Giacone <1o5g4r8o at gmail.com>
Build-Depends: debhelper (>= 7.0.50~), javahelper (>= 0.24), ant, ant-optional,
- docbook-xsl, xsltproc, imagemagick, quilt (>= 0.46-7~), bsh-src (>= 2.0b4-11)
+ docbook-xsl, xsltproc, imagemagick, quilt (>= 0.46-7~), bsh-src (>= 2.0b4-11),
+ docbook-xml
Build-Depends-Indep: openjdk-6-jdk | sun-java6-jdk
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
DM-Upload-Allowed: yes
Vcs-Git: git://git.debian.org/pkg-java/jedit.git
Vcs-Browser: http://git.debian.org/?p=pkg-java/jedit.git
@@ -15,7 +16,7 @@ Homepage: http://www.jedit.org/
Package: jedit
Architecture: all
Depends: ${misc:Depends}, openjdk-6-jre | sun-java6-jre, java-wrappers (>= 0.1.14)
-Description: A plugin-based editor for programmers
+Description: Plugin-based editor for programmers
As one of the most feature rich editors available, jEdit boasts support for
syntax highlighting in more than 140 languages. jEdit combines the power of
Emacs, the user-friendliness of Kate, and the advanced editing features
diff --git a/debian/jedit.doc-base.3 b/debian/jedit.doc-base.3
index 376d9bb..28770c7 100644
--- a/debian/jedit.doc-base.3
+++ b/debian/jedit.doc-base.3
@@ -1,9 +1,9 @@
Document: jedit-news
Title: jEdit NEWS
Author: Contributors <jedit-devel at lists.sourceforge.net>
-Abstract: What's New in jEdit 4.3
+Abstract: What's New in jEdit 4.4
Section: Editors
Format: HTML
-Index: /usr/share/doc/jedit/news43/index.html
-Files: /usr/share/doc/jedit/news43/*.html
+Index: /usr/share/doc/jedit/news44/index.html
+Files: /usr/share/doc/jedit/news44/*.html
diff --git a/debian/patches/02build.xml b/debian/patches/02build.xml
index 460c73c..00e3080 100644
--- a/debian/patches/02build.xml
+++ b/debian/patches/02build.xml
@@ -4,14 +4,14 @@ Author: Gabriele Giacone <1o5g4r8o at gmail.com>
--- a/jEdit/build.xml
+++ b/jEdit/build.xml
-@@ -122,6 +122,10 @@
- compiler="modern"
- encoding="UTF-8">
- <include name="org/**" />
-+ <exclude name="org/gjt/sp/jedit/bsh/servlet/*"/>
-+ <exclude name="org/gjt/sp/jedit/bsh/util/*"/>
-+ <exclude name="org/gjt/sp/jedit/bsh/util/**/*"/>
-+ <exclude name="org/gjt/sp/jedit/bsh/Console.java"/>
- <include name="com/**" />
- <compilerarg line="${config.build.compilerarg}" />
- </javac>
+@@ -143,6 +143,10 @@
+ encoding="UTF-8"
+ includeAntRuntime="false">
+ <include name="org/**"/>
++ <exclude name="org/gjt/sp/jedit/bsh/servlet/*"/>
++ <exclude name="org/gjt/sp/jedit/bsh/util/*"/>
++ <exclude name="org/gjt/sp/jedit/bsh/util/**/*"/>
++ <exclude name="org/gjt/sp/jedit/bsh/Console.java"/>
+ <include name="com/**"/>
+ <compilerarg line="${config.build.compilerarg}"/>
+ </javac>
diff --git a/jEdit/.idea/ant.xml b/jEdit/.idea/ant.xml
new file mode 100644
index 0000000..4d20dd3
--- /dev/null
+++ b/jEdit/.idea/ant.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="AntConfiguration">
+ <defaultAnt bundledAnt="true" />
+ <buildFile url="file://$PROJECT_DIR$/build.xml">
+ <additionalClassPath />
+ <antReference projectDefault="true" />
+ <customJdkName value="" />
+ <maximumHeapSize value="128" />
+ <maximumStackSize value="2" />
+ <properties />
+ </buildFile>
+ <buildFile url="file://$PROJECT_DIR$/jars/MacOSX/build.xml">
+ <additionalClassPath />
+ <antReference projectDefault="true" />
+ <customJdkName value="" />
+ <maximumHeapSize value="128" />
+ <maximumStackSize value="2" />
+ <properties />
+ </buildFile>
+ <buildFile url="file://$PROJECT_DIR$/jars/QuickNotepad/build.xml">
+ <additionalClassPath />
+ <antReference projectDefault="true" />
+ <customJdkName value="" />
+ <maximumHeapSize value="128" />
+ <maximumStackSize value="2" />
+ <properties />
+ </buildFile>
+ </component>
+</project>
+
diff --git a/jEdit/.idea/compiler.xml b/jEdit/.idea/compiler.xml
new file mode 100644
index 0000000..688274d
--- /dev/null
+++ b/jEdit/.idea/compiler.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <option name="DEFAULT_COMPILER" value="Javac" />
+ <resourceExtensions>
+ <entry name=".+\.(properties|xml|html|dtd|tld)" />
+ <entry name=".+\.(gif|png|jpeg|jpg)" />
+ </resourceExtensions>
+ <wildcardResourcePatterns>
+ <entry name="?*.properties" />
+ <entry name="?*.props" />
+ <entry name="?*.xml" />
+ <entry name="?*.gif" />
+ <entry name="?*.png" />
+ <entry name="?*.jpeg" />
+ <entry name="?*.jpg" />
+ <entry name="?*.html" />
+ <entry name="?*.dtd" />
+ <entry name="?*.tld" />
+ <entry name="?*.ftl" />
+ </wildcardResourcePatterns>
+ <annotationProcessing enabled="false" useClasspath="true" />
+ </component>
+</project>
+
diff --git a/jEdit/.idea/copyright/GPL_v2.xml b/jEdit/.idea/copyright/GPL_v2.xml
new file mode 100644
index 0000000..26e0ef2
--- /dev/null
+++ b/jEdit/.idea/copyright/GPL_v2.xml
@@ -0,0 +1,9 @@
+<component name="CopyrightManager">
+ <copyright>
+ <option name="notice" value="jEdit - Programmer's Text Editor
:tabSize=8:indentSize=8:noTabs=false:
:folding=explicit:collapseFolds=1:
Copyright © $today.year jEdit contributors
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA." />
+ <option name="keyword" value="Copyright" />
+ <option name="allowReplaceKeyword" value="" />
+ <option name="myName" value="GPL v2" />
+ <option name="myLocal" value="true" />
+ </copyright>
+</component>
\ No newline at end of file
diff --git a/jEdit/.idea/copyright/profiles_settings.xml b/jEdit/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..6d49799
--- /dev/null
+++ b/jEdit/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,61 @@
+<component name="CopyrightManager">
+ <settings default="GPL v2">
+ <module2copyright />
+ <LanguageOptions name="HTML">
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="2" />
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </LanguageOptions>
+ <LanguageOptions name="JSP">
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="2" />
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </LanguageOptions>
+ <LanguageOptions name="JSPX">
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="2" />
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </LanguageOptions>
+ <LanguageOptions name="XML">
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="2" />
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </LanguageOptions>
+ </settings>
+</component>
\ No newline at end of file
diff --git a/jEdit/.idea/encodings.xml b/jEdit/.idea/encodings.xml
new file mode 100644
index 0000000..86366af
--- /dev/null
+++ b/jEdit/.idea/encodings.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="ISO-8859-1">
+ <file url="PROJECT" charset="UTF-8" />
+ </component>
+</project>
+
diff --git a/jEdit/.idea/misc.xml b/jEdit/.idea/misc.xml
new file mode 100644
index 0000000..28c2f23
--- /dev/null
+++ b/jEdit/.idea/misc.xml
@@ -0,0 +1,437 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="DependencyValidationManager">
+ <scope name="jEdit Sourcefiles" pattern="file[jEdit]:org//*.java" />
+ <scope name="Modes" pattern="file[jEdit]:modes//*.xml" />
+ <scope name="Macros" pattern="file[jEdit]:macros//*.bsh" />
+ <scope name="MacOSX Sourcefiles" pattern="file[MacOSX]:macosx//*.java" />
+ <scope name="QuickNotepad Sourcefiles" pattern="file[QuickNotepad]:*.java" />
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </component>
+ <component name="IdProvider" IDEtalkID="F2207F966C6969E072D5CD57D729D7EA" />
+ <component name="JavadocGenerationManager">
+ <option name="OUTPUT_DIRECTORY" />
+ <option name="OPTION_SCOPE" value="protected" />
+ <option name="OPTION_HIERARCHY" value="true" />
+ <option name="OPTION_NAVIGATOR" value="true" />
+ <option name="OPTION_INDEX" value="true" />
+ <option name="OPTION_SEPARATE_INDEX" value="true" />
+ <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
+ <option name="OPTION_DEPRECATED_LIST" value="true" />
+ <option name="OTHER_OPTIONS" value="" />
+ <option name="HEAP_SIZE" />
+ <option name="LOCALE" />
+ <option name="OPEN_IN_BROWSER" value="true" />
+ </component>
+ <component name="ProjectDetails">
+ <option name="projectName" value="jEdit" />
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/build/idea" />
+ </component>
+ <component name="SvnBranchConfigurationManager">
+ <option name="myConfigurationMap">
+ <map>
+ <entry key="$PROJECT_DIR$">
+ <value>
+ <SvnBranchConfiguration>
+ <option name="branchMap">
+ <map>
+ <entry key="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches">
+ <value>
+ <list>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1218396639209" />
+ <option name="revision" value="13258" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches/docking_framework" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1176951697724" />
+ <option name="revision" value="9462" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches/jedit43_nostrings" />
+ </SvnBranchItem>
+ </list>
+ </value>
+ </entry>
+ <entry key="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags">
+ <value>
+ <list>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1226862920462" />
+ <option name="revision" value="14070" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre16" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1224211014440" />
+ <option name="revision" value="13896" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre15" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1209312241226" />
+ <option name="revision" value="12514" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre14" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1205435718427" />
+ <option name="revision" value="12215" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre13" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1197063574015" />
+ <option name="revision" value="11207" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre12" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1191436781626" />
+ <option name="revision" value="10791" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre11" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1184190109800" />
+ <option name="revision" value="10009" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre10" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172940160439" />
+ <option name="revision" value="9074" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre1" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172938815897" />
+ <option name="revision" value="9072" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-3-2-2" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172934922377" />
+ <option name="revision" value="9070" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-final" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172934620160" />
+ <option name="revision" value="9069" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre7" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172934093879" />
+ <option name="revision" value="9068" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre5" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172933950791" />
+ <option name="revision" value="9067" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre4" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172930175040" />
+ <option name="revision" value="9066" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre12" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172929632216" />
+ <option name="revision" value="9065" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre9" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172929477203" />
+ <option name="revision" value="9064" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre8" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1172929096756" />
+ <option name="revision" value="9063" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre5" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1169312622101" />
+ <option name="revision" value="8692" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre9" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1163001311391" />
+ <option name="revision" value="7992" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre8" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1159851355117" />
+ <option name="revision" value="7163" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre7" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1155747706518" />
+ <option name="revision" value="6701" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre6" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1152311295000" />
+ <option name="revision" value="5556" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/after_bsh-2-0b4" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1152266138000" />
+ <option name="revision" value="5554" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/before_bsh-2-0b4" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1152181828000" />
+ <option name="revision" value="5542" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre5" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1152180149000" />
+ <option name="revision" value="5540" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre3" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1152122425000" />
+ <option name="revision" value="5531" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre2" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1150397246000" />
+ <option name="revision" value="5442" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit_43_with_gnuregexp_microstarxml" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1147475209000" />
+ <option name="revision" value="5388" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre4" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1136173007000" />
+ <option name="revision" value="5329" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre3" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1110595434000" />
+ <option name="revision" value="5202" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre2" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1108074918000" />
+ <option name="revision" value="5182" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/before-fast-scroll" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1104528786000" />
+ <option name="revision" value="5165" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre1" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1094326374000" />
+ <option name="revision" value="5129" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/before-selection-manager" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1094264677000" />
+ <option name="revision" value="5124" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/before-screen-line-refactoring" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1093748323000" />
+ <option name="revision" value="5111" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-final" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1090047563000" />
+ <option name="revision" value="5085" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre15" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1086297068000" />
+ <option name="revision" value="5058" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre14" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1084575691000" />
+ <option name="revision" value="5043" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre13" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1079804107000" />
+ <option name="revision" value="5002" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre11" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1079764835000" />
+ <option name="revision" value="5000" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre10" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1072501334000" />
+ <option name="revision" value="4944" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/beanshell-2-0b1" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1070236854000" />
+ <option name="revision" value="4927" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre7" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1067201848000" />
+ <option name="revision" value="4907" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre6" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1061570577000" />
+ <option name="revision" value="4867" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/crazy-pos-mgr" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1059967153000" />
+ <option name="revision" value="4844" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre4" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1058223654000" />
+ <option name="revision" value="4827" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/bsh-13b2-merge" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1057542014000" />
+ <option name="revision" value="4821" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre3" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1054263177000" />
+ <option name="revision" value="4749" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre2" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1052174343000" />
+ <option name="revision" value="4685" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/beanshell-1-3" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1051837211000" />
+ <option name="revision" value="4676" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre1" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1045976885000" />
+ <option name="revision" value="4511" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/macos-2_0_4" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1045871364000" />
+ <option name="revision" value="4508" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre11" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1045820614000" />
+ <option name="revision" value="4504" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/macos-2_0_3" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1045271361000" />
+ <option name="revision" value="4482" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre10" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1043802516000" />
+ <option name="revision" value="4451" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre9" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1042258598000" />
+ <option name="revision" value="4425" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre8" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1037919166000" />
+ <option name="revision" value="4380" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre6" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1029873100000" />
+ <option name="revision" value="4318" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre3" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1024812657000" />
+ <option name="revision" value="4284" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre2" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1024133719000" />
+ <option name="revision" value="4256" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre1" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1018587320000" />
+ <option name="revision" value="4140" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-final" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1017715362000" />
+ <option name="revision" value="4125" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre9" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1017050868000" />
+ <option name="revision" value="4114" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre8" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1015742549000" />
+ <option name="revision" value="4084" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre7" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1014103275000" />
+ <option name="revision" value="4052" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre6" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1012890490000" />
+ <option name="revision" value="4013" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre5" />
+ </SvnBranchItem>
+ <SvnBranchItem>
+ <option name="creationDateMillis" value="1011744082000" />
+ <option name="revision" value="3993" />
+ <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre4" />
+ </SvnBranchItem>
+ </list>
+ </value>
+ </entry>
+ </map>
+ </option>
+ <option name="branchUrls">
+ <list>
+ <option value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches" />
+ <option value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags" />
+ </list>
+ </option>
+ <option name="trunkUrl" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/trunk" />
+ </SvnBranchConfiguration>
+ </value>
+ </entry>
+ </map>
+ </option>
+ <option name="myVersion" value="124" />
+ <option name="mySupportsUserInfoFilter" value="true" />
+ </component>
+ <component name="VcsRevisionGraphProjectComponent">
+ <option name="_useTwoTagConvention" value="true" />
+ <option name="_showTags" value="true" />
+ <option name="_tagNaming" value="TAG_$T_MERGE_$S_TO_$D" />
+ <option name="_tagFilter" value="" />
+ <option name="_branchFilter" />
+ <option name="_showRevisionFilter" value="false" />
+ <option name="_afterDateTimeFilter" value="false" />
+ <option name="_beforeDateTimeFilter" value="false" />
+ <option name="_afterDateTime" value="" />
+ <option name="_beforeDateTime" value="" />
+ <option name="_projectRoot" value="<Use repository root>" />
+ <option name="_trunk" value="trunk" />
+ <option name="_branches" value="branches" />
+ <option name="_tags" value="tags" />
+ <option name="_showTagFilter" value="false" />
+ <option name="_showBranchFilter" value="false" />
+ </component>
+ <component name="WebServicesPlugin" addRequiredLibraries="true" />
+</project>
+
diff --git a/jEdit/.idea/modules.xml b/jEdit/.idea/modules.xml
new file mode 100644
index 0000000..9eec59d
--- /dev/null
+++ b/jEdit/.idea/modules.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/jars/MacOSX/MacOSX.iml" filepath="$PROJECT_DIR$/jars/MacOSX/MacOSX.iml" />
+ <module fileurl="file://$PROJECT_DIR$/jars/QuickNotepad/QuickNotepad.iml" filepath="$PROJECT_DIR$/jars/QuickNotepad/QuickNotepad.iml" />
+ <module fileurl="file://$PROJECT_DIR$/jEdit.iml" filepath="$PROJECT_DIR$/jEdit.iml" />
+ </modules>
+ </component>
+</project>
+
diff --git a/jEdit/.idea/projectCodeStyle.xml b/jEdit/.idea/projectCodeStyle.xml
new file mode 100644
index 0000000..1c478ff
--- /dev/null
+++ b/jEdit/.idea/projectCodeStyle.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CodeStyleSettingsManager">
+ <option name="PER_PROJECT_SETTINGS">
+ <value>
+ <option name="OTHER_INDENT_OPTIONS">
+ <value>
+ <option name="INDENT_SIZE" value="8" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="8" />
+ <option name="USE_TAB_CHARACTER" value="true" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </value>
+ </option>
+ <ADDITIONAL_INDENT_OPTIONS fileType="groovy">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="gsp">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="java">
+ <option name="INDENT_SIZE" value="8" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="8" />
+ <option name="USE_TAB_CHARACTER" value="true" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="true" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="js">
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="jsp">
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="php">
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="sql">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="xml">
+ <option name="INDENT_SIZE" value="8" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="8" />
+ <option name="USE_TAB_CHARACTER" value="true" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="yml">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ </value>
+ </option>
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
+ </component>
+</project>
+
diff --git a/jEdit/.idea/runConfigurations/jEdit.xml b/jEdit/.idea/runConfigurations/jEdit.xml
new file mode 100644
index 0000000..a05dc50
--- /dev/null
+++ b/jEdit/.idea/runConfigurations/jEdit.xml
@@ -0,0 +1,37 @@
+<component name="ProjectRunConfigurationManager">
+ <configuration default="false" name="jEdit" type="Application" factoryName="Application">
+ <log_file path="$PROJECT_DIR$/build/settings/activity.log" checked="true" skipped="true" show_all="false" alias="Activity Log" />
+ <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="emma" />
+ <extension name="snapshooter" />
+ <option name="MAIN_CLASS_NAME" value="org.gjt.sp.jedit.jEdit" />
+ <option name="VM_PARAMETERS" value="-Xmx192M" />
+ <option name="PROGRAM_PARAMETERS" value="-settings="$PROJECT_DIR$/build/settings"" />
+ <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" value="" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <module name="jEdit" />
+ <envs />
+ <RunnerSettings RunnerId="Debug">
+ <option name="DEBUG_PORT" value="1341" />
+ <option name="TRANSPORT" value="0" />
+ <option name="LOCAL" value="true" />
+ </RunnerSettings>
+ <RunnerSettings RunnerId="JProfiler">
+ <option name="WINDOW" value="false" />
+ <option name="JVMPI" value="false" />
+ <option name="INTERPRETED" value="false" />
+ </RunnerSettings>
+ <RunnerSettings RunnerId="Run" />
+ <ConfigurationWrapper RunnerId="Debug" />
+ <ConfigurationWrapper RunnerId="JProfiler" />
+ <ConfigurationWrapper RunnerId="Run" />
+ <method>
+ <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="build" />
+ <option name="Make" enabled="false" />
+ <option name="Run Ant target" value="true" />
+ </method>
+ </configuration>
+</component>
\ No newline at end of file
diff --git a/jEdit/.idea/runConfigurations/jEdit__background_mode_.xml b/jEdit/.idea/runConfigurations/jEdit__background_mode_.xml
new file mode 100644
index 0000000..cdc8629
--- /dev/null
+++ b/jEdit/.idea/runConfigurations/jEdit__background_mode_.xml
@@ -0,0 +1,30 @@
+<component name="ProjectRunConfigurationManager">
+ <configuration default="false" name="jEdit (background mode)" type="Application" factoryName="Application">
+ <log_file path="$PROJECT_DIR$/build/settings/activity.log" checked="true" skipped="true" show_all="false" alias="Activity Log" />
+ <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="emma" />
+ <extension name="snapshooter" />
+ <option name="MAIN_CLASS_NAME" value="org.gjt.sp.jedit.jEdit" />
+ <option name="VM_PARAMETERS" value="-Xmx192M" />
+ <option name="PROGRAM_PARAMETERS" value="-settings="$PROJECT_DIR$/build/settings" -background" />
+ <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" value="" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <module name="jEdit" />
+ <envs />
+ <RunnerSettings RunnerId="JProfiler">
+ <option name="WINDOW" value="false" />
+ <option name="JVMPI" value="false" />
+ <option name="INTERPRETED" value="false" />
+ </RunnerSettings>
+ <RunnerSettings RunnerId="Run" />
+ <ConfigurationWrapper RunnerId="Run" />
+ <method>
+ <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="build" />
+ <option name="Make" enabled="false" />
+ <option name="Run Ant target" value="true" />
+ </method>
+ </configuration>
+</component>
\ No newline at end of file
diff --git a/jEdit/.idea/uiDesigner.xml b/jEdit/.idea/uiDesigner.xml
new file mode 100644
index 0000000..3b00020
--- /dev/null
+++ b/jEdit/.idea/uiDesigner.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Palette2">
+ <group name="Swing">
+ <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+ </item>
+ <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+ <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+ <initial-values>
+ <property name="text" value="Button" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="RadioButton" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="CheckBox" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="Label" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+ <preferred-size width="-1" height="20" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+ </item>
+ </group>
+ </component>
+</project>
+
diff --git a/jEdit/.idea/vcs.xml b/jEdit/.idea/vcs.xml
new file mode 100644
index 0000000..81ec500
--- /dev/null
+++ b/jEdit/.idea/vcs.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="IssueNavigationConfiguration">
+ <option name="links">
+ <list>
+ <IssueNavigationLink>
+ <option name="issueRegexp" value="\d+" />
+ <option name="linkRegexp" value="http://sourceforge.net/support/tracker.php?aid=$0" />
+ </IssueNavigationLink>
+ </list>
+ </option>
+ </component>
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="svn" />
+ </component>
+</project>
+
diff --git a/jEdit/README.SRC.txt b/jEdit/README.SRC.txt
index 9787c69..cf9ee1d 100644
--- a/jEdit/README.SRC.txt
+++ b/jEdit/README.SRC.txt
@@ -1,187 +1,218 @@
-SOURCE CODE NOTES
-
-This file only contains information about compiling from source.
-General jEdit documentation can be found in the 'doc' directory.
-
-* Requirements
-
- For all tasks:
-
- - Apache Ant. I use version 1.7; older or newer versions might or might not
- work. If an older version doesn't work, install an update. If a newer
- version doesn't work, please submit a bug report.
- Get it from <http://ant.apache.org>.
- - The Ant-nodeps package. This is included in the download from ants website,
- as well as the AntPlugin from the Plugin Manager,
- but not in some default installs on various *nix systems.
- There you should get the ant-nodeps package through your
- package management system.
- - Configure the build.properties.sample file with your local paths and save it
- as build.properties.
- - Make sure you also have the build-support module.
- - Configure the build.properties.sample file from build-support with your
- local paths and save it as build.properties in the folder jars.
-
- For building jEdit, the API documentation or any of the
- distribution files except of the source package:
-
- - A Java compiler of at least version 1.5, such as Sun's javac
- which is included in the JDK. Get it from <http://java.sun.com/downloads/>
-
- For building the API documentation:
-
- - Sun's javadoc tool, which is included in the JDK.
- Get it from <http://java.sun.com/downloads/>
-
- For building the online help in either HTML- or PDF-format:
-
- - DocBook XML 4.4. called "docbook-dtd" or "docbook-xml" from package managers.
- Get it from <http://www.docbook.org/xml/4.4/>. Contains catalog information.
- - DocBook XSL. Called "docbook-xsl" in package managers.
- Contains style sheets for transformation into HTML or FO.
- Don't use a ".0" version, these are experimental releases.
- <http://www.sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608>
- - xsltproc. sometimes packaged as "libxslt" from package managers:
- This is originally a *nix program, but there are ports
- e. g. for Windows too. Get it from <http://www.xmlsoft.org/XSLT/downloads.html>
- or <http://www.zlatkovic.com/libxml.en.html>.
-
- For building the online help in PDF-format:
-
- - Apache FOP 0.20.5. The 0.92 beta version will NOT work!
- Get it from <http://xmlgraphics.apache.org/fop/download.html>
-
- For building the windows installer (for the final step):
-
- - Inno Setup. Get it from <http://www.jrsoftware.org/isdl.php>
- - A box running windows.
-
- For building the Mac OS X disk image (DMG) for easy distribution (for the final step):
-
- - A box running Mac OS X
-
-
-* Tasks
-
- If all necessary tools are installed and set up, you can use ant with a couple of targets.
- The default target if you just run "ant" is "build", like running "ant build".
-
- - build build the jEdit JAR-file with full debug-information
- builds jEdit in the build-folder, configured in build.properties,
- with full debug information included.
-
- - run run jEdit
- runs the jEdit-version in the build-folder, configured in build.properties.
- If there isn't any, it builds it in front of execution.
-
- - docs-html generate HTML docs (needs xsltproc)
- builds the online help in HTML-format in the build-folder, configured in build.properties.
-
- - docs-javadoc generate JavaDoc API docs
- builds the API documentation in the build-folder, configured in build.properties.
-
- - docs-pdf-USletter generate PDF users-guide with US letter paper size (needs xsltproc and fop)
- builds the User's Guide in PDF-format with US letter page size
- in the build-folder, configured in build.properties.
-
- - docs-pdf-a4 generate PDF users-guide with A4 paper size (needs xsltproc and fop)
- builds the User's Guide in PDF-format with A4 page size
- in the build-folder, configured in build.properties.
-
- - dist build all distribution files
- builds all distribution files or prepares the final step for some of them (Win and Mac)
- in the dist-folder, configured in build.properties.
-
- - dist-deb build the DEB Package
- builds the DEB Debian package in the dist-folder, configured in build.properties.
-
- - dist-java build the Java-installer
- builds the Java installer in the dist-folder, configured in build.properties.
-
- - dist-mac build the Mac OS X disk image (DMG-file)
- builds the Mac OS X internet-enabled disk image (DMG-file) if building on a box
- running Mac OS X. If building on a box running something else, there will be a file
- called jedit<version_here>-dist-mac-finish.tar.bz2 in the dist-folder,
- configured in build.properties. Give that to someone running Mac OS X and ask him
- to extract the archive and to execute "ant dist-mac-finish".
- The only thing that needs to be installed for this final step is Apache Ant.
-
- - dist-mac-finish finish building the Mac OS X disk image (DMG-file) on Mac OS X
- builds the Mac OS X internet-enabled disk image (DMG-file) in the dist-folder,
- configured in build.properties if building on a box running Mac OS X.
- This target is normally only run directly, if someone just has to do
- the final step that was prepared by "dist-mac" or "dist".
-
- - dist-manuals build the PDF-manuals
- builds the User's Guide in PDF-format with both, USletter and A4 page size
- in the dist-folder, configured in build.properties.
-
- - dist-slackware build the Slackware Package
- builds the Slackware TGZ package in the dist-folder, configured in build.properties.
-
- - dist-src build the src-archive
- builds the source package in the dist-folder, configured in build.properties.
-
- - dist-win build the Windows installer (EXE-file)
- builds the windows installer in the dist-folder, configured in build.properties,
- on a box running Windows. If building on a box running something else, there will be
- a file called jedit<version_here>-dist-win-finish.tar.bz2 in the dist-folder,
- configured in build.properties. Give that to someone running Windows and ask him
- to extract the archive and to execute "ant dist-win-finish".
- The only things that need to be installed for this final step is Apache Ant, and
- Inno Setup. Prior to running "ant dist-win-finish", the helper has to set up the
- build.properties file with the path to his Inno Setup installation.
-
- - dist-win-finish finish building the Windows installer (EXE-file) on Windows
- build the windows installer in the dist-folder, configured in build.properties if
- building on a box running Winows. This target is normally only run directly, if
- someone just has to do the final step that was prepared by "dist-win" or "dist".
-
- - clean clean up build.dir and dist.dir
- cleans up the temporary files from the build- and dist-folder, configured in build.properties.
- Leaves the runnable jEdit, and the distribution files in place.
-
- - clean-all clean up build.dir and dist.dir completely
- cleans up all files from the build- and dist-folder, configured in build.properties,
- and the folders itself too.
-
-
-
-* Interesting algorithms and tricks
-
- - org.gjt.sp.jedit.browser.VFSDirectoryEntryTable: a tree table control.
-
- - org.gjt.sp.jedit.buffer.LineManager: the "gap" optimization allows
- update operations to be performed in O(1) time in certain
- circumstances.
-
- - org.gjt.sp.jedit.buffer.KillRing: uses a hash to speed up comparisons
- with sets of strings.
-
- - org.gjt.sp.jedit.search.BoyerMooreSearchMatcher: fast text search.
-
- - org.gjt.sp.jedit.syntax.TokenMarker: generic tokenizer driven by rules
- defined in an XML file.
-
- - org.gjt.sp.jedit.textarea.DisplayManager: the fold visibility map
- looks like an RLE-compressed bit set but does lookups in O(log n).
-
- - org.gjt.sp.util.WorkThreadPool: a pool of threads executing requests
- from a queue, enforcing various concurrency requirements.
-
-
-
-* Tips for Eclipse/NetBeans/IDE users:
-
-Some of the source directories are only needed for building packages on
-certain platforms. If you add jEdit source to an IDE like Eclipse that tries
-to build everything, you'll get some errors from these directories unless
-you have the right libraries. However, if you tell Eclipse to exclude these
-directories, you can still build and run/debug jEdit from source.
-Follow these steps:
-
- - Project properties - Java build path
- - Source - Excluded dirs - Edit - Add multiple
- - Add these subdirs: jars, net, de, build
-
-
+SOURCE CODE NOTES
+
+This file only contains information about compiling from source.
+General jEdit documentation can be found in the 'doc' directory.
+
+* Requirements
+
+ For all tasks:
+
+ - Apache Ant. I use version 1.7; older or newer versions might or might not
+ work. If an older version doesn't work, install an update. If a newer
+ version doesn't work, please submit a bug report.
+ Get it from <http://ant.apache.org>.
+ - The Ant Optional package. This is included in the download from ants website,
+ as well as the AntPlugin from the Plugin Manager,
+ but not in some default installs on various *nix systems.
+ There you should get the ant-optional package through your
+ package management system.
+ - Configure the build.properties.sample file with your local paths and save it
+ as build.properties.
+ - Make sure you also have the build-support module.
+ - Configure the build.properties.sample file from build-support with your
+ local paths and save it as build.properties in the folder jars.
+
+ For building jEdit, the API documentation or any of the
+ distribution files except of the source package:
+
+ - A Java compiler of at least version 1.6, such as Sun's javac
+ which is included in the JDK. Get it from <http://www.java.com/download> or
+ from your package manager - e. g. sun-java6-jdk.
+
+ For building the API documentation:
+
+ - Sun's javadoc tool, which is included in the JDK.
+ Get it from <http://www.java.com/download> or from your package
+ manager - e. g. sun-java6-jdk.
+
+ For building the online help in either HTML- or PDF-format:
+
+ - DocBook XML 4.4. Get it from <http://www.docbook.org/xml/4.4/> or from your
+ package manager - e. g. "docbook-xml" or "docbook-dtd". This contains
+ the DocBook definition and catalog information.
+ - DocBook XSL.
+ Get it from <http://sourceforge.net/projects/docbook/files/docbook-xsl/> or
+ from your package manager - e. g. "docbook-xsl". This contains style sheets
+ for transformation into HTML or FO (for PDF).
+ Don't use a ".0" version, these are experimental releases. They are normally
+ followed by a ".1" version short time after release of the ".0" version.
+ - Set the "docbook.catalog" property in build.properties to the path of the
+ catalog.xml catalog file. Examples for various OS can be found in
+ build.properties.sample.
+ - Set the "docbook.xsl" property in build.properties to the installation path
+ of the DocBook XSL files. Examples for various OS can be found in
+ build.properties.sample.
+ - xsltproc. This is originally a *nix program, but there are ports e. g. for
+ Windows too. Get it from <http://www.xmlsoft.org/XSLT/downloads.html> or
+ from your package manager.
+ - Set the "xsltproc.executable" property in build.properties to the path of
+ your xsltproc executable. If it is in your PATH environment variable,
+ "xsltproc" is sufficient as value. Examples for various OS can be found in
+ build.properties.sample.
+
+ For building the online help in PDF-format:
+
+ - Apache FOP. Get it from <http://xmlgraphics.apache.org/fop/download.html> or
+ from your package manager. The old 0.20.5 release will not work anymore with
+ our files. 0.93 or newer has to be used.
+
+ For building the windows EXE launcher:
+
+ - Launch4j. Get it from <http://sourceforge.net/projects/launch4j/files/>
+
+ For building the windows installer (for the final step):
+
+ - Unicode Inno Setup. Get it from <http://www.jrsoftware.org/isdl.php>
+ - A box running windows or wine, e. g. on *nix. If Inno Setup should be
+ run via wine, a wine version of at least 1.3.10 is required because
+ of a bug in earlier wine versions.
+
+ For building the Mac OS X disk image (DMG) for easy distribution
+ (for the final step):
+
+ - A box running Mac OS X
+
+
+* Tasks
+
+ If all necessary tools are installed and set up, you can use ant with a couple of targets.
+ The default target if you just run "ant" is "build", like running "ant build".
+
+ - build build the jEdit JAR-file with full debug-information
+ builds jEdit in the build-folder, configured in build.properties,
+ with full debug information included.
+
+ - build-exe-launcher build the EXE launcher
+ builds the EXE launcher in the build-folder, configured in build.properties.
+
+ - run run jEdit
+ runs the jEdit-version in the build-folder, configured in build.properties.
+ If there isn't any, it builds it in front of execution.
+
+ - run-debug run jEdit with debug listening enabled
+ runs the jEdit-version in the build-folder, configured in build.properties.
+ If there isn't any, it builds it in front of execution.
+ The debug listening for this JVM is enabled.
+
+ - docs-html generate HTML docs (needs xsltproc)
+ builds the online help in HTML-format in the build-folder, configured in build.properties.
+
+ - docs-javadoc generate JavaDoc API docs
+ builds the API documentation in the build-folder, configured in build.properties.
+
+ - docs-pdf-USletter generate PDF users-guide with US letter paper size (needs xsltproc and fop)
+ builds the User's Guide in PDF-format with US letter page size
+ in the build-folder, configured in build.properties.
+
+ - docs-pdf-a4 generate PDF users-guide with A4 paper size (needs xsltproc and fop)
+ builds the User's Guide in PDF-format with A4 page size
+ in the build-folder, configured in build.properties.
+
+ - dist build all distribution files
+ builds all distribution files or prepares the final step for some of them (Win and Mac)
+ in the dist-folder, configured in build.properties.
+
+ - dist-deb build the DEB Package
+ builds the DEB Debian package in the dist-folder, configured in build.properties.
+
+ - dist-java build the Java-installer
+ builds the Java installer in the dist-folder, configured in build.properties.
+
+ - dist-mac build the Mac OS X disk image (DMG-file)
+ builds the Mac OS X internet-enabled disk image (DMG-file) if building on a box
+ running Mac OS X. If building on a box running something else, there will be a file
+ called jedit<version_here>-dist-mac-finish.tar.bz2 in the dist-folder,
+ configured in build.properties. Give that to someone running Mac OS X and ask him
+ to extract the archive and to execute "ant dist-mac-finish".
+ The only thing that needs to be installed for this final step is Apache Ant.
+
+ - dist-mac-finish finish building the Mac OS X disk image (DMG-file) on Mac OS X
+ builds the Mac OS X internet-enabled disk image (DMG-file) in the dist-folder,
+ configured in build.properties if building on a box running Mac OS X.
+ This target is normally only run directly, if someone just has to do
+ the final step that was prepared by "dist-mac" or "dist".
+
+ - dist-manuals build the PDF-manuals
+ builds the User's Guide in PDF-format with both, USletter and A4 page size
+ in the dist-folder, configured in build.properties.
+
+ - dist-slackware build the Slackware Package
+ builds the Slackware TGZ package in the dist-folder, configured in build.properties.
+
+ - dist-src build the src-archive
+ builds the source package in the dist-folder, configured in build.properties.
+
+ - dist-win build the Windows installer (EXE-file)
+ builds the windows installer in the dist-folder, configured in build.properties,
+ on a box running Windows. If building on a box running something else, there will be
+ a file called jedit<version_here>-dist-win-finish.tar.bz2 in the dist-folder,
+ configured in build.properties. Give that to someone running Windows and ask him
+ to extract the archive and to execute "ant dist-win-finish".
+ The only things that need to be installed for this final step is Apache Ant
+ and Inno Setup. Prior to running "ant dist-win-finish", the helper has to set
+ up the build.properties file with the path to his Inno Setup installation.
+
+ - dist-win-finish finish building the Windows installer (EXE-file) on Windows or via wine
+ build the windows installer in the dist-folder, configured in build.properties if
+ building on a box running Windows or via wine. This target is normally only run directly, if
+ someone just has to do the final step that was prepared by "dist-win" or "dist".
+
+ - clean clean up build.dir and dist.dir
+ cleans up the temporary files from the build- and dist-folder, configured in build.properties.
+ Leaves the runnable jEdit, and the distribution files in place.
+
+ - clean-all clean up build.dir and dist.dir completely
+ cleans up all files from the build- and dist-folder, configured in build.properties,
+ and the folders itself too.
+
+
+
+* Interesting algorithms and tricks
+
+ - org.gjt.sp.jedit.browser.VFSDirectoryEntryTable: a tree table control.
+
+ - org.gjt.sp.jedit.buffer.LineManager: the "gap" optimization allows
+ update operations to be performed in O(1) time in certain
+ circumstances.
+
+ - org.gjt.sp.jedit.buffer.KillRing: uses a hash to speed up comparisons
+ with sets of strings.
+
+ - org.gjt.sp.jedit.search.BoyerMooreSearchMatcher: fast text search.
+
+ - org.gjt.sp.jedit.syntax.TokenMarker: generic tokenizer driven by rules
+ defined in an XML file.
+
+ - org.gjt.sp.jedit.textarea.DisplayManager: the fold visibility map
+ looks like an RLE-compressed bit set but does lookups in O(log n).
+
+ - org.gjt.sp.util.WorkThreadPool: a pool of threads executing requests
+ from a queue, enforcing various concurrency requirements.
+
+
+
+* Tips for Eclipse/NetBeans/IDE users:
+
+Some of the source directories are only needed for building packages on
+certain platforms. If you add jEdit source to an IDE like Eclipse that tries
+to build everything, you'll get some errors from these directories unless
+you have the right libraries. However, if you tell Eclipse to exclude these
+directories, you can still build and run/debug jEdit from source.
+Follow these steps:
+
+ - Project properties - Java build path
+ - Source - Excluded dirs - Edit - Add multiple
+ - Add these subdirs: jars, net, de, build
+
+The "eclipse-formatting.xml" file can be used to set the
+code format style to be the same as what is currently used here.
diff --git a/jEdit/build.properties.sample b/jEdit/build.properties.sample
index 32e3e05..010a669 100644
--- a/jEdit/build.properties.sample
+++ b/jEdit/build.properties.sample
@@ -1,62 +1,106 @@
-###
-### Build property file for jEdit
-###
-
-### The directory where to put the build-files
-### Use a directory exclusive used for that,
-### because the target "clean-all" will delete
-### it with all its content. (So don't use your
-### home-directory or your project-directory
-### if you don't want to loose all your files!)
-### This has to be a relative directory.
-#build.dir=build
-
-### The directory where to put the distribution-files
-### Use a directory exclusive used for that,
-### because the target "clean-all" will delete
-### it with all its content. (So don't use your
-### home-directory or your project-directory
-### if you don't want to loose all your files!)
-### This has to be a relative directory.
-#dist.dir=dist
-
-### The name of the Inno Setup command line compiler
-### executable for building the Windows installer.
-#innosetup.compiler.executable=C:\\Programme\\Inno Setup 5\\ISCC.exe
-
-# If xsltproc is in your path, uncomment this:
-#xsltproc.executable=xsltproc
-
-### For generating the docs, adjust the following to your local paths
-### For xsltproc to work, the path to the DocBook stuff MUST NOT contain spaces!
-
-# cygwin "docbook-xml44" and "docbook-xsl" packages
-# can be used to install docbook-xml and docbook-dtd
-# (example windows locations):
-#docbook.catalog=c:/cygwin/usr/share/xml/docbook/4.4/docbook.cat
-#docbook.xsl=c:/cygwin/usr/share/docbook-xsl
-#xsltproc.executable=C:/cygwin/usr/bin/xsltproc.exe
-
-# Example Debian locations
-#docbook.xsl=/usr/share/xml/docbook/stylesheet/nwalsh
-#docbook.catalog=/usr/share/xml/docbook/schema/dtd/4.4/docbook.cat
-
-# Example Fink (Mac OS/X) locations
-#docbook.catalog=/sw/share/xml/dtd/docbookx/4.4.0/docbook.cat
-#docbook.xsl=/sw/share/xml/xsl/docbook-xsl
-
-### For uploading the docs to the public webserver
-### adjust the following to your local path
-#rsync.executable=C:\\Programme\\cwRsync\\bin\\rsync.exe
-# If it's in your path, this is sufficient:
-#rsync.executable=rsync
-
-### If you want to build the PDF user's guide,
-### set this to your local FOP install directory.
-### (the above three properties are needed also)
-#fop.dir=C:\\Programme\\FOP
-
-# debug settings
-build.debug=true
-build.debuglevel=lines,vars,source
-
+###
+### Build property file for jEdit
+###
+
+### The directory where to put the build-files
+### Use a directory exclusive used for that,
+### because the target "clean-all" will delete
+### it with all its content. (So don't use your
+### home-directory or your project-directory
+### if you don't want to loose all your files!)
+### This has to be a relative directory.
+#build.dir=build
+
+### The directory where to put the distribution-files
+### Use a directory exclusive used for that,
+### because the target "clean-all" will delete
+### it with all its content. (So don't use your
+### home-directory or your project-directory
+### if you don't want to loose all your files!)
+### This has to be a relative directory.
+#dist.dir=dist
+
+### The name of the wine executable for building the Windows installer on *nix.
+#wine.executable=wine
+
+### The name of the winepath executable for translating paths for wine.
+#winepath.executable=winepath
+
+### The name of the Inno Setup command line compiler
+### executable for building the Windows installer.
+
+# Example Windows location
+#innosetup.compiler.executable=C:\\Program Files\\Inno Setup 5\\ISCC.exe
+
+# Example wine location
+#innosetup.compiler.executable=/home/vampire/.wine/drive_c/Program Files/Inno Setup 5/ISCC.exe
+#innosetup.via.wine=true
+
+### For generating the docs, adjust the following to your local paths
+### Prefer xml over sgml packages if available.
+### For xsltproc to work, the path to the DocBook stuff MUST NOT contain spaces!
+### If you need multiple catalogs, then use a space as separator
+
+# Example Windows locations
+#xsltproc.executable=C:\\Programme\\xsltproc\\xsltproc.exe
+#docbook.xsl=C:\\Programme\\DocBook\\XSL\\1.75.2\\
+#docbook.catalog=C:\\Programme\\DocBook\\XML\\4.4\\catalog.xml
+
+# Example Cygwin locations
+#xsltproc.executable=C:\\cygwin\\usr\\bin\\xsltproc.exe
+#docbook.xsl=c:\\cygwin\\usr\\share\\docbook-xsl
+#docbook.catalog=c:\\cygwin\\usr\\share\\xml\\docbook\\4.4\\catalog.xml
+
+# Example Debian and Ubuntu locations
+#xsltproc.executable=xsltproc
+#docbook.xsl=/usr/share/xml/docbook/stylesheet/docbook-xsl
+#docbook.xsl=/usr/share/xml/docbook/stylesheet/nwalsh
+#docbook.catalog=/usr/share/xml/docbook/schema/dtd/4.4/catalog.xml
+
+# Example Fedora Core locations
+#xsltproc.executable=xsltproc
+#docbook.xsl=/usr/share/sgml/docbook/xsl-stylesheets
+#docbook.catalog=/usr/share/sgml/docbook/xml-dtd-4.4-1.0-48.fc12/catalog
+
+# Example Fink (Mac OS/X) locations
+#xsltproc.executable=xsltproc
+#docbook.catalog=/sw/share/xml/dtd/docbookx/4.4.0/docbook.cat
+#docbook.xsl=/sw/share/xml/xsl/docbook-xsl
+
+### For uploading the docs to the public webserver
+### adjust the following to your local path
+#rsync.executable=C:\\Programme\\cwRsync\\bin\\rsync.exe
+# If it's in your path, this is sufficient:
+#rsync.executable=rsync
+
+### If you want to build the PDF user's guide,
+### set this to your local FOP install directory.
+### (the above three properties are needed also)
+
+# Example Windows location
+#fop.dir=C:\\Programme\\FOP
+
+# Example Linux location
+#fop.dir=/opt/fop-1.0
+
+# Example Debian and Ubuntu location
+#fop.dir=/usr/share/java
+
+### For generating the Windows executable file, make sure to install
+### Launch4j and set the path to Launch4j install directory here
+
+# Example Windows location
+#launch4j.dir=C:\\Programme\\launch4j
+
+# Example Linux location
+#launch4j.dir=/opt/launch4j
+
+# debug settings
+#build.debug=true
+#build.debuglevel=lines,vars,source
+#docbook.catalog.debug=1
+
+# warning settings
+#build.nowarn=false
+#build.deprecation=true
+#build.compilerarg=-Xlint:unchecked
diff --git a/jEdit/build.xml b/jEdit/build.xml
index 5f543f6..c11e3d3 100644
--- a/jEdit/build.xml
+++ b/jEdit/build.xml
@@ -1,1475 +1,1628 @@
-<?xml version="1.0"?>
-<project name="jedit"
- default="build">
- <description>
- This is an ant build.xml file for building jEdit - Programmer's Text Editor.
- </description>
-
- <property file="build.properties"
- prefix="config" />
-
- <!-- jEdit Version -->
- <property name="jedit.version"
- value="4.3.2" />
- <property name="jedit.build.number"
- value="04.03.99.02" />
-
- <!-- Target Java Versions -->
- <property name="target.java.version"
- value="1.5" />
- <property name="mac.target.java.version"
- value="1.5+" />
- <property name="slackware.target.java.version"
- value="1_5_0_07-i586-1" />
-
- <!-- Various Paths -->
- <property name="config.build.dir"
- value="build" />
- <property name="config.dist.dir"
- value="dist" />
- <property name="build.dir"
- location="${config.build.dir}" />
- <property name="dist.dir"
- location="${config.dist.dir}" />
- <property name="classes.dir"
- location="${build.dir}/classes" />
- <property name="jar.location"
- location="${build.dir}" />
-
- <property name="textAreaPackage" location="../textarea" />
- <!-- Various Filenames -->
- <property name="jar.filename"
- value="${ant.project.name}.jar" />
- <property name="dist.jar.filename"
- value="jedit${jedit.version}install.jar" />
- <property name="manual.filename.prefix"
- value="jedit${jedit.version}manual-" />
- <property name="src.archive.filename"
- value="jedit${jedit.version}source.tar.bz2" />
- <property name="win.filename"
- value="jedit${jedit.version}install" />
- <property name="mac.disk.image.filename"
- value="jedit${jedit.version}install.dmg" />
-
- <!-- Miscellaneous -->
- <property name="config.build.debuglevel"
- value="lines,vars,source" />
- <property name="config.build.deprecation"
- value="true" />
- <property name="config.build.compilerarg"
- value="-Xlint:unchecked" />
-
- <!-- Cygwin detection (xsltproc needs special arguments) -->
- <dirname property="xsltproc.dir" file="${config.xsltproc.executable}" />
- <available file="${xsltproc.dir}/cygcheck.exe" property="xsltproc.cygwin" />
- <condition property="xsltproc.cygwin.arg" value="--path /usr/share/docbook-xsl/html/" else="">
- <isset property="xsltproc.cygwin" />
- </condition>
-
- <target name="init"
- unless="init.done">
- <echo message="Buildfile for ${ant.project.name} (${ant.file})"
- level="info" />
- <fail message="The ant-optional package is needed for jEdit to build, please install it and rerun">
- <condition>
- <not>
- <available classname="org.apache.tools.ant.taskdefs.optional.depend.Depend" />
- </not>
- </condition>
- </fail>
- <property name="init.done"
- value="true" />
- </target>
-
- <target name="clean"
- depends="init"
- description="clean up intermediate files">
- <delete includeemptydirs="true"
- failonerror="false">
- <fileset dir="${build.dir}/classes" />
- <fileset dir="${dist.dir}/classes" />
- <fileset dir="doc"
- includes="docbook-wrapper-*.xsl" />
- </delete>
- </target>
-
- <target name="clean-all"
- depends="init"
- description="clean up build.dir and dist.dir completely">
- <delete includeemptydirs="true"
- failonerror="false">
- <fileset dir="${build.dir}" />
- <fileset dir="${dist.dir}" />
- <fileset dir="${textAreaPackage}/build" />
- <fileset dir="doc"
- includes="docbook-wrapper-*.xsl" />
- </delete>
- </target>
-
- <target name="compile"
- depends="init">
- <mkdir dir="${classes.dir}/core" />
- <depend srcDir="."
- destDir="${classes.dir}/core"
- cache="${classes.dir}" />
- <javac srcdir="."
- destdir="${classes.dir}/core"
- debug="true"
- debuglevel="${config.build.debuglevel}"
- deprecation="${config.build.deprecation}"
- source="${target.java.version}"
- target="${target.java.version}"
- compiler="modern"
- encoding="UTF-8">
- <include name="org/**" />
- <include name="com/**" />
- <compilerarg line="${config.build.compilerarg}" />
- </javac>
- </target>
-
- <target name="prepare-textArea"
- depends="init">
- <delete includeemptydirs="true"
- failonerror="false">
- <fileset dir="${textAreaPackage}/src"/>
- </delete>
-
- <mkdir dir="${textAreaPackage}/src" />
- <copy todir="${textAreaPackage}/src">
- <fileset dir=".">
- <include name="modes/*"/>
- <include name="org/gjt/sp/jedit/bsh/*"/>
- <include name="org/gjt/sp/jedit/bsh/**/*"/>
-
- <include name="org/gjt/sp/jedit/buffer/BufferAdapter.java"/>
- <include name="org/gjt/sp/jedit/buffer/BufferListener.java"/>
- <include name="org/gjt/sp/jedit/buffer/BufferSegment.java"/>
- <include name="org/gjt/sp/jedit/buffer/ContentManager.java"/>
- <include name="org/gjt/sp/jedit/buffer/DefaultFoldHandlerProvider.java"/>
- <include name="org/gjt/sp/jedit/buffer/DummyFoldHandler.java"/>
- <include name="org/gjt/sp/jedit/buffer/ExplicitFoldHandler.java"/>
- <include name="org/gjt/sp/jedit/buffer/FoldHandler.java"/>
- <include name="org/gjt/sp/jedit/buffer/FoldHandlerProvider.java"/>
- <include name="org/gjt/sp/jedit/buffer/IndentFoldHandler.java"/>
- <include name="org/gjt/sp/jedit/buffer/JEditBuffer.java"/>
- <include name="org/gjt/sp/jedit/buffer/KillRing.java"/>
- <include name="org/gjt/sp/jedit/buffer/LineManager.java"/>
- <include name="org/gjt/sp/jedit/buffer/PositionManager.java"/>
- <include name="org/gjt/sp/jedit/buffer/UndoManager.java"/>
-
- <include name="org/gjt/sp/jedit/gui/KeyEventTranslator.java"/>
- <include name="org/gjt/sp/jedit/gui/KeyEventWorkaround.java"/>
- <include name="org/gjt/sp/jedit/gui/MutableListModel.java"/>
- <include name="org/gjt/sp/jedit/gui/ShortcutPrefixActiveEvent.java"/>
- <include name="org/gjt/sp/jedit/gui/HistoryModel.java"/>
- <include name="org/gjt/sp/jedit/gui/HistoryModelSaver.java"/>
- <include name="org/gjt/sp/jedit/indent/*.java"/>
-
- <include name="org/gjt/sp/jedit/input/AbstractInputHandler.java"/>
- <include name="org/gjt/sp/jedit/input/DefaultInputHandlerProvider.java"/>
- <include name="org/gjt/sp/jedit/input/InputHandlerProvider.java"/>
- <include name="org/gjt/sp/jedit/input/TextAreaInputHandler.java"/>
-
- <include name="org/gjt/sp/jedit/syntax/*.java"/>
- <include name="org/gjt/sp/jedit/syntax/xmode.dtd"/>
-
- <include name="org/gjt/sp/jedit/textarea/Anchor.java"/>
- <include name="org/gjt/sp/jedit/textarea/AntiAlias.java"/>
- <include name="org/gjt/sp/jedit/textarea/BufferHandler.java"/>
- <include name="org/gjt/sp/jedit/textarea/ChunkCache.java"/>
- <include name="org/gjt/sp/jedit/textarea/DisplayManager.java"/>
- <include name="org/gjt/sp/jedit/textarea/ExtensionManager.java"/>
- <include name="org/gjt/sp/jedit/textarea/FastRepaintManager.java"/>
- <include name="org/gjt/sp/jedit/textarea/FirstLine.java"/>
- <include name="org/gjt/sp/jedit/textarea/FoldPainter.java"/>
- <include name="org/gjt/sp/jedit/textarea/Gutter.java"/>
- <include name="org/gjt/sp/jedit/textarea/GutterPopupHandler.java"/>
- <include name="org/gjt/sp/jedit/textarea/InputMethodSupport.java"/>
- <include name="org/gjt/sp/jedit/textarea/MouseActions.java"/>
- <include name="org/gjt/sp/jedit/textarea/MouseActionsProvider.java"/>
- <include name="org/gjt/sp/jedit/textarea/RangeMap.java"/>
- <include name="org/gjt/sp/jedit/textarea/Selection.java"/>
- <include name="org/gjt/sp/jedit/textarea/SelectionManager.java"/>
- <include name="org/gjt/sp/jedit/textarea/ScreenLineManager.java"/>
- <include name="org/gjt/sp/jedit/textarea/ScrollLayout.java"/>
- <include name="org/gjt/sp/jedit/textarea/ScrollLineCount.java"/>
- <include name="org/gjt/sp/jedit/textarea/ScrollListener.java"/>
- <include name="org/gjt/sp/jedit/textarea/StandaloneTextArea.java"/>
- <include name="org/gjt/sp/jedit/textarea/StatusListener.java"/>
- <include name="org/gjt/sp/jedit/textarea/StructureMatcher.java"/>
- <include name="org/gjt/sp/jedit/textarea/TextArea.java"/>
- <include name="org/gjt/sp/jedit/textarea/TextAreaBorder.java"/>
- <include name="org/gjt/sp/jedit/textarea/TextAreaDropHandler.java"/>
- <include name="org/gjt/sp/jedit/textarea/TextAreaException.java"/>
- <include name="org/gjt/sp/jedit/textarea/TextAreaExtension.java"/>
- <include name="org/gjt/sp/jedit/textarea/TextAreaMouseHandler.java"/>
- <include name="org/gjt/sp/jedit/textarea/TextAreaPainter.java"/>
- <include name="org/gjt/sp/jedit/textarea/textarea.actions.xml"/>
- <include name="org/gjt/sp/jedit/textarea/TriangleFoldPainter.java"/>
-
- <include name="org/gjt/sp/jedit/ActionListHandler.java"/>
- <include name="org/gjt/sp/jedit/BeanShellFacade.java"/>
- <include name="org/gjt/sp/jedit/Debug.java"/>
- <include name="org/gjt/sp/jedit/IPropertyManager.java"/>
- <include name="org/gjt/sp/jedit/JEditAbstractEditAction.java"/>
- <include name="org/gjt/sp/jedit/JEditActionSet.java"/>
- <include name="org/gjt/sp/jedit/JEditActionContext.java"/>
- <include name="org/gjt/sp/jedit/JEditBeanShellAction.java"/>
- <include name="org/gjt/sp/jedit/Mode.java"/>
- <include name="org/gjt/sp/jedit/OperatingSystem.java"/>
- <include name="org/gjt/sp/jedit/RegistersListener.java"/>
- <include name="org/gjt/sp/jedit/RegistersListener.java"/>
- <include name="org/gjt/sp/jedit/Registers.java"/>
- <include name="org/gjt/sp/jedit/RegisterSaver.java"/>
- <include name="org/gjt/sp/jedit/SelectionManager.java"/>
- <include name="org/gjt/sp/jedit/TextUtilities.java"/>
- <include name="org/gjt/sp/jedit/TextUtilities.java"/>
- <include name="org/gjt/sp/jedit/actions.dtd"/>
- <include name="org/gjt/sp/jedit/jedit.props"/>
- <include name="org/gjt/sp/jedit/jedit_keys.props"/>
- <include name="modes/*"/>
-
-
- <include name="org/gjt/sp/util/Log*.java"/>
- <include name="org/gjt/sp/util/IntegerArray.java"/>
- <include name="org/gjt/sp/util/IOUtilities.java"/>
- <include name="org/gjt/sp/util/ProgressObserver.java"/>
- <include name="org/gjt/sp/util/SegmentCharSequence.java"/>
- <include name="org/gjt/sp/util/StandardUtilities.java"/>
- <include name="org/gjt/sp/util/SyntaxUtilities.java"/>
- <include name="org/gjt/sp/util/XMLUtilities.java"/>
- </fileset>
- </copy>
-
- </target>
-
- <target name="compile-textArea"
- depends="init,prepare-textArea">
- <mkdir dir="${textAreaPackage}/build" />
- <javac srcdir="${textAreaPackage}/src"
- destdir="${textAreaPackage}/build"
- debug="true"
- debuglevel="${config.build.debuglevel}"
- deprecation="${config.build.deprecation}"
- source="${target.java.version}"
- target="${target.java.version}"
- compiler="modern"
- encoding="UTF-8">
- </javac>
- </target>
-
- <target name="build"
- depends="init,compile"
- description="build the jEdit JAR-file with full debug-information">
- <mkdir dir="${jar.location}" />
- <jar destfile="${jar.location}/${jar.filename}"
- basedir="${classes.dir}/core"
- compress="false"
- manifest="org/gjt/sp/jedit/jedit.manifest"
- duplicate="fail"
- index="true">
- <fileset dir=".">
- <include name="org/gjt/sp/jedit/bsh/commands/*.bsh" />
- <include name="org/gjt/sp/jedit/**/*.dtd" />
- <include name="org/gjt/sp/jedit/default.abbrevs" />
- <include name="org/gjt/sp/jedit/*.props" />
- <include name="org/gjt/sp/jedit/*.xml" />
- <include name="org/gjt/sp/jedit/textarea/*.xml" />
- <include name="org/gjt/sp/jedit/icons/**/*.gif" />
- <include name="org/gjt/sp/jedit/icons/**/*.jpg" />
- <include name="org/gjt/sp/jedit/icons/**/*.png" />
- </fileset>
- </jar>
- <copy todir="${jar.location}">
- <fileset dir=".">
- <include name="macros/**" />
- <include name="modes/**" />
- <include name="properties/**" />
- <include name="startup/**" />
- </fileset>
- </copy>
- </target>
-
- <target name="build-textArea"
- depends="init,compile-textArea"
- description="build the textArea JAR-file with full debug-information">
- <mkdir dir="${jar.location}" />
- <jar destfile="${jar.location}/${ant.project.name}-textArea.jar"
- compress="false"
- duplicate="fail"
- index="true">
- <fileset dir="${textAreaPackage}/build/" />
- <fileset dir="${textAreaPackage}/src">
- <include name="org/gjt/sp/jedit/textarea/*.xml"/>
- <include name="org/gjt/sp/jedit/syntax/xmode.dtd"/>
- <include name="org/gjt/sp/jedit/actions.dtd"/>
- <include name="org/gjt/sp/jedit/jedit.props"/>
- <include name="org/gjt/sp/jedit/jedit_keys.props"/>
- <include name="modes/*"/>
- </fileset>
- <manifest>
- <attribute name="Main-Class" value="org.gjt.sp.jedit.textarea.StandaloneTextArea"/>
- </manifest>
- </jar>
- </target>
-
- <target name="run"
- depends="init,build"
- description="run jEdit">
- <java jar="${jar.location}/${jar.filename}"
- fork="true"
- spawn="true"
- maxmemory="192M">
- <arg value="-settings=${build.dir}/settings" />
- </java>
- </target>
-
- <target name="run-debug"
- depends="init,build"
- description="run jEdit with debug listening enabled">
- <java jar="${jar.location}/${jar.filename}"
- fork="true"
- spawn="true"
- maxmemory="192M">
- <jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,address=localhost:5005,timeout=60000" />
- <arg value="-settings=${build.dir}/settings" />
- </java>
- </target>
-
- <target name="generate-docbook-wrapper"
- if="format"
- depends="init">
- <fail message="Please set the "docbook.xsl" in build.properties"
- unless="config.docbook.xsl" />
- <pathconvert property="absolute-stylesheet"
- dirsep="/">
- <path location="${config.docbook.xsl}/${stylesheet}" />
- </pathconvert>
- <echo message="<?xml version="1.0"?>${line.separator}"
- file="doc/docbook-wrapper-${format}.xsl"
- level="error" />
- <echo message="<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"${line.separator}"
- file="doc/docbook-wrapper-${format}.xsl"
- append="true"
- level="error" />
- <echo message=" version="1.0">${line.separator}"
- file="doc/docbook-wrapper-${format}.xsl"
- append="true"
- level="error" />
- <echo message=" <xsl:import href="file:///${absolute-stylesheet}" />${line.separator}"
- file="doc/docbook-wrapper-${format}.xsl"
- append="true"
- level="error" />
- <echo message="</xsl:stylesheet>${line.separator}"
- file="doc/docbook-wrapper-${format}.xsl"
- append="true"
- level="error" />
- </target>
-
- <target name="generate-doc-faq"
- depends="init"
- if="doc.output.location"
- unless="faq.is.up.to.date">
- <fail message="Please set the "xsltproc.executable" in build.properties"
- unless="config.xsltproc.executable" />
- <mkdir dir="${doc.output.location}/FAQ" />
- <exec executable="${config.xsltproc.executable}"
- dir="doc"
- failonerror="true">
- <arg line="${xsltproc.cygwin.arg}" />
- <arg value="--output" />
- <arg value="../${doc.output.location}/FAQ/" />
- <arg value="jedithtml.xsl" />
- <arg value="FAQ/faq.xml" />
- </exec>
- </target>
-
- <target name="generate-doc-news"
- depends="init"
- if="doc.output.location"
- unless="news.is.up.to.date">
- <fail message="Please set the "xsltproc.executable" in build.properties"
- unless="config.xsltproc.executable" />
- <mkdir dir="${doc.output.location}/news43" />
- <exec executable="${config.xsltproc.executable}"
- dir="doc"
- failonerror="true">
- <arg line="${xsltproc.cygwin.arg}" />
- <arg value="--output" />
- <arg value="../${doc.output.location}/news43/" />
- <arg value="jedithtml.xsl" />
- <arg value="news43/news.xml" />
- </exec>
- </target>
-
- <target name="generate-doc-users-guide"
- depends="init"
- if="doc.output.location"
- unless="users-guide.is.up.to.date">
- <fail message="Please set the "xsltproc.executable" in build.properties"
- unless="config.xsltproc.executable" />
- <mkdir dir="${doc.output.location}/users-guide" />
- <exec executable="${config.xsltproc.executable}"
- dir="doc"
- failonerror="true">
- <arg line="${xsltproc.cygwin.arg}" />
- <arg value="--output" />
- <arg value="../${doc.output.location}/users-guide/" />
- <arg value="jedithtml.xsl" />
- <arg value="users-guide/users-guide.xml" />
- </exec>
- </target>
-
- <target name="userdocs"
- depends="init,docs-html,docs-javadoc"
- description="generate HTML and JavaDoc API docs (needs xsltproc)" />
-
- <target name="docs-upload"
- depends="userdocs"
- description="upload generated documentation to public website (needs xsltproc and rsync)" >
- <fail message="Please set the "rsync.executable" in build.properties"
- unless="config.rsync.executable" />
- <exec executable="${config.rsync.executable}"
- dir="${jar.location}/doc/"
- failonerror="true">
- <arg value="-avz" />
- <arg value="api" />
- <arg value="FAQ" />
- <arg value="users-guide" />
- <arg value="plugins.jedit.org:/home/groups/j/je/jedit/htdocs/" />
- </exec>
- </target>
-
- <target name="docs-html"
- depends="init"
- description="generate HTML docs (needs xsltproc)">
- <antcall target="generate-docbook-wrapper">
- <param name="format"
- value="html" />
- <param name="stylesheet"
- value="html/chunk.xsl" />
- </antcall>
- <pathconvert property="doc.output.location"
- dirsep="/">
- <path location="${jar.location}/doc" />
- <globmapper from="${basedir}/*"
- to="*"
- handledirsep="true" />
- </pathconvert>
- <dependset>
- <srcfileset dir="doc/FAQ" />
- <targetfileset dir="${doc.output.location}/FAQ" />
- </dependset>
- <available property="faq.is.up.to.date"
- file="${doc.output.location}/FAQ/toc.xml"
- type="file" />
- <antcall target="generate-doc-faq" />
- <dependset>
- <srcfileset dir="doc/news43" />
- <targetfileset dir="${doc.output.location}/news43" />
- </dependset>
- <available property="news.is.up.to.date"
- file="${doc.output.location}/news43/toc.xml"
- type="file" />
- <antcall target="generate-doc-news" />
- <dependset>
- <srcfileset dir="doc/users-guide" />
- <targetfileset dir="${doc.output.location}/users-guide" />
- </dependset>
- <available property="users-guide.is.up.to.date"
- file="${doc.output.location}/users-guide/toc.xml"
- type="file" />
- <antcall target="generate-doc-users-guide" />
- <delete file="doc/docbook-wrapper-html.xsl"
- failonerror="false" />
- <copy todir="${doc.output.location}">
- <fileset dir="doc">
- <include name="*.txt" />
- <include name="*.html" />
- <include name="*.png" />
- <include name="tips/**" />
- </fileset>
- </copy>
- </target>
-
- <target name="generate-javadoc"
- depends="init"
- unless="javadoc.is.up.to.date">
- <mkdir dir="${classes.dir}/javadoc" />
- <javac srcdir="."
- destdir="${classes.dir}/javadoc"
- includes="doclet/**"
- debug="true"
- debuglevel="${config.build.debuglevel}"
- deprecation="${config.build.deprecation}"
- source="${target.java.version}"
- target="${target.java.version}"
- compiler="modern">
- <compilerarg line="${config.build.compilerarg}" />
- </javac>
- <javadoc sourcepath="."
- destdir="${classes.dir}/javadoc/api"
- packagenames="org.*,com.*"
- classpath="${classes.dir}/core"
- doclet="doclet.GenerateTocXML"
- docletpath="${classes.dir}/javadoc"
- version="true"
- use="true"
- author="true"
- splitindex="true"
- locale="en"
- windowtitle="jEdit API"
- doctitle="jEdit API"
- failonerror="true"
- source="${target.java.version}">
- <group title="jEdit"
- packages="org.gjt.sp*" />
- <group title="Microstar XML Parser"
- packages="com.microstar.xml*" />
- </javadoc>
- </target>
-
- <target name="docs-javadoc"
- depends="init"
- description="generate JavaDoc API docs">
- <dependset>
- <srcfileset dir=".">
- <include name="doclet/**/*.java" />
- <include name="org/**/*.java" />
- <include name="org/**/package.html" />
- <include name="com/**/*.java" />
- <include name="com/**/package.html" />
- </srcfileset>
- <targetfileset dir="${classes.dir}/javadoc" />
- </dependset>
- <available property="javadoc.is.up.to.date"
- file="${classes.dir}/javadoc/api/toc.xml"
- type="file" />
- <antcall target="generate-javadoc" />
- <copy todir="${jar.location}/doc">
- <fileset dir="${classes.dir}/javadoc"
- includes="api/**"
- excludes="api/**/*.html" />
- </copy>
- <copy todir="${jar.location}/doc">
- <fileset dir="${classes.dir}/javadoc"
- includes="api/**/*.html" />
- <filterchain>
- <tokenfilter>
- <replacestring from="<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">"
- to="<TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev">" />
- </tokenfilter>
- <tokenfilter>
- <filetokenizer />
- <replaceregex pattern="(<SCRIPT type="text/javascript">.*?</SCRIPT>|onload=".*?")"
- flags="gs" />
- </tokenfilter>
- </filterchain>
- </copy>
- </target>
-
- <target name="generate-pdf-users-guide"
- depends="init"
- if="paper.type"
- unless="pdf-users-guide.is.up.to.date">
- <fail message="Please set the "xsltproc.executable" in build.properties"
- unless="config.xsltproc.executable" />
- <fail message="Please set the "fop.dir" in build.properties"
- unless="config.fop.dir" />
- <antcall target="generate-docbook-wrapper">
- <param name="format"
- value="fo" />
- <param name="stylesheet"
- value="fo/docbook.xsl" />
- </antcall>
- <pathconvert property="docs-pdf.classes.dir"
- dirsep="/">
- <path location="${classes.dir}/docs-pdf" />
- <globmapper from="${basedir}/*"
- to="*"
- handledirsep="true" />
- </pathconvert>
- <mkdir dir="${docs-pdf.classes.dir}" />
- <exec executable="${config.xsltproc.executable}"
- dir="doc"
- failonerror="true">
- <arg line="${xsltproc.cygwin.arg}" />
- <arg value="--stringparam" />
- <arg value="paper.type" />
- <arg value=""${paper.type}"" />
- <arg value="--output" />
- <arg value="../${docs-pdf.classes.dir}/${manual.filename.prefix}${manual.filename.paper.type}.fot" />
- <arg value="jeditfo.xsl" />
- <arg value="users-guide/users-guide.xml" />
- </exec>
- <delete file="doc/docbook-wrapper-fo.xsl"
- failonerror="false" />
- <taskdef name="fop"
- classname="org.apache.fop.tools.anttasks.Fop"
- classpath="${config.fop.dir}/build/fop.jar">
- <classpath>
- <fileset dir="${config.fop.dir}/lib"
- includes="*.jar" />
- </classpath>
- </taskdef>
- <fop fofile="${docs-pdf.classes.dir}/${manual.filename.prefix}${manual.filename.paper.type}.fot"
- outfile="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf"
- format="application/pdf"
- messagelevel="info" />
- </target>
-
- <target name="docs-pdf"
- depends="init"
- if="paper.type">
- <condition property="manual.filename.paper.type"
- value="a4">
- <equals arg1="A4"
- arg2="${paper.type}" />
- </condition>
- <condition property="manual.filename.paper.type"
- value="letter"
- else="${paper.type}">
- <equals arg1="USletter"
- arg2="${paper.type}" />
- </condition>
- <dependset>
- <srcfileset dir="doc/users-guide" />
- <targetfilelist dir="${classes.dir}/docs-pdf"
- files="${manual.filename.prefix}${manual.filename.paper.type}.fot" />
- <targetfilelist dir="${jar.location}"
- files="${manual.filename.prefix}${manual.filename.paper.type}.pdf" />
- </dependset>
- <available property="pdf-users-guide.is.up.to.date"
- file="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf"
- type="file" />
- <antcall target="generate-pdf-users-guide" />
- </target>
-
- <target name="docs-pdf-a4"
- depends="init"
- description="generate PDF users-guide with A4 paper size (needs xsltproc and fop)">
- <antcall target="docs-pdf">
- <param name="paper.type"
- value="A4" />
- </antcall>
- </target>
-
- <target name="docs-pdf-USletter"
- depends="init"
- description="generate PDF users-guide with US letter paper size (needs xsltproc and fop)">
- <antcall target="docs-pdf">
- <param name="paper.type"
- value="USletter" />
- </antcall>
- </target>
-
- <target name="compile-installer"
- depends="init">
- <mkdir dir="${classes.dir}/installer" />
- <depend srcDir="."
- destDir="${classes.dir}/installer"
- cache="${classes.dir}" />
- <javac srcdir="."
- destdir="${classes.dir}/installer"
- includes="installer/**"
- debug="true"
- debuglevel="${config.build.debuglevel}"
- deprecation="${config.build.deprecation}"
- source="${target.java.version}"
- target="${target.java.version}"
- compiler="modern">
- <compilerarg line="${config.build.compilerarg}" />
- </javac>
- </target>
-
- <target name="compile-default-plugins-for-dist"
- depends="init">
- <ant dir="jars/LatestVersion"
- target="dist"
- inheritAll="false">
- <property name="jedit.install.dir"
- value="${dist.dir}" />
- </ant>
- <ant dir="jars/LatestVersion"
- target="clean"
- inheritAll="false">
- <property name="jedit.install.dir"
- value="${dist.dir}" />
- </ant>
- <ant dir="jars/QuickNotepad"
- target="dist"
- inheritAll="false">
- <property name="jedit.install.dir"
- value="${dist.dir}" />
- </ant>
- <ant dir="jars/QuickNotepad"
- target="clean"
- inheritAll="false">
- <property name="jedit.install.dir"
- value="${dist.dir}" />
- </ant>
- <ant dir="jars/MacOSX"
- target="dist"
- inheritAll="false">
- <property name="jedit.install.dir"
- value="${dist.dir}" />
- </ant>
- <ant dir="jars/MacOSX"
- target="clean"
- inheritAll="false">
- <property name="jedit.install.dir"
- value="${dist.dir}" />
- </ant>
- </target>
-
- <target name="dist-java"
- depends="init"
- description="build the Java-installer">
- <antcall target="prepare-dist-files" />
- <tar destfile="${dist.dir}/jedit-macros.tar.bz2"
- compression="bzip2">
- <tarfileset id="jedit-macros"
- dir="${dist.dir}"
- includes="macros/**" />
- </tar>
- <tar destfile="${dist.dir}/jedit-program.tar.bz2"
- compression="bzip2">
- <tarfileset id="jedit-program"
- dir="${dist.dir}"
- includes="doc/**
- jars/LatestVersion.jar
- jars/QuickNotepad.jar
- modes/**
- properties/**
- startup/**
- ${jar.filename}"
- excludes="doc/api/**" />
- </tar>
- <tar destfile="${dist.dir}/jedit-mac.tar.bz2"
- compression="bzip2">
- <tarfileset id="jedit-mac"
- dir="${dist.dir}"
- includes="jars/MacOSX.jar" />
- </tar>
- <tar destfile="${dist.dir}/jedit-api.tar.bz2"
- compression="bzip2">
- <tarfileset id="jedit-api"
- dir="${dist.dir}"
- includes="doc/api/**" />
- </tar>
- <tar destfile="${dist.dir}/jedit-os2.tar.bz2"
- compression="bzip2">
- <tarfileset id="jedit-os2"
- dir="package-files/os2"
- includes="jedit.cmd" />
- </tar>
- <antcall target="compile-installer">
- <param name="config.build.debuglevel"
- value="lines,source" />
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- </antcall>
- <antcall target="compile-calculatesize">
- <param name="config.build.debuglevel"
- value="lines,source" />
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- </antcall>
- <taskdef name="calculatesize"
- classname="de.masters_of_disaster.ant.tasks.calculatesize.CalculateSize"
- classpath="${dist.dir}/classes/calculatesize" />
- <calculatesize realsizeproperty="jedit-macros.realsize"
- disksizeproperty="jedit-macros.disksize">
- <fileset refid="jedit-macros" />
- </calculatesize>
- <calculatesize realsizeproperty="jedit-program.realsize"
- disksizeproperty="jedit-program.disksize">
- <fileset refid="jedit-program" />
- </calculatesize>
- <calculatesize realsizeproperty="jedit-mac.realsize"
- disksizeproperty="jedit-mac.disksize">
- <fileset refid="jedit-mac" />
- </calculatesize>
- <calculatesize realsizeproperty="jedit-api.realsize"
- disksizeproperty="jedit-api.disksize">
- <fileset refid="jedit-api" />
- </calculatesize>
- <calculatesize realsizeproperty="jedit-os2.realsize"
- disksizeproperty="jedit-os2.disksize">
- <fileset refid="jedit-os2" />
- </calculatesize>
- <copy todir="${dist.dir}/classes/installer/installer"
- overwrite="true">
- <fileset file="installer/install.props" />
- <filterset>
- <filter token="jedit.version"
- value="${jedit.version}" />
- <filter token="jedit-macros.realsize"
- value="${jedit-macros.realsize}" />
- <filter token="jedit-macros.disksize"
- value="${jedit-macros.disksize}" />
- <filter token="jedit-program.realsize"
- value="${jedit-program.realsize}" />
- <filter token="jedit-program.disksize"
- value="${jedit-program.disksize}" />
- <filter token="jedit-mac.realsize"
- value="${jedit-mac.realsize}" />
- <filter token="jedit-mac.disksize"
- value="${jedit-mac.disksize}" />
- <filter token="jedit-api.realsize"
- value="${jedit-api.realsize}" />
- <filter token="jedit-api.disksize"
- value="${jedit-api.disksize}" />
- <filter token="jedit-os2.realsize"
- value="${jedit-os2.realsize}" />
- <filter token="jedit-os2.disksize"
- value="${jedit-os2.disksize}" />
- </filterset>
- </copy>
- <jar destfile="${dist.dir}/${dist.jar.filename}"
- basedir="${dist.dir}/classes/installer"
- compress="true"
- manifest="installer/install.mf"
- duplicate="fail"
- index="true">
- <fileset dir=".">
- <include name="installer/*.html" />
- </fileset>
- <fileset dir="${dist.dir}/classes/package-files/linux">
- <include name="jedit.1" />
- </fileset>
- <zipfileset dir="${dist.dir}"
- includes="jedit-api.tar.bz2
- jedit-mac.tar.bz2
- jedit-macros.tar.bz2
- jedit-os2.tar.bz2
- jedit-program.tar.bz2"
- prefix="installer" />
- </jar>
- <condition property="wipe.dist.files">
- <not>
- <isset property="config.dont.wipe.dist.files" />
- </not>
- </condition>
- <antcall target="dist-cleanup" />
- </target>
-
- <target name="dist-manuals"
- depends="init"
- description="build the PDF-manuals">
- <antcall target="docs-pdf-a4">
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- <param name="jar.location"
- location="${dist.dir}" />
- </antcall>
- <antcall target="docs-pdf-USletter">
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- <param name="jar.location"
- location="${dist.dir}" />
- </antcall>
- <condition property="wipe.dist.files">
- <not>
- <isset property="config.dont.wipe.dist.files" />
- </not>
- </condition>
- <antcall target="dist-cleanup" />
- </target>
-
- <target name="dist-src"
- depends="init"
- description="build the src-archive">
- <mkdir dir="${dist.dir}" />
- <tar destfile="${dist.dir}/${src.archive.filename}"
- compression="bzip2">
- <tarfileset dir="."
- excludes="${config.build.dir}/**
- ${config.dist.dir}/**
- **/build.properties
- doc/docbook-wrapper-*.xsl"
- prefix="jEdit/" />
- <tarfileset dir="../build-support"
- prefix="build-support/" />
- </tar>
- </target>
-
- <target name="compile-jarbundler"
- depends="init">
- <mkdir dir="${classes.dir}/jarbundler" />
- <depend srcDir="."
- destDir="${classes.dir}/jarbundler"
- cache="${classes.dir}" />
- <javac srcdir="."
- destdir="${classes.dir}/jarbundler"
- includes="net/**"
- debug="true"
- debuglevel="${config.build.debuglevel}"
- deprecation="${config.build.deprecation}"
- source="1.4"
- target="1.4"
- compiler="modern">
- <compilerarg line="${config.build.compilerarg}" />
- </javac>
- </target>
-
- <target name="dist-mac-finish"
- depends="init"
- unless="build.on.non.mac"
- description="finish building the Mac OS X disk image (DMG-file) on Mac OS X">
- <fail message="The disk image (DMG-file) for easy distribution on Mac OS X can only be built on Mac OS X currently">
- <condition>
- <not>
- <os family="mac" />
- </not>
- </condition>
- </fail>
- <taskdef name="jarbundler"
- classname="net.sourceforge.jarbundler.JarBundler"
- classpath="${dist.dir}/classes/jarbundler" />
- <tstamp>
- <format property="current.year"
- pattern="yyyy" />
- </tstamp>
- <mkdir dir="${dist.dir}/classes/mac" />
- <jarbundler dir="${dist.dir}/classes/mac"
- name="jEdit"
- mainclass="org.gjt.sp.jedit.jEdit"
- jar="${dist.dir}/${jar.filename}"
- arguments="-background"
- build="${jedit.build.number}"
- bundleid="org.gjt.sp.jedit"
- extraclasspath="/System/Library/Java"
- icon="icons/icon.icns"
- infostring="jEdit ${jedit.version}, Copyright © 1998-${current.year} Contributors"
- jvmversion="${mac.target.java.version}"
- shortname="jEdit"
- signature="JESP"
- stubfile="jedit"
- version="${jedit.version}"
- vmoptions="-Xmx192M">
- <javaproperty name="apple.awt.antialiasing" value="true" />
- <javaproperty name="apple.awt.textantialiasing" value="true" />
- <javaproperty name="apple.laf.useScreenMenuBar" value="true" />
- <!-- Comented due https://sourceforge.net/tracker/?func=detail&atid=100588&aid=2820535&group_id=588 discussion -->
- <!--javaproperty name="apple.awt.graphics.UseQuartz" value="true" />
- <javaproperty name="apple.awt.rendering" value="speed" /-->
- <javafileset dir="${dist.dir}"
- includes="doc/**
- jars/**
- macros/**
- modes/**
- properties/**
- startup/**" />
- <documenttype name="jEdit TEXT Document"
- extensions="*"
- ostypes="TEXT ****"
- iconfile="icons/file.icns"
- role="Editor" />
- <service message="openFile"
- menuitem="jEdit/Open Files"
- sendtypes="NSStringPboardType,NSFilenamesPboardType" />
- <service message="insertSelection"
- menuitem="jEdit/Insert Text"
- sendtypes="NSStringPboardType" />
- <service message="openSelection"
- menuitem="jEdit/New Buffer with Text"
- sendtypes="NSStringPboardType" />
- </jarbundler>
- <delete file="${dist.dir}/${mac.disk.image.filename}"
- failonerror="false" />
- <exec executable="hdiutil"
- failonerror="true">
- <arg value="create" />
- <arg value="-quiet" />
- <arg value="-volname" />
- <arg value="jEdit ${jedit.version}" />
- <arg value="-srcfolder" />
- <arg file="${dist.dir}/classes/mac/jEdit.app" />
- <arg file="${dist.dir}/${mac.disk.image.filename}" />
- </exec>
- <exec executable="hdiutil"
- failonerror="true">
- <arg value="internet-enable" />
- <arg value="-quiet" />
- <arg file="${dist.dir}/${mac.disk.image.filename}" />
- </exec>
- <condition property="wipe.dist.files">
- <not>
- <isset property="config.dont.wipe.dist.files" />
- </not>
- </condition>
- <antcall target="dist-cleanup" />
- </target>
-
- <target name="prepare-dist-mac-finish"
- depends="init"
- if="build.on.non.mac">
- <tar destfile="${dist.dir}/jedit${jedit.version}-dist-mac-finish.tar.bz2"
- basedir="."
- includes="build.xml
- icons/file.icns
- icons/icon.icns
- ${config.dist.dir}/${jar.filename}
- ${config.dist.dir}/classes/jarbundler/**
- ${config.dist.dir}/doc/**
- ${config.dist.dir}/jars/**
- ${config.dist.dir}/macros/**
- ${config.dist.dir}/modes/**
- ${config.dist.dir}/properties/**
- ${config.dist.dir}/startup/**"
- compression="bzip2" />
- </target>
-
- <target name="dist-mac"
- depends="init"
- description="build the Mac OS X disk image (DMG-file)">
- <antcall target="prepare-dist-files" />
- <antcall target="compile-jarbundler">
- <param name="config.build.debuglevel"
- value="lines,source" />
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- </antcall>
- <condition property="build.on.non.mac">
- <not>
- <os family="mac" />
- </not>
- </condition>
- <antcall target="dist-mac-finish">
- <param name="config.dont.wipe.dist.files"
- value="true" />
- </antcall>
- <antcall target="prepare-dist-mac-finish" />
- <condition property="wipe.dist.files">
- <not>
- <isset property="config.dont.wipe.dist.files" />
- </not>
- </condition>
- <antcall target="dist-cleanup" />
- </target>
-
- <target name="prepare-dist-files"
- depends="init">
- <antcall target="build">
- <param name="config.build.debuglevel"
- value="lines,source" />
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- <param name="jar.location"
- location="${dist.dir}" />
- </antcall>
- <antcall target="docs-html">
- <param name="config.build.debuglevel"
- value="lines,source" />
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- <param name="jar.location"
- location="${dist.dir}" />
- </antcall>
- <antcall target="docs-javadoc">
- <param name="config.build.debuglevel"
- value="lines,source" />
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- <param name="jar.location"
- location="${dist.dir}" />
- </antcall>
- <antcall target="compile-default-plugins-for-dist" />
- <copy todir="${dist.dir}/classes/package-files"
- overwrite="true">
- <fileset dir="package-files" />
- <filterset>
- <filter token="jar.filename"
- value="${jar.filename}" />
- <filter token="jedit.version"
- value="${jedit.version}" />
- <filter token="jedit.build.number"
- value="${jedit.build.number}" />
- <filter token="slackware.target.java.version"
- value="${slackware.target.java.version}" />
- </filterset>
- </copy>
- <gzip src="${dist.dir}/classes/package-files/linux/jedit.1"
- destfile="${dist.dir}/classes/package-files/linux/jedit.1.gz" />
- </target>
-
- <target name="dist-slackware"
- depends="init"
- description="build the Slackware Package">
- <antcall target="prepare-dist-files" />
- <tar destfile="${dist.dir}/jedit-${jedit.version}-noarch-1sao.tgz"
- compression="gzip">
- <tarfileset file="."
- username="root"
- group="root"
- fullpath="./" />
- <tarfileset dir="${dist.dir}/classes/package-files/linux/slackware"
- includes="doinst.sh
- slack-desc
- slack-required"
- username="root"
- group="root"
- prefix="install/" />
- <tarfileset file="${dist.dir}/classes/package-files/linux/jedit"
- mode="755"
- username="root"
- group="bin"
- fullpath="usr/bin/jedit" />
- <tarfileset dir="${dist.dir}/doc"
- includes="*.txt"
- username="root"
- group="root"
- prefix="usr/doc/jedit-${jedit.version}/" />
- <tarfileset file="${dist.dir}/classes/package-files/linux/jedit.1.gz"
- username="root"
- group="root"
- fullpath="usr/man/man1/jedit.1.gz" />
- <tarfileset file="${dist.dir}/classes/package-files/linux/slackware/jEdit.desktop"
- username="root"
- group="root"
- fullpath="usr/share/applications/jEdit.desktop" />
- <tarfileset dir="${dist.dir}"
- includes="doc/**
- jars/LatestVersion.jar
- jars/QuickNotepad.jar
- macros/**
- modes/**
- properties/**
- startup/**
- ${jar.filename}"
- username="root"
- group="root"
- prefix="usr/share/jedit-${jedit.version}/" />
- <tarfileset dir="icons"
- includes="jedit-file48.png
- jedit-icon48.png"
- username="root"
- group="root"
- prefix="usr/share/pixmaps/" />
- </tar>
- <condition property="wipe.dist.files">
- <not>
- <isset property="config.dont.wipe.dist.files" />
- </not>
- </condition>
- <antcall target="dist-cleanup" />
- </target>
-
- <target name="compile-ar"
- depends="init">
- <mkdir dir="${classes.dir}/ar" />
- <depend srcDir="."
- destDir="${classes.dir}/ar"
- cache="${classes.dir}" />
- <javac srcdir="."
- destdir="${classes.dir}/ar"
- includes="de/masters_of_disaster/ant/tasks/ar/**"
- debug="true"
- debuglevel="${config.build.debuglevel}"
- deprecation="${config.build.deprecation}"
- source="${target.java.version}"
- target="${target.java.version}"
- compiler="modern">
- <compilerarg line="${config.build.compilerarg}" />
- </javac>
- </target>
-
- <target name="compile-deb"
- depends="init">
- <mkdir dir="${classes.dir}/deb" />
- <depend srcDir="."
- destDir="${classes.dir}/deb"
- cache="${classes.dir}" />
- <javac srcdir="."
- destdir="${classes.dir}/deb"
- includes="de/masters_of_disaster/ant/tasks/deb/**"
- debug="true"
- debuglevel="${config.build.debuglevel}"
- deprecation="${config.build.deprecation}"
- source="${target.java.version}"
- target="${target.java.version}"
- compiler="modern">
- <compilerarg line="${config.build.compilerarg}" />
- </javac>
- </target>
-
- <target name="compile-calculatesize"
- depends="init">
- <mkdir dir="${classes.dir}/calculatesize" />
- <depend srcDir="."
- destDir="${classes.dir}/calculatesize"
- cache="${classes.dir}" />
- <javac srcdir="."
- destdir="${classes.dir}/calculatesize"
- includes="de/masters_of_disaster/ant/tasks/calculatesize/**"
- debug="true"
- debuglevel="${config.build.debuglevel}"
- deprecation="${config.build.deprecation}"
- source="${target.java.version}"
- target="${target.java.version}"
- compiler="modern">
- <compilerarg line="${config.build.compilerarg}" />
- </javac>
- </target>
-
- <target name="dist-deb"
- depends="init"
- description="build the DEB Package">
- <antcall target="prepare-dist-files" />
- <antcall target="compile-ar">
- <param name="config.build.debuglevel"
- value="lines,source" />
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- </antcall>
- <antcall target="compile-deb">
- <param name="config.build.debuglevel"
- value="lines,source" />
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- </antcall>
- <taskdef name="deb"
- classname="de.masters_of_disaster.ant.tasks.deb.Deb"
- classpath="${dist.dir}/classes/deb" />
- <antcall target="compile-calculatesize">
- <param name="config.build.debuglevel"
- value="lines,source" />
- <param name="classes.dir"
- location="${dist.dir}/classes" />
- </antcall>
- <taskdef name="calculatesize"
- classname="de.masters_of_disaster.ant.tasks.calculatesize.CalculateSize"
- classpath="${dist.dir}/classes/calculatesize" />
- <calculatesize realsizeproperty="deb.installed.size">
- <fileset dir="${dist.dir}/doc"
- includes="*.txt" />
- <fileset dir="${dist.dir}"
- includes="classes/package-files/linux/jedit
- classes/package-files/linux/deb/jedit
- classes/package-files/linux/deb/jedit.desktop
- classes/package-files/linux/jedit.1.gz
- doc/**
- jars/LatestVersion.jar
- jars/QuickNotepad.jar
- macros/**
- modes/**
- properties/**
- startup/**
- ${jar.filename}" />
- </calculatesize>
- <copy todir="${dist.dir}/classes/package-files/linux/deb"
- overwrite="true">
- <fileset file="package-files/linux/deb/control" />
- <filterset>
- <filter token="jedit.build.number"
- value="${jedit.build.number}" />
- <filter token="deb.installed.size"
- value="${deb.installed.size}" />
- </filterset>
- </copy>
- <deb destfile="${dist.dir}/jedit_${jedit.version}_all.deb"
- tempDir="${dist.dir}/classes/deb"
- deleteTempFiles="false"
- includeMd5sums="true">
- <controlfileset file="${dist.dir}/classes/package-files/linux/deb/control" />
- <controlfileset dir="${dist.dir}/classes/package-files/linux/deb"
- includes="postinst
- postrm"
- mode="755" />
- <datafileset file="."
- fullpath="usr/" />
- <datafileset file="."
- fullpath="usr/bin/" />
- <datafileset file="${dist.dir}/classes/package-files/linux/jedit"
- fullpath="usr/bin/jedit"
- mode="755" />
- <datafileset file="."
- fullpath="usr/lib/" />
- <datafileset file="."
- fullpath="usr/lib/menu/" />
- <datafileset file="${dist.dir}/classes/package-files/linux/deb/jedit"
- fullpath="usr/lib/menu/jedit" />
- <datafileset file="."
- fullpath="usr/share/" />
- <datafileset file="."
- fullpath="usr/share/applications/" />
- <datafileset file="${dist.dir}/classes/package-files/linux/deb/jedit.desktop"
- fullpath="usr/share/applications/jedit.desktop" />
- <datafileset file="."
- fullpath="usr/share/doc/" />
- <datafileset file="."
- fullpath="usr/share/doc/jEdit/" />
- <datafileset dir="${dist.dir}/doc"
- includes="*.txt"
- prefix="usr/share/doc/jEdit/" />
- <datafileset file="."
- fullpath="usr/share/jEdit/" />
- <datafileset dir="${dist.dir}"
- includes="doc/**
- macros/**
- modes/**
- properties/**
- startup/**
- ${jar.filename}"
- prefix="usr/share/jEdit/" />
- <datafileset file="."
- fullpath="usr/share/jEdit/jars/" />
- <datafileset dir="${dist.dir}/jars"
- includes="LatestVersion.jar
- QuickNotepad.jar"
- prefix="usr/share/jEdit/jars/" />
- <datafileset file="."
- fullpath="usr/share/man/" />
- <datafileset file="."
- fullpath="usr/share/man/man1/" />
- <datafileset file="${dist.dir}/classes/package-files/linux/jedit.1.gz"
- fullpath="usr/share/man/man1/jedit.1.gz" />
- </deb>
- <condition property="wipe.dist.files">
- <not>
- <isset property="config.dont.wipe.dist.files" />
- </not>
- </condition>
- <antcall target="dist-cleanup" />
- </target>
-
- <target name="dist-win-finish"
- depends="init"
- unless="build.on.non.win"
- description="finish building the Windows installer (EXE-file) on Windows">
- <fail message="The Windows installer (EXE-file) can only be built on Windows currently">
- <condition>
- <not>
- <os family="windows" />
- </not>
- </condition>
- </fail>
- <fail message="Please set the innosetup.compiler.executable in build.properties"
- unless="config.innosetup.compiler.executable" />
- <tstamp>
- <format property="current.year"
- pattern="yyyy" />
- </tstamp>
- <copy todir="${dist.dir}/classes/package-files/windows"
- overwrite="true">
- <fileset file="package-files/windows/win32installer.iss" />
- <filterset>
- <filter token="jar.filename"
- value="${jar.filename}" />
- <filter token="jedit.version"
- value="${jedit.version}" />
- <filter token="jedit.build.number"
- value="${jedit.build.number}" />
- <filter token="win.filename"
- value="${win.filename}" />
- <filter token="dist.dir"
- value="${dist.dir}" />
- <filter token="base.dir"
- value="${basedir}" />
- <filter token="current.year"
- value="${current.year}" />
- </filterset>
- </copy>
- <exec executable="${config.innosetup.compiler.executable}"
- failonerror="true">
- <arg file="${dist.dir}/classes/package-files/windows/win32installer.iss" />
- </exec>
- <condition property="wipe.dist.files">
- <not>
- <isset property="config.dont.wipe.dist.files" />
- </not>
- </condition>
- <antcall target="dist-cleanup" />
- </target>
-
- <target name="prepare-dist-win-finish"
- depends="init"
- if="build.on.non.win">
- <tar destfile="${dist.dir}/jedit${jedit.version}-dist-win-finish.tar.bz2"
- basedir="."
- includes="build.xml
- icons/jedit.ico
- icons/WindowsInstallerSmallImage.bmp
- icons/WindowsInstallerImage.bmp
- package-files/windows/win32installer.iss
- ${config.dist.dir}/${jar.filename}
- ${config.dist.dir}/classes/package-files/windows/**
- ${config.dist.dir}/doc/**
- ${config.dist.dir}/jars/LatestVersion.jar
- ${config.dist.dir}/jars/QuickNotepad.jar
- ${config.dist.dir}/macros/**
- ${config.dist.dir}/modes/**
- ${config.dist.dir}/properties/**
- ${config.dist.dir}/startup/**"
- compression="bzip2" />
- </target>
-
- <target name="dist-win"
- depends="init"
- description="build the Windows installer (EXE-file)">
- <antcall target="prepare-dist-files" />
- <condition property="build.on.non.win">
- <not>
- <os family="windows" />
- </not>
- </condition>
- <antcall target="dist-win-finish">
- <param name="config.dont.wipe.dist.files"
- value="true" />
- </antcall>
- <antcall target="prepare-dist-win-finish" />
- <condition property="wipe.dist.files">
- <not>
- <isset property="config.dont.wipe.dist.files" />
- </not>
- </condition>
- <antcall target="dist-cleanup" />
- </target>
-
- <target name="dist"
- depends="init"
- description="build all distribution files">
- <property name="config.dont.wipe.dist.files"
- value="true" />
- <antcall target="dist-java" />
- <antcall target="dist-manuals" />
- <antcall target="dist-src" />
- <antcall target="dist-slackware" />
- <antcall target="dist-deb" />
- <antcall target="dist-mac" />
- <antcall target="dist-win" />
- <property name="wipe.dist.files"
- value="true" />
- <antcall target="dist-cleanup" />
- </target>
-
- <target name="dist-cleanup"
- depends="init">
- <delete includeemptydirs="true">
- <fileset dir="${dist.dir}">
- <selector if="wipe.dist.files">
- <or>
- <filename name="macros/**" />
- <filename name="doc/**" />
- <filename name="jars/**" />
- <filename name="modes/**" />
- <filename name="properties/**" />
- <filename name="startup/**" />
- <filename name="${jar.filename}" />
- <and>
- <filename name="*.tar.bz2" />
- <filename name="${src.archive.filename}"
- negate="true" />
- <filename name="jedit${jedit.version}-dist-mac-finish.tar.bz2"
- negate="true" />
- <filename name="jedit${jedit.version}-dist-win-finish.tar.bz2"
- negate="true" />
- </and>
- <filename name="classes/**" />
- </or>
- </selector>
- </fileset>
- </delete>
- </target>
-</project>
+<?xml version="1.0"?>
+<project name="jedit"
+ default="build">
+ <description>
+ This is an ant build.xml file for building jEdit - Programmer's Text Editor.
+ </description>
+
+ <property file="build.properties"
+ prefix="config"/>
+
+ <!-- jEdit Version -->
+ <property name="jedit.version"
+ value="4.4.1"/>
+ <property name="jedit.build.number"
+ value="04.04.99.01"/>
+
+ <!-- Target Java Versions -->
+ <property name="target.java.version"
+ value="1.6"/>
+ <property name="mac.target.java.version"
+ value="1.6+"/>
+ <!-- based on http://packages.slackverse.org/?v=1&p=92 -->
+ <property name="slackware.target.java.version"
+ value="1_6_0_20-i586-1"/>
+
+ <!-- Various Paths -->
+ <property name="config.build.dir"
+ value="build"/>
+ <property name="config.dist.dir"
+ value="dist"/>
+ <property name="build.dir"
+ location="${config.build.dir}"/>
+ <property name="dist.dir"
+ location="${config.dist.dir}"/>
+ <property name="classes.dir"
+ location="${build.dir}/classes"/>
+ <property name="jar.location"
+ location="${build.dir}"/>
+ <property name="textAreaPackage"
+ location="../textarea"/>
+
+ <!-- Various Filenames -->
+ <property name="jar.filename"
+ value="${ant.project.name}.jar"/>
+ <property name="dist.jar.filename"
+ value="jedit${jedit.version}install.jar"/>
+ <property name="manual.filename.prefix"
+ value="jedit${jedit.version}manual-"/>
+ <property name="src.archive.filename"
+ value="jedit${jedit.version}source.tar.bz2"/>
+ <property name="win.filename"
+ value="jedit${jedit.version}install"/>
+ <property name="mac.disk.image.filename"
+ value="jedit${jedit.version}install.dmg"/>
+
+ <!-- Miscellaneous -->
+ <property name="config.build.debuglevel"
+ value="lines,vars,source"/>
+ <property name="config.build.nowarn"
+ value="false"/>
+ <property name="config.build.deprecation"
+ value="true"/>
+ <property name="config.build.compilerarg"
+ value="-Xlint:unchecked"/>
+ <property name="config.docbook.catalog.debug"
+ value="1"/>
+
+ <!-- Cygwin detection (xsltproc needs special arguments) -->
+ <dirname property="xsltproc.dir"
+ file="${config.xsltproc.executable}"/>
+ <condition property="xsltproc.cygwin.arg"
+ value="--path /usr/share/sgml/docbook/xsl-stylesheets/html/">
+ <and>
+ <available file="${xsltproc.dir}/cygcheck.exe"/>
+ <available file="${xsltproc.dir}/../usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl"/>
+ </and>
+ </condition>
+ <condition property="xsltproc.cygwin.arg"
+ value="--path /usr/share/docbook-xsl/html/">
+ <and>
+ <available file="${xsltproc.dir}/cygcheck.exe"/>
+ <available file="${xsltproc.dir}/../usr/share/docbook-xsl/html/docbook.xsl"/>
+ </and>
+ </condition>
+ <property name="xsltproc.cygwin.arg"
+ value=""/>
+
+ <target name="init"
+ unless="init.done">
+ <echo message="Buildfile for ${ant.project.name} (${ant.file})"
+ level="info"/>
+ <fail message="The ant-optional package is needed for jEdit to build, please install it and rerun">
+ <condition>
+ <not>
+ <available classname="org.apache.tools.ant.taskdefs.optional.depend.Depend"/>
+ </not>
+ </condition>
+ </fail>
+ <property name="init.done"
+ value="true"/>
+ </target>
+
+ <target name="clean"
+ depends="init"
+ description="clean up intermediate files">
+ <delete includeemptydirs="true"
+ failonerror="false">
+ <fileset dir="${build.dir}/classes"/>
+ <fileset dir="${dist.dir}/classes"/>
+ <fileset dir="doc"
+ includes="docbook-wrapper-*.xsl"/>
+ </delete>
+ </target>
+
+ <target name="clean-all"
+ depends="init"
+ description="clean up build.dir and dist.dir completely">
+ <delete includeemptydirs="true"
+ failonerror="false">
+ <fileset dir="${build.dir}"/>
+ <fileset dir="${dist.dir}"/>
+ <fileset dir="${textAreaPackage}/build"/>
+ <fileset dir="doc"
+ includes="docbook-wrapper-*.xsl"/>
+ </delete>
+ </target>
+
+ <target name="compile"
+ depends="init">
+ <mkdir dir="${classes.dir}/core"/>
+ <depend srcDir="."
+ destDir="${classes.dir}/core"
+ cache="${classes.dir}"/>
+ <javac srcdir="."
+ destdir="${classes.dir}/core"
+ debug="true"
+ debuglevel="${config.build.debuglevel}"
+ nowarn="${config.build.nowarn}"
+ deprecation="${config.build.deprecation}"
+ source="${target.java.version}"
+ target="${target.java.version}"
+ compiler="modern"
+ encoding="UTF-8"
+ includeAntRuntime="false">
+ <include name="org/**"/>
+ <include name="com/**"/>
+ <compilerarg line="${config.build.compilerarg}"/>
+ </javac>
+ </target>
+
+ <target name="prepare-textArea"
+ depends="init">
+ <delete includeemptydirs="true"
+ failonerror="false">
+ <fileset dir="${textAreaPackage}/src"/>
+ </delete>
+
+ <mkdir dir="${textAreaPackage}/src"/>
+ <copy todir="${textAreaPackage}/src">
+ <fileset dir=".">
+ <include name="modes/*"/>
+ <include name="org/gjt/sp/jedit/bsh/*"/>
+ <include name="org/gjt/sp/jedit/bsh/**/*"/>
+
+ <include name="org/gjt/sp/jedit/buffer/BufferAdapter.java"/>
+ <include name="org/gjt/sp/jedit/buffer/BufferListener.java"/>
+ <include name="org/gjt/sp/jedit/buffer/BufferSegment.java"/>
+ <include name="org/gjt/sp/jedit/buffer/ContentManager.java"/>
+ <include name="org/gjt/sp/jedit/buffer/DefaultFoldHandlerProvider.java"/>
+ <include name="org/gjt/sp/jedit/buffer/DummyFoldHandler.java"/>
+ <include name="org/gjt/sp/jedit/buffer/ExplicitFoldHandler.java"/>
+ <include name="org/gjt/sp/jedit/buffer/FoldHandler.java"/>
+ <include name="org/gjt/sp/jedit/buffer/FoldHandlerProvider.java"/>
+ <include name="org/gjt/sp/jedit/buffer/IndentFoldHandler.java"/>
+ <include name="org/gjt/sp/jedit/buffer/JEditBuffer.java"/>
+ <include name="org/gjt/sp/jedit/buffer/KillRing.java"/>
+ <include name="org/gjt/sp/jedit/buffer/LineManager.java"/>
+ <include name="org/gjt/sp/jedit/buffer/PositionManager.java"/>
+ <include name="org/gjt/sp/jedit/buffer/UndoManager.java"/>
+
+ <include name="org/gjt/sp/jedit/gui/KeyEventTranslator.java"/>
+ <include name="org/gjt/sp/jedit/gui/KeyEventWorkaround.java"/>
+ <include name="org/gjt/sp/jedit/gui/MutableListModel.java"/>
+ <include name="org/gjt/sp/jedit/gui/ShortcutPrefixActiveEvent.java"/>
+ <include name="org/gjt/sp/jedit/gui/HistoryModel.java"/>
+ <include name="org/gjt/sp/jedit/gui/HistoryModelSaver.java"/>
+
+ <include name="org/gjt/sp/jedit/indent/*.java"/>
+
+ <include name="org/gjt/sp/jedit/input/AbstractInputHandler.java"/>
+ <include name="org/gjt/sp/jedit/input/DefaultInputHandlerProvider.java"/>
+ <include name="org/gjt/sp/jedit/input/InputHandlerProvider.java"/>
+ <include name="org/gjt/sp/jedit/input/TextAreaInputHandler.java"/>
+
+ <include name="org/gjt/sp/jedit/syntax/*.java"/>
+ <include name="org/gjt/sp/jedit/syntax/xmode.dtd"/>
+
+ <include name="org/gjt/sp/jedit/datatransfer/JEditDataFlavor.java"/>
+ <include name="org/gjt/sp/jedit/datatransfer/JEditRichText.java"/>
+ <include name="org/gjt/sp/jedit/datatransfer/JEditTransferable.java"/>
+ <include name="org/gjt/sp/jedit/datatransfer/JEditTransferableService.java"/>
+ <include name="org/gjt/sp/jedit/datatransfer/RichJEditTextTransferableService.java"/>
+ <include name="org/gjt/sp/jedit/datatransfer/RichTextTransferable.java"/>
+ <include name="org/gjt/sp/jedit/datatransfer/StringTransferableService.java"/>
+ <include name="org/gjt/sp/jedit/datatransfer/TransferHandler.java"/>
+
+ <include name="org/gjt/sp/jedit/textarea/Anchor.java"/>
+ <include name="org/gjt/sp/jedit/textarea/AntiAlias.java"/>
+ <include name="org/gjt/sp/jedit/textarea/BufferHandler.java"/>
+ <include name="org/gjt/sp/jedit/textarea/ChunkCache.java"/>
+ <include name="org/gjt/sp/jedit/textarea/DisplayManager.java"/>
+ <include name="org/gjt/sp/jedit/textarea/ExtensionManager.java"/>
+ <include name="org/gjt/sp/jedit/textarea/FastRepaintManager.java"/>
+ <include name="org/gjt/sp/jedit/textarea/FirstLine.java"/>
+ <include name="org/gjt/sp/jedit/textarea/FoldPainter.java"/>
+ <include name="org/gjt/sp/jedit/textarea/Gutter.java"/>
+ <include name="org/gjt/sp/jedit/textarea/GutterPopupHandler.java"/>
+ <include name="org/gjt/sp/jedit/textarea/InputMethodSupport.java"/>
+ <include name="org/gjt/sp/jedit/textarea/MouseActions.java"/>
+ <include name="org/gjt/sp/jedit/textarea/MouseActionsProvider.java"/>
+ <include name="org/gjt/sp/jedit/textarea/RangeMap.java"/>
+ <include name="org/gjt/sp/jedit/textarea/Selection.java"/>
+ <include name="org/gjt/sp/jedit/textarea/SelectionManager.java"/>
+ <include name="org/gjt/sp/jedit/textarea/ScreenLineManager.java"/>
+ <include name="org/gjt/sp/jedit/textarea/ScrollLayout.java"/>
+ <include name="org/gjt/sp/jedit/textarea/ScrollLineCount.java"/>
+ <include name="org/gjt/sp/jedit/textarea/ScrollListener.java"/>
+ <include name="org/gjt/sp/jedit/textarea/StandaloneTextArea.java"/>
+ <include name="org/gjt/sp/jedit/textarea/StatusListener.java"/>
+ <include name="org/gjt/sp/jedit/textarea/StructureMatcher.java"/>
+ <include name="org/gjt/sp/jedit/textarea/TextArea.java"/>
+ <include name="org/gjt/sp/jedit/textarea/TextAreaBorder.java"/>
+ <include name="org/gjt/sp/jedit/textarea/TextAreaDropHandler.java"/>
+ <include name="org/gjt/sp/jedit/textarea/TextAreaException.java"/>
+ <include name="org/gjt/sp/jedit/textarea/TextAreaExtension.java"/>
+ <include name="org/gjt/sp/jedit/textarea/TextAreaMouseHandler.java"/>
+ <include name="org/gjt/sp/jedit/textarea/TextAreaPainter.java"/>
+ <include name="org/gjt/sp/jedit/textarea/textarea.actions.xml"/>
+ <include name="org/gjt/sp/jedit/textarea/TriangleFoldPainter.java"/>
+
+ <include name="org/gjt/sp/jedit/ActionListHandler.java"/>
+ <include name="org/gjt/sp/jedit/BeanShellFacade.java"/>
+ <include name="org/gjt/sp/jedit/Debug.java"/>
+ <include name="org/gjt/sp/jedit/IPropertyManager.java"/>
+ <include name="org/gjt/sp/jedit/JEditAbstractEditAction.java"/>
+ <include name="org/gjt/sp/jedit/JEditActionSet.java"/>
+ <include name="org/gjt/sp/jedit/JEditActionContext.java"/>
+ <include name="org/gjt/sp/jedit/JEditBeanShellAction.java"/>
+ <include name="org/gjt/sp/jedit/Mode.java"/>
+ <include name="org/gjt/sp/jedit/OperatingSystem.java"/>
+ <include name="org/gjt/sp/jedit/RegistersListener.java"/>
+ <include name="org/gjt/sp/jedit/Registers.java"/>
+ <include name="org/gjt/sp/jedit/RegisterSaver.java"/>
+ <include name="org/gjt/sp/jedit/SelectionManager.java"/>
+ <include name="org/gjt/sp/jedit/TextUtilities.java"/>
+ <include name="org/gjt/sp/jedit/actions.dtd"/>
+ <include name="org/gjt/sp/jedit/jedit.props"/>
+ <include name="org/gjt/sp/jedit/jedit_keys.props"/>
+
+ <include name="modes/*"/>
+
+ <include name="org/gjt/sp/util/Log*.java"/>
+ <include name="org/gjt/sp/util/IntegerArray.java"/>
+ <include name="org/gjt/sp/util/IOUtilities.java"/>
+ <include name="org/gjt/sp/util/ProgressObserver.java"/>
+ <include name="org/gjt/sp/util/SegmentCharSequence.java"/>
+ <include name="org/gjt/sp/util/StandardUtilities.java"/>
+ <include name="org/gjt/sp/util/Task.java"/>
+ <include name="org/gjt/sp/util/TaskManager.java"/>
+ <include name="org/gjt/sp/util/TaskListener.java"/>
+ <include name="org/gjt/sp/util/ThreadUtilities.java"/>
+ <include name="org/gjt/sp/util/SyntaxUtilities.java"/>
+ <include name="org/gjt/sp/util/XMLUtilities.java"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="compile-textArea"
+ depends="init,prepare-textArea">
+ <mkdir dir="${textAreaPackage}/build"/>
+ <javac srcdir="${textAreaPackage}/src"
+ destdir="${textAreaPackage}/build"
+ debug="true"
+ debuglevel="${config.build.debuglevel}"
+ nowarn="${config.build.nowarn}"
+ deprecation="${config.build.deprecation}"
+ source="${target.java.version}"
+ target="${target.java.version}"
+ compiler="modern"
+ encoding="UTF-8">
+ </javac>
+ </target>
+
+ <target name="build"
+ depends="init,compile"
+ description="build the jEdit JAR-file with full debug-information">
+ <mkdir dir="${jar.location}"/>
+ <jar destfile="${jar.location}/${jar.filename}"
+ basedir="${classes.dir}/core"
+ compress="false"
+ manifest="org/gjt/sp/jedit/jedit.manifest"
+ duplicate="fail"
+ index="true">
+ <fileset dir=".">
+ <include name="org/gjt/sp/jedit/bsh/commands/*.bsh"/>
+ <include name="org/gjt/sp/jedit/**/*.dtd"/>
+ <include name="org/gjt/sp/jedit/default.abbrevs"/>
+ <include name="org/gjt/sp/jedit/*.props"/>
+ <include name="org/gjt/sp/jedit/*.xml"/>
+ <include name="org/gjt/sp/jedit/textarea/*.xml"/>
+ <include name="org/gjt/sp/jedit/icons/**/*.gif"/>
+ <include name="org/gjt/sp/jedit/icons/**/*.jpg"/>
+ <include name="org/gjt/sp/jedit/icons/**/*.png"/>
+ </fileset>
+ </jar>
+ <copy todir="${jar.location}">
+ <fileset dir=".">
+ <include name="macros/**"/>
+ <include name="modes/**"/>
+ <include name="properties/**"/>
+ <include name="startup/**"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="build-exe-launcher"
+ depends="init,filter-package-files"
+ description="build the EXE launcher">
+ <fail message="Please set the property "launch4j.dir" in build.properties, you may find example values in build.properties.sample"
+ unless="config.launch4j.dir"/>
+ <taskdef name="launch4j"
+ classname="net.sf.launch4j.ant.Launch4jTask"
+ classpath="${config.launch4j.dir}/launch4j.jar"/>
+ <launch4j configFile="${classes.dir}/package-files/windows/jedit.launch4j.xml"
+ outfile="${jar.location}/jedit.exe"/>
+ </target>
+
+ <target name="build-textArea"
+ depends="init,compile-textArea"
+ description="build the textArea JAR-file with full debug-information">
+ <mkdir dir="${jar.location}"/>
+ <jar destfile="${jar.location}/${ant.project.name}-textArea.jar"
+ compress="false"
+ duplicate="fail"
+ index="true">
+ <fileset dir="${textAreaPackage}/build/"/>
+ <fileset dir="${textAreaPackage}/src">
+ <include name="org/gjt/sp/jedit/textarea/*.xml"/>
+ <include name="org/gjt/sp/jedit/syntax/xmode.dtd"/>
+ <include name="org/gjt/sp/jedit/actions.dtd"/>
+ <include name="org/gjt/sp/jedit/jedit.props"/>
+ <include name="org/gjt/sp/jedit/jedit_keys.props"/>
+ <include name="modes/*"/>
+ </fileset>
+ <manifest>
+ <attribute name="Main-Class"
+ value="org.gjt.sp.jedit.textarea.StandaloneTextArea"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="run"
+ depends="init,build"
+ description="run jEdit">
+ <java jar="${jar.location}/${jar.filename}"
+ fork="true"
+ spawn="true"
+ maxmemory="192M">
+ <arg value="-settings=${build.dir}/settings"/>
+ </java>
+ </target>
+
+ <target name="run-debug"
+ depends="init,build"
+ description="run jEdit with debug listening enabled">
+ <java jar="${jar.location}/${jar.filename}"
+ fork="true"
+ spawn="true"
+ maxmemory="192M">
+ <jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,address=localhost:5005,timeout=60000"/>
+ <arg value="-settings=${build.dir}/settings"/>
+ </java>
+ </target>
+
+ <target name="generate-docbook-wrapper"
+ if="format"
+ depends="init">
+ <fail message="Please set the property "docbook.xsl" in build.properties, you may find example values in build.properties.sample"
+ unless="config.docbook.xsl"/>
+ <pathconvert property="absolute-stylesheet"
+ dirsep="/">
+ <path location="${config.docbook.xsl}/${stylesheet}"/>
+ </pathconvert>
+ <echo message="<?xml version="1.0"?>${line.separator}"
+ file="doc/docbook-wrapper-${format}.xsl"
+ level="error"/>
+ <echo message="<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"${line.separator}"
+ file="doc/docbook-wrapper-${format}.xsl"
+ append="true"
+ level="error"/>
+ <echo message=" version="1.0">${line.separator}"
+ file="doc/docbook-wrapper-${format}.xsl"
+ append="true"
+ level="error"/>
+ <echo message=" <xsl:import href="file:///${absolute-stylesheet}" />${line.separator}"
+ file="doc/docbook-wrapper-${format}.xsl"
+ append="true"
+ level="error"/>
+ <echo message="</xsl:stylesheet>${line.separator}"
+ file="doc/docbook-wrapper-${format}.xsl"
+ append="true"
+ level="error"/>
+ </target>
+
+ <target name="generate-doc-faq"
+ depends="init"
+ if="doc.output.location"
+ unless="faq.is.up.to.date">
+ <fail message="Please set the property "xsltproc.executable" in build.properties, you may find example values in build.properties.sample"
+ unless="config.xsltproc.executable"/>
+ <fail message="Please set the property "docbook.catalog" in build.properties, you may find example values in build.properties.sample"
+ unless="config.docbook.catalog"/>
+ <mkdir dir="${doc.output.location}/FAQ"/>
+ <exec executable="${config.xsltproc.executable}"
+ dir="doc"
+ failonerror="true">
+ <arg line="${xsltproc.cygwin.arg}"/>
+ <arg value="--output"/>
+ <arg value="../${doc.output.location}/FAQ/"/>
+ <arg value="jedithtml.xsl"/>
+ <arg value="FAQ/faq.xml"/>
+ <env key="XML_CATALOG_FILES"
+ value="${config.docbook.catalog}"/>
+ <env key="XML_DEBUG_CATALOG"
+ value="${config.docbook.catalog.debug}"/>
+ </exec>
+ </target>
+
+ <target name="generate-doc-news"
+ depends="init"
+ if="doc.output.location"
+ unless="news.is.up.to.date">
+ <fail message="Please set the property "xsltproc.executable" in build.properties, you may find example values in build.properties.sample"
+ unless="config.xsltproc.executable"/>
+ <fail message="Please set the property "docbook.catalog" in build.properties, you may find example values in build.properties.sample"
+ unless="config.docbook.catalog"/>
+ <mkdir dir="${doc.output.location}/news44"/>
+ <exec executable="${config.xsltproc.executable}"
+ dir="doc"
+ failonerror="true">
+ <arg line="${xsltproc.cygwin.arg}"/>
+ <arg value="--output"/>
+ <arg value="../${doc.output.location}/news44/"/>
+ <arg value="jedithtml.xsl"/>
+ <arg value="news44/news.xml"/>
+ <env key="XML_CATALOG_FILES"
+ value="${config.docbook.catalog}"/>
+ <env key="XML_DEBUG_CATALOG"
+ value="${config.docbook.catalog.debug}"/>
+ </exec>
+ </target>
+
+ <target name="generate-doc-users-guide"
+ depends="init"
+ if="doc.output.location"
+ unless="users-guide.is.up.to.date">
+ <fail message="Please set the property "xsltproc.executable" in build.properties, you may find example values in build.properties.sample"
+ unless="config.xsltproc.executable"/>
+ <fail message="Please set the property "docbook.catalog" in build.properties, you may find example values in build.properties.sample"
+ unless="config.docbook.catalog"/>
+ <mkdir dir="${doc.output.location}/users-guide"/>
+ <exec executable="${config.xsltproc.executable}"
+ dir="doc"
+ failonerror="true">
+ <arg line="${xsltproc.cygwin.arg}"/>
+ <arg value="--output"/>
+ <arg value="../${doc.output.location}/users-guide/"/>
+ <arg value="jedithtml.xsl"/>
+ <arg value="users-guide/users-guide.xml"/>
+ <env key="XML_CATALOG_FILES"
+ value="${config.docbook.catalog}"/>
+ <env key="XML_DEBUG_CATALOG"
+ value="${config.docbook.catalog.debug}"/>
+ </exec>
+ </target>
+
+ <target name="userdocs"
+ depends="init,docs-html,docs-javadoc"
+ description="generate HTML and JavaDoc API docs (needs xsltproc)"/>
+
+ <target name="docs-upload"
+ depends="userdocs"
+ description="upload generated documentation to public website (needs xsltproc and rsync)">
+ <fail message="Please set the property "rsync.executable" in build.properties, you may find example values in build.properties.sample"
+ unless="config.rsync.executable"/>
+ <exec executable="${config.rsync.executable}"
+ dir="${jar.location}/doc/"
+ failonerror="true">
+ <arg value="-avz"/>
+ <arg value="api"/>
+ <arg value="FAQ"/>
+ <arg value="users-guide"/>
+ <arg value="plugins.jedit.org:/home/groups/j/je/jedit/htdocs/"/>
+ </exec>
+ </target>
+
+ <target name="docs-html"
+ depends="init"
+ description="generate HTML docs (needs xsltproc)">
+ <antcall target="generate-docbook-wrapper">
+ <param name="format"
+ value="html"/>
+ <param name="stylesheet"
+ value="html/chunk.xsl"/>
+ </antcall>
+ <pathconvert property="doc.output.location"
+ dirsep="/">
+ <path location="${jar.location}/doc"/>
+ <globmapper from="${basedir}/*"
+ to="*"
+ handledirsep="true"/>
+ </pathconvert>
+ <dependset>
+ <srcfileset dir="doc/FAQ"/>
+ <targetfileset dir="${doc.output.location}/FAQ"/>
+ </dependset>
+ <available property="faq.is.up.to.date"
+ file="${doc.output.location}/FAQ/toc.xml"
+ type="file"/>
+ <antcall target="generate-doc-faq"/>
+ <dependset>
+ <srcfileset dir="doc/news44"/>
+ <targetfileset dir="${doc.output.location}/news44"/>
+ </dependset>
+ <available property="news.is.up.to.date"
+ file="${doc.output.location}/news44/toc.xml"
+ type="file"/>
+ <antcall target="generate-doc-news"/>
+ <dependset>
+ <srcfileset dir="doc/users-guide"/>
+ <targetfileset dir="${doc.output.location}/users-guide"/>
+ </dependset>
+ <available property="users-guide.is.up.to.date"
+ file="${doc.output.location}/users-guide/toc.xml"
+ type="file"/>
+ <antcall target="generate-doc-users-guide"/>
+ <delete file="doc/docbook-wrapper-html.xsl"
+ failonerror="false"/>
+ <copy todir="${doc.output.location}">
+ <fileset dir="doc">
+ <include name="*.txt"/>
+ <include name="*.html"/>
+ <include name="*.png"/>
+ <include name="tips/**"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="generate-javadoc"
+ depends="init"
+ unless="javadoc.is.up.to.date">
+ <mkdir dir="${classes.dir}/javadoc"/>
+ <javac srcdir="."
+ destdir="${classes.dir}/javadoc"
+ includes="doclet/**"
+ debug="true"
+ debuglevel="${config.build.debuglevel}"
+ nowarn="${config.build.nowarn}"
+ deprecation="${config.build.deprecation}"
+ source="${target.java.version}"
+ target="${target.java.version}"
+ compiler="modern">
+ <compilerarg line="${config.build.compilerarg}"/>
+ </javac>
+ <javadoc sourcepath="."
+ destdir="${classes.dir}/javadoc/api"
+ packagenames="org.*,com.*"
+ classpath="${classes.dir}/core"
+ doclet="doclet.GenerateTocXML"
+ docletpath="${classes.dir}/javadoc"
+ version="true"
+ use="true"
+ author="true"
+ splitindex="true"
+ locale="en"
+ windowtitle="jEdit API"
+ doctitle="jEdit API"
+ failonerror="true"
+ source="${target.java.version}">
+ <group title="jEdit"
+ packages="org.gjt.sp*"/>
+ <group title="BeanShell"
+ packages="org.gjt.sp.jedit.bsh*"/>
+ </javadoc>
+ </target>
+
+ <target name="docs-javadoc"
+ depends="init"
+ description="generate JavaDoc API docs">
+ <dependset>
+ <srcfileset dir=".">
+ <include name="doclet/**/*.java"/>
+ <include name="org/**/*.java"/>
+ <include name="org/**/package.html"/>
+ <include name="com/**/*.java"/>
+ <include name="com/**/package.html"/>
+ </srcfileset>
+ <targetfileset dir="${classes.dir}/javadoc"/>
+ </dependset>
+ <available property="javadoc.is.up.to.date"
+ file="${classes.dir}/javadoc/api/toc.xml"
+ type="file"/>
+ <antcall target="generate-javadoc"/>
+ <copy todir="${jar.location}/doc">
+ <fileset dir="${classes.dir}/javadoc"
+ includes="api/**"
+ excludes="api/**/*.html"/>
+ </copy>
+ <copy todir="${jar.location}/doc">
+ <fileset dir="${classes.dir}/javadoc"
+ includes="api/**/*.html"/>
+ <filterchain>
+ <tokenfilter>
+ <replacestring
+ from="<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">"
+ to="<TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev">"/>
+ </tokenfilter>
+ <tokenfilter>
+ <filetokenizer/>
+ <replaceregex
+ pattern="(<SCRIPT type="text/javascript">.*?</SCRIPT>|onload=".*?")"
+ flags="gs"/>
+ </tokenfilter>
+ </filterchain>
+ </copy>
+ </target>
+
+ <target name="generate-pdf-users-guide"
+ depends="init"
+ if="paper.type"
+ unless="pdf-users-guide.is.up.to.date">
+ <fail message="Please set the property "xsltproc.executable" in build.properties, you may find example values in build.properties.sample"
+ unless="config.xsltproc.executable"/>
+ <fail message="Please set the property "fop.dir" in build.properties, you may find example values in build.properties.sample"
+ unless="config.fop.dir"/>
+ <antcall target="generate-docbook-wrapper">
+ <param name="format"
+ value="fo"/>
+ <param name="stylesheet"
+ value="fo/docbook.xsl"/>
+ </antcall>
+ <pathconvert property="docs-pdf.classes.dir"
+ dirsep="/">
+ <path location="${classes.dir}/docs-pdf"/>
+ <globmapper from="${basedir}/*"
+ to="*"
+ handledirsep="true"/>
+ </pathconvert>
+ <mkdir dir="${docs-pdf.classes.dir}"/>
+ <exec executable="${config.xsltproc.executable}"
+ dir="doc"
+ failonerror="true">
+ <arg line="${xsltproc.cygwin.arg}"/>
+ <arg value="--stringparam"/>
+ <arg value="paper.type"/>
+ <arg value="${paper.type}"/>
+ <arg value="--output"/>
+ <arg value="../${docs-pdf.classes.dir}/${manual.filename.prefix}${manual.filename.paper.type}.fot"/>
+ <arg value="jeditfo.xsl"/>
+ <arg value="users-guide/users-guide.xml"/>
+ </exec>
+ <delete file="doc/docbook-wrapper-fo.xsl"
+ failonerror="false"/>
+ <taskdef name="fop"
+ classname="org.apache.fop.tools.anttasks.Fop">
+ <classpath>
+ <fileset dir="${config.fop.dir}"
+ includes="build/fop.jar
+ lib/*.jar
+ *.jar"/>
+ </classpath>
+ </taskdef>
+ <fop fofile="${docs-pdf.classes.dir}/${manual.filename.prefix}${manual.filename.paper.type}.fot"
+ outfile="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf"
+ format="application/pdf"
+ messagelevel="info"/>
+ </target>
+
+ <target name="docs-pdf"
+ depends="init"
+ if="paper.type">
+ <condition property="manual.filename.paper.type"
+ value="a4">
+ <equals arg1="A4"
+ arg2="${paper.type}"/>
+ </condition>
+ <condition property="manual.filename.paper.type"
+ value="letter"
+ else="${paper.type}">
+ <equals arg1="USletter"
+ arg2="${paper.type}"/>
+ </condition>
+ <dependset>
+ <srcfileset dir="doc/users-guide"/>
+ <targetfilelist dir="${classes.dir}/docs-pdf"
+ files="${manual.filename.prefix}${manual.filename.paper.type}.fot"/>
+ <targetfilelist dir="${jar.location}"
+ files="${manual.filename.prefix}${manual.filename.paper.type}.pdf"/>
+ </dependset>
+ <available property="pdf-users-guide.is.up.to.date"
+ file="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf"
+ type="file"/>
+ <antcall target="generate-pdf-users-guide"/>
+ </target>
+
+ <target name="docs-pdf-a4"
+ depends="init"
+ description="generate PDF users-guide with A4 paper size (needs xsltproc and fop)">
+ <antcall target="docs-pdf">
+ <param name="paper.type"
+ value="A4"/>
+ </antcall>
+ </target>
+
+ <target name="docs-pdf-USletter"
+ depends="init"
+ description="generate PDF users-guide with US letter paper size (needs xsltproc and fop)">
+ <antcall target="docs-pdf">
+ <param name="paper.type"
+ value="USletter"/>
+ </antcall>
+ </target>
+
+ <target name="compile-installer"
+ depends="init">
+ <mkdir dir="${classes.dir}/installer"/>
+ <depend srcDir="."
+ destDir="${classes.dir}/installer"
+ cache="${classes.dir}"/>
+ <javac srcdir="."
+ destdir="${classes.dir}/installer"
+ includes="installer/**"
+ debug="true"
+ debuglevel="${config.build.debuglevel}"
+ nowarn="${config.build.nowarn}"
+ deprecation="${config.build.deprecation}"
+ source="${target.java.version}"
+ target="${target.java.version}"
+ compiler="modern">
+ <compilerarg line="${config.build.compilerarg}"/>
+ </javac>
+ </target>
+
+ <target name="compile-default-plugins-for-dist"
+ depends="init">
+ <ant dir="jars/QuickNotepad"
+ target="dist"
+ inheritAll="false">
+ <property name="jedit.install.dir"
+ value="${dist.dir}"/>
+ <property name="install.dir"
+ value="${dist.dir}/jars"/>
+ </ant>
+ <ant dir="jars/QuickNotepad"
+ target="clean"
+ inheritAll="false">
+ <property name="jedit.install.dir"
+ value="${dist.dir}"/>
+ <property name="install.dir"
+ value="${dist.dir}/jars"/>
+ </ant>
+ <ant dir="jars/MacOSX"
+ target="dist"
+ inheritAll="false">
+ <property name="jedit.install.dir"
+ value="${dist.dir}"/>
+ <property name="install.dir"
+ value="${dist.dir}/jars"/>
+ </ant>
+ <ant dir="jars/MacOSX"
+ target="clean"
+ inheritAll="false">
+ <property name="jedit.install.dir"
+ value="${dist.dir}"/>
+ <property name="install.dir"
+ value="${dist.dir}/jars"/>
+ </ant>
+ </target>
+
+ <target name="dist-java"
+ depends="init"
+ description="build the Java-installer">
+ <antcall target="prepare-dist-files"/>
+ <tar destfile="${dist.dir}/jedit-macros.tar.bz2"
+ compression="bzip2">
+ <tarfileset id="jedit-macros"
+ dir="${dist.dir}"
+ includes="macros/**"/>
+ </tar>
+ <tar destfile="${dist.dir}/jedit-program.tar.bz2"
+ compression="bzip2">
+ <tarfileset id="jedit-program"
+ dir="${dist.dir}"
+ includes="doc/**
+ jars/QuickNotepad.jar
+ modes/**
+ properties/**
+ startup/**
+ ${jar.filename}"
+ excludes="doc/api/**"/>
+ </tar>
+ <tar destfile="${dist.dir}/jedit-windows.tar.bz2"
+ compression="bzip2">
+ <tarfileset id="jedit-windows"
+ dir="${dist.dir}"
+ includes="jedit.exe"/>
+ </tar>
+ <tar destfile="${dist.dir}/jedit-mac.tar.bz2"
+ compression="bzip2">
+ <tarfileset id="jedit-mac"
+ dir="${dist.dir}"
+ includes="jars/MacOSX.jar"/>
+ </tar>
+ <tar destfile="${dist.dir}/jedit-api.tar.bz2"
+ compression="bzip2">
+ <tarfileset id="jedit-api"
+ dir="${dist.dir}"
+ includes="doc/api/**"/>
+ </tar>
+ <tar destfile="${dist.dir}/jedit-os2.tar.bz2"
+ compression="bzip2">
+ <tarfileset id="jedit-os2"
+ dir="${dist.dir}/classes/package-files/os2"
+ includes="jedit.cmd"/>
+ </tar>
+ <antcall target="compile-installer">
+ <param name="config.build.debuglevel"
+ value="lines,source"/>
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ </antcall>
+ <antcall target="compile-calculatesize">
+ <param name="config.build.debuglevel"
+ value="lines,source"/>
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ </antcall>
+ <taskdef name="calculatesize"
+ classname="de.masters_of_disaster.ant.tasks.calculatesize.CalculateSize"
+ classpath="${dist.dir}/classes/calculatesize"/>
+ <calculatesize realsizeproperty="jedit-macros.realsize"
+ disksizeproperty="jedit-macros.disksize">
+ <fileset refid="jedit-macros"/>
+ </calculatesize>
+ <calculatesize realsizeproperty="jedit-program.realsize"
+ disksizeproperty="jedit-program.disksize">
+ <fileset refid="jedit-program"/>
+ </calculatesize>
+ <calculatesize realsizeproperty="jedit-windows.realsize"
+ disksizeproperty="jedit-windows.disksize">
+ <fileset refid="jedit-windows"/>
+ </calculatesize>
+ <calculatesize realsizeproperty="jedit-mac.realsize"
+ disksizeproperty="jedit-mac.disksize">
+ <fileset refid="jedit-mac"/>
+ </calculatesize>
+ <calculatesize realsizeproperty="jedit-api.realsize"
+ disksizeproperty="jedit-api.disksize">
+ <fileset refid="jedit-api"/>
+ </calculatesize>
+ <calculatesize realsizeproperty="jedit-os2.realsize"
+ disksizeproperty="jedit-os2.disksize">
+ <fileset refid="jedit-os2"/>
+ </calculatesize>
+ <copy todir="${dist.dir}/classes/installer/installer"
+ encoding="UTF-8"
+ overwrite="true">
+ <fileset file="installer/install.props"/>
+ <filterset>
+ <filter token="jedit.version"
+ value="${jedit.version}"/>
+ <filter token="jedit-macros.realsize"
+ value="${jedit-macros.realsize}"/>
+ <filter token="jedit-macros.disksize"
+ value="${jedit-macros.disksize}"/>
+ <filter token="jedit-program.realsize"
+ value="${jedit-program.realsize}"/>
+ <filter token="jedit-program.disksize"
+ value="${jedit-program.disksize}"/>
+ <filter token="jedit-windows.realsize"
+ value="${jedit-windows.realsize}"/>
+ <filter token="jedit-windows.disksize"
+ value="${jedit-windows.disksize}"/>
+ <filter token="jedit-mac.realsize"
+ value="${jedit-mac.realsize}"/>
+ <filter token="jedit-mac.disksize"
+ value="${jedit-mac.disksize}"/>
+ <filter token="jedit-api.realsize"
+ value="${jedit-api.realsize}"/>
+ <filter token="jedit-api.disksize"
+ value="${jedit-api.disksize}"/>
+ <filter token="jedit-os2.realsize"
+ value="${jedit-os2.realsize}"/>
+ <filter token="jedit-os2.disksize"
+ value="${jedit-os2.disksize}"/>
+ </filterset>
+ </copy>
+ <jar destfile="${dist.dir}/${dist.jar.filename}"
+ basedir="${dist.dir}/classes/installer"
+ compress="true"
+ manifest="installer/install.mf"
+ duplicate="fail"
+ index="true">
+ <fileset dir=".">
+ <include name="installer/*.html"/>
+ </fileset>
+ <fileset dir="${dist.dir}/classes/package-files/linux">
+ <include name="jedit.1"/>
+ </fileset>
+ <zipfileset dir="${dist.dir}"
+ includes="jedit-api.tar.bz2
+ jedit-mac.tar.bz2
+ jedit-macros.tar.bz2
+ jedit-os2.tar.bz2
+ jedit-windows.tar.bz2
+ jedit-program.tar.bz2"
+ prefix="installer"/>
+ </jar>
+ <condition property="wipe.dist.files">
+ <not>
+ <isset property="dont.wipe.dist.files"/>
+ </not>
+ </condition>
+ <antcall target="dist-cleanup"/>
+ </target>
+
+ <target name="dist-manuals"
+ depends="init"
+ description="build the PDF-manuals">
+ <antcall target="docs-pdf-a4">
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ <param name="jar.location"
+ location="${dist.dir}"/>
+ </antcall>
+ <antcall target="docs-pdf-USletter">
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ <param name="jar.location"
+ location="${dist.dir}"/>
+ </antcall>
+ <condition property="wipe.dist.files">
+ <not>
+ <isset property="dont.wipe.dist.files"/>
+ </not>
+ </condition>
+ <antcall target="dist-cleanup"/>
+ </target>
+
+ <target name="dist-src"
+ depends="init"
+ description="build the src-archive">
+ <mkdir dir="${dist.dir}"/>
+ <tar destfile="${dist.dir}/${src.archive.filename}"
+ compression="bzip2">
+ <tarfileset dir="."
+ excludes="${config.build.dir}/**
+ ${config.dist.dir}/**
+ **/build.properties
+ doc/docbook-wrapper-*.xsl"
+ prefix="jEdit/"/>
+ <tarfileset dir="../build-support"
+ prefix="build-support/"/>
+ </tar>
+ </target>
+
+ <target name="compile-jarbundler"
+ depends="init">
+ <mkdir dir="${classes.dir}/jarbundler"/>
+ <depend srcDir="."
+ destDir="${classes.dir}/jarbundler"
+ cache="${classes.dir}"/>
+ <javac srcdir="."
+ destdir="${classes.dir}/jarbundler"
+ includes="net/**"
+ debug="true"
+ debuglevel="${config.build.debuglevel}"
+ nowarn="${config.build.nowarn}"
+ deprecation="${config.build.deprecation}"
+ source="1.4"
+ target="1.4"
+ compiler="modern">
+ <compilerarg line="${config.build.compilerarg}"/>
+ </javac>
+ </target>
+
+ <target name="dist-mac-finish"
+ depends="init"
+ unless="build.on.non.mac"
+ description="finish building the Mac OS X disk image (DMG-file) on Mac OS X">
+ <fail message="The disk image (DMG-file) for easy distribution on Mac OS X can only be built on Mac OS X currently">
+ <condition>
+ <not>
+ <os family="mac"/>
+ </not>
+ </condition>
+ </fail>
+ <taskdef name="jarbundler"
+ classname="net.sourceforge.jarbundler.JarBundler"
+ classpath="${dist.dir}/classes/jarbundler"/>
+ <tstamp>
+ <format property="current.year"
+ pattern="yyyy"/>
+ </tstamp>
+ <mkdir dir="${dist.dir}/classes/mac"/>
+ <jarbundler dir="${dist.dir}/classes/mac"
+ name="jEdit"
+ mainclass="org.gjt.sp.jedit.jEdit"
+ jar="${dist.dir}/${jar.filename}"
+ arguments="-background"
+ build="${jedit.build.number}"
+ bundleid="org.gjt.sp.jedit"
+ extraclasspath="/System/Library/Java"
+ icon="icons/icon.icns"
+ infostring="jEdit ${jedit.version}, Copyright © 1998-${current.year} Contributors"
+ jvmversion="${mac.target.java.version}"
+ shortname="jEdit"
+ signature="JESP"
+ stubfile="jedit"
+ version="${jedit.version}"
+ vmoptions="-Xmx192M">
+ <javaproperty name="apple.awt.antialiasing" value="true"/>
+ <javaproperty name="apple.awt.textantialiasing" value="true"/>
+ <javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
+ <!-- Comented due https://sourceforge.net/tracker/?func=detail&atid=100588&aid=2820535&group_id=588 discussion -->
+ <!--javaproperty name="apple.awt.graphics.UseQuartz" value="true" />
+ <javaproperty name="apple.awt.rendering" value="speed" /-->
+ <javafileset dir="${dist.dir}"
+ includes="doc/**
+ jars/**
+ macros/**
+ modes/**
+ properties/**
+ startup/**"/>
+ <documenttype name="jEdit TEXT Document"
+ extensions="*"
+ ostypes="TEXT ****"
+ iconfile="icons/file.icns"
+ role="Editor"/>
+ <service message="openFile"
+ menuitem="jEdit/Open Files"
+ sendtypes="NSStringPboardType,NSFilenamesPboardType"/>
+ <service message="insertSelection"
+ menuitem="jEdit/Insert Text"
+ sendtypes="NSStringPboardType"/>
+ <service message="openSelection"
+ menuitem="jEdit/New Buffer with Text"
+ sendtypes="NSStringPboardType"/>
+ </jarbundler>
+ <delete file="${dist.dir}/${mac.disk.image.filename}"
+ failonerror="false"/>
+ <exec executable="hdiutil"
+ failonerror="true">
+ <arg value="create"/>
+ <arg value="-quiet"/>
+ <arg value="-volname"/>
+ <arg value="jEdit ${jedit.version}"/>
+ <arg value="-srcfolder"/>
+ <arg file="${dist.dir}/classes/mac/jEdit.app"/>
+ <arg file="${dist.dir}/${mac.disk.image.filename}"/>
+ </exec>
+ <exec executable="hdiutil"
+ failonerror="true">
+ <arg value="internet-enable"/>
+ <arg value="-quiet"/>
+ <arg file="${dist.dir}/${mac.disk.image.filename}"/>
+ </exec>
+ <condition property="wipe.dist.files">
+ <not>
+ <isset property="dont.wipe.dist.files"/>
+ </not>
+ </condition>
+ <antcall target="dist-cleanup"/>
+ </target>
+
+ <target name="prepare-dist-mac-finish"
+ depends="init"
+ if="build.on.non.mac">
+ <tar destfile="${dist.dir}/jedit${jedit.version}-dist-mac-finish.tar.bz2"
+ basedir="."
+ includes="build.xml
+ icons/file.icns
+ icons/icon.icns
+ ${config.dist.dir}/${jar.filename}
+ ${config.dist.dir}/classes/jarbundler/**
+ ${config.dist.dir}/doc/**
+ ${config.dist.dir}/jars/**
+ ${config.dist.dir}/macros/**
+ ${config.dist.dir}/modes/**
+ ${config.dist.dir}/properties/**
+ ${config.dist.dir}/startup/**"
+ compression="bzip2"/>
+ </target>
+
+ <target name="dist-mac"
+ depends="init"
+ description="build the Mac OS X disk image (DMG-file)">
+ <antcall target="prepare-dist-files"/>
+ <antcall target="compile-jarbundler">
+ <param name="config.build.debuglevel"
+ value="lines,source"/>
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ </antcall>
+ <condition property="build.on.non.mac">
+ <not>
+ <os family="mac"/>
+ </not>
+ </condition>
+ <antcall target="dist-mac-finish">
+ <param name="dont.wipe.dist.files"
+ value="true"/>
+ </antcall>
+ <antcall target="prepare-dist-mac-finish"/>
+ <condition property="wipe.dist.files">
+ <not>
+ <isset property="dont.wipe.dist.files"/>
+ </not>
+ </condition>
+ <antcall target="dist-cleanup"/>
+ </target>
+
+ <target name="translate-paths-for-wine"
+ if="config.winepath.executable">
+ <exec executable="${config.winepath.executable}"
+ outputproperty="basedir.for.wine"
+ failonerror="true">
+ <arg value="-w"/>
+ <arg value="${basedir}"/>
+ </exec>
+ <exec executable="${config.winepath.executable}"
+ outputproperty="dist.dir.for.wine"
+ failonerror="true">
+ <arg value="-w"/>
+ <arg value="${dist.dir}"/>
+ </exec>
+ </target>
+
+ <target name="filter-package-files"
+ depends="init,translate-paths-for-wine">
+ <fail message="Please set the property "winepath.executable" in build.properties, you may find example values in build.properties.sample">
+ <condition>
+ <and>
+ <istrue value="${config.innosetup.via.wine}"/>
+ <not>
+ <isset property="config.winepath.executable"/>
+ </not>
+ </and>
+ </condition>
+ </fail>
+ <condition property="basedir.possibly.for.wine"
+ value="${basedir.for.wine}"
+ else="${basedir}">
+ <istrue value="${config.innosetup.via.wine}"/>
+ </condition>
+ <condition property="dist.dir.possibly.for.wine"
+ value="${dist.dir.for.wine}"
+ else="${dist.dir}">
+ <istrue value="${config.innosetup.via.wine}"/>
+ </condition>
+ <tstamp>
+ <format property="current.year"
+ pattern="yyyy"/>
+ </tstamp>
+ <copy todir="${classes.dir}/package-files"
+ encoding="UTF-8"
+ overwrite="true">
+ <fileset dir="package-files"/>
+ <filterset id="package-files-filter">
+ <filter token="base.dir"
+ value="${basedir}"/>
+ <filter token="base.dir.possibly.for.wine"
+ value="${basedir.possibly.for.wine}"/>
+ <filter token="current.year"
+ value="${current.year}"/>
+ <filter token="dist.dir.possibly.for.wine"
+ value="${dist.dir.possibly.for.wine}"/>
+ <filter token="jar.filename"
+ value="${jar.filename}"/>
+ <filter token="jedit.build.number"
+ value="${jedit.build.number}"/>
+ <filter token="jedit.version"
+ value="${jedit.version}"/>
+ <filter token="slackware.target.java.version"
+ value="${slackware.target.java.version}"/>
+ <filter token="target.java.version"
+ value="${target.java.version}"/>
+ <filter token="win.filename"
+ value="${win.filename}"/>
+ </filterset>
+ </copy>
+ </target>
+
+ <target name="prepare-dist-files"
+ depends="init">
+ <antcall target="build">
+ <param name="config.build.debuglevel"
+ value="lines,source"/>
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ <param name="jar.location"
+ location="${dist.dir}"/>
+ </antcall>
+ <antcall target="docs-html">
+ <param name="config.build.debuglevel"
+ value="lines,source"/>
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ <param name="jar.location"
+ location="${dist.dir}"/>
+ </antcall>
+ <antcall target="docs-javadoc">
+ <param name="config.build.debuglevel"
+ value="lines,source"/>
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ <param name="jar.location"
+ location="${dist.dir}"/>
+ </antcall>
+ <antcall target="compile-default-plugins-for-dist"/>
+ <antcall target="filter-package-files">
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ </antcall>
+ <antcall target="build-exe-launcher">
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ <param name="jar.location"
+ location="${dist.dir}"/>
+ </antcall>
+ <gzip src="${dist.dir}/classes/package-files/linux/jedit.1"
+ destfile="${dist.dir}/classes/package-files/linux/jedit.1.gz"/>
+ </target>
+
+ <target name="dist-slackware"
+ depends="init"
+ description="build the Slackware Package">
+ <antcall target="prepare-dist-files"/>
+ <tar destfile="${dist.dir}/jedit-${jedit.version}-noarch-1sao.tgz"
+ compression="gzip">
+ <tarfileset file="."
+ username="root"
+ group="root"
+ fullpath="./"/>
+ <tarfileset dir="${dist.dir}/classes/package-files/linux/slackware"
+ includes="doinst.sh
+ slack-desc
+ slack-required"
+ username="root"
+ group="root"
+ prefix="install/"/>
+ <tarfileset file="${dist.dir}/classes/package-files/linux/jedit"
+ mode="755"
+ username="root"
+ group="bin"
+ fullpath="usr/bin/jedit"/>
+ <tarfileset dir="${dist.dir}/doc"
+ includes="*.txt"
+ username="root"
+ group="root"
+ prefix="usr/doc/jedit-${jedit.version}/"/>
+ <tarfileset file="${dist.dir}/classes/package-files/linux/jedit.1.gz"
+ username="root"
+ group="root"
+ fullpath="usr/man/man1/jedit.1.gz"/>
+ <tarfileset file="${dist.dir}/classes/package-files/linux/slackware/jEdit.desktop"
+ username="root"
+ group="root"
+ fullpath="usr/share/applications/jEdit.desktop"/>
+ <tarfileset dir="${dist.dir}"
+ includes="doc/**
+ jars/QuickNotepad.jar
+ macros/**
+ modes/**
+ properties/**
+ startup/**
+ ${jar.filename}"
+ username="root"
+ group="root"
+ prefix="usr/share/jedit-${jedit.version}/"/>
+ <tarfileset dir="icons"
+ includes="jedit-file48.png
+ jedit-icon48.png"
+ username="root"
+ group="root"
+ prefix="usr/share/pixmaps/"/>
+ </tar>
+ <condition property="wipe.dist.files">
+ <not>
+ <isset property="dont.wipe.dist.files"/>
+ </not>
+ </condition>
+ <antcall target="dist-cleanup"/>
+ </target>
+
+ <target name="compile-ar"
+ depends="init">
+ <mkdir dir="${classes.dir}/ar"/>
+ <depend srcDir="."
+ destDir="${classes.dir}/ar"
+ cache="${classes.dir}"/>
+ <javac srcdir="."
+ destdir="${classes.dir}/ar"
+ includes="de/masters_of_disaster/ant/tasks/ar/**"
+ debug="true"
+ debuglevel="${config.build.debuglevel}"
+ nowarn="${config.build.nowarn}"
+ deprecation="${config.build.deprecation}"
+ source="${target.java.version}"
+ target="${target.java.version}"
+ compiler="modern">
+ <compilerarg line="${config.build.compilerarg}"/>
+ </javac>
+ </target>
+
+ <target name="compile-deb"
+ depends="init">
+ <mkdir dir="${classes.dir}/deb"/>
+ <depend srcDir="."
+ destDir="${classes.dir}/deb"
+ cache="${classes.dir}"/>
+ <javac srcdir="."
+ destdir="${classes.dir}/deb"
+ includes="de/masters_of_disaster/ant/tasks/deb/**"
+ debug="true"
+ debuglevel="${config.build.debuglevel}"
+ nowarn="${config.build.nowarn}"
+ deprecation="${config.build.deprecation}"
+ source="${target.java.version}"
+ target="${target.java.version}"
+ compiler="modern">
+ <compilerarg line="${config.build.compilerarg}"/>
+ </javac>
+ </target>
+
+ <target name="compile-calculatesize"
+ depends="init">
+ <mkdir dir="${classes.dir}/calculatesize"/>
+ <depend srcDir="."
+ destDir="${classes.dir}/calculatesize"
+ cache="${classes.dir}"/>
+ <javac srcdir="."
+ destdir="${classes.dir}/calculatesize"
+ includes="de/masters_of_disaster/ant/tasks/calculatesize/**"
+ debug="true"
+ debuglevel="${config.build.debuglevel}"
+ nowarn="${config.build.nowarn}"
+ deprecation="${config.build.deprecation}"
+ source="${target.java.version}"
+ target="${target.java.version}"
+ compiler="modern">
+ <compilerarg line="${config.build.compilerarg}"/>
+ </javac>
+ </target>
+
+ <target name="dist-deb"
+ depends="init"
+ description="build the DEB Package">
+ <antcall target="prepare-dist-files"/>
+ <antcall target="compile-ar">
+ <param name="config.build.debuglevel"
+ value="lines,source"/>
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ </antcall>
+ <antcall target="compile-deb">
+ <param name="config.build.debuglevel"
+ value="lines,source"/>
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ </antcall>
+ <taskdef name="deb"
+ classname="de.masters_of_disaster.ant.tasks.deb.Deb"
+ classpath="${dist.dir}/classes/deb"/>
+ <antcall target="compile-calculatesize">
+ <param name="config.build.debuglevel"
+ value="lines,source"/>
+ <param name="classes.dir"
+ location="${dist.dir}/classes"/>
+ </antcall>
+ <taskdef name="calculatesize"
+ classname="de.masters_of_disaster.ant.tasks.calculatesize.CalculateSize"
+ classpath="${dist.dir}/classes/calculatesize"/>
+ <calculatesize realsizeproperty="deb.installed.size">
+ <fileset dir="${dist.dir}/doc"
+ includes="*.txt"/>
+ <fileset dir="${dist.dir}"
+ includes="classes/package-files/linux/jedit
+ classes/package-files/linux/deb/jedit
+ classes/package-files/linux/deb/jedit.desktop
+ classes/package-files/linux/jedit.1.gz
+ doc/**
+ jars/QuickNotepad.jar
+ macros/**
+ modes/**
+ properties/**
+ startup/**
+ ${jar.filename}"/>
+ </calculatesize>
+ <copy todir="${dist.dir}/classes/package-files/linux/deb"
+ encoding="UTF-8"
+ overwrite="true">
+ <fileset file="package-files/linux/deb/control"/>
+ <filterset>
+ <filter token="jedit.build.number"
+ value="${jedit.build.number}"/>
+ <filter token="deb.installed.size"
+ value="${deb.installed.size}"/>
+ </filterset>
+ </copy>
+ <deb destfile="${dist.dir}/jedit_${jedit.version}_all.deb"
+ tempDir="${dist.dir}/classes/deb"
+ deleteTempFiles="false"
+ includeMd5sums="true">
+ <controlfileset file="${dist.dir}/classes/package-files/linux/deb/control"/>
+ <controlfileset dir="${dist.dir}/classes/package-files/linux/deb"
+ includes="postinst
+ postrm"
+ mode="755"/>
+ <datafileset file="."
+ fullpath="usr/"/>
+ <datafileset file="."
+ fullpath="usr/bin/"/>
+ <datafileset file="${dist.dir}/classes/package-files/linux/jedit"
+ fullpath="usr/bin/jedit"
+ mode="755"/>
+ <datafileset file="."
+ fullpath="usr/lib/"/>
+ <datafileset file="."
+ fullpath="usr/lib/menu/"/>
+ <datafileset file="${dist.dir}/classes/package-files/linux/deb/jedit"
+ fullpath="usr/lib/menu/jedit"/>
+ <datafileset file="."
+ fullpath="usr/share/"/>
+ <datafileset file="."
+ fullpath="usr/share/applications/"/>
+ <datafileset file="${dist.dir}/classes/package-files/linux/deb/jedit.desktop"
+ fullpath="usr/share/applications/jedit.desktop"/>
+ <datafileset file="."
+ fullpath="usr/share/doc/"/>
+ <datafileset file="."
+ fullpath="usr/share/doc/jEdit/"/>
+ <datafileset dir="${dist.dir}/doc"
+ includes="*.txt"
+ prefix="usr/share/doc/jEdit/"/>
+ <datafileset file="."
+ fullpath="usr/share/jEdit/"/>
+ <datafileset dir="${dist.dir}"
+ includes="doc/**
+ macros/**
+ modes/**
+ properties/**
+ startup/**
+ ${jar.filename}"
+ prefix="usr/share/jEdit/"/>
+ <datafileset file="."
+ fullpath="usr/share/jEdit/jars/"/>
+ <datafileset dir="${dist.dir}/jars"
+ includes="QuickNotepad.jar"
+ prefix="usr/share/jEdit/jars/"/>
+ <datafileset file="."
+ fullpath="usr/share/man/"/>
+ <datafileset file="."
+ fullpath="usr/share/man/man1/"/>
+ <datafileset file="${dist.dir}/classes/package-files/linux/jedit.1.gz"
+ fullpath="usr/share/man/man1/jedit.1.gz"/>
+ </deb>
+ <condition property="wipe.dist.files">
+ <not>
+ <isset property="dont.wipe.dist.files"/>
+ </not>
+ </condition>
+ <antcall target="dist-cleanup"/>
+ </target>
+
+ <target name="dist-win-finish"
+ depends="init"
+ unless="build.on.non.win"
+ description="finish building the Windows installer (EXE-file) on Windows or via wine">
+ <fail message="The Windows installer (EXE-file) can only be built on Windows or via wine currently">
+ <condition>
+ <not>
+ <or>
+ <os family="windows"/>
+ <istrue value="${config.innosetup.via.wine}"/>
+ </or>
+ </not>
+ </condition>
+ </fail>
+ <fail message="Please set the property "innosetup.compiler.executable" in build.properties, you may find example values in build.properties.sample"
+ unless="config.innosetup.compiler.executable"/>
+ <fail message="Please set the property "wine.executable" in build.properties, you may find example values in build.properties.sample">
+ <condition>
+ <and>
+ <istrue value="${config.innosetup.via.wine}"/>
+ <not>
+ <isset property="config.wine.executable"/>
+ </not>
+ </and>
+ </condition>
+ </fail>
+ <condition property="innosetup.compiler.executable"
+ value="${config.wine.executable}"
+ else="${config.innosetup.compiler.executable}">
+ <istrue value="${config.innosetup.via.wine}"/>
+ </condition>
+ <condition property="innosetup.compiler.argument"
+ value=""${config.innosetup.compiler.executable}""
+ else="">
+ <istrue value="${config.innosetup.via.wine}"/>
+ </condition>
+ <exec executable="${innosetup.compiler.executable}"
+ dir="${dist.dir}"
+ failonerror="true">
+ <arg line="${innosetup.compiler.argument}"/>
+ <arg value="classes/package-files/windows/win32installer.iss"/>
+ </exec>
+ <condition property="wipe.dist.files">
+ <not>
+ <isset property="dont.wipe.dist.files"/>
+ </not>
+ </condition>
+ <antcall target="dist-cleanup"/>
+ </target>
+
+ <target name="prepare-dist-win-finish"
+ depends="init"
+ if="build.on.non.win">
+ <tar destfile="${dist.dir}/jedit${jedit.version}-dist-win-finish.tar.bz2"
+ basedir="."
+ includes="build.xml
+ icons/jedit.ico
+ icons/WindowsInstallerSmallImage.bmp
+ icons/WindowsInstallerImage.bmp
+ ${config.dist.dir}/${jar.filename}
+ ${config.dist.dir}/classes/package-files/windows/**
+ ${config.dist.dir}/doc/**
+ ${config.dist.dir}/jars/QuickNotepad.jar
+ ${config.dist.dir}/macros/**
+ ${config.dist.dir}/modes/**
+ ${config.dist.dir}/properties/**
+ ${config.dist.dir}/startup/**"
+ compression="bzip2"/>
+ </target>
+
+ <target name="dist-win"
+ depends="init"
+ description="build the Windows installer (EXE-file)">
+ <antcall target="prepare-dist-files"/>
+ <condition property="build.on.non.win">
+ <not>
+ <or>
+ <os family="windows"/>
+ <istrue value="${config.innosetup.via.wine}"/>
+ </or>
+ </not>
+ </condition>
+ <antcall target="dist-win-finish">
+ <param name="dont.wipe.dist.files"
+ value="true"/>
+ </antcall>
+ <antcall target="prepare-dist-win-finish"/>
+ <condition property="wipe.dist.files">
+ <not>
+ <isset property="dont.wipe.dist.files"/>
+ </not>
+ </condition>
+ <antcall target="dist-cleanup"/>
+ </target>
+
+ <target name="dist"
+ depends="init"
+ description="build all distribution files">
+ <property name="dont.wipe.dist.files"
+ value="true"/>
+ <antcall target="dist-java"/>
+ <antcall target="dist-manuals"/>
+ <antcall target="dist-src"/>
+ <antcall target="dist-slackware"/>
+ <antcall target="dist-deb"/>
+ <antcall target="dist-mac"/>
+ <antcall target="dist-win"/>
+ <property name="wipe.dist.files"
+ value="true"/>
+ <antcall target="dist-cleanup"/>
+ </target>
+
+ <target name="dist-cleanup"
+ depends="init">
+ <delete includeemptydirs="true">
+ <fileset dir="${dist.dir}">
+ <selector if="wipe.dist.files">
+ <or>
+ <filename name="macros/**"/>
+ <filename name="doc/**"/>
+ <filename name="jars/**"/>
+ <filename name="modes/**"/>
+ <filename name="properties/**"/>
+ <filename name="startup/**"/>
+ <filename name="${jar.filename}"/>
+ <filename name="jedit.exe"/>
+ <and>
+ <filename name="*.tar.bz2"/>
+ <filename name="${src.archive.filename}"
+ negate="true"/>
+ <filename name="jedit${jedit.version}-dist-mac-finish.tar.bz2"
+ negate="true"/>
+ <filename name="jedit${jedit.version}-dist-win-finish.tar.bz2"
+ negate="true"/>
+ </and>
+ <filename name="classes/**"/>
+ </or>
+ </selector>
+ </fileset>
+ </delete>
+ </target>
+</project>
diff --git a/jEdit/com/microstar/xml/HandlerBase.java b/jEdit/com/microstar/xml/HandlerBase.java
deleted file mode 100644
index f53f3ba..0000000
--- a/jEdit/com/microstar/xml/HandlerBase.java
+++ /dev/null
@@ -1,192 +0,0 @@
-// HandlerBase.java: Simple base class for AElfred processors.
-// NO WARRANTY! See README, and copyright below.
-// $Id: HandlerBase.java 12845 2008-06-13 19:42:59Z ezust $
-
-package com.microstar.xml;
-
-import com.microstar.xml.XmlHandler;
-import com.microstar.xml.XmlException;
-import java.io.Reader;
-
-
-/**
- * Convenience base class for AElfred handlers.
- * <p>This base class implements the XmlHandler interface with
- * (mostly empty) default handlers. You are not required to use this,
- * but if you need to handle only a few events, you might find
- * it convenient to extend this class rather than implementing
- * the entire interface. This example overrides only the
- * <code>charData</code> method, using the defaults for the others:
- * <pre>
- * import com.microstar.xml.HandlerBase;
- *
- * public class MyHandler extends HandlerBase {
- * public void charData (char ch[], int start, int length)
- * {
- * System.out.println("Data: " + new String (ch, start, length));
- * }
- * }
- * </pre>
- * <p>This class is optional, but if you use it, you must also
- * include the <code>XmlException</code> class.
- * <p>Do not extend this if you are using SAX; extend
- * <code>org.xml.sax.HandlerBase</code> instead.
- * @author Copyright (c) 1998 by Microstar Software Ltd.
- * @author written by David Megginson <dmeggins at microstar.com>
- * @version 1.1
- * @see XmlHandler
- * @see XmlException
- * @see org.xml.sax.HandlerBase
- * @deprecated use org.xml.sax.helpers.DefaultHandler
- */
-public class HandlerBase implements XmlHandler {
-
- /**
- * Handle the start of the document.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#startDocument
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void startDocument ()
- throws java.lang.Exception
- {
- }
-
- /**
- * Handle the end of the document.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#endDocument
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void endDocument ()
- throws java.lang.Exception
- {
- }
-
- /**
- * Resolve an external entity.
- * <p>The default implementation simply returns the supplied
- * system identifier.
- * @see com.microstar.xml.XmlHandler#resolveEntity
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public Object resolveEntity (String publicId, String systemId)
- throws java.lang.Exception
- {
- return null;
- }
-
-
- /**
- * Handle the start of an external entity.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#startExternalEntity
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void startExternalEntity (String systemId)
- throws java.lang.Exception
- {
- }
-
- /**
- * Handle the end of an external entity.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#endExternalEntity
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void endExternalEntity (String systemId)
- throws java.lang.Exception
- {
- }
-
- /**
- * Handle a document type declaration.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#doctypeDecl
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void doctypeDecl (String name, String publicId, String systemId)
- throws java.lang.Exception
- {
- }
-
- /**
- * Handle an attribute assignment.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#attribute
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void attribute (String aname, String value, boolean isSpecified)
- throws java.lang.Exception
- {
- }
-
- /**
- * Handle the start of an element.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#startElement
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void startElement (String elname)
- throws java.lang.Exception
- {
- }
-
- /**
- * Handle the end of an element.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#endElement
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void endElement (String elname)
- throws java.lang.Exception
- {
- }
-
- /**
- * Handle character data.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#charData
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void charData (char ch[], int start, int length)
- throws java.lang.Exception
- {
- }
-
- /**
- * Handle ignorable whitespace.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#ignorableWhitespace
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void ignorableWhitespace (char ch[], int start, int length)
- throws java.lang.Exception
- {
- }
-
- /**
- * Handle a processing instruction.
- * <p>The default implementation does nothing.
- * @see com.microstar.xml.XmlHandler#processingInstruction
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void processingInstruction (String target, String data)
- throws java.lang.Exception
- {
- }
-
- /**
- * Throw an exception for a fatal error.
- * <p>The default implementation throws <code>XmlException</code>.
- * @see com.microstar.xml.XmlHandler#error
- * @exception com.microstar.xml.XmlException A specific parsing error.
- * @exception java.lang.Exception Derived methods may throw exceptions.
- */
- public void error (String message, String systemId, int line, int column)
- throws XmlException, java.lang.Exception
- {
- throw new XmlException(message, systemId, line, column);
- }
-
-}
diff --git a/jEdit/com/microstar/xml/XmlException.java b/jEdit/com/microstar/xml/XmlException.java
deleted file mode 100644
index d82f36a..0000000
--- a/jEdit/com/microstar/xml/XmlException.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// XmlException.java: Simple base class for AElfred processors.
-// NO WARRANTY! See README, and copyright below.
-// $Id: XmlException.java 12845 2008-06-13 19:42:59Z ezust $
-
-package com.microstar.xml;
-
-
-/**
- * Convenience exception class for reporting XML parsing errors.
- * <p>This is an exception class that you can use to encapsulate all
- * of the information from Ælfred's <code>error</code> callback.
- * This is not necessary for routine use of Ælfred, but it
- * is used by the optional <code>HandlerBase</code> class.
- * <p>Note that the core Ælfred classes do <em>not</em>
- * use this exception.
- * @author Copyright (c) 1998 by Microstar Software Ltd.
- * @author written by David Megginson <dmeggins at microstar.com>
- * @version 1.1
- * @see XmlHandler#error
- * @see HandlerBase
- * @deprecated use import org.xml.sax.SAXParseException
- */
-public class XmlException extends Exception
-{
- private String message;
- private String systemId;
- private int line;
- private int column;
-
-
- /**
- * Construct a new XML parsing exception.
- * @param message The error message from the parser.
- * @param systemId The URI of the entity containing the error.
- * @param line The line number where the error appeared.
- * @param column The column number where the error appeared.
- */
- public XmlException (String message, String systemId, int line, int column)
- {
- this.message = message;
- this.systemId = systemId;
- this.line = line;
- this.column = column;
- }
-
-
- /**
- * Get the error message from the parser.
- * @return A string describing the error.
- */
- public String getMessage ()
- {
- return message;
- }
-
-
- /**
- * Get the URI of the entity containing the error.
- * @return The URI as a string.
- */
- public String getSystemId ()
- {
- return systemId;
- }
-
-
- /**
- * Get the line number containing the error.
- * @return The line number as an integer.
- */
- public int getLine ()
- {
- return line;
- }
-
- /**
- * Get the column number containing the error.
- * @return The column number as an integer.
- */
- public int getColumn ()
- {
- return column;
- }
-
-}
diff --git a/jEdit/com/microstar/xml/XmlHandler.java b/jEdit/com/microstar/xml/XmlHandler.java
deleted file mode 100644
index 1d7f480..0000000
--- a/jEdit/com/microstar/xml/XmlHandler.java
+++ /dev/null
@@ -1,241 +0,0 @@
-// XmlHandler.java: the callback interface.
-// NO WARRANTY! See README, and copyright below.
-// $Id: XmlHandler.java 14583 2009-02-06 05:38:53Z ezust $
-
-package com.microstar.xml;
-
-/**
- * XML Processing Interface.
- * <p>Whenever you parse an XML document, you must provide an object
- * from a class that implements this interface to receive the parsing
- * events.
- * <p>If you do not want to implement this entire interface, you
- * can extend the <code>HandlerBase</code> convenience class and
- * then implement only what you need.
- * <p>If you are using SAX, you should implement the SAX handler
- * interfaces rather than this one.
- * @author Copyright (c) 1997, 1998 by Microstar Software Ltd.
- * @author written by David Megginson <dmeggins at microstar.com>
- * @version 1.1
- * @see org.xml.sax.EntityHandler
- * @see org.xml.sax.DocumentHandler
- * @see org.xml.sax.ErrorHandler
- * @deprecated
- */
-public interface XmlHandler {
-
- /**
- * Start the document.
- * <p>Ælfred will call this method just before it
- * attempts to read the first entity (the root of the document).
- * It is guaranteed that this will be the first method called.
- * @exception java.lang.Exception The handler may throw any exception.
- * @see #endDocument
- */
- public void startDocument ()
- throws java.lang.Exception;
-
-
- /**
- * End the document.
- * <p>Ælfred will call this method once, when it has
- * finished parsing the XML document.
- * It is guaranteed that this will be the last method called.
- * @exception java.lang.Exception The handler may throw any exception.
- * @see #startDocument
- */
- public void endDocument ()
- throws java.lang.Exception;
-
-
- /**
- * Resolve an External Entity.
- * <p>Give the handler a chance to redirect external entities
- * to different URIs. Ælfred will call this method for the
- * top-level document entity, for external text (XML) entities,
- * and the external DTD subset (if any).
- * @param publicId The public identifier, or null if none was supplied.
- * @param systemId The system identifier.
- * @return The replacement system identifier, or null to use
- * the default.
- * @exception java.lang.Exception The handler may throw any exception.
- * @see #startExternalEntity
- * @see #endExternalEntity
- */
- public Object resolveEntity (String publicId, String systemId)
- throws java.lang.Exception;
-
-
- /**
- * Begin an external entity.
- * <p>Ælfred will call this method at the beginning of
- * each external entity, including the top-level document entity
- * and the external DTD subset (if any).
- * <p>If necessary, you can use this method to track the location
- * of the current entity so that you can resolve relative URIs
- * correctly.
- * @param systemId The URI of the external entity that is starting.
- * @exception java.lang.Exception The handler may throw any exception.
- * @see #endExternalEntity
- * @see #resolveEntity
- */
- public void startExternalEntity (String systemId)
- throws java.lang.Exception;
-
-
- /**
- * End an external entity.
- * <p>Ælfred will call this method at the end of
- * each external entity, including the top-level document entity
- * and the external DTD subset.
- * <p>If necessary, you can use this method to track the location
- * of the current entity so that you can resolve relative URIs
- * correctly.
- * @param systemId The URI of the external entity that is ending.
- * @exception java.lang.Exception The handler may throw any exception.
- * @see #startExternalEntity
- * @see #resolveEntity
- */
- public void endExternalEntity (String systemId)
- throws java.lang.Exception;
-
-
- /**
- * Document type declaration.
- * <p>Ælfred will call this method when or if it encounters
- * the document type (DOCTYPE) declaration.
- * <p>Please note that the public and system identifiers will
- * not always be a reliable indication of the DTD in use.
- * @param name The document type name.
- * @param publicId The public identifier, or null if unspecified.
- * @param systemId The system identifier, or null if unspecified.
- * @exception java.lang.Exception The handler may throw any exception.
- */
- public void doctypeDecl (String name, String publicId, String systemId)
- throws java.lang.Exception;
-
-
- /**
- * Attribute.
- * <p>Ælfred will call this method once for each attribute
- * (specified or defaulted) before reporting a startElement event.
- * It is up to your handler to collect the attributes, if
- * necessary.
- * <p>You may use XmlParser.getAttributeType() to find the attribute's
- * declared type.
- * @param name The name of the attribute.
- * @param value The value of the attribute, or null if the attribute
- * is <code>#IMPLIED</code>.
- * @param isSpecified True if the value was specified, false if it
- * was defaulted from the DTD.
- * @exception java.lang.Exception The handler may throw any exception.
- * @see #startElement
- * @see XmlParser#declaredAttributes
- * @see XmlParser#getAttributeType
- * @see XmlParser#getAttributeDefaultValue
- */
- public void attribute (String name, String value, boolean isSpecified)
- throws java.lang.Exception;
-
-
- /**
- * Start an element.
- * <p>Ælfred will call this method at the beginning of each
- * element. By the time this is called, all of the attributes
- * for the element will already have been reported using the
- * <code>attribute</code> method.
- * @param elname The element type name.
- * @exception java.lang.Exception The handler may throw any exception.
- * @see #attribute
- * @see #endElement
- * @see XmlParser#declaredElements
- * @see XmlParser#getElementContentType
- */
- public void startElement (String elname)
- throws java.lang.Exception;
-
-
- /**
- * End an element.
- * <p>Ælfred will call this method at the end of each element
- * (including EMPTY elements).
- * @param elname The element type name.
- * @exception java.lang.Exception The handler may throw any exception.
- * @see #startElement
- * @see XmlParser#declaredElements
- * @see XmlParser#getElementContentType
- */
- public void endElement (String elname)
- throws java.lang.Exception;
-
-
- /**
- * Character data.
- * <p>Ælfred will call this method once for each chunk of
- * character data found in the contents of elements. Note that
- * the parser may break up a long sequence of characters into
- * smaller chunks and call this method once for each chunk.
- * <p>Do <em>not</em> attempt to read more than <var>length</var>
- * characters from the array, or to read before the
- * <var>start</var> position.
- * @param ch The character data.
- * @param start The starting position in the array.
- * @param length The number of characters available.
- * @exception java.lang.Exception The handler may throw any exception.
- */
- public void charData (char ch[], int start, int length)
- throws java.lang.Exception;
-
-
- /**
- * Ignorable whitespace.
- * <p>Ælfred will call this method once for each sequence
- * of ignorable whitespace in element content (never in mixed content).
- * <p>For details, see section 2.10 of the XML 1.0 recommendation.
- * <p>Do <em>not</em> attempt to read more than <var>length</var>
- * characters from the array or to read before the <var>start</var>
- * position.
- * @param ch The literal whitespace characters.
- * @param start The starting position in the array.
- * @param length The number of whitespace characters available.
- * @exception java.lang.Exception The handler may throw any exception.
- */
- public void ignorableWhitespace (char ch[], int start, int length)
- throws java.lang.Exception;
-
-
- /**
- * Processing instruction.
- * <p>Ælfred will call this method once for each
- * processing instruction. Note that processing instructions may
- * appear outside of the top-level element. The
- * @param target The target (the name at the start of the PI).
- * @param data The data, if any (the rest of the PI).
- * @exception java.lang.Exception The handler may throw any exception.
- */
- public void processingInstruction (String target, String data)
- throws java.lang.Exception;
-
-
- /**
- * Fatal XML parsing error.
- * <p>Ælfred will call this method whenever it encounters
- * a serious error. The parser will attempt to continue past this
- * point so that you can find more possible error points, but if
- * this method is called you should assume that the document is
- * corrupt and you should not try to use its contents.
- * <p>Note that you can use the <code>XmlException</code> class
- * to encapsulate all of the information provided, though the
- * use of the class is not mandatory.
- * @param message The error message.
- * @param systemId The system identifier of the entity that
- * contains the error.
- * @param line The approximate line number of the error.
- * @param column The approximate column number of the error.
- * @exception java.lang.Exception The handler may throw any exception.
- * @see XmlException
- */
- public void error (String message, String systemId, int line, int column)
- throws java.lang.Exception;
-
-}
diff --git a/jEdit/com/microstar/xml/XmlParser.java b/jEdit/com/microstar/xml/XmlParser.java
deleted file mode 100644
index b7ca124..0000000
--- a/jEdit/com/microstar/xml/XmlParser.java
+++ /dev/null
@@ -1,4377 +0,0 @@
-// XmlParser.java: the main parser class.
-// NO WARRANTY! See README, and copyright below.
-// $Id: XmlParser.java 14583 2009-02-06 05:38:53Z ezust $
-
-package com.microstar.xml;
-
-import java.io.BufferedInputStream;
-import java.io.EOFException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Stack;
-
-
-/**
- * Parse XML documents and return parse events through call-backs.
- * <p>You need to define a class implementing the <code>XmlHandler</code>
- * interface: an object belonging to this class will receive the
- * callbacks for the events. (As an alternative to implementing
- * the full XmlHandler interface, you can simply extend the
- * <code>HandlerBase</code> convenience class.)
- * <p>Usage (assuming that <code>MyHandler</code> is your implementation
- * of the <code>XmlHandler</code> interface):
- * <pre>
- * XmlHandler handler = new MyHandler();
- * XmlParser parser = new XmlParser();
- * parser.setHandler(handler);
- * try {
- * parser.parse("http://www.host.com/doc.xml", null);
- * } catch (Exception e) {
- * [do something interesting]
- * }
- * </pre>
- * @author Copyright (c) 1997, 1998 by Microstar Software Ltd.
- * @author Written by David Megginson <dmeggins at microstar.com>
- * @version 1.1
- * @deprecated use org.xml.sax.XMLReader
- */
-public class XmlParser {
-
- //
- // Use special cheats that speed up the code (currently about 50%),
- // but may cause problems with future maintenance and add to the
- // class file size (about 500 bytes).
- //
- private final static boolean USE_CHEATS = true;
-
-
-
- //////////////////////////////////////////////////////////////////////
- // Constructors.
- ////////////////////////////////////////////////////////////////////////
-
-
- /**
- * Construct a new parser with no associated handler.
- * @see #setHandler
- * @see #parse
- */
- public XmlParser ()
- {
- }
-
-
- /**
- * Set the handler that will receive parsing events.
- * @param handler The handler to receive callback events.
- * @see #parse
- * @see XmlHandler
- */
- public void setHandler (XmlHandler handler)
- {
- this.handler = handler;
- }
-
-
- /**
- * Parse an XML document from a URI.
- * <p>You may parse a document more than once, but only one thread
- * may call this method for an object at one time.
- * @param systemId The URI of the document.
- * @param publicId The public identifier of the document, or null.
- * @param encoding The suggested encoding, or null if unknown.
- * @exception java.lang.Exception Any exception thrown by your
- * own handlers, or any derivation of java.io.IOException
- * thrown by the parser itself.
- */
- public void parse (String systemId, String publicId, String encoding)
- throws java.lang.Exception
- {
- doParse(systemId, publicId, null, null, encoding);
- }
-
-
- /**
- * Parse an XML document from a byte stream.
- * <p>The URI that you supply will become the base URI for
- * resolving relative links, but Ælfred will actually read
- * the document from the supplied input stream.
- * <p>You may parse a document more than once, but only one thread
- * may call this method for an object at one time.
- * @param systemId The base URI of the document, or null if not
- * known.
- * @param publicId The public identifier of the document, or null
- * if not known.
- * @param stream A byte input stream.
- * @param encoding The suggested encoding, or null if unknown.
- * @exception java.lang.Exception Any exception thrown by your
- * own handlers, or any derivation of java.io.IOException
- * thrown by the parser itself.
- */
- public void parse (String systemId, String publicId,
- InputStream stream, String encoding)
- throws java.lang.Exception
- {
- doParse(systemId, publicId, null, stream, encoding);
- }
-
-
- /**
- * Parse an XML document from a character stream.
- * <p>The URI that you supply will become the base URI for
- * resolving relative links, but Ælfred will actually read
- * the document from the supplied input stream.
- * <p>You may parse a document more than once, but only one thread
- * may call this method for an object at one time.
- * @param systemId The base URI of the document, or null if not
- * known.
- * @param publicId The public identifier of the document, or null
- * if not known.
- * @param reader A character stream.
- * @exception java.lang.Exception Any exception thrown by your
- * own handlers, or any derivation of java.io.IOException
- * thrown by the parser itself.
- */
- public void parse (String systemId, String publicId, Reader reader)
- throws java.lang.Exception
- {
- doParse(systemId, publicId, reader, null, null);
- }
-
-
- private synchronized void doParse (String systemId, String publicId,
- Reader reader, InputStream stream,
- String encoding)
- throws java.lang.Exception
- {
- basePublicId = publicId;
- baseURI = systemId;
- baseReader = reader;
- baseInputStream = stream;
-
- initializeVariables();
-
- // Set the default entities here.
- setInternalEntity(intern("amp"), "&");
- setInternalEntity(intern("lt"), "<");
- setInternalEntity(intern("gt"), ">");
- setInternalEntity(intern("apos"), "'");
- setInternalEntity(intern("quot"), """);
-
- if (handler != null) {
- handler.startDocument();
- }
-
- pushURL("[document]", basePublicId, baseURI, baseReader, baseInputStream,
- encoding);
-
- parseDocument();
-
- if (handler != null) {
- handler.endDocument();
- }
- cleanupVariables();
- }
-
-
-
- ////////////////////////////////////////////////////////////////////////
- // Constants.
- ////////////////////////////////////////////////////////////////////////
-
- //
- // Constants for element content type.
- //
-
- /**
- * Constant: an element has not been declared.
- * @see #getElementContentType
- */
- public final static int CONTENT_UNDECLARED = 0;
-
- /**
- * Constant: the element has a content model of ANY.
- * @see #getElementContentType
- */
- public final static int CONTENT_ANY = 1;
-
- /**
- * Constant: the element has declared content of EMPTY.
- * @see #getElementContentType
- */
- public final static int CONTENT_EMPTY = 2;
-
- /**
- * Constant: the element has mixed content.
- * @see #getElementContentType
- */
- public final static int CONTENT_MIXED = 3;
-
- /**
- * Constant: the element has element content.
- * @see #getElementContentType
- */
- public final static int CONTENT_ELEMENTS = 4;
-
-
- //
- // Constants for the entity type.
- //
-
- /**
- * Constant: the entity has not been declared.
- * @see #getEntityType
- */
- public final static int ENTITY_UNDECLARED = 0;
-
- /**
- * Constant: the entity is internal.
- * @see #getEntityType
- */
- public final static int ENTITY_INTERNAL = 1;
-
- /**
- * Constant: the entity is external, non-XML data.
- * @see #getEntityType
- */
- public final static int ENTITY_NDATA = 2;
-
- /**
- * Constant: the entity is external XML data.
- * @see #getEntityType
- */
- public final static int ENTITY_TEXT = 3;
-
-
- //
- // Constants for attribute type.
- //
-
- /**
- * Constant: the attribute has not been declared for this element type.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_UNDECLARED = 0;
-
- /**
- * Constant: the attribute value is a string value.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_CDATA = 1;
-
- /**
- * Constant: the attribute value is a unique identifier.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_ID = 2;
-
- /**
- * Constant: the attribute value is a reference to a unique identifier.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_IDREF = 3;
-
- /**
- * Constant: the attribute value is a list of ID references.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_IDREFS = 4;
-
- /**
- * Constant: the attribute value is the name of an entity.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_ENTITY = 5;
-
- /**
- * Constant: the attribute value is a list of entity names.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_ENTITIES = 6;
-
- /**
- * Constant: the attribute value is a name token.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_NMTOKEN = 7;
-
- /**
- * Constant: the attribute value is a list of name tokens.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_NMTOKENS = 8;
-
- /**
- * Constant: the attribute value is a token from an enumeration.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_ENUMERATED = 9;
-
- /**
- * Constant: the attribute is the name of a notation.
- * @see #getAttributeType
- */
- public final static int ATTRIBUTE_NOTATION = 10;
-
-
- //
- // When the class is loaded, populate the hash table of
- // attribute types.
- //
-
- /**
- * Hash table of attribute types.
- */
- private static Hashtable attributeTypeHash;
- static {
- attributeTypeHash = new Hashtable();
- attributeTypeHash.put("CDATA", new Integer(ATTRIBUTE_CDATA));
- attributeTypeHash.put("ID", new Integer(ATTRIBUTE_ID));
- attributeTypeHash.put("IDREF", new Integer(ATTRIBUTE_IDREF));
- attributeTypeHash.put("IDREFS", new Integer(ATTRIBUTE_IDREFS));
- attributeTypeHash.put("ENTITY", new Integer(ATTRIBUTE_ENTITY));
- attributeTypeHash.put("ENTITIES", new Integer(ATTRIBUTE_ENTITIES));
- attributeTypeHash.put("NMTOKEN", new Integer(ATTRIBUTE_NMTOKEN));
- attributeTypeHash.put("NMTOKENS", new Integer(ATTRIBUTE_NMTOKENS));
- attributeTypeHash.put("NOTATION", new Integer(ATTRIBUTE_NOTATION));
- }
-
-
- //
- // Constants for supported encodings.
- //
- private final static int ENCODING_UTF_8 = 1;
- private final static int ENCODING_ISO_8859_1 = 2;
- private final static int ENCODING_UCS_2_12 = 3;
- private final static int ENCODING_UCS_2_21 = 4;
- private final static int ENCODING_UCS_4_1234 = 5;
- private final static int ENCODING_UCS_4_4321 = 6;
- private final static int ENCODING_UCS_4_2143 = 7;
- private final static int ENCODING_UCS_4_3412 = 8;
-
-
- //
- // Constants for attribute default value.
- //
-
- /**
- * Constant: the attribute is not declared.
- * @see #getAttributeDefaultValueType
- */
- public final static int ATTRIBUTE_DEFAULT_UNDECLARED = 0;
-
- /**
- * Constant: the attribute has a literal default value specified.
- * @see #getAttributeDefaultValueType
- * @see #getAttributeDefaultValue
- */
- public final static int ATTRIBUTE_DEFAULT_SPECIFIED = 1;
-
- /**
- * Constant: the attribute was declared #IMPLIED.
- * @see #getAttributeDefaultValueType
- */
- public final static int ATTRIBUTE_DEFAULT_IMPLIED = 2;
-
- /**
- * Constant: the attribute was declared #REQUIRED.
- * @see #getAttributeDefaultValueType
- */
- public final static int ATTRIBUTE_DEFAULT_REQUIRED = 3;
-
- /**
- * Constant: the attribute was declared #FIXED.
- * @see #getAttributeDefaultValueType
- * @see #getAttributeDefaultValue
- */
- public final static int ATTRIBUTE_DEFAULT_FIXED = 4;
-
-
- //
- // Constants for input.
- //
- private final static int INPUT_NONE = 0;
- private final static int INPUT_INTERNAL = 1;
- private final static int INPUT_EXTERNAL = 2;
- private final static int INPUT_STREAM = 3;
- private final static int INPUT_BUFFER = 4;
- private final static int INPUT_READER = 5;
-
-
- //
- // Flags for reading literals.
- //
- private final static int LIT_CHAR_REF = 1;
- private final static int LIT_ENTITY_REF = 2;
- private final static int LIT_PE_REF = 4;
- private final static int LIT_NORMALIZE = 8;
-
-
- //
- // Flags for parsing context.
- //
- private final static int CONTEXT_NONE = 0;
- private final static int CONTEXT_DTD = 1;
- private final static int CONTEXT_ENTITYVALUE = 2;
- private final static int CONTEXT_ATTRIBUTEVALUE = 3;
-
-
-
- //////////////////////////////////////////////////////////////////////
- // Error reporting.
- //////////////////////////////////////////////////////////////////////
-
-
- /**
- * Report an error.
- * @param message The error message.
- * @param textFound The text that caused the error (or null).
- * @see XmlHandler#error
- * @see #line
- */
- void error (String message, String textFound, String textExpected)
- throws java.lang.Exception
- {
- errorCount++;
- if (textFound != null) {
- message = message + " (found \"" + textFound + "\")";
- }
- if (textExpected != null) {
- message = message + " (expected \"" + textExpected + "\")";
- }
- if (handler != null) {
- String uri = null;
-
- if (externalEntity != null) {
- uri = externalEntity.getURL().toString();
- }
- handler.error(message, uri, line, column);
- }
- }
-
-
- /**
- * Report a serious error.
- * @param message The error message.
- * @param textFound The text that caused the error (or null).
- */
- void error (String message, char textFound, String textExpected)
- throws java.lang.Exception
- {
- error(message, new Character(textFound).toString(), textExpected);
- }
-
-
-
- //////////////////////////////////////////////////////////////////////
- // Major syntactic productions.
- //////////////////////////////////////////////////////////////////////
-
-
- /**
- * Parse an XML document.
- * <pre>
- * [1] document ::= prolog element Misc*
- * </pre>
- * <p>This is the top-level parsing function for a single XML
- * document. As a minimum, a well-formed document must have
- * a document element, and a valid document must have a prolog
- * as well.
- */
- void parseDocument ()
- throws java.lang.Exception
- {
- char c;
-
- parseProlog();
- require('<');
- parseElement();
- try
- {
- parseMisc(); //skip all white, PIs, and comments
- c=readCh(); //if this doesn't throw an exception...
- error("unexpected characters after document end",c,null);
- }
- catch (EOFException e)
- {return;}
- }
-
-
- /**
- * Skip a comment.
- * <pre>
- * [18] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* "-->"
- * </pre>
- * <p>(The <code><!--</code> has already been read.)
- */
- void parseComment ()
- throws java.lang.Exception
- {
- skipUntil("-->");
- }
-
-
- /**
- * Parse a processing instruction and do a call-back.
- * <pre>
- * [19] PI ::= '<?' Name (S (Char* - (Char* '?>' Char*)))? '?>'
- * </pre>
- * <p>(The <code><?</code> has already been read.)
- * <p>An XML processing instruction <em>must</em> begin with
- * a Name, which is the instruction's target.
- */
- void parsePI ()
- throws java.lang.Exception
- {
- String name;
-
- name = readNmtoken(true);
- if (!tryRead("?>")) {
- requireWhitespace();
- parseUntil("?>");
- }
- if (handler != null) {
- handler.processingInstruction(name, dataBufferToString());
- }
- }
-
-
- /**
- * Parse a CDATA marked section.
- * <pre>
- * [20] CDSect ::= CDStart CData CDEnd
- * [21] CDStart ::= '<![CDATA['
- * [22] CData ::= (Char* - (Char* ']]>' Char*))
- * [23] CDEnd ::= ']]>'
- * </pre>
- * <p>(The '<![CDATA[' has already been read.)
- * <p>Note that this just appends characters to the dataBuffer,
- * without actually generating an event.
- */
- void parseCDSect ()
- throws java.lang.Exception
- {
- parseUntil("]]>");
- }
-
-
- /**
- * Parse the prolog of an XML document.
- * <pre>
- * [24] prolog ::= XMLDecl? Misc* (Doctypedecl Misc*)?
- * </pre>
- * <p>There are a couple of tricks here. First, it is necessary to
- * declare the XML default attributes after the DTD (if present)
- * has been read. Second, it is not possible to expand general
- * references in attribute value literals until after the entire
- * DTD (if present) has been parsed.
- * <p>We do not look for the XML declaration here, because it is
- * handled by pushURL().
- * @see pushURL
- */
- void parseProlog ()
- throws java.lang.Exception
- {
- parseMisc();
-
- if (tryRead("<!DOCTYPE")) {
- parseDoctypedecl();
- parseMisc();
- }
- }
-
-
- /**
- * Parse the XML declaration.
- * <pre>
- * [25] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
- * [26] VersionInfo ::= S 'version' Eq ('"1.0"' | "'1.0'")
- * [33] SDDecl ::= S 'standalone' Eq "'" ('yes' | 'no') "'"
- * | S 'standalone' Eq '"' ("yes" | "no") '"'
- * [78] EncodingDecl ::= S 'encoding' Eq QEncoding
- * </pre>
- * <p>([80] to [82] are also significant.)
- * <p>(The <code><?xml</code> and whitespace have already been read.)
- * <p>TODO: validate value of standalone.
- * @see #parseTextDecl
- * @see #checkEncoding
- */
- void parseXMLDecl (boolean ignoreEncoding)
- throws java.lang.Exception
- {
- String version;
- String encodingName = null;
- String standalone = null;
-
- // Read the version.
- require("version");
- parseEq();
- version = readLiteral(0);
- if (!version.equals("1.0")) {
- error("unsupported XML version", version, "1.0");
- }
-
- // Try reading an encoding declaration.
- skipWhitespace();
- if (tryRead("encoding")) {
- parseEq();
- encodingName = readLiteral(0);
- checkEncoding(encodingName, ignoreEncoding);
- }
-
- // Try reading a standalone declaration
- skipWhitespace();
- if (tryRead("standalone")) {
- parseEq();
- standalone = readLiteral(0);
- }
-
- skipWhitespace();
- require("?>");
- }
-
-
- /**
- * Parse the Encoding PI.
- * <pre>
- * [78] EncodingDecl ::= S 'encoding' Eq QEncoding
- * [79] EncodingPI ::= '<?xml' S 'encoding' Eq QEncoding S? '?>'
- * [80] QEncoding ::= '"' Encoding '"' | "'" Encoding "'"
- * [81] Encoding ::= LatinName
- * [82] LatinName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
- * </pre>
- * <p>(The <code><?xml</code>' and whitespace have already been read.)
- * @see #parseXMLDecl
- * @see #checkEncoding
- */
- void parseTextDecl (boolean ignoreEncoding)
- throws java.lang.Exception
- {
- String encodingName = null;
-
- // Read an optional version.
- if (tryRead("version")) {
- String version;
- parseEq();
- version = readLiteral(0);
- if (!version.equals("1.0")) {
- error("unsupported XML version", version, "1.0");
- }
- requireWhitespace();
- }
-
-
- // Read the encoding.
- require("encoding");
- parseEq();
- encodingName = readLiteral(0);
- checkEncoding(encodingName, ignoreEncoding);
-
- skipWhitespace();
- require("?>");
- }
-
-
- /**
- * Check that the encoding specified makes sense.
- * <p>Compare what the author has specified in the XML declaration
- * or encoding PI with what we have detected.
- * <p>This is also important for distinguishing among the various
- * 7- and 8-bit encodings, such as ISO-LATIN-1 (I cannot autodetect
- * those).
- * @param encodingName The name of the encoding specified by the user.
- * @see #parseXMLDecl
- * @see #parseTextDecl
- */
- void checkEncoding (String encodingName, boolean ignoreEncoding)
- throws java.lang.Exception
- {
- encodingName = encodingName.toUpperCase();
-
- if (ignoreEncoding) {
- return;
- }
-
- switch (encoding) {
- // 8-bit encodings
- case ENCODING_UTF_8:
- if (encodingName.equals("ISO-8859-1")) {
- encoding = ENCODING_ISO_8859_1;
- } else if (!encodingName.equals("UTF-8")) {
- error("unsupported 8-bit encoding",
- encodingName,
- "UTF-8 or ISO-8859-1");
- }
- break;
- // 16-bit encodings
- case ENCODING_UCS_2_12:
- case ENCODING_UCS_2_21:
- if (!encodingName.equals("ISO-10646-UCS-2") &&
- !encodingName.equals("UTF-16")) {
- error("unsupported 16-bit encoding",
- encodingName,
- "ISO-10646-UCS-2");
- }
- break;
- // 32-bit encodings
- case ENCODING_UCS_4_1234:
- case ENCODING_UCS_4_4321:
- case ENCODING_UCS_4_2143:
- case ENCODING_UCS_4_3412:
- if (!encodingName.equals("ISO-10646-UCS-4")) {
- error("unsupported 32-bit encoding",
- encodingName,
- "ISO-10646-UCS-4");
- }
- }
- }
-
-
- /**
- * Parse miscellaneous markup outside the document element and DOCTYPE
- * declaration.
- * <pre>
- * [27] Misc ::= Comment | PI | S
- * </pre>
- */
- void parseMisc ()
- throws java.lang.Exception
- {
- while (true)
- {
- skipWhitespace();
- if (tryRead("<?"))
- {parsePI();}
- else if (tryRead("<!--"))
- {parseComment();}
- else
- {return;}
- }
- }
-
-
- /**
- * Parse a document type declaration.
- * <pre>
- * [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S?
- * ('[' %markupdecl* ']' S?)? '>'
- * </pre>
- * <p>(The <code><!DOCTYPE</code> has already been read.)
- */
- void parseDoctypedecl ()
- throws java.lang.Exception
- {
- char c;
- String doctypeName, ids[];
-
- // Read the document type name.
- requireWhitespace();
- doctypeName = readNmtoken(true);
-
- // Read the ExternalIDs.
- skipWhitespace();
- ids = readExternalIds(false);
-
- // Look for a declaration subset.
- skipWhitespace();
- if (tryRead('[')) {
-
- // loop until the subset ends
- while (true) {
- context = CONTEXT_DTD;
- skipWhitespace();
- context = CONTEXT_NONE;
- if (tryRead(']')) {
- break; // end of subset
- } else {
- context = CONTEXT_DTD;
- parseMarkupdecl();
- context = CONTEXT_NONE;
- }
- }
- }
-
- // Read the external subset, if any
- if (ids[1] != null) {
- pushURL("[external subset]", ids[0], ids[1], null, null, null);
-
- // Loop until we end up back at '>'
- while (true) {
- context = CONTEXT_DTD;
- skipWhitespace();
- context = CONTEXT_NONE;
- if (tryRead('>')) {
- break;
- } else {
- context = CONTEXT_DTD;
- parseMarkupdecl();
- context = CONTEXT_NONE;
- }
- }
- } else {
- // No external subset.
- skipWhitespace();
- require('>');
- }
-
- if (handler != null) {
- handler.doctypeDecl(doctypeName, ids[0], ids[1]);
- }
-
- // Expand general entities in
- // default values of attributes.
- // (Do this after the doctypeDecl
- // event!).
- // expandAttributeDefaultValues();
- }
-
-
- /**
- * Parse a markup declaration in the internal or external DTD subset.
- * <pre>
- * [29] markupdecl ::= ( %elementdecl | %AttlistDecl | %EntityDecl |
- * %NotationDecl | %PI | %S | %Comment |
- * InternalPERef )
- * [30] InternalPERef ::= PEReference
- * [31] extSubset ::= (%markupdecl | %conditionalSect)*
- * </pre>
- */
- void parseMarkupdecl ()
- throws java.lang.Exception
- {
- if (tryRead("<!ELEMENT")) {
- parseElementdecl();
- } else if (tryRead("<!ATTLIST")) {
- parseAttlistDecl();
- } else if (tryRead("<!ENTITY")) {
- parseEntityDecl();
- } else if (tryRead("<!NOTATION")) {
- parseNotationDecl();
- } else if (tryRead("<?")) {
- parsePI();
- } else if (tryRead("<!--")) {
- parseComment();
- } else if (tryRead("<![")) {
- parseConditionalSect();
- } else {
- error("expected markup declaration", null, null);
- }
- }
-
-
- /**
- * Parse an element, with its tags.
- * <pre>
- * [33] STag ::= '<' Name (S Attribute)* S? '>' [WFC: unique Att spec]
- * [38] element ::= EmptyElement | STag content ETag
- * [39] EmptyElement ::= '<' Name (S Attribute)* S? '/>'
- * [WFC: unique Att spec]
- * </pre>
- * <p>(The '<' has already been read.)
- * <p>NOTE: this method actually chains onto parseContent(), if necessary,
- * and parseContent() will take care of calling parseETag().
- */
- void parseElement ()
- throws java.lang.Exception
- {
- String gi;
- char c;
- int oldElementContent = currentElementContent;
- String oldElement = currentElement;
-
- // This is the (global) counter for the
- // array of specified attributes.
- tagAttributePos = 0;
-
- // Read the element type name.
- gi = readNmtoken(true);
-
- // Determine the current content type.
- currentElement = gi;
- currentElementContent = getElementContentType(gi);
- if (currentElementContent == CONTENT_UNDECLARED) {
- currentElementContent = CONTENT_ANY;
- }
-
- // Read the attributes, if any.
- // After this loop, we should be just
- // in front of the closing delimiter.
- skipWhitespace();
- c = readCh();
- while (c != '/' && c != '>') {
- unread(c);
- parseAttribute(gi);
- skipWhitespace();
- c = readCh();
- }
- unread(c);
-
- // Supply any defaulted attributes.
- Enumeration atts = declaredAttributes(gi);
- if (atts != null) {
- String aname;
- loop: while (atts.hasMoreElements()) {
- aname = (String)atts.nextElement();
- // See if it was specified.
- for (int i = 0; i < tagAttributePos; i++) {
- if (tagAttributes[i] == aname) {
- continue loop;
- }
- }
- // I guess not...
- if (handler != null) {
- handler.attribute(aname,
- getAttributeExpandedValue(gi, aname),
- false);
- }
- }
- }
-
- // Figure out if this is a start tag
- // or an empty element, and dispatch an
- // event accordingly.
- c = readCh();
- switch (c) {
- case '>':
- if (handler != null) {
- handler.startElement(gi);
- }
- parseContent();
- break;
- case '/':
- require('>');
- if (handler != null) {
- handler.startElement(gi);
- handler.endElement(gi);
- }
- break;
- }
-
- // Restore the previous state.
- currentElement = oldElement;
- currentElementContent = oldElementContent;
- }
-
-
- /**
- * Parse an attribute assignment.
- * <pre>
- * [34] Attribute ::= Name Eq AttValue
- * </pre>
- * @param name The name of the attribute's element.
- * @see XmlHandler#attribute
- */
- void parseAttribute (String name)
- throws java.lang.Exception
- {
- String aname;
- int type;
- String value;
-
- // Read the attribute name.
- aname = readNmtoken(true).intern();
- type = getAttributeDefaultValueType(name, aname);
-
- // Parse '='
- parseEq();
-
- // Read the value, normalizing whitespace
- // if it is not CDATA.
- if (type == ATTRIBUTE_CDATA || type == ATTRIBUTE_UNDECLARED) {
- value = readLiteral(LIT_CHAR_REF | LIT_ENTITY_REF);
- } else {
- value = readLiteral(LIT_CHAR_REF | LIT_ENTITY_REF | LIT_NORMALIZE);
- }
-
- // Inform the handler about the
- // attribute.
- if (handler != null) {
- handler.attribute(aname, value, true);
- }
- dataBufferPos = 0;
-
- // Note that the attribute has been
- // specified.
- if (tagAttributePos == tagAttributes.length) {
- String newAttrib[] = new String[tagAttributes.length * 2];
- System.arraycopy(tagAttributes, 0, newAttrib, 0, tagAttributePos);
- tagAttributes = newAttrib;
- }
- tagAttributes[tagAttributePos++] = aname;
- }
-
-
- /**
- * Parse an equals sign surrounded by optional whitespace.
- * [35] Eq ::= S? '=' S?
- */
- void parseEq ()
- throws java.lang.Exception
- {
- skipWhitespace();
- require('=');
- skipWhitespace();
- }
-
-
- /**
- * Parse an end tag.
- * [36] ETag ::= '</' Name S? '>'
- * *NOTE: parseContent() chains to here.
- */
- void parseETag ()
- throws java.lang.Exception
- {
- String name;
- name = readNmtoken(true);
- if (name != currentElement) {
- error("mismatched end tag", name, currentElement);
- }
- skipWhitespace();
- require('>');
- if (handler != null) {
- handler.endElement(name);
- }
- }
-
-
- /**
- * Parse the content of an element.
- * [37] content ::= (element | PCData | Reference | CDSect | PI | Comment)*
- * [68] Reference ::= EntityRef | CharRef
- */
- void parseContent ()
- throws java.lang.Exception
- {
- String data;
- char c;
-
- while (true) {
-
- switch (currentElementContent) {
- case CONTENT_ANY:
- case CONTENT_MIXED:
- parsePCData();
- break;
- case CONTENT_ELEMENTS:
- parseWhitespace();
- break;
- }
-
- // Handle delimiters
- c = readCh();
- switch (c) {
-
- case '&': // Found "&"
- c = readCh();
- if (c == '#') {
- parseCharRef();
- } else {
- unread(c);
- parseEntityRef(true);
- }
- break;
-
- case '<': // Found "<"
-
- c = readCh();
- switch (c) {
-
- case '!': // Found "<!"
- c = readCh();
- switch (c) {
- case '-': // Found "<!-"
- require('-');
- parseComment();
- break;
- case '[': // Found "<!["
- require("CDATA[");
- parseCDSect();
- break;
- default:
- error("expected comment or CDATA section", c, null);
- break;
- }
- break;
-
- case '?': // Found "<?"
- dataBufferFlush();
- parsePI();
- break;
-
- case '/': // Found "</"
- dataBufferFlush();
- parseETag();
- return;
-
- default: // Found "<" followed by something else
- dataBufferFlush();
- unread(c);
- parseElement();
- break;
- }
- }
- }
- }
-
-
- /**
- * Parse an element type declaration.
- * [40] elementdecl ::= '<!ELEMENT' S %Name S (%S S)? %contentspec S? '>'
- * [VC: Unique Element Declaration]
- * *NOTE: the '<!ELEMENT' has already been read.
- */
- void parseElementdecl ()
- throws java.lang.Exception
- {
- String name;
-
- requireWhitespace();
- // Read the element type name.
- name = readNmtoken(true);
-
- requireWhitespace();
- // Read the content model.
- parseContentspec(name);
-
- skipWhitespace();
- require('>');
- }
-
-
- /**
- * Content specification.
- * [41] contentspec ::= 'EMPTY' | 'ANY' | Mixed | elements
- */
- void parseContentspec (String name)
- throws java.lang.Exception
- {
- if (tryRead("EMPTY")) {
- setElement(name, CONTENT_EMPTY, null, null);
- return;
- } else if (tryRead("ANY")) {
- setElement(name, CONTENT_ANY, null, null);
- return;
- } else {
- require('(');
- dataBufferAppend('(');
- skipWhitespace();
- if (tryRead("#PCDATA")) {
- dataBufferAppend("#PCDATA");
- parseMixed();
- setElement(name, CONTENT_MIXED, dataBufferToString(), null);
- } else {
- parseElements();
- setElement(name, CONTENT_ELEMENTS, dataBufferToString(), null);
- }
- }
- }
-
-
- /**
- * Parse an element-content model.
- * [42] elements ::= (choice | seq) ('?' | '*' | '+')?
- * [44] cps ::= S? %cp S?
- * [45] choice ::= '(' S? %ctokplus (S? '|' S? %ctoks)* S? ')'
- * [46] ctokplus ::= cps ('|' cps)+
- * [47] ctoks ::= cps ('|' cps)*
- * [48] seq ::= '(' S? %stoks (S? ',' S? %stoks)* S? ')'
- * [49] stoks ::= cps (',' cps)*
- * *NOTE: the opening '(' and S have already been read.
- * *TODO: go over parameter entity boundaries more carefully.
- */
- void parseElements ()
- throws java.lang.Exception
- {
- char c;
- char sep;
-
- // Parse the first content particle
- skipWhitespace();
- parseCp();
-
- // Check for end or for a separator.
- skipWhitespace();
- c = readCh();
- switch (c) {
- case ')':
- dataBufferAppend(')');
- c = readCh();
- switch (c) {
- case '*':
- case '+':
- case '?':
- dataBufferAppend(c);
- break;
- default:
- unread(c);
- }
- return;
- case ',': // Register the separator.
- case '|':
- sep = c;
- dataBufferAppend(c);
- break;
- default:
- error("bad separator in content model", c, null);
- return;
- }
-
- // Parse the rest of the content model.
- while (true) {
- skipWhitespace();
- parseCp();
- skipWhitespace();
- c = readCh();
- if (c == ')') {
- dataBufferAppend(')');
- break;
- } else if (c != sep) {
- error("bad separator in content model", c, null);
- return;
- } else {
- dataBufferAppend(c);
- }
- }
-
- // Check for the occurrence indicator.
- c = readCh();
- switch (c) {
- case '?':
- case '*':
- case '+':
- dataBufferAppend(c);
- return;
- default:
- unread(c);
- return;
- }
- }
-
-
- /**
- * Parse a content particle.
- * [43] cp ::= (Name | choice | seq) ('?' | '*' | '+')
- * *NOTE: I actually use a slightly different production here:
- * cp ::= (elements | (Name ('?' | '*' | '+')?))
- */
- void parseCp ()
- throws java.lang.Exception
- {
- char c;
-
- if (tryRead('(')) {
- dataBufferAppend('(');
- parseElements();
- } else {
- dataBufferAppend(readNmtoken(true));
- c = readCh();
- switch (c) {
- case '?':
- case '*':
- case '+':
- dataBufferAppend(c);
- break;
- default:
- unread(c);
- break;
- }
- }
- }
-
-
- /**
- * Parse mixed content.
- * [50] Mixed ::= '(' S? %( %'#PCDATA' (S? '|' S? %Mtoks)* ) S? ')*'
- * | '(' S? %('#PCDATA') S? ')'
- * [51] Mtoks ::= %Name (S? '|' S? %Name)*
- * *NOTE: the S and '#PCDATA' have already been read.
- */
- void parseMixed ()
- throws java.lang.Exception
- {
- char c;
-
- // Check for PCDATA alone.
- skipWhitespace();
- if (tryRead(')')) {
- dataBufferAppend(")*");
- tryRead('*');
- return;
- }
-
- // Parse mixed content.
- skipWhitespace();
- while (!tryRead(")*")) {
- require('|');
- dataBufferAppend('|');
- skipWhitespace();
- dataBufferAppend(readNmtoken(true));
- skipWhitespace();
- }
- dataBufferAppend(")*");
- }
-
-
- /**
- * Parse an attribute list declaration.
- * [52] AttlistDecl ::= '<!ATTLIST' S %Name S? %AttDef+ S? '>'
- * *NOTE: the '<!ATTLIST' has already been read.
- */
- void parseAttlistDecl ()
- throws java.lang.Exception
- {
- String elementName;
-
- requireWhitespace();
- elementName = readNmtoken(true);
- requireWhitespace();
- while (!tryRead('>')) {
- parseAttDef(elementName);
- skipWhitespace();
- }
- }
-
-
- /**
- * Parse a single attribute definition.
- * [53] AttDef ::= S %Name S %AttType S %Default
- */
- void parseAttDef (String elementName)
- throws java.lang.Exception
- {
- String name;
- int type;
- String enumeration = null;
-
- // Read the attribute name.
- name = readNmtoken(true);
-
- // Read the attribute type.
- requireWhitespace();
- type = readAttType();
-
- // Get the string of enumerated values
- // if necessary.
- if (type == ATTRIBUTE_ENUMERATED || type == ATTRIBUTE_NOTATION) {
- enumeration = dataBufferToString();
- }
-
- // Read the default value.
- requireWhitespace();
- parseDefault(elementName, name, type, enumeration);
- }
-
-
- /**
- * Parse the attribute type.
- * [54] AttType ::= StringType | TokenizedType | EnumeratedType
- * [55] StringType ::= 'CDATA'
- * [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' |
- * 'NMTOKEN' | 'NMTOKENS'
- * [57] EnumeratedType ::= NotationType | Enumeration
- * *TODO: validate the type!!
- */
- int readAttType ()
- throws java.lang.Exception
- {
- String typeString;
- Integer type;
-
- if (tryRead('(')) {
- parseEnumeration();
- return ATTRIBUTE_ENUMERATED;
- } else {
- typeString = readNmtoken(true);
- if (typeString.equals("NOTATION")) {
- parseNotationType();
- }
- type = (Integer)attributeTypeHash.get(typeString);
- if (type == null) {
- error("illegal attribute type", typeString, null);
- return ATTRIBUTE_UNDECLARED;
- } else {
- return type.intValue();
- }
- }
- }
-
-
- /**
- * Parse an enumeration.
- * [60] Enumeration ::= '(' S? %Etoks (S? '|' S? %Etoks)* S? ')'
- * [61] Etoks ::= %Nmtoken (S? '|' S? %Nmtoken)*
- * *NOTE: the '(' has already been read.
- */
- void parseEnumeration ()
- throws java.lang.Exception
- {
- char c;
-
- dataBufferAppend('(');
-
- // Read the first token.
- skipWhitespace();
- dataBufferAppend(readNmtoken(true));
- // Read the remaining tokens.
- skipWhitespace();
- while (!tryRead(')')) {
- require('|');
- dataBufferAppend('|');
- skipWhitespace();
- dataBufferAppend(readNmtoken(true));
- skipWhitespace();
- }
- dataBufferAppend(')');
- }
-
-
- /**
- * Parse a notation type for an attribute.
- * [58] NotationType ::= %'NOTATION' S '(' S? %Ntoks (S? '|' S? %Ntoks)*
- * S? ')'
- * [59] Ntoks ::= %Name (S? '|' S? %Name)
- * *NOTE: the 'NOTATION' has already been read
- */
- void parseNotationType ()
- throws java.lang.Exception
- {
- requireWhitespace();
- require('(');
-
- parseEnumeration();
- }
-
-
- /**
- * Parse the default value for an attribute.
- * [62] Default ::= '#REQUIRED' | '#IMPLIED' | ((%'#FIXED' S)? %AttValue
- */
- void parseDefault (String elementName, String name, int type, String enumeration)
- throws java.lang.Exception
- {
- int valueType = ATTRIBUTE_DEFAULT_SPECIFIED;
- String value = null;
- boolean normalizeWSFlag;
-
- if (tryRead('#')) {
- if (tryRead("FIXED")) {
- valueType = ATTRIBUTE_DEFAULT_FIXED;
- requireWhitespace();
- context = CONTEXT_ATTRIBUTEVALUE;
- value = readLiteral(LIT_CHAR_REF);
- context = CONTEXT_DTD;
- } else if (tryRead("REQUIRED")) {
- valueType = ATTRIBUTE_DEFAULT_REQUIRED;
- } else if (tryRead("IMPLIED")) {
- valueType = ATTRIBUTE_DEFAULT_IMPLIED;
- } else {
- error("illegal keyword for attribute default value", null, null);
- }
- } else {
- context = CONTEXT_ATTRIBUTEVALUE;
- value = readLiteral(LIT_CHAR_REF);
- context = CONTEXT_DTD;
- }
- setAttribute(elementName, name, type, enumeration, value, valueType);
- }
-
-
- /**
- * Parse a conditional section.
- * [63] conditionalSect ::= includeSect || ignoreSect
- * [64] includeSect ::= '<![' %'INCLUDE' '[' (%markupdecl*)* ']]>'
- * [65] ignoreSect ::= '<![' %'IGNORE' '[' ignoreSectContents* ']]>'
- * [66] ignoreSectContents ::= ((SkipLit | Comment | PI) -(Char* ']]>'))
- * | ('<![' ignoreSectContents* ']]>')
- * | (Char - (']' | [<'"]))
- * | ('<!' (Char - ('-' | '[')))
- * *NOTE: the '<![' has already been read.
- * *TODO: verify that I am handling ignoreSectContents right.
- */
- void parseConditionalSect ()
- throws java.lang.Exception
- {
- skipWhitespace();
- if (tryRead("INCLUDE")) {
- skipWhitespace();
- require('[');
- skipWhitespace();
- while (!tryRead("]]>")) {
- parseMarkupdecl();
- skipWhitespace();
- }
- } else if (tryRead("IGNORE")) {
- skipWhitespace();
- require('[');
- int nesting = 1;
- char c;
- for (int nest = 1; nest > 0; ) {
- c = readCh();
- switch (c) {
- case '<':
- if (tryRead("![")) {
- nest++;
- }
- case ']':
- if (tryRead("]>")) {
- nest--;
- }
- }
- }
- } else {
- error("conditional section must begin with INCLUDE or IGNORE",
- null, null);
- }
- }
-
-
- /**
- * Read a character reference.
- * [67] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
- * *NOTE: the '&#' has already been read.
- */
- void parseCharRef ()
- throws java.lang.Exception
- {
- int value = 0;
- char c;
-
- if (tryRead('x')) {
- loop1: while (true) {
- c = readCh();
- switch (c) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'a':
- case 'A':
- case 'b':
- case 'B':
- case 'c':
- case 'C':
- case 'd':
- case 'D':
- case 'e':
- case 'E':
- case 'f':
- case 'F':
- value *= 16;
- value += Integer.parseInt(new Character(c).toString(), 16);
- break;
- case ';':
- break loop1;
- default:
- error("illegal character in character reference", c, null);
- break loop1;
- }
- }
- } else {
- loop2: while (true) {
- c = readCh();
- switch (c) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- value *= 10;
- value += Integer.parseInt(new Character(c).toString(), 10);
- break;
- case ';':
- break loop2;
- default:
- error("illegal character in character reference", c, null);
- break loop2;
- }
- }
- }
-
- // Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz
- // (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz:
- if (value <= 0x0000ffff) {
- // no surrogates needed
- dataBufferAppend((char)value);
- } else if (value <= 0x000fffff) {
- // > 16 bits, surrogate needed
- dataBufferAppend((char)(0xd8 | ((value & 0x000ffc00) >> 10)));
- dataBufferAppend((char)(0xdc | (value & 0x0003ff)));
- } else {
- // too big for surrogate
- error("character reference " + value + " is too large for UTF-16",
- new Integer(value).toString(), null);
- }
- }
-
-
- /**
- * Parse a reference.
- * [69] EntityRef ::= '&' Name ';'
- * *NOTE: the '&' has already been read.
- * @param externalAllowed External entities are allowed here.
- */
- void parseEntityRef (boolean externalAllowed)
- throws java.lang.Exception
- {
- String name;
-
- name = readNmtoken(true);
- require(';');
- switch (getEntityType(name)) {
- case ENTITY_UNDECLARED:
- error("reference to undeclared entity", name, null);
- break;
- case ENTITY_INTERNAL:
- pushString(name, getEntityValue(name));
- break;
- case ENTITY_TEXT:
- if (externalAllowed) {
- pushURL(name, getEntityPublicId(name),
- getEntitySystemId(name),
- null, null, null);
- } else {
- error("reference to external entity in attribute value.", name, null);
- }
- break;
- case ENTITY_NDATA:
- if (externalAllowed) {
- error("data entity reference in content", name, null);
- } else {
- error("reference to external entity in attribute value.", name, null);
- }
- break;
- }
- }
-
-
- /**
- * Parse a parameter entity reference.
- * [70] PEReference ::= '%' Name ';'
- * *NOTE: the '%' has already been read.
- */
- void parsePEReference (boolean isEntityValue)
- throws java.lang.Exception
- {
- String name;
-
- name = "%" + readNmtoken(true);
- require(';');
- switch (getEntityType(name)) {
- case ENTITY_UNDECLARED:
- error("reference to undeclared parameter entity", name, null);
- break;
- case ENTITY_INTERNAL:
- if (isEntityValue) {
- pushString(name, getEntityValue(name));
- } else {
- pushString(name, " " + getEntityValue(name) + ' ');
- }
- break;
- case ENTITY_TEXT:
- if (isEntityValue) {
- pushString(null, " ");
- }
- pushURL(name, getEntityPublicId(name),
- getEntitySystemId(name),
- null, null, null);
- if (isEntityValue) {
- pushString(null, " ");
- }
- break;
- }
- }
-
-
- /**
- * Parse an entity declaration.
- * [71] EntityDecl ::= '<!ENTITY' S %Name S %EntityDef S? '>'
- * | '<!ENTITY' S '%' S %Name S %EntityDef S? '>'
- * [72] EntityDef ::= EntityValue | ExternalDef
- * [73] ExternalDef ::= ExternalID %NDataDecl?
- * [74] ExternalID ::= 'SYSTEM' S SystemLiteral
- * | 'PUBLIC' S PubidLiteral S SystemLiteral
- * [75] NDataDecl ::= S %'NDATA' S %Name
- * *NOTE: the '<!ENTITY' has already been read.
- */
- void parseEntityDecl ()
- throws java.lang.Exception
- {
- char c;
- boolean peFlag = false;
- String name, value, notationName, ids[];
-
- // Check for a parameter entity.
- requireWhitespace();
- if (tryRead('%')) {
- peFlag = true;
- requireWhitespace();
- }
-
- // Read the entity name, and prepend
- // '%' if necessary.
- name = readNmtoken(true);
- if (peFlag) {
- name = "%" + name;
- }
-
- // Read the entity value.
- requireWhitespace();
- c = readCh();
- unread(c);
- if (c == '"' || c == '\'') {
- // Internal entity.
- context = CONTEXT_ENTITYVALUE;
- value = readLiteral(LIT_CHAR_REF|LIT_PE_REF);
- context = CONTEXT_DTD;
- setInternalEntity(name,value);
- } else {
- // Read the external IDs
- ids = readExternalIds(false);
- if (ids[1] == null) {
- error("system identifer missing", name, null);
- }
-
- // Check for NDATA declaration.
- skipWhitespace();
- if (tryRead("NDATA")) {
- requireWhitespace();
- notationName = readNmtoken(true);
- setExternalDataEntity(name, ids[0], ids[1], notationName);
- } else {
- setExternalTextEntity(name, ids[0], ids[1]);
- }
- }
-
- // Finish the declaration.
- skipWhitespace();
- require('>');
- }
-
-
- /**
- * Parse a notation declaration.
- * [81] NotationDecl ::= '<!NOTATION' S %Name S %ExternalID S? '>'
- * *NOTE: the '<!NOTATION' has already been read.
- */
- void parseNotationDecl ()
- throws java.lang.Exception
- {
- String nname, ids[];
-
-
- requireWhitespace();
- nname = readNmtoken(true);
-
- requireWhitespace();
-
- // Read the external identifiers.
- ids = readExternalIds(true);
- if (ids[0] == null && ids[1] == null) {
- error("external identifer missing", nname, null);
- }
-
- // Register the notation.
- setNotation(nname, ids[0], ids[1]);
-
- skipWhitespace();
- require('>');
- }
-
-
- /**
- * Parse PCDATA.
- * <pre>
- * [16] PCData ::= [^<&]*
- * </pre>
- * <p>The trick here is that the data stays in the dataBuffer without
- * necessarily being converted to a string right away.
- */
- void parsePCData ()
- throws java.lang.Exception
- {
- char c;
-
- // Start with a little cheat -- in most
- // cases, the entire sequence of
- // character data will already be in
- // the readBuffer; if not, fall through to
- // the normal approach.
- if (USE_CHEATS) {
- int lineAugment = 0;
- int columnAugment = 0;
-
- loop: for (int i = readBufferPos; i < readBufferLength; i++) {
- switch (readBuffer[i]) {
- case '\n':
- lineAugment++;
- columnAugment = 0;
- break;
- case '&':
- case '<':
- int start = readBufferPos;
- columnAugment++;
- readBufferPos = i;
- if (lineAugment > 0) {
- line += lineAugment;
- column = columnAugment;
- } else {
- column += columnAugment;
- }
- dataBufferAppend(readBuffer, start, i-start);
- return;
- default:
- columnAugment++;
- }
- }
- }
-
- // OK, the cheat didn't work; start over
- // and do it by the book.
- while (true) {
- c = readCh();
- switch (c) {
- case '<':
- case '&':
- unread(c);
- return;
- default:
- dataBufferAppend(c);
- break;
- }
- }
- }
-
-
-
- //////////////////////////////////////////////////////////////////////
- // High-level reading and scanning methods.
- //////////////////////////////////////////////////////////////////////
-
- /**
- * Require whitespace characters.
- * [1] S ::= (#x20 | #x9 | #xd | #xa)+
- */
- void requireWhitespace ()
- throws java.lang.Exception
- {
- char c = readCh();
- if (isWhitespace(c)) {
- skipWhitespace();
- } else {
- error("whitespace expected", c, null);
- }
- }
-
-
- /**
- * Parse whitespace characters, and leave them in the data buffer.
- */
- void parseWhitespace ()
- throws java.lang.Exception
- {
- char c = readCh();
- while (isWhitespace(c)) {
- dataBufferAppend(c);
- c = readCh();
- }
- unread(c);
- }
-
-
- /**
- * Skip whitespace characters.
- * [1] S ::= (#x20 | #x9 | #xd | #xa)+
- */
- void skipWhitespace ()
- throws java.lang.Exception
- {
- // Start with a little cheat. Most of
- // the time, the white space will fall
- // within the current read buffer; if
- // not, then fall through.
- if (USE_CHEATS) {
- int lineAugment = 0;
- int columnAugment = 0;
-
- loop: for (int i = readBufferPos; i < readBufferLength; i++) {
- switch (readBuffer[i]) {
- case ' ':
- case '\t':
- case '\r':
- columnAugment++;
- break;
- case '\n':
- lineAugment++;
- columnAugment = 0;
- break;
- case '%':
- if (context == CONTEXT_DTD || context == CONTEXT_ENTITYVALUE) {
- break loop;
- } // else fall through...
- default:
- readBufferPos = i;
- if (lineAugment > 0) {
- line += lineAugment;
- column = columnAugment;
- } else {
- column += columnAugment;
- }
- return;
- }
- }
- }
-
- // OK, do it by the book.
- char c = readCh();
- while (isWhitespace(c)) {
- c = readCh();
- }
- unread(c);
- }
-
-
- /**
- * Read a name or name token.
- * [5] Name ::= (Letter | '_' | ':') (NameChar)*
- * [7] Nmtoken ::= (NameChar)+
- * *NOTE: [6] is implemented implicitly where required.
- */
- String readNmtoken (boolean isName)
- throws java.lang.Exception
- {
- char c;
-
- if (USE_CHEATS) {
- loop: for (int i = readBufferPos; i < readBufferLength; i++) {
- switch (readBuffer[i]) {
- case '%':
- if (context == CONTEXT_DTD || context == CONTEXT_ENTITYVALUE) {
- break loop;
- } // else fall through...
- case '<':
- case '>':
- case '&':
- case ',':
- case '|':
- case '*':
- case '+':
- case '?':
- case ')':
- case '=':
- case '\'':
- case '"':
- case '[':
- case ' ':
- case '\t':
- case '\r':
- case '\n':
- case ';':
- case '/':
- case '#':
- int start = readBufferPos;
- if (i == start) {
- error("name expected", readBuffer[i], null);
- }
- readBufferPos = i;
- return intern(readBuffer, start, i - start);
- }
- }
- }
-
- nameBufferPos = 0;
-
- // Read the first character.
- loop: while (true) {
- c = readCh();
- switch (c) {
- case '%':
- case '<':
- case '>':
- case '&':
- case ',':
- case '|':
- case '*':
- case '+':
- case '?':
- case ')':
- case '=':
- case '\'':
- case '"':
- case '[':
- case ' ':
- case '\t':
- case '\n':
- case '\r':
- case ';':
- case '/':
- unread(c);
- if (nameBufferPos == 0) {
- error("name expected", null, null);
- }
- String s = intern(nameBuffer,0,nameBufferPos);
- nameBufferPos = 0;
- return s;
- default:
- nameBuffer =
- (char[])extendArray(nameBuffer, nameBuffer.length, nameBufferPos);
- nameBuffer[nameBufferPos++] = c;
- }
- }
- }
-
-
- /**
- * Read a literal.
- * [10] AttValue ::= '"' ([^<&"] | Reference)* '"'
- * | "'" ([^<&'] | Reference)* "'"
- * [11] SystemLiteral ::= '"' URLchar* '"' | "'" (URLchar - "'")* "'"
- * [13] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
- * [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
- * | "'" ([^%&'] | PEReference | Reference)* "'"
- */
- String readLiteral (int flags)
- throws java.lang.Exception
- {
- char delim, c;
- int startLine = line;
-
- // Find the delimiter.
- delim = readCh();
- if (delim != '"' && delim != '\'' && delim != (char)0) {
- error("expected '\"' or \"'\"", delim, null);
- return null;
- }
-
- // Read the literal.
- try {
- c = readCh();
-
- loop: while (c != delim) {
- switch (c) {
- // Literals never have line ends
- case '\n':
- case '\r':
- c = ' ';
- break;
- // References may be allowed
- case '&':
- if ((flags & LIT_CHAR_REF) > 0) {
- c = readCh();
- if (c == '#') {
- parseCharRef();
- c = readCh();
- continue loop; // check the next character
- } else if ((flags & LIT_ENTITY_REF) > 0) {
- unread(c);
- parseEntityRef(false);
- c = readCh();
- continue loop;
- } else {
- dataBufferAppend('&');
- }
- }
- break;
-
- default:
- break;
- }
- dataBufferAppend(c);
- c = readCh();
- }
- } catch (EOFException e) {
- error("end of input while looking for delimiter (started on line "
- + startLine + ')', null, new Character(delim).toString());
- }
-
- // Normalise whitespace if necessary.
- if ((flags & LIT_NORMALIZE) > 0) {
- dataBufferNormalize();
- }
-
- // Return the value.
- return dataBufferToString();
- }
-
-
- /**
- * Try reading external identifiers.
- * <p>The system identifier is not required for notations.
- * @param inNotation Are we in a notation?
- * @return A two-member String array containing the identifiers.
- */
- String[] readExternalIds (boolean inNotation)
- throws java.lang.Exception
- {
- char c;
- String ids[] = new String[2];
-
- if (tryRead("PUBLIC")) {
- requireWhitespace();
- ids[0] = readLiteral(LIT_NORMALIZE); // public id
- if (inNotation) {
- skipWhitespace();
- if (tryRead('"') || tryRead('\'')) {
- ids[1] = readLiteral(0);
- }
- } else {
- requireWhitespace();
- ids[1] = readLiteral(0); // system id
- }
- } else if (tryRead("SYSTEM")) {
- requireWhitespace();
- ids[1] = readLiteral(0); // system id
- }
-
- return ids;
- }
-
-
- /**
- * Test if a character is whitespace.
- * <pre>
- * [1] S ::= (#x20 | #x9 | #xd | #xa)+
- * </pre>
- * @param c The character to test.
- * @return true if the character is whitespace.
- */
- final boolean isWhitespace (char c)
- {
- switch ((int)c) {
- case 0x20:
- case 0x09:
- case 0x0d:
- case 0x0a:
- return true;
- default:
- return false;
- }
- }
-
-
-
- //////////////////////////////////////////////////////////////////////
- // Utility routines.
- //////////////////////////////////////////////////////////////////////
-
-
- /**
- * Add a character to the data buffer.
- */
- void dataBufferAppend (char c)
- {
- // Expand buffer if necessary.
- dataBuffer =
- (char[])extendArray(dataBuffer, dataBuffer.length, dataBufferPos);
- dataBuffer[dataBufferPos++] = c;
- }
-
-
- /**
- * Add a string to the data buffer.
- */
- void dataBufferAppend (String s)
- {
- dataBufferAppend(s.toCharArray(), 0, s.length());
- }
-
-
- /**
- * Append (part of) a character array to the data buffer.
- */
- void dataBufferAppend (char ch[], int start, int length)
- {
- dataBuffer =
- (char[])extendArray(dataBuffer, dataBuffer.length,
- dataBufferPos + length);
- System.arraycopy((Object)ch, start,
- (Object)dataBuffer, dataBufferPos,
- length);
- dataBufferPos += length;
- }
-
-
- /**
- * Normalise whitespace in the data buffer.
- */
- void dataBufferNormalize ()
- {
- int i = 0;
- int j = 0;
- int end = dataBufferPos;
-
- // Skip whitespace at the start.
- while (j < end && isWhitespace(dataBuffer[j])) {
- j++;
- }
-
- // Skip whitespace at the end.
- while (end > j && isWhitespace(dataBuffer[end - 1])) {
- end --;
- }
-
- // Start copying to the left.
- while (j < end) {
-
- char c = dataBuffer[j++];
-
- // Normalise all other whitespace to
- // a single space.
- if (isWhitespace(c)) {
- while (j < end && isWhitespace(dataBuffer[j++])) {
- }
- dataBuffer[i++] = ' ';
- dataBuffer[i++] = dataBuffer[j-1];
- } else {
- dataBuffer[i++] = c;
- }
- }
-
- // The new length is <= the old one.
- dataBufferPos = i;
- }
-
-
- /**
- * Convert the data buffer to a string.
- * @param internFlag true if the contents should be interned.
- * @see #intern(char[],int,int)
- */
- String dataBufferToString ()
- {
- String s = new String(dataBuffer, 0, dataBufferPos);
- dataBufferPos = 0;
- return s;
- }
-
-
- /**
- * Flush the contents of the data buffer to the handler, if
- * appropriate, and reset the buffer for new input.
- */
- void dataBufferFlush ()
- throws java.lang.Exception
- {
- if (dataBufferPos > 0) {
- switch (currentElementContent) {
- case CONTENT_UNDECLARED:
- case CONTENT_EMPTY:
- // do nothing
- break;
- case CONTENT_MIXED:
- case CONTENT_ANY:
- if (handler != null) {
- handler.charData(dataBuffer, 0, dataBufferPos);
- }
- break;
- case CONTENT_ELEMENTS:
- if (handler != null) {
- handler.ignorableWhitespace(dataBuffer, 0, dataBufferPos);
- }
- break;
- }
- dataBufferPos = 0;
- }
- }
-
-
- /**
- * Require a string to appear, or throw an exception.
- */
- void require (String delim)
- throws java.lang.Exception
- {
- char ch[] = delim.toCharArray();
- for (int i = 0; i < ch.length; i++) {
- require(ch[i]);
- }
- }
-
-
- /**
- * Require a character to appear, or throw an exception.
- */
- void require (char delim)
- throws java.lang.Exception
- {
- char c = readCh();
-
- if (c != delim) {
- error("expected character", c, new Character(delim).toString());
- }
- }
-
-
- /**
- * Return an internalised version of a string.
- * <p>Ælfred uses this method to create an internalised version
- * of all names and attribute values, so that it can test equality
- * with <code>==</code> instead of <code>String.equals()</code>.
- * <p>If you want to be able to test for equality in the same way,
- * you can use this method to internalise your own strings first:
- * <pre>
- * String PARA = handler.intern("PARA");
- * </pre>
- * <p>Note that this will not return the same results as String.intern().
- * @param s The string to internalise.
- * @return An internalised version of the string.
- * @see #intern(char[],int,int)
- * @see java.lang.String#intern
- */
- public String intern (String s)
- {
- char ch[] = s.toCharArray();
- return intern(ch, 0, ch.length);
- }
-
-
- /**
- * Create an internalised string from a character array.
- * <p>This is much more efficient than constructing a non-internalised
- * string first, and then internalising it.
- * <p>Note that this will not return the same results as String.intern().
- * @param ch an array of characters for building the string.
- * @param start the starting position in the array.
- * @param length the number of characters to place in the string.
- * @return an internalised string.
- * @see #intern(String)
- * @see java.lang.String#intern
- */
- public String intern (char ch[], int start, int length)
- {
- int index;
- int hash = 0;
-
- // Generate a hash code.
- for (int i = start; i < start + length; i++) {
- hash = ((hash << 1) & 0xffffff) + (int)ch[i];
- }
-
- hash = hash % SYMBOL_TABLE_LENGTH;
-
- // Get the bucket.
- Object bucket[] = (Object[])symbolTable[hash];
- if (bucket == null) {
- symbolTable[hash] = bucket = new Object[8];
- }
-
- // Search for a matching tuple, and
- // return the string if we find one.
- for (index = 0; index < bucket.length; index += 2) {
- char chFound[] = (char[])bucket[index];
-
- // Stop when we hit a null index.
- if (chFound == null) {
- break;
- }
-
- // If they're the same length,
- // check for a match.
- // If the loop finishes, 'index' will
- // contain the current bucket
- // position.
- if (chFound.length == length) {
- for (int i = 0; i < chFound.length; i++) {
- // Stop if there are no more tuples.
- if (ch[start+i] != chFound[i]) {
- break;
- } else if (i == length-1) {
- // That's it, we have a match!
- return (String)bucket[index+1];
- }
- }
- }
- }
-
- // Not found -- we'll have to add it.
-
- // Do we have to grow the bucket?
- bucket =
- (Object[])extendArray(bucket, bucket.length, index);
-
- // OK, add it to the end of the
- // bucket.
- String s = new String(ch, start, length);
- bucket[index] = s.toCharArray();
- bucket[index+1] = s;
- symbolTable[hash] = bucket;
- return s;
- }
-
-
- /**
- * Ensure the capacity of an array, allocating a new one if
- * necessary.
- */
- Object extendArray (Object array, int currentSize, int requiredSize)
- {
- if (requiredSize < currentSize) {
- return array;
- } else {
- Object newArray = null;
- int newSize = currentSize * 2;
-
- if (newSize <= requiredSize) {
- newSize = requiredSize + 1;
- }
-
- if (array instanceof char[]) {
- newArray = new char[newSize];
- } else if (array instanceof Object[]) {
- newArray = new Object[newSize];
- }
-
- System.arraycopy(array, 0, newArray, 0, currentSize);
- return newArray;
- }
- }
-
-
-
- //////////////////////////////////////////////////////////////////////
- // XML query routines.
- //////////////////////////////////////////////////////////////////////
-
-
- //
- // Elements
- //
-
- /**
- * Get the declared elements for an XML document.
- * <p>The results will be valid only after the DTD (if any) has been
- * parsed.
- * @return An enumeration of all element types declared for this
- * document (as Strings).
- * @see #getElementContentType
- * @see #getElementContentModel
- */
- public Enumeration declaredElements ()
- {
- return elementInfo.keys();
- }
-
-
- /**
- * Look up the content type of an element.
- * @param name The element type name.
- * @return An integer constant representing the content type.
- * @see #getElementContentModel
- * @see #CONTENT_UNDECLARED
- * @see #CONTENT_ANY
- * @see #CONTENT_EMPTY
- * @see #CONTENT_MIXED
- * @see #CONTENT_ELEMENTS
- */
- public int getElementContentType (String name)
- {
- Object element[] = (Object[])elementInfo.get(name);
- if (element == null) {
- return CONTENT_UNDECLARED;
- } else {
- return ((Integer)element[0]).intValue();
- }
- }
-
-
- /**
- * Look up the content model of an element.
- * <p>The result will always be null unless the content type is
- * CONTENT_ELEMENTS or CONTENT_MIXED.
- * @param name The element type name.
- * @return The normalised content model, as a string.
- * @see #getElementContentType
- */
- public String getElementContentModel (String name)
- {
- Object element[] = (Object[])elementInfo.get(name);
- if (element == null) {
- return null;
- } else {
- return (String)element[1];
- }
- }
-
-
- /**
- * Register an element.
- * Array format:
- * element type
- * attribute hash table
- */
- void setElement (String name, int contentType,
- String contentModel, Hashtable attributes)
- throws java.lang.Exception
- {
- Object element[];
-
- // Try looking up the element
- element = (Object[])elementInfo.get(name);
-
- // Make a new one if necessary.
- if (element == null) {
- element = new Object[3];
- element[0] = new Integer(CONTENT_UNDECLARED);
- element[1] = null;
- element[2] = null;
- } else if (contentType != CONTENT_UNDECLARED &&
- ((Integer)element[0]).intValue() != CONTENT_UNDECLARED) {
- error("multiple declarations for element type", name, null);
- return;
- }
-
- // Insert the content type, if any.
- if (contentType != CONTENT_UNDECLARED) {
- element[0] = new Integer(contentType);
- }
-
- // Insert the content model, if any.
- if (contentModel != null) {
- element[1] = contentModel;
- }
-
- // Insert the attributes, if any.
- if (attributes != null) {
- element[2] =attributes;
- }
-
- // Save the element info.
- elementInfo.put(name,element);
- }
-
-
- /**
- * Look up the attribute hash table for an element.
- * The hash table is the second item in the element array.
- */
- Hashtable getElementAttributes (String name)
- {
- Object element[] = (Object[])elementInfo.get(name);
- if (element == null) {
- return null;
- } else {
- return (Hashtable)element[2];
- }
- }
-
-
-
- //
- // Attributes
- //
-
- /**
- * Get the declared attributes for an element type.
- * @param elname The name of the element type.
- * @return An Enumeration of all the attributes declared for
- * a specific element type. The results will be valid only
- * after the DTD (if any) has been parsed.
- * @see #getAttributeType
- * @see #getAttributeEnumeration
- * @see #getAttributeDefaultValueType
- * @see #getAttributeDefaultValue
- * @see #getAttributeExpandedValue
- */
- public Enumeration declaredAttributes (String elname)
- {
- Hashtable attlist = getElementAttributes(elname);
-
- if (attlist == null) {
- return null;
- } else {
- return attlist.keys();
- }
- }
-
-
- /**
- * Retrieve the declared type of an attribute.
- * @param name The name of the associated element.
- * @param aname The name of the attribute.
- * @return An integer constant representing the attribute type.
- * @see #ATTRIBUTE_UNDECLARED
- * @see #ATTRIBUTE_CDATA
- * @see #ATTRIBUTE_ID
- * @see #ATTRIBUTE_IDREF
- * @see #ATTRIBUTE_IDREFS
- * @see #ATTRIBUTE_ENTITY
- * @see #ATTRIBUTE_ENTITIES
- * @see #ATTRIBUTE_NMTOKEN
- * @see #ATTRIBUTE_NMTOKENS
- * @see #ATTRIBUTE_ENUMERATED
- * @see #ATTRIBUTE_NOTATION
- */
- public int getAttributeType (String name, String aname)
- {
- Object attribute[] = getAttribute(name, aname);
- if (attribute == null) {
- return ATTRIBUTE_UNDECLARED;
- } else {
- return ((Integer)attribute[0]).intValue();
- }
- }
-
-
- /**
- * Retrieve the allowed values for an enumerated attribute type.
- * @param name The name of the associated element.
- * @param aname The name of the attribute.
- * @return A string containing the token list.
- * @see #ATTRIBUTE_ENUMERATED
- * @see #ATTRIBUTE_NOTATION
- */
- public String getAttributeEnumeration (String name, String aname)
- {
- Object attribute[] = getAttribute(name, aname);
- if (attribute == null) {
- return null;
- } else {
- return (String)attribute[3];
- }
- }
-
-
- /**
- * Retrieve the default value of a declared attribute.
- * @param name The name of the associated element.
- * @param aname The name of the attribute.
- * @return The default value, or null if the attribute was
- * #IMPLIED or simply undeclared and unspecified.
- * @see #getAttributeExpandedValue
- */
- public String getAttributeDefaultValue (String name, String aname)
- {
- Object attribute[] = getAttribute(name, aname);
- if (attribute == null) {
- return null;
- } else {
- return (String)attribute[1];
- }
- }
-
-
- /**
- * Retrieve the expanded value of a declared attribute.
- * <p>All general entities will be expanded.
- * @param name The name of the associated element.
- * @param aname The name of the attribute.
- * @return The expanded default value, or null if the attribute was
- * #IMPLIED or simply undeclared
- * @see #getAttributeDefaultValue
- */
- public String getAttributeExpandedValue (String name, String aname)
- {
- Object attribute[] = getAttribute(name, aname);
- if (attribute == null) {
- return null;
- } else if (attribute[4] == null && attribute[1] != null) {
- try {
- pushString(null, (char)0 + (String)attribute[1] + (char)0);
- attribute[4] = readLiteral(LIT_NORMALIZE |
- LIT_CHAR_REF |
- LIT_ENTITY_REF);
- } catch (Exception e) {}
- }
- return (String)attribute[4];
- }
-
-
- /**
- * Retrieve the default value type of a declared attribute.
- * @see #ATTRIBUTE_DEFAULT_SPECIFIED
- * @see #ATTRIBUTE_DEFAULT_IMPLIED
- * @see #ATTRIBUTE_DEFAULT_REQUIRED
- * @see #ATTRIBUTE_DEFAULT_FIXED
- */
- public int getAttributeDefaultValueType (String name, String aname)
- {
- Object attribute[] = getAttribute(name, aname);
- if (attribute == null) {
- return ATTRIBUTE_DEFAULT_UNDECLARED;
- } else {
- return ((Integer)attribute[2]).intValue();
- }
- }
-
-
- /**
- * Register an attribute declaration for later retrieval.
- * Format:
- * - String type
- * - String default value
- * - int value type
- * *TODO: do something with attribute types.
- */
- void setAttribute (String elName, String name, int type, String enumeration,
- String value, int valueType)
- throws java.lang.Exception
- {
- Hashtable attlist;
- Object attribute[];
-
- // Create a new hashtable if necessary.
- attlist = getElementAttributes(elName);
- if (attlist == null) {
- attlist = new Hashtable();
- }
-
- // Check that the attribute doesn't
- // already exist!
- if (attlist.get(name) != null) {
- return;
- } else {
- attribute = new Object[5];
- attribute[0] = new Integer(type);
- attribute[1] = value;
- attribute[2] = new Integer(valueType);
- attribute[3] = enumeration;
- attribute[4] = null;
- attlist.put(name.intern(), attribute);
-
- // Use CONTENT_UNDECLARED to avoid overwriting
- // existing element declaration.
- setElement(elName,CONTENT_UNDECLARED, null, attlist);
- }
- }
-
-
- /**
- * Retrieve the three-member array representing an
- * attribute declaration.
- */
- Object[] getAttribute (String elName, String name)
- {
- Hashtable attlist;
- Object attribute[];
-
- attlist = getElementAttributes(elName);
- if (attlist == null) {
- return null;
- }
-
- attribute = (Object[])attlist.get(name);
- return attribute;
- }
-
-
- //
- // Entities
- //
-
- /**
- * Get declared entities.
- * @return An Enumeration of all the entities declared for
- * this XML document. The results will be valid only
- * after the DTD (if any) has been parsed.
- * @see #getEntityType
- * @see #getEntityPublicId
- * @see #getEntitySystemId
- * @see #getEntityValue
- * @see #getEntityNotationName
- */
- public Enumeration declaredEntities ()
- {
- return entityInfo.keys();
- }
-
-
- /**
- * Find the type of an entity.
- * @return An integer constant representing the entity type.
- * @see #ENTITY_UNDECLARED
- * @see #ENTITY_INTERNAL
- * @see #ENTITY_NDATA
- * @see #ENTITY_TEXT
- */
- public int getEntityType (String ename)
- {
- Object entity[] = (Object[])entityInfo.get(ename);
- if (entity == null) {
- return ENTITY_UNDECLARED;
- } else {
- return ((Integer)entity[0]).intValue();
- }
- }
-
-
- /**
- * Return an external entity's public identifier, if any.
- * @param ename The name of the external entity.
- * @return The entity's system identifier, or null if the
- * entity was not declared, if it is not an
- * external entity, or if no public identifier was
- * provided.
- * @see #getEntityType
- */
- public String getEntityPublicId (String ename)
- {
- Object entity[] = (Object[])entityInfo.get(ename);
- if (entity == null) {
- return null;
- } else {
- return (String)entity[1];
- }
- }
-
-
- /**
- * Return an external entity's system identifier.
- * @param ename The name of the external entity.
- * @return The entity's system identifier, or null if the
- * entity was not declared, or if it is not an
- * external entity.
- * @see #getEntityType
- */
- public String getEntitySystemId (String ename)
- {
- Object entity[] = (Object[])entityInfo.get(ename);
- if (entity == null) {
- return null;
- } else {
- return (String)entity[2];
- }
- }
-
-
- /**
- * Return the value of an internal entity.
- * @param ename The name of the internal entity.
- * @return The entity's value, or null if the entity was
- * not declared, or if it is not an internal entity.
- * @see #getEntityType
- */
- public String getEntityValue (String ename)
- {
- Object entity[] = (Object[])entityInfo.get(ename);
- if (entity == null) {
- return null;
- } else {
- return (String)entity[3];
- }
- }
-
-
- /**
- * Get the notation name associated with an NDATA entity.
- * @param eName The NDATA entity name.
- * @return The associated notation name, or null if the
- * entity was not declared, or if it is not an
- * NDATA entity.
- * @see #getEntityType
- */
- public String getEntityNotationName (String eName)
- {
- Object entity[] = (Object[])entityInfo.get(eName);
- if (entity == null) {
- return null;
- } else {
- return (String)entity[4];
- }
- }
-
-
- /**
- * Register an entity declaration for later retrieval.
- */
- void setInternalEntity (String eName, String value)
- {
- setEntity(eName, ENTITY_INTERNAL, null, null, value, null);
- }
-
-
- /**
- * Register an external data entity.
- */
- void setExternalDataEntity (String eName, String pubid,
- String sysid, String nName)
- {
- setEntity(eName, ENTITY_NDATA, pubid, sysid, null, nName);
- }
-
-
- /**
- * Register an external text entity.
- */
- void setExternalTextEntity (String eName, String pubid, String sysid)
- {
- setEntity(eName, ENTITY_TEXT, pubid, sysid, null, null);
- }
-
-
- /**
- * Register an entity declaration for later retrieval.
- */
- void setEntity (String eName, int eClass,
- String pubid, String sysid,
- String value, String nName)
- {
- Object entity[];
-
- if (entityInfo.get(eName) == null) {
- entity = new Object[5];
- entity[0] = new Integer(eClass);
- entity[1] = pubid;
- entity[2] = sysid;
- entity[3] = value;
- entity[4] = nName;
-
- entityInfo.put(eName,entity);
- }
- }
-
-
- //
- // Notations.
- //
-
- /**
- * Get declared notations.
- * @return An Enumeration of all the notations declared for
- * this XML document. The results will be valid only
- * after the DTD (if any) has been parsed.
- * @see #getNotationPublicId
- * @see #getNotationSystemId
- */
- public Enumeration declaredNotations ()
- {
- return notationInfo.keys();
- }
-
-
- /**
- * Look up the public identifier for a notation.
- * You will normally use this method to look up a notation
- * that was provided as an attribute value or for an NDATA entity.
- * @param nname The name of the notation.
- * @return A string containing the public identifier, or null
- * if none was provided or if no such notation was
- * declared.
- * @see #getNotationSystemId
- */
- public String getNotationPublicId (String nname)
- {
- Object notation[] = (Object[])notationInfo.get(nname);
- if (notation == null) {
- return null;
- } else {
- return (String)notation[0];
- }
- }
-
-
- /**
- * Look up the system identifier for a notation.
- * You will normally use this method to look up a notation
- * that was provided as an attribute value or for an NDATA entity.
- * @param nname The name of the notation.
- * @return A string containing the system identifier, or null
- * if no such notation was declared.
- * @see #getNotationPublicId
- */
- public String getNotationSystemId (String nname)
- {
- Object notation[] = (Object[])notationInfo.get(nname);
- if (notation == null) {
- return null;
- } else {
- return (String)notation[1];
- }
- }
-
-
- /**
- * Register a notation declaration for later retrieval.
- * Format:
- * - public id
- * - system id
- */
- void setNotation (String nname, String pubid, String sysid)
- throws java.lang.Exception
- {
- Object notation[];
-
- if (notationInfo.get(nname) == null) {
- notation = new Object[2];
- notation[0] = pubid;
- notation[1] = sysid;
- notationInfo.put(nname,notation);
- } else {
- error("multiple declarations of notation", nname, null);
- }
- }
-
-
- //
- // Location.
- //
-
-
- /**
- * Return the current line number.
- */
- public int getLineNumber ()
- {
- return line;
- }
-
-
- /**
- * Return the current column number.
- */
- public int getColumnNumber ()
- {
- return column;
- }
-
-
-
- //////////////////////////////////////////////////////////////////////
- // High-level I/O.
- //////////////////////////////////////////////////////////////////////
-
-
- /**
- * Read a single character from the readBuffer.
- * <p>The readDataChunk() method maintains the buffer.
- * <p>If we hit the end of an entity, try to pop the stack and
- * keep going.
- * <p>(This approach doesn't really enforce XML's rules about
- * entity boundaries, but this is not currently a validating
- * parser).
- * <p>This routine also attempts to keep track of the current
- * position in external entities, but it's not entirely accurate.
- * @return The next available input character.
- * @see #unread(char)
- * @see #unread(String)
- * @see #readDataChunk
- * @see #readBuffer
- * @see #line
- * @return The next character from the current input source.
- */
- char readCh ()
- throws java.lang.Exception
- {
- char c;
-
- // As long as there's nothing in the
- // read buffer, try reading more data
- // (for an external entity) or popping
- // the entity stack (for either).
- while (readBufferPos >= readBufferLength)
- {
- switch (sourceType)
- {
- case INPUT_READER:
- case INPUT_EXTERNAL:
- case INPUT_STREAM:
- readDataChunk();
- while (readBufferLength < 1)
- {
- popInput();
- if (readBufferLength <1)
- {
- readDataChunk();
- }
- }
- break;
-
- default:
- popInput();
- break;
- }
- }
-
- c = readBuffer[readBufferPos++];
-
- // This is a particularly nasty bit
- // of code, that checks for a parameter
- // entity reference but peeks ahead to
- // catch the '%' in parameter entity
- // declarations.
- if
- (
- c == '%' &&
- (context == CONTEXT_DTD || context == CONTEXT_ENTITYVALUE)
- )
- {
- char c2 = readCh();
- unread(c2);
- if (!isWhitespace(c2))
- {
- parsePEReference(context == CONTEXT_ENTITYVALUE);
- return readCh();
- }
- }
-
- if (c == '\n')
- {
- line++;
- column = 0;
- }
- else
- {
- column++;
- }
-
- return c;
- }
-
-
- /**
- * Push a single character back onto the current input stream.
- * <p>This method usually pushes the character back onto
- * the readBuffer, while the unread(String) method treats the
- * string as a new internal entity.
- * <p>I don't think that this would ever be called with
- * readBufferPos = 0, because the methods always reads a character
- * before unreading it, but just in case, I've added a boundary
- * condition.
- * @param c The character to push back.
- * @see #readCh
- * @see #unread(String)
- * @see #unread(char[])
- * @see #readBuffer
- */
- void unread (char c)
- throws java.lang.Exception
- {
- // Normal condition.
- if (c == '\n')
- {
- line--;
- column = -1;
- }
- if (readBufferPos > 0)
- {
- readBuffer[--readBufferPos] = c;
- }
- else
- {
- pushString(null, new Character(c).toString());
- }
- }
-
-
- /**
- * Push a char array back onto the current input stream.
- * <p>NOTE: you must <em>never</em> push back characters that you
- * haven't actually read: use pushString() instead.
- * @see #readCh
- * @see #unread(char)
- * @see #unread(String)
- * @see #readBuffer
- * @see #pushString
- */
- void unread (char ch[], int length)
- throws java.lang.Exception
- {
- for (int i = 0; i < length; i++)
- {
- if (ch[i] == '\n')
- {line--;column = -1;}
- }
- if (length < readBufferPos)
- {readBufferPos -= length;}
- else
- {
- pushCharArray(null, ch, 0, length);
- sourceType = INPUT_BUFFER;
- }
- }
-
-
- /**
- * Push a new external input source.
- * <p>The source will be either an external text entity, or the DTD
- * external subset.
- * <p>TO DO: Right now, this method always attempts to autodetect
- * the encoding; in the future, it should allow the caller to
- * request an encoding explicitly, and it should also look at the
- * headers with an HTTP connection.
- * @param url The java.net.URL object for the entity.
- * @see XmlHandler#resolveEntity
- * @see #pushString
- * @see #sourceType
- * @see #pushInput
- * @see #detectEncoding
- * @see #sourceType
- * @see #readBuffer
- */
- void pushURL (String ename, String publicId, String systemId,
- Reader reader, InputStream stream, String encoding)
- throws java.lang.Exception
- {
- URL url;
- boolean ignoreEncoding = false;
-
- // Push the existing status.
- pushInput(ename);
-
- // Create a new read buffer.
- // (Note the four-character margin)
- readBuffer = new char[READ_BUFFER_MAX+4];
- readBufferPos = 0;
- readBufferLength = 0;
- readBufferOverflow = -1;
- is = null;
- line = 1;
-
- currentByteCount = 0;
-
- // Flush any remaining data.
- dataBufferFlush();
-
- // Make the URL absolute.
- if (systemId != null && externalEntity != null) {
- systemId = new URL(externalEntity.getURL(), systemId).toString();
- } else if (baseURI != null) {
- try {
- systemId = new URL(new URL(baseURI), systemId).toString();
- } catch (Exception e) {}
- }
-
- // See if the application wants to
- // redirect the system ID and/or
- // supply its own character stream.
- if (systemId != null && handler != null) {
- Object input = handler.resolveEntity(publicId, systemId);
- if (input != null) {
- if (input instanceof String) {
- systemId = (String)input;
- } else if (input instanceof InputStream) {
- stream = (InputStream)input;
- } else if (input instanceof Reader) {
- reader = (Reader)input;
- }
- }
- }
-
- // Start the entity.
- if (handler != null) {
- if (systemId != null) {
- handler.startExternalEntity(systemId);
- } else {
- handler.startExternalEntity("[external stream]");
- }
- }
-
- // Figure out what we're reading from.
- if (reader != null) {
- // There's an explicit character stream.
- sourceType = INPUT_READER;
- this.reader = reader;
- tryEncodingDecl(true);
- return;
- } else if (stream != null) {
- sourceType = INPUT_STREAM;
- is = stream;
- } else {
- // We have to open our own stream
- // to the URL.
-
- // Set the new status
- sourceType = INPUT_EXTERNAL;
- url = new URL(systemId);
-
- externalEntity = url.openConnection();
- externalEntity.connect();
- is = externalEntity.getInputStream();
- }
-
- // If we get to here, there must be
- // an InputStream available.
- if (!is.markSupported()) {
- is = new BufferedInputStream(is);
- }
-
- // Attempt to detect the encoding.
- if (encoding == null && externalEntity != null) {
- encoding = externalEntity.getContentEncoding();
- }
-
- if (encoding != null) {
- checkEncoding(encoding, false);
- ignoreEncoding = true;
- } else {
- detectEncoding();
- ignoreEncoding = false;
- }
-
- // Read an XML or text declaration.
- tryEncodingDecl(ignoreEncoding);
- }
-
-
- /**
- * Check for an encoding declaration.
- */
- void tryEncodingDecl (boolean ignoreEncoding)
- throws java.lang.Exception
- {
- // Read the XML/Encoding declaration.
- if (tryRead("<?xml")) {
- if (tryWhitespace()) {
- if (inputStack.size() > 0) {
- parseTextDecl(ignoreEncoding);
- } else {
- parseXMLDecl(ignoreEncoding);
- }
- } else {
- unread("xml".toCharArray(), 3);
- parsePI();
- }
- }
- }
-
-
- /**
- * Attempt to detect the encoding of an entity.
- * <p>The trick here (as suggested in the XML standard) is that
- * any entity not in UTF-8, or in UCS-2 with a byte-order mark,
- * <b>must</b> begin with an XML declaration or an encoding
- * declaration; we simply have to look for "<?XML" in various
- * encodings.
- * <p>This method has no way to distinguish among 8-bit encodings.
- * Instead, it assumes UTF-8, then (possibly) revises its assumption
- * later in checkEncoding(). Any ASCII-derived 8-bit encoding
- * should work, but most will be rejected later by checkEncoding().
- * <p>I don't currently detect EBCDIC, since I'm concerned that it
- * could also be a valid UTF-8 sequence; I'll have to do more checking
- * later.
- * @see #tryEncoding(byte[], byte, byte, byte, byte)
- * @see #tryEncoding(byte[], byte, byte)
- * @see #checkEncoding
- * @see #read8bitEncodingDeclaration
- */
- void detectEncoding ()
- throws java.lang.Exception
- {
- byte signature[] = new byte[4];
-
- // Read the first four bytes for
- // autodetection.
- is.mark(4);
- is.read(signature);
- is.reset();
-
- // Look for a known signature.
- if (tryEncoding(signature, (byte)0x00, (byte)0x00,
- (byte)0x00, (byte)0x3c)) {
- // UCS-4 must begin with "<!XML"
- // 0x00 0x00 0x00 0x3c: UCS-4, big-endian (1234)
- encoding = ENCODING_UCS_4_1234;
- } else if (tryEncoding(signature, (byte)0x3c, (byte)0x00,
- (byte)0x00, (byte)0x00)) {
- // UCS-4 must begin with "<!XML"
- // 0x3c 0x00 0x00 0x00: UCS-4, little-endian (4321)
- encoding = ENCODING_UCS_4_4321;
- } else if (tryEncoding(signature, (byte)0x00, (byte)0x00,
- (byte)0x3c, (byte)0x00)) {
- // UCS-4 must begin with "<!XML"
- // 0x00 0x00 0x3c 0x00: UCS-4, unusual (2143)
- encoding = ENCODING_UCS_4_2143;
- } else if (tryEncoding(signature, (byte)0x00, (byte)0x3c,
- (byte)0x00, (byte)0x00)) {
- // UCS-4 must begin with "<!XML"
- // 0x00 0x3c 0x00 0x00: UCS-4, unusual (3421)
- encoding = ENCODING_UCS_4_3412;
- } else if (tryEncoding(signature, (byte)0xfe, (byte)0xff)) {
- // UCS-2 with a byte-order marker.
- // 0xfe 0xff: UCS-2, big-endian (12)
- encoding = ENCODING_UCS_2_12;
- is.read(); is.read();
- } else if (tryEncoding(signature, (byte)0xff, (byte)0xfe)) {
- // UCS-2 with a byte-order marker.
- // 0xff 0xfe: UCS-2, little-endian (21)
- encoding = ENCODING_UCS_2_21;
- is.read(); is.read();
- } else if (tryEncoding(signature, (byte)0x00, (byte)0x3c,
- (byte)0x00, (byte)0x3f)) {
- // UCS-2 without a BOM must begin with "<?XML"
- // 0x00 0x3c 0x00 0x3f: UCS-2, big-endian, no byte-order mark
- encoding = ENCODING_UCS_2_12;
- error("no byte-order mark for UCS-2 entity", null, null);
- } else if (tryEncoding(signature, (byte)0x3c, (byte)0x00,
- (byte)0x3f, (byte)0x00)) {
- // UCS-2 without a BOM must begin with "<?XML"
- // 0x3c 0x00 0x3f 0x00: UCS-2, little-endian, no byte-order mark
- encoding = ENCODING_UCS_2_21;
- error("no byte-order mark for UCS-2 entity", null, null);
- } else if (tryEncoding(signature, (byte)0x3c, (byte)0x3f,
- (byte)0x78, (byte)0x6d)) {
- // Some kind of 8-bit encoding with "<?XML"
- // 0x3c 0x3f 0x78 0x6d: UTF-8 or other 8-bit markup (read ENCODING)
- encoding = ENCODING_UTF_8;
- read8bitEncodingDeclaration();
- } else {
- // Some kind of 8-bit encoding without "<?XML"
- // (otherwise) UTF-8 without encoding/XML declaration
- encoding = ENCODING_UTF_8;
- }
- }
-
-
- /**
- * Check for a four-byte signature.
- * <p>Utility routine for detectEncoding().
- * <p>Always looks for some part of "<?XML" in a specific encoding.
- * @param sig The first four bytes read.
- * @param b1 The first byte of the signature
- * @param b2 The second byte of the signature
- * @param b3 The third byte of the signature
- * @param b4 The fourth byte of the signature
- * @see #detectEncoding
- */
- boolean tryEncoding (byte sig[], byte b1, byte b2, byte b3, byte b4)
- {
- return (sig[0] == b1 && sig[1] == b2 && sig[2] == b3 && sig[3] == b4);
- }
-
-
- /**
- * Check for a two-byte signature.
- * <p>Looks for a UCS-2 byte-order mark.
- * <p>Utility routine for detectEncoding().
- * @param sig The first four bytes read.
- * @param b1 The first byte of the signature
- * @param b2 The second byte of the signature
- * @see #detectEncoding
- */
- boolean tryEncoding (byte sig[], byte b1, byte b2)
- {
- return ((sig[0] == b1) && (sig[1] == b2));
- }
-
-
- /**
- * This method pushes a string back onto input.
- * <p>It is useful either as the expansion of an internal entity,
- * or for backtracking during the parse.
- * <p>Call pushCharArray() to do the actual work.
- * @param s The string to push back onto input.
- * @see #pushCharArray
- */
- void pushString (String ename, String s)
- throws java.lang.Exception
- {
- char ch[] = s.toCharArray();
- pushCharArray(ename, ch, 0, ch.length);
- }
-
-
- /**
- * Push a new internal input source.
- * <p>This method is useful for expanding an internal entity,
- * or for unreading a string of characters. It creates a new
- * readBuffer containing the characters in the array, instead
- * of characters converted from an input byte stream.
- * <p>I've added a couple of optimisations: don't push zero-
- * length strings, and just push back a single character
- * for 1-character strings; this should save some time and memory.
- * @param ch The char array to push.
- * @see #pushString
- * @see #pushURL
- * @see #readBuffer
- * @see #sourceType
- * @see #pushInput
- */
- void pushCharArray (String ename, char ch[], int start, int length)
- throws java.lang.Exception
- {
- // Push the existing status
- pushInput(ename);
- sourceType = INPUT_INTERNAL;
- readBuffer = ch;
- readBufferPos = start;
- readBufferLength = length;
- readBufferOverflow = -1;
- }
-
-
- /**
- * Save the current input source onto the stack.
- * <p>This method saves all of the global variables associated with
- * the current input source, so that they can be restored when a new
- * input source has finished. It also tests for entity recursion.
- * <p>The method saves the following global variables onto a stack
- * using a fixed-length array:
- * <ol>
- * <li>sourceType
- * <li>externalEntity
- * <li>readBuffer
- * <li>readBufferPos
- * <li>readBufferLength
- * <li>line
- * <li>encoding
- * </ol>
- * @param ename The name of the entity (if any) causing the new input.
- * @see #popInput
- * @see #sourceType
- * @see #externalEntity
- * @see #readBuffer
- * @see #readBufferPos
- * @see #readBufferLength
- * @see #line
- * @see #encoding
- */
- void pushInput (String ename)
- throws java.lang.Exception
- {
- Object input[] = new Object[12];
-
- // Check for entity recursion.
- if (ename != null) {
- Enumeration entities = entityStack.elements();
- while (entities.hasMoreElements()) {
- String e = (String)entities.nextElement();
- if (e == ename) {
- error("recursive reference to entity", ename, null);
- }
- }
- }
- entityStack.push(ename);
-
- // Don't bother if there is no input.
- if (sourceType == INPUT_NONE) {
- return;
- }
-
- // Set up a snapshot of the current
- // input source.
- input[0] = new Integer(sourceType);
- input[1] = externalEntity;
- input[2] = readBuffer;
- input[3] = new Integer(readBufferPos);
- input[4] = new Integer(readBufferLength);
- input[5] = new Integer(line);
- input[6] = new Integer(encoding);
- input[7] = new Integer(readBufferOverflow);
- input[8] = is;
- input[9] = new Integer(currentByteCount);
- input[10] = new Integer(column);
- input[11] = reader;
-
- // Push it onto the stack.
- inputStack.push(input);
- }
-
-
- /**
- * Restore a previous input source.
- * <p>This method restores all of the global variables associated with
- * the current input source.
- * @exception java.io.EOFException
- * If there are no more entries on the input stack.
- * @see #pushInput
- * @see #sourceType
- * @see #externalEntity
- * @see #readBuffer
- * @see #readBufferPos
- * @see #readBufferLength
- * @see #line
- * @see #encoding
- */
- void popInput ()
- throws java.lang.Exception
- {
- Object input[];
-
-
- switch (sourceType) {
-
- case INPUT_EXTERNAL:
- dataBufferFlush();
- if (handler != null && externalEntity != null) {
- handler.endExternalEntity(externalEntity.getURL().toString());
- }
- break;
- case INPUT_STREAM:
- dataBufferFlush();
- if (baseURI != null) {
- if (handler != null) {
- handler.endExternalEntity(baseURI);
- }
- }
- break;
- case INPUT_READER:
- dataBufferFlush();
- if (baseURI != null) {
- if (handler != null) {
- handler.endExternalEntity(baseURI);
- }
- }
- break;
- }
-
- // Throw an EOFException if there
- // is nothing else to pop.
- if (inputStack.isEmpty()) {
- throw new EOFException();
- } else {
- String s;
- input = (Object[])inputStack.pop();
- s = (String)entityStack.pop();
- }
-
- sourceType = ((Integer)input[0]).intValue();
- externalEntity = (URLConnection)input[1];
- readBuffer = (char[])input[2];
- readBufferPos = ((Integer)input[3]).intValue();
- readBufferLength = ((Integer)input[4]).intValue();
- line = ((Integer)input[5]).intValue();
- encoding = ((Integer)input[6]).intValue();
- readBufferOverflow = ((Integer)input[7]).intValue();
- is = (InputStream)input[8];
- currentByteCount = ((Integer)input[9]).intValue();
- column = ((Integer)input[10]).intValue();
- reader = (Reader)input[11];
- }
-
-
- /**
- * Return true if we can read the expected character.
- * <p>Note that the character will be removed from the input stream
- * on success, but will be put back on failure. Do not attempt to
- * read the character again if the method succeeds.
- * @param delim The character that should appear next. For a
- * insensitive match, you must supply this in upper-case.
- * @return true if the character was successfully read, or false if
- * it was not.
- * @see #tryRead(String)
- */
- boolean tryRead (char delim)
- throws java.lang.Exception
- {
- char c;
-
- // Read the character
- c = readCh();
-
- // Test for a match, and push the character
- // back if the match fails.
- if (c == delim) {
- return true;
- } else {
- unread(c);
- return false;
- }
- }
-
-
- /**
- * Return true if we can read the expected string.
- * <p>This is simply a convenience method.
- * <p>Note that the string will be removed from the input stream
- * on success, but will be put back on failure. Do not attempt to
- * read the string again if the method succeeds.
- * <p>This method will push back a character rather than an
- * array whenever possible (probably the majority of cases).
- * <p><b>NOTE:</b> This method currently has a hard-coded limit
- * of 100 characters for the delimiter.
- * @param delim The string that should appear next.
- * @return true if the string was successfully read, or false if
- * it was not.
- * @see #tryRead(char)
- */
- boolean tryRead (String delim)
- throws java.lang.Exception
- {
- char ch[] = delim.toCharArray();
- char c;
-
- // Compare the input, character-
- // by character.
-
- for (int i = 0; i < ch.length; i++)
- {
- c=readCh();
- if (c!=ch[i])
- {
- unread(c);
- if (i!=0)
- {unread(ch,i);}
- return false;
- }
- }
- return true;
- }
-
-
-
- /**
- * Return true if we can read some whitespace.
- * <p>This is simply a convenience method.
- * <p>This method will push back a character rather than an
- * array whenever possible (probably the majority of cases).
- * @return true if whitespace was found.
- */
- boolean tryWhitespace ()
- throws java.lang.Exception
- {
- char c;
- c = readCh();
- if (isWhitespace(c)) {
- skipWhitespace();
- return true;
- } else {
- unread(c);
- return false;
- }
- }
-
-
- /**
- * Read all data until we find the specified string.
- * <p>This is especially useful for scanning marked sections.
- * <p>This is a a little inefficient right now, since it calls tryRead()
- * for every character.
- * @param delim The string delimiter
- * @see #tryRead(String, boolean)
- * @see #readCh
- */
- void parseUntil (String delim)
- throws java.lang.Exception
- {
- char c;
- int startLine = line;
-
- try {
- while (!tryRead(delim)) {
- c = readCh();
- dataBufferAppend(c);
- }
- } catch (EOFException e) {
- error("end of input while looking for delimiter (started on line " +
- startLine + ')', null, delim);
- }
- }
-
-
- /**
- * Skip all data until we find the specified string.
- * <p>This is especially useful for scanning comments.
- * <p>This is a a little inefficient right now, since it calls tryRead()
- * for every character.
- * @param delim The string delimiter
- * @see #tryRead(String, boolean)
- * @see #readCh
- */
- void skipUntil (String delim)
- throws java.lang.Exception
- {
- while (!tryRead(delim)) {
- readCh();
- }
- }
-
-
- /**
- * Read just the encoding declaration (or XML declaration) at the
- * start of an external entity.
- * When this method is called, we know that the declaration is
- * present (or appears to be). We also know that the entity is
- * in some sort of ASCII-derived 8-bit encoding.
- * The idea of this is to let us read what the 8-bit encoding is
- * before we've committed to converting any more of the file; the
- * XML or encoding declaration must be in 7-bit ASCII, so we're
- * safe as long as we don't go past it.
- */
- void read8bitEncodingDeclaration ()
- throws java.lang.Exception
- {
- int ch;
- readBufferPos = readBufferLength = 0;
-
- while (true) {
- ch = is.read();
- readBuffer[readBufferLength++] = (char)ch;
- switch (ch) {
- case (int)'>':
- return;
- case -1:
- error("end of file before end of XML or encoding declaration.",
- null, "?>");
- return;
- }
- if (readBuffer.length == readBufferLength) {
- error("unfinished XML or encoding declaration", null, null);
- }
- }
- }
-
-
-
- //////////////////////////////////////////////////////////////////////
- // Low-level I/O.
- //////////////////////////////////////////////////////////////////////
-
-
- /**
- * Read a chunk of data from an external input source.
- * <p>This is simply a front-end that fills the rawReadBuffer
- * with bytes, then calls the appropriate encoding handler.
- * @see #encoding
- * @see #rawReadBuffer
- * @see #readBuffer
- * @see #filterCR
- * @see #copyUtf8ReadBuffer
- * @see #copyIso8859_1ReadBuffer
- * @see #copyUcs_2ReadBuffer
- * @see #copyUcs_4ReadBuffer
- */
- void readDataChunk ()
- throws java.lang.Exception
- {
- int count, i, j;
-
- // See if we have any overflow.
- if (readBufferOverflow > -1)
- {
- readBuffer[0] = (char)readBufferOverflow;
- readBufferOverflow = -1;
- readBufferPos = 1;
- sawCR = true;
- }
- else
- {
- readBufferPos = 0;
- sawCR = false;
- }
-
- // Special situation -- we're taking
- // input from a character stream.
- if (sourceType == INPUT_READER)
- {
- count = reader.read(readBuffer, readBufferPos, READ_BUFFER_MAX-1);
- if (count < 0)
- {readBufferLength = -1;}
- else
- {
- readBufferLength = readBufferPos+count;
- filterCR();
- sawCR = false;
- }
- return;
- }
-
- // Read as many bytes as possible
- // into the read buffer.
- count = is.read(rawReadBuffer, 0, READ_BUFFER_MAX);
-
- // Dispatch to an encoding-specific
- // reader method to populate the
- // readBuffer.
- switch (encoding)
- {
- case ENCODING_UTF_8:
- copyUtf8ReadBuffer(count);
- break;
-
- case ENCODING_ISO_8859_1:
- copyIso8859_1ReadBuffer(count);
- break;
-
- case ENCODING_UCS_2_12:
- copyUcs2ReadBuffer(count, 8, 0);
- break;
-
- case ENCODING_UCS_2_21:
- copyUcs2ReadBuffer(count, 0, 8);
- break;
-
- case ENCODING_UCS_4_1234:
- copyUcs4ReadBuffer(count, 24, 16, 8, 0);
- break;
-
- case ENCODING_UCS_4_4321:
- copyUcs4ReadBuffer(count, 0, 8, 16, 24);
- break;
-
- case ENCODING_UCS_4_2143:
- copyUcs4ReadBuffer(count, 16, 24, 0, 8);
- break;
-
- case ENCODING_UCS_4_3412:
- copyUcs4ReadBuffer(count, 8, 0, 24, 16);
- break;
- }
-
- // Filter out all carriage returns
- // if we've seen any.
- if (sawCR)
- {
- filterCR();
- sawCR = false;
- }
-
- // Reset the position.
- readBufferPos = 0;
- currentByteCount += count;
- }
-
-
- /**
- * Filter carriage returns in the read buffer.
- * <p>CRLF becomes LF; CR becomes LF.
- * @see #readDataChunk
- * @see #readBuffer
- * @see #readBufferOverflow
- */
- void filterCR ()
- {
- int i, j;
-
- readBufferOverflow = -1;
-
- loop: for (i = 0, j = 0; j < readBufferLength; i++, j++)
- {
- switch (readBuffer[j])
- {
- case '\r':
- if (j == readBufferLength - 1)
- {
- readBufferOverflow = '\r';
- readBufferLength--;
- break loop;
- }
- else if (readBuffer[j+1] == '\n')
- {j++;}
- readBuffer[i] = '\n';
- break;
-
- case '\n':
- default:
- readBuffer[i] = readBuffer[j];
- break;
- }
- }
- readBufferLength = i;
- }
-
-
- /**
- * Convert a buffer of UTF-8-encoded bytes into UTF-16 characters.
- * <p>When readDataChunk() calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
- * readBuffer.
- * <p>The tricky part of this is dealing with UTF-8 multi-byte
- * sequences, but it doesn't seem to slow things down too much.
- * @param count The number of bytes to convert.
- * @see #readDataChunk
- * @see #rawReadBuffer
- * @see #readBuffer
- * @see #getNextUtf8Byte
- */
- void copyUtf8ReadBuffer (int count)
- throws java.lang.Exception
- {
- int i = 0;
- int j = readBufferPos;
- int b1;
- boolean isSurrogate = false;
- while (i < count) {
- b1 = rawReadBuffer[i++];
- isSurrogate = false;
-
- // Determine whether we are dealing
- // with a one-, two-, three-, or four-
- // byte sequence.
- if ((b1 & 0x80) == 0) {
- // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx
- readBuffer[j++] = (char)b1;
- } else if ((b1 & 0xe0) == 0xc0) {
- // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx
- readBuffer[j++] =
- (char)(((b1 & 0x1f) << 6) |
- getNextUtf8Byte(i++, count));
- } else if ((b1 & 0xf0) == 0xe0) {
- // 3-byte sequence: zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx
- readBuffer[j++] =
- (char)(((b1 & 0x0f) << 12) |
- (getNextUtf8Byte(i++, count) << 6) |
- getNextUtf8Byte(i++, count));
- } else if ((b1 & 0xf8) == 0xf0) {
- // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx
- // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx
- // (uuuuu = wwww + 1)
- isSurrogate = true;
- int b2 = getNextUtf8Byte(i++, count);
- int b3 = getNextUtf8Byte(i++, count);
- int b4 = getNextUtf8Byte(i++, count);
- readBuffer[j++] =
- (char)(0xd800 |
- ((((b1 & 0x07) << 2) | ((b2 & 0x30) >> 4) - 1) << 6) |
- ((b2 & 0x0f) << 2) |
- ((b3 & 0x30) >> 4));
- readBuffer[j++] =
- (char)(0xdc |
- ((b3 & 0x0f) << 6) |
- b4);
- // TODO: test that surrogate value is legal.
- } else {
- // Otherwise, the 8th bit may not be set in UTF-8
- encodingError("bad start for UTF-8 multi-byte sequence", b1, i);
- }
- if (readBuffer[j-1] == '\r') {
- sawCR = true;
- }
- }
- // How many characters have we read?
- readBufferLength = j;
- }
-
-
- /**
- * Return the next byte value in a UTF-8 sequence.
- * If it is not possible to get a byte from the current
- * entity, throw an exception.
- * @param pos The current position in the rawReadBuffer.
- * @param count The number of bytes in the rawReadBuffer
- * @return The significant six bits of a non-initial byte in
- * a UTF-8 sequence.
- * @exception EOFException If the sequence is incomplete.
- */
- int getNextUtf8Byte (int pos, int count)
- throws java.lang.Exception
- {
- int val;
-
- // Take a character from the buffer
- // or from the actual input stream.
- if (pos < count) {
- val = rawReadBuffer[pos];
- } else {
- val = is.read();
- if (val == -1) {
- encodingError("unfinished multi-byte UTF-8 sequence at EOF", -1, pos);
- }
- }
-
- // Check for the correct bits at the
- // start.
- if ((val & 0xc0) != 0x80) {
- encodingError("bad continuation of multi-byte UTF-8 sequence", val,
- pos + 1);
- }
-
- // Return the significant bits.
- return (val & 0x3f);
- }
-
-
- /**
- * Convert a buffer of ISO-8859-1-encoded bytes into UTF-16 characters.
- * <p>When readDataChunk() calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
- * readBuffer.
- * <p>This is a direct conversion, with no tricks.
- * @param count The number of bytes to convert.
- * @see #readDataChunk
- * @see #rawReadBuffer
- * @see #readBuffer
- */
- void copyIso8859_1ReadBuffer (int count)
- {
- int i, j;
- for (i = 0, j = readBufferPos; i < count; i++, j++) {
- readBuffer[j] = (char)(rawReadBuffer[i] & 0xff);
- if (readBuffer[j] == '\r') {
- sawCR = true;
- }
- }
- readBufferLength = j;
- }
-
-
- /**
- * Convert a buffer of UCS-2-encoded bytes into UTF-16 characters.
- * <p>When readDataChunk() calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
- * readBuffer.
- * @param count The number of bytes to convert.
- * @param shift1 The number of bits to shift byte 1.
- * @param shift2 The number of bits to shift byte 2
- * @see #readDataChunk
- * @see #rawReadBuffer
- * @see #readBuffer
- */
- void copyUcs2ReadBuffer (int count, int shift1, int shift2)
- throws java.lang.Exception
- {
- int j = readBufferPos;
-
- if (count > 0 && (count % 2) != 0) {
- encodingError("odd number of bytes in UCS-2 encoding", -1, count);
- }
- for (int i = 0; i < count; i+=2) {
- readBuffer[j++] =
- (char)(((rawReadBuffer[i] & 0xff) << shift1) |
- ((rawReadBuffer[i+1] & 0xff) << shift2));
- if (readBuffer[j-1] == '\r') {
- sawCR = true;
- }
- }
- readBufferLength = j;
- }
-
-
- /**
- * Convert a buffer of UCS-4-encoded bytes into UTF-16 characters.
- * <p>When readDataChunk() calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
- * readBuffer.
- * <p>Java has 16-bit chars, but this routine will attempt to use
- * surrogates to encoding values between 0x00010000 and 0x000fffff.
- * @param count The number of bytes to convert.
- * @param shift1 The number of bits to shift byte 1.
- * @param shift2 The number of bits to shift byte 2
- * @param shift3 The number of bits to shift byte 2
- * @param shift4 The number of bits to shift byte 2
- * @see #readDataChunk
- * @see #rawReadBuffer
- * @see #readBuffer
- */
- void copyUcs4ReadBuffer (int count, int shift1, int shift2,
- int shift3, int shift4)
- throws java.lang.Exception
- {
- int j = readBufferPos;
- int value;
-
- if (count > 0 && (count % 4) != 0) {
- encodingError("number of bytes in UCS-4 encoding not divisible by 4",
- -1, count);
- }
- for (int i = 0; i < count; i+=4) {
- value = (((rawReadBuffer[i] & 0xff) << shift1) |
- ((rawReadBuffer[i+1] & 0xff) << shift2) |
- ((rawReadBuffer[i+2] & 0xff) << shift3) |
- ((rawReadBuffer[i+3] & 0xff) << shift4));
- if (value < 0x0000ffff) {
- readBuffer[j++] = (char)value;
- if (value == (int)'\r') {
- sawCR = true;
- }
- } else if (value < 0x000fffff) {
- readBuffer[j++] = (char)(0xd8 | ((value & 0x000ffc00) >> 10));
- readBuffer[j++] = (char)(0xdc | (value & 0x0003ff));
- } else {
- encodingError("value cannot be represented in UTF-16",
- value, i);
- }
- }
- readBufferLength = j;
- }
-
-
- /**
- * Report a character encoding error.
- */
- void encodingError (String message, int value, int offset)
- throws java.lang.Exception
- {
- String uri;
-
- if (value >= 0) {
- message = message + " (byte value: 0x" +
- Integer.toHexString(value) + ')';
- }
- if (externalEntity != null) {
- uri = externalEntity.getURL().toString();
- } else {
- uri = baseURI;
- }
- handler.error(message, uri, -1, offset + currentByteCount);
- }
-
-
-
- //////////////////////////////////////////////////////////////////////
- // Local Variables.
- //////////////////////////////////////////////////////////////////////
-
- /**
- * Re-initialize the variables for each parse.
- */
- void initializeVariables ()
- {
- // No errors; first line
- errorCount = 0;
- line = 1;
- column = 0;
-
- // Set up the buffers for data and names
- dataBufferPos = 0;
- dataBuffer = new char[DATA_BUFFER_INITIAL];
- nameBufferPos = 0;
- nameBuffer = new char[NAME_BUFFER_INITIAL];
-
- // Set up the DTD hash tables
- elementInfo = new Hashtable();
- entityInfo = new Hashtable();
- notationInfo = new Hashtable();
-
- // Set up the variables for the current
- // element context.
- currentElement = null;
- currentElementContent = CONTENT_UNDECLARED;
-
- // Set up the input variables
- sourceType = INPUT_NONE;
- inputStack = new Stack();
- entityStack = new Stack();
- externalEntity = null;
- tagAttributePos = 0;
- tagAttributes = new String[100];
- rawReadBuffer = new byte[READ_BUFFER_MAX];
- readBufferOverflow = -1;
-
- context = CONTEXT_NONE;
-
- symbolTable = new Object[SYMBOL_TABLE_LENGTH];
- }
-
-
- /**
- * Clean up after the parse to allow some garbage collection.
- * Leave around anything that might be useful for queries.
- */
- void cleanupVariables ()
- {
- errorCount = -1;
- line = -1;
- column = -1;
- dataBuffer = null;
- nameBuffer = null;
- currentElement = null;
- currentElementContent = CONTENT_UNDECLARED;
- sourceType = INPUT_NONE;
- inputStack = null;
- externalEntity = null;
- entityStack = null;
- }
-
- //
- // The current XML handler interface.
- //
- XmlHandler handler;
-
- //
- // I/O information.
- //
- private Reader reader; // current reader
- private InputStream is; // current input stream
- private int line; // current line number
- private int column; // current column number
- private int sourceType; // type of input source
- private Stack inputStack; // stack of input soruces
- private URLConnection externalEntity; // current external entity
- private int encoding; // current character encoding.
- private int currentByteCount; // how many bytes read from current source.
-
- //
- // Maintain a count of errors.
- //
- private int errorCount;
-
- //
- // Buffers for decoded but unparsed character input.
- //
- private final static int READ_BUFFER_MAX = 16384;
- private char readBuffer[];
- private int readBufferPos;
- private int readBufferLength;
- private int readBufferOverflow; // overflow character from last data chunk.
-
-
- //
- // Buffer for undecoded raw byte input.
- //
- private byte rawReadBuffer[];
-
-
- //
- // Buffer for parsed character data.
- //
- private static int DATA_BUFFER_INITIAL = 4096;
- private char dataBuffer[];
- private int dataBufferPos;
-
- //
- // Buffer for parsed names.
- //
- private static int NAME_BUFFER_INITIAL = 1024;
- private char nameBuffer[];
- private int nameBufferPos;
-
-
- //
- // Hashtables for DTD information on elements, entities, and notations.
- //
- private Hashtable elementInfo;
- private Hashtable entityInfo;
- private Hashtable notationInfo;
-
-
- //
- // Element type currently in force.
- //
- private String currentElement;
- private int currentElementContent;
-
- //
- // Base external identifiers for resolution.
- //
- private String basePublicId;
- private String baseURI;
- private int baseEncoding;
- private Reader baseReader;
- private InputStream baseInputStream;
- private char baseInputBuffer[];
- private int baseInputBufferStart;
- private int baseInputBufferLength;
-
- //
- // Stack of entity names, to help detect recursion.
- //
- private Stack entityStack;
-
- //
- // Are we in a context where PEs are allowed?
- //
- private int context;
-
- //
- // Symbol table, for internalising names.
- //
- private Object symbolTable[];
- private final static int SYMBOL_TABLE_LENGTH = 1087;
-
- //
- // Hash table of attributes found in current start tag.
- //
- private String tagAttributes[];
- private int tagAttributePos;
-
- //
- // Utility flag: have we noticed a CR while reading the last
- // data chunk? If so, we will have to go back and normalise
- // CR/LF.
- //
- private boolean sawCR;
-}
diff --git a/jEdit/com/microstar/xml/package.html b/jEdit/com/microstar/xml/package.html
deleted file mode 100644
index 44b8973..0000000
--- a/jEdit/com/microstar/xml/package.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-<html>
-<body>
-An obsolete and deprecated XML parser. Please use a SAX2 compliant parser such as one from org.xml.sax.helpers.XMLReaderFactory, or a SAX1 parser from { @ref MiscUtilities.parseXML(). }. This package will be removed from jEdit before 4.4 final is released.
-</body>
-</html>
\ No newline at end of file
diff --git a/jEdit/de/masters_of_disaster/ant/tasks/ar/Ar.java b/jEdit/de/masters_of_disaster/ant/tasks/ar/Ar.java
index c4e8350..bc97798 100644
--- a/jEdit/de/masters_of_disaster/ant/tasks/ar/Ar.java
+++ b/jEdit/de/masters_of_disaster/ant/tasks/ar/Ar.java
@@ -1,468 +1,468 @@
-package de.masters_of_disaster.ant.tasks.ar;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Vector;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.MatchingTask;
-import org.apache.tools.ant.types.EnumeratedAttribute;
-import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.util.FileUtils;
-import org.apache.tools.ant.util.MergingMapper;
-import org.apache.tools.ant.util.SourceFileScanner;
-import org.apache.tools.zip.UnixStat;
-
-/**
- * Creates an ar archive.
- *
- * @ant.task category="packaging"
- */
-public class Ar extends MatchingTask {
- File destFile;
- File baseDir;
-
- private ArLongFileMode longFileMode = new ArLongFileMode();
-
- Vector filesets = new Vector();
-
- /**
- * Indicates whether the user has been warned about long files already.
- */
- private boolean longWarningGiven = false;
-
- /**
- * Add a new fileset with the option to specify permissions
- * @return the ar fileset to be used as the nested element.
- */
- public ArFileSet createArFileSet() {
- ArFileSet fileset = new ArFileSet();
- filesets.addElement(fileset);
- return fileset;
- }
-
-
- /**
- * Set the name/location of where to create the ar file.
- * @param destFile The output of the tar
- */
- public void setDestFile(File destFile) {
- this.destFile = destFile;
- }
-
- /**
- * This is the base directory to look in for things to ar.
- * @param baseDir the base directory.
- */
- public void setBasedir(File baseDir) {
- this.baseDir = baseDir;
- }
-
- /**
- * Set how to handle long files, those with a name>16 chars or containing spaces.
- * Optional, default=warn.
- * <p>
- * Allowable values are
- * <ul>
- * <li> truncate - names are truncated to the maximum length, spaces are replaced by '_'
- * <li> fail - names greater than the maximum cause a build exception
- * <li> warn - names greater than the maximum cause a warning and TRUNCATE is used
- * <li> bsd - BSD variant is used if any names are greater than the maximum.
- * <li> gnu - GNU variant is used if any names are greater than the maximum.
- * <li> omit - files with a name greater than the maximum are omitted from the archive
- * </ul>
- * @param mode the mode to handle long file names.
- */
- public void setLongfile(ArLongFileMode mode) {
- this.longFileMode = mode;
- }
-
- /**
- * do the business
- * @throws BuildException on error
- */
- public void execute() throws BuildException {
- if (destFile == null) {
- throw new BuildException("destFile attribute must be set!",
- getLocation());
- }
-
- if (destFile.exists() && destFile.isDirectory()) {
- throw new BuildException("destFile is a directory!",
- getLocation());
- }
-
- if (destFile.exists() && !destFile.canWrite()) {
- throw new BuildException("Can not write to the specified destFile!",
- getLocation());
- }
-
- Vector savedFileSets = (Vector) filesets.clone();
- try {
- if (baseDir != null) {
- if (!baseDir.exists()) {
- throw new BuildException("basedir does not exist!",
- getLocation());
- }
-
- // add the main fileset to the list of filesets to process.
- ArFileSet mainFileSet = new ArFileSet(fileset);
- mainFileSet.setDir(baseDir);
- filesets.addElement(mainFileSet);
- }
-
- if (filesets.size() == 0) {
- throw new BuildException("You must supply either a basedir "
- + "attribute or some nested filesets.",
- getLocation());
- }
-
- // check if ar is out of date with respect to each
- // fileset
- boolean upToDate = true;
- for (Enumeration e = filesets.elements(); e.hasMoreElements();) {
- ArFileSet fs = (ArFileSet) e.nextElement();
- String[] files = fs.getFiles(getProject());
-
- if (!archiveIsUpToDate(files, fs.getDir(getProject()))) {
- upToDate = false;
- }
-
- for (int i = 0; i < files.length; ++i) {
- if (destFile.equals(new File(fs.getDir(getProject()),
- files[i]))) {
- throw new BuildException("An ar file cannot include "
- + "itself", getLocation());
- }
- }
- }
-
- if (upToDate) {
- log("Nothing to do: " + destFile.getAbsolutePath()
- + " is up to date.", Project.MSG_INFO);
- return;
- }
-
- log("Building ar: " + destFile.getAbsolutePath(), Project.MSG_INFO);
-
- ArOutputStream aOut = null;
- try {
- aOut = new ArOutputStream(
- new BufferedOutputStream(
- new FileOutputStream(destFile)));
- if (longFileMode.isTruncateMode()
- || longFileMode.isWarnMode()) {
- aOut.setLongFileMode(ArOutputStream.LONGFILE_TRUNCATE);
- } else if (longFileMode.isFailMode()
- || longFileMode.isOmitMode()) {
- aOut.setLongFileMode(ArOutputStream.LONGFILE_ERROR);
- } else if (longFileMode.isBsdMode()) {
- aOut.setLongFileMode(ArOutputStream.LONGFILE_BSD);
- } else {
- // GNU
- aOut.setLongFileMode(ArOutputStream.LONGFILE_GNU);
- }
-
- longWarningGiven = false;
- for (Enumeration e = filesets.elements();
- e.hasMoreElements();) {
- ArFileSet fs = (ArFileSet) e.nextElement();
- String[] files = fs.getFiles(getProject());
- if (files.length > 1 && fs.getFullpath().length() > 0) {
- throw new BuildException("fullpath attribute may only "
- + "be specified for "
- + "filesets that specify a "
- + "single file.");
- }
- for (int i = 0; i < files.length; i++) {
- File f = new File(fs.getDir(getProject()), files[i]);
- arFile(f, aOut, fs);
- }
- }
- } catch (IOException ioe) {
- String msg = "Problem creating AR: " + ioe.getMessage();
- throw new BuildException(msg, ioe, getLocation());
- } finally {
- FileUtils.close(aOut);
- }
- } finally {
- filesets = savedFileSets;
- }
- }
-
- /**
- * ar a file
- * @param file the file to ar
- * @param aOut the output stream
- * @param arFileSet the fileset that the file came from.
- * @throws IOException on error
- */
- protected void arFile(File file, ArOutputStream aOut, ArFileSet arFileSet)
- throws IOException {
- FileInputStream fIn = null;
-
- if (file.isDirectory()) {
- return;
- }
-
- String fileName = file.getName();
-
- String fullpath = arFileSet.getFullpath();
- if (fullpath.length() > 0) {
- fileName = fullpath.substring(fullpath.lastIndexOf('/'));
- }
-
- // don't add "" to the archive
- if (fileName.length() <= 0) {
- return;
- }
-
- try {
- if ((fileName.length() >= ArConstants.NAMELEN)
- || (-1 != fileName.indexOf(' '))) {
- if (longFileMode.isOmitMode()) {
- log("Omitting: " + fileName, Project.MSG_INFO);
- return;
- } else if (longFileMode.isWarnMode()) {
- if (!longWarningGiven) {
- log("Resulting ar file contains truncated or space converted filenames",
- Project.MSG_WARN);
- longWarningGiven = true;
- }
- log("Entry: \"" + fileName + "\" longer than "
- + ArConstants.NAMELEN + " characters or containing spaces.",
- Project.MSG_WARN);
- } else if (longFileMode.isFailMode()) {
- throw new BuildException("Entry: \"" + fileName
- + "\" longer than " + ArConstants.NAMELEN
- + "characters or containting spaces.", getLocation());
- }
- }
-
- ArEntry ae = new ArEntry(fileName);
- ae.setFileDate(file.lastModified());
- ae.setUserId(arFileSet.getUid());
- ae.setGroupId(arFileSet.getGid());
- ae.setMode(arFileSet.getMode());
- ae.setSize(file.length());
-
- aOut.putNextEntry(ae);
-
- fIn = new FileInputStream(file);
-
- byte[] buffer = new byte[8 * 1024];
- int count = 0;
- do {
- aOut.write(buffer, 0, count);
- count = fIn.read(buffer, 0, buffer.length);
- } while (count != -1);
-
- aOut.closeEntry();
- } finally {
- if (fIn != null) {
- fIn.close();
- }
- }
- }
-
- /**
- * Is the archive up to date in relationship to a list of files.
- * @param files the files to check
- * @param dir the base directory for the files.
- * @return true if the archive is up to date.
- */
- protected boolean archiveIsUpToDate(String[] files, File dir) {
- SourceFileScanner sfs = new SourceFileScanner(this);
- MergingMapper mm = new MergingMapper();
- mm.setTo(destFile.getAbsolutePath());
- return sfs.restrict(files, dir, null, mm).length == 0;
- }
-
- /**
- * This is a FileSet with the option to specify permissions
- * and other attributes.
- */
- public static class ArFileSet extends FileSet {
- private String[] files = null;
-
- private int fileMode = UnixStat.FILE_FLAG | UnixStat.DEFAULT_FILE_PERM;
- private int uid;
- private int gid;
- private String fullpath = "";
-
- /**
- * Creates a new <code>ArFileSet</code> instance.
- * Using a fileset as a constructor argument.
- *
- * @param fileset a <code>FileSet</code> value
- */
- public ArFileSet(FileSet fileset) {
- super(fileset);
- }
-
- /**
- * Creates a new <code>ArFileSet</code> instance.
- *
- */
- public ArFileSet() {
- super();
- }
-
- /**
- * Get a list of files and directories specified in the fileset.
- * @param p the current project.
- * @return a list of file and directory names, relative to
- * the baseDir for the project.
- */
- public String[] getFiles(Project p) {
- if (files == null) {
- DirectoryScanner ds = getDirectoryScanner(p);
- files = ds.getIncludedFiles();
- }
-
- return files;
- }
-
- /**
- * A 3 digit octal string, specify the user, group and
- * other modes in the standard Unix fashion;
- * optional, default=0644
- * @param octalString a 3 digit octal string.
- */
- public void setMode(String octalString) {
- this.fileMode =
- UnixStat.FILE_FLAG | Integer.parseInt(octalString, 8);
- }
-
- /**
- * @return the current mode.
- */
- public int getMode() {
- return fileMode;
- }
-
- /**
- * The UID for the ar entry; optional, default="0"
- * @param uid the id of the user for the ar entry.
- */
- public void setUid(int uid) {
- this.uid = uid;
- }
-
- /**
- * @return the UID for the ar entry
- */
- public int getUid() {
- return uid;
- }
-
- /**
- * The GID for the ar entry; optional, default="0"
- * @param gid the group id.
- */
- public void setGid(int gid) {
- this.gid = gid;
- }
-
- /**
- * @return the group identifier.
- */
- public int getGid() {
- return gid;
- }
-
- /**
- * If the fullpath attribute is set, the file in the fileset
- * is written with the last part of the path in the archive.
- * If the fullpath ends in '/' the file is omitted from the archive.
- * It is an error to have more than one file specified in such a fileset.
- * @param fullpath the path to use for the file in a fileset.
- */
- public void setFullpath(String fullpath) {
- this.fullpath = fullpath;
- }
-
- /**
- * @return the path to use for a single file fileset.
- */
- public String getFullpath() {
- return fullpath;
- }
- }
-
- /**
- * Set of options for long file handling in the task.
- */
- public static class ArLongFileMode extends EnumeratedAttribute {
- /** permissible values for longfile attribute */
- public static final String
- WARN = "warn",
- FAIL = "fail",
- TRUNCATE = "truncate",
- GNU = "gnu",
- BSD = "bsd",
- OMIT = "omit";
-
- private final String[] validModes = {WARN, FAIL, TRUNCATE, GNU, BSD, OMIT};
-
- /** Constructor, defaults to "warn" */
- public ArLongFileMode() {
- super();
- setValue(WARN);
- }
-
- /**
- * @return the possible values for this enumerated type.
- */
- public String[] getValues() {
- return validModes;
- }
-
- /**
- * @return true if value is "truncate".
- */
- public boolean isTruncateMode() {
- return TRUNCATE.equalsIgnoreCase(getValue());
- }
-
- /**
- * @return true if value is "warn".
- */
- public boolean isWarnMode() {
- return WARN.equalsIgnoreCase(getValue());
- }
-
- /**
- * @return true if value is "gnu".
- */
- public boolean isGnuMode() {
- return GNU.equalsIgnoreCase(getValue());
- }
-
- /**
- * @return true if value is "bsd".
- */
- public boolean isBsdMode() {
- return BSD.equalsIgnoreCase(getValue());
- }
-
- /**
- * @return true if value is "fail".
- */
- public boolean isFailMode() {
- return FAIL.equalsIgnoreCase(getValue());
- }
-
- /**
- * @return true if value is "omit".
- */
- public boolean isOmitMode() {
- return OMIT.equalsIgnoreCase(getValue());
- }
- }
-}
+package de.masters_of_disaster.ant.tasks.ar;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.MergingMapper;
+import org.apache.tools.ant.util.SourceFileScanner;
+import org.apache.tools.zip.UnixStat;
+
+/**
+ * Creates an ar archive.
+ *
+ * @ant.task category="packaging"
+ */
+public class Ar extends MatchingTask {
+ File destFile;
+ File baseDir;
+
+ private ArLongFileMode longFileMode = new ArLongFileMode();
+
+ Vector filesets = new Vector();
+
+ /**
+ * Indicates whether the user has been warned about long files already.
+ */
+ private boolean longWarningGiven = false;
+
+ /**
+ * Add a new fileset with the option to specify permissions
+ * @return the ar fileset to be used as the nested element.
+ */
+ public ArFileSet createArFileSet() {
+ ArFileSet fileset = new ArFileSet();
+ filesets.addElement(fileset);
+ return fileset;
+ }
+
+
+ /**
+ * Set the name/location of where to create the ar file.
+ * @param destFile The output of the tar
+ */
+ public void setDestFile(File destFile) {
+ this.destFile = destFile;
+ }
+
+ /**
+ * This is the base directory to look in for things to ar.
+ * @param baseDir the base directory.
+ */
+ public void setBasedir(File baseDir) {
+ this.baseDir = baseDir;
+ }
+
+ /**
+ * Set how to handle long files, those with a name>16 chars or containing spaces.
+ * Optional, default=warn.
+ * <p>
+ * Allowable values are
+ * <ul>
+ * <li> truncate - names are truncated to the maximum length, spaces are replaced by '_'
+ * <li> fail - names greater than the maximum cause a build exception
+ * <li> warn - names greater than the maximum cause a warning and TRUNCATE is used
+ * <li> bsd - BSD variant is used if any names are greater than the maximum.
+ * <li> gnu - GNU variant is used if any names are greater than the maximum.
+ * <li> omit - files with a name greater than the maximum are omitted from the archive
+ * </ul>
+ * @param mode the mode to handle long file names.
+ */
+ public void setLongfile(ArLongFileMode mode) {
+ this.longFileMode = mode;
+ }
+
+ /**
+ * do the business
+ * @throws BuildException on error
+ */
+ public void execute() throws BuildException {
+ if (destFile == null) {
+ throw new BuildException("destFile attribute must be set!",
+ getLocation());
+ }
+
+ if (destFile.exists() && destFile.isDirectory()) {
+ throw new BuildException("destFile is a directory!",
+ getLocation());
+ }
+
+ if (destFile.exists() && !destFile.canWrite()) {
+ throw new BuildException("Can not write to the specified destFile!",
+ getLocation());
+ }
+
+ Vector savedFileSets = (Vector) filesets.clone();
+ try {
+ if (baseDir != null) {
+ if (!baseDir.exists()) {
+ throw new BuildException("basedir does not exist!",
+ getLocation());
+ }
+
+ // add the main fileset to the list of filesets to process.
+ ArFileSet mainFileSet = new ArFileSet(fileset);
+ mainFileSet.setDir(baseDir);
+ filesets.addElement(mainFileSet);
+ }
+
+ if (filesets.size() == 0) {
+ throw new BuildException("You must supply either a basedir "
+ + "attribute or some nested filesets.",
+ getLocation());
+ }
+
+ // check if ar is out of date with respect to each
+ // fileset
+ boolean upToDate = true;
+ for (Enumeration e = filesets.elements(); e.hasMoreElements();) {
+ ArFileSet fs = (ArFileSet) e.nextElement();
+ String[] files = fs.getFiles(getProject());
+
+ if (!archiveIsUpToDate(files, fs.getDir(getProject()))) {
+ upToDate = false;
+ }
+
+ for (int i = 0; i < files.length; ++i) {
+ if (destFile.equals(new File(fs.getDir(getProject()),
+ files[i]))) {
+ throw new BuildException("An ar file cannot include "
+ + "itself", getLocation());
+ }
+ }
+ }
+
+ if (upToDate) {
+ log("Nothing to do: " + destFile.getAbsolutePath()
+ + " is up to date.", Project.MSG_INFO);
+ return;
+ }
+
+ log("Building ar: " + destFile.getAbsolutePath(), Project.MSG_INFO);
+
+ ArOutputStream aOut = null;
+ try {
+ aOut = new ArOutputStream(
+ new BufferedOutputStream(
+ new FileOutputStream(destFile)));
+ if (longFileMode.isTruncateMode()
+ || longFileMode.isWarnMode()) {
+ aOut.setLongFileMode(ArOutputStream.LONGFILE_TRUNCATE);
+ } else if (longFileMode.isFailMode()
+ || longFileMode.isOmitMode()) {
+ aOut.setLongFileMode(ArOutputStream.LONGFILE_ERROR);
+ } else if (longFileMode.isBsdMode()) {
+ aOut.setLongFileMode(ArOutputStream.LONGFILE_BSD);
+ } else {
+ // GNU
+ aOut.setLongFileMode(ArOutputStream.LONGFILE_GNU);
+ }
+
+ longWarningGiven = false;
+ for (Enumeration e = filesets.elements();
+ e.hasMoreElements();) {
+ ArFileSet fs = (ArFileSet) e.nextElement();
+ String[] files = fs.getFiles(getProject());
+ if (files.length > 1 && fs.getFullpath().length() > 0) {
+ throw new BuildException("fullpath attribute may only "
+ + "be specified for "
+ + "filesets that specify a "
+ + "single file.");
+ }
+ for (int i = 0; i < files.length; i++) {
+ File f = new File(fs.getDir(getProject()), files[i]);
+ arFile(f, aOut, fs);
+ }
+ }
+ } catch (IOException ioe) {
+ String msg = "Problem creating AR: " + ioe.getMessage();
+ throw new BuildException(msg, ioe, getLocation());
+ } finally {
+ FileUtils.close(aOut);
+ }
+ } finally {
+ filesets = savedFileSets;
+ }
+ }
+
+ /**
+ * ar a file
+ * @param file the file to ar
+ * @param aOut the output stream
+ * @param arFileSet the fileset that the file came from.
+ * @throws IOException on error
+ */
+ protected void arFile(File file, ArOutputStream aOut, ArFileSet arFileSet)
+ throws IOException {
+ FileInputStream fIn = null;
+
+ if (file.isDirectory()) {
+ return;
+ }
+
+ String fileName = file.getName();
+
+ String fullpath = arFileSet.getFullpath();
+ if (fullpath.length() > 0) {
+ fileName = fullpath.substring(fullpath.lastIndexOf('/'));
+ }
+
+ // don't add "" to the archive
+ if (fileName.length() <= 0) {
+ return;
+ }
+
+ try {
+ if ((fileName.length() >= ArConstants.NAMELEN)
+ || (-1 != fileName.indexOf(' '))) {
+ if (longFileMode.isOmitMode()) {
+ log("Omitting: " + fileName, Project.MSG_INFO);
+ return;
+ } else if (longFileMode.isWarnMode()) {
+ if (!longWarningGiven) {
+ log("Resulting ar file contains truncated or space converted filenames",
+ Project.MSG_WARN);
+ longWarningGiven = true;
+ }
+ log("Entry: \"" + fileName + "\" longer than "
+ + ArConstants.NAMELEN + " characters or containing spaces.",
+ Project.MSG_WARN);
+ } else if (longFileMode.isFailMode()) {
+ throw new BuildException("Entry: \"" + fileName
+ + "\" longer than " + ArConstants.NAMELEN
+ + "characters or containting spaces.", getLocation());
+ }
+ }
+
+ ArEntry ae = new ArEntry(fileName);
+ ae.setFileDate(file.lastModified());
+ ae.setUserId(arFileSet.getUid());
+ ae.setGroupId(arFileSet.getGid());
+ ae.setMode(arFileSet.getMode());
+ ae.setSize(file.length());
+
+ aOut.putNextEntry(ae);
+
+ fIn = new FileInputStream(file);
+
+ byte[] buffer = new byte[8 * 1024];
+ int count = 0;
+ do {
+ aOut.write(buffer, 0, count);
+ count = fIn.read(buffer, 0, buffer.length);
+ } while (count != -1);
+
+ aOut.closeEntry();
+ } finally {
+ if (fIn != null) {
+ fIn.close();
+ }
+ }
+ }
+
+ /**
+ * Is the archive up to date in relationship to a list of files.
+ * @param files the files to check
+ * @param dir the base directory for the files.
+ * @return true if the archive is up to date.
+ */
+ protected boolean archiveIsUpToDate(String[] files, File dir) {
+ SourceFileScanner sfs = new SourceFileScanner(this);
+ MergingMapper mm = new MergingMapper();
+ mm.setTo(destFile.getAbsolutePath());
+ return sfs.restrict(files, dir, null, mm).length == 0;
+ }
+
+ /**
+ * This is a FileSet with the option to specify permissions
+ * and other attributes.
+ */
+ public static class ArFileSet extends FileSet {
+ private String[] files = null;
+
+ private int fileMode = UnixStat.FILE_FLAG | UnixStat.DEFAULT_FILE_PERM;
+ private int uid;
+ private int gid;
+ private String fullpath = "";
+
+ /**
+ * Creates a new <code>ArFileSet</code> instance.
+ * Using a fileset as a constructor argument.
+ *
+ * @param fileset a <code>FileSet</code> value
+ */
+ public ArFileSet(FileSet fileset) {
+ super(fileset);
+ }
+
+ /**
+ * Creates a new <code>ArFileSet</code> instance.
+ *
+ */
+ public ArFileSet() {
+ super();
+ }
+
+ /**
+ * Get a list of files and directories specified in the fileset.
+ * @param p the current project.
+ * @return a list of file and directory names, relative to
+ * the baseDir for the project.
+ */
+ public String[] getFiles(Project p) {
+ if (files == null) {
+ DirectoryScanner ds = getDirectoryScanner(p);
+ files = ds.getIncludedFiles();
+ }
+
+ return files;
+ }
+
+ /**
+ * A 3 digit octal string, specify the user, group and
+ * other modes in the standard Unix fashion;
+ * optional, default=0644
+ * @param octalString a 3 digit octal string.
+ */
+ public void setMode(String octalString) {
+ this.fileMode =
+ UnixStat.FILE_FLAG | Integer.parseInt(octalString, 8);
+ }
+
+ /**
+ * @return the current mode.
+ */
+ public int getMode() {
+ return fileMode;
+ }
+
+ /**
+ * The UID for the ar entry; optional, default="0"
+ * @param uid the id of the user for the ar entry.
+ */
+ public void setUid(int uid) {
+ this.uid = uid;
+ }
+
+ /**
+ * @return the UID for the ar entry
+ */
+ public int getUid() {
+ return uid;
+ }
+
+ /**
+ * The GID for the ar entry; optional, default="0"
+ * @param gid the group id.
+ */
+ public void setGid(int gid) {
+ this.gid = gid;
+ }
+
+ /**
+ * @return the group identifier.
+ */
+ public int getGid() {
+ return gid;
+ }
+
+ /**
+ * If the fullpath attribute is set, the file in the fileset
+ * is written with the last part of the path in the archive.
+ * If the fullpath ends in '/' the file is omitted from the archive.
+ * It is an error to have more than one file specified in such a fileset.
+ * @param fullpath the path to use for the file in a fileset.
+ */
+ public void setFullpath(String fullpath) {
+ this.fullpath = fullpath;
+ }
+
+ /**
+ * @return the path to use for a single file fileset.
+ */
+ public String getFullpath() {
+ return fullpath;
+ }
+ }
+
+ /**
+ * Set of options for long file handling in the task.
+ */
+ public static class ArLongFileMode extends EnumeratedAttribute {
+ /** permissible values for longfile attribute */
+ public static final String
+ WARN = "warn",
+ FAIL = "fail",
+ TRUNCATE = "truncate",
+ GNU = "gnu",
+ BSD = "bsd",
+ OMIT = "omit";
+
+ private final String[] validModes = {WARN, FAIL, TRUNCATE, GNU, BSD, OMIT};
+
+ /** Constructor, defaults to "warn" */
+ public ArLongFileMode() {
+ super();
+ setValue(WARN);
+ }
+
+ /**
+ * @return the possible values for this enumerated type.
+ */
+ public String[] getValues() {
+ return validModes;
+ }
+
+ /**
+ * @return true if value is "truncate".
+ */
+ public boolean isTruncateMode() {
+ return TRUNCATE.equalsIgnoreCase(getValue());
+ }
+
+ /**
+ * @return true if value is "warn".
+ */
+ public boolean isWarnMode() {
+ return WARN.equalsIgnoreCase(getValue());
+ }
+
+ /**
+ * @return true if value is "gnu".
+ */
+ public boolean isGnuMode() {
+ return GNU.equalsIgnoreCase(getValue());
+ }
+
+ /**
+ * @return true if value is "bsd".
+ */
+ public boolean isBsdMode() {
+ return BSD.equalsIgnoreCase(getValue());
+ }
+
+ /**
+ * @return true if value is "fail".
+ */
+ public boolean isFailMode() {
+ return FAIL.equalsIgnoreCase(getValue());
+ }
+
+ /**
+ * @return true if value is "omit".
+ */
+ public boolean isOmitMode() {
+ return OMIT.equalsIgnoreCase(getValue());
+ }
+ }
+}
diff --git a/jEdit/de/masters_of_disaster/ant/tasks/ar/ArConstants.java b/jEdit/de/masters_of_disaster/ant/tasks/ar/ArConstants.java
index 0565314..6ebf8cc 100644
--- a/jEdit/de/masters_of_disaster/ant/tasks/ar/ArConstants.java
+++ b/jEdit/de/masters_of_disaster/ant/tasks/ar/ArConstants.java
@@ -1,62 +1,62 @@
-package de.masters_of_disaster.ant.tasks.ar;
-
-/**
- * This interface contains all the definitions used in the package.
- */
-
-public interface ArConstants {
- /**
- * The length of the name field in a file header.
- */
- int NAMELEN = 16;
-
- /**
- * The length of the file date field in a file header.
- */
- int FILEDATELEN = 12;
-
- /**
- * The length of the user id field in a file header.
- */
- int UIDLEN = 6;
-
- /**
- * The length of the group id field in a file header.
- */
- int GIDLEN = 6;
-
- /**
- * The length of the mode field in a file header.
- */
- int MODELEN = 8;
-
- /**
- * The length of the size field in a file header.
- */
- int SIZELEN = 10;
-
- /**
- * The length of the magic field in a file header.
- */
- int MAGICLEN = 2;
-
- /**
- * The magic tag put at the end of a file header.
- */
- String HEADERMAGIC = "`\n";
-
- /**
- * The headerlength of a file header.
- */
- int HEADERLENGTH = NAMELEN + FILEDATELEN + UIDLEN + GIDLEN + MODELEN + SIZELEN + MAGICLEN;
-
- /**
- * The length of the magic field in a file header.
- */
- byte[] PADDING = { '\n' };
-
- /**
- * The magic tag representing an ar archive.
- */
- byte[] ARMAGIC = { '!', '<', 'a', 'r', 'c', 'h', '>', '\n' };
-}
+package de.masters_of_disaster.ant.tasks.ar;
+
+/**
+ * This interface contains all the definitions used in the package.
+ */
+
+public interface ArConstants {
+ /**
+ * The length of the name field in a file header.
+ */
+ int NAMELEN = 16;
+
+ /**
+ * The length of the file date field in a file header.
+ */
+ int FILEDATELEN = 12;
+
+ /**
+ * The length of the user id field in a file header.
+ */
+ int UIDLEN = 6;
+
+ /**
+ * The length of the group id field in a file header.
+ */
+ int GIDLEN = 6;
+
+ /**
+ * The length of the mode field in a file header.
+ */
+ int MODELEN = 8;
+
+ /**
+ * The length of the size field in a file header.
+ */
+ int SIZELEN = 10;
+
+ /**
+ * The length of the magic field in a file header.
+ */
+ int MAGICLEN = 2;
+
+ /**
+ * The magic tag put at the end of a file header.
+ */
+ String HEADERMAGIC = "`\n";
+
+ /**
+ * The headerlength of a file header.
+ */
+ int HEADERLENGTH = NAMELEN + FILEDATELEN + UIDLEN + GIDLEN + MODELEN + SIZELEN + MAGICLEN;
+
+ /**
+ * The length of the magic field in a file header.
+ */
+ byte[] PADDING = { '\n' };
+
+ /**
+ * The magic tag representing an ar archive.
+ */
+ byte[] ARMAGIC = { '!', '<', 'a', 'r', 'c', 'h', '>', '\n' };
+}
diff --git a/jEdit/de/masters_of_disaster/ant/tasks/ar/ArEntry.java b/jEdit/de/masters_of_disaster/ant/tasks/ar/ArEntry.java
index 91aa68d..896bd34 100644
--- a/jEdit/de/masters_of_disaster/ant/tasks/ar/ArEntry.java
+++ b/jEdit/de/masters_of_disaster/ant/tasks/ar/ArEntry.java
@@ -1,355 +1,355 @@
-package de.masters_of_disaster.ant.tasks.ar;
-
-import java.io.File;
-import java.util.Date;
-
-/**
- * This class represents an entry in an Ar archive. It consists
- * of the entry's header, as well as the entry's File. Entries
- * can be instantiated in one of three ways, depending on how
- * they are to be used.
- * <p>
- * ArEntries that are created from the header bytes read from
- * an archive are instantiated with the ArEntry( byte[] )
- * constructor. These entries will be used when extracting from
- * or listing the contents of an archive. These entries have their
- * header filled in using the header bytes. They also set the File
- * to null, since they reference an archive entry not a file.
- * <p>
- * ArEntries that are created from Files that are to be written
- * into an archive are instantiated with the ArEntry( File )
- * constructor. These entries have their header filled in using
- * the File's information. They also keep a reference to the File
- * for convenience when writing entries.
- * <p>
- * Finally, ArEntries can be constructed from nothing but a name.
- * This allows the programmer to construct the entry by hand, for
- * instance when only an InputStream is available for writing to
- * the archive, and the header information is constructed from
- * other information. In this case the header fields are set to
- * defaults and the File is set to null.
- *
- * <p>
- * The C structure for an Ar Entry's header is:
- * <pre>
- * struct header {
- * char filename[16];
- * char filedate[12];
- * char uid[6];
- * char gid[6];
- * char mode[8];
- * char size[10];
- * char magic[2];
- * } header;
- * </pre>
- *
- */
-
-public class ArEntry implements ArConstants {
- /** The entry's filename. */
- private StringBuffer filename;
-
- /** The entry's file date. */
- private long fileDate;
-
- /** The entry's user id. */
- private int userId;
-
- /** The entry's group id. */
- private int groupId;
-
- /** The entry's permission mode. */
- private int mode;
-
- /** The entry's size. */
- private long size;
-
- /** The entry's magic tag. */
- private StringBuffer magic;
-
- /** The entry's file reference */
- private File file;
-
- /** Default permissions bits for files */
- public static final int DEFAULT_FILE_MODE = 0100644;
-
- /** Convert millis to seconds */
- public static final int MILLIS_PER_SECOND = 1000;
-
- /**
- * Construct an empty entry and prepares the header values.
- */
- private ArEntry () {
- this.magic = new StringBuffer(HEADERMAGIC);
- this.filename = new StringBuffer();
- this.userId = 0;
- this.groupId = 0;
- this.file = null;
- }
-
- /**
- * Construct an entry with only a name. This allows the programmer
- * to construct the entry's header "by hand". File is set to null.
- *
- * @param name the entry name
- */
- public ArEntry(String name) {
- this();
- if (name.endsWith("/")) {
- throw new IllegalArgumentException("ar archives can only contain files");
- }
- this.filename = new StringBuffer(name);
- this.mode = DEFAULT_FILE_MODE;
- this.userId = 0;
- this.groupId = 0;
- this.size = 0;
- this.fileDate = (new Date()).getTime() / MILLIS_PER_SECOND;
- }
-
- /**
- * Construct an entry for a file. File is set to file, and the
- * header is constructed from information from the file.
- *
- * @param file The file that the entry represents.
- */
- public ArEntry(File file) {
- this();
- if (file.isDirectory()) {
- throw new IllegalArgumentException("ar archives can only contain files");
- }
- this.file = file;
- this.filename = new StringBuffer(file.getName());
- this.fileDate = file.lastModified() / MILLIS_PER_SECOND;
- this.mode = DEFAULT_FILE_MODE;
- this.size = file.length();
- }
-
- /**
- * Construct an entry from an archive's header bytes. File is set
- * to null.
- *
- * @param headerBuf The header bytes from an ar archive entry.
- */
- public ArEntry(byte[] headerBuf) {
- this();
- this.parseArHeader(headerBuf);
- }
-
- /**
- * Determine if the two entries are equal. Equality is determined
- * by the header names being equal.
- *
- * @param it Entry to be checked for equality.
- * @return True if the entries are equal.
- */
- public boolean equals(ArEntry it) {
- return this.getFilename().equals(it.getFilename());
- }
-
- /**
- * Determine if the two entries are equal. Equality is determined
- * by the header names being equal.
- *
- * @param it Entry to be checked for equality.
- * @return True if the entries are equal.
- */
- public boolean equals(Object it) {
- if (it == null || getClass() != it.getClass()) {
- return false;
- }
- return equals((ArEntry) it);
- }
-
- /**
- * Hashcodes are based on entry names.
- *
- * @return the entry hashcode
- */
- public int hashCode() {
- return getFilename().hashCode();
- }
-
- /**
- * Get this entry's name.
- *
- * @return This entry's name.
- */
- public String getFilename() {
- return this.filename.toString();
- }
-
- /**
- * Set this entry's name.
- *
- * @param name This entry's new name.
- */
- public void setFilename(String filename) {
- this.filename = new StringBuffer(filename);
- }
-
- /**
- * Set the mode for this entry
- *
- * @param mode the mode for this entry
- */
- public void setMode(int mode) {
- this.mode = mode;
- }
-
- /**
- * Get this entry's user id.
- *
- * @return This entry's user id.
- */
- public int getUserId() {
- return this.userId;
- }
-
- /**
- * Set this entry's user id.
- *
- * @param userId This entry's new user id.
- */
- public void setUserId(int userId) {
- this.userId = userId;
- }
-
- /**
- * Get this entry's group id.
- *
- * @return This entry's group id.
- */
- public int getGroupId() {
- return this.groupId;
- }
-
- /**
- * Set this entry's group id.
- *
- * @param groupId This entry's new group id.
- */
- public void setGroupId(int groupId) {
- this.groupId = groupId;
- }
-
- /**
- * Convenience method to set this entry's group and user ids.
- *
- * @param userId This entry's new user id.
- * @param groupId This entry's new group id.
- */
- public void setIds(int userId, int groupId) {
- this.setUserId(userId);
- this.setGroupId(groupId);
- }
-
- /**
- * Set this entry's modification time. The parameter passed
- * to this method is in "Java time".
- *
- * @param time This entry's new modification time.
- */
- public void setFileDate(long time) {
- this.fileDate = time / MILLIS_PER_SECOND;
- }
-
- /**
- * Set this entry's modification time.
- *
- * @param time This entry's new modification time.
- */
- public void setFileDate(Date time) {
- this.fileDate = time.getTime() / MILLIS_PER_SECOND;
- }
-
- /**
- * Get this entry's modification time.
- *
- * @return time This entry's new modification time.
- */
- public Date getFileDate() {
- return new Date(this.fileDate * MILLIS_PER_SECOND);
- }
-
- /**
- * Get this entry's file.
- *
- * @return This entry's file.
- */
- public File getFile() {
- return this.file;
- }
-
- /**
- * Get this entry's mode.
- *
- * @return This entry's mode.
- */
- public int getMode() {
- return this.mode;
- }
-
- /**
- * Get this entry's file size.
- *
- * @return This entry's file size.
- */
- public long getSize() {
- return this.size;
- }
-
- /**
- * Set this entry's file size.
- *
- * @param size This entry's new file size.
- */
- public void setSize(long size) {
- this.size = size;
- }
-
- /**
- * Write an entry's header information to a header buffer.
- *
- * @param outbuf The tar entry header buffer to fill in.
- */
- public void writeEntryHeader(byte[] outbuf) {
- int offset = 0;
-
- offset = ArUtils.getNameBytes(this.filename, outbuf, offset, NAMELEN);
- offset = ArUtils.getLongBytes(this.fileDate, outbuf, offset, FILEDATELEN);
- offset = ArUtils.getIntegerBytes(this.userId, outbuf, offset, UIDLEN);
- offset = ArUtils.getIntegerBytes(this.groupId, outbuf, offset, GIDLEN);
- offset = ArUtils.getOctalBytes(this.mode, outbuf, offset, MODELEN);
- offset = ArUtils.getLongBytes(this.size, outbuf, offset, SIZELEN);
- offset = ArUtils.getNameBytes(this.magic, outbuf, offset, MAGICLEN);
-
- while (offset < outbuf.length) {
- outbuf[offset++] = 0;
- }
- }
-
- /**
- * Parse an entry's header information from a header buffer.
- *
- * @param header The ar entry header buffer to get information from.
- */
- public void parseArHeader(byte[] header) {
- throw new UnsupportedOperationException("parseArHeader(byte[]) not yet implmented");
-// int offset = 0;
-//
-// this.filename = TarUtils.parseName(header, offset, NAMELEN);
-// offset += NAMELEN;
-// this.fileDate = TarUtils.parseOctal(header, offset, FILEDATELEN);
-// offset += FILEDATELEN;
-// this.userId = (int) TarUtils.parseOctal(header, offset, UIDLEN);
-// offset += UIDLEN;
-// this.groupId = (int) TarUtils.parseOctal(header, offset, GIDLEN);
-// offset += GIDLEN;
-// this.mode = (int) TarUtils.parseOctal(header, offset, MODELEN);
-// offset += MODELEN;
-// this.size = TarUtils.parseOctal(header, offset, SIZELEN);
-// offset += SIZELEN;
-// this.magic = TarUtils.parseName(header, offset, MAGICLEN);
-// offset += MAGICLEN;
- }
-}
+package de.masters_of_disaster.ant.tasks.ar;
+
+import java.io.File;
+import java.util.Date;
+
+/**
+ * This class represents an entry in an Ar archive. It consists
+ * of the entry's header, as well as the entry's File. Entries
+ * can be instantiated in one of three ways, depending on how
+ * they are to be used.
+ * <p>
+ * ArEntries that are created from the header bytes read from
+ * an archive are instantiated with the ArEntry( byte[] )
+ * constructor. These entries will be used when extracting from
+ * or listing the contents of an archive. These entries have their
+ * header filled in using the header bytes. They also set the File
+ * to null, since they reference an archive entry not a file.
+ * <p>
+ * ArEntries that are created from Files that are to be written
+ * into an archive are instantiated with the ArEntry( File )
+ * constructor. These entries have their header filled in using
+ * the File's information. They also keep a reference to the File
+ * for convenience when writing entries.
+ * <p>
+ * Finally, ArEntries can be constructed from nothing but a name.
+ * This allows the programmer to construct the entry by hand, for
+ * instance when only an InputStream is available for writing to
+ * the archive, and the header information is constructed from
+ * other information. In this case the header fields are set to
+ * defaults and the File is set to null.
+ *
+ * <p>
+ * The C structure for an Ar Entry's header is:
+ * <pre>
+ * struct header {
+ * char filename[16];
+ * char filedate[12];
+ * char uid[6];
+ * char gid[6];
+ * char mode[8];
+ * char size[10];
+ * char magic[2];
+ * } header;
+ * </pre>
+ *
+ */
+
+public class ArEntry implements ArConstants {
+ /** The entry's filename. */
+ private StringBuffer filename;
+
+ /** The entry's file date. */
+ private long fileDate;
+
+ /** The entry's user id. */
+ private int userId;
+
+ /** The entry's group id. */
+ private int groupId;
+
+ /** The entry's permission mode. */
+ private int mode;
+
+ /** The entry's size. */
+ private long size;
+
+ /** The entry's magic tag. */
+ private StringBuffer magic;
+
+ /** The entry's file reference */
+ private File file;
+
+ /** Default permissions bits for files */
+ public static final int DEFAULT_FILE_MODE = 0100644;
+
+ /** Convert millis to seconds */
+ public static final int MILLIS_PER_SECOND = 1000;
+
+ /**
+ * Construct an empty entry and prepares the header values.
+ */
+ private ArEntry () {
+ this.magic = new StringBuffer(HEADERMAGIC);
+ this.filename = new StringBuffer();
+ this.userId = 0;
+ this.groupId = 0;
+ this.file = null;
+ }
+
+ /**
+ * Construct an entry with only a name. This allows the programmer
+ * to construct the entry's header "by hand". File is set to null.
+ *
+ * @param name the entry name
+ */
+ public ArEntry(String name) {
+ this();
+ if (name.endsWith("/")) {
+ throw new IllegalArgumentException("ar archives can only contain files");
+ }
+ this.filename = new StringBuffer(name);
+ this.mode = DEFAULT_FILE_MODE;
+ this.userId = 0;
+ this.groupId = 0;
+ this.size = 0;
+ this.fileDate = (new Date()).getTime() / MILLIS_PER_SECOND;
+ }
+
+ /**
+ * Construct an entry for a file. File is set to file, and the
+ * header is constructed from information from the file.
+ *
+ * @param file The file that the entry represents.
+ */
+ public ArEntry(File file) {
+ this();
+ if (file.isDirectory()) {
+ throw new IllegalArgumentException("ar archives can only contain files");
+ }
+ this.file = file;
+ this.filename = new StringBuffer(file.getName());
+ this.fileDate = file.lastModified() / MILLIS_PER_SECOND;
+ this.mode = DEFAULT_FILE_MODE;
+ this.size = file.length();
+ }
+
+ /**
+ * Construct an entry from an archive's header bytes. File is set
+ * to null.
+ *
+ * @param headerBuf The header bytes from an ar archive entry.
+ */
+ public ArEntry(byte[] headerBuf) {
+ this();
+ this.parseArHeader(headerBuf);
+ }
+
+ /**
+ * Determine if the two entries are equal. Equality is determined
+ * by the header names being equal.
+ *
+ * @param it Entry to be checked for equality.
+ * @return True if the entries are equal.
+ */
+ public boolean equals(ArEntry it) {
+ return this.getFilename().equals(it.getFilename());
+ }
+
+ /**
+ * Determine if the two entries are equal. Equality is determined
+ * by the header names being equal.
+ *
+ * @param it Entry to be checked for equality.
+ * @return True if the entries are equal.
+ */
+ public boolean equals(Object it) {
+ if (it == null || getClass() != it.getClass()) {
+ return false;
+ }
+ return equals((ArEntry) it);
+ }
+
+ /**
+ * Hashcodes are based on entry names.
+ *
+ * @return the entry hashcode
+ */
+ public int hashCode() {
+ return getFilename().hashCode();
+ }
+
+ /**
+ * Get this entry's name.
+ *
+ * @return This entry's name.
+ */
+ public String getFilename() {
+ return this.filename.toString();
+ }
+
+ /**
+ * Set this entry's name.
+ *
+ * @param name This entry's new name.
+ */
+ public void setFilename(String filename) {
+ this.filename = new StringBuffer(filename);
+ }
+
+ /**
+ * Set the mode for this entry
+ *
+ * @param mode the mode for this entry
+ */
+ public void setMode(int mode) {
+ this.mode = mode;
+ }
+
+ /**
+ * Get this entry's user id.
+ *
+ * @return This entry's user id.
+ */
+ public int getUserId() {
+ return this.userId;
+ }
+
+ /**
+ * Set this entry's user id.
+ *
+ * @param userId This entry's new user id.
+ */
+ public void setUserId(int userId) {
+ this.userId = userId;
+ }
+
+ /**
+ * Get this entry's group id.
+ *
+ * @return This entry's group id.
+ */
+ public int getGroupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Set this entry's group id.
+ *
+ * @param groupId This entry's new group id.
+ */
+ public void setGroupId(int groupId) {
+ this.groupId = groupId;
+ }
+
+ /**
+ * Convenience method to set this entry's group and user ids.
+ *
+ * @param userId This entry's new user id.
+ * @param groupId This entry's new group id.
+ */
+ public void setIds(int userId, int groupId) {
+ this.setUserId(userId);
+ this.setGroupId(groupId);
+ }
+
+ /**
+ * Set this entry's modification time. The parameter passed
+ * to this method is in "Java time".
+ *
+ * @param time This entry's new modification time.
+ */
+ public void setFileDate(long time) {
+ this.fileDate = time / MILLIS_PER_SECOND;
+ }
+
+ /**
+ * Set this entry's modification time.
+ *
+ * @param time This entry's new modification time.
+ */
+ public void setFileDate(Date time) {
+ this.fileDate = time.getTime() / MILLIS_PER_SECOND;
+ }
+
+ /**
+ * Get this entry's modification time.
+ *
+ * @return time This entry's new modification time.
+ */
+ public Date getFileDate() {
+ return new Date(this.fileDate * MILLIS_PER_SECOND);
+ }
+
+ /**
+ * Get this entry's file.
+ *
+ * @return This entry's file.
+ */
+ public File getFile() {
+ return this.file;
+ }
+
+ /**
+ * Get this entry's mode.
+ *
+ * @return This entry's mode.
+ */
+ public int getMode() {
+ return this.mode;
+ }
+
+ /**
+ * Get this entry's file size.
+ *
+ * @return This entry's file size.
+ */
+ public long getSize() {
+ return this.size;
+ }
+
+ /**
+ * Set this entry's file size.
+ *
+ * @param size This entry's new file size.
+ */
+ public void setSize(long size) {
+ this.size = size;
+ }
+
+ /**
+ * Write an entry's header information to a header buffer.
+ *
+ * @param outbuf The tar entry header buffer to fill in.
+ */
+ public void writeEntryHeader(byte[] outbuf) {
+ int offset = 0;
+
+ offset = ArUtils.getNameBytes(this.filename, outbuf, offset, NAMELEN);
+ offset = ArUtils.getLongBytes(this.fileDate, outbuf, offset, FILEDATELEN);
+ offset = ArUtils.getIntegerBytes(this.userId, outbuf, offset, UIDLEN);
+ offset = ArUtils.getIntegerBytes(this.groupId, outbuf, offset, GIDLEN);
+ offset = ArUtils.getOctalBytes(this.mode, outbuf, offset, MODELEN);
+ offset = ArUtils.getLongBytes(this.size, outbuf, offset, SIZELEN);
+ offset = ArUtils.getNameBytes(this.magic, outbuf, offset, MAGICLEN);
+
+ while (offset < outbuf.length) {
+ outbuf[offset++] = 0;
+ }
+ }
+
+ /**
+ * Parse an entry's header information from a header buffer.
+ *
+ * @param header The ar entry header buffer to get information from.
+ */
+ public void parseArHeader(byte[] header) {
+ throw new UnsupportedOperationException("parseArHeader(byte[]) not yet implmented");
+// int offset = 0;
+//
+// this.filename = TarUtils.parseName(header, offset, NAMELEN);
+// offset += NAMELEN;
+// this.fileDate = TarUtils.parseOctal(header, offset, FILEDATELEN);
+// offset += FILEDATELEN;
+// this.userId = (int) TarUtils.parseOctal(header, offset, UIDLEN);
+// offset += UIDLEN;
+// this.groupId = (int) TarUtils.parseOctal(header, offset, GIDLEN);
+// offset += GIDLEN;
+// this.mode = (int) TarUtils.parseOctal(header, offset, MODELEN);
+// offset += MODELEN;
+// this.size = TarUtils.parseOctal(header, offset, SIZELEN);
+// offset += SIZELEN;
+// this.magic = TarUtils.parseName(header, offset, MAGICLEN);
+// offset += MAGICLEN;
+ }
+}
diff --git a/jEdit/de/masters_of_disaster/ant/tasks/ar/ArOutputStream.java b/jEdit/de/masters_of_disaster/ant/tasks/ar/ArOutputStream.java
index 2065c9c..4ea2a23 100644
--- a/jEdit/de/masters_of_disaster/ant/tasks/ar/ArOutputStream.java
+++ b/jEdit/de/masters_of_disaster/ant/tasks/ar/ArOutputStream.java
@@ -1,167 +1,167 @@
-package de.masters_of_disaster.ant.tasks.ar;
-
-import java.io.FilterOutputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * The ArOutputStream writes an ar archive as an OutputStream.
- * Methods are provided to put entries, and then write their contents
- * by writing to this stream using write().
- */
-public class ArOutputStream extends FilterOutputStream {
- /** Fail if a long file name is required in the archive or the name contains spaces. */
- public static final int LONGFILE_ERROR = 0;
-
- /** Long paths will be truncated in the archive. Spaces are replaced by '_' */
- public static final int LONGFILE_TRUNCATE = 1;
-
- /** GNU ar variant is used to store long file names and file names with spaced in the archive. */
- public static final int LONGFILE_GNU = 2;
-
- /** BSD ar variant is used to store long file names and file names with spaced in the archive. */
- public static final int LONGFILE_BSD = 3;
-
- protected int currSize;
- protected int currBytes;
- protected byte[] oneBuf;
- protected int longFileMode = LONGFILE_ERROR;
- protected boolean writingStarted = false;
- protected boolean inEntry = false;
-
- public ArOutputStream(OutputStream os) throws IOException {
- super(os);
- if (null == os) {
- throw new NullPointerException("os must not be null");
- }
- this.out.write(ArConstants.ARMAGIC,0,ArConstants.ARMAGIC.length);
- this.oneBuf = new byte[1];
- }
-
- public void setLongFileMode(int longFileMode) {
- if (writingStarted) {
- throw new IllegalStateException("longFileMode cannot be changed after writing to the archive has begun");
- }
- if (LONGFILE_GNU == longFileMode) {
- throw new UnsupportedOperationException("GNU variant isn't implemented yet");
- }
- if (LONGFILE_BSD == longFileMode) {
- throw new UnsupportedOperationException("BSD variant isn't implemented yet");
- }
- this.longFileMode = longFileMode;
- }
-
- /**
- * Put an entry on the output stream. This writes the entry's
- * header record and positions the output stream for writing
- * the contents of the entry. Once this method is called, the
- * stream is ready for calls to write() to write the entry's
- * contents. Once the contents are written, closeEntry()
- * <B>MUST</B> be called to ensure that all buffered data
- * is completely written to the output stream.
- *
- * @param entry The ArEntry to be written to the archive.
- */
- public void putNextEntry(ArEntry entry) throws IOException {
- writingStarted = true;
- if (inEntry) {
- throw new IOException("the current entry has to be closed before starting a new one");
- }
- String filename = entry.getFilename();
- if ((filename.length() >= ArConstants.NAMELEN)
- && (longFileMode != LONGFILE_TRUNCATE)) {
- throw new RuntimeException("file name \"" + entry.getFilename()
- + "\" is too long ( > "
- + ArConstants.NAMELEN + " bytes )");
- }
- if (-1 != filename.indexOf(' ')) {
- if (longFileMode == LONGFILE_TRUNCATE) {
- entry.setFilename(filename.replace(' ','_'));
- } else {
- throw new RuntimeException("file name \"" + entry.getFilename()
- + "\" contains spaces");
- }
- }
-
- byte[] headerBuf = new byte[ArConstants.HEADERLENGTH];
- entry.writeEntryHeader(headerBuf);
- this.out.write(headerBuf,0,ArConstants.HEADERLENGTH);
-
- this.currBytes = 0;
- this.currSize = (int) entry.getSize();
- inEntry = true;
- }
-
- /**
- * Close an entry. This method MUST be called for all file
- * entries that contain data. The reason is that we must
- * pad an entries data if it is of odd size.
- */
- public void closeEntry() throws IOException {
- if (!inEntry) {
- throw new IOException("we are not in an entry currently");
- }
-
- if (this.currBytes < this.currSize) {
- throw new IOException("entry closed at '" + this.currBytes
- + "' before the '" + this.currSize
- + "' bytes specified in the header were written");
- }
-
- if (1 == (this.currSize & 1)) {
- this.out.write(ArConstants.PADDING,0,1);
- }
-
- inEntry = false;
- }
-
- /**
- * Writes a byte to the current ar archive entry.
- *
- * This method simply calls write( byte[], int, int ).
- *
- * @param b The byte to write to the archive.
- */
- public void write(int b) throws IOException {
- this.oneBuf[0] = (byte) b;
- this.write(this.oneBuf, 0, 1);
- }
-
- /**
- * Writes bytes to the current ar archive entry.
- *
- * This method simply calls write( byte[], int, int ).
- *
- * @param wBuf The buffer to write to the archive.
- */
- public void write(byte[] wBuf) throws IOException {
- this.write(wBuf, 0, wBuf.length);
- }
-
- /**
- * Writes bytes to the current ar archive entry. This method
- * is aware of the current entry and will throw an exception if
- * you attempt to write bytes past the length specified for the
- * current entry.
- *
- * @param wBuf The buffer to write to the archive.
- * @param wOffset The offset in the buffer from which to get bytes.
- * @param numToWrite The number of bytes to write.
- */
- public void write(byte[] wBuf, int wOffset, int numToWrite) throws IOException {
- if (!inEntry) {
- throw new IOException("we are not in an entry currently");
- }
-
- if ((this.currBytes + numToWrite) > this.currSize) {
- throw new IOException("request to write '" + numToWrite
- + "' bytes exceeds size in header of '"
- + this.currSize + "' bytes");
- }
-
- if (numToWrite > 0) {
- this.out.write(wBuf,wOffset,numToWrite);
- this.currBytes += numToWrite;
- }
- }
-}
+package de.masters_of_disaster.ant.tasks.ar;
+
+import java.io.FilterOutputStream;
+import java.io.OutputStream;
+import java.io.IOException;
+
+/**
+ * The ArOutputStream writes an ar archive as an OutputStream.
+ * Methods are provided to put entries, and then write their contents
+ * by writing to this stream using write().
+ */
+public class ArOutputStream extends FilterOutputStream {
+ /** Fail if a long file name is required in the archive or the name contains spaces. */
+ public static final int LONGFILE_ERROR = 0;
+
+ /** Long paths will be truncated in the archive. Spaces are replaced by '_' */
+ public static final int LONGFILE_TRUNCATE = 1;
+
+ /** GNU ar variant is used to store long file names and file names with spaced in the archive. */
+ public static final int LONGFILE_GNU = 2;
+
+ /** BSD ar variant is used to store long file names and file names with spaced in the archive. */
+ public static final int LONGFILE_BSD = 3;
+
+ protected int currSize;
+ protected int currBytes;
+ protected byte[] oneBuf;
+ protected int longFileMode = LONGFILE_ERROR;
+ protected boolean writingStarted = false;
+ protected boolean inEntry = false;
+
+ public ArOutputStream(OutputStream os) throws IOException {
+ super(os);
+ if (null == os) {
+ throw new NullPointerException("os must not be null");
+ }
+ this.out.write(ArConstants.ARMAGIC,0,ArConstants.ARMAGIC.length);
+ this.oneBuf = new byte[1];
+ }
+
+ public void setLongFileMode(int longFileMode) {
+ if (writingStarted) {
+ throw new IllegalStateException("longFileMode cannot be changed after writing to the archive has begun");
+ }
+ if (LONGFILE_GNU == longFileMode) {
+ throw new UnsupportedOperationException("GNU variant isn't implemented yet");
+ }
+ if (LONGFILE_BSD == longFileMode) {
+ throw new UnsupportedOperationException("BSD variant isn't implemented yet");
+ }
+ this.longFileMode = longFileMode;
+ }
+
+ /**
+ * Put an entry on the output stream. This writes the entry's
+ * header record and positions the output stream for writing
+ * the contents of the entry. Once this method is called, the
+ * stream is ready for calls to write() to write the entry's
+ * contents. Once the contents are written, closeEntry()
+ * <B>MUST</B> be called to ensure that all buffered data
+ * is completely written to the output stream.
+ *
+ * @param entry The ArEntry to be written to the archive.
+ */
+ public void putNextEntry(ArEntry entry) throws IOException {
+ writingStarted = true;
+ if (inEntry) {
+ throw new IOException("the current entry has to be closed before starting a new one");
+ }
+ String filename = entry.getFilename();
+ if ((filename.length() >= ArConstants.NAMELEN)
+ && (longFileMode != LONGFILE_TRUNCATE)) {
+ throw new RuntimeException("file name \"" + entry.getFilename()
+ + "\" is too long ( > "
+ + ArConstants.NAMELEN + " bytes )");
+ }
+ if (-1 != filename.indexOf(' ')) {
+ if (longFileMode == LONGFILE_TRUNCATE) {
+ entry.setFilename(filename.replace(' ','_'));
+ } else {
+ throw new RuntimeException("file name \"" + entry.getFilename()
+ + "\" contains spaces");
+ }
+ }
+
+ byte[] headerBuf = new byte[ArConstants.HEADERLENGTH];
+ entry.writeEntryHeader(headerBuf);
+ this.out.write(headerBuf,0,ArConstants.HEADERLENGTH);
+
+ this.currBytes = 0;
+ this.currSize = (int) entry.getSize();
+ inEntry = true;
+ }
+
+ /**
+ * Close an entry. This method MUST be called for all file
+ * entries that contain data. The reason is that we must
+ * pad an entries data if it is of odd size.
+ */
+ public void closeEntry() throws IOException {
+ if (!inEntry) {
+ throw new IOException("we are not in an entry currently");
+ }
+
+ if (this.currBytes < this.currSize) {
+ throw new IOException("entry closed at '" + this.currBytes
+ + "' before the '" + this.currSize
+ + "' bytes specified in the header were written");
+ }
+
+ if (1 == (this.currSize & 1)) {
+ this.out.write(ArConstants.PADDING,0,1);
+ }
+
+ inEntry = false;
+ }
+
+ /**
+ * Writes a byte to the current ar archive entry.
+ *
+ * This method simply calls write( byte[], int, int ).
+ *
+ * @param b The byte to write to the archive.
+ */
+ public void write(int b) throws IOException {
+ this.oneBuf[0] = (byte) b;
+ this.write(this.oneBuf, 0, 1);
+ }
+
+ /**
+ * Writes bytes to the current ar archive entry.
+ *
+ * This method simply calls write( byte[], int, int ).
+ *
+ * @param wBuf The buffer to write to the archive.
+ */
+ public void write(byte[] wBuf) throws IOException {
+ this.write(wBuf, 0, wBuf.length);
+ }
+
+ /**
+ * Writes bytes to the current ar archive entry. This method
+ * is aware of the current entry and will throw an exception if
+ * you attempt to write bytes past the length specified for the
+ * current entry.
+ *
+ * @param wBuf The buffer to write to the archive.
+ * @param wOffset The offset in the buffer from which to get bytes.
+ * @param numToWrite The number of bytes to write.
+ */
+ public void write(byte[] wBuf, int wOffset, int numToWrite) throws IOException {
+ if (!inEntry) {
+ throw new IOException("we are not in an entry currently");
+ }
+
+ if ((this.currBytes + numToWrite) > this.currSize) {
+ throw new IOException("request to write '" + numToWrite
+ + "' bytes exceeds size in header of '"
+ + this.currSize + "' bytes");
+ }
+
+ if (numToWrite > 0) {
+ this.out.write(wBuf,wOffset,numToWrite);
+ this.currBytes += numToWrite;
+ }
+ }
+}
diff --git a/jEdit/de/masters_of_disaster/ant/tasks/ar/ArUtils.java b/jEdit/de/masters_of_disaster/ant/tasks/ar/ArUtils.java
index 3f6141e..6b97cb7 100644
--- a/jEdit/de/masters_of_disaster/ant/tasks/ar/ArUtils.java
+++ b/jEdit/de/masters_of_disaster/ant/tasks/ar/ArUtils.java
@@ -1,155 +1,155 @@
-package de.masters_of_disaster.ant.tasks.ar;
-
-/**
- * This class provides static utility methods to work with byte streams.
- */
-public class ArUtils {
- /**
- * Parse an octal string from a header buffer. This is used for the
- * file permission mode value.
- *
- * @param header The header buffer from which to parse.
- * @param offset The offset into the buffer from which to parse.
- * @param length The number of header bytes to parse.
- * @return The long value of the octal string.
- */
- public static long parseOctal(byte[] header, int offset, int length) {
- long result = 0;
- int end = offset + length;
-
- for (int i=offset ; i<end ; i++) {
- if (header[i] == (byte) ' ') {
- break;
- }
- result = (result << 3) + (header[i] - '0');
- }
-
- return result;
- }
-
- /**
- * Parse an entry name from a header buffer.
- *
- * @param header The header buffer from which to parse.
- * @param offset The offset into the buffer from which to parse.
- * @param length The number of header bytes to parse.
- * @return The header's entry name.
- */
- public static StringBuffer parseName(byte[] header, int offset, int length) {
- StringBuffer result = new StringBuffer(length);
- int end = offset + length;
-
- for (int i=offset ; i<end ; i++) {
- if (header[i] == ' ') {
- break;
- }
-
- result.append((char) header[i]);
- }
-
- return result;
- }
-
- /**
- * Write a name into a byte array.
- *
- * @param name The name to write.
- * @param buf The byte array into which to write.
- * @param offset The offset into the buffer from which to write.
- * @param length The number of header bytes to write.
- * @return The number of bytes written to the buffer.
- */
- public static int getNameBytes(StringBuffer name, byte[] buf, int offset, int length) {
- int i;
- int c = name.length();
-
- for (i=0 ; i<length && i<c ; i++) {
- buf[offset+i] = (byte) name.charAt(i);
- }
-
- while (i<length) {
- buf[offset+i] = (byte) ' ';
- i++;
- }
-
- return offset + length;
- }
-
- /**
- * Write a long value into a byte array.
- *
- * @param value The value to write.
- * @param buf The byte array into which to write.
- * @param offset The offset into the buffer from which to write.
- * @param length The number of header bytes to write.
- * @return The number of bytes written to the buffer.
- */
- public static int getLongBytes(long value, byte[] buf, int offset, int length) {
- int i;
- String tmp = Long.toString(value);
- int c = tmp.length();
-
- for (i=0 ; i<length && i<c ; i++) {
- buf[offset+i] = (byte) tmp.charAt(i);
- }
-
- while (i<length) {
- buf[offset+i] = (byte) ' ';
- i++;
- }
-
- return offset + length;
- }
-
- /**
- * Write an int value into a byte array.
- *
- * @param value The value to write.
- * @param buf The byte array into which to write.
- * @param offset The offset into the buffer from which to write.
- * @param length The number of header bytes to write.
- * @return The number of bytes written to the buffer.
- */
- public static int getIntegerBytes(int value, byte[] buf, int offset, int length) {
- int i;
- String tmp = Integer.toString(value);
- int c = tmp.length();
-
- for (i=0 ; i<length && i<c ; i++) {
- buf[offset+i] = (byte) tmp.charAt(i);
- }
-
- while (i<length) {
- buf[offset+i] = (byte) ' ';
- i++;
- }
-
- return offset + length;
- }
-
- /**
- * Write an octal value into a byte array.
- *
- * @param value The value to write.
- * @param buf The byte array into which to write.
- * @param offset The offset into the buffer from which to write.
- * @param length The number of header bytes to write.
- * @return The number of bytes written to the buffer.
- */
- public static int getOctalBytes(long value, byte[] buf, int offset, int length) {
- int i;
- String tmp = Long.toOctalString(value);
- int c = tmp.length();
-
- for (i=0 ; i<length && i<c ; i++) {
- buf[offset+i] = (byte) tmp.charAt(i);
- }
-
- while (i<length) {
- buf[offset+i] = (byte) ' ';
- i++;
- }
-
- return offset + length;
- }
-}
+package de.masters_of_disaster.ant.tasks.ar;
+
+/**
+ * This class provides static utility methods to work with byte streams.
+ */
+public class ArUtils {
+ /**
+ * Parse an octal string from a header buffer. This is used for the
+ * file permission mode value.
+ *
+ * @param header The header buffer from which to parse.
+ * @param offset The offset into the buffer from which to parse.
+ * @param length The number of header bytes to parse.
+ * @return The long value of the octal string.
+ */
+ public static long parseOctal(byte[] header, int offset, int length) {
+ long result = 0;
+ int end = offset + length;
+
+ for (int i=offset ; i<end ; i++) {
+ if (header[i] == (byte) ' ') {
+ break;
+ }
+ result = (result << 3) + (header[i] - '0');
+ }
+
+ return result;
+ }
+
+ /**
+ * Parse an entry name from a header buffer.
+ *
+ * @param header The header buffer from which to parse.
+ * @param offset The offset into the buffer from which to parse.
+ * @param length The number of header bytes to parse.
+ * @return The header's entry name.
+ */
+ public static StringBuffer parseName(byte[] header, int offset, int length) {
+ StringBuffer result = new StringBuffer(length);
+ int end = offset + length;
+
+ for (int i=offset ; i<end ; i++) {
+ if (header[i] == ' ') {
+ break;
+ }
+
+ result.append((char) header[i]);
+ }
+
+ return result;
+ }
+
+ /**
+ * Write a name into a byte array.
+ *
+ * @param name The name to write.
+ * @param buf The byte array into which to write.
+ * @param offset The offset into the buffer from which to write.
+ * @param length The number of header bytes to write.
+ * @return The number of bytes written to the buffer.
+ */
+ public static int getNameBytes(StringBuffer name, byte[] buf, int offset, int length) {
+ int i;
+ int c = name.length();
+
+ for (i=0 ; i<length && i<c ; i++) {
+ buf[offset+i] = (byte) name.charAt(i);
+ }
+
+ while (i<length) {
+ buf[offset+i] = (byte) ' ';
+ i++;
+ }
+
+ return offset + length;
+ }
+
+ /**
+ * Write a long value into a byte array.
+ *
+ * @param value The value to write.
+ * @param buf The byte array into which to write.
+ * @param offset The offset into the buffer from which to write.
+ * @param length The number of header bytes to write.
+ * @return The number of bytes written to the buffer.
+ */
+ public static int getLongBytes(long value, byte[] buf, int offset, int length) {
+ int i;
+ String tmp = Long.toString(value);
+ int c = tmp.length();
+
+ for (i=0 ; i<length && i<c ; i++) {
+ buf[offset+i] = (byte) tmp.charAt(i);
+ }
+
+ while (i<length) {
+ buf[offset+i] = (byte) ' ';
+ i++;
+ }
+
+ return offset + length;
+ }
+
+ /**
+ * Write an int value into a byte array.
+ *
+ * @param value The value to write.
+ * @param buf The byte array into which to write.
+ * @param offset The offset into the buffer from which to write.
+ * @param length The number of header bytes to write.
+ * @return The number of bytes written to the buffer.
+ */
+ public static int getIntegerBytes(int value, byte[] buf, int offset, int length) {
+ int i;
+ String tmp = Integer.toString(value);
+ int c = tmp.length();
+
+ for (i=0 ; i<length && i<c ; i++) {
+ buf[offset+i] = (byte) tmp.charAt(i);
+ }
+
+ while (i<length) {
+ buf[offset+i] = (byte) ' ';
+ i++;
+ }
+
+ return offset + length;
+ }
+
+ /**
+ * Write an octal value into a byte array.
+ *
+ * @param value The value to write.
+ * @param buf The byte array into which to write.
+ * @param offset The offset into the buffer from which to write.
+ * @param length The number of header bytes to write.
+ * @return The number of bytes written to the buffer.
+ */
+ public static int getOctalBytes(long value, byte[] buf, int offset, int length) {
+ int i;
+ String tmp = Long.toOctalString(value);
+ int c = tmp.length();
+
+ for (i=0 ; i<length && i<c ; i++) {
+ buf[offset+i] = (byte) tmp.charAt(i);
+ }
+
+ while (i<length) {
+ buf[offset+i] = (byte) ' ';
+ i++;
+ }
+
+ return offset + length;
+ }
+}
diff --git a/jEdit/de/masters_of_disaster/ant/tasks/calculatesize/CalculateSize.java b/jEdit/de/masters_of_disaster/ant/tasks/calculatesize/CalculateSize.java
index fb21b2f..d062426 100644
--- a/jEdit/de/masters_of_disaster/ant/tasks/calculatesize/CalculateSize.java
+++ b/jEdit/de/masters_of_disaster/ant/tasks/calculatesize/CalculateSize.java
@@ -1,94 +1,94 @@
-package de.masters_of_disaster.ant.tasks.calculatesize;
-
-import java.io.File;
-import java.util.Enumeration;
-import java.util.Vector;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.taskdefs.MatchingTask;
-import org.apache.tools.ant.types.FileSet;
-
-/**
- * Calculates the "Installed-Size" of a deb package for the "control"-file.
- *
- * @ant.task category="packaging"
- */
-public class CalculateSize extends MatchingTask {
- String realSizeProperty = null;
- String diskSizeProperty = null;
- Vector fileSets = new Vector();
- File baseDir;
-
- /**
- * Add a new fileset
- *
- * @return the fileset to be used as the nested element.
- */
- public FileSet createFileSet() {
- FileSet fileSet = new FileSet();
- fileSets.addElement(fileSet);
- return fileSet;
- }
-
- /**
- * This is the base directory to look in for things to include.
- *
- * @param baseDir the base directory.
- */
- public void setBaseDir(File baseDir) {
- this.baseDir = baseDir;
- fileset.setDir(baseDir);
- }
-
- /**
- * This is the property to set to the real size.
- *
- * @param realSizeProperty The property to set to the real size
- */
- public void setRealSizeProperty(String realSizeProperty) {
- this.realSizeProperty = realSizeProperty;
- }
-
- /**
- * This is the property to set to the disk size.
- *
- * @param diskSizeProperty The property to set to the disk size
- */
- public void setDiskSizeProperty(String diskSizeProperty) {
- this.diskSizeProperty = diskSizeProperty;
- }
-
- /**
- * do the business
- *
- * @throws BuildException on error
- */
- public void execute() throws BuildException {
- if ((null == realSizeProperty) && (null == diskSizeProperty)) {
- throw new BuildException("realSizeProperty or diskSizeProperty must be set for <CalculateSize>");
- }
-
- if (null != baseDir) {
- // add the main fileset to the list of filesets to process.
- fileSets.addElement(fileset);
- }
-
- long realSize = 0;
- long diskSize = 0;
- for (Enumeration e=fileSets.elements() ; e.hasMoreElements() ; ) {
- FileSet fileSet = (FileSet)e.nextElement();
- String[] files = fileSet.getDirectoryScanner(getProject()).getIncludedFiles();
- File fileSetDir = fileSet.getDir(getProject());
- for (int i=0, c=files.length ; i<c ; i++) {
- long fileLength = new File(fileSetDir,files[i]).length();
- realSize += fileLength / 1024;
- diskSize += (fileLength / 4096 + 1) * 4;
- }
- }
- if (null != realSizeProperty) {
- getProject().setNewProperty(realSizeProperty,Long.toString(realSize));
- }
- if (null != diskSizeProperty) {
- getProject().setNewProperty(diskSizeProperty,Long.toString(diskSize));
- }
- }
-}
+package de.masters_of_disaster.ant.tasks.calculatesize;
+
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.types.FileSet;
+
+/**
+ * Calculates the "Installed-Size" of a deb package for the "control"-file.
+ *
+ * @ant.task category="packaging"
+ */
+public class CalculateSize extends MatchingTask {
+ String realSizeProperty = null;
+ String diskSizeProperty = null;
+ Vector fileSets = new Vector();
+ File baseDir;
+
+ /**
+ * Add a new fileset
+ *
+ * @return the fileset to be used as the nested element.
+ */
+ public FileSet createFileSet() {
+ FileSet fileSet = new FileSet();
+ fileSets.addElement(fileSet);
+ return fileSet;
+ }
+
+ /**
+ * This is the base directory to look in for things to include.
+ *
+ * @param baseDir the base directory.
+ */
+ public void setBaseDir(File baseDir) {
+ this.baseDir = baseDir;
+ fileset.setDir(baseDir);
+ }
+
+ /**
+ * This is the property to set to the real size.
+ *
+ * @param realSizeProperty The property to set to the real size
+ */
+ public void setRealSizeProperty(String realSizeProperty) {
+ this.realSizeProperty = realSizeProperty;
+ }
+
+ /**
+ * This is the property to set to the disk size.
+ *
+ * @param diskSizeProperty The property to set to the disk size
+ */
+ public void setDiskSizeProperty(String diskSizeProperty) {
+ this.diskSizeProperty = diskSizeProperty;
+ }
+
+ /**
+ * do the business
+ *
+ * @throws BuildException on error
+ */
+ public void execute() throws BuildException {
+ if ((null == realSizeProperty) && (null == diskSizeProperty)) {
+ throw new BuildException("realSizeProperty or diskSizeProperty must be set for <CalculateSize>");
+ }
+
+ if (null != baseDir) {
+ // add the main fileset to the list of filesets to process.
+ fileSets.addElement(fileset);
+ }
+
+ long realSize = 0;
+ long diskSize = 0;
+ for (Enumeration e=fileSets.elements() ; e.hasMoreElements() ; ) {
+ FileSet fileSet = (FileSet)e.nextElement();
+ String[] files = fileSet.getDirectoryScanner(getProject()).getIncludedFiles();
+ File fileSetDir = fileSet.getDir(getProject());
+ for (int i=0, c=files.length ; i<c ; i++) {
+ long fileLength = new File(fileSetDir,files[i]).length();
+ realSize += fileLength / 1024;
+ diskSize += (fileLength / 4096 + 1) * 4;
+ }
+ }
+ if (null != realSizeProperty) {
+ getProject().setNewProperty(realSizeProperty,Long.toString(realSize));
+ }
+ if (null != diskSizeProperty) {
+ getProject().setNewProperty(diskSizeProperty,Long.toString(diskSize));
+ }
+ }
+}
diff --git a/jEdit/de/masters_of_disaster/ant/tasks/deb/Deb.java b/jEdit/de/masters_of_disaster/ant/tasks/deb/Deb.java
index 1aa5dd0..5caf47f 100644
--- a/jEdit/de/masters_of_disaster/ant/tasks/deb/Deb.java
+++ b/jEdit/de/masters_of_disaster/ant/tasks/deb/Deb.java
@@ -1,351 +1,354 @@
-package de.masters_of_disaster.ant.tasks.deb;
-
-import de.masters_of_disaster.ant.tasks.ar.Ar;
-import de.masters_of_disaster.ant.tasks.ar.Ar.ArFileSet;
-import java.io.File;
-import java.util.Enumeration;
-import java.util.Vector;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.Checksum;
-import org.apache.tools.ant.taskdefs.Echo;
-import org.apache.tools.ant.taskdefs.Echo.EchoLevel;
-import org.apache.tools.ant.taskdefs.Mkdir;
-import org.apache.tools.ant.taskdefs.MatchingTask;
-import org.apache.tools.ant.taskdefs.Tar;
-import org.apache.tools.ant.taskdefs.Tar.TarCompressionMethod;
-import org.apache.tools.ant.taskdefs.Tar.TarFileSet;
-import org.apache.tools.ant.util.FileUtils;
-import org.apache.tools.ant.util.MergingMapper;
-import org.apache.tools.ant.util.SourceFileScanner;
-
-/**
- * Creates a deb package.
- *
- * @ant.task category="packaging"
- */
-public class Deb extends MatchingTask {
- Vector controlFileSets = new Vector();
- Vector dataFileSets = new Vector();
- File baseDir;
- File destFile;
- File tempDir;
- boolean deleteTempFiles = true;
- boolean includeMd5sums = false;
- Tar controlTarGz = new Tar();
- Tar dataTarGz = new Tar();
- Ar debPackage = new Ar();
-
- {
- fileset = dataTarGz.createTarFileSet();
- }
-
- /**
- * Add a new fileset for the control files with the option to specify permissions
- *
- * @return the tar fileset to be used as the nested element.
- */
- public TarFileSet createControlFileSet() {
- TarFileSet fileSet = controlTarGz.createTarFileSet();
- controlFileSets.addElement(fileSet);
- return fileSet;
- }
-
- /**
- * Add a new fileset for the data files with the option to specify permissions
- *
- * @return the tar fileset to be used as the nested element.
- */
- public TarFileSet createDataFileSet() {
- TarFileSet fileSet = dataTarGz.createTarFileSet();
- dataFileSets.addElement(fileSet);
- return fileSet;
- }
-
- /**
- * Set the name/location of where to create the deb file.
- *
- * @param destFile The output of the deb
- */
- public void setDestFile(File destFile) {
- this.destFile = destFile;
- debPackage.setDestFile(destFile);
- }
-
- /**
- * This is the base directory to look in for things to include in the data files.
- *
- * @param baseDir the base directory.
- */
- public void setBaseDir(File baseDir) {
- this.baseDir = baseDir;
- fileset.setDir(baseDir);
- }
-
- /**
- * This is the temp directory where to create the temporary files.
- * If not set, the current projects baseDir is used.
- *
- * @param tempDir the temp directory.
- */
- public void setTempDir(File tempDir) {
- this.tempDir = tempDir;
- }
-
- /**
- * This specifies if the temporary files should get deleted.
- *
- * @param deleteTempFiles whether to delete the temporary files or not.
- */
- public void setDeleteTempFiles(boolean deleteTempFiles) {
- this.deleteTempFiles = deleteTempFiles;
- }
-
- /**
- * This specifies if the MD5 sums of the files in the data section should be
- * included in the file "md5sums" in the control section.
- *
- * @param includeMd5sums whether to include MD5 sums in the control section or not.
- */
- public void setIncludeMd5sums(boolean includeMd5sums) {
- this.includeMd5sums = includeMd5sums;
- }
-
- /**
- * do the business
- *
- * @throws BuildException on error
- */
- public void execute() throws BuildException {
- prepareTask(controlTarGz);
- prepareTask(dataTarGz);
- prepareTask(debPackage);
- TarFileSet tarFileSet = controlTarGz.createTarFileSet();
- tarFileSet.setFile(new File(System.getProperty("user.dir")));
- tarFileSet.setUserName("root");
- tarFileSet.setGroup("root");
- tarFileSet.setFullpath("./");
- tarFileSet = dataTarGz.createTarFileSet();
- tarFileSet.setFile(new File(System.getProperty("user.dir")));
- tarFileSet.setUserName("root");
- tarFileSet.setGroup("root");
- tarFileSet.setFullpath("./");
-
- if (null == tempDir) {
- tempDir = getProject().getBaseDir();
- }
-
- if (null != baseDir) {
- // add the main fileset to the list of filesets to process.
- dataFileSets.addElement(fileset);
- } else {
- fileset.setDir(new File(System.getProperty("user.dir")));
- fileset.setExcludes("**");
- }
-
- boolean controlFound = false;
- for (Enumeration e=controlFileSets.elements() ; e.hasMoreElements() ; ) {
- TarFileSet fileSet = (TarFileSet)e.nextElement();
- String[] files = fileSet.getFiles(getProject());
- int i = 0;
- int c;
-
- for (c=files.length ; i<c && !controlFound ; i++) {
- if (files[i].endsWith("control")
- && (new File(fileSet.getDir(getProject()),files[i])).isFile()) {
- controlFound = true;
- }
- }
- }
- if (!controlFound) {
- throw new BuildException("The control fileset must contain a file \"control\"", getLocation());
- }
-
- // check if deb is out of date with respect to each fileset
- boolean upToDate = true;
- for (Enumeration e=controlFileSets.elements() ; e.hasMoreElements() ; ) {
- TarFileSet fileSet = (TarFileSet)e.nextElement();
- String[] files = fileSet.getFiles(getProject());
-
- if (!packageIsUpToDate(files,fileSet.getDir(getProject()))) {
- upToDate = false;
- }
- }
-
- for (Enumeration e=dataFileSets.elements() ; e.hasMoreElements() ; ) {
- TarFileSet fileSet = (TarFileSet)e.nextElement();
- String[] files = fileSet.getFiles(getProject());
-
- if (!packageIsUpToDate(files,fileSet.getDir(getProject()))) {
- upToDate = false;
- }
- }
-
- if (upToDate) {
- log("Nothing to do: " + destFile.getAbsolutePath()
- + " is up to date.", Project.MSG_INFO);
- return;
- }
-
- log("Building deb: " + destFile.getAbsolutePath(), Project.MSG_INFO);
-
- Mkdir mkdir = new Mkdir();
- prepareTask(mkdir);
- mkdir.setDir(tempDir);
- mkdir.perform();
-
- Echo echo = new Echo();
- prepareTask(echo);
- EchoLevel echoLevel = new EchoLevel();
- echoLevel.setValue("error");
- File debianBinaryFile = new File(tempDir,"debian-binary");
- echo.setFile(debianBinaryFile);
- echo.setLevel(echoLevel);
- echo.setMessage("2.0\n");
- echo.perform();
-
- for (Enumeration e=controlFileSets.elements() ; e.hasMoreElements() ; ) {
- TarFileSet fileSet = (TarFileSet)e.nextElement();
- String prefix = fileSet.getPrefix();
- String fullpath = fileSet.getFullpath();
- if ("".equals(fullpath) && !prefix.startsWith("./")) {
- if (prefix.startsWith("/")) {
- fileSet.setPrefix("." + prefix);
- } else {
- fileSet.setPrefix("./" + prefix);
- }
- }
- if ((fullpath.length() > 0) && !fullpath.startsWith("./")) {
- fileSet.setPrefix("");
- if (fullpath.startsWith("/")) {
- fileSet.setFullpath("." + fullpath);
- } else {
- fileSet.setFullpath("./" + fullpath);
- }
- }
- if ((0 == fileSet.getUid()) && ("" == fileSet.getUserName())) {
- fileSet.setUserName("root");
- }
- if ((0 == fileSet.getGid()) && ("" == fileSet.getGroup())) {
- fileSet.setGroup("root");
- }
- }
-
- for (Enumeration e=dataFileSets.elements() ; e.hasMoreElements() ; ) {
- TarFileSet fileSet = (TarFileSet)e.nextElement();
- String prefix = fileSet.getPrefix();
- String fullpath = fileSet.getFullpath();
- if ("".equals(fullpath) && !prefix.startsWith("./")) {
- if (prefix.startsWith("/")) {
- fileSet.setPrefix("." + prefix);
- } else {
- fileSet.setPrefix("./" + prefix);
- }
- }
- if ((fullpath.length() > 0) && !fullpath.startsWith("./")) {
- fileSet.setPrefix("");
- if (fullpath.startsWith("/")) {
- fileSet.setFullpath("." + fullpath);
- } else {
- fileSet.setFullpath("./" + fullpath);
- }
- }
- if ((0 == fileSet.getUid()) && ("" == fileSet.getUserName())) {
- fileSet.setUserName("root");
- }
- if ((0 == fileSet.getGid()) && ("" == fileSet.getGroup())) {
- fileSet.setGroup("root");
- }
- }
-
- File md5sumsFile = new File(tempDir,"md5sums");
- if (includeMd5sums) {
- Checksum md5 = new Checksum();
- prepareTask(md5);
- int md5Count = 0;
- StringBuffer md5sums = new StringBuffer();
- for (Enumeration e=dataFileSets.elements() ; e.hasMoreElements() ; ) {
- TarFileSet fileSet = (TarFileSet)e.nextElement();
- String[] files = fileSet.getDirectoryScanner(getProject()).getIncludedFiles();
- File fileSetDir = fileSet.getDir(getProject());
- for (int i=0, c=files.length ; i<c ; i++) {
- md5.setFile(new File(fileSetDir,files[i]));
- md5.setProperty("md5_"+md5Count);
- md5.perform();
- md5sums.append(getProject().getProperty("md5_"+md5Count)).append(" ");
- String fullpath = fileSet.getFullpath();
- if (fullpath.length() > 0) {
- md5sums.append(fullpath.substring(2));
- } else {
- md5sums.append(fileSet.getPrefix().substring(2)).append(files[i].replace('\\','/'));
- }
- md5sums.append("\n");
- md5Count++;
- }
- }
- echo.setFile(md5sumsFile);
- echo.setMessage(md5sums.toString());
- echo.perform();
- tarFileSet = controlTarGz.createTarFileSet();
- tarFileSet.setFile(md5sumsFile);
- tarFileSet.setUserName("root");
- tarFileSet.setGroup("root");
- tarFileSet.setPrefix("./");
- }
-
- TarCompressionMethod tarCompressionMethod = new TarCompressionMethod();
- tarCompressionMethod.setValue("gzip");
- controlTarGz.setCompression(tarCompressionMethod);
- File controlTarGzFile = new File(tempDir,"control.tar.gz");
- controlTarGz.setDestFile(controlTarGzFile);
- controlTarGz.perform();
-
- dataTarGz.setCompression(tarCompressionMethod);
- File dataTarGzFile = new File(tempDir,"data.tar.gz");
- dataTarGz.setDestFile(dataTarGzFile);
- dataTarGz.perform();
-
- FileUtils.delete(destFile);
- ArFileSet fileSet = debPackage.createArFileSet();
- fileSet.setFile(debianBinaryFile);
- fileSet = debPackage.createArFileSet();
- fileSet.setFile(controlTarGzFile);
- fileSet = debPackage.createArFileSet();
- fileSet.setFile(dataTarGzFile);
- debPackage.perform();
-
- if (deleteTempFiles) {
- FileUtils.delete(debianBinaryFile);
- FileUtils.delete(controlTarGzFile);
- FileUtils.delete(dataTarGzFile);
- FileUtils.delete(md5sumsFile);
- }
- }
-
- /**
- * Checks whether the package is up to date in relationship to a list of files.
- *
- * @param files the files to check
- * @param dir the base directory for the files.
- * @return true if the archive is up to date.
- */
- protected boolean packageIsUpToDate(String[] files, File dir) {
- SourceFileScanner sfs = new SourceFileScanner(this);
- MergingMapper mm = new MergingMapper();
- mm.setTo(destFile.getAbsolutePath());
- return sfs.restrict(files, dir, null, mm).length == 0;
- }
-
- /**
- * Prepares a task for execution.
- *
- * @param task the task to prepare
- */
- protected void prepareTask(Task task) {
- task.setProject(getProject());
- task.setOwningTarget(getOwningTarget());
- task.setTaskName(getTaskName());
- task.setTaskType(getTaskType());
- }
-}
+package de.masters_of_disaster.ant.tasks.deb;
+
+import de.masters_of_disaster.ant.tasks.ar.Ar;
+import de.masters_of_disaster.ant.tasks.ar.Ar.ArFileSet;
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Vector;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Checksum;
+import org.apache.tools.ant.taskdefs.Echo;
+import org.apache.tools.ant.taskdefs.Echo.EchoLevel;
+import org.apache.tools.ant.taskdefs.Mkdir;
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.taskdefs.Tar;
+import org.apache.tools.ant.taskdefs.Tar.TarCompressionMethod;
+import org.apache.tools.ant.taskdefs.Tar.TarFileSet;
+import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.MergingMapper;
+import org.apache.tools.ant.util.SourceFileScanner;
+
+/**
+ * Creates a deb package.
+ *
+ * @ant.task category="packaging"
+ */
+public class Deb extends MatchingTask {
+ Vector controlFileSets = new Vector();
+ Vector dataFileSets = new Vector();
+ File baseDir;
+ File destFile;
+ File tempDir;
+ boolean deleteTempFiles = true;
+ boolean includeMd5sums = false;
+ Tar controlTarGz = new Tar();
+ Tar dataTarGz = new Tar();
+ Ar debPackage = new Ar();
+
+ {
+ fileset = dataTarGz.createTarFileSet();
+ }
+
+ /**
+ * Add a new fileset for the control files with the option to specify permissions
+ *
+ * @return the tar fileset to be used as the nested element.
+ */
+ public TarFileSet createControlFileSet() {
+ TarFileSet fileSet = controlTarGz.createTarFileSet();
+ controlFileSets.addElement(fileSet);
+ return fileSet;
+ }
+
+ /**
+ * Add a new fileset for the data files with the option to specify permissions
+ *
+ * @return the tar fileset to be used as the nested element.
+ */
+ public TarFileSet createDataFileSet() {
+ TarFileSet fileSet = dataTarGz.createTarFileSet();
+ dataFileSets.addElement(fileSet);
+ return fileSet;
+ }
+
+ /**
+ * Set the name/location of where to create the deb file.
+ *
+ * @param destFile The output of the deb
+ */
+ public void setDestFile(File destFile) {
+ this.destFile = destFile;
+ debPackage.setDestFile(destFile);
+ }
+
+ /**
+ * This is the base directory to look in for things to include in the data files.
+ *
+ * @param baseDir the base directory.
+ */
+ public void setBaseDir(File baseDir) {
+ this.baseDir = baseDir;
+ fileset.setDir(baseDir);
+ }
+
+ /**
+ * This is the temp directory where to create the temporary files.
+ * If not set, the current projects baseDir is used.
+ *
+ * @param tempDir the temp directory.
+ */
+ public void setTempDir(File tempDir) {
+ this.tempDir = tempDir;
+ }
+
+ /**
+ * This specifies if the temporary files should get deleted.
+ *
+ * @param deleteTempFiles whether to delete the temporary files or not.
+ */
+ public void setDeleteTempFiles(boolean deleteTempFiles) {
+ this.deleteTempFiles = deleteTempFiles;
+ }
+
+ /**
+ * This specifies if the MD5 sums of the files in the data section should be
+ * included in the file "md5sums" in the control section.
+ *
+ * @param includeMd5sums whether to include MD5 sums in the control section or not.
+ */
+ public void setIncludeMd5sums(boolean includeMd5sums) {
+ this.includeMd5sums = includeMd5sums;
+ }
+
+ /**
+ * do the business
+ *
+ * @throws BuildException on error
+ */
+ public void execute() throws BuildException {
+ prepareTask(controlTarGz);
+ prepareTask(dataTarGz);
+ prepareTask(debPackage);
+ TarFileSet tarFileSet = controlTarGz.createTarFileSet();
+ tarFileSet.setFile(new File(System.getProperty("user.dir")));
+ tarFileSet.setUserName("root");
+ tarFileSet.setGroup("root");
+ tarFileSet.setFullpath("./");
+ tarFileSet = dataTarGz.createTarFileSet();
+ tarFileSet.setFile(new File(System.getProperty("user.dir")));
+ tarFileSet.setUserName("root");
+ tarFileSet.setGroup("root");
+ tarFileSet.setFullpath("./");
+
+ if (null == tempDir) {
+ tempDir = getProject().getBaseDir();
+ }
+
+ if (null != baseDir) {
+ // add the main fileset to the list of filesets to process.
+ dataFileSets.addElement(fileset);
+ } else {
+ fileset.setDir(new File(System.getProperty("user.dir")));
+ fileset.setExcludes("**");
+ }
+
+ boolean controlFound = false;
+ for (Enumeration e=controlFileSets.elements() ; e.hasMoreElements() ; ) {
+ TarFileSet fileSet = (TarFileSet)e.nextElement();
+ String[] files = fileSet.getFiles(getProject());
+ int i = 0;
+ int c;
+
+ for (c=files.length ; i<c && !controlFound ; i++) {
+ if (files[i].endsWith("control")
+ && (new File(fileSet.getDir(getProject()),files[i])).isFile()) {
+ controlFound = true;
+ }
+ }
+ }
+ if (!controlFound) {
+ throw new BuildException("The control fileset must contain a file \"control\"", getLocation());
+ }
+
+ // check if deb is out of date with respect to each fileset
+ boolean upToDate = true;
+ for (Enumeration e=controlFileSets.elements() ; e.hasMoreElements() ; ) {
+ TarFileSet fileSet = (TarFileSet)e.nextElement();
+ String[] files = fileSet.getFiles(getProject());
+
+ if (!packageIsUpToDate(files,fileSet.getDir(getProject()))) {
+ upToDate = false;
+ }
+ }
+
+ for (Enumeration e=dataFileSets.elements() ; e.hasMoreElements() ; ) {
+ TarFileSet fileSet = (TarFileSet)e.nextElement();
+ String[] files = fileSet.getFiles(getProject());
+
+ if (!packageIsUpToDate(files,fileSet.getDir(getProject()))) {
+ upToDate = false;
+ }
+ }
+
+ if (upToDate) {
+ log("Nothing to do: " + destFile.getAbsolutePath()
+ + " is up to date.", Project.MSG_INFO);
+ return;
+ }
+
+ log("Building deb: " + destFile.getAbsolutePath(), Project.MSG_INFO);
+
+ Mkdir mkdir = new Mkdir();
+ prepareTask(mkdir);
+ mkdir.setDir(tempDir);
+ mkdir.perform();
+
+ EchoLevel echoLevel = new EchoLevel();
+ echoLevel.setValue("error");
+ File debianBinaryFile = new File(tempDir,"debian-binary");
+ Echo echo = new Echo();
+ prepareTask(echo);
+ echo.setFile(debianBinaryFile);
+ echo.setLevel(echoLevel);
+ echo.setMessage("2.0\n");
+ echo.perform();
+
+ for (Enumeration e=controlFileSets.elements() ; e.hasMoreElements() ; ) {
+ TarFileSet fileSet = (TarFileSet)e.nextElement();
+ String prefix = fileSet.getPrefix();
+ String fullpath = fileSet.getFullpath();
+ if ("".equals(fullpath) && !prefix.startsWith("./")) {
+ if (prefix.startsWith("/")) {
+ fileSet.setPrefix("." + prefix);
+ } else {
+ fileSet.setPrefix("./" + prefix);
+ }
+ }
+ if ((fullpath.length() > 0) && !fullpath.startsWith("./")) {
+ fileSet.setPrefix("");
+ if (fullpath.startsWith("/")) {
+ fileSet.setFullpath("." + fullpath);
+ } else {
+ fileSet.setFullpath("./" + fullpath);
+ }
+ }
+ if ((0 == fileSet.getUid()) && ("" == fileSet.getUserName())) {
+ fileSet.setUserName("root");
+ }
+ if ((0 == fileSet.getGid()) && ("" == fileSet.getGroup())) {
+ fileSet.setGroup("root");
+ }
+ }
+
+ for (Enumeration e=dataFileSets.elements() ; e.hasMoreElements() ; ) {
+ TarFileSet fileSet = (TarFileSet)e.nextElement();
+ String prefix = fileSet.getPrefix();
+ String fullpath = fileSet.getFullpath();
+ if ("".equals(fullpath) && !prefix.startsWith("./")) {
+ if (prefix.startsWith("/")) {
+ fileSet.setPrefix("." + prefix);
+ } else {
+ fileSet.setPrefix("./" + prefix);
+ }
+ }
+ if ((fullpath.length() > 0) && !fullpath.startsWith("./")) {
+ fileSet.setPrefix("");
+ if (fullpath.startsWith("/")) {
+ fileSet.setFullpath("." + fullpath);
+ } else {
+ fileSet.setFullpath("./" + fullpath);
+ }
+ }
+ if ((0 == fileSet.getUid()) && ("" == fileSet.getUserName())) {
+ fileSet.setUserName("root");
+ }
+ if ((0 == fileSet.getGid()) && ("" == fileSet.getGroup())) {
+ fileSet.setGroup("root");
+ }
+ }
+
+ File md5sumsFile = new File(tempDir,"md5sums");
+ if (includeMd5sums) {
+ Checksum md5 = new Checksum();
+ prepareTask(md5);
+ int md5Count = 0;
+ StringBuffer md5sums = new StringBuffer();
+ for (Enumeration e=dataFileSets.elements() ; e.hasMoreElements() ; ) {
+ TarFileSet fileSet = (TarFileSet)e.nextElement();
+ String[] files = fileSet.getDirectoryScanner(getProject()).getIncludedFiles();
+ File fileSetDir = fileSet.getDir(getProject());
+ for (int i=0, c=files.length ; i<c ; i++) {
+ md5.setFile(new File(fileSetDir,files[i]));
+ md5.setProperty("md5_"+md5Count);
+ md5.perform();
+ md5sums.append(getProject().getProperty("md5_"+md5Count)).append(" ");
+ String fullpath = fileSet.getFullpath();
+ if (fullpath.length() > 0) {
+ md5sums.append(fullpath.substring(2));
+ } else {
+ md5sums.append(fileSet.getPrefix().substring(2)).append(files[i].replace('\\','/'));
+ }
+ md5sums.append("\n");
+ md5Count++;
+ }
+ }
+ echo = new Echo();
+ prepareTask(echo);
+ echo.setFile(md5sumsFile);
+ echo.setLevel(echoLevel);
+ echo.setMessage(md5sums.toString());
+ echo.perform();
+ tarFileSet = controlTarGz.createTarFileSet();
+ tarFileSet.setFile(md5sumsFile);
+ tarFileSet.setUserName("root");
+ tarFileSet.setGroup("root");
+ tarFileSet.setPrefix("./");
+ }
+
+ TarCompressionMethod tarCompressionMethod = new TarCompressionMethod();
+ tarCompressionMethod.setValue("gzip");
+ controlTarGz.setCompression(tarCompressionMethod);
+ File controlTarGzFile = new File(tempDir,"control.tar.gz");
+ controlTarGz.setDestFile(controlTarGzFile);
+ controlTarGz.perform();
+
+ dataTarGz.setCompression(tarCompressionMethod);
+ File dataTarGzFile = new File(tempDir,"data.tar.gz");
+ dataTarGz.setDestFile(dataTarGzFile);
+ dataTarGz.perform();
+
+ FileUtils.delete(destFile);
+ ArFileSet fileSet = debPackage.createArFileSet();
+ fileSet.setFile(debianBinaryFile);
+ fileSet = debPackage.createArFileSet();
+ fileSet.setFile(controlTarGzFile);
+ fileSet = debPackage.createArFileSet();
+ fileSet.setFile(dataTarGzFile);
+ debPackage.perform();
+
+ if (deleteTempFiles) {
+ FileUtils.delete(debianBinaryFile);
+ FileUtils.delete(controlTarGzFile);
+ FileUtils.delete(dataTarGzFile);
+ FileUtils.delete(md5sumsFile);
+ }
+ }
+
+ /**
+ * Checks whether the package is up to date in relationship to a list of files.
+ *
+ * @param files the files to check
+ * @param dir the base directory for the files.
+ * @return true if the archive is up to date.
+ */
+ protected boolean packageIsUpToDate(String[] files, File dir) {
+ SourceFileScanner sfs = new SourceFileScanner(this);
+ MergingMapper mm = new MergingMapper();
+ mm.setTo(destFile.getAbsolutePath());
+ return sfs.restrict(files, dir, null, mm).length == 0;
+ }
+
+ /**
+ * Prepares a task for execution.
+ *
+ * @param task the task to prepare
+ */
+ protected void prepareTask(Task task) {
+ task.setProject(getProject());
+ task.setOwningTarget(getOwningTarget());
+ task.setTaskName(getTaskName());
+ task.setTaskType(getTaskType());
+ }
+}
diff --git a/jEdit/doc/Apache.LICENSE.txt b/jEdit/doc/Apache.LICENSE.txt
index 99c1d1a..975c6ed 100644
--- a/jEdit/doc/Apache.LICENSE.txt
+++ b/jEdit/doc/Apache.LICENSE.txt
@@ -1,50 +1,50 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2000-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- apache at apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <stefano at apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 2000-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache at apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation and was originally created by
+ Stefano Mazzocchi <stefano at apache.org>. For more information on the Apache
+ Software Foundation, please see <http://www.apache.org/>.
+
+*/
diff --git a/jEdit/doc/CHANGES.txt b/jEdit/doc/CHANGES.txt
index 55dae3e..fceb835 100644
--- a/jEdit/doc/CHANGES.txt
+++ b/jEdit/doc/CHANGES.txt
@@ -1,3331 +1,453 @@
-JEDIT 4.3 VERSION HISTORY
-
-{{{ Version 4.3.2
-
-Thanks to Björn "Vampire" Kautler, Matthieu Casanova, Shlomy Reinstein,
-Kazutoshi Satoda, oman002, and Eric Le Lay for contributing to this release.
-
-{{{ Bug Fixes
-
-- Fixed Standalone TextArea build target (Shlomy Reinstein)
-
-- Fixed a NPE that happens when an error occurs before the view is loaded
- (Matthieu Casanova #2905487)
-
-- Fixed bug #2927555: beanshell load() fails w/ exception (Shlomy Reinstein)
-
-- Fixed a memory leak which held closed View and EditPane when using
- global bufferset scope. (Kazutoshi Satoda)
-
-- When removing text from the buffer, the event contentRemoved was sent before
- making the buffer dirty (oman002 #2944145)
-
-- Fixed leaky memory usage after some specific text operations.
- (Kazutoshi Satoda)
-
-- Worked around a memory leak in Sun Java 6 where the sun.font.GlyphLayout is
- cached and reused while holding an instance to the char array
- (Björn "Vampire" Kautler)
-
-- When setting a new message in the status bar in a macro called from the
- Macro menu the message was cleared immediately (Matthieu Casanova #2964522)
-
-- don't log an error when the API docs are not available. Provide a link
- to the online docs instead (SF.net bug #1777806 - Eric Le Lay)
-
-- RFC edit mode was misplaced in catalog and was never matching anything because
- text edit mode glob was more global and checked first (Matthieu Casanova)
-
-- java installer refuses to install from a directory containing exclamation
- marks (SF.net bug #2065330 - Eric Le Lay)
-
-}}}
-{{{ Miscellaneous
-
-
-}}}
-{{{ API Changes
-
-- Applied patch #2932330 to suppress BufferUpdate messages from temporary
- buffers to improve performance. (Dale Anson)
-
-}}}
-{{{ Editing
-
-
-}}}
-
-}}}
-
-{{{ Version 4.3.1
-
-Thanks to Björn "Vampire" Kautler, Alan Ezust, Damien Radtke,
-Kazutoshi Satoda, Dale Anson, and Shlomy Reinstein for contributing
-to this release.
-
-{{{ Bug Fixes
-
-- Searching for regex "^\s*.*$" missed every second line of adjacent
- matching lines. (SF.net bug #2915720 - Kazutoshi Satoda)
-
-- Fix for 2924261, BufferLocal ignores request to change encoding. (Dale
-Anson)
-
-- Fix # 2921611 - PluginSets fail to load grand-dependencies. (Damien Radtke)
-
-- Fix # 2920287 - Macro recording for home/end actions fixed. (Alan Ezust)
-
-- Fixed #2920352: Can't disable "Restore previously open files on startup".
- (Shlomy Reinstein)
-
-}}}
-
-}}}
-
-{{{ Version 4.3
-
-Thanks to Björn "Vampire" Kautler, Marcelo Vanzin, Matthieu Casanova,
-Alan Ezust, Eric Berry, and Eric Le Lay for contributing to this release.
-
-{{{ Bug Fixes
-
-- Merged rev# 16624 from trunk, to fix printing which was broken by
- patch#2876132. (Eric Le Lay)
-
-- Applied patch #2876132 - anonymous instances of JARClassLoader will now
- resolve resources like instances associated with a JAR file (fix for Xerces).
- The context ClassLoader for jedit server thread is now a JARClassLoader.
- (Eric Le Lay)
-
-- Fixed bug #2907139: Upgrading from 4.2final to 4.3pre18 causes freeze at
- startup (Shlomy Reinstein)
-
-}}}
-{{{ Miscellaneous
-
-- When creating a new file from the VFS Browser, if a clean untitled buffer
- already exists but with another path it is now replaced by a new untitled
- buffer using the selected path (Matthieu Casanova)
-
-- Applied patch #2887515: Navigate in AboutDialog (contributed by spj).
- The name list in the about dialog can be scrolled faster using the up and
- down arrow keys, and the scrolling can be stopped using the right and left
- arrow keys or the escape key.
-
-- EnhancedButton have its name set to the last part of the action name,
- to facilitate unit-tests (e.g. the 'previous' button in the VFSBrowser
- has the action 'vfs.browser.previous', so will be named 'previous').
-
-}}}
-{{{ API Changes
-
-- Add support for type-specific EditBus message handlers. EditBus handlers
- don't need to implement EBComponent anymore; they just need to annotate their
- EditBus handler methods with the new "EBHandler" annotation. The methods
- should expect a single argument (an instance of any EBMessage type), and the
- method will be called whenever a message of a matching type is sent on the
- EditBus. Classes that still implement EBComponent will continue to work
- exactly like before, even if they include handlers using the new annotation.
- (Marcelo Vanzin)
-
-}}}
-{{{ Editing
-
-- Improved indenting rules of Python edit mode. (Björn "Vampire" Kautler)
-
-- Reverted a change for jsp mode, which was made on 4.3pre17 to fix a
- bug, since it doesn't work any more. (see SF.net bug #846913)
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre18
-
-Thanks to Björn "Vampire" Kautler, Shlomy Reinstein, Alan Ezust, Chepel
-Matthieu Casanova, Denis Dzenskevich, Dennis Sheil, Jim Lawton and
-Suraj Kurapati for contributing to this release.
-
-{{{ Bug Fixes
-- When using the quick syntax edition, if the operation is cancelled, do not
- send a propertiesChanged event (Matthieu Casanova)
-
-- Fixed bug #2882702 - Right Click menu shows up to the left of the mouse
- pointer in a multiple monitor environment.
-
-- Fixed bug #2881152 - Bufferset Order is incorrect after a "save as".
- (#2882756 - Shlomy Reinstein)
-
-- Fixed bug #2806043: Token.tokenToString() throws
- ArrayIndexOutOfBoundsException on the END token. (Shlomy Reinstein)
-
-- When switching back from fullscreen mode to normal, check property to decide
- whether to show status bar in normal or plain view. (Shlomy Reinstein)
-
-- Fixed restoring of view bounds from perspective.xml for dual-monitor
- environments. This was broken by a fix in the previous version for users who
- switch from a dual-monitor environment to a single-monitor environment, and
- now should be fixed indefinitely. (Shlomy Reinstein)
-
-- Fixed #2819701: DockableWindowManagerImpl causes NullPointerExceptions.
- (Shlomy Reinstein)
-
-- Fixed #2817321: Exceptions on startup.
- Caused by a backward-incompatibility that was introduced by the BufferSets
- feature, of the "split configuration" format in the perspective.xml file. This
- incompatibility prevented jEdit from starting up for users who upgrade from
- any non-BufferSet version. A workaround for this is to remove perspective.xml,
- but then the previous layout is not restored. With this fix, jEdit should
- start normally with an old perspective.xml file. (#2817321) (Shlomy Reinstein)
-
-- Fixed #2818261: Rectangular Selection Count wrong. (Shlomy Reinstein)
-
-- Fixed #2823909: action bar not visible in full screen mode. (Shlomy Reinstein)
-
-- Fixed #2825028: Plugins not properly unloaded during exit. (Shlomy Reinstein)
-
-- Fixed #2825203: BufferSets not restored correctly on startup.
- (Shlomy Reinstein)
-
-- Fixed the Java based installer not to use an undefined variable
- JAVA_HEAP_INIT_SIZE in Unix startup script. (Kazutoshi Satoda)
-
-- Fixed #2818327: Plugin Error Dialog issues - allow copying the text from
- the plugin error dialog. (Shlomy Reinstein).
-
-- Fixed #2833822: Selecting "View -> Line numbers" now shows the gutter if it
- was not shown before (otherwise, this has no effect).
-
-- # 2838679 - Support Cygwin xsltproc in build.xml for docs generation
- (Sebastian Schuberth).
-
-- Minor refactoring of Mode class to allow plugins to determine the mode of a
- file without having to necessarily read the first line of the file. This
- allows huge performance gains in plugins like TaskList that need to determine
- the mode of a large number of files that are not yet opened in jEdit.
- (Dale Anson)
-
-- Fixed #2834900: DockingLayoutManager recursion when handling EditBus msgs.
- Prevented such recursions by avoiding creation of a dockable if it is already
- being created. (Shlomy Reinstein)
-
-- Fixed syntax highlight when a " appear in a javadoc comment in java mode
- (#2818095) (Denis Dzenskevich)
-
-- Fixed #2808363 (patch #2827234): fix perl highlighting hanging on some
- operators. (Dennis Sheil)
-
-- Applied patch #2842678: Gutter selection problems (Shlomy Reinstein, patch
- provided by encorejane).
-
-- Applied patch #2846169: IndentFoldHandler - allow blank lines after start of
- fold. (Shlomy Reinstein, patch provided by Suraj Kurapati)
-
-- Applied patch #2844750: line height correction (disappearing underscores),
- using OpenJDK (Suraj Kurapati)
-
-}}}
-{{{ Miscellaneous
-- New Macro - "Text/Compose Tag". (Gordon Hollenbeck # 2644277)
-
-- New action: toggle buffer switcher - toggles visibility of buffer switcher,
- and enabled-ness of focus menu item and focuses if enabled. (ezust)
-
-- New (restored?) Actions: dumb "home" and "end": not as smart as smart
- home/end - stays on the same line always. (Alan Ezust)
-
-- Smarter Smart-end - uses syntax info to determine end of code (before
- start of comment), giving smart-end 4 states instead of the previous 3.
- (Gordon Hollenbeck #2646484).
-
-- New options to select the width and the background color of the selection area
- in the gutter (which is visible when line numbers are not shown).
-
-- New button in Hypersearch dockable panel to stop an hypersearch
- (patch #2842444) (encorejane)
-}}}
-{{{ API Changes
-
-- Renamed "EditPane.showBufferSwitcher()" to "focusBufferSwitcher", and the
- corresponding action that invokes it. (Alan Ezust)
-
-- New method: TextArea.goToEndOfCode() (Gordon Hollenbeck #2646484).
-
-- Removed deprecated TextAreaUpdate EBMessage. Use EditPaneUpdate instead.
- (Alan Ezust)
-
-- Moved EditorExiting ebmessage earlier, before the unloading of plugin jars
- so plugins can catch it and act appropriately during shutdown. (Alan Ezust)
-
-- Added support for undo-aware plugins:
- - A new interface: org.gjt.sp.jedit.buffer.BufferUndoListener
- This interface defines a listener that gets notified whenever undo/redo
- are performed on a buffer. The listener can be added to / removed from
- a buffer using:
- JEditBuffer.addBufferUndoListener(BufferUndoListener)
- JEditBuffer.removeBufferUndoListener(BufferUndoListener listener)
- - New methods in JEditBuffer: getUndoId(), canUndo(), canRedo()
- getUndoId() can be used during buffer content changes to find which
- changes are included in the same undo operation. The method returns a
- different undoId for each undo operation, and all changes included in the
- same undo operation get the same undoId. The other two methods return
- true if more items exist in the undo/redo list, respectively.
-
-- New method: FoldHandler.getPrecedingFoldLevels - allows a fold handler to
- specify fold levels of lines preceding a line whose content has changed, to
- support patch #2846169, which makes the fold levels of blank lines depend on
- the first non-whitespace-only line following them. (Shlomy Reinstein)
-}}}
-{{{ Editing
-- "try" keyword added to erlang edit mode (patch #2769870) (Chepel)
-
-- added assembly-agc (Apollo Guidance Computer) edit mode (patch #2848519)
- (Jim Lawton)
-
-- added assembly-ags (Apollo Abort Guidance System) edit mode (patch #2848519)
- (Jim Lawton)
-
-- added binsource-agc (Apollo Guidance Computer Binary) edit mode (Jim Lawton)
-
-- Ruby edit mode updated (patch #2846453) (Suraj Kurapati)
-
-- Added *.sv (System Verilog) extension to verilog edit mode (feature #2814425)
- (Matthieu Casanova)
-}}}
-
-}}}
-
-{{{ Version 4.3pre17
-
-Thanks to Björn "Vampire" Kautler, Matthieu Casanova, Dakshinamurthy Karra,
-Pascal Sancho, Victor Engmark, Alan Ezust, Dale Anson, Daniel Hahler,
-Kazutoshi Satoda, Shlomy Reinstein, Bernard Walle, Markus Laker, Seph Soliman,
-Sergey Mezentsev, Matthew Bakalar, Marcelo Vanzin and Matthew Gilbert for
-contributing to this release.
-
-{{{ Bug Fixes
-
-- Stop caret timer in text area on dispose (Bill Culp - # 2814857)
-
-- Fixed a possible case where an output stream is not closed (#2790435)
- (Matthew Bakalar)
-
-- The Password fields in Metal Look & Feel now follows the TextArea color scheme
- (Matthieu Casanova)
-
-- If you set - as path in the VFSBrowser it will be replaced by the path
- of the current buffer (#2218621) (Matthieu Casanova)
-
-- Loading a library from the PluginManager gives a NPE
- (#2779500) (Matthieu Casanova)
-
-- If the textarea is antialiased the gutter will also use the same antialiasing
- (Matthieu Casanova)
-
-- The autoreload option was not applied for existing buffers (#2587311)
- (Matthieu Casanova)
-
-- When restoring the perspective the EditPanes are created with the default
- bufferSet scope and it is changed after according to the perspective.xml.
- Now it is immediately created with the good scope (#2645056)
- (Matthieu Casanova)
-
-- Fixed horizontal mac scrolling with trackpad or Mighty Mouse (#2308694)
- (Seph Soliman)
-
-- Fixed scrolling bug : when the TextArea was smaller than one visible line,
- if a line was wrapped, moving the cursor up or down in this line will not make
- was not the textarea scrolling to see the cursor (#2596087)
- (Matthieu Casanova)
-
-- Fix for caret position display in status bar (tracker 2220033), relative
- position was not always correct. In conjunction with this, added checkboxes
- in the Status Bar option pane to make the various items in the caret position
- display configurable. (Dale Anson, Kazutoshi Satoda).
-
-- Fix for files in buffer switcher not ordered (tracker 2183929). Sorting is
- now immediate on changing the preferences in the option dialog (Dale Anson)
-
-- Fix for View->Show Buffer Switcher does not show the buffer switcher (tracker
- 2179149) (Dale Anson) This menu item is intended to show the buffer switcher
- drop down, which isn't necessary if the buffer switcher is not visible. Now
- the visibility of this menu item is the same as the visibility of the buffer
- switcher.
-
-- When having split view, dropping a file on the inactive textArea was opening
- it to the active textArea (#2321838) (Matthieu Casanova, Shlomy Reinstein)
-
-- MD5 hash calculated inside read-lock, and also after buffer saves (#2780652).
- (Alan Ezust)
-
-- Fix drag & drop in BufferTabs, which broke as a result of BufferSet ignoring
- changes in buffer index (#2100690) (Shlomy Reinstein).
-
-- Fix #1974620: Cannot use C+e C+BACK_QUOTE for close-docking-area.
- (Shlomy Reinstein)
-
-- Fixed a NPE which had prevented to switch from a loading buffer to
- another. (Kazutoshi Satoda)
-
-- Fix #2017514: Selection occasionally lost after right-click.
-
-- The status bar label did not follow the editor colors (Matthieu Casanova)
-
-- Fix #2519873: MyDoggyPlugin : the dockables are immediately loaded.
- Each plugin dockable that was configured by the properties file to be docked
- was immediately loaded and made visible when the plugin was loaded. Now, it
- uses lazy instantiation and only its anchor button is shown. (Shlomy Reinstein)
-
-- Fixed a bug in OperatingSystem.getScreenBounds() (Matthieu Casanova)
-
-- Fixed JVM detection that was broken with java 1.6 (Matthieu Casanova)
-
-- Fixed a NPE in Buffer.setMode() if the defaultMode is null (Matthieu Casanova)
-
-- Folded lines could become invisible if "delete-line" action was used
- at a collapsed fold. (SF.net bug #2548764 - Kazutoshi Satoda)
-
-- With non-global BufferSet scope, closing the first view of multiple
- views could loose dirty buffers.
- Now a confirmation dialog is shown on closing a view as well as
- exiting jEdit. (SF.net bug #2091052 - Kazutoshi Satoda)
-
-- With editpane BufferSet scope, buffers could be closed on unsplitting
- EditPanes.
- Now all buffers are kept on the remaining EditPane. (Kazutoshi Satoda)
-
-- Fixed #2688862: "Redo HyperSearch" uses title of last search.
- (Shlomy Reinstein)
-
-- Fixed #2712031: Index out of bounds exception in FilteredListModel.
- (Shlomy Reinstein)
-
-- Fixed #1633393: TextArea painting corruption when saving
- (Dale Anson)
-
-- Fixed #2609091: Windows appear out of view. Caused by starting jEdit in a
- single monitor environment, where last time it ran in the 2nd monitor of a
- dual monitor environment. (Shlomy Reinstein)
-
-- Fixed #1593576: Autoindenting should copy exact whitespaces.
- (Shlomy Reinstein)
-
-- Fixed #2744708: Deleted file doesn't show as dirty buffer. (Shlomy Reinstein)
-
-- Fixed #2777073: Fix gutter width for line numbers. Minimal number of digits
- to reserve for line numbers can be controlled using the Gutter option pane.
- (Shlomy Reinstein)
-}}}
-{{{ Miscellaneous
-
-- jEdit settings directory is now stored in a sane location on Mac
- (HOME/Library/jEdit). Old settings are moved to new location unless a custom
- location is set through (-settings=foo). (Seph Soliman)
-
-- Page-scrolling changed to CTRL+SHIFT+scroll instead of SHIFT+scroll
- due to Java on Mac.
- (Seph Soliman)
-
-- Removed redundant TextArea:EditPane map in EditPane.java in favor of a linear
- search through parent container linked list. (Alan Ezust)
-
-- Applied patch #2296738: File/Directory properties dialog for VFS browser.
- The context menu of the VFS browser now has a "Properties" menu item that
- shows the properties of the selected node(s) in a dialog.
-
-- Implemented feature request #2555956: Show presence of jedit server. The About
- dialog now shows the mode in which jEdit is running: server,
- server-background, or standalone. (Shlomy Reinstein)
-
-- New action: Toggle exclusive BufferSets (Alan Ezust # 2060078).
-
-- Added configurable highlighting of the matching text in hypersearch results,
- which is part of feature request #2446121. (Shlomy Reinstein)
-
-- The JarClassLoader now allows to open resources from another jar
- (Matthieu Casanova)
-
-- Implemented feature request #2668434: fullscreen-mode. (Shlomy Reinstein)
-
-- When creating a directory in the VFS Browser the parent directory is expanded
- if it was closed (Matthieu Casanova)
-
-- Implemented feature request #1730845: Select line from gutter.
- Added a selection area to the gutter when line numbers are not shown. The
- selection area can be used for selecting lines from the text area (left-click
- or left-click and drag) and for toggling markers (right-click).
- The selection area can be enabled or disabled from the Gutter option pane.
- (Shlomy Reinstein)
-
-- Added an option in the Gutter option pane to enable or disable the gutter.
- (Shlomy Reinstein)
-
-- Added an option to search all open buffers to build the completion list.
- (Matthew Gilbert - SF.net patch #2569381, #2570229)
-
-- Added macro: "Files/Send Buffer to Next Editpane" for use with EditPane
- bufferset scope (Alan Ezust).
-
-
-}}}
-{{{ API Changes
-
-- Removed deprecated org.gjt.sp.jedit.msg.CaretChanging. Use PositionChanging
- instead - the former is no longer being used. (Alan Ezust)
-
-- The keybindings are reloaded when the properties are changed in the standalone
- textarea, and the StandaloneActionSet now takes an url to the actions.xml
- as constructor parameter (patch #2304608) (Dakshinamurthy Karra)
-
-- Added jEdit.openFile(EditPane, ....) methods to explicitely choose an editPane
- to open a file (Matthieu Casanova)
-
-- Added jEdit.newFile(EditPane, ...) methods to explicitely choose an EditPane
- to create a new file (Matthieu Casanova)
-
-- Added org.gjt.sp.jedit.menu.MenuItemTextComparator as the preferred
- alternative for deprecated MiscUtilities.MenuItemCompare.
- (Eric Berry - SF.net patch #2308329)
-
-- Removed BufferSet#getScope(). The scope of bufferset is a property of
- EditPane. Added EditPane#getBufferSetScope() and setBufferSetScope().
- Also removed EditPane#setBufferSet(), which was the way to set the
- scope of buffer set. (Kazutoshi Satoda)
-
-- Moved access methods for BufferSet instances to be more straightforward.
- - jEdit.getBufferSetManager().getGlobalBufferSet()
- -> jEdit.getGlobalBufferSet()
- - jEdit.getViewBufferSet(view)
- -> view.getLocalBufferSet()
- - jEdit.getEditPaneBufferSet(editPane) /* this might be unused one */
- -> editPane.getBufferSet() /* this is currently used one */
-
-- Removed BufferSetManager#hasListeners() which had always returned true.
-
-- Removed BufferSetManager#clear() which just made inconsistent state.
-
-- Added a new method jEdit.moveBuffer() to explicitly move a buffer in
- a BufferSet.
- This can be used to replace a hacky call of BufferSet#addBufferAt()
- which is used to move the buffer.
-
-- Added OperatingSystem.hasJava16() method and made deprecated
- OperatingSystem.hasJava15() and OperatingSystem.hasJava14() since jEdit
- requires Java 1.5 at least (Matthieu Casanova)
-
-- Added a new interface for docking framework plugins to react to newly loaded
- dockables (fixed bug #2519873). (Shlomy Reinstein)
-
-- Added the API DockingArea.getDockables() to support the Docker plugin.
-
-- Added new constructor to OptionsDialog.OptionsTreeModel that allows setting
- the root group of the tree. (Marcelo Vanzin)
-
-
-}}}
-{{{ Editing
-
-- New powershell edit mode (patch #2734116) (Sergey Mezentsev)
-
-- New jedit-actions edit mode that delegates to beanshell the <CODE> tags
- (Romain François)
-
-- Javascript brace indentation patch (Eric Berry # 2808701)
-
-- New N3 edit mode (Jakub Roztocil # 2772966)
-
-- New stata/stata-ado modes (Goebbe # 2664474)
-
-- New YABasic edit mode (Ben Dutcher # 2716891)
-
-- Updated SAS edit mode (Ian Helgesen # 1806510, goebbe #2675761, #2793540).
-
-- New JavaFX edit mode (Matthieu Casanova)
-
-- Updated Antlr mode (LDiracDelta # 2013652 )
-
-- New Pure mode (http://code.google.com/p/pure-lang - asitdepends # 2716903)
-
-- new TurboBasic mode (Ben Dutcher - # 2716903)
-
-- New YAML editing mode (Jakub Roztocil - #2604705 )
-
-- Removed ML indenting from ML mode (Lucas Dixon - #2382013)
-
-- Updated Lilypond mode (Bertalan Fodor # 2538906)
-
-- New mode for GraphViz Dot (Kevin Hunter # 1991303)
-
-- New mode for Great Cow Basic (Mark Twomey # 2055913)
-
-- New mode for TSP (goebbe - #2155442)
-
-- New mode for VRML2 (Jimmy Chaw #2297731)
-
-- Improved Ada mode (Peter Chapin - # 2022589)
-
-- New mode for Clojure (David Moss # 2201893)
-
-- LineComment property for TCL mode (Albert Davidson Chou # 2119958)
-
-- Improved VHDL mode (M. Cesar R. Lacruz - # 2082454)
-
-- Fixes to XSLT mode (Pascal Sancho - # 1954810, Greg Knittl # 2148505)
-
-- New icalendar mode (Victor Engmark - #1934498)
-
-- Fix for java mode (tracker 737187), method name not always highlighted if
- there were one or more spaces or tabs following the method name (Dale Anson)
-
-- Fix for jsp mode (tracker 846913), syntax highlighting doesn't ignore comments
- and strings, where a single line java comment on the same line as a scriptlet
- terminator improperly highlighted the terminator as a comment (Dale Anson)
- (Note: This change was reverted on 4.3.0)
-
-- HTML mode: Fix delegation of "style" attribute to CSS mode and delegate
- on* attributes to JavaScript mode (Daniel Hahler)
-
-- SF Bug #1947324: Bring Perl mode up to date with Perl 5.10
- Add some new keywords and operators to the perl mode. (Markus Laker)
-
-- Added COMMENT3 in javascript mode (bug #2474585) (Matthieu Casanova)
-
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre16
-
-Thanks to Björn "Vampire" Kautler, Kazutoshi Satoda, Dakshinamurthy Karra,
-Matthieu Casanova, Alan Ezust, Bernhard Walle, Shlomy Reinstein, Greg Merrill,
-Jeff Robertson, Kevin Hunter, and Eric Berry for contributing to this release.
-
-{{{ Bug Fixes
-
-- When the bufferSet were not sorted it was possible to have two time the same
- buffer in a bufferSet (Matthieu Casanova)
-
-- When changing the antialiasing mode to none, jEdit do not need to be restarted
- anymore (patch #2115400) (Dakshinamurthy Karra)
-
-- The standalone textarea reloads the properties of the buffer when properties
- are changed (patch #2115400) (Dakshinamurthy Karra)
-
-- When the close dialog is open with a list of dirty files, if one of those files
- is closed in jEdit by another thread, selecting will remove the file from the
- dialog (#2129419) (Matthieu Casanova)
-
-- It is not possible anymore to open more than one clean untitled buffer in
- a bufferSet (Matthieu Casanova)
-
-- Closed buffers were often kept in memory. (Kazutoshi Satoda)
-
-- Error "Invalid screen line count" was shown when scrolling in a
- compound edit. (SF.net patch #1990960 - Kazutoshi Satoda)
-
-- Folded lines sometimes became invisible after breaking the fold
- structure; like explicit fold markers, or indents.
- (SF.net patch #1999448 - Kazutoshi Satoda)
-
-- Fixed char escape in shellscript (#2080891) (Kevin Hunter)
-
-- When closing a view or an EditPane, the dirty buffers of it's bufferSet are
- now added to the previous EditPane (#2091052) (Matthieu Casanova)
-
-- A memory leak fixed in the Activity Log panel (#2100926) (Matthieu Casanova,
- Kazutoshi Satoda)
-
-- When starting jEdit without a settings directory an error happened when saving
- backup of setting files (Matthieu Casanova)
-
-- The action on new bufferSet creation was not stored correctly in properties
- causing sometimes NPE (Matthieu Casanova)
-
-- When a bufferSet is sorted, dragging a buffer in BufferTabs plugin was not
- possible (#2100690) (Matthieu Casanova)
-
-- # 1519924 - Pressing escape in Path: field gets rid of dock window.
- (#1854542 - Jeff Robertson - jefftbob)
-
-- Fixed occasional input problems after switching application focus.
- (SF.net bug #2093501, #1650718 - Kazutoshi Satoda)
-
-- Numpad keys (ADD, SUBTRACT, etc) had been not bindable since 4.3pre13.
- (SF.net bug #1936714 - Kazutoshi Satoda)
-
-- When launching jEdit with some files in the command line if the bufferSet was
- not global, the files were opened but not visible in the editPane
- (Matthieu Casanova)
-
-- #1766853: View is not plain with -newplainview on first launch.
- '-newplainview' now works also when jEdit is not running.
- (Shlomy Reinstein)
-
-- Fixed the released size shown by jEdit.showMemoryDialog() which was
- wrong when GC compacted the total heap size. (Kazutoshi Satoda)
-
-- Fixed a long delay (typically 7-10 seconds) when showing the context menu
- of the text area or the drop down of a history text field the first time.
- This long delay was experienced mostly on Windows, and was caused by the
- call to GraphicsDevice.getConfigurations()
-
-- The search and replace regex can now match an empty string.
- (SF.net bug #1671312 - Matthieu Casanova, Shlomy Reinstein,
- Kazutoshi Satoda)
-
-- Some regex replace, like "\b" -> "|", falled into infinite loop.
- (Kazutoshi Satoda)
-
-- Fixed an exception when searching within a selection for the regexp '$', if
- the last selection line is empty. (#2173112) (Shlomy Reinstein)
-
-- Replace in selection which ends at middle of line for regex which ends
- with "$" could wrongly match the end of selection. (Kazutoshi Satoda)
-
-- When splitting the view, using editpane scope for bufferSet the new editPane
- contained all buffers instead of having only buffers from the active EditPane
- (#2152509) (Matthieu Casanova)
-
-- killring.xml or other XML files could be corrupted with control characters.
- (Kazutoshi Satoda)
-
-- BeanShell codes could access non-public members by default.
- (Kazutoshi Satoda)
-
-}}}
-{{{ Miscellaneous
-
-- Disabled the MacOS plugin by default for now. (Björn "Vampire" Kautler)
-
-- Added the absolute caret position in the caret status of the status bar
- (Matthieu Casanova)
-
-- Added a widget for the statusbar that displays the length of the current
- selection (feature #1912735) (Matthieu Casanova)
-
-- Moved buffer list sorting options from General to View Option Pane
- with other bufferset options. (Alan Ezust)
-
-- Enabled reverse regex search.
- (SF.net patch #1923613 - Greg Merrill, Kazutoshi Satoda)
-
-- New option in saving/backup: Never mark untitled buffers dirty.
- Related to that, buffers with length=0 never marked dirty.
- (request # 2068307 - Alan Ezust)
-
-- New option in saving/backup: Calculate MD5 hash to see if the
- file as loaded from disk is the same as what is in the buffer.
- (Request # 2077326 - Alan Ezust, Kevin Hunter, K. Satoda)
-
-- New action new-file-in-mode, which opens a dialog listing the
- available modes, the user can select one and a new file is created
- under that mode. (SF.net patch #1829669 - Eric Berry)
-
-- Removed own back buffers for textarea, which were meant to speed up
- painting textarea, because the effect seemed to be not noticeable and
- not stable over runtime environments, while it broke Background plugin
- (SF.net Plugin Bugs #1620694) and consumed much memory.
- (Kazutoshi Satoda)
-
-- Improved rendering of complex text layout (like Indic text) in text
- area. (SF.net bug #981012 - Kazutoshi Satoda)
-
-- Added some new encoding detectors which reads some lines at the top of
- file and search for encoding declaration pattern in regex.
- - html: finds "\bcharset=(ENCODING)"
- - python: finds "coding[=:]\s*(ENCODING)"
- (Kazutoshi Satoda)
-
-- Abbreviated buffer path in MiscUtilities.abbreviate()
- Replaces homedir with tilde, and reverse-expands environment variables.
- (# 1910097 - Jakub Roztocil, Alan Ezust)
-
-- Angle Brackets are now also matched from find matching bracket.
- (encorejane - # 1849215)
-
-- ActionSet combobox in "add to context menu" is sorted and remembers previous
- selection. (Alan Ezust)
-
-- Added right click popup menu to the Error widget in the status bar to clear
- all errors (feature #2122926) (Matthieu Casanova)
-
-- Added two new fold styles: Square folds (Explorer style) and round folds
- (Scintilla style). Created a service to provide the fold painter, and a
- property to select the fold painter service to use. The fold style can be
- changed using a new option in Global Options -> Gutter. (feature #1747300)
- (Shlomy Reinstein)
-
-- Changed the "HyperSearch_Results_to_Buffer" macro to include the results of
- all searches, not just the last one, and also the search matcher of each
- search, in order to be able to "import" the search results from
- the buffer later.
- Added a new "Buffer_to_HyperSearch_Results" macro that reads a buffer that
- was previously created by the "HyperSearch_Results_to_Buffer" macro, and
- possibly manipulated manually later, and imports the results from the buffer
- into the HyperSearch Results dockable. This macro handles the
- "regular expression" and "ignore case" options correctly.
-
-- Added macro Editing/Toggle_Fold.bsh for toggling the current fold.
- (feature #2190064) (Shlomy Reinstein)
-
-- Added a combo box to the Docking option pane (in the Global Options dialog)
- for selecting the set of dockables to configure (plugin / core / all).
- (feature #2199003) (Shlomy Reinstein)
-
-- Removed a JVM option "-Xms64M" from installed startup commands/scripts,
- which consumed too much memory. (Kazutoshi Satoda)
-
-}}}
-{{{ Docker Plugin features merged into jEdit Core
-
-- New actions: View - Docking - Load|Save docking layout (of current mode)
- You can save named dockable layouts, analogous to Eclipse perspectives,
- on a global or per-mode basis. (Shlomy Reinstein)
-
-- New action: View - Docking - Toggle Docked Areas. (Alan Ezust)
-
-}}}
-{{{ API Changes
-
-- A public field buffer in HyperSearchFileNode was removed. Use
- getBuffer() instead. (Kazutoshi Satoda)
-
-- A new service, DockableWindowManagerProvider, makes it possible
- for plugins to offer alternate docking managers. (Shlomy Reinstein)
-
-- Embedded textarea refactoring for better usability.
- Now a software that wants to use the jEdit's textarea must instantiate the
- class StandaloneTextArea, and for use in a jEdit's plugin
- JEditEmbeddedTextArea (patch #2096752) (Dakshinamurthy Karra)
-
-- SearchMatcher#isMatchingEOL(), which was introduced at 4.3pre7, has been
- removed in favor of better fix for the problem. (Kazutoshi Satoda)
-
-}}}
-{{{ Editing
-
-- New cmake mode (patch #2011419) (Bernhard Walle)
-
-- More patterns for shellscript filenames (# 2056778 - Kevin Hunter (hunteke))
-
-- added htaccess keywords AuthBasicAuthoritative and AuthBasicProvider
- (#2108778) (Matthieu Casanova)
-
-- Added some indent rules in shellscript.xml (Matthieu Casanova)
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre15
-
-Thanks to Björn "Vampire" Kautler, Marcelo Vanzin, Matthieu Casanova,
-Seph M. Soliman, Alan Ezust, Robert Schwenn, Nils Nordman,
-Dale Anson, and Daniel Hahler for contributing to this release.
-
-{{{ Bug Fixes
-
-- The autosave feature was broken (#1957237) (Matthieu Casanova)
-
-- Toolbar overhaul: Toolbar buttons were inconsistently sizes across different
- L&Fs. (#1954020)
- In addition, toolbar buttons and toolbars now use JToolBar instead of just
- JPanel. The Open File dialog was also modified to remove the margin around
- the toolbar. (Seph M. Soliman)
-
-- The shortcut to create a new file in the VFSBrowser is now ctrl+n instead of
- just 'n' (#1965114) (Matthieu Casanova)
-
-- Some NPE fixed in status bar widgets when the view do not have a textArea yet
- (#1965532) (Matthieu Casanova)
-
-- VFSFileChooserDialog: back-arrow in filename textbox used to go up a
- directory, but was also used for going back a space in the text field.
- Disabled first behavior. (#1694133 - Alan Ezust)
-
-- VFSBrowser: Added shortcut "A+Up" to go up a dir.
- New browser directory stack actions: next/previous (A+Left and A+Right).
- Reworked tab-keyboard focus traversal policy. (Alan Ezust)
-
-- New Action: Scroll-And-Center-Caret Action. Restored previous
- behavior of center-caret-on-screen. (#1910061 - Alan Ezust)
-
-- A NPE was happened when loading several buffers at the same time and if the
- collapseFold bufferlocal property is set to something else than 0
- (#1982663) (Matthieu Casanova)
-
-- The shortcuts were not working in the file chooser dialog table
- because the filename field was always requesting the focus.
- (Matthieu Casanova)
-
-- When assigning escape shortcut to close-docking-area, it didn't work in the
- hypersearch result panel because the JTree has the focus, and "escape"
- keypress is assigned to "hideTip" action by the Swing framework. I removed
- this default assignment because nobody care hiding tooltips (#1955140)
- (Matthieu Casanova)
-
-- When the parent directory list is selected in the VFSBrowser, the selected
- files were always empty (Matthieu Casanova)
-
-- when opening the save dialog, if the choosen path's VFS is not browseable,
- the default directory is opened instead (Matthieu Casanova)
-
-- Better field control on Appearance and Saving & backups option panes
- (#2015210) (Matthieu Casanova)
-
-}}}
-{{{ Miscellaneous
-
-- In the auto-indent code, use read-only "CharSequence" instances to avoid
- creating new strings (which results in a copy of the original data). This
- should reduce a little the memory usage of that code. Also change some other
- code that can avoid the user of strings (such as the word completion action).
- (Marcelo Vanzin)
-
-- New status bar ErrorWidget added to display the 10 last exceptions that
- happened in jEdit (Matthieu Casanova)
-
-- Toolbar and context menu can now be restored to default setting
- (Seph M. Soliman - #1961989)
-
-- New BufferSet api. The EditPanes can now manage their own list of buffers,
- or share this list with the editpanes from the same view, and of course as
- usual share the same list between all EditPanes (the default behavior)
- A bufferSet widget is available for the status bar
- (Matthieu Casanova)
-
-- New text macro "Line_Filter.bsh" added. It can filter the lines of a buffer
- to remove the lines that match or do not match a char sequence (patch #1981501)
- (Robert Schwenn)
-
-- New Mac OS X application icon (Seph M. Soliman)
-
-- The plain view can now have a status bar, a new option is added to choose it
- in the status bar option pane, and a new toggle menu is added to show/hide
- status bar in view menu (#1984974) (Matthieu Casanova)
-
-- New images for splash screen and about dialog to match the new visual feel
- (Seph M. Soliman)
-
-- New option to make the caret thicker. (SF.net Patch #1608486 - Nils Nordman)
-
-}}}
-{{{ Editing
-
-- SF Patch #1947143: remove the hack to support sub names with apostrophes in
- perl mode. Hopefully no one will complain (the hack had its own problems,
- as the SF entry shows). (Marcelo Vanzin)
-
-- PHP mode:
- - add new ruleset PHP_EXPRESSION to handle separate expressions better,
- e.g. new support for constructs like "$a->{'bar-'.substr($b,1)}"
- - handle function definitions (DEF_FUNCTION* rulesets), e.g.
- "function foo( array $bar = null )"
- - handle var-vars (e.g. $$foo)
- - stricter, consistent matching of variable names
- - other minor fixes/improvements
-
-- Fix word separators in LaTeX mode (SF #1982712)
-
-- Added "initialize" as a keyword in ruby mode.
- (SF.net Patch #1783765 - Suraj Kurapati)
-
-}}}
-{{{ API Changes
-
-- Deprecated com.microstar XML parser. (Alan Ezust)
-
-- New DynamicContextMenuService allowing plugins to offer actions in the
- TextArea contextmenu that depend on the state of the textarea. (Alan Ezust, Dale Anson)
-
-- New methods were added to jEditBuffer to return CharSequence instead of
- String. StandardUtilities / TextUtilities were enhanced to provide functions
- that are not present in the CharSequence class, or were only available for
- Strings before. (Marcelo Vanzin)
-
-- Removed deprecated CaretChanging message, which was never in jEdit 4.2 anyway.
-
-- Added new EBMessage, PositionChanging, base class for BufferChanging,
- for navigable position changes within the same buffer. Replaces CaretChanging.
- Search - FindNext sends it before finding next. (Alan Ezust)
-
-- Deprecated a constructor of SegmentCharSequence which has reverse flag,
- in favor of a new class ReverseCharSequence. (Kazutoshi Satoda)
-
-- SearchDialog.preloadSearchDialog(View) is now completely removed after being
- deprecated for 2 years (Matthieu Casanova)
-
-- Removed an undesired dependency to jEdit from buffer.UndoManager which
- breaks independant textarea. (Kazutoshi Satoda)
-
-- New NumericTextField class. It is a TextField that accept only numeric values
- (Matthieu Casanova)
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre14
-
-Thanks to Björn "Vampire" Kautler, Seph M. Soliman, Dale Anson, elvez671
-Alan Ezust, Andrey Khalyavin, Chris Petersen, Marcelo Vanzin, Joerg Spieler,
-Michael Schlotter, and Kazutoshi Satoda for contributing to this release.
-
-{{{ Bug Fixes
-
-- SearchBar appear/disapper fixes (# 1894235 - elvez671) - addresses
- bug # 1887293
-
-- Fixed NPE with tokenMarker in jEditBuffer.java (Ezust)
-
-- Reworked fold expansions [patch #1945472], which addresses #1942313
- and #1538715 (Andrey Khalyavin)
-
-- Fixed NPE on SplashScreen init on NX and older X-window displays.
- (#1628432, #1930320 - ezust, marcelo vanzin).
-
-- Fixed an ArrayIndexOutOfBoundsException when opening search dialog on a fresh
- install (#1913979) (Matthieu Casanova)
-
-- When a digit is typed for a completion popup to select a completion,
- the digit was inserted after the completed word.
- (SF.net Bug #1931333 - Kazutoshi Satoda)
-
-- SF Bug #1873290: perl heredoc syntax highlighting is broken
- Thanks to Valeri Mytinski for pointing out that it was fixable with the
- current code. :-) The mode parser wasn't honoring AT_LINE_START for end
- tags, so that is fixed. Also, add AT_LINE_START="TRUE" to the perl and
- shellscript heredoc rules' END tags. (Marcelo Vanzin)
-
-- When typing quickly in the activity logs filter, some exceptions were happening
- (patch #1938174) (Dale Anson)
-
-}}}
-{{{ Miscellaneous
-
-- Edit History Text
- Clicking on "Previously Entered Strings" pops up a dialog that lets you
- edit previously entered strings (Joerg Spieler - 1818140)
-
-- New Tango icon set (Seph M. Soliman - # 1755992)
-
-- Change the behavior of the directory chooser dialog slightly.
- (SF Bug #1932733 - Marcelo Vanzin)
-
-- When a file could not be loaded due to strict error about encoding,
- the file is now loaded permissively. (Kazutoshi Satoda)
-
-}}}
-{{{ Editing
-
-- Move_Lines_(Up|Down).bsh replaced by Dale Anson to handle edge conditions
- (#1915824)
-
-- fortran.xml indentation fixed (patch # 1740179 - honestguvnor + Robert Schwenn)
-
-- Rewritten latex.xml mode (Patch # 1928855 - Michael Schlotter)
-
-- SF Patch #1845842: perl.xml qq([test) syntax higlighting broken
- The q and qr operators were being highlighted wrong. The right way to do it
- is kinda messy, though, requiring a separate delegate depending on which
- character was used to start the quoted sequence. Applied patch is very
- similar to one in SF.net, with fixes for handling escaped characters
- correctly. (Chris Petersen, Marcelo Vanzin)
-
-- Comments and literals are now filtered before matching with regexps in
- indentNextLines, indentNextLine, unindentThisLine, and unindentNextLines.
- COMMENT(1-4) tokens are replaced by space so that they are ignored by
- autoindenting. Similarly, LITERAL(1-4) tokens are replaced by '0' which
- which means a simple integer literal in most programming languages.
- (Kazutoshi Satoda - SF.net Patch #1868690)
-
-- Tweaks to deep indent: ignore anything inside comments and literals, so
- alignment is only appied to actual code. Also, deep indent rules, if enabled,
- should have precedence over the open/close bracket rules. (Marcelo Vanzin)
-
-- SF Bug #1927869: Perl edit mode: qr/"/ breaks highlighting
- If was not really qr/"/, but qr!"!. Added "!" to list of allowed characters
- to delimit quote operators. (Marcelo Vanzin)
-
-}}}
-{{{ API Changes
-
-- New status bar api (Matthieu Casanova)
-
-- Added a method getPermissiveTextReader() to the interface
- org.gjt.sp.jedit.io.Encoding. (Kazutoshi Satoda)
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre13
-
-Thanks to Björn "Vampire" Kautler, Matthieu Casanova, xlinuks,
-Kazutoshi Satoda, Alan Ezust, Marcelo Vanzin, Jeff Robertson, Jim Morris
-Eric Le Lay, zoniie, and Daniel Hahler for contributing to this release.
-
-{{{ Bug Fixes
-
-- After some keystroke like alt+tab the numpad stopped working until another
- printable key is pressed (#1788460) (Matthieu Casanova)
-
-- Windows installer now look for javaw.exe in SysWOW64 directory before
- in System32. This is required on 64-bit Windows XP and Sun's
- JRE(1.6.0u3) though 64-bit package is installed. Nothing is changed on
- 32-bit environment because it doesn't have SysWOW64 directory.
- (Kazutoshi Satoda - SF.net Bug #1849762)
-
-- Installer kills jEdit before installing (Eric Le Lay - # 2328002, 1953252)
-
-- If the autosave file path do not exists, it is ignored silently. As soon as
- this path exists again it will work as it should (#1825720) (Kazutoshi Satoda)
-
-- (Mac OS X only?) Fixed a focus problem with Unsaved Changes dialog.
- Textarea had focus when the dialog pop up.
- (Jeff Robertson - SF.net Bug #1779849, Patch #1852805)
-
-- Files Changed on Disk dialog moved focus to textarea when a file is
- selected in the list. (Kazutoshi Satoda)
-
-- A NPE fixed when creating and clearing a register quickly in a macro if the
- Registers view is open (Matthieu Casanova)
-
-- When clearing a register, the listeners are now notified (Matthieu Casanova)
-
-- If you delete a plugin, the plugins that depends on will be unloaded (after a
- confirmation) (Matthieu Casanova)
-
-- Column cursor (zero width rectangular selection) is now kept after
- completion. Only the built in word completion (C+b by default) is
- changed. Other completions provided by some plugins are not changed.
- (Kazutoshi Satoda - SF.net Bug #1866836)
-
-- Fixed a bug where screens were shown off-screen because of a typo in
- GUIUtilities.adjustForScreenBounds() (Björn "Vampire" Kautler)
-
-- In the replace dialog, the replace string can now use capturing groups above 9
- (#1834620) (Matthieu Casanova)
-
-- Electric scrolling done where it should not (#1906301 - zoniie)
-
-- untitled buffer were not closed with 2 views (#1869978) (Matthieu Casanova)
-
-- When closing a dockable panel, the DockableWindowUpdate.DEACTIVATED message is
- sent (#1075058) (Matthieu Casanova)
-
-- ScrollLineCount was not calculated correctly (#1906288, #1868923)
- (Matthieu Casanova)
-}}}
-{{{ Miscellaneous
-
-- In a directory search, if you use a regex, it is tested before, before listing
- files (#1556663) Matthieu Casanova
-
-- Bugfixes for Installer related to obsolete JVMs and invalid
- pathnames. (Eric Le Layk - # 2327864, 979086, 2327736,
- 1817421, 2582492, 2328160)
-
-- Installer for *nix platforms - simplified startup script
- (#2098720 - Bernhard Walle)
-
-- Center Caret On Screen now scrolls your document so your caret doesn't
- change. [ 1883809 - ezust ]
-
-- [About jEdit] dialog is refined. It now performs smoother animation
- and fade out effect. (xlinuks)
-
-- [Macros] Copying/cutting/moving/duplicating multiple vs. single lines
- [ 1849180 - encorejane ]
- renamed Move_Line_(Down|Up) to Move_Lines_$1,
- renamed (Copy|Cut)_Selection_Or_Line to $1_Lines
- new macros: Duplicate_Lines_(Above|Below)
-
-- The VFS Browser has a new command to paste a file.
- After copying the path name of a file, you can paste it in any folder to
- copy the file (Matthieu Casanova)
-
-- When opening the search dialog if no text is selected the searched string will
- be filled with the previous entered string (feature #1500938) (Matthieu Casanova)
-
-- The Activity Log option panel now have a textfield filter
- (feature #1593375) (Matthieu Casanova)
-
-- In the plugin manager, a new panel shows detailed informations about the
- installed plugins (Matthieu Casanova)
-}}}
-{{{ Editing
-
-- SF Bug #1853797: perl syntax highlighting: broken '\' after var interpolation
- The rule for matching literals was wrongly highlighting perl variables.
- Fix is to use the same rule used in the main rule set to match those
- variables. (Marcelo Vanzin)
-
-- Handling of /regexp/ in ruby mode is refined. (Kazutoshi Satoda)
-
- NOTE: If a regexp begins with a whitespace (including a newline), the
- beginning "/" is wrongly treated as a division operator. But such regexp
- is rare enough and one can use %r notations or write like "/\ ..." to
- force jEdit to treat it as a regexp.
-
-- Added macro Files/Duplicate_Buffer.bsh
- It copies the current buffer in a new untitled buffer
- (Request #1849184) (Matthieu Casanova)
-
-- Added macro Clipboard/Paste_Indent.bsh that paste and indent the clipboard
- (Request #1827083) (Matthieu Casanova)
-
-- Improved auto indentation in Ruby edit mode. It now unindents things
- like else, end, require etc on the fly.
- (SF.net patch #1726646 - Jim Morris and Kazutoshi Satoda)
-
-- Improved PHP edit mode (Daniel Hahler):
- - handle "${foo}" (SF Bug 1818619) and other valid expressions in literal,
- backticks and heredoc blocks
- - fix comment props for HTML in TAGS ruleset (C-e C-c/range-comment uses
- proper comment syntax there now)
- - fix delegating back from various rulesets (OBJECT_PHP, ...) to PHP
- ruleset; includes fixed handling of comments
- - fix matching of PHP vars (using SEQ_REGEXP instead of MATCH_FOLLOWING),
- so that it does not match "$foo\" completely; now uses the exact regexp
- for valid variable names
- - add ruleset PHP_COMMENTS (re-factored)
-
-- tpl mode: delegate {php} tags to PHP mode (Daniel Hahler)
-
-- Added regex highlight in javascript mode (#1042013) (Matthieu Casanova)
-
-- assembly-mcs51 mode was missing in the catalog (#1887865) (Matthieu Casanova)
-
-- transact-sql (tsql) mode: Fix escaping in string literals (#1007881) and
- highlight identifiers (`foo`) as LITERAL2 (Daniel Hahler)
-}}}
-{{{ API Changes
-
-- Moved gnu.regexp out of jedit core and into the GNURegexp plugin.
-
-- Added class AbstractContextOptionPane for plugins which want to provide a
- panel similar to jEdit's context menu editor. The API is sort of restrictive
- right now, but can be enhanced later, if needed. (Marcelo Vanzin)
-
-- Added a new method View#setBuffer(Buffer, boolean, boolean). The third
- parameter "focus" specifies whether the textarea should request focus.
- (Jeff Robertson - SF.net Patch #1852805)
-
-- Added a new method View#showBuffer(Buffer), which is similer with
- goToBuffer() but doesn't move focus to the textarea.
- (Kazutoshi Satoda, based on Jeff Robertson's patch #1852805)
-
-- Some improvements are made in CompletionPopup.
- - Eliminated possibe undesired effects of setKeyEventInterceptor()
- while the popup is not shown yet or already disposed.
- - KeyEvents which are not consumed in keyTyped() now work as if they
- were passed to View.
- - Added a new constructor which does not require a position.
- (Kazutoshi Satoda)
-
-- Added org.gjt.sp.util.SyntaxUtilities that will contains some syntax methods
- most of them comes from GUIUtilities
- (Matthieu Casanova)
-
-- A new interface JEditVisitor is added and implements the pattern Visitor.
- It can visit the views, edit panes and textareas using the method
- jEdit.visit(JEditVisitor) or View.visit(JEditVisitor) (Matthieu Casanova)
-
-- New FilteredListModel class that helps creating a filtered JList
- (Matthieu Casanova)
-}}}
-
-}}}
-
-{{{ Version 4.3pre12
-
-Thanks to Björn "Vampire" Kautler, Joe Walp, Matthieu Casanova,
-Marcelo Vanzin and Daniel Hahler for contributing to this release.
-
-{{{ Bug Fixes
-
-- When removing a plugin that is not loaded, it's declared jars are now removed
- too (Matthieu Casanova)
-
-- jEdit will not crash anymore if a beanshell.jar is already in the classpath
- (#893349) (Matthieu Casanova)
-
-- The BufferHistory is now thread safe (#1808797) (Matthieu Casanova)
-
-- Parsing XML files now uses correct encoding (which is declared in its
- source or UTF-8 by default) instead of the system default encoding.
- (Kazutoshi Satoda)
-
- NOTE: Related to this fix, some XML files which are saved by older jEdit
- may not be correctly loaded. They used the system default encoding and
- didn't declare the encoding (meaning they should use UTF-8). recent.xml,
- perspective.xml and registers.xml are known (and fixed).
-
-- Changed the encodings of recent.xml, perspective.xml and registers.xml
- to UTF-8 to allow characters which are not covered by the system default
- encoding in them. (Kazutoshi Satoda)
-
-- SF Bug #1764090: Slight Error in jedit.desktop file
- There was actually an error in jEdit.java that caused it to hit an
- NPE when processing URLs provided in the command line. Fix it by not
- trying to find an open buffer when trying to parse an URL in the
- openFile() method. (Marcelo Vanzin)
-
-- SF Bug #1729313: BeanShell Error on Loading jEdit 4.3pre9
- We need to force the default encoding to UTF-8 when running startup scripts,
- otherwise jEdit will fail to run the scripts shiped with it. On the flip
- side, if the user wants to use a different (non-compatible) encoding that
- is not trivially detected (such as anything with a BOM), a buffer-local
- property defining the encoding should be provided. (Marcelo Vanzin)
-
-- registers.dtd now allow zero ENTRY element in ENTRIES. It required at
- least one ENTRY while jEdit creates zero ENTRY case in registers.xml.
- (Kazutoshi Satoda)
-
-- Fix escape handling in the syntax highlighter. The handling of escape rules
- is now much more simplified: it's not only a lot less code but it's much
- easier to understand what it's actually doing. This fixes the following
- bugs: 1812205, 1807549, 1760646 and 1600458 (although the last one is fixed
- as a side effect, not because the root cause of the bug was fixed.)
- (Marcelo Vanzin)
-
-- Binding simple "+" (not VK_ADD nor VK_PLUS) as a shortcut is now possible.
- (SF.net Bug #1166530 - Kazutoshi Satoda)
-
-- Windows installer now prefer the path of javaw.exe in system directory
- to JDK/JRE directory, which was dependant on Java's version. Now you can
- update Java without reinstalling jEdit.
- (SF.net bug #1227497 - Kazutoshi Satoda)
-
-- Manually changed edit mode was reset by the mode in recent files at
- saving the buffer. (Kazutoshi Satoda)
-
-- Explicit "mode" value in props for jEdit.openFile() or
- jEdit.openTemporary() was overwritten by the mode in recent files.
- (Kazutoshi Satoda)
-
-}}}
-{{{ Miscellaneous
-
-- After an hypersearch, if a result is on the caret line, it is automatically selected
- in the tree (Matthieu Casanova)
-
-- If you remove the last node of the HyperSearch dockable, it will hide
- (Feature Request #1593526) (Matthieu Casanova)
-
-- A new option introduced in Saving & backups option panel to turn off autosave
- of untitled buffers (Feature Request #1520769) (Matthieu Casanova)
-
-- New option in General Options: Check for File Change upon. Many options
- to customize when jEdit checks for file changes, especially useful when many
- files are mounted on remote/slow file systems. (Joe Walp - Patch # 1768638)
-
-- A new button is introduced in the plugin manager : "Find Orphans".
- It will find the jars that are in your jars directory and do not belong to any
- plugin. Be careful some plugins like SQL can use jars without declaring them
- like the JDBC drivers (Matthieu Casanova)
-
-- A new option is introduced in the general option panel. Now jEdit will ask
- the user if he wants to stop hypersearch if a result count limit is reached.
- By default the count is 1000. It checks the limit before each file so it is
- possible that a few more results are found before asking (Matthieu Casanova)
-
-- The release date in the plugin install panel is now aligned to the right (Matthieu Casanova)
-}}}
-{{{ Editing
-
-- Some enhancements to the IDL mode, and made some definitions in the C mode
- more reusable. (Marcelo Vanzin)
-
-- NO_ESCAPE is now deprecated and ignored by the parsing engine. ESCAPE is now
- a valid attribute for SPAN and SPAN_REGEXP rules. All mode files updated to
- follow the new escape rule semantics. (Marcelo Vanzin)
-
-- Use MARKUP for tags in HTML mode and delegate css "style" attributes to the
- CSS mode. (Daniel Hahler - Patch # 1783634)
-
-- Improved ml mode. (Lucas Dixon - Patch # 1834109)
-
-}}}
-{{{ API Changes
-
-- The bsh package was refactored to org.gjt.sp.jedit.bsh, all plugins that uses
- classes from this package will have to be repaired. This was necessary to fix
- bug (893349) (Matthieu Casanova)
-
-- A new GUIUtilities.listConfirm() method that returns also the selected items
- in the list (Matthieu Casanova)
-
-- JEditBuffer.undo() and JEditBuffer.redo() now takes a
- org.gjt.sp.jedit.textarea.TextArea as parameter (Matthieu Casanova)
-
-- Cleaned up org.gjt.sp.jedit.buffer.KillRing to improve independence
- from jEdit's core. This narrowed a few parts of API. This can break
- some existing macros or plugins.
- - It no longer has any protected data field. Use public or protected
- methods including a new protected method reset() instead.
- - KillRing.KillRingHandler was removed because it should be a part
- of the core which does save the killring into a XML file. It
- became a private part of the core.
- (Kazutoshi Satoda)
-
-- Dropped some concrete classes from API. They are just implementation
- details of the core. Use more abstract base classes or interfaces
- instead.
- - org.gjt.sp.jedit.bufferio.JEditKillRing
- -> org.gjt.sp.jedit.buffer.KillRing
- - org.gjt.sp.jedit.JEditMode
- -> org.gjt.sp.jedit.Mode
- - org.gjt.sp.jedit.JEditRegisterSaver
- -> org.gjt.sp.jedit.RegisterSaver
- - org.gjt.sp.jedit.JEditRegistersListener
- -> org.gjt.sp.jedit.RegistersListener
- (Kazutoshi Satoda)
-
-- Added a new method ModeProvider.getModeForFile() that will try to find an
- appropriate mode for a filename (Matthieu Casanova)
-
-- Added a new method EditPane.initPainter() that can be used when using a
- TextArea in the core or a plugin (Matthieu Casanova)
-
-- Added a new method GUIUtilities.getShortcutLabel() that makes a label
- string to show users what shortcut are assigned to an action.
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre11
-
-Thanks to Matthieu Casanova, Kazutoshi Satoda, Shlomy Reinstein,
-Björn "Vampire" Kautler, Marcelo Vanzin, Daniel Hahler, strank, Adam Sawicki,
-Scott LeBaron, Seph M. Soliman, Joerg Spieler, Alan Ezust, xlinuks,
-Orhan Alkan and Krassimir Berov
-for contributing to this release.
-
-{{{ Bug Fixes
-
-- NPE in scroll code when deleting some content with no wrap but some
- closed folds (#1763932) (Matthieu Casanova)
-
-- If the cached plugin list xml is broken, it is deleted and reloaded
- (Matthieu Casanova)
-
-- Fixed a bug when calling a macro during macro recording (#1765738)
- (Matthieu Casanova)
-
-- When removing content in a buffer when having softwrap on a NPE was
- happenning in some case (#1775258) (Matthieu Casanova)
-
-- When changing download mirror, the plugin list cache was not refreshed
- (Matthieu Casanova)
-
-- Reload/ReloadAll now ignores buffers with the UNTITLED flag set (instead
- of NEW_FILE). (#1720572) (Matthieu Casanova)
-
-- SF Bug #1760646: perl colorization
- Escape rules for child rule sets were being ignored. Since the perl mode
- doesn't define a top-level escape char, escaped sequences inside strings
- were not being properly recognized. Fix looks for the contextual escape
- rule before trying to delegate to the parent's escape rule. (Marcelo Vanzin)
-
-- Explicit folds are now expanded when deleting the '{' at the fold start
- (#1193683) (Matthieu Casanova)
-
-- Folds are now expanded when inserting new line at the fold start,
- and when breaking explicit fold start (#950961) (Matthieu Casanova)
-
-- The format-paragraph action was not recorded in macros (#1726207)
- (Matthieu Casanova)
-
-- Changed the encoding of "history" file to UTF-8.
- (SF.net Bug #1691638 - Kazutoshi Satoda)
-
-- Fixed ArrayOutOfBoundsException when adding explicit fold at the end of
- a buffer with a mode that has a "line comment" property (#1560584)
- (Matthieu Casanova)
-
-- 1755430 - HistoryTextField looks bad with native GTK+ LnF (Seph M. Soliman)
-
-- SF Bug #1742250: use of DELEGATE in mode rules can cause rules to be
- missing. (Daniel Hahler)
-
-- Failure of autosave which was silently ignored is now handled and reported.
- (SF.net Bug #1775281 - Kazutoshi Satoda)
-
-- IllegalCharsetNameException was not handled. It could be thrown for XML
- encoding declaration or [Reload with Encoding] action. (Kazutoshi Satoda)
- (This bug was reported by Andre Rudlaff as SF.net Patch #1789707)
-
-- Removed hard coded "C:\Program Files" from Java based installer. It now
- uses %ProgramFiles% (a builin environment variable) instead.
- (SF.net Bug #917669 - Kazutoshi Satoda)
-
-- Changed the default mirror from NONE to switch.
- (bug #1757229) (Björn "Vampire" Kautler)
-
-- Fixed the "Evaluate Buffer in BeanShell" macro so that it does what its
- description states, that is evaluating the buffer in current state. Before
- the macro used the last saved state. Additionally the result of the toString()
- method of the return value of the scirpt, if any, is added to the newly
- created buffer in a new line. (bug #1554769) (Björn "Vampire" Kautler)
-
-- Fixed inconsistent indentation which happened when adjacent lines both
- match with "unindentThisLine" pattern and they should be placed at first
- column. (Kazutoshi Satoda)
-
-- Dropping files was broken when using Gnome Nautilus (patch #1795592)
- (xlinuks)
-
-}}}
-{{{ Miscellaneous
-
-- ViewUpdate.CLOSED is now sent for all views. Previously, the view from where
- the exit request originated would fail to send a ViewUpdate.CLOSED message.
- (Marcelo Vanzin)
-
-- New Interface: DockableWindow.java, an interface for jEdit dockable windows.
-
-- When clearing all hypersearch results the HyperSearch Results dockable panel
- will hide (feature #1593526) (Matthieu Casanova)
-
-- The release note of the plugins in the PluginManager install panel now displays
- html (Matthieu Casanova)
-
-- PluginManager InstallPanel: All columns are sortable in either directions (#1781853 - Joerg Spieler)
-
-- When dropping a directory on the textarea, the VFSBrowser will now browse to it
- (Matthieu Casanova)
-
-- A new action "edit-syntax-style" that opens a dialog to change the token
- under the caret (patch #1788847) (Shlomy Reinstein)
-
-- The plugin install panel now has a sortable column containing the release date
- of the plugin (Matthieu Casanova)
-
-- When editing toolbar the dialog now remembers the last action set
- (#1538743) (Matthieu Casanova)
-
-- The shortcuts option panel now have a textfield filter
- (Matthieu Casanova, Shlomy Reinstein)
-
-- The recent files now remembers the edit mode (feature #1593543)
- (Matthieu Casanova)
-
-- The Deb Ant Task now works with Ant 1.7 too. (Björn "Vampire" Kautler)
-
-}}}
-{{{ Editing
-
-- Improvements to PHP edit mode (patch #1740618, bugs #1716134, #1504855)
- (Daniel Hahler)
-
-- Added RFC edit mode (Matthieu Casanova)
-
-- reST mode: improved handling of comments and literal blocks (SF: #1748471)
- (strank)
-
-- Added HLSL edit mode (SF: #1724921) (Adam Sawicki)
-
-- Added CLIPS edit mode (SF: #1745999) (Orhan Alkan)
-
-- Added Template Toolkit edit mode (SF: #1738800) (Krassimir Berov)
-
-- Added macros Editing/Open_Line_(Above|Below).bsh (Scott LeBaron) (sf: 1746798)
-
-- Added "self" keyword in python edit mode (Matthieu Casanova)
-
-- Added the "indent" properties to pl-sql edit mode (Matthieu Casanova)
-
-}}}
-{{{ API Changes
-
-- new class: org.gjt.sp.jedit.msg.VFSPathSelected EBMessage gets sent
- whenever a node in the VFSBrowser is clicked. (#1730075 - Alan Ezust)
-
-- org.gjt.sp.jedit.gui.CompletionPopup has been extracted to provide basic
- UI of word completion. (SF.net patch #1752044 - Kazutoshi Satoda).
-
-- org.gjt.sp.jedit.io.VFS.BROWSE_CAP is not deprecated anymore and browseable
- VFS must define this property (Matthieu Casanova)
-
-- A new boolean attribute, 'MOVABLE', can now be specified for <DOCKABLE> tags
- in the 'dockables.xml' file. (1782091 - Shlomy Reinstein)
-
-- A new interface, DockableWindow, is introduced for MOVABLE dockable windows to
- be notified before their docking position is changed. (1782091 - Shlomy Reinstein)
-
-- The BufferListener has a new method preContentInserted() (Matthieu Casanova)
-
-- New FilteredTableModel class that helps creating a filtered JTable
- (Matthieu Casanova, Shlomy Reinstein)
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre10
-
-Thanks to Björn "Vampire" Kautler, Alan Ezust, Jakub Roztocil,
-Matthieu Casanova, Nicholas O'Leary, Marcelo Vanzin, Kazutoshi Satoda,
-Joseph Erickson, David Moss, Horst Eff, Daniel Hahler, Stephen Co,
-Shlomy Reinstein, Daniel Johnson, javacorner, Chris Grindstaff,
-and Mike Gorski for contributing to this release.
-
-{{{ Bug Fixes
-
-- On windows the read-only flag on folders is ignored now for finding
- the two-stage save name because it has not write protecting function
- in windows. (bug #1719711) (Björn "Vampire" Kautler)
-
-- Menu Shorcuts are displayed with the L&F font now if one is
- present for accelerator keys. (patch #1733221) (Daniel Johnson)
-
-- Memory leak in jEdit.closeView() fixed (Chris Grindstaff).
-
-- typing in multiple select works now. (#1724940) (Shlomy Reinstein)
-
-- When clicking on an hypersearch result, if the buffer was not opened,
- the BufferUpdate.LOADED message was sent with a null view
- (patch 1744674) (Shlomy Reinstein)
-
-- 1592085 - Now able to abort collection of files for search in directory
- (Alan Ezust)
-
-- A minor bug of cursor changing when dragging dockable panels
- using non continuous layout (Matthieu Casanova)
-
-- special characters in file:// URLs passed on to jEdit.openFile()
- were not being properly decoded (1663617).
-
-- Gutter line number interval highlighting corrected
- when used with soft wrap (patch 1687147 - Stephen Co).
-
-- 1667659 - Fix for FTP I/O regression in 4.3pre9 (Kazutoshi Satoda)
-
-- HyperSearch Results does not lose focus on enter (Bug 1260023,
- Patch 1646058) (Kazutoshi Satoda)
-
-- Improved handling of file encoding (patch 1687684) (Kazutoshi Satoda)
-
-- Use encoding in buffer histories for temporary buffers (Patch
- 1687284) (Kazutoshi Satoda)
-
-- In the logviewer if the tail checkbox is on,
- the last line was not visible after resizing the panel
- (Matthieu Casanova)
-
-- Autoreload buffer without notification was not available in
- General option pane (bug #1641997) (Matthieu Casanova)
-
-- When saving a buffer, if the encoding is unsupported,
- an error dialog appears (Matthieu Casanova)
-
-- A bug when loading a plugin the dependency check had errors :
- for example when you have Sidekick, JavaSidekick and another plugin
- that requires Sidekick (PHPParser, XML ...)
- in your jar folder, all unloaded, try to load the third one,
- the dependency check will try to load JavaSidekick instead of
- Sidekick (Matthieu Casanova)
-
-- VFSBrowser.filesActivated() - passed proper View to jEdit.openFile()
- from FSB open action (Alan Ezust).
-
-- jEdit shell scripts and batch files didn't handle spaces
- in filenames (#1649695) (Björn "Vampire" Kautler)
-
-- Macro Single_Space_Buffer was broken (#1525313) (Matthieu Casanova)
-
-- Scrolling up broken after content removing (#1584436) (Matthieu Casanova)
-
-- SF Patch #1663901: Improve performance in TokenMarker.handleRule()
- Daniel Hahler reported that jProfiler found some unoptimized code in
- TokenMarker.handleRule(). Instead of applying his patch directly, I
- implemented another approach and also took care of the other case
- of allocating a new string to do a comparison. (Marcelo Vanzin)
-
-- SF Patch #1656225: Disable encoding auto detection which overrides a selection
- When reloading a file with a specific encoding or changing the encoding in
- the buffer options, disable encoding auto-detection for the buffer.
- (Kazutoshi Satoda)
-
-- SF Bug #1664900: Auto-indent breaks if previous line is a single line indent
- The "collapse" action used as a hint for the OpenBracketIndentRule needs to
- differentiate between the actions being triggered by code in the previous
- line or by code in the "previous previous" line. This way, for example, a
- "for" declared after an "if" that didn't use brackets will, correctly, not
- be indented one level below the if. See the bug for more "graphical"
- depictions. (Marcelo Vanzin)
-
-- Some bugfixes and improvements to ExtendedGridLayout. (Björn "Vampire" Kautler)
-
-- Fixed that files were shown in VFSBrowser in choose directory mode.
- (Björn "Vampire" Kautler)
-
-- Saving a buffer to another VFS was not working (some bugs with markers)
- (bug #1644479) (Matthieu Casanova)
-
-- SF Bug #1668893: Wrong conversion to UTF-16 (with BOM)
- A previous change of mine trying to fix another UTF-16 issue actually
- implemented the reverse of what the spec says: UTF-16LE and UTF-16BE don't
- have a BOM, while UTF-16 needs a BOM at the start. (Marcelo Vanzin)
-
-- SF Patch #1649033: Correct the focus after choosing the directory to search
- Focus the search dialog after choosing the search directory, instead of
- focusing the view. (Kazutoshi Satoda)
-
-- Fixed a problem with escape sequences where a delegate has the same as
- its parent and so the parents got overridden and was not able to
- escape the delegates end sequence. (bug #1630805) (Björn "Vampire" Kautler)
-
-- Correctly send a ViewUpdate.ACTIVATED message when the user closes a view
- and focuses the first opened view. (Marcelo Vanzin)
-
-- Fixed deep indent : now the deep indent works with the chars found in
- unalignedOpenBrackets property of the edit mode, and the matching
- end char is automatically set. (bug #1666815) (Matthieu Casanova)
-
-- Brackets in comments or literals (in terms of token types in edit mode)
- are now ignored for indent. (SF.net bugs #747769, #1229283, #1592989)
- (Kazutoshi Satoda)
-
-- Encodings option pane rewritten using a JCheckBoxList, fixed the too small
- scroll amount and enabled/disabled the buttons where appropriate.
- (bug #1540578) (Björn "Vampire" Kautler)
-
-}}}
-{{{ Miscellaneous
-
-- Plugin Manager: persistent Plugin Install Sets (1748509 - Alan Ezust)
-
-- Plugin Manager: Option to cache PluginList for a period of minutes
- (Alan Ezust)
-
-- Moved Encodings options out of General and into Encodings option pane.
-
-- New View option: amount of maximum visible rows in buffer switcher
- (Patch #1642574) (Jakub Roztocil)
-
-- The dockable panel splitter can now use continuous layout
- (Matthieu Casanova)
-
-- The plugin manager now shows you the size of the data stored by
- each plugin that use the new plugin home folder (Matthieu Casanova)
-
-- GeneralOptionPane - new checkbox (restore remote files on startup)
- (Alan Ezust)
-
-- New popup menu in the plugin manager to remove plugin data when
- the plugin uses the new plugin api (Matthieu Casanova)
-
-- New LayoutManager ExtendedGridLayout added. For further explanations see
- its JavaDoc. (Björn "Vampire" Kautler)
-
-- New popup menu in Register dockable panel (Matthieu Casanova)
-
-- Removed the calls to begin- and endCompoundEdit() in macros as
- macroinvokations are always automatically embedded inside a compound
- edit. (Björn "Vampire" Kautler)
-
-- Refactored the use of hypersearch-results.file-caption and
- hypersearch-results.result-caption to only use one property instead of three
- depending on the amount of found occurrences. (Björn "Vampire" Kautler)
-
-- SF Patch #1678608: Improve performace in findMatchingBracket
- Return earlier if matching bracket is unknown. (Daniel Hahler)
-
-- Added the time in Log._log() so that events and exceptions could easier be
- assigned to interactions. (Björn "Vampire" Kautler)
-
-- SF Patch #1469586: Allow setting Mac OS type and creator to be optional
- Change to MacOS plugin. (Mike Gorski)
-
-- Some HelpViewer usability fixes. Now only one node is selectable in the TOC,
- Enter key opens the selected topic, on topic changing the focus travels to
- the JEditorPane and the arrow keys can be used to scroll horizontally and
- vertically instead of moving the invisible caret which scrolls only when
- the invisible caret hits page boundaries. Additionally the history remembers
- the vertical scroll position now. (Björn "Vampire" Kautler)
-
-- Added a new option "List of encoding autodetectors" in Encodings option pane
- to extend encoding autodetection with the new EncodingDetector services.
- (Kazutoshi Satoda)
-
-- Allow jEdit to autodetect :encoding= properties in the loaded buffer
- (only in the 10 first lines) by adding "buffer-local-property" to
- the new option "List of encoding autodetectors" in Encodings option pane.
- (Matthieu Casanova and Kazutoshi Satoda)
-
-- Improved the error message of encoding errors on saving. It now shows
- the first guilty character with column number, line number and the name
- of actual encoding. (Kazutoshi Satoda)
-
-- A new action on the popup menu in the Hypersearch dockable panel to redo the
- hypersearch (Matthieu Casanova)
-
-- When calling "line-comment" action, if the edit mode doesn't have a line
- comment property, the lines are surrounded by range comments
- (Matthieu Casanova)
-
-- SF Bug 1723506: Context menu key not functional on Windows
- There was no action to show the popup menu. Added one such action, and
- bound it to CONTEXT_MENU by default. (Marcelo Vanzin)
-
-- Added a new option "List of fallback encodings" in Encodings option pane
- to automate trial-and-error cycle with a known set of encodings to load
- a buffer. (Kazutoshi Satoda)
-
-- Glob translation to regexes got a new feature. If you start a glob now
- with the sequence "(re)" this prefix is discarded and the remaining
- string is interpreted unchanged as regex. If you need a glob starting
- with "(re)" you have to escape it and write "\(re)" instead. So now you
- can use EVERYWHERE a glob is expected a normal regex instead and use
- their full power. (Björn "Vampire" Kautler)
-
-}}}
-{{{ Editing
-
-- New Edit Mode: sql-loader (David Moss)
-
-- New edit mode: csv (jaco de groot).
-
-- Make the auto-indent code more friendly to languages where whitespace matters
- more than usual, such as Python. A new mode property (ignoreWhitespace) was
- added, which, when false, triggers some whitespace-related indent rules. Right
- now it's tuned to Python, since I'm not familiar with other languages that
- share the same characteristics. This also fixes SF bug #1382388. There are
- some cases when some weird behavior still happens, when deep indent is
- turned on. (Marcelo Vanzin)
-
-- Applied SF Patch #1663485: perl.xml patch for variables
-
-- Applied SF patch #1667234: clearer comments in certain parts of perl.xml
-
-- Change the way perl "quote operators" are matched. See SF Patch #1659666
- for discussion. The fix is twofold: first, add a new "special" value for the
- end tag in SPAN_REGEXP, "~[digit]", which tries to find the matching bracket
- of the matched reference (if can't find the matching bracket, just use the tag
- body as a literal string). Second, add a new rule that highlights everything
- as "LITERAL1", used to maintain balanced brackets, and use it to highlight
- everything inside a "q" operator. This probably needs more tweaking, i.e.,
- supporting quote operators that allow interpolation, and change the other
- operators that look like "q" (such as tr). (Marcelo Vanzin)
-
-- Added some support to EL and better css and javascript coloration
- in jsp.xml (Matthieu Casanova)
-
-- SF Patch #1666690: No Undo past file save option
- Add option to reset the "undos" when a buffer is saved. (Joseph Erickson)
-
-- SF Patch #1676041: "CamelHumps" words
- Add option to enable separating camel cased words when selecting with the
- keyboard. (Horst Eff)
-
-- New attribute "MATCH_TYPE" that substitutes "EXCLUDE_MATCH" in mode files,
- and code to handle it in the ParserRule and TokenMarker classes. This allows
- highlighting the matched region with a different type as the rest of the
- region the rule applies to; so, for example, it's possible to use
- MARK_PREVIOUS on "foobar(" and highlight the function name as "FUNCTION" and
- the parenthesis as "OPERATOR". There are two special values for the
- attribute: "DEFAULT" is the default type for the current rule set (same
- behavior as EXCLUDE_MATCH="TRUE"), and "RULE", the default value, is the same
- type as the current rule (same as EXCLUDE_MATCH="FALSE"). This is part 1 of
- the fix for SF Bug #1658252. (Marcelo Vanzin)
-
-- New mode for C, and refactored the C++ and Objective-C modes to take
- advantage of the new C mode. This is part 2 of the fix for
- SF Bug #1658252. (Kazutoshi Satoda and Marcelo Vanzin)
-
-- Added an option to deactivate that rectangular selection mode
- is active if Ctrl is pressed. (Björn "Vampire" Kautler)
-
-}}}
-{{{ API Changes
-
-- ReadWriteLock in org.gjt.sp.util is deprecated in favor
- of java.util.concurrent.locks.ReentrantReadWriteLock (1687268 - Kazutoshi Satoda).
-
-- VFS.isMarkersFileSupported() added to give a VFS the chance to tell
- jEdit that no markers file should be saved or loaded to/from this VFS.
- (Björn "Vampire" Kautler)
-
-- Deprecated VFS.showBrowseDialog() as it is not used in the jEdit core anymore,
- so it doesn't have to be provided anymore. (Björn "Vampire" Kautler)
-
-- Removed class VFSBrowser.PluginsMenuButton.ActionHandler as it isn't used
- anymore. (Björn "Vampire" Kautler)
-
-- New static methods EditPlugin.getPluginHome(Class<? extends EditPlugin>) and
- EditPlugin.getPluginHome(EditPlugin) that return the path where a plugin
- should store it's data. It can be null if running without settings.
- (Matthieu Casanova)
-
-- New static methods
- EditPlugin.getResourceAsStream(Class<? extends EditPlugin>,String) and
- EditPlugin.getResourceAsStream(EditPlugin,String) that return a stream on a
- file in the plugin home directory. It can be null if running without settings.
- (Matthieu Casanova)
-
-- New static methods
- EditPlugin.getResourceAsOutputStream(Class<? extends EditPlugin>,String) and
- EditPlugin.getResourceAsOutputStream(EditPlugin,String) that return
- a stream on a file in the plugin home directory.
- It can be null if running without settings. (Matthieu Casanova)
-
-- New static methods
- EditPlugin.getResourcePath(Class<? extends EditPlugin>,String) and
- EditPlugin.getResourcePath(EditPlugin,String) that return the path of a file
- in the plugin home directory. It can be null if running without settings.
- (Matthieu Casanova)
-
-- New method IOUtilities.fileLength() that computes a file or directory length.
- (Matthieu Casanova)
-
-- GUIUtilities.centerOnScreen() method is deprecated, use
- javax.swing.JWindow#setLocationRelativeTo(java.awt.Component) instead.
- (Matthieu Casanova)
-
-- plugin.className.files added as property for plugins. This property specifies
- external non-JAR files, e. g. libraries, which are in the jars directory.
- (Björn "Vampire" Kautler)
-
-- ParserRule.hashChar and ParserRule.hashChars have been removed, since they
- weren't used anywhere. (Marcelo Vanzin)
-
-- In Buffer.java, the private "mode" field was moved to JEditBuffer.java as
- a protected field. (Marcelo Vanzin)
-
-- New IndentRule (WhitespaceRule) and new indent action (NoIncrease)
- were added. (Marcelo Vanzin)
-
-- new method: SearchAndReplace.replaceAll(View,boolean) to do a replace all,
- but not open files that were not open before. (Björn "Vampire" Kautler)
-
-- Buffer.getMarkersPath(VFS) deprecated and replaced by static method
- Buffer.getMarkersPath(VFS,path), see bug #1644479 (Matthieu Casanova)
-
-- Added a new GUIUtilities.showVFSFileDialog() methods that can use a dialog
- or a Window as the browser's parent, instead of the view. (Kazutoshi Satoda)
-
-- Added two new builtin service interfaces org.gjt.sp.jedit.io.Encoding
- and org.gjt.sp.jedit.io.EncodingDetector. (Kazutoshi Satoda)
-
-- MiscUtilities.isBinary(Reader) is now deprecated in favor of a new
- method MiscUtilities.isBinary(InputStream). (Kazutoshi Satoda)
-
-- Added JEditTextArea.showPopupMenu(), which pops up the context menu
- at the current caret position.
-
-- For TextArea, userInput('\b') now behaves as backspace(), and
- userInput('\u007F') now behaves as delete(). See background of this
- change at SF.net patch #1692315. (Kazutoshi Satoda)
-
-- New method EditorExitRequested.cancelExit() that allows EBMessage listeners to
- cancel jEdit exit request (patch #1737563) (javacorner)
-}}}
-
-}}}
-
-{{{ Version 4.3pre9
-
-Thanks to Björn "Vampire" Kautler, Akber Choudhry, Matthieu Casanova
-Jean-Francois Larvoire, Martin Raspe, Kazutoshi Satoda, Alan Ezust, Marcelo
-Vanzin, and Nicholas O'Leary for contributing to this release.
-
-{{{ Bug Fixes
-
-- avoid NPE from getIndentRules (patch #1611766) (Kazutoshi Satoda)
-
-- bufferio operations are now exception-safe (patch #1597168) (Kazutoshi Satoda)
-
-- Encoding errors properly reported on save (patch #1601830) (Kazutoshi Satoda)
-
-- Filter Box lose focus bug (patch #1608948) (kuljc)
-
-- Fixed the broken quick copy behaviour (Björn "Vampire" Kautler)
-
-- Fixed the wrong text in SearchAndReplace Dialog (bug #1592529)
- (Björn "Vampire" Kautler)
-
-- Fixed wrong highlighting of multiline strings in cobol editmode
- (bug #785290) (Björn "Vampire" Kautler)
-
-- Plugins in plugins options are now sorted case-insentively
- (bug #1593410) (Matthieu Casanova)
-
-- Fixed the not resolved IMPORTs in IMPORTs (bug #1569735)
- (Björn "Vampire" Kautler)
-
-- Fix SF Bug #1596756: Annoying problem with file system browser in 4.3pre7
- When reopening the "recent" files on startup, a buffer might fail to
- load (because, e.g., it's on a FTP server and the user canceled the
- password dialog). So ignore the buffer if it's null when restoring the
- view. (Marcelo Vanzin)
-
-- Fix SF Bug #1590250: Bad EOF handling code in CBzip2InputStream
- The code seems to have other error handling problems, but at least
- now it doesn't compare a char to -1. It would be interesting to see
- what happens if we have a corrupted jar file... (Marcelo Vanzin)
-
-- Fix SF Bug #1571752: 'Add Explicit Fold' in PHP mode - wrong comments
- Be smarter when inserting explicit folds in mode boundaries by trying
- harder to use the comment characters for the mode of the text that
- is being wrapped. Also do some tweaking for when to insert new lines
- and when not to. (Marcelo Vanzin)
-
-- Fix SF Bug #1594910: Indentation of Javascript embedded in HTML is broken
- The fix is more generic than what the bug suggest. The indent rules
- were being kept locally by each buffer, and reflected the "top level"
- mode's rules. So rules for sections of the buffer that were delegated
- to other modes were ignored. The fix keeps the indent rules in the mode
- instance, and the buffers retrieve the context-sensitive rules when
- applying auto-indentation. (Marcelo Vanzin)
-
-- When deactivating a plugin if the VFS Browser was open but it's menubar
- disabled, a NPE occured (#1593392) (Matthieu Casanova)
-
-- Fixed a bug I introduced with the new HASH_CHAR handling
- (bug #1600380) (Björn "Vampire" Kautler)
-
-- Fixed another bug with the new HASH_CHAR handling
- (bug #1600401) (Björn "Vampire" Kautler)
-
-- Fixed precedence of Recent Files List caretposition over commandline
- supplied caret position (Björn "Vampire" Kautler)
-
-- SearchMatcher in SearchAndReplace cannot match empty Strings anymore
- (#1601718) (Matthieu Casanova)
-
-- If you use two stage save and your file is writeable but in a folder
- where you cannot write, a dialog will ask you if you want to save using
- normal method (#1609303) (Matthieu Casanova)
-
-- Fixed that ESCAPE sequence of RULES tag couldn't appear at the beginning
- of a rule. Now this is possible. Also added documentation about the
- ESCAPE attribute. (Björn "Vampire" Kautler)
-
-- Hypersearch now report occurences count and line count (#1565447)
- (Matthieu Casanova)
-
-- Several exceptions fixed in plugin manager after update or remove plugins
- (Matthieu Casanova)
-
-- When simplified keyboard handling was off, typing Alt+F o to open
- a file, the o was also written in the textarea. (#1593359) (Matthieu Casanova)
-
-- VariableGridLayout resized Components to sizes bigger than their maximum size,
- now it resizes it only up to its maximum size and positions the Components
- according to their alignmentX/alignmentY values if the cell is bigger than
- the Component's size. (Björn "Vampire" Kautler)
-
-- Horizontal scrollbar in the textarea was not always updated
- (#1534016, #1617483) (Matthieu Casanova)
-
-- In hypersearch when switching to flat nodes, the full path is displayed
- correctly (#1593523) (Matthieu Casanova)
-
-- The VFS Browser filter was not working as expected
- (#1617509) (Matthieu Casanova)
-
-- When reloading a buffer, the markers were not saved for each EditPanes
- (Matthieu Casanova)
-
-- When closing an untitled buffer is is removed from the CaretInfo map
- of the EditPanes (Matthieu Casanova)
-
-- When a buffer is renamed the key is changed in the CaretInfo map
- of the EditPanes (Matthieu Casanova)
-
-- Memory tooltip in status bar reports wrong values (#1538051) (Matthieu Casanova)
-
-- Better handling of plugin optional dependencies (Matthieu Casanova)
-
-- Fixed some cursor changes when dragging the dockable panel split bar
- (Matthieu Casanova)
-
-}}}
-{{{ Editing
-
-- New edit mode: quake.xml
-
-- Updated TCL edit mode (Jean-Francois Larvoire)
-
-- Updated Lilypond edit mode (Bertalan Fodor)
-
-- Fixed some invalid mode files (Björn "Vampire" Kautler)
-
-- Updated some mode files that were still in jEdit 4.0 syntax (Björn "Vampire" Kautler)
-
-- Perl edit mode - support for fully qualified variable names like $Some::Module::test.
- (Martin Raspe)
-
-- Updated python edit mode to unindent lines after "pass" (Matthieu Casanova)
-
-- Better highlighting of function calls in makefiles. (Marcelo Vanzin)
-
-- Updated PL/SQL Mode. (David Moss)
-
-}}}
-{{{ Miscellaneous
-
-- BufferSwitcher has a hovertip to give you full filename
- (request # 1628053) (Alan Ezust)
-
-- Textfield for filtering recent files menu (Patch # 1546200)
- (Joerg - spj)
-
-- FSB deletes directories recursively now
- (bug #1593389) (patch #1593900) (Akber Choudhry)
-
-- Added a FIRST_LINE_GLOB to the "awk" mode in modes catalog (fr #1582241)
- (Björn "Vampire" Kautler)
-
-- Incremental searchbar now use the invalid syntax color to show if the searched
- text was found (Matthieu Casanova)
-
-- FR #1599024: add a submenu to the file menu that allows reloading the
- current buffer with a specific encoding.
-
-- HASH_CHAR in mode-files is now optional and multicharacter
- (Björn "Vampire" Kautler)
-
-- HASH_CHARS got invented for mode-files as alternative to HASH_CHAR,
- whereby HASH_CHARS lists possible first characters of the matched
- result literally (Björn "Vampire" Kautler)
-
-- Fixed some wrong documentation and added some new
- about HASH_CHAR and HASH_CHARS (Björn "Vampire" Kautler)
-
-- SplashScreen change : more step added for progress bar and it tells now
- what jEdit is doing (Matthieu Casanova)
-
-- When closing the current buffer, if there is only one buffer, untitled and
- not dirty it is not closed (not needed since another one would be created)
- (Matthieu Casanova)
-
-- The Files change dialog has now an ignore button to set the
- autoreload and autoreloaddialog flags to false (Matthieu Casanova)
-
-- VariableGridLayout, two new capabilities: it can
- take minimum and maximum sizes of a Component into account when
- distributing free space and you can supply distances to the borders
- of the Container. The new capabilites are useable by the two new
- constructors. For more information, see the JavaDoc documentation.
- (Björn "Vampire" Kautler)
-
-- Reload/ReloadAll now ignores buffers with the NEW_FILE flag set. This
- was causing IO error messages when the Untitled buffers could not
- be reloaded. (Nicholas O'Leary)
-
-- More infos about the socket connection when the plugin manager updates it's
- plugin list (Matthieu Casanova)
-
-- Now the multiple selection and rectangular selection flags are saved
- for each buffer on each edit pane. So you can now in a textarea edit
- a buffer using rectangular selection, and use normal selection with another one
- (Matthieu Casanova)
-
-- Option panes are now in a JScrollPane (feature #1593735) (Matthieu Casanova)
-
-- New option for the File System Manager : use default icons.
- If you uncheck the checkbox, some custom icons can be used.
- At this time only local file system have custom icons (feature #1593464)
- (Matthieu Casanova)
-
-- Buffer saving is now buffered, it changes everything with large files
- (Matthieu Casanova)
-
-- jEdit can now use continuous layout in it's JSplitPane.
- You can change this option in the Appearance panel (#1638642)
- (Matthieu Casanova)
-
-- The update panel of the plugin manager now shows the installed version
- and the version existing on the plugin central server (Matthieu Casanova)
-
-}}}
-{{{ API Changes
-
-- Refactored the manually implemented HashSet of LinkedLists to use the
- Java Collections HashSet and ArrayList. Therefore the ParserRule.next
- and the ParserRuleSet.getRules(char) got deprecated in favor of
- ParserRuleSet.getRules(Character) (Björn "Vampire" Kautler)
-
-- Deprecated JEditBuffer.isElectricKey(char).
- Added JEditBuffer.isElectricKey(char, int) to replace it.
- (Marcelo Vanzin)
-
-- Deprecated some of the ParserRule.createXXX() methods which accepted
- only one character HASH_CHAR, while introduced new ones that accept
- whole Strings. Additionally new ones for accepting HASH_CHARS got
- added. (Björn "Vampire" Kautler)
-
-- SearchDialog.preloadSearchDialog(View) is deprecated, this is
- not necessary on our big computers and JVM with JIT (Matthieu Casanova)
-
-- VariableGridLayout has two new constructors to use the new capabilites.
- For more information see section Miscellaneous. (Björn "Vampire" Kautler)
-
-- PluginManager.getPluginList() is not public anymore. It was not useful
- since the PluginList class cannot be accessed outside of it's package
- (Matthieu Casanova)
-
-- MiscUtilities.moveFile(File, File) is deprecated, use
- IOUtilities.moveFile(File, File) instead (Matthieu Casanova)
-
-- Plugin API : now the EditPlugin has two new methods :
- EditPlugin.getPluginHome() that will returns the path where the plugin
- should write it's data (it can return null if you run with nosettings).
- It is a folder build like that
- jEditSettingsDirectory/plugins/pluginClassName
- ex :
- ~/.jedit/plugins/sidekick.SidekickPlugin
- I hope this will help to make some cleanup in the jEdit settings directory folder
- (this folder is not created by jEdit, plugin developers must create it themselves)
- The second method is EditPlugin.usePluginHome()
- that plugin developers should overload to tell jEdit if they use this new folder
- The default is false (Matthieu Casanova)
-
-- VFSFile.getIcon() and VFSFile.getDefaultIcon(). The getIcon() method
- can be override to use a custom icon for some VFS (Matthieu Casanova)
-
-- Added org.gjt.sp.jedit.msg.PropertiesChanging; an EditBus message that is
- sent right before the global options dialog is shown, to allow plugins to
- flush any data that might be used by the option panes.
- (Marcelo Vanzin)
-
-- OptionsDialog.init(String,String) was made protected (was private).
- (Marcelo Vanzin)
-
-- New GUIUtilities.initContinuousLayout(JSplitPane) method that will
- init the JSplitPane with the appearance.continuousLayout property.
- It can be used by plugins that has JSplitPane when receiving a PropertiesChanged
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre8
-
-Thanks to Matthieu Casanova, Martin Raspe, Marcelo Vanzin, Alan Ezust
-and Björn "Vampire" Kautler for contributing to this release.
-
-{{{ Bug Fixes
-
-- Fixed the impossibility to ReplaceAndFind if matching "$"
- (Björn "Vampire" Kautler)
-
-- Fixed incorrect highlighting if in soft-wrap and rectangular selection
- mode if drag highlighting with the mouse. (bug #1589360)
- (Björn "Vampire" Kautler)
-
-- Fix SF Bug #1574562: 4.3pre7 regex find/replace fails
- When adjusting the offset after an EOL match, need to check whether
- the new value is larger than the end of the search region and break
- the loop. (Marcelo Vanzin)
-
-- When having a single word selected, join line was doing nothing.
- (#1575505) (Matthieu Casanova)
-
-- Filters in the VFS Browser were not applied on Windows (#1571629)
- (Martin Raspe)
-
-- Fix SF Bug #1585327: Perl mode curly brackets highlighting and matching broken
- There was a broken rule in perl.xml. (Marcelo Vanzin)
-
-- Fix SF Bug #1588002: Perl Mode - sub foo($) { broken
- Correctly handle perl subroutine prototypes. (Marcelo Vanzin)
-
-}}}
-{{{ Miscellaneous
-
-- Buffer options were factored out to a dedicated BufferOptionPane and
- moved to .options (Martin Raspe)
-
-- Automatic reloading of buffers without notification is now possible.
- The autoreload behaviour can now be set individually for each buffer
- on the buffer option pane. Autoreload settings for open buffers are now
- saved to and restored from "perspective.xml" (#1578785) (Martin Raspe)
-
-- VFS browser column headers now have little arrow icons indicating the
- sorted column and sort direction. Clicking on the "Type" column header
- now sorts the files by extension (Martin Raspe)
-
-- When the plugin manager fail to download a plugin or to read the downloaded
- file, a new message dialog suggest the user to try another mirror
- (Matthieu Casanova)
-
-- ToggleHeaderSource.bsh (macros/C) now will find and open an already-open
- buffer with the correct filename even if it is from another directory.
- (Alan Ezust)
-
-}}}
-{{{ API Changes
-
-- OptionsDialog - currentPane and paneTree are protected now,
- to make it easier to extend it in SideKick plugin. (Alan Ezust)
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre7
-
-Thanks to Matthieu Casanova, Marcelo Vanzin, Nicholas O'Leary,
-Marcin Orlowski, Martin Raspe, Kazutoshi Satoda, Alan Ezust,
-and Björn "Vampire" Kautler for contributing to this release.
-
-{{{ API Changes
-
- {{{ EditAction changes:
-
-- Instances now inherit a protected Object[] args;
- Added a convenience function invoke(View view, Object[] newArgs) which
- sets args and calls invoke(view). Sf.net feature request # 1548301.
-
-- Made getCode() concrete (before it was abstract) and added
- a sensible implementation so that people extending from it
- are no longer required to write a function that returns beanshell code
- as long as they override the invoke(View) method with valid Java code.
- (Alan Ezust)
-
-- Made getLabel() non-final, so that people can override it and make
- more interesting EditActions. If args is set, getLabel() uses them
- for the label. (Alan Ezust)
-
- }}}
- {{{ GUIUtilities changes:
-
-- Added GUIUtilities.loadMenuItem(EditAction, boolean) - calls
- EditAction.getLabel() to get the label instead of getting properties
- directly (Alan Ezust)
-
-- GUIUtilities.addSizeSaver(Frame parent, String name) changed to
- GUIUtilities.addSizeSaver(Frame frame, Container parent, String name)
- and refactored to use saveGeometry(). Saves/restores
- sizes relative to a parent container. if parent==null, behaves
- as before. (Björn "Vampire" Kautler)
-
- }}}
- {{{ PluginJAR changes
-
-- jEdit.getPlugin(className, bool) now will search for and
- load plugins that were not yet loaded, given a className to search
- for. (Alan Ezust)
-
-- added PluginJAR.findPlugin() which is used by the above method (Alan Ezust).
-
-- added PluginJAR.load(), formerly a private method moved
- from the ManagePanel class. Also moved transitiveClosure() into
- the PluginJAR class. General refactoring to make the
- plugin management code more centrally located. (Alan Ezust)
-
- }}}
-
-- added new class org.gjt.sp.jedit.bufferio.MarkersSaveRequest; fixed 1527419:
- Setting or deleting markers does not dirty buffer anymore. Handling of
- the markers file is now factored out from BufferSaveRequest.
- (Martin Raspe)
-
-- added SearchMatcher.isMatchingEOL(); indicates whether the matched
- region ends at an EOL character. Part of bug fix for SF Bug #1541009.
- (Marcelo Vanzin)
-
-- added new class org.gjt.sp.jedit.io.VFSFileFilter; an interface that
- defines a filter used by the VFS browser. (Marcelo Vanzin)
-
-- added VFSBrowser.addVFSFileFilter() and VFSBrowser.getVFSFileFilter().
- Deprecated VFSBrowser.getFilenameFilter(). (Marcelo Vanzin)
-
-- added VFS._listDirectory(Object,String,VFSFileFilter,boolean,Component,boolean,boolean)
- (Marcelo Vanzin)
-
-- moved MiscUtilities.globToRE() to StandardUtilities. (Marcelo Vanzin)
-
-- added org.gjt.sp.util.PropertiesBean. See javadoc for details.
- (Marcelo Vanzin)
-
-- added JEditTextArea.collapseFold(int line) to collapse the fold at the
- given line (Matthieu Casanova)
-
-- New method KillRing.setInstance() that allow you to replace the default KillRing.
- jEdit now uses a custom KillRing : JEditKillRing. The only difference is that it
- can save itself to the disk (Matthieu Casanova)
-}}}
-{{{ Syntax Highlighting
-
-- Interlis mode updated to version 2.3 (patch # 1464779)
-
-- Progress mode supports nested comments (patch# 1211534)
-
-- New edit mode: Pilrc *rcp mode by Marcin Orlowski (#1519983)
-
-- Perl.xml mode fixes: (#1549412, #1020484), infinite loops in regexp,
- transliteration and hash highlighting, added several new features
-
-}}}
-{{{ Bug Fixes
-
-- JEditTextArea now supports Java Input Methods. See
- http://java.sun.com/j2se/1.5.0/docs/guide/imf/index.html
- (#735962, #1555403) (Kazutoshi Satoda)
-
-- Plugin Manager: fixed some bugs about broken or missing behaviour
- + toggle behaviour of spacebar (bug #1538700)
- + closing behaviour of enter if in list (bug #1538695)
- + disposing behaviour of ESC (bug #1538693)
- + broken/weird focus behaviour (bug #1538692)
- + now keeps selection if you cancel the installation or an I/O-Error
- occures while installing or updating (bug #1538689)
- + selection and checked state of plugins is now remembered if going to
- other tabpanes or to the settings (feature request #974759)
- + Install and Update Panels support now multiple selections too
- (Björn "Vampire" Kautler)
-
-- Plugin Manager: Automatically loads unloaded dependent plugins.
- (#1538702) (Alan Ezust)
-
-- File System Browser now recognizes Backspace, DEL and F2 to
- go to parent dir, delete and rename files respectively.
- The "path:" textarea accepts environment variables and expands them too.
- (1542365) (Alan Ezust)
-
-- SplashScreen is now in the middle of the screen, instead of between
- 2 screens (Alan Ezust)
-
-- GuiUtilities.load/save geometry now saves x and y coordinates
- relative to the parent component. Changed core to make dialogs
- and floating dockables pop up in a place relative to the parent
- view. (#1292706) (Alan Ezust)
-
-- Memory dialog reports wrong values (#1538051) (Matthieu Casanova)
-
-- Shortcut sorting was broken (#1538452) (Matthieu Casanova)
-
-- Actions to-lower and to-upper now selects the word at caret if
- there is no selection (#1538720) (Matthieu Casanova)
-
-- Quicklist of dockables windows is now sorted (#1538728)
- (Matthieu Casanova)
-
-- Updated text in Search dialog to reflect reality (#1542029)
- (Nicholas O'Leary)
-
-- SF Bug #1541009: 4.3pre6 regexp find: hangs + huge memory waste
- "$" matches right before the end of line; so we need to adjust the end
- of the matched region when that is used. To do this and still maintain
- the expected replace behavior, a new method was added to
- SearchMatcher, and users of that class should adjust the offsets of
- subsequent searches when an EOL is matched. (Marcelo Vanzin)
-
-- Formatting an empty paragraph do not throw a StringIndexOutOfBoundsException
- anymore (#1548902) (Matthieu Casanova)
-
-- Clearing a register is now persistent (#1541821) (Matthieu Casanova)
-
-- When collapsing a fold, if the caret is inside, it
- is moved to the first line of the fold (#1541372) (Matthieu Casanova)
-
-- action collapse-fold now works fine even if the caret is not on the
- first line of the fold (#1538712) (Matthieu Casanova)
-
-- When saving a readonly buffer it will ask you if you want a two stage save.
- If you say no it will not display any error dialog anymore.
- (#1549282) (Matthieu Casanova)
-
-- ArrayOutOfBoundException fixed in VFS browser when choosing to delete, rename
- or browse in right click popupmenu when no file are selected
- (#1565286) (Matthieu Casanova)
-
-}}}
-{{{ Miscellaneous
-
-- VFS browser is now able to sort files by double-clicking on column headers.
- Files can be sorted by name, size and last modification date. Clicking again on
- the same column header will reverse the sort order (#1442812) (Martin Raspe)
-
-- VFS browser is not restricted to the built-in "glob" filter anymore.
- Plugins can register new filters to be used by the browser by
- implementing the "VFSFileFilter" interface and providing a service
- entry in service.xml, or by directly calling
- VFSBrowser.addVFSFileFilter(). (Marcelo Vanzin)
-
-- Updated FAQ for jEdit 4.3 (ezust)
-
-- Save and Backup Option Panel : the backup directory has now a button to browse using
- VFS file browser (#1540730) (Matthieu Casanova)
-
-
-- The PluginManager options do not allow anymore to ask for a mirror list update
- twice (Matthieu Casanova)
-
-- The mirror list of the plugin manager is now stored in a file : mirrorList.xml
- and read from here where you open the option panel. The Update mirror list button
- will refresh it from the web.
- (Matthieu Casanova)
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre6
-
-Thanks to Björn "Vampire" Kautler, Alan Ezust,
-Matthieu Casanova, Nicholas O'Leary, Ollie Rutherfurd, and
-Marcelo Vanzin for contributing to this release.
-
-{{{ API Changes
-- MiscUtilities.getEncodings(boolean getSelected) added
- to get only the user-chosen encodings, e. g. in encoding dialogs.
- getEncodings() is deprecated in favor of getEncodings(false).
- (Björn "Vampire" Kautler)
-
-- DockableWindowManager.closeListener(String dockableName) - a new
- convenience method for creating keyboard listeners for floating
- dockables to respond to the "close-current-area" action. (Alan Ezust)
-
-- GUIUtilities.addSizeSaver(Frame frame, String name) added to
- save a Frames size and position correctly, even if it gets
- maximized. (Björn "Vampire" Kautler)
-
-- EditPane.setBuffer(final Buffer buffer, boolean requestFocus) that allow
- to set a buffer without requesting the focus (default is to request focus)
- (Matthieu Casanova)
-
-- BufferHistory.clear() to clear the recent file list
- (Matthieu Casanova)
-
-- MiscUtilities.stringCompare() and MiscUtilities.CompareString are moved to
- StandardUtilities (Matthieu Casanova)
-
-- Added XMLUtilities class for XML-related utility methods. Move some
- methods from MiscUtilities to this class, and deprecate the old ones.
- (Marcelo Vanzin)
-
-- Moved MiscUtilities.objectsEqual() method to StandardUtilities()
- (Matthieu Casanova)
-
-
-}}}
-{{{ Miscellaneous
-
-- Ability to clear the Recent Files List from menu (Matthieu Casanova)
-
-- Beanshell 2.0b4 bundled (Matthieu Casanova)
-
-- Added an OptionPane "Encodings" to select which encodings to
- show in encoding dialogs. (Björn "Vampire" Kautler)
-
-- Improved DockableWindowManager.closeCurrentArea() - closes more
- docked dockables than it did before. (Alan Ezust)
-
-- Fixed the storing of Frame size and position
- if the Frame gets maximized. (bug #1325358)
- (Björn "Vampire" Kautler)
-
-- Fixed VFS.copy() method when the returned session is null
- (Matthieu Casanova)
-
-- When adding explicit folds, and using a line comment for the end line,
- insert a line break after the fold end if the line is not empty,
- avoiding commenting out existing code. (Marcelo Vanzin)
-
-- Added option to not print collapsed folds. (Nicholas O'Leary)
-
-- Added paste and clear buttons to the Registers dockable.
- (Nicholas O'Leary)
-
-- The behavior of JARClassLoader now is different than in previous
- versions of jEdit. JARClassLoader will now delegate class loading
- to the parent class loader before looking in its cache. This means
- that, by default, plugins can't override classes in the JVM's
- boot classpath. The behavior is configurable on a per-plugin
- basis (see javadoc for details). This fixes SF Bug #1509218.
- (Marcelo Vanzin)
-
-- SF Bug #1527824: Perl Syntax Highlighting hangs 4.3pre6
- More activity on my favorite edit mode. :-)
- The [^\p{Alpha}\p{Space}] rule at the start of Perl's "y/.../" syntax
- was not entirely correct; some other characters, mainly operators like
- +, -, etc, and also underscore, are not allowed either. But since the
- regexp was still trying to be matched against such strings, it would
- have two effects: a very long pause (the "hang"), and strings like
- "y_something_something" being highlighted incorrectly. By adding a few
- extra characters to that exclusion, things seem to be much better.
- (Marcelo Vanzin)
-
-}}}
-{{{ Bug Fixes
-
-- (jedit-Bugs-1518537) FSB keyboard handling bugs fixed.
- Arrow keys, backspace, and return all do sensible things
- from the table as well as the list view. (Ezust)
-
-- (jedit-bugs 1533925) Alpha-numerics are no longer being "passed through"
- from the FSB to the editpane. (Alan Ezust)
-
-- When multiple views are open, closing a buffer will not change the active view
- (Bug #1518400) (Matthieu Casanova)
-
-- Fixed Untitled buffer added to the Recent file list (Bug #1518620)
- (Matthieu Casanova)
-
-- MiscUtilities.canonPath() now trim redundant / and \ at the end of the path
- of Dos derived OS (bug that can be seen when typing some / in the end of the
- path field of VFS browser) (Matthieu Casanova)
-
-- SF bug 1526487: ArrayOutOfBoundException in VFS Browser. (Matthieu Casanova)
-
-- SF bug 1519237: Regular Expression Search in 4.3pre5
- regexp search should be done with Pattern.MULTILINE enabled, otherwise
- ^ and $ will only match the start and end of the buffer. (Marcelo Vanzin)
-
-- SF bug 1517395: Wrong character encoding in killring.xml
- fix bug in Java 1.5 by saving ASCII control characters as character
- entities; since 1.4 doesn't support XML 1.1, if killring.xml has
- character entities it will fail (so the bug will still be there
- when running on 1.4). (Marcelo Vanzin)
-
-- SF bug 1523261: "Regular expression " and "Ignore case"
- There was a stray "flags" variable in PatternSearchMatcher.nextMatch()
- that was clobbering the instance variable with the same name (that
- actually contained the needed flags for the compiled pattern).
- (Marcelo Vanzin)
-
-- SF bug 1523117: Add explicit fold in PHP mode inserts wrong comments
- The "DEF_CLASS" rule set in the php mode file didn't have any line
- or range comments declared in the props section; so the code was now
- picking up the porperties for the default rule set, which had the
- HTML-style range comment instead of the PHP line comment. This is
- probably due to the XML parser change - the old code was probably
- propagating some property of another rule set to the DEF_CLASS rule
- set, since it used global variables for a bunch of things. So this
- might show up in other places, and might need a better fix...
- (Marcelo Vanzin)
-
-- SF bug 1524032: Line number not highlighted when the line is selected
- (Nicholas O'Leary)
-
-- SF bug 1524155: replace all within selection doesn't give feedback
- (Nicholas O'Leary)
-
-- SF bug 1524191: s() method from startup.bsh doesn't work
- (Nicholas O'Leary)
-
-- SF bug 1516994: Fixed infinite recursion possibility
- in ManagePanel.java when unloading certain plugins
- with circular dependencies due to services. (Alan Ezust)
-
-- No exception thrown when adding an explicit fold to a read only buffer.
- (#1549282) (Matthieu Casanova)
-
-- Deep indent fixed when using tabs (Matthieu Casanova)
-}}}
-{{{ Syntax Highlighting
-- Added mysql mode.
-- Added django templates mode. (Ollie Rutherfurd)
-}}}
-}}}
-
-{{{ Version 4.3pre5
-
-Thanks to Alan Ezust, Jeffrey Hoyt, Daniel Hahler, Dale Anson,
-Björn "Vampire" Kautler, Matthieu Casanova, Xuön Baldauf,
-Nicholas O'Leary and Marcelo Vanzin for contributing to this release.
-
-{{{ Reinstall required
-- Gnu.regexp is no longer used by jEdit, in favor of java.util.regex
- Since the regexp removal has also affected the modes handling and thus
- the files in the "modes" directory, just updating "jedit.jar" of an
- existing jEdit installation does not suffice. You would get weird
- errors in this case. Thus, a full reinstall is required.
-}}}
-{{{ API Changes
-
-- DockableWindowManager has a new method, setDockableTitle()
- which allows you to set the string in the title bar
- for floating dockables. Now docked buttons use the dockableName.label
- property instead of the .title. This way, we can have have long titles
- in the floater, and short strings on the dock button. (Alan Ezust)
-
-- Macros.Macro.invoke() has been rewritten to begin the compoundEdit on the buffer that is
- active buffer before the macro gets invoked, and end the compoundEdit on the buffer that is active
- after the macro is invoked opposed to end the compoundEdit on the buffer it was started on.
- JEditTextArea.setBuffer() has been rewritten to end a compoundEdit on the old buffer and start
- a new compoundEdit on the new buffer if there were a compoundEdit in progress.
- (bug #1469996). (Björn "Vampire" Kautler )
-
-- MiscUtilities.isBinaryFile() method that will check if a file is binary or not (Matthieu Casanova)
-
-- MiscUtilities.autodetect() this method tries to autodetect the file encoding. It was moved
- from BufferIORequest (Matthieu Casanova)
-
-- New utility class : IOUtilities that will contains static IO methods that
- depends only on JDK. (Matthieu Casanova)
-
-- New utility class : StandardUtilities that will contains static
- methods that depends only on JDK (Matthieu Casanova)
-
-- jEditBuffer.getRegexProperty() has been removed;
- jEditBuffer.getPatternProperty() was added to replace it.
- (Marcelo Vanzin)
-
-- MiscUtilities.quickSort() methods and MiscUtilities.Compare class are now deprecated
- use Arrays.sort() and Collections.sort() (Matthieu Casanova)
-
-- MiscUtilities.parseXML() and MiscUtilities.findEntity() were added.
- They're mainly used internally to ease XML parsing, but can safely
- be used by other people. Please refer to the javadoc documentation
- about how these methods operate. (Marcelo Vanzin)
-
-- org.gjt.sp.jedit.search.RESearchMatcher has been removed as part
- of the gnu.regexp removal; it didn't make sense to write extra
- code to keep that class working. (Marcelo Vanzin)
-
-- due to the change to support java.util.regex, the signature for
- org.gjt.sp.jedit.search.SearchMatcher.nextMatch() has changed.
- This means that any plugin that uses SearchMatcher or one of its
- implementations directly will break. (Marcelo Vanzin)
-
-- Added Log.log(urgency, source, message, exception). (Xuön Baldauf)
-
-}}}
-{{{ Miscellaneous
-- SearchReplace dialog now supports additional options,
- for Directory Search: "skipHidden" and "skipBinary".
- Now you can skip over hidden directories/files, as well
- as binary files. (Matthieu Casanova & Alan Ezust)
-
-- Updated Ruby Edit-mode to v0.6.2
- The Ruby-Mode now highlights numbers correctly (bug #1489847). (Björn "Vampire" Kautler)
-
-- The "Recent files" menu can now be reaches with the keystroke sequence
- "Alt+F F" (bug 1488066) (Xuön Baldauf)
-
-- The "Recent files" menu displays pathname information in the status
- line now also in cases the keyboard is used to choose menu items
- (bug 1488060) (Xuön Baldauf)
-
-- Drag&Drop now accepts multiple files in KDE environment. (bug 1487647)
- (Xuön Baldauf)
-
-- Mode_Switcher macro fixed to stop InvocationTargetException
- (Nicholas O'Leary)
-
-- Add explicit fold when start and end of selection are in different edit mode
- (bug #1159659) (Matthieu Casanova)
-
-- Caret position of previously edited files is restored on startup (bug # 1486706)
- (Dale Anson)
-
-- When saving a file with .gz extension the buffer is gzipped (it was not working when using two stage save.)
- It also remove GZIPPED property if the buffer name was ending with .gz and is not anymore
- (Matthieu Casanova)
-
-- All classes using the gnu.regexp packages have been changed to use
- java.util.regexp. This needed some refactoring of a few components
- inside the syntax highlighting and search subsystems. This means
- that mode files using regexps and searches now should use the
- java.util.regex syntax instead of the old syntax.
- (Marcelo Vanzin)
-
-- All classes using the com.microstar.xml packages have been changed to
- use JAXP to parse XML. Which means that some classes have different
- base classes now, but I don't expect anyone to be inheriting from any
- of those. Also, this means that XML parsing will be a little bit more
- "correct" now, in the sense that it will check the files against their
- DTDs (this needed some changes to the DTDs shipped with jEdit since
- some of them had errors). (Marcelo Vanzin)
-
-- The build.xml got rebuilt to allow building the MacOS-Plugin on any platform
- and to make it easier to build the distribution files (DEB, Java-Installer,
- Mac OS X DMG, TGZ Slackware Package, Windows-Installer, SRC-package, PDF-Manuals).
- (Björn "Vampire" Kautler)
-}}}
-}}}
-
-{{{ Version 4.3pre4
-
-Thanks to Neil Bertram, Onur Turgay, Ollie Rutherfurd, Dale Anson, Xuön Balduf,
-Nathan Blair, Peter Adolphs, Carmine Lucarelli, Matthieu Casanova, Alan Ezust,
-Daniel Hahler, Marcello Vanzin, Slava Pestov, Björn "Vampire" Kautler, and Jeffrey Hoyt for
-contributing to this release.
-
-{{{ Syntax Highlighting
-
-- TypoScript syntax highlighting (Neil Bertram).
-- Myghty template syntax highlighting (Ollie Rutherfurd)
-- JavaCC syntax highlighting (Dale Anson)
-
-}}}
-{{{ API Changes
-
-- better fix for 1449909:
- Create a new message (ViewUpdate.ACTIVATED) to indicate that a different
- view was activated. (Marcello Vanzin)
-
-- send a ViewUpdate.EDIT_PANE_CHANGED when changing the active view.
- (Marcello Vanzin)
-
-- EditAction now has a setName() method, allowing one to change the name.
-
-- New BufferChanging class, extends EditPaneUpdate with a getBuffer()
- method which returns the about-to-be opened buffer. (Alan Ezust)
-
-}}}
-{{{ Miscellaneous
-
-
-- TextAreaTransferHandler patch 1487647 Drag 'n' drop from KDE now works. (Xuön Baldauf)
-
-- GUIUtilities patch 1275607 for "find" dialog (Xuön Baldauf)
-
-- GUIUtilities patch 1467821 for dual-head displays applied (Nathan Blair)
-
-- patch 1467311 applied (Peter Adolphs) Restore previously open files on startup
-
-- Macro list is now sorted so that directories show up first
- (carmine.lucarelli)
-
-- jEdit now supports LCD Subpixel Anti-Aliasing (JDK 1.6 only).
- Global Options -> TextArea -> Anti-Aliased Smooth Text -> Subpixel
- (Onur Turgay / Alan Ezust)
-
-- jEdit will ask for confirmation before overwriting read only files.
- If yes, it will activate two stage save if the VFS is capable of
- renaming files. If no, the file will not be saved (Matthieu Casanova).
-
--IO progress monitor are indeterminate if the maximum value of the WorkThread is 0
- (Matthieu Casanova)
-
--Hyper search result panel now indicates the processed files
- (Matthieu Casanova)
-
-}}}
-{{{ Bug Fixes
-
-- Fix a deadlock when using directory search (Slava Pestov).
-
--Deep indent was broken since 4.3pre2 and is now fixed (Matthieu Casanova)
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre3
-
-Thanks to Bertalan Fodor, Björn "Vampire" Kautler, David Chan, James Turk,
-Loren Charnley, Matthieu Casanova, Michael Macnair, Nicholas O'Leary,
-Alan Ezust, Slava Pestov, Ollie Rutherfurd, Jeffrey Hoyt, Marcelo Vanzin,
-Rob (copy_paste), and Simon Ruggier for contributing to this release.
-
-
-{{{ Search and Replace
-
-- HyperSearch results can now be displayed in a folder hierarchy tree
- view. This makes it easier to see file locations when there are matches
- for many different files from a deep folder structure. To activate,
- right click on the top search node in the result tree and select
- "Toggle Tree View". If multiple results is enabled, the tree view is
- only toggled for the selected search.
-
- There are also new context menu options for the result tree
- that only display in tree view mode when a folder node is selected.
- There are options to expand/collapse all child nodes, and another to
- exeucte a "New Search From Here", which displays the search dialog
- initialized with the path from the selected result tree folder node.
-
-}}}
-{{{ Syntax Highlighting
-
-- Gnuplot syntax highlighting (Loren Charnley).
-
-- Updated PHP syntax highlighting (Matthieu Casanova).
-
-- Fixed end token of heredoc that must start at beginning of the line in
- PHP (Matthieu Casanova)
-
-- Updated MIPS R2000 assembly syntax highlighting (James Turk).
-
-- Updated Java and LaTeX syntax highlighting (Alexander Klimetschek).
-
-}}}
-{{{ File System Browser
-
-- Pressing / and BACKSPACE in the filename field no longer does
- completion. Now, you must press TAB to complete.
-
-}}}
-{{{ Miscellaneous
-
-- JARClassLoader now reports package information (Bertalan Fodor).
-
-- A new macro, SplitPane grow, was added to the macros/interface
- directory. (Alan Ezust)
-
-- A new macro, ToggleHeaderSource, for C/C++ editing. (alan ezust)
-
-- A single-line selection no longer hides the line highlight, for
- better readability.
-
-- The selection is now saved between buffer switches.
-
-- ActionContext now remembers overridden actions, so another plugin
- can override builtin actions (via listing one in actions.xml with the same name).
- When the plugin is unloaded, the original action will be restored. (alan ezust)
- plugins that use this feature: infoviewer, xsearch, and optional.
-
-- Updated "Display Abbreviations", "Hex Convert" and "HyperSearch
- Results to Buffer" macros.
-
-- Updated "Insert Buffer Properties" macro (Björn "Vampire" Kautler).
-
-- The plugin manager option pane now displays the name of the mirror
- currently used (Matthieu Casanova).
-
-- URLs dragged into the textarea are loaded rather than the URL pasted
- (Nicholas O'Leary).
-
-- Deselecting a plugin in the Plugin Manager persists between reloads of
- jEdit (Nicholas O'Leary).
-
-- Help Browser has an improved history model with drop-down style
- forward and back buttons.
-
-- Can specify caret column number in addition to line number when
- opening a file (+line:<line>,<column>) (Bertalan Fodor).
-
-- Added a new EventListener to notify subscribing plugins when jEdit was
- looking for prefix completions and when it was done. These
- notifications are for the ShortcutDisplay plugin.
-
-}}}
-{{{ Bug Fixes
-
-- The following Java code did not indent properly:
-
- if(foo)
- {
- foo(bar,
- baz);
- }
-
-- The following Java code did not indent properly:
-
- foo(bar(
- <--- should not have two levels of indent here
-
-- The soft wrap state is no longer reset when a buffer is saved. This
- was pointless and slowed down the editor.
-
-- Screen line management had an off-by-one error, so in some situations
- the vertical scroll bar state would become inconsistent.
-
-- Registers dockable window had a few problems (Nicholas O'Leary).
-
-- Word count would show -1 for an empty buffer (Michael Macnair).
-
-- Fixed corrupted cursor image problem on Mac OS X.
-
-- Complete word popup is now always positioned within the screen bounds.
-
-- The last physical line index was not updated when saving files
- sometimes, resulting in exceptions when clicking in the text area.
-
-- If rectangular selection mode was enabled and you clicked beyond the
- end of the line in a read-only buffer, jEdit would beep.
-
-- Using 'Delete Lines' with folding could mess up the vertical scroll
- bar.
-
-- File system browser's right click menu now contains the "Plugins" menu
- (Nicholas O'Leary).
-
-- Fixed file system browser's left arrow key behavior (David Chan).
-
-- The startup script created by the Java-based installer on Mac OS X now
- adds the Cocoa classes to jEdit's class path, so the Mac OS plugin
- should work with no further tweaking.
-
-- Fix race condition when there were buffers in the perspective, as well
- as buffers specified to open on the command line.
-
-- If windows were docked in the top docking area, the action bar would
- display in the wrong place.
-
-- After receiving a PropertiesChanged on EditBus, the PluginManager will
- check if the mirror was changed before updating the plugin list
- (Matthieu Casanova).
-
-- Fix for drag'n'copy text to lower position in same textarea - #1246823
- (Nicholas O'Leary)
-
-- Register Viewer fixes (Nicholas O'Leary).
-
-- Bug 1173630 fixed : Format paragraph with the caret at the end of it
- (Matthieu Casanova).
-
-- Mixed parser rules are detected when adding explicit fold
- (Matthieu Casanova).
-
-- Bug 1085135 fixed : when typing ctrl+S jEdit will not ask the user if
- he wants to override the read only flag on the file
- (Matthieu Casanova)
-
-- NPE fixed when removing hyper search result that aren't cached
-(Matthieu Casanova)
-
-- NPE fixed when using turkish locale (889520)
-
-}}}
-{{{ API Changes
-
-- bug 1386702: DockableWindowManager now sends an EditBus message
- DockableWindowUpdate.ACTIVATED when a dockable is activated.
- And a corresponding DEACTIVATED message when it is deactivated. (alan ezust)
-
-- A new EditBus message has been introduced: EditPaneUpdate.CHANGING
- for Navigator (or other EBPlugins) to catch caret positions
- just before buffers are changed. (Alan ezust)
-
-- A new EditBus message has been introduced: BufferUpdate.CLOSING
- for EBPlugins to catch events just before buffers are closed.
- (Alan ezust)
-
-- Selecting multiple directories in the file chooser dialog box is now
- supported; just pass true as the last parameter (Matthieu Casanova):
-
- GUIUtilities.showVFSFileDialog(view,null,
- VFSBrowser.CHOOSE_DIRECTORY_DIALOG,true)
-
-- Now that the text area is independent of the rest of jEdit, various
- text area-related APIs that used to take org.gjt.sp.jedit.Buffer
- instances now take org.gjt.sp.jedit.buffer.JEditBuffers:
-
- - BufferChangeListener and BufferChangeAdapter are now deprecated. Use
- BufferListener instead.
-
- - FoldHandler.getFoldLevel() now takes a JEditBuffer as a parameter.
-
- - VFS.copy() methods added (Matthieu Casanova).
-
- - MiscUtilities.copyStream() and MiscUtilities.closeQuietly() methods
- added (Matthieu Casanova).
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre2
-
-Thanks to Bertalan Fodor, Dirk Moebius. Jarek Tuszynski, Joshua Gertzen,
-Nicholas O'Leary, and Simon Ruggier for contributing to this release.
-
-{{{ Auto Indent
-
-- The auto indent engine has been rewritten from scratch to provide
- more accurate indentation for a variety of languages, including Java,
- Common Lisp, and Factor.
-
-- Aligned bracket indent is done as before with "indentOpenBrackets" and
- "indentCloseBrackets" properties. Unaligned indent was previously
- enabled by setting "lineUpClosingBrackets" to "false". Now, you must
- specify "unalignedOpenBrackets" and "unalignedCloseBrackets"
- properties.
-
- The upside is that both aligned and unaligned indent can be used in
- the same edit mode. For example, in Java source, the following piece
- of code is indented correctly:
-
- public void apply(Buffer buffer, int thisLineIndex,
- int prevLineIndex, int prevPrevLineIndex,
- List indentActions)
- {
- // ...
- }
-
-- The new "unindentThisLine" property, whose value is a regexp, allows
- indentation of Java switch/case constructs:
-
- switch(foo) {
- case bar:
- hello();
- default:
- yo();
- }
-
-- In order to immediately re-indent the line as soon as the case or
- default statement is terminated with a :, the "electricKeys" property
- is set to a list of characters whose input triggers a re-indent of the
- current line.
-
-- The new "unindentNextLines" property, whose value is a regexp, allows
- indentation of Factor colon definitions -- in particular, after the ;
- everything must be unindented:
-
- : refers? ( to obj -- ? )
- f swap [ pick eq? or ] each-slot nip ;
- ! Indent returns here
-
-}}}
-{{{ Syntax Highlighting
-
-- Updated LilyPond syntax highlighting (Bertalan Fodor).
-
-- Rd syntax highlighting (Jarek Tuszynski).
-
-- Updated ASP syntax highlighting (Simon Ruggier).
-
-- Slate (http://slate.tunes.org) syntax highlighting.
-
-}}}
-{{{ File System Browser
-
-- The file system now lazily retreives file system attributes. For
- plugins that use the VFS API, this has important implications; see
- the below "API Changes" section. (Joshua Gertzen).
-
-- Previously, file system browser columns would resize to fit all the
- attributes of all visible files. Now, this is not possible, so instead
- columns can be resized manually and their size is preserved.
-
-}}}
-{{{ Miscellaneous
-
-- When an item from the "Paste Previous" or "Paste Deleted" dialog boxes
- is inserted, it is moved to the top of the list.
-
-- Pasting now preserves the tall caret.
-
-- New text areas viewing a buffer inherit the fold visibility map from a
- previous text area.
-
-- The right-click popup for HyperSearch results nodes has three new
- entries:
-
- - Open
- - Open in New View
- - Open in New Plain View
- - Open in New Split
-
-- On Mac OS X, the close box is shown with a different appearance if a
- visible buffer has unsaved changes.
-
-- Dropping text into the text area now selects it (Nicholas O'Leary).
-
-- The cursor is hidden when you start typing.
-
-- Renamed 'Delete Line' to 'Delete Lines'; now does the right thing if
- more than one line is selected. Same for 'Join Lines' versus
- 'Join Line'.
-
-- When the search bar loses focus, the currently entered text is added
- to the history.
-
-- "Format Paragraph" now preserves the caret position.
-
-}}}
-{{{ Bug Fixes
-
-- Fix NullPointerException in file system roots list.
-
-- Search and replace dialog's "Search subdirectories" checkbox did not
- have an Alt-key mnemonic.
-
-- Binding actions to numeric keypad keys should now work better.
-
-- Pressing something like A+f l where A+f was a prefix but A+f l was
- not bound would insert l into the buffer, which was undesirable.
-
-- The plugin manager did not select a plugin's dependencies when the
- plugin was selected for installation.
-
-- Invoking 'Expand Fold' when the fold is expanded would move the caret
- to the wrong place.
-
-- Changing the wrap mode didn't update screen line counts, causing
- various problems.
-
-- The custom history text field border with the popup widget is back.
-
-- Fixed a memory leak. Token markers were retaining the line segment
- they were given to tokenize -- in some cases, this line segment could
- hang around for a while, and was huge.
-
-- Fix performance regression when deleting text; too many lines were
- being repainted.
-
-- 'Cut Append' and 'Copy Append' commands did not update the Registers
- dockable.
-
-- Fix Control key on Mac OS X.
-
-- Changing the font size did not update the vertical scrollbar.
-
-- JSwat plugin did not work when running under Java 5 due to a bug in
- jEdit's JARClassLoader (Dirk Moebius).
-
-- Fix some problems with paths that end with multiple file separators.
-
-- Inserting a long line of text did not always scroll horizontally as
- required.
-
-- Split panes now have resize weight, ensuring more intuitive behavior
- when a split view is resized.
-
-- If autosave kicked in while the 'Close All Buffers' dialog was open,
- then the perspective would be saved, and the wrong buffer would be
- restored on the next startup.
-
-- Fix an exception from being shown when loading a file with a malformed
- .marks file.
-
-- Fix possible ArrayIndexOutOfBoundsException when deleting text after
- decreasing the number of history elements.
-
-- Double clicking the middle mouse button now pastes twice, instead of
- pasting and selecting a word.
-
-}}}
-{{{ API Changes
-
-- View.updateTitle() is now public.
-
-- VFS.DirectoryEntry has been deprecated because its interface is not
- conductive to lazy initialization. Virtual file systems should now
- return instances of org.gjt.sp.jedit.io.VFSFile, and instead of
- reading/writing the public fields of that class (they are public but
- deprecated for VFS.DirectoryEntry compatibility), you should call the
- accessor/mutator methods.
-
-- A new MiscUtilities.pathsEqual() method has been added to check for
- equality of path names while ignoring case sensitivity on Windows.
-
-}}}
-
-}}}
-
-{{{ Version 4.3pre1
-
-Thanks to Cameron Morrison, Igor Lesik, Jim Lawton, Marcelo Vanzin,
-Nicholas O'Leary and Trevor Harmon for contributing to this release.
-
-{{{ Search and Replace
-
-- When invoking "Find", "Incremental Search for Word" or "HyperSearch
- for Word" actions, if regular expression search is on, any special
- characters in the selection are automatically escaped.
-
-- Find dialog box now has fields that accept multi-line input. Pressing
- ENTER activates the "Find" button; press C+ENTER to insert lines in
- the field.
-
-- Variables such as "view", "buffer" and "textArea" can now be used from
- BeanShell replace expressions.
-
-}}}
-{{{ Syntax Highlighting
-
-- Literate Haskell syntax highlighting (Cameron Morrison).
-
-- Updated D syntax highlighting (Jim Lawton).
-
-- Forth syntax highlighting.
-
-- Motorola 68000 assembler syntax highlighting (Igor Lesik).
-
-}}}
-{{{ Scripting
-
-- Macros written in the UTF-8Y and UTF-16 encodings are auto-detected.
-
-- Added Macros->Repeat Last Macro command. This used to be in 4.1, but
- got removed in 4.2, and now its back due to popular demand.
-
-}}}
-{{{ Miscellaneous
-
-- jEdit no longer runs with Java 2 version 1.3. Java 2 version 1.4 or
- 1.5 is now required.
-
-- If the wrap margin is set to 0 and soft wrap is enabled, wrapping is
- now performed at the text area width. This used to be in 4.1, but
- got removed in 4.2, and now its back due to popular demand.
-
-- Rename Autosave & Backup option pane to Save & Backup, move some
- options from General pane there (Marcelo Vanzin).
-
-- Added Ant target for building a MacOS X .app package (Trevor Harmon).
-
-- Added Register and Marker dockables (Nicholas O'Leary).
-
-- "Rectangular Selection" command now changes the state of the current
- selection to match the flag.
-
-- "Select All" preserves current scroll position.
-
-- When closing jEdit, open buffers are not added to the "Recent Files"
- list if the "Restore previously open files on startup" option is on.
-
-- View.goToBuffer() will try to find a non-zero height text area if
- possible.
-
-- Pressing TAB now preserves the tall caret, if there is one.
-
-- When a directory is reloaded, it is no longer moved to the top of the
- file system browser's history list.
-
-- Added View->Splitting->Restore Split action -- it recreates a
- split pane configuration as it was before the most recent 'Unsplit'.
-
-}}}
-{{{ Bug Fixes
-
-- "Backup directory" feature now works if the file being edited is on a
- different filesystem than the backup directory (Marcelo Vanzin).
-
-- Don't use two-stage save if the file's parent directory is not
- writeable (Marcelo Vanzin).
-
-- Minor fix for handling of the recent buffer when the current buffer
- was closed.
-
-- Fix StringIndexOutOfBoundsException when opening files with a
- malformed XML PI.
-
-- Removing open files from the favorites list didn't work.
-
-- calling readNextChar() no longer clears the status bar after the
- script returns.
-
-- Fix potential ArrayIndexOutOfBoundsException when indenting lines
- containing unmatched brackets.
-
-- The "deselecting this plugin will deselect dependencies" message did
- not give the actual list of dependencies.
-
-- Fixed NullPointerException when selecting QuickNotepad menu items
- before opening QuickNotepad first.
-
-- Register persistence was broken and didn't work in many cases.
-
-}}}
-{{{ API Changes
-
-- New org.gjt.sp.jedit.gui.HistoryTextArea class can be used by
- plugins.
-
-- Removed EditPlugin.JAR, deprecated since 4.2.
-
-- Removed Buffer.getRootElements(), Buffer.getParagraphElement() and
- Buffer.getDefaultRootElement() methods, deprecated since jEdit 4.0.
-
-}}}
-
-}}}
-
-jEdit buffer local properties:
-:mode=text:maxLineLen=80:indentSize=2:
-:folding=explicit:collapseFolds=2:
-:encoding=ISO-8859-1:
+jEdit 4.4 version history
+ (changes since jEdit 4.3)
+:encoding=UTF-8:
+
+{{{ Version 4.4.1
+
+Thanks to Björn "Vampire" Kautler, Kazutoshi Satoda, Alan Ezust,
+and Matthieu Casanova for contributing to this release.
+
+{{{ Bug Fixes
+
+- Collapsing all folds will move the caret outside any fold if necessary
+ (Matthieu Casanova)
+
+- Fixed an exception that occurs when opening jEdit from command line
+ with some files to open as argument if a jEdit server is running
+ (#3173669 - Matthieu Casanova)
+
+- jEdit now force drops from external applications to be COPY and not
+ MOVE drops. It prevents ftp explorer from deleting dropped files
+ (#1208598 - Matthieu Casanova)
+
+- Changing bufferset scopes now saved to properties as default scope.
+ (#3316329 - Matthieu Casanova)
+
+- Buffersets no longer populated with open files when creating new view.
+ (#2990965 - Matthieu Casanova and Alan Ezust)
+
+- BufferSet contents of new Plain View #3317405 fixed (Matthieu Casanova)
+
+- When the cursor was at a start (or end) of non-top (non-bottom) line,
+ Find Next (Previous) for a non-empty regex starting with "^" (ending
+ with "$") wrongly skipped the occurrence at the cursor.
+ (SF.net bug #2953604 - Kazutoshi Satoda)
+
+- Corrected a wrong specifications (javadoc comments) of
+ SearchMatcher#nextMatch(). (SF.net bug #2953604 - Kazutoshi Satoda)
+
+- Fixed an exception that prevent from opening properties dialog of non local
+ files in the VFS Browser (#3199876 - Matthieu Casanova)
+
+- Remove sending to background from the Linux start script, otherwise it cannot
+ be used properly as commit editor with the -wait option or to get the -usage
+ output on the commandline properly (Björn "Vampire" Kautler)
+
+- Improve integration with Unity Launcher. Without this change if you pin jEdit
+ to the Launcher and then run it, a separate icon for the running instance is
+ shown. With this change this is correctly merged with the pinned starter.
+ (Björn "Vampire" Kautler)
+
+}}}
+
+}}}
+
+{{{ Version 4.4pre1
+
+Thanks to Björn "Vampire" Kautler, Alan Ezust, Eric Berry,
+Shlomy Reinstein, Damien Radtke, Dale Anson, Matthieu Casanova,
+Eric Le Lay, Bernhard Walle, Joerg Spieler, Kevin Hunter, François Rey,
+Dion Whitehead, Marcelo Vanzin, Jesse Pavel, Jakub RoztoÄil,
+Kazutoshi Satoda, Anshal Shukla, Milutin JovanoviÄ, Vadim Voituk,
+goebbe, James Nicholl, Uwe donovaly, Sergey Mezentsev, Jim Lawton,
+Suraj Kurapati, Paulo Moura, curtis_call, Rowan Collins,
+Stephen Blackheath, asitdepends, Michael Schlotter, Robin Neatherway,
+strank, and Hisateru Tanaka for contributing to this release.
+
+{{{ Bug fixes
+
+- Fixed an exception when trying to add new menu items to the context menu
+ if some ActionSets have been unloaded (plugin deactivation)
+ (Matthieu Casanova #3071355)
+
+
+- Windows installer tries to quit existing jEdit instance before trying to
+ install (Björn "Vampire" Kautler)
+
+- Closes menus when toggling dockables. (#3022084 - Anshal Shukla)
+
+- VFSBrowser escape handling fixed when used as a dialog (#3101808 - Alan Ezust)
+
+- Context menu sorted when adding toolbar buttons (#3074164 - Alan Ezust)
+
+- Fixed an exception when clicking ok while adding new action to the context
+ menu if no action has been selected (Matthieu Casanova #3072546)
+
+- Fixed TextArea.selectBlock() when the block is at offset 0
+ (Jesse Pavel #3062072)
+
+- Fixed a memory leak in the beanshell snippet replacement
+ (Matthieu Casanova #3043132)
+
+- The "buffer" variable is always the current buffer and not the buffer
+ where the replacement occurs when using beanshell snippet replacement
+ (Matthieu Casanova #3043118)
+
+- Removed workaround in drag & drop code of TextArea that doesn't seem
+ useful anymore on Ubuntu and cause exceptions when dropping a Transferable
+ that is not a String but has a java.io.InputStream as representation class
+ (Matthieu Casanova)
+
+- Fixed caret going to the wrong position when adding explicit folds
+ in a buffer that uses an edit mode that has no line comment
+ (Matthieu Casanova #2138160)
+
+- Fixed caret going after the explicit folds when adding explicit folds
+ to the wrong position when adding explicit folds while having no
+ selection, in any edit mode (Matthieu Casanova)
+
+- When saving a buffer the autoreload option of the buffer was overridden
+ by global settings (Matthieu Casanova #2999966)
+
+- Improve indentation settings of the shellscript edit mode.
+ (Björn "Vampire" Kautler #3005463)
+
+- Removed the duplicated "Architecture" line from the Debian control file.
+ (Björn "Vampire" Kautler #2999456)
+
+- In the manage panel, when selecting a library, the description panel do
+ not contains "null" for every fields and the title is set to the jar name
+ instead of "null" (Matthieu Casanova)
+
+- Update of textarea scrollbars and bufferSwitcher are now done in
+ EventQueue thread (Matthieu Casanova #2946031)
+
+- Removed unnecessary popup warnings from InstallPanel when loading a
+ pluginset. (Alan Ezust)
+
+- fix #1439605 - remove installer.VariableGridLayout (r16596).
+
+- Fixed bug in "selection-length" status bar widget: The widget was not added
+ to the edit bus, so it wasn't updated when the edit pane changed.
+ (Shlomy Reinstein)
+
+- Removed write capability to the UrlVFS. Now http:// files are marked
+ read-only. (Eric Le Lay #2805986)
+
+- When having two monitors the About dialog was appearing between them, one half
+ on each monitor. Now it's position is relative to the active View
+ (Matthieu Casanova)
+
+- Selection foreground color broken when soft wrap. (Shlomy Reinstein #2946203)
+
+- Using regex style encoding auto detectors, StringIndexOutOfBoundsException
+ could happen when loading a file. (Kazutoshi Satoda)
+
+- The encoding could be less accurate when opening a file from
+ File System Browser. (SF.net bug #1524181,1721796 - Kazutoshi Satoda)
+
+- ALT key typing with Windows Look&Feel (for menu bar interaction) now
+ behaves a bit closer to native Windows applications.
+ NOTE: It's still incomplete due to some problems in JVM.
+ http://bugs.sun.com/view_bug.do?bug_id=6923687
+ http://bugs.sun.com/view_bug.do?bug_id=6458497
+ ALT key typing is disabled on TextArea for now to prevent the latter
+ problem.
+ (SF.net bug #2795635 - Kazutoshi Satoda)
+
+- HelpViewer loads pages asynchronously (SF.net bug #1231914 - Eric Le Lay)
+
+- Don't replace colons by slashes in canonPath() on Mac OS X
+ (SF.net bug #1488911 - Eric Le Lay - r17754)
+
+- Fix Angle brackets showing up in plugin descriptions in plugin manager
+ (SF.net bug #1963667 - Eric Le Lay)
+
+- Fix SOCKS proxy accessing wrong property.
+ Therefore, SOCKS proxy was never getting enabled.
+ (SF.net patch #2820969 - Milutin JovanoviÄ)
+
+- CopyFileWorker now throws a FileNotFoundException instead of a NPE if
+ the target path is not a directory and it's parent doesn't exists.
+ (Matthieu Casanova)
+
+- CopyFileWorker do not accept that the source and target are the same
+ (Matthieu Casanova)
+
+- Changed GUIUtilities.confirm() to work also from worker threads, by
+ deferring the confirmation dialog to the EDT. This fixes threading
+ issues with HyperSearchRequest, if the number of results exceeds the
+ "max results" option. (Shlomy Reinstein)
+
+- Fix "-reuseview" not bringing the view to the front.
+ (Sf.net bug #1510651 - Shlomy Reinstein)
+
+- Show search bar in full screen mode. (Sf.net bug #2944752 - Shlomy Reinstein)
+
+- Got rid of extra Component created as parent of every JToolBar in
+ GuiUtilities.loadToolBar() (#2114751 - Alan Ezust)
+
+- After using save-as action on a read-only buffer the new buffer is no longer
+ read-only (#3148102 - Matthieu Casanova)
+
+}}}
+{{{ API changes
+
+- API made public:
+ org.gjt.sp.jedit.browser.VFSFileNameField (Marcelo Vanzin)
+
+- Added methods to manage the cursor if the TextArea :
+ In the TextAreaPainter class, added
+ resetCursor()
+ setCursor(Cursor)
+ The cursor behavior is the following :
+ when the cursor is the default one : TEXT_CURSOR,
+ when typing text it is hidden, after moving the mouse it reappears.
+ If a plugin calls setCursor() to replace it for whatever reason,
+ the cursor will not disappear anymore when typing or be changed to
+ TEXT_CURSOR until resetCursor() is called (Matthieu Casanova)
+
+- Introduction of a new ThreadUtilities class implementing a
+ threadpool using Java 1.6 Concurrent API. Use this instead of
+ VFSManager's WorkThreadPool, which is now deprecated.
+ Related: A new Task Monitor dockable which will eventually replace
+ the I/O progress monitor, for showing progress of tasks.
+ Still TODO: rewrite VFSManager + all plugins to use ThreadUtilities
+ instead of WorkThreadPool. (Matthieu Casanova)
+
+- Made method TextUtilities.getCharType() public (Matthieu Casanova)
+
+- Method MiscUtilities.formatFileSize() moved to StandardUtilities
+ (Matthieu Casanova)
+
+- New method E ServiceManager.getService(Class<E> clazz, String name) to get
+ service instance (Matthieu Casanova)
+
+- Register api changed, it now contains Transferable (Matthieu Casanova)
+
+- Added ThreadUtilities utility class (Matthieu Casanova)
+
+- Removed deprecated objectfactory xml parser.
+
+- File System Browser dynamic menu support (#2938170 - François Rey)
+
+- Added a method for unregistering macro handlers: Macros.unregisterHandler().
+
+- bufferSet api rewritten. Now each editPane have its own bufferSet,
+ does not share it with other editPanes. The bufferset scope is the
+ same for all EditPanes. (Matthieu Casanova)
+
+- Status bar widget : it is now possible to use labels starting with letters
+ in status bar. (Matthieu Casanova)
+
+- Removed long deprecated TextArea#isDragInProgress() and
+ TextArea#setDragInProgress(). (SF.net patch #2809776,2936146 - Kevin Hunter)
+
+- EditBus.send() will now always deliver messages on the AWT thread, although
+ it can be called from any thread. (Marcelo Vanzin)
+
+- Added EditBus.sendAsync(): this just enqueues messages to be send over
+ the EditBus as soon as the AWT thread is not busy, and returns immediately.
+ (Marcelo Vanzin)
+
+- Added ability to tag classes with EditBus.EBHandler. This is only useful
+ when tagging an EditPlugin class, and makes the plugin instance behave
+ as if it implemented EBComponent (it's added to the bus when the plugin
+ is activated). (Marcelo Vanzin)
+
+- RFC edit mode was misplaced in catalog and was never matching anything because
+ text edit mode glob was more global and checked first (Matthieu Casanova)
+
+- New ping-pong list component org.gjt.sp.jedit.gui.PingPongList
+ (Matthieu Casanova)
+
+- PluginUpdate bus message now have a method getPluginVersion() that returns
+ the plugin version if there is one (Matthieu Casanova #2953163)
+
+- Added StyleEditor.invokeForCaret(textArea) which does same as
+ buffer.editSyntaxStyle(textArea) did, but can be invoked without
+ specifying the buffer object carefully. (Kazutoshi Satoda)
+
+- HistoryModel's max size is no more defined globally : replaced the static
+ max variable by a per-instance max variable and a static defaultMax variable
+ (Eric Le Lay)
+
+- The JeditBuffer class now have thread-safe getText() params-less convenience
+ method (Vadim Voituk)
+
+- Patch 3008954 to Mode and ModeProvider to allow an exact filename
+ match when selecting the mode for a file. (Patch provided by Bernhard Walle)
+
+- Patch 3022084 added View.closeAllMenus(). (Anshal Shukla)
+
+}}}
+{{{ Editing
+
+- Update for Stata-edit mode (goebbe, # 3019042)
+
+- Added "using" keyword to haXe edit mode (patch #3081482 from Bad Sector,
+ Matthieu Casanova)
+
+- Added visualbasic.xml edit mode (Anonymous submitter, #3031412)
+
+- Added haxe.xml and hxml mode files to support haXe language
+ (Dion Whitehead, François Rey, # 2922986)
+
+- Added plaintex.xml mode file, for plain tex files. (# 2787012 - James Nicholl)
+
+- nsis2.xml update (#2653404 Uwe donovaly)
+
+- sas.xml update (#2926121, 3015899 - goebbe)
+
+- html.erb added to rhtml mode catalog entry. (# 2734062 Sergey Mezentsev)
+
+- Added Go edit mode (#2898646 - Jim Lawton)
+
+- When pasting text copied from the textarea, if the target textarea has
+ no edit mode, the edit mode from the source is copied (Matthieu Casanova)
+
+- Added the missing doxygen commands for doxygen v1.6.1
+ (bug #2895272 - report and patch from Bernhard Walle).
+ doxygen now highlights quoted strings in comments.
+
+- Ruby mode - keyword highlighting bug fix ( # 2868654 - Suraj Kurapati)
+
+- Updated logtalk.xml file (# 2937909 - Paulo Moura)
+
+- Slax Edit Mode ( # 2883030 - curtis_call )
+
+- Json edit mode ( # 2979745 - Dale Anson )
+
+- PHP Smarty Templates Mode ( # 2969956 - Rowan Collins)
+
+- Haskell edit mode rewrite ( # 2993269 - Stephen Blackheath)
+
+- Pure edit mode updates ( # 2988741 - asitdepends)
+
+- url.xml mode (# 1991306 - Kevin Hunter)
+
+- LaTeX mode - code indentation (2872638 - Michael Schlotter)
+
+- 'dot.xml' mode file indent{Open,Close}Brackets wrong
+ (#3008614 - Robin Neatherway)
+
+- Added logtalk.xml mode file (#1945284 - Paulo Moura)
+
+- Added regex.xml mode file (#2782258 - Kevin Hunter)
+
+- Added sip.xml mode file to read sip messages (Matthieu Casanova)
+
+- New paste special action accessible from menu
+ Edit->More clipboard->Paste Special that will suggest different mode to paste
+ data from clipboard, currently plain text, rich jEdit text
+ (plain text + edit mode) and mime type html are supported (Matthieu Casanova)
+
+- Added Ant mode file for Ant build files. (#3016053 - Dale Anson)
+
+- Added TLD mode file for JSP Tag Definition Library files. (#3016054 - Dale Anson)
+
+- Added Maven mode file for Maven pom.xml files. (#3016057 - Dale Anson)
+
+- Updated javacc mode to better highlight keywords and regular expressions. (Dale Anson)
+
+- Updated Django temlate mode to Django 1.2, added missing keywords
+ and better integration with HTML, CSS and JS (Jakub RoztoÄil)
+
+}}}
+{{{ Miscellaneous
+
+- Made the Windows installer buildable completely via wine on non-Windows
+ systems (Björn "Vampire" Kautler)
+
+- Included the Windows launcher in the Java installer (Björn "Vampire" Kautler)
+
+- Made the Windows installer correctly show special characters like german
+ umlauts (Björn "Vampire" Kautler)
+
+- Made the filter tasks use UTF-8 encoding as all our files are UTF-8 encoded
+ (Björn "Vampire" Kautler)
+
+- build files and properties cleanup (Björn "Vampire" Kautler)
+
+- Wrap mode tooltip in status bar now indicates the current wrap mode (Matthieu Casanova)
+
+- Made the Deb Ant task compatible to Ant 1.8+ (Björn "Vampire" Kautler)
+
+- It is now possible to copy several files in the VFS Browser at the same time,
+ and copy from/to the OS explorer (Matthieu Casanova)
+
+- Removed LatestVersion plugin.
+
+- HelpViewer font can be configured via Appearance Option Pane. (#3002186 - Alan Ezust)
+
+- Added actions for eating whitespace at word ends in both directions
+ for findWordStart. (#1953341 - strank)
+
+- Added a configurable selection foreground color. If set, this color will be
+ used for the selection foreground instead of the syntax highlighting color.
+ The new option can be set from Global Options -> Text Area.
+ (Shlomy Reinstein)
+
+- Implemented feature request #2919875: Namable views. You can now specify a
+ name for each view using View -> Set view title. The name is persistent in the
+ perspective.xml file.
+
+- In Hypersearch results panel, the query string length is now limited to 100
+ chars by default for display (Matthieu Casanova)
+
+- Applied patch #2887520: Allow filtering the recent file list using file globs,
+ e.g. "*.java" or "{*.c,*.h}". (Patch provided by Joerg Spieler)
+
+- New status bar widget design (Matthieu Casanova #1540560)
+
+- New Encodings option pane using drag & drop (Matthieu Casanova)
+
+- Parsing buffer local properties is limited to the first 10000 characters of
+ the first and last 10 lines. This is a performance enhancement when loading
+ buffers containing very long lines (Matthieu Casanova)
+
+- Added a new option to perform font substitution in the text area when the
+ current configured font can't display characters in the buffer. It's disabled
+ by default, and can be enabled in the text area option pane, along with the
+ option to choose preferred fonts for substitution. This makes reading files
+ which contain text in multiple scripts more bearable. (Marcelo Vanzin)
+
+- Fixed ModeCatalogHandler so if an edit mode in the user-specific catalog has
+ the same name as an edit mode in the system catalog, the version in the
+ user-specific catalog will override the system default. This is what the
+ documentation for writing an edit mode has stated is true for some time, now
+ it is. (Dale Anson)
+
+- Gave better priorities within modes which matches with a file at the
+ same time, as the following order:
+ - exact filename match
+ - both the filename glob and the first line glob
+ - only the filename glob
+ - the first line glob (Dale Anson)
+
+- In status bar option pane, when adding a widget only widgets that are not
+ already in the bar will be proposed (Matthieu Casanova feature #2937286)
+
+- Added jedit.exe in the Windows installer, so that users can invoke
+ jEdit more like a native application.
+ (Feature Request #2661227, Patch #2984552 - Hisateru Tanaka,
+ and Björn "Vampire" Kautler)
+
+- Added some more encoding detectors as default. (Kazutoshi Satoda)
+
+- Added settings to Activity Log to adjust colors and filter by message type.
+ (Dale Anson)
+
+- Updated 'Make Get and Set' macro. (Dale Anson)
+
+- Ctrl-P and Ctrl-N work from completion popups now (#3080463 - Damien Radtke)
+
+- Added "Replace" button to Search and Replace dialog. This allows a 'replace
+ once' as opposed to 'replace and find'. (#3084224 - Dale Anson)
+
+}}}
+
+}}}
+
+jEdit buffer local properties:
+:folding=explicit:collapseFolds=2:
diff --git a/jEdit/doc/COPYING.DOC.txt b/jEdit/doc/COPYING.DOC.txt
index 96e8e88..b42936b 100644
--- a/jEdit/doc/COPYING.DOC.txt
+++ b/jEdit/doc/COPYING.DOC.txt
@@ -1,355 +1,355 @@
- GNU Free Documentation License
- Version 1.1, March 2000
-
- Copyright (C) 2000 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-0. PREAMBLE
-
-The purpose of this License is to make a manual, textbook, or other
-written document "free" in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially. Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
-
-This License is a kind of "copyleft", which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-
-We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-
-
-1. APPLICABILITY AND DEFINITIONS
-
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License. The "Document", below, refers to any
-such manual or work. Any member of the public is a licensee, and is
-addressed as "you".
-
-A "Modified Version" of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-
-A "Secondary Section" is a named appendix or a front-matter section of
-the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall subject
-(or to related matters) and contains nothing that could fall directly
-within that overall subject. (For example, if the Document is in part a
-textbook of mathematics, a Secondary Section may not explain any
-mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-
-The "Invariant Sections" are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
-
-The "Cover Texts" are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
-
-A "Transparent" copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent. A copy that is
-not "Transparent" is called "Opaque".
-
-Examples of suitable formats for Transparent copies include plain
-ASCII without markup, Texinfo input format, LaTeX input format, SGML
-or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification. Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
-processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
-
-The "Title Page" means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, "Title Page" means
-the text near the most prominent appearance of the work's title,
-preceding the beginning of the body of the text.
-
-
-2. VERBATIM COPYING
-
-You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
-You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-
-
-3. COPYING IN QUANTITY
-
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-
-If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
-If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols. If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
-
-It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-
-
-4. MODIFICATIONS
-
-You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-
-A. Use in the Title Page (and on the covers, if any) a title distinct
- from that of the Document, and from those of previous versions
- (which should, if there were any, be listed in the History section
- of the Document). You may use the same title as a previous version
- if the original publisher of that version gives permission.
-B. List on the Title Page, as authors, one or more persons or entities
- responsible for authorship of the modifications in the Modified
- Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has less than five).
-C. State on the Title page the name of the publisher of the
- Modified Version, as the publisher.
-D. Preserve all the copyright notices of the Document.
-E. Add an appropriate copyright notice for your modifications
- adjacent to the other copyright notices.
-F. Include, immediately after the copyright notices, a license notice
- giving the public permission to use the Modified Version under the
- terms of this License, in the form shown in the Addendum below.
-G. Preserve in that license notice the full lists of Invariant Sections
- and required Cover Texts given in the Document's license notice.
-H. Include an unaltered copy of this License.
-I. Preserve the section entitled "History", and its title, and add to
- it an item stating at least the title, year, new authors, and
- publisher of the Modified Version as given on the Title Page. If
- there is no section entitled "History" in the Document, create one
- stating the title, year, authors, and publisher of the Document as
- given on its Title Page, then add an item describing the Modified
- Version as stated in the previous sentence.
-J. Preserve the network location, if any, given in the Document for
- public access to a Transparent copy of the Document, and likewise
- the network locations given in the Document for previous versions
- it was based on. These may be placed in the "History" section.
- You may omit a network location for a work that was published at
- least four years before the Document itself, or if the original
- publisher of the version it refers to gives permission.
-K. In any section entitled "Acknowledgements" or "Dedications",
- preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements
- and/or dedications given therein.
-L. Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section titles.
-M. Delete any section entitled "Endorsements". Such a section
- may not be included in the Modified Version.
-N. Do not retitle any existing section as "Endorsements"
- or to conflict in title with any Invariant Section.
-
-If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
-You may add a section entitled "Endorsements", provided it contains
-nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
-You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-
-
-5. COMBINING DOCUMENTS
-
-You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice.
-
-The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-
-In the combination, you must combine any sections entitled "History"
-in the various original documents, forming one section entitled
-"History"; likewise combine any sections entitled "Acknowledgements",
-and any sections entitled "Dedications". You must delete all sections
-entitled "Endorsements."
-
-
-6. COLLECTIONS OF DOCUMENTS
-
-You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-
-You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-
-
-7. AGGREGATION WITH INDEPENDENT WORKS
-
-A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation. Such a compilation is called an "aggregate", and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
-
-
-8. TRANSLATION
-
-Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License provided that you also include the
-original English version of this License. In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
-
-
-9. TERMINATION
-
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document 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.
-
-
-10. FUTURE REVISIONS OF THIS LICENSE
-
-The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation 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. See
-http://www.gnu.org/copyleft/.
-
-Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License "or any later version" applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-
-
-ADDENDUM: How to use this License for your documents
-
-To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-
- Copyright (c) YEAR YOUR NAME.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
- or any later version published by the Free Software Foundation;
- with the Invariant Sections being LIST THEIR TITLES, with the
- Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
- A copy of the license is included in the section entitled "GNU
- Free Documentation License".
-
-If you have no Invariant Sections, write "with no Invariant Sections"
-instead of saying which ones are invariant. If you have no
-Front-Cover Texts, write "no Front-Cover Texts" instead of
-"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
-
-If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
+ GNU Free Documentation License
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document 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.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation 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. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/jEdit/doc/COPYING.PLUGINS.txt b/jEdit/doc/COPYING.PLUGINS.txt
index 95289f2..c779c32 100644
--- a/jEdit/doc/COPYING.PLUGINS.txt
+++ b/jEdit/doc/COPYING.PLUGINS.txt
@@ -1,21 +1,21 @@
-Linking jEdit statically or dynamically with other modules is making a
-combined work based on jEdit. Thus, the terms and conditions of the GNU
-General Public License cover the whole combination.
-
-As a special exception, the copyright holders of jEdit give you
-permission to link jEdit with independent modules that communicate with
-jEdit solely through the plugin interface, regardless of the license
-terms of these independent modules, and to copy and distribute the
-resulting combined work under terms of your choice, provided that
-every copy of the combined work is accompanied by a complete copy of
-the source code of jEdit (the version of jEdit used to produce the
-combined work), being distributed under the terms of the GNU General
-Public License plus this exception. An independent module is a module
-which is not derived from or based on jEdit.
-
-Note that people who make modified versions of jEdit are not obligated
-to grant this special exception for their modified versions; it is
-their choice whether to do so. The GNU General Public License gives
-permission to release a modified version without this exception; this
-exception also makes it possible to release a modified version which
-carries forward this exception.
+Linking jEdit statically or dynamically with other modules is making a
+combined work based on jEdit. Thus, the terms and conditions of the GNU
+General Public License cover the whole combination.
+
+As a special exception, the copyright holders of jEdit give you
+permission to link jEdit with independent modules that communicate with
+jEdit solely through the plugin interface, regardless of the license
+terms of these independent modules, and to copy and distribute the
+resulting combined work under terms of your choice, provided that
+every copy of the combined work is accompanied by a complete copy of
+the source code of jEdit (the version of jEdit used to produce the
+combined work), being distributed under the terms of the GNU General
+Public License plus this exception. An independent module is a module
+which is not derived from or based on jEdit.
+
+Note that people who make modified versions of jEdit are not obligated
+to grant this special exception for their modified versions; it is
+their choice whether to do so. The GNU General Public License gives
+permission to release a modified version without this exception; this
+exception also makes it possible to release a modified version which
+carries forward this exception.
diff --git a/jEdit/doc/COPYING.txt b/jEdit/doc/COPYING.txt
index 9285110..a43ea21 100644
--- a/jEdit/doc/COPYING.txt
+++ b/jEdit/doc/COPYING.txt
@@ -1,339 +1,339 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-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 software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, 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 redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-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 Program or any portion
-of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-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 Program, 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 Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) 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; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, 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 executable. 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.
-
-If distribution of executable or 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 counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program 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.
-
- 5. 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 Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program 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.
-
- 7. 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 Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program 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 Program.
-
-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.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program 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.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies 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 Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, 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
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. 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 PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-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.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+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 software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, 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 redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+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 Program or any portion
+of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+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 Program, 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 Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) 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; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, 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 executable. 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.
+
+If distribution of executable or 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 counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program 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.
+
+ 5. 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 Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program 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.
+
+ 7. 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 Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program 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 Program.
+
+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.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program 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.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies 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 Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, 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
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. 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 PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+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.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/jEdit/doc/CORE_GUIDELINES.txt b/jEdit/doc/CORE_GUIDELINES.txt
index e92cdf3..4130b07 100644
--- a/jEdit/doc/CORE_GUIDELINES.txt
+++ b/jEdit/doc/CORE_GUIDELINES.txt
@@ -1,62 +1,62 @@
-Guide to jEdit's core development
-
-
-{{{Independant textarea
-
-First the dependencies with jEdit must be removed.
-It will contains packages
-
-- org.gjt.sp.jedit.buffer
-- org.gjt.sp.jedit.ident
-- org.gjt.sp.jedit.textarea
-- org.gjt.sp.jedit.syntax
-
-
-}}}
-
-{{{Package dependencies requirement
-This part contains the packages and the allowed dependencies for them,
-and their status.
-
-{{{Default dependencies (always allowed)
-- org.gjt.sp.util.*
-- org.gjt.sp.util.jedit.Debug
-- org.gjt.sp.util.jedit.Log
-}}}
-
-
--org.gjt.sp.jedit.TextUtilities (org.gjt.sp.jedit.buffer,
- org.gjt.sp.jedit.syntax)
-
-- org.gjt.sp.util : No dependency (OK)
-
-- org.gjt.sp.jedit.indent : (OK)
- {{{ imports
- -org.gjt.sp.jedit.buffer.*
- -org.gjt.sp.jedit.TextUtilities }}}
-
-
-- org.gjt.sp.jedit.syntax : No dependency (OK)
-
-- org.gjt.sp.jedit.buffer : (NOK)
- {{{ imports
- -org.gjt.sp.jedit.textarea.*
- -org.gjt.sp.jedit.syntax.* }}}
- {{{ misc informations
- -BufferChangeAdapter will not be part of the independent TextArea
- -BufferChangeListener will not be part of the independent TextArea
- JEditBuffer has a dependency on jEdit that must be removed }}}
-
-
-- org.gjt.sp.jedit.textarea : (NOK)
- {{{ imports
- -org.gjt.sp.jedit.buffer.*
- -org.gjt.sp.jedit.syntax.* }}}
-
-
-
-}}}
-
-jEdit buffer local properties:
-:wrap=hard:maxLineLen=72:indentSize=2:
-:folding=explicit:collapseFolds=2:
+Guide to jEdit's core development
+
+
+{{{Independant textarea
+
+First the dependencies with jEdit must be removed.
+It will contains packages
+
+- org.gjt.sp.jedit.buffer
+- org.gjt.sp.jedit.ident
+- org.gjt.sp.jedit.textarea
+- org.gjt.sp.jedit.syntax
+
+
+}}}
+
+{{{Package dependencies requirement
+This part contains the packages and the allowed dependencies for them,
+and their status.
+
+{{{Default dependencies (always allowed)
+- org.gjt.sp.util.*
+- org.gjt.sp.util.jedit.Debug
+- org.gjt.sp.util.jedit.Log
+}}}
+
+
+-org.gjt.sp.jedit.TextUtilities (org.gjt.sp.jedit.buffer,
+ org.gjt.sp.jedit.syntax)
+
+- org.gjt.sp.util : No dependency (OK)
+
+- org.gjt.sp.jedit.indent : (OK)
+ {{{ imports
+ -org.gjt.sp.jedit.buffer.*
+ -org.gjt.sp.jedit.TextUtilities }}}
+
+
+- org.gjt.sp.jedit.syntax : No dependency (OK)
+
+- org.gjt.sp.jedit.buffer : (NOK)
+ {{{ imports
+ -org.gjt.sp.jedit.textarea.*
+ -org.gjt.sp.jedit.syntax.* }}}
+ {{{ misc informations
+ -BufferChangeAdapter will not be part of the independent TextArea
+ -BufferChangeListener will not be part of the independent TextArea
+ JEditBuffer has a dependency on jEdit that must be removed }}}
+
+
+- org.gjt.sp.jedit.textarea : (NOK)
+ {{{ imports
+ -org.gjt.sp.jedit.buffer.*
+ -org.gjt.sp.jedit.syntax.* }}}
+
+
+
+}}}
+
+jEdit buffer local properties:
+:wrap=hard:maxLineLen=72:indentSize=2:
+:folding=explicit:collapseFolds=2:
diff --git a/jEdit/doc/FAQ/faq-contrib.xml b/jEdit/doc/FAQ/faq-contrib.xml
index cff4db8..6077598 100644
--- a/jEdit/doc/FAQ/faq-contrib.xml
+++ b/jEdit/doc/FAQ/faq-contrib.xml
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<appendix id="appendix">
- <title>Contributors</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
-
- <!-- :xml.root=faq.xml: -->
-
- <!-- jEdit FAQ -->
-
- <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
-
- <para>Thanks to those who contributed both questions and answers, including
- the following:</para>
-
- <itemizedlist>
- <listitem>
- <para>Mike Dillon</para>
- </listitem>
-
- <listitem>
- <para>Kris Kopicki</para>
- </listitem>
-
- <listitem>
- <para>Slava Pestov</para>
- </listitem>
-
- <listitem>
- <para>Frank Rocca</para>
- </listitem>
-
- <listitem>
- <para>Maik Schreiber</para>
- </listitem>
-
- <listitem>
- <para>Dominic Stolerman</para>
- </listitem>
- </itemizedlist>
+<?xml version="1.0" encoding="UTF-8"?>
+<appendix id="appendix">
+ <title>Contributors</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
+
+ <!-- :xml.root=faq.xml: -->
+
+ <!-- jEdit FAQ -->
+
+ <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
+
+ <para>Thanks to those who contributed both questions and answers, including
+ the following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Mike Dillon</para>
+ </listitem>
+
+ <listitem>
+ <para>Kris Kopicki</para>
+ </listitem>
+
+ <listitem>
+ <para>Slava Pestov</para>
+ </listitem>
+
+ <listitem>
+ <para>Frank Rocca</para>
+ </listitem>
+
+ <listitem>
+ <para>Maik Schreiber</para>
+ </listitem>
+
+ <listitem>
+ <para>Dominic Stolerman</para>
+ </listitem>
+ </itemizedlist>
</appendix>
\ No newline at end of file
diff --git a/jEdit/doc/FAQ/faq-general.xml b/jEdit/doc/FAQ/faq-general.xml
index 735c9e1..433c030 100644
--- a/jEdit/doc/FAQ/faq-general.xml
+++ b/jEdit/doc/FAQ/faq-general.xml
@@ -1,650 +1,649 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<sect1 id="general">
- <title>General Questions</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
- <!-- :xml.root=faq.xml: -->
- <!-- jEdit FAQ -->
- <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
- <!-- Copyright (C) 2006 Alan Ezust -->
- <para>This section deals with some background information, how to obtain the
- latest version of jEdit and how to obtain further information/help.</para>
- <qandaset defaultlabel="qanda">
- <qandadiv id="about">
- <title>About jEdit</title>
- <qandaentry>
- <question id="whatis">
- <para>What is jEdit?</para>
- </question>
- <answer>
- <para>jEdit is a programmer's text editor written in Java,
- originally developed by Slava Pestov, now maintained by
- others. It has an easy to use interface that resembles that
- of many other Windows and MacOS text editors. It is also
- highly customizable, and contains a <quote>plugin</quote>
- architecture that allows its features to be extended by
- additional programs.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="difftext">
- <para>What is the difference between a text editor and a
- word processor?</para>
- </question>
- <answer>
- <para>These categories are not absolute but refer to the
- primary purpose of an editing program and the focus of its
- features.</para>
- <para>A text editor is an application that edits files
- containing plain text without automatically formatting the
- text for printing or other publication. Typically the
- contents of such a file consists of data used by another
- application - for example, source code that a compiler will
- process or markup text that a web browser will display. A
- word processor deals with the preparation of documents for
- printing or similar publication. Besides editing text, a
- modern word processor allows the user to choose multiple
- fonts, margin sizes, line spacing, indentation, and a
- variety of other details that affect the appearance of the
- document being edited. In a text editor, these features are
- present, if at all, only in a basic form, and for the
- limited purpose of helping the user compose and organize the
- text. In place of word processing features, a text editor
- contains many features that allow the user to prepare and
- work with text quickly and efficiently.</para>
- <para>The jEdit application is a text editor, not a word
- processor. It contains a large assortment of features for
- manipulating source code, markup text, and other text files.
- As a programmer's text editor, it also has many features to
- help programmers manage their projects and work with other
- programming tools.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="features">
- <para>What features does jEdit have?</para>
- </question>
- <answer>
- <para>The short answer is, too many to list here. There is a
- detailed list available on the <ulink
- url="http://www.jedit.org/index.php?page=features">jEdit web
- site</ulink>, but here are some of the major
- features:</para>
- <itemizedlist>
- <listitem>
- <para>Comprehensive online help</para>
- </listitem>
- <listitem>
- <para>Multiple editor windows and split editing panes
- within a single editing window</para>
- </listitem>
- <listitem>
- <para>Unlimited undo/redo</para>
- </listitem>
- <listitem>
- <para>Copy and paste with an unlimited number of
- clipboards (known as <quote>registers</quote>)</para>
- </listitem>
- <listitem>
- <para><quote>Markers</quote> for remembering
- positions in files to return to later</para>
- </listitem>
- <listitem>
- <para>Rectangular selection</para>
- </listitem>
- <listitem>
- <para>Multiple selection for manipulating several
- chunks of text at once</para>
- </listitem>
- <listitem>
- <para>Syntax highlighting for more than 80 file
- types</para>
- </listitem>
- <listitem>
- <para>Intelligent bracket matching that skips quoted
- literals and comments</para>
- </listitem>
- <listitem>
- <para>Auto indent and word wrap</para>
- </listitem>
- <listitem>
- <para>Abbreviations</para>
- </listitem>
- <listitem>
- <para><quote>Folding</quote> display mode that hides
- levels of indented text specified by the user</para>
- </listitem>
- <listitem>
- <para>Search and replace using both literal text and
- regular expressions</para>
- </listitem>
- <listitem>
- <para><quote>HyperSearch</quote> option to show all
- found matches in a list</para>
- </listitem>
- <listitem>
- <para>File management functions available from within
- jEdit, including deleting and renaming files and
- creating new directories</para>
- </listitem>
- <listitem>
- <para>Choice of character encoding for loading and
- saving files</para>
- </listitem>
- <listitem>
- <para>Automatic compression and decompression of
- GZipped (.gz) files</para>
- </listitem>
- <listitem>
- <para>Plugin support for loading files from ZIP and
- TAR archives</para>
- </listitem>
- <listitem>
- <para>Plugin support for loading and saving files on
- FTP servers</para>
- </listitem>
- <listitem>
- <para>Fully customizable keyboard shortcuts, tool bar
- and right-click context menu</para>
- </listitem>
- <listitem>
- <para>Macro system permitting recording and writing
- of macros in the BeanShell scripting language</para>
- </listitem>
- <listitem>
- <para>An internal <quote>plugin manager</quote> that
- downloads and installs new and updated plugins from
- within jEdit</para>
- </listitem>
- </itemizedlist>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="what-plugin">
- <para>What is a jEdit <quote>plugin</quote>?</para>
- </question>
- <answer>
- <para>A plugin is an application that is designed to work
- with jEdit by providing additional features that can be used
- from within the main program. Often the plugin will provide
- a visible user interface in a window that can be docked to
- jEdit's main view window.</para>
- <para>There are currently over 120 publicly available
- plugins that provide such services as a Java source code
- browser, a command-line shell, templated text insertion, and
- source code project management. They can be downloaded,
- installed, and kept current from within jEdit's
- <quote>Plugin Manager</quote>. There is also a section of
- the jEdit web site called <ulink
- url="http://plugins.jedit.org/">Plugin Central</ulink> that
- maintains a descriptive index and download links for all
- publicly available plugins.</para>
- <para>Additional questions and answers regarding plugins may
- be found in the section of this document entitled
- <quote>Working with Plugins</quote>.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="get-doc">
- <para>How do I get documentation on jEdit?</para>
- </question>
- <answer>
- <para>There is a comprehensive User's Guide available from
- within the program using the <guimenu>Help</guimenu> menu.
- The User's Guide can also be downloaded from the <ulink
- url="http://www.jedit.org/index.php?page=download&platform=source">
- jEdit web site</ulink> in Portable Document Format (PDF),
- suitable for online display or printing.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="is-newsgroup">
- <para>Is there a newsgroup or mailing list devoted to
- jEdit?</para>
- </question>
- <answer>
- <para>Currently there is no newsgroup devoted to jEdit.
- There are three active mailing lists that are freely
- available by subscription:</para>
- <itemizedlist>
- <listitem>
- <para>The <ulink
- url="http://lists.sourceforge.net/lists/listinfo/jedit-users">
- jedit-users list</ulink>, for comments and questions
- about using jEdit and its features</para>
- </listitem>
- <listitem>
- <para>The <ulink
- url="http://lists.sourceforge.net/lists/listinfo/jedit-devel">
- jedit-devel list</ulink>, for discussion of
- development issues by members of the developer team
- and other interested persons</para>
- </listitem>
- <listitem>
- <para>The <ulink
- url="http://lists.sourceforge.net/lists/listinfo/jedit-announce">
- jedit-announce list</ulink>, a low-volume list used
- for announcing new releases of jEdit and
- plugins</para>
- </listitem>
- </itemizedlist>
- <para>Each of these lists can be obtained on a full-text
- message or a daily digest basis. The daily digest bundles
- groups of postings in a single email message.</para>
- <para>If you are only interested in version announcements
- and plugin updates, <ulink
- url="http://lists.sourceforge.net/lists/listinfo/jedit-announce">
- subscribe to the jedit-announce list</ulink>. If you would
- like to participate in discussion or ask questions regarding
- jEdit, <ulink
- url="http://lists.sourceforge.net/lists/listinfo/jedit-users">subscribe
- to the jedit-users list</ulink>. If you are interested in
- jEdit's development or want to write plugins, <ulink
- url="http://lists.sourceforge.net/lists/listinfo/jedit-devel">
- subscribe to jedit-devel</ulink>.</para>
- <para>Do not cross-post to both lists. All jEdit developers
- are subscribed to both the jedit-users and jedit-devel
- lists, so a post to jedit-users will be seen by most members
- of both lists. Also, keep in mind that both jEdit-users and
- jEdit-devel are high-traffic lists, and can fill up your
- mailbox unless you check your email regularly.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="is-website">
- <para>Is there a web site devoted to jEdit?</para>
- </question>
- <answer>
- <para>There are several. The official <ulink
- url="http://www.jedit.org">jEdit web site</ulink> contains
- extensive information on all things having to do with jEdit.
- There are also resources available for those interested in
- jEdit development on the <ulink
- url="http://sourceforge.net/projects/jedit">jEdit project
- page</ulink> of the <ulink
- url="http://sourceforge.net">SourceForge web
- site</ulink>.</para>
- <para>The <ulink url="http://community.jedit.org">jEdit
- Community</ulink> web site has articles on jEdit and related
- topics, user-submitted macros and other download resources,
- and listings of web links of interest to jEdit users. It has
- a message board system to allow users to ask questions and
- provide feedback on the project without having to subscribe
- to jEdit's mailing lists. Because the message boards have
- relatively low volume, using the mailing lists will often be
- a more effective approach.</para>
- <para>The jEdit Community site also has an
- <quote>Interactive FAQ</quote> facility that allows you to
- post questions to be answered by other users, and a
- screenshot gallery containing images submitted by
- users.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="copyright">
- <para>Are there copyright restrictions on the use of
- jEdit?</para>
- </question>
- <answer>
- <para>The jEdit application is free, <quote>Open
- Source</quote> software released under the <ulink
- url="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">
- GNU General Public License 2.0</ulink>. This ensures that
- jEdit and its source code remains freely available for use
- and distribution by the public. For specific copyright
- questions, you should review the GPL 2.0 and seek
- appropriate advice. Broadly speaking, there are no
- restrictions on the use of the program as a text editor, and
- its source code can be copied or modified for use in another
- program that is governed by the General Public
- License.</para>
- <para>Plugin application that are available using jEdit's
- Plugin Manager facility, as well as plugins available
- through the <ulink url="http://plugins.jedit.org">Plugin
- Central</ulink> web site or <ulink
- url="http://community.jedit.org">jEdit Community</ulink>,
- are governed either by the General Public License or another
- commonly recognized <quote>Open Source</quote> software
- license. This means that use of the application, including
- use for commercial purposes, is unrestricted without any
- requirement of royalty or license fee payments. To
- incorporate source code or an application or plugin as a
- whole in another application, you must consult the specific
- license terms to determine whether and on what basis you are
- permitted to do so.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="java-only">
- <para>Is jEdit only useful for programming in Java?</para>
- </question>
- <answer>
- <para>Absolutely not. Many of the jEdit's plugin
- applications, and a few of the macros distributed with the
- program, target the Java language or integrate tools used in
- Java development. However, the core application is designed
- to work with any programming or markup language. Included
- with jEdit are packages providing syntax highlighting,
- abbreviations and other programming support for over 60
- programming languages and file types, including C, C++, C#,
- Cobol, HTML, Java, Javascript, Lisp, Pascal, Perl, PHP,
- Python, Ruby, TCL, Visual Basic and XML. The full list can
- be found on the <ulink
- url="http://www.jedit.org/index.php?page=features">jEdit web
- site</ulink>.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="knowing-java">
- <para>Do I need to know Java to use jEdit?</para>
- </question>
- <answer>
- <para>No. In fact, you do not need to know any specific
- programming language other than the ones with which you
- work.</para>
- <para>At some point in your use of jEdit, you will no doubt
- want to write your own macros to execute long or complex
- routines with a single command or keyboard shortcut. Macros
- in jEdit are written in a simplified dialect of Java called
- <ulink url="http://www.beanshell.org"> BeanShell</ulink>.
- Its syntax will be familiar to users of Java, C++ and other
- object-oriented languages, and it is not hard to learn even
- if you have no experience with those languages. The User's
- Guide provided with jEdit contains an extensive tutorial on
- writing macros.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="needed-software">
- <para>What software do I need to install and run
- jEdit?</para>
- </question>
- <answer>
- <para>Since jEdit runs on a Java platform, at a minimum you
- will need a Java Runtime Environment (JRE) package. If you
- are planning to use jEdit to program in Java, you will need
- a full Java Development Kit (JDK) package. We recommend
- obtaining a JDK package.</para>
- <para>The current version of jEdit, version 4.3, requires a
- Java runtime environment having a release version of 1.5 or
- greater. It will not run on versions 1.4 or 1.3. The <ulink
- url="http://www.jedit.org/index.php?page=compatibility">jEdit
- web site</ulink> contains a detailed discussion on the
- compatibility of various publicly available JDK's for the
- major operating systems.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="just-learning">
- <para>I've just started to learn programming. Is jEdit a
- good choice for my first text editor?</para>
- </question>
- <answer>
- <para>It is an excellent choice. Its basic features are
- extremely easy to use, and you will find things like
- abbreviations, keyboard shortcuts and macros to be great
- time-savers. It has built-in packages called <quote>edit
- modes</quote> that automatically display keywords, tags, and
- other program elements in different colors, making it easier
- to view and organize your code. It works well with many Open
- Source and proprietary programming tools. Because of its
- extensive customization features, it can adapt to your
- preferences and work patterns as you become more
- experienced. Finally, it's free, so you can buy a lot of
- programming texts with the money you will save.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- <!--******************************************************** Answers -->
- <qandadiv id="get-answers-div">
- <title>Getting answers</title>
- <qandaentry>
- <question id="get-answers">
- <para>How do I get answers to my questions about
- jEdit?</para>
- </question>
- <answer>
- <para>You should look for answers in the following
- places:</para>
- <itemizedlist>
- <listitem>
- <para>The User's Guide available from the
- application's <guimenu>Help</guimenu> menu.</para>
- </listitem>
- <listitem>
- <para>This FAQ document.</para>
- </listitem>
- <listitem>
- <para>The archives of jEdit's mailing lists. Archives
- for both the <ulink
- url="http://www.geocrawler.com/redir-sf.php3?list=jedit-users">
- jedit-users list</ulink> and the <ulink
- url="http://www.geocrawler.com/redir-sf.php3?list=jedit-devel">
- jedit-devel list</ulink> are available.</para>
- </listitem>
- </itemizedlist>
- <para>If you cannot find help using those resources, post
- your question to the <ulink
- url="mailto:jedit-users at lists.sourceforge.net"> jedit-users
- list</ulink>. You will have to <ulink
- url="http://lists.sourceforge.net/lists/listinfo/jedit-users">
- subscribe to the mailing list</ulink> in order to post, but
- it is well worth it, and you can elect to have daily bundles
- of messages sent to you to keep email traffic down. Many
- questions are answered on the mailing list within 24 hours.
- The developers who respond to user questions generally do
- not send direct replies, so you will need to monitor
- messages from the mailing list is order to obtain an
- answer.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="interactive-help">
- <para>Where can I get interactive help for jEdit?</para>
- </question>
- <answer>
- <para>There is an IRC channel, <filename>#jedit</filename>,
- available on the irc.freenode.net server that is dedicated
- to jEdit support and discussion among developers. You can
- reach it using any IRC client (including Chatzilla), as well
- as the IRC plugin for jEdit.</para>
- <para>There is almost always someone from the developer team
- signed on the channel. Just say hello and describe your
- problem.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- <qandadiv id="bugs">
- <title>Reporting bugs</title>
- <qandaentry>
- <question id="report-bugs">
- <para>How do I report a bug I have found in jEdit?</para>
- </question>
- <answer>
- <para>To be as helpful as possible to the jEdit developer
- team and other users, you should use the <ulink
- url="http://sourceforge.net/tracker/index.php?group_id=588&atid=100588">
- bug tracker database</ulink> that the jEdit project
- maintains on the <ulink
- url="http://sourceforge.net/">SourceForge web site</ulink>.
- You need to be a SourceForge member to post a bug
- report.</para>
- <para>Before posting a bug report, spend a few moments
- searching the bug database to see if a similar report has
- already been made. The bug tracker has a search facility
- that will let search for bug reports using a variety of
- criteria. If you find a similar bug report, and you have
- additional information to contribute, post a comment to the
- report. If you do not find a similar bug report, submit a
- new report.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="bug-report">
- <para>What information should I include in a bug
- report?</para>
- </question>
- <answer>
- <para>The form in the bug tracker report provides several
- fields for submitting information. If you are unsure about a
- particular item, leave it at the default setting provided in
- the form.</para>
- <para>The more important fields are <quote>Category</quote>,
- <quote>Summary</quote> and the <quote>Initial
- comment</quote>. When you write your initial comment
- describing the bug, you should specify the versions of
- jEdit, the Java platform and operating system you are using,
- because bugs often arise that are specific to particular
- versions. Sometimes the bug arises from the Java runtime
- environment or even the operating system, and knowing these
- details helps the developer team design testing and other
- debugging strategies.</para>
- <para>One of the macros installed with jEdit is called
- <guimenuitem>Make Bug Report</guimenuitem>. You will it find
- under the <guimenuitem>Misc</guimenuitem> category of the
- <guimenu>Macros </guimenu> menu. This macro extracts
- information regarding your jEdit installation and a stack
- trace from the last error recorded by jEdit's Activity Log
- and places it in a new text buffer. In many cases, the
- information furnished by the macro is all that is necessary
- to provide a helpful description of a bug. You can simply
- cut and paste the output of the macro into the
- <quote>Initial comment</quote> field of the bug report
- form.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="bug-track">
- <para>How do I track the status of a jEdit bug
- report?</para>
- </question>
- <answer>
- <para>If you know the bug report number, go to this web
- address:
- <userinput>http://sourceforge.net/tracker/index.php?func=detail&aid=######&group_id=588&atid=100588</userinput>,
- where <userinput>######</userinput> is the bug report
- number. If you don't know the bug report number, you can
- browse and search the <ulink
- url="http://sourceforge.net/tracker/index.php?group_id=588&atid=100588">
- bug database</ulink> to find the problem in which you are
- interested.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- <qandadiv id="contact">
- <title>Contacting jEdit developers</title>
- <qandaentry>
- <question id="contact-team">
- <para>How do I contact members of the jEdit developer
- team?</para>
- </question>
- <answer>
- <para>If you want to ask a question, make a feature request
- or offer other general comments, the easiest way is to join
- and post a message to the <ulink
- url="mailto:jedit-users at lists.sourceforge.net"> jedit-users
- mailing list</ulink>. All developers are members. If you are
- interested in working on jEdit or writing a plugin for it,
- use the <ulink
- url="mailto:jedit-users at lists.sourceforge.net"> jedit-devel
- list</ulink>. Email addresses for individual developers can
- be found on the <ulink
- url="http://sourceforge.net/project/memberlist.php?group_id=588">
- SourceForge web site</ulink>.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- <qandadiv id="latest-version">
- <title>Getting the latest version</title>
- <qandaentry>
- <question id="get-latest-version">
- <para>How do I obtain the latest version of jEdit?</para>
- </question>
- <answer>
- <para>The program is in a continuing state of evolution. It
- is usually available in two versions, a
- <quote>stable</quote> version and a
- <quote>development</quote> version. A stable version
- represents a release of jEdit that is considered to be free
- of serious bugs or performance problems and suitable for
- general use. A <quote>development</quote> version includes
- new features or new elements of program design that require
- testing and possible further refinement. A development
- version contains the token <quote>pre</quote> in its version
- number, as in <literal>4.3pre5</literal>.</para>
- <para>The latest stable and development versions of jEdit
- are always available from the <ulink
- url="http://www.jedit.org">jEdit web site</ulink> and from
- the <ulink
- url="http://sourceforge.net/ projects/jedit">jEdit
- project page</ulink> of the <ulink
- url="http://sourceforge.net">SourceForge web site</ulink>,
- which hosts jEdit's development resources.</para>
- <para>In addition, a plugin named <application>Check jEdit
- Version</application> can be run from within jEdit by
- selecting <guimenuitem>Check jEdit Version</guimenuitem>
- from the application's <guimenu>Plugins</guimenu> menu. It
- queries the jEdit web site, compares version information
- with the version of the currently running instance of jEdit,
- and reports the result to the user in a message box. It will
- tell you if you do not have the latest version of jEdit,
- regardless of whether that version is in
- <quote>stable</quote> or <quote>development</quote>
- form.</para>
- <para>Finally, if you subscribe to the <ulink
- url="http://lists.sourceforge.net/lists/listinfo/jedit-announce">
- jedit-announce</ulink> or <ulink
- url="http://lists.sourceforge.net/lists/listinfo/jedit-users">
- jedit-users</ulink> mailing lists, you will receive an email
- whenever a new release of jEdit becomes available.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="get-source">
- <para>How do I obtain a copy of the jEdit source
- code?</para>
- </question>
- <answer>
- <para>The latest version of jEdit's source code is available
- from the <ulink
- url="http://www.jedit.org/index.php?page=download&platform=source">
- jEdit web site</ulink> or the <ulink
- url="http://sourceforge.net/project/showfiles.php?group_id=588">
- SourceForge web site</ulink>. The web site provides the
- source code for the latest stable and development version,
- while the SourceForge site has a more extensive archive
- covering earlier versions.</para>
- <para>If you are interested in testing the absolutely latest
- changes to jEdit, and you are familiar with compiling your
- own Java programs and working with Subversion, you can
- download the current code maintained in the <ulink
- url="http://jedit.svn.sourceforge.net/viewvc/jedit/">SourceForge
- SVN repository</ulink>.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="get-latest-faq">
- <para>Where can I get the latest version of this
- document?</para>
- </question>
- <answer>
- <para>The latest release of this document is available on
- the <ulink url="http://www.jedit.org/FAQ/index.html">jEdit
- web site</ulink>.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="jedit-compile">
- <para>How do you set the classpath and compile the Java
- files in jEdit?</para>
- </question>
- <answer>
- <para>Consult an article on the <ulink
- url="http://community.jedit.org">jEdit Community</ulink> web
- site entitled <quote>Build jEdit yourself: the 'Open' in
- Open Source</quote>.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- </qandaset>
+<?xml version="1.0" encoding="UTF-8"?>
+<sect1 id="general">
+ <title>General Questions</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
+ <!-- :xml.root=faq.xml: -->
+ <!-- jEdit FAQ -->
+ <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
+ <!-- Copyright (C) 2006 Alan Ezust -->
+ <para>This section deals with some background information, how to obtain the
+ latest version of jEdit and how to obtain further information/help.</para>
+ <qandaset defaultlabel="qanda">
+ <qandadiv id="about">
+ <title>About jEdit</title>
+ <qandaentry>
+ <question id="whatis">
+ <para>What is jEdit?</para>
+ </question>
+ <answer>
+ <para>jEdit is a programmer's text editor written in Java,
+ originally developed by Slava Pestov, now maintained by
+ others. It has an easy to use interface that resembles that
+ of many other Windows and MacOS text editors. It is also
+ highly customizable, and contains a <quote>plugin</quote>
+ architecture that allows its features to be extended by
+ additional programs.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="difftext">
+ <para>What is the difference between a text editor and a
+ word processor?</para>
+ </question>
+ <answer>
+ <para>These categories are not absolute but refer to the
+ primary purpose of an editing program and the focus of its
+ features.</para>
+ <para>A text editor is an application that edits files
+ containing plain text without automatically formatting the
+ text for printing or other publication. Typically the
+ contents of such a file consists of data used by another
+ application - for example, source code that a compiler will
+ process or markup text that a web browser will display. A
+ word processor deals with the preparation of documents for
+ printing or similar publication. Besides editing text, a
+ modern word processor allows the user to choose multiple
+ fonts, margin sizes, line spacing, indentation, and a
+ variety of other details that affect the appearance of the
+ document being edited. In a text editor, these features are
+ present, if at all, only in a basic form, and for the
+ limited purpose of helping the user compose and organize the
+ text. In place of word processing features, a text editor
+ contains many features that allow the user to prepare and
+ work with text quickly and efficiently.</para>
+ <para>The jEdit application is a text editor, not a word
+ processor. It contains a large assortment of features for
+ manipulating source code, markup text, and other text files.
+ As a programmer's text editor, it also has many features to
+ help programmers manage their projects and work with other
+ programming tools.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="features">
+ <para>What features does jEdit have?</para>
+ </question>
+ <answer>
+ <para>The short answer is, too many to list here. There is a
+ detailed list available on the <ulink
+ url="http://www.jedit.org/index.php?page=features">jEdit web
+ site</ulink>, but here are some of the major
+ features:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Comprehensive online help</para>
+ </listitem>
+ <listitem>
+ <para>Multiple editor windows and split editing panes
+ within a single editing window</para>
+ </listitem>
+ <listitem>
+ <para>Unlimited undo/redo</para>
+ </listitem>
+ <listitem>
+ <para>Copy and paste with an unlimited number of
+ clipboards (known as <quote>registers</quote>)</para>
+ </listitem>
+ <listitem>
+ <para><quote>Markers</quote> for remembering
+ positions in files to return to later</para>
+ </listitem>
+ <listitem>
+ <para>Rectangular selection</para>
+ </listitem>
+ <listitem>
+ <para>Multiple selection for manipulating several
+ chunks of text at once</para>
+ </listitem>
+ <listitem>
+ <para>Syntax highlighting for more than 80 file
+ types</para>
+ </listitem>
+ <listitem>
+ <para>Intelligent bracket matching that skips quoted
+ literals and comments</para>
+ </listitem>
+ <listitem>
+ <para>Auto indent and word wrap</para>
+ </listitem>
+ <listitem>
+ <para>Abbreviations</para>
+ </listitem>
+ <listitem>
+ <para><quote>Folding</quote> display mode that hides
+ levels of indented text specified by the user</para>
+ </listitem>
+ <listitem>
+ <para>Search and replace using both literal text and
+ regular expressions</para>
+ </listitem>
+ <listitem>
+ <para><quote>HyperSearch</quote> option to show all
+ found matches in a list</para>
+ </listitem>
+ <listitem>
+ <para>File management functions available from within
+ jEdit, including deleting and renaming files and
+ creating new directories</para>
+ </listitem>
+ <listitem>
+ <para>Choice of character encoding for loading and
+ saving files</para>
+ </listitem>
+ <listitem>
+ <para>Automatic compression and decompression of
+ GZipped (.gz) files</para>
+ </listitem>
+ <listitem>
+ <para>Plugin support for loading files from ZIP and
+ TAR archives</para>
+ </listitem>
+ <listitem>
+ <para>Plugin support for loading and saving files on
+ FTP servers</para>
+ </listitem>
+ <listitem>
+ <para>Fully customizable keyboard shortcuts, tool bar
+ and right-click context menu</para>
+ </listitem>
+ <listitem>
+ <para>Macro system permitting recording and writing
+ of macros in the BeanShell scripting language</para>
+ </listitem>
+ <listitem>
+ <para>An internal <quote>plugin manager</quote> that
+ downloads and installs new and updated plugins from
+ within jEdit</para>
+ </listitem>
+ </itemizedlist>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="what-plugin">
+ <para>What is a jEdit <quote>plugin</quote>?</para>
+ </question>
+ <answer>
+ <para>A plugin is an application that is designed to work
+ with jEdit by providing additional features that can be used
+ from within the main program. Often the plugin will provide
+ a visible user interface in a window that can be docked to
+ jEdit's main view window.</para>
+ <para>There are currently over 120 publicly available
+ plugins that provide such services as a Java source code
+ browser, a command-line shell, templated text insertion, and
+ source code project management. They can be downloaded,
+ installed, and kept current from within jEdit's
+ <quote>Plugin Manager</quote>. There is also a section of
+ the jEdit web site called <ulink
+ url="http://plugins.jedit.org/">Plugin Central</ulink> that
+ maintains a descriptive index and download links for all
+ publicly available plugins.</para>
+ <para>Additional questions and answers regarding plugins may
+ be found in the section of this document entitled
+ <quote>Working with Plugins</quote>.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="get-doc">
+ <para>How do I get documentation on jEdit?</para>
+ </question>
+ <answer>
+ <para>There is a comprehensive User's Guide available from
+ within the program using the <guimenu>Help</guimenu> menu.
+ The User's Guide can also be downloaded from the <ulink
+ url="http://www.jedit.org/index.php?page=download&platform=source">
+ jEdit web site</ulink> in Portable Document Format (PDF),
+ suitable for online display or printing.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="is-newsgroup">
+ <para>Is there a newsgroup or mailing list devoted to
+ jEdit?</para>
+ </question>
+ <answer>
+ <para>Currently there is no newsgroup devoted to jEdit.
+ There are three active mailing lists that are freely
+ available by subscription:</para>
+ <itemizedlist>
+ <listitem>
+ <para>The <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/jedit-users">
+ jedit-users list</ulink>, for comments and questions
+ about using jEdit and its features</para>
+ </listitem>
+ <listitem>
+ <para>The <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/jedit-devel">
+ jedit-devel list</ulink>, for discussion of
+ development issues by members of the developer team
+ and other interested persons</para>
+ </listitem>
+ <listitem>
+ <para>The <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/jedit-announce">
+ jedit-announce list</ulink>, a low-volume list used
+ for announcing new releases of jEdit and
+ plugins</para>
+ </listitem>
+ </itemizedlist>
+ <para>Each of these lists can be obtained on a full-text
+ message or a daily digest basis. The daily digest bundles
+ groups of postings in a single email message.</para>
+ <para>If you are only interested in version announcements
+ and plugin updates, <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/jedit-announce">
+ subscribe to the jedit-announce list</ulink>. If you would
+ like to participate in discussion or ask questions regarding
+ jEdit, <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/jedit-users">subscribe
+ to the jedit-users list</ulink>. If you are interested in
+ jEdit's development or want to write plugins, <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/jedit-devel">
+ subscribe to jedit-devel</ulink>.</para>
+ <para>Do not cross-post to both lists. All jEdit developers
+ are subscribed to both the jedit-users and jedit-devel
+ lists, so a post to jedit-users will be seen by most members
+ of both lists. Also, keep in mind that both jEdit-users and
+ jEdit-devel are high-traffic lists, and can fill up your
+ mailbox unless you check your email regularly.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="is-website">
+ <para>Is there a web site devoted to jEdit?</para>
+ </question>
+ <answer>
+ <para>There are several. The official <ulink
+ url="http://www.jedit.org">jEdit web site</ulink> contains
+ extensive information on all things having to do with jEdit.
+ There are also resources available for those interested in
+ jEdit development on the <ulink
+ url="http://sourceforge.net/projects/jedit">jEdit project
+ page</ulink> of the <ulink
+ url="http://sourceforge.net">SourceForge web
+ site</ulink>.</para>
+ <para>The <ulink url="http://community.jedit.org">jEdit
+ Community</ulink> web site has articles on jEdit and related
+ topics, user-submitted macros and other download resources,
+ and listings of web links of interest to jEdit users. It has
+ a message board system to allow users to ask questions and
+ provide feedback on the project without having to subscribe
+ to jEdit's mailing lists. Because the message boards have
+ relatively low volume, using the mailing lists will often be
+ a more effective approach.</para>
+ <para>The jEdit Community site also has an
+ <quote>Interactive FAQ</quote> facility that allows you to
+ post questions to be answered by other users, and a
+ screenshot gallery containing images submitted by
+ users.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="copyright">
+ <para>Are there copyright restrictions on the use of
+ jEdit?</para>
+ </question>
+ <answer>
+ <para>The jEdit application is free, <quote>Open
+ Source</quote> software released under the <ulink
+ url="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">
+ GNU General Public License 2.0</ulink>. This ensures that
+ jEdit and its source code remains freely available for use
+ and distribution by the public. For specific copyright
+ questions, you should review the GPL 2.0 and seek
+ appropriate advice. Broadly speaking, there are no
+ restrictions on the use of the program as a text editor, and
+ its source code can be copied or modified for use in another
+ program that is governed by the General Public
+ License.</para>
+ <para>Plugin application that are available using jEdit's
+ Plugin Manager facility, as well as plugins available
+ through the <ulink url="http://plugins.jedit.org">Plugin
+ Central</ulink> web site or <ulink
+ url="http://community.jedit.org">jEdit Community</ulink>,
+ are governed either by the General Public License or another
+ commonly recognized <quote>Open Source</quote> software
+ license. This means that use of the application, including
+ use for commercial purposes, is unrestricted without any
+ requirement of royalty or license fee payments. To
+ incorporate source code or an application or plugin as a
+ whole in another application, you must consult the specific
+ license terms to determine whether and on what basis you are
+ permitted to do so.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="java-only">
+ <para>Is jEdit only useful for programming in Java?</para>
+ </question>
+ <answer>
+ <para>Absolutely not. Many of the jEdit's plugin
+ applications, and a few of the macros distributed with the
+ program, target the Java language or integrate tools used in
+ Java development. However, the core application is designed
+ to work with any programming or markup language. Included
+ with jEdit are packages providing syntax highlighting,
+ abbreviations and other programming support for over 60
+ programming languages and file types, including C, C++, C#,
+ Cobol, HTML, Java, Javascript, Lisp, Pascal, Perl, PHP,
+ Python, Ruby, TCL, Visual Basic and XML. The full list can
+ be found on the <ulink
+ url="http://www.jedit.org/index.php?page=features">jEdit web
+ site</ulink>.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="knowing-java">
+ <para>Do I need to know Java to use jEdit?</para>
+ </question>
+ <answer>
+ <para>No. In fact, you do not need to know any specific
+ programming language other than the ones with which you
+ work.</para>
+ <para>At some point in your use of jEdit, you will no doubt
+ want to write your own macros to execute long or complex
+ routines with a single command or keyboard shortcut. Macros
+ in jEdit are written in a simplified dialect of Java called
+ <ulink url="http://www.beanshell.org"> BeanShell</ulink>.
+ Its syntax will be familiar to users of Java, C++ and other
+ object-oriented languages, and it is not hard to learn even
+ if you have no experience with those languages. The User's
+ Guide provided with jEdit contains an extensive tutorial on
+ writing macros.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="needed-software">
+ <para>What software do I need to install and run
+ jEdit?</para>
+ </question>
+ <answer>
+ <para>Since jEdit runs on a Java platform, at a minimum you
+ will need a Java Runtime Environment (JRE) package. If you
+ are planning to use jEdit to program in Java, you will need
+ a full Java Development Kit (JDK) package. We recommend
+ obtaining a JDK package.</para>
+ <para>The current version of jEdit requires a
+ Java runtime environment having a release version of 1.6 or greater. The <ulink
+ url="http://www.jedit.org/index.php?page=compatibility">jEdit
+ web site</ulink> contains a detailed discussion on the
+ compatibility of various publicly available JDK's for the
+ major operating systems.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="just-learning">
+ <para>I've just started to learn programming. Is jEdit a
+ good choice for my first text editor?</para>
+ </question>
+ <answer>
+ <para>It is an excellent choice. Its basic features are
+ extremely easy to use, and you will find things like
+ abbreviations, keyboard shortcuts and macros to be great
+ time-savers. It has built-in packages called <quote>edit
+ modes</quote> that automatically display keywords, tags, and
+ other program elements in different colors, making it easier
+ to view and organize your code. It works well with many Open
+ Source and proprietary programming tools. Because of its
+ extensive customization features, it can adapt to your
+ preferences and work patterns as you become more
+ experienced. Finally, it's free, so you can buy a lot of
+ programming texts with the money you will save.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ <!--******************************************************** Answers -->
+ <qandadiv id="get-answers-div">
+ <title>Getting answers</title>
+ <qandaentry>
+ <question id="get-answers">
+ <para>How do I get answers to my questions about
+ jEdit?</para>
+ </question>
+ <answer>
+ <para>You should look for answers in the following
+ places:</para>
+ <itemizedlist>
+ <listitem>
+ <para>The User's Guide available from the
+ application's <guimenu>Help</guimenu> menu.</para>
+ </listitem>
+ <listitem>
+ <para>This FAQ document.</para>
+ </listitem>
+ <listitem>
+ <para>The archives of jEdit's mailing lists. Archives
+ for both the <ulink
+ url="http://www.geocrawler.com/redir-sf.php3?list=jedit-users">
+ jedit-users list</ulink> and the <ulink
+ url="http://www.geocrawler.com/redir-sf.php3?list=jedit-devel">
+ jedit-devel list</ulink> are available.</para>
+ </listitem>
+ </itemizedlist>
+ <para>If you cannot find help using those resources, post
+ your question to the <ulink
+ url="mailto:jedit-users at lists.sourceforge.net"> jedit-users
+ list</ulink>. You will have to <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/jedit-users">
+ subscribe to the mailing list</ulink> in order to post, but
+ it is well worth it, and you can elect to have daily bundles
+ of messages sent to you to keep email traffic down. Many
+ questions are answered on the mailing list within 24 hours.
+ The developers who respond to user questions generally do
+ not send direct replies, so you will need to monitor
+ messages from the mailing list is order to obtain an
+ answer.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="interactive-help">
+ <para>Where can I get interactive help for jEdit?</para>
+ </question>
+ <answer>
+ <para>There is an IRC channel, <filename>#jedit</filename>,
+ available on the irc.freenode.net server that is dedicated
+ to jEdit support and discussion among developers. You can
+ reach it using any IRC client (including Chatzilla), as well
+ as the IRC plugin for jEdit.</para>
+ <para>There is almost always someone from the developer team
+ signed on the channel. Just say hello and describe your
+ problem.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ <qandadiv id="bugs">
+ <title>Reporting bugs</title>
+ <qandaentry>
+ <question id="report-bugs">
+ <para>How do I report a bug I have found in jEdit?</para>
+ </question>
+ <answer>
+ <para>To be as helpful as possible to the jEdit developer
+ team and other users, you should use the <ulink
+ url="http://sourceforge.net/tracker/index.php?group_id=588&atid=100588">
+ bug tracker database</ulink> that the jEdit project
+ maintains on the <ulink
+ url="http://sourceforge.net/">SourceForge web site</ulink>.
+ You need to be a SourceForge member to post a bug
+ report.</para>
+ <para>Before posting a bug report, spend a few moments
+ searching the bug database to see if a similar report has
+ already been made. The bug tracker has a search facility
+ that will let search for bug reports using a variety of
+ criteria. If you find a similar bug report, and you have
+ additional information to contribute, post a comment to the
+ report. If you do not find a similar bug report, submit a
+ new report.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="bug-report">
+ <para>What information should I include in a bug
+ report?</para>
+ </question>
+ <answer>
+ <para>The form in the bug tracker report provides several
+ fields for submitting information. If you are unsure about a
+ particular item, leave it at the default setting provided in
+ the form.</para>
+ <para>The more important fields are <quote>Category</quote>,
+ <quote>Summary</quote> and the <quote>Initial
+ comment</quote>. When you write your initial comment
+ describing the bug, you should specify the versions of
+ jEdit, the Java platform and operating system you are using,
+ because bugs often arise that are specific to particular
+ versions. Sometimes the bug arises from the Java runtime
+ environment or even the operating system, and knowing these
+ details helps the developer team design testing and other
+ debugging strategies.</para>
+ <para>One of the macros installed with jEdit is called
+ <guimenuitem>Make Bug Report</guimenuitem>. You will it find
+ under the <guimenuitem>Misc</guimenuitem> category of the
+ <guimenu>Macros </guimenu> menu. This macro extracts
+ information regarding your jEdit installation and a stack
+ trace from the last error recorded by jEdit's Activity Log
+ and places it in a new text buffer. In many cases, the
+ information furnished by the macro is all that is necessary
+ to provide a helpful description of a bug. You can simply
+ cut and paste the output of the macro into the
+ <quote>Initial comment</quote> field of the bug report
+ form.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="bug-track">
+ <para>How do I track the status of a jEdit bug
+ report?</para>
+ </question>
+ <answer>
+ <para>If you know the bug report number, go to this web
+ address:
+ <userinput>http://sourceforge.net/tracker/index.php?func=detail&aid=######&group_id=588&atid=100588</userinput>,
+ where <userinput>######</userinput> is the bug report
+ number. If you don't know the bug report number, you can
+ browse and search the <ulink
+ url="http://sourceforge.net/tracker/index.php?group_id=588&atid=100588">
+ bug database</ulink> to find the problem in which you are
+ interested.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ <qandadiv id="contact">
+ <title>Contacting jEdit developers</title>
+ <qandaentry>
+ <question id="contact-team">
+ <para>How do I contact members of the jEdit developer
+ team?</para>
+ </question>
+ <answer>
+ <para>If you want to ask a question, make a feature request
+ or offer other general comments, the easiest way is to join
+ and post a message to the <ulink
+ url="mailto:jedit-users at lists.sourceforge.net"> jedit-users
+ mailing list</ulink>. All developers are members. If you are
+ interested in working on jEdit or writing a plugin for it,
+ use the <ulink
+ url="mailto:jedit-users at lists.sourceforge.net"> jedit-devel
+ list</ulink>. Email addresses for individual developers can
+ be found on the <ulink
+ url="http://sourceforge.net/project/memberlist.php?group_id=588">
+ SourceForge web site</ulink>.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ <qandadiv id="latest-version">
+ <title>Getting the latest version</title>
+ <qandaentry>
+ <question id="get-latest-version">
+ <para>How do I obtain the latest version of jEdit?</para>
+ </question>
+ <answer>
+ <para>The program is in a continuing state of evolution. It
+ is usually available in two versions, a
+ <quote>stable</quote> version and a
+ <quote>development</quote> version. A stable version
+ represents a release of jEdit that is considered to be free
+ of serious bugs or performance problems and suitable for
+ general use. A <quote>development</quote> version includes
+ new features or new elements of program design that require
+ testing and possible further refinement. A development
+ version contains the token <quote>pre</quote> in its version
+ number, as in <literal>4.5pre1</literal>.</para>
+ <para>The latest stable and development versions of jEdit
+ are always available from the <ulink
+ url="http://www.jedit.org">jEdit web site</ulink> and from
+ the <ulink
+ url="http://sourceforge.net/ projects/jedit">jEdit
+ project page</ulink> of the <ulink
+ url="http://sourceforge.net">SourceForge web site</ulink>,
+ which hosts jEdit's development resources.</para>
+ <para>In addition, a plugin named <application>Check jEdit
+ Version</application> can be run from within jEdit by
+ selecting <guimenuitem>Check jEdit Version</guimenuitem>
+ from the application's <guimenu>Plugins</guimenu> menu. It
+ queries the jEdit web site, compares version information
+ with the version of the currently running instance of jEdit,
+ and reports the result to the user in a message box. It will
+ tell you if you do not have the latest version of jEdit,
+ regardless of whether that version is in
+ <quote>stable</quote> or <quote>development</quote>
+ form.</para>
+ <para>Finally, if you subscribe to the <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/jedit-announce">
+ jedit-announce</ulink> or <ulink
+ url="http://lists.sourceforge.net/lists/listinfo/jedit-users">
+ jedit-users</ulink> mailing lists, you will receive an email
+ whenever a new release of jEdit becomes available.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="get-source">
+ <para>How do I obtain a copy of the jEdit source
+ code?</para>
+ </question>
+ <answer>
+ <para>The latest version of jEdit's source code is available
+ from the <ulink
+ url="http://www.jedit.org/index.php?page=download&platform=source">
+ jEdit web site</ulink> or the <ulink
+ url="http://sourceforge.net/project/showfiles.php?group_id=588">
+ SourceForge web site</ulink>. The web site provides the
+ source code for the latest stable and development version,
+ while the SourceForge site has a more extensive archive
+ covering earlier versions.</para>
+ <para>If you are interested in testing the absolutely latest
+ changes to jEdit, and you are familiar with compiling your
+ own Java programs and working with Subversion, you can
+ download the current code maintained in the <ulink
+ url="http://jedit.svn.sourceforge.net/viewvc/jedit/">SourceForge
+ SVN repository</ulink>.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="get-latest-faq">
+ <para>Where can I get the latest version of this
+ document?</para>
+ </question>
+ <answer>
+ <para>The latest release of this document is available on
+ the <ulink url="http://www.jedit.org/FAQ/index.html">jEdit
+ web site</ulink>.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="jedit-compile">
+ <para>How do you set the classpath and compile the Java
+ files in jEdit?</para>
+ </question>
+ <answer>
+ <para>Consult an article on the <ulink
+ url="http://community.jedit.org">jEdit Community</ulink> web
+ site entitled <quote>Build jEdit yourself: the 'Open' in
+ Open Source</quote>.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ </qandaset>
</sect1>
\ No newline at end of file
diff --git a/jEdit/doc/FAQ/faq-install.xml b/jEdit/doc/FAQ/faq-install.xml
index 18f2eef..0b1b15a 100644
--- a/jEdit/doc/FAQ/faq-install.xml
+++ b/jEdit/doc/FAQ/faq-install.xml
@@ -1,281 +1,279 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<sect1 id="installation">
- <title>Installation Questions</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
-
- <!-- :xml.root=faq.xml: -->
-
- <!-- jEdit FAQ -->
-
- <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
-
- <para>This section deals with installing jEdit using the Java-based
- installation program, as well as installation issues that are specific to
- particular operating systems.</para>
-
- <qandaset defaultlabel="qanda">
- <qandadiv id="install-general">
- <title>General installation questions</title>
-
- <qandaentry>
- <question id="easy-howto-install">
- <para>What is the easiest way to install jEdit?</para>
- </question>
-
- <answer>
- <para>First, make sure you have a working installation of
- the Java platform. To run jEdit, you will a platform package
- having a version number of at least 1.5.0_06. If you do not
- have the Java platform, we recommend downloading the larger
- <quote>Software Development Kit</quote> (SDK), instead of
- the smaller <quote>Java Runtime Environment</quote> (JRE),
- because you will need the tools supplied with the SDK if you
- will be using Java for development. You will need to know
- the path of the Java application launcher, which is called
- <filename>java.exe</filename> on Windows systems and simply
- <filename>java</filename> on others.</para>
-
- <para>Next, decide whether you want the current stable
- version or the latest development version. As a general
- rule, the stable version is a good choice for first-time
- users. However, jEdit 4.3pre7 has been in development for a
- couple of years now, and it is definitely "stable" enough
- for beginners. Download the Java installer for the version
- you have chosen from the jEdit web site; it consists of a
- single file with a name in the style
- <filename>jeditXXXinstall.jar</filename>. This file is a
- compressed archive containing all of the files you need for
- jEdit to run as well as an installer application written in
- Java. You can put this file anywhere on your hard disk that
- is convenient.</para>
-
- <para>To run the installer, do whatever you normally do to
- run a Java jar archive. If this is your first time, follow
- these steps:</para>
-
- <procedure>
- <step>
- <para>Open a terminal or command interpreter
- window.</para>
- </step>
-
- <step>
- <para>Change the current directory to the directory
- in which you have stored the jEdit installer
- file.</para>
- </step>
-
- <step>
- <para>Run this command: <userinput>[full path to java
- application launcher] -jar
- jeditXXXinstall.jar</userinput></para>
- </step>
- </procedure>
-
- <para>The installer will load and display a series of
- dialogs for selecting a few simple options, including the
- directory in which you wish jEdit installed. It will also
- tell you how much disk space you need for the main program
- and various installation options.</para>
-
- <para>If this is your first download of jEdit, you should
- definitely install the set of macros that come with the
- application. Many of them are useful for all programmers,
- and even the ones you don't use can serve as models when you
- eventually begin writing your own macros.</para>
-
- <para>The installation process is very short. If you are
- installing the program on Windows and you select the
- jEditLauncher option, you should be able to start jEdit by
- clicking on any of the icons that the installation program
- provides. On other systems, you can enter
- <userinput>jedit</userinput> in a terminal window or create
- your own desktop or menu shortcut.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="java-web-start">
- <para>Why is there no Java Web Start version of
- jEdit?</para>
- </question>
-
- <answer>
- <para>In Java Web Start, dynamically-loaded classes (ie,
- plugins) run in a sandbox unless they are explicitly signed.
- Also, the protocol handler API prevents protocol handlers
- from being added if they are not loaded via the system class
- loader (i.e via the Java Web Start class loader). So the
- lack of plugin support and jeditresource protocol makes it
- useless.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="install-upgrade">
- <para>How do I upgrade from one release of jEdit to
- another?</para>
- </question>
-
- <answer>
- <para>Simply delete the existing jEdit directory and run the
- installer (if any) to install the new version. Settings are
- kept in <filename>~/.jedit</filename>, and will not be
- affected.</para>
- </answer>
- </qandaentry>
- </qandadiv>
-
- <qandadiv id="install-mac">
- <title>Installing jEdit on MacOS</title>
-
- <qandaentry>
- <question id="install.mac9-basic">
- <para>How do I install jEdit on MacOS 8 or MacOS 9? s</para>
- </question>
-
- <answer>
- <para>The latest version of jEdit, version 4.3, requires
- MacOS X (preferably 10.4 or later), because the Java
- platforms of earlier MacOS version out outdated.</para>
-
- <para>Once you have completed installing jEdit locate the
- jedit.jar file and do the following:</para>
-
- <procedure>
- <step>
- <para>Drag the <filename>jedit.jar</filename> to
- JBinary and JBinary will launch.</para>
- </step>
-
- <step>
- <para>In the Command window in the Class path box
- replace <userinput>jedit</userinput> with
- <userinput>org.gjt.sp.jedit.jEdit</userinput>.</para>
- </step>
-
- <step>
- <para>Then click the Save settings button. It will
- ask for an application name and will create a
- double-clickable icon on your desktop.</para>
- </step>
-
- <step>
- <para>Double-click on your icon to launch
- jEdit.</para>
- </step>
- </procedure>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>How do I uninstall jEdit for Mac OS?</para>
- </question>
-
- <answer>
- <para>There are no system files, so simply drop the jEdit
- folder in the trash. If you want to remove the settings
- directory used by jEdit you will find it at
- <filename>~/.jedit</filename>. It is hidden, so you will
- need to remove it from the command line, or use one of the
- various uilities available that will let you see it.</para>
- </answer>
- </qandaentry>
- </qandadiv>
-
- <qandadiv id="install-windows">
- <title>Installing jEdit on Windows</title>
-
- <qandaentry>
- <question id="install-windows-basic">
- <para>Is there anything different about installing jEdit on
- Windows?</para>
- </question>
-
- <answer>
- <para>For the Microsoft Windows family of operating systems,
- jEdit provides an additional package of features called
- jEditLauncher. These features include: <itemizedlist>
- <listitem>
- <para>Built-in shortcut icons for launching
- jEdit;</para>
- </listitem>
-
- <listitem>
- <para>Support for opening files in jEdit using custom
- entries in the context (right-click) menu of the
- Windows shell;</para>
- </listitem>
-
- <listitem>
- <para>Support for running BeanShell scripts in jEdit
- from outside the application;</para>
- </listitem>
-
- <listitem>
- <para>Support for launching jEdit and loading files
- using scripting languages such as VBScript, Perl and
- Python;</para>
- </listitem>
-
- <listitem>
- <para>Automatic uninstallation of jEdit using the
- <quote>Add/Remove Programs</quote> applet in Control
- Panel.</para>
- </listitem>
- </itemizedlist> The package is a recommended option that
- is selected by default when you install jEdit. The Java
- installer application launches a separate Windows installer
- module for the native Windows executables that comprise the
- jEditLauncher package. If the installation involves an
- upgrade, you may be asked to reboot your computer to
- complete the process.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="install-windows-components">
- <para>Do I need any special Windows components to run
- jEditLauncher?</para>
- </question>
-
- <answer>
- <para>Regardless of the version of Windows that you use, if
- you have kept it reasonably up-to-date with service packs or
- component upgrades from Microsoft, you should have no
- trouble running jEditLauncher. Users of Windows 98, Windows
- ME, Windows NT (version 4.0), Windows 2000 and Windows XP
- have not reported problems involving missing
- components.</para>
-
- <para>Some users of older versions of Windows 95 may need to
- upgrade their version of the Windows Sockets package. Others
- may be missing Microsoft's package for supporting DCOM
- (Distributed Component Object Model) components on Windows
- 95. Both the <ulink
- url="http://www.microsoft.com/windows95/downloads/contents/wuadmintools/s_wunetworkingtools/w95sockets2/">
- Windows Sockets upgrade</ulink> and the <ulink
- url="http://www.microsoft.com/com/dcom/dcom95/dcom1_3.asp">
- DCOM package</ulink> are available for download from
- Microsoft.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="install-windows-vm">
- <para>Can I run jEdit on Microsoft's virtual machine?</para>
- </question>
-
- <answer>
- <para>The latest version of jEdit, version 4.3, requires at
- least version 1.5 of the Java 2 platform, and therefore may
- not be compatible with 3rd party virtual machines.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- </qandaset>
+<?xml version="1.0" encoding="UTF-8"?>
+<sect1 id="installation">
+ <title>Installation Questions</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
+
+ <!-- :xml.root=faq.xml: -->
+
+ <!-- jEdit FAQ -->
+
+ <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
+
+ <para>This section deals with installing jEdit using the Java-based
+ installation program, as well as installation issues that are specific to
+ particular operating systems.</para>
+
+ <qandaset defaultlabel="qanda">
+ <qandadiv id="install-general">
+ <title>General installation questions</title>
+
+ <qandaentry>
+ <question id="easy-howto-install">
+ <para>What is the easiest way to install jEdit?</para>
+ </question>
+
+ <answer>
+ <para>First, make sure you have a working installation of
+ the Java platform. To run jEdit, you will a platform package
+ having a version number of at least 1.6. If you do not
+ have the Java platform, we recommend downloading the larger
+ <quote>Software Development Kit</quote> (SDK), instead of
+ the smaller <quote>Java Runtime Environment</quote> (JRE),
+ because you will need the tools supplied with the SDK if you
+ will be using Java for development. You will need to know
+ the path of the Java application launcher, which is called
+ <filename>java.exe</filename> on Windows systems and simply
+ <filename>java</filename> on others.</para>
+
+ <para>Next, decide whether you want the current "stable"
+ version or the latest development version. As a general
+ rule, the stable version is a good choice for first-time
+ users. Download the Java installer for the version
+ you have chosen from the jEdit web site; it consists of a
+ single file with a name in the style
+ <filename>jeditXXXinstall.jar</filename>. This file is a
+ compressed archive containing all of the files you need for
+ jEdit to run as well as an installer application written in
+ Java. You can put this file anywhere on your hard disk that
+ is convenient.</para>
+
+ <para>To run the installer, do whatever you normally do to
+ run a Java jar archive. If this is your first time, follow
+ these steps:</para>
+
+ <procedure>
+ <step>
+ <para>Open a terminal or command interpreter
+ window.</para>
+ </step>
+
+ <step>
+ <para>Change the current directory to the directory
+ in which you have stored the jEdit installer
+ file.</para>
+ </step>
+
+ <step>
+ <para>Run this command: <userinput>[full path to java
+ application launcher] -jar
+ jeditXXXinstall.jar</userinput></para>
+ </step>
+ </procedure>
+
+ <para>The installer will load and display a series of
+ dialogs for selecting a few simple options, including the
+ directory in which you wish jEdit installed. It will also
+ tell you how much disk space you need for the main program
+ and various installation options.</para>
+
+ <para>If this is your first download of jEdit, you should
+ definitely install the set of macros that come with the
+ application. Many of them are useful for all programmers,
+ and even the ones you don't use can serve as models when you
+ eventually begin writing your own macros.</para>
+
+ <para>The installation process is very short. If you are
+ installing the program on Windows and you select the
+ jEditLauncher option, you should be able to start jEdit by
+ clicking on any of the icons that the installation program
+ provides. On other systems, you can enter
+ <userinput>jedit</userinput> in a terminal window or create
+ your own desktop or menu shortcut.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="java-web-start">
+ <para>Why is there no Java Web Start version of
+ jEdit?</para>
+ </question>
+
+ <answer>
+ <para>In Java Web Start, dynamically-loaded classes (ie,
+ plugins) run in a sandbox unless they are explicitly signed.
+ Also, the protocol handler API prevents protocol handlers
+ from being added if they are not loaded via the system class
+ loader (i.e via the Java Web Start class loader). So the
+ lack of plugin support and jeditresource protocol makes it
+ useless.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="install-upgrade">
+ <para>How do I upgrade from one release of jEdit to
+ another?</para>
+ </question>
+
+ <answer>
+ <para>Simply delete the existing jEdit directory and run the
+ installer (if any) to install the new version. Settings are
+ kept in <filename>~/.jedit</filename>, and will not be
+ affected.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+
+ <qandadiv id="install-mac">
+ <title>Installing jEdit on MacOS</title>
+
+ <qandaentry>
+ <question id="install.mac9-basic">
+ <para>How do I install jEdit on MacOS 8 or MacOS 9? s</para>
+ </question>
+
+ <answer>
+ <para>The latest version of jEdit requires
+ MacOS X (preferably 10.5 or later), because the Java
+ platforms of earlier MacOS versions are outdated.</para>
+
+ <para>Once you have completed installing jEdit locate the
+ jedit.jar file and do the following:</para>
+
+ <procedure>
+ <step>
+ <para>Drag the <filename>jedit.jar</filename> to
+ JBinary and JBinary will launch.</para>
+ </step>
+
+ <step>
+ <para>In the Command window in the Class path box
+ replace <userinput>jedit</userinput> with
+ <userinput>org.gjt.sp.jedit.jEdit</userinput>.</para>
+ </step>
+
+ <step>
+ <para>Then click the Save settings button. It will
+ ask for an application name and will create a
+ double-clickable icon on your desktop.</para>
+ </step>
+
+ <step>
+ <para>Double-click on your icon to launch
+ jEdit.</para>
+ </step>
+ </procedure>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question>
+ <para>How do I uninstall jEdit for Mac OS?</para>
+ </question>
+
+ <answer>
+ <para>There are no system files, so simply drop the jEdit
+ folder in the trash. If you want to remove the settings
+ directory used by jEdit you will find it at
+ <filename>~/.jedit</filename>. It is hidden, so you will
+ need to remove it from the command line, or use one of the
+ various uilities available that will let you see it.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+
+ <qandadiv id="install-windows">
+ <title>Installing jEdit on Windows</title>
+
+ <qandaentry>
+ <question id="install-windows-basic">
+ <para>Is there anything different about installing jEdit on
+ Windows?</para>
+ </question>
+
+ <answer>
+ <para>For the Microsoft Windows family of operating systems,
+ jEdit provides an additional package of features called
+ jEditLauncher. These features include: <itemizedlist>
+ <listitem>
+ <para>Built-in shortcut icons for launching
+ jEdit;</para>
+ </listitem>
+
+ <listitem>
+ <para>Support for opening files in jEdit using custom
+ entries in the context (right-click) menu of the
+ Windows shell;</para>
+ </listitem>
+
+ <listitem>
+ <para>Support for running BeanShell scripts in jEdit
+ from outside the application;</para>
+ </listitem>
+
+ <listitem>
+ <para>Support for launching jEdit and loading files
+ using scripting languages such as VBScript, Perl and
+ Python;</para>
+ </listitem>
+
+ <listitem>
+ <para>Automatic uninstallation of jEdit using the
+ <quote>Add/Remove Programs</quote> applet in Control
+ Panel.</para>
+ </listitem>
+ </itemizedlist> The package is a recommended option that
+ is selected by default when you install jEdit. The Java
+ installer application launches a separate Windows installer
+ module for the native Windows executables that comprise the
+ jEditLauncher package. If the installation involves an
+ upgrade, you may be asked to reboot your computer to
+ complete the process.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="install-windows-components">
+ <para>Do I need any special Windows components to run
+ jEditLauncher?</para>
+ </question>
+
+ <answer>
+ <para>Regardless of the version of Windows that you use, if
+ you have kept it reasonably up-to-date with service packs or
+ component upgrades from Microsoft, you should have no
+ trouble running jEditLauncher. Users of Windows 98, Windows
+ ME, Windows NT (version 4.0), Windows 2000 and Windows XP
+ have not reported problems involving missing
+ components.</para>
+
+ <para>Some users of older versions of Windows 95 may need to
+ upgrade their version of the Windows Sockets package. Others
+ may be missing Microsoft's package for supporting DCOM
+ (Distributed Component Object Model) components on Windows
+ 95. Both the <ulink
+ url="http://www.microsoft.com/windows95/downloads/contents/wuadmintools/s_wunetworkingtools/w95sockets2/">
+ Windows Sockets upgrade</ulink> and the <ulink
+ url="http://www.microsoft.com/com/dcom/dcom95/dcom1_3.asp">
+ DCOM package</ulink> are available for download from
+ Microsoft.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="install-windows-vm">
+ <para>Can I run jEdit on Microsoft's virtual machine?</para>
+ </question>
+
+ <answer>
+ <para>The latest version of jEdit requires at
+ least version 1.6 of the Java 2 platform, and therefore may
+ not be compatible with 3rd party virtual machines.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ </qandaset>
</sect1>
\ No newline at end of file
diff --git a/jEdit/doc/FAQ/faq-intro.xml b/jEdit/doc/FAQ/faq-intro.xml
index e726bbd..3823531 100644
--- a/jEdit/doc/FAQ/faq-intro.xml
+++ b/jEdit/doc/FAQ/faq-intro.xml
@@ -1,32 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<sect1 id="intro">
- <title>Introduction</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
-
- <!-- :xml.root=faq.xml: -->
-
- <!-- jEdit FAQ -->
-
- <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
-
- <para>This document explains many of the basic features of jEdit and
- provides solutions for commonly encountered problems. It is not the
- principal resource for learning how to use and customize jEdit. The
- application includes an extensive User's Guide available from within jEdit
- by selecting <guimenuitem>jEdit Help</guimenuitem> on the
- <guimenu>Help</guimenu> menu.</para>
-
- <para>The User's Guide includes tutorials on writing macros and plugins as
- well as an annotated guide to jEdit's Application Programming Interface
- (API). It is worth browsing through the User's Guide to get a full sense of
- what jEdit has to offer. This document is intended to supplement the User's
- Guide by focusing on specific, relatively narrow topics in the traditional
- question-and-answer format.</para>
-
- <para>Each section of this document deals with a different category of
- topics, and each begins with a listing of the questions covered. This should
- allow you to find the information you are seeking quickly.</para>
+<?xml version="1.0" encoding="UTF-8"?>
+<sect1 id="intro">
+ <title>Introduction</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
+
+ <!-- :xml.root=faq.xml: -->
+
+ <!-- jEdit FAQ -->
+
+ <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
+
+ <para>This document explains many of the basic features of jEdit and
+ provides solutions for commonly encountered problems. It is not the
+ principal resource for learning how to use and customize jEdit. The
+ application includes an extensive User's Guide available from within jEdit
+ by selecting <guimenuitem>jEdit Help</guimenuitem> on the
+ <guimenu>Help</guimenu> menu.</para>
+
+ <para>The User's Guide includes tutorials on writing macros and plugins as
+ well as an annotated guide to jEdit's Application Programming Interface
+ (API). It is worth browsing through the User's Guide to get a full sense of
+ what jEdit has to offer. This document is intended to supplement the User's
+ Guide by focusing on specific, relatively narrow topics in the traditional
+ question-and-answer format.</para>
+
+ <para>Each section of this document deals with a different category of
+ topics, and each begins with a listing of the questions covered. This should
+ allow you to find the information you are seeking quickly.</para>
</sect1>
\ No newline at end of file
diff --git a/jEdit/doc/FAQ/faq-legal.xml b/jEdit/doc/FAQ/faq-legal.xml
index e331e8e..9c2486b 100644
--- a/jEdit/doc/FAQ/faq-legal.xml
+++ b/jEdit/doc/FAQ/faq-legal.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<appendix id="legal-notice">
- <title>Legal Notice</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
-
- <!-- :xml.root=faq.xml: -->
-
- <!-- jEdit FAQ -->
-
- <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
-
- <!-- Copyright (C) 2006 Alan Ezust -->
-
- <para>Permission is granted to copy, distribute and/or modify this document
- under the terms of the <ulink url="http://www.gnu.org/licenses/fdl.html">
- GNU Free Documentation License</ulink>, Version 1.1 or any later version
- published by the Free Software Foundation; with no <quote>Invariant
- Sections</quote>, <quote>Front-Cover Texts</quote> or <quote>Back-Cover
- Texts</quote>, each as defined in the license. A copy of the license is
- contained in the file <filename>COPYING.DOC.txt</filename> included with
- jEdit.</para>
+<?xml version="1.0" encoding="UTF-8"?>
+<appendix id="legal-notice">
+ <title>Legal Notice</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
+
+ <!-- :xml.root=faq.xml: -->
+
+ <!-- jEdit FAQ -->
+
+ <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
+
+ <!-- Copyright (C) 2006 Alan Ezust -->
+
+ <para>Permission is granted to copy, distribute and/or modify this document
+ under the terms of the <ulink url="http://www.gnu.org/licenses/fdl.html">
+ GNU Free Documentation License</ulink>, Version 1.1 or any later version
+ published by the Free Software Foundation; with no <quote>Invariant
+ Sections</quote>, <quote>Front-Cover Texts</quote> or <quote>Back-Cover
+ Texts</quote>, each as defined in the license. A copy of the license is
+ contained in the file <filename>COPYING.DOC.txt</filename> included with
+ jEdit.</para>
</appendix>
\ No newline at end of file
diff --git a/jEdit/doc/FAQ/faq-macros.xml b/jEdit/doc/FAQ/faq-macros.xml
index ce5d47d..9c4548c 100644
--- a/jEdit/doc/FAQ/faq-macros.xml
+++ b/jEdit/doc/FAQ/faq-macros.xml
@@ -1,134 +1,134 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<sect1 id="macros">
- <title>Macros</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
-
- <!-- :xml.root=faq.xml: -->
-
- <!-- jEdit FAQ -->
-
- <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
-
- <para>This section deals with questions on writing and running
- macros.</para>
-
- <qandaset defaultlabel="qanda">
- <qandadiv id="macro-using">
- <title>Using macros</title>
-
- <qandaentry>
- <question id="macro-getting">
- <para>Where can I get macro's from?</para>
- </question>
-
- <answer>
- <para>There is a plugin available called MacroManager that
- will provide a similar interface to jEdit's plugin manager
- for installing new macros. The plugin downloads the macros
- from the jEdit Community site, so an internet connection is
- necessary.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="macro-new-store">
- <para>I just wrote a new macro for myself. Where should I
- save the file?</para>
- </question>
-
- <answer>
- <para>There is a <filename>macros</filename> directory in
- your user settings directory. If you store your macro there
- it will appear in jEdit's <guimenu>Macros</guimenu> menu
- under the name you have given to the macro's source code
- file. The <filename>.bsh</filename> will be deleted in the
- macro entry, and underscore characters will be converted to
- whitespace, so that the file
- <filename>My_New_Macro.bsh</filename> will be displayed as
- <guimenuitem>My New Macro</guimenuitem>.</para>
-
- <para>You can create additional subdirectories in the
- <filename>macros</filename>to organize your personal macros
- by category. Each subdirectory will correspond to a submenu
- under the application's <guimenu>Macros</guimenu> menu. This
- is helpful to reduce the screen space used to display the
- macros menu at any one time.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="macro-new-ext">
- <para>Do I have to use the <filename>.bsh</filename> file
- extension when I save one of my own macro scripts?</para>
- </question>
-
- <answer>
- <para>You need the <filename>.bsh</filename> extension in
- order for jEdit to detect and display the name of the macro
- in its <guimenu>Macros</guimenu> menu. The macro must also
- be in the <filename>macros</filename> directory of either
- the jEdit installation directory or the user settings
- directory.</para>
-
- <para>You do not need the extension to run a macro, however.
- By selecting <guimenu>Macros</guimenu>><guimenuitem>Run
- Other Macro...</guimenuitem>, you can choose any file to be
- run as a macro. While in a macro, you can call
- <userinput>source("full_path")</userinput> to do the same
- thing.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="macro-temp">
- <para>How can I store the result of a macro so that the next
- time I run it the macro can retrieve the value?</para>
- </question>
-
- <answer>
- <para>You can use either
- <userinput>jEdit.setProperty(String, String)</userinput> or
- <userinput>jEdit.setTemporaryProperty(String,
- String)</userinput>. Both methods take
- <classname>String</classname> values for the name of the
- property and its value. If you use
- <userinput>setProperty()</userinput>, the property will
- remain in jEdit's property store permanently, so if you only
- need the value during the course of a single editing
- session, use
- <userinput>setTemporaryProperty()</userinput>.</para>
-
- <para>To ensure that your value can be stored regardless of
- its type, use the following syntax:<programlisting>jEdit.setTemporaryProperty("myValueName", myValue.toString());</programlisting>
- and remember to convert the <quote>myValueName</quote>
- property back to its intended type when you retrieve
- it.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="macro-exec">
- <para>In a macro I'd like to exec an external program (e.g.
- jmk, javac) and capture its output to a buffer. I'd also
- like to see this output as the external program runs or be
- able to interact with the program. So when I exec, what
- happens to System.in/out/err of the exec'd program?</para>
- </question>
-
- <answer>
- <para>Use the <filename>runInSystemShell()</filename> or the
- <filename>runCommandToBuffer()</filename> script methods
- that come bundled with the Console plugin. The help
- documentation for Console provides details on these methods.
- Currently the Console's System shell is not interactive
- during execution of a command, but it does receive and
- display the standard output and error streams of the
- external process.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- </qandaset>
+<?xml version="1.0" encoding="UTF-8"?>
+<sect1 id="macros">
+ <title>Macros</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=4:noTabs=false:maxLineLen=72:tabSize=4: -->
+
+ <!-- :xml.root=faq.xml: -->
+
+ <!-- jEdit FAQ -->
+
+ <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
+
+ <para>This section deals with questions on writing and running
+ macros.</para>
+
+ <qandaset defaultlabel="qanda">
+ <qandadiv id="macro-using">
+ <title>Using macros</title>
+
+ <qandaentry>
+ <question id="macro-getting">
+ <para>Where can I get macro's from?</para>
+ </question>
+
+ <answer>
+ <para>There is a plugin available called MacroManager that
+ will provide a similar interface to jEdit's plugin manager
+ for installing new macros. The plugin downloads the macros
+ from the jEdit Community site, so an internet connection is
+ necessary.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="macro-new-store">
+ <para>I just wrote a new macro for myself. Where should I
+ save the file?</para>
+ </question>
+
+ <answer>
+ <para>There is a <filename>macros</filename> directory in
+ your user settings directory. If you store your macro there
+ it will appear in jEdit's <guimenu>Macros</guimenu> menu
+ under the name you have given to the macro's source code
+ file. The <filename>.bsh</filename> will be deleted in the
+ macro entry, and underscore characters will be converted to
+ whitespace, so that the file
+ <filename>My_New_Macro.bsh</filename> will be displayed as
+ <guimenuitem>My New Macro</guimenuitem>.</para>
+
+ <para>You can create additional subdirectories in the
+ <filename>macros</filename>to organize your personal macros
+ by category. Each subdirectory will correspond to a submenu
+ under the application's <guimenu>Macros</guimenu> menu. This
+ is helpful to reduce the screen space used to display the
+ macros menu at any one time.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="macro-new-ext">
+ <para>Do I have to use the <filename>.bsh</filename> file
+ extension when I save one of my own macro scripts?</para>
+ </question>
+
+ <answer>
+ <para>You need the <filename>.bsh</filename> extension in
+ order for jEdit to detect and display the name of the macro
+ in its <guimenu>Macros</guimenu> menu. The macro must also
+ be in the <filename>macros</filename> directory of either
+ the jEdit installation directory or the user settings
+ directory.</para>
+
+ <para>You do not need the extension to run a macro, however.
+ By selecting <guimenu>Macros</guimenu>><guimenuitem>Run
+ Other Macro...</guimenuitem>, you can choose any file to be
+ run as a macro. While in a macro, you can call
+ <userinput>source("full_path")</userinput> to do the same
+ thing.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="macro-temp">
+ <para>How can I store the result of a macro so that the next
+ time I run it the macro can retrieve the value?</para>
+ </question>
+
+ <answer>
+ <para>You can use either
+ <userinput>jEdit.setProperty(String, String)</userinput> or
+ <userinput>jEdit.setTemporaryProperty(String,
+ String)</userinput>. Both methods take
+ <classname>String</classname> values for the name of the
+ property and its value. If you use
+ <userinput>setProperty()</userinput>, the property will
+ remain in jEdit's property store permanently, so if you only
+ need the value during the course of a single editing
+ session, use
+ <userinput>setTemporaryProperty()</userinput>.</para>
+
+ <para>To ensure that your value can be stored regardless of
+ its type, use the following syntax:<programlisting>jEdit.setTemporaryProperty("myValueName", myValue.toString());</programlisting>
+ and remember to convert the <quote>myValueName</quote>
+ property back to its intended type when you retrieve
+ it.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="macro-exec">
+ <para>In a macro I'd like to exec an external program (e.g.
+ jmk, javac) and capture its output to a buffer. I'd also
+ like to see this output as the external program runs or be
+ able to interact with the program. So when I exec, what
+ happens to System.in/out/err of the exec'd program?</para>
+ </question>
+
+ <answer>
+ <para>Use the <filename>runInSystemShell()</filename> or the
+ <filename>runCommandToBuffer()</filename> script methods
+ that come bundled with the Console plugin. The help
+ documentation for Console provides details on these methods.
+ Currently the Console's System shell is not interactive
+ during execution of a command, but it does receive and
+ display the standard output and error streams of the
+ external process.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ </qandaset>
</sect1>
\ No newline at end of file
diff --git a/jEdit/doc/FAQ/faq-plugins.xml b/jEdit/doc/FAQ/faq-plugins.xml
index 301a180..3f286ce 100644
--- a/jEdit/doc/FAQ/faq-plugins.xml
+++ b/jEdit/doc/FAQ/faq-plugins.xml
@@ -1,171 +1,171 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<sect1 id="plugins">
- <title>Plugin Questions</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :indentSize=4:noTabs=false:maxLineLen=80:tabSize=4: -->
- <!-- :xml.root=faq.xml: -->
- <!-- jEdit FAQ -->
- <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
- <para>This section deals with questions concerning the use of jEdit's
- plugins. Plugins are applications that share jEdit's memory space and user
- interface and provide a wide variety of functions and services.</para>
- <qandaset defaultlabel="qanda">
- <qandadiv id="plugin-general">
- <title>General plugin questions</title>
- <qandaentry>
- <question id="plugins-latest-official">
- <para>Where can I get information on the latest available
- <quote>official</quote> plugins?</para>
- </question>
- <answer>
- <para>To get a listing of the latest plugins available for
- downloading from jEdit Plugin Central, use the
- <guimenuitem>Plugin Manager</guimenuitem> feature on jEdit's
- <guimenu>Plugin</guimenu> menu. You can also get more
- detailed descriptions of the plugins from the <ulink
- url="http://plugins.jedit.org">Plugin Central</ulink> web
- site.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="plugins-latest-beta">
- <para>Where can I get information on new plugins under
- development?</para>
- </question>
- <answer>
- <para>We encourage plugin developers to join the
- <email>jedit-devel at lists.sourceforge.net</email> mailing
- list. There, you will find the greatest concentration of
- people who are also familiar with the core and its
- plugins.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="plugin-install-manual">
- <para>How do I install a plugin manually, without using the
- Plugin Manager?</para>
- </question>
- <answer>
- <para>Copy the plugin's jar archive file (or files, if there
- are more than one) to the <filename>/jars</filename>
- subdirectory of either (a) the directory in which jEdit is
- installed, or (b) your user settings directory (which you
- can find by evaluating the BeanShell expression
- <userinput>jEdit.getSettingsDirectory()</userinput>.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="plugins-developing">
- <para>How do I write a plugin?</para>
- </question>
- <answer>
- <para>Writing a plugin requires a working knowledge of Java
- and some familiarity with jEdit's Plugin API. There is a
- tutorial on plugin development in the jEdit User's Guide.
- The source code distribution for jEdit also includes the
- source for an example plugin, <application>Quick
- Notepad</application>, which is discussed in the
- tutorial.</para>
- <para>To learn more about plugin development, take a look at
- the source code for other plugins, particularly those whose
- features or user interface you might use as a model. The
- <ulink url="mailto:jedit-devel at lists.sourceforge.net">jedit-devel mailing
- list</ulink> and the message boards at <ulink
- url="http://community.jedit.org">jEdit Community</ulink> are
- also available for specific questions.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="plugin-irc">
- <para>Is there an IRC (Internet Relay Chat) plugin for
- jEdit?</para>
- </question>
- <answer>
- <para>Yes. Open the Plugin Manager, then select
- <guimenuitem>Install plugins</guimenuitem>. You will find
- the IRC plugin which you can select for installation.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="plugin-console-execute">
- <para>Is it possible to execute my application from within
- jEdit?</para>
- </question>
- <answer>
- <para>Yes. You can use the System shell of the Console
- plugin to run your application.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="plugin-cvs">
- <para>Can I work with cvs/svn/Perforce/cogito/mercurial
- under jEdit? Is there a plugin for my favorite SCCS system?
- How can I send a command from jEdit to cvs/svn without
- leaving my editor?</para>
- </question>
- <answer>
- <para>The SVNPlugin supports Subversion browsing, diffing
- (via JDiff) and other common operations.</para>
- <para>With *NIX (or cygwin), the Console plugin
- documentation has some ideas on how to use jEdit as the
- <literal>VISUAL</literal> editor when called from the
- cvs/svn/hg command-line tools, all of which can be run from
- the Console dockable.</para>
- <para>The ProjectViewer plugin has some support for reading
- the "entries" file for each directory, to decide which files
- to import. CVS/SVN are built-in.</para>
- <para>The P4Plugin adds Perforce support to ProjectViewer,
- and has some other advanced features for working with
- Perforce repositories.</para>
- <para>You can use jEdit as your default editor from WinCVS:
- specify <userinput>jedit.exe</userinput> as your default
- viewer and editor to automate the opening of file.</para>
- <para>GruntSpud and jEditCvs are not maintained, but do
- offer CVS support on jEdit 4.2final.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="plugin-debugger">
- <para>Is there a debugger plugin?</para>
- </question>
- <answer>
- <para>A plugin based on the version 1.4 of the JSwat
- debugger application is currently available for download
- using jEdit's Plugin Manager feature. The JDebugger plugin
- is also available. JPyDebugger offers debugging for Python.
- The GdbPlugin provides gdb/mi support for C/C++
- programs. Also, the Console BeanShell can be used to debug Java classes in the current running JVM. See <xref linkend="plugin-debugging" /> for more info. </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="plugins-xslt">
- <para>Any development on integrating an XSL parser? It would
- be great to have the possibility to do XSL + XSLT ->
- XHTML development in the same environment as other
- development.</para>
- </question>
- <answer>
- <para>There is currently one plugin available called XSLT.
- The XSLT plugin provides features for: transforming XML
- using XSL transformation stylesheets; evaluating XPath
- expressions on XML and displaying results; and indenting
- XML.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="plugins-ssh">
- <para>Is there a plugin to enable editing of remote files
- over FTP or SSH?</para>
- </question>
- <answer>
- <para>The FTP plugin allows remote editing of files over the
- <literal>SFTP://</literal> and <literal>FTP://</literal>
- protocols. <literal>HTTP://</literal> is supported natively
- in jEdit. The <literal>FTPS://</literal> and
- <literal>FISH://</literal> protocols are not supported
- yet.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- </qandaset>
+<?xml version="1.0" encoding="UTF-8"?>
+<sect1 id="plugins">
+ <title>Plugin Questions</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :indentSize=4:noTabs=false:maxLineLen=80:tabSize=4: -->
+ <!-- :xml.root=faq.xml: -->
+ <!-- jEdit FAQ -->
+ <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
+ <para>This section deals with questions concerning the use of jEdit's
+ plugins. Plugins are applications that share jEdit's memory space and user
+ interface and provide a wide variety of functions and services.</para>
+ <qandaset defaultlabel="qanda">
+ <qandadiv id="plugin-general">
+ <title>General plugin questions</title>
+ <qandaentry>
+ <question id="plugins-latest-official">
+ <para>Where can I get information on the latest available
+ <quote>official</quote> plugins?</para>
+ </question>
+ <answer>
+ <para>To get a listing of the latest plugins available for
+ downloading from jEdit Plugin Central, use the
+ <guimenuitem>Plugin Manager</guimenuitem> feature on jEdit's
+ <guimenu>Plugin</guimenu> menu. You can also get more
+ detailed descriptions of the plugins from the <ulink
+ url="http://plugins.jedit.org">Plugin Central</ulink> web
+ site.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="plugins-latest-beta">
+ <para>Where can I get information on new plugins under
+ development?</para>
+ </question>
+ <answer>
+ <para>We encourage plugin developers to join the
+ <email>jedit-devel at lists.sourceforge.net</email> mailing
+ list. There, you will find the greatest concentration of
+ people who are also familiar with the core and its
+ plugins.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="plugin-install-manual">
+ <para>How do I install a plugin manually, without using the
+ Plugin Manager?</para>
+ </question>
+ <answer>
+ <para>Copy the plugin's jar archive file (or files, if there
+ are more than one) to the <filename>/jars</filename>
+ subdirectory of either (a) the directory in which jEdit is
+ installed, or (b) your user settings directory (which you
+ can find by evaluating the BeanShell expression
+ <userinput>jEdit.getSettingsDirectory()</userinput>.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="plugins-developing">
+ <para>How do I write a plugin?</para>
+ </question>
+ <answer>
+ <para>Writing a plugin requires a working knowledge of Java
+ and some familiarity with jEdit's Plugin API. There is a
+ tutorial on plugin development in the jEdit User's Guide.
+ The source code distribution for jEdit also includes the
+ source for an example plugin, <application>Quick
+ Notepad</application>, which is discussed in the
+ tutorial.</para>
+ <para>To learn more about plugin development, take a look at
+ the source code for other plugins, particularly those whose
+ features or user interface you might use as a model. The
+ <ulink url="mailto:jedit-devel at lists.sourceforge.net">jedit-devel mailing
+ list</ulink> and the message boards at <ulink
+ url="http://community.jedit.org">jEdit Community</ulink> are
+ also available for specific questions.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="plugin-irc">
+ <para>Is there an IRC (Internet Relay Chat) plugin for
+ jEdit?</para>
+ </question>
+ <answer>
+ <para>Yes. Open the Plugin Manager, then select
+ <guimenuitem>Install plugins</guimenuitem>. You will find
+ the IRC plugin which you can select for installation.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="plugin-console-execute">
+ <para>Is it possible to execute my application from within
+ jEdit?</para>
+ </question>
+ <answer>
+ <para>Yes. You can use the System shell of the Console
+ plugin to run your application.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="plugin-cvs">
+ <para>Can I work with cvs/svn/Perforce/cogito/mercurial
+ under jEdit? Is there a plugin for my favorite SCCS system?
+ How can I send a command from jEdit to cvs/svn without
+ leaving my editor?</para>
+ </question>
+ <answer>
+ <para>The SVNPlugin supports Subversion browsing, diffing
+ (via JDiff) and other common operations.</para>
+ <para>With *NIX (or cygwin), the Console plugin
+ documentation has some ideas on how to use jEdit as the
+ <literal>VISUAL</literal> editor when called from the
+ cvs/svn/hg command-line tools, all of which can be run from
+ the Console dockable.</para>
+ <para>The ProjectViewer plugin has some support for reading
+ the "entries" file for each directory, to decide which files
+ to import. CVS/SVN are built-in.</para>
+ <para>The P4Plugin adds Perforce support to ProjectViewer,
+ and has some other advanced features for working with
+ Perforce repositories.</para>
+ <para>You can use jEdit as your default editor from WinCVS:
+ specify <userinput>jedit.exe</userinput> as your default
+ viewer and editor to automate the opening of file.</para>
+ <para>GruntSpud and jEditCvs are not maintained, but do
+ offer CVS support on jEdit 4.2final.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="plugin-debugger">
+ <para>Is there a debugger plugin?</para>
+ </question>
+ <answer>
+ <para>A plugin based on the version 1.4 of the JSwat
+ debugger application is currently available for download
+ using jEdit's Plugin Manager feature. The JavaDebugger plugin
+ is also available (for jEdit 4.2 only). JPyDebugger offers debugging for Python.
+ The GdbPlugin provides gdb/mi support for C/C++
+ programs. Also, the Console BeanShell can be used to debug Java classes in the current running JVM.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="plugins-xslt">
+ <para>Any development on integrating an XSL parser? It would
+ be great to have the possibility to do XSL + XSLT ->
+ XHTML development in the same environment as other
+ development.</para>
+ </question>
+ <answer>
+ <para>There is currently one plugin available called XSLT.
+ The XSLT plugin provides features for: transforming XML
+ using XSL transformation stylesheets; evaluating XPath
+ expressions on XML and displaying results; and indenting
+ XML.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="plugins-ssh">
+ <para>Is there a plugin to enable editing of remote files
+ over FTP or SSH?</para>
+ </question>
+ <answer>
+ <para>The FTP plugin allows remote editing of files over the
+ <literal>SFTP://</literal> and <literal>FTP://</literal>
+ protocols. <literal>HTTP://</literal> is supported natively
+ in jEdit. The <literal>FTPS://</literal> and
+ <literal>FISH://</literal> protocols are not supported
+ yet.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ </qandaset>
</sect1>
\ No newline at end of file
diff --git a/jEdit/doc/FAQ/faq-problems.xml b/jEdit/doc/FAQ/faq-problems.xml
index 2b49f1a..e7a1a52 100644
--- a/jEdit/doc/FAQ/faq-problems.xml
+++ b/jEdit/doc/FAQ/faq-problems.xml
@@ -1,421 +1,421 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<sect1 id="problems">
- <title>Problems</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :indentSize=4:noTabs=false:maxLineLen=80:tabSize=4: -->
- <!-- :xml.root=faq.xml: -->
- <!-- jEdit FAQ -->
- <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
- <para>This section deals with problems you may experience while using or
- installing jEdit. Problems that aren't OS specific are listed under <link
- linkend="general-problems"><quote>General Problems</quote></link>.</para>
- <qandaset defaultlabel="qanda">
- <qandadiv id="general-problems">
- <title>General Problems</title>
- <qandaentry>
- <question id="wont-start">
- <para>jEdit won't start. What should I do?</para>
- </question>
- <answer>
- <para>If you don't have a clue as to why you cannot run
- jEdit, it's best to perform a step-by-step diagnosis. If it
- never worked before, begin by finding the Java application
- loader you are using: <filename>java.exe</filename>,
- <filename>javaw.exe</filename> or <filename>java</filename>.
- Make sure it is running by entering its full path with the
- <userinput>-h</userinput> parameter in a terminal or console
- window. If you can't find the Java application loader, your
- Java runtime environment package may be missing or
- incomplete.</para>
- <para>Next, find where you have installed jEdit. You should
- look for the file <filename>jedit.jar</filename> which
- contains all of the application's Java class files in a
- compressed archive.</para>
- <para>Once you have both files, run the Java loader with the
- <userinput>-jar</userinput> option and with
- <filename>jedit.jar</filename> as the target. Make sure that
- you either specify full paths for both files or that the
- directories for the files are part of your
- <filename>PATH</filename> environment variable. If jEdit
- does not load at this point, the likely problem is a corrupt
- <filename>jedit.jar</filename> file. Try downloading the
- application again.</para>
- <para>If jEdit does load using this procedure, you need to
- examine the <quote>shortcut</quote> loading mechanism you
- wish to use.</para>
- <para>On Linux and MacOS X, you need to find and examine the
- <filename>jedit</filename> shell script provided by the
- installation routine to confirm that the script's commands
- target the correct files and locations, and that variables
- like <filename>JAVA_HOME</filename> are either defined in
- the script or elsewhere in your shell's environment. Don't
- forget to make sure that the script's file permissions allow
- you to execute it as a shell script.</para>
- <para>On Windows, if you are using a batch script to run
- jEdit, the same points (other than file permissions) apply
- to examining <filename>jedit.bat</filename>. If you are
- using jEditLauncher, run <userinput>jedit /p</userinput> in
- jEdit's installation directory from a command line to get
- the custom loader's setup dialog. Here you can check the
- paths for both the Java application loader and jEdit as well
- as any command line parameters for both programs. Make sure
- that you have placed Java and jEdit options in the correct
- input fields. If the parameters seems correct but jEdit will
- not load with the Windows launcher, try uninstalling and
- reinstalling the launcher by running <userinput>jedit
- /u</userinput> followed by <userinput>jedit
- /i</userinput>.</para>
- <bridgehead>But it worked before! It just stopped working
- after an upgrade. What should I do?</bridgehead>
- <para>If it used to work for an older version and no longer
- works, it could be that you have some old crud in your jEdit
- settings directory (<literal>$HOME/.jedit</literal>). You
- may want to try renaming the offending file/subdirectory to
- something else, and restarting jEdit with fresh settings.
- You can later copy the old settings back into the previous
- location if you find you are missing things. Many files in
- your settings directory directory are (or should be)
- human-readable/editable, so you are encouraged to examine
- them and see what is there. You can wipe out
- <literal>.jedit/jars-cache</literal> while jEdit is not
- actually running, and it will be rebuilt next time you start
- it.</para>
- <para>If at this point you're still stuck, ask for help on
- the jedit-users mailing list, the jEdit Community
- <quote>Installation</quote> message board or on IRC. You're
- bound to find someone quickly.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="start-missing-plugins">
- <para>After jEdit starts, I can't see all of the plugins I
- have downloaded. How can I make them appear?</para>
- </question>
- <answer>
- <para>If you use jEdit's Plugin Manager to download and
- install plugins, your plugins will be found in the
- <filename>jars</filename> subdirectory of one of two
- directories: either the directory in which jEdit is
- installed, or the current user's settings directory. These
- are the only location jEdit examines when it loads plugins
- at startup.</para>
- <para>The default location of the settings directory depends
- on your operating system. You can find out its location
- during a jEdit session by evaluating
- <userinput>jedit.getSettingsDirectory()</userinput> in
- BeanShell.</para>
- <para>The settings directory can be changed by using the
- <userinput>-settings</userinput> command line parameter. If
- you change the location of the settings directory with this
- parameter, jEdit will not be able to find plugin archive
- files in the old location. If you use or change the
- <userinput>-settings</userinput> parameter, make sure your
- plugins don't get left behind.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="problems-out-of-memory">
- <para>During an editing session I get an error message about
- an <quote>OutOfMemoryError</quote> while working with a
- large file or performing a lengthy operation. The message
- reappears every time I retry the operation. How can I
- prevent this?</para>
- </question>
- <answer>
- <para>One solution that often works is to set or increase
- the allocation of memory to the heap for Java objects
- created by the Java Virtual Machine in which jEdit is
- running. Add the command line option
- <userinput>-mxXXm</userinput> to the options passed to the
- version of the Java application loader you are using (such
- as <filename>java</filename>, <filename>java.exe</filename>
- or <filename>javaw.exe</filename>). In place of the
- <userinput>XX</userinput> in the option, use a multiple of
- 16 between 32 and 256. If you already are using the option,
- increase the numeric portion of the
- <userinput>-mxXXm</userinput> parameter in increments of
- 64.</para>
- <para>If you are using the <userinput>-jar</userinput>
- command line option with Java to run jEdit, remember that
- the <userinput>-jar</userinput> parameter must be the last
- Java option, followed immediately by the path to
- <filename>jedit.jar</filename> and then any jEdit command
- line options.</para>
- <para>If out of memory errors occur while running a build or
- compilation operation from within jEdit, you can also have
- the operation run in an external process rather than inside
- the same Java Virtual Machine running jEdit. The AntFarm
- plugin, for example, lets you select this approach as a
- configuration option. In other cases, you can run an
- external program using the command line interface of the
- Console plugin, which will capture and display the output of
- the external process and in many cases parse the output for
- error information.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="textarea-corruption">
- <para>My textarea gets confused about the end of the buffer or in some other way corrupted (the characters are in the wrong place on the screen) every now and then. What
- should I do?</para>
- </question>
- <answer>
- <para>It happens to me sometimes too. I have this macro to work around it for now:
-<programlisting>
-/** Reset_TextArea.bsh */
-view.splitVertically();
-view.unsplitCurrent();
-</programlisting>
- Run this, and jEdit creates
- a new TextArea for you, and that one won't be confused. This
- can help avoid the need to restart jEdit. If you can
- reproduce the steps you took to cause this, please submit a
- bug report that details what plugins/versions you were
- using, and how to reproduce it. It may be specific to a file you are editing, or a particular combination of settings you are using, or sequence of actions you performed. </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="general-borders">
- <para>Why is jEdit's window movement and resizing so
- buggy?</para>
- </question>
- <answer>
- <para>Perhaps the option to let Java draw window borders is
- enabled. This option can lead to strange behavior on some
- Java versions and operating systems. Disable it in the
- <guilabel>Appearance</guilabel> tab of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="antialiased-text-everywhere">
- <para>How can I get antialiased text everywhere? </para>
- </question>
- <answer>
- <para>For the text area, go to <guimenuitem>Global Options - TextArea - Anti Aliased Smooth Text</guimenuitem>. Note that "Standard" works over Microsoft remote desktop, while "subpixel" does not. <guimenuitem> Fractional Font Metrics</guimenuitem>, a very old option, combined with Subpixel does not seem to do anything good. </para>
- <para>Also, starting <command>java</command> with command line options <literal>"-Dawt.useSystemAAFontSettings=on" "-Dswing.aatext=true"</literal> will give you antialiased text everywhere else. You can add these options to the batch file or shell script line that starts jEdit. </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="install-no-such-file">
- <para>What should I do when the installer displays the
- message, <screen>No such file or directory</screen>?</para>
- </question>
- <answer>
- <para>The full message that you may receive from the Java
- application launcher begins as follows: <screen>Exception in thread "main" java.util.zip.ZipException: No such file or directory
-...</screen> This means that the Java application launcher cannot read the jar
- archive file that you specified on the command line. If your
- Java runtime environment otherwise runs properly, then
- either you have named the incorrect file name or the
- installation file is corrupt or incomplete. Check the file
- name, download the installer again if necessary, and be sure
- to follow any specific instructions for your operating
- system posted on the <ulink url="http://www.jedit.org">jEdit
- web site</ulink>.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="install-noclassdef">
- <para>After downloading
- <filename>jeditXXXinstall.jar</filename> (the
- <filename>XXX</filename> represents the version number), I
- tried to run <userinput>java
- jeditXXXinstall.jar</userinput>, but got the error message,
- <screen>Exception in main(), NoClassDefFoundError: jeditXXXinstall/jar.</screen>
- What am I doing wrong?</para>
- </question>
- <answer>
- <para>You need to specify the <userinput>-jar</userinput>
- option for the Java application loader so that the loader
- will search the installation archive for the starting class
- file. Without the option, it treats the archive as a single
- class file (which it is not!), thus producing the error. The
- correct command line would be <userinput>java -jar
- jeditXXXinstall.jar</userinput>.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="jedit-crashed">
- <para>jEdit crashed the JVM, what gives?</para>
- </question>
- <answer>
- <para>It's important to realise that java applications
- should never do this. The problem is almost certainly a bug
- in the JVM. Problems of this nature are often tricky to
- solve. Depending on your platform, there should be
- information logged about what caused the crash to occur. For
- Unix type systems you will likely get an error in the
- console (and for Mac OS X you may also get a report in
- ~/Library/Logs/CrashReporter/JavaApplicationStub.crash.log).
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="general-slowstart">
- <para>Why is jEdit so slow to start up?</para>
- </question>
- <answer>
- <para>Some plugins require a lot of setup - chances are if
- you disable one, you will be able to determine the culprit.
- jEdit normally starts up quite quickly without
- plugins.</para>
- <procedure>
- <step>
- <para>To go the <guimenu>Utilities</guimenu> menu and
- select <guimenuitem>Activity
- Log</guimenuitem>.</para>
- </step>
- <step>
- <para>Scroll to the area where you see lines like
- <quote>[notice] JARClassLoader: Starting plugin
- XXX</quote>.</para>
- </step>
- </procedure>
- <para>You should be able to see which (if any) plugins are
- causing an excesively long delay.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="general-slow">
- <para>Why is jEdit so slow?</para>
- </question>
- <answer>
- <para>There may be many causes for this. Java by nature is
- more demanding on hardware than native applications. Modern
- computers should not have much problem with this.</para>
- <para>The most likely cause is plugins that parse buffers or
- do other computationally expensive operations. These include
- XML, JavaSideKick, and CodeAid. If performance is important
- to you, installing a whole batch of plugins in one go is
- probably not a very good idea. Install them one at a time,
- so you can evaluate the effects of each. </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="general-docking">
- <para>Go to left/top/bottom/right docking area does not work
- for some plugins?</para>
- </question>
- <answer>
- <para>The plugin is missing a
- <methodname>requestDefaultFocus()</methodname> method.
- Plugin updates will be available from time to time, or you
- can email the author of the plugin to let them know of the
- problem.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- <qandadiv id="unix-problems">
- <title>Unix/Linux Problems</title>
- <qandaentry>
- <question id="using-older-jre">
- <para>I'm trying to install jEdit on Linux, but I keep getting strange error messages.
- </para>
-<programlisting>
-Exception in thread "main" java.lang.UnsupportedClassVersionError:
-installer/Install (Unsupported major.minor version 49.0)
-Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
-</programlisting>
- </question>
- <answer>
- <para> Make sure the version of Java you are running is Sun Java 1.5 or higher. Default installations of Linux still include a gij compiler which is only 1.4 compliant or not fully Sun compliant.
- Some do not include a java5 jre or even jdk, so you may need to install it manually. In debian/ubuntu,
- <literal> apt-get install sun-java5-jdk </literal>
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="install-jedit-home">
- <para>After installing jEdit on Linux, running the
- <userinput>jedit</userinput> command causes the error
- message: <screen>Warning: JAVA_HOME environment variable not set</screen>
- How can I fix this?</para>
- </question>
- <answer>
- <para>Your <filename>jedit</filename> shell script should be
- modified to set the <userinput>JAVA_HOME</userinput>
- variable to the directory containing the executables of your
- desired Java runtime environment (JRE).</para>
- </answer>
- </qandaentry>
- </qandadiv>
- <!--******************************************************** Windows -->
- <qandadiv id="windows-problems">
- <title>Windows Problems</title>
- <qandaentry>
- <question id="install-windows-errmessage">
- <para>When I try to run <filename>jedit.exe</filename> I get
- the message <screen>The JEditLauncher component does not appear to be installed.</screen></para>
- </question>
- <answer>
- <para>The dialog presenting this message asks if you would
- like to install the launcher. Select
- <userinput>Yes</userinput> and supply further information as
- prompted. A file named <filename>install.log</filename> is
- generated in the same directory as
- <filename>jedit.exe</filename> that contains information on
- the launcher's installation. You can send this file along
- with jEdit's Activity Log if you continue to have problems
- running jEdit with the launcher package.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="install-error-regkey">
- <para>When I try to run the jEdit installation package in
- Windows, I get an error message, <screen>Error opening registration key
- "software\javasoft\java runtime environment".</screen> How can I fix
- this?</para>
- </question>
- <answer>
- <para>The problem is not with jEdit but may be caused by
- your installation of the Java runtime environment. Under
- Windows, Sun's Java application loader relies on entries in
- the Windows registry to find the files that create the
- runtime environment and a Java virtual machine. The loader
- (<filename>java.exe</filename>e or
- <filename>javaw.exe</filename>) is unable to find the
- necessary registration entry and therefore sends the error
- message. The best approach to fixing this is to uninstall
- and reinstall the JDK.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="install-windows-badcommand">
- <para>When trying to install jEdit on Windows Me with an
- MS-DOS prompt, after entering <userinput>java -jar
- jeditXXXinstall.jar</userinput> I get the message
- <userinput>bad command or file name</userinput>. I have
- tried various alternatives but still cannot install.</para>
- </question>
- <answer>
- <para>You should confirm that you have a Java runtime
- environment installed, which will include
- <filename>java.exe</filename> and the version that omits a
- separate terminal window, <filename>javaw.exe</filename>.
- Make sure that the directory containing
- <filename>java.exe</filename> or
- <filename>javaw.exe</filename>is found in the value of your
- <filename>PATH</filename> environment variable. Otherwise
- you should give the full path to the chosen loader on your
- command line.</para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question id="general-windows-ddraw">
- <para>When I run jEdit on Windows, it flashes, blinks, and
- doesn't display correctly! Why is your program so
- buggy?</para>
- </question>
- <answer>
- <para>A frequent cause of this problem is buggy video
- drivers and/or a buggy DirectDraw implementation. A
- workaround is to disable Java's use of DirectDraw by adding
- the following option to the Java virtual machine command
- line:</para>
- <programlisting>-Dsun.java2d.noddraw=true</programlisting>
- </answer>
- </qandaentry>
- </qandadiv>
- </qandaset>
+<?xml version="1.0" encoding="UTF-8"?>
+<sect1 id="problems">
+ <title>Problems</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :indentSize=4:noTabs=false:maxLineLen=80:tabSize=4: -->
+ <!-- :xml.root=faq.xml: -->
+ <!-- jEdit FAQ -->
+ <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
+ <para>This section deals with problems you may experience while using or
+ installing jEdit. Problems that aren't OS specific are listed under <link
+ linkend="general-problems"><quote>General Problems</quote></link>.</para>
+ <qandaset defaultlabel="qanda">
+ <qandadiv id="general-problems">
+ <title>General Problems</title>
+ <qandaentry>
+ <question id="wont-start">
+ <para>jEdit won't start. What should I do?</para>
+ </question>
+ <answer>
+ <para>If you don't have a clue as to why you cannot run
+ jEdit, it's best to perform a step-by-step diagnosis. If it
+ never worked before, begin by finding the Java application
+ loader you are using: <filename>java.exe</filename>,
+ <filename>javaw.exe</filename> or <filename>java</filename>.
+ Make sure it is running by entering its full path with the
+ <userinput>-h</userinput> parameter in a terminal or console
+ window. If you can't find the Java application loader, your
+ Java runtime environment package may be missing or
+ incomplete.</para>
+ <para>Next, find where you have installed jEdit. You should
+ look for the file <filename>jedit.jar</filename> which
+ contains all of the application's Java class files in a
+ compressed archive.</para>
+ <para>Once you have both files, run the Java loader with the
+ <userinput>-jar</userinput> option and with
+ <filename>jedit.jar</filename> as the target. Make sure that
+ you either specify full paths for both files or that the
+ directories for the files are part of your
+ <filename>PATH</filename> environment variable. If jEdit
+ does not load at this point, the likely problem is a corrupt
+ <filename>jedit.jar</filename> file. Try downloading the
+ application again.</para>
+ <para>If jEdit does load using this procedure, you need to
+ examine the <quote>shortcut</quote> loading mechanism you
+ wish to use.</para>
+ <para>On Linux and MacOS X, you need to find and examine the
+ <filename>jedit</filename> shell script provided by the
+ installation routine to confirm that the script's commands
+ target the correct files and locations, and that variables
+ like <filename>JAVA_HOME</filename> are either defined in
+ the script or elsewhere in your shell's environment. Don't
+ forget to make sure that the script's file permissions allow
+ you to execute it as a shell script.</para>
+ <para>On Windows, if you are using a batch script to run
+ jEdit, the same points (other than file permissions) apply
+ to examining <filename>jedit.bat</filename>. If you are
+ using jEditLauncher, run <userinput>jedit /p</userinput> in
+ jEdit's installation directory from a command line to get
+ the custom loader's setup dialog. Here you can check the
+ paths for both the Java application loader and jEdit as well
+ as any command line parameters for both programs. Make sure
+ that you have placed Java and jEdit options in the correct
+ input fields. If the parameters seems correct but jEdit will
+ not load with the Windows launcher, try uninstalling and
+ reinstalling the launcher by running <userinput>jedit
+ /u</userinput> followed by <userinput>jedit
+ /i</userinput>.</para>
+ <bridgehead>But it worked before! It just stopped working
+ after an upgrade. What should I do?</bridgehead>
+ <para>If it used to work for an older version and no longer
+ works, it could be that you have some old crud in your jEdit
+ settings directory (<literal>$HOME/.jedit</literal>). You
+ may want to try renaming the offending file/subdirectory to
+ something else, and restarting jEdit with fresh settings.
+ You can later copy the old settings back into the previous
+ location if you find you are missing things. Many files in
+ your settings directory directory are (or should be)
+ human-readable/editable, so you are encouraged to examine
+ them and see what is there. You can wipe out
+ <literal>.jedit/jars-cache</literal> while jEdit is not
+ actually running, and it will be rebuilt next time you start
+ it.</para>
+ <para>If at this point you're still stuck, ask for help on
+ the jedit-users mailing list, the jEdit Community
+ <quote>Installation</quote> message board or on IRC. You're
+ bound to find someone quickly.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="start-missing-plugins">
+ <para>After jEdit starts, I can't see all of the plugins I
+ have downloaded. How can I make them appear?</para>
+ </question>
+ <answer>
+ <para>If you use jEdit's Plugin Manager to download and
+ install plugins, your plugins will be found in the
+ <filename>jars</filename> subdirectory of one of two
+ directories: either the directory in which jEdit is
+ installed, or the current user's settings directory. These
+ are the only location jEdit examines when it loads plugins
+ at startup.</para>
+ <para>The default location of the settings directory depends
+ on your operating system. You can find out its location
+ during a jEdit session by evaluating
+ <userinput>jedit.getSettingsDirectory()</userinput> in
+ BeanShell.</para>
+ <para>The settings directory can be changed by using the
+ <userinput>-settings</userinput> command line parameter. If
+ you change the location of the settings directory with this
+ parameter, jEdit will not be able to find plugin archive
+ files in the old location. If you use or change the
+ <userinput>-settings</userinput> parameter, make sure your
+ plugins don't get left behind.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="problems-out-of-memory">
+ <para>During an editing session I get an error message about
+ an <quote>OutOfMemoryError</quote> while working with a
+ large file or performing a lengthy operation. The message
+ reappears every time I retry the operation. How can I
+ prevent this?</para>
+ </question>
+ <answer>
+ <para>One solution that often works is to set or increase
+ the allocation of memory to the heap for Java objects
+ created by the Java Virtual Machine in which jEdit is
+ running. Add the command line option
+ <userinput>-mxXXm</userinput> to the options passed to the
+ version of the Java application loader you are using (such
+ as <filename>java</filename>, <filename>java.exe</filename>
+ or <filename>javaw.exe</filename>). In place of the
+ <userinput>XX</userinput> in the option, use a multiple of
+ 16 between 32 and 256. If you already are using the option,
+ increase the numeric portion of the
+ <userinput>-mxXXm</userinput> parameter in increments of
+ 64.</para>
+ <para>If you are using the <userinput>-jar</userinput>
+ command line option with Java to run jEdit, remember that
+ the <userinput>-jar</userinput> parameter must be the last
+ Java option, followed immediately by the path to
+ <filename>jedit.jar</filename> and then any jEdit command
+ line options.</para>
+ <para>If out of memory errors occur while running a build or
+ compilation operation from within jEdit, you can also have
+ the operation run in an external process rather than inside
+ the same Java Virtual Machine running jEdit. The AntFarm
+ plugin, for example, lets you select this approach as a
+ configuration option. In other cases, you can run an
+ external program using the command line interface of the
+ Console plugin, which will capture and display the output of
+ the external process and in many cases parse the output for
+ error information.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="textarea-corruption">
+ <para>My textarea gets confused about the end of the buffer or in some other way corrupted (the characters are in the wrong place on the screen) every now and then. What
+ should I do?</para>
+ </question>
+ <answer>
+ <para>It happens to me sometimes too. I have this macro to work around it for now:
+<programlisting>
+/** Reset_TextArea.bsh */
+view.splitVertically();
+view.unsplitCurrent();
+</programlisting>
+ Run this, and jEdit creates
+ a new TextArea for you, and that one won't be confused. This
+ can help avoid the need to restart jEdit. If you can
+ reproduce the steps you took to cause this, please submit a
+ bug report that details what plugins/versions you were
+ using, and how to reproduce it. It may be specific to a file you are editing, or a particular combination of settings you are using, or sequence of actions you performed. </para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="general-borders">
+ <para>Why is jEdit's window movement and resizing so
+ buggy?</para>
+ </question>
+ <answer>
+ <para>Perhaps the option to let Java draw window borders is
+ enabled. This option can lead to strange behavior on some
+ Java versions and operating systems. Disable it in the
+ <guilabel>Appearance</guilabel> tab of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="antialiased-text-everywhere">
+ <para>How can I get antialiased text everywhere? </para>
+ </question>
+ <answer>
+ <para>For the text area, go to <guimenuitem>Global Options - TextArea - Anti Aliased Smooth Text</guimenuitem>. Note that "Standard" works over Microsoft remote desktop, while "subpixel" does not. <guimenuitem> Fractional Font Metrics</guimenuitem>, a very old option, combined with Subpixel does not seem to do anything good. </para>
+ <para>Also, starting <command>java</command> with command line options <literal>"-Dawt.useSystemAAFontSettings=on" "-Dswing.aatext=true"</literal> will give you antialiased text everywhere else. You can add these options to the batch file or shell script line that starts jEdit. </para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="install-no-such-file">
+ <para>What should I do when the installer displays the
+ message, <screen>No such file or directory</screen>?</para>
+ </question>
+ <answer>
+ <para>The full message that you may receive from the Java
+ application launcher begins as follows: <screen>Exception in thread "main" java.util.zip.ZipException: No such file or directory
+...</screen> This means that the Java application launcher cannot read the jar
+ archive file that you specified on the command line. If your
+ Java runtime environment otherwise runs properly, then
+ either you have named the incorrect file name or the
+ installation file is corrupt or incomplete. Check the file
+ name, download the installer again if necessary, and be sure
+ to follow any specific instructions for your operating
+ system posted on the <ulink url="http://www.jedit.org">jEdit
+ web site</ulink>.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="install-noclassdef">
+ <para>After downloading
+ <filename>jeditXXXinstall.jar</filename> (the
+ <filename>XXX</filename> represents the version number), I
+ tried to run <userinput>java
+ jeditXXXinstall.jar</userinput>, but got the error message,
+ <screen>Exception in main(), NoClassDefFoundError: jeditXXXinstall/jar.</screen>
+ What am I doing wrong?</para>
+ </question>
+ <answer>
+ <para>You need to specify the <userinput>-jar</userinput>
+ option for the Java application loader so that the loader
+ will search the installation archive for the starting class
+ file. Without the option, it treats the archive as a single
+ class file (which it is not!), thus producing the error. The
+ correct command line would be <userinput>java -jar
+ jeditXXXinstall.jar</userinput>.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="jedit-crashed">
+ <para>jEdit crashed the JVM, what gives?</para>
+ </question>
+ <answer>
+ <para>It's important to realise that java applications
+ should never do this. The problem is almost certainly a bug
+ in the JVM. Problems of this nature are often tricky to
+ solve. Depending on your platform, there should be
+ information logged about what caused the crash to occur. For
+ Unix type systems you will likely get an error in the
+ console (and for Mac OS X you may also get a report in
+ ~/Library/Logs/CrashReporter/JavaApplicationStub.crash.log).
+ </para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="general-slowstart">
+ <para>Why is jEdit so slow to start up?</para>
+ </question>
+ <answer>
+ <para>Some plugins require a lot of setup - chances are if
+ you disable one, you will be able to determine the culprit.
+ jEdit normally starts up quite quickly without
+ plugins.</para>
+ <procedure>
+ <step>
+ <para>To go the <guimenu>Utilities</guimenu> menu and
+ select <guimenuitem>Activity
+ Log</guimenuitem>.</para>
+ </step>
+ <step>
+ <para>Scroll to the area where you see lines like
+ <quote>[notice] JARClassLoader: Starting plugin
+ XXX</quote>.</para>
+ </step>
+ </procedure>
+ <para>You should be able to see which (if any) plugins are
+ causing an excesively long delay.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="general-slow">
+ <para>Why is jEdit so slow?</para>
+ </question>
+ <answer>
+ <para>There may be many causes for this. Java by nature is
+ more demanding on hardware than native applications. Modern
+ computers should not have much problem with this.</para>
+ <para>The most likely cause is plugins that parse buffers or
+ do other computationally expensive operations. These include
+ XML, JavaSideKick, and CodeAid. If performance is important
+ to you, installing a whole batch of plugins in one go is
+ probably not a very good idea. Install them one at a time,
+ so you can evaluate the effects of each. </para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="general-docking">
+ <para>Go to left/top/bottom/right docking area does not work
+ for some plugins?</para>
+ </question>
+ <answer>
+ <para>The plugin is missing a
+ <methodname>requestDefaultFocus()</methodname> method.
+ Plugin updates will be available from time to time, or you
+ can email the author of the plugin to let them know of the
+ problem.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ <qandadiv id="unix-problems">
+ <title>Unix/Linux Problems</title>
+ <qandaentry>
+ <question id="using-older-jre">
+ <para>I'm trying to install jEdit on Linux, but I keep getting strange error messages.
+ </para>
+<programlisting>
+Exception in thread "main" java.lang.UnsupportedClassVersionError:
+installer/Install (Unsupported major.minor version 49.0)
+Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
+</programlisting>
+ </question>
+ <answer>
+ <para> Make sure the version of Java you are running is Sun Java 1.6 or higher.
+ In debian/ubuntu,
+ <literal> apt-get install sun-java6-jdk </literal>
+ </para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="install-jedit-home">
+ <para>After installing jEdit on Linux, running the
+ <userinput>jedit</userinput> command causes the error
+ message: <screen>Warning: JAVA_HOME environment variable not set</screen>
+ How can I fix this?</para>
+ </question>
+ <answer>
+ <para>Your <filename>jedit</filename> shell script should be
+ modified to set the <userinput>JAVA_HOME</userinput>
+ variable to the directory containing the executables of your
+ desired Java runtime environment (JRE).</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ <!--******************************************************** Windows -->
+ <qandadiv id="windows-problems">
+ <title>Windows Problems</title>
+ <qandaentry>
+ <question id="install-windows-errmessage">
+ <para>When I try to run <filename>jedit.exe</filename> I get
+ the message <screen>The JEditLauncher component does not appear to be installed.</screen></para>
+ </question>
+ <answer>
+ <para>The dialog presenting this message asks if you would
+ like to install the launcher. Select
+ <userinput>Yes</userinput> and supply further information as
+ prompted. A file named <filename>install.log</filename> is
+ generated in the same directory as
+ <filename>jedit.exe</filename> that contains information on
+ the launcher's installation. You can send this file along
+ with jEdit's Activity Log if you continue to have problems
+ running jEdit with the launcher package.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="install-error-regkey">
+ <para>When I try to run the jEdit installation package in
+ Windows, I get an error message, <screen>Error opening registration key
+ "software\javasoft\java runtime environment".</screen> How can I fix
+ this?</para>
+ </question>
+ <answer>
+ <para>The problem is not with jEdit but may be caused by
+ your installation of the Java runtime environment. Under
+ Windows, Sun's Java application loader relies on entries in
+ the Windows registry to find the files that create the
+ runtime environment and a Java virtual machine. The loader
+ (<filename>java.exe</filename>e or
+ <filename>javaw.exe</filename>) is unable to find the
+ necessary registration entry and therefore sends the error
+ message. The best approach to fixing this is to uninstall
+ and reinstall the JDK.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="install-windows-badcommand">
+ <para>When trying to install jEdit on Windows Me with an
+ MS-DOS prompt, after entering <userinput>java -jar
+ jeditXXXinstall.jar</userinput> I get the message
+ <userinput>bad command or file name</userinput>. I have
+ tried various alternatives but still cannot install.</para>
+ </question>
+ <answer>
+ <para>You should confirm that you have a Java runtime
+ environment installed, which will include
+ <filename>java.exe</filename> and the version that omits a
+ separate terminal window, <filename>javaw.exe</filename>.
+ Make sure that the directory containing
+ <filename>java.exe</filename> or
+ <filename>javaw.exe</filename>is found in the value of your
+ <filename>PATH</filename> environment variable. Otherwise
+ you should give the full path to the chosen loader on your
+ command line.</para>
+ </answer>
+ </qandaentry>
+ <qandaentry>
+ <question id="general-windows-ddraw">
+ <para>When I run jEdit on Windows, it flashes, blinks, and
+ doesn't display correctly! Why is your program so
+ buggy?</para>
+ </question>
+ <answer>
+ <para>A frequent cause of this problem is buggy video
+ drivers and/or a buggy DirectDraw implementation. A
+ workaround is to disable Java's use of DirectDraw by adding
+ the following option to the Java virtual machine command
+ line:</para>
+ <programlisting>-Dsun.java2d.noddraw=true</programlisting>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ </qandaset>
</sect1>
\ No newline at end of file
diff --git a/jEdit/doc/FAQ/faq-use.xml b/jEdit/doc/FAQ/faq-use.xml
index 329e616..5630dbd 100644
--- a/jEdit/doc/FAQ/faq-use.xml
+++ b/jEdit/doc/FAQ/faq-use.xml
@@ -1,715 +1,715 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<sect1 id="usage">
- <title>Usage Questions</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=4:noTabs=false:tabSize=4: -->
-
- <!-- :xml.root=faq.xml: -->
-
- <!-- jEdit FAQ -->
-
- <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
-
- <para>This section deals general usage of jEdit, including
- customisation.</para>
-
- <qandaset defaultlabel="qanda">
- <!--********************************************************* Abrevs -->
-
- <qandadiv id="text-abbrev">
- <title>Abbreviations</title>
-
- <qandaentry>
- <question id="abbrevs-create-onfly">
- <para>How can I create abbreviations <quote>on the
- fly</quote> as I type?</para>
- </question>
-
- <answer>
- <para>Type the form of abbreviation you wish to use, then
- without pressing the <keycap>SPACE</keycap> key, press
- <keycombo action="simul">
- <keycap>CTRL</keycap>
-
- <keycap>;</keycap>
- </keycombo>. A dialog will appear for entering text that
- goes before and after the editing caret. For example, you
- can insert an opening HTML or XML tag before the cursor and
- its corresponding closing tag after the cursor. Use the
- mouse to select <guilabel>Add global</guilabel> or
- <guilabel>Add mode-specific</guilabel>. The first choice
- makes the abbreviation available for all documents; the
- second makes it available only in documents with the same
- editing mode as the current document. In this way, you can
- add abbreviations that operate only a particular class of
- documents, for example, Java source files or XML markup.
- Either way, the abbreviation will be stored for future
- use.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="abbrevs-expand-type">
- <para>How can I have abbreviations expanded automatically as
- I type?</para>
- </question>
-
- <answer>
- <para>Select
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem>, then select the
- <guimenuitem>Abbreviations</guimenuitem> option pane. You
- will see a checkbox option for <quote>Space bar expands
- abbrevs</quote>. Here you can also add, modify and delete
- abbreviations on a global basis or for individual editing
- modes.</para>
- </answer>
- </qandaentry>
- </qandadiv>
-
- <!--********************************************************* Clippy -->
-
- <qandadiv id="text-clipboard">
- <title>Clipboard features</title>
-
- <qandaentry>
- <question id="clip-multiple">
- <para>Can I copy selections from more than one location in a
- document (or more than one document) and paste the aggregate
- text in one operation?</para>
- </question>
-
- <answer>
- <para>The <guimenuitem>Cut Append</guimenuitem> (<keycombo
- action="simul">
- <keycap>CTRL</keycap>
-
- <keycap>E</keycap>
- </keycombo> <keycombo action="simul">
- <keycap>CTRL</keycap>
-
- <keycap>U</keycap>
- </keycombo>) and <guimenuitem>Copy Append</guimenuitem>
- (<keycombo action="simul">
- <keycap>CTRL</keycap>
-
- <keycap>E</keycap>
- </keycombo> <keycombo action="simul">
- <keycap>CTRL</keycap>
-
- <keycap>A</keycap>
- </keycombo>) both add the selected text to the existing
- contents of the Clipboard. A single
- <guimenuitem>Paste</guimenuitem> (<keycombo action="simul">
- <keycap>CTRL</keycap>
-
- <keycap>V</keycap>
- </keycombo>) command will insert the aggregated text at
- the cursor or in place of an existing selection.</para>
- </answer>
- </qandaentry>
- </qandadiv>
-
- <!--********************************************************* Attrib -->
-
- <qandadiv id="file-attributes">
- <title>File Attributes</title>
-
- <qandaentry>
- <question id="file-owner-preserve">
- <para>Does jEdit preserve file ownership and permissions
- when it saves files?</para>
- </question>
-
- <answer>
- <para>One reason this can be an issue is that by default,
- jEdit adopts the conservative approach of saving a file to a
- temporary name before renaming that file to the desired
- name. This procedure minimizes the risk of crashes causing
- loss of data, and works without reported problems on local
- file systems. However, when files are served remotely by
- FTP, Samba or other means, it may not be possible to
- preserve file attributes on the server because the newly
- created temporary file's owner may differ from the owner of
- the original file on the server.</para>
-
- <para>To avoid this problem, you can disable the two-step
- file saving routine. Select
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem>, then under <guimenuitem>Loading &
- Saving</guimenuitem>, clear the checkbox for
- <guimenuitem>Two-stage save</guimenuitem>.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="file-linesep-choice">
- <para>Why does jEdit ignore my choice for line separator
- characters when I save a file?</para>
- </question>
-
- <answer>
- <para>When jEdit saves an existing file, it uses the line
- separator already used by the file. The line separator
- designated in the buffer options or elsewhere is used only
- for new files.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="file-autodetect-encoding">
- <para>Can jEdit auto-detect character encodings when it
- opens a file?</para>
- </question>
-
- <answer>
- <para>Only Unicode can be detected when a file is loaded.
- For other encodings, you must specify the encoding when the
- file is loaded if you do not wish to use the default
- encoding for your operating system.</para>
-
- <para>There are a few features that can help you navigate
- through encoding issues. You can select the encoding you
- wish to use from <guisubmenu> Encoding</guisubmenu> in the
- <guimenu>Commands</guimenu> menu of the File System Browser.
- You can also designate a default encoding in the
- <guimenuitem>Loading & Saving</guimenuitem> pane of the
- Global Options dialog; if you do not, jEdit adopts your
- operating system's default encoding as its own default. You
- can change the encoding used to save an individual file by
- selecting
- <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> and changing the current buffer's
- properties. Finally, jEdit keeps track of the encodings used
- in the files named in the
- <guimenu>File</guimenu>><guimenuitem>Recent
- Files</guimenuitem> drop-down list.</para>
-
- <para>These features allow you to minimize the attention
- given to character encodings, but you must still pay some
- attention if you do not want to use default settings.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="file-euro-char">
- <para>I'm using the iso-8859-1 character encoding. How do I
- type and save the Euro sign (<quote>â¬</quote>)?</para>
- </question>
-
- <answer>
- <para>You need to use instead the iso-8859-15 character set,
- which is a modification of iso-8859-1 that includes the Euro
- sign and some Finnish and French characters. The Euro sign
- represents character value 0xA4 in this 8-bit set. To open a
- file manually using this encoding, select
- <guimenu>File</guimenu>><guimenuitem>Open...
- </guimenuitem>, and select
- <guimenuitem>ISO8859_15</guimenuitem> from <guimenu>
- Commands</guimenu>><guisubmenu>Enconding</guisubmenu>
- before opening the file.</para>
-
- <para>There is a startup script in the
- <quote>Downloads</quote> area of <ulink
- url="http://community.jedit.org">jEdit Community</ulink>
- named <filename>euro.bsh</filename> that can be used as a
- startup script to help simplify the insertion of the Euro
- symbol if your keyboard currently lacks a dedicated
- key.</para>
- </answer>
- </qandaentry>
- </qandadiv>
-
- <!--********************************************************** Files -->
-
- <qandadiv id="file-manage">
- <title>File Management</title>
-
- <qandaentry>
- <question id="open-dnd">
- <para>How can I open files in jEdit using drag and
- drop?</para>
- </question>
-
- <answer>
- <para>Try installing the Drag and Drop plugin using the
- Plugin Manager feature. It works with most (but not all)
- combinations of operating systems and current Java runtime
- environments.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="add-favorites">
- <para>How do I add and remove directories to the list of
- <quote>favorites</quote> in jEdit's File System
- Browser?</para>
- </question>
-
- <answer>
- <para>To add a directory to the list of favorites, navigate
- so that the directory is at the top of the tree displayed in
- the File System Browser window, click the
- <guimenuitem>Favorites</guimenuitem> button, and select
- <guimenuitem>Add to favorites</guimenuitem> from the
- resulting menu. To delete a directory from the favorites
- list, use the same menu to go to the favorites list.
- Right-click on the directory to be deleted and select
- <guimenuitem>Delete</guimenuitem>. This operation will
- delete the directory from the list of favorites but will
- have no effect on the directory itself.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="associate-files">
- <para>How do I associate particular file types with jEdit so
- I can open them by double clicking their icons in Windows
- Explorer?</para>
- </question>
-
- <answer>
- <para>You associate the file extension with
- <userinput><replaceable><jEdit installation
- directory></replaceable>\jedit.bat</userinput>.
- This can be done from the <guimenuitem>File Types</guimenuitem>
- tab in the Windows Explorer's <guimenuitem>Tools</guimenuitem>
- -> <guimenuitem>Folder options...</guimenuitem> menu.</para>
-
- <para>The EXE-installer for Windows includes a
- custom context menu handler. It will provide menu items for
- using jEdit any time you right-click on a file icon in
- Windows Explorer. This feature does
- not interfere with any existing file associations.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="open-restrict-dir">
- <para>Can I restrict jEdit to opening and saving files in a
- single directory without changing file permissions?</para>
- </question>
-
- <answer>
- <para>The easiest way to get this kind of behavior is to use
- macros that open the Virtual File Browser to a specific,
- fixed directory, and then change the default keyboard
- shortcuts for opening and saving files to run these
- macros.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="filename-uc-to-lc">
- <para>On Windows, how can I change the name of my file from
- <filename>myfile.txt</filename> to
- <filename>MyFile.txt</filename>?</para>
- </question>
-
- <answer>
- <para>The Windows native file system deals with file names
- in a case-insensitive manner, so
- <filename>myfile.txt</filename> and
- <filename>MyFile.txt</filename> refer to the same file. As a
- result, the jEdit file browser treats both spellings
- identically and does not make a name change. Using our
- example, the easiest workaround is to rename the file in two
- steps: first to <filename>_myfile.txt</filename>, then to
- <filename>MyFile.txt</filename>.</para>
- </answer>
- </qandaentry>
- </qandadiv>
-
- <!--*********************************************************** Text -->
-
- <qandadiv id="text-format">
- <title>Formatting text</title>
-
- <qandaentry>
- <question id="text-indent">
- <para>How do I indent or unindent selections of text?</para>
- </question>
-
- <answer>
- <para>Using jEdit's default configuration, you can indent a
- selection of text by pressing <keycombo action="simul">
- <keycap>ALT</keycap>
-
- <keycap>RIGHT</keycap>
- </keycombo>. Unindent a selection by pressing <keycombo
- action="simul">
- <keycap>ALT</keycap>
-
- <keycap>LEFT</keycap>
- </keycombo>.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="text-line-numbers">
- <para>Is there a way to automatically view line numbers when
- a buffer is opened?</para>
- </question>
-
- <answer>
- <para><guimenuitem>Select Utilities>Global
- Options</guimenuitem>, and in the
- <guimenuitem>Gutter</guimenuitem> option pane select the
- <guimenuitem>Line Numbering</guimenuitem> check box.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="smart-quote">
- <para>Does jEdit know smart quotes? In .tex files I would
- like to use <userinput>``</userinput> or
- <userinput>''</userinput> instead of
- <userinput>"</userinput>.</para>
- </question>
-
- <answer>
- <para>While jEdit can display any character provided by a
- supported encoding set and enter any character supported by
- a keyboard driver, it does not have the ability to insert
- <quote>smart quote</quote> pairs automatically as some word
- processors do. This would require a BeanShell macro to
- modify quoted text.</para>
-
- <para>The Accents and CharacterMap plugins can also help you
- type international characters.</para>
-
- <para>You also have the option of using a TeX macro (or, in
- LaTeX, a pair of environment tags) to have the standard
- double quotation mark <userinput>"</userinput> transformed
- into the appropriate opening or closing smart quotes without
- the need to keep track of when quoted text opens or
- closes.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="text-softwrap">
- <para>Does jEdit have a <quote>soft</quote> wrap text
- mode?</para>
- </question>
-
- <answer>
- <para>jEdit's 4.3's soft wrap mode, and especially its wrap
- to margin=0, is one of its many features that just works
- better than it does in most other editing environments. Soft
- Wrap with margin=0 was unavailable in jEdit 4.2, but users
- of 4.1 will remember it well. When you set SOFT WRAP with a
- margin=0, you don't need to use the horizontal scroller
- anymore. It's just as simple as that.</para>
-
- <para>jEdit wrap capability can be activated for a specific
- buffer, specific editing modes, or for all documents by
- default. In prior versions, both the text wrap feature and
- the <guimenuitem>Edit>Text>Format
- Paragraph</guimenuitem> command insert <quote>hard</quote>
- end of line characters. This <quote>hard wrap</quote>
- feature remains available as an option for buffers and
- editing modes.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="text-display-spaces">
- <para>The display of spaces as a character in the editor is
- annoying. How can I disable those small square boxes?</para>
- </question>
-
- <answer>
- <para>This is controlled by the WhiteSpace plugin. To change
- your settings to disable display of whitespace characters,
- select <guimenuitem>Utilities>Global
- Options</guimenuitem>, then select <guimenuitem>Plugin
- options>WhiteSpace</guimenuitem>. You can separately
- configure the display of spaces, tabs, and other whitespace
- characters.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="text-i18n">
- <para>Does jEdit support i18n?</para>
- </question>
-
- <answer>
- <para>When editing text documents, jEdit supports any
- available encoding scheme, and can open files with a
- specified encoding other than the default encoding of your
- operating system using the
- <guimenu>Commands</guimenu>><guisubmenu>Encoding
- </guisubmenu> from the File System Browser.</para>
-
- <para>With respect to menu labels, message strings and other
- GUI elements, the jEdit project team currently does not have
- the resources to maintain multiple property sets in
- languages other than English, particularly since the
- development effort is continuing at a rapid pace. There has
- not been great demand for this in any event. This may be
- because jEdit is primarily a tool for programmers, and the
- use of English as a common first or second language is
- widespread in the global programming community. This
- decision may be reconsidered when the application has
- further matured and if more individuals express a
- willingness to be involved in translation work.</para>
- </answer>
- </qandaentry>
- </qandadiv>
-
- <!--********************************************************* Source -->
-
- <qandadiv id="source-compile">
- <title>Compiling source code</title>
-
- <qandaentry>
- <question id="compile-java">
- <para>How do I compile my Java source in JEdit?</para>
- </question>
-
- <answer>
- <para>There are a number of plugins that you can use to
- compile Java source code. You can run a Java compiler on the
- command line in the <quote>System</quote> shell of the
- <application>Console</application> plugin. If you are using
- the JCompiler plugin, you will have a
- <quote>JCompiler</quote> shell in the
- <application>Console</application> plugin, and you can run
- the <userinput>compile</userinput> command for the current
- file, or the <userinput>compilepkg</userinput> command on
- all of the current directory's source code files. You can
- also use the <quote>Ant</quote> commandos from the
- <application>Console</application> plugin or the
- <application>AntFarm</application> plugin to run complex
- builds on a project of source code files, using a
- <filename>build.xml</filename> file to specify build
- commands and dependencies.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="source-new-editmode">
- <para>How do I create a new edit mode?</para>
- </question>
-
- <answer>
- <para>Take a look at the <quote>Writing Edit Modes</quote>
- section of the User's Guide. Basically, you have to write an
- XML file containing data on the mode's file extensions and
- buffer and syntax highlighting properties, then add
- information about the new mode file to a second XML file
- containing a catalog of modes.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="source-docbook">
- <para>Does jEdit support DocBook tags?</para>
- </question>
-
- <answer>
- <para>The application contains editing modes for both SGML
- and XML. Using jEdit abbreviations, you can quickly insert
- commonly-typed tags with a couple of keystroke. There are a
- number of abbreviations in the XML and SGML modes that
- create pairs of DocBook tags on the fly.</para>
-
- <para>You can get validation, tree-browsing, auto-complete,
- and auto-closing tags with the XML plugin, a very advanced
- XML editing tool.</para>
-
- <para>With whe XInsert or Template plugin you can create
- multi-layered DocBook elements.</para>
-
- <para>There are other macros targeting DocBook available
- from the <ulink url="http://community.jedit.org">jEdit
- Community</ulink> web site that you can use or adapt for
- your own purposes.</para>
- </answer>
- </qandaentry>
- </qandadiv>
-
- <!--******************************************************* Settings -->
-
- <qandadiv id="emacs-tricks">
- <title>Tips for Emacs users</title>
-
- <para>For more emacs help, check out <ulink
- url="http://www.clapper.org/software/jedit/">this site</ulink> for
- more emacs macros.</para>
-
- <qandaentry>
- <question id="settings-emacstab">
- <para>Can I have an emacs style tab key (tab anywhere in a
- line re-indents it)?</para>
- </question>
-
- <answer>
- <para>Yes. You can do this by rebinding the
- <keycode>tab</keycode> key to <command>Indent Selected
- Lines</command> in the <guimenuitem>Global
- Options</guimenuitem>.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="settings-emacsctrle">
- <para>How do I map Ctrl-E to go to the end of the
- line?</para>
- </question>
-
- <answer>
- <para>jEdit has it set up as a 2-key shortcut. In order to
- make Ctrl-E a one-key shortcut again, you first have to
- redefine all of the Ctrl-E prefix shortcuts to mean
- something else.</para>
-
- <para><literal>jedit_keys.props</literal> shows you all of
- the current keyboard bindings. As you can see, Ctrl-e is
- used for many things in jEdit. If you want to redefine it to
- be a single-key shortcut, first thing you need to do is
- decide on another Ctrl-key to use as a prefix, to redefine
- jEdit's fold features. I recommend using Ctrl-Q as the
- prefix, and if you want to use Ctrl-Q to quit, you have to
- hit Ctrl-Q twice. Cut and paste the below shortcuts into
- your own properties file.</para>
-
- <programlisting>
-# emacs end of line
-end.shortcut2=C+e
-# Ctrl-Q twice to quit
-exit.shortcut=C+q C+q
-# C+q is our new C+e prefix
-#{{{ C+q C+X
-
-# Unused: f, h, q, y
-copy-append.shortcut=C+q C+a
-search-in-open-buffers.shortcut=C+q C+b
-range-comment.shortcut=C+q C+c
-search-in-directory.shortcut=C+q C+d
-replace-and-find-next.shortcut=C+q C+g
-ignore-case.shortcut=C+q C+i
-scroll-to-current-line.shortcut=C+q C+j
-line-comment.shortcut=C+q C+k
-select-line-range.shortcut=C+q C+l
-add-marker.shortcut=C+q C+m
-center-caret.shortcut=C+q C+n
-open-path.shortcut=C+q C+o
-vertical-paste.shortcut=C+q C+p
-replace-in-selection.shortcut=C+q C+r
-save-all.shortcut=C+q C+s
-toggle-line-numbers.shortcut=C+q C+t
-cut-append.shortcut=C+q C+u
-paste-previous.shortcut=C+q C+v
-close-all.shortcut=C+q C+w
-regexp.shortcut=C+q C+x
-paste-deleted.shortcut=C+q C+y
-redo.shortcut=C+q C+z
-#}}}
-
-#{{{ C+q C+non-alpha
-left-docking-area.shortcut=C+q C+LEFT
-top-docking-area.shortcut=C+q C+UP
-right-docking-area.shortcut=C+q C+RIGHT
-bottom-docking-area.shortcut=C+q C+DOWN
-
-prev-marker.shortcut=C+q C+COMMA
-next-marker.shortcut=C+q C+PERIOD
-prev-bracket.shortcut=C+q C+OPEN_BRACKET
-next-bracket.shortcut=C+q C+CLOSE_BRACKET
-close-docking-area.shortcut=C+q C+BACK_QUOTE
-#}}}
-
-#{{{ C+q X
-# Unused: b e g h j k m o q t y z
-add-explicit-fold.shortcut=C+q a
-collapse-all-folds.shortcut=C+q c
-delete-paragraph.shortcut=C+q d
-format-paragraph.shortcut=C+q f
-find-previous.shortcut=C+q g
-invert-selection.shortcut=C+q i
-select-line.shortcut=C+q l
-narrow-to-fold.shortcut=C+q n n
-narrow-to-selection.shortcut=C+q n s
-select-paragraph.shortcut=C+q p
-remove-trailing-ws.shortcut=C+q r
-select-fold.shortcut=C+q s
-insert-literal.shortcut=C+q v
-select-word.shortcut=C+q w
-parent-fold.shortcut=C+q u
-expand-all-folds.shortcut=C+q x
-#}}}
-</programlisting>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="emacs-ctrl-k">
- <para>What about ctrl-K?</para>
- </question>
-
- <answer>
- <para>Check out <literal>macros/Emacs_Ctrl_K.bsh</literal>.
- Bind it to Ctrl-k from the shortcuts option pane.</para>
- </answer>
- </qandaentry>
- </qandadiv>
-
- <qandadiv id="customize-other">
- <title>Other Settings and Options</title>
-
- <qandaentry>
- <question id="settings-change-font">
- <para>How can I change the font used for menu labels and
- other elements of jEdit's user interface?</para>
- </question>
-
- <answer>
- <para>Select
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem>, then the
- <guimenuitem>Appearance</guimenuitem> option pane. When you
- select the <quote>Metal</quote> look and feel you can also
- select the fonts used for various displayed items.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="settings-add-classpath">
- <para>I want to add a directory to the classpath. I did this
- in the standalone BeanShell with ease by using the
- <classname>addClassPath(String)</classname> method. but this
- doesn't work in a macro. How could I manage the classpath in
- jEdit?</para>
- </question>
-
- <answer>
- <para>The implementation of BeanShell used in jEdit does not
- use BeanShell's class loader. The script method contained in
- loadJarClasses.bsh (found in the Downloads section of <ulink
- url="http://community.jedit.org">jEdit Community</ulink>)
- should work if you know the path to a specific class file or
- class archive.</para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question id="settings-unlisted">
- <para>Are there any hidden features?</para>
- </question>
-
- <answer>
- <para>Yes. You can access them by binding a shortcut to the
- action in question. You will find a complete list of
- available commands under the
- <guimenuitem>Shortcuts</guimenuitem> area in the
- <guimenuitem>Global Options</guimenuitem>.</para>
- </answer>
- </qandaentry>
- </qandadiv>
- </qandaset>
-</sect1>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<sect1 id="usage">
+ <title>Usage Questions</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=4:noTabs=false:tabSize=4: -->
+
+ <!-- :xml.root=faq.xml: -->
+
+ <!-- jEdit FAQ -->
+
+ <!-- Copyright (C) 2003 John Gellene, Kris Kopicki -->
+
+ <para>This section deals general usage of jEdit, including
+ customisation.</para>
+
+ <qandaset defaultlabel="qanda">
+ <!--********************************************************* Abrevs -->
+
+ <qandadiv id="text-abbrev">
+ <title>Abbreviations</title>
+
+ <qandaentry>
+ <question id="abbrevs-create-onfly">
+ <para>How can I create abbreviations <quote>on the
+ fly</quote> as I type?</para>
+ </question>
+
+ <answer>
+ <para>Type the form of abbreviation you wish to use, then
+ without pressing the <keycap>SPACE</keycap> key, press
+ <keycombo action="simul">
+ <keycap>CTRL</keycap>
+
+ <keycap>;</keycap>
+ </keycombo>. A dialog will appear for entering text that
+ goes before and after the editing caret. For example, you
+ can insert an opening HTML or XML tag before the cursor and
+ its corresponding closing tag after the cursor. Use the
+ mouse to select <guilabel>Add global</guilabel> or
+ <guilabel>Add mode-specific</guilabel>. The first choice
+ makes the abbreviation available for all documents; the
+ second makes it available only in documents with the same
+ editing mode as the current document. In this way, you can
+ add abbreviations that operate only a particular class of
+ documents, for example, Java source files or XML markup.
+ Either way, the abbreviation will be stored for future
+ use.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="abbrevs-expand-type">
+ <para>How can I have abbreviations expanded automatically as
+ I type?</para>
+ </question>
+
+ <answer>
+ <para>Select
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem>, then select the
+ <guimenuitem>Abbreviations</guimenuitem> option pane. You
+ will see a checkbox option for <quote>Space bar expands
+ abbrevs</quote>. Here you can also add, modify and delete
+ abbreviations on a global basis or for individual editing
+ modes.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+
+ <!--********************************************************* Clippy -->
+
+ <qandadiv id="text-clipboard">
+ <title>Clipboard features</title>
+
+ <qandaentry>
+ <question id="clip-multiple">
+ <para>Can I copy selections from more than one location in a
+ document (or more than one document) and paste the aggregate
+ text in one operation?</para>
+ </question>
+
+ <answer>
+ <para>The <guimenuitem>Cut Append</guimenuitem> (<keycombo
+ action="simul">
+ <keycap>CTRL</keycap>
+
+ <keycap>E</keycap>
+ </keycombo> <keycombo action="simul">
+ <keycap>CTRL</keycap>
+
+ <keycap>U</keycap>
+ </keycombo>) and <guimenuitem>Copy Append</guimenuitem>
+ (<keycombo action="simul">
+ <keycap>CTRL</keycap>
+
+ <keycap>E</keycap>
+ </keycombo> <keycombo action="simul">
+ <keycap>CTRL</keycap>
+
+ <keycap>A</keycap>
+ </keycombo>) both add the selected text to the existing
+ contents of the Clipboard. A single
+ <guimenuitem>Paste</guimenuitem> (<keycombo action="simul">
+ <keycap>CTRL</keycap>
+
+ <keycap>V</keycap>
+ </keycombo>) command will insert the aggregated text at
+ the cursor or in place of an existing selection.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+
+ <!--********************************************************* Attrib -->
+
+ <qandadiv id="file-attributes">
+ <title>File Attributes</title>
+
+ <qandaentry>
+ <question id="file-owner-preserve">
+ <para>Does jEdit preserve file ownership and permissions
+ when it saves files?</para>
+ </question>
+
+ <answer>
+ <para>One reason this can be an issue is that by default,
+ jEdit adopts the conservative approach of saving a file to a
+ temporary name before renaming that file to the desired
+ name. This procedure minimizes the risk of crashes causing
+ loss of data, and works without reported problems on local
+ file systems. However, when files are served remotely by
+ FTP, Samba or other means, it may not be possible to
+ preserve file attributes on the server because the newly
+ created temporary file's owner may differ from the owner of
+ the original file on the server.</para>
+
+ <para>To avoid this problem, you can disable the two-step
+ file saving routine. Select
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem>, then under <guimenuitem>Loading &
+ Saving</guimenuitem>, clear the checkbox for
+ <guimenuitem>Two-stage save</guimenuitem>.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="file-linesep-choice">
+ <para>Why does jEdit ignore my choice for line separator
+ characters when I save a file?</para>
+ </question>
+
+ <answer>
+ <para>When jEdit saves an existing file, it uses the line
+ separator already used by the file. The line separator
+ designated in the buffer options or elsewhere is used only
+ for new files.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="file-autodetect-encoding">
+ <para>Can jEdit auto-detect character encodings when it
+ opens a file?</para>
+ </question>
+
+ <answer>
+ <para>Only Unicode can be detected when a file is loaded.
+ For other encodings, you must specify the encoding when the
+ file is loaded if you do not wish to use the default
+ encoding for your operating system.</para>
+
+ <para>There are a few features that can help you navigate
+ through encoding issues. You can select the encoding you
+ wish to use from <guisubmenu> Encoding</guisubmenu> in the
+ <guimenu>Commands</guimenu> menu of the File System Browser.
+ You can also designate a default encoding in the
+ <guimenuitem>Loading & Saving</guimenuitem> pane of the
+ Global Options dialog; if you do not, jEdit adopts your
+ operating system's default encoding as its own default. You
+ can change the encoding used to save an individual file by
+ selecting
+ <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> and changing the current buffer's
+ properties. Finally, jEdit keeps track of the encodings used
+ in the files named in the
+ <guimenu>File</guimenu>><guimenuitem>Recent
+ Files</guimenuitem> drop-down list.</para>
+
+ <para>These features allow you to minimize the attention
+ given to character encodings, but you must still pay some
+ attention if you do not want to use default settings.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="file-euro-char">
+ <para>I'm using the iso-8859-1 character encoding. How do I
+ type and save the Euro sign (<quote>â¬</quote>)?</para>
+ </question>
+
+ <answer>
+ <para>You need to use instead the iso-8859-15 character set,
+ which is a modification of iso-8859-1 that includes the Euro
+ sign and some Finnish and French characters. The Euro sign
+ represents character value 0xA4 in this 8-bit set. To open a
+ file manually using this encoding, select
+ <guimenu>File</guimenu>><guimenuitem>Open...
+ </guimenuitem>, and select
+ <guimenuitem>ISO8859_15</guimenuitem> from <guimenu>
+ Commands</guimenu>><guisubmenu>Enconding</guisubmenu>
+ before opening the file.</para>
+
+ <para>There is a startup script in the
+ <quote>Downloads</quote> area of <ulink
+ url="http://community.jedit.org">jEdit Community</ulink>
+ named <filename>euro.bsh</filename> that can be used as a
+ startup script to help simplify the insertion of the Euro
+ symbol if your keyboard currently lacks a dedicated
+ key.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+
+ <!--********************************************************** Files -->
+
+ <qandadiv id="file-manage">
+ <title>File Management</title>
+
+ <qandaentry>
+ <question id="open-dnd">
+ <para>How can I open files in jEdit using drag and
+ drop?</para>
+ </question>
+
+ <answer>
+ <para>Try installing the Drag and Drop plugin using the
+ Plugin Manager feature. It works with most (but not all)
+ combinations of operating systems and current Java runtime
+ environments.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="add-favorites">
+ <para>How do I add and remove directories to the list of
+ <quote>favorites</quote> in jEdit's File System
+ Browser?</para>
+ </question>
+
+ <answer>
+ <para>To add a directory to the list of favorites, navigate
+ so that the directory is at the top of the tree displayed in
+ the File System Browser window, click the
+ <guimenuitem>Favorites</guimenuitem> button, and select
+ <guimenuitem>Add to favorites</guimenuitem> from the
+ resulting menu. To delete a directory from the favorites
+ list, use the same menu to go to the favorites list.
+ Right-click on the directory to be deleted and select
+ <guimenuitem>Delete</guimenuitem>. This operation will
+ delete the directory from the list of favorites but will
+ have no effect on the directory itself.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="associate-files">
+ <para>How do I associate particular file types with jEdit so
+ I can open them by double clicking their icons in Windows
+ Explorer?</para>
+ </question>
+
+ <answer>
+ <para>You associate the file extension with
+ <userinput><replaceable><jEdit installation
+ directory></replaceable>\jedit.exe</userinput>.
+ This can be done from the <guimenuitem>File Types</guimenuitem>
+ tab in the Windows Explorer's <guimenuitem>Tools</guimenuitem>
+ -> <guimenuitem>Folder options...</guimenuitem> menu.</para>
+
+ <para>The EXE-installer for Windows includes a
+ custom context menu handler. It will provide menu items for
+ using jEdit any time you right-click on a file icon in
+ Windows Explorer. This feature does
+ not interfere with any existing file associations.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="open-restrict-dir">
+ <para>Can I restrict jEdit to opening and saving files in a
+ single directory without changing file permissions?</para>
+ </question>
+
+ <answer>
+ <para>The easiest way to get this kind of behavior is to use
+ macros that open the Virtual File Browser to a specific,
+ fixed directory, and then change the default keyboard
+ shortcuts for opening and saving files to run these
+ macros.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="filename-uc-to-lc">
+ <para>On Windows, how can I change the name of my file from
+ <filename>myfile.txt</filename> to
+ <filename>MyFile.txt</filename>?</para>
+ </question>
+
+ <answer>
+ <para>The Windows native file system deals with file names
+ in a case-insensitive manner, so
+ <filename>myfile.txt</filename> and
+ <filename>MyFile.txt</filename> refer to the same file. As a
+ result, the jEdit file browser treats both spellings
+ identically and does not make a name change. Using our
+ example, the easiest workaround is to rename the file in two
+ steps: first to <filename>_myfile.txt</filename>, then to
+ <filename>MyFile.txt</filename>.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+
+ <!--*********************************************************** Text -->
+
+ <qandadiv id="text-format">
+ <title>Formatting text</title>
+
+ <qandaentry>
+ <question id="text-indent">
+ <para>How do I indent or unindent selections of text?</para>
+ </question>
+
+ <answer>
+ <para>Using jEdit's default configuration, you can indent a
+ selection of text by pressing <keycombo action="simul">
+ <keycap>ALT</keycap>
+
+ <keycap>RIGHT</keycap>
+ </keycombo>. Unindent a selection by pressing <keycombo
+ action="simul">
+ <keycap>ALT</keycap>
+
+ <keycap>LEFT</keycap>
+ </keycombo>.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="text-line-numbers">
+ <para>Is there a way to automatically view line numbers when
+ a buffer is opened?</para>
+ </question>
+
+ <answer>
+ <para><guimenuitem>Select Utilities>Global
+ Options</guimenuitem>, and in the
+ <guimenuitem>Gutter</guimenuitem> option pane select the
+ <guimenuitem>Line Numbering</guimenuitem> check box.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="smart-quote">
+ <para>Does jEdit know smart quotes? In .tex files I would
+ like to use <userinput>``</userinput> or
+ <userinput>''</userinput> instead of
+ <userinput>"</userinput>.</para>
+ </question>
+
+ <answer>
+ <para>While jEdit can display any character provided by a
+ supported encoding set and enter any character supported by
+ a keyboard driver, it does not have the ability to insert
+ <quote>smart quote</quote> pairs automatically as some word
+ processors do. This would require a BeanShell macro to
+ modify quoted text.</para>
+
+ <para>The Accents and CharacterMap plugins can also help you
+ type international characters.</para>
+
+ <para>You also have the option of using a TeX macro (or, in
+ LaTeX, a pair of environment tags) to have the standard
+ double quotation mark <userinput>"</userinput> transformed
+ into the appropriate opening or closing smart quotes without
+ the need to keep track of when quoted text opens or
+ closes.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="text-softwrap">
+ <para>Does jEdit have a <quote>soft</quote> wrap text
+ mode?</para>
+ </question>
+
+ <answer>
+ <para>jEdit's 4.3's soft wrap mode, and especially its wrap
+ to margin=0, is one of its many features that just works
+ better than it does in most other editing environments. Soft
+ Wrap with margin=0 was unavailable in jEdit 4.2, but users
+ of 4.1 will remember it well. When you set SOFT WRAP with a
+ margin=0, you don't need to use the horizontal scroller
+ anymore. It's just as simple as that.</para>
+
+ <para>jEdit wrap capability can be activated for a specific
+ buffer, specific editing modes, or for all documents by
+ default. In prior versions, both the text wrap feature and
+ the <guimenuitem>Edit>Text>Format
+ Paragraph</guimenuitem> command insert <quote>hard</quote>
+ end of line characters. This <quote>hard wrap</quote>
+ feature remains available as an option for buffers and
+ editing modes.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="text-display-spaces">
+ <para>The display of spaces as a character in the editor is
+ annoying. How can I disable those small square boxes?</para>
+ </question>
+
+ <answer>
+ <para>This is controlled by the WhiteSpace plugin. To change
+ your settings to disable display of whitespace characters,
+ select <guimenuitem>Utilities>Global
+ Options</guimenuitem>, then select <guimenuitem>Plugin
+ options>WhiteSpace</guimenuitem>. You can separately
+ configure the display of spaces, tabs, and other whitespace
+ characters.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="text-i18n">
+ <para>Does jEdit support i18n?</para>
+ </question>
+
+ <answer>
+ <para>When editing text documents, jEdit supports any
+ available encoding scheme, and can open files with a
+ specified encoding other than the default encoding of your
+ operating system using the
+ <guimenu>Commands</guimenu>><guisubmenu>Encoding
+ </guisubmenu> from the File System Browser.</para>
+
+ <para>With respect to menu labels, message strings and other
+ GUI elements, the jEdit project team currently does not have
+ the resources to maintain multiple property sets in
+ languages other than English, particularly since the
+ development effort is continuing at a rapid pace. There has
+ not been great demand for this in any event. This may be
+ because jEdit is primarily a tool for programmers, and the
+ use of English as a common first or second language is
+ widespread in the global programming community. This
+ decision may be reconsidered when the application has
+ further matured and if more individuals express a
+ willingness to be involved in translation work.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+
+ <!--********************************************************* Source -->
+
+ <qandadiv id="source-compile">
+ <title>Compiling source code</title>
+
+ <qandaentry>
+ <question id="compile-java">
+ <para>How do I compile my Java source in JEdit?</para>
+ </question>
+
+ <answer>
+ <para>There are a number of plugins that you can use to
+ compile Java source code. You can run a Java compiler on the
+ command line in the <quote>System</quote> shell of the
+ <application>Console</application> plugin. If you are using
+ the JCompiler plugin, you will have a
+ <quote>JCompiler</quote> shell in the
+ <application>Console</application> plugin, and you can run
+ the <userinput>compile</userinput> command for the current
+ file, or the <userinput>compilepkg</userinput> command on
+ all of the current directory's source code files. You can
+ also use the <quote>Ant</quote> commandos from the
+ <application>Console</application> plugin or the
+ <application>AntFarm</application> plugin to run complex
+ builds on a project of source code files, using a
+ <filename>build.xml</filename> file to specify build
+ commands and dependencies.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="source-new-editmode">
+ <para>How do I create a new edit mode?</para>
+ </question>
+
+ <answer>
+ <para>Take a look at the <quote>Writing Edit Modes</quote>
+ section of the User's Guide. Basically, you have to write an
+ XML file containing data on the mode's file extensions and
+ buffer and syntax highlighting properties, then add
+ information about the new mode file to a second XML file
+ containing a catalog of modes.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="source-docbook">
+ <para>Does jEdit support DocBook tags?</para>
+ </question>
+
+ <answer>
+ <para>The application contains editing modes for both SGML
+ and XML. Using jEdit abbreviations, you can quickly insert
+ commonly-typed tags with a couple of keystroke. There are a
+ number of abbreviations in the XML and SGML modes that
+ create pairs of DocBook tags on the fly.</para>
+
+ <para>You can get validation, tree-browsing, auto-complete,
+ and auto-closing tags with the XML plugin, a very advanced
+ XML editing tool.</para>
+
+ <para>With whe XInsert or Template plugin you can create
+ multi-layered DocBook elements.</para>
+
+ <para>There are other macros targeting DocBook available
+ from the <ulink url="http://community.jedit.org">jEdit
+ Community</ulink> web site that you can use or adapt for
+ your own purposes.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+
+ <!--******************************************************* Settings -->
+
+ <qandadiv id="emacs-tricks">
+ <title>Tips for Emacs users</title>
+
+ <para>For more emacs help, check out <ulink
+ url="http://www.clapper.org/software/jedit/">this site</ulink> for
+ more emacs macros.</para>
+
+ <qandaentry>
+ <question id="settings-emacstab">
+ <para>Can I have an emacs style tab key (tab anywhere in a
+ line re-indents it)?</para>
+ </question>
+
+ <answer>
+ <para>Yes. You can do this by rebinding the
+ <keycode>tab</keycode> key to <command>Indent Selected
+ Lines</command> in the <guimenuitem>Global
+ Options</guimenuitem>.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="settings-emacsctrle">
+ <para>How do I map Ctrl-E to go to the end of the
+ line?</para>
+ </question>
+
+ <answer>
+ <para>jEdit has it set up as a 2-key shortcut. In order to
+ make Ctrl-E a one-key shortcut again, you first have to
+ redefine all of the Ctrl-E prefix shortcuts to mean
+ something else.</para>
+
+ <para><literal>jedit_keys.props</literal> shows you all of
+ the current keyboard bindings. As you can see, Ctrl-e is
+ used for many things in jEdit. If you want to redefine it to
+ be a single-key shortcut, first thing you need to do is
+ decide on another Ctrl-key to use as a prefix, to redefine
+ jEdit's fold features. I recommend using Ctrl-Q as the
+ prefix, and if you want to use Ctrl-Q to quit, you have to
+ hit Ctrl-Q twice. Cut and paste the below shortcuts into
+ your own properties file.</para>
+
+ <programlisting>
+# emacs end of line
+end.shortcut2=C+e
+# Ctrl-Q twice to quit
+exit.shortcut=C+q C+q
+# C+q is our new C+e prefix
+#{{{ C+q C+X
+
+# Unused: f, h, q, y
+copy-append.shortcut=C+q C+a
+search-in-open-buffers.shortcut=C+q C+b
+range-comment.shortcut=C+q C+c
+search-in-directory.shortcut=C+q C+d
+replace-and-find-next.shortcut=C+q C+g
+ignore-case.shortcut=C+q C+i
+scroll-to-current-line.shortcut=C+q C+j
+line-comment.shortcut=C+q C+k
+select-line-range.shortcut=C+q C+l
+add-marker.shortcut=C+q C+m
+center-caret.shortcut=C+q C+n
+open-path.shortcut=C+q C+o
+vertical-paste.shortcut=C+q C+p
+replace-in-selection.shortcut=C+q C+r
+save-all.shortcut=C+q C+s
+toggle-line-numbers.shortcut=C+q C+t
+cut-append.shortcut=C+q C+u
+paste-previous.shortcut=C+q C+v
+close-all.shortcut=C+q C+w
+regexp.shortcut=C+q C+x
+paste-deleted.shortcut=C+q C+y
+redo.shortcut=C+q C+z
+#}}}
+
+#{{{ C+q C+non-alpha
+left-docking-area.shortcut=C+q C+LEFT
+top-docking-area.shortcut=C+q C+UP
+right-docking-area.shortcut=C+q C+RIGHT
+bottom-docking-area.shortcut=C+q C+DOWN
+
+prev-marker.shortcut=C+q C+COMMA
+next-marker.shortcut=C+q C+PERIOD
+prev-bracket.shortcut=C+q C+OPEN_BRACKET
+next-bracket.shortcut=C+q C+CLOSE_BRACKET
+close-docking-area.shortcut=C+q C+BACK_QUOTE
+#}}}
+
+#{{{ C+q X
+# Unused: b e g h j k m o q t y z
+add-explicit-fold.shortcut=C+q a
+collapse-all-folds.shortcut=C+q c
+delete-paragraph.shortcut=C+q d
+format-paragraph.shortcut=C+q f
+find-previous.shortcut=C+q g
+invert-selection.shortcut=C+q i
+select-line.shortcut=C+q l
+narrow-to-fold.shortcut=C+q n n
+narrow-to-selection.shortcut=C+q n s
+select-paragraph.shortcut=C+q p
+remove-trailing-ws.shortcut=C+q r
+select-fold.shortcut=C+q s
+insert-literal.shortcut=C+q v
+select-word.shortcut=C+q w
+parent-fold.shortcut=C+q u
+expand-all-folds.shortcut=C+q x
+#}}}
+</programlisting>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="emacs-ctrl-k">
+ <para>What about ctrl-K?</para>
+ </question>
+
+ <answer>
+ <para>Check out <literal>macros/Emacs_Ctrl_K.bsh</literal>.
+ Bind it to Ctrl-k from the shortcuts option pane.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+
+ <qandadiv id="customize-other">
+ <title>Other Settings and Options</title>
+
+ <qandaentry>
+ <question id="settings-change-font">
+ <para>How can I change the font used for menu labels and
+ other elements of jEdit's user interface?</para>
+ </question>
+
+ <answer>
+ <para>Select
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem>, then the
+ <guimenuitem>Appearance</guimenuitem> option pane. When you
+ select the <quote>Metal</quote> look and feel you can also
+ select the fonts used for various displayed items.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="settings-add-classpath">
+ <para>I want to add a directory to the classpath. I did this
+ in the standalone BeanShell with ease by using the
+ <classname>addClassPath(String)</classname> method. but this
+ doesn't work in a macro. How could I manage the classpath in
+ jEdit?</para>
+ </question>
+
+ <answer>
+ <para>The implementation of BeanShell used in jEdit does not
+ use BeanShell's class loader. The script method contained in
+ loadJarClasses.bsh (found in the Downloads section of <ulink
+ url="http://community.jedit.org">jEdit Community</ulink>)
+ should work if you know the path to a specific class file or
+ class archive.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
+ <question id="settings-unlisted">
+ <para>Are there any hidden features?</para>
+ </question>
+
+ <answer>
+ <para>Yes. You can access them by binding a shortcut to the
+ action in question. You will find a complete list of
+ available commands under the
+ <guimenuitem>Shortcuts</guimenuitem> area in the
+ <guimenuitem>Global Options</guimenuitem>.</para>
+ </answer>
+ </qandaentry>
+ </qandadiv>
+ </qandaset>
+</sect1>
diff --git a/jEdit/doc/FAQ/faq.xml b/jEdit/doc/FAQ/faq.xml
index a7df9d4..c8f398b 100644
--- a/jEdit/doc/FAQ/faq.xml
+++ b/jEdit/doc/FAQ/faq.xml
@@ -1,189 +1,189 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- jEdit buffer-local properties: -->
-<!-- :indentSize=1 -->
-<!-- -->
-<!-- jEdit FAQ -->
-<!-- Copyright (C) 2001-2002 John Gellene -->
-<!-- $Id: faq.xml 10448 2007-08-29 06:09:55Z ezust $
--->
-<!-- Changes required for posting on jEdit Community: -->
-<!-- Title should be <h2> without class; -->
-<!-- all <h1> headings should be changed to <h2> -->
-<!-- Command line for processing: -->
-<!-- -->
-<!-- xsltproc -catalogs -output .\html\ faq.xsl faq.xml -->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
-<!-- Changes required for posting on jEdit Community: -->
-<!-- Title should be <h2> without class; -->
-<!-- all <h1> headings should be changed to <h2> -->
-
-<!ENTITY faq-intro SYSTEM "faq-intro.xml">
-<!ENTITY faq-general SYSTEM "faq-general.xml">
-<!ENTITY faq-install SYSTEM "faq-install.xml">
-<!ENTITY faq-use SYSTEM "faq-use.xml">
-<!ENTITY faq-macros SYSTEM "faq-macros.xml">
-<!ENTITY faq-plugins SYSTEM "faq-plugins.xml">
-<!ENTITY faq-problems SYSTEM "faq-problems.xml">
-<!ENTITY faq-contrib SYSTEM "faq-contrib.xml">
-<!ENTITY faq-legal SYSTEM "faq-legal.xml">
-]>
-<article class="faq" id="faq">
- <articleinfo>
- <author>
- <firstname>John</firstname>
-
- <surname>Gellene</surname>
-
- <affiliation>
- <address><email>jgellene at nyc.rr.com</email></address>
- </affiliation>
- </author>
-
- <author>
- <firstname>Kris</firstname>
-
- <surname>Kopicki</surname>
-
- <affiliation>
- <address><email>krisko at users.sourceforge.net</email></address>
- </affiliation>
- </author>
-
- <author>
- <firstname>Alan</firstname>
-
- <surname>Ezust</surname>
-
- <affiliation>
- <address><email>ezust at users.sourceforge.net</email></address>
- </affiliation>
- </author>
-
- <copyright>
- <year>2002</year>
-
- <holder>John Gellene</holder>
- </copyright>
-
- <copyright>
- <year>2007</year>
-
- <holder>Alan Ezust</holder>
- </copyright>
-
- <legalnotice>
- <title>Legal Notice</title>
-
- <para>Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation License,
- Version 1.1 or any later version published by the Free Software
- Foundation; with no <quote>Invariant Sections</quote>,
- <quote>Front-Cover Texts</quote> or <quote>Back-Cover Texts</quote>,
- each as defined in the license. A copy of the license is contained
- in the file <filename>COPYING.DOC.txt</filename> included with
- jEdit.</para>
- </legalnotice>
-
- <title>jEdit Frequently Asked Questions</title>
-
- <revhistory>
- <!-- <revision>
- <revnumber>0.1</revnumber>
- <date>Sept. 23, 2001</date>
- <revremark>Initial draft.</revremark>
- </revision>
- <revision>
- <revnumber>0.2</revnumber>
- <date>Sept. 25, 2001</date>
- <revremark>Sections 1-3 prepared.</revremark>
- </revision>
- <revision>
- <revnumber>0.3</revnumber>
- <date>Sept. 27, 2001</date>
- <revremark>Section 4 prepared.</revremark>
- </revision>
- <revision>
- <revnumber>0.4</revnumber>
- <date>Oct. 16, 2001</date>
- <revremark>Sections 1-4 completed.</revremark>
- </revision>
- <revision>
- <revnumber>0.5</revnumber>
- <date>Oct. 17, 2001</date>
- <revremark>Sections 1-5 completed.</revremark>
- </revision>
-
- <revision>
- <revnumber>0.6</revnumber>
- <date>Oct. 31, 2001</date>
- <revremark>Sections 1-5 completed; section 6 begun.</revremark>
- </revision>
- <revision>
- <revnumber>0.7</revnumber>
- <date>Jan. 15, 2002</date>
- <revremark>Inclusion of material from jEdit Community
- Interactive FAQ</revremark>
- </revision>
--->
-
- <revision>
- <revnumber>0.8</revnumber>
-
- <date>Feb. 17, 2002</date>
-
- <revremark>Additional revisions for jEdit 4.0
- release</revremark>
- </revision>
-
- <revision>
- <revnumber>0.9</revnumber>
-
- <date>Feb. 9, 2003</date>
-
- <revremark>Additional revisions for jEdit 4.1
- release</revremark>
- </revision>
-
- <revision>
- <revnumber>1.0</revnumber>
-
- <date>Feb. 18, 2003</date>
-
- <revremark>New format & additions for jEdit 4.1
- release</revremark>
- </revision>
-
- <revision>
- <revnumber>1.1</revnumber>
-
- <date>September 6, 2006</date>
-
- <revremark>Revised for jEdit 4.3 release</revremark>
- </revision>
- </revhistory>
-
- <releaseinfo><emphasis>Note: </emphasis> This draft incorporates some
- material from the Interactive FAQ section of the <ulink
- url="http://community.jedit.org/modules.php?op=modload&name=faq&file=index">jEdit
- Community web site</ulink>.</releaseinfo>
- </articleinfo>
-
- &faq-intro;
-
- &faq-general;
-
- &faq-install;
-
- &faq-use;
-
- &faq-macros;
-
- &faq-plugins;
-
- &faq-problems;
-
- &faq-contrib;
-
- &faq-legal;
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- jEdit buffer-local properties: -->
+<!-- :indentSize=1 -->
+<!-- -->
+<!-- jEdit FAQ -->
+<!-- Copyright (C) 2001-2002 John Gellene -->
+<!-- $Id: faq.xml 17727 2010-05-03 08:10:13Z kerik-sf $
+-->
+<!-- Changes required for posting on jEdit Community: -->
+<!-- Title should be <h2> without class; -->
+<!-- all <h1> headings should be changed to <h2> -->
+<!-- Command line for processing: -->
+<!-- -->
+<!-- xsltproc -catalogs -output .\html\ faq.xsl faq.xml -->
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+<!-- Changes required for posting on jEdit Community: -->
+<!-- Title should be <h2> without class; -->
+<!-- all <h1> headings should be changed to <h2> -->
+
+<!ENTITY faq-intro SYSTEM "faq-intro.xml">
+<!ENTITY faq-general SYSTEM "faq-general.xml">
+<!ENTITY faq-install SYSTEM "faq-install.xml">
+<!ENTITY faq-use SYSTEM "faq-use.xml">
+<!ENTITY faq-macros SYSTEM "faq-macros.xml">
+<!ENTITY faq-plugins SYSTEM "faq-plugins.xml">
+<!ENTITY faq-problems SYSTEM "faq-problems.xml">
+<!ENTITY faq-contrib SYSTEM "faq-contrib.xml">
+<!ENTITY faq-legal SYSTEM "faq-legal.xml">
+]>
+<article class="faq" id="faq">
+ <articleinfo>
+ <author>
+ <firstname>John</firstname>
+
+ <surname>Gellene</surname>
+
+ <affiliation>
+ <address><email>jgellene at nyc.rr.com</email></address>
+ </affiliation>
+ </author>
+
+ <author>
+ <firstname>Kris</firstname>
+
+ <surname>Kopicki</surname>
+
+ <affiliation>
+ <address><email>krisko at users.sourceforge.net</email></address>
+ </affiliation>
+ </author>
+
+ <author>
+ <firstname>Alan</firstname>
+
+ <surname>Ezust</surname>
+
+ <affiliation>
+ <address><email>ezust at users.sourceforge.net</email></address>
+ </affiliation>
+ </author>
+
+ <copyright>
+ <year>2002</year>
+
+ <holder>John Gellene</holder>
+ </copyright>
+
+ <copyright>
+ <year>2007</year>
+
+ <holder>Alan Ezust</holder>
+ </copyright>
+
+ <legalnotice>
+ <title>Legal Notice</title>
+
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.1 or any later version published by the Free Software
+ Foundation; with no <quote>Invariant Sections</quote>,
+ <quote>Front-Cover Texts</quote> or <quote>Back-Cover Texts</quote>,
+ each as defined in the license. A copy of the license is contained
+ in the file <filename>COPYING.DOC.txt</filename> included with
+ jEdit.</para>
+ </legalnotice>
+
+ <title>jEdit Frequently Asked Questions</title>
+
+ <revhistory>
+ <!-- <revision>
+ <revnumber>0.1</revnumber>
+ <date>Sept. 23, 2001</date>
+ <revremark>Initial draft.</revremark>
+ </revision>
+ <revision>
+ <revnumber>0.2</revnumber>
+ <date>Sept. 25, 2001</date>
+ <revremark>Sections 1-3 prepared.</revremark>
+ </revision>
+ <revision>
+ <revnumber>0.3</revnumber>
+ <date>Sept. 27, 2001</date>
+ <revremark>Section 4 prepared.</revremark>
+ </revision>
+ <revision>
+ <revnumber>0.4</revnumber>
+ <date>Oct. 16, 2001</date>
+ <revremark>Sections 1-4 completed.</revremark>
+ </revision>
+ <revision>
+ <revnumber>0.5</revnumber>
+ <date>Oct. 17, 2001</date>
+ <revremark>Sections 1-5 completed.</revremark>
+ </revision>
+
+ <revision>
+ <revnumber>0.6</revnumber>
+ <date>Oct. 31, 2001</date>
+ <revremark>Sections 1-5 completed; section 6 begun.</revremark>
+ </revision>
+ <revision>
+ <revnumber>0.7</revnumber>
+ <date>Jan. 15, 2002</date>
+ <revremark>Inclusion of material from jEdit Community
+ Interactive FAQ</revremark>
+ </revision>
+-->
+
+ <revision>
+ <revnumber>0.8</revnumber>
+
+ <date>Feb. 17, 2002</date>
+
+ <revremark>Additional revisions for jEdit 4.0
+ release</revremark>
+ </revision>
+
+ <revision>
+ <revnumber>0.9</revnumber>
+
+ <date>Feb. 9, 2003</date>
+
+ <revremark>Additional revisions for jEdit 4.1
+ release</revremark>
+ </revision>
+
+ <revision>
+ <revnumber>1.0</revnumber>
+
+ <date>Feb. 18, 2003</date>
+
+ <revremark>New format & additions for jEdit 4.1
+ release</revremark>
+ </revision>
+
+ <revision>
+ <revnumber>1.1</revnumber>
+
+ <date>September 6, 2006</date>
+
+ <revremark>Revised for jEdit 4.3 release</revremark>
+ </revision>
+ </revhistory>
+
+ <releaseinfo><emphasis>Note: </emphasis> This draft incorporates some
+ material from the Interactive FAQ section of the <ulink
+ url="http://community.jedit.org/modules.php?op=modload&name=faq&file=index">jEdit
+ Community web site</ulink>.</releaseinfo>
+ </articleinfo>
+
+ &faq-intro;
+
+ &faq-general;
+
+ &faq-install;
+
+ &faq-use;
+
+ &faq-macros;
+
+ &faq-plugins;
+
+ &faq-problems;
+
+ &faq-contrib;
+
+ &faq-legal;
</article>
\ No newline at end of file
diff --git a/jEdit/doc/README.txt b/jEdit/doc/README.txt
index 9c64b40..ffb0434 100644
--- a/jEdit/doc/README.txt
+++ b/jEdit/doc/README.txt
@@ -1,125 +1,110 @@
-JEDIT 4.3 README
-
-* About jEdit
-
-jEdit is a cross platform programmer's text editor written in Java.
-
-jEdit 4.3 requires Java 2 version 1.5 or later.
-It will not run with earlier versions.
-
-jEdit comes with full online help; to read it, select 'jEdit Help' from
-jEdit's 'Help' menu or point your web browser to the file named
-'index.html' in the 'doc/users-guide/' directory of the jEdit
-distribution.
-
-A PDF (Adobe Acrobat) version of the user's guide be downloaded from
-<http://www.jedit.org>.
-
-A list of people who contributed to jEdit, either by submitting code or
-edit modes to the core, or writing plugins can be viewed by selecting
-'About jEdit' from jEdit's 'Help' menu.
-
-* License
-
-jEdit is free software, and you are welcome to redistribute and modify
-it under the terms of the GNU General Public License (either version 2
-or any later version). See the file COPYING.txt for details.
-
-The jEdit installer is released under a public domain license and may be
-used for any purpose.
-
-A number of plugins are available for jEdit. Unless otherwise stated in
-the plugin's documentation, each of the plugins is licensed for use and
-redistribution under the terms of the GNU General Public License (either
-version 2 or any later version, at the user's election).
-
-The user's guide is released under the terms of the GNU Free
-Documentation License, Version 1.1 or any later version published by the
-Free Software Foundation; with no "Invariant Sections", "Front-Cover
-Texts" or "Back-Cover Texts", each as defined in the license. A copy of
-the license can be found in the file COPYING.DOC.txt.
-
-The class libraries shipped with jEdit each have their own license; see
-the 'Libraries' section below.
-
-* jEdit on the Internet
-
-The jEdit homepage, located at <http://www.jedit.org> contains the
-latest version of jEdit, along with plugin downloads. There is also a
-user-oriented site, <http://community.jedit.org>. Check it out.
-
-If you would like to report a bug, first take a look at the 'jEdit
-Frequently Asked Questions' document, accessible from either jEdit's
-online help or by pointing your web browser to the file named
-'index.html' in the 'doc/FAQ/' directory of the jEdit distribution.
-
-If the FAQ doesn't answer your question, report a bug with our bug
-tracker, located at <http://www.jedit.org/?page=feedback>.
-
-When writing a bug report, please try to be as specific as possible. You
-should specify your jEdit version, Java version, operating system, any
-relevant output from the activity log, and an e-mail address, in case we
-need further information from you to fix the bug.
-
-The 'Make Bug Report' macro included with jEdit, which can be found in
-the 'Misc' submenu of the 'Macros' menu, might be useful when preparing
-a bug report.
-
-If you would like to discuss jEdit and be informed when new versions are
-released, you should subscribe to the mailing lists; see
-<http://www.jedit.org/?page=feedback> for details.
-
-If you would like to discuss the BeanShell scripting language, subscribe
-to one of the BeanShell mailing lists by visiting
-<http://www.beanshell.org/contact.html>.
-
-Finally, if you want to chat about jEdit with other users and
-developers, come join the #jedit channel on irc.freenode.net. You
-can use the IRC plugin, available from <http://plugins.jedit.org>, for
-this purpose.
-
-* Libraries
-
-jEdit bundles the following libraries:
-
-- AElfred XML parser by Microstar corporation.
- This class is also DEPRECATED in favor of JDK 1.5's XmlReaderFactory class,
- or the supplied XMLUtilities helper classes.
-
- This class library is released under its own, non-GPL license,
- which reads as follows:
-
- "AElfred is free for both commercial and non-commercial use and
- redistribution, provided that Microstar's copyright and disclaimer are
- retained intact. You are free to modify AElfred for your own use and
- to redistribute AElfred with your modifications, provided that the
- modifications are clearly documented."
-
- The AElfred web site is <http://www.microstar.com>.
-
-- BeanShell scripting language, by Pat Niemeyer. jEdit bundles BeanShell
- version 2.0b4 with the bsh.util and bsh.classpath packages removed.
-
- BeanShell is released under a dual Sun Public License/GNU LGPL
- license. See the BeanShell homepage for details.
-
- The BeanShell web site is <http://www.beanshell.org>.
-
-- ASM bytecode generation library from Objectweb. This class library is
- released under the 'GNU Lesser General Public License'.
- The ASM homepage can be found at <http://asm.objectweb.org/>.
- The library is in org/gjt/sp/jedit/bsh/org/objectweb/asm/.
-
-The jEdit installer bundles the following libraries:
-
-- org.apache.excalibur.bzip2 compression library. This library is
- released under the Apache license, which can be found in
- doc/Apache.LICENSE.txt.
-
- The org.apache.excalibur.bzip2 web site is
- <http://jakarta.apache.org/avalon/excalibur/bzip2/>.
-
-- com.ice.tar, by Tim Endres. This code is in the public domain.
-
- The com.ice.tar web site is <http://www.trustice.com/java/tar/>.
-
+jEdit README
+
+* About jEdit
+
+jEdit is a cross platform programmer's text editor written in Java.
+
+jEdit 4.4 requires Java 2 version 1.6 or later.
+It will not run with earlier versions.
+
+jEdit comes with full online help; to read it, select 'jEdit Help' from
+jEdit's 'Help' menu or point your web browser to the file named
+'index.html' in the 'doc/users-guide/' directory of the jEdit
+distribution.
+
+A PDF (Adobe Acrobat) version of the user's guide be downloaded from
+<http://www.jedit.org>.
+
+A list of people who contributed to jEdit, either by submitting code or
+edit modes to the core, or writing plugins can be viewed by selecting
+'About jEdit' from jEdit's 'Help' menu.
+
+* License
+
+jEdit is free software, and you are welcome to redistribute and modify
+it under the terms of the GNU General Public License (either version 2
+or any later version). See the file COPYING.txt for details.
+
+The jEdit installer is released under a public domain license and may be
+used for any purpose.
+
+A number of plugins are available for jEdit. Unless otherwise stated in
+the plugin's documentation, each of the plugins is licensed for use and
+redistribution under the terms of the GNU General Public License (either
+version 2 or any later version, at the user's election).
+
+The user's guide is released under the terms of the GNU Free
+Documentation License, Version 1.1 or any later version published by the
+Free Software Foundation; with no "Invariant Sections", "Front-Cover
+Texts" or "Back-Cover Texts", each as defined in the license. A copy of
+the license can be found in the file COPYING.DOC.txt.
+
+The class libraries shipped with jEdit each have their own license; see
+the 'Libraries' section below.
+
+* jEdit on the Internet
+
+The jEdit homepage, located at <http://www.jedit.org> contains the
+latest version of jEdit, along with plugin downloads. There is also a
+user-oriented site, <http://community.jedit.org>. Check it out.
+
+If you would like to report a bug, first take a look at the 'jEdit
+Frequently Asked Questions' document, accessible from either jEdit's
+online help or by pointing your web browser to the file named
+'index.html' in the 'doc/FAQ/' directory of the jEdit distribution.
+
+If the FAQ doesn't answer your question, report a bug with our bug
+tracker, located at <http://www.jedit.org/?page=feedback>.
+
+When writing a bug report, please try to be as specific as possible. You
+should specify your jEdit version, Java version, operating system, any
+relevant output from the activity log, and an e-mail address, in case we
+need further information from you to fix the bug.
+
+The 'Make Bug Report' macro included with jEdit, which can be found in
+the 'Misc' submenu of the 'Macros' menu, might be useful when preparing
+a bug report.
+
+If you would like to discuss jEdit and be informed when new versions are
+released, you should subscribe to the mailing lists; see
+<http://www.jedit.org/?page=feedback> for details.
+
+If you would like to discuss the BeanShell scripting language, subscribe
+to one of the BeanShell mailing lists by visiting
+<http://www.beanshell.org/contact.html>.
+
+Finally, if you want to chat about jEdit with other users and
+developers, come join the #jedit channel on irc.freenode.net. You
+can use the IRC plugin, available from <http://plugins.jedit.org>, for
+this purpose.
+
+* Libraries
+
+jEdit bundles the following libraries:
+
+- BeanShell scripting language, by Pat Niemeyer. jEdit bundles BeanShell
+ version 2.0b4 with the bsh.util and bsh.classpath packages removed.
+
+ BeanShell is released under a dual Sun Public License/GNU LGPL
+ license. See the BeanShell homepage for details.
+
+ The BeanShell web site is <http://www.beanshell.org>.
+
+- ASM bytecode generation library from Objectweb. This class library is
+ released under the 'GNU Lesser General Public License'.
+ The ASM homepage can be found at <http://asm.objectweb.org/>.
+ The library is in org/gjt/sp/jedit/bsh/org/objectweb/asm/.
+
+The jEdit installer bundles the following libraries:
+
+- org.apache.excalibur.bzip2 compression library. This library is
+ released under the Apache license, which can be found in
+ doc/Apache.LICENSE.txt.
+
+ The org.apache.excalibur.bzip2 web site is
+ <http://jakarta.apache.org/avalon/excalibur/bzip2/>.
+
+- com.ice.tar, by Tim Endres. This code is in the public domain.
+
+ The com.ice.tar web site is <http://www.trustice.com/java/tar/>.
+
diff --git a/jEdit/doc/TODO.txt b/jEdit/doc/TODO.txt
index 07292ff..d246478 100644
--- a/jEdit/doc/TODO.txt
+++ b/jEdit/doc/TODO.txt
@@ -1,258 +1,195 @@
-[error] ExtensionManager: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 379
-[error] ExtensionManager: at org.gjt.sp.jedit.Buffer.getLineOfOffset(Buffer.java:892)
-[error] ExtensionManager: at errorlist.DefaultErrorSource$DefaultError.getLineNumber(DefaultErrorSource.java:510)
-[error] ExtensionManager: at errorlist.DefaultErrorSource.findError(DefaultErrorSource.java:330)
-[error] ExtensionManager: at errorlist.DefaultErrorSource.getLineErrors(DefaultErrorSource.java:134)
-[error] ExtensionManager: at errorlist.ErrorHighlight.paintValidLine(ErrorHighlight.java:53)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.TextAreaExtension.paintScreenLineRange(TextAreaExtension.java:70)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.ExtensionManager.paintScreenLineRange(ExtensionManager.java:146)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.ExtensionManager.paintScreenLineRange(ExtensionManager.java:106)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.TextAreaPainter.paint(TextAreaPainter.java:699)
-
-[error] ExtensionManager: java.lang.NullPointerException
-[error] ExtensionManager: at org.gjt.sp.jedit.Buffer.markTokens(Buffer.java:2161)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.ChunkCache.lineToChunkList(ChunkCache.java:760)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.ChunkCache.updateChunksUpTo(ChunkCache.java:635)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.ChunkCache.getLineInfo(ChunkCache.java:244)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.TextAreaPainter$PaintText.paintValidLine(TextAreaPainter.java:1039)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.TextAreaExtension.paintScreenLineRange(TextAreaExtension.java:70)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.ExtensionManager.paintScreenLineRange(ExtensionManager.java:146)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.ExtensionManager.paintScreenLineRange(ExtensionManager.java:106)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.TextAreaPainter.paint(TextAreaPainter.java:699)
-
-
-TO DO
-
-absolute path completion
-
-does not indent properly:
-
-1000 [
- [
- [
- [
- 50000 cons-a-lot
- ] 4 10 make-trash
- ] 4 10 make-trash
- ] 4 10 make-trash 0 swap [ [ + ] when* ] tree-each drop
-] times
-
-Note that this is not a complete to do list. It mostly only lists bugs
-and quirks that I need to fix eventually.
-
-splitting messes up last physical line in the newly created text area
-
-console: cd / repeatedly on windows
-
-ok [error] ExtensionManager: java.lang.NullPointerException
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.StructureMatcher$Highlight.getOffsets(StructureMatcher.java:181)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.StructureMatcher$Highlight.paintHighlight(StructureMatcher.java:207)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.StructureMatcher$Highlight.paintValidLine(StructureMatcher.java:147)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.TextAreaExtension.paintScreenLineRange(TextAreaExtension.java:70)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.ExtensionManager.paintScreenLineRange(ExtensionManager.java:146)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.ExtensionManager.paintScreenLineRange(ExtensionManager.java:106)
-[error] ExtensionManager: at org.gjt.sp.jedit.textarea.TextAreaPainter.paint(TextAreaPainter.java:699)
-
-+ text area:
-
- - click&drag breaks fast scroll
- - format: doesn't wrap right if selection starts in the middle of the
- line
- - ruleset importing trick
- - expand fold: try to expand even if already expanded
- - backspace with virtual caret: needs tweaks
- - independent text area component
- - gutter: has a depenency on View to do focus highlight, and Marker
- - text area: depends on view for input handling,
- smart home/end macro record, showing dialog boxes, abbrevs
- - mouse handler: registers
- - text area transfer handler: opening files dependency
- - new file: explicit folding: type {{{: fold marker doesn't appear
- - finish code to hide caret on user input; enter/backspace is a problem
- maybe listen for KeyTyped instead
- - indent folding: fold marker not always updated
- - format: preserve comment chars at start
- - tabs to spaces with rect select
- - input methods
- - remove-marker, select-next/prev-marker/bracket
- - format -- instead of \n\n, what if it has \n \n?
- - DnD still dosn't work as expected when draging from the same buffer,
- but differen text area (for example droping at the position where drag
- was started erases text)- no support for vertical pasting
- - anoying cursor blinking (responsible for this is scrolling option :
- textArea.moveCaretPosition(pos,JEditTextArea.ELECTRIC_SCROLL) in
- dragOver() method)
-
-Ideas: a lot of the code in the jedit text area can be simplified
- for example, i'm not sure we really need the ChunkCache anymore
- just keep the chunks for the currently
- painting line around, to speed up the multiple offsetToX()
- calls that happen during painting
- also, you might want to rip out the text area's
- scrolling code, and put in a JScrollPane
-
-
-+ auto indent:
-
- - ? : do not unindent
- - deep indent
- - Common Lisp &body forms
- - pressing enter: carry over * from prev line in javadoc
- - javadoc indent: if prev line was /* or *, unindent if prev line is
- */
- if(foo)
- while(bar)
- {
- //
- }
- <--- cursor here
- - option to disable electric keys
- - unindentThisAndFollowing
- - indent & syntax tokens
-
-+ vfs browser:
-
- - test keyboard completion with expanded/collapsed tree
- - test keyboard completion with high latency VFS
- - fsb default size
- - don't show 'new directory' in favorites:
- - file system browser column widths are not saved
-
-+ misc:
-
- - kill ring still being reversed
- - jEdit.checkBufferStatus() fucks with split panes
-
- - there is a comment in browser.actions.xml:
- /* NOTE: I do NOT want plugins creating check box menu items
- * in jEdit 4.2! The API is not stable, note the _comp hack...
- * in 4.3 I will finish the full action API refactoring and
- * IS_SELECTED blocks in browser actions will have access to
- * the browser variable just like the CODE block above.
- *
- * Love, Slava */
-
- - option to disable buffer local properties
- - CA+PLUS +: bad
- - jedit -encoding
- - goToBuffer() -- if any parent has zero height or zero width...
- - deferred loading API for macro handlers
- - S+INS, etc in swing controls
- - vfs: a way of running awt requests not all at end
- - wrapped dock buttons broken
-
-+ beanshell:
-
- ; after else if()
- longs not read correctly if prefixed with 0x
-
-+ docs:
-
-- vfs browser changes
-- auto indent
-- save help index
-- document optional dependencies
-- deferred loading mention.
-- addCommandPath()
-- API thread safety
-- add note to documentation about exponential-time regexps
-- document deep indent
-- note about dependencies
-- plugin tutorial:
- - plugin build environment docs
- - auto-created actions
- - link to jEdit devel page
- - quicknotepad class -- links to API docs
- - functions - links to API docs
- - quicknotepad docs
-- plugin tips and techniques:
- - common. properties, using properties for UI strings
- - cutting down on startup time
- - canned dialog boxes in GUIUtilities
- - tools.jar
- - string comparison in MiscUtilities
- - writing a macro handler
- - writing a fold handler
- - OperatingSystem class
- - option groups
- - listening for buffer changes
- - canned controls:
- animated icon, color well button, enhanced dialog,
- font selector, history text field,
- jcheckboxlist, rolloverbutton,
- variablegridlayout
- - displaying a help viewer
- - canned icons
- - vfs implementation
- - running stuff in i/o threads
- - multi-threaded i/o
- - jeditresource: protocol
- - getting line syntax info, textutilities.getTokenAtOffset()
- - text area extensions
- - text area caret & scroll listeners
- - status bar messages & readNextChar()
-- vfs javadoc: invokeAndWait() example for createVFSSession()
-
-check tips of the day
-- help:
- - titles in search are fucked
-- sidebars: need a border or some sort
-
-[error] WorkThread: java.lang.ClassCastException
-[error] WorkThread: at archive.ArchiveVFS.getDirectories(Unknown Source)
-[error] WorkThread: at archive.ArchiveVFS.cacheDirectories(Unknown Source)
-[error] WorkThread: at archive.ArchiveVFS._listDirectory(Unknown Source)
-[error] WorkThread: at org.gjt.sp.jedit.browser.BrowserIORequest.listDirectory(BrowserIORequest.java:159)
-[error] WorkThread: at org.gjt.sp.jedit.browser.BrowserIORequest.run(BrowserIORequest.java:90)
-[error] WorkThread: at org.gjt.sp.util.WorkThread.doRequest(WorkThread.java:194)
-[error] WorkThread: at org.gjt.sp.util.WorkThread.doRequests(WorkThread.java:161)
-[error] WorkThread: at org.gjt.sp.util.WorkThread.run(WorkThread.java:135)
-
-[error] ChunkCache: BUG: skew=1,out.size()=0
-[error] ChunkCache: BUG: skew=1,out.size()=1
-
-- C+d & killring
-- plugin mgr inspection of not-loaded plugins
-- history text field tweak
-
-+ obscure:
-
-- no need to wait for requests after newFile()
-- class loading problems
-- motif l&f: shortcuts in menu items
-- some JLists do not auto-scroll on keystroke
-- how to handle S+0-9?
-- invoking action bar command twice
-- backup time distance setting
-- if A depends on B but A is loaded before B and B breaks, A ends up
- being loaded. Solution: load plugins in order of dependencies?
-
-+ performance:
-
-- 7000 line lisp file: window resize is slow
-- closing lots of files is slow -- esp. with close all dialog box!
-- menu drag: slow
-- bracket matching: no delay for current line match??
-- final optimization for OffsetManager: scan to zero or scan to end
-- do buffer load AWT half immediately after work thread half
-- replace all in a directory could be faster
-- buffer.setMode() slow
-- eliminate redundant scans and events when loading buffer
-- don't repaint whole selection when resizing
-- could make non-soft wrap chunk merge even faster!
-- syntax SPAN::END substitution: String --> char[] --> String
-- is getScreenLineOfOffset() called often?
-- if caret is at the end of a buffer when doing a replace all, a lot of
- repaint() and getLineOfOffset() calls are made
-- optimize for no folding & no soft wrap case:
- - reset() and changed() don't need to scan
- - scroll/physUp/Down() simpler
-- inserting lines repaints whole text area
-- see if getLineOfOffset() can be optimized
-- optimize 1 long line case
-- two repaints in line insert
-- redundant calls to recalculateLastPhysicalLines()/updateScrollBars()
-- redundant updateChunksUpTo() calls
-
-jEdit buffer local properties:
-:wrap=hard:maxLineLen=72:indentSize=2:
+TO DO
+
+Note that this is not a current to do list. It mostly only lists bugs
+and quirks that Slava wanted to fix before he stopped development. All
+of these items should eventually be removed or converted into tracker
+items if they are not out of date.
+
+splitting messes up last physical line in the newly created text area
+
++ text area:
+
+ - click&drag breaks fast scroll
+ - format: doesn't wrap right if selection starts in the middle of the
+ line
+ - ruleset importing trick
+ - expand fold: try to expand even if already expanded
+ - backspace with virtual caret: needs tweaks
+ - independent text area component
+ - gutter: has a depenency on View to do focus highlight, and Marker
+ - text area: depends on view for input handling,
+ smart home/end macro record, showing dialog boxes, abbrevs
+ - mouse handler: registers
+ - text area transfer handler: opening files dependency
+ - new file: explicit folding: type {{{: fold marker doesn't appear
+ - finish code to hide caret on user input; enter/backspace is a problem
+ maybe listen for KeyTyped instead
+ - indent folding: fold marker not always updated
+ - format: preserve comment chars at start
+ - tabs to spaces with rect select
+ - input methods
+ - remove-marker, select-next/prev-marker/bracket
+ - format -- instead of \n\n, what if it has \n \n?
+ - DnD still dosn't work as expected when draging from the same buffer,
+ but differen text area (for example droping at the position where drag
+ was started erases text)- no support for vertical pasting
+ - anoying cursor blinking (responsible for this is scrolling option :
+ textArea.moveCaretPosition(pos,JEditTextArea.ELECTRIC_SCROLL) in
+ dragOver() method)
+
+Ideas: a lot of the code in the jedit text area can be simplified
+ for example, i'm not sure we really need the ChunkCache anymore
+ just keep the chunks for the currently
+ painting line around, to speed up the multiple offsetToX()
+ calls that happen during painting
+ also, you might want to rip out the text area's
+ scrolling code, and put in a JScrollPane
+
+
++ auto indent:
+
+ - ? : do not unindent
+ - deep indent
+ - Common Lisp &body forms
+ - pressing enter: carry over * from prev line in javadoc
+ - javadoc indent: if prev line was /* or *, unindent if prev line is
+ */
+ if(foo)
+ while(bar)
+ {
+ //
+ }
+ <--- cursor here
+ - option to disable electric keys
+ - unindentThisAndFollowing
+ - indent & syntax tokens
+
++ vfs browser:
+
+ - test keyboard completion with expanded/collapsed tree
+ - test keyboard completion with high latency VFS
+ - fsb default size
+ - file system browser column widths are not saved
+
++ misc:
+
+ - kill ring still being reversed
+ - jEdit.checkBufferStatus() fucks with split panes
+
+ - there is a comment in browser.actions.xml:
+ /* NOTE: I do NOT want plugins creating check box menu items
+ * in jEdit 4.2! The API is not stable, note the _comp hack...
+ * in 4.3 I will finish the full action API refactoring and
+ * IS_SELECTED blocks in browser actions will have access to
+ * the browser variable just like the CODE block above.
+ *
+ * Love, Slava */
+
+ - option to disable buffer local properties
+ - CA+PLUS +: bad
+ - goToBuffer() -- if any parent has zero height or zero width...
+ - deferred loading API for macro handlers
+ - S+INS, etc in swing controls
+ - vfs: a way of running awt requests not all at end
+ - wrapped dock buttons broken
+
++ beanshell:
+
+ ; after else if()
+ longs not read correctly if prefixed with 0x
+
++ docs:
+
+- vfs browser changes
+- auto indent
+- save help index
+- document optional dependencies
+- deferred loading mention.
+- addCommandPath()
+- API thread safety
+- add note to documentation about exponential-time regexps
+- document deep indent
+- note about dependencies
+- plugin tutorial:
+ - link to jEdit devel page
+ - quicknotepad class -- links to API docs
+ - functions - links to API docs
+ - quicknotepad docs
+- plugin tips and techniques:
+ - common. properties, using properties for UI strings
+ - cutting down on startup time
+ - canned dialog boxes in GUIUtilities
+ - tools.jar
+ - string comparison in MiscUtilities
+ - writing a macro handler
+ - writing a fold handler
+ - OperatingSystem class
+ - option groups
+ - listening for buffer changes
+ - canned controls:
+ animated icon, color well button, enhanced dialog,
+ font selector, history text field,
+ jcheckboxlist, rolloverbutton,
+ variablegridlayout
+ - displaying a help viewer
+ - canned icons
+ - vfs implementation
+ - running stuff in i/o threads
+ - multi-threaded i/o
+ - jeditresource: protocol
+ - getting line syntax info, textutilities.getTokenAtOffset()
+ - text area extensions
+ - text area caret & scroll listeners
+ - status bar messages & readNextChar()
+- vfs javadoc: invokeAndWait() example for createVFSSession()
+
+check tips of the day
+- help:
+ - titles in search are fucked
+- sidebars: need a border or some sort
+
+- C+d & killring
+- plugin mgr inspection of not-loaded plugins
+- history text field tweak
+
++ obscure:
+
+- no need to wait for requests after newFile()
+- class loading problems
+- motif l&f: shortcuts in menu items
+- some JLists do not auto-scroll on keystroke
+- how to handle S+0-9?
+- invoking action bar command twice
+- backup time distance setting
+- if A depends on B but A is loaded before B and B breaks, A ends up
+ being loaded. Solution: load plugins in order of dependencies?
+
++ performance:
+
+- 7000 line lisp file: window resize is slow
+- closing lots of files is slow -- esp. with close all dialog box!
+- menu drag: slow
+- bracket matching: no delay for current line match??
+- final optimization for OffsetManager: scan to zero or scan to end
+- do buffer load AWT half immediately after work thread half
+- replace all in a directory could be faster
+- buffer.setMode() slow
+- eliminate redundant scans and events when loading buffer
+- don't repaint whole selection when resizing
+- could make non-soft wrap chunk merge even faster!
+- syntax SPAN::END substitution: String --> char[] --> String
+- is getScreenLineOfOffset() called often?
+- if caret is at the end of a buffer when doing a replace all, a lot of
+ repaint() and getLineOfOffset() calls are made
+- optimize for no folding & no soft wrap case:
+ - reset() and changed() don't need to scan
+ - scroll/physUp/Down() simpler
+- inserting lines repaints whole text area
+- see if getLineOfOffset() can be optimized
+- optimize 1 long line case
+- two repaints in line insert
+- redundant calls to recalculateLastPhysicalLines()/updateScrollBars()
+- redundant updateChunksUpTo() calls
+
+jEdit buffer local properties:
+:wrap=hard:maxLineLen=72:indentSize=2:
diff --git a/jEdit/doc/jeditfo.xsl b/jEdit/doc/jeditfo.xsl
index fde4716..9d4c5af 100644
--- a/jEdit/doc/jeditfo.xsl
+++ b/jEdit/doc/jeditfo.xsl
@@ -1,57 +1,57 @@
-<?xml version='1.0'?>
-
-<!-- :folding=explicit:collapseFolds=1: -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version='1.0'>
-
-<xsl:import href="docbook-wrapper-fo.xsl"/>
-
-<xsl:template match="guibutton">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guiicon">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guilabel">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guimenu">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guimenuitem">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guisubmenu">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="keycap">
- <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="property">
- <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:param name="funcsynopsis.style">ansi</xsl:param>
-
-<xsl:param name="generate.toc">
-book toc
-part nop
-</xsl:param>
-
-<xsl:param name="fop.extensions" select="1"></xsl:param>
-
-<xsl:param name="ulink.show" select="0"></xsl:param>
-<xsl:param name="ulink.footnotes" select="1"></xsl:param>
-
-<xsl:param name="alignment">left</xsl:param>
-<xsl:param name="hyphenate">false</xsl:param>
-
-</xsl:stylesheet>
+<?xml version='1.0'?>
+
+<!-- :folding=explicit:collapseFolds=1: -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:import href="docbook-wrapper-fo.xsl"/>
+
+<xsl:template match="guibutton">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guiicon">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guilabel">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guimenu">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guimenuitem">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guisubmenu">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="keycap">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="property">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:param name="funcsynopsis.style">ansi</xsl:param>
+
+<xsl:param name="generate.toc">
+book toc
+part nop
+</xsl:param>
+
+<xsl:param name="fop1.extensions" select="1"></xsl:param>
+
+<xsl:param name="ulink.show" select="0"></xsl:param>
+<xsl:param name="ulink.footnotes" select="1"></xsl:param>
+
+<xsl:param name="alignment">left</xsl:param>
+<xsl:param name="hyphenate">false</xsl:param>
+
+</xsl:stylesheet>
diff --git a/jEdit/doc/jedithtml.xsl b/jEdit/doc/jedithtml.xsl
index ee81b9c..4f88ff2 100644
--- a/jEdit/doc/jedithtml.xsl
+++ b/jEdit/doc/jedithtml.xsl
@@ -1,255 +1,255 @@
-<?xml version='1.0'?>
-
-<!-- :folding=explicit:collapseFolds=1: -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version='1.0'>
-
-<xsl:import href="docbook-wrapper-html.xsl"/>
-
-<!-- {{{ Various customizations -->
-
-<xsl:template match="guibutton">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guiicon">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guilabel">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guimenu">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guimenuitem">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="guisubmenu">
- <xsl:call-template name="inline.boldseq"/>
-</xsl:template>
-
-<xsl:template match="keycap">
- <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:template match="property">
- <xsl:call-template name="inline.monoseq"/>
-</xsl:template>
-
-<xsl:param name="use.id.as.filename">1</xsl:param>
-
-<xsl:param name="toc.list.type">ul</xsl:param>
-
-<xsl:param name="funcsynopsis.style">ansi</xsl:param>
-<!-- xsl:template match="void"><xsl:text>();</xsl:text></xsl:template -->
-
-<xsl:param name="chunk.first.sections">1</xsl:param>
-
-<!-- xsl:template match="*" mode="object.title.markup.textonly">
- <xsl:variable name="title">
- <xsl:apply-templates select="." mode="title.markup"/>
- </xsl:variable>
- <xsl:value-of select="$title"/>
-</xsl:template -->
-
-<!-- xsl:template name="header.navigation">
-</xsl:template>
-
-<xsl:template name="footer.navigation">
-</xsl:template -->
-
-<!-- }}} -->
-
-<!-- {{{ Stuff for FAQ -->
-
-<!-- <xsl:param name="generate.qandaset.toc">1</xsl:param> -->
-<!-- <xsl:param name="generate.qandaset.div">1</xsl:param> -->
-
-<!-- xsl:param name="local.l10n.xml" select="document('')"/ -->
-
-<!-- }}} -->
-
-<!-- {{{ Swing HTML control doesn't support “ and ” -->
-<!-- i18n:i18n xmlns:i18n="http://docbook.sourceforge.net/xmlns/l10n/1.0">
-<i18n:l10n language="en">
-
-<i18n:dingbat key="startquote" text="""/>
-<i18n:dingbat key="endquote" text="""/>
-<i18n:dingbat key="nestedstartquote" text="""/>
-<i18n:dingbat key="nestedendquote" text="""/>
-
-<i18n:context name="section-xref">
- <i18n:template name="bridgehead" text="the section called "%t""/>
- <i18n:template name="sect1" text="the section called "%t""/>
- <i18n:template name="sect2" text="the section called "%t""/>
- <i18n:template name="sect3" text="the section called "%t""/>
- <i18n:template name="sect4" text="the section called "%t""/>
- <i18n:template name="sect5" text="the section called "%t""/>
- <i18n:template name="section" text="the section called "%t""/>
- <i18n:template name="simplesect" text="the section called "%t""/>
-</i18n:context>
-
-</i18n:l10n>
-</i18n:i18n -->
-<!-- }}} -->
-
-<!-- {{{ TOC generation -->
-<xsl:template match="/">
- <xsl:call-template name="toc"/>
-</xsl:template>
-
-<xsl:template name="toc">
- <xsl:apply-templates/>
- <xsl:call-template name="write.chunk">
- <xsl:with-param name="filename" select="'toc.xml'"/>
- <xsl:with-param name="method" select="'xml'"/>
- <xsl:with-param name="indent" select="'yes'"/>
- <xsl:with-param name="content">
- <xsl:call-template name="toc.content"/>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="toc.content">
- <TOC>
- <xsl:apply-templates select="." mode="my.toc"/>
- </TOC>
-</xsl:template>
-
-<xsl:template match="set" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="book" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="book" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon"
- mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="part|reference|preface|chapter|appendix|article"
- mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates
- select="preface|chapter|appendix|refentry|section|sect1"
- mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="section" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="section" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect1" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect2" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect2" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect3" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect3" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect4" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect4" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect5" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect5|colophon" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="."/>
- </xsl:call-template>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- </ENTRY>
-</xsl:template>
-
-<!-- }}} -->
-
-</xsl:stylesheet>
+<?xml version='1.0'?>
+
+<!-- :folding=explicit:collapseFolds=1: -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:import href="docbook-wrapper-html.xsl"/>
+
+<!-- {{{ Various customizations -->
+
+<xsl:template match="guibutton">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guiicon">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guilabel">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guimenu">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guimenuitem">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="guisubmenu">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="keycap">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="property">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:param name="use.id.as.filename">1</xsl:param>
+
+<xsl:param name="toc.list.type">ul</xsl:param>
+
+<xsl:param name="funcsynopsis.style">ansi</xsl:param>
+<!-- xsl:template match="void"><xsl:text>();</xsl:text></xsl:template -->
+
+<xsl:param name="chunk.first.sections">1</xsl:param>
+
+<!-- xsl:template match="*" mode="object.title.markup.textonly">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="title.markup"/>
+ </xsl:variable>
+ <xsl:value-of select="$title"/>
+</xsl:template -->
+
+<!-- xsl:template name="header.navigation">
+</xsl:template>
+
+<xsl:template name="footer.navigation">
+</xsl:template -->
+
+<!-- }}} -->
+
+<!-- {{{ Stuff for FAQ -->
+
+<!-- <xsl:param name="generate.qandaset.toc">1</xsl:param> -->
+<!-- <xsl:param name="generate.qandaset.div">1</xsl:param> -->
+
+<!-- xsl:param name="local.l10n.xml" select="document('')"/ -->
+
+<!-- }}} -->
+
+<!-- {{{ Swing HTML control doesn't support “ and ” -->
+<!-- i18n:i18n xmlns:i18n="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<i18n:l10n language="en">
+
+<i18n:dingbat key="startquote" text="""/>
+<i18n:dingbat key="endquote" text="""/>
+<i18n:dingbat key="nestedstartquote" text="""/>
+<i18n:dingbat key="nestedendquote" text="""/>
+
+<i18n:context name="section-xref">
+ <i18n:template name="bridgehead" text="the section called "%t""/>
+ <i18n:template name="sect1" text="the section called "%t""/>
+ <i18n:template name="sect2" text="the section called "%t""/>
+ <i18n:template name="sect3" text="the section called "%t""/>
+ <i18n:template name="sect4" text="the section called "%t""/>
+ <i18n:template name="sect5" text="the section called "%t""/>
+ <i18n:template name="section" text="the section called "%t""/>
+ <i18n:template name="simplesect" text="the section called "%t""/>
+</i18n:context>
+
+</i18n:l10n>
+</i18n:i18n -->
+<!-- }}} -->
+
+<!-- {{{ TOC generation -->
+<xsl:template match="/">
+ <xsl:call-template name="toc"/>
+</xsl:template>
+
+<xsl:template name="toc">
+ <xsl:apply-templates/>
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="'toc.xml'"/>
+ <xsl:with-param name="method" select="'xml'"/>
+ <xsl:with-param name="indent" select="'yes'"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="toc.content"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="toc.content">
+ <TOC>
+ <xsl:apply-templates select="." mode="my.toc"/>
+ </TOC>
+</xsl:template>
+
+<xsl:template match="set" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="book" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="book" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon"
+ mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="part|reference|preface|chapter|appendix|article"
+ mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates
+ select="preface|chapter|appendix|refentry|section|sect1"
+ mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="section" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="section" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect1" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect2" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect2" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect3" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect3" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect4" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect4" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect5" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect5|colophon" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ </ENTRY>
+</xsl:template>
+
+<!-- }}} -->
+
+</xsl:stylesheet>
diff --git a/jEdit/doc/news43/news.xml b/jEdit/doc/news43/news.xml
deleted file mode 100644
index 709337f..0000000
--- a/jEdit/doc/news43/news.xml
+++ /dev/null
@@ -1,331 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<book>
- <!-- :maxLineLen=76:wrap=hard: -->
- <bookinfo>
- <author>
- <firstname>Alan</firstname>
- <surname>Ezust</surname>
- </author>
- <legalnotice>
- <title>Legal Notice</title>
- <para>Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation License,
- Version 1.1 or any later version published by the Free Software
- Foundation; with no <quote>Invariant Sections</quote>,
- <quote>Front-Cover Texts</quote> or <quote>Back-Cover Texts</quote>,
- each as defined in the license. A copy of the license is included in
- the file <filename>COPYING.DOC.txt</filename> included with the
- jEdit distribution.</para>
- </legalnotice>
- <title>What's New in jEdit 4.3</title>
- </bookinfo>
- <preface id="preface">
- <title>Preface</title>
- <para>
- No longer will jEdit be called "pre" or "final":
- instead, we are moving over to straight-decimal x.y.z version
- numbering scheme.
- </para>
- <para>jEdit is a very mature text editor, and has gone through a very
- interesting phase of development. Left in a "prerelease" stage for about
- four years, it's had a long time to solifidy. Many of the original
- developers, including Slava Pestov, have stopped working directly on
- jEdit. Fortunately, because of the wonderful nature of open source,
- there are more and more eyeballs on this code than ever! We have
- received contributions of plugins, bugfixes, refactoring, and
- enhancements from around the globe, and our host, sourceforge.net <ulink
- url="http://sourceforge.net/project/stats/detail.php?group_id=588&ugn=jedit&type=prdownload&mode=year&package_id=0">reports</ulink>
- that there are on average at least a half-million downloads per year,
- and this has been true for the entire millenium.</para>
- <para>In terms of actual releases, there was a bit of a lull
- while Slava's absense was sinking in among the other members of the
- community, but in 2006, thanks to their generous donations of time,
- effort, and coding skills, we started releasing regular prereleases
- again, fixing bugs in the core and each other's plugins, making jEdit
- more stable, coherent, and useful than ever.</para>
- <para>The thing that really excites me is seeing members of the
- community get more actively involved in improving jedit or its plugins.
- The core is huge, and there are over 164 plugins, so there is an endless
- source of things to do. I anticipate that the trackers will always have
- many open issues, but I see many of the old ones finally being closed,
- and that is very much satisfying. I can say with complete confidence
- that 4.4 is an improvement over 4.2 in every possible way. I hope that
- after you read this document, you will think so too, and perhaps want to
- join in on the development of future versions of jEdit or its
- plugins.</para>
- <para>I watch the tracker traffic (<literal>jedit-devel</literal>) and
- commit logs (in the <literal>jedit-commits</literal> mailing list) with
- fascination, learning new Java tricks, or new jEdit tricks. It's quite
- satisfying to be this intimate with code that I find I am using every
- day. I feel I am on a first-name basis with all of the active
- committers, and I've given and/or received help from every one of them.
- While it is true, there are parts of it that could be designed a little
- better, it is still the best open source editor I've seen. Thanks to the
- plugins themselves, because they are broken up into neat little
- packages, it is easier for us to isolate and fix bugs. As long as I am
- using it, I will be compelled to fix bugs that annoy me, be they in the
- core, or any of the plugins I happen to use.</para>
- </preface>
- <preface id="acknowledgements">
- <title>Acknowledgements</title>
- <para>This release would not have been possible if it were not for the
- frequent help and efforts of Dale Anson, Jeffrey Hoyt, Marcelo Vanzin,
- Matthieu Casanova, Kazutoshi Satoda, Shlomy Reinstein, Seph Soliman,
- Eric Berry, Robert Schwenn, and Björn "Vampire" Kautler.
- I would also like to give sincere thanks to all
- of the other core and plugin developers who
- have made <ulink url="../CHANGES.txt">significant contributions</ulink>
- to help keep this editor alive and on the cutting edge.</para>
- </preface>
- <chapter id="compatibility">
- <title>Java Compatibility</title>
- <para>jEdit 4.3 requires Sun
- Java 1.5.0 or later. Older versions of Java are not supported.</para>
- <para>If you want to use the new LCD Antialiasing feature of Java 1.6,
- it is supported. From <guimenuitem>Global Options - Text Area -
- Antialiased Smooth Text</guimenuitem>: select <emphasis
- role="bold">Subpixel</emphasis>, and un-check the <emphasis
- role="bold">Fractional Font Metrics</emphasis> checkbox.</para>
- </chapter>
- <chapter id="user-changes">
- <title>User-Visible Changes</title>
-
- <orderedlist>
- <listitem><para> Most likely, you'll notice first the new Tango icon set,
- used for the toolbar icons. If for some reason you are nostalgic
- for the old icon set, you can always switch back to it from the
- Appearance option pane. </para></listitem>
- <listitem><para> There is an enhanced Status Bar (and accompanying service API
- to allow plugins to add new status bar diaplay/controls). </para></listitem>
- <listitem><para>
- It is now possible to choose different, independent Buffer Sets
- for each EditPane buffer switcher. See <ulink
- url="../users-guide/buffersets.html">Buffer Sets</ulink> for more
- information. </para></listitem>
- <listitem><para> The Dockable Interface has been enhanced and made
- into a jEdit service, so it is possible for plugins to offer alternate
- dockable window managers. Some of them give jEdit a very
- Eclipse-like feel. In addition, it is now possible to save and load
- dockable layouts, which are analogous to Eclipse perspectives.
- </para></listitem>
- </orderedlist>
-
- <section id="readded">
- <title>Re-added Features</title>
- <para>Soft wrapping to the text area, one of my personal favorite
- features, is possible again, by setting the wrap width to zero.
- Thank you Slava! I really missed that feature. It's probably the
- main reason I started using, testing, and later developing jEdit
- 4.3.</para>
- </section>
- <section id="plugin-manager">
- <title>Plugin Manager</title>
- <para>The three panes of the PluginManager have all been reworked
- and made more keyboard friendly. They handle multiple selections,
- show more information, allow sorting on more columns, the checkbox
- states don't get lost when you switch panes, and the manage panel
- now automatically loads dependent plugins if they are already
- downloaded. Anyone who is used to 4.2's plugin manager will notice
- the difference immediately.</para>
- <para>From the Manage tab, it is now possible to save a set of
- installed plugins as a PluginSet. This is an XML file which can be
- located locally on your machine, or remotely on a network. Each time
- the Install tab is instantiated, the PluginSet is loaded and the set
- of plugins are checked for you to download and install.</para>
- <para>If you are a plugin developer, see <xref
- linkend="api-changes" />.</para>
- </section>
- <section id="editing">
- <title>Text Editing</title>
- <para><ulink
- url="http://java.sun.com/j2se/1.5.0/docs/guide/imf/index.html">Input
- Methods</ulink> are now supported in jEdit. This should make it much
- easier for people to use alternate keyboard input methods to use
- jEdit and enter Chinese/Korean/Japanese characters, as well as other
- alternative input devices. Thank you, Kazutoshi Satoda, for
- fixing that and many other encoding and internationalization problems that
- prevented non-English speaking users from using jEdit properly
- in their native language.</para>
- </section>
- <section id="syntax">
- <title>Syntax Highlighting</title>
- <para>Many syntax highlighting modes were updated or rewritten to
- use the java.util.regex instead of gnu.regexp. Some modes were
- added, bring the total now to 150 languages.</para>
- </section>
- <section id="regexp-changes">
- <title>Regular Expressions</title>
- <para>Most of the core code has been rewritten to use
- <literal>java.util.regex</literal> instead of
- <literal>gnu.regexp</literal>, so be sure to keep that in mind as
- you are composing your own regular expressions, whether they are in
- mode files, search expressions, or in your own plugins. XSearch
- plugin and others still use <literal>gnu.regexp</literal> plugin,
- which offers the legacy regex engine, in case the old behavior is
- still desired. </para>
- </section>
- <section id="search">
- <title>Search and Replace</title>
- <para>Added <guimenuitem>Skip Binary</guimenuitem> and
- <guimenuitem>Skip Hidden</guimenuitem> options for Directory
- Search.</para>
- </section>
- <section id="encodings">
- <title>Handling of Multiple Encodings</title>
- <para>A full list of encodings supported by your Java implementation
- is now shown in the file system browser's
- <guimenu>Commands</guimenu>><guimenuitem>Encoding</guimenuitem>
- menu and other places. Previously only a small list of common
- encodings was shown.</para>
- <para>You can choose which of this list you want to display in the
- Encodings general options pane. You can also choose the fallback
- order of encodings to try in the event of decode errors in the
- General option pane.</para>
- <para>The encoding used by XML files is (should be?) auto-detected
- if the file provides an XML declaration like the following:</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?></programlisting>
- </section>
- <section id="vfs.browser">
- <title>File System Browser</title>
- <para>The file system browser is much more keyboard friendly, and
- supports some common shortcuts set by default in KDE and Windows
- (del, f2, f5, A+Left and A+Right for history, A+up for parent dir).</para>
- </section>
- <section id="bundled-macros">
- <title>Bundled Macros</title>
- <para>There are a number of new bundled macros, and most of the
- existing ones have undergone enhancements and bug fixes. jEdit 4.2
- bundled 58 macros in 7 categories; jEdit 4.3 bundles 75 macros in 9
- categories.</para>
- <para>Of course you can create new macros of your own, either by
- recording actions or writing them from scratch.</para>
- </section>
- </chapter>
- <chapter id="api-changes">
- <title>API Changes</title>
- <para>There are quite a few API changes which are documented, in the
- source as well as the <ulink url="../CORE_GUIDELINES.txt">core
- guidelines</ulink> and the <ulink
- url="../CHANGES.txt">CHANGES.txt</ulink> documents. If ever you find
- that some of the API documentation is lacking or needs further
- explanation, please post a feature request or a question onto the -devel
- mailing list.</para>
- <section id="buffervsjeditbuffer">
- <title>Buffer vs jEditBuffer</title>
- <para>Now that the text area is independent of the rest of jEdit,
- various text area-related APIs that used to take
- org.gjt.sp.jedit.Buffer instances now take
- org.gjt.sp.jedit.buffer.JEditBuffers.</para>
- <para>BufferChangeListener and BufferChangeAdapter are now
- deprecated. Use BufferListener instead.</para>
- </section>
- <section id="api-plugins">
- <title>Plugin API changes</title>
- <para>jEdit 4.2 used to run plugins that were designed only for the
- 4.1 plugin API, but plugins that are missing the "activate" property
- will no longer load properly in 4.3.</para>
- <para>There are two new properties that all plugins can have:
- <literal>description</literal> and
- <literal>longdescription</literal>. The former is just a string
- property, while the latter is a reference to an html or text file.
- See EditPlugin API docs for details.</para>
- </section>
- <section id="dockable-interface">
- <title>Dockable Interface</title>
- <para>A new boolean attribute, <literal>MOVABLE</literal>, can now
- be specified for <literal>DOCKABLE</literal> tags in the
- <literal>dockables.xml</literal> file. This attribute specifies the
- behavior when the docking position of the dockable window is
- changed. If true, the existing instance of the dockable window is
- moved to the new docking position, thus maintaining its state after
- the move (this is the new behavior). If false, the BeanShell code is
- invoked to get the instance to put in the new docking position (this
- is the existing behavior). The BeanShell code typically returns a
- new instance of the dockable, cause the state to be lost as a result
- of the change in docking position. The default value of this
- attribute is false for backward compatibility.</para>
- <para>A new interface, <ulink
- url="../api/org/gjt/sp/jedit/gui/DockableWindow.html">DockableWindow</ulink>,
- is introduced for <literal>MOVABLE</literal> dockable windows to be
- notified before their docking position is changed. This enables
- dockable windows to react to this change, e.g. by changing their
- layout depending on whether they are docked at the top/bottom or the
- left/right. This interface is meaningless (for now) for non-MOVABLE
- dockable windows.</para>
- <para>A new Service, <ulink
- url="../api/org/gjt/sp/jedit/gui/DockableWindowManagerProvider.html">DockableWindowManagerProvier</ulink>
- is introduced to permit plugins to offer alternate dockable
- frameworks, replacing the legacy dockables that are starting to
- look rather old. </para>
- </section>
- </chapter>
- <chapter id="new-plugins">
- <title>The core plugins</title>
- <para>This chapter showcases the new(er) plugins that were under the
- most active development during jEdit 4.3. Some of them influenced the
- development of the jEdit core, and others are good enough to be
- incorporated into the core, but are left as separate plugins simply
- because it makes it easier for us to maintain and debug them.</para>
- <para>The latest version of <emphasis role="bold">Console</emphasis>
- has many improvements, and takes advantage of new features of jEdit. </para>
- <para>Navigator, providing a navigable history, is new and improved - it
- provides the user with Eclipse-like Navigation to previous locations,
- for each TextArea of each View. It uses new EditBus messages which
- are now available in the public API, PositionChanging and
- BufferChanging.</para>
- <bridgehead>ProjectViewer</bridgehead>
- <para>For managing groups of files and organizing them into trees,
- ProjectViewer is very useful. It's been under active development, and
- many bugs are fixed quickly after they are found. Its ability to filter
- its input set based on regular expressions or the contents of
- CVS/SVN/Perforce entries makes it especially handy for other plugins
- that use it, such as <emphasis role="bold">FastOpen</emphasis> and
- <emphasis role="bold">OpenIt</emphasis>, both of which are also recently
- updated for 4.3.</para>
- <para>ProjectViewer is also very important for language plugins that
- want to deal with file sets. It defines a project-wide property
- specification, that makes it possible to have different settings
- depending on what the active project is.</para>
- <bridgehead>SideKicks and Language Plugins</bridgehead>
- <para>SideKick has been debugged and the documentation has been
- improved. Further, there is a new combobox that lets you choose your
- parser, and a new SplitPane to show you the contents of the hovered
- element. The combobox is especially important since there are multiple
- parsers that can be used on a given file, especially when you are
- working with Python, PHP, HTML, XML, or JavaScript files.</para>
- <para>Many language-specific plugins have been redesigned to use the new
- and improved SideKick. In particular, CtagsSideKick (a replacement for
- CodeBrowser), JPyDebug, JythonInterpreter, RubyPlugin, PHPParser,
- JavaSideKick, XML, and PerlSideKick. Be sure to try them out.</para>
- <para>In case you're looking for JavaCore, JBrowse, CodeAid,
- DotComplete, or PropertySideKick, they have all been merged (in terms of
- functionality) into the new JavaSideKick plugin. Some other plugins that
- depend on these above plugins still need to be converted to use
- JavaSideKick instead of the old java plugins listed above. </para>
- <para>As for HtmlSideKick, JavaScriptSideKick, and XmlIndenter, they
- have all been merged into the new XML 2 plugin, which now includes two
- parsers for CSS, one for Ecmascript, and completion popups for elements
- and attributes in XML, CSS, and HTML.</para>
- <para>If you use many different languages, you should also try out the
- very clever ContextMenu plugin. </para>
- <para>The SVNPlugin is new, and the JDiff plugin is improved. Many
- other plugins have latest versions that require jEdit 4.3. </para>
-
- </chapter>
- <chapter id="futureplans">
- <title>Future Plans</title>
- <para>During this process of cleaning up jEdit, I started on many
- projects and did not finish them. They are still worthwhile projects,
- ones I would like to get back to. As always, if there are any volunteers
- who would like to help out with them, please join the
- <literal>jedit-devel</literal> mailing list, look at some unassigned
- bugs and feature requests, and see if you can do any of them. Feel free
- to ask for help if you are stuck. The other developers are always happy
- to initiate someone new into the code.</para>
- <para>Also take a look at the <ulink url="../TODO.txt">TODO</ulink> file
- for examples of some of the work that was started but not finished yet
- on the core. Some plugins also have their own TODO lists.</para>
- </chapter>
-</book>
\ No newline at end of file
diff --git a/jEdit/doc/news44/news.xml b/jEdit/doc/news44/news.xml
new file mode 100644
index 0000000..75995ef
--- /dev/null
+++ b/jEdit/doc/news44/news.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<article>
+
+ <title> What's new in jEdit 4.4 </title>
+ <articleinfo>
+ <author>
+ <othername>The jEdit all-volunteer development team</othername>
+ </author>
+
+ </articleinfo>
+
+ <para> Detailed changes can always be found in the <ulink url="../CHANGES.txt">Detailed Change Log</ulink>,
+ but here are some of the major features of this version. </para>
+ <itemizedlist>
+ <listitem><para> jEdit 4.4 now requires Java 1.6. </para></listitem>
+ <listitem><para> Buffersets have been re-engineered, and simplified. All editpanes
+ have the same bufferset scope, so changes to the scope affects all editpanes
+ immediately. </para></listitem>
+ <listitem><para> Introduction of a new ThreadUtilities class implementing a
+ threadpool using Java 1.6 Concurrent API. Use this instead of
+ VFSManager's WorkThreadPool, which is now deprecated.
+ Related: A new Task Monitor dockable which will eventually replace
+ the I/O progress monitor, for showing progress of tasks.
+ Still TODO: rewrite VFSManager + all plugins to use ThreadUtilities
+ instead of WorkThreadPool.
+ </para></listitem>
+ <listitem><para> New DataTransfer API to allow for rich text copy/paste.
+ </para></listitem>
+ </itemizedlist>
+
+<!-- :maxLineLen=80:wrap=hard: -->
+</article>
diff --git a/jEdit/doc/release-procedure.txt b/jEdit/doc/release-procedure.txt
index 9e05c6b..77406cc 100644
--- a/jEdit/doc/release-procedure.txt
+++ b/jEdit/doc/release-procedure.txt
@@ -17,39 +17,63 @@ Release procedure of jEdit
listed as requirements in step 1, unless it slows to achieve the
requirements.
-3. Make a release branch. (ex. "/branches/M.N.x")
+3. Make a release branch from the trunk. (ex. "/branches/M.N.x")
- Anytime after this, the step 1 of the next release can be started.
+ To keep stabilizing the release, only the following changes are
+ allowed on the branch.
+ - Bumping up of the version number.
+ - Changes under "doc" directory.
+ - Merging of reviewed changes from the trunk or a separate branch.
+ See step 5 below for merging.
-4. Make a RC (release-candidate) from the branch. (ex. M.N-rc1)
+ Anytime after making the branch, the step 1 of the next release can be
+ started.
- The release of RCs is announced on jedit-devel, jedit-users,
+4. Make a public preview build from the branch.
+
+ The preview build is announced on jedit-devel, jedit-users,
jedit-announce, with a clear notice saying it is for testing.
-5. Receive bugs for the RC, and fix them.
+ For this purpose, daily build can be used. Daily builds are provided
+ by Eric Berry (elberry), here.
+ http://www.tellurianring.com/projects/jedit-daily/
+
+5. Receive bugs for preview builds, and fix them.
+
+ Basically, the fixes first applied on the trunk. If it seems also good
+ for a release branch, it can be submitted into the Merge Requests
+ tracker.
+ http://sourceforge.net/tracker/?group_id=588&atid=1235750&status=1
+
+ If a fix can't be applied on trunk (for example, the target code
+ doesn't exist in the trunk), it can be applied to a separate branch
+ which is created from the target release branch.
+
+ When submitting a merge request, please make sure
+ - to put the complete set of revision numbers which should be
+ merged, and
+ - to set the target branch by "Group".
- The fixes first applied on the trunk, and proposed as candidates of
- merge into the release branch. A candidate can be a revision, a group
- of revisions, or another branch to refine the fix. The proposed fixes
- are listed in a publicly visible file, with some comments,
- justifications, and status of review.
- (It maybe, PROPOSED_FIXES.txt in the branch, or a page in Wiki.)
+ If a fix can't be merged cleanly by just running "svn merge ...", the
+ submitter can make another branch (called as a backport branch) from a
+ stable branch to show how it can be merged. In this case, put the
+ branch name in the merge request.
The merge is done by another committer (reviewer) other than the
original committer of the fix. The fix is accepted only if
- the fix also works for the reviewer, and
- the reviewer is sure that the fix doesn't include unwanted changes
. If a fix was rejected, it can be proposed again with some
- refinements made on the trunk.
+ refinements made on the trunk or the backport branch.
This means each fix is reviewed at least two persons. This reduces
possibility of unexpected breakages, and achieves the stability of the
release branch.
- While this process, some RCs may be made for each two weeks or so.
+ While this process, some more preview builds may be made periodically.
-6. If no major bugs are reported against the RC for the last period,
- release from the branch as a stable release. (ex. M.N.0)
+6. If no major bugs are reported against the preview build for the last
+ period, release from the branch as a stable release. (ex. M.N.0)
7. After a stable release, bug fix continue as same as the step 5.
If some fixes are merged from the trunk, make a patch release.
diff --git a/jEdit/doc/tips/tip0.html b/jEdit/doc/tips/tip0.html
index a20007b..3ae9077 100644
--- a/jEdit/doc/tips/tip0.html
+++ b/jEdit/doc/tips/tip0.html
@@ -1,6 +1,6 @@
-<html><body>Using abbreviations saves a lot of time, by letting you
-enter long strings using a shorthand notation. To define an
-abbreviation, enter the desired shorthand string and press <b>C+;</b>.
-You will then be prompted for the expansion. Now, to enter the expansion
-in the buffer, all you have to do is type the shorthand and press
-<b>C+;</b> again.</body></html>
+<html><body>Using abbreviations saves a lot of time, by letting you
+enter long strings using a shorthand notation. To define an
+abbreviation, enter the desired shorthand string and press <b>C+;</b>.
+You will then be prompted for the expansion. Now, to enter the expansion
+in the buffer, all you have to do is type the shorthand and press
+<b>C+;</b> again.</body></html>
diff --git a/jEdit/doc/tips/tip1.html b/jEdit/doc/tips/tip1.html
index fba6cea..7891a6b 100644
--- a/jEdit/doc/tips/tip1.html
+++ b/jEdit/doc/tips/tip1.html
@@ -1,2 +1,2 @@
-<html><body>You can press <b>C+e C+v</b> to display a dialog box listing
-the 20 most recently copied and pasted strings.</body></html>
+<html><body>You can press <b>C+e C+v</b> to display a dialog box listing
+the 20 most recently copied and pasted strings.</body></html>
diff --git a/jEdit/doc/tips/tip10.html b/jEdit/doc/tips/tip10.html
index 10901e7..a797d03 100644
--- a/jEdit/doc/tips/tip10.html
+++ b/jEdit/doc/tips/tip10.html
@@ -1,4 +1,4 @@
-<html><body>You can use the BeanShell interpreter as a calculator. For
-example, try entering "3 / Math.sqrt(6)" in the
-<b>Utilities</b>><b>BeanShell</b>><b>Evaluate BeanShell Expression</b> dialog
-box.</body></html>
+<html><body>You can use the BeanShell interpreter as a calculator. For
+example, try entering "3 / Math.sqrt(6)" in the
+<b>Utilities</b>><b>BeanShell</b>><b>Evaluate BeanShell Expression</b> dialog
+box.</body></html>
diff --git a/jEdit/doc/tips/tip11.html b/jEdit/doc/tips/tip11.html
index 33610cd..40da88d 100644
--- a/jEdit/doc/tips/tip11.html
+++ b/jEdit/doc/tips/tip11.html
@@ -1,2 +1,2 @@
-<html><body>When you open a recent file, the caret is automatically
-restored to its previous position within that file.</body></html>
+<html><body>When you open a recent file, the caret is automatically
+restored to its previous position within that file.</body></html>
diff --git a/jEdit/doc/tips/tip12.html b/jEdit/doc/tips/tip12.html
index 8e8f397..6518df3 100644
--- a/jEdit/doc/tips/tip12.html
+++ b/jEdit/doc/tips/tip12.html
@@ -1,2 +1,2 @@
-<html><body>Try invoking the <b>View</b>><b>Line Numbers</b>
-command.</body></html>
+<html><body>Try invoking the <b>View</b>><b>Line Numbers</b>
+command.</body></html>
diff --git a/jEdit/doc/tips/tip13.html b/jEdit/doc/tips/tip13.html
index 488eedf..51788ac 100644
--- a/jEdit/doc/tips/tip13.html
+++ b/jEdit/doc/tips/tip13.html
@@ -1,2 +1,2 @@
-<html><body>You can press <b>C+PAGE_UP</b> and <b>C+PAGE_DOWN</b> to
-quickly switch between buffers.</body></html>
+<html><body>You can press <b>C+PAGE_UP</b> and <b>C+PAGE_DOWN</b> to
+quickly switch between buffers.</body></html>
diff --git a/jEdit/doc/tips/tip14.html b/jEdit/doc/tips/tip14.html
index 90b4928..7c00610 100644
--- a/jEdit/doc/tips/tip14.html
+++ b/jEdit/doc/tips/tip14.html
@@ -1,2 +1,2 @@
-<html><body>You can press <b>C+`</b> to switch between the two most
-recently edited buffers.</body></html>
+<html><body>You can press <b>C+`</b> to switch between the two most
+recently edited buffers.</body></html>
diff --git a/jEdit/doc/tips/tip15.html b/jEdit/doc/tips/tip15.html
index e8e8a95..965e960 100644
--- a/jEdit/doc/tips/tip15.html
+++ b/jEdit/doc/tips/tip15.html
@@ -1,12 +1,12 @@
-<html><body>If your computer has a large amount of memory, you can run
-jEdit in <i>background mode</i> by passing it the
-<code>-background</code> command-line switch. In background mode, jEdit
-will stay running and in memory even after all views are closed. This
-avoids the startup delay associated with starting jEdit multiple
-times.<p>
-
-If you also specify the <code>-nogui</code> switch, an initial view will
-not be opened; so jEdit will load, but remain invisible until another
-client instance is started. Using this switch, you can have jEdit loaded when
-your computer starts, ready for use later on.
-</body></html>
+<html><body>If your computer has a large amount of memory, you can run
+jEdit in <i>background mode</i> by passing it the
+<code>-background</code> command-line switch. In background mode, jEdit
+will stay running and in memory even after all views are closed. This
+avoids the startup delay associated with starting jEdit multiple
+times.<p>
+
+If you also specify the <code>-nogui</code> switch, an initial view will
+not be opened; so jEdit will load, but remain invisible until another
+client instance is started. Using this switch, you can have jEdit loaded when
+your computer starts, ready for use later on.
+</body></html>
diff --git a/jEdit/doc/tips/tip16.html b/jEdit/doc/tips/tip16.html
index 5effbbf..e7bb141 100644
--- a/jEdit/doc/tips/tip16.html
+++ b/jEdit/doc/tips/tip16.html
@@ -1,9 +1,9 @@
-<html><body>You can press <b>C+t <i>X</i></b> to save the current
-position to a marker with shortcut <i>X</i>, and <b>C+y <i>X</i></b> to return
-to the marker with shortcut <i>X</i>, where <i>X</i> is any key on your
-keyboard.<p>
-
-Marker positions are saved to <tt>.<i>file
-name</i>.marks</tt>. If you don't these files to be created,
-disable marker persistence in the <b>General</b> pane of
-the <b>Utilities</b>><b>Global Options</b> dialog box.</body></html>
+<html><body>You can press <b>C+t <i>X</i></b> to save the current
+position to a marker with shortcut <i>X</i>, and <b>C+y <i>X</i></b> to return
+to the marker with shortcut <i>X</i>, where <i>X</i> is any key on your
+keyboard.<p>
+
+Marker positions are saved to <tt>.<i>file
+name</i>.marks</tt>. If you don't these files to be created,
+disable marker persistence in the <b>General</b> pane of
+the <b>Utilities</b>><b>Global Options</b> dialog box.</body></html>
diff --git a/jEdit/doc/tips/tip17.html b/jEdit/doc/tips/tip17.html
index 6fcae2d..7659334 100644
--- a/jEdit/doc/tips/tip17.html
+++ b/jEdit/doc/tips/tip17.html
@@ -1,13 +1,13 @@
-<html><body>
-The action bar can provide quick keyboard access to editor features which do not have explicit keyboard shortcuts. Examples:
-
-<ul>
-<li><b>C+ENTER</b> <code>l-o</code> (automatically completed to
-<code>global-options</code>)
-<li><b>C+ENTER</b> <code>w-v</code> (automatically completed to
-<code>new-view</code>)
-<li><b>C+ENTER</b> <code>buffer.tabSize=4</code>
-<li><b>C+ENTER</b> <code>vfs.browser.dock-position=left</code>
-<li><b>C+ENTER</b> <code>vfs.browser.shortcut=F3</code>
-<li><b>C+ENTER</b> <code>view.fontsize=14</code>
-</body></html>
+<html><body>
+The action bar can provide quick keyboard access to editor features which do not have explicit keyboard shortcuts. Examples:
+
+<ul>
+<li><b>C+ENTER</b> <code>l-o</code> (automatically completed to
+<code>global-options</code>)
+<li><b>C+ENTER</b> <code>w-v</code> (automatically completed to
+<code>new-view</code>)
+<li><b>C+ENTER</b> <code>buffer.tabSize=4</code>
+<li><b>C+ENTER</b> <code>vfs.browser.dock-position=left</code>
+<li><b>C+ENTER</b> <code>vfs.browser.shortcut=F3</code>
+<li><b>C+ENTER</b> <code>view.fontsize=14</code>
+</body></html>
diff --git a/jEdit/doc/tips/tip18.html b/jEdit/doc/tips/tip18.html
index 0a9a5ff..2ed3ad2 100644
--- a/jEdit/doc/tips/tip18.html
+++ b/jEdit/doc/tips/tip18.html
@@ -1,3 +1,3 @@
-<html><body>In the file system browser and file selection dialog boxes,
-you can select a file by typing the first few characters of its
-name.</body></html>
+<html><body>In the file system browser and file selection dialog boxes,
+you can select a file by typing the first few characters of its
+name.</body></html>
diff --git a/jEdit/doc/tips/tip19.html b/jEdit/doc/tips/tip19.html
index 014d94c..5c228b7 100644
--- a/jEdit/doc/tips/tip19.html
+++ b/jEdit/doc/tips/tip19.html
@@ -1,4 +1,4 @@
-<html><body>You can customize the buttons shown on the tool bar (or disable it
-altogether) in the
-<b>Tool Bar</b> pane of the <b>Utilities</b>><b>Global Options</b>
-dialog box.</body></html>
+<html><body>You can customize the buttons shown on the tool bar (or disable it
+altogether) in the
+<b>Tool Bar</b> pane of the <b>Utilities</b>><b>Global Options</b>
+dialog box.</body></html>
diff --git a/jEdit/doc/tips/tip2.html b/jEdit/doc/tips/tip2.html
index edf1e7b..282a99b 100644
--- a/jEdit/doc/tips/tip2.html
+++ b/jEdit/doc/tips/tip2.html
@@ -1,17 +1,17 @@
-<html><body>Pressing <b>C+b</b> searches the current
-buffer and the current mode's keyword list for words beginning with
-the one before the caret.<p>
-
-This serves as a very basic code completion feature, for example:
-
-<ul>
-<li>When editing any kind of program source, enter the first few characters of
-a previously-declared identifier name, invoke <b>C+b</b>, and save yourself
-from having to type it out again.
-<li>When editing Javadoc comments in Java source code,
-enter "@" then press <b>C+b</b> to get a list of Javadoc tags.
-<li>In a PHP file, enter a few characters and press <b>C+b</b> to see
-a list of functions whose names start with what you entered.
-</ul>
-
-</body></html>
+<html><body>Pressing <b>C+b</b> searches the current
+buffer and the current mode's keyword list for words beginning with
+the one before the caret.<p>
+
+This serves as a very basic code completion feature, for example:
+
+<ul>
+<li>When editing any kind of program source, enter the first few characters of
+a previously-declared identifier name, invoke <b>C+b</b>, and save yourself
+from having to type it out again.
+<li>When editing Javadoc comments in Java source code,
+enter "@" then press <b>C+b</b> to get a list of Javadoc tags.
+<li>In a PHP file, enter a few characters and press <b>C+b</b> to see
+a list of functions whose names start with what you entered.
+</ul>
+
+</body></html>
diff --git a/jEdit/doc/tips/tip20.html b/jEdit/doc/tips/tip20.html
index e52a44c..928d153 100644
--- a/jEdit/doc/tips/tip20.html
+++ b/jEdit/doc/tips/tip20.html
@@ -1,2 +1,2 @@
-<html><body>jEdit comes with detailed online help which can be viewed
-from the <b>Help</b> menu. jEdit's online help is fully searchable.</body></html>
+<html><body>jEdit comes with detailed online help which can be viewed
+from the <b>Help</b> menu. jEdit's online help is fully searchable.</body></html>
diff --git a/jEdit/doc/tips/tip21.html b/jEdit/doc/tips/tip21.html
index 153cbc5..a9c1b36 100644
--- a/jEdit/doc/tips/tip21.html
+++ b/jEdit/doc/tips/tip21.html
@@ -1,3 +1,3 @@
-<html><body>You can repeat the next editor command any number of times
-by pressing <b>C+ENTER</b>, followed by the desired repeat count.
-</body></html>
+<html><body>You can repeat the next editor command any number of times
+by pressing <b>C+ENTER</b>, followed by the desired repeat count.
+</body></html>
diff --git a/jEdit/doc/tips/tip22.html b/jEdit/doc/tips/tip22.html
index 8e9a7d4..7278fc8 100644
--- a/jEdit/doc/tips/tip22.html
+++ b/jEdit/doc/tips/tip22.html
@@ -1,4 +1,4 @@
-<html><body>jEdit's register feature is a powerful extension of the clipboard
-metaphor. <b>C+r C+c <i>X</i></b> copies the selected text to register
-<i>X</i>. <b>C+r C+v <i>X</i></b> inserts the contents of register
-<i>X</i> into the buffer. Register contents are persistent between editing sessions.</body></html>
+<html><body>jEdit's register feature is a powerful extension of the clipboard
+metaphor. <b>C+r C+c <i>X</i></b> copies the selected text to register
+<i>X</i>. <b>C+r C+v <i>X</i></b> inserts the contents of register
+<i>X</i> into the buffer. Register contents are persistent between editing sessions.</body></html>
diff --git a/jEdit/doc/tips/tip23.html b/jEdit/doc/tips/tip23.html
index fd7b033..b803f12 100644
--- a/jEdit/doc/tips/tip23.html
+++ b/jEdit/doc/tips/tip23.html
@@ -1,2 +1,2 @@
-<html><body>To go to the bracket matching the one before the caret,
-press <b>C+]</b> or click the bracket scope indicator in the gutter.</body></html>
+<html><body>To go to the bracket matching the one before the caret,
+press <b>C+]</b> or click the bracket scope indicator in the gutter.</body></html>
diff --git a/jEdit/doc/tips/tip24.html b/jEdit/doc/tips/tip24.html
index ef6c771..b1e18bc 100644
--- a/jEdit/doc/tips/tip24.html
+++ b/jEdit/doc/tips/tip24.html
@@ -1,4 +1,4 @@
-<html><body><b>C+d</b> deletes the current line. <b>CS+BACK_SPACE</b>
-deletes from the caret position to the beginning of the line.
-<b>CS+DELETE</b> deletes from the caret position to the end of the
-line.</body></html>
+<html><body><b>C+d</b> deletes the current line. <b>CS+BACK_SPACE</b>
+deletes from the caret position to the beginning of the line.
+<b>CS+DELETE</b> deletes from the caret position to the end of the
+line.</body></html>
diff --git a/jEdit/doc/tips/tip25.html b/jEdit/doc/tips/tip25.html
index c95cd73..52ef06d 100644
--- a/jEdit/doc/tips/tip25.html
+++ b/jEdit/doc/tips/tip25.html
@@ -1,3 +1,3 @@
-<html><body>To select a bracketed code block, <b>Control</b>-click the
-bracket scope indicator in the gutter. To narrow the display to a bracketed code block, <b>Alt</b>-click the bracket scope indicator in the gutter.
-</body></html>
+<html><body>To select a bracketed code block, <b>Control</b>-click the
+bracket scope indicator in the gutter. To narrow the display to a bracketed code block, <b>Alt</b>-click the bracket scope indicator in the gutter.
+</body></html>
diff --git a/jEdit/doc/tips/tip26.html b/jEdit/doc/tips/tip26.html
index e5ec18f..ce8b390 100644
--- a/jEdit/doc/tips/tip26.html
+++ b/jEdit/doc/tips/tip26.html
@@ -1,2 +1,2 @@
-<html><body>The jEdit user's guide includes a keyboard shortcut
-quick reference. Print it out; it's very handy.</body></html>
+<html><body>The jEdit user's guide includes a keyboard shortcut
+quick reference. Print it out; it's very handy.</body></html>
diff --git a/jEdit/doc/tips/tip27.html b/jEdit/doc/tips/tip27.html
index f3a516c..0cd4b81 100644
--- a/jEdit/doc/tips/tip27.html
+++ b/jEdit/doc/tips/tip27.html
@@ -1,4 +1,4 @@
-<html><body>You can select multiple files for opening in the
-<b>Open File</b> dialog or <b>File System Browser</b> window
-by <b>Control</b>-clicking on the files in
-question.</body></html>
+<html><body>You can select multiple files for opening in the
+<b>Open File</b> dialog or <b>File System Browser</b> window
+by <b>Control</b>-clicking on the files in
+question.</body></html>
diff --git a/jEdit/doc/tips/tip28.html b/jEdit/doc/tips/tip28.html
index b1b5c57..ded5461 100644
--- a/jEdit/doc/tips/tip28.html
+++ b/jEdit/doc/tips/tip28.html
@@ -1,4 +1,4 @@
-<html><body>jEdit automatically decompresses GZipped files
-when loading, and compresses them again when saving. You can specify if
-a file is to be GZipped in the <b>Utilities</b>><b>Buffer Options</b>
-dialog box.</body></html>
+<html><body>jEdit automatically decompresses GZipped files
+when loading, and compresses them again when saving. You can specify if
+a file is to be GZipped in the <b>Utilities</b>><b>Buffer Options</b>
+dialog box.</body></html>
diff --git a/jEdit/doc/tips/tip29.html b/jEdit/doc/tips/tip29.html
index beeeab5..7f091c0 100644
--- a/jEdit/doc/tips/tip29.html
+++ b/jEdit/doc/tips/tip29.html
@@ -1,13 +1,13 @@
-<html><body>jEdit supports "folding"; a "fold" is a section of a
-buffer that can be hidden and shown by clicking in the gutter or
-using the commands in the <b>Folding</b> menu.
-Folds can be nested.<p>
-
-Two folding modes are supported; "indent" and "explicit". In the
-former, folds are created based on the leading indent of a line;
-in the latter, the buffer is parsed for the strings
-<code>{{{</code> and <code>}}}</code>.<p>
-
-Folding can be enabled in the <b>Buffer Options</b> and
-<b>Global Options</b> dialog boxes.
-</body></html>
+<html><body>jEdit supports "folding"; a "fold" is a section of a
+buffer that can be hidden and shown by clicking in the gutter or
+using the commands in the <b>Folding</b> menu.
+Folds can be nested.<p>
+
+Two folding modes are supported; "indent" and "explicit". In the
+former, folds are created based on the leading indent of a line;
+in the latter, the buffer is parsed for the strings
+<code>{{{</code> and <code>}}}</code>.<p>
+
+Folding can be enabled in the <b>Buffer Options</b> and
+<b>Global Options</b> dialog boxes.
+</body></html>
diff --git a/jEdit/doc/tips/tip3.html b/jEdit/doc/tips/tip3.html
index 22b8710..c1db95c 100644
--- a/jEdit/doc/tips/tip3.html
+++ b/jEdit/doc/tips/tip3.html
@@ -1,2 +1,2 @@
-<html><body>jEdit can be customized to suit your tastes in the
-<b>Utilities</b>><b>Global Options</b> dialog box.</body></html>
+<html><body>jEdit can be customized to suit your tastes in the
+<b>Utilities</b>><b>Global Options</b> dialog box.</body></html>
diff --git a/jEdit/doc/tips/tip30.html b/jEdit/doc/tips/tip30.html
index dfe16b4..1c7d25d 100644
--- a/jEdit/doc/tips/tip30.html
+++ b/jEdit/doc/tips/tip30.html
@@ -1,13 +1,13 @@
-<html><body>The
-<b>Folding</b>><b>Narrow to Fold</b> command hides
-all lines except those in the fold containing the caret.
-When editing a file with folding, this can be used to "focus" in on a block
-of code and create a less cluttered display. To
-display the entire buffer again, invoke the
-<b>Folding</b>><b>Expand All Folds</b> command.<p>
-
-<b>Folding</b>><b>Narrow to Selection</b> works in a similar manner,
-except it hides all lines except those in the selection, rather than
-those in the current fold.
-
-</body></html>
+<html><body>The
+<b>Folding</b>><b>Narrow to Fold</b> command hides
+all lines except those in the fold containing the caret.
+When editing a file with folding, this can be used to "focus" in on a block
+of code and create a less cluttered display. To
+display the entire buffer again, invoke the
+<b>Folding</b>><b>Expand All Folds</b> command.<p>
+
+<b>Folding</b>><b>Narrow to Selection</b> works in a similar manner,
+except it hides all lines except those in the selection, rather than
+those in the current fold.
+
+</body></html>
diff --git a/jEdit/doc/tips/tip31.html b/jEdit/doc/tips/tip31.html
index fbb48a6..54afbcc 100644
--- a/jEdit/doc/tips/tip31.html
+++ b/jEdit/doc/tips/tip31.html
@@ -1,12 +1,12 @@
-<html><body>
-Any scripts located in the <code>startup</code> subdirectory of the
-jEdit home and user settings directories will be run on jEdit startup. Scripts can
-be written in BeanShell or any scripting language for which the appropriate
-plugin is installed (for example, Python scripting is provided by the
-<b>JythonInterpreter</b> plugin).<p>
-
-Methods
-and variables defined in BeanShell scripts are available to all other uses of
-BeanShell in jEdit. This is different from macros; methods and variables defined
-in macros are lost after the macro finishes executing.
-</body></html>
+<html><body>
+Any scripts located in the <code>startup</code> subdirectory of the
+jEdit home and user settings directories will be run on jEdit startup. Scripts can
+be written in BeanShell or any scripting language for which the appropriate
+plugin is installed (for example, Python scripting is provided by the
+<b>JythonInterpreter</b> plugin).<p>
+
+Methods
+and variables defined in BeanShell scripts are available to all other uses of
+BeanShell in jEdit. This is different from macros; methods and variables defined
+in macros are lost after the macro finishes executing.
+</body></html>
diff --git a/jEdit/doc/tips/tip32.html b/jEdit/doc/tips/tip32.html
index cc247f0..7c70880 100644
--- a/jEdit/doc/tips/tip32.html
+++ b/jEdit/doc/tips/tip32.html
@@ -1,6 +1,6 @@
-<html><body>
-You can define up to two distinct keyboard shortcuts for each command
-in the <b>Shortcuts</b> pane of the
-<b>Utilities</b>><b>Global Options</b>
-dialog box.
-</body></html>
+<html><body>
+You can define up to two distinct keyboard shortcuts for each command
+in the <b>Shortcuts</b> pane of the
+<b>Utilities</b>><b>Global Options</b>
+dialog box.
+</body></html>
diff --git a/jEdit/doc/tips/tip33.html b/jEdit/doc/tips/tip33.html
index 4b05779..41044de 100644
--- a/jEdit/doc/tips/tip33.html
+++ b/jEdit/doc/tips/tip33.html
@@ -1,4 +1,4 @@
-<html><body>
-Pressing <b>S+ENTER</b> in the search bar will search
-backwards for the currently entered text.
-</body></html>
+<html><body>
+Pressing <b>S+ENTER</b> in the search bar will search
+backwards for the currently entered text.
+</body></html>
diff --git a/jEdit/doc/tips/tip34.html b/jEdit/doc/tips/tip34.html
index f77da5d..d629842 100644
--- a/jEdit/doc/tips/tip34.html
+++ b/jEdit/doc/tips/tip34.html
@@ -1,22 +1,22 @@
-<html><body>
-
-You can replace all occurrences of a specific string or regular
-expression with the return value of a BeanShell script if the
-<b>Return value of a BeanShell
-snippet</b> radio button is selected in the search dialog box.<p>
-
-You can use
-this, for example, to convert all tags in an HTML file to lower case, by
-searching for the following regular expression:
-
-<p>
-<code><(.+?)></code>
-
-<p>
-
-And entering the following in the replace text field:
-
-<p>
-<code>"<" + _1.toLowerCase() + ">"</code>
-
-</body></html>
+<html><body>
+
+You can replace all occurrences of a specific string or regular
+expression with the return value of a BeanShell script if the
+<b>Return value of a BeanShell
+snippet</b> radio button is selected in the search dialog box.<p>
+
+You can use
+this, for example, to convert all tags in an HTML file to lower case, by
+searching for the following regular expression:
+
+<p>
+<code><(.+?)></code>
+
+<p>
+
+And entering the following in the replace text field:
+
+<p>
+<code>"<" + _1.toLowerCase() + ">"</code>
+
+</body></html>
diff --git a/jEdit/doc/tips/tip35.html b/jEdit/doc/tips/tip35.html
index 58fb944..5fa9a00 100644
--- a/jEdit/doc/tips/tip35.html
+++ b/jEdit/doc/tips/tip35.html
@@ -1,6 +1,6 @@
-<html><body>
-If you are used to Unix text editors where a middle-mouse button
-click inserts the most recently selected text, enable <b>quick copy</b> in
-the <b>Text Area</b> pane of the <b>Utilities</b>><b>Global
-Options</b> dialog box.
-</body></html>
+<html><body>
+If you are used to Unix text editors where a middle-mouse button
+click inserts the most recently selected text, enable <b>quick copy</b> in
+the <b>Mouse</b> pane of the <b>Utilities</b>><b>Global
+Options</b> dialog box.
+</body></html>
diff --git a/jEdit/doc/tips/tip36.html b/jEdit/doc/tips/tip36.html
index 0d11eb3..68fc2b5 100644
--- a/jEdit/doc/tips/tip36.html
+++ b/jEdit/doc/tips/tip36.html
@@ -1,6 +1,6 @@
-<html><body>
-The <b>Cut Append</b> (<b>C+e C+u</b>) and <b>Copy Append</b>
-(<b>C+e C+a</b>) commands
-add the selected text to the clipboard without clearing the
-existing clipboard contents.
-</body></html>
+<html><body>
+The <b>Cut Append</b> (<b>C+e C+u</b>) and <b>Copy Append</b>
+(<b>C+e C+a</b>) commands
+add the selected text to the clipboard without clearing the
+existing clipboard contents.
+</body></html>
diff --git a/jEdit/doc/tips/tip37.html b/jEdit/doc/tips/tip37.html
index 98877ad..4e873c3 100644
--- a/jEdit/doc/tips/tip37.html
+++ b/jEdit/doc/tips/tip37.html
@@ -1,3 +1,3 @@
-<html><body>You can toggle the search bar's <b>Ignore Case</b> check
-box by pressing <b>C+e C+i</b>, and the
-<b>Regular Expressions</b> check box by pressing <b>C+e C+x</b>.</body></html>
+<html><body>You can toggle the search bar's <b>Ignore Case</b> check
+box by pressing <b>C+e C+i</b>, and the
+<b>Regular Expressions</b> check box by pressing <b>C+e C+x</b>.</body></html>
diff --git a/jEdit/doc/tips/tip38.html b/jEdit/doc/tips/tip38.html
index 83f1dbb..e39515d 100644
--- a/jEdit/doc/tips/tip38.html
+++ b/jEdit/doc/tips/tip38.html
@@ -1,3 +1,3 @@
-<html><body>Saving an edit mode definition or catalog
-file will cause jEdit to automatically reload it. This is helpful when
-writing your own edit modes.</body></html>
+<html><body>Saving an edit mode definition or catalog
+file will cause jEdit to automatically reload it. This is helpful when
+writing your own edit modes.</body></html>
diff --git a/jEdit/doc/tips/tip39.html b/jEdit/doc/tips/tip39.html
index cae2f28..b32cc2a 100644
--- a/jEdit/doc/tips/tip39.html
+++ b/jEdit/doc/tips/tip39.html
@@ -1,4 +1,4 @@
-<html><body>Selecting <b>Search in Directory</b> from the menu shown when
-right-clicking a directory in the file system browser
-displays a search and replace dialog box set up for searching
-in that directory.</body></html>
+<html><body>Selecting <b>Search in Directory</b> from the menu shown when
+right-clicking a directory in the file system browser
+displays a search and replace dialog box set up for searching
+in that directory.</body></html>
diff --git a/jEdit/doc/tips/tip4.html b/jEdit/doc/tips/tip4.html
index 87ed0f4..4c4c777 100644
--- a/jEdit/doc/tips/tip4.html
+++ b/jEdit/doc/tips/tip4.html
@@ -1,5 +1,5 @@
-<html><body>You can repeat a series of keystrokes or menu item
-selections any number of times. Press <b>C+m C+m</b>, followed by the
-keystrokes and menu item selections. Press <b>C+m C+s</b> when finished.
-Now, to repeat those actions, press <b>C+m C+p</b> as many times as
-necessary.</body></html>
+<html><body>You can repeat a series of keystrokes or menu item
+selections any number of times. Press <b>C+m C+m</b>, followed by the
+keystrokes and menu item selections. Press <b>C+m C+s</b> when finished.
+Now, to repeat those actions, press <b>C+m C+p</b> as many times as
+necessary.</body></html>
diff --git a/jEdit/doc/tips/tip40.html b/jEdit/doc/tips/tip40.html
index 73e3ff2..39aa708 100644
--- a/jEdit/doc/tips/tip40.html
+++ b/jEdit/doc/tips/tip40.html
@@ -1,4 +1,4 @@
-<html><body>If the current line contains hard tab characters, the
-status bar will show both the "file" column location (where each tab
-counts as one column) and "screen" column location (where each tab
-can count as a number of columns).</body></html>
+<html><body>If the current line contains hard tab characters, the
+status bar will show both the "file" column location (where each tab
+counts as one column) and "screen" column location (where each tab
+can count as a number of columns).</body></html>
diff --git a/jEdit/doc/tips/tip41.html b/jEdit/doc/tips/tip41.html
index 46812d4..9d9ab88 100644
--- a/jEdit/doc/tips/tip41.html
+++ b/jEdit/doc/tips/tip41.html
@@ -1,3 +1,3 @@
-<html><body>If you would prefer not to see icons in the file system browser,
-they can be disabled in the <b>File System Browser</b>><b>General</b> pane of the
-<b>Utilities</b>><b>Global Options</b> dialog box.</body></html>
+<html><body>If you would prefer not to see icons in the file system browser,
+they can be disabled in the <b>File System Browser</b>><b>General</b> pane of the
+<b>Utilities</b>><b>Global Options</b> dialog box.</body></html>
diff --git a/jEdit/doc/tips/tip42.html b/jEdit/doc/tips/tip42.html
index b1ae106..fe69b5d 100644
--- a/jEdit/doc/tips/tip42.html
+++ b/jEdit/doc/tips/tip42.html
@@ -1 +1 @@
-<html><body>Pressing <b>C+\</b> turns multiple selection on and off.</body></html>
+<html><body>Pressing <b>C+\</b> turns multiple selection on and off.</body></html>
diff --git a/jEdit/doc/tips/tip43.html b/jEdit/doc/tips/tip43.html
index a059c39..3a49fde 100644
--- a/jEdit/doc/tips/tip43.html
+++ b/jEdit/doc/tips/tip43.html
@@ -1,2 +1,2 @@
-<html><body>Font smoothing can be enabled in the <b>Text Area</b> pane of the
-<b>Utilities</b>><b>Global Options</b> dialog box.</body></html>
+<html><body>Font smoothing can be enabled in the <b>Text Area</b> pane of the
+<b>Utilities</b>><b>Global Options</b> dialog box.</body></html>
diff --git a/jEdit/doc/tips/tip44.html b/jEdit/doc/tips/tip44.html
index 29003b6..fdc6c5c 100644
--- a/jEdit/doc/tips/tip44.html
+++ b/jEdit/doc/tips/tip44.html
@@ -1,3 +1,3 @@
-<html><body>New syntax highlighting modes are very easy to add. See the
-<b>Writing Modes</b> part of the jEdit user's guide
-(<b>Help</b>><b>jEdit Help</b>) to find out how.</body></html>
+<html><body>New syntax highlighting modes are very easy to add. See the
+<b>Writing Modes</b> part of the jEdit user's guide
+(<b>Help</b>><b>jEdit Help</b>) to find out how.</body></html>
diff --git a/jEdit/doc/tips/tip45.html b/jEdit/doc/tips/tip45.html
index 40d07b2..53b3aa3 100644
--- a/jEdit/doc/tips/tip45.html
+++ b/jEdit/doc/tips/tip45.html
@@ -1,10 +1,10 @@
-<html><body>jEdit macros can
-be written in BeanShell or any scripting language for which the appropriate
-plugin is installed (for example, Python scripting is provided by the
-<b>JythonInterpreter</b> plugin).
-
-<p>
-See the
-<b>Writing Macros</b> part of the jEdit user's guide
-(<b>Help</b>><b>jEdit Help</b>) to find out more about
-BeanShell.</body></html>
+<html><body>jEdit macros can
+be written in BeanShell or any scripting language for which the appropriate
+plugin is installed (for example, Python scripting is provided by the
+<b>JythonInterpreter</b> plugin).
+
+<p>
+See the
+<b>Writing Macros</b> part of the jEdit user's guide
+(<b>Help</b>><b>jEdit Help</b>) to find out more about
+BeanShell.</body></html>
diff --git a/jEdit/doc/tips/tip46.html b/jEdit/doc/tips/tip46.html
index 5f2a88a..db3cd15 100644
--- a/jEdit/doc/tips/tip46.html
+++ b/jEdit/doc/tips/tip46.html
@@ -1,4 +1,4 @@
-<html><body>If you know how to program in Java, you will find jEdit
-plugins very easy to write. See the
-<b>Writing Plugins</b> part of the jEdit user's guide
-(<b>Help</b>><b>jEdit Help</b>) to find out how.</body></html>
+<html><body>If you know how to program in Java, you will find jEdit
+plugins very easy to write. See the
+<b>Writing Plugins</b> part of the jEdit user's guide
+(<b>Help</b>><b>jEdit Help</b>) to find out how.</body></html>
diff --git a/jEdit/doc/tips/tip47.html b/jEdit/doc/tips/tip47.html
index 6d9bff3..4d39dde 100644
--- a/jEdit/doc/tips/tip47.html
+++ b/jEdit/doc/tips/tip47.html
@@ -1,4 +1,4 @@
-<html><body>If you want to run compilers and other external programs
-from within jEdit, you should install the <b>Console</b> plugin. Plugins can
-be downloaded and installed from within jEdit using the plugin manager
-(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
+<html><body>If you want to run compilers and other external programs
+from within jEdit, you should install the <b>Console</b> plugin. Plugins can
+be downloaded and installed from within jEdit using the plugin manager
+(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
diff --git a/jEdit/doc/tips/tip48.html b/jEdit/doc/tips/tip48.html
index 38c2ebb..33fc4e7 100644
--- a/jEdit/doc/tips/tip48.html
+++ b/jEdit/doc/tips/tip48.html
@@ -1,4 +1,4 @@
-<html><body>If you use jEdit to edit HTML or XML files, you should install the
-<b>JTidy</b> and <b>XML</b> plugins. Plugins can
-be downloaded and installed from within jEdit using the plugin manager
-(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
+<html><body>If you use jEdit to edit HTML or XML files, you should install the
+<b>JTidy</b> and <b>XML</b> plugins. Plugins can
+be downloaded and installed from within jEdit using the plugin manager
+(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
diff --git a/jEdit/doc/tips/tip49.html b/jEdit/doc/tips/tip49.html
index 18a91c9..9812980 100644
--- a/jEdit/doc/tips/tip49.html
+++ b/jEdit/doc/tips/tip49.html
@@ -1,5 +1,5 @@
-<html><body>If you use jEdit to edit Java source, you should install the
-<b>JBrowse</b>, <b>JExplorer</b>, <b>JImporter</b> and <b>JTools</b> plugins.
-Plugins can
-be downloaded and installed from within jEdit using the plugin manager
-(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
+<html><body>If you use jEdit to edit Java source, you should install the
+<b>JBrowse</b>, <b>JExplorer</b>, <b>JImporter</b> and <b>JTools</b> plugins.
+Plugins can
+be downloaded and installed from within jEdit using the plugin manager
+(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
diff --git a/jEdit/doc/tips/tip5.html b/jEdit/doc/tips/tip5.html
index dd412ad..a981b66 100644
--- a/jEdit/doc/tips/tip5.html
+++ b/jEdit/doc/tips/tip5.html
@@ -1,2 +1,2 @@
-<html><body>You can close this dialog box by pressing <b>ENTER</b> or <b>ESCAPE</b>.
-</body></html>
+<html><body>You can close this dialog box by pressing <b>ENTER</b> or <b>ESCAPE</b>.
+</body></html>
diff --git a/jEdit/doc/tips/tip50.html b/jEdit/doc/tips/tip50.html
index a43cb62..feec8c0 100644
--- a/jEdit/doc/tips/tip50.html
+++ b/jEdit/doc/tips/tip50.html
@@ -1,4 +1,4 @@
-<html><body>The very handy <b>JDiff</b> plugin shows two files side-by-side,
-highlighting the differences. Plugins can
-be downloaded and installed from within jEdit using the plugin manager
-(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
+<html><body>The very handy <b>JDiff</b> plugin shows two files side-by-side,
+highlighting the differences. Plugins can
+be downloaded and installed from within jEdit using the plugin manager
+(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
diff --git a/jEdit/doc/tips/tip51.html b/jEdit/doc/tips/tip51.html
index e8554a3..f0cca96 100644
--- a/jEdit/doc/tips/tip51.html
+++ b/jEdit/doc/tips/tip51.html
@@ -1 +1 @@
-<html><body>You can use the favorites feature for quick access to frequently used files and directories. Look in the <b>Utilities</b>><b>Favorites</b> menu in jEdit's menu bar, or the <b>Favorites</b> menu in the file system browser.</body></html>
+<html><body>You can use the favorites feature for quick access to frequently used files and directories. Look in the <b>Utilities</b>><b>Favorites</b> menu in jEdit's menu bar, or the <b>Favorites</b> menu in the file system browser.</body></html>
diff --git a/jEdit/doc/tips/tip52.html b/jEdit/doc/tips/tip52.html
index e0ae35d..f3d8308 100644
--- a/jEdit/doc/tips/tip52.html
+++ b/jEdit/doc/tips/tip52.html
@@ -1,5 +1,5 @@
-<html><body>
-To stay up-to-date in the world of jEdit,
-subscribe to the mailing lists by visiting
-<font color="blue"><u>http://www.jedit.org/?page=feedback</u></font>.
-</body></html>
+<html><body>
+To stay up-to-date in the world of jEdit,
+subscribe to the mailing lists by visiting
+<font color="blue"><u>http://www.jedit.org/?page=feedback</u></font>.
+</body></html>
diff --git a/jEdit/doc/tips/tip53.html b/jEdit/doc/tips/tip53.html
index 3b08e49..bb1c0a9 100644
--- a/jEdit/doc/tips/tip53.html
+++ b/jEdit/doc/tips/tip53.html
@@ -1,4 +1,4 @@
-<html><body>
-The file system browser and many plugin windows can be docked into
-the view. Just click on the menu button in the top left corner of a dockable window and select the docking location from the popup menu shown.
-</body></html>
+<html><body>
+The file system browser and many plugin windows can be docked into
+the view. Just click on the menu button in the top left corner of a dockable window and select the docking location from the popup menu shown.
+</body></html>
diff --git a/jEdit/doc/tips/tip54.html b/jEdit/doc/tips/tip54.html
index 9119c8c..492c96c 100644
--- a/jEdit/doc/tips/tip54.html
+++ b/jEdit/doc/tips/tip54.html
@@ -1,3 +1,3 @@
-<html><body>
-The <b>Help</b>><b>About jEdit</b> dialog box is really cool.
-</body></html>
+<html><body>
+The <b>Help</b>><b>About jEdit</b> dialog box is really cool.
+</body></html>
diff --git a/jEdit/doc/tips/tip55.html b/jEdit/doc/tips/tip55.html
index 9a802fd..1d4b011 100644
--- a/jEdit/doc/tips/tip55.html
+++ b/jEdit/doc/tips/tip55.html
@@ -1,17 +1,17 @@
-<html><body>
-The <b>Utilities</b>><b>BeanShell</b>><b>Evaluate For Selected Lines</b> command
-evaluates the specified BeanShell expression for each selected line,
-replacing the contents of that line with the return value of the
-expression.<p>
-
-For example, you can use this to add a line number to each selected
-line, by evaluating the following expression:<p>
-
-<code>(index+1) + " " + text</code><p>
-
-Or you can add a prefix and suffix to each selected line, with this
-expression:<p>
-
-<code>"<listitem>" + text + "</listitem>"</code>
-
-</body></html>
+<html><body>
+The <b>Utilities</b>><b>BeanShell</b>><b>Evaluate For Selected Lines</b> command
+evaluates the specified BeanShell expression for each selected line,
+replacing the contents of that line with the return value of the
+expression.<p>
+
+For example, you can use this to add a line number to each selected
+line, by evaluating the following expression:<p>
+
+<code>(index+1) + " " + text</code><p>
+
+Or you can add a prefix and suffix to each selected line, with this
+expression:<p>
+
+<code>"<listitem>" + text + "</listitem>"</code>
+
+</body></html>
diff --git a/jEdit/doc/tips/tip56.html b/jEdit/doc/tips/tip56.html
index c3cd8da..d542764 100644
--- a/jEdit/doc/tips/tip56.html
+++ b/jEdit/doc/tips/tip56.html
@@ -1,17 +1,17 @@
-<html><body>
-You can click on various parts of the status bar:
-<ul>
-<li>Double-clicking the caret position display opens the <b>Go to Line</b>
-dialog box.
-<li>Double-clicking the edit mode, folding mode, or encoding indicator opens the
-<b>Buffer Options</b>
-dialog box.
-<li>Clicking the various status flags changes them.
-<li>Double-clicking the memory indicator opens the <b>Memory Status</b> dialog
-box.
-</ul>
-
-To configure what components are shown in the status bar, go to the
-<b>Status Bar</b> pane of the <b>Utilities</b>><b>Global Options</b> dialog
-box.
-</body></html>
+<html><body>
+You can click on various parts of the status bar:
+<ul>
+<li>Double-clicking the caret position display opens the <b>Go to Line</b>
+dialog box.
+<li>Double-clicking the edit mode, folding mode, or encoding indicator opens the
+<b>Buffer Options</b>
+dialog box.
+<li>Clicking the various status flags changes them.
+<li>Double-clicking the memory indicator opens the <b>Memory Status</b> dialog
+box.
+</ul>
+
+To configure what components are shown in the status bar, go to the
+<b>Status Bar</b> pane of the <b>Utilities</b>><b>Global Options</b> dialog
+box.
+</body></html>
diff --git a/jEdit/doc/tips/tip57.html b/jEdit/doc/tips/tip57.html
index d31dddb..560e86c 100644
--- a/jEdit/doc/tips/tip57.html
+++ b/jEdit/doc/tips/tip57.html
@@ -1,5 +1,5 @@
-<html><body>
-When sorting a set of text strings (for example, a file listing) jEdit
-treats numbers specially, so for example "My file 10" will be placed after
-"My file 2".
-</body></html>
+<html><body>
+When sorting a set of text strings (for example, a file listing) jEdit
+treats numbers specially, so for example "My file 10" will be placed after
+"My file 2".
+</body></html>
diff --git a/jEdit/doc/tips/tip58.html b/jEdit/doc/tips/tip58.html
index 4ed1b06..2f9cf01 100644
--- a/jEdit/doc/tips/tip58.html
+++ b/jEdit/doc/tips/tip58.html
@@ -1,6 +1,6 @@
-<html><body>
-The file system browser can mark different types of files with different
-colors to make file listings easier to read. You can edit the file types and colors
-in the <b>File System Browser</b>><b>Colors</b> pane of the
-<b>Utilities</b>><b>Global Options</b> dialog box.
-</body></html>
+<html><body>
+The file system browser can mark different types of files with different
+colors to make file listings easier to read. You can edit the file types and colors
+in the <b>File System Browser</b>><b>Colors</b> pane of the
+<b>Utilities</b>><b>Global Options</b> dialog box.
+</body></html>
diff --git a/jEdit/doc/tips/tip59.html b/jEdit/doc/tips/tip59.html
index 6d5e690..86abd30 100644
--- a/jEdit/doc/tips/tip59.html
+++ b/jEdit/doc/tips/tip59.html
@@ -1,19 +1,19 @@
-<html><body>
-jEdit's text editing commands become very powerful when used together.
-For example, here is one way, when programming in Java,
-to find all uses of an instance variable that are outside the current
-method:
-
-<ul>
-<li>Position the caret inside a method and invoke
-<b>Edit</b>><b>Source</b>><b>Select Code Block</b>.
-<li>Invoke <b>Edit</b>><b>Invert Selection</b> (<b>C+e i</b>).
-<li>Invoke <b>Search</b>><b>Find</b> (<b>C+f</b>).
-<li>Type in the variable name and press <b>Enter</b>.
-<li>Because text is selected, the <b>HyperSearch</b> and
-<b>Search in Selection</b> settings will be chosen by default.
-<li>The <b>HyperSearch Results</b> window will list all uses of
-that variable outside the selected method.
-</ul>
-
-</body></html>
+<html><body>
+jEdit's text editing commands become very powerful when used together.
+For example, here is one way, when programming in Java,
+to find all uses of an instance variable that are outside the current
+method:
+
+<ul>
+<li>Position the caret inside a method and invoke
+<b>Edit</b>><b>Source</b>><b>Select Code Block</b>.
+<li>Invoke <b>Edit</b>><b>Invert Selection</b> (<b>C+e i</b>).
+<li>Invoke <b>Search</b>><b>Find</b> (<b>C+f</b>).
+<li>Type in the variable name and press <b>Enter</b>.
+<li>Because text is selected, the <b>HyperSearch</b> and
+<b>Search in Selection</b> settings will be chosen by default.
+<li>The <b>HyperSearch Results</b> window will list all uses of
+that variable outside the selected method.
+</ul>
+
+</body></html>
diff --git a/jEdit/doc/tips/tip6.html b/jEdit/doc/tips/tip6.html
index 39e84f8..d53f37d 100644
--- a/jEdit/doc/tips/tip6.html
+++ b/jEdit/doc/tips/tip6.html
@@ -1,2 +1,2 @@
-<html><body>Try right-clicking on the text area. The menu that appears
-can be customized by selecting <b>Customize</b> from the menu.</body></html>
+<html><body>Try right-clicking on the text area. The menu that appears
+can be customized by selecting <b>Customize</b> from the menu.</body></html>
diff --git a/jEdit/doc/tips/tip60.html b/jEdit/doc/tips/tip60.html
index f3a8488..0712c1c 100644
--- a/jEdit/doc/tips/tip60.html
+++ b/jEdit/doc/tips/tip60.html
@@ -1,8 +1,8 @@
-<html><body>
-The <b>Search</b>><b>Find</b> command behaves differently when text is
-selected. If the selection spans multiple lines, the
-<b>Search in Selection</b> setting is selected by default. If the selection
-does not contain line breaks,
-the <b>Search in Current Buffer</b> setting is chosen, and the selection
-is copied into the search string field.
-</body></html>
+<html><body>
+The <b>Search</b>><b>Find</b> command behaves differently when text is
+selected. If the selection spans multiple lines, the
+<b>Search in Selection</b> setting is selected by default. If the selection
+does not contain line breaks,
+the <b>Search in Current Buffer</b> setting is chosen, and the selection
+is copied into the search string field.
+</body></html>
diff --git a/jEdit/doc/tips/tip61.html b/jEdit/doc/tips/tip61.html
index 4952d4f..4609389 100644
--- a/jEdit/doc/tips/tip61.html
+++ b/jEdit/doc/tips/tip61.html
@@ -1,6 +1,6 @@
-<html><body>
-If you are using the "Metal" look and feel (which is the default)
-you can change the user interface control font in the
-<b>Appearance</b> pane of the <b>Utilities</b>><b>Global Options</b>
-dialog box.
-</body></html>
+<html><body>
+If you are using the "Metal" look and feel (which is the default)
+you can change the user interface control font in the
+<b>Appearance</b> pane of the <b>Utilities</b>><b>Global Options</b>
+dialog box.
+</body></html>
diff --git a/jEdit/doc/tips/tip62.html b/jEdit/doc/tips/tip62.html
index 5e593b0..a51130b 100644
--- a/jEdit/doc/tips/tip62.html
+++ b/jEdit/doc/tips/tip62.html
@@ -1,5 +1,5 @@
-<html><body>
-Pressing <b>TAB</b> or <b>A+RIGHT</b>
-while a selection is active shifts each selected line
-to the right by one level of indent.
-</body></html>
+<html><body>
+Pressing <b>TAB</b> or <b>A+RIGHT</b>
+while a selection is active shifts each selected line
+to the right by one level of indent.
+</body></html>
diff --git a/jEdit/doc/tips/tip63.html b/jEdit/doc/tips/tip63.html
index 363f4a4..428ecb3 100644
--- a/jEdit/doc/tips/tip63.html
+++ b/jEdit/doc/tips/tip63.html
@@ -1,5 +1,5 @@
-<html><body>
-Pressing <b>S+TAB</b> or <b>A+LEFT</b>
-while a selection is active shifts each selected line
-to the left by one level of indent.
-</body></html>
+<html><body>
+Pressing <b>S+TAB</b> or <b>A+LEFT</b>
+while a selection is active shifts each selected line
+to the left by one level of indent.
+</body></html>
diff --git a/jEdit/doc/tips/tip64.html b/jEdit/doc/tips/tip64.html
index a911b49..25d8b1f 100644
--- a/jEdit/doc/tips/tip64.html
+++ b/jEdit/doc/tips/tip64.html
@@ -1,2 +1,2 @@
-<html><body>Check out <font color="blue"><u>http://www.jedit.org</u></font> and
-<font color="blue"><u>http://community.jedit.org</u></font>.</body></html>
+<html><body>Check out <font color="blue"><u>http://www.jedit.org</u></font> and
+<font color="blue"><u>http://community.jedit.org</u></font>.</body></html>
diff --git a/jEdit/doc/tips/tip65.html b/jEdit/doc/tips/tip65.html
index 86ede3f..2ab6f1f 100644
--- a/jEdit/doc/tips/tip65.html
+++ b/jEdit/doc/tips/tip65.html
@@ -1,8 +1,8 @@
-<html><body>The <b>ignore case</b> search and replace flag behaves
-in an intelligent manner when replacing occurrences of the search string.
-If the occurrence is all lower case, all upper case or title case,
-the replace string will be converted into the relevant case when
-inserted into the buffer.<p>
-
-This automatic conversion is only performed if the replacement
-string is all-lower case.</body></html>
+<html><body>The <b>ignore case</b> search and replace flag behaves
+in an intelligent manner when replacing occurrences of the search string.
+If the occurrence is all lower case, all upper case or title case,
+the replace string will be converted into the relevant case when
+inserted into the buffer.<p>
+
+This automatic conversion is only performed if the replacement
+string is all-lower case.</body></html>
diff --git a/jEdit/doc/tips/tip66.html b/jEdit/doc/tips/tip66.html
index a994c6b..be84870 100644
--- a/jEdit/doc/tips/tip66.html
+++ b/jEdit/doc/tips/tip66.html
@@ -1,2 +1,2 @@
-<html><body>Just like most Unix shells, jEdit interprets a tilde ("~") at the
-start of a path name as being the location of your home directory.</body></html>
+<html><body>Just like most Unix shells, jEdit interprets a tilde ("~") at the
+start of a path name as being the location of your home directory.</body></html>
diff --git a/jEdit/doc/tips/tip67.html b/jEdit/doc/tips/tip67.html
index 4b37b41..62234bc 100644
--- a/jEdit/doc/tips/tip67.html
+++ b/jEdit/doc/tips/tip67.html
@@ -1,5 +1,5 @@
-<html><body>By default, jEdit strips the final end of line character when
-loading a buffer, and re-adds it when saving.
-You can specify that the final end of line be always visible in the
-<b>General</b> pane of the
-<b>Utilities</b>><b>Buffer Options</b> dialog box.</body></html>
+<html><body>By default, jEdit strips the final end of line character when
+loading a buffer, and re-adds it when saving.
+You can specify that the final end of line be always visible in the
+<b>General</b> pane of the
+<b>Utilities</b>><b>Buffer Options</b> dialog box.</body></html>
diff --git a/jEdit/doc/tips/tip68.html b/jEdit/doc/tips/tip68.html
index 0eea300..1fdd735 100644
--- a/jEdit/doc/tips/tip68.html
+++ b/jEdit/doc/tips/tip68.html
@@ -1,3 +1,3 @@
-<html><body>To select a fold, <b>Control</b>-click the
-fold indicator in the gutter. To narrow the display to a fold, <b>Alt</b>-click the fold indicator in the gutter.
-</body></html>
+<html><body>To select a fold, <b>Control</b>-click the
+fold indicator in the gutter. To narrow the display to a fold, <b>Alt</b>-click the fold indicator in the gutter.
+</body></html>
diff --git a/jEdit/doc/tips/tip69.html b/jEdit/doc/tips/tip69.html
index ac1a44c..95a9a35 100644
--- a/jEdit/doc/tips/tip69.html
+++ b/jEdit/doc/tips/tip69.html
@@ -1,22 +1,22 @@
-<html><body>
-Using the search bar can be a real time saver in a lot of cases, especially
-when you need to jump around between different parts of a buffer.<p>
-
-By default, the search bar is only shown when
-one of the quick search commands are invoked; however you can specify that it
-always be shown in the <b>View</b> pane of the <b>Utilities</b>><b>Global
-Options</b> dialog box.<p>
-
-The following keyboard commands deal with the search bar; you will find it
-much easier to navigate around files if you memorize these:
-
-<ul>
-<li>Pressing <b>C+,</b> shows the search bar (if necessary) and sends keyboard
-focus there.</li>
-<li>Pressing <b>C+.</b> also shows the search bar, but pre-selects the
-<b>HyperSearch</b> check box.</li>
-<li>Pressing <b>A+,</b> puts the word at the caret location into the search bar.</li>
-<li>Pressing <b>A+.</b> performs a HyperSearch for the word at the caret location.</li>
-</ul>
-
-</body></html>
+<html><body>
+Using the search bar can be a real time saver in a lot of cases, especially
+when you need to jump around between different parts of a buffer.<p>
+
+By default, the search bar is only shown when
+one of the quick search commands are invoked; however you can specify that it
+always be shown in the <b>View</b> pane of the <b>Utilities</b>><b>Global
+Options</b> dialog box.<p>
+
+The following keyboard commands deal with the search bar; you will find it
+much easier to navigate around files if you memorize these:
+
+<ul>
+<li>Pressing <b>C+,</b> shows the search bar (if necessary) and sends keyboard
+focus there.</li>
+<li>Pressing <b>C+.</b> also shows the search bar, but pre-selects the
+<b>HyperSearch</b> check box.</li>
+<li>Pressing <b>A+,</b> puts the word at the caret location into the search bar.</li>
+<li>Pressing <b>A+.</b> performs a HyperSearch for the word at the caret location.</li>
+</ul>
+
+</body></html>
diff --git a/jEdit/doc/tips/tip7.html b/jEdit/doc/tips/tip7.html
index 34db984..3999372 100644
--- a/jEdit/doc/tips/tip7.html
+++ b/jEdit/doc/tips/tip7.html
@@ -1,2 +1,2 @@
-<html><body>You can browse directories and rename or delete files in the
-<b>Utilities</b>><b>File System Browser</b> window.</body></html>
+<html><body>You can browse directories and rename or delete files in the
+<b>Utilities</b>><b>File System Browser</b> window.</body></html>
diff --git a/jEdit/doc/tips/tip70.html b/jEdit/doc/tips/tip70.html
index 1dd580b..88acbb0 100644
--- a/jEdit/doc/tips/tip70.html
+++ b/jEdit/doc/tips/tip70.html
@@ -1,4 +1,4 @@
-<html><body>When you are editing a file with folds, you can use
-<b>A+UP</b> and <b>A+DOWN</b> to go to the previous and next fold,
-and <b>C+e u</b> to go to the fold containing the one at the caret
-position.</body></html>
+<html><body>When you are editing a file with folds, you can use
+<b>A+UP</b> and <b>A+DOWN</b> to go to the previous and next fold,
+and <b>C+e u</b> to go to the fold containing the one at the caret
+position.</body></html>
diff --git a/jEdit/doc/tips/tip71.html b/jEdit/doc/tips/tip71.html
index 115fb45..bc6ef51 100644
--- a/jEdit/doc/tips/tip71.html
+++ b/jEdit/doc/tips/tip71.html
@@ -1,3 +1,3 @@
-<html><body>The <b>Range Comment</b> and <b>Line Comment</b> commands
-are context-sensitive; so when editing an HTML file, for example, they
-behave differently in HTML text and inline JavaScript.</body></html>
+<html><body>The <b>Range Comment</b> and <b>Line Comment</b> commands
+are context-sensitive; so when editing an HTML file, for example, they
+behave differently in HTML text and inline JavaScript.</body></html>
diff --git a/jEdit/doc/tips/tip72.html b/jEdit/doc/tips/tip72.html
index fcb7a5e..eb91d27 100644
--- a/jEdit/doc/tips/tip72.html
+++ b/jEdit/doc/tips/tip72.html
@@ -1,8 +1,8 @@
-<html><body>jEdit supports word wrap, although it is disabled by
-default. You can enable it in the <b>Buffer Options</b> and
-<b>Global Options</b> dialog boxes.<p>
-
-Two wrapping modes are supported; "soft" and "hard". In the
-former, text is wrapped on the fly while being displayed; in the latter,
-newlines are automatically inserted into text while it is being typed.
-</body></html>
+<html><body>jEdit supports word wrap, although it is disabled by
+default. You can enable it in the <b>Buffer Options</b> and
+<b>Global Options</b> dialog boxes.<p>
+
+Two wrapping modes are supported; "soft" and "hard". In the
+former, text is wrapped on the fly while being displayed; in the latter,
+newlines are automatically inserted into text while it is being typed.
+</body></html>
diff --git a/jEdit/doc/tips/tip73.html b/jEdit/doc/tips/tip73.html
index 8d44279..80735ea 100644
--- a/jEdit/doc/tips/tip73.html
+++ b/jEdit/doc/tips/tip73.html
@@ -1,6 +1,6 @@
-<html><body>
-If you have a three-button mouse, you can middle-click files in the
-file system browser to open them, instead of double-clicking.
-Holding down <b>Shift</b> while double- or middle-clicking opens files
-in a new view.
-</body></html>
+<html><body>
+If you have a three-button mouse, you can middle-click files in the
+file system browser to open them, instead of double-clicking.
+Holding down <b>Shift</b> while double- or middle-clicking opens files
+in a new view.
+</body></html>
diff --git a/jEdit/doc/tips/tip74.html b/jEdit/doc/tips/tip74.html
index 14b2ae2..249760e 100644
--- a/jEdit/doc/tips/tip74.html
+++ b/jEdit/doc/tips/tip74.html
@@ -1,7 +1,7 @@
-<html><body>
-If you prefer Emacs-like auto indent behavior, where pressing
-<b>Tab</b> anywhere in a line sets its indent accordingly, try
-binding the <b>Indent Selected Lines</b> command to the <b>TAB</b> key in the
-<b>Shortcuts</b> pane of the
-<b>Utilities</b>><b>Global Options</b> dialog box.
-</body></html>
+<html><body>
+If you prefer Emacs-like auto indent behavior, where pressing
+<b>Tab</b> anywhere in a line sets its indent accordingly, try
+binding the <b>Indent Selected Lines</b> command to the <b>TAB</b> key in the
+<b>Shortcuts</b> pane of the
+<b>Utilities</b>><b>Global Options</b> dialog box.
+</body></html>
diff --git a/jEdit/doc/tips/tip75.html b/jEdit/doc/tips/tip75.html
index d2c953e..c7e5e69 100644
--- a/jEdit/doc/tips/tip75.html
+++ b/jEdit/doc/tips/tip75.html
@@ -1,19 +1,19 @@
-<html><body>
-If <b>quick copy</b> is enabled in
-the <b>Mouse</b> pane of the <b>Utilities</b>><b>Global
-Options</b> dialog box, dragging with the middle mouse button over some text
-inserts that text at the previous caret position.<p>
-
-This feature has some additional behavior you might not expect:
-
-<ul>
-<li>It can be used to transfer text between edit panes in a split view.
-<li>Holding down <b>Shift</b> while clicking the middle mouse button immediately duplicates all text between the caret position and the clicked location.
-<li>If there already is a selection when you start middle-dragging, the selection
-will be replaced with the region you marked with the mouse.</li>
-<li>Holding down <b>Control</b> while dragging the middle mouse button marks a
-rectangular area, and pastes it vertically at the caret location (or into the
-current selection).</li>
-</ul>
-
-</body></html>
+<html><body>
+If <b>quick copy</b> is enabled in
+the <b>Mouse</b> pane of the <b>Utilities</b>><b>Global
+Options</b> dialog box, dragging with the middle mouse button over some text
+inserts that text at the previous caret position.<p>
+
+This feature has some additional behavior you might not expect:
+
+<ul>
+<li>It can be used to transfer text between edit panes in a split view.
+<li>Holding down <b>Shift</b> while clicking the middle mouse button immediately duplicates all text between the caret position and the clicked location.
+<li>If there already is a selection when you start middle-dragging, the selection
+will be replaced with the region you marked with the mouse.</li>
+<li>Holding down <b>Control</b> while dragging the middle mouse button marks a
+rectangular area, and pastes it vertically at the caret location (or into the
+current selection).</li>
+</ul>
+
+</body></html>
diff --git a/jEdit/doc/tips/tip76.html b/jEdit/doc/tips/tip76.html
index c04f288..a6e460e 100644
--- a/jEdit/doc/tips/tip76.html
+++ b/jEdit/doc/tips/tip76.html
@@ -1,5 +1,5 @@
-<html><body>
-If you want to search for or replace with newline characters, enable
-regular expression search and insert <code>\n</code>
-somewhere in the search or replacement string.
-</body></html>
+<html><body>
+If you want to search for or replace with newline characters, enable
+regular expression search and insert <code>\n</code>
+somewhere in the search or replacement string.
+</body></html>
diff --git a/jEdit/doc/tips/tip77.html b/jEdit/doc/tips/tip77.html
index 714ce57..c9087b0 100644
--- a/jEdit/doc/tips/tip77.html
+++ b/jEdit/doc/tips/tip77.html
@@ -1,3 +1,3 @@
-<html><body>You can open a file in a new view or new split by
-right-clicking on it in the <b>Open File</b> dialog box and selecting
-the appropriate command from the menu.</body></html>
+<html><body>You can open a file in a new view or new split by
+right-clicking on it in the <b>Open File</b> dialog box and selecting
+the appropriate command from the menu.</body></html>
diff --git a/jEdit/doc/tips/tip78.html b/jEdit/doc/tips/tip78.html
index 740044f..49f7a96 100644
--- a/jEdit/doc/tips/tip78.html
+++ b/jEdit/doc/tips/tip78.html
@@ -1,2 +1,2 @@
-<html><body><b>View</b>><b>New Plain View</b> opens a new view without
-any docked windows or tool bars.</body></html>
+<html><body><b>View</b>><b>New Plain View</b> opens a new view without
+any docked windows or tool bars.</body></html>
diff --git a/jEdit/doc/tips/tip79.html b/jEdit/doc/tips/tip79.html
index 61a1d0a..82a5df4 100644
--- a/jEdit/doc/tips/tip79.html
+++ b/jEdit/doc/tips/tip79.html
@@ -1,6 +1,6 @@
-<html><body>
-If you use dockable windows, you might have noticed that the tool bar placement
-policy has changed in jEdit 4.1. If you would prefer to revert to the old
-jEdit 4.0 behavior, you can do so in the <b>View</b> pane of the
-<b>Utilities</b>><b>Global Options</b> dialog box.
-</body></html>
+<html><body>
+If you use dockable windows, you might have noticed that the tool bar placement
+policy has changed in jEdit 4.1. If you would prefer to revert to the old
+jEdit 4.0 behavior, you can do so in the <b>View</b> pane of the
+<b>Utilities</b>><b>Global Options</b> dialog box.
+</body></html>
diff --git a/jEdit/doc/tips/tip8.html b/jEdit/doc/tips/tip8.html
index 4940320..fc0f57f 100644
--- a/jEdit/doc/tips/tip8.html
+++ b/jEdit/doc/tips/tip8.html
@@ -1,15 +1,15 @@
-<html><body>
-
-You can change numbers from decimal to hexadecimal (or any other base for that matter) using the search and replace feature.<p>
-
-First select the number(s) to convert, and make sure <b>Search in selection</b> is selected in the search dialog box. Then
-search for the following regular expression:<p>
-
-<code>.*</code><p>
-
-And replace it with the following BeanShell snippet:<p>
-
-<code>Integer.toString(Integer.parseInt(_0),16)</code>
-
-</body>
-</html>
+<html><body>
+
+You can change numbers from decimal to hexadecimal (or any other base for that matter) using the search and replace feature.<p>
+
+First select the number(s) to convert, and make sure <b>Search in selection</b> is selected in the search dialog box. Then
+search for the following regular expression:<p>
+
+<code>.*</code><p>
+
+And replace it with the following BeanShell snippet:<p>
+
+<code>Integer.toString(Integer.parseInt(_0),16)</code>
+
+</body>
+</html>
diff --git a/jEdit/doc/tips/tip80.html b/jEdit/doc/tips/tip80.html
index 0017fa4..63c4a63 100644
--- a/jEdit/doc/tips/tip80.html
+++ b/jEdit/doc/tips/tip80.html
@@ -1,8 +1,8 @@
-<html><body>
-You can open files stored in various character encodings by changing the
-encoding in the file system browser's <b>Commands</b> menu before opening
-the file.<p>
-
-The encoding to use when saving a buffer can be changed in the
-<b>Utilities</b>><b>Buffer Options</b> dialog box.
-</body></html>
+<html><body>
+You can open files stored in various character encodings by changing the
+encoding in the file system browser's <b>Commands</b> menu before opening
+the file.<p>
+
+The encoding to use when saving a buffer can be changed in the
+<b>Utilities</b>><b>Buffer Options</b> dialog box.
+</body></html>
diff --git a/jEdit/doc/tips/tip81.html b/jEdit/doc/tips/tip81.html
index fc7770f..5167b3a 100644
--- a/jEdit/doc/tips/tip81.html
+++ b/jEdit/doc/tips/tip81.html
@@ -1,6 +1,6 @@
-<html><body>
-Before getting back to work, cook yourself up a delicious meal from the
-official jEdit cookbook:<p>
-
-<font color="blue">http://www.rutherfurd.net/cookbook/</font>
-</body></html>
+<html><body>
+Before getting back to work, cook yourself up a delicious meal from the
+official jEdit cookbook:<p>
+
+<font color="blue">http://www.rutherfurd.net/cookbook/</font>
+</body></html>
diff --git a/jEdit/doc/tips/tip82.html b/jEdit/doc/tips/tip82.html
index fe5bbbd..510fcf8 100644
--- a/jEdit/doc/tips/tip82.html
+++ b/jEdit/doc/tips/tip82.html
@@ -1,7 +1,7 @@
-<html><body>
-To open a new, floating, instance of a docked window, right-click on the dockable's button and select <b>New Floating Instance</b> from the resulting menu.<p>
-
-To open a new, floating, instance of a floating window, click the menu button in the top left corner of the window and select <b>New Floating Instance</b> from the resulting menu.<p>
-
-You can use this to open multiple file system browsers at once, for example.
-</body></html>
+<html><body>
+To open a new, floating, instance of a docked window, right-click on the dockable's button and select <b>New Floating Instance</b> from the resulting menu.<p>
+
+To open a new, floating, instance of a floating window, click the menu button in the top left corner of the window and select <b>New Floating Instance</b> from the resulting menu.<p>
+
+You can use this to open multiple file system browsers at once, for example.
+</body></html>
diff --git a/jEdit/doc/tips/tip83.html b/jEdit/doc/tips/tip83.html
index 2365898..4ce24cc 100644
--- a/jEdit/doc/tips/tip83.html
+++ b/jEdit/doc/tips/tip83.html
@@ -1,5 +1,5 @@
-<html><body>
-The directory search feature of the search dialog box supports searching inside
-virtual file systems such as ZIP or TAR archives (if the <b>Archive</b> plugin
-is installed) or FTP servers (if the <b>FTP</b> plugin is installed).
-</body></html>
+<html><body>
+The directory search feature of the search dialog box supports searching inside
+virtual file systems such as ZIP or TAR archives (if the <b>Archive</b> plugin
+is installed) or FTP servers (if the <b>FTP</b> plugin is installed).
+</body></html>
diff --git a/jEdit/doc/tips/tip84.html b/jEdit/doc/tips/tip84.html
index 3e9ab37..b3c6065 100644
--- a/jEdit/doc/tips/tip84.html
+++ b/jEdit/doc/tips/tip84.html
@@ -1,5 +1,5 @@
-<html><body>If you use a version control system, try the
-<b>Gruntspud</b> plugin (CVS), <b>SourceControl</b> (Perforce, Visual SourceSafe) or <b>ClearCase</b>.
-Plugins can
-be downloaded and installed from within jEdit using the plugin manager
-(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
+<html><body>If you use a version control system, try the
+<b>Gruntspud</b> plugin (CVS), <b>SourceControl</b> (Perforce, Visual SourceSafe) or <b>ClearCase</b>.
+Plugins can
+be downloaded and installed from within jEdit using the plugin manager
+(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
diff --git a/jEdit/doc/tips/tip85.html b/jEdit/doc/tips/tip85.html
index eb607f3..c1fff9b 100644
--- a/jEdit/doc/tips/tip85.html
+++ b/jEdit/doc/tips/tip85.html
@@ -1,9 +1,9 @@
-<html><body>The <b>SpellCheck</b> plugin lets you check spelling within
-jEdit if the <code>aspell</code> utility is installed. <code>aspell</code> can
-be found at <font color="blue"><u>http://aspell.sourceforge.net</u></font>.<p>
-
-<b>Jazzy</b> is alternative spelling checker plugin that does not rely on an external utility.<p>
-
-Plugins can
-be downloaded and installed from within jEdit using the plugin manager
-(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
+<html><body>The <b>SpellCheck</b> plugin lets you check spelling within
+jEdit if the <code>aspell</code> utility is installed. <code>aspell</code> can
+be found at <font color="blue"><u>http://aspell.sourceforge.net</u></font>.<p>
+
+<b>Jazzy</b> is alternative spelling checker plugin that does not rely on an external utility.<p>
+
+Plugins can
+be downloaded and installed from within jEdit using the plugin manager
+(<b>Plugins</b>><b>Plugin Manager</b>).</body></html>
diff --git a/jEdit/doc/tips/tip86.html b/jEdit/doc/tips/tip86.html
index 66e0bec..c1039de 100644
--- a/jEdit/doc/tips/tip86.html
+++ b/jEdit/doc/tips/tip86.html
@@ -1,5 +1,5 @@
-<html><body>To quickly switch the line separator and word wrap mode from
-the keyboard, assign shortcuts to the <b>Toggle Line Separator</b> and
-<b>Toggle Word Wrap</b> commands in the
-<b>Shortcuts</b> pane of the <b>Utilities</b>><b>Global Options</b>
-dialog box.</body></html>
+<html><body>To quickly switch the line separator and word wrap mode from
+the keyboard, assign shortcuts to the <b>Toggle Line Separator</b> and
+<b>Toggle Word Wrap</b> commands in the
+<b>Shortcuts</b> pane of the <b>Utilities</b>><b>Global Options</b>
+dialog box.</body></html>
diff --git a/jEdit/doc/tips/tip87.html b/jEdit/doc/tips/tip87.html
index 10043dd..1ce0907 100644
--- a/jEdit/doc/tips/tip87.html
+++ b/jEdit/doc/tips/tip87.html
@@ -1,12 +1,12 @@
-<html><body>If you have a mouse with a scroll wheel, you can use the
-wheel to scroll up and down in the text area. Various modifier keys
-change the action of the wheel:
-
-<ul>
-<li><b>Shift</b> - scrolls an entire page at a time.
-<li><b>Control</b> - scrolls a single line at a time.
-<li><b>Alt</b> - moves the caret up and down instead of scrolling.
-<li><b>Alt-Shift</b> - extends the selection up and down instead of scrolling.
-</ul>
-
-</body></html>
+<html><body>If you have a mouse with a scroll wheel, you can use the
+wheel to scroll up and down in the text area. Various modifier keys
+change the action of the wheel:
+
+<ul>
+<li><b>Shift</b> - scrolls an entire page at a time.
+<li><b>Control</b> - scrolls a single line at a time.
+<li><b>Alt</b> - moves the caret up and down instead of scrolling.
+<li><b>Alt-Shift</b> - extends the selection up and down instead of scrolling.
+</ul>
+
+</body></html>
diff --git a/jEdit/doc/tips/tip88.html b/jEdit/doc/tips/tip88.html
index e42d246..d52cf90 100644
--- a/jEdit/doc/tips/tip88.html
+++ b/jEdit/doc/tips/tip88.html
@@ -1,2 +1,2 @@
-<html><body>Pressing <b>C+e C+j</b> moves keyboard focus to the text area.
-</body></html>
+<html><body>Pressing <b>C+e C+j</b> moves keyboard focus to the text area.
+</body></html>
diff --git a/jEdit/doc/tips/tip89.html b/jEdit/doc/tips/tip89.html
index e4f2d8f..8574aa0 100644
--- a/jEdit/doc/tips/tip89.html
+++ b/jEdit/doc/tips/tip89.html
@@ -1,26 +1,26 @@
-<html><body>
-
-In jEdit 4.1, the "indent on enter" and "indent on tab"
-settings were removed. Now, the behavior of the <b>ENTER</b> and <b>TAB</b> keys
-can be configured in the <b>Shortcuts</b> pane of the <b>Global Options</b> dialog
-box, just as with any other key. The <b>ENTER</b> key can be bound to one of
-the following commands, for example:
-
-<ul>
-<li><b>Insert Newline</b>
-<li><b>Insert Newline and Indent</b> (default)
-</ul>
-
-The <b>TAB</b> key can be bound to one of these commands:
-
-<ul>
-<li><b>Insert Tab</b>
-<li><b>Insert Tab or Indent</b> (default)
-<li><b>Indent Selected Lines</b>
-</ul>
-
-Custom behavior can also be implemented by binding these keys to
-macros, etc.
-
-</body>
-</html>
+<html><body>
+
+In jEdit 4.1, the "indent on enter" and "indent on tab"
+settings were removed. Now, the behavior of the <b>ENTER</b> and <b>TAB</b> keys
+can be configured in the <b>Shortcuts</b> pane of the <b>Global Options</b> dialog
+box, just as with any other key. The <b>ENTER</b> key can be bound to one of
+the following commands, for example:
+
+<ul>
+<li><b>Insert Newline</b>
+<li><b>Insert Newline and Indent</b> (default)
+</ul>
+
+The <b>TAB</b> key can be bound to one of these commands:
+
+<ul>
+<li><b>Insert Tab</b>
+<li><b>Insert Tab or Indent</b> (default)
+<li><b>Indent Selected Lines</b>
+</ul>
+
+Custom behavior can also be implemented by binding these keys to
+macros, etc.
+
+</body>
+</html>
diff --git a/jEdit/doc/tips/tip9.html b/jEdit/doc/tips/tip9.html
index fdd91d7..a203e5c 100644
--- a/jEdit/doc/tips/tip9.html
+++ b/jEdit/doc/tips/tip9.html
@@ -1,5 +1,5 @@
-<html><body>You can view multiple buffers at a time, in one single view.
-<b>C+2</b> splits the view horizontally. <b>C+3</b> splits
-the view vertically. <b>C+1</b> removes all splits from the
-view. <b>C+0</b> removes the currently focused split from the view. jEdit remembers if the view was split between editing sessions.
-</body></html>
+<html><body>You can view multiple buffers at a time, in one single view.
+<b>C+2</b> splits the view horizontally. <b>C+3</b> splits
+the view vertically. <b>C+1</b> removes all splits from the
+view. <b>C+0</b> removes the currently focused split from the view. jEdit remembers if the view was split between editing sessions.
+</body></html>
diff --git a/jEdit/doc/tips/tip90.html b/jEdit/doc/tips/tip90.html
index 6885387..c519330 100644
--- a/jEdit/doc/tips/tip90.html
+++ b/jEdit/doc/tips/tip90.html
@@ -1,27 +1,27 @@
-<html><body>
-
-In jEdit 4.1, the "smart home/end" setting was removed. Now, the
-behavior of the <b>HOME</b> and <b>END</b> keys can be configured in the <b>Shortcuts</b>
-pane of the <b>Global Options</b> dialog box, just as with any other key. The
-HOME key can be bound to one of the following commands, for example:
-
-<ul>
-<li><b>Go to Start of Line</b>
-<li><b>Go to Start of White Space</b>
-<li><b>Go to Start of Buffer</b>
-<li><b>Smart Home</b> (default three-keystroke behavior)
-</ul>
-
-The <b>END</b> key can be bound to one of these commands:
-
-<ul>
-<li><b>Go to End of Line</b>
-<li><b>Go to End of White Space</b>
-<li><b>Go to End of Buffer</b>
-<li><b>Smart End</b> (default three-keystroke behavior)
-</ul>
-
-There are corresponding "Select to..." commands that can be bound to
-<b>S+HOME</b> and <b>S+END</b> too.
-
-</body></html>
+<html><body>
+
+In jEdit 4.1, the "smart home/end" setting was removed. Now, the
+behavior of the <b>HOME</b> and <b>END</b> keys can be configured in the <b>Shortcuts</b>
+pane of the <b>Global Options</b> dialog box, just as with any other key. The
+HOME key can be bound to one of the following commands, for example:
+
+<ul>
+<li><b>Go to Start of Line</b>
+<li><b>Go to Start of White Space</b>
+<li><b>Go to Start of Buffer</b>
+<li><b>Smart Home</b> (default three-keystroke behavior)
+</ul>
+
+The <b>END</b> key can be bound to one of these commands:
+
+<ul>
+<li><b>Go to End of Line</b>
+<li><b>Go to End of White Space</b>
+<li><b>Go to End of Buffer</b>
+<li><b>Smart End</b> (default three-keystroke behavior)
+</ul>
+
+There are corresponding "Select to..." commands that can be bound to
+<b>S+HOME</b> and <b>S+END</b> too.
+
+</body></html>
diff --git a/jEdit/doc/tips/tip91.html b/jEdit/doc/tips/tip91.html
index a707213..8e953d0 100644
--- a/jEdit/doc/tips/tip91.html
+++ b/jEdit/doc/tips/tip91.html
@@ -1,10 +1,10 @@
-<html><body>
-By rebinding commands in the <b>Shortcuts</b> pane of the <b>Global Options</b>
-dialog box, the <b>C+LEFT</b>/<b>C+RIGHT</b> commands can be reconfigured to skip
-whitespace, like they do in some other text editors.<p>
-
-The standard commands are named <b>Go to Previous/Next Word</b>; the
-alternative versions are named <b>Go to Previous/Next Word (Eat
-Whitespace)</b>. Corresponding <b>Select to...</b> commands exist for
-<b>CS+LEFT</b>/<b>RIGHT</b>.
-</body></html>
+<html><body>
+By rebinding commands in the <b>Shortcuts</b> pane of the <b>Global Options</b>
+dialog box, the <b>C+LEFT</b>/<b>C+RIGHT</b> commands can be reconfigured to skip
+whitespace, like they do in some other text editors.<p>
+
+The standard commands are named <b>Go to Previous/Next Word</b>; the
+alternative versions are named <b>Go to Previous/Next Word (Eat
+Whitespace)</b>. Corresponding <b>Select to...</b> commands exist for
+<b>CS+LEFT</b>/<b>RIGHT</b>.
+</body></html>
diff --git a/jEdit/doc/tips/tip92.html b/jEdit/doc/tips/tip92.html
index 916b72c..627ba62 100644
--- a/jEdit/doc/tips/tip92.html
+++ b/jEdit/doc/tips/tip92.html
@@ -1,3 +1,3 @@
-<html><body>
-You can press <b>A+`</b> to display the buffer switcher.
-</body></html>
+<html><body>
+You can press <b>A+`</b> to display the buffer switcher.
+</body></html>
diff --git a/jEdit/doc/tips/tip93.html b/jEdit/doc/tips/tip93.html
index 645b20f..7b7130f 100644
--- a/jEdit/doc/tips/tip93.html
+++ b/jEdit/doc/tips/tip93.html
@@ -1,20 +1,20 @@
-<html><body>
-
-You can replace all occurrences of a specific string or regular
-expression with the return value of a BeanShell script if the
-<b>Return value of a BeanShell
-snippet</b> radio button is selected in the search dialog box.<p>
-
-You can use
-this, for example, to replace each occurrence of <quote>Windows</quote> with
-<quote>Linux</quote>, and each occurrence of <quote>Linux</quote> with
-<quote>Windows</quote>, by searching for the following regular expression:<p>
-
-<code>(Windows|Linux)</code><p>
-
-And replacing it with the following BeanShell snippet:<p>
-
-<code>_1.equals("Windows") ? "Linux" : "Windows"</code>
-
-</body>
-</html>
+<html><body>
+
+You can replace all occurrences of a specific string or regular
+expression with the return value of a BeanShell script if the
+<b>Return value of a BeanShell
+snippet</b> radio button is selected in the search dialog box.<p>
+
+You can use
+this, for example, to replace each occurrence of <quote>Windows</quote> with
+<quote>Linux</quote>, and each occurrence of <quote>Linux</quote> with
+<quote>Windows</quote>, by searching for the following regular expression:<p>
+
+<code>(Windows|Linux)</code><p>
+
+And replacing it with the following BeanShell snippet:<p>
+
+<code>_1.equals("Windows") ? "Linux" : "Windows"</code>
+
+</body>
+</html>
diff --git a/jEdit/doc/tips/tip94.html b/jEdit/doc/tips/tip94.html
index 3b410c1..a4c9f34 100644
--- a/jEdit/doc/tips/tip94.html
+++ b/jEdit/doc/tips/tip94.html
@@ -1,19 +1,19 @@
-<html><body>
-
-File name globs that associate files with edit modes can be changed in
-the <b>Editing</b> pane of the <b>Utilities</b>><b>Global Options</b>
-dialog box.<p>
-
-For example, by default files matching "*.inc" are opened in PHP mode,
-but some Pascal implementations use this extension as well. If you find
-yourself with an urgent need to hack some Pascal, just remove "irc" from
-the PHP file name glob to get:
-
-<pre>*.{php3,php4,php,phtml}</pre>
-
-And add it to the Pascal file name glob:
-
-<pre>*.{pas,dpr,dpk}</pre>
-
-</body>
-</html>
+<html><body>
+
+File name globs that associate files with edit modes can be changed in
+the <b>Editing</b> pane of the <b>Utilities</b>><b>Global Options</b>
+dialog box.<p>
+
+For example, by default files matching "*.inc" are opened in PHP mode,
+but some Pascal implementations use this extension as well. If you find
+yourself with an urgent need to hack some Pascal, just remove "irc" from
+the PHP file name glob to get:
+
+<pre>*.{php3,php4,php,phtml}</pre>
+
+And add it to the Pascal file name glob:
+
+<pre>*.{pas,dpr,dpk}</pre>
+
+</body>
+</html>
diff --git a/jEdit/doc/tips/tip95.html b/jEdit/doc/tips/tip95.html
index 6a0a548..229276d 100644
--- a/jEdit/doc/tips/tip95.html
+++ b/jEdit/doc/tips/tip95.html
@@ -1 +1 @@
-<html><body>Suppose you delete a few lines of code, make some further changes, then realize you want the lines of code back. While you just could copy your changes to the clipboard, undo a bunch of times, and paste, there is an easier way. Simply press <b>C+e C+y</b> which will open a dialog box listing the 20 most recently deleted runs of text.</body></html>
+<html><body>Suppose you delete a few lines of code, make some further changes, then realize you want the lines of code back. While you just could copy your changes to the clipboard, undo a bunch of times, and paste, there is an easier way. Simply press <b>C+e C+y</b> which will open a dialog box listing the 20 most recently deleted runs of text.</body></html>
diff --git a/jEdit/doc/tips/tip96.html b/jEdit/doc/tips/tip96.html
index 9411ee7..5b70e8b 100644
--- a/jEdit/doc/tips/tip96.html
+++ b/jEdit/doc/tips/tip96.html
@@ -1 +1 @@
-<html><body>On startup, jEdit restores open buffers, open views and any splits within the views from the previous editing session.</body></html>
+<html><body>On startup, jEdit restores open buffers, open views and any splits within the views from the previous editing session.</body></html>
diff --git a/jEdit/doc/tips/tip97.html b/jEdit/doc/tips/tip97.html
index 24bd297..4f8e84b 100644
--- a/jEdit/doc/tips/tip97.html
+++ b/jEdit/doc/tips/tip97.html
@@ -1,10 +1,10 @@
-<html><body>
-You can insert a string at a specific column on a range of lines using rectangular selections. For example, suppose you want to insert <code>static</code> in front of each of these lines:
-
-<pre>int begin;
-int end;
-long balance;</pre>
-
-Simply <b>Control</b>-drag to form a rectangular selection of zero width at the desired column, and either <b>Paste</b>, or start typing. The text will be inserted in each line at once.
-
-</body></html>
+<html><body>
+You can insert a string at a specific column on a range of lines using rectangular selections. For example, suppose you want to insert <code>static</code> in front of each of these lines:
+
+<pre>int begin;
+int end;
+long balance;</pre>
+
+Simply <b>Control</b>-drag to form a rectangular selection of zero width at the desired column, and either <b>Paste</b>, or start typing. The text will be inserted in each line at once.
+
+</body></html>
diff --git a/jEdit/doc/tips/tip98.html b/jEdit/doc/tips/tip98.html
index ffc0b1c..22ce617 100644
--- a/jEdit/doc/tips/tip98.html
+++ b/jEdit/doc/tips/tip98.html
@@ -1,4 +1,4 @@
-<html><body>
-<b>Control</b>-clicking beyond the end of a line inserts the appropriate
-amount of whitespace necessary to position the caret at the clicked location.
-</body></html>
+<html><body>
+<b>Control</b>-clicking beyond the end of a line inserts the appropriate
+amount of whitespace necessary to position the caret at the clicked location.
+</body></html>
diff --git a/jEdit/doc/users-guide/activity-log.xml b/jEdit/doc/users-guide/activity-log.xml
index c49aed8..5edbce0 100644
--- a/jEdit/doc/users-guide/activity-log.xml
+++ b/jEdit/doc/users-guide/activity-log.xml
@@ -1,53 +1,61 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<appendix id="activity-log">
- <!-- jEdit buffer-local properties: -->
- <!-- :indentSize=4:noTabs=true: -->
- <!-- :xml.root=users-guide.xml: -->
- <title>The Activity Log</title>
-
- <para>The <firstterm>activity log</firstterm> is very useful for
- troubleshooting problems, and helps when developing plugins.</para>
-
- <para><guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>Activity
- Log</guimenuitem> displays the last 500 lines of the activity log. By
- default, the activity log is shown in a floating window. This window can be
- docked using the commands in its top-left corner popup menu; see <xref
- linkend="docking" />.</para>
-
- <para>The complete log can be found in the <filename>activity.log</filename>
- file inside the jEdit settings directory, the path of which is shown inside
- the activity log window.</para>
-
- <para>jEdit writes the following information to the activity log:</para>
-
- <itemizedlist>
- <listitem>
- <para>Information about your Java implementation (version, operating
- system, architecture, etc).</para>
- </listitem>
-
- <listitem>
- <para>All error messages and runtime exceptions (most errors are
- shown in dialog boxes as well, but the activity log usually contains
- more detailed and technical information).</para>
- </listitem>
-
- <listitem>
- <para>All sorts of debugging information that can be helpful when
- tracking down bugs.</para>
- </listitem>
-
- <listitem>
- <para>Information about loaded plugins.</para>
- </listitem>
-
- </itemizedlist>
-
- <para>While jEdit is running, the log file on disk may not always accurately
- reflect what has been logged, due to buffering being done for performance
- reasons. To ensure the file on disk is up to date, invoke the
- <guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>Update
- Activity Log on Disk</guimenuitem> command. The log file is also
- automatically updated on disk when jEdit exits.</para>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<appendix id="activity-log">
+ <!-- jEdit buffer-local properties: -->
+ <!-- :indentSize=4:noTabs=true: -->
+ <!-- :xml.root=users-guide.xml: -->
+ <title>The Activity Log</title>
+
+ <para>The <firstterm>activity log</firstterm> is very useful for
+ troubleshooting problems, and helps when developing plugins.</para>
+
+ <para><guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>Activity
+ Log</guimenuitem> displays the last 500 lines of the activity log. By
+ default, the activity log is shown in a floating window. This window can be
+ docked using the commands in its top-left corner popup menu; see <xref
+ linkend="docking" />.</para>
+
+ <para>The complete log can be found in the <filename>activity.log</filename>
+ file inside the jEdit settings directory, the path of which is shown inside
+ the activity log window.</para>
+
+ <para>jEdit writes the following information to the activity log:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Information about your Java implementation (version, operating
+ system, architecture, etc).</para>
+ </listitem>
+
+ <listitem>
+ <para>All error messages and runtime exceptions (most errors are
+ shown in dialog boxes as well, but the activity log usually contains
+ more detailed and technical information).</para>
+ </listitem>
+
+ <listitem>
+ <para>All sorts of debugging information that can be helpful when
+ tracking down bugs.</para>
+ </listitem>
+
+ <listitem>
+ <para>Information about loaded plugins.</para>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>While jEdit is running, the log file on disk may not always accurately
+ reflect what has been logged, due to buffering being done for performance
+ reasons. To ensure the file on disk is up to date, invoke the
+ <guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>Update
+ Activity Log on Disk</guimenuitem> command. The log file is also
+ automatically updated on disk when jEdit exits.</para>
+
+ <para>
+ The "Settings" button in the Activity Log window shows a dialog that lets
+ you adjust the output colors, filter the messages by type, and lets you set
+ the maximum number of lines to display. Note that larger numbers will
+ decrease the overall performance of jEdit since these lines are kept in
+ memory.
+ </para>
</appendix>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/basics.xml b/jEdit/doc/users-guide/basics.xml
index b776630..d7e30a1 100644
--- a/jEdit/doc/users-guide/basics.xml
+++ b/jEdit/doc/users-guide/basics.xml
@@ -1,528 +1,526 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="basics">
- <title>jEdit Basics</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :indentSize=1:noTabs=true: -->
- <!-- :xml.root=users-guide.xml: -->
-
- <section id="overview">
- <title>Interface Overview</title>
-
- <para>A <firstterm>View</firstterm> is the jEdit term for an editor main
- window. It is possible to have multiple views open at once, and each
- View can be split into multiple panes. jEdit remembers the state of open
- views between editing sessions.</para>
-
- <para>An open file is referred to as a <firstterm>Buffer</firstterm>.
- Unlike some editors where each buffer gets its own View, jEdit
- completely separates the two concepts. A buffer might be visible in
- several views, or none at all.</para>
-
- <para>A <firstterm>TextArea</firstterm> is an editor for a buffer.
- An <firstterm>EditPane</firstterm> contains a TextArea plus optional buffer switcher.
- A View contains one EditPane by default, and additional panes are created whenever
- the View is split. </para>
-
- <para>The drop-down buffer switcher list at the top of each EditPane shows
- a buffer set which by default includes all open buffers.
- Selecting a buffer on this list will make it visible in the TextArea. Different
- emblems are displayed next to buffer names in the list, depending the
- buffer's state; a red disk is shown for buffers with unsaved changes, a
- lock is shown for read-only buffers, and a spark is shown for new
- buffers which don't yet exist on disk.</para>
-
- <para>With the new Tango icon theme, these symbols are slightly different,
- a red square is shown for buffers with unsaved changes, a lock is shown for
- read-only buffers, and a yellow square is shown for new buffers which don't
- yet exist on disk.</para>
-
- <para>As with most other graphical applications, there is a tool bar at
- the top of the View which provides quick access to frequently-used
- commands. Also, clicking the TextArea with the right mouse button
- displays a popup menu which also facilitates quick access to various
- commands. Both the tool bar and the right-click menu can be completely
- customized to suit your tastes in the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref linkend="context-pane" />
- and <xref linkend="toolbar-pane" />.</para>
-
- <para>Most of the View is taken up by the TextArea. If you've ever used
- a graphical user interface before, the TextArea will be instantly
- familiar. Text can be inserted simply by typing. More details on text
- insertion and deletion can be found in <xref
- linkend="entering-text" />.</para>
-
- <para>The strip on the left of the TextArea is called a
- <firstterm>gutter</firstterm>. The gutter displays marker and register
- locations, as well as folding arrows; it will also display line numbers
- if the <guimenu>View</guimenu>><guimenuitem>Line
- Numbers</guimenuitem> (shortcut: <keycap>C+e C+t</keycap>) command is
- invoked. Note this menu toggle action has the side-effect of changing the
- persistent jEdit properties for the Gutter, which can also
- be set from the <guilabel>Gutter</guilabel> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
-
- <para> The gutter is divided into two sections. Right-clicking on the left side
- gives you a context menu, while right-clicking on the right side (where line numbers might be)
- toggles a marker at that position.
- Text can be selected by left-clicking and dragging on right side of the gutter,
- over the range of lines you wish to select.
- </para>
-
- </section>
-
- <section id="views">
- <title>Multiple Views</title>
-
- <para>As documented at the beginning of this chapter, multiple Views
- (main windows) can be open at once.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>New View</guimenuitem>
- creates a new View, or main window.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>New Plain
- View</guimenuitem> creates a new View but without any tool bars or
- dockable windows. This can be used to open a small window for taking notes
- and so on.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Close View</guimenuitem>
- closes the current View. If only one View is open, closing it will exit
- jEdit, unless background mode is on; see <xref linkend="starting" /> for
- information about starting jEdit in background mode.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Split
- Horizontally</guimenuitem> (shortcut: <keycap>C+2</keycap>) splits the
- View into two TextAreas, placed above each other.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Split
- Vertically</guimenuitem> (shortcut: <keycap>C+3</keycap>) splits the
- View into two TextAreas, placed next to each other.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Unsplit
- Current</guimenuitem> (shortcut: <keycap>C+0</keycap>) removes the split
- containing the current TextArea only.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Unsplit All</guimenuitem>
- (shortcut: <keycap>C+1</keycap>) removes all splits from the View.</para>
-
- <para>When a View is split, editing commands operate on the TextArea
- that has keyboard focus. To give a TextArea keyboard focus, click in it
- with the mouse, or use the following commands.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Go to Previous Text
- Area</guimenuitem> (shortcut: <keycap>A+PAGE_UP</keycap>) shifts
- keyboard focus to the previous TextArea.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Go to Next Text
- Area</guimenuitem> (shortcut: <keycap>A+PAGE_DOWN</keycap>) shifts
- keyboard focus to the next TextArea.</para>
-
- <para><guimenu>Macros</guimenu>><guimenu>Interface</guimenu>>
- <guimenu>Splitpane Grow</guimenu> grows the size of the currently focused
- TextArea. </para>
-
- </section>
-
- <section id="buffers">
- <title>Switching Buffers</title>
-
- <para>Each EditPane has an optional drop-down BufferSwitcher at the top.
- The BufferSwitcher shows the current buffer and can also be used to
- switch the current buffer, using menu item commands and their keyboard shortcuts.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Go to Previous
- Buffer</guimenuitem> (keyboard shortcut: <keycap>C+PAGE_UP</keycap>)
- switches to the previous buffer in the list.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Go to Next
- Buffer</guimenuitem> (keyboard shortcut: <keycap>C+PAGE_DOWN</keycap>)
- switches to the next buffer in the list.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Go to Recent
- Buffer</guimenuitem> (keyboard shortcut: <keycap>C+BACK_QUOTE</keycap>)
- flips between the two most recently edited buffers.</para>
-
- <para><guimenu>View</guimenu>><guimenuitem>Show Buffer
- Switcher</guimenuitem> (keyboard shortcut:
- <keycap>A+BACK_QUOTE</keycap>) has the same effect as clicking on the
- buffer switcher combo box.</para>
-
- <para>If you prefer an alternative graphical paradigm for switching
- buffers, take a look at one of these plugins:</para>
-
- <itemizedlist>
- <listitem>
- <para><application>BufferList</application></para>
- </listitem>
-
- <listitem>
- <para><application>BufferSelector</application></para>
- </listitem>
-
- <listitem>
- <para><application>BufferTabs</application></para>
- </listitem>
- </itemizedlist>
-
- <para>If you decide to use one of these plugins, you can hide the popup
- menu buffer switcher in the <guilabel>View</guilabel> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
-
- <para>A number of plugins that implement fast keyboard-based buffer
- switching are available as well:</para>
-
- <itemizedlist>
- <listitem>
- <para><application>FastOpen</application></para>
- </listitem>
-
- <listitem>
- <para><application>OpenIt</application></para>
- </listitem>
-
- <listitem>
- <para><application>SwitchBuffer</application></para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="buffersets">
- <title>Buffer Sets</title>
-
- <para> The buffer sets feature helps keep the buffer lists local and manageable when using
- jEdit in a multiple-View and multiple-EditPane environment. </para>
-
- <para> As mentioned in the previous section, each EditPane can show a Buffer Switcher, which
- displays the contents of a BufferSet. In jEdit 4.2, all EditPane buffer switchers
- showed the same BufferSet: a global list of all buffers that were opened from any EditPane in any View.
- When using many Views and EditPanes, this resulted in large lists of buffers, and made
- the next/previous buffer actions useless with many Views, EditPanes and Buffers.
- </para>
-
- <para> In jEdit 4.3, it is possible to have more narrow scopes for the BufferSets
- of an EditPane. This makes the 'next-buffer' and 'previous-buffer' actions switch
- between buffers that are local to the view or pane. </para>
-
- <para>
- The three BufferSet scopes are: </para>
-
- <orderedlist>
- <listitem><para> <emphasis role="bold">Global</emphasis>: Includes all buffers open from any EditPane. </para></listitem>
- <listitem><para> <emphasis role="bold">View</emphasis>: EditPanes in the same
- View share the same BufferSet. Opening a buffer in one View will not affect the
- other views. </para></listitem>
- <listitem><para><emphasis role="bold">EditPane</emphasis>: Each EditPane can have its
- own independent BufferSet.
- </para></listitem>
- </orderedlist>
-
- <para> The Buffer Set scope can be Global, View, or EditPane, and can be
- changed from many places. The default can be set from
- <guimenu>Utilities</guimenu>><guimenuitem>Global Options</guimenuitem>
- > <guimenuitem>View</guimenuitem> > <guilabel>BufferSet scope for new EditPanes</guilabel>.
- </para>
-
- <para> A new BufferSet can be created in a number of ways, such as when a new
- View is created (and the default BufferSet scope is not global) or when the
- View is split (and the default BufferSet scope is EditPane), or when the
- BufferSet scope is changed to EditPane via the statusbar or menu action. </para>
-
- <para> New BufferSets are initially empty, or populated with the current buffer only, or a copy of the
- existing BufferSet. This behavior can be changed from
- <guimenuitem>Global Options</guimenuitem> > <guimenuitem>View</guimenuitem> > <guilabel>New (View/EditPane) BufferSets contain: copies of current BufferSet/Current
- Buffer/Untitled Buffer </guilabel>.</para>
-
- <para> <guimenu>File</guimenu> > <guimenuitem>Close</guimenuitem> behavior has changed in 4.3pre15: now it will remove the current buffer from the EditPane's BufferSet only. If it
- was the last BufferSet to contain that buffer, the buffer is also closed. </para>
-
- <para> The <guimenu> File </guimenu> > <guimenuitem>Close (global)</guimenuitem> action closes the buffer in all EditPanes, as the regular <guimenu> File </guimenu> > <guimenuitem>Close</guimenuitem> action did before. </para>
-
- <para> When <guimenuitem>Exclusive Buffersets</guimenuitem> are enabled, any time a buffer is opened from one EditPane, it should be automatically closed in other EditPanes which use a disjoint (non-intersecting) BufferSet. </para>
-
- <para> <guimenuitem>Clear BufferSet except active</guimenuitem> will clear the BufferSet of the
- current EditPane by performing a <guimenuitem>Close</guimenuitem> on all items except those buffers which are displayed in another active EditPane. </para>
-
- <bridgehead> Switching Bufferset Scopes </bridgehead>
-
- <para> The statusbar shows you which BufferSet scope is active
- (look for the letter "G", "E" or "V"). Double-clicking on that
- will allow you to change the scope. Currently, it changes
- your scope for the current editpane, but this behavior will someday change
- and cause a global scope-change on all editapnes immediately.
- </para>
-
- <para> The scope for BufferSets can also be changed from <guimenu>View</guimenu>><guimenu>Buffer Sets</guimenu> >
- <guimenu>(Global|View|EditPane) Buffer Set</guimenu>. </para>
-
- </section>
-
- <section id="docking">
- <title>Window Docking</title>
-
- <para>Various jEdit and plugin windows can be docked into the View for
- convenience. Dockable windows have a popup button in their top-left
- corner. Clicking this button displays a menu with commands for docking
- the window in one of four sides of the View.</para>
-
- <para>On each side of the TextArea where there are docked windows, a
- strip of buttons is shown. There is a button for activating each docked
- window, as well as a close box and a popup menu button, which when
- clicked shows a menu for moving or undocking the currently selected
- window. The popup menu also contains a command for opening a new
- floating instance of the current window.</para>
-
- <para>The commands in the
- <guimenu>View</guimenu>><guisubmenu>Docking</guisubmenu> menu move
- keyboard focus between docking areas.</para>
-
- <para>Dockable windows can also be configured in the
- <guilabel>Docking</guilabel> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
-
- <sidebar>
- <title>For power users</title>
-
- <para>Each dockable has three commands associated with it; one is
- part of the menu bar and opens the dockable. The other two commands
- are:</para>
-
- <itemizedlist>
- <listitem>
- <para><guimenuitem>Window Name (Toggle)</guimenuitem> -
- opens the dockable window if it is hidden, and hide it if
- its already open.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Window Name (New Floating
- Instance)</guimenuitem> - opens a new instance of the
- dockable in a floating window, regardless of the docking
- configuration. For example, this can be used to view two
- different directories side-by-side in two file system
- browser windows.</para>
-
- <para>A new floating instance can also be opened from the
- dockable window's popup menu.</para>
- </listitem>
- </itemizedlist>
-
- <para>These commands cannot be invoked from the menu bar. However,
- they can be added to the tool bar or context menu, and given
- keyboard shortcuts; see <xref linkend="global-opts" />.</para>
- </sidebar>
- </section>
-
- <section id="status-bar">
- <title>The Status Bar</title>
-
- <para>The <firstterm>status bar</firstterm> at the bottom of the View
- consists of the following components, from left to right:</para>
-
- <itemizedlist>
- <listitem>
- <para>Caret position information:</para>
- <itemizedlist>
- <listitem>
- <para>The offset of the caret from the beginning of the file</para>
- </listitem>
-
- <listitem>
- <para>The line number containing the caret</para>
- </listitem>
-
- <listitem>
- <para>The column position of the caret, with the leftmost column
- being 1.</para>
-
- <para>If the line contains tabs, the <firstterm>file</firstterm>
- position (where a hard tab is counted as one column) is shown
- first, followed by the <firstterm>screen</firstterm> position
- (where each tab counts for the number of columns until the next
- tab stop).</para>
- </listitem>
-
- <listitem>
- <para>The percent offset of the caret from the start of the file.
- This is based on the line number of the caret and the total number
- of lines in the file, so this is the same as the relative position
- of the right scroll bar in the main text area.</para>
- </listitem>
-
- </itemizedlist>
- <para>
- All of the above information is configurable in the Global Options
- for the status bar.
- </para>
- <para>Double-clicking on the caret location indicator displays
- the <guimenu>Edit</guimenu>><guimenuitem>Go to
- Line</guimenuitem> dialog box; see <xref
- linkend="lines" />.
- </para>
- </listitem>
-
- <listitem>
- <para>A message area where various prompts and status messages
- are shown.</para>
- </listitem>
-
- <listitem>
- <para>The current buffer's edit mode, fold mode, and character
- encoding. Double-clicking one of these displays the
- <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> dialog box. For more information about
- these settings, see:</para>
-
- <itemizedlist>
- <listitem>
- <para><xref linkend="buffer-opts" /></para>
- </listitem>
-
- <listitem>
- <para><xref linkend="modes" /></para>
- </listitem>
-
- <listitem>
- <para><xref linkend="folding" /></para>
- </listitem>
-
- <listitem>
- <para><xref linkend="encodings" /></para>
- </listitem>
- </itemizedlist>
- </listitem>
-
- <listitem>
- <para>A set of flags which indicate various editor features and
- settings. Clicking each flag will toggle the feature in
- question; hovering the mouse over a flag will show a tool tip
- with an explanation:</para>
-
- <itemizedlist>
- <listitem>
- <para>Word wrap - see <xref
- linkend="word-wrap" />.</para>
- </listitem>
-
- <listitem>
- <para>Multiple selection - see <xref
- linkend="multi-select" />.</para>
- </listitem>
-
- <listitem>
- <para>Rectangular selection - see <xref
- linkend="rect-select" />.</para>
- </listitem>
-
- <listitem>
- <para>Overwrite mode - see <xref
- linkend="entering-text" />.</para>
- </listitem>
-
- <listitem>
- <para>Line separator - see <xref
- linkend="line-separators" />.</para>
- </listitem>
-
- <listitem>
- <para>Buffer Set Scope - see <xref
- linkend="buffersets" />.</para>
- </listitem>
-
- </itemizedlist>
- </listitem>
-
- <listitem>
- <para>A Java heap memory usage indicator, that shows used and
- total heap memory, in megabytes. Double-clicking this indicator
- opens the
- <guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>Memory
- Status</guimenuitem> dialog box.</para>
- </listitem>
- </itemizedlist>
-
- <para>The visibility of each of the above items can be controlled in the
- <guibutton>Status Bar</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="status-bar-pane" />.</para>
- </section>
-
- <section id="action-bar">
- <title>The Action Bar</title>
-
- <para>The action bar allows almost any editor feature to be accessed
- from the keyboard.</para>
-
- <para><guimenu>Utilities</guimenu>><guimenuitem>Action
- Bar</guimenuitem> (shortcut: <keycap>C+ENTER</keycap>) displays the
- action bar at the bottom of the View and gives it keyboard focus. The
- action bar remembers previously entered strings; see <xref
- linkend="history" /> for details.</para>
-
- <para>To use the action bar, input a command and press
- <keycap>Enter</keycap>. The following commands are supported:</para>
-
- <bridgehead renderas="section">Action invocations</bridgehead>
-
- <para>Each menu item and tool bar button is bound to an
- <firstterm>action</firstterm>. To find out the name of an action, invoke
- the menu item or click the tool bar button, and look in the action bar's
- history.</para>
-
- <para>If a substring or an action name is entered, pressing
- <keycap>Tab</keycap> shows a popup listing matching actions. An action
- can be selected using the <keycap>Up</keycap> and <keycap>Down</keycap>
- arrow keys, or by entering more characters of its name.</para>
-
- <para>Pressing <keycap>Enter</keycap> with an incomplete substring
- invokes the action that would be first in the completion popup's
- list.</para>
-
- <para>For example, entering <userinput>l-o</userinput> will match
- <userinput>global-options</userinput>, which has the same effect as
- invoking <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem>.</para>
-
- <bridgehead renderas="section">Buffer-local properties</bridgehead>
-
- <para>Entering <userinput>buffer.property=value</userinput> sets the
- value of the buffer-local property named <userinput>property</userinput>
- to <userinput>value</userinput>. Buffer-local properties are documented
- in <xref linkend="buffer-local" />.</para>
-
- <para>For example, entering <userinput>buffer.tabSize=4</userinput>
- changes the current buffer's tab size to 4.</para>
-
- <para>See <xref linkend="buffer-local" /> for information about
- buffer-local properties.</para>
-
- <bridgehead renderas="section">Global properties</bridgehead>
-
- <para>Entering <userinput>property=value</userinput> sets the value of
- the global property named <userinput>property</userinput> to
- <userinput>value</userinput>. This feature is primarily intended to help
- plugin developers, since the properties jEdit uses to store its settings
- are not currently documented.</para>
-
- <bridgehead renderas="section">Command repetition</bridgehead>
-
- <para>To repeat a command multiple times, enter a number in the action
- bar, then press the key-combination that invokes the command.
- For example,
- <quote><keycap>C+ENTER</keycap> <keycap>1</keycap> <keycap>4</keycap>
- <keycap>C+d</keycap></quote> will delete 14 lines;
- <quote><keycap>C+ENTER</keycap> <keycap>9</keycap>
- <keycap>#</keycap></quote> will insert <quote>#########</quote> in the
- buffer.
- Note: The space characters in these examples should not be typed;
- they are only here to visually separate the keys to be typed.</para>
-
- <para>If you specify a repeat count greater than 20, a confirmation
- dialog box will be displayed, asking if you really want to perform the
- action. This prevents you from hanging jEdit by executing a command too
- many times.</para>
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="basics">
+ <title>jEdit Basics</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :indentSize=1:noTabs=true: -->
+ <!-- :xml.root=users-guide.xml: -->
+
+ <section id="overview">
+ <title>Interface Overview</title>
+
+ <para>A <firstterm>View</firstterm> is the jEdit term for an editor main
+ window. It is possible to have multiple views open at once, and each
+ View can be split into multiple panes. jEdit remembers the state of open
+ views between editing sessions.</para>
+
+ <para>An open file is referred to as a <firstterm>Buffer</firstterm>.
+ Unlike some editors where each buffer gets its own View, jEdit
+ completely separates the two concepts. A buffer might be visible in
+ several views, or none at all.</para>
+
+ <para>A <firstterm>TextArea</firstterm> is an editor for a buffer.
+ An <firstterm>EditPane</firstterm> contains a TextArea plus optional buffer switcher.
+ A View contains one EditPane by default, and additional panes are created whenever
+ the View is split. </para>
+
+ <para>The drop-down buffer switcher list at the top of each EditPane shows
+ a buffer set which by default includes all open buffers.
+ Selecting a buffer on this list will make it visible in the TextArea. Different
+ emblems are displayed next to buffer names in the list, depending the
+ buffer's state; a red disk is shown for buffers with unsaved changes, a
+ lock is shown for read-only buffers, and a spark is shown for new
+ buffers which don't yet exist on disk.</para>
+
+ <para>With the new Tango icon theme, these symbols are slightly different,
+ a red square is shown for buffers with unsaved changes, a lock is shown for
+ read-only buffers, and a yellow square is shown for new buffers which don't
+ yet exist on disk.</para>
+
+ <para>As with most other graphical applications, there is a tool bar at
+ the top of the View which provides quick access to frequently-used
+ commands. Also, clicking the TextArea with the right mouse button
+ displays a popup menu which also facilitates quick access to various
+ commands. Both the tool bar and the right-click menu can be completely
+ customized to suit your tastes in the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref linkend="context-pane" />
+ and <xref linkend="toolbar-pane" />.</para>
+
+ <para>Most of the View is taken up by the TextArea. If you've ever used
+ a graphical user interface before, the TextArea will be instantly
+ familiar. Text can be inserted simply by typing. More details on text
+ insertion and deletion can be found in <xref
+ linkend="entering-text" />.</para>
+
+ <para>The strip on the left of the TextArea is called a
+ <firstterm>gutter</firstterm>. The gutter displays marker and register
+ locations, as well as folding arrows; it will also display line numbers
+ if the <guimenu>View</guimenu>><guimenuitem>Line
+ Numbers</guimenuitem> (shortcut: <keycap>C+e C+t</keycap>) command is
+ invoked. Note this menu toggle action has the side-effect of changing the
+ persistent jEdit properties for the Gutter, which can also
+ be set from the <guilabel>Gutter</guilabel> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box.</para>
+
+ <para> The gutter is divided into two sections. Right-clicking on the left side
+ gives you a context menu, while right-clicking on the right side (where line numbers might be)
+ toggles a marker at that position.
+ Text can be selected by left-clicking and dragging on right side of the gutter,
+ over the range of lines you wish to select.
+ </para>
+
+ </section>
+
+ <section id="views">
+ <title>Multiple Views</title>
+
+ <para>As documented at the beginning of this chapter, multiple Views
+ (main windows) can be open at once.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>New View</guimenuitem>
+ creates a new View, or main window.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>New Plain
+ View</guimenuitem> creates a new View but without any tool bars or
+ dockable windows. This can be used to open a small window for taking notes
+ and so on.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Close View</guimenuitem>
+ closes the current View. If only one View is open, closing it will exit
+ jEdit, unless background mode is on; see <xref linkend="starting" /> for
+ information about starting jEdit in background mode.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Split
+ Horizontally</guimenuitem> (shortcut: <keycap>C+2</keycap>) splits the
+ View into two TextAreas, placed above each other.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Split
+ Vertically</guimenuitem> (shortcut: <keycap>C+3</keycap>) splits the
+ View into two TextAreas, placed next to each other.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Unsplit
+ Current</guimenuitem> (shortcut: <keycap>C+0</keycap>) removes the split
+ containing the current TextArea only.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Unsplit All</guimenuitem>
+ (shortcut: <keycap>C+1</keycap>) removes all splits from the View.</para>
+
+ <para>When a View is split, editing commands operate on the TextArea
+ that has keyboard focus. To give a TextArea keyboard focus, click in it
+ with the mouse, or use the following commands.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Go to Previous Text
+ Area</guimenuitem> (shortcut: <keycap>A+PAGE_UP</keycap>) shifts
+ keyboard focus to the previous TextArea.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Go to Next Text
+ Area</guimenuitem> (shortcut: <keycap>A+PAGE_DOWN</keycap>) shifts
+ keyboard focus to the next TextArea.</para>
+
+ <para><guimenu>Macros</guimenu>><guimenu>Interface</guimenu>>
+ <guimenu>Splitpane Grow</guimenu> grows the size of the currently focused
+ TextArea. </para>
+
+ </section>
+
+ <section id="buffers">
+ <title>Switching Buffers</title>
+
+ <para>Each EditPane has an optional drop-down BufferSwitcher at the top.
+ The BufferSwitcher shows the current buffer and can also be used to
+ switch the current buffer, using menu item commands and their keyboard shortcuts.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Go to Previous
+ Buffer</guimenuitem> (keyboard shortcut: <keycap>C+PAGE_UP</keycap>)
+ switches to the previous buffer in the list.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Go to Next
+ Buffer</guimenuitem> (keyboard shortcut: <keycap>C+PAGE_DOWN</keycap>)
+ switches to the next buffer in the list.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Go to Recent
+ Buffer</guimenuitem> (keyboard shortcut: <keycap>C+BACK_QUOTE</keycap>)
+ flips between the two most recently edited buffers.</para>
+
+ <para><guimenu>View</guimenu>><guimenuitem>Show Buffer
+ Switcher</guimenuitem> (keyboard shortcut:
+ <keycap>A+BACK_QUOTE</keycap>) has the same effect as clicking on the
+ buffer switcher combo box.</para>
+
+ <para>If you prefer an alternative graphical paradigm for switching
+ buffers, take a look at one of these plugins:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><application>BufferList</application></para>
+ </listitem>
+
+ <listitem>
+ <para><application>BufferSelector</application></para>
+ </listitem>
+
+ <listitem>
+ <para><application>BufferTabs</application></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>If you decide to use one of these plugins, you can hide the popup
+ menu buffer switcher in the <guilabel>View</guilabel> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box.</para>
+
+ <para>A number of plugins that implement fast keyboard-based buffer
+ switching are available as well:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><application>FastOpen</application></para>
+ </listitem>
+
+ <listitem>
+ <para><application>OpenIt</application></para>
+ </listitem>
+
+ <listitem>
+ <para><application>SwitchBuffer</application></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="buffersets">
+ <title>Buffer Sets</title>
+
+ <para> The buffer sets feature helps keep the buffer lists local and manageable when using
+ jEdit in a multiple-View and multiple-EditPane environment. </para>
+
+ <para> As mentioned in the previous section, each EditPane can show a Buffer Switcher, which
+ displays the contents of a BufferSet. In jEdit 4.2, all EditPane buffer switchers
+ showed the same BufferSet: a global list of all buffers that were opened from any EditPane in any View.
+ When using many Views and EditPanes, this resulted in large lists of buffers, and made
+ the next/previous buffer actions useless with many Views, EditPanes and Buffers.
+ </para>
+
+ <para> In jEdit 4.3, it is possible to have more narrow scopes for the BufferSets
+ of an EditPane. This makes the 'next-buffer' and 'previous-buffer' actions switch
+ between buffers that are local to the view or pane. </para>
+
+ <para>
+ The three BufferSet scopes are: </para>
+
+ <orderedlist>
+ <listitem><para> <emphasis role="bold">Global</emphasis>: Includes all buffers open from any EditPane. </para></listitem>
+ <listitem><para> <emphasis role="bold">View</emphasis>: EditPanes in the same
+ View share the same BufferSet. Opening a buffer in one View will not affect the
+ other views. </para></listitem>
+ <listitem><para><emphasis role="bold">EditPane</emphasis>: Each EditPane can have its
+ own independent BufferSet.
+ </para></listitem>
+ </orderedlist>
+
+ <para> Bufferset scope can be set from <guimenu>Utilities</guimenu>><guimenuitem>Global Options</guimenuitem> > <guimenuitem>View</guimenuitem> >
+ <guilabel>BufferSet scope:</guilabel>.
+ </para>
+
+ <para> <guimenu>File</guimenu> > <guimenuitem>Close</guimenuitem> removes the current buffer from the EditPane's BufferSet only. If it was the last BufferSet to contain that buffer, the buffer is also closed. </para>
+
+ <para> The <guimenu> File </guimenu> > <guimenuitem>Close (global)</guimenuitem> action closes the buffer in all EditPanes, as the jEdit 4.2 <guimenu> File </guimenu> > <guimenuitem>Close</guimenuitem> action did before. </para>
+
+ <para> When <guimenuitem>Exclusive Buffersets</guimenuitem> are enabled, any time a buffer is opened from one EditPane, it should be automatically closed in other EditPanes which use a disjoint (non-intersecting) BufferSet. </para>
+
+ <para> <guimenuitem>Close Others</guimenuitem> will clear the BufferSet of the
+ current EditPane by performing a <guimenuitem>Close</guimenuitem> on all items except those buffers which are displayed in another active EditPane. </para>
+
+ <bridgehead> Switching Bufferset Scopes </bridgehead>
+
+ <para> The statusbar shows you which BufferSet scope is active
+ (look for the letter "G", "E" or "V"). Double-clicking on that
+ will allow you to change the scope without going into global options.
+
+ The BufferSet Scope can also be changed from
+ <guimenu>View</guimenu>><guimenu>Buffer Sets</guimenu> >
+ <guimenu>(Global|View|EditPane) Buffer Set</guimenu>.
+ Changes to the bufferset scope affects all editpanes immediately.
+ </para>
+
+ </section>
+
+ <section id="docking">
+ <title>Window Docking Layouts</title>
+
+ <para> A docking layout is similar to an Eclipse "Perspective" in that it describes a set of dockable windows that are visible to the user at any given time, hiding the rest. </para>
+
+ <para>Various jEdit and plugin windows can be docked into the View for
+ convenience. Dockable windows have a popup button in their top-left
+ corner. Clicking this button displays a menu with commands for docking
+ the window in one of four sides of the View.</para>
+
+ <para>On each side of the TextArea where there are docked windows, a
+ strip of buttons is shown. There is a button for activating each docked
+ window, as well as a close box and a popup menu button, which when
+ clicked shows a menu for moving or undocking the currently selected
+ window. The popup menu also contains a command for opening a new
+ floating instance of the current window.</para>
+
+ <para>The commands in the
+ <guimenu>View</guimenu>><guisubmenu>Docking</guisubmenu> menu move keyboard focus between docking areas.</para>
+
+
+ <para>
+ After you have customized the layout of your dockables and wish to save it for export/import, use the actions <guimenu>View</guimenu> - <guimenu>Docking</guimenu> - <guimenuitem>Save/Load Docking Layout</guimenuitem>. </para>
+ <para> It is possible to configure a Dockable layout for just one or a handful of edit modes. This makes it possible to save or load your dockable layout with the same keyboard shortcut (or automatically) based on the edit mode of your current buffer.
+ </para>
+
+ <para>
+ It is also possible to save/load a layout for a particular edit mode. The loading and saving can be done automatically, as configured in the global options docking pane when the mode of the buffer changes, or manually in response to invoking <guimenu>View</guimenu> - <guimenu>Docking</guimenu> - <guimenuitem>Save/Load Docking Layout for current mode.</guimenuitem>
+ </para>
+
+ <para>Dockable windows can be further configured in the
+ <guilabel>Docking</guilabel> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. See <xref linkend="docking-pane"/> for details.
+ </para>
+
+
+ <sidebar>
+ <title>For keyboard/power users</title>
+
+ <para>Each dockable has three commands associated with it; one is part of the menu bar and opens the dockable. The other two commands are:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><guimenuitem>Window Name (Toggle)</guimenuitem> -
+ opens the dockable window if it is hidden, and hide it if
+ its already open.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Window Name (New Floating
+ Instance)</guimenuitem> - opens a new instance of the
+ dockable in a floating window, regardless of the docking
+ configuration. For example, this can be used to view two
+ different directories side-by-side in two file system
+ browser windows.</para>
+
+ <para>A new floating instance can also be opened from the
+ dockable window's popup menu.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>These commands cannot be invoked from the menu bar. However,
+ they can be added to the tool bar or context menu, and given
+ keyboard shortcuts; see <xref linkend="global-opts" />.</para>
+ </sidebar>
+ </section>
+
+ <section id="status-bar">
+ <title>The Status Bar</title>
+
+ <para>The <firstterm>status bar</firstterm> at the bottom of the View
+ consists of the following components, from left to right:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Caret position information:</para>
+ <itemizedlist>
+ <listitem>
+ <para>The offset of the caret from the beginning of the file</para>
+ </listitem>
+
+ <listitem>
+ <para>The line number containing the caret</para>
+ </listitem>
+
+ <listitem>
+ <para>The column position of the caret, with the leftmost column
+ being 1.</para>
+
+ <para>If the line contains tabs, the <firstterm>file</firstterm>
+ position (where a hard tab is counted as one column) is shown
+ first, followed by the <firstterm>screen</firstterm> position
+ (where each tab counts for the number of columns until the next
+ tab stop).</para>
+ </listitem>
+
+ <listitem>
+ <para>The percent offset of the caret from the start of the file.
+ This is based on the line number of the caret and the total number
+ of lines in the file, so this is the same as the relative position
+ of the right scroll bar in the main text area.</para>
+ </listitem>
+
+ </itemizedlist>
+ <para>
+ All of the above information is configurable in the Global Options
+ for the status bar.
+ </para>
+ <para>Double-clicking on the caret location indicator displays
+ the <guimenu>Edit</guimenu>><guimenuitem>Go to
+ Line</guimenuitem> dialog box; see <xref
+ linkend="lines" />.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>A message area where various prompts and status messages
+ are shown.</para>
+ </listitem>
+
+ <listitem>
+ <para>The current buffer's edit mode, fold mode, and character
+ encoding. Double-clicking one of these displays the
+ <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> dialog box. For more information about
+ these settings, see:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><xref linkend="buffer-opts" /></para>
+ </listitem>
+
+ <listitem>
+ <para><xref linkend="modes" /></para>
+ </listitem>
+
+ <listitem>
+ <para><xref linkend="folding" /></para>
+ </listitem>
+
+ <listitem>
+ <para><xref linkend="encodings" /></para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>A set of flags which indicate various editor features and
+ settings. Clicking each flag will toggle the feature in
+ question; hovering the mouse over a flag will show a tool tip
+ with an explanation:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Word wrap - see <xref
+ linkend="word-wrap" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>Multiple selection - see <xref
+ linkend="multi-select" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>Rectangular selection - see <xref
+ linkend="rect-select" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>Overwrite mode - see <xref
+ linkend="entering-text" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>Line separator - see <xref
+ linkend="line-separators" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>Buffer Set Scope - see <xref
+ linkend="buffersets" />.</para>
+ </listitem>
+
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>A Java heap memory usage indicator, that shows used and
+ total heap memory, in megabytes. Double-clicking this indicator
+ opens the
+ <guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>Memory
+ Status</guimenuitem> dialog box.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The visibility of each of the above items can be controlled in the
+ <guibutton>Status Bar</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="status-bar-pane" />.</para>
+ </section>
+
+ <section id="action-bar">
+ <title>The Action Bar</title>
+
+ <para>The action bar allows almost any editor feature to be accessed
+ from the keyboard.</para>
+
+ <para><guimenu>Utilities</guimenu>><guimenuitem>Action
+ Bar</guimenuitem> (shortcut: <keycap>C+ENTER</keycap>) displays the
+ action bar at the bottom of the View and gives it keyboard focus. The
+ action bar remembers previously entered strings; see <xref
+ linkend="history" /> for details.</para>
+
+ <para>To use the action bar, input a command and press
+ <keycap>Enter</keycap>. The following commands are supported:</para>
+
+ <bridgehead>Action invocations</bridgehead>
+
+ <para>Each menu item and tool bar button is bound to an
+ <firstterm>action</firstterm>. To find out the name of an action, invoke
+ the menu item or click the tool bar button, and look in the action bar's
+ history.</para>
+
+ <para>If a substring or an action name is entered, pressing
+ <keycap>Tab</keycap> shows a popup listing matching actions. An action
+ can be selected using the <keycap>Up</keycap> and <keycap>Down</keycap>
+ arrow keys, or by entering more characters of its name.</para>
+
+ <para>Pressing <keycap>Enter</keycap> with an incomplete substring
+ invokes the action that would be first in the completion popup's
+ list.</para>
+
+ <para>For example, entering <userinput>l-o</userinput> will match
+ <userinput>global-options</userinput>, which has the same effect as
+ invoking <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem>.</para>
+
+ <bridgehead>Buffer-local properties</bridgehead>
+
+ <para>Entering <userinput>buffer.property=value</userinput> sets the
+ value of the buffer-local property named <userinput>property</userinput>
+ to <userinput>value</userinput>. Buffer-local properties are documented
+ in <xref linkend="buffer-local" />.</para>
+
+ <para>For example, entering <userinput>buffer.tabSize=4</userinput>
+ changes the current buffer's tab size to 4.</para>
+
+ <para>See <xref linkend="buffer-local" /> for information about
+ buffer-local properties.</para>
+
+ <bridgehead>Global properties</bridgehead>
+
+ <para>Entering <userinput>property=value</userinput> sets the value of
+ the global property named <userinput>property</userinput> to
+ <userinput>value</userinput>. This feature is primarily intended to help
+ plugin developers, since the properties jEdit uses to store its settings
+ are not currently documented.</para>
+
+ <bridgehead>Command repetition</bridgehead>
+
+ <para>To repeat a command multiple times, enter a number in the action
+ bar, then press the key-combination that invokes the command.
+ For example,
+ <quote><keycap>C+ENTER</keycap> <keycap>1</keycap> <keycap>4</keycap>
+ <keycap>C+d</keycap></quote> will delete 14 lines;
+ <quote><keycap>C+ENTER</keycap> <keycap>9</keycap>
+ <keycap>#</keycap></quote> will insert <quote>#########</quote> in the
+ buffer.
+ Note: The space characters in these examples should not be typed;
+ they are only here to visually separate the keys to be typed.</para>
+
+ <para>If you specify a repeat count greater than 20, a confirmation
+ dialog box will be displayed, asking if you really want to perform the
+ action. This prevents you from hanging jEdit by executing a command too
+ many times.</para>
+ </section>
+</chapter>
diff --git a/jEdit/doc/users-guide/bsh-commands.xml b/jEdit/doc/users-guide/bsh-commands.xml
index f6614b5..1465e13 100644
--- a/jEdit/doc/users-guide/bsh-commands.xml
+++ b/jEdit/doc/users-guide/bsh-commands.xml
@@ -1,719 +1,719 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="bsh-commands">
-<!-- jEdit buffer local properties:
- :indentSize=1:noTabs=yes:maxLineLen=72:tabSize=2:
- :xml.root=users-guide.xml:
- jEdit 3.2 Macro Guide, (C) 2001 John Gellene
- Thu Jun 21 23:49:14 EDT 2001 @200 /Internet Time/ -->
-
- <title>BeanShell Commands</title>
-
- <para>BeanShell includes a set of <firstterm>commands</firstterm>;
- subroutines that can be called from any script or macro. The following is a
- summary of those commands which may be useful within jEdit.</para>
-
- <note>
- <para>Java classes in plugins cannot make use of BeanShell commands
- directly. However, these commands can be called from BeanShell code that
- is part of a plugin, for example the snippets in
- <filename>actions.xml</filename>, or any BeanShell scripts shipped with
- the plugin and loaded on startup.</para>
- </note>
-
- <section id="bsh-commands-output">
- <title>Output Commands</title>
-
- <itemizedlist>
- <!-- one day jEdit will provide its own error() implementation -->
-
- <!-- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>error</function></funcdef>
- <paramdef>String <parameter>errorMsg</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- Writes the string represented by <parameter>errorMsg</parameter>
- to the error stream of the current process.
- </para>
- </listitem> -->
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>cat</function></funcdef>
-
- <paramdef>String
- <parameter>filename</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Writes the contents of <parameter>filename</parameter> to
- the activity log.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>javap</function></funcdef>
-
- <paramdef>String | Object | Class
- <parameter>target</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Writes the public fields and methods of the specified
- class to the output stream of the current process. Requires Java
- 2 version 1.3 or greater.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>print</function></funcdef>
-
- <paramdef><parameter>arg</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Writes the string value of the argument to the activity
- log, or if run from the <application>Console</application>
- plugin, to the current output window. If
- <parameter>arg</parameter> is an array,
- <function>print</function> runs itself recursively on the
- array's elements.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="bsh-commands-file">
- <title>File Management Commands</title>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>cd</function></funcdef>
-
- <paramdef>String
- <parameter>dirname</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Changes the working directory of the BeanShell interpreter
- to <parameter>dirname</parameter>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>cp</function></funcdef>
-
- <paramdef>String
- <parameter>fromFile</parameter></paramdef>
-
- <paramdef>String
- <parameter>toFile</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Copy <parameter>fromFile</parameter> to
- <parameter>toFile</parameter>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>dir</function></funcdef>
-
- <paramdef>String
- <parameter>dirname</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Displays the contents of directory
- <parameter>dirname</parameter>. The format of the display is
- similar to the Unix <function>ls -l</function> command.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>mv</function></funcdef>
-
- <paramdef>String
- <parameter>fromFile</parameter></paramdef>
-
- <paramdef>String
- <parameter>toFile</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Moves the file named by <parameter>fromFile</parameter> to
- <parameter>toFile</parameter>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>File <function>pathToFile</function></funcdef>
-
- <paramdef>String
- <parameter>filename</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Create a <classname>File</classname> object corresponding
- to <function>filename</function>. Relative paths are resolved
- with reference to the BeanShell interpreter's working
- directory.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>pwd</function></funcdef>
-
- <void />
- </funcprototype>
- </funcsynopsis>
-
- <para>Writes the current working directory of the BeanShell
- interpreter to the output stream of the current process.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>rm</function></funcdef>
-
- <paramdef>String
- <parameter>pathname</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Deletes the file name by
- <parameter>pathname</parameter>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="bsh-commands-serial">
- <title>Component Commands</title>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>JFrame <function>frame</function></funcdef>
-
- <paramdef>Component
- <parameter>frame</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Displays the component in a top-level
- <classname>JFrame</classname>, centered and packed. Returns the
- <classname>JFrame</classname> object.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>Object <function>load</function></funcdef>
-
- <paramdef>String
- <parameter>filename</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Loads and returns a serialized Java object from
- <parameter>filename</parameter>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>save</function></funcdef>
-
- <paramdef>Component
- <parameter>component</parameter></paramdef>
-
- <paramdef>String
- <parameter>filename</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Saves <parameter>component</parameter> in serialized form
- to <parameter>filename</parameter>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>Font <function>setFont</function></funcdef>
-
- <paramdef>Component
- <parameter>comp</parameter></paramdef>
-
- <paramdef>int <parameter>ptsize</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Set the font size of <parameter>component</parameter> to
- <parameter>ptsize</parameter> and returns the new font.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="bsh-commands-resource">
- <title>Resource Management Commands</title>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>URL <function>getResource</function></funcdef>
-
- <paramdef>String <parameter>path</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Returns the resource specified by
- <parameter>path</parameter>. An absolute path must be used to
- return any resource available in the current classpath.</para>
- </listitem>
-
- <!-- bsh.classpath not supported in jEdit -->
-
- <!--
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>addClassPath</function></funcdef>
- <paramdef>String <parameter>path</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>addClassPath</function></funcdef>
- <paramdef>URL <parameter>path</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- Adds the directory or jar archive file specified by
- <parameter>path</parameter> to the classpath used by the
- interpreter.
- </para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>setClassPath</function></funcdef>
- <paramdef>URL[] <parameter>paths</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- Changes the classpath for the BeanShell interpreter to the specified
- array of directories and/or archives.
- </para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>URL[] <function>getClassPath</function></funcdef>
- <void/>
- </funcprototype>
- </funcsynopsis>
- <para>
- Returns an array containing the current classpath.
- </para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>reloadClasses</function></funcdef>
- <paramdef>String <parameter>packagename</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>reloadClasses</function></funcdef>
- <void/>
- </funcprototype>
- </funcsynopsis>
- <para>
- Reloads the class or package specified by
- <parameter>packagename</parameter> in the BeanShell interpreter.
- If called without a parameter, reloads all classes
- in the interpreter's classpath.
- </para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>Class <function>getClass</function></funcdef>
- <paramdef>String <parameter>classname</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- This method is similar to the <function>Class.forName()</function>
- method of the Java platform, but it uses the classpath of the
- current BeanShell interpreter, which can contain additional
- classes and packages as well as reloaded classes.
- </para>
- </listitem> -->
- </itemizedlist>
- </section>
-
- <section id="bsh-commands-script">
- <title>Script Execution Commands</title>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>Thread <function>bg</function></funcdef>
-
- <paramdef>String
- <parameter>filename</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Run the BeanShell script named by
- <parameter>filename</parameter> in a copy of the existing
- namespace and in a separate thread. Returns the
- <classname>Thread</classname> object so created.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>exec</function></funcdef>
-
- <paramdef>String
- <parameter>cmdline</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Start the external process by calling
- <function>Runtime.exec()</function> on
- <parameter>cmdline</parameter>. Any output is directed to the
- output stream of the calling process.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>Object <function>eval</function></funcdef>
-
- <paramdef>String
- <parameter>expression</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Evaluates the string <parameter>expression</parameter> as
- a BeanShell script in the interpreter's current namespace.
- Returns the result of the evaluation of
- <constant>null</constant>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>org.gjt.sp.jedit.bsh.This
- <function>run</function></funcdef>
-
- <paramdef>String
- <parameter>filename</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Run the BeanShell script named by
- <parameter>filename</parameter> in a copy of the existing
- namespace. The return value represent the object context of the
- script, allowing you to access its variables and methods.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void
- <function>setAccessibility</function></funcdef>
-
- <paramdef>boolean <parameter>flag</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>If <parameter>flag</parameter> is <literal>true</literal>,
- BeanShell scripts are allowed to change and modify private
- variables, and call private methods. The default is
- <literal>false</literal>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void
- <function>setStrictJava</function></funcdef>
-
- <paramdef>boolean <parameter>flag</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>If <parameter>flag</parameter> is <literal>true</literal>,
- BeanShell scripts must follow a much more strict, Java-like
- syntax, and are not able to use the convenience features
- described in <xref
- linkend="macro-tips-BeanShell-convenience" />.</para>
- </listitem>
-
- <!-- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>server</function></funcdef>
- <paramdef>int <parameter>port</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- Creates a <quote>server</quote> version of the BeanShell
- interpreter that shares the same namespace as the current
- interpreter. The server interpreter listens on the designated
- port.
- </para>
- <para>
- This requires the <classname>bsh.util</classname> package, which
- is not included with jEdit. It can be found in the stand-alone
- BeanShell distribution, available from <ulink
- url="http://www.beanshell.org">http://www.beanshell.org</ulink>.
- </para>
- <caution><para>
- Security of this port is not guaranteed. Use this command
- with extreme caution.
- </para></caution>
- </listitem> -->
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>source</function></funcdef>
-
- <paramdef>String
- <parameter>filename</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Evaluates the contents of <parameter>filename</parameter>
- as a BeanShell script in the interpreter's current
- namespace.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="bsh-commands-object">
- <title>BeanShell Object Management Commands</title>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef><function>bind</function></funcdef>
-
- <paramdef>org.gjt.sp.jedit.bsh.This
- <parameter>ths</parameter></paramdef>
-
- <paramdef>org.gjt.sp.jedit.bsh.Namespace
- <parameter>namespace</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Binds the scripted object <parameter>ths</parameter> to
- <parameter>namespace</parameter>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>clear</function></funcdef>
-
- <void />
- </funcprototype>
- </funcsynopsis>
-
- <para>Clear all variables, methods, and imports from this
- namespace. If this namespace is the root, it will be reset to
- the default imports.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>org.gjt.sp.jedit.bsh.This
- <function>extend</function></funcdef>
-
- <paramdef>org.gjt.sp.jedit.bsh.This
- <parameter>object</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Creates a new BeanShell <classname>This</classname>
- scripted object that is a child of the parameter
- <parameter>object</parameter>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void
- <function>importObject</function></funcdef>
-
- <paramdef>Object
- <parameter>object</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Import an object into this namespace. This is somewhat
- similar to Java 1.5 static class imports, except you can import
- the methods and fields of a Java object instance into a
- BeanShell namespace, for example:</para>
-
- <informalexample>
- <programlisting>Map map = new HashMap();
- importObject( map );
- put("foo", "bar");
- print( get("foo") ); // "bar"</programlisting>
- </informalexample>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>org.gjt.sp.jedit.bsh.This
- <function>object</function></funcdef>
-
- <void />
- </funcprototype>
- </funcsynopsis>
-
- <para>Creates a new BeanShell <classname>This</classname>
- scripted object which can hold data members. You can use this to
- create an object for storing miscellaneous crufties, like
- so:</para>
-
- <informalexample>
- <programlisting>crufties = object();
-crufties.foo = "hello world";
-crufties.counter = 5;
-...</programlisting>
- </informalexample>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef><function>setNameSpace</function></funcdef>
-
- <paramdef>org.gjt.sp.jedit.bsh.Namespace
- <parameter>namespace</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Set the namespace of the current scope to
- <parameter>namespace</parameter>.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>org.gjt.sp.jedit.bsh.This
- <function>super</function></funcdef>
-
- <paramdef>String
- <parameter>scopename</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Returns a reference to the BeanShell
- <classname>This</classname> object representing the enclosing
- method scope specified by <parameter>scopename</parameter>. This
- method work similar to the <function>super</function> keyword
- but can refer to enclosing scope at higher levels in a hierarchy
- of scopes.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>unset</function></funcdef>
-
- <paramdef>String <parameter>name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>Removes the variable named by <parameter>name</parameter>
- from the current interpreter namespace. This has the effect of
- <quote>undefining</quote> the variable.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="bsh-commands-other">
- <title>Other Commands</title>
-
- <itemizedlist>
- <!-- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>exit</function></funcdef>
- <void/>
- </funcprototype>
- </funcsynopsis>
- <para>
- Calls <function>System.exit(0)</function>.
- </para>
- <caution><para>
- While this command is available, you should always call
- <function>jEdit.exit()</function> instead so the application will
- shutdown in an orderly fashion.
- </para></caution>
- </listitem> -->
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>debug</function></funcdef>
-
- <void />
- </funcprototype>
- </funcsynopsis>
-
- <para>Toggles BeanShell's internal debug reporting to the output
- stream of the current process.</para>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef><function>getSourceFileInfo</function></funcdef>
-
- <void />
- </funcprototype>
- </funcsynopsis>
-
- <para>Returns the name of the file or other source from which
- the BeanShell interpreter is reading.</para>
- </listitem>
- </itemizedlist>
- </section>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="bsh-commands">
+<!-- jEdit buffer local properties:
+ :indentSize=1:noTabs=yes:maxLineLen=72:tabSize=2:
+ :xml.root=users-guide.xml:
+ jEdit 3.2 Macro Guide, (C) 2001 John Gellene
+ Thu Jun 21 23:49:14 EDT 2001 @200 /Internet Time/ -->
+
+ <title>BeanShell Commands</title>
+
+ <para>BeanShell includes a set of <firstterm>commands</firstterm>;
+ subroutines that can be called from any script or macro. The following is a
+ summary of those commands which may be useful within jEdit.</para>
+
+ <note>
+ <para>Java classes in plugins cannot make use of BeanShell commands
+ directly. However, these commands can be called from BeanShell code that
+ is part of a plugin, for example the snippets in
+ <filename>actions.xml</filename>, or any BeanShell scripts shipped with
+ the plugin and loaded on startup.</para>
+ </note>
+
+ <section id="bsh-commands-output">
+ <title>Output Commands</title>
+
+ <itemizedlist>
+ <!-- one day jEdit will provide its own error() implementation -->
+
+ <!-- <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>error</function></funcdef>
+ <paramdef>String <parameter>errorMsg</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Writes the string represented by <parameter>errorMsg</parameter>
+ to the error stream of the current process.
+ </para>
+ </listitem> -->
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>cat</function></funcdef>
+
+ <paramdef>String
+ <parameter>filename</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Writes the contents of <parameter>filename</parameter> to
+ the activity log.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>javap</function></funcdef>
+
+ <paramdef>String | Object | Class
+ <parameter>target</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Writes the public fields and methods of the specified
+ class to the output stream of the current process. Requires Java
+ 2 version 1.3 or greater.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>print</function></funcdef>
+
+ <paramdef><parameter>arg</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Writes the string value of the argument to the activity
+ log, or if run from the <application>Console</application>
+ plugin, to the current output window. If
+ <parameter>arg</parameter> is an array,
+ <function>print</function> runs itself recursively on the
+ array's elements.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="bsh-commands-file">
+ <title>File Management Commands</title>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>cd</function></funcdef>
+
+ <paramdef>String
+ <parameter>dirname</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Changes the working directory of the BeanShell interpreter
+ to <parameter>dirname</parameter>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>cp</function></funcdef>
+
+ <paramdef>String
+ <parameter>fromFile</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>toFile</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Copy <parameter>fromFile</parameter> to
+ <parameter>toFile</parameter>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>dir</function></funcdef>
+
+ <paramdef>String
+ <parameter>dirname</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Displays the contents of directory
+ <parameter>dirname</parameter>. The format of the display is
+ similar to the Unix <function>ls -l</function> command.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>mv</function></funcdef>
+
+ <paramdef>String
+ <parameter>fromFile</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>toFile</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Moves the file named by <parameter>fromFile</parameter> to
+ <parameter>toFile</parameter>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>File <function>pathToFile</function></funcdef>
+
+ <paramdef>String
+ <parameter>filename</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Create a <classname>File</classname> object corresponding
+ to <function>filename</function>. Relative paths are resolved
+ with reference to the BeanShell interpreter's working
+ directory.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>pwd</function></funcdef>
+
+ <void />
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Writes the current working directory of the BeanShell
+ interpreter to the output stream of the current process.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>rm</function></funcdef>
+
+ <paramdef>String
+ <parameter>pathname</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Deletes the file name by
+ <parameter>pathname</parameter>.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="bsh-commands-serial">
+ <title>Component Commands</title>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>JFrame <function>frame</function></funcdef>
+
+ <paramdef>Component
+ <parameter>frame</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Displays the component in a top-level
+ <classname>JFrame</classname>, centered and packed. Returns the
+ <classname>JFrame</classname> object.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>Object <function>load</function></funcdef>
+
+ <paramdef>String
+ <parameter>filename</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Loads and returns a serialized Java object from
+ <parameter>filename</parameter>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>save</function></funcdef>
+
+ <paramdef>Component
+ <parameter>component</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>filename</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Saves <parameter>component</parameter> in serialized form
+ to <parameter>filename</parameter>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>Font <function>setFont</function></funcdef>
+
+ <paramdef>Component
+ <parameter>comp</parameter></paramdef>
+
+ <paramdef>int <parameter>ptsize</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Set the font size of <parameter>component</parameter> to
+ <parameter>ptsize</parameter> and returns the new font.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="bsh-commands-resource">
+ <title>Resource Management Commands</title>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>URL <function>getResource</function></funcdef>
+
+ <paramdef>String <parameter>path</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Returns the resource specified by
+ <parameter>path</parameter>. An absolute path must be used to
+ return any resource available in the current classpath.</para>
+ </listitem>
+
+ <!-- bsh.classpath not supported in jEdit -->
+
+ <!--
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>addClassPath</function></funcdef>
+ <paramdef>String <parameter>path</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>addClassPath</function></funcdef>
+ <paramdef>URL <parameter>path</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Adds the directory or jar archive file specified by
+ <parameter>path</parameter> to the classpath used by the
+ interpreter.
+ </para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>setClassPath</function></funcdef>
+ <paramdef>URL[] <parameter>paths</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Changes the classpath for the BeanShell interpreter to the specified
+ array of directories and/or archives.
+ </para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>URL[] <function>getClassPath</function></funcdef>
+ <void/>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Returns an array containing the current classpath.
+ </para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>reloadClasses</function></funcdef>
+ <paramdef>String <parameter>packagename</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>reloadClasses</function></funcdef>
+ <void/>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Reloads the class or package specified by
+ <parameter>packagename</parameter> in the BeanShell interpreter.
+ If called without a parameter, reloads all classes
+ in the interpreter's classpath.
+ </para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>Class <function>getClass</function></funcdef>
+ <paramdef>String <parameter>classname</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ This method is similar to the <function>Class.forName()</function>
+ method of the Java platform, but it uses the classpath of the
+ current BeanShell interpreter, which can contain additional
+ classes and packages as well as reloaded classes.
+ </para>
+ </listitem> -->
+ </itemizedlist>
+ </section>
+
+ <section id="bsh-commands-script">
+ <title>Script Execution Commands</title>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>Thread <function>bg</function></funcdef>
+
+ <paramdef>String
+ <parameter>filename</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Run the BeanShell script named by
+ <parameter>filename</parameter> in a copy of the existing
+ namespace and in a separate thread. Returns the
+ <classname>Thread</classname> object so created.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>exec</function></funcdef>
+
+ <paramdef>String
+ <parameter>cmdline</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Start the external process by calling
+ <function>Runtime.exec()</function> on
+ <parameter>cmdline</parameter>. Any output is directed to the
+ output stream of the calling process.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>Object <function>eval</function></funcdef>
+
+ <paramdef>String
+ <parameter>expression</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Evaluates the string <parameter>expression</parameter> as
+ a BeanShell script in the interpreter's current namespace.
+ Returns the result of the evaluation of
+ <constant>null</constant>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>org.gjt.sp.jedit.bsh.This
+ <function>run</function></funcdef>
+
+ <paramdef>String
+ <parameter>filename</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Run the BeanShell script named by
+ <parameter>filename</parameter> in a copy of the existing
+ namespace. The return value represent the object context of the
+ script, allowing you to access its variables and methods.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void
+ <function>setAccessibility</function></funcdef>
+
+ <paramdef>boolean <parameter>flag</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>If <parameter>flag</parameter> is <literal>true</literal>,
+ BeanShell scripts are allowed to change and modify private
+ variables, and call private methods. The default is
+ <literal>false</literal>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void
+ <function>setStrictJava</function></funcdef>
+
+ <paramdef>boolean <parameter>flag</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>If <parameter>flag</parameter> is <literal>true</literal>,
+ BeanShell scripts must follow a much more strict, Java-like
+ syntax, and are not able to use the convenience features
+ described in <xref
+ linkend="macro-tips-BeanShell-convenience" />.</para>
+ </listitem>
+
+ <!-- <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>server</function></funcdef>
+ <paramdef>int <parameter>port</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Creates a <quote>server</quote> version of the BeanShell
+ interpreter that shares the same namespace as the current
+ interpreter. The server interpreter listens on the designated
+ port.
+ </para>
+ <para>
+ This requires the <classname>bsh.util</classname> package, which
+ is not included with jEdit. It can be found in the stand-alone
+ BeanShell distribution, available from <ulink
+ url="http://www.beanshell.org">http://www.beanshell.org</ulink>.
+ </para>
+ <caution><para>
+ Security of this port is not guaranteed. Use this command
+ with extreme caution.
+ </para></caution>
+ </listitem> -->
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>source</function></funcdef>
+
+ <paramdef>String
+ <parameter>filename</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Evaluates the contents of <parameter>filename</parameter>
+ as a BeanShell script in the interpreter's current
+ namespace.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="bsh-commands-object">
+ <title>BeanShell Object Management Commands</title>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef><function>bind</function></funcdef>
+
+ <paramdef>org.gjt.sp.jedit.bsh.This
+ <parameter>ths</parameter></paramdef>
+
+ <paramdef>org.gjt.sp.jedit.bsh.Namespace
+ <parameter>namespace</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Binds the scripted object <parameter>ths</parameter> to
+ <parameter>namespace</parameter>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>clear</function></funcdef>
+
+ <void />
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Clear all variables, methods, and imports from this
+ namespace. If this namespace is the root, it will be reset to
+ the default imports.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>org.gjt.sp.jedit.bsh.This
+ <function>extend</function></funcdef>
+
+ <paramdef>org.gjt.sp.jedit.bsh.This
+ <parameter>object</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Creates a new BeanShell <classname>This</classname>
+ scripted object that is a child of the parameter
+ <parameter>object</parameter>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void
+ <function>importObject</function></funcdef>
+
+ <paramdef>Object
+ <parameter>object</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Import an object into this namespace. This is somewhat
+ similar to Java 1.5 static class imports, except you can import
+ the methods and fields of a Java object instance into a
+ BeanShell namespace, for example:</para>
+
+ <informalexample>
+ <programlisting>Map map = new HashMap();
+ importObject( map );
+ put("foo", "bar");
+ print( get("foo") ); // "bar"</programlisting>
+ </informalexample>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>org.gjt.sp.jedit.bsh.This
+ <function>object</function></funcdef>
+
+ <void />
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Creates a new BeanShell <classname>This</classname>
+ scripted object which can hold data members. You can use this to
+ create an object for storing miscellaneous crufties, like
+ so:</para>
+
+ <informalexample>
+ <programlisting>crufties = object();
+crufties.foo = "hello world";
+crufties.counter = 5;
+...</programlisting>
+ </informalexample>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef><function>setNameSpace</function></funcdef>
+
+ <paramdef>org.gjt.sp.jedit.bsh.Namespace
+ <parameter>namespace</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Set the namespace of the current scope to
+ <parameter>namespace</parameter>.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>org.gjt.sp.jedit.bsh.This
+ <function>super</function></funcdef>
+
+ <paramdef>String
+ <parameter>scopename</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Returns a reference to the BeanShell
+ <classname>This</classname> object representing the enclosing
+ method scope specified by <parameter>scopename</parameter>. This
+ method work similar to the <function>super</function> keyword
+ but can refer to enclosing scope at higher levels in a hierarchy
+ of scopes.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>unset</function></funcdef>
+
+ <paramdef>String <parameter>name</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Removes the variable named by <parameter>name</parameter>
+ from the current interpreter namespace. This has the effect of
+ <quote>undefining</quote> the variable.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="bsh-commands-other">
+ <title>Other Commands</title>
+
+ <itemizedlist>
+ <!-- <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>exit</function></funcdef>
+ <void/>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ Calls <function>System.exit(0)</function>.
+ </para>
+ <caution><para>
+ While this command is available, you should always call
+ <function>jEdit.exit()</function> instead so the application will
+ shutdown in an orderly fashion.
+ </para></caution>
+ </listitem> -->
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>void <function>debug</function></funcdef>
+
+ <void />
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Toggles BeanShell's internal debug reporting to the output
+ stream of the current process.</para>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef><function>getSourceFileInfo</function></funcdef>
+
+ <void />
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>Returns the name of the file or other source from which
+ the BeanShell interpreter is reading.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/conventions.xml b/jEdit/doc/users-guide/conventions.xml
index f58c118..606f12c 100644
--- a/jEdit/doc/users-guide/conventions.xml
+++ b/jEdit/doc/users-guide/conventions.xml
@@ -1,118 +1,121 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="conventions">
- <title>Conventions</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :tabSize=1:indentSize=1:noTabs=true: -->
- <!-- :xml.root=users-guide.xml: -->
-
- <para>Several conventions are used throughout jEdit's user interface and
- this manual. They will be described here. Macintosh users should note how
- their modifier keys map to the terms used in the manual.</para>
-
- <informaltable>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Scroll
- to Current Line</guimenuitem></entry>
-
- <entry>The <guimenuitem>Scroll to Current Line</guimenuitem>
- command contained in the <guisubmenu>Scrolling</guisubmenu>
- submenu of the <guimenu>View</guimenu> menu.</entry>
- </row>
-
- <row>
- <entry><guimenu>Edit</guimenu>><guimenuitem>Go to
- Line...</guimenuitem></entry>
-
- <entry>Menu items that end with ellipsis (...) display
- dialog boxes.</entry>
- </row>
-
- <row>
- <entry><keycap>C</keycap></entry>
-
- <entry>The primary modifier key in jEdit. On MacOS X, this
- is actually the key known as <quote>Command</quote>. On most
- other keyboards, this key is labelled
- <quote>Control</quote>.</entry>
- </row>
-
- <row>
- <entry><keycap>A</keycap></entry>
-
- <entry>The secondary modifier key in jEdit. On MacOS X, this
- is actually the key labelled <quote>Control</quote>. On most
- other keyboards, this key is labelled
- <quote>Alt</quote>.</entry>
- </row>
-
- <row>
- <entry><keycap>S</keycap></entry>
-
- <entry>The standard <quote>Shift</quote> key.</entry>
- </row>
-
- <row>
- <entry><keycap>C+o</keycap></entry>
-
- <entry>Refers to pressing and holding the
- <keycap>Control</keycap> key, pressing and releasing
- <keycap>O</keycap>, and finally releasing the
- <keycap>Control</keycap> key.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+j</keycap></entry>
-
- <entry>Refers to holding down <keycap>Control</keycap>,
- pressing <keycap>E</keycap>, pressing <keycap>J</keycap>,
- and releasing <keycap>Control</keycap>.</entry>
- </row>
-
- <row>
- <entry>Default buttons</entry>
-
- <entry>In many dialog boxes, the default button (it has a
- heavy outline, or a special border, depending on the current
- Swing look and feel) can be activated by pressing
- <keycap>Enter</keycap>. Similarly, pressing
- <keycap>Escape</keycap> will usually close a dialog
- box.</entry>
- </row>
-
- <row>
- <entry><keycap>Alt</keycap>-key mnemonics</entry>
-
- <entry>Some user interface elements (menus, menu items,
- buttons) have a certain letter in their label underlined.
- Pressing this letter in combination with the
- <keycap>Alt</keycap> key activates the associated user
- interface widget. Note that this functionality is not
- available on MacOS X with the <quote>MacOS Adaptive</quote>
- look and feel. See <xref linkend="appearance-pane" /> for
- information on changing the look and feel.</entry>
- </row>
-
- <row>
- <entry>Right mouse button</entry>
-
- <entry>Used in jEdit to show context-sensitive menus. If you
- have a one button Macintosh mouse, a
- <keycap>Control</keycap>-click has the same effect.</entry>
- </row>
-
- <row>
- <entry>Middle mouse button</entry>
-
- <entry>Used by the quick copy feature (see <xref
- linkend="quick-copy" />). True 3-button mice are rare these
- days. If you have a wheel mouse, press down on the wheel
- without rolling it. On a Macintosh with a one-button mouse,
- <keycap>Option</keycap>-click. On other platforms without a
- three-button mouse, <keycap>Alt</keycap>-click.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-</chapter>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="conventions">
+ <title>Conventions</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :tabSize=1:indentSize=1:noTabs=true: -->
+ <!-- :xml.root=users-guide.xml: -->
+
+ <para>Several conventions are used throughout jEdit's user interface and
+ this manual. They will be described here. Macintosh users should note how
+ their modifier keys map to the terms used in the manual.</para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="*"/>
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Scroll
+ to Current Line</guimenuitem></entry>
+
+ <entry>The <guimenuitem>Scroll to Current Line</guimenuitem>
+ command contained in the <guisubmenu>Scrolling</guisubmenu>
+ submenu of the <guimenu>View</guimenu> menu.</entry>
+ </row>
+
+ <row>
+ <entry><guimenu>Edit</guimenu>><guimenuitem>Go to
+ Line...</guimenuitem></entry>
+
+ <entry>Menu items that end with ellipsis (...) display
+ dialog boxes.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C</keycap></entry>
+
+ <entry>The primary modifier key in jEdit. On MacOS X, this
+ is actually the key known as <quote>Command</quote>. On most
+ other keyboards, this key is labelled
+ <quote>Control</quote>.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A</keycap></entry>
+
+ <entry>The secondary modifier key in jEdit. On MacOS X, this
+ is actually the key labelled <quote>Control</quote>. On most
+ other keyboards, this key is labelled
+ <quote>Alt</quote>.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>S</keycap></entry>
+
+ <entry>The standard <quote>Shift</quote> key.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+o</keycap></entry>
+
+ <entry>Refers to pressing and holding the
+ <keycap>Control</keycap> key, pressing and releasing
+ <keycap>O</keycap>, and finally releasing the
+ <keycap>Control</keycap> key.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+j</keycap></entry>
+
+ <entry>Refers to holding down <keycap>Control</keycap>,
+ pressing <keycap>E</keycap>, pressing <keycap>J</keycap>,
+ and releasing <keycap>Control</keycap>.</entry>
+ </row>
+
+ <row>
+ <entry>Default buttons</entry>
+
+ <entry>In many dialog boxes, the default button (it has a
+ heavy outline, or a special border, depending on the current
+ Swing look and feel) can be activated by pressing
+ <keycap>Enter</keycap>. Similarly, pressing
+ <keycap>Escape</keycap> will usually close a dialog
+ box.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>Alt</keycap>-key mnemonics</entry>
+
+ <entry>Some user interface elements (menus, menu items,
+ buttons) have a certain letter in their label underlined.
+ Pressing this letter in combination with the
+ <keycap>Alt</keycap> key activates the associated user
+ interface widget. Note that this functionality is not
+ available on MacOS X with the <quote>MacOS Adaptive</quote>
+ look and feel. See <xref linkend="appearance-pane" /> for
+ information on changing the look and feel.</entry>
+ </row>
+
+ <row>
+ <entry>Right mouse button</entry>
+
+ <entry>Used in jEdit to show context-sensitive menus. If you
+ have a one button Macintosh mouse, a
+ <keycap>Control</keycap>-click has the same effect.</entry>
+ </row>
+
+ <row>
+ <entry>Middle mouse button</entry>
+
+ <entry>Used by the quick copy feature (see <xref
+ linkend="quick-copy" />). True 3-button mice are rare these
+ days. If you have a wheel mouse, press down on the wheel
+ without rolling it. On a Macintosh with a one-button mouse,
+ <keycap>Option</keycap>-click. On other platforms without a
+ three-button mouse, <keycap>Alt</keycap>-click.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</chapter>
diff --git a/jEdit/doc/users-guide/customizing.xml b/jEdit/doc/users-guide/customizing.xml
index b825d6b..b219543 100644
--- a/jEdit/doc/users-guide/customizing.xml
+++ b/jEdit/doc/users-guide/customizing.xml
@@ -1,639 +1,681 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="customizing">
- <title>Customizing jEdit</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=0: -->
- <!-- :xml.root=users-guide.xml: -->
-
- <section id="buffer-opts">
- <title>The Buffer Options Dialog Box</title>
-
- <para><guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> displays a dialog box for changing editor settings
- on a per-buffer basis. Changes made in this dialog box are not retained
- after the buffer is closed.</para>
-
- <para>The following settings can be changed here:</para>
-
- <itemizedlist>
- <listitem>
- <para>The line separator (see <xref
- linkend="line-separators" />)</para>
- </listitem>
-
- <listitem>
- <para>The character encoding (see <xref
- linkend="encodings" />)</para>
- </listitem>
-
- <listitem>
- <para>If the file should be GZipped on disk (see <xref
- linkend="opening" />)</para>
- </listitem>
-
- <listitem>
- <para>The edit mode (see <xref linkend="modes" />)</para>
- </listitem>
-
- <listitem>
- <para>The fold mode (see <xref linkend="folding" />)</para>
- </listitem>
-
- <listitem>
- <para>The wrap mode and margin (see <xref
- linkend="word-wrap" />)</para>
- </listitem>
-
- <listitem>
- <para>The tab width (see <xref linkend="indent" />)</para>
- </listitem>
-
- <listitem>
- <para>The indent width</para>
- </listitem>
-
- <listitem>
- <para>If soft tabs should be used (see <xref
- linkend="indent" />)</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="buffer-local">
- <title>Buffer-Local Properties</title>
-
- <para>Buffer-local properties provide an alternate way to change editor
- settings on a per-buffer basis. While changes made in the
- <guimenuitem>Buffer Options</guimenuitem> dialog box are lost after the
- buffer is closed, buffer-local properties take effect each time the file
- is opened, because they are embedded in the file itself.</para>
-
- <para>When jEdit loads a file, it checks the first and last 10 lines for
- colon-enclosed name/value pairs. For example, placing the following in a
- buffer changes the indent width to 4 characters, enables soft tabs, and
- activates the Perl edit mode:</para>
-
- <screen>:indentSize=4:noTabs=true:mode=perl:</screen>
-
- <para>Adding buffer-local properties to a buffer takes effect after the
- next time the buffer is saved.</para>
-
- <para>The following table describes each buffer-local property in
- detail.</para>
-
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1.5in" />
-
- <thead>
- <row>
- <entry>Property name</entry>
-
- <entry>Description</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry><varname>collapseFolds</varname></entry>
-
- <entry>Folds with a level of this or higher will be
- collapsed when the buffer is opened. If set to zero, all
- folds will be expanded initially. See <xref
- linkend="folding" />.</entry>
- </row>
-
- <row>
- <entry><varname>deepIndent</varname></entry>
-
- <entry>When set to <quote>true</quote>, multiple-line
- expressions delimited by parentheses are aligned like
- so: <programlisting>retVal.x = (int)(horizontalOffset
- + Chunk.offsetToX(info.chunks,
- offset));</programlisting> With this setting disabled, the
- text would look like so: <programlisting>retVal.x = (int)(horizontalOffset
- + Chunk.offsetToX(info.chunks,
- offset));</programlisting></entry>
- </row>
-
- <row>
- <entry><varname>folding</varname></entry>
-
- <entry>The fold mode; one of <quote>none</quote>,
- <quote>indent</quote>, <quote>explicit</quote>, or the
- name of a plugin folding mode. See <xref
- linkend="folding" />.</entry>
- </row>
-
- <row>
- <entry><varname>indentSize</varname></entry>
-
- <entry>The width, in characters, of one indent. Must be
- an integer greater than 0. See <xref
- linkend="indent" />.</entry>
- </row>
-
- <row>
- <entry><varname>maxLineLen</varname></entry>
-
- <entry>The maximum line length and wrap column position.
- Inserting text beyond this column will automatically
- insert a line break at the appropriate position. See
- <xref linkend="entering-text" />.</entry>
- </row>
-
- <row>
- <entry><varname>mode</varname></entry>
-
- <entry>The default edit mode for the buffer. See <xref
- linkend="modes" />.</entry>
- </row>
-
- <row>
- <entry><varname>noTabs</varname></entry>
-
- <entry>If set to <quote>true</quote>, soft tabs
- (multiple space characters) will be used instead of
- <quote>real</quote> tabs. See <xref
- linkend="indent" />.</entry>
- </row>
-
- <row>
- <entry><varname>noWordSep</varname></entry>
-
- <entry>A list of non-alphanumeric characters that are
- <emphasis>not</emphasis> to be treated as word
- separators. Global default is <quote>_</quote>.</entry>
- </row>
-
- <row>
- <entry><varname>tabSize</varname></entry>
-
- <entry>The tab width. Must be an integer greater than 0.
- See <xref linkend="indent" />.</entry>
- </row>
-
- <row>
- <entry><varname>wordBreakChars</varname></entry>
-
- <entry>Characters, in addition to spaces and tabs, at
- which lines may be split when word wrapping. See <xref
- linkend="entering-text" />.</entry>
- </row>
-
- <row>
- <entry><varname>wrap</varname></entry>
-
- <entry>The word wrap mode; one of <quote>none</quote>,
- <quote>soft</quote>, or <quote>hard</quote>. See <xref
- linkend="word-wrap" />.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
-
- <section id="global-opts">
- <title>The Global Options Dialog Box</title>
-
- <para><guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> displays the global options dialog box. The dialog
- box is divided into several panes, each pane containing a set of related
- options. Use the list on the left of the dialog box to switch between
- panes. Only panes created by jEdit are described here; some plugins add
- their own option panes, and information about them can be found in the
- documentation for the plugins in question.</para>
-
- <section id="general-pane">
- <title>The General Pane</title>
-
- <para>The <guibutton>General</guibutton> pane contains various
- settings, such as the default line separator, the number of recent
- files to remember, if the buffer list should be sorted, and so
- on.</para>
-
- </section>
-
- <section id="abbrevs-pane">
- <title>The Abbreviations Pane</title>
-
- <indexterm>
- <primary>Abbreviations</primary>
-
- <secondary>creating and editing</secondary>
- </indexterm>
-
- <para>The <guibutton>Abbreviations</guibutton> option pane can be
- used to enable or disable automatic abbreviation expansion, and to
- edit currently defined abbreviations.</para>
-
- <para>The combo box labelled <quote>Abbrev set</quote> selects the
- abbreviation set to edit. The first entry, <quote>global</quote>,
- contains abbreviations available in all edit modes. The subsequent
- entries correspond to each mode's local set of abbreviations.</para>
-
- <para>To change an abbreviation or its expansion, either
- double-click the appropriate table entry, or click a table entry and
- then click the <guibutton>Edit</guibutton> button. This will display
- a dialog box for modifying the abbreviation.</para>
-
- <para>The <guibutton>Add</guibutton> button displays a dialog box
- where you can define a new abbreviation. The
- <guibutton>Remove</guibutton> button removes the currently selected
- abbreviation from the list.</para>
-
- <para>See <xref linkend="positional-params" /> for information about
- positional parameters in abbreviations.</para>
- </section>
-
- <section id="appearance-pane">
- <title>The Appearance Pane</title>
-
- <para>The <guibutton>Appearance</guibutton> pane can be used to
- change the appearance of user interface controls such as buttons,
- labels and menus. It can also be used to change the docking
- framework (the dockable window manager). The number of items
- retained in history text fields can also be set here; see
- <xref linkend="history" />.</para>
-
- <para>Note that changes to certain settings such as the Swing look
- and feel and the docking framework require a restart of jEdit to
- take effect.</para>
- </section>
-
- <section id="autosave-backups-pane">
- <title>The Autosave and Backup Pane</title>
-
- <para>The <guibutton>Autosave</guibutton> option pane contains
- settings for the autosave and backup features. See <xref
- linkend="autosave" /> and <xref linkend="backups" />.</para>
- </section>
-
- <section id="context-pane">
- <title>The Context Menu Pane</title>
-
- <para>The <guibutton>Context Menu</guibutton> option pane edits the
- text area's right-click context menu. See <xref
- linkend="views" />.</para>
- </section>
-
- <section id="docking-pane">
- <title>The Docking Pane</title>
-
- <para>The <guibutton>Docking</guibutton> option pane specifies
- docking location for various dockable windows. Another way to
- specify docking locations is to use the popup menus associated with
- each dockable window; see <xref linkend="docking" />.</para>
- </section>
-
- <section id="editing-pane">
- <title>The Editing Pane</title>
-
- <para>The <guibutton>Editing</guibutton> option pane contains
- settings such as the tab size, syntax highlighting and soft tabs on
- a global or mode-specific basis. </para>
-
- <para>Changing options from this optionpane does not change XML mode definition files on disk; it merely writes values to the user properties file which
- override those set in mode files. To find out how to edit mode files directly, see <xref linkend="writing-modes-part" />. Some of these options can be further overridden on an individual file basis through the use of buffer-local properties. </para>
-
- <para>The <literal>File name
- glob</literal> and <literal>First line glob</literal> text
- fields let you specify a glob pattern that names and first lines of
- buffers will be matched against to determine the edit mode. See
- <xref linkend="globs" /> for information about glob patterns.</para>
-
- <para> The <literal>Extra Word Characters</literal> allows you to set the <literal>noLineSep</literal> buffer property on a mode-wide basis, allowing you to define what is considered part of a word when double-clicking on it in the text area.
- </para>
-
- <para> The <literal>Deep Indent</literal> option instructs jEdit to indent subsequent lines so that they line up with the open bracket on the previous line. </para>
-
-
- </section>
-
- <section id="encodings-pane">
- <title>The Encodings Pane</title>
-
- <para>This option pane is new to jEdit 4.3, and offers international
- users of jEdit many flexible options for defining how Encodings are
- handled in jEdit. See <xref linkend="encodings" /> for the
- basics.</para>
-
- <para> In previous versions of jEdit, there was very little encoding autodetection, so <guilabel>use autodetection when possible</guilabel> is an option you can switch on or off.
- </para>
-
- <para>The <literal>List of Encoding Autodetector Names</literal> is
- an experimental feature that allows for jEdit and plugins to offer
- additional encoding autodetector routines. At the moment, there are
- two techniques known by jEdit: the <literal>BOM</literal> (Byte
- Order Mark), and the <literal>XML-PI</literal> (XML processing
- instruction) techniques. Others can be defined as services and added
- to this space-separated list. See <ulink
- url="../api/org/gjt/sp/jedit/io/EncodingDetector.html">EncodingDetector</ulink>
- for details on how to offer this service. The order they appear in this
- list determines the order of detectors that are tried on each file. </para>
-
- <para>The <literal>List of Fallback Encodings</literal> is used when
- a file fails to open in the default encoding, and the Encoding
- Autodetectors also fail. The list order here determines the order of
- encodings that are tried. Each is separated by a space. This is
- especially handy when doing directory searches through files of
- different encodings. We suggest using <literal>UTF-8</literal> as
- either your default or one of the fallback encodings.</para>
-
- <para>While jEdit allows you to edit files in a variety of different
- encodings, the average user switches between only 2 or 3. In other
- parts of jEdit, where the list of encodings is displayed in a
- combobox (such as the buffer options) or a menu (such as
- <guimenuitem>File - Reload with Encoding</guimenuitem> submenu) it
- may be desirable to display only a subset of available encodings,
- those that are in common local use. The Encodings checkbox list
- allows the user to select the subset of supported encodings to
- display in other GUI components that list all of the
- encodings.</para>
- </section>
-
- <section id="gutter-pane">
- <title>The Gutter Pane</title>
-
- <para>The <guibutton>Gutter</guibutton> option pane contains
- settings to customize the appearance of the gutter. Some new options were added
- to jEdit 4.3, including "show gutter", "minimal number of digits to reserve for line numbers",
- and "fold style". See <xref linkend="overview" />.</para>
- </section>
-
- <section id="mouse-pane">
- <title>The Mouse Pane</title>
-
- <para>The <guibutton>Mouse</guibutton> option pane contains settings
- for toggling drag and drop of text, as well as gutter mouse click
- behavior.</para>
-
- <para> The only option that may not be self-explanatory is the <emphasis role="bold">Double-Click drag joins non-alphanumeric characters</emphasis>. This option means that double-click will select a region that includes the non-alphabetical characters, as defined for the current mode. The actual set of characters can be defined for an indiviual file via buffer-local properties (<literal>noWordSep</literal>) or on a mode-wide basis from the Editing option pane (<literal>Extra Word Characters</literal>). </para>
-
- </section>
-
- <section id="printing-pane">
- <title>The Printing Pane</title>
-
- <para>The <guibutton>Printing</guibutton> option pane contains
- settings to control the appearance of printed output. Workarounds
- that might be needed for your Java version to print correctly can
- also be enabled here. See <xref linkend="printing" />.</para>
- </section>
-
- <section id="pluginmgr-pane">
- <title>The Plugin Manager Pane</title>
-
- <para>The <guibutton>Plugin Manager</guibutton> pane contains a
- chooser for the desired download mirror, as well as various settings
- such as the directory where plugins are to be installed. In addition, you can set the time in minutes that the pluginlist can be cached from jedit.org, helping to reduce the server load. See <xref
- linkend="using-plugins" />.</para>
- </section>
-
- <section id="firewall-pane">
- <title>The Proxy Servers Pane</title>
-
- <para>The <guibutton>Proxy Servers</guibutton> option pane lets you
- specify HTTP and SOCKS proxy servers to use when jEdit makes network
- connections, for example when downloading plugins.</para>
- </section>
-
- <section id="shortcuts-pane">
- <title>The Shortcuts Pane</title>
-
- <para>The <guibutton>Shortcuts</guibutton> option pane associates
- keyboard shortcuts with commands. Each command can have up to two
- shortcuts associated with it.</para>
-
- <para>The combo box at the top of the option pane selects the
- command set to edit. Command sets include the set of all built-in
- commands, the commands of each plugin, and the set of macros.</para>
-
- <para>To change a shortcut, click the appropriate table entry and
- press the keys you want associated with that command in the
- resulting dialog box. The dialog box will warn you if the shortcut
- is already assigned.</para>
-
- <bridgehead> 2-key shortcut prefixes </bridgehead>
-
- <para> Some shortcuts, such as C+e, C+m, and C+r, are prefixes for two-keystroke shortcuts. Another keystroke may be used as a prefix in a 2-key shortcut, so for example, C+x can be redefined as a prefix to make it more emacs-like, by mapping any other action to a C+x prefixed shortcut.</para>
-
- <para> Conversely, emacs users will notice at first that C+e can not be mapped as a single key shortcut to go to the end of the line, unless all of the other actions that contain C+e prefixed shortcuts are remapped to other shortcuts first. After that, C+e can be bound to end-of-line. </para>
-
- <para> The default shortcuts can be found in <literal>jedit_keys.props</literal>. </para>
-
- </section>
-
- <section id="status-bar-pane">
- <title>The Status Bar Pane</title>
-
- <para>The <guibutton>Status Bar</guibutton> option pane contains
- settings to customize the status bar, or disable it completely. See
- <xref linkend="status-bar" />.</para>
- </section>
-
- <section id="syntax-hilite-pane">
- <title>The Syntax Highlighting Pane</title>
-
- <para>The <guibutton>Syntax Highlighting</guibutton> pane can be
- used to customize the fonts and colors for syntax highlighting. See
- <xref linkend="syntax-hilite" />.</para>
- </section>
-
- <section id="text-area-pane">
- <title>The Text Area Pane</title>
-
- <para>The <guibutton>Text Area</guibutton> pane contains settings to
- customize the appearance of the text area. See <xref
- linkend="overview" />.</para>
- </section>
-
- <section id="toolbar-pane">
- <title>The Tool Bar Pane</title>
-
- <para>The <guibutton>Tool Bar</guibutton> option pane lets you edit
- the tool bar, or disable it completely. See <xref
- linkend="views" />.</para>
- </section>
-
- <section id="view-pane">
- <title>The View Pane</title>
-
- <para>The <guibutton>View</guibutton> option pane lets you change
- various settings related to the editor window's appearance,
- including the arrangement of dockable windows, and if the search bar
- and buffer switcher should be visible. See <xref
- linkend="views" />.</para>
- </section>
-
- <section id="vfs-browser-pane">
- <title>The File System Browser Panes</title>
-
- <para>The <guibutton>File System Browser</guibutton> group contains
- two option panes, <guibutton>General</guibutton> and
- <guibutton>Colors</guibutton>. The former contains various file
- system browser settings. The latter configures glob patterns used
- for coloring the file list. See <xref linkend="vfs-browser" /> for
- more information.</para>
- </section>
- </section>
-
- <section id="settings-directory">
- <title>The jEdit Settings Directory</title>
-
- <para>jEdit stores settings, macros, and plugins as files inside the
- <firstterm>settings directory</firstterm>. In most cases, editing these
- files by hand is not necessary, since graphical tools and editor
- commands can do the job. However, being familiar with the structure of
- the settings directory still comes in handy in certain situations, for
- example when you want to copy jEdit settings between computers.</para>
-
- <para>The location of the settings directory is system-specific; it is
- printed to the activity log
- (<guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>Activity
- Log</guimenuitem>). For example:</para>
-
- <screen>[message] jEdit: Settings directory is /home/slava/.jedit</screen>
-
- <para>Specifying the <userinput>-settings</userinput> switch on the
- command line instructs jEdit to store settings in a directory other than
- the default. For example, the following command will instruct jEdit to
- store all settings in the <filename>jedit</filename> subdirectory of the
- <filename>C:</filename> drive:</para>
-
- <screen><prompt>C:\jedit></prompt> <userinput>jedit -settings=C:\jedit</userinput></screen>
-
- <para>The <userinput>-nosettings</userinput> switch will force jEdit to
- not look for or create a settings directory; default settings will be
- used instead.</para>
-
- <!-- para>
- If you are using <application>jEditLauncher</application>
- to start jEdit on Windows, these parameters cannot be specified on the
- MS-DOS prompt command line when starting jEdit; they must be set as described
- in <xref linkend="launcher-starting" />.
- </para -->
-
- <para>jEdit creates the following files and directories inside the
- settings directory; plugins may add more:</para>
-
- <itemizedlist>
- <listitem>
- <para><filename>abbrevs</filename> - a plain text file which
- stores all defined abbreviations. See <xref
- linkend="abbrevs" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>activity.log</filename> - a plain text file
- which contains the full activity log. See <xref
- linkend="activity-log" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>history</filename> - a plain text file which
- stores history lists, used by history text fields and the
- <guimenu>Edit</guimenu>><guimenuitem>Paste
- Previous</guimenuitem> command. See <xref
- linkend="text-transfer" /> and <xref
- linkend="history" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>jars</filename> - this directory contains
- plugins. See <xref linkend="using-plugins" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>jars-cache</filename> - this directory contains
- plugin cache files which decrease the time to start jEdit. They
- are automatically updated when plugins are installed or
- updated.</para>
- </listitem>
-
- <listitem>
- <para><filename>killring.xml</filename> - stores recently
- deleted text. See <xref linkend="text-transfer" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>macros</filename> - this directory contains
- macros. See <xref linkend="using-macros" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>modes</filename> - this directory contains
- custom edit modes. See <xref
- linkend="writing-modes-part" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>perspective.xml</filename> - an XML file that
- stores the list of open buffers and views used to maintain
- editor state between sessions.</para>
- </listitem>
-
- <listitem>
- <para><filename>PluginManager.download</filename> - this
- directory is usually empty. It only contains files while the
- plugin manager is downloading a plugin. For information about
- the plugin manager, see <xref linkend="using-plugins" />.</para>
- </listitem>
- <listitem><para>
- <filename>pluginMgr-Cached.xml.gz</filename> -
- this contains a cached copy of the last XML plugin list downloaded from plugin central. If you delete this file, a new one will be created next time you try to install a plugin via Plugin Manager. </para>
- </listitem>
-
- <listitem>
- <para><filename>printspec</filename> - a binary file that stores
- printing settings when running under Java 2 version 1.4.</para>
- </listitem>
-
- <listitem>
- <para><filename>properties</filename> - a plain text file that
- stores the majority of jEdit's and its plugins settings. For
- more information see <xref linkend="propertiesfile" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>recent.xml</filename> - an XML file which stores
- the list of recently opened files. jEdit remembers the caret
- position and character encoding of each recent file, and
- automatically restores those values when one of the files is
- opened.</para>
- </listitem>
-
- <listitem>
- <para><filename>registers.xml</filename> - an XML file that
- stores register contents. See <xref linkend="registers" /> for
- more information about registers.</para>
- </listitem>
-
- <listitem>
- <para><filename>server</filename> - a plain text file that only
- exists while jEdit is running. The edit server's port number and
- authorization key is stored here. See <xref
- linkend="starting" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>settings-backup</filename> - this directory
- contains numbered backups of all automatically-written settings
- files.</para>
- </listitem>
- </itemizedlist>
-
- <section id="propertiesfile">
- <title>The jEdit properties file</title>
-
- <para>The jEdit <literal>properties</literal> file uses the Java
- properties syntax to store key/value pairs. All of the values are
- stored as strings, but are interpreted as other types (such as
- integer or boolean) by plugins at runtime.</para>
-
- <para>Editing and saving this file while jEdit is running means that
- until you restart jEdit again, all other changed settings will be
- lost.</para>
- </section>
- </section>
-</chapter>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="customizing">
+ <title>Customizing jEdit</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=0: -->
+ <!-- :xml.root=users-guide.xml: -->
+
+ <section id="buffer-opts">
+ <title>The Buffer Options Dialog Box</title>
+
+ <para><guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> displays a dialog box for changing editor settings
+ on a per-buffer basis. Changes made in this dialog box are not retained
+ after the buffer is closed.</para>
+
+ <para>The following settings can be changed here:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>The line separator (see <xref
+ linkend="line-separators" />)</para>
+ </listitem>
+
+ <listitem>
+ <para>The character encoding (see <xref
+ linkend="encodings" />)</para>
+ </listitem>
+
+ <listitem>
+ <para>If the file should be GZipped on disk (see <xref
+ linkend="opening" />)</para>
+ </listitem>
+
+ <listitem>
+ <para>The edit mode (see <xref linkend="modes" />)</para>
+ </listitem>
+
+ <listitem>
+ <para>The fold mode (see <xref linkend="folding" />)</para>
+ </listitem>
+
+ <listitem>
+ <para>The wrap mode and margin (see <xref
+ linkend="word-wrap" />)</para>
+ </listitem>
+
+ <listitem>
+ <para>The tab width (see <xref linkend="indent" />)</para>
+ </listitem>
+
+ <listitem>
+ <para>The indent width</para>
+ </listitem>
+
+ <listitem>
+ <para>If soft tabs should be used (see <xref
+ linkend="indent" />)</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="buffer-local">
+ <title>Buffer-Local Properties</title>
+
+ <para>Buffer-local properties provide an alternate way to change editor
+ settings on a per-buffer basis. While changes made in the
+ <guimenuitem>Buffer Options</guimenuitem> dialog box are lost after the
+ buffer is closed, buffer-local properties take effect each time the file
+ is opened, because they are embedded in the file itself.</para>
+
+ <para>When jEdit loads a file, it checks the first and last 10 lines for
+ colon-enclosed name/value pairs. For example, placing the following in a
+ buffer changes the indent width to 4 characters, enables soft tabs, and
+ activates the Perl edit mode:</para>
+
+ <screen>:indentSize=4:noTabs=true:mode=perl:</screen>
+
+ <para>Adding buffer-local properties to a buffer takes effect after the
+ next time the buffer is saved.</para>
+
+ <para>The following table describes each buffer-local property in
+ detail.</para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1.5in" />
+ <colspec colwidth="*"/>
+
+ <thead>
+ <row>
+ <entry>Property name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><varname>collapseFolds</varname></entry>
+
+ <entry>Folds with a level of this or higher will be
+ collapsed when the buffer is opened. If set to zero, all
+ folds will be expanded initially. See <xref
+ linkend="folding" />.</entry>
+ </row>
+
+ <row>
+ <entry><varname>deepIndent</varname></entry>
+
+ <entry>When set to <quote>true</quote>, multiple-line
+ expressions delimited by parentheses are aligned like
+ so: <programlisting>retVal.x = (int)(horizontalOffset
+ + Chunk.offsetToX(info.chunks,
+ offset));</programlisting> With this setting disabled, the
+ text would look like so: <programlisting>retVal.x = (int)(horizontalOffset
+ + Chunk.offsetToX(info.chunks,
+ offset));</programlisting></entry>
+ </row>
+
+ <row>
+ <entry><varname>folding</varname></entry>
+
+ <entry>The fold mode; one of <quote>none</quote>,
+ <quote>indent</quote>, <quote>explicit</quote>, or the
+ name of a plugin folding mode. See <xref
+ linkend="folding" />.</entry>
+ </row>
+
+ <row>
+ <entry><varname>indentSize</varname></entry>
+
+ <entry>The width, in characters, of one indent. Must be
+ an integer greater than 0. See <xref
+ linkend="indent" />.</entry>
+ </row>
+
+ <row>
+ <entry><varname>maxLineLen</varname></entry>
+
+ <entry>The maximum line length and wrap column position.
+ Inserting text beyond this column will automatically
+ insert a line break at the appropriate position. See
+ <xref linkend="entering-text" />.</entry>
+ </row>
+
+ <row>
+ <entry><varname>mode</varname></entry>
+
+ <entry>The default edit mode for the buffer. See <xref
+ linkend="modes" />.</entry>
+ </row>
+
+ <row>
+ <entry><varname>noTabs</varname></entry>
+
+ <entry>If set to <quote>true</quote>, soft tabs
+ (multiple space characters) will be used instead of
+ <quote>real</quote> tabs. See <xref
+ linkend="indent" />.</entry>
+ </row>
+
+ <row>
+ <entry><varname>noWordSep</varname></entry>
+
+ <entry>A list of non-alphanumeric characters that are
+ <emphasis>not</emphasis> to be treated as word
+ separators. Global default is <quote>_</quote>.</entry>
+ </row>
+
+ <row>
+ <entry><varname>tabSize</varname></entry>
+
+ <entry>The tab width. Must be an integer greater than 0.
+ See <xref linkend="indent" />.</entry>
+ </row>
+
+ <row>
+ <entry><varname>wordBreakChars</varname></entry>
+
+ <entry>Characters, in addition to spaces and tabs, at
+ which lines may be split when word wrapping. See <xref
+ linkend="entering-text" />.</entry>
+ </row>
+
+ <row>
+ <entry><varname>wrap</varname></entry>
+
+ <entry>The word wrap mode; one of <quote>none</quote>,
+ <quote>soft</quote>, or <quote>hard</quote>. See <xref
+ linkend="word-wrap" />.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+
+ <section id="global-opts">
+ <title>The Global Options Dialog Box</title>
+
+ <para><guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> displays the global options dialog box. The dialog
+ box is divided into several panes, each pane containing a set of related
+ options. Use the list on the left of the dialog box to switch between
+ panes. Only panes created by jEdit are described here; some plugins add
+ their own option panes, and information about them can be found in the
+ documentation for the plugins in question.</para>
+
+ <section id="general-pane">
+ <title>The General Pane</title>
+
+ <para>The <guibutton>General</guibutton> pane contains various
+ settings, such as the default line separator, the number of recent
+ files to remember, if the buffer list should be sorted, and so
+ on.</para>
+
+ </section>
+
+ <section id="abbrevs-pane">
+ <title>The Abbreviations Pane</title>
+
+ <indexterm>
+ <primary>Abbreviations</primary>
+
+ <secondary>creating and editing</secondary>
+ </indexterm>
+
+ <para>The <guibutton>Abbreviations</guibutton> option pane can be
+ used to enable or disable automatic abbreviation expansion, and to
+ edit currently defined abbreviations.</para>
+
+ <para>The combo box labelled <quote>Abbrev set</quote> selects the
+ abbreviation set to edit. The first entry, <quote>global</quote>,
+ contains abbreviations available in all edit modes. The subsequent
+ entries correspond to each mode's local set of abbreviations.</para>
+
+ <para>To change an abbreviation or its expansion, either
+ double-click the appropriate table entry, or click a table entry and
+ then click the <guibutton>Edit</guibutton> button. This will display
+ a dialog box for modifying the abbreviation.</para>
+
+ <para>The <guibutton>Add</guibutton> button displays a dialog box
+ where you can define a new abbreviation. The
+ <guibutton>Remove</guibutton> button removes the currently selected
+ abbreviation from the list.</para>
+
+ <para>See <xref linkend="positional-params" /> for information about
+ positional parameters in abbreviations.</para>
+ </section>
+
+ <section id="appearance-pane">
+ <title>The Appearance Pane</title>
+
+ <para>The <guibutton>Appearance</guibutton> pane can be used to
+ change the appearance of user interface controls such as buttons,
+ labels and menus. It can also be used to change the docking
+ framework (the dockable window manager). The number of items
+ retained in history text fields can also be set here; see
+ <xref linkend="history" />.</para>
+
+ <para>Note that changes to certain settings such as the Swing look
+ and feel and the docking framework require a restart of jEdit to
+ take effect.</para>
+ </section>
+
+
+ <section id="context-pane">
+ <title>The Context Menu Pane</title>
+
+ <para>The <guibutton>Context Menu</guibutton> option pane edits the
+ text area's right-click context menu. See <xref
+ linkend="views" />.</para>
+ </section>
+
+ <section id="docking-pane">
+ <title>The Docking Pane</title>
+
+ <para>The <guibutton>Docking</guibutton> option pane shows a
+ list of available dockables, and allows you to specify
+ docking locations for each of them. Another way to
+ specify docking locations is to use the popup menus associated with each dockable window. </para>
+
+ <para> It is possible to configure jEdit to automatically load and/or save <emphasis role="bold">Docking Layouts</emphasis> (similar to eclipse perspectives) based on the edit mode of your current b uffer through the checkboxes in this pane. See <xref linkend="docking" />.
+ </para>
+
+
+ </section>
+
+ <section id="editing-pane">
+ <title>The Editing Pane</title>
+
+ <para>The <guibutton>Editing</guibutton> option pane contains
+ settings such as the tab size, syntax highlighting and soft tabs on
+ a global or mode-specific basis. </para>
+
+ <para>Changing options from this optionpane does not change XML mode definition files on disk; it merely writes values to the user properties file which
+ override those set in mode files. To find out how to edit mode files directly, see <xref linkend="writing-modes-part" />. Some of these options can be further overridden on an individual file basis through the use of buffer-local properties. </para>
+
+ <para>The <literal>File name
+ glob</literal> and <literal>First line glob</literal> text
+ fields let you specify a glob pattern that names and first lines of
+ buffers will be matched against to determine the edit mode. See
+ <xref linkend="globs" /> for information about glob patterns.</para>
+
+ <para> The <literal>Extra Word Characters</literal> allows you to set the <literal>noLineSep</literal> buffer property on a mode-wide basis, allowing you to define what is considered part of a word when double-clicking on it in the text area.
+ </para>
+
+ <para> The <literal>Deep Indent</literal> option instructs jEdit to indent subsequent lines so that they line up with the open bracket on the previous line. </para>
+
+
+ </section>
+
+ <section id="encodings-pane">
+ <title>The Encodings Pane</title>
+
+ <para>This option pane is new to jEdit 4.3, and offers international
+ users of jEdit many flexible options for defining how Encodings are
+ handled in jEdit. See <xref linkend="encodings" /> for the
+ basics.</para>
+
+ <para> In previous versions of jEdit, there was very little encoding autodetection, so <guilabel>use autodetection when possible</guilabel> is an option you can switch on or off.
+ </para>
+
+ <para>The <literal>List of Encoding Autodetector Names</literal>
+ can be used to control what encoding detections are used on each
+ file when it is loaded. The order they appear in this list
+ determines the order of detectors that are tried.
+ There are some detectors which are available with jEdit core:
+ <itemizedlist>
+ <listitem><para>
+ <literal>BOM</literal>:
+ detects <ulink url="http://www.unicode.org/faq/utf_bom.html#BOM">
+ Byte Order Mark</ulink>.
+ </para></listitem>
+ <listitem><para>
+ <literal>XML-PI</literal>:
+ detects <ulink url="http://www.w3.org/TR/REC-xml/#charencoding">
+ encoding declaration in XML Processing Instruction</ulink>.
+ </para></listitem>
+ <listitem><para>
+ <literal>html</literal>:
+ detects <ulink url="http://www.w3.org/TR/html4/struct/global.html#edef-META">
+ charset description in HTML META element</ulink>.
+ </para></listitem>
+ <listitem><para>
+ <literal>python</literal>:
+ detects <ulink url="http://docs.python.org/reference/lexical_analysis.html#encoding-declarations">
+ various encoding declaration accepted in Python</ulink>. This
+ accepts encoding declarations for GNU Emacs or Bram Moolenaar's
+ VIM.
+ </para></listitem>
+ <listitem><para>
+ <literal>buffer-local-property</literal>:
+ detects same syntax described at <xref linkend="buffer-local" />
+ for property name "encoding".
+ (The above "python" encoding detector also accepts this syntax.)
+ </para></listitem>
+ </itemizedlist>
+ Others can be defined in plugins as services and added to this
+ space-separated list. See <ulink
+ url="../api/org/gjt/sp/jedit/io/EncodingDetector.html">EncodingDetector</ulink>
+ for details on how to offer additional encoding autodetector.</para>
+
+ <para>The <literal>List of Fallback Encodings</literal> is used when
+ a file fails to open in the default encoding, and the Encoding
+ Autodetectors also fail. The list order here determines the order of
+ encodings that are tried. Each is separated by a space. This is
+ especially handy when doing directory searches through files of
+ different encodings. We suggest using <literal>UTF-8</literal> as
+ either your default or one of the fallback encodings.</para>
+
+ <para>While jEdit allows you to edit files in a variety of different
+ encodings, the average user switches between only 2 or 3. In other
+ parts of jEdit, where the list of encodings is displayed in a
+ combobox (such as the buffer options) or a menu (such as
+ <guimenuitem>File - Reload with Encoding</guimenuitem> submenu) it
+ may be desirable to display only a subset of available encodings,
+ those that are in common local use. The Encodings checkbox list
+ allows the user to select the subset of supported encodings to
+ display in other GUI components that list all of the
+ encodings.</para>
+ </section>
+
+ <section id="gutter-pane">
+ <title>The Gutter Pane</title>
+
+ <para>The <guibutton>Gutter</guibutton> option pane contains
+ settings to customize the appearance of the gutter. Some new options were added
+ to jEdit 4.3, including "show gutter", "minimal number of digits to reserve for line numbers",
+ and "fold style". See <xref linkend="overview" />.</para>
+ </section>
+
+ <section id="mouse-pane">
+ <title>The Mouse Pane</title>
+
+ <para>The <guibutton>Mouse</guibutton> option pane contains settings
+ for toggling drag and drop of text, as well as gutter mouse click
+ behavior.</para>
+
+ <para> The only option that may not be self-explanatory is the <emphasis role="bold">Double-Click drag joins non-alphanumeric characters</emphasis>. This option means that double-click will select a region that includes the non-alphabetical characters, as defined for the current mode. The actual set of characters can be defined for an indiviual file via buffer-local properties (<literal>noWordSep</literal>) or on a mode-wide basis from the Editing option pane (<literal>Extra Word Characters</literal>). </para>
+
+ </section>
+
+ <section id="printing-pane">
+ <title>The Printing Pane</title>
+
+ <para>The <guibutton>Printing</guibutton> option pane contains
+ settings to control the appearance of printed output. Workarounds
+ that might be needed for your Java version to print correctly can
+ also be enabled here. See <xref linkend="printing" />.</para>
+ </section>
+
+ <section id="pluginmgr-pane">
+ <title>The Plugin Manager Pane</title>
+
+ <para>The <guibutton>Plugin Manager</guibutton> pane contains a
+ chooser for the desired download mirror, as well as various settings
+ such as the directory where plugins are to be installed. In addition, you can set the time in minutes that the pluginlist can be cached from jedit.org, helping to reduce the server load. See <xref
+ linkend="using-plugins" />.</para>
+ </section>
+
+ <section id="firewall-pane">
+ <title>The Proxy Servers Pane</title>
+
+ <para>The <guibutton>Proxy Servers</guibutton> option pane lets you
+ specify HTTP and SOCKS proxy servers to use when jEdit makes network
+ connections, for example when downloading plugins.</para>
+ </section>
+
+ <section id="autosave-backups-pane">
+ <title>The Saving and Backup Pane</title>
+
+ <para>The <guibutton>Saving and Backup</guibutton> option pane contains
+ settings for the autosave and backup features. See <xref
+ linkend="autosave" /> and <xref linkend="backups" />.</para>
+ </section>
+
+ <section id="shortcuts-pane">
+ <title>The Shortcuts Pane</title>
+
+ <para>The <guibutton>Shortcuts</guibutton> option pane associates
+ keyboard shortcuts with commands. Each command can have up to two
+ shortcuts associated with it.</para>
+
+ <para>The combo box at the top of the option pane selects the
+ command set to edit. Command sets include the set of all built-in
+ commands, the commands of each plugin, and the set of macros.</para>
+
+ <para>To change a shortcut, click the appropriate table entry and
+ press the keys you want associated with that command in the
+ resulting dialog box. The dialog box will warn you if the shortcut
+ is already assigned.</para>
+
+ <bridgehead> 2-key shortcut prefixes </bridgehead>
+
+ <para> Some shortcuts, such as C+e, C+m, and C+r, are prefixes for two-keystroke shortcuts. Another keystroke may be used as a prefix in a 2-key shortcut, so for example, C+x can be redefined as a prefix to make it more emacs-like, by mapping any other action to a C+x prefixed shortcut.</para>
+
+ <para> Conversely, emacs users will notice at first that C+e can not be mapped as a single key shortcut to go to the end of the line, unless all of the other actions that contain C+e prefixed shortcuts are remapped to other shortcuts first. After that, C+e can be bound to end-of-line. </para>
+
+ <para> The default shortcuts can be found in <literal>jedit_keys.props</literal>. </para>
+
+ </section>
+
+ <section id="status-bar-pane">
+ <title>The Status Bar Pane</title>
+
+ <para>The <guibutton>Status Bar</guibutton>, its API, and its coprresponding option pane were redesigned in jEdit 4.3. Now, the pane contains settings to customize which widgets are in the status bar, their order, and what separators exist between them. Or, you can disable it completely, for regular and/or plain views. See <xref linkend="status-bar" />.</para>
+
+ <para> From the <literal>Options</literal> tab, you can
+ customize information about the caret display in the lower
+ left corner. </para>
+
+ <para> Selecting the <literal>Widgets</literal> tab of this option pane shows you what widgets on the right, and their order. You can add or remove widgets and separators/labels here. </para>
+
+ </section>
+
+
+ <section id="syntax-hilite-pane">
+ <title>The Syntax Highlighting Pane</title>
+
+ <para>The <guibutton>Syntax Highlighting</guibutton> pane can be
+ used to customize the fonts and colors for syntax highlighting. See
+ <xref linkend="syntax-hilite" />.</para>
+ </section>
+
+ <section id="text-area-pane">
+ <title>The Text Area Pane</title>
+
+ <para>The <guibutton>Text Area</guibutton> pane contains settings to
+ customize the appearance of the text area. See <xref
+ linkend="overview" />.</para>
+ </section>
+
+ <section id="toolbar-pane">
+ <title>The Tool Bar Pane</title>
+
+ <para>The <guibutton>Tool Bar</guibutton> option pane lets you edit
+ the tool bar, or disable it completely. See <xref
+ linkend="views" />.</para>
+ </section>
+
+ <section id="view-pane">
+ <title>The View Pane</title>
+
+ <para>The <guibutton>View</guibutton> option pane lets you change
+ various settings related to the editor window's appearance,
+ including the arrangement of dockable windows, and if the search bar
+ and buffer switcher should be visible. See <xref
+ linkend="views" />.</para>
+ </section>
+
+ <section id="vfs-browser-pane">
+ <title>The File System Browser Panes</title>
+
+ <para>The <guibutton>File System Browser</guibutton> group contains
+ two option panes, <guibutton>General</guibutton> and
+ <guibutton>Colors</guibutton>. The former contains various file
+ system browser settings. The latter configures glob patterns used
+ for coloring the file list. See <xref linkend="vfs-browser" /> for
+ more information.</para>
+ </section>
+ </section>
+
+ <section id="settings-directory">
+ <title>The jEdit Settings Directory</title>
+
+ <para>jEdit stores settings, macros, and plugins as files inside the
+ <firstterm>settings directory</firstterm>. In most cases, editing these
+ files by hand is not necessary, since graphical tools and editor
+ commands can do the job. However, being familiar with the structure of
+ the settings directory still comes in handy in certain situations, for
+ example when you want to copy jEdit settings between computers.</para>
+
+ <para>The location of the settings directory is system-specific; it is
+ printed to the activity log
+ (<guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>Activity
+ Log</guimenuitem>). For example:</para>
+
+ <screen>[message] jEdit: Settings directory is /home/slava/.jedit</screen>
+
+ <para>Specifying the <userinput>-settings</userinput> switch on the
+ command line instructs jEdit to store settings in a directory other than
+ the default. For example, the following command will instruct jEdit to
+ store all settings in the <filename>jedit</filename> subdirectory of the
+ <filename>C:</filename> drive:</para>
+
+ <screen><prompt>C:\jedit></prompt> <userinput>jedit -settings=C:\jedit</userinput></screen>
+
+ <para>The <userinput>-nosettings</userinput> switch will force jEdit to
+ not look for or create a settings directory; default settings will be
+ used instead.</para>
+
+ <!-- para>
+ If you are using <application>jEditLauncher</application>
+ to start jEdit on Windows, these parameters cannot be specified on the
+ MS-DOS prompt command line when starting jEdit; they must be set as described
+ in <xref linkend="launcher-starting" />.
+ </para -->
+
+ <para>jEdit creates the following files and directories inside the
+ settings directory; plugins may add more:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><filename>abbrevs</filename> - a plain text file which
+ stores all defined abbreviations. See <xref
+ linkend="abbrevs" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>activity.log</filename> - a plain text file
+ which contains the full activity log. See <xref
+ linkend="activity-log" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>history</filename> - a plain text file which
+ stores history lists, used by history text fields and the
+ <guimenu>Edit</guimenu>><guimenuitem>Paste
+ Previous</guimenuitem> command. See <xref
+ linkend="text-transfer" /> and <xref
+ linkend="history" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>jars</filename> - this directory contains
+ plugins. See <xref linkend="using-plugins" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>jars-cache</filename> - this directory contains
+ plugin cache files which decrease the time to start jEdit. They
+ are automatically updated when plugins are installed or
+ updated.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>killring.xml</filename> - stores recently
+ deleted text. See <xref linkend="text-transfer" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>macros</filename> - this directory contains
+ macros. See <xref linkend="using-macros" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>modes</filename> - this directory contains
+ custom edit modes. See <xref
+ linkend="writing-modes-part" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>perspective.xml</filename> - an XML file that
+ stores the list of open buffers and views used to maintain
+ editor state between sessions.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>PluginManager.download</filename> - this
+ directory is usually empty. It only contains files while the
+ plugin manager is downloading a plugin. For information about
+ the plugin manager, see <xref linkend="using-plugins" />.</para>
+ </listitem>
+ <listitem><para>
+ <filename>pluginMgr-Cached.xml.gz</filename> -
+ this contains a cached copy of the last XML plugin list downloaded from plugin central. If you delete this file, a new one will be created next time you try to install a plugin via Plugin Manager. </para>
+ </listitem>
+
+ <listitem>
+ <para><filename>printspec</filename> - a binary file that stores
+ printing settings when running under Java 2 version 1.4.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>properties</filename> - a plain text file that
+ stores the majority of jEdit's and its plugins settings. For
+ more information see <xref linkend="propertiesfile" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>recent.xml</filename> - an XML file which stores
+ the list of recently opened files. jEdit remembers the caret
+ position and character encoding of each recent file, and
+ automatically restores those values when one of the files is
+ opened.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>registers.xml</filename> - an XML file that
+ stores register contents. See <xref linkend="registers" /> for
+ more information about registers.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>server</filename> - a plain text file that only
+ exists while jEdit is running. The edit server's port number and
+ authorization key is stored here. See <xref
+ linkend="starting" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>settings-backup</filename> - this directory
+ contains numbered backups of all automatically-written settings
+ files.</para>
+ </listitem>
+ </itemizedlist>
+
+ <section id="propertiesfile">
+ <title>The jEdit properties file</title>
+
+ <para>The jEdit <literal>properties</literal> file uses the Java
+ properties syntax to store key/value pairs. All of the values are
+ stored as strings, but are interpreted as other types (such as
+ integer or boolean) by plugins at runtime.</para>
+
+ <para>Editing and saving this file while jEdit is running means that
+ until you restart jEdit again, all other changed settings will be
+ lost.</para>
+ </section>
+ </section>
+</chapter>
diff --git a/jEdit/doc/users-guide/dialog-macro.xml b/jEdit/doc/users-guide/dialog-macro.xml
index 9ed63ae..70878c7 100644
--- a/jEdit/doc/users-guide/dialog-macro.xml
+++ b/jEdit/doc/users-guide/dialog-macro.xml
@@ -1,646 +1,646 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="dialog-macro">
- <title>A Dialog-Based Macro</title>
-
- <!-- jEdit 4.0 Macro Guide, (C) 2001, 2002 John Gellene -->
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=1:noTabs=yes:maxLineLen=72:tabSize=2: -->
-
- <!-- :xml.root=users-guide.xml: -->
-
- <!-- This file contains an extended discussion of a -->
-
- <!-- dialog-based macro example "Add_Prefix_and_Suffix.bsh" -->
-
- <!-- $Id: dialog-macro.xml 16181 2009-09-08 19:26:57Z ezust $ -->
-
- <para>Now we will look at a more complicated macro which will demonstrate
- some useful techniques and BeanShell features.</para>
-
- <section id="dialog-macro-intro">
- <title>Use of the Macro</title>
-
- <para>Our new example adds prefix and suffix text to a series of
- selected lines. This macro can be used to reduce typing for a series of
- text items that must be preceded and following by identical text. In
- Java, for example, if we are interested in making a series of calls to
- <function>StringBuffer.append()</function> to construct a lengthy,
- formatted string, we could type the parameter for each call on
- successive lines as follows:</para>
-
- <screen>profileString_1
-secretThing.toString()
-name
-address
-addressSupp
-city
-<quote>state/province</quote>
-country</screen>
-
- <para>Our macro would ask for input for the common <quote>prefix</quote>
- and <quote>suffix</quote> to be applied to each line; in this case, the
- prefix is <userinput>ourStringBuffer.append(</userinput> and the suffix
- is <userinput>);</userinput>. After selecting these lines and running
- the macro, the resulting text would look like this:</para>
-
- <screen>ourStringBuffer.append(profileString_1);
-ourStringBuffer.append(secretThing.toString());
-ourStringBuffer.append(name);
-ourStringBuffer.append(address);
-ourStringBuffer.append(addressSupp);
-ourStringBuffer.append(city);
-ourStringBuffer.append(<quote>state/province</quote>);
-ourStringBuffer.append(country);</screen>
- </section>
-
- <section id="add-prefix-and-suffix">
- <title>Listing of the Macro</title>
-
- <para>The macro script follows. You can find it in the jEdit
- distribution in the <filename>Text</filename> subdirectory of the
- <filename>macros</filename> directory. You can also try it out by
- invoking
- <guimenu>Macros</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Add
- Prefix and Suffix</guimenuitem>.</para>
-
- <informalexample>
- <!-- <title>Add_Prefix_and_Suffix.bsh</title> -->
-
- <programlisting>// beginning of Add_Prefix_and_Suffix.bsh
-
-<anchor id="imports" />// import statement (see <xref linkend="explain-imports" />)
-import javax.swing.border.*;
-
-<anchor id="main-routine" />// main routine
-void prefixSuffixDialog()
-{
-<anchor id="create-dialog" /> // create dialog object (see <xref
- linkend="explain-create-dialog" />)
- title = <quote>Add prefix and suffix to selected lines</quote>;
- dialog = new JDialog(view, title, false);
- content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12, 12, 12, 12));
- content.setPreferredSize(new Dimension(320, 160));
- dialog.setContentPane(content);
-
-<anchor id="fields-panel" /> // add the text fields (see <xref
- linkend="explain-fields-panel" />)
- fieldPanel = new JPanel(new GridLayout(4, 1, 0, 6));
- prefixField = new HistoryTextField(<quote>macro.add-prefix</quote>);
- prefixLabel = new JLabel(<quote>Prefix to add:</quote>);
- suffixField = new HistoryTextField(<quote>macro.add-suffix</quote>);
- suffixLabel = new JLabel(<quote>Suffix to add:</quote>);
- fieldPanel.add(prefixLabel);
- fieldPanel.add(prefixField);
- fieldPanel.add(suffixLabel);
- fieldPanel.add(suffixField);
- content.add(fieldPanel, <quote>Center</quote>);
-
-<anchor id="button-panel" /> // add a panel containing the buttons (see <xref
- linkend="explain-button-panel" />)
- buttonPanel = new JPanel();
- buttonPanel.setLayout(new BoxLayout(buttonPanel,
- BoxLayout.X_AXIS));
- buttonPanel.setBorder(new EmptyBorder(12, 50, 0, 50));
- buttonPanel.add(Box.createGlue());
- ok = new JButton(<quote>OK</quote>);
- cancel = new JButton(<quote>Cancel</quote>);
- ok.setPreferredSize(cancel.getPreferredSize());
- dialog.getRootPane().setDefaultButton(ok);
- buttonPanel.add(ok);
- buttonPanel.add(Box.createHorizontalStrut(6));
- buttonPanel.add(cancel);
- buttonPanel.add(Box.createGlue());
- content.add(buttonPanel, <quote>South</quote>);
-
-<anchor id="add-listeners" /> // register this method as an ActionListener for
- // the buttons and text fields (see <xref linkend="explain-add-listeners" />)
- ok.addActionListener(this);
- cancel.addActionListener(this);
- prefixField.addActionListener(this);
- suffixField.addActionListener(this);
-
-<anchor id="set-visible" /> // locate the dialog in the center of the
- // editing pane and make it visible (see <xref linkend="explain-set-visible" />)
- dialog.pack();
- dialog.setLocationRelativeTo(view);
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- dialog.setVisible(true);
-
-<anchor id="action-listener" /> // this method will be called when a button is clicked
- // or when ENTER is pressed (see <xref linkend="explain-action-listener" />)
- void actionPerformed(e)
- {
- if(e.getSource() != cancel)
- {
- processText();
- }
- dialog.dispose();
- }
-
-<anchor id="process-text" /> // this is where the work gets done to insert
- // the prefix and suffix (see <xref linkend="explain-process-text" />)
- void processText()
- {
- prefix = prefixField.getText();
- suffix = suffixField.getText();
- if(prefix.length() == 0 && suffix.length() == 0)
- return;
- prefixField.addCurrentToHistory();
- suffixField.addCurrentToHistory();
-
-<anchor id="jEdit-calls" /> // text manipulation begins here using calls
- // to jEdit methods (see <xref linkend="explain-jedit-calls" />)
- buffer.beginCompoundEdit();
- selectedLines = textArea.getSelectedLines();
- for(i = 0; i < selectedLines.length; ++i)
- {
- offsetBOL = textArea.getLineStartOffset(
- selectedLines[i]);
- textArea.setCaretPosition(offsetBOL);
- textArea.goToStartOfWhiteSpace(false);
- textArea.goToEndOfWhiteSpace(true);
- text = textArea.getSelectedText();
- if(text == null) text = "";
- textArea.setSelectedText(prefix + text + suffix);
- }
- buffer.endCompoundEdit();
- }
-}
-
-<anchor id="main" />// this single line of code is the script's main routine
-// (see <xref linkend="explain-main" />)
-prefixSuffixDialog();
-
-// end of Add_Prefix_and_Suffix.bsh</programlisting>
- </informalexample>
- </section>
-
- <section id="macro-analysis">
- <title>Analysis of the Macro</title>
-
- <section id="explain-imports">
- <title>Import Statements</title>
-
- <informalexample>
- <programlisting>// import statement
-import javax.swing.border.*;</programlisting>
- </informalexample>
-
- <para>This macro makes use of classes in the
- <literal>javax.swing.border</literal> package, which is not
- automatically imported. As we mentioned previously (see <xref
- linkend="first-example" />), jEdit's implementation of BeanShell
- causes a number of classes to be automatically imported. Classes
- that are not automatically imported must be identified by a full
- qualified name or be the subject of an <function>import</function>
- statement.</para>
- </section>
-
- <section id="explain-create-dialog">
- <title>Create the Dialog</title>
-
- <informalexample>
- <programlisting>// create dialog object
-title = <quote>Add prefix and suffix to selected lines</quote>;
-dialog = new JDialog(view, title, false);
-content = new JPanel(new BorderLayout());
-content.setBorder(new EmptyBorder(12, 12, 12, 12));
-dialog.setContentPane(content);</programlisting>
- </informalexample>
-
- <para>To get input for the macro, we need a dialog that provides for
- input of the prefix and suffix strings, an <guibutton>OK</guibutton>
- button to perform text insertion, and a
- <guibutton>Cancel</guibutton> button in case we change our mind. We
- have decided to make the dialog window non-modal. This will allow us
- to move around in the text buffer to find things we may need
- (including text to cut and paste) while the macro is running and the
- dialog is visible.</para>
-
- <para>The Java object we need is a <classname>JDialog</classname>
- object from the Swing package. To construct one, we use the
- <function>new</function> keyword and call a
- <glossterm>constructor</glossterm> function. The constructor we use
- takes three parameters: the owner of the new dialog, the title to be
- displayed in the dialog frame, and a <classname>boolean</classname>
- parameter (<constant>true</constant> or <constant>false</constant>)
- that specifies whether the dialog will be modal or non-modal. We
- define the variable <varname>title</varname> using a string literal,
- then use it immediately in the <classname>JDialog</classname>
- constructor.</para>
-
- <para>A <classname>JDialog</classname> object is a window containing
- a single object called a <glossterm>content pane</glossterm>. The
- content pane in turn contains the various visible components of the
- dialog. A <classname>JDialog</classname> creates an empty content
- pane for itself as during its construction. However, to control the
- dialog's appearance as much as possible, we will separately create
- our own content pane and attach it to the
- <classname>JDialog</classname>. We do this by creating a
- <classname>JPanel</classname> object. A
- <classname>JPanel</classname> is a lightweight container for other
- components that can be set to a given size and color. It also
- contains a <glossterm>layout</glossterm> scheme for arranging the
- size and position of its components. Here we are constructing a
- <classname>JPanel</classname> as a content pane with a
- <classname>BorderLayout</classname>. We put a
- <classname>EmptyBorder</classname> inside it to serve as a margin
- between the edge of the window and the components inside. We then
- attach the <classname>JPanel</classname> as the dialog's content
- pane, replacing the dialog's home-grown version.</para>
-
- <para>A <classname>BorderLayout</classname> is one of the simpler
- layout schemes available for container objects like
- <classname>JPanel</classname>. A <classname>BorderLayout</classname>
- divides the container into five sections: <quote>North</quote>,
- <quote>South</quote>, <quote>East</quote>, <quote>West</quote> and
- <quote>Center</quote>. Components are added to the layout using the
- container's <function>add</function> method, specifying the
- component to be added and the section to which it is assigned.
- Building a component like our dialog window involves building a set
- of nested containers and specifying the location of each of their
- member components. We have taken the first step by creating a
- <classname>JPanel</classname> as the dialog's content pane.</para>
- </section>
-
- <section id="explain-fields-panel">
- <title>Create the Text Fields</title>
-
- <informalexample>
- <programlisting>// add the text fields
-fieldPanel = new JPanel(new GridLayout(4, 1, 0, 6));
-prefixField = new HistoryTextField("macro.add-prefix");
-prefixLabel = new JLabel(<quote>Prefix to add</quote>:);
-suffixField = new HistoryTextField(<quote>macro.add-suffix</quote>);
-suffixLabel = new JLabel(<quote>Suffix to add:</quote>);
-fieldPanel.add(prefixLabel);
-fieldPanel.add(prefixField);
-fieldPanel.add(suffixLabel);
-fieldPanel.add(suffixField);
-content.add(fieldPanel, <quote>Center</quote>);</programlisting>
- </informalexample>
-
- <para>Next we shall create a smaller panel containing two fields for
- entering the prefix and suffix text and two labels identifying the
- input fields.</para>
-
- <para>For the text fields, we will use jEdit's <ulink
- url="../api/org/gjt/sp/jedit/gui/HistoryTextField.html">HistoryTextField</ulink>
- class. It is derived from the Java Swing class
- <classname>JTextField</classname>. This class offers the enhancement
- of a stored list of prior values used as text input. When the
- component has input focus, the up and down keys scroll through the
- prior values for the variable. <!-- The prior values are stored in a file named
- <filename>history</filename> located in the directory in which jEdit stores
- various user data. --></para>
-
- <para>To create the <ulink
- url="../api/org/gjt/sp/jedit/gui/HistoryTextField.html">HistoryTextField</ulink>
- objects we use a constructor method that takes a single parameter:
- the name of the tag under which history values will be stored. Here
- we choose names that are not likely to conflict with existing jEdit
- history items.</para>
-
- <para>The labels that accompany the text fields are
- <classname>JLabel</classname> objects from the Java Swing package.
- The constructor we use for both labels takes the label text as a
- single <classname>String</classname> parameter.</para>
-
- <para>We wish to arrange these four components from top to bottom,
- one after the other. To achieve that, we use a
- <classname>JPanel</classname> container object named
- <varname>fieldPanel</varname> that will be nested inside the
- dialog's content pane that we have already created. In the
- constructor for <varname>fieldPanel</varname>, we assign a new
- <classname>GridLayout</classname> with the indicated parameters:
- four rows, one column, zero spacing between columns (a meaningless
- element of a grid with only one column, but nevertheless a required
- parameter) and spacing of six pixels between rows. The spacing
- between rows spreads out the four <quote>grid</quote> elements.
- After the components, the panel and the layout are specified, the
- components are added to <varname>fieldPanel</varname> top to bottom,
- one <quote>grid cell</quote> at a time. Finally, the complete
- <varname>fieldPanel</varname> is added to the dialog's content pane
- to occupy the <quote>Center</quote> section of the content
- pane.</para>
- </section>
-
- <section id="explain-button-panel">
- <title>Create the Buttons</title>
-
- <informalexample>
- <programlisting>// add the buttons
-buttonPanel = new JPanel();
-buttonPanel.setLayout(new BoxLayout(buttonPanel,
- BoxLayout.X_AXIS));
-buttonPanel.setBorder(new EmptyBorder(12, 50, 0, 50));
-buttonPanel.add(Box.createGlue());
-ok = new JButton(<quote>OK</quote>);
-cancel = new JButton(<quote>Cancel</quote>);
-ok.setPreferredSize(cancel.getPreferredSize());
-dialog.getRootPane().setDefaultButton(ok);
-buttonPanel.add(ok);
-buttonPanel.add(Box.createHorizontalStrut(6));
-buttonPanel.add(cancel);
-buttonPanel.add(Box.createGlue());
-content.add(buttonPanel, <quote>South</quote>);</programlisting>
- </informalexample>
-
- <para>To create the dialog's buttons, we follow repeat the
- <quote>nested container</quote> pattern we used in creating the text
- fields. First, we create a new, nested panel. This time we use a
- <classname>BoxLayout</classname> that places components either in a
- single row or column, depending on the parameter passed to its
- constructor. This layout object is more flexible than a
- <classname>GridLayout</classname> in that variable spacing between
- elements can be specified easily. We put an
- <classname>EmptyBorder</classname> in the new panel to set margins
- for placing the buttons. Then we create the buttons, using a
- <classname>JButton</classname> constructor that specifies the button
- text. After setting the size of the <guilabel>OK</guilabel> button
- to equal the size of the <guilabel>Cancel</guilabel> button, we
- designate the <guilabel>OK</guilabel> button as the default button
- in the dialog. This causes the <guilabel>OK</guilabel> button to be
- outlined when the dialog if first displayed. Finally, we place the
- buttons side by side with a 6 pixel gap between them (for aesthetic
- reasons), and place the completed <varname>buttonPanel</varname> in
- the <quote>South</quote> section of the dialog's content
- pane.</para>
- </section>
-
- <section id="explain-add-listeners">
- <title>Register the Action Listeners</title>
-
- <informalexample>
- <programlisting>// register this method as an ActionListener for
-// the buttons and text fields
-ok.addActionListener(this);
-cancel.addActionListener(this);
-prefixField.addActionListener(this);
-suffixField.addActionListener(this);</programlisting>
- </informalexample>
-
- <para>In order to specify the action to be taken upon clicking a
- button or pressing the <keycap>Enter</keycap> key, we must register
- an <classname>ActionListener</classname> for each of the four active
- components of the dialog - the two <ulink
- url="../api/org/gjt/sp/jedit/HistoryTextField.html">HistoryTextField</ulink>
- components and the two buttons. In Java, an
- <classname>ActionListener</classname> is an
- <glossterm>interface</glossterm> - an abstract specification for a
- derived class to implement. The
- <classname>ActionListener</classname> interface contains a single
- method to be implemented:</para>
-
- <funcsynopsis>
- <funcprototype>
- <funcdef>public void
- <function>actionPerformed</function></funcdef>
-
- <paramdef>ActionEvent <parameter>e</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
-
- <para>BeanShell does not permit a script to create derived classes.
- However, BeanShell offers a useful substitute: a method can be used
- as a scripted object that can include nested methods implementing a
- number of Java interfaces. The method
- <function>prefixSuffixDialog()</function> that we are writing can
- thus be treated as an <classname>ActionListener</classname> object.
- To accomplish this, we call <function>addActionListener()</function>
- on each of the four components specifying <varname>this</varname> as
- the <classname>ActionListener</classname>. We still need to
- implement the interface. We will do that shortly.</para>
- </section>
-
- <section id="explain-set-visible">
- <title>Make the Dialog Visible</title>
-
- <informalexample>
- <programlisting>// locate the dialog in the center of the
-// editing pane and make it visible
-dialog.pack();
-dialog.setLocationRelativeTo(view);
-dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
-dialog.setVisible(true);</programlisting>
- </informalexample>
-
- <para>Here we do three things. First, we activate all the layout
- routines we have established by calling the
- <function>pack()</function> method for the dialog as the top-level
- window. Next we center the dialog's position in the active jEdit
- <varname>view</varname> by calling
- <function>setLocationRelativeTo()</function> on the dialog. We also
- call the <function>setDefaultCloseOperation()</function> function to
- specify that the dialog box should be immediately disposed if the
- user clicks the close box. Finally, we activate the dialog by
- calling <function>setVisible()</function>with the state parameter
- set to <constant>true</constant>.</para>
-
- <para>At this point we have a decent looking dialog window that
- doesn't do anything. Without more code, it will not respond to user
- input and will not accomplish any text manipulation. The remainder
- of the script deals with these two requirements.</para>
- </section>
-
- <section id="explain-action-listener">
- <title>The Action Listener</title>
-
- <informalexample>
- <programlisting>// this method will be called when a button is clicked
-// or when ENTER is pressed
-void actionPerformed(e)
-{
- if(e.getSource() != cancel)
- {
- processText();
- }
- dialog.dispose();
-}</programlisting>
- </informalexample>
-
- <para>The method <function>actionPerformed()</function> nested
- inside <function>prefixSuffixDialog()</function> implements the
- implicit <classname>ActionListener</classname> interface. It looks
- at the source of the <classname>ActionEvent</classname>, determined
- by a call to <function>getSource()</function>. What we do with this
- return value is straightforward: if the source is not the
- <guibutton>Cancel</guibutton> button, we call the
- <function>processText()</function> method to insert the prefix and
- suffix text. Then the dialog is closed by calling its
- <function>dispose()</function> method.</para>
-
- <para>The ability to implement interfaces like
- <classname>ActionListener</classname> inside a BeanShell script is
- one of the more powerful features of the BeanShell package. this
- technique is discussed in the next chapter; see <xref
- linkend="macro-tips-BeanShell-class" />.</para>
- </section>
-
- <section id="explain-process-text">
- <title>Get the User's Input</title>
-
- <informalexample>
- <programlisting>// this is where the work gets done to insert
-// the prefix and suffix
-void processText()
-{
- prefix = prefixField.getText();
- suffix = suffixField.getText();
- if(prefix.length() == 0 && suffix.length() == 0)
- return;
- prefixField.addCurrentToHistory();
- suffixField.addCurrentToHistory();</programlisting>
- </informalexample>
-
- <para>The method <function>processText()</function> does the work of
- our macro. First we obtain the input from the two text fields with a
- call to their <function>getText()</function> methods. If they are
- both empty, there is nothing to do, so the method returns. If there
- is input, any text in the field is added to that field's stored
- history list by calling <function>addCurrentToHistory()</function>.
- We do not need to test the <varname>prefixField</varname> or
- <varname>suffixField</varname> controls for
- <constant>null</constant> or empty values because
- <function>addCurrentToHistory()</function> does that
- internally.</para>
- </section>
-
- <section id="explain-jedit-calls">
- <title>Call jEdit Methods to Manipulate Text</title>
-
- <informalexample>
- <programlisting> // text manipulation begins here using calls
- // to jEdit methods
- buffer.beginCompoundEdit();
- selectedLines = textArea.getSelectedLines();
- for(i = 0; i < selectedLines.length; ++i)
- {
- offsetBOL = textArea.getLineStartOffset(
- selectedLines[i]);
- textArea.setCaretPosition(offsetBOL);
- textArea.goToStartOfWhiteSpace(false);
- textArea.goToEndOfWhiteSpace(true);
- text = textArea.getSelectedText();
- if(text == null) text = "";
- textArea.setSelectedText(prefix + text + suffix);
- }
- buffer.endCompoundEdit();
-}</programlisting>
- </informalexample>
-
- <para>The text manipulation routine loops through each selected line
- in the text buffer. We get the loop parameters by calling
- <function>textArea.getSelectedLines()</function>, which returns an
- array consisting of the line numbers of every selected line. The
- array includes the number of the current line, whether or not it is
- selected, and the line numbers are sorted in increasing order. We
- iterate through each member of the <varname>selectedLines</varname>
- array, which represents the number of a selected line, and apply the
- following routine:</para>
-
- <itemizedlist>
- <listitem>
- <para>Get the buffer position of the start of the line
- (expressed as a zero-based index from the start of the
- buffer) by calling
- <function>textArea.getLineStartOffset(selectedLines[i])</function>;</para>
- </listitem>
-
- <listitem>
- <para>Move the caret to that position by calling
- <function>textArea.setCaretPosition()</function>;</para>
- </listitem>
-
- <listitem>
- <para>Find the first and last non-whitespace characters on
- the line by calling
- <function>textArea.goToStartOfWhiteSpace()</function> and
- <function>textArea.goToEndOfWhiteSpace()</function>;</para>
-
- <para>The <function>goTo...</function> methods in <ulink
- url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
- take a single parameter which tells jEdit whether the text
- between the current caret position and the desired position
- should be selected. Here, we call
- <function>textArea.goToStartOfWhiteSpace(false)</function>
- so that no text is selected, then call
- <function>textArea.goToEndOfWhiteSpace(true)</function> so
- that all of the text between the beginning and ending
- whitespace is selected.</para>
- </listitem>
-
- <listitem>
- <para>Retrieve the selected text by storing the return value
- of <function>textArea.getSelectedText()</function> in a new
- variable <function>text</function>.</para>
-
- <para>If the line is empty,
- <function>getSelectedText()</function> will return
- <constant>null</constant>. In that case, we assign an empty
- string to <varname>text</varname> to avoid calling methods
- on a null object.</para>
- </listitem>
-
- <listitem>
- <para>Change the selected text to <varname>prefix + text +
- suffix</varname> by calling
- <function>textArea.setSelectedText()</function>. If there is
- no selected text (for example, if the line is empty), the
- prefix and suffix will be inserted without any intervening
- characters.</para>
- </listitem>
- </itemizedlist>
-
- <sidebar>
- <title>Compound edits</title>
-
- <para>Note the <function>beginCompoundEdit()</function> and
- <function>endCompoundEdit()</function> calls. These ensure that
- all edits performed between the two calls can be undone in one
- step. Normally, jEdit automatically wraps a macro call in these
- methods; however if the macro shows a non-modal dialog box, as
- far as jEdit is concerned the macro has finished executing by
- the time the dialog is shown, since control returns to the event
- dispatch thread.</para>
-
- <para>If you do not understand this, don't worry; just keep it
- in mind if your macro needs to show a non-modal dialog box for
- some reason; Most macros won't.</para>
- </sidebar>
-
- <!-- <para>
- The loop routine is bracketed by calls to
- <function>buffer.beginCompoundEdit()</function> and
- <function>buffer.endCompoundEdit()</function>. These methods
- modify the way in which jEdit's undo facility performs. Text
- operations done between calls to these functions will be
- treated as a single operation for undo purposes. A single undo
- command issued immediately after the macro completes will thus remove
- the prefix and suffix text from all of the previously selected lines.
- </para> -->
- </section>
-
- <section id="explain-main">
- <title>The Main Routine</title>
-
- <informalexample>
- <programlisting>// this single line of code is the script's main routine
-prefixSuffixDialog();</programlisting>
- </informalexample>
-
- <para>The call to <function>prefixSuffixDialog()</function>is the
- only line in the macro that is not inside an enclosing block.
- BeanShell treats such code as a top-level <function>main</function>
- method and begins execution with it.</para>
-
- <para>Our analysis of <filename>Add_Prefix_and_Suffix.bsh</filename>
- is now complete. In the next section, we look at other ways in which
- a macro can obtain user input, as well as other macro writing
- techniques.</para>
- </section>
- </section>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="dialog-macro">
+ <title>A Dialog-Based Macro</title>
+
+ <!-- jEdit 4.0 Macro Guide, (C) 2001, 2002 John Gellene -->
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=1:noTabs=yes:maxLineLen=72:tabSize=2: -->
+
+ <!-- :xml.root=users-guide.xml: -->
+
+ <!-- This file contains an extended discussion of a -->
+
+ <!-- dialog-based macro example "Add_Prefix_and_Suffix.bsh" -->
+
+ <!-- $Id: dialog-macro.xml 16181 2009-09-08 19:26:57Z ezust $ -->
+
+ <para>Now we will look at a more complicated macro which will demonstrate
+ some useful techniques and BeanShell features.</para>
+
+ <section id="dialog-macro-intro">
+ <title>Use of the Macro</title>
+
+ <para>Our new example adds prefix and suffix text to a series of
+ selected lines. This macro can be used to reduce typing for a series of
+ text items that must be preceded and following by identical text. In
+ Java, for example, if we are interested in making a series of calls to
+ <function>StringBuffer.append()</function> to construct a lengthy,
+ formatted string, we could type the parameter for each call on
+ successive lines as follows:</para>
+
+ <screen>profileString_1
+secretThing.toString()
+name
+address
+addressSupp
+city
+<quote>state/province</quote>
+country</screen>
+
+ <para>Our macro would ask for input for the common <quote>prefix</quote>
+ and <quote>suffix</quote> to be applied to each line; in this case, the
+ prefix is <userinput>ourStringBuffer.append(</userinput> and the suffix
+ is <userinput>);</userinput>. After selecting these lines and running
+ the macro, the resulting text would look like this:</para>
+
+ <screen>ourStringBuffer.append(profileString_1);
+ourStringBuffer.append(secretThing.toString());
+ourStringBuffer.append(name);
+ourStringBuffer.append(address);
+ourStringBuffer.append(addressSupp);
+ourStringBuffer.append(city);
+ourStringBuffer.append(<quote>state/province</quote>);
+ourStringBuffer.append(country);</screen>
+ </section>
+
+ <section id="add-prefix-and-suffix">
+ <title>Listing of the Macro</title>
+
+ <para>The macro script follows. You can find it in the jEdit
+ distribution in the <filename>Text</filename> subdirectory of the
+ <filename>macros</filename> directory. You can also try it out by
+ invoking
+ <guimenu>Macros</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Add
+ Prefix and Suffix</guimenuitem>.</para>
+
+ <informalexample>
+ <!-- <title>Add_Prefix_and_Suffix.bsh</title> -->
+
+ <programlisting>// beginning of Add_Prefix_and_Suffix.bsh
+
+<anchor id="imports" />// import statement (see <xref linkend="explain-imports" />)
+import javax.swing.border.*;
+
+<anchor id="main-routine" />// main routine
+void prefixSuffixDialog()
+{
+<anchor id="create-dialog" /> // create dialog object (see <xref
+ linkend="explain-create-dialog" />)
+ title = <quote>Add prefix and suffix to selected lines</quote>;
+ dialog = new JDialog(view, title, false);
+ content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12, 12, 12, 12));
+ content.setPreferredSize(new Dimension(320, 160));
+ dialog.setContentPane(content);
+
+<anchor id="fields-panel" /> // add the text fields (see <xref
+ linkend="explain-fields-panel" />)
+ fieldPanel = new JPanel(new GridLayout(4, 1, 0, 6));
+ prefixField = new HistoryTextField(<quote>macro.add-prefix</quote>);
+ prefixLabel = new JLabel(<quote>Prefix to add:</quote>);
+ suffixField = new HistoryTextField(<quote>macro.add-suffix</quote>);
+ suffixLabel = new JLabel(<quote>Suffix to add:</quote>);
+ fieldPanel.add(prefixLabel);
+ fieldPanel.add(prefixField);
+ fieldPanel.add(suffixLabel);
+ fieldPanel.add(suffixField);
+ content.add(fieldPanel, <quote>Center</quote>);
+
+<anchor id="button-panel" /> // add a panel containing the buttons (see <xref
+ linkend="explain-button-panel" />)
+ buttonPanel = new JPanel();
+ buttonPanel.setLayout(new BoxLayout(buttonPanel,
+ BoxLayout.X_AXIS));
+ buttonPanel.setBorder(new EmptyBorder(12, 50, 0, 50));
+ buttonPanel.add(Box.createGlue());
+ ok = new JButton(<quote>OK</quote>);
+ cancel = new JButton(<quote>Cancel</quote>);
+ ok.setPreferredSize(cancel.getPreferredSize());
+ dialog.getRootPane().setDefaultButton(ok);
+ buttonPanel.add(ok);
+ buttonPanel.add(Box.createHorizontalStrut(6));
+ buttonPanel.add(cancel);
+ buttonPanel.add(Box.createGlue());
+ content.add(buttonPanel, <quote>South</quote>);
+
+<anchor id="add-listeners" /> // register this method as an ActionListener for
+ // the buttons and text fields (see <xref linkend="explain-add-listeners" />)
+ ok.addActionListener(this);
+ cancel.addActionListener(this);
+ prefixField.addActionListener(this);
+ suffixField.addActionListener(this);
+
+<anchor id="set-visible" /> // locate the dialog in the center of the
+ // editing pane and make it visible (see <xref linkend="explain-set-visible" />)
+ dialog.pack();
+ dialog.setLocationRelativeTo(view);
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+
+<anchor id="action-listener" /> // this method will be called when a button is clicked
+ // or when ENTER is pressed (see <xref linkend="explain-action-listener" />)
+ void actionPerformed(e)
+ {
+ if(e.getSource() != cancel)
+ {
+ processText();
+ }
+ dialog.dispose();
+ }
+
+<anchor id="process-text" /> // this is where the work gets done to insert
+ // the prefix and suffix (see <xref linkend="explain-process-text" />)
+ void processText()
+ {
+ prefix = prefixField.getText();
+ suffix = suffixField.getText();
+ if(prefix.length() == 0 && suffix.length() == 0)
+ return;
+ prefixField.addCurrentToHistory();
+ suffixField.addCurrentToHistory();
+
+<anchor id="jEdit-calls" /> // text manipulation begins here using calls
+ // to jEdit methods (see <xref linkend="explain-jedit-calls" />)
+ buffer.beginCompoundEdit();
+ selectedLines = textArea.getSelectedLines();
+ for(i = 0; i < selectedLines.length; ++i)
+ {
+ offsetBOL = textArea.getLineStartOffset(
+ selectedLines[i]);
+ textArea.setCaretPosition(offsetBOL);
+ textArea.goToStartOfWhiteSpace(false);
+ textArea.goToEndOfWhiteSpace(true);
+ text = textArea.getSelectedText();
+ if(text == null) text = "";
+ textArea.setSelectedText(prefix + text + suffix);
+ }
+ buffer.endCompoundEdit();
+ }
+}
+
+<anchor id="main" />// this single line of code is the script's main routine
+// (see <xref linkend="explain-main" />)
+prefixSuffixDialog();
+
+// end of Add_Prefix_and_Suffix.bsh</programlisting>
+ </informalexample>
+ </section>
+
+ <section id="macro-analysis">
+ <title>Analysis of the Macro</title>
+
+ <section id="explain-imports">
+ <title>Import Statements</title>
+
+ <informalexample>
+ <programlisting>// import statement
+import javax.swing.border.*;</programlisting>
+ </informalexample>
+
+ <para>This macro makes use of classes in the
+ <literal>javax.swing.border</literal> package, which is not
+ automatically imported. As we mentioned previously (see <xref
+ linkend="first-example" />), jEdit's implementation of BeanShell
+ causes a number of classes to be automatically imported. Classes
+ that are not automatically imported must be identified by a full
+ qualified name or be the subject of an <function>import</function>
+ statement.</para>
+ </section>
+
+ <section id="explain-create-dialog">
+ <title>Create the Dialog</title>
+
+ <informalexample>
+ <programlisting>// create dialog object
+title = <quote>Add prefix and suffix to selected lines</quote>;
+dialog = new JDialog(view, title, false);
+content = new JPanel(new BorderLayout());
+content.setBorder(new EmptyBorder(12, 12, 12, 12));
+dialog.setContentPane(content);</programlisting>
+ </informalexample>
+
+ <para>To get input for the macro, we need a dialog that provides for
+ input of the prefix and suffix strings, an <guibutton>OK</guibutton>
+ button to perform text insertion, and a
+ <guibutton>Cancel</guibutton> button in case we change our mind. We
+ have decided to make the dialog window non-modal. This will allow us
+ to move around in the text buffer to find things we may need
+ (including text to cut and paste) while the macro is running and the
+ dialog is visible.</para>
+
+ <para>The Java object we need is a <classname>JDialog</classname>
+ object from the Swing package. To construct one, we use the
+ <function>new</function> keyword and call a
+ <glossterm>constructor</glossterm> function. The constructor we use
+ takes three parameters: the owner of the new dialog, the title to be
+ displayed in the dialog frame, and a <classname>boolean</classname>
+ parameter (<constant>true</constant> or <constant>false</constant>)
+ that specifies whether the dialog will be modal or non-modal. We
+ define the variable <varname>title</varname> using a string literal,
+ then use it immediately in the <classname>JDialog</classname>
+ constructor.</para>
+
+ <para>A <classname>JDialog</classname> object is a window containing
+ a single object called a <glossterm>content pane</glossterm>. The
+ content pane in turn contains the various visible components of the
+ dialog. A <classname>JDialog</classname> creates an empty content
+ pane for itself as during its construction. However, to control the
+ dialog's appearance as much as possible, we will separately create
+ our own content pane and attach it to the
+ <classname>JDialog</classname>. We do this by creating a
+ <classname>JPanel</classname> object. A
+ <classname>JPanel</classname> is a lightweight container for other
+ components that can be set to a given size and color. It also
+ contains a <glossterm>layout</glossterm> scheme for arranging the
+ size and position of its components. Here we are constructing a
+ <classname>JPanel</classname> as a content pane with a
+ <classname>BorderLayout</classname>. We put a
+ <classname>EmptyBorder</classname> inside it to serve as a margin
+ between the edge of the window and the components inside. We then
+ attach the <classname>JPanel</classname> as the dialog's content
+ pane, replacing the dialog's home-grown version.</para>
+
+ <para>A <classname>BorderLayout</classname> is one of the simpler
+ layout schemes available for container objects like
+ <classname>JPanel</classname>. A <classname>BorderLayout</classname>
+ divides the container into five sections: <quote>North</quote>,
+ <quote>South</quote>, <quote>East</quote>, <quote>West</quote> and
+ <quote>Center</quote>. Components are added to the layout using the
+ container's <function>add</function> method, specifying the
+ component to be added and the section to which it is assigned.
+ Building a component like our dialog window involves building a set
+ of nested containers and specifying the location of each of their
+ member components. We have taken the first step by creating a
+ <classname>JPanel</classname> as the dialog's content pane.</para>
+ </section>
+
+ <section id="explain-fields-panel">
+ <title>Create the Text Fields</title>
+
+ <informalexample>
+ <programlisting>// add the text fields
+fieldPanel = new JPanel(new GridLayout(4, 1, 0, 6));
+prefixField = new HistoryTextField("macro.add-prefix");
+prefixLabel = new JLabel(<quote>Prefix to add</quote>:);
+suffixField = new HistoryTextField(<quote>macro.add-suffix</quote>);
+suffixLabel = new JLabel(<quote>Suffix to add:</quote>);
+fieldPanel.add(prefixLabel);
+fieldPanel.add(prefixField);
+fieldPanel.add(suffixLabel);
+fieldPanel.add(suffixField);
+content.add(fieldPanel, <quote>Center</quote>);</programlisting>
+ </informalexample>
+
+ <para>Next we shall create a smaller panel containing two fields for
+ entering the prefix and suffix text and two labels identifying the
+ input fields.</para>
+
+ <para>For the text fields, we will use jEdit's <ulink
+ url="../api/org/gjt/sp/jedit/gui/HistoryTextField.html">HistoryTextField</ulink>
+ class. It is derived from the Java Swing class
+ <classname>JTextField</classname>. This class offers the enhancement
+ of a stored list of prior values used as text input. When the
+ component has input focus, the up and down keys scroll through the
+ prior values for the variable. <!-- The prior values are stored in a file named
+ <filename>history</filename> located in the directory in which jEdit stores
+ various user data. --></para>
+
+ <para>To create the <ulink
+ url="../api/org/gjt/sp/jedit/gui/HistoryTextField.html">HistoryTextField</ulink>
+ objects we use a constructor method that takes a single parameter:
+ the name of the tag under which history values will be stored. Here
+ we choose names that are not likely to conflict with existing jEdit
+ history items.</para>
+
+ <para>The labels that accompany the text fields are
+ <classname>JLabel</classname> objects from the Java Swing package.
+ The constructor we use for both labels takes the label text as a
+ single <classname>String</classname> parameter.</para>
+
+ <para>We wish to arrange these four components from top to bottom,
+ one after the other. To achieve that, we use a
+ <classname>JPanel</classname> container object named
+ <varname>fieldPanel</varname> that will be nested inside the
+ dialog's content pane that we have already created. In the
+ constructor for <varname>fieldPanel</varname>, we assign a new
+ <classname>GridLayout</classname> with the indicated parameters:
+ four rows, one column, zero spacing between columns (a meaningless
+ element of a grid with only one column, but nevertheless a required
+ parameter) and spacing of six pixels between rows. The spacing
+ between rows spreads out the four <quote>grid</quote> elements.
+ After the components, the panel and the layout are specified, the
+ components are added to <varname>fieldPanel</varname> top to bottom,
+ one <quote>grid cell</quote> at a time. Finally, the complete
+ <varname>fieldPanel</varname> is added to the dialog's content pane
+ to occupy the <quote>Center</quote> section of the content
+ pane.</para>
+ </section>
+
+ <section id="explain-button-panel">
+ <title>Create the Buttons</title>
+
+ <informalexample>
+ <programlisting>// add the buttons
+buttonPanel = new JPanel();
+buttonPanel.setLayout(new BoxLayout(buttonPanel,
+ BoxLayout.X_AXIS));
+buttonPanel.setBorder(new EmptyBorder(12, 50, 0, 50));
+buttonPanel.add(Box.createGlue());
+ok = new JButton(<quote>OK</quote>);
+cancel = new JButton(<quote>Cancel</quote>);
+ok.setPreferredSize(cancel.getPreferredSize());
+dialog.getRootPane().setDefaultButton(ok);
+buttonPanel.add(ok);
+buttonPanel.add(Box.createHorizontalStrut(6));
+buttonPanel.add(cancel);
+buttonPanel.add(Box.createGlue());
+content.add(buttonPanel, <quote>South</quote>);</programlisting>
+ </informalexample>
+
+ <para>To create the dialog's buttons, we follow repeat the
+ <quote>nested container</quote> pattern we used in creating the text
+ fields. First, we create a new, nested panel. This time we use a
+ <classname>BoxLayout</classname> that places components either in a
+ single row or column, depending on the parameter passed to its
+ constructor. This layout object is more flexible than a
+ <classname>GridLayout</classname> in that variable spacing between
+ elements can be specified easily. We put an
+ <classname>EmptyBorder</classname> in the new panel to set margins
+ for placing the buttons. Then we create the buttons, using a
+ <classname>JButton</classname> constructor that specifies the button
+ text. After setting the size of the <guilabel>OK</guilabel> button
+ to equal the size of the <guilabel>Cancel</guilabel> button, we
+ designate the <guilabel>OK</guilabel> button as the default button
+ in the dialog. This causes the <guilabel>OK</guilabel> button to be
+ outlined when the dialog if first displayed. Finally, we place the
+ buttons side by side with a 6 pixel gap between them (for aesthetic
+ reasons), and place the completed <varname>buttonPanel</varname> in
+ the <quote>South</quote> section of the dialog's content
+ pane.</para>
+ </section>
+
+ <section id="explain-add-listeners">
+ <title>Register the Action Listeners</title>
+
+ <informalexample>
+ <programlisting>// register this method as an ActionListener for
+// the buttons and text fields
+ok.addActionListener(this);
+cancel.addActionListener(this);
+prefixField.addActionListener(this);
+suffixField.addActionListener(this);</programlisting>
+ </informalexample>
+
+ <para>In order to specify the action to be taken upon clicking a
+ button or pressing the <keycap>Enter</keycap> key, we must register
+ an <classname>ActionListener</classname> for each of the four active
+ components of the dialog - the two <ulink
+ url="../api/org/gjt/sp/jedit/HistoryTextField.html">HistoryTextField</ulink>
+ components and the two buttons. In Java, an
+ <classname>ActionListener</classname> is an
+ <glossterm>interface</glossterm> - an abstract specification for a
+ derived class to implement. The
+ <classname>ActionListener</classname> interface contains a single
+ method to be implemented:</para>
+
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public void
+ <function>actionPerformed</function></funcdef>
+
+ <paramdef>ActionEvent <parameter>e</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <para>BeanShell does not permit a script to create derived classes.
+ However, BeanShell offers a useful substitute: a method can be used
+ as a scripted object that can include nested methods implementing a
+ number of Java interfaces. The method
+ <function>prefixSuffixDialog()</function> that we are writing can
+ thus be treated as an <classname>ActionListener</classname> object.
+ To accomplish this, we call <function>addActionListener()</function>
+ on each of the four components specifying <varname>this</varname> as
+ the <classname>ActionListener</classname>. We still need to
+ implement the interface. We will do that shortly.</para>
+ </section>
+
+ <section id="explain-set-visible">
+ <title>Make the Dialog Visible</title>
+
+ <informalexample>
+ <programlisting>// locate the dialog in the center of the
+// editing pane and make it visible
+dialog.pack();
+dialog.setLocationRelativeTo(view);
+dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+dialog.setVisible(true);</programlisting>
+ </informalexample>
+
+ <para>Here we do three things. First, we activate all the layout
+ routines we have established by calling the
+ <function>pack()</function> method for the dialog as the top-level
+ window. Next we center the dialog's position in the active jEdit
+ <varname>view</varname> by calling
+ <function>setLocationRelativeTo()</function> on the dialog. We also
+ call the <function>setDefaultCloseOperation()</function> function to
+ specify that the dialog box should be immediately disposed if the
+ user clicks the close box. Finally, we activate the dialog by
+ calling <function>setVisible()</function>with the state parameter
+ set to <constant>true</constant>.</para>
+
+ <para>At this point we have a decent looking dialog window that
+ doesn't do anything. Without more code, it will not respond to user
+ input and will not accomplish any text manipulation. The remainder
+ of the script deals with these two requirements.</para>
+ </section>
+
+ <section id="explain-action-listener">
+ <title>The Action Listener</title>
+
+ <informalexample>
+ <programlisting>// this method will be called when a button is clicked
+// or when ENTER is pressed
+void actionPerformed(e)
+{
+ if(e.getSource() != cancel)
+ {
+ processText();
+ }
+ dialog.dispose();
+}</programlisting>
+ </informalexample>
+
+ <para>The method <function>actionPerformed()</function> nested
+ inside <function>prefixSuffixDialog()</function> implements the
+ implicit <classname>ActionListener</classname> interface. It looks
+ at the source of the <classname>ActionEvent</classname>, determined
+ by a call to <function>getSource()</function>. What we do with this
+ return value is straightforward: if the source is not the
+ <guibutton>Cancel</guibutton> button, we call the
+ <function>processText()</function> method to insert the prefix and
+ suffix text. Then the dialog is closed by calling its
+ <function>dispose()</function> method.</para>
+
+ <para>The ability to implement interfaces like
+ <classname>ActionListener</classname> inside a BeanShell script is
+ one of the more powerful features of the BeanShell package. this
+ technique is discussed in the next chapter; see <xref
+ linkend="macro-tips-BeanShell-class" />.</para>
+ </section>
+
+ <section id="explain-process-text">
+ <title>Get the User's Input</title>
+
+ <informalexample>
+ <programlisting>// this is where the work gets done to insert
+// the prefix and suffix
+void processText()
+{
+ prefix = prefixField.getText();
+ suffix = suffixField.getText();
+ if(prefix.length() == 0 && suffix.length() == 0)
+ return;
+ prefixField.addCurrentToHistory();
+ suffixField.addCurrentToHistory();</programlisting>
+ </informalexample>
+
+ <para>The method <function>processText()</function> does the work of
+ our macro. First we obtain the input from the two text fields with a
+ call to their <function>getText()</function> methods. If they are
+ both empty, there is nothing to do, so the method returns. If there
+ is input, any text in the field is added to that field's stored
+ history list by calling <function>addCurrentToHistory()</function>.
+ We do not need to test the <varname>prefixField</varname> or
+ <varname>suffixField</varname> controls for
+ <constant>null</constant> or empty values because
+ <function>addCurrentToHistory()</function> does that
+ internally.</para>
+ </section>
+
+ <section id="explain-jedit-calls">
+ <title>Call jEdit Methods to Manipulate Text</title>
+
+ <informalexample>
+ <programlisting> // text manipulation begins here using calls
+ // to jEdit methods
+ buffer.beginCompoundEdit();
+ selectedLines = textArea.getSelectedLines();
+ for(i = 0; i < selectedLines.length; ++i)
+ {
+ offsetBOL = textArea.getLineStartOffset(
+ selectedLines[i]);
+ textArea.setCaretPosition(offsetBOL);
+ textArea.goToStartOfWhiteSpace(false);
+ textArea.goToEndOfWhiteSpace(true);
+ text = textArea.getSelectedText();
+ if(text == null) text = "";
+ textArea.setSelectedText(prefix + text + suffix);
+ }
+ buffer.endCompoundEdit();
+}</programlisting>
+ </informalexample>
+
+ <para>The text manipulation routine loops through each selected line
+ in the text buffer. We get the loop parameters by calling
+ <function>textArea.getSelectedLines()</function>, which returns an
+ array consisting of the line numbers of every selected line. The
+ array includes the number of the current line, whether or not it is
+ selected, and the line numbers are sorted in increasing order. We
+ iterate through each member of the <varname>selectedLines</varname>
+ array, which represents the number of a selected line, and apply the
+ following routine:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Get the buffer position of the start of the line
+ (expressed as a zero-based index from the start of the
+ buffer) by calling
+ <function>textArea.getLineStartOffset(selectedLines[i])</function>;</para>
+ </listitem>
+
+ <listitem>
+ <para>Move the caret to that position by calling
+ <function>textArea.setCaretPosition()</function>;</para>
+ </listitem>
+
+ <listitem>
+ <para>Find the first and last non-whitespace characters on
+ the line by calling
+ <function>textArea.goToStartOfWhiteSpace()</function> and
+ <function>textArea.goToEndOfWhiteSpace()</function>;</para>
+
+ <para>The <function>goTo...</function> methods in <ulink
+ url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
+ take a single parameter which tells jEdit whether the text
+ between the current caret position and the desired position
+ should be selected. Here, we call
+ <function>textArea.goToStartOfWhiteSpace(false)</function>
+ so that no text is selected, then call
+ <function>textArea.goToEndOfWhiteSpace(true)</function> so
+ that all of the text between the beginning and ending
+ whitespace is selected.</para>
+ </listitem>
+
+ <listitem>
+ <para>Retrieve the selected text by storing the return value
+ of <function>textArea.getSelectedText()</function> in a new
+ variable <function>text</function>.</para>
+
+ <para>If the line is empty,
+ <function>getSelectedText()</function> will return
+ <constant>null</constant>. In that case, we assign an empty
+ string to <varname>text</varname> to avoid calling methods
+ on a null object.</para>
+ </listitem>
+
+ <listitem>
+ <para>Change the selected text to <varname>prefix + text +
+ suffix</varname> by calling
+ <function>textArea.setSelectedText()</function>. If there is
+ no selected text (for example, if the line is empty), the
+ prefix and suffix will be inserted without any intervening
+ characters.</para>
+ </listitem>
+ </itemizedlist>
+
+ <sidebar>
+ <title>Compound edits</title>
+
+ <para>Note the <function>beginCompoundEdit()</function> and
+ <function>endCompoundEdit()</function> calls. These ensure that
+ all edits performed between the two calls can be undone in one
+ step. Normally, jEdit automatically wraps a macro call in these
+ methods; however if the macro shows a non-modal dialog box, as
+ far as jEdit is concerned the macro has finished executing by
+ the time the dialog is shown, since control returns to the event
+ dispatch thread.</para>
+
+ <para>If you do not understand this, don't worry; just keep it
+ in mind if your macro needs to show a non-modal dialog box for
+ some reason; Most macros won't.</para>
+ </sidebar>
+
+ <!-- <para>
+ The loop routine is bracketed by calls to
+ <function>buffer.beginCompoundEdit()</function> and
+ <function>buffer.endCompoundEdit()</function>. These methods
+ modify the way in which jEdit's undo facility performs. Text
+ operations done between calls to these functions will be
+ treated as a single operation for undo purposes. A single undo
+ command issued immediately after the macro completes will thus remove
+ the prefix and suffix text from all of the previously selected lines.
+ </para> -->
+ </section>
+
+ <section id="explain-main">
+ <title>The Main Routine</title>
+
+ <informalexample>
+ <programlisting>// this single line of code is the script's main routine
+prefixSuffixDialog();</programlisting>
+ </informalexample>
+
+ <para>The call to <function>prefixSuffixDialog()</function>is the
+ only line in the macro that is not inside an enclosing block.
+ BeanShell treats such code as a top-level <function>main</function>
+ method and begins execution with it.</para>
+
+ <para>Our analysis of <filename>Add_Prefix_and_Suffix.bsh</filename>
+ is now complete. In the next section, we look at other ways in which
+ a macro can obtain user input, as well as other macro writing
+ techniques.</para>
+ </section>
+ </section>
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/files.xml b/jEdit/doc/users-guide/files.xml
index cdb3e31..2de0a35 100644
--- a/jEdit/doc/users-guide/files.xml
+++ b/jEdit/doc/users-guide/files.xml
@@ -1,693 +1,693 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="files">
- <title>Working With Files</title>
-
- <!-- jEdit buffer-local properties: -->
- <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=80: -->
- <!-- :xml.root=users-guide.xml: -->
-
- <section id="creating">
- <title>Creating New Files</title>
-
- <para><guimenu>File</guimenu>><guimenuitem>New</guimenuitem>
- (shortcut: <keycap>C+n</keycap>) opens a new, empty, buffer. Another way
- to create a new file is to specify a non-existent file name when
- starting jEdit on the command line. A new file will be created on disk
- when the buffer is saved for the first time.</para>
- </section>
-
- <section id="opening">
- <title>Opening Files</title>
-
- <para><guimenu>File</guimenu>><guimenuitem>Open</guimenuitem>
- (shortcut: <keycap>C+o</keycap>) displays a file system browser dialog
- box and loads the specified file into a new buffer.</para>
-
- <para>Multiple files can be opened at once by holding down
- <keycap>Control</keycap> while clicking on them in the file system
- browser. The file system browser supports auto-completion; typing the
- first few characters of a listed file name will select the file.</para>
-
- <para>More advanced features of the file system browser are described in
- <xref linkend="vfs-browser" />.</para>
-
- <para>The <guimenu>File</guimenu>><guimenuitem>Recent
- Files</guimenuitem> menu lists recently viewed files. When a recent file
- is opened, the caret is automatically moved to its previous location in
- that file. The number of recent files to remember can be changed and
- caret position saving can be disabled in the
- <guibutton>General</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="general-pane" />.</para>
-
- <para>The <guimenu>Utilities</guimenu>><guimenuitem>Current
- Directory</guimenuitem> menu lists all files and directories in the
- current buffer's directory. Selecting a file opens it in a buffer for
- editing; selecting a directory opens it in the file system browser (see
- <xref linkend="vfs-browser" />).</para>
-
- <note>
- <para>Files that you do not have write access to are opened in
- read-only mode, where editing is not permitted.</para>
- </note>
-
- <tip>
- <para>jEdit supports transparent editing of GZipped files; if a file
- begins with the GZip <quote>magic number</quote>, it is
- automatically decompressed before loading and compressed when
- saving. To compress an existing file, you need to change a setting
- in the <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> dialog box; see <xref linkend="buffer-opts" />
- for details.</para>
- </tip>
- </section>
-
- <section id="saving">
- <title>Saving Files</title>
-
- <para>Changed made in a buffer do not affect the file on disk until the
- buffer is <firstterm>saved</firstterm>.</para>
-
- <para><guimenu>File</guimenu>><guimenuitem>Save</guimenuitem>
- (shortcut: <keycap>C+s</keycap>) saves the current buffer to
- disk.</para>
-
- <para><guimenu>File</guimenu>><guimenuitem>Save As</guimenuitem>
- renames the buffer and saves it in a new location. Note that using this
- command to save over another open buffer will close the other buffer, to
- stop two buffers from being able to share the same path name.</para>
-
- <para><guimenu>File</guimenu>><guimenuitem>Save a Copy
- As</guimenuitem> saves the buffer to a different location but does not
- rename the buffer, and does not clear the
- <quote>modified</quote> flag. Note that using this command to save over
- another open buffer will automatically reload the other buffer.</para>
-
- <para><guimenu>File</guimenu>><guimenuitem>Save All</guimenuitem>
- (shortcut: <keycap>C+e C+s</keycap>) saves all open buffers to disk,
- asking for confirmation first. The confirmation dialog can be disabled
- in the <guilabel>General</guilabel> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
-
- <section>
- <title>Two-Stage Save</title>
-
- <para>To prevent data loss in the unlikely case that jEdit should
- crash in the middle of saving a file, files are first saved to a
- temporary file named
- <filename>#<replaceable>filename</replaceable>#save#</filename>. If
- this operation is successful, the original file is replaced with the
- temporary file.</para>
-
- <para>However, in some situations, this behavior is undesirable. For
- example, on Unix this creates a new i-node so while jEdit retains
- file permissions, the owner and group of the file are reset, and if
- it is a hard link the link is broken. The <quote>two-stage
- save</quote> feature can be disabled in the
- <guibutton>General</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="general-pane" />.</para>
- </section>
-
- <section id="autosave">
- <title>Autosave and Crash Recovery</title>
-
- <para>The autosave feature protects your work from computer crashes
- and such. Every 30 seconds, all buffers with unsaved changes are
- written out to their respective file names, enclosed in hash
- (<quote>#</quote>) characters. For example,
- <filename>program.c</filename> will be autosaved to
- <filename>#program.c#</filename>.</para>
-
- <para>Saving a buffer using one of the commands in the previous
- section automatically deletes the autosave file, so they will only
- ever be visible in the unlikely event of a jEdit (or operating
- system) crash.</para>
-
- <para>If an autosave file is found while a buffer is being loaded,
- jEdit will offer to recover the autosaved data.</para>
-
- <para>The autosave interval can be changed in the
- <guibutton>Autosave and Backup</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="autosave-backups-pane" />.</para>
- </section>
-
- <section id="backups">
- <title>Backups</title>
-
- <para>The backup feature can be used to roll back to the previous
- version of a file after changes were made. When a buffer is saved
- for the first time after being opened, its original contents are
- <quote>backed up</quote> under a different file name.</para>
-
- <para>The behavior of the backup feature is specified in the
- <guibutton>Autosave and Backup</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="autosave-backups-pane" />.`</para>
-
- <para>The default behavior is to back up the original contents to
- the buffer's file name suffixed with a tilde (<quote>~</quote>). For
- example, a file named <filename>paper.tex</filename> is backed up to
- <filename>paper.tex~</filename>.</para>
-
- <itemizedlist>
- <listitem>
- <para>The <guilabel>Max number of backups</guilabel> setting
- determines the number of backups to save. Setting this to
- zero disables the backup feature. Settings this to more than
- one adds numbered suffixes to file names. By default only
- one backup is saved.</para>
- </listitem>
-
- <listitem>
- <para>If the <guilabel>Backup directory</guilabel> setting
- is non-empty, backups are saved in that location. Otherwise,
- they are saved in the same directory as the original file.
- The latter is the default behavior.</para>
- </listitem>
-
- <listitem>
- <para>The <guilabel>Backup filename prefix</guilabel>
- setting is the prefix that is added to the backed-up file
- name. This is empty by default.</para>
- </listitem>
-
- <listitem>
- <para>The <guilabel>Backup filename suffix</guilabel>
- setting is the suffix that is added to the backed-up file
- name. This is <quote>~</quote> by default.</para>
- </listitem>
-
- <listitem>
- <para>Backups can optionally be saved in a specified backup
- directory, instead of the directory of the original file.
- This can reduce clutter.</para>
- </listitem>
-
- <listitem>
- <para>The <guilabel>Backup on every save</guilabel> option
- is off by default, which results in a backup only being
- created the first time a buffer is saved in an editing
- session. If switched on, backups are created every time a
- buffer is saved.</para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
-
- <section id="line-separators">
- <title>Line Separators</title>
-
- <para>Unix systems use newlines (<literal>\n</literal>) to mark line
- endings in text files. The MacOS uses carriage-returns
- (<literal>\r</literal>). Windows uses a carriage-return followed by a
- newline (<literal>\r\n</literal>). jEdit can read and write files in all
- three formats.</para>
-
- <para>The line separator used by the in-memory representation of file
- contents is always the newline character. When a file is being loaded,
- the line separator used in the file on disk is stored in a per-buffer
- property, and all line-endings are converted to newline characters for
- the in-memory representation. When the buffer is consequently saved, the
- value of the property replaces newline characters when the buffer is
- saved to disk.</para>
-
- <para>There are several ways to change a buffer's line separator:</para>
-
- <itemizedlist>
- <listitem>
- <para>In the <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> dialog box. See <xref
- linkend="buffer-opts" />.</para>
- </listitem>
-
- <listitem>
- <para>By clicking the line separator indicator in the status
- bar. See <xref linkend="status-bar" />.</para>
- </listitem>
-
- <listitem>
- <para>From the keyboard, if a keyboard shortcut has been
- assigned to the <guimenuitem>Toggle Line Separator</guimenuitem>
- command in the <guibutton>Shortcuts</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. By default, this command does
- not have a keyboard shortcut.</para>
- </listitem>
- </itemizedlist>
-
- <para>By default, new files are saved with your operating system's
- native line separator. This can be changed in the
- <guibutton>General</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref linkend="general-pane" />.
- Note that changing this setting has no effect on existing files.</para>
- </section>
-
- <section id="encodings">
- <title>Character Encodings</title>
-
- <para>A character encoding is a mapping from a set of characters to
- their on-disk representation. jEdit can use any encoding supported by
- the Java platform.</para>
-
- <para>Buffers in memory are always stored in <literal>UTF-16</literal>
- encoding, which means each character is mapped to an integer between 0
- and 65535. <literal>UTF-16</literal> is the native encoding supported by
- Java, and has a large enough range of characters to support most modern
- languages.</para>
-
- <para>When a buffer is loaded, it is converted from its on-disk
- representation to <literal>UTF-16</literal> using a specified
- encoding.</para>
-
- <para>The default encoding, used to load files for which no other
- encoding is specified, can be set in the
- <guibutton>Encodings</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref linkend="encodings-pane" />.
- Unless you change this setting, it will be your operating system's
- native encoding, for example <literal>MacRoman</literal> on the MacOS,
- <literal>windows-1252</literal> on Windows, and
- <literal>ISO-8859-1</literal> on Unix.</para>
-
- <para>An encoding can be explicitly set when opening a file in the file
- system browser's
- <guimenu>Commands</guimenu>><guisubmenu>Encoding</guisubmenu>
- menu.</para>
-
- <para>Note that there is no general way to auto-detect the encoding used
- by a file, however in a few cases it is possible:</para>
-
- <itemizedlist>
- <listitem>
- <para><literal>UTF-16</literal> and <literal>UTF-8Y</literal>
- files are auto-detected, because they begin with a certain fixed
- character sequence. Note that plain UTF-8 does not mandate a
- specific header, and thus cannot be auto-detected, unless the
- file in question is an XML file.</para>
- </listitem>
-
- <listitem>
- <para>Encodings used in XML files with an XML PI like the
- following are auto-detected:</para>
-
- <programlisting><?xml version="1.0" encoding="UTF-8"></programlisting>
- </listitem>
- </itemizedlist>
-
- <para>The encoding that will be used to save the current buffer is shown
- in the status bar, and can be changed in the
- <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> dialog box. Note that changing this setting has no
- effect on the buffer's contents; if you opened a file with the wrong
- encoding and got garbage, you will need to reload it.
- <guimenu>File</guimenu>><guimenuitem>Reload with
- Encoding</guimenuitem> is an easy way.</para>
-
- <para>If a file is opened without an explicit encoding specified and it
- appears in the recent file list, jEdit will use the encoding last used
- when working with that file; otherwise the default encoding will be
- used.</para>
-
- <section>
- <title>Commonly Used Encodings</title>
-
- <para>While the world is slowly converging on UTF-8 and UTF-16
- encodings for storing text, a wide range of older encodings are
- still in widespread use and Java supports most of them.</para>
-
- <para>The simplest character encoding still in use is ASCII, or
- <quote>American Standard Code for Information Interchange</quote>.
- ASCII encodes Latin letters used in English, in addition to numbers
- and a range of punctuation characters. Each ASCII character consists
- of 7 bits, there is a limit of 128 distinct characters, which makes
- it unsuitable for anything other than English text. jEdit will load
- and save files as ASCII if the <literal>US-ASCII</literal> encoding
- is used.</para>
-
- <para>Because ASCII is unsuitable for international use, most
- operating systems use an 8-bit extension of ASCII, with the first
- 128 values mapped to the ASCII characters, and the rest used to
- encode accents, umlauts, and various more esoteric used
- typographical marks. The three major operating systems all extend
- ASCII in a different way. Files written by Macintosh programs can be
- read using the <literal>MacRoman</literal> encoding; Windows text
- files are usually stored as <literal>windows-1252</literal>. In the
- Unix world, the <literal>8859_1</literal> character encoding has
- found widespread usage.</para>
-
- <para>On Windows, various other encodings, referred to as
- <firstterm>code pages</firstterm> and identified by number, are used
- to store non-English text. The corresponding Java encoding name is
- <literal>windows-</literal> followed by the code page number, for
- example <literal>windows-850</literal>.</para>
-
- <para>Many common cross-platform international character sets are
- also supported; <literal>KOI8_R</literal> for Russian text,
- <literal>Big5</literal> and <literal>GBK</literal> for Chinese, and
- <literal>SJIS</literal> for Japanese.</para>
- </section>
- </section>
-
- <section id="vfs-browser">
- <title>The File System Browser (FSB)</title>
-
- <para><guimenu>Utilities</guimenu>><guimenuitem>File System
- Browser</guimenuitem> displays the file system browser. By default, the
- file system browser is shown in a floating window. This window can be
- docked using the commands in its top-left corner popup menu; see <xref
- linkend="docking" />.</para>
-
- <para>The FSB can be customized in the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="vfs-browser-pane" />.</para>
-
- <section>
- <title>Navigating the File System</title>
-
- <para>The directory to browse is specified in the
- <guibutton>Path</guibutton> text field. Clicking the mouse in the
- text field automatically selects its contents allowing a new path to
- be quickly typed in. If a relative path is entered, it will be
- resolved relative to the current path. This text field remembers
- previously entered strings; see <xref linkend="history" />. The same
- list of previously browsed directories is also listed in the
- <guimenu>Utilities</guimenu>><guisubmenu>Recent
- Directories</guisubmenu> menu; selecting one opens it in the file
- system browser.</para>
-
- <para>To browse a listed directory, double-click it (or if you have
- a three-button mouse, you can click the middle mouse button as
- well). Alternatively, click the disclosure widget next to a
- directory to list its contents in place. To browse higher up in the
- directory hierarchy, double-click one of the parent directories in
- the parent directory list.</para>
-
- <para>Files and directories in the file list are shown in different
- colors depending on what glob patterns their names match. The
- patterns and colors can be customized in the <guibutton>File System
- Browser</guibutton>><guibutton>Colors</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
-
- <para>The <guibutton>Path:</guibutton> Text Box can be used to
- navigate to a specific directory. Environment variables are expanded
- here, allowing for both <literal>$VARNAME</literal> or
- <literal>%VARNAME%</literal> syntax. </para>
-
- <para> <literal>A+Up</literal> is a keyboard shortcut that brings
- you to the parent directory. </para>
-
- <para> <literal>A+Left</literal> and <literal>A+Right</literal> navigate back and forward through the visited directory stacks, in a
- Netscape/Konqueror/IE like fashion. </para>
-
- <para>To see a specific set of files only (for example, those whose
- names end with <filename>.java</filename>), enter a glob pattern in
- the <guibutton>Filter</guibutton> text field. This text fields
- remembers previously entered strings. See <xref linkend="globs" />
- for information about glob patterns.</para>
-
- <para>Unopened files can be opened by double-clicking (or by
- clicking the middle mouse button). Open files have their names
- underlined, and can be selected by single-clicking. Holding down
- <keycap>Shift</keycap> while opening a file will open it in a new
- view.</para>
-
- <para>Clicking a file or directory with the right mouse button
- displays a popup menu containing various commands.
- <!-- Note that attempting to delete a directory containing files will give an error; only empty directories can be deleted. -->
- </para>
-
- <tip>
- <para>The file list sorting algorithm used in jEdit handles
- numbers in file names in an intelligent manner. For example, a
- file named <filename>section10.xml</filename> will be placed
- after a file named <filename>section5.xml</filename>. A
- conventional letter-by-letter sort would have placed these two
- files in the wrong order.</para>
- </tip>
-
-
- </section>
-
- <section>
- <title>The Tool Bar</title>
-
- <para>The file system browser has a tool bar containing a number of
- buttons. Each item in the <guibutton>Commands</guibutton> menu
- (described below) except <guimenuitem>Show Hidden
- Files</guimenuitem> and <guisubmenu>Encoding</guisubmenu> has a
- corresponding tool bar button.</para>
- </section>
-
- <section>
- <title>The Commands Menu</title>
-
- <para>Clicking the <guibutton>Commands</guibutton> button displays a
- menu containing the following items:</para>
-
- <itemizedlist>
- <listitem>
- <para><guimenuitem>Parent Directory</guimenuitem> - moves up
- in the directory hierarchy. The Alt+Left arrow keyboard shortcut achieves the same thing. </para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Reload Directory</guimenuitem> - reloads
- the file list from disk. F5 does this also. </para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Root Directory</guimenuitem> - on Unix,
- goes to the root directory (<filename>/</filename>). On
- Windows and MacOS X, lists all mounted drives and network
- shares. The forward slash (/) achieves this too. </para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Home Directory</guimenuitem> - displays
- your home directory. Keyboard shortcut: ~ </para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Directory of Current Buffer</guimenuitem>
- - displays the directory containing the currently active
- buffer. Shortcut: - </para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>New File</guimenuitem> (Ctrl+N) - opens new, empty, buffer in the current directory. The file will not actually be created on disk until the buffer is
- saved.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>New Directory</guimenuitem> - creates a
- new directory after prompting for the desired name.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Search in Directory</guimenuitem> -
- displays the search and replace dialog box set to search all
- files in the current directory. If a file is selected when
- this command is invoked, its extension becomes the file name
- filter for the search; otherwise, the file name filter
- entered in the browser is used. See <xref
- linkend="search-replace" /> for details.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Show Hidden Files</guimenuitem> - toggles
- if hidden files are to be shown in the file list.</para>
- </listitem>
-
- <listitem>
- <para><guisubmenu>Encoding</guisubmenu> - a menu for
- selecting the character encoding to use when opening files.
- See <xref linkend="encodings" />.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section>
- <title>The Plugins Menu</title>
-
- <para>Clicking the <guibutton>Plugins</guibutton> button displays a
- menu containing plugin commands. For information about plugins, see
- <xref linkend="using-plugins" />.</para>
- </section>
-
- <section>
- <title>The Favorites Menu</title>
-
- <para>Clicking the <guibutton>Favorites</guibutton> button displays
- a menu showing all files and directories in the favorites list. The
- <guimenuitem>Add to Favorites</guimenuitem> item adds the currently
- selected file to the favorites list. If nothing is selected, the
- current directory is added. To remove a file from the favorites,
- invoke <guimenuitem>Edit Favorites</guimenuitem>, which will show
- the favorites list in the file system view, then select
- <guimenuitem>Delete</guimenuitem> from the right-click menu of the
- entry you want to remove.</para>
- </section>
-
- <section>
- <title>Keyboard Shortcuts</title>
-
- <para>Completion behaves differently in file dialogs than in the
- stand-alone file system browser window.</para>
-
- <para>In the file dialog, keyboard input goes in the file name field
- by default. Pressing <keycap>Enter</keycap> opens the file or
- directory path that is either fully or partially entered in the file
- name field. Typing the first few characters of a file's name selects
- that file. If the file name field is empty and nothing is selected,
- <keycap>/</keycap> lists the root directory on Unix and the list of
- drives on Windows. There are two handy abbreviations that may be
- used in file paths: <keycap>~</keycap> expands to the home
- directory, and <keycap>-</keycap> expands to the current buffer's
- directory.</para>
-
- <para>For example, to open a file
- <filename>/home/slava/jEdit/doc/TODO.txt</filename>, you might enter
- <filename>~/j/d/to</filename>.</para>
-
- <para>In the stand-alone file system browser, keyboard input is
- handled slightly differently. There is no file name field, instead
- shortcuts are active when the file tree has keyboard focus.
- Additionally, pressing <keycap>/</keycap>, <keycap>~</keycap> or
- <keycap>-</keycap> always immediately goes to the root, home and
- current buffer's directory, respectively.</para>
- </section>
- </section>
-
- <section id="reloading">
- <title>Reloading From Disk</title>
-
- <para>When a view is brought to the foreground, jEdit checks if any open
- buffers were modified on disk by another application. All affected
- buffers are listed in a dialog box. By default, buffers without unsaved
- changes are automatically reloaded. This feature can be disabled, or
- changed to prompt if files should be reloaded first, in the
- <guibutton>General</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="global-opts" />.</para>
-
- <para><guimenu>File</guimenu>><guimenuitem>Reload</guimenuitem> can
- be used to reload the current buffer from disk at any other time; a
- confirmation dialog box will be displayed first if the buffer has
- unsaved changes.</para>
-
- <para><guimenu>File</guimenu>><guimenuitem>Reload All</guimenuitem>
- discards unsaved changes in all open buffers and reload them from disk,
- asking for confirmation first.</para>
- </section>
-
- <section id="threaded-io">
- <title>Multi-Threaded I/O</title>
-
- <para>To improve responsiveness and perceived performance, jEdit
- executes all buffer input/output operations asynchronously. While I/O is
- in progress, the status bar displays the number of remaining I/O
- operations.</para>
-
- <para>The
- <guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>I/O
- Progress Monitor</guimenuitem> command displays a window with more
- detailed status information and progress meters. By default, the
- <guimenuitem>I/O Progress Monitor</guimenuitem> is shown in a floating
- window. This window can be docked using the commands in its top-left
- corner popup menu; see <xref linkend="docking" />. I/O requests can also
- be aborted in this window, however note that aborting a buffer save can
- result in data loss.</para>
-
- <!-- <para>
- By default, four I/O threads are created, which means that up
- to four buffers can be loaded or saved simultaneously. The number of
- threads can be changed in the
- <guibutton>Loading and Saving</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global Options</guimenuitem>
- dialog box; see <xref linkend="global-opts" />. Setting the number to zero
- disables multi-threaded I/O completely; doing this is not recommended.
- </para> -->
- </section>
-
- <section id="printing">
- <title>Printing</title>
-
- <para><guimenu>File</guimenu>><guimenuitem>Print</guimenuitem>
- (shortcut: <keycap>C+p</keycap>) prints the current buffer.</para>
-
- <para><guimenu>File</guimenu>><guimenuitem>Page Setup</guimenuitem>
- displays a dialog box for changing your operating system's print
- settings, such as margins, page size, print quality, and so on.</para>
-
- <para>The print output can be customized in the
- <guibutton>Printing</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref linkend="printing-pane" />.
- The following settings can be changed:</para>
-
- <itemizedlist>
- <listitem>
- <para>The font to use when printing.</para>
- </listitem>
-
- <listitem>
- <para>If a header with the file name should be printed on each
- page.</para>
- </listitem>
-
- <listitem>
- <para>If a footer with the page number and current date should
- be printed on each page.</para>
- </listitem>
-
- <listitem>
- <para>If line numbers should be printed.</para>
- </listitem>
-
- <listitem>
- <para>If the output should be color or black and white.</para>
- </listitem>
-
- <listitem>
- <para>The tab size to use when printing - this will usually be
- less than the text area tab size, to conserve space in the
- printed output.</para>
- </listitem>
-
- <listitem>
- <para>If folded regions should be printed.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="closing-exiting">
- <title>Closing Files and Exiting jEdit</title>
-
- <para><guimenu>File</guimenu>><guimenuitem>Close</guimenuitem>
- (shortcut: <keycap>C+w</keycap>) closes the current buffer. If it has
- unsaved changes, jEdit will ask if they should be saved first.</para>
-
- <para><guimenu>File</guimenu>><guimenuitem>Close All</guimenuitem>
- (shortcut: <keycap>C+e C+w</keycap>) closes all buffers. If any buffers
- have unsaved changes, they will be listed in a dialog box where they can
- be saved or discarded. In the dialog box, multiple buffers to operate on
- at once can be selected by clicking on them in the list while holding
- down <keycap>Control</keycap>. After all buffers have been closed, a new
- untitled buffer is opened.</para>
-
- <para><guimenu>File</guimenu>><guimenuitem>Exit</guimenuitem>
- (shortcut: <keycap>C+q</keycap>) will completely exit jEdit, prompting
- if unsaved buffers should be saved first.</para>
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="files">
+ <title>Working With Files</title>
+
+ <!-- jEdit buffer-local properties: -->
+ <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=80: -->
+ <!-- :xml.root=users-guide.xml: -->
+
+ <section id="creating">
+ <title>Creating New Files</title>
+
+ <para><guimenu>File</guimenu>><guimenuitem>New</guimenuitem>
+ (shortcut: <keycap>C+n</keycap>) opens a new, empty, buffer. Another way
+ to create a new file is to specify a non-existent file name when
+ starting jEdit on the command line. A new file will be created on disk
+ when the buffer is saved for the first time.</para>
+ </section>
+
+ <section id="opening">
+ <title>Opening Files</title>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Open</guimenuitem>
+ (shortcut: <keycap>C+o</keycap>) displays a file system browser dialog
+ box and loads the specified file into a new buffer.</para>
+
+ <para>Multiple files can be opened at once by holding down
+ <keycap>Control</keycap> while clicking on them in the file system
+ browser. The file system browser supports auto-completion; typing the
+ first few characters of a listed file name will select the file.</para>
+
+ <para>More advanced features of the file system browser are described in
+ <xref linkend="vfs-browser" />.</para>
+
+ <para>The <guimenu>File</guimenu>><guimenuitem>Recent
+ Files</guimenuitem> menu lists recently viewed files. When a recent file
+ is opened, the caret is automatically moved to its previous location in
+ that file. The number of recent files to remember can be changed and
+ caret position saving can be disabled in the
+ <guibutton>General</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="general-pane" />.</para>
+
+ <para>The <guimenu>Utilities</guimenu>><guimenuitem>Current
+ Directory</guimenuitem> menu lists all files and directories in the
+ current buffer's directory. Selecting a file opens it in a buffer for
+ editing; selecting a directory opens it in the file system browser (see
+ <xref linkend="vfs-browser" />).</para>
+
+ <note>
+ <para>Files that you do not have write access to are opened in
+ read-only mode, where editing is not permitted.</para>
+ </note>
+
+ <tip>
+ <para>jEdit supports transparent editing of GZipped files; if a file
+ begins with the GZip <quote>magic number</quote>, it is
+ automatically decompressed before loading and compressed when
+ saving. To compress an existing file, you need to change a setting
+ in the <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> dialog box; see <xref linkend="buffer-opts" />
+ for details.</para>
+ </tip>
+ </section>
+
+ <section id="saving">
+ <title>Saving Files</title>
+
+ <para>Changed made in a buffer do not affect the file on disk until the
+ buffer is <firstterm>saved</firstterm>.</para>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Save</guimenuitem>
+ (shortcut: <keycap>C+s</keycap>) saves the current buffer to
+ disk.</para>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Save As</guimenuitem>
+ renames the buffer and saves it in a new location. Note that using this
+ command to save over another open buffer will close the other buffer, to
+ stop two buffers from being able to share the same path name.</para>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Save a Copy
+ As</guimenuitem> saves the buffer to a different location but does not
+ rename the buffer, and does not clear the
+ <quote>modified</quote> flag. Note that using this command to save over
+ another open buffer will automatically reload the other buffer.</para>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Save All</guimenuitem>
+ (shortcut: <keycap>C+e C+s</keycap>) saves all open buffers to disk,
+ asking for confirmation first. The confirmation dialog can be disabled
+ in the <guilabel>General</guilabel> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box.</para>
+
+ <section>
+ <title>Two-Stage Save</title>
+
+ <para>To prevent data loss in the unlikely case that jEdit should
+ crash in the middle of saving a file, files are first saved to a
+ temporary file named
+ <filename>#<replaceable>filename</replaceable>#save#</filename>. If
+ this operation is successful, the original file is replaced with the
+ temporary file.</para>
+
+ <para>However, in some situations, this behavior is undesirable. For
+ example, on Unix this creates a new i-node so while jEdit retains
+ file permissions, the owner and group of the file are reset, and if
+ it is a hard link the link is broken. The <quote>two-stage
+ save</quote> feature can be disabled in the
+ <guibutton>General</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="general-pane" />.</para>
+ </section>
+
+ <section id="autosave">
+ <title>Autosave and Crash Recovery</title>
+
+ <para>The autosave feature protects your work from computer crashes
+ and such. Every 30 seconds, all buffers with unsaved changes are
+ written out to their respective file names, enclosed in hash
+ (<quote>#</quote>) characters. For example,
+ <filename>program.c</filename> will be autosaved to
+ <filename>#program.c#</filename>.</para>
+
+ <para>Saving a buffer using one of the commands in the previous
+ section automatically deletes the autosave file, so they will only
+ ever be visible in the unlikely event of a jEdit (or operating
+ system) crash.</para>
+
+ <para>If an autosave file is found while a buffer is being loaded,
+ jEdit will offer to recover the autosaved data.</para>
+
+ <para>The autosave interval can be changed in the
+ <guibutton>Autosave and Backup</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="autosave-backups-pane" />.</para>
+ </section>
+
+ <section id="backups">
+ <title>Backups</title>
+
+ <para>The backup feature can be used to roll back to the previous
+ version of a file after changes were made. When a buffer is saved
+ for the first time after being opened, its original contents are
+ <quote>backed up</quote> under a different file name.</para>
+
+ <para>The behavior of the backup feature is specified in the
+ <guibutton>Autosave and Backup</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="autosave-backups-pane" />.`</para>
+
+ <para>The default behavior is to back up the original contents to
+ the buffer's file name suffixed with a tilde (<quote>~</quote>). For
+ example, a file named <filename>paper.tex</filename> is backed up to
+ <filename>paper.tex~</filename>.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <guilabel>Max number of backups</guilabel> setting
+ determines the number of backups to save. Setting this to
+ zero disables the backup feature. Settings this to more than
+ one adds numbered suffixes to file names. By default only
+ one backup is saved.</para>
+ </listitem>
+
+ <listitem>
+ <para>If the <guilabel>Backup directory</guilabel> setting
+ is non-empty, backups are saved in that location. Otherwise,
+ they are saved in the same directory as the original file.
+ The latter is the default behavior.</para>
+ </listitem>
+
+ <listitem>
+ <para>The <guilabel>Backup filename prefix</guilabel>
+ setting is the prefix that is added to the backed-up file
+ name. This is empty by default.</para>
+ </listitem>
+
+ <listitem>
+ <para>The <guilabel>Backup filename suffix</guilabel>
+ setting is the suffix that is added to the backed-up file
+ name. This is <quote>~</quote> by default.</para>
+ </listitem>
+
+ <listitem>
+ <para>Backups can optionally be saved in a specified backup
+ directory, instead of the directory of the original file.
+ This can reduce clutter.</para>
+ </listitem>
+
+ <listitem>
+ <para>The <guilabel>Backup on every save</guilabel> option
+ is off by default, which results in a backup only being
+ created the first time a buffer is saved in an editing
+ session. If switched on, backups are created every time a
+ buffer is saved.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
+ <section id="line-separators">
+ <title>Line Separators</title>
+
+ <para>Unix systems use newlines (<literal>\n</literal>) to mark line
+ endings in text files. The MacOS uses carriage-returns
+ (<literal>\r</literal>). Windows uses a carriage-return followed by a
+ newline (<literal>\r\n</literal>). jEdit can read and write files in all
+ three formats.</para>
+
+ <para>The line separator used by the in-memory representation of file
+ contents is always the newline character. When a file is being loaded,
+ the line separator used in the file on disk is stored in a per-buffer
+ property, and all line-endings are converted to newline characters for
+ the in-memory representation. When the buffer is consequently saved, the
+ value of the property replaces newline characters when the buffer is
+ saved to disk.</para>
+
+ <para>There are several ways to change a buffer's line separator:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> dialog box. See <xref
+ linkend="buffer-opts" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>By clicking the line separator indicator in the status
+ bar. See <xref linkend="status-bar" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>From the keyboard, if a keyboard shortcut has been
+ assigned to the <guimenuitem>Toggle Line Separator</guimenuitem>
+ command in the <guibutton>Shortcuts</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. By default, this command does
+ not have a keyboard shortcut.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>By default, new files are saved with your operating system's
+ native line separator. This can be changed in the
+ <guibutton>General</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref linkend="general-pane" />.
+ Note that changing this setting has no effect on existing files.</para>
+ </section>
+
+ <section id="encodings">
+ <title>Character Encodings</title>
+
+ <para>A character encoding is a mapping from a set of characters to
+ their on-disk representation. jEdit can use any encoding supported by
+ the Java platform.</para>
+
+ <para>Buffers in memory are always stored in <literal>UTF-16</literal>
+ encoding, which means each character is mapped to an integer between 0
+ and 65535. <literal>UTF-16</literal> is the native encoding supported by
+ Java, and has a large enough range of characters to support most modern
+ languages.</para>
+
+ <para>When a buffer is loaded, it is converted from its on-disk
+ representation to <literal>UTF-16</literal> using a specified
+ encoding.</para>
+
+ <para>The default encoding, used to load files for which no other
+ encoding is specified, can be set in the
+ <guibutton>Encodings</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref linkend="encodings-pane" />.
+ Unless you change this setting, it will be your operating system's
+ native encoding, for example <literal>MacRoman</literal> on the MacOS,
+ <literal>windows-1252</literal> on Windows, and
+ <literal>ISO-8859-1</literal> on Unix.</para>
+
+ <para>An encoding can be explicitly set when opening a file in the file
+ system browser's
+ <guimenu>Commands</guimenu>><guisubmenu>Encoding</guisubmenu>
+ menu.</para>
+
+ <para>Note that there is no general way to auto-detect the encoding used
+ by a file, however in a few cases it is possible:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>UTF-16</literal> and <literal>UTF-8Y</literal>
+ files are auto-detected, because they begin with a certain fixed
+ character sequence. Note that plain UTF-8 does not mandate a
+ specific header, and thus cannot be auto-detected, unless the
+ file in question is an XML file.</para>
+ </listitem>
+
+ <listitem>
+ <para>Encodings used in XML files with an XML PI like the
+ following are auto-detected:</para>
+
+ <programlisting><?xml version="1.0" encoding="UTF-8"></programlisting>
+ </listitem>
+ </itemizedlist>
+
+ <para>The encoding that will be used to save the current buffer is shown
+ in the status bar, and can be changed in the
+ <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> dialog box. Note that changing this setting has no
+ effect on the buffer's contents; if you opened a file with the wrong
+ encoding and got garbage, you will need to reload it.
+ <guimenu>File</guimenu>><guimenuitem>Reload with
+ Encoding</guimenuitem> is an easy way.</para>
+
+ <para>If a file is opened without an explicit encoding specified and it
+ appears in the recent file list, jEdit will use the encoding last used
+ when working with that file; otherwise the default encoding will be
+ used.</para>
+
+ <section>
+ <title>Commonly Used Encodings</title>
+
+ <para>While the world is slowly converging on UTF-8 and UTF-16
+ encodings for storing text, a wide range of older encodings are
+ still in widespread use and Java supports most of them.</para>
+
+ <para>The simplest character encoding still in use is ASCII, or
+ <quote>American Standard Code for Information Interchange</quote>.
+ ASCII encodes Latin letters used in English, in addition to numbers
+ and a range of punctuation characters. Each ASCII character consists
+ of 7 bits, there is a limit of 128 distinct characters, which makes
+ it unsuitable for anything other than English text. jEdit will load
+ and save files as ASCII if the <literal>US-ASCII</literal> encoding
+ is used.</para>
+
+ <para>Because ASCII is unsuitable for international use, most
+ operating systems use an 8-bit extension of ASCII, with the first
+ 128 values mapped to the ASCII characters, and the rest used to
+ encode accents, umlauts, and various more esoteric used
+ typographical marks. The three major operating systems all extend
+ ASCII in a different way. Files written by Macintosh programs can be
+ read using the <literal>MacRoman</literal> encoding; Windows text
+ files are usually stored as <literal>windows-1252</literal>. In the
+ Unix world, the <literal>8859_1</literal> character encoding has
+ found widespread usage.</para>
+
+ <para>On Windows, various other encodings, referred to as
+ <firstterm>code pages</firstterm> and identified by number, are used
+ to store non-English text. The corresponding Java encoding name is
+ <literal>windows-</literal> followed by the code page number, for
+ example <literal>windows-850</literal>.</para>
+
+ <para>Many common cross-platform international character sets are
+ also supported; <literal>KOI8_R</literal> for Russian text,
+ <literal>Big5</literal> and <literal>GBK</literal> for Chinese, and
+ <literal>SJIS</literal> for Japanese.</para>
+ </section>
+ </section>
+
+ <section id="vfs-browser">
+ <title>The File System Browser (FSB)</title>
+
+ <para><guimenu>Utilities</guimenu>><guimenuitem>File System
+ Browser</guimenuitem> displays the file system browser. By default, the
+ file system browser is shown in a floating window. This window can be
+ docked using the commands in its top-left corner popup menu; see <xref
+ linkend="docking" />.</para>
+
+ <para>The FSB can be customized in the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="vfs-browser-pane" />.</para>
+
+ <section>
+ <title>Navigating the File System</title>
+
+ <para>The directory to browse is specified in the
+ <guibutton>Path</guibutton> text field. Clicking the mouse in the
+ text field automatically selects its contents allowing a new path to
+ be quickly typed in. If a relative path is entered, it will be
+ resolved relative to the current path. This text field remembers
+ previously entered strings; see <xref linkend="history" />. The same
+ list of previously browsed directories is also listed in the
+ <guimenu>Utilities</guimenu>><guisubmenu>Recent
+ Directories</guisubmenu> menu; selecting one opens it in the file
+ system browser.</para>
+
+ <para>To browse a listed directory, double-click it (or if you have
+ a three-button mouse, you can click the middle mouse button as
+ well). Alternatively, click the disclosure widget next to a
+ directory to list its contents in place. To browse higher up in the
+ directory hierarchy, double-click one of the parent directories in
+ the parent directory list.</para>
+
+ <para>Files and directories in the file list are shown in different
+ colors depending on what glob patterns their names match. The
+ patterns and colors can be customized in the <guibutton>File System
+ Browser</guibutton>><guibutton>Colors</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box.</para>
+
+ <para>The <guibutton>Path:</guibutton> Text Box can be used to
+ navigate to a specific directory. Environment variables are expanded
+ here, allowing for both <literal>$VARNAME</literal> or
+ <literal>%VARNAME%</literal> syntax. </para>
+
+ <para> <literal>A+Up</literal> is a keyboard shortcut that brings
+ you to the parent directory. </para>
+
+ <para> <literal>A+Left</literal> and <literal>A+Right</literal> navigate back and forward through the visited directory stacks, in a
+ Netscape/Konqueror/IE like fashion. </para>
+
+ <para>To see a specific set of files only (for example, those whose
+ names end with <filename>.java</filename>), enter a glob pattern in
+ the <guibutton>Filter</guibutton> text field. This text fields
+ remembers previously entered strings. See <xref linkend="globs" />
+ for information about glob patterns.</para>
+
+ <para>Unopened files can be opened by double-clicking (or by
+ clicking the middle mouse button). Open files have their names
+ underlined, and can be selected by single-clicking. Holding down
+ <keycap>Shift</keycap> while opening a file will open it in a new
+ view.</para>
+
+ <para>Clicking a file or directory with the right mouse button
+ displays a popup menu containing various commands.
+ <!-- Note that attempting to delete a directory containing files will give an error; only empty directories can be deleted. -->
+ </para>
+
+ <tip>
+ <para>The file list sorting algorithm used in jEdit handles
+ numbers in file names in an intelligent manner. For example, a
+ file named <filename>section10.xml</filename> will be placed
+ after a file named <filename>section5.xml</filename>. A
+ conventional letter-by-letter sort would have placed these two
+ files in the wrong order.</para>
+ </tip>
+
+
+ </section>
+
+ <section>
+ <title>The Tool Bar</title>
+
+ <para>The file system browser has a tool bar containing a number of
+ buttons. Each item in the <guibutton>Commands</guibutton> menu
+ (described below) except <guimenuitem>Show Hidden
+ Files</guimenuitem> and <guisubmenu>Encoding</guisubmenu> has a
+ corresponding tool bar button.</para>
+ </section>
+
+ <section>
+ <title>The Commands Menu</title>
+
+ <para>Clicking the <guibutton>Commands</guibutton> button displays a
+ menu containing the following items:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><guimenuitem>Parent Directory</guimenuitem> - moves up
+ in the directory hierarchy. The Alt+Left arrow keyboard shortcut achieves the same thing. </para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Reload Directory</guimenuitem> - reloads
+ the file list from disk. F5 does this also. </para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Root Directory</guimenuitem> - on Unix,
+ goes to the root directory (<filename>/</filename>). On
+ Windows and MacOS X, lists all mounted drives and network
+ shares. The forward slash (/) achieves this too. </para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Home Directory</guimenuitem> - displays
+ your home directory. Keyboard shortcut: ~ </para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Directory of Current Buffer</guimenuitem>
+ - displays the directory containing the currently active
+ buffer. Shortcut: - </para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>New File</guimenuitem> (Ctrl+N) - opens new, empty, buffer in the current directory. The file will not actually be created on disk until the buffer is
+ saved.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>New Directory</guimenuitem> - creates a
+ new directory after prompting for the desired name.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Search in Directory</guimenuitem> -
+ displays the search and replace dialog box set to search all
+ files in the current directory. If a file is selected when
+ this command is invoked, its extension becomes the file name
+ filter for the search; otherwise, the file name filter
+ entered in the browser is used. See <xref
+ linkend="search-replace" /> for details.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Show Hidden Files</guimenuitem> - toggles
+ if hidden files are to be shown in the file list.</para>
+ </listitem>
+
+ <listitem>
+ <para><guisubmenu>Encoding</guisubmenu> - a menu for
+ selecting the character encoding to use when opening files.
+ See <xref linkend="encodings" />.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>The Plugins Menu</title>
+
+ <para>Clicking the <guibutton>Plugins</guibutton> button displays a
+ menu containing plugin commands. For information about plugins, see
+ <xref linkend="using-plugins" />.</para>
+ </section>
+
+ <section>
+ <title>The Favorites Menu</title>
+
+ <para>Clicking the <guibutton>Favorites</guibutton> button displays
+ a menu showing all files and directories in the favorites list. The
+ <guimenuitem>Add to Favorites</guimenuitem> item adds the currently
+ selected file to the favorites list. If nothing is selected, the
+ current directory is added. To remove a file from the favorites,
+ invoke <guimenuitem>Edit Favorites</guimenuitem>, which will show
+ the favorites list in the file system view, then select
+ <guimenuitem>Delete</guimenuitem> from the right-click menu of the
+ entry you want to remove.</para>
+ </section>
+
+ <section>
+ <title>Keyboard Shortcuts</title>
+
+ <para>Completion behaves differently in file dialogs than in the
+ stand-alone file system browser window.</para>
+
+ <para>In the file dialog, keyboard input goes in the file name field
+ by default. Pressing <keycap>Enter</keycap> opens the file or
+ directory path that is either fully or partially entered in the file
+ name field. Typing the first few characters of a file's name selects
+ that file. If the file name field is empty and nothing is selected,
+ <keycap>/</keycap> lists the root directory on Unix and the list of
+ drives on Windows. There are two handy abbreviations that may be
+ used in file paths: <keycap>~</keycap> expands to the home
+ directory, and <keycap>-</keycap> expands to the current buffer's
+ directory.</para>
+
+ <para>For example, to open a file
+ <filename>/home/slava/jEdit/doc/TODO.txt</filename>, you might enter
+ <filename>~/j/d/to</filename>.</para>
+
+ <para>In the stand-alone file system browser, keyboard input is
+ handled slightly differently. There is no file name field, instead
+ shortcuts are active when the file tree has keyboard focus.
+ Additionally, pressing <keycap>/</keycap>, <keycap>~</keycap> or
+ <keycap>-</keycap> always immediately goes to the root, home and
+ current buffer's directory, respectively.</para>
+ </section>
+ </section>
+
+ <section id="reloading">
+ <title>Reloading From Disk</title>
+
+ <para>When a view is brought to the foreground, jEdit checks if any open
+ buffers were modified on disk by another application. All affected
+ buffers are listed in a dialog box. By default, buffers without unsaved
+ changes are automatically reloaded. This feature can be disabled, or
+ changed to prompt if files should be reloaded first, in the
+ <guibutton>General</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="global-opts" />.</para>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Reload</guimenuitem> can
+ be used to reload the current buffer from disk at any other time; a
+ confirmation dialog box will be displayed first if the buffer has
+ unsaved changes.</para>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Reload All</guimenuitem>
+ discards unsaved changes in all open buffers and reload them from disk,
+ asking for confirmation first.</para>
+ </section>
+
+ <section id="threaded-io">
+ <title>Multi-Threaded I/O</title>
+
+ <para>To improve responsiveness and perceived performance, jEdit
+ executes all buffer input/output operations asynchronously. While I/O is
+ in progress, the status bar displays the number of remaining I/O
+ operations.</para>
+
+ <para>The
+ <guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>I/O
+ Progress Monitor</guimenuitem> command displays a window with more
+ detailed status information and progress meters. By default, the
+ <guimenuitem>I/O Progress Monitor</guimenuitem> is shown in a floating
+ window. This window can be docked using the commands in its top-left
+ corner popup menu; see <xref linkend="docking" />. I/O requests can also
+ be aborted in this window, however note that aborting a buffer save can
+ result in data loss.</para>
+
+ <!-- <para>
+ By default, four I/O threads are created, which means that up
+ to four buffers can be loaded or saved simultaneously. The number of
+ threads can be changed in the
+ <guibutton>Loading and Saving</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global Options</guimenuitem>
+ dialog box; see <xref linkend="global-opts" />. Setting the number to zero
+ disables multi-threaded I/O completely; doing this is not recommended.
+ </para> -->
+ </section>
+
+ <section id="printing">
+ <title>Printing</title>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Print</guimenuitem>
+ (shortcut: <keycap>C+p</keycap>) prints the current buffer.</para>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Page Setup</guimenuitem>
+ displays a dialog box for changing your operating system's print
+ settings, such as margins, page size, print quality, and so on.</para>
+
+ <para>The print output can be customized in the
+ <guibutton>Printing</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref linkend="printing-pane" />.
+ The following settings can be changed:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>The font to use when printing.</para>
+ </listitem>
+
+ <listitem>
+ <para>If a header with the file name should be printed on each
+ page.</para>
+ </listitem>
+
+ <listitem>
+ <para>If a footer with the page number and current date should
+ be printed on each page.</para>
+ </listitem>
+
+ <listitem>
+ <para>If line numbers should be printed.</para>
+ </listitem>
+
+ <listitem>
+ <para>If the output should be color or black and white.</para>
+ </listitem>
+
+ <listitem>
+ <para>The tab size to use when printing - this will usually be
+ less than the text area tab size, to conserve space in the
+ printed output.</para>
+ </listitem>
+
+ <listitem>
+ <para>If folded regions should be printed.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="closing-exiting">
+ <title>Closing Files and Exiting jEdit</title>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Close</guimenuitem>
+ (shortcut: <keycap>C+w</keycap>) closes the current buffer. If it has
+ unsaved changes, jEdit will ask if they should be saved first.</para>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Close All</guimenuitem>
+ (shortcut: <keycap>C+e C+w</keycap>) closes all buffers. If any buffers
+ have unsaved changes, they will be listed in a dialog box where they can
+ be saved or discarded. In the dialog box, multiple buffers to operate on
+ at once can be selected by clicking on them in the list while holding
+ down <keycap>Control</keycap>. After all buffers have been closed, a new
+ untitled buffer is opened.</para>
+
+ <para><guimenu>File</guimenu>><guimenuitem>Exit</guimenuitem>
+ (shortcut: <keycap>C+q</keycap>) will completely exit jEdit, prompting
+ if unsaved buffers should be saved first.</para>
+ </section>
+</chapter>
diff --git a/jEdit/doc/users-guide/globs.xml b/jEdit/doc/users-guide/globs.xml
index 4540ec6..eb3d33e 100644
--- a/jEdit/doc/users-guide/globs.xml
+++ b/jEdit/doc/users-guide/globs.xml
@@ -1,137 +1,137 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<appendix id="globs">
- <title>Glob Patterns</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=1:noTabs=true: -->
-
- <!-- :xml.root=users-guide.xml: -->
-
- <para>jEdit uses glob patterns similar to those in the various Unix shells
- to implement file name filters in the file system browser. Glob patterns
- resemble regular expressions somewhat, but have a much simpler syntax. The
- following character sequences have special meaning within a glob
- pattern:</para>
-
- <itemizedlist>
- <listitem>
- <para><literal>?</literal> matches any one character</para>
- </listitem>
-
- <listitem>
- <para><literal>*</literal> matches any number of characters</para>
- </listitem>
-
- <listitem>
- <para><literal>{!<replaceable>glob</replaceable>}</literal> Matches
- anything that does <emphasis>not</emphasis> match
- <replaceable>glob</replaceable></para>
- </listitem>
-
- <listitem>
- <para><literal>{<replaceable>a</replaceable>,<replaceable>b</replaceable>,<replaceable>c</replaceable>}</literal>
- matches any one of <replaceable>a</replaceable>,
- <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
- </listitem>
-
- <listitem>
- <para><literal>[<replaceable>abc</replaceable>]</literal> matches
- any character in the set <replaceable>a</replaceable>,
- <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
- </listitem>
-
- <listitem>
- <para><literal>[^<replaceable>abc</replaceable>]</literal> matches
- any character not in the set <replaceable>a</replaceable>,
- <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
- </listitem>
-
- <listitem>
- <para><literal>[<replaceable>a-z</replaceable>]</literal> matches
- any character in the range <replaceable>a</replaceable> to
- <replaceable>z</replaceable>, inclusive. A leading or trailing dash
- will be interpreted literally</para>
- </listitem>
- </itemizedlist>
-
- <para>Since we use <literal>java.util.regex</literal> patterns to implement
- globs, this means that in addition to the above, a number of
- <quote>character class metacharacters</quote> may be used. Keep in mind,
- their usefulness is limited since the regex quantifier metacharacters
- (asterisk, questionmark, and curly brackets) are redefined to mean something
- else in filename glob language, and the regex quantifiers are not available
- in glob language.</para>
-
- <itemizedlist>
- <listitem>
- <para><literal>\w</literal> matches any alphanumeric character or
- underscore</para>
- </listitem>
-
- <listitem>
- <para><literal>\s</literal> matches a space or horizontal tab</para>
- </listitem>
-
- <listitem>
- <para><literal>\S</literal> matches a printable
- non-whitespace.</para>
- </listitem>
-
- <listitem>
- <para><literal>\d</literal> matches a decimal digit</para>
- </listitem>
- </itemizedlist>
-
- <para>Here are some examples of glob patterns:</para>
-
- <itemizedlist>
- <listitem>
- <para><userinput>*</userinput> - all files.</para>
- </listitem>
-
- <listitem>
- <para><userinput>*.java</userinput> - all files whose names end with
- <quote>.java</quote>.</para>
- </listitem>
-
- <listitem>
- <para><userinput>*.[ch]</userinput> - all files whose names end with
- either <quote>.c</quote> or <quote>.h</quote>.</para>
- </listitem>
-
- <listitem>
- <para><userinput>*.{c,cpp,h,hpp,cxx,hxx}</userinput> - all C or C++
- files.</para>
- </listitem>
-
- <listitem>
- <para><userinput>[^#]*</userinput> - all files whose names do not
- start with <quote>#</quote>.</para>
- </listitem>
- </itemizedlist>
-
- <bridgehead>Using regexes instead of globs</bridgehead>
-
- <para>Sometimes it is desirable to use a regular expression instead of a
- glob for specifying file sets. This is because regular expressions are more
- powerful than globs and can provide the user with more specific filename
- matching criteria. To avoid the glob-to-regex transformation, prefix your
- pattern with the string <literal>(re)</literal>, which will tell jEdit to
- not translate the following pattern into a regex (since it already is one).
- For example:</para>
-
- <glosslist>
- <glossentry>
- <glossterm><literal> (re).*\.(h|c(c|pp)?) </literal></glossterm>
-
- <glossdef>
- <para>Matches *.c, *.cpp, *.h, *.cc</para>
- </glossdef>
- </glossentry>
- </glosslist>
-
- <para>If you need to match files that begin with the glob-translate-disable
- prefix <literal>(re)</literal>, you can escape it with a leading backslash
- and the metacharacters will be translated into globs as before.</para>
+<?xml version="1.0" encoding="UTF-8"?>
+<appendix id="globs">
+ <title>Glob Patterns</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=1:noTabs=true: -->
+
+ <!-- :xml.root=users-guide.xml: -->
+
+ <para>jEdit uses glob patterns similar to those in the various Unix shells
+ to implement file name filters in the file system browser. Glob patterns
+ resemble regular expressions somewhat, but have a much simpler syntax. The
+ following character sequences have special meaning within a glob
+ pattern:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>?</literal> matches any one character</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>*</literal> matches any number of characters</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>{!<replaceable>glob</replaceable>}</literal> Matches
+ anything that does <emphasis>not</emphasis> match
+ <replaceable>glob</replaceable></para>
+ </listitem>
+
+ <listitem>
+ <para><literal>{<replaceable>a</replaceable>,<replaceable>b</replaceable>,<replaceable>c</replaceable>}</literal>
+ matches any one of <replaceable>a</replaceable>,
+ <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
+ </listitem>
+
+ <listitem>
+ <para><literal>[<replaceable>abc</replaceable>]</literal> matches
+ any character in the set <replaceable>a</replaceable>,
+ <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
+ </listitem>
+
+ <listitem>
+ <para><literal>[^<replaceable>abc</replaceable>]</literal> matches
+ any character not in the set <replaceable>a</replaceable>,
+ <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
+ </listitem>
+
+ <listitem>
+ <para><literal>[<replaceable>a-z</replaceable>]</literal> matches
+ any character in the range <replaceable>a</replaceable> to
+ <replaceable>z</replaceable>, inclusive. A leading or trailing dash
+ will be interpreted literally</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Since we use <literal>java.util.regex</literal> patterns to implement
+ globs, this means that in addition to the above, a number of
+ <quote>character class metacharacters</quote> may be used. Keep in mind,
+ their usefulness is limited since the regex quantifier metacharacters
+ (asterisk, questionmark, and curly brackets) are redefined to mean something
+ else in filename glob language, and the regex quantifiers are not available
+ in glob language.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>\w</literal> matches any alphanumeric character or
+ underscore</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\s</literal> matches a space or horizontal tab</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\S</literal> matches a printable
+ non-whitespace.</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\d</literal> matches a decimal digit</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Here are some examples of glob patterns:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><userinput>*</userinput> - all files.</para>
+ </listitem>
+
+ <listitem>
+ <para><userinput>*.java</userinput> - all files whose names end with
+ <quote>.java</quote>.</para>
+ </listitem>
+
+ <listitem>
+ <para><userinput>*.[ch]</userinput> - all files whose names end with
+ either <quote>.c</quote> or <quote>.h</quote>.</para>
+ </listitem>
+
+ <listitem>
+ <para><userinput>*.{c,cpp,h,hpp,cxx,hxx}</userinput> - all C or C++
+ files.</para>
+ </listitem>
+
+ <listitem>
+ <para><userinput>[^#]*</userinput> - all files whose names do not
+ start with <quote>#</quote>.</para>
+ </listitem>
+ </itemizedlist>
+
+ <bridgehead>Using regexes instead of globs</bridgehead>
+
+ <para>Sometimes it is desirable to use a regular expression instead of a
+ glob for specifying file sets. This is because regular expressions are more
+ powerful than globs and can provide the user with more specific filename
+ matching criteria. To avoid the glob-to-regex transformation, prefix your
+ pattern with the string <literal>(re)</literal>, which will tell jEdit to
+ not translate the following pattern into a regex (since it already is one).
+ For example:</para>
+
+ <glosslist>
+ <glossentry>
+ <glossterm><literal> (re).*\.(h|c(c|pp)?) </literal></glossterm>
+
+ <glossdef>
+ <para>Matches *.c, *.cpp, *.h, *.cc</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+
+ <para>If you need to match files that begin with the glob-translate-disable
+ prefix <literal>(re)</literal>, you can escape it with a leading backslash
+ and the metacharacters will be translated into globs as before.</para>
</appendix>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/history.xml b/jEdit/doc/users-guide/history.xml
index c54f757..a5252ea 100644
--- a/jEdit/doc/users-guide/history.xml
+++ b/jEdit/doc/users-guide/history.xml
@@ -1,48 +1,48 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<appendix id="history">
- <title>History Text Fields</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=1:noTabs=true: -->
-
- <!-- :xml.root=users-guide.xml: -->
-
- <para>The text fields in many jEdit components, such as the file system
- browser, incremental search bar, and action bar, all remember the last 20
- entered strings by default. The number of strings to remember can be changed
- in the <guibutton>Appearance</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global Options</guimenuitem>
- dialog box; see <xref linkend="appearance-pane" />.</para>
-
- <para>Pressing <keycap>UP</keycap> recalls previous strings. Pressing
- <keycap>DOWN</keycap> after recalling previous strings recalls later
- strings.</para>
-
- <para>Pressing <keycap>S+UP</keycap> or <keycap>S+DOWN</keycap> will search
- backwards or forwards, respectively, for strings beginning with the text
- already entered in the text field.</para>
-
- <para>Clicking the triangle to the right of the text field, or clicking with
- the right-mouse button anywhere else will display a pop-up menu of all
- previously entered strings; selecting one will input it into the text field.
- Selecting the first item, "previously entered strings:" pops up
- a dialog that lets you change previously entered strings.
- Holding down <keycap>Shift</keycap> while clicking will display a menu of
- all previously entered strings that begin with the text already
- entered.</para>
-
- <note>
- <title>Search and Replace fields</title>
-
- <para>In jEdit 4.3, the search/replace history fields are multi-line
- textareas, so they no longer use the same single-line history textfield
- described above. The multiline history textarea behaves a little
- differently: <keycap>UP</keycap> and <keycap>DOWN</keycap> arrows go up
- and down a line in the textarea, instead of through the previously
- entered strings. <keycap>PageUp</keycap> and <keycap>PageDown</keycap>
- are used instead to select history strings, and there is no arrow combo
- button, although right-click will still show you the history as a
- context menu.</para>
- </note>
+<?xml version="1.0" encoding="UTF-8"?>
+<appendix id="history">
+ <title>History Text Fields</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=1:noTabs=true: -->
+
+ <!-- :xml.root=users-guide.xml: -->
+
+ <para>The text fields in many jEdit components, such as the file system
+ browser, incremental search bar, and action bar, all remember the last 20
+ entered strings by default. The number of strings to remember can be changed
+ in the <guibutton>Appearance</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global Options</guimenuitem>
+ dialog box; see <xref linkend="appearance-pane" />.</para>
+
+ <para>Pressing <keycap>UP</keycap> recalls previous strings. Pressing
+ <keycap>DOWN</keycap> after recalling previous strings recalls later
+ strings.</para>
+
+ <para>Pressing <keycap>S+UP</keycap> or <keycap>S+DOWN</keycap> will search
+ backwards or forwards, respectively, for strings beginning with the text
+ already entered in the text field.</para>
+
+ <para>Clicking the triangle to the right of the text field, or clicking with
+ the right-mouse button anywhere else will display a pop-up menu of all
+ previously entered strings; selecting one will input it into the text field.
+ Selecting the first item, "previously entered strings:" pops up
+ a dialog that lets you change previously entered strings.
+ Holding down <keycap>Shift</keycap> while clicking will display a menu of
+ all previously entered strings that begin with the text already
+ entered.</para>
+
+ <note>
+ <title>Search and Replace fields</title>
+
+ <para>In jEdit 4.3, the search/replace history fields are multi-line
+ textareas, so they no longer use the same single-line history textfield
+ described above. The multiline history textarea behaves a little
+ differently: <keycap>UP</keycap> and <keycap>DOWN</keycap> arrows go up
+ and down a line in the textarea, instead of through the previously
+ entered strings. <keycap>PageUp</keycap> and <keycap>PageDown</keycap>
+ are used instead to select history strings, and there is no arrow combo
+ button, although right-click will still show you the history as a
+ context menu.</para>
+ </note>
</appendix>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/installing-modes.xml b/jEdit/doc/users-guide/installing-modes.xml
index 4384833..28e4ab6 100644
--- a/jEdit/doc/users-guide/installing-modes.xml
+++ b/jEdit/doc/users-guide/installing-modes.xml
@@ -1,74 +1,73 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="installing-modes">
- <title>Installing Edit Modes</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=1:noTabs=true: -->
-
- <!-- :xml.root=users-guide.xml: -->
-
- <para>jEdit looks for edit modes in two locations; the
- <filename>modes</filename> subdirectory of the jEdit settings directory, and
- the <filename>modes</filename> subdirectory of the jEdit install directory.
- The location of the settings directory is system-specific; see <xref
- linkend="settings-directory" />.</para>
-
- <para>Each mode directory contains a <filename>catalog</filename> file. All
- edit modes contained in that directory must be listed in the catalog,
- otherwise they will not be available to jEdit.</para>
-
- <para>Catalogs, like modes themselves, are written in XML. They consist of a
- single <literal>MODES</literal> tag, with a number of
- <literal>MODE</literal> tags inside. Each mode tag associates a mode name
- with an XML file, and specifies the file name and first line pattern for the
- mode. A sample mode catalog looks as follows:</para>
-
- <programlisting><?xml version="1.0"?>
-<!DOCTYPE CATALOG SYSTEM "catalog.dtd">
-
-<MODES>
- <MODE NAME="shellscript" FILE="shellscript.xml"
- FILE_NAME_GLOB="*.sh"
- FIRST_LINE_GLOB="#!/*sh*" />
-</MODES></programlisting>
-
- <para>In the above example, a mode named <quote>shellscript</quote> is
- defined, and is used for files whose names end with
- <filename>.sh</filename>, or whose first line starts with <quote>#!/</quote>
- and contains <quote>sh</quote>.</para>
-
- <para>The <literal>MODE</literal> tag supports the following
- attributes:</para>
-
- <itemizedlist>
- <listitem>
- <para><literal>NAME</literal> - the name of the edit mode, as it
- will appear in the <guimenuitem>Buffer Options</guimenuitem> dialog
- box, the status bar, and so on.</para>
- </listitem>
-
- <listitem>
- <para><literal>FILE</literal> - the name of the XML file containing
- the mode definition.</para>
- </listitem>
-
- <listitem>
- <para><literal>FILE_NAME_GLOB</literal> - files whose names match
- this glob pattern will be opened in this edit mode.</para>
- </listitem>
-
- <listitem>
- <para><literal>FIRST_LINE_GLOB</literal> - files whose first line
- matches this glob pattern will be opened in this edit mode.</para>
- </listitem>
- </itemizedlist>
-
- <para>Glob pattern syntax is described in <xref linkend="globs" />.</para>
-
- <tip>
- <para>If an edit mode in the user-specific catalog has the same name as
- an edit mode in the system catalog, the version in the user-specific
- catalog will override the system default.</para>
- </tip>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="installing-modes">
+ <title>Installing Edit Modes</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=1:noTabs=true: -->
+
+ <!-- :xml.root=users-guide.xml: -->
+ <para>jEdit looks for edit modes in two locations; the
+ <filename>modes</filename> subdirectory of the jEdit settings directory, and
+ the <filename>modes</filename> subdirectory of the jEdit install directory.
+ The location of the settings directory is system-specific; see <xref
+ linkend="settings-directory" />.</para>
+
+ <para>Each mode directory contains a <filename>catalog</filename> file. All
+ edit modes contained in that directory must be listed in the catalog,
+ otherwise they will not be available to jEdit.</para>
+
+ <para>Catalogs, like modes themselves, are written in XML. They consist of a
+ single <literal>MODES</literal> tag, with a number of
+ <literal>MODE</literal> tags inside. Each mode tag associates a mode name
+ with an XML file, and specifies the file name and first line pattern for the
+ mode. A sample mode catalog looks as follows:</para>
+
+ <programlisting><?xml version="1.0"?>
+<!DOCTYPE CATALOG SYSTEM "catalog.dtd">
+
+<MODES>
+ <MODE NAME="shellscript" FILE="shellscript.xml"
+ FILE_NAME_GLOB="*.sh"
+ FIRST_LINE_GLOB="#!/*sh*" />
+</MODES></programlisting>
+
+ <para>In the above example, a mode named <quote>shellscript</quote> is
+ defined, and is used for files whose names end with
+ <filename>.sh</filename>, or whose first line starts with <quote>#!/</quote>
+ and contains <quote>sh</quote>.</para>
+
+ <para>The <literal>MODE</literal> tag supports the following
+ attributes:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>NAME</literal> - the name of the edit mode, as it
+ will appear in the <guimenuitem>Buffer Options</guimenuitem> dialog
+ box, the status bar, and so on.</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>FILE</literal> - the name of the XML file containing
+ the mode definition.</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>FILE_NAME_GLOB</literal> - files whose names match
+ this glob pattern will be opened in this edit mode.</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>FIRST_LINE_GLOB</literal> - files whose first line
+ matches this glob pattern will be opened in this edit mode.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Glob pattern syntax is described in <xref linkend="globs" />.</para>
+
+ <tip>
+ <para>If an edit mode in the user-specific catalog has the same name as
+ an edit mode in the system catalog, the version in the user-specific
+ catalog will override the system default.</para>
+ </tip>
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/launcher-guide.xml b/jEdit/doc/users-guide/launcher-guide.xml
index b280564..1e78cb7 100644
--- a/jEdit/doc/users-guide/launcher-guide.xml
+++ b/jEdit/doc/users-guide/launcher-guide.xml
@@ -1,537 +1,537 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- :xml.root=users-guide.xml: -->
-<appendix id="launcher-guide">
- <title>jEditLauncher for Windows</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :tabSize=2:indentSize=1:noTabs=true:maxLineLen=72: -->
- <!-- jEditLauncher 4.0 (R2) Quick Guide -->
- <!-- Copyright (C) 2001, 2002 John Gellene -->
- <!-- $Id: launcher-guide.xml 16181 2009-09-08 19:26:57Z ezust $
--->
- <section id="launcher-intro">
- <title>Introduction</title>
-
- <para>The jEditLauncher package is a set of lightweight components for
- running jEdit under the Windows group of operating systems. The package
- is designed to run on Windows 95, Windows 98, Windows Me, Windows NT
- (versions 4.0 and greater), Windows 2000 and Windows XP.</para>
-
- <para>While jEdit does not make available a component-type interface, it
- does contains an <quote>EditServer</quote> that listens on a socket for
- requests to load scripts written in the BeanShell scripting language.
- When the server activates, it writes the server port number and a
- pseudo-random, numeric authorization key to a text file. By default, the
- file is named <filename>server</filename> and is located in the settings
- directory (see <xref linkend="settings-directory" />).</para>
-
- <para>The jEditLauncher component locates and reads this file, opens a
- socket and attempts to connect to the indicated port. If successful, it
- transmits the appropriate BeanShell script to the server. If
- unsuccessful, it attempts to start jEdit and repeats the socket
- transmission once it can obtain the port and key information. The
- component will abandon the effort to connect roughly twenty seconds
- after it launches the application.</para>
- </section>
-
- <section id="launcher-starting">
- <title>Starting jEdit</title>
-
- <para>The main component of the jEditLauncher package is a client
- application entitled <command>jedit.exe</command>. It may be executed
- either from either Windows Explorer, a shortcut icon or the command
- line. It uses the jEditLauncher COM component to open files in jEdit
- that are listed as command line parameters. It supports Windows and UNC
- file specifications as well as wild cards. If called without parameters,
- it will launch jEdit. If jEdit is already running<!-- and has an active
- EditServer -->, it will simply open a new, empty buffer.</para>
-
- <para><command>jedit.exe</command> supports five command-line options.
- Except for the <userinput>/1</userinput> option, if any of these options
- are invoked correctly, the application will not load files or execute
- jEdit.</para>
-
- <itemizedlist>
- <listitem>
- <para>The option <userinput>/h</userinput> causes a window to be
- displayed with a brief description of the application and its
- various options.</para>
- </listitem>
-
- <listitem>
- <para>The option <userinput>/p</userinput> will activate a
- dialog window displaying the command-line parameters to be used
- when calling jEdit. This option can also be triggered by
- selecting <guilabel>Set jEdit Parameters</guilabel> from the
- <guilabel>jEdit</guilabel> section of the Windows Programs menu,
- or by running the utility program
- <command>jedinit.exe</command></para>
-
- <para>Using the dialog, you can change parameters specifying the
- executable for the Java application loader (either
- <filename>java.exe</filename> or
- <filename>javaw.exe</filename>), the location of the jEdit
- archive file, <filename>jedit.jar</filename>, and command line
- options for both. <itemizedlist>
- <listitem>
- <para>The input fields for Java options and jEdit
- options are separate. If you insert an option in the
- wrong place it will not be properly executed.</para>
- </listitem>
-
- <listitem>
- <para>If the <userinput>-jar</userinput> option is
- not used with the Java application loader the
- principal jEdit class of
- <classname>org.gjt.sp.jedit.jEdit</classname> is set
- as fixed data.</para>
- </listitem>
-
- <listitem>
- <para>The working directory for the Java
- interpreter's process can also be specified.</para>
- </listitem>
- </itemizedlist> A read-only window at the bottom of the
- dialog displays the full command line that jEditLauncher will
- invoke.</para>
-
- <para>Before committing changes to the command line parameters,
- <command>jedit.exe</command> validates the paths for the Java
- and jEdit targets as well as the working directory. It will
- complain if the paths are invalid. It will not validate command
- line options, but it will warn you if it finds the
- <userinput>-noserver</userinput> option used for jEdit, since
- this will deactivate the edit server and make it impossible for
- jEditLauncher to open files.</para>
-
- <para>Note that due to the design of
- <application>jEditLauncher</application>, platform-independent
- command line options handled by jEdit itself (such as
- <userinput>-background</userinput> and
- <userinput>-norestore</userinput>) must be entered in the
- <quote>Set jEdit Parameters</quote> dialog box, and cannot be
- specified on the <command>jedit.exe</command> command line
- directly. For information about platform-independent command
- line options, see <xref linkend="cli-usage" />.</para>
- </listitem>
-
- <listitem>
- <para>The option <userinput>/1</userinput> is intended for use
- in circumstances where a single file name is passed to jEdit for
- opening, and quotation marks cannot be used to delimit file
- names containing whitespace. The launcher reads the entire
- command line following the <userinput>/1</userinput> options as
- a single file path, regardless of the presence of whitespace,
- and passes the resulting string as a single file name parameter
- to jEdit.</para>
-
- <para>This option allows jEdit to be used with version 5 or
- greater of Internet Explorer as an alternate text editor or as
- the target of the <guimenuitem>View Source</guimenuitem>
- command. Included with the jEditLauncher distribution is a file
- named <filename>jEdit_IE.reg.txt</filename> containing an
- example of a Window registry file that you can use to register
- jEdit as a HTML editor with Internet Explorer. Instructions for
- the file's use are included in the text.</para>
-
- <para>The use of the <userinput>/1</userinput> option with
- multiple file names or other parameters will lead to program
- errors or unpredictable results.</para>
- </listitem>
-
- <listitem>
- <para>The option <userinput>/i</userinput> is not mentioned in
- the help window for <filename>jedit.exe</filename>. It is
- intended primarily to be used in conjunction with jEdit's Java
- installer, but it can also be used to install or reinstall
- jEditLauncher manually. When accompanied by a second parameter
- specifying the directory where your preferred Java interpreter
- is located, jEditLauncher will install itself and set a
- reasonable initial set of command line parameters for executing
- jEdit. You can change these parameters later by running
- <filename>jedinit.exe</filename> or
- <filename>jedit.exe</filename> with the<userinput>/p</userinput>
- option.</para>
- </listitem>
-
- <listitem>
- <para>The option <userinput>/u</userinput> will cause
- jEditLauncher to be uninstalled by removing its registry
- entries. This option does not delete any jEditLauncher or jEdit
- files.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="launcher-menu">
- <title>The Context Menu Handler</title>
-
- <para>The jEditLauncher package also implements a context menu handler
- for the Windows shell. It is intended to be be installed as a handler
- available for any file. When you right-click on a file or shortcut icon,
- the context menu that appears will include an item displaying the jEdit
- icon and captioned <guilabel>Open with jEdit</guilabel>. If the file has
- an extension, another item will appear captioned <guilabel>Open *.XXX
- with jEdit</guilabel>, where XXX is the extension of the selected file.
- Clicking this item will cause jEdit to load all files with the same
- extension in the same directory as the selected file. Multiple file
- selections are also supported; in this circumstance only the
- <guilabel>Open with jEdit</guilabel> item appears.</para>
-
- <para>If a single file with a <filename>.bsh</filename> extension is
- selected, the menu will also contain an item captioned <guilabel>Run
- script in jEdit</guilabel>. Selecting this item will cause jEditLauncher
- to run the selected file as a BeanShell script.</para>
-
- <para>If exactly two files are selected, the menu will contain an entry
- for <guilabel>Show diff in jEdit</guilabel>. Selecting this item will
- load the two files in jEdit and have them displayed side-by-side with
- their differences highlighted by the <application>JDiff</application>
- plugin. The file selected first will be treated as the base for
- comparison purposes. If the plugin is not installed, an error message
- will be displayed in jEdit. See <xref linkend="using-plugins" /> for
- more information about installing plugins.</para>
- </section>
-
- <!-- open section -->
-
- <section id="launcher-jedidiff">
- <title>Using jEdit and jEditLauncher as a Diff Utility</title>
-
- <para>As noted above, you can create a graphical diff display comparing
- the contents of two text files by selecting the two files in an Explorer
- window, right-clicking to produce a context menu, and selecting the
- <guimenuitem>Show diff in jEdit</guimenuitem> menu item. The utility
- <filename>jedidiff.exe</filename> allows you to perform this operation
- from a command line. The command takes the two files to be compared as
- parameters; they should be delimited by quotation marks if their paths
- contain whitespace.</para>
- </section>
-
- <section id="launcher-uninstall">
- <title>Uninstalling jEdit and jEditLauncher</title>
-
- <para></para>
-
- <para>There are three ways to uninstall jEdit and jEditLauncher.</para>
-
- <itemizedlist>
- <listitem>
- <para>First, you can run <filename>unlaunch.exe</filename> in
- the jEdit installation directory.</para>
- </listitem>
-
- <listitem>
- <para>Second, you can choose <guilabel>Uninstall
- jEdit</guilabel> from the <guilabel>jEdit</guilabel> section of
- the Programs menu. <!-- This will
- uninstall the <quote>primary</quote> version of jEdit (and will
- designate a new primary version if any versions remain). --></para>
- </listitem>
-
- <listitem>
- <para>Third, you can choose the uninstall option for jEdit in
- the Control Panel's Add/Remove Programs applet. <!-- This allows you to specify
- unambiguously the version of jEdit that you wish to remove. --></para>
- </listitem>
- </itemizedlist>
-
- <para>Each of these options will deactivate jEditLauncher and delete all
- files in jEdit's installation directory. As a safeguard, jEditLauncher
- displays a warning window and requires the user to confirm an uninstall
- operation. Because the user's settings directory can be set and changed
- from one jEdit session to another, user settings files must be deleted
- manually.</para>
-
- <para>To deactivate jEditLauncher without deleting any files, run
- <filename>jedit /u</filename> from any command prompt where the jEdit
- installation directory is in the search path. This will remove the
- entries for jEditLauncher from the Windows registry. It will also
- disable the context menu handler and the automatic launching and
- scripting capabilities. The package can reactivated by executing
- <command>jedit.exe</command> again, and jEdit can be started in the same
- manner as any other Java application on your system.</para>
- </section>
-
- <section id="launcher-interface">
- <title>The jEditLauncher Interface</title>
-
- <para>The core of the jEditLauncher package is a COM component that can
- communicate with the EditServer, or open jEdit if it is not running or
- is otherwise refusing a connection. The component supports both Windows
- and UNC file specifications, including wild cards. It will resolve
- shortcut links to identify and transmit the name of the underlying
- file.</para>
-
- <para>Because it is implemented with a <quote>dual interface</quote>,
- the functions of jEditLauncher are available to scripting languages in
- the Windows environment such as VBScript, JScript, Perl (using the
- Win32::OLE package) and Python (using the win32com.client
- package).</para>
-
- <para>The scriptable interface consists of two read-only properties and
- six functions:</para>
-
- <para><emphasis>Properties</emphasis></para>
-
- <itemizedlist>
- <listitem>
- <para><varname>ServerPort</varname> - a read-only property that
- returns the port number found in jEdit's server file; the value
- is not tested for authenticity. It returns zero if the server
- information file cannot be located.</para>
- </listitem>
-
- <listitem>
- <para><varname>ServerKey</varname> - a read-only property that
- returns the numeric authorization key found in jEdit's server
- file; the value is not tested for authenticity. It returns zero
- if the server information file cannot be located.</para>
- </listitem>
- </itemizedlist>
-
- <para><emphasis>Functions</emphasis></para>
-
- <itemizedlist>
- <listitem>
- <para><function>OpenFile</function> - a method that takes a
- single file name (with or without wild card characters) as a
- parameter.</para>
- </listitem>
-
- <listitem>
- <para><function>OpenFiles</function> - this method takes an
- array of file names (with or without wild card characters) as a
- parameter. The form of the array is that which is used for
- arrays in the scripting environment. In JScript, for example the
- data type of the <classname>VARIANT</classname> holding the
- array is <classname>VT_DISPATCH</classname>; in VBScript, it is
- <classname>VT_ARRAY | VT_VARIANT</classname>, with array members
- having data type <classname>VT_BSTR</classname>.</para>
- </listitem>
-
- <listitem>
- <para><function>Launch</function> - this method with no
- parameters attempts to open jEdit without loading additional
- files.</para>
- </listitem>
-
- <listitem>
- <para><function>RunScript</function> - this method takes a file
- name or full file path as a parameter and runs the referenced
- file as a BeanShell script in jEdit. The predefined variables
- <varname>view</varname>, <varname>editPane</varname>,
- <varname>textArea</varname> and <varname>buffer</varname> are
- available to the script. If more than one view is open, the
- variable are initialized with reference to the earliest opened
- view. If no path is given for the file it will use the working
- directory of the calling process.</para>
- </listitem>
-
- <listitem>
- <para><function>EvalScript</function> - this method takes a
- string as a parameter containing one or more BeanShell
- statements and runs the script in jEdit's BeanShell interpreter.
- The predefined variables are available on the same basis as in
- <function>RunScript</function>.</para>
- </listitem>
-
- <listitem>
- <para><function>RunDiff</function> - this method takes two
- strings representing file names as parameters. If the
- <application>JDiff</application> plugin is installed, this
- method will activate the JDiff plugin and display the two files
- in the plugin's graphical <quote>dual diff</quote> format. The
- first parameter is treated as the base for display purposes. If
- the <application>JDiff</application> plugin is not installed, a
- error message box will be displayed in jEdit.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="launcher-examples">
- <title>Scripting Examples</title>
-
- <para>Here are some brief examples of scripts using jEditLauncher. The
- first two will run under Windows Script Host, which is either installed
- or available for download for 32-bit Windows operating systems. The next
- example is written in Perl and requires the Win32::OLE package. The last
- is written in Python and requires the win32gui and win32com.client
- extensions.</para>
-
- <para>If Windows Script Host is installed, you can run the first two
- scripts by typing the name of the file containing the script at a
- command prompt. In jEdit's <application>Console</application> plugin,
- you can type <userinput>cmd /c
- <replaceable>script_path</replaceable></userinput> or <userinput>wscript
- <replaceable>script_path</replaceable></userinput>.</para>
-
- <informalexample>
- <programlisting>' Example VBScript using jEditLauncher interface
-dim launcher
-set launcher = CreateObject("JEdit.JEditLauncher")
-a = Array("I:\Source Code Files\shellext\jeditshell\*.h", _
- "I:\Source Code Files\shellext\jeditshell\*.cpp")
-MsgBox "The server authorization code is " + _
- FormatNumber(launcher.ServerKey, 0, 0, 0, 0) + ".", _
- vbOKOnly + vbInformation, "jEditLauncher"
-launcher.openFiles(a)
-myScript = "jEdit.newFile(view); textArea.setSelectedText(" _
- & CHR(34) _
- & "Welcome to jEditLauncher." _
- & CHR(34) & ");"
-launcher.evalScript(myScript)</programlisting>
- </informalexample>
-
- <informalexample>
- <programlisting>/* Example JScript using jEditLauncher interface
- * Note: in contrast to VBScript, JScript does not
- * directly support message boxes outside a browser window
- */
-var launcher = WScript.createObject("JEdit.JEditLauncher");
-var a = new Array("I:\\weather.html", "I:\\test.txt");
-b = "I:\\*.pl";
-launcher.openFiles(a);
-launcher.openFile(b);
-c = "G:\\Program Files\\jEdit\\macros\\Misc"
- + "\\Properties\\System_properties.bsh";
-launcher.runScript(c);</programlisting>
- </informalexample>
-
- <informalexample>
- <programlisting># Example Perl script using jEditLauncher interface
-use Win32::OLE;
-$launcher = Win32::OLE->new('JEdit.JEditLauncher') ||
- die "JEditLauncher: not found !\n";
- at files = ();
-foreach $entry (@ARGV) {
- @new = glob($entry);
- push(@files, at new);
-}
-$launcher->openFiles(\@files);
-my($script) = "Macros.message(view, \"I found "
- .(scalar @files)." files.\");";
-$launcher->evalScript($script);</programlisting>
- </informalexample>
-
- <informalexample>
- <programlisting># Example Python script using jEditLauncher interface
-import win32gui
-import win32com.client
-o = win32com.client.Dispatch("JEdit.JEditLauncher")
-port = o.ServerPort
-if port == 0:
- port = "inactive. We will now launch jEdit"
-win32gui.MessageBox(0, "The server port is %s." % port,
- "jEditLauncher", 0)
-path = "C:\\WINNT\\Profiles\\Administrator\\Desktop\\"
-o.RunDiff(path + "Search.bsh", path + "Search2.bsh")
-</programlisting>
- </informalexample>
- </section>
-
- <!-- open section -->
-
- <section id="launcher-logging">
- <title>jEditLauncher Logging</title>
-
- <para>The jEditLauncher package has a logging facility that is separate
- from jEdit's Activity Log to provide a record of events occurring
- outside the Java virtual machine environment in which jEdit operates.
- The logging facility maintains two log files:
- <filename>jelaunch.log</filename> for events relating to starting jEdit,
- loading files and running scripts, and <filename>install.log</filename>
- for jEditLauncher installation activity. Both files are maintained in
- the directory in which jEdit is installed. They are cumulative from
- session to session, but may be manually deleted at any time without
- affecting program execution.</para>
- </section>
-
- <!-- <section id="launcher-install"><title>Standalone Installation</title>
- <para>
- Installation of jEditLauncher occurs as part of the installation of the
- jEdit package for Windows. If a full jEdit installation fails, you can
- install jEditLauncher by placing the following files in the same
- directory as <filename>jedit.jar</filename>, the archive containing the
- Java application:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <filename>jedit.exe</filename>
- </para>
- </listitem>
- <listitem>
- <para>
- <filename>jedinit.exe</filename>
- </para>
- </listitem>
- <listitem>
- <para>
- <filename>jeshlstb.dll</filename>
- </para>
- </listitem>
- <listitem>
- <para>
- <filename>jedinstl.dll</filename>
- </para>
- </listitem>
- <listitem>
- <para>
- <filename>jeditsvr.exe</filename>
- </para>
- </listitem>
- <listitem>
- <para>
- <filename>jeservps.dll</filename>
- </para>
- </listitem>
- <listitem>
- <para>
- <filename>unlaunch.exe</filename>
- </para>
- </listitem>
- </itemizedlist>
- <para>
- Anytime <filename>jedit.exe</filename> is executed (either directly or
- indirectly through a call to <filename>jedinit.exe</filename>),
- jEditLauncher checks to see if it is properly installed. If it is not,
- it will offer to install itself. If you agree, you will then be asked to
- supply the path to a Java interpreter. The directory you choose should
- contain <filename>javaw.exe</filename>, which the installer uses as a
- default; you can change the interpreter later with a call to
- <filename>jedinit.exe</filename>.
- </para>
-</section> -->
-
- <section id="launcher-legalnotice">
- <title>Legal Notice</title>
-
- <para>All source code and software distributed as the jEditLauncher
- package in which the author holds the copyright is made available under
- the GNU General Public License (<quote>GPL</quote>). A copy of the GPL
- is included in the file <filename>COPYING.txt</filename> included with
- jEdit.</para>
-
- <para>Notwithstanding the terms of the General Public License, the
- author grants permission to compile and link object code generated by
- the compilation of this program with object code and libraries that are
- not subject to the GNU General Public License, provided that the
- executable output of such compilation shall be distributed with source
- code on substantially the same basis as the jEditLauncher package of
- which this source code and software is a part. By way of example, a
- distribution would satisfy this condition if it included a working
- Makefile for any freely available make utility that runs on the Windows
- family of operating systems. This condition does not require a licensee
- of this software to distribute any proprietary software (including
- header files and libraries) that is licensed under terms prohibiting or
- limiting redistribution to third parties.</para>
-
- <para>The purpose of this specific permission is to allow a user to link
- files contained or generated by the source code with library and other
- files licensed to the user by Microsoft or other parties, whether or not
- that license conforms to the requirements of the GPL. This permission
- should not be construed to expand the terms of any license for any
- source code or other materials used in the creation of
- jEditLauncher.</para>
- </section>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- :xml.root=users-guide.xml: -->
+<appendix id="launcher-guide">
+ <title>jEditLauncher for Windows</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :tabSize=2:indentSize=1:noTabs=true:maxLineLen=72: -->
+ <!-- jEditLauncher 4.0 (R2) Quick Guide -->
+ <!-- Copyright (C) 2001, 2002 John Gellene -->
+ <!-- $Id: launcher-guide.xml 16181 2009-09-08 19:26:57Z ezust $
+-->
+ <section id="launcher-intro">
+ <title>Introduction</title>
+
+ <para>The jEditLauncher package is a set of lightweight components for
+ running jEdit under the Windows group of operating systems. The package
+ is designed to run on Windows 95, Windows 98, Windows Me, Windows NT
+ (versions 4.0 and greater), Windows 2000 and Windows XP.</para>
+
+ <para>While jEdit does not make available a component-type interface, it
+ does contains an <quote>EditServer</quote> that listens on a socket for
+ requests to load scripts written in the BeanShell scripting language.
+ When the server activates, it writes the server port number and a
+ pseudo-random, numeric authorization key to a text file. By default, the
+ file is named <filename>server</filename> and is located in the settings
+ directory (see <xref linkend="settings-directory" />).</para>
+
+ <para>The jEditLauncher component locates and reads this file, opens a
+ socket and attempts to connect to the indicated port. If successful, it
+ transmits the appropriate BeanShell script to the server. If
+ unsuccessful, it attempts to start jEdit and repeats the socket
+ transmission once it can obtain the port and key information. The
+ component will abandon the effort to connect roughly twenty seconds
+ after it launches the application.</para>
+ </section>
+
+ <section id="launcher-starting">
+ <title>Starting jEdit</title>
+
+ <para>The main component of the jEditLauncher package is a client
+ application entitled <command>jedit.exe</command>. It may be executed
+ either from either Windows Explorer, a shortcut icon or the command
+ line. It uses the jEditLauncher COM component to open files in jEdit
+ that are listed as command line parameters. It supports Windows and UNC
+ file specifications as well as wild cards. If called without parameters,
+ it will launch jEdit. If jEdit is already running<!-- and has an active
+ EditServer -->, it will simply open a new, empty buffer.</para>
+
+ <para><command>jedit.exe</command> supports five command-line options.
+ Except for the <userinput>/1</userinput> option, if any of these options
+ are invoked correctly, the application will not load files or execute
+ jEdit.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>The option <userinput>/h</userinput> causes a window to be
+ displayed with a brief description of the application and its
+ various options.</para>
+ </listitem>
+
+ <listitem>
+ <para>The option <userinput>/p</userinput> will activate a
+ dialog window displaying the command-line parameters to be used
+ when calling jEdit. This option can also be triggered by
+ selecting <guilabel>Set jEdit Parameters</guilabel> from the
+ <guilabel>jEdit</guilabel> section of the Windows Programs menu,
+ or by running the utility program
+ <command>jedinit.exe</command></para>
+
+ <para>Using the dialog, you can change parameters specifying the
+ executable for the Java application loader (either
+ <filename>java.exe</filename> or
+ <filename>javaw.exe</filename>), the location of the jEdit
+ archive file, <filename>jedit.jar</filename>, and command line
+ options for both. <itemizedlist>
+ <listitem>
+ <para>The input fields for Java options and jEdit
+ options are separate. If you insert an option in the
+ wrong place it will not be properly executed.</para>
+ </listitem>
+
+ <listitem>
+ <para>If the <userinput>-jar</userinput> option is
+ not used with the Java application loader the
+ principal jEdit class of
+ <classname>org.gjt.sp.jedit.jEdit</classname> is set
+ as fixed data.</para>
+ </listitem>
+
+ <listitem>
+ <para>The working directory for the Java
+ interpreter's process can also be specified.</para>
+ </listitem>
+ </itemizedlist> A read-only window at the bottom of the
+ dialog displays the full command line that jEditLauncher will
+ invoke.</para>
+
+ <para>Before committing changes to the command line parameters,
+ <command>jedit.exe</command> validates the paths for the Java
+ and jEdit targets as well as the working directory. It will
+ complain if the paths are invalid. It will not validate command
+ line options, but it will warn you if it finds the
+ <userinput>-noserver</userinput> option used for jEdit, since
+ this will deactivate the edit server and make it impossible for
+ jEditLauncher to open files.</para>
+
+ <para>Note that due to the design of
+ <application>jEditLauncher</application>, platform-independent
+ command line options handled by jEdit itself (such as
+ <userinput>-background</userinput> and
+ <userinput>-norestore</userinput>) must be entered in the
+ <quote>Set jEdit Parameters</quote> dialog box, and cannot be
+ specified on the <command>jedit.exe</command> command line
+ directly. For information about platform-independent command
+ line options, see <xref linkend="cli-usage" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>The option <userinput>/1</userinput> is intended for use
+ in circumstances where a single file name is passed to jEdit for
+ opening, and quotation marks cannot be used to delimit file
+ names containing whitespace. The launcher reads the entire
+ command line following the <userinput>/1</userinput> options as
+ a single file path, regardless of the presence of whitespace,
+ and passes the resulting string as a single file name parameter
+ to jEdit.</para>
+
+ <para>This option allows jEdit to be used with version 5 or
+ greater of Internet Explorer as an alternate text editor or as
+ the target of the <guimenuitem>View Source</guimenuitem>
+ command. Included with the jEditLauncher distribution is a file
+ named <filename>jEdit_IE.reg.txt</filename> containing an
+ example of a Window registry file that you can use to register
+ jEdit as a HTML editor with Internet Explorer. Instructions for
+ the file's use are included in the text.</para>
+
+ <para>The use of the <userinput>/1</userinput> option with
+ multiple file names or other parameters will lead to program
+ errors or unpredictable results.</para>
+ </listitem>
+
+ <listitem>
+ <para>The option <userinput>/i</userinput> is not mentioned in
+ the help window for <filename>jedit.exe</filename>. It is
+ intended primarily to be used in conjunction with jEdit's Java
+ installer, but it can also be used to install or reinstall
+ jEditLauncher manually. When accompanied by a second parameter
+ specifying the directory where your preferred Java interpreter
+ is located, jEditLauncher will install itself and set a
+ reasonable initial set of command line parameters for executing
+ jEdit. You can change these parameters later by running
+ <filename>jedinit.exe</filename> or
+ <filename>jedit.exe</filename> with the<userinput>/p</userinput>
+ option.</para>
+ </listitem>
+
+ <listitem>
+ <para>The option <userinput>/u</userinput> will cause
+ jEditLauncher to be uninstalled by removing its registry
+ entries. This option does not delete any jEditLauncher or jEdit
+ files.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="launcher-menu">
+ <title>The Context Menu Handler</title>
+
+ <para>The jEditLauncher package also implements a context menu handler
+ for the Windows shell. It is intended to be be installed as a handler
+ available for any file. When you right-click on a file or shortcut icon,
+ the context menu that appears will include an item displaying the jEdit
+ icon and captioned <guilabel>Open with jEdit</guilabel>. If the file has
+ an extension, another item will appear captioned <guilabel>Open *.XXX
+ with jEdit</guilabel>, where XXX is the extension of the selected file.
+ Clicking this item will cause jEdit to load all files with the same
+ extension in the same directory as the selected file. Multiple file
+ selections are also supported; in this circumstance only the
+ <guilabel>Open with jEdit</guilabel> item appears.</para>
+
+ <para>If a single file with a <filename>.bsh</filename> extension is
+ selected, the menu will also contain an item captioned <guilabel>Run
+ script in jEdit</guilabel>. Selecting this item will cause jEditLauncher
+ to run the selected file as a BeanShell script.</para>
+
+ <para>If exactly two files are selected, the menu will contain an entry
+ for <guilabel>Show diff in jEdit</guilabel>. Selecting this item will
+ load the two files in jEdit and have them displayed side-by-side with
+ their differences highlighted by the <application>JDiff</application>
+ plugin. The file selected first will be treated as the base for
+ comparison purposes. If the plugin is not installed, an error message
+ will be displayed in jEdit. See <xref linkend="using-plugins" /> for
+ more information about installing plugins.</para>
+ </section>
+
+ <!-- open section -->
+
+ <section id="launcher-jedidiff">
+ <title>Using jEdit and jEditLauncher as a Diff Utility</title>
+
+ <para>As noted above, you can create a graphical diff display comparing
+ the contents of two text files by selecting the two files in an Explorer
+ window, right-clicking to produce a context menu, and selecting the
+ <guimenuitem>Show diff in jEdit</guimenuitem> menu item. The utility
+ <filename>jedidiff.exe</filename> allows you to perform this operation
+ from a command line. The command takes the two files to be compared as
+ parameters; they should be delimited by quotation marks if their paths
+ contain whitespace.</para>
+ </section>
+
+ <section id="launcher-uninstall">
+ <title>Uninstalling jEdit and jEditLauncher</title>
+
+ <para></para>
+
+ <para>There are three ways to uninstall jEdit and jEditLauncher.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>First, you can run <filename>unlaunch.exe</filename> in
+ the jEdit installation directory.</para>
+ </listitem>
+
+ <listitem>
+ <para>Second, you can choose <guilabel>Uninstall
+ jEdit</guilabel> from the <guilabel>jEdit</guilabel> section of
+ the Programs menu. <!-- This will
+ uninstall the <quote>primary</quote> version of jEdit (and will
+ designate a new primary version if any versions remain). --></para>
+ </listitem>
+
+ <listitem>
+ <para>Third, you can choose the uninstall option for jEdit in
+ the Control Panel's Add/Remove Programs applet. <!-- This allows you to specify
+ unambiguously the version of jEdit that you wish to remove. --></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Each of these options will deactivate jEditLauncher and delete all
+ files in jEdit's installation directory. As a safeguard, jEditLauncher
+ displays a warning window and requires the user to confirm an uninstall
+ operation. Because the user's settings directory can be set and changed
+ from one jEdit session to another, user settings files must be deleted
+ manually.</para>
+
+ <para>To deactivate jEditLauncher without deleting any files, run
+ <filename>jedit /u</filename> from any command prompt where the jEdit
+ installation directory is in the search path. This will remove the
+ entries for jEditLauncher from the Windows registry. It will also
+ disable the context menu handler and the automatic launching and
+ scripting capabilities. The package can reactivated by executing
+ <command>jedit.exe</command> again, and jEdit can be started in the same
+ manner as any other Java application on your system.</para>
+ </section>
+
+ <section id="launcher-interface">
+ <title>The jEditLauncher Interface</title>
+
+ <para>The core of the jEditLauncher package is a COM component that can
+ communicate with the EditServer, or open jEdit if it is not running or
+ is otherwise refusing a connection. The component supports both Windows
+ and UNC file specifications, including wild cards. It will resolve
+ shortcut links to identify and transmit the name of the underlying
+ file.</para>
+
+ <para>Because it is implemented with a <quote>dual interface</quote>,
+ the functions of jEditLauncher are available to scripting languages in
+ the Windows environment such as VBScript, JScript, Perl (using the
+ Win32::OLE package) and Python (using the win32com.client
+ package).</para>
+
+ <para>The scriptable interface consists of two read-only properties and
+ six functions:</para>
+
+ <para><emphasis>Properties</emphasis></para>
+
+ <itemizedlist>
+ <listitem>
+ <para><varname>ServerPort</varname> - a read-only property that
+ returns the port number found in jEdit's server file; the value
+ is not tested for authenticity. It returns zero if the server
+ information file cannot be located.</para>
+ </listitem>
+
+ <listitem>
+ <para><varname>ServerKey</varname> - a read-only property that
+ returns the numeric authorization key found in jEdit's server
+ file; the value is not tested for authenticity. It returns zero
+ if the server information file cannot be located.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para><emphasis>Functions</emphasis></para>
+
+ <itemizedlist>
+ <listitem>
+ <para><function>OpenFile</function> - a method that takes a
+ single file name (with or without wild card characters) as a
+ parameter.</para>
+ </listitem>
+
+ <listitem>
+ <para><function>OpenFiles</function> - this method takes an
+ array of file names (with or without wild card characters) as a
+ parameter. The form of the array is that which is used for
+ arrays in the scripting environment. In JScript, for example the
+ data type of the <classname>VARIANT</classname> holding the
+ array is <classname>VT_DISPATCH</classname>; in VBScript, it is
+ <classname>VT_ARRAY | VT_VARIANT</classname>, with array members
+ having data type <classname>VT_BSTR</classname>.</para>
+ </listitem>
+
+ <listitem>
+ <para><function>Launch</function> - this method with no
+ parameters attempts to open jEdit without loading additional
+ files.</para>
+ </listitem>
+
+ <listitem>
+ <para><function>RunScript</function> - this method takes a file
+ name or full file path as a parameter and runs the referenced
+ file as a BeanShell script in jEdit. The predefined variables
+ <varname>view</varname>, <varname>editPane</varname>,
+ <varname>textArea</varname> and <varname>buffer</varname> are
+ available to the script. If more than one view is open, the
+ variable are initialized with reference to the earliest opened
+ view. If no path is given for the file it will use the working
+ directory of the calling process.</para>
+ </listitem>
+
+ <listitem>
+ <para><function>EvalScript</function> - this method takes a
+ string as a parameter containing one or more BeanShell
+ statements and runs the script in jEdit's BeanShell interpreter.
+ The predefined variables are available on the same basis as in
+ <function>RunScript</function>.</para>
+ </listitem>
+
+ <listitem>
+ <para><function>RunDiff</function> - this method takes two
+ strings representing file names as parameters. If the
+ <application>JDiff</application> plugin is installed, this
+ method will activate the JDiff plugin and display the two files
+ in the plugin's graphical <quote>dual diff</quote> format. The
+ first parameter is treated as the base for display purposes. If
+ the <application>JDiff</application> plugin is not installed, a
+ error message box will be displayed in jEdit.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="launcher-examples">
+ <title>Scripting Examples</title>
+
+ <para>Here are some brief examples of scripts using jEditLauncher. The
+ first two will run under Windows Script Host, which is either installed
+ or available for download for 32-bit Windows operating systems. The next
+ example is written in Perl and requires the Win32::OLE package. The last
+ is written in Python and requires the win32gui and win32com.client
+ extensions.</para>
+
+ <para>If Windows Script Host is installed, you can run the first two
+ scripts by typing the name of the file containing the script at a
+ command prompt. In jEdit's <application>Console</application> plugin,
+ you can type <userinput>cmd /c
+ <replaceable>script_path</replaceable></userinput> or <userinput>wscript
+ <replaceable>script_path</replaceable></userinput>.</para>
+
+ <informalexample>
+ <programlisting>' Example VBScript using jEditLauncher interface
+dim launcher
+set launcher = CreateObject("JEdit.JEditLauncher")
+a = Array("I:\Source Code Files\shellext\jeditshell\*.h", _
+ "I:\Source Code Files\shellext\jeditshell\*.cpp")
+MsgBox "The server authorization code is " + _
+ FormatNumber(launcher.ServerKey, 0, 0, 0, 0) + ".", _
+ vbOKOnly + vbInformation, "jEditLauncher"
+launcher.openFiles(a)
+myScript = "jEdit.newFile(view); textArea.setSelectedText(" _
+ & CHR(34) _
+ & "Welcome to jEditLauncher." _
+ & CHR(34) & ");"
+launcher.evalScript(myScript)</programlisting>
+ </informalexample>
+
+ <informalexample>
+ <programlisting>/* Example JScript using jEditLauncher interface
+ * Note: in contrast to VBScript, JScript does not
+ * directly support message boxes outside a browser window
+ */
+var launcher = WScript.createObject("JEdit.JEditLauncher");
+var a = new Array("I:\\weather.html", "I:\\test.txt");
+b = "I:\\*.pl";
+launcher.openFiles(a);
+launcher.openFile(b);
+c = "G:\\Program Files\\jEdit\\macros\\Misc"
+ + "\\Properties\\System_properties.bsh";
+launcher.runScript(c);</programlisting>
+ </informalexample>
+
+ <informalexample>
+ <programlisting># Example Perl script using jEditLauncher interface
+use Win32::OLE;
+$launcher = Win32::OLE->new('JEdit.JEditLauncher') ||
+ die "JEditLauncher: not found !\n";
+ at files = ();
+foreach $entry (@ARGV) {
+ @new = glob($entry);
+ push(@files, at new);
+}
+$launcher->openFiles(\@files);
+my($script) = "Macros.message(view, \"I found "
+ .(scalar @files)." files.\");";
+$launcher->evalScript($script);</programlisting>
+ </informalexample>
+
+ <informalexample>
+ <programlisting># Example Python script using jEditLauncher interface
+import win32gui
+import win32com.client
+o = win32com.client.Dispatch("JEdit.JEditLauncher")
+port = o.ServerPort
+if port == 0:
+ port = "inactive. We will now launch jEdit"
+win32gui.MessageBox(0, "The server port is %s." % port,
+ "jEditLauncher", 0)
+path = "C:\\WINNT\\Profiles\\Administrator\\Desktop\\"
+o.RunDiff(path + "Search.bsh", path + "Search2.bsh")
+</programlisting>
+ </informalexample>
+ </section>
+
+ <!-- open section -->
+
+ <section id="launcher-logging">
+ <title>jEditLauncher Logging</title>
+
+ <para>The jEditLauncher package has a logging facility that is separate
+ from jEdit's Activity Log to provide a record of events occurring
+ outside the Java virtual machine environment in which jEdit operates.
+ The logging facility maintains two log files:
+ <filename>jelaunch.log</filename> for events relating to starting jEdit,
+ loading files and running scripts, and <filename>install.log</filename>
+ for jEditLauncher installation activity. Both files are maintained in
+ the directory in which jEdit is installed. They are cumulative from
+ session to session, but may be manually deleted at any time without
+ affecting program execution.</para>
+ </section>
+
+ <!-- <section id="launcher-install"><title>Standalone Installation</title>
+ <para>
+ Installation of jEditLauncher occurs as part of the installation of the
+ jEdit package for Windows. If a full jEdit installation fails, you can
+ install jEditLauncher by placing the following files in the same
+ directory as <filename>jedit.jar</filename>, the archive containing the
+ Java application:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <filename>jedit.exe</filename>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename>jedinit.exe</filename>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename>jeshlstb.dll</filename>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename>jedinstl.dll</filename>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename>jeditsvr.exe</filename>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename>jeservps.dll</filename>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename>unlaunch.exe</filename>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Anytime <filename>jedit.exe</filename> is executed (either directly or
+ indirectly through a call to <filename>jedinit.exe</filename>),
+ jEditLauncher checks to see if it is properly installed. If it is not,
+ it will offer to install itself. If you agree, you will then be asked to
+ supply the path to a Java interpreter. The directory you choose should
+ contain <filename>javaw.exe</filename>, which the installer uses as a
+ default; you can change the interpreter later with a call to
+ <filename>jedinit.exe</filename>.
+ </para>
+</section> -->
+
+ <section id="launcher-legalnotice">
+ <title>Legal Notice</title>
+
+ <para>All source code and software distributed as the jEditLauncher
+ package in which the author holds the copyright is made available under
+ the GNU General Public License (<quote>GPL</quote>). A copy of the GPL
+ is included in the file <filename>COPYING.txt</filename> included with
+ jEdit.</para>
+
+ <para>Notwithstanding the terms of the General Public License, the
+ author grants permission to compile and link object code generated by
+ the compilation of this program with object code and libraries that are
+ not subject to the GNU General Public License, provided that the
+ executable output of such compilation shall be distributed with source
+ code on substantially the same basis as the jEditLauncher package of
+ which this source code and software is a part. By way of example, a
+ distribution would satisfy this condition if it included a working
+ Makefile for any freely available make utility that runs on the Windows
+ family of operating systems. This condition does not require a licensee
+ of this software to distribute any proprietary software (including
+ header files and libraries) that is licensed under terms prohibiting or
+ limiting redistribution to third parties.</para>
+
+ <para>The purpose of this specific permission is to allow a user to link
+ files contained or generated by the source code with library and other
+ files licensed to the user by Microsoft or other parties, whether or not
+ that license conforms to the requirements of the GPL. This permission
+ should not be construed to expand the terms of any license for any
+ source code or other materials used in the creation of
+ jEditLauncher.</para>
+ </section>
</appendix>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/macro-basics.xml b/jEdit/doc/users-guide/macro-basics.xml
index d72760f..ab53a4f 100644
--- a/jEdit/doc/users-guide/macro-basics.xml
+++ b/jEdit/doc/users-guide/macro-basics.xml
@@ -1,767 +1,767 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="macro-basics">
- <title>Macro Basics</title>
- <!-- jEdit 4.0 Macro Guide, (C) 2001, 2002 John Gellene -->
- <!-- jEdit buffer-local properties: -->
- <!-- :indentSize=1:noTabs=yes:maxLineLen=72:tabSize=2: -->
- <!-- :xml.root=users-guide.xml: -->
- <!-- This file cover the introductory section of the macro guide -->
- <!-- $Id: macro-basics.xml 16181 2009-09-08 19:26:57Z ezust $ -->
-
- <section id="beanshell-intro">
- <title>Introducing BeanShell</title>
-
- <para>Here is how BeanShell's author, Pat Niemeyer, describes his
- creation:</para>
-
- <blockquote>
- <para><quote>BeanShell is a small, free, embeddable, Java source
- interpreter with object scripting language features, written in
- Java. BeanShell executes standard Java statements and expressions,
- in addition to obvious scripting commands and syntax. BeanShell
- supports scripted objects as simple method closures like those in
- Perl and JavaScript.</quote></para>
- </blockquote>
-
- <para>You do not have to know anything about Java to begin writing your
- own jEdit macros. But if you know how to program in Java, you already
- know how to write BeanShell scripts. The major strength of using
- BeanShell with a program written in Java is that it allows the user to
- customize the program's behavior using the same interfaces designed and
- used by the program itself. BeanShell can turn a well-designed
- application into a powerful, extensible toolkit.</para>
-
- <para>This guide focuses on using BeanShell in macros. If you are
- interested in learning more about BeanShell generally, consult the
- <ulink url="http://www.beanshell.org">BeanShell web site</ulink>.
- Information on how to run and organize macros, whether included with the
- jEdit installation or written by you, can be found in <xref
- linkend="using-macros" />.</para>
- </section>
-
- <section id="single-macros">
- <title>Single Execution Macros</title>
-
- <para>As noted in <xref linkend="organizing-macros" />, you can save a
- BeanShell script of any length as a text file with the
- <filename>.bsh</filename> extension and run it from the
- <guimenu>Macros</guimenu> menu. There are three other ways jEdit lets
- you use BeanShell quickly, without saving a script to storage, on a
- <quote>one time only</quote> basis. You will find them in the
- <guimenu>Utilities</guimenu> menu.</para>
-
- <para><guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
- BeanShell Expression</guimenuitem> displays a text input dialog that
- asks you to type a single line of BeanShell commands. You can type more
- than one BeanShell statement so long as each of them ends with a
- semicolon. If BeanShell successfully interprets your input, a message
- box will appear with the return value of the last statement.</para>
-
- <para><guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
- For Selected Lines</guimenuitem> displays a text input dialog that asks
- you to type a single line of BeanShell commands. The commands are
- evaluated for each line of the selection. In addition to the standard
- set of variables described in <xref linkend="predefined-variables" />,
- this command defines the following:</para>
-
- <itemizedlist>
- <listitem>
- <para><varname>line</varname> - the line number, from the start
- of the buffer. The first line is numbered 0.</para>
- </listitem>
-
- <listitem>
- <para><varname>index</varname> - the line number, from the start
- of the selection. The first line is numbered 0.</para>
- </listitem>
-
- <listitem>
- <para><varname>text</varname> - the text of the line.</para>
- </listitem>
- </itemizedlist>
-
- <informalexample>
- <para>Try typing an expression like <userinput>(line + 1) + ": " +
- text</userinput> in the <guimenuitem>Evaluate For Selected
- Lines</guimenuitem> dialog box. This will add a line number to each
- selected line beginning with the number
- <userinput>1</userinput>.</para>
- </informalexample>
-
- <para>The BeanShell expression you enter will be evaluated and
- substituted in place of the entire text of a selected line. If you want
- to leave the line's current text as an element of the modified line, you
- must include the defined variable <userinput>text</userinput> as part of
- the BeanShell expression that you enter.</para>
-
- <para><guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
- Selection</guimenuitem> evaluates the selected text as a BeanShell
- script and replaces it with the return value of the statement.</para>
-
- <para>Using <guimenuitem>Evaluate Selection</guimenuitem> is an easy way
- to do arithmetic calculations inline while editing. BeanShell uses
- numbers and arithmetic operations in an ordinary, intuitive way.</para>
-
- <informalexample>
- <para>Try typing an expression like
- <userinput>(3745*856)+74</userinput> in the buffer, select it, and
- choose
- <guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
- Selection</guimenuitem>. The selected text will be replaced by the
- answer, <userinput>3205794</userinput>. <!-- Irrelevant? --> <!-- Since this is a text file
- and not a spreadsheet, the original values that BeanShell evaluated are
- not retained or saved as part of the buffer's contents. --></para>
- </informalexample>
-
- <sidebar>
- <title>Console plugin</title>
-
- <para>You can also do the same thing using the BeanShell interpreter
- option of the <application>Console</application> plugin.</para>
- </sidebar>
- </section>
-
- <section id="first-example">
- <title>The Mandatory First Example</title>
-
- <informalexample>
- <!-- <title>A first one-line macro</title> -->
-
- <programlisting>Macros.message(view, "Hello world!");</programlisting>
- </informalexample>
-
- <para>Running this one line script causes jEdit to display a message box
- (more precisely, a <classname>JOptionPane</classname> object) with the
- traditional beginner's message and an <guilabel>OK</guilabel> button.
- Let's see what is happening here.</para>
-
- <para>This statement calls a static method (or function) named
- <function>message</function> in jEdit's <ulink
- url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class. If you
- don't know anything about classes or static methods or Java (or C++,
- which employs the same concept), you will need to gain some
- understanding of a few terms. Obviously this is not the place for
- academic precision, but if you are entirely new to object-oriented
- programming, here are a few skeleton ideas to help you with
- BeanShell.</para>
-
- <itemizedlist>
- <listitem>
- <para>An <glossterm>object</glossterm> is a collection of data
- that can be initialized, accessed and manipulated in certain
- defined ways.</para>
- </listitem>
-
- <listitem>
- <para>A <glossterm>class</glossterm> is a specification of what
- data an object contains and what methods can be used to work
- with the data. A Java application consists of one or more
- classes (in the case of jEdit ,over 600 classes) written by the
- programmer that defines the application's behavior. A BeanShell
- macro uses these classes, along with built-in classes that are
- supplied with the Java platform, to define its own
- behavior.</para>
- </listitem>
-
- <listitem>
- <para>A <glossterm>subclass</glossterm> (or child class) is a
- class which uses (or <quote>inherits</quote>) the data and
- methods of its parent class along with additions or
- modifications that alter the subclass's behavior. Classes are
- typically organized in hierarchies of parent and child classes
- to organize program code, to define common behavior in shared
- parent class code, and to specify the types of similar behavior
- that child classes will perform in their own specific
- ways.</para>
- </listitem>
-
- <listitem>
- <para>A <glossterm>method</glossterm> (or function) is a
- procedure that works with data in a particular object, other
- data (including other objects) supplied as
- <glossterm>parameters</glossterm>, or both. Methods typically
- are applied to a particular object which is an
- <glossterm>instance</glossterm> of the class to which the method
- belongs.</para>
- </listitem>
-
- <listitem>
- <para>A <glossterm>static method</glossterm> differs from other
- methods in that it does not deal with the data in a particular
- object but is included within a class for the sake of
- convenience.</para>
- </listitem>
- </itemizedlist>
-
- <para>Java has a rich set of classes defined as part of the Java
- platform. Like all Java applications, jEdit is organized as a set of
- classes that are themselves derived from the Java platform's classes. We
- will refer to <firstterm>Java classes</firstterm> and <firstterm>jEdit
- classes</firstterm> to make this distinction. Some of jEdit's classes
- (such as those dealing with regular expressions and XML) are derived
- from or make use of classes in other open-source Java packages. Except
- for BeanShell itself, we won't be discussing them in this guide.</para>
-
- <para>In our one line script, the static method
- <function>Macros.message()</function> has two parameters because that is
- the way the method is defined in the <ulink
- url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class. You must
- specify both parameters when you call the function. The first parameter,
- <parameter>view</parameter>, is a variable naming the current, active
- <ulink url="../api/org/gjt/sp/jedit/View.html">View</ulink> object.
- Information about pre-defined variables can be found in <xref
- linkend="predefined-variables" />.</para>
-
- <para>The second parameter, which appears to be quoted text, is a
- <glossterm>string literal</glossterm> - a sequence of characters of
- fixed length and content. Behind the scenes, BeanShell and Java take
- this string literal and use it to create a <classname>String</classname>
- object. Normally, if you want to create an object in Java or BeanShell,
- you must construct the object using the <function>new</function> keyword
- and a <firstterm>constructor</firstterm> method that is part of the
- object's class. We'll show an example of that later. However, both Java
- and BeanShell let you use a string literal anytime a method's parameter
- calls for a <classname>String</classname>.</para>
-
- <para>If you are a Java programmer, you might wonder about a few things
- missing from this one line program. There is no class definition, for
- example. You can think of a BeanShell script as an implicit definition
- of a <function>main()</function> method in an anonymous class. That is
- in fact how BeanShell is implemented; the class is derived from a
- BeanShell class called <ulink url="../api/bsh/XThis.html">XThis</ulink>.
- If you don't find that helpful, just think of a script as one or more
- blocks of procedural statements conforming to Java syntax rules. You
- will also get along fine (for the most part) with C or C++ syntax if you
- leave out anything to do with pointers or memory management - Java and
- BeanShell do not have pointers and deal with memory management
- automatically.</para>
-
- <para>Another missing item from a Java perspective is a
- <function>package</function> statement. In Java, such a statement is
- used to bundle together a number of files so that their classes become
- visible to one another. Packages are not part of BeanShell, and you
- don't need to know anything about them to write BeanShell macros.</para>
-
- <para>Finally, there are no <function>import</function> statements in
- this script. In Java, an <function>import</function> statement makes
- public classes from other packages visible within the file in which the
- statement occurs without having to specify a fully qualified class name.
- Without an import statement or a fully qualified name, Java cannot
- identify most classes using a single name as an identifier.</para>
-
- <para>jEdit automatically imports a number of commonly-used packages
- into the namespace of every BeanShell script. Because of this, the
- script output of a recorded macro does not contain
- <function>import</function> statements. For the same reason, most
- BeanShell scripts you write will not require <function>import</function>
- statements.</para>
-
- <para>Java requires <literal>import</literal> statement to be located at
- the beginning of a source file. BeanShell allows you to place
- <literal>import</literal> statements anywhere in a script, including
- inside a block of statements. The <literal>import</literal> statement
- will cover all names used following the statement in the enclosing
- block.</para>
-
- <para>If you try to use a class that is not imported without its
- fully-qualified name, the BeanShell interpreter will complain with an
- error message relating to the offending line of code.</para>
-
- <sidebar>
- <para>Here is the full list of packages automatically imported by
- jEdit:</para>
-
- <programlisting>java.awt
-java.awt.event
-java.net
-java.util
-java.io
-java.lang
-javax.swing
-javax.swing.event
-org.gjt.sp.jedit
-org.gjt.sp.jedit.browser
-org.gjt.sp.jedit.buffer
-org.gjt.sp.jedit.gui
-org.gjt.sp.jedit.help
-org.gjt.sp.jedit.io
-org.gjt.sp.jedit.msg
-org.gjt.sp.jedit.options
-org.gjt.sp.jedit.pluginmgr
-org.gjt.sp.jedit.print
-org.gjt.sp.jedit.search
-org.gjt.sp.jedit.syntax
-org.gjt.sp.jedit.textarea
-org.gjt.sp.util</programlisting>
- </sidebar>
- </section>
-
- <section id="predefined-variables">
- <title>Predefined Variables in BeanShell</title>
-
- <para>The following variables are always available for use in BeanShell
- scripts:</para>
-
- <itemizedlist>
- <listitem>
- <para><varname>buffer</varname> - a <ulink
- url="../api/org/gjt/sp/jedit/Buffer.html">Buffer</ulink> object
- represents the contents of the currently visible open text
- file.</para>
- </listitem>
-
- <listitem>
- <para><varname>view</varname> - A <ulink
- url="../api/org/gjt/sp/jedit/View.html">View</ulink> represents
- the current top-level editor window, extending Java's
- <classname>JFrame</classname> class, that contains the various
- visible components of the program, including the text area, menu
- bar, toolbar, and any docked windows.</para>
-
- <para>This variable has the same value as the return value
- of:</para>
-
- <programlisting>jEdit.getActiveView()</programlisting>
- </listitem>
-
- <listitem>
- <para><varname>editPane</varname> - an <ulink
- url="../api/org/gjt/sp/jedit/EditPane.html">EditPane</ulink>
- object contains a text area and buffer switcher. A view can be
- split to display edit panes. Among other things, the <ulink
- url="../api/org/gjt/sp/jedit/EditPane.html">EditPane</ulink>
- class contains methods for selecting the buffer to edit.</para>
-
- <para>Most of the time your macros will manipulate the
- <varname>buffer</varname> or the <varname>textArea</varname>.
- Sometimes you will need to use <varname>view</varname> as a
- parameter in a method call. You will probably only need to use
- <varname>editPane</varname> if your macros work with split
- views.</para>
-
- <para>This variable has the same value as the return value
- of:</para>
-
- <programlisting>view.getEditPane()</programlisting>
- </listitem>
-
- <listitem>
- <para><varname>textArea</varname> - a <ulink
- url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
- is the visible component that displays the current
- buffer.</para>
-
- <para>This variable has the same value as the return value
- of:</para>
-
- <programlisting>editPane.getTextArea()</programlisting>
- </listitem>
-
- <listitem>
- <para><varname>wm</varname> - a <ulink
- url="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html">DockableWindowManager</ulink>
- is the visible component that manages dockable windows in the
- current view. This class is discussed in detail in <xref
- linkend="writing-plugins-part" />. This object is useful for
- writing macros that interface with, open, or close plugin
- windows.</para>
-
- <para>This variable has the same value the return value
- of:</para>
-
- <programlisting>view.getDockableWindowManager()</programlisting>
- </listitem>
-
- <listitem>
- <para><varname>scriptPath</varname> - set to the full path of
- the script currently being executed.</para>
- </listitem>
-
- <listitem>
- <para><varname>scriptPath</varname> - set to the full path of
- the script currently being executed.</para>
- </listitem>
- </itemizedlist>
-
- <para>Note that these variables are set at the beginning of macro
- execution. If the macro switches views, buffers or edit panes, the
- variable values will be out of date. In that case, you can use the
- equivalent method calls.</para>
- </section>
-
- <section id="helpful-methods">
- <title>Helpful Methods in the Macros Class</title>
-
- <para>Including <function>message()</function>, there are five static
- methods in the <ulink
- url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class that
- allow you to converse easily with your macros. They all encapsulate
- calls to methods of the Java platform's
- <classname>JOptionPane</classname> class.</para>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>public static void
- <function>message</function></funcdef>
-
- <paramdef>Component
- <parameter>comp</parameter></paramdef>
-
- <paramdef>String
- <parameter>message</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>public static void
- <function>error</function></funcdef>
-
- <paramdef>Component
- <parameter>comp</parameter></paramdef>
-
- <paramdef>String
- <parameter>message</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>public static String
- <function>input</function></funcdef>
-
- <paramdef>Component
- <parameter>comp</parameter></paramdef>
-
- <paramdef>String
- <parameter>prompt</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>public static String
- <function>input</function></funcdef>
-
- <paramdef>Component
- <parameter>comp</parameter></paramdef>
-
- <paramdef>String
- <parameter>prompt</parameter></paramdef>
-
- <paramdef>String
- <parameter>defaultValue</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
-
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>public static int
- <function>confirm</function></funcdef>
-
- <paramdef>Component
- <parameter>comp</parameter></paramdef>
-
- <paramdef>String
- <parameter>prompt</parameter></paramdef>
-
- <paramdef>int <parameter>buttons</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
- </itemizedlist>
-
- <para>The format of these four <glossterm>declarations</glossterm>
- provides a concise reference to the way in which the methods may be
- used. The keyword <function>public</function> means that the method can
- be used outside the <ulink
- url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class. The
- alternatives are <function>private</function> and
- <function>protected</function>. For purposes of BeanShell, you just have
- to know that BeanShell can only use public methods of other Java
- classes. The keyword <function>static</function> we have already
- discussed. It means that the method does not operate on a particular
- object. You call a static function using the name of the class (like
- <ulink url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink>) rather
- than the name of a particular object (like <varname>view</varname>). The
- third word is the type of the value returned by the method. The keyword
- <function>void</function> is Java's way of saying the the method does
- not have a return value.</para>
-
- <para>The <function>error()</function> method works just like
- <function>message()</function> but displays an error icon in the message
- box. The <function>input()</function> method furnishes a text field for
- input, an <guilabel>OK</guilabel> button and a
- <guilabel>Cancel</guilabel> button. If <guilabel>Cancel</guilabel> is
- pressed, the method returns <constant>null</constant>. If
- <guilabel>OK</guilabel> is pressed, a <classname>String</classname>
- containing the contents of the text field is returned. Note that there
- are two forms of the <function>input()</function> method; the first form
- with two parameters displays an empty input field, the other forms lets
- you specify an initial, default input value.</para>
-
- <para>For those without Java experience, it is important to know that
- <constant>null</constant> is <emphasis>not</emphasis> the same as an
- empty, <quote>zero-length</quote> <classname>String</classname>. It is
- Java's way of saying that there is no object associated with this
- variable. Whenever you seek to use a return value from
- <function>input()</function> in your macro, you should test it to see if
- it is <constant>null</constant>. In most cases, you will want to exit
- gracefully from the script with a <function>return</function> statement,
- because the presence of a null value for an input variable usually means
- that the user intended to cancel macro execution. BeanShell will
- complain if you call any methods on a <constant>null</constant>
- object.</para>
-
- <para>The <function>confirm()</function> method in the <ulink
- url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class is a
- little more complex. The <varname>buttons</varname> parameter has an
- <classname>int</classname> type, and the usual way to supply a value is
- to use one of the predefined values taken from Java's
- <classname>JOptionPane</classname> class. You can choose among
- <constant>JOptionPane.YES_NO_OPTION</constant>,
- <constant>JOptionPane.YES_NO_CANCEL_OPTION</constant>, or
- <constant>JOptionPane.OK_CANCEL_OPTION</constant>. The return value of
- the method is also an <classname>int</classname>, and should be tested
- against the value of other predefined constants:
- <constant>JOptionPane.YES_OPTION</constant>,
- <constant>JOptionPane.NO_OPTION</constant>,
- <constant>JOptionPane.OK_OPTION</constant> or
- <constant>JOptionPane.CANCEL_OPTION</constant>.</para>
-
- <para>We've looked at using <function>Macros.message()</function>. To
- use the other methods, you would write something like the
- following:</para>
-
- <informalexample>
- <!-- <title>Using <function>Macros.error()</function> and
- <function>Macros.input()</function></title> -->
-
- <programlisting>Macros.error(view, "Goodbye, cruel world!");
-
-String result = Macros.input(view, "Type something here.");
-
-String result = Macros.input(view, "When were you born?",
- "I don't remember, I was very young at the time");
-
-int result = Macros.confirm(view, "Do you really want to learn"
- + " about BeanShell?",JOptionPane.YES_NO_OPTION);
- </programlisting>
- </informalexample>
-
- <para>In the last three examples, placing the word
- <classname>String</classname> or <classname>int</classname> before the
- variable name <varname>result</varname> tells BeanShell that the
- variable refers to an integer or a <classname>String</classname> object,
- even before a particular value is assigned to the variable. In
- BeanShell, this <glossterm>declaration</glossterm> of the
- <glossterm>type</glossterm> of <varname>result</varname> is not
- necessary; BeanShell can figure it out when the macro runs. This can be
- helpful if you are not comfortable with specifying types and classes;
- just use your variables and let BeanShell worry about it.</para>
-
- <para>Note that macros are not limited to using these methods for
- presenting a user interface. In fact, full-blown user interfaces using
- the Java Swing APIs are also possible, and will be covered later on in
- <xref linkend="dialog-macro" />.</para>
- </section>
-
- <section id="dynamic-typing">
- <title>BeanShell Dynamic Typing</title>
-
- <para>Without an explicit <glossterm>type declaration</glossterm> like
- <classname>String</classname> <varname>result</varname>, BeanShell
- variables can change their type at runtime depending on the object or
- data assigned to it. This dynamic typing allows you to write code like
- this (if you really wanted to):</para>
-
- <informalexample>
- <!-- <title>Dynamic typing of variables</title> -->
-
- <programlisting>// note: no type declaration
-result = Macros.input(view, <quote>Type something here.</quote>);
-
-// this is our predefined, current View
-result = view;
-
-// this is an <quote>int</quote> (for integer);
-// in Java and BeanShell, int is one of a small number
-// of <quote>primitive</quote> data types which are not classes
-result = 14;</programlisting>
- </informalexample>
-
- <para>However, if you first declared <varname>result</varname> to be
- type <classname>String</classname> and and then tried these
- reassignments, BeanShell would complain. While avoiding explicit type
- declaration makes writing macro code simpler, using them can act as a
- check to make sure you are not using the wrong variable type of object
- at a later point in your script. It also makes it easier (if you are so
- inclined) to take a BeanShell <quote>prototype</quote> and incorporate
- it in a Java program.</para>
-
- <para>One last thing before we bury our first macro. The double slashes
- in the examples just above signify that everything following them on
- that line should be ignored by BeanShell as a comment. As in Java and
- C/C++, you can also embed comments in your BeanShell code by setting
- them off with pairs of <userinput>/* */</userinput>, as in the following
- example:</para>
-
- <informalexample>
- <programlisting>/* This is a long comment that covers several lines
-and will be totally ignored by BeanShell regardless of how
-many lines it covers */</programlisting>
- </informalexample>
- </section>
-
- <section id="something-useful">
- <title>Now For Something Useful</title>
-
- <para>Here is a macro that inserts the path of the current buffer in the
- text:</para>
-
- <informalexample>
- <!-- <title>Insert buffer path in text</title> -->
-
- <programlisting>String newText = buffer.getPath();
-textArea.setSelectedText(newText);</programlisting>
- </informalexample>
-
- <para>Unlike in our first macro example, here we are calling class
- methods on particular objects. First, we call
- <function>getPath()</function> on the current <ulink
- url="../api/org/gjt/sp/jedit/Buffer.html">Buffer</ulink> object to get
- the full path of the text file currently being edited. Next, we call
- <function>setSelectedText()</function> on the current text display
- component, specifying the text to be inserted as a parameter.</para>
-
- <para>In precise terms, the <function>setSelectedText()</function>
- method substitutes the contents of the <classname>String</classname>
- parameter for a range of selected text that includes the current caret
- position. If no text is selected at the caret position, the effect of
- this operation is simply to insert the new text at that position.</para>
-
- <para>Here's a few alternatives to the full file path that you could use
- to insert various useful things:</para>
-
- <informalexample>
- <!-- <title>Items to use with
- <function>setSelectedText()</function></title> -->
-
- <programlisting>// the file name (without full path)
-String newText = buffer.getName();
-
-// today's date
-import java.text.DateFormat;
-
-String newText = DateFormat.getDateInstance()
- .format(new Date());
-
-// a line count for the current buffer
-String newText = "This file contains "
- + textArea.getLineCount() + " lines.";</programlisting>
- </informalexample>
-
- <para>Here are brief comments on each:</para>
-
- <itemizedlist>
- <listitem>
- <para>In the first, the call to <function>getName()</function>
- invokes another method of the <ulink
- url="../api/org/gjt/sp/jedit/Buffer.html">Buffer</ulink>
- class.</para>
- </listitem>
-
- <listitem>
- <para>The syntax of the second example chains the results of
- several methods. You could write it this way:</para>
-
- <programlisting>import java.text.DateFormat;
-Date d = new Date();
-DateFormat df = DateFormat.getDateInstance();
-String result = df.format(d);
-</programlisting>
-
- <para>Taking the pieces in order:</para>
-
- <itemizedlist>
- <listitem>
- <para>A Java <classname>Date</classname> object is
- created using the <function>new</function> keyword. The
- empty parenthesis after <classname>Date</classname>
- signify a call on the <glossterm> constructor
- method</glossterm> of <classname>Date</classname> having
- no parameters; here, a <classname>Date</classname> is
- created representing the current date and time.</para>
- </listitem>
-
- <listitem>
- <para><function>DateFormat.getDateInstance()</function>
- is a static method that creates and returns a
- <classname>DateFormat</classname> object. As the name
- implies, <classname>DateFormat</classname> is a Java
- class that takes <classname>Date</classname> objects and
- produces readable text. The method
- <function>getDateInstance()</function> returns a
- <classname>DateFormat</classname> object that parses and
- formats dates. It will use the default
- <glossterm>locale</glossterm> or text format specified
- in the user's Java installation.</para>
- </listitem>
-
- <listitem>
- <para>Finally,
- <classname>DateFormat.format()</classname> is called on
- the new <classname>DateFormat</classname> object using
- the <classname>Date</classname> object as a parameter.
- The result is a <classname>String</classname> containing
- the date in the default locale.</para>
- </listitem>
-
- <listitem>
- <para>Note that the <classname>Date</classname> class is
- contained in the <literal>java.util</literal> package,
- so an explicit import statement is not required.
- However, <classname>DateFormat</classname> is part of
- the <literal>java.text</literal> package, which is not
- automatically imported, so an explicit
- <function>import</function> statement must be
- used.</para>
- </listitem>
- </itemizedlist>
- </listitem>
-
- <listitem>
- <para>The third example shows three items of note: <itemizedlist>
- <listitem>
- <para><function>getLineCount()</function> is a method
- in jEdit's <ulink
- url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
- class. It returns an <classname>int</classname>
- representing the number of lines in the current text
- buffer. We call it on <varname>textArea</varname>,
- the pre-defined, current <ulink
- url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
- object.</para>
- </listitem>
-
- <listitem>
- <para>The use of the <function>+</function> operator
- (which can be chained, as here) appends objects and
- string literals to return a single, concatenated
- <classname>String</classname>.</para>
- </listitem>
- </itemizedlist></para>
- </listitem>
- </itemizedlist>
- </section>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="macro-basics">
+ <title>Macro Basics</title>
+ <!-- jEdit 4.0 Macro Guide, (C) 2001, 2002 John Gellene -->
+ <!-- jEdit buffer-local properties: -->
+ <!-- :indentSize=1:noTabs=yes:maxLineLen=72:tabSize=2: -->
+ <!-- :xml.root=users-guide.xml: -->
+ <!-- This file cover the introductory section of the macro guide -->
+ <!-- $Id: macro-basics.xml 16181 2009-09-08 19:26:57Z ezust $ -->
+
+ <section id="beanshell-intro">
+ <title>Introducing BeanShell</title>
+
+ <para>Here is how BeanShell's author, Pat Niemeyer, describes his
+ creation:</para>
+
+ <blockquote>
+ <para><quote>BeanShell is a small, free, embeddable, Java source
+ interpreter with object scripting language features, written in
+ Java. BeanShell executes standard Java statements and expressions,
+ in addition to obvious scripting commands and syntax. BeanShell
+ supports scripted objects as simple method closures like those in
+ Perl and JavaScript.</quote></para>
+ </blockquote>
+
+ <para>You do not have to know anything about Java to begin writing your
+ own jEdit macros. But if you know how to program in Java, you already
+ know how to write BeanShell scripts. The major strength of using
+ BeanShell with a program written in Java is that it allows the user to
+ customize the program's behavior using the same interfaces designed and
+ used by the program itself. BeanShell can turn a well-designed
+ application into a powerful, extensible toolkit.</para>
+
+ <para>This guide focuses on using BeanShell in macros. If you are
+ interested in learning more about BeanShell generally, consult the
+ <ulink url="http://www.beanshell.org">BeanShell web site</ulink>.
+ Information on how to run and organize macros, whether included with the
+ jEdit installation or written by you, can be found in <xref
+ linkend="using-macros" />.</para>
+ </section>
+
+ <section id="single-macros">
+ <title>Single Execution Macros</title>
+
+ <para>As noted in <xref linkend="organizing-macros" />, you can save a
+ BeanShell script of any length as a text file with the
+ <filename>.bsh</filename> extension and run it from the
+ <guimenu>Macros</guimenu> menu. There are three other ways jEdit lets
+ you use BeanShell quickly, without saving a script to storage, on a
+ <quote>one time only</quote> basis. You will find them in the
+ <guimenu>Utilities</guimenu> menu.</para>
+
+ <para><guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
+ BeanShell Expression</guimenuitem> displays a text input dialog that
+ asks you to type a single line of BeanShell commands. You can type more
+ than one BeanShell statement so long as each of them ends with a
+ semicolon. If BeanShell successfully interprets your input, a message
+ box will appear with the return value of the last statement.</para>
+
+ <para><guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
+ For Selected Lines</guimenuitem> displays a text input dialog that asks
+ you to type a single line of BeanShell commands. The commands are
+ evaluated for each line of the selection. In addition to the standard
+ set of variables described in <xref linkend="predefined-variables" />,
+ this command defines the following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><varname>line</varname> - the line number, from the start
+ of the buffer. The first line is numbered 0.</para>
+ </listitem>
+
+ <listitem>
+ <para><varname>index</varname> - the line number, from the start
+ of the selection. The first line is numbered 0.</para>
+ </listitem>
+
+ <listitem>
+ <para><varname>text</varname> - the text of the line.</para>
+ </listitem>
+ </itemizedlist>
+
+ <informalexample>
+ <para>Try typing an expression like <userinput>(line + 1) + ": " +
+ text</userinput> in the <guimenuitem>Evaluate For Selected
+ Lines</guimenuitem> dialog box. This will add a line number to each
+ selected line beginning with the number
+ <userinput>1</userinput>.</para>
+ </informalexample>
+
+ <para>The BeanShell expression you enter will be evaluated and
+ substituted in place of the entire text of a selected line. If you want
+ to leave the line's current text as an element of the modified line, you
+ must include the defined variable <userinput>text</userinput> as part of
+ the BeanShell expression that you enter.</para>
+
+ <para><guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
+ Selection</guimenuitem> evaluates the selected text as a BeanShell
+ script and replaces it with the return value of the statement.</para>
+
+ <para>Using <guimenuitem>Evaluate Selection</guimenuitem> is an easy way
+ to do arithmetic calculations inline while editing. BeanShell uses
+ numbers and arithmetic operations in an ordinary, intuitive way.</para>
+
+ <informalexample>
+ <para>Try typing an expression like
+ <userinput>(3745*856)+74</userinput> in the buffer, select it, and
+ choose
+ <guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
+ Selection</guimenuitem>. The selected text will be replaced by the
+ answer, <userinput>3205794</userinput>. <!-- Irrelevant? --> <!-- Since this is a text file
+ and not a spreadsheet, the original values that BeanShell evaluated are
+ not retained or saved as part of the buffer's contents. --></para>
+ </informalexample>
+
+ <sidebar>
+ <title>Console plugin</title>
+
+ <para>You can also do the same thing using the BeanShell interpreter
+ option of the <application>Console</application> plugin.</para>
+ </sidebar>
+ </section>
+
+ <section id="first-example">
+ <title>The Mandatory First Example</title>
+
+ <informalexample>
+ <!-- <title>A first one-line macro</title> -->
+
+ <programlisting>Macros.message(view, "Hello world!");</programlisting>
+ </informalexample>
+
+ <para>Running this one line script causes jEdit to display a message box
+ (more precisely, a <classname>JOptionPane</classname> object) with the
+ traditional beginner's message and an <guilabel>OK</guilabel> button.
+ Let's see what is happening here.</para>
+
+ <para>This statement calls a static method (or function) named
+ <function>message</function> in jEdit's <ulink
+ url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class. If you
+ don't know anything about classes or static methods or Java (or C++,
+ which employs the same concept), you will need to gain some
+ understanding of a few terms. Obviously this is not the place for
+ academic precision, but if you are entirely new to object-oriented
+ programming, here are a few skeleton ideas to help you with
+ BeanShell.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>An <glossterm>object</glossterm> is a collection of data
+ that can be initialized, accessed and manipulated in certain
+ defined ways.</para>
+ </listitem>
+
+ <listitem>
+ <para>A <glossterm>class</glossterm> is a specification of what
+ data an object contains and what methods can be used to work
+ with the data. A Java application consists of one or more
+ classes (in the case of jEdit ,over 600 classes) written by the
+ programmer that defines the application's behavior. A BeanShell
+ macro uses these classes, along with built-in classes that are
+ supplied with the Java platform, to define its own
+ behavior.</para>
+ </listitem>
+
+ <listitem>
+ <para>A <glossterm>subclass</glossterm> (or child class) is a
+ class which uses (or <quote>inherits</quote>) the data and
+ methods of its parent class along with additions or
+ modifications that alter the subclass's behavior. Classes are
+ typically organized in hierarchies of parent and child classes
+ to organize program code, to define common behavior in shared
+ parent class code, and to specify the types of similar behavior
+ that child classes will perform in their own specific
+ ways.</para>
+ </listitem>
+
+ <listitem>
+ <para>A <glossterm>method</glossterm> (or function) is a
+ procedure that works with data in a particular object, other
+ data (including other objects) supplied as
+ <glossterm>parameters</glossterm>, or both. Methods typically
+ are applied to a particular object which is an
+ <glossterm>instance</glossterm> of the class to which the method
+ belongs.</para>
+ </listitem>
+
+ <listitem>
+ <para>A <glossterm>static method</glossterm> differs from other
+ methods in that it does not deal with the data in a particular
+ object but is included within a class for the sake of
+ convenience.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Java has a rich set of classes defined as part of the Java
+ platform. Like all Java applications, jEdit is organized as a set of
+ classes that are themselves derived from the Java platform's classes. We
+ will refer to <firstterm>Java classes</firstterm> and <firstterm>jEdit
+ classes</firstterm> to make this distinction. Some of jEdit's classes
+ (such as those dealing with regular expressions and XML) are derived
+ from or make use of classes in other open-source Java packages. Except
+ for BeanShell itself, we won't be discussing them in this guide.</para>
+
+ <para>In our one line script, the static method
+ <function>Macros.message()</function> has two parameters because that is
+ the way the method is defined in the <ulink
+ url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class. You must
+ specify both parameters when you call the function. The first parameter,
+ <parameter>view</parameter>, is a variable naming the current, active
+ <ulink url="../api/org/gjt/sp/jedit/View.html">View</ulink> object.
+ Information about pre-defined variables can be found in <xref
+ linkend="predefined-variables" />.</para>
+
+ <para>The second parameter, which appears to be quoted text, is a
+ <glossterm>string literal</glossterm> - a sequence of characters of
+ fixed length and content. Behind the scenes, BeanShell and Java take
+ this string literal and use it to create a <classname>String</classname>
+ object. Normally, if you want to create an object in Java or BeanShell,
+ you must construct the object using the <function>new</function> keyword
+ and a <firstterm>constructor</firstterm> method that is part of the
+ object's class. We'll show an example of that later. However, both Java
+ and BeanShell let you use a string literal anytime a method's parameter
+ calls for a <classname>String</classname>.</para>
+
+ <para>If you are a Java programmer, you might wonder about a few things
+ missing from this one line program. There is no class definition, for
+ example. You can think of a BeanShell script as an implicit definition
+ of a <function>main()</function> method in an anonymous class. That is
+ in fact how BeanShell is implemented; the class is derived from a
+ BeanShell class called <ulink url="../api/bsh/XThis.html">XThis</ulink>.
+ If you don't find that helpful, just think of a script as one or more
+ blocks of procedural statements conforming to Java syntax rules. You
+ will also get along fine (for the most part) with C or C++ syntax if you
+ leave out anything to do with pointers or memory management - Java and
+ BeanShell do not have pointers and deal with memory management
+ automatically.</para>
+
+ <para>Another missing item from a Java perspective is a
+ <function>package</function> statement. In Java, such a statement is
+ used to bundle together a number of files so that their classes become
+ visible to one another. Packages are not part of BeanShell, and you
+ don't need to know anything about them to write BeanShell macros.</para>
+
+ <para>Finally, there are no <function>import</function> statements in
+ this script. In Java, an <function>import</function> statement makes
+ public classes from other packages visible within the file in which the
+ statement occurs without having to specify a fully qualified class name.
+ Without an import statement or a fully qualified name, Java cannot
+ identify most classes using a single name as an identifier.</para>
+
+ <para>jEdit automatically imports a number of commonly-used packages
+ into the namespace of every BeanShell script. Because of this, the
+ script output of a recorded macro does not contain
+ <function>import</function> statements. For the same reason, most
+ BeanShell scripts you write will not require <function>import</function>
+ statements.</para>
+
+ <para>Java requires <literal>import</literal> statement to be located at
+ the beginning of a source file. BeanShell allows you to place
+ <literal>import</literal> statements anywhere in a script, including
+ inside a block of statements. The <literal>import</literal> statement
+ will cover all names used following the statement in the enclosing
+ block.</para>
+
+ <para>If you try to use a class that is not imported without its
+ fully-qualified name, the BeanShell interpreter will complain with an
+ error message relating to the offending line of code.</para>
+
+ <sidebar>
+ <para>Here is the full list of packages automatically imported by
+ jEdit:</para>
+
+ <programlisting>java.awt
+java.awt.event
+java.net
+java.util
+java.io
+java.lang
+javax.swing
+javax.swing.event
+org.gjt.sp.jedit
+org.gjt.sp.jedit.browser
+org.gjt.sp.jedit.buffer
+org.gjt.sp.jedit.gui
+org.gjt.sp.jedit.help
+org.gjt.sp.jedit.io
+org.gjt.sp.jedit.msg
+org.gjt.sp.jedit.options
+org.gjt.sp.jedit.pluginmgr
+org.gjt.sp.jedit.print
+org.gjt.sp.jedit.search
+org.gjt.sp.jedit.syntax
+org.gjt.sp.jedit.textarea
+org.gjt.sp.util</programlisting>
+ </sidebar>
+ </section>
+
+ <section id="predefined-variables">
+ <title>Predefined Variables in BeanShell</title>
+
+ <para>The following variables are always available for use in BeanShell
+ scripts:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><varname>buffer</varname> - a <ulink
+ url="../api/org/gjt/sp/jedit/Buffer.html">Buffer</ulink> object
+ represents the contents of the currently visible open text
+ file.</para>
+ </listitem>
+
+ <listitem>
+ <para><varname>view</varname> - A <ulink
+ url="../api/org/gjt/sp/jedit/View.html">View</ulink> represents
+ the current top-level editor window, extending Java's
+ <classname>JFrame</classname> class, that contains the various
+ visible components of the program, including the text area, menu
+ bar, toolbar, and any docked windows.</para>
+
+ <para>This variable has the same value as the return value
+ of:</para>
+
+ <programlisting>jEdit.getActiveView()</programlisting>
+ </listitem>
+
+ <listitem>
+ <para><varname>editPane</varname> - an <ulink
+ url="../api/org/gjt/sp/jedit/EditPane.html">EditPane</ulink>
+ object contains a text area and buffer switcher. A view can be
+ split to display edit panes. Among other things, the <ulink
+ url="../api/org/gjt/sp/jedit/EditPane.html">EditPane</ulink>
+ class contains methods for selecting the buffer to edit.</para>
+
+ <para>Most of the time your macros will manipulate the
+ <varname>buffer</varname> or the <varname>textArea</varname>.
+ Sometimes you will need to use <varname>view</varname> as a
+ parameter in a method call. You will probably only need to use
+ <varname>editPane</varname> if your macros work with split
+ views.</para>
+
+ <para>This variable has the same value as the return value
+ of:</para>
+
+ <programlisting>view.getEditPane()</programlisting>
+ </listitem>
+
+ <listitem>
+ <para><varname>textArea</varname> - a <ulink
+ url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
+ is the visible component that displays the current
+ buffer.</para>
+
+ <para>This variable has the same value as the return value
+ of:</para>
+
+ <programlisting>editPane.getTextArea()</programlisting>
+ </listitem>
+
+ <listitem>
+ <para><varname>wm</varname> - a <ulink
+ url="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html">DockableWindowManager</ulink>
+ is the visible component that manages dockable windows in the
+ current view. This class is discussed in detail in <xref
+ linkend="writing-plugins-part" />. This object is useful for
+ writing macros that interface with, open, or close plugin
+ windows.</para>
+
+ <para>This variable has the same value the return value
+ of:</para>
+
+ <programlisting>view.getDockableWindowManager()</programlisting>
+ </listitem>
+
+ <listitem>
+ <para><varname>scriptPath</varname> - set to the full path of
+ the script currently being executed.</para>
+ </listitem>
+
+ <listitem>
+ <para><varname>scriptPath</varname> - set to the full path of
+ the script currently being executed.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Note that these variables are set at the beginning of macro
+ execution. If the macro switches views, buffers or edit panes, the
+ variable values will be out of date. In that case, you can use the
+ equivalent method calls.</para>
+ </section>
+
+ <section id="helpful-methods">
+ <title>Helpful Methods in the Macros Class</title>
+
+ <para>Including <function>message()</function>, there are five static
+ methods in the <ulink
+ url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class that
+ allow you to converse easily with your macros. They all encapsulate
+ calls to methods of the Java platform's
+ <classname>JOptionPane</classname> class.</para>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public static void
+ <function>message</function></funcdef>
+
+ <paramdef>Component
+ <parameter>comp</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>message</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public static void
+ <function>error</function></funcdef>
+
+ <paramdef>Component
+ <parameter>comp</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>message</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public static String
+ <function>input</function></funcdef>
+
+ <paramdef>Component
+ <parameter>comp</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>prompt</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public static String
+ <function>input</function></funcdef>
+
+ <paramdef>Component
+ <parameter>comp</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>prompt</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>defaultValue</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public static int
+ <function>confirm</function></funcdef>
+
+ <paramdef>Component
+ <parameter>comp</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>prompt</parameter></paramdef>
+
+ <paramdef>int <parameter>buttons</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+ </itemizedlist>
+
+ <para>The format of these four <glossterm>declarations</glossterm>
+ provides a concise reference to the way in which the methods may be
+ used. The keyword <function>public</function> means that the method can
+ be used outside the <ulink
+ url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class. The
+ alternatives are <function>private</function> and
+ <function>protected</function>. For purposes of BeanShell, you just have
+ to know that BeanShell can only use public methods of other Java
+ classes. The keyword <function>static</function> we have already
+ discussed. It means that the method does not operate on a particular
+ object. You call a static function using the name of the class (like
+ <ulink url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink>) rather
+ than the name of a particular object (like <varname>view</varname>). The
+ third word is the type of the value returned by the method. The keyword
+ <function>void</function> is Java's way of saying the the method does
+ not have a return value.</para>
+
+ <para>The <function>error()</function> method works just like
+ <function>message()</function> but displays an error icon in the message
+ box. The <function>input()</function> method furnishes a text field for
+ input, an <guilabel>OK</guilabel> button and a
+ <guilabel>Cancel</guilabel> button. If <guilabel>Cancel</guilabel> is
+ pressed, the method returns <constant>null</constant>. If
+ <guilabel>OK</guilabel> is pressed, a <classname>String</classname>
+ containing the contents of the text field is returned. Note that there
+ are two forms of the <function>input()</function> method; the first form
+ with two parameters displays an empty input field, the other forms lets
+ you specify an initial, default input value.</para>
+
+ <para>For those without Java experience, it is important to know that
+ <constant>null</constant> is <emphasis>not</emphasis> the same as an
+ empty, <quote>zero-length</quote> <classname>String</classname>. It is
+ Java's way of saying that there is no object associated with this
+ variable. Whenever you seek to use a return value from
+ <function>input()</function> in your macro, you should test it to see if
+ it is <constant>null</constant>. In most cases, you will want to exit
+ gracefully from the script with a <function>return</function> statement,
+ because the presence of a null value for an input variable usually means
+ that the user intended to cancel macro execution. BeanShell will
+ complain if you call any methods on a <constant>null</constant>
+ object.</para>
+
+ <para>The <function>confirm()</function> method in the <ulink
+ url="../api/org/gjt/sp/jedit/Macros.html">Macros</ulink> class is a
+ little more complex. The <varname>buttons</varname> parameter has an
+ <classname>int</classname> type, and the usual way to supply a value is
+ to use one of the predefined values taken from Java's
+ <classname>JOptionPane</classname> class. You can choose among
+ <constant>JOptionPane.YES_NO_OPTION</constant>,
+ <constant>JOptionPane.YES_NO_CANCEL_OPTION</constant>, or
+ <constant>JOptionPane.OK_CANCEL_OPTION</constant>. The return value of
+ the method is also an <classname>int</classname>, and should be tested
+ against the value of other predefined constants:
+ <constant>JOptionPane.YES_OPTION</constant>,
+ <constant>JOptionPane.NO_OPTION</constant>,
+ <constant>JOptionPane.OK_OPTION</constant> or
+ <constant>JOptionPane.CANCEL_OPTION</constant>.</para>
+
+ <para>We've looked at using <function>Macros.message()</function>. To
+ use the other methods, you would write something like the
+ following:</para>
+
+ <informalexample>
+ <!-- <title>Using <function>Macros.error()</function> and
+ <function>Macros.input()</function></title> -->
+
+ <programlisting>Macros.error(view, "Goodbye, cruel world!");
+
+String result = Macros.input(view, "Type something here.");
+
+String result = Macros.input(view, "When were you born?",
+ "I don't remember, I was very young at the time");
+
+int result = Macros.confirm(view, "Do you really want to learn"
+ + " about BeanShell?",JOptionPane.YES_NO_OPTION);
+ </programlisting>
+ </informalexample>
+
+ <para>In the last three examples, placing the word
+ <classname>String</classname> or <classname>int</classname> before the
+ variable name <varname>result</varname> tells BeanShell that the
+ variable refers to an integer or a <classname>String</classname> object,
+ even before a particular value is assigned to the variable. In
+ BeanShell, this <glossterm>declaration</glossterm> of the
+ <glossterm>type</glossterm> of <varname>result</varname> is not
+ necessary; BeanShell can figure it out when the macro runs. This can be
+ helpful if you are not comfortable with specifying types and classes;
+ just use your variables and let BeanShell worry about it.</para>
+
+ <para>Note that macros are not limited to using these methods for
+ presenting a user interface. In fact, full-blown user interfaces using
+ the Java Swing APIs are also possible, and will be covered later on in
+ <xref linkend="dialog-macro" />.</para>
+ </section>
+
+ <section id="dynamic-typing">
+ <title>BeanShell Dynamic Typing</title>
+
+ <para>Without an explicit <glossterm>type declaration</glossterm> like
+ <classname>String</classname> <varname>result</varname>, BeanShell
+ variables can change their type at runtime depending on the object or
+ data assigned to it. This dynamic typing allows you to write code like
+ this (if you really wanted to):</para>
+
+ <informalexample>
+ <!-- <title>Dynamic typing of variables</title> -->
+
+ <programlisting>// note: no type declaration
+result = Macros.input(view, <quote>Type something here.</quote>);
+
+// this is our predefined, current View
+result = view;
+
+// this is an <quote>int</quote> (for integer);
+// in Java and BeanShell, int is one of a small number
+// of <quote>primitive</quote> data types which are not classes
+result = 14;</programlisting>
+ </informalexample>
+
+ <para>However, if you first declared <varname>result</varname> to be
+ type <classname>String</classname> and and then tried these
+ reassignments, BeanShell would complain. While avoiding explicit type
+ declaration makes writing macro code simpler, using them can act as a
+ check to make sure you are not using the wrong variable type of object
+ at a later point in your script. It also makes it easier (if you are so
+ inclined) to take a BeanShell <quote>prototype</quote> and incorporate
+ it in a Java program.</para>
+
+ <para>One last thing before we bury our first macro. The double slashes
+ in the examples just above signify that everything following them on
+ that line should be ignored by BeanShell as a comment. As in Java and
+ C/C++, you can also embed comments in your BeanShell code by setting
+ them off with pairs of <userinput>/* */</userinput>, as in the following
+ example:</para>
+
+ <informalexample>
+ <programlisting>/* This is a long comment that covers several lines
+and will be totally ignored by BeanShell regardless of how
+many lines it covers */</programlisting>
+ </informalexample>
+ </section>
+
+ <section id="something-useful">
+ <title>Now For Something Useful</title>
+
+ <para>Here is a macro that inserts the path of the current buffer in the
+ text:</para>
+
+ <informalexample>
+ <!-- <title>Insert buffer path in text</title> -->
+
+ <programlisting>String newText = buffer.getPath();
+textArea.setSelectedText(newText);</programlisting>
+ </informalexample>
+
+ <para>Unlike in our first macro example, here we are calling class
+ methods on particular objects. First, we call
+ <function>getPath()</function> on the current <ulink
+ url="../api/org/gjt/sp/jedit/Buffer.html">Buffer</ulink> object to get
+ the full path of the text file currently being edited. Next, we call
+ <function>setSelectedText()</function> on the current text display
+ component, specifying the text to be inserted as a parameter.</para>
+
+ <para>In precise terms, the <function>setSelectedText()</function>
+ method substitutes the contents of the <classname>String</classname>
+ parameter for a range of selected text that includes the current caret
+ position. If no text is selected at the caret position, the effect of
+ this operation is simply to insert the new text at that position.</para>
+
+ <para>Here's a few alternatives to the full file path that you could use
+ to insert various useful things:</para>
+
+ <informalexample>
+ <!-- <title>Items to use with
+ <function>setSelectedText()</function></title> -->
+
+ <programlisting>// the file name (without full path)
+String newText = buffer.getName();
+
+// today's date
+import java.text.DateFormat;
+
+String newText = DateFormat.getDateInstance()
+ .format(new Date());
+
+// a line count for the current buffer
+String newText = "This file contains "
+ + textArea.getLineCount() + " lines.";</programlisting>
+ </informalexample>
+
+ <para>Here are brief comments on each:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the first, the call to <function>getName()</function>
+ invokes another method of the <ulink
+ url="../api/org/gjt/sp/jedit/Buffer.html">Buffer</ulink>
+ class.</para>
+ </listitem>
+
+ <listitem>
+ <para>The syntax of the second example chains the results of
+ several methods. You could write it this way:</para>
+
+ <programlisting>import java.text.DateFormat;
+Date d = new Date();
+DateFormat df = DateFormat.getDateInstance();
+String result = df.format(d);
+</programlisting>
+
+ <para>Taking the pieces in order:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>A Java <classname>Date</classname> object is
+ created using the <function>new</function> keyword. The
+ empty parenthesis after <classname>Date</classname>
+ signify a call on the <glossterm> constructor
+ method</glossterm> of <classname>Date</classname> having
+ no parameters; here, a <classname>Date</classname> is
+ created representing the current date and time.</para>
+ </listitem>
+
+ <listitem>
+ <para><function>DateFormat.getDateInstance()</function>
+ is a static method that creates and returns a
+ <classname>DateFormat</classname> object. As the name
+ implies, <classname>DateFormat</classname> is a Java
+ class that takes <classname>Date</classname> objects and
+ produces readable text. The method
+ <function>getDateInstance()</function> returns a
+ <classname>DateFormat</classname> object that parses and
+ formats dates. It will use the default
+ <glossterm>locale</glossterm> or text format specified
+ in the user's Java installation.</para>
+ </listitem>
+
+ <listitem>
+ <para>Finally,
+ <classname>DateFormat.format()</classname> is called on
+ the new <classname>DateFormat</classname> object using
+ the <classname>Date</classname> object as a parameter.
+ The result is a <classname>String</classname> containing
+ the date in the default locale.</para>
+ </listitem>
+
+ <listitem>
+ <para>Note that the <classname>Date</classname> class is
+ contained in the <literal>java.util</literal> package,
+ so an explicit import statement is not required.
+ However, <classname>DateFormat</classname> is part of
+ the <literal>java.text</literal> package, which is not
+ automatically imported, so an explicit
+ <function>import</function> statement must be
+ used.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>The third example shows three items of note: <itemizedlist>
+ <listitem>
+ <para><function>getLineCount()</function> is a method
+ in jEdit's <ulink
+ url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
+ class. It returns an <classname>int</classname>
+ representing the number of lines in the current text
+ buffer. We call it on <varname>textArea</varname>,
+ the pre-defined, current <ulink
+ url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
+ object.</para>
+ </listitem>
+
+ <listitem>
+ <para>The use of the <function>+</function> operator
+ (which can be chained, as here) appends objects and
+ string literals to return a single, concatenated
+ <classname>String</classname>.</para>
+ </listitem>
+ </itemizedlist></para>
+ </listitem>
+ </itemizedlist>
+ </section>
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/macro-index.xml b/jEdit/doc/users-guide/macro-index.xml
index 54c3640..57d0a68 100644
--- a/jEdit/doc/users-guide/macro-index.xml
+++ b/jEdit/doc/users-guide/macro-index.xml
@@ -1,692 +1,802 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<appendix id="macro-index">
- <title>Macros Included With jEdit</title>
- <!-- jEdit 4.0 Macro Guide, (C) 2001 John Gellene -->
- <!-- jEdit buffer-local properties: -->
- <!-- :indentSize=2:noTabs=yes:maxLineLen=80:tabSize=2: -->
- <!-- :xml.root=users-guide.xml: -->
- <!-- covers index to installed macro set -->
-
- <para>jEdit comes with a large number of sample macros that perform a
- variety of tasks. The following index provides short descriptions of each
- macro, in some cases accompanied by usage notes.</para>
-
- <para>In addition to the macros included with jEdit, a very large collection
- of user-contributed macros is available in the <quote>Downloads</quote>
- section of the <ulink
- url="http://community.jedit.org">community.jedit.org</ulink> web site. There
- are detailed descriptions for each macro as well as a search
- facility.</para>
-
- <section id="macros-c" >
- <title>C/C++ macros </title>
- <para> These macros are useful for C/C++ programming. </para>
- <itemizedlist>
- <listitem><para> <filename>Include_Guard.bsh</filename> </para>
- <para> Inserts conditional preprocessor directives around a header
- file, to prevent it from being included multiple times. </para>
- <para>The name of the generated preprocessor macro is based on the
- buffer's name. </para>
- </listitem>
-
- <listitem><para><filename> Toggle_Header_Source</filename></para>
- <para> Toggles between the header and the implementation file. Works for .c, .cxx, and .cpp extensions. </para>
- </listitem>
- </itemizedlist>
- </section>
-
-
- <section id="macros-clipboard">
- <title>Clipboard Macros</title>
-
- <para>These macros copy or cut text to the clipboard.</para>
-
- <itemizedlist>
- <listitem>
- <para><filename>Copy_Lines_Containing.bsh</filename></para>
-
- <para>Copies all lines from the current buffer, containing a
- user-supplied string, to the clipboard.</para>
- </listitem>
-
- <listitem>
- <para><filename>Cut_Lines_Containing.bsh</filename></para>
-
- <para>Cuts all lines from the current buffer, containing a
- user-supplied string, to the clipboard.</para>
- </listitem>
-
- <listitem>
- <para><filename>Copy_Selection_or_Line.bsh</filename></para>
-
- <para>If no text is selected, the current line is copied to the
- clipboard, otherwise the selected text is copied to the
- clipboard. Some editors have this has the default copy behavior.
- To achieve the same effect in jEdit, bind this macro to
- <keycap>C+c</keycap> in the <guibutton>Shortcuts</guibutton>
- pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
- </listitem>
-
- <listitem>
- <para><filename>Cut_Selection_or_Line.bsh</filename></para>
-
- <para>If no text is selected, the current line is cut to the
- clipboard, otherwise the selected text is cut to the clipboard.
- Some editors have this has the default cut behavior. To achieve
- the same effect in jEdit, bind this macro to
- <keycap>C+x</keycap> in the <guibutton>Shortcuts</guibutton>
- pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
- </listitem>
-
- <listitem>
- <para><filename>Copy_Visible_Lines.bsh</filename></para>
-
- <para>Copies the visible lines from the current buffer to the
- Clipboard. Lines that are not visible becuase they are folded
- are not copied.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="macros-editing">
- <title>Editing Macros</title>
-
- <para>These macros automate various text editing tasks.</para>
-
- <itemizedlist>
- <listitem>
- <para><filename>Emacs_Ctrl-K.bsh</filename></para>
- <para>Cuts and appends text, from the cursor to the end of the line, into the copy buffer. </para>
- </listitem>
-
- <listitem>
- <para><filename>Emacs_Next_Line.bsh</filename></para>
-
- <para>Moves the cursor to the next line, centering the current
- line in the middle of the text area if the cursor is at the
- bottom of the text area.</para>
- </listitem>
-
- <listitem>
- <para><filename>Emacs_Previous_Line.bsh</filename></para>
-
- <para>Moves the cursor to the previous line, centering the
- current line in the middle of the text area if the cursor is at
- the top of the text area.</para>
- </listitem>
-
- <listitem>
- <para><filename>Go_to_Column.bsh</filename></para>
-
- <para>Prompts the user for a column position on the current
- line, then moves the caret there.</para>
- </listitem>
-
- <listitem>
- <para><filename>Greedy_Backspace.bsh</filename></para>
-
- <para>If buffer is using soft tabs, this macro will backspace to
- the previous tab stop, if all characters between the caret and
- the tab stop are spaces. In all other cases a single character
- is removed.</para>
- </listitem>
-
- <listitem>
- <para><filename>Greedy_Delete.bsh</filename></para>
-
- <para>If a buffer is using soft tabs, this macro will delete
- tabSize number of spaces, if all the characters between the
- caret and the next tab stop are spaces. In all other cases a
- single character is deleted.</para>
- </listitem>
-
- <listitem>
- <para><filename>Greedy_Left.bsh</filename></para>
-
- <para>If a buffer is using soft tabs, this macro will move the
- caret tabSize spaces to the left, if all the characters between
- the caret and the previous tab stop are all spaces. In all other
- cases, the caret is moved a single character to the left.</para>
- </listitem>
-
- <listitem>
- <para><filename>Greedy_Right.bsh</filename></para>
-
- <para>If a buffer is using soft tabs, this macro will move the
- caret tabSize spaces to the right, if all the characters between
- the caret and the next tab stop are all spaces. In all other
- cases, the caret is moved a single character to the
- right.</para>
- </listitem>
-
- <listitem>
- <para><filename>Keywords_to_Upper_Case.bsh</filename></para>
-
- <para>Converts all keywords in the current buffer to upper
- case.</para>
- </listitem>
-
- <listitem>
- <para><filename>Mode_Switcher.bsh</filename></para>
-
- <para>Displays a modal dialog with the current buffer's mode in
- a text field, allowing one to change the mode by typing in its
- name.</para>
-
- <para><keycap>ENTER</keycap> selects the current mode; if the
- text is not a valid mode, the dialog still dismisses, but a
- warning is logged to the activity log. <keycap>ESACPE</keycap>
- closes the dialog with no further action. <keycap>TAB</keycap>
- attempts to auto-complete the mode name. Pressing
- <keycap>TAB</keycap> repeatedly cycles through the possible
- completions. <keycap>SHIFT-TAB</keycap> cycles through the
- completions in reverse.</para>
- </listitem>
-
- <listitem>
- <para><filename>Move_Line_Down.bsh</filename></para>
-
- <para>Moves the current line down one, with automatic
- indentation.</para>
- </listitem>
-
- <listitem>
- <para><filename>Move_Line_Up.bsh</filename></para>
-
- <para>Moves the current line up one, with automatic
- indentation.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="macros-files">
- <title>File Management Macros</title>
-
- <para>These macros automate the opening and closing of files.</para>
-
- <itemizedlist>
- <listitem>
- <para><filename>Browse_Directory.bsh</filename></para>
-
- <para>Opens a directory supplied by the user in the file system
- browser.</para>
- </listitem>
-
- <listitem>
- <para><filename>Buffer_Switcher.bsh</filename></para>
-
- <para>Displays a modal dialog listing all open buffers, allowing
- one to switch to and/or close buffers. <keycap>ENTER</keycap>
- switches to a buffer and closes the dialog,
- <keycap>DELETE</keycap> closes a buffer, <keycap>SPACE</keycap>
- switches to a buffer but does not close the dialog.</para>
- </listitem>
-
- <listitem>
- <para><filename>Close_All_Except_Active.bsh</filename></para>
-
- <para>Closes all files except the current buffer.</para>
-
- <para>Prompts the user to save any buffer containing unsaved
- changes.</para>
- </listitem>
-
- <listitem>
- <para><filename>Copy_Path_to_Clipboad.bsh</filename></para>
-
- <para>Copies the current buffer's path to the clipboard.</para>
- </listitem>
-
- <listitem>
- <para><filename>Copy_Name_to_Clipboad.bsh</filename></para>
-
- <para>Copies the current buffer's filename to the
- clipboard.</para>
- </listitem>
-
- <listitem>
- <para><filename>Delete_Current.bsh</filename></para>
-
- <para>Deletes the current buffer's file on disk, but doesn't
- close the buffer.</para>
- </listitem>
-
- <listitem>
- <para><filename>Glob_Close.bsh</filename></para>
-
- <para>Closes all open buffers matching a given glob
- pattern.</para>
- </listitem>
-
- <listitem>
- <para><filename>Insert_Selection.bsh</filename></para>
-
- <para>Assumes the current selection is file path and tries
- replaces the selection with the contents of the file. Does
- nothing if no text is selected or the selection spans multiple
- lines.</para>
- </listitem>
-
- <listitem>
- <para><filename>Next_Dirty_Buffer.bsh</filename></para>
-
- <para>Switches to the next dirty buffer, if there is one.</para>
- </listitem>
-
- <listitem>
- <para><filename>Open_Path.bsh</filename></para>
-
- <para>Opens the file supplied by the user in an input
- dialog.</para>
- </listitem>
-
- <listitem>
- <para><filename>Open_Selection.bsh</filename></para>
-
- <para>Opens the file named by the current buffer's selected
- text.</para>
- </listitem>
-
- <listitem>
- <para><filename>Toggle_ReadOnly.bsh</filename></para>
-
- <para>Toggles a local file's read-only flag. Uses
- platform-specific commands, so it only works on Windows, Unix
- and MacOS X.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="macros-interface">
- <title>User Interface Macros</title>
-
- <para>Description.</para>
-
- <itemizedlist>
- <listitem>
- <para><filename>Decrease_Font_Size.bsh</filename></para>
-
- <para>Decreases the font size in the gutter and text area by 1
- point.</para>
- </listitem>
-
- <listitem>
- <para><filename>Increase_Font_Size.bsh</filename></para>
-
- <para>Increases the font size in the gutter and text area by 1
- point.</para>
- </listitem>
-
- <listitem>
- <para><filename>Open_Context_Menu.bsh</filename></para>
-
- <para>Opens the text area context menu just below and to the
- right of the caret.</para>
- </listitem>
-
- <listitem>
- <para><filename>Toggle_Bottom_Docking_Area.bsh</filename></para>
-
- <para>Expands or collapses the bottom docking area, depending on
- it's current state.</para>
- </listitem>
-
- <listitem>
- <para><filename>Splitpane_Grow</filename> </para>
- <para> When inside a split EditPane, this macro moves the
- splitter away from the cursor, effectively increasing the size of
- the currently active split pane. </para>
- </listitem>
-
-
- <listitem>
- <para><filename>Toggle_Left_Docking_Area.bsh</filename></para>
-
- <para>Expands or collapses the left docking area, depending on
- it's current state.</para>
- </listitem>
-
- <listitem>
- <para><filename>Toggle_Right_Docking_Area.bsh</filename></para>
-
- <para>Expands or collapses the right docking area, depending on
- it's current state.</para>
- </listitem>
-
- <listitem>
- <para><filename>Toggle_Top_Docking_Area.bsh</filename></para>
-
- <para>Expands or collapses the top docking area, depending on
- it's current state.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="macros-java">
- <title>Java Code Macros</title>
-
- <para>These macros handle text formatting and generation tasks that are
- particularly useful in writing Java code.</para>
-
- <itemizedlist>
- <listitem>
- <para><filename>Create_Constructor.bsh</filename></para>
-
- <para>Inserts constructor for the class at the current caret
- position.</para>
- </listitem>
-
- <listitem>
- <para><filename>Get_Class_Name.bsh</filename></para>
-
- <para>Inserts a Java class name based upon the buffer's file
- name.</para>
- </listitem>
-
- <listitem>
- <para><filename>Get_Package_Name.bsh</filename></para>
-
- <para>Inserts a plausible Java package name for the current
- buffer.</para>
-
- <para>The macro compares the buffer's path name with the
- elements of the classpath being used by the jEdit session. An
- error message will be displayed if no suitable package name is
- found. This macro will not work if jEdit is being run as a JAR
- file without specifying a classpath; in that case the classpath
- seen by the macro consists solely of the JAR file.</para>
- </listitem>
-
- <listitem>
- <para><filename>Java_File_Save.bsh</filename></para>
-
- <abstract>
- <para>Acts as a wrapper script to the Save As action. If the
- buffer is a new file, it scans the first 250 lines for a
- Java class or interface declaration. On finding one, it
- extracts the appropriate filename to be used in the Save As
- dialog.</para>
- </abstract>
- </listitem>
-
- <listitem>
- <para><filename>Make_Get_and_Set_Methods.bsh</filename></para>
-
- <para>Creates <function>getXXX()</function> or
- <function>setXXX()</function> methods that can be pasted into
- the buffer text.</para>
-
- <para>This macro presents a dialog that will <quote>grab</quote>
- the names of instance variables from the caret line of the
- current buffer and paste a corresponding
- <function>getXXX()</function> or <function>setXXX()</function>
- method to one of two text areas in the dialog. The text can be
- edited in the dialog and then pasted into the current buffer
- using the <guilabel>Insert...</guilabel> buttons. If the caret
- is set to a line containing something other than an instance
- variable, the text grabbing routine is likely to generate
- nonsense.</para>
-
- <para>As explained in the notes accompanying the source code,
- the macro uses a global variable which can be set to configure
- the macro to work with either Java or C++ code. When set for use
- with C++ code, the macro will also write (in commented text)
- definitions of <function>getXXX()</function> or
- <function>setXXX()</function> suitable for inclusion in a header
- file.</para>
- </listitem>
-
- <listitem>
- <para><filename>Preview_Javadoc_of_Buffer.bsh</filename></para>
-
- <para>Create and display API documentation for the current
- buffer.</para>
-
- <para>The macro includes various configuration variables you can
- change; see the comment at the beginning of the macro source for
- details.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="macros-misc">
- <title>Miscellaneous Macros</title>
-
- <para>While these macros do not fit easily into the other categories,
- they all provide interesting and useful functions.</para>
-
- <itemizedlist>
- <listitem>
- <para><filename>Display_Abbreviations.bsh</filename></para>
-
- <para>Displays the abbreviations registered for each of jEdit's
- editing modes.</para>
-
- <para>The macro provides a read-only view of the abbreviations
- contained in the <quote>Abbreviations</quote> option pane.
- Pressing a letter key will scroll the table to the first entry
- beginning with that letter. A further option is provided to
- write a selected mode's abbreviations or all abbreviations in a
- text buffer for printing as a reference. Notes in the source
- code listing point out some display options that are configured
- by modifying global variables.</para>
- </listitem>
-
- <listitem>
- <para><filename>Display_Actions.bsh</filename></para>
-
- <para>Displays a list of all the actions known to jEdit
- categorised by their action set.</para>
-
- <para>This macro can be a useful reference if you want to use
- the jEdit 4.2 action bar.</para>
- </listitem>
-
- <listitem>
- <para><filename>Display_Character_Code.bsh</filename></para>
-
- <para>Display int and hex values for the character at the caret,
- in the status bar.</para>
- </listitem>
-
- <listitem>
- <para><filename>Display_Shortcuts.bsh</filename></para>
-
- <para>Displays a sorted list of the keyboard shortcuts currently
- in effect.</para>
-
- <para>The macro provides a combined read-only view of command,
- macro and plugin shortcuts. Pressing a letter key will scroll
- the table to the first entry beginning with that letter. A
- further option is provided to write the shortcut assignments in
- a text buffer for printing as a reference. Notes in the source
- code listing point out some display options that are configured
- by modifying global variables.</para>
- </listitem>
-
- <listitem>
- <para><filename>Evaluate_Buffer_in_BeanShell.bsh</filename></para>
-
- <para>Evaluates contents of current buffer as a BeanShell
- script, and opens a new buffer to receive any text
- output.</para>
-
- <para>This is a quick way to test a macro script even before its
- text is saved to a file. Opening a new buffer for output is a
- precaution to prevent the macro from inadvertently erasing or
- overwriting itself. BeanShell scripts that operate on the
- contents of the current buffer will not work meaningfully when
- tested using this macro.</para>
- </listitem>
-
- <listitem>
- <para><filename>Hex_Convert.bsh</filename></para>
-
- <para>Converts byte characters to their hex equivalent, and vice
- versa.</para>
- </listitem>
-
- <listitem>
- <para><filename>HyperSearch_Results_to_Buffer.bsh</filename></para>
-
- <para>Writes HyperSeach results to a new buffer.</para>
- </listitem>
-
-
- <listitem>
- <para><filename>Make_Bug_Report.bsh</filename></para>
-
- <para>Creates a new buffer with installation and error
- information extracted from the activity log.</para>
-
- <para>The macro extracts initial messages written to the
- activity log describing the user's operating system, JDK, jEdit
- version and installed plugins. It then appends the last set of
- error messages written to the activity log. The new text buffer
- can be saved and attached to an email message or a bug report
- made on SourceForge.</para>
- </listitem>
-
- <listitem>
- <para><filename>Run_Script.bsh</filename></para>
-
- <para>Runs script using interpreter based upon buffer's editing
- mode (by default, determined using file extension). You must
- have the appropriate interpreter (such as Perl, Python, or
- Windows Script Host) installed on your system.</para>
- </listitem>
-
- <listitem>
- <para><filename>Show_Threads.bsh</filename></para>
-
- <para>Displays in a tree format all running Java threads of the
- current Java Virtual Machine.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="macros-properties">
- <title>Property Macros</title>
-
- <para>These macros produce lists or tables containing properties used by
- the Java platform or jEdit itself.</para>
-
- <itemizedlist>
- <listitem>
- <para><filename>Insert_Buffer_Properties.bsh</filename></para>
-
- <para>Inserts buffer-local properties into the current
- buffer.</para>
-
- <para>If the buffer's mode has a line comment defined, or
- comment start and end defined, the inserted properties will be
- commented out.</para>
- </listitem>
-
- <listitem>
- <para><filename>jEdit_Properties.bsh</filename></para>
-
- <para>Writes an unsorted list of jEdit properties in a new
- buffer.</para>
- </listitem>
-
- <listitem>
- <para><filename>Look_and_Feel_Properties.bsh</filename></para>
-
- <para>Writes an unsorted list of the names of Java Look and Feel
- properties in a new buffer.</para>
- </listitem>
-
- <listitem>
- <para><filename>System_Properties.bsh</filename></para>
-
- <para>Writes an unsorted list of all Java system properties in a
- new buffer.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="macros-text">
- <title>Text Macros</title>
-
- <para>These macros generate various forms of formatted text.</para>
-
- <itemizedlist>
- <listitem>
- <para><filename>Add_Prefix_and_Suffix.bsh</filename></para>
-
- <para>Adds user-supplied <quote>prefix</quote> and
- <quote>suffix</quote> text to each line in a group of selected
- lines.</para>
-
- <para>Text is added after leading whitespace and before trailing
- whitespace. A dialog window receives input and
- <quote>remembers</quote> past entries.</para>
- </listitem>
-
- <listitem>
- <para><filename>Color_Picker.bsh</filename></para>
-
- <para>Displays a color picker and inserts the selected color in
- hexadecimal format, prefixed with a <quote>#</quote>.</para>
- </listitem>
-
- <listitem>
- <para><filename>Duplicate_Line.bsh</filename></para>
-
- <para>Duplicates the line on which the caret lies immediately
- beneath it and moves the caret to the new line.</para>
- </listitem>
-
- <listitem>
- <para><filename>Insert_Date.bsh</filename></para>
-
- <para>Inserts the current date and time in the current
- buffer.</para>
-
- <para>The inserted text includes a representation of the time in
- the <quote>Internet Time</quote> format.</para>
- </listitem>
-
- <listitem>
- <para><filename>Insert_Tag.bsh</filename></para>
-
- <para>Inserts a balanced pair of HTML/SGML/XML markup tags as
- supplied in an input dialog. The tags will surround any selected
- text.</para>
- </listitem>
-
- <listitem>
- <para><filename>Next_Char.bsh</filename></para>
-
- <para>Finds next occurrence of character on current line.</para>
-
- <para>The macro takes the next character typed after macro
- execution as the character being searched. That character is not
- displayed. If the character does not appear in the balance of
- the current line, no action occurs.</para>
-
- <para>This macro illustrates the use of
- <function>InputHandler.readNextChar()</function> as a means of
- obtaining user input. See <xref
- linkend="macro-tips-single-char" />.</para>
- </listitem>
-
- <listitem>
- <para><filename>Reverse_Lines.bsh</filename></para>
-
- <para>Reverses the selected lines or the entire buffer if no
- lines are selected. Does not support Rectangular
- Selections.</para>
- </listitem>
-
- <listitem>
- <para><filename>Single_Space_Buffer.bsh</filename></para>
-
- <para>Removes every second line, if they are all blank.</para>
- </listitem>
- </itemizedlist>
- </section>
-</appendix>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<appendix id="macro-index">
+ <title>Macros Included With jEdit</title>
+ <!-- jEdit 4.0 Macro Guide, (C) 2001 John Gellene -->
+ <!-- jEdit 4.4 Macro Guide, (C) 2010 jedit-devs -->
+ <!-- jEdit buffer-local properties: -->
+ <!-- :indentSize=2:noTabs=yes:maxLineLen=80:tabSize=2: -->
+ <!-- :xml.root=users-guide.xml: -->
+ <!-- covers index to installed macro set -->
+
+ <para>jEdit comes with a large number of sample macros that perform a
+ variety of tasks. The following index provides short descriptions of each
+ macro, in some cases accompanied by usage notes.</para>
+
+ <para>In addition to the macros included with jEdit, a very large collection
+ of user-contributed macros is available in the <quote>Downloads</quote>
+ section of the <ulink
+ url="http://community.jedit.org">community.jedit.org</ulink> web site. There
+ are detailed descriptions for each macro as well as a search
+ facility.</para>
+
+ <section id="macros-c" >
+ <title>C/C++ macros </title>
+ <para> These macros are useful for C/C++ programming. </para>
+ <itemizedlist>
+ <listitem><para> <filename>Include_Guard.bsh</filename> </para>
+ <para> Inserts conditional preprocessor directives around a header
+ file, to prevent it from being included multiple times. </para>
+ <para>The name of the generated preprocessor macro is based on the
+ buffer's name. </para>
+ </listitem>
+
+ <listitem><para><filename> Toggle_Header_Source</filename></para>
+ <para> Toggles between the header and the implementation file. Works for .c, .cxx, and .cpp extensions. </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+
+ <section id="macros-clipboard">
+ <title>Clipboard Macros</title>
+
+ <para>These macros copy or cut text to the clipboard.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><filename>Copy_Lines_Containing.bsh</filename></para>
+
+ <para>Copies all lines from the current buffer, containing a
+ user-supplied string, to the clipboard.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Cut_Lines_Containing.bsh</filename></para>
+
+ <para>Cuts all lines from the current buffer, containing a
+ user-supplied string, to the clipboard.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Copy_Selection_or_Line.bsh</filename></para>
+
+ <para>If no text is selected, the current line is copied to the
+ clipboard, otherwise the selected text is copied to the
+ clipboard. Some editors have this has the default copy behavior.
+ To achieve the same effect in jEdit, bind this macro to
+ <keycap>C+c</keycap> in the <guibutton>Shortcuts</guibutton>
+ pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Cut_Selection_or_Line.bsh</filename></para>
+
+ <para>If no text is selected, the current line is cut to the
+ clipboard, otherwise the selected text is cut to the clipboard.
+ Some editors have this has the default cut behavior. To achieve
+ the same effect in jEdit, bind this macro to
+ <keycap>C+x</keycap> in the <guibutton>Shortcuts</guibutton>
+ pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Copy_Visible_Lines.bsh</filename></para>
+
+ <para>Copies the visible lines from the current buffer to the
+ Clipboard. Lines that are not visible becuase they are folded
+ are not copied.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Paste_Indent.bsh</filename></para>
+
+ <para>Pastes the content of the clipboard and indents it.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="macros-editing">
+ <title>Editing Macros</title>
+
+ <para>These macros automate various text editing tasks.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><filename>Duplicate_Lines_Above.bsh</filename></para>
+
+ <para>Duplicates current/selected line(s) upward.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Duplicate_Lines_Below.bsh</filename></para>
+
+ <para>Duplicates current/selected line(s) downward.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Emacs_Ctrl-K.bsh</filename></para>
+
+ <para>Cuts and appends text, from the cursor to the end of the
+ line, into the copy buffer.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Emacs_Next_Line.bsh</filename></para>
+
+ <para>Moves the cursor to the next line, centering the current
+ line in the middle of the text area if the cursor is at the
+ bottom of the text area.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Emacs_Previous_Line.bsh</filename></para>
+
+ <para>Moves the cursor to the previous line, centering the
+ current line in the middle of the text area if the cursor is at
+ the top of the text area.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Go_to_Column.bsh</filename></para>
+
+ <para>Prompts the user for a column position on the current
+ line, then moves the caret there.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Greedy_Backspace.bsh</filename></para>
+
+ <para>If buffer is using soft tabs, this macro will backspace to
+ the previous tab stop, if all characters between the caret and
+ the tab stop are spaces. In all other cases a single character
+ is removed.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Greedy_Delete.bsh</filename></para>
+
+ <para>If a buffer is using soft tabs, this macro will delete
+ tabSize number of spaces, if all the characters between the
+ caret and the next tab stop are spaces. In all other cases a
+ single character is deleted.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Greedy_Left.bsh</filename></para>
+
+ <para>If a buffer is using soft tabs, this macro will move the
+ caret tabSize spaces to the left, if all the characters between
+ the caret and the previous tab stop are all spaces. In all other
+ cases, the caret is moved a single character to the left.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Greedy_Right.bsh</filename></para>
+
+ <para>If a buffer is using soft tabs, this macro will move the
+ caret tabSize spaces to the right, if all the characters between
+ the caret and the next tab stop are all spaces. In all other
+ cases, the caret is moved a single character to the
+ right.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Keywords_to_Upper_Case.bsh</filename></para>
+
+ <para>Converts all keywords in the current buffer to upper
+ case.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Mode_Switcher.bsh</filename></para>
+
+ <para>Displays a modal dialog with the current buffer's mode in
+ a text field, allowing one to change the mode by typing in its
+ name.</para>
+
+ <para><keycap>ENTER</keycap> selects the current mode; if the
+ text is not a valid mode, the dialog still dismisses, but a
+ warning is logged to the activity log. <keycap>ESACPE</keycap>
+ closes the dialog with no further action. <keycap>TAB</keycap>
+ attempts to auto-complete the mode name. Pressing
+ <keycap>TAB</keycap> repeatedly cycles through the possible
+ completions. <keycap>SHIFT-TAB</keycap> cycles through the
+ completions in reverse.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Move_Line_Down.bsh</filename></para>
+
+ <para>Moves the current line down one, with automatic
+ indentation.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Move_Line_Up.bsh</filename></para>
+
+ <para>Moves the current line up one, with automatic
+ indentation.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Open_Line_Above.bsh</filename></para>
+
+ <para>Adds a new blank line before the current/selected line(s).</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Open_Line_Below.bsh</filename></para>
+
+ <para>Adds a new blank line after the current/selected line(s).</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Toggle_Fold.bsh</filename></para>
+
+ <para>Toggles visibility of current fold.</para>
+
+ <para>This is especially useful for fold toggling via keyboard.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="macros-files">
+ <title>File Management Macros</title>
+
+ <para>These macros automate the opening and closing of files.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><filename>Browse_Buffer_Directory.bsh</filename></para>
+
+ <para>Opens a the current buffer's directory in the file system
+ browser.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Browse_Directory.bsh</filename></para>
+
+ <para>Opens a directory supplied by the user in the file system
+ browser.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Buffer_Switcher.bsh</filename></para>
+
+ <para>Displays a modal dialog listing all open buffers, allowing
+ one to switch to and/or close buffers. <keycap>ENTER</keycap>
+ switches to a buffer and closes the dialog,
+ <keycap>DELETE</keycap> closes a buffer, <keycap>SPACE</keycap>
+ switches to a buffer but does not close the dialog.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Close_All_Except_Active.bsh</filename></para>
+
+ <para>Closes all files except the current buffer.</para>
+
+ <para>Prompts the user to save any buffer containing unsaved
+ changes.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Copy_Path_to_Clipboad.bsh</filename></para>
+
+ <para>Copies the current buffer's path to the clipboard.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Copy_Name_to_Clipboad.bsh</filename></para>
+
+ <para>Copies the current buffer's filename to the
+ clipboard.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Duplicate_Buffer.bsh</filename></para>
+
+ <para>Duplicates the current buffer into a new one.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Delete_Current.bsh</filename></para>
+
+ <para>Deletes the current buffer's file on disk, but doesn't
+ close the buffer.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Glob_Close.bsh</filename></para>
+
+ <para>Closes all open buffers matching a given glob
+ pattern.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Insert_Selection.bsh</filename></para>
+
+ <para>Assumes the current selection is file path and tries
+ replaces the selection with the contents of the file. Does
+ nothing if no text is selected or the selection spans multiple
+ lines.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Next_Dirty_Buffer.bsh</filename></para>
+
+ <para>Switches to the next dirty buffer, if there is one.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Open_Path.bsh</filename></para>
+
+ <para>Opens the file supplied by the user in an input
+ dialog.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Open_Selection.bsh</filename></para>
+
+ <para>Opens the file named by the current buffer's selected
+ text.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Send_Buffer_To_Next_Split.bsh</filename></para>
+
+ <para>If bufferset scope is set to EditPane, the current buffer
+ is added to the next Editpane's bufferset.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Toggle_ReadOnly.bsh</filename></para>
+
+ <para>Toggles a local file's read-only flag. Uses
+ platform-specific commands, so it only works on Windows, Unix
+ and MacOS X.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="macros-interface">
+ <title>User Interface Macros</title>
+
+ <para>Description.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><filename>Decrease_Font_Size.bsh</filename></para>
+
+ <para>Decreases the font size in the gutter and text area by 1
+ point.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Increase_Font_Size.bsh</filename></para>
+
+ <para>Increases the font size in the gutter and text area by 1
+ point.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Open_Context_Menu.bsh</filename></para>
+
+ <para>Opens the text area context menu just below and to the
+ right of the caret.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Reset_TextArea.bsh</filename> </para>
+ <para>Performs a split and an unsplit of the current TextArea.
+ Useful for those occasions when your textarea is corrupt
+ (painting the incorrect characters on the screen).</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Splitpane_Grow.bsh</filename> </para>
+ <para>When inside a split EditPane, this macro moves the
+ splitter away from the cursor, effectively increasing the size of
+ the currently active split pane.</para>
+ </listitem>
+
+
+ <listitem>
+ <para><filename>Toggle_Bottom_Docking_Area.bsh</filename></para>
+
+ <para>Expands or collapses the bottom docking area, depending on
+ it's current state.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Toggle_Left_Docking_Area.bsh</filename></para>
+
+ <para>Expands or collapses the left docking area, depending on
+ it's current state.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Toggle_Right_Docking_Area.bsh</filename></para>
+
+ <para>Expands or collapses the right docking area, depending on
+ it's current state.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Toggle_Top_Docking_Area.bsh</filename></para>
+
+ <para>Expands or collapses the top docking area, depending on
+ it's current state.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="macros-java">
+ <title>Java Code Macros</title>
+
+ <para>These macros handle text formatting and generation tasks that are
+ particularly useful in writing Java code.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><filename>Create_Constructor.bsh</filename></para>
+
+ <para>Inserts constructor for the class at the current caret
+ position.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Get_Class_Name.bsh</filename></para>
+
+ <para>Inserts a Java class name based upon the buffer's file
+ name.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Get_Package_Name.bsh</filename></para>
+
+ <para>Inserts a plausible Java package name for the current
+ buffer.</para>
+
+ <para>The macro compares the buffer's path name with the
+ elements of the classpath being used by the jEdit session. An
+ error message will be displayed if no suitable package name is
+ found. This macro will not work if jEdit is being run as a JAR
+ file without specifying a classpath; in that case the classpath
+ seen by the macro consists solely of the JAR file.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Java_File_Save.bsh</filename></para>
+
+ <abstract>
+ <para>Acts as a wrapper script to the Save As action. If the
+ buffer is a new file, it scans the first 250 lines for a
+ Java class or interface declaration. On finding one, it
+ extracts the appropriate filename to be used in the Save As
+ dialog.</para>
+ </abstract>
+ </listitem>
+
+ <listitem>
+ <para><filename>Make_Get_and_Set_Methods.bsh</filename></para>
+
+ <para>Creates <function>getXXX()</function> or
+ <function>setXXX()</function> methods that can be pasted into
+ the buffer text.</para>
+
+ <para>This macro presents a dialog that will <quote>grab</quote>
+ the names of instance variables from the caret line of the
+ current buffer and paste a corresponding
+ <function>getXXX()</function> or <function>setXXX()</function>
+ method to one of two text areas in the dialog. The text can be
+ edited in the dialog and then pasted into the current buffer
+ using the <guilabel>Insert...</guilabel> buttons. If the caret
+ is set to a line containing something other than an instance
+ variable, the text grabbing routine is likely to generate
+ nonsense.</para>
+
+ <para>As explained in the notes accompanying the source code,
+ the macro uses a global variable which can be set to configure
+ the macro to work with either Java or C++ code. When set for use
+ with C++ code, the macro will also write (in commented text)
+ definitions of <function>getXXX()</function> or
+ <function>setXXX()</function> suitable for inclusion in a header
+ file.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Preview_Javadoc_of_Buffer.bsh</filename></para>
+
+ <para>Create and display API documentation for the current
+ buffer.</para>
+
+ <para>The macro includes various configuration variables you can
+ change; see the comment at the beginning of the macro source for
+ details.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="macros-misc">
+ <title>Miscellaneous Macros</title>
+
+ <para>While these macros do not fit easily into the other categories,
+ they all provide interesting and useful functions.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><filename>Buffer_to_HyperSearch_Results.bsh</filename></para>
+
+ <para>Reads HyperSearch results from a buffer that was
+ previously created by the HyperSearch_Results_to_Buffer macro and possibly
+ filtered manually, and imports them into the HyperSearch Results dockable.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Debug_BufferSets.bsh</filename></para>
+
+ <para>Display int and hex values for the character at the caret,
+ in the status bar.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Display_Abbreviations.bsh</filename></para>
+
+ <para>Displays the abbreviations registered for each of jEdit's
+ editing modes.</para>
+
+ <para>The macro provides a read-only view of the abbreviations
+ contained in the <quote>Abbreviations</quote> option pane.
+ Pressing a letter key will scroll the table to the first entry
+ beginning with that letter. A further option is provided to
+ write a selected mode's abbreviations or all abbreviations in a
+ text buffer for printing as a reference. Notes in the source
+ code listing point out some display options that are configured
+ by modifying global variables.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Display_Actions.bsh</filename></para>
+
+ <para>Displays a list of all the actions known to jEdit
+ categorised by their action set.</para>
+
+ <para>This macro can be a useful reference if you want to use
+ the jEdit 4.2 action bar.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Display_Character_Code.bsh</filename></para>
+
+ <para>Display int and hex values for the character at the caret,
+ in the status bar.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Display_Shortcuts.bsh</filename></para>
+
+ <para>Displays a sorted list of the keyboard shortcuts currently
+ in effect.</para>
+
+ <para>The macro provides a combined read-only view of command,
+ macro and plugin shortcuts. Pressing a letter key will scroll
+ the table to the first entry beginning with that letter. A
+ further option is provided to write the shortcut assignments in
+ a text buffer for printing as a reference. Notes in the source
+ code listing point out some display options that are configured
+ by modifying global variables.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Evaluate_Buffer_in_BeanShell.bsh</filename></para>
+
+ <para>Evaluates contents of current buffer as a BeanShell
+ script, and opens a new buffer to receive any text
+ output.</para>
+
+ <para>This is a quick way to test a macro script even before its
+ text is saved to a file. Opening a new buffer for output is a
+ precaution to prevent the macro from inadvertently erasing or
+ overwriting itself. BeanShell scripts that operate on the
+ contents of the current buffer will not work meaningfully when
+ tested using this macro.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Hex_Convert.bsh</filename></para>
+
+ <para>Converts byte characters to their hex equivalent, and vice
+ versa.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>HyperSearch_Results_to_Buffer.bsh</filename></para>
+
+ <para>Writes HyperSeach results to a new buffer.</para>
+
+ <para>This buffer can be re-imported to the HyperSearch Results dockable
+ by the Buffer_to_HyperSearch_Results macro.</para>
+ </listitem>
+
+
+ <listitem>
+ <para><filename>Make_Bug_Report.bsh</filename></para>
+
+ <para>Creates a new buffer with installation and error
+ information extracted from the activity log.</para>
+
+ <para>The macro extracts initial messages written to the
+ activity log describing the user's operating system, JDK, jEdit
+ version and installed plugins. It then appends the last set of
+ error messages written to the activity log. The new text buffer
+ can be saved and attached to an email message or a bug report
+ made on SourceForge.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Run_Script.bsh</filename></para>
+
+ <para>Runs script using interpreter based upon buffer's editing
+ mode (by default, determined using file extension). You must
+ have the appropriate interpreter (such as Perl, Python, or
+ Windows Script Host) installed on your system.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Show_Threads.bsh</filename></para>
+
+ <para>Displays in a tree format all running Java threads of the
+ current Java Virtual Machine.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="macros-properties">
+ <title>Property Macros</title>
+
+ <para>These macros produce lists or tables containing properties used by
+ the Java platform or jEdit itself.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><filename>Create_Plugin_Announcement.bsh</filename></para>
+
+ <para>Creates an announcement for the Plugin Central Submission Tracker
+ based on the plugins *.props and description.html files.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Insert_Buffer_Properties.bsh</filename></para>
+
+ <para>Inserts buffer-local properties into the current
+ buffer.</para>
+
+ <para>If the buffer's mode has a line comment defined, or
+ comment start and end defined, the inserted properties will be
+ commented out.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>jEdit_Properties.bsh</filename></para>
+
+ <para>Writes an unsorted list of jEdit properties in a new
+ buffer.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Look_and_Feel_Properties.bsh</filename></para>
+
+ <para>Writes an unsorted list of the names of Java Look and Feel
+ properties in a new buffer.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>System_Properties.bsh</filename></para>
+
+ <para>Writes an unsorted list of all Java system properties in a
+ new buffer.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="macros-text">
+ <title>Text Macros</title>
+
+ <para>These macros generate various forms of formatted text.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><filename>Add_Prefix_and_Suffix.bsh</filename></para>
+
+ <para>Adds user-supplied <quote>prefix</quote> and
+ <quote>suffix</quote> text to each line in a group of selected
+ lines.</para>
+
+ <para>Text is added after leading whitespace and before trailing
+ whitespace. A dialog window receives input and
+ <quote>remembers</quote> past entries.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Color_Picker.bsh</filename></para>
+
+ <para>Displays a color picker and inserts the selected color in
+ hexadecimal format, prefixed with a <quote>#</quote>.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Compose_Tag.bsh</filename></para>
+
+ <para>The selection is taken as tag name and replaced with a full xml tag.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Duplicate_Line.bsh</filename></para>
+
+ <para>Duplicates the line on which the caret lies immediately
+ beneath it and moves the caret to the new line.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Insert_Date.bsh</filename></para>
+
+ <para>Inserts the current date and time in the current
+ buffer.</para>
+
+ <para>The inserted text includes a representation of the time in
+ the <quote>Internet Time</quote> format.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Insert_Tag.bsh</filename></para>
+
+ <para>Inserts a balanced pair of HTML/SGML/XML markup tags as
+ supplied in an input dialog. The tags will surround any selected
+ text.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Line_Filter.bsh</filename></para>
+
+ <para>Filters lines of the current buffer due to a provided regular expression.
+ The resulting set of lines can be either removed from the buffer or written to a new buffer.</para>
+
+ <para>The filter works on a multiline selection (if there is one) otherwise on the whole buffer.
+ The resulting set of lines includes those lines that either match or not match the regular expression.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Next_Char.bsh</filename></para>
+
+ <para>Finds next occurrence of character on current line.</para>
+
+ <para>The macro takes the next character typed after macro
+ execution as the character being searched. That character is not
+ displayed. If the character does not appear in the balance of
+ the current line, no action occurs.</para>
+
+ <para>This macro illustrates the use of
+ <function>InputHandler.readNextChar()</function> as a means of
+ obtaining user input. See <xref
+ linkend="macro-tips-single-char" />.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Reverse_Lines.bsh</filename></para>
+
+ <para>Reverses the selected lines or the entire buffer if no
+ lines are selected. Does not support Rectangular
+ Selections.</para>
+ </listitem>
+
+ <listitem>
+ <para><filename>Single_Space_Buffer.bsh</filename></para>
+
+ <para>Removes every second line, if they are all blank.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+</appendix>
diff --git a/jEdit/doc/users-guide/macro-tips.xml b/jEdit/doc/users-guide/macro-tips.xml
index a5e5737..331978d 100644
--- a/jEdit/doc/users-guide/macro-tips.xml
+++ b/jEdit/doc/users-guide/macro-tips.xml
@@ -1,921 +1,921 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="macro-tips">
- <title>Macro Tips and Techniques</title>
-
- <!-- jEdit 4.0 Macro Guide, (C) 2001, 2002 John Gellene -->
-
- <!-- Wed Jun 20 16:56:26 EDT 2001 @914 /Internet Time/ -->
-
- <!-- -->
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=1:noTabs=yes:maxLineLen=0:wrap=soft:tabSize=2: -->
-
- <!-- :xml.root=users-guide.xml: -->
-
- <!-- -->
-
- <!-- This file covers the chapter "Macro tips and techniques" -->
-
- <!-- $Id: macro-tips.xml 16181 2009-09-08 19:26:57Z ezust $
- -->
-
- <section id="macro-tips-input">
- <title>Getting Input for a Macro</title>
-
- <para>The dialog-based macro discussed in <xref
- linkend="dialog-macro" /> reflects a conventional approach to obtaining
- input in a Java program. Nevertheless, it can be too lengthy or tedious
- for someone trying to write a macro quickly. Not every macro needs a
- user interface specified in such detail; some macros require only a
- single keystroke or no input at all. In this section we outline some
- other techniques for obtaining input that will help you write macros
- quickly.</para>
-
- <section id="macro-tips-input-single-line">
- <title>Getting a Single Line of Text</title>
-
- <para>As mentioned earlier in <xref linkend="helpful-methods" />,
- the method <function>Macros.input()</function> offers a convenient
- way to obtain a single line of text input. Here is an example that
- inserts a pair of HTML markup tags specified by the user.</para>
-
- <informalexample>
- <programlisting>// Insert_Tag.bsh
-
-void insertTag()
-{
- caret = textArea.getCaretPosition();
- tag = Macros.input(view, <quote>Enter name of tag:</quote>);
- if( tag == null || tag.length() == 0) return;
- text = textArea.getSelectedText();
- if(text == null) text = <quote></quote>;
- sb = new StringBuffer();
- sb.append(<quote><</quote>).append(tag).append(<quote>></quote>);
- sb.append(text);
- sb.append(<quote></</quote>).append(tag).append(<quote>></quote>);
- textArea.setSelectedText(sb.toString());
- if(text.length() == 0)
- textArea.setCaretPosition(caret + tag.length() + 2);
-}
-
-insertTag();
-
-// end Insert_Tag.bsh</programlisting>
- </informalexample>
-
- <para>Here the call to <function>Macros.input()</function> seeks the
- name of the markup tag. This method sets the message box title to a
- fixed string, <quote>Macro input</quote>, but the specific message
- <guilabel>Enter name of tag</guilabel> provides all the information
- necessary. The return value <varname>tag</varname> must be tested to
- see if it is null. This would occur if the user presses the
- <guilabel>Cancel</guilabel> button or closes the dialog window
- displayed by <function>Macros.input()</function>.</para>
- </section>
-
- <section id="macro-tips-input-multiple-data">
- <title>Getting Multiple Data Items</title>
-
- <para>If more than one item of input is needed, a succession of
- calls to <function>Macros.input()</function> is a possible, but
- awkward approach, because it would not be possible to correct early
- input after the corresponding message box is dismissed. Where more
- is required, but a full dialog layout is either unnecessary or too
- much work, the Java method
- <function>JOptionPane.showConfirmDialog()</function> is available.
- The version to use has the following prototype:</para>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>public static int
- <function>showConfirmDialog</function></funcdef>
-
- <paramdef>Component
- <parameter>parentComponent</parameter></paramdef>
-
- <paramdef>Object
- <parameter>message</parameter></paramdef>
-
- <paramdef>String
- <parameter>title</parameter></paramdef>
-
- <paramdef>int
- <parameter>optionType</parameter></paramdef>
-
- <paramdef>int
- <parameter>messageType</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
- </itemizedlist>
-
- <para>The usefulness of this method arises from the fact that the
- <varname>message</varname> parameter can be an object of any Java
- class (since all classes are derived from
- <classname>Object</classname>), or any array of objects. The
- following example shows how this feature can be used.</para>
-
- <informalexample>
- <programlisting>// excerpt from Write_File_Header.bsh
-
-title = <quote>Write file header</quote>;
-
-currentName = buffer.getName();
-
-nameField = new JTextField(currentName);
-authorField = new JTextField(<quote>Your name here</quote>);
-descField = new JTextField(<quote></quote>, 25);
-
-namePanel = new JPanel(new GridLayout(1, 2));
-nameLabel = new JLabel(<quote>Name of file:</quote>, SwingConstants.LEFT);
-saveField = new JCheckBox(<quote>Save file when done</quote>,
- !buffer.isNewFile());
-namePanel.add(nameLabel);
-namePanel.add(saveField);
-
-
-message = new Object[9];
-message[0] = namePanel;
-message[1] = nameField;
-message[2] = Box.createVerticalStrut(10);
-message[3] = <quote>Author's name:</quote>;
-message[4] = authorField;
-message[5] = Box.createVerticalStrut(10);
-message[6] = <quote>Enter description:</quote>;
-message[7] = descField;
-message[8] = Box.createVerticalStrut(5);
-
-if( JOptionPane.OK_OPTION !=
- JOptionPane.showConfirmDialog(view, message, title,
- JOptionPane.OK_CANCEL_OPTION,
- JOptionPane.QUESTION_MESSAGE))
- return null;
-
-// *****remainder of macro script omitted*****
-
-// end excerpt from Write_File_Header.bsh</programlisting>
- </informalexample>
-
- <para>This macro takes several items of user input and produces a
- formatted file header at the beginning of the buffer. The full macro
- is included in the set of macros installed by jEdit. There are a
- number of input features of this excerpt worth noting.</para>
-
- <itemizedlist>
- <listitem>
- <para>The macro uses a total of seven visible components.
- Two of them are created behind the scenes by
- <function>showConfirmDialog()</function>, the rest are made
- by the macro. To arrange them, the script creates an array
- of <classname>Object</classname> objects and assigns
- components to each location in the array. This translates to
- a fixed, top-to-bottom arrangement in the message box
- created by <function>showConfirmDialog()</function>.</para>
- </listitem>
-
- <listitem>
- <para>The macro uses <classname>JTextField</classname>
- objects to obtain most of the input data. The fields
- <varname>nameField</varname> and
- <varname>authorField</varname> are created with constructors
- that take the initial, default text to be displayed in the
- field as a parameter. When the message box is displayed, the
- default text will appear and can be altered or deleted by
- the user.</para>
- </listitem>
-
- <listitem>
- <para>The text field <varname>descField</varname> uses an
- empty string for its initial value. The second parameter in
- its constructor sets the width of the text field component,
- expressed as the number of characters of
- <quote>average</quote> width. When
- <function>showConfirmDialog()</function> prepares the layout
- of the message box, it sets the width wide enough to
- accommodate the designated with of
- <varname>descField</varname>. This technique produces a
- message box and input text fields that are wide enough for
- your data with one line of code.</para>
- </listitem>
-
- <listitem>
- <para>The displayed message box includes a
- <classname>JCheckBox</classname> component that determines
- whether the buffer will be saved to disk immediately after
- the file header is written. To conserve space in the message
- box, we want to display the check box to the right of the
- label <guilabel>Name of file:</guilabel>. To do that, we
- create a <classname>JPanel</classname> object and populate
- it with the label and the checkbox in a left-to-right
- <classname>GridLayout</classname>. The
- <classname>JPanel</classname> containing the two components
- is then added to the beginning of <varname>message</varname>
- array.</para>
- </listitem>
-
- <listitem>
- <para>The two visible components created by
- <function>showConfirmDialog()</function> appear at positions
- 3 and 6 of the <varname>message</varname> array. Only the
- text is required; they are rendered as text labels.</para>
- </listitem>
-
- <listitem>
- <para>There are three invisible components created by
- <function>showConfirmDialog()</function>. Each of them
- involves a call to
- <function>Box.createVerticalStrut()</function>. The
- <classname>Box</classname> class is a sophisticated layout
- class that gives the user great flexibility in sizing and
- positioning components. Here we use a
- <function>static</function> method of the
- <classname>Box</classname> class that produces a vertical
- <glossterm>strut</glossterm>. This is a transparent
- component whose width expands to fill its parent component
- (in this case, the message box). The single parameter
- indicates the height of the strut in pixels. The last call
- to <function>createVerticalStrut()</function> separates the
- description text field from the <guilabel>OK</guilabel> and
- <guilabel>Cancel</guilabel> buttons that are automatically
- added by <function>showConfirmDialog()</function>.</para>
- </listitem>
-
- <listitem>
- <para>Finally, the call to
- <function>showConfirmDialog()</function> uses defined
- constants for the option type and the message type. The
- constants are the same as those used with the
- <function>Macros.confirm()</function> method; see <xref
- linkend="helpful-methods" />. The option type signifies the
- use of <guilabel>OK</guilabel> and
- <guilabel>Cancel</guilabel> buttons. The
- <constant>QUERY_MESSAGE</constant> message type causes the
- message box to display a question mark icon.</para>
-
- <para>The return value of the method is tested against the
- value <constant>OK_OPTION</constant>. If the return value is
- something else (because the <guilabel>Cancel</guilabel>
- button was pressed or because the message box window was
- closed without a button press), a <constant>null</constant>
- value is returned to a calling function, signaling that the
- user canceled macro execution. If the return value is
- <constant>OK_OPTION</constant>, each of the input components
- can yield their contents for further processing by calls to
- <function>JTextField.getText()</function> (or, in the case
- of the check box,
- <function>JCheckBox.isSelected()</function>).</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="tips-macro-input-combo">
- <title>Selecting Input From a List</title>
-
- <para>Another useful way to get user input for a macro is to use a
- combo box containing a number of pre-set options. If this is the
- only input required, one of the versions of
- <function>showInputDialog()</function> in the
- <classname>JOptionPane</classname> class provides a shortcut. Here
- is its prototype:</para>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>public static Object
- <function>showInputDialog</function></funcdef>
-
- <paramdef>Component
- <parameter>parentComponent</parameter></paramdef>
-
- <paramdef>Object
- <parameter>message</parameter></paramdef>
-
- <paramdef>String
- <parameter>title</parameter></paramdef>
-
- <paramdef>int
- <parameter>messageType</parameter></paramdef>
-
- <paramdef>Icon <parameter>icon</parameter></paramdef>
-
- <paramdef>Object[]
- <parameter>selectionValues</parameter></paramdef>
-
- <paramdef>Object
- <parameter>initialSelectionValue</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
- </itemizedlist>
-
- <para>This method creates a message box containing a drop-down list
- of the options specified in the method's parameters, along with
- <guilabel>OK</guilabel> and <guilabel>Cancel</guilabel> buttons.
- Compared to <function>showConfirmDialog()</function>, this method
- lacks an <varname>optionType</varname> parameter and has three
- additional parameters: an <varname>icon</varname> to display in the
- dialog (which can be set to <constant>null</constant>), an array of
- <varname>selectionValues</varname> objects, and a reference to one
- of the options as the <varname>initialSelectionValue</varname> to be
- displayed. In addition, instead of returning an
- <classname>int</classname> representing the user's action,
- <function>showInputDialog()</function> returns the
- <classname>Object</classname> corresponding to the user's selection,
- or <constant>null</constant> if the selection is canceled.</para>
-
- <para>The following macro fragment illustrates the use of this
- method.</para>
-
- <informalexample>
- <programlisting>// fragment illustrating use of showInputDialog()
-options = new Object[5];
-options[0] = "JLabel";
-options[1] = "JTextField";
-options[2] = "JCheckBox";
-options[3] = "HistoryTextField";
-options[4} = "-- other --";
-
-result = JOptionPane.showInputDialog(view,
- "Choose component class",
- "Select class for input component",
- JOptionPane.QUESTION_MESSAGE,
- null, options, options[0]);</programlisting>
- </informalexample>
-
- <para>The return value <varname>result</varname> will contain either
- the <classname>String</classname> object representing the selected
- text item or <constant>null</constant> representing no selection.
- Any further use of this fragment would have to test the value of
- <varname>result</varname> and likely exit from the macro if the
- value equaled <constant>null</constant>.</para>
-
- <para>A set of options can be similarly placed in a
- <classname>JComboBox</classname> component created as part of a
- larger dialog or <function>showMessageDialog()</function> layout.
- Here are some code fragments showing this approach:</para>
-
- <informalexample>
- <programlisting>// fragments from Display_Abbreviations.bsh
-// import statements and other code omitted
-
-// from main routine, this method call returns an array
-// of Strings representing the names of abbreviation sets
-
-abbrevSets = getActiveSets();
-
-...
-
-// from showAbbrevs() method
-
-combo = new JComboBox(abbrevSets);
-// set width to uniform size regardless of combobox contents
-Dimension dim = combo.getPreferredSize();
-dim.width = Math.max(dim.width, 120);
-combo.setPreferredSize(dim);
-combo.setSelectedItem(STARTING_SET); // defined as "global"
-
-// end fragments</programlisting>
- </informalexample>
- </section>
-
- <section id="macro-tips-single-char">
- <title>Using a Single Keypress as Input</title>
-
- <para>Some macros may choose to emulate the style of character-based
- text editors such as <application>emacs</application> or
- <application>vi</application>. They will require only a single
- keypress as input that would be handled by the macro but not
- displayed on the screen. If the keypress corresponds to a character
- value, jEdit can pass that value as a parameter to a BeanShell
- script.</para>
-
- <para>The jEdit class <ulink
- url="../api/org/gjt/sp/jedit/gui/InputHandler.html">InputHandler</ulink>
- is an abstract class that that manages associations between keyboard
- input and editing actions, along with the recording of macros.
- Keyboard input in jEdit is normally managed by the derived class
- <ulink
- url="../api/org/gjt/sp/jedit/gui/DefaultInputHandler.html">DefaultInputHandler</ulink>.
- One of the methods in the <ulink
- url="../api/org/gjt/sp/jedit/gui/InputHandler.html">InputHandler</ulink>
- class handles input from a single keypress:</para>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>public void
- <function>readNextChar</function></funcdef>
-
- <paramdef>String
- <parameter>prompt</parameter></paramdef>
-
- <paramdef>String
- <parameter>code</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
- </itemizedlist>
-
- <para>When this method is called, the contents of the
- <varname>prompt</varname> parameter is shown in the view's status
- bar. The method then waits for a key press, after which the contents
- of the <varname>code</varname> parameter will be run as a BeanShell
- script, with one important modification. Each time the string
- <varname>__char__</varname> appears in the parameter script, it will
- be substituted by the character pressed. The key press is
- <quote>consumed</quote> by <function>readNextChar()</function>. It
- will not be displayed on the screen or otherwise processed by
- jEdit.</para>
-
- <para>Using <function>readNextChar()</function> requires a macro
- within the macro, formatted as a single, potentially lengthy string
- literal. The following macro illustrates this technique. It selects
- a line of text from the current caret position to the first
- occurrence of the character next typed by the user. If the character
- does not appear on the line, no new selection occurs and the display
- remains unchanged.</para>
-
- <informalexample>
- <programlisting>// Next_Char.bsh
-
-script = new StringBuffer(512);
-script.append( "start = textArea.getCaretPosition();" );
-script.append( "line = textArea.getCaretLine();" );
-script.append( "end = textArea.getLineEndOffset(line) + 1;" );
-script.append( "text = buffer.getText(start, end - start);" );
-script.append( "match = text.indexOf(__char__, 1);" );
-script.append( "if(match != -1) {" );
-script.append( "if(__char__ != '\\n') ++match;" );
-script.append( "textArea.select(start, start + match - 1);" );
-script.append( "}" );
-
-view.getInputHandler().readNextChar("Enter a character",
- script.toString());
-
-// end Next_Char.bsh</programlisting>
- </informalexample>
-
- <para>Once again, here are a few comments on the macro's
- design.</para>
-
- <itemizedlist>
- <listitem>
- <para>A <classname>StringBuffer</classname> object is used
- for efficiency; it obviates multiple creation of
- fixed-length <classname>String</classname> objects. The
- parameter to the constructor of <varname>script</varname>
- specifies the initial size of the buffer that will receive
- the contents of the child script.</para>
- </listitem>
-
- <listitem>
- <para>Besides the quoting of the script code, the formatting
- of the macro is entirely optional but (hopefully) makes it
- easier to read.</para>
- </listitem>
-
- <listitem>
- <para>It is important that the child script be
- self-contained. It does not run in the same namespace as the
- <quote>parent</quote> macro
- <filename>Next_Char.bsh</filename> and therefore does not
- share variables, methods, or scripted objects defined in the
- parent macro.</para>
- </listitem>
-
- <listitem>
- <para>Finally, access to the <ulink
- url="../api/org/gjt/sp/jedit/gui/InputHandler.html">InputHandler</ulink>
- object used by jEdit is available by calling
- <function>getInputHandler()</function> on the current
- view.</para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
-
- <section id="startup-scripts">
- <title>Startup Scripts</title>
-
- <para>On startup, jEdit runs any BeanShell scripts located in the
- <filename>startup</filename> subdirectory of the jEdit installation and
- user settings directories (see <xref linkend="settings-directory" />).
- As with macros, the scripts must have a <filename>.bsh</filename> file
- name extension. Startup scripts are run near the end of the startup
- sequence, after plugins, properties and such have been initialized, but
- before the first view is opened.</para>
-
- <para>Startup scripts can perform initialization tasks that cannot be
- handled by command line options or ordinary configuration options, such
- as customizing jEdit's user interface by changing entries in the Java
- platform's <classname>UIManager</classname> class.</para>
-
- <para>Startup scripts have an additional feature lacking in ordinary
- macros that can help you further customize jEdit. Variables and methods
- defined in a startup script are available in all instances of the
- BeanShell interpreter created in jEdit. This allows you to create a
- personal library of methods and objects that can be accessed at any time
- during the editing session in another macro, the BeanShell shell of the
- Console plugin, or menu items such as
- <guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
- BeanShell Expression</guimenuitem>.</para>
-
- <para>The startup script routine will run script files in the
- installation directory first, followed by scripts in the user settings
- directory. In each case, scripts will be executed in alphabetical order,
- applied without regard to whether the file name contains upper or lower
- case characters.</para>
-
- <para>If a startup script throws an exception (because, for example, it
- attempts to call a method on a <constant>null</constant> object). jEdit
- will show an error dialog box and move on to the next startup script. If
- script bugs are causing jEdit to crash or hang on startup, you can use
- the <userinput>-nostartupscripts</userinput> command line option to
- disable them for that editing session.</para>
-
- <para>Another important difference between startup scripts and ordinary
- macros is that startup scripts cannot use the pre-defined variables
- <varname>view</varname>, <varname>textArea</varname>,
- <varname>editPane</varname> and <varname>buffer</varname>. This is
- because they are executed before the initial view is created.</para>
-
- <para>If you are writing a method in a startup script and wish to use
- one of the above variables, pass parameters of the appropriate type to
- the method, so that a macro calling them after startup can supply the
- appropriate values. For example, a startup script could include a
- method</para>
-
- <informalexample>
- <programlisting>void doSomethingWithView(View v, String s) {
- ...
-}</programlisting>
- </informalexample>
-
- <para>so that during the editing session another macro can call the
- method using</para>
-
- <informalexample>
- <programlisting>doSomethingWithView(view, "something");</programlisting>
- </informalexample>
-
- <sidebar>
- <title>Reloading startup scripts without restarting</title>
-
- <para>It is actually possible to reload startup scripts or load
- other scripts without restarting jEdit, using a BeanShell statement
- like the following:</para>
-
- <programlisting>BeanShell.runScript(view,<replaceable>path</replaceable>,null,false);</programlisting>
-
- <para>For <replaceable>path</replaceable>, you can substitute any
- string, or a method call such as
- <function>buffer.getPath()</function>.</para>
- </sidebar>
- </section>
-
- <section id="scripts-command-line">
- <title>Running Scripts from the Command Line</title>
-
- <para>The <userinput>-run</userinput> command line switch specifies a
- BeanShell script to run on startup:</para>
-
- <screen><prompt>$ </prompt><userinput>jedit -run=test.bsh</userinput></screen>
-
- <para>Note that just like with startup scripts, the
- <varname>view</varname>, <varname>textArea</varname>,
- <varname>editPane</varname> and <varname>buffer</varname> variables are
- not defined.</para>
-
- <para>If another instance is already running, the script will be run in
- that instance, and you will be able to use the
- <function>jEdit.getLastView()</function> method to obtain a view.
- However, if a new instance of jEdit is being started, the script will be
- run at the same time as all other startup scripts; that is, before the
- first view is opened.</para>
-
- <para>If your script needs a view instance to operate on, you can use
- the following code pattern to obtain one, no matter how or when the
- script is being run:</para>
-
- <programlisting>void doSomethingUseful()
-{
- void run()
- {
- view = jEdit.getLastView();
-
- // put actual script body here
- }
-
- if(jEdit.getLastView() == null)
- VFSManager.runInAWTThread(this);
- else
- run();
-}
-
-doSomethingUseful();</programlisting>
-
- <para>If the script is being run in a loaded instance, it can be invoked
- to perform its work immediately. However, if the script is running at
- startup, before an initial view exists, its operation must be delayed to
- allow the view object first to be created and displayed. In order to
- queue the macro's operation, the scripted <quote>closure</quote> named
- <function>doSomethingUseful()</function> implements the
- <classname>Runnable</classname> interface of the Java platform. That
- interface contains only a single <function>run()</function> method that
- takes no parameters and has no return value. The macro's implementation
- of the <function>run()</function> method contains the
- <quote>working</quote> portion of the macro. Then the scripted object,
- represented by a reference to <varname>this</varname>, is passed to the
- <function>runInAWTThread()</function> method. This schedules the macro's
- operations for execution after the startup routine is complete.</para>
-
- <para>As this example illustrates, the
- <function>runInAWTThread()</function> method can be used to ensure that
- a macro will perform operations after other operations have completed.
- If it is invoked during startup, it schedules the specified
- <classname>Runnable</classname> object to run after startup is complete.
- If invoked when jEdit is fully loaded, the
- <classname>Runnable</classname> object will execute after all pending
- input/output is complete, or immediately if there are no pending I/O
- operations. This will delay operations on a new buffer, for example,
- until after the buffer is loaded and displayed.</para>
- </section>
-
- <section id="macro-tips-BeanShell">
- <title>Advanced BeanShell Techniques</title>
-
- <para>BeanShell has a few advanced features that we haven't mentioned
- yet. They will be discussed in this section.</para>
-
- <section id="macro-tips-BeanShell-convenience">
- <title>BeanShell's Convenience Syntax</title>
-
- <para>We noted earlier that BeanShell syntax does not require that
- variables be declared or defined with their type, and that variables
- that are not typed when first used can have values of differing
- types assigned to them. In addition to this <quote>loose</quote>
- syntax, BeanShell allows a <quote>convenience</quote> syntax for
- dealing with the properties of JavaBeans. They may be accessed or
- set as if they were data members. They may also be accessed using
- the name of the property enclosed in quotation marks and curly
- brackets. For example, the following statement are all equivalent,
- assuming <varname>btn</varname> is a <classname>JButton</classname>
- instance:</para>
-
- <informalexample>
- <programlisting>b.setText("Choose");
-b.text = "Choose";
-b{"text"} = "Choose";
-</programlisting>
- </informalexample>
-
- <para>The last form can also be used to access a key-value pair of a
- <classname>Hashtable</classname> object.</para>
-
- <!-- actually, the following requires the bsh.classpath package, which
- is not included with jEdit at this point in time.
-
- a future release of jEdit will use bsh.classpath, and hence support
- 'import *'
-
-<para>
- Finally, when importing classes, BeanShell permits the following form
- to import all classes lying within the interpreter's classpath:
-</para>
-
-<informalexample><programlisting>import *;
-</programlisting></informalexample>
-
--->
- </section>
-
- <section id="macro-tips-BeanShell-keywords">
- <title>Special BeanShell Keywords</title>
-
- <para>BeanShell uses special keywords to refer to variables or
- methods defined in the current or an enclosing block's scope:</para>
-
- <itemizedlist>
- <listitem>
- <para>The keyword <function>this</function> refers to the
- current scope.</para>
- </listitem>
-
- <listitem>
- <para>The keyword <function>super</function> refers to the
- immediately enclosing scope.</para>
- </listitem>
-
- <listitem>
- <para>The keyword <function>global</function> refers to the
- top-level scope of the macro script.</para>
- </listitem>
- </itemizedlist>
-
- <para>The following script illustrates the use of these
- keywords:</para>
-
- <informalexample>
- <programlisting>a = "top\n";
-foo() {
- a = "middle\n";
- bar() {
- a = "bottom\n";
- textArea.setSelectedText(global.a);
- textArea.setSelectedText(super.a);
- // equivalent to textArea.setSelectedText(this.a):
- textArea.setSelectedText(a);
- }
-
- bar();
-}
-foo();</programlisting>
- </informalexample>
-
- <para>When the script is run, the following text is inserted in the
- current buffer:</para>
-
- <screen>top
-middle
-bottom</screen>
- </section>
-
- <section id="macro-tips-BeanShell-class">
- <title>Implementing Classes and Interfaces</title>
-
- <para>As discussed in the macro example in <xref
- linkend="dialog-macro" />, scripted objects can implicitly implement
- Java interfaces such as <classname>ActionListener</classname>. For
- example:</para>
-
- <programlisting>myRunnable() {
- run() {
- System.out.println("Hello world!");
- }
-
- return this;
-}
-
-Runnable r = myRunnable();
-new Thread(r).start();</programlisting>
-
- <para>Frequently it will not be necessary to implement all of the
- methods of a particular interface in order to specify the behavior
- of a scripted object. To prevent BeanShell from throwing exceptions
- for missing interface methods, implement the
- <function>invoke()</function> method, which is called when an
- undefined method is invoked on a scripted object. Typically, the
- implementation of this method will do nothing, as in the following
- example:</para>
-
- <informalexample>
- <programlisting>invoke(method, args) {}</programlisting>
- </informalexample>
-
- <para>In addition to the implicit interface definitions described
- above, BeanShell permits full-blown classes to be defined. Indeed,
- almost any Java class definition should work in BeanShell:</para>
-
- <programlisting>class Cons {
- // Long-live LISP!
- Object car;
- Object cdr;
-
- rplaca(Object car) {
- this.car = car;
- }
-
- rplacd(Object cdr) {
- this.cdr = cdr;
- }
-}</programlisting>
- </section>
- </section>
-
- <section id="macro-tips-debugging">
- <title>Debugging Macros</title>
-
- <para>Here are a few techniques that can prove helpful in debugging
- macros.</para>
-
- <section id="macro-tips-debugging-exceptions">
- <title>Identifying Exceptions</title>
-
- <para>An <glossterm>exception</glossterm> is a condition reflecting
- an error or other unusual result of program execution that requires
- interruption of normal program flow and some kind of special
- handling. Java has a rich (and extensible) collection of exception
- classes which represent such conditions.</para>
-
- <para>jEdit catches exceptions thrown by BeanShell scripts and
- displays them in a dialog box. In addition, the full traceback is
- written to the activity log (see <xref linkend="activity-log" /> for
- more information about the activity log).</para>
-
- <para>There are two broad categories of errors that will result in
- exceptions:</para>
-
- <itemizedlist>
- <listitem>
- <para><emphasis>Interpreter errors</emphasis>, which may
- arise from typing mistakes like mismatched brackets or
- missing semicolons, or from BeanShell's failure to find a
- class corresponding to a particular variable.</para>
-
- <para>Interpreter errors are usually accompanied by the line
- number in the script, along with the cause of the
- error.</para>
- </listitem>
-
- <listitem>
- <para><emphasis>Execution errors</emphasis>, which result
- from runtime exceptions thrown by the Java platform when
- macro code is executed.</para>
-
- <para>Some exceptions thrown by the Java platform can often
- seem cryptic. Nevertheless, examining the contents of the
- activity log may reveals clues as to the cause of the
- error.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="macro-tips-debugging-log">
- <title>Using the Activity Log as a Tracing Tool</title>
-
- <para>Sometimes exception tracebacks will say what kind of error
- occurred but not where it arose in the script. In those cases, you
- can insert calls that log messages to the activity log in your
- macro. If the logged messages appear when the macro is run, it means
- that up to that point the macro is fine; but if an exception is
- logged first, it means the logging call is located after the cause
- of the error.</para>
-
- <para>To write a message to the activity log, use the following
- method of the <ulink
- url="../api/org/gjt/sp/util/Log.html">Log</ulink> class:</para>
-
- <itemizedlist>
- <listitem>
- <funcsynopsis>
- <funcprototype>
- <funcdef>public static void
- <function>log</function></funcdef>
-
- <paramdef>int
- <parameter>urgency</parameter></paramdef>
-
- <paramdef>Object
- <parameter>source</parameter></paramdef>
-
- <paramdef>Object
- <parameter>message</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </listitem>
- </itemizedlist>
-
- <para>See the documentation for the <ulink
- url="../api/org/gjt/sp/util/Log.html">Log</ulink> class for
- information about the method's parameters.</para>
-
- <para>The following code sends a typical debugging message to the
- activity log:</para>
-
- <informalexample>
- <programlisting>Log.log(Log.DEBUG, BeanShell.class,
- "counter = " + counter);</programlisting>
- </informalexample>
-
- <para>The corresponding activity log entry might read as
- follows:</para>
-
- <informalexample>
- <programlisting>[debug] BeanShell: counter = 15</programlisting>
- </informalexample>
-
- <sidebar>
- <title>Using message dialog boxes as a tracing tool</title>
-
- <para>If you would prefer not having to deal with the activity
- log, you can use the <function>Macros.message()</function>
- method as a tracing tool. Just insert calls like the following
- in the macro code:</para>
-
- <programlisting>Macros.message(view,"tracing");</programlisting>
-
- <para>Execution of the macro is halted until the message dialog
- box is closed. When you have finished debugging the macro, you
- should delete or comment out the debugging calls to
- <function>Macros.message()</function> in your final source
- code.</para>
- </sidebar>
- </section>
- </section>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="macro-tips">
+ <title>Macro Tips and Techniques</title>
+
+ <!-- jEdit 4.0 Macro Guide, (C) 2001, 2002 John Gellene -->
+
+ <!-- Wed Jun 20 16:56:26 EDT 2001 @914 /Internet Time/ -->
+
+ <!-- -->
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=1:noTabs=yes:maxLineLen=0:wrap=soft:tabSize=2: -->
+
+ <!-- :xml.root=users-guide.xml: -->
+
+ <!-- -->
+
+ <!-- This file covers the chapter "Macro tips and techniques" -->
+
+ <!-- $Id: macro-tips.xml 16181 2009-09-08 19:26:57Z ezust $
+ -->
+
+ <section id="macro-tips-input">
+ <title>Getting Input for a Macro</title>
+
+ <para>The dialog-based macro discussed in <xref
+ linkend="dialog-macro" /> reflects a conventional approach to obtaining
+ input in a Java program. Nevertheless, it can be too lengthy or tedious
+ for someone trying to write a macro quickly. Not every macro needs a
+ user interface specified in such detail; some macros require only a
+ single keystroke or no input at all. In this section we outline some
+ other techniques for obtaining input that will help you write macros
+ quickly.</para>
+
+ <section id="macro-tips-input-single-line">
+ <title>Getting a Single Line of Text</title>
+
+ <para>As mentioned earlier in <xref linkend="helpful-methods" />,
+ the method <function>Macros.input()</function> offers a convenient
+ way to obtain a single line of text input. Here is an example that
+ inserts a pair of HTML markup tags specified by the user.</para>
+
+ <informalexample>
+ <programlisting>// Insert_Tag.bsh
+
+void insertTag()
+{
+ caret = textArea.getCaretPosition();
+ tag = Macros.input(view, <quote>Enter name of tag:</quote>);
+ if( tag == null || tag.length() == 0) return;
+ text = textArea.getSelectedText();
+ if(text == null) text = <quote></quote>;
+ sb = new StringBuffer();
+ sb.append(<quote><</quote>).append(tag).append(<quote>></quote>);
+ sb.append(text);
+ sb.append(<quote></</quote>).append(tag).append(<quote>></quote>);
+ textArea.setSelectedText(sb.toString());
+ if(text.length() == 0)
+ textArea.setCaretPosition(caret + tag.length() + 2);
+}
+
+insertTag();
+
+// end Insert_Tag.bsh</programlisting>
+ </informalexample>
+
+ <para>Here the call to <function>Macros.input()</function> seeks the
+ name of the markup tag. This method sets the message box title to a
+ fixed string, <quote>Macro input</quote>, but the specific message
+ <guilabel>Enter name of tag</guilabel> provides all the information
+ necessary. The return value <varname>tag</varname> must be tested to
+ see if it is null. This would occur if the user presses the
+ <guilabel>Cancel</guilabel> button or closes the dialog window
+ displayed by <function>Macros.input()</function>.</para>
+ </section>
+
+ <section id="macro-tips-input-multiple-data">
+ <title>Getting Multiple Data Items</title>
+
+ <para>If more than one item of input is needed, a succession of
+ calls to <function>Macros.input()</function> is a possible, but
+ awkward approach, because it would not be possible to correct early
+ input after the corresponding message box is dismissed. Where more
+ is required, but a full dialog layout is either unnecessary or too
+ much work, the Java method
+ <function>JOptionPane.showConfirmDialog()</function> is available.
+ The version to use has the following prototype:</para>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public static int
+ <function>showConfirmDialog</function></funcdef>
+
+ <paramdef>Component
+ <parameter>parentComponent</parameter></paramdef>
+
+ <paramdef>Object
+ <parameter>message</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>title</parameter></paramdef>
+
+ <paramdef>int
+ <parameter>optionType</parameter></paramdef>
+
+ <paramdef>int
+ <parameter>messageType</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+ </itemizedlist>
+
+ <para>The usefulness of this method arises from the fact that the
+ <varname>message</varname> parameter can be an object of any Java
+ class (since all classes are derived from
+ <classname>Object</classname>), or any array of objects. The
+ following example shows how this feature can be used.</para>
+
+ <informalexample>
+ <programlisting>// excerpt from Write_File_Header.bsh
+
+title = <quote>Write file header</quote>;
+
+currentName = buffer.getName();
+
+nameField = new JTextField(currentName);
+authorField = new JTextField(<quote>Your name here</quote>);
+descField = new JTextField(<quote></quote>, 25);
+
+namePanel = new JPanel(new GridLayout(1, 2));
+nameLabel = new JLabel(<quote>Name of file:</quote>, SwingConstants.LEFT);
+saveField = new JCheckBox(<quote>Save file when done</quote>,
+ !buffer.isNewFile());
+namePanel.add(nameLabel);
+namePanel.add(saveField);
+
+
+message = new Object[9];
+message[0] = namePanel;
+message[1] = nameField;
+message[2] = Box.createVerticalStrut(10);
+message[3] = <quote>Author's name:</quote>;
+message[4] = authorField;
+message[5] = Box.createVerticalStrut(10);
+message[6] = <quote>Enter description:</quote>;
+message[7] = descField;
+message[8] = Box.createVerticalStrut(5);
+
+if( JOptionPane.OK_OPTION !=
+ JOptionPane.showConfirmDialog(view, message, title,
+ JOptionPane.OK_CANCEL_OPTION,
+ JOptionPane.QUESTION_MESSAGE))
+ return null;
+
+// *****remainder of macro script omitted*****
+
+// end excerpt from Write_File_Header.bsh</programlisting>
+ </informalexample>
+
+ <para>This macro takes several items of user input and produces a
+ formatted file header at the beginning of the buffer. The full macro
+ is included in the set of macros installed by jEdit. There are a
+ number of input features of this excerpt worth noting.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>The macro uses a total of seven visible components.
+ Two of them are created behind the scenes by
+ <function>showConfirmDialog()</function>, the rest are made
+ by the macro. To arrange them, the script creates an array
+ of <classname>Object</classname> objects and assigns
+ components to each location in the array. This translates to
+ a fixed, top-to-bottom arrangement in the message box
+ created by <function>showConfirmDialog()</function>.</para>
+ </listitem>
+
+ <listitem>
+ <para>The macro uses <classname>JTextField</classname>
+ objects to obtain most of the input data. The fields
+ <varname>nameField</varname> and
+ <varname>authorField</varname> are created with constructors
+ that take the initial, default text to be displayed in the
+ field as a parameter. When the message box is displayed, the
+ default text will appear and can be altered or deleted by
+ the user.</para>
+ </listitem>
+
+ <listitem>
+ <para>The text field <varname>descField</varname> uses an
+ empty string for its initial value. The second parameter in
+ its constructor sets the width of the text field component,
+ expressed as the number of characters of
+ <quote>average</quote> width. When
+ <function>showConfirmDialog()</function> prepares the layout
+ of the message box, it sets the width wide enough to
+ accommodate the designated with of
+ <varname>descField</varname>. This technique produces a
+ message box and input text fields that are wide enough for
+ your data with one line of code.</para>
+ </listitem>
+
+ <listitem>
+ <para>The displayed message box includes a
+ <classname>JCheckBox</classname> component that determines
+ whether the buffer will be saved to disk immediately after
+ the file header is written. To conserve space in the message
+ box, we want to display the check box to the right of the
+ label <guilabel>Name of file:</guilabel>. To do that, we
+ create a <classname>JPanel</classname> object and populate
+ it with the label and the checkbox in a left-to-right
+ <classname>GridLayout</classname>. The
+ <classname>JPanel</classname> containing the two components
+ is then added to the beginning of <varname>message</varname>
+ array.</para>
+ </listitem>
+
+ <listitem>
+ <para>The two visible components created by
+ <function>showConfirmDialog()</function> appear at positions
+ 3 and 6 of the <varname>message</varname> array. Only the
+ text is required; they are rendered as text labels.</para>
+ </listitem>
+
+ <listitem>
+ <para>There are three invisible components created by
+ <function>showConfirmDialog()</function>. Each of them
+ involves a call to
+ <function>Box.createVerticalStrut()</function>. The
+ <classname>Box</classname> class is a sophisticated layout
+ class that gives the user great flexibility in sizing and
+ positioning components. Here we use a
+ <function>static</function> method of the
+ <classname>Box</classname> class that produces a vertical
+ <glossterm>strut</glossterm>. This is a transparent
+ component whose width expands to fill its parent component
+ (in this case, the message box). The single parameter
+ indicates the height of the strut in pixels. The last call
+ to <function>createVerticalStrut()</function> separates the
+ description text field from the <guilabel>OK</guilabel> and
+ <guilabel>Cancel</guilabel> buttons that are automatically
+ added by <function>showConfirmDialog()</function>.</para>
+ </listitem>
+
+ <listitem>
+ <para>Finally, the call to
+ <function>showConfirmDialog()</function> uses defined
+ constants for the option type and the message type. The
+ constants are the same as those used with the
+ <function>Macros.confirm()</function> method; see <xref
+ linkend="helpful-methods" />. The option type signifies the
+ use of <guilabel>OK</guilabel> and
+ <guilabel>Cancel</guilabel> buttons. The
+ <constant>QUERY_MESSAGE</constant> message type causes the
+ message box to display a question mark icon.</para>
+
+ <para>The return value of the method is tested against the
+ value <constant>OK_OPTION</constant>. If the return value is
+ something else (because the <guilabel>Cancel</guilabel>
+ button was pressed or because the message box window was
+ closed without a button press), a <constant>null</constant>
+ value is returned to a calling function, signaling that the
+ user canceled macro execution. If the return value is
+ <constant>OK_OPTION</constant>, each of the input components
+ can yield their contents for further processing by calls to
+ <function>JTextField.getText()</function> (or, in the case
+ of the check box,
+ <function>JCheckBox.isSelected()</function>).</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="tips-macro-input-combo">
+ <title>Selecting Input From a List</title>
+
+ <para>Another useful way to get user input for a macro is to use a
+ combo box containing a number of pre-set options. If this is the
+ only input required, one of the versions of
+ <function>showInputDialog()</function> in the
+ <classname>JOptionPane</classname> class provides a shortcut. Here
+ is its prototype:</para>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public static Object
+ <function>showInputDialog</function></funcdef>
+
+ <paramdef>Component
+ <parameter>parentComponent</parameter></paramdef>
+
+ <paramdef>Object
+ <parameter>message</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>title</parameter></paramdef>
+
+ <paramdef>int
+ <parameter>messageType</parameter></paramdef>
+
+ <paramdef>Icon <parameter>icon</parameter></paramdef>
+
+ <paramdef>Object[]
+ <parameter>selectionValues</parameter></paramdef>
+
+ <paramdef>Object
+ <parameter>initialSelectionValue</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+ </itemizedlist>
+
+ <para>This method creates a message box containing a drop-down list
+ of the options specified in the method's parameters, along with
+ <guilabel>OK</guilabel> and <guilabel>Cancel</guilabel> buttons.
+ Compared to <function>showConfirmDialog()</function>, this method
+ lacks an <varname>optionType</varname> parameter and has three
+ additional parameters: an <varname>icon</varname> to display in the
+ dialog (which can be set to <constant>null</constant>), an array of
+ <varname>selectionValues</varname> objects, and a reference to one
+ of the options as the <varname>initialSelectionValue</varname> to be
+ displayed. In addition, instead of returning an
+ <classname>int</classname> representing the user's action,
+ <function>showInputDialog()</function> returns the
+ <classname>Object</classname> corresponding to the user's selection,
+ or <constant>null</constant> if the selection is canceled.</para>
+
+ <para>The following macro fragment illustrates the use of this
+ method.</para>
+
+ <informalexample>
+ <programlisting>// fragment illustrating use of showInputDialog()
+options = new Object[5];
+options[0] = "JLabel";
+options[1] = "JTextField";
+options[2] = "JCheckBox";
+options[3] = "HistoryTextField";
+options[4} = "-- other --";
+
+result = JOptionPane.showInputDialog(view,
+ "Choose component class",
+ "Select class for input component",
+ JOptionPane.QUESTION_MESSAGE,
+ null, options, options[0]);</programlisting>
+ </informalexample>
+
+ <para>The return value <varname>result</varname> will contain either
+ the <classname>String</classname> object representing the selected
+ text item or <constant>null</constant> representing no selection.
+ Any further use of this fragment would have to test the value of
+ <varname>result</varname> and likely exit from the macro if the
+ value equaled <constant>null</constant>.</para>
+
+ <para>A set of options can be similarly placed in a
+ <classname>JComboBox</classname> component created as part of a
+ larger dialog or <function>showMessageDialog()</function> layout.
+ Here are some code fragments showing this approach:</para>
+
+ <informalexample>
+ <programlisting>// fragments from Display_Abbreviations.bsh
+// import statements and other code omitted
+
+// from main routine, this method call returns an array
+// of Strings representing the names of abbreviation sets
+
+abbrevSets = getActiveSets();
+
+...
+
+// from showAbbrevs() method
+
+combo = new JComboBox(abbrevSets);
+// set width to uniform size regardless of combobox contents
+Dimension dim = combo.getPreferredSize();
+dim.width = Math.max(dim.width, 120);
+combo.setPreferredSize(dim);
+combo.setSelectedItem(STARTING_SET); // defined as "global"
+
+// end fragments</programlisting>
+ </informalexample>
+ </section>
+
+ <section id="macro-tips-single-char">
+ <title>Using a Single Keypress as Input</title>
+
+ <para>Some macros may choose to emulate the style of character-based
+ text editors such as <application>emacs</application> or
+ <application>vi</application>. They will require only a single
+ keypress as input that would be handled by the macro but not
+ displayed on the screen. If the keypress corresponds to a character
+ value, jEdit can pass that value as a parameter to a BeanShell
+ script.</para>
+
+ <para>The jEdit class <ulink
+ url="../api/org/gjt/sp/jedit/gui/InputHandler.html">InputHandler</ulink>
+ is an abstract class that that manages associations between keyboard
+ input and editing actions, along with the recording of macros.
+ Keyboard input in jEdit is normally managed by the derived class
+ <ulink
+ url="../api/org/gjt/sp/jedit/gui/DefaultInputHandler.html">DefaultInputHandler</ulink>.
+ One of the methods in the <ulink
+ url="../api/org/gjt/sp/jedit/gui/InputHandler.html">InputHandler</ulink>
+ class handles input from a single keypress:</para>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public void
+ <function>readNextChar</function></funcdef>
+
+ <paramdef>String
+ <parameter>prompt</parameter></paramdef>
+
+ <paramdef>String
+ <parameter>code</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+ </itemizedlist>
+
+ <para>When this method is called, the contents of the
+ <varname>prompt</varname> parameter is shown in the view's status
+ bar. The method then waits for a key press, after which the contents
+ of the <varname>code</varname> parameter will be run as a BeanShell
+ script, with one important modification. Each time the string
+ <varname>__char__</varname> appears in the parameter script, it will
+ be substituted by the character pressed. The key press is
+ <quote>consumed</quote> by <function>readNextChar()</function>. It
+ will not be displayed on the screen or otherwise processed by
+ jEdit.</para>
+
+ <para>Using <function>readNextChar()</function> requires a macro
+ within the macro, formatted as a single, potentially lengthy string
+ literal. The following macro illustrates this technique. It selects
+ a line of text from the current caret position to the first
+ occurrence of the character next typed by the user. If the character
+ does not appear on the line, no new selection occurs and the display
+ remains unchanged.</para>
+
+ <informalexample>
+ <programlisting>// Next_Char.bsh
+
+script = new StringBuffer(512);
+script.append( "start = textArea.getCaretPosition();" );
+script.append( "line = textArea.getCaretLine();" );
+script.append( "end = textArea.getLineEndOffset(line) + 1;" );
+script.append( "text = buffer.getText(start, end - start);" );
+script.append( "match = text.indexOf(__char__, 1);" );
+script.append( "if(match != -1) {" );
+script.append( "if(__char__ != '\\n') ++match;" );
+script.append( "textArea.select(start, start + match - 1);" );
+script.append( "}" );
+
+view.getInputHandler().readNextChar("Enter a character",
+ script.toString());
+
+// end Next_Char.bsh</programlisting>
+ </informalexample>
+
+ <para>Once again, here are a few comments on the macro's
+ design.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>A <classname>StringBuffer</classname> object is used
+ for efficiency; it obviates multiple creation of
+ fixed-length <classname>String</classname> objects. The
+ parameter to the constructor of <varname>script</varname>
+ specifies the initial size of the buffer that will receive
+ the contents of the child script.</para>
+ </listitem>
+
+ <listitem>
+ <para>Besides the quoting of the script code, the formatting
+ of the macro is entirely optional but (hopefully) makes it
+ easier to read.</para>
+ </listitem>
+
+ <listitem>
+ <para>It is important that the child script be
+ self-contained. It does not run in the same namespace as the
+ <quote>parent</quote> macro
+ <filename>Next_Char.bsh</filename> and therefore does not
+ share variables, methods, or scripted objects defined in the
+ parent macro.</para>
+ </listitem>
+
+ <listitem>
+ <para>Finally, access to the <ulink
+ url="../api/org/gjt/sp/jedit/gui/InputHandler.html">InputHandler</ulink>
+ object used by jEdit is available by calling
+ <function>getInputHandler()</function> on the current
+ view.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
+ <section id="startup-scripts">
+ <title>Startup Scripts</title>
+
+ <para>On startup, jEdit runs any BeanShell scripts located in the
+ <filename>startup</filename> subdirectory of the jEdit installation and
+ user settings directories (see <xref linkend="settings-directory" />).
+ As with macros, the scripts must have a <filename>.bsh</filename> file
+ name extension. Startup scripts are run near the end of the startup
+ sequence, after plugins, properties and such have been initialized, but
+ before the first view is opened.</para>
+
+ <para>Startup scripts can perform initialization tasks that cannot be
+ handled by command line options or ordinary configuration options, such
+ as customizing jEdit's user interface by changing entries in the Java
+ platform's <classname>UIManager</classname> class.</para>
+
+ <para>Startup scripts have an additional feature lacking in ordinary
+ macros that can help you further customize jEdit. Variables and methods
+ defined in a startup script are available in all instances of the
+ BeanShell interpreter created in jEdit. This allows you to create a
+ personal library of methods and objects that can be accessed at any time
+ during the editing session in another macro, the BeanShell shell of the
+ Console plugin, or menu items such as
+ <guimenu>Utilities</guimenu>><guisubmenu>BeanShell</guisubmenu>><guimenuitem>Evaluate
+ BeanShell Expression</guimenuitem>.</para>
+
+ <para>The startup script routine will run script files in the
+ installation directory first, followed by scripts in the user settings
+ directory. In each case, scripts will be executed in alphabetical order,
+ applied without regard to whether the file name contains upper or lower
+ case characters.</para>
+
+ <para>If a startup script throws an exception (because, for example, it
+ attempts to call a method on a <constant>null</constant> object). jEdit
+ will show an error dialog box and move on to the next startup script. If
+ script bugs are causing jEdit to crash or hang on startup, you can use
+ the <userinput>-nostartupscripts</userinput> command line option to
+ disable them for that editing session.</para>
+
+ <para>Another important difference between startup scripts and ordinary
+ macros is that startup scripts cannot use the pre-defined variables
+ <varname>view</varname>, <varname>textArea</varname>,
+ <varname>editPane</varname> and <varname>buffer</varname>. This is
+ because they are executed before the initial view is created.</para>
+
+ <para>If you are writing a method in a startup script and wish to use
+ one of the above variables, pass parameters of the appropriate type to
+ the method, so that a macro calling them after startup can supply the
+ appropriate values. For example, a startup script could include a
+ method</para>
+
+ <informalexample>
+ <programlisting>void doSomethingWithView(View v, String s) {
+ ...
+}</programlisting>
+ </informalexample>
+
+ <para>so that during the editing session another macro can call the
+ method using</para>
+
+ <informalexample>
+ <programlisting>doSomethingWithView(view, "something");</programlisting>
+ </informalexample>
+
+ <sidebar>
+ <title>Reloading startup scripts without restarting</title>
+
+ <para>It is actually possible to reload startup scripts or load
+ other scripts without restarting jEdit, using a BeanShell statement
+ like the following:</para>
+
+ <programlisting>BeanShell.runScript(view,<replaceable>path</replaceable>,null,false);</programlisting>
+
+ <para>For <replaceable>path</replaceable>, you can substitute any
+ string, or a method call such as
+ <function>buffer.getPath()</function>.</para>
+ </sidebar>
+ </section>
+
+ <section id="scripts-command-line">
+ <title>Running Scripts from the Command Line</title>
+
+ <para>The <userinput>-run</userinput> command line switch specifies a
+ BeanShell script to run on startup:</para>
+
+ <screen><prompt>$ </prompt><userinput>jedit -run=test.bsh</userinput></screen>
+
+ <para>Note that just like with startup scripts, the
+ <varname>view</varname>, <varname>textArea</varname>,
+ <varname>editPane</varname> and <varname>buffer</varname> variables are
+ not defined.</para>
+
+ <para>If another instance is already running, the script will be run in
+ that instance, and you will be able to use the
+ <function>jEdit.getLastView()</function> method to obtain a view.
+ However, if a new instance of jEdit is being started, the script will be
+ run at the same time as all other startup scripts; that is, before the
+ first view is opened.</para>
+
+ <para>If your script needs a view instance to operate on, you can use
+ the following code pattern to obtain one, no matter how or when the
+ script is being run:</para>
+
+ <programlisting>void doSomethingUseful()
+{
+ void run()
+ {
+ view = jEdit.getLastView();
+
+ // put actual script body here
+ }
+
+ if(jEdit.getLastView() == null)
+ VFSManager.runInAWTThread(this);
+ else
+ run();
+}
+
+doSomethingUseful();</programlisting>
+
+ <para>If the script is being run in a loaded instance, it can be invoked
+ to perform its work immediately. However, if the script is running at
+ startup, before an initial view exists, its operation must be delayed to
+ allow the view object first to be created and displayed. In order to
+ queue the macro's operation, the scripted <quote>closure</quote> named
+ <function>doSomethingUseful()</function> implements the
+ <classname>Runnable</classname> interface of the Java platform. That
+ interface contains only a single <function>run()</function> method that
+ takes no parameters and has no return value. The macro's implementation
+ of the <function>run()</function> method contains the
+ <quote>working</quote> portion of the macro. Then the scripted object,
+ represented by a reference to <varname>this</varname>, is passed to the
+ <function>runInAWTThread()</function> method. This schedules the macro's
+ operations for execution after the startup routine is complete.</para>
+
+ <para>As this example illustrates, the
+ <function>runInAWTThread()</function> method can be used to ensure that
+ a macro will perform operations after other operations have completed.
+ If it is invoked during startup, it schedules the specified
+ <classname>Runnable</classname> object to run after startup is complete.
+ If invoked when jEdit is fully loaded, the
+ <classname>Runnable</classname> object will execute after all pending
+ input/output is complete, or immediately if there are no pending I/O
+ operations. This will delay operations on a new buffer, for example,
+ until after the buffer is loaded and displayed.</para>
+ </section>
+
+ <section id="macro-tips-BeanShell">
+ <title>Advanced BeanShell Techniques</title>
+
+ <para>BeanShell has a few advanced features that we haven't mentioned
+ yet. They will be discussed in this section.</para>
+
+ <section id="macro-tips-BeanShell-convenience">
+ <title>BeanShell's Convenience Syntax</title>
+
+ <para>We noted earlier that BeanShell syntax does not require that
+ variables be declared or defined with their type, and that variables
+ that are not typed when first used can have values of differing
+ types assigned to them. In addition to this <quote>loose</quote>
+ syntax, BeanShell allows a <quote>convenience</quote> syntax for
+ dealing with the properties of JavaBeans. They may be accessed or
+ set as if they were data members. They may also be accessed using
+ the name of the property enclosed in quotation marks and curly
+ brackets. For example, the following statement are all equivalent,
+ assuming <varname>btn</varname> is a <classname>JButton</classname>
+ instance:</para>
+
+ <informalexample>
+ <programlisting>b.setText("Choose");
+b.text = "Choose";
+b{"text"} = "Choose";
+</programlisting>
+ </informalexample>
+
+ <para>The last form can also be used to access a key-value pair of a
+ <classname>Hashtable</classname> object.</para>
+
+ <!-- actually, the following requires the bsh.classpath package, which
+ is not included with jEdit at this point in time.
+
+ a future release of jEdit will use bsh.classpath, and hence support
+ 'import *'
+
+<para>
+ Finally, when importing classes, BeanShell permits the following form
+ to import all classes lying within the interpreter's classpath:
+</para>
+
+<informalexample><programlisting>import *;
+</programlisting></informalexample>
+
+-->
+ </section>
+
+ <section id="macro-tips-BeanShell-keywords">
+ <title>Special BeanShell Keywords</title>
+
+ <para>BeanShell uses special keywords to refer to variables or
+ methods defined in the current or an enclosing block's scope:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>The keyword <function>this</function> refers to the
+ current scope.</para>
+ </listitem>
+
+ <listitem>
+ <para>The keyword <function>super</function> refers to the
+ immediately enclosing scope.</para>
+ </listitem>
+
+ <listitem>
+ <para>The keyword <function>global</function> refers to the
+ top-level scope of the macro script.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The following script illustrates the use of these
+ keywords:</para>
+
+ <informalexample>
+ <programlisting>a = "top\n";
+foo() {
+ a = "middle\n";
+ bar() {
+ a = "bottom\n";
+ textArea.setSelectedText(global.a);
+ textArea.setSelectedText(super.a);
+ // equivalent to textArea.setSelectedText(this.a):
+ textArea.setSelectedText(a);
+ }
+
+ bar();
+}
+foo();</programlisting>
+ </informalexample>
+
+ <para>When the script is run, the following text is inserted in the
+ current buffer:</para>
+
+ <screen>top
+middle
+bottom</screen>
+ </section>
+
+ <section id="macro-tips-BeanShell-class">
+ <title>Implementing Classes and Interfaces</title>
+
+ <para>As discussed in the macro example in <xref
+ linkend="dialog-macro" />, scripted objects can implicitly implement
+ Java interfaces such as <classname>ActionListener</classname>. For
+ example:</para>
+
+ <programlisting>myRunnable() {
+ run() {
+ System.out.println("Hello world!");
+ }
+
+ return this;
+}
+
+Runnable r = myRunnable();
+new Thread(r).start();</programlisting>
+
+ <para>Frequently it will not be necessary to implement all of the
+ methods of a particular interface in order to specify the behavior
+ of a scripted object. To prevent BeanShell from throwing exceptions
+ for missing interface methods, implement the
+ <function>invoke()</function> method, which is called when an
+ undefined method is invoked on a scripted object. Typically, the
+ implementation of this method will do nothing, as in the following
+ example:</para>
+
+ <informalexample>
+ <programlisting>invoke(method, args) {}</programlisting>
+ </informalexample>
+
+ <para>In addition to the implicit interface definitions described
+ above, BeanShell permits full-blown classes to be defined. Indeed,
+ almost any Java class definition should work in BeanShell:</para>
+
+ <programlisting>class Cons {
+ // Long-live LISP!
+ Object car;
+ Object cdr;
+
+ rplaca(Object car) {
+ this.car = car;
+ }
+
+ rplacd(Object cdr) {
+ this.cdr = cdr;
+ }
+}</programlisting>
+ </section>
+ </section>
+
+ <section id="macro-tips-debugging">
+ <title>Debugging Macros</title>
+
+ <para>Here are a few techniques that can prove helpful in debugging
+ macros.</para>
+
+ <section id="macro-tips-debugging-exceptions">
+ <title>Identifying Exceptions</title>
+
+ <para>An <glossterm>exception</glossterm> is a condition reflecting
+ an error or other unusual result of program execution that requires
+ interruption of normal program flow and some kind of special
+ handling. Java has a rich (and extensible) collection of exception
+ classes which represent such conditions.</para>
+
+ <para>jEdit catches exceptions thrown by BeanShell scripts and
+ displays them in a dialog box. In addition, the full traceback is
+ written to the activity log (see <xref linkend="activity-log" /> for
+ more information about the activity log).</para>
+
+ <para>There are two broad categories of errors that will result in
+ exceptions:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>Interpreter errors</emphasis>, which may
+ arise from typing mistakes like mismatched brackets or
+ missing semicolons, or from BeanShell's failure to find a
+ class corresponding to a particular variable.</para>
+
+ <para>Interpreter errors are usually accompanied by the line
+ number in the script, along with the cause of the
+ error.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis>Execution errors</emphasis>, which result
+ from runtime exceptions thrown by the Java platform when
+ macro code is executed.</para>
+
+ <para>Some exceptions thrown by the Java platform can often
+ seem cryptic. Nevertheless, examining the contents of the
+ activity log may reveals clues as to the cause of the
+ error.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="macro-tips-debugging-log">
+ <title>Using the Activity Log as a Tracing Tool</title>
+
+ <para>Sometimes exception tracebacks will say what kind of error
+ occurred but not where it arose in the script. In those cases, you
+ can insert calls that log messages to the activity log in your
+ macro. If the logged messages appear when the macro is run, it means
+ that up to that point the macro is fine; but if an exception is
+ logged first, it means the logging call is located after the cause
+ of the error.</para>
+
+ <para>To write a message to the activity log, use the following
+ method of the <ulink
+ url="../api/org/gjt/sp/util/Log.html">Log</ulink> class:</para>
+
+ <itemizedlist>
+ <listitem>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>public static void
+ <function>log</function></funcdef>
+
+ <paramdef>int
+ <parameter>urgency</parameter></paramdef>
+
+ <paramdef>Object
+ <parameter>source</parameter></paramdef>
+
+ <paramdef>Object
+ <parameter>message</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </listitem>
+ </itemizedlist>
+
+ <para>See the documentation for the <ulink
+ url="../api/org/gjt/sp/util/Log.html">Log</ulink> class for
+ information about the method's parameters.</para>
+
+ <para>The following code sends a typical debugging message to the
+ activity log:</para>
+
+ <informalexample>
+ <programlisting>Log.log(Log.DEBUG, BeanShell.class,
+ "counter = " + counter);</programlisting>
+ </informalexample>
+
+ <para>The corresponding activity log entry might read as
+ follows:</para>
+
+ <informalexample>
+ <programlisting>[debug] BeanShell: counter = 15</programlisting>
+ </informalexample>
+
+ <sidebar>
+ <title>Using message dialog boxes as a tracing tool</title>
+
+ <para>If you would prefer not having to deal with the activity
+ log, you can use the <function>Macros.message()</function>
+ method as a tracing tool. Just insert calls like the following
+ in the macro code:</para>
+
+ <programlisting>Macros.message(view,"tracing");</programlisting>
+
+ <para>Execution of the macro is halted until the message dialog
+ box is closed. When you have finished debugging the macro, you
+ should delete or comment out the debugging calls to
+ <function>Macros.message()</function> in your final source
+ code.</para>
+ </sidebar>
+ </section>
+ </section>
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/plugin-implement.xml b/jEdit/doc/users-guide/plugin-implement.xml
index 0988e5d..cd695b4 100644
--- a/jEdit/doc/users-guide/plugin-implement.xml
+++ b/jEdit/doc/users-guide/plugin-implement.xml
@@ -1,1282 +1,1281 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<chapter id="plugin-implement">
- <!-- jEdit buffer-local properties: -->
- <!-- :xml.root=users-guide.xml: -->
- <!-- :maxLineLen=80:wrap=soft: -->
- <title>Implementing a Simple Plugin</title>
- <!-- jEdit 4.3 Plugin Guide, (C) 2005, 2007 Alan Ezust -->
- <!-- jEdit 4.0 Plugin Guide, (C) 2001, 2002 John Gellene -->
-
- <para>There are many applications for the leading operating systems that
- provide a <quote>scratch-pad</quote> or <quote>sticky note</quote> facility
- for the desktop display. A similar type of facility operating within the
- jEdit display would be a convenience. The use of dockable windows would
- allow the notepad to be displayed or hidden with a single mouse click or
- keypress (if a keyboard shortcut were defined). The contents of the notepad
- could be saved at program exit (or, if earlier, deactivation of the plugin)
- and retrieved at program startup or plugin activation.</para>
-
- <para>We will keep the capabilities of this plugin modest, but a few other
- features would be worthwhile. The user should be able to write the contents
- of the notepad to storage on demand. It should also be possible to choose
- the name and location of the file that will be used to hold the notepad
- text. This would allow the user to load other files into the notepad
- display. The path of the notepad file should be displayed in the plugin
- window, but will give the user the option to hide the file name. Finally,
- there should be an action by which a single click or keypress would cause
- the contents of the notepad to be written to the new text buffer for further
- processing.</para>
-
- <para>The full source code for QuickNotepad is contained in jEdit's source
- code distribution. We will provide excerpts in this discussion where it is
- helpful to illustrate specific points. You are invited to obtain the source
- code for further study or to use as a starting point for your own
- plugin.</para>
-
- <section id="plugin-load">
- <title><indexterm>
- <primary>Plugin API</primary>
-
- <secondary>loading at startup</secondary>
- </indexterm> How Plugins are Loaded</title>
-
- <para>We will discuss the implementation of the
- <application>QuickNotepad</application> plugin, along with the jEdit
- APIs it makes use of. But first, we describe how plugins are
- loaded.</para>
-
- <para>As part of its startup routine, jEdit's <function>main</function>
- method calls various methods to load and initialize plugins.</para>
-
- <para>Additionally, plugins using the jEdit 4.2 plugin API can be loaded
- and unloaded at any time. This is a great help when developing your own
- plugins -- there is no need to restart the editor after making changes
- (see <xref linkend="plugin-implement-reloading" /> ).</para>
-
- <para>Plugins are loaded from files with the <filename>.jar</filename>
- filename extension located in the <filename>jars</filename>
- subdirectories of the jEdit installation and user settings directories
- (see <xref linkend="settings-directory" />).</para>
-
- <para>For each JAR archive file it finds, jEdit scans its entries and
- performs the following tasks:</para>
-
- <itemizedlist>
- <listitem>
- <para>Adds to a collection maintained by jEdit a new object of
- type <ulink url="../api/org/gjt/sp/jedit/PluginJAR.html">
- <classname>PluginJAR</classname></ulink>. This is a data
- structure holding the name of the JAR archive file, a reference
- to the <ulink url="../api/org/gjt/sp/jedit/JARClassLoader.html">
- <classname>JARClassLoader</classname></ulink>, and a collection
- of plugins found in the archive file.</para>
- </listitem>
-
- <listitem>
- <para>Loads any properties defined in files ending with the
- extension <filename>.props</filename> that are contained in the
- archive. See <xref
- linkend="plugin-implement-properties" />.</para>
- </listitem>
-
- <listitem>
- <para>Reads action definitions from any file named
- <filename>actions.xml</filename> in the archive (the file need
- not be at the top level). See <xref
- linkend="plugin-implement-actions" />.</para>
- </listitem>
-
- <listitem>
- <para>Parses and loads the contents of any file named
- <filename>dockables.xml</filename> in the archive (the file need
- not be at the top level). This file contains BeanShell code for
- creating docking or floating windows that will contain the
- visible components of the plugin. Not all plugins define
- dockable windows, but those that do need a
- <filename>dockables.xml</filename> file. See <xref
- linkend="plugin-implement-dockables" />.</para>
- </listitem>
-
- <listitem>
- <para>Checks for a class name with a name ending with
- <filename>Plugin.class</filename>.</para>
-
- <para>Such a class is known as a <firstterm>plugin core
- class</firstterm> and must extend jEdit's abstract <ulink
- url="../api/org/gjt/sp/jedit/EditPlugin.html">
- <classname>EditPlugin</classname></ulink> class.</para>
-
- <para>The initialization routine checks the plugin's properties
- to see if it is subject to any dependencies. For example, a
- plugin may require that the version of the Java runtime
- environment or of jEdit itself be equal to or above some
- threshold version. A plugin can also require the presence of
- another plugin.</para>
-
- <para>If any dependency is not satisfied, the loader marks the
- plugin as <quote>broken</quote> and logs an error
- message.</para>
- </listitem>
- </itemizedlist>
-
- <para>After scanning the plugin JAR file and loading any resources, a
- new instance of the plugin core class is created and added to the
- collection maintained by the appropriate <ulink
- url="../api/org/gjt/sp/jedit/PluginJAR.html">
- <classname>PluginJAR</classname></ulink>. jEdit then calls the
- <function>start()</function> method of the plugin core class. The
- <function>start()</function> method can perform initialization of the
- object's data members. Because this method is defined as an empty
- <quote>no-op</quote> in the <ulink
- url="../api/org/gjt/sp/jedit/EditPlugin.html">
- <classname>EditPlugin</classname></ulink> abstract class, a plugin need
- not provide an implementation if no unique initialization is
- required.</para>
-
- <sidebar>
- <title>Updating 4.1 plugins</title>
-
- <para>Note that while jEdit 4.1 plugins were only loaded on startup,
- jEdit 4.2 plugins can be loaded at any time. As a result, the
- <function>start()</function> method needs to cope with being called
- at any time, and <function>stop()</function> needs to fully clean up
- after the plugin.</para>
- </sidebar>
- </section>
-
- <section id="plugin-implement-quicknotepadplugin">
- <title>The QuickNotepadPlugin Class</title>
-
- <para>The major issues encountered when writing a plugin core class
- arise from the developer's decisions on what features the plugin will
- make available. These issues have implications for other plugin elements
- as well.</para>
-
- <itemizedlist>
- <listitem>
- <para>Will the plugin provide for actions that the user can
- trigger using jEdit's menu items, toolbar buttons and keyboard
- shortcuts?</para>
- </listitem>
-
- <listitem>
- <para>Will the plugin have its own visible interface?</para>
- </listitem>
-
- <listitem>
- <para>Will the plugin have settings that the user can
- configure?</para>
- </listitem>
-
- <listitem>
- <para>Will the plugin respond to any messages reflecting changes
- in the host application's state?</para>
- </listitem>
-
- <listitem>
- <para>Should the plugin do something special when it gets
- focus?</para>
- </listitem>
- </itemizedlist>
-
- <para>Recall that the plugin core class must extend <ulink
- url="../api/org/gjt/sp/jedit/EditPlugin.html">
- <classname>EditPlugin</classname></ulink>. In QuickNotepad's plugin core
- class, there are no special initialization or shutdown chores to
- perform, so we will not need a <function>start()</function> or
- <function>stop()</function> method.</para>
-
- <para>The resulting plugin core class is lightweight and straightforward
- to implement:</para>
-
- <itemizedlist>
- <listitem>
- <informalexample>
- <programlisting>public class QuickNotepadPlugin extends EditPlugin {
- public static final String NAME = "quicknotepad";
- public static final String OPTION_PREFIX = "options.quicknotepad.";
-}
-</programlisting>
- </informalexample>
-
- <para>The class has been simplified since 4.1, and all we
- defined here were a couple of <classname>String</classname> data
- members to enforce consistent syntax for the name of properties
- we will use throughout the plugin.</para>
- </listitem>
-
- <listitem>
- <para>These names are used in <filename>actions.xml</filename>
- for each of the menu choices. This file is discussed in more
- detail in <xref linkend="plugin-implement-actions" />. Each
- action is a beanshell script.</para>
-
- <informalexample>
- <programlisting>
-<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
-<ACTIONS>
- <ACTION NAME="quicknotepad.choose-file">
- <CODE>
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).chooseFile();
- </CODE>
- </ACTION>
-
- <ACTION NAME="quicknotepad.save-file">
- <CODE>
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).saveFile();
- </CODE>
- </ACTION>
-
- <ACTION NAME="quicknotepad.copy-to-buffer">
- <CODE>
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).copyToBuffer();
- </CODE>
- </ACTION>
-</ACTIONS>
-</programlisting>
- </informalexample>
- </listitem>
-
- <listitem>
- <para>The names also come up in the properties file,
- <filename>QuickNotePad.props</filename> file. The properties
- define option panes and strings used by the plugin. It is
- explained in more detail in <xref
- linkend="plugin-implement-properties" /> and the <ulink
- url="../api/org/gjt/sp/jedit/EditPlugin.html">
- <classname>EditPlugin</classname></ulink> API docs.</para>
-
- <informalexample>
- <programlisting>
-# jEdit only needs to load the plugin the first time the user accesses it
-# the presence of this property also tells jEdit the plugin is using the new API
-plugin.QuickNotepadPlugin.activate=defer
-
-# These two properties are required for all plugins
-plugin.QuickNotepadPlugin.name=QuickNotepad
-plugin.QuickNotepadPlugin.author=John Gellene
-
-# version number == jEdit version number
-plugin.QuickNotepadPlugin.version=4.3
-
-# online help
-plugin.QuickNotepadPlugin.docs=index.html
-
-# we only have one dependency, jEdit 4.2final, since we use the new plugin API
-plugin.QuickNotepadPlugin.depend.0=jedit 04.02.99.00
-
-# plugin menu
-plugin.QuickNotepadPlugin.menu=quicknotepad \
- - \
- quicknotepad.choose-file \
- quicknotepad.save-file \
- quicknotepad.copy-to-buffer
-
-# action labels for actions supplied by dockables.xml
-quicknotepad.label=QuickNotepad
-
-# action labels for actions supplied by actions.xml
-quicknotepad.choose-file.label=Choose notepad file
-quicknotepad.save-file.label=Save notepad file
-quicknotepad.copy-to-buffer.label=Copy notepad to buffer
-
-# plugin option pane
-plugin.QuickNotepadPlugin.option-pane=quicknotepad
-
-# Option pane activation BeanShell snippet
-options.quicknotepad.code=new QuickNotepadOptionPane();
-
-# Option pane labels
-options.quicknotepad.label=QuickNotepad
-options.quicknotepad.file=File:
-options.quicknotepad.choose-file=Choose
-options.quicknotepad.choose-file.title=Choose a notepad file
-options.quicknotepad.choose-font=Font:
-options.quicknotepad.show-filepath.title=Display notepad file path
-
-# window title
-quicknotepad.title=QuickNotepad
-
-# window toolbar buttons
-quicknotepad.choose-file.icon=Open.png
-quicknotepad.save-file.icon=Save.png
-quicknotepad.copy-to-buffer.icon=CopyToBuffer.png
-
-# default settings
-options.quicknotepad.show-filepath=true
-options.quicknotepad.font=Monospaced
-options.quicknotepad.fontstyle=0
-options.quicknotepad.fontsize=14
-
-# Setting not defined but supplied for completeness
-options.quicknotepad.filepath=
-</programlisting>
- </informalexample>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="plugin-implement-properties">
- <title>The Property File</title>
-
- <para>jEdit maintains a list of <quote>properties</quote>, which are
- name/value pairs used to store human-readable strings, user settings,
- and various other forms of meta-data. During startup, jEdit loads the
- default set of properties, followed by plugin properties stored in
- plugin JAR files, finally followed by user properties.</para>
-
- <para>Some properties are used by the plugin API itself. Others are
- accessed by the plugin using methods in the <ulink
- url="../api/org/gjt/sp/jedit/jEdit.html">
- <classname>jEdit</classname></ulink> class. Others are accessed by the
- scripts used by plugin packagers <footnote>
- <para>See the <guimenuitem>Macros/Properties/Create Plugin
- Announcement</guimenuitem> macro for an example.</para>
- </footnote>.</para>
-
- <para>Property files contained in plugin JARs must end with the filename
- extension <filename>.props</filename>, and have a very simple syntax,
- which the following example illustrates:</para>
-
- <informalexample>
- <programlisting># Lines starting with '#' are ignored.
-name=value
-another.name=another value
-long.property=Long property value, split over \
- several lines
-escape.property=Newlines and tabs can be inserted \
- using the \t and \n escapes
-backslash.property=A backslash can be inserted by writing \\.</programlisting>
- </informalexample>
-
- <para>Now we look at a fragment from the
- <filename>QuickNotepad.props</filename> file <footnote>
- <para>Examine the actual file for a more complete example</para>
- </footnote> which contains properties for the QuickNotepad plugin.
- The first type of property data is information about the plugin itself;
- these are the only properties that must be specified in order for the
- plugin to load:</para>
-
- <informalexample>
- <programlisting># general plugin information
-plugin.QuickNotepadPlugin.activate=defer
-plugin.QuickNotepadPlugin.name=QuickNotepad
-plugin.QuickNotepadPlugin.author=John Gellene
-plugin.QuickNotepadPlugin.version=4.03
-plugin.QuickNotepadPlugin.docs=QuickNotepad.html
-# depends on jedit 4.2final
-plugin.QuickNotepadPlugin.depend.0=jedit 04.02.99.00
-plugin.QuickNotepadPlugin.description=A demo jEdit plugin that provides a notepad dockable.
-plugin.QuickNotepadPlugin.longdescription=description.html
-</programlisting>
- </informalexample>
-
- <para>These properties are each described in detail in the documentation
- for the <ulink url="../api/org/gjt/sp/jedit/EditPlugin.html">
- <classname>EditPlugin</classname></ulink> class and do not require
- further discussion here.</para>
-
- <para>Next in the file comes a property that sets the title of the
- plugin's dockable window. Dockable windows are discussed in detail in
- <xref linkend="plugin-implement-dockables" />.</para>
-
- <informalexample>
- <programlisting># dockable window name
-quicknotepad.title=QuickNotepad</programlisting>
- </informalexample>
-
- <para>Next, we see menu item labels for the plugin's actions. All of
- these but the first are defined in <literal>actions.xml</literal> file,
- and that is because the dockable itself has its own actions. Actions are
- discussed further in <xref linkend="plugin-implement-actions" />.</para>
-
- <informalexample>
- <programlisting># action labels
-# Dockable label
-quicknotepad.label=QuickNotepad
-# Additional strings extracted from the plugin java source
-quicknotepad.choose-file.label=Choose notepad file
-quicknotepad.save-file.label=Save notepad file
-quicknotepad.copy-to-buffer.label=Copy notepad to buffer
-</programlisting>
- </informalexample>
-
- <para>Next, the plugin's menu is defined. See <xref
- linkend="plugin-implement-quicknotepadplugin" />.</para>
-
- <informalexample>
- <programlisting># application menu items
-quicknotepad.menu.label=QuickNotepad
-quicknotepad.menu=quicknotepad - quicknotepad.choose-file \
- quicknotepad.save-file quicknotepad.copy-to-buffer</programlisting>
- </informalexample>
-
- <para>We have created a small toolbar as a component of QuickNotepad, so
- file names for the button icons follow:</para>
-
- <informalexample>
- <programlisting># plugin toolbar buttons
-quicknotepad.choose-file.icon=Open.png
-quicknotepad.save-file.icon=Save.png
-quicknotepad.copy-to-buffer.icon=Edit.png</programlisting>
- </informalexample>
-
- <para>The menu item labels corresponding to these icons will also serve
- as tooltip text.</para>
-
- <para>Finally, the properties file set forth the labels and settings
- used by the option pane:</para>
-
- <informalexample>
- <programlisting># Option pane labels
-options.quicknotepad.label=QuickNotepad
-options.quicknotepad.file=File:
-options.quicknotepad.choose-file=Choose
-options.quicknotepad.choose-file.title=Choose a notepad file
-options.quicknotepad.choose-font=Font:
-options.quicknotepad.show-filepath.title=Display notepad file path
-
-# Initial default font settings
-options.quicknotepad.show-filepath=true
-options.quicknotepad.font=Monospaced
-options.quicknotepad.fontstyle=0
-options.quicknotepad.fontsize=14
-
-# Setting not defined but supplied for completeness
-options.quicknotepad.filepath=</programlisting>
- </informalexample>
-
- <tip>
- <title>PropertySideKick</title>
-
- <para>There is a SideKick for Property files, provided in the
- JavaSideKick plugin. This gives you a compact and sorted tree view
- of property files.</para>
- </tip>
-
- <sidebar>
- <title>Updating 4.1 plugins</title>
-
- <para>jEdit 4.2 plugins are distinguished from jEdit 4.1 plugins by
- the presence of the
- <literal>plugin.<replaceable>name</replaceable>.activate</literal>
- property. If this property is set, the plugin is treated like a
- jEdit 4.2 plugin. Usually, this property should be set to
- <literal>defer</literal>. See the API documentation for the <ulink
- url="../api/org/gjt/sp/jedit/EditPlugin.html">
- <classname>EditPlugin</classname></ulink> class for details. jEdit
- 4.1 plugins which have not been updated to use the 4.2 API will not
- be supported in jEdit 4.3.</para>
- </sidebar>
- </section>
-
- <section id="plugin-implement-editbus">
- <title>The EditBus</title>
-
- <para>jEdit (and some plugins) generate several kinds of messages to
- alert plugins and other components of jedit-specific events. The message
- classes, all derived from <ulink
- url="../api/org/gjt/sp/jedit/EBMessage.html">
- <classname>EBMessage</classname></ulink> cover the opening and closing
- of the application, changes in the status of buffers and views, changes
- in user settings, as well as changes in the state of other program
- features. A full list of messages can be found in the <ulink
- url="../api/org/gjt/sp/jedit/msg/package-summary.html">org.gjt.sp.jedit.msg</ulink>
- package.</para>
-
-
-
- <para>For example, the ViewUpdate messages are all related to the jEdit
- View, or the top-level window. If the user creates multiple Views, a
- plugin may need to know when they are created or destroyed, so it would
- monitor ViewUpdate messages.</para>
-
- <para>BufferUpdate messages are all related to jEdit buffers. They let
- plugins know when a buffer has become dirty, when it is about to be
- closed, after it is closed, created, loaded, or saved. Each of these
- messages are described in further detail in the API docs.</para>
-
- <para>As another example, The Navigator plugin monitors a newly added
- (to jEdit 4.3) EBMessage of the kind <ulink
- url="../api/org/gjt/sp/jedit/BufferChanging.html">BufferChanging</ulink>.
- The BufferChanging event provides Navigator enough advance notice to
- save the TextArea's caret just before the current EditPane changes its
- active Buffer. The <literal>BufferChanged</literal> event, another
- <literal>EditPaneUpdate</literal> message, is thrown shortly afterward.
- This is not used by Navigator, but it is used by SideKick to determine
- when it is time to reparse the buffer.</para>
-
- <para>Plugins register <ulink
- url="../api/org/gjt/sp/jedit/EBComponent.html">
- <function>EBComponent</function></ulink> instances with the <ulink
- url="../api/org/gjt/sp/jedit/EditBus.html">
- <classname>EditBus</classname></ulink> to receive messages reflecting
- changes in jEdit's state.</para>
-
- <para><ulink url="../api/org/gjt/sp/jedit/EBComponent.html">
- <function>EBComponent</function></ulink>s are added and removed with the
- <ulink
- url="../api/org/gjt/sp/jedit/EditBus.html#addToBus(org.gjt.sp.jedit.EBComponent)">
- <function>EditBus.addToBus()</function></ulink> and <ulink
- url="../api/org/gjt/sp/jedit/EditBus.html#removeFromBus(org.gjt.sp.jedit.EBComponent)">
- <function>EditBus.removeFromBus()</function></ulink> methods.</para>
-
- <para>Typically, the <ulink
- url="../api/org/gjt/sp/jedit/EBComponent.html#handleMessage(org.gjt.sp.jedit.EBMessage)">
- <function>EBComponent.handleMessage()</function></ulink> method is
- implemented with one or more <function>if</function> blocks that test
- whether the message is an instance of a derived message class in which
- the component has an interest.</para>
-
- <programlisting>if(msg instanceof BufferUpdate) {
- // a buffer's state has changed!
-}
-else if(msg instanceof ViewUpdate) {
- // a view's state has changed!
-}
-// ... and so on</programlisting>
-
- <para>If a plugin core class will respond to EditBus messages, it can be
- derived from <ulink url="../api/org/gjt/sp/jedit/EBPlugin.html">
- <classname>EBPlugin</classname></ulink>, in which case no explicit
- <function>addToBus()</function> call is necessary. Otherwise, <ulink
- url="../api/org/gjt/sp/jedit/EditPlugin.html">
- <classname>EditPlugin</classname></ulink> will suffice as a plugin base
- class. Note that QuickNotepad uses the latter.</para>
-
- <tip>
- <title>Using the Activity Log to see the EditBus</title>
-
- <para> To determine precisely which EditBus messages are being sent by
- jEdit or the plugins, start up jEdit with an additional argument,
- <literal>-log=5</literal>. You can set an even lower log level to see
- further details (the default is 7). With a log level of 5 or lower, the
- Activity Log will include [notice]s, which will show us exactly which
- EditBus message is sent and when. See <xref linkend="activity-log" />
- for more details. </para> </tip>
-
- </section>
-
- <section id="plugin-implement-actions">
- <title>The Actions Catalog</title>
-
- <para>Actions define procedures that can be bound to a menu item, a
- toolbar button or a keyboard shortcut. Most plugin Actions <footnote>
- <para>Some plugins, such as Sidekick, Console, and
- ProjectViewer, create pure Java EditAction-derived Actions,
- based which services are available, or which files are found in
- a certain path. However, this is an advanced topic you can
- explore further in the source and API docs of those
- plugins.</para>
- </footnote> are short scripts written in BeanShell, jEdit's macro
- scripting language. These scripts either direct the action themselves,
- delegate to a method in one of the plugin's classes that encapsulates
- the action, or do a little of both. The scripts are usually short;
- elaborate action protocols are usually contained in compiled code,
- rather than an interpreted macro script, to speed execution.</para>
-
- <para>Actions are defined by creating an XML file entitled
- <filename>actions.xml</filename> and placing it in the plugin JAR
- file.</para>
-
- <para>The <filename>actions.xml</filename> file from the
- <application>QuickNotepad</application> plugin looks as follows:</para>
-
- <informalexample>
- <programlisting><ACTIONS>
- <ACTION NAME="quicknotepad.choose-file">
- <CODE>
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).chooseFile();
- </CODE>
- </ACTION>
-
- <ACTION NAME="quicknotepad.save-file">
- <CODE>
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).saveFile();
- </CODE>
- </ACTION>
-
- <ACTION NAME="quicknotepad.copy-to-buffer">
- <CODE>
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).copyToBuffer();
- </CODE>
- </ACTION>
-</ACTIONS></programlisting>
- </informalexample>
-
- <para>This file defines three actions. They each use a built-in variable
- <literal>wm</literal>, which refers to the current view's <ulink
- url="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html">
- <classname>DockableWindowManager</classname></ulink>. Whenever you need
- to obtain a reference to the current dockable, or create a new one, this
- is the class to use. We use the method <filename>addDockable() followed
- by getDockable()</filename> to create if necessary, and then bring up
- the QuickNotepad plugin dockable. This will be docked or floating,
- depending on how it was last used.</para>
-
- <para>When an action is invoked, the BeanShell scripts address the
- plugin through static methods, or if instance data is needed, the
- current <ulink url="../api/org/gjt/sp/jedit/View.html">
- <classname>View</classname></ulink>, its <ulink
- url="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html">
- <classname>DockableWindowManager</classname></ulink>, and the plugin
- object return by the <filename>getDockable()</filename> method.</para>
-
- <para>If you are unfamiliar with BeanShell code, you may nevertheless
- notice that the code statements bear a strong resemblance to Java code,
- with one exception: the variable <varname>view</varname> is never
- assigned any value.</para>
-
- <para>For complete answers to this and other BeanShell mysteries, see
- <xref linkend="writing-macros-part" />; two observations will suffice
- here. First, the variable <varname>view</varname> is predefined by
- jEdit's implementation of BeanShell to refer to the current
- <classname>View</classname> object. Second, the BeanShell scripting
- language is based upon Java syntax, but allows variables to be typed at
- run time, so explicit types for variables need not be declared.</para>
-
- <para>A formal description of each element of the
- <filename>actions.xml</filename> file can be found in the documentation
- of the <ulink url="../api/org/gjt/sp/jedit/ActionSet.html">
- <classname>ActionSet</classname></ulink> class.</para>
- </section>
-
- <section id="plugin-implement-dockables">
- <title>The dockables.xml Window Catalog</title>
-
- <para>A Dockable is a window that can float like a dialog, or dock into
- jEdit's docking area. Each dockable needs a label (for display in menus,
- and on small buttons) and a title (for display in the floating window's
- title bar).</para>
-
- <para>The jEdit plugin API uses BeanShell to create the top-level
- visible container of a plugin's interface. The BeanShell code is
- contained in a file named <filename>dockables.xml</filename>. It usually
- is quite short, providing only a single BeanShell expression used to
- create a visible plugin window.</para>
-
- <para>The following example from the QuickNotepad plugin illustrates the
- requirements of the data file:</para>
-
- <informalexample>
- <programlisting><?xml version="1.0"?>
-
-<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
-
-<DOCKABLES>
- <DOCKABLE NAME="quicknotepad">
- new QuickNotepad(view, position);
- </DOCKABLE>
-</DOCKABLES></programlisting>
- </informalexample>
-
- <para>In this example, the <classname><DOCKABLE></classname>
- element has a single attribute, the dockable window's identifier. This
- attribute is used to key a property where the window title is stored;
- see <xref linkend="plugin-implement-properties" />.</para>
-
- <para>For each dockable, jedit defines an action with the same name.
- This means you do not need to define an explicit action to create your
- dockable - in fact, jEdit defines three actions: "toggle", "get" and
- "new floating instance" for each.</para>
-
- <para>The contents of the <classname><DOCKABLE></classname>
- element itself is a BeanShell expression that constructs a new
- <classname>QuickNotepad</classname> object. The <varname>view</varname>
- and <varname>position</varname> are predefined by the plugin API as the
- view in which the plugin window will reside, and the docking position of
- the plugin. You can use <varname>position</varname> to customize the
- layout of your plugin depending on whether it appears on the sides, or
- the top/bottom, or as a floating dockable.</para>
-
- <para>A formal description of each element of the
- <filename>dockables.xml</filename> file can be found in the
- documentation of the <ulink
- url="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html">
- <classname>DockableWindowManager</classname></ulink> class. This class
- also contains the public interface you should use for getting, showing,
- hiding, and other interactions with the plugin's top-level
- windows.</para>
- </section>
-
- <section id="plugin-implement-services">
- <title>The services.xml file</title>
-
- <para>A "service" is a mechanism by which one plugin can work with other
- plugins and avoid a bidirectional build-dependency. For example, the XML
- plugin "depends" on Sidekick, but in fact, it is SideKick which creates
- and operates on an object (a <literal>SideKickParser</literal>, in fact)
- defined in the XML plugin. In a way, the dependency is
- bidirectional.</para>
-
- <para>Similarly, the AntFarm plugin defines but does not instantiate a
- <literal>Shell</literal> object. It is the Console plugin which creates
- a specific shell for each available service. SideKick and Console use
- the ServiceManager to search for services offered by other
- plugins.</para>
-
- <para>Here is an example of a service from the XML plugin, which extends
- Sidekick:</para>
-
- <informalexample>
- <programlisting>
-<!DOCTYPE SERVICES SYSTEM "services.dtd">
-
-<SERVICES>
- <SERVICE CLASS="sidekick.SideKickParser" NAME="xml">
- new xml.parser.SAXParserImpl();
- </SERVICE>
-</SERVICES>
-</programlisting>
- </informalexample>
-
- <para>The object it returns tells Sidekick how it can parse files of a
- specific type. The API docs for SideKickParser indicate exactly which
- methods must be implemented in a plugin which offers this service. It
- should be enough information to let Sidekick, which has its own
- dockable, display the tree information in its own view.</para>
-
- <para>For more information about services, refer to the <ulink
- url="../api/org/gjt/sp/jedit/ServiceManager.html">ServiceManager</ulink>
- class API documentation. There, you can find out what the tags and
- attributes mean, as well as how to register and use services.</para>
- </section>
-
- <section id="plugin-implement-quicknotepad">
- <title>The QuickNotepad Class</title>
-
- <para>Here is where most of the features of the plugin will be
- implemented. To work with the dockable window API, the top level window
- will be a <classname>JPanel</classname>. The visible components reflect
- a simple layout. Inside the top-level panel we will place a scroll pane
- with a text area. Above the scroll pane we will place a panel containing
- a small tool bar and a label displaying the path of the current notepad
- file.</para>
-
- <para>We have identified three user actions that need implementation
- here: <function>chooseFile()</function>,
- <function>saveFile()</function>, and
- <function>copyToBuffer()</function>. As noted earlier, we also want the
- text area to change its appearance in immediate response to a change in
- user options settings. In order to do that, the window class must
- respond to a <classname>PropertiesChanged</classname> message from the
- EditBus.</para>
-
- <!-- <para>
- We could have the plugin core class receive and delegate
- <classname>PropertiesChanged</classname> messages to the window class.
- However, this would require the plugin core class to hold a reference
- to either the plugin window class or the visible window class and to
- update that reference when the user activates or deactivates the
- plugin. It is simpler to have the plugin window class subscribe to the
- EditBus directly; many plugins take this approach. This means that
- <classname>QuickNotepad</classname> must implement the
- <classname>EBComponent</classname> interface.
-</para> -->
-
- <para>Unlike the <classname>EBPlugin</classname> class, the
- <classname>EBComponent</classname> interface does not deal with the
- component's actual subscribing and unsubscribing to the EditBus. To
- accomplish this, we use a pair of methods inherited from the Java
- platform's <classname>JComponent</classname> class that are called when
- the window is made visible, and when it is hidden. These two methods,
- <function>addNotify()</function> and
- <function>removeNotify()</function>, are overridden to add and remove
- the visible window from the list of EditBus subscribers.</para>
-
- <para>We will provide for two minor features when the notepad is
- displayed in the floating window. First, when a floating plugin window
- is created, we will give the notepad text area input focus. Second, when
- the notepad if floating and has input focus, we will have the
- <keycap>Escape</keycap> key dismiss the notepad window. An
- <classname>AncestorListener</classname> and a
- <classname>KeyListener</classname> will implement these details.</para>
-
- <para>Here is the listing for the data members, the constructor, and the
- implementation of the <classname>EBComponent</classname>
- interface:</para>
-
- <informalexample>
- <programlisting>public class QuickNotepad extends JPanel
- implements EBComponent
-{
- private String filename;
- private String defaultFilename;
- private View view;
- private boolean floating;
-
- private QuickNotepadTextArea textArea;
- private QuickNotepadToolPanel toolPanel;
-
- //
- // Constructor
- //
-
- public QuickNotepad(View view, String position)
- {
- super(new BorderLayout());
-
- this.view = view;
- this.floating = position.equals(
- DockableWindowManager.FLOATING);
-
- this.filename = jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX
- + "filepath");
- if(this.filename == null || this.filename.length() == 0)
- {
- this.filename = new String(jEdit.getSettingsDirectory()
- + File.separator + "qn.txt");
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "filepath",this.filename);
- }
- this.defaultFilename = new String(this.filename);
-
- this.toolPanel = new QuickNotepadToolPanel(this);
- add(BorderLayout.NORTH, this.toolPanel);
-
- if(floating)
- this.setPreferredSize(new Dimension(500, 250));
-
- textArea = new QuickNotepadTextArea();
- textArea.setFont(QuickNotepadOptionPane.makeFont());
- textArea.addKeyListener(new KeyHandler());
- textArea.addAncestorListener(new AncestorHandler());
- JScrollPane pane = new JScrollPane(textArea);
- add(BorderLayout.CENTER, pane);
-
- readFile();
- }
-
- //
- // Attribute methods
- //
-
- // for toolBar display
- public String getFilename()
- {
- return filename;
- }
-
- //
- // EBComponent implementation
- //
-
- public void handleMessage(EBMessage message)
- {
- if (message instanceof PropertiesChanged)
- {
- propertiesChanged();
- }
- }
-
-
- private void propertiesChanged()
- {
- String propertyFilename = jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "filepath");
- if(!defaultFilename.equals(propertyFilename))
- {
- saveFile();
- toolPanel.propertiesChanged();
- defaultFilename = propertyFilename.clone();
- filename = defaultFilename.clone();
- readFile();
- }
- Font newFont = QuickNotepadOptionPane.makeFont();
- if(!newFont.equals(textArea.getFont()))
- {
- textArea.setFont(newFont);
- textArea.invalidate();
- }
- }
-
- // These JComponent methods provide the appropriate points
- // to subscribe and unsubscribe this object to the EditBus
-
- public void addNotify()
- {
- super.addNotify();
- EditBus.addToBus(this);
- }
-
-
- public void removeNotify()
- {
- saveFile();
- super.removeNotify();
- EditBus.removeFromBus(this);
- }
-
- ...
-
-}</programlisting>
- </informalexample>
-
- <para>This listing refers to a
- <classname>QuickNotebookTextArea</classname> object. It is currently
- implemented as a <classname>JTextArea</classname> with word wrap and tab
- sizes hard-coded. Placing the object in a separate class will simply
- future modifications.</para>
- </section>
-
- <section id="plugin-implement-quicknotepadtoolbar">
- <title>The QuickNotepadToolBar Class</title>
-
- <para>There is nothing remarkable about the toolbar panel that is placed
- inside the <classname>QuickNotepad</classname> object. The constructor
- shows the continued use of items from the plugin's properties
- file.</para>
-
- <informalexample>
- <programlisting>public class QuickNotepadToolPanel extends JPanel
-{
- private QuickNotepad pad;
- private JLabel label;
-
- public QuickNotepadToolPanel(QuickNotepad qnpad)
- {
- pad = qnpad;
- JToolBar toolBar = new JToolBar();
- toolBar.setFloatable(false);
-
- toolBar.add(makeCustomButton("quicknotepad.choose-file",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.chooseFile();
- }
- }));
- toolBar.add(makeCustomButton("quicknotepad.save-file",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.saveFile();
- }
- }));
- toolBar.add(makeCustomButton("quicknotepad.copy-to-buffer",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.copyToBuffer();
- }
- }));
- label = new JLabel(pad.getFilename(),
- SwingConstants.RIGHT);
- label.setForeground(Color.black);
- label.setVisible(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX
- + "show-filepath").equals("true"));
- this.setLayout(new BorderLayout(10, 0));
- this.add(BorderLayout.WEST, toolBar);
- this.add(BorderLayout.CENTER, label);
- this.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 10));
- }
-
- ...
-
-}</programlisting>
- </informalexample>
-
- <para>The method <classname>makeCustomButton()</classname> provides
- uniform attributes for the three toolbar buttons corresponding to three
- of the plugin's use actions. The menu titles for the user actions serve
- double duty as tooltip text for the buttons. There is also a
- <function>propertiesChanged()</function> method for the toolbar that
- sets the text and visibility of the label containing the notepad file
- path.</para>
- </section>
-
- <section id="plugin-implement-options">
- <title>The QuickNotepadOptionPane Class</title>
-
- <para>Using the default implementation provided by
- <classname>AbstractOptionPane</classname> reduces the preparation of an
- option pane to two principal tasks: writing a
- <function>_init()</function> method to layout and initialize the pane,
- and writing a <function>_save()</function> method to commit any settings
- changed by user input. If a button on the option pane should trigger
- another dialog, such as a <classname>JFileChooser</classname> or jEdit's
- own enhanced <classname>VFSFileChooserDialog</classname>, the option
- pane will also have to implement the
- <classname>ActionListener</classname> interface to display additional
- components.</para>
-
- <para>The QuickNotepad plugin has only three options to set: the path
- name of the file that will store the notepad text, the visibility of the
- path name on the tool bar, and the notepad's display font. Using the
- shortcut methods of the plugin API, the implementation of
- <function>_init()</function> looks like this:</para>
-
- <informalexample>
- <programlisting>public class QuickNotepadOptionPane extends AbstractOptionPane
- implements ActionListener
-{
- private JTextField pathName;
- private JButton pickPath;
- private FontSelector font;
-
- ...
-
- public void _init()
- {
- showPath = new JCheckBox(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX
- + "show-filepath.title"),
- jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath")
- .equals("true"));
- addComponent(showPath);
-
- pathName = new JTextField(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX
- + "filepath"));
- JButton pickPath = new JButton(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX
- + "choose-file"));
- pickPath.addActionListener(this);
-
- JPanel pathPanel = new JPanel(new BorderLayout(0, 0));
- pathPanel.add(pathName, BorderLayout.CENTER);
- pathPanel.add(pickPath, BorderLayout.EAST);
-
- addComponent(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "file"),
- pathPanel);
-
- font = new FontSelector(makeFont());
- addComponent(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "choose-font"),
- font);
- }
-
- ...
-
-}</programlisting>
- </informalexample>
-
- <para>Here we adopt the vertical arrangement offered by use of the
- <function>addComponent()</function> method with one embellishment. We
- want the first <quote>row</quote> of the option pane to contain a text
- field with the current notepad file path and a button that will trigger
- a file chooser dialog when pressed. To place both of them on the same
- line (along with an identifying label for the file option), we create a
- <classname>JPanel</classname> to contain both components and pass the
- configured panel to <function>addComponent()</function>.</para>
-
- <para>The <function>_init()</function> method uses properties from the
- plugin's property file to provide the names of label for the components
- placed in the option pane. It also uses a property whose name begins
- with <function>PROPERTY_PREFIX</function> as a persistent data item -
- the path of the current notepad file. The elements of the notepad's font
- are also extracted from properties using a static method of the option
- pane class.</para>
-
- <para>The <function>_save()</function> method extracts data from the
- user input components and assigns them to the plugin's properties. The
- implementation is straightforward:</para>
-
- <informalexample>
- <programlisting>public void _save()
-{
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "filepath", pathName.getText());
- Font _font = font.getFont();
-
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "font", _font.getFamily());
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "fontsize", String.valueOf(_font.getSize()));
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "fontstyle", String.valueOf(_font.getStyle()));
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "show-filepath", String.valueOf(showPath.isSelected()));
-}</programlisting>
- </informalexample>
-
- <para>The class has only two other methods, one to display a file
- chooser dialog in response to user action, and the other to construct a
- <classname>Font</classname> object from the plugin's font properties.
- They do not require discussion here.</para>
- </section>
-
- <section id="plugin-implement-docs">
- <title>Plugin Documentation</title>
-
- <para>While not required by the plugin API, a help file is an essential
- element of any plugin written for public release. A single web page is
- often all that is required. There are no specific requirements on
- layout, but because of the design of jEdit's help viewer, the use of
- frames should be avoided. Topics that would be useful include the
- following:</para>
-
- <itemizedlist>
- <listitem>
- <para>a description of the purpose of the plugin;</para>
- </listitem>
-
- <listitem>
- <para>an explanation of the type of input the user can supply
- through its visible interface (such as mouse action or text
- entry in controls);</para>
- </listitem>
-
- <listitem>
- <para>a listing of available user actions that can be taken when
- the plugin does not have input focus;</para>
- </listitem>
-
- <listitem>
- <para>a summary of configuration options;</para>
- </listitem>
-
- <listitem>
- <para>information on development of the plugin (such as a change
- log, a list of <quote>to do</quote> items, and contact
- information for the plugin's author); and</para>
- </listitem>
-
- <listitem>
- <para>licensing information, including acknowledgments for any
- library software used by the plugin.</para>
- </listitem>
- </itemizedlist>
-
- <para>The location of the plugin's help file is stored in the
- <literal>plugin.QuickNotepad.docs</literal> property; see <xref
- linkend="plugin-implement-properties" />.</para>
- </section>
-
- <section id="plugin-implement-building">
- <title>The build.xml Ant build file</title>
-
- <para>We have already outlined the contents of the user action catalog,
- the properties file and the documentation file in our earlier
- discussion. The final step is to compile the source file and build the
- archive file that will hold the class files and the plugin's other
- resources.</para>
-
- <para>Publicly released plugins include with their source a makefile in
- XML format for the <application>Ant</application> utility. The format
- for this file requires few changes from plugin to plugin. Here is a
- version of <filename>build.xml</filename> that could be used by
- QuickNotepad:</para>
-
- <informalexample>
- <programlisting>
-<project name="QuickNotepad"
- default="build">
- <description>
- This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
- </description>
- <property name="user-doc.xml"
- value="users-guide.xml" />
- <property file="build.properties" />
- <property file="../build.properties" />
- <property name="build.support"
- value="../../../build-support" />
- <import file="${build.support}/plugin-build.xml" />
-</project>
-</programlisting>
- </informalexample>
-
- <para>This build file imports another modular build file,
- <literal>plugin-build.xml</literal> from the <literal>build-support</literal>
- project. It is available as a package you can check out from subversion, or found online in the <ulink
- url="https://jedit.svn.sourceforge.net/svnroot/jedit/build-support/trunk/">jEdit's
- SVN repository</ulink>. It contains the common build steps used to build the core jEdit plugins, and some example <literal>build.properties.sample</literal> files which you can adapt for use with your development environment.</para>
-
-
- <para>Customizing this build file for a different plugin will likely
- only require three changes to build.xml file:</para>
-
- <itemizedlist>
- <listitem>
- <para>the name of the project</para>
- </listitem>
-
- <listitem>
- <para>the dependencies of the plugin</para>
- </listitem>
-
- <listitem>
- <para>The extra files that need to be copied into the
- jar.</para>
- </listitem>
- </itemizedlist>
-
- <para>Because this build file and the one of most plugins import a
- <literal>build.properties</literal> file from the current and the parent
- directories, it is possible to build most of jEdit's plugins in a
- uniform way by setting the common properties in a single
- <literal>build.properties</literal> file, placed in the plugin source's
- parent directory. </para>
-
- <tip> <para>For a full discussion of the <filename>Ant</filename> file
- format and command syntax, you should consult the <ulink
- url="http://jakarta.apache.org/ant/manual/index.html">Ant
- documentation</ulink>, also available through jEdit's help system if you
- installed the Ant Plugin. When editing Ant build files, the XML plugin
- gives you completion tips for both elements <emphasis>and</emphasis>
- attributes. The Console plugin provides you with an ANT button which you
- can bind to keyboard actions. In addition, there are the AntFarm and
- Antelope plugins which also proivde you with alternate means to execute
- Ant targets through the Console.</para> </tip> </section>
-
- <section id="plugin-implement-reloading">
- <title>Reloading the Plugin</title>
-
- <para>Once you have compiled your plugin, you will need to test its
- behavior when it is reloaded. Follow these steps to reload your plugin
- without restarting jEdit:</para>
-
- <itemizedlist>
- <listitem>
- <para>From the Plugins menu open the Plugin Manager.</para>
- </listitem>
-
- <listitem>
- <para>On the Manage tab uncheck Hide libraries. This will allow
- you to see plugins that are not loaded.</para>
- </listitem>
-
- <listitem>
- <para>Find the plugin on the Manage tab and uncheck it. This
- will unload the plugin. You will get a warning if this plugin
- does not support dynamic reloading. If you get that warning you
- will need to restart jEdit to reload the plugin until the plugin
- is converted over to the 4.2 API.</para>
- </listitem>
-
- <listitem>
- <para>Recheck the plugin to reload it.</para>
- </listitem>
- </itemizedlist>
-
- <tip>
- <para>The Activator plugin provides a very convenient (dockable) way
- to test the activating and reloading behavior of your plugin. Be
- sure to test your plugin's reloading behavior with both the
- Activator and the Reloader tabs.</para>
- </tip>
-
- <para>If you have reached this point in the text, you are probably
- serious about writing a plugin for jEdit. Good luck with your efforts,
- and thank you for contributing to the jEdit project.</para>
- </section>
-
- <section id="plugin-debugging" >
- <title> Tips for debugging plugins </title>
- <bridgehead> BeanShell </bridgehead>
- <para> jEdit includes a Beanshell interface into its currently running JVM at all times. You can access it a variety of ways, but one way is from <literal>Plugins - Console - Shells - BeanShell</literal>. From here, you can interactively inspect the values of any object in memory, call any of its member functions, or create new instances of any class that is currently loaded by jEdit or any of its plugins. All this, without setting any breakpoints!
- </para>
- <para> If you're too lazy to type each Beanshell statement interactively, you can also create debugging code snippets as macros and invoke them from <literal>utilities - beanshell - evaluate selection</literal>, or <literal>Macros - Misc - Evaluate Buffer in Beanshell</literal>, or place the file in your own macros directory and bind it to its own keyboard shortcut. </para>
- <bridgehead> Other useful tips </bridgehead>
- <para> This section is new but will be expanded shortly. Please post suggestions to the <literal>jedit-devel</literal> mailing list. </para>
- </section>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="plugin-implement">
+ <!-- jEdit buffer-local properties: -->
+ <!-- :xml.root=users-guide.xml: -->
+ <!-- :maxLineLen=80:wrap=soft: -->
+ <title>Implementing a Simple Plugin</title>
+ <!-- jEdit 4 Plugin Guide, (C) 2001, 2002 John Gellene -->
+ <!-- jEdit 4.3 Plugin Guide, (C) 2005, 20010 Alan Ezust -->
+
+ <para>There are many applications for the leading operating systems that
+ provide a <quote>scratch-pad</quote> or <quote>sticky note</quote> facility
+ for the desktop display. A similar type of facility operating within the
+ jEdit display would be a convenience. The use of dockable windows would
+ allow the notepad to be displayed or hidden with a single mouse click or
+ keypress (if a keyboard shortcut were defined). The contents of the notepad
+ could be saved at program exit (or, if earlier, deactivation of the plugin)
+ and retrieved at program startup or plugin activation.</para>
+
+ <para>We will keep the capabilities of this plugin modest, but a few other
+ features would be worthwhile. The user should be able to write the contents
+ of the notepad to storage on demand. It should also be possible to choose
+ the name and location of the file that will be used to hold the notepad
+ text. This would allow the user to load other files into the notepad
+ display. The path of the notepad file should be displayed in the plugin
+ window, but will give the user the option to hide the file name. Finally,
+ there should be an action by which a single click or keypress would cause
+ the contents of the notepad to be written to the new text buffer for further
+ processing.</para>
+
+ <para>The full source code for QuickNotepad is contained in jEdit's source
+ code distribution. We will provide excerpts in this discussion where it is
+ helpful to illustrate specific points. You are invited to obtain the source
+ code for further study or to use as a starting point for your own
+ plugin.</para>
+
+ <section id="plugin-load">
+ <title><indexterm>
+ <primary>Plugin API</primary>
+
+ <secondary>loading at startup</secondary>
+ </indexterm> How Plugins are Loaded</title>
+
+ <para>We will discuss the implementation of the
+ <application>QuickNotepad</application> plugin, along with the jEdit
+ APIs it makes use of. But first, we describe how plugins are
+ loaded.</para>
+
+ <para>As part of its startup routine, jEdit's <function>main</function>
+ method calls various methods to load and initialize plugins.</para>
+
+ <para>Additionally, plugins using the jEdit 4.2 plugin API can be loaded
+ and unloaded at any time. This is a great help when developing your own
+ plugins -- there is no need to restart the editor after making changes
+ (see <xref linkend="plugin-implement-reloading" /> ).</para>
+
+ <para>Plugins are loaded from files with the <filename>.jar</filename>
+ filename extension located in the <filename>jars</filename>
+ subdirectories of the jEdit installation and user settings directories
+ (see <xref linkend="settings-directory" />).</para>
+
+ <para>For each JAR archive file it finds, jEdit scans its entries and
+ performs the following tasks:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Adds to a collection maintained by jEdit a new object of
+ type <ulink url="../api/org/gjt/sp/jedit/PluginJAR.html">
+ <classname>PluginJAR</classname></ulink>. This is a data
+ structure holding the name of the JAR archive file, a reference
+ to the <ulink url="../api/org/gjt/sp/jedit/JARClassLoader.html">
+ <classname>JARClassLoader</classname></ulink>, and a collection
+ of plugins found in the archive file.</para>
+ </listitem>
+
+ <listitem>
+ <para>Loads any properties defined in files ending with the
+ extension <filename>.props</filename> that are contained in the
+ archive. See <xref
+ linkend="plugin-implement-properties" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>Reads action definitions from any file named
+ <filename>actions.xml</filename> in the archive (the file need
+ not be at the top level). See <xref
+ linkend="plugin-implement-actions" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>Parses and loads the contents of any file named
+ <filename>dockables.xml</filename> in the archive (the file need
+ not be at the top level). This file contains BeanShell code for
+ creating docking or floating windows that will contain the
+ visible components of the plugin. Not all plugins define
+ dockable windows, but those that do need a
+ <filename>dockables.xml</filename> file. See <xref
+ linkend="plugin-implement-dockables" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>Checks for a class name with a name ending with
+ <filename>Plugin.class</filename>.</para>
+
+ <para>Such a class is known as a <firstterm>plugin core
+ class</firstterm> and must extend jEdit's abstract <ulink
+ url="../api/org/gjt/sp/jedit/EditPlugin.html">
+ <classname>EditPlugin</classname></ulink> class.</para>
+
+ <para>The initialization routine checks the plugin's properties
+ to see if it is subject to any dependencies. For example, a
+ plugin may require that the version of the Java runtime
+ environment or of jEdit itself be equal to or above some
+ threshold version. A plugin can also require the presence of
+ another plugin.</para>
+
+ <para>If any dependency is not satisfied, the loader marks the
+ plugin as <quote>broken</quote> and logs an error
+ message.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>After scanning the plugin JAR file and loading any resources, a
+ new instance of the plugin core class is created and added to the
+ collection maintained by the appropriate <ulink
+ url="../api/org/gjt/sp/jedit/PluginJAR.html">
+ <classname>PluginJAR</classname></ulink>. jEdit then calls the
+ <function>start()</function> method of the plugin core class. The
+ <function>start()</function> method can perform initialization of the
+ object's data members. Because this method is defined as an empty
+ <quote>no-op</quote> in the <ulink
+ url="../api/org/gjt/sp/jedit/EditPlugin.html">
+ <classname>EditPlugin</classname></ulink> abstract class, a plugin need
+ not provide an implementation if no unique initialization is
+ required.</para>
+
+ <sidebar>
+ <title>Updating 4.1 plugins</title>
+
+ <para>Note that while jEdit 4.1 plugins were only loaded on startup,
+ jEdit 4.2 plugins can be loaded at any time. As a result, the
+ <function>start()</function> method needs to cope with being called
+ at any time, and <function>stop()</function> needs to fully clean up
+ after the plugin.</para>
+ </sidebar>
+ </section>
+
+ <section id="plugin-implement-quicknotepadplugin">
+ <title>The QuickNotepadPlugin Class</title>
+
+ <para>The major issues encountered when writing a plugin core class
+ arise from the developer's decisions on what features the plugin will
+ make available. These issues have implications for other plugin elements
+ as well.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Will the plugin provide for actions that the user can
+ trigger using jEdit's menu items, toolbar buttons and keyboard
+ shortcuts?</para>
+ </listitem>
+
+ <listitem>
+ <para>Will the plugin have its own visible interface?</para>
+ </listitem>
+
+ <listitem>
+ <para>Will the plugin have settings that the user can
+ configure?</para>
+ </listitem>
+
+ <listitem>
+ <para>Will the plugin respond to any messages reflecting changes
+ in the host application's state?</para>
+ </listitem>
+
+ <listitem>
+ <para>Should the plugin do something special when it gets
+ focus?</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Recall that the plugin core class must extend <ulink
+ url="../api/org/gjt/sp/jedit/EditPlugin.html">
+ <classname>EditPlugin</classname></ulink>. In QuickNotepad's plugin core
+ class, there are no special initialization or shutdown chores to
+ perform, so we will not need a <function>start()</function> or
+ <function>stop()</function> method.</para>
+
+ <para>The resulting plugin core class is lightweight and straightforward
+ to implement:</para>
+
+ <itemizedlist>
+ <listitem>
+ <informalexample>
+ <programlisting>public class QuickNotepadPlugin extends EditPlugin {
+ public static final String NAME = "quicknotepad";
+ public static final String OPTION_PREFIX = "options.quicknotepad.";
+}
+</programlisting>
+ </informalexample>
+
+ <para>The class has been simplified since 4.1, and all we
+ defined here were a couple of <classname>String</classname> data
+ members to enforce consistent syntax for the name of properties
+ we will use throughout the plugin.</para>
+ </listitem>
+
+ <listitem>
+ <para>These names are used in <filename>actions.xml</filename>
+ for each of the menu choices. This file is discussed in more
+ detail in <xref linkend="plugin-implement-actions" />. Each
+ action is a beanshell script.</para>
+
+ <informalexample>
+ <programlisting>
+<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
+<ACTIONS>
+ <ACTION NAME="quicknotepad.choose-file">
+ <CODE>
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).chooseFile();
+ </CODE>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad.save-file">
+ <CODE>
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).saveFile();
+ </CODE>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad.copy-to-buffer">
+ <CODE>
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).copyToBuffer();
+ </CODE>
+ </ACTION>
+</ACTIONS>
+</programlisting>
+ </informalexample>
+ </listitem>
+
+ <listitem>
+ <para>The names also come up in the properties file,
+ <filename>QuickNotePad.props</filename> file. The properties
+ define option panes and strings used by the plugin. It is
+ explained in more detail in <xref
+ linkend="plugin-implement-properties" /> and the <ulink
+ url="../api/org/gjt/sp/jedit/EditPlugin.html">
+ <classname>EditPlugin</classname></ulink> API docs.</para>
+
+ <informalexample>
+ <programlisting>
+# jEdit only needs to load the plugin the first time the user accesses it
+# the presence of this property also tells jEdit the plugin is using the new API
+plugin.QuickNotepadPlugin.activate=defer
+
+# These two properties are required for all plugins
+plugin.QuickNotepadPlugin.name=QuickNotepad
+plugin.QuickNotepadPlugin.author=John Gellene
+
+# version number == jEdit version number
+plugin.QuickNotepadPlugin.version=4.3
+
+# online help
+plugin.QuickNotepadPlugin.docs=index.html
+
+# we only have one dependency, jEdit 4.2final, since we use the new plugin API
+plugin.QuickNotepadPlugin.depend.0=jedit 04.02.99.00
+
+# plugin menu
+plugin.QuickNotepadPlugin.menu=quicknotepad \
+ - \
+ quicknotepad.choose-file \
+ quicknotepad.save-file \
+ quicknotepad.copy-to-buffer
+
+# action labels for actions supplied by dockables.xml
+quicknotepad.label=QuickNotepad
+
+# action labels for actions supplied by actions.xml
+quicknotepad.choose-file.label=Choose notepad file
+quicknotepad.save-file.label=Save notepad file
+quicknotepad.copy-to-buffer.label=Copy notepad to buffer
+
+# plugin option pane
+plugin.QuickNotepadPlugin.option-pane=quicknotepad
+
+# Option pane activation BeanShell snippet
+options.quicknotepad.code=new QuickNotepadOptionPane();
+
+# Option pane labels
+options.quicknotepad.label=QuickNotepad
+options.quicknotepad.file=File:
+options.quicknotepad.choose-file=Choose
+options.quicknotepad.choose-file.title=Choose a notepad file
+options.quicknotepad.choose-font=Font:
+options.quicknotepad.show-filepath.title=Display notepad file path
+
+# window title
+quicknotepad.title=QuickNotepad
+
+# window toolbar buttons
+quicknotepad.choose-file.icon=Open.png
+quicknotepad.save-file.icon=Save.png
+quicknotepad.copy-to-buffer.icon=CopyToBuffer.png
+
+# default settings
+options.quicknotepad.show-filepath=true
+options.quicknotepad.font=Monospaced
+options.quicknotepad.fontstyle=0
+options.quicknotepad.fontsize=14
+
+# Setting not defined but supplied for completeness
+options.quicknotepad.filepath=
+</programlisting>
+ </informalexample>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="plugin-implement-properties">
+ <title>The Property File</title>
+
+ <para>jEdit maintains a list of <quote>properties</quote>, which are
+ name/value pairs used to store human-readable strings, user settings,
+ and various other forms of meta-data. During startup, jEdit loads the
+ default set of properties, followed by plugin properties stored in
+ plugin JAR files, finally followed by user properties.</para>
+
+ <para>Some properties are used by the plugin API itself. Others are
+ accessed by the plugin using methods in the <ulink
+ url="../api/org/gjt/sp/jedit/jEdit.html">
+ <classname>jEdit</classname></ulink> class. Others are accessed by the
+ scripts used by plugin packagers <footnote>
+ <para>See the <guimenuitem>Macros/Properties/Create Plugin
+ Announcement</guimenuitem> macro for an example.</para>
+ </footnote>.</para>
+
+ <para>Property files contained in plugin JARs must end with the filename
+ extension <filename>.props</filename>, and have a very simple syntax,
+ which the following example illustrates:</para>
+
+ <informalexample>
+ <programlisting># Lines starting with '#' are ignored.
+name=value
+another.name=another value
+long.property=Long property value, split over \
+ several lines
+escape.property=Newlines and tabs can be inserted \
+ using the \t and \n escapes
+backslash.property=A backslash can be inserted by writing \\.</programlisting>
+ </informalexample>
+
+ <para>Now we look at a fragment from the
+ <filename>QuickNotepad.props</filename> file <footnote>
+ <para>Examine the actual file for a more complete example</para>
+ </footnote> which contains properties for the QuickNotepad plugin.
+ The first type of property data is information about the plugin itself;
+ these are the only properties that must be specified in order for the
+ plugin to load:</para>
+
+ <informalexample>
+ <programlisting># general plugin information
+plugin.QuickNotepadPlugin.activate=defer
+plugin.QuickNotepadPlugin.name=QuickNotepad
+plugin.QuickNotepadPlugin.author=John Gellene
+plugin.QuickNotepadPlugin.version=4.03
+plugin.QuickNotepadPlugin.docs=QuickNotepad.html
+# depends on jedit 4.2final
+plugin.QuickNotepadPlugin.depend.0=jedit 04.02.99.00
+plugin.QuickNotepadPlugin.description=A demo jEdit plugin that provides a notepad dockable.
+plugin.QuickNotepadPlugin.longdescription=description.html
+</programlisting>
+ </informalexample>
+
+ <para>These properties are each described in detail in the documentation
+ for the <ulink url="../api/org/gjt/sp/jedit/EditPlugin.html">
+ <classname>EditPlugin</classname></ulink> class and do not require
+ further discussion here.</para>
+
+ <para>Next in the file comes a property that sets the title of the
+ plugin's dockable window. Dockable windows are discussed in detail in
+ <xref linkend="plugin-implement-dockables" />.</para>
+
+ <informalexample>
+ <programlisting># dockable window name
+quicknotepad.title=QuickNotepad</programlisting>
+ </informalexample>
+
+ <para>Next, we see menu item labels for the plugin's actions. All of
+ these but the first are defined in <literal>actions.xml</literal> file,
+ and that is because the dockable itself has its own actions. Actions are
+ discussed further in <xref linkend="plugin-implement-actions" />.</para>
+
+ <informalexample>
+ <programlisting># action labels
+# Dockable label
+quicknotepad.label=QuickNotepad
+# Additional strings extracted from the plugin java source
+quicknotepad.choose-file.label=Choose notepad file
+quicknotepad.save-file.label=Save notepad file
+quicknotepad.copy-to-buffer.label=Copy notepad to buffer
+</programlisting>
+ </informalexample>
+
+ <para>Next, the plugin's menu is defined. See <xref
+ linkend="plugin-implement-quicknotepadplugin" />.</para>
+
+ <informalexample>
+ <programlisting># application menu items
+quicknotepad.menu.label=QuickNotepad
+quicknotepad.menu=quicknotepad - quicknotepad.choose-file \
+ quicknotepad.save-file quicknotepad.copy-to-buffer</programlisting>
+ </informalexample>
+
+ <para>We have created a small toolbar as a component of QuickNotepad, so
+ file names for the button icons follow:</para>
+
+ <informalexample>
+ <programlisting># plugin toolbar buttons
+quicknotepad.choose-file.icon=Open.png
+quicknotepad.save-file.icon=Save.png
+quicknotepad.copy-to-buffer.icon=Edit.png</programlisting>
+ </informalexample>
+
+ <para>The menu item labels corresponding to these icons will also serve
+ as tooltip text.</para>
+
+ <para>Finally, the properties file set forth the labels and settings
+ used by the option pane:</para>
+
+ <informalexample>
+ <programlisting># Option pane labels
+options.quicknotepad.label=QuickNotepad
+options.quicknotepad.file=File:
+options.quicknotepad.choose-file=Choose
+options.quicknotepad.choose-file.title=Choose a notepad file
+options.quicknotepad.choose-font=Font:
+options.quicknotepad.show-filepath.title=Display notepad file path
+
+# Initial default font settings
+options.quicknotepad.show-filepath=true
+options.quicknotepad.font=Monospaced
+options.quicknotepad.fontstyle=0
+options.quicknotepad.fontsize=14
+
+# Setting not defined but supplied for completeness
+options.quicknotepad.filepath=</programlisting>
+ </informalexample>
+
+ <tip>
+ <title>PropertySideKick</title>
+
+ <para>There is a SideKick for Property files, provided in the
+ JavaSideKick plugin. This gives you a compact and sorted tree view
+ of property files.</para>
+ </tip>
+
+ <sidebar>
+ <title>Updating 4.1 plugins</title>
+
+ <para>jEdit 4.2 plugins are distinguished from jEdit 4.1 plugins by
+ the presence of the
+ <literal>plugin.<replaceable>name</replaceable>.activate</literal>
+ property. If this property is set, the plugin is treated like a
+ jEdit 4.2 plugin. Usually, this property should be set to
+ <literal>defer</literal>. See the API documentation for the <ulink
+ url="../api/org/gjt/sp/jedit/EditPlugin.html">
+ <classname>EditPlugin</classname></ulink> class for details. jEdit
+ 4.1 plugins which have not been updated to use the 4.2 API will not
+ be supported in jEdit 4.3.</para>
+ </sidebar>
+ </section>
+
+ <section id="plugin-implement-editbus">
+ <title>The EditBus</title>
+
+ <para>jEdit (and some plugins) generate several kinds of messages to
+ alert plugins and other components of jedit-specific events. The message
+ classes, all derived from <ulink
+ url="../api/org/gjt/sp/jedit/EBMessage.html">
+ <classname>EBMessage</classname></ulink> cover the opening and closing
+ of the application, changes in the status of buffers and views, changes
+ in user settings, as well as changes in the state of other program
+ features. A full list of messages can be found in the <ulink
+ url="../api/org/gjt/sp/jedit/msg/package-summary.html">org.gjt.sp.jedit.msg</ulink>
+ package.</para>
+
+
+
+ <para>For example, the ViewUpdate messages are all related to the jEdit
+ View, or the top-level window. If the user creates multiple Views, a
+ plugin may need to know when they are created or destroyed, so it would
+ monitor ViewUpdate messages.</para>
+
+ <para>BufferUpdate messages are all related to jEdit buffers. They let
+ plugins know when a buffer has become dirty, when it is about to be
+ closed, after it is closed, created, loaded, or saved. Each of these
+ messages are described in further detail in the API docs.</para>
+
+ <para>As another example, The Navigator plugin monitors a newly added
+ (to jEdit 4.3) EBMessage of the kind <ulink
+ url="../api/org/gjt/sp/jedit/BufferChanging.html">BufferChanging</ulink>.
+ The BufferChanging event provides Navigator enough advance notice to
+ save the TextArea's caret just before the current EditPane changes its
+ active Buffer. The <literal>BufferChanged</literal> event, another
+ <literal>EditPaneUpdate</literal> message, is thrown shortly afterward.
+ This is not used by Navigator, but it is used by SideKick to determine
+ when it is time to reparse the buffer.</para>
+
+ <para>Plugins register <ulink
+ url="../api/org/gjt/sp/jedit/EBComponent.html">
+ <function>EBComponent</function></ulink> instances with the <ulink
+ url="../api/org/gjt/sp/jedit/EditBus.html">
+ <classname>EditBus</classname></ulink> to receive messages reflecting
+ changes in jEdit's state.</para>
+
+ <para><ulink url="../api/org/gjt/sp/jedit/EBComponent.html">
+ <function>EBComponent</function></ulink>s are added and removed with the
+ <ulink
+ url="../api/org/gjt/sp/jedit/EditBus.html#addToBus(org.gjt.sp.jedit.EBComponent)">
+ <function>EditBus.addToBus()</function></ulink> and <ulink
+ url="../api/org/gjt/sp/jedit/EditBus.html#removeFromBus(org.gjt.sp.jedit.EBComponent)">
+ <function>EditBus.removeFromBus()</function></ulink> methods.</para>
+
+ <para>Typically, the <ulink
+ url="../api/org/gjt/sp/jedit/EBComponent.html#handleMessage(org.gjt.sp.jedit.EBMessage)">
+ <function>EBComponent.handleMessage()</function></ulink> method is
+ implemented with one or more <function>if</function> blocks that test
+ whether the message is an instance of a derived message class in which
+ the component has an interest.</para>
+
+ <programlisting>if(msg instanceof BufferUpdate) {
+ // a buffer's state has changed!
+}
+else if(msg instanceof ViewUpdate) {
+ // a view's state has changed!
+}
+// ... and so on</programlisting>
+
+ <para>If a plugin core class will respond to EditBus messages, it can be
+ derived from <ulink url="../api/org/gjt/sp/jedit/EBPlugin.html">
+ <classname>EBPlugin</classname></ulink>, in which case no explicit
+ <function>addToBus()</function> call is necessary. Otherwise, <ulink
+ url="../api/org/gjt/sp/jedit/EditPlugin.html">
+ <classname>EditPlugin</classname></ulink> will suffice as a plugin base
+ class. Note that QuickNotepad uses the latter.</para>
+
+ <tip>
+ <title>Using the Activity Log to see the EditBus</title>
+
+ <para> To determine precisely which EditBus messages are being sent by
+ jEdit or the plugins, start up jEdit with an additional argument,
+ <literal>-log=5</literal>. You can set an even lower log level to see
+ further details (the default is 7). With a log level of 5 or lower, the
+ Activity Log will include [notice]s, which will show us exactly which
+ EditBus message is sent and when. See <xref linkend="activity-log" />
+ for more details. </para> </tip>
+
+ </section>
+
+ <section id="plugin-implement-actions">
+ <title>The Actions Catalog</title>
+
+ <para>Actions define procedures that can be bound to a menu item, a
+ toolbar button or a keyboard shortcut. Most plugin Actions <footnote>
+ <para>Some plugins, such as Sidekick, Console, and
+ ProjectViewer, create pure Java EditAction-derived Actions,
+ based which services are available, or which files are found in
+ a certain path. However, this is an advanced topic you can
+ explore further in the source and API docs of those
+ plugins.</para>
+ </footnote> are short scripts written in BeanShell, jEdit's macro
+ scripting language. These scripts either direct the action themselves,
+ delegate to a method in one of the plugin's classes that encapsulates
+ the action, or do a little of both. The scripts are usually short;
+ elaborate action protocols are usually contained in compiled code,
+ rather than an interpreted macro script, to speed execution.</para>
+
+ <para>Actions are defined by creating an XML file entitled
+ <filename>actions.xml</filename> and placing it in the plugin JAR
+ file.</para>
+
+ <para>The <filename>actions.xml</filename> file from the
+ <application>QuickNotepad</application> plugin looks as follows:</para>
+
+ <informalexample>
+ <programlisting><ACTIONS>
+ <ACTION NAME="quicknotepad.choose-file">
+ <CODE>
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).chooseFile();
+ </CODE>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad.save-file">
+ <CODE>
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).saveFile();
+ </CODE>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad.copy-to-buffer">
+ <CODE>
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).copyToBuffer();
+ </CODE>
+ </ACTION>
+</ACTIONS></programlisting>
+ </informalexample>
+
+ <para>This file defines three actions. They each use a built-in variable
+ <literal>wm</literal>, which refers to the current view's <ulink
+ url="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html">
+ <classname>DockableWindowManager</classname></ulink>. Whenever you need
+ to obtain a reference to the current dockable, or create a new one, this
+ is the class to use. We use the method <filename>addDockable() followed
+ by getDockable()</filename> to create if necessary, and then bring up
+ the QuickNotepad plugin dockable. This will be docked or floating,
+ depending on how it was last used.</para>
+
+ <para>When an action is invoked, the BeanShell scripts address the
+ plugin through static methods, or if instance data is needed, the
+ current <ulink url="../api/org/gjt/sp/jedit/View.html">
+ <classname>View</classname></ulink>, its <ulink
+ url="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html">
+ <classname>DockableWindowManager</classname></ulink>, and the plugin
+ object return by the <filename>getDockable()</filename> method.</para>
+
+ <para>If you are unfamiliar with BeanShell code, you may nevertheless
+ notice that the code statements bear a strong resemblance to Java code,
+ with one exception: the variable <varname>view</varname> is never
+ assigned any value.</para>
+
+ <para>For complete answers to this and other BeanShell mysteries, see
+ <xref linkend="writing-macros-part" />; two observations will suffice
+ here. First, the variable <varname>view</varname> is predefined by
+ jEdit's implementation of BeanShell to refer to the current
+ <classname>View</classname> object. Second, the BeanShell scripting
+ language is based upon Java syntax, but allows variables to be typed at
+ run time, so explicit types for variables need not be declared.</para>
+
+ <para>A formal description of each element of the
+ <filename>actions.xml</filename> file can be found in the documentation
+ of the <ulink url="../api/org/gjt/sp/jedit/ActionSet.html">
+ <classname>ActionSet</classname></ulink> class.</para>
+ </section>
+
+ <section id="plugin-implement-dockables">
+ <title>The dockables.xml Window Catalog</title>
+
+ <para>A Dockable is a window that can float like a dialog, or dock into
+ jEdit's docking area. Each dockable needs a label (for display in menus,
+ and on small buttons) and a title (for display in the floating window's
+ title bar).</para>
+
+ <para>The jEdit plugin API uses BeanShell to create the top-level
+ visible container of a plugin's interface. The BeanShell code is
+ contained in a file named <filename>dockables.xml</filename>. It usually
+ is quite short, providing only a single BeanShell expression used to
+ create a visible plugin window.</para>
+
+ <para>The following example from the QuickNotepad plugin illustrates the
+ requirements of the data file:</para>
+
+ <informalexample>
+ <programlisting><?xml version="1.0"?>
+
+<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
+
+<DOCKABLES>
+ <DOCKABLE NAME="quicknotepad">
+ new QuickNotepad(view, position);
+ </DOCKABLE>
+</DOCKABLES></programlisting>
+ </informalexample>
+
+ <para>In this example, the <classname><DOCKABLE></classname>
+ element has a single attribute, the dockable window's identifier. This
+ attribute is used to key a property where the window title is stored;
+ see <xref linkend="plugin-implement-properties" />.</para>
+
+ <para>For each dockable, jedit defines an action with the same name.
+ This means you do not need to define an explicit action to create your
+ dockable - in fact, jEdit defines three actions: "toggle", "get" and
+ "new floating instance" for each.</para>
+
+ <para>The contents of the <classname><DOCKABLE></classname>
+ element itself is a BeanShell expression that constructs a new
+ <classname>QuickNotepad</classname> object. The <varname>view</varname>
+ and <varname>position</varname> are predefined by the plugin API as the
+ view in which the plugin window will reside, and the docking position of
+ the plugin. You can use <varname>position</varname> to customize the
+ layout of your plugin depending on whether it appears on the sides, or
+ the top/bottom, or as a floating dockable.</para>
+
+ <para>A formal description of each element of the
+ <filename>dockables.xml</filename> file can be found in the
+ documentation of the <ulink
+ url="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html">
+ <classname>DockableWindowManager</classname></ulink> class. This class
+ also contains the public interface you should use for getting, showing,
+ hiding, and other interactions with the plugin's top-level
+ windows.</para>
+ </section>
+
+ <section id="plugin-implement-services">
+ <title>The services.xml file</title>
+
+ <para>A "service" is a mechanism by which one plugin can work with other
+ plugins and avoid a bidirectional build-dependency. For example, the XML
+ plugin "depends" on Sidekick, but in fact, it is SideKick which creates
+ and operates on an object (a <literal>SideKickParser</literal>, in fact)
+ defined in the XML plugin. In a way, the dependency is
+ bidirectional.</para>
+
+ <para>Similarly, the AntFarm plugin defines but does not instantiate a
+ <literal>Shell</literal> object. It is the Console plugin which creates
+ a specific shell for each available service. SideKick and Console use
+ the ServiceManager to search for services offered by other
+ plugins.</para>
+
+ <para>Here is an example of a service from the XML plugin, which extends
+ Sidekick:</para>
+
+ <informalexample>
+ <programlisting>
+<!DOCTYPE SERVICES SYSTEM "services.dtd">
+
+<SERVICES>
+ <SERVICE CLASS="sidekick.SideKickParser" NAME="xml">
+ new xml.parser.SAXParserImpl();
+ </SERVICE>
+</SERVICES>
+</programlisting>
+ </informalexample>
+
+ <para>The object it returns tells Sidekick how it can parse files of a
+ specific type. The API docs for SideKickParser indicate exactly which
+ methods must be implemented in a plugin which offers this service. It
+ should be enough information to let Sidekick, which has its own
+ dockable, display the tree information in its own view.</para>
+
+ <para>For more information about services, refer to the <ulink
+ url="../api/org/gjt/sp/jedit/ServiceManager.html">ServiceManager</ulink>
+ class API documentation. There, you can find out what the tags and
+ attributes mean, as well as how to register and use services.</para>
+ </section>
+
+ <section id="plugin-implement-quicknotepad">
+ <title>The QuickNotepad Class</title>
+
+ <para>Here is where most of the features of the plugin will be
+ implemented. To work with the dockable window API, the top level window
+ will be a <classname>JPanel</classname>. The visible components reflect
+ a simple layout. Inside the top-level panel we will place a scroll pane
+ with a text area. Above the scroll pane we will place a panel containing
+ a small tool bar and a label displaying the path of the current notepad
+ file.</para>
+
+ <para>We have identified three user actions that need implementation
+ here: <function>chooseFile()</function>,
+ <function>saveFile()</function>, and
+ <function>copyToBuffer()</function>. As noted earlier, we also want the
+ text area to change its appearance in immediate response to a change in
+ user options settings. In order to do that, the window class must
+ respond to a <classname>PropertiesChanged</classname> message from the
+ EditBus.</para>
+
+ <!-- <para>
+ We could have the plugin core class receive and delegate
+ <classname>PropertiesChanged</classname> messages to the window class.
+ However, this would require the plugin core class to hold a reference
+ to either the plugin window class or the visible window class and to
+ update that reference when the user activates or deactivates the
+ plugin. It is simpler to have the plugin window class subscribe to the
+ EditBus directly; many plugins take this approach. This means that
+ <classname>QuickNotepad</classname> must implement the
+ <classname>EBComponent</classname> interface.
+</para> -->
+
+ <para>Unlike the <classname>EBPlugin</classname> class, the
+ <classname>EBComponent</classname> interface does not deal with the
+ component's actual subscribing and unsubscribing to the EditBus. To
+ accomplish this, we use a pair of methods inherited from the Java
+ platform's <classname>JComponent</classname> class that are called when
+ the window is made visible, and when it is hidden. These two methods,
+ <function>addNotify()</function> and
+ <function>removeNotify()</function>, are overridden to add and remove
+ the visible window from the list of EditBus subscribers.</para>
+
+ <para>We will provide for two minor features when the notepad is
+ displayed in the floating window. First, when a floating plugin window
+ is created, we will give the notepad text area input focus. Second, when
+ the notepad if floating and has input focus, we will have the
+ <keycap>Escape</keycap> key dismiss the notepad window. An
+ <classname>AncestorListener</classname> and a
+ <classname>KeyListener</classname> will implement these details.</para>
+
+ <para>Here is the listing for the data members, the constructor, and the
+ implementation of the <classname>EBComponent</classname>
+ interface:</para>
+
+ <informalexample>
+ <programlisting>public class QuickNotepad extends JPanel
+ implements EBComponent
+{
+ private String filename;
+ private String defaultFilename;
+ private View view;
+ private boolean floating;
+
+ private QuickNotepadTextArea textArea;
+ private QuickNotepadToolPanel toolPanel;
+
+ //
+ // Constructor
+ //
+
+ public QuickNotepad(View view, String position)
+ {
+ super(new BorderLayout());
+
+ this.view = view;
+ this.floating = position.equals(
+ DockableWindowManager.FLOATING);
+
+ this.filename = jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX
+ + "filepath");
+ if(this.filename == null || this.filename.length() == 0)
+ {
+ this.filename = new String(jEdit.getSettingsDirectory()
+ + File.separator + "qn.txt");
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "filepath",this.filename);
+ }
+ this.defaultFilename = new String(this.filename);
+
+ this.toolPanel = new QuickNotepadToolPanel(this);
+ add(BorderLayout.NORTH, this.toolPanel);
+
+ if(floating)
+ this.setPreferredSize(new Dimension(500, 250));
+
+ textArea = new QuickNotepadTextArea();
+ textArea.setFont(QuickNotepadOptionPane.makeFont());
+ textArea.addKeyListener(new KeyHandler());
+ textArea.addAncestorListener(new AncestorHandler());
+ JScrollPane pane = new JScrollPane(textArea);
+ add(BorderLayout.CENTER, pane);
+
+ readFile();
+ }
+
+ //
+ // Attribute methods
+ //
+
+ // for toolBar display
+ public String getFilename()
+ {
+ return filename;
+ }
+
+ //
+ // EBComponent implementation
+ //
+
+ public void handleMessage(EBMessage message)
+ {
+ if (message instanceof PropertiesChanged)
+ {
+ propertiesChanged();
+ }
+ }
+
+
+ private void propertiesChanged()
+ {
+ String propertyFilename = jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath");
+ if(!defaultFilename.equals(propertyFilename))
+ {
+ saveFile();
+ toolPanel.propertiesChanged();
+ defaultFilename = propertyFilename.clone();
+ filename = defaultFilename.clone();
+ readFile();
+ }
+ Font newFont = QuickNotepadOptionPane.makeFont();
+ if(!newFont.equals(textArea.getFont()))
+ {
+ textArea.setFont(newFont);
+ textArea.invalidate();
+ }
+ }
+
+ // These JComponent methods provide the appropriate points
+ // to subscribe and unsubscribe this object to the EditBus
+
+ public void addNotify()
+ {
+ super.addNotify();
+ EditBus.addToBus(this);
+ }
+
+
+ public void removeNotify()
+ {
+ saveFile();
+ super.removeNotify();
+ EditBus.removeFromBus(this);
+ }
+
+ ...
+
+}</programlisting>
+ </informalexample>
+
+ <para>This listing refers to a
+ <classname>QuickNotebookTextArea</classname> object. It is currently
+ implemented as a <classname>JTextArea</classname> with word wrap and tab
+ sizes hard-coded. Placing the object in a separate class will simply
+ future modifications.</para>
+ </section>
+
+ <section id="plugin-implement-quicknotepadtoolbar">
+ <title>The QuickNotepadToolBar Class</title>
+
+ <para>There is nothing remarkable about the toolbar panel that is placed
+ inside the <classname>QuickNotepad</classname> object. The constructor
+ shows the continued use of items from the plugin's properties
+ file.</para>
+
+ <informalexample>
+ <programlisting>public class QuickNotepadToolPanel extends JPanel
+{
+ private QuickNotepad pad;
+ private JLabel label;
+
+ public QuickNotepadToolPanel(QuickNotepad qnpad)
+ {
+ pad = qnpad;
+ JToolBar toolBar = new JToolBar();
+ toolBar.setFloatable(false);
+
+ toolBar.add(makeCustomButton("quicknotepad.choose-file",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.chooseFile();
+ }
+ }));
+ toolBar.add(makeCustomButton("quicknotepad.save-file",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.saveFile();
+ }
+ }));
+ toolBar.add(makeCustomButton("quicknotepad.copy-to-buffer",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.copyToBuffer();
+ }
+ }));
+ label = new JLabel(pad.getFilename(),
+ SwingConstants.RIGHT);
+ label.setForeground(Color.black);
+ label.setVisible(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX
+ + "show-filepath").equals("true"));
+ this.setLayout(new BorderLayout(10, 0));
+ this.add(BorderLayout.WEST, toolBar);
+ this.add(BorderLayout.CENTER, label);
+ this.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 10));
+ }
+
+ ...
+
+}</programlisting>
+ </informalexample>
+
+ <para>The method <classname>makeCustomButton()</classname> provides
+ uniform attributes for the three toolbar buttons corresponding to three
+ of the plugin's use actions. The menu titles for the user actions serve
+ double duty as tooltip text for the buttons. There is also a
+ <function>propertiesChanged()</function> method for the toolbar that
+ sets the text and visibility of the label containing the notepad file
+ path.</para>
+ </section>
+
+ <section id="plugin-implement-options">
+ <title>The QuickNotepadOptionPane Class</title>
+
+ <para>Using the default implementation provided by
+ <classname>AbstractOptionPane</classname> reduces the preparation of an
+ option pane to two principal tasks: writing a
+ <function>_init()</function> method to layout and initialize the pane,
+ and writing a <function>_save()</function> method to commit any settings
+ changed by user input. If a button on the option pane should trigger
+ another dialog, such as a <classname>JFileChooser</classname> or jEdit's
+ own enhanced <classname>VFSFileChooserDialog</classname>, the option
+ pane will also have to implement the
+ <classname>ActionListener</classname> interface to display additional
+ components.</para>
+
+ <para>The QuickNotepad plugin has only three options to set: the path
+ name of the file that will store the notepad text, the visibility of the
+ path name on the tool bar, and the notepad's display font. Using the
+ shortcut methods of the plugin API, the implementation of
+ <function>_init()</function> looks like this:</para>
+
+ <informalexample>
+ <programlisting>public class QuickNotepadOptionPane extends AbstractOptionPane
+ implements ActionListener
+{
+ private JTextField pathName;
+ private JButton pickPath;
+ private FontSelector font;
+
+ ...
+
+ public void _init()
+ {
+ showPath = new JCheckBox(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX
+ + "show-filepath.title"),
+ jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath")
+ .equals("true"));
+ addComponent(showPath);
+
+ pathName = new JTextField(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX
+ + "filepath"));
+ JButton pickPath = new JButton(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX
+ + "choose-file"));
+ pickPath.addActionListener(this);
+
+ JPanel pathPanel = new JPanel(new BorderLayout(0, 0));
+ pathPanel.add(pathName, BorderLayout.CENTER);
+ pathPanel.add(pickPath, BorderLayout.EAST);
+
+ addComponent(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "file"),
+ pathPanel);
+
+ font = new FontSelector(makeFont());
+ addComponent(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "choose-font"),
+ font);
+ }
+
+ ...
+
+}</programlisting>
+ </informalexample>
+
+ <para>Here we adopt the vertical arrangement offered by use of the
+ <function>addComponent()</function> method with one embellishment. We
+ want the first <quote>row</quote> of the option pane to contain a text
+ field with the current notepad file path and a button that will trigger
+ a file chooser dialog when pressed. To place both of them on the same
+ line (along with an identifying label for the file option), we create a
+ <classname>JPanel</classname> to contain both components and pass the
+ configured panel to <function>addComponent()</function>.</para>
+
+ <para>The <function>_init()</function> method uses properties from the
+ plugin's property file to provide the names of label for the components
+ placed in the option pane. It also uses a property whose name begins
+ with <function>PROPERTY_PREFIX</function> as a persistent data item -
+ the path of the current notepad file. The elements of the notepad's font
+ are also extracted from properties using a static method of the option
+ pane class.</para>
+
+ <para>The <function>_save()</function> method extracts data from the
+ user input components and assigns them to the plugin's properties. The
+ implementation is straightforward:</para>
+
+ <informalexample>
+ <programlisting>public void _save()
+{
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "filepath", pathName.getText());
+ Font _font = font.getFont();
+
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "font", _font.getFamily());
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "fontsize", String.valueOf(_font.getSize()));
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "fontstyle", String.valueOf(_font.getStyle()));
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "show-filepath", String.valueOf(showPath.isSelected()));
+}</programlisting>
+ </informalexample>
+
+ <para>The class has only two other methods, one to display a file
+ chooser dialog in response to user action, and the other to construct a
+ <classname>Font</classname> object from the plugin's font properties.
+ They do not require discussion here.</para>
+ </section>
+
+ <section id="plugin-implement-docs">
+ <title>Plugin Documentation</title>
+
+ <para>While not required by the plugin API, a help file is an essential
+ element of any plugin written for public release. A single web page is
+ often all that is required. There are no specific requirements on
+ layout, but because of the design of jEdit's help viewer, the use of
+ frames should be avoided. Topics that would be useful include the
+ following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>a description of the purpose of the plugin;</para>
+ </listitem>
+
+ <listitem>
+ <para>an explanation of the type of input the user can supply
+ through its visible interface (such as mouse action or text
+ entry in controls);</para>
+ </listitem>
+
+ <listitem>
+ <para>a listing of available user actions that can be taken when
+ the plugin does not have input focus;</para>
+ </listitem>
+
+ <listitem>
+ <para>a summary of configuration options;</para>
+ </listitem>
+
+ <listitem>
+ <para>information on development of the plugin (such as a change
+ log, a list of <quote>to do</quote> items, and contact
+ information for the plugin's author); and</para>
+ </listitem>
+
+ <listitem>
+ <para>licensing information, including acknowledgments for any
+ library software used by the plugin.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The location of the plugin's help file is stored in the
+ <literal>plugin.QuickNotepad.docs</literal> property; see <xref
+ linkend="plugin-implement-properties" />.</para>
+ </section>
+
+ <section id="plugin-implement-building">
+ <title>The build.xml Ant build file</title>
+
+ <para>We have already outlined the contents of the user action catalog,
+ the properties file and the documentation file in our earlier
+ discussion. The final step is to compile the source file and build the
+ archive file that will hold the class files and the plugin's other
+ resources.</para>
+
+ <para>Publicly released plugins include with their source a makefile in
+ XML format for the <application>Ant</application> utility. The format
+ for this file requires few changes from plugin to plugin. Here is a
+ version of <filename>build.xml</filename> that could be used by
+ QuickNotepad:</para>
+
+ <informalexample>
+ <programlisting>
+<project name="QuickNotepad"
+ default="build">
+ <description>
+ This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
+ </description>
+ <property name="user-doc.xml"
+ value="users-guide.xml" />
+ <property file="build.properties" />
+ <property file="../build.properties" />
+ <property name="build.support"
+ value="../../../build-support" />
+ <import file="${build.support}/plugin-build.xml" />
+</project>
+</programlisting>
+ </informalexample>
+
+ <para>This build file imports another modular build file,
+ <literal>plugin-build.xml</literal> from the <literal>build-support</literal>
+ project. It is available as a package you can check out from subversion, or found online in the <ulink
+ url="https://jedit.svn.sourceforge.net/svnroot/jedit/build-support/trunk/">jEdit's
+ SVN repository</ulink>. It contains the common build steps used to build the core jEdit plugins, and some example <literal>build.properties.sample</literal> files which you can adapt for use with your development environment.</para>
+
+
+ <para>Customizing this build file for a different plugin will likely
+ only require three changes to build.xml file:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>the name of the project</para>
+ </listitem>
+
+ <listitem>
+ <para>the dependencies of the plugin</para>
+ </listitem>
+
+ <listitem>
+ <para>The extra files that need to be copied into the
+ jar.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Because this build file and the one of most plugins import a
+ <literal>build.properties</literal> file from the current and the parent
+ directories, it is possible to build most of jEdit's plugins in a
+ uniform way by setting the common properties in a single
+ <literal>build.properties</literal> file, placed in the plugin source's
+ parent directory. </para>
+
+ <tip> <para>For a full discussion of the <filename>Ant</filename> file
+ format and command syntax, you should consult the <ulink
+ url="http://jakarta.apache.org/ant/manual/index.html">Ant
+ documentation</ulink>, also available through jEdit's help system if you
+ installed the Ant Plugin. When editing Ant build files, the XML plugin
+ gives you completion tips for both elements <emphasis>and</emphasis>
+ attributes. The Console plugin provides you with an ANT button which you
+ can bind to keyboard actions. In addition, there are the AntFarm and
+ Antelope plugins which also proivde you with alternate means to execute
+ Ant targets through the Console.</para> </tip> </section>
+
+ <section id="plugin-implement-reloading">
+ <title>Reloading the Plugin</title>
+
+ <para>Once you have compiled your plugin, you will need to test its
+ behavior when it is reloaded. Follow these steps to reload your plugin
+ without restarting jEdit:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>From the Plugins menu open the Plugin Manager.</para>
+ </listitem>
+
+ <listitem>
+ <para>On the Manage tab uncheck Hide libraries. This will allow
+ you to see plugins that are not loaded.</para>
+ </listitem>
+
+ <listitem>
+ <para>Find the plugin on the Manage tab and uncheck it. This
+ will unload the plugin. You will get a warning if this plugin
+ does not support dynamic reloading. If you get that warning you
+ will need to restart jEdit to reload the plugin until the plugin
+ is converted over to the 4.2 API.</para>
+ </listitem>
+
+ <listitem>
+ <para>Recheck the plugin to reload it.</para>
+ </listitem>
+ </itemizedlist>
+
+ <tip>
+ <para>The Activator plugin provides a very convenient (dockable) way
+ to test the activating and reloading behavior of your plugin. Be
+ sure to test your plugin's reloading behavior with both the
+ Activator and the Reloader tabs.</para>
+ </tip>
+
+ <para>If you have reached this point in the text, you are probably
+ serious about writing a plugin for jEdit. Good luck with your efforts,
+ and thank you for contributing to the jEdit project.</para>
+ </section>
+
+ <section id="plugin-debugging" >
+ <title> Tips for debugging plugins </title>
+ <bridgehead> BeanShell </bridgehead>
+ <para> jEdit includes a Beanshell interface into its currently running JVM at all times. You can access it a variety of ways, but one way is from <literal>Plugins - Console - Shells - BeanShell</literal>. From here, you can interactively inspect the values of any object in memory, call any of its member functions, or create new instances of any class that is currently loaded by jEdit or any of its plugins. All this, without setting any breakpoints!
+ </para>
+ <para> If you're too lazy to type each Beanshell statement interactively, you can also create debugging code snippets as macros and invoke them from <literal>utilities - beanshell - evaluate selection</literal>, or <literal>Macros - Misc - Evaluate Buffer in Beanshell</literal>, or place the file in your own macros directory and bind it to its own keyboard shortcut. </para>
+ <bridgehead> Other useful tips </bridgehead>
+ <para> This section is new but will be expanded shortly. Please post suggestions to the <literal>jedit-devel</literal> mailing list. </para>
+ </section>
+
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/plugin-intro.xml b/jEdit/doc/users-guide/plugin-intro.xml
index 7e24b1a..e16217a 100644
--- a/jEdit/doc/users-guide/plugin-intro.xml
+++ b/jEdit/doc/users-guide/plugin-intro.xml
@@ -1,131 +1,131 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="plugin-intro">
- <title>Introducing the Plugin API</title>
- <!-- :indentSize=1:tabSize=2:noTabs=true:wrap=soft:maxLineLen=0: -->
- <!-- :xml.root=users-guide.xml: -->
- <!-- jEdit 4.0 Plugin Guide, (C) 2001, 2002 John Gellene -->
- <!-- jEdit buffer-local properties: -->
- <!-- This is the introduction of the jEdit 4.0 Plugin Guide -->
- <!-- $Id: plugin-intro.xml 9999 2007-07-11 18:15:37Z ezust $ -->
-
- <indexterm>
- <primary>Plugin API</primary>
- <secondary>introduction</secondary>
- </indexterm>
-
- <para>The <firstterm>jEdit Plugin API</firstterm> provides a framework for
- hosting plugin applications without imposing any requirements on the design
- or function of the plugin itself. You could write an application that
- performs spell checking, displays a clock or plays chess and turn it into a
- jEdit plugin. There are currently over 50 released plugins for jEdit. While
- none of them play chess, they perform a wide variety of editing and file
- management tasks.</para>
-
- <para>A detailed listing of available plugins is available at <ulink
- url="http://plugins.jedit.org">plugins.jedit.org</ulink>. You can also find
- beta versions of new plugins in the <quote>Downloads</quote> area of <ulink
- url="http://community.jedit.org">community.jedit.org</ulink>.</para>
-
- <para>Using the <quote>Plugin Manager</quote> feature of jEdit, users with
- an Internet connection can check for new or updated plugins and install and
- remove them without leaving jEdit. See <xref linkend="using-plugins" /> for
- details.</para>
-
- <para>Requirements for <quote>plugging in</quote> to jEdit are as
- follows:</para>
-
- <itemizedlist>
- <listitem>
- <para>This plugin must supply information about itself, such as its
- name, version, author, and compatibility with versions of
- jEdit.</para>
- </listitem>
-
- <listitem>
- <para>The plugin must provide for activating, displaying and
- deactivating itself upon direction from jEdit, typically in response
- to user input<footnote>
- <para>You should test your plugin by loading and unloading
- it from both the Plugin Manager, as well as the <emphasis
- role="bold">Activator Plugin</emphasis>.</para>
- </footnote>. Make sure you can continue to use both your plugin
- and the editor after it has been reloaded.</para>
- </listitem>
-
- <listitem>
- <para>Each Plugin has an ActionSet defined by jEdit, which is added
- to the main ActionContext. The ActionSet is a container for
- EditAction instances. The plugin may define
- <firstterm>actions</firstterm> in a number of ways. One way is
- explicitly, with an action definition file known as
- <literal>actions.xml</literal>. Another is implicitly, by defining
- dockable windows in <literal>dockables.xml</literal>.</para>
-
- <para>Most EditActions are small blocks of BeanShell code that jEdit
- will perform on behalf of the plugin upon user request. They provide
- the <quote>glue</quote> between user input and specific plugin
- routines.</para>
-
- <para>By convention, plugins display their available actions in
- submenus of jEdit's <guimenu>Plugins</guimenu> menu; each menu item
- corresponds to an action. Plugin authors do not define specific
- shortcuts - the user can/will assign EditActions to keyboard
- shortcuts, toolbar buttons, or entries in the text area's Context
- menu (right-click menu).</para>
- </listitem>
-
- <listitem>
- <para>The plugin may, but need not, provide a user interface.</para>
-
- <para>If the plugin has a visible interface, it can be shown in any
- object derived from one of Java top-level container classes:
- <classname>JWindow</classname>, <classname>JDialog</classname>, or
- <classname>JFrame</classname>. jEdit also provides a dockable window
- API, which allows plugin windows derived from the
- <classname>JComponent</classname> class to be docked into views or
- shown in top-level frames, at the user's request.</para>
-
- <para>Plugins can also act directly upon jEdit's text area. They can
- add graphical elements to the text display (like error highlighting
- in the case of the <application>ErrorList</application> plugin) or
- decorations surrounding the text area (like the
- <application>JDiff</application> plugin's summary views). These
- plugins are dependent on the JEditTextArea class, which is currently
- getting refactored.</para>
- </listitem>
-
- <listitem>
- <para>Plugins may provide a range of options that the user can
- modify to alter their configuration.</para>
-
- <para>If a plugin provides configuration options in accordance with
- the plugin API, jEdit will make them available in the
- <guilabel>Global Options</guilabel> dialog box.</para>
- </listitem>
-
- <listitem>
- <para>While it is not required, plugins are encouraged to provide
- documentation.</para>
- </listitem>
- </itemizedlist>
-
- <para>As noted, many of these features are optional; it is possible to write
- a plugin that does not provide actions, configuration options, or dockable
- windows. The majority of plugins, however, provide most of these
- services.</para>
-
- <sidebar>
- <title>Plugins and different jEdit versions</title>
-
- <para>As jEdit continues to evolve and improve, elements of the API may
- change with a new jEdit release.</para>
-
- <para>On occasion an API change will break code used by plugins,
- although efforts are made to maintain or deprecate plugin-related code
- on a transitional basis. While the majority of plugins are unaffected by
- most changes and will continue working, it is a good idea to monitor the
- jEdit change log, and join the <literal>jedit-devel</literal> mailing list, to keep updated on changes and bug reports, so that you will know when your
- plugin needs to be updated.
- </para>
- </sidebar>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="plugin-intro">
+ <title>Introducing the Plugin API</title>
+ <!-- :indentSize=1:tabSize=2:noTabs=true:wrap=soft:maxLineLen=0: -->
+ <!-- :xml.root=users-guide.xml: -->
+ <!-- jEdit 4 Plugin Guide, (C) 2001, 2002 John Gellene -->
+ <!-- jEdit buffer-local properties: -->
+ <!-- This is the introduction of the jEdit 4 Plugin Guide -->
+ <!-- $Id: plugin-intro.xml 17179 2010-02-02 05:56:07Z ezust $ -->
+
+ <indexterm>
+ <primary>Plugin API</primary>
+ <secondary>introduction</secondary>
+ </indexterm>
+
+ <para>The <firstterm>jEdit Plugin API</firstterm> provides a framework for
+ hosting plugin applications without imposing any requirements on the design
+ or function of the plugin itself. You could write an application that
+ performs spell checking, displays a clock or plays chess and turn it into a
+ jEdit plugin. There are currently over 50 released plugins for jEdit. While
+ none of them play chess, they perform a wide variety of editing and file
+ management tasks.</para>
+
+ <para>A detailed listing of available plugins is available at <ulink
+ url="http://plugins.jedit.org">plugins.jedit.org</ulink>. You can also find
+ beta versions of new plugins in the <quote>Downloads</quote> area of <ulink
+ url="http://community.jedit.org">community.jedit.org</ulink>.</para>
+
+ <para>Using the <quote>Plugin Manager</quote> feature of jEdit, users with
+ an Internet connection can check for new or updated plugins and install and
+ remove them without leaving jEdit. See <xref linkend="using-plugins" /> for
+ details.</para>
+
+ <para>Requirements for <quote>plugging in</quote> to jEdit are as
+ follows:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>This plugin must supply information about itself, such as its
+ name, version, author, and compatibility with versions of
+ jEdit.</para>
+ </listitem>
+
+ <listitem>
+ <para>The plugin must provide for activating, displaying and
+ deactivating itself upon direction from jEdit, typically in response
+ to user input<footnote>
+ <para>You should test your plugin by loading and unloading
+ it from both the Plugin Manager, as well as the <emphasis
+ role="bold">Activator Plugin</emphasis>.</para>
+ </footnote>. Make sure you can continue to use both your plugin
+ and the editor after it has been reloaded.</para>
+ </listitem>
+
+ <listitem>
+ <para>Each Plugin has an ActionSet defined by jEdit, which is added
+ to the main ActionContext. The ActionSet is a container for
+ EditAction instances. The plugin may define
+ <firstterm>actions</firstterm> in a number of ways. One way is
+ explicitly, with an action definition file known as
+ <literal>actions.xml</literal>. Another is implicitly, by defining
+ dockable windows in <literal>dockables.xml</literal>.</para>
+
+ <para>Most EditActions are small blocks of BeanShell code that jEdit
+ will perform on behalf of the plugin upon user request. They provide
+ the <quote>glue</quote> between user input and specific plugin
+ routines.</para>
+
+ <para>By convention, plugins display their available actions in
+ submenus of jEdit's <guimenu>Plugins</guimenu> menu; each menu item
+ corresponds to an action. Plugin authors do not define specific
+ shortcuts - the user can/will assign EditActions to keyboard
+ shortcuts, toolbar buttons, or entries in the text area's Context
+ menu (right-click menu).</para>
+ </listitem>
+
+ <listitem>
+ <para>The plugin may, but need not, provide a user interface.</para>
+
+ <para>If the plugin has a visible interface, it can be shown in any
+ object derived from one of Java top-level container classes:
+ <classname>JWindow</classname>, <classname>JDialog</classname>, or
+ <classname>JFrame</classname>. jEdit also provides a dockable window
+ API, which allows plugin windows derived from the
+ <classname>JComponent</classname> class to be docked into views or
+ shown in top-level frames, at the user's request.</para>
+
+ <para>Plugins can also act directly upon jEdit's text area. They can
+ add graphical elements to the text display (like error highlighting
+ in the case of the <application>ErrorList</application> plugin) or
+ decorations surrounding the text area (like the
+ <application>JDiff</application> plugin's summary views). These
+ plugins are dependent on the JEditTextArea class, which is currently
+ getting refactored.</para>
+ </listitem>
+
+ <listitem>
+ <para>Plugins may provide a range of options that the user can
+ modify to alter their configuration.</para>
+
+ <para>If a plugin provides configuration options in accordance with
+ the plugin API, jEdit will make them available in the
+ <guilabel>Global Options</guilabel> dialog box.</para>
+ </listitem>
+
+ <listitem>
+ <para>While it is not required, plugins are encouraged to provide
+ documentation.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>As noted, many of these features are optional; it is possible to write
+ a plugin that does not provide actions, configuration options, or dockable
+ windows. The majority of plugins, however, provide most of these
+ services.</para>
+
+ <sidebar>
+ <title>Plugins and different jEdit versions</title>
+
+ <para>As jEdit continues to evolve and improve, elements of the API may
+ change with a new jEdit release.</para>
+
+ <para>On occasion an API change will break code used by plugins,
+ although efforts are made to maintain or deprecate plugin-related code
+ on a transitional basis. While the majority of plugins are unaffected by
+ most changes and will continue working, it is a good idea to monitor the
+ jEdit change log, and join the <literal>jedit-devel</literal> mailing list, to keep updated on changes and bug reports, so that you will know when your
+ plugin needs to be updated.
+ </para>
+ </sidebar>
+</chapter>
diff --git a/jEdit/doc/users-guide/plugin-tips.xml b/jEdit/doc/users-guide/plugin-tips.xml
index 3b22a31..914463d 100644
--- a/jEdit/doc/users-guide/plugin-tips.xml
+++ b/jEdit/doc/users-guide/plugin-tips.xml
@@ -1,160 +1,160 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="plugin-tips">
- <title>Plugin Tips and Techniques</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :tabSize=1:indentSize=1:noTabs=true: -->
- <!-- :xml.root=users-guide.xml: -->
-
- <section id="plugin-tips-libraries">
- <title>Bundling Additional Class Libraries</title>
-
- <para>Recall that any class whose name ends with
- <classname>Plugin.class</classname> is called a plugin core class. JAR
- files with no plugin core classes are also loaded by jEdit; the classes
- they contain are made available to other plugins. Many plugins that rely
- on third-party class libraries ship them as separate JAR files. The
- libraries will be available inside the jEdit environment but are not
- part of a general classpath or library collection when running other
- Java applications.</para>
-
- <para>A plugin that bundles extra JAR files must list them in the
- <filename>plugin.<replaceable>class name</replaceable>.jars</filename>
- property. See the documentation for the <ulink
- url="../api/org/gjt/sp/jedit/EditPlugin.html">
- <classname>EditPlugin</classname></ulink> class for details.</para>
- </section>
-
- <section id="plugin-tips-non-java-libraries">
- <title>Bundling Additional Non-Java Libraries</title>
-
- <para>If your plugin bundles non-Java files, like native libraries, you
- need to list them in the <filename>plugin.<replaceable>class
- name</replaceable>.files</filename> property. If you don't do so, they
- don't get deleted if the plugin is uninstalled. See the documentation
- for the <ulink url="../api/org/gjt/sp/jedit/EditPlugin.html">
- <classname>EditPlugin</classname></ulink> class for details.</para>
- </section>
-
- <section id="plugin-tips-plugin-data">
- <title>Storing plugin data</title>
-
- <para>If your plugin needs to create files and store data in the
- filesystem, you should use the <methodname>getPluginHome()</methodname>
- API of the <classname>EditPlugin</classname> class. To signal that you
- use the plugin home API you have to set the
- <filename>plugin.<replaceable>class
- name</replaceable>.usePluginHome</filename> property to
- <constant>true</constant>. Even if your plugin doesn't create any files,
- you should set the property to <constant>true</constant>, so that e. g.
- the plugin manager knows that there is actually no data in favor of not
- knowing if there is any data and thus displaying that it doesn't know
- the data size. See the documentation for the <ulink
- url="../api/org/gjt/sp/jedit/EditPlugin.html"><classname>EditPlugin</classname></ulink>
- class for details.</para>
- </section>
-
- <section id="plugin-tips-colors">
- <title>Plugin colors</title>
- <para>There are a number of colors used by the View that should also be
- used by plugins where possible. This helps promote a consistent color
- scheme throughout jEdit.
- </para><para>
- The main color properties are:
- </para>
- <itemizedlist>
- <listitem><para><literal>view.bgColor</literal> - the background color of the main text area</para></listitem>
- <listitem><para><literal>view.fgColor</literal> - the base foreground color for text in the main text area</para></listitem>
- <listitem><para><literal>view.lineHighlightColor</literal> - color of the current line highlight</para></listitem>
- <listitem><para><literal>view.selectionColor</literal> - the color of selected text in the main text area</para></listitem>
- <listitem><para><literal>view.caretColor</literal> - the color of the caret in the main text area</para></listitem>
- <listitem><para><literal>view.eolMarkerColor</literal> - the color of the end-of-line marker</para></listitem>
- </itemizedlist>
- <para>
- To use these colors in your plugin, use
- <programlisting>jEdit.getColorProperty("view.whatever", default_color)</programlisting>
- </para>
- <para>
- For example, the QuickNotepad example should have lines like this:
- </para>
- <programlisting>
- textarea.setBackground(jEdit.getColorProperty("view.bgColor", Color.WHITE);
- textarea.setForeground(jEdit.getColorProperty("view.fgColor", Color.BLACK);
- </programlisting><para>
- This sets the foreground and background colors of QuickNotepad to be the same
- as those in the View.
- </para>
- <para>
- There are other color properties that may be useful, depending on what your
- plugin displays.
- </para>
- <para>
- Gutter colors:
- </para><itemizedlist>
- <listitem><para><literal>view.gutter.bgColor</literal></para></listitem>
- <listitem><para><literal>view.gutter.currentLineColor</literal></para></listitem>
- <listitem><para><literal>view.gutter.fgColor</literal></para></listitem>
- <listitem><para><literal>view.gutter.focusBorderColor</literal></para></listitem>
- <listitem><para><literal>view.gutter.foldColor</literal></para></listitem>
- <listitem><para><literal>view.gutter.highlightColor</literal></para></listitem>
- <listitem><para><literal>view.gutter.markerColor</literal></para></listitem>
- <listitem><para><literal>view.gutter.noFocusBorderColor</literal></para></listitem>
- <listitem><para><literal>view.gutter.registerColor</literal></para></listitem>
- <listitem><para><literal>view.gutter.structureHighlightColor</literal></para></listitem>
- </itemizedlist>
- <para>
- Status bar colors:
- </para>
- <itemizedlist>
- <listitem><para><literal>view.status.background</literal></para></listitem>
- <listitem><para><literal>view.status.foreground</literal></para></listitem>
- <listitem><para><literal>view.status.memory.background</literal></para></listitem>
- <listitem><para><literal>view.status.memory.foreground</literal></para></listitem>
- </itemizedlist>
- <para>
- </para><para>
- Structure highlight colors:
- </para><itemizedlist>
- <listitem><para><literal>view.structureHighlightColor</literal></para></listitem>
- <listitem><para><literal>view.structureHighlightColor</literal></para></listitem>
- </itemizedlist>
- <para>
- Style colors. Use <classname>GUIUtilities.parseStyle</classname> for these.
- </para>
- <itemizedlist>
- <listitem><para><literal>view.style.comment1</literal></para></listitem>
- <listitem><para><literal>view.style.comment2</literal></para></listitem>
- <listitem><para><literal>view.style.comment3</literal></para></listitem>
- <listitem><para><literal>view.style.comment4</literal></para></listitem>
- <listitem><para><literal>view.style.digit</literal></para></listitem>
- <listitem><para><literal>view.style.foldLine.0</literal></para></listitem>
- <listitem><para><literal>view.style.foldLine.1</literal></para></listitem>
- <listitem><para><literal>view.style.foldLine.2</literal></para></listitem>
- <listitem><para><literal>view.style.foldLine.3</literal></para></listitem>
- <listitem><para><literal>view.style.function</literal></para></listitem>
- <listitem><para><literal>view.style.invalid</literal></para></listitem>
- <listitem><para><literal>view.style.keyword1</literal></para></listitem>
- <listitem><para><literal>view.style.keyword2</literal></para></listitem>
- <listitem><para><literal>view.style.keyword3</literal></para></listitem>
- <listitem><para><literal>view.style.keyword4</literal></para></listitem>
- <listitem><para><literal>view.style.label</literal></para></listitem>
- <listitem><para><literal>view.style.literal1</literal></para></listitem>
- <listitem><para><literal>view.style.literal2</literal></para></listitem>
- <listitem><para><literal>view.style.literal3</literal></para></listitem>
- <listitem><para><literal>view.style.literal4</literal></para></listitem>
- <listitem><para><literal>view.style.markup</literal></para></listitem>
- <listitem><para><literal>view.style.operator</literal></para></listitem>
- <listitem><para><literal>view.wrapGuideColor</literal></para></listitem>
- </itemizedlist>
- <para>
- For example, here is a setting for a fold line color:
- </para>
- <programlisting>
- view.style.foldLine.0=color\:\#000000 bgColor\:\#f5deb8 style\:b
- </programlisting>
- <para>
- Passing the value to <classname>GUIUtilities.parseStyle</classname> will
- return a SyntaxStyle object, which you can query for background color,
- foreground color, and font.
- </para>
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="plugin-tips">
+ <title>Plugin Tips and Techniques</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :tabSize=1:indentSize=1:noTabs=true: -->
+ <!-- :xml.root=users-guide.xml: -->
+
+ <section id="plugin-tips-libraries">
+ <title>Bundling Additional Class Libraries</title>
+
+ <para>Recall that any class whose name ends with
+ <classname>Plugin.class</classname> is called a plugin core class. JAR
+ files with no plugin core classes are also loaded by jEdit; the classes
+ they contain are made available to other plugins. Many plugins that rely
+ on third-party class libraries ship them as separate JAR files. The
+ libraries will be available inside the jEdit environment but are not
+ part of a general classpath or library collection when running other
+ Java applications.</para>
+
+ <para>A plugin that bundles extra JAR files must list them in the
+ <filename>plugin.<replaceable>class name</replaceable>.jars</filename>
+ property. See the documentation for the <ulink
+ url="../api/org/gjt/sp/jedit/EditPlugin.html">
+ <classname>EditPlugin</classname></ulink> class for details.</para>
+ </section>
+
+ <section id="plugin-tips-non-java-libraries">
+ <title>Bundling Additional Non-Java Libraries</title>
+
+ <para>If your plugin bundles non-Java files, like native libraries, you
+ need to list them in the <filename>plugin.<replaceable>class
+ name</replaceable>.files</filename> property. If you don't do so, they
+ don't get deleted if the plugin is uninstalled. See the documentation
+ for the <ulink url="../api/org/gjt/sp/jedit/EditPlugin.html">
+ <classname>EditPlugin</classname></ulink> class for details.</para>
+ </section>
+
+ <section id="plugin-tips-plugin-data">
+ <title>Storing plugin data</title>
+
+ <para>If your plugin needs to create files and store data in the
+ filesystem, you should use the <methodname>getPluginHome()</methodname>
+ API of the <classname>EditPlugin</classname> class. To signal that you
+ use the plugin home API you have to set the
+ <filename>plugin.<replaceable>class
+ name</replaceable>.usePluginHome</filename> property to
+ <constant>true</constant>. Even if your plugin doesn't create any files,
+ you should set the property to <constant>true</constant>, so that e. g.
+ the plugin manager knows that there is actually no data in favor of not
+ knowing if there is any data and thus displaying that it doesn't know
+ the data size. See the documentation for the <ulink
+ url="../api/org/gjt/sp/jedit/EditPlugin.html"><classname>EditPlugin</classname></ulink>
+ class for details.</para>
+ </section>
+
+ <section id="plugin-tips-colors">
+ <title>Plugin colors</title>
+ <para>There are a number of colors used by the View that should also be
+ used by plugins where possible. This helps promote a consistent color
+ scheme throughout jEdit.
+ </para><para>
+ The main color properties are:
+ </para>
+ <itemizedlist>
+ <listitem><para><literal>view.bgColor</literal> - the background color of the main text area</para></listitem>
+ <listitem><para><literal>view.fgColor</literal> - the base foreground color for text in the main text area</para></listitem>
+ <listitem><para><literal>view.lineHighlightColor</literal> - color of the current line highlight</para></listitem>
+ <listitem><para><literal>view.selectionColor</literal> - the color of selected text in the main text area</para></listitem>
+ <listitem><para><literal>view.caretColor</literal> - the color of the caret in the main text area</para></listitem>
+ <listitem><para><literal>view.eolMarkerColor</literal> - the color of the end-of-line marker</para></listitem>
+ </itemizedlist>
+ <para>
+ To use these colors in your plugin, use
+ <programlisting>jEdit.getColorProperty("view.whatever", default_color)</programlisting>
+ </para>
+ <para>
+ For example, the QuickNotepad example should have lines like this:
+ </para>
+ <programlisting>
+ textarea.setBackground(jEdit.getColorProperty("view.bgColor", Color.WHITE);
+ textarea.setForeground(jEdit.getColorProperty("view.fgColor", Color.BLACK);
+ </programlisting><para>
+ This sets the foreground and background colors of QuickNotepad to be the same
+ as those in the View.
+ </para>
+ <para>
+ There are other color properties that may be useful, depending on what your
+ plugin displays.
+ </para>
+ <para>
+ Gutter colors:
+ </para><itemizedlist>
+ <listitem><para><literal>view.gutter.bgColor</literal></para></listitem>
+ <listitem><para><literal>view.gutter.currentLineColor</literal></para></listitem>
+ <listitem><para><literal>view.gutter.fgColor</literal></para></listitem>
+ <listitem><para><literal>view.gutter.focusBorderColor</literal></para></listitem>
+ <listitem><para><literal>view.gutter.foldColor</literal></para></listitem>
+ <listitem><para><literal>view.gutter.highlightColor</literal></para></listitem>
+ <listitem><para><literal>view.gutter.markerColor</literal></para></listitem>
+ <listitem><para><literal>view.gutter.noFocusBorderColor</literal></para></listitem>
+ <listitem><para><literal>view.gutter.registerColor</literal></para></listitem>
+ <listitem><para><literal>view.gutter.structureHighlightColor</literal></para></listitem>
+ </itemizedlist>
+ <para>
+ Status bar colors:
+ </para>
+ <itemizedlist>
+ <listitem><para><literal>view.status.background</literal></para></listitem>
+ <listitem><para><literal>view.status.foreground</literal></para></listitem>
+ <listitem><para><literal>view.status.memory.background</literal></para></listitem>
+ <listitem><para><literal>view.status.memory.foreground</literal></para></listitem>
+ </itemizedlist>
+ <para>
+ </para><para>
+ Structure highlight colors:
+ </para><itemizedlist>
+ <listitem><para><literal>view.structureHighlightColor</literal></para></listitem>
+ <listitem><para><literal>view.structureHighlightColor</literal></para></listitem>
+ </itemizedlist>
+ <para>
+ Style colors. Use <classname>GUIUtilities.parseStyle</classname> for these.
+ </para>
+ <itemizedlist>
+ <listitem><para><literal>view.style.comment1</literal></para></listitem>
+ <listitem><para><literal>view.style.comment2</literal></para></listitem>
+ <listitem><para><literal>view.style.comment3</literal></para></listitem>
+ <listitem><para><literal>view.style.comment4</literal></para></listitem>
+ <listitem><para><literal>view.style.digit</literal></para></listitem>
+ <listitem><para><literal>view.style.foldLine.0</literal></para></listitem>
+ <listitem><para><literal>view.style.foldLine.1</literal></para></listitem>
+ <listitem><para><literal>view.style.foldLine.2</literal></para></listitem>
+ <listitem><para><literal>view.style.foldLine.3</literal></para></listitem>
+ <listitem><para><literal>view.style.function</literal></para></listitem>
+ <listitem><para><literal>view.style.invalid</literal></para></listitem>
+ <listitem><para><literal>view.style.keyword1</literal></para></listitem>
+ <listitem><para><literal>view.style.keyword2</literal></para></listitem>
+ <listitem><para><literal>view.style.keyword3</literal></para></listitem>
+ <listitem><para><literal>view.style.keyword4</literal></para></listitem>
+ <listitem><para><literal>view.style.label</literal></para></listitem>
+ <listitem><para><literal>view.style.literal1</literal></para></listitem>
+ <listitem><para><literal>view.style.literal2</literal></para></listitem>
+ <listitem><para><literal>view.style.literal3</literal></para></listitem>
+ <listitem><para><literal>view.style.literal4</literal></para></listitem>
+ <listitem><para><literal>view.style.markup</literal></para></listitem>
+ <listitem><para><literal>view.style.operator</literal></para></listitem>
+ <listitem><para><literal>view.wrapGuideColor</literal></para></listitem>
+ </itemizedlist>
+ <para>
+ For example, here is a setting for a fold line color:
+ </para>
+ <programlisting>
+ view.style.foldLine.0=color\:\#000000 bgColor\:\#f5deb8 style\:b
+ </programlisting>
+ <para>
+ Passing the value to <classname>GUIUtilities.parseStyle</classname> will
+ return a SyntaxStyle object, which you can query for background color,
+ foreground color, and font.
+ </para>
+ </section>
+</chapter>
diff --git a/jEdit/doc/users-guide/regexps.xml b/jEdit/doc/users-guide/regexps.xml
index a5fab29..6ab6983 100644
--- a/jEdit/doc/users-guide/regexps.xml
+++ b/jEdit/doc/users-guide/regexps.xml
@@ -1,252 +1,257 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<appendix id="regexps">
- <title>Regular Expressions</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=1:noTabs=yes: -->
-
- <!-- :xml.root=users-guide.xml: -->
-
- <para>jEdit 4.3pre5 and later uses regular expressions from <ulink
- url="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">java.util.regex.Pattern</ulink>
- to implement inexact search and replace. Click there to see a complete
- reference guide to all supported meta-characters.</para>
-
- <para>A regular expression consists of a string where some characters are
- given special meaning with regard to pattern matching.</para>
-
- <note>
- <title>Inside XML files</title>
-
- <para>Inside XML files (such as Jedit mode files), it is important that
- you escape XML special characters, such as &, <, >, etc. You
- can use the XML plugin's "characters to entities" to perform this
- mapping.</para>
- </note>
-
- <note>
- <title>Inside Java / beanshell / properties files</title>
-
- <para>Java strings are always parsed by java before they are processed
- by the regular expression engine, so you must make sure that backslashes
- are escaped by an extra backslash (<literal>\\</literal>)</para>
- </note>
-
- <para>Within a regular expression, the following characters have special
- meaning:</para>
-
- <bridgehead renderas="section">Positional Operators</bridgehead>
-
- <itemizedlist>
- <listitem>
- <para><literal>^</literal> matches at the beginning of a line</para>
- </listitem>
-
- <listitem>
- <para><literal>$</literal> matches at the end of a line</para>
- </listitem>
-
- <listitem>
- <para><literal>\B</literal> matches at a non-word break</para>
- </listitem>
-
- <listitem>
- <para><literal>\b</literal> matches at a word boundary</para>
- </listitem>
- </itemizedlist>
-
- <bridgehead renderas="section">One-Character Operators</bridgehead>
-
- <itemizedlist>
- <listitem>
- <para><literal>.</literal> matches any single character</para>
- </listitem>
-
- <listitem>
- <para><literal>\d</literal> matches any decimal digit</para>
- </listitem>
-
- <listitem>
- <para><literal>\D</literal> matches any non-digit</para>
- </listitem>
-
- <listitem>
- <para><literal>\n</literal> matches the newline character</para>
- </listitem>
-
- <listitem>
- <para><literal>\s</literal> matches any whitespace character</para>
- </listitem>
-
- <listitem>
- <para><literal>\S</literal> matches any non-whitespace
- character</para>
- </listitem>
-
- <listitem>
- <para><literal>\t</literal> matches a horizontal tab
- character</para>
- </listitem>
-
- <listitem>
- <para><literal>\w</literal> matches any word (alphanumeric)
- character</para>
- </listitem>
-
- <listitem>
- <para><literal>\W</literal> matches any non-word (alphanumeric)
- character</para>
- </listitem>
-
- <listitem>
- <para><literal>\\</literal> matches the backslash (<quote>\</quote>)
- character</para>
- </listitem>
- </itemizedlist>
-
- <bridgehead renderas="section">Character Class Operator</bridgehead>
-
- <itemizedlist>
- <listitem>
- <para><literal>[<replaceable>abc</replaceable>]</literal> matches
- any character in the set <replaceable>a</replaceable>,
- <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
- </listitem>
-
- <listitem>
- <para><literal>[^<replaceable>abc</replaceable>]</literal> matches
- any character not in the set <replaceable>a</replaceable>,
- <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
- </listitem>
-
- <listitem>
- <para><literal>[<replaceable>a-z</replaceable>]</literal> matches
- any character in the range <replaceable>a</replaceable> to
- <replaceable>z</replaceable>, inclusive. A leading or trailing dash
- will be interpreted literally</para>
- </listitem>
- </itemizedlist>
-
- <bridgehead renderas="section">Subexpressions and Backreferences</bridgehead>
-
- <itemizedlist>
- <listitem>
- <para><literal>(<replaceable>abc</replaceable>)</literal> matches
- whatever the expression <replaceable>abc</replaceable> would match,
- and saves it as a subexpression. Also used for grouping</para>
- </listitem>
-
- <listitem>
- <para><literal>(?:<replaceable>...</replaceable>)</literal> pure
- grouping operator, does not save contents</para>
- </listitem>
-
- <listitem>
- <para><literal>(?#<replaceable>...</replaceable>)</literal> embedded
- comment, ignored by engine</para>
- </listitem>
-
- <listitem>
- <para><literal>(?=<replaceable>...</replaceable>)</literal> positive
- lookahead; the regular expression will match if the text in the
- brackets matches, but that text will not be considered part of the
- match</para>
- </listitem>
-
- <listitem>
- <para><literal>(?!<replaceable>...</replaceable>)</literal> negative
- lookahead; the regular expression will match if the text in the
- brackets does not match, and that text will not be considered part
- of the match</para>
- </listitem>
-
- <listitem>
- <para><literal>\<replaceable>n</replaceable></literal> where 0 <
- <replaceable>n</replaceable> < 10, matches the same thing the
- <replaceable>n</replaceable>th subexpression matched. Can only be
- used in the search string</para>
- </listitem>
-
- <listitem>
- <para><literal>$<replaceable>n</replaceable></literal> where 0 <
- <replaceable>n</replaceable> < 10, substituted with the text
- matched by the <replaceable>n</replaceable>th subexpression. Can
- only be used in the replacement string</para>
- </listitem>
- </itemizedlist>
-
- <bridgehead renderas="section">Branching (Alternation) Operator</bridgehead>
-
- <itemizedlist>
- <listitem>
- <para><literal><replaceable>a</replaceable>|<replaceable>b</replaceable></literal>
- matches whatever the expression <replaceable>a</replaceable> would
- match, or whatever the expression <replaceable>b</replaceable> would
- match.</para>
- </listitem>
- </itemizedlist>
-
- <bridgehead renderas="section">Repeating Operators</bridgehead>
-
- <para>These symbols operate on the previous atomic expression.</para>
-
- <itemizedlist>
- <listitem>
- <para><literal>?</literal> matches the preceding expression or the
- null string</para>
- </listitem>
-
- <listitem>
- <para><literal>*</literal> matches the null string or any number of
- repetitions of the preceding expression</para>
- </listitem>
-
- <listitem>
- <para><literal>+</literal> matches one or more repetitions of the
- preceding expression</para>
- </listitem>
-
- <listitem>
- <para><literal>{<replaceable>m</replaceable>}</literal> matches
- exactly <replaceable>m</replaceable> repetitions of the
- one-character expression</para>
- </listitem>
-
- <listitem>
- <para><literal>{<replaceable>m</replaceable>,<replaceable>n</replaceable>}</literal>
- matches between <replaceable>m</replaceable> and
- <replaceable>n</replaceable> repetitions of the preceding
- expression, inclusive</para>
- </listitem>
-
- <listitem>
- <para><literal>{<replaceable>m</replaceable>,}</literal> matches
- <replaceable>m</replaceable> or more repetitions of the preceding
- expression</para>
- </listitem>
- </itemizedlist>
-
- <bridgehead renderas="section">Stingy (Minimal) Matching</bridgehead>
-
- <para>If a repeating operator (above) is immediately followed by a
- <literal>?</literal>, the repeating operator will stop at the smallest
- number of repetitions that can complete the rest of the match.</para>
- <note>
- <title>On regex search</title>
-
- <para>There are some known issues with the
- <literal>java.util.regex</literal> library, as it stands in
- Sun's Java 1.5 and 1.6. In particular, it is possible to create
- regular expressions that hang the JVM, or cause stack overflow
- errors, which was not as easy to accomplish using the legacy
- <literal>gnu.regexp</literal> library. If you find that
- <literal>gnu.regexp</literal>, used in jEdit 4.2 and earlier, is
- more suitable for your search/replace needs, you can try the
- <emphasis role="bold">XSearch plugin</emphasis>, which still
- uses it and can provide a replacement to the built-in search
- dialog.</para>
- </note>
-
-
+<?xml version="1.0" encoding="UTF-8"?>
+<appendix id="regexps">
+ <title>Regular Expressions</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=1:noTabs=yes: -->
+
+ <!-- :xml.root=users-guide.xml: -->
+
+ <para>jEdit 4.3pre5 and later uses regular expressions from <ulink
+ url="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">java.util.regex.Pattern</ulink>
+ to implement inexact search and replace. Click there to see a complete
+ reference guide to all supported meta-characters.</para>
+
+ <para>A regular expression consists of a string where some characters are
+ given special meaning with regard to pattern matching.</para>
+
+ <note>
+ <title>Inside XML files</title>
+
+ <para>Inside XML files (such as Jedit mode files), it is important that
+ you escape XML special characters, such as &, <, >, etc. You
+ can use the XML plugin's "characters to entities" to perform this
+ mapping.</para>
+ </note>
+
+ <note>
+ <title>Inside Java / beanshell / properties files</title>
+
+ <para>Java strings are always parsed by java before they are processed
+ by the regular expression engine, so you must make sure that backslashes
+ are escaped by an extra backslash (<literal>\\</literal>)</para>
+ </note>
+
+ <para>Within a regular expression, the following characters have special
+ meaning:</para>
+
+ <bridgehead>Positional Operators</bridgehead>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>^</literal> matches at the beginning of a line</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>$</literal> matches at the end of a line</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\B</literal> matches at a non-word break</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\b</literal> matches at a word boundary</para>
+ </listitem>
+ </itemizedlist>
+
+ <bridgehead>One-Character Operators</bridgehead>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>.</literal> matches any single character</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\d</literal> matches any decimal digit</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\D</literal> matches any non-digit</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\n</literal> matches the newline character</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\s</literal> matches any whitespace character</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\xNN</literal> matches hexadecimal character code <literal>NN</literal></para>
+ </listitem>
+
+
+ <listitem>
+ <para><literal>\S</literal> matches any non-whitespace
+ character</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\t</literal> matches a horizontal tab
+ character</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\w</literal> matches any word (alphanumeric)
+ character</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\W</literal> matches any non-word (alphanumeric)
+ character</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\\</literal> matches the backslash (<quote>\</quote>)
+ character</para>
+ </listitem>
+ </itemizedlist>
+
+ <bridgehead>Character Class Operator</bridgehead>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>[<replaceable>abc</replaceable>]</literal> matches
+ any character in the set <replaceable>a</replaceable>,
+ <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
+ </listitem>
+
+ <listitem>
+ <para><literal>[^<replaceable>abc</replaceable>]</literal> matches
+ any character not in the set <replaceable>a</replaceable>,
+ <replaceable>b</replaceable> or <replaceable>c</replaceable></para>
+ </listitem>
+
+ <listitem>
+ <para><literal>[<replaceable>a-z</replaceable>]</literal> matches
+ any character in the range <replaceable>a</replaceable> to
+ <replaceable>z</replaceable>, inclusive. A leading or trailing dash
+ will be interpreted literally</para>
+ </listitem>
+ </itemizedlist>
+
+ <bridgehead>Subexpressions and Backreferences</bridgehead>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>(<replaceable>abc</replaceable>)</literal> matches
+ whatever the expression <replaceable>abc</replaceable> would match,
+ and saves it as a subexpression. Also used for grouping</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>(?:<replaceable>...</replaceable>)</literal> pure
+ grouping operator, does not save contents</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>(?#<replaceable>...</replaceable>)</literal> embedded
+ comment, ignored by engine</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>(?=<replaceable>...</replaceable>)</literal> positive
+ lookahead; the regular expression will match if the text in the
+ brackets matches, but that text will not be considered part of the
+ match</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>(?!<replaceable>...</replaceable>)</literal> negative
+ lookahead; the regular expression will match if the text in the
+ brackets does not match, and that text will not be considered part
+ of the match</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>\<replaceable>n</replaceable></literal> where 0 <
+ <replaceable>n</replaceable> < 10, matches the same thing the
+ <replaceable>n</replaceable>th subexpression matched. Can only be
+ used in the search string</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>$<replaceable>n</replaceable></literal> where 0 <
+ <replaceable>n</replaceable> < 10, substituted with the text
+ matched by the <replaceable>n</replaceable>th subexpression. Can
+ only be used in the replacement string</para>
+ </listitem>
+ </itemizedlist>
+
+ <bridgehead>Branching (Alternation) Operator</bridgehead>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal><replaceable>a</replaceable>|<replaceable>b</replaceable></literal>
+ matches whatever the expression <replaceable>a</replaceable> would
+ match, or whatever the expression <replaceable>b</replaceable> would
+ match.</para>
+ </listitem>
+ </itemizedlist>
+
+ <bridgehead>Repeating Operators</bridgehead>
+
+ <para>These symbols operate on the previous atomic expression.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>?</literal> matches the preceding expression or the
+ null string</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>*</literal> matches the null string or any number of
+ repetitions of the preceding expression</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>+</literal> matches one or more repetitions of the
+ preceding expression</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>{<replaceable>m</replaceable>}</literal> matches
+ exactly <replaceable>m</replaceable> repetitions of the
+ one-character expression</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>{<replaceable>m</replaceable>,<replaceable>n</replaceable>}</literal>
+ matches between <replaceable>m</replaceable> and
+ <replaceable>n</replaceable> repetitions of the preceding
+ expression, inclusive</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>{<replaceable>m</replaceable>,}</literal> matches
+ <replaceable>m</replaceable> or more repetitions of the preceding
+ expression</para>
+ </listitem>
+ </itemizedlist>
+
+ <bridgehead>Stingy (Minimal) Matching</bridgehead>
+
+ <para>If a repeating operator (above) is immediately followed by a
+ <literal>?</literal>, the repeating operator will stop at the smallest
+ number of repetitions that can complete the rest of the match.</para>
+ <note>
+ <title>On regex search</title>
+
+ <para>There are some known issues with the
+ <literal>java.util.regex</literal> library, as it stands in
+ Sun's Java 1.5 and 1.6. In particular, it is possible to create
+ regular expressions that hang the JVM, or cause stack overflow
+ errors, which was not as easy to accomplish using the legacy
+ <literal>gnu.regexp</literal> library. If you find that
+ <literal>gnu.regexp</literal>, used in jEdit 4.2 and earlier, is
+ more suitable for your search/replace needs, you can try the
+ <emphasis role="bold">XSearch plugin</emphasis>, which still
+ uses it and can provide a replacement to the built-in search
+ dialog.</para>
+ </note>
+
+
</appendix>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/shortcuts.xml b/jEdit/doc/users-guide/shortcuts.xml
index 0daade5..e30e467 100644
--- a/jEdit/doc/users-guide/shortcuts.xml
+++ b/jEdit/doc/users-guide/shortcuts.xml
@@ -1,981 +1,995 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<appendix id="shortcuts">
- <title>Keyboard Shortcuts</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :tabSize=1:indentSize=1:noTabs=true: -->
-
- <!-- :xml.root=users-guide.xml: -->
-
- <para>This appendix documents the default set of keyboard shortcuts. They
- can be customized to suit your taste in the <guibutton>Shortcuts</guibutton>
- pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref linkend="global-opts" />.</para>
-
- <bridgehead renderas="section">Files</bridgehead>
-
- <para>For details, see <xref linkend="buffers" />, <xref linkend="views" />
- and <xref linkend="files" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+n</keycap></entry>
-
- <entry>New file.</entry>
- </row>
-
- <row>
- <entry><keycap>C+o</keycap></entry>
-
- <entry>Open file.</entry>
- </row>
-
- <row>
- <entry><keycap>C+w</keycap></entry>
-
- <entry>Close buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+w</keycap></entry>
-
- <entry>Close all buffers.</entry>
- </row>
-
- <row>
- <entry><keycap>C+s</keycap></entry>
-
- <entry>Save buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+s</keycap></entry>
-
- <entry>Save all buffers.</entry>
- </row>
-
- <row>
- <entry><keycap>C+p</keycap></entry>
-
- <entry>Print buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+PAGE_UP</keycap></entry>
-
- <entry>Go to previous buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+PAGE_DOWN</keycap></entry>
-
- <entry>Go to next buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+`</keycap></entry>
-
- <entry>Go to recent buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>A+`</keycap></entry>
-
- <entry>Show buffer switcher.</entry>
- </row>
-
- <row>
- <entry><keycap>C+q</keycap></entry>
-
- <entry>Exit jEdit.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Views</bridgehead>
-
- <para>For details, see <xref linkend="views" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+e C+t</keycap></entry>
-
- <entry>Turn gutter (line numbering) on and off.</entry>
- </row>
-
- <row>
- <entry><keycap>C+0</keycap></entry>
-
- <entry>Remove split containing current text area
- only.</entry>
- </row>
-
- <row>
- <entry><keycap>C+1</keycap></entry>
-
- <entry>Remove all splits.</entry>
- </row>
-
- <row>
- <entry><keycap>C+2</keycap></entry>
-
- <entry>Split view horizontally.</entry>
- </row>
-
- <row>
- <entry><keycap>C+3</keycap></entry>
-
- <entry>Split view vertically.</entry>
- </row>
-
- <row>
- <entry><keycap>A+PAGE_UP</keycap></entry>
-
- <entry>Send keyboard focus to previous text area.</entry>
- </row>
-
- <row>
- <entry><keycap>A+PAGE_DOWN</keycap></entry>
-
- <entry>Send keyboard focus to next text area.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e UP</keycap>; <keycap>LEFT</keycap>;
- <keycap>DOWN</keycap>; <keycap>RIGHT</keycap></entry>
-
- <entry>Send keyboard focus to top; bottom; left; right
- docking area.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+`</keycap></entry>
-
- <entry>Close currently focused docking area.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Action Bar</bridgehead>
-
- <para>For details, see <xref linkend="action-bar" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+ENTER</keycap></entry>
-
- <entry>Display the action bar and give it keyboard
- focus.</entry>
- </row>
-
- <row>
- <entry><keycap>C+SPACE</keycap></entry>
-
- <entry>Repeat last editor action.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Moving the Caret</bridgehead>
-
- <para>For details, see <xref linkend="caret" />, <xref linkend="words" />,
- <xref linkend="lines" />, <xref linkend="paragraphs" /> and <xref
- linkend="bracket-matching" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap><replaceable>Arrow</replaceable></keycap></entry>
-
- <entry>Move caret one character or line.</entry>
- </row>
-
- <row>
- <entry><keycap>C+<replaceable>Arrow</replaceable></keycap></entry>
-
- <entry>Move caret one word or paragraph.</entry>
- </row>
-
- <row>
- <entry><keycap>PAGE_UP</keycap>;
- <keycap>PAGE_DOWN</keycap></entry>
-
- <entry>Move caret one screenful.</entry>
- </row>
-
- <row>
- <entry><keycap>HOME</keycap></entry>
-
- <entry>First non-whitespace character of line, beginning of
- line, first visible line (repeated presses).</entry>
- </row>
-
- <row>
- <entry><keycap>END</keycap></entry>
-
- <entry>Last non-whitespace character of line, end of line,
- last visible line (repeated presses).</entry>
- </row>
-
- <row>
- <entry><keycap>C+HOME</keycap></entry>
-
- <entry>Beginning of buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+END</keycap></entry>
-
- <entry>End of buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+]</keycap></entry>
-
- <entry>Go to matching bracket.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e [</keycap>; <keycap>]</keycap></entry>
-
- <entry>Go to previous; next bracket.</entry>
- </row>
-
- <row>
- <entry><keycap>C+l</keycap></entry>
-
- <entry>Go to line.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Selecting Text</bridgehead>
-
- <para>For details, see <xref linkend="selection" />, <xref
- linkend="words" />, <xref linkend="lines" />, <xref linkend="paragraphs" />
- and <xref linkend="bracket-matching" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>S+<replaceable>Arrow</replaceable></keycap></entry>
-
- <entry>Extend selection by one character or line.</entry>
- </row>
-
- <row>
- <entry><keycap>CS+<replaceable>Arrow</replaceable></keycap></entry>
-
- <entry>Extend selection by one word or paragraph.</entry>
- </row>
-
- <row>
- <entry><keycap>S+PAGE_UP</keycap>;
- <keycap>S+PAGE_DOWN</keycap></entry>
-
- <entry>Extend selection by one screenful.</entry>
- </row>
-
- <row>
- <entry><keycap>S+HOME</keycap></entry>
-
- <entry>Extend selection to first non-whitespace character of
- line, beginning of line, first visible line (repeated
- presses).</entry>
- </row>
-
- <row>
- <entry><keycap>S+END</keycap></entry>
-
- <entry>Extend selection to last non-whitespace character of
- line, end of line, last visible line (repeated
- presses).</entry>
- </row>
-
- <row>
- <entry><keycap>CS+HOME</keycap></entry>
-
- <entry>Extend selection to beginning of buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>CS+END</keycap></entry>
-
- <entry>Extend selection to end of buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+[</keycap></entry>
-
- <entry>Select code block.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e w</keycap>; <keycap>l</keycap>;
- <keycap>p</keycap></entry>
-
- <entry>Select word; line; paragraph.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+l</keycap></entry>
-
- <entry>Select line range.</entry>
- </row>
-
- <row>
- <entry><keycap>C+a</keycap></entry>
-
- <entry>Select all.</entry>
- </row>
-
- <row>
- <entry><keycap>ESCAPE</keycap></entry>
-
- <entry>Select none.</entry>
- </row>
-
- <row>
- <entry><keycap>A+\</keycap></entry>
-
- <entry>Switch between range and rectangular selection
- mode.</entry>
- </row>
-
- <row>
- <entry><keycap>C+\</keycap></entry>
-
- <entry>Switch between single and multiple selection
- mode.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e i</keycap></entry>
-
- <entry>Invert selection.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Scrolling</bridgehead>
-
- <para>For details, see <xref linkend="views" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+e C+j</keycap></entry>
-
- <entry>Ensure current line is visible, and send focus to the
- text area.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+n</keycap></entry>
-
- <entry>Center caret on screen.</entry>
- </row>
-
- <row>
- <entry><keycap>C+'</keycap>; <keycap>C+/</keycap></entry>
-
- <entry>Scroll up; down one line.</entry>
- </row>
-
- <row>
- <entry><keycap>A+'</keycap>; <keycap>A+/</keycap></entry>
-
- <entry>Scroll up; down one page.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Text Editing</bridgehead>
-
- <para>For details, see <xref linkend="undo-redo" />, <xref
- linkend="entering-text" />, <xref linkend="words" />, <xref
- linkend="lines" /> and <xref linkend="paragraphs" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+z</keycap></entry>
-
- <entry>Undo.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+z</keycap></entry>
-
- <entry>Redo.</entry>
- </row>
-
- <row>
- <entry><keycap>BACK_SPACE</keycap>;
- <keycap>DELETE</keycap></entry>
-
- <entry>Delete character before; after caret.</entry>
- </row>
-
- <row>
- <entry><keycap>C+BACK_SPACE</keycap>;
- <keycap>C+DELETE</keycap></entry>
-
- <entry>Delete word before; after caret.</entry>
- </row>
-
- <row>
- <entry><keycap>C+d</keycap>; <keycap>C+e d</keycap></entry>
-
- <entry>Delete line; paragraph.</entry>
- </row>
-
- <row>
- <entry><keycap>CS+BACK_SPACE</keycap>;
- <keycap>CS+DELETE</keycap></entry>
-
- <entry>Delete from caret to beginning; end of line.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e r</keycap></entry>
-
- <entry>Remove trailing whitespace from the current line (or
- all selected lines).</entry>
- </row>
-
- <row>
- <entry><keycap>C+j</keycap></entry>
-
- <entry>Join lines.</entry>
- </row>
-
- <row>
- <entry><keycap>C+b</keycap></entry>
-
- <entry>Complete word.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e f</keycap></entry>
-
- <entry>Format paragraph (or selection).</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Clipboard and Registers</bridgehead>
-
- <para>For details, see <xref linkend="text-transfer" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+x</keycap> or
- <keycap>S+DELETE</keycap></entry>
-
- <entry>Cut selected text to clipboard.</entry>
- </row>
-
- <row>
- <entry><keycap>C+c</keycap> or
- <keycap>C+INSERT</keycap></entry>
-
- <entry>Copy selected text to clipboard.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+u</keycap></entry>
-
- <entry>Append selected text to clipboard, removing it from
- the buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+a</keycap></entry>
-
- <entry>Append selected text to clipboard, leaving it in the
- buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+v</keycap> or
- <keycap>S+INSERT</keycap></entry>
-
- <entry>Paste clipboard contents.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+p</keycap></entry>
-
- <entry>Vertically paste clipboard contents.</entry>
- </row>
-
- <row>
- <entry><keycap>C+r C+x
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Cut selected text to register
- <replaceable>key</replaceable>.</entry>
- </row>
-
- <row>
- <entry><keycap>C+r C+c
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Copy selected text to register
- <replaceable>key</replaceable>.</entry>
- </row>
-
- <row>
- <entry><keycap>C+r C+u
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Append selected text to register
- <replaceable>key</replaceable>, removing it from the
- buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+r C+a
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Append selected text to register
- <replaceable>key</replaceable>, leaving it in the
- buffer.</entry>
- </row>
-
- <row>
- <entry><keycap>C+r C+v
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Paste contents of register
- <replaceable>key</replaceable>.</entry>
- </row>
-
- <row>
- <entry><keycap>C+r C+p
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Vertically paste contents of register
- <replaceable>key</replaceable>.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+v</keycap></entry>
-
- <entry>Paste previous.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+y</keycap></entry>
-
- <entry>Paste deleted.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Markers</bridgehead>
-
- <para>For details, see <xref linkend="markers" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+e C+m</keycap></entry>
-
- <entry>If current line doesn't contain a marker, one will be
- added. Otherwise, the existing marker will be removed. Use
- the <guimenu>Markers</guimenu> menu to return to markers
- added in this manner.</entry>
- </row>
-
- <row>
- <entry><keycap>C+t
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Add marker with shortcut
- <replaceable>key</replaceable>.</entry>
- </row>
-
- <row>
- <entry><keycap>C+y
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Go to marker with shortcut
- <replaceable>key</replaceable>.</entry>
- </row>
-
- <row>
- <entry><keycap>C+u
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Select to marker with shortcut
- <replaceable>key</replaceable>.</entry>
- </row>
-
- <row>
- <entry><keycap>C+k
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Go to marker with shortcut
- <replaceable>key</replaceable>, and move the marker to the
- previous caret position.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+,</keycap>; <keycap>C+e
- C+.</keycap></entry>
-
- <entry>Move caret to previous; next marker.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Search and Replace</bridgehead>
-
- <para>For details, see <xref linkend="search-replace" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+f</keycap></entry>
-
- <entry>Open search and replace dialog box.</entry>
- </row>
-
- <row>
- <entry><keycap>C+g</keycap></entry>
-
- <entry>Find next.</entry>
- </row>
-
- <row>
- <entry><keycap>C+h</keycap></entry>
-
- <entry>Find previous.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+b</keycap></entry>
-
- <entry>Search in open buffers.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+d</keycap></entry>
-
- <entry>Search in directory.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+r</keycap></entry>
-
- <entry>Replace in selection.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+g</keycap></entry>
-
- <entry>Replace in selection and find next.</entry>
- </row>
-
- <row>
- <entry><keycap>C+,</keycap></entry>
-
- <entry>Incremental search bar.</entry>
- </row>
-
- <row>
- <entry><keycap>A+,</keycap></entry>
-
- <entry>HyperSearch bar.</entry>
- </row>
-
- <row>
- <entry><keycap>C+.</keycap></entry>
-
- <entry>Incremental search for word under the caret.</entry>
- </row>
-
- <row>
- <entry><keycap>A+.</keycap></entry>
-
- <entry>HyperSearch for word under the caret.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+i</keycap></entry>
-
- <entry>Toggle ignore case.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+x</keycap></entry>
-
- <entry>Toggle regular expressions.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Source Code Editing</bridgehead>
-
- <para>For details, see <xref linkend="abbrevs" />, <xref linkend="indent" />
- and <xref linkend="commenting" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+;</keycap></entry>
-
- <entry>Expand abbreviation.</entry>
- </row>
-
- <row>
- <entry><keycap>A+LEFT</keycap>;
- <keycap>A+RIGHT</keycap></entry>
-
- <entry>Shift current line (or all selected lines) left;
- right.</entry>
- </row>
-
- <row>
- <entry><keycap>S+TAB</keycap>; <keycap>TAB</keycap></entry>
-
- <entry>Shift selected lines left; right. Note that pressing
- <keycap>TAB</keycap> with no selection active will insert a
- tab character at the caret position.</entry>
- </row>
-
- <row>
- <entry><keycap>C+i</keycap></entry>
-
- <entry>Indent current line (or all selected lines).</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+c</keycap></entry>
-
- <entry>Range comment selection.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e C+k</keycap></entry>
-
- <entry>Line comment selection.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Folding and Narrowing</bridgehead>
-
- <para>For details, see <xref linkend="folding" /> and <xref
- linkend="narrowing" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>A+BACK_SPACE</keycap></entry>
-
- <entry>Collapse fold containing caret.</entry>
- </row>
-
- <row>
- <entry><keycap>A+ENTER</keycap></entry>
-
- <entry>Expand fold containing caret one level only.</entry>
- </row>
-
- <row>
- <entry><keycap>AS+ENTER</keycap></entry>
-
- <entry>Expand fold containing caret fully.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e x</keycap></entry>
-
- <entry>Expand all folds.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e a</keycap></entry>
-
- <entry>Add explicit fold.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e s</keycap></entry>
-
- <entry>Select fold.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e ENTER
- <replaceable>key</replaceable></keycap></entry>
-
- <entry>Expand folds with level less than
- <replaceable>key</replaceable>, collapse all others.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e n n</keycap></entry>
-
- <entry>Narrow to fold.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e n s</keycap></entry>
-
- <entry>Narrow to selection.</entry>
- </row>
-
- <row>
- <entry><keycap>A+UP</keycap>;
- <keycap>A+DOWN</keycap></entry>
-
- <entry>Moves caret to previous; next fold.</entry>
- </row>
-
- <row>
- <entry><keycap>C+e u</keycap></entry>
-
- <entry>Moves caret to the parent fold of the one containing
- the caret.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Macros</bridgehead>
-
- <para>For details, see <xref linkend="using-macros" />.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>C+m C+r</keycap></entry>
-
- <entry>Record macro.</entry>
- </row>
-
- <row>
- <entry><keycap>C+m C+m</keycap></entry>
-
- <entry>Record temporary macro.</entry>
- </row>
-
- <row>
- <entry><keycap>C+m C+s</keycap></entry>
-
- <entry>Stop recording.</entry>
- </row>
-
- <row>
- <entry><keycap>C+m C+p</keycap></entry>
-
- <entry>Run temporary macro.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <bridgehead renderas="section">Alternative Shortcuts</bridgehead>
-
- <para>A few frequently-used commands have alternative shortcuts intended to
- help you keep your hands from moving all over the keyboard.</para>
-
- <informaltable frame="none">
- <tgroup cols="2">
- <colspec colnum="1" colwidth="2.2in" />
-
- <tbody>
- <row>
- <entry><keycap>A+j</keycap>; <keycap>A+l</keycap></entry>
-
- <entry>Move caret to previous, next character.</entry>
- </row>
-
- <row>
- <entry><keycap>A+i</keycap>; <keycap>A+k</keycap></entry>
-
- <entry>Move caret up, down one line.</entry>
- </row>
-
- <row>
- <entry><keycap>A+q</keycap>; <keycap>A+a</keycap></entry>
-
- <entry>Move caret up, down one screenful.</entry>
- </row>
-
- <row>
- <entry><keycap>A+z</keycap></entry>
-
- <entry>First non-whitespace character of line, beginning of
- line, first visible line (repeated presses).</entry>
- </row>
-
- <row>
- <entry><keycap>A+x</keycap></entry>
-
- <entry>Last non-whitespace character of line, end of line,
- last visible line (repeated presses).</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-</appendix>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<appendix id="shortcuts">
+ <title>Keyboard Shortcuts</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :tabSize=1:indentSize=1:noTabs=true: -->
+
+ <!-- :xml.root=users-guide.xml: -->
+
+ <para>This appendix documents the default set of keyboard shortcuts. They
+ can be customized to suit your taste in the <guibutton>Shortcuts</guibutton>
+ pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref linkend="global-opts" />.</para>
+
+ <bridgehead>Files</bridgehead>
+
+ <para>For details, see <xref linkend="buffers" />, <xref linkend="views" />
+ and <xref linkend="files" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+n</keycap></entry>
+
+ <entry>New file.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+o</keycap></entry>
+
+ <entry>Open file.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+w</keycap></entry>
+
+ <entry>Close buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+w</keycap></entry>
+
+ <entry>Close all buffers.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+s</keycap></entry>
+
+ <entry>Save buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+s</keycap></entry>
+
+ <entry>Save all buffers.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+p</keycap></entry>
+
+ <entry>Print buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+PAGE_UP</keycap></entry>
+
+ <entry>Go to previous buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+PAGE_DOWN</keycap></entry>
+
+ <entry>Go to next buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+`</keycap></entry>
+
+ <entry>Go to recent buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+`</keycap></entry>
+
+ <entry>Show buffer switcher.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+q</keycap></entry>
+
+ <entry>Exit jEdit.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Views</bridgehead>
+
+ <para>For details, see <xref linkend="views" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+e C+t</keycap></entry>
+
+ <entry>Turn gutter (line numbering) on and off.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+0</keycap></entry>
+
+ <entry>Remove split containing current text area
+ only.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+1</keycap></entry>
+
+ <entry>Remove all splits.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+2</keycap></entry>
+
+ <entry>Split view horizontally.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+3</keycap></entry>
+
+ <entry>Split view vertically.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+PAGE_UP</keycap></entry>
+
+ <entry>Send keyboard focus to previous text area.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+PAGE_DOWN</keycap></entry>
+
+ <entry>Send keyboard focus to next text area.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e UP</keycap>; <keycap>LEFT</keycap>;
+ <keycap>DOWN</keycap>; <keycap>RIGHT</keycap></entry>
+
+ <entry>Send keyboard focus to top; bottom; left; right
+ docking area.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+`</keycap></entry>
+
+ <entry>Close currently focused docking area.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Action Bar</bridgehead>
+
+ <para>For details, see <xref linkend="action-bar" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+ENTER</keycap></entry>
+
+ <entry>Display the action bar and give it keyboard
+ focus.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+SPACE</keycap></entry>
+
+ <entry>Repeat last editor action.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Moving the Caret</bridgehead>
+
+ <para>For details, see <xref linkend="caret" />, <xref linkend="words" />,
+ <xref linkend="lines" />, <xref linkend="paragraphs" /> and <xref
+ linkend="bracket-matching" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap><replaceable>Arrow</replaceable></keycap></entry>
+
+ <entry>Move caret one character or line.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+<replaceable>Arrow</replaceable></keycap></entry>
+
+ <entry>Move caret one word or paragraph.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>PAGE_UP</keycap>;
+ <keycap>PAGE_DOWN</keycap></entry>
+
+ <entry>Move caret one screenful.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>HOME</keycap></entry>
+
+ <entry>First non-whitespace character of line, beginning of
+ line, first visible line (repeated presses).</entry>
+ </row>
+
+ <row>
+ <entry><keycap>END</keycap></entry>
+
+ <entry>Last non-whitespace character of line, end of line,
+ last visible line (repeated presses).</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+HOME</keycap></entry>
+
+ <entry>Beginning of buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+END</keycap></entry>
+
+ <entry>End of buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+]</keycap></entry>
+
+ <entry>Go to matching bracket.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e [</keycap>; <keycap>]</keycap></entry>
+
+ <entry>Go to previous; next bracket.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+l</keycap></entry>
+
+ <entry>Go to line.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Selecting Text</bridgehead>
+
+ <para>For details, see <xref linkend="selection" />, <xref
+ linkend="words" />, <xref linkend="lines" />, <xref linkend="paragraphs" />
+ and <xref linkend="bracket-matching" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>S+<replaceable>Arrow</replaceable></keycap></entry>
+
+ <entry>Extend selection by one character or line.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>CS+<replaceable>Arrow</replaceable></keycap></entry>
+
+ <entry>Extend selection by one word or paragraph.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>S+PAGE_UP</keycap>;
+ <keycap>S+PAGE_DOWN</keycap></entry>
+
+ <entry>Extend selection by one screenful.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>S+HOME</keycap></entry>
+
+ <entry>Extend selection to first non-whitespace character of
+ line, beginning of line, first visible line (repeated
+ presses).</entry>
+ </row>
+
+ <row>
+ <entry><keycap>S+END</keycap></entry>
+
+ <entry>Extend selection to last non-whitespace character of
+ line, end of line, last visible line (repeated
+ presses).</entry>
+ </row>
+
+ <row>
+ <entry><keycap>CS+HOME</keycap></entry>
+
+ <entry>Extend selection to beginning of buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>CS+END</keycap></entry>
+
+ <entry>Extend selection to end of buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+[</keycap></entry>
+
+ <entry>Select code block.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e w</keycap>; <keycap>l</keycap>;
+ <keycap>p</keycap></entry>
+
+ <entry>Select word; line; paragraph.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+l</keycap></entry>
+
+ <entry>Select line range.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+a</keycap></entry>
+
+ <entry>Select all.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>ESCAPE</keycap></entry>
+
+ <entry>Select none.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+\</keycap></entry>
+
+ <entry>Switch between range and rectangular selection
+ mode.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+\</keycap></entry>
+
+ <entry>Switch between single and multiple selection
+ mode.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e i</keycap></entry>
+
+ <entry>Invert selection.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Scrolling</bridgehead>
+
+ <para>For details, see <xref linkend="views" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+e C+j</keycap></entry>
+
+ <entry>Ensure current line is visible, and send focus to the
+ text area.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+n</keycap></entry>
+
+ <entry>Center caret on screen.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+'</keycap>; <keycap>C+/</keycap></entry>
+
+ <entry>Scroll up; down one line.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+'</keycap>; <keycap>A+/</keycap></entry>
+
+ <entry>Scroll up; down one page.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Text Editing</bridgehead>
+
+ <para>For details, see <xref linkend="undo-redo" />, <xref
+ linkend="entering-text" />, <xref linkend="words" />, <xref
+ linkend="lines" /> and <xref linkend="paragraphs" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+z</keycap></entry>
+
+ <entry>Undo.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+z</keycap></entry>
+
+ <entry>Redo.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>BACK_SPACE</keycap>;
+ <keycap>DELETE</keycap></entry>
+
+ <entry>Delete character before; after caret.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+BACK_SPACE</keycap>;
+ <keycap>C+DELETE</keycap></entry>
+
+ <entry>Delete word before; after caret.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+d</keycap>; <keycap>C+e d</keycap></entry>
+
+ <entry>Delete line; paragraph.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>CS+BACK_SPACE</keycap>;
+ <keycap>CS+DELETE</keycap></entry>
+
+ <entry>Delete from caret to beginning; end of line.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e r</keycap></entry>
+
+ <entry>Remove trailing whitespace from the current line (or
+ all selected lines).</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+j</keycap></entry>
+
+ <entry>Join lines.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+b</keycap></entry>
+
+ <entry>Complete word.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e f</keycap></entry>
+
+ <entry>Format paragraph (or selection).</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Clipboard and Registers</bridgehead>
+
+ <para>For details, see <xref linkend="text-transfer" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+x</keycap> or
+ <keycap>S+DELETE</keycap></entry>
+
+ <entry>Cut selected text to clipboard.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+c</keycap> or
+ <keycap>C+INSERT</keycap></entry>
+
+ <entry>Copy selected text to clipboard.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+u</keycap></entry>
+
+ <entry>Append selected text to clipboard, removing it from
+ the buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+a</keycap></entry>
+
+ <entry>Append selected text to clipboard, leaving it in the
+ buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+v</keycap> or
+ <keycap>S+INSERT</keycap></entry>
+
+ <entry>Paste clipboard contents.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+p</keycap></entry>
+
+ <entry>Vertically paste clipboard contents.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+r C+x
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Cut selected text to register
+ <replaceable>key</replaceable>.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+r C+c
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Copy selected text to register
+ <replaceable>key</replaceable>.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+r C+u
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Append selected text to register
+ <replaceable>key</replaceable>, removing it from the
+ buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+r C+a
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Append selected text to register
+ <replaceable>key</replaceable>, leaving it in the
+ buffer.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+r C+v
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Paste contents of register
+ <replaceable>key</replaceable>.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+r C+p
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Vertically paste contents of register
+ <replaceable>key</replaceable>.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+v</keycap></entry>
+
+ <entry>Paste previous.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+y</keycap></entry>
+
+ <entry>Paste deleted.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Markers</bridgehead>
+
+ <para>For details, see <xref linkend="markers" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+e C+m</keycap></entry>
+
+ <entry>If current line doesn't contain a marker, one will be
+ added. Otherwise, the existing marker will be removed. Use
+ the <guimenu>Markers</guimenu> menu to return to markers
+ added in this manner.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+t
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Add marker with shortcut
+ <replaceable>key</replaceable>.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+y
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Go to marker with shortcut
+ <replaceable>key</replaceable>.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+u
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Select to marker with shortcut
+ <replaceable>key</replaceable>.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+k
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Go to marker with shortcut
+ <replaceable>key</replaceable>, and move the marker to the
+ previous caret position.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+,</keycap>; <keycap>C+e
+ C+.</keycap></entry>
+
+ <entry>Move caret to previous; next marker.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Search and Replace</bridgehead>
+
+ <para>For details, see <xref linkend="search-replace" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+f</keycap></entry>
+
+ <entry>Open search and replace dialog box.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+g</keycap></entry>
+
+ <entry>Find next.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+h</keycap></entry>
+
+ <entry>Find previous.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+b</keycap></entry>
+
+ <entry>Search in open buffers.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+d</keycap></entry>
+
+ <entry>Search in directory.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+r</keycap></entry>
+
+ <entry>Replace in selection.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+g</keycap></entry>
+
+ <entry>Replace in selection and find next.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+,</keycap></entry>
+
+ <entry>Incremental search bar.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+,</keycap></entry>
+
+ <entry>HyperSearch bar.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+.</keycap></entry>
+
+ <entry>Incremental search for word under the caret.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+.</keycap></entry>
+
+ <entry>HyperSearch for word under the caret.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+i</keycap></entry>
+
+ <entry>Toggle ignore case.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+x</keycap></entry>
+
+ <entry>Toggle regular expressions.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Source Code Editing</bridgehead>
+
+ <para>For details, see <xref linkend="abbrevs" />, <xref linkend="indent" />
+ and <xref linkend="commenting" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+;</keycap></entry>
+
+ <entry>Expand abbreviation.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+LEFT</keycap>;
+ <keycap>A+RIGHT</keycap></entry>
+
+ <entry>Shift current line (or all selected lines) left;
+ right.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>S+TAB</keycap>; <keycap>TAB</keycap></entry>
+
+ <entry>Shift selected lines left; right. Note that pressing
+ <keycap>TAB</keycap> with no selection active will insert a
+ tab character at the caret position.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+i</keycap></entry>
+
+ <entry>Indent current line (or all selected lines).</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+c</keycap></entry>
+
+ <entry>Range comment selection.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e C+k</keycap></entry>
+
+ <entry>Line comment selection.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Folding and Narrowing</bridgehead>
+
+ <para>For details, see <xref linkend="folding" /> and <xref
+ linkend="narrowing" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>A+BACK_SPACE</keycap></entry>
+
+ <entry>Collapse fold containing caret.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+ENTER</keycap></entry>
+
+ <entry>Expand fold containing caret one level only.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>AS+ENTER</keycap></entry>
+
+ <entry>Expand fold containing caret fully.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e x</keycap></entry>
+
+ <entry>Expand all folds.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e a</keycap></entry>
+
+ <entry>Add explicit fold.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e s</keycap></entry>
+
+ <entry>Select fold.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e ENTER
+ <replaceable>key</replaceable></keycap></entry>
+
+ <entry>Expand folds with level less than
+ <replaceable>key</replaceable>, collapse all others.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e n n</keycap></entry>
+
+ <entry>Narrow to fold.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e n s</keycap></entry>
+
+ <entry>Narrow to selection.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+UP</keycap>;
+ <keycap>A+DOWN</keycap></entry>
+
+ <entry>Moves caret to previous; next fold.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+e u</keycap></entry>
+
+ <entry>Moves caret to the parent fold of the one containing
+ the caret.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Macros</bridgehead>
+
+ <para>For details, see <xref linkend="using-macros" />.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>C+m C+r</keycap></entry>
+
+ <entry>Record macro.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+m C+m</keycap></entry>
+
+ <entry>Record temporary macro.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+m C+s</keycap></entry>
+
+ <entry>Stop recording.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>C+m C+p</keycap></entry>
+
+ <entry>Run temporary macro.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <bridgehead>Alternative Shortcuts</bridgehead>
+
+ <para>A few frequently-used commands have alternative shortcuts intended to
+ help you keep your hands from moving all over the keyboard.</para>
+
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2.2in" />
+ <colspec colwidth="*"/>
+
+ <tbody>
+ <row>
+ <entry><keycap>A+j</keycap>; <keycap>A+l</keycap></entry>
+
+ <entry>Move caret to previous, next character.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+i</keycap>; <keycap>A+k</keycap></entry>
+
+ <entry>Move caret up, down one line.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+q</keycap>; <keycap>A+a</keycap></entry>
+
+ <entry>Move caret up, down one screenful.</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+z</keycap></entry>
+
+ <entry>First non-whitespace character of line, beginning of
+ line, first visible line (repeated presses).</entry>
+ </row>
+
+ <row>
+ <entry><keycap>A+x</keycap></entry>
+
+ <entry>Last non-whitespace character of line, end of line,
+ last visible line (repeated presses).</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</appendix>
diff --git a/jEdit/doc/users-guide/source-edit.xml b/jEdit/doc/users-guide/source-edit.xml
index 99e53e5..eee9257 100644
--- a/jEdit/doc/users-guide/source-edit.xml
+++ b/jEdit/doc/users-guide/source-edit.xml
@@ -1,622 +1,622 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="source-edit">
- <title>Editing Source Code</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=80: -->
-
- <!-- :xml.root=users-guide.xml: -->
-
- <section id="modes">
- <title>Edit Modes</title>
-
- <para>An <firstterm>edit mode</firstterm> specifies syntax highlighting
- rules, auto indent behavior, and various other customizations for
- editing a certain file type. This section only covers using existing
- edit modes; information about writing your own can be found in <xref
- linkend="writing-modes-part" />.</para>
-
- <para>When a file is opened, jEdit first checks the file name against a
- list of known patterns. For example, files whose names end with
- <filename>.c</filename> are opened with C mode, and files named
- <filename>Makefile</filename> are opened with Makefile mode. If a
- suitable match based on file name cannot be found, jEdit checks the
- first line of the file. For example, files whose first line is
- <filename>#!/bin/sh</filename> are opened with shell script mode.</para>
-
- <section id="mode-selection">
- <title>Mode Selection</title>
-
- <para>File name and first line matching is done using glob patterns
- similar to those used in Unix shells. Glob patterns associated with
- edit modes can be changed in the <guibutton>Editing</guibutton> pane
- of the <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. Note that the glob patterns must
- match the file name or first line exactly; so to match files whose
- first line contains <literal>begin</literal>, you must use a first
- line glob of <literal>*begin*</literal>. See <xref
- linkend="globs" /> for a description of glob pattern syntax.</para>
-
- <para>The default edit mode for files which do not match any pattern
- can be set in the <guibutton>Editing</guibutton> pane as
- well.</para>
-
- <para>The edit mode can be specified manually as well. The current
- buffer's edit mode can be set on a one-time basis in the
- <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> dialog box; see <xref
- linkend="buffer-opts" />. To set a buffer's edit mode for future
- editing sessions, place the following in one of the first or last 10
- lines of the buffer, where <replaceable>edit mode</replaceable> is
- the name of the desired edit mode:</para>
-
- <screen>:mode=<replaceable>edit mode</replaceable>:</screen>
- </section>
-
- <section id="syntax-hilite">
- <title>Syntax Highlighting</title>
-
- <para>Syntax highlighting is the display of programming language
- tokens using different fonts and colors. This makes code easier to
- follow and errors such as misplaced quotes easier to spot. All edit
- modes except for the plain text mode perform some kind of syntax
- highlighting.</para>
-
- <para>The colors and styles used to highlight syntax tokens can be
- changed in the <guibutton>Syntax Highlighting</guibutton> pane of
- the <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="syntax-hilite-pane" />.</para>
- </section>
- </section>
-
- <section id="indent">
- <title>Tabbing and Indentation</title>
-
- <para>jEdit makes a distinction between the <firstterm>tab
- width</firstterm>, which is is used when displaying hard tab characters,
- and the <firstterm>indent width</firstterm>, which is used when a level
- of indent is to be added or removed, for example by mode-specific auto
- indent routines. Both can be changed in one of several ways:</para>
-
- <itemizedlist>
- <listitem>
- <para>On a global or mode-specific basis in the
- <guibutton>Editing</guibutton> pane of the the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. See <xref
- linkend="editing-pane" />.</para>
- </listitem>
-
- <listitem>
- <para>In the current buffer for the duration of the editing
- session in the
- <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> dialog box. See <xref
- linkend="buffer-opts" />.</para>
- </listitem>
-
- <listitem>
- <para>In the current buffer for future editing sessions by
- placing the following in one of the first or last 10 lines of
- the buffer, where <replaceable>n</replaceable> is the desired
- tab width, and <replaceable>m</replaceable> is the desired
- indent width:</para>
-
- <screen>:tabSize=<replaceable>n</replaceable>:indentSize=<replaceable>m</replaceable>:</screen>
- </listitem>
- </itemizedlist>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guisubmenu>Shift
- Indent Left</guisubmenu> (shortcut: <keycap>S+TAB</keycap> or
- <keycap>A+LEFT</keycap>) removes one level of indent from each selected
- line, or the current line if there is no selection.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guisubmenu>Shift
- Indent Right</guisubmenu> (shortcut: <keycap>A+RIGHT</keycap>) adds one
- level of indent to each selected line, or the current line if there is
- no selection. Pressing <keycap>Tab</keycap> while a multi-line selection
- is active has the same effect.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guimenuitem>Remove
- Trailing Whitespace</guimenuitem> (shortcut: <keycap>C+e r</keycap>)
- removes all whitespace from the end of each selected line, or the
- current line if there is no selection.</para>
-
- <section id="soft-tabs">
- <title>Soft Tabs</title>
-
- <para>Files containing hard tab characters may look less than ideal
- if the default tab size is changed, so some people prefer using
- multiple space characters instead of hard tabs to indent
- code.</para>
-
- <para>This feature is known as <firstterm>soft tabs</firstterm>.
- Soft tabs can be enabled or disabled in one of several ways:</para>
-
- <itemizedlist>
- <listitem>
- <para>On a global or mode-specific basis in the
- <guibutton>Editing</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. See <xref
- linkend="editing-pane" />.</para>
- </listitem>
-
- <listitem>
- <para>In the current buffer for the duration of the editing
- session in the
- <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> dialog box. See <xref
- linkend="buffer-opts" />.</para>
- </listitem>
-
- <listitem>
- <para>In the current buffer for future editing sessions by
- placing the following in one of the first or last 10 lines
- of the buffer, where <replaceable>flag</replaceable> is
- either <quote>true</quote> or <quote>false</quote>:</para>
-
- <screen>:noTabs=<replaceable>flag</replaceable>:</screen>
- </listitem>
- </itemizedlist>
-
- <para>Changing the soft tabs setting has no effect on existing tab
- characters; it only affects subsequently-inserted tabs.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guimenuitem>Spaces
- to Tabs</guimenuitem> converts soft tabs to hard tabs in the current
- selection, or the entire buffer if nothing is selected.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guimenuitem>Tabs
- to Spaces</guimenuitem> converts hard tabs to soft tabs in the
- current selection, or the entire buffer if nothing is
- selected.</para>
- </section>
-
- <section id="autoindent">
- <title>Automatic Indent</title>
-
- <para>The auto indent feature inserts the appropriate number of tabs
- or spaces at the beginning of a line by looking at program
- structure.</para>
-
- <para>In the default configuration, pressing <keycap>ENTER</keycap>
- will create a new line with the appropriate amount of indent
- automatically, and pressing <keycap>TAB</keycap> at the beginning
- of, or inside the leading whitespace of a line will insert the
- appropriate amount of indentation. Pressing it again will insert a
- tab character.</para>
-
- <para>The behavior of the <keycap>ENTER</keycap> and
- <keycap>TAB</keycap> keys can be configured in the
- <guibutton>Shortcuts</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog. box, just as with any other key. The
- <keycap>ENTER</keycap> key can be bound to one of the following, or
- indeed any other command or macro:</para>
-
- <itemizedlist>
- <listitem>
- <para><guimenuitem>Insert Newline</guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Insert Newline and Indent</guimenuitem>,
- which is the default.</para>
- </listitem>
- </itemizedlist>
-
- <para>The <keycap>TAB</keycap> can be bound to one of the following,
- or again, any other command or macro:</para>
-
- <itemizedlist>
- <listitem>
- <para><guimenuitem>Insert Tab</guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Insert Tab or Indent</guimenuitem>, which
- is the default.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Indent Selected
- Lines</guimenuitem>.</para>
- </listitem>
- </itemizedlist>
-
- <para>See <xref linkend="shortcuts-pane" /> for details.</para>
-
- <para>Auto indent behavior is mode-specific. In most edit modes, the
- indent of the previous line is simply copied over. However, in
- C-like languages (C, C++, Java, JavaScript), curly brackets and
- language statements are taken into account and indent is added and
- removed as necessary.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guisubmenu>Indent
- Selected Lines</guisubmenu> (shortcut: <keycap>C+i</keycap>) indents
- all selected lines, or the current line if there is no
- selection.</para>
-
- <para>To insert a literal tab or newline without performing
- indentation, prefix the tab or newline with <keycap>C+e v</keycap>.
- For example, to create a new line without any indentation, type
- <keycap>C+e v ENTER</keycap>.</para>
- </section>
- </section>
-
- <section id="commenting">
- <title>Commenting Out Code</title>
-
- <para>Most programming and markup languages support the notion of
- <quote>comments</quote>, or regions of code which are ignored by the
- compiler/interpreter. jEdit has commands which make inserting comments
- more convenient.</para>
-
- <para>Comment strings are mode-specific, and some in some modes such as
- HTML different parts of a buffer can have different comment strings. For
- example, in HTML files, different comment strings are used for HTML text
- and inline JavaScript.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Source
- Code</guisubmenu>><guimenuitem>Range Comment</guimenuitem> (shortcut:
- <keycap>C+e C+c</keycap>) encloses the selection with comment start and
- end strings, for example <literal>/*</literal> and <literal>*/</literal>
- in Java mode.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Source
- Code</guisubmenu>><guimenuitem>Line Comment</guimenuitem> (shortcut:
- <keycap>C+e C+k</keycap>) inserts the line comment string, for example
- <literal>//</literal> in Java mode, at the start of each selected
- line.</para>
- </section>
-
- <section id="bracket-matching">
- <title>Bracket Matching</title>
-
- <para>Misplaced and unmatched brackets are one of the most common syntax
- errors encountered when writing code. jEdit has several features to make
- brackets easier to deal with.</para>
-
- <para>Positioning the caret immediately after a bracket will highlight
- the corresponding closing or opening bracket (assuming it is visible),
- and draw a scope indicator in the gutter. If the highlighted bracket is
- not visible, the text of the matching line will be shown in the status
- bar. If the matching line consists of only whitespace and the bracket
- itself, the <emphasis>previous line</emphasis> is shown instead. This
- feature is very useful when your code is indented as follows, with
- braces on their own lines:</para>
-
- <programlisting>public void someMethod()
-{
- if(isOK)
- {
- doSomething();
- }
-}</programlisting>
-
- <para>Invoking
- <guimenu>Edit</guimenu>><guisubmenu>Source</guisubmenu>><guimenuitem>Go
- to Matching Bracket</guimenuitem> (shortcut: <keycap>C+]</keycap>) or
- clicking the scope indicator in the gutter moves the caret to the
- matching bracket.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Source</guisubmenu>><guimenuitem>Select
- Code Block</guimenuitem> (shortcut: <keycap>C+[</keycap>) selects all
- text between the closest two brackets surrounding the caret.</para>
-
- <para>Holding down <keycap>Control</keycap> while clicking the scope
- indicator in the gutter or a bracket in the text area will select all
- text between the two matching brackets.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Source</guisubmenu>><guimenuitem>Go
- to Previous Bracket</guimenuitem> (shortcut: <keycap>C+e C+[</keycap>)
- moves the caret to the previous opening bracket.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Source</guisubmenu>><guimenuitem>Go
- to Next Bracket</guimenuitem> (shortcut: <keycap>C+e C+]</keycap>) moves
- the caret to the next closing bracket.</para>
-
- <para>Bracket highlighting in the text area and bracket scope display in
- the gutter can be customized in the <guibutton>Text Area</guibutton> and
- <guibutton>Gutter</guibutton> panes of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="global-opts" />.</para>
-
- <tip>
- <para>jEdit's bracket matching algorithm only checks syntax tokens
- with the same type as the original bracket, so for example unmatched
- brackets inside string literals and comments will be skipped when
- matching brackets that are part of program syntax.</para>
- </tip>
- </section>
-
- <section id="abbrevs">
- <title>Abbreviations</title>
-
- <para>Abbreviations are invoked by typing a couple of letters and then
- issuing the <guimenu>Edit</guimenu>><guimenuitem>Expand
- Abbreviation</guimenuitem> (keyboard shortcut: <keycap>C+;</keycap>),
- which takes the word before the caret as the abbreviation name. If that
- particular abbreviation was not yet set, a dialog will pop up, and you
- can enter the text to insert before and after the caret. After the
- abbreviation is created, it can be viewed or edited from the
- <guibutton>Abbreviations</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="abbrevs-pane" />.</para>
-
- <para>Using abbreviations reduces the time spent typing long but
- commonly used strings. For example, in Java mode, the abbreviation
- <quote>sout</quote> is defined to expand to
- <quote>System.out.println()</quote>, so to insert
- <quote>System.out.println()</quote> in a Java buffer, you only need to
- type <quote>sout</quote> followed by <keycap>C+;</keycap>. An
- abbreviation can either be global, in which case it can be used in all
- edit modes, or specific to a single mode.</para>
-
- <para>The Java, VHDL. XML and XSL edit modes include some pre-defined
- abbreviations you might find useful. Other modes do not have any
- abbreviations defined by default.</para>
-
- <para></para>
-
- <para>Automatic abbreviation expansion can be enabled in the
- <guibutton>Abbreviations</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. If enabled, pressing the space bar
- after entering an abbreviation will automatically expand it.</para>
-
- <para>If automatic expansion is enabled, a space can be inserted without
- expanding the word before the caret by pressing <keycombo>
- <keycap>Control</keycap>
-
- <keycap>E</keycap>
- </keycombo> <keycap>V</keycap> <keycap>Space</keycap>.</para>
-
- <section id="positional-params">
- <title>Positional Parameters</title>
-
- <para>Positional parameters are an advanced feature that make
- abbreviations much more useful. The best way to describe them is
- with an example.</para>
-
- <para>Java mode defines an abbreviation <quote>F</quote> that is set
- to expand to the following:</para>
-
- <programlisting>for(int $1 = 0; $1 < $2; $1++)</programlisting>
-
- <para>Expanding <literal>F#j#array.length#</literal> will insert the
- following text into the buffer:</para>
-
- <programlisting>for(int j = 0; j < array.length; j++)</programlisting>
-
- <para>Expansions can contain up to nine positional parameters. Note
- that a trailing hash character (<quote>#</quote>) must be entered
- when expanding an abbreviation with parameters.</para>
-
- <para>If you do not specify the correct number of positional
- parameters when expanding an abbreviation, any missing parameters
- will be blank in the expansion, and extra parameters will be
- ignored. A status bar message will be shown stating the required
- number of parameters.</para>
- </section>
- </section>
-
- <section id="folding">
- <title>Folding</title>
-
- <para>Program source code and other structured text files can be thought
- of as containing a hierarchy of sections, which themselves might contain
- sub-sections. The folding feature lets you selectively hide and show
- these sections, replacing hidden ones with a single line that serves as
- an <quote>overview</quote> of that section. Folding is disabled by
- default. To enable it, you must choose one of the available folding
- modes.</para>
-
- <para><quote>Indent</quote> mode creates folds based on a line's leading
- whitespace; the more leading whitespace a block of text has, the further
- down it is in the hierarchy. For example:</para>
-
- <screen>This is a section
- This is a sub-section
- This is another sub-section
- This is a sub-sub-section
-Another top-level section</screen>
-
- <para><quote>Explicit</quote> mode folds away blocks of text surrounded
- with <quote>{{{</quote> and <quote>}}}</quote>. For example:</para>
-
- <screen>{{{ The first line of a fold.
-When this fold is collapsed, only the above line will be visible.
-
-{{{ A sub-section.
-With text inside it.
-}}}
-
-{{{ Another sub-section.
-}}}
-
-}}}</screen>
-
- <para>Both modes have distinct advantages and disadvantages; indent
- folding requires no changes to be made to a buffer's text and does a
- decent job with most program source. Explicit folding requires
- <quote>fold markers</quote> to be inserted into the text, but is more
- flexible in exactly what to fold away.</para>
-
- <para>Some plugins might add additional folding modes; see <xref
- linkend="using-plugins" /> for information about plugins.</para>
-
- <para>Folding can be enabled in one of several ways:</para>
-
- <itemizedlist>
- <listitem>
- <para>On a global or mode-specific basis in the
- <guibutton>Editing</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. See <xref
- linkend="editing-pane" />.</para>
- </listitem>
-
- <listitem>
- <para>In the current buffer for the duration of the editing
- session in the
- <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> dialog box. See <xref
- linkend="buffer-opts" />.</para>
- </listitem>
-
- <listitem>
- <para>In the current buffer for future editing sessions by
- placing the following in the first or last 10 lines of a buffer,
- where <replaceable>mode</replaceable> is either
- <quote>indent</quote>, <quote>explicit</quote>, or the name of a
- plugin folding mode:</para>
-
- <screen>:folding=<replaceable>mode</replaceable>:</screen>
- </listitem>
- </itemizedlist>
-
- <warning>
- <para>When using indent folding, portions of the buffer may become
- inaccessible if you change the leading indent of the first line of a
- collapsed fold. If you experience this, you can use the
- <guimenuitem>Expand All Folds</guimenuitem> command to make the text
- visible again.</para>
- </warning>
-
- <section>
- <title>Collapsing and Expanding Folds</title>
-
- <para>The first line of each fold has a triangle drawn next to it in
- the gutter (see <xref linkend="overview" /> for more information
- about the gutter). The triangle points toward the line when the fold
- is collapsed, and downward when the fold is expanded. Clicking the
- triangle collapses and expands the fold. To expand all sub-folds as
- well, hold down the <keycap>Shift</keycap> while clicking.</para>
-
- <para>The first line of a collapsed fold is drawn with a background
- color that depends on the fold level, and the number of lines in the
- fold is shown to the right of the line's text.</para>
-
- <para>Folds can also be collapsed and expanded using menu item
- commands and keyboard shortcuts.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Collapse
- Fold</guimenuitem> (shortcut: <keycap>A+BACK_SPACE</keycap>)
- collapses the fold containing the caret.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand Fold
- One Level</guimenuitem> (shortcut: <keycap>A+ENTER</keycap>) expands
- the fold containing the caret. Nested folds will remain collapsed,
- and the caret will be positioned on the first nested fold (if
- any).</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand Fold
- Fully</guimenuitem> (shortcut: <keycap>AS+ENTER</keycap>) expands
- the fold containing the caret, also expanding any nested
- folds.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Collapse All
- Folds</guimenuitem> (shortcut: <keycap>C+e c</keycap>) collapses all
- folds in the buffer.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand All
- Folds</guimenuitem> (shortcut: <keycap>C+e x</keycap>) expands all
- folds in the buffer.</para>
- </section>
-
- <section>
- <title>Navigating Around With Folds</title>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Go to Parent
- Fold</guimenuitem> (shortcut: <keycap>C+e u</keycap>) moves the
- caret to the fold containing the one at the caret position.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Go to
- Previous Fold</guimenuitem> (shortcut: <keycap>A+UP</keycap>) moves
- the caret to the fold immediately before the caret position.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Go to Next
- Fold</guimenuitem> (shortcut: <keycap>A+DOWN</keycap>) moves the
- caret to the fold immediately after the caret position.</para>
- </section>
-
- <section>
- <title>Miscellaneous Folding Commands</title>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Add Explicit
- Fold</guimenuitem> (shortcut: <keycap>C+e a</keycap>) surrounds the
- selection with <quote>{{{</quote> and <quote>}}}</quote>. If the
- current buffer's edit mode defines comment strings (see <xref
- linkend="commenting" />) the explicit fold markers will
- automatically be commented out as well.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Select
- Fold</guimenuitem> (shortcut: <keycap>C+e s</keycap>) selects all
- lines within the fold containing the caret.
- <keycap>Control</keycap>-clicking a fold expansion triangle in the
- gutter has the same effect.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand Folds
- With Level</guimenuitem> (shortcut: <keycap>C+e ENTER
- <replaceable>key</replaceable></keycap>) reads the next character
- entered at the keyboard, and expands folds in the buffer with a fold
- level less than that specified, while collapsing all others.</para>
-
- <para>Sometimes it is desirable to have files open with folds
- initially collapsed. This can be configured as follows:</para>
-
- <itemizedlist>
- <listitem>
- <para>On a global or mode-specific basis in the
- <guibutton>Editing</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. See <xref
- linkend="editing-pane" />.</para>
- </listitem>
-
- <listitem>
- <para>In the current buffer for future editing sessions by
- placing the following in the first or last 10 lines of a
- buffer, where <replaceable>level</replaceable> is the
- desired fold level:</para>
-
- <screen>:collapseFolds=<replaceable>level</replaceable>:</screen>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="narrowing">
- <title>Narrowing</title>
-
- <para>The narrowing feature temporarily <quote>narrows</quote> the
- display of a buffer to a specified region. Text outside the region
- is not shown, but is still present in the buffer. <!-- Both folding and
- narrowing are implemented using the same code internally. --></para>
-
- <para>Holding down <keycap>Alt</keycap> while clicking a fold
- expansion triangle in the gutter will hide all lines the buffer
- except those contained in the clicked fold.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Narrow Buffer
- to Fold</guimenuitem> (shortcut: <keycap>C+e n n</keycap>) hides all
- lines the buffer except those in the fold containing the caret. <!-- When this command is invoked, a message is shown in the
- status bar reminding you that you need to invoke
- <guimenuitem>Expand All Folds</guimenuitem> to make the rest of the buffer
- visible again. --></para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Narrow Buffer
- to Selection</guimenuitem> (shortcut: <keycap>C+e n s</keycap>)
- hides all lines the buffer except those in the selection.</para>
-
- <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand All
- Folds</guimenuitem> (shortcut: <keycap>C+e x</keycap>) shows lines
- that were hidden as a result of narrowing.</para>
- </section>
- </section>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="source-edit">
+ <title>Editing Source Code</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=80: -->
+
+ <!-- :xml.root=users-guide.xml: -->
+
+ <section id="modes">
+ <title>Edit Modes</title>
+
+ <para>An <firstterm>edit mode</firstterm> specifies syntax highlighting
+ rules, auto indent behavior, and various other customizations for
+ editing a certain file type. This section only covers using existing
+ edit modes; information about writing your own can be found in <xref
+ linkend="writing-modes-part" />.</para>
+
+ <para>When a file is opened, jEdit first checks the file name against a
+ list of known patterns. For example, files whose names end with
+ <filename>.c</filename> are opened with C mode, and files named
+ <filename>Makefile</filename> are opened with Makefile mode. If a
+ suitable match based on file name cannot be found, jEdit checks the
+ first line of the file. For example, files whose first line is
+ <filename>#!/bin/sh</filename> are opened with shell script mode.</para>
+
+ <section id="mode-selection">
+ <title>Mode Selection</title>
+
+ <para>File name and first line matching is done using glob patterns
+ similar to those used in Unix shells. Glob patterns associated with
+ edit modes can be changed in the <guibutton>Editing</guibutton> pane
+ of the <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. Note that the glob patterns must
+ match the file name or first line exactly; so to match files whose
+ first line contains <literal>begin</literal>, you must use a first
+ line glob of <literal>*begin*</literal>. See <xref
+ linkend="globs" /> for a description of glob pattern syntax.</para>
+
+ <para>The default edit mode for files which do not match any pattern
+ can be set in the <guibutton>Editing</guibutton> pane as
+ well.</para>
+
+ <para>The edit mode can be specified manually as well. The current
+ buffer's edit mode can be set on a one-time basis in the
+ <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> dialog box; see <xref
+ linkend="buffer-opts" />. To set a buffer's edit mode for future
+ editing sessions, place the following in one of the first or last 10
+ lines of the buffer, where <replaceable>edit mode</replaceable> is
+ the name of the desired edit mode:</para>
+
+ <screen>:mode=<replaceable>edit mode</replaceable>:</screen>
+ </section>
+
+ <section id="syntax-hilite">
+ <title>Syntax Highlighting</title>
+
+ <para>Syntax highlighting is the display of programming language
+ tokens using different fonts and colors. This makes code easier to
+ follow and errors such as misplaced quotes easier to spot. All edit
+ modes except for the plain text mode perform some kind of syntax
+ highlighting.</para>
+
+ <para>The colors and styles used to highlight syntax tokens can be
+ changed in the <guibutton>Syntax Highlighting</guibutton> pane of
+ the <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="syntax-hilite-pane" />.</para>
+ </section>
+ </section>
+
+ <section id="indent">
+ <title>Tabbing and Indentation</title>
+
+ <para>jEdit makes a distinction between the <firstterm>tab
+ width</firstterm>, which is is used when displaying hard tab characters,
+ and the <firstterm>indent width</firstterm>, which is used when a level
+ of indent is to be added or removed, for example by mode-specific auto
+ indent routines. Both can be changed in one of several ways:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>On a global or mode-specific basis in the
+ <guibutton>Editing</guibutton> pane of the the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. See <xref
+ linkend="editing-pane" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the current buffer for the duration of the editing
+ session in the
+ <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> dialog box. See <xref
+ linkend="buffer-opts" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the current buffer for future editing sessions by
+ placing the following in one of the first or last 10 lines of
+ the buffer, where <replaceable>n</replaceable> is the desired
+ tab width, and <replaceable>m</replaceable> is the desired
+ indent width:</para>
+
+ <screen>:tabSize=<replaceable>n</replaceable>:indentSize=<replaceable>m</replaceable>:</screen>
+ </listitem>
+ </itemizedlist>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guisubmenu>Shift
+ Indent Left</guisubmenu> (shortcut: <keycap>S+TAB</keycap> or
+ <keycap>A+LEFT</keycap>) removes one level of indent from each selected
+ line, or the current line if there is no selection.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guisubmenu>Shift
+ Indent Right</guisubmenu> (shortcut: <keycap>A+RIGHT</keycap>) adds one
+ level of indent to each selected line, or the current line if there is
+ no selection. Pressing <keycap>Tab</keycap> while a multi-line selection
+ is active has the same effect.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guimenuitem>Remove
+ Trailing Whitespace</guimenuitem> (shortcut: <keycap>C+e r</keycap>)
+ removes all whitespace from the end of each selected line, or the
+ current line if there is no selection.</para>
+
+ <section id="soft-tabs">
+ <title>Soft Tabs</title>
+
+ <para>Files containing hard tab characters may look less than ideal
+ if the default tab size is changed, so some people prefer using
+ multiple space characters instead of hard tabs to indent
+ code.</para>
+
+ <para>This feature is known as <firstterm>soft tabs</firstterm>.
+ Soft tabs can be enabled or disabled in one of several ways:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>On a global or mode-specific basis in the
+ <guibutton>Editing</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. See <xref
+ linkend="editing-pane" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the current buffer for the duration of the editing
+ session in the
+ <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> dialog box. See <xref
+ linkend="buffer-opts" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the current buffer for future editing sessions by
+ placing the following in one of the first or last 10 lines
+ of the buffer, where <replaceable>flag</replaceable> is
+ either <quote>true</quote> or <quote>false</quote>:</para>
+
+ <screen>:noTabs=<replaceable>flag</replaceable>:</screen>
+ </listitem>
+ </itemizedlist>
+
+ <para>Changing the soft tabs setting has no effect on existing tab
+ characters; it only affects subsequently-inserted tabs.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guimenuitem>Spaces
+ to Tabs</guimenuitem> converts soft tabs to hard tabs in the current
+ selection, or the entire buffer if nothing is selected.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guimenuitem>Tabs
+ to Spaces</guimenuitem> converts hard tabs to soft tabs in the
+ current selection, or the entire buffer if nothing is
+ selected.</para>
+ </section>
+
+ <section id="autoindent">
+ <title>Automatic Indent</title>
+
+ <para>The auto indent feature inserts the appropriate number of tabs
+ or spaces at the beginning of a line by looking at program
+ structure.</para>
+
+ <para>In the default configuration, pressing <keycap>ENTER</keycap>
+ will create a new line with the appropriate amount of indent
+ automatically, and pressing <keycap>TAB</keycap> at the beginning
+ of, or inside the leading whitespace of a line will insert the
+ appropriate amount of indentation. Pressing it again will insert a
+ tab character.</para>
+
+ <para>The behavior of the <keycap>ENTER</keycap> and
+ <keycap>TAB</keycap> keys can be configured in the
+ <guibutton>Shortcuts</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog. box, just as with any other key. The
+ <keycap>ENTER</keycap> key can be bound to one of the following, or
+ indeed any other command or macro:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><guimenuitem>Insert Newline</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Insert Newline and Indent</guimenuitem>,
+ which is the default.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The <keycap>TAB</keycap> can be bound to one of the following,
+ or again, any other command or macro:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><guimenuitem>Insert Tab</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Insert Tab or Indent</guimenuitem>, which
+ is the default.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Indent Selected
+ Lines</guimenuitem>.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>See <xref linkend="shortcuts-pane" /> for details.</para>
+
+ <para>Auto indent behavior is mode-specific. In most edit modes, the
+ indent of the previous line is simply copied over. However, in
+ C-like languages (C, C++, Java, JavaScript), curly brackets and
+ language statements are taken into account and indent is added and
+ removed as necessary.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Indent</guisubmenu>><guisubmenu>Indent
+ Selected Lines</guisubmenu> (shortcut: <keycap>C+i</keycap>) indents
+ all selected lines, or the current line if there is no
+ selection.</para>
+
+ <para>To insert a literal tab or newline without performing
+ indentation, prefix the tab or newline with <keycap>C+e v</keycap>.
+ For example, to create a new line without any indentation, type
+ <keycap>C+e v ENTER</keycap>.</para>
+ </section>
+ </section>
+
+ <section id="commenting">
+ <title>Commenting Out Code</title>
+
+ <para>Most programming and markup languages support the notion of
+ <quote>comments</quote>, or regions of code which are ignored by the
+ compiler/interpreter. jEdit has commands which make inserting comments
+ more convenient.</para>
+
+ <para>Comment strings are mode-specific, and some in some modes such as
+ HTML different parts of a buffer can have different comment strings. For
+ example, in HTML files, different comment strings are used for HTML text
+ and inline JavaScript.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Source
+ Code</guisubmenu>><guimenuitem>Range Comment</guimenuitem> (shortcut:
+ <keycap>C+e C+c</keycap>) encloses the selection with comment start and
+ end strings, for example <literal>/*</literal> and <literal>*/</literal>
+ in Java mode.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Source
+ Code</guisubmenu>><guimenuitem>Line Comment</guimenuitem> (shortcut:
+ <keycap>C+e C+k</keycap>) inserts the line comment string, for example
+ <literal>//</literal> in Java mode, at the start of each selected
+ line.</para>
+ </section>
+
+ <section id="bracket-matching">
+ <title>Bracket Matching</title>
+
+ <para>Misplaced and unmatched brackets are one of the most common syntax
+ errors encountered when writing code. jEdit has several features to make
+ brackets easier to deal with.</para>
+
+ <para>Positioning the caret immediately after a bracket will highlight
+ the corresponding closing or opening bracket (assuming it is visible),
+ and draw a scope indicator in the gutter. If the highlighted bracket is
+ not visible, the text of the matching line will be shown in the status
+ bar. If the matching line consists of only whitespace and the bracket
+ itself, the <emphasis>previous line</emphasis> is shown instead. This
+ feature is very useful when your code is indented as follows, with
+ braces on their own lines:</para>
+
+ <programlisting>public void someMethod()
+{
+ if(isOK)
+ {
+ doSomething();
+ }
+}</programlisting>
+
+ <para>Invoking
+ <guimenu>Edit</guimenu>><guisubmenu>Source</guisubmenu>><guimenuitem>Go
+ to Matching Bracket</guimenuitem> (shortcut: <keycap>C+]</keycap>) or
+ clicking the scope indicator in the gutter moves the caret to the
+ matching bracket.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Source</guisubmenu>><guimenuitem>Select
+ Code Block</guimenuitem> (shortcut: <keycap>C+[</keycap>) selects all
+ text between the closest two brackets surrounding the caret.</para>
+
+ <para>Holding down <keycap>Control</keycap> while clicking the scope
+ indicator in the gutter or a bracket in the text area will select all
+ text between the two matching brackets.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Source</guisubmenu>><guimenuitem>Go
+ to Previous Bracket</guimenuitem> (shortcut: <keycap>C+e C+[</keycap>)
+ moves the caret to the previous opening bracket.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Source</guisubmenu>><guimenuitem>Go
+ to Next Bracket</guimenuitem> (shortcut: <keycap>C+e C+]</keycap>) moves
+ the caret to the next closing bracket.</para>
+
+ <para>Bracket highlighting in the text area and bracket scope display in
+ the gutter can be customized in the <guibutton>Text Area</guibutton> and
+ <guibutton>Gutter</guibutton> panes of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="global-opts" />.</para>
+
+ <tip>
+ <para>jEdit's bracket matching algorithm only checks syntax tokens
+ with the same type as the original bracket, so for example unmatched
+ brackets inside string literals and comments will be skipped when
+ matching brackets that are part of program syntax.</para>
+ </tip>
+ </section>
+
+ <section id="abbrevs">
+ <title>Abbreviations</title>
+
+ <para>Abbreviations are invoked by typing a couple of letters and then
+ issuing the <guimenu>Edit</guimenu>><guimenuitem>Expand
+ Abbreviation</guimenuitem> (keyboard shortcut: <keycap>C+;</keycap>),
+ which takes the word before the caret as the abbreviation name. If that
+ particular abbreviation was not yet set, a dialog will pop up, and you
+ can enter the text to insert before and after the caret. After the
+ abbreviation is created, it can be viewed or edited from the
+ <guibutton>Abbreviations</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="abbrevs-pane" />.</para>
+
+ <para>Using abbreviations reduces the time spent typing long but
+ commonly used strings. For example, in Java mode, the abbreviation
+ <quote>sout</quote> is defined to expand to
+ <quote>System.out.println()</quote>, so to insert
+ <quote>System.out.println()</quote> in a Java buffer, you only need to
+ type <quote>sout</quote> followed by <keycap>C+;</keycap>. An
+ abbreviation can either be global, in which case it can be used in all
+ edit modes, or specific to a single mode.</para>
+
+ <para>The Java, VHDL. XML and XSL edit modes include some pre-defined
+ abbreviations you might find useful. Other modes do not have any
+ abbreviations defined by default.</para>
+
+ <para></para>
+
+ <para>Automatic abbreviation expansion can be enabled in the
+ <guibutton>Abbreviations</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. If enabled, pressing the space bar
+ after entering an abbreviation will automatically expand it.</para>
+
+ <para>If automatic expansion is enabled, a space can be inserted without
+ expanding the word before the caret by pressing <keycombo>
+ <keycap>Control</keycap>
+
+ <keycap>E</keycap>
+ </keycombo> <keycap>V</keycap> <keycap>Space</keycap>.</para>
+
+ <section id="positional-params">
+ <title>Positional Parameters</title>
+
+ <para>Positional parameters are an advanced feature that make
+ abbreviations much more useful. The best way to describe them is
+ with an example.</para>
+
+ <para>Java mode defines an abbreviation <quote>F</quote> that is set
+ to expand to the following:</para>
+
+ <programlisting>for(int $1 = 0; $1 < $2; $1++)</programlisting>
+
+ <para>Expanding <literal>F#j#array.length#</literal> will insert the
+ following text into the buffer:</para>
+
+ <programlisting>for(int j = 0; j < array.length; j++)</programlisting>
+
+ <para>Expansions can contain up to nine positional parameters. Note
+ that a trailing hash character (<quote>#</quote>) must be entered
+ when expanding an abbreviation with parameters.</para>
+
+ <para>If you do not specify the correct number of positional
+ parameters when expanding an abbreviation, any missing parameters
+ will be blank in the expansion, and extra parameters will be
+ ignored. A status bar message will be shown stating the required
+ number of parameters.</para>
+ </section>
+ </section>
+
+ <section id="folding">
+ <title>Folding</title>
+
+ <para>Program source code and other structured text files can be thought
+ of as containing a hierarchy of sections, which themselves might contain
+ sub-sections. The folding feature lets you selectively hide and show
+ these sections, replacing hidden ones with a single line that serves as
+ an <quote>overview</quote> of that section. Folding is disabled by
+ default. To enable it, you must choose one of the available folding
+ modes.</para>
+
+ <para><quote>Indent</quote> mode creates folds based on a line's leading
+ whitespace; the more leading whitespace a block of text has, the further
+ down it is in the hierarchy. For example:</para>
+
+ <screen>This is a section
+ This is a sub-section
+ This is another sub-section
+ This is a sub-sub-section
+Another top-level section</screen>
+
+ <para><quote>Explicit</quote> mode folds away blocks of text surrounded
+ with <quote>{{{</quote> and <quote>}}}</quote>. For example:</para>
+
+ <screen>{{{ The first line of a fold.
+When this fold is collapsed, only the above line will be visible.
+
+{{{ A sub-section.
+With text inside it.
+}}}
+
+{{{ Another sub-section.
+}}}
+
+}}}</screen>
+
+ <para>Both modes have distinct advantages and disadvantages; indent
+ folding requires no changes to be made to a buffer's text and does a
+ decent job with most program source. Explicit folding requires
+ <quote>fold markers</quote> to be inserted into the text, but is more
+ flexible in exactly what to fold away.</para>
+
+ <para>Some plugins might add additional folding modes; see <xref
+ linkend="using-plugins" /> for information about plugins.</para>
+
+ <para>Folding can be enabled in one of several ways:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>On a global or mode-specific basis in the
+ <guibutton>Editing</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. See <xref
+ linkend="editing-pane" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the current buffer for the duration of the editing
+ session in the
+ <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> dialog box. See <xref
+ linkend="buffer-opts" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the current buffer for future editing sessions by
+ placing the following in the first or last 10 lines of a buffer,
+ where <replaceable>mode</replaceable> is either
+ <quote>indent</quote>, <quote>explicit</quote>, or the name of a
+ plugin folding mode:</para>
+
+ <screen>:folding=<replaceable>mode</replaceable>:</screen>
+ </listitem>
+ </itemizedlist>
+
+ <warning>
+ <para>When using indent folding, portions of the buffer may become
+ inaccessible if you change the leading indent of the first line of a
+ collapsed fold. If you experience this, you can use the
+ <guimenuitem>Expand All Folds</guimenuitem> command to make the text
+ visible again.</para>
+ </warning>
+
+ <section>
+ <title>Collapsing and Expanding Folds</title>
+
+ <para>The first line of each fold has a triangle drawn next to it in
+ the gutter (see <xref linkend="overview" /> for more information
+ about the gutter). The triangle points toward the line when the fold
+ is collapsed, and downward when the fold is expanded. Clicking the
+ triangle collapses and expands the fold. To expand all sub-folds as
+ well, hold down the <keycap>Shift</keycap> while clicking.</para>
+
+ <para>The first line of a collapsed fold is drawn with a background
+ color that depends on the fold level, and the number of lines in the
+ fold is shown to the right of the line's text.</para>
+
+ <para>Folds can also be collapsed and expanded using menu item
+ commands and keyboard shortcuts.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Collapse
+ Fold</guimenuitem> (shortcut: <keycap>A+BACK_SPACE</keycap>)
+ collapses the fold containing the caret.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand Fold
+ One Level</guimenuitem> (shortcut: <keycap>A+ENTER</keycap>) expands
+ the fold containing the caret. Nested folds will remain collapsed,
+ and the caret will be positioned on the first nested fold (if
+ any).</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand Fold
+ Fully</guimenuitem> (shortcut: <keycap>AS+ENTER</keycap>) expands
+ the fold containing the caret, also expanding any nested
+ folds.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Collapse All
+ Folds</guimenuitem> (shortcut: <keycap>C+e c</keycap>) collapses all
+ folds in the buffer.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand All
+ Folds</guimenuitem> (shortcut: <keycap>C+e x</keycap>) expands all
+ folds in the buffer.</para>
+ </section>
+
+ <section>
+ <title>Navigating Around With Folds</title>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Go to Parent
+ Fold</guimenuitem> (shortcut: <keycap>C+e u</keycap>) moves the
+ caret to the fold containing the one at the caret position.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Go to
+ Previous Fold</guimenuitem> (shortcut: <keycap>A+UP</keycap>) moves
+ the caret to the fold immediately before the caret position.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Go to Next
+ Fold</guimenuitem> (shortcut: <keycap>A+DOWN</keycap>) moves the
+ caret to the fold immediately after the caret position.</para>
+ </section>
+
+ <section>
+ <title>Miscellaneous Folding Commands</title>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Add Explicit
+ Fold</guimenuitem> (shortcut: <keycap>C+e a</keycap>) surrounds the
+ selection with <quote>{{{</quote> and <quote>}}}</quote>. If the
+ current buffer's edit mode defines comment strings (see <xref
+ linkend="commenting" />) the explicit fold markers will
+ automatically be commented out as well.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Select
+ Fold</guimenuitem> (shortcut: <keycap>C+e s</keycap>) selects all
+ lines within the fold containing the caret.
+ <keycap>Control</keycap>-clicking a fold expansion triangle in the
+ gutter has the same effect.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand Folds
+ With Level</guimenuitem> (shortcut: <keycap>C+e ENTER
+ <replaceable>key</replaceable></keycap>) reads the next character
+ entered at the keyboard, and expands folds in the buffer with a fold
+ level less than that specified, while collapsing all others.</para>
+
+ <para>Sometimes it is desirable to have files open with folds
+ initially collapsed. This can be configured as follows:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>On a global or mode-specific basis in the
+ <guibutton>Editing</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. See <xref
+ linkend="editing-pane" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the current buffer for future editing sessions by
+ placing the following in the first or last 10 lines of a
+ buffer, where <replaceable>level</replaceable> is the
+ desired fold level:</para>
+
+ <screen>:collapseFolds=<replaceable>level</replaceable>:</screen>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="narrowing">
+ <title>Narrowing</title>
+
+ <para>The narrowing feature temporarily <quote>narrows</quote> the
+ display of a buffer to a specified region. Text outside the region
+ is not shown, but is still present in the buffer. <!-- Both folding and
+ narrowing are implemented using the same code internally. --></para>
+
+ <para>Holding down <keycap>Alt</keycap> while clicking a fold
+ expansion triangle in the gutter will hide all lines the buffer
+ except those contained in the clicked fold.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Narrow Buffer
+ to Fold</guimenuitem> (shortcut: <keycap>C+e n n</keycap>) hides all
+ lines the buffer except those in the fold containing the caret. <!-- When this command is invoked, a message is shown in the
+ status bar reminding you that you need to invoke
+ <guimenuitem>Expand All Folds</guimenuitem> to make the rest of the buffer
+ visible again. --></para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Narrow Buffer
+ to Selection</guimenuitem> (shortcut: <keycap>C+e n s</keycap>)
+ hides all lines the buffer except those in the selection.</para>
+
+ <para><guisubmenu>Folding</guisubmenu>><guimenuitem>Expand All
+ Folds</guimenuitem> (shortcut: <keycap>C+e x</keycap>) shows lines
+ that were hidden as a result of narrowing.</para>
+ </section>
+ </section>
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/starting.xml b/jEdit/doc/users-guide/starting.xml
index 54ef580..efe499e 100644
--- a/jEdit/doc/users-guide/starting.xml
+++ b/jEdit/doc/users-guide/starting.xml
@@ -1,364 +1,367 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="starting">
- <title>Starting jEdit</title>
-
- <!-- jEdit buffer-local properties: -->
- <!-- :tabSize=1:indentSize=1:noTabs=true: -->
- <!-- :xml.root=users-guide.xml: -->
-
- <para>Exactly how jEdit is started depends on the operating system. For
- example, on Unix you can run <quote>jedit</quote> at the command line, or
- select jEdit from a menu; on Windows, you can double-click on the jEdit icon
- or select it from the <guimenu>Start</guimenu> menu. </para>
-
- <para>If jEdit is started while another copy is already running, control is
- transferred to the running copy, and a second instance is not loaded. This
- saves time and memory if jEdit is started multiple times. Communication
- between instances of jEdit is implemented using TCP/IP sockets; the initial
- instance is known as the <firstterm>server</firstterm>, and subsequent
- invocations are <firstterm>clients</firstterm>.</para>
-
- <para>If you find yourself launching and exiting jEdit a lot, the startup
- time can get a bit bothersome. If the <userinput>-background</userinput>
- command line switch is specified, jEdit will continue running and waiting
- for client requests even after all editor windows are closed. When run in
- background mode, you can open and close jEdit any number of times, only
- having to wait for it to start the first time. The downside of this is
- increased memory usage.</para>
-
- <para>When running on MacOS X, the <userinput>-background</userinput>
- command-line switch is active by default, so that jEdit conforms to the
- platform convention that programs should stay open until the
- <guimenuitem>Quit</guimenuitem> command is explicitly invoked by the user,
- even if all windows are closed. To disable background mode on MacOS X, use
- the <userinput>-nobackground</userinput> switch.</para>
-
- <para>For more information about command line switches that control the
- server feature, see <xref linkend="cli-usage" />. </para>
-
- <para>jEdit remembers open buffers, views and split window configurations
- between editing sessions, so you can get back to work immediately after
- starting jEdit. This feature can be disabled in the
- <guibutton>General</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global Options</guimenuitem>
- dialog box see <xref linkend="general-pane" />.</para>
-
- <sidebar>
- <title>The edit server and security</title>
-
- <para>Since Java does not provide any interprocess communication
- facility other than TCP/IP, jEdit takes extra precautions to prevent
- remote attacks.</para>
-
- <para>Not only does the edit server pick a random TCP port number on
- startup, it also requires that clients provide an
- <firstterm>authorization key</firstterm>; a randomly-generated number
- only accessible to processes running on the local machine. So not only
- will <quote>bad guys</quote> have to guess a 64-bit integer, they will
- need to get it right on the first try; the edit server shuts itself off
- upon receiving an invalid packet.</para>
-
- <para>In environments that demand absolute security, the edit server can
- be disabled by specifying the <userinput>-noserver</userinput> command
- line switch.</para>
- </sidebar>
-
- <section id="cli-usage">
- <title>Command Line Usage</title>
-
- <para>On operating systems that support a command line, jEdit can be
- passed various arguments to control its behavior.</para>
-
-
- <para>When opening files from the command line, a line number or marker
- to position the caret on can be specified like so:</para>
-
- <screen><prompt>$ </prompt><userinput>jedit MyApplet.java +line:10</userinput>
-<prompt>$ </prompt><userinput>jedit thesis.tex +marker:c</userinput></screen>
-
- <para>Command-line switches begin with a "-". Some take a parameter. A
- file whose name begins with "-" can be opened like so:</para>
-
- <screen><prompt>$ </prompt><userinput>jedit -- -myfile</userinput></screen>
-
- <section>
- <title>Miscellaneous Options</title>
-
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1.5in" />
-
- <thead>
- <row>
- <entry>Option</entry>
-
- <entry>Effect</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry><userinput>-log=<replaceable>level</replaceable></userinput></entry>
-
- <entry>Set the minimum log level to an integer
- between 1 and 9. Default is 7. Has no effect when
- connecting to another instance via the edit
- server.</entry>
- </row>
-
- <row>
- <entry><userinput>-usage</userinput></entry>
-
- <entry>Show a brief command line usage message
- without starting jEdit. This message is also shown if
- an invalid switch was specified.</entry>
- </row>
-
- <row>
- <entry><userinput>-version</userinput></entry>
-
- <entry>Show the version number without starting
- jEdit.</entry>
- </row>
-
- <row>
- <entry><userinput>--</userinput></entry>
-
- <entry>Specifies the end of command-line processing.
- Further parameters are treated as file names, even if
- they begin with a dash.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
-
- <section>
- <title>Configuration Options</title>
-
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1.5in" />
-
- <thead>
- <row>
- <entry>Option</entry>
-
- <entry>Effect</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry><userinput>-plugins</userinput></entry>
-
- <entry>Enable loading of plugins. Has no effect when
- connecting to another instance via the edit server.
- See <xref linkend="using-plugins" />.</entry>
- </row>
-
- <row>
- <entry><userinput>-noplugins</userinput></entry>
-
- <entry>Disable loading of plugins. Has no effect when
- connecting to another instance via the edit
- server.</entry>
- </row>
-
- <row>
- <entry><userinput>-restore</userinput></entry>
-
- <entry>Restore previously open files on startup. This
- is the default. This feature can also be set
- permanently in the <guibutton>General</guibutton>
- pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="general-pane" />.</entry>
- </row>
-
- <row>
- <entry><userinput>-norestore</userinput></entry>
-
- <entry>Do not restore previously open files on
- startup.</entry>
- </row>
-
- <row>
- <entry><userinput>-run=<replaceable>script</replaceable></userinput></entry>
-
- <entry>Run the specified BeanShell script. There can
- only be one of these parameters on the command line.
- See <xref linkend="scripts-command-line" />.</entry>
- </row>
-
- <row>
- <entry><userinput>-settings=<replaceable>dir</replaceable></userinput></entry>
-
- <entry>Store user-specific settings in the directory
- named <replaceable>dir</replaceable>, instead of the
- default
- <filename><replaceable>user.home</replaceable>/.jedit</filename>.
- The directory will be created automatically if it
- does not exist. Has no effect when connecting to
- another instance via the edit server. See <xref
- linkend="settings-directory" />.</entry>
- </row>
-
- <row>
- <entry><userinput>-nosettings</userinput></entry>
-
- <entry>Start jEdit without loading user-specific
- settings.</entry>
- </row>
-
- <row>
- <entry><userinput>-startupscripts</userinput></entry>
-
- <entry>Run startup scripts. This is the default. Has
- no effect when connecting to another instance via the
- edit server. See <xref
- linkend="startup-scripts" />.</entry>
- </row>
-
- <row>
- <entry><userinput>-nostartupscripts</userinput></entry>
-
- <entry>Disable startup scripts. Has no effect when
- connecting to another instance via the edit
- server.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
-
- <section>
- <title>Edit Server Options</title>
-
- <para>See <xref linkend="starting" /> for a brief description of the
- edit server.</para>
-
- <informaltable>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1.5in" />
-
- <thead>
- <row>
- <entry>Option</entry>
-
- <entry>Effect</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry><userinput>-background</userinput></entry>
-
- <entry>Run jEdit in background mode. In background
- mode, the edit server will continue listening for
- client connections even after all views are closed.
- Has no effect when connecting to another instance via
- the edit server.</entry>
- </row>
-
- <row>
- <entry><userinput>-nobackground</userinput></entry>
-
- <entry>Disable background mode. This is the default.
- Has no effect when connecting to another instance via
- the edit server.</entry>
- </row>
-
- <row>
- <entry><userinput>-gui</userinput></entry>
-
- <entry>Open an initial view. This is the default. Has
- no effect when connecting to another instance via the
- edit server.</entry>
- </row>
-
- <row>
- <entry><userinput>-nogui</userinput></entry>
-
- <entry>Do not open an initial view, and instead only
- open one when the first client connects. Can only be
- used in combination with the
- <userinput>-background</userinput> switch. You can
- use this switch to <quote>pre-load</quote> jEdit when
- you log in to your computer, for example. Has no
- effect when connecting to another instance via the
- edit server.</entry>
- </row>
-
- <row>
- <entry><userinput>-newplainview</userinput></entry>
-
- <entry>Opens the specified files in a new plain view.
- For more information about views, see <xref
- linkend="views" />.</entry>
- </row>
-
- <row>
- <entry><userinput>-newview</userinput></entry>
-
- <entry>Opens the specified files in a new
- view.</entry>
- </row>
-
- <row>
- <entry><userinput>-reuseview</userinput></entry>
-
- <entry>Opens the specified files in an existing
- view.</entry>
- </row>
-
- <row>
- <entry><userinput>-quit</userinput></entry>
-
- <entry>Exits the currently running editor
- instance.</entry>
- </row>
-
- <row>
- <entry><userinput>-server</userinput></entry>
-
- <entry>Store the server port info in the file named
- <filename>server</filename> inside the settings
- directory.</entry>
- </row>
-
- <row>
- <entry><userinput>-server=<replaceable>name</replaceable></userinput></entry>
-
- <entry>Store the server port info in the file named
- <replaceable>name</replaceable>. File names for this
- parameter are relative to the settings
- directory.</entry>
- </row>
-
- <row>
- <entry><userinput>-noserver</userinput></entry>
-
- <entry>Do not attempt to connect to a running edit
- server, and do not start one either.</entry>
- </row>
-
- <row>
- <entry><userinput>-wait</userinput></entry>
-
- <entry>Keeps the client open until the user closes
- the specified buffer in the server instance. Does
- nothing if passed to the initial jEdit instance. Use
- this switch if jEdit is being invoked by another
- program as an external editor; otherwise the client
- will exit immediately and the invoking program will
- assume you have finished editing the given
- file.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="starting">
+ <title>Starting jEdit</title>
+
+ <!-- jEdit buffer-local properties: -->
+ <!-- :tabSize=1:indentSize=1:noTabs=true: -->
+ <!-- :xml.root=users-guide.xml: -->
+
+ <para>Exactly how jEdit is started depends on the operating system. For
+ example, on Unix you can run <quote>jedit</quote> at the command line, or
+ select jEdit from a menu; on Windows, you can double-click on the jEdit icon
+ or select it from the <guimenu>Start</guimenu> menu. </para>
+
+ <para>If jEdit is started while another copy is already running, control is
+ transferred to the running copy, and a second instance is not loaded. This
+ saves time and memory if jEdit is started multiple times. Communication
+ between instances of jEdit is implemented using TCP/IP sockets; the initial
+ instance is known as the <firstterm>server</firstterm>, and subsequent
+ invocations are <firstterm>clients</firstterm>.</para>
+
+ <para>If you find yourself launching and exiting jEdit a lot, the startup
+ time can get a bit bothersome. If the <userinput>-background</userinput>
+ command line switch is specified, jEdit will continue running and waiting
+ for client requests even after all editor windows are closed. When run in
+ background mode, you can open and close jEdit any number of times, only
+ having to wait for it to start the first time. The downside of this is
+ increased memory usage.</para>
+
+ <para>When running on MacOS X, the <userinput>-background</userinput>
+ command-line switch is active by default, so that jEdit conforms to the
+ platform convention that programs should stay open until the
+ <guimenuitem>Quit</guimenuitem> command is explicitly invoked by the user,
+ even if all windows are closed. To disable background mode on MacOS X, use
+ the <userinput>-nobackground</userinput> switch.</para>
+
+ <para>For more information about command line switches that control the
+ server feature, see <xref linkend="cli-usage" />. </para>
+
+ <para>jEdit remembers open buffers, views and split window configurations
+ between editing sessions, so you can get back to work immediately after
+ starting jEdit. This feature can be disabled in the
+ <guibutton>General</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global Options</guimenuitem>
+ dialog box see <xref linkend="general-pane" />.</para>
+
+ <sidebar>
+ <title>The edit server and security</title>
+
+ <para>Since Java does not provide any interprocess communication
+ facility other than TCP/IP, jEdit takes extra precautions to prevent
+ remote attacks.</para>
+
+ <para>Not only does the edit server pick a random TCP port number on
+ startup, it also requires that clients provide an
+ <firstterm>authorization key</firstterm>; a randomly-generated number
+ only accessible to processes running on the local machine. So not only
+ will <quote>bad guys</quote> have to guess a 64-bit integer, they will
+ need to get it right on the first try; the edit server shuts itself off
+ upon receiving an invalid packet.</para>
+
+ <para>In environments that demand absolute security, the edit server can
+ be disabled by specifying the <userinput>-noserver</userinput> command
+ line switch.</para>
+ </sidebar>
+
+ <section id="cli-usage">
+ <title>Command Line Usage</title>
+
+ <para>On operating systems that support a command line, jEdit can be
+ passed various arguments to control its behavior.</para>
+
+
+ <para>When opening files from the command line, a line number or marker
+ to position the caret on can be specified like so:</para>
+
+ <screen><prompt>$ </prompt><userinput>jedit MyApplet.java +line:10</userinput>
+<prompt>$ </prompt><userinput>jedit thesis.tex +marker:c</userinput></screen>
+
+ <para>Command-line switches begin with a "-". Some take a parameter. A
+ file whose name begins with "-" can be opened like so:</para>
+
+ <screen><prompt>$ </prompt><userinput>jedit -- -myfile</userinput></screen>
+
+ <section>
+ <title>Miscellaneous Options</title>
+
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1.5in" />
+ <colspec colwidth="*"/>
+
+ <thead>
+ <row>
+ <entry>Option</entry>
+
+ <entry>Effect</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><userinput>-log=<replaceable>level</replaceable></userinput></entry>
+
+ <entry>Set the minimum log level to an integer
+ between 1 and 9. Default is 7. Has no effect when
+ connecting to another instance via the edit
+ server.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-usage</userinput></entry>
+
+ <entry>Show a brief command line usage message
+ without starting jEdit. This message is also shown if
+ an invalid switch was specified.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-version</userinput></entry>
+
+ <entry>Show the version number without starting
+ jEdit.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>--</userinput></entry>
+
+ <entry>Specifies the end of command-line processing.
+ Further parameters are treated as file names, even if
+ they begin with a dash.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+
+ <section>
+ <title>Configuration Options</title>
+
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1.5in" />
+ <colspec colwidth="*"/>
+
+ <thead>
+ <row>
+ <entry>Option</entry>
+
+ <entry>Effect</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><userinput>-plugins</userinput></entry>
+
+ <entry>Enable loading of plugins. Has no effect when
+ connecting to another instance via the edit server.
+ See <xref linkend="using-plugins" />.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-noplugins</userinput></entry>
+
+ <entry>Disable loading of plugins. Has no effect when
+ connecting to another instance via the edit
+ server.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-restore</userinput></entry>
+
+ <entry>Restore previously open files on startup. This
+ is the default. This feature can also be set
+ permanently in the <guibutton>General</guibutton>
+ pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="general-pane" />.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-norestore</userinput></entry>
+
+ <entry>Do not restore previously open files on
+ startup.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-run=<replaceable>script</replaceable></userinput></entry>
+
+ <entry>Run the specified BeanShell script. There can
+ only be one of these parameters on the command line.
+ See <xref linkend="scripts-command-line" />.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-settings=<replaceable>dir</replaceable></userinput></entry>
+
+ <entry>Store user-specific settings in the directory
+ named <replaceable>dir</replaceable>, instead of the
+ default
+ <filename><replaceable>user.home</replaceable>/.jedit</filename>.
+ The directory will be created automatically if it
+ does not exist. Has no effect when connecting to
+ another instance via the edit server. See <xref
+ linkend="settings-directory" />.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-nosettings</userinput></entry>
+
+ <entry>Start jEdit without loading user-specific
+ settings.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-startupscripts</userinput></entry>
+
+ <entry>Run startup scripts. This is the default. Has
+ no effect when connecting to another instance via the
+ edit server. See <xref
+ linkend="startup-scripts" />.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-nostartupscripts</userinput></entry>
+
+ <entry>Disable startup scripts. Has no effect when
+ connecting to another instance via the edit
+ server.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+
+ <section>
+ <title>Edit Server Options</title>
+
+ <para>See <xref linkend="starting" /> for a brief description of the
+ edit server.</para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1.5in" />
+ <colspec colwidth="*"/>
+
+ <thead>
+ <row>
+ <entry>Option</entry>
+
+ <entry>Effect</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><userinput>-background</userinput></entry>
+
+ <entry>Run jEdit in background mode. In background
+ mode, the edit server will continue listening for
+ client connections even after all views are closed.
+ Has no effect when connecting to another instance via
+ the edit server.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-nobackground</userinput></entry>
+
+ <entry>Disable background mode. This is the default.
+ Has no effect when connecting to another instance via
+ the edit server.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-gui</userinput></entry>
+
+ <entry>Open an initial view. This is the default. Has
+ no effect when connecting to another instance via the
+ edit server.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-nogui</userinput></entry>
+
+ <entry>Do not open an initial view, and instead only
+ open one when the first client connects. Can only be
+ used in combination with the
+ <userinput>-background</userinput> switch. You can
+ use this switch to <quote>pre-load</quote> jEdit when
+ you log in to your computer, for example. Has no
+ effect when connecting to another instance via the
+ edit server.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-newplainview</userinput></entry>
+
+ <entry>Opens the specified files in a new plain view.
+ For more information about views, see <xref
+ linkend="views" />.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-newview</userinput></entry>
+
+ <entry>Opens the specified files in a new
+ view.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-reuseview</userinput></entry>
+
+ <entry>Opens the specified files in an existing
+ view.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-quit</userinput></entry>
+
+ <entry>Exits the currently running editor
+ instance.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-server</userinput></entry>
+
+ <entry>Store the server port info in the file named
+ <filename>server</filename> inside the settings
+ directory.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-server=<replaceable>name</replaceable></userinput></entry>
+
+ <entry>Store the server port info in the file named
+ <replaceable>name</replaceable>. File names for this
+ parameter are relative to the settings
+ directory.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-noserver</userinput></entry>
+
+ <entry>Do not attempt to connect to a running edit
+ server, and do not start one either.</entry>
+ </row>
+
+ <row>
+ <entry><userinput>-wait</userinput></entry>
+
+ <entry>Keeps the client open until the user closes
+ the specified buffer in the server instance. Does
+ nothing if passed to the initial jEdit instance. Use
+ this switch if jEdit is being invoked by another
+ program as an external editor; otherwise the client
+ will exit immediately and the invoking program will
+ assume you have finished editing the given
+ file.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ </section>
+</chapter>
diff --git a/jEdit/doc/users-guide/text-edit.xml b/jEdit/doc/users-guide/text-edit.xml
index 0ea397b..862310b 100644
--- a/jEdit/doc/users-guide/text-edit.xml
+++ b/jEdit/doc/users-guide/text-edit.xml
@@ -1,1246 +1,1251 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="editing">
- <title>Editing Text</title>
- <!-- jEdit buffer-local properties:
- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=80:
- :xml.root=users-guide.xml: -->
-
- <section id="caret">
- <title>Moving The Caret</title>
-
- <para>The simplest way to move the caret is to click the mouse at the
- desired location in the text area. The caret can also be moved using the
- keyboard.</para>
-
- <para>The <keycap>LEFT</keycap>, <keycap>RIGHT</keycap>,
- <keycap>UP</keycap> and <keycap>DOWN</keycap> keys move the caret in the
- respective direction, and the <keycap>PAGE_UP</keycap> and
- <keycap>PAGE_DOWN</keycap> keys move the caret up and down one
- screen-full, respectively.</para>
-
- <para>When pressed once, the <keycap>HOME</keycap> key moves the caret
- to the first non-whitespace character of the current screen line.
- Pressing it a second time moves the caret to the beginning of the
- current buffer line. Pressing it a third time moves the caret to the
- first visible line.</para>
-
- <para>The <keycap>END</keycap> key behaves in a similar manner, going to
- the last non-whitespace character of the current screen line, the end of
- the current buffer line, and finally to the last visible line.</para>
-
- <para>If soft wrap is disabled, a <quote>screen line</quote> is the same
- as a <quote>buffer line</quote>. If soft wrap is enabled, a screen line
- is a section of a newline-delimited buffer line that fits within the
- wrap margin width. See <xref linkend="word-wrap" />.</para>
-
- <para><keycap>C+HOME</keycap> and <keycap>C+END</keycap> move the caret
- to the beginning and end of the buffer, respectively.</para>
-
- <para>More advanced caret movement is covered in <xref
- linkend="words" />, <xref linkend="lines" /> and <xref
- linkend="paragraphs" />.</para>
-
- <sidebar>
- <title>The Home and End keys</title>
-
- <para>If you prefer more traditional behavior for the
- <keycap>HOME</keycap> and <keycap>END</keycap> keys, you can
- reassign the respective keyboard shortcuts in the
- <guibutton>Shortcuts</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem>; see <xref linkend="shortcuts-pane" />.</para>
-
- <para>By default, the shortcuts are assigned as follows:</para>
-
- <itemizedlist>
- <listitem>
- <para><keycap>HOME</keycap> is bound to <guimenuitem>Smart
- Home</guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><keycap>END</keycap> is bound to <guimenuitem>Smart
- End</guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><keycap>S+HOME</keycap> is bound to
- <guimenuitem>Select to Smart Home
- Position</guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><keycap>S+END</keycap> is bound to <guimenuitem>Select
- to Smart End Position</guimenuitem>.</para>
- </listitem>
- </itemizedlist>
-
- <para>However you can rebind them to anything you want, for example,
- various combinations of the following, or indeed any other command
- or macro:</para>
-
- <itemizedlist>
- <listitem>
- <para><guimenuitem>Go to Start/End of White
- Space</guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Go to Start/End of
- Line</guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Go to Start/End of
- Buffer</guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Select to Start/End of White Space
- </guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Select to Start/End of
- Line</guimenuitem>.</para>
- </listitem>
-
- <listitem>
- <para><guimenuitem>Select to Start/End of
- Buffer</guimenuitem>.</para>
- </listitem>
- </itemizedlist>
- </sidebar>
- </section>
-
- <section id="selection">
- <title>Selecting Text</title>
-
- <para>A <firstterm>selection</firstterm> is a block of text marked for
- further manipulation. Range selections are equivalent to selections in
- most other text editors; they cover text between two points in a buffer.
- In addition to the standard text-selection mode, jEdit also allows
- <emphasis role="bold">rectangular selections</emphasis> that cover a
- rectangular area (some text editors refer to these as <quote>column
- selections</quote>). Furthermore, several chunks of text can be selected
- and operated on simultaneously.</para>
-
- <section>
- <title>Range Selection</title>
-
- <para>Dragging the mouse creates a range selection from where the
- mouse was pressed to where it was released. Holding down
- <keycap>Shift</keycap> while clicking a location in the buffer will
- create a selection from the caret position to the clicked
- location.</para>
-
- <para>Holding down <keycap>Shift</keycap> in addition to a caret
- movement key (<keycap>LEFT</keycap>, <keycap>UP</keycap>,
- <keycap>HOME</keycap>, etc) will extend a selection in the specified
- direction.</para>
-
- <para><guimenu>Edit</guimenu>><guimenuitem>Select
- All</guimenuitem> (shortcut: <keycap>C+a</keycap>) selects the
- entire buffer.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Selection</guisubmenu>><guimenuitem>Select None</guimenuitem>
- (shortcut: <keycap>ESCAPE</keycap>) deactivates the
- selection.</para>
- </section>
-
- <section id="rect-select">
- <title>Rectangular Selection</title>
-
- <para>Dragging with the <keycap>Control</keycap> key held down will
- create a rectangular selection. Holding down <keycap>Shift</keycap>
- and <keycap>Control</keycap> while clicking a location in the buffer
- will create a rectangular selection from the caret position to the
- clicked location.</para>
-
- <para>Alternatively, invoking
- <guimenu>Edit</guimenu>><guisubmenu>More
- Selection</guisubmenu>><guimenuitem>Rectangular
- Selection</guimenuitem> (shortcut: <keycap>A+\</keycap>) toggles
- rectangular selection mode. In rectangular selection mode, dragging
- the mouse always creates a rectangular selection, and keyboard
- commands that would normally create a range selection create a
- rectangular selection instead. A status bar indicator is shown when
- this mode is enabled.</para>
-
- <para>It is possible to select a rectangle with zero width but
- non-zero height. This can be used to insert a new column between two
- existing columns, for example. Such zero-width selections are shown
- as a thin vertical line.</para>
-
- <para>Inserting text into a rectangular selection repeats the text
- going down as many times as necessary, and shifts the selection to
- the right. This makes it behave like a <quote>tall</quote>
- caret.</para>
-
- <para>Rectangles can be deleted, copied, pasted, and operated on
- using ordinary editing commands. If necessary, rectangular
- selections are automatically filled in with whitespace to maintain
- alignment.</para>
-
- <para>Rectangular selections can extend beyond the end of a line
- into <quote>virtual space</quote>. Furthermore, if keyboard
- rectangular selection mode is on or if the <keycap>Control</keycap>
- key is being held down, clicking beyond the end of a line will
- insert the appropriate amount of whitespace in order to position the
- cursor at the clicked location.</para>
-
- <note>
- <para>Rectangular selections are implemented using character
- offsets, not absolute screen positions, so they might not behave
- as you might expect if a proportional-width font is being used
- or if soft wrap is enabled. The text area font can be changed in
- the <guibutton>Text Area</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. For information about soft
- wrap, see <xref linkend="word-wrap" />.</para>
- </note>
- </section>
-
- <section id="multi-select">
- <title>Multiple Selection</title>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Selection</guisubmenu>><guimenuitem>Multiple
- Selection</guimenuitem> (keyboard shortcut: <keycap>C+\</keycap>)
- turns multiple selection mode on and off. In multiple selection
- mode, multiple fragments of text can be selected and operated on
- simultaneously, and the caret can be moved independently of the
- selection. The status bar indicates if multiple selection mode is
- active; see <xref linkend="status-bar" />.</para>
-
- <para>Various jEdit commands behave differently with multiple
- selections:</para>
-
- <itemizedlist>
- <listitem>
- <para>Commands that copy text place the contents of each
- selection, separated by line breaks, in the specified
- register.</para>
- </listitem>
-
- <listitem>
- <para>Commands that insert (or paste) text replace each
- selection with the entire text that is being
- inserted.</para>
- </listitem>
-
- <listitem>
- <para>Commands that filter text (such as <guimenuitem>Spaces
- to Tabs</guimenuitem>, <guimenuitem>Range
- Comment</guimenuitem>, <guimenuitem>Replace in
- Selection</guimenuitem>, and so on) behave as if each block
- was selected independently, and the command invoked on each
- in turn.</para>
- </listitem>
-
- <listitem>
- <para>Line-based commands (such as <guimenuitem>Shift Indent
- Left</guimenuitem>, <guimenuitem>Shift Indent
- Right</guimenuitem>, and <guimenuitem>Line
- Comment</guimenuitem>) operate on each line that contains at
- least one selection.</para>
- </listitem>
-
- <listitem>
- <para>Caret movement commands that would normally deactivate
- the selection (such as the arrow keys, while
- <keycap>Shift</keycap> is not being held down), move the
- caret, leaving the selection as-is.</para>
- </listitem>
-
- <listitem>
- <para>Some older plugins may not support multiple selection
- at all.</para>
- </listitem>
- </itemizedlist>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Selection</guisubmenu>><guimenuitem>Select None</guimenuitem>
- (shortcut: <keycap>ESCAPE</keycap>) deactivates the selection
- containing the caret, if there is one. Otherwise it deactivates all
- active selections.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Selection</guisubmenu>><guimenuitem>Invert
- Selection</guimenuitem> (shortcut: <keycap>C+e C+i</keycap>) selects
- a set of text chunks such that all text that was formerly part of a
- selection is now unselected, and all text that wasn't, is
- selected.</para>
-
- <note>
- <para>Deactivating multiple selection mode while multiple blocks
- of text are selected will leave the selections in place, but you
- will not be able to add new selections until multiple selection
- mode is reactivated.</para>
- </note>
- </section>
- </section>
-
- <section id="entering-text">
- <title>Inserting and Deleting Text</title>
-
- <para>Text entered at the keyboard is inserted into the buffer. In
- overwrite mode, which can be toggled by pressing
- <keycap>INSERT</keycap>, one character is deleted from in front of the
- caret position for every character that is inserted. The caret is drawn
- as a horizontal line while overwrite mode is active. The status bar also
- indicates if overwrite mode is active; see <xref linkend="status-bar" />
- for details.</para>
-
- <para>Inserting text while there is a selection will replace the
- selection with the inserted text.</para>
-
- <para>When inserting text, the <keycap>TAB</keycap> and
- <keycap>ENTER</keycap> keys might not behave entirely like you expect
- because of various indentation features; see <xref linkend="indent" />
- for details.</para>
-
- <para>The simplest way to delete text is with the
- <keycap>BACKSPACE</keycap> and <keycap>DELETE</keycap> keys. If nothing
- is selected, they delete the character before or after the caret,
- respectively. If a selection exists, both delete the selection.</para>
-
- <para>More advanced deletion commands are described in <xref
- linkend="words" />, <xref linkend="lines" /> and <xref
- linkend="paragraphs" />.</para>
- </section>
-
- <section id="undo-redo">
- <title>Undo and Redo</title>
-
- <para><guimenu>Edit</guimenu>><guimenuitem>Undo</guimenuitem>
- (shortcut: <keycap>C+z</keycap>) reverses the most recent editing
- command. For example, this can be used to restore unintentionally
- deleted text. More complicated operations, such as a search and replace,
- can also be undone.</para>
-
- <para>If you undo too many changes,
- <guimenu>Edit</guimenu>><guimenuitem>Redo</guimenuitem> (shortcut:
- <keycap>C+e C+z</keycap>) can restore the changes again. For example, if
- some text was inserted, <guimenuitem>Undo</guimenuitem> will remove it
- from the buffer. <guimenuitem>Redo</guimenuitem> will insert it
- again.</para>
-
- <para>By default, the last 100 edits is retained; older edits cannot be
- undone. The maximum number of undos and whether undos are reset when a
- buffer is saved can be changed in the <guibutton>Editing</guibutton>
- pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="editing-pane" />.</para>
- </section>
-
- <section id="words">
- <title>Working With Words</title>
-
- <para><keycap>C+LEFT</keycap> and <keycap>C+RIGHT</keycap> move the
- caret a word at a time. Holding down <keycap>Shift</keycap> in addition
- to the above extends the selection a word at a time.</para>
-
- <para>A single word can be selected by double-clicking with the mouse,
- or using the <guimenu>Edit</guimenu>><guisubmenu>More
- Selection</guisubmenu>><guimenuitem>Select Word</guimenuitem> command
- (shortcut: <keycap>C+e w</keycap>). A selection that begins and ends on
- word boundaries can be created by double-clicking and dragging.</para>
-
- <para><keycap>C+BACKSPACE</keycap> and <keycap>C+DELETE</keycap> delete
- the word before or after the caret, respectively.</para>
-
- <para><guimenu>Edit</guimenu>><guimenuitem>Complete
- Word</guimenuitem> (shortcut: <keycap>C+b</keycap>) locates possible
- completions for the word at the caret, first by looking in the current
- edit mode's syntax highlighting keyword list, and then in the current
- buffer for words that begin with the word at the caret. This serves as a
- very basic code completion feature.</para>
-
- <para>If there is only one completion, it will be inserted into the
- buffer immediately.</para>
-
- <para>If multiple completions were found, the longest common prefix is
- inserted into the buffer, and a popup is shown below the caret position
- listing the completions.</para>
-
- <para>To insert a completion from the list, either select it using the
- <keycap>UP</keycap> and <keycap>DOWN</keycap> keys and press
- <keycap>ENTER</keycap>, press a digit to insert one of the first ten
- completions (1 is the first completion; 9 is the 9th; 0 is the 10th), or
- click the desired completion with the mouse. To close the popup without
- inserting a completion, press <keycap>ESCAPE</keycap>.</para>
-
- <para>Typing while the popup is visible will automatically update the
- popup and narrow the set of completions as necessary.</para>
-
- <para>The default word completion uses the visible buffers (buffers
- being shown in an EditPane) to find completions. The set of possible
- words can be expanded by enabling the <guimenuitem>Global Options - Text
- Area - Complete words from all open buffers</guimenuitem> option.
- Setting this option will use all open buffers to search for possible
- completions. Note, this can degrade completion performance if many
- buffers are open.</para>
-
- <para><guimenu>Edit</guimenu>><guimenuitem>Word Count</guimenuitem>
- displays a dialog box with the number of characters, words and lines in
- the current buffer.</para>
-
- <section>
- <title>What's a Word?</title>
-
- <para>The default behavior of the <keycap>C+LEFT</keycap>,
- <keycap>C+RIGHT</keycap>, <keycap>C+BACKSPACE</keycap> and
- <keycap>C+DELETE</keycap> commands is to stop both at the beginning
- and the end of each word. Normally, a word is a sequence of
- alphanumerics, but you can add other characters as part of
- what jEdit considers to be a 'word', set on a global or mode basis
- from <guimenuitem>Global Options - Editing - Extra Word
- Characters</guimenuitem>.
- In addition, this behavior can be changed by remapping
- these keystrokes to alternative actions whose names end with
- <guimenuitem>(Eat Whitespace)</guimenuitem> in the
- <guibutton>Shortcuts</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="shortcuts-pane" />.</para>
- </section>
- </section>
-
- <section id="lines">
- <title>Working With Lines</title>
-
- <para>An entire line can be selected by triple-clicking with the mouse,
- or using the <guimenu>Edit</guimenu>><guisubmenu>More
- Selection</guisubmenu>><guimenuitem>Select Line</guimenuitem> command
- (shortcut: <keycap>C+e l</keycap>). A selection that begins and ends on
- line boundaries can be created by triple-clicking and dragging.</para>
-
- <para><guimenu>Edit</guimenu>><guimenuitem>Go to Line</guimenuitem>
- (shortcut: <keycap>C+l</keycap>) prompts for a line number and moves the
- caret there.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Selection</guisubmenu>><guimenuitem>Select Line Range</guimenuitem>
- (shortcut: <keycap>C+e C+l</keycap>) prompts for two line numbers and
- selects all text between them.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Delete
- Line</guimenuitem> (shortcut: <keycap>C+d</keycap>) deletes the current
- line.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Delete
- to Start Of Line</guimenuitem> (shortcut:
- <keycap>CS+BACK_SPACE</keycap>) deletes all text from the start of the
- current line to the caret.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Delete
- to End Of Line</guimenuitem> (shortcut: <keycap>CS+DELETE</keycap>)
- deletes all text from the caret to the end of the current line.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Join
- Lines</guimenuitem> (shortcut: <keycap>C+j</keycap>) removes any
- whitespace from the start of the next line and joins it with the current
- line. The caret is moved to the position where the two lines were
- joined. For example, if you invoke <guimenuitem>Join Lines</guimenuitem>
- with the caret on the first line of the following Java code:</para>
-
- <screen>new Widget(Foo
- .createDefaultFoo());</screen>
-
- <para>It will be changed to:</para>
-
- <screen>new Widget(Foo.createDefaultFoo());</screen>
- </section>
-
- <section id="paragraphs">
- <title>Working With Paragraphs</title>
-
- <para>As far as jEdit is concerned, <quote>paragraphs</quote> are
- delimited by double newlines. This is also how
- <application>TeX</application> defines a paragraph. Note that jEdit
- doesn't parse HTML files for <quote><P></quote> tags, nor does it
- support paragraphs delimited only by a leading indent.</para>
-
- <para><keycap>C+UP</keycap> and <keycap>C+DOWN</keycap> move the caret
- to the previous and next paragraph, respectively. Holding down
- <keycap>Shift</keycap> in addition to the above extends the selection a
- paragraph at a time.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Selection</guisubmenu>><guimenuitem>Select Paragraph</guimenuitem>
- (shortcut: <keycap>C+e p</keycap>) selects the paragraph containing the
- caret.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Format
- Paragraph</guimenuitem> (shortcut: <keycap>C+e f</keycap>) splits and
- joins lines in the current selection to make it fit within the wrap
- column position. If nothing is selected, the paragraph containing the
- caret is formatted instead. See <xref linkend="word-wrap" /> for
- information about word wrap and changing the wrap column.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Delete
- Paragraph</guimenuitem> (shortcut: <keycap>C+e d</keycap>) deletes the
- paragraph containing the caret.</para>
- </section>
-
- <section id="word-wrap">
- <title>Wrapping Long Lines</title>
-
- <para>The <firstterm>word wrap</firstterm> feature splits lines at word
- boundaries in order to fit text within a specified wrap margin. A word
- boundary, for the purposes of word wrap, means whitespace. Long lines
- without whitespace are currently not wrapped by jEdit. The wrap margin
- position is indicated in the text are as a faint blue vertical line.
- There are two <quote>wrap modes</quote>, <quote>soft</quote> and
- <quote>hard</quote>; they are described below. The current wrap mode is
- shown in the status bar; see <xref linkend="status-bar" />. The wrap
- mode can be changed in one of the following ways:</para>
-
- <itemizedlist>
- <listitem>
- <para>On a global or mode-specific basis in the
- <guibutton>Editing</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. See <xref
- linkend="editing-pane" />.</para>
- </listitem>
-
- <listitem>
- <para>In the current buffer for the duration of the editing
- session,</para>
-
- <itemizedlist>
- <listitem>
- <para>By clicking the status bar indicator.</para>
- </listitem>
-
- <listitem>
- <para>In the
- <guimenu>Utilities</guimenu>><guimenuitem>Buffer
- Options</guimenuitem> dialog box. See <xref
- linkend="buffer-opts" />.</para>
- </listitem>
-
- <listitem>
- <para>From the keyboard, if a keyboard shortcut has been
- assigned to the <guimenuitem>Toggle Word
- Wrap</guimenuitem> command in the
- <guibutton>Shortcuts</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box. By default, this
- command does not have a keyboard shortcut.</para>
- </listitem>
- </itemizedlist>
- </listitem>
-
- <listitem>
- <para>In the current buffer for future editing sessions by
- placing the following in one of the first or last 10 lines of
- the buffer, where <replaceable>mode</replaceable> is either
- <quote>none</quote>, <quote>soft</quote> or <quote>hard</quote>,
- and <replaceable>column</replaceable> is the desired wrap
- margin:</para>
-
- <screen>:wrap=<replaceable>mode</replaceable>:maxLineLen=<replaceable>column</replaceable>:</screen>
- </listitem>
- </itemizedlist>
-
- <section>
- <title>Soft Wrap</title>
-
- <para>In soft wrap mode, lines are automatically wrapped when
- displayed on screen. Newlines are not inserted at the wrap
- positions, and the wrapping is automatically updated when text is
- inserted or removed.</para>
-
- <para>If the margin is set to 0, then the width of the text area
- window is used to determine where to wrap lines.</para>
-
- <para>If end of line markers are enabled in the <guibutton>Text
- Area</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box, a colon (<quote>:</quote>) is
- painted at the end of wrapped lines. See <xref
- linkend="text-area-pane" />.</para>
- </section>
-
- <section>
- <title>Hard Wrap</title>
-
- <para>In hard wrap mode, inserting text at the end of a line will
- automatically break the line if it extends beyond the wrap margin.
- Inserting or removing text in the middle of a line has no effect,
- however text can be re-wrapped using the
- <guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Format
- Paragraph</guimenuitem> command. See <xref
- linkend="paragraphs" />.</para>
-
- <para>Hard wrap is implemented using character offsets, not screen
- positions, so it might not behave like you expect if a
- proportional-width font is being used. The text area font can be
- changed in the <guibutton>Text Area</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
- </section>
- </section>
-
- <section id="scrolling">
- <title>Scrolling</title>
-
- <para>If you have a mouse with a scroll wheel, you can use the wheel to
- scroll up and down in the text area. Various modifier keys change the
- action of the wheel:</para>
-
- <itemizedlist>
- <listitem>
- <para><keycap>Shift</keycap> - scrolls an entire page at a
- time.</para>
- </listitem>
-
- <listitem>
- <para><keycap>Control</keycap> - scrolls a single line at a
- time.</para>
- </listitem>
-
- <listitem>
- <para><keycap>Alt</keycap> - moves the caret up and down instead
- of scrolling.</para>
- </listitem>
-
- <listitem>
- <para><keycombo>
- <keycap>Alt</keycap>
-
- <keycap>Shift</keycap>
- </keycombo> - extends the selection up and down instead of
- scrolling.</para>
- </listitem>
- </itemizedlist>
-
- <para>Keyboard commands for scrolling the text area are also
- available.</para>
-
- <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Scroll
- to Current Line</guimenuitem> (shortcut: <keycap>C+e C+j</keycap>)
- scrolls the text area in order to make the caret visible, if necessary.
- It does nothing if the caret is already visible.</para>
-
- <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Center
- Caret on Screen</guimenuitem> (shortcut: <keycap>C+e C+n</keycap>) moves
- the caret to the line in the middle of the screen.</para>
-
- <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Line
- Scroll Up</guimenuitem> (shortcut: <keycap>C+QUOTE</keycap>) scrolls the
- text area up by one line.</para>
-
- <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Line
- Scroll Down</guimenuitem> (shortcut: <keycap>C+SLASH</keycap>) scrolls
- the text area down by one line.</para>
-
- <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Page
- Scroll Up</guimenuitem> (shortcut: <keycap>A+QUOTE</keycap>) scrolls the
- text area up by one screenful.</para>
-
- <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Page
- Scroll Down</guimenuitem> (shortcut: <keycap>A+SLASH</keycap>) scrolls
- the text area down by one screenful.</para>
-
- <para>The above scrolling commands differ from the caret movement
- commands in that they don't actually move the caret; they just change
- the scroll bar position.</para>
- </section>
-
- <section id="text-transfer">
- <title>Transferring Text</title>
-
- <para>jEdit provides a rich set of commands for moving and copying text.
- Commands are provided for moving chunks of text from buffers to
- <firstterm>registers</firstterm> and vice-versa. A register is a holding
- area for an arbitrary length of text, with a single-character name. Most
- other programs can only transfer text to and from the system clipboard;
- in jEdit, the system clipboard is just another register, with the
- special name <filename>$</filename>.</para>
-
- <section>
- <title>The Clipboard</title>
-
- <para>jEdit offers the usual text transfer operations, that operate
- on the <filename>$</filename> register.</para>
-
- <para><guimenu>Edit</guimenu>><guimenuitem>Cut</guimenuitem>
- (shortcut: <keycap>C+x</keycap>) places the selected text in the
- clipboard and removes it from the buffer.</para>
-
- <para><guimenu>Edit</guimenu>><guimenuitem>Copy</guimenuitem>
- (shortcut: <keycap>C+c</keycap>) places the selected text in the
- clipboard and leaves it in the buffer.</para>
-
- <para><guimenu>Edit</guimenu>><guimenuitem>Paste</guimenuitem>
- (shortcut: <keycap>C+v</keycap>) inserts the clipboard contents in
- place of the selection (or at the caret position, if there is no
- selection).</para>
-
- <para>The <guimenuitem>Cut</guimenuitem> and
- <guimenuitem>Copy</guimenuitem> commands replace the old clipboard
- contents with the selected text. There are two alternative commands
- which add the selection at the end of the existing clipboard
- contents, instead of replacing it.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>Cut Append</guimenuitem>
- (shortcut: <keycap>C+e C+u</keycap>) appends the selected text to
- the clipboard, then removes it from the buffer. After this command
- has been invoked, the clipboard will consist of the former clipboard
- contents, followed by a newline, followed by the selected
- text.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>Copy Append</guimenuitem>
- (shortcut: <keycap>C+e C+a</keycap>) is the same as <guimenuitem>Cut
- Append</guimenuitem> except it does not remove the selection from
- the buffer.</para>
- </section>
-
- <section id="quick-copy">
- <title>Quick Copy</title>
-
- <para>The quick copy feature is usually found in Unix text editors.
- Quick copy is disabled by default, but it can be enabled in the
- <guibutton>Mouse</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box.</para>
-
- <para>The quick copy feature is accessed using the middle mouse
- button. If you do not have a three-button mouse, then either
- <keycap>Alt</keycap>-click (on Windows and Unix) or
- <keycap>Option</keycap>-click (on MacOS X). The quick copy feature
- enables the following behavior:</para>
-
- <itemizedlist>
- <listitem>
- <para>Clicking the middle mouse button in the text area
- inserts the most recently selected text at the clicked
- location. If you only have a two-button mouse, you can click
- the left mouse button while holding down
- <keycap>Alt</keycap> instead of middle-clicking.</para>
- </listitem>
-
- <listitem>
- <para>Dragging with the middle mouse button creates a
- selection without moving the caret. As soon as the mouse
- button is released, the selected text is inserted at the
- caret position and the selection is deactivated. A message
- is shown in the status bar while text is being selected to
- remind you that this is not an ordinary selection.</para>
- </listitem>
-
- <listitem>
- <para>Holding down <keycap>Shift</keycap> while clicking the
- middle mouse button will duplicate text between the caret
- and the clicked location.</para>
- </listitem>
-
- <listitem>
- <para>Holding down <keycap>Control</keycap> while clicking
- the middle mouse button on a bracket will insert all text in
- that bracket's scope at the caret position.</para>
- </listitem>
- </itemizedlist>
-
- <para>The most recently selected text is stored in the
- <filename>%</filename> register.</para>
-
- <para>If jEdit is being run under Java 2 version 1.4 on Unix, you
- will be able to transfer text with other X Windows applications
- using the quick copy feature. On other platforms and Java versions,
- the contents of the quick copy register are only accessible from
- within jEdit.</para>
- </section>
-
- <section id="registers">
- <title>General Register Commands</title>
-
- <para>These commands require more keystrokes than the two methods
- shown above, but they can operate on any register, allowing an
- arbitrary number of text chunks to be retained at a time.</para>
-
- <para>Each command prompts for a single-character register name to
- be entered after being invoked. Pressing <keycap>ESCAPE</keycap>
- instead of specifying a register name cancels the operation.</para>
-
- <para>Note that the content of registers other than the clipboard
- and quick copy register are automatically saved between jEdit
- sessions.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>Cut to Register</guimenuitem>
- (shortcut: <keycap>C+r C+x <replaceable>key</replaceable></keycap>)
- stores the selected text in the specified register, removing it from
- the buffer.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>Copy to
- Register</guimenuitem> (shortcut: <keycap>C+r C+c
- <replaceable>key</replaceable></keycap>) stores the selected text in
- the specified register, leaving it in the buffer.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>Cut Append to
- Register</guimenuitem> (shortcut: <keycap>C+r C+u
- <replaceable>key</replaceable></keycap>) adds the selected text to
- the existing contents of the specified register, and removes it from
- the buffer.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>Copy Append to
- Register</guimenuitem> (shortcut: <keycap>C+r C+a
- <replaceable>key</replaceable></keycap>) adds the selected text to
- the existing contents of the specified register, without removing it
- from the buffer.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>Paste from
- Register</guimenuitem> (shortcut: <keycap>C+r C+v
- <replaceable>key</replaceable></keycap>) replaces the selection with
- the contents of the specified register.</para>
-
- <para>The following three commands display dialog boxes instead of
- prompting for a register name.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>Paste Previous</guimenuitem>
- (shortcut: <keycap>C+e C+v</keycap>) displays a dialog box listing
- the 20 most recently copied and pasted text strings.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>Paste Deleted</guimenuitem>
- (shortcut: <keycap>C+e C+y</keycap>) is not really a register
- command; it displays a dialog box listing the 20 most recently
- deleted text strings.</para>
-
- <para><guimenu>Edit</guimenu>><guisubmenu>More
- Clipboard</guisubmenu>><guimenuitem>View Registers</guimenuitem>
- displays a dialog box for viewing register contents, including the
- clipboard and the quick copy.</para>
- </section>
- </section>
-
- <section id="markers">
- <title>Markers</title>
-
- <para>A <firstterm>marker</firstterm> is a pointer to a specific
- location within a buffer, which may or may not have a single-character
- <firstterm>shortcut</firstterm> associated with it. Markers are
- persistent; they are saved to
- <filename>.<replaceable>filename</replaceable>.marks</filename>, where
- <filename><replaceable>filename</replaceable></filename> is the name of
- the buffer. (The dot prefix makes the markers file hidden on Unix
- systems.) Marker saving can be disabled in the
- <guibutton>General</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="general-pane" />.</para>
-
- <para><guimenu>Markers</guimenu>><guimenuitem>Add/Remove
- Marker</guimenuitem> (shortcut: <keycap>C+e C+m</keycap>) adds a marker
- without a shortcut pointing to the current line. If a marker is already
- set on the current line, the marker is removed instead. If text is
- selected, markers are added to the first and last line of each
- selection.</para>
-
- <para>Markers are listed in the <guimenu>Markers</guimenu> menu;
- selecting a marker from this menu will move the caret to its
- location.</para>
-
- <para><guimenu>Markers</guimenu>><guimenuitem>Go to Previous
- Marker</guimenuitem> (shortcut: <keycap>C+e C+COMMA</keycap>) goes to
- the marker immediately before the caret position.</para>
-
- <para><guimenu>Markers</guimenu>><guimenuitem>Go to Next
- Marker</guimenuitem> (shortcut: <keycap>C+e C+PERIOD</keycap>) goes to
- the marker immediately after the caret position.</para>
-
- <para><guimenu>Markers</guimenu>><guimenuitem>Remove All
- Markers</guimenuitem> removes all markers set in the current
- buffer.</para>
-
- <para>Markers with shortcuts allow for quicker keyboard-based
- navigation. The following commands all prompt for a single-character
- shortcut when invoked. Pressing <keycap>ESCAPE</keycap> instead of
- specifying a shortcut will cancel the operation.</para>
-
- <para><guimenu>Markers</guimenu>><guimenuitem>Add Marker With
- Shortcut</guimenuitem> (shortcut: <keycap>C+t
- <replaceable>key</replaceable></keycap>) adds a marker with the
- specified shortcut. If marker with that shortcut already exists, it will
- remain in the buffer but lose its shortcut.</para>
-
- <para><guimenu>Markers</guimenu>><guimenuitem>Go to
- Marker</guimenuitem> (shortcut: <keycap>C+y
- <replaceable>key</replaceable></keycap>) moves the caret to the location
- of the marker with the specified shortcut.</para>
-
- <para><guimenu>Markers</guimenu>><guimenuitem>Select to
- Marker</guimenuitem> (shortcut: <keycap>C+u
- <replaceable>key</replaceable></keycap>) creates a selection from the
- caret location to the marker with the specified shortcut.</para>
-
- <para><guimenu>Markers</guimenu>><guimenuitem>Swap Caret and
- Marker</guimenuitem> (shortcut: <keycap>C+k
- <replaceable>key</replaceable></keycap>) moves the caret to the location
- of the marker with the specified shortcut, and moves the marker to the
- former caret position. Invoke this command multiple times to flip
- between two locations in the buffer.</para>
-
- <para>Lines which contain markers are indicated in the gutter with a
- highlight. Moving the mouse over the highlight displays a tool tip
- showing the marker's shortcut, if it has one. See <xref
- linkend="overview" /> for information about the gutter.</para>
- </section>
-
- <section id="search-replace">
- <title>Search and Replace</title>
-
- <section>
- <title>Searching For Text</title>
-
- <para><guimenu>Search</guimenu>><guimenuitem>Find</guimenuitem>
- (shortcut: <keycap>C+f</keycap>) displays the search and replace
- dialog box.</para>
-
- <para>The search string can be entered in the <guibutton>Search
- for</guibutton> text field. This text field remembers previously
- entered strings; see <xref linkend="history" /> for details.</para>
-
- <para>If text was selected in the text area and the selection does
- not span a line break, the selected text becomes the default search
- string.</para>
-
- <para>If the selection spans a line break, the <guibutton>Search in
- Selection</guibutton> and <guibutton>HyperSearch</guibutton> buttons
- will be pre-selected, and the search string field will be initially
- blank. (See <xref linkend="hypersearch" /> for information about the
- HyperSearch feature.) <!-- Note that finding the next or previous
- occurrence cannot be constrained to a selected range; only
- replacement and HyperSearch can be (see <xref linkend="hypersearch" />). --></para>
-
- <para>Selecting the <guibutton>Ignore case</guibutton> check box
- makes the search case insensitive - for example, searching for
- <quote>Hello</quote> will match <quote>hello</quote>,
- <quote>HELLO</quote> and <quote>HeLlO</quote>.</para>
-
- <para>To search for special characters (such as newlines or
- non-printable characters), inexact sequences of text, or strings
- that span multiple lines, we use
- <emphasis role="bold">Regular Expressions</emphasis>.
- Selecting the <guibutton>Regular expressions</guibutton> check
- box allows special characters to be used in the search string.
- Regular expression syntax is described in <xref linkend="regexps"/>.
- If you use (groups) in the search field, you back-reference them
- with $1 through $9 in the replace field. </para>
-
- <para>The <guibutton>Backward</guibutton> and
- <guibutton>Forward</guibutton> buttons specify the search direction.
- Note that regular expressions can only be used when searching in a
- forward direction.</para>
-
- <para>Clicking <guibutton>Find</guibutton> will locate the next
- occurrence of the search string (or previous occurrence, if
- searching backwards). If the <guibutton>Keep dialog</guibutton>
- check box is selected, the dialog box will remain open after the
- search string has been located; otherwise, it will close.</para>
-
- <para>If no occurrences could be found and the <guibutton>Auto
- wrap</guibutton> check box is selected, the search will
- automatically restart from the beginning of the buffer (or the end,
- if searching backwards). If <guibutton>Auto wrap</guibutton> is not
- selected, a confirmation dialog box is shown before restarting the
- search.</para>
-
- <para><guimenu>Search</guimenu>><guimenuitem>Find
- Next</guimenuitem> (shortcut: <keycap>C+g</keycap>) locates the next
- occurrence of the most recent search string without displaying the
- search and replace dialog box.</para>
-
- <para><guimenu>Search</guimenu>><guimenuitem>Find
- Previous</guimenuitem> (shortcut: <keycap>C+h</keycap>) locates the
- previous occurrence of the most recent search string without
- displaying the search and replace dialog box.</para>
- </section>
-
- <section>
- <title>Replacing Text</title>
-
- <para>The replace string text field of the search dialog remembers
- previously entered strings; see <xref linkend="history" /> for
- details.</para>
-
- <para>Clicking <guibutton>Replace & Find</guibutton> will
- perform a replacement in the current selection and locate the next
- occurrence of the search string. Clicking <guibutton>Replace
- All</guibutton> will replace all occurrences of the search string
- with the replacement string in the current search scope (which is
- either the selection, the current buffer, or a set of buffers, as
- specified in the search and replace dialog box).</para>
-
- <para>Occurrences of the search string can be replaced with either a
- replacement string, or the return value of a BeanShell script
- snippet. Two radio buttons in the search and replace dialog box
- select between the two replacement modes, which are described in
- detail below.</para>
-
- <section>
- <title>Text Replace</title>
-
- <para>If the <guibutton>Text</guibutton> button is selected, the
- search string is simply replaced with the replacement
- string.</para>
-
- <para>If regular expressions are enabled, positional parameters
- (<literal>$0</literal>, <literal>$1</literal>,
- <literal>$2</literal>, and so on) can be used to insert the
- contents of matched subexpressions in the replacement string;
- see <xref linkend="regexps" /> for more information.</para>
-
- <para>If the search is case-insensitive, jEdit attempts to
- modify the case of the replacement string to match that of the
- particular instance of the search string being replaced. For
- example, searching for <quote>label</quote> and replacing it
- with <quote>text</quote>, will perform the following
- replacements:</para>
-
- <itemizedlist>
- <listitem>
- <para><quote>String label</quote> would become
- <quote>String text</quote></para>
- </listitem>
-
- <listitem>
- <para><quote>setLabel</quote> would become
- <quote>setText</quote></para>
- </listitem>
-
- <listitem>
- <para><quote>DEFAULT_LABEL</quote> would become
- <quote>DEFAULT_TEXT</quote></para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section>
- <title>BeanShell Replace</title>
-
- <para>In BeanShell replacement mode, the search string is
- replaced with the return value of a BeanShell snippet. The
- following predefined variables can be referenced in the
- snippet:</para>
-
- <itemizedlist>
- <listitem>
- <para><varname>_0</varname> -- the text to be
- replaced</para>
- </listitem>
-
- <listitem>
- <para><varname>_1</varname> - <varname>_9</varname> --
- if regular expressions are enabled, these contain the
- values of matched subexpressions.</para>
- </listitem>
- </itemizedlist>
-
- <para>BeanShell syntax and features are covered in great detail
- in <xref linkend="writing-macros-part" />, but here are some
- examples:</para>
-
- <informalexample>
- <para>To replace each occurrence of <quote>Windows</quote>
- with <quote>Linux</quote>, and each occurrence of
- <quote>Linux</quote> with <quote>Windows</quote>, search for
- the following regular expression:</para>
-
- <programlisting>(Windows|Linux)</programlisting>
-
- <para>Replacing it with the following BeanShell
- snippet:</para>
-
- <programlisting>_1.equals("Windows") ? "Linux" : "Windows"</programlisting>
- </informalexample>
-
- <informalexample>
- <para>To convert all HTML tags to lower case, search for the
- following regular expression:</para>
-
- <programlisting><\S+</programlisting>
-
- <para>Replacing it with the following BeanShell
- snippet:</para>
-
- <programlisting>_0.toLowerCase()</programlisting>
- </informalexample>
-
- <informalexample>
- <para>To replace arithmetic expressions contained in curly
- braces with the result of evaluating the expression, search
- for the following regular expression:</para>
-
- <programlisting>\{(.+?)\}</programlisting>
-
- <para>Replacing it with the following BeanShell
- snippet:</para>
-
- <programlisting>eval(_1)</programlisting>
- </informalexample>
-
- <para>These examples only scratch the surface; the possibilities
- are endless.</para>
- </section>
- </section>
-
- <section id="hypersearch">
- <title>HyperSearch</title>
-
- <para>If the <guibutton>HyperSearch</guibutton> check box in the
- search and replace dialog box is selected, clicking
- <guibutton>Find</guibutton> lists all occurrences of the search
- string, instead of locating the next match.</para>
-
- <para>By default, HyperSearch results are shown in a floating
- window. This window can be docked using the commands in its top-left
- corner popup menu; see <xref linkend="docking" />.</para>
-
- <para>If the <guibutton>Multiple results</guibutton> check box is
- selected in the results window, past search results are
- retained.</para>
-
- <para>Running searches can be stopped in the
- <guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>I/O
- Progress Monitor</guimenuitem> dialog box.</para>
- </section>
-
- <section>
- <title>Multiple File Search</title>
-
- <para>Search and replace commands can be performed over an arbitrary
- set of files in one step. The set of files to search is selected
- with a set of buttons in the search dialog box.</para>
-
- <para>If the <guibutton>Current buffer</guibutton> button is
- selected, only the current buffer is searched. This is the default
- behavior.</para>
-
- <para>If the <guibutton>All buffers</guibutton> button is selected,
- all open buffers whose names match the glob pattern entered in the
- <guibutton>Filter</guibutton> text field will be searched. See <xref
- linkend="globs" /> for more information about glob patterns.</para>
-
- <para>If the <guibutton>Directory</guibutton> radio button is
- selected, all files contained in the specified directory whose names
- match the glob will be searched. The directory to search in can
- either be entered in the <guibutton>Directory</guibutton> text
- field, or chosen in a file selector dialog box by clicking the
- <guibutton>Choose</guibutton> button next to the field. If the
- <guibutton>Search subdirectories</guibutton> check box is selected,
- all subdirectories of the specified directory will also be searched.
- Keep in mind that searching through directories containing many
- files can take a long time.</para>
-
- <para>The <guibutton>Directory</guibutton> and
- <guibutton>Filter</guibutton> text fields remember previously
- entered strings; see <xref linkend="history" /> for details.</para>
-
- <para>When the search and replace dialog box is opened, the
- directory and file name filter fields are set to their previous
- values. They can be set to match the current buffer's directory and
- file name extension by clicking
- <guibutton>Synchronize</guibutton>.</para>
-
- <para>Note that clicking the <guibutton>All Buffers</guibutton> or
- <guibutton>Directory</guibutton> radio buttons also selects the
- <guibutton>HyperSearch</guibutton> check box since that is what you
- would want, most of the time. However, the
- <guibutton>HyperSearch</guibutton> check box can be unchecked, for
- stepping through search results in multiple files one at a
- time.</para>
-
- <para>Two convenience commands are provided for performing multiple
- file searches.</para>
-
- <para><guimenu>Search</guimenu>><guimenuitem>Search in Open
- Buffers</guimenuitem> (shortcut: <keycap>C+e C+b</keycap>) displays
- the search dialog box and selects the <guibutton>All
- buffers</guibutton> button.</para>
-
- <para><guimenu>Search</guimenu>><guimenuitem>Search in
- Directory</guimenuitem> (shortcut: <keycap>C+e C+d</keycap>)
- displays the search dialog box and selects the
- <guibutton>Directory</guibutton> button.</para>
- </section>
-
- <section id="search-bar">
- <title>The Search Bar</title>
-
- <para>The search bar feature provides a convenient way to search in
- the current buffer without opening the search dialog box. The search
- bar does not support replacement or multiple file search. Previously
- entered strings can be recalled in the search bar with the
- <keycap>Up</keycap> and <keycap>Down</keycap> arrow keys; see <xref
- linkend="history" />.</para>
-
- <para>By default, the search bar remains hidden until one of the
- quick search commands (described below) is invoked; however you can
- choose to have it always visible in the <guibutton>View</guibutton>
- pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="view-pane" />.</para>
-
- <para><guimenu>Search</guimenu>><guimenuitem>Incremental Search
- Bar</guimenuitem> (shortcut: <keycap>C+COMMA</keycap>) displays the
- search bar if necessary, and gives it keyboard focus. </para>
-
- <para><guimenu>Search</guimenu>><guimenuitem>Incremental Search
- for Word</guimenuitem> (shortcut: <keycap>A+COMMA</keycap>) behaves
- like the above command except it places the word at the caret in the
- search string field. If this command is invoked while there is a
- selection, the selection is placed in the search string
- field instead.</para>
-
- <para>Unless the <guibutton>HyperSearch</guibutton> check box is
- selected, the search bar will perform an <firstterm>incremental
- search</firstterm>. In incremental search mode, the first occurrence
- of the search string is located in the current buffer as it is being
- typed. Pressing <keycap>ENTER</keycap> and <keycap>S+ENTER</keycap>
- searches for the next and previous occurrence, respectively. Once
- the desired occurrence has been located, pressing
- <keycap>ESCAPE</keycap> returns keyboard focus to the text area.
- Unless the search bar is set to be always visible (see above),
- pressing <keycap>ESCAPE</keycap> will also hide the search
- bar.</para>
-
- <note>
- <para>Incremental searches cannot be not recorded in macros. If
- your macro needs to perform a search, use the search and replace
- dialog box instead. See <xref linkend="using-macros" /> for
- information about macros.</para>
- </note>
-
- <para><guimenu>Search</guimenu>><guimenuitem>HyperSearch
- Bar</guimenuitem> (shortcut: <keycap>C+PERIOD</keycap>) displays the
- search bar if necessary, gives it keyboard focus, and selects the
- <guibutton>HyperSearch</guibutton> check box. If this command is
- invoked while there is a selection, the selected text will be
- searched for immediately and the search bar will not be
- shown.</para>
-
- <para>If the <guibutton>HyperSearch</guibutton> check box is
- selected, pressing <keycap>Enter</keycap> in the search string field
- will perform a HyperSearch in the current buffer.</para>
-
- <para><guimenu>Search</guimenu>><guimenuitem>HyperSearch for
- Word</guimenuitem> (shortcut: <keycap>A+PERIOD</keycap>) performs a
- HyperSearch for the word at the caret. This command does not show
- the search bar or give it keyboard focus.</para>
- </section>
- </section>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="editing">
+ <title>Editing Text</title>
+ <!-- jEdit buffer-local properties:
+ :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=80:
+ :xml.root=users-guide.xml: -->
+
+ <section id="caret">
+ <title>Moving The Caret</title>
+
+ <para>The simplest way to move the caret is to click the mouse at the
+ desired location in the text area. The caret can also be moved using the
+ keyboard.</para>
+
+ <para>The <keycap>LEFT</keycap>, <keycap>RIGHT</keycap>,
+ <keycap>UP</keycap> and <keycap>DOWN</keycap> keys move the caret in the
+ respective direction, and the <keycap>PAGE_UP</keycap> and
+ <keycap>PAGE_DOWN</keycap> keys move the caret up and down one
+ screen-full, respectively.</para>
+
+ <para>When pressed once, the <keycap>HOME</keycap> key moves the caret
+ to the first non-whitespace character of the current screen line.
+ Pressing it a second time moves the caret to the beginning of the
+ current buffer line. Pressing it a third time moves the caret to the
+ first visible line.</para>
+
+ <para>The <keycap>END</keycap> key behaves in a similar manner, going to
+ the last non-whitespace character of the current screen line, the end of
+ the current buffer line, and finally to the last visible line.</para>
+
+ <para>If soft wrap is disabled, a <quote>screen line</quote> is the same
+ as a <quote>buffer line</quote>. If soft wrap is enabled, a screen line
+ is a section of a newline-delimited buffer line that fits within the
+ wrap margin width. See <xref linkend="word-wrap" />.</para>
+
+ <para><keycap>C+HOME</keycap> and <keycap>C+END</keycap> move the caret
+ to the beginning and end of the buffer, respectively.</para>
+
+ <para>More advanced caret movement is covered in <xref
+ linkend="words" />, <xref linkend="lines" /> and <xref
+ linkend="paragraphs" />.</para>
+
+ <sidebar>
+ <title>The Home and End keys</title>
+
+ <para>If you prefer more traditional behavior for the
+ <keycap>HOME</keycap> and <keycap>END</keycap> keys, you can
+ reassign the respective keyboard shortcuts in the
+ <guibutton>Shortcuts</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem>; see <xref linkend="shortcuts-pane" />.</para>
+
+ <para>By default, the shortcuts are assigned as follows:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><keycap>HOME</keycap> is bound to <guimenuitem>Smart
+ Home</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><keycap>END</keycap> is bound to <guimenuitem>Smart
+ End</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><keycap>S+HOME</keycap> is bound to
+ <guimenuitem>Select to Smart Home
+ Position</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><keycap>S+END</keycap> is bound to <guimenuitem>Select
+ to Smart End Position</guimenuitem>.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>However you can rebind them to anything you want, for example,
+ various combinations of the following, or indeed any other command
+ or macro:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><guimenuitem>Go to Start/End of White
+ Space</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Go to Start/End of
+ Line</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Go to Start/End of
+ Buffer</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Select to Start/End of White Space
+ </guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Select to Start/End of
+ Line</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para><guimenuitem>Select to Start/End of
+ Buffer</guimenuitem>.</para>
+ </listitem>
+ </itemizedlist>
+ </sidebar>
+ </section>
+
+ <section id="selection">
+ <title>Selecting Text</title>
+
+ <para>A <firstterm>selection</firstterm> is a block of text marked for
+ further manipulation. Range selections are equivalent to selections in
+ most other text editors; they cover text between two points in a buffer.
+ In addition to the standard text-selection mode, jEdit also allows
+ <emphasis role="bold">rectangular selections</emphasis> that cover a
+ rectangular area (some text editors refer to these as <quote>column
+ selections</quote>). Furthermore, several chunks of text can be selected
+ and operated on simultaneously.</para>
+
+ <section>
+ <title>Range Selection</title>
+
+ <para>Dragging the mouse creates a range selection from where the
+ mouse was pressed to where it was released. Holding down
+ <keycap>Shift</keycap> while clicking a location in the buffer will
+ create a selection from the caret position to the clicked
+ location.</para>
+
+ <para>Holding down <keycap>Shift</keycap> in addition to a caret
+ movement key (<keycap>LEFT</keycap>, <keycap>UP</keycap>,
+ <keycap>HOME</keycap>, etc) will extend a selection in the specified
+ direction.</para>
+
+ <para><guimenu>Edit</guimenu>><guimenuitem>Select
+ All</guimenuitem> (shortcut: <keycap>C+a</keycap>) selects the
+ entire buffer.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Selection</guisubmenu>><guimenuitem>Select None</guimenuitem>
+ (shortcut: <keycap>ESCAPE</keycap>) deactivates the
+ selection.</para>
+ </section>
+
+ <section id="rect-select">
+ <title>Rectangular Selection</title>
+
+ <para>Dragging with the <keycap>Control</keycap> key held down will
+ create a rectangular selection. Holding down <keycap>Shift</keycap>
+ and <keycap>Control</keycap> while clicking a location in the buffer
+ will create a rectangular selection from the caret position to the
+ clicked location.</para>
+
+ <para>Alternatively, invoking
+ <guimenu>Edit</guimenu>><guisubmenu>More
+ Selection</guisubmenu>><guimenuitem>Rectangular
+ Selection</guimenuitem> (shortcut: <keycap>A+\</keycap>) toggles
+ rectangular selection mode. In rectangular selection mode, dragging
+ the mouse always creates a rectangular selection, and keyboard
+ commands that would normally create a range selection create a
+ rectangular selection instead. A status bar indicator is shown when
+ this mode is enabled.</para>
+
+ <para>It is possible to select a rectangle with zero width but
+ non-zero height. This can be used to insert a new column between two
+ existing columns, for example. Such zero-width selections are shown
+ as a thin vertical line.</para>
+
+ <para>Inserting text into a rectangular selection repeats the text
+ going down as many times as necessary, and shifts the selection to
+ the right. This makes it behave like a <quote>tall</quote>
+ caret.</para>
+
+ <para>Rectangles can be deleted, copied, pasted, and operated on
+ using ordinary editing commands. If necessary, rectangular
+ selections are automatically filled in with whitespace to maintain
+ alignment.</para>
+
+ <para>Rectangular selections can extend beyond the end of a line
+ into <quote>virtual space</quote>. Furthermore, if keyboard
+ rectangular selection mode is on or if the <keycap>Control</keycap>
+ key is being held down, clicking beyond the end of a line will
+ insert the appropriate amount of whitespace in order to position the
+ cursor at the clicked location.</para>
+
+ <note>
+ <para>Rectangular selections are implemented using character
+ offsets, not absolute screen positions, so they might not behave
+ as you might expect if a proportional-width font is being used
+ or if soft wrap is enabled. The text area font can be changed in
+ the <guibutton>Text Area</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. For information about soft
+ wrap, see <xref linkend="word-wrap" />.</para>
+ </note>
+ </section>
+
+ <section id="multi-select">
+ <title>Multiple Selection</title>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Selection</guisubmenu>><guimenuitem>Multiple
+ Selection</guimenuitem> (keyboard shortcut: <keycap>C+\</keycap>)
+ turns multiple selection mode on and off. In multiple selection
+ mode, multiple fragments of text can be selected and operated on
+ simultaneously, and the caret can be moved independently of the
+ selection. The status bar indicates if multiple selection mode is
+ active; see <xref linkend="status-bar" />.</para>
+
+ <para>Various jEdit commands behave differently with multiple
+ selections:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Commands that copy text place the contents of each
+ selection, separated by line breaks, in the specified
+ register.</para>
+ </listitem>
+
+ <listitem>
+ <para>Commands that insert (or paste) text replace each
+ selection with the entire text that is being
+ inserted.</para>
+ </listitem>
+
+ <listitem>
+ <para>Commands that filter text (such as <guimenuitem>Spaces
+ to Tabs</guimenuitem>, <guimenuitem>Range
+ Comment</guimenuitem>, <guimenuitem>Replace in
+ Selection</guimenuitem>, and so on) behave as if each block
+ was selected independently, and the command invoked on each
+ in turn.</para>
+ </listitem>
+
+ <listitem>
+ <para>Line-based commands (such as <guimenuitem>Shift Indent
+ Left</guimenuitem>, <guimenuitem>Shift Indent
+ Right</guimenuitem>, and <guimenuitem>Line
+ Comment</guimenuitem>) operate on each line that contains at
+ least one selection.</para>
+ </listitem>
+
+ <listitem>
+ <para>Caret movement commands that would normally deactivate
+ the selection (such as the arrow keys, while
+ <keycap>Shift</keycap> is not being held down), move the
+ caret, leaving the selection as-is.</para>
+ </listitem>
+
+ <listitem>
+ <para>Some older plugins may not support multiple selection
+ at all.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Selection</guisubmenu>><guimenuitem>Select None</guimenuitem>
+ (shortcut: <keycap>ESCAPE</keycap>) deactivates the selection
+ containing the caret, if there is one. Otherwise it deactivates all
+ active selections.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Selection</guisubmenu>><guimenuitem>Invert
+ Selection</guimenuitem> (shortcut: <keycap>C+e C+i</keycap>) selects
+ a set of text chunks such that all text that was formerly part of a
+ selection is now unselected, and all text that wasn't, is
+ selected.</para>
+
+ <note>
+ <para>Deactivating multiple selection mode while multiple blocks
+ of text are selected will leave the selections in place, but you
+ will not be able to add new selections until multiple selection
+ mode is reactivated.</para>
+ </note>
+ </section>
+ </section>
+
+ <section id="entering-text">
+ <title>Inserting and Deleting Text</title>
+
+ <para>Text entered at the keyboard is inserted into the buffer. In
+ overwrite mode, which can be toggled by pressing
+ <keycap>INSERT</keycap>, one character is deleted from in front of the
+ caret position for every character that is inserted. The caret is drawn
+ as a horizontal line while overwrite mode is active. The status bar also
+ indicates if overwrite mode is active; see <xref linkend="status-bar" />
+ for details.</para>
+
+ <para>Inserting text while there is a selection will replace the
+ selection with the inserted text.</para>
+
+ <para>When inserting text, the <keycap>TAB</keycap> and
+ <keycap>ENTER</keycap> keys might not behave entirely like you expect
+ because of various indentation features; see <xref linkend="indent" />
+ for details.</para>
+
+ <para>The simplest way to delete text is with the
+ <keycap>BACKSPACE</keycap> and <keycap>DELETE</keycap> keys. If nothing
+ is selected, they delete the character before or after the caret,
+ respectively. If a selection exists, both delete the selection.</para>
+
+ <para>More advanced deletion commands are described in <xref
+ linkend="words" />, <xref linkend="lines" /> and <xref
+ linkend="paragraphs" />.</para>
+ </section>
+
+ <section id="undo-redo">
+ <title>Undo and Redo</title>
+
+ <para><guimenu>Edit</guimenu>><guimenuitem>Undo</guimenuitem>
+ (shortcut: <keycap>C+z</keycap>) reverses the most recent editing
+ command. For example, this can be used to restore unintentionally
+ deleted text. More complicated operations, such as a search and replace,
+ can also be undone.</para>
+
+ <para>If you undo too many changes,
+ <guimenu>Edit</guimenu>><guimenuitem>Redo</guimenuitem> (shortcut:
+ <keycap>C+e C+z</keycap>) can restore the changes again. For example, if
+ some text was inserted, <guimenuitem>Undo</guimenuitem> will remove it
+ from the buffer. <guimenuitem>Redo</guimenuitem> will insert it
+ again.</para>
+
+ <para>By default, the last 100 edits is retained; older edits cannot be
+ undone. The maximum number of undos and whether undos are reset when a
+ buffer is saved can be changed in the <guibutton>Editing</guibutton>
+ pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="editing-pane" />.</para>
+ </section>
+
+ <section id="words">
+ <title>Working With Words</title>
+
+ <para><keycap>C+LEFT</keycap> and <keycap>C+RIGHT</keycap> move the
+ caret a word at a time. Holding down <keycap>Shift</keycap> in addition
+ to the above extends the selection a word at a time.</para>
+
+ <para>A single word can be selected by double-clicking with the mouse,
+ or using the <guimenu>Edit</guimenu>><guisubmenu>More
+ Selection</guisubmenu>><guimenuitem>Select Word</guimenuitem> command
+ (shortcut: <keycap>C+e w</keycap>). A selection that begins and ends on
+ word boundaries can be created by double-clicking and dragging.</para>
+
+ <para><keycap>C+BACKSPACE</keycap> and <keycap>C+DELETE</keycap> delete
+ the word before or after the caret, respectively.</para>
+
+ <para><guimenu>Edit</guimenu>><guimenuitem>Complete
+ Word</guimenuitem> (shortcut: <keycap>C+b</keycap>) locates possible
+ completions for the word at the caret, first by looking in the current
+ edit mode's syntax highlighting keyword list, and then in the current
+ buffer for words that begin with the word at the caret. This serves as a
+ very basic code completion feature.</para>
+
+ <para>If there is only one completion, it will be inserted into the
+ buffer immediately.</para>
+
+ <para>If multiple completions were found, the longest common prefix is
+ inserted into the buffer, and a popup is shown below the caret position
+ listing the completions.</para>
+
+ <para>To insert a completion from the list, either select it using the
+ <keycap>UP</keycap> and <keycap>DOWN</keycap> keys and press
+ <keycap>ENTER</keycap>, press a digit to insert one of the first ten
+ completions (1 is the first completion; 9 is the 9th; 0 is the 10th), or
+ click the desired completion with the mouse. To close the popup without
+ inserting a completion, press <keycap>ESCAPE</keycap>.</para>
+
+ <para>Typing while the popup is visible will automatically update the
+ popup and narrow the set of completions as necessary.</para>
+
+ <para>The default word completion uses the visible buffers (buffers
+ being shown in an EditPane) to find completions. The set of possible
+ words can be expanded by enabling the <guimenuitem>Global Options - Text
+ Area - Complete words from all open buffers</guimenuitem> option.
+ Setting this option will use all open buffers to search for possible
+ completions. Note, this can degrade completion performance if many
+ buffers are open.</para>
+
+ <para><guimenu>Edit</guimenu>><guimenuitem>Word Count</guimenuitem>
+ displays a dialog box with the number of characters, words and lines in
+ the current buffer.</para>
+
+ <section>
+ <title>What's a Word?</title>
+
+ <para>The default behavior of the <keycap>C+LEFT</keycap>,
+ <keycap>C+RIGHT</keycap>, <keycap>C+BACKSPACE</keycap> and
+ <keycap>C+DELETE</keycap> commands is to stop both at the beginning
+ and the end of each word. Normally, a word is a sequence of
+ alphanumerics, but you can add other characters as part of
+ what jEdit considers to be a 'word', set on a global or mode basis
+ from <guimenuitem>Global Options - Editing - Extra Word
+ Characters</guimenuitem>.
+ In addition, this behavior can be changed by remapping
+ these keystrokes to alternative actions whose names end with
+ <guimenuitem>(Eat Whitespace)</guimenuitem> in the
+ <guibutton>Shortcuts</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="shortcuts-pane" />.</para>
+ </section>
+ </section>
+
+ <section id="lines">
+ <title>Working With Lines</title>
+
+ <para>An entire line can be selected by triple-clicking with the mouse,
+ or using the <guimenu>Edit</guimenu>><guisubmenu>More
+ Selection</guisubmenu>><guimenuitem>Select Line</guimenuitem> command
+ (shortcut: <keycap>C+e l</keycap>). A selection that begins and ends on
+ line boundaries can be created by triple-clicking and dragging.</para>
+
+ <para><guimenu>Edit</guimenu>><guimenuitem>Go to Line</guimenuitem>
+ (shortcut: <keycap>C+l</keycap>) prompts for a line number and moves the
+ caret there.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Selection</guisubmenu>><guimenuitem>Select Line Range</guimenuitem>
+ (shortcut: <keycap>C+e C+l</keycap>) prompts for two line numbers and
+ selects all text between them.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Delete
+ Line</guimenuitem> (shortcut: <keycap>C+d</keycap>) deletes the current
+ line.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Delete
+ to Start Of Line</guimenuitem> (shortcut:
+ <keycap>CS+BACK_SPACE</keycap>) deletes all text from the start of the
+ current line to the caret.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Delete
+ to End Of Line</guimenuitem> (shortcut: <keycap>CS+DELETE</keycap>)
+ deletes all text from the caret to the end of the current line.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Join
+ Lines</guimenuitem> (shortcut: <keycap>C+j</keycap>) removes any
+ whitespace from the start of the next line and joins it with the current
+ line. The caret is moved to the position where the two lines were
+ joined. For example, if you invoke <guimenuitem>Join Lines</guimenuitem>
+ with the caret on the first line of the following Java code:</para>
+
+ <screen>new Widget(Foo
+ .createDefaultFoo());</screen>
+
+ <para>It will be changed to:</para>
+
+ <screen>new Widget(Foo.createDefaultFoo());</screen>
+ </section>
+
+ <section id="paragraphs">
+ <title>Working With Paragraphs</title>
+
+ <para>As far as jEdit is concerned, <quote>paragraphs</quote> are
+ delimited by double newlines. This is also how
+ <application>TeX</application> defines a paragraph. Note that jEdit
+ doesn't parse HTML files for <quote><P></quote> tags, nor does it
+ support paragraphs delimited only by a leading indent.</para>
+
+ <para><keycap>C+UP</keycap> and <keycap>C+DOWN</keycap> move the caret
+ to the previous and next paragraph, respectively. Holding down
+ <keycap>Shift</keycap> in addition to the above extends the selection a
+ paragraph at a time.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Selection</guisubmenu>><guimenuitem>Select Paragraph</guimenuitem>
+ (shortcut: <keycap>C+e p</keycap>) selects the paragraph containing the
+ caret.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Format
+ Paragraph</guimenuitem> (shortcut: <keycap>C+e f</keycap>) splits and
+ joins lines in the current selection to make it fit within the wrap
+ column position. If nothing is selected, the paragraph containing the
+ caret is formatted instead. See <xref linkend="word-wrap" /> for
+ information about word wrap and changing the wrap column.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Delete
+ Paragraph</guimenuitem> (shortcut: <keycap>C+e d</keycap>) deletes the
+ paragraph containing the caret.</para>
+ </section>
+
+ <section id="word-wrap">
+ <title>Wrapping Long Lines</title>
+
+ <para>The <firstterm>word wrap</firstterm> feature splits lines at word
+ boundaries in order to fit text within a specified wrap margin. A word
+ boundary, for the purposes of word wrap, means whitespace. Long lines
+ without whitespace are currently not wrapped by jEdit. The wrap margin
+ position is indicated in the text are as a faint blue vertical line.
+ There are two <quote>wrap modes</quote>, <quote>soft</quote> and
+ <quote>hard</quote>; they are described below. The current wrap mode is
+ shown in the status bar; see <xref linkend="status-bar" />. The wrap
+ mode can be changed in one of the following ways:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>On a global or mode-specific basis in the
+ <guibutton>Editing</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. See <xref
+ linkend="editing-pane" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the current buffer for the duration of the editing
+ session,</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>By clicking the status bar indicator.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the
+ <guimenu>Utilities</guimenu>><guimenuitem>Buffer
+ Options</guimenuitem> dialog box. See <xref
+ linkend="buffer-opts" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>From the keyboard, if a keyboard shortcut has been
+ assigned to the <guimenuitem>Toggle Word
+ Wrap</guimenuitem> command in the
+ <guibutton>Shortcuts</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box. By default, this
+ command does not have a keyboard shortcut.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>In the current buffer for future editing sessions by
+ placing the following in one of the first or last 10 lines of
+ the buffer, where <replaceable>mode</replaceable> is either
+ <quote>none</quote>, <quote>soft</quote> or <quote>hard</quote>,
+ and <replaceable>column</replaceable> is the desired wrap
+ margin:</para>
+
+ <screen>:wrap=<replaceable>mode</replaceable>:maxLineLen=<replaceable>column</replaceable>:</screen>
+ </listitem>
+ </itemizedlist>
+
+ <section>
+ <title>Soft Wrap</title>
+
+ <para>In soft wrap mode, lines are automatically wrapped when
+ displayed on screen. Newlines are not inserted at the wrap
+ positions, and the wrapping is automatically updated when text is
+ inserted or removed.</para>
+
+ <para>If the margin is set to 0, then the width of the text area
+ window is used to determine where to wrap lines.</para>
+
+ <para>If end of line markers are enabled in the <guibutton>Text
+ Area</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box, a colon (<quote>:</quote>) is
+ painted at the end of wrapped lines. See <xref
+ linkend="text-area-pane" />.</para>
+ </section>
+
+ <section>
+ <title>Hard Wrap</title>
+
+ <para>In hard wrap mode, inserting text at the end of a line will
+ automatically break the line if it extends beyond the wrap margin.
+ Inserting or removing text in the middle of a line has no effect,
+ however text can be re-wrapped using the
+ <guimenu>Edit</guimenu>><guisubmenu>Text</guisubmenu>><guimenuitem>Format
+ Paragraph</guimenuitem> command. See <xref
+ linkend="paragraphs" />.</para>
+
+ <para>Hard wrap is implemented using character offsets, not screen
+ positions, so it might not behave like you expect if a
+ proportional-width font is being used. The text area font can be
+ changed in the <guibutton>Text Area</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box.</para>
+ </section>
+ </section>
+
+ <section id="scrolling">
+ <title>Scrolling</title>
+
+ <para>If you have a mouse with a scroll wheel, you can use the wheel to
+ scroll up and down in the text area. Various modifier keys change the
+ action of the wheel:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><keycap>Shift</keycap> - moves the horizontal scrollbar.
+ time.</para>
+ </listitem>
+
+ <listitem>
+ <para><keycap>Control</keycap> - scrolls a single line at a
+ time.</para>
+ </listitem>
+
+ <listitem>
+ <para><keycap>Alt</keycap> - moves the caret up and down instead
+ of scrolling.</para>
+ </listitem>
+
+ <listitem>
+ <para><keycap>CTRL+SHIFT</keycap> - scroll a page at a time. </para>
+ </listitem>
+
+
+ <listitem>
+ <para><keycombo>
+ <keycap>Alt</keycap>
+
+ <keycap>Shift</keycap>
+ </keycombo> - extends the selection up and down instead of
+ scrolling.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Keyboard commands for scrolling the text area are also
+ available.</para>
+
+ <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Scroll
+ to Current Line</guimenuitem> (shortcut: <keycap>C+e C+j</keycap>)
+ scrolls the text area in order to make the caret visible, if necessary.
+ It does nothing if the caret is already visible.</para>
+
+ <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Center
+ Caret on Screen</guimenuitem> (shortcut: <keycap>C+e C+n</keycap>) moves
+ the caret to the line in the middle of the screen.</para>
+
+ <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Line
+ Scroll Up</guimenuitem> (shortcut: <keycap>C+QUOTE</keycap>) scrolls the
+ text area up by one line.</para>
+
+ <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Line
+ Scroll Down</guimenuitem> (shortcut: <keycap>C+SLASH</keycap>) scrolls
+ the text area down by one line.</para>
+
+ <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Page
+ Scroll Up</guimenuitem> (shortcut: <keycap>A+QUOTE</keycap>) scrolls the
+ text area up by one screenful.</para>
+
+ <para><guimenu>View</guimenu>><guisubmenu>Scrolling</guisubmenu>><guimenuitem>Page
+ Scroll Down</guimenuitem> (shortcut: <keycap>A+SLASH</keycap>) scrolls
+ the text area down by one screenful.</para>
+
+ <para>The above scrolling commands differ from the caret movement
+ commands in that they don't actually move the caret; they just change
+ the scroll bar position.</para>
+ </section>
+
+ <section id="text-transfer">
+ <title>Transferring Text</title>
+
+ <para>jEdit provides a rich set of commands for moving and copying text.
+ Commands are provided for moving chunks of text from buffers to
+ <firstterm>registers</firstterm> and vice-versa. A register is a holding
+ area for an arbitrary length of text, with a single-character name. Most
+ other programs can only transfer text to and from the system clipboard;
+ in jEdit, the system clipboard is just another register, with the
+ special name <filename>$</filename>.</para>
+
+ <section>
+ <title>The Clipboard</title>
+
+ <para>jEdit offers the usual text transfer operations, that operate
+ on the <filename>$</filename> register.</para>
+
+ <para><guimenu>Edit</guimenu>><guimenuitem>Cut</guimenuitem>
+ (shortcut: <keycap>C+x</keycap>) places the selected text in the
+ clipboard and removes it from the buffer.</para>
+
+ <para><guimenu>Edit</guimenu>><guimenuitem>Copy</guimenuitem>
+ (shortcut: <keycap>C+c</keycap>) places the selected text in the
+ clipboard and leaves it in the buffer.</para>
+
+ <para><guimenu>Edit</guimenu>><guimenuitem>Paste</guimenuitem>
+ (shortcut: <keycap>C+v</keycap>) inserts the clipboard contents in
+ place of the selection (or at the caret position, if there is no
+ selection).</para>
+
+ <para>The <guimenuitem>Cut</guimenuitem> and
+ <guimenuitem>Copy</guimenuitem> commands replace the old clipboard
+ contents with the selected text. There are two alternative commands
+ which add the selection at the end of the existing clipboard
+ contents, instead of replacing it.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>Cut Append</guimenuitem>
+ (shortcut: <keycap>C+e C+u</keycap>) appends the selected text to
+ the clipboard, then removes it from the buffer. After this command
+ has been invoked, the clipboard will consist of the former clipboard
+ contents, followed by a newline, followed by the selected
+ text.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>Copy Append</guimenuitem>
+ (shortcut: <keycap>C+e C+a</keycap>) is the same as <guimenuitem>Cut
+ Append</guimenuitem> except it does not remove the selection from
+ the buffer.</para>
+ </section>
+
+ <section id="quick-copy">
+ <title>Quick Copy</title>
+
+ <para>The quick copy feature is usually found in Unix text editors.
+ Quick copy is disabled by default, but it can be enabled in the
+ <guibutton>Mouse</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box.</para>
+
+ <para>The quick copy feature is accessed using the middle mouse
+ button. If you do not have a three-button mouse, then either
+ <keycap>Alt</keycap>-click (on Windows and Unix) or
+ <keycap>Option</keycap>-click (on MacOS X). The quick copy feature
+ enables the following behavior:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Clicking the middle mouse button in the text area
+ inserts the most recently selected text at the clicked
+ location. If you only have a two-button mouse, you can click
+ the left mouse button while holding down
+ <keycap>Alt</keycap> instead of middle-clicking.</para>
+ </listitem>
+
+ <listitem>
+ <para>Dragging with the middle mouse button creates a
+ selection without moving the caret. As soon as the mouse
+ button is released, the selected text is inserted at the
+ caret position and the selection is deactivated. A message
+ is shown in the status bar while text is being selected to
+ remind you that this is not an ordinary selection.</para>
+ </listitem>
+
+ <listitem>
+ <para>Holding down <keycap>Shift</keycap> while clicking the
+ middle mouse button will duplicate text between the caret
+ and the clicked location.</para>
+ </listitem>
+
+ <listitem>
+ <para>Holding down <keycap>Control</keycap> while clicking
+ the middle mouse button on a bracket will insert all text in
+ that bracket's scope at the caret position.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The most recently selected text is stored in the
+ <filename>%</filename> register.</para>
+
+ <para>If jEdit is being run under Java 2 version 1.4 on Unix, you
+ will be able to transfer text with other X Windows applications
+ using the quick copy feature. On other platforms and Java versions,
+ the contents of the quick copy register are only accessible from
+ within jEdit.</para>
+ </section>
+
+ <section id="registers">
+ <title>General Register Commands</title>
+
+ <para>These commands require more keystrokes than the two methods
+ shown above, but they can operate on any register, allowing an
+ arbitrary number of text chunks to be retained at a time.</para>
+
+ <para>Each command prompts for a single-character register name to
+ be entered after being invoked. Pressing <keycap>ESCAPE</keycap>
+ instead of specifying a register name cancels the operation.</para>
+
+ <para>Note that the content of registers other than the clipboard
+ and quick copy register are automatically saved between jEdit
+ sessions.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>Cut to Register</guimenuitem>
+ (shortcut: <keycap>C+r C+x <replaceable>key</replaceable></keycap>)
+ stores the selected text in the specified register, removing it from
+ the buffer.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>Copy to
+ Register</guimenuitem> (shortcut: <keycap>C+r C+c
+ <replaceable>key</replaceable></keycap>) stores the selected text in
+ the specified register, leaving it in the buffer.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>Cut Append to
+ Register</guimenuitem> (shortcut: <keycap>C+r C+u
+ <replaceable>key</replaceable></keycap>) adds the selected text to
+ the existing contents of the specified register, and removes it from
+ the buffer.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>Copy Append to
+ Register</guimenuitem> (shortcut: <keycap>C+r C+a
+ <replaceable>key</replaceable></keycap>) adds the selected text to
+ the existing contents of the specified register, without removing it
+ from the buffer.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>Paste from
+ Register</guimenuitem> (shortcut: <keycap>C+r C+v
+ <replaceable>key</replaceable></keycap>) replaces the selection with
+ the contents of the specified register.</para>
+
+ <para>The following three commands display dialog boxes instead of
+ prompting for a register name.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>Paste Previous</guimenuitem>
+ (shortcut: <keycap>C+e C+v</keycap>) displays a dialog box listing
+ the 20 most recently copied and pasted text strings.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>Paste Deleted</guimenuitem>
+ (shortcut: <keycap>C+e C+y</keycap>) is not really a register
+ command; it displays a dialog box listing the 20 most recently
+ deleted text strings.</para>
+
+ <para><guimenu>Edit</guimenu>><guisubmenu>More
+ Clipboard</guisubmenu>><guimenuitem>View Registers</guimenuitem>
+ displays a dialog box for viewing register contents, including the
+ clipboard and the quick copy.</para>
+ </section>
+ </section>
+
+ <section id="markers">
+ <title>Markers</title>
+
+ <para>A <firstterm>marker</firstterm> is a pointer to a specific
+ location within a buffer, which may or may not have a single-character
+ <firstterm>shortcut</firstterm> associated with it. Markers are
+ persistent; they are saved to
+ <filename>.<replaceable>filename</replaceable>.marks</filename>, where
+ <filename><replaceable>filename</replaceable></filename> is the name of
+ the buffer. (The dot prefix makes the markers file hidden on Unix
+ systems.) Marker saving can be disabled in the
+ <guibutton>General</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="general-pane" />.</para>
+
+ <para><guimenu>Markers</guimenu>><guimenuitem>Add/Remove
+ Marker</guimenuitem> (shortcut: <keycap>C+e C+m</keycap>) adds a marker
+ without a shortcut pointing to the current line. If a marker is already
+ set on the current line, the marker is removed instead. If text is
+ selected, markers are added to the first and last line of each
+ selection.</para>
+
+ <para>Markers are listed in the <guimenu>Markers</guimenu> menu;
+ selecting a marker from this menu will move the caret to its
+ location.</para>
+
+ <para><guimenu>Markers</guimenu>><guimenuitem>Go to Previous
+ Marker</guimenuitem> (shortcut: <keycap>C+e C+COMMA</keycap>) goes to
+ the marker immediately before the caret position.</para>
+
+ <para><guimenu>Markers</guimenu>><guimenuitem>Go to Next
+ Marker</guimenuitem> (shortcut: <keycap>C+e C+PERIOD</keycap>) goes to
+ the marker immediately after the caret position.</para>
+
+ <para><guimenu>Markers</guimenu>><guimenuitem>Remove All
+ Markers</guimenuitem> removes all markers set in the current
+ buffer.</para>
+
+ <para>Markers with shortcuts allow for quicker keyboard-based
+ navigation. The following commands all prompt for a single-character
+ shortcut when invoked. Pressing <keycap>ESCAPE</keycap> instead of
+ specifying a shortcut will cancel the operation.</para>
+
+ <para><guimenu>Markers</guimenu>><guimenuitem>Add Marker With
+ Shortcut</guimenuitem> (shortcut: <keycap>C+t
+ <replaceable>key</replaceable></keycap>) adds a marker with the
+ specified shortcut. If marker with that shortcut already exists, it will
+ remain in the buffer but lose its shortcut.</para>
+
+ <para><guimenu>Markers</guimenu>><guimenuitem>Go to
+ Marker</guimenuitem> (shortcut: <keycap>C+y
+ <replaceable>key</replaceable></keycap>) moves the caret to the location
+ of the marker with the specified shortcut.</para>
+
+ <para><guimenu>Markers</guimenu>><guimenuitem>Select to
+ Marker</guimenuitem> (shortcut: <keycap>C+u
+ <replaceable>key</replaceable></keycap>) creates a selection from the
+ caret location to the marker with the specified shortcut.</para>
+
+ <para><guimenu>Markers</guimenu>><guimenuitem>Swap Caret and
+ Marker</guimenuitem> (shortcut: <keycap>C+k
+ <replaceable>key</replaceable></keycap>) moves the caret to the location
+ of the marker with the specified shortcut, and moves the marker to the
+ former caret position. Invoke this command multiple times to flip
+ between two locations in the buffer.</para>
+
+ <para>Lines which contain markers are indicated in the gutter with a
+ highlight. Moving the mouse over the highlight displays a tool tip
+ showing the marker's shortcut, if it has one. See <xref
+ linkend="overview" /> for information about the gutter.</para>
+ </section>
+
+ <section id="search-replace">
+ <title>Search and Replace</title>
+
+ <section>
+ <title>Searching For Text</title>
+
+ <para><guimenu>Search</guimenu>><guimenuitem>Find</guimenuitem>
+ (shortcut: <keycap>C+f</keycap>) displays the search and replace
+ dialog box.</para>
+
+ <para>The search string can be entered in the <guibutton>Search
+ for</guibutton> text field. This text field remembers previously
+ entered strings; see <xref linkend="history" /> for details.</para>
+
+ <para>If text was selected in the text area and the selection does
+ not span a line break, the selected text becomes the default search
+ string.</para>
+
+ <para>If the selection spans a line break, the <guibutton>Search in
+ Selection</guibutton> and <guibutton>HyperSearch</guibutton> buttons
+ will be pre-selected, and the search string field will be initially
+ blank. (See <xref linkend="hypersearch" /> for information about the
+ HyperSearch feature.) <!-- Note that finding the next or previous
+ occurrence cannot be constrained to a selected range; only
+ replacement and HyperSearch can be (see <xref linkend="hypersearch" />). --></para>
+
+ <para>Selecting the <guibutton>Ignore case</guibutton> check box
+ makes the search case insensitive - for example, searching for
+ <quote>Hello</quote> will match <quote>hello</quote>,
+ <quote>HELLO</quote> and <quote>HeLlO</quote>.</para>
+
+ <para>To search for special characters (such as newlines or
+ non-printable characters), inexact sequences of text, or strings
+ that span multiple lines, we use
+ <emphasis role="bold">Regular Expressions</emphasis>.
+ Selecting the <guibutton>Regular expressions</guibutton> check
+ box allows special characters to be used in the search string.
+ Regular expression syntax is described in <xref linkend="regexps"/>.
+ If you use (groups) in the search field, you back-reference them
+ with $1 through $9 in the replace field. </para>
+
+ <para>The <guibutton>Backward</guibutton> and
+ <guibutton>Forward</guibutton> buttons specify the search direction.
+ Note that regular expressions can only be used when searching in a
+ forward direction.</para>
+
+ <para>Clicking <guibutton>Find</guibutton> will locate the next
+ occurrence of the search string (or previous occurrence, if
+ searching backwards). If the <guibutton>Keep dialog</guibutton>
+ check box is selected, the dialog box will remain open after the
+ search string has been located; otherwise, it will close.</para>
+
+ <para>If no occurrences could be found and the <guibutton>Auto
+ wrap</guibutton> check box is selected, the search will
+ automatically restart from the beginning of the buffer (or the end,
+ if searching backwards). If <guibutton>Auto wrap</guibutton> is not
+ selected, a confirmation dialog box is shown before restarting the
+ search.</para>
+
+ <para><guimenu>Search</guimenu>><guimenuitem>Find
+ Next</guimenuitem> (shortcut: <keycap>C+g</keycap>) locates the next
+ occurrence of the most recent search string without displaying the
+ search and replace dialog box.</para>
+
+ <para><guimenu>Search</guimenu>><guimenuitem>Find
+ Previous</guimenuitem> (shortcut: <keycap>C+h</keycap>) locates the
+ previous occurrence of the most recent search string without
+ displaying the search and replace dialog box.</para>
+ </section>
+
+ <section>
+ <title>Replacing Text</title>
+
+ <para>The replace string text field of the search dialog remembers
+ previously entered strings; see <xref linkend="history" /> for
+ details.</para>
+
+ <para>Clicking <guibutton>Replace & Find</guibutton> will
+ perform a replacement in the current selection and locate the next
+ occurrence of the search string. Clicking <guibutton>Replace
+ All</guibutton> will replace all occurrences of the search string
+ with the replacement string in the current search scope (which is
+ either the selection, the current buffer, or a set of buffers, as
+ specified in the search and replace dialog box).</para>
+
+ <para>Occurrences of the search string can be replaced with either a
+ replacement string, or the return value of a BeanShell script
+ snippet. Two radio buttons in the search and replace dialog box
+ select between the two replacement modes, which are described in
+ detail below.</para>
+
+ <section>
+ <title>Text Replace</title>
+
+ <para>If the <guibutton>Text</guibutton> button is selected, the
+ search string is simply replaced with the replacement
+ string.</para>
+
+ <para>If regular expressions are enabled, positional parameters
+ (<literal>$0</literal>, <literal>$1</literal>,
+ <literal>$2</literal>, and so on) can be used to insert the
+ contents of matched subexpressions in the replacement string;
+ see <xref linkend="regexps" /> for more information.</para>
+
+ <para>If the search is case-insensitive, jEdit attempts to
+ modify the case of the replacement string to match that of the
+ particular instance of the search string being replaced. For
+ example, searching for <quote>label</quote> and replacing it
+ with <quote>text</quote>, will perform the following
+ replacements:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><quote>String label</quote> would become
+ <quote>String text</quote></para>
+ </listitem>
+
+ <listitem>
+ <para><quote>setLabel</quote> would become
+ <quote>setText</quote></para>
+ </listitem>
+
+ <listitem>
+ <para><quote>DEFAULT_LABEL</quote> would become
+ <quote>DEFAULT_TEXT</quote></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>BeanShell Replace</title>
+
+ <para>In BeanShell replacement mode, the search string is
+ replaced with the return value of a BeanShell snippet. The
+ following predefined variables can be referenced in the
+ snippet:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><varname>_0</varname> -- the text to be
+ replaced</para>
+ </listitem>
+
+ <listitem>
+ <para><varname>_1</varname> - <varname>_9</varname> --
+ if regular expressions are enabled, these contain the
+ values of matched subexpressions.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>BeanShell syntax and features are covered in great detail
+ in <xref linkend="writing-macros-part" />, but here are some
+ examples:</para>
+
+ <informalexample>
+ <para>To replace each occurrence of <quote>Windows</quote>
+ with <quote>Linux</quote>, and each occurrence of
+ <quote>Linux</quote> with <quote>Windows</quote>, search for
+ the following regular expression:</para>
+
+ <programlisting>(Windows|Linux)</programlisting>
+
+ <para>Replacing it with the following BeanShell
+ snippet:</para>
+
+ <programlisting>_1.equals("Windows") ? "Linux" : "Windows"</programlisting>
+ </informalexample>
+
+ <informalexample>
+ <para>To convert all HTML tags to lower case, search for the
+ following regular expression:</para>
+
+ <programlisting><\S+</programlisting>
+
+ <para>Replacing it with the following BeanShell
+ snippet:</para>
+
+ <programlisting>_0.toLowerCase()</programlisting>
+ </informalexample>
+
+ <informalexample>
+ <para>To replace arithmetic expressions contained in curly
+ braces with the result of evaluating the expression, search
+ for the following regular expression:</para>
+
+ <programlisting>\{(.+?)\}</programlisting>
+
+ <para>Replacing it with the following BeanShell
+ snippet:</para>
+
+ <programlisting>eval(_1)</programlisting>
+ </informalexample>
+
+ <para>These examples only scratch the surface; the possibilities
+ are endless.</para>
+ </section>
+ </section>
+
+ <section id="hypersearch">
+ <title>HyperSearch</title>
+
+ <para>If the <guibutton>HyperSearch</guibutton> check box in the
+ search and replace dialog box is selected, clicking
+ <guibutton>Find</guibutton> lists all occurrences of the search
+ string, instead of locating the next match.</para>
+
+ <para>By default, HyperSearch results are shown in a floating
+ window. This window can be docked using the commands in its top-left
+ corner popup menu; see <xref linkend="docking" />.</para>
+
+ <para>If the <guibutton>Multiple results</guibutton> check box is
+ selected in the results window, past search results are
+ retained.</para>
+
+ <para>Running searches can be stopped in the
+ <guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>I/O
+ Progress Monitor</guimenuitem> dialog box.</para>
+ </section>
+
+ <section>
+ <title>Multiple File Search</title>
+
+ <para>Search and replace commands can be performed over an arbitrary
+ set of files in one step. The set of files to search is selected
+ with a set of buttons in the search dialog box.</para>
+
+ <para>If the <guibutton>Current buffer</guibutton> button is
+ selected, only the current buffer is searched. This is the default
+ behavior.</para>
+
+ <para>If the <guibutton>All buffers</guibutton> button is selected,
+ all open buffers whose names match the glob pattern entered in the
+ <guibutton>Filter</guibutton> text field will be searched. See <xref
+ linkend="globs" /> for more information about glob patterns.</para>
+
+ <para>If the <guibutton>Directory</guibutton> radio button is
+ selected, all files contained in the specified directory whose names
+ match the glob will be searched. The directory to search in can
+ either be entered in the <guibutton>Directory</guibutton> text
+ field, or chosen in a file selector dialog box by clicking the
+ <guibutton>Choose</guibutton> button next to the field. If the
+ <guibutton>Search subdirectories</guibutton> check box is selected,
+ all subdirectories of the specified directory will also be searched.
+ Keep in mind that searching through directories containing many
+ files can take a long time.</para>
+
+ <para>The <guibutton>Directory</guibutton> and
+ <guibutton>Filter</guibutton> text fields remember previously
+ entered strings; see <xref linkend="history" /> for details.</para>
+
+ <para>When the search and replace dialog box is opened, the
+ directory and file name filter fields are set to their previous
+ values. They can be set to match the current buffer's directory and
+ file name extension by clicking
+ <guibutton>Synchronize</guibutton>.</para>
+
+ <para>Note that clicking the <guibutton>All Buffers</guibutton> or
+ <guibutton>Directory</guibutton> radio buttons also selects the
+ <guibutton>HyperSearch</guibutton> check box since that is what you
+ would want, most of the time. However, the
+ <guibutton>HyperSearch</guibutton> check box can be unchecked, for
+ stepping through search results in multiple files one at a
+ time.</para>
+
+ <para>Two convenience commands are provided for performing multiple
+ file searches.</para>
+
+ <para><guimenu>Search</guimenu>><guimenuitem>Search in Open
+ Buffers</guimenuitem> (shortcut: <keycap>C+e C+b</keycap>) displays
+ the search dialog box and selects the <guibutton>All
+ buffers</guibutton> button.</para>
+
+ <para><guimenu>Search</guimenu>><guimenuitem>Search in
+ Directory</guimenuitem> (shortcut: <keycap>C+e C+d</keycap>)
+ displays the search dialog box and selects the
+ <guibutton>Directory</guibutton> button.</para>
+ </section>
+
+ <section id="search-bar">
+ <title>The Search Bar</title>
+
+ <para>The search bar feature provides a convenient way to search in
+ the current buffer without opening the search dialog box. The search
+ bar does not support replacement or multiple file search. Previously
+ entered strings can be recalled in the search bar with the
+ <keycap>Up</keycap> and <keycap>Down</keycap> arrow keys; see <xref
+ linkend="history" />.</para>
+
+ <para>By default, the search bar remains hidden until one of the
+ quick search commands (described below) is invoked; however you can
+ choose to have it always visible in the <guibutton>View</guibutton>
+ pane of the <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="view-pane" />.</para>
+
+ <para><guimenu>Search</guimenu>><guimenuitem>Incremental Search
+ Bar</guimenuitem> (shortcut: <keycap>C+COMMA</keycap>) displays the
+ search bar if necessary, and gives it keyboard focus. </para>
+
+ <para><guimenu>Search</guimenu>><guimenuitem>Incremental Search
+ for Word</guimenuitem> (shortcut: <keycap>A+COMMA</keycap>) behaves
+ like the above command except it places the word at the caret in the
+ search string field. If this command is invoked while there is a
+ selection, the selection is placed in the search string
+ field instead.</para>
+
+ <para>Unless the <guibutton>HyperSearch</guibutton> check box is
+ selected, the search bar will perform an <firstterm>incremental
+ search</firstterm>. In incremental search mode, the first occurrence
+ of the search string is located in the current buffer as it is being
+ typed. Pressing <keycap>ENTER</keycap> and <keycap>S+ENTER</keycap>
+ searches for the next and previous occurrence, respectively. Once
+ the desired occurrence has been located, pressing
+ <keycap>ESCAPE</keycap> returns keyboard focus to the text area.
+ Unless the search bar is set to be always visible (see above),
+ pressing <keycap>ESCAPE</keycap> will also hide the search
+ bar.</para>
+
+ <note>
+ <para>Incremental searches cannot be not recorded in macros. If
+ your macro needs to perform a search, use the search and replace
+ dialog box instead. See <xref linkend="using-macros" /> for
+ information about macros.</para>
+ </note>
+
+ <para><guimenu>Search</guimenu>><guimenuitem>HyperSearch
+ Bar</guimenuitem> (shortcut: <keycap>C+PERIOD</keycap>) displays the
+ search bar if necessary, gives it keyboard focus, and selects the
+ <guibutton>HyperSearch</guibutton> check box. If this command is
+ invoked while there is a selection, the selected text will be
+ searched for immediately and the search bar will not be
+ shown.</para>
+
+ <para>If the <guibutton>HyperSearch</guibutton> check box is
+ selected, pressing <keycap>Enter</keycap> in the search string field
+ will perform a HyperSearch in the current buffer.</para>
+
+ <para><guimenu>Search</guimenu>><guimenuitem>HyperSearch for
+ Word</guimenuitem> (shortcut: <keycap>A+PERIOD</keycap>) performs a
+ HyperSearch for the word at the caret. This command does not show
+ the search bar or give it keyboard focus.</para>
+ </section>
+ </section>
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/updating-modes.xml b/jEdit/doc/users-guide/updating-modes.xml
index 379e381..983a027 100644
--- a/jEdit/doc/users-guide/updating-modes.xml
+++ b/jEdit/doc/users-guide/updating-modes.xml
@@ -1,88 +1,88 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="updating-modes">
- <title>Updating Edit Modes</title>
-
- <!-- jEdit buffer-local properties: -->
-
- <!-- :indentSize=1:noTabs=true: -->
-
- <!-- :xml.root=users-guide.xml: -->
-
- <section id="from40to41" >
- <title>From jEdit 4.0 to 4.1</title>
-
- <para>In jEdit 4.1, the mode file grammar has been cleaned up somewhat.
- As a result, some edit modes written for jEdit 4.0 and earlier need to
- be updated:</para>
-
- <itemizedlist>
- <listitem>
- <para>Defining <literal><WHITESPACE></literal> rules is no
- longer necessary and doing so will print warnings to the
- activity logs.</para>
- </listitem>
-
- <listitem>
- <para>The <literal><KEYWORDS></literal> tag no longer
- accepts an <literal>IGNORE_CASE</literal> attribute. Set the
- <literal>IGNORE_CASE</literal> attribute of the
- <literal><RULES></literal> tag instead.</para>
- </listitem>
-
- <listitem>
- <para>The <literal><END></literal> tag of the
- <literal><SPAN></literal> rule used to be optional, in
- which case any occurrence of the start string would cause the
- remainder of the buffer to be highlighted with the span. In
- jEdit 4.1, the <literal><END></literal> tag can no longer
- be omitted, however a <literal><SEQ></literal> tag with a
- <literal>DELEGATE</literal> attribute can be used to achieve the
- same effect as endless span.</para>
- </listitem>
-
- <listitem>
- <para>Defining <literal><SEQ TYPE="NULL"></literal> rules
- for word separators is no longer necessary. Now, any
- non-alphanumeric character not appearing in a keyword definition
- or the ruleset's <literal>NO_WORD_SEP</literal> attribute is
- considered a word separator.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="currentmodeformat">
- <title>From jEdit 4.2 to 4.3</title>
-
- <orderedlist>
- <listitem>
- <para>All regular expressions in mode files were rewritten to
- use <ulink
- url="http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html#sum">
- java.util.regex</ulink> instead of <ulink
- url="http://nlp.stanford.edu/nlp/javadoc/gnu-regexp-docs/syntax.html">
- gnu.regexp</ulink>.</para>
- </listitem>
-
- <listitem>
- <para><literal>HASH_CHAR</literal> handling of
- <literal>xxx_REGEXP</literal> elements has been updated, as
- explained in <xref linkend="mode-rule-span-regexp" />.</para>
- </listitem>
-
- <listitem>
- <para>The <literal>EXCLUDE_MATCH</literal> attribute got
- superseded by <literal>MATCH_TYPE</literal>. The attribute
- values translate from <literal>TRUE</literal> to
- <literal>CONTEXT</literal> and from <literal>FALSE</literal> to
- <literal>RULE</literal>, respectively. For more information see
- <xref linkend="mode-match-type" />.</para>
- </listitem>
-
- <listitem>
- <para> <literal>NO_ESCAPE</literal> is now deprecated and ignored by the parsing engine.
- <literal>ESCAPE</literal> is now a valid attribute for <literal>SPAN</literal> and <literal>SPAN_REGEXP</literal> rules.
- </para>
- </listitem>
- </orderedlist>
- </section>
-</chapter>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="updating-modes">
+ <title>Updating Edit Modes</title>
+
+ <!-- jEdit buffer-local properties: -->
+
+ <!-- :indentSize=1:noTabs=true: -->
+
+ <!-- :xml.root=users-guide.xml: -->
+
+ <section id="from40to41" >
+ <title>From jEdit 4.0 to 4.1</title>
+
+ <para>In jEdit 4.1, the mode file grammar has been cleaned up somewhat.
+ As a result, some edit modes written for jEdit 4.0 and earlier need to
+ be updated:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Defining <literal><WHITESPACE></literal> rules is no
+ longer necessary and doing so will print warnings to the
+ activity logs.</para>
+ </listitem>
+
+ <listitem>
+ <para>The <literal><KEYWORDS></literal> tag no longer
+ accepts an <literal>IGNORE_CASE</literal> attribute. Set the
+ <literal>IGNORE_CASE</literal> attribute of the
+ <literal><RULES></literal> tag instead.</para>
+ </listitem>
+
+ <listitem>
+ <para>The <literal><END></literal> tag of the
+ <literal><SPAN></literal> rule used to be optional, in
+ which case any occurrence of the start string would cause the
+ remainder of the buffer to be highlighted with the span. In
+ jEdit 4.1, the <literal><END></literal> tag can no longer
+ be omitted, however a <literal><SEQ></literal> tag with a
+ <literal>DELEGATE</literal> attribute can be used to achieve the
+ same effect as endless span.</para>
+ </listitem>
+
+ <listitem>
+ <para>Defining <literal><SEQ TYPE="NULL"></literal> rules
+ for word separators is no longer necessary. Now, any
+ non-alphanumeric character not appearing in a keyword definition
+ or the ruleset's <literal>NO_WORD_SEP</literal> attribute is
+ considered a word separator.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="currentmodeformat">
+ <title>From jEdit 4.2 to 4.3</title>
+
+ <orderedlist>
+ <listitem>
+ <para>All regular expressions in mode files were rewritten to
+ use <ulink
+ url="http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#sum">
+ java.util.regex</ulink> instead of <ulink
+ url="http://nlp.stanford.edu/nlp/javadoc/gnu-regexp-docs/syntax.html">
+ gnu.regexp</ulink>.</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>HASH_CHAR</literal> handling of
+ <literal>xxx_REGEXP</literal> elements has been updated, as
+ explained in <xref linkend="mode-rule-span-regexp" />.</para>
+ </listitem>
+
+ <listitem>
+ <para>The <literal>EXCLUDE_MATCH</literal> attribute got
+ superseded by <literal>MATCH_TYPE</literal>. The attribute
+ values translate from <literal>TRUE</literal> to
+ <literal>CONTEXT</literal> and from <literal>FALSE</literal> to
+ <literal>RULE</literal>, respectively. For more information see
+ <xref linkend="mode-match-type" />.</para>
+ </listitem>
+
+ <listitem>
+ <para> <literal>NO_ESCAPE</literal> is now deprecated and ignored by the parsing engine.
+ <literal>ESCAPE</literal> is now a valid attribute for <literal>SPAN</literal> and <literal>SPAN_REGEXP</literal> rules.
+ </para>
+ </listitem>
+ </orderedlist>
+ </section>
+</chapter>
diff --git a/jEdit/doc/users-guide/users-guide.xml b/jEdit/doc/users-guide/users-guide.xml
index 1ea8b80..42d7101 100644
--- a/jEdit/doc/users-guide/users-guide.xml
+++ b/jEdit/doc/users-guide/users-guide.xml
@@ -1,195 +1,195 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
-<!-- jEdit buffer-local properties: -->
-<!-- maxLineLen=0:wrap=soft:indentSize=1:noTabs=true: -->
-<!-- jEdit user's guide -->
-<!-- (C) 1999, 2004 Slava Pestov -->
-<!-- (C) 2001, 2002 John Gellene -->
-<!-- (C) 2005, 2009 Alan Ezust -->
-
-<!ENTITY conventions SYSTEM "conventions.xml">
-<!ENTITY starting SYSTEM "starting.xml">
-<!ENTITY basics SYSTEM "basics.xml">
-<!ENTITY files SYSTEM "files.xml">
-<!ENTITY text-edit SYSTEM "text-edit.xml">
-<!ENTITY source-edit SYSTEM "source-edit.xml">
-<!ENTITY customizing SYSTEM "customizing.xml">
-<!ENTITY using-macros SYSTEM "using-macros.xml">
-<!ENTITY using-plugins SYSTEM "using-plugins.xml">
-<!ENTITY shortcuts SYSTEM "shortcuts.xml">
-<!ENTITY activity-log SYSTEM "activity-log.xml">
-<!ENTITY history SYSTEM "history.xml">
-<!ENTITY globs SYSTEM "globs.xml">
-<!ENTITY regexps SYSTEM "regexps.xml">
-<!ENTITY macro-index SYSTEM "macro-index.xml">
-<!ENTITY writing-modes SYSTEM "writing-modes.xml">
-<!ENTITY installing-modes SYSTEM "installing-modes.xml">
-<!ENTITY updating-modes SYSTEM "updating-modes.xml">
-<!ENTITY macro-basics SYSTEM "macro-basics.xml">
-<!ENTITY dialog-macro SYSTEM "dialog-macro.xml">
-<!ENTITY macro-tips SYSTEM "macro-tips.xml">
-<!ENTITY bsh-commands SYSTEM "bsh-commands.xml">
-<!ENTITY plugin-intro SYSTEM "plugin-intro.xml">
-<!ENTITY plugin-implement SYSTEM "plugin-implement.xml">
-<!ENTITY plugin-tips SYSTEM "plugin-tips.xml">
-]>
-<book>
- <bookinfo>
- <title>jEdit 4.3 User's Guide</title>
-
- <copyright>
- <year>1999</year>
-
- <year>2004</year>
-
- <holder>Slava Pestov</holder>
- </copyright>
-
- <copyright>
- <year>2001</year>
-
- <year>2002</year>
-
- <holder>John Gellene</holder>
- </copyright>
-
- <copyright>
- <year>2005</year>
-
- <year>2008</year>
-
- <holder>Alan Ezust</holder>
- </copyright>
-
- <legalnotice>
- <title>Legal Notice</title>
-
- <para>Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation License,
- Version 1.1 or any later version published by the Free Software
- Foundation; with no <quote>Invariant Sections</quote>,
- <quote>Front-Cover Texts</quote> or <quote>Back-Cover Texts</quote>,
- each as defined in the license. A copy of the license can be found
- in the file <filename>COPYING.DOC.txt</filename> included with
- jEdit.</para>
- </legalnotice>
- </bookinfo>
-
- <part id="using-jedit-part">
- <title>Using jEdit</title>
-
- <partintro>
- <para>This part of the user's guide covers jEdit's text editing
- commands, along with basic usage of macros and plugins.</para>
-
- <para>This part of the user's guide was originally written by Slava
- Pestov and is maintained by the jEdit core development team.</para>
- </partintro>
-
- &conventions;
-
- &starting;
-
- &basics;
-
- &files;
-
- &text-edit;
-
- &source-edit;
-
- &customizing;
-
- &using-macros;
-
- &using-plugins;
-
- &shortcuts;
-
- &activity-log;
-
- &history;
-
- &globs;
-
- ®exps;
-
- ¯o-index;
-
- <!-- &launcher-guide; -->
- </part>
-
- <part id="writing-modes-part">
- <title>Writing Edit Modes</title>
-
- <partintro>
- <para>This part of the user's guide covers writing edit modes for
- jEdit.</para>
-
- <para>Edit modes specify syntax highlighting rules, auto indent
- behavior, and various other customizations for editing different
- file types. For general information about edit modes, see <xref
- linkend="modes" />.</para>
-
- <para>This part of the user's guide was written by Slava Pestov and
- is maintained by the jEdit core development team.</para>
- </partintro>
-
- &writing-modes;
-
- &installing-modes;
-
- &updating-modes;
- </part>
-
- <part id="writing-macros-part">
- <title>Writing Macros</title>
-
- <partintro>
- <para>This part of the user's guide covers writing macros for
- jEdit.</para>
-
- <para>First, we will tell you a little about BeanShell, jEdit's
- macro scripting language. Next, we will walk through a few simple
- macros. We then present and analyze a dialog-based macro to
- illustrate additional macro writing techniques. Finally, we discuss
- several tips and techniques for writing and debugging macros.</para>
-
- <para>This part of the user's guide was written by John Gellene
- <email>jgellene at nyc.rr.com</email>.</para>
- </partintro>
-
- ¯o-basics;
-
- &dialog-macro;
-
- ¯o-tips;
-
- &bsh-commands;
- </part>
-
- <part id="writing-plugins-part">
- <title>Writing Plugins</title>
-
- <partintro>
- <para>This part of the user's guide covers writing plugins for
- jEdit.</para>
-
- <para>Like jEdit itself, plugins are written primarily in Java.
- While this guide assumes some working knowledge of the language, you
- are not required to be a Java wizard. If you can write a useful
- application of any size in Java, you can write a plugin.</para>
-
- <para>This part of the user's guide was originally written by John
- Gellene. As of jEdit 4.3, it is maintained by Alan Ezust with help
- from others in the jEdit core development team.</para>
- </partintro>
-
- &plugin-intro;
-
- &plugin-implement;
-
- &plugin-tips;
- </part>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+<!-- jEdit buffer-local properties: -->
+<!-- maxLineLen=0:wrap=soft:indentSize=1:noTabs=true: -->
+<!-- jEdit user's guide -->
+<!-- (C) 1999, 2004 Slava Pestov -->
+<!-- (C) 2001, 2002 John Gellene -->
+<!-- (C) 2005, 2011 Alan Ezust -->
+
+<!ENTITY conventions SYSTEM "conventions.xml">
+<!ENTITY starting SYSTEM "starting.xml">
+<!ENTITY basics SYSTEM "basics.xml">
+<!ENTITY files SYSTEM "files.xml">
+<!ENTITY text-edit SYSTEM "text-edit.xml">
+<!ENTITY source-edit SYSTEM "source-edit.xml">
+<!ENTITY customizing SYSTEM "customizing.xml">
+<!ENTITY using-macros SYSTEM "using-macros.xml">
+<!ENTITY using-plugins SYSTEM "using-plugins.xml">
+<!ENTITY shortcuts SYSTEM "shortcuts.xml">
+<!ENTITY activity-log SYSTEM "activity-log.xml">
+<!ENTITY history SYSTEM "history.xml">
+<!ENTITY globs SYSTEM "globs.xml">
+<!ENTITY regexps SYSTEM "regexps.xml">
+<!ENTITY macro-index SYSTEM "macro-index.xml">
+<!ENTITY writing-modes SYSTEM "writing-modes.xml">
+<!ENTITY installing-modes SYSTEM "installing-modes.xml">
+<!ENTITY updating-modes SYSTEM "updating-modes.xml">
+<!ENTITY macro-basics SYSTEM "macro-basics.xml">
+<!ENTITY dialog-macro SYSTEM "dialog-macro.xml">
+<!ENTITY macro-tips SYSTEM "macro-tips.xml">
+<!ENTITY bsh-commands SYSTEM "bsh-commands.xml">
+<!ENTITY plugin-intro SYSTEM "plugin-intro.xml">
+<!ENTITY plugin-implement SYSTEM "plugin-implement.xml">
+<!ENTITY plugin-tips SYSTEM "plugin-tips.xml">
+]>
+<book>
+ <bookinfo>
+ <title>jEdit 4.4 User's Guide</title>
+
+ <copyright>
+ <year>1999</year>
+
+ <year>2004</year>
+
+ <holder>Slava Pestov</holder>
+ </copyright>
+
+ <copyright>
+ <year>2001</year>
+
+ <year>2002</year>
+
+ <holder>John Gellene</holder>
+ </copyright>
+
+ <copyright>
+ <year>2005</year>
+
+ <year>2011</year>
+
+ <holder>Alan Ezust</holder>
+ </copyright>
+
+ <legalnotice>
+ <title>Legal Notice</title>
+
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.1 or any later version published by the Free Software
+ Foundation; with no <quote>Invariant Sections</quote>,
+ <quote>Front-Cover Texts</quote> or <quote>Back-Cover Texts</quote>,
+ each as defined in the license. A copy of the license can be found
+ in the file <filename>COPYING.DOC.txt</filename> included with
+ jEdit.</para>
+ </legalnotice>
+ </bookinfo>
+
+ <part id="using-jedit-part">
+ <title>Using jEdit</title>
+
+ <partintro>
+ <para>This part of the user's guide covers jEdit's text editing
+ commands, along with basic usage of macros and plugins.</para>
+
+ <para>This part of the user's guide was originally written by Slava
+ Pestov and is maintained by the jEdit core development team.</para>
+ </partintro>
+
+ &conventions;
+
+ &starting;
+
+ &basics;
+
+ &files;
+
+ &text-edit;
+
+ &source-edit;
+
+ &customizing;
+
+ &using-macros;
+
+ &using-plugins;
+
+ &shortcuts;
+
+ &activity-log;
+
+ &history;
+
+ &globs;
+
+ ®exps;
+
+ ¯o-index;
+
+ <!-- &launcher-guide; -->
+ </part>
+
+ <part id="writing-modes-part">
+ <title>Writing Edit Modes</title>
+
+ <partintro>
+ <para>This part of the user's guide covers writing edit modes for
+ jEdit.</para>
+
+ <para>Edit modes specify syntax highlighting rules, auto indent
+ behavior, and various other customizations for editing different
+ file types. For general information about edit modes, see <xref
+ linkend="modes" />.</para>
+
+ <para>This part of the user's guide was written by Slava Pestov and
+ is maintained by the jEdit core development team.</para>
+ </partintro>
+
+ &writing-modes;
+
+ &installing-modes;
+
+ &updating-modes;
+ </part>
+
+ <part id="writing-macros-part">
+ <title>Writing Macros</title>
+
+ <partintro>
+ <para>This part of the user's guide covers writing macros for
+ jEdit.</para>
+
+ <para>First, we will tell you a little about BeanShell, jEdit's
+ macro scripting language. Next, we will walk through a few simple
+ macros. We then present and analyze a dialog-based macro to
+ illustrate additional macro writing techniques. Finally, we discuss
+ several tips and techniques for writing and debugging macros.</para>
+
+ <para>This part of the user's guide was written by John Gellene
+ <email>jgellene at nyc.rr.com</email>.</para>
+ </partintro>
+
+ ¯o-basics;
+
+ &dialog-macro;
+
+ ¯o-tips;
+
+ &bsh-commands;
+ </part>
+
+ <part id="writing-plugins-part">
+ <title>Writing Plugins</title>
+
+ <partintro>
+ <para>This part of the user's guide covers writing plugins for
+ jEdit.</para>
+
+ <para>Like jEdit itself, plugins are written primarily in Java.
+ While this guide assumes some working knowledge of the language, you
+ are not required to be a Java wizard. If you can write a useful
+ application of any size in Java, you can write a plugin.</para>
+
+ <para>This part of the user's guide was originally written by John
+ Gellene. As of jEdit 4.3, it is maintained by Alan Ezust with help
+ from others in the jEdit core development team.</para>
+ </partintro>
+
+ &plugin-intro;
+
+ &plugin-implement;
+
+ &plugin-tips;
+ </part>
</book>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/using-macros.xml b/jEdit/doc/users-guide/using-macros.xml
index cd2bdcb..1c638a9 100644
--- a/jEdit/doc/users-guide/using-macros.xml
+++ b/jEdit/doc/users-guide/using-macros.xml
@@ -1,184 +1,184 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="using-macros">
- <title>Using Macros</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=80: -->
- <!-- :xml.root=users-guide.xml: -->
-
- <para>Macros in jEdit are short scripts written in a scripting language
- called <firstterm>BeanShell</firstterm>. They provide an easy way to
- automate repetitive keyboard and menu procedures, as well as access to the
- objects and methods created by jEdit. Macros also provide a powerful
- facility for customizing jEdit and automating complex text processing and
- programming tasks. This section describes how to record and run macros. A
- detailed guide on writing macros appears later; see <xref
- linkend="writing-macros-part" />.</para>
-
- <sidebar>
- <title>Other scripting languages</title>
-
- <para>A number of jEdit plugins provide support for writing scripts in
- alternative programming languages, like Python and Prolog. Consult the
- documentation for the appropriate plugins for more information.</para>
- </sidebar>
-
- <section id="recording-macros">
- <title>Recording Macros</title>
-
- <para>The simplest use of macros is to record a series of key strokes
- and menu commands as a BeanShell script, and play them back later. While
- this doesn't let you take advantage of the full power of BeanShell, it
- is still a great time saver and can even be used to
- <quote>prototype</quote> more complicated macros.</para>
-
- <para><guimenu>Macros</guimenu>><guimenuitem>Record
- Macro</guimenuitem> (shortcut: <keycap>C+m C+r</keycap>) prompts for a
- macro name and begins recording.</para>
-
- <para>While recording is in progress, the string <quote>Macro
- recording</quote> is displayed in the status bar. jEdit records the
- following:</para>
-
- <itemizedlist>
- <listitem>
- <para>Key strokes</para>
- </listitem>
-
- <listitem>
- <para>Menu item commands</para>
- </listitem>
-
- <listitem>
- <para>Tool bar clicks</para>
- </listitem>
-
- <listitem>
- <para>All search and replace operations, except incremental
- search</para>
- </listitem>
- </itemizedlist>
-
- <para>Mouse clicks in the text area are <emphasis>not</emphasis>
- recorded; use text selection commands or arrow keys instead.</para>
-
- <para><guimenu>Macros</guimenu>><guimenuitem>Stop
- Recording</guimenuitem> (shortcut: <keycap>C+m C+s</keycap>) stops
- recording. It also switches to the buffer containing the recorded macro,
- giving you a chance to check over the recorded commands and make any
- necessary changes. When you are happy with the macro, save the buffer
- and it will appear in the <guimenu>Macros</guimenu> menu. To discard the
- macro, close the buffer without saving it.</para>
-
- <para>The file name extension <filename>.bsh</filename> is automatically
- appended to the macro name, and all spaces are converted to underscore
- characters, in order to make the macro name a valid file name. These two
- operations are reversed when macros are displayed in the
- <guimenu>Macros</guimenu> menu; see <xref linkend="organizing-macros" />
- for details.</para>
-
- <para>If a complicated operation only needs to be repeated a few times,
- using the temporary macro feature is quicker than saving a new macro
- file.</para>
-
- <para><guimenu>Macros</guimenu>><guimenuitem>Record Temporary
- Macro</guimenuitem> (shortcut: <keycap>C+m C+m</keycap>) begins
- recording to a buffer named <filename>Temporary_Macro.bsh</filename>.
- Once recording of a temporary macro is complete, jEdit does not display
- the buffer containing the recorded commands, but the name
- <filename>Temporary_Macro.bsh</filename> will be visible on any list of
- open buffers. By switching to that buffer, you can view the commands,
- edit them, and save them if you wish to a permanent macro file. Whether
- or not you look at or save the temporary macro contents, it is
- immediately available for playback.</para>
-
- <para><guimenu>Macros</guimenu>><guimenuitem>Run Temporary
- Macro</guimenuitem> (shortcut: <keycap>C+m C+p</keycap>) plays the macro
- recorded to the <filename>Temporary_Macro.bsh</filename> buffer.</para>
-
- <para>Only one temporary macro is available at a time. If you begin
- recording a second temporary macro, the first is erased and cannot be
- recovered unless you have saved the contents to a file with a name other
- than <filename>Temporary_Macro.bsh</filename>. If you do not save the
- temporary macro, you must keep the buffer containing the macro script
- open during your jEdit session. To have the macro available for your
- next jEdit session, save the buffer
- <filename>Temporary_Macro.bsh</filename> as an ordinary macro with a
- descriptive name of your choice. The new name will then be displayed in
- the <guimenu>Macros</guimenu> menu.</para>
- </section>
-
- <section id="running-macros">
- <title>Running Macros</title>
-
- <para>Macros supplied with jEdit, as well as macros that you record or
- write, are displayed under the <guimenu>Macros</guimenu> menu in a
- hierarchical structure. The jEdit installation includes about 30 macros
- divided into several major categories. Each category corresponds to a
- nested submenu under the <guimenu>Macros</guimenu> menu. An index of
- these macros containing short descriptions and usage notes is found in
- <xref linkend="macro-index" />.</para>
-
- <para>To run a macro, choose the <guimenu>Macros</guimenu> menu,
- navigate through the hierarchy of submenus, and select the name of the
- macro to execute. You can also assign execution of a particular macro to
- a keyboard shortcut, toolbar button or context menu using the
- <guimenuitem>Macro Shortcuts</guimenuitem>, <guimenuitem>Tool
- Bar</guimenuitem> or <guimenuitem>Context Menu</guimenuitem> panes of
- the <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog; see <xref linkend="global-opts" />.</para>
- </section>
-
- <section id="organizing-macros">
- <title>How jEdit Organizes Macros</title>
-
- <para>Every macro, whether or not you originally recorded it, is stored
- on disk and can be edited as a text file. The file name of a macro must
- have a <filename>.bsh</filename> extension in order for jEdit to be
- aware of it. By default, jEdit associates a <filename>.bsh</filename>
- file with the BeanShell edit mode for purposes of syntax highlighting,
- indentation and other formatting. However, BeanShell syntax does not
- impose any indentation or line break requirements.</para>
-
- <para>The <guimenu>Macros</guimenu> menu lists all macros stored in two
- places: the <filename>macros</filename> subdirectory of the jEdit home
- directory, and the <filename>macros</filename> subdirectory of the
- user-specific settings directory (see <xref
- linkend="settings-directory" /> for information about the settings
- directory). Any macros you record will be stored in the user-specific
- directory.</para>
-
- <para>Macros stored elsewhere can be run using the
- <guimenu>Macros</guimenu>><guimenuitem>Run Other Macro</guimenuitem>
- command, which displays a file chooser dialog box, and runs the
- specified file.</para>
-
- <para>The listing of individual macros in the <guimenu>Macros</guimenu>
- menu can be organized in a hierarchy using subdirectories in the general
- or user-specific macro directories; each subdirectory appears as a
- submenu. You will find such a hierarchy in the default macro set
- included with jEdit.</para>
-
- <para>When jEdit first loads, it scans the designated macro directories
- and assembles a listing of individual macros in the
- <guimenu>Macros</guimenu> menu. When scanning the names, jEdit will
- delete underscore characters and the <filename>.bsh</filename> extension
- for menu labels, so that
- <filename>List_Useful_Information.bsh</filename>, for example, will be
- displayed in the <guimenu>Macros</guimenu> menu as <guimenuitem>List
- Useful Information</guimenuitem>.</para>
-
- <para>You can browse the user and system macro directories by opening
- the <filename>macros</filename> directory from the
- <guimenu>Utilities</guimenu>><guimenuitem>jEdit Home
- Directory</guimenuitem> and
- <guimenu>Utilities</guimenu>><guimenuitem>Settings
- Directory</guimenuitem> menus.</para>
-
- <para>Macros can be opened and edited much like ordinary files from the
- file system browser. Editing macros from within jEdit will automatically
- update the macros menu; however, if you modify macros from another
- program or add macro files to the macro directories, you should run the
- <guimenu>Macros</guimenu>><guimenuitem>Rescan Macros</guimenuitem>
- command to update the macro list.</para>
- </section>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="using-macros">
+ <title>Using Macros</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=soft:maxLineLen=80: -->
+ <!-- :xml.root=users-guide.xml: -->
+
+ <para>Macros in jEdit are short scripts written in a scripting language
+ called <firstterm>BeanShell</firstterm>. They provide an easy way to
+ automate repetitive keyboard and menu procedures, as well as access to the
+ objects and methods created by jEdit. Macros also provide a powerful
+ facility for customizing jEdit and automating complex text processing and
+ programming tasks. This section describes how to record and run macros. A
+ detailed guide on writing macros appears later; see <xref
+ linkend="writing-macros-part" />.</para>
+
+ <sidebar>
+ <title>Other scripting languages</title>
+
+ <para>A number of jEdit plugins provide support for writing scripts in
+ alternative programming languages, like Python and Prolog. Consult the
+ documentation for the appropriate plugins for more information.</para>
+ </sidebar>
+
+ <section id="recording-macros">
+ <title>Recording Macros</title>
+
+ <para>The simplest use of macros is to record a series of key strokes
+ and menu commands as a BeanShell script, and play them back later. While
+ this doesn't let you take advantage of the full power of BeanShell, it
+ is still a great time saver and can even be used to
+ <quote>prototype</quote> more complicated macros.</para>
+
+ <para><guimenu>Macros</guimenu>><guimenuitem>Record
+ Macro</guimenuitem> (shortcut: <keycap>C+m C+r</keycap>) prompts for a
+ macro name and begins recording.</para>
+
+ <para>While recording is in progress, the string <quote>Macro
+ recording</quote> is displayed in the status bar. jEdit records the
+ following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Key strokes</para>
+ </listitem>
+
+ <listitem>
+ <para>Menu item commands</para>
+ </listitem>
+
+ <listitem>
+ <para>Tool bar clicks</para>
+ </listitem>
+
+ <listitem>
+ <para>All search and replace operations, except incremental
+ search</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Mouse clicks in the text area are <emphasis>not</emphasis>
+ recorded; use text selection commands or arrow keys instead.</para>
+
+ <para><guimenu>Macros</guimenu>><guimenuitem>Stop
+ Recording</guimenuitem> (shortcut: <keycap>C+m C+s</keycap>) stops
+ recording. It also switches to the buffer containing the recorded macro,
+ giving you a chance to check over the recorded commands and make any
+ necessary changes. When you are happy with the macro, save the buffer
+ and it will appear in the <guimenu>Macros</guimenu> menu. To discard the
+ macro, close the buffer without saving it.</para>
+
+ <para>The file name extension <filename>.bsh</filename> is automatically
+ appended to the macro name, and all spaces are converted to underscore
+ characters, in order to make the macro name a valid file name. These two
+ operations are reversed when macros are displayed in the
+ <guimenu>Macros</guimenu> menu; see <xref linkend="organizing-macros" />
+ for details.</para>
+
+ <para>If a complicated operation only needs to be repeated a few times,
+ using the temporary macro feature is quicker than saving a new macro
+ file.</para>
+
+ <para><guimenu>Macros</guimenu>><guimenuitem>Record Temporary
+ Macro</guimenuitem> (shortcut: <keycap>C+m C+m</keycap>) begins
+ recording to a buffer named <filename>Temporary_Macro.bsh</filename>.
+ Once recording of a temporary macro is complete, jEdit does not display
+ the buffer containing the recorded commands, but the name
+ <filename>Temporary_Macro.bsh</filename> will be visible on any list of
+ open buffers. By switching to that buffer, you can view the commands,
+ edit them, and save them if you wish to a permanent macro file. Whether
+ or not you look at or save the temporary macro contents, it is
+ immediately available for playback.</para>
+
+ <para><guimenu>Macros</guimenu>><guimenuitem>Run Temporary
+ Macro</guimenuitem> (shortcut: <keycap>C+m C+p</keycap>) plays the macro
+ recorded to the <filename>Temporary_Macro.bsh</filename> buffer.</para>
+
+ <para>Only one temporary macro is available at a time. If you begin
+ recording a second temporary macro, the first is erased and cannot be
+ recovered unless you have saved the contents to a file with a name other
+ than <filename>Temporary_Macro.bsh</filename>. If you do not save the
+ temporary macro, you must keep the buffer containing the macro script
+ open during your jEdit session. To have the macro available for your
+ next jEdit session, save the buffer
+ <filename>Temporary_Macro.bsh</filename> as an ordinary macro with a
+ descriptive name of your choice. The new name will then be displayed in
+ the <guimenu>Macros</guimenu> menu.</para>
+ </section>
+
+ <section id="running-macros">
+ <title>Running Macros</title>
+
+ <para>Macros supplied with jEdit, as well as macros that you record or
+ write, are displayed under the <guimenu>Macros</guimenu> menu in a
+ hierarchical structure. The jEdit installation includes about 30 macros
+ divided into several major categories. Each category corresponds to a
+ nested submenu under the <guimenu>Macros</guimenu> menu. An index of
+ these macros containing short descriptions and usage notes is found in
+ <xref linkend="macro-index" />.</para>
+
+ <para>To run a macro, choose the <guimenu>Macros</guimenu> menu,
+ navigate through the hierarchy of submenus, and select the name of the
+ macro to execute. You can also assign execution of a particular macro to
+ a keyboard shortcut, toolbar button or context menu using the
+ <guimenuitem>Macro Shortcuts</guimenuitem>, <guimenuitem>Tool
+ Bar</guimenuitem> or <guimenuitem>Context Menu</guimenuitem> panes of
+ the <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog; see <xref linkend="global-opts" />.</para>
+ </section>
+
+ <section id="organizing-macros">
+ <title>How jEdit Organizes Macros</title>
+
+ <para>Every macro, whether or not you originally recorded it, is stored
+ on disk and can be edited as a text file. The file name of a macro must
+ have a <filename>.bsh</filename> extension in order for jEdit to be
+ aware of it. By default, jEdit associates a <filename>.bsh</filename>
+ file with the BeanShell edit mode for purposes of syntax highlighting,
+ indentation and other formatting. However, BeanShell syntax does not
+ impose any indentation or line break requirements.</para>
+
+ <para>The <guimenu>Macros</guimenu> menu lists all macros stored in two
+ places: the <filename>macros</filename> subdirectory of the jEdit home
+ directory, and the <filename>macros</filename> subdirectory of the
+ user-specific settings directory (see <xref
+ linkend="settings-directory" /> for information about the settings
+ directory). Any macros you record will be stored in the user-specific
+ directory.</para>
+
+ <para>Macros stored elsewhere can be run using the
+ <guimenu>Macros</guimenu>><guimenuitem>Run Other Macro</guimenuitem>
+ command, which displays a file chooser dialog box, and runs the
+ specified file.</para>
+
+ <para>The listing of individual macros in the <guimenu>Macros</guimenu>
+ menu can be organized in a hierarchy using subdirectories in the general
+ or user-specific macro directories; each subdirectory appears as a
+ submenu. You will find such a hierarchy in the default macro set
+ included with jEdit.</para>
+
+ <para>When jEdit first loads, it scans the designated macro directories
+ and assembles a listing of individual macros in the
+ <guimenu>Macros</guimenu> menu. When scanning the names, jEdit will
+ delete underscore characters and the <filename>.bsh</filename> extension
+ for menu labels, so that
+ <filename>List_Useful_Information.bsh</filename>, for example, will be
+ displayed in the <guimenu>Macros</guimenu> menu as <guimenuitem>List
+ Useful Information</guimenuitem>.</para>
+
+ <para>You can browse the user and system macro directories by opening
+ the <filename>macros</filename> directory from the
+ <guimenu>Utilities</guimenu>><guimenuitem>jEdit Home
+ Directory</guimenuitem> and
+ <guimenu>Utilities</guimenu>><guimenuitem>Settings
+ Directory</guimenuitem> menus.</para>
+
+ <para>Macros can be opened and edited much like ordinary files from the
+ file system browser. Editing macros from within jEdit will automatically
+ update the macros menu; however, if you modify macros from another
+ program or add macro files to the macro directories, you should run the
+ <guimenu>Macros</guimenu>><guimenuitem>Rescan Macros</guimenuitem>
+ command to update the macro list.</para>
+ </section>
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/using-plugins.xml b/jEdit/doc/users-guide/using-plugins.xml
index 98e93b5..c0e5cf3 100644
--- a/jEdit/doc/users-guide/using-plugins.xml
+++ b/jEdit/doc/users-guide/using-plugins.xml
@@ -1,143 +1,143 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="using-plugins">
- <title>Installing and Using Plugins</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=hard:maxLineLen=80: -->
- <!-- :xml.root=users-guide.xml: -->
- <para>A <firstterm>plugin</firstterm> is an application which is loaded and
- runs as part of another, host application. Plugins respond to user commands
- and perform tasks that supplement the host application's features.</para>
-
- <para>This chapter covers installing, updating and removing plugins.
- Documentation for the plugins themselves can be found in
- <guimenu>Help</guimenu>><guimenuitem>jEdit Help</guimenuitem>, and
- information about writing plugins can be found in <xref
- linkend="writing-plugins-part" />.</para>
-
- <section id="plugin-manager">
- <title>The Plugin Manager</title>
-
- <para><guimenu>Plugins</guimenu>><guimenuitem>Plugin
- Manager</guimenuitem> displays the plugin manager window. It consists of
- three tabs: Manage, Update and Install. The Manage tab lists all
- installed plugins; clicking on a plugin in the list will display
- information about it.</para>
-
- <para>To remove plugins, select them (multiple plugins can be selected
- by holding down <keycap>Control</keycap>) and click
- <guibutton>Remove</guibutton>. This will display a confirmation dialog
- box first.</para>
-
- <para>To view plugin documentation, select a plugin and click
- <guibutton>Help</guibutton>. Note that plugin documentation can also be
- accessed by invoking <guimenu>Help</guimenu>><guimenuitem>jEdit
- Help</guimenuitem>.</para>
-
- <para> After you have tuned jEdit to your liking and want to install the
- same set of plugins onto another host, or another user's profile, you
- can export your currently installed plugin list as an xml file, known as
- a <emphasis role="bold">PluginSet</emphasis>. The
- <guibutton>Save</guibutton> rollover button allows you to save the list
- of installed and loaded plugins to an XML file. See <xref
- linkend="plugin-sets" /> for more information. </para>
-
-
- <para><guimenu>Plugins</guimenu>><guimenuitem>Plugin
- Options</guimenuitem> displays a dialog box for changing plugin
- settings.</para>
- </section>
-
- <section id="installing-plugins">
- <title>Installing and Updating Plugins</title>
-
- <para>Plugins can be installed in two ways; manually, and from the
- plugin manager. In most cases, plugins should be installed from the
- plugin manager. It is easier and more convenient.</para>
-
- <para>To install plugins manually, go to <ulink
- url="http://plugins.jedit.org">http://plugins.jedit.org</ulink> in a web
- browser and follow the directions on that page.</para>
-
- <para>To install plugins from the plugin manager, make sure you are
- connected to the Internet and click the <guibutton>Install</guibutton>
- tab in the plugin manager window. The plugin manager will then download
- information about available plugins from the jEdit web site, and present
- a list of plugins compatible with your jEdit release.</para>
-
- <para>Click on a plugin in the list to see some information about it. To
- select plugins for installation, click the check box next to their names
- in the list.</para>
-
- <para>The <guibutton>Total size</guibutton> field shows the total size
- of all plugins chosen for installation, along with any plugins that will
- be automatically downloaded in order to fulfill dependencies.</para>
-
- <para>If a previously saved PluginSet was selected, it will
- automatically be loaded whenever the Install tab is created, and you
- will see the filename in the hovertip of the
- <guibutton>choose</guibutton> rolloverbutton, as well as all of the
- plugins in that set already checked for you. </para>
-
- <para> You can clear the active PluginSet with the
- <guibutton>clear</guibutton> button next to it, or choose a different
- PluginSet xml file with the <guibutton>choose</guibutton> button. See
- <xref linkend="plugin-sets" /> for more information. </para>
-
- <para>Once you have specified plugins to install, click
- <guibutton>Install</guibutton> to begin the download process.</para>
-
- <para>By default, the plugin manager does not download plugin source
- code, and installs the downloaded plugins in the
- <filename>jars</filename> subdirectory of the user-specific settings
- directory. These settings can be changed in <guilabel>Plugin
- Manager</guilabel> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="pluginmgr-pane" />.</para>
-
- <para>The <guibutton>Update</guibutton> tab of the plugin manager is
- very similar to the <guibutton>Install</guibutton> tab. It lists plugins
- for which updated versions are available. It will also offer to delete
- any obsolete plugins.</para>
-
- <sidebar>
- <title>Proxy Servers and Firewalls</title>
-
- <para>If you are connected to the Internet through an HTTP proxy or
- SOCKS firewall, you will need to specify the relevant details in the
- <guibutton>Proxy Servers</guibutton> pane of the
- <guimenu>Utilities</guimenu>><guimenuitem>Global
- Options</guimenuitem> dialog box; see <xref
- linkend="firewall-pane" />.</para>
- </sidebar>
- </section>
-
- <section id="plugin-sets">
- <title>Plugin Sets</title>
-
- <para> A <emphasis role="bold">PluginSet</emphasis> is a collection of
- plugins, represented as an XML file. These XML files can be created from the
- <guibutton>save</guibutton> button of the Manage tab of the Plugin Manager.
- Saving a PluginSet remembers all of the currently loaded plugins. </para>
-
- <para> When a PluginSet has been saved, it becomes the "default pluginset",
- which means that if you unload/uninstall plugins from that set and go back to the
- Install tab, you should see them selected for download again. To clear this
- setting, click on the <guibutton>clear</guibutton> button in the
- Install tab.
- </para>
-
- <para> It is posisble to Choose/Open a PluginSet from the Manage or the
- Install tab. The behavior of choosing a PluginSet depends on which tab
- you are on when you choose it. From the Manage tab, it unloads plugins that
- are loaded but not in the list. From the Install tab, it selects plugins
- from that list that are not loaded, marking them for download from Plugin
- Central. </para>
-
- <para> When choosing a PluginSet, the path can be given as a remote URL.
- This helps teachers and sysadmins direct the students/slaves to a standard
- set of plugins that are required for the course/job. </para>
-
- </section>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="using-plugins">
+ <title>Installing and Using Plugins</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :tabSize=1:indentSize=1:noTabs=true:wrap=hard:maxLineLen=80: -->
+ <!-- :xml.root=users-guide.xml: -->
+ <para>A <firstterm>plugin</firstterm> is an application which is loaded and
+ runs as part of another, host application. Plugins respond to user commands
+ and perform tasks that supplement the host application's features.</para>
+
+ <para>This chapter covers installing, updating and removing plugins.
+ Documentation for the plugins themselves can be found in
+ <guimenu>Help</guimenu>><guimenuitem>jEdit Help</guimenuitem>, and
+ information about writing plugins can be found in <xref
+ linkend="writing-plugins-part" />.</para>
+
+ <section id="plugin-manager">
+ <title>The Plugin Manager</title>
+
+ <para><guimenu>Plugins</guimenu>><guimenuitem>Plugin
+ Manager</guimenuitem> displays the plugin manager window. It consists of
+ three tabs: Manage, Update and Install. The Manage tab lists all
+ installed plugins; clicking on a plugin in the list will display
+ information about it.</para>
+
+ <para>To remove plugins, select them (multiple plugins can be selected
+ by holding down <keycap>Control</keycap>) and click
+ <guibutton>Remove</guibutton>. This will display a confirmation dialog
+ box first.</para>
+
+ <para>To view plugin documentation, select a plugin and click
+ <guibutton>Help</guibutton>. Note that plugin documentation can also be
+ accessed by invoking <guimenu>Help</guimenu>><guimenuitem>jEdit
+ Help</guimenuitem>.</para>
+
+ <para> After you have tuned jEdit to your liking and want to install the
+ same set of plugins onto another host, or another user's profile, you
+ can export your currently installed plugin list as an xml file, known as
+ a <emphasis role="bold">PluginSet</emphasis>. The
+ <guibutton>Save</guibutton> rollover button allows you to save the list
+ of installed and loaded plugins to an XML file. See <xref
+ linkend="plugin-sets" /> for more information. </para>
+
+
+ <para><guimenu>Plugins</guimenu>><guimenuitem>Plugin
+ Options</guimenuitem> displays a dialog box for changing plugin
+ settings.</para>
+ </section>
+
+ <section id="installing-plugins">
+ <title>Installing and Updating Plugins</title>
+
+ <para>Plugins can be installed in two ways; manually, and from the
+ plugin manager. In most cases, plugins should be installed from the
+ plugin manager. It is easier and more convenient.</para>
+
+ <para>To install plugins manually, go to <ulink
+ url="http://plugins.jedit.org">http://plugins.jedit.org</ulink> in a web
+ browser and follow the directions on that page.</para>
+
+ <para>To install plugins from the plugin manager, make sure you are
+ connected to the Internet and click the <guibutton>Install</guibutton>
+ tab in the plugin manager window. The plugin manager will then download
+ information about available plugins from the jEdit web site, and present
+ a list of plugins compatible with your jEdit release.</para>
+
+ <para>Click on a plugin in the list to see some information about it. To
+ select plugins for installation, click the check box next to their names
+ in the list.</para>
+
+ <para>The <guibutton>Total size</guibutton> field shows the total size
+ of all plugins chosen for installation, along with any plugins that will
+ be automatically downloaded in order to fulfill dependencies.</para>
+
+ <para>If a previously saved PluginSet was selected, it will
+ automatically be loaded whenever the Install tab is created, and you
+ will see the filename in the hovertip of the
+ <guibutton>choose</guibutton> rolloverbutton, as well as all of the
+ plugins in that set already checked for you. </para>
+
+ <para> You can clear the active PluginSet with the
+ <guibutton>clear</guibutton> button next to it, or choose a different
+ PluginSet xml file with the <guibutton>choose</guibutton> button. See
+ <xref linkend="plugin-sets" /> for more information. </para>
+
+ <para>Once you have specified plugins to install, click
+ <guibutton>Install</guibutton> to begin the download process.</para>
+
+ <para>By default, the plugin manager does not download plugin source
+ code, and installs the downloaded plugins in the
+ <filename>jars</filename> subdirectory of the user-specific settings
+ directory. These settings can be changed in <guilabel>Plugin
+ Manager</guilabel> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="pluginmgr-pane" />.</para>
+
+ <para>The <guibutton>Update</guibutton> tab of the plugin manager is
+ very similar to the <guibutton>Install</guibutton> tab. It lists plugins
+ for which updated versions are available. It will also offer to delete
+ any obsolete plugins.</para>
+
+ <sidebar>
+ <title>Proxy Servers and Firewalls</title>
+
+ <para>If you are connected to the Internet through an HTTP proxy or
+ SOCKS firewall, you will need to specify the relevant details in the
+ <guibutton>Proxy Servers</guibutton> pane of the
+ <guimenu>Utilities</guimenu>><guimenuitem>Global
+ Options</guimenuitem> dialog box; see <xref
+ linkend="firewall-pane" />.</para>
+ </sidebar>
+ </section>
+
+ <section id="plugin-sets">
+ <title>Plugin Sets</title>
+
+ <para> A <emphasis role="bold">PluginSet</emphasis> is a collection of
+ plugins, represented as an XML file. These XML files can be created from the
+ <guibutton>save</guibutton> button of the Manage tab of the Plugin Manager.
+ Saving a PluginSet remembers all of the currently loaded plugins. </para>
+
+ <para> When a PluginSet has been saved, it becomes the "default pluginset",
+ which means that if you unload/uninstall plugins from that set and go back to the
+ Install tab, you should see them selected for download again. To clear this
+ setting, click on the <guibutton>clear</guibutton> button in the
+ Install tab.
+ </para>
+
+ <para> It is posisble to Choose/Open a PluginSet from the Manage or the
+ Install tab. The behavior of choosing a PluginSet depends on which tab
+ you are on when you choose it. From the Manage tab, it unloads plugins that
+ are loaded but not in the list. From the Install tab, it selects plugins
+ from that list that are not loaded, marking them for download from Plugin
+ Central. </para>
+
+ <para> When choosing a PluginSet, the path can be given as a remote URL.
+ This helps teachers and sysadmins direct the students/slaves to a standard
+ set of plugins that are required for the course/job. </para>
+
+ </section>
+
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/users-guide/writing-modes.xml b/jEdit/doc/users-guide/writing-modes.xml
index 459571f..1eb5150 100644
--- a/jEdit/doc/users-guide/writing-modes.xml
+++ b/jEdit/doc/users-guide/writing-modes.xml
@@ -1,913 +1,913 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="writing-modes">
- <title>Mode Definition Syntax</title>
- <!-- jEdit buffer-local properties: -->
- <!-- :indentSize=1:noTabs=true: -->
- <!-- :xml.root=users-guide.xml: -->
- <para>Edit modes are defined using XML, the <firstterm>eXtensible Markup
- Language</firstterm>; mode files have the extension
- <filename>.xml</filename>. XML is a very simple language, and as a result
- edit modes are easy to create and modify. This section will start with a
- short XML primer, followed by detailed information about each supported tag
- and highlighting rule.</para>
- <para>Editing a mode or a mode catalog file within jEdit will cause the
- changes to take effect immediately. If you edit modes using another
- application, the changes will take effect after the
- <guimenu>Utilities</guimenu> > <guisubmenu>Troubleshooting</guisubmenu>
- > <guimenuitem>Reload Edit Modes</guimenuitem> command is invoked.</para>
- <section id="xml-primer">
- <title>An XML Primer</title>
- <para>A very simple XML file (which also happens to be an edit mode)
- looks like so:</para>
- <programlisting><?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- </PROPS>
-
- <RULES>
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- </RULES>
-</MODE></programlisting>
- <para>Note that each opening tag must have a corresponding closing tag.
- If there is nothing between the opening and closing tags, for example
- <literal><TAG></TAG></literal>, the shorthand notation
- <literal><TAG /></literal> may be used. An example of this
- shorthand can be seen in the <literal><PROPERTY></literal> tags
- above.</para>
- <para>XML is case sensitive. <literal>Span</literal> or
- <literal>span</literal> is not the same as
- <literal>SPAN</literal>.</para>
- <para>To insert a special character such as < or > literally in
- XML (for example, inside an attribute value), you must write it as an
- <firstterm>entity</firstterm>. An entity consists of the character's
- symbolic name enclosed within <quote>&</quote> and <quote>;</quote>.
- The most frequently used entities are:</para>
- <itemizedlist>
- <listitem>
- <para><literal><</literal> - The less-than (<)
- character</para>
- </listitem>
- <listitem>
- <para><literal>></literal> - The greater-than (>)
- character</para>
- </listitem>
- <listitem>
- <para><literal>&</literal> - The ampersand (&)
- character</para>
- </listitem>
- </itemizedlist>
- <para>For example, the following will cause a syntax error:</para>
- <programlisting><SEQ TYPE="OPERATOR">&</SEQ></programlisting>
- <para>Instead, you must write:</para>
- <programlisting><SEQ TYPE="OPERATOR">&</SEQ></programlisting>
- <para>Now that the basics of XML have been covered, the rest of this
- section will cover each construct in detail.</para>
- </section>
- <section id="mode-preamble">
- <title>The Preamble and MODE tag</title>
- <para>Each mode definition must begin with the following:</para>
- <programlisting><?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd"></programlisting>
- <para>Each mode definition must also contain exactly one
- <literal>MODE</literal> tag. All other tags (<literal>PROPS</literal>,
- <literal>RULES</literal>) must be placed inside the
- <literal>MODE</literal> tag. The <literal>MODE</literal> tag does not
- have any defined attributes. Here is an example:</para>
- <programlisting><MODE>
- <replaceable>... mode definition goes here ...</replaceable>
-</MODE></programlisting>
- </section>
- <section id="mode-tag-props">
- <title>The PROPS Tag</title>
- <para>The <literal>PROPS</literal> tag and the
- <literal>PROPERTY</literal> tags inside it are used to define
- mode-specific properties. Each <literal>PROPERTY</literal> tag must have
- a <literal>NAME</literal> attribute set to the property's name, and a
- <literal>VALUE</literal> attribute with the property's value.</para>
- <para>All buffer-local properties listed in <xref
- linkend="buffer-local" /> may be given values in edit modes.</para>
- <para>The following mode properties specify commenting strings:</para>
- <itemizedlist>
- <listitem>
- <para><literal>commentEnd</literal> - the comment end string,
- used by the <guimenuitem>Range Comment</guimenuitem>
- command.</para>
- </listitem>
- <listitem>
- <para><literal>commentStart</literal> - the comment start
- string, used by the <guimenuitem>Range Comment</guimenuitem>
- command.</para>
- </listitem>
- <listitem>
- <para><literal>lineComment</literal> - the line comment string,
- used by the <guimenuitem>Line Comment</guimenuitem>
- command.</para>
- </listitem>
- </itemizedlist>
- <para>When performing auto indent, a number of mode properties determine
- the resulting indent level:</para>
- <itemizedlist>
- <listitem>
- <para>The line and the one before it are scanned for brackets
- listed in the <literal>indentCloseBrackets</literal> and
- <literal>indentOpenBrackets</literal> properties. Opening
- brackets in the previous line increase indent.</para>
- <para>If <literal>lineUpClosingBracket</literal> is set to
- <literal>true</literal>, then closing brackets on the current
- line will line up with the line containing the matching opening
- bracket. For example, in Java mode
- <literal>lineUpClosingBracket</literal> is set to
- <literal>true</literal>, resulting in brackets being indented
- like so:</para>
- <programlisting>{
- // Code
- {
- // More code
- }
-}</programlisting>
- <para>If <literal>lineUpClosingBracket</literal> is set to
- <literal>false</literal>, the line <emphasis>after</emphasis> a
- closing bracket will be lined up with the line containing the
- matching opening bracket. For example, in Lisp mode
- <literal>lineUpClosingBracket</literal> is set to
- <literal>false</literal>, resulting in brackets being indented
- like so:</para>
- <programlisting>(foo 'a-parameter
- (crazy-p)
- (bar baz ()))
-(print "hello world")</programlisting>
- </listitem>
- <listitem>
- <para>If the previous line contains no opening brackets, or if
- the <literal>doubleBracketIndent</literal> property is set to
- <literal>true</literal>, the previous line is checked against
- the regular expressions in the <literal>indentNextLine</literal>
- and <literal>indentNextLines</literal> properties. If the
- previous line matches the former, the indent of the current line
- is increased and the subsequent line is shifted back again. If
- the previous line matches the latter, the indent of the current
- and subsequent lines is increased.</para>
- <para>In Java mode, for example, the
- <literal>indentNextLine</literal> property is set to match
- control structures such as <quote>if</quote>,
- <quote>else</quote>, <quote>while</quote>, and so on.</para>
- <para>The <literal>doubleBracketIndent</literal> property, if
- set to the default of <literal>false</literal>, results in code
- indented like so:</para>
- <programlisting>while(objects.hasNext())
-{
- Object next = objects.hasNext();
- if(next instanceof Paintable)
- next.paint(g);
-}</programlisting>
- <para>On the other hand, settings this property to
- <quote>true</quote> will give the following result:</para>
- <programlisting>while(objects.hasNext())
- {
- Object next = objects.hasNext();
- if(next instanceof Paintable)
- next.paint(g);
- }</programlisting>
- </listitem>
- </itemizedlist>
- <para>Here is the complete <literal><PROPS></literal> tag for Java
- mode:</para>
- <programlisting><PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^.*(default:\s*|case.*:.*)$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
-</PROPS></programlisting>
- </section>
- <section id="mode-tag-rules">
- <title>The RULES Tag</title>
- <para><literal>RULES</literal> tags must be placed inside the
- <literal>MODE</literal> tag. Each <literal>RULES</literal> tag defines a
- <firstterm>ruleset</firstterm>. A ruleset consists of a number of
- <firstterm>parser rules</firstterm>, with each parser rule specifying
- how to highlight a specific syntax token. There must be at least one
- ruleset in each edit mode. There can also be more than one, with
- different rulesets being used to highlight different parts of a buffer
- (for example, in HTML mode, one rule set highlights HTML tags, and
- another highlights inline JavaScript). For information about using more
- than one ruleset, see <xref linkend="mode-rule-span" />.</para>
- <para>The <literal>RULES</literal> tag supports the following
- attributes, all of which are optional:</para>
- <itemizedlist>
- <listitem>
- <para><literal>SET</literal> - the name of this ruleset. All
- rulesets other than the first must have a name.</para>
- </listitem>
- <listitem>
- <para><literal>IGNORE_CASE</literal> - if set to
- <literal>FALSE</literal>, matches will be case sensitive.
- Otherwise, case will not matter. Default is
- <literal>TRUE</literal>.</para>
- </listitem>
- <listitem>
- <para><literal>ESCAPE</literal> - specifies a character sequence
- for escaping literals. The first character following the escape
- sequence is not considered as input for syntax highlighting,
- thus being highlighted with default token for the rule set.
- </para>
- </listitem>
- <listitem>
- <para><literal>NO_WORD_SEP</literal> - any non-alphanumeric
- character <emphasis>not</emphasis> in this list is treated as a
- word separator for the purposes of syntax highlighting.</para>
- </listitem>
- <listitem>
- <para><literal>DEFAULT</literal> - the token type for text which
- doesn't match any specific rule. Default is
- <literal>NULL</literal>. See <xref
- linkend="mode-syntax-tokens" /> for a list of token
- types.</para>
- </listitem>
- <listitem>
- <para><literal>HIGHLIGHT_DIGITS</literal></para>
- </listitem>
- <listitem>
- <para><literal>DIGIT_RE</literal> - see below for information
- about these two attributes.</para>
- </listitem>
- </itemizedlist>
- <para>Here is an example <literal>RULES</literal> tag:</para>
- <programlisting><RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <replaceable>... parser rules go here ...</replaceable>
-</RULES></programlisting>
- <section>
- <title>Highlighting Numbers</title>
- <para>If the <literal>HIGHLIGHT_DIGITS</literal> attribute is set to
- <literal>TRUE</literal>, jEdit will attempt to highlight numbers in
- this ruleset.</para>
- <para>Any word consisting entirely of digits (0-9) will be
- highlighted with the <literal>DIGIT</literal> token type. A word
- that contains other letters in addition to digits will be
- highlighted with the <literal>DIGIT</literal> token type only if it
- matches the regular expression specified in the
- <literal>DIGIT_RE</literal> attribute. If this attribute is not
- specified, it will not be highlighted.</para>
- <para>Here is an example <literal>DIGIT_RE</literal> regular
- expression that highlights Java-style numeric literals (normal
- numbers, hexadecimals prefixed with <literal>0x</literal>, numbers
- suffixed with various type indicators, and floating point literals
- containing an exponent):</para>
- <programlisting>DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))"</programlisting>
- <para>Regular expression syntax is described in <xref
- linkend="regexps" />.</para>
- </section>
- <section id="rule-ordering">
- <title>Rule Ordering Requirements</title>
- <para>You might encounter this very common pitfall when writing your
- own modes.</para>
- <para>Since jEdit checks buffer text against parser rules in the
- order they appear in the ruleset, more specific rules must be placed
- before generalized ones, otherwise the generalized rules will catch
- everything.</para>
- <para>This is best demonstrated with an example. The following is
- incorrect rule ordering:</para>
- <programlisting><SPAN TYPE="MARKUP">
- <BEGIN>[</BEGIN>
- <END>]</END>
-</SPAN>
-
-<SPAN TYPE="KEYWORD1">
- <BEGIN>[!</BEGIN>
- <END>]</END>
-</SPAN></programlisting>
- <para>If you write the above in a rule set, any occurrence of
- <quote>[</quote> (even things like <quote>[!DEFINE</quote>, etc)
- will be highlighted using the first rule, because it will be the
- first to match. This is most likely not the intended
- behavior.</para>
- <para>The problem can be solved by placing the more specific rule
- before the general one:</para>
- <programlisting><SPAN TYPE="KEYWORD1">
- <BEGIN>[!</BEGIN>
- <END>]</END>
-</SPAN>
-
-<SPAN TYPE="MARKUP">
- <BEGIN>[</BEGIN>
- <END>]</END>
-</SPAN></programlisting>
- <para>Now, if the buffer contains the text
- <quote>[!SPECIAL]</quote>, the rules will be checked in order, and
- the first rule will be the first to match. However, if you write
- <quote>[FOO]</quote>, it will be highlighted using the second rule,
- which is exactly what you would expect.</para>
- </section>
- <section>
- <title>Per-Ruleset Properties</title>
- <para>The <literal>PROPS</literal> tag (described in <xref
- linkend="mode-tag-props" />) can also be placed inside the
- <literal>RULES</literal> tag to define ruleset-specific properties.
- The following properties can be set on a per-ruleset basis:</para>
- <itemizedlist>
- <listitem>
- <para><literal>commentEnd</literal> - the comment end
- string.</para>
- </listitem>
- <listitem>
- <para><literal>commentStart</literal> - the comment start
- string.</para>
- </listitem>
- <listitem>
- <para><literal>lineComment</literal> - the line comment
- string.</para>
- </listitem>
- </itemizedlist>
- <para>This allows different parts of a file to have different
- comment strings (in the case of HTML, for example, in HTML text and
- inline JavaScript). For information about the commenting commands,
- see <xref linkend="commenting" />.</para>
- </section>
- </section>
- <section id="mode-rule-terminate">
- <title>The TERMINATE Tag</title>
- <para>The <literal>TERMINATE</literal> rule, which must be placed inside
- a <literal>RULES</literal> tag, specifies that parsing should stop after
- the specified number of characters have been read from a line. The
- number of characters to terminate after should be specified with the
- <literal>AT_CHAR</literal> attribute. Here is an example:</para>
- <programlisting><TERMINATE AT_CHAR="1" /></programlisting>
- <para>This rule is used in Patch mode, for example, because only the
- first character of each line affects highlighting.</para>
- </section>
- <section id="mode-rule-span">
- <title>The SPAN Tag</title>
- <para>The <literal>SPAN</literal> rule, which must be placed inside a
- <literal>RULES</literal> tag, highlights text between a start and end
- string. The start and end strings are specified inside child elements of
- the <literal>SPAN</literal> tag. The following attributes are
- supported:</para>
- <itemizedlist>
- <listitem>
- <para><literal>TYPE</literal> - The token type to highlight the
- span with. See <xref linkend="mode-syntax-tokens" /> for a list
- of token types.</para>
- </listitem>
- <listitem>
- <para><literal>AT_LINE_START</literal> - If set to
- <literal>TRUE</literal>, the span will only be highlighted if
- the start sequence occurs at the beginning of a line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WHITESPACE_END</literal> - If set to
- <literal>TRUE</literal>, the span will only be highlighted if
- the start sequence is the first non-whitespace text in the
- line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WORD_START</literal> - If set to
- <literal>TRUE</literal>, the span will only be highlighted if
- the start sequence occurs at the beginning of a word.</para>
- </listitem>
- <listitem>
- <para><literal>DELEGATE</literal> - text inside the span will be
- highlighted with the specified ruleset. To delegate to a ruleset
- defined in the current mode, just specify its name. To delegate
- to a ruleset defined in another mode, specify a name of the form
- <literal><replaceable>mode</replaceable>::<replaceable>ruleset</replaceable></literal>.
- Note that the first (unnamed) ruleset in a mode is called
- <quote>MAIN</quote>.</para>
- </listitem>
- <listitem>
- <para><literal>MATCH_TYPE</literal> - Controls how the start and
- end of the sequence will be highlighted. See <xref
- linkend="mode-match-type" /> for more information.</para>
- </listitem>
- <listitem>
- <para><literal>ESCAPE</literal> - specifies a character sequence
- for escaping characters. The first character following the escape
- sequence is not considered as input for syntax highlighting,
- thus being highlighted with rule's token.
- </para>
- </listitem>
- <listitem>
- <para><literal>NO_LINE_BREAK</literal> - If set to
- <literal>TRUE</literal>, the span will not cross line
- breaks.</para>
- </listitem>
- <listitem>
- <para><literal>NO_WORD_BREAK</literal> - If set to
- <literal>TRUE</literal>, the span will not cross word
- breaks.</para>
- </listitem>
- </itemizedlist>
- <para>Note that the <literal>AT_LINE_START</literal>,
- <literal>AT_WHITESPACE_END</literal> and
- <literal>AT_WORD_START</literal> attributes can also be used on the
- <literal>BEGIN</literal> and <literal>END</literal> elements. Setting
- these attributes to the same value on both elements has the same effect
- as setting them on the <literal>SPAN</literal> element.</para>
- <para>Here is a <literal>SPAN</literal> that highlights Java string
- literals, which cannot include line breaks:</para>
- <programlisting><SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
-</SPAN></programlisting>
- <para>Here is a <literal>SPAN</literal> that highlights Java
- documentation comments by delegating to the <quote>JAVADOC</quote>
- ruleset defined elsewhere in the current mode:</para>
- <programlisting><SPAN TYPE="COMMENT2" DELEGATE="JAVADOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
-</SPAN></programlisting>
- <para>Here is a <literal>SPAN</literal> that highlights HTML cascading
- stylesheets inside <literal><STYLE></literal> tags by delegating
- to the main ruleset in the CSS edit mode:</para>
- <programlisting><SPAN TYPE="MARKUP" DELEGATE="css::MAIN">
- <BEGIN><style></BEGIN>
- <END></style></END>
-</SPAN></programlisting>
- </section>
- <section id="mode-rule-span-regexp">
- <title>The SPAN_REGEXP Tag</title>
- <para>The <literal>SPAN_REGEXP</literal> rule is similar to the
- <literal>SPAN</literal> rule except the start sequence is taken to be a
- regular expression. In addition to the attributes supported by the
- <literal>SPAN</literal> tag, the following attributes are
- supported:</para>
- <itemizedlist>
- <listitem>
- <para><literal>HASH_CHAR</literal> - a literal string which must
- be at the start of a regular expression.</para>
- </listitem>
- <listitem>
- <para><literal>HASH_CHARS</literal> - a list of possible literal
- characters, one of which must match at the start of the regular
- expression.</para>
- </listitem>
- </itemizedlist>
- <para><literal>HASH_CHAR</literal> and <literal>HASH_CHARS</literal>
- attributes are both optional, but you may only specify one, not both. If
- both are specified, <literal>HASH_CHARS</literal> is ignored and an
- error is shown. Whenever possible, use a literal prefix to specify a
- <literal>SPAN_REGEXP</literal>. If the starting prefix is always the
- same, use <literal>HASH_CHAR</literal> and provide as much prefix as
- possible. Only in rare cases would you omit both attributes, such as the
- case where there is no other reliable way to get the highlighting you
- need, for example, with comments in the Cobol programming
- language.</para>
- <para>The regular expression match cannot span more than one line. Any
- text matched by groups in the <literal>BEGIN</literal> regular
- expression is substituted in the <literal>END</literal> string. See
- below for an example of where this is useful.</para>
- <para>Regular expression syntax is described in <xref
- linkend="regexps" />.</para>
- <para>Here is a <literal>SPAN_REGEXP</literal> rule that highlights
- <quote>read-ins</quote> in shell scripts:</para>
- <programlisting><SPAN_REGEXP HASH_CHAR="<" TYPE="LITERAL1" DELEGATE="LITERAL">
- <BEGIN><![CDATA[<<[\p{Space}'"]*([\p{Alnum}_]+)[\p{Space}'"]*]]></BEGIN>
- <END>$1</END>
-</SPAN_REGEXP></programlisting>
- <para>Here is a <literal>SPAN_REGEXP</literal> rule that highlights
- constructs placed between <literal><#ftl</literal> and
- <literal>></literal>, as long as the <literal><#ftl</literal> is
- followed by a word break:</para>
- <programlisting><SPAN_REGEXP TYPE="KEYWORD1" HASH_CHAR="<" DELEGATE="EXPRESSION">
- <BEGIN><#ftl\b</BEGIN>
- <END>></END>
-</SPAN_REGEXP></programlisting>
- </section>
- <section id="mode-rule-eol-span">
- <title>The EOL_SPAN Tag</title>
- <para>An <literal>EOL_SPAN</literal> is similar to a
- <literal>SPAN</literal> except that highlighting stops at the end of the
- line, and no end sequence needs to be specified. The text to match is
- specified between the opening and closing <literal>EOL_SPAN</literal>
- tags. The following attributes are supported:</para>
- <itemizedlist>
- <listitem>
- <para><literal>TYPE</literal> - The token type to highlight the
- span with. See <xref linkend="mode-syntax-tokens" /> for a list
- of token types.</para>
- </listitem>
- <listitem>
- <para><literal>AT_LINE_START</literal> - If set to
- <literal>TRUE</literal>, the span will only be highlighted if
- the start sequence occurs at the beginning of a line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WHITESPACE_END</literal> - If set to
- <literal>TRUE</literal>, the span will only be highlighted if
- the sequence is the first non-whitespace text in the
- line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WORD_START</literal> - If set to
- <literal>TRUE</literal>, the span will only be highlighted if
- the start sequence occurs at the beginning of a word.</para>
- </listitem>
- <listitem>
- <para><literal>DELEGATE</literal> - text inside the span will be
- highlighted with the specified ruleset. To delegate to a ruleset
- defined in the current mode, just specify its name. To delegate
- to a ruleset defined in another mode, specify a name of the form
- <literal><replaceable>mode</replaceable>::<replaceable>ruleset</replaceable></literal>.
- Note that the first (unnamed) ruleset in a mode is called
- <quote>MAIN</quote>.</para>
- </listitem>
- <listitem>
- <para><literal>MATCH_TYPE</literal> - Controls how the start of
- the sequence will be highlighted. See <xref
- linkend="mode-match-type" /> for more information.</para>
- </listitem>
- </itemizedlist>
- <para>Here is an <literal>EOL_SPAN</literal> that highlights C++
- comments:</para>
- <programlisting><EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN></programlisting>
- </section>
- <section id="mode-rule-eol-span-regexp">
- <title>The EOL_SPAN_REGEXP Tag</title>
- <para>The <literal>EOL_SPAN_REGEXP</literal> rule is similar to the
- <literal>EOL_SPAN</literal> rule except the match sequence is taken to
- be a regular expression. In addition to the attributes supported by the
- <literal>EOL_SPAN</literal> tag, the following attributes are
- supported:</para>
- <itemizedlist>
- <listitem>
- <para><literal>HASH_CHAR</literal> - a literal string which must
- be at the start of a regular expression.</para>
- </listitem>
- <listitem>
- <para><literal>HASH_CHARS</literal> - a list of possible literal
- characters, one of which must match at the start of the regular
- expression.</para>
- </listitem>
- </itemizedlist>
- <para><literal>HASH_CHAR</literal> and <literal>HASH_CHARS</literal>
- attributes are both optional, but you may only specify one, not both. If
- both are specified, <literal>HASH_CHARS</literal> is ignored and an
- error is shown. Whenever possible, use a literal prefix to specify a
- <literal>EOL_SPAN_REGEXP</literal>. If the starting prefix is always the
- same, use <literal>HASH_CHAR</literal> and provide as much prefix as
- possible. Only in rare cases would you omit both attributes, such as the
- case where there is no other reliable way to get the highlighting you
- need, for example, with comments in the Cobol programming
- language.</para>
- <para>The regular expression match cannot span more than one
- line.</para>
- <para>Regular expression syntax is described in <xref
- linkend="regexps" />.</para>
- <para>Here is an <literal>EOL_SPAN_REGEXP</literal> that highlights
- MS-DOS batch file comments, which start with <literal>REM</literal>,
- followed by any whitespace character, and extend until the end of the
- line:</para>
- <programlisting><EOL_SPAN_REGEXP AT_WHITESPACE_END="TRUE" HASH_CHAR="REM" TYPE="COMMENT1">REM\s</EOL_SPAN_REGEXP></programlisting>
- </section>
- <section id="mode-rule-mark-prev">
- <title>The MARK_PREVIOUS Tag</title>
- <para>The <literal>MARK_PREVIOUS</literal> rule, which must be placed
- inside a <literal>RULES</literal> tag, highlights from the end of the
- previous syntax token to the matched text. The text to match is
- specified between opening and closing <literal>MARK_PREVIOUS</literal>
- tags. The following attributes are supported:</para>
- <itemizedlist>
- <listitem>
- <para><literal>TYPE</literal> - The token type to highlight the
- text with. See <xref linkend="mode-syntax-tokens" /> for a list
- of token types.</para>
- </listitem>
- <listitem>
- <para><literal>AT_LINE_START</literal> - If set to
- <literal>TRUE</literal>, the sequence will only be highlighted
- if it occurs at the beginning of a line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WHITESPACE_END</literal> - If set to
- <literal>TRUE</literal>, the sequence will only be highlighted
- if it is the first non-whitespace text in the line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WORD_START</literal> - If set to
- <literal>TRUE</literal>, the sequence will only be highlighted
- if it occurs at the beginning of a word.</para>
- </listitem>
- <listitem>
- <para><literal>MATCH_TYPE</literal> - Controls how the matched
- region will be highlighted. See <xref
- linkend="mode-match-type" /> for more information.</para>
- </listitem>
- </itemizedlist>
- <para>Here is a rule that highlights labels in Java mode (for example,
- <quote>XXX:</quote>):</para>
- <programlisting><MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
- MATCH_TYPE="DEFAULT">:</MARK_PREVIOUS></programlisting>
- </section>
- <section id="mode-rule-mark-following">
- <title>The MARK_FOLLOWING Tag</title>
- <para>The <literal>MARK_FOLLOWING</literal> rule, which must be placed
- inside a <literal>RULES</literal> tag, highlights from the start of the
- match to the next syntax token. The text to match is specified between
- opening and closing <literal>MARK_FOLLOWING</literal> tags. The
- following attributes are supported:</para>
- <itemizedlist>
- <listitem>
- <para><literal>TYPE</literal> - The token type to highlight the
- text with. See <xref linkend="mode-syntax-tokens" /> for a list
- of token types.</para>
- </listitem>
- <listitem>
- <para><literal>AT_LINE_START</literal> - If set to
- <literal>TRUE</literal>, the sequence will only be highlighted
- if it occurs at the beginning of a line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WHITESPACE_END</literal> - If set to
- <literal>TRUE</literal>, the sequence will only be highlighted
- if it is the first non-whitespace text in the line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WORD_START</literal> - If set to
- <literal>TRUE</literal>, the sequence will only be highlighted
- if it occurs at the beginning of a word.</para>
- </listitem>
- <listitem>
- <para><literal>MATCH_TYPE</literal> - Controls how the matched
- region will be highlighted. See <xref
- linkend="mode-match-type" /> for more information.</para>
- </listitem>
- </itemizedlist>
- <para>Here is a rule that highlights variables in Unix shell scripts
- (<quote>$CLASSPATH</quote>, <quote>$IFS</quote>, etc):</para>
- <programlisting><MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING></programlisting>
- </section>
- <section id="mode-rule-seq">
- <title>The SEQ Tag</title>
- <para>The <literal>SEQ</literal> rule, which must be placed inside a
- <literal>RULES</literal> tag, highlights fixed sequences of text. The
- text to highlight is specified between opening and closing
- <literal>SEQ</literal> tags. The following attributes are
- supported:</para>
- <itemizedlist>
- <listitem>
- <para><literal>TYPE</literal> - the token type to highlight the
- sequence with. See <xref linkend="mode-syntax-tokens" /> for a
- list of token types.</para>
- </listitem>
- <listitem>
- <para><literal>AT_LINE_START</literal> - If set to
- <literal>TRUE</literal>, the sequence will only be highlighted
- if it occurs at the beginning of a line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WHITESPACE_END</literal> - If set to
- <literal>TRUE</literal>, the sequence will only be highlighted
- if it is the first non-whitespace text in the line.</para>
- </listitem>
- <listitem>
- <para><literal>AT_WORD_START</literal> - If set to
- <literal>TRUE</literal>, the sequence will only be highlighted
- if it occurs at the beginning of a word.</para>
- </listitem>
- <listitem>
- <para><literal>DELEGATE</literal> - if this attribute is
- specified, all text after the sequence will be highlighted using
- this ruleset. To delegate to a ruleset defined in the current
- mode, just specify its name. To delegate to a ruleset defined in
- another mode, specify a name of the form
- <literal><replaceable>mode</replaceable>::<replaceable>ruleset</replaceable></literal>.
- Note that the first (unnamed) ruleset in a mode is called
- <quote>MAIN</quote>.</para>
- </listitem>
- </itemizedlist>
- <para>The following rules highlight a few Java operators:</para>
- <programlisting><SEQ TYPE="OPERATOR">+</SEQ>
-<SEQ TYPE="OPERATOR">-</SEQ>
-<SEQ TYPE="OPERATOR">*</SEQ>
-<SEQ TYPE="OPERATOR">/</SEQ></programlisting>
- </section>
- <section id="mode-rule-seq-regexp">
- <title>The SEQ_REGEXP Tag</title>
- <para>The <literal>SEQ_REGEXP</literal> rule is similar to the
- <literal>SEQ</literal> rule except the match sequence is taken to be a
- regular expression. In addition to the attributes supported by the
- <literal>SEQ</literal> tag, the following attributes are
- supported:</para>
- <itemizedlist>
- <listitem>
- <para><literal>HASH_CHAR</literal> - a literal string which must
- be at the start of a regular expression.</para>
- </listitem>
- <listitem>
- <para><literal>HASH_CHARS</literal> - a list of possible literal
- characters, one of which must match at the start of the regular
- expression.</para>
- </listitem>
- </itemizedlist>
- <para><literal>HASH_CHAR</literal> and <literal>HASH_CHARS</literal>
- attributes are both optional, but you may only specify one, not both. If
- both are specified, <literal>HASH_CHARS</literal> is ignored and an
- error is shown. Whenever possible, use a literal prefix to specify a
- <literal>SEQ_REGEXP</literal>. If the starting prefix is always the
- same, use <literal>HASH_CHAR</literal> and provide as much prefix as
- possible. Only in rare cases would you omit both attributes, such as the
- case where there is no other reliable way to get the highlighting you
- need, for example, with comments in the Cobol programming
- language.</para>
- <para>The regular expression match cannot span more than one
- line.</para>
- <para>Regular expression syntax is described in <xref
- linkend="regexps" />.</para>
- <para><emphasis role="bold">NOTE</emphasis>: c-style character escaping
- for literals (such as the tab char: \t) do not work as attribute values
- in XML. Use the XML character entity instead. For example: 	
- instead of \t.</para>
- <para>Here is a <literal>SEQ_REGEXP</literal> rule from moin.xml that
- uses the <literal>HASH_CHARS</literal> attribute, to describe a keyword
- (wikiword) that can start with any uppercase letter and contain lower
- case letters and at least one uppercase letter in the middle.</para>
- <programlisting>
- <SEQ_REGEXP HASH_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZ" AT_WORD_START="TRUE" TYPE="KEYWORD2">[A-Z][a-z]+[A-Z][a-zA-Z]+</SEQ_REGEXP>
- </programlisting>
- </section>
- <section id="mode-rule-import">
- <title>The IMPORT Tag</title>
- <para>The <literal>IMPORT</literal> tag, which must be placed inside a
- <literal>RULES</literal> tag, loads all rules defined in a given ruleset
- into the current ruleset; in other words, it has the same effect as
- copying and pasting the imported ruleset.</para>
- <para>The only required attribute <literal>DELEGATE</literal> must be
- set to the name of a ruleset. To import a ruleset defined in the current
- mode, just specify its name. To import a ruleset defined in another
- mode, specify a name of the form
- <literal><replaceable>mode</replaceable>::<replaceable>ruleset</replaceable></literal>.
- Note that the first (unnamed) ruleset in a mode is called
- <quote>MAIN</quote>.</para>
- <para>One quirk is that the definition of the imported ruleset is not
- copied to the location of the <literal>IMPORT</literal> tag, but rather
- to the end of the containing ruleset. This has implications with
- rule-ordering; see <xref linkend="rule-ordering" />.</para>
- <para>Here is an example from the PHP mode, which extends the inline
- JavaScript highlighting to support embedded PHP:</para>
- <programlisting>
- <RULES SET="JAVASCRIPT+PHP">
-
- <SPAN TYPE="MARKUP" DELEGATE="php::PHP">
- <BEGIN><?php</BEGIN>
- <END>?></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="php::PHP">
- <BEGIN><?</BEGIN>
- <END>?></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="php::PHP">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
-
- <IMPORT DELEGATE="javascript::MAIN"/>
-</RULES></programlisting>
- </section>
- <section id="mode-rule-keywords">
- <title>The KEYWORDS Tag</title>
- <para>The <literal>KEYWORDS</literal> tag, which must be placed inside a
- <literal>RULES</literal> tag and can only appear once, specifies a list
- of keywords to highlight. Keywords are similar to
- <literal>SEQ</literal>s, except that <literal>SEQ</literal>s match
- anywhere in the text, whereas keywords only match whole words. Words are
- considered to be runs of text separated by non-alphanumeric
- characters.</para>
- <para>The <literal>KEYWORDS</literal> tag does not define any
- attributes.</para>
- <para>Each child element of the <literal>KEYWORDS</literal> tag is an
- element whose name is a token type, and whose content is the keyword to
- highlight. For example, the following rule highlights the most common
- Java keywords:</para>
- <programlisting><KEYWORDS>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>void</KEYWORD3>
-</KEYWORDS></programlisting>
- </section>
- <section id="mode-syntax-tokens">
- <title>Token Types</title>
- <para>Parser rules can highlight tokens using any of the following token
- types:</para>
- <itemizedlist>
- <listitem>
- <para><literal>NULL</literal> - no special highlighting is
- performed on tokens of type <literal>NULL</literal></para>
- </listitem>
- <listitem>
- <para><literal>COMMENT1</literal></para>
- </listitem>
- <listitem>
- <para><literal>COMMENT2</literal></para>
- </listitem>
- <listitem>
- <para><literal>COMMENT3</literal></para>
- </listitem>
- <listitem>
- <para><literal>COMMENT4</literal></para>
- </listitem>
- <listitem>
- <para><literal>FUNCTION</literal></para>
- </listitem>
- <listitem>
- <para><literal>DIGIT</literal></para>
- </listitem>
- <listitem>
- <para><literal>INVALID</literal><!-- - tokens of this type are
- automatically added if a <literal>NO_WORD_BREAK</literal> or
- <literal>NO_LINE_BREAK</literal> <literal>SPAN</literal> spans more than
- one word or line, respectively. --></para>
- </listitem>
- <listitem>
- <para><literal>KEYWORD1</literal></para>
- </listitem>
- <listitem>
- <para><literal>KEYWORD2</literal></para>
- </listitem>
- <listitem>
- <para><literal>KEYWORD3</literal></para>
- </listitem>
- <listitem>
- <para><literal>KEYWORD4</literal></para>
- </listitem>
- <listitem>
- <para><literal>LABEL</literal></para>
- </listitem>
- <listitem>
- <para><literal>LITERAL1</literal></para>
- </listitem>
- <listitem>
- <para><literal>LITERAL2</literal></para>
- </listitem>
- <listitem>
- <para><literal>LITERAL3</literal></para>
- </listitem>
- <listitem>
- <para><literal>LITERAL4</literal></para>
- </listitem>
- <listitem>
- <para><literal>MARKUP</literal></para>
- </listitem>
- <listitem>
- <para><literal>OPERATOR</literal></para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="mode-match-type">
- <title>The MATCH_TYPE Attribute</title>
- <para>The <literal>MATCH_TYPE</literal> attribute is used by some of the
- rules to control how the region matched by the rule will be
- highlighted.</para>
- <para>For example, when using a <literal>MARK_PREVIOUS</literal> rule to
- highlight a function call of the form <literal>fcall()</literal>, the
- following rule could be used:</para>
- <programlisting>
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS></programlisting>
- <para>This would cause <literal>fcall</literal> to be highlighted as
- <literal>FUNCTION</literal>, and <literal>(</literal> to be highlighted
- as <literal>OPERATOR</literal>. In this case, to maintain bracket
- matching working, a <literal>SEQ</literal> rule would have to be added
- to match <literal>)</literal> and mark it as
- <literal>OPERATOR</literal>.</para>
- <para>The <literal>MATCH_TYPE</literal> attribute value can be any of
- the valid token types, or the following special values:</para>
- <itemizedlist>
- <listitem>
- <para><literal>RULE</literal>: this is the default value. It
- tells the syntax system to use the same token type as the TYPE
- attribute of the rule. This is equivalent to
- <literal>EXCLUDE_MATCH="FALSE"</literal> in 4.2 and earlier mode
- files.</para>
- </listitem>
- <listitem>
- <para><literal>CONTEXT</literal>: using this value tells the
- syntax system to mark the matched region using the default token
- type for the current rule set. In 4.2 and earlier mode files,
- this was specified by
- <literal>EXCLUDE_MATCH="TRUE"</literal>.</para>
- </listitem>
- </itemizedlist>
- </section>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="writing-modes">
+ <title>Mode Definition Syntax</title>
+ <!-- jEdit buffer-local properties: -->
+ <!-- :indentSize=1:noTabs=true: -->
+ <!-- :xml.root=users-guide.xml: -->
+ <para>Edit modes are defined using XML, the <firstterm>eXtensible Markup
+ Language</firstterm>; mode files have the extension
+ <filename>.xml</filename>. XML is a very simple language, and as a result
+ edit modes are easy to create and modify. This section will start with a
+ short XML primer, followed by detailed information about each supported tag
+ and highlighting rule.</para>
+ <para>Editing a mode or a mode catalog file within jEdit will cause the
+ changes to take effect immediately. If you edit modes using another
+ application, the changes will take effect after the
+ <guimenu>Utilities</guimenu> > <guisubmenu>Troubleshooting</guisubmenu>
+ > <guimenuitem>Reload Edit Modes</guimenuitem> command is invoked.</para>
+ <section id="xml-primer">
+ <title>An XML Primer</title>
+ <para>A very simple XML file (which also happens to be an edit mode)
+ looks like so:</para>
+ <programlisting><?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ </PROPS>
+
+ <RULES>
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ </RULES>
+</MODE></programlisting>
+ <para>Note that each opening tag must have a corresponding closing tag.
+ If there is nothing between the opening and closing tags, for example
+ <literal><TAG></TAG></literal>, the shorthand notation
+ <literal><TAG /></literal> may be used. An example of this
+ shorthand can be seen in the <literal><PROPERTY></literal> tags
+ above.</para>
+ <para>XML is case sensitive. <literal>Span</literal> or
+ <literal>span</literal> is not the same as
+ <literal>SPAN</literal>.</para>
+ <para>To insert a special character such as < or > literally in
+ XML (for example, inside an attribute value), you must write it as an
+ <firstterm>entity</firstterm>. An entity consists of the character's
+ symbolic name enclosed within <quote>&</quote> and <quote>;</quote>.
+ The most frequently used entities are:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal><</literal> - The less-than (<)
+ character</para>
+ </listitem>
+ <listitem>
+ <para><literal>></literal> - The greater-than (>)
+ character</para>
+ </listitem>
+ <listitem>
+ <para><literal>&</literal> - The ampersand (&)
+ character</para>
+ </listitem>
+ </itemizedlist>
+ <para>For example, the following will cause a syntax error:</para>
+ <programlisting><SEQ TYPE="OPERATOR">&</SEQ></programlisting>
+ <para>Instead, you must write:</para>
+ <programlisting><SEQ TYPE="OPERATOR">&</SEQ></programlisting>
+ <para>Now that the basics of XML have been covered, the rest of this
+ section will cover each construct in detail.</para>
+ </section>
+ <section id="mode-preamble">
+ <title>The Preamble and MODE tag</title>
+ <para>Each mode definition must begin with the following:</para>
+ <programlisting><?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd"></programlisting>
+ <para>Each mode definition must also contain exactly one
+ <literal>MODE</literal> tag. All other tags (<literal>PROPS</literal>,
+ <literal>RULES</literal>) must be placed inside the
+ <literal>MODE</literal> tag. The <literal>MODE</literal> tag does not
+ have any defined attributes. Here is an example:</para>
+ <programlisting><MODE>
+ <replaceable>... mode definition goes here ...</replaceable>
+</MODE></programlisting>
+ </section>
+ <section id="mode-tag-props">
+ <title>The PROPS Tag</title>
+ <para>The <literal>PROPS</literal> tag and the
+ <literal>PROPERTY</literal> tags inside it are used to define
+ mode-specific properties. Each <literal>PROPERTY</literal> tag must have
+ a <literal>NAME</literal> attribute set to the property's name, and a
+ <literal>VALUE</literal> attribute with the property's value.</para>
+ <para>All buffer-local properties listed in <xref
+ linkend="buffer-local" /> may be given values in edit modes.</para>
+ <para>The following mode properties specify commenting strings:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>commentEnd</literal> - the comment end string,
+ used by the <guimenuitem>Range Comment</guimenuitem>
+ command.</para>
+ </listitem>
+ <listitem>
+ <para><literal>commentStart</literal> - the comment start
+ string, used by the <guimenuitem>Range Comment</guimenuitem>
+ command.</para>
+ </listitem>
+ <listitem>
+ <para><literal>lineComment</literal> - the line comment string,
+ used by the <guimenuitem>Line Comment</guimenuitem>
+ command.</para>
+ </listitem>
+ </itemizedlist>
+ <para>When performing auto indent, a number of mode properties determine
+ the resulting indent level:</para>
+ <itemizedlist>
+ <listitem>
+ <para>The line and the one before it are scanned for brackets
+ listed in the <literal>indentCloseBrackets</literal> and
+ <literal>indentOpenBrackets</literal> properties. Opening
+ brackets in the previous line increase indent.</para>
+ <para>If <literal>lineUpClosingBracket</literal> is set to
+ <literal>true</literal>, then closing brackets on the current
+ line will line up with the line containing the matching opening
+ bracket. For example, in Java mode
+ <literal>lineUpClosingBracket</literal> is set to
+ <literal>true</literal>, resulting in brackets being indented
+ like so:</para>
+ <programlisting>{
+ // Code
+ {
+ // More code
+ }
+}</programlisting>
+ <para>If <literal>lineUpClosingBracket</literal> is set to
+ <literal>false</literal>, the line <emphasis>after</emphasis> a
+ closing bracket will be lined up with the line containing the
+ matching opening bracket. For example, in Lisp mode
+ <literal>lineUpClosingBracket</literal> is set to
+ <literal>false</literal>, resulting in brackets being indented
+ like so:</para>
+ <programlisting>(foo 'a-parameter
+ (crazy-p)
+ (bar baz ()))
+(print "hello world")</programlisting>
+ </listitem>
+ <listitem>
+ <para>If the previous line contains no opening brackets, or if
+ the <literal>doubleBracketIndent</literal> property is set to
+ <literal>true</literal>, the previous line is checked against
+ the regular expressions in the <literal>indentNextLine</literal>
+ and <literal>indentNextLines</literal> properties. If the
+ previous line matches the former, the indent of the current line
+ is increased and the subsequent line is shifted back again. If
+ the previous line matches the latter, the indent of the current
+ and subsequent lines is increased.</para>
+ <para>In Java mode, for example, the
+ <literal>indentNextLine</literal> property is set to match
+ control structures such as <quote>if</quote>,
+ <quote>else</quote>, <quote>while</quote>, and so on.</para>
+ <para>The <literal>doubleBracketIndent</literal> property, if
+ set to the default of <literal>false</literal>, results in code
+ indented like so:</para>
+ <programlisting>while(objects.hasNext())
+{
+ Object next = objects.hasNext();
+ if(next instanceof Paintable)
+ next.paint(g);
+}</programlisting>
+ <para>On the other hand, settings this property to
+ <quote>true</quote> will give the following result:</para>
+ <programlisting>while(objects.hasNext())
+ {
+ Object next = objects.hasNext();
+ if(next instanceof Paintable)
+ next.paint(g);
+ }</programlisting>
+ </listitem>
+ </itemizedlist>
+ <para>Here is the complete <literal><PROPS></literal> tag for Java
+ mode:</para>
+ <programlisting><PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^.*(default:\s*|case.*:.*)$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
+</PROPS></programlisting>
+ </section>
+ <section id="mode-tag-rules">
+ <title>The RULES Tag</title>
+ <para><literal>RULES</literal> tags must be placed inside the
+ <literal>MODE</literal> tag. Each <literal>RULES</literal> tag defines a
+ <firstterm>ruleset</firstterm>. A ruleset consists of a number of
+ <firstterm>parser rules</firstterm>, with each parser rule specifying
+ how to highlight a specific syntax token. There must be at least one
+ ruleset in each edit mode. There can also be more than one, with
+ different rulesets being used to highlight different parts of a buffer
+ (for example, in HTML mode, one rule set highlights HTML tags, and
+ another highlights inline JavaScript). For information about using more
+ than one ruleset, see <xref linkend="mode-rule-span" />.</para>
+ <para>The <literal>RULES</literal> tag supports the following
+ attributes, all of which are optional:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>SET</literal> - the name of this ruleset. All
+ rulesets other than the first must have a name.</para>
+ </listitem>
+ <listitem>
+ <para><literal>IGNORE_CASE</literal> - if set to
+ <literal>FALSE</literal>, matches will be case sensitive.
+ Otherwise, case will not matter. Default is
+ <literal>TRUE</literal>.</para>
+ </listitem>
+ <listitem>
+ <para><literal>ESCAPE</literal> - specifies a character sequence
+ for escaping literals. The first character following the escape
+ sequence is not considered as input for syntax highlighting,
+ thus being highlighted with default token for the rule set.
+ </para>
+ </listitem>
+ <listitem>
+ <para><literal>NO_WORD_SEP</literal> - any non-alphanumeric
+ character <emphasis>not</emphasis> in this list is treated as a
+ word separator for the purposes of syntax highlighting.</para>
+ </listitem>
+ <listitem>
+ <para><literal>DEFAULT</literal> - the token type for text which
+ doesn't match any specific rule. Default is
+ <literal>NULL</literal>. See <xref
+ linkend="mode-syntax-tokens" /> for a list of token
+ types.</para>
+ </listitem>
+ <listitem>
+ <para><literal>HIGHLIGHT_DIGITS</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>DIGIT_RE</literal> - see below for information
+ about these two attributes.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Here is an example <literal>RULES</literal> tag:</para>
+ <programlisting><RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <replaceable>... parser rules go here ...</replaceable>
+</RULES></programlisting>
+ <section>
+ <title>Highlighting Numbers</title>
+ <para>If the <literal>HIGHLIGHT_DIGITS</literal> attribute is set to
+ <literal>TRUE</literal>, jEdit will attempt to highlight numbers in
+ this ruleset.</para>
+ <para>Any word consisting entirely of digits (0-9) will be
+ highlighted with the <literal>DIGIT</literal> token type. A word
+ that contains other letters in addition to digits will be
+ highlighted with the <literal>DIGIT</literal> token type only if it
+ matches the regular expression specified in the
+ <literal>DIGIT_RE</literal> attribute. If this attribute is not
+ specified, it will not be highlighted.</para>
+ <para>Here is an example <literal>DIGIT_RE</literal> regular
+ expression that highlights Java-style numeric literals (normal
+ numbers, hexadecimals prefixed with <literal>0x</literal>, numbers
+ suffixed with various type indicators, and floating point literals
+ containing an exponent):</para>
+ <programlisting>DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))"</programlisting>
+ <para>Regular expression syntax is described in <xref
+ linkend="regexps" />.</para>
+ </section>
+ <section id="rule-ordering">
+ <title>Rule Ordering Requirements</title>
+ <para>You might encounter this very common pitfall when writing your
+ own modes.</para>
+ <para>Since jEdit checks buffer text against parser rules in the
+ order they appear in the ruleset, more specific rules must be placed
+ before generalized ones, otherwise the generalized rules will catch
+ everything.</para>
+ <para>This is best demonstrated with an example. The following is
+ incorrect rule ordering:</para>
+ <programlisting><SPAN TYPE="MARKUP">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+</SPAN>
+
+<SPAN TYPE="KEYWORD1">
+ <BEGIN>[!</BEGIN>
+ <END>]</END>
+</SPAN></programlisting>
+ <para>If you write the above in a rule set, any occurrence of
+ <quote>[</quote> (even things like <quote>[!DEFINE</quote>, etc)
+ will be highlighted using the first rule, because it will be the
+ first to match. This is most likely not the intended
+ behavior.</para>
+ <para>The problem can be solved by placing the more specific rule
+ before the general one:</para>
+ <programlisting><SPAN TYPE="KEYWORD1">
+ <BEGIN>[!</BEGIN>
+ <END>]</END>
+</SPAN>
+
+<SPAN TYPE="MARKUP">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+</SPAN></programlisting>
+ <para>Now, if the buffer contains the text
+ <quote>[!SPECIAL]</quote>, the rules will be checked in order, and
+ the first rule will be the first to match. However, if you write
+ <quote>[FOO]</quote>, it will be highlighted using the second rule,
+ which is exactly what you would expect.</para>
+ </section>
+ <section>
+ <title>Per-Ruleset Properties</title>
+ <para>The <literal>PROPS</literal> tag (described in <xref
+ linkend="mode-tag-props" />) can also be placed inside the
+ <literal>RULES</literal> tag to define ruleset-specific properties.
+ The following properties can be set on a per-ruleset basis:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>commentEnd</literal> - the comment end
+ string.</para>
+ </listitem>
+ <listitem>
+ <para><literal>commentStart</literal> - the comment start
+ string.</para>
+ </listitem>
+ <listitem>
+ <para><literal>lineComment</literal> - the line comment
+ string.</para>
+ </listitem>
+ </itemizedlist>
+ <para>This allows different parts of a file to have different
+ comment strings (in the case of HTML, for example, in HTML text and
+ inline JavaScript). For information about the commenting commands,
+ see <xref linkend="commenting" />.</para>
+ </section>
+ </section>
+ <section id="mode-rule-terminate">
+ <title>The TERMINATE Tag</title>
+ <para>The <literal>TERMINATE</literal> rule, which must be placed inside
+ a <literal>RULES</literal> tag, specifies that parsing should stop after
+ the specified number of characters have been read from a line. The
+ number of characters to terminate after should be specified with the
+ <literal>AT_CHAR</literal> attribute. Here is an example:</para>
+ <programlisting><TERMINATE AT_CHAR="1" /></programlisting>
+ <para>This rule is used in Patch mode, for example, because only the
+ first character of each line affects highlighting.</para>
+ </section>
+ <section id="mode-rule-span">
+ <title>The SPAN Tag</title>
+ <para>The <literal>SPAN</literal> rule, which must be placed inside a
+ <literal>RULES</literal> tag, highlights text between a start and end
+ string. The start and end strings are specified inside child elements of
+ the <literal>SPAN</literal> tag. The following attributes are
+ supported:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>TYPE</literal> - The token type to highlight the
+ span with. See <xref linkend="mode-syntax-tokens" /> for a list
+ of token types.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_LINE_START</literal> - If set to
+ <literal>TRUE</literal>, the span will only be highlighted if
+ the start sequence occurs at the beginning of a line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WHITESPACE_END</literal> - If set to
+ <literal>TRUE</literal>, the span will only be highlighted if
+ the start sequence is the first non-whitespace text in the
+ line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WORD_START</literal> - If set to
+ <literal>TRUE</literal>, the span will only be highlighted if
+ the start sequence occurs at the beginning of a word.</para>
+ </listitem>
+ <listitem>
+ <para><literal>DELEGATE</literal> - text inside the span will be
+ highlighted with the specified ruleset. To delegate to a ruleset
+ defined in the current mode, just specify its name. To delegate
+ to a ruleset defined in another mode, specify a name of the form
+ <literal><replaceable>mode</replaceable>::<replaceable>ruleset</replaceable></literal>.
+ Note that the first (unnamed) ruleset in a mode is called
+ <quote>MAIN</quote>.</para>
+ </listitem>
+ <listitem>
+ <para><literal>MATCH_TYPE</literal> - Controls how the start and
+ end of the sequence will be highlighted. See <xref
+ linkend="mode-match-type" /> for more information.</para>
+ </listitem>
+ <listitem>
+ <para><literal>ESCAPE</literal> - specifies a character sequence
+ for escaping characters. The first character following the escape
+ sequence is not considered as input for syntax highlighting,
+ thus being highlighted with rule's token.
+ </para>
+ </listitem>
+ <listitem>
+ <para><literal>NO_LINE_BREAK</literal> - If set to
+ <literal>TRUE</literal>, the span will not cross line
+ breaks.</para>
+ </listitem>
+ <listitem>
+ <para><literal>NO_WORD_BREAK</literal> - If set to
+ <literal>TRUE</literal>, the span will not cross word
+ breaks.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Note that the <literal>AT_LINE_START</literal>,
+ <literal>AT_WHITESPACE_END</literal> and
+ <literal>AT_WORD_START</literal> attributes can also be used on the
+ <literal>BEGIN</literal> and <literal>END</literal> elements. Setting
+ these attributes to the same value on both elements has the same effect
+ as setting them on the <literal>SPAN</literal> element.</para>
+ <para>Here is a <literal>SPAN</literal> that highlights Java string
+ literals, which cannot include line breaks:</para>
+ <programlisting><SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+</SPAN></programlisting>
+ <para>Here is a <literal>SPAN</literal> that highlights Java
+ documentation comments by delegating to the <quote>JAVADOC</quote>
+ ruleset defined elsewhere in the current mode:</para>
+ <programlisting><SPAN TYPE="COMMENT2" DELEGATE="JAVADOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+</SPAN></programlisting>
+ <para>Here is a <literal>SPAN</literal> that highlights HTML cascading
+ stylesheets inside <literal><STYLE></literal> tags by delegating
+ to the main ruleset in the CSS edit mode:</para>
+ <programlisting><SPAN TYPE="MARKUP" DELEGATE="css::MAIN">
+ <BEGIN><style></BEGIN>
+ <END></style></END>
+</SPAN></programlisting>
+ </section>
+ <section id="mode-rule-span-regexp">
+ <title>The SPAN_REGEXP Tag</title>
+ <para>The <literal>SPAN_REGEXP</literal> rule is similar to the
+ <literal>SPAN</literal> rule except the start sequence is taken to be a
+ regular expression. In addition to the attributes supported by the
+ <literal>SPAN</literal> tag, the following attributes are
+ supported:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>HASH_CHAR</literal> - a literal string which must
+ be at the start of a regular expression.</para>
+ </listitem>
+ <listitem>
+ <para><literal>HASH_CHARS</literal> - a list of possible literal
+ characters, one of which must match at the start of the regular
+ expression.</para>
+ </listitem>
+ </itemizedlist>
+ <para><literal>HASH_CHAR</literal> and <literal>HASH_CHARS</literal>
+ attributes are both optional, but you may only specify one, not both. If
+ both are specified, <literal>HASH_CHARS</literal> is ignored and an
+ error is shown. Whenever possible, use a literal prefix to specify a
+ <literal>SPAN_REGEXP</literal>. If the starting prefix is always the
+ same, use <literal>HASH_CHAR</literal> and provide as much prefix as
+ possible. Only in rare cases would you omit both attributes, such as the
+ case where there is no other reliable way to get the highlighting you
+ need, for example, with comments in the Cobol programming
+ language.</para>
+ <para>The regular expression match cannot span more than one line. Any
+ text matched by groups in the <literal>BEGIN</literal> regular
+ expression is substituted in the <literal>END</literal> string. See
+ below for an example of where this is useful.</para>
+ <para>Regular expression syntax is described in <xref
+ linkend="regexps" />.</para>
+ <para>Here is a <literal>SPAN_REGEXP</literal> rule that highlights
+ <quote>read-ins</quote> in shell scripts:</para>
+ <programlisting><SPAN_REGEXP HASH_CHAR="<" TYPE="LITERAL1" DELEGATE="LITERAL">
+ <BEGIN><![CDATA[<<[\p{Space}'"]*([\p{Alnum}_]+)[\p{Space}'"]*]]></BEGIN>
+ <END>$1</END>
+</SPAN_REGEXP></programlisting>
+ <para>Here is a <literal>SPAN_REGEXP</literal> rule that highlights
+ constructs placed between <literal><#ftl</literal> and
+ <literal>></literal>, as long as the <literal><#ftl</literal> is
+ followed by a word break:</para>
+ <programlisting><SPAN_REGEXP TYPE="KEYWORD1" HASH_CHAR="<" DELEGATE="EXPRESSION">
+ <BEGIN><#ftl\b</BEGIN>
+ <END>></END>
+</SPAN_REGEXP></programlisting>
+ </section>
+ <section id="mode-rule-eol-span">
+ <title>The EOL_SPAN Tag</title>
+ <para>An <literal>EOL_SPAN</literal> is similar to a
+ <literal>SPAN</literal> except that highlighting stops at the end of the
+ line, and no end sequence needs to be specified. The text to match is
+ specified between the opening and closing <literal>EOL_SPAN</literal>
+ tags. The following attributes are supported:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>TYPE</literal> - The token type to highlight the
+ span with. See <xref linkend="mode-syntax-tokens" /> for a list
+ of token types.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_LINE_START</literal> - If set to
+ <literal>TRUE</literal>, the span will only be highlighted if
+ the start sequence occurs at the beginning of a line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WHITESPACE_END</literal> - If set to
+ <literal>TRUE</literal>, the span will only be highlighted if
+ the sequence is the first non-whitespace text in the
+ line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WORD_START</literal> - If set to
+ <literal>TRUE</literal>, the span will only be highlighted if
+ the start sequence occurs at the beginning of a word.</para>
+ </listitem>
+ <listitem>
+ <para><literal>DELEGATE</literal> - text inside the span will be
+ highlighted with the specified ruleset. To delegate to a ruleset
+ defined in the current mode, just specify its name. To delegate
+ to a ruleset defined in another mode, specify a name of the form
+ <literal><replaceable>mode</replaceable>::<replaceable>ruleset</replaceable></literal>.
+ Note that the first (unnamed) ruleset in a mode is called
+ <quote>MAIN</quote>.</para>
+ </listitem>
+ <listitem>
+ <para><literal>MATCH_TYPE</literal> - Controls how the start of
+ the sequence will be highlighted. See <xref
+ linkend="mode-match-type" /> for more information.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Here is an <literal>EOL_SPAN</literal> that highlights C++
+ comments:</para>
+ <programlisting><EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN></programlisting>
+ </section>
+ <section id="mode-rule-eol-span-regexp">
+ <title>The EOL_SPAN_REGEXP Tag</title>
+ <para>The <literal>EOL_SPAN_REGEXP</literal> rule is similar to the
+ <literal>EOL_SPAN</literal> rule except the match sequence is taken to
+ be a regular expression. In addition to the attributes supported by the
+ <literal>EOL_SPAN</literal> tag, the following attributes are
+ supported:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>HASH_CHAR</literal> - a literal string which must
+ be at the start of a regular expression.</para>
+ </listitem>
+ <listitem>
+ <para><literal>HASH_CHARS</literal> - a list of possible literal
+ characters, one of which must match at the start of the regular
+ expression.</para>
+ </listitem>
+ </itemizedlist>
+ <para><literal>HASH_CHAR</literal> and <literal>HASH_CHARS</literal>
+ attributes are both optional, but you may only specify one, not both. If
+ both are specified, <literal>HASH_CHARS</literal> is ignored and an
+ error is shown. Whenever possible, use a literal prefix to specify a
+ <literal>EOL_SPAN_REGEXP</literal>. If the starting prefix is always the
+ same, use <literal>HASH_CHAR</literal> and provide as much prefix as
+ possible. Only in rare cases would you omit both attributes, such as the
+ case where there is no other reliable way to get the highlighting you
+ need, for example, with comments in the Cobol programming
+ language.</para>
+ <para>The regular expression match cannot span more than one
+ line.</para>
+ <para>Regular expression syntax is described in <xref
+ linkend="regexps" />.</para>
+ <para>Here is an <literal>EOL_SPAN_REGEXP</literal> that highlights
+ MS-DOS batch file comments, which start with <literal>REM</literal>,
+ followed by any whitespace character, and extend until the end of the
+ line:</para>
+ <programlisting><EOL_SPAN_REGEXP AT_WHITESPACE_END="TRUE" HASH_CHAR="REM" TYPE="COMMENT1">REM\s</EOL_SPAN_REGEXP></programlisting>
+ </section>
+ <section id="mode-rule-mark-prev">
+ <title>The MARK_PREVIOUS Tag</title>
+ <para>The <literal>MARK_PREVIOUS</literal> rule, which must be placed
+ inside a <literal>RULES</literal> tag, highlights from the end of the
+ previous syntax token to the matched text. The text to match is
+ specified between opening and closing <literal>MARK_PREVIOUS</literal>
+ tags. The following attributes are supported:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>TYPE</literal> - The token type to highlight the
+ text with. See <xref linkend="mode-syntax-tokens" /> for a list
+ of token types.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_LINE_START</literal> - If set to
+ <literal>TRUE</literal>, the sequence will only be highlighted
+ if it occurs at the beginning of a line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WHITESPACE_END</literal> - If set to
+ <literal>TRUE</literal>, the sequence will only be highlighted
+ if it is the first non-whitespace text in the line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WORD_START</literal> - If set to
+ <literal>TRUE</literal>, the sequence will only be highlighted
+ if it occurs at the beginning of a word.</para>
+ </listitem>
+ <listitem>
+ <para><literal>MATCH_TYPE</literal> - Controls how the matched
+ region will be highlighted. See <xref
+ linkend="mode-match-type" /> for more information.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Here is a rule that highlights labels in Java mode (for example,
+ <quote>XXX:</quote>):</para>
+ <programlisting><MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
+ MATCH_TYPE="DEFAULT">:</MARK_PREVIOUS></programlisting>
+ </section>
+ <section id="mode-rule-mark-following">
+ <title>The MARK_FOLLOWING Tag</title>
+ <para>The <literal>MARK_FOLLOWING</literal> rule, which must be placed
+ inside a <literal>RULES</literal> tag, highlights from the start of the
+ match to the next syntax token. The text to match is specified between
+ opening and closing <literal>MARK_FOLLOWING</literal> tags. The
+ following attributes are supported:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>TYPE</literal> - The token type to highlight the
+ text with. See <xref linkend="mode-syntax-tokens" /> for a list
+ of token types.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_LINE_START</literal> - If set to
+ <literal>TRUE</literal>, the sequence will only be highlighted
+ if it occurs at the beginning of a line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WHITESPACE_END</literal> - If set to
+ <literal>TRUE</literal>, the sequence will only be highlighted
+ if it is the first non-whitespace text in the line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WORD_START</literal> - If set to
+ <literal>TRUE</literal>, the sequence will only be highlighted
+ if it occurs at the beginning of a word.</para>
+ </listitem>
+ <listitem>
+ <para><literal>MATCH_TYPE</literal> - Controls how the matched
+ region will be highlighted. See <xref
+ linkend="mode-match-type" /> for more information.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Here is a rule that highlights variables in Unix shell scripts
+ (<quote>$CLASSPATH</quote>, <quote>$IFS</quote>, etc):</para>
+ <programlisting><MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING></programlisting>
+ </section>
+ <section id="mode-rule-seq">
+ <title>The SEQ Tag</title>
+ <para>The <literal>SEQ</literal> rule, which must be placed inside a
+ <literal>RULES</literal> tag, highlights fixed sequences of text. The
+ text to highlight is specified between opening and closing
+ <literal>SEQ</literal> tags. The following attributes are
+ supported:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>TYPE</literal> - the token type to highlight the
+ sequence with. See <xref linkend="mode-syntax-tokens" /> for a
+ list of token types.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_LINE_START</literal> - If set to
+ <literal>TRUE</literal>, the sequence will only be highlighted
+ if it occurs at the beginning of a line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WHITESPACE_END</literal> - If set to
+ <literal>TRUE</literal>, the sequence will only be highlighted
+ if it is the first non-whitespace text in the line.</para>
+ </listitem>
+ <listitem>
+ <para><literal>AT_WORD_START</literal> - If set to
+ <literal>TRUE</literal>, the sequence will only be highlighted
+ if it occurs at the beginning of a word.</para>
+ </listitem>
+ <listitem>
+ <para><literal>DELEGATE</literal> - if this attribute is
+ specified, all text after the sequence will be highlighted using
+ this ruleset. To delegate to a ruleset defined in the current
+ mode, just specify its name. To delegate to a ruleset defined in
+ another mode, specify a name of the form
+ <literal><replaceable>mode</replaceable>::<replaceable>ruleset</replaceable></literal>.
+ Note that the first (unnamed) ruleset in a mode is called
+ <quote>MAIN</quote>.</para>
+ </listitem>
+ </itemizedlist>
+ <para>The following rules highlight a few Java operators:</para>
+ <programlisting><SEQ TYPE="OPERATOR">+</SEQ>
+<SEQ TYPE="OPERATOR">-</SEQ>
+<SEQ TYPE="OPERATOR">*</SEQ>
+<SEQ TYPE="OPERATOR">/</SEQ></programlisting>
+ </section>
+ <section id="mode-rule-seq-regexp">
+ <title>The SEQ_REGEXP Tag</title>
+ <para>The <literal>SEQ_REGEXP</literal> rule is similar to the
+ <literal>SEQ</literal> rule except the match sequence is taken to be a
+ regular expression. In addition to the attributes supported by the
+ <literal>SEQ</literal> tag, the following attributes are
+ supported:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>HASH_CHAR</literal> - a literal string which must
+ be at the start of a regular expression.</para>
+ </listitem>
+ <listitem>
+ <para><literal>HASH_CHARS</literal> - a list of possible literal
+ characters, one of which must match at the start of the regular
+ expression.</para>
+ </listitem>
+ </itemizedlist>
+ <para><literal>HASH_CHAR</literal> and <literal>HASH_CHARS</literal>
+ attributes are both optional, but you may only specify one, not both. If
+ both are specified, <literal>HASH_CHARS</literal> is ignored and an
+ error is shown. Whenever possible, use a literal prefix to specify a
+ <literal>SEQ_REGEXP</literal>. If the starting prefix is always the
+ same, use <literal>HASH_CHAR</literal> and provide as much prefix as
+ possible. Only in rare cases would you omit both attributes, such as the
+ case where there is no other reliable way to get the highlighting you
+ need, for example, with comments in the Cobol programming
+ language.</para>
+ <para>The regular expression match cannot span more than one
+ line.</para>
+ <para>Regular expression syntax is described in <xref
+ linkend="regexps" />.</para>
+ <para><emphasis role="bold">NOTE</emphasis>: c-style character escaping
+ for literals (such as the tab char: \t) do not work as attribute values
+ in XML. Use the XML character entity instead. For example: 	
+ instead of \t.</para>
+ <para>Here is a <literal>SEQ_REGEXP</literal> rule from moin.xml that
+ uses the <literal>HASH_CHARS</literal> attribute, to describe a keyword
+ (wikiword) that can start with any uppercase letter and contain lower
+ case letters and at least one uppercase letter in the middle.</para>
+ <programlisting>
+ <SEQ_REGEXP HASH_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZ" AT_WORD_START="TRUE" TYPE="KEYWORD2">[A-Z][a-z]+[A-Z][a-zA-Z]+</SEQ_REGEXP>
+ </programlisting>
+ </section>
+ <section id="mode-rule-import">
+ <title>The IMPORT Tag</title>
+ <para>The <literal>IMPORT</literal> tag, which must be placed inside a
+ <literal>RULES</literal> tag, loads all rules defined in a given ruleset
+ into the current ruleset; in other words, it has the same effect as
+ copying and pasting the imported ruleset.</para>
+ <para>The only required attribute <literal>DELEGATE</literal> must be
+ set to the name of a ruleset. To import a ruleset defined in the current
+ mode, just specify its name. To import a ruleset defined in another
+ mode, specify a name of the form
+ <literal><replaceable>mode</replaceable>::<replaceable>ruleset</replaceable></literal>.
+ Note that the first (unnamed) ruleset in a mode is called
+ <quote>MAIN</quote>.</para>
+ <para>One quirk is that the definition of the imported ruleset is not
+ copied to the location of the <literal>IMPORT</literal> tag, but rather
+ to the end of the containing ruleset. This has implications with
+ rule-ordering; see <xref linkend="rule-ordering" />.</para>
+ <para>Here is an example from the PHP mode, which extends the inline
+ JavaScript highlighting to support embedded PHP:</para>
+ <programlisting>
+ <RULES SET="JAVASCRIPT+PHP">
+
+ <SPAN TYPE="MARKUP" DELEGATE="php::PHP">
+ <BEGIN><?php</BEGIN>
+ <END>?></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="php::PHP">
+ <BEGIN><?</BEGIN>
+ <END>?></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="php::PHP">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <IMPORT DELEGATE="javascript::MAIN"/>
+</RULES></programlisting>
+ </section>
+ <section id="mode-rule-keywords">
+ <title>The KEYWORDS Tag</title>
+ <para>The <literal>KEYWORDS</literal> tag, which must be placed inside a
+ <literal>RULES</literal> tag and can only appear once, specifies a list
+ of keywords to highlight. Keywords are similar to
+ <literal>SEQ</literal>s, except that <literal>SEQ</literal>s match
+ anywhere in the text, whereas keywords only match whole words. Words are
+ considered to be runs of text separated by non-alphanumeric
+ characters.</para>
+ <para>The <literal>KEYWORDS</literal> tag does not define any
+ attributes.</para>
+ <para>Each child element of the <literal>KEYWORDS</literal> tag is an
+ element whose name is a token type, and whose content is the keyword to
+ highlight. For example, the following rule highlights the most common
+ Java keywords:</para>
+ <programlisting><KEYWORDS>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>void</KEYWORD3>
+</KEYWORDS></programlisting>
+ </section>
+ <section id="mode-syntax-tokens">
+ <title>Token Types</title>
+ <para>Parser rules can highlight tokens using any of the following token
+ types:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>NULL</literal> - no special highlighting is
+ performed on tokens of type <literal>NULL</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>COMMENT1</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>COMMENT2</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>COMMENT3</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>COMMENT4</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>FUNCTION</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>DIGIT</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>INVALID</literal><!-- - tokens of this type are
+ automatically added if a <literal>NO_WORD_BREAK</literal> or
+ <literal>NO_LINE_BREAK</literal> <literal>SPAN</literal> spans more than
+ one word or line, respectively. --></para>
+ </listitem>
+ <listitem>
+ <para><literal>KEYWORD1</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>KEYWORD2</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>KEYWORD3</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>KEYWORD4</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>LABEL</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>LITERAL1</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>LITERAL2</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>LITERAL3</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>LITERAL4</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>MARKUP</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>OPERATOR</literal></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="mode-match-type">
+ <title>The MATCH_TYPE Attribute</title>
+ <para>The <literal>MATCH_TYPE</literal> attribute is used by some of the
+ rules to control how the region matched by the rule will be
+ highlighted.</para>
+ <para>For example, when using a <literal>MARK_PREVIOUS</literal> rule to
+ highlight a function call of the form <literal>fcall()</literal>, the
+ following rule could be used:</para>
+ <programlisting>
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS></programlisting>
+ <para>This would cause <literal>fcall</literal> to be highlighted as
+ <literal>FUNCTION</literal>, and <literal>(</literal> to be highlighted
+ as <literal>OPERATOR</literal>. In this case, to maintain bracket
+ matching working, a <literal>SEQ</literal> rule would have to be added
+ to match <literal>)</literal> and mark it as
+ <literal>OPERATOR</literal>.</para>
+ <para>The <literal>MATCH_TYPE</literal> attribute value can be any of
+ the valid token types, or the following special values:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>RULE</literal>: this is the default value. It
+ tells the syntax system to use the same token type as the TYPE
+ attribute of the rule. This is equivalent to
+ <literal>EXCLUDE_MATCH="FALSE"</literal> in 4.2 and earlier mode
+ files.</para>
+ </listitem>
+ <listitem>
+ <para><literal>CONTEXT</literal>: using this value tells the
+ syntax system to mark the matched region using the default token
+ type for the current rule set. In 4.2 and earlier mode files,
+ this was specified by
+ <literal>EXCLUDE_MATCH="TRUE"</literal>.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
</chapter>
\ No newline at end of file
diff --git a/jEdit/doc/welcome.html b/jEdit/doc/welcome.html
index 78100e1..1abe7a2 100644
--- a/jEdit/doc/welcome.html
+++ b/jEdit/doc/welcome.html
@@ -1,29 +1,29 @@
-<html>
-<head><title>Welcome to jEdit</title></head>
-<body>
-
-<center>
-<img src="jedit.png" width="128" height="128">
-<h2>Welcome to jEdit 4.3</h2>
-</center>
-<p> Useful menu commands: </p>
-<ul>
-<li>To customize jEdit: <b>Utilities</b>><b>Global Options</b> (be sure to check out the Shortcuts pane!)</li>
-<li>To install plugins: <b>Plugins</b>><b>Plugin Manager</b></li>
-<li>To customize plugins: <b>Plugins</b>><b>Plugin Options</b></li>
-<li>To open this window: <b>Help</b>><b>jEdit Help</b></li>
-</ul>
-
-<p>jEdit is free software, and you are welcome to redistribute and modify it
-under certain conditions. See the license section of the
-<a href="README.txt">read me file</a> for details.</p>
-
-<p>If you think you have found a bug, please consult the
-<a href="FAQ/index.html">Frequently Asked Questions</a> document first.</p>
-
-<p>To give feedback, subscribe to mailing lists or find out
-about the latest developments in the world of jEdit, visit
-<font color=blue>www.jedit.org</font>.</p>
-
-</body>
-</html>
+<html>
+<head><title>Welcome to jEdit</title></head>
+<body>
+
+<center>
+<img src="jedit.png" width="128" height="128">
+<h2>Welcome to jEdit 4.4</h2>
+</center>
+<p> Useful menu commands: </p>
+<ul>
+<li>To customize jEdit: <b>Utilities</b>><b>Global Options</b> (be sure to check out the Shortcuts pane!)</li>
+<li>To install plugins: <b>Plugins</b>><b>Plugin Manager</b></li>
+<li>To customize plugins: <b>Plugins</b>><b>Plugin Options</b></li>
+<li>To open this window: <b>Help</b>><b>jEdit Help</b></li>
+</ul>
+
+<p>jEdit is free software, and you are welcome to redistribute and modify it
+under certain conditions. See the license section of the
+<a href="README.txt">read me file</a> for details.</p>
+
+<p>If you think you have found a bug, please consult the
+<a href="FAQ/index.html">Frequently Asked Questions</a> document first.</p>
+
+<p>To give feedback, subscribe to mailing lists or find out
+about the latest developments in the world of jEdit, visit
+<font color=blue>www.jedit.org</font>.</p>
+
+</body>
+</html>
diff --git a/jEdit/doclet/GenerateTocXML.java b/jEdit/doclet/GenerateTocXML.java
index d4eae22..33f5c58 100644
--- a/jEdit/doclet/GenerateTocXML.java
+++ b/jEdit/doclet/GenerateTocXML.java
@@ -1,116 +1,116 @@
-/*
- * GenerateTocXML.java
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package doclet;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.standard.Standard;
-
-import java.io.*;
-import java.util.Arrays;
-
-public class GenerateTocXML
-{
- public static final String OUT = "toc.xml";
- public static final String HEADER = "<?xml version='1.0'?>\n<TOC>\n"
- + "<ENTRY HREF='overview-summary.html'><TITLE>jEdit API Reference</TITLE>";
- public static final String FOOTER = "</ENTRY></TOC>\n";
-
- public static boolean start(RootDoc root)
- {
- if (!Standard.start(root))
- {
- return false;
- }
- try
- {
- FileWriter out = new FileWriter(Standard.htmlDoclet.configuration().destDirName + OUT);
- out.write(HEADER);
-
- PackageDoc[] packages = root.specifiedPackages();
- for(int i = 0; i < packages.length; ++i)
- {
- processPackage(out,packages[i]);
- }
-
- out.write(FOOTER);
- out.close();
-
- return true;
- }
- catch(IOException e)
- {
- e.printStackTrace();
- return false;
- }
- }
-
- public static int optionLength(String option)
- {
- return Standard.optionLength(option);
- }
-
- public static boolean validOptions(String[][] options, DocErrorReporter reporter)
- {
- return Standard.validOptions(options,reporter);
- }
-
- public static LanguageVersion languageVersion()
- {
- return Standard.languageVersion();
- }
-
- private static void processPackage(Writer out, PackageDoc pkg)
- throws IOException
- {
- out.write("<ENTRY HREF='");
- String pkgPath = pkg.name().replace('.','/') + "/";
- out.write(pkgPath);
- out.write("package-summary.html'><TITLE>");
- out.write(pkg.name());
- out.write("</TITLE>\n");
-
- ClassDoc[] classes = pkg.allClasses();
- String[] classNames = new String[classes.length];
- for(int i = 0; i < classes.length; i++)
- {
- classNames[i] = classes[i].name();
- }
- Arrays.sort(classNames);
-
- for(int i = 0; i < classes.length; i++)
- {
- processClass(out,pkgPath,classNames[i]);
- }
-
- out.write("</ENTRY>");
- }
-
- private static void processClass(Writer out, String pkgPath, String clazz)
- throws IOException
- {
- out.write("<ENTRY HREF='");
- out.write(pkgPath);
- out.write(clazz);
- out.write(".html'><TITLE>");
- out.write(clazz);
- out.write("</TITLE>\n");
- out.write("</ENTRY>");
- }
-}
+/*
+ * GenerateTocXML.java
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package doclet;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.standard.Standard;
+
+import java.io.*;
+import java.util.Arrays;
+
+public class GenerateTocXML
+{
+ public static final String OUT = "toc.xml";
+ public static final String HEADER = "<?xml version='1.0'?>\n<TOC>\n"
+ + "<ENTRY HREF='overview-summary.html'><TITLE>jEdit API Reference</TITLE>";
+ public static final String FOOTER = "</ENTRY></TOC>\n";
+
+ public static boolean start(RootDoc root)
+ {
+ if (!Standard.start(root))
+ {
+ return false;
+ }
+ try
+ {
+ FileWriter out = new FileWriter(Standard.htmlDoclet.configuration().destDirName + OUT);
+ out.write(HEADER);
+
+ PackageDoc[] packages = root.specifiedPackages();
+ for(int i = 0; i < packages.length; ++i)
+ {
+ processPackage(out,packages[i]);
+ }
+
+ out.write(FOOTER);
+ out.close();
+
+ return true;
+ }
+ catch(IOException e)
+ {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ public static int optionLength(String option)
+ {
+ return Standard.optionLength(option);
+ }
+
+ public static boolean validOptions(String[][] options, DocErrorReporter reporter)
+ {
+ return Standard.validOptions(options,reporter);
+ }
+
+ public static LanguageVersion languageVersion()
+ {
+ return Standard.languageVersion();
+ }
+
+ private static void processPackage(Writer out, PackageDoc pkg)
+ throws IOException
+ {
+ out.write("<ENTRY HREF='");
+ String pkgPath = pkg.name().replace('.','/') + "/";
+ out.write(pkgPath);
+ out.write("package-summary.html'><TITLE>");
+ out.write(pkg.name());
+ out.write("</TITLE>\n");
+
+ ClassDoc[] classes = pkg.allClasses();
+ String[] classNames = new String[classes.length];
+ for(int i = 0; i < classes.length; i++)
+ {
+ classNames[i] = classes[i].name();
+ }
+ Arrays.sort(classNames);
+
+ for(int i = 0; i < classes.length; i++)
+ {
+ processClass(out,pkgPath,classNames[i]);
+ }
+
+ out.write("</ENTRY>");
+ }
+
+ private static void processClass(Writer out, String pkgPath, String clazz)
+ throws IOException
+ {
+ out.write("<ENTRY HREF='");
+ out.write(pkgPath);
+ out.write(clazz);
+ out.write(".html'><TITLE>");
+ out.write(clazz);
+ out.write("</TITLE>\n");
+ out.write("</ENTRY>");
+ }
+}
diff --git a/jEdit/installer/BZip2Constants.java b/jEdit/installer/BZip2Constants.java
index 2b53f55..7836c67 100644
--- a/jEdit/installer/BZip2Constants.java
+++ b/jEdit/installer/BZip2Constants.java
@@ -1,84 +1,84 @@
-/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
-package installer;
-
-/**
- * Base class for both the compress and decompress classes. Holds common arrays,
- * and static data.
- *
- * @author <a href="mailto:keiron at aftexsw.com">Keiron Liddle</a>
- */
-interface BZip2Constants
-{
- int BASE_BLOCK_SIZE = 100000;
- int MAX_ALPHA_SIZE = 258;
- int MAX_CODE_LEN = 23;
- int RUNA = 0;
- int RUNB = 1;
- int N_GROUPS = 6;
- int G_SIZE = 50;
- int N_ITERS = 4;
- int MAX_SELECTORS = ( 2 + ( 900000 / G_SIZE ) );
- int NUM_OVERSHOOT_BYTES = 20;
-
- int[] RAND_NUMS = new int[]
- {
- 619, 720, 127, 481, 931, 816, 813, 233, 566, 247,
- 985, 724, 205, 454, 863, 491, 741, 242, 949, 214,
- 733, 859, 335, 708, 621, 574, 73, 654, 730, 472,
- 419, 436, 278, 496, 867, 210, 399, 680, 480, 51,
- 878, 465, 811, 169, 869, 675, 611, 697, 867, 561,
- 862, 687, 507, 283, 482, 129, 807, 591, 733, 623,
- 150, 238, 59, 379, 684, 877, 625, 169, 643, 105,
- 170, 607, 520, 932, 727, 476, 693, 425, 174, 647,
- 73, 122, 335, 530, 442, 853, 695, 249, 445, 515,
- 909, 545, 703, 919, 874, 474, 882, 500, 594, 612,
- 641, 801, 220, 162, 819, 984, 589, 513, 495, 799,
- 161, 604, 958, 533, 221, 400, 386, 867, 600, 782,
- 382, 596, 414, 171, 516, 375, 682, 485, 911, 276,
- 98, 553, 163, 354, 666, 933, 424, 341, 533, 870,
- 227, 730, 475, 186, 263, 647, 537, 686, 600, 224,
- 469, 68, 770, 919, 190, 373, 294, 822, 808, 206,
- 184, 943, 795, 384, 383, 461, 404, 758, 839, 887,
- 715, 67, 618, 276, 204, 918, 873, 777, 604, 560,
- 951, 160, 578, 722, 79, 804, 96, 409, 713, 940,
- 652, 934, 970, 447, 318, 353, 859, 672, 112, 785,
- 645, 863, 803, 350, 139, 93, 354, 99, 820, 908,
- 609, 772, 154, 274, 580, 184, 79, 626, 630, 742,
- 653, 282, 762, 623, 680, 81, 927, 626, 789, 125,
- 411, 521, 938, 300, 821, 78, 343, 175, 128, 250,
- 170, 774, 972, 275, 999, 639, 495, 78, 352, 126,
- 857, 956, 358, 619, 580, 124, 737, 594, 701, 612,
- 669, 112, 134, 694, 363, 992, 809, 743, 168, 974,
- 944, 375, 748, 52, 600, 747, 642, 182, 862, 81,
- 344, 805, 988, 739, 511, 655, 814, 334, 249, 515,
- 897, 955, 664, 981, 649, 113, 974, 459, 893, 228,
- 433, 837, 553, 268, 926, 240, 102, 654, 459, 51,
- 686, 754, 806, 760, 493, 403, 415, 394, 687, 700,
- 946, 670, 656, 610, 738, 392, 760, 799, 887, 653,
- 978, 321, 576, 617, 626, 502, 894, 679, 243, 440,
- 680, 879, 194, 572, 640, 724, 926, 56, 204, 700,
- 707, 151, 457, 449, 797, 195, 791, 558, 945, 679,
- 297, 59, 87, 824, 713, 663, 412, 693, 342, 606,
- 134, 108, 571, 364, 631, 212, 174, 643, 304, 329,
- 343, 97, 430, 751, 497, 314, 983, 374, 822, 928,
- 140, 206, 73, 263, 980, 736, 876, 478, 430, 305,
- 170, 514, 364, 692, 829, 82, 855, 953, 676, 246,
- 369, 970, 294, 750, 807, 827, 150, 790, 288, 923,
- 804, 378, 215, 828, 592, 281, 565, 555, 710, 82,
- 896, 831, 547, 261, 524, 462, 293, 465, 502, 56,
- 661, 821, 976, 991, 658, 869, 905, 758, 745, 193,
- 768, 550, 608, 933, 378, 286, 215, 979, 792, 961,
- 61, 688, 793, 644, 986, 403, 106, 366, 905, 644,
- 372, 567, 466, 434, 645, 210, 389, 550, 919, 135,
- 780, 773, 635, 389, 707, 100, 626, 958, 165, 504,
- 920, 176, 193, 713, 857, 265, 203, 50, 668, 108,
- 645, 990, 626, 197, 510, 357, 358, 850, 858, 364,
- 936, 638
- };
-}
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE.txt file.
+ */
+package installer;
+
+/**
+ * Base class for both the compress and decompress classes. Holds common arrays,
+ * and static data.
+ *
+ * @author <a href="mailto:keiron at aftexsw.com">Keiron Liddle</a>
+ */
+interface BZip2Constants
+{
+ int BASE_BLOCK_SIZE = 100000;
+ int MAX_ALPHA_SIZE = 258;
+ int MAX_CODE_LEN = 23;
+ int RUNA = 0;
+ int RUNB = 1;
+ int N_GROUPS = 6;
+ int G_SIZE = 50;
+ int N_ITERS = 4;
+ int MAX_SELECTORS = ( 2 + ( 900000 / G_SIZE ) );
+ int NUM_OVERSHOOT_BYTES = 20;
+
+ int[] RAND_NUMS = new int[]
+ {
+ 619, 720, 127, 481, 931, 816, 813, 233, 566, 247,
+ 985, 724, 205, 454, 863, 491, 741, 242, 949, 214,
+ 733, 859, 335, 708, 621, 574, 73, 654, 730, 472,
+ 419, 436, 278, 496, 867, 210, 399, 680, 480, 51,
+ 878, 465, 811, 169, 869, 675, 611, 697, 867, 561,
+ 862, 687, 507, 283, 482, 129, 807, 591, 733, 623,
+ 150, 238, 59, 379, 684, 877, 625, 169, 643, 105,
+ 170, 607, 520, 932, 727, 476, 693, 425, 174, 647,
+ 73, 122, 335, 530, 442, 853, 695, 249, 445, 515,
+ 909, 545, 703, 919, 874, 474, 882, 500, 594, 612,
+ 641, 801, 220, 162, 819, 984, 589, 513, 495, 799,
+ 161, 604, 958, 533, 221, 400, 386, 867, 600, 782,
+ 382, 596, 414, 171, 516, 375, 682, 485, 911, 276,
+ 98, 553, 163, 354, 666, 933, 424, 341, 533, 870,
+ 227, 730, 475, 186, 263, 647, 537, 686, 600, 224,
+ 469, 68, 770, 919, 190, 373, 294, 822, 808, 206,
+ 184, 943, 795, 384, 383, 461, 404, 758, 839, 887,
+ 715, 67, 618, 276, 204, 918, 873, 777, 604, 560,
+ 951, 160, 578, 722, 79, 804, 96, 409, 713, 940,
+ 652, 934, 970, 447, 318, 353, 859, 672, 112, 785,
+ 645, 863, 803, 350, 139, 93, 354, 99, 820, 908,
+ 609, 772, 154, 274, 580, 184, 79, 626, 630, 742,
+ 653, 282, 762, 623, 680, 81, 927, 626, 789, 125,
+ 411, 521, 938, 300, 821, 78, 343, 175, 128, 250,
+ 170, 774, 972, 275, 999, 639, 495, 78, 352, 126,
+ 857, 956, 358, 619, 580, 124, 737, 594, 701, 612,
+ 669, 112, 134, 694, 363, 992, 809, 743, 168, 974,
+ 944, 375, 748, 52, 600, 747, 642, 182, 862, 81,
+ 344, 805, 988, 739, 511, 655, 814, 334, 249, 515,
+ 897, 955, 664, 981, 649, 113, 974, 459, 893, 228,
+ 433, 837, 553, 268, 926, 240, 102, 654, 459, 51,
+ 686, 754, 806, 760, 493, 403, 415, 394, 687, 700,
+ 946, 670, 656, 610, 738, 392, 760, 799, 887, 653,
+ 978, 321, 576, 617, 626, 502, 894, 679, 243, 440,
+ 680, 879, 194, 572, 640, 724, 926, 56, 204, 700,
+ 707, 151, 457, 449, 797, 195, 791, 558, 945, 679,
+ 297, 59, 87, 824, 713, 663, 412, 693, 342, 606,
+ 134, 108, 571, 364, 631, 212, 174, 643, 304, 329,
+ 343, 97, 430, 751, 497, 314, 983, 374, 822, 928,
+ 140, 206, 73, 263, 980, 736, 876, 478, 430, 305,
+ 170, 514, 364, 692, 829, 82, 855, 953, 676, 246,
+ 369, 970, 294, 750, 807, 827, 150, 790, 288, 923,
+ 804, 378, 215, 828, 592, 281, 565, 555, 710, 82,
+ 896, 831, 547, 261, 524, 462, 293, 465, 502, 56,
+ 661, 821, 976, 991, 658, 869, 905, 758, 745, 193,
+ 768, 550, 608, 933, 378, 286, 215, 979, 792, 961,
+ 61, 688, 793, 644, 986, 403, 106, 366, 905, 644,
+ 372, 567, 466, 434, 645, 210, 389, 550, 919, 135,
+ 780, 773, 635, 389, 707, 100, 626, 958, 165, 504,
+ 920, 176, 193, 713, 857, 265, 203, 50, 668, 108,
+ 645, 990, 626, 197, 510, 357, 358, 850, 858, 364,
+ 936, 638
+ };
+}
diff --git a/jEdit/installer/CBZip2InputStream.java b/jEdit/installer/CBZip2InputStream.java
index 3f4efef..c57b047 100644
--- a/jEdit/installer/CBZip2InputStream.java
+++ b/jEdit/installer/CBZip2InputStream.java
@@ -1,953 +1,953 @@
-/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
-package installer;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * An input stream that decompresses from the BZip2 format (without the file
- * header chars) to be read as any other stream.
- *
- * @author <a href="mailto:keiron at aftexsw.com">Keiron Liddle</a>
- */
-public class CBZip2InputStream
- extends InputStream
- implements BZip2Constants
-{
- private static final int START_BLOCK_STATE = 1;
- private static final int RAND_PART_A_STATE = 2;
- private static final int RAND_PART_B_STATE = 3;
- private static final int RAND_PART_C_STATE = 4;
- private static final int NO_RAND_PART_A_STATE = 5;
- private static final int NO_RAND_PART_B_STATE = 6;
- private static final int NO_RAND_PART_C_STATE = 7;
-
- private CRC m_crc = new CRC();
- private boolean[] m_inUse = new boolean[ 256 ];
- private char[] m_seqToUnseq = new char[ 256 ];
- private char[] m_unseqToSeq = new char[ 256 ];
- private char[] m_selector = new char[ MAX_SELECTORS ];
- private char[] m_selectorMtf = new char[ MAX_SELECTORS ];
-
- /*
- * freq table collected to save a pass over the data
- * during decompression.
- */
- private int[] m_unzftab = new int[ 256 ];
-
- private int[][] m_limit = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
- private int[][] m_base = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
- private int[][] m_perm = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
- private int[] m_minLens = new int[ N_GROUPS ];
-
- private boolean m_streamEnd;
- private int m_currentChar = -1;
-
- private int m_currentState = START_BLOCK_STATE;
- private int m_rNToGo;
- private int m_rTPos;
- private int m_tPos;
-
- private int i2;
- private int count;
- private int chPrev;
- private int ch2;
- private int j2;
- private char z;
-
- private boolean m_blockRandomised;
-
- /*
- * always: in the range 0 .. 9.
- * The current block size is 100000 * this number.
- */
- private int m_blockSize100k;
- private int m_bsBuff;
- private int m_bsLive;
-
- private InputStream m_input;
-
- private int m_computedBlockCRC;
- private int m_computedCombinedCRC;
-
- /*
- * index of the last char in the block, so
- * the block size == last + 1.
- */
- private int m_last;
- private char[] m_ll8;
- private int m_nInUse;
-
- /*
- * index in zptr[] of original string after sorting.
- */
- private int m_origPtr;
-
- private int m_storedBlockCRC;
- private int m_storedCombinedCRC;
- private int[] m_tt;
-
- public CBZip2InputStream( final InputStream input )
- {
- bsSetStream( input );
- initialize();
- initBlock();
- setupBlock();
- }
-
- private static void badBlockHeader()
- {
- cadvise();
- }
-
- private static void blockOverrun()
- {
- cadvise();
- }
-
- private static void cadvise()
- {
- System.out.println( "CRC Error" );
- //throw new CCoruptionError();
- }
-
- private static void compressedStreamEOF()
- {
- cadvise();
- }
-
- private static void crcError()
- {
- cadvise();
- }
-
- public int read()
- {
- if( m_streamEnd )
- {
- return -1;
- }
- else
- {
- int retChar = m_currentChar;
- switch( m_currentState )
- {
- case START_BLOCK_STATE:
- break;
- case RAND_PART_A_STATE:
- break;
- case RAND_PART_B_STATE:
- setupRandPartB();
- break;
- case RAND_PART_C_STATE:
- setupRandPartC();
- break;
- case NO_RAND_PART_A_STATE:
- break;
- case NO_RAND_PART_B_STATE:
- setupNoRandPartB();
- break;
- case NO_RAND_PART_C_STATE:
- setupNoRandPartC();
- break;
- default:
- break;
- }
- return retChar;
- }
- }
-
- private void setDecompressStructureSizes( int newSize100k )
- {
- if( !( 0 <= newSize100k && newSize100k <= 9 && 0 <= m_blockSize100k
- && m_blockSize100k <= 9 ) )
- {
- // throw new IOException("Invalid block size");
- }
-
- m_blockSize100k = newSize100k;
-
- if( newSize100k == 0 )
- {
- return;
- }
-
- int n = BASE_BLOCK_SIZE * newSize100k;
- m_ll8 = new char[ n ];
- m_tt = new int[ n ];
- }
-
- private void setupBlock()
- {
- int[] cftab = new int[ 257 ];
- char ch;
-
- cftab[ 0 ] = 0;
- for( int i = 1; i <= 256; i++ )
- {
- cftab[ i ] = m_unzftab[ i - 1 ];
- }
- for( int i = 1; i <= 256; i++ )
- {
- cftab[ i ] += cftab[ i - 1 ];
- }
-
- for( int i = 0; i <= m_last; i++ )
- {
- ch = m_ll8[ i ];
- m_tt[ cftab[ ch ] ] = i;
- cftab[ ch ]++;
- }
- cftab = null;
-
- m_tPos = m_tt[ m_origPtr ];
-
- count = 0;
- i2 = 0;
- ch2 = 256;
- /*
- * not a char and not EOF
- */
- if( m_blockRandomised )
- {
- m_rNToGo = 0;
- m_rTPos = 0;
- setupRandPartA();
- }
- else
- {
- setupNoRandPartA();
- }
- }
-
- private void setupNoRandPartA()
- {
- if( i2 <= m_last )
- {
- chPrev = ch2;
- ch2 = m_ll8[ m_tPos ];
- m_tPos = m_tt[ m_tPos ];
- i2++;
-
- m_currentChar = ch2;
- m_currentState = NO_RAND_PART_B_STATE;
- m_crc.updateCRC( ch2 );
- }
- else
- {
- endBlock();
- initBlock();
- setupBlock();
- }
- }
-
- private void setupNoRandPartB()
- {
- if( ch2 != chPrev )
- {
- m_currentState = NO_RAND_PART_A_STATE;
- count = 1;
- setupNoRandPartA();
- }
- else
- {
- count++;
- if( count >= 4 )
- {
- z = m_ll8[ m_tPos ];
- m_tPos = m_tt[ m_tPos ];
- m_currentState = NO_RAND_PART_C_STATE;
- j2 = 0;
- setupNoRandPartC();
- }
- else
- {
- m_currentState = NO_RAND_PART_A_STATE;
- setupNoRandPartA();
- }
- }
- }
-
- private void setupNoRandPartC()
- {
- if( j2 < z )
- {
- m_currentChar = ch2;
- m_crc.updateCRC( ch2 );
- j2++;
- }
- else
- {
- m_currentState = NO_RAND_PART_A_STATE;
- i2++;
- count = 0;
- setupNoRandPartA();
- }
- }
-
- private void setupRandPartA()
- {
- if( i2 <= m_last )
- {
- chPrev = ch2;
- ch2 = m_ll8[ m_tPos ];
- m_tPos = m_tt[ m_tPos ];
- if( m_rNToGo == 0 )
- {
- m_rNToGo = RAND_NUMS[ m_rTPos ];
- m_rTPos++;
- if( m_rTPos == 512 )
- {
- m_rTPos = 0;
- }
- }
- m_rNToGo--;
- ch2 ^= ( ( m_rNToGo == 1 ) ? 1 : 0 );
- i2++;
-
- m_currentChar = ch2;
- m_currentState = RAND_PART_B_STATE;
- m_crc.updateCRC( ch2 );
- }
- else
- {
- endBlock();
- initBlock();
- setupBlock();
- }
- }
-
- private void setupRandPartB()
- {
- if( ch2 != chPrev )
- {
- m_currentState = RAND_PART_A_STATE;
- count = 1;
- setupRandPartA();
- }
- else
- {
- count++;
- if( count >= 4 )
- {
- z = m_ll8[ m_tPos ];
- m_tPos = m_tt[ m_tPos ];
- if( m_rNToGo == 0 )
- {
- m_rNToGo = RAND_NUMS[ m_rTPos ];
- m_rTPos++;
- if( m_rTPos == 512 )
- {
- m_rTPos = 0;
- }
- }
- m_rNToGo--;
- z ^= ( ( m_rNToGo == 1 ) ? 1 : 0 );
- j2 = 0;
- m_currentState = RAND_PART_C_STATE;
- setupRandPartC();
- }
- else
- {
- m_currentState = RAND_PART_A_STATE;
- setupRandPartA();
- }
- }
- }
-
- private void setupRandPartC()
- {
- if( j2 < z )
- {
- m_currentChar = ch2;
- m_crc.updateCRC( ch2 );
- j2++;
- }
- else
- {
- m_currentState = RAND_PART_A_STATE;
- i2++;
- count = 0;
- setupRandPartA();
- }
- }
-
- private void getAndMoveToFrontDecode()
- {
- int nextSym;
-
- int limitLast = BASE_BLOCK_SIZE * m_blockSize100k;
- m_origPtr = readVariableSizedInt( 24 );
-
- recvDecodingTables();
- int EOB = m_nInUse + 1;
- int groupNo = -1;
- int groupPos = 0;
-
- /*
- * Setting up the unzftab entries here is not strictly
- * necessary, but it does save having to do it later
- * in a separate pass, and so saves a block's worth of
- * cache misses.
- */
- for( int i = 0; i <= 255; i++ )
- {
- m_unzftab[ i ] = 0;
- }
-
- final char[] yy = new char[ 256 ];
- for( int i = 0; i <= 255; i++ )
- {
- yy[ i ] = (char)i;
- }
-
- m_last = -1;
- int zt;
- int zn;
- int zvec;
- int zj;
- groupNo++;
- groupPos = G_SIZE - 1;
-
- zt = m_selector[ groupNo ];
- zn = m_minLens[ zt ];
- zvec = bsR( zn );
- while( zvec > m_limit[ zt ][ zn ] )
- {
- zn++;
-
- while( m_bsLive < 1 )
- {
- int zzi;
- try
- {
- zzi = m_input.read();
- }
- catch( IOException e )
- {
- compressedStreamEOF();
- break;
- }
- if( zzi == -1 )
- {
- compressedStreamEOF();
- break;
- }
- m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );
- m_bsLive += 8;
- }
-
- zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1;
- m_bsLive--;
-
- zvec = ( zvec << 1 ) | zj;
- }
- nextSym = m_perm[ zt ][ zvec - m_base[ zt ][ zn ] ];
-
- while( true )
- {
- if( nextSym == EOB )
- {
- break;
- }
-
- if( nextSym == RUNA || nextSym == RUNB )
- {
- char ch;
- int s = -1;
- int N = 1;
- do
- {
- if( nextSym == RUNA )
- {
- s = s + ( 0 + 1 ) * N;
- }
- else// if( nextSym == RUNB )
- {
- s = s + ( 1 + 1 ) * N;
- }
- N = N * 2;
-
- if( groupPos == 0 )
- {
- groupNo++;
- groupPos = G_SIZE;
- }
- groupPos--;
- zt = m_selector[ groupNo ];
- zn = m_minLens[ zt ];
- zvec = bsR( zn );
- while( zvec > m_limit[ zt ][ zn ] )
- {
- zn++;
-
- while( m_bsLive < 1 )
- {
- int zzi;
- char thech = 0;
- try
- {
- thech = (char)m_input.read();
- }
- catch( IOException e )
- {
- compressedStreamEOF();
- }
- if( thech == -1 )
- {
- compressedStreamEOF();
- }
- zzi = thech;
- m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );
- m_bsLive += 8;
- }
-
- zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1;
- m_bsLive--;
- zvec = ( zvec << 1 ) | zj;
- }
-
- nextSym = m_perm[ zt ][ zvec - m_base[ zt ][ zn ] ];
-
- } while( nextSym == RUNA || nextSym == RUNB );
-
- s++;
- ch = m_seqToUnseq[ yy[ 0 ] ];
- m_unzftab[ ch ] += s;
-
- while( s > 0 )
- {
- m_last++;
- m_ll8[ m_last ] = ch;
- s--;
- }
-
- if( m_last >= limitLast )
- {
- blockOverrun();
- }
- continue;
- }
- else
- {
- char tmp;
- m_last++;
- if( m_last >= limitLast )
- {
- blockOverrun();
- }
-
- tmp = yy[ nextSym - 1 ];
- m_unzftab[ m_seqToUnseq[ tmp ] ]++;
- m_ll8[ m_last ] = m_seqToUnseq[ tmp ];
-
- /*
- * This loop is hammered during decompression,
- * hence the unrolling.
- * for (j = nextSym-1; j > 0; j--) yy[j] = yy[j-1];
- */
- int j = nextSym - 1;
- for( ; j > 3; j -= 4 )
- {
- yy[ j ] = yy[ j - 1 ];
- yy[ j - 1 ] = yy[ j - 2 ];
- yy[ j - 2 ] = yy[ j - 3 ];
- yy[ j - 3 ] = yy[ j - 4 ];
- }
- for( ; j > 0; j-- )
- {
- yy[ j ] = yy[ j - 1 ];
- }
-
- yy[ 0 ] = tmp;
-
- if( groupPos == 0 )
- {
- groupNo++;
- groupPos = G_SIZE;
- }
- groupPos--;
- zt = m_selector[ groupNo ];
- zn = m_minLens[ zt ];
- zvec = bsR( zn );
- while( zvec > m_limit[ zt ][ zn ] )
- {
- zn++;
-
- while( m_bsLive < 1 )
- {
- char ch = 0;
- try
- {
- ch = (char)m_input.read();
- }
- catch( IOException e )
- {
- compressedStreamEOF();
- }
-
- m_bsBuff = ( m_bsBuff << 8 ) | ( ch & 0xff );
- m_bsLive += 8;
- }
-
- zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1;
- m_bsLive--;
-
- zvec = ( zvec << 1 ) | zj;
- }
- nextSym = m_perm[ zt ][ zvec - m_base[ zt ][ zn ] ];
-
- continue;
- }
- }
- }
-
- private void bsFinishedWithStream()
- {
- m_input = null;
- }
-
- private int readVariableSizedInt( final int numBits )
- {
- return bsR( numBits );
- }
-
- private char readUnsignedChar()
- {
- return (char)bsR( 8 );
- }
-
- private int readInt()
- {
- int u = 0;
- u = ( u << 8 ) | bsR( 8 );
- u = ( u << 8 ) | bsR( 8 );
- u = ( u << 8 ) | bsR( 8 );
- u = ( u << 8 ) | bsR( 8 );
- return u;
- }
-
- private int bsR( final int n )
- {
- while( m_bsLive < n )
- {
- char ch = 0;
- try
- {
- ch = (char)m_input.read();
- }
- catch( final IOException ioe )
- {
- compressedStreamEOF();
- }
-
- if( ch == -1 )
- {
- compressedStreamEOF();
- }
-
- m_bsBuff = ( m_bsBuff << 8 ) | ( ch & 0xff );
- m_bsLive += 8;
- }
-
- final int result = ( m_bsBuff >> ( m_bsLive - n ) ) & ( ( 1 << n ) - 1 );
- m_bsLive -= n;
- return result;
- }
-
- private void bsSetStream( final InputStream input )
- {
- m_input = input;
- m_bsLive = 0;
- m_bsBuff = 0;
- }
-
- private void complete()
- {
- m_storedCombinedCRC = readInt();
- if( m_storedCombinedCRC != m_computedCombinedCRC )
- {
- crcError();
- }
-
- bsFinishedWithStream();
- m_streamEnd = true;
- }
-
- private void endBlock()
- {
- m_computedBlockCRC = m_crc.getFinalCRC();
- /*
- * A bad CRC is considered a fatal error.
- */
- if( m_storedBlockCRC != m_computedBlockCRC )
- {
- crcError();
- }
-
- m_computedCombinedCRC = ( m_computedCombinedCRC << 1 )
- | ( m_computedCombinedCRC >>> 31 );
- m_computedCombinedCRC ^= m_computedBlockCRC;
- }
-
- private void hbCreateDecodeTables( final int[] limit,
- final int[] base,
- final int[] perm,
- final char[] length,
- final int minLen,
- final int maxLen,
- final int alphaSize )
- {
- int pp = 0;
- for( int i = minLen; i <= maxLen; i++ )
- {
- for( int j = 0; j < alphaSize; j++ )
- {
- if( length[ j ] == i )
- {
- perm[ pp ] = j;
- pp++;
- }
- }
- }
-
- for( int i = 0; i < MAX_CODE_LEN; i++ )
- {
- base[ i ] = 0;
- }
-
- for( int i = 0; i < alphaSize; i++ )
- {
- base[ length[ i ] + 1 ]++;
- }
-
- for( int i = 1; i < MAX_CODE_LEN; i++ )
- {
- base[ i ] += base[ i - 1 ];
- }
-
- for( int i = 0; i < MAX_CODE_LEN; i++ )
- {
- limit[ i ] = 0;
- }
-
- int vec = 0;
- for( int i = minLen; i <= maxLen; i++ )
- {
- vec += ( base[ i + 1 ] - base[ i ] );
- limit[ i ] = vec - 1;
- vec <<= 1;
- }
-
- for( int i = minLen + 1; i <= maxLen; i++ )
- {
- base[ i ] = ( ( limit[ i - 1 ] + 1 ) << 1 ) - base[ i ];
- }
- }
-
- private void initBlock()
- {
- final char magic1 = readUnsignedChar();
- final char magic2 = readUnsignedChar();
- final char magic3 = readUnsignedChar();
- final char magic4 = readUnsignedChar();
- final char magic5 = readUnsignedChar();
- final char magic6 = readUnsignedChar();
- if( magic1 == 0x17 && magic2 == 0x72 && magic3 == 0x45 &&
- magic4 == 0x38 && magic5 == 0x50 && magic6 == 0x90 )
- {
- complete();
- return;
- }
-
- if( magic1 != 0x31 || magic2 != 0x41 || magic3 != 0x59 ||
- magic4 != 0x26 || magic5 != 0x53 || magic6 != 0x59 )
- {
- badBlockHeader();
- m_streamEnd = true;
- return;
- }
-
- m_storedBlockCRC = readInt();
-
- if( bsR( 1 ) == 1 )
- {
- m_blockRandomised = true;
- }
- else
- {
- m_blockRandomised = false;
- }
-
- // currBlockNo++;
- getAndMoveToFrontDecode();
-
- m_crc.initialiseCRC();
- m_currentState = START_BLOCK_STATE;
- }
-
- private void initialize()
- {
- final char magic3 = readUnsignedChar();
- final char magic4 = readUnsignedChar();
- if( magic3 != 'h' || magic4 < '1' || magic4 > '9' )
- {
- bsFinishedWithStream();
- m_streamEnd = true;
- return;
- }
-
- setDecompressStructureSizes( magic4 - '0' );
- m_computedCombinedCRC = 0;
- }
-
- private void makeMaps()
- {
- m_nInUse = 0;
- for( int i = 0; i < 256; i++ )
- {
- if( m_inUse[ i ] )
- {
- m_seqToUnseq[ m_nInUse ] = (char)i;
- m_unseqToSeq[ i ] = (char)m_nInUse;
- m_nInUse++;
- }
- }
- }
-
- private void recvDecodingTables()
- {
- buildInUseTable();
- makeMaps();
- final int alphaSize = m_nInUse + 2;
-
- /*
- * Now the selectors
- */
- final int groupCount = bsR( 3 );
- final int selectorCount = bsR( 15 );
- for( int i = 0; i < selectorCount; i++ )
- {
- int run = 0;
- while( bsR( 1 ) == 1 )
- {
- run++;
- }
- m_selectorMtf[ i ] = (char)run;
- }
-
- /*
- * Undo the MTF values for the selectors.
- */
- final char[] pos = new char[ N_GROUPS ];
- for( char v = 0; v < groupCount; v++ )
- {
- pos[ v ] = v;
- }
-
- for( int i = 0; i < selectorCount; i++ )
- {
- int v = m_selectorMtf[ i ];
- final char tmp = pos[ v ];
- while( v > 0 )
- {
- pos[ v ] = pos[ v - 1 ];
- v--;
- }
- pos[ 0 ] = tmp;
- m_selector[ i ] = tmp;
- }
-
- final char[][] len = new char[ N_GROUPS ][ MAX_ALPHA_SIZE ];
- /*
- * Now the coding tables
- */
- for( int i = 0; i < groupCount; i++ )
- {
- int curr = bsR( 5 );
- for( int j = 0; j < alphaSize; j++ )
- {
- while( bsR( 1 ) == 1 )
- {
- if( bsR( 1 ) == 0 )
- {
- curr++;
- }
- else
- {
- curr--;
- }
- }
- len[ i ][ j ] = (char)curr;
- }
- }
-
- /*
- * Create the Huffman decoding tables
- */
- for( int k = 0; k < groupCount; k++ )
- {
- int minLen = 32;
- int maxLen = 0;
- for( int i = 0; i < alphaSize; i++ )
- {
- if( len[ k ][ i ] > maxLen )
- {
- maxLen = len[ k ][ i ];
- }
- if( len[ k ][ i ] < minLen )
- {
- minLen = len[ k ][ i ];
- }
- }
- hbCreateDecodeTables( m_limit[ k ], m_base[ k ], m_perm[ k ], len[ k ], minLen,
- maxLen, alphaSize );
- m_minLens[ k ] = minLen;
- }
- }
-
- private void buildInUseTable()
- {
- final boolean[] inUse16 = new boolean[ 16 ];
-
- /*
- * Receive the mapping table
- */
- for( int i = 0; i < 16; i++ )
- {
- if( bsR( 1 ) == 1 )
- {
- inUse16[ i ] = true;
- }
- else
- {
- inUse16[ i ] = false;
- }
- }
-
- for( int i = 0; i < 256; i++ )
- {
- m_inUse[ i ] = false;
- }
-
- for( int i = 0; i < 16; i++ )
- {
- if( inUse16[ i ] )
- {
- for( int j = 0; j < 16; j++ )
- {
- if( bsR( 1 ) == 1 )
- {
- m_inUse[ i * 16 + j ] = true;
- }
- }
- }
- }
- }
-}
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE.txt file.
+ */
+package installer;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * An input stream that decompresses from the BZip2 format (without the file
+ * header chars) to be read as any other stream.
+ *
+ * @author <a href="mailto:keiron at aftexsw.com">Keiron Liddle</a>
+ */
+public class CBZip2InputStream
+ extends InputStream
+ implements BZip2Constants
+{
+ private static final int START_BLOCK_STATE = 1;
+ private static final int RAND_PART_A_STATE = 2;
+ private static final int RAND_PART_B_STATE = 3;
+ private static final int RAND_PART_C_STATE = 4;
+ private static final int NO_RAND_PART_A_STATE = 5;
+ private static final int NO_RAND_PART_B_STATE = 6;
+ private static final int NO_RAND_PART_C_STATE = 7;
+
+ private CRC m_crc = new CRC();
+ private boolean[] m_inUse = new boolean[ 256 ];
+ private char[] m_seqToUnseq = new char[ 256 ];
+ private char[] m_unseqToSeq = new char[ 256 ];
+ private char[] m_selector = new char[ MAX_SELECTORS ];
+ private char[] m_selectorMtf = new char[ MAX_SELECTORS ];
+
+ /*
+ * freq table collected to save a pass over the data
+ * during decompression.
+ */
+ private int[] m_unzftab = new int[ 256 ];
+
+ private int[][] m_limit = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
+ private int[][] m_base = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
+ private int[][] m_perm = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
+ private int[] m_minLens = new int[ N_GROUPS ];
+
+ private boolean m_streamEnd;
+ private int m_currentChar = -1;
+
+ private int m_currentState = START_BLOCK_STATE;
+ private int m_rNToGo;
+ private int m_rTPos;
+ private int m_tPos;
+
+ private int i2;
+ private int count;
+ private int chPrev;
+ private int ch2;
+ private int j2;
+ private char z;
+
+ private boolean m_blockRandomised;
+
+ /*
+ * always: in the range 0 .. 9.
+ * The current block size is 100000 * this number.
+ */
+ private int m_blockSize100k;
+ private int m_bsBuff;
+ private int m_bsLive;
+
+ private InputStream m_input;
+
+ private int m_computedBlockCRC;
+ private int m_computedCombinedCRC;
+
+ /*
+ * index of the last char in the block, so
+ * the block size == last + 1.
+ */
+ private int m_last;
+ private char[] m_ll8;
+ private int m_nInUse;
+
+ /*
+ * index in zptr[] of original string after sorting.
+ */
+ private int m_origPtr;
+
+ private int m_storedBlockCRC;
+ private int m_storedCombinedCRC;
+ private int[] m_tt;
+
+ public CBZip2InputStream( final InputStream input )
+ {
+ bsSetStream( input );
+ initialize();
+ initBlock();
+ setupBlock();
+ }
+
+ private static void badBlockHeader()
+ {
+ cadvise();
+ }
+
+ private static void blockOverrun()
+ {
+ cadvise();
+ }
+
+ private static void cadvise()
+ {
+ System.out.println( "CRC Error" );
+ //throw new CCoruptionError();
+ }
+
+ private static void compressedStreamEOF()
+ {
+ cadvise();
+ }
+
+ private static void crcError()
+ {
+ cadvise();
+ }
+
+ public int read()
+ {
+ if( m_streamEnd )
+ {
+ return -1;
+ }
+ else
+ {
+ int retChar = m_currentChar;
+ switch( m_currentState )
+ {
+ case START_BLOCK_STATE:
+ break;
+ case RAND_PART_A_STATE:
+ break;
+ case RAND_PART_B_STATE:
+ setupRandPartB();
+ break;
+ case RAND_PART_C_STATE:
+ setupRandPartC();
+ break;
+ case NO_RAND_PART_A_STATE:
+ break;
+ case NO_RAND_PART_B_STATE:
+ setupNoRandPartB();
+ break;
+ case NO_RAND_PART_C_STATE:
+ setupNoRandPartC();
+ break;
+ default:
+ break;
+ }
+ return retChar;
+ }
+ }
+
+ private void setDecompressStructureSizes( int newSize100k )
+ {
+ if( !( 0 <= newSize100k && newSize100k <= 9 && 0 <= m_blockSize100k
+ && m_blockSize100k <= 9 ) )
+ {
+ // throw new IOException("Invalid block size");
+ }
+
+ m_blockSize100k = newSize100k;
+
+ if( newSize100k == 0 )
+ {
+ return;
+ }
+
+ int n = BASE_BLOCK_SIZE * newSize100k;
+ m_ll8 = new char[ n ];
+ m_tt = new int[ n ];
+ }
+
+ private void setupBlock()
+ {
+ int[] cftab = new int[ 257 ];
+ char ch;
+
+ cftab[ 0 ] = 0;
+ for( int i = 1; i <= 256; i++ )
+ {
+ cftab[ i ] = m_unzftab[ i - 1 ];
+ }
+ for( int i = 1; i <= 256; i++ )
+ {
+ cftab[ i ] += cftab[ i - 1 ];
+ }
+
+ for( int i = 0; i <= m_last; i++ )
+ {
+ ch = m_ll8[ i ];
+ m_tt[ cftab[ ch ] ] = i;
+ cftab[ ch ]++;
+ }
+ cftab = null;
+
+ m_tPos = m_tt[ m_origPtr ];
+
+ count = 0;
+ i2 = 0;
+ ch2 = 256;
+ /*
+ * not a char and not EOF
+ */
+ if( m_blockRandomised )
+ {
+ m_rNToGo = 0;
+ m_rTPos = 0;
+ setupRandPartA();
+ }
+ else
+ {
+ setupNoRandPartA();
+ }
+ }
+
+ private void setupNoRandPartA()
+ {
+ if( i2 <= m_last )
+ {
+ chPrev = ch2;
+ ch2 = m_ll8[ m_tPos ];
+ m_tPos = m_tt[ m_tPos ];
+ i2++;
+
+ m_currentChar = ch2;
+ m_currentState = NO_RAND_PART_B_STATE;
+ m_crc.updateCRC( ch2 );
+ }
+ else
+ {
+ endBlock();
+ initBlock();
+ setupBlock();
+ }
+ }
+
+ private void setupNoRandPartB()
+ {
+ if( ch2 != chPrev )
+ {
+ m_currentState = NO_RAND_PART_A_STATE;
+ count = 1;
+ setupNoRandPartA();
+ }
+ else
+ {
+ count++;
+ if( count >= 4 )
+ {
+ z = m_ll8[ m_tPos ];
+ m_tPos = m_tt[ m_tPos ];
+ m_currentState = NO_RAND_PART_C_STATE;
+ j2 = 0;
+ setupNoRandPartC();
+ }
+ else
+ {
+ m_currentState = NO_RAND_PART_A_STATE;
+ setupNoRandPartA();
+ }
+ }
+ }
+
+ private void setupNoRandPartC()
+ {
+ if( j2 < z )
+ {
+ m_currentChar = ch2;
+ m_crc.updateCRC( ch2 );
+ j2++;
+ }
+ else
+ {
+ m_currentState = NO_RAND_PART_A_STATE;
+ i2++;
+ count = 0;
+ setupNoRandPartA();
+ }
+ }
+
+ private void setupRandPartA()
+ {
+ if( i2 <= m_last )
+ {
+ chPrev = ch2;
+ ch2 = m_ll8[ m_tPos ];
+ m_tPos = m_tt[ m_tPos ];
+ if( m_rNToGo == 0 )
+ {
+ m_rNToGo = RAND_NUMS[ m_rTPos ];
+ m_rTPos++;
+ if( m_rTPos == 512 )
+ {
+ m_rTPos = 0;
+ }
+ }
+ m_rNToGo--;
+ ch2 ^= ( ( m_rNToGo == 1 ) ? 1 : 0 );
+ i2++;
+
+ m_currentChar = ch2;
+ m_currentState = RAND_PART_B_STATE;
+ m_crc.updateCRC( ch2 );
+ }
+ else
+ {
+ endBlock();
+ initBlock();
+ setupBlock();
+ }
+ }
+
+ private void setupRandPartB()
+ {
+ if( ch2 != chPrev )
+ {
+ m_currentState = RAND_PART_A_STATE;
+ count = 1;
+ setupRandPartA();
+ }
+ else
+ {
+ count++;
+ if( count >= 4 )
+ {
+ z = m_ll8[ m_tPos ];
+ m_tPos = m_tt[ m_tPos ];
+ if( m_rNToGo == 0 )
+ {
+ m_rNToGo = RAND_NUMS[ m_rTPos ];
+ m_rTPos++;
+ if( m_rTPos == 512 )
+ {
+ m_rTPos = 0;
+ }
+ }
+ m_rNToGo--;
+ z ^= ( ( m_rNToGo == 1 ) ? 1 : 0 );
+ j2 = 0;
+ m_currentState = RAND_PART_C_STATE;
+ setupRandPartC();
+ }
+ else
+ {
+ m_currentState = RAND_PART_A_STATE;
+ setupRandPartA();
+ }
+ }
+ }
+
+ private void setupRandPartC()
+ {
+ if( j2 < z )
+ {
+ m_currentChar = ch2;
+ m_crc.updateCRC( ch2 );
+ j2++;
+ }
+ else
+ {
+ m_currentState = RAND_PART_A_STATE;
+ i2++;
+ count = 0;
+ setupRandPartA();
+ }
+ }
+
+ private void getAndMoveToFrontDecode()
+ {
+ int nextSym;
+
+ int limitLast = BASE_BLOCK_SIZE * m_blockSize100k;
+ m_origPtr = readVariableSizedInt( 24 );
+
+ recvDecodingTables();
+ int EOB = m_nInUse + 1;
+ int groupNo = -1;
+ int groupPos = 0;
+
+ /*
+ * Setting up the unzftab entries here is not strictly
+ * necessary, but it does save having to do it later
+ * in a separate pass, and so saves a block's worth of
+ * cache misses.
+ */
+ for( int i = 0; i <= 255; i++ )
+ {
+ m_unzftab[ i ] = 0;
+ }
+
+ final char[] yy = new char[ 256 ];
+ for( int i = 0; i <= 255; i++ )
+ {
+ yy[ i ] = (char)i;
+ }
+
+ m_last = -1;
+ int zt;
+ int zn;
+ int zvec;
+ int zj;
+ groupNo++;
+ groupPos = G_SIZE - 1;
+
+ zt = m_selector[ groupNo ];
+ zn = m_minLens[ zt ];
+ zvec = bsR( zn );
+ while( zvec > m_limit[ zt ][ zn ] )
+ {
+ zn++;
+
+ while( m_bsLive < 1 )
+ {
+ int zzi;
+ try
+ {
+ zzi = m_input.read();
+ }
+ catch( IOException e )
+ {
+ compressedStreamEOF();
+ break;
+ }
+ if( zzi == -1 )
+ {
+ compressedStreamEOF();
+ break;
+ }
+ m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );
+ m_bsLive += 8;
+ }
+
+ zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1;
+ m_bsLive--;
+
+ zvec = ( zvec << 1 ) | zj;
+ }
+ nextSym = m_perm[ zt ][ zvec - m_base[ zt ][ zn ] ];
+
+ while( true )
+ {
+ if( nextSym == EOB )
+ {
+ break;
+ }
+
+ if( nextSym == RUNA || nextSym == RUNB )
+ {
+ char ch;
+ int s = -1;
+ int N = 1;
+ do
+ {
+ if( nextSym == RUNA )
+ {
+ s = s + ( 0 + 1 ) * N;
+ }
+ else// if( nextSym == RUNB )
+ {
+ s = s + ( 1 + 1 ) * N;
+ }
+ N = N * 2;
+
+ if( groupPos == 0 )
+ {
+ groupNo++;
+ groupPos = G_SIZE;
+ }
+ groupPos--;
+ zt = m_selector[ groupNo ];
+ zn = m_minLens[ zt ];
+ zvec = bsR( zn );
+ while( zvec > m_limit[ zt ][ zn ] )
+ {
+ zn++;
+
+ while( m_bsLive < 1 )
+ {
+ int zzi;
+ char thech = 0;
+ try
+ {
+ thech = (char)m_input.read();
+ }
+ catch( IOException e )
+ {
+ compressedStreamEOF();
+ }
+ if( thech == -1 )
+ {
+ compressedStreamEOF();
+ }
+ zzi = thech;
+ m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );
+ m_bsLive += 8;
+ }
+
+ zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1;
+ m_bsLive--;
+ zvec = ( zvec << 1 ) | zj;
+ }
+
+ nextSym = m_perm[ zt ][ zvec - m_base[ zt ][ zn ] ];
+
+ } while( nextSym == RUNA || nextSym == RUNB );
+
+ s++;
+ ch = m_seqToUnseq[ yy[ 0 ] ];
+ m_unzftab[ ch ] += s;
+
+ while( s > 0 )
+ {
+ m_last++;
+ m_ll8[ m_last ] = ch;
+ s--;
+ }
+
+ if( m_last >= limitLast )
+ {
+ blockOverrun();
+ }
+ continue;
+ }
+ else
+ {
+ char tmp;
+ m_last++;
+ if( m_last >= limitLast )
+ {
+ blockOverrun();
+ }
+
+ tmp = yy[ nextSym - 1 ];
+ m_unzftab[ m_seqToUnseq[ tmp ] ]++;
+ m_ll8[ m_last ] = m_seqToUnseq[ tmp ];
+
+ /*
+ * This loop is hammered during decompression,
+ * hence the unrolling.
+ * for (j = nextSym-1; j > 0; j--) yy[j] = yy[j-1];
+ */
+ int j = nextSym - 1;
+ for( ; j > 3; j -= 4 )
+ {
+ yy[ j ] = yy[ j - 1 ];
+ yy[ j - 1 ] = yy[ j - 2 ];
+ yy[ j - 2 ] = yy[ j - 3 ];
+ yy[ j - 3 ] = yy[ j - 4 ];
+ }
+ for( ; j > 0; j-- )
+ {
+ yy[ j ] = yy[ j - 1 ];
+ }
+
+ yy[ 0 ] = tmp;
+
+ if( groupPos == 0 )
+ {
+ groupNo++;
+ groupPos = G_SIZE;
+ }
+ groupPos--;
+ zt = m_selector[ groupNo ];
+ zn = m_minLens[ zt ];
+ zvec = bsR( zn );
+ while( zvec > m_limit[ zt ][ zn ] )
+ {
+ zn++;
+
+ while( m_bsLive < 1 )
+ {
+ char ch = 0;
+ try
+ {
+ ch = (char)m_input.read();
+ }
+ catch( IOException e )
+ {
+ compressedStreamEOF();
+ }
+
+ m_bsBuff = ( m_bsBuff << 8 ) | ( ch & 0xff );
+ m_bsLive += 8;
+ }
+
+ zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1;
+ m_bsLive--;
+
+ zvec = ( zvec << 1 ) | zj;
+ }
+ nextSym = m_perm[ zt ][ zvec - m_base[ zt ][ zn ] ];
+
+ continue;
+ }
+ }
+ }
+
+ private void bsFinishedWithStream()
+ {
+ m_input = null;
+ }
+
+ private int readVariableSizedInt( final int numBits )
+ {
+ return bsR( numBits );
+ }
+
+ private char readUnsignedChar()
+ {
+ return (char)bsR( 8 );
+ }
+
+ private int readInt()
+ {
+ int u = 0;
+ u = ( u << 8 ) | bsR( 8 );
+ u = ( u << 8 ) | bsR( 8 );
+ u = ( u << 8 ) | bsR( 8 );
+ u = ( u << 8 ) | bsR( 8 );
+ return u;
+ }
+
+ private int bsR( final int n )
+ {
+ while( m_bsLive < n )
+ {
+ char ch = 0;
+ try
+ {
+ ch = (char)m_input.read();
+ }
+ catch( final IOException ioe )
+ {
+ compressedStreamEOF();
+ }
+
+ if( ch == -1 )
+ {
+ compressedStreamEOF();
+ }
+
+ m_bsBuff = ( m_bsBuff << 8 ) | ( ch & 0xff );
+ m_bsLive += 8;
+ }
+
+ final int result = ( m_bsBuff >> ( m_bsLive - n ) ) & ( ( 1 << n ) - 1 );
+ m_bsLive -= n;
+ return result;
+ }
+
+ private void bsSetStream( final InputStream input )
+ {
+ m_input = input;
+ m_bsLive = 0;
+ m_bsBuff = 0;
+ }
+
+ private void complete()
+ {
+ m_storedCombinedCRC = readInt();
+ if( m_storedCombinedCRC != m_computedCombinedCRC )
+ {
+ crcError();
+ }
+
+ bsFinishedWithStream();
+ m_streamEnd = true;
+ }
+
+ private void endBlock()
+ {
+ m_computedBlockCRC = m_crc.getFinalCRC();
+ /*
+ * A bad CRC is considered a fatal error.
+ */
+ if( m_storedBlockCRC != m_computedBlockCRC )
+ {
+ crcError();
+ }
+
+ m_computedCombinedCRC = ( m_computedCombinedCRC << 1 )
+ | ( m_computedCombinedCRC >>> 31 );
+ m_computedCombinedCRC ^= m_computedBlockCRC;
+ }
+
+ private void hbCreateDecodeTables( final int[] limit,
+ final int[] base,
+ final int[] perm,
+ final char[] length,
+ final int minLen,
+ final int maxLen,
+ final int alphaSize )
+ {
+ int pp = 0;
+ for( int i = minLen; i <= maxLen; i++ )
+ {
+ for( int j = 0; j < alphaSize; j++ )
+ {
+ if( length[ j ] == i )
+ {
+ perm[ pp ] = j;
+ pp++;
+ }
+ }
+ }
+
+ for( int i = 0; i < MAX_CODE_LEN; i++ )
+ {
+ base[ i ] = 0;
+ }
+
+ for( int i = 0; i < alphaSize; i++ )
+ {
+ base[ length[ i ] + 1 ]++;
+ }
+
+ for( int i = 1; i < MAX_CODE_LEN; i++ )
+ {
+ base[ i ] += base[ i - 1 ];
+ }
+
+ for( int i = 0; i < MAX_CODE_LEN; i++ )
+ {
+ limit[ i ] = 0;
+ }
+
+ int vec = 0;
+ for( int i = minLen; i <= maxLen; i++ )
+ {
+ vec += ( base[ i + 1 ] - base[ i ] );
+ limit[ i ] = vec - 1;
+ vec <<= 1;
+ }
+
+ for( int i = minLen + 1; i <= maxLen; i++ )
+ {
+ base[ i ] = ( ( limit[ i - 1 ] + 1 ) << 1 ) - base[ i ];
+ }
+ }
+
+ private void initBlock()
+ {
+ final char magic1 = readUnsignedChar();
+ final char magic2 = readUnsignedChar();
+ final char magic3 = readUnsignedChar();
+ final char magic4 = readUnsignedChar();
+ final char magic5 = readUnsignedChar();
+ final char magic6 = readUnsignedChar();
+ if( magic1 == 0x17 && magic2 == 0x72 && magic3 == 0x45 &&
+ magic4 == 0x38 && magic5 == 0x50 && magic6 == 0x90 )
+ {
+ complete();
+ return;
+ }
+
+ if( magic1 != 0x31 || magic2 != 0x41 || magic3 != 0x59 ||
+ magic4 != 0x26 || magic5 != 0x53 || magic6 != 0x59 )
+ {
+ badBlockHeader();
+ m_streamEnd = true;
+ return;
+ }
+
+ m_storedBlockCRC = readInt();
+
+ if( bsR( 1 ) == 1 )
+ {
+ m_blockRandomised = true;
+ }
+ else
+ {
+ m_blockRandomised = false;
+ }
+
+ // currBlockNo++;
+ getAndMoveToFrontDecode();
+
+ m_crc.initialiseCRC();
+ m_currentState = START_BLOCK_STATE;
+ }
+
+ private void initialize()
+ {
+ final char magic3 = readUnsignedChar();
+ final char magic4 = readUnsignedChar();
+ if( magic3 != 'h' || magic4 < '1' || magic4 > '9' )
+ {
+ bsFinishedWithStream();
+ m_streamEnd = true;
+ return;
+ }
+
+ setDecompressStructureSizes( magic4 - '0' );
+ m_computedCombinedCRC = 0;
+ }
+
+ private void makeMaps()
+ {
+ m_nInUse = 0;
+ for( int i = 0; i < 256; i++ )
+ {
+ if( m_inUse[ i ] )
+ {
+ m_seqToUnseq[ m_nInUse ] = (char)i;
+ m_unseqToSeq[ i ] = (char)m_nInUse;
+ m_nInUse++;
+ }
+ }
+ }
+
+ private void recvDecodingTables()
+ {
+ buildInUseTable();
+ makeMaps();
+ final int alphaSize = m_nInUse + 2;
+
+ /*
+ * Now the selectors
+ */
+ final int groupCount = bsR( 3 );
+ final int selectorCount = bsR( 15 );
+ for( int i = 0; i < selectorCount; i++ )
+ {
+ int run = 0;
+ while( bsR( 1 ) == 1 )
+ {
+ run++;
+ }
+ m_selectorMtf[ i ] = (char)run;
+ }
+
+ /*
+ * Undo the MTF values for the selectors.
+ */
+ final char[] pos = new char[ N_GROUPS ];
+ for( char v = 0; v < groupCount; v++ )
+ {
+ pos[ v ] = v;
+ }
+
+ for( int i = 0; i < selectorCount; i++ )
+ {
+ int v = m_selectorMtf[ i ];
+ final char tmp = pos[ v ];
+ while( v > 0 )
+ {
+ pos[ v ] = pos[ v - 1 ];
+ v--;
+ }
+ pos[ 0 ] = tmp;
+ m_selector[ i ] = tmp;
+ }
+
+ final char[][] len = new char[ N_GROUPS ][ MAX_ALPHA_SIZE ];
+ /*
+ * Now the coding tables
+ */
+ for( int i = 0; i < groupCount; i++ )
+ {
+ int curr = bsR( 5 );
+ for( int j = 0; j < alphaSize; j++ )
+ {
+ while( bsR( 1 ) == 1 )
+ {
+ if( bsR( 1 ) == 0 )
+ {
+ curr++;
+ }
+ else
+ {
+ curr--;
+ }
+ }
+ len[ i ][ j ] = (char)curr;
+ }
+ }
+
+ /*
+ * Create the Huffman decoding tables
+ */
+ for( int k = 0; k < groupCount; k++ )
+ {
+ int minLen = 32;
+ int maxLen = 0;
+ for( int i = 0; i < alphaSize; i++ )
+ {
+ if( len[ k ][ i ] > maxLen )
+ {
+ maxLen = len[ k ][ i ];
+ }
+ if( len[ k ][ i ] < minLen )
+ {
+ minLen = len[ k ][ i ];
+ }
+ }
+ hbCreateDecodeTables( m_limit[ k ], m_base[ k ], m_perm[ k ], len[ k ], minLen,
+ maxLen, alphaSize );
+ m_minLens[ k ] = minLen;
+ }
+ }
+
+ private void buildInUseTable()
+ {
+ final boolean[] inUse16 = new boolean[ 16 ];
+
+ /*
+ * Receive the mapping table
+ */
+ for( int i = 0; i < 16; i++ )
+ {
+ if( bsR( 1 ) == 1 )
+ {
+ inUse16[ i ] = true;
+ }
+ else
+ {
+ inUse16[ i ] = false;
+ }
+ }
+
+ for( int i = 0; i < 256; i++ )
+ {
+ m_inUse[ i ] = false;
+ }
+
+ for( int i = 0; i < 16; i++ )
+ {
+ if( inUse16[ i ] )
+ {
+ for( int j = 0; j < 16; j++ )
+ {
+ if( bsR( 1 ) == 1 )
+ {
+ m_inUse[ i * 16 + j ] = true;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/jEdit/installer/CBZip2OutputStream.java b/jEdit/installer/CBZip2OutputStream.java
index 67b2c09..35ad2cc 100644
--- a/jEdit/installer/CBZip2OutputStream.java
+++ b/jEdit/installer/CBZip2OutputStream.java
@@ -1,2021 +1,2021 @@
-/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
-package installer;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * An output stream that compresses into the BZip2 format (without the file
- * header chars) into another stream. TODO: Update to BZip2 1.0.1
- *
- * @author <a href="mailto:keiron at aftexsw.com">Keiron Liddle</a>
- */
-public class CBZip2OutputStream
- extends OutputStream
- implements BZip2Constants
-{
- private static final int LOWER_BYTE_MASK = 0x000000ff;
- private static final int UPPER_BYTE_MASK = 0xffffff00;
- private static final int SETMASK = ( 1 << 21 );
- private static final int CLEARMASK = ( ~SETMASK );
- private static final int GREATER_ICOST = 15;
- private static final int LESSER_ICOST = 0;
- private static final int SMALL_THRESH = 20;
- private static final int DEPTH_THRESH = 10;
-
- /*
- * If you are ever unlucky/improbable enough
- * to get a stack overflow whilst sorting,
- * increase the following constant and try
- * again. In practice I have never seen the
- * stack go above 27 elems, so the following
- * limit seems very generous.
- */
- private static final int QSORT_STACK_SIZE = 1000;
-
- private CRC m_crc = new CRC();
-
- private boolean[] m_inUse = new boolean[ 256 ];
-
- private char[] m_seqToUnseq = new char[ 256 ];
- private char[] m_unseqToSeq = new char[ 256 ];
-
- private char[] m_selector = new char[ MAX_SELECTORS ];
- private char[] m_selectorMtf = new char[ MAX_SELECTORS ];
-
- private int[] m_mtfFreq = new int[ MAX_ALPHA_SIZE ];
-
- private int m_currentChar = -1;
- private int m_runLength;
-
- private boolean m_closed;
-
- /*
- * Knuth's increments seem to work better
- * than Incerpi-Sedgewick here. Possibly
- * because the number of elems to sort is
- * usually small, typically <= 20.
- */
- private int[] m_incs = new int[]
- {
- 1, 4, 13, 40, 121, 364, 1093, 3280,
- 9841, 29524, 88573, 265720,
- 797161, 2391484
- };
-
- private boolean m_blockRandomised;
-
- /*
- * always: in the range 0 .. 9.
- * The current block size is 100000 * this number.
- */
- private int m_blockSize100k;
- private int m_bsBuff;
- private int m_bsLive;
-
- /*
- * index of the last char in the block, so
- * the block size == last + 1.
- */
- private int m_last;
-
- /*
- * index in zptr[] of original string after sorting.
- */
- private int m_origPtr;
-
- private int m_allowableBlockSize;
-
- private char[] m_block;
-
- private int m_blockCRC;
- private int m_combinedCRC;
-
- private OutputStream m_bsStream;
- private boolean m_firstAttempt;
- private int[] m_ftab;
- private int m_nInUse;
-
- private int m_nMTF;
- private int[] m_quadrant;
- private short[] m_szptr;
- private int m_workDone;
-
- /*
- * Used when sorting. If too many long comparisons
- * happen, we stop sorting, randomise the block
- * slightly, and try again.
- */
- private int m_workFactor;
- private int m_workLimit;
- private int[] m_zptr;
-
- public CBZip2OutputStream( final OutputStream output )
- throws IOException
- {
- this( output, 9 );
- }
-
- public CBZip2OutputStream( final OutputStream output, final int blockSize )
- throws IOException
- {
- bsSetStream( output );
- m_workFactor = 50;
-
- int outBlockSize = blockSize;
- if( outBlockSize > 9 )
- {
- outBlockSize = 9;
- }
- if( outBlockSize < 1 )
- {
- outBlockSize = 1;
- }
- m_blockSize100k = outBlockSize;
- allocateCompressStructures();
- initialize();
- initBlock();
- }
-
- private static void hbMakeCodeLengths( char[] len, int[] freq,
- int alphaSize, int maxLen )
- {
- /*
- * Nodes and heap entries run from 1. Entry 0
- * for both the heap and nodes is a sentinel.
- */
- int nNodes;
- /*
- * Nodes and heap entries run from 1. Entry 0
- * for both the heap and nodes is a sentinel.
- */
- int nHeap;
- /*
- * Nodes and heap entries run from 1. Entry 0
- * for both the heap and nodes is a sentinel.
- */
- int n1;
- /*
- * Nodes and heap entries run from 1. Entry 0
- * for both the heap and nodes is a sentinel.
- */
- int n2;
- /*
- * Nodes and heap entries run from 1. Entry 0
- * for both the heap and nodes is a sentinel.
- */
- int i;
- /*
- * Nodes and heap entries run from 1. Entry 0
- * for both the heap and nodes is a sentinel.
- */
- int j;
- /*
- * Nodes and heap entries run from 1. Entry 0
- * for both the heap and nodes is a sentinel.
- */
- int k;
- boolean tooLong;
-
- int[] heap = new int[ MAX_ALPHA_SIZE + 2 ];
- int[] weights = new int[ MAX_ALPHA_SIZE * 2 ];
- int[] parent = new int[ MAX_ALPHA_SIZE * 2 ];
-
- for( i = 0; i < alphaSize; i++ )
- {
- weights[ i + 1 ] = ( freq[ i ] == 0 ? 1 : freq[ i ] ) << 8;
- }
-
- while( true )
- {
- nNodes = alphaSize;
- nHeap = 0;
-
- heap[ 0 ] = 0;
- weights[ 0 ] = 0;
- parent[ 0 ] = -2;
-
- for( i = 1; i <= alphaSize; i++ )
- {
- parent[ i ] = -1;
- nHeap++;
- heap[ nHeap ] = i;
- {
- int zz;
- int tmp;
- zz = nHeap;
- tmp = heap[ zz ];
- while( weights[ tmp ] < weights[ heap[ zz >> 1 ] ] )
- {
- heap[ zz ] = heap[ zz >> 1 ];
- zz >>= 1;
- }
- heap[ zz ] = tmp;
- }
- }
- if( !( nHeap < ( MAX_ALPHA_SIZE + 2 ) ) )
- {
- panic();
- }
-
- while( nHeap > 1 )
- {
- n1 = heap[ 1 ];
- heap[ 1 ] = heap[ nHeap ];
- nHeap--;
- {
- int zz = 0;
- int yy = 0;
- int tmp = 0;
- zz = 1;
- tmp = heap[ zz ];
- while( true )
- {
- yy = zz << 1;
- if( yy > nHeap )
- {
- break;
- }
- if( yy < nHeap &&
- weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )
- {
- yy++;
- }
- if( weights[ tmp ] < weights[ heap[ yy ] ] )
- {
- break;
- }
- heap[ zz ] = heap[ yy ];
- zz = yy;
- }
- heap[ zz ] = tmp;
- }
- n2 = heap[ 1 ];
- heap[ 1 ] = heap[ nHeap ];
- nHeap--;
- {
- int zz = 0;
- int yy = 0;
- int tmp = 0;
- zz = 1;
- tmp = heap[ zz ];
- while( true )
- {
- yy = zz << 1;
- if( yy > nHeap )
- {
- break;
- }
- if( yy < nHeap &&
- weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )
- {
- yy++;
- }
- if( weights[ tmp ] < weights[ heap[ yy ] ] )
- {
- break;
- }
- heap[ zz ] = heap[ yy ];
- zz = yy;
- }
- heap[ zz ] = tmp;
- }
- nNodes++;
- parent[ n1 ] = nNodes;
- parent[ n2 ] = nNodes;
-
- final int v1 = weights[ n1 ];
- final int v2 = weights[ n2 ];
- final int weight = calculateWeight( v1, v2 );
- weights[ nNodes ] = weight;
-
- parent[ nNodes ] = -1;
- nHeap++;
- heap[ nHeap ] = nNodes;
- {
- int zz = 0;
- int tmp = 0;
- zz = nHeap;
- tmp = heap[ zz ];
- while( weights[ tmp ] < weights[ heap[ zz >> 1 ] ] )
- {
- heap[ zz ] = heap[ zz >> 1 ];
- zz >>= 1;
- }
- heap[ zz ] = tmp;
- }
- }
- if( !( nNodes < ( MAX_ALPHA_SIZE * 2 ) ) )
- {
- panic();
- }
-
- tooLong = false;
- for( i = 1; i <= alphaSize; i++ )
- {
- j = 0;
- k = i;
- while( parent[ k ] >= 0 )
- {
- k = parent[ k ];
- j++;
- }
- len[ i - 1 ] = (char)j;
- if( j > maxLen )
- {
- tooLong = true;
- }
- }
-
- if( !tooLong )
- {
- break;
- }
-
- for( i = 1; i < alphaSize; i++ )
- {
- j = weights[ i ] >> 8;
- j = 1 + ( j / 2 );
- weights[ i ] = j << 8;
- }
- }
- }
-
- private static int calculateWeight( final int v1, final int v2 )
- {
- final int upper = ( v1 & UPPER_BYTE_MASK ) + ( v2 & UPPER_BYTE_MASK );
- final int v1Lower = ( v1 & LOWER_BYTE_MASK );
- final int v2Lower = ( v2 & LOWER_BYTE_MASK );
- final int nnnn = ( v1Lower > v2Lower ) ? v1Lower : v2Lower;
- return upper | ( 1 + nnnn );
- }
-
- private static void panic()
- {
- System.out.println( "panic" );
- //throw new CError();
- }
-
- public void close()
- throws IOException
- {
- if( m_closed )
- {
- return;
- }
-
- if( m_runLength > 0 )
- {
- writeRun();
- }
- m_currentChar = -1;
- endBlock();
- endCompression();
- m_closed = true;
- super.close();
- m_bsStream.close();
- }
-
- public void finalize()
- throws Throwable
- {
- close();
- }
-
- public void flush()
- throws IOException
- {
- super.flush();
- m_bsStream.flush();
- }
-
- /**
- * modified by Oliver Merkel, 010128
- *
- * @param bv Description of Parameter
- * @exception java.io.IOException Description of Exception
- */
- public void write( int bv )
- throws IOException
- {
- int b = ( 256 + bv ) % 256;
- if( m_currentChar != -1 )
- {
- if( m_currentChar == b )
- {
- m_runLength++;
- if( m_runLength > 254 )
- {
- writeRun();
- m_currentChar = -1;
- m_runLength = 0;
- }
- }
- else
- {
- writeRun();
- m_runLength = 1;
- m_currentChar = b;
- }
- }
- else
- {
- m_currentChar = b;
- m_runLength++;
- }
- }
-
- private void allocateCompressStructures()
- {
- int n = BASE_BLOCK_SIZE * m_blockSize100k;
- m_block = new char[ ( n + 1 + NUM_OVERSHOOT_BYTES ) ];
- m_quadrant = new int[ ( n + NUM_OVERSHOOT_BYTES ) ];
- m_zptr = new int[ n ];
- m_ftab = new int[ 65537 ];
-
- if( m_block == null || m_quadrant == null || m_zptr == null
- || m_ftab == null )
- {
- //int totalDraw = (n + 1 + NUM_OVERSHOOT_BYTES) + (n + NUM_OVERSHOOT_BYTES) + n + 65537;
- //compressOutOfMemory ( totalDraw, n );
- }
-
- /*
- * The back end needs a place to store the MTF values
- * whilst it calculates the coding tables. We could
- * put them in the zptr array. However, these values
- * will fit in a short, so we overlay szptr at the
- * start of zptr, in the hope of reducing the number
- * of cache misses induced by the multiple traversals
- * of the MTF values when calculating coding tables.
- * Seems to improve compression speed by about 1%.
- */
- // szptr = zptr;
-
- m_szptr = new short[ 2 * n ];
- }
-
- private void bsFinishedWithStream()
- throws IOException
- {
- while( m_bsLive > 0 )
- {
- int ch = ( m_bsBuff >> 24 );
- try
- {
- m_bsStream.write( ch );// write 8-bit
- }
- catch( IOException e )
- {
- throw e;
- }
- m_bsBuff <<= 8;
- m_bsLive -= 8;
- }
- }
-
- private void bsPutIntVS( int numBits, int c )
- throws IOException
- {
- bsW( numBits, c );
- }
-
- private void bsPutUChar( int c )
- throws IOException
- {
- bsW( 8, c );
- }
-
- private void bsPutint( int u )
- throws IOException
- {
- bsW( 8, ( u >> 24 ) & 0xff );
- bsW( 8, ( u >> 16 ) & 0xff );
- bsW( 8, ( u >> 8 ) & 0xff );
- bsW( 8, u & 0xff );
- }
-
- private void bsSetStream( OutputStream f )
- {
- m_bsStream = f;
- m_bsLive = 0;
- m_bsBuff = 0;
- }
-
- private void bsW( int n, int v )
- throws IOException
- {
- while( m_bsLive >= 8 )
- {
- int ch = ( m_bsBuff >> 24 );
- try
- {
- m_bsStream.write( ch );// write 8-bit
- }
- catch( IOException e )
- {
- throw e;
- }
- m_bsBuff <<= 8;
- m_bsLive -= 8;
- }
- m_bsBuff |= ( v << ( 32 - m_bsLive - n ) );
- m_bsLive += n;
- }
-
- private void doReversibleTransformation()
- {
- int i;
-
- m_workLimit = m_workFactor * m_last;
- m_workDone = 0;
- m_blockRandomised = false;
- m_firstAttempt = true;
-
- mainSort();
-
- if( m_workDone > m_workLimit && m_firstAttempt )
- {
- randomiseBlock();
- m_workLimit = 0;
- m_workDone = 0;
- m_blockRandomised = true;
- m_firstAttempt = false;
- mainSort();
- }
-
- m_origPtr = -1;
- for( i = 0; i <= m_last; i++ )
- {
- if( m_zptr[ i ] == 0 )
- {
- m_origPtr = i;
- break;
- }
- }
- ;
-
- if( m_origPtr == -1 )
- {
- panic();
- }
- }
-
- private void endBlock()
- throws IOException
- {
- m_blockCRC = m_crc.getFinalCRC();
- m_combinedCRC = ( m_combinedCRC << 1 ) | ( m_combinedCRC >>> 31 );
- m_combinedCRC ^= m_blockCRC;
-
- /*
- * sort the block and establish posn of original string
- */
- doReversibleTransformation();
-
- /*
- * A 6-byte block header, the value chosen arbitrarily
- * as 0x314159265359 :-). A 32 bit value does not really
- * give a strong enough guarantee that the value will not
- * appear by chance in the compressed datastream. Worst-case
- * probability of this event, for a 900k block, is about
- * 2.0e-3 for 32 bits, 1.0e-5 for 40 bits and 4.0e-8 for 48 bits.
- * For a compressed file of size 100Gb -- about 100000 blocks --
- * only a 48-bit marker will do. NB: normal compression/
- * decompression do *not* rely on these statistical properties.
- * They are only important when trying to recover blocks from
- * damaged files.
- */
- bsPutUChar( 0x31 );
- bsPutUChar( 0x41 );
- bsPutUChar( 0x59 );
- bsPutUChar( 0x26 );
- bsPutUChar( 0x53 );
- bsPutUChar( 0x59 );
-
- /*
- * Now the block's CRC, so it is in a known place.
- */
- bsPutint( m_blockCRC );
-
- /*
- * Now a single bit indicating randomisation.
- */
- if( m_blockRandomised )
- {
- bsW( 1, 1 );
- }
- else
- {
- bsW( 1, 0 );
- }
-
- /*
- * Finally, block's contents proper.
- */
- moveToFrontCodeAndSend();
- }
-
- private void endCompression()
- throws IOException
- {
- /*
- * Now another magic 48-bit number, 0x177245385090, to
- * indicate the end of the last block. (sqrt(pi), if
- * you want to know. I did want to use e, but it contains
- * too much repetition -- 27 18 28 18 28 46 -- for me
- * to feel statistically comfortable. Call me paranoid.)
- */
- bsPutUChar( 0x17 );
- bsPutUChar( 0x72 );
- bsPutUChar( 0x45 );
- bsPutUChar( 0x38 );
- bsPutUChar( 0x50 );
- bsPutUChar( 0x90 );
-
- bsPutint( m_combinedCRC );
-
- bsFinishedWithStream();
- }
-
- private boolean fullGtU( int i1, int i2 )
- {
- int k;
- char c1;
- char c2;
- int s1;
- int s2;
-
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- i1++;
- i2++;
-
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- i1++;
- i2++;
-
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- i1++;
- i2++;
-
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- i1++;
- i2++;
-
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- i1++;
- i2++;
-
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- i1++;
- i2++;
-
- k = m_last + 1;
-
- do
- {
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- s1 = m_quadrant[ i1 ];
- s2 = m_quadrant[ i2 ];
- if( s1 != s2 )
- {
- return ( s1 > s2 );
- }
- i1++;
- i2++;
-
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- s1 = m_quadrant[ i1 ];
- s2 = m_quadrant[ i2 ];
- if( s1 != s2 )
- {
- return ( s1 > s2 );
- }
- i1++;
- i2++;
-
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- s1 = m_quadrant[ i1 ];
- s2 = m_quadrant[ i2 ];
- if( s1 != s2 )
- {
- return ( s1 > s2 );
- }
- i1++;
- i2++;
-
- c1 = m_block[ i1 + 1 ];
- c2 = m_block[ i2 + 1 ];
- if( c1 != c2 )
- {
- return ( c1 > c2 );
- }
- s1 = m_quadrant[ i1 ];
- s2 = m_quadrant[ i2 ];
- if( s1 != s2 )
- {
- return ( s1 > s2 );
- }
- i1++;
- i2++;
-
- if( i1 > m_last )
- {
- i1 -= m_last;
- i1--;
- }
- ;
- if( i2 > m_last )
- {
- i2 -= m_last;
- i2--;
- }
- ;
-
- k -= 4;
- m_workDone++;
- } while( k >= 0 );
-
- return false;
- }
-
- private void generateMTFValues()
- {
- char[] yy = new char[ 256 ];
- int i;
- int j;
- char tmp;
- char tmp2;
- int zPend;
- int wr;
- int EOB;
-
- makeMaps();
- EOB = m_nInUse + 1;
-
- for( i = 0; i <= EOB; i++ )
- {
- m_mtfFreq[ i ] = 0;
- }
-
- wr = 0;
- zPend = 0;
- for( i = 0; i < m_nInUse; i++ )
- {
- yy[ i ] = (char)i;
- }
-
- for( i = 0; i <= m_last; i++ )
- {
- char ll_i;
-
- ll_i = m_unseqToSeq[ m_block[ m_zptr[ i ] ] ];
-
- j = 0;
- tmp = yy[ j ];
- while( ll_i != tmp )
- {
- j++;
- tmp2 = tmp;
- tmp = yy[ j ];
- yy[ j ] = tmp2;
- }
- ;
- yy[ 0 ] = tmp;
-
- if( j == 0 )
- {
- zPend++;
- }
- else
- {
- if( zPend > 0 )
- {
- zPend--;
- while( true )
- {
- switch( zPend % 2 )
- {
- case 0:
- m_szptr[ wr ] = (short)RUNA;
- wr++;
- m_mtfFreq[ RUNA ]++;
- break;
- case 1:
- m_szptr[ wr ] = (short)RUNB;
- wr++;
- m_mtfFreq[ RUNB ]++;
- break;
- }
- ;
- if( zPend < 2 )
- {
- break;
- }
- zPend = ( zPend - 2 ) / 2;
- }
- ;
- zPend = 0;
- }
- m_szptr[ wr ] = (short)( j + 1 );
- wr++;
- m_mtfFreq[ j + 1 ]++;
- }
- }
-
- if( zPend > 0 )
- {
- zPend--;
- while( true )
- {
- switch( zPend % 2 )
- {
- case 0:
- m_szptr[ wr ] = (short)RUNA;
- wr++;
- m_mtfFreq[ RUNA ]++;
- break;
- case 1:
- m_szptr[ wr ] = (short)RUNB;
- wr++;
- m_mtfFreq[ RUNB ]++;
- break;
- }
- if( zPend < 2 )
- {
- break;
- }
- zPend = ( zPend - 2 ) / 2;
- }
- }
-
- m_szptr[ wr ] = (short)EOB;
- wr++;
- m_mtfFreq[ EOB ]++;
-
- m_nMTF = wr;
- }
-
- private void hbAssignCodes( int[] code, char[] length, int minLen,
- int maxLen, int alphaSize )
- {
- int n;
- int vec;
- int i;
-
- vec = 0;
- for( n = minLen; n <= maxLen; n++ )
- {
- for( i = 0; i < alphaSize; i++ )
- {
- if( length[ i ] == n )
- {
- code[ i ] = vec;
- vec++;
- }
- }
- ;
- vec <<= 1;
- }
- }
-
- private void initBlock()
- {
- // blockNo++;
- m_crc.initialiseCRC();
- m_last = -1;
- // ch = 0;
-
- for( int i = 0; i < 256; i++ )
- {
- m_inUse[ i ] = false;
- }
-
- /*
- * 20 is just a paranoia constant
- */
- m_allowableBlockSize = BASE_BLOCK_SIZE * m_blockSize100k - 20;
- }
-
- private void initialize()
- throws IOException
- {
- /*
- * Write `magic' bytes h indicating file-format == huffmanised,
- * followed by a digit indicating blockSize100k.
- */
- bsPutUChar( 'h' );
- bsPutUChar( '0' + m_blockSize100k );
-
- m_combinedCRC = 0;
- }
-
- private void mainSort()
- {
- int i;
- int j;
- int ss;
- int sb;
- int[] runningOrder = new int[ 256 ];
- int[] copy = new int[ 256 ];
- boolean[] bigDone = new boolean[ 256 ];
- int c1;
- int c2;
-
- /*
- * In the various block-sized structures, live data runs
- * from 0 to last+NUM_OVERSHOOT_BYTES inclusive. First,
- * set up the overshoot area for block.
- */
- // if (verbosity >= 4) fprintf ( stderr, " sort initialise ...\n" );
- for( i = 0; i < NUM_OVERSHOOT_BYTES; i++ )
- {
- m_block[ m_last + i + 2 ] = m_block[ ( i % ( m_last + 1 ) ) + 1 ];
- }
- for( i = 0; i <= m_last + NUM_OVERSHOOT_BYTES; i++ )
- {
- m_quadrant[ i ] = 0;
- }
-
- m_block[ 0 ] = m_block[ m_last + 1 ];
-
- if( m_last < 4000 )
- {
- /*
- * Use simpleSort(), since the full sorting mechanism
- * has quite a large constant overhead.
- */
- for( i = 0; i <= m_last; i++ )
- {
- m_zptr[ i ] = i;
- }
- m_firstAttempt = false;
- m_workDone = 0;
- m_workLimit = 0;
- simpleSort( 0, m_last, 0 );
- }
- else
- {
- for( i = 0; i <= 255; i++ )
- {
- bigDone[ i ] = false;
- }
-
- for( i = 0; i <= 65536; i++ )
- {
- m_ftab[ i ] = 0;
- }
-
- c1 = m_block[ 0 ];
- for( i = 0; i <= m_last; i++ )
- {
- c2 = m_block[ i + 1 ];
- m_ftab[ ( c1 << 8 ) + c2 ]++;
- c1 = c2;
- }
-
- for( i = 1; i <= 65536; i++ )
- {
- m_ftab[ i ] += m_ftab[ i - 1 ];
- }
-
- c1 = m_block[ 1 ];
- for( i = 0; i < m_last; i++ )
- {
- c2 = m_block[ i + 2 ];
- j = ( c1 << 8 ) + c2;
- c1 = c2;
- m_ftab[ j ]--;
- m_zptr[ m_ftab[ j ] ] = i;
- }
-
- j = ( ( m_block[ m_last + 1 ] ) << 8 ) + ( m_block[ 1 ] );
- m_ftab[ j ]--;
- m_zptr[ m_ftab[ j ] ] = m_last;
-
- /*
- * Now ftab contains the first loc of every small bucket.
- * Calculate the running order, from smallest to largest
- * big bucket.
- */
- for( i = 0; i <= 255; i++ )
- {
- runningOrder[ i ] = i;
- }
- {
- int vv;
- int h = 1;
- do
- {
- h = 3 * h + 1;
- } while( h <= 256 );
- do
- {
- h = h / 3;
- for( i = h; i <= 255; i++ )
- {
- vv = runningOrder[ i ];
- j = i;
- while( ( m_ftab[ ( ( runningOrder[ j - h ] ) + 1 ) << 8 ]
- - m_ftab[ ( runningOrder[ j - h ] ) << 8 ] ) >
- ( m_ftab[ ( ( vv ) + 1 ) << 8 ] - m_ftab[ ( vv ) << 8 ] ) )
- {
- runningOrder[ j ] = runningOrder[ j - h ];
- j = j - h;
- if( j <= ( h - 1 ) )
- {
- break;
- }
- }
- runningOrder[ j ] = vv;
- }
- } while( h != 1 );
- }
-
- /*
- * The main sorting loop.
- */
- for( i = 0; i <= 255; i++ )
- {
-
- /*
- * Process big buckets, starting with the least full.
- */
- ss = runningOrder[ i ];
-
- /*
- * Complete the big bucket [ss] by quicksorting
- * any unsorted small buckets [ss, j]. Hopefully
- * previous pointer-scanning phases have already
- * completed many of the small buckets [ss, j], so
- * we don't have to sort them at all.
- */
- for( j = 0; j <= 255; j++ )
- {
- sb = ( ss << 8 ) + j;
- if( !( ( m_ftab[ sb ] & SETMASK ) == SETMASK ) )
- {
- int lo = m_ftab[ sb ] & CLEARMASK;
- int hi = ( m_ftab[ sb + 1 ] & CLEARMASK ) - 1;
- if( hi > lo )
- {
- qSort3( lo, hi, 2 );
- if( m_workDone > m_workLimit && m_firstAttempt )
- {
- return;
- }
- }
- m_ftab[ sb ] |= SETMASK;
- }
- }
-
- /*
- * The ss big bucket is now done. Record this fact,
- * and update the quadrant descriptors. Remember to
- * update quadrants in the overshoot area too, if
- * necessary. The "if (i < 255)" test merely skips
- * this updating for the last bucket processed, since
- * updating for the last bucket is pointless.
- */
- bigDone[ ss ] = true;
-
- if( i < 255 )
- {
- int bbStart = m_ftab[ ss << 8 ] & CLEARMASK;
- int bbSize = ( m_ftab[ ( ss + 1 ) << 8 ] & CLEARMASK ) - bbStart;
- int shifts = 0;
-
- while( ( bbSize >> shifts ) > 65534 )
- {
- shifts++;
- }
-
- for( j = 0; j < bbSize; j++ )
- {
- int a2update = m_zptr[ bbStart + j ];
- int qVal = ( j >> shifts );
- m_quadrant[ a2update ] = qVal;
- if( a2update < NUM_OVERSHOOT_BYTES )
- {
- m_quadrant[ a2update + m_last + 1 ] = qVal;
- }
- }
-
- if( !( ( ( bbSize - 1 ) >> shifts ) <= 65535 ) )
- {
- panic();
- }
- }
-
- /*
- * Now scan this big bucket so as to synthesise the
- * sorted order for small buckets [t, ss] for all t != ss.
- */
- for( j = 0; j <= 255; j++ )
- {
- copy[ j ] = m_ftab[ ( j << 8 ) + ss ] & CLEARMASK;
- }
-
- for( j = m_ftab[ ss << 8 ] & CLEARMASK;
- j < ( m_ftab[ ( ss + 1 ) << 8 ] & CLEARMASK ); j++ )
- {
- c1 = m_block[ m_zptr[ j ] ];
- if( !bigDone[ c1 ] )
- {
- m_zptr[ copy[ c1 ] ] = m_zptr[ j ] == 0 ? m_last : m_zptr[ j ] - 1;
- copy[ c1 ]++;
- }
- }
-
- for( j = 0; j <= 255; j++ )
- {
- m_ftab[ ( j << 8 ) + ss ] |= SETMASK;
- }
- }
- }
- }
-
- private void makeMaps()
- {
- int i;
- m_nInUse = 0;
- for( i = 0; i < 256; i++ )
- {
- if( m_inUse[ i ] )
- {
- m_seqToUnseq[ m_nInUse ] = (char)i;
- m_unseqToSeq[ i ] = (char)m_nInUse;
- m_nInUse++;
- }
- }
- }
-
- private char med3( char a, char b, char c )
- {
- char t;
- if( a > b )
- {
- t = a;
- a = b;
- b = t;
- }
- if( b > c )
- {
- t = b;
- b = c;
- c = t;
- }
- if( a > b )
- {
- b = a;
- }
- return b;
- }
-
- private void moveToFrontCodeAndSend()
- throws IOException
- {
- bsPutIntVS( 24, m_origPtr );
- generateMTFValues();
- sendMTFValues();
- }
-
- private void qSort3( int loSt, int hiSt, int dSt )
- {
- int unLo;
- int unHi;
- int ltLo;
- int gtHi;
- int med;
- int n;
- int m;
- int sp;
- int lo;
- int hi;
- int d;
- StackElem[] stack = new StackElem[ QSORT_STACK_SIZE ];
- for( int count = 0; count < QSORT_STACK_SIZE; count++ )
- {
- stack[ count ] = new StackElem();
- }
-
- sp = 0;
-
- stack[ sp ].m_ll = loSt;
- stack[ sp ].m_hh = hiSt;
- stack[ sp ].m_dd = dSt;
- sp++;
-
- while( sp > 0 )
- {
- if( sp >= QSORT_STACK_SIZE )
- {
- panic();
- }
-
- sp--;
- lo = stack[ sp ].m_ll;
- hi = stack[ sp ].m_hh;
- d = stack[ sp ].m_dd;
-
- if( hi - lo < SMALL_THRESH || d > DEPTH_THRESH )
- {
- simpleSort( lo, hi, d );
- if( m_workDone > m_workLimit && m_firstAttempt )
- {
- return;
- }
- continue;
- }
-
- med = med3( m_block[ m_zptr[ lo ] + d + 1 ],
- m_block[ m_zptr[ hi ] + d + 1 ],
- m_block[ m_zptr[ ( lo + hi ) >> 1 ] + d + 1 ] );
-
- unLo = lo;
- ltLo = lo;
- unHi = hi;
- gtHi = hi;
-
- while( true )
- {
- while( true )
- {
- if( unLo > unHi )
- {
- break;
- }
- n = m_block[ m_zptr[ unLo ] + d + 1 ] - med;
- if( n == 0 )
- {
- int temp = 0;
- temp = m_zptr[ unLo ];
- m_zptr[ unLo ] = m_zptr[ ltLo ];
- m_zptr[ ltLo ] = temp;
- ltLo++;
- unLo++;
- continue;
- }
- ;
- if( n > 0 )
- {
- break;
- }
- unLo++;
- }
- while( true )
- {
- if( unLo > unHi )
- {
- break;
- }
- n = m_block[ m_zptr[ unHi ] + d + 1 ] - med;
- if( n == 0 )
- {
- int temp = 0;
- temp = m_zptr[ unHi ];
- m_zptr[ unHi ] = m_zptr[ gtHi ];
- m_zptr[ gtHi ] = temp;
- gtHi--;
- unHi--;
- continue;
- }
- ;
- if( n < 0 )
- {
- break;
- }
- unHi--;
- }
- if( unLo > unHi )
- {
- break;
- }
- int temp = 0;
- temp = m_zptr[ unLo ];
- m_zptr[ unLo ] = m_zptr[ unHi ];
- m_zptr[ unHi ] = temp;
- unLo++;
- unHi--;
- }
-
- if( gtHi < ltLo )
- {
- stack[ sp ].m_ll = lo;
- stack[ sp ].m_hh = hi;
- stack[ sp ].m_dd = d + 1;
- sp++;
- continue;
- }
-
- n = ( ( ltLo - lo ) < ( unLo - ltLo ) ) ? ( ltLo - lo ) : ( unLo - ltLo );
- vswap( lo, unLo - n, n );
- m = ( ( hi - gtHi ) < ( gtHi - unHi ) ) ? ( hi - gtHi ) : ( gtHi - unHi );
- vswap( unLo, hi - m + 1, m );
-
- n = lo + unLo - ltLo - 1;
- m = hi - ( gtHi - unHi ) + 1;
-
- stack[ sp ].m_ll = lo;
- stack[ sp ].m_hh = n;
- stack[ sp ].m_dd = d;
- sp++;
-
- stack[ sp ].m_ll = n + 1;
- stack[ sp ].m_hh = m - 1;
- stack[ sp ].m_dd = d + 1;
- sp++;
-
- stack[ sp ].m_ll = m;
- stack[ sp ].m_hh = hi;
- stack[ sp ].m_dd = d;
- sp++;
- }
- }
-
- private void randomiseBlock()
- {
- int i;
- int rNToGo = 0;
- int rTPos = 0;
- for( i = 0; i < 256; i++ )
- {
- m_inUse[ i ] = false;
- }
-
- for( i = 0; i <= m_last; i++ )
- {
- if( rNToGo == 0 )
- {
- rNToGo = (char)RAND_NUMS[ rTPos ];
- rTPos++;
- if( rTPos == 512 )
- {
- rTPos = 0;
- }
- }
- rNToGo--;
- m_block[ i + 1 ] ^= ( ( rNToGo == 1 ) ? 1 : 0 );
- // handle 16 bit signed numbers
- m_block[ i + 1 ] &= 0xFF;
-
- m_inUse[ m_block[ i + 1 ] ] = true;
- }
- }
-
- private void sendMTFValues()
- throws IOException
- {
- char[][] len = new char[ N_GROUPS ][ MAX_ALPHA_SIZE ];
-
- int v;
-
- int t;
-
- int i;
-
- int j;
-
- int gs;
-
- int ge;
-
- int bt;
-
- int bc;
-
- int iter;
- int nSelectors = 0;
- int alphaSize;
- int minLen;
- int maxLen;
- int selCtr;
- int nGroups;
-
- alphaSize = m_nInUse + 2;
- for( t = 0; t < N_GROUPS; t++ )
- {
- for( v = 0; v < alphaSize; v++ )
- {
- len[ t ][ v ] = (char)GREATER_ICOST;
- }
- }
-
- /*
- * Decide how many coding tables to use
- */
- if( m_nMTF <= 0 )
- {
- panic();
- }
-
- if( m_nMTF < 200 )
- {
- nGroups = 2;
- }
- else if( m_nMTF < 600 )
- {
- nGroups = 3;
- }
- else if( m_nMTF < 1200 )
- {
- nGroups = 4;
- }
- else if( m_nMTF < 2400 )
- {
- nGroups = 5;
- }
- else
- {
- nGroups = 6;
- }
- {
- /*
- * Generate an initial set of coding tables
- */
- int nPart;
- int remF;
- int tFreq;
- int aFreq;
-
- nPart = nGroups;
- remF = m_nMTF;
- gs = 0;
- while( nPart > 0 )
- {
- tFreq = remF / nPart;
- ge = gs - 1;
- aFreq = 0;
- while( aFreq < tFreq && ge < alphaSize - 1 )
- {
- ge++;
- aFreq += m_mtfFreq[ ge ];
- }
-
- if( ge > gs && nPart != nGroups && nPart != 1
- && ( ( nGroups - nPart ) % 2 == 1 ) )
- {
- aFreq -= m_mtfFreq[ ge ];
- ge--;
- }
-
- for( v = 0; v < alphaSize; v++ )
- {
- if( v >= gs && v <= ge )
- {
- len[ nPart - 1 ][ v ] = (char)LESSER_ICOST;
- }
- else
- {
- len[ nPart - 1 ][ v ] = (char)GREATER_ICOST;
- }
- }
-
- nPart--;
- gs = ge + 1;
- remF -= aFreq;
- }
- }
-
- int[][] rfreq = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
- int[] fave = new int[ N_GROUPS ];
- short[] cost = new short[ N_GROUPS ];
- /*
- * Iterate up to N_ITERS times to improve the tables.
- */
- for( iter = 0; iter < N_ITERS; iter++ )
- {
- for( t = 0; t < nGroups; t++ )
- {
- fave[ t ] = 0;
- }
-
- for( t = 0; t < nGroups; t++ )
- {
- for( v = 0; v < alphaSize; v++ )
- {
- rfreq[ t ][ v ] = 0;
- }
- }
-
- nSelectors = 0;
- gs = 0;
- while( true )
- {
-
- /*
- * Set group start & end marks.
- */
- if( gs >= m_nMTF )
- {
- break;
- }
- ge = gs + G_SIZE - 1;
- if( ge >= m_nMTF )
- {
- ge = m_nMTF - 1;
- }
-
- /*
- * Calculate the cost of this group as coded
- * by each of the coding tables.
- */
- for( t = 0; t < nGroups; t++ )
- {
- cost[ t ] = 0;
- }
-
- if( nGroups == 6 )
- {
- short cost0 = 0;
- short cost1 = 0;
- short cost2 = 0;
- short cost3 = 0;
- short cost4 = 0;
- short cost5 = 0;
-
- for( i = gs; i <= ge; i++ )
- {
- short icv = m_szptr[ i ];
- cost0 += len[ 0 ][ icv ];
- cost1 += len[ 1 ][ icv ];
- cost2 += len[ 2 ][ icv ];
- cost3 += len[ 3 ][ icv ];
- cost4 += len[ 4 ][ icv ];
- cost5 += len[ 5 ][ icv ];
- }
- cost[ 0 ] = cost0;
- cost[ 1 ] = cost1;
- cost[ 2 ] = cost2;
- cost[ 3 ] = cost3;
- cost[ 4 ] = cost4;
- cost[ 5 ] = cost5;
- }
- else
- {
- for( i = gs; i <= ge; i++ )
- {
- short icv = m_szptr[ i ];
- for( t = 0; t < nGroups; t++ )
- {
- cost[ t ] += len[ t ][ icv ];
- }
- }
- }
-
- /*
- * Find the coding table which is best for this group,
- * and record its identity in the selector table.
- */
- bc = 999999999;
- bt = -1;
- for( t = 0; t < nGroups; t++ )
- {
- if( cost[ t ] < bc )
- {
- bc = cost[ t ];
- bt = t;
- }
- }
- ;
- fave[ bt ]++;
- m_selector[ nSelectors ] = (char)bt;
- nSelectors++;
-
- /*
- * Increment the symbol frequencies for the selected table.
- */
- for( i = gs; i <= ge; i++ )
- {
- rfreq[ bt ][ m_szptr[ i ] ]++;
- }
-
- gs = ge + 1;
- }
-
- /*
- * Recompute the tables based on the accumulated frequencies.
- */
- for( t = 0; t < nGroups; t++ )
- {
- hbMakeCodeLengths( len[ t ], rfreq[ t ], alphaSize, 20 );
- }
- }
-
- rfreq = null;
- fave = null;
- cost = null;
-
- if( !( nGroups < 8 ) )
- {
- panic();
- }
- if( !( nSelectors < 32768 && nSelectors <= ( 2 + ( 900000 / G_SIZE ) ) ) )
- {
- panic();
- }
- {
- /*
- * Compute MTF values for the selectors.
- */
- char[] pos = new char[ N_GROUPS ];
- char ll_i;
- char tmp2;
- char tmp;
- for( i = 0; i < nGroups; i++ )
- {
- pos[ i ] = (char)i;
- }
- for( i = 0; i < nSelectors; i++ )
- {
- ll_i = m_selector[ i ];
- j = 0;
- tmp = pos[ j ];
- while( ll_i != tmp )
- {
- j++;
- tmp2 = tmp;
- tmp = pos[ j ];
- pos[ j ] = tmp2;
- }
- pos[ 0 ] = tmp;
- m_selectorMtf[ i ] = (char)j;
- }
- }
-
- int[][] code = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
-
- /*
- * Assign actual codes for the tables.
- */
- for( t = 0; t < nGroups; t++ )
- {
- minLen = 32;
- maxLen = 0;
- for( i = 0; i < alphaSize; i++ )
- {
- if( len[ t ][ i ] > maxLen )
- {
- maxLen = len[ t ][ i ];
- }
- if( len[ t ][ i ] < minLen )
- {
- minLen = len[ t ][ i ];
- }
- }
- if( maxLen > 20 )
- {
- panic();
- }
- if( minLen < 1 )
- {
- panic();
- }
- hbAssignCodes( code[ t ], len[ t ], minLen, maxLen, alphaSize );
- }
- {
- /*
- * Transmit the mapping table.
- */
- boolean[] inUse16 = new boolean[ 16 ];
- for( i = 0; i < 16; i++ )
- {
- inUse16[ i ] = false;
- for( j = 0; j < 16; j++ )
- {
- if( m_inUse[ i * 16 + j ] )
- {
- inUse16[ i ] = true;
- }
- }
- }
-
- for( i = 0; i < 16; i++ )
- {
- if( inUse16[ i ] )
- {
- bsW( 1, 1 );
- }
- else
- {
- bsW( 1, 0 );
- }
- }
-
- for( i = 0; i < 16; i++ )
- {
- if( inUse16[ i ] )
- {
- for( j = 0; j < 16; j++ )
- {
- if( m_inUse[ i * 16 + j ] )
- {
- bsW( 1, 1 );
- }
- else
- {
- bsW( 1, 0 );
- }
- }
- }
- }
-
- }
-
- /*
- * Now the selectors.
- */
- bsW( 3, nGroups );
- bsW( 15, nSelectors );
- for( i = 0; i < nSelectors; i++ )
- {
- for( j = 0; j < m_selectorMtf[ i ]; j++ )
- {
- bsW( 1, 1 );
- }
- bsW( 1, 0 );
- }
-
- for( t = 0; t < nGroups; t++ )
- {
- int curr = len[ t ][ 0 ];
- bsW( 5, curr );
- for( i = 0; i < alphaSize; i++ )
- {
- while( curr < len[ t ][ i ] )
- {
- bsW( 2, 2 );
- curr++;
- /*
- * 10
- */
- }
- while( curr > len[ t ][ i ] )
- {
- bsW( 2, 3 );
- curr--;
- /*
- * 11
- */
- }
- bsW( 1, 0 );
- }
- }
-
- /*
- * And finally, the block data proper
- */
- selCtr = 0;
- gs = 0;
- while( true )
- {
- if( gs >= m_nMTF )
- {
- break;
- }
- ge = gs + G_SIZE - 1;
- if( ge >= m_nMTF )
- {
- ge = m_nMTF - 1;
- }
- for( i = gs; i <= ge; i++ )
- {
- bsW( len[ m_selector[ selCtr ] ][ m_szptr[ i ] ],
- code[ m_selector[ selCtr ] ][ m_szptr[ i ] ] );
- }
-
- gs = ge + 1;
- selCtr++;
- }
- if( !( selCtr == nSelectors ) )
- {
- panic();
- }
- }
-
- private void simpleSort( int lo, int hi, int d )
- {
- int i;
- int j;
- int h;
- int bigN;
- int hp;
- int v;
-
- bigN = hi - lo + 1;
- if( bigN < 2 )
- {
- return;
- }
-
- hp = 0;
- while( m_incs[ hp ] < bigN )
- {
- hp++;
- }
- hp--;
-
- for( ; hp >= 0; hp-- )
- {
- h = m_incs[ hp ];
-
- i = lo + h;
- while( true )
- {
- /*
- * copy 1
- */
- if( i > hi )
- {
- break;
- }
- v = m_zptr[ i ];
- j = i;
- while( fullGtU( m_zptr[ j - h ] + d, v + d ) )
- {
- m_zptr[ j ] = m_zptr[ j - h ];
- j = j - h;
- if( j <= ( lo + h - 1 ) )
- {
- break;
- }
- }
- m_zptr[ j ] = v;
- i++;
-
- /*
- * copy 2
- */
- if( i > hi )
- {
- break;
- }
- v = m_zptr[ i ];
- j = i;
- while( fullGtU( m_zptr[ j - h ] + d, v + d ) )
- {
- m_zptr[ j ] = m_zptr[ j - h ];
- j = j - h;
- if( j <= ( lo + h - 1 ) )
- {
- break;
- }
- }
- m_zptr[ j ] = v;
- i++;
-
- /*
- * copy 3
- */
- if( i > hi )
- {
- break;
- }
- v = m_zptr[ i ];
- j = i;
- while( fullGtU( m_zptr[ j - h ] + d, v + d ) )
- {
- m_zptr[ j ] = m_zptr[ j - h ];
- j = j - h;
- if( j <= ( lo + h - 1 ) )
- {
- break;
- }
- }
- m_zptr[ j ] = v;
- i++;
-
- if( m_workDone > m_workLimit && m_firstAttempt )
- {
- return;
- }
- }
- }
- }
-
- private void vswap( int p1, int p2, int n )
- {
- int temp = 0;
- while( n > 0 )
- {
- temp = m_zptr[ p1 ];
- m_zptr[ p1 ] = m_zptr[ p2 ];
- m_zptr[ p2 ] = temp;
- p1++;
- p2++;
- n--;
- }
- }
-
- private void writeRun()
- throws IOException
- {
- if( m_last < m_allowableBlockSize )
- {
- m_inUse[ m_currentChar ] = true;
- for( int i = 0; i < m_runLength; i++ )
- {
- m_crc.updateCRC( (char)m_currentChar );
- }
- switch( m_runLength )
- {
- case 1:
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- break;
- case 2:
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- break;
- case 3:
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- break;
- default:
- m_inUse[ m_runLength - 4 ] = true;
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- m_last++;
- m_block[ m_last + 1 ] = (char)m_currentChar;
- m_last++;
- m_block[ m_last + 1 ] = (char)( m_runLength - 4 );
- break;
- }
- }
- else
- {
- endBlock();
- initBlock();
- writeRun();
- }
- }
-
- private static class StackElem
- {
- int m_dd;
- int m_hh;
- int m_ll;
- }
-}
-
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE.txt file.
+ */
+package installer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * An output stream that compresses into the BZip2 format (without the file
+ * header chars) into another stream. TODO: Update to BZip2 1.0.1
+ *
+ * @author <a href="mailto:keiron at aftexsw.com">Keiron Liddle</a>
+ */
+public class CBZip2OutputStream
+ extends OutputStream
+ implements BZip2Constants
+{
+ private static final int LOWER_BYTE_MASK = 0x000000ff;
+ private static final int UPPER_BYTE_MASK = 0xffffff00;
+ private static final int SETMASK = ( 1 << 21 );
+ private static final int CLEARMASK = ( ~SETMASK );
+ private static final int GREATER_ICOST = 15;
+ private static final int LESSER_ICOST = 0;
+ private static final int SMALL_THRESH = 20;
+ private static final int DEPTH_THRESH = 10;
+
+ /*
+ * If you are ever unlucky/improbable enough
+ * to get a stack overflow whilst sorting,
+ * increase the following constant and try
+ * again. In practice I have never seen the
+ * stack go above 27 elems, so the following
+ * limit seems very generous.
+ */
+ private static final int QSORT_STACK_SIZE = 1000;
+
+ private CRC m_crc = new CRC();
+
+ private boolean[] m_inUse = new boolean[ 256 ];
+
+ private char[] m_seqToUnseq = new char[ 256 ];
+ private char[] m_unseqToSeq = new char[ 256 ];
+
+ private char[] m_selector = new char[ MAX_SELECTORS ];
+ private char[] m_selectorMtf = new char[ MAX_SELECTORS ];
+
+ private int[] m_mtfFreq = new int[ MAX_ALPHA_SIZE ];
+
+ private int m_currentChar = -1;
+ private int m_runLength;
+
+ private boolean m_closed;
+
+ /*
+ * Knuth's increments seem to work better
+ * than Incerpi-Sedgewick here. Possibly
+ * because the number of elems to sort is
+ * usually small, typically <= 20.
+ */
+ private int[] m_incs = new int[]
+ {
+ 1, 4, 13, 40, 121, 364, 1093, 3280,
+ 9841, 29524, 88573, 265720,
+ 797161, 2391484
+ };
+
+ private boolean m_blockRandomised;
+
+ /*
+ * always: in the range 0 .. 9.
+ * The current block size is 100000 * this number.
+ */
+ private int m_blockSize100k;
+ private int m_bsBuff;
+ private int m_bsLive;
+
+ /*
+ * index of the last char in the block, so
+ * the block size == last + 1.
+ */
+ private int m_last;
+
+ /*
+ * index in zptr[] of original string after sorting.
+ */
+ private int m_origPtr;
+
+ private int m_allowableBlockSize;
+
+ private char[] m_block;
+
+ private int m_blockCRC;
+ private int m_combinedCRC;
+
+ private OutputStream m_bsStream;
+ private boolean m_firstAttempt;
+ private int[] m_ftab;
+ private int m_nInUse;
+
+ private int m_nMTF;
+ private int[] m_quadrant;
+ private short[] m_szptr;
+ private int m_workDone;
+
+ /*
+ * Used when sorting. If too many long comparisons
+ * happen, we stop sorting, randomise the block
+ * slightly, and try again.
+ */
+ private int m_workFactor;
+ private int m_workLimit;
+ private int[] m_zptr;
+
+ public CBZip2OutputStream( final OutputStream output )
+ throws IOException
+ {
+ this( output, 9 );
+ }
+
+ public CBZip2OutputStream( final OutputStream output, final int blockSize )
+ throws IOException
+ {
+ bsSetStream( output );
+ m_workFactor = 50;
+
+ int outBlockSize = blockSize;
+ if( outBlockSize > 9 )
+ {
+ outBlockSize = 9;
+ }
+ if( outBlockSize < 1 )
+ {
+ outBlockSize = 1;
+ }
+ m_blockSize100k = outBlockSize;
+ allocateCompressStructures();
+ initialize();
+ initBlock();
+ }
+
+ private static void hbMakeCodeLengths( char[] len, int[] freq,
+ int alphaSize, int maxLen )
+ {
+ /*
+ * Nodes and heap entries run from 1. Entry 0
+ * for both the heap and nodes is a sentinel.
+ */
+ int nNodes;
+ /*
+ * Nodes and heap entries run from 1. Entry 0
+ * for both the heap and nodes is a sentinel.
+ */
+ int nHeap;
+ /*
+ * Nodes and heap entries run from 1. Entry 0
+ * for both the heap and nodes is a sentinel.
+ */
+ int n1;
+ /*
+ * Nodes and heap entries run from 1. Entry 0
+ * for both the heap and nodes is a sentinel.
+ */
+ int n2;
+ /*
+ * Nodes and heap entries run from 1. Entry 0
+ * for both the heap and nodes is a sentinel.
+ */
+ int i;
+ /*
+ * Nodes and heap entries run from 1. Entry 0
+ * for both the heap and nodes is a sentinel.
+ */
+ int j;
+ /*
+ * Nodes and heap entries run from 1. Entry 0
+ * for both the heap and nodes is a sentinel.
+ */
+ int k;
+ boolean tooLong;
+
+ int[] heap = new int[ MAX_ALPHA_SIZE + 2 ];
+ int[] weights = new int[ MAX_ALPHA_SIZE * 2 ];
+ int[] parent = new int[ MAX_ALPHA_SIZE * 2 ];
+
+ for( i = 0; i < alphaSize; i++ )
+ {
+ weights[ i + 1 ] = ( freq[ i ] == 0 ? 1 : freq[ i ] ) << 8;
+ }
+
+ while( true )
+ {
+ nNodes = alphaSize;
+ nHeap = 0;
+
+ heap[ 0 ] = 0;
+ weights[ 0 ] = 0;
+ parent[ 0 ] = -2;
+
+ for( i = 1; i <= alphaSize; i++ )
+ {
+ parent[ i ] = -1;
+ nHeap++;
+ heap[ nHeap ] = i;
+ {
+ int zz;
+ int tmp;
+ zz = nHeap;
+ tmp = heap[ zz ];
+ while( weights[ tmp ] < weights[ heap[ zz >> 1 ] ] )
+ {
+ heap[ zz ] = heap[ zz >> 1 ];
+ zz >>= 1;
+ }
+ heap[ zz ] = tmp;
+ }
+ }
+ if( !( nHeap < ( MAX_ALPHA_SIZE + 2 ) ) )
+ {
+ panic();
+ }
+
+ while( nHeap > 1 )
+ {
+ n1 = heap[ 1 ];
+ heap[ 1 ] = heap[ nHeap ];
+ nHeap--;
+ {
+ int zz = 0;
+ int yy = 0;
+ int tmp = 0;
+ zz = 1;
+ tmp = heap[ zz ];
+ while( true )
+ {
+ yy = zz << 1;
+ if( yy > nHeap )
+ {
+ break;
+ }
+ if( yy < nHeap &&
+ weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )
+ {
+ yy++;
+ }
+ if( weights[ tmp ] < weights[ heap[ yy ] ] )
+ {
+ break;
+ }
+ heap[ zz ] = heap[ yy ];
+ zz = yy;
+ }
+ heap[ zz ] = tmp;
+ }
+ n2 = heap[ 1 ];
+ heap[ 1 ] = heap[ nHeap ];
+ nHeap--;
+ {
+ int zz = 0;
+ int yy = 0;
+ int tmp = 0;
+ zz = 1;
+ tmp = heap[ zz ];
+ while( true )
+ {
+ yy = zz << 1;
+ if( yy > nHeap )
+ {
+ break;
+ }
+ if( yy < nHeap &&
+ weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )
+ {
+ yy++;
+ }
+ if( weights[ tmp ] < weights[ heap[ yy ] ] )
+ {
+ break;
+ }
+ heap[ zz ] = heap[ yy ];
+ zz = yy;
+ }
+ heap[ zz ] = tmp;
+ }
+ nNodes++;
+ parent[ n1 ] = nNodes;
+ parent[ n2 ] = nNodes;
+
+ final int v1 = weights[ n1 ];
+ final int v2 = weights[ n2 ];
+ final int weight = calculateWeight( v1, v2 );
+ weights[ nNodes ] = weight;
+
+ parent[ nNodes ] = -1;
+ nHeap++;
+ heap[ nHeap ] = nNodes;
+ {
+ int zz = 0;
+ int tmp = 0;
+ zz = nHeap;
+ tmp = heap[ zz ];
+ while( weights[ tmp ] < weights[ heap[ zz >> 1 ] ] )
+ {
+ heap[ zz ] = heap[ zz >> 1 ];
+ zz >>= 1;
+ }
+ heap[ zz ] = tmp;
+ }
+ }
+ if( !( nNodes < ( MAX_ALPHA_SIZE * 2 ) ) )
+ {
+ panic();
+ }
+
+ tooLong = false;
+ for( i = 1; i <= alphaSize; i++ )
+ {
+ j = 0;
+ k = i;
+ while( parent[ k ] >= 0 )
+ {
+ k = parent[ k ];
+ j++;
+ }
+ len[ i - 1 ] = (char)j;
+ if( j > maxLen )
+ {
+ tooLong = true;
+ }
+ }
+
+ if( !tooLong )
+ {
+ break;
+ }
+
+ for( i = 1; i < alphaSize; i++ )
+ {
+ j = weights[ i ] >> 8;
+ j = 1 + ( j / 2 );
+ weights[ i ] = j << 8;
+ }
+ }
+ }
+
+ private static int calculateWeight( final int v1, final int v2 )
+ {
+ final int upper = ( v1 & UPPER_BYTE_MASK ) + ( v2 & UPPER_BYTE_MASK );
+ final int v1Lower = ( v1 & LOWER_BYTE_MASK );
+ final int v2Lower = ( v2 & LOWER_BYTE_MASK );
+ final int nnnn = ( v1Lower > v2Lower ) ? v1Lower : v2Lower;
+ return upper | ( 1 + nnnn );
+ }
+
+ private static void panic()
+ {
+ System.out.println( "panic" );
+ //throw new CError();
+ }
+
+ public void close()
+ throws IOException
+ {
+ if( m_closed )
+ {
+ return;
+ }
+
+ if( m_runLength > 0 )
+ {
+ writeRun();
+ }
+ m_currentChar = -1;
+ endBlock();
+ endCompression();
+ m_closed = true;
+ super.close();
+ m_bsStream.close();
+ }
+
+ public void finalize()
+ throws Throwable
+ {
+ close();
+ }
+
+ public void flush()
+ throws IOException
+ {
+ super.flush();
+ m_bsStream.flush();
+ }
+
+ /**
+ * modified by Oliver Merkel, 010128
+ *
+ * @param bv Description of Parameter
+ * @exception java.io.IOException Description of Exception
+ */
+ public void write( int bv )
+ throws IOException
+ {
+ int b = ( 256 + bv ) % 256;
+ if( m_currentChar != -1 )
+ {
+ if( m_currentChar == b )
+ {
+ m_runLength++;
+ if( m_runLength > 254 )
+ {
+ writeRun();
+ m_currentChar = -1;
+ m_runLength = 0;
+ }
+ }
+ else
+ {
+ writeRun();
+ m_runLength = 1;
+ m_currentChar = b;
+ }
+ }
+ else
+ {
+ m_currentChar = b;
+ m_runLength++;
+ }
+ }
+
+ private void allocateCompressStructures()
+ {
+ int n = BASE_BLOCK_SIZE * m_blockSize100k;
+ m_block = new char[ ( n + 1 + NUM_OVERSHOOT_BYTES ) ];
+ m_quadrant = new int[ ( n + NUM_OVERSHOOT_BYTES ) ];
+ m_zptr = new int[ n ];
+ m_ftab = new int[ 65537 ];
+
+ if( m_block == null || m_quadrant == null || m_zptr == null
+ || m_ftab == null )
+ {
+ //int totalDraw = (n + 1 + NUM_OVERSHOOT_BYTES) + (n + NUM_OVERSHOOT_BYTES) + n + 65537;
+ //compressOutOfMemory ( totalDraw, n );
+ }
+
+ /*
+ * The back end needs a place to store the MTF values
+ * whilst it calculates the coding tables. We could
+ * put them in the zptr array. However, these values
+ * will fit in a short, so we overlay szptr at the
+ * start of zptr, in the hope of reducing the number
+ * of cache misses induced by the multiple traversals
+ * of the MTF values when calculating coding tables.
+ * Seems to improve compression speed by about 1%.
+ */
+ // szptr = zptr;
+
+ m_szptr = new short[ 2 * n ];
+ }
+
+ private void bsFinishedWithStream()
+ throws IOException
+ {
+ while( m_bsLive > 0 )
+ {
+ int ch = ( m_bsBuff >> 24 );
+ try
+ {
+ m_bsStream.write( ch );// write 8-bit
+ }
+ catch( IOException e )
+ {
+ throw e;
+ }
+ m_bsBuff <<= 8;
+ m_bsLive -= 8;
+ }
+ }
+
+ private void bsPutIntVS( int numBits, int c )
+ throws IOException
+ {
+ bsW( numBits, c );
+ }
+
+ private void bsPutUChar( int c )
+ throws IOException
+ {
+ bsW( 8, c );
+ }
+
+ private void bsPutint( int u )
+ throws IOException
+ {
+ bsW( 8, ( u >> 24 ) & 0xff );
+ bsW( 8, ( u >> 16 ) & 0xff );
+ bsW( 8, ( u >> 8 ) & 0xff );
+ bsW( 8, u & 0xff );
+ }
+
+ private void bsSetStream( OutputStream f )
+ {
+ m_bsStream = f;
+ m_bsLive = 0;
+ m_bsBuff = 0;
+ }
+
+ private void bsW( int n, int v )
+ throws IOException
+ {
+ while( m_bsLive >= 8 )
+ {
+ int ch = ( m_bsBuff >> 24 );
+ try
+ {
+ m_bsStream.write( ch );// write 8-bit
+ }
+ catch( IOException e )
+ {
+ throw e;
+ }
+ m_bsBuff <<= 8;
+ m_bsLive -= 8;
+ }
+ m_bsBuff |= ( v << ( 32 - m_bsLive - n ) );
+ m_bsLive += n;
+ }
+
+ private void doReversibleTransformation()
+ {
+ int i;
+
+ m_workLimit = m_workFactor * m_last;
+ m_workDone = 0;
+ m_blockRandomised = false;
+ m_firstAttempt = true;
+
+ mainSort();
+
+ if( m_workDone > m_workLimit && m_firstAttempt )
+ {
+ randomiseBlock();
+ m_workLimit = 0;
+ m_workDone = 0;
+ m_blockRandomised = true;
+ m_firstAttempt = false;
+ mainSort();
+ }
+
+ m_origPtr = -1;
+ for( i = 0; i <= m_last; i++ )
+ {
+ if( m_zptr[ i ] == 0 )
+ {
+ m_origPtr = i;
+ break;
+ }
+ }
+ ;
+
+ if( m_origPtr == -1 )
+ {
+ panic();
+ }
+ }
+
+ private void endBlock()
+ throws IOException
+ {
+ m_blockCRC = m_crc.getFinalCRC();
+ m_combinedCRC = ( m_combinedCRC << 1 ) | ( m_combinedCRC >>> 31 );
+ m_combinedCRC ^= m_blockCRC;
+
+ /*
+ * sort the block and establish posn of original string
+ */
+ doReversibleTransformation();
+
+ /*
+ * A 6-byte block header, the value chosen arbitrarily
+ * as 0x314159265359 :-). A 32 bit value does not really
+ * give a strong enough guarantee that the value will not
+ * appear by chance in the compressed datastream. Worst-case
+ * probability of this event, for a 900k block, is about
+ * 2.0e-3 for 32 bits, 1.0e-5 for 40 bits and 4.0e-8 for 48 bits.
+ * For a compressed file of size 100Gb -- about 100000 blocks --
+ * only a 48-bit marker will do. NB: normal compression/
+ * decompression do *not* rely on these statistical properties.
+ * They are only important when trying to recover blocks from
+ * damaged files.
+ */
+ bsPutUChar( 0x31 );
+ bsPutUChar( 0x41 );
+ bsPutUChar( 0x59 );
+ bsPutUChar( 0x26 );
+ bsPutUChar( 0x53 );
+ bsPutUChar( 0x59 );
+
+ /*
+ * Now the block's CRC, so it is in a known place.
+ */
+ bsPutint( m_blockCRC );
+
+ /*
+ * Now a single bit indicating randomisation.
+ */
+ if( m_blockRandomised )
+ {
+ bsW( 1, 1 );
+ }
+ else
+ {
+ bsW( 1, 0 );
+ }
+
+ /*
+ * Finally, block's contents proper.
+ */
+ moveToFrontCodeAndSend();
+ }
+
+ private void endCompression()
+ throws IOException
+ {
+ /*
+ * Now another magic 48-bit number, 0x177245385090, to
+ * indicate the end of the last block. (sqrt(pi), if
+ * you want to know. I did want to use e, but it contains
+ * too much repetition -- 27 18 28 18 28 46 -- for me
+ * to feel statistically comfortable. Call me paranoid.)
+ */
+ bsPutUChar( 0x17 );
+ bsPutUChar( 0x72 );
+ bsPutUChar( 0x45 );
+ bsPutUChar( 0x38 );
+ bsPutUChar( 0x50 );
+ bsPutUChar( 0x90 );
+
+ bsPutint( m_combinedCRC );
+
+ bsFinishedWithStream();
+ }
+
+ private boolean fullGtU( int i1, int i2 )
+ {
+ int k;
+ char c1;
+ char c2;
+ int s1;
+ int s2;
+
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ i1++;
+ i2++;
+
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ i1++;
+ i2++;
+
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ i1++;
+ i2++;
+
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ i1++;
+ i2++;
+
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ i1++;
+ i2++;
+
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ i1++;
+ i2++;
+
+ k = m_last + 1;
+
+ do
+ {
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ s1 = m_quadrant[ i1 ];
+ s2 = m_quadrant[ i2 ];
+ if( s1 != s2 )
+ {
+ return ( s1 > s2 );
+ }
+ i1++;
+ i2++;
+
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ s1 = m_quadrant[ i1 ];
+ s2 = m_quadrant[ i2 ];
+ if( s1 != s2 )
+ {
+ return ( s1 > s2 );
+ }
+ i1++;
+ i2++;
+
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ s1 = m_quadrant[ i1 ];
+ s2 = m_quadrant[ i2 ];
+ if( s1 != s2 )
+ {
+ return ( s1 > s2 );
+ }
+ i1++;
+ i2++;
+
+ c1 = m_block[ i1 + 1 ];
+ c2 = m_block[ i2 + 1 ];
+ if( c1 != c2 )
+ {
+ return ( c1 > c2 );
+ }
+ s1 = m_quadrant[ i1 ];
+ s2 = m_quadrant[ i2 ];
+ if( s1 != s2 )
+ {
+ return ( s1 > s2 );
+ }
+ i1++;
+ i2++;
+
+ if( i1 > m_last )
+ {
+ i1 -= m_last;
+ i1--;
+ }
+ ;
+ if( i2 > m_last )
+ {
+ i2 -= m_last;
+ i2--;
+ }
+ ;
+
+ k -= 4;
+ m_workDone++;
+ } while( k >= 0 );
+
+ return false;
+ }
+
+ private void generateMTFValues()
+ {
+ char[] yy = new char[ 256 ];
+ int i;
+ int j;
+ char tmp;
+ char tmp2;
+ int zPend;
+ int wr;
+ int EOB;
+
+ makeMaps();
+ EOB = m_nInUse + 1;
+
+ for( i = 0; i <= EOB; i++ )
+ {
+ m_mtfFreq[ i ] = 0;
+ }
+
+ wr = 0;
+ zPend = 0;
+ for( i = 0; i < m_nInUse; i++ )
+ {
+ yy[ i ] = (char)i;
+ }
+
+ for( i = 0; i <= m_last; i++ )
+ {
+ char ll_i;
+
+ ll_i = m_unseqToSeq[ m_block[ m_zptr[ i ] ] ];
+
+ j = 0;
+ tmp = yy[ j ];
+ while( ll_i != tmp )
+ {
+ j++;
+ tmp2 = tmp;
+ tmp = yy[ j ];
+ yy[ j ] = tmp2;
+ }
+ ;
+ yy[ 0 ] = tmp;
+
+ if( j == 0 )
+ {
+ zPend++;
+ }
+ else
+ {
+ if( zPend > 0 )
+ {
+ zPend--;
+ while( true )
+ {
+ switch( zPend % 2 )
+ {
+ case 0:
+ m_szptr[ wr ] = (short)RUNA;
+ wr++;
+ m_mtfFreq[ RUNA ]++;
+ break;
+ case 1:
+ m_szptr[ wr ] = (short)RUNB;
+ wr++;
+ m_mtfFreq[ RUNB ]++;
+ break;
+ }
+ ;
+ if( zPend < 2 )
+ {
+ break;
+ }
+ zPend = ( zPend - 2 ) / 2;
+ }
+ ;
+ zPend = 0;
+ }
+ m_szptr[ wr ] = (short)( j + 1 );
+ wr++;
+ m_mtfFreq[ j + 1 ]++;
+ }
+ }
+
+ if( zPend > 0 )
+ {
+ zPend--;
+ while( true )
+ {
+ switch( zPend % 2 )
+ {
+ case 0:
+ m_szptr[ wr ] = (short)RUNA;
+ wr++;
+ m_mtfFreq[ RUNA ]++;
+ break;
+ case 1:
+ m_szptr[ wr ] = (short)RUNB;
+ wr++;
+ m_mtfFreq[ RUNB ]++;
+ break;
+ }
+ if( zPend < 2 )
+ {
+ break;
+ }
+ zPend = ( zPend - 2 ) / 2;
+ }
+ }
+
+ m_szptr[ wr ] = (short)EOB;
+ wr++;
+ m_mtfFreq[ EOB ]++;
+
+ m_nMTF = wr;
+ }
+
+ private void hbAssignCodes( int[] code, char[] length, int minLen,
+ int maxLen, int alphaSize )
+ {
+ int n;
+ int vec;
+ int i;
+
+ vec = 0;
+ for( n = minLen; n <= maxLen; n++ )
+ {
+ for( i = 0; i < alphaSize; i++ )
+ {
+ if( length[ i ] == n )
+ {
+ code[ i ] = vec;
+ vec++;
+ }
+ }
+ ;
+ vec <<= 1;
+ }
+ }
+
+ private void initBlock()
+ {
+ // blockNo++;
+ m_crc.initialiseCRC();
+ m_last = -1;
+ // ch = 0;
+
+ for( int i = 0; i < 256; i++ )
+ {
+ m_inUse[ i ] = false;
+ }
+
+ /*
+ * 20 is just a paranoia constant
+ */
+ m_allowableBlockSize = BASE_BLOCK_SIZE * m_blockSize100k - 20;
+ }
+
+ private void initialize()
+ throws IOException
+ {
+ /*
+ * Write `magic' bytes h indicating file-format == huffmanised,
+ * followed by a digit indicating blockSize100k.
+ */
+ bsPutUChar( 'h' );
+ bsPutUChar( '0' + m_blockSize100k );
+
+ m_combinedCRC = 0;
+ }
+
+ private void mainSort()
+ {
+ int i;
+ int j;
+ int ss;
+ int sb;
+ int[] runningOrder = new int[ 256 ];
+ int[] copy = new int[ 256 ];
+ boolean[] bigDone = new boolean[ 256 ];
+ int c1;
+ int c2;
+
+ /*
+ * In the various block-sized structures, live data runs
+ * from 0 to last+NUM_OVERSHOOT_BYTES inclusive. First,
+ * set up the overshoot area for block.
+ */
+ // if (verbosity >= 4) fprintf ( stderr, " sort initialise ...\n" );
+ for( i = 0; i < NUM_OVERSHOOT_BYTES; i++ )
+ {
+ m_block[ m_last + i + 2 ] = m_block[ ( i % ( m_last + 1 ) ) + 1 ];
+ }
+ for( i = 0; i <= m_last + NUM_OVERSHOOT_BYTES; i++ )
+ {
+ m_quadrant[ i ] = 0;
+ }
+
+ m_block[ 0 ] = m_block[ m_last + 1 ];
+
+ if( m_last < 4000 )
+ {
+ /*
+ * Use simpleSort(), since the full sorting mechanism
+ * has quite a large constant overhead.
+ */
+ for( i = 0; i <= m_last; i++ )
+ {
+ m_zptr[ i ] = i;
+ }
+ m_firstAttempt = false;
+ m_workDone = 0;
+ m_workLimit = 0;
+ simpleSort( 0, m_last, 0 );
+ }
+ else
+ {
+ for( i = 0; i <= 255; i++ )
+ {
+ bigDone[ i ] = false;
+ }
+
+ for( i = 0; i <= 65536; i++ )
+ {
+ m_ftab[ i ] = 0;
+ }
+
+ c1 = m_block[ 0 ];
+ for( i = 0; i <= m_last; i++ )
+ {
+ c2 = m_block[ i + 1 ];
+ m_ftab[ ( c1 << 8 ) + c2 ]++;
+ c1 = c2;
+ }
+
+ for( i = 1; i <= 65536; i++ )
+ {
+ m_ftab[ i ] += m_ftab[ i - 1 ];
+ }
+
+ c1 = m_block[ 1 ];
+ for( i = 0; i < m_last; i++ )
+ {
+ c2 = m_block[ i + 2 ];
+ j = ( c1 << 8 ) + c2;
+ c1 = c2;
+ m_ftab[ j ]--;
+ m_zptr[ m_ftab[ j ] ] = i;
+ }
+
+ j = ( ( m_block[ m_last + 1 ] ) << 8 ) + ( m_block[ 1 ] );
+ m_ftab[ j ]--;
+ m_zptr[ m_ftab[ j ] ] = m_last;
+
+ /*
+ * Now ftab contains the first loc of every small bucket.
+ * Calculate the running order, from smallest to largest
+ * big bucket.
+ */
+ for( i = 0; i <= 255; i++ )
+ {
+ runningOrder[ i ] = i;
+ }
+ {
+ int vv;
+ int h = 1;
+ do
+ {
+ h = 3 * h + 1;
+ } while( h <= 256 );
+ do
+ {
+ h = h / 3;
+ for( i = h; i <= 255; i++ )
+ {
+ vv = runningOrder[ i ];
+ j = i;
+ while( ( m_ftab[ ( ( runningOrder[ j - h ] ) + 1 ) << 8 ]
+ - m_ftab[ ( runningOrder[ j - h ] ) << 8 ] ) >
+ ( m_ftab[ ( ( vv ) + 1 ) << 8 ] - m_ftab[ ( vv ) << 8 ] ) )
+ {
+ runningOrder[ j ] = runningOrder[ j - h ];
+ j = j - h;
+ if( j <= ( h - 1 ) )
+ {
+ break;
+ }
+ }
+ runningOrder[ j ] = vv;
+ }
+ } while( h != 1 );
+ }
+
+ /*
+ * The main sorting loop.
+ */
+ for( i = 0; i <= 255; i++ )
+ {
+
+ /*
+ * Process big buckets, starting with the least full.
+ */
+ ss = runningOrder[ i ];
+
+ /*
+ * Complete the big bucket [ss] by quicksorting
+ * any unsorted small buckets [ss, j]. Hopefully
+ * previous pointer-scanning phases have already
+ * completed many of the small buckets [ss, j], so
+ * we don't have to sort them at all.
+ */
+ for( j = 0; j <= 255; j++ )
+ {
+ sb = ( ss << 8 ) + j;
+ if( !( ( m_ftab[ sb ] & SETMASK ) == SETMASK ) )
+ {
+ int lo = m_ftab[ sb ] & CLEARMASK;
+ int hi = ( m_ftab[ sb + 1 ] & CLEARMASK ) - 1;
+ if( hi > lo )
+ {
+ qSort3( lo, hi, 2 );
+ if( m_workDone > m_workLimit && m_firstAttempt )
+ {
+ return;
+ }
+ }
+ m_ftab[ sb ] |= SETMASK;
+ }
+ }
+
+ /*
+ * The ss big bucket is now done. Record this fact,
+ * and update the quadrant descriptors. Remember to
+ * update quadrants in the overshoot area too, if
+ * necessary. The "if (i < 255)" test merely skips
+ * this updating for the last bucket processed, since
+ * updating for the last bucket is pointless.
+ */
+ bigDone[ ss ] = true;
+
+ if( i < 255 )
+ {
+ int bbStart = m_ftab[ ss << 8 ] & CLEARMASK;
+ int bbSize = ( m_ftab[ ( ss + 1 ) << 8 ] & CLEARMASK ) - bbStart;
+ int shifts = 0;
+
+ while( ( bbSize >> shifts ) > 65534 )
+ {
+ shifts++;
+ }
+
+ for( j = 0; j < bbSize; j++ )
+ {
+ int a2update = m_zptr[ bbStart + j ];
+ int qVal = ( j >> shifts );
+ m_quadrant[ a2update ] = qVal;
+ if( a2update < NUM_OVERSHOOT_BYTES )
+ {
+ m_quadrant[ a2update + m_last + 1 ] = qVal;
+ }
+ }
+
+ if( !( ( ( bbSize - 1 ) >> shifts ) <= 65535 ) )
+ {
+ panic();
+ }
+ }
+
+ /*
+ * Now scan this big bucket so as to synthesise the
+ * sorted order for small buckets [t, ss] for all t != ss.
+ */
+ for( j = 0; j <= 255; j++ )
+ {
+ copy[ j ] = m_ftab[ ( j << 8 ) + ss ] & CLEARMASK;
+ }
+
+ for( j = m_ftab[ ss << 8 ] & CLEARMASK;
+ j < ( m_ftab[ ( ss + 1 ) << 8 ] & CLEARMASK ); j++ )
+ {
+ c1 = m_block[ m_zptr[ j ] ];
+ if( !bigDone[ c1 ] )
+ {
+ m_zptr[ copy[ c1 ] ] = m_zptr[ j ] == 0 ? m_last : m_zptr[ j ] - 1;
+ copy[ c1 ]++;
+ }
+ }
+
+ for( j = 0; j <= 255; j++ )
+ {
+ m_ftab[ ( j << 8 ) + ss ] |= SETMASK;
+ }
+ }
+ }
+ }
+
+ private void makeMaps()
+ {
+ int i;
+ m_nInUse = 0;
+ for( i = 0; i < 256; i++ )
+ {
+ if( m_inUse[ i ] )
+ {
+ m_seqToUnseq[ m_nInUse ] = (char)i;
+ m_unseqToSeq[ i ] = (char)m_nInUse;
+ m_nInUse++;
+ }
+ }
+ }
+
+ private char med3( char a, char b, char c )
+ {
+ char t;
+ if( a > b )
+ {
+ t = a;
+ a = b;
+ b = t;
+ }
+ if( b > c )
+ {
+ t = b;
+ b = c;
+ c = t;
+ }
+ if( a > b )
+ {
+ b = a;
+ }
+ return b;
+ }
+
+ private void moveToFrontCodeAndSend()
+ throws IOException
+ {
+ bsPutIntVS( 24, m_origPtr );
+ generateMTFValues();
+ sendMTFValues();
+ }
+
+ private void qSort3( int loSt, int hiSt, int dSt )
+ {
+ int unLo;
+ int unHi;
+ int ltLo;
+ int gtHi;
+ int med;
+ int n;
+ int m;
+ int sp;
+ int lo;
+ int hi;
+ int d;
+ StackElem[] stack = new StackElem[ QSORT_STACK_SIZE ];
+ for( int count = 0; count < QSORT_STACK_SIZE; count++ )
+ {
+ stack[ count ] = new StackElem();
+ }
+
+ sp = 0;
+
+ stack[ sp ].m_ll = loSt;
+ stack[ sp ].m_hh = hiSt;
+ stack[ sp ].m_dd = dSt;
+ sp++;
+
+ while( sp > 0 )
+ {
+ if( sp >= QSORT_STACK_SIZE )
+ {
+ panic();
+ }
+
+ sp--;
+ lo = stack[ sp ].m_ll;
+ hi = stack[ sp ].m_hh;
+ d = stack[ sp ].m_dd;
+
+ if( hi - lo < SMALL_THRESH || d > DEPTH_THRESH )
+ {
+ simpleSort( lo, hi, d );
+ if( m_workDone > m_workLimit && m_firstAttempt )
+ {
+ return;
+ }
+ continue;
+ }
+
+ med = med3( m_block[ m_zptr[ lo ] + d + 1 ],
+ m_block[ m_zptr[ hi ] + d + 1 ],
+ m_block[ m_zptr[ ( lo + hi ) >> 1 ] + d + 1 ] );
+
+ unLo = lo;
+ ltLo = lo;
+ unHi = hi;
+ gtHi = hi;
+
+ while( true )
+ {
+ while( true )
+ {
+ if( unLo > unHi )
+ {
+ break;
+ }
+ n = m_block[ m_zptr[ unLo ] + d + 1 ] - med;
+ if( n == 0 )
+ {
+ int temp = 0;
+ temp = m_zptr[ unLo ];
+ m_zptr[ unLo ] = m_zptr[ ltLo ];
+ m_zptr[ ltLo ] = temp;
+ ltLo++;
+ unLo++;
+ continue;
+ }
+ ;
+ if( n > 0 )
+ {
+ break;
+ }
+ unLo++;
+ }
+ while( true )
+ {
+ if( unLo > unHi )
+ {
+ break;
+ }
+ n = m_block[ m_zptr[ unHi ] + d + 1 ] - med;
+ if( n == 0 )
+ {
+ int temp = 0;
+ temp = m_zptr[ unHi ];
+ m_zptr[ unHi ] = m_zptr[ gtHi ];
+ m_zptr[ gtHi ] = temp;
+ gtHi--;
+ unHi--;
+ continue;
+ }
+ ;
+ if( n < 0 )
+ {
+ break;
+ }
+ unHi--;
+ }
+ if( unLo > unHi )
+ {
+ break;
+ }
+ int temp = 0;
+ temp = m_zptr[ unLo ];
+ m_zptr[ unLo ] = m_zptr[ unHi ];
+ m_zptr[ unHi ] = temp;
+ unLo++;
+ unHi--;
+ }
+
+ if( gtHi < ltLo )
+ {
+ stack[ sp ].m_ll = lo;
+ stack[ sp ].m_hh = hi;
+ stack[ sp ].m_dd = d + 1;
+ sp++;
+ continue;
+ }
+
+ n = ( ( ltLo - lo ) < ( unLo - ltLo ) ) ? ( ltLo - lo ) : ( unLo - ltLo );
+ vswap( lo, unLo - n, n );
+ m = ( ( hi - gtHi ) < ( gtHi - unHi ) ) ? ( hi - gtHi ) : ( gtHi - unHi );
+ vswap( unLo, hi - m + 1, m );
+
+ n = lo + unLo - ltLo - 1;
+ m = hi - ( gtHi - unHi ) + 1;
+
+ stack[ sp ].m_ll = lo;
+ stack[ sp ].m_hh = n;
+ stack[ sp ].m_dd = d;
+ sp++;
+
+ stack[ sp ].m_ll = n + 1;
+ stack[ sp ].m_hh = m - 1;
+ stack[ sp ].m_dd = d + 1;
+ sp++;
+
+ stack[ sp ].m_ll = m;
+ stack[ sp ].m_hh = hi;
+ stack[ sp ].m_dd = d;
+ sp++;
+ }
+ }
+
+ private void randomiseBlock()
+ {
+ int i;
+ int rNToGo = 0;
+ int rTPos = 0;
+ for( i = 0; i < 256; i++ )
+ {
+ m_inUse[ i ] = false;
+ }
+
+ for( i = 0; i <= m_last; i++ )
+ {
+ if( rNToGo == 0 )
+ {
+ rNToGo = (char)RAND_NUMS[ rTPos ];
+ rTPos++;
+ if( rTPos == 512 )
+ {
+ rTPos = 0;
+ }
+ }
+ rNToGo--;
+ m_block[ i + 1 ] ^= ( ( rNToGo == 1 ) ? 1 : 0 );
+ // handle 16 bit signed numbers
+ m_block[ i + 1 ] &= 0xFF;
+
+ m_inUse[ m_block[ i + 1 ] ] = true;
+ }
+ }
+
+ private void sendMTFValues()
+ throws IOException
+ {
+ char[][] len = new char[ N_GROUPS ][ MAX_ALPHA_SIZE ];
+
+ int v;
+
+ int t;
+
+ int i;
+
+ int j;
+
+ int gs;
+
+ int ge;
+
+ int bt;
+
+ int bc;
+
+ int iter;
+ int nSelectors = 0;
+ int alphaSize;
+ int minLen;
+ int maxLen;
+ int selCtr;
+ int nGroups;
+
+ alphaSize = m_nInUse + 2;
+ for( t = 0; t < N_GROUPS; t++ )
+ {
+ for( v = 0; v < alphaSize; v++ )
+ {
+ len[ t ][ v ] = (char)GREATER_ICOST;
+ }
+ }
+
+ /*
+ * Decide how many coding tables to use
+ */
+ if( m_nMTF <= 0 )
+ {
+ panic();
+ }
+
+ if( m_nMTF < 200 )
+ {
+ nGroups = 2;
+ }
+ else if( m_nMTF < 600 )
+ {
+ nGroups = 3;
+ }
+ else if( m_nMTF < 1200 )
+ {
+ nGroups = 4;
+ }
+ else if( m_nMTF < 2400 )
+ {
+ nGroups = 5;
+ }
+ else
+ {
+ nGroups = 6;
+ }
+ {
+ /*
+ * Generate an initial set of coding tables
+ */
+ int nPart;
+ int remF;
+ int tFreq;
+ int aFreq;
+
+ nPart = nGroups;
+ remF = m_nMTF;
+ gs = 0;
+ while( nPart > 0 )
+ {
+ tFreq = remF / nPart;
+ ge = gs - 1;
+ aFreq = 0;
+ while( aFreq < tFreq && ge < alphaSize - 1 )
+ {
+ ge++;
+ aFreq += m_mtfFreq[ ge ];
+ }
+
+ if( ge > gs && nPart != nGroups && nPart != 1
+ && ( ( nGroups - nPart ) % 2 == 1 ) )
+ {
+ aFreq -= m_mtfFreq[ ge ];
+ ge--;
+ }
+
+ for( v = 0; v < alphaSize; v++ )
+ {
+ if( v >= gs && v <= ge )
+ {
+ len[ nPart - 1 ][ v ] = (char)LESSER_ICOST;
+ }
+ else
+ {
+ len[ nPart - 1 ][ v ] = (char)GREATER_ICOST;
+ }
+ }
+
+ nPart--;
+ gs = ge + 1;
+ remF -= aFreq;
+ }
+ }
+
+ int[][] rfreq = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
+ int[] fave = new int[ N_GROUPS ];
+ short[] cost = new short[ N_GROUPS ];
+ /*
+ * Iterate up to N_ITERS times to improve the tables.
+ */
+ for( iter = 0; iter < N_ITERS; iter++ )
+ {
+ for( t = 0; t < nGroups; t++ )
+ {
+ fave[ t ] = 0;
+ }
+
+ for( t = 0; t < nGroups; t++ )
+ {
+ for( v = 0; v < alphaSize; v++ )
+ {
+ rfreq[ t ][ v ] = 0;
+ }
+ }
+
+ nSelectors = 0;
+ gs = 0;
+ while( true )
+ {
+
+ /*
+ * Set group start & end marks.
+ */
+ if( gs >= m_nMTF )
+ {
+ break;
+ }
+ ge = gs + G_SIZE - 1;
+ if( ge >= m_nMTF )
+ {
+ ge = m_nMTF - 1;
+ }
+
+ /*
+ * Calculate the cost of this group as coded
+ * by each of the coding tables.
+ */
+ for( t = 0; t < nGroups; t++ )
+ {
+ cost[ t ] = 0;
+ }
+
+ if( nGroups == 6 )
+ {
+ short cost0 = 0;
+ short cost1 = 0;
+ short cost2 = 0;
+ short cost3 = 0;
+ short cost4 = 0;
+ short cost5 = 0;
+
+ for( i = gs; i <= ge; i++ )
+ {
+ short icv = m_szptr[ i ];
+ cost0 += len[ 0 ][ icv ];
+ cost1 += len[ 1 ][ icv ];
+ cost2 += len[ 2 ][ icv ];
+ cost3 += len[ 3 ][ icv ];
+ cost4 += len[ 4 ][ icv ];
+ cost5 += len[ 5 ][ icv ];
+ }
+ cost[ 0 ] = cost0;
+ cost[ 1 ] = cost1;
+ cost[ 2 ] = cost2;
+ cost[ 3 ] = cost3;
+ cost[ 4 ] = cost4;
+ cost[ 5 ] = cost5;
+ }
+ else
+ {
+ for( i = gs; i <= ge; i++ )
+ {
+ short icv = m_szptr[ i ];
+ for( t = 0; t < nGroups; t++ )
+ {
+ cost[ t ] += len[ t ][ icv ];
+ }
+ }
+ }
+
+ /*
+ * Find the coding table which is best for this group,
+ * and record its identity in the selector table.
+ */
+ bc = 999999999;
+ bt = -1;
+ for( t = 0; t < nGroups; t++ )
+ {
+ if( cost[ t ] < bc )
+ {
+ bc = cost[ t ];
+ bt = t;
+ }
+ }
+ ;
+ fave[ bt ]++;
+ m_selector[ nSelectors ] = (char)bt;
+ nSelectors++;
+
+ /*
+ * Increment the symbol frequencies for the selected table.
+ */
+ for( i = gs; i <= ge; i++ )
+ {
+ rfreq[ bt ][ m_szptr[ i ] ]++;
+ }
+
+ gs = ge + 1;
+ }
+
+ /*
+ * Recompute the tables based on the accumulated frequencies.
+ */
+ for( t = 0; t < nGroups; t++ )
+ {
+ hbMakeCodeLengths( len[ t ], rfreq[ t ], alphaSize, 20 );
+ }
+ }
+
+ rfreq = null;
+ fave = null;
+ cost = null;
+
+ if( !( nGroups < 8 ) )
+ {
+ panic();
+ }
+ if( !( nSelectors < 32768 && nSelectors <= ( 2 + ( 900000 / G_SIZE ) ) ) )
+ {
+ panic();
+ }
+ {
+ /*
+ * Compute MTF values for the selectors.
+ */
+ char[] pos = new char[ N_GROUPS ];
+ char ll_i;
+ char tmp2;
+ char tmp;
+ for( i = 0; i < nGroups; i++ )
+ {
+ pos[ i ] = (char)i;
+ }
+ for( i = 0; i < nSelectors; i++ )
+ {
+ ll_i = m_selector[ i ];
+ j = 0;
+ tmp = pos[ j ];
+ while( ll_i != tmp )
+ {
+ j++;
+ tmp2 = tmp;
+ tmp = pos[ j ];
+ pos[ j ] = tmp2;
+ }
+ pos[ 0 ] = tmp;
+ m_selectorMtf[ i ] = (char)j;
+ }
+ }
+
+ int[][] code = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ];
+
+ /*
+ * Assign actual codes for the tables.
+ */
+ for( t = 0; t < nGroups; t++ )
+ {
+ minLen = 32;
+ maxLen = 0;
+ for( i = 0; i < alphaSize; i++ )
+ {
+ if( len[ t ][ i ] > maxLen )
+ {
+ maxLen = len[ t ][ i ];
+ }
+ if( len[ t ][ i ] < minLen )
+ {
+ minLen = len[ t ][ i ];
+ }
+ }
+ if( maxLen > 20 )
+ {
+ panic();
+ }
+ if( minLen < 1 )
+ {
+ panic();
+ }
+ hbAssignCodes( code[ t ], len[ t ], minLen, maxLen, alphaSize );
+ }
+ {
+ /*
+ * Transmit the mapping table.
+ */
+ boolean[] inUse16 = new boolean[ 16 ];
+ for( i = 0; i < 16; i++ )
+ {
+ inUse16[ i ] = false;
+ for( j = 0; j < 16; j++ )
+ {
+ if( m_inUse[ i * 16 + j ] )
+ {
+ inUse16[ i ] = true;
+ }
+ }
+ }
+
+ for( i = 0; i < 16; i++ )
+ {
+ if( inUse16[ i ] )
+ {
+ bsW( 1, 1 );
+ }
+ else
+ {
+ bsW( 1, 0 );
+ }
+ }
+
+ for( i = 0; i < 16; i++ )
+ {
+ if( inUse16[ i ] )
+ {
+ for( j = 0; j < 16; j++ )
+ {
+ if( m_inUse[ i * 16 + j ] )
+ {
+ bsW( 1, 1 );
+ }
+ else
+ {
+ bsW( 1, 0 );
+ }
+ }
+ }
+ }
+
+ }
+
+ /*
+ * Now the selectors.
+ */
+ bsW( 3, nGroups );
+ bsW( 15, nSelectors );
+ for( i = 0; i < nSelectors; i++ )
+ {
+ for( j = 0; j < m_selectorMtf[ i ]; j++ )
+ {
+ bsW( 1, 1 );
+ }
+ bsW( 1, 0 );
+ }
+
+ for( t = 0; t < nGroups; t++ )
+ {
+ int curr = len[ t ][ 0 ];
+ bsW( 5, curr );
+ for( i = 0; i < alphaSize; i++ )
+ {
+ while( curr < len[ t ][ i ] )
+ {
+ bsW( 2, 2 );
+ curr++;
+ /*
+ * 10
+ */
+ }
+ while( curr > len[ t ][ i ] )
+ {
+ bsW( 2, 3 );
+ curr--;
+ /*
+ * 11
+ */
+ }
+ bsW( 1, 0 );
+ }
+ }
+
+ /*
+ * And finally, the block data proper
+ */
+ selCtr = 0;
+ gs = 0;
+ while( true )
+ {
+ if( gs >= m_nMTF )
+ {
+ break;
+ }
+ ge = gs + G_SIZE - 1;
+ if( ge >= m_nMTF )
+ {
+ ge = m_nMTF - 1;
+ }
+ for( i = gs; i <= ge; i++ )
+ {
+ bsW( len[ m_selector[ selCtr ] ][ m_szptr[ i ] ],
+ code[ m_selector[ selCtr ] ][ m_szptr[ i ] ] );
+ }
+
+ gs = ge + 1;
+ selCtr++;
+ }
+ if( !( selCtr == nSelectors ) )
+ {
+ panic();
+ }
+ }
+
+ private void simpleSort( int lo, int hi, int d )
+ {
+ int i;
+ int j;
+ int h;
+ int bigN;
+ int hp;
+ int v;
+
+ bigN = hi - lo + 1;
+ if( bigN < 2 )
+ {
+ return;
+ }
+
+ hp = 0;
+ while( m_incs[ hp ] < bigN )
+ {
+ hp++;
+ }
+ hp--;
+
+ for( ; hp >= 0; hp-- )
+ {
+ h = m_incs[ hp ];
+
+ i = lo + h;
+ while( true )
+ {
+ /*
+ * copy 1
+ */
+ if( i > hi )
+ {
+ break;
+ }
+ v = m_zptr[ i ];
+ j = i;
+ while( fullGtU( m_zptr[ j - h ] + d, v + d ) )
+ {
+ m_zptr[ j ] = m_zptr[ j - h ];
+ j = j - h;
+ if( j <= ( lo + h - 1 ) )
+ {
+ break;
+ }
+ }
+ m_zptr[ j ] = v;
+ i++;
+
+ /*
+ * copy 2
+ */
+ if( i > hi )
+ {
+ break;
+ }
+ v = m_zptr[ i ];
+ j = i;
+ while( fullGtU( m_zptr[ j - h ] + d, v + d ) )
+ {
+ m_zptr[ j ] = m_zptr[ j - h ];
+ j = j - h;
+ if( j <= ( lo + h - 1 ) )
+ {
+ break;
+ }
+ }
+ m_zptr[ j ] = v;
+ i++;
+
+ /*
+ * copy 3
+ */
+ if( i > hi )
+ {
+ break;
+ }
+ v = m_zptr[ i ];
+ j = i;
+ while( fullGtU( m_zptr[ j - h ] + d, v + d ) )
+ {
+ m_zptr[ j ] = m_zptr[ j - h ];
+ j = j - h;
+ if( j <= ( lo + h - 1 ) )
+ {
+ break;
+ }
+ }
+ m_zptr[ j ] = v;
+ i++;
+
+ if( m_workDone > m_workLimit && m_firstAttempt )
+ {
+ return;
+ }
+ }
+ }
+ }
+
+ private void vswap( int p1, int p2, int n )
+ {
+ int temp = 0;
+ while( n > 0 )
+ {
+ temp = m_zptr[ p1 ];
+ m_zptr[ p1 ] = m_zptr[ p2 ];
+ m_zptr[ p2 ] = temp;
+ p1++;
+ p2++;
+ n--;
+ }
+ }
+
+ private void writeRun()
+ throws IOException
+ {
+ if( m_last < m_allowableBlockSize )
+ {
+ m_inUse[ m_currentChar ] = true;
+ for( int i = 0; i < m_runLength; i++ )
+ {
+ m_crc.updateCRC( (char)m_currentChar );
+ }
+ switch( m_runLength )
+ {
+ case 1:
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ break;
+ case 2:
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ break;
+ case 3:
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ break;
+ default:
+ m_inUse[ m_runLength - 4 ] = true;
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ m_last++;
+ m_block[ m_last + 1 ] = (char)m_currentChar;
+ m_last++;
+ m_block[ m_last + 1 ] = (char)( m_runLength - 4 );
+ break;
+ }
+ }
+ else
+ {
+ endBlock();
+ initBlock();
+ writeRun();
+ }
+ }
+
+ private static class StackElem
+ {
+ int m_dd;
+ int m_hh;
+ int m_ll;
+ }
+}
+
diff --git a/jEdit/installer/CRC.java b/jEdit/installer/CRC.java
index 186679f..b609c2d 100644
--- a/jEdit/installer/CRC.java
+++ b/jEdit/installer/CRC.java
@@ -1,113 +1,113 @@
-/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
-package installer;
-
-/**
- * A simple class the hold and calculate the CRC for sanity checking of the
- * data.
- *
- * @author <a href="mailto:keiron at aftexsw.com">Keiron Liddle</a>
- */
-class CRC
-{
- private static int[] CRC32_TABLE = new int[]
- {
- 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
- 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
- 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
- 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
- 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
- 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
- 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
- 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
- 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
- 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
- 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
- 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
- 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
- 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
- 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
- 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
- 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
- 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
- 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
- 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
- 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
- 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
- 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
- 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
- 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
- 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
- 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
- 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
- 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
- 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
- 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
- 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
- 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
- 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
- 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
- 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
- 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
- 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
- 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
- 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
- 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
- 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
- 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
- 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
- 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
- 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
- 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
- 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
- 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
- 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
- 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
- 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
- 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
- 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
- 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
- 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
- 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
- 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
- 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
- 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
- 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
- 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
- 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
- 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
- };
-
- private int m_globalCrc;
-
- protected CRC()
- {
- initialiseCRC();
- }
-
- int getFinalCRC()
- {
- return ~m_globalCrc;
- }
-
- void initialiseCRC()
- {
- m_globalCrc = 0xffffffff;
- }
-
- void updateCRC( final int inCh )
- {
- int temp = ( m_globalCrc >> 24 ) ^ inCh;
- if( temp < 0 )
- {
- temp = 256 + temp;
- }
- m_globalCrc = ( m_globalCrc << 8 ) ^ CRC32_TABLE[ temp ];
- }
-}
-
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE.txt file.
+ */
+package installer;
+
+/**
+ * A simple class the hold and calculate the CRC for sanity checking of the
+ * data.
+ *
+ * @author <a href="mailto:keiron at aftexsw.com">Keiron Liddle</a>
+ */
+class CRC
+{
+ private static int[] CRC32_TABLE = new int[]
+ {
+ 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
+ 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
+ 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
+ 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
+ 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
+ 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
+ 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
+ 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
+ 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
+ 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
+ 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
+ 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
+ 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
+ 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
+ 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
+ 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
+ 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
+ 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
+ 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
+ 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
+ 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
+ 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
+ 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
+ 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
+ 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
+ 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
+ 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
+ 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
+ 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
+ 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
+ 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
+ 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
+ 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
+ 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
+ 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
+ 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
+ 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
+ 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
+ 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
+ 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
+ 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
+ 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
+ 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
+ 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
+ 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
+ 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
+ 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
+ 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
+ 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
+ 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
+ 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
+ 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
+ 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
+ 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
+ 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
+ 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
+ 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
+ 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
+ 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
+ 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
+ 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
+ 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
+ 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
+ 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
+ };
+
+ private int m_globalCrc;
+
+ protected CRC()
+ {
+ initialiseCRC();
+ }
+
+ int getFinalCRC()
+ {
+ return ~m_globalCrc;
+ }
+
+ void initialiseCRC()
+ {
+ m_globalCrc = 0xffffffff;
+ }
+
+ void updateCRC( final int inCh )
+ {
+ int temp = ( m_globalCrc >> 24 ) ^ inCh;
+ if( temp < 0 )
+ {
+ temp = 256 + temp;
+ }
+ m_globalCrc = ( m_globalCrc << 8 ) ^ CRC32_TABLE[ temp ];
+ }
+}
+
diff --git a/jEdit/installer/ConsoleInstall.java b/jEdit/installer/ConsoleInstall.java
index 0ac2ac3..d24884e 100644
--- a/jEdit/installer/ConsoleInstall.java
+++ b/jEdit/installer/ConsoleInstall.java
@@ -1,138 +1,138 @@
-/*
- * ConsoleInstall.java
- *
- * Originally written by Slava Pestov for the jEdit installer project. This work
- * has been placed into the public domain. You may use this work in any way and
- * for any purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package installer;
-
-import java.io.*;
-import java.util.Vector;
-
-/*
- * Performs text-only installation.
- */
-public class ConsoleInstall
-{
- public ConsoleInstall()
- {
- installer = new Install();
-
- String appName = installer.getProperty("app.name");
- String appVersion = installer.getProperty("app.version");
-
- BufferedReader in = new BufferedReader(new InputStreamReader(
- System.in));
-
- System.out.println("*** " + appName + " " + appVersion + " installer");
-
- OperatingSystem os = OperatingSystem.getOperatingSystem();
-
- String installDir = os.getInstallDirectory(appName,appVersion);
-
- System.out.print("Installation directory: [" + installDir + "] ");
- System.out.flush();
-
- String _installDir = readLine(in);
- if(_installDir.length() != 0)
- installDir = _installDir;
- else
- System.out.println("Will use default");
-
- OperatingSystem.OSTask[] osTasks = os.getOSTasks(installer);
-
- for(int i = 0; i < osTasks.length; i++)
- {
- OperatingSystem.OSTask osTask = osTasks[i];
- String label = osTask.getLabel();
- // label == null means no configurable options
- if(label != null)
- {
- String dir = osTask.getDirectory();
- System.out.print(label + " [" + dir + "] ");
- System.out.flush();
-
- dir = readLine(in);
- osTask.setEnabled(true);
- if(dir.length() != 0)
- {
- if(dir.equals("off"))
- osTask.setEnabled(false);
- else
- osTask.setDirectory(dir);
- }
- else
- System.out.println("will use default");
- }
- }
-
- int compCount = installer.getIntegerProperty("comp.count");
- Vector components = new Vector(compCount);
-
- System.out.println("*** Program components to install");
- for(int i = 0; i < compCount; i++)
- {
- String fileset = installer.getProperty("comp." + i + ".fileset");
-
- String osDep = installer.getProperty("comp." + i + ".os");
- if(osDep != null)
- {
- if(!os.getClass().getName().endsWith(osDep))
- {
- continue;
- }
- }
-
- System.out.print("Install "
- + installer.getProperty("comp." + i + ".name")
- + " ("
- + installer.getProperty("comp." + i + ".disk-size")
- + "Kb) [Y/n]? ");
-
- String line = readLine(in);
- if(line.length() == 0 || line.charAt(0) == 'y'
- || line.charAt(0) == 'Y')
- components.addElement(fileset);
- }
-
- System.out.println("*** Starting installation...");
- ConsoleProgress progress = new ConsoleProgress();
- InstallThread thread = new InstallThread(
- installer,progress,installDir,osTasks,
- 0 /* XXX */,components);
- thread.start();
- }
-
- // private members
- private Install installer;
-
- private String readLine(BufferedReader in)
- {
- try
- {
- String line = in.readLine();
- if(line == null)
- {
- System.err.println("\nEOF in input!");
- System.exit(1);
- // can't happen
- throw new InternalError();
- }
- return line;
- }
- catch(IOException io)
- {
- System.err.println("\nI/O error: " + io);
- System.exit(1);
- // can't happen
- throw new InternalError();
- }
- }
-}
+/*
+ * ConsoleInstall.java
+ *
+ * Originally written by Slava Pestov for the jEdit installer project. This work
+ * has been placed into the public domain. You may use this work in any way and
+ * for any purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package installer;
+
+import java.io.*;
+import java.util.Vector;
+
+/*
+ * Performs text-only installation.
+ */
+public class ConsoleInstall
+{
+ public ConsoleInstall()
+ {
+ installer = new Install();
+
+ String appName = installer.getProperty("app.name");
+ String appVersion = installer.getProperty("app.version");
+
+ BufferedReader in = new BufferedReader(new InputStreamReader(
+ System.in));
+
+ System.out.println("*** " + appName + " " + appVersion + " installer");
+
+ OperatingSystem os = OperatingSystem.getOperatingSystem();
+
+ String installDir = os.getInstallDirectory(appName,appVersion);
+
+ System.out.print("Installation directory: [" + installDir + "] ");
+ System.out.flush();
+
+ String _installDir = readLine(in);
+ if(_installDir.length() != 0)
+ installDir = _installDir;
+ else
+ System.out.println("Will use default");
+
+ OperatingSystem.OSTask[] osTasks = os.getOSTasks(installer);
+
+ for(int i = 0; i < osTasks.length; i++)
+ {
+ OperatingSystem.OSTask osTask = osTasks[i];
+ String label = osTask.getLabel();
+ // label == null means no configurable options
+ if(label != null)
+ {
+ String dir = osTask.getDirectory();
+ System.out.print(label + " [" + dir + "] ");
+ System.out.flush();
+
+ dir = readLine(in);
+ osTask.setEnabled(true);
+ if(dir.length() != 0)
+ {
+ if(dir.equals("off"))
+ osTask.setEnabled(false);
+ else
+ osTask.setDirectory(dir);
+ }
+ else
+ System.out.println("will use default");
+ }
+ }
+
+ int compCount = installer.getIntegerProperty("comp.count");
+ Vector components = new Vector(compCount);
+
+ System.out.println("*** Program components to install");
+ for(int i = 0; i < compCount; i++)
+ {
+ String fileset = installer.getProperty("comp." + i + ".fileset");
+
+ String osDep = installer.getProperty("comp." + i + ".os");
+ if(osDep != null)
+ {
+ if(!os.getClass().getName().endsWith(osDep))
+ {
+ continue;
+ }
+ }
+
+ System.out.print("Install "
+ + installer.getProperty("comp." + i + ".name")
+ + " ("
+ + installer.getProperty("comp." + i + ".disk-size")
+ + "Kb) [Y/n]? ");
+
+ String line = readLine(in);
+ if(line.length() == 0 || line.charAt(0) == 'y'
+ || line.charAt(0) == 'Y')
+ components.addElement(fileset);
+ }
+
+ System.out.println("*** Starting installation...");
+ ConsoleProgress progress = new ConsoleProgress();
+ InstallThread thread = new InstallThread(
+ installer,progress,installDir,osTasks,
+ 0 /* XXX */,components);
+ thread.start();
+ }
+
+ // private members
+ private Install installer;
+
+ private String readLine(BufferedReader in)
+ {
+ try
+ {
+ String line = in.readLine();
+ if(line == null)
+ {
+ System.err.println("\nEOF in input!");
+ System.exit(1);
+ // can't happen
+ throw new InternalError();
+ }
+ return line;
+ }
+ catch(IOException io)
+ {
+ System.err.println("\nI/O error: " + io);
+ System.exit(1);
+ // can't happen
+ throw new InternalError();
+ }
+ }
+}
diff --git a/jEdit/installer/ConsoleProgress.java b/jEdit/installer/ConsoleProgress.java
index 49e02da..a0a0004 100644
--- a/jEdit/installer/ConsoleProgress.java
+++ b/jEdit/installer/ConsoleProgress.java
@@ -1,44 +1,44 @@
-/*
- * ConsoleProgress.java
- *
- * Originally written by Slava Pestov for the jEdit installer project. This work
- * has been placed into the public domain. You may use this work in any way and
- * for any purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package installer;
-
-/*
- * Displays install progress when running in text-only mode.
- */
-public class ConsoleProgress implements Progress
-{
-
- public void setMaximum(int max)
- {
- }
-
- public void advance(int value)
- {
- }
-
- public void done()
- {
- System.out.println("*** Installation complete");
- }
-
- public void message(String message)
- {
- System.out.println(message);
- }
-
- public void error(String message)
- {
- System.err.println("*** An error occurred: " + message);
- }
-}
+/*
+ * ConsoleProgress.java
+ *
+ * Originally written by Slava Pestov for the jEdit installer project. This work
+ * has been placed into the public domain. You may use this work in any way and
+ * for any purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package installer;
+
+/*
+ * Displays install progress when running in text-only mode.
+ */
+public class ConsoleProgress implements Progress
+{
+
+ public void setMaximum(int max)
+ {
+ }
+
+ public void advance(int value)
+ {
+ }
+
+ public void done()
+ {
+ System.out.println("*** Installation complete");
+ }
+
+ public void message(String message)
+ {
+ System.out.println(message);
+ }
+
+ public void error(String message)
+ {
+ System.err.println("*** An error occurred: " + message);
+ }
+}
diff --git a/jEdit/installer/Install.java b/jEdit/installer/Install.java
index 3556895..82755ca 100644
--- a/jEdit/installer/Install.java
+++ b/jEdit/installer/Install.java
@@ -1,163 +1,163 @@
-/*
- * Install.java - Main class of the installer
- *
- * Originally written by Slava Pestov for the jEdit installer project. This work
- * has been placed into the public domain. You may use this work in any way and
- * for any purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package installer;
-
-import javax.swing.plaf.metal.*;
-import javax.swing.*;
-import java.io.*;
-import java.util.Properties;
-import java.security.*;
-import java.net.URL;
-
-public class Install
-{
- /**
- * detects wether the installer is running from a path
- * containing exclamation marks.
- * This has been reported as a cause of failure on Linux and MS Windows :
- * see bug #2065330 - Installer doesn't run on dir having ! as last char in name.
- */
- private static boolean isRunningFromExclam()
- {
- Class me = Install.class;
- ProtectionDomain domaine = me.getProtectionDomain();
- CodeSource source = domaine.getCodeSource();
- URL mySource = source.getLocation();
- // In fact the check is more restrictive than required :
- // a problem occurs only when the ! is at the end of directory
- return mySource.toString().contains("!");
- }
-
- private static void errorAndExit(boolean isGUI, String message)
- {
- if(isGUI)
- {
- JTextArea messageCnt = new JTextArea(message);
- JOptionPane.showMessageDialog(null,
- messageCnt,
- "jEdit installer error...", JOptionPane.ERROR_MESSAGE);
- }
- else
- {
- System.err.println(message);
- }
- System.exit(1);
- }
-
- public static void main(String[] args)
- {
- boolean isGUI = args.length == 0;
-
- String javaVersion = System.getProperty("java.version");
- if(javaVersion.compareTo("1.5") < 0)
- {
- errorAndExit(isGUI,
- "You are running Java version "
- + javaVersion + " from "+System.getProperty("java.vendor")+".\n"
- +"This installer requires Java 1.5 or later.");
- }
-
- if(isRunningFromExclam())
- {
- errorAndExit(isGUI,
- "You are running the installer from a directory containing exclamation marks."
- + "\nIt is a known cause of failure of the installer"
- + "\n(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4523159 for the curious ones)."
- + "\nPlease move the installer somewhere else and run it again.");
- }
-
- if(isGUI)
- new SwingInstall();
- else if(args.length == 1 && args[0].equals("text"))
- new ConsoleInstall();
- else if(args.length >= 2 && args[0].equals("auto"))
- new NonInteractiveInstall(args);
- else
- {
- System.err.println("Usage:");
- System.err.println("java -jar <installer JAR>");
- System.err.println("java -jar <installer JAR> text");
- System.err.println("java -jar <installer JAR> auto"
- + " <install dir> [unix-script=<dir>] [unix-man=<dir>]");
- System.err.println("text parameter starts installer in text-only mode.");
- System.err.println("auto parameter starts installer in non-interactive mode.");
- }
- }
-
- public Install()
- {
- props = new Properties();
- try
- {
- InputStream in = getClass().getResourceAsStream("/installer/install.props");
- props.load(in);
- in.close();
- }
- catch(IOException io)
- {
- System.err.println("Error loading 'install.props':");
- io.printStackTrace();
- }
-
- buf = new byte[32768];
- }
-
- public String getProperty(String name)
- {
- return props.getProperty(name);
- }
-
- public int getIntegerProperty(String name)
- {
- try
- {
- return Integer.parseInt(props.getProperty(name));
- }
- catch(Exception e)
- {
- return -1;
- }
- }
-
- public void copy(InputStream in, String outfile, Progress progress)
- throws IOException
- {
- File outFile = new File(outfile);
-
- OperatingSystem.getOperatingSystem().mkdirs(outFile.getParent());
-
- BufferedOutputStream out = new BufferedOutputStream(
- new FileOutputStream(outFile));
-
- int count;
-
- for(;;)
- {
- count = in.read(buf,0,Math.min(in.available(),buf.length));
- if(count == -1 || count == 0)
- break;
-
- out.write(buf,0,count);
- if(progress != null)
- progress.advance(count);
- }
-
- //in.close();
- out.close();
- }
-
- // private members
- private Properties props;
- private byte[] buf;
-}
+/*
+ * Install.java - Main class of the installer
+ *
+ * Originally written by Slava Pestov for the jEdit installer project. This work
+ * has been placed into the public domain. You may use this work in any way and
+ * for any purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package installer;
+
+import javax.swing.plaf.metal.*;
+import javax.swing.*;
+import java.io.*;
+import java.util.Properties;
+import java.security.*;
+import java.net.URL;
+
+public class Install
+{
+ /**
+ * detects wether the installer is running from a path
+ * containing exclamation marks.
+ * This has been reported as a cause of failure on Linux and MS Windows :
+ * see bug #2065330 - Installer doesn't run on dir having ! as last char in name.
+ */
+ private static boolean isRunningFromExclam()
+ {
+ Class me = Install.class;
+ ProtectionDomain domaine = me.getProtectionDomain();
+ CodeSource source = domaine.getCodeSource();
+ URL mySource = source.getLocation();
+ // In fact the check is more restrictive than required :
+ // a problem occurs only when the ! is at the end of directory
+ return mySource.toString().contains("!");
+ }
+
+ private static void errorAndExit(boolean isGUI, String message)
+ {
+ if(isGUI)
+ {
+ JTextArea messageCnt = new JTextArea(message);
+ JOptionPane.showMessageDialog(null,
+ messageCnt,
+ "jEdit installer error...", JOptionPane.ERROR_MESSAGE);
+ }
+ else
+ {
+ System.err.println(message);
+ }
+ System.exit(1);
+ }
+
+ public static void main(String[] args)
+ {
+ boolean isGUI = args.length == 0;
+
+ String javaVersion = System.getProperty("java.version");
+ if(javaVersion.compareTo("1.6") < 0)
+ {
+ errorAndExit(isGUI,
+ "You are running Java version "
+ + javaVersion + " from "+System.getProperty("java.vendor")+".\n"
+ +"This installer requires Java 1.6 or later.");
+ }
+
+ if(isRunningFromExclam())
+ {
+ errorAndExit(isGUI,
+ "You are running the installer from a directory containing exclamation marks."
+ + "\nIt is a known cause of failure of the installer"
+ + "\n(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4523159 for the curious ones)."
+ + "\nPlease move the installer somewhere else and run it again.");
+ }
+
+ if(isGUI)
+ new SwingInstall();
+ else if(args.length == 1 && args[0].equals("text"))
+ new ConsoleInstall();
+ else if(args.length >= 2 && args[0].equals("auto"))
+ new NonInteractiveInstall(args);
+ else
+ {
+ System.err.println("Usage:");
+ System.err.println("java -jar <installer JAR>");
+ System.err.println("java -jar <installer JAR> text");
+ System.err.println("java -jar <installer JAR> auto"
+ + " <install dir> [unix-script=<dir>] [unix-man=<dir>]");
+ System.err.println("text parameter starts installer in text-only mode.");
+ System.err.println("auto parameter starts installer in non-interactive mode.");
+ }
+ }
+
+ public Install()
+ {
+ props = new Properties();
+ try
+ {
+ InputStream in = getClass().getResourceAsStream("/installer/install.props");
+ props.load(in);
+ in.close();
+ }
+ catch(IOException io)
+ {
+ System.err.println("Error loading 'install.props':");
+ io.printStackTrace();
+ }
+
+ buf = new byte[32768];
+ }
+
+ public String getProperty(String name)
+ {
+ return props.getProperty(name);
+ }
+
+ public int getIntegerProperty(String name)
+ {
+ try
+ {
+ return Integer.parseInt(props.getProperty(name));
+ }
+ catch(Exception e)
+ {
+ return -1;
+ }
+ }
+
+ public void copy(InputStream in, String outfile, Progress progress)
+ throws IOException
+ {
+ File outFile = new File(outfile);
+
+ OperatingSystem.getOperatingSystem().mkdirs(outFile.getParent());
+
+ BufferedOutputStream out = new BufferedOutputStream(
+ new FileOutputStream(outFile));
+
+ int count;
+
+ for(;;)
+ {
+ count = in.read(buf,0,Math.min(in.available(),buf.length));
+ if(count == -1 || count == 0)
+ break;
+
+ out.write(buf,0,count);
+ if(progress != null)
+ progress.advance(count);
+ }
+
+ //in.close();
+ out.close();
+ }
+
+ // private members
+ private Properties props;
+ private byte[] buf;
+}
diff --git a/jEdit/installer/InstallThread.java b/jEdit/installer/InstallThread.java
index 5666c97..c5971ce 100644
--- a/jEdit/installer/InstallThread.java
+++ b/jEdit/installer/InstallThread.java
@@ -1,114 +1,114 @@
-/*
- * InstallThread.java
- *
- * Originally written by Slava Pestov for the jEdit installer project. This work
- * has been placed into the public domain. You may use this work in any way and
- * for any purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-package installer;
-
-import java.io.*;
-import java.util.Vector;
-import java.net.*;
-
-/*
- * The thread that performs installation.
- */
-public class InstallThread extends Thread
-{
- public InstallThread(Install installer, Progress progress,
- String installDir, OperatingSystem.OSTask[] osTasks,
- int size, Vector components)
- {
- super("Install thread");
-
- this.installer = installer;
- this.progress = progress;
- this.installDir = installDir;
- this.osTasks = osTasks;
- this.size = size;
- this.components = components;
- }
-
- public void run()
- {
- progress.setMaximum(size * 1024);
-
- //return value ignored : already signalled in ServerKiller
- progress.message("stopping any jEdit server");
- ServerKiller.quitjEditServer();
-
- try
- {
- // install user-selected packages
- for(int i = 0; i < components.size(); i++)
- {
- String comp = (String)components.elementAt(i);
- progress.message("Installing " + comp);
- installComponent(comp);
- }
-
- // do operating system specific stuff (creating startup
- // scripts, installing man pages, etc.)
- for(int i = 0; i < osTasks.length; i++)
- {
- progress.message("Performing task " +
- osTasks[i].getName());
- osTasks[i].perform(installDir,components);
- }
- }
- catch(FileNotFoundException fnf)
- {
- progress.error("The installer could not create the "
- + "destination directory.\n"
- + "Maybe you do not have write permission?");
- return;
- }
- catch(IOException io)
- {
- progress.error(io.toString());
- return;
- }
-
- progress.done();
- }
-
- // private members
- private Install installer;
- private Progress progress;
- private String installDir;
- private OperatingSystem.OSTask[] osTasks;
- private int size;
- private Vector components;
-
- private void installComponent(String name) throws IOException
- {
- InputStream in = new BufferedInputStream(
- getClass().getResourceAsStream(name + ".tar.bz2"));
- // skip header bytes
- // maybe should check if they're valid or not?
- in.read();
- in.read();
-
- TarInputStream tarInput = new TarInputStream(
- new CBZip2InputStream(in));
- TarEntry entry;
- while((entry = tarInput.getNextEntry()) != null)
- {
- if(entry.isDirectory())
- continue;
- String fileName = entry.getName();
- //System.err.println(fileName);
- String outfile = installDir + File.separatorChar
- + fileName.replace('/',File.separatorChar);
- installer.copy(tarInput,outfile,progress);
- }
-
- tarInput.close();
- }
-}
+/*
+ * InstallThread.java
+ *
+ * Originally written by Slava Pestov for the jEdit installer project. This work
+ * has been placed into the public domain. You may use this work in any way and
+ * for any purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+package installer;
+
+import java.io.*;
+import java.util.Vector;
+import java.net.*;
+
+/*
+ * The thread that performs installation.
+ */
+public class InstallThread extends Thread
+{
+ public InstallThread(Install installer, Progress progress,
+ String installDir, OperatingSystem.OSTask[] osTasks,
+ int size, Vector components)
+ {
+ super("Install thread");
+
+ this.installer = installer;
+ this.progress = progress;
+ this.installDir = installDir;
+ this.osTasks = osTasks;
+ this.size = size;
+ this.components = components;
+ }
+
+ public void run()
+ {
+ progress.setMaximum(size * 1024);
+
+ //return value ignored : already signalled in ServerKiller
+ progress.message("stopping any jEdit server");
+ ServerKiller.quitjEditServer();
+
+ try
+ {
+ // install user-selected packages
+ for(int i = 0; i < components.size(); i++)
+ {
+ String comp = (String)components.elementAt(i);
+ progress.message("Installing " + comp);
+ installComponent(comp);
+ }
+
+ // do operating system specific stuff (creating startup
+ // scripts, installing man pages, etc.)
+ for(int i = 0; i < osTasks.length; i++)
+ {
+ progress.message("Performing task " +
+ osTasks[i].getName());
+ osTasks[i].perform(installDir,components);
+ }
+ }
+ catch(FileNotFoundException fnf)
+ {
+ progress.error("The installer could not create the "
+ + "destination directory.\n"
+ + "Maybe you do not have write permission?");
+ return;
+ }
+ catch(IOException io)
+ {
+ progress.error(io.toString());
+ return;
+ }
+
+ progress.done();
+ }
+
+ // private members
+ private Install installer;
+ private Progress progress;
+ private String installDir;
+ private OperatingSystem.OSTask[] osTasks;
+ private int size;
+ private Vector components;
+
+ private void installComponent(String name) throws IOException
+ {
+ InputStream in = new BufferedInputStream(
+ getClass().getResourceAsStream(name + ".tar.bz2"));
+ // skip header bytes
+ // maybe should check if they're valid or not?
+ in.read();
+ in.read();
+
+ TarInputStream tarInput = new TarInputStream(
+ new CBZip2InputStream(in));
+ TarEntry entry;
+ while((entry = tarInput.getNextEntry()) != null)
+ {
+ if(entry.isDirectory())
+ continue;
+ String fileName = entry.getName();
+ //System.err.println(fileName);
+ String outfile = installDir + File.separatorChar
+ + fileName.replace('/',File.separatorChar);
+ installer.copy(tarInput,outfile,progress);
+ }
+
+ tarInput.close();
+ }
+}
diff --git a/jEdit/installer/InvalidHeaderException.java b/jEdit/installer/InvalidHeaderException.java
index 0d40e80..be46ae0 100644
--- a/jEdit/installer/InvalidHeaderException.java
+++ b/jEdit/installer/InvalidHeaderException.java
@@ -1,42 +1,42 @@
-/*
-** Authored by Timothy Gerard Endres
-** <mailto:time at gjt.org> <http://www.trustice.com>
-**
-** This work has been placed into the public domain.
-** You may use this work in any way and for any purpose you wish.
-**
-** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
-** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
-** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
-** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
-** REDISTRIBUTION OF THIS SOFTWARE.
-**
-*/
-
-package installer;
-
-import java.io.IOException;
-
-/**
- * This exception is used to indicate that there is a problem
- * with a TAR archive header.
- */
-
-public class
-InvalidHeaderException extends IOException
- {
-
- public
- InvalidHeaderException()
- {
- super();
- }
-
- public
- InvalidHeaderException( String msg )
- {
- super( msg );
- }
-
- }
-
+/*
+** Authored by Timothy Gerard Endres
+** <mailto:time at gjt.org> <http://www.trustice.com>
+**
+** This work has been placed into the public domain.
+** You may use this work in any way and for any purpose you wish.
+**
+** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
+** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
+** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
+** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
+** REDISTRIBUTION OF THIS SOFTWARE.
+**
+*/
+
+package installer;
+
+import java.io.IOException;
+
+/**
+ * This exception is used to indicate that there is a problem
+ * with a TAR archive header.
+ */
+
+public class
+InvalidHeaderException extends IOException
+ {
+
+ public
+ InvalidHeaderException()
+ {
+ super();
+ }
+
+ public
+ InvalidHeaderException( String msg )
+ {
+ super( msg );
+ }
+
+ }
+
diff --git a/jEdit/installer/NonInteractiveInstall.java b/jEdit/installer/NonInteractiveInstall.java
index 32afb7a..35b6d3a 100644
--- a/jEdit/installer/NonInteractiveInstall.java
+++ b/jEdit/installer/NonInteractiveInstall.java
@@ -1,91 +1,91 @@
-/*
- * NonInteractiveInstall.java
- *
- * Originally written by Slava Pestov for the jEdit installer project. This work
- * has been placed into the public domain. You may use this work in any way and
- * for any purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package installer;
-
-import java.util.Vector;
-
-/*
- * Performs non-interactive installation.
- */
-public class NonInteractiveInstall
-{
- public NonInteractiveInstall(String[] args)
- {
- String installDir = args[1];
-
- installer = new Install();
-
- OperatingSystem os = OperatingSystem.getOperatingSystem();
- OperatingSystem.OSTask[] osTasks = os.getOSTasks(installer);
-
- for(int i = 2; i < args.length; i++)
- {
- String arg = args[i];
- int index = arg.indexOf('=');
- if(index == -1)
- {
- System.err.println("Invalid parameter: " + arg);
- continue;
- }
-
- String taskName = arg.substring(0,index);
- String taskDir = arg.substring(index + 1);
- for(int j = 0; j < osTasks.length; j++)
- {
- OperatingSystem.OSTask osTask = osTasks[j];
- if(osTask.getName().equals(taskName))
- {
- if(taskDir.equals("off"))
- osTask.setEnabled(false);
- else
- {
- osTask.setEnabled(true);
- osTask.setDirectory(taskDir);
- }
- break;
- }
- }
- }
-
- int compCount = installer.getIntegerProperty("comp.count");
- Vector components = new Vector(compCount);
-
- for(int i = 0; i < compCount; i++)
- {
- String fileset = installer.getProperty("comp." + i + ".fileset");
-
- String osDep = installer.getProperty("comp." + i + ".os");
- if(osDep != null)
- {
- if(!os.getClass().getName().endsWith(osDep))
- {
- continue;
- }
- }
-
- components.addElement(fileset);
- }
-
- //
-
- ConsoleProgress progress = new ConsoleProgress();
- InstallThread thread = new InstallThread(
- installer,progress,installDir,osTasks,
- 0 /* XXX */,components);
- thread.start();
- }
-
- // private members
- private Install installer;
-}
+/*
+ * NonInteractiveInstall.java
+ *
+ * Originally written by Slava Pestov for the jEdit installer project. This work
+ * has been placed into the public domain. You may use this work in any way and
+ * for any purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package installer;
+
+import java.util.Vector;
+
+/*
+ * Performs non-interactive installation.
+ */
+public class NonInteractiveInstall
+{
+ public NonInteractiveInstall(String[] args)
+ {
+ String installDir = args[1];
+
+ installer = new Install();
+
+ OperatingSystem os = OperatingSystem.getOperatingSystem();
+ OperatingSystem.OSTask[] osTasks = os.getOSTasks(installer);
+
+ for(int i = 2; i < args.length; i++)
+ {
+ String arg = args[i];
+ int index = arg.indexOf('=');
+ if(index == -1)
+ {
+ System.err.println("Invalid parameter: " + arg);
+ continue;
+ }
+
+ String taskName = arg.substring(0,index);
+ String taskDir = arg.substring(index + 1);
+ for(int j = 0; j < osTasks.length; j++)
+ {
+ OperatingSystem.OSTask osTask = osTasks[j];
+ if(osTask.getName().equals(taskName))
+ {
+ if(taskDir.equals("off"))
+ osTask.setEnabled(false);
+ else
+ {
+ osTask.setEnabled(true);
+ osTask.setDirectory(taskDir);
+ }
+ break;
+ }
+ }
+ }
+
+ int compCount = installer.getIntegerProperty("comp.count");
+ Vector components = new Vector(compCount);
+
+ for(int i = 0; i < compCount; i++)
+ {
+ String fileset = installer.getProperty("comp." + i + ".fileset");
+
+ String osDep = installer.getProperty("comp." + i + ".os");
+ if(osDep != null)
+ {
+ if(!os.getClass().getName().endsWith(osDep))
+ {
+ continue;
+ }
+ }
+
+ components.addElement(fileset);
+ }
+
+ //
+
+ ConsoleProgress progress = new ConsoleProgress();
+ InstallThread thread = new InstallThread(
+ installer,progress,installDir,osTasks,
+ 0 /* XXX */,components);
+ thread.start();
+ }
+
+ // private members
+ private Install installer;
+}
diff --git a/jEdit/installer/OperatingSystem.java b/jEdit/installer/OperatingSystem.java
index c9772e5..241e6bb 100644
--- a/jEdit/installer/OperatingSystem.java
+++ b/jEdit/installer/OperatingSystem.java
@@ -1,376 +1,376 @@
-/*
- * OperatingSystem.java
- *
- * Originally written by Slava Pestov for the jEdit installer project. This work
- * has been placed into the public domain. You may use this work in any way and
- * for any purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package installer;
-
-import java.io.*;
-import java.util.Vector;
-
-/*
- * Abstracts away operating-specific stuff, like finding out the installation
- * directory, creating a shortcut to start to program, and such.
- */
-public abstract class OperatingSystem
-{
- public abstract String getInstallDirectory(String name, String version);
-
- public abstract static class OSTask
- {
- protected Install installer;
- protected String name;
- protected String label;
- protected String directory;
- protected boolean enabled;
-
- public OSTask(Install installer, String name)
- {
- this.installer = installer;
- this.name = name;
- this.label = installer.getProperty("ostask." + name + ".label");
- this.directory = getDefaultDirectory(installer);
-
- // on by default
- enabled = true;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getLabel()
- {
- return label;
- }
-
- public String getDefaultDirectory(Install installer)
- {
- return null;
- }
-
- public String getDirectory()
- {
- return directory;
- }
-
- public boolean isEnabled()
- {
- return enabled;
- }
-
- public void setEnabled(boolean enabled)
- {
- this.enabled = enabled;
- }
-
- public void setDirectory(String directory)
- {
- this.directory = directory;
- }
-
- public abstract void perform(String installDir,
- Vector filesets) throws IOException;
- }
-
- public OSTask[] getOSTasks(Install installer)
- {
- return new OSTask[0];
- }
-
- public void mkdirs(String directory) throws IOException
- {
- File file = new File(directory);
- if(!file.exists())
- file.mkdirs();
- }
-
- public static OperatingSystem getOperatingSystem()
- {
- if(os != null)
- return os;
-
- if(System.getProperty("mrj.version") != null)
- {
- os = new MacOS();
- }
- else
- {
- String osName = System.getProperty("os.name");
- if(osName.indexOf("Windows") != -1)
- os = new Windows();
- else if(osName.indexOf("OS/2") != -1)
- os = new HalfAnOS();
- else if(osName.indexOf("VMS") != -1)
- os = new VMS();
- else
- os = new Unix();
- }
-
- return os;
- }
-
- public static class Unix extends OperatingSystem
- {
- public String getInstallDirectory(String name, String version)
- {
- String dir = "/usr/local/share/";
- if(!new File(dir).canWrite())
- {
- dir = System.getProperty("user.home");
- }
-
- return new File(dir,name.toLowerCase() + "/" + version).getPath();
- }
-
- public String getExtraClassPath()
- {
- return "";
- }
-
- public class ScriptOSTask extends OSTask
- {
- public ScriptOSTask(Install installer)
- {
- super(installer,"unix-script");
- }
-
- public String getDefaultDirectory(Install installer)
- {
- String dir = "/usr/local/";
- if(!new File(dir).canWrite())
- {
- dir = System.getProperty("user.home");
- }
-
- return new File(dir,"bin").getPath();
- }
-
- public void perform(String installDir,
- Vector filesets) throws IOException
- {
- if(!enabled)
- {
- return;
- }
-
- mkdirs(directory);
-
- String name = installer.getProperty("app.name");
-
- // create app start script
- String script = directory + File.separatorChar
- + name.toLowerCase();
-
- // Delete existing copy
- new File(script).delete();
-
- // Write simple script
- FileWriter out = new FileWriter(script);
- out.write("#!/bin/sh\n");
- out.write("#\n");
- out.write("# Runs jEdit - Programmer's Text Editor.\n");
- out.write("#\n");
- out.write("\n");
- out.write("# Set jvm heap initial and maximum sizes (in megabytes).\n");
- out.write("JAVA_HEAP_MAX_SIZE=192\n");
- out.write("\n");
- out.write("DEFAULT_JAVA_HOME=\""
- + System.getProperty("java.home")
- + "\"\n");
- out.write("if [ -z \"$JAVA_HOME\" ]; then\n");
- out.write("\tJAVA_HOME=\"$DEFAULT_JAVA_HOME\"\n");
- out.write("fi\n");
- out.write("\n");
- out.write("# Launch application.\n");
- out.write("\n");
-
- String jar = "\""+ installDir + File.separator
- + name.toLowerCase() + ".jar"+"\"";
-
-
- out.write("exec \"$JAVA_HOME/bin/java\"" +
- " -Xmx${JAVA_HEAP_MAX_SIZE}M -jar " +
- jar + " \"$@\"\n");
- out.close();
-
- // Make it executable
- String[] chmodArgs = { "chmod", "755", script };
- exec(chmodArgs);
- }
- }
-
- public class ManPageOSTask extends OSTask
- {
- public ManPageOSTask(Install installer)
- {
- super(installer,"unix-man");
- }
-
- public String getDefaultDirectory(Install installer)
- {
- String dir = "/usr/local/";
- if(!new File(dir).canWrite())
- dir = System.getProperty("user.home");
-
- return new File(dir,"man/man1").getPath();
- }
-
- public void perform(String installDir,
- Vector filesets) throws IOException
- {
- if(!enabled)
- return;
-
- mkdirs(directory);
-
- String name = installer.getProperty("app.name");
-
- // install man page
- String manpage = installer.getProperty("ostask.unix-man.manpage");
-
- InputStream in = getClass().getResourceAsStream("/" + manpage);
- installer.copy(in,new File(directory,manpage).getPath(),
- null);
- }
- }
-
- public OSTask[] getOSTasks(Install installer)
- {
- return new OSTask[] { new ScriptOSTask(installer),
- new ManPageOSTask(installer) };
- }
-
- public void mkdirs(String directory) throws IOException
- {
- File file = new File(directory);
- if(!file.exists())
- {
- String[] mkdirArgs = { "mkdir", "-m", "755",
- "-p", directory };
- exec(mkdirArgs);
- }
- }
-
- public void exec(String[] args) throws IOException
- {
- Process proc = Runtime.getRuntime().exec(args);
- proc.getInputStream().close();
- proc.getOutputStream().close();
- proc.getErrorStream().close();
- try
- {
- proc.waitFor();
- }
- catch(InterruptedException ie)
- {
- }
- }
- }
-
- public static class MacOS extends Unix
- {
- public String getInstallDirectory(String name, String version)
- {
- return "/Applications/" + name + " " + version;
- }
-
- public String getExtraClassPath()
- {
- return "/System/Library/Java/:";
- }
- }
-
- public static class Windows extends OperatingSystem
- {
- public String getInstallDirectory(String name, String version)
- {
- String programDir = System.getenv("ProgramFiles");
- // Here is a workaround for the case that the environment
- // variable is not defined. Windows 98 and ME are known as
- // such environments. This makes sense while jEdit supports
- // JRE 5. JRE 6 doesn't support Windows 98 and ME.
- if(programDir == null)
- {
- // This is a hint for what is needed here.
- programDir = "%ProgramFiles%";
- }
- return programDir + "\\" + name + " " + version;
- }
-
- public class JEditLauncherOSTask extends OSTask
- {
- public JEditLauncherOSTask(Install installer)
- {
- super(installer,"jedit-launcher");
- }
-
- public String getDefaultDirectory(Install installer)
- {
- return null;
- }
-
- public void perform(String installDir,
- Vector filesets)
- {
- if(!enabled
- || !filesets.contains("jedit-windows"))
- return;
-
- // run jEditLauncher installation
- File executable = new File(installDir,"jedit.exe");
- if(!executable.exists())
- return;
-
- String[] args = { executable.getPath(), "/i",
- System.getProperty("java.home")
- + File.separator
- + "bin" };
-
- try
- {
- Runtime.getRuntime().exec(args).waitFor();
- }
- catch(IOException io)
- {
- }
- catch(InterruptedException ie)
- {
- }
- }
- }
-
- public OSTask[] getOSTasks(Install installer)
- {
- return new OSTask[] { /* new JEditLauncherOSTask(installer) */ };
- }
- }
-
- public static class HalfAnOS extends OperatingSystem
- {
- public String getInstallDirectory(String name, String version)
- {
- return "C:\\" + name + " " + version;
- }
- }
-
- public static class VMS extends OperatingSystem
- {
- public String getInstallDirectory(String name, String version)
- {
- return "./" + name.toLowerCase() + "/" + version;
- }
- }
-
- // private members
- private static OperatingSystem os;
-}
+/*
+ * OperatingSystem.java
+ *
+ * Originally written by Slava Pestov for the jEdit installer project. This work
+ * has been placed into the public domain. You may use this work in any way and
+ * for any purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package installer;
+
+import java.io.*;
+import java.util.Vector;
+
+/*
+ * Abstracts away operating-specific stuff, like finding out the installation
+ * directory, creating a shortcut to start to program, and such.
+ */
+public abstract class OperatingSystem
+{
+ public abstract String getInstallDirectory(String name, String version);
+
+ public abstract static class OSTask
+ {
+ protected Install installer;
+ protected String name;
+ protected String label;
+ protected String directory;
+ protected boolean enabled;
+
+ public OSTask(Install installer, String name)
+ {
+ this.installer = installer;
+ this.name = name;
+ this.label = installer.getProperty("ostask." + name + ".label");
+ this.directory = getDefaultDirectory(installer);
+
+ // on by default
+ enabled = true;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getLabel()
+ {
+ return label;
+ }
+
+ public String getDefaultDirectory(Install installer)
+ {
+ return null;
+ }
+
+ public String getDirectory()
+ {
+ return directory;
+ }
+
+ public boolean isEnabled()
+ {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled)
+ {
+ this.enabled = enabled;
+ }
+
+ public void setDirectory(String directory)
+ {
+ this.directory = directory;
+ }
+
+ public abstract void perform(String installDir,
+ Vector filesets) throws IOException;
+ }
+
+ public OSTask[] getOSTasks(Install installer)
+ {
+ return new OSTask[0];
+ }
+
+ public void mkdirs(String directory) throws IOException
+ {
+ File file = new File(directory);
+ if(!file.exists())
+ file.mkdirs();
+ }
+
+ public static OperatingSystem getOperatingSystem()
+ {
+ if(os != null)
+ return os;
+
+ if(System.getProperty("mrj.version") != null)
+ {
+ os = new MacOS();
+ }
+ else
+ {
+ String osName = System.getProperty("os.name");
+ if(osName.indexOf("Windows") != -1)
+ os = new Windows();
+ else if(osName.indexOf("OS/2") != -1)
+ os = new HalfAnOS();
+ else if(osName.indexOf("VMS") != -1)
+ os = new VMS();
+ else
+ os = new Unix();
+ }
+
+ return os;
+ }
+
+ public static class Unix extends OperatingSystem
+ {
+ public String getInstallDirectory(String name, String version)
+ {
+ String dir = "/usr/local/share/";
+ if(!new File(dir).canWrite())
+ {
+ dir = System.getProperty("user.home");
+ }
+
+ return new File(dir,name.toLowerCase() + "/" + version).getPath();
+ }
+
+ public String getExtraClassPath()
+ {
+ return "";
+ }
+
+ public class ScriptOSTask extends OSTask
+ {
+ public ScriptOSTask(Install installer)
+ {
+ super(installer,"unix-script");
+ }
+
+ public String getDefaultDirectory(Install installer)
+ {
+ String dir = "/usr/local/";
+ if(!new File(dir).canWrite())
+ {
+ dir = System.getProperty("user.home");
+ }
+
+ return new File(dir,"bin").getPath();
+ }
+
+ public void perform(String installDir,
+ Vector filesets) throws IOException
+ {
+ if(!enabled)
+ {
+ return;
+ }
+
+ mkdirs(directory);
+
+ String name = installer.getProperty("app.name");
+
+ // create app start script
+ String script = directory + File.separatorChar
+ + name.toLowerCase();
+
+ // Delete existing copy
+ new File(script).delete();
+
+ // Write simple script
+ FileWriter out = new FileWriter(script);
+ out.write("#!/bin/sh\n");
+ out.write("#\n");
+ out.write("# Runs jEdit - Programmer's Text Editor.\n");
+ out.write("#\n");
+ out.write("\n");
+ out.write("# Set jvm heap initial and maximum sizes (in megabytes).\n");
+ out.write("JAVA_HEAP_MAX_SIZE=192\n");
+ out.write("\n");
+ out.write("DEFAULT_JAVA_HOME=\""
+ + System.getProperty("java.home")
+ + "\"\n");
+ out.write("if [ -z \"$JAVA_HOME\" ]; then\n");
+ out.write("\tJAVA_HOME=\"$DEFAULT_JAVA_HOME\"\n");
+ out.write("fi\n");
+ out.write("\n");
+ out.write("# Launch application.\n");
+ out.write("\n");
+
+ String jar = "\""+ installDir + File.separator
+ + name.toLowerCase() + ".jar"+"\"";
+
+
+ out.write("exec \"$JAVA_HOME/bin/java\"" +
+ " -Xmx${JAVA_HEAP_MAX_SIZE}M -jar " +
+ jar + " \"$@\"\n");
+ out.close();
+
+ // Make it executable
+ String[] chmodArgs = { "chmod", "755", script };
+ exec(chmodArgs);
+ }
+ }
+
+ public class ManPageOSTask extends OSTask
+ {
+ public ManPageOSTask(Install installer)
+ {
+ super(installer,"unix-man");
+ }
+
+ public String getDefaultDirectory(Install installer)
+ {
+ String dir = "/usr/local/";
+ if(!new File(dir).canWrite())
+ dir = System.getProperty("user.home");
+
+ return new File(dir,"man/man1").getPath();
+ }
+
+ public void perform(String installDir,
+ Vector filesets) throws IOException
+ {
+ if(!enabled)
+ return;
+
+ mkdirs(directory);
+
+ String name = installer.getProperty("app.name");
+
+ // install man page
+ String manpage = installer.getProperty("ostask.unix-man.manpage");
+
+ InputStream in = getClass().getResourceAsStream("/" + manpage);
+ installer.copy(in,new File(directory,manpage).getPath(),
+ null);
+ }
+ }
+
+ public OSTask[] getOSTasks(Install installer)
+ {
+ return new OSTask[] { new ScriptOSTask(installer),
+ new ManPageOSTask(installer) };
+ }
+
+ public void mkdirs(String directory) throws IOException
+ {
+ File file = new File(directory);
+ if(!file.exists())
+ {
+ String[] mkdirArgs = { "mkdir", "-m", "755",
+ "-p", directory };
+ exec(mkdirArgs);
+ }
+ }
+
+ public void exec(String[] args) throws IOException
+ {
+ Process proc = Runtime.getRuntime().exec(args);
+ proc.getInputStream().close();
+ proc.getOutputStream().close();
+ proc.getErrorStream().close();
+ try
+ {
+ proc.waitFor();
+ }
+ catch(InterruptedException ie)
+ {
+ }
+ }
+ }
+
+ public static class MacOS extends Unix
+ {
+ public String getInstallDirectory(String name, String version)
+ {
+ return "/Applications/" + name + " " + version;
+ }
+
+ public String getExtraClassPath()
+ {
+ return "/System/Library/Java/:";
+ }
+ }
+
+ public static class Windows extends OperatingSystem
+ {
+ public String getInstallDirectory(String name, String version)
+ {
+ String programDir = System.getenv("ProgramFiles");
+ // Here is a workaround for the case that the environment
+ // variable is not defined. Windows 98 and ME are known as
+ // such environments. This makes sense while jEdit supports
+ // JRE 5. JRE 6 doesn't support Windows 98 and ME.
+ if(programDir == null)
+ {
+ // This is a hint for what is needed here.
+ programDir = "%ProgramFiles%";
+ }
+ return programDir + "\\" + name + " " + version;
+ }
+
+ public class JEditLauncherOSTask extends OSTask
+ {
+ public JEditLauncherOSTask(Install installer)
+ {
+ super(installer,"jedit-launcher");
+ }
+
+ public String getDefaultDirectory(Install installer)
+ {
+ return null;
+ }
+
+ public void perform(String installDir,
+ Vector filesets)
+ {
+ if(!enabled
+ || !filesets.contains("jedit-windows"))
+ return;
+
+ // run jEditLauncher installation
+ File executable = new File(installDir,"jedit.exe");
+ if(!executable.exists())
+ return;
+
+ String[] args = { executable.getPath(), "/i",
+ System.getProperty("java.home")
+ + File.separator
+ + "bin" };
+
+ try
+ {
+ Runtime.getRuntime().exec(args).waitFor();
+ }
+ catch(IOException io)
+ {
+ }
+ catch(InterruptedException ie)
+ {
+ }
+ }
+ }
+
+ public OSTask[] getOSTasks(Install installer)
+ {
+ return new OSTask[] { /* new JEditLauncherOSTask(installer) */ };
+ }
+ }
+
+ public static class HalfAnOS extends OperatingSystem
+ {
+ public String getInstallDirectory(String name, String version)
+ {
+ return "C:\\" + name + " " + version;
+ }
+ }
+
+ public static class VMS extends OperatingSystem
+ {
+ public String getInstallDirectory(String name, String version)
+ {
+ return "./" + name.toLowerCase() + "/" + version;
+ }
+ }
+
+ // private members
+ private static OperatingSystem os;
+}
diff --git a/jEdit/installer/Progress.java b/jEdit/installer/Progress.java
index 309dedd..f551281 100644
--- a/jEdit/installer/Progress.java
+++ b/jEdit/installer/Progress.java
@@ -1,30 +1,30 @@
-/*
- * Progress.java
- *
- * Originally written by Slava Pestov for the jEdit installer project. This work
- * has been placed into the public domain. You may use this work in any way and
- * for any purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package installer;
-
-/*
- * An interface for reporting installation progress. ConsoleProgress and
- * SwingProcess are the two existing implementations.
- */
-public interface Progress
-{
- public void setMaximum(int max);
-
- public void advance(int value);
-
- public void done();
-
- public void message(String message);
- public void error(String message);
-}
+/*
+ * Progress.java
+ *
+ * Originally written by Slava Pestov for the jEdit installer project. This work
+ * has been placed into the public domain. You may use this work in any way and
+ * for any purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package installer;
+
+/*
+ * An interface for reporting installation progress. ConsoleProgress and
+ * SwingProcess are the two existing implementations.
+ */
+public interface Progress
+{
+ public void setMaximum(int max);
+
+ public void advance(int value);
+
+ public void done();
+
+ public void message(String message);
+ public void error(String message);
+}
diff --git a/jEdit/installer/ServerKiller.java b/jEdit/installer/ServerKiller.java
index a53194d..7768908 100644
--- a/jEdit/installer/ServerKiller.java
+++ b/jEdit/installer/ServerKiller.java
@@ -1,133 +1,133 @@
-/*
- * ServerKiller.java - Utility class for the installer
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2009 Eric Le Lay
- *
- * this code is freely adapted from org/gjt/sp/jedit/jEdit.java
- * Copyright (C) 1998, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package installer;
-
-import java.io.*;
-import java.net.*;
-
-/**
- * Utility class to check for a running jEdit server,
- * and stop it.
- * Useful on windows platform, where the jedit.jar archive
- * is locked and can't be overwritten by the installer.
- *
- * NB: The server file must be in the standard location (i.e. $HOME/.jedit/server)
- * for the server to be found.
- * @version $Id$
- */
-public class ServerKiller
-{
-
- /**
- * try to contact a running instance of jEdit Server
- * and ask it to close.
- * @return true either if no server was detected, or the server was shut-down,
- * false otherwise
- */
- public static boolean quitjEditServer()
- {
-
- /* {{{ default server file location */
- String settingsDirectory = System.getProperty("user.home");
- File portFile;
- File f = new File(settingsDirectory);
- portFile = new File(f,".jedit/server");
- /* }}} */
-
- if(portFile.exists())
- {
- try
- {
- BufferedReader in = new BufferedReader(new FileReader(portFile));
- String check = in.readLine();
- if(!check.equals("b"))
- {
- System.out.println("Wrong port file format");
- return false;
- }
-
- int port = Integer.parseInt(in.readLine());
- int key = Integer.parseInt(in.readLine());
-
- Socket socket = new Socket(InetAddress.getByName("127.0.0.1"),port);
- DataOutputStream out = new DataOutputStream(
- socket.getOutputStream());
- out.writeInt(key);
-
- // we can't close the socket cleanly, because we want
- // to wait for complete exit, and then it's too late.
- // so the socket is closed when the JVM is shut down.
- String script;
- script = "jEdit.exit(null,true);\n";
-
- out.writeUTF(script);
-
- // block until its closed
- try
- {
- socket.getInputStream().read();
- }
- catch(Exception e)
- {
- //should get an exception !
- }
-
- in.close();
- out.close();
- }
- catch(FileNotFoundException fnfe)
- {
- //it exists : we checked that earlier !
- }
- catch(UnknownHostException uhe)
- {
- //localhost doesn't exist ?
- }
- catch(IOException ioe)
- {
- System.out.println("Exception while trying to connect to existing server:");
- System.out.println(ioe);
- System.out.println("Don't worry too much !");
- return false; //warn the user
- }
- }
- return true;
- }
-
- /**
- * try to connect to any running server instance and close it.
- * exit with an error code on failure, but not if no server was found.
- */
- public static void main(String[] args)
- {
- boolean success = quitjEditServer();
- if(!success)
- {
- System.exit(-1);
- }
- }
-}
-
-
+/*
+ * ServerKiller.java - Utility class for the installer
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2009 Eric Le Lay
+ *
+ * this code is freely adapted from org/gjt/sp/jedit/jEdit.java
+ * Copyright (C) 1998, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package installer;
+
+import java.io.*;
+import java.net.*;
+
+/**
+ * Utility class to check for a running jEdit server,
+ * and stop it.
+ * Useful on windows platform, where the jedit.jar archive
+ * is locked and can't be overwritten by the installer.
+ *
+ * NB: The server file must be in the standard location (i.e. $HOME/.jedit/server)
+ * for the server to be found.
+ * @version $Id$
+ */
+public class ServerKiller
+{
+
+ /**
+ * try to contact a running instance of jEdit Server
+ * and ask it to close.
+ * @return true either if no server was detected, or the server was shut-down,
+ * false otherwise
+ */
+ public static boolean quitjEditServer()
+ {
+
+ /* {{{ default server file location */
+ String settingsDirectory = System.getProperty("user.home");
+ File portFile;
+ File f = new File(settingsDirectory);
+ portFile = new File(f,".jedit/server");
+ /* }}} */
+
+ if(portFile.exists())
+ {
+ try
+ {
+ BufferedReader in = new BufferedReader(new FileReader(portFile));
+ String check = in.readLine();
+ if(!check.equals("b"))
+ {
+ System.out.println("Wrong port file format");
+ return false;
+ }
+
+ int port = Integer.parseInt(in.readLine());
+ int key = Integer.parseInt(in.readLine());
+
+ Socket socket = new Socket(InetAddress.getByName("127.0.0.1"),port);
+ DataOutputStream out = new DataOutputStream(
+ socket.getOutputStream());
+ out.writeInt(key);
+
+ // we can't close the socket cleanly, because we want
+ // to wait for complete exit, and then it's too late.
+ // so the socket is closed when the JVM is shut down.
+ String script;
+ script = "jEdit.exit(null,true);\n";
+
+ out.writeUTF(script);
+
+ // block until its closed
+ try
+ {
+ socket.getInputStream().read();
+ }
+ catch(Exception e)
+ {
+ //should get an exception !
+ }
+
+ in.close();
+ out.close();
+ }
+ catch(FileNotFoundException fnfe)
+ {
+ //it exists : we checked that earlier !
+ }
+ catch(UnknownHostException uhe)
+ {
+ //localhost doesn't exist ?
+ }
+ catch(IOException ioe)
+ {
+ System.out.println("Exception while trying to connect to existing server:");
+ System.out.println(ioe);
+ System.out.println("Don't worry too much !");
+ return false; //warn the user
+ }
+ }
+ return true;
+ }
+
+ /**
+ * try to connect to any running server instance and close it.
+ * exit with an error code on failure, but not if no server was found.
+ */
+ public static void main(String[] args)
+ {
+ boolean success = quitjEditServer();
+ if(!success)
+ {
+ System.exit(-1);
+ }
+ }
+}
+
+
diff --git a/jEdit/installer/SwingInstall.java b/jEdit/installer/SwingInstall.java
index a24747b..fdf88e9 100644
--- a/jEdit/installer/SwingInstall.java
+++ b/jEdit/installer/SwingInstall.java
@@ -1,784 +1,784 @@
-/*
- * SwingInstall.java
- *
- * Originally written by Slava Pestov for the jEdit installer project. This work
- * has been placed into the public domain. You may use this work in any way and
- * for any purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package installer;
-
-import javax.swing.border.*;
-import javax.swing.*;
-import javax.swing.text.JTextComponent;
-import java.awt.event.*;
-import java.awt.*;
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-/*
- * Graphical front-end to installer.
- */
-public class SwingInstall extends JFrame
-{
- public SwingInstall()
- {
- installer = new Install();
- osTasks = OperatingSystem.getOperatingSystem().getOSTasks(installer);
-
- appName = installer.getProperty("app.name");
- appVersion = installer.getProperty("app.version");
-
- setTitle(appName + " " + appVersion + " installer");
-
- JPanel content = new JPanel(new WizardLayout());
- setContentPane(content);
-
- caption = new JLabel();
- caption.setFont(new Font("SansSerif",Font.BOLD,18));
-
- ActionHandler actionHandler = new ActionHandler();
-
- cancelButton = new JButton("Cancel");
- cancelButton.setRequestFocusEnabled(false);
- cancelButton.addActionListener(actionHandler);
- prevButton = new JButton("Previous");
- prevButton.setRequestFocusEnabled(false);
- prevButton.addActionListener(actionHandler);
- nextButton = new JButton();
- nextButton.setRequestFocusEnabled(false);
- nextButton.addActionListener(actionHandler);
-
- content.add(caption);
- content.add(cancelButton);
- content.add(prevButton);
- content.add(nextButton);
-
- String clazz = OperatingSystem.getOperatingSystem()
- .getClass().getName();
- String completedInfo = "done-" + clazz.substring(
- clazz.indexOf('$') + 1) + ".html";
-
- pages = new Component[] {
- new TextPanel(installer.getProperty("app.readme")),
- new TextPanel(installer.getProperty("app.license")),
- chooseDirectory = new ChooseDirectory(),
- selectComponents = new SelectComponents(),
- progress = new SwingProgress(),
- new TextPanel(completedInfo)
- };
-
- for(int i = 0; i < pages.length; i++)
- content.add(pages[i]);
-
- pageChanged();
-
- setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
- addWindowListener(new WindowHandler());
-
- Dimension screen = getToolkit().getScreenSize();
- pack();
- setLocation((screen.width - getSize().width) / 2,
- (screen.height - getSize().height) / 2);
- setVisible(true);
- }
-
- // package-private members
- // package-private, not private, for speedy access by inner classes
- Install installer;
- OperatingSystem.OSTask[] osTasks;
- String appName;
- String appVersion;
-
- JLabel caption;
-
- ChooseDirectory chooseDirectory;
- SelectComponents selectComponents;
- SwingProgress progress;
-
- JButton cancelButton;
- JButton prevButton;
- JButton nextButton;
- Component[] pages;
- int currentPage;
-
- private static final int PADDING = 12;
-
- void install()
- {
- Vector components = new Vector();
- int size = 0;
-
- JPanel comp = selectComponents.comp;
- Vector ids = selectComponents.filesets;
-
- for(int i = 0; i < comp.getComponentCount(); i++)
- {
- if(((JCheckBox)comp.getComponent(i))
- .getModel().isSelected())
- {
- size += installer.getIntegerProperty(
- "comp." + ids.elementAt(i) + ".real-size");
- components.addElement(installer.getProperty(
- "comp." + ids.elementAt(i) + ".fileset"));
- }
- }
-
- String installDir = chooseDirectory.installDir.getText();
-
- Map osTaskDirs = chooseDirectory.osTaskDirs;
- Iterator keys = osTaskDirs.keySet().iterator();
- while(keys.hasNext())
- {
- OperatingSystem.OSTask osTask = (OperatingSystem.OSTask)keys.next();
- String dir = ((JTextField)osTaskDirs.get(osTask)).getText();
- if(dir != null && dir.trim().length() != 0)
- {
- osTask.setEnabled(true);
- osTask.setDirectory(dir);
- }
- else
- osTask.setEnabled(false);
- }
-
- InstallThread thread = new InstallThread(
- installer,progress,
- installDir,osTasks,
- size,components);
- progress.setThread(thread);
- thread.start();
- }
-
- private void pageChanged()
- {
- switch(currentPage)
- {
- case 0:
- caption.setText("Installing " + appName);
-
- nextButton.setText("Next");
- prevButton.setEnabled(false);
- nextButton.setEnabled(true);
- break;
- case 1:
- caption.setText(installer.getProperty("app.license.title"));
-
- nextButton.setText("Next");
- prevButton.setEnabled(true);
- nextButton.setEnabled(true);
- break;
- case 2:
- caption.setText("Specify where " + appName
- + " is to be installed");
-
- nextButton.setText("Next");
- prevButton.setEnabled(true);
- if(!chooseDirectory.isOK())nextButton.setEnabled(false);
- break;
- case 3:
- caption.setText("Choose components to install");
-
- nextButton.setText("Install");
- prevButton.setEnabled(true);
- nextButton.setEnabled(true);
- break;
- case 4:
- caption.setText("Installing " + appName);
-
- nextButton.setText("Finish");
- prevButton.setEnabled(false);
- nextButton.setEnabled(false);
- install();
- break;
- case 5:
- caption.setText("Installation complete");
-
- nextButton.setText("Finish");
- prevButton.setEnabled(false);
- nextButton.setEnabled(true);
- cancelButton.setEnabled(false);
- break;
- }
-
- getRootPane().invalidate();
- getRootPane().validate();
- }
-
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == cancelButton)
- System.exit(0);
- else if(source == prevButton)
- {
- currentPage--;
- pageChanged();
- }
- else if(source == nextButton)
- {
- if(currentPage == pages.length - 1)
- System.exit(0);
- else
- {
- currentPage++;
- pageChanged();
- }
- }
- }
- }
-
- class WindowHandler extends WindowAdapter
- {
- public void windowClosing(WindowEvent evt)
- {
- System.exit(0);
- }
- }
-
- class WizardLayout implements LayoutManager
- {
- public void addLayoutComponent(String name, Component comp)
- {
- }
-
- public void removeLayoutComponent(Component comp)
- {
- }
-
- public Dimension preferredLayoutSize(Container parent)
- {
- Dimension dim = new Dimension();
-
- Dimension captionSize = caption.getPreferredSize();
- dim.width = captionSize.width;
-
- for(int i = 0; i < pages.length; i++)
- {
- Dimension _dim = pages[i].getPreferredSize();
- dim.width = Math.max(_dim.width,dim.width);
- dim.height = Math.max(_dim.height,dim.height);
- }
-
- dim.width += PADDING * 2;
- dim.height += PADDING * 2;
- dim.height += nextButton.getPreferredSize().height;
- dim.height += captionSize.height;
- return dim;
- }
-
- public Dimension minimumLayoutSize(Container parent)
- {
- return preferredLayoutSize(parent);
- }
-
- public void layoutContainer(Container parent)
- {
- Dimension size = parent.getSize();
-
- Dimension captionSize = caption.getPreferredSize();
- caption.setBounds(PADDING,PADDING,captionSize.width,
- captionSize.height);
-
- // make all buttons the same size
- Dimension buttonSize = cancelButton.getPreferredSize();
- buttonSize.width = Math.max(buttonSize.width,prevButton.getPreferredSize().width);
- buttonSize.width = Math.max(buttonSize.width,nextButton.getPreferredSize().width);
-
- // cancel button goes on far left
- cancelButton.setBounds(
- PADDING,
- size.height - buttonSize.height - PADDING,
- buttonSize.width,
- buttonSize.height);
-
- // prev and next buttons are on the right
- prevButton.setBounds(
- size.width - buttonSize.width * 2 - 6 - PADDING,
- size.height - buttonSize.height - PADDING,
- buttonSize.width,
- buttonSize.height);
-
- nextButton.setBounds(
- size.width - buttonSize.width - PADDING,
- size.height - buttonSize.height - PADDING,
- buttonSize.width,
- buttonSize.height);
-
- // calculate size for current page
- Rectangle currentPageBounds = new Rectangle();
- currentPageBounds.x = PADDING;
- currentPageBounds.y = PADDING * 2 + captionSize.height;
- currentPageBounds.width = size.width - currentPageBounds.x
- - PADDING;
- currentPageBounds.height = size.height - buttonSize.height
- - currentPageBounds.y - PADDING * 2;
-
- for(int i = 0; i < pages.length; i++)
- {
- Component page = pages[i];
- page.setBounds(currentPageBounds);
- page.setVisible(i == currentPage);
- }
- }
- }
-
- class TextPanel extends JPanel
- {
- TextPanel(String file)
- {
- super(new BorderLayout());
-
- JEditorPane text = new JEditorPane();
-
- try
- {
- text.setPage(TextPanel.this.getClass().getResource(file));
- }
- catch(Exception e)
- {
- text.setText("Error loading '" + file + "'");
- e.printStackTrace();
- }
-
- text.setEditable(false);
-
- JScrollPane scrollPane = new JScrollPane(text);
- Dimension dim = new Dimension();
- dim.width = 450;
- dim.height = 200;
- scrollPane.setPreferredSize(dim);
- TextPanel.this.add(BorderLayout.CENTER,scrollPane);
- }
- }
-
- class DirVerifier extends InputVerifier
- {
- private JTextComponent message;
- private Object pos;
- private JComponent parent;
-
- public DirVerifier(JComponent parent, Object pos)
- {
- super();
- message = new JTextArea(" ");
- message.setEditable(false);
- message.setBackground(parent.getBackground());
- this.parent = parent;
- this.pos = pos;
- }
-
- public boolean shouldYieldFocus(JComponent input)
- {
- return verify(input);
- }
-
- public boolean verify(JComponent input)
- {
- if(input instanceof JTextComponent)
- {
- String dir = ((JTextComponent)input).getText();
- if(checkNull(dir) &&
- checkExistNotDirectory(dir) &&
- checkExistNotEmpty(dir) &&
- checkRelative(dir))
- {
- //everything is perfect, clean label
- if(message.getParent()!=null)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- parent.remove(message);
- parent.revalidate();
- parent.repaint();
- }
- });
- }
- }
- else
- {
- if(message.getParent()==null)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- parent.add(message,pos);
- parent.revalidate();
- parent.repaint();
- }
- });
- }
- else message.repaint();
- }
- }
- return true;
- }
-
- private boolean checkNull(String file)
- {
- if(file.trim().length()==0)
- {
- message.setForeground(Color.red);
- message.setText(installer.getProperty("dir.null"));
- return false;
- }
- else return true;
- }
-
- private boolean checkRelative(String dir)
- {
- File f = new File(dir);
- if(!f.isAbsolute())
- {
- String msg = installer.getProperty("dir.relative");
- try
- {
- String full = f.getCanonicalPath();
- message.setForeground(Color.orange);
- message.setText(msg+'\n'+full);
- }
- catch(IOException ioe)
- {
- message.setForeground(Color.red);
- msg = installer.getProperty("dir.cant-resolve");
- message.setText(msg);
- }
- return false;
- }
- else return true;
- }
-
- private boolean checkExistNotDirectory(String dir)
- {
- File f = new File(dir);
- if(f.exists() && !f.isDirectory())
- {
- message.setForeground(Color.red);
- message.setText(installer.getProperty("dir.not-directory"));
- return false;
- }
- else return true;
- }
-
- private boolean checkExistNotEmpty(String dir)
- {
- File f = new File(dir);
- String[]cnt = f.list();
- if(cnt!=null && cnt.length>0)
- {
- message.setForeground(Color.orange);
- message.setText(installer.getProperty("dir.not-empty"));
- return false;
- }
- else return true;
- }
- }
- /**
- * only install directory is required, as it's necessary to scripts, etc.
- * If one uses the installer only for OS tasks, then one deselects all components
- * and that's all.
- */
- class ChooseDirectory extends JPanel
- {
- JTextField installDir;
- Map osTaskDirs;
-
- ChooseDirectory()
- {
- super(new BorderLayout());
- osTaskDirs = new HashMap();
-
-
- JPanel directoryPanel = new JPanel(new GridBagLayout());
-
- installDir = addField(directoryPanel,"Install program in:",
- OperatingSystem.getOperatingSystem()
- .getInstallDirectory(appName,appVersion));
-
- installDir.addFocusListener(new FocusAdapter()
- {
- public void focusLost(FocusEvent fe)
- {
- nextButton.setEnabled(isOK());
- }
- });
- for(int i = 0; i < osTasks.length; i++)
- {
- OperatingSystem.OSTask osTask = osTasks[i];
- String label = osTask.getLabel();
- if(label != null)
- {
- JTextField field = addField(directoryPanel,label,
- osTask.getDirectory());
- osTaskDirs.put(osTask,field);
- }
- }
- ChooseDirectory.this.add(BorderLayout.NORTH,directoryPanel);
- }
-
- boolean isOK()
- {
- if(installDir.getText().length()==0)return false;
- File f = new File(installDir.getText());
- return !(f.exists()&&!f.isDirectory());
- }
-
- private GridBagConstraints c = new GridBagConstraints();
- private JTextField addField(JPanel directoryPanel, String label,
- String defaultText)
- {
-
- //new line
- c.gridy++;
-
- //message
- JTextField field = new JTextField(defaultText);
- c.insets.bottom=3;
- c.gridx=0;
- c.gridwidth=3;
- c.insets.left=0;
- c.insets.right=0;
- c.anchor=GridBagConstraints.LINE_START;
- DirVerifier verif = new DirVerifier(directoryPanel,c.clone());
-
-
- field.setInputVerifier(verif);
-
- c.insets.bottom=12;
- c.gridx=0;
- c.gridy++;
- c.gridwidth=1;
- c.anchor=GridBagConstraints.LINE_END;
- directoryPanel.add(new JLabel(label,SwingConstants.RIGHT),c);
-
- c.gridx=1;
- c.fill=GridBagConstraints.HORIZONTAL;
- c.anchor=GridBagConstraints.CENTER;
- c.insets.left=12;
- c.insets.right=12;
- c.weightx=1.0;
- directoryPanel.add(field,c);
-
-
- JButton choose = new JButton("Choose...");
- choose.setRequestFocusEnabled(false);
- choose.addActionListener(new ActionHandler(field));
- c.gridx=2;
- c.insets.left=0;
- c.insets.right=0;
- c.fill=GridBagConstraints.NONE;
- c.weightx=0;
- directoryPanel.add(choose,c);
-
- return field;
- }
-
- class ActionHandler implements ActionListener
- {
- JTextField field;
-
- ActionHandler(JTextField field)
- {
- this.field = field;
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- File directory = new File(field.getText());
- JFileChooser chooser = new JFileChooser(directory.getParent());
- chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
- chooser.setSelectedFile(directory);
-
- if(chooser.showOpenDialog(SwingInstall.this)
- == JFileChooser.APPROVE_OPTION)
- {
- field.setText(chooser.getSelectedFile().getPath());
- field.getInputVerifier().verify(field);
- }
- }
- }
- }
-
- class SelectComponents extends JPanel
- implements ActionListener
- {
- JPanel comp;
- JLabel sizeLabel;
- Vector filesets;
-
- SelectComponents()
- {
- super(new BorderLayout());
-
- comp = createCompPanel();
- SelectComponents.this.add(BorderLayout.NORTH,comp);
-
- sizeLabel = new JLabel("",SwingConstants.LEFT);
- SelectComponents.this.add(BorderLayout.SOUTH,sizeLabel);
-
- updateSize();
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- updateSize();
- }
-
- private JPanel createCompPanel()
- {
- filesets = new Vector();
-
- int count = installer.getIntegerProperty("comp.count");
- JPanel panel = new JPanel(new GridLayout(count,1));
-
- String osClass = OperatingSystem.getOperatingSystem()
- .getClass().getName();
- osClass = osClass.substring(osClass.indexOf('$') + 1);
-
- for(int i = 0; i < count; i++)
- {
- String os = installer.getProperty("comp." + i + ".os");
-
- if(os != null && !osClass.equals(os))
- continue;
-
- JCheckBox checkBox = new JCheckBox(
- installer.getProperty("comp." + i + ".name")
- + " (" + installer.getProperty("comp." + i
- + ".disk-size") + "Kb)");
- checkBox.getModel().setSelected(true);
- checkBox.addActionListener(this);
- checkBox.setRequestFocusEnabled(false);
-
- filesets.addElement(new Integer(i));
-
- panel.add(checkBox);
- }
-
- Dimension dim = panel.getPreferredSize();
- dim.width = Integer.MAX_VALUE;
- panel.setMaximumSize(dim);
-
- return panel;
- }
-
- private void updateSize()
- {
- int size = 0;
-
- for(int i = 0; i < filesets.size(); i++)
- {
- if(((JCheckBox)comp.getComponent(i))
- .getModel().isSelected())
- {
- size += installer.getIntegerProperty("comp."
- + filesets.elementAt(i)
- + ".disk-size");
- }
- }
-
- sizeLabel.setText("Estimated disk usage of selected"
- + " components: " + size + "Kb");
- }
- }
-
- class SwingProgress extends JPanel implements Progress
- {
- JProgressBar progress;
- InstallThread thread;
-
- SwingProgress()
- {
- super(new BorderLayout());
-
- progress = new JProgressBar();
- progress.setStringPainted(true);
-
- SwingProgress.this.add(BorderLayout.NORTH,progress);
- }
-
- public void setMaximum(final int max)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- progress.setMaximum(max);
- }
- });
- }
-
- public void advance(final int value)
- {
- try
- {
- SwingUtilities.invokeAndWait(new Runnable()
- {
- public void run()
- {
- progress.setValue(progress
- .getValue() + value);
- }
- });
- Thread.yield();
- }
- catch(Exception e)
- {
- }
- }
-
- public void done()
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- currentPage++;
- pageChanged();
- }
- });
- }
-
- public void error(final String message)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- dispose();
- JOptionPane.showMessageDialog(null,
- message,
- "Installation aborted",
- JOptionPane.ERROR_MESSAGE);
- System.exit(1);
- }
- });
- }
-
- public void message(final String message)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- progress.setString(message);
- }
- });
- }
-
- public void setThread(InstallThread thread)
- {
- this.thread = thread;
- }
- }
-}
+/*
+ * SwingInstall.java
+ *
+ * Originally written by Slava Pestov for the jEdit installer project. This work
+ * has been placed into the public domain. You may use this work in any way and
+ * for any purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package installer;
+
+import javax.swing.border.*;
+import javax.swing.*;
+import javax.swing.text.JTextComponent;
+import java.awt.event.*;
+import java.awt.*;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+
+/*
+ * Graphical front-end to installer.
+ */
+public class SwingInstall extends JFrame
+{
+ public SwingInstall()
+ {
+ installer = new Install();
+ osTasks = OperatingSystem.getOperatingSystem().getOSTasks(installer);
+
+ appName = installer.getProperty("app.name");
+ appVersion = installer.getProperty("app.version");
+
+ setTitle(appName + " " + appVersion + " installer");
+
+ JPanel content = new JPanel(new WizardLayout());
+ setContentPane(content);
+
+ caption = new JLabel();
+ caption.setFont(new Font("SansSerif",Font.BOLD,18));
+
+ ActionHandler actionHandler = new ActionHandler();
+
+ cancelButton = new JButton("Cancel");
+ cancelButton.setRequestFocusEnabled(false);
+ cancelButton.addActionListener(actionHandler);
+ prevButton = new JButton("Previous");
+ prevButton.setRequestFocusEnabled(false);
+ prevButton.addActionListener(actionHandler);
+ nextButton = new JButton();
+ nextButton.setRequestFocusEnabled(false);
+ nextButton.addActionListener(actionHandler);
+
+ content.add(caption);
+ content.add(cancelButton);
+ content.add(prevButton);
+ content.add(nextButton);
+
+ String clazz = OperatingSystem.getOperatingSystem()
+ .getClass().getName();
+ String completedInfo = "done-" + clazz.substring(
+ clazz.indexOf('$') + 1) + ".html";
+
+ pages = new Component[] {
+ new TextPanel(installer.getProperty("app.readme")),
+ new TextPanel(installer.getProperty("app.license")),
+ chooseDirectory = new ChooseDirectory(),
+ selectComponents = new SelectComponents(),
+ progress = new SwingProgress(),
+ new TextPanel(completedInfo)
+ };
+
+ for(int i = 0; i < pages.length; i++)
+ content.add(pages[i]);
+
+ pageChanged();
+
+ setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
+ addWindowListener(new WindowHandler());
+
+ Dimension screen = getToolkit().getScreenSize();
+ pack();
+ setLocation((screen.width - getSize().width) / 2,
+ (screen.height - getSize().height) / 2);
+ setVisible(true);
+ }
+
+ // package-private members
+ // package-private, not private, for speedy access by inner classes
+ Install installer;
+ OperatingSystem.OSTask[] osTasks;
+ String appName;
+ String appVersion;
+
+ JLabel caption;
+
+ ChooseDirectory chooseDirectory;
+ SelectComponents selectComponents;
+ SwingProgress progress;
+
+ JButton cancelButton;
+ JButton prevButton;
+ JButton nextButton;
+ Component[] pages;
+ int currentPage;
+
+ private static final int PADDING = 12;
+
+ void install()
+ {
+ Vector components = new Vector();
+ int size = 0;
+
+ JPanel comp = selectComponents.comp;
+ Vector ids = selectComponents.filesets;
+
+ for(int i = 0; i < comp.getComponentCount(); i++)
+ {
+ if(((JCheckBox)comp.getComponent(i))
+ .getModel().isSelected())
+ {
+ size += installer.getIntegerProperty(
+ "comp." + ids.elementAt(i) + ".real-size");
+ components.addElement(installer.getProperty(
+ "comp." + ids.elementAt(i) + ".fileset"));
+ }
+ }
+
+ String installDir = chooseDirectory.installDir.getText();
+
+ Map osTaskDirs = chooseDirectory.osTaskDirs;
+ Iterator keys = osTaskDirs.keySet().iterator();
+ while(keys.hasNext())
+ {
+ OperatingSystem.OSTask osTask = (OperatingSystem.OSTask)keys.next();
+ String dir = ((JTextField)osTaskDirs.get(osTask)).getText();
+ if(dir != null && dir.trim().length() != 0)
+ {
+ osTask.setEnabled(true);
+ osTask.setDirectory(dir);
+ }
+ else
+ osTask.setEnabled(false);
+ }
+
+ InstallThread thread = new InstallThread(
+ installer,progress,
+ installDir,osTasks,
+ size,components);
+ progress.setThread(thread);
+ thread.start();
+ }
+
+ private void pageChanged()
+ {
+ switch(currentPage)
+ {
+ case 0:
+ caption.setText("Installing " + appName);
+
+ nextButton.setText("Next");
+ prevButton.setEnabled(false);
+ nextButton.setEnabled(true);
+ break;
+ case 1:
+ caption.setText(installer.getProperty("app.license.title"));
+
+ nextButton.setText("Next");
+ prevButton.setEnabled(true);
+ nextButton.setEnabled(true);
+ break;
+ case 2:
+ caption.setText("Specify where " + appName
+ + " is to be installed");
+
+ nextButton.setText("Next");
+ prevButton.setEnabled(true);
+ if(!chooseDirectory.isOK())nextButton.setEnabled(false);
+ break;
+ case 3:
+ caption.setText("Choose components to install");
+
+ nextButton.setText("Install");
+ prevButton.setEnabled(true);
+ nextButton.setEnabled(true);
+ break;
+ case 4:
+ caption.setText("Installing " + appName);
+
+ nextButton.setText("Finish");
+ prevButton.setEnabled(false);
+ nextButton.setEnabled(false);
+ install();
+ break;
+ case 5:
+ caption.setText("Installation complete");
+
+ nextButton.setText("Finish");
+ prevButton.setEnabled(false);
+ nextButton.setEnabled(true);
+ cancelButton.setEnabled(false);
+ break;
+ }
+
+ getRootPane().invalidate();
+ getRootPane().validate();
+ }
+
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == cancelButton)
+ System.exit(0);
+ else if(source == prevButton)
+ {
+ currentPage--;
+ pageChanged();
+ }
+ else if(source == nextButton)
+ {
+ if(currentPage == pages.length - 1)
+ System.exit(0);
+ else
+ {
+ currentPage++;
+ pageChanged();
+ }
+ }
+ }
+ }
+
+ class WindowHandler extends WindowAdapter
+ {
+ public void windowClosing(WindowEvent evt)
+ {
+ System.exit(0);
+ }
+ }
+
+ class WizardLayout implements LayoutManager
+ {
+ public void addLayoutComponent(String name, Component comp)
+ {
+ }
+
+ public void removeLayoutComponent(Component comp)
+ {
+ }
+
+ public Dimension preferredLayoutSize(Container parent)
+ {
+ Dimension dim = new Dimension();
+
+ Dimension captionSize = caption.getPreferredSize();
+ dim.width = captionSize.width;
+
+ for(int i = 0; i < pages.length; i++)
+ {
+ Dimension _dim = pages[i].getPreferredSize();
+ dim.width = Math.max(_dim.width,dim.width);
+ dim.height = Math.max(_dim.height,dim.height);
+ }
+
+ dim.width += PADDING * 2;
+ dim.height += PADDING * 2;
+ dim.height += nextButton.getPreferredSize().height;
+ dim.height += captionSize.height;
+ return dim;
+ }
+
+ public Dimension minimumLayoutSize(Container parent)
+ {
+ return preferredLayoutSize(parent);
+ }
+
+ public void layoutContainer(Container parent)
+ {
+ Dimension size = parent.getSize();
+
+ Dimension captionSize = caption.getPreferredSize();
+ caption.setBounds(PADDING,PADDING,captionSize.width,
+ captionSize.height);
+
+ // make all buttons the same size
+ Dimension buttonSize = cancelButton.getPreferredSize();
+ buttonSize.width = Math.max(buttonSize.width,prevButton.getPreferredSize().width);
+ buttonSize.width = Math.max(buttonSize.width,nextButton.getPreferredSize().width);
+
+ // cancel button goes on far left
+ cancelButton.setBounds(
+ PADDING,
+ size.height - buttonSize.height - PADDING,
+ buttonSize.width,
+ buttonSize.height);
+
+ // prev and next buttons are on the right
+ prevButton.setBounds(
+ size.width - buttonSize.width * 2 - 6 - PADDING,
+ size.height - buttonSize.height - PADDING,
+ buttonSize.width,
+ buttonSize.height);
+
+ nextButton.setBounds(
+ size.width - buttonSize.width - PADDING,
+ size.height - buttonSize.height - PADDING,
+ buttonSize.width,
+ buttonSize.height);
+
+ // calculate size for current page
+ Rectangle currentPageBounds = new Rectangle();
+ currentPageBounds.x = PADDING;
+ currentPageBounds.y = PADDING * 2 + captionSize.height;
+ currentPageBounds.width = size.width - currentPageBounds.x
+ - PADDING;
+ currentPageBounds.height = size.height - buttonSize.height
+ - currentPageBounds.y - PADDING * 2;
+
+ for(int i = 0; i < pages.length; i++)
+ {
+ Component page = pages[i];
+ page.setBounds(currentPageBounds);
+ page.setVisible(i == currentPage);
+ }
+ }
+ }
+
+ class TextPanel extends JPanel
+ {
+ TextPanel(String file)
+ {
+ super(new BorderLayout());
+
+ JEditorPane text = new JEditorPane();
+
+ try
+ {
+ text.setPage(TextPanel.this.getClass().getResource(file));
+ }
+ catch(Exception e)
+ {
+ text.setText("Error loading '" + file + "'");
+ e.printStackTrace();
+ }
+
+ text.setEditable(false);
+
+ JScrollPane scrollPane = new JScrollPane(text);
+ Dimension dim = new Dimension();
+ dim.width = 450;
+ dim.height = 200;
+ scrollPane.setPreferredSize(dim);
+ TextPanel.this.add(BorderLayout.CENTER,scrollPane);
+ }
+ }
+
+ class DirVerifier extends InputVerifier
+ {
+ private JTextComponent message;
+ private Object pos;
+ private JComponent parent;
+
+ public DirVerifier(JComponent parent, Object pos)
+ {
+ super();
+ message = new JTextArea(" ");
+ message.setEditable(false);
+ message.setBackground(parent.getBackground());
+ this.parent = parent;
+ this.pos = pos;
+ }
+
+ public boolean shouldYieldFocus(JComponent input)
+ {
+ return verify(input);
+ }
+
+ public boolean verify(JComponent input)
+ {
+ if(input instanceof JTextComponent)
+ {
+ String dir = ((JTextComponent)input).getText();
+ if(checkNull(dir) &&
+ checkExistNotDirectory(dir) &&
+ checkExistNotEmpty(dir) &&
+ checkRelative(dir))
+ {
+ //everything is perfect, clean label
+ if(message.getParent()!=null)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ parent.remove(message);
+ parent.revalidate();
+ parent.repaint();
+ }
+ });
+ }
+ }
+ else
+ {
+ if(message.getParent()==null)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ parent.add(message,pos);
+ parent.revalidate();
+ parent.repaint();
+ }
+ });
+ }
+ else message.repaint();
+ }
+ }
+ return true;
+ }
+
+ private boolean checkNull(String file)
+ {
+ if(file.trim().length()==0)
+ {
+ message.setForeground(Color.red);
+ message.setText(installer.getProperty("dir.null"));
+ return false;
+ }
+ else return true;
+ }
+
+ private boolean checkRelative(String dir)
+ {
+ File f = new File(dir);
+ if(!f.isAbsolute())
+ {
+ String msg = installer.getProperty("dir.relative");
+ try
+ {
+ String full = f.getCanonicalPath();
+ message.setForeground(Color.orange);
+ message.setText(msg+'\n'+full);
+ }
+ catch(IOException ioe)
+ {
+ message.setForeground(Color.red);
+ msg = installer.getProperty("dir.cant-resolve");
+ message.setText(msg);
+ }
+ return false;
+ }
+ else return true;
+ }
+
+ private boolean checkExistNotDirectory(String dir)
+ {
+ File f = new File(dir);
+ if(f.exists() && !f.isDirectory())
+ {
+ message.setForeground(Color.red);
+ message.setText(installer.getProperty("dir.not-directory"));
+ return false;
+ }
+ else return true;
+ }
+
+ private boolean checkExistNotEmpty(String dir)
+ {
+ File f = new File(dir);
+ String[]cnt = f.list();
+ if(cnt!=null && cnt.length>0)
+ {
+ message.setForeground(Color.orange);
+ message.setText(installer.getProperty("dir.not-empty"));
+ return false;
+ }
+ else return true;
+ }
+ }
+ /**
+ * only install directory is required, as it's necessary to scripts, etc.
+ * If one uses the installer only for OS tasks, then one deselects all components
+ * and that's all.
+ */
+ class ChooseDirectory extends JPanel
+ {
+ JTextField installDir;
+ Map osTaskDirs;
+
+ ChooseDirectory()
+ {
+ super(new BorderLayout());
+ osTaskDirs = new HashMap();
+
+
+ JPanel directoryPanel = new JPanel(new GridBagLayout());
+
+ installDir = addField(directoryPanel,"Install program in:",
+ OperatingSystem.getOperatingSystem()
+ .getInstallDirectory(appName,appVersion));
+
+ installDir.addFocusListener(new FocusAdapter()
+ {
+ public void focusLost(FocusEvent fe)
+ {
+ nextButton.setEnabled(isOK());
+ }
+ });
+ for(int i = 0; i < osTasks.length; i++)
+ {
+ OperatingSystem.OSTask osTask = osTasks[i];
+ String label = osTask.getLabel();
+ if(label != null)
+ {
+ JTextField field = addField(directoryPanel,label,
+ osTask.getDirectory());
+ osTaskDirs.put(osTask,field);
+ }
+ }
+ ChooseDirectory.this.add(BorderLayout.NORTH,directoryPanel);
+ }
+
+ boolean isOK()
+ {
+ if(installDir.getText().length()==0)return false;
+ File f = new File(installDir.getText());
+ return !(f.exists()&&!f.isDirectory());
+ }
+
+ private GridBagConstraints c = new GridBagConstraints();
+ private JTextField addField(JPanel directoryPanel, String label,
+ String defaultText)
+ {
+
+ //new line
+ c.gridy++;
+
+ //message
+ JTextField field = new JTextField(defaultText);
+ c.insets.bottom=3;
+ c.gridx=0;
+ c.gridwidth=3;
+ c.insets.left=0;
+ c.insets.right=0;
+ c.anchor=GridBagConstraints.LINE_START;
+ DirVerifier verif = new DirVerifier(directoryPanel,c.clone());
+
+
+ field.setInputVerifier(verif);
+
+ c.insets.bottom=12;
+ c.gridx=0;
+ c.gridy++;
+ c.gridwidth=1;
+ c.anchor=GridBagConstraints.LINE_END;
+ directoryPanel.add(new JLabel(label,SwingConstants.RIGHT),c);
+
+ c.gridx=1;
+ c.fill=GridBagConstraints.HORIZONTAL;
+ c.anchor=GridBagConstraints.CENTER;
+ c.insets.left=12;
+ c.insets.right=12;
+ c.weightx=1.0;
+ directoryPanel.add(field,c);
+
+
+ JButton choose = new JButton("Choose...");
+ choose.setRequestFocusEnabled(false);
+ choose.addActionListener(new ActionHandler(field));
+ c.gridx=2;
+ c.insets.left=0;
+ c.insets.right=0;
+ c.fill=GridBagConstraints.NONE;
+ c.weightx=0;
+ directoryPanel.add(choose,c);
+
+ return field;
+ }
+
+ class ActionHandler implements ActionListener
+ {
+ JTextField field;
+
+ ActionHandler(JTextField field)
+ {
+ this.field = field;
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ File directory = new File(field.getText());
+ JFileChooser chooser = new JFileChooser(directory.getParent());
+ chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ chooser.setSelectedFile(directory);
+
+ if(chooser.showOpenDialog(SwingInstall.this)
+ == JFileChooser.APPROVE_OPTION)
+ {
+ field.setText(chooser.getSelectedFile().getPath());
+ field.getInputVerifier().verify(field);
+ }
+ }
+ }
+ }
+
+ class SelectComponents extends JPanel
+ implements ActionListener
+ {
+ JPanel comp;
+ JLabel sizeLabel;
+ Vector filesets;
+
+ SelectComponents()
+ {
+ super(new BorderLayout());
+
+ comp = createCompPanel();
+ SelectComponents.this.add(BorderLayout.NORTH,comp);
+
+ sizeLabel = new JLabel("",SwingConstants.LEFT);
+ SelectComponents.this.add(BorderLayout.SOUTH,sizeLabel);
+
+ updateSize();
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ updateSize();
+ }
+
+ private JPanel createCompPanel()
+ {
+ filesets = new Vector();
+
+ int count = installer.getIntegerProperty("comp.count");
+ JPanel panel = new JPanel(new GridLayout(count,1));
+
+ String osClass = OperatingSystem.getOperatingSystem()
+ .getClass().getName();
+ osClass = osClass.substring(osClass.indexOf('$') + 1);
+
+ for(int i = 0; i < count; i++)
+ {
+ String os = installer.getProperty("comp." + i + ".os");
+
+ if(os != null && !osClass.equals(os))
+ continue;
+
+ JCheckBox checkBox = new JCheckBox(
+ installer.getProperty("comp." + i + ".name")
+ + " (" + installer.getProperty("comp." + i
+ + ".disk-size") + "Kb)");
+ checkBox.getModel().setSelected(true);
+ checkBox.addActionListener(this);
+ checkBox.setRequestFocusEnabled(false);
+
+ filesets.addElement(new Integer(i));
+
+ panel.add(checkBox);
+ }
+
+ Dimension dim = panel.getPreferredSize();
+ dim.width = Integer.MAX_VALUE;
+ panel.setMaximumSize(dim);
+
+ return panel;
+ }
+
+ private void updateSize()
+ {
+ int size = 0;
+
+ for(int i = 0; i < filesets.size(); i++)
+ {
+ if(((JCheckBox)comp.getComponent(i))
+ .getModel().isSelected())
+ {
+ size += installer.getIntegerProperty("comp."
+ + filesets.elementAt(i)
+ + ".disk-size");
+ }
+ }
+
+ sizeLabel.setText("Estimated disk usage of selected"
+ + " components: " + size + "Kb");
+ }
+ }
+
+ class SwingProgress extends JPanel implements Progress
+ {
+ JProgressBar progress;
+ InstallThread thread;
+
+ SwingProgress()
+ {
+ super(new BorderLayout());
+
+ progress = new JProgressBar();
+ progress.setStringPainted(true);
+
+ SwingProgress.this.add(BorderLayout.NORTH,progress);
+ }
+
+ public void setMaximum(final int max)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ progress.setMaximum(max);
+ }
+ });
+ }
+
+ public void advance(final int value)
+ {
+ try
+ {
+ SwingUtilities.invokeAndWait(new Runnable()
+ {
+ public void run()
+ {
+ progress.setValue(progress
+ .getValue() + value);
+ }
+ });
+ Thread.yield();
+ }
+ catch(Exception e)
+ {
+ }
+ }
+
+ public void done()
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ currentPage++;
+ pageChanged();
+ }
+ });
+ }
+
+ public void error(final String message)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ dispose();
+ JOptionPane.showMessageDialog(null,
+ message,
+ "Installation aborted",
+ JOptionPane.ERROR_MESSAGE);
+ System.exit(1);
+ }
+ });
+ }
+
+ public void message(final String message)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ progress.setString(message);
+ }
+ });
+ }
+
+ public void setThread(InstallThread thread)
+ {
+ this.thread = thread;
+ }
+ }
+}
diff --git a/jEdit/installer/TarBuffer.java b/jEdit/installer/TarBuffer.java
index af96fc0..156802a 100644
--- a/jEdit/installer/TarBuffer.java
+++ b/jEdit/installer/TarBuffer.java
@@ -1,484 +1,484 @@
-/*
-** Authored by Timothy Gerard Endres
-** <mailto:time at gjt.org> <http://www.trustice.com>
-**
-** This work has been placed into the public domain.
-** You may use this work in any way and for any purpose you wish.
-**
-** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
-** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
-** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
-** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
-** REDISTRIBUTION OF THIS SOFTWARE.
-**
-*/
-
-package installer;
-
-import java.io.*;
-
-
-/**
- * The TarBuffer class implements the tar archive concept
- * of a buffered input stream. This concept goes back to the
- * days of blocked tape drives and special io devices. In the
- * Java universe, the only real function that this class
- * performs is to ensure that files have the correct "block"
- * size, or other tars will complain.
- * <p>
- * You should never have a need to access this class directly.
- * TarBuffers are created by Tar IO Streams.
- *
- * @version $Revision: 12504 $
- * @author Timothy Gerard Endres,
- * <a href="mailto:time at gjt.org">time at trustice.com</a>.
- * @see TarArchive
- */
-
-public class
-TarBuffer extends Object
- {
- public static final int DEFAULT_RCDSIZE = ( 512 );
- public static final int DEFAULT_BLKSIZE = ( DEFAULT_RCDSIZE * 20 );
-
- private InputStream inStream;
- private OutputStream outStream;
-
- private byte[] blockBuffer;
- private int currBlkIdx;
- private int currRecIdx;
- private int blockSize;
- private int recordSize;
- private int recsPerBlock;
-
- private boolean debug;
-
-
- public
- TarBuffer( InputStream inStream )
- {
- this( inStream, TarBuffer.DEFAULT_BLKSIZE );
- }
-
- public
- TarBuffer( InputStream inStream, int blockSize )
- {
- this( inStream, blockSize, TarBuffer.DEFAULT_RCDSIZE );
- }
-
- public
- TarBuffer( InputStream inStream, int blockSize, int recordSize )
- {
- this.inStream = inStream;
- this.outStream = null;
- this.initialize( blockSize, recordSize );
- }
-
- public
- TarBuffer( OutputStream outStream )
- {
- this( outStream, TarBuffer.DEFAULT_BLKSIZE );
- }
-
- public
- TarBuffer( OutputStream outStream, int blockSize )
- {
- this( outStream, blockSize, TarBuffer.DEFAULT_RCDSIZE );
- }
-
- public
- TarBuffer( OutputStream outStream, int blockSize, int recordSize )
- {
- this.inStream = null;
- this.outStream = outStream;
- this.initialize( blockSize, recordSize );
- }
-
- /**
- * Initialization common to all constructors.
- */
- private void
- initialize( int blockSize, int recordSize )
- {
- this.debug = false;
- this.blockSize = blockSize;
- this.recordSize = recordSize;
- this.recsPerBlock = ( this.blockSize / this.recordSize );
- this.blockBuffer = new byte[ this.blockSize ];
-
- if ( this.inStream != null )
- {
- this.currBlkIdx = -1;
- this.currRecIdx = this.recsPerBlock;
- }
- else
- {
- this.currBlkIdx = 0;
- this.currRecIdx = 0;
- }
- }
-
- /**
- * Get the TAR Buffer's block size. Blocks consist of multiple records.
- */
- public int
- getBlockSize()
- {
- return this.blockSize;
- }
-
- /**
- * Get the TAR Buffer's record size.
- */
- public int
- getRecordSize()
- {
- return this.recordSize;
- }
-
- /**
- * Set the debugging flag for the buffer.
- *
- * @param debug If true, print debugging output.
- */
- public void
- setDebug( boolean debug )
- {
- this.debug = debug;
- }
-
- /**
- * Determine if an archive record indicate End of Archive. End of
- * archive is indicated by a record that consists entirely of null bytes.
- *
- * @param record The record data to check.
- */
- public boolean
- isEOFRecord( byte[] record )
- {
- for ( int i = 0, sz = this.getRecordSize() ; i < sz ; ++i )
- if ( record[i] != 0 )
- return false;
-
- return true;
- }
-
- /**
- * Skip over a record on the input stream.
- */
-
- public void
- skipRecord()
- throws IOException
- {
- if ( this.debug )
- {
- System.err.println
- ( "SkipRecord: recIdx = " + this.currRecIdx
- + " blkIdx = " + this.currBlkIdx );
- }
-
- if ( this.inStream == null )
- throw new IOException
- ( "reading (via skip) from an output buffer" );
-
- if ( this.currRecIdx >= this.recsPerBlock )
- {
- if ( ! this.readBlock() )
- return; // UNDONE
- }
-
- this.currRecIdx++;
- }
-
- /**
- * Read a record from the input stream and return the data.
- *
- * @return The record data.
- */
-
- public byte[]
- readRecord()
- throws IOException
- {
- if ( this.debug )
- {
- System.err.println
- ( "ReadRecord: recIdx = " + this.currRecIdx
- + " blkIdx = " + this.currBlkIdx );
- }
-
- if ( this.inStream == null )
- throw new IOException
- ( "reading from an output buffer" );
-
- if ( this.currRecIdx >= this.recsPerBlock )
- {
- if ( ! this.readBlock() )
- return null;
- }
-
- byte[] result = new byte[ this.recordSize ];
-
- System.arraycopy(
- this.blockBuffer, (this.currRecIdx * this.recordSize),
- result, 0, this.recordSize );
-
- this.currRecIdx++;
-
- return result;
- }
-
- /**
- * @return false if End-Of-File, else true
- */
-
- private boolean
- readBlock()
- throws IOException
- {
- if ( this.debug )
- {
- System.err.println
- ( "ReadBlock: blkIdx = " + this.currBlkIdx );
- }
-
- if ( this.inStream == null )
- throw new IOException
- ( "reading from an output buffer" );
-
- this.currRecIdx = 0;
-
- int offset = 0;
- int bytesNeeded = this.blockSize;
- for ( ; bytesNeeded > 0 ; )
- {
- long numBytes =
- this.inStream.read
- ( this.blockBuffer, offset, bytesNeeded );
-
- //
- // NOTE
- // We have fit EOF, and the block is not full!
- //
- // This is a broken archive. It does not follow the standard
- // blocking algorithm. However, because we are generous, and
- // it requires little effort, we will simply ignore the error
- // and continue as if the entire block were read. This does
- // not appear to break anything upstream. We used to return
- // false in this case.
- //
- // Thanks to 'Yohann.Roussel at alcatel.fr' for this fix.
- //
-
- if ( numBytes == -1 )
- break;
-
- offset += numBytes;
- bytesNeeded -= numBytes;
- if ( numBytes != this.blockSize )
- {
- if ( this.debug )
- {
- System.err.println
- ( "ReadBlock: INCOMPLETE READ " + numBytes
- + " of " + this.blockSize + " bytes read." );
- }
- }
- }
-
- this.currBlkIdx++;
-
- return true;
- }
-
- /**
- * Get the current block number, zero based.
- *
- * @return The current zero based block number.
- */
- public int
- getCurrentBlockNum()
- {
- return this.currBlkIdx;
- }
-
- /**
- * Get the current record number, within the current block, zero based.
- * Thus, current offset = (currentBlockNum * recsPerBlk) + currentRecNum.
- *
- * @return The current zero based record number.
- */
- public int
- getCurrentRecordNum()
- {
- return this.currRecIdx - 1;
- }
-
- /**
- * Write an archive record to the archive.
- *
- * @param record The record data to write to the archive.
- */
-
- public void
- writeRecord( byte[] record )
- throws IOException
- {
- if ( this.debug )
- {
- System.err.println
- ( "WriteRecord: recIdx = " + this.currRecIdx
- + " blkIdx = " + this.currBlkIdx );
- }
-
- if ( this.outStream == null )
- throw new IOException
- ( "writing to an input buffer" );
-
- if ( record.length != this.recordSize )
- throw new IOException
- ( "record to write has length '" + record.length
- + "' which is not the record size of '"
- + this.recordSize + "'" );
-
- if ( this.currRecIdx >= this.recsPerBlock )
- {
- this.writeBlock();
- }
-
- System.arraycopy(
- record, 0,
- this.blockBuffer, (this.currRecIdx * this.recordSize),
- this.recordSize );
-
- this.currRecIdx++;
- }
-
- /**
- * Write an archive record to the archive, where the record may be
- * inside of a larger array buffer. The buffer must be "offset plus
- * record size" long.
- *
- * @param buf The buffer containing the record data to write.
- * @param offset The offset of the record data within buf.
- */
-
- public void
- writeRecord( byte[] buf, int offset )
- throws IOException
- {
- if ( this.debug )
- {
- System.err.println
- ( "WriteRecord: recIdx = " + this.currRecIdx
- + " blkIdx = " + this.currBlkIdx );
- }
-
- if ( this.outStream == null )
- throw new IOException
- ( "writing to an input buffer" );
-
- if ( (offset + this.recordSize) > buf.length )
- throw new IOException
- ( "record has length '" + buf.length
- + "' with offset '" + offset
- + "' which is less than the record size of '"
- + this.recordSize + "'" );
-
- if ( this.currRecIdx >= this.recsPerBlock )
- {
- this.writeBlock();
- }
-
- System.arraycopy(
- buf, offset,
- this.blockBuffer, (this.currRecIdx * this.recordSize),
- this.recordSize );
-
- this.currRecIdx++;
- }
-
- /**
- * Write a TarBuffer block to the archive.
- */
- private void
- writeBlock()
- throws IOException
- {
- if ( this.debug )
- {
- System.err.println
- ( "WriteBlock: blkIdx = " + this.currBlkIdx );
- }
-
- if ( this.outStream == null )
- throw new IOException
- ( "writing to an input buffer" );
-
- this.outStream.write( this.blockBuffer, 0, this.blockSize );
- this.outStream.flush();
-
- this.currRecIdx = 0;
- this.currBlkIdx++;
- }
-
- /**
- * Flush the current data block if it has any data in it.
- */
-
- private void
- flushBlock()
- throws IOException
- {
- if ( this.debug )
- {
- System.err.println( "TarBuffer.flushBlock() called." );
- }
-
- if ( this.outStream == null )
- throw new IOException
- ( "writing to an input buffer" );
-
- if ( this.currRecIdx > 0 )
- {
- this.writeBlock();
- }
- }
-
- /**
- * Close the TarBuffer. If this is an output buffer, also flush the
- * current block before closing.
- */
- public void
- close()
- throws IOException
- {
- if ( this.debug )
- {
- System.err.println( "TarBuffer.closeBuffer()." );
- }
-
- if ( this.outStream != null )
- {
- this.flushBlock();
-
- if ( this.outStream != System.out
- && this.outStream != System.err )
- {
- this.outStream.close();
- this.outStream = null;
- }
- }
- else if ( this.inStream != null )
- {
- if ( this.inStream != System.in )
- {
- this.inStream.close();
- this.inStream = null;
- }
- }
- }
-
- }
-
+/*
+** Authored by Timothy Gerard Endres
+** <mailto:time at gjt.org> <http://www.trustice.com>
+**
+** This work has been placed into the public domain.
+** You may use this work in any way and for any purpose you wish.
+**
+** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
+** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
+** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
+** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
+** REDISTRIBUTION OF THIS SOFTWARE.
+**
+*/
+
+package installer;
+
+import java.io.*;
+
+
+/**
+ * The TarBuffer class implements the tar archive concept
+ * of a buffered input stream. This concept goes back to the
+ * days of blocked tape drives and special io devices. In the
+ * Java universe, the only real function that this class
+ * performs is to ensure that files have the correct "block"
+ * size, or other tars will complain.
+ * <p>
+ * You should never have a need to access this class directly.
+ * TarBuffers are created by Tar IO Streams.
+ *
+ * @version $Revision: 12504 $
+ * @author Timothy Gerard Endres,
+ * <a href="mailto:time at gjt.org">time at trustice.com</a>.
+ * @see TarArchive
+ */
+
+public class
+TarBuffer extends Object
+ {
+ public static final int DEFAULT_RCDSIZE = ( 512 );
+ public static final int DEFAULT_BLKSIZE = ( DEFAULT_RCDSIZE * 20 );
+
+ private InputStream inStream;
+ private OutputStream outStream;
+
+ private byte[] blockBuffer;
+ private int currBlkIdx;
+ private int currRecIdx;
+ private int blockSize;
+ private int recordSize;
+ private int recsPerBlock;
+
+ private boolean debug;
+
+
+ public
+ TarBuffer( InputStream inStream )
+ {
+ this( inStream, TarBuffer.DEFAULT_BLKSIZE );
+ }
+
+ public
+ TarBuffer( InputStream inStream, int blockSize )
+ {
+ this( inStream, blockSize, TarBuffer.DEFAULT_RCDSIZE );
+ }
+
+ public
+ TarBuffer( InputStream inStream, int blockSize, int recordSize )
+ {
+ this.inStream = inStream;
+ this.outStream = null;
+ this.initialize( blockSize, recordSize );
+ }
+
+ public
+ TarBuffer( OutputStream outStream )
+ {
+ this( outStream, TarBuffer.DEFAULT_BLKSIZE );
+ }
+
+ public
+ TarBuffer( OutputStream outStream, int blockSize )
+ {
+ this( outStream, blockSize, TarBuffer.DEFAULT_RCDSIZE );
+ }
+
+ public
+ TarBuffer( OutputStream outStream, int blockSize, int recordSize )
+ {
+ this.inStream = null;
+ this.outStream = outStream;
+ this.initialize( blockSize, recordSize );
+ }
+
+ /**
+ * Initialization common to all constructors.
+ */
+ private void
+ initialize( int blockSize, int recordSize )
+ {
+ this.debug = false;
+ this.blockSize = blockSize;
+ this.recordSize = recordSize;
+ this.recsPerBlock = ( this.blockSize / this.recordSize );
+ this.blockBuffer = new byte[ this.blockSize ];
+
+ if ( this.inStream != null )
+ {
+ this.currBlkIdx = -1;
+ this.currRecIdx = this.recsPerBlock;
+ }
+ else
+ {
+ this.currBlkIdx = 0;
+ this.currRecIdx = 0;
+ }
+ }
+
+ /**
+ * Get the TAR Buffer's block size. Blocks consist of multiple records.
+ */
+ public int
+ getBlockSize()
+ {
+ return this.blockSize;
+ }
+
+ /**
+ * Get the TAR Buffer's record size.
+ */
+ public int
+ getRecordSize()
+ {
+ return this.recordSize;
+ }
+
+ /**
+ * Set the debugging flag for the buffer.
+ *
+ * @param debug If true, print debugging output.
+ */
+ public void
+ setDebug( boolean debug )
+ {
+ this.debug = debug;
+ }
+
+ /**
+ * Determine if an archive record indicate End of Archive. End of
+ * archive is indicated by a record that consists entirely of null bytes.
+ *
+ * @param record The record data to check.
+ */
+ public boolean
+ isEOFRecord( byte[] record )
+ {
+ for ( int i = 0, sz = this.getRecordSize() ; i < sz ; ++i )
+ if ( record[i] != 0 )
+ return false;
+
+ return true;
+ }
+
+ /**
+ * Skip over a record on the input stream.
+ */
+
+ public void
+ skipRecord()
+ throws IOException
+ {
+ if ( this.debug )
+ {
+ System.err.println
+ ( "SkipRecord: recIdx = " + this.currRecIdx
+ + " blkIdx = " + this.currBlkIdx );
+ }
+
+ if ( this.inStream == null )
+ throw new IOException
+ ( "reading (via skip) from an output buffer" );
+
+ if ( this.currRecIdx >= this.recsPerBlock )
+ {
+ if ( ! this.readBlock() )
+ return; // UNDONE
+ }
+
+ this.currRecIdx++;
+ }
+
+ /**
+ * Read a record from the input stream and return the data.
+ *
+ * @return The record data.
+ */
+
+ public byte[]
+ readRecord()
+ throws IOException
+ {
+ if ( this.debug )
+ {
+ System.err.println
+ ( "ReadRecord: recIdx = " + this.currRecIdx
+ + " blkIdx = " + this.currBlkIdx );
+ }
+
+ if ( this.inStream == null )
+ throw new IOException
+ ( "reading from an output buffer" );
+
+ if ( this.currRecIdx >= this.recsPerBlock )
+ {
+ if ( ! this.readBlock() )
+ return null;
+ }
+
+ byte[] result = new byte[ this.recordSize ];
+
+ System.arraycopy(
+ this.blockBuffer, (this.currRecIdx * this.recordSize),
+ result, 0, this.recordSize );
+
+ this.currRecIdx++;
+
+ return result;
+ }
+
+ /**
+ * @return false if End-Of-File, else true
+ */
+
+ private boolean
+ readBlock()
+ throws IOException
+ {
+ if ( this.debug )
+ {
+ System.err.println
+ ( "ReadBlock: blkIdx = " + this.currBlkIdx );
+ }
+
+ if ( this.inStream == null )
+ throw new IOException
+ ( "reading from an output buffer" );
+
+ this.currRecIdx = 0;
+
+ int offset = 0;
+ int bytesNeeded = this.blockSize;
+ for ( ; bytesNeeded > 0 ; )
+ {
+ long numBytes =
+ this.inStream.read
+ ( this.blockBuffer, offset, bytesNeeded );
+
+ //
+ // NOTE
+ // We have fit EOF, and the block is not full!
+ //
+ // This is a broken archive. It does not follow the standard
+ // blocking algorithm. However, because we are generous, and
+ // it requires little effort, we will simply ignore the error
+ // and continue as if the entire block were read. This does
+ // not appear to break anything upstream. We used to return
+ // false in this case.
+ //
+ // Thanks to 'Yohann.Roussel at alcatel.fr' for this fix.
+ //
+
+ if ( numBytes == -1 )
+ break;
+
+ offset += numBytes;
+ bytesNeeded -= numBytes;
+ if ( numBytes != this.blockSize )
+ {
+ if ( this.debug )
+ {
+ System.err.println
+ ( "ReadBlock: INCOMPLETE READ " + numBytes
+ + " of " + this.blockSize + " bytes read." );
+ }
+ }
+ }
+
+ this.currBlkIdx++;
+
+ return true;
+ }
+
+ /**
+ * Get the current block number, zero based.
+ *
+ * @return The current zero based block number.
+ */
+ public int
+ getCurrentBlockNum()
+ {
+ return this.currBlkIdx;
+ }
+
+ /**
+ * Get the current record number, within the current block, zero based.
+ * Thus, current offset = (currentBlockNum * recsPerBlk) + currentRecNum.
+ *
+ * @return The current zero based record number.
+ */
+ public int
+ getCurrentRecordNum()
+ {
+ return this.currRecIdx - 1;
+ }
+
+ /**
+ * Write an archive record to the archive.
+ *
+ * @param record The record data to write to the archive.
+ */
+
+ public void
+ writeRecord( byte[] record )
+ throws IOException
+ {
+ if ( this.debug )
+ {
+ System.err.println
+ ( "WriteRecord: recIdx = " + this.currRecIdx
+ + " blkIdx = " + this.currBlkIdx );
+ }
+
+ if ( this.outStream == null )
+ throw new IOException
+ ( "writing to an input buffer" );
+
+ if ( record.length != this.recordSize )
+ throw new IOException
+ ( "record to write has length '" + record.length
+ + "' which is not the record size of '"
+ + this.recordSize + "'" );
+
+ if ( this.currRecIdx >= this.recsPerBlock )
+ {
+ this.writeBlock();
+ }
+
+ System.arraycopy(
+ record, 0,
+ this.blockBuffer, (this.currRecIdx * this.recordSize),
+ this.recordSize );
+
+ this.currRecIdx++;
+ }
+
+ /**
+ * Write an archive record to the archive, where the record may be
+ * inside of a larger array buffer. The buffer must be "offset plus
+ * record size" long.
+ *
+ * @param buf The buffer containing the record data to write.
+ * @param offset The offset of the record data within buf.
+ */
+
+ public void
+ writeRecord( byte[] buf, int offset )
+ throws IOException
+ {
+ if ( this.debug )
+ {
+ System.err.println
+ ( "WriteRecord: recIdx = " + this.currRecIdx
+ + " blkIdx = " + this.currBlkIdx );
+ }
+
+ if ( this.outStream == null )
+ throw new IOException
+ ( "writing to an input buffer" );
+
+ if ( (offset + this.recordSize) > buf.length )
+ throw new IOException
+ ( "record has length '" + buf.length
+ + "' with offset '" + offset
+ + "' which is less than the record size of '"
+ + this.recordSize + "'" );
+
+ if ( this.currRecIdx >= this.recsPerBlock )
+ {
+ this.writeBlock();
+ }
+
+ System.arraycopy(
+ buf, offset,
+ this.blockBuffer, (this.currRecIdx * this.recordSize),
+ this.recordSize );
+
+ this.currRecIdx++;
+ }
+
+ /**
+ * Write a TarBuffer block to the archive.
+ */
+ private void
+ writeBlock()
+ throws IOException
+ {
+ if ( this.debug )
+ {
+ System.err.println
+ ( "WriteBlock: blkIdx = " + this.currBlkIdx );
+ }
+
+ if ( this.outStream == null )
+ throw new IOException
+ ( "writing to an input buffer" );
+
+ this.outStream.write( this.blockBuffer, 0, this.blockSize );
+ this.outStream.flush();
+
+ this.currRecIdx = 0;
+ this.currBlkIdx++;
+ }
+
+ /**
+ * Flush the current data block if it has any data in it.
+ */
+
+ private void
+ flushBlock()
+ throws IOException
+ {
+ if ( this.debug )
+ {
+ System.err.println( "TarBuffer.flushBlock() called." );
+ }
+
+ if ( this.outStream == null )
+ throw new IOException
+ ( "writing to an input buffer" );
+
+ if ( this.currRecIdx > 0 )
+ {
+ this.writeBlock();
+ }
+ }
+
+ /**
+ * Close the TarBuffer. If this is an output buffer, also flush the
+ * current block before closing.
+ */
+ public void
+ close()
+ throws IOException
+ {
+ if ( this.debug )
+ {
+ System.err.println( "TarBuffer.closeBuffer()." );
+ }
+
+ if ( this.outStream != null )
+ {
+ this.flushBlock();
+
+ if ( this.outStream != System.out
+ && this.outStream != System.err )
+ {
+ this.outStream.close();
+ this.outStream = null;
+ }
+ }
+ else if ( this.inStream != null )
+ {
+ if ( this.inStream != System.in )
+ {
+ this.inStream.close();
+ this.inStream = null;
+ }
+ }
+ }
+
+ }
+
diff --git a/jEdit/installer/TarEntry.java b/jEdit/installer/TarEntry.java
index 19f5a70..1ea3d4f 100644
--- a/jEdit/installer/TarEntry.java
+++ b/jEdit/installer/TarEntry.java
@@ -1,729 +1,729 @@
-/*
-** Authored by Timothy Gerard Endres
-** <mailto:time at gjt.org> <http://www.trustice.com>
-**
-** This work has been placed into the public domain.
-** You may use this work in any way and for any purpose you wish.
-**
-** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
-** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
-** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
-** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
-** REDISTRIBUTION OF THIS SOFTWARE.
-**
-*/
-
-package installer;
-
-import java.io.*;
-import java.util.Date;
-
-
-/**
- *
- * This class represents an entry in a Tar archive. It consists
- * of the entry's header, as well as the entry's File. Entries
- * can be instantiated in one of three ways, depending on how
- * they are to be used.
- * <p>
- * TarEntries that are created from the header bytes read from
- * an archive are instantiated with the TarEntry( byte[] )
- * constructor. These entries will be used when extracting from
- * or listing the contents of an archive. These entries have their
- * header filled in using the header bytes. They also set the File
- * to null, since they reference an archive entry not a file.
- * <p>
- * TarEntries that are created from Files that are to be written
- * into an archive are instantiated with the TarEntry( File )
- * constructor. These entries have their header filled in using
- * the File's information. They also keep a reference to the File
- * for convenience when writing entries.
- * <p>
- * Finally, TarEntries can be constructed from nothing but a name.
- * This allows the programmer to construct the entry by hand, for
- * instance when only an InputStream is available for writing to
- * the archive, and the header information is constructed from
- * other information. In this case the header fields are set to
- * defaults and the File is set to null.
- *
- * <p>
- * The C structure for a Tar Entry's header is:
- * <pre>
- * struct header {
- * char name[NAMSIZ];
- * char mode[8];
- * char uid[8];
- * char gid[8];
- * char size[12];
- * char mtime[12];
- * char chksum[8];
- * char linkflag;
- * char linkname[NAMSIZ];
- * char magic[8];
- * char uname[TUNMLEN];
- * char gname[TGNMLEN];
- * char devmajor[8];
- * char devminor[8];
- * } header;
- * </pre>
- *
- * @see TarHeader
- *
- */
-
-public
-class TarEntry
-extends Object
- {
- /**
- * If this entry represents a File, this references it.
- */
- protected File file;
-
- /**
- * This is the entry's header information.
- */
- protected TarHeader header;
-
- /**
- * Construct an entry with only a name. This allows the programmer
- * to construct the entry's header "by hand". File is set to null.
- */
- public
- TarEntry( String name )
- {
- this.initialize();
- this.nameTarHeader( this.header, name );
- }
-
- /**
- * Construct an entry for a file. File is set to file, and the
- * header is constructed from information from the file.
- *
- * @param file The file that the entry represents.
- */
- public
- TarEntry( File file )
- throws InvalidHeaderException
- {
- this.initialize();
- this.getFileTarHeader( this.header, file );
- }
-
- /**
- * Construct an entry from an archive's header bytes. File is set
- * to null.
- *
- * @param headerBuf The header bytes from a tar archive entry.
- */
- public
- TarEntry( byte[] headerBuf )
- throws InvalidHeaderException
- {
- this.initialize();
- this.parseTarHeader( this.header, headerBuf );
- }
-
- /**
- * Initialization code common to all constructors.
- */
- private void
- initialize()
- {
- this.file = null;
- this.header = new TarHeader();
- }
-
- /**
- * Determine if the two entries are equal. Equality is determined
- * by the header names being equal.
- *
- * @return it Entry to be checked for equality.
- * @return True if the entries are equal.
- */
- public boolean
- equals( TarEntry it )
- {
- return
- this.header.name.toString().equals
- ( it.header.name.toString() );
- }
-
- /**
- * Determine if the given entry is a descendant of this entry.
- * Descendancy is determined by the name of the descendant
- * starting with this entry's name.
- *
- * @param desc Entry to be checked as a descendent of this.
- * @return True if entry is a descendant of this.
- */
- public boolean
- isDescendent( TarEntry desc )
- {
- return
- desc.header.name.toString().startsWith
- ( this.header.name.toString() );
- }
-
- /**
- * Get this entry's header.
- *
- * @return This entry's TarHeader.
- */
- public TarHeader
- getHeader()
- {
- return this.header;
- }
-
- /**
- * Get this entry's name.
- *
- * @return This entry's name.
- */
- public String
- getName()
- {
- return this.header.name.toString();
- }
-
- /**
- * Set this entry's name.
- *
- * @param name This entry's new name.
- */
- public void
- setName( String name )
- {
- this.header.name =
- new StringBuffer( name );
- }
-
- /**
- * Get this entry's user id.
- *
- * @return This entry's user id.
- */
- public int
- getUserId()
- {
- return this.header.userId;
- }
-
- /**
- * Set this entry's user id.
- *
- * @param userId This entry's new user id.
- */
- public void
- setUserId( int userId )
- {
- this.header.userId = userId;
- }
-
- /**
- * Get this entry's group id.
- *
- * @return This entry's group id.
- */
- public int
- getGroupId()
- {
- return this.header.groupId;
- }
-
- /**
- * Set this entry's group id.
- *
- * @param groupId This entry's new group id.
- */
- public void
- setGroupId( int groupId )
- {
- this.header.groupId = groupId;
- }
-
- /**
- * Get this entry's user name.
- *
- * @return This entry's user name.
- */
- public String
- getUserName()
- {
- return this.header.userName.toString();
- }
-
- /**
- * Set this entry's user name.
- *
- * @param userName This entry's new user name.
- */
- public void
- setUserName( String userName )
- {
- this.header.userName =
- new StringBuffer( userName );
- }
-
- /**
- * Get this entry's group name.
- *
- * @return This entry's group name.
- */
- public String
- getGroupName()
- {
- return this.header.groupName.toString();
- }
-
- /**
- * Set this entry's group name.
- *
- * @param groupName This entry's new group name.
- */
- public void
- setGroupName( String groupName )
- {
- this.header.groupName =
- new StringBuffer( groupName );
- }
-
- /**
- * Convenience method to set this entry's group and user ids.
- *
- * @param userId This entry's new user id.
- * @param groupId This entry's new group id.
- */
- public void
- setIds( int userId, int groupId )
- {
- this.setUserId( userId );
- this.setGroupId( groupId );
- }
-
- /**
- * Convenience method to set this entry's group and user names.
- *
- * @param userName This entry's new user name.
- * @param groupName This entry's new group name.
- */
- public void
- setNames( String userName, String groupName )
- {
- this.setUserName( userName );
- this.setGroupName( groupName );
- }
-
- /**
- * Set this entry's modification time. The parameter passed
- * to this method is in "Java time".
- *
- * @param time This entry's new modification time.
- */
- public void
- setModTime( long time )
- {
- this.header.modTime = time / 1000;
- }
-
- /**
- * Set this entry's modification time.
- *
- * @param time This entry's new modification time.
- */
- public void
- setModTime( Date time )
- {
- this.header.modTime = time.getTime() / 1000;
- }
-
- /**
- * Set this entry's modification time.
- *
- * @param time This entry's new modification time.
- */
- public Date
- getModTime()
- {
- return new Date( this.header.modTime * 1000 );
- }
-
- /**
- * Get this entry's file.
- *
- * @return This entry's file.
- */
- public File
- getFile()
- {
- return this.file;
- }
-
- /**
- * Get this entry's file size.
- *
- * @return This entry's file size.
- */
- public long
- getSize()
- {
- return this.header.size;
- }
-
- /**
- * Set this entry's file size.
- *
- * @param size This entry's new file size.
- */
- public void
- setSize( long size )
- {
- this.header.size = size;
- }
-
- /**
- * Convenience method that will modify an entry's name directly
- * in place in an entry header buffer byte array.
- *
- * @param outbuf The buffer containing the entry header to modify.
- * @param newName The new name to place into the header buffer.
- */
- public void
- adjustEntryName( byte[] outbuf, String newName )
- {
- int offset = 0;
- offset = TarHeader.getNameBytes
- ( new StringBuffer( newName ),
- outbuf, offset, TarHeader.NAMELEN );
- }
-
- /**
- * Return whether or not this entry represents a directory.
- *
- * @return True if this entry is a directory.
- */
- public boolean
- isDirectory()
- {
- if ( this.file != null )
- return this.file.isDirectory();
-
- if ( this.header != null )
- {
- if ( this.header.linkFlag == TarHeader.LF_DIR )
- return true;
-
- if ( this.header.name.toString().endsWith( "/" ) )
- return true;
- }
-
- return false;
- }
-
- /**
- * Fill in a TarHeader with information from a File.
- *
- * @param hdr The TarHeader to fill in.
- * @param file The file from which to get the header information.
- */
- public void
- getFileTarHeader( TarHeader hdr, File file )
- throws InvalidHeaderException
- {
- this.file = file;
-
- String name = file.getPath();
- String osname = System.getProperty( "os.name" );
- if ( osname != null )
- {
- // Strip off drive letters!
- // REVIEW Would a better check be "(File.separator == '\')"?
-
- // String Win32Prefix = "Windows";
- // String prefix = osname.substring( 0, Win32Prefix.length() );
- // if ( prefix.equalsIgnoreCase( Win32Prefix ) )
-
- // if ( File.separatorChar == '\\' )
-
- // Per Patrick Beard:
- String Win32Prefix = "windows";
- if ( osname.toLowerCase().startsWith( Win32Prefix ) )
- {
- if ( name.length() > 2 )
- {
- char ch1 = name.charAt(0);
- char ch2 = name.charAt(1);
- if ( ch2 == ':'
- && ( (ch1 >= 'a' && ch1 <= 'z')
- || (ch1 >= 'A' && ch1 <= 'Z') ) )
- {
- name = name.substring( 2 );
- }
- }
- }
- }
-
- name = name.replace( File.separatorChar, '/' );
-
- // No absolute pathnames
- // Windows (and Posix?) paths can start with "\\NetworkDrive\",
- // so we loop on starting /'s.
-
- for ( ; name.startsWith( "/" ) ; )
- name = name.substring( 1 );
-
- hdr.linkName = new StringBuffer( "" );
-
- hdr.name = new StringBuffer( name );
-
- if ( file.isDirectory() )
- {
- hdr.mode = 040755;
- hdr.linkFlag = TarHeader.LF_DIR;
- if ( hdr.name.charAt( hdr.name.length() - 1 ) != '/' )
- hdr.name.append( "/" );
- }
- else
- {
- hdr.mode = 0100644;
- hdr.linkFlag = TarHeader.LF_NORMAL;
- }
-
- // UNDONE When File lets us get the userName, use it!
-
- hdr.size = file.length();
- hdr.modTime = file.lastModified() / 1000;
- hdr.checkSum = 0;
- hdr.devMajor = 0;
- hdr.devMinor = 0;
- }
-
- /**
- * If this entry represents a file, and the file is a directory, return
- * an array of TarEntries for this entry's children.
- *
- * @return An array of TarEntry's for this entry's children.
- */
- public TarEntry[]
- getDirectoryEntries()
- throws InvalidHeaderException
- {
- if ( this.file == null
- || ! this.file.isDirectory() )
- {
- return new TarEntry[0];
- }
-
- String[] list = this.file.list();
-
- TarEntry[] result = new TarEntry[ list.length ];
-
- for ( int i = 0 ; i < list.length ; ++i )
- {
- result[i] =
- new TarEntry
- ( new File( this.file, list[i] ) );
- }
-
- return result;
- }
-
- /**
- * Compute the checksum of a tar entry header.
- *
- * @param buf The tar entry's header buffer.
- * @return The computed checksum.
- */
- public long
- computeCheckSum( byte[] buf )
- {
- long sum = 0;
-
- for ( int i = 0 ; i < buf.length ; ++i )
- {
- sum += 255 & buf[ i ];
- }
-
- return sum;
- }
-
- /**
- * Write an entry's header information to a header buffer.
- *
- * @param outbuf The tar entry header buffer to fill in.
- */
- public void
- writeEntryHeader( byte[] outbuf )
- {
- int offset = 0;
-
- offset = TarHeader.getNameBytes
- ( this.header.name, outbuf, offset, TarHeader.NAMELEN );
-
- offset = TarHeader.getOctalBytes
- ( this.header.mode, outbuf, offset, TarHeader.MODELEN );
-
- offset = TarHeader.getOctalBytes
- ( this.header.userId, outbuf, offset, TarHeader.UIDLEN );
-
- offset = TarHeader.getOctalBytes
- ( this.header.groupId, outbuf, offset, TarHeader.GIDLEN );
-
- long size = this.header.size;
-
- offset = TarHeader.getLongOctalBytes
- ( size, outbuf, offset, TarHeader.SIZELEN );
-
- offset = TarHeader.getLongOctalBytes
- ( this.header.modTime, outbuf, offset, TarHeader.MODTIMELEN );
-
- int csOffset = offset;
- for ( int c = 0 ; c < TarHeader.CHKSUMLEN ; ++c )
- outbuf[ offset++ ] = (byte) ' ';
-
- outbuf[ offset++ ] = this.header.linkFlag;
-
- offset = TarHeader.getNameBytes
- ( this.header.linkName, outbuf, offset, TarHeader.NAMELEN );
-
- offset = TarHeader.getNameBytes
- ( this.header.magic, outbuf, offset, TarHeader.MAGICLEN );
-
- offset = TarHeader.getNameBytes
- ( this.header.userName, outbuf, offset, TarHeader.UNAMELEN );
-
- offset = TarHeader.getNameBytes
- ( this.header.groupName, outbuf, offset, TarHeader.GNAMELEN );
-
- offset = TarHeader.getOctalBytes
- ( this.header.devMajor, outbuf, offset, TarHeader.DEVLEN );
-
- offset = TarHeader.getOctalBytes
- ( this.header.devMinor, outbuf, offset, TarHeader.DEVLEN );
-
- for ( ; offset < outbuf.length ; )
- outbuf[ offset++ ] = 0;
-
- long checkSum = this.computeCheckSum( outbuf );
-
- TarHeader.getCheckSumOctalBytes
- ( checkSum, outbuf, csOffset, TarHeader.CHKSUMLEN );
- }
-
- /**
- * Parse an entry's TarHeader information from a header buffer.
- *
- * @param hdr The TarHeader to fill in from the buffer information.
- * @param header The tar entry header buffer to get information from.
- */
- public void
- parseTarHeader( TarHeader hdr, byte[] header )
- throws InvalidHeaderException
- {
- int offset = 0;
-
- hdr.name =
- TarHeader.parseName( header, offset, TarHeader.NAMELEN );
-
- offset += TarHeader.NAMELEN;
-
- hdr.mode = (int)
- TarHeader.parseOctal( header, offset, TarHeader.MODELEN );
-
- offset += TarHeader.MODELEN;
-
- hdr.userId = (int)
- TarHeader.parseOctal( header, offset, TarHeader.UIDLEN );
-
- offset += TarHeader.UIDLEN;
-
- hdr.groupId = (int)
- TarHeader.parseOctal( header, offset, TarHeader.GIDLEN );
-
- offset += TarHeader.GIDLEN;
-
- hdr.size =
- TarHeader.parseOctal( header, offset, TarHeader.SIZELEN );
-
- offset += TarHeader.SIZELEN;
-
- hdr.modTime =
- TarHeader.parseOctal( header, offset, TarHeader.MODTIMELEN );
-
- offset += TarHeader.MODTIMELEN;
-
- hdr.checkSum = (int)
- TarHeader.parseOctal( header, offset, TarHeader.CHKSUMLEN );
-
- offset += TarHeader.CHKSUMLEN;
-
- hdr.linkFlag = header[ offset++ ];
-
- hdr.linkName =
- TarHeader.parseName( header, offset, TarHeader.NAMELEN );
-
- offset += TarHeader.NAMELEN;
-
- hdr.magic =
- TarHeader.parseName( header, offset, TarHeader.MAGICLEN );
-
- offset += TarHeader.MAGICLEN;
-
- hdr.userName =
- TarHeader.parseName( header, offset, TarHeader.UNAMELEN );
-
- offset += TarHeader.UNAMELEN;
-
- hdr.groupName =
- TarHeader.parseName( header, offset, TarHeader.GNAMELEN );
-
- offset += TarHeader.GNAMELEN;
-
- hdr.devMajor = (int)
- TarHeader.parseOctal( header, offset, TarHeader.DEVLEN );
-
- offset += TarHeader.DEVLEN;
-
- hdr.devMinor = (int)
- TarHeader.parseOctal( header, offset, TarHeader.DEVLEN );
- }
-
- /**
- * Fill in a TarHeader given only the entry's name.
- *
- * @param hdr The TarHeader to fill in.
- * @param name The tar entry name.
- */
- public void
- nameTarHeader( TarHeader hdr, String name )
- {
- boolean isDir = name.endsWith( "/" );
-
- hdr.checkSum = 0;
- hdr.devMajor = 0;
- hdr.devMinor = 0;
-
- hdr.name = new StringBuffer( name );
- hdr.mode = isDir ? 040755 : 0100644;
- hdr.userId = 0;
- hdr.groupId = 0;
- hdr.size = 0;
- hdr.checkSum = 0;
-
- hdr.modTime =
- (new java.util.Date()).getTime() / 1000;
-
- hdr.linkFlag =
- isDir ? TarHeader.LF_DIR : TarHeader.LF_NORMAL;
-
- hdr.linkName = new StringBuffer( "" );
- hdr.userName = new StringBuffer( "" );
- hdr.groupName = new StringBuffer( "" );
-
- hdr.devMajor = 0;
- hdr.devMinor = 0;
- }
-
- }
-
+/*
+** Authored by Timothy Gerard Endres
+** <mailto:time at gjt.org> <http://www.trustice.com>
+**
+** This work has been placed into the public domain.
+** You may use this work in any way and for any purpose you wish.
+**
+** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
+** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
+** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
+** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
+** REDISTRIBUTION OF THIS SOFTWARE.
+**
+*/
+
+package installer;
+
+import java.io.*;
+import java.util.Date;
+
+
+/**
+ *
+ * This class represents an entry in a Tar archive. It consists
+ * of the entry's header, as well as the entry's File. Entries
+ * can be instantiated in one of three ways, depending on how
+ * they are to be used.
+ * <p>
+ * TarEntries that are created from the header bytes read from
+ * an archive are instantiated with the TarEntry( byte[] )
+ * constructor. These entries will be used when extracting from
+ * or listing the contents of an archive. These entries have their
+ * header filled in using the header bytes. They also set the File
+ * to null, since they reference an archive entry not a file.
+ * <p>
+ * TarEntries that are created from Files that are to be written
+ * into an archive are instantiated with the TarEntry( File )
+ * constructor. These entries have their header filled in using
+ * the File's information. They also keep a reference to the File
+ * for convenience when writing entries.
+ * <p>
+ * Finally, TarEntries can be constructed from nothing but a name.
+ * This allows the programmer to construct the entry by hand, for
+ * instance when only an InputStream is available for writing to
+ * the archive, and the header information is constructed from
+ * other information. In this case the header fields are set to
+ * defaults and the File is set to null.
+ *
+ * <p>
+ * The C structure for a Tar Entry's header is:
+ * <pre>
+ * struct header {
+ * char name[NAMSIZ];
+ * char mode[8];
+ * char uid[8];
+ * char gid[8];
+ * char size[12];
+ * char mtime[12];
+ * char chksum[8];
+ * char linkflag;
+ * char linkname[NAMSIZ];
+ * char magic[8];
+ * char uname[TUNMLEN];
+ * char gname[TGNMLEN];
+ * char devmajor[8];
+ * char devminor[8];
+ * } header;
+ * </pre>
+ *
+ * @see TarHeader
+ *
+ */
+
+public
+class TarEntry
+extends Object
+ {
+ /**
+ * If this entry represents a File, this references it.
+ */
+ protected File file;
+
+ /**
+ * This is the entry's header information.
+ */
+ protected TarHeader header;
+
+ /**
+ * Construct an entry with only a name. This allows the programmer
+ * to construct the entry's header "by hand". File is set to null.
+ */
+ public
+ TarEntry( String name )
+ {
+ this.initialize();
+ this.nameTarHeader( this.header, name );
+ }
+
+ /**
+ * Construct an entry for a file. File is set to file, and the
+ * header is constructed from information from the file.
+ *
+ * @param file The file that the entry represents.
+ */
+ public
+ TarEntry( File file )
+ throws InvalidHeaderException
+ {
+ this.initialize();
+ this.getFileTarHeader( this.header, file );
+ }
+
+ /**
+ * Construct an entry from an archive's header bytes. File is set
+ * to null.
+ *
+ * @param headerBuf The header bytes from a tar archive entry.
+ */
+ public
+ TarEntry( byte[] headerBuf )
+ throws InvalidHeaderException
+ {
+ this.initialize();
+ this.parseTarHeader( this.header, headerBuf );
+ }
+
+ /**
+ * Initialization code common to all constructors.
+ */
+ private void
+ initialize()
+ {
+ this.file = null;
+ this.header = new TarHeader();
+ }
+
+ /**
+ * Determine if the two entries are equal. Equality is determined
+ * by the header names being equal.
+ *
+ * @return it Entry to be checked for equality.
+ * @return True if the entries are equal.
+ */
+ public boolean
+ equals( TarEntry it )
+ {
+ return
+ this.header.name.toString().equals
+ ( it.header.name.toString() );
+ }
+
+ /**
+ * Determine if the given entry is a descendant of this entry.
+ * Descendancy is determined by the name of the descendant
+ * starting with this entry's name.
+ *
+ * @param desc Entry to be checked as a descendent of this.
+ * @return True if entry is a descendant of this.
+ */
+ public boolean
+ isDescendent( TarEntry desc )
+ {
+ return
+ desc.header.name.toString().startsWith
+ ( this.header.name.toString() );
+ }
+
+ /**
+ * Get this entry's header.
+ *
+ * @return This entry's TarHeader.
+ */
+ public TarHeader
+ getHeader()
+ {
+ return this.header;
+ }
+
+ /**
+ * Get this entry's name.
+ *
+ * @return This entry's name.
+ */
+ public String
+ getName()
+ {
+ return this.header.name.toString();
+ }
+
+ /**
+ * Set this entry's name.
+ *
+ * @param name This entry's new name.
+ */
+ public void
+ setName( String name )
+ {
+ this.header.name =
+ new StringBuffer( name );
+ }
+
+ /**
+ * Get this entry's user id.
+ *
+ * @return This entry's user id.
+ */
+ public int
+ getUserId()
+ {
+ return this.header.userId;
+ }
+
+ /**
+ * Set this entry's user id.
+ *
+ * @param userId This entry's new user id.
+ */
+ public void
+ setUserId( int userId )
+ {
+ this.header.userId = userId;
+ }
+
+ /**
+ * Get this entry's group id.
+ *
+ * @return This entry's group id.
+ */
+ public int
+ getGroupId()
+ {
+ return this.header.groupId;
+ }
+
+ /**
+ * Set this entry's group id.
+ *
+ * @param groupId This entry's new group id.
+ */
+ public void
+ setGroupId( int groupId )
+ {
+ this.header.groupId = groupId;
+ }
+
+ /**
+ * Get this entry's user name.
+ *
+ * @return This entry's user name.
+ */
+ public String
+ getUserName()
+ {
+ return this.header.userName.toString();
+ }
+
+ /**
+ * Set this entry's user name.
+ *
+ * @param userName This entry's new user name.
+ */
+ public void
+ setUserName( String userName )
+ {
+ this.header.userName =
+ new StringBuffer( userName );
+ }
+
+ /**
+ * Get this entry's group name.
+ *
+ * @return This entry's group name.
+ */
+ public String
+ getGroupName()
+ {
+ return this.header.groupName.toString();
+ }
+
+ /**
+ * Set this entry's group name.
+ *
+ * @param groupName This entry's new group name.
+ */
+ public void
+ setGroupName( String groupName )
+ {
+ this.header.groupName =
+ new StringBuffer( groupName );
+ }
+
+ /**
+ * Convenience method to set this entry's group and user ids.
+ *
+ * @param userId This entry's new user id.
+ * @param groupId This entry's new group id.
+ */
+ public void
+ setIds( int userId, int groupId )
+ {
+ this.setUserId( userId );
+ this.setGroupId( groupId );
+ }
+
+ /**
+ * Convenience method to set this entry's group and user names.
+ *
+ * @param userName This entry's new user name.
+ * @param groupName This entry's new group name.
+ */
+ public void
+ setNames( String userName, String groupName )
+ {
+ this.setUserName( userName );
+ this.setGroupName( groupName );
+ }
+
+ /**
+ * Set this entry's modification time. The parameter passed
+ * to this method is in "Java time".
+ *
+ * @param time This entry's new modification time.
+ */
+ public void
+ setModTime( long time )
+ {
+ this.header.modTime = time / 1000;
+ }
+
+ /**
+ * Set this entry's modification time.
+ *
+ * @param time This entry's new modification time.
+ */
+ public void
+ setModTime( Date time )
+ {
+ this.header.modTime = time.getTime() / 1000;
+ }
+
+ /**
+ * Set this entry's modification time.
+ *
+ * @param time This entry's new modification time.
+ */
+ public Date
+ getModTime()
+ {
+ return new Date( this.header.modTime * 1000 );
+ }
+
+ /**
+ * Get this entry's file.
+ *
+ * @return This entry's file.
+ */
+ public File
+ getFile()
+ {
+ return this.file;
+ }
+
+ /**
+ * Get this entry's file size.
+ *
+ * @return This entry's file size.
+ */
+ public long
+ getSize()
+ {
+ return this.header.size;
+ }
+
+ /**
+ * Set this entry's file size.
+ *
+ * @param size This entry's new file size.
+ */
+ public void
+ setSize( long size )
+ {
+ this.header.size = size;
+ }
+
+ /**
+ * Convenience method that will modify an entry's name directly
+ * in place in an entry header buffer byte array.
+ *
+ * @param outbuf The buffer containing the entry header to modify.
+ * @param newName The new name to place into the header buffer.
+ */
+ public void
+ adjustEntryName( byte[] outbuf, String newName )
+ {
+ int offset = 0;
+ offset = TarHeader.getNameBytes
+ ( new StringBuffer( newName ),
+ outbuf, offset, TarHeader.NAMELEN );
+ }
+
+ /**
+ * Return whether or not this entry represents a directory.
+ *
+ * @return True if this entry is a directory.
+ */
+ public boolean
+ isDirectory()
+ {
+ if ( this.file != null )
+ return this.file.isDirectory();
+
+ if ( this.header != null )
+ {
+ if ( this.header.linkFlag == TarHeader.LF_DIR )
+ return true;
+
+ if ( this.header.name.toString().endsWith( "/" ) )
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Fill in a TarHeader with information from a File.
+ *
+ * @param hdr The TarHeader to fill in.
+ * @param file The file from which to get the header information.
+ */
+ public void
+ getFileTarHeader( TarHeader hdr, File file )
+ throws InvalidHeaderException
+ {
+ this.file = file;
+
+ String name = file.getPath();
+ String osname = System.getProperty( "os.name" );
+ if ( osname != null )
+ {
+ // Strip off drive letters!
+ // REVIEW Would a better check be "(File.separator == '\')"?
+
+ // String Win32Prefix = "Windows";
+ // String prefix = osname.substring( 0, Win32Prefix.length() );
+ // if ( prefix.equalsIgnoreCase( Win32Prefix ) )
+
+ // if ( File.separatorChar == '\\' )
+
+ // Per Patrick Beard:
+ String Win32Prefix = "windows";
+ if ( osname.toLowerCase().startsWith( Win32Prefix ) )
+ {
+ if ( name.length() > 2 )
+ {
+ char ch1 = name.charAt(0);
+ char ch2 = name.charAt(1);
+ if ( ch2 == ':'
+ && ( (ch1 >= 'a' && ch1 <= 'z')
+ || (ch1 >= 'A' && ch1 <= 'Z') ) )
+ {
+ name = name.substring( 2 );
+ }
+ }
+ }
+ }
+
+ name = name.replace( File.separatorChar, '/' );
+
+ // No absolute pathnames
+ // Windows (and Posix?) paths can start with "\\NetworkDrive\",
+ // so we loop on starting /'s.
+
+ for ( ; name.startsWith( "/" ) ; )
+ name = name.substring( 1 );
+
+ hdr.linkName = new StringBuffer( "" );
+
+ hdr.name = new StringBuffer( name );
+
+ if ( file.isDirectory() )
+ {
+ hdr.mode = 040755;
+ hdr.linkFlag = TarHeader.LF_DIR;
+ if ( hdr.name.charAt( hdr.name.length() - 1 ) != '/' )
+ hdr.name.append( "/" );
+ }
+ else
+ {
+ hdr.mode = 0100644;
+ hdr.linkFlag = TarHeader.LF_NORMAL;
+ }
+
+ // UNDONE When File lets us get the userName, use it!
+
+ hdr.size = file.length();
+ hdr.modTime = file.lastModified() / 1000;
+ hdr.checkSum = 0;
+ hdr.devMajor = 0;
+ hdr.devMinor = 0;
+ }
+
+ /**
+ * If this entry represents a file, and the file is a directory, return
+ * an array of TarEntries for this entry's children.
+ *
+ * @return An array of TarEntry's for this entry's children.
+ */
+ public TarEntry[]
+ getDirectoryEntries()
+ throws InvalidHeaderException
+ {
+ if ( this.file == null
+ || ! this.file.isDirectory() )
+ {
+ return new TarEntry[0];
+ }
+
+ String[] list = this.file.list();
+
+ TarEntry[] result = new TarEntry[ list.length ];
+
+ for ( int i = 0 ; i < list.length ; ++i )
+ {
+ result[i] =
+ new TarEntry
+ ( new File( this.file, list[i] ) );
+ }
+
+ return result;
+ }
+
+ /**
+ * Compute the checksum of a tar entry header.
+ *
+ * @param buf The tar entry's header buffer.
+ * @return The computed checksum.
+ */
+ public long
+ computeCheckSum( byte[] buf )
+ {
+ long sum = 0;
+
+ for ( int i = 0 ; i < buf.length ; ++i )
+ {
+ sum += 255 & buf[ i ];
+ }
+
+ return sum;
+ }
+
+ /**
+ * Write an entry's header information to a header buffer.
+ *
+ * @param outbuf The tar entry header buffer to fill in.
+ */
+ public void
+ writeEntryHeader( byte[] outbuf )
+ {
+ int offset = 0;
+
+ offset = TarHeader.getNameBytes
+ ( this.header.name, outbuf, offset, TarHeader.NAMELEN );
+
+ offset = TarHeader.getOctalBytes
+ ( this.header.mode, outbuf, offset, TarHeader.MODELEN );
+
+ offset = TarHeader.getOctalBytes
+ ( this.header.userId, outbuf, offset, TarHeader.UIDLEN );
+
+ offset = TarHeader.getOctalBytes
+ ( this.header.groupId, outbuf, offset, TarHeader.GIDLEN );
+
+ long size = this.header.size;
+
+ offset = TarHeader.getLongOctalBytes
+ ( size, outbuf, offset, TarHeader.SIZELEN );
+
+ offset = TarHeader.getLongOctalBytes
+ ( this.header.modTime, outbuf, offset, TarHeader.MODTIMELEN );
+
+ int csOffset = offset;
+ for ( int c = 0 ; c < TarHeader.CHKSUMLEN ; ++c )
+ outbuf[ offset++ ] = (byte) ' ';
+
+ outbuf[ offset++ ] = this.header.linkFlag;
+
+ offset = TarHeader.getNameBytes
+ ( this.header.linkName, outbuf, offset, TarHeader.NAMELEN );
+
+ offset = TarHeader.getNameBytes
+ ( this.header.magic, outbuf, offset, TarHeader.MAGICLEN );
+
+ offset = TarHeader.getNameBytes
+ ( this.header.userName, outbuf, offset, TarHeader.UNAMELEN );
+
+ offset = TarHeader.getNameBytes
+ ( this.header.groupName, outbuf, offset, TarHeader.GNAMELEN );
+
+ offset = TarHeader.getOctalBytes
+ ( this.header.devMajor, outbuf, offset, TarHeader.DEVLEN );
+
+ offset = TarHeader.getOctalBytes
+ ( this.header.devMinor, outbuf, offset, TarHeader.DEVLEN );
+
+ for ( ; offset < outbuf.length ; )
+ outbuf[ offset++ ] = 0;
+
+ long checkSum = this.computeCheckSum( outbuf );
+
+ TarHeader.getCheckSumOctalBytes
+ ( checkSum, outbuf, csOffset, TarHeader.CHKSUMLEN );
+ }
+
+ /**
+ * Parse an entry's TarHeader information from a header buffer.
+ *
+ * @param hdr The TarHeader to fill in from the buffer information.
+ * @param header The tar entry header buffer to get information from.
+ */
+ public void
+ parseTarHeader( TarHeader hdr, byte[] header )
+ throws InvalidHeaderException
+ {
+ int offset = 0;
+
+ hdr.name =
+ TarHeader.parseName( header, offset, TarHeader.NAMELEN );
+
+ offset += TarHeader.NAMELEN;
+
+ hdr.mode = (int)
+ TarHeader.parseOctal( header, offset, TarHeader.MODELEN );
+
+ offset += TarHeader.MODELEN;
+
+ hdr.userId = (int)
+ TarHeader.parseOctal( header, offset, TarHeader.UIDLEN );
+
+ offset += TarHeader.UIDLEN;
+
+ hdr.groupId = (int)
+ TarHeader.parseOctal( header, offset, TarHeader.GIDLEN );
+
+ offset += TarHeader.GIDLEN;
+
+ hdr.size =
+ TarHeader.parseOctal( header, offset, TarHeader.SIZELEN );
+
+ offset += TarHeader.SIZELEN;
+
+ hdr.modTime =
+ TarHeader.parseOctal( header, offset, TarHeader.MODTIMELEN );
+
+ offset += TarHeader.MODTIMELEN;
+
+ hdr.checkSum = (int)
+ TarHeader.parseOctal( header, offset, TarHeader.CHKSUMLEN );
+
+ offset += TarHeader.CHKSUMLEN;
+
+ hdr.linkFlag = header[ offset++ ];
+
+ hdr.linkName =
+ TarHeader.parseName( header, offset, TarHeader.NAMELEN );
+
+ offset += TarHeader.NAMELEN;
+
+ hdr.magic =
+ TarHeader.parseName( header, offset, TarHeader.MAGICLEN );
+
+ offset += TarHeader.MAGICLEN;
+
+ hdr.userName =
+ TarHeader.parseName( header, offset, TarHeader.UNAMELEN );
+
+ offset += TarHeader.UNAMELEN;
+
+ hdr.groupName =
+ TarHeader.parseName( header, offset, TarHeader.GNAMELEN );
+
+ offset += TarHeader.GNAMELEN;
+
+ hdr.devMajor = (int)
+ TarHeader.parseOctal( header, offset, TarHeader.DEVLEN );
+
+ offset += TarHeader.DEVLEN;
+
+ hdr.devMinor = (int)
+ TarHeader.parseOctal( header, offset, TarHeader.DEVLEN );
+ }
+
+ /**
+ * Fill in a TarHeader given only the entry's name.
+ *
+ * @param hdr The TarHeader to fill in.
+ * @param name The tar entry name.
+ */
+ public void
+ nameTarHeader( TarHeader hdr, String name )
+ {
+ boolean isDir = name.endsWith( "/" );
+
+ hdr.checkSum = 0;
+ hdr.devMajor = 0;
+ hdr.devMinor = 0;
+
+ hdr.name = new StringBuffer( name );
+ hdr.mode = isDir ? 040755 : 0100644;
+ hdr.userId = 0;
+ hdr.groupId = 0;
+ hdr.size = 0;
+ hdr.checkSum = 0;
+
+ hdr.modTime =
+ (new java.util.Date()).getTime() / 1000;
+
+ hdr.linkFlag =
+ isDir ? TarHeader.LF_DIR : TarHeader.LF_NORMAL;
+
+ hdr.linkName = new StringBuffer( "" );
+ hdr.userName = new StringBuffer( "" );
+ hdr.groupName = new StringBuffer( "" );
+
+ hdr.devMajor = 0;
+ hdr.devMinor = 0;
+ }
+
+ }
+
diff --git a/jEdit/installer/TarHeader.java b/jEdit/installer/TarHeader.java
index 570a753..fdf15ad 100644
--- a/jEdit/installer/TarHeader.java
+++ b/jEdit/installer/TarHeader.java
@@ -1,422 +1,422 @@
-/*
-** Authored by Timothy Gerard Endres
-** <mailto:time at gjt.org> <http://www.trustice.com>
-**
-** This work has been placed into the public domain.
-** You may use this work in any way and for any purpose you wish.
-**
-** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
-** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
-** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
-** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
-** REDISTRIBUTION OF THIS SOFTWARE.
-**
-*/
-
-package installer;
-
-/**
- * This class encapsulates the Tar Entry Header used in Tar Archives.
- * The class also holds a number of tar constants, used mostly in headers.
- */
-
-public class
-TarHeader extends Object
- {
- /**
- * The length of the name field in a header buffer.
- */
- public static final int NAMELEN = 100;
- /**
- * The length of the mode field in a header buffer.
- */
- public static final int MODELEN = 8;
- /**
- * The length of the user id field in a header buffer.
- */
- public static final int UIDLEN = 8;
- /**
- * The length of the group id field in a header buffer.
- */
- public static final int GIDLEN = 8;
- /**
- * The length of the checksum field in a header buffer.
- */
- public static final int CHKSUMLEN = 8;
- /**
- * The length of the size field in a header buffer.
- */
- public static final int SIZELEN = 12;
- /**
- * The length of the magic field in a header buffer.
- */
- public static final int MAGICLEN = 8;
- /**
- * The length of the modification time field in a header buffer.
- */
- public static final int MODTIMELEN = 12;
- /**
- * The length of the user name field in a header buffer.
- */
- public static final int UNAMELEN = 32;
- /**
- * The length of the group name field in a header buffer.
- */
- public static final int GNAMELEN = 32;
- /**
- * The length of the devices field in a header buffer.
- */
- public static final int DEVLEN = 8;
-
- /**
- * LF_ constants represent the "link flag" of an entry, or more commonly,
- * the "entry type". This is the "old way" of indicating a normal file.
- */
- public static final byte LF_OLDNORM = 0;
- /**
- * Normal file type.
- */
- public static final byte LF_NORMAL = (byte) '0';
- /**
- * Link file type.
- */
- public static final byte LF_LINK = (byte) '1';
- /**
- * Symbolic link file type.
- */
- public static final byte LF_SYMLINK = (byte) '2';
- /**
- * Character device file type.
- */
- public static final byte LF_CHR = (byte) '3';
- /**
- * Block device file type.
- */
- public static final byte LF_BLK = (byte) '4';
- /**
- * Directory file type.
- */
- public static final byte LF_DIR = (byte) '5';
- /**
- * FIFO (pipe) file type.
- */
- public static final byte LF_FIFO = (byte) '6';
- /**
- * Contiguous file type.
- */
- public static final byte LF_CONTIG = (byte) '7';
-
- /**
- * The magic tag representing a POSIX tar archive.
- */
- public static final String TMAGIC = "ustar";
-
- /**
- * The magic tag representing a GNU tar archive.
- */
- public static final String GNU_TMAGIC = "ustar ";
-
- /**
- * The entry's name.
- */
- public StringBuffer name;
- /**
- * The entry's permission mode.
- */
- public int mode;
- /**
- * The entry's user id.
- */
- public int userId;
- /**
- * The entry's group id.
- */
- public int groupId;
- /**
- * The entry's size.
- */
- public long size;
- /**
- * The entry's modification time.
- */
- public long modTime;
- /**
- * The entry's checksum.
- */
- public int checkSum;
- /**
- * The entry's link flag.
- */
- public byte linkFlag;
- /**
- * The entry's link name.
- */
- public StringBuffer linkName;
- /**
- * The entry's magic tag.
- */
- public StringBuffer magic;
- /**
- * The entry's user name.
- */
- public StringBuffer userName;
- /**
- * The entry's group name.
- */
- public StringBuffer groupName;
- /**
- * The entry's major device number.
- */
- public int devMajor;
- /**
- * The entry's minor device number.
- */
- public int devMinor;
-
-
- public
- TarHeader()
- {
- this.magic = new StringBuffer( TarHeader.TMAGIC );
-
- this.name = new StringBuffer();
- this.linkName = new StringBuffer();
-
- String user =
- System.getProperty( "user.name", "" );
-
- if ( user.length() > 31 )
- user = user.substring( 0, 31 );
-
- this.userId = 0;
- this.groupId = 0;
- this.userName = new StringBuffer( user );
- this.groupName = new StringBuffer( "" );
- }
-
- /**
- * TarHeaders can be cloned.
- */
- public Object
- clone()
- {
- TarHeader hdr = null;
-
- try {
- hdr = (TarHeader) super.clone();
-
- hdr.name =
- (this.name == null ) ? null
- : new StringBuffer( this.name.toString() );
- hdr.mode = this.mode;
- hdr.userId = this.userId;
- hdr.groupId = this.groupId;
- hdr.size = this.size;
- hdr.modTime = this.modTime;
- hdr.checkSum = this.checkSum;
- hdr.linkFlag = this.linkFlag;
- hdr.linkName =
- (this.linkName == null ) ? null
- : new StringBuffer( this.linkName.toString() );
- hdr.magic =
- (this.magic == null ) ? null
- : new StringBuffer( this.magic.toString() );
- hdr.userName =
- (this.userName == null ) ? null
- : new StringBuffer( this.userName.toString() );
- hdr.groupName =
- (this.groupName == null ) ? null
- : new StringBuffer( this.groupName.toString() );
- hdr.devMajor = this.devMajor;
- hdr.devMinor = this.devMinor;
- }
- catch ( CloneNotSupportedException ex )
- {
- ex.printStackTrace();
- }
-
- return hdr;
- }
-
- /**
- * Get the name of this entry.
- *
- * @return Teh entry's name.
- */
- public String
- getName()
- {
- return this.name.toString();
- }
-
- /**
- * Parse an octal string from a header buffer. This is used for the
- * file permission mode value.
- *
- * @param header The header buffer from which to parse.
- * @param offset The offset into the buffer from which to parse.
- * @param length The number of header bytes to parse.
- * @return The long value of the octal string.
- */
- public static long
- parseOctal( byte[] header, int offset, int length )
- throws InvalidHeaderException
- {
- long result = 0;
- boolean stillPadding = true;
-
- int end = offset + length;
- for ( int i = offset ; i < end ; ++i )
- {
- if ( header[i] == 0 )
- break;
-
- if ( header[i] == (byte) ' ' || header[i] == '0' )
- {
- if ( stillPadding )
- continue;
-
- if ( header[i] == (byte) ' ' )
- break;
- }
-
- stillPadding = false;
-
- result =
- (result << 3)
- + (header[i] - '0');
- }
-
- return result;
- }
-
- /**
- * Parse an entry name from a header buffer.
- *
- * @param header The header buffer from which to parse.
- * @param offset The offset into the buffer from which to parse.
- * @param length The number of header bytes to parse.
- * @return The header's entry name.
- */
- public static StringBuffer
- parseName( byte[] header, int offset, int length )
- throws InvalidHeaderException
- {
- StringBuffer result = new StringBuffer( length );
-
- int end = offset + length;
- for ( int i = offset ; i < end ; ++i )
- {
- if ( header[i] == 0 )
- break;
- result.append( (char)header[i] );
- }
-
- return result;
- }
-
- /**
- * Determine the number of bytes in an entry name.
- *
- * @param header The header buffer from which to parse.
- * @param offset The offset into the buffer from which to parse.
- * @param length The number of header bytes to parse.
- * @return The number of bytes in a header's entry name.
- */
- public static int
- getNameBytes( StringBuffer name, byte[] buf, int offset, int length )
- {
- int i;
-
- for ( i = 0 ; i < length && i < name.length() ; ++i )
- {
- buf[ offset + i ] = (byte) name.charAt( i );
- }
-
- for ( ; i < length ; ++i )
- {
- buf[ offset + i ] = 0;
- }
-
- return offset + length;
- }
-
- /**
- * Parse an octal integer from a header buffer.
- *
- * @param header The header buffer from which to parse.
- * @param offset The offset into the buffer from which to parse.
- * @param length The number of header bytes to parse.
- * @return The integer value of the octal bytes.
- */
- public static int
- getOctalBytes( long value, byte[] buf, int offset, int length )
- {
- byte[] result = new byte[ length ];
-
- int idx = length - 1;
-
- buf[ offset + idx ] = 0;
- --idx;
- buf[ offset + idx ] = (byte) ' ';
- --idx;
-
- if ( value == 0 )
- {
- buf[ offset + idx ] = (byte) '0';
- --idx;
- }
- else
- {
- for ( long val = value ; idx >= 0 && val > 0 ; --idx )
- {
- buf[ offset + idx ] = (byte)
- ( (byte) '0' + (byte) (val & 7) );
- val = val >> 3;
- }
- }
-
- for ( ; idx >= 0 ; --idx )
- {
- buf[ offset + idx ] = (byte) ' ';
- }
-
- return offset + length;
- }
-
- /**
- * Parse an octal long integer from a header buffer.
- *
- * @param header The header buffer from which to parse.
- * @param offset The offset into the buffer from which to parse.
- * @param length The number of header bytes to parse.
- * @return The long value of the octal bytes.
- */
- public static int
- getLongOctalBytes( long value, byte[] buf, int offset, int length )
- {
- byte[] temp = new byte[ length + 1 ];
- TarHeader.getOctalBytes( value, temp, 0, length + 1 );
- System.arraycopy( temp, 0, buf, offset, length );
- return offset + length;
- }
-
- /**
- * Parse the checksum octal integer from a header buffer.
- *
- * @param header The header buffer from which to parse.
- * @param offset The offset into the buffer from which to parse.
- * @param length The number of header bytes to parse.
- * @return The integer value of the entry's checksum.
- */
- public static int
- getCheckSumOctalBytes( long value, byte[] buf, int offset, int length )
- {
- TarHeader.getOctalBytes( value, buf, offset, length );
- buf[ offset + length - 1 ] = (byte) ' ';
- buf[ offset + length - 2 ] = 0;
- return offset + length;
- }
-
- }
-
+/*
+** Authored by Timothy Gerard Endres
+** <mailto:time at gjt.org> <http://www.trustice.com>
+**
+** This work has been placed into the public domain.
+** You may use this work in any way and for any purpose you wish.
+**
+** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
+** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
+** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
+** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
+** REDISTRIBUTION OF THIS SOFTWARE.
+**
+*/
+
+package installer;
+
+/**
+ * This class encapsulates the Tar Entry Header used in Tar Archives.
+ * The class also holds a number of tar constants, used mostly in headers.
+ */
+
+public class
+TarHeader extends Object
+ {
+ /**
+ * The length of the name field in a header buffer.
+ */
+ public static final int NAMELEN = 100;
+ /**
+ * The length of the mode field in a header buffer.
+ */
+ public static final int MODELEN = 8;
+ /**
+ * The length of the user id field in a header buffer.
+ */
+ public static final int UIDLEN = 8;
+ /**
+ * The length of the group id field in a header buffer.
+ */
+ public static final int GIDLEN = 8;
+ /**
+ * The length of the checksum field in a header buffer.
+ */
+ public static final int CHKSUMLEN = 8;
+ /**
+ * The length of the size field in a header buffer.
+ */
+ public static final int SIZELEN = 12;
+ /**
+ * The length of the magic field in a header buffer.
+ */
+ public static final int MAGICLEN = 8;
+ /**
+ * The length of the modification time field in a header buffer.
+ */
+ public static final int MODTIMELEN = 12;
+ /**
+ * The length of the user name field in a header buffer.
+ */
+ public static final int UNAMELEN = 32;
+ /**
+ * The length of the group name field in a header buffer.
+ */
+ public static final int GNAMELEN = 32;
+ /**
+ * The length of the devices field in a header buffer.
+ */
+ public static final int DEVLEN = 8;
+
+ /**
+ * LF_ constants represent the "link flag" of an entry, or more commonly,
+ * the "entry type". This is the "old way" of indicating a normal file.
+ */
+ public static final byte LF_OLDNORM = 0;
+ /**
+ * Normal file type.
+ */
+ public static final byte LF_NORMAL = (byte) '0';
+ /**
+ * Link file type.
+ */
+ public static final byte LF_LINK = (byte) '1';
+ /**
+ * Symbolic link file type.
+ */
+ public static final byte LF_SYMLINK = (byte) '2';
+ /**
+ * Character device file type.
+ */
+ public static final byte LF_CHR = (byte) '3';
+ /**
+ * Block device file type.
+ */
+ public static final byte LF_BLK = (byte) '4';
+ /**
+ * Directory file type.
+ */
+ public static final byte LF_DIR = (byte) '5';
+ /**
+ * FIFO (pipe) file type.
+ */
+ public static final byte LF_FIFO = (byte) '6';
+ /**
+ * Contiguous file type.
+ */
+ public static final byte LF_CONTIG = (byte) '7';
+
+ /**
+ * The magic tag representing a POSIX tar archive.
+ */
+ public static final String TMAGIC = "ustar";
+
+ /**
+ * The magic tag representing a GNU tar archive.
+ */
+ public static final String GNU_TMAGIC = "ustar ";
+
+ /**
+ * The entry's name.
+ */
+ public StringBuffer name;
+ /**
+ * The entry's permission mode.
+ */
+ public int mode;
+ /**
+ * The entry's user id.
+ */
+ public int userId;
+ /**
+ * The entry's group id.
+ */
+ public int groupId;
+ /**
+ * The entry's size.
+ */
+ public long size;
+ /**
+ * The entry's modification time.
+ */
+ public long modTime;
+ /**
+ * The entry's checksum.
+ */
+ public int checkSum;
+ /**
+ * The entry's link flag.
+ */
+ public byte linkFlag;
+ /**
+ * The entry's link name.
+ */
+ public StringBuffer linkName;
+ /**
+ * The entry's magic tag.
+ */
+ public StringBuffer magic;
+ /**
+ * The entry's user name.
+ */
+ public StringBuffer userName;
+ /**
+ * The entry's group name.
+ */
+ public StringBuffer groupName;
+ /**
+ * The entry's major device number.
+ */
+ public int devMajor;
+ /**
+ * The entry's minor device number.
+ */
+ public int devMinor;
+
+
+ public
+ TarHeader()
+ {
+ this.magic = new StringBuffer( TarHeader.TMAGIC );
+
+ this.name = new StringBuffer();
+ this.linkName = new StringBuffer();
+
+ String user =
+ System.getProperty( "user.name", "" );
+
+ if ( user.length() > 31 )
+ user = user.substring( 0, 31 );
+
+ this.userId = 0;
+ this.groupId = 0;
+ this.userName = new StringBuffer( user );
+ this.groupName = new StringBuffer( "" );
+ }
+
+ /**
+ * TarHeaders can be cloned.
+ */
+ public Object
+ clone()
+ {
+ TarHeader hdr = null;
+
+ try {
+ hdr = (TarHeader) super.clone();
+
+ hdr.name =
+ (this.name == null ) ? null
+ : new StringBuffer( this.name.toString() );
+ hdr.mode = this.mode;
+ hdr.userId = this.userId;
+ hdr.groupId = this.groupId;
+ hdr.size = this.size;
+ hdr.modTime = this.modTime;
+ hdr.checkSum = this.checkSum;
+ hdr.linkFlag = this.linkFlag;
+ hdr.linkName =
+ (this.linkName == null ) ? null
+ : new StringBuffer( this.linkName.toString() );
+ hdr.magic =
+ (this.magic == null ) ? null
+ : new StringBuffer( this.magic.toString() );
+ hdr.userName =
+ (this.userName == null ) ? null
+ : new StringBuffer( this.userName.toString() );
+ hdr.groupName =
+ (this.groupName == null ) ? null
+ : new StringBuffer( this.groupName.toString() );
+ hdr.devMajor = this.devMajor;
+ hdr.devMinor = this.devMinor;
+ }
+ catch ( CloneNotSupportedException ex )
+ {
+ ex.printStackTrace();
+ }
+
+ return hdr;
+ }
+
+ /**
+ * Get the name of this entry.
+ *
+ * @return Teh entry's name.
+ */
+ public String
+ getName()
+ {
+ return this.name.toString();
+ }
+
+ /**
+ * Parse an octal string from a header buffer. This is used for the
+ * file permission mode value.
+ *
+ * @param header The header buffer from which to parse.
+ * @param offset The offset into the buffer from which to parse.
+ * @param length The number of header bytes to parse.
+ * @return The long value of the octal string.
+ */
+ public static long
+ parseOctal( byte[] header, int offset, int length )
+ throws InvalidHeaderException
+ {
+ long result = 0;
+ boolean stillPadding = true;
+
+ int end = offset + length;
+ for ( int i = offset ; i < end ; ++i )
+ {
+ if ( header[i] == 0 )
+ break;
+
+ if ( header[i] == (byte) ' ' || header[i] == '0' )
+ {
+ if ( stillPadding )
+ continue;
+
+ if ( header[i] == (byte) ' ' )
+ break;
+ }
+
+ stillPadding = false;
+
+ result =
+ (result << 3)
+ + (header[i] - '0');
+ }
+
+ return result;
+ }
+
+ /**
+ * Parse an entry name from a header buffer.
+ *
+ * @param header The header buffer from which to parse.
+ * @param offset The offset into the buffer from which to parse.
+ * @param length The number of header bytes to parse.
+ * @return The header's entry name.
+ */
+ public static StringBuffer
+ parseName( byte[] header, int offset, int length )
+ throws InvalidHeaderException
+ {
+ StringBuffer result = new StringBuffer( length );
+
+ int end = offset + length;
+ for ( int i = offset ; i < end ; ++i )
+ {
+ if ( header[i] == 0 )
+ break;
+ result.append( (char)header[i] );
+ }
+
+ return result;
+ }
+
+ /**
+ * Determine the number of bytes in an entry name.
+ *
+ * @param header The header buffer from which to parse.
+ * @param offset The offset into the buffer from which to parse.
+ * @param length The number of header bytes to parse.
+ * @return The number of bytes in a header's entry name.
+ */
+ public static int
+ getNameBytes( StringBuffer name, byte[] buf, int offset, int length )
+ {
+ int i;
+
+ for ( i = 0 ; i < length && i < name.length() ; ++i )
+ {
+ buf[ offset + i ] = (byte) name.charAt( i );
+ }
+
+ for ( ; i < length ; ++i )
+ {
+ buf[ offset + i ] = 0;
+ }
+
+ return offset + length;
+ }
+
+ /**
+ * Parse an octal integer from a header buffer.
+ *
+ * @param header The header buffer from which to parse.
+ * @param offset The offset into the buffer from which to parse.
+ * @param length The number of header bytes to parse.
+ * @return The integer value of the octal bytes.
+ */
+ public static int
+ getOctalBytes( long value, byte[] buf, int offset, int length )
+ {
+ byte[] result = new byte[ length ];
+
+ int idx = length - 1;
+
+ buf[ offset + idx ] = 0;
+ --idx;
+ buf[ offset + idx ] = (byte) ' ';
+ --idx;
+
+ if ( value == 0 )
+ {
+ buf[ offset + idx ] = (byte) '0';
+ --idx;
+ }
+ else
+ {
+ for ( long val = value ; idx >= 0 && val > 0 ; --idx )
+ {
+ buf[ offset + idx ] = (byte)
+ ( (byte) '0' + (byte) (val & 7) );
+ val = val >> 3;
+ }
+ }
+
+ for ( ; idx >= 0 ; --idx )
+ {
+ buf[ offset + idx ] = (byte) ' ';
+ }
+
+ return offset + length;
+ }
+
+ /**
+ * Parse an octal long integer from a header buffer.
+ *
+ * @param header The header buffer from which to parse.
+ * @param offset The offset into the buffer from which to parse.
+ * @param length The number of header bytes to parse.
+ * @return The long value of the octal bytes.
+ */
+ public static int
+ getLongOctalBytes( long value, byte[] buf, int offset, int length )
+ {
+ byte[] temp = new byte[ length + 1 ];
+ TarHeader.getOctalBytes( value, temp, 0, length + 1 );
+ System.arraycopy( temp, 0, buf, offset, length );
+ return offset + length;
+ }
+
+ /**
+ * Parse the checksum octal integer from a header buffer.
+ *
+ * @param header The header buffer from which to parse.
+ * @param offset The offset into the buffer from which to parse.
+ * @param length The number of header bytes to parse.
+ * @return The integer value of the entry's checksum.
+ */
+ public static int
+ getCheckSumOctalBytes( long value, byte[] buf, int offset, int length )
+ {
+ TarHeader.getOctalBytes( value, buf, offset, length );
+ buf[ offset + length - 1 ] = (byte) ' ';
+ buf[ offset + length - 2 ] = 0;
+ return offset + length;
+ }
+
+ }
+
diff --git a/jEdit/installer/TarInputStream.java b/jEdit/installer/TarInputStream.java
index 495381f..8b9ecbc 100644
--- a/jEdit/installer/TarInputStream.java
+++ b/jEdit/installer/TarInputStream.java
@@ -1,519 +1,519 @@
-/*
-** Authored by Timothy Gerard Endres
-** <mailto:time at gjt.org> <http://www.trustice.com>
-**
-** This work has been placed into the public domain.
-** You may use this work in any way and for any purpose you wish.
-**
-** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
-** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
-** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
-** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
-** REDISTRIBUTION OF THIS SOFTWARE.
-**
-*/
-
-package installer;
-
-import java.io.*;
-
-
-/**
- * The TarInputStream reads a UNIX tar archive as an InputStream.
- * methods are provided to position at each successive entry in
- * the archive, and the read each entry as a normal input stream
- * using read().
- *
- * @version $Revision: 12504 $
- * @author Timothy Gerard Endres,
- * <a href="mailto:time at gjt.org">time at trustice.com</a>.
- * @see TarBuffer
- * @see TarHeader
- * @see TarEntry
- */
-
-
-public
-class TarInputStream
-extends FilterInputStream
- {
- protected boolean debug;
- protected boolean hasHitEOF;
-
- protected int entrySize;
- protected int entryOffset;
-
- protected byte[] oneBuf;
- protected byte[] readBuf;
-
- protected TarBuffer buffer;
-
- protected TarEntry currEntry;
-
- protected EntryFactory eFactory;
-
-
- public
- TarInputStream( InputStream is )
- {
- this( is, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE );
- }
-
- public
- TarInputStream( InputStream is, int blockSize )
- {
- this( is, blockSize, TarBuffer.DEFAULT_RCDSIZE );
- }
-
- public
- TarInputStream( InputStream is, int blockSize, int recordSize )
- {
- super( is );
-
- this.buffer = new TarBuffer( is, blockSize, recordSize );
-
- this.readBuf = null;
- this.oneBuf = new byte[1];
- this.debug = false;
- this.hasHitEOF = false;
- this.eFactory = null;
- }
-
- /**
- * Sets the debugging flag.
- *
- * @param debugF True to turn on debugging.
- */
- public void
- setDebug( boolean debugF )
- {
- this.debug = debugF;
- }
-
- /**
- * Sets the debugging flag.
- *
- * @param debugF True to turn on debugging.
- */
- public void
- setEntryFactory( EntryFactory factory )
- {
- this.eFactory = factory;
- }
-
- /**
- * Sets the debugging flag in this stream's TarBuffer.
- *
- * @param debugF True to turn on debugging.
- */
- public void
- setBufferDebug( boolean debug )
- {
- this.buffer.setDebug( debug );
- }
-
- /**
- * Closes this stream. Calls the TarBuffer's close() method.
- */
- public void
- close()
- throws IOException
- {
- this.buffer.close();
- }
-
- /**
- * Get the record size being used by this stream's TarBuffer.
- *
- * @return The TarBuffer record size.
- */
- public int
- getRecordSize()
- {
- return this.buffer.getRecordSize();
- }
-
- /**
- * Get the available data that can be read from the current
- * entry in the archive. This does not indicate how much data
- * is left in the entire archive, only in the current entry.
- * This value is determined from the entry's size header field
- * and the amount of data already read from the current entry.
- *
- *
- * @return The number of available bytes for the current entry.
- */
- public int
- available()
- throws IOException
- {
- return this.entrySize - this.entryOffset;
- }
-
- /**
- * Skip bytes in the input buffer. This skips bytes in the
- * current entry's data, not the entire archive, and will
- * stop at the end of the current entry's data if the number
- * to skip extends beyond that point.
- *
- * @param numToSkip The number of bytes to skip.
- */
- public void
- skip( int numToSkip )
- throws IOException
- {
- // REVIEW
- // This is horribly inefficient, but it ensures that we
- // properly skip over bytes via the TarBuffer...
- //
-
- byte[] skipBuf = new byte[ 8 * 1024 ];
-
- for ( int num = numToSkip ; num > 0 ; )
- {
- int numRead =
- this.read( skipBuf, 0,
- ( num > skipBuf.length ? skipBuf.length : num ) );
-
- if ( numRead == -1 )
- break;
-
- num -= numRead;
- }
- }
-
- /**
- * Since we do not support marking just yet, we return false.
- *
- * @return False.
- */
- public boolean
- markSupported()
- {
- return false;
- }
-
- /**
- * Since we do not support marking just yet, we do nothing.
- *
- * @param markLimit The limit to mark.
- */
- public void
- mark( int markLimit )
- {
- }
-
- /**
- * Since we do not support marking just yet, we do nothing.
- */
- public void
- reset()
- {
- }
-
- /**
- * Get the next entry in this tar archive. This will skip
- * over any remaining data in the current entry, if there
- * is one, and place the input stream at the header of the
- * next entry, and read the header and instantiate a new
- * TarEntry from the header bytes and return that entry.
- * If there are no more entries in the archive, null will
- * be returned to indicate that the end of the archive has
- * been reached.
- *
- * @return The next TarEntry in the archive, or null.
- */
- public TarEntry
- getNextEntry()
- throws IOException
- {
- if ( this.hasHitEOF )
- return null;
-
- if ( this.currEntry != null )
- {
- int numToSkip = this.entrySize - this.entryOffset;
-
- if ( this.debug )
- System.err.println
- ( "TarInputStream: SKIP currENTRY '"
- + this.currEntry.getName() + "' SZ "
- + this.entrySize + " OFF " + this.entryOffset
- + " skipping " + numToSkip + " bytes" );
-
- if ( numToSkip > 0 )
- {
- this.skip( numToSkip );
- }
-
- this.readBuf = null;
- }
-
- byte[] headerBuf = this.buffer.readRecord();
-
- if ( headerBuf == null )
- {
- if ( this.debug )
- {
- System.err.println( "READ NULL RECORD" );
- }
-
- this.hasHitEOF = true;
- }
- else if ( this.buffer.isEOFRecord( headerBuf ) )
- {
- if ( this.debug )
- {
- System.err.println( "READ EOF RECORD" );
- }
-
- this.hasHitEOF = true;
- }
-
- if ( this.hasHitEOF )
- {
- this.currEntry = null;
- }
- else
- {
- try {
- if ( this.eFactory == null )
- {
- this.currEntry = new TarEntry( headerBuf );
- }
- else
- {
- this.currEntry =
- this.eFactory.createEntry( headerBuf );
- }
-
- if ( ! ( headerBuf[257] == 'u' && headerBuf[258] == 's'
- && headerBuf[259] == 't' && headerBuf[260] == 'a'
- && headerBuf[261] == 'r' ) )
- {
- throw new InvalidHeaderException
- ( "header magic is not 'ustar', but '"
- + headerBuf[257] + headerBuf[258] + headerBuf[259]
- + headerBuf[260] + headerBuf[261] + "', or (dec) "
- + ((int)headerBuf[257]) + ", "
- + ((int)headerBuf[258]) + ", "
- + ((int)headerBuf[259]) + ", "
- + ((int)headerBuf[260]) + ", "
- + ((int)headerBuf[261]) );
- }
-
- if ( this.debug )
- System.err.println
- ( "TarInputStream: SET CURRENTRY '"
- + this.currEntry.getName()
- + "' size = " + this.currEntry.getSize() );
-
- this.entryOffset = 0;
- // REVIEW How do we resolve this discrepancy?!
- this.entrySize = (int) this.currEntry.getSize();
- }
- catch ( InvalidHeaderException ex )
- {
- this.entrySize = 0;
- this.entryOffset = 0;
- this.currEntry = null;
- throw new InvalidHeaderException
- ( "bad header in block "
- + this.buffer.getCurrentBlockNum()
- + " record "
- + this.buffer.getCurrentRecordNum()
- + ", " + ex.getMessage() );
- }
- }
-
- return this.currEntry;
- }
-
- /**
- * Reads a byte from the current tar archive entry.
- *
- * This method simply calls read( byte[], int, int ).
- *
- * @return The byte read, or -1 at EOF.
- */
- public int
- read()
- throws IOException
- {
- int num = this.read( this.oneBuf, 0, 1 );
- if ( num == -1 )
- return num;
- else
- return this.oneBuf[0];
- }
-
- /**
- * Reads bytes from the current tar archive entry.
- *
- * This method simply calls read( byte[], int, int ).
- *
- * @param buf The buffer into which to place bytes read.
- * @return The number of bytes read, or -1 at EOF.
- */
- public int
- read( byte[] buf )
- throws IOException
- {
- return this.read( buf, 0, buf.length );
- }
-
- /**
- * Reads bytes from the current tar archive entry.
- *
- * This method is aware of the boundaries of the current
- * entry in the archive and will deal with them as if they
- * were this stream's start and EOF.
- *
- * @param buf The buffer into which to place bytes read.
- * @param offset The offset at which to place bytes read.
- * @param numToRead The number of bytes to read.
- * @return The number of bytes read, or -1 at EOF.
- */
- public int
- read( byte[] buf, int offset, int numToRead )
- throws IOException
- {
- int totalRead = 0;
-
- if ( this.entryOffset >= this.entrySize )
- return -1;
-
- if ( (numToRead + this.entryOffset) > this.entrySize )
- {
- numToRead = (this.entrySize - this.entryOffset);
- }
-
- if ( this.readBuf != null )
- {
- int sz = ( numToRead > this.readBuf.length )
- ? this.readBuf.length : numToRead;
-
- System.arraycopy( this.readBuf, 0, buf, offset, sz );
-
- if ( sz >= this.readBuf.length )
- {
- this.readBuf = null;
- }
- else
- {
- int newLen = this.readBuf.length - sz;
- byte[] newBuf = new byte[ newLen ];
- System.arraycopy( this.readBuf, sz, newBuf, 0, newLen );
- this.readBuf = newBuf;
- }
-
- totalRead += sz;
- numToRead -= sz;
- offset += sz;
- }
-
- for ( ; numToRead > 0 ; )
- {
- byte[] rec = this.buffer.readRecord();
- if ( rec == null )
- {
- // Unexpected EOF!
- throw new IOException
- ( "unexpected EOF with " + numToRead + " bytes unread" );
- }
-
- int sz = numToRead;
- int recLen = rec.length;
-
- if ( recLen > sz )
- {
- System.arraycopy( rec, 0, buf, offset, sz );
- this.readBuf = new byte[ recLen - sz ];
- System.arraycopy( rec, sz, this.readBuf, 0, recLen - sz );
- }
- else
- {
- sz = recLen;
- System.arraycopy( rec, 0, buf, offset, recLen );
- }
-
- totalRead += sz;
- numToRead -= sz;
- offset += sz;
- }
-
- this.entryOffset += totalRead;
-
- return totalRead;
- }
-
- /**
- * Copies the contents of the current tar archive entry directly into
- * an output stream.
- *
- * @param out The OutputStream into which to write the entry's data.
- */
- public void
- copyEntryContents( OutputStream out )
- throws IOException
- {
- byte[] buf = new byte[ 32 * 1024 ];
-
- for ( ; ; )
- {
- int numRead = this.read( buf, 0, buf.length );
- if ( numRead == -1 )
- break;
- out.write( buf, 0, numRead );
- }
- }
-
- /**
- * This interface is provided, with the method setEntryFactory(), to allow
- * the programmer to have their own TarEntry subclass instantiated for the
- * entries return from getNextEntry().
- */
-
- public
- interface EntryFactory
- {
- public TarEntry
- createEntry( String name );
-
- public TarEntry
- createEntry( File path )
- throws InvalidHeaderException;
-
- public TarEntry
- createEntry( byte[] headerBuf )
- throws InvalidHeaderException;
- }
-
- public
- class EntryAdapter
- implements EntryFactory
- {
- public TarEntry
- createEntry( String name )
- {
- return new TarEntry( name );
- }
-
- public TarEntry
- createEntry( File path )
- throws InvalidHeaderException
- {
- return new TarEntry( path );
- }
-
- public TarEntry
- createEntry( byte[] headerBuf )
- throws InvalidHeaderException
- {
- return new TarEntry( headerBuf );
- }
- }
-
- }
-
-
+/*
+** Authored by Timothy Gerard Endres
+** <mailto:time at gjt.org> <http://www.trustice.com>
+**
+** This work has been placed into the public domain.
+** You may use this work in any way and for any purpose you wish.
+**
+** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
+** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
+** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
+** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
+** REDISTRIBUTION OF THIS SOFTWARE.
+**
+*/
+
+package installer;
+
+import java.io.*;
+
+
+/**
+ * The TarInputStream reads a UNIX tar archive as an InputStream.
+ * methods are provided to position at each successive entry in
+ * the archive, and the read each entry as a normal input stream
+ * using read().
+ *
+ * @version $Revision: 12504 $
+ * @author Timothy Gerard Endres,
+ * <a href="mailto:time at gjt.org">time at trustice.com</a>.
+ * @see TarBuffer
+ * @see TarHeader
+ * @see TarEntry
+ */
+
+
+public
+class TarInputStream
+extends FilterInputStream
+ {
+ protected boolean debug;
+ protected boolean hasHitEOF;
+
+ protected int entrySize;
+ protected int entryOffset;
+
+ protected byte[] oneBuf;
+ protected byte[] readBuf;
+
+ protected TarBuffer buffer;
+
+ protected TarEntry currEntry;
+
+ protected EntryFactory eFactory;
+
+
+ public
+ TarInputStream( InputStream is )
+ {
+ this( is, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE );
+ }
+
+ public
+ TarInputStream( InputStream is, int blockSize )
+ {
+ this( is, blockSize, TarBuffer.DEFAULT_RCDSIZE );
+ }
+
+ public
+ TarInputStream( InputStream is, int blockSize, int recordSize )
+ {
+ super( is );
+
+ this.buffer = new TarBuffer( is, blockSize, recordSize );
+
+ this.readBuf = null;
+ this.oneBuf = new byte[1];
+ this.debug = false;
+ this.hasHitEOF = false;
+ this.eFactory = null;
+ }
+
+ /**
+ * Sets the debugging flag.
+ *
+ * @param debugF True to turn on debugging.
+ */
+ public void
+ setDebug( boolean debugF )
+ {
+ this.debug = debugF;
+ }
+
+ /**
+ * Sets the debugging flag.
+ *
+ * @param debugF True to turn on debugging.
+ */
+ public void
+ setEntryFactory( EntryFactory factory )
+ {
+ this.eFactory = factory;
+ }
+
+ /**
+ * Sets the debugging flag in this stream's TarBuffer.
+ *
+ * @param debugF True to turn on debugging.
+ */
+ public void
+ setBufferDebug( boolean debug )
+ {
+ this.buffer.setDebug( debug );
+ }
+
+ /**
+ * Closes this stream. Calls the TarBuffer's close() method.
+ */
+ public void
+ close()
+ throws IOException
+ {
+ this.buffer.close();
+ }
+
+ /**
+ * Get the record size being used by this stream's TarBuffer.
+ *
+ * @return The TarBuffer record size.
+ */
+ public int
+ getRecordSize()
+ {
+ return this.buffer.getRecordSize();
+ }
+
+ /**
+ * Get the available data that can be read from the current
+ * entry in the archive. This does not indicate how much data
+ * is left in the entire archive, only in the current entry.
+ * This value is determined from the entry's size header field
+ * and the amount of data already read from the current entry.
+ *
+ *
+ * @return The number of available bytes for the current entry.
+ */
+ public int
+ available()
+ throws IOException
+ {
+ return this.entrySize - this.entryOffset;
+ }
+
+ /**
+ * Skip bytes in the input buffer. This skips bytes in the
+ * current entry's data, not the entire archive, and will
+ * stop at the end of the current entry's data if the number
+ * to skip extends beyond that point.
+ *
+ * @param numToSkip The number of bytes to skip.
+ */
+ public void
+ skip( int numToSkip )
+ throws IOException
+ {
+ // REVIEW
+ // This is horribly inefficient, but it ensures that we
+ // properly skip over bytes via the TarBuffer...
+ //
+
+ byte[] skipBuf = new byte[ 8 * 1024 ];
+
+ for ( int num = numToSkip ; num > 0 ; )
+ {
+ int numRead =
+ this.read( skipBuf, 0,
+ ( num > skipBuf.length ? skipBuf.length : num ) );
+
+ if ( numRead == -1 )
+ break;
+
+ num -= numRead;
+ }
+ }
+
+ /**
+ * Since we do not support marking just yet, we return false.
+ *
+ * @return False.
+ */
+ public boolean
+ markSupported()
+ {
+ return false;
+ }
+
+ /**
+ * Since we do not support marking just yet, we do nothing.
+ *
+ * @param markLimit The limit to mark.
+ */
+ public void
+ mark( int markLimit )
+ {
+ }
+
+ /**
+ * Since we do not support marking just yet, we do nothing.
+ */
+ public void
+ reset()
+ {
+ }
+
+ /**
+ * Get the next entry in this tar archive. This will skip
+ * over any remaining data in the current entry, if there
+ * is one, and place the input stream at the header of the
+ * next entry, and read the header and instantiate a new
+ * TarEntry from the header bytes and return that entry.
+ * If there are no more entries in the archive, null will
+ * be returned to indicate that the end of the archive has
+ * been reached.
+ *
+ * @return The next TarEntry in the archive, or null.
+ */
+ public TarEntry
+ getNextEntry()
+ throws IOException
+ {
+ if ( this.hasHitEOF )
+ return null;
+
+ if ( this.currEntry != null )
+ {
+ int numToSkip = this.entrySize - this.entryOffset;
+
+ if ( this.debug )
+ System.err.println
+ ( "TarInputStream: SKIP currENTRY '"
+ + this.currEntry.getName() + "' SZ "
+ + this.entrySize + " OFF " + this.entryOffset
+ + " skipping " + numToSkip + " bytes" );
+
+ if ( numToSkip > 0 )
+ {
+ this.skip( numToSkip );
+ }
+
+ this.readBuf = null;
+ }
+
+ byte[] headerBuf = this.buffer.readRecord();
+
+ if ( headerBuf == null )
+ {
+ if ( this.debug )
+ {
+ System.err.println( "READ NULL RECORD" );
+ }
+
+ this.hasHitEOF = true;
+ }
+ else if ( this.buffer.isEOFRecord( headerBuf ) )
+ {
+ if ( this.debug )
+ {
+ System.err.println( "READ EOF RECORD" );
+ }
+
+ this.hasHitEOF = true;
+ }
+
+ if ( this.hasHitEOF )
+ {
+ this.currEntry = null;
+ }
+ else
+ {
+ try {
+ if ( this.eFactory == null )
+ {
+ this.currEntry = new TarEntry( headerBuf );
+ }
+ else
+ {
+ this.currEntry =
+ this.eFactory.createEntry( headerBuf );
+ }
+
+ if ( ! ( headerBuf[257] == 'u' && headerBuf[258] == 's'
+ && headerBuf[259] == 't' && headerBuf[260] == 'a'
+ && headerBuf[261] == 'r' ) )
+ {
+ throw new InvalidHeaderException
+ ( "header magic is not 'ustar', but '"
+ + headerBuf[257] + headerBuf[258] + headerBuf[259]
+ + headerBuf[260] + headerBuf[261] + "', or (dec) "
+ + ((int)headerBuf[257]) + ", "
+ + ((int)headerBuf[258]) + ", "
+ + ((int)headerBuf[259]) + ", "
+ + ((int)headerBuf[260]) + ", "
+ + ((int)headerBuf[261]) );
+ }
+
+ if ( this.debug )
+ System.err.println
+ ( "TarInputStream: SET CURRENTRY '"
+ + this.currEntry.getName()
+ + "' size = " + this.currEntry.getSize() );
+
+ this.entryOffset = 0;
+ // REVIEW How do we resolve this discrepancy?!
+ this.entrySize = (int) this.currEntry.getSize();
+ }
+ catch ( InvalidHeaderException ex )
+ {
+ this.entrySize = 0;
+ this.entryOffset = 0;
+ this.currEntry = null;
+ throw new InvalidHeaderException
+ ( "bad header in block "
+ + this.buffer.getCurrentBlockNum()
+ + " record "
+ + this.buffer.getCurrentRecordNum()
+ + ", " + ex.getMessage() );
+ }
+ }
+
+ return this.currEntry;
+ }
+
+ /**
+ * Reads a byte from the current tar archive entry.
+ *
+ * This method simply calls read( byte[], int, int ).
+ *
+ * @return The byte read, or -1 at EOF.
+ */
+ public int
+ read()
+ throws IOException
+ {
+ int num = this.read( this.oneBuf, 0, 1 );
+ if ( num == -1 )
+ return num;
+ else
+ return this.oneBuf[0];
+ }
+
+ /**
+ * Reads bytes from the current tar archive entry.
+ *
+ * This method simply calls read( byte[], int, int ).
+ *
+ * @param buf The buffer into which to place bytes read.
+ * @return The number of bytes read, or -1 at EOF.
+ */
+ public int
+ read( byte[] buf )
+ throws IOException
+ {
+ return this.read( buf, 0, buf.length );
+ }
+
+ /**
+ * Reads bytes from the current tar archive entry.
+ *
+ * This method is aware of the boundaries of the current
+ * entry in the archive and will deal with them as if they
+ * were this stream's start and EOF.
+ *
+ * @param buf The buffer into which to place bytes read.
+ * @param offset The offset at which to place bytes read.
+ * @param numToRead The number of bytes to read.
+ * @return The number of bytes read, or -1 at EOF.
+ */
+ public int
+ read( byte[] buf, int offset, int numToRead )
+ throws IOException
+ {
+ int totalRead = 0;
+
+ if ( this.entryOffset >= this.entrySize )
+ return -1;
+
+ if ( (numToRead + this.entryOffset) > this.entrySize )
+ {
+ numToRead = (this.entrySize - this.entryOffset);
+ }
+
+ if ( this.readBuf != null )
+ {
+ int sz = ( numToRead > this.readBuf.length )
+ ? this.readBuf.length : numToRead;
+
+ System.arraycopy( this.readBuf, 0, buf, offset, sz );
+
+ if ( sz >= this.readBuf.length )
+ {
+ this.readBuf = null;
+ }
+ else
+ {
+ int newLen = this.readBuf.length - sz;
+ byte[] newBuf = new byte[ newLen ];
+ System.arraycopy( this.readBuf, sz, newBuf, 0, newLen );
+ this.readBuf = newBuf;
+ }
+
+ totalRead += sz;
+ numToRead -= sz;
+ offset += sz;
+ }
+
+ for ( ; numToRead > 0 ; )
+ {
+ byte[] rec = this.buffer.readRecord();
+ if ( rec == null )
+ {
+ // Unexpected EOF!
+ throw new IOException
+ ( "unexpected EOF with " + numToRead + " bytes unread" );
+ }
+
+ int sz = numToRead;
+ int recLen = rec.length;
+
+ if ( recLen > sz )
+ {
+ System.arraycopy( rec, 0, buf, offset, sz );
+ this.readBuf = new byte[ recLen - sz ];
+ System.arraycopy( rec, sz, this.readBuf, 0, recLen - sz );
+ }
+ else
+ {
+ sz = recLen;
+ System.arraycopy( rec, 0, buf, offset, recLen );
+ }
+
+ totalRead += sz;
+ numToRead -= sz;
+ offset += sz;
+ }
+
+ this.entryOffset += totalRead;
+
+ return totalRead;
+ }
+
+ /**
+ * Copies the contents of the current tar archive entry directly into
+ * an output stream.
+ *
+ * @param out The OutputStream into which to write the entry's data.
+ */
+ public void
+ copyEntryContents( OutputStream out )
+ throws IOException
+ {
+ byte[] buf = new byte[ 32 * 1024 ];
+
+ for ( ; ; )
+ {
+ int numRead = this.read( buf, 0, buf.length );
+ if ( numRead == -1 )
+ break;
+ out.write( buf, 0, numRead );
+ }
+ }
+
+ /**
+ * This interface is provided, with the method setEntryFactory(), to allow
+ * the programmer to have their own TarEntry subclass instantiated for the
+ * entries return from getNextEntry().
+ */
+
+ public
+ interface EntryFactory
+ {
+ public TarEntry
+ createEntry( String name );
+
+ public TarEntry
+ createEntry( File path )
+ throws InvalidHeaderException;
+
+ public TarEntry
+ createEntry( byte[] headerBuf )
+ throws InvalidHeaderException;
+ }
+
+ public
+ class EntryAdapter
+ implements EntryFactory
+ {
+ public TarEntry
+ createEntry( String name )
+ {
+ return new TarEntry( name );
+ }
+
+ public TarEntry
+ createEntry( File path )
+ throws InvalidHeaderException
+ {
+ return new TarEntry( path );
+ }
+
+ public TarEntry
+ createEntry( byte[] headerBuf )
+ throws InvalidHeaderException
+ {
+ return new TarEntry( headerBuf );
+ }
+ }
+
+ }
+
+
diff --git a/jEdit/installer/TarOutputStream.java b/jEdit/installer/TarOutputStream.java
index f5691a7..14de717 100644
--- a/jEdit/installer/TarOutputStream.java
+++ b/jEdit/installer/TarOutputStream.java
@@ -1,330 +1,330 @@
-/*
-** Authored by Timothy Gerard Endres
-** <mailto:time at gjt.org> <http://www.trustice.com>
-**
-** This work has been placed into the public domain.
-** You may use this work in any way and for any purpose you wish.
-**
-** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
-** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
-** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
-** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
-** REDISTRIBUTION OF THIS SOFTWARE.
-**
-*/
-
-package installer;
-
-import java.io.*;
-
-
-/**
- * The TarOutputStream writes a UNIX tar archive as an OutputStream.
- * Methods are provided to put entries, and then write their contents
- * by writing to this stream using write().
- *
- *
- * @version $Revision: 12504 $
- * @author Timothy Gerard Endres,
- * <a href="mailto:time at gjt.org">time at trustice.com</a>.
- * @see TarBuffer
- * @see TarHeader
- * @see TarEntry
- */
-
-
-public
-class TarOutputStream
-extends FilterOutputStream
- {
- protected boolean debug;
- protected int currSize;
- protected int currBytes;
- protected byte[] oneBuf;
- protected byte[] recordBuf;
- protected int assemLen;
- protected byte[] assemBuf;
- protected TarBuffer buffer;
-
-
- public
- TarOutputStream( OutputStream os )
- {
- this( os, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE );
- }
-
- public
- TarOutputStream( OutputStream os, int blockSize )
- {
- this( os, blockSize, TarBuffer.DEFAULT_RCDSIZE );
- }
-
- public
- TarOutputStream( OutputStream os, int blockSize, int recordSize )
- {
- super( os );
-
- this.buffer = new TarBuffer( os, blockSize, recordSize );
-
- this.debug = false;
- this.assemLen = 0;
- this.assemBuf = new byte[ recordSize ];
- this.recordBuf = new byte[ recordSize ];
- this.oneBuf = new byte[1];
- }
-
- /**
- * Sets the debugging flag.
- *
- * @param debugF True to turn on debugging.
- */
- public void
- setDebug( boolean debugF )
- {
- this.debug = debugF;
- }
-
- /**
- * Sets the debugging flag in this stream's TarBuffer.
- *
- * @param debugF True to turn on debugging.
- */
- public void
- setBufferDebug( boolean debug )
- {
- this.buffer.setDebug( debug );
- }
-
- /**
- * Ends the TAR archive without closing the underlying OutputStream.
- * The result is that the EOF record of nulls is written.
- */
-
- public void
- finish()
- throws IOException
- {
- this.writeEOFRecord();
- }
-
- /**
- * Ends the TAR archive and closes the underlying OutputStream.
- * This means that finish() is called followed by calling the
- * TarBuffer's close().
- */
-
- public void
- close()
- throws IOException
- {
- this.finish();
- this.buffer.close();
- }
-
- /**
- * Get the record size being used by this stream's TarBuffer.
- *
- * @return The TarBuffer record size.
- */
- public int
- getRecordSize()
- {
- return this.buffer.getRecordSize();
- }
-
- /**
- * Put an entry on the output stream. This writes the entry's
- * header record and positions the output stream for writing
- * the contents of the entry. Once this method is called, the
- * stream is ready for calls to write() to write the entry's
- * contents. Once the contents are written, closeEntry()
- * <B>MUST</B> be called to ensure that all buffered data
- * is completely written to the output stream.
- *
- * @param entry The TarEntry to be written to the archive.
- */
- public void
- putNextEntry( TarEntry entry )
- throws IOException
- {
- if ( entry.getHeader().name.length() > TarHeader.NAMELEN )
- throw new InvalidHeaderException
- ( "file name '" + entry.getHeader().name
- + "' is too long ( > "
- + TarHeader.NAMELEN + " bytes )" );
-
- entry.writeEntryHeader( this.recordBuf );
- this.buffer.writeRecord( this.recordBuf );
-
- this.currBytes = 0;
-
- if ( entry.isDirectory() )
- this.currSize = 0;
- else
- this.currSize = (int)entry.getSize();
- }
-
- /**
- * Close an entry. This method MUST be called for all file
- * entries that contain data. The reason is that we must
- * buffer data written to the stream in order to satisfy
- * the buffer's record based writes. Thus, there may be
- * data fragments still being assembled that must be written
- * to the output stream before this entry is closed and the
- * next entry written.
- */
- public void
- closeEntry()
- throws IOException
- {
- if ( this.assemLen > 0 )
- {
- for ( int i = this.assemLen ; i < this.assemBuf.length ; ++i )
- this.assemBuf[i] = 0;
-
- this.buffer.writeRecord( this.assemBuf );
-
- this.currBytes += this.assemLen;
- this.assemLen = 0;
- }
-
- if ( this.currBytes < this.currSize )
- throw new IOException
- ( "entry closed at '" + this.currBytes
- + "' before the '" + this.currSize
- + "' bytes specified in the header were written" );
- }
-
- /**
- * Writes a byte to the current tar archive entry.
- *
- * This method simply calls read( byte[], int, int ).
- *
- * @param b The byte written.
- */
- public void
- write( int b )
- throws IOException
- {
- this.oneBuf[0] = (byte) b;
- this.write( this.oneBuf, 0, 1 );
- }
-
- /**
- * Writes bytes to the current tar archive entry.
- *
- * This method simply calls read( byte[], int, int ).
- *
- * @param wBuf The buffer to write to the archive.
- * @return The number of bytes read, or -1 at EOF.
- */
- public void
- write( byte[] wBuf )
- throws IOException
- {
- this.write( wBuf, 0, wBuf.length );
- }
-
- /**
- * Writes bytes to the current tar archive entry. This method
- * is aware of the current entry and will throw an exception if
- * you attempt to write bytes past the length specified for the
- * current entry. The method is also (painfully) aware of the
- * record buffering required by TarBuffer, and manages buffers
- * that are not a multiple of recordsize in length, including
- * assembling records from small buffers.
- *
- * This method simply calls read( byte[], int, int ).
- *
- * @param wBuf The buffer to write to the archive.
- * @param wOffset The offset in the buffer from which to get bytes.
- * @param numToWrite The number of bytes to write.
- */
- public void
- write( byte[] wBuf, int wOffset, int numToWrite )
- throws IOException
- {
- if ( (this.currBytes + numToWrite) > this.currSize )
- throw new IOException
- ( "request to write '" + numToWrite
- + "' bytes exceeds size in header of '"
- + this.currSize + "' bytes" );
-
- //
- // We have to deal with assembly!!!
- // The programmer can be writing little 32 byte chunks for all
- // we know, and we must assemble complete records for writing.
- // REVIEW Maybe this should be in TarBuffer? Could that help to
- // eliminate some of the buffer copying.
- //
- if ( this.assemLen > 0 )
- {
- if ( (this.assemLen + numToWrite ) >= this.recordBuf.length )
- {
- int aLen = this.recordBuf.length - this.assemLen;
-
- System.arraycopy
- ( this.assemBuf, 0, this.recordBuf, 0, this.assemLen );
-
- System.arraycopy
- ( wBuf, wOffset, this.recordBuf, this.assemLen, aLen );
-
- this.buffer.writeRecord( this.recordBuf );
-
- this.currBytes += this.recordBuf.length;
-
- wOffset += aLen;
- numToWrite -= aLen;
- this.assemLen = 0;
- }
- else // ( (this.assemLen + numToWrite ) < this.recordBuf.length )
- {
- System.arraycopy
- ( wBuf, wOffset, this.assemBuf,
- this.assemLen, numToWrite );
- wOffset += numToWrite;
- this.assemLen += numToWrite;
- numToWrite -= numToWrite;
- }
- }
-
- //
- // When we get here we have EITHER:
- // o An empty "assemble" buffer.
- // o No bytes to write (numToWrite == 0)
- //
-
- for ( ; numToWrite > 0 ; )
- {
- if ( numToWrite < this.recordBuf.length )
- {
- System.arraycopy
- ( wBuf, wOffset, this.assemBuf, this.assemLen, numToWrite );
- this.assemLen += numToWrite;
- break;
- }
-
- this.buffer.writeRecord( wBuf, wOffset );
-
- int num = this.recordBuf.length;
- this.currBytes += num;
- numToWrite -= num;
- wOffset += num;
- }
- }
-
- /**
- * Write an EOF (end of archive) record to the tar archive.
- * An EOF record consists of a record of all zeros.
- */
- private void
- writeEOFRecord()
- throws IOException
- {
- for ( int i = 0 ; i < this.recordBuf.length ; ++i )
- this.recordBuf[i] = 0;
- this.buffer.writeRecord( this.recordBuf );
- }
-
- }
-
+/*
+** Authored by Timothy Gerard Endres
+** <mailto:time at gjt.org> <http://www.trustice.com>
+**
+** This work has been placed into the public domain.
+** You may use this work in any way and for any purpose you wish.
+**
+** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
+** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
+** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
+** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
+** REDISTRIBUTION OF THIS SOFTWARE.
+**
+*/
+
+package installer;
+
+import java.io.*;
+
+
+/**
+ * The TarOutputStream writes a UNIX tar archive as an OutputStream.
+ * Methods are provided to put entries, and then write their contents
+ * by writing to this stream using write().
+ *
+ *
+ * @version $Revision: 12504 $
+ * @author Timothy Gerard Endres,
+ * <a href="mailto:time at gjt.org">time at trustice.com</a>.
+ * @see TarBuffer
+ * @see TarHeader
+ * @see TarEntry
+ */
+
+
+public
+class TarOutputStream
+extends FilterOutputStream
+ {
+ protected boolean debug;
+ protected int currSize;
+ protected int currBytes;
+ protected byte[] oneBuf;
+ protected byte[] recordBuf;
+ protected int assemLen;
+ protected byte[] assemBuf;
+ protected TarBuffer buffer;
+
+
+ public
+ TarOutputStream( OutputStream os )
+ {
+ this( os, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE );
+ }
+
+ public
+ TarOutputStream( OutputStream os, int blockSize )
+ {
+ this( os, blockSize, TarBuffer.DEFAULT_RCDSIZE );
+ }
+
+ public
+ TarOutputStream( OutputStream os, int blockSize, int recordSize )
+ {
+ super( os );
+
+ this.buffer = new TarBuffer( os, blockSize, recordSize );
+
+ this.debug = false;
+ this.assemLen = 0;
+ this.assemBuf = new byte[ recordSize ];
+ this.recordBuf = new byte[ recordSize ];
+ this.oneBuf = new byte[1];
+ }
+
+ /**
+ * Sets the debugging flag.
+ *
+ * @param debugF True to turn on debugging.
+ */
+ public void
+ setDebug( boolean debugF )
+ {
+ this.debug = debugF;
+ }
+
+ /**
+ * Sets the debugging flag in this stream's TarBuffer.
+ *
+ * @param debugF True to turn on debugging.
+ */
+ public void
+ setBufferDebug( boolean debug )
+ {
+ this.buffer.setDebug( debug );
+ }
+
+ /**
+ * Ends the TAR archive without closing the underlying OutputStream.
+ * The result is that the EOF record of nulls is written.
+ */
+
+ public void
+ finish()
+ throws IOException
+ {
+ this.writeEOFRecord();
+ }
+
+ /**
+ * Ends the TAR archive and closes the underlying OutputStream.
+ * This means that finish() is called followed by calling the
+ * TarBuffer's close().
+ */
+
+ public void
+ close()
+ throws IOException
+ {
+ this.finish();
+ this.buffer.close();
+ }
+
+ /**
+ * Get the record size being used by this stream's TarBuffer.
+ *
+ * @return The TarBuffer record size.
+ */
+ public int
+ getRecordSize()
+ {
+ return this.buffer.getRecordSize();
+ }
+
+ /**
+ * Put an entry on the output stream. This writes the entry's
+ * header record and positions the output stream for writing
+ * the contents of the entry. Once this method is called, the
+ * stream is ready for calls to write() to write the entry's
+ * contents. Once the contents are written, closeEntry()
+ * <B>MUST</B> be called to ensure that all buffered data
+ * is completely written to the output stream.
+ *
+ * @param entry The TarEntry to be written to the archive.
+ */
+ public void
+ putNextEntry( TarEntry entry )
+ throws IOException
+ {
+ if ( entry.getHeader().name.length() > TarHeader.NAMELEN )
+ throw new InvalidHeaderException
+ ( "file name '" + entry.getHeader().name
+ + "' is too long ( > "
+ + TarHeader.NAMELEN + " bytes )" );
+
+ entry.writeEntryHeader( this.recordBuf );
+ this.buffer.writeRecord( this.recordBuf );
+
+ this.currBytes = 0;
+
+ if ( entry.isDirectory() )
+ this.currSize = 0;
+ else
+ this.currSize = (int)entry.getSize();
+ }
+
+ /**
+ * Close an entry. This method MUST be called for all file
+ * entries that contain data. The reason is that we must
+ * buffer data written to the stream in order to satisfy
+ * the buffer's record based writes. Thus, there may be
+ * data fragments still being assembled that must be written
+ * to the output stream before this entry is closed and the
+ * next entry written.
+ */
+ public void
+ closeEntry()
+ throws IOException
+ {
+ if ( this.assemLen > 0 )
+ {
+ for ( int i = this.assemLen ; i < this.assemBuf.length ; ++i )
+ this.assemBuf[i] = 0;
+
+ this.buffer.writeRecord( this.assemBuf );
+
+ this.currBytes += this.assemLen;
+ this.assemLen = 0;
+ }
+
+ if ( this.currBytes < this.currSize )
+ throw new IOException
+ ( "entry closed at '" + this.currBytes
+ + "' before the '" + this.currSize
+ + "' bytes specified in the header were written" );
+ }
+
+ /**
+ * Writes a byte to the current tar archive entry.
+ *
+ * This method simply calls read( byte[], int, int ).
+ *
+ * @param b The byte written.
+ */
+ public void
+ write( int b )
+ throws IOException
+ {
+ this.oneBuf[0] = (byte) b;
+ this.write( this.oneBuf, 0, 1 );
+ }
+
+ /**
+ * Writes bytes to the current tar archive entry.
+ *
+ * This method simply calls read( byte[], int, int ).
+ *
+ * @param wBuf The buffer to write to the archive.
+ * @return The number of bytes read, or -1 at EOF.
+ */
+ public void
+ write( byte[] wBuf )
+ throws IOException
+ {
+ this.write( wBuf, 0, wBuf.length );
+ }
+
+ /**
+ * Writes bytes to the current tar archive entry. This method
+ * is aware of the current entry and will throw an exception if
+ * you attempt to write bytes past the length specified for the
+ * current entry. The method is also (painfully) aware of the
+ * record buffering required by TarBuffer, and manages buffers
+ * that are not a multiple of recordsize in length, including
+ * assembling records from small buffers.
+ *
+ * This method simply calls read( byte[], int, int ).
+ *
+ * @param wBuf The buffer to write to the archive.
+ * @param wOffset The offset in the buffer from which to get bytes.
+ * @param numToWrite The number of bytes to write.
+ */
+ public void
+ write( byte[] wBuf, int wOffset, int numToWrite )
+ throws IOException
+ {
+ if ( (this.currBytes + numToWrite) > this.currSize )
+ throw new IOException
+ ( "request to write '" + numToWrite
+ + "' bytes exceeds size in header of '"
+ + this.currSize + "' bytes" );
+
+ //
+ // We have to deal with assembly!!!
+ // The programmer can be writing little 32 byte chunks for all
+ // we know, and we must assemble complete records for writing.
+ // REVIEW Maybe this should be in TarBuffer? Could that help to
+ // eliminate some of the buffer copying.
+ //
+ if ( this.assemLen > 0 )
+ {
+ if ( (this.assemLen + numToWrite ) >= this.recordBuf.length )
+ {
+ int aLen = this.recordBuf.length - this.assemLen;
+
+ System.arraycopy
+ ( this.assemBuf, 0, this.recordBuf, 0, this.assemLen );
+
+ System.arraycopy
+ ( wBuf, wOffset, this.recordBuf, this.assemLen, aLen );
+
+ this.buffer.writeRecord( this.recordBuf );
+
+ this.currBytes += this.recordBuf.length;
+
+ wOffset += aLen;
+ numToWrite -= aLen;
+ this.assemLen = 0;
+ }
+ else // ( (this.assemLen + numToWrite ) < this.recordBuf.length )
+ {
+ System.arraycopy
+ ( wBuf, wOffset, this.assemBuf,
+ this.assemLen, numToWrite );
+ wOffset += numToWrite;
+ this.assemLen += numToWrite;
+ numToWrite -= numToWrite;
+ }
+ }
+
+ //
+ // When we get here we have EITHER:
+ // o An empty "assemble" buffer.
+ // o No bytes to write (numToWrite == 0)
+ //
+
+ for ( ; numToWrite > 0 ; )
+ {
+ if ( numToWrite < this.recordBuf.length )
+ {
+ System.arraycopy
+ ( wBuf, wOffset, this.assemBuf, this.assemLen, numToWrite );
+ this.assemLen += numToWrite;
+ break;
+ }
+
+ this.buffer.writeRecord( wBuf, wOffset );
+
+ int num = this.recordBuf.length;
+ this.currBytes += num;
+ numToWrite -= num;
+ wOffset += num;
+ }
+ }
+
+ /**
+ * Write an EOF (end of archive) record to the tar archive.
+ * An EOF record consists of a record of all zeros.
+ */
+ private void
+ writeEOFRecord()
+ throws IOException
+ {
+ for ( int i = 0 ; i < this.recordBuf.length ; ++i )
+ this.recordBuf[i] = 0;
+ this.buffer.writeRecord( this.recordBuf );
+ }
+
+ }
+
diff --git a/jEdit/installer/VariableGridLayout.java b/jEdit/installer/VariableGridLayout.java
deleted file mode 100644
index aa841d3..0000000
--- a/jEdit/installer/VariableGridLayout.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * VariableGridLayout.java - a grid layout manager with variable cell sizes
- *
- * Originally written by Dirk Moebius for the jEdit project. This work has been
- * placed into the public domain. You may use this work in any way and for any
- * purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package installer;
-
-
-import java.awt.*;
-
-// This is copied from jEdit's org.gjt.sp.jedit.gui package.
-
-/**
- * The <code>VariableGridLayout</code> class is a layout manager
- * that lays out a container's components in a rectangular grid
- * with variable cell sizes.<p>
- *
- * The container is divided into rectangles, and one component is placed
- * in each rectangle. Each row is as large as the largest component in
- * that row, and each column is as wide as the widest component in
- * that column.<p>
- *
- * This behavior is basically the same as in
- * <code>java.awt.GridLayout</code>, but with different row heights and
- * column widths for each row/column.<p>
- *
- * For example, the following is an applet that lays out six buttons
- * into three rows and two columns:<p>
- *
- * <blockquote><pre>
- * import java.awt.*;
- * import java.applet.Applet;
- * public class ButtonGrid extends Applet {
- * public void init() {
- * setLayout(new VariableGridLayout(VariableGridLayout.FIXED_NUM_COLUMNS, 2));
- * add(new Button("1"));
- * add(new Button("2"));
- * add(new Button("3"));
- * add(new Button("4"));
- * add(new Button("5"));
- * add(new Button("6"));
- * }
- * }
- * </pre></blockquote><p>
- *
- * <b>Programmer's remark:</b> VariableGridLayout could be faster, if it would
- * reside in the package java.awt, because then it could access some
- * package private fields of <code>Container</code> or
- * <code>Component</code>. Instead, it has to call
- * <code>Component.getSize()</code>,
- * which allocates memory on the heap.<p>
- *
- * <b>Todo:</b>
- * <ul>
- * <li>Use alignmentX/Y property if the grid cell is larger than the preferred size of the component.
- * <li>Ability to span components over more than one cell horizontally
- * </ul>
- *
- * @author Dirk Moebius
- * @version 1.0
- * @see java.awt.GridLayout
- */
-public class VariableGridLayout implements LayoutManager2, java.io.Serializable
-{
-
- public static final int FIXED_NUM_ROWS = 1;
- public static final int FIXED_NUM_COLUMNS = 2;
-
-
- public VariableGridLayout(int mode, int size, int hgap, int vgap) {
- if (mode != FIXED_NUM_ROWS && mode != FIXED_NUM_COLUMNS) {
- throw new IllegalArgumentException("illegal mode; value is " + mode);
- }
- if (size <= 0) {
- throw new IllegalArgumentException("size cannot be zero or less; value is " + size);
- }
- if (hgap < 0) {
- throw new IllegalArgumentException("hgap cannot be negative; value is " + hgap);
- }
- if (vgap < 0) {
- throw new IllegalArgumentException("vgap cannot be negative; value is " + vgap);
- }
- this.mode = mode;
- this.size = size;
- this.hgap = hgap;
- this.vgap = vgap;
- }
-
-
- /**
- * Creates a variable grid layout manager with the specified mode
- * and zero horizontal and vertical gap.
- */
- public VariableGridLayout(int mode, int size) {
- this(mode, size, 0, 0);
- }
-
-
- /**
- * Creates a variable grid layout manager with mode FIXED_NUM_ROWS,
- * number of rows == 1 and zero horizontal and vertical gap.
- */
- public VariableGridLayout() {
- this(FIXED_NUM_ROWS, 1, 0, 0);
- }
-
-
- /**
- * Not used in this class.
- */
- public void addLayoutComponent(String name, Component component) { }
-
-
- /**
- * Not used in this class.
- */
- public void addLayoutComponent(Component component, Object constraints) { }
-
-
- /**
- * Not used in this class.
- */
- public void removeLayoutComponent(Component component) { }
-
-
- /**
- * Always returns 0.5.
- */
- public float getLayoutAlignmentX(Container container) {
- return 0.5f;
- }
-
-
- /**
- * Always returns 0.5.
- */
- public float getLayoutAlignmentY(Container container) {
- return 0.5f;
- }
-
-
- public Dimension preferredLayoutSize(Container parent) {
- return getLayoutSize(parent, 2);
- }
-
-
- public Dimension minimumLayoutSize(Container parent) {
- return getLayoutSize(parent, 0);
- }
-
-
- public Dimension maximumLayoutSize(Container parent) {
- return getLayoutSize(parent, 1);
- }
-
-
- public void layoutContainer(Container parent) {
- synchronized (parent.getTreeLock()) {
- update(parent);
-
- int ncomponents = parent.getComponentCount();
-
- if (ncomponents == 0) {
- return;
- }
-
- // Pass 1: compute preferred row heights / column widths
- int total_height = 0;
- for (int r = 0, i = 0; r < nrows; r++) {
- for (int c = 0; c < ncols; c++, i++) {
- if (i < ncomponents) {
- Dimension d = parent.getComponent(i).getPreferredSize();
- row_heights[r] = Math.max(row_heights[r], d.height);
- col_widths[c] = Math.max(col_widths[c], d.width);
- } else {
- break;
- }
- }
- total_height += row_heights[r];
- }
-
- int total_width = 0;
- for (int c = 0; c < ncols; c++) {
- total_width += col_widths[c];
- }
-
- // Pass 2: redistribute free space
- Dimension parent_size = parent.getSize();
- Insets insets = parent.getInsets();
- int free_height = parent_size.height - insets.top - insets.bottom - (nrows - 1) * vgap;
- int free_width = parent_size.width - insets.left - insets.right - (ncols - 1) * hgap;
-
- if (total_height != free_height) {
- double dy = (double)free_height / (double)total_height;
- for (int r = 0; r < nrows; r++) {
- row_heights[r] = (int) ((double)row_heights[r] * dy);
- }
- }
-
- if (total_width != free_width) {
- double dx = ((double)free_width) / ((double)total_width);
- for (int c = 0; c < ncols; c++) {
- col_widths[c] = (int) ((double)col_widths[c] * dx);
- }
- }
-
- // Pass 3: layout components
- for (int r = 0, y = insets.top, i = 0; r < nrows; y += row_heights[r] + vgap, r++) {
- for (int c = 0, x = insets.left; c < ncols; x += col_widths[c] + hgap, c++, i++) {
- if (i < ncomponents) {
- parent.getComponent(i).setBounds(x, y, col_widths[c], row_heights[r]);
- }
- }
- }
-
- } // synchronized
- }
-
-
- public void invalidateLayout(Container container) {}
-
-
- /**
- * Returns the string representation of this variable grid layout's values.
- * @return a string representation of this variable grid layout.
- */
- public String toString() {
- return getClass().getName() + "[mode=" + mode + ",size=" + size
- + ",hgap=" + hgap + ",vgap=" + vgap + "]";
- }
-
-
- /**
- * @param which if 0 compute minimum layout size,
- * if 1 compute maximum layout size,
- * otherwise compute preferred layout size.
- */
- private Dimension getLayoutSize(Container parent, int which) {
- synchronized (parent.getTreeLock()){
- update(parent);
-
- int ncomponents = parent.getComponentCount();
- int h = 0;
- int w = 0;
-
- for (int r = 0, i = 0; r < nrows; r++) {
- int row_height = 0;
- for (int c = 0; c < ncols; c++, i++) {
- if (i < ncomponents) {
- switch (which) {
- case 0:
- row_height = Math.max(row_height, parent.getComponent(i).getMinimumSize().height);
- break;
- case 1:
- row_height = Math.max(row_height, parent.getComponent(i).getMaximumSize().height);
- break;
- default:
- row_height = Math.max(row_height, parent.getComponent(i).getPreferredSize().height);
- break;
- }
- } else {
- break;
- }
- }
- h += row_height;
- }
-
- for (int c = 0; c < ncols; c++) {
- int col_width = 0;
- for (int r = 0; r < nrows; r++) {
- int i = r * ncols + c;
- if (i < ncomponents) {
- switch (which) {
- case 0:
- col_width = Math.max(col_width, parent.getComponent(i).getMinimumSize().width);
- break;
- case 1:
- col_width = Math.max(col_width, parent.getComponent(i).getMaximumSize().width);
- break;
- default:
- col_width = Math.max(col_width, parent.getComponent(i).getPreferredSize().width);
- break;
- }
- } else {
- break;
- }
- }
- w += col_width;
- }
-
- Insets insets = parent.getInsets();
- return new Dimension(w + insets.left + insets.right + ((ncols - 1) * hgap),
- h + insets.top + insets.bottom + ((nrows - 1) * vgap));
- }
- }
-
-
- private void update(Container container) {
- int ncomponents = container.getComponentCount();
- int old_nrows = nrows;
- int old_ncols = ncols;
- if (this.mode == FIXED_NUM_ROWS) {
- nrows = this.size;
- ncols = (ncomponents + nrows - 1) / nrows;
- } else {
- ncols = this.size;
- nrows = (ncomponents + ncols - 1) / ncols;
- }
- if (old_nrows != nrows) {
- row_heights = new int[nrows];
- }
- if (old_ncols != ncols) {
- col_widths = new int[ncols];
- }
- }
-
-
- private int mode;
- private int size;
- private int hgap;
- private int vgap;
- private transient int nrows = -1;
- private transient int ncols = -1;
- private transient int[] row_heights = null;
- private transient int[] col_widths = null;
-}
diff --git a/jEdit/installer/done-HalfAnOS.html b/jEdit/installer/done-HalfAnOS.html
index 390bc35..405800e 100644
--- a/jEdit/installer/done-HalfAnOS.html
+++ b/jEdit/installer/done-HalfAnOS.html
@@ -1,8 +1,8 @@
-<html><body>
-
-jEdit has been installed successfully.<p>
-
-To start jEdit, run the <tt>jedit.cmd</tt> script located in the
-installation directory.
-
-</body></html>
+<html><body>
+
+jEdit has been installed successfully.<p>
+
+To start jEdit, run the <tt>jedit.cmd</tt> script located in the
+installation directory.
+
+</body></html>
diff --git a/jEdit/installer/done-MacOS.html b/jEdit/installer/done-MacOS.html
index c7d6265..b423541 100644
--- a/jEdit/installer/done-MacOS.html
+++ b/jEdit/installer/done-MacOS.html
@@ -1,13 +1,13 @@
-<html><body>
-
-jEdit has been installed successfully.<p>
-
-To start jEdit, either double-click on the <tt>jedit.jar</tt> file in the
-install directory, or run the <tt>jedit</tt> command in a terminal window:
-
-<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jedit <i>filename</i> ...</td></tt></tr></table>
-
-To find out about supported command-line options, run:
-
-<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> man jedit</tt></td></tr></table>
-</body></html>
+<html><body>
+
+jEdit has been installed successfully.<p>
+
+To start jEdit, either double-click on the <tt>jedit.jar</tt> file in the
+install directory, or run the <tt>jedit</tt> command in a terminal window:
+
+<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jedit <i>filename</i> ...</td></tt></tr></table>
+
+To find out about supported command-line options, run:
+
+<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> man jedit</tt></td></tr></table>
+</body></html>
diff --git a/jEdit/installer/done-Unix.html b/jEdit/installer/done-Unix.html
index 3fea360..8aaa2ba 100644
--- a/jEdit/installer/done-Unix.html
+++ b/jEdit/installer/done-Unix.html
@@ -1,12 +1,12 @@
-<html><body>
-
-jEdit has been installed successfully.<p>
-
-To start jEdit, run the <tt>jedit</tt> command in a terminal window:
-
-<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jedit <i>filename</i> ...</td></tt></tr></table>
-
-To find out about supported command-line options, run:
-
-<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> man jedit</tt></td></tr></table>
-</body></html>
+<html><body>
+
+jEdit has been installed successfully.<p>
+
+To start jEdit, run the <tt>jedit</tt> command in a terminal window:
+
+<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jedit <i>filename</i> ...</td></tt></tr></table>
+
+To find out about supported command-line options, run:
+
+<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> man jedit</tt></td></tr></table>
+</body></html>
diff --git a/jEdit/installer/done-VMS.html b/jEdit/installer/done-VMS.html
index 51f6ddf..0c0888f 100644
--- a/jEdit/installer/done-VMS.html
+++ b/jEdit/installer/done-VMS.html
@@ -1,13 +1,13 @@
-<html><body>
-
-jEdit has been installed successfully.<p>
-
-To start jEdit, run the following command in a terminal window:
-
-<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> java -jar <i>disk</i>:[<i>dir</i>]jedit.jar <i>filename</i> ...</td></tt></tr></table>
-
-To find out about supported command-line options, run:
-
-<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> java -jar <i>disk</i>:[<i>dir</i>]jedit.jar -usage</td></tt></tr></table>
-
-</body></html>
+<html><body>
+
+jEdit has been installed successfully.<p>
+
+To start jEdit, run the following command in a terminal window:
+
+<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> java -jar <i>disk</i>:[<i>dir</i>]jedit.jar <i>filename</i> ...</td></tt></tr></table>
+
+To find out about supported command-line options, run:
+
+<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> java -jar <i>disk</i>:[<i>dir</i>]jedit.jar -usage</td></tt></tr></table>
+
+</body></html>
diff --git a/jEdit/installer/done-Windows.html b/jEdit/installer/done-Windows.html
index 81dc0bb..a2f1a84 100644
--- a/jEdit/installer/done-Windows.html
+++ b/jEdit/installer/done-Windows.html
@@ -1,7 +1,7 @@
-<html><body>
-
-jEdit has been installed successfully.<p>
-
-To start jEdit, double-click on <code>jedit.jar</code> in the jEdit installation directory.
-
-</body></html>
+<html><body>
+
+jEdit has been installed successfully.<p>
+
+To start jEdit, double-click on <code>jedit.jar</code> in the jEdit installation directory.
+
+</body></html>
diff --git a/jEdit/installer/gpl.html b/jEdit/installer/gpl.html
index 0bfa993..278a777 100644
--- a/jEdit/installer/gpl.html
+++ b/jEdit/installer/gpl.html
@@ -1,471 +1,471 @@
-<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU General Public License - GNU Project - Free Software Foundation (FSF)</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD">
-
-Version 2, June 1991<p>
-
-<code>
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.<br>
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA<p>
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-</code>
-
-
-
-<H2>Preamble</H2>
-
-<P>
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
-</P>
-<P>
- 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.
-
-</P>
-<P>
- 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 software, or if you modify it.
-
-</P>
-<P>
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
-</P>
-<P>
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-</P>
-<P>
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-</P>
-<P>
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-</P>
-<P>
- The precise terms and conditions for copying, distribution and
-modification follow.
-
-</P>
-
-
-<H2>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</H2>
-
-
-<P>
-
-<STRONG>0.</STRONG>
- This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-<P>
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-<P>
-
-<STRONG>1.</STRONG>
- You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-<P>
-
-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.
-<P>
-
-<STRONG>2.</STRONG>
- You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-<P>
-
-<UL>
-
-<LI><STRONG>a)</STRONG>
- You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
-<P>
-<LI><STRONG>b)</STRONG>
- You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
-<P>
-<LI><STRONG>c)</STRONG>
- If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-</UL>
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-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 Program, 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.
-<P>
-
-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 Program.
-<P>
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-<P>
-
-<STRONG>3.</STRONG>
- You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-
-<!-- we use this doubled UL to get the sub-sections indented, -->
-<!-- while making the bullets as unobvious as possible. -->
-<UL>
-
-<LI><STRONG>a)</STRONG>
- 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; or,
-
-<P>
-<LI><STRONG>b)</STRONG>
- Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
-<P>
-<LI><STRONG>c)</STRONG>
- Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-</UL>
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, 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 executable. 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.
-<P>
-
-If distribution of executable or 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 counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-<P>
-
-<STRONG>4.</STRONG>
- You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program 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.
-
-<P>
-
-<STRONG>5.</STRONG>
- 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 Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-<P>
-
-<STRONG>6.</STRONG>
- Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program 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.
-
-<P>
-
-<STRONG>7.</STRONG>
- 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 Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program 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 Program.
-<P>
-
-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.
-<P>
-
-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.
-<P>
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-<P>
-
-<STRONG>8.</STRONG>
- If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program 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.
-
-<P>
-
-<STRONG>9.</STRONG>
- The Free Software Foundation may publish revised and/or new versions
-of the 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.
-<P>
-
-Each version is given a distinguishing version number. If the Program
-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 Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-<P>
-
-
-<STRONG>10.</STRONG>
- If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, 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.
-
-
-
-<P><STRONG>NO WARRANTY</STRONG></P>
-
-<P>
-
-<STRONG>11.</STRONG>
- BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-<P>
-
-<STRONG>12.</STRONG>
- 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 PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-<P>
-
-<!--
-<H2>END OF TERMS AND CONDITIONS</H2>
-
-
-
-<H2>How to Apply These Terms to Your New Programs</H2>
-
-<P>
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-</P>
-<P>
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-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.
-
-</P>
-
-<code>
-<VAR>one line to give the program's name and an idea of what it does.</VAR>
-Copyright (C) <VAR>yyyy</VAR> <VAR>name of author</VAR>
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-</code>
-
-<P>
-Also add information on how to contact you by electronic and paper mail.
-
-</P>
-<P>
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-</P>
-
-<code>
-Gnomovision version 69, Copyright (C) <VAR>year</VAR> <VAR>name of author</VAR><p>
-Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
-type `show w'. This is free software, and you are welcome
-to redistribute it under certain conditions; type `show c'
-for details.
-</code>
-
-<P>
-The hypothetical commands <SAMP>`show w'</SAMP> and <SAMP>`show c'</SAMP> should show
-the appropriate parts of the General Public License. Of course, the
-commands you use may be called something other than <SAMP>`show w'</SAMP> and
-<SAMP>`show c'</SAMP>; they could even be mouse-clicks or menu items--whatever
-suits your program.
-
-</P>
-<P>
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
-</P>
-
-<code>
-Yoyodyne, Inc., hereby disclaims all copyright
-interest in the program `Gnomovision'
-(which makes passes at compilers) written
-by James Hacker.<p>
-
-<VAR>signature of Ty Coon</VAR>, 1 April 1989
-Ty Coon, President of Vice
-</code>
-
-<P>
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
--->
-</BODY>
-</HTML>
+<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<HTML>
+<HEAD>
+<TITLE>GNU General Public License - GNU Project - Free Software Foundation (FSF)</TITLE>
+</HEAD>
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD">
+
+Version 2, June 1991<p>
+
+<code>
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.<br>
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA<p>
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+</code>
+
+
+
+<H2>Preamble</H2>
+
+<P>
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+</P>
+<P>
+ 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.
+
+</P>
+<P>
+ 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 software, or if you modify it.
+
+</P>
+<P>
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+</P>
+<P>
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+</P>
+<P>
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+</P>
+<P>
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+</P>
+<P>
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+</P>
+
+
+<H2>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</H2>
+
+
+<P>
+
+<STRONG>0.</STRONG>
+ This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+<P>
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+<P>
+
+<STRONG>1.</STRONG>
+ You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+<P>
+
+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.
+<P>
+
+<STRONG>2.</STRONG>
+ You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+<P>
+
+<UL>
+
+<LI><STRONG>a)</STRONG>
+ You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+<P>
+<LI><STRONG>b)</STRONG>
+ You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+<P>
+<LI><STRONG>c)</STRONG>
+ If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+</UL>
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+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 Program, 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.
+<P>
+
+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 Program.
+<P>
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+<P>
+
+<STRONG>3.</STRONG>
+ You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+
+<!-- we use this doubled UL to get the sub-sections indented, -->
+<!-- while making the bullets as unobvious as possible. -->
+<UL>
+
+<LI><STRONG>a)</STRONG>
+ 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; or,
+
+<P>
+<LI><STRONG>b)</STRONG>
+ Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+<P>
+<LI><STRONG>c)</STRONG>
+ Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+</UL>
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, 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 executable. 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.
+<P>
+
+If distribution of executable or 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 counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+<P>
+
+<STRONG>4.</STRONG>
+ You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program 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.
+
+<P>
+
+<STRONG>5.</STRONG>
+ 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 Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+<P>
+
+<STRONG>6.</STRONG>
+ Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program 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.
+
+<P>
+
+<STRONG>7.</STRONG>
+ 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 Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program 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 Program.
+<P>
+
+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.
+<P>
+
+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.
+<P>
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+<P>
+
+<STRONG>8.</STRONG>
+ If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program 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.
+
+<P>
+
+<STRONG>9.</STRONG>
+ The Free Software Foundation may publish revised and/or new versions
+of the 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.
+<P>
+
+Each version is given a distinguishing version number. If the Program
+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 Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+<P>
+
+
+<STRONG>10.</STRONG>
+ If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, 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.
+
+
+
+<P><STRONG>NO WARRANTY</STRONG></P>
+
+<P>
+
+<STRONG>11.</STRONG>
+ BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+<P>
+
+<STRONG>12.</STRONG>
+ 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 PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+<P>
+
+<!--
+<H2>END OF TERMS AND CONDITIONS</H2>
+
+
+
+<H2>How to Apply These Terms to Your New Programs</H2>
+
+<P>
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+</P>
+<P>
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+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.
+
+</P>
+
+<code>
+<VAR>one line to give the program's name and an idea of what it does.</VAR>
+Copyright (C) <VAR>yyyy</VAR> <VAR>name of author</VAR>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+</code>
+
+<P>
+Also add information on how to contact you by electronic and paper mail.
+
+</P>
+<P>
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+</P>
+
+<code>
+Gnomovision version 69, Copyright (C) <VAR>year</VAR> <VAR>name of author</VAR><p>
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
+type `show w'. This is free software, and you are welcome
+to redistribute it under certain conditions; type `show c'
+for details.
+</code>
+
+<P>
+The hypothetical commands <SAMP>`show w'</SAMP> and <SAMP>`show c'</SAMP> should show
+the appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than <SAMP>`show w'</SAMP> and
+<SAMP>`show c'</SAMP>; they could even be mouse-clicks or menu items--whatever
+suits your program.
+
+</P>
+<P>
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+</P>
+
+<code>
+Yoyodyne, Inc., hereby disclaims all copyright
+interest in the program `Gnomovision'
+(which makes passes at compilers) written
+by James Hacker.<p>
+
+<VAR>signature of Ty Coon</VAR>, 1 April 1989
+Ty Coon, President of Vice
+</code>
+
+<P>
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+-->
+</BODY>
+</HTML>
diff --git a/jEdit/installer/install.mf b/jEdit/installer/install.mf
index f753191..6c7be97 100644
--- a/jEdit/installer/install.mf
+++ b/jEdit/installer/install.mf
@@ -1 +1 @@
-Main-Class: installer.Install
+Main-Class: installer.Install
diff --git a/jEdit/installer/install.props b/jEdit/installer/install.props
index 1921315..943dc40 100644
--- a/jEdit/installer/install.props
+++ b/jEdit/installer/install.props
@@ -1,66 +1,66 @@
-###
-### Installation settings
-###
-
-# Program name
-app.name=jEdit
-
-# Program version
-app.version=@jedit.version@
-
-# Info to display on first page of installer
-app.readme=readme.html
-
-# License to show on second page
-app.license.title=GNU General Public License
-app.license=gpl.html
-
-# OS-specific stuff
-ostask.unix-script.label=Install shortcut in:
-ostask.unix-man.label=Install manual page in:
-ostask.unix-man.manpage=jedit.1
-
-# Each component must have a name, a size, and a 'fileset'. The fileset is the
-# name of a resource, relative to the root of the JAR, where the list of files
-# is stored, newline delimited
-comp.count=5
-
-comp.0.name=jEdit text editor
-comp.0.disk-size=@jedit-program.disksize@
-comp.0.real-size=@jedit-program.realsize@
-comp.0.fileset=jedit-program
-
-comp.1.name=Default set of macros (highly recommended)
-comp.1.disk-size=@jedit-macros.disksize@
-comp.1.real-size=@jedit-macros.realsize@
-comp.1.fileset=jedit-macros
-
-comp.2.name=API documentation (for macro and plugin development)
-comp.2.disk-size=@jedit-api.disksize@
-comp.2.real-size=@jedit-api.realsize@
-comp.2.fileset=jedit-api
-
-#comp.3.name=Windows desktop integration (jEditLauncher)
-#comp.3.disk-size=400
-#comp.3.real-size=361
-#comp.3.fileset=jedit-windows
-#comp.3.os=Windows
-
-comp.3.name=MacOS desktop integration
-comp.3.disk-size=@jedit-mac.disksize@
-comp.3.real-size=@jedit-mac.realsize@
-comp.3.fileset=jedit-mac
-comp.3.os=MacOS
-
-comp.4.name=OS/2 start script
-comp.4.disk-size=@jedit-os2.disksize@
-comp.4.real-size=@jedit-os2.realsize@
-comp.4.fileset=jedit-os2
-comp.4.os=HalfAnOS
-
-dir.null=Empty directory: will NOT be installed
-dir.not-empty=Target directory exists and is not empty
-dir.not-directory=Target is NOT a directory, can't install
-dir.relative=Relative directory, translated to :
-dir.relative-cant-resolve=Can't resolve relative directory !
-dir.not-exist=Target directory doesn't exist (we will create it for you)
+###
+### Installation settings
+###
+
+# Program name
+app.name=jEdit
+
+# Program version
+app.version=@jedit.version@
+
+# Info to display on first page of installer
+app.readme=readme.html
+
+# License to show on second page
+app.license.title=GNU General Public License
+app.license=gpl.html
+
+# OS-specific stuff
+ostask.unix-script.label=Install shortcut in:
+ostask.unix-man.label=Install manual page in:
+ostask.unix-man.manpage=jedit.1
+
+# Each component must have a name, a size, and a 'fileset'. The fileset is the
+# name of a resource, relative to the root of the JAR, where the list of files
+# is stored, newline delimited
+comp.count=6
+
+comp.0.name=jEdit text editor
+comp.0.disk-size=@jedit-program.disksize@
+comp.0.real-size=@jedit-program.realsize@
+comp.0.fileset=jedit-program
+
+comp.1.name=Default set of macros (highly recommended)
+comp.1.disk-size=@jedit-macros.disksize@
+comp.1.real-size=@jedit-macros.realsize@
+comp.1.fileset=jedit-macros
+
+comp.2.name=API documentation (for macro and plugin development)
+comp.2.disk-size=@jedit-api.disksize@
+comp.2.real-size=@jedit-api.realsize@
+comp.2.fileset=jedit-api
+
+comp.3.name=Windows EXE launcher
+comp.3.disk-size=@jedit-windows.disksize@
+comp.3.real-size=@jedit-windows.realsize@
+comp.3.fileset=jedit-windows
+comp.3.os=Windows
+
+comp.4.name=MacOS desktop integration
+comp.4.disk-size=@jedit-mac.disksize@
+comp.4.real-size=@jedit-mac.realsize@
+comp.4.fileset=jedit-mac
+comp.4.os=MacOS
+
+comp.5.name=OS/2 start script
+comp.5.disk-size=@jedit-os2.disksize@
+comp.5.real-size=@jedit-os2.realsize@
+comp.5.fileset=jedit-os2
+comp.5.os=HalfAnOS
+
+dir.null=Empty directory: will NOT be installed
+dir.not-empty=Target directory exists and is not empty
+dir.not-directory=Target is NOT a directory, can't install
+dir.relative=Relative directory, translated to :
+dir.relative-cant-resolve=Can't resolve relative directory !
+dir.not-exist=Target directory doesn't exist (we will create it for you)
diff --git a/jEdit/installer/readme.html b/jEdit/installer/readme.html
index 79c7936..79ba6ad 100644
--- a/jEdit/installer/readme.html
+++ b/jEdit/installer/readme.html
@@ -1,25 +1,25 @@
-<html>
-<body>
-
-Simply fill out the required
-information at each screen and click <b>Next</b>. Once all installation
-parameters have been specified, the <b>Next</b> button changes to
-read <b>Install</b>. Clicking it will then begin the installation
-process.<p>
-
-The <b>Cancel</b> button will quit the installer without installing
-anything; <b>Previous</b> will take you to the previous screen
-(use it if you change your mind about a setting).
-
-<hr>
-
-jEdit is free software, released under the terms of the GNU General
-Public License. The full text of the license is shown in the next page
-of the installer.<p>
-
-Several class libraries bundled with jEdit are have other
-licenses; once jEdit is installed, see the <code>README.txt</code>
-file for details.
-
-</body>
-</html>
+<html>
+<body>
+
+Simply fill out the required
+information at each screen and click <b>Next</b>. Once all installation
+parameters have been specified, the <b>Next</b> button changes to
+read <b>Install</b>. Clicking it will then begin the installation
+process.<p>
+
+The <b>Cancel</b> button will quit the installer without installing
+anything; <b>Previous</b> will take you to the previous screen
+(use it if you change your mind about a setting).
+
+<hr>
+
+jEdit is free software, released under the terms of the GNU General
+Public License. The full text of the license is shown in the next page
+of the installer.<p>
+
+Several class libraries bundled with jEdit are have other
+licenses; once jEdit is installed, see the <code>README.txt</code>
+file for details.
+
+</body>
+</html>
diff --git a/jEdit/jEdit.iml b/jEdit/jEdit.iml
index 1490486..f01b5a3 100644
--- a/jEdit/jEdit.iml
+++ b/jEdit/jEdit.iml
@@ -5,6 +5,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/build" />
+ <excludeFolder url="file://$MODULE_DIR$/dist" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
diff --git a/jEdit/jEdit.ipr b/jEdit/jEdit.ipr
deleted file mode 100644
index 04e0db5..0000000
--- a/jEdit/jEdit.ipr
+++ /dev/null
@@ -1,1736 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="AntConfiguration">
- <defaultAnt bundledAnt="true" />
- <buildFile url="file://$PROJECT_DIR$/build.xml">
- <additionalClassPath />
- <antReference projectDefault="true" />
- <customJdkName value="" />
- <maximumHeapSize value="128" />
- <maximumStackSize value="32" />
- <properties />
- </buildFile>
- <buildFile url="file://$PROJECT_DIR$/jars/LatestVersion/build.xml">
- <additionalClassPath />
- <antReference projectDefault="true" />
- <customJdkName value="" />
- <maximumHeapSize value="128" />
- <maximumStackSize value="32" />
- <properties />
- </buildFile>
- <buildFile url="file://$PROJECT_DIR$/jars/MacOSX/build.xml">
- <additionalClassPath />
- <antReference projectDefault="true" />
- <customJdkName value="" />
- <maximumHeapSize value="128" />
- <maximumStackSize value="32" />
- <properties />
- </buildFile>
- <buildFile url="file://$PROJECT_DIR$/jars/QuickNotepad/build.xml">
- <additionalClassPath />
- <antReference projectDefault="true" />
- <customJdkName value="" />
- <maximumHeapSize value="128" />
- <maximumStackSize value="32" />
- <properties />
- </buildFile>
- </component>
- <component name="BuildJarProjectSettings">
- <option name="BUILD_JARS_ON_MAKE" value="false" />
- </component>
- <component name="CodeStyleSettingsManager">
- <option name="PER_PROJECT_SETTINGS">
- <value>
- <ADDITIONAL_INDENT_OPTIONS fileType="java">
- <option name="INDENT_SIZE" value="4" />
- <option name="CONTINUATION_INDENT_SIZE" value="8" />
- <option name="TAB_SIZE" value="4" />
- <option name="USE_TAB_CHARACTER" value="false" />
- <option name="SMART_TABS" value="false" />
- <option name="LABEL_INDENT_SIZE" value="0" />
- <option name="LABEL_INDENT_ABSOLUTE" value="false" />
- </ADDITIONAL_INDENT_OPTIONS>
- <ADDITIONAL_INDENT_OPTIONS fileType="jsp">
- <option name="INDENT_SIZE" value="4" />
- <option name="CONTINUATION_INDENT_SIZE" value="8" />
- <option name="TAB_SIZE" value="4" />
- <option name="USE_TAB_CHARACTER" value="false" />
- <option name="SMART_TABS" value="false" />
- <option name="LABEL_INDENT_SIZE" value="0" />
- <option name="LABEL_INDENT_ABSOLUTE" value="false" />
- </ADDITIONAL_INDENT_OPTIONS>
- <ADDITIONAL_INDENT_OPTIONS fileType="xml">
- <option name="INDENT_SIZE" value="4" />
- <option name="CONTINUATION_INDENT_SIZE" value="8" />
- <option name="TAB_SIZE" value="4" />
- <option name="USE_TAB_CHARACTER" value="false" />
- <option name="SMART_TABS" value="false" />
- <option name="LABEL_INDENT_SIZE" value="0" />
- <option name="LABEL_INDENT_ABSOLUTE" value="false" />
- </ADDITIONAL_INDENT_OPTIONS>
- </value>
- </option>
- </component>
- <component name="CompilerConfiguration">
- <option name="DEFAULT_COMPILER" value="Javac" />
- <resourceExtensions>
- <entry name=".+\.(properties|xml|html|dtd|tld)" />
- <entry name=".+\.(gif|png|jpeg|jpg)" />
- </resourceExtensions>
- <wildcardResourcePatterns>
- <entry name="?*.properties" />
- <entry name="?*.props" />
- <entry name="?*.xml" />
- <entry name="?*.gif" />
- <entry name="?*.png" />
- <entry name="?*.jpeg" />
- <entry name="?*.jpg" />
- <entry name="?*.html" />
- <entry name="?*.dtd" />
- <entry name="?*.tld" />
- <entry name="?*.ftl" />
- </wildcardResourcePatterns>
- <annotationProcessing enabled="false" useClasspath="true" />
- </component>
- <component name="CopyrightManager" default="GPL v2">
- <copyright>
- <option name="notice" value="jEdit - Programmer's Text Editor
:tabSize=8:indentSize=8:noTabs=false:
:folding=explicit:collapseFolds=1:
Copyright © $today.year jEdit contributors
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA." />
- <option name="keyword" value="Copyright" />
- <option name="allowReplaceKeyword" value="" />
- <option name="myName" value="GPL v2" />
- <option name="myLocal" value="true" />
- </copyright>
- <module2copyright />
- <LanguageOptions name="HTML">
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="true" />
- <option name="fileLocation" value="2" />
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </LanguageOptions>
- <LanguageOptions name="JSP">
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="true" />
- <option name="fileLocation" value="2" />
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </LanguageOptions>
- <LanguageOptions name="JSPX">
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="true" />
- <option name="fileLocation" value="2" />
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </LanguageOptions>
- <LanguageOptions name="XML">
- <option name="fileTypeOverride" value="2" />
- <option name="relativeBefore" value="true" />
- <option name="addBlankAfter" value="true" />
- <option name="fileLocation" value="2" />
- <option name="block" value="true" />
- <option name="separateBefore" value="false" />
- <option name="separateAfter" value="false" />
- <option name="prefixLines" value="true" />
- <option name="lenBefore" value="80" />
- <option name="lenAfter" value="80" />
- <option name="box" value="false" />
- <option name="filler" value=" " />
- </LanguageOptions>
- </component>
- <component name="DependencyValidationManager">
- <scope name="jEdit Sourcefiles" pattern="file[jEdit]:org//*.java" />
- <scope name="Modes" pattern="file[jEdit]:modes//*.xml" />
- <scope name="Macros" pattern="file[jEdit]:macros//*.bsh" />
- <scope name="LatestVersion Sourcefiles" pattern="file[LatestVersion]:*.java" />
- <scope name="MacOSX Sourcefiles" pattern="file[MacOSX]:macosx//*.java" />
- <scope name="QuickNotepad Sourcefiles" pattern="file[QuickNotepad]:*.java" />
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
- </component>
- <component name="EclipseCompilerSettings">
- <option name="GENERATE_NO_WARNINGS" value="true" />
- <option name="DEPRECATION" value="false" />
- </component>
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="ISO-8859-1">
- <file url="file://$PROJECT_DIR$/doc/CHANGES.txt" charset="ISO-8859-1" />
- </component>
- <component name="IdProvider" IDEtalkID="F2207F966C6969E072D5CD57D729D7EA" />
- <component name="InspectionProjectProfileManager">
- <profiles>
- <profile version="1.0" is_locked="false">
- <option name="myName" value="Project Default" />
- <option name="myLocal" value="false" />
- <inspection_tool class="AbstractClassNeverImplemented" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AbstractClassWithOnlyOneDirectInheritor" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AbstractClassWithoutAbstractMethods" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AbstractMethodCallInConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AbstractMethodOverridesAbstractMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AbstractMethodOverridesConcreteMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AbstractMethodWithMissingImplementations" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AccessToNonThreadSafeStaticFieldFromInstance" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="nonThreadSafeTypes" value="java.text.DateFormat,java.util.Calendar" />
- </inspection_tool>
- <inspection_tool class="AccessToStaticFieldLockedOnInstance" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AnnotationNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[A-Z][A-Za-z\d]*" />
- <option name="m_minLength" value="8" />
- <option name="m_maxLength" value="64" />
- </inspection_tool>
- <inspection_tool class="AnonymousClassMethodCount" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="3" />
- </inspection_tool>
- <inspection_tool class="AnonymousClassVariableHidesContainingMethodVariable" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AnonymousFunctionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AnonymousInnerClassMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AntMissingPropertiesFileInspection" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ArchaicSystemPropertyAccess" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ArithmeticOnVolatileField" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ArrayLengthInLoopCondition" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AssertAsName" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AssertsWithoutMessages" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AssignmentResultUsedJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AssignmentToCatchBlockParameter" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AssignmentToCollectionFieldFromParameter" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignorePrivateMethods" value="true" />
- </inspection_tool>
- <inspection_tool class="AssignmentToDateFieldFromParameter" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignorePrivateMethods" value="true" />
- </inspection_tool>
- <inspection_tool class="AssignmentToForLoopParameter" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_checkForeachParameters" value="true" />
- </inspection_tool>
- <inspection_tool class="AssignmentToForLoopParameterJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AssignmentToFunctionParameterJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AssignmentToMethodParameter" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreTransformationOfOriginalParameter" value="false" />
- </inspection_tool>
- <inspection_tool class="AssignmentUsedAsCondition" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AwaitNotInLoop" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="AwaitWithoutCorrespondingSignal" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="BadExceptionCaught" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="exceptionsString" value="java.lang.NullPointerException,java.lang.IllegalMonitorStateException,java.lang.ArrayIndexOutOfBoundsException" />
- </inspection_tool>
- <inspection_tool class="BadExceptionDeclared" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="exceptionsString" value="java.lang.Throwable,java.lang.Exception,java.lang.Error,java.lang.RuntimeException,java.lang.NullPointerException,java.lang.ClassCastException,java.lang.ArrayIndexOutOfBoundsException" />
- <option name="ignoreTestCases" value="false" />
- </inspection_tool>
- <inspection_tool class="BadOddness" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="BeforeClassOrAfterClassIsPublicStaticVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="BeforeOrAfterIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="BigDecimalEquals" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="BlockStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="BooleanMethodNameMustStartWithQuestion" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="questionString" value="is,can,has,should,could,will,shall,check,contains,equals,add,put,remove,startsWith,endsWith" />
- </inspection_tool>
- <inspection_tool class="BusyWait" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CStyleArrayDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CachedNumberConstructorCall" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CallToNativeMethodWhileLocked" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CallToSimpleGetterInClass" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreGetterCallsOnOtherObjects" value="true" />
- </inspection_tool>
- <inspection_tool class="CallToSimpleSetterInClass" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreSetterCallsOnOtherObjects" value="true" />
- </inspection_tool>
- <inspection_tool class="CallToStringConcatCanBeReplacedByOperator" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CallerJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CastConflictsWithInstanceof" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CastThatLosesPrecision" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreIntegerCharCasts" value="false" />
- </inspection_tool>
- <inspection_tool class="CastToIncompatibleInterface" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CatchGenericClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ChainedEquality" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ChainedEqualityJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ChannelResource" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CharacterComparison" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CheckForOutOfMemoryOnLargeArrayAllocation" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="64" />
- </inspection_tool>
- <inspection_tool class="ClassEscapesItsScope" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ClassHasNoToStringMethod" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="excludeClassNames" value="" />
- <option name="excludeException" value="true" />
- <option name="excludeDeprecated" value="true" />
- <option name="excludeEnum" value="false" />
- <option name="excludeAbstract" value="false" />
- </inspection_tool>
- <inspection_tool class="ClassInitializer" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ClassMayBeInterface" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ClassNameDiffersFromFileName" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ClassNameSameAsAncestorName" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ClassNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[A-Z][A-Za-z\d]*" />
- <option name="m_minLength" value="8" />
- <option name="m_maxLength" value="64" />
- </inspection_tool>
- <inspection_tool class="ClassNestingDepth" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="1" />
- </inspection_tool>
- <inspection_tool class="ClassReferencesSubclass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ClassUnconnectedToPackage" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ClassWithMultipleLoggers" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="loggerClassName" value="java.util.logging.Logger" />
- </inspection_tool>
- <inspection_tool class="ClassWithTooManyDependencies" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="limit" value="10" />
- </inspection_tool>
- <inspection_tool class="ClassWithTooManyDependents" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="limit" value="10" />
- </inspection_tool>
- <inspection_tool class="ClassWithTooManyTransitiveDependencies" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="limit" value="35" />
- </inspection_tool>
- <inspection_tool class="ClassWithTooManyTransitiveDependents" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="limit" value="35" />
- </inspection_tool>
- <inspection_tool class="ClassWithoutToString" level="WARNING" enabled="true" />
- <inspection_tool class="CloneCallsConstructors" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CloneInNonCloneableClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CloneableClassInSecureContext" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CloneableImplementsClone" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreCloneableDueToInheritance" value="false" />
- </inspection_tool>
- <inspection_tool class="CollectionAddedToSelf" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CollectionContainsUrl" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CollectionsMustHaveInitialCapacity" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CommaExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ComparableImplementedButEqualsNotOverridden" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ComparatorNotSerializable" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CompareToUsesNonFinalVariable" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ComparisonOfShortAndChar" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ComparisonToNaN" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConditionSignal" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConditionalExpressionWithIdenticalBranches" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConditionalExpressionWithIdenticalBranchesJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConfusingElse" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConfusingFloatingPointLiteral" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConfusingFloatingPointLiteralJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConfusingMainMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConfusingOctalEscape" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConfusingPlusesOrMinusesJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConnectionResource" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConstantConditions" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="true" />
- <option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
- </inspection_tool>
- <inspection_tool class="ConstantMathCall" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConstantNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="onlyCheckImmutables" value="false" />
- <option name="m_regex" value="[A-Z_\d]*" />
- <option name="m_minLength" value="5" />
- <option name="m_maxLength" value="32" />
- </inspection_tool>
- <inspection_tool class="ConstantOnRHSOfComparison" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConstantOnRHSOfComparisonJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ConstantStringIntern" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ControlFlowStatementWithoutBraces" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CovariantEquals" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CyclicClassDependency" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CyclicPackageDependency" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="CyclomaticComplexity" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="20" />
- </inspection_tool>
- <inspection_tool class="CyclomaticComplexityJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="10" />
- </inspection_tool>
- <inspection_tool class="DateToString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DebuggerStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DeclareCollectionAsInterface" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreLocalVariables" value="false" />
- <option name="ignorePrivateMethodsAndFields" value="false" />
- </inspection_tool>
- <inspection_tool class="DefaultNotLastCaseInSwitch" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DefaultNotLastCaseInSwitchJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DeserializableClassInSecureContext" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DisjointPackage" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DivideByZero" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DivideByZeroJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DocumentWriteJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DollarSignInName" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DoubleCheckedLocking" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreOnVolatileVariables" value="false" />
- </inspection_tool>
- <inspection_tool class="DoubleNegation" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DriverManagerGetConnection" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DuplicateBooleanBranch" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DuplicateCondition" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreMethodCalls" value="false" />
- </inspection_tool>
- <inspection_tool class="DuplicateConditionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="DuplicatePropertyInspection" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="CURRENT_FILE" value="true" />
- <option name="MODULE_WITH_DEPENDENCIES" value="false" />
- <option name="CHECK_DUPLICATE_VALUES" value="true" />
- <option name="CHECK_DUPLICATE_KEYS" value="true" />
- <option name="CHECK_DUPLICATE_KEYS_WITH_DIFFERENT_VALUES" value="true" />
- </inspection_tool>
- <inspection_tool class="DynamicallyGeneratedCodeJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EmptyCatchBlockJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EmptyClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EmptyFinallyBlockJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EmptyInitializer" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EmptyStatementBody" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_reportEmptyBlocks" value="true" />
- </inspection_tool>
- <inspection_tool class="EmptyStatementBodyJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_reportEmptyBlocks" value="true" />
- </inspection_tool>
- <inspection_tool class="EmptySynchronizedStatement" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EmptyTryBlockJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EnumAsName" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EnumSwitchStatementWhichMissesCases" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreSwitchStatementsWithDefault" value="false" />
- </inspection_tool>
- <inspection_tool class="EnumeratedClassNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[A-Z][A-Za-z\d]*" />
- <option name="m_minLength" value="8" />
- <option name="m_maxLength" value="64" />
- </inspection_tool>
- <inspection_tool class="EnumeratedConstantNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[A-Z][A-Za-z\d]*" />
- <option name="m_minLength" value="5" />
- <option name="m_maxLength" value="32" />
- </inspection_tool>
- <inspection_tool class="EqualityComparisonWithCoercionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EqualsAndHashcode" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EqualsHashCodeCalledOnUrl" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="EqualsUsesNonFinalVariable" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ErrorRethrown" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ExceptionFromCatchWhichDoesntWrap" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreGetMessage" value="false" />
- </inspection_tool>
- <inspection_tool class="ExceptionNameDoesntEndWithException" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ExtendsThread" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ExtendsUtilityClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ExternalizableWithSerializationMethods" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="FallthruInSwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="FeatureEnvy" enabled="false" level="WARNING" enabled_by_default="false">
- <option name="ignoreTestCases" value="true" />
- </inspection_tool>
- <inspection_tool class="FieldAccessedSynchronizedAndUnsynchronized" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="countGettersAndSetters" value="true" />
- </inspection_tool>
- <inspection_tool class="FieldHidesSuperclassField" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreInvisibleFields" value="true" />
- </inspection_tool>
- <inspection_tool class="FieldMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="FieldNotUsedInToString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="FieldRepeatedlyAccessed" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreFinalFields" value="false" />
- </inspection_tool>
- <inspection_tool class="FinalMethodInFinalClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="Finalize" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="FinalizeNotProtected" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="FloatingPointEquality" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ForLoopReplaceableByWhile" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreLoopsWithoutConditions" value="false" />
- </inspection_tool>
- <inspection_tool class="ForLoopReplaceableByWhileJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreLoopsWithoutConditions" value="false" />
- </inspection_tool>
- <inspection_tool class="ForLoopThatDoesntUseLoopVariable" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ForLoopThatDoesntUseLoopVariableJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ForLoopWithMissingComponent" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreCollectionLoops" value="false" />
- </inspection_tool>
- <inspection_tool class="FunctionNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[a-z][A-Za-z]*" />
- <option name="m_minLength" value="4" />
- <option name="m_maxLength" value="32" />
- </inspection_tool>
- <inspection_tool class="HardCodedStringLiteral" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreForAssertStatements" value="true" />
- <option name="ignoreForExceptionConstructors" value="true" />
- <option name="ignoreForSpecifiedExceptionConstructors" value="" />
- <option name="ignoreForJUnitAsserts" value="true" />
- <option name="ignoreForClassReferences" value="true" />
- <option name="ignoreForPropertyKeyReferences" value="true" />
- <option name="ignoreForNonAlpha" value="true" />
- <option name="ignoreAssignedToConstants" value="false" />
- <option name="ignoreToString" value="true" />
- <option name="nonNlsCommentPattern" value="NON-NLS" />
- </inspection_tool>
- <inspection_tool class="HashCodeUsesNonFinalVariable" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="HibernateResource" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="IOResource" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="IfStatementWithIdenticalBranches" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="IfStatementWithIdenticalBranchesJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="IfStatementWithTooManyBranchesJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="3" />
- </inspection_tool>
- <inspection_tool class="ImplicitNumericConversion" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreWideningConversions" value="false" />
- <option name="ignoreCharConversions" value="false" />
- <option name="ignoreConstantConversions" value="false" />
- </inspection_tool>
- <inspection_tool class="IncrementDecrementResultUsedJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="IndexOfReplaceableByContains" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="InnerClassMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="InnerClassVariableHidesOuterClassVariable" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreInvisibleFields" value="true" />
- </inspection_tool>
- <inspection_tool class="InnerHTMLJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="InstanceMethodNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[a-z][A-Za-z\d]*" />
- <option name="m_minLength" value="4" />
- <option name="m_maxLength" value="32" />
- </inspection_tool>
- <inspection_tool class="InstanceVariableNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[a-z][A-Za-z\d]*" />
- <option name="m_minLength" value="4" />
- <option name="m_maxLength" value="32" />
- </inspection_tool>
- <inspection_tool class="InstanceVariableUninitializedUse" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignorePrimitives" value="false" />
- </inspection_tool>
- <inspection_tool class="InstanceofCatchParameter" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="InstanceofChain" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="InstanceofIncompatibleInterface" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="InstanceofThis" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="InstantiationOfUtilityClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="IntegerDivisionInFloatingPointContext" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="IntegerMultiplicationImplicitCastToLong" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="InterfaceNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[A-Z][A-Za-z\d]*" />
- <option name="m_minLength" value="8" />
- <option name="m_maxLength" value="64" />
- </inspection_tool>
- <inspection_tool class="InterfaceNeverImplemented" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreInterfacesThatOnlyDeclareConstants" value="false" />
- </inspection_tool>
- <inspection_tool class="IteratorHasNextCallsIteratorNext" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="IteratorNextDoesNotThrowNoSuchElementException" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="JDBCExecuteWithNonConstantString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="JDBCPrepareStatementWithNonConstantString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="JDBCResource" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="JNDIResource" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="JUnitAbstractTestClassNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[A-Z][A-Za-z\d]*TestCase" />
- <option name="m_minLength" value="12" />
- <option name="m_maxLength" value="64" />
- </inspection_tool>
- <inspection_tool class="JUnitTestClassNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[A-Z][A-Za-z\d]*Test" />
- <option name="m_minLength" value="8" />
- <option name="m_maxLength" value="64" />
- </inspection_tool>
- <inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="TOP_LEVEL_CLASS_OPTIONS">
- <value>
- <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="package" />
- <option name="REQUIRED_TAGS" value="@param" />
- </value>
- </option>
- <option name="INNER_CLASS_OPTIONS">
- <value>
- <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="private" />
- <option name="REQUIRED_TAGS" value="" />
- </value>
- </option>
- <option name="METHOD_OPTIONS">
- <value>
- <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="private" />
- <option name="REQUIRED_TAGS" value="@return at param@throws or @exception" />
- </value>
- </option>
- <option name="FIELD_OPTIONS">
- <value>
- <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="private" />
- <option name="REQUIRED_TAGS" value="" />
- </value>
- </option>
- <option name="IGNORE_DEPRECATED" value="false" />
- <option name="IGNORE_JAVADOC_PERIOD" value="true" />
- <option name="IGNORE_DUPLICATED_THROWS" value="false" />
- <option name="myAdditionalJavadocTags" value="" />
- </inspection_tool>
- <inspection_tool class="JavaLangImport" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="JavaLangReflect" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="LengthOneStringInIndexOf" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="LengthOneStringsInConcatenation" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ListIndexOfReplaceableByContains" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="LiteralAsArgToStringEquals" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="LoadLibraryWithNonConstantString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="LocalVariableHidingMemberVariable" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreInvisibleFields" value="true" />
- <option name="m_ignoreStaticMethods" value="true" />
- </inspection_tool>
- <inspection_tool class="LocalVariableNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreForLoopParameters" value="false" />
- <option name="m_ignoreCatchParameters" value="false" />
- <option name="m_regex" value="[a-z][A-Za-z\d]*" />
- <option name="m_minLength" value="1" />
- <option name="m_maxLength" value="20" />
- </inspection_tool>
- <inspection_tool class="LocalVariableNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[a-z][A-Za-z]*" />
- <option name="m_minLength" value="1" />
- <option name="m_maxLength" value="32" />
- </inspection_tool>
- <inspection_tool class="LongLiteralsEndingWithLowercaseL" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="LoopConditionNotUpdatedInsideLoop" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreIterators" value="false" />
- </inspection_tool>
- <inspection_tool class="LoopWithImplicitTerminationCondition" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="LossyEncoding" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MagicNumber" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreInHashCode" value="false" />
- </inspection_tool>
- <inspection_tool class="MagicNumberJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MapReplaceableByEnumMap" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MarkerInterface" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MethodCallInLoopCondition" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MethodCoupling" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_includeJavaClasses" value="false" />
- <option name="m_includeLibraryClasses" value="false" />
- <option name="m_limit" value="10" />
- </inspection_tool>
- <inspection_tool class="MethodMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_onlyPrivateOrFinal" value="false" />
- <option name="m_ignoreEmptyMethods" value="true" />
- </inspection_tool>
- <inspection_tool class="MethodMayBeSynchronized" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MethodNameSameAsParentName" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MethodNamesDifferOnlyByCase" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MethodOnlyUsedFromInnerClass" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreMethodsAccessedFromAnonymousClass" value="false" />
- </inspection_tool>
- <inspection_tool class="MethodOverloadsParentMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MethodOverridesPackageLocalMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MethodOverridesPrivateMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MethodOverridesStaticMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MethodReturnAlwaysConstant" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MisorderedAssertEqualsParameters" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MissingDeprecatedAnnotation" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MissingOverrideAnnotation" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_requireAnnotationsFirst" value="true" />
- </inspection_tool>
- <inspection_tool class="MisspelledCompareTo" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MisspelledEquals" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MisspelledHashcode" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MisspelledSetUp" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MisspelledTearDown" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MisspelledToString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ModuleWithTooFewClasses" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="limit" value="10" />
- </inspection_tool>
- <inspection_tool class="ModuleWithTooManyClasses" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="limit" value="100" />
- </inspection_tool>
- <inspection_tool class="MultipleDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MultipleReturnPointsPerMethod" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreGuardClauses" value="false" />
- <option name="ignoreEqualsMethod" value="false" />
- <option name="m_limit" value="1" />
- </inspection_tool>
- <inspection_tool class="MultipleTopLevelClassesInFile" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MultipleTypedDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="MultiplyOrDivideByPowerOfTwo" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="checkDivision" value="true" />
- </inspection_tool>
- <inspection_tool class="NakedNotify" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NativeMethods" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NegatedConditional" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreNegatedNullComparison" value="true" />
- </inspection_tool>
- <inspection_tool class="NegatedConditionalExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NegatedIfElse" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreNegatedNullComparison" value="true" />
- </inspection_tool>
- <inspection_tool class="NegatedIfStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NestedAssignment" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NestedAssignmentJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NestedConditionalExpression" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NestedConditionalExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NestedFunctionJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_includeAnonymousFunctions" value="false" />
- </inspection_tool>
- <inspection_tool class="NestedSynchronizedStatement" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NestedTryStatement" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NestingDepth" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="5" />
- </inspection_tool>
- <inspection_tool class="NestingDepthJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="5" />
- </inspection_tool>
- <inspection_tool class="NonBlockStatementBodyJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonBooleanMethodNameMayNotStartWithQuestion" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="questionString" value="is,can,has,should,could,will,shall,check,contains,equals,startsWith,endsWith" />
- </inspection_tool>
- <inspection_tool class="NonCommentSourceStatements" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="50" />
- </inspection_tool>
- <inspection_tool class="NonExceptionNameEndsWithException" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonFinalClone" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonFinalFieldOfException" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonFinalStaticVariableUsedInClassInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonProtectedConstructorInAbstractClass" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreNonPublicClasses" value="false" />
- </inspection_tool>
- <inspection_tool class="NonReproducibleMathCall" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonSerializableFieldInSerializableClass" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="superClassString" value="java.awt.Component" />
- </inspection_tool>
- <inspection_tool class="NonSerializableObjectBoundToHttpSession" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonSerializableObjectPassedToObjectStream" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonSerializableWithSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonSerializableWithSerializationMethods" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonShortCircuitBoolean" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonShortCircuitBooleanExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonStaticFinalLogger" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="loggerClassName" value="java.util.logging.Logger" />
- </inspection_tool>
- <inspection_tool class="NonStaticInnerClassInSecureContext" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonSynchronizedMethodOverridesSynchronizedMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NonThreadSafeLazyInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NoopMethodInAbstractClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NotifyCalledOnCondition" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NotifyNotInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NotifyWithoutCorrespondingWait" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="NumericToString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ObjectAllocationIgnoredJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ObjectAllocationInLoop" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ObjectNotify" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ObjectToString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ObsoleteCollection" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreLibraryArguments" value="false" />
- </inspection_tool>
- <inspection_tool class="OctalAndDecimalIntegersMixed" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="OctalIntegerJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="OnDemandImport" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="OverloadedVarargsMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="OverlyComplexArithmeticExpression" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="6" />
- </inspection_tool>
- <inspection_tool class="OverlyComplexArithmeticExpressionJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="6" />
- </inspection_tool>
- <inspection_tool class="OverlyComplexBooleanExpression" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="5" />
- <option name="m_ignorePureConjunctionsDisjunctions" value="true" />
- </inspection_tool>
- <inspection_tool class="OverlyComplexBooleanExpressionJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="3" />
- </inspection_tool>
- <inspection_tool class="OverlyLargePrimitiveArrayInitializer" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="64" />
- </inspection_tool>
- <inspection_tool class="OverlyStrongTypeCast" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreInMatchingInstanceof" value="false" />
- </inspection_tool>
- <inspection_tool class="OverridableMethodCallDuringObjectConstruction" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="OverriddenMethodCallDuringObjectConstruction" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="PackageInMultipleModules" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="PackageWithTooFewClasses" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="limit" value="3" />
- </inspection_tool>
- <inspection_tool class="PackageWithTooManyClasses" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="limit" value="10" />
- </inspection_tool>
- <inspection_tool class="ParameterHidingMemberVariable" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreInvisibleFields" value="true" />
- <option name="m_ignoreStaticMethodParametersHidingInstanceFields" value="false" />
- <option name="m_ignoreForConstructors" value="true" />
- <option name="m_ignoreForPropertySetters" value="true" />
- <option name="m_ignoreForAbstractMethods" value="false" />
- </inspection_tool>
- <inspection_tool class="ParameterNameDiffersFromOverriddenParameter" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreSingleCharacterNames" value="true" />
- <option name="m_ignoreOverridesOfLibraryMethods" value="false" />
- </inspection_tool>
- <inspection_tool class="ParameterNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[a-z][A-Za-z\d]*" />
- <option name="m_minLength" value="1" />
- <option name="m_maxLength" value="20" />
- </inspection_tool>
- <inspection_tool class="ParameterNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[a-z][A-Za-z]*" />
- <option name="m_minLength" value="1" />
- <option name="m_maxLength" value="32" />
- </inspection_tool>
- <inspection_tool class="ParametersPerConstructor" enabled="false" level="WARNING" enabled_by_default="false">
- <option name="m_limit" value="10" />
- </inspection_tool>
- <inspection_tool class="ParametersPerFunctionJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="5" />
- </inspection_tool>
- <inspection_tool class="PlatformDetectionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="PointlessIndexOfComparison" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="PrivateMemberAccessBetweenOuterAndInnerClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ProtectedMemberInFinalClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="PublicConstructorInNonPublicClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="PublicFieldAccessedInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="PublicStaticArrayField" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="PublicStaticCollectionField" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="QuestionableName" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="nameString" value="aa,abc,bad,bar,bar2,baz,baz1,baz2,baz3,bb,blah,bogus,bool,cc,dd,defau1t,dummy,dummy2,ee,fa1se,ff,foo,foo1,foo2,foo3,foobar,four,fred,fred1,fred2,gg,hh,hello,hello1,hello2,hello3,ii,nu11,one,silly,silly2,string,two,that,then,three,whi1e,var" />
- </inspection_tool>
- <inspection_tool class="RandomDoubleForRandomInteger" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RawUseOfParameterizedType" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreObjectConstruction" value="true" />
- <option name="ignoreTypeCasts" value="false" />
- </inspection_tool>
- <inspection_tool class="ReadObjectAndWriteObjectPrivate" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ReadObjectInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ReadResolveAndWriteReplaceProtected" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RecordStoreResource" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RedundantFieldInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RedundantImplements" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreSerializable" value="false" />
- <option name="ignoreCloneable" value="false" />
- </inspection_tool>
- <inspection_tool class="RedundantImport" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RedundantMethodOverride" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RedundantSuppression" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RedundantThrowsDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RefusedBequest" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreEmptySuperMethods" value="false" />
- </inspection_tool>
- <inspection_tool class="ReplaceAllDot" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ReplaceAssignmentWithOperatorAssignment" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreLazyOperators" value="true" />
- <option name="ignoreObscureOperators" value="false" />
- </inspection_tool>
- <inspection_tool class="ReplaceAssignmentWithOperatorAssignmentJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ResultOfObjectAllocationIgnored" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ResultSetIndexZero" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ReturnOfCollectionField" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignorePrivateMethods" value="true" />
- </inspection_tool>
- <inspection_tool class="ReturnOfDateField" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ReturnThis" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ReuseOfLocalVariable" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ReuseOfLocalVariableJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RuntimeExec" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="RuntimeExecWithNonConstantString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SafeLock" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SamePackageImport" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SerialPersistentFieldsWithWrongSignature" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SerialVersionUIDNotStaticFinal" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SerializableClassInSecureContext" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SerializableHasSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="superClassString" value="java.awt.Component" />
- </inspection_tool>
- <inspection_tool class="SerializableHasSerializationMethods" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="superClassString" value="java.awt.Component" />
- </inspection_tool>
- <inspection_tool class="SerializableInnerClassHasSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="superClassString" value="java.awt.Component" />
- </inspection_tool>
- <inspection_tool class="SerializableInnerClassWithNonSerializableOuterClass" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="superClassString" value="java.awt.Component" />
- </inspection_tool>
- <inspection_tool class="SerializableWithUnconstructableAncestor" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SetReplaceableByEnumSet" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SetupCallsSuperSetup" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SetupIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SignalWithoutCorrespondingAwait" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SimpleDateFormatWithoutLocale" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SimplifiableJUnitAssertion" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SizeReplaceableByIsEmpty" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreNegations" value="false" />
- </inspection_tool>
- <inspection_tool class="SleepWhileHoldingLock" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SocketResource" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StandardVariableNames" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StatementsPerFunctionJS" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="30" />
- </inspection_tool>
- <inspection_tool class="StaticCallOnSubclass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StaticFieldReferenceOnSubclass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StaticInheritance" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StaticMethodNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[a-z][A-Za-z\d]*" />
- <option name="m_minLength" value="4" />
- <option name="m_maxLength" value="32" />
- </inspection_tool>
- <inspection_tool class="StaticMethodOnlyUsedInOneClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StaticSuite" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StaticVariableNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="checkMutableFinals" value="false" />
- <option name="m_regex" value="[a-z][A-Za-z\d]*" />
- <option name="m_minLength" value="5" />
- <option name="m_maxLength" value="32" />
- </inspection_tool>
- <inspection_tool class="StaticVariableUninitializedUse" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignorePrimitives" value="false" />
- </inspection_tool>
- <inspection_tool class="StringBufferMustHaveInitialCapacity" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StringBufferReplaceableByString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StringBufferReplaceableByStringBuilder" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StringBufferToStringInConcatenation" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StringConcatenationInLoops" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreUnlessAssigned" value="false" />
- </inspection_tool>
- <inspection_tool class="StringEqualsEmptyString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StringLiteralBreaksHTMLJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="StringReplaceableByStringBuffer" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="onlyWarnOnLoop" value="true" />
- </inspection_tool>
- <inspection_tool class="StringTokenizer" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SubstringZero" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SubtractionInCompareTo" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SuspiciousIndentAfterControlStatement" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SwitchStatementWithConfusingDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SwitchStatementWithNoDefaultBranchJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SwitchStatementWithTooFewBranches" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="2" />
- </inspection_tool>
- <inspection_tool class="SwitchStatementsWithoutDefault" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreFullyCoveredEnums" value="true" />
- </inspection_tool>
- <inspection_tool class="SynchronizeOnLock" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SynchronizeOnThis" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SynchronizedMethod" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_includeNativeMethods" value="true" />
- </inspection_tool>
- <inspection_tool class="SynchronizedOnLiteralObject" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SystemExit" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SystemGC" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SystemGetenv" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SystemOutErr" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="SystemRunFinalizersOnExit" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TailRecursion" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TailRecursionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TeardownCallsSuperTeardown" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TeardownIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TestCaseInProductCode" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TestCaseWithConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TestCaseWithNoTestMethods" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreSupers" value="false" />
- </inspection_tool>
- <inspection_tool class="TestMethodInProductCode" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TestMethodIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TestMethodWithoutAssertion" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TestOnlyProblems" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TextLabelInSwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TextLabelInSwitchStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThisEscapedInConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThreadDeathRethrown" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThreadDumpStack" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThreadPriority" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThreadRun" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThreadStartInConstruction" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThreadStopSuspendResume" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThreadWithDefaultRunMethod" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThreadYield" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThreeNegationsPerFunctionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThrowCaughtLocally" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreRethrownExceptions" value="false" />
- </inspection_tool>
- <inspection_tool class="ThrowablePrintStackTrace" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ThrownExceptionsPerMethod" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_limit" value="3" />
- </inspection_tool>
- <inspection_tool class="TimeToString" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TooBroadCatch" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="onlyWarnOnRootExceptions" value="false" />
- </inspection_tool>
- <inspection_tool class="TooBroadScope" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_allowConstructorAsInitializer" value="false" />
- <option name="m_onlyLookAtBlocks" value="false" />
- </inspection_tool>
- <inspection_tool class="TransientFieldInNonSerializableClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TransientFieldNotInitialized" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TrivialStringConcatenation" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TypeMayBeWeakened" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="useRighthandTypeAsWeakestTypeInAssignments" value="true" />
- <option name="useParameterizedTypeForCollectionMethods" value="true" />
- <option name="doNotWeakenToJavaLangObject" value="true" />
- </inspection_tool>
- <inspection_tool class="TypeParameterExtendsFinalClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TypeParameterHidesVisibleType" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="TypeParameterNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_regex" value="[A-Z]" />
- <option name="m_minLength" value="1" />
- <option name="m_maxLength" value="1" />
- </inspection_tool>
- <inspection_tool class="UNCHECKED_WARNING" enabled="false" level="WARNING" enabled_by_default="false" />
- <inspection_tool class="UnaryPlus" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnconditionalWait" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnconstructableTestCase" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnnecessarilyQualifiedStaticUsage" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreStaticFieldAccesses" value="false" />
- <option name="m_ignoreStaticMethodCalls" value="false" />
- <option name="m_ignoreStaticAccessFromStaticContext" value="false" />
- </inspection_tool>
- <inspection_tool class="UnnecessaryBlockStatement" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnnecessaryConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnnecessaryEnumModifier" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnnecessaryFinalOnParameter" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="onlyWarnOnAbstractMethods" value="true" />
- </inspection_tool>
- <inspection_tool class="UnnecessaryFullyQualifiedName" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="m_ignoreJavadoc" value="false" />
- </inspection_tool>
- <inspection_tool class="UnnecessaryInterfaceModifier" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnnecessaryQualifierForThis" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnnecessarySuperConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnnecessaryThis" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnnecessaryUnaryMinus" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnpredictableBigDecimalConstructorCall" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreReferences" value="true" />
- <option name="ignoreComplexLiterals" value="false" />
- </inspection_tool>
- <inspection_tool class="UnusedAssignment" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="REPORT_PREFIX_EXPRESSIONS" value="true" />
- <option name="REPORT_POSTFIX_EXPRESSIONS" value="true" />
- <option name="REPORT_REDUNDANT_INITIALIZER" value="true" />
- </inspection_tool>
- <inspection_tool class="UnusedImport" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnusedLibrary" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UnusedProperty" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UpperCaseFieldNameNotConstant" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UseOfAWTPeerClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UseOfAnotherObjectsPrivateField" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UseOfJDBCDriverClass" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UseOfProcessBuilder" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UseOfPropertiesAsHashtable" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UseOfSunClasses" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="UtilityClassWithoutPrivateConstructor" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreClassesWithOnlyMain" value="false" />
- </inspection_tool>
- <inspection_tool class="VoidExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="VolatileArrayField" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="WaitCalledOnCondition" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="WaitNotInLoop" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="WaitNotInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="WaitOrAwaitWithoutTimeout" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="WaitWhileHoldingTwoLocks" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="WaitWithoutCorrespondingNotify" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="WeakerAccess" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="true" />
- <option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="true" />
- <option name="SUGGEST_PRIVATE_FOR_INNERS" value="true" />
- </inspection_tool>
- <inspection_tool class="WhileLoopSpinsOnField" enabled="true" level="WARNING" enabled_by_default="true">
- <option name="ignoreNonEmtpyLoops" value="false" />
- </inspection_tool>
- <inspection_tool class="WithStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="XHTMLIncompatabilitiesJS" enabled="true" level="WARNING" enabled_by_default="true" />
- <inspection_tool class="ZeroLengthArrayInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
- </profile>
- </profiles>
- <option name="PROJECT_PROFILE" value="Project Default" />
- <option name="USE_PROJECT_PROFILE" value="true" />
- <version value="1.0" />
- </component>
- <component name="IssueNavigationConfiguration">
- <option name="links">
- <list>
- <IssueNavigationLink>
- <option name="issueRegexp" value="\d+" />
- <option name="linkRegexp" value="http://sourceforge.net/support/tracker.php?aid=$0" />
- </IssueNavigationLink>
- </list>
- </option>
- </component>
- <component name="JavadocGenerationManager">
- <option name="OUTPUT_DIRECTORY" />
- <option name="OPTION_SCOPE" value="protected" />
- <option name="OPTION_HIERARCHY" value="true" />
- <option name="OPTION_NAVIGATOR" value="true" />
- <option name="OPTION_INDEX" value="true" />
- <option name="OPTION_SEPARATE_INDEX" value="true" />
- <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
- <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
- <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
- <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
- <option name="OPTION_DEPRECATED_LIST" value="true" />
- <option name="OTHER_OPTIONS" value="" />
- <option name="HEAP_SIZE" />
- <option name="LOCALE" />
- <option name="OPEN_IN_BROWSER" value="true" />
- </component>
- <component name="Palette2">
- <group name="Swing">
- <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
- </item>
- <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
- </item>
- <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
- </item>
- <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
- <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
- </item>
- <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
- <initial-values>
- <property name="text" value="Button" />
- </initial-values>
- </item>
- <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
- <initial-values>
- <property name="text" value="RadioButton" />
- </initial-values>
- </item>
- <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
- <initial-values>
- <property name="text" value="CheckBox" />
- </initial-values>
- </item>
- <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
- <initial-values>
- <property name="text" value="Label" />
- </initial-values>
- </item>
- <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
- <preferred-size width="150" height="-1" />
- </default-constraints>
- </item>
- <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
- <preferred-size width="150" height="-1" />
- </default-constraints>
- </item>
- <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
- <preferred-size width="150" height="-1" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
- </item>
- <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
- <preferred-size width="200" height="200" />
- </default-constraints>
- </item>
- <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
- <preferred-size width="200" height="200" />
- </default-constraints>
- </item>
- <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
- </item>
- <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
- </item>
- <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
- </item>
- <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
- </item>
- <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
- <preferred-size width="-1" height="20" />
- </default-constraints>
- </item>
- <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
- </item>
- <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
- </item>
- </group>
- </component>
- <component name="ProjectDetails">
- <option name="projectName" value="jEdit" />
- </component>
- <component name="ProjectDictionaryState">
- <dictionary name="vampire" />
- </component>
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/jars/LatestVersion/LatestVersion.iml" filepath="$PROJECT_DIR$/jars/LatestVersion/LatestVersion.iml" />
- <module fileurl="file://$PROJECT_DIR$/jars/MacOSX/MacOSX.iml" filepath="$PROJECT_DIR$/jars/MacOSX/MacOSX.iml" />
- <module fileurl="file://$PROJECT_DIR$/jars/QuickNotepad/QuickNotepad.iml" filepath="$PROJECT_DIR$/jars/QuickNotepad/QuickNotepad.iml" />
- <module fileurl="file://$PROJECT_DIR$/jEdit.iml" filepath="$PROJECT_DIR$/jEdit.iml" />
- </modules>
- </component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
- <output url="file://$PROJECT_DIR$/build/idea" />
- </component>
- <component name="ProjectRunConfigurationManager">
- <configuration default="false" name="jEdit" type="Application" factoryName="Application">
- <log_file path="$PROJECT_DIR$/build/settings/activity.log" checked="true" skipped="true" show_all="false" alias="Activity Log" />
- <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="emma" />
- <extension name="snapshooter" />
- <option name="MAIN_CLASS_NAME" value="org.gjt.sp.jedit.jEdit" />
- <option name="VM_PARAMETERS" value="-Xmx192M" />
- <option name="PROGRAM_PARAMETERS" value="-settings="$PROJECT_DIR$/build/settings"" />
- <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" value="" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <module name="jEdit" />
- <envs />
- <RunnerSettings RunnerId="Debug">
- <option name="DEBUG_PORT" value="1341" />
- <option name="TRANSPORT" value="0" />
- <option name="LOCAL" value="true" />
- </RunnerSettings>
- <RunnerSettings RunnerId="JProfiler">
- <option name="WINDOW" value="false" />
- <option name="JVMPI" value="false" />
- <option name="INTERPRETED" value="false" />
- </RunnerSettings>
- <RunnerSettings RunnerId="Run" />
- <ConfigurationWrapper RunnerId="Debug" />
- <ConfigurationWrapper RunnerId="JProfiler" />
- <ConfigurationWrapper RunnerId="Run" />
- <method>
- <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="build" />
- <option name="Make" enabled="false" />
- <option name="Run Ant target" value="true" />
- </method>
- </configuration>
- <configuration default="false" name="jEdit (background mode)" type="Application" factoryName="Application">
- <log_file path="$PROJECT_DIR$/build/settings/activity.log" checked="true" skipped="true" show_all="false" alias="Activity Log" />
- <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="emma" />
- <extension name="snapshooter" />
- <option name="MAIN_CLASS_NAME" value="org.gjt.sp.jedit.jEdit" />
- <option name="VM_PARAMETERS" value="-Xmx192M" />
- <option name="PROGRAM_PARAMETERS" value="-settings="$PROJECT_DIR$/build/settings" -background" />
- <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" value="" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <module name="jEdit" />
- <envs />
- <RunnerSettings RunnerId="JProfiler">
- <option name="WINDOW" value="false" />
- <option name="JVMPI" value="false" />
- <option name="INTERPRETED" value="false" />
- </RunnerSettings>
- <RunnerSettings RunnerId="Run" />
- <ConfigurationWrapper RunnerId="Run" />
- <method>
- <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="build" />
- <option name="Make" enabled="false" />
- <option name="Run Ant target" value="true" />
- </method>
- </configuration>
- <configuration default="false" name="jEdit (Java 6)" type="Application" factoryName="Application">
- <log_file path="$PROJECT_DIR$/build/settings/activity.log" checked="true" skipped="true" show_all="false" alias="Activity Log" />
- <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="emma" />
- <extension name="snapshooter" />
- <option name="MAIN_CLASS_NAME" value="org.gjt.sp.jedit.jEdit" />
- <option name="VM_PARAMETERS" value="-Xmx192M" />
- <option name="PROGRAM_PARAMETERS" value="-settings="$PROJECT_DIR$/build/settings"" />
- <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
- <option name="ALTERNATIVE_JRE_PATH" value="/usr/lib/jvm/java-6-sun" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <module name="jEdit" />
- <envs />
- <RunnerSettings RunnerId="Debug">
- <option name="DEBUG_PORT" value="44197" />
- <option name="TRANSPORT" value="0" />
- <option name="LOCAL" value="true" />
- </RunnerSettings>
- <RunnerSettings RunnerId="JProfiler">
- <option name="WINDOW" value="false" />
- <option name="JVMPI" value="false" />
- <option name="INTERPRETED" value="false" />
- </RunnerSettings>
- <RunnerSettings RunnerId="Run" />
- <ConfigurationWrapper RunnerId="Debug" />
- <ConfigurationWrapper RunnerId="JProfiler" />
- <ConfigurationWrapper RunnerId="Run" />
- <method>
- <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="build" />
- <option name="Make" enabled="false" />
- <option name="Run Ant target" value="true" />
- </method>
- </configuration>
- <configuration default="false" name="jEdit (Java 6; background mode)" type="Application" factoryName="Application">
- <log_file path="$PROJECT_DIR$/build/settings/activity.log" checked="true" skipped="true" show_all="false" alias="Activity Log" />
- <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="emma" />
- <extension name="snapshooter" />
- <option name="MAIN_CLASS_NAME" value="org.gjt.sp.jedit.jEdit" />
- <option name="VM_PARAMETERS" value="-Xmx192M" />
- <option name="PROGRAM_PARAMETERS" value="-settings="$PROJECT_DIR$/build/settings" -background" />
- <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
- <option name="ALTERNATIVE_JRE_PATH" value="/usr/lib/jvm/java-6-sun" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <module name="jEdit" />
- <envs />
- <RunnerSettings RunnerId="JProfiler">
- <option name="WINDOW" value="false" />
- <option name="JVMPI" value="false" />
- <option name="INTERPRETED" value="false" />
- </RunnerSettings>
- <method>
- <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="build" />
- <option name="Make" enabled="false" />
- <option name="Run Ant target" value="true" />
- </method>
- </configuration>
- </component>
- <component name="SvnBranchConfigurationManager">
- <option name="myConfigurationMap">
- <map>
- <entry key="$PROJECT_DIR$">
- <value>
- <SvnBranchConfiguration>
- <option name="branchMap">
- <map>
- <entry key="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches">
- <value>
- <list>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1218396639209" />
- <option name="revision" value="13258" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches/docking_framework" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1176951697724" />
- <option name="revision" value="9462" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches/jedit43_nostrings" />
- </SvnBranchItem>
- </list>
- </value>
- </entry>
- <entry key="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags">
- <value>
- <list>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1226862920462" />
- <option name="revision" value="14070" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre16" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1224211014440" />
- <option name="revision" value="13896" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre15" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1209312241226" />
- <option name="revision" value="12514" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre14" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1205435718427" />
- <option name="revision" value="12215" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre13" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1197063574015" />
- <option name="revision" value="11207" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre12" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1191436781626" />
- <option name="revision" value="10791" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre11" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1184190109800" />
- <option name="revision" value="10009" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre10" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172940160439" />
- <option name="revision" value="9074" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre1" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172938815897" />
- <option name="revision" value="9072" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-3-2-2" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172934922377" />
- <option name="revision" value="9070" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-final" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172934620160" />
- <option name="revision" value="9069" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre7" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172934093879" />
- <option name="revision" value="9068" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre5" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172933950791" />
- <option name="revision" value="9067" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre4" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172930175040" />
- <option name="revision" value="9066" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre12" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172929632216" />
- <option name="revision" value="9065" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre9" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172929477203" />
- <option name="revision" value="9064" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre8" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1172929096756" />
- <option name="revision" value="9063" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre5" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1169312622101" />
- <option name="revision" value="8692" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre9" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1163001311391" />
- <option name="revision" value="7992" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre8" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1159851355117" />
- <option name="revision" value="7163" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre7" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1155747706518" />
- <option name="revision" value="6701" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre6" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1152311295000" />
- <option name="revision" value="5556" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/after_bsh-2-0b4" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1152266138000" />
- <option name="revision" value="5554" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/before_bsh-2-0b4" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1152181828000" />
- <option name="revision" value="5542" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre5" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1152180149000" />
- <option name="revision" value="5540" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre3" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1152122425000" />
- <option name="revision" value="5531" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre2" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1150397246000" />
- <option name="revision" value="5442" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit_43_with_gnuregexp_microstarxml" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1147475209000" />
- <option name="revision" value="5388" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre4" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1136173007000" />
- <option name="revision" value="5329" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre3" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1110595434000" />
- <option name="revision" value="5202" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre2" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1108074918000" />
- <option name="revision" value="5182" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/before-fast-scroll" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1104528786000" />
- <option name="revision" value="5165" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-3-pre1" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1094326374000" />
- <option name="revision" value="5129" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/before-selection-manager" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1094264677000" />
- <option name="revision" value="5124" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/before-screen-line-refactoring" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1093748323000" />
- <option name="revision" value="5111" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-final" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1090047563000" />
- <option name="revision" value="5085" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre15" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1086297068000" />
- <option name="revision" value="5058" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre14" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1084575691000" />
- <option name="revision" value="5043" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre13" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1079804107000" />
- <option name="revision" value="5002" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre11" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1079764835000" />
- <option name="revision" value="5000" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre10" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1072501334000" />
- <option name="revision" value="4944" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/beanshell-2-0b1" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1070236854000" />
- <option name="revision" value="4927" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre7" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1067201848000" />
- <option name="revision" value="4907" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre6" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1061570577000" />
- <option name="revision" value="4867" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/crazy-pos-mgr" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1059967153000" />
- <option name="revision" value="4844" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre4" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1058223654000" />
- <option name="revision" value="4827" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/bsh-13b2-merge" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1057542014000" />
- <option name="revision" value="4821" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre3" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1054263177000" />
- <option name="revision" value="4749" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre2" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1052174343000" />
- <option name="revision" value="4685" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/beanshell-1-3" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1051837211000" />
- <option name="revision" value="4676" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-2-pre1" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1045976885000" />
- <option name="revision" value="4511" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/macos-2_0_4" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1045871364000" />
- <option name="revision" value="4508" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre11" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1045820614000" />
- <option name="revision" value="4504" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/macos-2_0_3" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1045271361000" />
- <option name="revision" value="4482" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre10" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1043802516000" />
- <option name="revision" value="4451" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre9" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1042258598000" />
- <option name="revision" value="4425" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre8" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1037919166000" />
- <option name="revision" value="4380" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre6" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1029873100000" />
- <option name="revision" value="4318" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre3" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1024812657000" />
- <option name="revision" value="4284" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre2" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1024133719000" />
- <option name="revision" value="4256" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-1-pre1" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1018587320000" />
- <option name="revision" value="4140" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-final" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1017715362000" />
- <option name="revision" value="4125" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre9" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1017050868000" />
- <option name="revision" value="4114" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre8" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1015742549000" />
- <option name="revision" value="4084" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre7" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1014103275000" />
- <option name="revision" value="4052" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre6" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1012890490000" />
- <option name="revision" value="4013" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre5" />
- </SvnBranchItem>
- <SvnBranchItem>
- <option name="creationDateMillis" value="1011744082000" />
- <option name="revision" value="3993" />
- <option name="url" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags/jedit-4-0-pre4" />
- </SvnBranchItem>
- </list>
- </value>
- </entry>
- </map>
- </option>
- <option name="branchUrls">
- <list>
- <option value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/branches" />
- <option value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/tags" />
- </list>
- </option>
- <option name="trunkUrl" value="https://jedit.svn.sourceforge.net/svnroot/jedit/jEdit/trunk" />
- </SvnBranchConfiguration>
- </value>
- </entry>
- </map>
- </option>
- <option name="myVersion" value="124" />
- <option name="mySupportsUserInfoFilter" value="true" />
- </component>
- <component name="VcsDirectoryMappings">
- <mapping directory="" vcs="svn" />
- </component>
- <component name="VcsRevisionGraphProjectComponent">
- <option name="_useTwoTagConvention" value="true" />
- <option name="_showTags" value="true" />
- <option name="_tagNaming" value="TAG_$T_MERGE_$S_TO_$D" />
- <option name="_tagFilter" value="" />
- <option name="_branchFilter" />
- <option name="_showRevisionFilter" value="false" />
- <option name="_afterDateTimeFilter" value="false" />
- <option name="_beforeDateTimeFilter" value="false" />
- <option name="_afterDateTime" value="" />
- <option name="_beforeDateTime" value="" />
- <option name="_projectRoot" value="<Use repository root>" />
- <option name="_trunk" value="trunk" />
- <option name="_branches" value="branches" />
- <option name="_tags" value="tags" />
- <option name="_showTagFilter" value="false" />
- <option name="_showBranchFilter" value="false" />
- </component>
- <component name="WebServicesPlugin" addRequiredLibraries="true" />
-</project>
-
diff --git a/jEdit/jars/LatestVersion/LatestVersion.html b/jEdit/jars/LatestVersion/LatestVersion.html
deleted file mode 100644
index 791eb99..0000000
--- a/jEdit/jars/LatestVersion/LatestVersion.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<html>
-<head>
-<title>LatestVersion Plugin</title>
-</head>
-
-<body>
-
-<h1>LatestVersion Plugin</h1>
-
-This plugin can be used to find out what the latest available jEdit
-version is. To invoke it, select
-<b>Plugins</b>><b>Check jEdit Version</b>. When invoked, it will
-connect to a special URL
-(<code>http://www.jedit.org/jEdit-version.txt</code>),
-which contains version info.
-
-</body>
-</html>
diff --git a/jEdit/jars/LatestVersion/LatestVersion.iml b/jEdit/jars/LatestVersion/LatestVersion.iml
deleted file mode 100644
index a94b1c0..0000000
--- a/jEdit/jars/LatestVersion/LatestVersion.iml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module relativePaths="true" type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jEdit" />
- </component>
-</module>
-
diff --git a/jEdit/jars/LatestVersion/LatestVersion.props b/jEdit/jars/LatestVersion/LatestVersion.props
deleted file mode 100644
index 7bf506a..0000000
--- a/jEdit/jars/LatestVersion/LatestVersion.props
+++ /dev/null
@@ -1,42 +0,0 @@
-plugin.LatestVersionPlugin.activate=defer
-
-plugin.LatestVersionPlugin.name=Latest Version Check
-plugin.LatestVersionPlugin.author=Slava Pestov
-plugin.LatestVersionPlugin.version=1.5
-plugin.LatestVersionPlugin.docs=LatestVersion.html
-
-plugin.LatestVersionPlugin.depend.0=jedit 04.02.01.00
-plugin.LatestVersionPlugin.depend.1=jdk 1.4
-
-plugin.LatestVersionPlugin.description=This plugin can be used to find out what \
- the latest available jEdit version is.
-plugin.LatestVersionPlugin.longdescription=LatestVersion.txt
-
-plugin.LatestVersionPlugin.menu-item=version-check
-
-version-check.label=Check jEdit Version
-
-version-check.stable.title=Version Status
-version-check.stable.message=You are using the stable branch of jEdit, version {0}.\n\n\
- The latest stable release is {1}.\n\
- The latest development release is {2}.\n\n\
- Do you want to see more information?
-
-version-check.stable-nodevel.title=Version Status
-version-check.stable-nodevel.message=You are using the stable branch of jEdit, version {0}.\n\n\
- The latest stable release is {1}.\n\n\
- Do you want to see more information?
-
-version-check.devel.title=Version Status
-version-check.devel.message=You are using the development branch of jEdit, version {0}.\n\n\
- The latest development release is {2}.\n\
- The latest stable release is {1}.\n\n\
- Do you want to see more information?
-
-version-check.devel-nodevel.title=Version Status
-version-check.devel-nodevel.message=You are using the development branch of jEdit, version {0}.\n\n\
- Currently, no development release is available.\n\
- The latest stable release is {1}.\n\n\
- Do you want to see more information?
-
-version-check.url=http://www.jedit.org/jEdit-version.txt
diff --git a/jEdit/jars/LatestVersion/LatestVersion.txt b/jEdit/jars/LatestVersion/LatestVersion.txt
deleted file mode 100644
index 61687bf..0000000
--- a/jEdit/jars/LatestVersion/LatestVersion.txt
+++ /dev/null
@@ -1 +0,0 @@
-This plugin can be used to find out what the latest available jEdit version is. To invoke it, select Plugins->Check jEdit Version. When invoked, it will connect to a special URL (http://www.jedit.org/jEdit-version.txt), which contains version info.
diff --git a/jEdit/jars/LatestVersion/LatestVersionPlugin.java b/jEdit/jars/LatestVersion/LatestVersionPlugin.java
deleted file mode 100644
index 1570b4e..0000000
--- a/jEdit/jars/LatestVersion/LatestVersionPlugin.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * LatestVersionPlugin.java - Latest Version Check Plugin
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-import javax.swing.JOptionPane;
-import java.io.*;
-import java.net.URL;
-import org.gjt.sp.jedit.*;
-
-public class LatestVersionPlugin extends EditPlugin
-{
- public static void doVersionCheck(View view)
- {
- view.showWaitCursor();
-
- try
- {
- URL url = new URL(jEdit.getProperty(
- "version-check.url"));
- InputStream in = url.openStream();
- BufferedReader bin = new BufferedReader(
- new InputStreamReader(in));
-
- String line;
- String develBuild = null;
- String stableBuild = null;
- while((line = bin.readLine()) != null)
- {
- if(line.startsWith(".build"))
- develBuild = line.substring(6).trim();
- else if(line.startsWith(".stablebuild"))
- stableBuild = line.substring(12).trim();
- }
-
- bin.close();
-
- if(develBuild != null && stableBuild != null)
- {
- doVersionCheck(view,stableBuild,develBuild);
- }
- }
- catch(IOException e)
- {
- String[] args = { jEdit.getProperty("version-check.url"),
- e.toString() };
- GUIUtilities.error(view,"read-error",args);
- }
-
- view.hideWaitCursor();
- }
-
- public static void doVersionCheck(View view, String stableBuild,
- String develBuild)
- {
- String myBuild = jEdit.getBuild();
- String pre = myBuild.substring(6,7);
- String variant;
- String build;
-
- if(pre.equals("99"))
- {
- variant = "stable";
- build = stableBuild;
- }
- else
- {
- variant = "devel";
- build = develBuild;
- }
-
- // special case: no current development version
- if(develBuild.compareTo(stableBuild) < 0)
- variant += "-nodevel";
-
- int retVal = GUIUtilities.confirm(view,"version-check." + variant,
- new String[] { MiscUtilities.buildToVersion(myBuild),
- MiscUtilities.buildToVersion(stableBuild),
- MiscUtilities.buildToVersion(develBuild) },
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- if(retVal == JOptionPane.YES_OPTION)
- jEdit.openFile(view,jEdit.getProperty("version-check.url"));
- }
-}
diff --git a/jEdit/jars/LatestVersion/actions.xml b/jEdit/jars/LatestVersion/actions.xml
deleted file mode 100644
index 98f5be3..0000000
--- a/jEdit/jars/LatestVersion/actions.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
-
-<ACTIONS>
- <ACTION NAME="version-check">
- <CODE>
- LatestVersionPlugin.doVersionCheck(view);
- </CODE>
- </ACTION>
-</ACTIONS>
diff --git a/jEdit/jars/LatestVersion/build.xml b/jEdit/jars/LatestVersion/build.xml
deleted file mode 100644
index a6798b8..0000000
--- a/jEdit/jars/LatestVersion/build.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<project name="LatestVersion"
- default="build">
- <description>
- This is an ant build.xml file for building the LatestVersion plugin for jEdit.
- </description>
-
- <property file="build.properties"/>
- <property file="../build.properties"/>
-
- <property name="jedit.install.dir"
- location="../../build" />
- <property name="docs-proc.target"
- value="none" />
-
- <property name="build.support"
- value="../../../build-support" />
- <import file="${build.support}/plugin-build.xml" />
-
- <selector id="packageFiles">
- <filename name="LatestVersion.html" />
- </selector>
-</project>
diff --git a/jEdit/jars/MacOSX/MacOSX.iml b/jEdit/jars/MacOSX/MacOSX.iml
index a94b1c0..d8fc64d 100644
--- a/jEdit/jars/MacOSX/MacOSX.iml
+++ b/jEdit/jars/MacOSX/MacOSX.iml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module relativePaths="true" type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jEdit" />
- </component>
-</module>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="jEdit" />
+ </component>
+</module>
+
diff --git a/jEdit/jars/MacOSX/macosx/MacOSXPlugin.java b/jEdit/jars/MacOSX/macosx/MacOSXPlugin.java
index 3a1947e..c96f573 100644
--- a/jEdit/jars/MacOSX/macosx/MacOSXPlugin.java
+++ b/jEdit/jars/MacOSX/macosx/MacOSXPlugin.java
@@ -65,7 +65,7 @@ public class MacOSXPlugin extends EBPlugin
{
// Fix key bindings for OS X for anything other than Aqua LNF
// See: http://lists.apple.com/archives/java-dev/2008/Apr/msg00209.html
- if (lf.equalsIgnoreCase("apple.laf.aqualookandfeel") == false)
+ if (!UIManager.getLookAndFeel().isNativeLookAndFeel())
{
Log.log(Log.DEBUG, this, "Fixing keybindingds on current LNF");
UIDefaults uid = UIManager.getLookAndFeelDefaults();
diff --git a/jEdit/jars/QuickNotepad/QuickNotepad.iml b/jEdit/jars/QuickNotepad/QuickNotepad.iml
index a94b1c0..d8fc64d 100644
--- a/jEdit/jars/QuickNotepad/QuickNotepad.iml
+++ b/jEdit/jars/QuickNotepad/QuickNotepad.iml
@@ -1,13 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module relativePaths="true" type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jEdit" />
- </component>
-</module>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="jEdit" />
+ </component>
+</module>
+
diff --git a/jEdit/jars/QuickNotepad/QuickNotepad.java b/jEdit/jars/QuickNotepad/QuickNotepad.java
index 94f36d9..1df7b80 100644
--- a/jEdit/jars/QuickNotepad/QuickNotepad.java
+++ b/jEdit/jars/QuickNotepad/QuickNotepad.java
@@ -1,244 +1,244 @@
-/*
- * QuickNotepad.java
- * part of the QuickNotepad plugin for the jEdit text editor
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: QuickNotepad.java 12504 2008-04-22 23:12:43Z ezust $
- */
-
-// {{{ imports
-import java.awt.BorderLayout;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import javax.swing.JFileChooser;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-
-import org.gjt.sp.jedit.EBComponent;
-import org.gjt.sp.jedit.EBMessage;
-import org.gjt.sp.jedit.EditBus;
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.gui.DefaultFocusComponent;
-import org.gjt.sp.jedit.gui.DockableWindowManager;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-// }}}
-
-// {{{ QuickNotePad class
-/**
- *
- * QuickNotePad - a dockable JPanel, a demonstration of a jEdit plugin.
- *
- */
-public class QuickNotepad extends JPanel
- implements EBComponent, QuickNotepadActions, DefaultFocusComponent {
-
- // {{{ Instance Variables
- private static final long serialVersionUID = 6412255692894321789L;
-
- private String filename;
-
- private String defaultFilename;
-
- private View view;
-
- private boolean floating;
-
- private QuickNotepadTextArea textArea;
-
- private QuickNotepadToolPanel toolPanel;
- // }}}
-
- // {{{ Constructor
- /**
- *
- * @param view the current jedit window
- * @param position a variable passed in from the script in actions.xml,
- * which can be DockableWindowManager.FLOATING, TOP, BOTTOM, LEFT, RIGHT, etc.
- * see @ref DockableWindowManager for possible values.
- */
- public QuickNotepad(View view, String position) {
- super(new BorderLayout());
- this.view = view;
- this.floating = position.equals(DockableWindowManager.FLOATING);
-
- if (jEdit.getSettingsDirectory() != null) {
- this.filename = jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "filepath");
- if (this.filename == null || this.filename.length() == 0) {
- this.filename = new String(jEdit.getSettingsDirectory()
- + File.separator + "qn.txt");
- jEdit.setProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "filepath",
- this.filename);
- }
- this.defaultFilename = this.filename;
- }
-
- this.toolPanel = new QuickNotepadToolPanel(this);
- add(BorderLayout.NORTH, this.toolPanel);
-
- if (floating)
- this.setPreferredSize(new Dimension(500, 250));
-
- textArea = new QuickNotepadTextArea();
- textArea.setFont(QuickNotepadOptionPane.makeFont());
-
- JScrollPane pane = new JScrollPane(textArea);
- add(BorderLayout.CENTER, pane);
-
- readFile();
- }
- // }}}
-
- // {{{ Member Functions
-
- // {{{ focusOnDefaultComponent
- public void focusOnDefaultComponent() {
- textArea.requestFocus();
- }
- // }}}
-
- // {{{ getFileName
- public String getFilename() {
- return filename;
- }
- // }}}
-
- // EBComponent implementation
-
- // {{{ handleMessage
- public void handleMessage(EBMessage message) {
- if (message instanceof PropertiesChanged) {
- propertiesChanged();
- }
- }
- // }}}
-
- // {{{ propertiesChanged
- private void propertiesChanged() {
- String propertyFilename = jEdit
- .getProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath");
- if (!StandardUtilities.objectsEqual(defaultFilename, propertyFilename)) {
- saveFile();
- toolPanel.propertiesChanged();
- defaultFilename = propertyFilename;
- filename = defaultFilename;
- readFile();
- }
- Font newFont = QuickNotepadOptionPane.makeFont();
- if (!newFont.equals(textArea.getFont())) {
- textArea.setFont(newFont);
- }
- }
- // }}}
-
- // These JComponent methods provide the appropriate points
- // to subscribe and unsubscribe this object to the EditBus.
-
- // {{{ addNotify
- public void addNotify() {
- super.addNotify();
- EditBus.addToBus(this);
- }
- // }}}
-
- // {{{ removeNotify
- public void removeNotify() {
- saveFile();
- super.removeNotify();
- EditBus.removeFromBus(this);
- }
- // }}}
-
- // QuickNotepadActions implementation
-
- // {{{
- public void saveFile() {
- if (filename == null || filename.length() == 0)
- return;
- try {
- FileWriter out = new FileWriter(filename);
- out.write(textArea.getText());
- out.close();
- } catch (IOException ioe) {
- Log.log(Log.ERROR, QuickNotepad.class,
- "Could not write notepad text to " + filename);
- }
- }
- // }}}
-
- // {{{ chooseFile
- public void chooseFile() {
- String[] paths = GUIUtilities.showVFSFileDialog(view, null,
- JFileChooser.OPEN_DIALOG, false);
- if (paths != null && !paths[0].equals(filename)) {
- saveFile();
- filename = paths[0];
- toolPanel.propertiesChanged();
- readFile();
- }
- }
- // }}}
-
- // {{{ copyToBuffer
- public void copyToBuffer() {
- jEdit.newFile(view);
- view.getEditPane().getTextArea().setText(textArea.getText());
- }
- // }}}
- // {{{ readFile()
- /**
- * Helper method
- */
- private void readFile() {
- if (filename == null || filename.length() == 0)
- return;
-
- BufferedReader bf = null;
- try {
- bf = new BufferedReader(new FileReader(filename));
- StringBuffer sb = new StringBuffer(2048);
- String str;
- while ((str = bf.readLine()) != null) {
- sb.append(str).append('\n');
- }
- bf.close();
- textArea.setText(sb.toString());
- } catch (FileNotFoundException fnf) {
- Log.log(Log.ERROR, QuickNotepad.class, "notepad file " + filename
- + " does not exist");
- } catch (IOException ioe) {
- Log.log(Log.ERROR, QuickNotepad.class,
- "could not read notepad file " + filename);
- }
- }
- // }}}
- // }}}
-}
-// }}}
+/*
+ * QuickNotepad.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: QuickNotepad.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+
+// {{{ imports
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import javax.swing.JFileChooser;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import org.gjt.sp.jedit.EBComponent;
+import org.gjt.sp.jedit.EBMessage;
+import org.gjt.sp.jedit.EditBus;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.gui.DefaultFocusComponent;
+import org.gjt.sp.jedit.gui.DockableWindowManager;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+// }}}
+
+// {{{ QuickNotePad class
+/**
+ *
+ * QuickNotePad - a dockable JPanel, a demonstration of a jEdit plugin.
+ *
+ */
+public class QuickNotepad extends JPanel
+ implements EBComponent, QuickNotepadActions, DefaultFocusComponent {
+
+ // {{{ Instance Variables
+ private static final long serialVersionUID = 6412255692894321789L;
+
+ private String filename;
+
+ private String defaultFilename;
+
+ private View view;
+
+ private boolean floating;
+
+ private QuickNotepadTextArea textArea;
+
+ private QuickNotepadToolPanel toolPanel;
+ // }}}
+
+ // {{{ Constructor
+ /**
+ *
+ * @param view the current jedit window
+ * @param position a variable passed in from the script in actions.xml,
+ * which can be DockableWindowManager.FLOATING, TOP, BOTTOM, LEFT, RIGHT, etc.
+ * see @ref DockableWindowManager for possible values.
+ */
+ public QuickNotepad(View view, String position) {
+ super(new BorderLayout());
+ this.view = view;
+ this.floating = position.equals(DockableWindowManager.FLOATING);
+
+ if (jEdit.getSettingsDirectory() != null) {
+ this.filename = jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "filepath");
+ if (this.filename == null || this.filename.length() == 0) {
+ this.filename = new String(jEdit.getSettingsDirectory()
+ + File.separator + "qn.txt");
+ jEdit.setProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath",
+ this.filename);
+ }
+ this.defaultFilename = this.filename;
+ }
+
+ this.toolPanel = new QuickNotepadToolPanel(this);
+ add(BorderLayout.NORTH, this.toolPanel);
+
+ if (floating)
+ this.setPreferredSize(new Dimension(500, 250));
+
+ textArea = new QuickNotepadTextArea();
+ textArea.setFont(QuickNotepadOptionPane.makeFont());
+
+ JScrollPane pane = new JScrollPane(textArea);
+ add(BorderLayout.CENTER, pane);
+
+ readFile();
+ }
+ // }}}
+
+ // {{{ Member Functions
+
+ // {{{ focusOnDefaultComponent
+ public void focusOnDefaultComponent() {
+ textArea.requestFocus();
+ }
+ // }}}
+
+ // {{{ getFileName
+ public String getFilename() {
+ return filename;
+ }
+ // }}}
+
+ // EBComponent implementation
+
+ // {{{ handleMessage
+ public void handleMessage(EBMessage message) {
+ if (message instanceof PropertiesChanged) {
+ propertiesChanged();
+ }
+ }
+ // }}}
+
+ // {{{ propertiesChanged
+ private void propertiesChanged() {
+ String propertyFilename = jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath");
+ if (!StandardUtilities.objectsEqual(defaultFilename, propertyFilename)) {
+ saveFile();
+ toolPanel.propertiesChanged();
+ defaultFilename = propertyFilename;
+ filename = defaultFilename;
+ readFile();
+ }
+ Font newFont = QuickNotepadOptionPane.makeFont();
+ if (!newFont.equals(textArea.getFont())) {
+ textArea.setFont(newFont);
+ }
+ }
+ // }}}
+
+ // These JComponent methods provide the appropriate points
+ // to subscribe and unsubscribe this object to the EditBus.
+
+ // {{{ addNotify
+ public void addNotify() {
+ super.addNotify();
+ EditBus.addToBus(this);
+ }
+ // }}}
+
+ // {{{ removeNotify
+ public void removeNotify() {
+ saveFile();
+ super.removeNotify();
+ EditBus.removeFromBus(this);
+ }
+ // }}}
+
+ // QuickNotepadActions implementation
+
+ // {{{
+ public void saveFile() {
+ if (filename == null || filename.length() == 0)
+ return;
+ try {
+ FileWriter out = new FileWriter(filename);
+ out.write(textArea.getText());
+ out.close();
+ } catch (IOException ioe) {
+ Log.log(Log.ERROR, QuickNotepad.class,
+ "Could not write notepad text to " + filename);
+ }
+ }
+ // }}}
+
+ // {{{ chooseFile
+ public void chooseFile() {
+ String[] paths = GUIUtilities.showVFSFileDialog(view, null,
+ JFileChooser.OPEN_DIALOG, false);
+ if (paths != null && !paths[0].equals(filename)) {
+ saveFile();
+ filename = paths[0];
+ toolPanel.propertiesChanged();
+ readFile();
+ }
+ }
+ // }}}
+
+ // {{{ copyToBuffer
+ public void copyToBuffer() {
+ jEdit.newFile(view);
+ view.getEditPane().getTextArea().setText(textArea.getText());
+ }
+ // }}}
+ // {{{ readFile()
+ /**
+ * Helper method
+ */
+ private void readFile() {
+ if (filename == null || filename.length() == 0)
+ return;
+
+ BufferedReader bf = null;
+ try {
+ bf = new BufferedReader(new FileReader(filename));
+ StringBuffer sb = new StringBuffer(2048);
+ String str;
+ while ((str = bf.readLine()) != null) {
+ sb.append(str).append('\n');
+ }
+ bf.close();
+ textArea.setText(sb.toString());
+ } catch (FileNotFoundException fnf) {
+ Log.log(Log.ERROR, QuickNotepad.class, "notepad file " + filename
+ + " does not exist");
+ } catch (IOException ioe) {
+ Log.log(Log.ERROR, QuickNotepad.class,
+ "could not read notepad file " + filename);
+ }
+ }
+ // }}}
+ // }}}
+}
+// }}}
diff --git a/jEdit/jars/QuickNotepad/QuickNotepad.props b/jEdit/jars/QuickNotepad/QuickNotepad.props
index b1b6b0f..46d63e0 100644
--- a/jEdit/jars/QuickNotepad/QuickNotepad.props
+++ b/jEdit/jars/QuickNotepad/QuickNotepad.props
@@ -1,67 +1,67 @@
-# Properties file for QuickNotepad plugin
-# $Id: QuickNotepad.props 6876 2006-09-02 20:39:49Z jchoyt $
-
-# jEdit only needs to load the plugin the first time the user accesses it
-# the presence of this property also tells jEdit the plugin is using the new API
-plugin.QuickNotepadPlugin.activate=defer
-
-# These two properties are required for all plugins
-plugin.QuickNotepadPlugin.name=QuickNotepad
-plugin.QuickNotepadPlugin.author=John Gellene
-
-# version number == jEdit version number
-plugin.QuickNotepadPlugin.version=4.3
-
-# online help
-plugin.QuickNotepadPlugin.docs=index.html
-
-# we only have one dependency, jEdit 4.2, since we use the new plugin API
-plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
-plugin.QuickNotepadPlugin.depend.1=jdk 1.4
-
-plugin.QuickNotepadPlugin.description=This plugin provides a dockable "scratch pad" for writing and displaying notes, to do lists or similar items as unformatted text.
-# plugin menu
-plugin.QuickNotepadPlugin.menu=quicknotepad \
- - \
- quicknotepad.choose-file \
- quicknotepad.save-file \
- quicknotepad.copy-to-buffer
-
-# action labels for actions supplied by dockables.xml
-quicknotepad.label=QuickNotepad
-
-# action labels for actions supplied by actions.xml
-quicknotepad.choose-file.label=Choose notepad file
-quicknotepad.save-file.label=Save notepad file
-quicknotepad.copy-to-buffer.label=Copy notepad to buffer
-
-# plugin option pane
-plugin.QuickNotepadPlugin.option-pane=quicknotepad
-
-# Option pane activation BeanShell snippet
-options.quicknotepad.code=new QuickNotepadOptionPane();
-
-# Option pane labels
-options.quicknotepad.label=QuickNotepad
-options.quicknotepad.file=File:
-options.quicknotepad.choose-file=Choose
-options.quicknotepad.choose-file.title=Choose a notepad file
-options.quicknotepad.choose-font=Font:
-options.quicknotepad.show-filepath.title=Display notepad file path
-
-# window title
-quicknotepad.title=QuickNotepad
-
-# window toolbar buttons
-quicknotepad.choose-file.icon=Open.png
-quicknotepad.save-file.icon=Save.png
-quicknotepad.copy-to-buffer.icon=CopyToBuffer.png
-
-# default settings
-options.quicknotepad.show-filepath=true
-options.quicknotepad.font=Monospaced
-options.quicknotepad.fontstyle=0
-options.quicknotepad.fontsize=14
-
-# Setting not defined but supplied for completeness
-options.quicknotepad.filepath=
+# Properties file for QuickNotepad plugin
+# $Id: QuickNotepad.props 6876 2006-09-02 20:39:49Z jchoyt $
+
+# jEdit only needs to load the plugin the first time the user accesses it
+# the presence of this property also tells jEdit the plugin is using the new API
+plugin.QuickNotepadPlugin.activate=defer
+
+# These two properties are required for all plugins
+plugin.QuickNotepadPlugin.name=QuickNotepad
+plugin.QuickNotepadPlugin.author=John Gellene
+
+# version number == jEdit version number
+plugin.QuickNotepadPlugin.version=4.3
+
+# online help
+plugin.QuickNotepadPlugin.docs=index.html
+
+# we only have one dependency, jEdit 4.2, since we use the new plugin API
+plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
+plugin.QuickNotepadPlugin.depend.1=jdk 1.4
+
+plugin.QuickNotepadPlugin.description=This plugin provides a dockable "scratch pad" for writing and displaying notes, to do lists or similar items as unformatted text.
+# plugin menu
+plugin.QuickNotepadPlugin.menu=quicknotepad \
+ - \
+ quicknotepad.choose-file \
+ quicknotepad.save-file \
+ quicknotepad.copy-to-buffer
+
+# action labels for actions supplied by dockables.xml
+quicknotepad.label=QuickNotepad
+
+# action labels for actions supplied by actions.xml
+quicknotepad.choose-file.label=Choose notepad file
+quicknotepad.save-file.label=Save notepad file
+quicknotepad.copy-to-buffer.label=Copy notepad to buffer
+
+# plugin option pane
+plugin.QuickNotepadPlugin.option-pane=quicknotepad
+
+# Option pane activation BeanShell snippet
+options.quicknotepad.code=new QuickNotepadOptionPane();
+
+# Option pane labels
+options.quicknotepad.label=QuickNotepad
+options.quicknotepad.file=File:
+options.quicknotepad.choose-file=Choose
+options.quicknotepad.choose-file.title=Choose a notepad file
+options.quicknotepad.choose-font=Font:
+options.quicknotepad.show-filepath.title=Display notepad file path
+
+# window title
+quicknotepad.title=QuickNotepad
+
+# window toolbar buttons
+quicknotepad.choose-file.icon=Open.png
+quicknotepad.save-file.icon=Save.png
+quicknotepad.copy-to-buffer.icon=CopyToBuffer.png
+
+# default settings
+options.quicknotepad.show-filepath=true
+options.quicknotepad.font=Monospaced
+options.quicknotepad.fontstyle=0
+options.quicknotepad.fontsize=14
+
+# Setting not defined but supplied for completeness
+options.quicknotepad.filepath=
diff --git a/jEdit/jars/QuickNotepad/QuickNotepadActions.java b/jEdit/jars/QuickNotepad/QuickNotepadActions.java
index 74f7b4d..0587e9e 100644
--- a/jEdit/jars/QuickNotepad/QuickNotepadActions.java
+++ b/jEdit/jars/QuickNotepad/QuickNotepadActions.java
@@ -1,30 +1,30 @@
-/*
- * QuickNotepadActions.java
- * part of the QuickNotepad plugin for the jEdit text editor
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: QuickNotepadActions.java 12504 2008-04-22 23:12:43Z ezust $
- */
-
-interface QuickNotepadActions {
- void chooseFile();
-
- void saveFile();
-
- void copyToBuffer();
-}
+/*
+ * QuickNotepadActions.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: QuickNotepadActions.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+
+interface QuickNotepadActions {
+ void chooseFile();
+
+ void saveFile();
+
+ void copyToBuffer();
+}
diff --git a/jEdit/jars/QuickNotepad/QuickNotepadOptionPane.java b/jEdit/jars/QuickNotepad/QuickNotepadOptionPane.java
index a50aa0b..74f9345 100644
--- a/jEdit/jars/QuickNotepad/QuickNotepadOptionPane.java
+++ b/jEdit/jars/QuickNotepad/QuickNotepadOptionPane.java
@@ -1,127 +1,127 @@
-/*
- * QuickNotepadOptionPane.java
- * part of the QuickNotepad plugin for the jEdit text editor
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: QuickNotepadOptionPane.java 12504 2008-04-22 23:12:43Z ezust $
- */
-
-import java.awt.BorderLayout;
-import java.awt.Font;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JFileChooser;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-
-import org.gjt.sp.jedit.AbstractOptionPane;
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.gui.FontSelector;
-
-public class QuickNotepadOptionPane extends AbstractOptionPane implements
- ActionListener {
- private JCheckBox showPath;
-
- private JTextField pathName;
-
- private FontSelector font;
-
- public QuickNotepadOptionPane() {
- super(QuickNotepadPlugin.NAME);
- }
-
- public void _init() {
- showPath = new JCheckBox(jEdit
- .getProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "show-filepath.title"), jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals(
- "true"));
- addComponent(showPath);
-
- pathName = new JTextField(jEdit
- .getProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath"));
- JButton pickPath = new JButton(jEdit
- .getProperty(QuickNotepadPlugin.OPTION_PREFIX + "choose-file"));
- pickPath.addActionListener(this);
-
- JPanel pathPanel = new JPanel(new BorderLayout(0, 0));
- pathPanel.add(pathName, BorderLayout.CENTER);
- pathPanel.add(pickPath, BorderLayout.EAST);
-
- addComponent(jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "file"), pathPanel);
-
- font = new FontSelector(makeFont());
- addComponent(jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "choose-font"), font);
- }
-
- public void _save() {
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath",
- pathName.getText());
- Font _font = font.getFont();
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "font", _font
- .getFamily());
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "fontsize", String
- .valueOf(_font.getSize()));
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "fontstyle",
- String.valueOf(_font.getStyle()));
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "show-filepath",
- String.valueOf(showPath.isSelected()));
- }
-
- // end AbstractOptionPane implementation
-
- // begin ActionListener implementation
- public void actionPerformed(ActionEvent evt) {
- String[] paths = GUIUtilities.showVFSFileDialog(null, null,
- JFileChooser.OPEN_DIALOG, false);
- if (paths != null) {
- pathName.setText(paths[0]);
- }
- }
-
- // helper method to get Font from plugin properties
- static public Font makeFont() {
- int style, size;
- String family = jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "font");
- try {
- size = Integer
- .parseInt(jEdit
- .getProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "fontsize"));
- } catch (NumberFormatException nf) {
- size = 14;
- }
- try {
- style = Integer
- .parseInt(jEdit
- .getProperty(QuickNotepadPlugin.OPTION_PREFIX
- + "fontstyle"));
- } catch (NumberFormatException nf) {
- style = Font.PLAIN;
- }
- return new Font(family, style, size);
- }
-
-}
+/*
+ * QuickNotepadOptionPane.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: QuickNotepadOptionPane.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+
+import java.awt.BorderLayout;
+import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JFileChooser;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import org.gjt.sp.jedit.AbstractOptionPane;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.gui.FontSelector;
+
+public class QuickNotepadOptionPane extends AbstractOptionPane implements
+ ActionListener {
+ private JCheckBox showPath;
+
+ private JTextField pathName;
+
+ private FontSelector font;
+
+ public QuickNotepadOptionPane() {
+ super(QuickNotepadPlugin.NAME);
+ }
+
+ public void _init() {
+ showPath = new JCheckBox(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "show-filepath.title"), jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals(
+ "true"));
+ addComponent(showPath);
+
+ pathName = new JTextField(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath"));
+ JButton pickPath = new JButton(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX + "choose-file"));
+ pickPath.addActionListener(this);
+
+ JPanel pathPanel = new JPanel(new BorderLayout(0, 0));
+ pathPanel.add(pathName, BorderLayout.CENTER);
+ pathPanel.add(pickPath, BorderLayout.EAST);
+
+ addComponent(jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "file"), pathPanel);
+
+ font = new FontSelector(makeFont());
+ addComponent(jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "choose-font"), font);
+ }
+
+ public void _save() {
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath",
+ pathName.getText());
+ Font _font = font.getFont();
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "font", _font
+ .getFamily());
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "fontsize", String
+ .valueOf(_font.getSize()));
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "fontstyle",
+ String.valueOf(_font.getStyle()));
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "show-filepath",
+ String.valueOf(showPath.isSelected()));
+ }
+
+ // end AbstractOptionPane implementation
+
+ // begin ActionListener implementation
+ public void actionPerformed(ActionEvent evt) {
+ String[] paths = GUIUtilities.showVFSFileDialog(null, null,
+ JFileChooser.OPEN_DIALOG, false);
+ if (paths != null) {
+ pathName.setText(paths[0]);
+ }
+ }
+
+ // helper method to get Font from plugin properties
+ static public Font makeFont() {
+ int style, size;
+ String family = jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "font");
+ try {
+ size = Integer
+ .parseInt(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "fontsize"));
+ } catch (NumberFormatException nf) {
+ size = 14;
+ }
+ try {
+ style = Integer
+ .parseInt(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "fontstyle"));
+ } catch (NumberFormatException nf) {
+ style = Font.PLAIN;
+ }
+ return new Font(family, style, size);
+ }
+
+}
diff --git a/jEdit/jars/QuickNotepad/QuickNotepadPlugin.java b/jEdit/jars/QuickNotepad/QuickNotepadPlugin.java
index 28ae46a..d2d0d85 100644
--- a/jEdit/jars/QuickNotepad/QuickNotepadPlugin.java
+++ b/jEdit/jars/QuickNotepad/QuickNotepadPlugin.java
@@ -1,34 +1,34 @@
-/*
- * QuickNotepadPlugin.java
- * part of the QuickNotepad plugin for the jEdit text editor
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: QuickNotepadPlugin.java 12504 2008-04-22 23:12:43Z ezust $
- */
-
-import org.gjt.sp.jedit.EditPlugin;
-
-/**
- * The QuickNotepad plugin
- *
- * @author John Gellene
- */
-public class QuickNotepadPlugin extends EditPlugin {
- public static final String NAME = "quicknotepad";
- public static final String OPTION_PREFIX = "options.quicknotepad.";
-}
+/*
+ * QuickNotepadPlugin.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: QuickNotepadPlugin.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+
+import org.gjt.sp.jedit.EditPlugin;
+
+/**
+ * The QuickNotepad plugin
+ *
+ * @author John Gellene
+ */
+public class QuickNotepadPlugin extends EditPlugin {
+ public static final String NAME = "quicknotepad";
+ public static final String OPTION_PREFIX = "options.quicknotepad.";
+}
diff --git a/jEdit/jars/QuickNotepad/QuickNotepadTextArea.java b/jEdit/jars/QuickNotepad/QuickNotepadTextArea.java
index 24bb5cb..44f5456 100644
--- a/jEdit/jars/QuickNotepad/QuickNotepadTextArea.java
+++ b/jEdit/jars/QuickNotepad/QuickNotepadTextArea.java
@@ -1,33 +1,33 @@
-/*
- * QuickNotepadTextArea.java
- * part of the QuickNotepad plugin for the jEditTextArea
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: QuickNotepadTextArea.java 12504 2008-04-22 23:12:43Z ezust $
- */
-
-import javax.swing.JTextArea;
-
-public class QuickNotepadTextArea extends JTextArea {
- public QuickNotepadTextArea() {
- super();
- setLineWrap(true);
- setWrapStyleWord(true);
- setTabSize(4);
- }
-}
+/*
+ * QuickNotepadTextArea.java
+ * part of the QuickNotepad plugin for the jEditTextArea
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: QuickNotepadTextArea.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+
+import javax.swing.JTextArea;
+
+public class QuickNotepadTextArea extends JTextArea {
+ public QuickNotepadTextArea() {
+ super();
+ setLineWrap(true);
+ setWrapStyleWord(true);
+ setTabSize(4);
+ }
+}
diff --git a/jEdit/jars/QuickNotepad/QuickNotepadToolPanel.java b/jEdit/jars/QuickNotepad/QuickNotepadToolPanel.java
index 98fce48..f76f002 100644
--- a/jEdit/jars/QuickNotepad/QuickNotepadToolPanel.java
+++ b/jEdit/jars/QuickNotepad/QuickNotepadToolPanel.java
@@ -1,100 +1,100 @@
-/*
- * QuickNotepadToolPanel.java
- * part of the QuickNotepad plugin for the jEdit text editor
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: QuickNotepadToolPanel.java 12504 2008-04-22 23:12:43Z ezust $
- */
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.AbstractButton;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.gui.RolloverButton;
-
-public class QuickNotepadToolPanel extends JPanel {
- private QuickNotepad pad;
-
- private JLabel label;
-
- public QuickNotepadToolPanel(QuickNotepad qnpad) {
- setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
- pad = qnpad;
-
- Box labelBox = new Box(BoxLayout.Y_AXIS);
- labelBox.add(Box.createGlue());
-
- label = new JLabel(pad.getFilename());
- label.setVisible(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals(
- "true"));
-
- labelBox.add(label);
- labelBox.add(Box.createGlue());
-
- add(labelBox);
-
- add(Box.createGlue());
-
- add(makeCustomButton("quicknotepad.choose-file", new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.chooseFile();
- }
- }));
- add(makeCustomButton("quicknotepad.save-file", new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.saveFile();
- }
- }));
- add(makeCustomButton("quicknotepad.copy-to-buffer",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.copyToBuffer();
- }
- }));
- }
-
- void propertiesChanged() {
- label.setText(pad.getFilename());
- label.setVisible(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals(
- "true"));
- }
-
- private AbstractButton makeCustomButton(String name, ActionListener listener) {
- String toolTip = jEdit.getProperty(name.concat(".label"));
- AbstractButton b = new RolloverButton(GUIUtilities.loadIcon(jEdit
- .getProperty(name + ".icon")));
- if (listener != null) {
- b.addActionListener(listener);
- b.setEnabled(true);
- } else {
- b.setEnabled(false);
- }
- b.setToolTipText(toolTip);
- return b;
- }
-
-}
+/*
+ * QuickNotepadToolPanel.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: QuickNotepadToolPanel.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.AbstractButton;
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.gui.RolloverButton;
+
+public class QuickNotepadToolPanel extends JPanel {
+ private QuickNotepad pad;
+
+ private JLabel label;
+
+ public QuickNotepadToolPanel(QuickNotepad qnpad) {
+ setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
+ pad = qnpad;
+
+ Box labelBox = new Box(BoxLayout.Y_AXIS);
+ labelBox.add(Box.createGlue());
+
+ label = new JLabel(pad.getFilename());
+ label.setVisible(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals(
+ "true"));
+
+ labelBox.add(label);
+ labelBox.add(Box.createGlue());
+
+ add(labelBox);
+
+ add(Box.createGlue());
+
+ add(makeCustomButton("quicknotepad.choose-file", new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.chooseFile();
+ }
+ }));
+ add(makeCustomButton("quicknotepad.save-file", new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.saveFile();
+ }
+ }));
+ add(makeCustomButton("quicknotepad.copy-to-buffer",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.copyToBuffer();
+ }
+ }));
+ }
+
+ void propertiesChanged() {
+ label.setText(pad.getFilename());
+ label.setVisible(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals(
+ "true"));
+ }
+
+ private AbstractButton makeCustomButton(String name, ActionListener listener) {
+ String toolTip = jEdit.getProperty(name.concat(".label"));
+ AbstractButton b = new RolloverButton(GUIUtilities.loadIcon(jEdit
+ .getProperty(name + ".icon")));
+ if (listener != null) {
+ b.addActionListener(listener);
+ b.setEnabled(true);
+ } else {
+ b.setEnabled(false);
+ }
+ b.setToolTipText(toolTip);
+ return b;
+ }
+
+}
diff --git a/jEdit/jars/QuickNotepad/README.txt b/jEdit/jars/QuickNotepad/README.txt
index 39993a8..f4fc99b 100644
--- a/jEdit/jars/QuickNotepad/README.txt
+++ b/jEdit/jars/QuickNotepad/README.txt
@@ -1,12 +1,12 @@
-QUICK NOTEPAD PLUGIN
-
-The jEdit source distribution includes source code for an example plugin
-named 'QuickNotepad', written by John Gellene.
-
-The plugin source is discussed in detail in the 'Writing Plugins' part
-of the user's guide.
-
-The source code has been updated to conform the the Plugin API for version 4.0
-of jEdit. The file changes40.txt outlines the changes that were made from the
-version distributed with jEdit 3.2.2.
-
+QUICK NOTEPAD PLUGIN
+
+The jEdit source distribution includes source code for an example plugin
+named 'QuickNotepad', written by John Gellene.
+
+The plugin source is discussed in detail in the 'Writing Plugins' part
+of the user's guide.
+
+The source code has been updated to conform the the Plugin API for version 4.0
+of jEdit. The file changes40.txt outlines the changes that were made from the
+version distributed with jEdit 3.2.2.
+
diff --git a/jEdit/jars/QuickNotepad/actions.xml b/jEdit/jars/QuickNotepad/actions.xml
index c1caee5..b40297f 100644
--- a/jEdit/jars/QuickNotepad/actions.xml
+++ b/jEdit/jars/QuickNotepad/actions.xml
@@ -1,29 +1,29 @@
-<!-- Action definition file for QuickNotepad plugin -->
-<!-- $Id: actions.xml 5152 2004-12-05 04:37:06Z spestov $
--->
-
-<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
-
-<ACTIONS>
- <ACTION NAME="quicknotepad.choose-file">
- <CODE>
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).chooseFile();
- </CODE>
- </ACTION>
-
- <ACTION NAME="quicknotepad.save-file">
- <CODE>
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).saveFile();
- </CODE>
- </ACTION>
-
- <ACTION NAME="quicknotepad.copy-to-buffer">
- <CODE>
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).copyToBuffer();
- </CODE>
- </ACTION>
-</ACTIONS>
-
+<!-- Action definition file for QuickNotepad plugin -->
+<!-- $Id: actions.xml 5152 2004-12-05 04:37:06Z spestov $
+-->
+
+<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
+
+<ACTIONS>
+ <ACTION NAME="quicknotepad.choose-file">
+ <CODE>
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).chooseFile();
+ </CODE>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad.save-file">
+ <CODE>
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).saveFile();
+ </CODE>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad.copy-to-buffer">
+ <CODE>
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).copyToBuffer();
+ </CODE>
+ </ACTION>
+</ACTIONS>
+
diff --git a/jEdit/jars/QuickNotepad/build.xml b/jEdit/jars/QuickNotepad/build.xml
index 7ad38fe..3451e56 100644
--- a/jEdit/jars/QuickNotepad/build.xml
+++ b/jEdit/jars/QuickNotepad/build.xml
@@ -1,23 +1,23 @@
-<?xml version="1.0"?>
-<project name="QuickNotepad"
- default="build">
- <description>
- This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
- </description>
-
- <property file="build.properties"/>
- <property file="../build.properties"/>
-
- <property name="jedit.install.dir"
- location="../../build" />
- <property name="user-doc.xml"
- value="users-guide.xml" />
-
- <property name="build.support"
- value="../../../build-support" />
- <import file="${build.support}/plugin-build.xml" />
-
- <selector id="docSrcFiles">
- <filename name="users-guide.xml" />
- </selector>
-</project>
+<?xml version="1.0"?>
+<project name="QuickNotepad"
+ default="build">
+ <description>
+ This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
+ </description>
+
+ <property file="build.properties"/>
+ <property file="../build.properties"/>
+
+ <property name="jedit.install.dir"
+ location="../../build" />
+ <property name="user-doc.xml"
+ value="users-guide.xml" />
+
+ <property name="build.support"
+ value="../../../build-support" />
+ <import file="${build.support}/plugin-build.xml" />
+
+ <selector id="docSrcFiles">
+ <filename name="users-guide.xml" />
+ </selector>
+</project>
diff --git a/jEdit/jars/QuickNotepad/changes40.txt b/jEdit/jars/QuickNotepad/changes40.txt
index 845dbb2..452dc60 100644
--- a/jEdit/jars/QuickNotepad/changes40.txt
+++ b/jEdit/jars/QuickNotepad/changes40.txt
@@ -1,99 +1,99 @@
-$Id: changes40.txt 3890 2001-11-11 03:02:31Z jgellene $
-
-Changes made to QuickNotepad plugin for jEdit 4.0:
-
-(1) Under jEdit 3.2.2 and prior versions, the plugin had a separate class,
-QuickNotepadDockable, implementing the DockableWindow interface. The class's
-methods delegated actions to the plugin's top-level visible component, a class
-derived from JPanel called QuickNotepad. The DockableWindow interface is
-deprecated in jEdit 4.0, so this class was eliminated. If the top-level
-component had implemented the DockableWindow interface, it would have been
-necessary to remove DockableWindow as an implemented interface and the eliminate
-the getName() and getComponent() methods of that interface in the plugin class.
-
-(2) A new file, dockables.xml, was created containing XML markup for the
-constructor of a plugin component. Under the new plugin API, this file is read
-to determine the method call or calls for constructing a new instance of a
-dockable plugin component. The file is quite short:
-
-<?xml version="1.0"?>
-
-<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
-
-<!-- QuickNotepad dockable window -->
-
-<DOCKABLES>
- <DOCKABLE NAME="quicknotepad">
- new QuickNotepad(view, position);
- </DOCKABLE>
-</DOCKABLES>
-
-The parameters are those found in the existing version of the QuickNotepad
-constructor. Both "view" and "position" are defined by the new plugin API in the
-namespace in which the constructor is called. The value of position is taken
-from optional properties set by the user. In the absence of a user setting, the
-position parameter is set to place the plugin component in a floating window.
-
-The NAME attribute is taken to conform to the value of the static variable
-QuickNotepadPlugin.NAME, which is also used to identify the plugin in the user
-action code contained in actions.xml.
-
-By default, the plugin API adds two actions for a plugin. The first is entitled
-[name of plugin] (in this case, "quicknotepad"), and simply activates the plugin
-by executing the code contained in the DOCKABLE element. The second action
-toggles the plugin's visible component, the title of the action is [name of
-plugin]-toggle (in this case, "quicknotepad-toggle"). The plugin API handles
-this action internally.
-
-To prevent these actions from being created, you can add a NO_ACTIONS="true"
-attribute to the DOCKABLE element. The NAME and NO_ACTIONS attributes are the
-only attributes defined for a DOCKABLE entry. A NAME is required; NO_ACTIONS is
-set to "false" by default.
-
-(3) In the actions.xml file, the user action definitions were revised to call
-DockableWindowManager.getDockable() instead of
-DockableManager.getDockableWindow(). In addition, the actions for toggling the
-plugin docking window and bringing the QuickNotepad window to the foreground
-were eliminated. The toggle action was duplicative of the built-in action
-supplied through dockables.xml, and the "bring to front" action had become
-redundant.
-
-(4) There were two deletions made in QuickNotepadPlugin, the main plugin class.
-
-The handleMessage() method was eliminated because it was only necessary for the
-plugin to listen for the CreateDockableWindow message. As a result, it is no
-longer necessary for this plugin to connect to the EditBus, so its derivation
-was changed from EBPlugin to EditPlugin. Individual instances of the
-QuickNotepad class still need to listen for a PropertiesChanged message, so that
-class continues to implement EBComponent.
-
-In addition, since the EditBus no longer maintains an active list of windows,
-the call to EditBus.addToNamedList() is no longer needed in the class's start()
-method and so was eliminated, leaving an empty start() method.
-
-(5) No changes were required in the option pane class, QuickNotepadOptionsPane,
-or the other other classes defining components of the plugin.
-
-(6) Finally, several changes were made to the propoerties file of the plugin,
-QuickNotepad.props. First, the plugin's dependency properties were changed to
-make the plugin dependent upon version 4.0 or greater of jEdit:
-
-plugin.QuickNotepadPlugin.depend.1=jedit 04.00.00.00
-
-Next, the quicknotepad.title property was eliminated, and the "label" properties
-for the docking window and plugin menu were reorganized into two categories:
-labels for action created by dockable.xml (quicknotepad.label and
-quicknotepad-toggle.label), and labels for actions created by actions.xml (the
-remaining user actions: "choose-file", "save-file" and "copy-to-buffer").
-
-The plugin was built using the standard build.xml supplied for plugins,
-after checking to make sure that the name of the plugin and the location of
-jedit.jar were correct. It was also necessary to add dockables.xml to the list
-of files to be archived by the jar utility. Iterations of the build process
-helped to uncover deprecated API elements.
-
-The help file was built from DocBook XML source using xsltproc. The build.xml
-Ant build file and the users-guide.xsl customization file contain annotations
-which may be helpful in building plugin documentation. In particular, a few
-<indexterm> tags were added to the documentation source to provide references
-for the index to be generated for all plugin files.
+$Id: changes40.txt 3890 2001-11-11 03:02:31Z jgellene $
+
+Changes made to QuickNotepad plugin for jEdit 4.0:
+
+(1) Under jEdit 3.2.2 and prior versions, the plugin had a separate class,
+QuickNotepadDockable, implementing the DockableWindow interface. The class's
+methods delegated actions to the plugin's top-level visible component, a class
+derived from JPanel called QuickNotepad. The DockableWindow interface is
+deprecated in jEdit 4.0, so this class was eliminated. If the top-level
+component had implemented the DockableWindow interface, it would have been
+necessary to remove DockableWindow as an implemented interface and the eliminate
+the getName() and getComponent() methods of that interface in the plugin class.
+
+(2) A new file, dockables.xml, was created containing XML markup for the
+constructor of a plugin component. Under the new plugin API, this file is read
+to determine the method call or calls for constructing a new instance of a
+dockable plugin component. The file is quite short:
+
+<?xml version="1.0"?>
+
+<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
+
+<!-- QuickNotepad dockable window -->
+
+<DOCKABLES>
+ <DOCKABLE NAME="quicknotepad">
+ new QuickNotepad(view, position);
+ </DOCKABLE>
+</DOCKABLES>
+
+The parameters are those found in the existing version of the QuickNotepad
+constructor. Both "view" and "position" are defined by the new plugin API in the
+namespace in which the constructor is called. The value of position is taken
+from optional properties set by the user. In the absence of a user setting, the
+position parameter is set to place the plugin component in a floating window.
+
+The NAME attribute is taken to conform to the value of the static variable
+QuickNotepadPlugin.NAME, which is also used to identify the plugin in the user
+action code contained in actions.xml.
+
+By default, the plugin API adds two actions for a plugin. The first is entitled
+[name of plugin] (in this case, "quicknotepad"), and simply activates the plugin
+by executing the code contained in the DOCKABLE element. The second action
+toggles the plugin's visible component, the title of the action is [name of
+plugin]-toggle (in this case, "quicknotepad-toggle"). The plugin API handles
+this action internally.
+
+To prevent these actions from being created, you can add a NO_ACTIONS="true"
+attribute to the DOCKABLE element. The NAME and NO_ACTIONS attributes are the
+only attributes defined for a DOCKABLE entry. A NAME is required; NO_ACTIONS is
+set to "false" by default.
+
+(3) In the actions.xml file, the user action definitions were revised to call
+DockableWindowManager.getDockable() instead of
+DockableManager.getDockableWindow(). In addition, the actions for toggling the
+plugin docking window and bringing the QuickNotepad window to the foreground
+were eliminated. The toggle action was duplicative of the built-in action
+supplied through dockables.xml, and the "bring to front" action had become
+redundant.
+
+(4) There were two deletions made in QuickNotepadPlugin, the main plugin class.
+
+The handleMessage() method was eliminated because it was only necessary for the
+plugin to listen for the CreateDockableWindow message. As a result, it is no
+longer necessary for this plugin to connect to the EditBus, so its derivation
+was changed from EBPlugin to EditPlugin. Individual instances of the
+QuickNotepad class still need to listen for a PropertiesChanged message, so that
+class continues to implement EBComponent.
+
+In addition, since the EditBus no longer maintains an active list of windows,
+the call to EditBus.addToNamedList() is no longer needed in the class's start()
+method and so was eliminated, leaving an empty start() method.
+
+(5) No changes were required in the option pane class, QuickNotepadOptionsPane,
+or the other other classes defining components of the plugin.
+
+(6) Finally, several changes were made to the propoerties file of the plugin,
+QuickNotepad.props. First, the plugin's dependency properties were changed to
+make the plugin dependent upon version 4.0 or greater of jEdit:
+
+plugin.QuickNotepadPlugin.depend.1=jedit 04.00.00.00
+
+Next, the quicknotepad.title property was eliminated, and the "label" properties
+for the docking window and plugin menu were reorganized into two categories:
+labels for action created by dockable.xml (quicknotepad.label and
+quicknotepad-toggle.label), and labels for actions created by actions.xml (the
+remaining user actions: "choose-file", "save-file" and "copy-to-buffer").
+
+The plugin was built using the standard build.xml supplied for plugins,
+after checking to make sure that the name of the plugin and the location of
+jedit.jar were correct. It was also necessary to add dockables.xml to the list
+of files to be archived by the jar utility. Iterations of the build process
+helped to uncover deprecated API elements.
+
+The help file was built from DocBook XML source using xsltproc. The build.xml
+Ant build file and the users-guide.xsl customization file contain annotations
+which may be helpful in building plugin documentation. In particular, a few
+<indexterm> tags were added to the documentation source to provide references
+for the index to be generated for all plugin files.
diff --git a/jEdit/jars/QuickNotepad/changes42.txt b/jEdit/jars/QuickNotepad/changes42.txt
index d86f534..eadd27a 100644
--- a/jEdit/jars/QuickNotepad/changes42.txt
+++ b/jEdit/jars/QuickNotepad/changes42.txt
@@ -1,26 +1,26 @@
-$Id: changes42.txt 4665 2003-04-30 05:28:55Z spestov $
-
-Changes made to QuickNotepad plugin for jEdit 4.2:
-
-(1) The following property was added:
-
- plugin.QuickNotepadPlugin.activate=defer
-
-This informs jEdit the plugin is using the new API, and that it should only be
-loaded the first time it is accessed by the user.
-
-(2) The createMenuItems() method of the plugin core class has been removed. The
-plugin menu is now specified with the following property:
-
- plugin.QuickNotepadPlugin.menu=... list of menu items ...
-
-(3) The createOptionPanes() method of the plugin core class has been removed. The plugin option pane is now specified with the following property:
-
- plugin.QuickNotepadPlugin.option-pane=quicknotepad
-
-(4) The QuickNotepad class (the dockable window) implements the new DefaultFocusComponent interface, and the following method was added to this class:
-
- public void focusOnDefaultComponent()
- {
- textArea.requestFocus();
- }
+$Id: changes42.txt 4665 2003-04-30 05:28:55Z spestov $
+
+Changes made to QuickNotepad plugin for jEdit 4.2:
+
+(1) The following property was added:
+
+ plugin.QuickNotepadPlugin.activate=defer
+
+This informs jEdit the plugin is using the new API, and that it should only be
+loaded the first time it is accessed by the user.
+
+(2) The createMenuItems() method of the plugin core class has been removed. The
+plugin menu is now specified with the following property:
+
+ plugin.QuickNotepadPlugin.menu=... list of menu items ...
+
+(3) The createOptionPanes() method of the plugin core class has been removed. The plugin option pane is now specified with the following property:
+
+ plugin.QuickNotepadPlugin.option-pane=quicknotepad
+
+(4) The QuickNotepad class (the dockable window) implements the new DefaultFocusComponent interface, and the following method was added to this class:
+
+ public void focusOnDefaultComponent()
+ {
+ textArea.requestFocus();
+ }
diff --git a/jEdit/jars/QuickNotepad/description.html b/jEdit/jars/QuickNotepad/description.html
index af044ee..042b442 100644
--- a/jEdit/jars/QuickNotepad/description.html
+++ b/jEdit/jars/QuickNotepad/description.html
@@ -1,8 +1,8 @@
-This plugin provides a dockable "scratch pad" for writing
-and displaying notes, to do lists or similar items as unformatted text.
-The text is automatically saved upon closing the plugin or exiting
-jEdit. It can also be saved manually. The user can change the file to be
-displayed during the current editing session. The path of the default
-notepad file can be changed as a user option. Finally, the text file can
-be copied to a new, untitled jEdit buffer so that it can be edited by the
-main program.
+This plugin provides a dockable "scratch pad" for writing
+and displaying notes, to do lists or similar items as unformatted text.
+The text is automatically saved upon closing the plugin or exiting
+jEdit. It can also be saved manually. The user can change the file to be
+displayed during the current editing session. The path of the default
+notepad file can be changed as a user option. Finally, the text file can
+be copied to a new, untitled jEdit buffer so that it can be edited by the
+main program.
diff --git a/jEdit/jars/QuickNotepad/dockables.xml b/jEdit/jars/QuickNotepad/dockables.xml
index b479e8b..7c026df 100644
--- a/jEdit/jars/QuickNotepad/dockables.xml
+++ b/jEdit/jars/QuickNotepad/dockables.xml
@@ -1,15 +1,15 @@
-<?xml version="1.0"?>
-
-<!-- Dockable component definition file for QuickNotepad plugin -->
-<!-- $Id: dockables.xml 4474 2003-02-09 20:37:14Z spestov $
--->
-
-<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
-
-<!-- QuickNotepad dockable windows -->
-
-<DOCKABLES>
- <DOCKABLE NAME="quicknotepad">
- new QuickNotepad(view, position);
- </DOCKABLE>
-</DOCKABLES>
+<?xml version="1.0"?>
+
+<!-- Dockable component definition file for QuickNotepad plugin -->
+<!-- $Id: dockables.xml 4474 2003-02-09 20:37:14Z spestov $
+-->
+
+<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
+
+<!-- QuickNotepad dockable windows -->
+
+<DOCKABLES>
+ <DOCKABLE NAME="quicknotepad">
+ new QuickNotepad(view, position);
+ </DOCKABLE>
+</DOCKABLES>
diff --git a/jEdit/jars/QuickNotepad/users-guide.xml b/jEdit/jars/QuickNotepad/users-guide.xml
index 7339014..ebf15ec 100644
--- a/jEdit/jars/QuickNotepad/users-guide.xml
+++ b/jEdit/jars/QuickNotepad/users-guide.xml
@@ -1,277 +1,277 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- QuickNotepad 2.0 help documentation -->
-<!-- Copyright (C) 2001 John Gellene -->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<article id="QuickNotepad">
- <articleinfo>
- <author>
- <firstname>John</firstname>
-
- <surname>Gellene</surname>
-
- <affiliation>
- <address><email>jgellene at nyc.rr.com</email></address>
- </affiliation>
- </author>
-
- <copyright>
- <year>2001</year>
-
- <holder>John Gellene</holder>
- </copyright>
-
- <legalnotice>
- <title>Legal Notice</title>
-
- <para>Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation License,
- Version 1.1 or any later version published by the Free Software
- Foundation; with no <quote>Invariant Sections</quote>,
- <quote>Front-Cover Texts</quote> or <quote>Back-Cover Texts</quote>,
- each as defined in the license. A copy of the license is included in
- the file <filename>COPYING.DOC.txt</filename> included with the
- jEdit distribution.</para>
- </legalnotice>
-
- <title>QuickNotepad 4.2</title>
- </articleinfo>
-
- <simplesect>
- <title>Introduction</title>
-
- <indexterm>
- <primary>QuickNotepad</primary>
- </indexterm>
-
- <para>This plugin provides a dockable <quote>scratch pad</quote> for
- writing and displaying notes, to do lists or similar items as
- unformatted text. The text is automatically saved upon closing the
- plugin or exiting jEdit. It can also be saved manually. The user can
- change the file to be displayed during the current editing session. The
- path of the default notepad file can be changed as a user option.
- Finally, the text file can be copied to a new, untitled jEdit buffer so
- that it can be edited by the main program.</para>
-
- <para>The <citetitle>jEdit Plugin Guide</citetitle> details the
- development and design of QuickNotepad. It is a simple but functional
- dockable plugin that incorporates the basic elements of the jEdit plugin
- architecture.</para>
-
- <para>The file <filename>changes42.txt</filename> in the plugin's source
- code details the changes that were made to the plugin to conform to the
- new plugin API for jEdit version 4.2.</para>
-
- <para>The file <filename>changes40.txt</filename> in the plugin's source
- code details the changes that were made to the plugin to conform to the
- new plugin API for jEdit version 4.0.</para>
- </simplesect>
-
- <simplesect>
- <title>Operation</title>
-
- <para><indexterm>
- <primary>QuickNotepad</primary>
-
- <secondary>shortcut keys</secondary>
- </indexterm> When QuickNotepad is activated, it loads and displays
- the file stored in its properties as unformatted text. The text can be
- edited using the keyboard and mouse. The text area component recognizes
- the following basic editing shortcuts:</para>
-
- <!-- Limitations on xsltproc's capabilities require a blank column between -->
-
- <!-- the two columns of data to provide spacing for the table. -->
-
- <informaltable frame="none">
- <tgroup align="left" cols="4">
- <colspec colnum="1" />
-
- <!-- blank column -->
-
- <colspec colnum="2" />
-
- <colspec colnum="3" />
-
- <!-- blank column -->
-
- <colspec colnum="4" />
-
- <tbody>
- <row>
- <entry></entry>
-
- <entry>Cut</entry>
-
- <entry></entry>
-
- <entry><keycombo action="simul">
- <keysym>Ctrl</keysym>
-
- <keysym>x</keysym>
- </keycombo></entry>
- </row>
-
- <row>
- <entry></entry>
-
- <entry>Copy</entry>
-
- <entry></entry>
-
- <entry><keycombo action="simul">
- <keysym>Ctrl</keysym>
-
- <keysym>c</keysym>
- </keycombo></entry>
- </row>
-
- <row>
- <entry></entry>
-
- <entry>Paste</entry>
-
- <entry></entry>
-
- <entry><keycombo action="simul">
- <keysym>Ctrl</keysym>
-
- <keysym>v</keysym>
- </keycombo></entry>
- </row>
-
- <row>
- <entry></entry>
-
- <entry>Select All</entry>
-
- <entry></entry>
-
- <entry><keycombo action="simul">
- <keysym>Ctrl</keysym>
-
- <keysym>a</keysym>
- </keycombo></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>QuickNotepad ignores function keys and other combination key
- presses.</para>
- </simplesect>
-
- <simplesect>
- <title>Toolbar buttons</title>
-
- <para>Three buttons above the text area provide file management
- operations:</para>
-
- <itemizedlist>
- <listitem>
- <para><guilabel>Choose notepad file</guilabel> - this button
- opens a file selection dialog permitting the user to select a
- different file to view in the text area. If a new file is
- selected, the old file is auomatically saved. The selection is
- valid only for the current editing session; to change the
- default QuickNotepad file for future sessions, use the <link
- linkend="options">options dialog</link>.</para>
- </listitem>
-
- <listitem>
- <para><guilabel>Save notepad file</guilabel> - this button
- causes QuickNotepad to write the contents of the text area to
- the designated notepad file. To save the text to another file
- name, use the <guilabel>Copy notepad to buffer</guilabel>
- operation.</para>
- </listitem>
-
- <listitem>
- <para><guilabel>Copy notepad to buffer</guilabel> - this button
- causes the contents of the text to be written to a newly
- created, untitled buffer in the main text editing area. This
- operation does not alter the QuickNotepad text area or write its
- text to storage. Further changes to either the QuickNotepad text
- area or the new buffer will not affect the other.</para>
- </listitem>
- </itemizedlist>
-
- <para>These operations are listed in the menu which appears for
- QuickNotepad under the <guimenu>Plugins</guimenu> heading. They can also
- be made the subject of keyboard shortcuts in the <guilabel>Plugin
- Shortcuts</guilabel> pane of jEdit's options dialog.</para>
-
- <para>One other operation is available as a keyboard shortcut.
- <guilabel>Bring QuickNotepad to front</guilabel> activates the plugin
- and makes visible if it is currently hidden in a docking window.</para>
- </simplesect>
-
- <simplesect id="options">
- <title>Options</title>
-
- <indexterm>
- <primary>QuickNotepad</primary>
-
- <secondary>options</secondary>
- </indexterm>
-
- <para>There are three options which can be set using the pane for
- QuickNotepad in the <guilabel>Plugin Shortcuts</guilabel> section of the
- general options dialog:</para>
-
- <itemizedlist>
- <listitem>
- <para>A checkbox governs whether the name of the notepad file
- will be displayed in the toolbar panel above the text area. Even
- if the file name display is enabled, if the plugin is displayed
- to the left or right of the main editing area, the notepad file
- name will likely be partially or completely hidden.</para>
- </listitem>
-
- <listitem>
- <para>A text field and adjacent button allow the user to choose
- the path of the default notepad file by typing its name or
- opening a file chooser dialog. This file will be loaded (and the
- old file saved) once the plugin's options settings are
- committed.</para>
- </listitem>
-
- <listitem>
- <para>A third button shows the name, size and style of the font
- used by the QuickNotepad text area. Pressing the button summons
- a font chooser dialog for making a new selection. The text area
- will be redrawn with the new font once the change is
- committed.</para>
- </listitem>
- </itemizedlist>
- </simplesect>
-
- <simplesect>
- <title>Legal notices</title>
-
- <para>The QuickNotepad plugin is released under the GNU General Public
- License (either version 2 or any later version, at the user's option). A
- copy of the GPL is available in the <filename>COPYING.txt</filename>
- file in the jEdit distribution.</para>
-
- <para>The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY
- KIND; see section 11 and 12 of the GPL for details.</para>
-
- <para>Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation License, Version
- 1.1 or any later version published by the Free Software Foundation; with
- no <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote>
- or <quote>Back-Cover Texts</quote>, each as defined in the license. A
- copy of the license is included in the file
- <filename>COPYING.DOC.txt</filename> included with the jEdit
- distribution.</para>
- </simplesect>
-
- <simplesect>
- <title>Feedback</title>
-
- <para>Comments, bug reports and other feedback may be sent to the <ulink
- url="mailto:jgellene at nyc.rr.com">author</ulink> or the jEdit-users
- mailing list.</para>
- </simplesect>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- QuickNotepad 2.0 help documentation -->
+<!-- Copyright (C) 2001 John Gellene -->
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<article id="QuickNotepad">
+ <articleinfo>
+ <author>
+ <firstname>John</firstname>
+
+ <surname>Gellene</surname>
+
+ <affiliation>
+ <address><email>jgellene at nyc.rr.com</email></address>
+ </affiliation>
+ </author>
+
+ <copyright>
+ <year>2001</year>
+
+ <holder>John Gellene</holder>
+ </copyright>
+
+ <legalnotice>
+ <title>Legal Notice</title>
+
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.1 or any later version published by the Free Software
+ Foundation; with no <quote>Invariant Sections</quote>,
+ <quote>Front-Cover Texts</quote> or <quote>Back-Cover Texts</quote>,
+ each as defined in the license. A copy of the license is included in
+ the file <filename>COPYING.DOC.txt</filename> included with the
+ jEdit distribution.</para>
+ </legalnotice>
+
+ <title>QuickNotepad 4.2</title>
+ </articleinfo>
+
+ <simplesect>
+ <title>Introduction</title>
+
+ <indexterm>
+ <primary>QuickNotepad</primary>
+ </indexterm>
+
+ <para>This plugin provides a dockable <quote>scratch pad</quote> for
+ writing and displaying notes, to do lists or similar items as
+ unformatted text. The text is automatically saved upon closing the
+ plugin or exiting jEdit. It can also be saved manually. The user can
+ change the file to be displayed during the current editing session. The
+ path of the default notepad file can be changed as a user option.
+ Finally, the text file can be copied to a new, untitled jEdit buffer so
+ that it can be edited by the main program.</para>
+
+ <para>The <citetitle>jEdit Plugin Guide</citetitle> details the
+ development and design of QuickNotepad. It is a simple but functional
+ dockable plugin that incorporates the basic elements of the jEdit plugin
+ architecture.</para>
+
+ <para>The file <filename>changes42.txt</filename> in the plugin's source
+ code details the changes that were made to the plugin to conform to the
+ new plugin API for jEdit version 4.2.</para>
+
+ <para>The file <filename>changes40.txt</filename> in the plugin's source
+ code details the changes that were made to the plugin to conform to the
+ new plugin API for jEdit version 4.0.</para>
+ </simplesect>
+
+ <simplesect>
+ <title>Operation</title>
+
+ <para><indexterm>
+ <primary>QuickNotepad</primary>
+
+ <secondary>shortcut keys</secondary>
+ </indexterm> When QuickNotepad is activated, it loads and displays
+ the file stored in its properties as unformatted text. The text can be
+ edited using the keyboard and mouse. The text area component recognizes
+ the following basic editing shortcuts:</para>
+
+ <!-- Limitations on xsltproc's capabilities require a blank column between -->
+
+ <!-- the two columns of data to provide spacing for the table. -->
+
+ <informaltable frame="none">
+ <tgroup align="left" cols="4">
+ <colspec colnum="1" />
+
+ <!-- blank column -->
+
+ <colspec colnum="2" />
+
+ <colspec colnum="3" />
+
+ <!-- blank column -->
+
+ <colspec colnum="4" />
+
+ <tbody>
+ <row>
+ <entry></entry>
+
+ <entry>Cut</entry>
+
+ <entry></entry>
+
+ <entry><keycombo action="simul">
+ <keysym>Ctrl</keysym>
+
+ <keysym>x</keysym>
+ </keycombo></entry>
+ </row>
+
+ <row>
+ <entry></entry>
+
+ <entry>Copy</entry>
+
+ <entry></entry>
+
+ <entry><keycombo action="simul">
+ <keysym>Ctrl</keysym>
+
+ <keysym>c</keysym>
+ </keycombo></entry>
+ </row>
+
+ <row>
+ <entry></entry>
+
+ <entry>Paste</entry>
+
+ <entry></entry>
+
+ <entry><keycombo action="simul">
+ <keysym>Ctrl</keysym>
+
+ <keysym>v</keysym>
+ </keycombo></entry>
+ </row>
+
+ <row>
+ <entry></entry>
+
+ <entry>Select All</entry>
+
+ <entry></entry>
+
+ <entry><keycombo action="simul">
+ <keysym>Ctrl</keysym>
+
+ <keysym>a</keysym>
+ </keycombo></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>QuickNotepad ignores function keys and other combination key
+ presses.</para>
+ </simplesect>
+
+ <simplesect>
+ <title>Toolbar buttons</title>
+
+ <para>Three buttons above the text area provide file management
+ operations:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><guilabel>Choose notepad file</guilabel> - this button
+ opens a file selection dialog permitting the user to select a
+ different file to view in the text area. If a new file is
+ selected, the old file is auomatically saved. The selection is
+ valid only for the current editing session; to change the
+ default QuickNotepad file for future sessions, use the <link
+ linkend="options">options dialog</link>.</para>
+ </listitem>
+
+ <listitem>
+ <para><guilabel>Save notepad file</guilabel> - this button
+ causes QuickNotepad to write the contents of the text area to
+ the designated notepad file. To save the text to another file
+ name, use the <guilabel>Copy notepad to buffer</guilabel>
+ operation.</para>
+ </listitem>
+
+ <listitem>
+ <para><guilabel>Copy notepad to buffer</guilabel> - this button
+ causes the contents of the text to be written to a newly
+ created, untitled buffer in the main text editing area. This
+ operation does not alter the QuickNotepad text area or write its
+ text to storage. Further changes to either the QuickNotepad text
+ area or the new buffer will not affect the other.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>These operations are listed in the menu which appears for
+ QuickNotepad under the <guimenu>Plugins</guimenu> heading. They can also
+ be made the subject of keyboard shortcuts in the <guilabel>Plugin
+ Shortcuts</guilabel> pane of jEdit's options dialog.</para>
+
+ <para>One other operation is available as a keyboard shortcut.
+ <guilabel>Bring QuickNotepad to front</guilabel> activates the plugin
+ and makes visible if it is currently hidden in a docking window.</para>
+ </simplesect>
+
+ <simplesect id="options">
+ <title>Options</title>
+
+ <indexterm>
+ <primary>QuickNotepad</primary>
+
+ <secondary>options</secondary>
+ </indexterm>
+
+ <para>There are three options which can be set using the pane for
+ QuickNotepad in the <guilabel>Plugin Shortcuts</guilabel> section of the
+ general options dialog:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>A checkbox governs whether the name of the notepad file
+ will be displayed in the toolbar panel above the text area. Even
+ if the file name display is enabled, if the plugin is displayed
+ to the left or right of the main editing area, the notepad file
+ name will likely be partially or completely hidden.</para>
+ </listitem>
+
+ <listitem>
+ <para>A text field and adjacent button allow the user to choose
+ the path of the default notepad file by typing its name or
+ opening a file chooser dialog. This file will be loaded (and the
+ old file saved) once the plugin's options settings are
+ committed.</para>
+ </listitem>
+
+ <listitem>
+ <para>A third button shows the name, size and style of the font
+ used by the QuickNotepad text area. Pressing the button summons
+ a font chooser dialog for making a new selection. The text area
+ will be redrawn with the new font once the change is
+ committed.</para>
+ </listitem>
+ </itemizedlist>
+ </simplesect>
+
+ <simplesect>
+ <title>Legal notices</title>
+
+ <para>The QuickNotepad plugin is released under the GNU General Public
+ License (either version 2 or any later version, at the user's option). A
+ copy of the GPL is available in the <filename>COPYING.txt</filename>
+ file in the jEdit distribution.</para>
+
+ <para>The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY
+ KIND; see section 11 and 12 of the GPL for details.</para>
+
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License, Version
+ 1.1 or any later version published by the Free Software Foundation; with
+ no <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote>
+ or <quote>Back-Cover Texts</quote>, each as defined in the license. A
+ copy of the license is included in the file
+ <filename>COPYING.DOC.txt</filename> included with the jEdit
+ distribution.</para>
+ </simplesect>
+
+ <simplesect>
+ <title>Feedback</title>
+
+ <para>Comments, bug reports and other feedback may be sent to the <ulink
+ url="mailto:jgellene at nyc.rr.com">author</ulink> or the jEdit-users
+ mailing list.</para>
+ </simplesect>
</article>
\ No newline at end of file
diff --git a/jEdit/macros/C/Include_Guard.bsh b/jEdit/macros/C/Include_Guard.bsh
index b677952..6e73d42 100644
--- a/jEdit/macros/C/Include_Guard.bsh
+++ b/jEdit/macros/C/Include_Guard.bsh
@@ -1,74 +1,74 @@
-/*
- * Include_Guard.bsh - a BeanShell macro script for the
- * jEdit text editor - for C/C++ header files: inserts preprocessor
- * directive in current buffer to ensure that header is included only
- * once per compilation unit
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Include_Guard.bsh 10301 2007-08-03 20:18:54Z blueyed $
- *
- * Notes on use:
- *
- * An "include guard" is a conventional mechanism for reducing
- * compilation time for C/C++ source files by ensuring that the
- * substance of a header file is read by the preprocessor only once
- * for each compilation unit. The usual reason this is necessary is
- * the presence of nested include files, sometimes an unavoidable
- * circumstance when creating a hierarchy of classes.
- *
- * To use the macro, first place the caret at the beginning of the header
- * file before any uncommented text. The macro returns to this position
- * upon completion.
- *
- * The macro will complain if you have not yet named the buffer, but it
- * does not check to see if the buffer is actually a header file.
- *
- * The defined term that triggers the guard is taken from the buffer's
- * name. This is one conventional approach and should not cause a conflict
- * unless a compilation unit includes header files from different
- * directories with the same name. In that case, change the conflicting
- * guard names manually.
- *
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-void includeGuard()
-{
- if(buffer.isUntitled())
- {
- Macros.error(view, "Name the file before inserting an include guard.");
- return;
- }
-
- guardName = buffer.getName().toUpperCase().replace('.', '_') ;
- pos = textArea.getCaretPosition();
- textArea.setCaretPosition(0);
- textArea.setSelectedText("#ifndef " + guardName + "\n#define " + guardName + "\n\n");
- pos1 = textArea.getCaretPosition();
- textArea.setCaretPosition(buffer.getLength());
- textArea.setSelectedText("\n#endif // #ifndef " + guardName + "\n");
- textArea.setCaretPosition(pos + pos1);
-}
-
-if( buffer.isReadOnly() )
- Macros.error(view, "Buffer is read-only.");
-else
- includeGuard();
+/*
+ * Include_Guard.bsh - a BeanShell macro script for the
+ * jEdit text editor - for C/C++ header files: inserts preprocessor
+ * directive in current buffer to ensure that header is included only
+ * once per compilation unit
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Include_Guard.bsh 10301 2007-08-03 20:18:54Z blueyed $
+ *
+ * Notes on use:
+ *
+ * An "include guard" is a conventional mechanism for reducing
+ * compilation time for C/C++ source files by ensuring that the
+ * substance of a header file is read by the preprocessor only once
+ * for each compilation unit. The usual reason this is necessary is
+ * the presence of nested include files, sometimes an unavoidable
+ * circumstance when creating a hierarchy of classes.
+ *
+ * To use the macro, first place the caret at the beginning of the header
+ * file before any uncommented text. The macro returns to this position
+ * upon completion.
+ *
+ * The macro will complain if you have not yet named the buffer, but it
+ * does not check to see if the buffer is actually a header file.
+ *
+ * The defined term that triggers the guard is taken from the buffer's
+ * name. This is one conventional approach and should not cause a conflict
+ * unless a compilation unit includes header files from different
+ * directories with the same name. In that case, change the conflicting
+ * guard names manually.
+ *
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+void includeGuard()
+{
+ if(buffer.isUntitled())
+ {
+ Macros.error(view, "Name the file before inserting an include guard.");
+ return;
+ }
+
+ guardName = buffer.getName().toUpperCase().replace('.', '_') ;
+ pos = textArea.getCaretPosition();
+ textArea.setCaretPosition(0);
+ textArea.setSelectedText("#ifndef " + guardName + "\n#define " + guardName + "\n\n");
+ pos1 = textArea.getCaretPosition();
+ textArea.setCaretPosition(buffer.getLength());
+ textArea.setSelectedText("\n#endif // #ifndef " + guardName + "\n");
+ textArea.setCaretPosition(pos + pos1);
+}
+
+if( buffer.isReadOnly() )
+ Macros.error(view, "Buffer is read-only.");
+else
+ includeGuard();
diff --git a/jEdit/macros/C/Toggle_Header_Source.bsh b/jEdit/macros/C/Toggle_Header_Source.bsh
index 6727e36..443bde0 100644
--- a/jEdit/macros/C/Toggle_Header_Source.bsh
+++ b/jEdit/macros/C/Toggle_Header_Source.bsh
@@ -1,181 +1,181 @@
-/**
- ToggleHeaderSource.bsh V1.4
- by Alan Ezust
- $Id: Toggle_Header_Source.bsh 16248 2009-09-29 20:43:41Z shlomy $
-
- A jedit beanshell macro that toggles your current buffer
- between the header file (.h) and the source file (.c(c|pp|xx)?).
-
- Enables you to switch the current text
- buffer between C/C++ header and sourcecode
- file. If the file does not already exist, it opens a new buffer
- of that name for you.
-
- New to 1.2: If another buffer is already open with the requested
- filename, it is selected, even if located in another directory.
-
- New to 1.3: If another EditPane is already open with the
- requested buffer, it is selected and focused.
-
- New to 1.4: Instead of throwing an exception, treats
- files with no extension as header files, and tries to
- open .cpp file with same basename.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with the jEdit program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- */
-
-import projectviewer.*;
-import projectviewer.vpt.*;
-import java.util.*;
-
-/* Set this property from the console beanshell to something else if cpp is not
- your favorite extension. e.g.:
- jEdit.setProperty("default.extension.c", "cc");
-*/
-
-String defaultSourceExtension = jEdit.getProperty("default.extension.c", "cpp");
-
-String[] sourceExtensions = new String[]{"cpp", "cxx", "cc", "c"};
-
-/** Looks for an existing file in the current project, if ProjectViewer is
- installed and a 'current' project exists.
- @return the absolute path if found, NULL if not.
- */
-String findBufferInProject(String fileName) {
- int sep1 = fileName.lastIndexOf('\\');
- int sep2 = fileName.lastIndexOf('/');
- if (sep1 > sep2)
- fileName = fileName.substring(sep1 + 1);
- else if (sep2 > sep1)
- fileName = fileName.substring(sep2 + 1);
- VPTProject project = ProjectViewer.getActiveProject(view);
- Collection nodes = project.getOpenableNodes();
- for (VPTNode node: nodes) {
- String path = node.getNodePath();
- if ((path.endsWith("\\" + fileName)) || (path.endsWith("/" + fileName)))
- return path;
- }
- return null;
-}
-
-/** Looks for an existing file in the same directory, or
- an already open buffer with the given name in another directory.
- @return the absolute path if found, NULL if not.
- */
-String findBuffer(String fileName) {
- File f = new File(fileName);
- if (f.canRead()) return f.getPath();
- String fn2 = f.getName();
- Buffer[] bufs = jEdit.getBuffers();
- bn = bufs.length;
- for (int i=0; i<bn; ++i) {
- Buffer b = bufs[i];
- if (b.getName().equals(fn2)) return b.getPath();
- }
- return null;
-}
-
-/** Returns true if PV is installed and a project is selected (current)
-*/
-boolean activeProjectExists()
-{
- EditPlugin p = jEdit.getPlugin("projectviewer.ProjectPlugin",false);
- if(p == null)
- return false;
- VPTProject project = ProjectViewer.getActiveProject(view);
- return (project != null);
-}
-
-/** Given a header file, iterates through all sourcefile extensions checking if the sourcefile exists.
- @return the absolute path of the sourcefile for this header
-*/
-
-String getSourceFile(String baseName)
-{
- int numExt = sourceExtensions.length;
- // First try open buffers
- for (int i=numExt-1; i>=0; --i)
- {
- String ext = sourceExtensions[i];
- String tryFile = baseName + "." + ext;
- String path = findBuffer(tryFile);
- if (path != null) return path;
- }
- // Then try current project
- if (activeProjectExists())
- {
- for (int i=numExt-1; i>=0; --i)
- {
- String ext = sourceExtensions[i];
- String tryFile = baseName + "." + ext;
- String path = findBufferInProject(tryFile);
- if (path != null) return path;
- }
- }
- return baseName + "." + defaultSourceExtension;
-}
-
-boolean isSourceFile(String extension)
-{
- for (int i=0; i<sourceExtensions.length; ++i) {
- if (extension.equals(sourceExtensions[i])) return true;
- }
- return false;
-}
-
-void toggleHeaderSource()
-{
- String currentFile = buffer.getPath();
- int pos = currentFile.lastIndexOf('.');
- String path = null;
- if (pos < 0) {
- path = getSourceFile(currentFile);
- }
- else {
- String baseName = currentFile.substring(0, pos);
- String extension = currentFile.substring(pos+1);
- if (isSourceFile(extension))
- {
- String header = baseName + ".h";
- path = findBuffer(header);
- if (path == null) {
- if (activeProjectExists())
- path = findBufferInProject(header);
- }
- if (path == null) path = baseName + ".h";
- }
- else if (extension.equals("h")) {
- path = getSourceFile(baseName);
- }
- }
- if (path == null) return;
- // see if it is already open in another editpane
- panes = view.getEditPanes();
- if (panes.length > 1)
- for (int i=panes.length - 1; i >= 0; --i) {
- buf = panes[i].getBuffer();
- if (buf.getName().equals(path)
- || buf.getPath().equals(path)) {
- panes[i].focusOnTextArea();
- return;
- }
- }
- jEdit.openFile(view, path);
-}
-
-toggleHeaderSource();
-
-
+/**
+ ToggleHeaderSource.bsh V1.4
+ by Alan Ezust
+ $Id: Toggle_Header_Source.bsh 16248 2009-09-29 20:43:41Z shlomy $
+
+ A jedit beanshell macro that toggles your current buffer
+ between the header file (.h) and the source file (.c(c|pp|xx)?).
+
+ Enables you to switch the current text
+ buffer between C/C++ header and sourcecode
+ file. If the file does not already exist, it opens a new buffer
+ of that name for you.
+
+ New to 1.2: If another buffer is already open with the requested
+ filename, it is selected, even if located in another directory.
+
+ New to 1.3: If another EditPane is already open with the
+ requested buffer, it is selected and focused.
+
+ New to 1.4: Instead of throwing an exception, treats
+ files with no extension as header files, and tries to
+ open .cpp file with same basename.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the jEdit program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ */
+
+import projectviewer.*;
+import projectviewer.vpt.*;
+import java.util.*;
+
+/* Set this property from the console beanshell to something else if cpp is not
+ your favorite extension. e.g.:
+ jEdit.setProperty("default.extension.c", "cc");
+*/
+
+String defaultSourceExtension = jEdit.getProperty("default.extension.c", "cpp");
+
+String[] sourceExtensions = new String[]{"cpp", "cxx", "cc", "c"};
+
+/** Looks for an existing file in the current project, if ProjectViewer is
+ installed and a 'current' project exists.
+ @return the absolute path if found, NULL if not.
+ */
+String findBufferInProject(String fileName) {
+ int sep1 = fileName.lastIndexOf('\\');
+ int sep2 = fileName.lastIndexOf('/');
+ if (sep1 > sep2)
+ fileName = fileName.substring(sep1 + 1);
+ else if (sep2 > sep1)
+ fileName = fileName.substring(sep2 + 1);
+ VPTProject project = ProjectViewer.getActiveProject(view);
+ Collection nodes = project.getOpenableNodes();
+ for (VPTNode node: nodes) {
+ String path = node.getNodePath();
+ if ((path.endsWith("\\" + fileName)) || (path.endsWith("/" + fileName)))
+ return path;
+ }
+ return null;
+}
+
+/** Looks for an existing file in the same directory, or
+ an already open buffer with the given name in another directory.
+ @return the absolute path if found, NULL if not.
+ */
+String findBuffer(String fileName) {
+ File f = new File(fileName);
+ if (f.canRead()) return f.getPath();
+ String fn2 = f.getName();
+ Buffer[] bufs = jEdit.getBuffers();
+ bn = bufs.length;
+ for (int i=0; i<bn; ++i) {
+ Buffer b = bufs[i];
+ if (b.getName().equals(fn2)) return b.getPath();
+ }
+ return null;
+}
+
+/** Returns true if PV is installed and a project is selected (current)
+*/
+boolean activeProjectExists()
+{
+ EditPlugin p = jEdit.getPlugin("projectviewer.ProjectPlugin",false);
+ if(p == null)
+ return false;
+ VPTProject project = ProjectViewer.getActiveProject(view);
+ return (project != null);
+}
+
+/** Given a header file, iterates through all sourcefile extensions checking if the sourcefile exists.
+ @return the absolute path of the sourcefile for this header
+*/
+
+String getSourceFile(String baseName)
+{
+ int numExt = sourceExtensions.length;
+ // First try open buffers
+ for (int i=numExt-1; i>=0; --i)
+ {
+ String ext = sourceExtensions[i];
+ String tryFile = baseName + "." + ext;
+ String path = findBuffer(tryFile);
+ if (path != null) return path;
+ }
+ // Then try current project
+ if (activeProjectExists())
+ {
+ for (int i=numExt-1; i>=0; --i)
+ {
+ String ext = sourceExtensions[i];
+ String tryFile = baseName + "." + ext;
+ String path = findBufferInProject(tryFile);
+ if (path != null) return path;
+ }
+ }
+ return baseName + "." + defaultSourceExtension;
+}
+
+boolean isSourceFile(String extension)
+{
+ for (int i=0; i<sourceExtensions.length; ++i) {
+ if (extension.equals(sourceExtensions[i])) return true;
+ }
+ return false;
+}
+
+void toggleHeaderSource()
+{
+ String currentFile = buffer.getPath();
+ int pos = currentFile.lastIndexOf('.');
+ String path = null;
+ if (pos < 0) {
+ path = getSourceFile(currentFile);
+ }
+ else {
+ String baseName = currentFile.substring(0, pos);
+ String extension = currentFile.substring(pos+1);
+ if (isSourceFile(extension))
+ {
+ String header = baseName + ".h";
+ path = findBuffer(header);
+ if (path == null) {
+ if (activeProjectExists())
+ path = findBufferInProject(header);
+ }
+ if (path == null) path = baseName + ".h";
+ }
+ else if (extension.equals("h")) {
+ path = getSourceFile(baseName);
+ }
+ }
+ if (path == null) return;
+ // see if it is already open in another editpane
+ panes = view.getEditPanes();
+ if (panes.length > 1)
+ for (int i=panes.length - 1; i >= 0; --i) {
+ buf = panes[i].getBuffer();
+ if (buf.getName().equals(path)
+ || buf.getPath().equals(path)) {
+ panes[i].focusOnTextArea();
+ return;
+ }
+ }
+ jEdit.openFile(view, path);
+}
+
+toggleHeaderSource();
+
+
diff --git a/jEdit/macros/Clipboard/Copy_Lines.bsh b/jEdit/macros/Clipboard/Copy_Lines.bsh
index 21f9774..4efc686 100644
--- a/jEdit/macros/Clipboard/Copy_Lines.bsh
+++ b/jEdit/macros/Clipboard/Copy_Lines.bsh
@@ -1,36 +1,36 @@
-/*
-* Copy_Lines.bsh - a BeanShell macro for jEdit
-* which copies either the selected lines of text, or the current line
-* if no text is selected, to the clipboard.
-*
-* Copyright (C) 2003 Ollie Rutherfurd <oliver at jedit.org>
-*
-* $Id: Copy_Lines.bsh 11860 2008-02-24 23:43:28Z ezust $
-*/
-
-copyLines(){
- selections = textArea.getSelectedLines();
-
- if(selections.length == 0){
- selections = new int [] {textArea.getCaretLine()};
- }
- start = textArea.getLineStartOffset(selections[0]);
- stop = textArea.getLineEndOffset(selections[selections.length-1]);
- Registers.getRegister('$').setValue(textArea.getText(start,stop-start+1));
-}
-
-copyLines();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Copy_Lines.bsh</filename>
- <abstract><para>
- If no text is selected, the current line is copied to
- the clipboard, otherwise otherwise, all lines that contain the selection
- are copied to the clipboard.
- </para></abstract>
-</listitem>
-
-*/
+/*
+* Copy_Lines.bsh - a BeanShell macro for jEdit
+* which copies either the selected lines of text, or the current line
+* if no text is selected, to the clipboard.
+*
+* Copyright (C) 2003 Ollie Rutherfurd <oliver at jedit.org>
+*
+* $Id: Copy_Lines.bsh 11860 2008-02-24 23:43:28Z ezust $
+*/
+
+copyLines(){
+ selections = textArea.getSelectedLines();
+
+ if(selections.length == 0){
+ selections = new int [] {textArea.getCaretLine()};
+ }
+ start = textArea.getLineStartOffset(selections[0]);
+ stop = textArea.getLineEndOffset(selections[selections.length-1]);
+ Registers.getRegister('$').setValue(textArea.getText(start,stop-start+1));
+}
+
+copyLines();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Copy_Lines.bsh</filename>
+ <abstract><para>
+ If no text is selected, the current line is copied to
+ the clipboard, otherwise otherwise, all lines that contain the selection
+ are copied to the clipboard.
+ </para></abstract>
+</listitem>
+
+*/
diff --git a/jEdit/macros/Clipboard/Copy_Lines_Containing.bsh b/jEdit/macros/Clipboard/Copy_Lines_Containing.bsh
index 36951f6..fc895d1 100644
--- a/jEdit/macros/Clipboard/Copy_Lines_Containing.bsh
+++ b/jEdit/macros/Clipboard/Copy_Lines_Containing.bsh
@@ -1,28 +1,28 @@
-/*
- * Copy_Lines_Containing.bsh - Copies lines from current buffer that
- * contain a user-supplied string to the clipboard.
- *
- * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
- *
- * $Id: Copy_Lines_Containing.bsh 5098 2004-08-03 21:31:48Z orutherfurd $
- */
-
-copyLinesContaining(){
- String text = Macros.input(view,"Copy lines containing:");
- if(text == null || "".equals(text))
- return;
- int count = 0;
- StringBuffer buff = new StringBuffer();
- for(int i = 0; i < buffer.getLineCount(); i++){
- String line = buffer.getLineText(i);
- if(line.indexOf(text) > -1){
- buff.append(line).append('\n');
- count++;
- }
- }
- Registers.setRegister('$',buff.toString());
- HistoryModel.getModel("clipboard").addItem(buff.toString());
- view.getStatus().setMessageAndClear("" + count + " lines copied");
-}
-
-copyLinesContaining();
+/*
+ * Copy_Lines_Containing.bsh - Copies lines from current buffer that
+ * contain a user-supplied string to the clipboard.
+ *
+ * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
+ *
+ * $Id: Copy_Lines_Containing.bsh 5098 2004-08-03 21:31:48Z orutherfurd $
+ */
+
+copyLinesContaining(){
+ String text = Macros.input(view,"Copy lines containing:");
+ if(text == null || "".equals(text))
+ return;
+ int count = 0;
+ StringBuffer buff = new StringBuffer();
+ for(int i = 0; i < buffer.getLineCount(); i++){
+ String line = buffer.getLineText(i);
+ if(line.indexOf(text) > -1){
+ buff.append(line).append('\n');
+ count++;
+ }
+ }
+ Registers.setRegister('$',buff.toString());
+ HistoryModel.getModel("clipboard").addItem(buff.toString());
+ view.getStatus().setMessageAndClear("" + count + " lines copied");
+}
+
+copyLinesContaining();
diff --git a/jEdit/macros/Clipboard/Copy_Visible_Lines.bsh b/jEdit/macros/Clipboard/Copy_Visible_Lines.bsh
index 6bab0b8..7a26509 100644
--- a/jEdit/macros/Clipboard/Copy_Visible_Lines.bsh
+++ b/jEdit/macros/Clipboard/Copy_Visible_Lines.bsh
@@ -1,34 +1,34 @@
-/*
- * Copy_Visible_Lines.bsh - Copies visible (non-folded) lines from
- * the current buffer to the clipboard.
- *
- * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at jedit.org>
- *
- * $Id: Copy_Visible_Lines.bsh 5098 2004-08-03 21:31:48Z orutherfurd $
- */
-
-void copyVisibleLines(View view){
- JEditTextArea textArea = view.getTextArea();
- DisplayManager dm = textArea.getDisplayManager();
-
- StringBuffer buff = new StringBuffer();
- for(int i=0; i < buffer.getLineCount(); i++){
- if(dm.isLineVisible(i))
- buff.append(textArea.getLineText(i)).append('\n');
- }
- Registers.setRegister('$', buff.toString());
-}
-
-copyVisibleLines(view);
-
-/*
-
-<listitem>
- <para><filename>Copy_Visible_Lines.bsh</filename></para>
- <abstract><para>Copies the visible lines from the current
- buffer to the Clipboard. Lines that are not visible
- becuase they are folded are not copied.
- </para></abstract>
-</listitem>
-
-*/
+/*
+ * Copy_Visible_Lines.bsh - Copies visible (non-folded) lines from
+ * the current buffer to the clipboard.
+ *
+ * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at jedit.org>
+ *
+ * $Id: Copy_Visible_Lines.bsh 5098 2004-08-03 21:31:48Z orutherfurd $
+ */
+
+void copyVisibleLines(View view){
+ JEditTextArea textArea = view.getTextArea();
+ DisplayManager dm = textArea.getDisplayManager();
+
+ StringBuffer buff = new StringBuffer();
+ for(int i=0; i < buffer.getLineCount(); i++){
+ if(dm.isLineVisible(i))
+ buff.append(textArea.getLineText(i)).append('\n');
+ }
+ Registers.setRegister('$', buff.toString());
+}
+
+copyVisibleLines(view);
+
+/*
+
+<listitem>
+ <para><filename>Copy_Visible_Lines.bsh</filename></para>
+ <abstract><para>Copies the visible lines from the current
+ buffer to the Clipboard. Lines that are not visible
+ becuase they are folded are not copied.
+ </para></abstract>
+</listitem>
+
+*/
diff --git a/jEdit/macros/Clipboard/Cut_Lines.bsh b/jEdit/macros/Clipboard/Cut_Lines.bsh
index d3327f0..3688d2e 100644
--- a/jEdit/macros/Clipboard/Cut_Lines.bsh
+++ b/jEdit/macros/Clipboard/Cut_Lines.bsh
@@ -1,41 +1,41 @@
-/*
-* Cut_Lines.bsh - a BeanShell macro for jEdit
-* which cuts either the selected text, or the current line
-* if no text is selected, to the clipboard.
-*
-* Copyright (C) 2003 Ollie Rutherfurd <oliver at jedit.org>
-* Copyright (c) 2008 encorejane at users.sourceforge.net
-*
-* $Id: Cut_Lines.bsh 11860 2008-02-24 23:43:28Z ezust $
-*/
-
-cutLines(){
- selections = textArea.getSelectedLines();
-
- if(selections.length == 0){
- selections = new int [] {textArea.getCaretLine()};
- }
- start = textArea.getLineStartOffset(selections[0]);
- stop = textArea.getLineEndOffset(selections[selections.length-1]);
- textArea.setSelection(new Selection.Range(start,stop));
- Registers.cut(textArea,'$');
-}
-
-if(buffer.isReadOnly())
- Toolkit.getDefaultToolkit().beep();
-else
- cutLines();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Cut_Selection_or_Line.bsh</filename>
- <abstract><para>
- If no text is selected, the current line is cut to the clipboard,
- otherwise, all lines that contain the selection are cut to the clipboard.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+* Cut_Lines.bsh - a BeanShell macro for jEdit
+* which cuts either the selected text, or the current line
+* if no text is selected, to the clipboard.
+*
+* Copyright (C) 2003 Ollie Rutherfurd <oliver at jedit.org>
+* Copyright (c) 2008 encorejane at users.sourceforge.net
+*
+* $Id: Cut_Lines.bsh 11860 2008-02-24 23:43:28Z ezust $
+*/
+
+cutLines(){
+ selections = textArea.getSelectedLines();
+
+ if(selections.length == 0){
+ selections = new int [] {textArea.getCaretLine()};
+ }
+ start = textArea.getLineStartOffset(selections[0]);
+ stop = textArea.getLineEndOffset(selections[selections.length-1]);
+ textArea.setSelection(new Selection.Range(start,stop));
+ Registers.cut(textArea,'$');
+}
+
+if(buffer.isReadOnly())
+ Toolkit.getDefaultToolkit().beep();
+else
+ cutLines();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Cut_Selection_or_Line.bsh</filename>
+ <abstract><para>
+ If no text is selected, the current line is cut to the clipboard,
+ otherwise, all lines that contain the selection are cut to the clipboard.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Clipboard/Cut_Lines_Containing.bsh b/jEdit/macros/Clipboard/Cut_Lines_Containing.bsh
index 75676fe..ef3b983 100644
--- a/jEdit/macros/Clipboard/Cut_Lines_Containing.bsh
+++ b/jEdit/macros/Clipboard/Cut_Lines_Containing.bsh
@@ -1,36 +1,36 @@
-/*
- * Cut_Lines_Containing.bsh - Cuts lines from current buffer that
- * contain a user-supplied string to the clipboard.
- *
- * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
- *
- * $Id: Cut_Lines_Containing.bsh 9126 2007-03-10 19:14:30Z Vampire0 $
- */
-
-cutLinesContaining(){
- String text = Macros.input(view,"Cut lines containing:");
- if(text == null || "".equals(text))
- return;
- int count = 0;
- int start = 0;
- int end = 0;
- StringBuffer buff = new StringBuffer();
- for(int i = buffer.getLineCount() - 1 ; i >= 0; i--){
- String line = buffer.getLineText(i);
- if(line.indexOf(text) > -1){
- buff.insert(0,'\n').insert(0,line);
- int start = buffer.getLineStartOffset(i);
- int end = buffer.getLineEndOffset(i);
- buffer.remove(start,Math.min(end,buffer.getLength())-start);
- count++;
- }
- }
- Registers.setRegister('$',buff.toString());
- HistoryModel.getModel("clipboard").addItem(buff.toString());
- view.getStatus().setMessageAndClear("" + count + " lines cut");
-}
-
-if(buffer.isReadOnly())
- Toolkit.getDefaultToolkit().beep();
-else
- cutLinesContaining();
+/*
+ * Cut_Lines_Containing.bsh - Cuts lines from current buffer that
+ * contain a user-supplied string to the clipboard.
+ *
+ * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
+ *
+ * $Id: Cut_Lines_Containing.bsh 9126 2007-03-10 19:14:30Z Vampire0 $
+ */
+
+cutLinesContaining(){
+ String text = Macros.input(view,"Cut lines containing:");
+ if(text == null || "".equals(text))
+ return;
+ int count = 0;
+ int start = 0;
+ int end = 0;
+ StringBuffer buff = new StringBuffer();
+ for(int i = buffer.getLineCount() - 1 ; i >= 0; i--){
+ String line = buffer.getLineText(i);
+ if(line.indexOf(text) > -1){
+ buff.insert(0,'\n').insert(0,line);
+ int start = buffer.getLineStartOffset(i);
+ int end = buffer.getLineEndOffset(i);
+ buffer.remove(start,Math.min(end,buffer.getLength())-start);
+ count++;
+ }
+ }
+ Registers.setRegister('$',buff.toString());
+ HistoryModel.getModel("clipboard").addItem(buff.toString());
+ view.getStatus().setMessageAndClear("" + count + " lines cut");
+}
+
+if(buffer.isReadOnly())
+ Toolkit.getDefaultToolkit().beep();
+else
+ cutLinesContaining();
diff --git a/jEdit/macros/Editing/Emacs_Ctrl-K.bsh b/jEdit/macros/Editing/Emacs_Ctrl-K.bsh
index 79bd3cd..6375571 100644
--- a/jEdit/macros/Editing/Emacs_Ctrl-K.bsh
+++ b/jEdit/macros/Editing/Emacs_Ctrl-K.bsh
@@ -1,67 +1,67 @@
-/*
-* Emacs_Ctrl-k.bsh - a BeanShell macro for jEdit
-* which cuts either the selected text, or the current line
-* if no text is selected, to the clipboard.
-*
-* Repeated calls to Emacs-Ctrl-K from the same position
-* should append cut lines to the cut buffer.
-*
-* By Alan Ezust <ezust at users dot sourceforge dot net>
-* with help from Ollie Rutherford
-* Version 0.1 21 December 2003
-*
-*/
-
-// an arbitrary letter for a register.
-myReg = 'p';
-
-emacsCtrlK()
-{
- int currentLine = textArea.getCaretPosition();
- try
- {
- int lastLine = Integer.parseInt("" + jEdit.getProperty("lastpos"));
- if(lastLine != currentLine)
- {
- Registers.clearRegister('$');
- }
- }
- catch ( NumberFormatException nfe )
- {
- Registers.clearRegister('$');
- }
-
- selections = textArea.getSelection();
- if(selections.length == 0)
- {
- textArea.goToEndOfWhiteSpace(true);
- }
- selections = textArea.getSelection();
- if (selections.length==0)
- {
- textArea.goToNextCharacter(true);
- }
- selections = textArea.getSelection();
- Registers.append(textArea, '$', "");
-
- // since there is no cut-append, I"ll just cut it into another register
- Registers.cut(textArea, 'e');
-
- // remember the caretPosition for next time around
- // Registers.setRegister('p', "" + textArea.getCaretPosition());
- jEdit.setProperty("lastpos", "" + textArea.getCaretPosition());
-}
-
-emacsCtrlK();
-
-/**
-<listitem>
- <para>
- If no text is selected, the current line is cut to the clipboard,
- otherwise the selected text is cut to the clipboard.
-
- Subsequent calls to Emacs_Ctrl-k will alternate between cut-append
- the following newline character, or the following line of text.
- </para>
-</listitem>
-*/
+/*
+* Emacs_Ctrl-k.bsh - a BeanShell macro for jEdit
+* which cuts either the selected text, or the current line
+* if no text is selected, to the clipboard.
+*
+* Repeated calls to Emacs-Ctrl-K from the same position
+* should append cut lines to the cut buffer.
+*
+* By Alan Ezust <ezust at users dot sourceforge dot net>
+* with help from Ollie Rutherford
+* Version 0.1 21 December 2003
+*
+*/
+
+// an arbitrary letter for a register.
+myReg = 'p';
+
+emacsCtrlK()
+{
+ int currentLine = textArea.getCaretPosition();
+ try
+ {
+ int lastLine = Integer.parseInt("" + jEdit.getProperty("lastpos"));
+ if(lastLine != currentLine)
+ {
+ Registers.clearRegister('$');
+ }
+ }
+ catch ( NumberFormatException nfe )
+ {
+ Registers.clearRegister('$');
+ }
+
+ selections = textArea.getSelection();
+ if(selections.length == 0)
+ {
+ textArea.goToEndOfWhiteSpace(true);
+ }
+ selections = textArea.getSelection();
+ if (selections.length==0)
+ {
+ textArea.goToNextCharacter(true);
+ }
+ selections = textArea.getSelection();
+ Registers.append(textArea, '$', "");
+
+ // since there is no cut-append, I"ll just cut it into another register
+ Registers.cut(textArea, 'e');
+
+ // remember the caretPosition for next time around
+ // Registers.setRegister('p', "" + textArea.getCaretPosition());
+ jEdit.setProperty("lastpos", "" + textArea.getCaretPosition());
+}
+
+emacsCtrlK();
+
+/**
+<listitem>
+ <para>
+ If no text is selected, the current line is cut to the clipboard,
+ otherwise the selected text is cut to the clipboard.
+
+ Subsequent calls to Emacs_Ctrl-k will alternate between cut-append
+ the following newline character, or the following line of text.
+ </para>
+</listitem>
+*/
diff --git a/jEdit/macros/Editing/Emacs_Next_Line.bsh b/jEdit/macros/Editing/Emacs_Next_Line.bsh
index e0e45c5..afc1c16 100644
--- a/jEdit/macros/Editing/Emacs_Next_Line.bsh
+++ b/jEdit/macros/Editing/Emacs_Next_Line.bsh
@@ -1,43 +1,43 @@
-/*
- * Emacs_Next_Line.bsh - Beanshell macro for jEdit that provides
- * 'Emacs-like scrolling. If the caret is at the bottom of the
- * screen the next line is centered on the screen rather than
- * scrolling the whole text area by one line. For machines with
- * slow painting, this can increase scrolling speed.
- *
- * Copyright (C) 2002-2004, Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Emacs_Next_Line.bsh 4995 2004-03-19 15:58:00Z spestov $
- */
-
-void emacsNextLine(View view){
-
- // need access to textArea.lastLinePartial
- setAccessibility(true);
-
- int first = textArea.getFirstLine();
- int caretLine = textArea.getScreenLineOfOffset(textArea.getCaretPosition());
- int visibleLines = textArea.getVisibleLines();
- int electricScroll = textArea.getElectricScroll();
-
- if(caretLine != -1 && caretLine+1 >=
- (visibleLines - (electricScroll + (textArea.lastLinePartial ? 1 : 0))))
- {
- int newFirst = (first + (visibleLines - electricScroll) / 2);
- textArea.setFirstLine(newFirst);
- }
- textArea.goToNextLine(false);
-}
-
-emacsNextLine(view);
-
-/*
- <listitem>
- <para><filename>Emacs_Next_Line.bsh</filename></para>
- <abstract><para>
- Moves the cursor to the next line, centering
- the current line in the middle of the text area
- if the cursor is at the bottom of the text area.
- </para></abstract>
- </listitem>
-*/
+/*
+ * Emacs_Next_Line.bsh - Beanshell macro for jEdit that provides
+ * 'Emacs-like scrolling. If the caret is at the bottom of the
+ * screen the next line is centered on the screen rather than
+ * scrolling the whole text area by one line. For machines with
+ * slow painting, this can increase scrolling speed.
+ *
+ * Copyright (C) 2002-2004, Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Emacs_Next_Line.bsh 4995 2004-03-19 15:58:00Z spestov $
+ */
+
+void emacsNextLine(View view){
+
+ // need access to textArea.lastLinePartial
+ setAccessibility(true);
+
+ int first = textArea.getFirstLine();
+ int caretLine = textArea.getScreenLineOfOffset(textArea.getCaretPosition());
+ int visibleLines = textArea.getVisibleLines();
+ int electricScroll = textArea.getElectricScroll();
+
+ if(caretLine != -1 && caretLine+1 >=
+ (visibleLines - (electricScroll + (textArea.lastLinePartial ? 1 : 0))))
+ {
+ int newFirst = (first + (visibleLines - electricScroll) / 2);
+ textArea.setFirstLine(newFirst);
+ }
+ textArea.goToNextLine(false);
+}
+
+emacsNextLine(view);
+
+/*
+ <listitem>
+ <para><filename>Emacs_Next_Line.bsh</filename></para>
+ <abstract><para>
+ Moves the cursor to the next line, centering
+ the current line in the middle of the text area
+ if the cursor is at the bottom of the text area.
+ </para></abstract>
+ </listitem>
+*/
diff --git a/jEdit/macros/Editing/Emacs_Previous_Line.bsh b/jEdit/macros/Editing/Emacs_Previous_Line.bsh
index e66dfd4..de86c02 100644
--- a/jEdit/macros/Editing/Emacs_Previous_Line.bsh
+++ b/jEdit/macros/Editing/Emacs_Previous_Line.bsh
@@ -1,45 +1,45 @@
-/*
- * Emacs_Previous_Line.bsh - Beanshell macro for jEdit that provides
- * 'Emacs-like scrolling. If the caret is at the top of the
- * screen the current line is centered on the screen rather than
- * scrolling the whole text area by one line. For machines with
- * slow painting, this can increase scrolling speed.
- *
- * Copyright (C) 2002-2004, Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Emacs_Previous_Line.bsh 4995 2004-03-19 15:58:00Z spestov $
- */
-
-void emacsPreviousLine(View view){
-
- // need access to textArea.lastLinePartial
- setAccessibility(true);
-
- int first = textArea.getFirstLine();
- int caretLine = textArea.getScreenLineOfOffset(textArea.getCaretPosition());
- int visibleLines = textArea.getVisibleLines();
- int electricScroll = textArea.getElectricScroll();
-
- if(caretLine <= electricScroll){
- int newFirst = first - ((visibleLines - electricScroll) / 2);
- // if jumping would put us over the top, just go to top
- if(newFirst < 0){
- newFirst = 0;
- }
- textArea.setFirstLine(newFirst);
- }
- textArea.goToPrevLine(false);
-}
-
-emacsPreviousLine(view);
-
-/*
- <listitem>
- <para><filename>Emacs_Previous_Line.bsh</filename></para>
- <abstract><para>
- Moves the cursor to the previous line, centering
- the current line in the middle of the text area
- if the cursor is at the top of the text area.
- </para></abstract>
- </listitem>
-*/
+/*
+ * Emacs_Previous_Line.bsh - Beanshell macro for jEdit that provides
+ * 'Emacs-like scrolling. If the caret is at the top of the
+ * screen the current line is centered on the screen rather than
+ * scrolling the whole text area by one line. For machines with
+ * slow painting, this can increase scrolling speed.
+ *
+ * Copyright (C) 2002-2004, Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Emacs_Previous_Line.bsh 4995 2004-03-19 15:58:00Z spestov $
+ */
+
+void emacsPreviousLine(View view){
+
+ // need access to textArea.lastLinePartial
+ setAccessibility(true);
+
+ int first = textArea.getFirstLine();
+ int caretLine = textArea.getScreenLineOfOffset(textArea.getCaretPosition());
+ int visibleLines = textArea.getVisibleLines();
+ int electricScroll = textArea.getElectricScroll();
+
+ if(caretLine <= electricScroll){
+ int newFirst = first - ((visibleLines - electricScroll) / 2);
+ // if jumping would put us over the top, just go to top
+ if(newFirst < 0){
+ newFirst = 0;
+ }
+ textArea.setFirstLine(newFirst);
+ }
+ textArea.goToPrevLine(false);
+}
+
+emacsPreviousLine(view);
+
+/*
+ <listitem>
+ <para><filename>Emacs_Previous_Line.bsh</filename></para>
+ <abstract><para>
+ Moves the cursor to the previous line, centering
+ the current line in the middle of the text area
+ if the cursor is at the top of the text area.
+ </para></abstract>
+ </listitem>
+*/
diff --git a/jEdit/macros/Editing/Go_to_Column.bsh b/jEdit/macros/Editing/Go_to_Column.bsh
index cfc290a..184c884 100644
--- a/jEdit/macros/Editing/Go_to_Column.bsh
+++ b/jEdit/macros/Editing/Go_to_Column.bsh
@@ -1,51 +1,51 @@
-/*
- * Go_to_Column.bsh - a BeanShell macro for the jEdit text
- * editor - Prompts the user for a column position on the
- * current line, then moves the caret there.
- *
- * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Go_to_Column.bsh 4995 2004-03-19 15:58:00Z spestov $
- */
-goToColumn()
-{
- line = textArea.getCaretLine();
- len = textArea.getLineLength(line) + 1;
- while(true)
- {
- col = Macros.input(view, "Column (between 1 and " + len + "):");
- if(col == null)
- return;
- else
- {
- try
- {
- col = Integer.parseInt(col);
- if(col >= 1 && col <= len)
- {
- lineStartOffset = textArea.getLineStartOffset(line);
- textArea.setCaretPosition(lineStartOffset + (col-1));
- textArea.requestFocus();
- return;
- }
- }catch(NumberFormatException e){
- }
- }
- }
-}
-
-goToColumn();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Go_to_Column.bsh</filename></para>
- <abstract><para>
- Prompts the user for a column position on the
- current line, then moves the caret there.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+ * Go_to_Column.bsh - a BeanShell macro for the jEdit text
+ * editor - Prompts the user for a column position on the
+ * current line, then moves the caret there.
+ *
+ * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Go_to_Column.bsh 4995 2004-03-19 15:58:00Z spestov $
+ */
+goToColumn()
+{
+ line = textArea.getCaretLine();
+ len = textArea.getLineLength(line) + 1;
+ while(true)
+ {
+ col = Macros.input(view, "Column (between 1 and " + len + "):");
+ if(col == null)
+ return;
+ else
+ {
+ try
+ {
+ col = Integer.parseInt(col);
+ if(col >= 1 && col <= len)
+ {
+ lineStartOffset = textArea.getLineStartOffset(line);
+ textArea.setCaretPosition(lineStartOffset + (col-1));
+ textArea.requestFocus();
+ return;
+ }
+ }catch(NumberFormatException e){
+ }
+ }
+ }
+}
+
+goToColumn();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Go_to_Column.bsh</filename></para>
+ <abstract><para>
+ Prompts the user for a column position on the
+ current line, then moves the caret there.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Editing/Greedy_Backspace.bsh b/jEdit/macros/Editing/Greedy_Backspace.bsh
index 21034de..654a954 100644
--- a/jEdit/macros/Editing/Greedy_Backspace.bsh
+++ b/jEdit/macros/Editing/Greedy_Backspace.bsh
@@ -1,81 +1,81 @@
-/*
- * Greedy_Backspace.bsh - If buffer is using soft tabs,
- * this macro will backspace to the previous tab stop,
- * if all characters between the caret and the tab stop
- * are spaces. In all other cases a single character is
- * removed.
- *
- * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at jedit.org>
- *
- * $Id: Greedy_Backspace.bsh 5230 2005-07-20 13:31:08Z orutherfurd $
- */
-
-/**
- * @param onlyFullTabs if true, multiple spaces are only
- * removed if they would constitute
- * a 'complete' tab.
- */
-void greedyBackspace(View view, boolean onlyFullTabs)
-{
- JEditTextArea textArea = view.getTextArea();
- JEditBuffer buffer = textArea.getBuffer();
-
- int caret = textArea.getCaretPosition();
- int caretLine = textArea.getCaretLine();
- int lineStart = textArea.getLineStartOffset(caretLine);
-
- if(buffer.getBooleanProperty("noTabs") == true)
- {
- // if anything is selected, use standard
- if(textArea.getSelection().length != 0)
- {
- textArea.backspace();
- }
- // if at the start of the line, use standard
- else if(caret == lineStart)
- {
- textArea.backspace();
- }
- else
- {
- int col = caret - lineStart;
- int tabSize = buffer.getIntegerProperty("tabSize",8);
-
- // unlikely, but just in case
- if(tabSize <= 0)
- {
- buffer.remove(caret-1,1);
- }
- else
- {
- int toTabStop = ((col-1) % tabSize) + 1;
- int count = 0;
- String chunk = buffer.getText(caret-toTabStop,toTabStop);
- for(int i=0; i < toTabStop; i++)
- {
- if(' ' != chunk.charAt(i))
- break;
- count += 1;
- }
-
- // if onlyFullTabs must be only spaces to
- // the tabStop and must have tabSize number
- // of spaces to remove them all.
- if(onlyFullTabs == false || count == tabSize){
- buffer.remove(caret-count,count);
- }
- else{
- buffer.remove(caret-1,1);
- }
- }
- }
- }
- else
- textArea.backspace();
-}
-
-if(buffer.isReadOnly())
- Toolkit.getDefaultToolkit().beep();
-else
- greedyBackspace(view,true);
-
+/*
+ * Greedy_Backspace.bsh - If buffer is using soft tabs,
+ * this macro will backspace to the previous tab stop,
+ * if all characters between the caret and the tab stop
+ * are spaces. In all other cases a single character is
+ * removed.
+ *
+ * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at jedit.org>
+ *
+ * $Id: Greedy_Backspace.bsh 5230 2005-07-20 13:31:08Z orutherfurd $
+ */
+
+/**
+ * @param onlyFullTabs if true, multiple spaces are only
+ * removed if they would constitute
+ * a 'complete' tab.
+ */
+void greedyBackspace(View view, boolean onlyFullTabs)
+{
+ JEditTextArea textArea = view.getTextArea();
+ JEditBuffer buffer = textArea.getBuffer();
+
+ int caret = textArea.getCaretPosition();
+ int caretLine = textArea.getCaretLine();
+ int lineStart = textArea.getLineStartOffset(caretLine);
+
+ if(buffer.getBooleanProperty("noTabs") == true)
+ {
+ // if anything is selected, use standard
+ if(textArea.getSelection().length != 0)
+ {
+ textArea.backspace();
+ }
+ // if at the start of the line, use standard
+ else if(caret == lineStart)
+ {
+ textArea.backspace();
+ }
+ else
+ {
+ int col = caret - lineStart;
+ int tabSize = buffer.getIntegerProperty("tabSize",8);
+
+ // unlikely, but just in case
+ if(tabSize <= 0)
+ {
+ buffer.remove(caret-1,1);
+ }
+ else
+ {
+ int toTabStop = ((col-1) % tabSize) + 1;
+ int count = 0;
+ String chunk = buffer.getText(caret-toTabStop,toTabStop);
+ for(int i=0; i < toTabStop; i++)
+ {
+ if(' ' != chunk.charAt(i))
+ break;
+ count += 1;
+ }
+
+ // if onlyFullTabs must be only spaces to
+ // the tabStop and must have tabSize number
+ // of spaces to remove them all.
+ if(onlyFullTabs == false || count == tabSize){
+ buffer.remove(caret-count,count);
+ }
+ else{
+ buffer.remove(caret-1,1);
+ }
+ }
+ }
+ }
+ else
+ textArea.backspace();
+}
+
+if(buffer.isReadOnly())
+ Toolkit.getDefaultToolkit().beep();
+else
+ greedyBackspace(view,true);
+
diff --git a/jEdit/macros/Editing/Greedy_Delete.bsh b/jEdit/macros/Editing/Greedy_Delete.bsh
index 77de2cc..dfcbf40 100644
--- a/jEdit/macros/Editing/Greedy_Delete.bsh
+++ b/jEdit/macros/Editing/Greedy_Delete.bsh
@@ -1,87 +1,87 @@
-/*
- * Greedy_Delete.bsh - If a buffer is using soft tabs,
- * this macro will delete tabSize number of spaces, if
- * all the characters between the caret and the next tab
- * stop are spaces. In all other cases a single character
- * is deleted.
- *
- * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
- *
- * $Id: Greedy_Delete.bsh 5230 2005-07-20 13:31:08Z orutherfurd $
- */
-
-/**
- * @param onlyFullTabs if true, multiple spaces are only
- * removed if they would constitute
- * a 'complete' tab.
- */
-void greedyDelete(View view, boolean onlyFullTabs)
-{
- JEditTextArea textArea = view.getTextArea();
- JEditBuffer buffer = textArea.getBuffer();
- int caret = textArea.getCaretPosition();
- int caretLine = textArea.getCaretLine();
- int lineStart = textArea.getLineStartOffset(caretLine);
- int lineEnd = textArea.getLineEndOffset(caretLine);
-
- if(buffer.getBooleanProperty("noTabs") == true)
- {
- // if anything is selected, use standard
- if(textArea.getSelection().length != 0)
- {
- textArea.delete();
- }
- // if at the end of the line, go to the
- // start of the next line (+1 for \n)
- else if(caret+1 >= lineEnd)
- {
- textArea.delete();
- }
- else
- {
- int col = caret - lineStart;
- int tabSize = buffer.getIntegerProperty("tabSize",8);
-
- // unlikely, but just in case
- if(tabSize <= 0)
- {
- textArea.delete();
- }
- else
- {
- int toTabStop = (((col+tabSize)-1) % tabSize) + 1;
- // don't wrap to next line
- if(caret+toTabStop > lineEnd){
- textArea.delete();
- return;
- }
-
- int count = 0;
- for(int i=0; i < toTabStop; i++)
- {
- if(!" ".equals(buffer.getText(caret+i,1)))
- break;
- count += 1;
- }
-
- // if onlyFullTabs must be only spaces to
- // the tabStop and must have tabSize number
- // of spaces to remove them all.
- if(onlyFullTabs == false || count == tabSize){
- buffer.remove(caret,count);
- }
- else{
- textArea.delete();
- }
- }
- }
- }
- else
- textArea.delete();
-}
-
-if(buffer.isReadOnly())
- Toolkit.getDefaultToolkit().beep();
-else
- greedyDelete(view,true);
-
+/*
+ * Greedy_Delete.bsh - If a buffer is using soft tabs,
+ * this macro will delete tabSize number of spaces, if
+ * all the characters between the caret and the next tab
+ * stop are spaces. In all other cases a single character
+ * is deleted.
+ *
+ * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
+ *
+ * $Id: Greedy_Delete.bsh 5230 2005-07-20 13:31:08Z orutherfurd $
+ */
+
+/**
+ * @param onlyFullTabs if true, multiple spaces are only
+ * removed if they would constitute
+ * a 'complete' tab.
+ */
+void greedyDelete(View view, boolean onlyFullTabs)
+{
+ JEditTextArea textArea = view.getTextArea();
+ JEditBuffer buffer = textArea.getBuffer();
+ int caret = textArea.getCaretPosition();
+ int caretLine = textArea.getCaretLine();
+ int lineStart = textArea.getLineStartOffset(caretLine);
+ int lineEnd = textArea.getLineEndOffset(caretLine);
+
+ if(buffer.getBooleanProperty("noTabs") == true)
+ {
+ // if anything is selected, use standard
+ if(textArea.getSelection().length != 0)
+ {
+ textArea.delete();
+ }
+ // if at the end of the line, go to the
+ // start of the next line (+1 for \n)
+ else if(caret+1 >= lineEnd)
+ {
+ textArea.delete();
+ }
+ else
+ {
+ int col = caret - lineStart;
+ int tabSize = buffer.getIntegerProperty("tabSize",8);
+
+ // unlikely, but just in case
+ if(tabSize <= 0)
+ {
+ textArea.delete();
+ }
+ else
+ {
+ int toTabStop = (((col+tabSize)-1) % tabSize) + 1;
+ // don't wrap to next line
+ if(caret+toTabStop > lineEnd){
+ textArea.delete();
+ return;
+ }
+
+ int count = 0;
+ for(int i=0; i < toTabStop; i++)
+ {
+ if(!" ".equals(buffer.getText(caret+i,1)))
+ break;
+ count += 1;
+ }
+
+ // if onlyFullTabs must be only spaces to
+ // the tabStop and must have tabSize number
+ // of spaces to remove them all.
+ if(onlyFullTabs == false || count == tabSize){
+ buffer.remove(caret,count);
+ }
+ else{
+ textArea.delete();
+ }
+ }
+ }
+ }
+ else
+ textArea.delete();
+}
+
+if(buffer.isReadOnly())
+ Toolkit.getDefaultToolkit().beep();
+else
+ greedyDelete(view,true);
+
diff --git a/jEdit/macros/Editing/Greedy_Left.bsh b/jEdit/macros/Editing/Greedy_Left.bsh
index 8b31f92..c1736b9 100644
--- a/jEdit/macros/Editing/Greedy_Left.bsh
+++ b/jEdit/macros/Editing/Greedy_Left.bsh
@@ -1,80 +1,80 @@
-/*
- * Greedy_Left.bsh - If a buffer is using soft tabs,
- * this macro will move the caret tabSize spaces to the left,
- * if all the characters between the caret and the previous
- * tab stop are all spaces. In all other cases, the caret
- * is moved a single character to the left.
- *
- * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
- *
- * $Id: Greedy_Left.bsh 5230 2005-07-20 13:31:08Z orutherfurd $
- */
-
-/**
- * @param onlyFullTabs if true, the caret will only be moved
- * multiple spaces it would constitute
- * a 'complete' tab.
- */
-void greedyLeft(View view, boolean onlyFullTabs)
-{
- JEditTextArea textArea = view.getTextArea();
- JEditBuffer buffer = textArea.getBuffer();
- int caret = textArea.getCaretPosition();
- int caretLine = textArea.getCaretLine();
- int lineStart = textArea.getLineStartOffset(caretLine);
-
- if(textArea.getCaretPosition() == 0)
- return;
-
- if(buffer.getBooleanProperty("noTabs") == true)
- {
- // if anything is selected, use standard
- if(textArea.getSelection().length != 0)
- {
- textArea.setCaretPosition(caret-1);
- }
- // if at the start of the line, use standard
- else if(caret == lineStart)
- {
- textArea.setCaretPosition(caret-1);
- }
- else
- {
- int col = caret - lineStart;
- int tabSize = buffer.getIntegerProperty("tabSize",8);
-
- // unlikely, but just in case
- if(tabSize <= 0)
- {
- textArea.setCaretPosition(caret-1);
- }
- else
- {
- int toTabStop = ((col-1) % tabSize) + 1;
- int count = 0;
- String chunk = buffer.getText(caret-toTabStop,toTabStop);
- for(int i=0; i < toTabStop; i++)
- {
- if(' ' != chunk.charAt(i))
- break;
- count += 1;
- }
-
- // if onlyFullTabs must be only spaces to
- // the tabStop and must have tabSize number
- // of spaces to remove them all.
- if(onlyFullTabs == false || count == tabSize){
- textArea.setCaretPosition(caret-count);
- }
- else{
- textArea.setCaretPosition(caret-1);
- }
- }
- }
- }
- else
- textArea.setCaretPosition(caret-1);
-}
-
-greedyLeft(view,true);
-
+/*
+ * Greedy_Left.bsh - If a buffer is using soft tabs,
+ * this macro will move the caret tabSize spaces to the left,
+ * if all the characters between the caret and the previous
+ * tab stop are all spaces. In all other cases, the caret
+ * is moved a single character to the left.
+ *
+ * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
+ *
+ * $Id: Greedy_Left.bsh 5230 2005-07-20 13:31:08Z orutherfurd $
+ */
+
+/**
+ * @param onlyFullTabs if true, the caret will only be moved
+ * multiple spaces it would constitute
+ * a 'complete' tab.
+ */
+void greedyLeft(View view, boolean onlyFullTabs)
+{
+ JEditTextArea textArea = view.getTextArea();
+ JEditBuffer buffer = textArea.getBuffer();
+ int caret = textArea.getCaretPosition();
+ int caretLine = textArea.getCaretLine();
+ int lineStart = textArea.getLineStartOffset(caretLine);
+
+ if(textArea.getCaretPosition() == 0)
+ return;
+
+ if(buffer.getBooleanProperty("noTabs") == true)
+ {
+ // if anything is selected, use standard
+ if(textArea.getSelection().length != 0)
+ {
+ textArea.setCaretPosition(caret-1);
+ }
+ // if at the start of the line, use standard
+ else if(caret == lineStart)
+ {
+ textArea.setCaretPosition(caret-1);
+ }
+ else
+ {
+ int col = caret - lineStart;
+ int tabSize = buffer.getIntegerProperty("tabSize",8);
+
+ // unlikely, but just in case
+ if(tabSize <= 0)
+ {
+ textArea.setCaretPosition(caret-1);
+ }
+ else
+ {
+ int toTabStop = ((col-1) % tabSize) + 1;
+ int count = 0;
+ String chunk = buffer.getText(caret-toTabStop,toTabStop);
+ for(int i=0; i < toTabStop; i++)
+ {
+ if(' ' != chunk.charAt(i))
+ break;
+ count += 1;
+ }
+
+ // if onlyFullTabs must be only spaces to
+ // the tabStop and must have tabSize number
+ // of spaces to remove them all.
+ if(onlyFullTabs == false || count == tabSize){
+ textArea.setCaretPosition(caret-count);
+ }
+ else{
+ textArea.setCaretPosition(caret-1);
+ }
+ }
+ }
+ }
+ else
+ textArea.setCaretPosition(caret-1);
+}
+
+greedyLeft(view,true);
+
diff --git a/jEdit/macros/Editing/Greedy_Right.bsh b/jEdit/macros/Editing/Greedy_Right.bsh
index fb4a32d..2ca0251 100644
--- a/jEdit/macros/Editing/Greedy_Right.bsh
+++ b/jEdit/macros/Editing/Greedy_Right.bsh
@@ -1,86 +1,86 @@
-/*
- * Greedy_Right.bsh - If a buffer is using soft tabs,
- * this macro will move the caret tabSize spaces to the right,
- * if all the characters between the caret and the next
- * tab stop are all spaces. In all other cases, the caret
- * is moved a single character to the right.
- *
- * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
- *
- * $Id: Greedy_Right.bsh 5230 2005-07-20 13:31:08Z orutherfurd $
- */
-
-/**
- * @param onlyFullTabs if true, the caret will only be moved
- * multiple spaces it would constitute
- * a 'complete' tab.
- */
-void greedyRight(View view, boolean onlyFullTabs)
-{
- JEditTextArea textArea = view.getTextArea();
- JEditBuffer buffer = textArea.getBuffer();
- int caret = textArea.getCaretPosition();
- int caretLine = textArea.getCaretLine();
- int lineStart = textArea.getLineStartOffset(caretLine);
- int lineEnd = textArea.getLineEndOffset(caretLine);
-
- if(textArea.getCaretPosition() == buffer.getLength())
- return;
-
- if(buffer.getBooleanProperty("noTabs") == true)
- {
- // if anything is selected, use standard
- if(textArea.getSelection().length != 0)
- {
- textArea.setCaretPosition(caret+1);
- }
- // if at the end of the line, go to the
- // start of the next line (+1 for \n)
- else if(caret+1 >= lineEnd)
- {
- textArea.setCaretPosition(caret+1);
- }
- else
- {
- int col = caret - lineStart;
- int tabSize = buffer.getIntegerProperty("tabSize",8);
-
- // unlikely, but just in case
- if(tabSize <= 0)
- {
- textArea.setCaretPosition(caret+11);
- }
- else
- {
- int toTabStop = (((col+tabSize)-1) % tabSize) + 1;
- String chunk = "";
- if((caret + toTabStop) <= buffer.getLength())
- chunk = buffer.getText(caret,toTabStop);
- int count = 0;
- for(int i=0; i < chunk.length(); i++)
- {
- if(' ' != chunk.charAt(i))
- {
- break;
- }
- count += 1;
- }
-
- // if onlyFullTabs must be only spaces to
- // the tabStop and must have tabSize number
- // of spaces to remove them all.
- if(onlyFullTabs == false || count == tabSize){
- textArea.setCaretPosition(caret+count);
- }
- else{
- textArea.setCaretPosition(caret+1);
- }
- }
- }
- }
- else
- textArea.setCaretPosition(caret+1);
-}
-
-greedyRight(view,true);
-
+/*
+ * Greedy_Right.bsh - If a buffer is using soft tabs,
+ * this macro will move the caret tabSize spaces to the right,
+ * if all the characters between the caret and the next
+ * tab stop are all spaces. In all other cases, the caret
+ * is moved a single character to the right.
+ *
+ * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
+ *
+ * $Id: Greedy_Right.bsh 5230 2005-07-20 13:31:08Z orutherfurd $
+ */
+
+/**
+ * @param onlyFullTabs if true, the caret will only be moved
+ * multiple spaces it would constitute
+ * a 'complete' tab.
+ */
+void greedyRight(View view, boolean onlyFullTabs)
+{
+ JEditTextArea textArea = view.getTextArea();
+ JEditBuffer buffer = textArea.getBuffer();
+ int caret = textArea.getCaretPosition();
+ int caretLine = textArea.getCaretLine();
+ int lineStart = textArea.getLineStartOffset(caretLine);
+ int lineEnd = textArea.getLineEndOffset(caretLine);
+
+ if(textArea.getCaretPosition() == buffer.getLength())
+ return;
+
+ if(buffer.getBooleanProperty("noTabs") == true)
+ {
+ // if anything is selected, use standard
+ if(textArea.getSelection().length != 0)
+ {
+ textArea.setCaretPosition(caret+1);
+ }
+ // if at the end of the line, go to the
+ // start of the next line (+1 for \n)
+ else if(caret+1 >= lineEnd)
+ {
+ textArea.setCaretPosition(caret+1);
+ }
+ else
+ {
+ int col = caret - lineStart;
+ int tabSize = buffer.getIntegerProperty("tabSize",8);
+
+ // unlikely, but just in case
+ if(tabSize <= 0)
+ {
+ textArea.setCaretPosition(caret+11);
+ }
+ else
+ {
+ int toTabStop = (((col+tabSize)-1) % tabSize) + 1;
+ String chunk = "";
+ if((caret + toTabStop) <= buffer.getLength())
+ chunk = buffer.getText(caret,toTabStop);
+ int count = 0;
+ for(int i=0; i < chunk.length(); i++)
+ {
+ if(' ' != chunk.charAt(i))
+ {
+ break;
+ }
+ count += 1;
+ }
+
+ // if onlyFullTabs must be only spaces to
+ // the tabStop and must have tabSize number
+ // of spaces to remove them all.
+ if(onlyFullTabs == false || count == tabSize){
+ textArea.setCaretPosition(caret+count);
+ }
+ else{
+ textArea.setCaretPosition(caret+1);
+ }
+ }
+ }
+ }
+ else
+ textArea.setCaretPosition(caret+1);
+}
+
+greedyRight(view,true);
+
diff --git a/jEdit/macros/Editing/Keywords_to_Upper_Case.bsh b/jEdit/macros/Editing/Keywords_to_Upper_Case.bsh
index 44e0279..e4a74b2 100644
--- a/jEdit/macros/Editing/Keywords_to_Upper_Case.bsh
+++ b/jEdit/macros/Editing/Keywords_to_Upper_Case.bsh
@@ -1,47 +1,47 @@
-/**
- * Converts keyword token types to upper case.
- */
-void keywords2upper(View view)
-{
- // declarations run faster than doing Token.KEYWORDx comparison
- byte KEYWORD1 = Token.KEYWORD1;
- byte KEYWORD4 = Token.KEYWORD4;
- JEditBuffer buffer = view.getBuffer();
- JEditTextArea textArea = view.getTextArea();
- Token token = null;
-
- //long t1 = System.currentTimeMillis();
-
- Selection[] selection = textArea.getSelection();
- Buffer.TokenList info = null;
- int pos = 0;
- int lineStart = 0;
-
- for(int line = 0; line < textArea.getLineCount(); ++line)
- {
- info = buffer.markTokens(line);
- token = info.getFirstToken();
- lineStart = buffer.getLineStartOffset(line);
- pos = lineStart;
- while(token != null)
- {
- if(KEYWORD1 <= token.id && token.id <= KEYWORD4)
- {
- String word = buffer.getText(pos,token.length);
- buffer.remove(pos,token.length);
- buffer.insert(pos,word.toUpperCase());
- }
- pos += token.length;
- token = token.next;
- }
- }
- view.getTextArea().setSelection(selection);
-
- //long t2 = System.currentTimeMillis();
- //print("elapsed: " + (t2-t1));
-
- view.getStatus().setMessageAndClear("Converted Keywords to Upper Case");
-}
-
-keywords2upper(view);
-
+/**
+ * Converts keyword token types to upper case.
+ */
+void keywords2upper(View view)
+{
+ // declarations run faster than doing Token.KEYWORDx comparison
+ byte KEYWORD1 = Token.KEYWORD1;
+ byte KEYWORD4 = Token.KEYWORD4;
+ JEditBuffer buffer = view.getBuffer();
+ JEditTextArea textArea = view.getTextArea();
+ Token token = null;
+
+ //long t1 = System.currentTimeMillis();
+
+ Selection[] selection = textArea.getSelection();
+ Buffer.TokenList info = null;
+ int pos = 0;
+ int lineStart = 0;
+
+ for(int line = 0; line < textArea.getLineCount(); ++line)
+ {
+ info = buffer.markTokens(line);
+ token = info.getFirstToken();
+ lineStart = buffer.getLineStartOffset(line);
+ pos = lineStart;
+ while(token != null)
+ {
+ if(KEYWORD1 <= token.id && token.id <= KEYWORD4)
+ {
+ String word = buffer.getText(pos,token.length);
+ buffer.remove(pos,token.length);
+ buffer.insert(pos,word.toUpperCase());
+ }
+ pos += token.length;
+ token = token.next;
+ }
+ }
+ view.getTextArea().setSelection(selection);
+
+ //long t2 = System.currentTimeMillis();
+ //print("elapsed: " + (t2-t1));
+
+ view.getStatus().setMessageAndClear("Converted Keywords to Upper Case");
+}
+
+keywords2upper(view);
+
diff --git a/jEdit/macros/Editing/Mode_Switcher.bsh b/jEdit/macros/Editing/Mode_Switcher.bsh
index 96e86d2..5a9e697 100644
--- a/jEdit/macros/Editing/Mode_Switcher.bsh
+++ b/jEdit/macros/Editing/Mode_Switcher.bsh
@@ -1,193 +1,193 @@
-/*
- * ModeSwitcher.bsh - a BeanShell macro script for changing the current
- * buffer's edit mode.
- *
- * Copyright (C) 2004-6 Nicholas O'Leary nick.oleary at gmail.com
- *
- * :mode=beanshell:tabSize=3:indentSize=3:maxLineLen=0:noTabs=false:
- * :indentOnTab=true:indentOnEnter=true:folding=explicit:collapseFolds=1:
- *
- * {{{ License
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * }}}
- *
- * Notes:
- * There are two other ways to change the buffers mode:
- * - enter 'buffer.mode=[mode]' in the action bar
- * - change it in the Buffer Options dialog
- * Whilst both of these do the job, I wanted a way to achieve it with minimum
- * effort, and keypresses.
- * It also has the benefit of auto-completion of mode names.
- *
- * $Id: Mode_Switcher.bsh 5465 2006-06-21 13:04:43Z kpouer $
- */
-
-import javax.swing.border.EmptyBorder;
-
-//class ModeSwitcherTextField extends JTextField
-void modeSwitcher() {
- JDialog dialog = new JDialog(view, "Buffer Mode Switcher", true);
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,12));
- Mode[] modes = jEdit.getModes();
- String[] names = new String[modes.length];
- for(int i=0;i<modes.length;i++) {
- names[i] = modes[i].getName();
- }
- Arrays.sort(names);
- JTextField textfield = new JTextField() {
- protected String[] names;
- protected boolean shifted = false;
- //{{{ setNames
- public void setNames(String[] a){
- names = a;
- } //}}}
- public boolean getFocusTraversalKeysEnabled(){return false;}
- //{{{ processKeyEvent
- protected void processKeyEvent(KeyEvent evt)
- {
- if (evt.getID() == KeyEvent.KEY_RELEASED) {
- if (evt.getKeyCode() == KeyEvent.VK_SHIFT) {
- shifted = false;
- }
- } else if(evt.getID() == KeyEvent.KEY_PRESSED) {
- if (evt.getKeyCode() == KeyEvent.VK_SHIFT) {
- shifted = true;
- } else if(evt.getKeyCode() == KeyEvent.VK_TAB) {
- // Get the current text
- String txt = getText();
- String original = txt;
- // See if some text is selected
- if (getSelectedText() != null)
- txt = txt.substring(0,txt.length()-getSelectedText().length());
- // txt represents the unhighlighted text in the box. This is used
- // to find further matches.
-
- // See if the current text is a known mode
- int index = Arrays.binarySearch(names,original);
- if (index < 0) index = 0;
- int indexStep = 1;
- if (shifted) indexStep = -1;
- index+=indexStep;
- if (index == names.length) index = 0;
- if (index < 0) index = names.length-1;
- int match = -1;
- boolean foundExact = false;
- boolean keepLooping = true;
- // Loop through modes, starting at current+1
- int i = index;
- while(keepLooping) {
- // Skip if the mode name is shorter than the current text
- if (names[i].length()>=txt.length())
- {
- // If the mode matches, escape
- if (names[i].substring(0,txt.length()).equals(txt)) {
- match = i;
- break;
- }
- }
- // Loop the loop
- i+=indexStep;
- if (i == names.length) i = 0;
- if (i < 0) i = names.length-1;
- if (i==index) break;
- }
- // If a match has been found...
- if (match >= 0) {
- setText(names[match]);
- setSelectionStart(txt.length());
- setSelectionEnd(names[match].length());
- }
- return;
- }
- }
- super.processKeyEvent(evt);
- } //}}}
- };
-
- textfield.setColumns(20);
- textfield.setNames(names);
- Mode m = buffer.getMode();
- // Set the inital text to the current mode, and highlight it, so a key
- // press will clear the entry.
- if (m != null) {
- textfield.setText(m.getName());
- textfield.setSelectionStart(0);
- textfield.setSelectionEnd(m.getName().length());
- }
- content.add(new JLabel("Enter buffer mode:"), BorderLayout.NORTH);
- content.add(textfield, BorderLayout.CENTER);
- Vector v = new Vector();
-
- // KeyListener Interface
- //{{{ keyPressed
- void keyPressed(evt)
- {
- if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
- dialog.dispose();
- else if(evt.getKeyCode() == KeyEvent.VK_ENTER)
- {
- Mode m = jEdit.getMode(textfield.getText());
- if (m!=null)
- {
- buffer.setMode(m);
- Log.log(Log.NOTICE,
- BeanShell.class,
- "Changing mode of buffer ["+
- buffer.getName()+"] to ["+
- m.getName()+"]");
- } else {
- Log.log(Log.WARNING,
- BeanShell.class,
- "Mode ["+textfield.getText()+"] not found");
- }
- evt.consume();
- dialog.dispose();
- }
- }//}}}
- void keyReleased(evt) {}
- void keyTyped(evt) {}
-
- dialog.addKeyListener(this);
- textfield.addKeyListener(this);
- dialog.setContentPane(content);
- dialog.pack();
- dialog.setLocationRelativeTo(view);
- textfield.grabFocus();
- dialog.setVisible(true);
-}
-
-modeSwitcher();
-
-/*
-
-Macro index data (in DocBook format)
-
- <listitem>
- <para><filename>Mode_Switcher.bsh</filename></para>
- Displays a modal dialog with the current buffer's mode in a text field,
- allowing one to change the mode by typing in its name.
- <keycap>ENTER</keycap> selects the current mode; if the text is not a
- valid mode, the dialog still dismisses, but a warning is logged to the
- activity log.
- <keycap>ESACPE</keycap> closes the dialog with no further action.
- <keycap>TAB</keycap> attempts to auto-complete the mode name. Pressing
- <keycap>TAB</keycap> repeatedly cycles through the possible completions.
- <keycap>SHIFT-TAB</keycap> cycles through the completions in reverse.
- </para></abstract>
- </listitem>
-
-*/
+/*
+ * ModeSwitcher.bsh - a BeanShell macro script for changing the current
+ * buffer's edit mode.
+ *
+ * Copyright (C) 2004-6 Nicholas O'Leary nick.oleary at gmail.com
+ *
+ * :mode=beanshell:tabSize=3:indentSize=3:maxLineLen=0:noTabs=false:
+ * :indentOnTab=true:indentOnEnter=true:folding=explicit:collapseFolds=1:
+ *
+ * {{{ License
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * }}}
+ *
+ * Notes:
+ * There are two other ways to change the buffers mode:
+ * - enter 'buffer.mode=[mode]' in the action bar
+ * - change it in the Buffer Options dialog
+ * Whilst both of these do the job, I wanted a way to achieve it with minimum
+ * effort, and keypresses.
+ * It also has the benefit of auto-completion of mode names.
+ *
+ * $Id: Mode_Switcher.bsh 5465 2006-06-21 13:04:43Z kpouer $
+ */
+
+import javax.swing.border.EmptyBorder;
+
+//class ModeSwitcherTextField extends JTextField
+void modeSwitcher() {
+ JDialog dialog = new JDialog(view, "Buffer Mode Switcher", true);
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ Mode[] modes = jEdit.getModes();
+ String[] names = new String[modes.length];
+ for(int i=0;i<modes.length;i++) {
+ names[i] = modes[i].getName();
+ }
+ Arrays.sort(names);
+ JTextField textfield = new JTextField() {
+ protected String[] names;
+ protected boolean shifted = false;
+ //{{{ setNames
+ public void setNames(String[] a){
+ names = a;
+ } //}}}
+ public boolean getFocusTraversalKeysEnabled(){return false;}
+ //{{{ processKeyEvent
+ protected void processKeyEvent(KeyEvent evt)
+ {
+ if (evt.getID() == KeyEvent.KEY_RELEASED) {
+ if (evt.getKeyCode() == KeyEvent.VK_SHIFT) {
+ shifted = false;
+ }
+ } else if(evt.getID() == KeyEvent.KEY_PRESSED) {
+ if (evt.getKeyCode() == KeyEvent.VK_SHIFT) {
+ shifted = true;
+ } else if(evt.getKeyCode() == KeyEvent.VK_TAB) {
+ // Get the current text
+ String txt = getText();
+ String original = txt;
+ // See if some text is selected
+ if (getSelectedText() != null)
+ txt = txt.substring(0,txt.length()-getSelectedText().length());
+ // txt represents the unhighlighted text in the box. This is used
+ // to find further matches.
+
+ // See if the current text is a known mode
+ int index = Arrays.binarySearch(names,original);
+ if (index < 0) index = 0;
+ int indexStep = 1;
+ if (shifted) indexStep = -1;
+ index+=indexStep;
+ if (index == names.length) index = 0;
+ if (index < 0) index = names.length-1;
+ int match = -1;
+ boolean foundExact = false;
+ boolean keepLooping = true;
+ // Loop through modes, starting at current+1
+ int i = index;
+ while(keepLooping) {
+ // Skip if the mode name is shorter than the current text
+ if (names[i].length()>=txt.length())
+ {
+ // If the mode matches, escape
+ if (names[i].substring(0,txt.length()).equals(txt)) {
+ match = i;
+ break;
+ }
+ }
+ // Loop the loop
+ i+=indexStep;
+ if (i == names.length) i = 0;
+ if (i < 0) i = names.length-1;
+ if (i==index) break;
+ }
+ // If a match has been found...
+ if (match >= 0) {
+ setText(names[match]);
+ setSelectionStart(txt.length());
+ setSelectionEnd(names[match].length());
+ }
+ return;
+ }
+ }
+ super.processKeyEvent(evt);
+ } //}}}
+ };
+
+ textfield.setColumns(20);
+ textfield.setNames(names);
+ Mode m = buffer.getMode();
+ // Set the inital text to the current mode, and highlight it, so a key
+ // press will clear the entry.
+ if (m != null) {
+ textfield.setText(m.getName());
+ textfield.setSelectionStart(0);
+ textfield.setSelectionEnd(m.getName().length());
+ }
+ content.add(new JLabel("Enter buffer mode:"), BorderLayout.NORTH);
+ content.add(textfield, BorderLayout.CENTER);
+ Vector v = new Vector();
+
+ // KeyListener Interface
+ //{{{ keyPressed
+ void keyPressed(evt)
+ {
+ if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
+ dialog.dispose();
+ else if(evt.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ Mode m = jEdit.getMode(textfield.getText());
+ if (m!=null)
+ {
+ buffer.setMode(m);
+ Log.log(Log.NOTICE,
+ BeanShell.class,
+ "Changing mode of buffer ["+
+ buffer.getName()+"] to ["+
+ m.getName()+"]");
+ } else {
+ Log.log(Log.WARNING,
+ BeanShell.class,
+ "Mode ["+textfield.getText()+"] not found");
+ }
+ evt.consume();
+ dialog.dispose();
+ }
+ }//}}}
+ void keyReleased(evt) {}
+ void keyTyped(evt) {}
+
+ dialog.addKeyListener(this);
+ textfield.addKeyListener(this);
+ dialog.setContentPane(content);
+ dialog.pack();
+ dialog.setLocationRelativeTo(view);
+ textfield.grabFocus();
+ dialog.setVisible(true);
+}
+
+modeSwitcher();
+
+/*
+
+Macro index data (in DocBook format)
+
+ <listitem>
+ <para><filename>Mode_Switcher.bsh</filename></para>
+ Displays a modal dialog with the current buffer's mode in a text field,
+ allowing one to change the mode by typing in its name.
+ <keycap>ENTER</keycap> selects the current mode; if the text is not a
+ valid mode, the dialog still dismisses, but a warning is logged to the
+ activity log.
+ <keycap>ESACPE</keycap> closes the dialog with no further action.
+ <keycap>TAB</keycap> attempts to auto-complete the mode name. Pressing
+ <keycap>TAB</keycap> repeatedly cycles through the possible completions.
+ <keycap>SHIFT-TAB</keycap> cycles through the completions in reverse.
+ </para></abstract>
+ </listitem>
+
+*/
diff --git a/jEdit/macros/Editing/Move_Lines_Down.bsh b/jEdit/macros/Editing/Move_Lines_Down.bsh
index 662713d..3a533bf 100644
--- a/jEdit/macros/Editing/Move_Lines_Down.bsh
+++ b/jEdit/macros/Editing/Move_Lines_Down.bsh
@@ -1,106 +1,106 @@
-/*
-Move_Lines_Down.bsh - Beanshell macro to move a selection of lines down by one
-line. This should handle multiple selections, but doesn't work quite right.
-
-Copyright (c) Dale Anson, 2004
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-// check buffer read-only status
-if ( buffer.isReadOnly() ) {
- Macros.error( view, "File is read only." );
- return ;
-}
-
-Mode mode = buffer.getMode();
-boolean shouldIndent = false;
-String[] indentProps = new String[]{"indentOpenBrackets", "indentOpenBrackets", "unalignedOpenBrackets", "unalignedCloseBrackets", "indentNextLine", "unindentThisLine", "electricKeys", "doubleBracketIndent", "lineUpClosingBracket"};
-for (String name : indentProps) {
- if (mode.getProperty(name) != null) {
- shouldIndent = true;
- break;
- }
-}
-
-// get the current selection or the current line if no selection
-Selection[] selections = textArea.getSelection();
-
-// this doesn't work right with multiple selection, so don't do anything
-if (selections.length > 1) {
- Macros.error( view, "Line move does not work with multiple selection." );
- return ;
-}
-
-String ls = buffer.getStringProperty( "lineSeparator" );
-
-int line = textArea.getCaretLine();
-
-// make sure last line ends with a line separator
-String line_text = textArea.getLineText(textArea.getLineCount() - 1);
-if (!line_text.endsWith(ls) && line >= textArea.getLineCount() - 3) {
- buffer.insert(buffer.getLength(), ls);
-}
-
-// if nothing is selected, select current line
-if (selection == null || selections.length == 0) {
- selections = new Selection[1];
- int start_offset = textArea.getLineStartOffset(line);
- int end_offset = textArea.getLineEndOffset(line);
- selections[0] = new Selection.Range(start_offset, end_offset);
- textArea.addToSelection(selections[0]);
-}
-
-// adjust the start and end line offsets to reselect after the move
-int[] startLines = new int[selections.length];
-int[] endLines = new int[selections.length];
-for (int i = 0; i < selections.length; i++) {
- startLines[i] = selections[i].getStartLine() + 1;
- endLines[i] = selections[i].getEndLine() + 1;
-}
-
-// cut the selected text, move down one line, and paste it back in
-Registers.cut( textArea, '_' );
-textArea.goToNextLine( false );
-Registers.paste( textArea, '_', false );
-textArea.goToPrevLine( false );
-
-// indent lines
-if (shouldIndent) {
- for (int i = 0; i < startLines.length; i++) {
- buffer.indentLines( startLines[i] - 1, endLines[i] );
- }
-}
-
-// reselect the moved text
-textArea.selectNone();
-for (int i = 0; i < startLines.length; i++) {
- selection = new Selection.Range(
- textArea.getLineStartOffset( startLines[i] ),
- textArea.getLineStartOffset( endLines[i] )
- );
- textArea.addToSelection(selection);
-}
-
-
-
+/*
+Move_Lines_Down.bsh - Beanshell macro to move a selection of lines down by one
+line. This should handle multiple selections, but doesn't work quite right.
+
+Copyright (c) Dale Anson, 2004
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+// check buffer read-only status
+if ( buffer.isReadOnly() ) {
+ Macros.error( view, "File is read only." );
+ return ;
+}
+
+Mode mode = buffer.getMode();
+boolean shouldIndent = false;
+String[] indentProps = new String[]{"indentOpenBrackets", "indentOpenBrackets", "unalignedOpenBrackets", "unalignedCloseBrackets", "indentNextLine", "unindentThisLine", "electricKeys", "doubleBracketIndent", "lineUpClosingBracket"};
+for (String name : indentProps) {
+ if (mode.getProperty(name) != null) {
+ shouldIndent = true;
+ break;
+ }
+}
+
+// get the current selection or the current line if no selection
+Selection[] selections = textArea.getSelection();
+
+// this doesn't work right with multiple selection, so don't do anything
+if (selections.length > 1) {
+ Macros.error( view, "Line move does not work with multiple selection." );
+ return ;
+}
+
+String ls = buffer.getStringProperty( "lineSeparator" );
+
+int line = textArea.getCaretLine();
+
+// make sure last line ends with a line separator
+String line_text = textArea.getLineText(textArea.getLineCount() - 1);
+if (!line_text.endsWith(ls) && line >= textArea.getLineCount() - 3) {
+ buffer.insert(buffer.getLength(), ls);
+}
+
+// if nothing is selected, select current line
+if (selection == null || selections.length == 0) {
+ selections = new Selection[1];
+ int start_offset = textArea.getLineStartOffset(line);
+ int end_offset = textArea.getLineEndOffset(line);
+ selections[0] = new Selection.Range(start_offset, end_offset);
+ textArea.addToSelection(selections[0]);
+}
+
+// adjust the start and end line offsets to reselect after the move
+int[] startLines = new int[selections.length];
+int[] endLines = new int[selections.length];
+for (int i = 0; i < selections.length; i++) {
+ startLines[i] = selections[i].getStartLine() + 1;
+ endLines[i] = selections[i].getEndLine() + 1;
+}
+
+// cut the selected text, move down one line, and paste it back in
+Registers.cut( textArea, '_' );
+textArea.goToNextLine( false );
+Registers.paste( textArea, '_', false );
+textArea.goToPrevLine( false );
+
+// indent lines
+if (shouldIndent) {
+ for (int i = 0; i < startLines.length; i++) {
+ buffer.indentLines( startLines[i] - 1, endLines[i] );
+ }
+}
+
+// reselect the moved text
+textArea.selectNone();
+for (int i = 0; i < startLines.length; i++) {
+ selection = new Selection.Range(
+ textArea.getLineStartOffset( startLines[i] ),
+ textArea.getLineStartOffset( endLines[i] )
+ );
+ textArea.addToSelection(selection);
+}
+
+
+
diff --git a/jEdit/macros/Editing/Move_Lines_Up.bsh b/jEdit/macros/Editing/Move_Lines_Up.bsh
index 148ee99..b3b0780 100644
--- a/jEdit/macros/Editing/Move_Lines_Up.bsh
+++ b/jEdit/macros/Editing/Move_Lines_Up.bsh
@@ -1,110 +1,110 @@
-/*
-Move_Lines_Up.bsh - Beanshell macro to move a selection of lines up by one line.
-This should handle multiple selections, but doesn't work quite right.
-
-Copyright (c) Dale Anson, 2004
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-// check buffer read-only status
-if ( buffer.isReadOnly() ) {
- Macros.error( view, "File is read only." );
- return ;
-}
-
-Mode mode = buffer.getMode();
-boolean shouldIndent = false;
-String[] indentProps = new String[]{"indentOpenBrackets", "indentOpenBrackets", "unalignedOpenBrackets", "unalignedCloseBrackets", "indentNextLine", "unindentThisLine", "electricKeys", "doubleBracketIndent", "lineUpClosingBracket"};
-for (String name : indentProps) {
- if (mode.getProperty(name) != null) {
- shouldIndent = true;
- break;
- }
-}
-
-// get the current selection or the current line if no selection
-Selection[] selections = textArea.getSelection();
-
-// this doesn't work right with multiple selection, so don't do anything
-if (selections.length > 1) {
- Macros.error( view, "Line move does not work with multiple selection." );
- return ;
-}
-
-String ls = buffer.getStringProperty( "lineSeparator" );
-
-int line = textArea.getCaretLine();
-if (line == 0) {
- return; // at top, nowhere to go from here
-}
-if (line == textArea.getLineCount() - 1) {
- // on last line, make sure it ends with a line separator
- String line_text = textArea.getLineText(line);
- if (!line_text.endsWith(ls)) {
- buffer.insert(buffer.getLength(), ls);
- }
-}
-
-// if nothing is selected, select current line
-if (selection == null || selections.length == 0) {
- selections = new Selection[1];
- int start_offset = textArea.getLineStartOffset(line);
- int end_offset = textArea.getLineEndOffset(line);
- selections[0] = new Selection.Range(start_offset, end_offset);
- textArea.addToSelection(selections[0]);
-}
-
-// adjust the start and end line offsets to reselect after the move
-int[] startLines = new int[selections.length];
-int[] endLines = new int[selections.length];
-for (int i = 0; i < selections.length; i++) {
- if (selections[i].getStartLine() == 0) {
- return; // at top, nowhere to go from here
- }
- startLines[i] = selections[i].getStartLine() - 1;
- endLines[i] = selections[i].getEndLine() - 1;
-}
-
-// cut the selected text, move up one line, and paste it back in
-Registers.cut( textArea, '_' );
-textArea.goToPrevLine( false );
-Registers.paste( textArea, '_', false );
-textArea.goToPrevLine( false );
-
-// indent lines
-if (shouldIndent) {
- for (int i = 0; i < startLines.length; i++) {
- buffer.indentLines( startLines[i], endLines[i] + 1 );
- }
-}
-
-// reselect the moved text
-textArea.selectNone();
-for (int i = 0; i < startLines.length; i++) {
- selection = new Selection.Range(
- textArea.getLineStartOffset( startLines[i] ),
- textArea.getLineStartOffset( endLines[i] )
- );
- textArea.addToSelection(selection);
-}
+/*
+Move_Lines_Up.bsh - Beanshell macro to move a selection of lines up by one line.
+This should handle multiple selections, but doesn't work quite right.
+
+Copyright (c) Dale Anson, 2004
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+// check buffer read-only status
+if ( buffer.isReadOnly() ) {
+ Macros.error( view, "File is read only." );
+ return ;
+}
+
+Mode mode = buffer.getMode();
+boolean shouldIndent = false;
+String[] indentProps = new String[]{"indentOpenBrackets", "indentOpenBrackets", "unalignedOpenBrackets", "unalignedCloseBrackets", "indentNextLine", "unindentThisLine", "electricKeys", "doubleBracketIndent", "lineUpClosingBracket"};
+for (String name : indentProps) {
+ if (mode.getProperty(name) != null) {
+ shouldIndent = true;
+ break;
+ }
+}
+
+// get the current selection or the current line if no selection
+Selection[] selections = textArea.getSelection();
+
+// this doesn't work right with multiple selection, so don't do anything
+if (selections.length > 1) {
+ Macros.error( view, "Line move does not work with multiple selection." );
+ return ;
+}
+
+String ls = buffer.getStringProperty( "lineSeparator" );
+
+int line = textArea.getCaretLine();
+if (line == 0) {
+ return; // at top, nowhere to go from here
+}
+if (line == textArea.getLineCount() - 1) {
+ // on last line, make sure it ends with a line separator
+ String line_text = textArea.getLineText(line);
+ if (!line_text.endsWith(ls)) {
+ buffer.insert(buffer.getLength(), ls);
+ }
+}
+
+// if nothing is selected, select current line
+if (selection == null || selections.length == 0) {
+ selections = new Selection[1];
+ int start_offset = textArea.getLineStartOffset(line);
+ int end_offset = textArea.getLineEndOffset(line);
+ selections[0] = new Selection.Range(start_offset, end_offset);
+ textArea.addToSelection(selections[0]);
+}
+
+// adjust the start and end line offsets to reselect after the move
+int[] startLines = new int[selections.length];
+int[] endLines = new int[selections.length];
+for (int i = 0; i < selections.length; i++) {
+ if (selections[i].getStartLine() == 0) {
+ return; // at top, nowhere to go from here
+ }
+ startLines[i] = selections[i].getStartLine() - 1;
+ endLines[i] = selections[i].getEndLine() - 1;
+}
+
+// cut the selected text, move up one line, and paste it back in
+Registers.cut( textArea, '_' );
+textArea.goToPrevLine( false );
+Registers.paste( textArea, '_', false );
+textArea.goToPrevLine( false );
+
+// indent lines
+if (shouldIndent) {
+ for (int i = 0; i < startLines.length; i++) {
+ buffer.indentLines( startLines[i], endLines[i] + 1 );
+ }
+}
+
+// reselect the moved text
+textArea.selectNone();
+for (int i = 0; i < startLines.length; i++) {
+ selection = new Selection.Range(
+ textArea.getLineStartOffset( startLines[i] ),
+ textArea.getLineStartOffset( endLines[i] )
+ );
+ textArea.addToSelection(selection);
+}
diff --git a/jEdit/macros/Files/Browse_Directory.bsh b/jEdit/macros/Files/Browse_Directory.bsh
index 0715610..8ce45ba 100644
--- a/jEdit/macros/Files/Browse_Directory.bsh
+++ b/jEdit/macros/Files/Browse_Directory.bsh
@@ -1,51 +1,51 @@
-/*
- * Browse_Directory.bsh - a BeanShell macro script for the
- * jEdit text editor - Prompts for a path name and opens it
- * in the file system browser
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Browse_Directory.bsh 3928 2001-12-01 05:48:48Z spestov $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-void browseDirectory()
-{
- path = Macros.input(view,"Directory to browse:");
- if(path != null)
- VFSBrowser.browseDirectory(view,path);
-}
-
-browseDirectory();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Browse_Directory.bsh</filename></para>
- <abstract><para>
- Opens a directory supplied by the user in the file system
- browser.
- </para></abstract>
-</listitem>
-
-*/
-
-
-// end Browse_Directory.bsh
-
+/*
+ * Browse_Directory.bsh - a BeanShell macro script for the
+ * jEdit text editor - Prompts for a path name and opens it
+ * in the file system browser
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Browse_Directory.bsh 3928 2001-12-01 05:48:48Z spestov $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+void browseDirectory()
+{
+ path = Macros.input(view,"Directory to browse:");
+ if(path != null)
+ VFSBrowser.browseDirectory(view,path);
+}
+
+browseDirectory();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Browse_Directory.bsh</filename></para>
+ <abstract><para>
+ Opens a directory supplied by the user in the file system
+ browser.
+ </para></abstract>
+</listitem>
+
+*/
+
+
+// end Browse_Directory.bsh
+
diff --git a/jEdit/macros/Files/Buffer_Switcher.bsh b/jEdit/macros/Files/Buffer_Switcher.bsh
index 062900b..327ac34 100644
--- a/jEdit/macros/Files/Buffer_Switcher.bsh
+++ b/jEdit/macros/Files/Buffer_Switcher.bsh
@@ -1,261 +1,261 @@
-/*
- * Buffer_Switcher.bsh - a BeanShell macro script for displaying
- * and switching between open buffers.
- *
- * Copyright (C) 2001-2004 Ollie Rutherfurd, oliver at rutherfurd.net
- *
- * :mode=beanshell:tabSize=4:indentSize=4:maxLineLen=0:noTabs=false:
- * :indentOnTab=true:indentOnEnter=true:folding=explicit:collapseFolds=1:
- *
- * {{{ License
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * }}}
- *
- * Notes:
- *
- * This is very similar to the functionality provided by the BufferList
- * plugin but, that is overkill for me. I just want a way I can
- * see and switch between buffers without having to use the mouse
- * to go to the BufferSwitcher widget in the EditPane.
- *
- * DELETE: closes the selected buffer but not the dialog.
- * ENTER: switches to the selected buffer and closes the dialog.
- * ESCAPE: closes the dialog.
- * SPACE: switches to the selected buffer but does not close the dialog.
- *
- * $Id: Buffer_Switcher.bsh 5450 2006-06-20 09:08:13Z vampire0 $
- */
-
-import javax.swing.border.EmptyBorder;
-
-
-/*
-* Custom Cell Renderer which displays the buffer icons in the JList.
-* As it runs a little slowly on my machine, it is not used by default.
-*
-* set useCustomCellRenderer to true at the bottom of this macro to use this.
-*/
-// {{{ BufferCellRenderer
-BufferCellRenderer()
-{
-
- l = new JLabel();
- l.setOpaque(true);
-
- Component getListCellRendererComponent(
- JList list,
- Object value,
- int index,
- boolean isSelected,
- boolean cellHasFocus)
- {
- l.setText(value.toString());
- l.setIcon(value.getIcon());
-
- if (isSelected)
- {
- l.setBackground(list.getSelectionBackground());
- l.setForeground(list.getSelectionForeground());
- }
- else
- {
- l.setBackground(list.getBackground());
- l.setForeground(list.getForeground());
- }
-
- return l;
-
- }
-
- return this;
-} // }}}
-
-
-/*
-* BufferSwitcherDialog - Dialog allows one to switch between
-* open buffers (and/or close open buffers).
-*/
-BufferSwitcherDialog(doModal, useCustomCellRenderer)
-{
-
- // {{{ create dialog
- Buffer[] openBuffers = jEdit.getBuffers();
- int numOpen = openBuffers.length;
- dialog = new JDialog(view, "" + numOpen + " Open Buffers", doModal);
- content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,12));
- dialog.setContentPane(content);
-
- bufferList = new JList(openBuffers);
- bufferList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- if(useCustomCellRenderer)
- bufferList.setCellRenderer(BufferCellRenderer());
- content.add(new JScrollPane(bufferList), BorderLayout.CENTER);
-
- content.add(new JLabel("[ENTER] Switch to; [SPACE] Switch to, keep dialog; [DEL] Close Buffer"), BorderLayout.NORTH);
-
- buttonPanel = new JPanel();
- buttonPanel.setLayout(new BoxLayout(buttonPanel,
- BoxLayout.X_AXIS));
-
- buttonPanel.setBorder(new EmptyBorder(12,50,0,50));
- buttonPanel.add(Box.createGlue());
- ok = new JButton("OK");
- close = new JButton("Close");
- ok.setPreferredSize(close.getPreferredSize());
- dialog.getRootPane().setDefaultButton(ok);
- buttonPanel.add(ok);
- buttonPanel.add(Box.createHorizontalStrut(6));
- buttonPanel.add(close);
- buttonPanel.add(Box.createGlue());
- content.add(buttonPanel, BorderLayout.SOUTH);
- // }}}
-
- // {{{ switchBuffer()
- void switchBuffer()
- {
- _buffer = bufferList.getSelectedValue();
- if(_buffer == null)
- view.getToolkit().beep();
- else
- view.getEditPane().setBuffer(_buffer);
- } // }}}
-
- // {{{ closeBuffer()
- void closeBuffer()
- {
- index = bufferList.getSelectedIndex();
- _buffer = bufferList.getSelectedValue();
- if(_buffer == null)
- view.getToolkit().beep();
- else
- if(jEdit.closeBuffer(view, _buffer))
- {
- bufferList.setListData(jEdit.getBuffers());
- if(index == jEdit.getBufferCount())
- index--;
- bufferList.setSelectedIndex(index);
- }
- numOpen--;
- dialog.setTitle("" + numOpen + " Open Buffers");
- } // }}}
-
- // {{{ actionPerformed
- void actionPerformed(evt)
- {
- if(evt.getSource() == ok)
- switchBuffer();
- dialog.dispose();
- dialog = null;
- } // }}}
-
- // {{{ KeyListener implementation
- void keyPressed(evt)
- {
- if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
- dialog.dispose();
- else if(evt.getKeyCode() == KeyEvent.VK_SPACE)
- switchBuffer();
- else if(evt.getKeyCode() == KeyEvent.VK_DELETE)
- {
- evt.consume();
- closeBuffer();
- }
- }
-
- void keyReleased(evt)
- {
- int selected = bufferList.getSelectedIndex();
- if(selected > -1)
- bufferList.ensureIndexIsVisible(selected);
- }
-
- void keyTyped(evt){}
- // }}}
-
- // {{{ MouseListener implementation
- void mouseClicked(evt)
- {
- if(evt.getClickCount() > 1)
- {
- switchBuffer();
- dialog.dispose();
- }
- }
-
- void mouseEntered(evt){}
- void mouseExited(evt){}
- void mousePressed(evt){}
- void mouseReleased(evt){}
- // }}}
-
- // {{{ add listeners
- dialog.addKeyListener(this);
- bufferList.addKeyListener(this);
- bufferList.addMouseListener(this);
- ok.addActionListener(this);
- close.addActionListener(this);
- // }}}
-
- // {{{ display dialog
- dialog.pack();
- bufferList.setSelectedValue(buffer,true);
- dialog.setLocationRelativeTo(view);
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- dialog.setVisible(true);
- // }}}
-
-}
-
-
-// SETTINGS {{{
-doModal = true;
-
-// whether or not to use custom CellRenderer
-useCustomCellRenderer = true;
-
-// show help for keys on first run
-showHelp = jEdit.getProperty("macro.buffer_switcher.display-help","1");
-if(showHelp.equals("1"))
-{
- Macros.message(view, "Help for Buffer Switcher macro:\n\n"
- + "DELETE closes selected buffer.\n"
- + "ENTER switches to selected buffer, closes dialog.\n"
- + "ESCAPE closes dialog.\n"
- + "SPACE switches to selected buffer, does not close dialog.\n\n"
- + "NOTE: This dialog will only be displayed once.");
- jEdit.setProperty("macro.buffer_switcher.display-help","0");
-}
-// }}}
-
-
-BufferSwitcherDialog(doModal, useCustomCellRenderer);
-
-
-/*
-
-Macro index data (in DocBook format)
-
- <listitem>
- <para><filename>Buffer_Switcher</filename></para>
- Displays a modal dialog listing all open buffers,
- allowing one to switch to and/or close buffers.
- <keycap>ENTER</keycap> switches to a buffer and closes the dialog,
- <keycap>DELETE</keycap> closes a buffer, <keycap>SPACE</keycap>
- switches to a buffer but does not close the dialog.
- </para></abstract>
- </listitem>
-
-*/
+/*
+ * Buffer_Switcher.bsh - a BeanShell macro script for displaying
+ * and switching between open buffers.
+ *
+ * Copyright (C) 2001-2004 Ollie Rutherfurd, oliver at rutherfurd.net
+ *
+ * :mode=beanshell:tabSize=4:indentSize=4:maxLineLen=0:noTabs=false:
+ * :indentOnTab=true:indentOnEnter=true:folding=explicit:collapseFolds=1:
+ *
+ * {{{ License
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * }}}
+ *
+ * Notes:
+ *
+ * This is very similar to the functionality provided by the BufferList
+ * plugin but, that is overkill for me. I just want a way I can
+ * see and switch between buffers without having to use the mouse
+ * to go to the BufferSwitcher widget in the EditPane.
+ *
+ * DELETE: closes the selected buffer but not the dialog.
+ * ENTER: switches to the selected buffer and closes the dialog.
+ * ESCAPE: closes the dialog.
+ * SPACE: switches to the selected buffer but does not close the dialog.
+ *
+ * $Id: Buffer_Switcher.bsh 5450 2006-06-20 09:08:13Z vampire0 $
+ */
+
+import javax.swing.border.EmptyBorder;
+
+
+/*
+* Custom Cell Renderer which displays the buffer icons in the JList.
+* As it runs a little slowly on my machine, it is not used by default.
+*
+* set useCustomCellRenderer to true at the bottom of this macro to use this.
+*/
+// {{{ BufferCellRenderer
+BufferCellRenderer()
+{
+
+ l = new JLabel();
+ l.setOpaque(true);
+
+ Component getListCellRendererComponent(
+ JList list,
+ Object value,
+ int index,
+ boolean isSelected,
+ boolean cellHasFocus)
+ {
+ l.setText(value.toString());
+ l.setIcon(value.getIcon());
+
+ if (isSelected)
+ {
+ l.setBackground(list.getSelectionBackground());
+ l.setForeground(list.getSelectionForeground());
+ }
+ else
+ {
+ l.setBackground(list.getBackground());
+ l.setForeground(list.getForeground());
+ }
+
+ return l;
+
+ }
+
+ return this;
+} // }}}
+
+
+/*
+* BufferSwitcherDialog - Dialog allows one to switch between
+* open buffers (and/or close open buffers).
+*/
+BufferSwitcherDialog(doModal, useCustomCellRenderer)
+{
+
+ // {{{ create dialog
+ Buffer[] openBuffers = jEdit.getBuffers();
+ int numOpen = openBuffers.length;
+ dialog = new JDialog(view, "" + numOpen + " Open Buffers", doModal);
+ content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ dialog.setContentPane(content);
+
+ bufferList = new JList(openBuffers);
+ bufferList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ if(useCustomCellRenderer)
+ bufferList.setCellRenderer(BufferCellRenderer());
+ content.add(new JScrollPane(bufferList), BorderLayout.CENTER);
+
+ content.add(new JLabel("[ENTER] Switch to; [SPACE] Switch to, keep dialog; [DEL] Close Buffer"), BorderLayout.NORTH);
+
+ buttonPanel = new JPanel();
+ buttonPanel.setLayout(new BoxLayout(buttonPanel,
+ BoxLayout.X_AXIS));
+
+ buttonPanel.setBorder(new EmptyBorder(12,50,0,50));
+ buttonPanel.add(Box.createGlue());
+ ok = new JButton("OK");
+ close = new JButton("Close");
+ ok.setPreferredSize(close.getPreferredSize());
+ dialog.getRootPane().setDefaultButton(ok);
+ buttonPanel.add(ok);
+ buttonPanel.add(Box.createHorizontalStrut(6));
+ buttonPanel.add(close);
+ buttonPanel.add(Box.createGlue());
+ content.add(buttonPanel, BorderLayout.SOUTH);
+ // }}}
+
+ // {{{ switchBuffer()
+ void switchBuffer()
+ {
+ _buffer = bufferList.getSelectedValue();
+ if(_buffer == null)
+ view.getToolkit().beep();
+ else
+ view.getEditPane().setBuffer(_buffer);
+ } // }}}
+
+ // {{{ closeBuffer()
+ void closeBuffer()
+ {
+ index = bufferList.getSelectedIndex();
+ _buffer = bufferList.getSelectedValue();
+ if(_buffer == null)
+ view.getToolkit().beep();
+ else
+ if(jEdit.closeBuffer(view, _buffer))
+ {
+ bufferList.setListData(jEdit.getBuffers());
+ if(index == jEdit.getBufferCount())
+ index--;
+ bufferList.setSelectedIndex(index);
+ }
+ numOpen--;
+ dialog.setTitle("" + numOpen + " Open Buffers");
+ } // }}}
+
+ // {{{ actionPerformed
+ void actionPerformed(evt)
+ {
+ if(evt.getSource() == ok)
+ switchBuffer();
+ dialog.dispose();
+ dialog = null;
+ } // }}}
+
+ // {{{ KeyListener implementation
+ void keyPressed(evt)
+ {
+ if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
+ dialog.dispose();
+ else if(evt.getKeyCode() == KeyEvent.VK_SPACE)
+ switchBuffer();
+ else if(evt.getKeyCode() == KeyEvent.VK_DELETE)
+ {
+ evt.consume();
+ closeBuffer();
+ }
+ }
+
+ void keyReleased(evt)
+ {
+ int selected = bufferList.getSelectedIndex();
+ if(selected > -1)
+ bufferList.ensureIndexIsVisible(selected);
+ }
+
+ void keyTyped(evt){}
+ // }}}
+
+ // {{{ MouseListener implementation
+ void mouseClicked(evt)
+ {
+ if(evt.getClickCount() > 1)
+ {
+ switchBuffer();
+ dialog.dispose();
+ }
+ }
+
+ void mouseEntered(evt){}
+ void mouseExited(evt){}
+ void mousePressed(evt){}
+ void mouseReleased(evt){}
+ // }}}
+
+ // {{{ add listeners
+ dialog.addKeyListener(this);
+ bufferList.addKeyListener(this);
+ bufferList.addMouseListener(this);
+ ok.addActionListener(this);
+ close.addActionListener(this);
+ // }}}
+
+ // {{{ display dialog
+ dialog.pack();
+ bufferList.setSelectedValue(buffer,true);
+ dialog.setLocationRelativeTo(view);
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+ // }}}
+
+}
+
+
+// SETTINGS {{{
+doModal = true;
+
+// whether or not to use custom CellRenderer
+useCustomCellRenderer = true;
+
+// show help for keys on first run
+showHelp = jEdit.getProperty("macro.buffer_switcher.display-help","1");
+if(showHelp.equals("1"))
+{
+ Macros.message(view, "Help for Buffer Switcher macro:\n\n"
+ + "DELETE closes selected buffer.\n"
+ + "ENTER switches to selected buffer, closes dialog.\n"
+ + "ESCAPE closes dialog.\n"
+ + "SPACE switches to selected buffer, does not close dialog.\n\n"
+ + "NOTE: This dialog will only be displayed once.");
+ jEdit.setProperty("macro.buffer_switcher.display-help","0");
+}
+// }}}
+
+
+BufferSwitcherDialog(doModal, useCustomCellRenderer);
+
+
+/*
+
+Macro index data (in DocBook format)
+
+ <listitem>
+ <para><filename>Buffer_Switcher</filename></para>
+ Displays a modal dialog listing all open buffers,
+ allowing one to switch to and/or close buffers.
+ <keycap>ENTER</keycap> switches to a buffer and closes the dialog,
+ <keycap>DELETE</keycap> closes a buffer, <keycap>SPACE</keycap>
+ switches to a buffer but does not close the dialog.
+ </para></abstract>
+ </listitem>
+
+*/
diff --git a/jEdit/macros/Files/Close_All_Except_Active.bsh b/jEdit/macros/Files/Close_All_Except_Active.bsh
index da1c8a6..db9fb1a 100644
--- a/jEdit/macros/Files/Close_All_Except_Active.bsh
+++ b/jEdit/macros/Files/Close_All_Except_Active.bsh
@@ -1,57 +1,57 @@
-/*
- * Close_All_Except_Active.bsh - a BeanShell macro script for the
- * jEdit text editor - Closes all except the current active buffer
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Close_All_Except_Active.bsh 3871 2001-11-06 17:15:01Z jgellene $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-void closeBuffersExceptActive()
-{
- buffers = jEdit.getBuffers();
- for(i = 0; i < buffers.length; ++i)
- {
- if(buffers[i] != buffer)
- jEdit.closeBuffer(view, buffers[i]);
- }
-}
-
-closeBuffersExceptActive();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Close_Except_Active.bsh</filename></para>
- <abstract><para>
- Closes all files except the current buffer.
- </para></abstract>
- <para>
- Prompts the user to save any buffer containing unsaved changes.
- </para>
-</listitem>
-
-*/
-
-
-// end Close_Except_Active.bsh
-
+/*
+ * Close_All_Except_Active.bsh - a BeanShell macro script for the
+ * jEdit text editor - Closes all except the current active buffer
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Close_All_Except_Active.bsh 3871 2001-11-06 17:15:01Z jgellene $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+void closeBuffersExceptActive()
+{
+ buffers = jEdit.getBuffers();
+ for(i = 0; i < buffers.length; ++i)
+ {
+ if(buffers[i] != buffer)
+ jEdit.closeBuffer(view, buffers[i]);
+ }
+}
+
+closeBuffersExceptActive();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Close_Except_Active.bsh</filename></para>
+ <abstract><para>
+ Closes all files except the current buffer.
+ </para></abstract>
+ <para>
+ Prompts the user to save any buffer containing unsaved changes.
+ </para>
+</listitem>
+
+*/
+
+
+// end Close_Except_Active.bsh
+
diff --git a/jEdit/macros/Files/Copy_Name_to_Clipboard.bsh b/jEdit/macros/Files/Copy_Name_to_Clipboard.bsh
index f301e5d..b04d45b 100644
--- a/jEdit/macros/Files/Copy_Name_to_Clipboard.bsh
+++ b/jEdit/macros/Files/Copy_Name_to_Clipboard.bsh
@@ -1,28 +1,28 @@
-/*
- * Copy_Name_to_Clipboad.bsh - Copies the current buffer's filename
- * to the clipboard.
- *
- * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Copy_Name_to_Clipboard.bsh 5016 2004-04-09 17:10:15Z spestov $
- */
-
-void copyBufferNameToClipboard(Buffer buffer)
-{
- Registers.setRegister('$',buffer.getName());
- HistoryModel.getModel("clipboard").addItem(buffer.getName());
-}
-
-copyBufferNameToClipboard(buffer);
-
-/*
-
-<listitem>
- <para><filename>Copy_Name_to_Clipboad.bsh</filename></para>
- <abstract><para>Copies the current buffer's filename
- to the clipboard.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+ * Copy_Name_to_Clipboad.bsh - Copies the current buffer's filename
+ * to the clipboard.
+ *
+ * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Copy_Name_to_Clipboard.bsh 5016 2004-04-09 17:10:15Z spestov $
+ */
+
+void copyBufferNameToClipboard(Buffer buffer)
+{
+ Registers.setRegister('$',buffer.getName());
+ HistoryModel.getModel("clipboard").addItem(buffer.getName());
+}
+
+copyBufferNameToClipboard(buffer);
+
+/*
+
+<listitem>
+ <para><filename>Copy_Name_to_Clipboad.bsh</filename></para>
+ <abstract><para>Copies the current buffer's filename
+ to the clipboard.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Files/Copy_Path_to_Clipboard.bsh b/jEdit/macros/Files/Copy_Path_to_Clipboard.bsh
index 4d5c265..7cca1c9 100644
--- a/jEdit/macros/Files/Copy_Path_to_Clipboard.bsh
+++ b/jEdit/macros/Files/Copy_Path_to_Clipboard.bsh
@@ -1,27 +1,27 @@
-/*
- * Copy_Path_to_Clipboad.bsh - Copies the current buffer's
- * path to the clipboard.
- *
- * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Copy_Path_to_Clipboard.bsh 5016 2004-04-09 17:10:15Z spestov $
- */
-
-void copyBufferPathToClipboard(Buffer buffer)
-{
- Registers.setRegister('$',buffer.getPath());
- HistoryModel.getModel("clipboard").addItem(buffer.getPath());
-}
-
-copyBufferPathToClipboard(buffer);
-
-/*
-
-<listitem>
- <para><filename>Copy_Path_to_Clipboad.bsh</filename></para>
- <abstract><para>Copies the current buffer's path
- to the clipboard.
- </para></abstract>
-</listitem>
-
-*/
+/*
+ * Copy_Path_to_Clipboad.bsh - Copies the current buffer's
+ * path to the clipboard.
+ *
+ * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Copy_Path_to_Clipboard.bsh 5016 2004-04-09 17:10:15Z spestov $
+ */
+
+void copyBufferPathToClipboard(Buffer buffer)
+{
+ Registers.setRegister('$',buffer.getPath());
+ HistoryModel.getModel("clipboard").addItem(buffer.getPath());
+}
+
+copyBufferPathToClipboard(buffer);
+
+/*
+
+<listitem>
+ <para><filename>Copy_Path_to_Clipboad.bsh</filename></para>
+ <abstract><para>Copies the current buffer's path
+ to the clipboard.
+ </para></abstract>
+</listitem>
+
+*/
diff --git a/jEdit/macros/Files/Delete_Current.bsh b/jEdit/macros/Files/Delete_Current.bsh
index e141975..ddadfbd 100644
--- a/jEdit/macros/Files/Delete_Current.bsh
+++ b/jEdit/macros/Files/Delete_Current.bsh
@@ -1,75 +1,75 @@
-/*
- * Delete_Current.bsh - Deletes the current
- * buffer's file on disk, but doesn't close
- * the buffer.
- *
- * Copyright (C) 2003-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Delete_Current.bsh 4995 2004-03-19 15:58:00Z spestov $
- */
-
-import javax.swing.SwingUtilities;
-import org.gjt.sp.jedit.io.*;
-
-
-BufferStatusChecker(View view){
- run(){
- jEdit.checkBufferStatus(view);
- }
- return this;
-}
-
-
-void deleteCurrentBuffer(View view){
- Buffer buffer = view.getBuffer();
-
- // don't bother deleting new buffers (don't exist on disk)
- if(buffer.isNewFile()){
- Macros.error(view, "Buffer doesn't exist on disk.");
- return;
- }
-
- try{
- String path = buffer.getPath();
- VFS vfs = VFSManager.getVFSForPath(path);
- int caps = vfs.getCapabilities();
- int del = VFS.DELETE_CAP;
- int res = caps & del;
- if(res == 0){
- Macros.error(view, "VFS " + vfs.getName()
- + " doesn't support deleting.");
- return;
- }
-
- Object session = null;
- try{
- session = vfs.createVFSSession(path,view);
- if(vfs._delete(session,path,view)){
- view.getStatus().setMessageAndClear("Deleted: " + path);
- }
- // invoke buffer status check
- SwingUtilities.invokeLater(BufferStatusChecker(view));
- }
- finally{
- if(session != null)
- vfs._endVFSSession(session,view);
- }
- }
- catch(Exception e){
- Macros.error(view, e.toString());
- }
-}
-
-deleteCurrentBuffer(view);
-
-/*
-
- <listitem>
- <para><filename>Delete_Current.bsh</filename></para>
- <abstract><para>
- Deletes the current buffer's file on disk, but
- doesn't close the buffer.
- </para></abstract>
- </listitem>
-
-*/
+/*
+ * Delete_Current.bsh - Deletes the current
+ * buffer's file on disk, but doesn't close
+ * the buffer.
+ *
+ * Copyright (C) 2003-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Delete_Current.bsh 4995 2004-03-19 15:58:00Z spestov $
+ */
+
+import javax.swing.SwingUtilities;
+import org.gjt.sp.jedit.io.*;
+
+
+BufferStatusChecker(View view){
+ run(){
+ jEdit.checkBufferStatus(view);
+ }
+ return this;
+}
+
+
+void deleteCurrentBuffer(View view){
+ Buffer buffer = view.getBuffer();
+
+ // don't bother deleting new buffers (don't exist on disk)
+ if(buffer.isNewFile()){
+ Macros.error(view, "Buffer doesn't exist on disk.");
+ return;
+ }
+
+ try{
+ String path = buffer.getPath();
+ VFS vfs = VFSManager.getVFSForPath(path);
+ int caps = vfs.getCapabilities();
+ int del = VFS.DELETE_CAP;
+ int res = caps & del;
+ if(res == 0){
+ Macros.error(view, "VFS " + vfs.getName()
+ + " doesn't support deleting.");
+ return;
+ }
+
+ Object session = null;
+ try{
+ session = vfs.createVFSSession(path,view);
+ if(vfs._delete(session,path,view)){
+ view.getStatus().setMessageAndClear("Deleted: " + path);
+ }
+ // invoke buffer status check
+ SwingUtilities.invokeLater(BufferStatusChecker(view));
+ }
+ finally{
+ if(session != null)
+ vfs._endVFSSession(session,view);
+ }
+ }
+ catch(Exception e){
+ Macros.error(view, e.toString());
+ }
+}
+
+deleteCurrentBuffer(view);
+
+/*
+
+ <listitem>
+ <para><filename>Delete_Current.bsh</filename></para>
+ <abstract><para>
+ Deletes the current buffer's file on disk, but
+ doesn't close the buffer.
+ </para></abstract>
+ </listitem>
+
+*/
diff --git a/jEdit/macros/Files/Glob_Close.bsh b/jEdit/macros/Files/Glob_Close.bsh
index 1f97496..8176969 100644
--- a/jEdit/macros/Files/Glob_Close.bsh
+++ b/jEdit/macros/Files/Glob_Close.bsh
@@ -1,48 +1,48 @@
-/*
- * Glob_Close.bsh - a BeanShell macro for jEdit that closes
- * all open buffers matching a given glob pattern.
- *
- * Copyright (C) 2003-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Glob_Close.bsh 12063 2008-03-02 06:58:51Z k_satoda $
- */
-
-import java.util.regex.Pattern;
-
-void globClose(View view)
-{
- String glob = Macros.input(view, "Glob Pattern:");
- if(glob == null || glob.length() == 0)
- return;
-
- Pattern re = null;
- try
- {
- re = Pattern.compile(MiscUtilities.globToRE(glob));
- }
- catch(Exception e)
- {
- Macros.error(view,"Error in glob pattern: " + e.toString());
- return;
- }
-
- Buffer[] buffers = jEdit.getBuffers();
- for(int i=0; i < buffers.length; i++)
- {
- if(re.matcher(buffers[i].getPath()).matches())
- jEdit.closeBuffer(view,buffers[i]);
- }
-}
-
-globClose(view);
-
-/*
-
-<listitem>
- <para><filename>Glob_Close.bsh</filename></para>
- <abstract><para>
- Closes all open buffers matching a given glob pattern.
- </para></abstract>
-</listitem>
-
-*/
+/*
+ * Glob_Close.bsh - a BeanShell macro for jEdit that closes
+ * all open buffers matching a given glob pattern.
+ *
+ * Copyright (C) 2003-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Glob_Close.bsh 12063 2008-03-02 06:58:51Z k_satoda $
+ */
+
+import java.util.regex.Pattern;
+
+void globClose(View view)
+{
+ String glob = Macros.input(view, "Glob Pattern:");
+ if(glob == null || glob.length() == 0)
+ return;
+
+ Pattern re = null;
+ try
+ {
+ re = Pattern.compile(MiscUtilities.globToRE(glob));
+ }
+ catch(Exception e)
+ {
+ Macros.error(view,"Error in glob pattern: " + e.toString());
+ return;
+ }
+
+ Buffer[] buffers = jEdit.getBuffers();
+ for(int i=0; i < buffers.length; i++)
+ {
+ if(re.matcher(buffers[i].getPath()).matches())
+ jEdit.closeBuffer(view,buffers[i]);
+ }
+}
+
+globClose(view);
+
+/*
+
+<listitem>
+ <para><filename>Glob_Close.bsh</filename></para>
+ <abstract><para>
+ Closes all open buffers matching a given glob pattern.
+ </para></abstract>
+</listitem>
+
+*/
diff --git a/jEdit/macros/Files/Insert_Selection.bsh b/jEdit/macros/Files/Insert_Selection.bsh
index 21e026d..1385990 100644
--- a/jEdit/macros/Files/Insert_Selection.bsh
+++ b/jEdit/macros/Files/Insert_Selection.bsh
@@ -1,53 +1,53 @@
-/*
- * Insert_Selection.bsh - Inserts the contents of the
- * current selection (assuming it's the path to a file)
- * into the current buffer -- replacing the selected
- * text. Text must be selected and it must not span
- * multiple lines.
- *
- * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
- *
- * $Id: Insert_Selection.bsh 5037 2004-05-06 22:35:11Z spestov $
- */
-
-insertSelected(View view, String path){
-
- // read into temporary buffer
- Buffer b = jEdit.openTemporary(view,null,path,false);
- try{
- if(b == null)
- return;
-
- while(!b.isLoaded())
- VFSManager.waitForRequests();
- String text = b.getText(0,b.getLength());
- view.getTextArea().setSelectedText(text);
- }finally{
- if(b != null)
- b.close();
- }
-}
-
-if(buffer.isReadOnly()){
- getToolkit().beep();
-}
-else{
- String selected = view.getTextArea().getSelectedText();
- if(selected == null || selected.indexOf('\n') != -1)
- getToolkit().beep();
- else
- insertSelected(view,selected);
-}
-
-/*
-
-<listitem>
- <para><filename>Insert_Selection.bsh</filename></para>
- <abstract><para>Assumes the current selection is
- file path and tries replaces the selection with the
- contents of the file. Does nothing if no text is
- selected or the selection spans multiple lines.
- </para></abstract>
-</listitem>
-
-*/
+/*
+ * Insert_Selection.bsh - Inserts the contents of the
+ * current selection (assuming it's the path to a file)
+ * into the current buffer -- replacing the selected
+ * text. Text must be selected and it must not span
+ * multiple lines.
+ *
+ * Copyright (C) 2004 Ollie Rutherfurd <oliver at jedit.org>
+ *
+ * $Id: Insert_Selection.bsh 5037 2004-05-06 22:35:11Z spestov $
+ */
+
+insertSelected(View view, String path){
+
+ // read into temporary buffer
+ Buffer b = jEdit.openTemporary(view,null,path,false);
+ try{
+ if(b == null)
+ return;
+
+ while(!b.isLoaded())
+ VFSManager.waitForRequests();
+ String text = b.getText(0,b.getLength());
+ view.getTextArea().setSelectedText(text);
+ }finally{
+ if(b != null)
+ b.close();
+ }
+}
+
+if(buffer.isReadOnly()){
+ getToolkit().beep();
+}
+else{
+ String selected = view.getTextArea().getSelectedText();
+ if(selected == null || selected.indexOf('\n') != -1)
+ getToolkit().beep();
+ else
+ insertSelected(view,selected);
+}
+
+/*
+
+<listitem>
+ <para><filename>Insert_Selection.bsh</filename></para>
+ <abstract><para>Assumes the current selection is
+ file path and tries replaces the selection with the
+ contents of the file. Does nothing if no text is
+ selected or the selection spans multiple lines.
+ </para></abstract>
+</listitem>
+
+*/
diff --git a/jEdit/macros/Files/Next_Dirty_Buffer.bsh b/jEdit/macros/Files/Next_Dirty_Buffer.bsh
index c69c9c5..9b7117d 100644
--- a/jEdit/macros/Files/Next_Dirty_Buffer.bsh
+++ b/jEdit/macros/Files/Next_Dirty_Buffer.bsh
@@ -1,44 +1,44 @@
-/*
- * Next_Dirty_Buffer.bsh - Changes the buffer in
- * the current EditPane to the next dirty buffer, if
- * there is one.
- *
- * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Next_Dirty_Buffer.bsh 5450 2006-06-20 09:08:13Z vampire0 $
- */
-
-void nextDirtyBuffer(View view)
-{
- Buffer current = view.getBuffer();
- Buffer b = current.getNext();
- for(int i=0; i < jEdit.getBufferCount()-1; i++)
- {
- // Buffer.getNext() returns null on last
- if(b == null)
- b = jEdit.getFirstBuffer();
- if(b.isDirty())
- {
- view.getEditPane().setBuffer(b);
- return;
- }
- b = b.getNext(); // check next
- }
- // if we get here, we didn't switch
- if(current.isDirty())
- view.getStatus().setMessageAndClear("No other buffers are dirty");
- else
- view.getStatus().setMessageAndClear("No buffers are dirty");
-}
-
-nextDirtyBuffer(view);
-
-/*
-
-<listitem>
- <para><filename>Next_Dirty_Buffer.bsh</filename></para>
- <abstract><para>Switches to the next dirty buffer, if there is one.
- </para></abstract>
-</listitem>
-
-*/
+/*
+ * Next_Dirty_Buffer.bsh - Changes the buffer in
+ * the current EditPane to the next dirty buffer, if
+ * there is one.
+ *
+ * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Next_Dirty_Buffer.bsh 5450 2006-06-20 09:08:13Z vampire0 $
+ */
+
+void nextDirtyBuffer(View view)
+{
+ Buffer current = view.getBuffer();
+ Buffer b = current.getNext();
+ for(int i=0; i < jEdit.getBufferCount()-1; i++)
+ {
+ // Buffer.getNext() returns null on last
+ if(b == null)
+ b = jEdit.getFirstBuffer();
+ if(b.isDirty())
+ {
+ view.getEditPane().setBuffer(b);
+ return;
+ }
+ b = b.getNext(); // check next
+ }
+ // if we get here, we didn't switch
+ if(current.isDirty())
+ view.getStatus().setMessageAndClear("No other buffers are dirty");
+ else
+ view.getStatus().setMessageAndClear("No buffers are dirty");
+}
+
+nextDirtyBuffer(view);
+
+/*
+
+<listitem>
+ <para><filename>Next_Dirty_Buffer.bsh</filename></para>
+ <abstract><para>Switches to the next dirty buffer, if there is one.
+ </para></abstract>
+</listitem>
+
+*/
diff --git a/jEdit/macros/Files/Open_Path.bsh b/jEdit/macros/Files/Open_Path.bsh
index 83edf9e..6fe0a2a 100644
--- a/jEdit/macros/Files/Open_Path.bsh
+++ b/jEdit/macros/Files/Open_Path.bsh
@@ -1,49 +1,49 @@
-/*
- * Open_Path.bsh - a BeanShell macro script for the
- * jEdit text editor - Prompts for a path name and opens it
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Open_Path.bsh 3871 2001-11-06 17:15:01Z jgellene $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-void openPath()
-{
- String path = Macros.input(view,"Path name:");
- if(path != null)
- jEdit.openFile(view,path);
-}
-
-openPath();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Open_Path.bsh</filename></para>
- <abstract><para>
- Opens the file supplied by the user in an input dialog.
- </para></abstract>
-</listitem>
-
-*/
-
-
-// end Open_Path.bsh
-
+/*
+ * Open_Path.bsh - a BeanShell macro script for the
+ * jEdit text editor - Prompts for a path name and opens it
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Open_Path.bsh 3871 2001-11-06 17:15:01Z jgellene $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+void openPath()
+{
+ String path = Macros.input(view,"Path name:");
+ if(path != null)
+ jEdit.openFile(view,path);
+}
+
+openPath();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Open_Path.bsh</filename></para>
+ <abstract><para>
+ Opens the file supplied by the user in an input dialog.
+ </para></abstract>
+</listitem>
+
+*/
+
+
+// end Open_Path.bsh
+
diff --git a/jEdit/macros/Files/Open_Selection.bsh b/jEdit/macros/Files/Open_Selection.bsh
index e47f751..c6cbdc6 100644
--- a/jEdit/macros/Files/Open_Selection.bsh
+++ b/jEdit/macros/Files/Open_Selection.bsh
@@ -1,54 +1,54 @@
-/*
- * Open_Selection.bsh - a BeanShell macro script for the
- * jEdit text editor - opens file named by selected text
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Open_Selection.bsh 4826 2003-07-14 23:00:54Z spestov $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-void openSelection()
-{
- Selection[] selection = textArea.getSelection();
- if(selection == null)
- view.getToolkit().beep();
- else
- {
- for(i = 0; i < selection.length; i++)
- jEdit.openFile(view,textArea.getSelectedText(selection[i]));
- }
-}
-
-openSelection();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Open_Selection.bsh</filename></para>
- <abstract><para>
- Opens the file named by the current buffer's selected text.
- </para></abstract>
-</listitem>
-
-*/
-
-
-// end Open_Selection.bsh
-
+/*
+ * Open_Selection.bsh - a BeanShell macro script for the
+ * jEdit text editor - opens file named by selected text
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Open_Selection.bsh 4826 2003-07-14 23:00:54Z spestov $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+void openSelection()
+{
+ Selection[] selection = textArea.getSelection();
+ if(selection == null)
+ view.getToolkit().beep();
+ else
+ {
+ for(i = 0; i < selection.length; i++)
+ jEdit.openFile(view,textArea.getSelectedText(selection[i]));
+ }
+}
+
+openSelection();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Open_Selection.bsh</filename></para>
+ <abstract><para>
+ Opens the file named by the current buffer's selected text.
+ </para></abstract>
+</listitem>
+
+*/
+
+
+// end Open_Selection.bsh
+
diff --git a/jEdit/macros/Files/Toggle_ReadOnly.bsh b/jEdit/macros/Files/Toggle_ReadOnly.bsh
index d1106db..57750d4 100644
--- a/jEdit/macros/Files/Toggle_ReadOnly.bsh
+++ b/jEdit/macros/Files/Toggle_ReadOnly.bsh
@@ -1,87 +1,87 @@
-/*
- * Toggle_ReadOnly.bsh - a BeanShell macro for jEdit that toggles
- * a local file's read-only flag.
- *
- * Copyright (C) 2002,2003 Ollie Rutherfurd, oliver at rutherfurd.net
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Toggle_ReadOnly.bsh 4937 2003-12-22 04:14:55Z spestov $
- */
-
-
-
-CmdThread(cmd, view)
-{
- run()
- {
- process = Runtime.getRuntime().exec(cmd);
- process.waitFor();
- view.getBuffer().checkFileStatus(view);
- }
- return this;
-}
-
-
-void ToggleReadOnly(view)
-{
-
- buffer = view.getBuffer();
-
- // must be using file vfs
- if(!buffer.getVFS().getName().equals("file"))
- {
- Macros.error(view, "This macro only works on local files.");
- return;
- }
-
- // is read-only be turned on or off
- readonly = buffer.isReadOnly();
-
- if (OperatingSystem.isUnix() || OperatingSystem.isMacOS())
- {
- cmd = "chmod " + (readonly ? "+" : "-") + "w "
- + buffer.getPath();
- }
- else if(OperatingSystem.isWindows())
- {
- cmd = "ATTRIB.EXE " + (readonly ? "-" : "+") + "R \""
- + buffer.getPath() + "\"";
- }
- else
- {
- Macros.error(view, "This macro only works on Windows, Unix, & MacOS X.");
- return;
- }
-
- toggle = CmdThread(cmd, view);
- SwingUtilities.invokeLater(toggle);
-}
-
-ToggleReadOnly(view);
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Toggle_ReadOnly.bsh</filename></para>
- <abstract><para>
- Toggles a local file's read-only flag. Uses platform-specific commands, so it only works on Windows, Unix and MacOS X.
- </para></abstract>
-</listitem>
-
-*/
-
-// :indentSize=4:lineSeparator=\n:noTabs=false:tabSize=4:folding=explicit:collapseFolds=1:
+/*
+ * Toggle_ReadOnly.bsh - a BeanShell macro for jEdit that toggles
+ * a local file's read-only flag.
+ *
+ * Copyright (C) 2002,2003 Ollie Rutherfurd, oliver at rutherfurd.net
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Toggle_ReadOnly.bsh 4937 2003-12-22 04:14:55Z spestov $
+ */
+
+
+
+CmdThread(cmd, view)
+{
+ run()
+ {
+ process = Runtime.getRuntime().exec(cmd);
+ process.waitFor();
+ view.getBuffer().checkFileStatus(view);
+ }
+ return this;
+}
+
+
+void ToggleReadOnly(view)
+{
+
+ buffer = view.getBuffer();
+
+ // must be using file vfs
+ if(!buffer.getVFS().getName().equals("file"))
+ {
+ Macros.error(view, "This macro only works on local files.");
+ return;
+ }
+
+ // is read-only be turned on or off
+ readonly = buffer.isReadOnly();
+
+ if (OperatingSystem.isUnix() || OperatingSystem.isMacOS())
+ {
+ cmd = "chmod " + (readonly ? "+" : "-") + "w "
+ + buffer.getPath();
+ }
+ else if(OperatingSystem.isWindows())
+ {
+ cmd = "ATTRIB.EXE " + (readonly ? "-" : "+") + "R \""
+ + buffer.getPath() + "\"";
+ }
+ else
+ {
+ Macros.error(view, "This macro only works on Windows, Unix, & MacOS X.");
+ return;
+ }
+
+ toggle = CmdThread(cmd, view);
+ SwingUtilities.invokeLater(toggle);
+}
+
+ToggleReadOnly(view);
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Toggle_ReadOnly.bsh</filename></para>
+ <abstract><para>
+ Toggles a local file's read-only flag. Uses platform-specific commands, so it only works on Windows, Unix and MacOS X.
+ </para></abstract>
+</listitem>
+
+*/
+
+// :indentSize=4:lineSeparator=\n:noTabs=false:tabSize=4:folding=explicit:collapseFolds=1:
diff --git a/jEdit/macros/Interface/Decrease_Font_Size.bsh b/jEdit/macros/Interface/Decrease_Font_Size.bsh
index 89e84a0..3ff5c92 100644
--- a/jEdit/macros/Interface/Decrease_Font_Size.bsh
+++ b/jEdit/macros/Interface/Decrease_Font_Size.bsh
@@ -1,38 +1,38 @@
-/*
-* Decrease_Font_Size.bsh - a BeanShell macro for the jEdit text
-* editor - Decreases editor & gutter font size by 1.
-*
-* Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
-*
-* $Id: Decrease_Font_Size.bsh 4937 2003-12-22 04:14:55Z spestov $
-*/
-
-decreaseFontSize()
-{
- FONT_SIZE = "view.fontsize";
- GUTTER_FONT_SIZE = "view.gutter.fontsize";
- CONSOLE_FONT_SIZE = "console.fontsize";
- size = jEdit.getIntegerProperty(FONT_SIZE,12) - 1;
- jEdit.setIntegerProperty(FONT_SIZE,size);
- jEdit.setIntegerProperty(GUTTER_FONT_SIZE,size);
- jEdit.setIntegerProperty(CONSOLE_FONT_SIZE,size);
- jEdit.propertiesChanged();
- jEdit.saveSettings();
- view.getStatus().setMessageAndClear("Font size now " + size);
-}
-
-decreaseFontSize();
-
-/*
-
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Decrease_Font_Size.bsh</filename></para>
- <abstract><para>
- Decreases the font size in the gutter and text area by 1 point.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+* Decrease_Font_Size.bsh - a BeanShell macro for the jEdit text
+* editor - Decreases editor & gutter font size by 1.
+*
+* Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
+*
+* $Id: Decrease_Font_Size.bsh 4937 2003-12-22 04:14:55Z spestov $
+*/
+
+decreaseFontSize()
+{
+ FONT_SIZE = "view.fontsize";
+ GUTTER_FONT_SIZE = "view.gutter.fontsize";
+ CONSOLE_FONT_SIZE = "console.fontsize";
+ size = jEdit.getIntegerProperty(FONT_SIZE,12) - 1;
+ jEdit.setIntegerProperty(FONT_SIZE,size);
+ jEdit.setIntegerProperty(GUTTER_FONT_SIZE,size);
+ jEdit.setIntegerProperty(CONSOLE_FONT_SIZE,size);
+ jEdit.propertiesChanged();
+ jEdit.saveSettings();
+ view.getStatus().setMessageAndClear("Font size now " + size);
+}
+
+decreaseFontSize();
+
+/*
+
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Decrease_Font_Size.bsh</filename></para>
+ <abstract><para>
+ Decreases the font size in the gutter and text area by 1 point.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Interface/Increase_Font_Size.bsh b/jEdit/macros/Interface/Increase_Font_Size.bsh
index c936e08..b530dac 100644
--- a/jEdit/macros/Interface/Increase_Font_Size.bsh
+++ b/jEdit/macros/Interface/Increase_Font_Size.bsh
@@ -1,38 +1,38 @@
-/*
-* Increase_Font_Size.bsh - a BeanShell macro for the jEdit text
-* editor - Increases editor & gutter font size by 1.
-*
-* Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
-*
-* $Id: Increase_Font_Size.bsh 4938 2003-12-23 02:15:05Z spestov $
-*/
-
-increaseFontSize()
-{
- FONT_SIZE = "view.fontsize";
- GUTTER_FONT_SIZE = "view.gutter.fontsize";
- CONSOLE_FONT_SIZE = "console.fontsize";
- size = jEdit.getIntegerProperty(FONT_SIZE,12) + 1;
- jEdit.setIntegerProperty(FONT_SIZE,size);
- jEdit.setIntegerProperty(GUTTER_FONT_SIZE,size);
- jEdit.setIntegerProperty(CONSOLE_FONT_SIZE,size);
- jEdit.propertiesChanged();
- jEdit.saveSettings();
- view.getStatus().setMessageAndClear("Font size now " + size);
-}
-
-increaseFontSize();
-
-/*
-
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Increase_Font_Size.bsh</filename></para>
- <abstract><para>
- Increases the font size in the gutter and text area by 1 point.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+* Increase_Font_Size.bsh - a BeanShell macro for the jEdit text
+* editor - Increases editor & gutter font size by 1.
+*
+* Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
+*
+* $Id: Increase_Font_Size.bsh 4938 2003-12-23 02:15:05Z spestov $
+*/
+
+increaseFontSize()
+{
+ FONT_SIZE = "view.fontsize";
+ GUTTER_FONT_SIZE = "view.gutter.fontsize";
+ CONSOLE_FONT_SIZE = "console.fontsize";
+ size = jEdit.getIntegerProperty(FONT_SIZE,12) + 1;
+ jEdit.setIntegerProperty(FONT_SIZE,size);
+ jEdit.setIntegerProperty(GUTTER_FONT_SIZE,size);
+ jEdit.setIntegerProperty(CONSOLE_FONT_SIZE,size);
+ jEdit.propertiesChanged();
+ jEdit.saveSettings();
+ view.getStatus().setMessageAndClear("Font size now " + size);
+}
+
+increaseFontSize();
+
+/*
+
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Increase_Font_Size.bsh</filename></para>
+ <abstract><para>
+ Increases the font size in the gutter and text area by 1 point.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Interface/Open_Context_Menu.bsh b/jEdit/macros/Interface/Open_Context_Menu.bsh
index 3791954..75ab6e2 100644
--- a/jEdit/macros/Interface/Open_Context_Menu.bsh
+++ b/jEdit/macros/Interface/Open_Context_Menu.bsh
@@ -1,28 +1,28 @@
-/*
-* Open_Context_Menu.bsh - a BeanShell macro script for
-* the jEdit text editor - Opens the editor context menu
-* just below and to the right of the cursor.
-*
-* Copyright (C) 2003 Nitsan Vardi
-*
-* $Id: Open_Context_Menu.bsh 9820 2007-06-17 20:59:58Z vanza $
-*/
-
-openContextMenu(){
- textArea.showPopupMenu();
-}
-
-openContextMenu();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Open_Context_Menu.bsh</filename></para>
- <abstract><para>
- Opens the text area context menu just below the caret.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+* Open_Context_Menu.bsh - a BeanShell macro script for
+* the jEdit text editor - Opens the editor context menu
+* just below and to the right of the cursor.
+*
+* Copyright (C) 2003 Nitsan Vardi
+*
+* $Id: Open_Context_Menu.bsh 9820 2007-06-17 20:59:58Z vanza $
+*/
+
+openContextMenu(){
+ textArea.showPopupMenu();
+}
+
+openContextMenu();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Open_Context_Menu.bsh</filename></para>
+ <abstract><para>
+ Opens the text area context menu just below the caret.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Interface/Reset_TextArea.bsh b/jEdit/macros/Interface/Reset_TextArea.bsh
index 72378b5..edaf914 100644
--- a/jEdit/macros/Interface/Reset_TextArea.bsh
+++ b/jEdit/macros/Interface/Reset_TextArea.bsh
@@ -2,7 +2,15 @@
A macro that performs a split and an unsplit of the current TextArea.
Useful for those occasions when your textarea is corrupt (painting the
incorrect characters on the screen).
-*/
-
+*/
+import javax.swing.Timer;
view.splitVertically();
-view.unsplitCurrent();
+int delay = 100; //milliseconds
+ActionListener taskPerformer = new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ view.unsplitCurrent();
+ }
+};
+t = new Timer(delay, taskPerformer);
+t.setRepeats(false);
+t.start();
diff --git a/jEdit/macros/Interface/Splitpane_Grow.bsh b/jEdit/macros/Interface/Splitpane_Grow.bsh
index 096a03d..483761c 100644
--- a/jEdit/macros/Interface/Splitpane_Grow.bsh
+++ b/jEdit/macros/Interface/Splitpane_Grow.bsh
@@ -1,57 +1,58 @@
-/*
- * Splitpane_grow.bsh v1.0 - a BeanShell macro script for the
- * jEdit text editor -
- * Increases the size of the currently active split pane.
- *
- * Based on SplitPane_up by Claudio Vicari
- * (c) 2005 by Alan Ezust
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- *
- * Checked for jEdit 4.2 API
- *
- */
-
- splitPaneGrow() {
-
- EditPane active_area = view.getEditPane();
-
- if( view.getSplitPane() != null ) {
- JSplitPane splitPane = view.getSplitPane();
- int minimum = splitPane.getMinimumDividerLocation();
- int maximum = splitPane.getMaximumDividerLocation();
- double actual_position = (double)splitPane.getDividerLocation();
-
- /* converts the integer returned by getDividerLocation in a proportion
- between 0.0 and 1.0 */
- actual_position = (actual_position-minimum) / ( maximum - minimum );
- if (splitPane.getLeftComponent() == active_area) {
- actual_position += 0.05;
- }
- else {
- actual_position -= 0.05;
- }
- if( actual_position <= 0.0 )
- actual_position = 0.0;
- if( actual_position >= 1.0 )
- actual_position = 1.0;
-
- splitPane.setDividerLocation( (double)actual_position );
- active_area.focusOnTextArea();
- }
- }
- splitPaneGrow();
-
+/*
+ * Splitpane_grow.bsh v1.1 - a BeanShell macro script for the jEdit text editor
+ * Increases the size of the currently active split pane.
+ *
+ * Based on SplitPane_up by Claudio Vicari
+ * (c) 2005, 2011 by Alan Ezust
+ * Version 1.1 supports more than 2 editpanes.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Checked for jEdit 4.5 API
+ *
+ */
+
+ import javax.swing.JSplitPane;
+ import org.gjt.sp.jedit.GUIUtilities;
+
+ splitPaneGrow() {
+ EditPane active_area = view.getEditPane();
+ if( view.getSplitPane() != null ) {
+ splitPane = GUIUtilities.getComponentParent(active_area, JSplitPane.class);
+ int minimum = splitPane.getMinimumDividerLocation();
+ int maximum = splitPane.getMaximumDividerLocation();
+ double actual_position = (double)splitPane.getDividerLocation();
+
+ /* converts the integer returned by getDividerLocation in a proportion
+ between 0.0 and 1.0 */
+ actual_position = (actual_position-minimum) / ( maximum - minimum );
+ if (splitPane.getLeftComponent() == active_area) {
+ actual_position += 0.05;
+ }
+ else {
+ actual_position -= 0.05;
+ }
+ if( actual_position <= 0.0 )
+ actual_position = 0.0;
+ if( actual_position >= 1.0 )
+ actual_position = 1.0;
+
+ splitPane.setDividerLocation( (double)actual_position );
+ active_area.focusOnTextArea();
+ }
+ }
+ splitPaneGrow();
+
diff --git a/jEdit/macros/Interface/Toggle_Bottom_Docking_Area.bsh b/jEdit/macros/Interface/Toggle_Bottom_Docking_Area.bsh
index 735f46f..fea53ae 100644
--- a/jEdit/macros/Interface/Toggle_Bottom_Docking_Area.bsh
+++ b/jEdit/macros/Interface/Toggle_Bottom_Docking_Area.bsh
@@ -1,44 +1,44 @@
-/*
- * Toggle_Bottom_Docking_Area.bsh - a BeanShell macro for the
- * jEdit text editor - Expands or collapses the bottom docking
- * area, depending on it's current state.
- *
- * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Toggle_Bottom_Docking_Area.bsh 4906 2003-10-26 20:57:28Z spestov $
- */
-
-toggleBottomDockingArea()
-{
- dockarea = view.getDockableWindowManager().getBottomDockingArea();
- if(dockarea.getCurrent() == null)
- {
- dockarea.showMostRecent();
- name = dockarea.getCurrent();
- component = view.getDockableWindowManager().getDockable(name);
- if(component instanceof DefaultFocusComponent)
- component.focusOnDefaultComponent();
- }
- else
- {
- dockarea.show(null);
- view.getTextArea().requestFocus();
- }
-}
-
-toggleBottomDockingArea();
-
-/*
-
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Toggle_Bottom_Docking_Area.bsh</filename></para>
- <abstract><para>
- Expands or collapses the bottom docking area,
- depending on it's current state.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+ * Toggle_Bottom_Docking_Area.bsh - a BeanShell macro for the
+ * jEdit text editor - Expands or collapses the bottom docking
+ * area, depending on it's current state.
+ *
+ * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Toggle_Bottom_Docking_Area.bsh 4906 2003-10-26 20:57:28Z spestov $
+ */
+
+toggleBottomDockingArea()
+{
+ dockarea = view.getDockableWindowManager().getBottomDockingArea();
+ if(dockarea.getCurrent() == null)
+ {
+ dockarea.showMostRecent();
+ name = dockarea.getCurrent();
+ component = view.getDockableWindowManager().getDockable(name);
+ if(component instanceof DefaultFocusComponent)
+ component.focusOnDefaultComponent();
+ }
+ else
+ {
+ dockarea.show(null);
+ view.getTextArea().requestFocus();
+ }
+}
+
+toggleBottomDockingArea();
+
+/*
+
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Toggle_Bottom_Docking_Area.bsh</filename></para>
+ <abstract><para>
+ Expands or collapses the bottom docking area,
+ depending on it's current state.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Interface/Toggle_Left_Docking_Area.bsh b/jEdit/macros/Interface/Toggle_Left_Docking_Area.bsh
index 69ed139..3f1dfdc 100644
--- a/jEdit/macros/Interface/Toggle_Left_Docking_Area.bsh
+++ b/jEdit/macros/Interface/Toggle_Left_Docking_Area.bsh
@@ -1,36 +1,36 @@
-/*
- * Toggle_Left_Docking_Area.bsh - a BeanShell macro for the
- * jEdit text editor - Expands or collapses the left docking
- * area, depending on it's current state.
- *
- * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Toggle_Left_Docking_Area.bsh 4906 2003-10-26 20:57:28Z spestov $
- */
-
-toggleLeftDockingArea()
-{
- dockarea = view.getDockableWindowManager().getLeftDockingArea();
- if(dockarea.getCurrent() == null)
- dockarea.showMostRecent();
- else
- dockarea.show(null);
- view.getTextArea().requestFocus();
-}
-
-toggleLeftDockingArea();
-
-/*
-
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Toggle_Left_Docking_Area.bsh</filename></para>
- <abstract><para>
- Expands or collapses the left docking area,
- depending on it's current state.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+ * Toggle_Left_Docking_Area.bsh - a BeanShell macro for the
+ * jEdit text editor - Expands or collapses the left docking
+ * area, depending on it's current state.
+ *
+ * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Toggle_Left_Docking_Area.bsh 4906 2003-10-26 20:57:28Z spestov $
+ */
+
+toggleLeftDockingArea()
+{
+ dockarea = view.getDockableWindowManager().getLeftDockingArea();
+ if(dockarea.getCurrent() == null)
+ dockarea.showMostRecent();
+ else
+ dockarea.show(null);
+ view.getTextArea().requestFocus();
+}
+
+toggleLeftDockingArea();
+
+/*
+
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Toggle_Left_Docking_Area.bsh</filename></para>
+ <abstract><para>
+ Expands or collapses the left docking area,
+ depending on it's current state.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Interface/Toggle_Right_Docking_Area.bsh b/jEdit/macros/Interface/Toggle_Right_Docking_Area.bsh
index 25d310a..724a780 100644
--- a/jEdit/macros/Interface/Toggle_Right_Docking_Area.bsh
+++ b/jEdit/macros/Interface/Toggle_Right_Docking_Area.bsh
@@ -1,36 +1,36 @@
-/*
- * Toggle_Right_Docking_Area.bsh - a BeanShell macro for the
- * jEdit text editor - Expands or collapses the tight docking
- * area, depending on it's current state.
- *
- * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Toggle_Right_Docking_Area.bsh 4937 2003-12-22 04:14:55Z spestov $
- */
-
-toggleRightDockingArea()
-{
- dockarea = view.getDockableWindowManager().getRightDockingArea();
- if(dockarea.getCurrent() == null)
- dockarea.showMostRecent();
- else
- dockarea.show(null);
- view.getTextArea().requestFocus();
-}
-
-toggleRightDockingArea();
-
-/*
-
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Toggle_Right_Docking_Area.bsh</filename></para>
- <abstract><para>
- Expands or collapses the right docking area,
- depending on it's current state.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+ * Toggle_Right_Docking_Area.bsh - a BeanShell macro for the
+ * jEdit text editor - Expands or collapses the tight docking
+ * area, depending on it's current state.
+ *
+ * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Toggle_Right_Docking_Area.bsh 4937 2003-12-22 04:14:55Z spestov $
+ */
+
+toggleRightDockingArea()
+{
+ dockarea = view.getDockableWindowManager().getRightDockingArea();
+ if(dockarea.getCurrent() == null)
+ dockarea.showMostRecent();
+ else
+ dockarea.show(null);
+ view.getTextArea().requestFocus();
+}
+
+toggleRightDockingArea();
+
+/*
+
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Toggle_Right_Docking_Area.bsh</filename></para>
+ <abstract><para>
+ Expands or collapses the right docking area,
+ depending on it's current state.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Interface/Toggle_Top_Docking_Area.bsh b/jEdit/macros/Interface/Toggle_Top_Docking_Area.bsh
index eaa3ddc..1475b7a 100644
--- a/jEdit/macros/Interface/Toggle_Top_Docking_Area.bsh
+++ b/jEdit/macros/Interface/Toggle_Top_Docking_Area.bsh
@@ -1,36 +1,36 @@
-/*
- * Toggle_Top_Docking_Area.bsh - a BeanShell macro for the
- * jEdit text editor - Expands or collapses the top docking
- * area, depending on it's current state.
- *
- * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Toggle_Top_Docking_Area.bsh 4906 2003-10-26 20:57:28Z spestov $
- */
-
-toggleTopDockingArea()
-{
- dockarea = view.getDockableWindowManager().getTopDockingArea();
- if(dockarea.getCurrent() == null)
- dockarea.showMostRecent();
- else
- dockarea.show(null);
- view.getTextArea().requestFocus();
-}
-
-toggleTopDockingArea();
-
-/*
-
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Toggle_Top_Docking_Area.bsh</filename></para>
- <abstract><para>
- Expands or collapses the top docking area,
- depending on it's current state.
- </para></abstract>
-</listitem>
-
-*/
-
+/*
+ * Toggle_Top_Docking_Area.bsh - a BeanShell macro for the
+ * jEdit text editor - Expands or collapses the top docking
+ * area, depending on it's current state.
+ *
+ * Copyright (C) 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Toggle_Top_Docking_Area.bsh 4906 2003-10-26 20:57:28Z spestov $
+ */
+
+toggleTopDockingArea()
+{
+ dockarea = view.getDockableWindowManager().getTopDockingArea();
+ if(dockarea.getCurrent() == null)
+ dockarea.showMostRecent();
+ else
+ dockarea.show(null);
+ view.getTextArea().requestFocus();
+}
+
+toggleTopDockingArea();
+
+/*
+
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Toggle_Top_Docking_Area.bsh</filename></para>
+ <abstract><para>
+ Expands or collapses the top docking area,
+ depending on it's current state.
+ </para></abstract>
+</listitem>
+
+*/
+
diff --git a/jEdit/macros/Java/Create_Constructor.bsh b/jEdit/macros/Java/Create_Constructor.bsh
index 2154190..7ddc3cf 100644
--- a/jEdit/macros/Java/Create_Constructor.bsh
+++ b/jEdit/macros/Java/Create_Constructor.bsh
@@ -1,221 +1,221 @@
-/**
-Create_Constructor.bsh - a BeanShell macro for the jEdit text editor that
-creates a constructor containing the selected variables. This code has the
-similar limitations as Get_Class_Name; it merely looks backwards for the nearest
-occurance of the keyword 'class," etc.
-
-Copyright (C) 2004 Thomas Galvin - software at thomas-galvin.com
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-*/
-
-boolean JAVA_MODE = buffer.getMode().getName().toLowerCase().equals("java");
-String UNDEFINED = "UNKNOWN_CLASS";
-
-void setCaret(int selectionStart, int selectionEnd)
-{
- textArea.setCaretPosition(selectionStart);
- textArea.moveCaretPosition(selectionEnd);
-}
-
-String getClassName()
-{
- int selectionStart = textArea.getSelectionStart();
- int selectionEnd = textArea.getSelectionEnd();
-
- String text = textArea.getText();
- int index = text.lastIndexOf("class", selectionStart);
- if(index != -1)
- {
- textArea.setCaretPosition(index);
- int lineNumber = textArea.getCaretLine();
- int lineEnd = textArea.getLineEndOffset(lineNumber);
- String lineText = text.substring(index, lineEnd);
-
- StringTokenizer tokenizer = new StringTokenizer(lineText);
- tokenizer.nextToken(); //eat "class"
- if(tokenizer.hasMoreTokens())
- {
- setCaret(selectionStart, selectionEnd);
- return tokenizer.nextToken();
- }
- }
- setCaret(selectionStart, selectionEnd);
-
- String fileClassName = buffer.getName();
- int index = fileClassName.lastIndexOf('.');
- if(index != -1)
- {
- fileClassName = fileClassName.substring(0, index);
- if(fileClassName.toLowerCase().indexOf("untitled") == -1)
- {
- return fileClassName;
- }
- }
-
- return UNDEFINED;
-}
-
-public String createJavaConstructor(String className, String[] typeNames, String[] variableNames)
-{
- if(typeNames.length != variableNames.length)
- {
- Macro.message(view, "Uneven number of type names and variables.");
- return "";
- }
-
- String args = "";
- String body = "";
-
- for(int i = 0; i < typeNames.length; i++)
- {
- args += typeNames[i] + " " + variableNames[i];
- if(i+1 < typeNames.length)
- {
- args += ",\n";
- }
-
- body += "this." + variableNames[i] + " = " + variableNames[i] + ";\n";
- }
-
- String code =
- "/**\n" + "Basic constructor for " + className + "\n*/\n" +
- "public " + className +
- "(" + args + ")" + "\n" +
- "{" + "\n" +
- body +
- "}" + "\n";
-
- return code;
-}
-
-public String createCppConstructor(String className, String[] typeNames, String[] variableNames)
-{
- if(typeNames.length != variableNames.length)
- {
- Macro.message(view, "Uneven number of type names and variables.");
- return "";
- }
-
- String args = "";
- String body = "";
-
- for(int i = 0; i < typeNames.length; i++)
- {
- String setVariable = variableNames[i] + "Value";
-
- args += typeNames[i] + "& " + setVariable;
- body += variableNames[i] + "(" + setVariable + ")";
-
- if(i+1 < typeNames.length)
- {
- args += ",\n";
- body += ",";
- }
-
- body += "\n";
- }
-
- String code =
- "/*\n" + "Basic constructor for " + className + "\n*/\n" +
- className + "::" + className +
- "(" + args + ")" + "\n" +
- "throw()\n" +
- " : " + body +
- "{" + "\n" +
- "}" + "\n";
-
- return code;
-}
-
-void parseSelection()
-{
- int selectionStart = textArea.getSelectionStart();
- int selectionEnd = textArea.getSelectionEnd();
-
- textArea.setCaretPosition(selectionStart);
- int startLine = textArea.getCaretLine();
-
- textArea.setCaretPosition(selectionEnd);
- int endLine = textArea.getCaretLine();
-
- Vector typeNames = new Vector();
- Vector variableNames = new Vector();
-
- for(int i = startLine; i <= endLine; i++)
- {
- String lineText = textArea.getLineText(i);
- if( lineText != null && !lineText.equals("") )
- {
- lineText = lineText.trim();
- if( lineText.endsWith(";") )
- {
- lineText = lineText.substring( 0, lineText.length() -1 );
- }
-
- StringTokenizer tokenizer = new StringTokenizer(lineText);
- int tokenCount = tokenizer.countTokens();
- if(tokenCount >= 2)
- {
- int numGarbage = tokenCount - 2;
- for (int i = 0; i < numGarbage; i++)
- {
- tokenizer.nextToken();
- }
-
- String type = tokenizer.nextToken();
- String variable = tokenizer.nextToken();
-
- if(type != null &&
- type.compareTo("") != 0 &&
- variable != null &&
- variable.compareTo("") != 0 )
- {
- typeNames.add(type);
- variableNames.add(variable);
- }
- }
- }
- }
-
- int size = typeNames.size();
- String [] types = new String[size];
- String [] variables = new String[size];
-
- for(int i = 0; i < size; i++)
- {
- types[i] = typeNames.get(i).toString();
- variables[i] = variableNames.get(i).toString();
- }
-
- String code = "\n";
- if(JAVA_MODE)
- {
- code += createJavaConstructor(getClassName(), types, variables);
- textArea.setCaretPosition(selectionEnd);
- textArea.setSelectedText(code);
- }
- else
- {
- code += createCppConstructor(getClassName(), types, variables);
- textArea.setCaretPosition(selectionEnd);
- textArea.setSelectedText(code);
- }
-
- textArea.setCaretPosition(selectionEnd);
- textArea.moveCaretPosition(selectionEnd + code.length(), true);
- textArea.indentSelectedLines();
-}
-
-if( buffer.isReadOnly() )
- Macros.error( view, "Buffer is read-only." );
-else
- parseSelection();
+/**
+Create_Constructor.bsh - a BeanShell macro for the jEdit text editor that
+creates a constructor containing the selected variables. This code has the
+similar limitations as Get_Class_Name; it merely looks backwards for the nearest
+occurance of the keyword 'class," etc.
+
+Copyright (C) 2004 Thomas Galvin - software at thomas-galvin.com
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+*/
+
+boolean JAVA_MODE = buffer.getMode().getName().toLowerCase().equals("java");
+String UNDEFINED = "UNKNOWN_CLASS";
+
+void setCaret(int selectionStart, int selectionEnd)
+{
+ textArea.setCaretPosition(selectionStart);
+ textArea.moveCaretPosition(selectionEnd);
+}
+
+String getClassName()
+{
+ int selectionStart = textArea.getSelectionStart();
+ int selectionEnd = textArea.getSelectionEnd();
+
+ String text = textArea.getText();
+ int index = text.lastIndexOf("class", selectionStart);
+ if(index != -1)
+ {
+ textArea.setCaretPosition(index);
+ int lineNumber = textArea.getCaretLine();
+ int lineEnd = textArea.getLineEndOffset(lineNumber);
+ String lineText = text.substring(index, lineEnd);
+
+ StringTokenizer tokenizer = new StringTokenizer(lineText);
+ tokenizer.nextToken(); //eat "class"
+ if(tokenizer.hasMoreTokens())
+ {
+ setCaret(selectionStart, selectionEnd);
+ return tokenizer.nextToken();
+ }
+ }
+ setCaret(selectionStart, selectionEnd);
+
+ String fileClassName = buffer.getName();
+ int index = fileClassName.lastIndexOf('.');
+ if(index != -1)
+ {
+ fileClassName = fileClassName.substring(0, index);
+ if(fileClassName.toLowerCase().indexOf("untitled") == -1)
+ {
+ return fileClassName;
+ }
+ }
+
+ return UNDEFINED;
+}
+
+public String createJavaConstructor(String className, String[] typeNames, String[] variableNames)
+{
+ if(typeNames.length != variableNames.length)
+ {
+ Macro.message(view, "Uneven number of type names and variables.");
+ return "";
+ }
+
+ String args = "";
+ String body = "";
+
+ for(int i = 0; i < typeNames.length; i++)
+ {
+ args += typeNames[i] + " " + variableNames[i];
+ if(i+1 < typeNames.length)
+ {
+ args += ",\n";
+ }
+
+ body += "this." + variableNames[i] + " = " + variableNames[i] + ";\n";
+ }
+
+ String code =
+ "/**\n" + "Basic constructor for " + className + "\n*/\n" +
+ "public " + className +
+ "(" + args + ")" + "\n" +
+ "{" + "\n" +
+ body +
+ "}" + "\n";
+
+ return code;
+}
+
+public String createCppConstructor(String className, String[] typeNames, String[] variableNames)
+{
+ if(typeNames.length != variableNames.length)
+ {
+ Macro.message(view, "Uneven number of type names and variables.");
+ return "";
+ }
+
+ String args = "";
+ String body = "";
+
+ for(int i = 0; i < typeNames.length; i++)
+ {
+ String setVariable = variableNames[i] + "Value";
+
+ args += typeNames[i] + "& " + setVariable;
+ body += variableNames[i] + "(" + setVariable + ")";
+
+ if(i+1 < typeNames.length)
+ {
+ args += ",\n";
+ body += ",";
+ }
+
+ body += "\n";
+ }
+
+ String code =
+ "/*\n" + "Basic constructor for " + className + "\n*/\n" +
+ className + "::" + className +
+ "(" + args + ")" + "\n" +
+ "throw()\n" +
+ " : " + body +
+ "{" + "\n" +
+ "}" + "\n";
+
+ return code;
+}
+
+void parseSelection()
+{
+ int selectionStart = textArea.getSelectionStart();
+ int selectionEnd = textArea.getSelectionEnd();
+
+ textArea.setCaretPosition(selectionStart);
+ int startLine = textArea.getCaretLine();
+
+ textArea.setCaretPosition(selectionEnd);
+ int endLine = textArea.getCaretLine();
+
+ Vector typeNames = new Vector();
+ Vector variableNames = new Vector();
+
+ for(int i = startLine; i <= endLine; i++)
+ {
+ String lineText = textArea.getLineText(i);
+ if( lineText != null && !lineText.equals("") )
+ {
+ lineText = lineText.trim();
+ if( lineText.endsWith(";") )
+ {
+ lineText = lineText.substring( 0, lineText.length() -1 );
+ }
+
+ StringTokenizer tokenizer = new StringTokenizer(lineText);
+ int tokenCount = tokenizer.countTokens();
+ if(tokenCount >= 2)
+ {
+ int numGarbage = tokenCount - 2;
+ for (int i = 0; i < numGarbage; i++)
+ {
+ tokenizer.nextToken();
+ }
+
+ String type = tokenizer.nextToken();
+ String variable = tokenizer.nextToken();
+
+ if(type != null &&
+ type.compareTo("") != 0 &&
+ variable != null &&
+ variable.compareTo("") != 0 )
+ {
+ typeNames.add(type);
+ variableNames.add(variable);
+ }
+ }
+ }
+ }
+
+ int size = typeNames.size();
+ String [] types = new String[size];
+ String [] variables = new String[size];
+
+ for(int i = 0; i < size; i++)
+ {
+ types[i] = typeNames.get(i).toString();
+ variables[i] = variableNames.get(i).toString();
+ }
+
+ String code = "\n";
+ if(JAVA_MODE)
+ {
+ code += createJavaConstructor(getClassName(), types, variables);
+ textArea.setCaretPosition(selectionEnd);
+ textArea.setSelectedText(code);
+ }
+ else
+ {
+ code += createCppConstructor(getClassName(), types, variables);
+ textArea.setCaretPosition(selectionEnd);
+ textArea.setSelectedText(code);
+ }
+
+ textArea.setCaretPosition(selectionEnd);
+ textArea.moveCaretPosition(selectionEnd + code.length(), true);
+ textArea.indentSelectedLines();
+}
+
+if( buffer.isReadOnly() )
+ Macros.error( view, "Buffer is read-only." );
+else
+ parseSelection();
diff --git a/jEdit/macros/Java/Get_Class_Name.bsh b/jEdit/macros/Java/Get_Class_Name.bsh
index d1ffb47..da31fe6 100644
--- a/jEdit/macros/Java/Get_Class_Name.bsh
+++ b/jEdit/macros/Java/Get_Class_Name.bsh
@@ -1,92 +1,92 @@
-/**
-Get_Class_Name.bsh - a BeanShell macro for the jEdit text editor replaces the
-selected text with the current class name.
-
-This macro walks though several steps in an attempt to guess the correct class
-name.
-
-First, it searches backwards for the nearest occurance of the keyword 'class,'
-so it should work for inner class definitions. It does not, however, do any
-fancy code parsing, so if you run this macro at any point after an inner class
-definition, it will return the name of the inner class, not the parent class.
-
-If that fails, it attempts to guess the class name from the file name; i.e. it
-would return "FooBar" if the buffer was named "FooBar.cc." If this fails (if,
-for example, the buffer is untitled), it returns an empty string.
-
-Copyright (C) 2004 Thomas Galvin - software at thomas-galvin.com
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-*/
-
-void setCaret(int selectionStart, int selectionEnd)
-{
- textArea.setCaretPosition(selectionStart);
- textArea.moveCaretPosition(selectionEnd);
-}
-
-String getClassName()
-{
- int selectionStart = textArea.getSelectionStart();
- int selectionEnd = textArea.getSelectionEnd();
-
- String text = textArea.getText();
- int index = text.lastIndexOf("class", selectionStart);
- if(index != -1)
- {
- textArea.setCaretPosition(index);
- int lineNumber = textArea.getCaretLine();
- int lineEnd = textArea.getLineEndOffset(lineNumber);
- String lineText = text.substring(index, lineEnd);
-
- StringTokenizer tokenizer = new StringTokenizer(lineText);
- tokenizer.nextToken(); //eat "class"
- if(tokenizer.hasMoreTokens())
- {
- setCaret(selectionStart, selectionEnd);
- return tokenizer.nextToken();
- }
- }
-
-
- String fileClassName = buffer.getName();
- int index = fileClassName.lastIndexOf('.');
- if(index != -1)
- {
- fileClassName = fileClassName.substring(0, index);
- if(fileClassName.toLowerCase().indexOf("untitled") == -1)
- {
- return fileClassName;
- }
- }
- setCaret(selectionStart, selectionEnd);
-
- String className = buffer.getName();
- int index = name.lastIndexOf('.');
- if(index != -1)
- {
- className = className.substring(0, index);
- if(className.toLowerCase().indexOf("untitled") == -1)
- {
- return className;
- }
- }
-
- return "";
-}
-
-String className = getClassName();
-if( buffer.isReadOnly() )
- Macros.error( view, "Buffer is read-only." );
-else if( className != null && !className.equals("") )
-{
- textArea.setSelectedText(className);
-}
+/**
+Get_Class_Name.bsh - a BeanShell macro for the jEdit text editor replaces the
+selected text with the current class name.
+
+This macro walks though several steps in an attempt to guess the correct class
+name.
+
+First, it searches backwards for the nearest occurance of the keyword 'class,'
+so it should work for inner class definitions. It does not, however, do any
+fancy code parsing, so if you run this macro at any point after an inner class
+definition, it will return the name of the inner class, not the parent class.
+
+If that fails, it attempts to guess the class name from the file name; i.e. it
+would return "FooBar" if the buffer was named "FooBar.cc." If this fails (if,
+for example, the buffer is untitled), it returns an empty string.
+
+Copyright (C) 2004 Thomas Galvin - software at thomas-galvin.com
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+*/
+
+void setCaret(int selectionStart, int selectionEnd)
+{
+ textArea.setCaretPosition(selectionStart);
+ textArea.moveCaretPosition(selectionEnd);
+}
+
+String getClassName()
+{
+ int selectionStart = textArea.getSelectionStart();
+ int selectionEnd = textArea.getSelectionEnd();
+
+ String text = textArea.getText();
+ int index = text.lastIndexOf("class", selectionStart);
+ if(index != -1)
+ {
+ textArea.setCaretPosition(index);
+ int lineNumber = textArea.getCaretLine();
+ int lineEnd = textArea.getLineEndOffset(lineNumber);
+ String lineText = text.substring(index, lineEnd);
+
+ StringTokenizer tokenizer = new StringTokenizer(lineText);
+ tokenizer.nextToken(); //eat "class"
+ if(tokenizer.hasMoreTokens())
+ {
+ setCaret(selectionStart, selectionEnd);
+ return tokenizer.nextToken();
+ }
+ }
+
+
+ String fileClassName = buffer.getName();
+ int index = fileClassName.lastIndexOf('.');
+ if(index != -1)
+ {
+ fileClassName = fileClassName.substring(0, index);
+ if(fileClassName.toLowerCase().indexOf("untitled") == -1)
+ {
+ return fileClassName;
+ }
+ }
+ setCaret(selectionStart, selectionEnd);
+
+ String className = buffer.getName();
+ int index = name.lastIndexOf('.');
+ if(index != -1)
+ {
+ className = className.substring(0, index);
+ if(className.toLowerCase().indexOf("untitled") == -1)
+ {
+ return className;
+ }
+ }
+
+ return "";
+}
+
+String className = getClassName();
+if( buffer.isReadOnly() )
+ Macros.error( view, "Buffer is read-only." );
+else if( className != null && !className.equals("") )
+{
+ textArea.setSelectedText(className);
+}
diff --git a/jEdit/macros/Java/Get_Package_Name.bsh b/jEdit/macros/Java/Get_Package_Name.bsh
index 772d8a8..418f54a 100644
--- a/jEdit/macros/Java/Get_Package_Name.bsh
+++ b/jEdit/macros/Java/Get_Package_Name.bsh
@@ -1,136 +1,136 @@
-/*
- * Get_Package_Name.bsh - a BeanShell macro script for the
- * jEdit text editor - insert package name based upon path
- * of current buffer
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Based on code contributed by Richard Wan
- *
- * $Id: Get_Package_Name.bsh 4995 2004-03-19 15:58:00Z spestov $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-boolean testClassPath()
-{
- classpath = System.getProperty("java.class.path");
- classSeparator = (File.separatorChar == '/' ? ':' : ';');
- return (classpath.indexOf(classSeparator) != -1)
- || (!classpath.endsWith("jedit.jar"));
-}
-
-
-File getCanonicalFile(File file)
-{
- try
- {
- return new File(file.getCanonicalPath());
- }
- catch(IOException e)
- {
- return new File(file.getAbsolutePath());
- }
-}
-
-File getRoot(File file)
-{
- tokens = new StringTokenizer(System.getProperty("java.class.path"),
- File.pathSeparator);
- fileSet = new Hashtable();
- while(tokens.hasMoreTokens())
- {
- String tok = tokens.nextToken();
- fileSet.put(getCanonicalFile(new File(tok)), tok);
- }
-
- while(file != null)
- {
- if(fileSet.get(getCanonicalFile(file)) != null)
- break;
- parent = file.getParent();
- file = (parent != null) ? new File(parent) : null;
- }
- return file;
-}
-
-
-String determinePackageName(String path)
-{
- pathFile = new File(buffer.getPath());
- File root = getRoot(pathFile);
- if(root == null)
- return null;
- parent = pathFile.getParent();
- packagePath = parent.substring(root.getPath().length(), parent.length());
- packagePath = packagePath.replace(File.separatorChar, '.');
- if (packagePath.endsWith("."))
- {
- packagePath = packagePath.substring(0, packagePath.length() - 1);
- }
- if (packagePath.startsWith("."))
- {
- packagePath = packagePath.substring(1, packagePath.length());
- }
- return packagePath;
-}
-
-if( buffer.isReadOnly() )
- Macros.error( view, "Buffer is read-only." );
-else
-{
- // main routine
- if(!testClassPath())
- {
- Macros.error(view, "This macro will not work when the Java interpreter\n"
- + "loads jEdit with the '-jar' command line option.");
- }
- else
- {
- result = determinePackageName(buffer.getPath());
- if(result == null)
- {
- Macros.error(view, "Could not find a package name.");
- }
- else textArea.setSelectedText(result);
- }
-}
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Get_Package_Name.bsh</filename></para>
- <abstract><para>
- Inserts a plausible Java package name for the current buffer.
- </para></abstract>
- <para>
- The macro compares the buffer's path name with the elements of the
- classpath being used by the jEdit session. An error message will be
- displayed if no suitable package name is found. This macro will not
- work if jEdit is being run as a JAR file without specifying a
- classpath. In that case the classpath seen by the macro consists
- solely of the JAR file.
- </para>
-</listitem>
-
-*/
-
-// end Get_Package_Name.bsh
-
+/*
+ * Get_Package_Name.bsh - a BeanShell macro script for the
+ * jEdit text editor - insert package name based upon path
+ * of current buffer
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Based on code contributed by Richard Wan
+ *
+ * $Id: Get_Package_Name.bsh 4995 2004-03-19 15:58:00Z spestov $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+boolean testClassPath()
+{
+ classpath = System.getProperty("java.class.path");
+ classSeparator = (File.separatorChar == '/' ? ':' : ';');
+ return (classpath.indexOf(classSeparator) != -1)
+ || (!classpath.endsWith("jedit.jar"));
+}
+
+
+File getCanonicalFile(File file)
+{
+ try
+ {
+ return new File(file.getCanonicalPath());
+ }
+ catch(IOException e)
+ {
+ return new File(file.getAbsolutePath());
+ }
+}
+
+File getRoot(File file)
+{
+ tokens = new StringTokenizer(System.getProperty("java.class.path"),
+ File.pathSeparator);
+ fileSet = new Hashtable();
+ while(tokens.hasMoreTokens())
+ {
+ String tok = tokens.nextToken();
+ fileSet.put(getCanonicalFile(new File(tok)), tok);
+ }
+
+ while(file != null)
+ {
+ if(fileSet.get(getCanonicalFile(file)) != null)
+ break;
+ parent = file.getParent();
+ file = (parent != null) ? new File(parent) : null;
+ }
+ return file;
+}
+
+
+String determinePackageName(String path)
+{
+ pathFile = new File(buffer.getPath());
+ File root = getRoot(pathFile);
+ if(root == null)
+ return null;
+ parent = pathFile.getParent();
+ packagePath = parent.substring(root.getPath().length(), parent.length());
+ packagePath = packagePath.replace(File.separatorChar, '.');
+ if (packagePath.endsWith("."))
+ {
+ packagePath = packagePath.substring(0, packagePath.length() - 1);
+ }
+ if (packagePath.startsWith("."))
+ {
+ packagePath = packagePath.substring(1, packagePath.length());
+ }
+ return packagePath;
+}
+
+if( buffer.isReadOnly() )
+ Macros.error( view, "Buffer is read-only." );
+else
+{
+ // main routine
+ if(!testClassPath())
+ {
+ Macros.error(view, "This macro will not work when the Java interpreter\n"
+ + "loads jEdit with the '-jar' command line option.");
+ }
+ else
+ {
+ result = determinePackageName(buffer.getPath());
+ if(result == null)
+ {
+ Macros.error(view, "Could not find a package name.");
+ }
+ else textArea.setSelectedText(result);
+ }
+}
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Get_Package_Name.bsh</filename></para>
+ <abstract><para>
+ Inserts a plausible Java package name for the current buffer.
+ </para></abstract>
+ <para>
+ The macro compares the buffer's path name with the elements of the
+ classpath being used by the jEdit session. An error message will be
+ displayed if no suitable package name is found. This macro will not
+ work if jEdit is being run as a JAR file without specifying a
+ classpath. In that case the classpath seen by the macro consists
+ solely of the JAR file.
+ </para>
+</listitem>
+
+*/
+
+// end Get_Package_Name.bsh
+
diff --git a/jEdit/macros/Java/Java_File_Save.bsh b/jEdit/macros/Java/Java_File_Save.bsh
index 3f2d0e8..507f555 100644
--- a/jEdit/macros/Java/Java_File_Save.bsh
+++ b/jEdit/macros/Java/Java_File_Save.bsh
@@ -1,142 +1,142 @@
-/*
- * Java_File_Save.bsh - a BeanShell macro for saving new java files.
- *
- * Copyright (C) 2004 Nicholas O'Leary nol at deferential.net
- *
- * :mode=beanshell:tabSize=3:indentSize=3:maxLineLen=0:noTabs=true:
- * :indentOnTab=true:indentOnEnter=true:folding=explicit:collapseFolds=1:
- *
- * {{{ License
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * }}}
- *
- * Notes:
- * Only the first 250 lines of the buffer are scanned for a suitable
- * class or interface declaration.
- *
- * Changes:
- * 17-May-04: Only scans if the edit mode is either 'java' or the default mode
- * : Ignores declarations that are in multiline comments
- * 08-Jun-04: If an infinite loop is hit (1000 iterations) in the comment
- * : parsing, it now opens the default save dialog, rather than
- * : just returning.
- * $Id: Java_File_Save.bsh 12063 2008-03-02 06:58:51Z k_satoda $
- */
-
-
-// Check this is a new file
-if (buffer.isNewFile() && buffer.getPath() != null)
-{
- // Only look further if the mode is 'java', or still the default
- String buffer_mode = buffer.getMode().toString();
- if (buffer_mode.equals("java") || buffer_mode.equals(jEdit.getProperty("buffer.defaultMode","")))
- {
- String fullpath = buffer.getPath();
- VFS vfs = VFSManager.getVFSForPath(fullpath);
- // Split into constituent parts
- String path = vfs.getParentOfPath(fullpath);
- String name = vfs.getFileName(fullpath);
-
- // At most, check the first 250 lines - this sounds reasonable to me
- int maxLine = Math.min(buffer.getLineCount(),250);
- import java.util.regex.Pattern;
- import java.util.regex.Matcher;
- // Build the regex - based on the offical java language spec.
- Pattern regex = Pattern.compile("^\\s*(public|protected|private|static|abstract|final|native|synchronized|transient|volatile|strictfp)?\\s*(class|interface)\\s*([^ {/]*)");
- boolean inComment = false;
- for(int i=0;i<maxLine;i++)
- {
- String txt = buffer.getLineText(i);
- int count = 0;
- // See if this line has a the start or finish of a multiline comment
- while (txt.indexOf("/*")!=-1 || txt.indexOf("*/")!=-1)
- {
- // A little paranoia on my part
- count++;
- if (count==1000)
- {
- Log.log(Log.ERROR,BeanShell.class,"Infinite loop:["+txt+"]");
- buffer.save(view,null,true);
- return;
- }
- // Look for the next starting comment if we're not in a comment
- if (!inComment)
- {
- int commentStartIndex = txt.indexOf("/*");
- if (commentStartIndex != -1)
- {
- inComment = true;
- if (commentStartIndex+2 == txt.length())
- txt = "";
- else
- txt = txt.substring(commentStartIndex+2);
- }
- }
- // Look for the next ending comment if we are in a comment
- if (inComment)
- {
- int commentEndIndex = txt.indexOf("*/");
- if (commentEndIndex != -1)
- {
- inComment = false;
- if (commentEndIndex+2 == txt.length())
- txt = "";
- else
- txt = txt.substring(commentEndIndex+2);
- } else {
- continue;
- }
- }
- }
-
- // We now know if the remainder of the line is in a comment or not
- if (!inComment)
- {
- Matcher matcher = regex.matcher(txt);
- if (matcher.matches())
- {
- // Extract the class/interface name
- name = matcher.group(3)+".java";
- break;
- }
- }
- }
-
- // Open the VFSBrowser
- String[] files = GUIUtilities.showVFSFileDialog(view,path+name,
- VFSBrowser.SAVE_DIALOG,false);
- if(files == null)
- return false;
- buffer.save(view,files[0],true);
- return;
- }
-}
-
-// This isn't a file that has been scanned, so just do a normal save
-buffer.save(view,null,true);
-
-/*
-
-Macro index data (in DocBook format)
-
- <listitem>
- <para><filename>Java_File_Save.bsh</filename></para>
- <abstract><para>Acts as a wrapper script to the Save As action. If the buffer
- is a new file, it scans the first 250 lines for a Java class or interface
- declaration. On finding one, it extracts the appropriate filename to be
- used in the Save As dialog.</para></abstract>
- </listitem>
-
-*/
+/*
+ * Java_File_Save.bsh - a BeanShell macro for saving new java files.
+ *
+ * Copyright (C) 2004 Nicholas O'Leary nol at deferential.net
+ *
+ * :mode=beanshell:tabSize=3:indentSize=3:maxLineLen=0:noTabs=true:
+ * :indentOnTab=true:indentOnEnter=true:folding=explicit:collapseFolds=1:
+ *
+ * {{{ License
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * }}}
+ *
+ * Notes:
+ * Only the first 250 lines of the buffer are scanned for a suitable
+ * class or interface declaration.
+ *
+ * Changes:
+ * 17-May-04: Only scans if the edit mode is either 'java' or the default mode
+ * : Ignores declarations that are in multiline comments
+ * 08-Jun-04: If an infinite loop is hit (1000 iterations) in the comment
+ * : parsing, it now opens the default save dialog, rather than
+ * : just returning.
+ * $Id: Java_File_Save.bsh 12063 2008-03-02 06:58:51Z k_satoda $
+ */
+
+
+// Check this is a new file
+if (buffer.isNewFile() && buffer.getPath() != null)
+{
+ // Only look further if the mode is 'java', or still the default
+ String buffer_mode = buffer.getMode().toString();
+ if (buffer_mode.equals("java") || buffer_mode.equals(jEdit.getProperty("buffer.defaultMode","")))
+ {
+ String fullpath = buffer.getPath();
+ VFS vfs = VFSManager.getVFSForPath(fullpath);
+ // Split into constituent parts
+ String path = vfs.getParentOfPath(fullpath);
+ String name = vfs.getFileName(fullpath);
+
+ // At most, check the first 250 lines - this sounds reasonable to me
+ int maxLine = Math.min(buffer.getLineCount(),250);
+ import java.util.regex.Pattern;
+ import java.util.regex.Matcher;
+ // Build the regex - based on the offical java language spec.
+ Pattern regex = Pattern.compile("^\\s*(public|protected|private|static|abstract|final|native|synchronized|transient|volatile|strictfp)?\\s*(class|interface)\\s*([^ {/]*)");
+ boolean inComment = false;
+ for(int i=0;i<maxLine;i++)
+ {
+ String txt = buffer.getLineText(i);
+ int count = 0;
+ // See if this line has a the start or finish of a multiline comment
+ while (txt.indexOf("/*")!=-1 || txt.indexOf("*/")!=-1)
+ {
+ // A little paranoia on my part
+ count++;
+ if (count==1000)
+ {
+ Log.log(Log.ERROR,BeanShell.class,"Infinite loop:["+txt+"]");
+ buffer.save(view,null,true);
+ return;
+ }
+ // Look for the next starting comment if we're not in a comment
+ if (!inComment)
+ {
+ int commentStartIndex = txt.indexOf("/*");
+ if (commentStartIndex != -1)
+ {
+ inComment = true;
+ if (commentStartIndex+2 == txt.length())
+ txt = "";
+ else
+ txt = txt.substring(commentStartIndex+2);
+ }
+ }
+ // Look for the next ending comment if we are in a comment
+ if (inComment)
+ {
+ int commentEndIndex = txt.indexOf("*/");
+ if (commentEndIndex != -1)
+ {
+ inComment = false;
+ if (commentEndIndex+2 == txt.length())
+ txt = "";
+ else
+ txt = txt.substring(commentEndIndex+2);
+ } else {
+ continue;
+ }
+ }
+ }
+
+ // We now know if the remainder of the line is in a comment or not
+ if (!inComment)
+ {
+ Matcher matcher = regex.matcher(txt);
+ if (matcher.matches())
+ {
+ // Extract the class/interface name
+ name = matcher.group(3)+".java";
+ break;
+ }
+ }
+ }
+
+ // Open the VFSBrowser
+ String[] files = GUIUtilities.showVFSFileDialog(view,path+name,
+ VFSBrowser.SAVE_DIALOG,false);
+ if(files == null)
+ return false;
+ buffer.save(view,files[0],true);
+ return;
+ }
+}
+
+// This isn't a file that has been scanned, so just do a normal save
+buffer.save(view,null,true);
+
+/*
+
+Macro index data (in DocBook format)
+
+ <listitem>
+ <para><filename>Java_File_Save.bsh</filename></para>
+ <abstract><para>Acts as a wrapper script to the Save As action. If the buffer
+ is a new file, it scans the first 250 lines for a Java class or interface
+ declaration. On finding one, it extracts the appropriate filename to be
+ used in the Save As dialog.</para></abstract>
+ </listitem>
+
+*/
diff --git a/jEdit/macros/Java/Make_Get_and_Set_Methods.bsh b/jEdit/macros/Java/Make_Get_and_Set_Methods.bsh
index d4a64b5..e34857d 100644
--- a/jEdit/macros/Java/Make_Get_and_Set_Methods.bsh
+++ b/jEdit/macros/Java/Make_Get_and_Set_Methods.bsh
@@ -1,297 +1,337 @@
-/**
-Make_Get_and_Set_Functions.bsh - a BeanShell macro for
-the jEdit text editor that creates simple get() and set()
-methods for the variables on selected lines.
-
-Copyright (C) 2004 Thomas Galvin - software at thomas-galvin.com
-based on Make_Get_and_Set_Methods.bsh by John Gellene
-
-This macro will work on multiple selected lines; for instance,
-selecting
-
-<code>
-public int foo;
-public int bar;
-</code>
-
-and running the macro will produce get and set functions for both
-variables, along with comments. This macro produces c-style
-functions, unless the buffer is in java mode.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-*/
-
-boolean JAVA_MODE = buffer.getMode().getName().equals("java");
-boolean createGetMethods = true;
-boolean createSetMethods = true;
-
-void setCaret(int selectionStart, int selectionEnd)
-{
- textArea.setCaretPosition(selectionStart);
- textArea.moveCaretPosition(selectionEnd);
-}
-
-String getClassName()
-{
- int selectionStart = textArea.getSelectionStart();
- int selectionEnd = textArea.getSelectionEnd();
-
- String text = textArea.getText();
- int index = text.lastIndexOf("class", selectionStart);
- if(index != -1)
- {
- textArea.setCaretPosition(index);
- int lineNumber = textArea.getCaretLine();
- int lineEnd = textArea.getLineEndOffset(lineNumber);
- String lineText = text.substring(index, lineEnd);
-
- StringTokenizer tokenizer = new StringTokenizer(lineText);
- tokenizer.nextToken(); //eat "class"
- if(tokenizer.hasMoreTokens())
- {
- setCaret(selectionStart, selectionEnd);
- return tokenizer.nextToken();
- }
- }
- setCaret(selectionStart, selectionEnd);
-
- String fileClassName = buffer.getName();
- int index = fileClassName.lastIndexOf('.');
- if(index != -1)
- {
- fileClassName = fileClassName.substring(0, index);
- if(fileClassName.toLowerCase().indexOf("untitled") == -1)
- {
- return fileClassName;
- }
- }
-
- return "";
-}
-
-String createJavaGetMethod(String type, String variableName)
-{
- String uppperVariable = Character.toUpperCase(variableName.charAt(0)) + variableName.substring(1, variableName.length());
- String result =
- "\t/**\n" +
- "\t * Returns the value of " + variableName + ".\n" +
- "\t */\n" +
- "\tpublic " + type + " get" + uppperVariable + "()" + "\n" +
- "\t{" + "\n" +
- "\t\treturn " + variableName + ";" + "\n" +
- "\t}\n";
-
- return result;
-}
-
-String createJavaSetMethod(String type, String variableName)
-{
- String uppperVariable = Character.toUpperCase(variableName.charAt(0)) + variableName.substring(1, variableName.length());
- String result =
- "\t/**\n" +
- "\t * Sets the value of " + variableName + ".\n" +
- "\t * @param " + variableName + " The value to assign " + variableName + ".\n" +
- "\t */\n" +
- "\tpublic void set" + uppperVariable + "(" + type + " " + variableName + ")\n" +
- "\t{" + "\n" +
- "\t\tthis." + variableName + " = " + variableName + ";" + "\n" +
- "\t}\n";
-
- return result;
-}
-
-String createCppGetMethod(String className, String type, String variableName)
-{
- String scopeIndicator = "";
- if(className != null && className.compareTo("") != 0)
- {
- scopeIndicator = className + "::";
- }
-
- String uppperVariable = Character.toUpperCase(variableName.charAt(0)) + variableName.substring(1, variableName.length());
- String result =
- "/*\n" +
- "function: get" + uppperVariable + "()\n" +
- "Returns the value of " + variableName + ".\n" +
- "*/\n" +
- type + " " + scopeIndicator + "get" + uppperVariable + "()" + "\n" +
- "{" + "\n" +
- " return " + variableName + ";" + "\n" +
- "}\n";
-
- return result;
-}
-
-String createCppSetMethod(String className, String type, String variableName)
-{
- String scopeIndicator = "";
- if(className != null && className.compareTo("") != 0)
- {
- scopeIndicator = className + "::";
- }
-
- String uppperVariable = Character.toUpperCase(variableName.charAt(0)) + variableName.substring(1, variableName.length());
- String setVariable = variableName + "Value";
- String result =
- "/*\n" +
- "function: set" + uppperVariable + "()\n" +
- "Sets the value of " + variableName + ".\n" +
- "Input: " + setVariable + " The value to assign " + variableName + ".\n" +
- "*/\n" +
- "void " + scopeIndicator + "set" + uppperVariable + "(const " + type + "& " + setVariable + ")\n" +
- "{" + "\n" +
- " " + variableName + " = " + setVariable + ";" + "\n" +
- "}\n";
-
- return result;
-}
-
-void parseSelection()
-{
- int selectionStart = textArea.getSelectionStart();
- int selectionEnd = textArea.getSelectionEnd();
-
- textArea.setCaretPosition(selectionStart);
- int startLine = textArea.getCaretLine();
-
- textArea.setCaretPosition(selectionEnd);
- int endLine = textArea.getCaretLine();
-
- StringBuffer code = new StringBuffer();
- String className = getClassName();
-
- for(int i = startLine; i <= endLine; i++)
- {
- String lineText = textArea.getLineText(i);
- if( lineText != null && !lineText.equals("") )
- {
- lineText = lineText.trim();
- if( lineText.endsWith(";") )
- {
- lineText = lineText.substring( 0, lineText.length() -1 );
- }
-
- StringTokenizer tokenizer = new StringTokenizer(lineText);
- int tokenCount = tokenizer.countTokens();
- if(tokenCount >= 2)
- {
- int numGarbage = tokenCount - 2;
- for (int i = 0; i < numGarbage; i++)
- {
- tokenizer.nextToken();
- }
-
- String type = tokenizer.nextToken();
- String variable = tokenizer.nextToken();
-
- if(createGetMethods)
- {
- String tmp = "";
- if(JAVA_MODE)
- {
- tmp = createJavaGetMethod(type, variable);
- }
- else
- {
- tmp = createCppGetMethod(className, type, variable);
- }
-
- if(tmp != null && tmp.compareTo("") != 0)
- {
- code.append(tmp + "\n");
- }
- }
-
- if(createSetMethods && lineText.indexOf("final ") == -1 && lineText.indexOf("const ") == -1)
- {
- String tmp = "\n";
- if(JAVA_MODE)
- {
- tmp = createJavaSetMethod(type, variable);
- }
- else
- {
- tmp = createCppSetMethod(className, type, variable);
- }
-
- if(tmp != null && tmp.compareTo("") != 0)
- {
- code.append(tmp + "\n");
- }
- }
- }
- }
- }
-
- textArea.setCaretPosition(selectionEnd);
- textArea.setSelectedText(code.toString());
-
- textArea.setCaretPosition(selectionEnd);
- textArea.moveCaretPosition(selectionEnd + code.length(), true);
- textArea.indentSelectedLines();
-}
-
-void displayPrompt()
-{
- String DONE = "Generate Code";
- String CANCEL = " Cancel ";
-
- JCheckBox getCheckbox = new JCheckBox("Create Get Methods", true);
- JCheckBox setCheckbox = new JCheckBox("Create Set Methods", true);
-
- JPanel checkBoxPanel = new JPanel();
- checkBoxPanel.setLayout(new BorderLayout());
- checkBoxPanel.add(getCheckbox, BorderLayout.NORTH);
- checkBoxPanel.add(setCheckbox, BorderLayout.SOUTH);
-
- JButton createButton = new JButton(DONE);
- JButton cancelButton = new JButton(CANCEL);
-
- JPanel buttonPanel = new JPanel();
- buttonPanel.setLayout(new BorderLayout());
- buttonPanel.add(createButton, BorderLayout.WEST);
- buttonPanel.add(cancelButton, BorderLayout.EAST);
-
- JPanel mainPanel = new JPanel();
- mainPanel.setLayout(new BorderLayout());
- mainPanel.add(checkBoxPanel, BorderLayout.NORTH);
- mainPanel.add(buttonPanel, BorderLayout.SOUTH);
-
- String title = "Create Get and Set Methods";
- JDialog dialog = new JDialog(view, title, false);
- dialog.setContentPane(mainPanel);
-
- actionPerformed(ActionEvent e)
- {
- if(e.getSource() == createButton)
- {
- createGetMethods = getCheckbox.isSelected();
- createSetMethods = setCheckbox.isSelected();
- parseSelection();
- }
- this.dialog.dispose();
- return;
- }
-
- createButton.addActionListener(this);
- cancelButton.addActionListener(this);
-
- dialog.pack();
- dialog.setLocationRelativeTo(view);
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- dialog.setVisible(true);
- createButton.requestFocus();
-}
-
-if( buffer.isReadOnly() )
- Macros.error( view, "Buffer is read-only." );
-else
- displayPrompt();
+/**
+Make_Get_and_Set_Functions.bsh - a BeanShell macro for
+the jEdit text editor that creates simple get() and set()
+methods for the variables on selected lines.
+
+Copyright (C) 2004 Thomas Galvin - software at thomas-galvin.com
+based on Make_Get_and_Set_Methods.bsh by John Gellene
+
+This macro will work on multiple selected lines; for instance,
+selecting
+
+<code>
+public int foo;
+public int bar;
+</code>
+
+and running the macro will produce get and set functions for both
+variables, along with comments. This macro produces c-style
+functions, unless the buffer is in java mode.
+
+Modifications by Dale Anson, Dec 2008:
+
+1. Allows variable declarations to have an initial assignment, like
+<code>
+public int foo = 1;
+public int bar = 2;
+</code>
+
+2. Allows multiple variables on same line, like
+<code>
+public int foo, bar;
+</code>
+
+3. Use line separator as set in buffer properties rather than always using \n.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+*/
+
+
+boolean JAVA_MODE = buffer.getMode().getName().equals( "java" );
+
+// use line separator from current buffer
+String LS = buffer.getStringProperty( "lineSeparator" );
+if (LS == null) {
+ // otherwise, use default line separator
+ LS = jEdit.getProperty("buffer.lineSeparator");
+}
+
+boolean createGetMethods = true;
+boolean createSetMethods = true;
+
+void setCaret( int selectionStart, int selectionEnd ) {
+ textArea.setCaretPosition( selectionStart );
+ textArea.moveCaretPosition( selectionEnd );
+}
+
+String getClassName() {
+ int selectionStart = textArea.getSelectionStart();
+ int selectionEnd = textArea.getSelectionEnd();
+
+ String text = textArea.getText();
+ int index = text.lastIndexOf( "class", selectionStart );
+ if ( index != -1 ) {
+ textArea.setCaretPosition( index );
+ int lineNumber = textArea.getCaretLine();
+ int lineEnd = textArea.getLineEndOffset( lineNumber );
+ String lineText = text.substring( index, lineEnd );
+
+ StringTokenizer tokenizer = new StringTokenizer( lineText );
+ tokenizer.nextToken(); //eat "class"
+ if ( tokenizer.hasMoreTokens() ) {
+ setCaret( selectionStart, selectionEnd );
+ return tokenizer.nextToken();
+ }
+ }
+ setCaret( selectionStart, selectionEnd );
+
+ String fileClassName = buffer.getName();
+ int index = fileClassName.lastIndexOf( '.' );
+ if ( index != -1 ) {
+ fileClassName = fileClassName.substring( 0, index );
+ if ( fileClassName.toLowerCase().indexOf( "untitled" ) == -1 ) {
+ return fileClassName;
+ }
+ }
+
+ return "";
+}
+
+String createJavaGetMethod( String type, String variableName ) {
+ String uppperVariable = Character.toUpperCase( variableName.charAt( 0 ) ) + variableName.substring( 1, variableName.length() );
+ String result =
+ "\t/**" + LS +
+ "\t * Returns the value of " + variableName + "." + LS +
+ "\t */" + LS +
+ "\tpublic " + type + " get" + uppperVariable + "() {" + LS +
+ "\t\treturn " + variableName + ";" + LS +
+ "\t}" + LS;
+
+ return result;
+}
+
+String createJavaSetMethod( String type, String variableName ) {
+ String uppperVariable = Character.toUpperCase( variableName.charAt( 0 ) ) + variableName.substring( 1, variableName.length() );
+ String result =
+ "\t/**" + LS +
+ "\t * Sets the value of " + variableName + "." + LS +
+ "\t * @param " + variableName + " The value to assign " + variableName + "." + LS +
+ "\t */" + LS +
+ "\tpublic void set" + uppperVariable + "(" + type + " " + variableName + ") {" + LS +
+ "\t\tthis." + variableName + " = " + variableName + ";" + LS +
+ "\t}" + LS;
+
+ return result;
+}
+
+String createCppGetMethod( String className, String type, String variableName ) {
+ String scopeIndicator = "";
+ if ( className != null && className.compareTo( "" ) != 0 ) {
+ scopeIndicator = className + "::";
+ }
+ if (type == null) {
+ type = "";
+ }
+ System.out.println("7 " + className + ", " + type + ", " + variableName);
+ String uppperVariable = Character.toUpperCase( variableName.charAt( 0 ) ) + variableName.substring( 1, variableName.length() );
+ System.out.println("8");
+ String result =
+ "/*" + LS +
+ "function: get" + uppperVariable + "()" + LS +
+ "Returns the value of " + variableName + "." + LS +
+ "*/" + LS +
+ type + (type.length() > 0 ? " " : "") + scopeIndicator + "get" + uppperVariable + "()" + "" + LS +
+ "{" + "" + LS +
+ " return " + variableName + ";" + "" + LS +
+ "}" + LS;
+
+ return result;
+}
+
+String createCppSetMethod( String className, String type, String variableName ) {
+ String scopeIndicator = "";
+ if ( className != null && className.compareTo( "" ) != 0 ) {
+ scopeIndicator = className + "::";
+ }
+
+ String uppperVariable = Character.toUpperCase( variableName.charAt( 0 ) ) + variableName.substring( 1, variableName.length() );
+ String setVariable = variableName + "Value";
+ String result =
+ "/*" + LS +
+ "function: set" + uppperVariable + "()" + LS +
+ "Sets the value of " + variableName + "." + LS +
+ "Input: " + setVariable + " The value to assign " + variableName + "." + LS +
+ "*/" + LS +
+ "void " + scopeIndicator + "set" + uppperVariable + "(const " + type + "& " + setVariable + ")" + LS +
+ "{" + "" + LS +
+ " " + variableName + " = " + setVariable + ";" + "" + LS +
+ "}" + LS;
+
+ return result;
+}
+
+void parseSelection() {
+ int selectionStart = textArea.getSelectionStart();
+ int selectionEnd = textArea.getSelectionEnd();
+
+ textArea.setCaretPosition( selectionStart );
+ int startLine = textArea.getCaretLine();
+
+ textArea.setCaretPosition( selectionEnd );
+ int endLine = textArea.getCaretLine();
+
+ StringBuffer code = new StringBuffer();
+ String className = getClassName();
+
+ for ( int i = startLine; i <= endLine; i++ ) {
+ // parse each line for variable declaration
+ String lineText = textArea.getLineText( i );
+ if ( lineText != null && lineText.length() > 0 ) {
+ System.out.println("1");
+ // remove leading and trailing whitespace
+ lineText = lineText.trim();
+ if ( lineText.length() == 0 ) {
+ continue; // nothing to do with this line
+ }
+
+ // remove semi-colon
+ if ( lineText.endsWith( ";" ) ) {
+ lineText = lineText.substring( 0, lineText.length() - 1 );
+ }
+ System.out.println("2");
+ // remove initial assignment if present
+ if ( lineText.indexOf( "=" ) > 0 ) {
+ lineText = lineText.substring( 0, lineText.indexOf( "=" ) );
+ }
+ System.out.println("3");
+ lineText = lineText.trim();
+ if ( lineText.length() == 0 ) {
+ continue;
+ }
+ System.out.println("4");
+ // list to hold variable names
+ ArrayList variables = new ArrayList();
+
+ // could have declaration like int x, y; so split them out into the
+ // variables array
+ if ( lineText.indexOf( "," ) > 0 ) {
+ int index = lineText.indexOf( "," ); // just after first variable name
+ String front = lineText.substring( 0, index ); // up to and including the first variable name
+ String back = lineText.substring( index ); // remaining variable names
+ lineText = front.substring( 0, front.lastIndexOf( " " ) ); // adjust remaining line text, this contains the type
+ front = front.substring( front.lastIndexOf( " " ) ).trim(); // first variable name
+ String[] backs = back.split( "," ); // remaining variable names
+ variables.add( front ); // add first variable name to the list
+ for ( String back : backs ) { // add remaining variable names to the list
+ String maybe = back.trim();
+ if ( maybe.length() > 0 ) {
+ variables.add( maybe );
+ }
+ }
+ }
+ else {
+ // just one variable declared
+ String var = lineText.substring( lineText.lastIndexOf( " " ) ).trim();
+ variables.add( var );
+ lineText = lineText.substring( 0, lineText.lastIndexOf( " " ) ).trim();
+ }
+ System.out.println("5");
+ if ( lineText.trim().length() == 0 ) {
+ continue; // no type declared for this variable
+ }
+
+ // get the variable type
+ String type = "";
+ if (lineText.lastIndexOf( " " ) > 0) {
+ type = lineText.substring( lineText.lastIndexOf( " " ) );
+ }
+ type = type.trim();
+ System.out.println("5.1");
+
+ if ( variables.size() > 0 ) {
+ code.append( LS );
+ }
+
+ // create the get and set methods for each variable
+ for ( String variable : variables ) {
+ if ( createGetMethods ) {
+ String tmp = JAVA_MODE ? createJavaGetMethod( type, variable ) : createCppGetMethod( className, type, variable );
+ if ( tmp != null && tmp.length() > 0 ) {
+ code.append( tmp ).append( LS );
+ }
+ }
+
+ if ( createSetMethods && lineText.indexOf( "final " ) == -1 && lineText.indexOf( "const " ) == -1 ) {
+ String tmp = JAVA_MODE ? createJavaSetMethod( type, variable ) : createCppSetMethod( className, type, variable );
+
+ if ( tmp != null && tmp.compareTo( "" ) != 0 ) {
+ code.append( LS ).append( tmp ).append( LS );
+ }
+ }
+ }
+ }
+ }
+
+ // move to the end of the selected text
+ textArea.setCaretPosition( selectionEnd );
+
+ // insert get/set methods
+ textArea.setSelectedText( code.toString() );
+
+ // select the inserted code and indent it
+ textArea.setCaretPosition( selectionEnd );
+ textArea.moveCaretPosition( selectionEnd + code.length(), true );
+ textArea.indentSelectedLines();
+}
+
+void displayPrompt() {
+ String DONE = "Generate Code";
+ String CANCEL = "Cancel";
+
+ JCheckBox getCheckbox = new JCheckBox( "Create Get Methods", true );
+ JCheckBox setCheckbox = new JCheckBox( "Create Set Methods", true );
+
+ JPanel checkBoxPanel = new JPanel(new BorderLayout());
+ checkBoxPanel.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6));
+ checkBoxPanel.add( getCheckbox, BorderLayout.NORTH );
+ checkBoxPanel.add( setCheckbox, BorderLayout.SOUTH );
+
+ JButton createButton = new JButton( DONE );
+ JButton cancelButton = new JButton( CANCEL );
+
+ JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 6, 0));
+ buttonPanel.setBorder(BorderFactory.createEmptyBorder(11, 11, 11, 11));
+ buttonPanel.add( createButton, BorderLayout.WEST );
+ buttonPanel.add( cancelButton, BorderLayout.EAST );
+
+ JPanel mainPanel = new JPanel();
+ mainPanel.setLayout( new BorderLayout() );
+ mainPanel.add( checkBoxPanel, BorderLayout.NORTH );
+ mainPanel.add( buttonPanel, BorderLayout.SOUTH );
+
+ String title = "Create Get and Set Methods";
+ JDialog dialog = new JDialog( view, title, false );
+ dialog.setContentPane( mainPanel );
+
+ actionPerformed( ActionEvent e ) {
+ if ( e.getSource() == createButton ) {
+ createGetMethods = getCheckbox.isSelected();
+ createSetMethods = setCheckbox.isSelected();
+ parseSelection();
+ }
+ this.dialog.dispose();
+ return ;
+ }
+
+ createButton.addActionListener( this );
+ cancelButton.addActionListener( this );
+
+ dialog.pack();
+ dialog.setLocationRelativeTo( view );
+ dialog.setDefaultCloseOperation( JDialog.DISPOSE_ON_CLOSE );
+ dialog.setVisible( true );
+ createButton.requestFocus();
+}
+
+if ( buffer.isReadOnly() )
+ Macros.error( view, "Buffer is read-only." );
+else
+ displayPrompt();
\ No newline at end of file
diff --git a/jEdit/macros/Java/Preview_JavaDoc_Of_Current_Buffer.bsh b/jEdit/macros/Java/Preview_JavaDoc_Of_Current_Buffer.bsh
index 10f283a..0533af4 100644
--- a/jEdit/macros/Java/Preview_JavaDoc_Of_Current_Buffer.bsh
+++ b/jEdit/macros/Java/Preview_JavaDoc_Of_Current_Buffer.bsh
@@ -1,824 +1,824 @@
-/*
- * Preview_JavaDoc_Of_Current_Buffer.bsh
- * version 1.8
- * A BeanShell macro script for the jEdit text editor
- * :tabSize=2:indentSize=2:noTabs=true:
- * :folding=explicit:collapseFolds=1:
- *
- * $Header$
- * Copyright (C) 2001-2003 Tom Gutwin
- * tgutwin at webarts.bc.ca
- *
- * - Macro to create and preview the JavaDocs for the current buffer
- * - It tries to figure everything out for you.
- * - Map this macro to it to a button on the button bar and away you go!
- *
- * ************************************************************************
- * ** Requires the Console plugin and the InfoViewer plugin
- * ** ALSO
- * ** Requires Downloading of the different doclets if you are going to use
- * them and pdfReaderCommand if using the pdfDoclet.
- * ***********************************************************************
- * ** Features
- * ***********************************************************************
- *
- * - most of the settings to customize how this macro performs are set with
- * boolean flags (see code below). The following features are some of the
- * features already selectable/customizable
- *
- * - javadoc of current buffer OR current buffer's package
- * set the 'doFullPackage' boolean flag in the macro code
- * You can then save a copy of this macro as a different name
- * for example... Preview_JavaDoc_Of_Current_Buffers_Package.bsh
- *
- * - default Doclet is the standard Java Doclet
- * (the user can change the default doclet to use by changing the XXXX
- * variable in this macro)
- *
- * - When this macro starts, a doclet choice dialog is presented.
- * this dialog can be bypassed by setting 'showDocletDialog' to false
- * see the code below
- *
- * - Many of the standard Doclet commandline parms are preset with some
- * defaults... header, footer etc.
- * They are all controlled via boolean flags in the code
- * Switch them on/off as you like.
- *
- * - Includes the ability to use 'user selectable' doclets
- * The following are already built in. (you just have to go get the doclet)
- * > the DocBook doclet - dbdoclet http://www.michael-a-fuchs.de
- * > the Bouvard Doclet - http://web.tiscali.it/no-redirect-tiscali/farello/bp/intro.html
- * > the XMLDoclet - http://
- * > the pdfdoclet (Java API to PDF) - http://sourceforge.net/projects/pdfdoclet
- * > others
- *
- * - easy selection of output dir (defaults to system temp dir)
- * set with the 'outputDir' var in the macro code
- *
- * - other standard doclets parameters have been supervised by variables.
- * see below for adding extra classpath, source path, title, header, footer
- * MORE below
- *
- * ************************************************************************
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
- */
-
-//{{{ _getClassName() method
-String _getClassName()
-{
- /*
- * Get_Class_Name.bsh - a BeanShell macro script for the
- * jEdit text editor - gets class name from buffer name
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Preview_JavaDoc_Of_Current_Buffer.bsh 10711 2007-09-22 09:12:15Z kpouer $
- */
- name = buffer.getName();
- index = name.lastIndexOf('.');
- return (index != -1 ? name.substring(0, index) : name);
-} //}}}
-
-//{{{ _determinePackageName() method
-/** Trys to obtain the package name from the file **/
-String _determinePackageName()
-{
- packageName = "";
- text = buffer.getText(0, buffer.getLength());
- //String lineSep = System.getProperty("line.separator");
- /* look for the word package.
- It must be at the start of a line.
- It should not be within comments. (how can we easily determine this???)
- */
- packageWord = text.indexOf("package");
- // If it is not on the first line of the file
- // then look for the 1st occurence of "package" on its own line
- if (packageWord > 0)
- packageWord = text.indexOf("\npackage");
-
- if (packageWord != -1)
- {
- packageEOLine = text.indexOf(";", packageWord);
- if (packageEOLine!= -1)
- packageName = text.substring(packageWord+8,packageEOLine);
- }
- return packageName;
-} //}}}
-
-//{{{ _chooseADir() method
-/** Chooses a directory and returns the path. **/
-/* Use this method if you want to customize the macro to choose
- output and input directorys for things */
-String _chooseADir(String dialogTitle, String startDir)
-{
- String retVal = "";
- JFileChooser chooser = new JFileChooser(startDir);
- chooser.setDialogTitle(dialogTitle);
- chooser.setMultiSelectionEnabled(false);
- chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
- if(chooser.showDialog(view, "Okay") == JFileChooser.APPROVE_OPTION)
- {
- retVal = chooser.getSelectedFile().getAbsolutePath();
- }
- return retVal;
-} //}}}
-
-//{{{ _infoView() method
-void _infoView(View view, String urlStr)
-{
- // first, check if the plugin is installed.
- boolean version1 = false;
- //With version 1.0 of the plugin ... the name changed to
- //infoviewer.InfoViewerPlugin
- if(jEdit.getPlugin("InfoViewerPlugin") == null)
- {
- if(jEdit.getPlugin("infoviewer.InfoViewerPlugin") == null)
- {
- Macros.error(view,"You must install the InfoViewerPlugin"
- + " to use this macro.");
- return;
- }
- version1 = true;
- }
- try
- {
- // API change with version 1.0 of the InfoViewer
- if (version1)
- jEdit.getPlugin("infoviewer.InfoViewerPlugin").
- openURL(view, urlStr);// version 1.0
- else
- jEdit.getPlugin("InfoViewerPlugin").
- sendURL(new URL(urlStr), view); // pre 1.0
- }
- catch (MalformedURLException mu)
- {
- Macros.error(view,"Cannot find the url " + urlStr);
- }
-} //}}}
-
-//{{{ _returnSystemCommand() method
-String _returnSystemCommand(View view, String command)
-{
- //{{{ first, check if the plugin is installed.
- if(jEdit.getPlugin("console.ConsolePlugin") == null)
- {
- Macros.error(view,"You must install the Console plugin"
- + " to use this macro.");
- return;
- } //}}}
-
- //Macros.message(view, "Getting window manager.");
- manager = view.getDockableWindowManager();
- _console = (console.Console) manager.getDockable("console");
- if (_console == null)
- {
- manager.showDockableWindow("console");
- _console = (console.Console) manager.getDockable("console");
- }
- outputPane = _console.getOutputPane();
-
- text = outputPane.getText();
- textLength = text.length();
- runInSystemShell(view, command);
- waitForConsole(view);
- text = outputPane.getText();
- textLength = text.length();
- text = outputPane.getText().substring(textLength);
- return text;
-} //}}}
-
-//{{{ _ensureFolderExists() method
-/**
- * Ensures that a folder exists.
- * <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="2">
- * <TR><TD COLSPAN="2">
- * <H2>Ensures that a folder exists</H2>
- * </TD></TR>
- *
- * <TR><TD COLSPAN="2"> <BR>
- * <B>Description:</B><BR>
- * use it like this:
- * <br> _ensureFolderExists(new File(fileName).getParentFile());
- * </TD></TR>
- * </TABLE>
- *
- * @param folder The File object to check.
- **/
-void _ensureFolderExists(File folder)
-{
- if ( folder != null && ! folder.exists() )
- {
- _ensureFolderExists(folder.getParentFile());
- folder.mkdir();
- }
-} //}}}
-
-
-String versionStr = "1.8";
-String SYSTEM_FILE_SEPERATOR = File.separator;
-String SYSTEM_TEMP_DIR = System.getProperty("java.io.tmpdir");
-//SYSTEM_TEMP_DIR = "/tmp";
-String SYSTEM_PATH_SEPERATOR = System.getProperty("path.separator");
-
-// first, check if the plugin is installed.
-if(jEdit.getPlugin("console.ConsolePlugin") == null ||
- (jEdit.getPlugin("InfoViewerPlugin") == null) &&
- (jEdit.getPlugin("infoviewer.InfoViewerPlugin") == null))
-{
- if(jEdit.getPlugin("console.ConsolePlugin") == null)
- Macros.error(view,"You must install the Console plugin"
- + " to use this macro.");
- else
- Macros.error(view,"You must install the InfoViewerPlugin plugin"
- + " to use this macro.");
-}
-else
-{
-
- String currBufferPath = buffer.getPath();
-
- //Macros.message(view,"Current Buffer Path:\n"+currBufferPath);
- if (currBufferPath.endsWith(".java"))
- {
- /* Store Some class/package/path info for use later */
- // Get the Package name
- String packName = _determinePackageName();
-
- // Get the Class Name
- String className = _getClassName();
-
- /* ********************************************************************** */
- /* Change the Following Vars to personalize things */
- /* You should also Change the Header and Botton javadoc text down below */
- /* ********************************************************************** */
- // header message
- String yourProductUrlStr = "http://www.yourProductURL.goes.here";
- String yourProductNameStr = "My Java Product Name";
-
- // header message
- String yourBottomStr = "Released under a GNU Public License.";
-
- // PDFDoclet outputfilename
- String pdfDocletOutputFilename = "PDFDoclet.Output.pdf";
-
- // PDFDoclet outputfilename
- String pdfReaderCommand = "acro";
-
- // Output directory .... set this to somewhere permanent if you want
- String outputDir = SYSTEM_TEMP_DIR;
-
- // Allow choice of the output dir at runtime
- boolean chooseOutputDir = false;
-
- // This macro attempts to get the source search path right
- // if its not getting it... this var gets added to the Javadoc search path
- String extraSourceDir = "";
-
- // This macro doesn't do much with the javadoc classpath
- // if its not getting it... this var gets added to the Javadoc classpath
- String extraClassesDir = "";
-
- // flag to do the Javadoc on the package instead of just the file
- // Set this to true then save this macro with a new name
- // ie... Preview_Javadoc_Of_Current_Package.bsh
- boolean doFullPackage = false;
-
- // set to false to default to the standard java doclet
- boolean showDocletDialog = true;
-
- /* Set some default options for the javadoc command */
- /* change these to suit how you like your output to show up */
- /* better yet... make a little dialog for input at runtime */
- int showOnlyLevel = 3; // protected is the default
- String[] showOnlyStr = {"-public ","-protected ","-package ","-private"};
-
- /* some (not All) standard doclet options */
- /* ************************************** */
- // if you want one of the following options...
- // set the corresponding flag to true
- boolean[] optionFlags = {false,false,false,false,false,
- false,false,false,false};
- String[] optionStrs = {"-use ","-version ","-author ","-nosince","-notree ",
- "-noindex ","-nohelp ","-nodeprecated ","-verbose"};
-
- // beware OS/2 users...
- // ALL the following options break the IBM 1.3.0 JDK Javadoc tool
- // don't ask me?
- boolean addWindowTitle = true;
- StringBuffer windowTitle = new StringBuffer("-windowtitle \"Javadoc for");
- windowTitle.append((doFullPackage?"package ":"class "));
- windowTitle.append(className);
- windowTitle.append("\" ");
-
- /* DocTitle Text */
- boolean addDocTitle = true;
- StringBuffer docTitle = new StringBuffer("-doctitle \"");
- docTitle.append("Your Document Title here Javadoc API");
- docTitle.append("\" ");
-
- /* Header Text */
- boolean addHeader = true;
- StringBuffer header = new StringBuffer("-header \"");
- header.append("<B><A href=\"");
- header.append(yourProductUrlStr);
- header.append("\">");
- header.append(yourProductNameStr);
- header.append("</A></B>");
- header.append("<BR>Version xx.xx.xx");
- // Format the current time.
- java.text.SimpleDateFormat formatter
- = new java.text.SimpleDateFormat ("yyyy.MMMMM.dd 'at' hh:mm:sszzz");
- java.util.Date currentTime_1 = new java.util.Date();
- String dateString = formatter.format(currentTime_1);
- header.append("<BR><font size=-1>");
- header.append(dateString);
- header.append("</font>\" ");
-
- /* Footer Text */
- boolean addFooter = true;
- StringBuffer footer = new StringBuffer("-footer \"");
- footer.append("Produced Using the <A href=\"http://www.jedit.org\">");
- footer.append("jEdit</A><BR>Preview Javadoc Beanshell Macro.<BR>");
- footer.append("Copyright © 2001-2003, ");
- footer.append("<A href=\"http://www.webarts.bc.ca>\"");
- footer.append("Tom B. Gutwin</A>");
- footer.append("\" ");
-
- /* Bottom Text */
- boolean addBottom = true;
- StringBuffer bottom = new StringBuffer("-bottom \"");
- bottom.append(yourBottomStr);
- bottom.append("\" ");
-
- /*********************************************************************** */
- /* All users setting now complete */
- /*********************************************************************** */
-
-
- // Store the directory where the buffer file lives
- String savedBufferdir = currBufferPath.substring(0,
- currBufferPath.length()-6-className.length());
-
- // build the full package.classname
- StringBuffer fullClassName = new StringBuffer();
- if (packName != null && !packName.equals(""))
- {
- fullClassName.append(packName);
- fullClassName.append(".");
- }
- fullClassName.append(className);
-
- /* Javadoc needs the file to live in a directory structure */
- /* named like its Package name */
- // If needed... copy the file to the temp dir into its package dir */
- String currBufferdir = savedBufferdir;
- StringBuffer tmpBufferName = new StringBuffer(SYSTEM_TEMP_DIR);
- if (packName != null && !packName.equals("") &&
- savedBufferdir.indexOf(
- packName.replace('.',File.separatorChar).trim()) == -1 )
- {
- // The buffer file is not in an appropriate named dir
- // copy and work on it in temp
- if (!SYSTEM_TEMP_DIR.endsWith(SYSTEM_FILE_SEPERATOR))
- tmpBufferName.append(SYSTEM_FILE_SEPERATOR);
- _ensureFolderExists(new File(tmpBufferName.toString() +
- packName.replace('.', File.separatorChar).trim()));
- tmpBufferName.append(fullClassName.toString().
- replace('.', File.separatorChar).trim());
- tmpBufferName.append(".java");
- //Macros.message(view, "Saving "+tmpBufferName.toString());
- buffer.save(view, tmpBufferName.toString(), false);
-
- // the rest of the macro uses the currBufferdir variable
- currBufferPath = tmpBufferName.toString();
- currBufferdir = currBufferPath.substring(0,
- currBufferPath.length()-6-className.length());
- }
-
- // some debug statements
- //Macros.message(view,"Package Name ="+packName);
- //Macros.message(view,"fullClassName ="+fullClassName);
- //Macros.message(view,"Buffer Path ="+currBufferPath);
- //Macros.message(view,"Buffer Dir ="+currBufferdir);
-
-
- /* ************************************************* */
- /* *********** On with the Processing ************* */
- Object[] options = { "Standard Java Doclet", "Bouvard Doclet",
- "DocBook Doclet", "XML Doclet", "PDF Doclet" };
- String[] docletClassName = { "", "bp.doclet.Bouvard",
- "com.mf.doclet.docbook.DocBookDoclet",
- "codeinsight.xmldoclet.XMLDoclet",
- "com.tarsec.javadoc.pdfdoclet.PDFDoclet"};
- String[] docletClassPath = { "", "Bouvard.jar", "dbdoclet.jar",
- "xmldoclet.jar",
- "pdfdoclet.jar:itext.jar:/usr/lib/pkgs" };
- String PDFDocletConfigPropertiesFile = "pdfdoclet.config.properties";
- // Set the DEFAULT Doclet to the JavaDoclet
- String proceed = options[0];
-
- /* Shows a Doclet Selection Dialog */
- if (showDocletDialog)
- proceed = JOptionPane.showInputDialog(view,
- "Choose the Doclet to use for previewing the"+
- "\n" + className + " JavaDocs."+
- "\n(Bypass this dialog... set "+
- "'showDocletDialog=false;' in the macro)",
- "JavaDoc Buffer Macro - version "+versionStr,
- JOptionPane.QUESTION_MESSAGE, null, options,
- options[0]);
-
- if (proceed != null)
- {
- // this is where you could use the _chooseADir(String startDir) method
- // to choose an output dir at runtime.
- if (chooseOutputDir)
- outputDir = _chooseADir("Please Choose an Output Directory.",outputDir);
-
- docletChoice = 0;
- for (int choiceNum = 0; choiceNum < options.length;choiceNum++)
- {
- if (((String)proceed).equals((String)options[choiceNum]))
- {
- docletChoice = choiceNum;
- choiceNum = options.length;
- }
- }
-
- // The currBufferSrcDir expects the current buffer to be in a subDirectory
- // path the same as the package name
- // THIS is definitely NOT always the case
- String currBufferSrcDir = currBufferPath.substring(0,
- currBufferPath.length()-fullClassName.toString().length()-5);
-
- if(outputDir != null && !outputDir.equals(""))
- {
- // you might need some of the follwing if you want to add some
- // commandline parms
- String jedit_userdir=System.getProperty("user.home") +
- SYSTEM_FILE_SEPERATOR +".jedit";
- String jedit_homedir=jEdit.getJEditHome();
- String currClassPath=System.getProperty("java.class.path");
- String java_home=System.getProperty("java.home");
-
- // Construct the command which will be executed
- StringBuilder command = new StringBuilder(java_home);
- if (java_home.toLowerCase().endsWith("jre"))
- command.append(File.separator).append("..");
- command.append(File.separator).append("bin");
- command.append(File.separator).append("javadoc ");
-
- if (!((String)proceed).equals((String)options[0]))
- {
- //{{{ general parms for 'other' doclets
- command.append("-doclet \"");
- command.append(docletClassName[docletChoice]);
- command.append("\" ");
- command.append("-docletpath \"");
- command.append(jedit_userdir);
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("jars");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append(docletClassPath[docletChoice]);
- command.append("\" ");
- //}}}
-
- //{{{ Bouvard Doclet
- // This assumes the Bouvard.jar already exists
- // in the jeditUser/jars dir
- if (((String)proceed).equals((String)options[1]))
- {
- /* Specify the output dir */
- command.append("-d \"");
- command.append(outputDir);
- command.append("\" ");
- } //}}}
-
- //{{{ the DocBookDoclet has an extra parm
- if (((String)proceed).equals((String)options[2]))
- {
- command.append("-properties \"");
- command.append(jedit_userdir);
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("macros");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("Java");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("dbdoclet-xml.properties\" ");
- } //}}}
-
- //{{{ the XMLDoclet has an extra parm
- if (((String)proceed).equals((String)options[3]))
- {
- /* Specify the output dir */
- //command.append("-d \"");
- //command.append(outputDir);
- //command.append("\" ");
- } //}}}
-
- //{{{ the PDFDoclet has an extra parm
- if (((String)proceed).equals((String)options[4]))
- {
- command.append("-pdf \"");
- command.append(outputDir);
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append(pdfDocletOutputFilename);
- command.append("\" ");
- if (PDFDocletConfigPropertiesFile != null
- &&!PDFDocletConfigPropertiesFile.equals(""))
- {
- command.append(" -workdir \"");
- command.append(outputDir);
- command.append("\" ");
- command.append("-config \"");
- command.append(jedit_userdir);
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("macros");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("Java");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append(PDFDocletConfigPropertiesFile);
- command.append("\"");
- }
- } //}}}
-
- }
- else
- {
- //{{{ standard doclet parms
- if (addWindowTitle)
- command.append(windowTitle.toString());
- if (addDocTitle)
- command.append(docTitle.toString());
- if (addHeader)
- command.append(header.toString());
- if (addFooter)
- command.append(footer.toString());
- if (addBottom)
- command.append(bottom.toString());
-
- /* add the on/off options */
- for (int opt = 0; opt <optionFlags.length; opt++)
- {
- if (optionFlags[opt])
- command.append(optionStrs[opt]);
- }
-
- /* Specify the output dir */
- command.append("-d \"");
- command.append(outputDir);
- command.append("\" ");
-
- //}}}
-
- }
-
- /* Set the Level of detail to show */
- command.append(" ");
- command.append(showOnlyStr[showOnlyLevel]);
-
- //{{{ if not found add your source dir to the 'extraClassesdir' var
- command.append(" -classpath \"");
- command.append(SYSTEM_TEMP_DIR);
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(System.getProperty("java.class.path"));
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(extraClassesDir);
- command.append("\" ");
- //}}}
-
- /* **** Done with the options ***** */
- /* Specify the package or file name */
- if (doFullPackage && packName != null && !packName.equals(""))
- {
- /* Guess where the package source is located */
- /* if not found... add your source dir to the 'extraSourcedir' var */
- command.append("-sourcepath \"");
- command.append(savedBufferdir);
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(currBufferSrcDir);
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(currBufferSrcDir);
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(currBufferSrcDir);
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(currBufferSrcDir);
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(currBufferSrcDir);
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_FILE_SEPERATOR);
- command.append("..");
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(currBufferdir);
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(extraSourceDir);
- command.append("\" ");
-
- command.append(packName);
- }
- else
- {
- //{{{ add the base sourcepath
- command.append("-sourcepath \"");
- command.append(savedBufferdir);
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(currBufferSrcDir);
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(currBufferdir);
- command.append(SYSTEM_PATH_SEPERATOR);
- command.append(extraSourceDir);
- command.append("\" ");
- //}}}
-
- //{{{ now add the file to javadoc
- command.append("\"");
- command.append(currBufferPath);
- command.append("\"");
- //}}}
-
- }
-System.out.println("****************************************************************");
-System.out.println(command.toString());
-System.out.println("****************************************************************");
- retVal = _returnSystemCommand(view, command.toString());
- if (retVal.indexOf("error") == -1)
- {
-
- // Build the url for the Viewer
- // If you don't want to use the InfoViewer plugin...
- // easy, change the implementation in this macros _infoView method
- StringBuffer urlStr = new StringBuffer();
- urlStr.append("file:///");
- urlStr.append(outputDir.replace('\\', '/').trim());
- if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
- urlStr.append("/");
- if (doFullPackage)
- {
- urlStr.append("index.html");
- }
- else
- {
- if (packName != null && !packName.equals(""))
- {
- urlStr.append(packName.replace('.', '/').trim());
- urlStr.append("/");
- }
- //Macros.message(view, packName);
- urlStr.append(className);
- urlStr.append(".html");
- //Macros.message(view, urlStr.toString());
- }
-
- // now which viewer (standard or Pecuchet)
- if (!showDocletDialog || ((String)proceed).equals((String)options[0]))
- _infoView(view, urlStr.toString());
-
- else if (((String)proceed).equals((String)options[1]))
- {
- // Bouvard Browser
- // This assumes the Pecuchet.jar already exists
- // and xerces is in the classpath already
- StringBuffer classPath = new StringBuffer("\"");
- classPath.append(jedit_userdir);
- classPath.append(SYSTEM_FILE_SEPERATOR);
- classPath.append("jars");
- classPath.append(SYSTEM_FILE_SEPERATOR);
- classPath.append("Pecuchet.jar");
- classPath.append(SYSTEM_PATH_SEPERATOR);
- classPath.append(jedit_homedir);
- classPath.append(SYSTEM_FILE_SEPERATOR);
- classPath.append("jars");
- classPath.append(SYSTEM_FILE_SEPERATOR);
- classPath.append("Pecuchet.jar");
- classPath.append(SYSTEM_PATH_SEPERATOR);
- classPath.append(currClassPath);
- classPath.append("\"");
-
- StringBuffer bViewerCommand = new StringBuffer("java -classpath ");
- bViewerCommand.append(classPath);
- bViewerCommand.append(" ");
- bViewerCommand.append("-Dorg.xml.sax.driver=");
- bViewerCommand.append("org.apache.xerces.parsers.SAXParser");
- bViewerCommand.append(" ");
- bViewerCommand.append("bp.app.Main ");
- bViewerCommand.append(outputDir);
- if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
- bViewerCommand.append(SYSTEM_FILE_SEPERATOR);
- bViewerCommand.append("data.bou &");
- retVal = _returnSystemCommand(view, bViewerCommand.toString());
- StringBuffer macroMessage =
- new StringBuffer("When the Pecuchet browser starts.\n");
- macroMessage.append("Open file: ");
- macroMessage.append(outputDir);
- if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
- macroMessage.append(SYSTEM_FILE_SEPERATOR);
- macroMessage.append("data.bou");
- //Macros.message(view, macroMessage.toString());
- }
- else if (((String)proceed).equals((String)options[2]))
- {
- // XML Doclet
- // Use a new jEdit Buffer
- StringBuffer newFile = new StringBuffer(outputDir);
- if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
- newFile.append(SYSTEM_FILE_SEPERATOR);
- newFile.append("Reference.xml");
- Buffer newTmpBuffer = jEdit.openFile(view,newFile.toString());
- }
- else if (((String)proceed).equals((String)options[3]))
- {
- // XML Doclet
- // Use a new jEdit Buffer
- StringBuffer newFile = new StringBuffer(outputDir);
- if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
- newFile.append(SYSTEM_FILE_SEPERATOR);
- newFile.append("output.xml");
- Buffer newTmpBuffer = jEdit.openFile(view,newFile.toString());
- }
- else if (((String)proceed).equals((String)options[4]))
- {
- // pdf Doclet
- StringBuffer pdfViewerCommand = new StringBuffer(pdfReaderCommand);
- pdfViewerCommand.append(" ");
- pdfViewerCommand.append(outputDir);
- pdfViewerCommand.append(SYSTEM_FILE_SEPERATOR);
- pdfViewerCommand.append(pdfDocletOutputFilename);
- retVal = _returnSystemCommand(view, pdfViewerCommand.toString());
- }
- else
- {
- // put the viewers for other doclets here
- }
- }
- else
- Macros.error(view, "Javadoc did NOT complete successfully. " +
- "See the console output");
- }
- }
- }
- else
- Macros.error(view, "Current Buffer does NOT appear to be a Java File");
-}
-
-/*
-
-Macro index data (in DocBook format)
-
- <listitem>
- <para><filename>Preview_Javadoc_of_Buffer.bsh</filename></para>
- <abstract><para>
- Create and display API documentation for the current buffer.
- </para></abstract>
- <para>
- The macro includes various configuration variables you can change; see the comment at the beginning of the macro source for details.
- </para>
- </listitem>
-
-*/
-
-// end Preview_JavaDoc_of_Buffer.bsh
-
+/*
+ * Preview_JavaDoc_Of_Current_Buffer.bsh
+ * version 1.8
+ * A BeanShell macro script for the jEdit text editor
+ * :tabSize=2:indentSize=2:noTabs=true:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * $Header$
+ * Copyright (C) 2001-2003 Tom Gutwin
+ * tgutwin at webarts.bc.ca
+ *
+ * - Macro to create and preview the JavaDocs for the current buffer
+ * - It tries to figure everything out for you.
+ * - Map this macro to it to a button on the button bar and away you go!
+ *
+ * ************************************************************************
+ * ** Requires the Console plugin and the InfoViewer plugin
+ * ** ALSO
+ * ** Requires Downloading of the different doclets if you are going to use
+ * them and pdfReaderCommand if using the pdfDoclet.
+ * ***********************************************************************
+ * ** Features
+ * ***********************************************************************
+ *
+ * - most of the settings to customize how this macro performs are set with
+ * boolean flags (see code below). The following features are some of the
+ * features already selectable/customizable
+ *
+ * - javadoc of current buffer OR current buffer's package
+ * set the 'doFullPackage' boolean flag in the macro code
+ * You can then save a copy of this macro as a different name
+ * for example... Preview_JavaDoc_Of_Current_Buffers_Package.bsh
+ *
+ * - default Doclet is the standard Java Doclet
+ * (the user can change the default doclet to use by changing the XXXX
+ * variable in this macro)
+ *
+ * - When this macro starts, a doclet choice dialog is presented.
+ * this dialog can be bypassed by setting 'showDocletDialog' to false
+ * see the code below
+ *
+ * - Many of the standard Doclet commandline parms are preset with some
+ * defaults... header, footer etc.
+ * They are all controlled via boolean flags in the code
+ * Switch them on/off as you like.
+ *
+ * - Includes the ability to use 'user selectable' doclets
+ * The following are already built in. (you just have to go get the doclet)
+ * > the DocBook doclet - dbdoclet http://www.michael-a-fuchs.de
+ * > the Bouvard Doclet - http://web.tiscali.it/no-redirect-tiscali/farello/bp/intro.html
+ * > the XMLDoclet - http://
+ * > the pdfdoclet (Java API to PDF) - http://sourceforge.net/projects/pdfdoclet
+ * > others
+ *
+ * - easy selection of output dir (defaults to system temp dir)
+ * set with the 'outputDir' var in the macro code
+ *
+ * - other standard doclets parameters have been supervised by variables.
+ * see below for adding extra classpath, source path, title, header, footer
+ * MORE below
+ *
+ * ************************************************************************
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA.
+ */
+
+//{{{ _getClassName() method
+String _getClassName()
+{
+ /*
+ * Get_Class_Name.bsh - a BeanShell macro script for the
+ * jEdit text editor - gets class name from buffer name
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Preview_JavaDoc_Of_Current_Buffer.bsh 10711 2007-09-22 09:12:15Z kpouer $
+ */
+ name = buffer.getName();
+ index = name.lastIndexOf('.');
+ return (index != -1 ? name.substring(0, index) : name);
+} //}}}
+
+//{{{ _determinePackageName() method
+/** Trys to obtain the package name from the file **/
+String _determinePackageName()
+{
+ packageName = "";
+ text = buffer.getText(0, buffer.getLength());
+ //String lineSep = System.getProperty("line.separator");
+ /* look for the word package.
+ It must be at the start of a line.
+ It should not be within comments. (how can we easily determine this???)
+ */
+ packageWord = text.indexOf("package");
+ // If it is not on the first line of the file
+ // then look for the 1st occurence of "package" on its own line
+ if (packageWord > 0)
+ packageWord = text.indexOf("\npackage");
+
+ if (packageWord != -1)
+ {
+ packageEOLine = text.indexOf(";", packageWord);
+ if (packageEOLine!= -1)
+ packageName = text.substring(packageWord+8,packageEOLine);
+ }
+ return packageName;
+} //}}}
+
+//{{{ _chooseADir() method
+/** Chooses a directory and returns the path. **/
+/* Use this method if you want to customize the macro to choose
+ output and input directorys for things */
+String _chooseADir(String dialogTitle, String startDir)
+{
+ String retVal = "";
+ JFileChooser chooser = new JFileChooser(startDir);
+ chooser.setDialogTitle(dialogTitle);
+ chooser.setMultiSelectionEnabled(false);
+ chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ if(chooser.showDialog(view, "Okay") == JFileChooser.APPROVE_OPTION)
+ {
+ retVal = chooser.getSelectedFile().getAbsolutePath();
+ }
+ return retVal;
+} //}}}
+
+//{{{ _infoView() method
+void _infoView(View view, String urlStr)
+{
+ // first, check if the plugin is installed.
+ boolean version1 = false;
+ //With version 1.0 of the plugin ... the name changed to
+ //infoviewer.InfoViewerPlugin
+ if(jEdit.getPlugin("InfoViewerPlugin") == null)
+ {
+ if(jEdit.getPlugin("infoviewer.InfoViewerPlugin") == null)
+ {
+ Macros.error(view,"You must install the InfoViewerPlugin"
+ + " to use this macro.");
+ return;
+ }
+ version1 = true;
+ }
+ try
+ {
+ // API change with version 1.0 of the InfoViewer
+ if (version1)
+ jEdit.getPlugin("infoviewer.InfoViewerPlugin").
+ openURL(view, urlStr);// version 1.0
+ else
+ jEdit.getPlugin("InfoViewerPlugin").
+ sendURL(new URL(urlStr), view); // pre 1.0
+ }
+ catch (MalformedURLException mu)
+ {
+ Macros.error(view,"Cannot find the url " + urlStr);
+ }
+} //}}}
+
+//{{{ _returnSystemCommand() method
+String _returnSystemCommand(View view, String command)
+{
+ //{{{ first, check if the plugin is installed.
+ if(jEdit.getPlugin("console.ConsolePlugin") == null)
+ {
+ Macros.error(view,"You must install the Console plugin"
+ + " to use this macro.");
+ return;
+ } //}}}
+
+ //Macros.message(view, "Getting window manager.");
+ manager = view.getDockableWindowManager();
+ _console = (console.Console) manager.getDockable("console");
+ if (_console == null)
+ {
+ manager.showDockableWindow("console");
+ _console = (console.Console) manager.getDockable("console");
+ }
+ outputPane = _console.getOutputPane();
+
+ text = outputPane.getText();
+ textLength = text.length();
+ runInSystemShell(view, command);
+ waitForConsole(view);
+ text = outputPane.getText();
+ textLength = text.length();
+ text = outputPane.getText().substring(textLength);
+ return text;
+} //}}}
+
+//{{{ _ensureFolderExists() method
+/**
+ * Ensures that a folder exists.
+ * <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="2">
+ * <TR><TD COLSPAN="2">
+ * <H2>Ensures that a folder exists</H2>
+ * </TD></TR>
+ *
+ * <TR><TD COLSPAN="2"> <BR>
+ * <B>Description:</B><BR>
+ * use it like this:
+ * <br> _ensureFolderExists(new File(fileName).getParentFile());
+ * </TD></TR>
+ * </TABLE>
+ *
+ * @param folder The File object to check.
+ **/
+void _ensureFolderExists(File folder)
+{
+ if ( folder != null && ! folder.exists() )
+ {
+ _ensureFolderExists(folder.getParentFile());
+ folder.mkdir();
+ }
+} //}}}
+
+
+String versionStr = "1.8";
+String SYSTEM_FILE_SEPERATOR = File.separator;
+String SYSTEM_TEMP_DIR = System.getProperty("java.io.tmpdir");
+//SYSTEM_TEMP_DIR = "/tmp";
+String SYSTEM_PATH_SEPERATOR = System.getProperty("path.separator");
+
+// first, check if the plugin is installed.
+if(jEdit.getPlugin("console.ConsolePlugin") == null ||
+ (jEdit.getPlugin("InfoViewerPlugin") == null) &&
+ (jEdit.getPlugin("infoviewer.InfoViewerPlugin") == null))
+{
+ if(jEdit.getPlugin("console.ConsolePlugin") == null)
+ Macros.error(view,"You must install the Console plugin"
+ + " to use this macro.");
+ else
+ Macros.error(view,"You must install the InfoViewerPlugin plugin"
+ + " to use this macro.");
+}
+else
+{
+
+ String currBufferPath = buffer.getPath();
+
+ //Macros.message(view,"Current Buffer Path:\n"+currBufferPath);
+ if (currBufferPath.endsWith(".java"))
+ {
+ /* Store Some class/package/path info for use later */
+ // Get the Package name
+ String packName = _determinePackageName();
+
+ // Get the Class Name
+ String className = _getClassName();
+
+ /* ********************************************************************** */
+ /* Change the Following Vars to personalize things */
+ /* You should also Change the Header and Botton javadoc text down below */
+ /* ********************************************************************** */
+ // header message
+ String yourProductUrlStr = "http://www.yourProductURL.goes.here";
+ String yourProductNameStr = "My Java Product Name";
+
+ // header message
+ String yourBottomStr = "Released under a GNU Public License.";
+
+ // PDFDoclet outputfilename
+ String pdfDocletOutputFilename = "PDFDoclet.Output.pdf";
+
+ // PDFDoclet outputfilename
+ String pdfReaderCommand = "acro";
+
+ // Output directory .... set this to somewhere permanent if you want
+ String outputDir = SYSTEM_TEMP_DIR;
+
+ // Allow choice of the output dir at runtime
+ boolean chooseOutputDir = false;
+
+ // This macro attempts to get the source search path right
+ // if its not getting it... this var gets added to the Javadoc search path
+ String extraSourceDir = "";
+
+ // This macro doesn't do much with the javadoc classpath
+ // if its not getting it... this var gets added to the Javadoc classpath
+ String extraClassesDir = "";
+
+ // flag to do the Javadoc on the package instead of just the file
+ // Set this to true then save this macro with a new name
+ // ie... Preview_Javadoc_Of_Current_Package.bsh
+ boolean doFullPackage = false;
+
+ // set to false to default to the standard java doclet
+ boolean showDocletDialog = true;
+
+ /* Set some default options for the javadoc command */
+ /* change these to suit how you like your output to show up */
+ /* better yet... make a little dialog for input at runtime */
+ int showOnlyLevel = 3; // protected is the default
+ String[] showOnlyStr = {"-public ","-protected ","-package ","-private"};
+
+ /* some (not All) standard doclet options */
+ /* ************************************** */
+ // if you want one of the following options...
+ // set the corresponding flag to true
+ boolean[] optionFlags = {false,false,false,false,false,
+ false,false,false,false};
+ String[] optionStrs = {"-use ","-version ","-author ","-nosince","-notree ",
+ "-noindex ","-nohelp ","-nodeprecated ","-verbose"};
+
+ // beware OS/2 users...
+ // ALL the following options break the IBM 1.3.0 JDK Javadoc tool
+ // don't ask me?
+ boolean addWindowTitle = true;
+ StringBuffer windowTitle = new StringBuffer("-windowtitle \"Javadoc for");
+ windowTitle.append((doFullPackage?"package ":"class "));
+ windowTitle.append(className);
+ windowTitle.append("\" ");
+
+ /* DocTitle Text */
+ boolean addDocTitle = true;
+ StringBuffer docTitle = new StringBuffer("-doctitle \"");
+ docTitle.append("Your Document Title here Javadoc API");
+ docTitle.append("\" ");
+
+ /* Header Text */
+ boolean addHeader = true;
+ StringBuffer header = new StringBuffer("-header \"");
+ header.append("<B><A href=\"");
+ header.append(yourProductUrlStr);
+ header.append("\">");
+ header.append(yourProductNameStr);
+ header.append("</A></B>");
+ header.append("<BR>Version xx.xx.xx");
+ // Format the current time.
+ java.text.SimpleDateFormat formatter
+ = new java.text.SimpleDateFormat ("yyyy.MMMMM.dd 'at' hh:mm:sszzz");
+ java.util.Date currentTime_1 = new java.util.Date();
+ String dateString = formatter.format(currentTime_1);
+ header.append("<BR><font size=-1>");
+ header.append(dateString);
+ header.append("</font>\" ");
+
+ /* Footer Text */
+ boolean addFooter = true;
+ StringBuffer footer = new StringBuffer("-footer \"");
+ footer.append("Produced Using the <A href=\"http://www.jedit.org\">");
+ footer.append("jEdit</A><BR>Preview Javadoc Beanshell Macro.<BR>");
+ footer.append("Copyright © 2001-2003, ");
+ footer.append("<A href=\"http://www.webarts.bc.ca>\"");
+ footer.append("Tom B. Gutwin</A>");
+ footer.append("\" ");
+
+ /* Bottom Text */
+ boolean addBottom = true;
+ StringBuffer bottom = new StringBuffer("-bottom \"");
+ bottom.append(yourBottomStr);
+ bottom.append("\" ");
+
+ /*********************************************************************** */
+ /* All users setting now complete */
+ /*********************************************************************** */
+
+
+ // Store the directory where the buffer file lives
+ String savedBufferdir = currBufferPath.substring(0,
+ currBufferPath.length()-6-className.length());
+
+ // build the full package.classname
+ StringBuffer fullClassName = new StringBuffer();
+ if (packName != null && !packName.equals(""))
+ {
+ fullClassName.append(packName);
+ fullClassName.append(".");
+ }
+ fullClassName.append(className);
+
+ /* Javadoc needs the file to live in a directory structure */
+ /* named like its Package name */
+ // If needed... copy the file to the temp dir into its package dir */
+ String currBufferdir = savedBufferdir;
+ StringBuffer tmpBufferName = new StringBuffer(SYSTEM_TEMP_DIR);
+ if (packName != null && !packName.equals("") &&
+ savedBufferdir.indexOf(
+ packName.replace('.',File.separatorChar).trim()) == -1 )
+ {
+ // The buffer file is not in an appropriate named dir
+ // copy and work on it in temp
+ if (!SYSTEM_TEMP_DIR.endsWith(SYSTEM_FILE_SEPERATOR))
+ tmpBufferName.append(SYSTEM_FILE_SEPERATOR);
+ _ensureFolderExists(new File(tmpBufferName.toString() +
+ packName.replace('.', File.separatorChar).trim()));
+ tmpBufferName.append(fullClassName.toString().
+ replace('.', File.separatorChar).trim());
+ tmpBufferName.append(".java");
+ //Macros.message(view, "Saving "+tmpBufferName.toString());
+ buffer.save(view, tmpBufferName.toString(), false);
+
+ // the rest of the macro uses the currBufferdir variable
+ currBufferPath = tmpBufferName.toString();
+ currBufferdir = currBufferPath.substring(0,
+ currBufferPath.length()-6-className.length());
+ }
+
+ // some debug statements
+ //Macros.message(view,"Package Name ="+packName);
+ //Macros.message(view,"fullClassName ="+fullClassName);
+ //Macros.message(view,"Buffer Path ="+currBufferPath);
+ //Macros.message(view,"Buffer Dir ="+currBufferdir);
+
+
+ /* ************************************************* */
+ /* *********** On with the Processing ************* */
+ Object[] options = { "Standard Java Doclet", "Bouvard Doclet",
+ "DocBook Doclet", "XML Doclet", "PDF Doclet" };
+ String[] docletClassName = { "", "bp.doclet.Bouvard",
+ "com.mf.doclet.docbook.DocBookDoclet",
+ "codeinsight.xmldoclet.XMLDoclet",
+ "com.tarsec.javadoc.pdfdoclet.PDFDoclet"};
+ String[] docletClassPath = { "", "Bouvard.jar", "dbdoclet.jar",
+ "xmldoclet.jar",
+ "pdfdoclet.jar:itext.jar:/usr/lib/pkgs" };
+ String PDFDocletConfigPropertiesFile = "pdfdoclet.config.properties";
+ // Set the DEFAULT Doclet to the JavaDoclet
+ String proceed = options[0];
+
+ /* Shows a Doclet Selection Dialog */
+ if (showDocletDialog)
+ proceed = JOptionPane.showInputDialog(view,
+ "Choose the Doclet to use for previewing the"+
+ "\n" + className + " JavaDocs."+
+ "\n(Bypass this dialog... set "+
+ "'showDocletDialog=false;' in the macro)",
+ "JavaDoc Buffer Macro - version "+versionStr,
+ JOptionPane.QUESTION_MESSAGE, null, options,
+ options[0]);
+
+ if (proceed != null)
+ {
+ // this is where you could use the _chooseADir(String startDir) method
+ // to choose an output dir at runtime.
+ if (chooseOutputDir)
+ outputDir = _chooseADir("Please Choose an Output Directory.",outputDir);
+
+ docletChoice = 0;
+ for (int choiceNum = 0; choiceNum < options.length;choiceNum++)
+ {
+ if (((String)proceed).equals((String)options[choiceNum]))
+ {
+ docletChoice = choiceNum;
+ choiceNum = options.length;
+ }
+ }
+
+ // The currBufferSrcDir expects the current buffer to be in a subDirectory
+ // path the same as the package name
+ // THIS is definitely NOT always the case
+ String currBufferSrcDir = currBufferPath.substring(0,
+ currBufferPath.length()-fullClassName.toString().length()-5);
+
+ if(outputDir != null && !outputDir.equals(""))
+ {
+ // you might need some of the follwing if you want to add some
+ // commandline parms
+ String jedit_userdir=System.getProperty("user.home") +
+ SYSTEM_FILE_SEPERATOR +".jedit";
+ String jedit_homedir=jEdit.getJEditHome();
+ String currClassPath=System.getProperty("java.class.path");
+ String java_home=System.getProperty("java.home");
+
+ // Construct the command which will be executed
+ StringBuilder command = new StringBuilder(java_home);
+ if (java_home.toLowerCase().endsWith("jre"))
+ command.append(File.separator).append("..");
+ command.append(File.separator).append("bin");
+ command.append(File.separator).append("javadoc ");
+
+ if (!((String)proceed).equals((String)options[0]))
+ {
+ //{{{ general parms for 'other' doclets
+ command.append("-doclet \"");
+ command.append(docletClassName[docletChoice]);
+ command.append("\" ");
+ command.append("-docletpath \"");
+ command.append(jedit_userdir);
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("jars");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append(docletClassPath[docletChoice]);
+ command.append("\" ");
+ //}}}
+
+ //{{{ Bouvard Doclet
+ // This assumes the Bouvard.jar already exists
+ // in the jeditUser/jars dir
+ if (((String)proceed).equals((String)options[1]))
+ {
+ /* Specify the output dir */
+ command.append("-d \"");
+ command.append(outputDir);
+ command.append("\" ");
+ } //}}}
+
+ //{{{ the DocBookDoclet has an extra parm
+ if (((String)proceed).equals((String)options[2]))
+ {
+ command.append("-properties \"");
+ command.append(jedit_userdir);
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("macros");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("Java");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("dbdoclet-xml.properties\" ");
+ } //}}}
+
+ //{{{ the XMLDoclet has an extra parm
+ if (((String)proceed).equals((String)options[3]))
+ {
+ /* Specify the output dir */
+ //command.append("-d \"");
+ //command.append(outputDir);
+ //command.append("\" ");
+ } //}}}
+
+ //{{{ the PDFDoclet has an extra parm
+ if (((String)proceed).equals((String)options[4]))
+ {
+ command.append("-pdf \"");
+ command.append(outputDir);
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append(pdfDocletOutputFilename);
+ command.append("\" ");
+ if (PDFDocletConfigPropertiesFile != null
+ &&!PDFDocletConfigPropertiesFile.equals(""))
+ {
+ command.append(" -workdir \"");
+ command.append(outputDir);
+ command.append("\" ");
+ command.append("-config \"");
+ command.append(jedit_userdir);
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("macros");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("Java");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append(PDFDocletConfigPropertiesFile);
+ command.append("\"");
+ }
+ } //}}}
+
+ }
+ else
+ {
+ //{{{ standard doclet parms
+ if (addWindowTitle)
+ command.append(windowTitle.toString());
+ if (addDocTitle)
+ command.append(docTitle.toString());
+ if (addHeader)
+ command.append(header.toString());
+ if (addFooter)
+ command.append(footer.toString());
+ if (addBottom)
+ command.append(bottom.toString());
+
+ /* add the on/off options */
+ for (int opt = 0; opt <optionFlags.length; opt++)
+ {
+ if (optionFlags[opt])
+ command.append(optionStrs[opt]);
+ }
+
+ /* Specify the output dir */
+ command.append("-d \"");
+ command.append(outputDir);
+ command.append("\" ");
+
+ //}}}
+
+ }
+
+ /* Set the Level of detail to show */
+ command.append(" ");
+ command.append(showOnlyStr[showOnlyLevel]);
+
+ //{{{ if not found add your source dir to the 'extraClassesdir' var
+ command.append(" -classpath \"");
+ command.append(SYSTEM_TEMP_DIR);
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(System.getProperty("java.class.path"));
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(extraClassesDir);
+ command.append("\" ");
+ //}}}
+
+ /* **** Done with the options ***** */
+ /* Specify the package or file name */
+ if (doFullPackage && packName != null && !packName.equals(""))
+ {
+ /* Guess where the package source is located */
+ /* if not found... add your source dir to the 'extraSourcedir' var */
+ command.append("-sourcepath \"");
+ command.append(savedBufferdir);
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(currBufferSrcDir);
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(currBufferSrcDir);
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(currBufferSrcDir);
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(currBufferSrcDir);
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(currBufferSrcDir);
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_FILE_SEPERATOR);
+ command.append("..");
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(currBufferdir);
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(extraSourceDir);
+ command.append("\" ");
+
+ command.append(packName);
+ }
+ else
+ {
+ //{{{ add the base sourcepath
+ command.append("-sourcepath \"");
+ command.append(savedBufferdir);
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(currBufferSrcDir);
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(currBufferdir);
+ command.append(SYSTEM_PATH_SEPERATOR);
+ command.append(extraSourceDir);
+ command.append("\" ");
+ //}}}
+
+ //{{{ now add the file to javadoc
+ command.append("\"");
+ command.append(currBufferPath);
+ command.append("\"");
+ //}}}
+
+ }
+System.out.println("****************************************************************");
+System.out.println(command.toString());
+System.out.println("****************************************************************");
+ retVal = _returnSystemCommand(view, command.toString());
+ if (retVal.indexOf("error") == -1)
+ {
+
+ // Build the url for the Viewer
+ // If you don't want to use the InfoViewer plugin...
+ // easy, change the implementation in this macros _infoView method
+ StringBuffer urlStr = new StringBuffer();
+ urlStr.append("file:///");
+ urlStr.append(outputDir.replace('\\', '/').trim());
+ if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
+ urlStr.append("/");
+ if (doFullPackage)
+ {
+ urlStr.append("index.html");
+ }
+ else
+ {
+ if (packName != null && !packName.equals(""))
+ {
+ urlStr.append(packName.replace('.', '/').trim());
+ urlStr.append("/");
+ }
+ //Macros.message(view, packName);
+ urlStr.append(className);
+ urlStr.append(".html");
+ //Macros.message(view, urlStr.toString());
+ }
+
+ // now which viewer (standard or Pecuchet)
+ if (!showDocletDialog || ((String)proceed).equals((String)options[0]))
+ _infoView(view, urlStr.toString());
+
+ else if (((String)proceed).equals((String)options[1]))
+ {
+ // Bouvard Browser
+ // This assumes the Pecuchet.jar already exists
+ // and xerces is in the classpath already
+ StringBuffer classPath = new StringBuffer("\"");
+ classPath.append(jedit_userdir);
+ classPath.append(SYSTEM_FILE_SEPERATOR);
+ classPath.append("jars");
+ classPath.append(SYSTEM_FILE_SEPERATOR);
+ classPath.append("Pecuchet.jar");
+ classPath.append(SYSTEM_PATH_SEPERATOR);
+ classPath.append(jedit_homedir);
+ classPath.append(SYSTEM_FILE_SEPERATOR);
+ classPath.append("jars");
+ classPath.append(SYSTEM_FILE_SEPERATOR);
+ classPath.append("Pecuchet.jar");
+ classPath.append(SYSTEM_PATH_SEPERATOR);
+ classPath.append(currClassPath);
+ classPath.append("\"");
+
+ StringBuffer bViewerCommand = new StringBuffer("java -classpath ");
+ bViewerCommand.append(classPath);
+ bViewerCommand.append(" ");
+ bViewerCommand.append("-Dorg.xml.sax.driver=");
+ bViewerCommand.append("org.apache.xerces.parsers.SAXParser");
+ bViewerCommand.append(" ");
+ bViewerCommand.append("bp.app.Main ");
+ bViewerCommand.append(outputDir);
+ if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
+ bViewerCommand.append(SYSTEM_FILE_SEPERATOR);
+ bViewerCommand.append("data.bou &");
+ retVal = _returnSystemCommand(view, bViewerCommand.toString());
+ StringBuffer macroMessage =
+ new StringBuffer("When the Pecuchet browser starts.\n");
+ macroMessage.append("Open file: ");
+ macroMessage.append(outputDir);
+ if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
+ macroMessage.append(SYSTEM_FILE_SEPERATOR);
+ macroMessage.append("data.bou");
+ //Macros.message(view, macroMessage.toString());
+ }
+ else if (((String)proceed).equals((String)options[2]))
+ {
+ // XML Doclet
+ // Use a new jEdit Buffer
+ StringBuffer newFile = new StringBuffer(outputDir);
+ if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
+ newFile.append(SYSTEM_FILE_SEPERATOR);
+ newFile.append("Reference.xml");
+ Buffer newTmpBuffer = jEdit.openFile(view,newFile.toString());
+ }
+ else if (((String)proceed).equals((String)options[3]))
+ {
+ // XML Doclet
+ // Use a new jEdit Buffer
+ StringBuffer newFile = new StringBuffer(outputDir);
+ if (!outputDir.endsWith(SYSTEM_FILE_SEPERATOR))
+ newFile.append(SYSTEM_FILE_SEPERATOR);
+ newFile.append("output.xml");
+ Buffer newTmpBuffer = jEdit.openFile(view,newFile.toString());
+ }
+ else if (((String)proceed).equals((String)options[4]))
+ {
+ // pdf Doclet
+ StringBuffer pdfViewerCommand = new StringBuffer(pdfReaderCommand);
+ pdfViewerCommand.append(" ");
+ pdfViewerCommand.append(outputDir);
+ pdfViewerCommand.append(SYSTEM_FILE_SEPERATOR);
+ pdfViewerCommand.append(pdfDocletOutputFilename);
+ retVal = _returnSystemCommand(view, pdfViewerCommand.toString());
+ }
+ else
+ {
+ // put the viewers for other doclets here
+ }
+ }
+ else
+ Macros.error(view, "Javadoc did NOT complete successfully. " +
+ "See the console output");
+ }
+ }
+ }
+ else
+ Macros.error(view, "Current Buffer does NOT appear to be a Java File");
+}
+
+/*
+
+Macro index data (in DocBook format)
+
+ <listitem>
+ <para><filename>Preview_Javadoc_of_Buffer.bsh</filename></para>
+ <abstract><para>
+ Create and display API documentation for the current buffer.
+ </para></abstract>
+ <para>
+ The macro includes various configuration variables you can change; see the comment at the beginning of the macro source for details.
+ </para>
+ </listitem>
+
+*/
+
+// end Preview_JavaDoc_of_Buffer.bsh
+
diff --git a/jEdit/macros/Misc/Debug_BufferSets.bsh b/jEdit/macros/Misc/Debug_BufferSets.bsh
index 593c523..929ac9a 100644
--- a/jEdit/macros/Misc/Debug_BufferSets.bsh
+++ b/jEdit/macros/Misc/Debug_BufferSets.bsh
@@ -1,7 +1,7 @@
/*
* Debug_BufferSets.bsh - a BeanShell macro script to debug bufferSets
*
- * Copyright (C) 2008 Matthieu Casanova
+ * Copyright (C) 2008, 2010 Matthieu Casanova
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -16,8 +16,6 @@
* You should have received a copy of the GNU General Public License
* along with the jEdit program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Run_Script.bsh 3912 2001-11-24 03:56:51Z jgellene $
*/
org.gjt.sp.jedit.bufferset.BufferSetManager bufferSetManager = jEdit.getBufferSetManager();
@@ -33,20 +31,6 @@ for (Buffer buffer:buffers)
}
Log.log(Log.DEBUG, this, "------END BUFFER LIST------");
-Log.log(Log.DEBUG, this, "------BUFFERSET LIST------");
-bufferSetManager.visit(new org.gjt.sp.jedit.bufferset.BufferSetManager.BufferSetVisitor()
- {
- public void visit(org.gjt.sp.jedit.bufferset.BufferSet bufferSet)
- {
- Buffer[] buffers = bufferSet.getAllBuffers();
- for (Buffer buffer : buffers)
- {
- Log.log(Log.DEBUG, this, bufferSet.hashCode() + "@" + bufferSet + " " + buffer);
- }
- }
- });
-
-Log.log(Log.DEBUG, this, "------END BUFFERSET LIST------");
Log.log(Log.DEBUG, this, "------EDITPANE LIST------");
jEdit.visit(new org.gjt.sp.jedit.visitors.JEditVisitorAdapter()
{
diff --git a/jEdit/macros/Misc/Display_Abbreviations.bsh b/jEdit/macros/Misc/Display_Abbreviations.bsh
index a2cd8e5..9df5f08 100644
--- a/jEdit/macros/Misc/Display_Abbreviations.bsh
+++ b/jEdit/macros/Misc/Display_Abbreviations.bsh
@@ -1,391 +1,391 @@
-/*
- * Display_abbreviations.bsh - a BeanShell macro script for the
- * jEdit text editor - displays all defined abbreviations
- * Copyright (C) 2001 John Gellene
- * email: jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Display_Abbreviations.bsh 5224 2005-06-08 22:33:27Z orutherfurd $
- *
- * requires JDK 1.2, jEdit3.0
- *
- * Notes on use:
- *
- * This macro will display a sorted list of all defined abbreviations
- * in a dialog. A combo box lists all eidting modes for which abbreviations
- * are currently defined, as well as the "global" abbreviation set.
- *
- * Pressing a letter key will cause the table to scroll to the first row
- * with a label beginning with the letter (or the imeediately preceding row if
- * no item begins with that letter). The table is read-only; the dialog is
- * dismissed by clicking "OK" or pressing Esc or Enter.
- *
- * The macro has two global constants defined to permit customization of the
- * script's behavior. STARTING_SET contains the name of the abbreviation set
- * that will be first displayed. If the other variable, EXCLUDE_EMPTY_SETS,
- * is set to true, the drop-down menu and the results of clicking the
- * "Write All" button will only include abbreviations sets containing
- * entries.
- *
- * The table being displayed at any time is not updated if changes are made to
- * the abbreviation set in the "Global Options" dialog. If EXCLUDE_EMPTY_SETS
- * is set to true, the drop-down list will not by updated. Clsoing the dialog
- * and running the macro again will obtain current data.
- *
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-import javax.swing.table.*;
-
-/*
- * getActiveSets()
- * This returns an array with the names of the abbreviation sets
- * (beginning with "global"). If EXCLUDE_EMPTY_SETS is set to true, only sets
- * with abbreviations are included.
- */
-Object[] getActiveSets()
-{
- Mode[] modes = jEdit.getModes();
- Vector setVector = new Vector(modes.length + 1);
- setVector.addElement("global");
- for(int i = 0; i < modes.length; i++)
- {
- String name = modes[i].getName();
- if(EXCLUDE_EMPTY_SETS)
- {
- Hashtable ht = Abbrevs.getModeAbbrevs().get(name);
- if( ht == null || ht.isEmpty())
- continue;
- }
- setVector.addElement(name);
- }
- Object[] sets = new Object[setVector.size()];
- setVector.copyInto(sets);
- return sets;
-}
-
-/*
- * makeTableDataForMode()
- * This extracts the abbreviations from the named set. If extraction is
- * successful, the vector named by the first parameter will have its
- * elements removed before the variable is set to the newly created vector.
- */
-Vector makeTableDataForMode(Vector v, String name)
-{
- if(name.equals(currentSet))
- return v;
- Hashtable htable = null;
- if(name.equals("global"))
- {
- htable = Abbrevs.getGlobalAbbrevs();
- }
- else
- {
- Hashtable modeAbbrevs = Abbrevs.getModeAbbrevs();
- htable = modeAbbrevs.get(name);
- }
- if(htable != null)
- {
- Enumeration abbrevEnum = htable.keys();
- Enumeration expandEnum = htable.elements();
- Vector newData = new Vector(20, 5);
- while(abbrevEnum.hasMoreElements())
- {
- Vector row = new Vector(2);
- row.addElement(abbrevEnum.nextElement());
- row.addElement(expandEnum.nextElement());
- newData.addElement(row);
- }
- MiscUtilities.quicksort(newData,
- new MiscUtilities.StringICaseCompare());
- currentSet = name;
- if( v != null)
- v.removeAllElements();
- v = newData;
- }
- return v;
-}
-
-/*
- * showAbbrevs()
- * This is the macro's principal method.
- */
-void showAbbrevs()
-{
- currentSet = null;
- data = makeTableDataForMode(data, STARTING_SET);
- if(data.size() == 0)
- {
- STARTING_SET = "global";
- data = makeTableDataForMode(data, STARTING_SET);
- }
- Vector columnNames = new Vector(2);
- columnNames.addElement(new String("Abbreviation"));
- columnNames.addElement(new String("Expansion"));
- table = new JTable();
- table.setModel(new DefaultTableModel(data, columnNames));
- table.setRowSelectionAllowed(true);
- /* The next line prevents the table from being edited.
- * The normal approach in Java would be to subclass the TableModel
- * associated with the JTable and define TableModel.isCellEditable()
- * to return false. However, BeanShell does not allow conventional
- * class creation, and the desired behavior cannot be achieved using
- * its scripted object feature.
- */
- table.setDefaultEditor(Object.class, null);
- if(table.getRowCount() != 0)
- table.setRowSelectionInterval(0,0);
- tablePane = new JScrollPane(table);
- tablePane.setPreferredSize(new Dimension(450, 300));
-
- combo = new JComboBox(abbrevSets);
- Dimension dim = combo.getPreferredSize();
- dim.width = Math.max(dim.width, 120);
- combo.setPreferredSize(dim);
- combo.setSelectedItem(STARTING_SET);
- comboPanel = new JPanel(new FlowLayout());
- comboPanel.add(new JLabel("Abbreviation set:"));
- comboPanel.add(combo);
-
- close = new JButton("Close");
- write_set = new JButton("Write set");
- write_all = new JButton("Write all");
- buttonPanel = new JPanel(new FlowLayout());
- buttonPanel.add(write_set);
- buttonPanel.add(write_all);
- buttonPanel.add(close);
-
- close.addActionListener(this);
- write_set.addActionListener(this);
- write_all.addActionListener(this);
- combo.addActionListener(this);
- void actionPerformed(e)
- {
- Component source = e.getSource();
- if(source == close)
- dialog.hide();
- else if(source == write_set)
- writeTableToNewBuffer(super.data, (String)combo.getSelectedItem());
- else if(source == write_all)
- writeAllToNewBuffer();
- else if(source == combo)
- {
- super.data = makeTableDataForMode(super.data, (String)combo.getSelectedItem());
- if( data != null)
- {
- DefaultTableModel model = (DefaultTableModel)table.getModel();
- model.setDataVector(super.data, columnNames);
- }
- }
- }
-
- // workaround required by Swing bug; scheduled to be fixed in JDK 1.4
- combo.getComponent(0).addKeyListener(this);
- table.addKeyListener(this);
- write_set.addKeyListener(this);
- write_all.addKeyListener(this);
- close.addKeyListener(this);
- void keyPressed(e)
- {
- if(combo.isPopupVisible()) return;
- if(e.getKeyCode() == KeyEvent.VK_ESCAPE ||
- e.getKeyCode() == KeyEvent.VK_ENTER)
- {
- dialog.hide();
- }
- else if(e.getSource() != combo)
- {
- char ch = e.getKeyChar();
- if(Character.isLetter(ch))
- {
- e.consume();
- row = findFirstItem(ch);
- /* The next few lines set the last visible row
- * of the table so that you can look ahead of
- * the selected row.
- */
- visibleRows =
- table.getVisibleRect().height / table.getRowHeight();
- oldRow = table.getSelectedRow();
- table.setRowSelectionInterval(row,row);
- if (visibleRows > 5 && row - oldRow > visibleRows - 3)
- {
- row = Math.min( super.data.size() - 1, row + 3);
- }
- table.scrollRectToVisible(table.getCellRect(row,0,true));
- }
- }
- }
- /*
- * Having these members of KeyListener implemented as no-ops
- * will speedup execution. Otherwise BeanShell throws an
- * exception that jEdit handles internally.
- * Under BeanShell 1.2, implementation of these methods is
- * required.
- */
- void keyReleased(e) {}
- void keyTyped(e) {}
-
- /*
- * findFirstItem()
- * A simple linear search for the table entry that begins with the
- * given letter. It returns the first row with an entry beginning with
- * the letter, or the immdediately preceding row if there is no match
- * on the letter.
- *
- */
- int findFirstItem(char ch)
- {
- ch = Character.toUpperCase(ch);
- int row = 0;
- for(int i = 0; i < data.size(); ++i)
- {
- String name = ((Vector)data.elementAt(i)).elementAt(0);
- char ch_test = Character.toUpperCase(name.charAt(0));
- if( ch_test > ch) break;
- else
- {
- row = i;
- if( ch_test == ch) break;
- }
- }
- return row;
- }
-
- title = "Abbreviation list";
- dialog = new JDialog(view, title, false);
- c = dialog.getContentPane();
- c.add(tablePane, "Center");
- c.add(comboPanel, "North");
- c.add(buttonPanel, "South");
- dialog.getRootPane().setDefaultButton(close);
- dialog.pack();
- dialog.setLocationRelativeTo(view);
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- dialog.show();
-}
-
-/*
- * The next four methods deal with writing the abbreviation sets to a new
- * text buffer.
- */
-void writeTableToNewBuffer(Vector v, String setName)
-{
- Log.log(Log.DEBUG, BeanShell.class,
- "calling writeTableToNewBuffer for " + setName);
- writeHeader();
- Log.log(Log.DEBUG, BeanShell.class, "size of vector = "
- + String.valueOf(v.size()));
- writeSet(v, setName);
-}
-
-// saved the currentSet and deleted it for makeTableDataForMode()-invocation
-// because otherwise the currently in the Dialog displayed set has no abbrevs
-// in the output written to the buffer.
-void writeAllToNewBuffer()
-{
- writeHeader();
- Vector vOut = new Vector();
- savedCurrentSet = currentSet;
- for( int i = 0; i < abbrevSets.length; ++i)
- {
- currentSet = null;
- String setName = (String)abbrevSets[i];
- vOut = makeTableDataForMode(vOut, setName);
- writeSet(vOut, setName);
- textArea.setSelectedText("\n\n");
- }
- currentSet = savedCurrentSet;
-}
-
-void writeHeader()
-{
- jEdit.newFile(view);
- textArea.setSelectedText("jEdit Abbreviation Table\n\n");
-}
-
-/*
- * This truncates the definition text at 17 characters and the expansion text
- * at 58.
- */
-void writeSet(Vector v, String setName)
-{
- textArea.setSelectedText("Abbreviation set: " + setName + "\n");
- textArea.setSelectedText("Abbreviation Expansion\n\n");
- if(v.size() == 0)
- textArea.setSelectedText("<< No abbreviations >>\n");
- else for( int i = 0; i < v.size(); ++i)
- {
- StringBuffer sb = new StringBuffer(85);
- spaceString = " ";
- char[] space = spaceString.toCharArray();
- Vector row = (Vector)v.elementAt(i);
- abbrevName = (String)row.elementAt(0);
- if(abbrevName == null) continue;
- if(abbrevName.length() > 17)
- abbrevName = abbrevName.substring(0, 14) + "...";
- sb.append(abbrevName);
- sb.append(space, 0, 18 - (abbrevName.length()));
- expansion = row.elementAt(1);
- if(shortcut1 != null)
- {
- if(expansion.length() > 58)
- expansion = expansion.substring(0, 55) + "...";
- sb.append(expansion);
- }
- sb.append('\n');
- textArea.setSelectedText(sb.toString());
- }
-}
-
-
-/*
- * main routine, including definition of global variables
- */
-STARTING_SET = "global";
-EXCLUDE_EMPTY_SETS = true;
-abbrevSets = getActiveSets();
-currentSet = null;
-Vector data = new Vector(20, 5);
-showAbbrevs();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Display_Abbreviations.bsh</filename></para>
- <abstract><para>
- Displays the abbreviations registered for each of jEdit's
- editing modes.
- </para></abstract>
- <para>
- The macro provides a read-only view of the abbreviations
- contained in the <quote>Abbreviations</quote> option pane. Pressing
- a letter key will scroll the table to the first entry beginning with
- that letter. A further option is provided to write a selected mode's
- abbreviations or all abbreviations in a text buffer for printing as a
- reference. Notes in the source code listing point out some display options
- that are configured by modifying global variables.
- </para>
-</listitem>
-
-*/
-
-// end Display_Abbreviations.bsh
-
+/*
+ * Display_abbreviations.bsh - a BeanShell macro script for the
+ * jEdit text editor - displays all defined abbreviations
+ * Copyright (C) 2001 John Gellene
+ * email: jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Display_Abbreviations.bsh 5224 2005-06-08 22:33:27Z orutherfurd $
+ *
+ * requires JDK 1.2, jEdit3.0
+ *
+ * Notes on use:
+ *
+ * This macro will display a sorted list of all defined abbreviations
+ * in a dialog. A combo box lists all eidting modes for which abbreviations
+ * are currently defined, as well as the "global" abbreviation set.
+ *
+ * Pressing a letter key will cause the table to scroll to the first row
+ * with a label beginning with the letter (or the imeediately preceding row if
+ * no item begins with that letter). The table is read-only; the dialog is
+ * dismissed by clicking "OK" or pressing Esc or Enter.
+ *
+ * The macro has two global constants defined to permit customization of the
+ * script's behavior. STARTING_SET contains the name of the abbreviation set
+ * that will be first displayed. If the other variable, EXCLUDE_EMPTY_SETS,
+ * is set to true, the drop-down menu and the results of clicking the
+ * "Write All" button will only include abbreviations sets containing
+ * entries.
+ *
+ * The table being displayed at any time is not updated if changes are made to
+ * the abbreviation set in the "Global Options" dialog. If EXCLUDE_EMPTY_SETS
+ * is set to true, the drop-down list will not by updated. Clsoing the dialog
+ * and running the macro again will obtain current data.
+ *
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+import javax.swing.table.*;
+
+/*
+ * getActiveSets()
+ * This returns an array with the names of the abbreviation sets
+ * (beginning with "global"). If EXCLUDE_EMPTY_SETS is set to true, only sets
+ * with abbreviations are included.
+ */
+Object[] getActiveSets()
+{
+ Mode[] modes = jEdit.getModes();
+ Vector setVector = new Vector(modes.length + 1);
+ setVector.addElement("global");
+ for(int i = 0; i < modes.length; i++)
+ {
+ String name = modes[i].getName();
+ if(EXCLUDE_EMPTY_SETS)
+ {
+ Hashtable ht = Abbrevs.getModeAbbrevs().get(name);
+ if( ht == null || ht.isEmpty())
+ continue;
+ }
+ setVector.addElement(name);
+ }
+ Object[] sets = new Object[setVector.size()];
+ setVector.copyInto(sets);
+ return sets;
+}
+
+/*
+ * makeTableDataForMode()
+ * This extracts the abbreviations from the named set. If extraction is
+ * successful, the vector named by the first parameter will have its
+ * elements removed before the variable is set to the newly created vector.
+ */
+Vector makeTableDataForMode(Vector v, String name)
+{
+ if(name.equals(currentSet))
+ return v;
+ Hashtable htable = null;
+ if(name.equals("global"))
+ {
+ htable = Abbrevs.getGlobalAbbrevs();
+ }
+ else
+ {
+ Hashtable modeAbbrevs = Abbrevs.getModeAbbrevs();
+ htable = modeAbbrevs.get(name);
+ }
+ if(htable != null)
+ {
+ Enumeration abbrevEnum = htable.keys();
+ Enumeration expandEnum = htable.elements();
+ Vector newData = new Vector(20, 5);
+ while(abbrevEnum.hasMoreElements())
+ {
+ Vector row = new Vector(2);
+ row.addElement(abbrevEnum.nextElement());
+ row.addElement(expandEnum.nextElement());
+ newData.addElement(row);
+ }
+ MiscUtilities.quicksort(newData,
+ new MiscUtilities.StringICaseCompare());
+ currentSet = name;
+ if( v != null)
+ v.removeAllElements();
+ v = newData;
+ }
+ return v;
+}
+
+/*
+ * showAbbrevs()
+ * This is the macro's principal method.
+ */
+void showAbbrevs()
+{
+ currentSet = null;
+ data = makeTableDataForMode(data, STARTING_SET);
+ if(data.size() == 0)
+ {
+ STARTING_SET = "global";
+ data = makeTableDataForMode(data, STARTING_SET);
+ }
+ Vector columnNames = new Vector(2);
+ columnNames.addElement(new String("Abbreviation"));
+ columnNames.addElement(new String("Expansion"));
+ table = new JTable();
+ table.setModel(new DefaultTableModel(data, columnNames));
+ table.setRowSelectionAllowed(true);
+ /* The next line prevents the table from being edited.
+ * The normal approach in Java would be to subclass the TableModel
+ * associated with the JTable and define TableModel.isCellEditable()
+ * to return false. However, BeanShell does not allow conventional
+ * class creation, and the desired behavior cannot be achieved using
+ * its scripted object feature.
+ */
+ table.setDefaultEditor(Object.class, null);
+ if(table.getRowCount() != 0)
+ table.setRowSelectionInterval(0,0);
+ tablePane = new JScrollPane(table);
+ tablePane.setPreferredSize(new Dimension(450, 300));
+
+ combo = new JComboBox(abbrevSets);
+ Dimension dim = combo.getPreferredSize();
+ dim.width = Math.max(dim.width, 120);
+ combo.setPreferredSize(dim);
+ combo.setSelectedItem(STARTING_SET);
+ comboPanel = new JPanel(new FlowLayout());
+ comboPanel.add(new JLabel("Abbreviation set:"));
+ comboPanel.add(combo);
+
+ close = new JButton("Close");
+ write_set = new JButton("Write set");
+ write_all = new JButton("Write all");
+ buttonPanel = new JPanel(new FlowLayout());
+ buttonPanel.add(write_set);
+ buttonPanel.add(write_all);
+ buttonPanel.add(close);
+
+ close.addActionListener(this);
+ write_set.addActionListener(this);
+ write_all.addActionListener(this);
+ combo.addActionListener(this);
+ void actionPerformed(e)
+ {
+ Component source = e.getSource();
+ if(source == close)
+ dialog.hide();
+ else if(source == write_set)
+ writeTableToNewBuffer(super.data, (String)combo.getSelectedItem());
+ else if(source == write_all)
+ writeAllToNewBuffer();
+ else if(source == combo)
+ {
+ super.data = makeTableDataForMode(super.data, (String)combo.getSelectedItem());
+ if( data != null)
+ {
+ DefaultTableModel model = (DefaultTableModel)table.getModel();
+ model.setDataVector(super.data, columnNames);
+ }
+ }
+ }
+
+ // workaround required by Swing bug; scheduled to be fixed in JDK 1.4
+ combo.getComponent(0).addKeyListener(this);
+ table.addKeyListener(this);
+ write_set.addKeyListener(this);
+ write_all.addKeyListener(this);
+ close.addKeyListener(this);
+ void keyPressed(e)
+ {
+ if(combo.isPopupVisible()) return;
+ if(e.getKeyCode() == KeyEvent.VK_ESCAPE ||
+ e.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ dialog.hide();
+ }
+ else if(e.getSource() != combo)
+ {
+ char ch = e.getKeyChar();
+ if(Character.isLetter(ch))
+ {
+ e.consume();
+ row = findFirstItem(ch);
+ /* The next few lines set the last visible row
+ * of the table so that you can look ahead of
+ * the selected row.
+ */
+ visibleRows =
+ table.getVisibleRect().height / table.getRowHeight();
+ oldRow = table.getSelectedRow();
+ table.setRowSelectionInterval(row,row);
+ if (visibleRows > 5 && row - oldRow > visibleRows - 3)
+ {
+ row = Math.min( super.data.size() - 1, row + 3);
+ }
+ table.scrollRectToVisible(table.getCellRect(row,0,true));
+ }
+ }
+ }
+ /*
+ * Having these members of KeyListener implemented as no-ops
+ * will speedup execution. Otherwise BeanShell throws an
+ * exception that jEdit handles internally.
+ * Under BeanShell 1.2, implementation of these methods is
+ * required.
+ */
+ void keyReleased(e) {}
+ void keyTyped(e) {}
+
+ /*
+ * findFirstItem()
+ * A simple linear search for the table entry that begins with the
+ * given letter. It returns the first row with an entry beginning with
+ * the letter, or the immdediately preceding row if there is no match
+ * on the letter.
+ *
+ */
+ int findFirstItem(char ch)
+ {
+ ch = Character.toUpperCase(ch);
+ int row = 0;
+ for(int i = 0; i < data.size(); ++i)
+ {
+ String name = ((Vector)data.elementAt(i)).elementAt(0);
+ char ch_test = Character.toUpperCase(name.charAt(0));
+ if( ch_test > ch) break;
+ else
+ {
+ row = i;
+ if( ch_test == ch) break;
+ }
+ }
+ return row;
+ }
+
+ title = "Abbreviation list";
+ dialog = new JDialog(view, title, false);
+ c = dialog.getContentPane();
+ c.add(tablePane, "Center");
+ c.add(comboPanel, "North");
+ c.add(buttonPanel, "South");
+ dialog.getRootPane().setDefaultButton(close);
+ dialog.pack();
+ dialog.setLocationRelativeTo(view);
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.show();
+}
+
+/*
+ * The next four methods deal with writing the abbreviation sets to a new
+ * text buffer.
+ */
+void writeTableToNewBuffer(Vector v, String setName)
+{
+ Log.log(Log.DEBUG, BeanShell.class,
+ "calling writeTableToNewBuffer for " + setName);
+ writeHeader();
+ Log.log(Log.DEBUG, BeanShell.class, "size of vector = "
+ + String.valueOf(v.size()));
+ writeSet(v, setName);
+}
+
+// saved the currentSet and deleted it for makeTableDataForMode()-invocation
+// because otherwise the currently in the Dialog displayed set has no abbrevs
+// in the output written to the buffer.
+void writeAllToNewBuffer()
+{
+ writeHeader();
+ Vector vOut = new Vector();
+ savedCurrentSet = currentSet;
+ for( int i = 0; i < abbrevSets.length; ++i)
+ {
+ currentSet = null;
+ String setName = (String)abbrevSets[i];
+ vOut = makeTableDataForMode(vOut, setName);
+ writeSet(vOut, setName);
+ textArea.setSelectedText("\n\n");
+ }
+ currentSet = savedCurrentSet;
+}
+
+void writeHeader()
+{
+ jEdit.newFile(view);
+ textArea.setSelectedText("jEdit Abbreviation Table\n\n");
+}
+
+/*
+ * This truncates the definition text at 17 characters and the expansion text
+ * at 58.
+ */
+void writeSet(Vector v, String setName)
+{
+ textArea.setSelectedText("Abbreviation set: " + setName + "\n");
+ textArea.setSelectedText("Abbreviation Expansion\n\n");
+ if(v.size() == 0)
+ textArea.setSelectedText("<< No abbreviations >>\n");
+ else for( int i = 0; i < v.size(); ++i)
+ {
+ StringBuffer sb = new StringBuffer(85);
+ spaceString = " ";
+ char[] space = spaceString.toCharArray();
+ Vector row = (Vector)v.elementAt(i);
+ abbrevName = (String)row.elementAt(0);
+ if(abbrevName == null) continue;
+ if(abbrevName.length() > 17)
+ abbrevName = abbrevName.substring(0, 14) + "...";
+ sb.append(abbrevName);
+ sb.append(space, 0, 18 - (abbrevName.length()));
+ expansion = row.elementAt(1);
+ if(shortcut1 != null)
+ {
+ if(expansion.length() > 58)
+ expansion = expansion.substring(0, 55) + "...";
+ sb.append(expansion);
+ }
+ sb.append('\n');
+ textArea.setSelectedText(sb.toString());
+ }
+}
+
+
+/*
+ * main routine, including definition of global variables
+ */
+STARTING_SET = "global";
+EXCLUDE_EMPTY_SETS = true;
+abbrevSets = getActiveSets();
+currentSet = null;
+Vector data = new Vector(20, 5);
+showAbbrevs();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Display_Abbreviations.bsh</filename></para>
+ <abstract><para>
+ Displays the abbreviations registered for each of jEdit's
+ editing modes.
+ </para></abstract>
+ <para>
+ The macro provides a read-only view of the abbreviations
+ contained in the <quote>Abbreviations</quote> option pane. Pressing
+ a letter key will scroll the table to the first entry beginning with
+ that letter. A further option is provided to write a selected mode's
+ abbreviations or all abbreviations in a text buffer for printing as a
+ reference. Notes in the source code listing point out some display options
+ that are configured by modifying global variables.
+ </para>
+</listitem>
+
+*/
+
+// end Display_Abbreviations.bsh
+
diff --git a/jEdit/macros/Misc/Display_Actions.bsh b/jEdit/macros/Misc/Display_Actions.bsh
index ac80e3d..003e861 100644
--- a/jEdit/macros/Misc/Display_Actions.bsh
+++ b/jEdit/macros/Misc/Display_Actions.bsh
@@ -1,76 +1,76 @@
-/*
- * Display_Actions.bsh - Displays a list of all the actions known to jEdit
- * categorised by ActionSet.
- *
- * Copyright (C) 2002 Lee Turner (lee at leeturner.org)
- * Version 1.0
- *
- * :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-StringBuffer buf = new StringBuffer();
-buf.append("The jEdit action bar can be opened via the Utilities menu and is usually\n");
-buf.append("assigned to the C+ENTER keyboard shortcut.\n\n");
-
-actionSets = jEdit.getActionSets();
-Arrays.sort(actionSets,new MiscUtilities.StringICaseCompare());
-
-for(i = 0; i < actionSets.length; i++)
-{
- ActionSet actionSet = actionSets[i];
- if(actionSet.getActionCount() != 0)
- {
- buf.append("{{{ " + actionSet.getLabel() + "\n");
-
- actions = actionSet.getActionNames();
- Arrays.sort(actions,new MiscUtilities.StringICaseCompare());
-
- for(j = 0; j < actions.length; j++)
- {
- String name = actions[j];
- String label = jEdit.getProperty(actions[j] + ".label");
- if(label == null)
- label = "<no label>";
- else
- label = GUIUtilities.prettifyMenuLabel(label);
- buf.append(name + " : " + label + "\n");
- }
- buf.append("}}}\n\n");
- }
-}
-buffer = jEdit.newFile(view);
-buffer.insert(0,buf.toString());
-textArea.setCaretPosition(0);
-
-buffer.setStringProperty("folding","explicit");
-buffer.setIntegerProperty("collapseFolds",1);
-buffer.propertiesChanged();
-
-/*
-Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Display_Actions.bsh</filename></para>
- <abstract><para>
- Displays a list of all the actions known to jEdit categorised by
- their action set.
- </para></abstract>
- <para>
- This macro can be a useful reference if you want to use the jEdit 4.2 action bar.
- </para>
-</listitem>
-*/
+/*
+ * Display_Actions.bsh - Displays a list of all the actions known to jEdit
+ * categorised by ActionSet.
+ *
+ * Copyright (C) 2002 Lee Turner (lee at leeturner.org)
+ * Version 1.0
+ *
+ * :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+StringBuffer buf = new StringBuffer();
+buf.append("The jEdit action bar can be opened via the Utilities menu and is usually\n");
+buf.append("assigned to the C+ENTER keyboard shortcut.\n\n");
+
+actionSets = jEdit.getActionSets();
+Arrays.sort(actionSets,new MiscUtilities.StringICaseCompare());
+
+for(i = 0; i < actionSets.length; i++)
+{
+ ActionSet actionSet = actionSets[i];
+ if(actionSet.getActionCount() != 0)
+ {
+ buf.append("{{{ " + actionSet.getLabel() + "\n");
+
+ actions = actionSet.getActionNames();
+ Arrays.sort(actions,new MiscUtilities.StringICaseCompare());
+
+ for(j = 0; j < actions.length; j++)
+ {
+ String name = actions[j];
+ String label = jEdit.getProperty(actions[j] + ".label");
+ if(label == null)
+ label = "<no label>";
+ else
+ label = GUIUtilities.prettifyMenuLabel(label);
+ buf.append(name + " : " + label + "\n");
+ }
+ buf.append("}}}\n\n");
+ }
+}
+buffer = jEdit.newFile(view);
+buffer.insert(0,buf.toString());
+textArea.setCaretPosition(0);
+
+buffer.setStringProperty("folding","explicit");
+buffer.setIntegerProperty("collapseFolds",1);
+buffer.propertiesChanged();
+
+/*
+Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Display_Actions.bsh</filename></para>
+ <abstract><para>
+ Displays a list of all the actions known to jEdit categorised by
+ their action set.
+ </para></abstract>
+ <para>
+ This macro can be a useful reference if you want to use the jEdit 4.2 action bar.
+ </para>
+</listitem>
+*/
diff --git a/jEdit/macros/Misc/Display_Character_Code.bsh b/jEdit/macros/Misc/Display_Character_Code.bsh
index fc9f5ad..0c64dfb 100644
--- a/jEdit/macros/Misc/Display_Character_Code.bsh
+++ b/jEdit/macros/Misc/Display_Character_Code.bsh
@@ -1,28 +1,28 @@
-/**
- * Display int and hex values for the character at
- * the caret in the status bar.
- *
- * Copyright 2004 Ollie Rutherfurd <oliver at jedit.org>
- *
- * $Id: Display_Character_Code.bsh 5050 2004-05-24 19:24:56Z orutherfurd $
- */
-
-void displayCharacterCode(View view)
-{
- JEditTextArea textArea = view.getTextArea();
- int caret = textArea.getCaretPosition();
- int line = textArea.getCaretLine();
- if(caret < textArea.getLineEndOffset(line)-1)
- {
- char c = buffer.getText(caret,1).charAt(0);
- StringBuffer buf = new StringBuffer();
- buf.append("Character at caret: ");
- buf.append("int=").append((int)c).append(", ");
- buf.append("hex=").append(Integer.toString((int)c,16));
- view.getStatus().setMessageAndClear(buf.toString());
- }
- else
- Toolkit.getDefaultToolkit().beep();
-}
-
-displayCharacterCode(view);
+/**
+ * Display int and hex values for the character at
+ * the caret in the status bar.
+ *
+ * Copyright 2004 Ollie Rutherfurd <oliver at jedit.org>
+ *
+ * $Id: Display_Character_Code.bsh 5050 2004-05-24 19:24:56Z orutherfurd $
+ */
+
+void displayCharacterCode(View view)
+{
+ JEditTextArea textArea = view.getTextArea();
+ int caret = textArea.getCaretPosition();
+ int line = textArea.getCaretLine();
+ if(caret < textArea.getLineEndOffset(line)-1)
+ {
+ char c = buffer.getText(caret,1).charAt(0);
+ StringBuffer buf = new StringBuffer();
+ buf.append("Character at caret: ");
+ buf.append("int=").append((int)c).append(", ");
+ buf.append("hex=").append(Integer.toString((int)c,16));
+ view.getStatus().setMessageAndClear(buf.toString());
+ }
+ else
+ Toolkit.getDefaultToolkit().beep();
+}
+
+displayCharacterCode(view);
diff --git a/jEdit/macros/Misc/Display_Shortcuts.bsh b/jEdit/macros/Misc/Display_Shortcuts.bsh
index 92f96ac..2ac0e99 100644
--- a/jEdit/macros/Misc/Display_Shortcuts.bsh
+++ b/jEdit/macros/Misc/Display_Shortcuts.bsh
@@ -1,307 +1,307 @@
-/*
- * Display_shortcuts.bsh - a BeanShell macro script for the
- * jEdit text editor - displays all shortcut key assignments
- * Copyright (C) 2003 Russell Inman
- * email: RInman at csustan.edu
- *
- * Code based on Display_Shortcuts.bsh, 1.3
- * Copyright (C) 2001 John Gellene
- * email: jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- *
- * Display_Shortcuts.bsh, v1.3.1 2003-11-13
- *
- *
- * requires jEdit3.1pre5
- *
- * Notes on use:
- *
- * This macro will display a sorted list of all keyboard shortcuts
- * in a dialog.
- *
- * Pressing a letter key will cause the table to scroll to the first row
- * with a label beginning with the letter (or the imeediately preceding row if
- * no item begins with that letter). The table is read-only; the dialog is
- * dismissed by clicking "OK" or pressing Esc or Enter.
- *
- * General comment:
- *
- * This macro illustrates the limitations of BeanShell, which cannot create
- * true derived subclasses. To get the same features, the alternative to using
- * Vectors to hold the data would be to write a highly customized sorting
- * routine. Sorting by keyname would require a second custom sorting routine.
- * There is also a hack in the code creating the table.
- *
- * Checked for jEdit 4.2pre6 API
- */
-
-import javax.swing.table.*;
-
-/*
- * method for creating vectors of row data describing shortcuts.
- */
-
-void makeShortcutsVector(Vector p_v)
-{
- String[] actionNames = jEdit.getActionNames();
- for(int i = 0; i < actionNames.length; i++)
- {
- EditAction action = jEdit.getAction(actionNames[i]);
- String name = action.getName();
- String label = action.getLabel();
- if(label == null)
- label = name;
- else label = GUIUtilities.prettifyMenuLabel(label);
- String shortcut1 = jEdit.getProperty(name + ".shortcut");
- if(shortcut1 == null)
- shortcut1 = "";
- String shortcut2 = jEdit.getProperty(name + ".shortcut2");
- if(shortcut2 == null)
- shortcut2 = "";
- if(shortcut1.length() != 0 || shortcut2.length() != 0)
- {
- p_v.addElement(makeRow(label,shortcut1,shortcut2));
- }
- }
-}
-
-/*
- * helper method to make vector of row data for table
- */
-Vector makeRow(String name, String shortcut1, String shortcut2)
-{
- Vector row = new Vector(3);
- row.addElement(name);
- row.addElement(shortcut1);
- row.addElement(shortcut2);
- return row;
-}
-
-/*
- * methods for formatting and writing shortcut data to a text buffer
- */
-
-void writeTableToNewBuffer(Vector v)
-{
- jEdit.newFile(view);
- textArea.setSelectedText("jEdit Keyboard Shortcut Table\n\n");
- headings = makeRow("Name", "Shortcut - 1", "Shortcut - 2");
- writeLine(headings);
- textArea.setSelectedText("\n");
- for(int i = 0; i < v.size(); ++i)
- {
- writeLine((Vector)v.elementAt(i));
- }
-}
-
-void writeLine(Vector row)
-{
- StringBuffer sb = new StringBuffer(85);
- spaceString = " ";
- char[] space = spaceString.toCharArray();
- displayName = row.elementAt(0);
- if(displayName.length() > 38)
- displayName = displayName.substring(0, 34) + "...";
- sb.append(displayName);
- sb.append(space, 0, 40 - (displayName.length()));
- shortcut1 = row.elementAt(1);
- if(shortcut1 != null)
- {
- sb.append(shortcut1);
- sb.append(space, 0, 20 - (shortcut1.length()));
- }
- else sb.append(space, 0, 20);
- shortcut2 = row.elementAt(2);
- if(shortcut2 != null)
- {
- sb.append(shortcut2);
- sb.append(space, 0, 20 - (shortcut2.length()));
- }
- sb.append('\n');
- textArea.setSelectedText(sb.toString());
-}
-
-/*
- * main routine
- */
-void showShortcuts(View view)
-{
- this.view = view;
-
- Vector v = new Vector();
- makeShortcutsVector(v);
- MiscUtilities.quicksort(v, new MiscUtilities.StringICaseCompare());
-
- table = new JTable(v, makeRow( "Name", "Shortcut-1", "Shortcut-2"));
- table.getColumnModel().getColumn(0).setPreferredWidth(200);
- table.setRowSelectionAllowed(true);
- /* The next line prevents the table from being edited.
- * The normal approach in Java would be to subclass the TableModel
- * associated with the JTable and define TableModel.isCellEditable()
- * to return false. However, BeanShell does not allow conventional
- * class creation, and the desired behavior cannot be achieved using
- * its scripted object feature.
- */
- table.setDefaultEditor(Object.class, null);
- if(table.getRowCount() != 0)
- {
- table.setRowSelectionInterval(0, 0);
- table.setColumnSelectionInterval(1, 1);
- }
-
- tablePane = new JScrollPane(table);
- tablePane.setPreferredSize(new Dimension(450, 300));
-
- close = new JButton("Close");
- close.addActionListener(this);
- write = new JButton("Write to buffer");
- write.addActionListener(this);
- void actionPerformed(e)
- {
- if(e.getSource().getText().equals("Close"))
- dialog.hide();
- else writeTableToNewBuffer(v);
- }
- buttonPanel = new JPanel(new FlowLayout());
- buttonPanel.add(write);
- buttonPanel.add(close);
-
- title = "Keyboard shortcut list";
- dialog = new JDialog(view, title, false);
- dialog.getContentPane().add(tablePane, "Center");
- dialog.getContentPane().add(buttonPanel, "South");
- dialog.getRootPane().setDefaultButton(close);
-
-
- table.addKeyListener(this);
- void keyPressed(e)
- {
- if(e.getKeyCode() == KeyEvent.VK_ESCAPE ||
- e.getKeyCode() == KeyEvent.VK_ENTER)
- {
- dialog.hide();
- }
- else
- {
- char ch = e.getKeyChar();
- if(Character.isLetter(ch))
- {
- e.consume();
- row = findFirstItem(ch);
- /* The next few lines set the last visible row
- * of the table so that you can look ahead of
- * the selected row.
- */
- visibleRows =
- table.getVisibleRect().height / table.getRowHeight();
- oldRow = table.getSelectedRow();
- table.setRowSelectionInterval(row,row);
- if (visibleRows > 5 && row - oldRow > visibleRows - 3)
- {
- row = Math.min( v.size() - 1, row + 3);
- }
- table.scrollRectToVisible(table.getCellRect(row,0,true));
- }
- }
- }
- /*
- * Having these members of KeyListener implemented will speedup execution;
- * BeanShell will otherwise throw and handle an exception.
- * This idiom is required under BeanShell 1.2
- */
- void keyReleased(e) {}
- void keyTyped(e) {}
-
-
- /*
- * A simple linear search for the table entry that begins with the
- * given letter. It returns the first row with an entry beginning with
- * the letter, or the immdediately preceding row if there is no match
- * on the letter. If PUT_MACROS_AT_END is set to true, they will not be
- * searched.
- *
- */
- int data_midpoint = 0;
- int findFirstItem(char ch)
- {
- ch = Character.toUpperCase(ch);
- int row = 0;
- int fix_err = ch > 'L' ? data_midpoint : 0;
- for(int i = fix_err; i < v.size(); ++i)
- {
- String name = ((Vector)v.elementAt(i)).elementAt(0);
- char ch_test = Character.toUpperCase(name.charAt(0));
- if( ch_test > ch) break;
- else
- {
- row = i;
- if( ch_test == ch) break;
- }
- }
- return row;
- }
- /* This line caches the row that starts the second half of the
- * alphabet to speed up searches. 'M' was chosen as the midpoint
- * to speed up searches.
- */
- data_midpoint = findFirstItem('M');
- dialog.pack();
- dialog.setLocationRelativeTo(view);
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- dialog.show();
-}
-
-showShortcuts(view);
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Display_Shortcuts.bsh</filename></para>
- <abstract><para>
- Displays a sorted list of the keyboard shortcuts currently in effect.
- </para></abstract>
- <para>
- The macro provides a combined read-only view of command, macro
- and plugin shortcuts. Pressing a letter key will
- scroll the table to the first entry beginning with that letter.
- A further option is provided to write the shortcut assignments in a
- text buffer for printing as a reference. Notes in the source code
- listing point out some display options that are configured by
- modifying global variables.
- </para>
-</listitem>
-
-*/
-
-/*
- Changes from v1.3
- - Since makeShortcutsVector() had no return statement, the return type was
- changed to void.
- - Removed deprecated jEdit.getEditActions() call from makeShortcutsVector
- - The original makeShortcutsVector method referenced a variable v,
- presumably from showShortcuts(), which was outside of its scope.
- I don't know if some new scoping rule in BeanShell broke this or not.
- At any rate, the method has been updated so that it takes a
- Vector as a parameter.
- - Added an explicit declaration for Vector v to showShortcuts in order to
- pass it to makeShortcutsVector
-*/
-
-// end Display_Shortcuts.bsh
-
+/*
+ * Display_shortcuts.bsh - a BeanShell macro script for the
+ * jEdit text editor - displays all shortcut key assignments
+ * Copyright (C) 2003 Russell Inman
+ * email: RInman at csustan.edu
+ *
+ * Code based on Display_Shortcuts.bsh, 1.3
+ * Copyright (C) 2001 John Gellene
+ * email: jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Display_Shortcuts.bsh, v1.3.1 2003-11-13
+ *
+ *
+ * requires jEdit3.1pre5
+ *
+ * Notes on use:
+ *
+ * This macro will display a sorted list of all keyboard shortcuts
+ * in a dialog.
+ *
+ * Pressing a letter key will cause the table to scroll to the first row
+ * with a label beginning with the letter (or the imeediately preceding row if
+ * no item begins with that letter). The table is read-only; the dialog is
+ * dismissed by clicking "OK" or pressing Esc or Enter.
+ *
+ * General comment:
+ *
+ * This macro illustrates the limitations of BeanShell, which cannot create
+ * true derived subclasses. To get the same features, the alternative to using
+ * Vectors to hold the data would be to write a highly customized sorting
+ * routine. Sorting by keyname would require a second custom sorting routine.
+ * There is also a hack in the code creating the table.
+ *
+ * Checked for jEdit 4.2pre6 API
+ */
+
+import javax.swing.table.*;
+
+/*
+ * method for creating vectors of row data describing shortcuts.
+ */
+
+void makeShortcutsVector(Vector p_v)
+{
+ String[] actionNames = jEdit.getActionNames();
+ for(int i = 0; i < actionNames.length; i++)
+ {
+ EditAction action = jEdit.getAction(actionNames[i]);
+ String name = action.getName();
+ String label = action.getLabel();
+ if(label == null)
+ label = name;
+ else label = GUIUtilities.prettifyMenuLabel(label);
+ String shortcut1 = jEdit.getProperty(name + ".shortcut");
+ if(shortcut1 == null)
+ shortcut1 = "";
+ String shortcut2 = jEdit.getProperty(name + ".shortcut2");
+ if(shortcut2 == null)
+ shortcut2 = "";
+ if(shortcut1.length() != 0 || shortcut2.length() != 0)
+ {
+ p_v.addElement(makeRow(label,shortcut1,shortcut2));
+ }
+ }
+}
+
+/*
+ * helper method to make vector of row data for table
+ */
+Vector makeRow(String name, String shortcut1, String shortcut2)
+{
+ Vector row = new Vector(3);
+ row.addElement(name);
+ row.addElement(shortcut1);
+ row.addElement(shortcut2);
+ return row;
+}
+
+/*
+ * methods for formatting and writing shortcut data to a text buffer
+ */
+
+void writeTableToNewBuffer(Vector v)
+{
+ jEdit.newFile(view);
+ textArea.setSelectedText("jEdit Keyboard Shortcut Table\n\n");
+ headings = makeRow("Name", "Shortcut - 1", "Shortcut - 2");
+ writeLine(headings);
+ textArea.setSelectedText("\n");
+ for(int i = 0; i < v.size(); ++i)
+ {
+ writeLine((Vector)v.elementAt(i));
+ }
+}
+
+void writeLine(Vector row)
+{
+ StringBuffer sb = new StringBuffer(85);
+ spaceString = " ";
+ char[] space = spaceString.toCharArray();
+ displayName = row.elementAt(0);
+ if(displayName.length() > 38)
+ displayName = displayName.substring(0, 34) + "...";
+ sb.append(displayName);
+ sb.append(space, 0, 40 - (displayName.length()));
+ shortcut1 = row.elementAt(1);
+ if(shortcut1 != null)
+ {
+ sb.append(shortcut1);
+ sb.append(space, 0, 20 - (shortcut1.length()));
+ }
+ else sb.append(space, 0, 20);
+ shortcut2 = row.elementAt(2);
+ if(shortcut2 != null)
+ {
+ sb.append(shortcut2);
+ sb.append(space, 0, 20 - (shortcut2.length()));
+ }
+ sb.append('\n');
+ textArea.setSelectedText(sb.toString());
+}
+
+/*
+ * main routine
+ */
+void showShortcuts(View view)
+{
+ this.view = view;
+
+ Vector v = new Vector();
+ makeShortcutsVector(v);
+ MiscUtilities.quicksort(v, new MiscUtilities.StringICaseCompare());
+
+ table = new JTable(v, makeRow( "Name", "Shortcut-1", "Shortcut-2"));
+ table.getColumnModel().getColumn(0).setPreferredWidth(200);
+ table.setRowSelectionAllowed(true);
+ /* The next line prevents the table from being edited.
+ * The normal approach in Java would be to subclass the TableModel
+ * associated with the JTable and define TableModel.isCellEditable()
+ * to return false. However, BeanShell does not allow conventional
+ * class creation, and the desired behavior cannot be achieved using
+ * its scripted object feature.
+ */
+ table.setDefaultEditor(Object.class, null);
+ if(table.getRowCount() != 0)
+ {
+ table.setRowSelectionInterval(0, 0);
+ table.setColumnSelectionInterval(1, 1);
+ }
+
+ tablePane = new JScrollPane(table);
+ tablePane.setPreferredSize(new Dimension(450, 300));
+
+ close = new JButton("Close");
+ close.addActionListener(this);
+ write = new JButton("Write to buffer");
+ write.addActionListener(this);
+ void actionPerformed(e)
+ {
+ if(e.getSource().getText().equals("Close"))
+ dialog.hide();
+ else writeTableToNewBuffer(v);
+ }
+ buttonPanel = new JPanel(new FlowLayout());
+ buttonPanel.add(write);
+ buttonPanel.add(close);
+
+ title = "Keyboard shortcut list";
+ dialog = new JDialog(view, title, false);
+ dialog.getContentPane().add(tablePane, "Center");
+ dialog.getContentPane().add(buttonPanel, "South");
+ dialog.getRootPane().setDefaultButton(close);
+
+
+ table.addKeyListener(this);
+ void keyPressed(e)
+ {
+ if(e.getKeyCode() == KeyEvent.VK_ESCAPE ||
+ e.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ dialog.hide();
+ }
+ else
+ {
+ char ch = e.getKeyChar();
+ if(Character.isLetter(ch))
+ {
+ e.consume();
+ row = findFirstItem(ch);
+ /* The next few lines set the last visible row
+ * of the table so that you can look ahead of
+ * the selected row.
+ */
+ visibleRows =
+ table.getVisibleRect().height / table.getRowHeight();
+ oldRow = table.getSelectedRow();
+ table.setRowSelectionInterval(row,row);
+ if (visibleRows > 5 && row - oldRow > visibleRows - 3)
+ {
+ row = Math.min( v.size() - 1, row + 3);
+ }
+ table.scrollRectToVisible(table.getCellRect(row,0,true));
+ }
+ }
+ }
+ /*
+ * Having these members of KeyListener implemented will speedup execution;
+ * BeanShell will otherwise throw and handle an exception.
+ * This idiom is required under BeanShell 1.2
+ */
+ void keyReleased(e) {}
+ void keyTyped(e) {}
+
+
+ /*
+ * A simple linear search for the table entry that begins with the
+ * given letter. It returns the first row with an entry beginning with
+ * the letter, or the immdediately preceding row if there is no match
+ * on the letter. If PUT_MACROS_AT_END is set to true, they will not be
+ * searched.
+ *
+ */
+ int data_midpoint = 0;
+ int findFirstItem(char ch)
+ {
+ ch = Character.toUpperCase(ch);
+ int row = 0;
+ int fix_err = ch > 'L' ? data_midpoint : 0;
+ for(int i = fix_err; i < v.size(); ++i)
+ {
+ String name = ((Vector)v.elementAt(i)).elementAt(0);
+ char ch_test = Character.toUpperCase(name.charAt(0));
+ if( ch_test > ch) break;
+ else
+ {
+ row = i;
+ if( ch_test == ch) break;
+ }
+ }
+ return row;
+ }
+ /* This line caches the row that starts the second half of the
+ * alphabet to speed up searches. 'M' was chosen as the midpoint
+ * to speed up searches.
+ */
+ data_midpoint = findFirstItem('M');
+ dialog.pack();
+ dialog.setLocationRelativeTo(view);
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.show();
+}
+
+showShortcuts(view);
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Display_Shortcuts.bsh</filename></para>
+ <abstract><para>
+ Displays a sorted list of the keyboard shortcuts currently in effect.
+ </para></abstract>
+ <para>
+ The macro provides a combined read-only view of command, macro
+ and plugin shortcuts. Pressing a letter key will
+ scroll the table to the first entry beginning with that letter.
+ A further option is provided to write the shortcut assignments in a
+ text buffer for printing as a reference. Notes in the source code
+ listing point out some display options that are configured by
+ modifying global variables.
+ </para>
+</listitem>
+
+*/
+
+/*
+ Changes from v1.3
+ - Since makeShortcutsVector() had no return statement, the return type was
+ changed to void.
+ - Removed deprecated jEdit.getEditActions() call from makeShortcutsVector
+ - The original makeShortcutsVector method referenced a variable v,
+ presumably from showShortcuts(), which was outside of its scope.
+ I don't know if some new scoping rule in BeanShell broke this or not.
+ At any rate, the method has been updated so that it takes a
+ Vector as a parameter.
+ - Added an explicit declaration for Vector v to showShortcuts in order to
+ pass it to makeShortcutsVector
+*/
+
+// end Display_Shortcuts.bsh
+
diff --git a/jEdit/macros/Misc/Evaluate_Buffer_in_BeanShell.bsh b/jEdit/macros/Misc/Evaluate_Buffer_in_BeanShell.bsh
index c693675..78bd5f0 100644
--- a/jEdit/macros/Misc/Evaluate_Buffer_in_BeanShell.bsh
+++ b/jEdit/macros/Misc/Evaluate_Buffer_in_BeanShell.bsh
@@ -1,61 +1,61 @@
-/*
- * Evaluate_Buffer_in_BeanShell.bsh - a BeanShell macro script for the
- * jEdit text editor - evaluates contents of buffer as
- * BeanShell script
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Evaluate_Buffer_in_BeanShell.bsh 10596 2007-09-19 00:02:50Z Vampire0 $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-script = buffer.getText(0,buffer.getLength());
-buffer = jEdit.newFile(view);
-result = BeanShell.eval(view,BeanShell.getNameSpace(),script);
-if (null != result) {
- buffer.insert(buffer.getLength(),"\n" + result);
-}
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Evaluate_Buffer_in_BeanShell.bsh</filename></para>
- <abstract><para>
- Evaluates contents of current buffer as a BeanShell script,
- and opens a new
- buffer to receive any text output.
- </para></abstract>
- <para>
- This is a quick way to test a macro script even before its text
- is saved to a file. Opening a new buffer for output is a precaution
- to prevent the macro from inadvertently erasing or overwriting
- itself. BeanShell scripts that operate on the contents of the
- current buffer will not work meaningfully when tested using this
- macro. If the script returns any value, the result of its toString()
- method is appended in a new line to the newly created buffer.
- </para>
-</listitem>
-
-*/
-
-
-// end of Evaluate_Buffer_in_BeanShell.bsh
-
+/*
+ * Evaluate_Buffer_in_BeanShell.bsh - a BeanShell macro script for the
+ * jEdit text editor - evaluates contents of buffer as
+ * BeanShell script
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Evaluate_Buffer_in_BeanShell.bsh 10596 2007-09-19 00:02:50Z Vampire0 $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+script = buffer.getText(0,buffer.getLength());
+buffer = jEdit.newFile(view);
+result = BeanShell.eval(view,BeanShell.getNameSpace(),script);
+if (null != result) {
+ buffer.insert(buffer.getLength(),"\n" + result);
+}
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Evaluate_Buffer_in_BeanShell.bsh</filename></para>
+ <abstract><para>
+ Evaluates contents of current buffer as a BeanShell script,
+ and opens a new
+ buffer to receive any text output.
+ </para></abstract>
+ <para>
+ This is a quick way to test a macro script even before its text
+ is saved to a file. Opening a new buffer for output is a precaution
+ to prevent the macro from inadvertently erasing or overwriting
+ itself. BeanShell scripts that operate on the contents of the
+ current buffer will not work meaningfully when tested using this
+ macro. If the script returns any value, the result of its toString()
+ method is appended in a new line to the newly created buffer.
+ </para>
+</listitem>
+
+*/
+
+
+// end of Evaluate_Buffer_in_BeanShell.bsh
+
diff --git a/jEdit/macros/Misc/Hex_Convert.bsh b/jEdit/macros/Misc/Hex_Convert.bsh
index 03378b8..ab1cdb9 100644
--- a/jEdit/macros/Misc/Hex_Convert.bsh
+++ b/jEdit/macros/Misc/Hex_Convert.bsh
@@ -1,106 +1,106 @@
-/*
- * Hex_Convert.bsh - a BeanShell macro script for the
- * jEdit text editor - Converts byte characters to their
- * hex equivalent, and vice versa.
- * Copyright (C) 2001 Will Sargent
- * will_sargent at yahoo.dom
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Hex_Convert.bsh 5224 2005-06-08 22:33:27Z orutherfurd $
- */
-
-import java.io.*;
-import java.util.*;
-
-char[] hexDigit = new char[]
-{
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
-};
-
-String byteToHex(byte b)
-{
- char[] chars = new char[]
- {
- hexDigit[(b >> 4) & 0x0f],
- hexDigit[b & 0x0f]
- };
- return new String(chars);
-}
-
-void print(String line)
-{
- Macros.message(view, line);
-}
-
-void stringToByte(String target)
-{
- byte[] string = target.getBytes();
-
- StringBuffer foo = new StringBuffer();
- foo.append("before = " + target);
- foo.append("\nafter = ");
-
- int length = string.length;
- for (int i = 0; i < length; i++)
- {
- foo.append("0x" + byteToHex(string[i]));
- if (i < length - 1) foo.append(" ");
- }
- print(foo.toString());
-}
-
-void byteToString(String target)
-{
- if(target.length() == 0)
- return;
-
- try
- {
- byte b = Byte.parseByte(target, 16);
- String str = new String(new byte[] { b });
-
- StringBuffer foo = new StringBuffer();
- foo.append("" + target + " = " + str);
-
- print(foo.toString());
- }
- catch(NumberFormatException nfe)
- {
- Macros.error(view, "" + target + " is not valid hex string.");
- }
-}
-
-String target = Macros.input(view,"Byte to String:");
-if(target != null)
- byteToString(target);
-
-
-/*
-
-Macro index data (in DocBook format)
-
- <listitem>
- <para><filename>Hex_Convert.bsh</filename></para>
- <abstract><para>
- Converts byte characters to their hex equivalent, and vice versa.
- </para></abstract>
- </listitem>
-
-*/
-
-// end Hex_Convert.bsh
-
+/*
+ * Hex_Convert.bsh - a BeanShell macro script for the
+ * jEdit text editor - Converts byte characters to their
+ * hex equivalent, and vice versa.
+ * Copyright (C) 2001 Will Sargent
+ * will_sargent at yahoo.dom
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Hex_Convert.bsh 5224 2005-06-08 22:33:27Z orutherfurd $
+ */
+
+import java.io.*;
+import java.util.*;
+
+char[] hexDigit = new char[]
+{
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
+};
+
+String byteToHex(byte b)
+{
+ char[] chars = new char[]
+ {
+ hexDigit[(b >> 4) & 0x0f],
+ hexDigit[b & 0x0f]
+ };
+ return new String(chars);
+}
+
+void print(String line)
+{
+ Macros.message(view, line);
+}
+
+void stringToByte(String target)
+{
+ byte[] string = target.getBytes();
+
+ StringBuffer foo = new StringBuffer();
+ foo.append("before = " + target);
+ foo.append("\nafter = ");
+
+ int length = string.length;
+ for (int i = 0; i < length; i++)
+ {
+ foo.append("0x" + byteToHex(string[i]));
+ if (i < length - 1) foo.append(" ");
+ }
+ print(foo.toString());
+}
+
+void byteToString(String target)
+{
+ if(target.length() == 0)
+ return;
+
+ try
+ {
+ byte b = Byte.parseByte(target, 16);
+ String str = new String(new byte[] { b });
+
+ StringBuffer foo = new StringBuffer();
+ foo.append("" + target + " = " + str);
+
+ print(foo.toString());
+ }
+ catch(NumberFormatException nfe)
+ {
+ Macros.error(view, "" + target + " is not valid hex string.");
+ }
+}
+
+String target = Macros.input(view,"Byte to String:");
+if(target != null)
+ byteToString(target);
+
+
+/*
+
+Macro index data (in DocBook format)
+
+ <listitem>
+ <para><filename>Hex_Convert.bsh</filename></para>
+ <abstract><para>
+ Converts byte characters to their hex equivalent, and vice versa.
+ </para></abstract>
+ </listitem>
+
+*/
+
+// end Hex_Convert.bsh
+
diff --git a/jEdit/macros/Misc/HyperSearch_Results_to_Buffer.bsh b/jEdit/macros/Misc/HyperSearch_Results_to_Buffer.bsh
index 9a893ce..48c1233 100644
--- a/jEdit/macros/Misc/HyperSearch_Results_to_Buffer.bsh
+++ b/jEdit/macros/Misc/HyperSearch_Results_to_Buffer.bsh
@@ -1,98 +1,98 @@
-/*
- * HyperSearch_Results_to_Buffer.bsh - a Beanshell macro
- * for jEdit text that writes HyperSearch results
- * matches to a new buffer in the format:
- *
- * * <search string>
- * <filename> :<linenum>: <line text>
- *
- * Copyright (C) 2002, 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
- * 2008: Shlomy Reinstein - added search string and include all searches
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: HyperSearch_Results_to_Buffer.bsh 14007 2008-11-04 21:37:36Z shlomy $
- */
-
-traverseTree(javax.swing.tree.DefaultMutableTreeNode node, StringBuffer results){
- if (node.getUserObject() instanceof org.gjt.sp.jedit.search.HyperSearchFileNode)
- {
- path = node.getUserObject().path;
- match = node.getFirstChild();
- while(match != null)
- {
- text = match.getUserObject().str;
- results.append(path + " :" + text + "\n");
- match = match.getNextSibling();
- }
- }
- else
- {
- for (Enumeration e = node.children(); e.hasMoreElements();)
- traverseTree(e.nextElement(), results);
- }
-}
-
-writeHypersearchResultsToBuffer(View view){
- hs = view.getDockableWindowManager().getDockableWindow("hypersearch-results");
- if (hs == null)
- {
- Macros.error(view, "The 'HyperSearch Results' window is not open.");
- return;
- }
-
- root = hs.getTreeModel().getRoot();
- if(root == null || root.getDepth() == 0)
- {
- Macros.error(view, "No HyperSearch matches.");
- return;
- }
-
- results = new StringBuffer();
- node = root.getFirstChild();
- while(node != null)
- {
- Object object = node.getUserObject();
- if (! (object instanceof org.gjt.sp.jedit.search.HyperSearchOperationNode))
- continue;
- results.append("* " + object.getSearchMatcher() + "\n");
- traverseTree(node, results);
- node = node.getNextSibling();
- }
-
- text = results.toString();
- if(text.length() > 0)
- {
- jEdit.newFile(view);
- view.getTextArea().setText(text);
- }
-}
-
-setAccessibility(true);
-writeHypersearchResultsToBuffer(view);
-setAccessibility(false);
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>HyperSearch_Results_to_Buffer.bsh</filename></para>
- <abstract><para>
- Writes HyperSeach results to a new buffer.
- </para></abstract>
-</listitem>
-
-*/
-
-// :wrap=none:collapseFolds=0:noTabs=false:lineSeparator=\n:maxLineLen=80:indentSize=4:deepIndent=false:folding=none:
+/*
+ * HyperSearch_Results_to_Buffer.bsh - a Beanshell macro
+ * for jEdit text that writes HyperSearch results
+ * matches to a new buffer in the format:
+ *
+ * * <search string>
+ * <filename> :<linenum>: <line text>
+ *
+ * Copyright (C) 2002, 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
+ * 2008: Shlomy Reinstein - added search string and include all searches
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: HyperSearch_Results_to_Buffer.bsh 14007 2008-11-04 21:37:36Z shlomy $
+ */
+
+traverseTree(javax.swing.tree.DefaultMutableTreeNode node, StringBuffer results){
+ if (node.getUserObject() instanceof org.gjt.sp.jedit.search.HyperSearchFileNode)
+ {
+ path = node.getUserObject().path;
+ match = node.getFirstChild();
+ while(match != null)
+ {
+ text = match.getUserObject().str;
+ results.append(path + " :" + text + "\n");
+ match = match.getNextSibling();
+ }
+ }
+ else
+ {
+ for (Enumeration e = node.children(); e.hasMoreElements();)
+ traverseTree(e.nextElement(), results);
+ }
+}
+
+writeHypersearchResultsToBuffer(View view){
+ hs = view.getDockableWindowManager().getDockableWindow("hypersearch-results");
+ if (hs == null)
+ {
+ Macros.error(view, "The 'HyperSearch Results' window is not open.");
+ return;
+ }
+
+ root = hs.getTreeModel().getRoot();
+ if(root == null || root.getDepth() == 0)
+ {
+ Macros.error(view, "No HyperSearch matches.");
+ return;
+ }
+
+ results = new StringBuffer();
+ node = root.getFirstChild();
+ while(node != null)
+ {
+ Object object = node.getUserObject();
+ if (! (object instanceof org.gjt.sp.jedit.search.HyperSearchOperationNode))
+ continue;
+ results.append("* " + object.getSearchMatcher() + "\n");
+ traverseTree(node, results);
+ node = node.getNextSibling();
+ }
+
+ text = results.toString();
+ if(text.length() > 0)
+ {
+ jEdit.newFile(view);
+ view.getTextArea().setText(text);
+ }
+}
+
+setAccessibility(true);
+writeHypersearchResultsToBuffer(view);
+setAccessibility(false);
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>HyperSearch_Results_to_Buffer.bsh</filename></para>
+ <abstract><para>
+ Writes HyperSeach results to a new buffer.
+ </para></abstract>
+</listitem>
+
+*/
+
+// :wrap=none:collapseFolds=0:noTabs=false:lineSeparator=\n:maxLineLen=80:indentSize=4:deepIndent=false:folding=none:
diff --git a/jEdit/macros/Misc/Make_Bug_Report.bsh b/jEdit/macros/Misc/Make_Bug_Report.bsh
index f752a45..86bee2b 100644
--- a/jEdit/macros/Misc/Make_Bug_Report.bsh
+++ b/jEdit/macros/Misc/Make_Bug_Report.bsh
@@ -1,118 +1,118 @@
-/*
- * Make_Bug_Report.bsh - a BeanShell macro script for the
- * jEdit text editor - creates a new buffer with installation and
- * error information extracted from jEdit's Activity Log.
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Make_Bug_Report.bsh 3873 2001-11-06 17:57:35Z jgellene $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-makeBugReport()
-{
- Log.flushStream();
- path = jEdit.getSettingsDirectory() + File.separator
- + "activity.log";
- try
- {
- file = new FileInputStream(path);
- reader = new BufferedReader(new InputStreamReader(file));
- }
- catch(IOException e)
- {
- Macros.error(view, "Error opening Activity Log.");
- return;
- }
- report = new StringBuffer();
-
- report.append("Activity log entries that might be useful in a bug report:\n\n");
-
- lastError = new StringBuffer();
- insideError = false;
- startupDone = false;
- activityLogHeaderLines = 9;
- try
- {
- for(i = 0; i < activityLogHeaderLines; ++i)
- {
- report.append(reader.readLine()).append('\n');
- }
- while((line = reader.readLine()) != null)
- {
- if(!startupDone &&
- (line.startsWith("[message] jEdit:")
- || line.startsWith("[notice] jEdit:")
- || line.startsWith("[notice] JARClassLoader:")))
- {
- report.append(line).append('\n');
- if(line.equals("[message] jEdit: Startup complete"))
- {
- startupDone = true;
- }
- }
- else if(line.startsWith("[error]"))
- {
- if(!insideError)
- {
- lastError.setLength(0);
- insideError = true;
- }
- lastError.append(line).append('\n');
- }
- else
- insideError = false;
- }
- reader.close();
- }
- catch(IOException e)
- {
- Macros.error(view, "Error reading Activity Log");
- }
-
- report.append(lastError.toString());
- newBuffer = jEdit.newFile(view);
- newBuffer.insert(0, report.toString());
-}
-
-makeBugReport();
-
-/*
-jEdit macro index data (DocBook format)
-
- <listitem>
- <para><filename>Make_Bug_Report.bsh</filename></para>
- <abstract><para>
- Creates a new buffer with installation and error information
- extracted from the Activity Log.
- </para></abstract>
- <para>
- The macro extracts initial messages written to the Activity Log
- describing the user's operating system, JDK, jEdit version and
- installed plugins. It then appends the last set of error messages
- written to the Activity Log. The new text buffer can be saved and
- attached to an email message or a bug report made on SourceForge.
- </para>
- </listitem>
-
-*/
-
-// end Make_Bug_Report.bsh
-
+/*
+ * Make_Bug_Report.bsh - a BeanShell macro script for the
+ * jEdit text editor - creates a new buffer with installation and
+ * error information extracted from jEdit's Activity Log.
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Make_Bug_Report.bsh 3873 2001-11-06 17:57:35Z jgellene $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+makeBugReport()
+{
+ Log.flushStream();
+ path = jEdit.getSettingsDirectory() + File.separator
+ + "activity.log";
+ try
+ {
+ file = new FileInputStream(path);
+ reader = new BufferedReader(new InputStreamReader(file));
+ }
+ catch(IOException e)
+ {
+ Macros.error(view, "Error opening Activity Log.");
+ return;
+ }
+ report = new StringBuffer();
+
+ report.append("Activity log entries that might be useful in a bug report:\n\n");
+
+ lastError = new StringBuffer();
+ insideError = false;
+ startupDone = false;
+ activityLogHeaderLines = 9;
+ try
+ {
+ for(i = 0; i < activityLogHeaderLines; ++i)
+ {
+ report.append(reader.readLine()).append('\n');
+ }
+ while((line = reader.readLine()) != null)
+ {
+ if(!startupDone &&
+ (line.startsWith("[message] jEdit:")
+ || line.startsWith("[notice] jEdit:")
+ || line.startsWith("[notice] JARClassLoader:")))
+ {
+ report.append(line).append('\n');
+ if(line.equals("[message] jEdit: Startup complete"))
+ {
+ startupDone = true;
+ }
+ }
+ else if(line.startsWith("[error]"))
+ {
+ if(!insideError)
+ {
+ lastError.setLength(0);
+ insideError = true;
+ }
+ lastError.append(line).append('\n');
+ }
+ else
+ insideError = false;
+ }
+ reader.close();
+ }
+ catch(IOException e)
+ {
+ Macros.error(view, "Error reading Activity Log");
+ }
+
+ report.append(lastError.toString());
+ newBuffer = jEdit.newFile(view);
+ newBuffer.insert(0, report.toString());
+}
+
+makeBugReport();
+
+/*
+jEdit macro index data (DocBook format)
+
+ <listitem>
+ <para><filename>Make_Bug_Report.bsh</filename></para>
+ <abstract><para>
+ Creates a new buffer with installation and error information
+ extracted from the Activity Log.
+ </para></abstract>
+ <para>
+ The macro extracts initial messages written to the Activity Log
+ describing the user's operating system, JDK, jEdit version and
+ installed plugins. It then appends the last set of error messages
+ written to the Activity Log. The new text buffer can be saved and
+ attached to an email message or a bug report made on SourceForge.
+ </para>
+ </listitem>
+
+*/
+
+// end Make_Bug_Report.bsh
+
diff --git a/jEdit/macros/Misc/Run_Script.bsh b/jEdit/macros/Misc/Run_Script.bsh
index ffc1da1..8beb67a 100644
--- a/jEdit/macros/Misc/Run_Script.bsh
+++ b/jEdit/macros/Misc/Run_Script.bsh
@@ -1,126 +1,126 @@
-/*
- * Run_Script.bsh - a BeanShell macro script for the
- * jEdit text editor - Runs script using interpreter based upon
- * buffer's editing mode (by default, determined using file extension).
- *
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Run_Script.bsh 3912 2001-11-24 03:56:51Z jgellene $
- */
-
-
-void execScript(interpreter, command)
-{
- params = Macros.input(view,
- "Specify parameters for running script under " + interpreter);
- if(params == null)
- {
- Macros.message(view, "Script execution was cancelled.");
- return;
- }
- runInSystemShell(view, command + params);
-}
-
-void runScript()
-{
- if(buffer.isNewFile())
- buffer.saveAs(view, true);
- else
- buffer.save(view, buffer.getPath());
- mode = buffer.getMode().getName();
- path = buffer.getPath() + " ";
- os = System.getProperty("os.name");
- if(os.indexOf("Windows") != -1)
- path = "\"" + path + "\"";
- if(mode.equals("beanshell")) {
- source(path);
- }
- else if(mode.equals("awk")) {
- execScript("awk", "awk -f " + path);
- }
- else if(mode.equals("batch")) {
- if(os.indexOf("Windows 9") == -1
- && os.indexOf("Windows M") == -1)
- {
- execScript("shell", "cmd /C " + path);
- }
- else execScript("shell", "command /C " + path);
- }
- else if(mode.equals("javascript")) {
- execScript("Windows Script Host", "wscript " + path);
- }
- else if(mode.equals("jmk")) {
- execScript("jmk", "java -jar jmk.jar -f" + path);
- }
- else if(mode.equals("makefile")) {
- if(os.indexOf("Windows") == -1) {
- execScript("make", "make -f " + path);
- }
- else {
- execScript("nmake", "nmake -f " + path);
- }
- }
- else if(mode.equals("netrexx")) {
- execScript("NetRexx", "NetRexxC -exec " + path);
- }
- else if(mode.equals("perl")) {
- execScript("perl", "perl " + path);
- }
- else if(mode.equals("python")) {
- execScript("python", "python " + path);
- }
- else if(mode.equals("ruby")) {
- execScript("ruby", "ruby " + path);
- }
- else if(mode.equals("scheme")) {
- execScript("scheme", "scheme -load " + path);
- }
- else if(mode.equals("shellscript")) {
- execScript("shell", "bash " + path);
- }
- else if(mode.equals("tcl")) {
- execScript("tcl", "tcl " + path);
- }
- else if(mode.equals("vbscript")) {
- execScript("Windows Script Host", "wscript " + path);
- }
- else {
- Macros.error(view,
- "The current file does not appear to be a script.");
- }
-}
-
-runScript();
-
-
-/*
-
-Macro index data (in DocBook format)
-
- <listitem>
- <para><filename>Run_Script.bsh</filename></para>
- <abstract><para>
- Runs script using interpreter based upon buffer's editing mode
- (by default, determined using file extension).
- </para></abstract>
- </listitem>
-
-*/
-
-// end Run_Script.bsh
+/*
+ * Run_Script.bsh - a BeanShell macro script for the
+ * jEdit text editor - Runs script using interpreter based upon
+ * buffer's editing mode (by default, determined using file extension).
+ *
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Run_Script.bsh 16858 2010-01-07 01:45:03Z ezust $
+ */
+
+
+void execScript(interpreter, command)
+{
+ params = Macros.input(view,
+ "Specify parameters for running script under " + interpreter);
+ if(params == null)
+ {
+ Macros.message(view, "Script execution was cancelled.");
+ return;
+ }
+ runInSystemShell(view, command + params);
+}
+
+void runScript()
+{
+ if(buffer.isNewFile())
+ buffer.saveAs(view, true);
+ else
+ buffer.save(view, buffer.getPath());
+ mode = buffer.getMode().getName();
+ path = buffer.getPath() ;
+ os = System.getProperty("os.name");
+ if(os.indexOf("Windows") != -1)
+ path = "\"" + path + "\"";
+ if(mode.equals("beanshell")) {
+ source(path);
+ }
+ else if(mode.equals("awk")) {
+ execScript("awk", "awk -f " + path);
+ }
+ else if(mode.equals("batch")) {
+ if(os.indexOf("Windows 9") == -1
+ && os.indexOf("Windows M") == -1)
+ {
+ execScript("shell", "cmd /C " + path);
+ }
+ else execScript("shell", "command /C " + path);
+ }
+ else if(mode.equals("javascript")) {
+ execScript("Windows Script Host", "wscript " + path);
+ }
+ else if(mode.equals("jmk")) {
+ execScript("jmk", "java -jar jmk.jar -f" + path);
+ }
+ else if(mode.equals("makefile")) {
+ if(os.indexOf("Windows") == -1) {
+ execScript("make", "make -f " + path);
+ }
+ else {
+ execScript("nmake", "nmake -f " + path);
+ }
+ }
+ else if(mode.equals("netrexx")) {
+ execScript("NetRexx", "NetRexxC -exec " + path);
+ }
+ else if(mode.equals("perl")) {
+ execScript("perl", "perl " + path);
+ }
+ else if(mode.equals("python")) {
+ execScript("python", "python " + path);
+ }
+ else if(mode.equals("ruby")) {
+ execScript("ruby", "ruby " + path);
+ }
+ else if(mode.equals("scheme")) {
+ execScript("scheme", "scheme -load " + path);
+ }
+ else if(mode.equals("shellscript")) {
+ execScript("shell", "bash " + path);
+ }
+ else if(mode.equals("tcl")) {
+ execScript("tcl", "tcl " + path);
+ }
+ else if(mode.equals("vbscript")) {
+ execScript("Windows Script Host", "wscript " + path);
+ }
+ else {
+ Macros.error(view,
+ "The current file does not appear to be a script.");
+ }
+}
+
+runScript();
+
+
+/*
+
+Macro index data (in DocBook format)
+
+ <listitem>
+ <para><filename>Run_Script.bsh</filename></para>
+ <abstract><para>
+ Runs script using interpreter based upon buffer's editing mode
+ (by default, determined using file extension).
+ </para></abstract>
+ </listitem>
+
+*/
+
+// end Run_Script.bsh
diff --git a/jEdit/macros/Misc/Show_Threads.bsh b/jEdit/macros/Misc/Show_Threads.bsh
index 208fa51..11d1531 100644
--- a/jEdit/macros/Misc/Show_Threads.bsh
+++ b/jEdit/macros/Misc/Show_Threads.bsh
@@ -1,150 +1,150 @@
-/* Show_Threads.bsh
- *
- * A BeanShell macro script for jEdit - displays all threads in a tree.
- *
- * Copyright (c) 2001 Dirk Moebius (dmoebius at gmx.net)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- *
- * Version 1.0
- * requires JDK 1.1, jEdit3.1
- *
- * $Id: Show_Threads.bsh 4001 2002-01-31 05:35:49Z spestov $
- */
-
-
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.tree.*;
-
-
-JFrame createThreadsFrame() {
-
- void windowClosing(WindowEvent e) {
- GUIUtilities.saveGeometry(frame, "macros-show-threads");
- }
-
-
- void keyPressed(KeyEvent e) {
- if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
- GUIUtilities.saveGeometry(frame, "macros-show-threads");
- frame.setVisible(false);
- frame.dispose();
- }
- else if (e.getKeyCode() == KeyEvent.VK_U) {
- tree.setModel(new DefaultTreeModel(createModel()));
- tree.revalidate();
- }
- }
-
-
- // Having these members of KeyListener and WindowListener implemented as
- // no-ops will speedup execution. Otherwise BeanShell throws an
- // exception each time one of these events occur.
- void keyReleased(KeyEvent e) { }
- void keyTyped(KeyEvent e) { }
- void windowActivated(WindowEvent e) { }
- void windowClosed(WindowEvent e) { }
- void windowDeactivated(WindowEvent e) { }
- void windowDeiconified(WindowEvent e) { }
- void windowIconified(WindowEvent e) { }
- void windowOpened(WindowEvent e) { }
-
-
- ThreadGroup getMainThreadGroup() {
- t = Thread.currentThread();
- g = t.getThreadGroup();
- while (g.getParent() != null)
- g = g.getParent();
- return g;
- }
-
-
- DefaultMutableTreeNode createModel() {
- g = getMainThreadGroup();
- return createGroupNode(g);
- }
-
-
- DefaultMutableTreeNode createGroupNode(ThreadGroup g) {
- node = new DefaultMutableTreeNode(g.getName() + (g.isDaemon() ? " (daemon)" : ""), true);
-
- groups = new ThreadGroup[g.activeGroupCount()];
- count = g.enumerate(groups, false);
- for (int i = 0; i < count; ++i)
- node.add(createGroupNode(groups[i]));
-
- threads = new Thread[g.activeCount()];
- count = g.enumerate(threads, false);
- for (int i = 0; i < count; ++i)
- node.add(new DefaultMutableTreeNode(getDescription(threads[i]), false));
-
- return node;
- }
-
-
- String getDescription(Thread t) {
- StringBuffer buf = new StringBuffer(t.getName());
- buf.append(" (prio ");
- buf.append(t.getPriority());
- if (!t.isAlive())
- buf.append(", not started");
- if (t.isDaemon())
- buf.append(", daemon");
- if (t.isInterrupted())
- buf.append(", interrupted");
- buf.append(")");
- return buf.toString();
- }
-
-
- tree = new JTree(createModel());
- tree.putClientProperty("JTree.lineStyle", "Angled");
- tree.addKeyListener(this);
-
- stage = new JScrollPane(tree);
- stage.setColumnHeaderView(new JLabel("[Esc] Close [U] Update"));
-
- frame = new JFrame("Current Threads");
- frame.setContentPane(stage);
- frame.addWindowListener(this);
- // set default size and position:
- frame.setSize(new Dimension(400, 400)); // faster than pack()
- // overwrite default size and position loading user properties:
- GUIUtilities.loadGeometry(frame, "macros-show-threads");
- frame.setVisible(true);
-
- return frame;
-}
-
-
-createThreadsFrame();
-
-/*
-
-Macro index data (in DocBook format)
-
- <listitem>
- <para><filename>Show_Threads.bsh</filename></para>
- <abstract><para>
- Displays all running Java threads in a tree.
- </para></abstract>
- </listitem>
-
-*/
-
-// end Show_Threads.bsh
-
+/* Show_Threads.bsh
+ *
+ * A BeanShell macro script for jEdit - displays all threads in a tree.
+ *
+ * Copyright (c) 2001 Dirk Moebius (dmoebius at gmx.net)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Version 1.0
+ * requires JDK 1.1, jEdit3.1
+ *
+ * $Id: Show_Threads.bsh 4001 2002-01-31 05:35:49Z spestov $
+ */
+
+
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.tree.*;
+
+
+JFrame createThreadsFrame() {
+
+ void windowClosing(WindowEvent e) {
+ GUIUtilities.saveGeometry(frame, "macros-show-threads");
+ }
+
+
+ void keyPressed(KeyEvent e) {
+ if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ GUIUtilities.saveGeometry(frame, "macros-show-threads");
+ frame.setVisible(false);
+ frame.dispose();
+ }
+ else if (e.getKeyCode() == KeyEvent.VK_U) {
+ tree.setModel(new DefaultTreeModel(createModel()));
+ tree.revalidate();
+ }
+ }
+
+
+ // Having these members of KeyListener and WindowListener implemented as
+ // no-ops will speedup execution. Otherwise BeanShell throws an
+ // exception each time one of these events occur.
+ void keyReleased(KeyEvent e) { }
+ void keyTyped(KeyEvent e) { }
+ void windowActivated(WindowEvent e) { }
+ void windowClosed(WindowEvent e) { }
+ void windowDeactivated(WindowEvent e) { }
+ void windowDeiconified(WindowEvent e) { }
+ void windowIconified(WindowEvent e) { }
+ void windowOpened(WindowEvent e) { }
+
+
+ ThreadGroup getMainThreadGroup() {
+ t = Thread.currentThread();
+ g = t.getThreadGroup();
+ while (g.getParent() != null)
+ g = g.getParent();
+ return g;
+ }
+
+
+ DefaultMutableTreeNode createModel() {
+ g = getMainThreadGroup();
+ return createGroupNode(g);
+ }
+
+
+ DefaultMutableTreeNode createGroupNode(ThreadGroup g) {
+ node = new DefaultMutableTreeNode(g.getName() + (g.isDaemon() ? " (daemon)" : ""), true);
+
+ groups = new ThreadGroup[g.activeGroupCount()];
+ count = g.enumerate(groups, false);
+ for (int i = 0; i < count; ++i)
+ node.add(createGroupNode(groups[i]));
+
+ threads = new Thread[g.activeCount()];
+ count = g.enumerate(threads, false);
+ for (int i = 0; i < count; ++i)
+ node.add(new DefaultMutableTreeNode(getDescription(threads[i]), false));
+
+ return node;
+ }
+
+
+ String getDescription(Thread t) {
+ StringBuffer buf = new StringBuffer(t.getName());
+ buf.append(" (prio ");
+ buf.append(t.getPriority());
+ if (!t.isAlive())
+ buf.append(", not started");
+ if (t.isDaemon())
+ buf.append(", daemon");
+ if (t.isInterrupted())
+ buf.append(", interrupted");
+ buf.append(")");
+ return buf.toString();
+ }
+
+
+ tree = new JTree(createModel());
+ tree.putClientProperty("JTree.lineStyle", "Angled");
+ tree.addKeyListener(this);
+
+ stage = new JScrollPane(tree);
+ stage.setColumnHeaderView(new JLabel("[Esc] Close [U] Update"));
+
+ frame = new JFrame("Current Threads");
+ frame.setContentPane(stage);
+ frame.addWindowListener(this);
+ // set default size and position:
+ frame.setSize(new Dimension(400, 400)); // faster than pack()
+ // overwrite default size and position loading user properties:
+ GUIUtilities.loadGeometry(frame, "macros-show-threads");
+ frame.setVisible(true);
+
+ return frame;
+}
+
+
+createThreadsFrame();
+
+/*
+
+Macro index data (in DocBook format)
+
+ <listitem>
+ <para><filename>Show_Threads.bsh</filename></para>
+ <abstract><para>
+ Displays all running Java threads in a tree.
+ </para></abstract>
+ </listitem>
+
+*/
+
+// end Show_Threads.bsh
+
diff --git a/jEdit/macros/Properties/Create_Plugin_Announcement.bsh b/jEdit/macros/Properties/Create_Plugin_Announcement.bsh
index 42017f3..a0e6e12 100644
--- a/jEdit/macros/Properties/Create_Plugin_Announcement.bsh
+++ b/jEdit/macros/Properties/Create_Plugin_Announcement.bsh
@@ -1,335 +1,442 @@
-/*
- * Create_plugin_release_text.bsh - a BeanShell macro script for the
- * jEdit text editor - Parses a plugin's properties file to create the
- * text for a plugin submission
- * Copyright ( C ) 2006 Jeffrey Hoyt
- * jchoyt at jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- */
-
-
-// import statements
-import javax.swing.border.*;
-
-// main routine
-void pluginTextDialog( View view, Buffer buffer )
-{
- this.view = view;
- this.buffer=buffer;
-
- File propsFile = new File( buffer.getPath() );
- Properties props = new Properties();
- InputStream in = new FileInputStream( propsFile );
- try
- {
- props.load( in );
- }
- finally
- {
- in.close();
- }
-
- //setup the strings we are interested in and can get from the props file
- String fileName = propsFile.getName();
- String pluginName = fileName.substring( 0, fileName.indexOf( '.' ) );
- String version = null;
- String jEditDependency = null;
- String javaDependency = null;
- String activate = null;
- ArrayList pluginDependencies = new ArrayList();
- ArrayList optionalPluginDependencies = new ArrayList();
- String announcement, shortDescription, source;
- String longDescription="";
- String classname=null;
- String longDescriptionFileName=null;
-
- //extract the properties we care about
- String start = "plugin.";
- for ( Enumeration e = props.keys(); e.hasMoreElements() ; )
- {
- String key = ( String ) e.nextElement();
- // Log.log( Log.DEBUG, this, "Parsing key: " + key );
- if( key.startsWith( start ) )
- {
- if( key.endsWith( ".activate" ) )
- {
- activate = props.getProperty( key );
- }
- else if( key.endsWith( ".version" ) )
- {
- version = props.getProperty( key );
- }
- else if( key.indexOf( ".depend." ) != -1 )
- {
- String value = props.getProperty( key ).trim();
- String[] parts = value.split( " " );
- if( parts.length < 2 )
- {
- Macros.error( view, "Badly constructed dependency ( " + value + " ). All dependencies must have at least 2 parts" );
- }
- if( parts[0].equals( "jedit" ) )
- {
- jEditDependency = parts[1];
- }
- else if( parts[0].equals( "jdk" ) )
- {
- javaDependency = parts[1];
- }
- else if( parts[0].equals( "plugin" ) )
- {
- pluginDependencies.add( parts[1] + " " + parts[2] );
- }
- else if( parts[0].equals( "optional" ) && parts[1].equals( "plugin" ) )
- {
- optionalPluginDependencies.add( parts[2] + " " + parts[3] );
- }
- else
- {
- Macros.error( view, "Unexpected dependency ( " + value + " ). See the javadoc of org.gjt.sp.jedit.EditPlugin" );
- }
- }
- else if(key.endsWith(".longdescription") )
- {
- longDescriptionFileName = props.getProperty( key );
- }
- else if(key.endsWith(".description") )
- {
- shortDescription = props.getProperty( key );
- }
- else if(key.endsWith(".name") )
- {
- if (props.getProperty( key ).equals(pluginName))
- {
- classname = key.substring( start.length(), key.length() - 5 );
- // Macros.error( view, "Classname is " + classname );
- }
- }
- }
- }
- // Macros.error( view, "Parsing complete" );
-
- if( javaDependency==null )
- {
- Macros.error( view, "You must supply a JDK dependency. Please add it and rerun the macro." );
- return;
- }
- if( jEditDependency==null )
- {
- Macros.error( view, "You must supply a jEdit dependency. Please add it and rerun the macro." );
- return;
- }
- if( shortDescription==null )
- {
- Macros.error( view, "You must supply a short description in the plugin." + classname + ".description property. Please add it and rerun the macro." );
- return;
- }
- if( longDescriptionFileName==null )
- {
- longDescriptionFileName = "description.html";
- // Macros.error(view, "setting default long description file");
- }
-
- //load the long description
- File descriptionFile = new File( new File(buffer.getPath()).getParent(), longDescriptionFileName );
- if(!descriptionFile.exists())
- {
- Macros.error( view, "You must supply a long description in a file located at " + descriptionFile.getPath() + ". Please create it and rerun the macro." );
- return;
- }
- BufferedReader reader = new BufferedReader( new FileReader( descriptionFile ) );
- try
- {
- String line;
- while( (line = reader.readLine())!=null )
- {
- longDescription = longDescription + line + "\n";
- }
- }
- finally
- {
- reader.close();
- }
-
- // create dialog object and set its features
- title = "Create Plugin Announcement";
- dialog = new JDialog( view, title, false );
- content = new JPanel( new BorderLayout() );
- content.setBorder( new EmptyBorder( 12, 12, 12, 12 ) );
- dialog.setContentPane( content );
-
- // add to the dialog a panel containing the text fields for
- // entry of the prefix and suffix text
- propsPanel = new JPanel( new GridLayout( 5 + pluginDependencies.size() + optionalPluginDependencies.size() , 2, 2, 6 ) );
- propsPanel.add( new JLabel( "Plugin name" ) );
- propsPanel.add( new JLabel( pluginName ) );
- propsPanel.add( new JLabel( "Plugin version" ) );
- propsPanel.add( new JLabel( version ) );
- propsPanel.add( new JLabel( "Activates" ) );
- propsPanel.add( new JLabel( activate ) );
- propsPanel.add( new JLabel( "jEdit Dependency" ) );
- propsPanel.add( new JLabel( jEditDependency ) );
- propsPanel.add( new JLabel( "JDK Dependency" ) );
- propsPanel.add( new JLabel( javaDependency ) );
- for( int i=0; i<pluginDependencies.size(); i++ )
- {
- propsPanel.add( new JLabel( "Depends on" ) );
- propsPanel.add( new JLabel( pluginDependencies.get( i ).toString() ) );
- }
- for( int i=0; i<optionalPluginDependencies.size(); i++ )
- {
- propsPanel.add( new JLabel( "Optional" ) );
- propsPanel.add( new JLabel( optionalPluginDependencies.get( i ).toString() ) );
- }
- content.add( propsPanel, "Center" );
-
- //add areas for source location, Announcement, Short Description, and Long Description
- descriptionPanel = new JPanel();
- descriptionPanel.setLayout( new BoxLayout( descriptionPanel, BoxLayout.Y_AXIS ) );
- descriptionPanel.setBorder(new EmptyBorder(12, 5, 0, 5));
-
- descriptionPanel.add( new JLabel( "Source Code Location (SVN and tag, or URL): " ) );
- sourceArea = new JEditorPane();
- sourceArea.setText("Source code is in SVN with the tag XXXX (no SVN release numbers, please)");
- sourceArea.setPreferredSize( new Dimension( 250, 36 ) );
- descriptionPanel.add( new JScrollPane( sourceArea ) );
-
- descriptionPanel.add( new JLabel( "Announcement: " ) );
- announcementArea = new JEditorPane();
- announcementArea.setPreferredSize( new Dimension( 250, 120 ) );
- descriptionPanel.add( new JScrollPane( announcementArea ) );
-
- descriptionPanel.add( new JLabel( "Short Description ( for new plugins or updated descriptions only ): " ) );
- shortDescriptionArea = new JEditorPane("text/plain", shortDescription);
- shortDescriptionArea.disable();
- shortDescriptionArea.setPreferredSize( new Dimension( 250, 72 ) );
- descriptionPanel.add( new JScrollPane( shortDescriptionArea ) );
-
- descriptionPanel.add( new JLabel( "Long Description ( for new plugins or updated descriptions only ): " ) );
- longDescriptionArea = new JEditorPane("text/plain", longDescription);
- longDescriptionArea.disable();
- longDescriptionArea.setPreferredSize( new Dimension( 250, 120 ) );
- descriptionPanel.add( new JScrollPane( longDescriptionArea ) );
-
- //add buttons to description panel
- buttonPanel = new JPanel();
- buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.X_AXIS ) );
- ok = new JButton( "Create Announcement" );
- buttonPanel.add( ok );
- cancel = new JButton( "Cancel" );
- buttonPanel.add( cancel );
- descriptionPanel.add( buttonPanel );
- content.add( descriptionPanel, "South" );
-
- // register this method as an ActionListener for
- // the buttons and text fields
- ok.addActionListener( this );
- cancel.addActionListener( this );
-
- // locate the dialog in the center of the
- // editing pane and make it visible
- dialog.pack();
- dialog.setLocationRelativeTo( view );
- dialog.setDefaultCloseOperation( JDialog.DISPOSE_ON_CLOSE );
- dialog.setVisible( true );
-
- // this method will be called when a button is clicked
- // or when ENTER is pressed
- void actionPerformed( e )
- {
- if( e.getSource() != cancel )
- {
- createAnnouncement();
- }
- dialog.dispose();
- }
-
- void createAnnouncement()
- {
- announcement = announcementArea.getText();
- shortDescription = shortDescriptionArea.getText();
- longDescription = longDescriptionArea.getText();
- source = sourceArea.getText();
- StringBuffer ret = new StringBuffer();
- ret.append( "Paste the text below into the Plugin Central Submission Tracker at https://sourceforge.net/tracker/?group_id=588&atid=625093\n" );
- ret.append( "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" );
- ret.append( "\n{{{ " );
- ret.append( pluginName );
- ret.append( " " );
- ret.append( version );
- ret.append( "\n Source: " );
- ret.append( source );
- ret.append( "\n Announcement: " + announcement.replaceAll("\n", "\n " ) );
- ret.append( "\n Requires Java " );
- ret.append( javaDependency );
- ret.append( "\n Requires jEdit " );
- ret.append( jEditDependency );
- if( pluginDependencies.size() > 0 )
- {
- ret.append( "\n Required plugins: " );
- for( int i=0; i<pluginDependencies.size(); i++ )
- {
- ret.append( "\n " );
- ret.append( pluginDependencies.get( i ) );
- }
- }
- if( optionalPluginDependencies.size() > 0 )
- {
- ret.append( "\n Optional plugins: " );
- for( int i=0; i<optionalPluginDependencies.size(); i++ )
- {
- ret.append( "\n " );
- ret.append( optionalPluginDependencies.get( i ) );
- }
- }
- if( shortDescription!=null && !shortDescription.equals( "" ) )
- {
- ret.append( "\n \n Short Description: " + shortDescription );
- }
- if( longDescription!=null && !longDescription.equals( "" ) )
- {
- ret.append( "\n \n Long Description: " + longDescription );
- }
- ret.append( " }}}" );
- newbuf = jEdit.newFile( view );
- newbuf.insert( 0, ret.toString() );
- }
-}
-
-// this single line of code is the script's main routine
-// it calls the methods and exits
-if( buffer.getMode().toString().equals( "properties" ) )
- pluginTextDialog( view, buffer );
-else
- Macros.error( view, "This must be run on a jEdit plugin's properties file. \nOpen your Plugin's props file and rerun this macro." );
-
-/*
- Macro index data ( in DocBook format )
-
-<listitem>
- <para><filename>Create_Plugin_Announcement.bsh</filename></para>
- <abstract><para>
- Creates a machine-parsable version of the release announcement from the source files and minimal user input.
- The wiz can then read this file and do the release automatically.
- </para></abstract>
- <para>
- Creates a machine-parsable version of the release announcement from the source files and minimal user input.
- The wiz can then read this file and do the release automatically.
- </para>
-</listitem>
-
-*/
-
+/*
+ * Create_plugin_release_text.bsh - a BeanShell macro script for the
+ * jEdit text editor - Parses a plugin's properties file to create the
+ * text for a plugin submission
+ * Copyright ( C ) 2006 Jeffrey Hoyt
+ * jchoyt at jedit.org
+ * Eric Berry <elberry at users.sourceforge.net> (version checking 2010)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+// import statements
+import javax.swing.border.*;
+import org.gjt.sp.util.Log;
+import java.util.Comparator;
+
+public class PluginDependency
+{
+ public String className;
+ public String simpleName;
+ public String version;
+
+ public PluginDependency(String cn, String v)
+ {
+ className = cn;
+ version = v;
+ simpleName = jEdit.getProperty("plugin." + cn + ".name");
+ if(simpleName != null)
+ {
+ simpleName = simpleName.trim();
+ }
+ if(simpleName == null || simpleName.length() <= 0)
+ {
+ int lastDotIndex = cn.lastIndexOf(".");
+ simpleName = cn.substring(lastDotIndex + 1);
+ }
+ Log.log(Log.DEBUG, this, "new PluginDependency class: " + className + " | name: " + simpleName + " | version: " + version);
+ }
+}
+
+public class PluginDependencyNameComparator implements Comparator
+{
+ public int compare(Object o1, Object o2)
+ {
+ PluginDependency pd1 = (PluginDependency)o1;
+ PluginDependency pd2 = (PluginDependency)o2;
+ return pd1.simpleName.compareTo(pd2.simpleName);
+ }
+}
+
+// main routine
+void pluginTextDialog( View view, Buffer buffer )
+{
+ this.view = view;
+ this.buffer=buffer;
+
+ File propsFile = new File( buffer.getPath() );
+ Properties props = new Properties();
+ InputStream in = new FileInputStream( propsFile );
+ try
+ {
+ props.load( in );
+ }
+ finally
+ {
+ in.close();
+ }
+
+ //setup the strings we are interested in and can get from the props file
+ String fileName = propsFile.getName();
+ String pluginName = fileName.substring( 0, fileName.indexOf( '.' ) );
+ String version = null;
+ String jEditDependency = null;
+ String javaDependency = null;
+ String activate = null;
+ ArrayList pluginDependencies = new ArrayList();
+ ArrayList optionalPluginDependencies = new ArrayList();
+ String announcement, shortDescription, source;
+ String longDescription="";
+ String classname=null;
+ String longDescriptionFileName=null;
+
+ //extract the properties we care about
+ String start = "plugin.";
+ for ( Enumeration e = props.keys(); e.hasMoreElements() ; )
+ {
+ String key = ( String ) e.nextElement();
+ // Log.log( Log.DEBUG, this, "Parsing key: " + key );
+ if( key.startsWith( start ) )
+ {
+ if( key.endsWith( ".activate" ) )
+ {
+ activate = props.getProperty( key );
+ }
+ else if( key.endsWith( ".version" ) )
+ {
+ version = props.getProperty( key );
+ }
+ else if( key.indexOf( ".depend." ) != -1 )
+ {
+ String value = props.getProperty( key ).trim();
+ String[] parts = value.split( " " );
+ if( parts.length < 2 )
+ {
+ Macros.error( view, "Badly constructed dependency ( " + value + " ). All dependencies must have at least 2 parts" );
+ }
+ if( parts[0].equals( "jedit" ) )
+ {
+ jEditDependency = parts[1];
+ }
+ else if( parts[0].equals( "jdk" ) )
+ {
+ javaDependency = parts[1];
+ }
+ else if( parts[0].equals( "plugin" ) )
+ {
+ Log.log(Log.DEBUG, this, "required plugin name - class: " + parts[1] + " | name: " + jEdit.getProperty("plugin." + parts[1] + ".name"));
+ pluginDependencies.add(new PluginDependency(parts[1], parts[2]));
+ }
+ else if( parts[0].equals( "optional" ) && parts[1].equals( "plugin" ) )
+ {
+ Log.log(Log.DEBUG, this, "optional plugin name - class: " + parts[2] + " | name: " + jEdit.getProperty("plugin." + parts[2] + ".name"));
+ optionalPluginDependencies.add(new PluginDependency(parts[2], parts[3]));
+ }
+ else
+ {
+ Macros.error( view, "Unexpected dependency ( " + value + " ). See the javadoc of org.gjt.sp.jedit.EditPlugin" );
+ }
+ }
+ else if(key.endsWith(".longdescription") )
+ {
+ longDescriptionFileName = props.getProperty( key );
+ }
+ else if(key.endsWith(".description") )
+ {
+ shortDescription = props.getProperty( key );
+ }
+ else if(key.endsWith(".name") )
+ {
+ if (props.getProperty( key ).equals(pluginName))
+ {
+ classname = key.substring( start.length(), key.length() - 5 );
+ // Macros.error( view, "Classname is " + classname );
+ }
+ }
+ }
+ }
+ // Macros.error( view, "Parsing complete" );
+
+ if( javaDependency==null )
+ {
+ Macros.error( view, "You must supply a JDK dependency. Please add it and rerun the macro." );
+ return;
+ }
+ if( jEditDependency==null )
+ {
+ Macros.error( view, "You must supply a jEdit dependency. Please add it and rerun the macro." );
+ return;
+ }
+ if( shortDescription==null )
+ {
+ Macros.error( view, "You must supply a short description in the plugin." + classname + ".description property. Please add it and rerun the macro." );
+ return;
+ }
+ if( longDescriptionFileName==null )
+ {
+ longDescriptionFileName = "description.html";
+ // Macros.error(view, "setting default long description file");
+ }
+
+ //load the long description
+ File descriptionFile = new File( new File(buffer.getPath()).getParent(), longDescriptionFileName );
+ if(!descriptionFile.exists())
+ {
+ Macros.error( view, "You must supply a long description in a file located at " + descriptionFile.getPath() + ". Please create it and rerun the macro." );
+ return;
+ }
+ BufferedReader reader = new BufferedReader( new FileReader( descriptionFile ) );
+ try
+ {
+ String line;
+ while( (line = reader.readLine())!=null )
+ {
+ longDescription = longDescription + line + "\n";
+ }
+ }
+ finally
+ {
+ reader.close();
+ }
+
+ // create dialog object and set its features
+ title = "Create Plugin Announcement";
+ dialog = new JDialog( view, title, false );
+ content = new JPanel( new BorderLayout() );
+ content.setBorder( new EmptyBorder( 12, 12, 12, 12 ) );
+ dialog.setContentPane( content );
+
+ // add to the dialog a panel containing the text fields for
+ // entry of the prefix and suffix text
+ propsPanel = new JPanel( new GridLayout( 5 + pluginDependencies.size() + optionalPluginDependencies.size() , 2, 2, 6 ) );
+ propsPanel.add( new JLabel( "Plugin name" ) );
+ propsPanel.add( new JLabel( pluginName ) );
+ propsPanel.add( new JLabel( "Plugin version" ) );
+ propsPanel.add( new JLabel( version ) );
+ propsPanel.add( new JLabel( "Activates" ) );
+ propsPanel.add( new JLabel( activate ) );
+ propsPanel.add( new JLabel( "jEdit Dependency" ) );
+ propsPanel.add( new JLabel( jEditDependency ) );
+ propsPanel.add( new JLabel( "JDK Dependency" ) );
+ propsPanel.add( new JLabel( javaDependency ) );
+ PluginDependencyNameComparator comparator = new PluginDependencyNameComparator();
+ Collections.sort(pluginDependencies, comparator);
+ Collections.sort(optionalPluginDependencies, comparator);
+ for( int i=0; i<pluginDependencies.size(); i++ )
+ {
+ propsPanel.add( new JLabel( "Depends on" ) );
+ PluginDependency requiredPlugin = pluginDependencies.get( i );
+ propsPanel.add( new JLabel( requiredPlugin.simpleName + " " + requiredPlugin.version ) );
+ }
+ for( int i=0; i<optionalPluginDependencies.size(); i++ )
+ {
+ propsPanel.add( new JLabel( "Optional" ) );
+ PluginDependency optionalPlugin = optionalPluginDependencies.get( i );
+ propsPanel.add( new JLabel( optionalPlugin.simpleName + " " + optionalPlugin.version ) );
+ }
+ content.add( propsPanel, "Center" );
+
+ //add areas for source location, Announcement, Short Description, and Long Description
+ descriptionPanel = new JPanel();
+ descriptionPanel.setLayout( new BoxLayout( descriptionPanel, BoxLayout.Y_AXIS ) );
+ descriptionPanel.setBorder(new EmptyBorder(12, 5, 0, 5));
+
+ descriptionPanel.add( new JLabel( "Source Code Location (SVN and tag, or URL): " ) );
+ sourceArea = new JEditorPane();
+ sourceArea.setText("Source code is in SVN with the tag XXXX (no SVN release numbers, please)");
+ sourceArea.setPreferredSize( new Dimension( 250, 36 ) );
+ descriptionPanel.add( new JScrollPane( sourceArea ) );
+
+ descriptionPanel.add( new JLabel( "Announcement: " ) );
+ announcementArea = new JEditorPane();
+ announcementArea.setPreferredSize( new Dimension( 250, 120 ) );
+ descriptionPanel.add( new JScrollPane( announcementArea ) );
+
+ descriptionPanel.add( new JLabel( "Short Description ( for new plugins or updated descriptions only ): " ) );
+ shortDescriptionArea = new JEditorPane("text/plain", shortDescription);
+ shortDescriptionArea.disable();
+ shortDescriptionArea.setPreferredSize( new Dimension( 250, 72 ) );
+ descriptionPanel.add( new JScrollPane( shortDescriptionArea ) );
+
+ descriptionPanel.add( new JLabel( "Long Description ( for new plugins or updated descriptions only ): " ) );
+ longDescriptionArea = new JEditorPane("text/plain", longDescription);
+ longDescriptionArea.disable();
+ longDescriptionArea.setPreferredSize( new Dimension( 250, 120 ) );
+ descriptionPanel.add( new JScrollPane( longDescriptionArea ) );
+
+ //add buttons to description panel
+ buttonPanel = new JPanel();
+ buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.X_AXIS ) );
+ ok = new JButton( "Create Announcement" );
+ buttonPanel.add( ok );
+ cancel = new JButton( "Cancel" );
+ buttonPanel.add( cancel );
+ descriptionPanel.add( buttonPanel );
+ content.add( descriptionPanel, "South" );
+
+ // register this method as an ActionListener for
+ // the buttons and text fields
+ ok.addActionListener( this );
+ cancel.addActionListener( this );
+
+ // locate the dialog in the center of the
+ // editing pane and make it visible
+ dialog.pack();
+ dialog.setLocationRelativeTo( view );
+ dialog.setDefaultCloseOperation( JDialog.DISPOSE_ON_CLOSE );
+ dialog.setVisible( true );
+
+ // this method will be called when a button is clicked
+ // or when ENTER is pressed
+ void actionPerformed( e )
+ {
+ if( e.getSource() != cancel )
+ {
+ if(validateVersions()) {
+ createAnnouncement();
+ }
+ }
+ dialog.dispose();
+ }
+
+ void createAnnouncement()
+ {
+ announcement = announcementArea.getText();
+ shortDescription = shortDescriptionArea.getText();
+ longDescription = longDescriptionArea.getText();
+ source = sourceArea.getText();
+ StringBuffer ret = new StringBuffer();
+ ret.append( "Paste the text below into the Plugin Central Submission Tracker at https://sourceforge.net/tracker/?group_id=588&atid=625093\n" );
+ ret.append( "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" );
+ ret.append( "\n{{{ " );
+ ret.append( pluginName );
+ ret.append( " " );
+ ret.append( version );
+ ret.append( "\n Source: " );
+ ret.append( source );
+ ret.append( "\n Announcement: " + announcement.replaceAll("\n", "\n " ) );
+ ret.append( "\n Requires Java " );
+ ret.append( javaDependency );
+ ret.append( "\n Requires jEdit " );
+ ret.append( jEditDependency );
+ if( pluginDependencies.size() > 0 )
+ {
+ ret.append( "\n Required plugins: " );
+ for( int i=0; i<pluginDependencies.size(); i++ )
+ {
+ ret.append( "\n " );
+ PluginDependency plugin = pluginDependencies.get( i );
+ ret.append( plugin.simpleName + " " + plugin.version + " (" + plugin.className + ")" );
+ }
+ }
+ if( optionalPluginDependencies.size() > 0 )
+ {
+ ret.append( "\n Optional plugins: " );
+ for( int i=0; i<optionalPluginDependencies.size(); i++ )
+ {
+ ret.append( "\n " );
+ PluginDependency plugin = optionalPluginDependencies.get( i );
+ ret.append( plugin.simpleName + " " + plugin.version + " (" + plugin.className + ")" );
+ }
+ }
+ if( shortDescription!=null && !shortDescription.equals( "" ) )
+ {
+ ret.append( "\n \n Short Description: " + shortDescription );
+ }
+ if( longDescription!=null && !longDescription.equals( "" ) )
+ {
+ ret.append( "\n \n Long Description: " + longDescription );
+ }
+ ret.append( " }}}" );
+ newbuf = jEdit.newFile( view );
+ newbuf.insert( 0, ret.toString() );
+ }
+
+ boolean pluginIsNotInstalled(PluginDependency dependency, String installed) {
+ if(installed != null) {
+ installed = installed.trim();
+ if(!installed.equals(dependency.version))
+ {
+ return true;
+ }
+ } else {
+ return true;
+ }
+ return false;
+ }
+
+ boolean validateVersions()
+ {
+ boolean valid = true;
+ StringBuilder builder = new StringBuilder();
+ builder.append(
+ "There are some inconsistencies in your plugin's requirements. The\n" +
+ "version numbers below don't match what you are working with in\n" +
+ "your installation of jEdit.\n\n");
+
+ // check jEdit dependency against running build.
+ String build = jEdit.getBuild();
+ if(!build.equals(jEditDependency))
+ {
+ valid = false;
+ builder.append(" jEdit - Required: " + jEditDependency + " - Running: " + build + "\n");
+ }
+
+ // check required plugin dependencies.
+ for( int i = 0; i < pluginDependencies.size(); i++ )
+ {
+ PluginDependency plugin = pluginDependencies.get(i);
+ String installed = jEdit.getProperty("plugin." + plugin.className + ".version");
+ if(pluginIsNotInstalled(plugin, installed)) {
+ valid = false;
+ builder.append(" " + plugin.simpleName + " - Required: " + plugin.version + " - Running: " + installed + "\n");
+ }
+ }
+
+ // check optional plugin dependencies.
+ for( int i = 0; i < optionalPluginDependencies.size(); i++ )
+ {
+ PluginDependency plugin = optionalPluginDependencies.get(i);
+ String installed = jEdit.getProperty("plugin." + plugin.className + ".version");
+ if(pluginIsNotInstalled(plugin, installed)) {
+ valid = false;
+ builder.append(" " + plugin.simpleName + " - Optional: " + plugin.version + " - Running: " + installed + "\n");
+ }
+ }
+
+ if(!valid)
+ {
+ builder.append("\n\n" +
+ "Note that your plugin will be tested against the latest released\n" +
+ "versions of jEdit and your plugin's dependencies before it is\n" +
+ "released.\n\n" +
+ "Do you want to continue creating this announcement, or would you\n" +
+ "like to cancel it, and update the version numbers?\n\n" +
+ " \"Yes\" to create announcement as is.\n" +
+ " \"No\" to cancel and update props.");
+ int choice = JOptionPane.showConfirmDialog(
+ view,
+ builder.toString(),
+ "Versions don't match",
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+
+ // if user's chosen yes, then announcement is created.
+ valid = (choice == JOptionPane.YES_OPTION);
+ }
+ return valid;
+ }
+}
+
+// this single line of code is the script's main routine
+// it calls the methods and exits
+if( buffer.getMode().toString().equals( "properties" ) )
+ pluginTextDialog( view, buffer );
+else
+ Macros.error( view, "This must be run on a jEdit plugin's properties file. \nOpen your Plugin's props file and rerun this macro." );
+
+// ::mode=beanshell:noTabs=true:tabSize=4:indentSize=4::
diff --git a/jEdit/macros/Properties/Insert_Buffer_Properties.bsh b/jEdit/macros/Properties/Insert_Buffer_Properties.bsh
index aab1e67..9c6333a 100644
--- a/jEdit/macros/Properties/Insert_Buffer_Properties.bsh
+++ b/jEdit/macros/Properties/Insert_Buffer_Properties.bsh
@@ -1,226 +1,226 @@
-/*
- * Insert_Buffer_Properties.bsh - a Beanshell macro
- * for the jEdit text editor that provides a gui for
- * inserting Buffer Local properties for the current buffer
- * into the current buffer. If the buffer's mode as a line
- * comment defined, or comment start and end properties then
- * the inserted properties will be commented out.
- *
- * Copyright (C) 2002, 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * BugFixed by Björn "Vampire" Kautler <Vampire0 at gmx.net>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Insert_Buffer_Properties.bsh 5265 2005-08-14 22:31:16Z spestov $
- */
-
-import java.awt.BorderLayout;
-import java.awt.event.ActionEvent;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
-import java.util.Vector;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.border.EmptyBorder;
-import org.gjt.sp.jedit.gui.JCheckBoxList;
-
-BufferLocalPropertiesDialog(View view){
-
- this.view = view;
- buffer = view.getTextArea().getBuffer();
- mode = buffer.getMode().name;
-
-// removed non-valid BLPs and added missing ones
- props = new Hashtable();
- props.put("mode","");
- props.put("indentSize","int");
- props.put("tabSize","int");
- props.put("noTabs","bool");
- props.put("wrap","str");
- props.put("maxLineLen","int");
- props.put("folding","str");
- props.put("collapseFolds","int");
- props.put("deepIndent","bool");
- props.put("noWordSep","str");
- props.put("wordBreakChars","str");
-
- _checked = jEdit.getProperty("macro.insert-buffer-properties." + mode,"");
- tokens = new StringTokenizer(_checked,",");
- checkedProps = new Hashtable();
- while(tokens.hasMoreTokens())
- {
- property = tokens.nextToken();
- checkedProps.put(property,"checked");
- }
-
- dialog = new JDialog(view,"Insert Buffer Local Properties",true);
- content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(10,10,10,10));
- dialog.setContentPane(content);
- content.add(new JLabel("Properties:"), BorderLayout.NORTH);
-
- _entries = new Vector();
- names = props.keys();
- while(names.hasMoreElements()){
- name = names.nextElement();
- checked = checkedProps.get(name);
- entry = new JCheckBoxList.Entry(checked != null,name);
- _entries.addElement(entry);
- }
- entries = new JCheckBoxList.Entry[_entries.size()];
- _entries.copyInto(entries);
-
- checkBox = new JCheckBoxList(entries);
- checkBox.addKeyListener(this);
- content.add(new JScrollPane(checkBox),
- BorderLayout.CENTER);
-
- buttons = new JPanel();
- buttons.setBorder(new EmptyBorder(12,50,0,50));
- buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
- buttons.add(Box.createGlue());
- insert = new JButton("Insert");
- cancel = new JButton("Cancel");
- insert.addActionListener(this);
- cancel.addActionListener(this);
- dialog.getRootPane().setDefaultButton(insert);
- buttons.add(insert);
- buttons.add(Box.createHorizontalStrut(6));
- buttons.add(cancel);
- buttons.add(Box.createGlue());
- content.add(buttons,BorderLayout.SOUTH);
-
- void actionPerformed(ActionEvent evt){
- if(evt.getSource() == cancel)
- dialog.dispose();
- else
- this.insertProperties();
- }
-
- keyPressed(KeyEvent evt){
- if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
- dialog.dispose();
- else if(evt.getKeyCode() == KeyEvent.VK_ENTER)
- this.insertProperties();
- }
- keyReleased(KeyEvent evt){;}
- keyTyped(KeyEvent evt){;}
-
- insertProperties(){
-// removed isReadOnly-Check because already done in the beginning of the script
- checkNextTime = new StringBuffer();
- buff = new StringBuffer();
- names = checkBox.getCheckedValues();
- for(i=0; i < names.length; i++)
- {
-// moved the assignation in front of the checkNextTime-build,
-// because "name" is used and will have a wrong value otherwise
- name = names[i];
- type = props.get(name);
-
- if(i > 0)
- checkNextTime.append(',');
- checkNextTime.append(name);
-
-// changed the value reading/building/escaping
- if(name.equals("mode"))
- value = mode;
- else if(type.equals("bool"))
- value = buffer.getBooleanProperty(name);
- else if(type.equals("str"))
- {
- value = buffer.getStringProperty(name);
- if(value == null)
- value = "";
- value = value.replaceAll("=","\\\\=").replaceAll(":","\\\\:").replaceAll("\n","\\\\n").replaceAll("\t","\\\\t");
- }
- else if(type.equals("int"))
- {
- value = buffer.getIntegerProperty(name,-1);
- if(value == -1)
- value = "";
- }
- else
- value = "";
- buff.append(':').append(name).append('=').append(value);
- }
-
- jEdit.setProperty("macro.insert-buffer-properties." + mode,
- checkNextTime.toString());
-
- if(buff.length() > 0)
- buff.append(':');
- properties = buff.toString();
-
- // try to comment out the properties first using a lineComment
- // and if that's not defined, look for comment start and end
- // properties -- use context senstive properties
- caret = view.getTextArea().getCaretPosition();
- comment = buffer.getContextSensitiveProperty(caret,"lineComment");
- if(comment != null && comment.length() > 0)
- properties = comment + " " + properties;
- else
- {
- commentStart = buffer.getContextSensitiveProperty(caret,"commentStart");
- commentEnd = buffer.getContextSensitiveProperty(caret,"commentEnd");
- if(commentStart != null && commentEnd != null)
- properties = commentStart + " " + properties + " " + commentEnd;
- }
- buffer.insert(caret,properties);
-
- line = view.getTextArea().getCaretLine();
- if(line >= 10 && line < (buffer.getLineCount()-10))
- Macros.message(view, "Note: Buffer Local properties must in the first or last 10 lines of a buffer to be recognized by jEdit.");
-
- dialog.dispose();
- }
-
- dialog.pack();
-// cosmetic size-correction
- dialog.setSize(250,290);
- dialog.setLocationRelativeTo(view);
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- dialog.setVisible(true);
-}
-
-if(buffer.isReadOnly())
- Macros.error(view, "Buffer is read-only.");
-else
- BufferLocalPropertiesDialog(view);
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Insert_Buffer_Properties.bsh</filename></para>
- <abstract><para>
- Inserts buffer-local properties into the current buffer.
- </para></abstract>
- <para>
- If the buffer's
- mode has a line comment defined, or comment start and end
- defined, the inserted properties will be commented out.
- </para>
-</listitem>
-
-*/
-
-// :wrap=none:noTabs=false:collapseFolds=0:maxLineLen=80:mode=beanshell:indentSize=8:deepIndent=false:folding=none:
+/*
+ * Insert_Buffer_Properties.bsh - a Beanshell macro
+ * for the jEdit text editor that provides a gui for
+ * inserting Buffer Local properties for the current buffer
+ * into the current buffer. If the buffer's mode as a line
+ * comment defined, or comment start and end properties then
+ * the inserted properties will be commented out.
+ *
+ * Copyright (C) 2002, 2003 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * BugFixed by Björn "Vampire" Kautler <Vampire0 at gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Insert_Buffer_Properties.bsh 5265 2005-08-14 22:31:16Z spestov $
+ */
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+import java.util.Vector;
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.border.EmptyBorder;
+import org.gjt.sp.jedit.gui.JCheckBoxList;
+
+BufferLocalPropertiesDialog(View view){
+
+ this.view = view;
+ buffer = view.getTextArea().getBuffer();
+ mode = buffer.getMode().name;
+
+// removed non-valid BLPs and added missing ones
+ props = new Hashtable();
+ props.put("mode","");
+ props.put("indentSize","int");
+ props.put("tabSize","int");
+ props.put("noTabs","bool");
+ props.put("wrap","str");
+ props.put("maxLineLen","int");
+ props.put("folding","str");
+ props.put("collapseFolds","int");
+ props.put("deepIndent","bool");
+ props.put("noWordSep","str");
+ props.put("wordBreakChars","str");
+
+ _checked = jEdit.getProperty("macro.insert-buffer-properties." + mode,"");
+ tokens = new StringTokenizer(_checked,",");
+ checkedProps = new Hashtable();
+ while(tokens.hasMoreTokens())
+ {
+ property = tokens.nextToken();
+ checkedProps.put(property,"checked");
+ }
+
+ dialog = new JDialog(view,"Insert Buffer Local Properties",true);
+ content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(10,10,10,10));
+ dialog.setContentPane(content);
+ content.add(new JLabel("Properties:"), BorderLayout.NORTH);
+
+ _entries = new Vector();
+ names = props.keys();
+ while(names.hasMoreElements()){
+ name = names.nextElement();
+ checked = checkedProps.get(name);
+ entry = new JCheckBoxList.Entry(checked != null,name);
+ _entries.addElement(entry);
+ }
+ entries = new JCheckBoxList.Entry[_entries.size()];
+ _entries.copyInto(entries);
+
+ checkBox = new JCheckBoxList(entries);
+ checkBox.addKeyListener(this);
+ content.add(new JScrollPane(checkBox),
+ BorderLayout.CENTER);
+
+ buttons = new JPanel();
+ buttons.setBorder(new EmptyBorder(12,50,0,50));
+ buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
+ buttons.add(Box.createGlue());
+ insert = new JButton("Insert");
+ cancel = new JButton("Cancel");
+ insert.addActionListener(this);
+ cancel.addActionListener(this);
+ dialog.getRootPane().setDefaultButton(insert);
+ buttons.add(insert);
+ buttons.add(Box.createHorizontalStrut(6));
+ buttons.add(cancel);
+ buttons.add(Box.createGlue());
+ content.add(buttons,BorderLayout.SOUTH);
+
+ void actionPerformed(ActionEvent evt){
+ if(evt.getSource() == cancel)
+ dialog.dispose();
+ else
+ this.insertProperties();
+ }
+
+ keyPressed(KeyEvent evt){
+ if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
+ dialog.dispose();
+ else if(evt.getKeyCode() == KeyEvent.VK_ENTER)
+ this.insertProperties();
+ }
+ keyReleased(KeyEvent evt){;}
+ keyTyped(KeyEvent evt){;}
+
+ insertProperties(){
+// removed isReadOnly-Check because already done in the beginning of the script
+ checkNextTime = new StringBuffer();
+ buff = new StringBuffer();
+ names = checkBox.getCheckedValues();
+ for(i=0; i < names.length; i++)
+ {
+// moved the assignation in front of the checkNextTime-build,
+// because "name" is used and will have a wrong value otherwise
+ name = names[i];
+ type = props.get(name);
+
+ if(i > 0)
+ checkNextTime.append(',');
+ checkNextTime.append(name);
+
+// changed the value reading/building/escaping
+ if(name.equals("mode"))
+ value = mode;
+ else if(type.equals("bool"))
+ value = buffer.getBooleanProperty(name);
+ else if(type.equals("str"))
+ {
+ value = buffer.getStringProperty(name);
+ if(value == null)
+ value = "";
+ value = value.replaceAll("=","\\\\=").replaceAll(":","\\\\:").replaceAll("\n","\\\\n").replaceAll("\t","\\\\t");
+ }
+ else if(type.equals("int"))
+ {
+ value = buffer.getIntegerProperty(name,-1);
+ if(value == -1)
+ value = "";
+ }
+ else
+ value = "";
+ buff.append(':').append(name).append('=').append(value);
+ }
+
+ jEdit.setProperty("macro.insert-buffer-properties." + mode,
+ checkNextTime.toString());
+
+ if(buff.length() > 0)
+ buff.append(':');
+ properties = buff.toString();
+
+ // try to comment out the properties first using a lineComment
+ // and if that's not defined, look for comment start and end
+ // properties -- use context senstive properties
+ caret = view.getTextArea().getCaretPosition();
+ comment = buffer.getContextSensitiveProperty(caret,"lineComment");
+ if(comment != null && comment.length() > 0)
+ properties = comment + " " + properties;
+ else
+ {
+ commentStart = buffer.getContextSensitiveProperty(caret,"commentStart");
+ commentEnd = buffer.getContextSensitiveProperty(caret,"commentEnd");
+ if(commentStart != null && commentEnd != null)
+ properties = commentStart + " " + properties + " " + commentEnd;
+ }
+ buffer.insert(caret,properties);
+
+ line = view.getTextArea().getCaretLine();
+ if(line >= 10 && line < (buffer.getLineCount()-10))
+ Macros.message(view, "Note: Buffer Local properties must in the first or last 10 lines of a buffer to be recognized by jEdit.");
+
+ dialog.dispose();
+ }
+
+ dialog.pack();
+// cosmetic size-correction
+ dialog.setSize(250,290);
+ dialog.setLocationRelativeTo(view);
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+}
+
+if(buffer.isReadOnly())
+ Macros.error(view, "Buffer is read-only.");
+else
+ BufferLocalPropertiesDialog(view);
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Insert_Buffer_Properties.bsh</filename></para>
+ <abstract><para>
+ Inserts buffer-local properties into the current buffer.
+ </para></abstract>
+ <para>
+ If the buffer's
+ mode has a line comment defined, or comment start and end
+ defined, the inserted properties will be commented out.
+ </para>
+</listitem>
+
+*/
+
+// :wrap=none:noTabs=false:collapseFolds=0:maxLineLen=80:mode=beanshell:indentSize=8:deepIndent=false:folding=none:
diff --git a/jEdit/macros/Properties/Look_and_Feel_Properties.bsh b/jEdit/macros/Properties/Look_and_Feel_Properties.bsh
index ce5b1a9..99e7998 100644
--- a/jEdit/macros/Properties/Look_and_Feel_Properties.bsh
+++ b/jEdit/macros/Properties/Look_and_Feel_Properties.bsh
@@ -1,58 +1,58 @@
-/*
- * Look_and_Feel_Properties.bsh - a BeanShell macro script for the
- * jEdit text editor - writes current look and feel
- * properties to new text buffer
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Look_and_Feel_Properties.bsh 4911 2003-11-12 00:24:11Z spestov $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-void lookAndFeelProperties()
-{
- keys = javax.swing.UIManager.getLookAndFeelDefaults().keys();
- sb = new StringBuffer("--listing look and feel property names--\n");
- while(keys.hasMoreElements())
- {
- sb.append(keys.nextElement());
- sb.append('\n');
- }
- newbuf = jEdit.newFile(view);
- newbuf.insert(0, sb.toString());
-}
-
-lookAndFeelProperties();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Look_and_Feel_Properties.bsh</filename></para>
- <abstract><para>
- Writes an unsorted list of the names of Java Look and Feel
- properties in a new buffer.
- </para></abstract>
-</listitem>
-
-*/
-
-// end Look_and_Feel_Properties.bsh
-
+/*
+ * Look_and_Feel_Properties.bsh - a BeanShell macro script for the
+ * jEdit text editor - writes current look and feel
+ * properties to new text buffer
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Look_and_Feel_Properties.bsh 4911 2003-11-12 00:24:11Z spestov $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+void lookAndFeelProperties()
+{
+ keys = javax.swing.UIManager.getLookAndFeelDefaults().keys();
+ sb = new StringBuffer("--listing look and feel property names--\n");
+ while(keys.hasMoreElements())
+ {
+ sb.append(keys.nextElement());
+ sb.append('\n');
+ }
+ newbuf = jEdit.newFile(view);
+ newbuf.insert(0, sb.toString());
+}
+
+lookAndFeelProperties();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Look_and_Feel_Properties.bsh</filename></para>
+ <abstract><para>
+ Writes an unsorted list of the names of Java Look and Feel
+ properties in a new buffer.
+ </para></abstract>
+</listitem>
+
+*/
+
+// end Look_and_Feel_Properties.bsh
+
diff --git a/jEdit/macros/Properties/System_Properties.bsh b/jEdit/macros/Properties/System_Properties.bsh
index e5efc0e..1090475 100644
--- a/jEdit/macros/Properties/System_Properties.bsh
+++ b/jEdit/macros/Properties/System_Properties.bsh
@@ -1,55 +1,55 @@
-/*
- * System_Properties.bsh - a BeanShell macro script for the
- * jEdit text editor - writes current system properties
- * to new text buffer
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: System_Properties.bsh 4911 2003-11-12 00:24:11Z spestov $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-systemProperties()
-{
- props = System.getProperties();
- sw = new StringWriter();
- pw = new PrintWriter(sw);
- props.list(pw);
- jEdit.newFile(view);
- textArea.setSelectedText(sw.toString());
-}
-
-systemProperties();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>System_Properties.bsh</filename></para>
- <abstract><para>
- Writes an unsorted list of all Java system properties in a new
- buffer.
- </para></abstract>
-</listitem>
-
-*/
-
-// end System_Properties.bsh
-
+/*
+ * System_Properties.bsh - a BeanShell macro script for the
+ * jEdit text editor - writes current system properties
+ * to new text buffer
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: System_Properties.bsh 4911 2003-11-12 00:24:11Z spestov $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+systemProperties()
+{
+ props = System.getProperties();
+ sw = new StringWriter();
+ pw = new PrintWriter(sw);
+ props.list(pw);
+ jEdit.newFile(view);
+ textArea.setSelectedText(sw.toString());
+}
+
+systemProperties();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>System_Properties.bsh</filename></para>
+ <abstract><para>
+ Writes an unsorted list of all Java system properties in a new
+ buffer.
+ </para></abstract>
+</listitem>
+
+*/
+
+// end System_Properties.bsh
+
diff --git a/jEdit/macros/Properties/jEdit_Properties.bsh b/jEdit/macros/Properties/jEdit_Properties.bsh
index 2f6495c..75f0d89 100644
--- a/jEdit/macros/Properties/jEdit_Properties.bsh
+++ b/jEdit/macros/Properties/jEdit_Properties.bsh
@@ -1,58 +1,58 @@
-/*
- * jEdit_Properties.bsh - a BeanShell macro for the
- * jEdit text editor application -- provides a list of current
- * properties used by jEdit
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit application; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: jEdit_Properties.bsh 4911 2003-11-12 00:24:11Z spestov $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-void writeJEditProperties()
-{
- // save any changes written since the session started
- jEdit.saveSettings();
-
- props = jEdit.getProperties();
-
- sw = new StringWriter();
- pw = new PrintWriter(sw);
- props.list(pw);
- newbuf = jEdit.newFile(view);
- newbuf.insert(0, sw.toString());
-}
-
-writeJEditProperties();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>jEdit_Properties.bsh</filename></para>
- <abstract><para>
- Writes an unsorted list of jEdit properties in a new buffer.
- </para></abstract>
-</listitem>
-
-*/
-
-// end jEdit_Properties.bsh
-
+/*
+ * jEdit_Properties.bsh - a BeanShell macro for the
+ * jEdit text editor application -- provides a list of current
+ * properties used by jEdit
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit application; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: jEdit_Properties.bsh 4911 2003-11-12 00:24:11Z spestov $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+void writeJEditProperties()
+{
+ // save any changes written since the session started
+ jEdit.saveSettings();
+
+ props = jEdit.getProperties();
+
+ sw = new StringWriter();
+ pw = new PrintWriter(sw);
+ props.list(pw);
+ newbuf = jEdit.newFile(view);
+ newbuf.insert(0, sw.toString());
+}
+
+writeJEditProperties();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>jEdit_Properties.bsh</filename></para>
+ <abstract><para>
+ Writes an unsorted list of jEdit properties in a new buffer.
+ </para></abstract>
+</listitem>
+
+*/
+
+// end jEdit_Properties.bsh
+
diff --git a/jEdit/macros/Text/Add_Prefix_and_Suffix.bsh b/jEdit/macros/Text/Add_Prefix_and_Suffix.bsh
index e7b5776..f192ef5 100644
--- a/jEdit/macros/Text/Add_Prefix_and_Suffix.bsh
+++ b/jEdit/macros/Text/Add_Prefix_and_Suffix.bsh
@@ -1,160 +1,160 @@
-/*
- * Add_Prefix_and_Suffix.bsh - a BeanShell macro script for the
- * jEdit text editor - obtains and processes input for prefix and
- * suffix text to be inserted in selected lines in the current
- * editing buffer
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Add_Prefix_and_Suffix.bsh 9126 2007-03-10 19:14:30Z Vampire0 $
- *
- * Notes on use:
- *
- * If no text is selected, the macro will operate on the current line.
- *
- * The caret position is part of the selected text; if the caret is at
- * the beginning of a line, the macro will operate on that line.
- *
- * The use of HistoryTextField objects allows the macro to 'remember'
- * past entries for the prefix and suffix.
- */
-
-// beginning of Add_Prefix_and_Suffix.bsh
-
-// import statements
-import javax.swing.border.*;
-
-// main routine
-void prefixSuffixDialog(View view)
-{
- this.view = view;
-
- // create dialog object and set its features
- title = "Add prefix and suffix to selected lines";
- dialog = new JDialog(view, title, false);
- content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12, 12, 12, 12));
- dialog.setContentPane(content);
-
- // add to the dialog a panel containing the text fields for
- // entry of the prefix and suffix text
- fieldPanel = new JPanel(new GridLayout(4, 1, 0, 6));
- prefixField = new HistoryTextField("macro.add-prefix");
- prefixLabel = new JLabel("Prefix to add:");
- suffixField = new HistoryTextField("macro.add-suffix");
- suffixLabel = new JLabel("Suffix to add:");
- fieldPanel.add(prefixLabel);
- fieldPanel.add(prefixField);
- fieldPanel.add(suffixLabel);
- fieldPanel.add(suffixField);
- content.add(fieldPanel, "Center");
-
- // add a panel containing the buttons
- buttonPanel = new JPanel();
- buttonPanel.setLayout(new BoxLayout(buttonPanel,
- BoxLayout.X_AXIS));
- buttonPanel.setBorder(new EmptyBorder(12, 50, 0, 50));
- buttonPanel.add(Box.createGlue());
- ok = new JButton("OK");
- cancel = new JButton("Cancel");
- ok.setPreferredSize(cancel.getPreferredSize());
- dialog.getRootPane().setDefaultButton(ok);
- buttonPanel.add(ok);
- buttonPanel.add(Box.createHorizontalStrut(6));
- buttonPanel.add(cancel);
- buttonPanel.add(Box.createGlue());
- content.add(buttonPanel, "South");
-
- // register this method as an ActionListener for
- // the buttons and text fields
- ok.addActionListener(this);
- cancel.addActionListener(this);
- prefixField.addActionListener(this);
- suffixField.addActionListener(this);
-
- // locate the dialog in the center of the
- // editing pane and make it visible
- dialog.pack();
- dialog.setLocationRelativeTo(view);
- dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
- dialog.setVisible(true);
-
- // this method will be called when a button is clicked
- // or when ENTER is pressed
- void actionPerformed(e)
- {
- if(e.getSource() != cancel)
- {
- processText();
- }
- dialog.dispose();
- }
-
- // this is where the work gets done to insert
- // the prefix and suffix
- void processText()
- {
- prefix = prefixField.getText();
- suffix = suffixField.getText();
- if(prefix.length() == 0 && suffix.length() == 0)
- return;
- prefixField.addCurrentToHistory();
- suffixField.addCurrentToHistory();
-
- // text manipulation begins here using calls
- // to jEdit methods
- selectedLines = textArea.getSelectedLines();
- for(i = 0; i < selectedLines.length; ++i)
- {
- offsetBOL = textArea.getLineStartOffset(selectedLines[i]);
- textArea.setCaretPosition(offsetBOL);
- textArea.goToStartOfWhiteSpace(false);
- textArea.goToEndOfWhiteSpace(true);
- text = textArea.getSelectedText();
- if(text == null) text = "";
- textArea.setSelectedText(prefix + text + suffix);
- }
- }
-}
-
-// this single line of code is the script's main routine
-// it calls the methods and exits
-if(buffer.isReadOnly())
- Macros.error(view, "Buffer is read-only.");
-else
- prefixSuffixDialog(view);
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Add_Prefix_and_Suffix.bsh</filename></para>
- <abstract><para>
- Adds user-supplied <quote>prefix</quote> and <quote>suffix</quote>
- text to each line in a group of selected lines.
- </para></abstract>
- <para>
- Text is added after leading whitespace and before trailing whitespace.
- A dialog window receives input and <quote>remembers</quote> past entries.
- </para>
-</listitem>
-
-*/
-
-// end Add_Prefix_and_Suffix.bsh
-
+/*
+ * Add_Prefix_and_Suffix.bsh - a BeanShell macro script for the
+ * jEdit text editor - obtains and processes input for prefix and
+ * suffix text to be inserted in selected lines in the current
+ * editing buffer
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Add_Prefix_and_Suffix.bsh 9126 2007-03-10 19:14:30Z Vampire0 $
+ *
+ * Notes on use:
+ *
+ * If no text is selected, the macro will operate on the current line.
+ *
+ * The caret position is part of the selected text; if the caret is at
+ * the beginning of a line, the macro will operate on that line.
+ *
+ * The use of HistoryTextField objects allows the macro to 'remember'
+ * past entries for the prefix and suffix.
+ */
+
+// beginning of Add_Prefix_and_Suffix.bsh
+
+// import statements
+import javax.swing.border.*;
+
+// main routine
+void prefixSuffixDialog(View view)
+{
+ this.view = view;
+
+ // create dialog object and set its features
+ title = "Add prefix and suffix to selected lines";
+ dialog = new JDialog(view, title, false);
+ content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12, 12, 12, 12));
+ dialog.setContentPane(content);
+
+ // add to the dialog a panel containing the text fields for
+ // entry of the prefix and suffix text
+ fieldPanel = new JPanel(new GridLayout(4, 1, 0, 6));
+ prefixField = new HistoryTextField("macro.add-prefix");
+ prefixLabel = new JLabel("Prefix to add:");
+ suffixField = new HistoryTextField("macro.add-suffix");
+ suffixLabel = new JLabel("Suffix to add:");
+ fieldPanel.add(prefixLabel);
+ fieldPanel.add(prefixField);
+ fieldPanel.add(suffixLabel);
+ fieldPanel.add(suffixField);
+ content.add(fieldPanel, "Center");
+
+ // add a panel containing the buttons
+ buttonPanel = new JPanel();
+ buttonPanel.setLayout(new BoxLayout(buttonPanel,
+ BoxLayout.X_AXIS));
+ buttonPanel.setBorder(new EmptyBorder(12, 50, 0, 50));
+ buttonPanel.add(Box.createGlue());
+ ok = new JButton("OK");
+ cancel = new JButton("Cancel");
+ ok.setPreferredSize(cancel.getPreferredSize());
+ dialog.getRootPane().setDefaultButton(ok);
+ buttonPanel.add(ok);
+ buttonPanel.add(Box.createHorizontalStrut(6));
+ buttonPanel.add(cancel);
+ buttonPanel.add(Box.createGlue());
+ content.add(buttonPanel, "South");
+
+ // register this method as an ActionListener for
+ // the buttons and text fields
+ ok.addActionListener(this);
+ cancel.addActionListener(this);
+ prefixField.addActionListener(this);
+ suffixField.addActionListener(this);
+
+ // locate the dialog in the center of the
+ // editing pane and make it visible
+ dialog.pack();
+ dialog.setLocationRelativeTo(view);
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ dialog.setVisible(true);
+
+ // this method will be called when a button is clicked
+ // or when ENTER is pressed
+ void actionPerformed(e)
+ {
+ if(e.getSource() != cancel)
+ {
+ processText();
+ }
+ dialog.dispose();
+ }
+
+ // this is where the work gets done to insert
+ // the prefix and suffix
+ void processText()
+ {
+ prefix = prefixField.getText();
+ suffix = suffixField.getText();
+ if(prefix.length() == 0 && suffix.length() == 0)
+ return;
+ prefixField.addCurrentToHistory();
+ suffixField.addCurrentToHistory();
+
+ // text manipulation begins here using calls
+ // to jEdit methods
+ selectedLines = textArea.getSelectedLines();
+ for(i = 0; i < selectedLines.length; ++i)
+ {
+ offsetBOL = textArea.getLineStartOffset(selectedLines[i]);
+ textArea.setCaretPosition(offsetBOL);
+ textArea.goToStartOfWhiteSpace(false);
+ textArea.goToEndOfWhiteSpace(true);
+ text = textArea.getSelectedText();
+ if(text == null) text = "";
+ textArea.setSelectedText(prefix + text + suffix);
+ }
+ }
+}
+
+// this single line of code is the script's main routine
+// it calls the methods and exits
+if(buffer.isReadOnly())
+ Macros.error(view, "Buffer is read-only.");
+else
+ prefixSuffixDialog(view);
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Add_Prefix_and_Suffix.bsh</filename></para>
+ <abstract><para>
+ Adds user-supplied <quote>prefix</quote> and <quote>suffix</quote>
+ text to each line in a group of selected lines.
+ </para></abstract>
+ <para>
+ Text is added after leading whitespace and before trailing whitespace.
+ A dialog window receives input and <quote>remembers</quote> past entries.
+ </para>
+</listitem>
+
+*/
+
+// end Add_Prefix_and_Suffix.bsh
+
diff --git a/jEdit/macros/Text/Color_Picker.bsh b/jEdit/macros/Text/Color_Picker.bsh
index 8a93089..91351f7 100644
--- a/jEdit/macros/Text/Color_Picker.bsh
+++ b/jEdit/macros/Text/Color_Picker.bsh
@@ -1,52 +1,52 @@
-/*
- * Color_Picker.bsh - a BeanShell macro script for the
- * jEdit text editor - displays color picker, inserts selected color
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit application; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Color_Picker.bsh 4988 2004-03-08 04:29:12Z spestov $
- */
-
-selection = textArea.getSelectedText();
-if (selection != null)
- color = GUIUtilities.parseColor(selection);
-else
- color = null;
-
-color = JColorChooser.showDialog(view, "Color Picker", color);
-
-if (color != null){
- if(buffer.isReadOnly())
- Macros.error(view, "Buffer is read-only.");
- else
- textArea.setSelectedText(GUIUtilities.getColorHexString(color));
-}
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Color_Picker.bsh</filename></para>
- <abstract><para>
- Displays a color picker and inserts the selected color in
- hexadecimal format, prefixed with a <quote>#</quote>.
- </para></abstract>
-</listitem>
-
-*/
-
-// end Color_Picker.bsh
-
+/*
+ * Color_Picker.bsh - a BeanShell macro script for the
+ * jEdit text editor - displays color picker, inserts selected color
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit application; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Color_Picker.bsh 4988 2004-03-08 04:29:12Z spestov $
+ */
+
+selection = textArea.getSelectedText();
+if (selection != null)
+ color = GUIUtilities.parseColor(selection);
+else
+ color = null;
+
+color = JColorChooser.showDialog(view, "Color Picker", color);
+
+if (color != null){
+ if(buffer.isReadOnly())
+ Macros.error(view, "Buffer is read-only.");
+ else
+ textArea.setSelectedText(GUIUtilities.getColorHexString(color));
+}
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Color_Picker.bsh</filename></para>
+ <abstract><para>
+ Displays a color picker and inserts the selected color in
+ hexadecimal format, prefixed with a <quote>#</quote>.
+ </para></abstract>
+</listitem>
+
+*/
+
+// end Color_Picker.bsh
+
diff --git a/jEdit/macros/Text/Duplicate_Line.bsh b/jEdit/macros/Text/Duplicate_Line.bsh
index b28cd50..03593b6 100644
--- a/jEdit/macros/Text/Duplicate_Line.bsh
+++ b/jEdit/macros/Text/Duplicate_Line.bsh
@@ -1,70 +1,70 @@
-/*
- * Duplicate_Line.bsh - a BeanShell macro script for the
- * jEdit text editor - duplicates the cursor line.
- * Copyright (C) 2001 Francesc Roses
- * froses at menta.net
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- *
- * $Id: Duplicate_Line.bsh 3866 2001-11-06 15:04:21Z jgellene $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-void duplicateLine()
-{
- /*
- * Guard for readonly files becuase Buffer.insert()
- * ignores the flag
- *
- */
- if(buffer.isReadOnly())
- {
- Macros.error(view, "This file is read only.");
- return;
- }
- line = textArea.getCaretLine();
- offset = textArea.getLineEndOffset(line);
- // handle last line differently
- if(line == textArea.getLineCount() - 1)
- {
- text = "\n" + textArea.getLineText(line);
- --offset;
- }
- else
- text = textArea.getLineText(line) + "\n";
- buffer.insert(offset, text);
- textArea.goToNextLine(false);
-}
-
-duplicateLine();
-
-/*
-
-Macro index data (in DocBook format)
-
- <listitem>
- <para><filename>Duplicate_Line.bsh</filename></para>
- <abstract><para>
- Duplicates the line on which the caret lies immediately
- beneath it and moves the caret to the new line.
- </para></abstract>
- </listitem>
-
-*/
-
-// end Duplicate_Line.bsh
+/*
+ * Duplicate_Line.bsh - a BeanShell macro script for the
+ * jEdit text editor - duplicates the cursor line.
+ * Copyright (C) 2001 Francesc Roses
+ * froses at menta.net
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * $Id: Duplicate_Line.bsh 3866 2001-11-06 15:04:21Z jgellene $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+void duplicateLine()
+{
+ /*
+ * Guard for readonly files becuase Buffer.insert()
+ * ignores the flag
+ *
+ */
+ if(buffer.isReadOnly())
+ {
+ Macros.error(view, "This file is read only.");
+ return;
+ }
+ line = textArea.getCaretLine();
+ offset = textArea.getLineEndOffset(line);
+ // handle last line differently
+ if(line == textArea.getLineCount() - 1)
+ {
+ text = "\n" + textArea.getLineText(line);
+ --offset;
+ }
+ else
+ text = textArea.getLineText(line) + "\n";
+ buffer.insert(offset, text);
+ textArea.goToNextLine(false);
+}
+
+duplicateLine();
+
+/*
+
+Macro index data (in DocBook format)
+
+ <listitem>
+ <para><filename>Duplicate_Line.bsh</filename></para>
+ <abstract><para>
+ Duplicates the line on which the caret lies immediately
+ beneath it and moves the caret to the new line.
+ </para></abstract>
+ </listitem>
+
+*/
+
+// end Duplicate_Line.bsh
diff --git a/jEdit/macros/Text/Insert_Date.bsh b/jEdit/macros/Text/Insert_Date.bsh
index fe31093..f15cd43 100644
--- a/jEdit/macros/Text/Insert_Date.bsh
+++ b/jEdit/macros/Text/Insert_Date.bsh
@@ -1,80 +1,80 @@
-/*
- * Insert_Date.bsh - a BeanShell macro script for the
- * jEdit text editor - insert current date and "Internet Time"
- * at current caret position
- * Copyright (C) 2001 John Gellene (on behalf of author)
- * jgellene at nyc.rr.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Insert_Date.bsh 4988 2004-03-08 04:29:12Z spestov $
- */
-
-// Inserts the current date and Internet Time at the caret position
-// "Internet Time" is a new and easy way to measure time across the world
-// To find more "Internet Time"-related information go to
-// http://www.swatch.com/alu_beat/fs_itime.html
-
-// Wed Jan 31 03:12:33 AKST 2001 @550 /Internet Time/
-
-void insertDate()
-{
- Calendar rightNow = Calendar.getInstance();
-
- // zone offset with daylight savings
- int zoffset = (rightNow.get(Calendar.ZONE_OFFSET) +
- rightNow.get(Calendar.DST_OFFSET)) / 60000;
-
- // parsing current hour, minute and second
- double h = rightNow.get(Calendar.HOUR_OF_DAY);
- double m = rightNow.get(Calendar.MINUTE);
- double s = rightNow.get(Calendar.SECOND);
-
- // calculating internet time
- double swatch = Math.floor
- ((h * 3600 + ((m - zoffset + 60) * 60) + s) * 1000 / 86400);
- if (swatch >= 1000)
- swatch -= 1000;
- else if (swatch < 0)
- swatch += 1000;
-
- // inserting date and internet time to textarea
- textArea.setSelectedText(Calendar.getInstance().getTime().toString()
- + " @" + (int)swatch + " /Internet Time/");
-}
-
-if(buffer.isReadOnly())
- Macros.error(view, "Buffer is read-only.");
-else
- insertDate();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Insert_Date.bsh</filename></para>
- <abstract><para>
- Inserts the current date and time in the current buffer.
- </para></abstract>
- <para>
- The inserted text includes a representation of the time in the
- <quote>Internet Time</quote> format.
- </para>
-</listitem>
-
-*/
-
-// end Insert_Date.bsh
-
+/*
+ * Insert_Date.bsh - a BeanShell macro script for the
+ * jEdit text editor - insert current date and "Internet Time"
+ * at current caret position
+ * Copyright (C) 2001 John Gellene (on behalf of author)
+ * jgellene at nyc.rr.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Insert_Date.bsh 4988 2004-03-08 04:29:12Z spestov $
+ */
+
+// Inserts the current date and Internet Time at the caret position
+// "Internet Time" is a new and easy way to measure time across the world
+// To find more "Internet Time"-related information go to
+// http://www.swatch.com/alu_beat/fs_itime.html
+
+// Wed Jan 31 03:12:33 AKST 2001 @550 /Internet Time/
+
+void insertDate()
+{
+ Calendar rightNow = Calendar.getInstance();
+
+ // zone offset with daylight savings
+ int zoffset = (rightNow.get(Calendar.ZONE_OFFSET) +
+ rightNow.get(Calendar.DST_OFFSET)) / 60000;
+
+ // parsing current hour, minute and second
+ double h = rightNow.get(Calendar.HOUR_OF_DAY);
+ double m = rightNow.get(Calendar.MINUTE);
+ double s = rightNow.get(Calendar.SECOND);
+
+ // calculating internet time
+ double swatch = Math.floor
+ ((h * 3600 + ((m - zoffset + 60) * 60) + s) * 1000 / 86400);
+ if (swatch >= 1000)
+ swatch -= 1000;
+ else if (swatch < 0)
+ swatch += 1000;
+
+ // inserting date and internet time to textarea
+ textArea.setSelectedText(Calendar.getInstance().getTime().toString()
+ + " @" + (int)swatch + " /Internet Time/");
+}
+
+if(buffer.isReadOnly())
+ Macros.error(view, "Buffer is read-only.");
+else
+ insertDate();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Insert_Date.bsh</filename></para>
+ <abstract><para>
+ Inserts the current date and time in the current buffer.
+ </para></abstract>
+ <para>
+ The inserted text includes a representation of the time in the
+ <quote>Internet Time</quote> format.
+ </para>
+</listitem>
+
+*/
+
+// end Insert_Date.bsh
+
diff --git a/jEdit/macros/Text/Insert_Tag.bsh b/jEdit/macros/Text/Insert_Tag.bsh
index 9e3945f..6a675ca 100644
--- a/jEdit/macros/Text/Insert_Tag.bsh
+++ b/jEdit/macros/Text/Insert_Tag.bsh
@@ -1,62 +1,62 @@
-/*
- * Insert_Tag.bsh - a BeanShell macro script for the
- * jEdit text editor - inserts opening and closing tags
- * around selected text
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Insert_Tag.bsh 4988 2004-03-08 04:29:12Z spestov $
- */
-
-
-void insertTag()
-{
- caret = textArea.getCaretPosition();
- tag = Macros.input(view, "Enter name of tag:");
- if( tag == null || tag.length() == 0) return;
- text = textArea.getSelectedText();
- if(text == null) text = "";
- sb = new StringBuffer();
- sb.append("<").append(tag).append(">");
- sb.append(text);
- sb.append("</").append(tag).append(">");
- textArea.setSelectedText(sb.toString());
- //if no selected text, put the caret between the tags
- if(text.length() == 0)
- textArea.setCaretPosition(caret + tag.length() + 2);
-}
-
-if(buffer.isReadOnly())
- Macros.error(view, "Buffer is read-only.");
-else
- insertTag();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Insert_Tag.bsh</filename></para>
- <abstract><para>
- Inserts a balanced pair of markup tags as supplied in a i
- nput dialog.
- </para></abstract>
-</listitem>
-
-*/
-
-// end Insert_Tag.bsh
+/*
+ * Insert_Tag.bsh - a BeanShell macro script for the
+ * jEdit text editor - inserts opening and closing tags
+ * around selected text
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Insert_Tag.bsh 4988 2004-03-08 04:29:12Z spestov $
+ */
+
+
+void insertTag()
+{
+ caret = textArea.getCaretPosition();
+ tag = Macros.input(view, "Enter name of tag:");
+ if( tag == null || tag.length() == 0) return;
+ text = textArea.getSelectedText();
+ if(text == null) text = "";
+ sb = new StringBuffer();
+ sb.append("<").append(tag).append(">");
+ sb.append(text);
+ sb.append("</").append(tag).append(">");
+ textArea.setSelectedText(sb.toString());
+ //if no selected text, put the caret between the tags
+ if(text.length() == 0)
+ textArea.setCaretPosition(caret + tag.length() + 2);
+}
+
+if(buffer.isReadOnly())
+ Macros.error(view, "Buffer is read-only.");
+else
+ insertTag();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Insert_Tag.bsh</filename></para>
+ <abstract><para>
+ Inserts a balanced pair of markup tags as supplied in a i
+ nput dialog.
+ </para></abstract>
+</listitem>
+
+*/
+
+// end Insert_Tag.bsh
diff --git a/jEdit/macros/Text/Next_Char.bsh b/jEdit/macros/Text/Next_Char.bsh
index 8f480f4..ea819b6 100644
--- a/jEdit/macros/Text/Next_Char.bsh
+++ b/jEdit/macros/Text/Next_Char.bsh
@@ -1,73 +1,73 @@
-/*
- * Next_char.bsh - a BeanShell macro script for the
- * jEdit text editor - finds next occurence of character on
- * current line
- * Copyright (C) 2001 John Gellene
- * jgellene at nyc.rr.com
- * http://community.jedit.org
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the jEdit program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id: Next_Char.bsh 4988 2004-03-08 04:29:12Z spestov $
- *
- * Checked for jEdit 4.0 API
- *
- */
-
-void nextChar()
-{
- script = new StringBuffer(512);
- script.append( "start = textArea.getCaretPosition();" );
- script.append( "line = textArea.getCaretLine();" );
- script.append( "end = textArea.getLineEndOffset(line) + 1;" );
- script.append( "text = buffer.getText(start, end - start);" );
- script.append( "match = text.indexOf(__char__, 1);" );
- script.append( "if(match != -1) {" );
- script.append( "if(__char__ != '\\n') ++match;" );
- script.append( "textArea.select(start, start + match - 1);}" );
-
- view.getInputHandler().readNextChar("Enter a character",script.toString());
-}
-
-nextChar();
-
-/*
- Macro index data (in DocBook format)
-
-<listitem>
- <para><filename>Next_Char.bsh</filename></para>
- <abstract><para>
- Finds next occurence of character on current line.
- </para></abstract>
- <para>
- The macro takes the next character typed after macro execution
- as the character being searched. That character is not
- displayed. If the character does not appear in the balance of
- the current line, no action occurs.
- </para>
- <para>
- This macro illustrates the use of
- <function>InputHandler.readNextChar()</function> as a means of
- obtaining user input. <!-- See <xref
- linkend="macro-tips-single-char" -->
- />.
- </para>
- </listitem>
-
-*/
-
-
-// end Next_char.bsh
-
+/*
+ * Next_char.bsh - a BeanShell macro script for the
+ * jEdit text editor - finds next occurence of character on
+ * current line
+ * Copyright (C) 2001 John Gellene
+ * jgellene at nyc.rr.com
+ * http://community.jedit.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with the jEdit program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id: Next_Char.bsh 4988 2004-03-08 04:29:12Z spestov $
+ *
+ * Checked for jEdit 4.0 API
+ *
+ */
+
+void nextChar()
+{
+ script = new StringBuffer(512);
+ script.append( "start = textArea.getCaretPosition();" );
+ script.append( "line = textArea.getCaretLine();" );
+ script.append( "end = textArea.getLineEndOffset(line) + 1;" );
+ script.append( "text = buffer.getText(start, end - start);" );
+ script.append( "match = text.indexOf(__char__, 1);" );
+ script.append( "if(match != -1) {" );
+ script.append( "if(__char__ != '\\n') ++match;" );
+ script.append( "textArea.select(start, start + match - 1);}" );
+
+ view.getInputHandler().readNextChar("Enter a character",script.toString());
+}
+
+nextChar();
+
+/*
+ Macro index data (in DocBook format)
+
+<listitem>
+ <para><filename>Next_Char.bsh</filename></para>
+ <abstract><para>
+ Finds next occurence of character on current line.
+ </para></abstract>
+ <para>
+ The macro takes the next character typed after macro execution
+ as the character being searched. That character is not
+ displayed. If the character does not appear in the balance of
+ the current line, no action occurs.
+ </para>
+ <para>
+ This macro illustrates the use of
+ <function>InputHandler.readNextChar()</function> as a means of
+ obtaining user input. <!-- See <xref
+ linkend="macro-tips-single-char" -->
+ />.
+ </para>
+ </listitem>
+
+*/
+
+
+// end Next_char.bsh
+
diff --git a/jEdit/macros/Text/Reverse_Lines.bsh b/jEdit/macros/Text/Reverse_Lines.bsh
index edeca72..27dba02 100644
--- a/jEdit/macros/Text/Reverse_Lines.bsh
+++ b/jEdit/macros/Text/Reverse_Lines.bsh
@@ -1,94 +1,94 @@
-/*
- * Reverse_Lines.bsh - a BeanShell macro script for reversing the order
- * of lines in a buffer. If there are selections, the lines in the selections
- * will be reversed, otherwise the whole buffer will be reversed.
- * NOTE: Lines are not sorted or reverse sorted, simply reversed.
- *
- * Copyright (C) 2002-2004 Ollie Rutherfurd, oliver at rutherfurd.net
- *
- * :mode=beanshell:tabSize=4:indentSize=4:maxLineLen=0:noTabs=false:
- * :indentOnTab=true:indentOnEnter=true:folding=explicit:collapseFolds=1:
- *
- * $Id: Reverse_Lines.bsh 9126 2007-03-10 19:14:30Z Vampire0 $
- */
-
-void reverseLines(textArea)
-{
- JEditBuffer buffer = textArea.getBuffer();
- Selection[] selections = textArea.getSelection();
-
- // doesn't work with rectangular selections, check for them up-front
- for(int i = 0; i < selections.length; i++)
- {
- if(selections[i] instanceof Selection.Rect)
- {
- Macros.error(view, "Sorry, this macro doesn't work with Rectangular Selections.");
- return;
- }
- }
-
- // do whole buffer if no selections
- if(selections.length == 0)
- {
- StringBuffer sb = new StringBuffer(buffer.getLength());
- for(int i = buffer.getLineCount() - 1; i >= 0; i--)
- {
- String line = buffer.getLineText(i);
- sb.append(line);
- if(i > 0) // don't append a newline for the last line
- sb.append('\n');
- }
- buffer.remove(0, buffer.getLength());
- buffer.insert(0, sb.toString());
- }
- // reverse all lines that are selected *NOT* just selected portions of lines
- else
- {
- for(int i = 0; i < selections.length; i++){
-
- int startLine = selections[i].getStartLine();
- int endLine = selections[i].getEndLine();
- int startOffset = buffer.getLineStartOffset(startLine);
-
- if(startLine < endLine)
- {
- StringBuffer sb = new StringBuffer();
- for(int i = endLine; i > startLine; i--)
- {
- String line = buffer.getLineText(i);
- sb.append(line).append('\n');
- }
-
- // appending first line here, so a check
- // can be made to see whether to append
- // a newline (don't if the original line
- // was the last line of the buffer)
- sb.append(buffer.getLineText(startLine));
- if(endLine < buffer.getLineCount() - 1)
- sb.append('\n');
-
- String reversed = sb.toString();
- buffer.remove(startOffset, reversed.length());
- buffer.insert(startOffset, reversed);
- }
- }
- }
-}
-
-if(buffer.isReadOnly())
- Macros.error(view, "Buffer is read-only.");
-else
- reverseLines(textArea);
-
-/*
- Macro index entry (in DocBook XML)
-
-<listitem>
- <para><filename>Reverse_Lines.bsh</filename></para>
- <abstract><para>
- Reverses the selected lines or the entire buffer if no
- lines are selected. Does not support Rectangular
- Selections.
- </para></abstract>
-</listitem>
-*/
+/*
+ * Reverse_Lines.bsh - a BeanShell macro script for reversing the order
+ * of lines in a buffer. If there are selections, the lines in the selections
+ * will be reversed, otherwise the whole buffer will be reversed.
+ * NOTE: Lines are not sorted or reverse sorted, simply reversed.
+ *
+ * Copyright (C) 2002-2004 Ollie Rutherfurd, oliver at rutherfurd.net
+ *
+ * :mode=beanshell:tabSize=4:indentSize=4:maxLineLen=0:noTabs=false:
+ * :indentOnTab=true:indentOnEnter=true:folding=explicit:collapseFolds=1:
+ *
+ * $Id: Reverse_Lines.bsh 9126 2007-03-10 19:14:30Z Vampire0 $
+ */
+
+void reverseLines(textArea)
+{
+ JEditBuffer buffer = textArea.getBuffer();
+ Selection[] selections = textArea.getSelection();
+
+ // doesn't work with rectangular selections, check for them up-front
+ for(int i = 0; i < selections.length; i++)
+ {
+ if(selections[i] instanceof Selection.Rect)
+ {
+ Macros.error(view, "Sorry, this macro doesn't work with Rectangular Selections.");
+ return;
+ }
+ }
+
+ // do whole buffer if no selections
+ if(selections.length == 0)
+ {
+ StringBuffer sb = new StringBuffer(buffer.getLength());
+ for(int i = buffer.getLineCount() - 1; i >= 0; i--)
+ {
+ String line = buffer.getLineText(i);
+ sb.append(line);
+ if(i > 0) // don't append a newline for the last line
+ sb.append('\n');
+ }
+ buffer.remove(0, buffer.getLength());
+ buffer.insert(0, sb.toString());
+ }
+ // reverse all lines that are selected *NOT* just selected portions of lines
+ else
+ {
+ for(int i = 0; i < selections.length; i++){
+
+ int startLine = selections[i].getStartLine();
+ int endLine = selections[i].getEndLine();
+ int startOffset = buffer.getLineStartOffset(startLine);
+
+ if(startLine < endLine)
+ {
+ StringBuffer sb = new StringBuffer();
+ for(int i = endLine; i > startLine; i--)
+ {
+ String line = buffer.getLineText(i);
+ sb.append(line).append('\n');
+ }
+
+ // appending first line here, so a check
+ // can be made to see whether to append
+ // a newline (don't if the original line
+ // was the last line of the buffer)
+ sb.append(buffer.getLineText(startLine));
+ if(endLine < buffer.getLineCount() - 1)
+ sb.append('\n');
+
+ String reversed = sb.toString();
+ buffer.remove(startOffset, reversed.length());
+ buffer.insert(startOffset, reversed);
+ }
+ }
+ }
+}
+
+if(buffer.isReadOnly())
+ Macros.error(view, "Buffer is read-only.");
+else
+ reverseLines(textArea);
+
+/*
+ Macro index entry (in DocBook XML)
+
+<listitem>
+ <para><filename>Reverse_Lines.bsh</filename></para>
+ <abstract><para>
+ Reverses the selected lines or the entire buffer if no
+ lines are selected. Does not support Rectangular
+ Selections.
+ </para></abstract>
+</listitem>
+*/
diff --git a/jEdit/macros/Text/Single_Space_Buffer.bsh b/jEdit/macros/Text/Single_Space_Buffer.bsh
index e686ad4..cf811e8 100644
--- a/jEdit/macros/Text/Single_Space_Buffer.bsh
+++ b/jEdit/macros/Text/Single_Space_Buffer.bsh
@@ -1,51 +1,51 @@
-/**
- * Single_Space_Buffer.bsh - A Beanshell macro for jEdit that
- * converts a buffer from being double-spaced (where every second
- * line is blank) to single-spaced, by removing each second line -
- * but only if they're all blank.
- *
- * Copyright (C) 2004 Ollie Rutherfurd <oliver at rutherfurd.net>
- *
- * $Id: Single_Space_Buffer.bsh 9126 2007-03-10 19:14:30Z Vampire0 $
- */
-
-void singleSpaceBuffer(View view)
-{
- Buffer buffer = view.getBuffer();
- int line = 1; // start on second line
- Vector lines = new java.util.Stack();
-
- while(line < buffer.getLineCount())
- {
- if(buffer.getLineText(line).equals(""))
- lines.addElement(new Integer(line));
- else
- {
- StringBuffer msg = new StringBuffer();
- msg.append(buffer.getPath() + " doesn't appear to be double-spaced:\n");
- msg.append("Line " + (line + 1) + " isn't blank.");
- Macros.error(view, msg.toString());
- return;
- }
- line += 2;
- }
- while(!lines.empty())
- {
- Integer lineno = (Integer)lines.pop();
- int offset = buffer.getLineStartOffset(lineno.intValue());
- buffer.remove(offset-1,1);
- }
-}
-
-singleSpaceBuffer(view);
-
-/*
-
-<listitem>
- <para><filename>Single_Space_Buffer.bsh</filename></para>
- <abstract><para>
- Removes every second line, if they are all blank.
- </para></abstract>
-</listitem>
-
-*/
+/**
+ * Single_Space_Buffer.bsh - A Beanshell macro for jEdit that
+ * converts a buffer from being double-spaced (where every second
+ * line is blank) to single-spaced, by removing each second line -
+ * but only if they're all blank.
+ *
+ * Copyright (C) 2004 Ollie Rutherfurd <oliver at rutherfurd.net>
+ *
+ * $Id: Single_Space_Buffer.bsh 9126 2007-03-10 19:14:30Z Vampire0 $
+ */
+
+void singleSpaceBuffer(View view)
+{
+ Buffer buffer = view.getBuffer();
+ int line = 1; // start on second line
+ Vector lines = new java.util.Stack();
+
+ while(line < buffer.getLineCount())
+ {
+ if(buffer.getLineText(line).equals(""))
+ lines.addElement(new Integer(line));
+ else
+ {
+ StringBuffer msg = new StringBuffer();
+ msg.append(buffer.getPath() + " doesn't appear to be double-spaced:\n");
+ msg.append("Line " + (line + 1) + " isn't blank.");
+ Macros.error(view, msg.toString());
+ return;
+ }
+ line += 2;
+ }
+ while(!lines.empty())
+ {
+ Integer lineno = (Integer)lines.pop();
+ int offset = buffer.getLineStartOffset(lineno.intValue());
+ buffer.remove(offset-1,1);
+ }
+}
+
+singleSpaceBuffer(view);
+
+/*
+
+<listitem>
+ <para><filename>Single_Space_Buffer.bsh</filename></para>
+ <abstract><para>
+ Removes every second line, if they are all blank.
+ </para></abstract>
+</listitem>
+
+*/
diff --git a/jEdit/modes/actionscript.xml b/jEdit/modes/actionscript.xml
index baf750f..3d53a98 100644
--- a/jEdit/modes/actionscript.xml
+++ b/jEdit/modes/actionscript.xml
@@ -1,829 +1,829 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- ActionScript mode by Ben Glazer <ben at enspire.com>
- Adapted from JavaScript mode by Andre Kaplan
- Updated for Flash MX 2004 by Nahuel Foronda <www.asfusion.com>
--->
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <!-- the ; hack is there so that stuff like if(bob) fred();
- does not indent the next line -->
- <PROPERTY NAME="indentPrevLine" VALUE="\s*(if|while)\s*(|else|case|default:)[^;]*|for\s*\(.*)" />
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- whitespace: (space and tab) -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
- <SEQ TYPE="NULL">)</SEQ>
- <SEQ TYPE="NULL">(</SEQ>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">:</SEQ>
-
- <KEYWORDS>
- <!-- ActionScript's reserved words (see AS:TDG p.332) -->
- <KEYWORD1>add</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>and</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>eq</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>ge</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>gt</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>ifFrameLoaded</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>le</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>lt</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>ne</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>not</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>onClipEvent</KEYWORD1>
- <KEYWORD1>or</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>return</KEYWORD1>
- <LITERAL2>this</LITERAL2>
- <KEYWORD1>tellTarget</KEYWORD1> <!-- deprecated -->
- <KEYWORD1>typeof</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
- <KEYWORD3>void</KEYWORD3>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
-
- <!-- Built-in objects (good idea not to use these names!)-->
- <KEYWORD3>Array</KEYWORD3>
- <KEYWORD3>Boolean</KEYWORD3>
- <KEYWORD3>Color</KEYWORD3>
- <KEYWORD3>Date</KEYWORD3>
- <KEYWORD3>Function</KEYWORD3>
- <KEYWORD3>Key</KEYWORD3>
- <KEYWORD3>MovieClip</KEYWORD3>
- <KEYWORD3>Math</KEYWORD3>
- <KEYWORD3>Mouse</KEYWORD3>
- <KEYWORD3>Number</KEYWORD3>
- <KEYWORD3>Object</KEYWORD3>
- <KEYWORD3>Selection</KEYWORD3>
- <KEYWORD3>Sound</KEYWORD3>
- <KEYWORD3>String</KEYWORD3>
- <KEYWORD3>XML</KEYWORD3>
- <KEYWORD3>XMLNode</KEYWORD3>
- <KEYWORD3>XMLSocket</KEYWORD3>
-
- <!-- Literals -->
- <LITERAL2>NaN</LITERAL2>
- <LITERAL2>Infinity</LITERAL2>
- <LITERAL2>false</LITERAL2>
- <LITERAL2>null</LITERAL2>
- <LITERAL2>true</LITERAL2>
- <LITERAL2>undefined</LITERAL2>
-
- <!-- Global functions -->
- <LITERAL2>Boolean</LITERAL2>
- <LITERAL2>call</LITERAL2>
- <LITERAL2>Date</LITERAL2>
- <LITERAL2>escape</LITERAL2>
- <LITERAL2>eval</LITERAL2>
- <LITERAL2>fscommand</LITERAL2>
- <LITERAL2>getProperty</LITERAL2>
- <LITERAL2>getTimer</LITERAL2>
- <LITERAL2>getURL</LITERAL2>
- <LITERAL2>getVersion</LITERAL2>
- <LITERAL2>gotoAndPlay</LITERAL2>
- <LITERAL2>gotoAndStop</LITERAL2>
- <LITERAL2>#include</LITERAL2>
- <LITERAL2>int</LITERAL2> <!-- deprecated -->
- <LITERAL2>isFinite</LITERAL2>
- <LITERAL2>isNaN</LITERAL2>
- <LITERAL2>loadMovie</LITERAL2>
- <LITERAL2>loadMovieNum</LITERAL2>
- <LITERAL2>loadVariables</LITERAL2>
- <LITERAL2>loadVariablesNum</LITERAL2>
- <LITERAL2>maxscroll</LITERAL2>
- <LITERAL2>newline</LITERAL2>
- <LITERAL2>nextFrame</LITERAL2>
- <LITERAL2>nextScene</LITERAL2>
- <LITERAL2>Number</LITERAL2>
- <LITERAL2>parseFloat</LITERAL2>
- <LITERAL2>parseInt</LITERAL2>
- <LITERAL2>play</LITERAL2>
- <LITERAL2>prevFrame</LITERAL2>
- <LITERAL2>prevScene</LITERAL2>
- <LITERAL2>print</LITERAL2>
- <LITERAL2>printAsBitmap</LITERAL2>
- <LITERAL2>printAsBitmapNum</LITERAL2>
- <LITERAL2>printNum</LITERAL2>
- <LITERAL2>random</LITERAL2> <!-- deprecated -->
- <LITERAL2>removeMovieClip</LITERAL2>
- <LITERAL2>scroll</LITERAL2>
- <LITERAL2>setProperty</LITERAL2>
- <LITERAL2>startDrag</LITERAL2>
- <LITERAL2>stop</LITERAL2>
- <LITERAL2>stopAllSounds</LITERAL2>
- <LITERAL2>stopDrag</LITERAL2>
- <LITERAL2>String</LITERAL2>
- <LITERAL2>targetPath</LITERAL2>
- <LITERAL2>tellTarget</LITERAL2> <!-- deprecated -->
- <LITERAL2>toggleHighQuality</LITERAL2> <!-- deprecated -->
- <LITERAL2>trace</LITERAL2>
- <LITERAL2>unescape</LITERAL2>
- <LITERAL2>unloadMovie</LITERAL2>
- <LITERAL2>unloadMovieNum</LITERAL2>
- <LITERAL2>updateAfterEvent</LITERAL2>
-
- <!-- Start Update -->
- <LITERAL2>prototype</LITERAL2>
- <LITERAL2>clearInterval</LITERAL2>
- <LITERAL2>getVersion</LITERAL2>
- <LITERAL2>length</LITERAL2>
- <LITERAL2>__proto__</LITERAL2>
- <LITERAL2>__constructor__</LITERAL2>
- <LITERAL2>ASSetPropFlags</LITERAL2>
- <LITERAL2>setInterval</LITERAL2>
- <LITERAL2>setI</LITERAL2>
- <KEYWORD3>MMExecute</KEYWORD3>
-
- <!-- MovieCLip methods-->
- <LITERAL2>attachMovie</LITERAL2>
- <LITERAL2>createEmptyMovieClip</LITERAL2>
- <LITERAL2>createTextField</LITERAL2>
- <LITERAL2>duplicateMovieClip</LITERAL2>
- <LITERAL2>getBounds</LITERAL2>
- <LITERAL2>getBytesLoaded</LITERAL2>
- <LITERAL2>getBytesTotal</LITERAL2>
- <LITERAL2>getDepth</LITERAL2>
- <LITERAL2>globalToLocal</LITERAL2>
- <LITERAL2>hitTest</LITERAL2>
- <LITERAL2>localToGlobal</LITERAL2>
- <LITERAL2>setMask</LITERAL2>
- <LITERAL2>swapDepths</LITERAL2>
- <LITERAL2>attachAudio</LITERAL2>
- <LITERAL2>getInstanceAtDepth</LITERAL2>
- <LITERAL2>getNextHighestDepth</LITERAL2>
- <LITERAL2>getSWFVersion</LITERAL2>
- <LITERAL2>getTextSnapshot</LITERAL2>
- <LITERAL2>getSWFVersion</LITERAL2>
- <LITERAL2>getSWFVersion</LITERAL2>
-
- <!-- MovieCLip drawing methods -->
- <LITERAL2>beginFill</LITERAL2>
- <LITERAL2>beginGradientFill</LITERAL2>
- <LITERAL2>clear</LITERAL2>
- <LITERAL2>curveTo</LITERAL2>
- <LITERAL2>endFill</LITERAL2>
- <LITERAL2>lineStyle</LITERAL2>
- <LITERAL2>lineTo</LITERAL2>
- <LITERAL2>moveTo</LITERAL2>
-
- <!-- MovieCLip properties -->
- <LITERAL2>enabled</LITERAL2>
- <LITERAL2>focusEnabled</LITERAL2>
- <LITERAL2>hitArea</LITERAL2>
- <LITERAL2>tabChildren</LITERAL2>
- <LITERAL2>tabEnabled</LITERAL2>
- <LITERAL2>tabIndex</LITERAL2>
- <LITERAL2>trackAsMenu</LITERAL2>
- <LITERAL2>menu</LITERAL2>
- <LITERAL2>useHandCursor</LITERAL2>
-
- <!-- MovieCLip Events -->
- <LITERAL2>onData</LITERAL2>
- <LITERAL2>onDragOut</LITERAL2>
- <LITERAL2>onDragOver</LITERAL2>
- <LITERAL2>onEnterFrame</LITERAL2>
- <LITERAL2>onKeyDown</LITERAL2>
- <LITERAL2>onKeyUp</LITERAL2>
- <LITERAL2>onKillFocus</LITERAL2>
- <LITERAL2>onLoad</LITERAL2>
- <LITERAL2>onMouseDown</LITERAL2>
- <LITERAL2>onMouseMove</LITERAL2>
- <LITERAL2>onMouseUp</LITERAL2>
- <LITERAL2>onPress</LITERAL2>
- <LITERAL2>onRelease</LITERAL2>
- <LITERAL2>onReleaseOutside</LITERAL2>
- <LITERAL2>onRollOut</LITERAL2>
- <LITERAL2>onRollOver</LITERAL2>
- <LITERAL2>onSetFocus</LITERAL2>
- <LITERAL2>onUnload</LITERAL2>
-
- <!-- MovieClipLoader class -->
- <LITERAL2>MovieClipLoader</LITERAL2>
- <LITERAL2>getProgress</LITERAL2>
- <LITERAL2>loadClip</LITERAL2>
- <LITERAL2>onLoadComplete</LITERAL2>
- <LITERAL2>onLoadError</LITERAL2>
- <LITERAL2>onLoadInit</LITERAL2>
- <LITERAL2>onLoadProgress</LITERAL2>
- <LITERAL2>onLoadStart</LITERAL2>
- <LITERAL2>unloadClip</LITERAL2>
-
- <!-- PrintJob class -->
- <LITERAL2>PrintJob</LITERAL2>
- <LITERAL2>addPage</LITERAL2>
-
- <!-- Camera class -->
- <LITERAL2>Camera</LITERAL2>
- <LITERAL2>activityLevel</LITERAL2>
- <LITERAL2>bandwidth</LITERAL2>
- <LITERAL2>currentFps</LITERAL2>
- <LITERAL2>fps</LITERAL2>
- <LITERAL2>index</LITERAL2>
- <LITERAL2>motionLevel</LITERAL2>
- <LITERAL2>motionTimeOut</LITERAL2>
- <LITERAL2>muted</LITERAL2>
- <LITERAL2>name</LITERAL2>
- <LITERAL2>names</LITERAL2>
- <LITERAL2>onActivity</LITERAL2>
- <LITERAL2>onStatus</LITERAL2>
- <LITERAL2>quality</LITERAL2>
- <LITERAL2>setMode</LITERAL2>
- <LITERAL2>setMotionLevel</LITERAL2>
- <LITERAL2>setQuality</LITERAL2>
-
- <!-- Microphone class -->
- <LITERAL2>Microphone</LITERAL2>
- <LITERAL2>gain</LITERAL2>
- <LITERAL2>rate</LITERAL2>
- <LITERAL2>setGain</LITERAL2>
- <LITERAL2>setRate</LITERAL2>
- <LITERAL2>setSilenceLevel</LITERAL2>
- <LITERAL2>setUseEchoSuppression</LITERAL2>
- <LITERAL2>silenceLevel</LITERAL2>
- <LITERAL2>silenceTimeout</LITERAL2>
- <LITERAL2>useEchoSuppression</LITERAL2>
-
- <!-- ContextMenu Class -->
- <LITERAL2>ContextMenu</LITERAL2>
- <LITERAL2>builtInItems</LITERAL2>
- <LITERAL2>copy</LITERAL2>
- <LITERAL2>customItems</LITERAL2>
- <LITERAL2>hideBuiltInItems</LITERAL2>
- <LITERAL2>onSelect</LITERAL2>
- <LITERAL2>caption</LITERAL2>
- <LITERAL2>ContextMenuItem</LITERAL2>
- <LITERAL2>separatorBefore</LITERAL2>
- <LITERAL2>visible</LITERAL2>
-
- <!-- Error class -->
- <LITERAL2>Error</LITERAL2>
- <LITERAL2>visible</LITERAL2>
- <LITERAL2>message</LITERAL2>
-
- <!-- operators grenn-->
- <KEYWORD1>instanceof</KEYWORD1>
- <KEYWORD1>#endinitclip</KEYWORD1>
- <KEYWORD1>#initclip</KEYWORD1>
-
- <!-- properties -->
- <LITERAL2>_alpha</LITERAL2>
- <LITERAL2>_currentframe</LITERAL2>
- <LITERAL2>_droptarget</LITERAL2>
- <LITERAL2>_focusrect</LITERAL2>
- <LITERAL2>_framesloaded</LITERAL2>
- <LITERAL2>_height</LITERAL2>
- <LITERAL2>_name</LITERAL2>
- <LITERAL2>_quality</LITERAL2>
- <LITERAL2>_rotation</LITERAL2>
- <LITERAL2>_soundbuftime</LITERAL2>
- <LITERAL2>_target</LITERAL2>
- <LITERAL2>_totalframes</LITERAL2>
- <LITERAL2>_url</LITERAL2>
- <LITERAL2>_visible</LITERAL2>
- <LITERAL2>_width</LITERAL2>
- <LITERAL2>_x</LITERAL2>
- <LITERAL2>_xmouse</LITERAL2>
- <LITERAL2>_xscale</LITERAL2>
- <LITERAL2>_y</LITERAL2>
- <LITERAL2>_ymouse</LITERAL2>
- <LITERAL2>_yscale</LITERAL2>
- <LITERAL2>_parent</LITERAL2>
- <LITERAL2>_root</LITERAL2>
- <LITERAL2>_level</LITERAL2>
- <LITERAL2>_lockroot</LITERAL2>
- <LITERAL2>_accProps</LITERAL2>
-
-
- <!-- Array -->
- <LITERAL2>sortOn</LITERAL2>
- <LITERAL2>toString</LITERAL2>
- <LITERAL2>splice</LITERAL2>
- <LITERAL2>sort</LITERAL2>
- <LITERAL2>slice</LITERAL2>
- <LITERAL2>shift</LITERAL2>
- <LITERAL2>reverse</LITERAL2>
- <LITERAL2>push</LITERAL2>
- <LITERAL2>join</LITERAL2>
- <LITERAL2>pop</LITERAL2>
- <LITERAL2>concat</LITERAL2>
- <LITERAL2>unshift</LITERAL2>
-
- <!-- Arguments -->
- <LITERAL2>arguments</LITERAL2>
- <LITERAL2>callee</LITERAL2>
- <LITERAL2>caller</LITERAL2>
- <LITERAL2>valueOf</LITERAL2>
-
- <!-- Date Class -->
- <LITERAL2>getDate</LITERAL2>
- <LITERAL2>getDay</LITERAL2>
- <LITERAL2>getFullYear</LITERAL2>
- <LITERAL2>getHours</LITERAL2>
- <LITERAL2>getMilliseconds</LITERAL2>
- <LITERAL2>getMinutes</LITERAL2>
- <LITERAL2>getMonth</LITERAL2>
- <LITERAL2>getSeconds</LITERAL2>
- <LITERAL2>getTime</LITERAL2>
- <LITERAL2>getTimezoneOffset</LITERAL2>
- <LITERAL2>getUTCDate</LITERAL2>
- <LITERAL2>getUTCDay</LITERAL2>
- <LITERAL2>getUTCFullYear</LITERAL2>
- <LITERAL2>getUTCHours</LITERAL2>
- <LITERAL2>getUTCMilliseconds</LITERAL2>
- <LITERAL2>getUTCMinutes</LITERAL2>
- <LITERAL2>getUTCMonth</LITERAL2>
- <LITERAL2>getUTCSeconds</LITERAL2>
- <LITERAL2>getYear</LITERAL2>
- <LITERAL2>setDate</LITERAL2>
- <LITERAL2>setFullYear</LITERAL2>
- <LITERAL2>setHours</LITERAL2>
- <LITERAL2>setMilliseconds</LITERAL2>
- <LITERAL2>setMinutes</LITERAL2>
- <LITERAL2>setMonth</LITERAL2>
- <LITERAL2>setSeconds</LITERAL2>
- <LITERAL2>setTime</LITERAL2>
- <LITERAL2>setUTCDate</LITERAL2>
- <LITERAL2>setUTCFullYear</LITERAL2>
- <LITERAL2>setUTCHours</LITERAL2>
- <LITERAL2>setUTCMilliseconds</LITERAL2>
- <LITERAL2>setUTCMinutes</LITERAL2>
- <LITERAL2>setUTCMonth</LITERAL2>
- <LITERAL2>setUTCSeconds</LITERAL2>
- <LITERAL2>setYear</LITERAL2>
- <LITERAL2>UTC</LITERAL2>
-
- <!-- Function -->
- <LITERAL2>_global</LITERAL2>
- <LITERAL2>apply</LITERAL2>
-
- <!-- Math Class -->
- <LITERAL2>abs</LITERAL2>
- <LITERAL2>acos</LITERAL2>
- <LITERAL2>asin</LITERAL2>
- <LITERAL2>atan</LITERAL2>
- <LITERAL2>atan2</LITERAL2>
- <LITERAL2>ceil</LITERAL2>
- <LITERAL2>cos</LITERAL2>
- <LITERAL2>exp</LITERAL2>
- <LITERAL2>floor</LITERAL2>
- <LITERAL2>log</LITERAL2>
- <LITERAL2>max</LITERAL2>
- <LITERAL2>min</LITERAL2>
- <LITERAL2>pow</LITERAL2>
- <LITERAL2>round</LITERAL2>
- <LITERAL2>sin</LITERAL2>
- <LITERAL2>sqrt</LITERAL2>
- <LITERAL2>tan</LITERAL2>
-
- <LITERAL2>E</LITERAL2>
- <LITERAL2>LN2</LITERAL2>
- <LITERAL2>LN10</LITERAL2>
- <LITERAL2>LOG2E</LITERAL2>
- <LITERAL2>LOG10E</LITERAL2>
- <LITERAL2>PI</LITERAL2>
- <LITERAL2>SQRT1_2</LITERAL2>
- <LITERAL2>SQRT2</LITERAL2>
-
- <!-- Number -->
- <LITERAL2>MAX_VALUE</LITERAL2>
- <LITERAL2>MIN_VALUE</LITERAL2>
- <LITERAL2>NEGATIVE_INFINITY</LITERAL2>
- <LITERAL2>POSITIVE_INFINITY</LITERAL2>
-
- <!-- Object -->
- <LITERAL2>addProperty</LITERAL2>
- <LITERAL2>registerClass</LITERAL2>
- <LITERAL2>unwatch</LITERAL2>
- <LITERAL2>watch</LITERAL2>
-
- <!-- String -->
- <LITERAL2>charAt</LITERAL2>
- <LITERAL2>charCodeAt</LITERAL2>
- <LITERAL2>fromCharCode</LITERAL2>
- <LITERAL2>lastIndexOf</LITERAL2>
- <LITERAL2>indexOf</LITERAL2>
- <LITERAL2>split</LITERAL2>
- <LITERAL2>substr</LITERAL2>
- <LITERAL2>substring</LITERAL2>
- <LITERAL2>toLowerCase</LITERAL2>
- <LITERAL2>toUpperCase</LITERAL2>
-
- <!-- Accessibility -->
- <LITERAL2>Accessibility</LITERAL2>
- <LITERAL2>isActive</LITERAL2>
- <LITERAL2>updateProperties</LITERAL2>
-
-
- <!-- System capabilities Class-->
- <LITERAL2>System</LITERAL2>
- <LITERAL2>capabilities</LITERAL2>
- <LITERAL2>exactSettings</LITERAL2>
- <LITERAL2>setClipboard</LITERAL2>
- <LITERAL2>showSettings</LITERAL2>
- <LITERAL2>useCodepage</LITERAL2>
- <LITERAL2>avHardwareDisable</LITERAL2>
- <LITERAL2>hasAccessibility</LITERAL2>
- <LITERAL2>hasAudio</LITERAL2>
- <LITERAL2>hasAudioEncoder</LITERAL2>
- <LITERAL2>hasMP3</LITERAL2>
- <LITERAL2>hasVideoEncoder</LITERAL2>
- <LITERAL2>pixelAspectRatio</LITERAL2>
- <LITERAL2>screenColor</LITERAL2>
- <LITERAL2>screenDPI</LITERAL2>
- <LITERAL2>screenResolutionX</LITERAL2>
- <LITERAL2>screenResolutionY</LITERAL2>
- <LITERAL2>hasEmbeddedVideo</LITERAL2>
- <LITERAL2>hasPrinting</LITERAL2>
- <LITERAL2>hasScreenBroadcast</LITERAL2>
- <LITERAL2>hasScreenPlayback</LITERAL2>
- <LITERAL2>hasStreamingAudio</LITERAL2>
- <LITERAL2>hasStreamingVideo</LITERAL2>
- <LITERAL2>isDebugger</LITERAL2>
- <LITERAL2>language</LITERAL2>
- <LITERAL2>manufacturer</LITERAL2>
- <LITERAL2>os</LITERAL2>
- <LITERAL2>playerType</LITERAL2>
- <LITERAL2>serverString</LITERAL2>
- <LITERAL2>localFileReadDisable</LITERAL2>
- <LITERAL2>version</LITERAL2>
- <!-- System security Class -->
- <LITERAL2>security</LITERAL2>
-
- <!-- Color Class -->
- <LITERAL2>getRGB</LITERAL2>
- <LITERAL2>getTransform</LITERAL2>
- <LITERAL2>setRGB</LITERAL2>
- <LITERAL2>setTransform</LITERAL2>
-
- <!-- Key Class -->
- <LITERAL2>addListener</LITERAL2>
- <LITERAL2>getAscii</LITERAL2>
- <LITERAL2>isDown</LITERAL2>
- <LITERAL2>getCode</LITERAL2>
- <LITERAL2>isToggled</LITERAL2>
- <LITERAL2>removeListener</LITERAL2>
- <LITERAL2>BACKSPACE</LITERAL2>
- <LITERAL2>CAPSLOCK</LITERAL2>
- <LITERAL2>CONTROL</LITERAL2>
- <LITERAL2>DELETEKEY</LITERAL2>
- <LITERAL2>DOWN</LITERAL2>
- <LITERAL2>END</LITERAL2>
- <LITERAL2>ENTER</LITERAL2>
- <LITERAL2>ESCAPE</LITERAL2>
- <LITERAL2>HOME</LITERAL2>
- <LITERAL2>INSERT</LITERAL2>
- <LITERAL2>LEFT</LITERAL2>
- <LITERAL2>PGDN</LITERAL2>
- <LITERAL2>PGUP</LITERAL2>
- <LITERAL2>SHIFT</LITERAL2>
- <LITERAL2>RIGHT</LITERAL2>
- <LITERAL2>SPACE</LITERAL2>
- <LITERAL2>TAB</LITERAL2>
- <LITERAL2>UP</LITERAL2>
-
- <!-- Mouse -->
- <LITERAL2>hide</LITERAL2>
- <LITERAL2>show</LITERAL2>
- <LITERAL2>onMouseWheel</LITERAL2>
-
- <!-- Selection Class-->
- <LITERAL2>getBeginIndex</LITERAL2>
- <LITERAL2>getCaretIndex</LITERAL2>
- <LITERAL2>getEndIndex</LITERAL2>
- <LITERAL2>getFocus</LITERAL2>
- <LITERAL2>setFocus</LITERAL2>
- <LITERAL2>setSelection</LITERAL2>
-
- <!-- SharedObject Class-->
- <LITERAL2>SharedObject</LITERAL2>
- <LITERAL2>data</LITERAL2>
- <LITERAL2>flush</LITERAL2>
- <LITERAL2>getLocal</LITERAL2>
- <LITERAL2>getSize</LITERAL2>
-
- <!-- Sound Class -->
- <LITERAL2>attachSound</LITERAL2>
- <LITERAL2>getVolume</LITERAL2>
- <LITERAL2>loadSound</LITERAL2>
- <LITERAL2>setPan</LITERAL2>
- <LITERAL2>getPan</LITERAL2>
- <LITERAL2>setVolume</LITERAL2>
- <LITERAL2>start</LITERAL2>
- <LITERAL2>duration</LITERAL2>
- <LITERAL2>position</LITERAL2>
- <LITERAL2>onSoundComplete</LITERAL2>
- <LITERAL2>id3</LITERAL2>
- <LITERAL2>onID3</LITERAL2>
-
- <!-- Video Class -->
- <LITERAL2>Video</LITERAL2>
- <LITERAL2>deblocking</LITERAL2>
- <LITERAL2>smoothing</LITERAL2>
-
- <!-- Stage Class -->
- <LITERAL2>Stage</LITERAL2>
- <LITERAL2>align</LITERAL2>
- <LITERAL2>height</LITERAL2>
- <LITERAL2>scaleMode</LITERAL2>
- <LITERAL2>showMenu</LITERAL2>
- <LITERAL2>width</LITERAL2>
- <LITERAL2>onResize</LITERAL2>
-
- <!-- TextField Class -->
- <LITERAL2>getFontList</LITERAL2>
- <LITERAL2>getNewTextFormat</LITERAL2>
- <LITERAL2>getTextFormat</LITERAL2>
- <LITERAL2>removeTextField</LITERAL2>
- <LITERAL2>replaceSel</LITERAL2>
- <LITERAL2>setNewTextFormat</LITERAL2>
- <LITERAL2>setTextFormat</LITERAL2>
- <LITERAL2>autoSize</LITERAL2>
- <LITERAL2>background</LITERAL2>
- <LITERAL2>backgroundColor</LITERAL2>
- <LITERAL2>border</LITERAL2>
- <LITERAL2>borderColor</LITERAL2>
- <LITERAL2>bottomScroll</LITERAL2>
- <LITERAL2>embedFonts</LITERAL2>
- <LITERAL2>hscroll</LITERAL2>
- <LITERAL2>html</LITERAL2>
- <LITERAL2>htmlText</LITERAL2>
- <LITERAL2>maxChars</LITERAL2>
- <LITERAL2>maxhscroll</LITERAL2>
- <LITERAL2>multiline</LITERAL2>
- <LITERAL2>password</LITERAL2>
- <LITERAL2>restrict</LITERAL2>
- <LITERAL2>selectable</LITERAL2>
- <LITERAL2>text</LITERAL2>
- <LITERAL2>textColor</LITERAL2>
- <LITERAL2>textHeight</LITERAL2>
- <LITERAL2>textWidth</LITERAL2>
- <LITERAL2>type</LITERAL2>
- <LITERAL2>variable</LITERAL2>
- <LITERAL2>wordWrap</LITERAL2>
- <LITERAL2>onChanged</LITERAL2>
- <LITERAL2>onScroller</LITERAL2>
- <LITERAL2>TextField</LITERAL2>
- <LITERAL2>mouseWheelEnabled</LITERAL2>
- <LITERAL2>replaceText</LITERAL2>
-
- <!-- StyleSheet Class -->
- <LITERAL2>StyleSheet</LITERAL2>
- <LITERAL2>getStyle</LITERAL2>
- <LITERAL2>getStyleNames</LITERAL2>
- <LITERAL2>parseCSS</LITERAL2>
- <LITERAL2>setStyle</LITERAL2>
- <LITERAL2>styleSheet</LITERAL2>
-
- <!-- TextFormat Class -->
- <LITERAL2>TextFormat</LITERAL2>
- <LITERAL2>getTextExtent</LITERAL2>
- <LITERAL2>blockIndent</LITERAL2>
- <LITERAL2>bold</LITERAL2>
- <LITERAL2>bullet</LITERAL2>
- <LITERAL2>color</LITERAL2>
- <LITERAL2>font</LITERAL2>
- <LITERAL2>indent</LITERAL2>
- <LITERAL2>italic</LITERAL2>
- <LITERAL2>leading</LITERAL2>
- <LITERAL2>leftMargin</LITERAL2>
- <LITERAL2>rightMargin</LITERAL2>
- <LITERAL2>size</LITERAL2>
- <LITERAL2>tabStops</LITERAL2>
- <LITERAL2>target</LITERAL2>
- <LITERAL2>underline</LITERAL2>
- <LITERAL2>url</LITERAL2>
-
- <!-- TextSnapshot object -->
- <LITERAL2>TextSnapshot</LITERAL2>
- <LITERAL2>findText</LITERAL2>
- <LITERAL2>getCount</LITERAL2>
- <LITERAL2>getSelected</LITERAL2>
- <LITERAL2>getSelectedText</LITERAL2>
- <LITERAL2>hitTestTextNearPos</LITERAL2>
- <LITERAL2>getText</LITERAL2>
- <LITERAL2>setSelectColor</LITERAL2>
- <LITERAL2>setSelected</LITERAL2>
-
- <!-- LoadVars Class-->
- <LITERAL2>LoadVars</LITERAL2>
- <LITERAL2>load</LITERAL2>
- <LITERAL2>send</LITERAL2>
- <LITERAL2>sendAndLoad</LITERAL2>
- <LITERAL2>contentType</LITERAL2>
- <LITERAL2>loaded</LITERAL2>
- <LITERAL2>addRequestHeader</LITERAL2>
-
- <!-- LocalConnection Class-->
- <LITERAL2>LocalConnection</LITERAL2>
- <LITERAL2>allowDomain</LITERAL2>
- <LITERAL2>allowInsecureDomain</LITERAL2>
- <LITERAL2>domain</LITERAL2>
-
- <!-- XML Class -->
- <LITERAL2>appendChild</LITERAL2>
- <LITERAL2>cloneNode</LITERAL2>
- <LITERAL2>createElement</LITERAL2>
- <LITERAL2>createTextNode</LITERAL2>
- <LITERAL2>hasChildNodes</LITERAL2>
- <LITERAL2>insertBefore</LITERAL2>
- <LITERAL2>parseXML</LITERAL2>
- <LITERAL2>removeNode</LITERAL2>
- <LITERAL2>attributes</LITERAL2>
- <LITERAL2>childNodes</LITERAL2>
- <LITERAL2>docTypeDecl</LITERAL2>
- <LITERAL2>firstChild</LITERAL2>
- <LITERAL2>ignoreWhite</LITERAL2>
- <LITERAL2>lastChild</LITERAL2>
- <LITERAL2>nextSibling</LITERAL2>
- <LITERAL2>nodeName</LITERAL2>
- <LITERAL2>nodeType</LITERAL2>
- <LITERAL2>nodeValue</LITERAL2>
- <LITERAL2>parentNode</LITERAL2>
- <LITERAL2>previousSibling</LITERAL2>
- <LITERAL2>status</LITERAL2>
- <LITERAL2>xmlDecl</LITERAL2>
- <LITERAL2>close</LITERAL2>
- <LITERAL2>connect</LITERAL2>
- <LITERAL2>onClose</LITERAL2>
- <LITERAL2>onConnect</LITERAL2>
- <LITERAL2>onXML</LITERAL2>
-
- <!-- CustomActions Class -->
- <LITERAL2>CustomActions</LITERAL2>
- <LITERAL2>onUpdate</LITERAL2>
- <LITERAL2>uninstall</LITERAL2>
- <LITERAL2>list</LITERAL2>
- <LITERAL2>install</LITERAL2>
- <LITERAL2>get</LITERAL2>
-
- <!-- NetConnection Class -->
- <LITERAL2>NetConnection</LITERAL2>
-
- <!-- NetStream Class-->
- <LITERAL2>NetStream</LITERAL2>
- <LITERAL2>bufferLength</LITERAL2>
- <LITERAL2>bufferTime</LITERAL2>
- <LITERAL2>bytesLoaded</LITERAL2>
- <LITERAL2>bytesTotal</LITERAL2>
- <LITERAL2>pause</LITERAL2>
- <LITERAL2>seek</LITERAL2>
- <LITERAL2>setBufferTime</LITERAL2>
- <LITERAL2>time</LITERAL2>
-
- <!-- RecordSet Class -->
- <LITERAL2>DataGlue</LITERAL2>
- <LITERAL2>bindFormatFunction</LITERAL2>
- <LITERAL2>bindFormatStrings</LITERAL2>
- <LITERAL2>getDebugConfig</LITERAL2>
- <LITERAL2>getDebugID</LITERAL2>
- <LITERAL2>getService</LITERAL2>
- <LITERAL2>setCredentials</LITERAL2>
- <LITERAL2>setDebugID</LITERAL2>
- <LITERAL2>getDebug</LITERAL2>
- <LITERAL2>setDebug</LITERAL2>
- <LITERAL2>createGatewayConnection</LITERAL2>
- <LITERAL2>NetServices</LITERAL2>
- <LITERAL2>setDefaultGatewayURL</LITERAL2>
- <LITERAL2>addItem</LITERAL2>
- <LITERAL2>addItemAt</LITERAL2>
- <LITERAL2>addView</LITERAL2>
- <LITERAL2>filter</LITERAL2>
- <LITERAL2>getColumnNames</LITERAL2>
- <LITERAL2>getItemAt</LITERAL2>
- <LITERAL2>getLength</LITERAL2>
- <LITERAL2>getNumberAvailable</LITERAL2>
- <LITERAL2>isFullyPopulated</LITERAL2>
- <LITERAL2>isLocal</LITERAL2>
- <LITERAL2>removeAll</LITERAL2>
- <LITERAL2>removeItemAt</LITERAL2>
- <LITERAL2>replaceItemAt</LITERAL2>
- <LITERAL2>setDeliveryMode</LITERAL2>
- <LITERAL2>setField</LITERAL2>
- <LITERAL2>sortItemsBy</LITERAL2>
-
- <!-- deprecated-->
- <KEYWORD2>chr</KEYWORD2>
- <KEYWORD2>mbchr</KEYWORD2>
- <KEYWORD2>mblength</KEYWORD2>
- <KEYWORD2>mbord</KEYWORD2>
- <KEYWORD2>mbsubstring</KEYWORD2>
- <KEYWORD2>ord</KEYWORD2>
- <KEYWORD2>_highquality</KEYWORD2>
-
- <!-- END-->
-
- <!--ECMAScript keywords-->
- <!-- Reserved for future use
- (some are already used in some Javascript Engines)
- -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>debugger</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
-
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD1>enum</KEYWORD1>
- <KEYWORD2>export</KEYWORD2>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
-
- <KEYWORD2>import</KEYWORD2>
- <KEYWORD1>instanceof</KEYWORD1>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD1>interface</KEYWORD1>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD2>package</KEYWORD2>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>Void</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>dynamic</KEYWORD1>
-
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD1>static</KEYWORD1>
- <LITERAL2>super</LITERAL2>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>throws</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>volatile</KEYWORD1>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ ActionScript mode by Ben Glazer <ben at enspire.com>
+ Adapted from JavaScript mode by Andre Kaplan
+ Updated for Flash MX 2004 by Nahuel Foronda <www.asfusion.com>
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <!-- the ; hack is there so that stuff like if(bob) fred();
+ does not indent the next line -->
+ <PROPERTY NAME="indentPrevLine" VALUE="\s*(if|while)\s*(|else|case|default:)[^;]*|for\s*\(.*)" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- whitespace: (space and tab) -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+ <SEQ TYPE="NULL">)</SEQ>
+ <SEQ TYPE="NULL">(</SEQ>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <KEYWORDS>
+ <!-- ActionScript's reserved words (see AS:TDG p.332) -->
+ <KEYWORD1>add</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>and</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>eq</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>ge</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>gt</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>ifFrameLoaded</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>le</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>lt</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>ne</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>onClipEvent</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>return</KEYWORD1>
+ <LITERAL2>this</LITERAL2>
+ <KEYWORD1>tellTarget</KEYWORD1> <!-- deprecated -->
+ <KEYWORD1>typeof</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD3>void</KEYWORD3>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+
+ <!-- Built-in objects (good idea not to use these names!)-->
+ <KEYWORD3>Array</KEYWORD3>
+ <KEYWORD3>Boolean</KEYWORD3>
+ <KEYWORD3>Color</KEYWORD3>
+ <KEYWORD3>Date</KEYWORD3>
+ <KEYWORD3>Function</KEYWORD3>
+ <KEYWORD3>Key</KEYWORD3>
+ <KEYWORD3>MovieClip</KEYWORD3>
+ <KEYWORD3>Math</KEYWORD3>
+ <KEYWORD3>Mouse</KEYWORD3>
+ <KEYWORD3>Number</KEYWORD3>
+ <KEYWORD3>Object</KEYWORD3>
+ <KEYWORD3>Selection</KEYWORD3>
+ <KEYWORD3>Sound</KEYWORD3>
+ <KEYWORD3>String</KEYWORD3>
+ <KEYWORD3>XML</KEYWORD3>
+ <KEYWORD3>XMLNode</KEYWORD3>
+ <KEYWORD3>XMLSocket</KEYWORD3>
+
+ <!-- Literals -->
+ <LITERAL2>NaN</LITERAL2>
+ <LITERAL2>Infinity</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>undefined</LITERAL2>
+
+ <!-- Global functions -->
+ <LITERAL2>Boolean</LITERAL2>
+ <LITERAL2>call</LITERAL2>
+ <LITERAL2>Date</LITERAL2>
+ <LITERAL2>escape</LITERAL2>
+ <LITERAL2>eval</LITERAL2>
+ <LITERAL2>fscommand</LITERAL2>
+ <LITERAL2>getProperty</LITERAL2>
+ <LITERAL2>getTimer</LITERAL2>
+ <LITERAL2>getURL</LITERAL2>
+ <LITERAL2>getVersion</LITERAL2>
+ <LITERAL2>gotoAndPlay</LITERAL2>
+ <LITERAL2>gotoAndStop</LITERAL2>
+ <LITERAL2>#include</LITERAL2>
+ <LITERAL2>int</LITERAL2> <!-- deprecated -->
+ <LITERAL2>isFinite</LITERAL2>
+ <LITERAL2>isNaN</LITERAL2>
+ <LITERAL2>loadMovie</LITERAL2>
+ <LITERAL2>loadMovieNum</LITERAL2>
+ <LITERAL2>loadVariables</LITERAL2>
+ <LITERAL2>loadVariablesNum</LITERAL2>
+ <LITERAL2>maxscroll</LITERAL2>
+ <LITERAL2>newline</LITERAL2>
+ <LITERAL2>nextFrame</LITERAL2>
+ <LITERAL2>nextScene</LITERAL2>
+ <LITERAL2>Number</LITERAL2>
+ <LITERAL2>parseFloat</LITERAL2>
+ <LITERAL2>parseInt</LITERAL2>
+ <LITERAL2>play</LITERAL2>
+ <LITERAL2>prevFrame</LITERAL2>
+ <LITERAL2>prevScene</LITERAL2>
+ <LITERAL2>print</LITERAL2>
+ <LITERAL2>printAsBitmap</LITERAL2>
+ <LITERAL2>printAsBitmapNum</LITERAL2>
+ <LITERAL2>printNum</LITERAL2>
+ <LITERAL2>random</LITERAL2> <!-- deprecated -->
+ <LITERAL2>removeMovieClip</LITERAL2>
+ <LITERAL2>scroll</LITERAL2>
+ <LITERAL2>setProperty</LITERAL2>
+ <LITERAL2>startDrag</LITERAL2>
+ <LITERAL2>stop</LITERAL2>
+ <LITERAL2>stopAllSounds</LITERAL2>
+ <LITERAL2>stopDrag</LITERAL2>
+ <LITERAL2>String</LITERAL2>
+ <LITERAL2>targetPath</LITERAL2>
+ <LITERAL2>tellTarget</LITERAL2> <!-- deprecated -->
+ <LITERAL2>toggleHighQuality</LITERAL2> <!-- deprecated -->
+ <LITERAL2>trace</LITERAL2>
+ <LITERAL2>unescape</LITERAL2>
+ <LITERAL2>unloadMovie</LITERAL2>
+ <LITERAL2>unloadMovieNum</LITERAL2>
+ <LITERAL2>updateAfterEvent</LITERAL2>
+
+ <!-- Start Update -->
+ <LITERAL2>prototype</LITERAL2>
+ <LITERAL2>clearInterval</LITERAL2>
+ <LITERAL2>getVersion</LITERAL2>
+ <LITERAL2>length</LITERAL2>
+ <LITERAL2>__proto__</LITERAL2>
+ <LITERAL2>__constructor__</LITERAL2>
+ <LITERAL2>ASSetPropFlags</LITERAL2>
+ <LITERAL2>setInterval</LITERAL2>
+ <LITERAL2>setI</LITERAL2>
+ <KEYWORD3>MMExecute</KEYWORD3>
+
+ <!-- MovieCLip methods-->
+ <LITERAL2>attachMovie</LITERAL2>
+ <LITERAL2>createEmptyMovieClip</LITERAL2>
+ <LITERAL2>createTextField</LITERAL2>
+ <LITERAL2>duplicateMovieClip</LITERAL2>
+ <LITERAL2>getBounds</LITERAL2>
+ <LITERAL2>getBytesLoaded</LITERAL2>
+ <LITERAL2>getBytesTotal</LITERAL2>
+ <LITERAL2>getDepth</LITERAL2>
+ <LITERAL2>globalToLocal</LITERAL2>
+ <LITERAL2>hitTest</LITERAL2>
+ <LITERAL2>localToGlobal</LITERAL2>
+ <LITERAL2>setMask</LITERAL2>
+ <LITERAL2>swapDepths</LITERAL2>
+ <LITERAL2>attachAudio</LITERAL2>
+ <LITERAL2>getInstanceAtDepth</LITERAL2>
+ <LITERAL2>getNextHighestDepth</LITERAL2>
+ <LITERAL2>getSWFVersion</LITERAL2>
+ <LITERAL2>getTextSnapshot</LITERAL2>
+ <LITERAL2>getSWFVersion</LITERAL2>
+ <LITERAL2>getSWFVersion</LITERAL2>
+
+ <!-- MovieCLip drawing methods -->
+ <LITERAL2>beginFill</LITERAL2>
+ <LITERAL2>beginGradientFill</LITERAL2>
+ <LITERAL2>clear</LITERAL2>
+ <LITERAL2>curveTo</LITERAL2>
+ <LITERAL2>endFill</LITERAL2>
+ <LITERAL2>lineStyle</LITERAL2>
+ <LITERAL2>lineTo</LITERAL2>
+ <LITERAL2>moveTo</LITERAL2>
+
+ <!-- MovieCLip properties -->
+ <LITERAL2>enabled</LITERAL2>
+ <LITERAL2>focusEnabled</LITERAL2>
+ <LITERAL2>hitArea</LITERAL2>
+ <LITERAL2>tabChildren</LITERAL2>
+ <LITERAL2>tabEnabled</LITERAL2>
+ <LITERAL2>tabIndex</LITERAL2>
+ <LITERAL2>trackAsMenu</LITERAL2>
+ <LITERAL2>menu</LITERAL2>
+ <LITERAL2>useHandCursor</LITERAL2>
+
+ <!-- MovieCLip Events -->
+ <LITERAL2>onData</LITERAL2>
+ <LITERAL2>onDragOut</LITERAL2>
+ <LITERAL2>onDragOver</LITERAL2>
+ <LITERAL2>onEnterFrame</LITERAL2>
+ <LITERAL2>onKeyDown</LITERAL2>
+ <LITERAL2>onKeyUp</LITERAL2>
+ <LITERAL2>onKillFocus</LITERAL2>
+ <LITERAL2>onLoad</LITERAL2>
+ <LITERAL2>onMouseDown</LITERAL2>
+ <LITERAL2>onMouseMove</LITERAL2>
+ <LITERAL2>onMouseUp</LITERAL2>
+ <LITERAL2>onPress</LITERAL2>
+ <LITERAL2>onRelease</LITERAL2>
+ <LITERAL2>onReleaseOutside</LITERAL2>
+ <LITERAL2>onRollOut</LITERAL2>
+ <LITERAL2>onRollOver</LITERAL2>
+ <LITERAL2>onSetFocus</LITERAL2>
+ <LITERAL2>onUnload</LITERAL2>
+
+ <!-- MovieClipLoader class -->
+ <LITERAL2>MovieClipLoader</LITERAL2>
+ <LITERAL2>getProgress</LITERAL2>
+ <LITERAL2>loadClip</LITERAL2>
+ <LITERAL2>onLoadComplete</LITERAL2>
+ <LITERAL2>onLoadError</LITERAL2>
+ <LITERAL2>onLoadInit</LITERAL2>
+ <LITERAL2>onLoadProgress</LITERAL2>
+ <LITERAL2>onLoadStart</LITERAL2>
+ <LITERAL2>unloadClip</LITERAL2>
+
+ <!-- PrintJob class -->
+ <LITERAL2>PrintJob</LITERAL2>
+ <LITERAL2>addPage</LITERAL2>
+
+ <!-- Camera class -->
+ <LITERAL2>Camera</LITERAL2>
+ <LITERAL2>activityLevel</LITERAL2>
+ <LITERAL2>bandwidth</LITERAL2>
+ <LITERAL2>currentFps</LITERAL2>
+ <LITERAL2>fps</LITERAL2>
+ <LITERAL2>index</LITERAL2>
+ <LITERAL2>motionLevel</LITERAL2>
+ <LITERAL2>motionTimeOut</LITERAL2>
+ <LITERAL2>muted</LITERAL2>
+ <LITERAL2>name</LITERAL2>
+ <LITERAL2>names</LITERAL2>
+ <LITERAL2>onActivity</LITERAL2>
+ <LITERAL2>onStatus</LITERAL2>
+ <LITERAL2>quality</LITERAL2>
+ <LITERAL2>setMode</LITERAL2>
+ <LITERAL2>setMotionLevel</LITERAL2>
+ <LITERAL2>setQuality</LITERAL2>
+
+ <!-- Microphone class -->
+ <LITERAL2>Microphone</LITERAL2>
+ <LITERAL2>gain</LITERAL2>
+ <LITERAL2>rate</LITERAL2>
+ <LITERAL2>setGain</LITERAL2>
+ <LITERAL2>setRate</LITERAL2>
+ <LITERAL2>setSilenceLevel</LITERAL2>
+ <LITERAL2>setUseEchoSuppression</LITERAL2>
+ <LITERAL2>silenceLevel</LITERAL2>
+ <LITERAL2>silenceTimeout</LITERAL2>
+ <LITERAL2>useEchoSuppression</LITERAL2>
+
+ <!-- ContextMenu Class -->
+ <LITERAL2>ContextMenu</LITERAL2>
+ <LITERAL2>builtInItems</LITERAL2>
+ <LITERAL2>copy</LITERAL2>
+ <LITERAL2>customItems</LITERAL2>
+ <LITERAL2>hideBuiltInItems</LITERAL2>
+ <LITERAL2>onSelect</LITERAL2>
+ <LITERAL2>caption</LITERAL2>
+ <LITERAL2>ContextMenuItem</LITERAL2>
+ <LITERAL2>separatorBefore</LITERAL2>
+ <LITERAL2>visible</LITERAL2>
+
+ <!-- Error class -->
+ <LITERAL2>Error</LITERAL2>
+ <LITERAL2>visible</LITERAL2>
+ <LITERAL2>message</LITERAL2>
+
+ <!-- operators grenn-->
+ <KEYWORD1>instanceof</KEYWORD1>
+ <KEYWORD1>#endinitclip</KEYWORD1>
+ <KEYWORD1>#initclip</KEYWORD1>
+
+ <!-- properties -->
+ <LITERAL2>_alpha</LITERAL2>
+ <LITERAL2>_currentframe</LITERAL2>
+ <LITERAL2>_droptarget</LITERAL2>
+ <LITERAL2>_focusrect</LITERAL2>
+ <LITERAL2>_framesloaded</LITERAL2>
+ <LITERAL2>_height</LITERAL2>
+ <LITERAL2>_name</LITERAL2>
+ <LITERAL2>_quality</LITERAL2>
+ <LITERAL2>_rotation</LITERAL2>
+ <LITERAL2>_soundbuftime</LITERAL2>
+ <LITERAL2>_target</LITERAL2>
+ <LITERAL2>_totalframes</LITERAL2>
+ <LITERAL2>_url</LITERAL2>
+ <LITERAL2>_visible</LITERAL2>
+ <LITERAL2>_width</LITERAL2>
+ <LITERAL2>_x</LITERAL2>
+ <LITERAL2>_xmouse</LITERAL2>
+ <LITERAL2>_xscale</LITERAL2>
+ <LITERAL2>_y</LITERAL2>
+ <LITERAL2>_ymouse</LITERAL2>
+ <LITERAL2>_yscale</LITERAL2>
+ <LITERAL2>_parent</LITERAL2>
+ <LITERAL2>_root</LITERAL2>
+ <LITERAL2>_level</LITERAL2>
+ <LITERAL2>_lockroot</LITERAL2>
+ <LITERAL2>_accProps</LITERAL2>
+
+
+ <!-- Array -->
+ <LITERAL2>sortOn</LITERAL2>
+ <LITERAL2>toString</LITERAL2>
+ <LITERAL2>splice</LITERAL2>
+ <LITERAL2>sort</LITERAL2>
+ <LITERAL2>slice</LITERAL2>
+ <LITERAL2>shift</LITERAL2>
+ <LITERAL2>reverse</LITERAL2>
+ <LITERAL2>push</LITERAL2>
+ <LITERAL2>join</LITERAL2>
+ <LITERAL2>pop</LITERAL2>
+ <LITERAL2>concat</LITERAL2>
+ <LITERAL2>unshift</LITERAL2>
+
+ <!-- Arguments -->
+ <LITERAL2>arguments</LITERAL2>
+ <LITERAL2>callee</LITERAL2>
+ <LITERAL2>caller</LITERAL2>
+ <LITERAL2>valueOf</LITERAL2>
+
+ <!-- Date Class -->
+ <LITERAL2>getDate</LITERAL2>
+ <LITERAL2>getDay</LITERAL2>
+ <LITERAL2>getFullYear</LITERAL2>
+ <LITERAL2>getHours</LITERAL2>
+ <LITERAL2>getMilliseconds</LITERAL2>
+ <LITERAL2>getMinutes</LITERAL2>
+ <LITERAL2>getMonth</LITERAL2>
+ <LITERAL2>getSeconds</LITERAL2>
+ <LITERAL2>getTime</LITERAL2>
+ <LITERAL2>getTimezoneOffset</LITERAL2>
+ <LITERAL2>getUTCDate</LITERAL2>
+ <LITERAL2>getUTCDay</LITERAL2>
+ <LITERAL2>getUTCFullYear</LITERAL2>
+ <LITERAL2>getUTCHours</LITERAL2>
+ <LITERAL2>getUTCMilliseconds</LITERAL2>
+ <LITERAL2>getUTCMinutes</LITERAL2>
+ <LITERAL2>getUTCMonth</LITERAL2>
+ <LITERAL2>getUTCSeconds</LITERAL2>
+ <LITERAL2>getYear</LITERAL2>
+ <LITERAL2>setDate</LITERAL2>
+ <LITERAL2>setFullYear</LITERAL2>
+ <LITERAL2>setHours</LITERAL2>
+ <LITERAL2>setMilliseconds</LITERAL2>
+ <LITERAL2>setMinutes</LITERAL2>
+ <LITERAL2>setMonth</LITERAL2>
+ <LITERAL2>setSeconds</LITERAL2>
+ <LITERAL2>setTime</LITERAL2>
+ <LITERAL2>setUTCDate</LITERAL2>
+ <LITERAL2>setUTCFullYear</LITERAL2>
+ <LITERAL2>setUTCHours</LITERAL2>
+ <LITERAL2>setUTCMilliseconds</LITERAL2>
+ <LITERAL2>setUTCMinutes</LITERAL2>
+ <LITERAL2>setUTCMonth</LITERAL2>
+ <LITERAL2>setUTCSeconds</LITERAL2>
+ <LITERAL2>setYear</LITERAL2>
+ <LITERAL2>UTC</LITERAL2>
+
+ <!-- Function -->
+ <LITERAL2>_global</LITERAL2>
+ <LITERAL2>apply</LITERAL2>
+
+ <!-- Math Class -->
+ <LITERAL2>abs</LITERAL2>
+ <LITERAL2>acos</LITERAL2>
+ <LITERAL2>asin</LITERAL2>
+ <LITERAL2>atan</LITERAL2>
+ <LITERAL2>atan2</LITERAL2>
+ <LITERAL2>ceil</LITERAL2>
+ <LITERAL2>cos</LITERAL2>
+ <LITERAL2>exp</LITERAL2>
+ <LITERAL2>floor</LITERAL2>
+ <LITERAL2>log</LITERAL2>
+ <LITERAL2>max</LITERAL2>
+ <LITERAL2>min</LITERAL2>
+ <LITERAL2>pow</LITERAL2>
+ <LITERAL2>round</LITERAL2>
+ <LITERAL2>sin</LITERAL2>
+ <LITERAL2>sqrt</LITERAL2>
+ <LITERAL2>tan</LITERAL2>
+
+ <LITERAL2>E</LITERAL2>
+ <LITERAL2>LN2</LITERAL2>
+ <LITERAL2>LN10</LITERAL2>
+ <LITERAL2>LOG2E</LITERAL2>
+ <LITERAL2>LOG10E</LITERAL2>
+ <LITERAL2>PI</LITERAL2>
+ <LITERAL2>SQRT1_2</LITERAL2>
+ <LITERAL2>SQRT2</LITERAL2>
+
+ <!-- Number -->
+ <LITERAL2>MAX_VALUE</LITERAL2>
+ <LITERAL2>MIN_VALUE</LITERAL2>
+ <LITERAL2>NEGATIVE_INFINITY</LITERAL2>
+ <LITERAL2>POSITIVE_INFINITY</LITERAL2>
+
+ <!-- Object -->
+ <LITERAL2>addProperty</LITERAL2>
+ <LITERAL2>registerClass</LITERAL2>
+ <LITERAL2>unwatch</LITERAL2>
+ <LITERAL2>watch</LITERAL2>
+
+ <!-- String -->
+ <LITERAL2>charAt</LITERAL2>
+ <LITERAL2>charCodeAt</LITERAL2>
+ <LITERAL2>fromCharCode</LITERAL2>
+ <LITERAL2>lastIndexOf</LITERAL2>
+ <LITERAL2>indexOf</LITERAL2>
+ <LITERAL2>split</LITERAL2>
+ <LITERAL2>substr</LITERAL2>
+ <LITERAL2>substring</LITERAL2>
+ <LITERAL2>toLowerCase</LITERAL2>
+ <LITERAL2>toUpperCase</LITERAL2>
+
+ <!-- Accessibility -->
+ <LITERAL2>Accessibility</LITERAL2>
+ <LITERAL2>isActive</LITERAL2>
+ <LITERAL2>updateProperties</LITERAL2>
+
+
+ <!-- System capabilities Class-->
+ <LITERAL2>System</LITERAL2>
+ <LITERAL2>capabilities</LITERAL2>
+ <LITERAL2>exactSettings</LITERAL2>
+ <LITERAL2>setClipboard</LITERAL2>
+ <LITERAL2>showSettings</LITERAL2>
+ <LITERAL2>useCodepage</LITERAL2>
+ <LITERAL2>avHardwareDisable</LITERAL2>
+ <LITERAL2>hasAccessibility</LITERAL2>
+ <LITERAL2>hasAudio</LITERAL2>
+ <LITERAL2>hasAudioEncoder</LITERAL2>
+ <LITERAL2>hasMP3</LITERAL2>
+ <LITERAL2>hasVideoEncoder</LITERAL2>
+ <LITERAL2>pixelAspectRatio</LITERAL2>
+ <LITERAL2>screenColor</LITERAL2>
+ <LITERAL2>screenDPI</LITERAL2>
+ <LITERAL2>screenResolutionX</LITERAL2>
+ <LITERAL2>screenResolutionY</LITERAL2>
+ <LITERAL2>hasEmbeddedVideo</LITERAL2>
+ <LITERAL2>hasPrinting</LITERAL2>
+ <LITERAL2>hasScreenBroadcast</LITERAL2>
+ <LITERAL2>hasScreenPlayback</LITERAL2>
+ <LITERAL2>hasStreamingAudio</LITERAL2>
+ <LITERAL2>hasStreamingVideo</LITERAL2>
+ <LITERAL2>isDebugger</LITERAL2>
+ <LITERAL2>language</LITERAL2>
+ <LITERAL2>manufacturer</LITERAL2>
+ <LITERAL2>os</LITERAL2>
+ <LITERAL2>playerType</LITERAL2>
+ <LITERAL2>serverString</LITERAL2>
+ <LITERAL2>localFileReadDisable</LITERAL2>
+ <LITERAL2>version</LITERAL2>
+ <!-- System security Class -->
+ <LITERAL2>security</LITERAL2>
+
+ <!-- Color Class -->
+ <LITERAL2>getRGB</LITERAL2>
+ <LITERAL2>getTransform</LITERAL2>
+ <LITERAL2>setRGB</LITERAL2>
+ <LITERAL2>setTransform</LITERAL2>
+
+ <!-- Key Class -->
+ <LITERAL2>addListener</LITERAL2>
+ <LITERAL2>getAscii</LITERAL2>
+ <LITERAL2>isDown</LITERAL2>
+ <LITERAL2>getCode</LITERAL2>
+ <LITERAL2>isToggled</LITERAL2>
+ <LITERAL2>removeListener</LITERAL2>
+ <LITERAL2>BACKSPACE</LITERAL2>
+ <LITERAL2>CAPSLOCK</LITERAL2>
+ <LITERAL2>CONTROL</LITERAL2>
+ <LITERAL2>DELETEKEY</LITERAL2>
+ <LITERAL2>DOWN</LITERAL2>
+ <LITERAL2>END</LITERAL2>
+ <LITERAL2>ENTER</LITERAL2>
+ <LITERAL2>ESCAPE</LITERAL2>
+ <LITERAL2>HOME</LITERAL2>
+ <LITERAL2>INSERT</LITERAL2>
+ <LITERAL2>LEFT</LITERAL2>
+ <LITERAL2>PGDN</LITERAL2>
+ <LITERAL2>PGUP</LITERAL2>
+ <LITERAL2>SHIFT</LITERAL2>
+ <LITERAL2>RIGHT</LITERAL2>
+ <LITERAL2>SPACE</LITERAL2>
+ <LITERAL2>TAB</LITERAL2>
+ <LITERAL2>UP</LITERAL2>
+
+ <!-- Mouse -->
+ <LITERAL2>hide</LITERAL2>
+ <LITERAL2>show</LITERAL2>
+ <LITERAL2>onMouseWheel</LITERAL2>
+
+ <!-- Selection Class-->
+ <LITERAL2>getBeginIndex</LITERAL2>
+ <LITERAL2>getCaretIndex</LITERAL2>
+ <LITERAL2>getEndIndex</LITERAL2>
+ <LITERAL2>getFocus</LITERAL2>
+ <LITERAL2>setFocus</LITERAL2>
+ <LITERAL2>setSelection</LITERAL2>
+
+ <!-- SharedObject Class-->
+ <LITERAL2>SharedObject</LITERAL2>
+ <LITERAL2>data</LITERAL2>
+ <LITERAL2>flush</LITERAL2>
+ <LITERAL2>getLocal</LITERAL2>
+ <LITERAL2>getSize</LITERAL2>
+
+ <!-- Sound Class -->
+ <LITERAL2>attachSound</LITERAL2>
+ <LITERAL2>getVolume</LITERAL2>
+ <LITERAL2>loadSound</LITERAL2>
+ <LITERAL2>setPan</LITERAL2>
+ <LITERAL2>getPan</LITERAL2>
+ <LITERAL2>setVolume</LITERAL2>
+ <LITERAL2>start</LITERAL2>
+ <LITERAL2>duration</LITERAL2>
+ <LITERAL2>position</LITERAL2>
+ <LITERAL2>onSoundComplete</LITERAL2>
+ <LITERAL2>id3</LITERAL2>
+ <LITERAL2>onID3</LITERAL2>
+
+ <!-- Video Class -->
+ <LITERAL2>Video</LITERAL2>
+ <LITERAL2>deblocking</LITERAL2>
+ <LITERAL2>smoothing</LITERAL2>
+
+ <!-- Stage Class -->
+ <LITERAL2>Stage</LITERAL2>
+ <LITERAL2>align</LITERAL2>
+ <LITERAL2>height</LITERAL2>
+ <LITERAL2>scaleMode</LITERAL2>
+ <LITERAL2>showMenu</LITERAL2>
+ <LITERAL2>width</LITERAL2>
+ <LITERAL2>onResize</LITERAL2>
+
+ <!-- TextField Class -->
+ <LITERAL2>getFontList</LITERAL2>
+ <LITERAL2>getNewTextFormat</LITERAL2>
+ <LITERAL2>getTextFormat</LITERAL2>
+ <LITERAL2>removeTextField</LITERAL2>
+ <LITERAL2>replaceSel</LITERAL2>
+ <LITERAL2>setNewTextFormat</LITERAL2>
+ <LITERAL2>setTextFormat</LITERAL2>
+ <LITERAL2>autoSize</LITERAL2>
+ <LITERAL2>background</LITERAL2>
+ <LITERAL2>backgroundColor</LITERAL2>
+ <LITERAL2>border</LITERAL2>
+ <LITERAL2>borderColor</LITERAL2>
+ <LITERAL2>bottomScroll</LITERAL2>
+ <LITERAL2>embedFonts</LITERAL2>
+ <LITERAL2>hscroll</LITERAL2>
+ <LITERAL2>html</LITERAL2>
+ <LITERAL2>htmlText</LITERAL2>
+ <LITERAL2>maxChars</LITERAL2>
+ <LITERAL2>maxhscroll</LITERAL2>
+ <LITERAL2>multiline</LITERAL2>
+ <LITERAL2>password</LITERAL2>
+ <LITERAL2>restrict</LITERAL2>
+ <LITERAL2>selectable</LITERAL2>
+ <LITERAL2>text</LITERAL2>
+ <LITERAL2>textColor</LITERAL2>
+ <LITERAL2>textHeight</LITERAL2>
+ <LITERAL2>textWidth</LITERAL2>
+ <LITERAL2>type</LITERAL2>
+ <LITERAL2>variable</LITERAL2>
+ <LITERAL2>wordWrap</LITERAL2>
+ <LITERAL2>onChanged</LITERAL2>
+ <LITERAL2>onScroller</LITERAL2>
+ <LITERAL2>TextField</LITERAL2>
+ <LITERAL2>mouseWheelEnabled</LITERAL2>
+ <LITERAL2>replaceText</LITERAL2>
+
+ <!-- StyleSheet Class -->
+ <LITERAL2>StyleSheet</LITERAL2>
+ <LITERAL2>getStyle</LITERAL2>
+ <LITERAL2>getStyleNames</LITERAL2>
+ <LITERAL2>parseCSS</LITERAL2>
+ <LITERAL2>setStyle</LITERAL2>
+ <LITERAL2>styleSheet</LITERAL2>
+
+ <!-- TextFormat Class -->
+ <LITERAL2>TextFormat</LITERAL2>
+ <LITERAL2>getTextExtent</LITERAL2>
+ <LITERAL2>blockIndent</LITERAL2>
+ <LITERAL2>bold</LITERAL2>
+ <LITERAL2>bullet</LITERAL2>
+ <LITERAL2>color</LITERAL2>
+ <LITERAL2>font</LITERAL2>
+ <LITERAL2>indent</LITERAL2>
+ <LITERAL2>italic</LITERAL2>
+ <LITERAL2>leading</LITERAL2>
+ <LITERAL2>leftMargin</LITERAL2>
+ <LITERAL2>rightMargin</LITERAL2>
+ <LITERAL2>size</LITERAL2>
+ <LITERAL2>tabStops</LITERAL2>
+ <LITERAL2>target</LITERAL2>
+ <LITERAL2>underline</LITERAL2>
+ <LITERAL2>url</LITERAL2>
+
+ <!-- TextSnapshot object -->
+ <LITERAL2>TextSnapshot</LITERAL2>
+ <LITERAL2>findText</LITERAL2>
+ <LITERAL2>getCount</LITERAL2>
+ <LITERAL2>getSelected</LITERAL2>
+ <LITERAL2>getSelectedText</LITERAL2>
+ <LITERAL2>hitTestTextNearPos</LITERAL2>
+ <LITERAL2>getText</LITERAL2>
+ <LITERAL2>setSelectColor</LITERAL2>
+ <LITERAL2>setSelected</LITERAL2>
+
+ <!-- LoadVars Class-->
+ <LITERAL2>LoadVars</LITERAL2>
+ <LITERAL2>load</LITERAL2>
+ <LITERAL2>send</LITERAL2>
+ <LITERAL2>sendAndLoad</LITERAL2>
+ <LITERAL2>contentType</LITERAL2>
+ <LITERAL2>loaded</LITERAL2>
+ <LITERAL2>addRequestHeader</LITERAL2>
+
+ <!-- LocalConnection Class-->
+ <LITERAL2>LocalConnection</LITERAL2>
+ <LITERAL2>allowDomain</LITERAL2>
+ <LITERAL2>allowInsecureDomain</LITERAL2>
+ <LITERAL2>domain</LITERAL2>
+
+ <!-- XML Class -->
+ <LITERAL2>appendChild</LITERAL2>
+ <LITERAL2>cloneNode</LITERAL2>
+ <LITERAL2>createElement</LITERAL2>
+ <LITERAL2>createTextNode</LITERAL2>
+ <LITERAL2>hasChildNodes</LITERAL2>
+ <LITERAL2>insertBefore</LITERAL2>
+ <LITERAL2>parseXML</LITERAL2>
+ <LITERAL2>removeNode</LITERAL2>
+ <LITERAL2>attributes</LITERAL2>
+ <LITERAL2>childNodes</LITERAL2>
+ <LITERAL2>docTypeDecl</LITERAL2>
+ <LITERAL2>firstChild</LITERAL2>
+ <LITERAL2>ignoreWhite</LITERAL2>
+ <LITERAL2>lastChild</LITERAL2>
+ <LITERAL2>nextSibling</LITERAL2>
+ <LITERAL2>nodeName</LITERAL2>
+ <LITERAL2>nodeType</LITERAL2>
+ <LITERAL2>nodeValue</LITERAL2>
+ <LITERAL2>parentNode</LITERAL2>
+ <LITERAL2>previousSibling</LITERAL2>
+ <LITERAL2>status</LITERAL2>
+ <LITERAL2>xmlDecl</LITERAL2>
+ <LITERAL2>close</LITERAL2>
+ <LITERAL2>connect</LITERAL2>
+ <LITERAL2>onClose</LITERAL2>
+ <LITERAL2>onConnect</LITERAL2>
+ <LITERAL2>onXML</LITERAL2>
+
+ <!-- CustomActions Class -->
+ <LITERAL2>CustomActions</LITERAL2>
+ <LITERAL2>onUpdate</LITERAL2>
+ <LITERAL2>uninstall</LITERAL2>
+ <LITERAL2>list</LITERAL2>
+ <LITERAL2>install</LITERAL2>
+ <LITERAL2>get</LITERAL2>
+
+ <!-- NetConnection Class -->
+ <LITERAL2>NetConnection</LITERAL2>
+
+ <!-- NetStream Class-->
+ <LITERAL2>NetStream</LITERAL2>
+ <LITERAL2>bufferLength</LITERAL2>
+ <LITERAL2>bufferTime</LITERAL2>
+ <LITERAL2>bytesLoaded</LITERAL2>
+ <LITERAL2>bytesTotal</LITERAL2>
+ <LITERAL2>pause</LITERAL2>
+ <LITERAL2>seek</LITERAL2>
+ <LITERAL2>setBufferTime</LITERAL2>
+ <LITERAL2>time</LITERAL2>
+
+ <!-- RecordSet Class -->
+ <LITERAL2>DataGlue</LITERAL2>
+ <LITERAL2>bindFormatFunction</LITERAL2>
+ <LITERAL2>bindFormatStrings</LITERAL2>
+ <LITERAL2>getDebugConfig</LITERAL2>
+ <LITERAL2>getDebugID</LITERAL2>
+ <LITERAL2>getService</LITERAL2>
+ <LITERAL2>setCredentials</LITERAL2>
+ <LITERAL2>setDebugID</LITERAL2>
+ <LITERAL2>getDebug</LITERAL2>
+ <LITERAL2>setDebug</LITERAL2>
+ <LITERAL2>createGatewayConnection</LITERAL2>
+ <LITERAL2>NetServices</LITERAL2>
+ <LITERAL2>setDefaultGatewayURL</LITERAL2>
+ <LITERAL2>addItem</LITERAL2>
+ <LITERAL2>addItemAt</LITERAL2>
+ <LITERAL2>addView</LITERAL2>
+ <LITERAL2>filter</LITERAL2>
+ <LITERAL2>getColumnNames</LITERAL2>
+ <LITERAL2>getItemAt</LITERAL2>
+ <LITERAL2>getLength</LITERAL2>
+ <LITERAL2>getNumberAvailable</LITERAL2>
+ <LITERAL2>isFullyPopulated</LITERAL2>
+ <LITERAL2>isLocal</LITERAL2>
+ <LITERAL2>removeAll</LITERAL2>
+ <LITERAL2>removeItemAt</LITERAL2>
+ <LITERAL2>replaceItemAt</LITERAL2>
+ <LITERAL2>setDeliveryMode</LITERAL2>
+ <LITERAL2>setField</LITERAL2>
+ <LITERAL2>sortItemsBy</LITERAL2>
+
+ <!-- deprecated-->
+ <KEYWORD2>chr</KEYWORD2>
+ <KEYWORD2>mbchr</KEYWORD2>
+ <KEYWORD2>mblength</KEYWORD2>
+ <KEYWORD2>mbord</KEYWORD2>
+ <KEYWORD2>mbsubstring</KEYWORD2>
+ <KEYWORD2>ord</KEYWORD2>
+ <KEYWORD2>_highquality</KEYWORD2>
+
+ <!-- END-->
+
+ <!--ECMAScript keywords-->
+ <!-- Reserved for future use
+ (some are already used in some Javascript Engines)
+ -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>debugger</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD1>enum</KEYWORD1>
+ <KEYWORD2>export</KEYWORD2>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+
+ <KEYWORD2>import</KEYWORD2>
+ <KEYWORD1>instanceof</KEYWORD1>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD2>package</KEYWORD2>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>Void</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>dynamic</KEYWORD1>
+
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD1>static</KEYWORD1>
+ <LITERAL2>super</LITERAL2>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>throws</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>volatile</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/ada95.xml b/jEdit/modes/ada95.xml
index a6d1550..85cc10f 100644
--- a/jEdit/modes/ada95.xml
+++ b/jEdit/modes/ada95.xml
@@ -1,224 +1,224 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="--" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Normal comments. -->
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">..</SEQ>
- <SEQ TYPE="OPERATOR">.all</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">/=</SEQ>
- <SEQ TYPE="OPERATOR">=></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="NULL"><></SEQ>
- <SEQ TYPE="LABEL"><<</SEQ>
- <SEQ TYPE="LABEL">>></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">**</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <SEQ TYPE="KEYWORD3">'access</SEQ>
- <SEQ TYPE="KEYWORD3">'address</SEQ>
- <SEQ TYPE="KEYWORD3">'adjacent</SEQ>
- <SEQ TYPE="KEYWORD3">'aft</SEQ>
- <SEQ TYPE="KEYWORD3">'alignment</SEQ>
- <SEQ TYPE="KEYWORD3">'base</SEQ>
- <SEQ TYPE="KEYWORD3">'bit_order</SEQ>
- <SEQ TYPE="KEYWORD3">'body_version</SEQ>
- <SEQ TYPE="KEYWORD3">'callable</SEQ>
- <SEQ TYPE="KEYWORD3">'caller</SEQ>
- <SEQ TYPE="KEYWORD3">'ceiling</SEQ>
- <SEQ TYPE="KEYWORD3">'class</SEQ>
- <SEQ TYPE="KEYWORD3">'component_size</SEQ>
- <SEQ TYPE="KEYWORD3">'composed</SEQ>
- <SEQ TYPE="KEYWORD3">'constrained</SEQ>
- <SEQ TYPE="KEYWORD3">'copy_size</SEQ>
- <SEQ TYPE="KEYWORD3">'count</SEQ>
- <SEQ TYPE="KEYWORD3">'definite</SEQ>
- <SEQ TYPE="KEYWORD3">'delta</SEQ>
- <SEQ TYPE="KEYWORD3">'denorm</SEQ>
- <SEQ TYPE="KEYWORD3">'digits</SEQ>
- <SEQ TYPE="KEYWORD3">'exponent</SEQ>
- <SEQ TYPE="KEYWORD3">'external_tag</SEQ>
- <SEQ TYPE="KEYWORD3">'first</SEQ>
- <SEQ TYPE="KEYWORD3">'first_bit</SEQ>
- <SEQ TYPE="KEYWORD3">'floor</SEQ>
- <SEQ TYPE="KEYWORD3">'fore</SEQ>
- <SEQ TYPE="KEYWORD3">'fraction</SEQ>
- <SEQ TYPE="KEYWORD3">'genetic</SEQ>
- <SEQ TYPE="KEYWORD3">'identity</SEQ>
- <SEQ TYPE="KEYWORD3">'image</SEQ>
- <SEQ TYPE="KEYWORD3">'input</SEQ>
- <SEQ TYPE="KEYWORD3">'last</SEQ>
- <SEQ TYPE="KEYWORD3">'last_bit</SEQ>
- <SEQ TYPE="KEYWORD3">'leading_part</SEQ>
- <SEQ TYPE="KEYWORD3">'length</SEQ>
- <SEQ TYPE="KEYWORD3">'machine</SEQ>
- <SEQ TYPE="KEYWORD3">'machine_emax</SEQ>
- <SEQ TYPE="KEYWORD3">'machine_emin</SEQ>
- <SEQ TYPE="KEYWORD3">'machine_mantissa</SEQ>
- <SEQ TYPE="KEYWORD3">'machine_overflows</SEQ>
- <SEQ TYPE="KEYWORD3">'machine_radix</SEQ>
- <SEQ TYPE="KEYWORD3">'machine_rounds</SEQ>
- <SEQ TYPE="KEYWORD3">'max</SEQ>
- <SEQ TYPE="KEYWORD3">'max_size_in_storage_elements</SEQ>
- <SEQ TYPE="KEYWORD3">'min</SEQ>
- <SEQ TYPE="KEYWORD3">'model</SEQ>
- <SEQ TYPE="KEYWORD3">'model_emin</SEQ>
- <SEQ TYPE="KEYWORD3">'model_epsilon</SEQ>
- <SEQ TYPE="KEYWORD3">'model_mantissa</SEQ>
- <SEQ TYPE="KEYWORD3">'model_small</SEQ>
- <SEQ TYPE="KEYWORD3">'modulus</SEQ>
- <SEQ TYPE="KEYWORD3">'output</SEQ>
- <SEQ TYPE="KEYWORD3">'partition_id</SEQ>
- <SEQ TYPE="KEYWORD3">'pos</SEQ>
- <SEQ TYPE="KEYWORD3">'position</SEQ>
- <SEQ TYPE="KEYWORD3">'pred</SEQ>
- <SEQ TYPE="KEYWORD3">'range</SEQ>
- <SEQ TYPE="KEYWORD3">'read</SEQ>
- <SEQ TYPE="KEYWORD3">'remainder</SEQ>
- <SEQ TYPE="KEYWORD3">'round</SEQ>
- <SEQ TYPE="KEYWORD3">'rounding</SEQ>
- <SEQ TYPE="KEYWORD3">'safe_first</SEQ>
- <SEQ TYPE="KEYWORD3">'safe_last</SEQ>
- <SEQ TYPE="KEYWORD3">'scale</SEQ>
- <SEQ TYPE="KEYWORD3">'scaling</SEQ>
- <SEQ TYPE="KEYWORD3">'signed_zeros</SEQ>
- <SEQ TYPE="KEYWORD3">'size</SEQ>
- <SEQ TYPE="KEYWORD3">'small</SEQ>
- <SEQ TYPE="KEYWORD3">'storage_pool</SEQ>
- <SEQ TYPE="KEYWORD3">'storage_size</SEQ>
- <SEQ TYPE="KEYWORD3">'succ</SEQ>
- <SEQ TYPE="KEYWORD3">'tag</SEQ>
- <SEQ TYPE="KEYWORD3">'terminated</SEQ>
- <SEQ TYPE="KEYWORD3">'truncation</SEQ>
- <SEQ TYPE="KEYWORD3">'unbiased_rounding</SEQ>
- <SEQ TYPE="KEYWORD3">'unchecked_access</SEQ>
- <SEQ TYPE="KEYWORD3">'val</SEQ>
- <SEQ TYPE="KEYWORD3">'valid</SEQ>
- <SEQ TYPE="KEYWORD3">'value</SEQ>
- <SEQ TYPE="KEYWORD3">'version</SEQ>
- <SEQ TYPE="KEYWORD3">'wide_image</SEQ>
- <SEQ TYPE="KEYWORD3">'wide_value</SEQ>
- <SEQ TYPE="KEYWORD3">'wide_width</SEQ>
- <SEQ TYPE="KEYWORD3">'width</SEQ>
- <SEQ TYPE="KEYWORD3">'write</SEQ>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <KEYWORDS>
- <!-- Reserved words -->
- <KEYWORD1>entry</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>procedure</KEYWORD1>
-
- <KEYWORD2>abort</KEYWORD2>
- <KEYWORD2>abs</KEYWORD2>
- <KEYWORD2>abstract</KEYWORD2>
- <KEYWORD2>accept</KEYWORD2>
- <KEYWORD2>access</KEYWORD2>
- <KEYWORD2>aliased</KEYWORD2>
- <KEYWORD2>all</KEYWORD2>
- <KEYWORD2>and</KEYWORD2>
- <KEYWORD2>array</KEYWORD2>
- <KEYWORD2>at</KEYWORD2>
- <KEYWORD2>begin</KEYWORD2>
- <KEYWORD2>body</KEYWORD2>
- <KEYWORD2>case</KEYWORD2>
- <KEYWORD2>constant</KEYWORD2>
- <KEYWORD2>declare</KEYWORD2>
- <KEYWORD2>delay</KEYWORD2>
- <KEYWORD2>delta</KEYWORD2>
- <KEYWORD2>digits</KEYWORD2>
- <KEYWORD2>do</KEYWORD2>
- <KEYWORD2>else</KEYWORD2>
- <KEYWORD2>elsif</KEYWORD2>
- <KEYWORD2>end</KEYWORD2>
- <KEYWORD2>exception</KEYWORD2>
- <KEYWORD2>exit</KEYWORD2>
- <KEYWORD2>for</KEYWORD2>
- <KEYWORD2>goto</KEYWORD2>
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD2>in</KEYWORD2>
- <KEYWORD2>is</KEYWORD2>
- <KEYWORD2>limited</KEYWORD2>
- <KEYWORD2>loop</KEYWORD2>
- <KEYWORD2>mod</KEYWORD2>
- <KEYWORD2>new</KEYWORD2>
- <KEYWORD2>not</KEYWORD2>
- <KEYWORD2>or</KEYWORD2>
- <KEYWORD2>others</KEYWORD2>
- <KEYWORD2>out</KEYWORD2>
- <KEYWORD2>package</KEYWORD2>
- <KEYWORD2>pragma</KEYWORD2>
- <KEYWORD2>private</KEYWORD2>
- <KEYWORD2>protected</KEYWORD2>
- <KEYWORD2>raise</KEYWORD2>
- <KEYWORD2>range</KEYWORD2>
- <KEYWORD2>record</KEYWORD2>
- <KEYWORD2>rem</KEYWORD2>
- <KEYWORD2>renames</KEYWORD2>
- <KEYWORD2>requeue</KEYWORD2>
- <KEYWORD2>return</KEYWORD2>
- <KEYWORD2>select</KEYWORD2>
- <KEYWORD2>separate</KEYWORD2>
- <KEYWORD2>string</KEYWORD2>
- <KEYWORD2>subtype</KEYWORD2>
- <KEYWORD2>tagged</KEYWORD2>
- <KEYWORD2>task</KEYWORD2>
- <KEYWORD2>terminate</KEYWORD2>
- <KEYWORD2>then</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <KEYWORD2>until</KEYWORD2>
- <KEYWORD2>use</KEYWORD2>
- <KEYWORD2>when</KEYWORD2>
- <KEYWORD2>while</KEYWORD2>
- <KEYWORD2>with</KEYWORD2>
- <KEYWORD2>xor</KEYWORD2>
-
- <!-- Attributes -->
-
- <!-- Common Pre-defined Types -->
- <LITERAL2>address</LITERAL2>
- <LITERAL2>boolean</LITERAL2>
- <LITERAL2>character</LITERAL2>
- <LITERAL2>duration</LITERAL2>
- <LITERAL2>float</LITERAL2>
- <LITERAL2>integer</LITERAL2>
- <LITERAL2>latin_1</LITERAL2>
- <LITERAL2>natural</LITERAL2>
- <LITERAL2>positive</LITERAL2>
- <LITERAL2>string</LITERAL2>
- <LITERAL2>time</LITERAL2>
-
- <!-- Literals -->
- <LITERAL1>false</LITERAL1>
- <LITERAL1>null</LITERAL1>
- <LITERAL1>true</LITERAL1>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Normal comments. -->
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">..</SEQ>
+ <SEQ TYPE="OPERATOR">.all</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">/=</SEQ>
+ <SEQ TYPE="OPERATOR">=></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="NULL"><></SEQ>
+ <SEQ TYPE="LABEL"><<</SEQ>
+ <SEQ TYPE="LABEL">>></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">**</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <SEQ TYPE="KEYWORD3">'access</SEQ>
+ <SEQ TYPE="KEYWORD3">'address</SEQ>
+ <SEQ TYPE="KEYWORD3">'adjacent</SEQ>
+ <SEQ TYPE="KEYWORD3">'aft</SEQ>
+ <SEQ TYPE="KEYWORD3">'alignment</SEQ>
+ <SEQ TYPE="KEYWORD3">'base</SEQ>
+ <SEQ TYPE="KEYWORD3">'bit_order</SEQ>
+ <SEQ TYPE="KEYWORD3">'body_version</SEQ>
+ <SEQ TYPE="KEYWORD3">'callable</SEQ>
+ <SEQ TYPE="KEYWORD3">'caller</SEQ>
+ <SEQ TYPE="KEYWORD3">'ceiling</SEQ>
+ <SEQ TYPE="KEYWORD3">'class</SEQ>
+ <SEQ TYPE="KEYWORD3">'component_size</SEQ>
+ <SEQ TYPE="KEYWORD3">'composed</SEQ>
+ <SEQ TYPE="KEYWORD3">'constrained</SEQ>
+ <SEQ TYPE="KEYWORD3">'copy_size</SEQ>
+ <SEQ TYPE="KEYWORD3">'count</SEQ>
+ <SEQ TYPE="KEYWORD3">'definite</SEQ>
+ <SEQ TYPE="KEYWORD3">'delta</SEQ>
+ <SEQ TYPE="KEYWORD3">'denorm</SEQ>
+ <SEQ TYPE="KEYWORD3">'digits</SEQ>
+ <SEQ TYPE="KEYWORD3">'exponent</SEQ>
+ <SEQ TYPE="KEYWORD3">'external_tag</SEQ>
+ <SEQ TYPE="KEYWORD3">'first</SEQ>
+ <SEQ TYPE="KEYWORD3">'first_bit</SEQ>
+ <SEQ TYPE="KEYWORD3">'floor</SEQ>
+ <SEQ TYPE="KEYWORD3">'fore</SEQ>
+ <SEQ TYPE="KEYWORD3">'fraction</SEQ>
+ <SEQ TYPE="KEYWORD3">'genetic</SEQ>
+ <SEQ TYPE="KEYWORD3">'identity</SEQ>
+ <SEQ TYPE="KEYWORD3">'image</SEQ>
+ <SEQ TYPE="KEYWORD3">'input</SEQ>
+ <SEQ TYPE="KEYWORD3">'last</SEQ>
+ <SEQ TYPE="KEYWORD3">'last_bit</SEQ>
+ <SEQ TYPE="KEYWORD3">'leading_part</SEQ>
+ <SEQ TYPE="KEYWORD3">'length</SEQ>
+ <SEQ TYPE="KEYWORD3">'machine</SEQ>
+ <SEQ TYPE="KEYWORD3">'machine_emax</SEQ>
+ <SEQ TYPE="KEYWORD3">'machine_emin</SEQ>
+ <SEQ TYPE="KEYWORD3">'machine_mantissa</SEQ>
+ <SEQ TYPE="KEYWORD3">'machine_overflows</SEQ>
+ <SEQ TYPE="KEYWORD3">'machine_radix</SEQ>
+ <SEQ TYPE="KEYWORD3">'machine_rounds</SEQ>
+ <SEQ TYPE="KEYWORD3">'max</SEQ>
+ <SEQ TYPE="KEYWORD3">'max_size_in_storage_elements</SEQ>
+ <SEQ TYPE="KEYWORD3">'min</SEQ>
+ <SEQ TYPE="KEYWORD3">'model</SEQ>
+ <SEQ TYPE="KEYWORD3">'model_emin</SEQ>
+ <SEQ TYPE="KEYWORD3">'model_epsilon</SEQ>
+ <SEQ TYPE="KEYWORD3">'model_mantissa</SEQ>
+ <SEQ TYPE="KEYWORD3">'model_small</SEQ>
+ <SEQ TYPE="KEYWORD3">'modulus</SEQ>
+ <SEQ TYPE="KEYWORD3">'output</SEQ>
+ <SEQ TYPE="KEYWORD3">'partition_id</SEQ>
+ <SEQ TYPE="KEYWORD3">'pos</SEQ>
+ <SEQ TYPE="KEYWORD3">'position</SEQ>
+ <SEQ TYPE="KEYWORD3">'pred</SEQ>
+ <SEQ TYPE="KEYWORD3">'range</SEQ>
+ <SEQ TYPE="KEYWORD3">'read</SEQ>
+ <SEQ TYPE="KEYWORD3">'remainder</SEQ>
+ <SEQ TYPE="KEYWORD3">'round</SEQ>
+ <SEQ TYPE="KEYWORD3">'rounding</SEQ>
+ <SEQ TYPE="KEYWORD3">'safe_first</SEQ>
+ <SEQ TYPE="KEYWORD3">'safe_last</SEQ>
+ <SEQ TYPE="KEYWORD3">'scale</SEQ>
+ <SEQ TYPE="KEYWORD3">'scaling</SEQ>
+ <SEQ TYPE="KEYWORD3">'signed_zeros</SEQ>
+ <SEQ TYPE="KEYWORD3">'size</SEQ>
+ <SEQ TYPE="KEYWORD3">'small</SEQ>
+ <SEQ TYPE="KEYWORD3">'storage_pool</SEQ>
+ <SEQ TYPE="KEYWORD3">'storage_size</SEQ>
+ <SEQ TYPE="KEYWORD3">'succ</SEQ>
+ <SEQ TYPE="KEYWORD3">'tag</SEQ>
+ <SEQ TYPE="KEYWORD3">'terminated</SEQ>
+ <SEQ TYPE="KEYWORD3">'truncation</SEQ>
+ <SEQ TYPE="KEYWORD3">'unbiased_rounding</SEQ>
+ <SEQ TYPE="KEYWORD3">'unchecked_access</SEQ>
+ <SEQ TYPE="KEYWORD3">'val</SEQ>
+ <SEQ TYPE="KEYWORD3">'valid</SEQ>
+ <SEQ TYPE="KEYWORD3">'value</SEQ>
+ <SEQ TYPE="KEYWORD3">'version</SEQ>
+ <SEQ TYPE="KEYWORD3">'wide_image</SEQ>
+ <SEQ TYPE="KEYWORD3">'wide_value</SEQ>
+ <SEQ TYPE="KEYWORD3">'wide_width</SEQ>
+ <SEQ TYPE="KEYWORD3">'width</SEQ>
+ <SEQ TYPE="KEYWORD3">'write</SEQ>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <!-- Reserved words -->
+ <KEYWORD1>entry</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>procedure</KEYWORD1>
+
+ <KEYWORD2>abort</KEYWORD2>
+ <KEYWORD2>abs</KEYWORD2>
+ <KEYWORD2>abstract</KEYWORD2>
+ <KEYWORD2>accept</KEYWORD2>
+ <KEYWORD2>access</KEYWORD2>
+ <KEYWORD2>aliased</KEYWORD2>
+ <KEYWORD2>all</KEYWORD2>
+ <KEYWORD2>and</KEYWORD2>
+ <KEYWORD2>array</KEYWORD2>
+ <KEYWORD2>at</KEYWORD2>
+ <KEYWORD2>begin</KEYWORD2>
+ <KEYWORD2>body</KEYWORD2>
+ <KEYWORD2>case</KEYWORD2>
+ <KEYWORD2>constant</KEYWORD2>
+ <KEYWORD2>declare</KEYWORD2>
+ <KEYWORD2>delay</KEYWORD2>
+ <KEYWORD2>delta</KEYWORD2>
+ <KEYWORD2>digits</KEYWORD2>
+ <KEYWORD2>do</KEYWORD2>
+ <KEYWORD2>else</KEYWORD2>
+ <KEYWORD2>elsif</KEYWORD2>
+ <KEYWORD2>end</KEYWORD2>
+ <KEYWORD2>exception</KEYWORD2>
+ <KEYWORD2>exit</KEYWORD2>
+ <KEYWORD2>for</KEYWORD2>
+ <KEYWORD2>goto</KEYWORD2>
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>in</KEYWORD2>
+ <KEYWORD2>is</KEYWORD2>
+ <KEYWORD2>limited</KEYWORD2>
+ <KEYWORD2>loop</KEYWORD2>
+ <KEYWORD2>mod</KEYWORD2>
+ <KEYWORD2>new</KEYWORD2>
+ <KEYWORD2>not</KEYWORD2>
+ <KEYWORD2>or</KEYWORD2>
+ <KEYWORD2>others</KEYWORD2>
+ <KEYWORD2>out</KEYWORD2>
+ <KEYWORD2>package</KEYWORD2>
+ <KEYWORD2>pragma</KEYWORD2>
+ <KEYWORD2>private</KEYWORD2>
+ <KEYWORD2>protected</KEYWORD2>
+ <KEYWORD2>raise</KEYWORD2>
+ <KEYWORD2>range</KEYWORD2>
+ <KEYWORD2>record</KEYWORD2>
+ <KEYWORD2>rem</KEYWORD2>
+ <KEYWORD2>renames</KEYWORD2>
+ <KEYWORD2>requeue</KEYWORD2>
+ <KEYWORD2>return</KEYWORD2>
+ <KEYWORD2>select</KEYWORD2>
+ <KEYWORD2>separate</KEYWORD2>
+ <KEYWORD2>string</KEYWORD2>
+ <KEYWORD2>subtype</KEYWORD2>
+ <KEYWORD2>tagged</KEYWORD2>
+ <KEYWORD2>task</KEYWORD2>
+ <KEYWORD2>terminate</KEYWORD2>
+ <KEYWORD2>then</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>until</KEYWORD2>
+ <KEYWORD2>use</KEYWORD2>
+ <KEYWORD2>when</KEYWORD2>
+ <KEYWORD2>while</KEYWORD2>
+ <KEYWORD2>with</KEYWORD2>
+ <KEYWORD2>xor</KEYWORD2>
+
+ <!-- Attributes -->
+
+ <!-- Common Pre-defined Types -->
+ <LITERAL2>address</LITERAL2>
+ <LITERAL2>boolean</LITERAL2>
+ <LITERAL2>character</LITERAL2>
+ <LITERAL2>duration</LITERAL2>
+ <LITERAL2>float</LITERAL2>
+ <LITERAL2>integer</LITERAL2>
+ <LITERAL2>latin_1</LITERAL2>
+ <LITERAL2>natural</LITERAL2>
+ <LITERAL2>positive</LITERAL2>
+ <LITERAL2>string</LITERAL2>
+ <LITERAL2>time</LITERAL2>
+
+ <!-- Literals -->
+ <LITERAL1>false</LITERAL1>
+ <LITERAL1>null</LITERAL1>
+ <LITERAL1>true</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/ant.xml b/jEdit/modes/ant.xml
new file mode 100644
index 0000000..d6eb4ed
--- /dev/null
+++ b/jEdit/modes/ant.xml
@@ -0,0 +1,348 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+ <!-- {{{ MAIN -->
+ <RULES>
+ <SPAN TYPE="MARKUP" DELEGATE="SQL">
+ <BEGIN><transaction</BEGIN>
+ <END></transaction></END>
+ </SPAN>
+
+ <!-- ant variables -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- DTD Entity declarations -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="ENTITY-TAGS">
+ <BEGIN><!ENTITY</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CDATA sections -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="CDATA">
+ <BEGIN><![CDATA[</BEGIN>
+ <END>]]></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- PI directives -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN><?</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ TAGS -->
+ <RULES SET="TAGS" DEFAULT="MARKUP" NO_WORD_SEP="-_">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="MARKUP" DELEGATE="STRING">"</SEQ>
+
+ <SEQ TYPE="MARKUP" DELEGATE="ant::MAIN">/></SEQ>
+ <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <KEYWORDS>
+ <KEYWORD1>target</KEYWORD1>
+
+ <KEYWORD2>project</KEYWORD2>
+
+ <KEYWORD3>description</KEYWORD3>
+ <KEYWORD3>loadfile</KEYWORD3>
+ <KEYWORD3>loadproperties</KEYWORD3>
+ <KEYWORD3>property</KEYWORD3>
+ <KEYWORD3>xmlproperty</KEYWORD3>
+
+ <KEYWORD4>fileset</KEYWORD4>
+ <KEYWORD4>filelist</KEYWORD4>
+ <KEYWORD4>include</KEYWORD4>
+ <KEYWORD4>exclude</KEYWORD4>
+ <KEYWORD4>filter</KEYWORD4>
+ <KEYWORD4>filterchain</KEYWORD4>
+ <KEYWORD4>path</KEYWORD4>
+ <KEYWORD4>pathelement</KEYWORD4>
+ <KEYWORD4>classpath</KEYWORD4>
+
+ <!-- condition subelements -->
+ <KEYWORD4>istrue</KEYWORD4>
+
+ <OPERATOR>equals</OPERATOR>
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+ <OPERATOR>=</OPERATOR>
+
+ <!-- basic file tasks -->
+ <FUNCTION>chmod</FUNCTION>
+ <FUNCTION>checksum</FUNCTION>
+ <FUNCTION>concat</FUNCTION>
+ <FUNCTION>copy</FUNCTION>
+ <FUNCTION>delete</FUNCTION>
+ <FUNCTION>echo</FUNCTION>
+ <FUNCTION>exec</FUNCTION>
+ <FUNCTION>import</FUNCTION>
+ <FUNCTION>input</FUNCTION>
+ <FUNCTION>mkdir</FUNCTION>
+ <FUNCTION>move</FUNCTION>
+ <FUNCTION>patch</FUNCTION>
+ <FUNCTION>tempfile</FUNCTION>
+ <FUNCTION>touch</FUNCTION>
+
+ <!-- java specific tasks -->
+ <FUNCTION>java</FUNCTION>
+ <FUNCTION>javac</FUNCTION>
+ <FUNCTION>javadoc</FUNCTION>
+ <FUNCTION>junit</FUNCTION>
+ <FUNCTION>rmic</FUNCTION>
+ <FUNCTION>signjar</FUNCTION>
+
+ <!-- archive tasks -->
+ <FUNCTION>bzip2</FUNCTION>
+ <FUNCTION>bunzip2</FUNCTION>
+ <FUNCTION>ear</FUNCTION>
+ <FUNCTION>gzip</FUNCTION>
+ <FUNCTION>gunzip</FUNCTION>
+ <FUNCTION>jar</FUNCTION>
+ <FUNCTION>unjar</FUNCTION>
+ <FUNCTION>manifest</FUNCTION>
+ <FUNCTION>tar</FUNCTION>
+ <FUNCTION>untar</FUNCTION>
+ <FUNCTION>war</FUNCTION>
+ <FUNCTION>unwar</FUNCTION>
+ <FUNCTION>zip</FUNCTION>
+ <FUNCTION>unzip</FUNCTION>
+
+ <!-- execution tasks -->
+ <FUNCTION>ant</FUNCTION>
+ <FUNCTION>antcall</FUNCTION>
+ <FUNCTION>apply</FUNCTION>
+ <FUNCTION>dependset</FUNCTION>
+ <FUNCTION>fail</FUNCTION>
+ <FUNCTION>parallel</FUNCTION>
+ <FUNCTION>sequential</FUNCTION>
+ <FUNCTION>sleep</FUNCTION>
+ <FUNCTION>waitfor</FUNCTION>
+
+ <!-- misc tasks -->
+ <FUNCTION>antstructure</FUNCTION>
+ <FUNCTION>available</FUNCTION>
+ <FUNCTION>condition</FUNCTION>
+ <FUNCTION>cvs</FUNCTION>
+ <FUNCTION>cvschangelog</FUNCTION>
+ <FUNCTION>cvspass</FUNCTION>
+ <FUNCTION>cvstagdiff</FUNCTION>
+ <FUNCTION>get</FUNCTION>
+ <FUNCTION>mail</FUNCTION>
+ <FUNCTION>replace</FUNCTION>
+ <FUNCTION>sql</FUNCTION>
+ <FUNCTION>style</FUNCTION>
+ <FUNCTION>taskdef</FUNCTION>
+ <FUNCTION>tstamp</FUNCTION>
+ <FUNCTION>typedef</FUNCTION>
+ <FUNCTION>xslt</FUNCTION>
+
+ <!-- antelope tasks -->
+ <FUNCTION>assert</FUNCTION>
+ <FUNCTION>call</FUNCTION>
+ <FUNCTION>else</FUNCTION>
+ <FUNCTION>find</FUNCTION>
+ <FUNCTION>grep</FUNCTION>
+ <FUNCTION>if</FUNCTION>
+ <FUNCTION>new</FUNCTION>
+ <FUNCTION>post</FUNCTION>
+ <FUNCTION>repeat</FUNCTION>
+ <FUNCTION>suite</FUNCTION>
+ <FUNCTION>testcase</FUNCTION>
+ <FUNCTION>unset</FUNCTION>
+ <FUNCTION>var</FUNCTION>
+
+ <!-- deprecated tasks -->
+ <INVALID>copydir</INVALID>
+ <INVALID>copyfile</INVALID>
+ <INVALID>deltree</INVALID>
+ <INVALID>execOn</INVALID>
+ <INVALID>javadoc2</INVALID>
+ <INVALID>rename</INVALID>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ DTD-TAGS -->
+ <RULES SET="DTD-TAGS" DEFAULT="KEYWORD2" IGNORE_CASE="FALSE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <!-- Parameter entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>%</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- This appears in some SGML documents -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="MAIN">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>CDATA</KEYWORD1>
+ <KEYWORD1>EMPTY</KEYWORD1>
+ <KEYWORD1>INCLUDE</KEYWORD1>
+ <KEYWORD1>IGNORE</KEYWORD1>
+ <KEYWORD1>NDATA</KEYWORD1>
+ <KEYWORD1>#IMPLIED</KEYWORD1>
+ <KEYWORD1>#PCDATA</KEYWORD1>
+ <KEYWORD1>#REQUIRED</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ ENTITY-TAGS -->
+ <RULES SET="ENTITY-TAGS" DEFAULT="KEYWORD2">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>SYSTEM</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ CDATA -->
+ <RULES SET="CDATA" DEFAULT="COMMENT2">
+ <!-- no rules -->
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ STRING -->
+ <RULES SET="STRING" DEFAULT="LITERAL1">
+ <!-- ant property -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SEQ TYPE="NULL">\"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="TAGS">"</SEQ>
+
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ <KEYWORDS>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>yes</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <RULES SET="SQL" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="MAIN">/></SEQ>
+ <!--
+ <SEQ TYPE="MARKUP" DELEGATE="MySQL::MAIN">></SEQ>
+ -->
+ <!-- handle <transaction src="..."> properly -->
+ <SEQ TYPE="MARKUP" DELEGATE="BACK_TO_XML"> </SEQ>
+ </RULES>
+
+ <RULES SET="BACK_TO_XML" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="ant::TAGS">></SEQ>
+ </RULES>
+</MODE>
+
+
diff --git a/jEdit/modes/antlr.xml b/jEdit/modes/antlr.xml
index 5accf97..fbac355 100644
--- a/jEdit/modes/antlr.xml
+++ b/jEdit/modes/antlr.xml
@@ -1,102 +1,102 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- This mode file describes the ANTLR syntax definition language.
- It is derived from and tested with the ANTLR syntax rules specified in
- antlr.g included with the ANTLR distribution.
-
- Portions of this file from java.xml.
-
- Author: Brant Gurganus <brantgurga at users.sourceforge.net>
--->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE="" />
- </PROPS>
- <RULES>
- <SPAN TYPE="COMMENT2" DELEGATE="java::JAVADOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <KEYWORDS>
- <KEYWORD3>header</KEYWORD3>
- <KEYWORD3>options</KEYWORD3>
- <KEYWORD3>tokens</KEYWORD3>
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
- <KEYWORD1>instanceof</KEYWORD1>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>throws</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>volatile</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>package</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
-
- <KEYWORD2>boolean</KEYWORD2>
- <KEYWORD2>byte</KEYWORD2>
- <KEYWORD2>char</KEYWORD2>
- <KEYWORD2>class</KEYWORD2>
- <KEYWORD2>double</KEYWORD2>
- <KEYWORD2>float</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>interface</KEYWORD2>
- <KEYWORD2>long</KEYWORD2>
- <KEYWORD2>short</KEYWORD2>
- <KEYWORD2>void</KEYWORD2>
-
- <FUNCTION>assert</FUNCTION>
- <KEYWORD1>strictfp</KEYWORD1>
-
- <LITERAL2>false</LITERAL2>
- <LITERAL2>null</LITERAL2>
- <LITERAL2>super</LITERAL2>
- <LITERAL2>this</LITERAL2>
- <LITERAL2>true</LITERAL2>
-
- <INVALID>goto</INVALID>
- <INVALID>const</INVALID>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ This mode file describes the ANTLR syntax definition language.
+ It is derived from and tested with the ANTLR syntax rules specified in
+ antlr.g included with the ANTLR distribution.
+
+ Portions of this file from java.xml.
+
+ Author: Brant Gurganus <brantgurga at users.sourceforge.net>
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE="" />
+ </PROPS>
+ <RULES>
+ <SPAN TYPE="COMMENT2" DELEGATE="java::JAVADOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <KEYWORDS>
+ <KEYWORD3>header</KEYWORD3>
+ <KEYWORD3>options</KEYWORD3>
+ <KEYWORD3>tokens</KEYWORD3>
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+ <KEYWORD1>instanceof</KEYWORD1>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>throws</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>volatile</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>package</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+
+ <KEYWORD2>boolean</KEYWORD2>
+ <KEYWORD2>byte</KEYWORD2>
+ <KEYWORD2>char</KEYWORD2>
+ <KEYWORD2>class</KEYWORD2>
+ <KEYWORD2>double</KEYWORD2>
+ <KEYWORD2>float</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>interface</KEYWORD2>
+ <KEYWORD2>long</KEYWORD2>
+ <KEYWORD2>short</KEYWORD2>
+ <KEYWORD2>void</KEYWORD2>
+
+ <FUNCTION>assert</FUNCTION>
+ <KEYWORD1>strictfp</KEYWORD1>
+
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ <LITERAL2>super</LITERAL2>
+ <LITERAL2>this</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+
+ <INVALID>goto</INVALID>
+ <INVALID>const</INVALID>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/apacheconf.xml b/jEdit/modes/apacheconf.xml
index e7bfdfe..290c170 100644
--- a/jEdit/modes/apacheconf.xml
+++ b/jEdit/modes/apacheconf.xml
@@ -1,1007 +1,1007 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="noWordSep" VALUE="-" />
- </PROPS>
- <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="TRUE">
-
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN_REGEXP HASH_CHAR="<VirtualHost" TYPE="MARKUP" DELEGATE="VHOST">
- <BEGIN><![CDATA[<(VirtualHost)[^>]*>]]></BEGIN>
- <END><![CDATA[</$1>]]></END>
- </SPAN_REGEXP>
-
- <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
- <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
- <END><![CDATA[</$1>]]></END>
- </SPAN_REGEXP>
-
- <KEYWORDS>
- <KEYWORD1>AcceptMutex</KEYWORD1>
- <KEYWORD1>AcceptPathInfo</KEYWORD1>
- <KEYWORD1>AccessFileName</KEYWORD1>
- <KEYWORD1>Action</KEYWORD1>
- <KEYWORD1>AddAlt</KEYWORD1>
- <KEYWORD1>AddAltByEncoding</KEYWORD1>
- <KEYWORD1>AddAltByType</KEYWORD1>
- <KEYWORD1>AddCharset</KEYWORD1>
- <KEYWORD1>AddDefaultCharset</KEYWORD1>
- <KEYWORD1>AddDescription</KEYWORD1>
- <KEYWORD1>AddEncoding</KEYWORD1>
- <KEYWORD1>AddHandler</KEYWORD1>
- <KEYWORD1>AddIcon</KEYWORD1>
- <KEYWORD1>AddIconByEncoding</KEYWORD1>
- <KEYWORD1>AddIconByType</KEYWORD1>
- <KEYWORD1>AddInputFilter</KEYWORD1>
- <KEYWORD1>AddLanguage</KEYWORD1>
- <KEYWORD1>AddModuleInfo</KEYWORD1>
- <KEYWORD1>AddOutputFilter</KEYWORD1>
- <KEYWORD1>AddOutputFilterByType</KEYWORD1>
- <KEYWORD1>AddType</KEYWORD1>
- <KEYWORD1>Alias</KEYWORD1>
- <KEYWORD1>AliasMatch</KEYWORD1>
- <KEYWORD1>AllowCONNECT</KEYWORD1>
- <KEYWORD1>AllowEncodedSlashes</KEYWORD1>
- <KEYWORD1>AuthDigestNcCheck</KEYWORD1>
- <KEYWORD1>AuthDigestShmemSize</KEYWORD1>
- <KEYWORD1>AuthLDAPCharsetConfig</KEYWORD1>
- <KEYWORD1>BS2000Account</KEYWORD1>
- <KEYWORD1>BrowserMatch</KEYWORD1>
- <KEYWORD1>BrowserMatchNoCase</KEYWORD1>
- <KEYWORD1>CacheDefaultExpire</KEYWORD1>
- <KEYWORD1>CacheDirLength</KEYWORD1>
- <KEYWORD1>CacheDirLevels</KEYWORD1>
- <KEYWORD1>CacheDisable</KEYWORD1>
- <KEYWORD1>CacheEnable</KEYWORD1>
- <KEYWORD1>CacheExpiryCheck</KEYWORD1>
- <KEYWORD1>CacheFile</KEYWORD1>
- <KEYWORD1>CacheForceCompletion</KEYWORD1>
- <KEYWORD1>CacheGcClean</KEYWORD1>
- <KEYWORD1>CacheGcDaily</KEYWORD1>
- <KEYWORD1>CacheGcInterval</KEYWORD1>
- <KEYWORD1>CacheGcMemUsage</KEYWORD1>
- <KEYWORD1>CacheGcUnused</KEYWORD1>
- <KEYWORD1>CacheIgnoreCacheControl</KEYWORD1>
- <KEYWORD1>CacheIgnoreNoLastMod</KEYWORD1>
- <KEYWORD1>CacheLastModifiedFactor</KEYWORD1>
- <KEYWORD1>CacheMaxExpire</KEYWORD1>
- <KEYWORD1>CacheMaxFileSize</KEYWORD1>
- <KEYWORD1>CacheMinFileSize</KEYWORD1>
- <KEYWORD1>CacheNegotiatedDocs</KEYWORD1>
- <KEYWORD1>CacheRoot</KEYWORD1>
- <KEYWORD1>CacheSize</KEYWORD1>
- <KEYWORD1>CacheTimeMargin</KEYWORD1>
- <KEYWORD1>CharsetDefault</KEYWORD1>
- <KEYWORD1>CharsetOptions</KEYWORD1>
- <KEYWORD1>CharsetSourceEnc</KEYWORD1>
- <KEYWORD1>CheckSpelling</KEYWORD1>
- <KEYWORD1>ChildPerUserID</KEYWORD1>
- <KEYWORD1>ContentDigest</KEYWORD1>
- <KEYWORD1>CookieDomain</KEYWORD1>
- <KEYWORD1>CookieExpires</KEYWORD1>
- <KEYWORD1>CookieLog</KEYWORD1>
- <KEYWORD1>CookieName</KEYWORD1>
- <KEYWORD1>CookieStyle</KEYWORD1>
- <KEYWORD1>CookieTracking</KEYWORD1>
- <KEYWORD1>CoreDumpDirectory</KEYWORD1>
- <KEYWORD1>CustomLog</KEYWORD1>
- <KEYWORD1>DavDepthInfinity</KEYWORD1>
- <KEYWORD1>DavLockDB</KEYWORD1>
- <KEYWORD1>DavMinTimeout</KEYWORD1>
- <KEYWORD1>DefaultIcon</KEYWORD1>
- <KEYWORD1>DefaultLanguage</KEYWORD1>
- <KEYWORD1>DefaultType</KEYWORD1>
- <KEYWORD1>DeflateBufferSize</KEYWORD1>
- <KEYWORD1>DeflateCompressionLevel</KEYWORD1>
- <KEYWORD1>DeflateFilterNote</KEYWORD1>
- <KEYWORD1>DeflateMemLevel</KEYWORD1>
- <KEYWORD1>DeflateWindowSize</KEYWORD1>
- <KEYWORD1>DirectoryIndex</KEYWORD1>
- <KEYWORD1>DirectorySlash</KEYWORD1>
- <KEYWORD1>DocumentRoot</KEYWORD1>
- <KEYWORD1>EnableExceptionHook</KEYWORD1>
- <KEYWORD1>EnableMMAP</KEYWORD1>
- <KEYWORD1>EnableSendfile</KEYWORD1>
- <KEYWORD1>ErrorDocument</KEYWORD1>
- <KEYWORD1>ErrorLog</KEYWORD1>
- <KEYWORD1>Example</KEYWORD1>
- <KEYWORD1>ExpiresActive</KEYWORD1>
- <KEYWORD1>ExpiresByType</KEYWORD1>
- <KEYWORD1>ExpiresDefault</KEYWORD1>
- <KEYWORD1>ExtFilterDefine</KEYWORD1>
- <KEYWORD1>ExtendedStatus</KEYWORD1>
- <KEYWORD1>FileETag</KEYWORD1>
- <KEYWORD1>ForceLanguagePriority</KEYWORD1>
- <KEYWORD1>ForensicLog</KEYWORD1>
- <KEYWORD1>Group</KEYWORD1>
- <KEYWORD1>Header</KEYWORD1>
- <KEYWORD1>HeaderName</KEYWORD1>
- <KEYWORD1>HostnameLookups</KEYWORD1>
- <KEYWORD1>ISAPIAppendLogToErrors</KEYWORD1>
- <KEYWORD1>ISAPIAppendLogToQuery</KEYWORD1>
- <KEYWORD1>ISAPICacheFile</KEYWORD1>
- <KEYWORD1>ISAPIFakeAsync</KEYWORD1>
- <KEYWORD1>ISAPILogNotSupported</KEYWORD1>
- <KEYWORD1>ISAPIReadAheadBuffer</KEYWORD1>
- <KEYWORD1>IdentityCheck</KEYWORD1>
- <KEYWORD1>ImapBase</KEYWORD1>
- <KEYWORD1>ImapDefault</KEYWORD1>
- <KEYWORD1>ImapMenu</KEYWORD1>
- <KEYWORD1>Include</KEYWORD1>
- <KEYWORD1>IndexIgnore</KEYWORD1>
- <KEYWORD1>IndexOptions</KEYWORD1>
- <KEYWORD1>IndexOrderDefault</KEYWORD1>
- <KEYWORD1>KeepAlive</KEYWORD1>
- <KEYWORD1>KeepAliveTimeout</KEYWORD1>
- <KEYWORD1>LDAPCacheEntries</KEYWORD1>
- <KEYWORD1>LDAPCacheTTL</KEYWORD1>
- <KEYWORD1>LDAPOpCacheEntries</KEYWORD1>
- <KEYWORD1>LDAPOpCacheTTL</KEYWORD1>
- <KEYWORD1>LDAPSharedCacheFile</KEYWORD1>
- <KEYWORD1>LDAPSharedCacheSize</KEYWORD1>
- <KEYWORD1>LDAPTrustedCA</KEYWORD1>
- <KEYWORD1>LDAPTrustedCAType</KEYWORD1>
- <KEYWORD1>LanguagePriority</KEYWORD1>
- <KEYWORD1>LimitInternalRecursion</KEYWORD1>
- <KEYWORD1>LimitRequestBody</KEYWORD1>
- <KEYWORD1>LimitRequestFields</KEYWORD1>
- <KEYWORD1>LimitRequestFieldsize</KEYWORD1>
- <KEYWORD1>LimitRequestLine</KEYWORD1>
- <KEYWORD1>LimitXMLRequestBody</KEYWORD1>
- <KEYWORD1>Listen</KEYWORD1>
- <KEYWORD1>ListenBacklog</KEYWORD1>
- <KEYWORD1>LoadFile</KEYWORD1>
- <KEYWORD1>LoadModule</KEYWORD1>
- <KEYWORD1>LockFile</KEYWORD1>
- <KEYWORD1>LogFormat</KEYWORD1>
- <KEYWORD1>LogLevel</KEYWORD1>
- <KEYWORD1>MCacheMaxObjectCount</KEYWORD1>
- <KEYWORD1>MCacheMaxObjectSize</KEYWORD1>
- <KEYWORD1>MCacheMaxStreamingBuffer</KEYWORD1>
- <KEYWORD1>MCacheMinObjectSize</KEYWORD1>
- <KEYWORD1>MCacheRemovalAlgorithm</KEYWORD1>
- <KEYWORD1>MCacheSize</KEYWORD1>
- <KEYWORD1>MMapFile</KEYWORD1>
- <KEYWORD1>MaxClients</KEYWORD1>
- <KEYWORD1>MaxKeepAliveRequests</KEYWORD1>
- <KEYWORD1>MaxMemFree</KEYWORD1>
- <KEYWORD1>MaxRequestsPerChild</KEYWORD1>
- <KEYWORD1>MaxRequestsPerThread</KEYWORD1>
- <KEYWORD1>MaxSpareServers</KEYWORD1>
- <KEYWORD1>MaxSpareThreads</KEYWORD1>
- <KEYWORD1>MaxThreads</KEYWORD1>
- <KEYWORD1>MaxThreadsPerChild</KEYWORD1>
- <KEYWORD1>MetaDir</KEYWORD1>
- <KEYWORD1>MetaFiles</KEYWORD1>
- <KEYWORD1>MetaSuffix</KEYWORD1>
- <KEYWORD1>MimeMagicFile</KEYWORD1>
- <KEYWORD1>MinSpareServers</KEYWORD1>
- <KEYWORD1>MinSpareThreads</KEYWORD1>
- <KEYWORD1>MultiviewsMatch</KEYWORD1>
- <KEYWORD1>NWSSLTrustedCerts</KEYWORD1>
- <KEYWORD1>NWSSLUpgradeable</KEYWORD1>
- <KEYWORD1>NameVirtualHost</KEYWORD1>
- <KEYWORD1>NoProxy</KEYWORD1>
- <KEYWORD1>NumServers</KEYWORD1>
- <KEYWORD1>Options</KEYWORD1>
- <KEYWORD1>PassEnv</KEYWORD1>
- <KEYWORD1>PidFile</KEYWORD1>
- <KEYWORD1>ProtocolEcho</KEYWORD1>
- <KEYWORD1>ProxyBadHeader</KEYWORD1>
- <KEYWORD1>ProxyBlock</KEYWORD1>
- <KEYWORD1>ProxyDomain</KEYWORD1>
- <KEYWORD1>ProxyErrorOverride</KEYWORD1>
- <KEYWORD1>ProxyIOBufferSize</KEYWORD1>
- <KEYWORD1>ProxyMaxForwards</KEYWORD1>
- <KEYWORD1>ProxyPass</KEYWORD1>
- <KEYWORD1>ProxyPassReverse</KEYWORD1>
- <KEYWORD1>ProxyPreserveHost</KEYWORD1>
- <KEYWORD1>ProxyReceiveBufferSize</KEYWORD1>
- <KEYWORD1>ProxyRemote</KEYWORD1>
- <KEYWORD1>ProxyRemoteMatch</KEYWORD1>
- <KEYWORD1>ProxyRequests</KEYWORD1>
- <KEYWORD1>ProxyTimeout</KEYWORD1>
- <KEYWORD1>ProxyVia</KEYWORD1>
- <KEYWORD1>RLimitCPU</KEYWORD1>
- <KEYWORD1>RLimitMEM</KEYWORD1>
- <KEYWORD1>RLimitNPROC</KEYWORD1>
- <KEYWORD1>ReadmeName</KEYWORD1>
- <KEYWORD1>Redirect</KEYWORD1>
- <KEYWORD1>RedirectMatch</KEYWORD1>
- <KEYWORD1>RedirectPermanent</KEYWORD1>
- <KEYWORD1>RedirectTemp</KEYWORD1>
- <KEYWORD1>RequestHeader</KEYWORD1>
- <KEYWORD1>RewriteBase</KEYWORD1>
- <KEYWORD1>RewriteCond</KEYWORD1>
- <KEYWORD1>RewriteEngine</KEYWORD1>
- <KEYWORD1>RewriteLock</KEYWORD1>
- <KEYWORD1>RewriteLog</KEYWORD1>
- <KEYWORD1>RewriteLogLevel</KEYWORD1>
- <KEYWORD1>RewriteMap</KEYWORD1>
- <KEYWORD1>RewriteOptions</KEYWORD1>
- <KEYWORD1>RewriteRule</KEYWORD1>
- <KEYWORD1>SSIEndTag</KEYWORD1>
- <KEYWORD1>SSIErrorMsg</KEYWORD1>
- <KEYWORD1>SSIStartTag</KEYWORD1>
- <KEYWORD1>SSITimeFormat</KEYWORD1>
- <KEYWORD1>SSIUndefinedEcho</KEYWORD1>
- <KEYWORD1>SSLCACertificateFile</KEYWORD1>
- <KEYWORD1>SSLCACertificatePath</KEYWORD1>
- <KEYWORD1>SSLCARevocationFile</KEYWORD1>
- <KEYWORD1>SSLCARevocationPath</KEYWORD1>
- <KEYWORD1>SSLCertificateChainFile</KEYWORD1>
- <KEYWORD1>SSLCertificateFile</KEYWORD1>
- <KEYWORD1>SSLCertificateKeyFile</KEYWORD1>
- <KEYWORD1>SSLCipherSuite</KEYWORD1>
- <KEYWORD1>SSLEngine</KEYWORD1>
- <KEYWORD1>SSLMutex</KEYWORD1>
- <KEYWORD1>SSLOptions</KEYWORD1>
- <KEYWORD1>SSLPassPhraseDialog</KEYWORD1>
- <KEYWORD1>SSLProtocol</KEYWORD1>
- <KEYWORD1>SSLProxyCACertificateFile</KEYWORD1>
- <KEYWORD1>SSLProxyCACertificatePath</KEYWORD1>
- <KEYWORD1>SSLProxyCARevocationFile</KEYWORD1>
- <KEYWORD1>SSLProxyCARevocationPath</KEYWORD1>
- <KEYWORD1>SSLProxyCipherSuite</KEYWORD1>
- <KEYWORD1>SSLProxyEngine</KEYWORD1>
- <KEYWORD1>SSLProxyMachineCertificateFile</KEYWORD1>
- <KEYWORD1>SSLProxyMachineCertificatePath</KEYWORD1>
- <KEYWORD1>SSLProxyProtocol</KEYWORD1>
- <KEYWORD1>SSLProxyVerify</KEYWORD1>
- <KEYWORD1>SSLProxyVerifyDepth</KEYWORD1>
- <KEYWORD1>SSLRandomSeed</KEYWORD1>
- <KEYWORD1>SSLSessionCache</KEYWORD1>
- <KEYWORD1>SSLSessionCacheTimeout</KEYWORD1>
- <KEYWORD1>SSLVerifyClient</KEYWORD1>
- <KEYWORD1>SSLVerifyDepth</KEYWORD1>
- <KEYWORD1>ScoreBoardFile</KEYWORD1>
- <KEYWORD1>Script</KEYWORD1>
- <KEYWORD1>ScriptAlias</KEYWORD1>
- <KEYWORD1>ScriptAliasMatch</KEYWORD1>
- <KEYWORD1>ScriptInterpreterSource</KEYWORD1>
- <KEYWORD1>ScriptLog</KEYWORD1>
- <KEYWORD1>ScriptLogBuffer</KEYWORD1>
- <KEYWORD1>ScriptLogLength</KEYWORD1>
- <KEYWORD1>ScriptSock</KEYWORD1>
- <KEYWORD1>SecureListen</KEYWORD1>
- <KEYWORD1>SendBufferSize</KEYWORD1>
- <KEYWORD1>ServerAdmin</KEYWORD1>
- <KEYWORD1>ServerLimit</KEYWORD1>
- <KEYWORD1>ServerName</KEYWORD1>
- <KEYWORD1>ServerRoot</KEYWORD1>
- <KEYWORD1>ServerSignature</KEYWORD1>
- <KEYWORD1>ServerTokens</KEYWORD1>
- <KEYWORD1>SetEnv</KEYWORD1>
- <KEYWORD1>SetEnvIf</KEYWORD1>
- <KEYWORD1>SetEnvIfNoCase</KEYWORD1>
- <KEYWORD1>SetHandler</KEYWORD1>
- <KEYWORD1>SetInputFilter</KEYWORD1>
- <KEYWORD1>SetOutputFilter</KEYWORD1>
- <KEYWORD1>StartServers</KEYWORD1>
- <KEYWORD1>StartThreads</KEYWORD1>
- <KEYWORD1>SuexecUserGroup</KEYWORD1>
- <KEYWORD1>ThreadLimit</KEYWORD1>
- <KEYWORD1>ThreadStackSize</KEYWORD1>
- <KEYWORD1>ThreadsPerChild</KEYWORD1>
- <KEYWORD1>TimeOut</KEYWORD1>
- <KEYWORD1>TransferLog</KEYWORD1>
- <KEYWORD1>TypesConfig</KEYWORD1>
- <KEYWORD1>UnsetEnv</KEYWORD1>
- <KEYWORD1>UseCanonicalName</KEYWORD1>
- <KEYWORD1>User</KEYWORD1>
- <KEYWORD1>UserDir</KEYWORD1>
- <KEYWORD1>VirtualDocumentRoot</KEYWORD1>
- <KEYWORD1>VirtualDocumentRootIP</KEYWORD1>
- <KEYWORD1>VirtualScriptAlias</KEYWORD1>
- <KEYWORD1>VirtualScriptAliasIP</KEYWORD1>
- <KEYWORD1>Win32DisableAcceptEx</KEYWORD1>
- <KEYWORD1>XBitHack</KEYWORD1>
-
- <!-- Apache 1.x -->
- <KEYWORD4>AddModule</KEYWORD4>
- <KEYWORD4>ClearModuleList</KEYWORD4>
- <KEYWORD4>ServerType</KEYWORD4>
- <KEYWORD4>Port</KEYWORD4>
-
- <LITERAL2>Off</LITERAL2>
- <LITERAL2>On</LITERAL2>
- <LITERAL2>None</LITERAL2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="DIRECTIVE" DEFAULT="NULL" IGNORE_CASE="TRUE">
-
- <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN_REGEXP HASH_CHAR="<VirtualHost" TYPE="MARKUP" DELEGATE="VHOST">
- <BEGIN><![CDATA[<(VirtualHost)[^>]*>]]></BEGIN>
- <END><![CDATA[</$1>]]></END>
- </SPAN_REGEXP>
-
- <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
- <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
- <END><![CDATA[</$1>]]></END>
- </SPAN_REGEXP>
-
- <KEYWORDS>
-
- <KEYWORD2>AcceptMutex</KEYWORD2>
- <KEYWORD2>AcceptPathInfo</KEYWORD2>
- <KEYWORD2>AccessFileName</KEYWORD2>
- <KEYWORD2>Action</KEYWORD2>
- <KEYWORD2>AddAlt</KEYWORD2>
- <KEYWORD2>AddAltByEncoding</KEYWORD2>
- <KEYWORD2>AddAltByType</KEYWORD2>
- <KEYWORD2>AddCharset</KEYWORD2>
- <KEYWORD2>AddDefaultCharset</KEYWORD2>
- <KEYWORD2>AddDescription</KEYWORD2>
- <KEYWORD2>AddEncoding</KEYWORD2>
- <KEYWORD2>AddHandler</KEYWORD2>
- <KEYWORD2>AddIcon</KEYWORD2>
- <KEYWORD2>AddIconByEncoding</KEYWORD2>
- <KEYWORD2>AddIconByType</KEYWORD2>
- <KEYWORD2>AddInputFilter</KEYWORD2>
- <KEYWORD2>AddLanguage</KEYWORD2>
- <KEYWORD2>AddModuleInfo</KEYWORD2>
- <KEYWORD2>AddOutputFilter</KEYWORD2>
- <KEYWORD2>AddOutputFilterByType</KEYWORD2>
- <KEYWORD2>AddType</KEYWORD2>
- <KEYWORD2>Alias</KEYWORD2>
- <KEYWORD2>AliasMatch</KEYWORD2>
- <KEYWORD2>Allow</KEYWORD2>
- <KEYWORD2>AllowCONNECT</KEYWORD2>
- <KEYWORD2>AllowEncodedSlashes</KEYWORD2>
- <KEYWORD2>AllowOverride</KEYWORD2>
- <KEYWORD2>Anonymous</KEYWORD2>
- <KEYWORD2>Anonymous_Authoritative</KEYWORD2>
- <KEYWORD2>Anonymous_LogEmail</KEYWORD2>
- <KEYWORD2>Anonymous_MustGiveEmail</KEYWORD2>
- <KEYWORD2>Anonymous_NoUserID</KEYWORD2>
- <KEYWORD2>Anonymous_VerifyEmail</KEYWORD2>
- <KEYWORD2>AuthAuthoritative</KEYWORD2>
- <KEYWORD2>AuthDBMAuthoritative</KEYWORD2>
- <KEYWORD2>AuthDBMGroupFile</KEYWORD2>
- <KEYWORD2>AuthDBMType</KEYWORD2>
- <KEYWORD2>AuthDBMUserFile</KEYWORD2>
- <KEYWORD2>AuthDigestAlgorithm</KEYWORD2>
- <KEYWORD2>AuthDigestDomain</KEYWORD2>
- <KEYWORD2>AuthDigestFile</KEYWORD2>
- <KEYWORD2>AuthDigestGroupFile</KEYWORD2>
- <KEYWORD2>AuthDigestNcCheck</KEYWORD2>
- <KEYWORD2>AuthDigestNonceFormat</KEYWORD2>
- <KEYWORD2>AuthDigestNonceLifetime</KEYWORD2>
- <KEYWORD2>AuthDigestQop</KEYWORD2>
- <KEYWORD2>AuthDigestShmemSize</KEYWORD2>
- <KEYWORD2>AuthGroupFile</KEYWORD2>
- <KEYWORD2>AuthLDAPAuthoritative</KEYWORD2>
- <KEYWORD2>AuthLDAPBindDN</KEYWORD2>
- <KEYWORD2>AuthLDAPBindPassword</KEYWORD2>
- <KEYWORD2>AuthLDAPCharsetConfig</KEYWORD2>
- <KEYWORD2>AuthLDAPCompareDNOnServer</KEYWORD2>
- <KEYWORD2>AuthLDAPDereferenceAliases</KEYWORD2>
- <KEYWORD2>AuthLDAPEnabled</KEYWORD2>
- <KEYWORD2>AuthLDAPFrontPageHack</KEYWORD2>
- <KEYWORD2>AuthLDAPGroupAttribute</KEYWORD2>
- <KEYWORD2>AuthLDAPGroupAttributeIsDN</KEYWORD2>
- <KEYWORD2>AuthLDAPRemoteUserIsDN</KEYWORD2>
- <KEYWORD2>AuthLDAPUrl</KEYWORD2>
- <KEYWORD2>AuthName</KEYWORD2>
- <KEYWORD2>AuthType</KEYWORD2>
- <KEYWORD2>AuthUserFile</KEYWORD2>
- <KEYWORD2>BS2000Account</KEYWORD2>
- <KEYWORD2>BrowserMatch</KEYWORD2>
- <KEYWORD2>BrowserMatchNoCase</KEYWORD2>
- <KEYWORD2>CGIMapExtension</KEYWORD2>
- <KEYWORD2>CacheDefaultExpire</KEYWORD2>
- <KEYWORD2>CacheDirLength</KEYWORD2>
- <KEYWORD2>CacheDirLevels</KEYWORD2>
- <KEYWORD2>CacheDisable</KEYWORD2>
- <KEYWORD2>CacheEnable</KEYWORD2>
- <KEYWORD2>CacheExpiryCheck</KEYWORD2>
- <KEYWORD2>CacheFile</KEYWORD2>
- <KEYWORD2>CacheForceCompletion</KEYWORD2>
- <KEYWORD2>CacheGcClean</KEYWORD2>
- <KEYWORD2>CacheGcDaily</KEYWORD2>
- <KEYWORD2>CacheGcInterval</KEYWORD2>
- <KEYWORD2>CacheGcMemUsage</KEYWORD2>
- <KEYWORD2>CacheGcUnused</KEYWORD2>
- <KEYWORD2>CacheIgnoreCacheControl</KEYWORD2>
- <KEYWORD2>CacheIgnoreNoLastMod</KEYWORD2>
- <KEYWORD2>CacheLastModifiedFactor</KEYWORD2>
- <KEYWORD2>CacheMaxExpire</KEYWORD2>
- <KEYWORD2>CacheMaxFileSize</KEYWORD2>
- <KEYWORD2>CacheMinFileSize</KEYWORD2>
- <KEYWORD2>CacheNegotiatedDocs</KEYWORD2>
- <KEYWORD2>CacheRoot</KEYWORD2>
- <KEYWORD2>CacheSize</KEYWORD2>
- <KEYWORD2>CacheTimeMargin</KEYWORD2>
- <KEYWORD2>CharsetDefault</KEYWORD2>
- <KEYWORD2>CharsetOptions</KEYWORD2>
- <KEYWORD2>CharsetSourceEnc</KEYWORD2>
- <KEYWORD2>CheckSpelling</KEYWORD2>
- <KEYWORD2>ChildPerUserID</KEYWORD2>
- <KEYWORD2>ContentDigest</KEYWORD2>
- <KEYWORD2>CookieDomain</KEYWORD2>
- <KEYWORD2>CookieExpires</KEYWORD2>
- <KEYWORD2>CookieLog</KEYWORD2>
- <KEYWORD2>CookieName</KEYWORD2>
- <KEYWORD2>CookieStyle</KEYWORD2>
- <KEYWORD2>CookieTracking</KEYWORD2>
- <KEYWORD2>CoreDumpDirectory</KEYWORD2>
- <KEYWORD2>CustomLog</KEYWORD2>
- <KEYWORD2>Dav</KEYWORD2>
- <KEYWORD2>DavDepthInfinity</KEYWORD2>
- <KEYWORD2>DavLockDB</KEYWORD2>
- <KEYWORD2>DavMinTimeout</KEYWORD2>
- <KEYWORD2>DefaultIcon</KEYWORD2>
- <KEYWORD2>DefaultLanguage</KEYWORD2>
- <KEYWORD2>DefaultType</KEYWORD2>
- <KEYWORD2>DeflateBufferSize</KEYWORD2>
- <KEYWORD2>DeflateCompressionLevel</KEYWORD2>
- <KEYWORD2>DeflateFilterNote</KEYWORD2>
- <KEYWORD2>DeflateMemLevel</KEYWORD2>
- <KEYWORD2>DeflateWindowSize</KEYWORD2>
- <KEYWORD2>Deny</KEYWORD2>
- <KEYWORD2>DirectoryIndex</KEYWORD2>
- <KEYWORD1>DirectorySlash</KEYWORD1>
- <KEYWORD2>DocumentRoot</KEYWORD2>
- <KEYWORD2>EnableMMAP</KEYWORD2>
- <KEYWORD2>EnableSendfile</KEYWORD2>
- <KEYWORD2>ErrorDocument</KEYWORD2>
- <KEYWORD2>ErrorLog</KEYWORD2>
- <KEYWORD2>Example</KEYWORD2>
- <KEYWORD2>ExpiresActive</KEYWORD2>
- <KEYWORD2>ExpiresByType</KEYWORD2>
- <KEYWORD2>ExpiresDefault</KEYWORD2>
- <KEYWORD2>ExtFilterDefine</KEYWORD2>
- <KEYWORD2>ExtFilterOptions</KEYWORD2>
- <KEYWORD2>ExtendedStatus</KEYWORD2>
- <KEYWORD2>FileETag</KEYWORD2>
- <KEYWORD2>ForceLanguagePriority</KEYWORD2>
- <KEYWORD2>ForceType</KEYWORD2>
- <KEYWORD2>Group</KEYWORD2>
- <KEYWORD2>Header</KEYWORD2>
- <KEYWORD2>HeaderName</KEYWORD2>
- <KEYWORD2>HostnameLookups</KEYWORD2>
- <KEYWORD2>ISAPIAppendLogToErrors</KEYWORD2>
- <KEYWORD2>ISAPIAppendLogToQuery</KEYWORD2>
- <KEYWORD2>ISAPICacheFile</KEYWORD2>
- <KEYWORD2>ISAPIFakeAsync</KEYWORD2>
- <KEYWORD2>ISAPILogNotSupported</KEYWORD2>
- <KEYWORD2>ISAPIReadAheadBuffer</KEYWORD2>
- <KEYWORD2>IdentityCheck</KEYWORD2>
- <KEYWORD2>ImapBase</KEYWORD2>
- <KEYWORD2>ImapDefault</KEYWORD2>
- <KEYWORD2>ImapMenu</KEYWORD2>
- <KEYWORD2>Include</KEYWORD2>
- <KEYWORD2>IndexIgnore</KEYWORD2>
- <KEYWORD2>IndexOptions</KEYWORD2>
- <KEYWORD2>IndexOrderDefault</KEYWORD2>
- <KEYWORD2>KeepAlive</KEYWORD2>
- <KEYWORD2>KeepAliveTimeout</KEYWORD2>
- <KEYWORD2>LDAPCacheEntries</KEYWORD2>
- <KEYWORD2>LDAPCacheTTL</KEYWORD2>
- <KEYWORD2>LDAPOpCacheEntries</KEYWORD2>
- <KEYWORD2>LDAPOpCacheTTL</KEYWORD2>
- <KEYWORD2>LDAPSharedCacheSize</KEYWORD2>
- <KEYWORD2>LDAPTrustedCA</KEYWORD2>
- <KEYWORD2>LDAPTrustedCAType</KEYWORD2>
- <KEYWORD2>LanguagePriority</KEYWORD2>
- <KEYWORD2>LimitInternalRecursion</KEYWORD2>
- <KEYWORD2>LimitRequestBody</KEYWORD2>
- <KEYWORD2>LimitRequestFields</KEYWORD2>
- <KEYWORD2>LimitRequestFieldsize</KEYWORD2>
- <KEYWORD2>LimitRequestLine</KEYWORD2>
- <KEYWORD2>LimitXMLRequestBody</KEYWORD2>
- <KEYWORD2>Listen</KEYWORD2>
- <KEYWORD2>ListenBacklog</KEYWORD2>
- <KEYWORD2>LoadFile</KEYWORD2>
- <KEYWORD2>LoadModule</KEYWORD2>
- <KEYWORD2>LockFile</KEYWORD2>
- <KEYWORD2>LogFormat</KEYWORD2>
- <KEYWORD2>LogLevel</KEYWORD2>
- <KEYWORD2>MCacheMaxObjectCount</KEYWORD2>
- <KEYWORD2>MCacheMaxObjectSize</KEYWORD2>
- <KEYWORD2>MCacheMaxStreamingBuffer</KEYWORD2>
- <KEYWORD2>MCacheMinObjectSize</KEYWORD2>
- <KEYWORD2>MCacheRemovalAlgorithm</KEYWORD2>
- <KEYWORD2>MCacheSize</KEYWORD2>
- <KEYWORD2>MMapFile</KEYWORD2>
- <KEYWORD2>MaxClients</KEYWORD2>
- <KEYWORD2>MaxKeepAliveRequests</KEYWORD2>
- <KEYWORD2>MaxMemFree</KEYWORD2>
- <KEYWORD2>MaxRequestsPerChild</KEYWORD2>
- <KEYWORD2>MaxRequestsPerThread</KEYWORD2>
- <KEYWORD2>MaxSpareServers</KEYWORD2>
- <KEYWORD2>MaxSpareThreads</KEYWORD2>
- <KEYWORD2>MaxThreads</KEYWORD2>
- <KEYWORD2>MaxThreadsPerChild</KEYWORD2>
- <KEYWORD2>MetaDir</KEYWORD2>
- <KEYWORD2>MetaFiles</KEYWORD2>
- <KEYWORD2>MetaSuffix</KEYWORD2>
- <KEYWORD2>MimeMagicFile</KEYWORD2>
- <KEYWORD2>MinSpareServers</KEYWORD2>
- <KEYWORD2>MinSpareThreads</KEYWORD2>
- <KEYWORD2>ModMimeUsePathInfo</KEYWORD2>
- <KEYWORD2>MultiviewsMatch</KEYWORD2>
- <KEYWORD2>NWSSLTrustedCerts</KEYWORD2>
- <KEYWORD2>NameVirtualHost</KEYWORD2>
- <KEYWORD2>NoProxy</KEYWORD2>
- <KEYWORD2>NumServers</KEYWORD2>
- <KEYWORD2>Options</KEYWORD2>
- <KEYWORD2>Order</KEYWORD2>
- <KEYWORD2>PassEnv</KEYWORD2>
- <KEYWORD2>PidFile</KEYWORD2>
- <KEYWORD2>ProtocolEcho</KEYWORD2>
- <KEYWORD2>ProxyBadHeader</KEYWORD2>
- <KEYWORD2>ProxyBlock</KEYWORD2>
- <KEYWORD2>ProxyDomain</KEYWORD2>
- <KEYWORD2>ProxyErrorOverride</KEYWORD2>
- <KEYWORD2>ProxyIOBufferSize</KEYWORD2>
- <KEYWORD2>ProxyMaxForwards</KEYWORD2>
- <KEYWORD2>ProxyPass</KEYWORD2>
- <KEYWORD2>ProxyPassReverse</KEYWORD2>
- <KEYWORD2>ProxyPreserveHost</KEYWORD2>
- <KEYWORD2>ProxyReceiveBufferSize</KEYWORD2>
- <KEYWORD2>ProxyRemote</KEYWORD2>
- <KEYWORD2>ProxyRemoteMatch</KEYWORD2>
- <KEYWORD2>ProxyRequests</KEYWORD2>
- <KEYWORD2>ProxyTimeout</KEYWORD2>
- <KEYWORD2>ProxyVia</KEYWORD2>
- <KEYWORD2>RLimitCPU</KEYWORD2>
- <KEYWORD2>RLimitMEM</KEYWORD2>
- <KEYWORD2>RLimitNPROC</KEYWORD2>
- <KEYWORD2>ReadmeName</KEYWORD2>
- <KEYWORD2>Redirect</KEYWORD2>
- <KEYWORD2>RedirectMatch</KEYWORD2>
- <KEYWORD2>RedirectPermanent</KEYWORD2>
- <KEYWORD2>RedirectTemp</KEYWORD2>
- <KEYWORD2>RemoveCharset</KEYWORD2>
- <KEYWORD2>RemoveEncoding</KEYWORD2>
- <KEYWORD2>RemoveHandler</KEYWORD2>
- <KEYWORD2>RemoveInputFilter</KEYWORD2>
- <KEYWORD2>RemoveLanguage</KEYWORD2>
- <KEYWORD2>RemoveOutputFilter</KEYWORD2>
- <KEYWORD2>RemoveType</KEYWORD2>
- <KEYWORD2>RequestHeader</KEYWORD2>
- <KEYWORD2>Require</KEYWORD2>
- <KEYWORD2>RewriteBase</KEYWORD2>
- <KEYWORD2>RewriteCond</KEYWORD2>
- <KEYWORD2>RewriteEngine</KEYWORD2>
- <KEYWORD2>RewriteLock</KEYWORD2>
- <KEYWORD2>RewriteLog</KEYWORD2>
- <KEYWORD2>RewriteLogLevel</KEYWORD2>
- <KEYWORD2>RewriteMap</KEYWORD2>
- <KEYWORD2>RewriteOptions</KEYWORD2>
- <KEYWORD2>RewriteRule</KEYWORD2>
- <KEYWORD2>SSIEndTag</KEYWORD2>
- <KEYWORD2>SSIErrorMsg</KEYWORD2>
- <KEYWORD2>SSIStartTag</KEYWORD2>
- <KEYWORD2>SSITimeFormat</KEYWORD2>
- <KEYWORD2>SSIUndefinedEcho</KEYWORD2>
- <KEYWORD2>SSLCACertificateFile</KEYWORD2>
- <KEYWORD2>SSLCACertificatePath</KEYWORD2>
- <KEYWORD2>SSLCARevocationFile</KEYWORD2>
- <KEYWORD2>SSLCARevocationPath</KEYWORD2>
- <KEYWORD2>SSLCertificateChainFile</KEYWORD2>
- <KEYWORD2>SSLCertificateFile</KEYWORD2>
- <KEYWORD2>SSLCertificateKeyFile</KEYWORD2>
- <KEYWORD2>SSLCipherSuite</KEYWORD2>
- <KEYWORD2>SSLEngine</KEYWORD2>
- <KEYWORD2>SSLMutex</KEYWORD2>
- <KEYWORD2>SSLOptions</KEYWORD2>
- <KEYWORD2>SSLPassPhraseDialog</KEYWORD2>
- <KEYWORD2>SSLProtocol</KEYWORD2>
- <KEYWORD2>SSLProxyCACertificateFile</KEYWORD2>
- <KEYWORD2>SSLProxyCACertificatePath</KEYWORD2>
- <KEYWORD2>SSLProxyCARevocationFile</KEYWORD2>
- <KEYWORD2>SSLProxyCARevocationPath</KEYWORD2>
- <KEYWORD2>SSLProxyCipherSuite</KEYWORD2>
- <KEYWORD2>SSLProxyEngine</KEYWORD2>
- <KEYWORD2>SSLProxyMachineCertificateFile</KEYWORD2>
- <KEYWORD2>SSLProxyMachineCertificatePath</KEYWORD2>
- <KEYWORD2>SSLProxyProtocol</KEYWORD2>
- <KEYWORD2>SSLProxyVerify</KEYWORD2>
- <KEYWORD2>SSLProxyVerifyDepth</KEYWORD2>
- <KEYWORD2>SSLRandomSeed</KEYWORD2>
- <KEYWORD2>SSLRequire</KEYWORD2>
- <KEYWORD2>SSLRequireSSL</KEYWORD2>
- <KEYWORD2>SSLSessionCache</KEYWORD2>
- <KEYWORD2>SSLSessionCacheTimeout</KEYWORD2>
- <KEYWORD2>SSLVerifyClient</KEYWORD2>
- <KEYWORD2>SSLVerifyDepth</KEYWORD2>
- <KEYWORD2>Satisfy</KEYWORD2>
- <KEYWORD2>ScoreBoardFile</KEYWORD2>
- <KEYWORD2>Script</KEYWORD2>
- <KEYWORD2>ScriptAlias</KEYWORD2>
- <KEYWORD2>ScriptAliasMatch</KEYWORD2>
- <KEYWORD2>ScriptInterpreterSource</KEYWORD2>
- <KEYWORD2>ScriptLog</KEYWORD2>
- <KEYWORD2>ScriptLogBuffer</KEYWORD2>
- <KEYWORD2>ScriptLogLength</KEYWORD2>
- <KEYWORD2>ScriptSock</KEYWORD2>
- <KEYWORD2>SecureListen</KEYWORD2>
- <KEYWORD2>SendBufferSize</KEYWORD2>
- <KEYWORD2>ServerAdmin</KEYWORD2>
- <KEYWORD2>ServerLimit</KEYWORD2>
- <KEYWORD2>ServerName</KEYWORD2>
- <KEYWORD2>ServerRoot</KEYWORD2>
- <KEYWORD2>ServerSignature</KEYWORD2>
- <KEYWORD2>ServerTokens</KEYWORD2>
- <KEYWORD2>SetEnv</KEYWORD2>
- <KEYWORD2>SetEnvIf</KEYWORD2>
- <KEYWORD2>SetEnvIfNoCase</KEYWORD2>
- <KEYWORD2>SetHandler</KEYWORD2>
- <KEYWORD2>SetInputFilter</KEYWORD2>
- <KEYWORD2>SetOutputFilter</KEYWORD2>
- <KEYWORD2>StartServers</KEYWORD2>
- <KEYWORD2>StartThreads</KEYWORD2>
- <KEYWORD2>SuexecUserGroup</KEYWORD2>
- <KEYWORD2>ThreadLimit</KEYWORD2>
- <KEYWORD2>ThreadStackSize</KEYWORD2>
- <KEYWORD2>ThreadsPerChild</KEYWORD2>
- <KEYWORD2>TimeOut</KEYWORD2>
- <KEYWORD2>TransferLog</KEYWORD2>
- <KEYWORD2>TypesConfig</KEYWORD2>
- <KEYWORD2>UnsetEnv</KEYWORD2>
- <KEYWORD2>UseCanonicalName</KEYWORD2>
- <KEYWORD2>User</KEYWORD2>
- <KEYWORD2>UserDir</KEYWORD2>
- <KEYWORD2>VirtualDocumentRoot</KEYWORD2>
- <KEYWORD2>VirtualDocumentRootIP</KEYWORD2>
- <KEYWORD2>VirtualScriptAlias</KEYWORD2>
- <KEYWORD2>VirtualScriptAliasIP</KEYWORD2>
- <KEYWORD2>XBitHack</KEYWORD2>
-
- <!-- Apache 1.x -->
- <KEYWORD4>AddModule</KEYWORD4>
- <KEYWORD4>ClearModuleList</KEYWORD4>
-
- <!-- Subversion directives -->
- <KEYWORD3>SVNPath</KEYWORD3>
- <KEYWORD3>SVNParentPath</KEYWORD3>
- <KEYWORD3>SVNIndexXSLT</KEYWORD3>
-
- <!-- mod_python directives -->
- <KEYWORD3>PythonHandler</KEYWORD3>
- <KEYWORD3>PythonDebug</KEYWORD3>
-
- <LITERAL2>All</LITERAL2>
- <LITERAL2>ExecCGI</LITERAL2>
- <LITERAL2>FollowSymLinks</LITERAL2>
- <LITERAL2>Includes</LITERAL2>
- <LITERAL2>IncludesNOEXEC</LITERAL2>
- <LITERAL2>Indexes</LITERAL2>
- <LITERAL2>MultiViews</LITERAL2>
- <LITERAL2>None</LITERAL2>
- <LITERAL2>Off</LITERAL2>
- <LITERAL2>On</LITERAL2>
- <LITERAL2>SymLinksIfOwnerMatch</LITERAL2>
- <LITERAL2>from</LITERAL2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="VHOST" DEFAULT="NULL" IGNORE_CASE="TRUE">
-
- <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
-
- <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
- <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
- <END><![CDATA[</$1>]]></END>
- </SPAN_REGEXP>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <KEYWORDS>
- <KEYWORD2>AcceptMutex</KEYWORD2>
- <KEYWORD2>AcceptPathInfo</KEYWORD2>
- <KEYWORD2>AccessFileName</KEYWORD2>
- <KEYWORD2>Action</KEYWORD2>
- <KEYWORD2>AddAlt</KEYWORD2>
- <KEYWORD2>AddAltByEncoding</KEYWORD2>
- <KEYWORD2>AddAltByType</KEYWORD2>
- <KEYWORD2>AddCharset</KEYWORD2>
- <KEYWORD2>AddDefaultCharset</KEYWORD2>
- <KEYWORD2>AddDescription</KEYWORD2>
- <KEYWORD2>AddEncoding</KEYWORD2>
- <KEYWORD2>AddHandler</KEYWORD2>
- <KEYWORD2>AddIcon</KEYWORD2>
- <KEYWORD2>AddIconByEncoding</KEYWORD2>
- <KEYWORD2>AddIconByType</KEYWORD2>
- <KEYWORD2>AddInputFilter</KEYWORD2>
- <KEYWORD2>AddLanguage</KEYWORD2>
- <KEYWORD2>AddModuleInfo</KEYWORD2>
- <KEYWORD2>AddOutputFilter</KEYWORD2>
- <KEYWORD2>AddOutputFilterByType</KEYWORD2>
- <KEYWORD2>AddType</KEYWORD2>
- <KEYWORD2>Alias</KEYWORD2>
- <KEYWORD2>AliasMatch</KEYWORD2>
- <KEYWORD2>AllowCONNECT</KEYWORD2>
- <KEYWORD2>AllowEncodedSlashes</KEYWORD2>
- <KEYWORD2>AssignUserID</KEYWORD2>
- <KEYWORD2>AuthDigestNcCheck</KEYWORD2>
- <KEYWORD2>AuthDigestShmemSize</KEYWORD2>
- <KEYWORD2>AuthLDAPCharsetConfig</KEYWORD2>
- <KEYWORD2>BS2000Account</KEYWORD2>
- <KEYWORD2>BrowserMatch</KEYWORD2>
- <KEYWORD2>BrowserMatchNoCase</KEYWORD2>
- <KEYWORD2>CacheDefaultExpire</KEYWORD2>
- <KEYWORD2>CacheDirLength</KEYWORD2>
- <KEYWORD2>CacheDirLevels</KEYWORD2>
- <KEYWORD2>CacheDisable</KEYWORD2>
- <KEYWORD2>CacheEnable</KEYWORD2>
- <KEYWORD2>CacheExpiryCheck</KEYWORD2>
- <KEYWORD2>CacheFile</KEYWORD2>
- <KEYWORD2>CacheForceCompletion</KEYWORD2>
- <KEYWORD2>CacheGcClean</KEYWORD2>
- <KEYWORD2>CacheGcDaily</KEYWORD2>
- <KEYWORD2>CacheGcInterval</KEYWORD2>
- <KEYWORD2>CacheGcMemUsage</KEYWORD2>
- <KEYWORD2>CacheGcUnused</KEYWORD2>
- <KEYWORD2>CacheIgnoreCacheControl</KEYWORD2>
- <KEYWORD2>CacheIgnoreNoLastMod</KEYWORD2>
- <KEYWORD2>CacheLastModifiedFactor</KEYWORD2>
- <KEYWORD2>CacheMaxExpire</KEYWORD2>
- <KEYWORD2>CacheMaxFileSize</KEYWORD2>
- <KEYWORD2>CacheMinFileSize</KEYWORD2>
- <KEYWORD2>CacheNegotiatedDocs</KEYWORD2>
- <KEYWORD2>CacheRoot</KEYWORD2>
- <KEYWORD2>CacheSize</KEYWORD2>
- <KEYWORD2>CacheTimeMargin</KEYWORD2>
- <KEYWORD2>CharsetDefault</KEYWORD2>
- <KEYWORD2>CharsetOptions</KEYWORD2>
- <KEYWORD2>CharsetSourceEnc</KEYWORD2>
- <KEYWORD2>CheckSpelling</KEYWORD2>
- <KEYWORD2>ChildPerUserID</KEYWORD2>
- <KEYWORD2>ContentDigest</KEYWORD2>
- <KEYWORD2>CookieDomain</KEYWORD2>
- <KEYWORD2>CookieExpires</KEYWORD2>
- <KEYWORD2>CookieLog</KEYWORD2>
- <KEYWORD2>CookieName</KEYWORD2>
- <KEYWORD2>CookieStyle</KEYWORD2>
- <KEYWORD2>CookieTracking</KEYWORD2>
- <KEYWORD2>CoreDumpDirectory</KEYWORD2>
- <KEYWORD2>CustomLog</KEYWORD2>
- <KEYWORD2>DavDepthInfinity</KEYWORD2>
- <KEYWORD2>DavLockDB</KEYWORD2>
- <KEYWORD2>DavMinTimeout</KEYWORD2>
- <KEYWORD2>DefaultIcon</KEYWORD2>
- <KEYWORD2>DefaultLanguage</KEYWORD2>
- <KEYWORD2>DefaultType</KEYWORD2>
- <KEYWORD2>DeflateBufferSize</KEYWORD2>
- <KEYWORD2>DeflateCompressionLevel</KEYWORD2>
- <KEYWORD2>DeflateFilterNote</KEYWORD2>
- <KEYWORD2>DeflateMemLevel</KEYWORD2>
- <KEYWORD2>DeflateWindowSize</KEYWORD2>
- <KEYWORD2>DirectoryIndex</KEYWORD2>
- <KEYWORD1>DirectorySlash</KEYWORD1>
- <KEYWORD2>DocumentRoot</KEYWORD2>
- <KEYWORD2>EnableMMAP</KEYWORD2>
- <KEYWORD2>EnableSendfile</KEYWORD2>
- <KEYWORD2>ErrorDocument</KEYWORD2>
- <KEYWORD2>ErrorLog</KEYWORD2>
- <KEYWORD2>Example</KEYWORD2>
- <KEYWORD2>ExpiresActive</KEYWORD2>
- <KEYWORD2>ExpiresByType</KEYWORD2>
- <KEYWORD2>ExpiresDefault</KEYWORD2>
- <KEYWORD2>ExtFilterDefine</KEYWORD2>
- <KEYWORD2>ExtendedStatus</KEYWORD2>
- <KEYWORD2>FileETag</KEYWORD2>
- <KEYWORD2>ForceLanguagePriority</KEYWORD2>
- <KEYWORD2>ForensicLog</KEYWORD2>
- <KEYWORD2>Group</KEYWORD2>
- <KEYWORD2>Header</KEYWORD2>
- <KEYWORD2>HeaderName</KEYWORD2>
- <KEYWORD2>HostnameLookups</KEYWORD2>
- <KEYWORD2>ISAPIAppendLogToErrors</KEYWORD2>
- <KEYWORD2>ISAPIAppendLogToQuery</KEYWORD2>
- <KEYWORD2>ISAPICacheFile</KEYWORD2>
- <KEYWORD2>ISAPIFakeAsync</KEYWORD2>
- <KEYWORD2>ISAPILogNotSupported</KEYWORD2>
- <KEYWORD2>ISAPIReadAheadBuffer</KEYWORD2>
- <KEYWORD2>IdentityCheck</KEYWORD2>
- <KEYWORD2>ImapBase</KEYWORD2>
- <KEYWORD2>ImapDefault</KEYWORD2>
- <KEYWORD2>ImapMenu</KEYWORD2>
- <KEYWORD2>Include</KEYWORD2>
- <KEYWORD2>IndexIgnore</KEYWORD2>
- <KEYWORD2>IndexOptions</KEYWORD2>
- <KEYWORD2>IndexOrderDefault</KEYWORD2>
- <KEYWORD2>JkMount</KEYWORD2>
- <KEYWORD2>KeepAlive</KEYWORD2>
- <KEYWORD2>KeepAliveTimeout</KEYWORD2>
- <KEYWORD2>LDAPCacheEntries</KEYWORD2>
- <KEYWORD2>LDAPCacheTTL</KEYWORD2>
- <KEYWORD2>LDAPOpCacheEntries</KEYWORD2>
- <KEYWORD2>LDAPOpCacheTTL</KEYWORD2>
- <KEYWORD2>LDAPSharedCacheSize</KEYWORD2>
- <KEYWORD2>LDAPTrustedCA</KEYWORD2>
- <KEYWORD2>LDAPTrustedCAType</KEYWORD2>
- <KEYWORD2>LanguagePriority</KEYWORD2>
- <KEYWORD2>LimitInternalRecursion</KEYWORD2>
- <KEYWORD2>LimitRequestBody</KEYWORD2>
- <KEYWORD2>LimitRequestFields</KEYWORD2>
- <KEYWORD2>LimitRequestFieldsize</KEYWORD2>
- <KEYWORD2>LimitRequestLine</KEYWORD2>
- <KEYWORD2>LimitXMLRequestBody</KEYWORD2>
- <KEYWORD2>Listen</KEYWORD2>
- <KEYWORD2>ListenBacklog</KEYWORD2>
- <KEYWORD2>LoadFile</KEYWORD2>
- <KEYWORD2>LoadModule</KEYWORD2>
- <KEYWORD2>LockFile</KEYWORD2>
- <KEYWORD2>LogFormat</KEYWORD2>
- <KEYWORD2>LogLevel</KEYWORD2>
- <KEYWORD2>MCacheMaxObjectCount</KEYWORD2>
- <KEYWORD2>MCacheMaxObjectSize</KEYWORD2>
- <KEYWORD2>MCacheMaxStreamingBuffer</KEYWORD2>
- <KEYWORD2>MCacheMinObjectSize</KEYWORD2>
- <KEYWORD2>MCacheRemovalAlgorithm</KEYWORD2>
- <KEYWORD2>MCacheSize</KEYWORD2>
- <KEYWORD2>MMapFile</KEYWORD2>
- <KEYWORD2>MaxClients</KEYWORD2>
- <KEYWORD2>MaxKeepAliveRequests</KEYWORD2>
- <KEYWORD2>MaxMemFree</KEYWORD2>
- <KEYWORD2>MaxRequestsPerChild</KEYWORD2>
- <KEYWORD2>MaxRequestsPerThread</KEYWORD2>
- <KEYWORD2>MaxSpareServers</KEYWORD2>
- <KEYWORD2>MaxSpareThreads</KEYWORD2>
- <KEYWORD2>MaxThreads</KEYWORD2>
- <KEYWORD2>MaxThreadsPerChild</KEYWORD2>
- <KEYWORD2>MetaDir</KEYWORD2>
- <KEYWORD2>MetaFiles</KEYWORD2>
- <KEYWORD2>MetaSuffix</KEYWORD2>
- <KEYWORD2>MimeMagicFile</KEYWORD2>
- <KEYWORD2>MinSpareServers</KEYWORD2>
- <KEYWORD2>MinSpareThreads</KEYWORD2>
- <KEYWORD2>MultiviewsMatch</KEYWORD2>
- <KEYWORD2>NWSSLTrustedCerts</KEYWORD2>
- <KEYWORD2>NameVirtualHost</KEYWORD2>
- <KEYWORD2>NoProxy</KEYWORD2>
- <KEYWORD2>NumServers</KEYWORD2>
- <KEYWORD2>Options</KEYWORD2>
- <KEYWORD2>PassEnv</KEYWORD2>
- <KEYWORD2>PidFile</KEYWORD2>
- <KEYWORD2>ProtocolEcho</KEYWORD2>
- <KEYWORD2>ProxyBadHeader</KEYWORD2>
- <KEYWORD2>ProxyBlock</KEYWORD2>
- <KEYWORD2>ProxyDomain</KEYWORD2>
- <KEYWORD2>ProxyErrorOverride</KEYWORD2>
- <KEYWORD2>ProxyIOBufferSize</KEYWORD2>
- <KEYWORD2>ProxyMaxForwards</KEYWORD2>
- <KEYWORD2>ProxyPass</KEYWORD2>
- <KEYWORD2>ProxyPassReverse</KEYWORD2>
- <KEYWORD2>ProxyPreserveHost</KEYWORD2>
- <KEYWORD2>ProxyReceiveBufferSize</KEYWORD2>
- <KEYWORD2>ProxyRemote</KEYWORD2>
- <KEYWORD2>ProxyRemoteMatch</KEYWORD2>
- <KEYWORD2>ProxyRequests</KEYWORD2>
- <KEYWORD2>ProxyTimeout</KEYWORD2>
- <KEYWORD2>ProxyVia</KEYWORD2>
- <KEYWORD2>RLimitCPU</KEYWORD2>
- <KEYWORD2>RLimitMEM</KEYWORD2>
- <KEYWORD2>RLimitNPROC</KEYWORD2>
- <KEYWORD2>ReadmeName</KEYWORD2>
- <KEYWORD2>Redirect</KEYWORD2>
- <KEYWORD2>RedirectMatch</KEYWORD2>
- <KEYWORD2>RedirectPermanent</KEYWORD2>
- <KEYWORD2>RedirectTemp</KEYWORD2>
- <KEYWORD2>RemoveCharset</KEYWORD2>
- <KEYWORD2>RemoveEncoding</KEYWORD2>
- <KEYWORD2>RemoveHandler</KEYWORD2>
- <KEYWORD2>RemoveInputFilter</KEYWORD2>
- <KEYWORD2>RemoveLanguage</KEYWORD2>
- <KEYWORD2>RemoveOutputFilter</KEYWORD2>
- <KEYWORD2>RemoveType</KEYWORD2>
- <KEYWORD2>RequestHeader</KEYWORD2>
- <KEYWORD2>RewriteBase</KEYWORD2>
- <KEYWORD2>RewriteCond</KEYWORD2>
- <KEYWORD2>RewriteEngine</KEYWORD2>
- <KEYWORD2>RewriteLock</KEYWORD2>
- <KEYWORD2>RewriteLog</KEYWORD2>
- <KEYWORD2>RewriteLogLevel</KEYWORD2>
- <KEYWORD2>RewriteMap</KEYWORD2>
- <KEYWORD2>RewriteOptions</KEYWORD2>
- <KEYWORD2>RewriteRule</KEYWORD2>
- <KEYWORD2>SSIEndTag</KEYWORD2>
- <KEYWORD2>SSIErrorMsg</KEYWORD2>
- <KEYWORD2>SSIStartTag</KEYWORD2>
- <KEYWORD2>SSITimeFormat</KEYWORD2>
- <KEYWORD2>SSIUndefinedEcho</KEYWORD2>
- <KEYWORD2>SSLCACertificateFile</KEYWORD2>
- <KEYWORD2>SSLCACertificatePath</KEYWORD2>
- <KEYWORD2>SSLCARevocationFile</KEYWORD2>
- <KEYWORD2>SSLCARevocationPath</KEYWORD2>
- <KEYWORD2>SSLCertificateChainFile</KEYWORD2>
- <KEYWORD2>SSLCertificateFile</KEYWORD2>
- <KEYWORD2>SSLCertificateKeyFile</KEYWORD2>
- <KEYWORD2>SSLCipherSuite</KEYWORD2>
- <KEYWORD2>SSLEngine</KEYWORD2>
- <KEYWORD2>SSLMutex</KEYWORD2>
- <KEYWORD2>SSLOptions</KEYWORD2>
- <KEYWORD2>SSLPassPhraseDialog</KEYWORD2>
- <KEYWORD2>SSLProtocol</KEYWORD2>
- <KEYWORD2>SSLProxyCACertificateFile</KEYWORD2>
- <KEYWORD2>SSLProxyCACertificatePath</KEYWORD2>
- <KEYWORD2>SSLProxyCARevocationFile</KEYWORD2>
- <KEYWORD2>SSLProxyCARevocationPath</KEYWORD2>
- <KEYWORD2>SSLProxyCipherSuite</KEYWORD2>
- <KEYWORD2>SSLProxyEngine</KEYWORD2>
- <KEYWORD2>SSLProxyMachineCertificateFile</KEYWORD2>
- <KEYWORD2>SSLProxyMachineCertificatePath</KEYWORD2>
- <KEYWORD2>SSLProxyProtocol</KEYWORD2>
- <KEYWORD2>SSLProxyVerify</KEYWORD2>
- <KEYWORD2>SSLProxyVerifyDepth</KEYWORD2>
- <KEYWORD2>SSLRandomSeed</KEYWORD2>
- <KEYWORD2>SSLSessionCache</KEYWORD2>
- <KEYWORD2>SSLSessionCacheTimeout</KEYWORD2>
- <KEYWORD2>SSLVerifyClient</KEYWORD2>
- <KEYWORD2>SSLVerifyDepth</KEYWORD2>
- <KEYWORD2>ScoreBoardFile</KEYWORD2>
- <KEYWORD2>Script</KEYWORD2>
- <KEYWORD2>ScriptAlias</KEYWORD2>
- <KEYWORD2>ScriptAliasMatch</KEYWORD2>
- <KEYWORD2>ScriptInterpreterSource</KEYWORD2>
- <KEYWORD2>ScriptLog</KEYWORD2>
- <KEYWORD2>ScriptLogBuffer</KEYWORD2>
- <KEYWORD2>ScriptLogLength</KEYWORD2>
- <KEYWORD2>ScriptSock</KEYWORD2>
- <KEYWORD2>SecureListen</KEYWORD2>
- <KEYWORD2>SendBufferSize</KEYWORD2>
- <KEYWORD2>ServerAdmin</KEYWORD2>
- <KEYWORD2>ServerAlias</KEYWORD2>
- <KEYWORD2>ServerLimit</KEYWORD2>
- <KEYWORD2>ServerName</KEYWORD2>
- <KEYWORD2>ServerPath</KEYWORD2>
- <KEYWORD2>ServerRoot</KEYWORD2>
- <KEYWORD2>ServerSignature</KEYWORD2>
- <KEYWORD2>ServerTokens</KEYWORD2>
- <KEYWORD2>SetEnv</KEYWORD2>
- <KEYWORD2>SetEnvIf</KEYWORD2>
- <KEYWORD2>SetEnvIfNoCase</KEYWORD2>
- <KEYWORD2>SetHandler</KEYWORD2>
- <KEYWORD2>SetInputFilter</KEYWORD2>
- <KEYWORD2>SetOutputFilter</KEYWORD2>
- <KEYWORD2>StartServers</KEYWORD2>
- <KEYWORD2>StartThreads</KEYWORD2>
- <KEYWORD2>SuexecUserGroup</KEYWORD2>
- <KEYWORD2>ThreadLimit</KEYWORD2>
- <KEYWORD2>ThreadStackSize</KEYWORD2>
- <KEYWORD2>ThreadsPerChild</KEYWORD2>
- <KEYWORD2>TimeOut</KEYWORD2>
- <KEYWORD2>TransferLog</KEYWORD2>
- <KEYWORD2>TypesConfig</KEYWORD2>
- <KEYWORD2>UnsetEnv</KEYWORD2>
- <KEYWORD2>UseCanonicalName</KEYWORD2>
- <KEYWORD2>User</KEYWORD2>
- <KEYWORD2>UserDir</KEYWORD2>
- <KEYWORD2>VirtualDocumentRoot</KEYWORD2>
- <KEYWORD2>VirtualDocumentRootIP</KEYWORD2>
- <KEYWORD2>VirtualScriptAlias</KEYWORD2>
- <KEYWORD2>VirtualScriptAliasIP</KEYWORD2>
- <KEYWORD2>XBitHack</KEYWORD2>
-
- <LITERAL2>Off</LITERAL2>
- <LITERAL2>On</LITERAL2>
- <LITERAL2>None</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="noWordSep" VALUE="-" />
+ </PROPS>
+ <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="TRUE">
+
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN_REGEXP HASH_CHAR="<VirtualHost" TYPE="MARKUP" DELEGATE="VHOST">
+ <BEGIN><![CDATA[<(VirtualHost)[^>]*>]]></BEGIN>
+ <END><![CDATA[</$1>]]></END>
+ </SPAN_REGEXP>
+
+ <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
+ <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
+ <END><![CDATA[</$1>]]></END>
+ </SPAN_REGEXP>
+
+ <KEYWORDS>
+ <KEYWORD1>AcceptMutex</KEYWORD1>
+ <KEYWORD1>AcceptPathInfo</KEYWORD1>
+ <KEYWORD1>AccessFileName</KEYWORD1>
+ <KEYWORD1>Action</KEYWORD1>
+ <KEYWORD1>AddAlt</KEYWORD1>
+ <KEYWORD1>AddAltByEncoding</KEYWORD1>
+ <KEYWORD1>AddAltByType</KEYWORD1>
+ <KEYWORD1>AddCharset</KEYWORD1>
+ <KEYWORD1>AddDefaultCharset</KEYWORD1>
+ <KEYWORD1>AddDescription</KEYWORD1>
+ <KEYWORD1>AddEncoding</KEYWORD1>
+ <KEYWORD1>AddHandler</KEYWORD1>
+ <KEYWORD1>AddIcon</KEYWORD1>
+ <KEYWORD1>AddIconByEncoding</KEYWORD1>
+ <KEYWORD1>AddIconByType</KEYWORD1>
+ <KEYWORD1>AddInputFilter</KEYWORD1>
+ <KEYWORD1>AddLanguage</KEYWORD1>
+ <KEYWORD1>AddModuleInfo</KEYWORD1>
+ <KEYWORD1>AddOutputFilter</KEYWORD1>
+ <KEYWORD1>AddOutputFilterByType</KEYWORD1>
+ <KEYWORD1>AddType</KEYWORD1>
+ <KEYWORD1>Alias</KEYWORD1>
+ <KEYWORD1>AliasMatch</KEYWORD1>
+ <KEYWORD1>AllowCONNECT</KEYWORD1>
+ <KEYWORD1>AllowEncodedSlashes</KEYWORD1>
+ <KEYWORD1>AuthDigestNcCheck</KEYWORD1>
+ <KEYWORD1>AuthDigestShmemSize</KEYWORD1>
+ <KEYWORD1>AuthLDAPCharsetConfig</KEYWORD1>
+ <KEYWORD1>BS2000Account</KEYWORD1>
+ <KEYWORD1>BrowserMatch</KEYWORD1>
+ <KEYWORD1>BrowserMatchNoCase</KEYWORD1>
+ <KEYWORD1>CacheDefaultExpire</KEYWORD1>
+ <KEYWORD1>CacheDirLength</KEYWORD1>
+ <KEYWORD1>CacheDirLevels</KEYWORD1>
+ <KEYWORD1>CacheDisable</KEYWORD1>
+ <KEYWORD1>CacheEnable</KEYWORD1>
+ <KEYWORD1>CacheExpiryCheck</KEYWORD1>
+ <KEYWORD1>CacheFile</KEYWORD1>
+ <KEYWORD1>CacheForceCompletion</KEYWORD1>
+ <KEYWORD1>CacheGcClean</KEYWORD1>
+ <KEYWORD1>CacheGcDaily</KEYWORD1>
+ <KEYWORD1>CacheGcInterval</KEYWORD1>
+ <KEYWORD1>CacheGcMemUsage</KEYWORD1>
+ <KEYWORD1>CacheGcUnused</KEYWORD1>
+ <KEYWORD1>CacheIgnoreCacheControl</KEYWORD1>
+ <KEYWORD1>CacheIgnoreNoLastMod</KEYWORD1>
+ <KEYWORD1>CacheLastModifiedFactor</KEYWORD1>
+ <KEYWORD1>CacheMaxExpire</KEYWORD1>
+ <KEYWORD1>CacheMaxFileSize</KEYWORD1>
+ <KEYWORD1>CacheMinFileSize</KEYWORD1>
+ <KEYWORD1>CacheNegotiatedDocs</KEYWORD1>
+ <KEYWORD1>CacheRoot</KEYWORD1>
+ <KEYWORD1>CacheSize</KEYWORD1>
+ <KEYWORD1>CacheTimeMargin</KEYWORD1>
+ <KEYWORD1>CharsetDefault</KEYWORD1>
+ <KEYWORD1>CharsetOptions</KEYWORD1>
+ <KEYWORD1>CharsetSourceEnc</KEYWORD1>
+ <KEYWORD1>CheckSpelling</KEYWORD1>
+ <KEYWORD1>ChildPerUserID</KEYWORD1>
+ <KEYWORD1>ContentDigest</KEYWORD1>
+ <KEYWORD1>CookieDomain</KEYWORD1>
+ <KEYWORD1>CookieExpires</KEYWORD1>
+ <KEYWORD1>CookieLog</KEYWORD1>
+ <KEYWORD1>CookieName</KEYWORD1>
+ <KEYWORD1>CookieStyle</KEYWORD1>
+ <KEYWORD1>CookieTracking</KEYWORD1>
+ <KEYWORD1>CoreDumpDirectory</KEYWORD1>
+ <KEYWORD1>CustomLog</KEYWORD1>
+ <KEYWORD1>DavDepthInfinity</KEYWORD1>
+ <KEYWORD1>DavLockDB</KEYWORD1>
+ <KEYWORD1>DavMinTimeout</KEYWORD1>
+ <KEYWORD1>DefaultIcon</KEYWORD1>
+ <KEYWORD1>DefaultLanguage</KEYWORD1>
+ <KEYWORD1>DefaultType</KEYWORD1>
+ <KEYWORD1>DeflateBufferSize</KEYWORD1>
+ <KEYWORD1>DeflateCompressionLevel</KEYWORD1>
+ <KEYWORD1>DeflateFilterNote</KEYWORD1>
+ <KEYWORD1>DeflateMemLevel</KEYWORD1>
+ <KEYWORD1>DeflateWindowSize</KEYWORD1>
+ <KEYWORD1>DirectoryIndex</KEYWORD1>
+ <KEYWORD1>DirectorySlash</KEYWORD1>
+ <KEYWORD1>DocumentRoot</KEYWORD1>
+ <KEYWORD1>EnableExceptionHook</KEYWORD1>
+ <KEYWORD1>EnableMMAP</KEYWORD1>
+ <KEYWORD1>EnableSendfile</KEYWORD1>
+ <KEYWORD1>ErrorDocument</KEYWORD1>
+ <KEYWORD1>ErrorLog</KEYWORD1>
+ <KEYWORD1>Example</KEYWORD1>
+ <KEYWORD1>ExpiresActive</KEYWORD1>
+ <KEYWORD1>ExpiresByType</KEYWORD1>
+ <KEYWORD1>ExpiresDefault</KEYWORD1>
+ <KEYWORD1>ExtFilterDefine</KEYWORD1>
+ <KEYWORD1>ExtendedStatus</KEYWORD1>
+ <KEYWORD1>FileETag</KEYWORD1>
+ <KEYWORD1>ForceLanguagePriority</KEYWORD1>
+ <KEYWORD1>ForensicLog</KEYWORD1>
+ <KEYWORD1>Group</KEYWORD1>
+ <KEYWORD1>Header</KEYWORD1>
+ <KEYWORD1>HeaderName</KEYWORD1>
+ <KEYWORD1>HostnameLookups</KEYWORD1>
+ <KEYWORD1>ISAPIAppendLogToErrors</KEYWORD1>
+ <KEYWORD1>ISAPIAppendLogToQuery</KEYWORD1>
+ <KEYWORD1>ISAPICacheFile</KEYWORD1>
+ <KEYWORD1>ISAPIFakeAsync</KEYWORD1>
+ <KEYWORD1>ISAPILogNotSupported</KEYWORD1>
+ <KEYWORD1>ISAPIReadAheadBuffer</KEYWORD1>
+ <KEYWORD1>IdentityCheck</KEYWORD1>
+ <KEYWORD1>ImapBase</KEYWORD1>
+ <KEYWORD1>ImapDefault</KEYWORD1>
+ <KEYWORD1>ImapMenu</KEYWORD1>
+ <KEYWORD1>Include</KEYWORD1>
+ <KEYWORD1>IndexIgnore</KEYWORD1>
+ <KEYWORD1>IndexOptions</KEYWORD1>
+ <KEYWORD1>IndexOrderDefault</KEYWORD1>
+ <KEYWORD1>KeepAlive</KEYWORD1>
+ <KEYWORD1>KeepAliveTimeout</KEYWORD1>
+ <KEYWORD1>LDAPCacheEntries</KEYWORD1>
+ <KEYWORD1>LDAPCacheTTL</KEYWORD1>
+ <KEYWORD1>LDAPOpCacheEntries</KEYWORD1>
+ <KEYWORD1>LDAPOpCacheTTL</KEYWORD1>
+ <KEYWORD1>LDAPSharedCacheFile</KEYWORD1>
+ <KEYWORD1>LDAPSharedCacheSize</KEYWORD1>
+ <KEYWORD1>LDAPTrustedCA</KEYWORD1>
+ <KEYWORD1>LDAPTrustedCAType</KEYWORD1>
+ <KEYWORD1>LanguagePriority</KEYWORD1>
+ <KEYWORD1>LimitInternalRecursion</KEYWORD1>
+ <KEYWORD1>LimitRequestBody</KEYWORD1>
+ <KEYWORD1>LimitRequestFields</KEYWORD1>
+ <KEYWORD1>LimitRequestFieldsize</KEYWORD1>
+ <KEYWORD1>LimitRequestLine</KEYWORD1>
+ <KEYWORD1>LimitXMLRequestBody</KEYWORD1>
+ <KEYWORD1>Listen</KEYWORD1>
+ <KEYWORD1>ListenBacklog</KEYWORD1>
+ <KEYWORD1>LoadFile</KEYWORD1>
+ <KEYWORD1>LoadModule</KEYWORD1>
+ <KEYWORD1>LockFile</KEYWORD1>
+ <KEYWORD1>LogFormat</KEYWORD1>
+ <KEYWORD1>LogLevel</KEYWORD1>
+ <KEYWORD1>MCacheMaxObjectCount</KEYWORD1>
+ <KEYWORD1>MCacheMaxObjectSize</KEYWORD1>
+ <KEYWORD1>MCacheMaxStreamingBuffer</KEYWORD1>
+ <KEYWORD1>MCacheMinObjectSize</KEYWORD1>
+ <KEYWORD1>MCacheRemovalAlgorithm</KEYWORD1>
+ <KEYWORD1>MCacheSize</KEYWORD1>
+ <KEYWORD1>MMapFile</KEYWORD1>
+ <KEYWORD1>MaxClients</KEYWORD1>
+ <KEYWORD1>MaxKeepAliveRequests</KEYWORD1>
+ <KEYWORD1>MaxMemFree</KEYWORD1>
+ <KEYWORD1>MaxRequestsPerChild</KEYWORD1>
+ <KEYWORD1>MaxRequestsPerThread</KEYWORD1>
+ <KEYWORD1>MaxSpareServers</KEYWORD1>
+ <KEYWORD1>MaxSpareThreads</KEYWORD1>
+ <KEYWORD1>MaxThreads</KEYWORD1>
+ <KEYWORD1>MaxThreadsPerChild</KEYWORD1>
+ <KEYWORD1>MetaDir</KEYWORD1>
+ <KEYWORD1>MetaFiles</KEYWORD1>
+ <KEYWORD1>MetaSuffix</KEYWORD1>
+ <KEYWORD1>MimeMagicFile</KEYWORD1>
+ <KEYWORD1>MinSpareServers</KEYWORD1>
+ <KEYWORD1>MinSpareThreads</KEYWORD1>
+ <KEYWORD1>MultiviewsMatch</KEYWORD1>
+ <KEYWORD1>NWSSLTrustedCerts</KEYWORD1>
+ <KEYWORD1>NWSSLUpgradeable</KEYWORD1>
+ <KEYWORD1>NameVirtualHost</KEYWORD1>
+ <KEYWORD1>NoProxy</KEYWORD1>
+ <KEYWORD1>NumServers</KEYWORD1>
+ <KEYWORD1>Options</KEYWORD1>
+ <KEYWORD1>PassEnv</KEYWORD1>
+ <KEYWORD1>PidFile</KEYWORD1>
+ <KEYWORD1>ProtocolEcho</KEYWORD1>
+ <KEYWORD1>ProxyBadHeader</KEYWORD1>
+ <KEYWORD1>ProxyBlock</KEYWORD1>
+ <KEYWORD1>ProxyDomain</KEYWORD1>
+ <KEYWORD1>ProxyErrorOverride</KEYWORD1>
+ <KEYWORD1>ProxyIOBufferSize</KEYWORD1>
+ <KEYWORD1>ProxyMaxForwards</KEYWORD1>
+ <KEYWORD1>ProxyPass</KEYWORD1>
+ <KEYWORD1>ProxyPassReverse</KEYWORD1>
+ <KEYWORD1>ProxyPreserveHost</KEYWORD1>
+ <KEYWORD1>ProxyReceiveBufferSize</KEYWORD1>
+ <KEYWORD1>ProxyRemote</KEYWORD1>
+ <KEYWORD1>ProxyRemoteMatch</KEYWORD1>
+ <KEYWORD1>ProxyRequests</KEYWORD1>
+ <KEYWORD1>ProxyTimeout</KEYWORD1>
+ <KEYWORD1>ProxyVia</KEYWORD1>
+ <KEYWORD1>RLimitCPU</KEYWORD1>
+ <KEYWORD1>RLimitMEM</KEYWORD1>
+ <KEYWORD1>RLimitNPROC</KEYWORD1>
+ <KEYWORD1>ReadmeName</KEYWORD1>
+ <KEYWORD1>Redirect</KEYWORD1>
+ <KEYWORD1>RedirectMatch</KEYWORD1>
+ <KEYWORD1>RedirectPermanent</KEYWORD1>
+ <KEYWORD1>RedirectTemp</KEYWORD1>
+ <KEYWORD1>RequestHeader</KEYWORD1>
+ <KEYWORD1>RewriteBase</KEYWORD1>
+ <KEYWORD1>RewriteCond</KEYWORD1>
+ <KEYWORD1>RewriteEngine</KEYWORD1>
+ <KEYWORD1>RewriteLock</KEYWORD1>
+ <KEYWORD1>RewriteLog</KEYWORD1>
+ <KEYWORD1>RewriteLogLevel</KEYWORD1>
+ <KEYWORD1>RewriteMap</KEYWORD1>
+ <KEYWORD1>RewriteOptions</KEYWORD1>
+ <KEYWORD1>RewriteRule</KEYWORD1>
+ <KEYWORD1>SSIEndTag</KEYWORD1>
+ <KEYWORD1>SSIErrorMsg</KEYWORD1>
+ <KEYWORD1>SSIStartTag</KEYWORD1>
+ <KEYWORD1>SSITimeFormat</KEYWORD1>
+ <KEYWORD1>SSIUndefinedEcho</KEYWORD1>
+ <KEYWORD1>SSLCACertificateFile</KEYWORD1>
+ <KEYWORD1>SSLCACertificatePath</KEYWORD1>
+ <KEYWORD1>SSLCARevocationFile</KEYWORD1>
+ <KEYWORD1>SSLCARevocationPath</KEYWORD1>
+ <KEYWORD1>SSLCertificateChainFile</KEYWORD1>
+ <KEYWORD1>SSLCertificateFile</KEYWORD1>
+ <KEYWORD1>SSLCertificateKeyFile</KEYWORD1>
+ <KEYWORD1>SSLCipherSuite</KEYWORD1>
+ <KEYWORD1>SSLEngine</KEYWORD1>
+ <KEYWORD1>SSLMutex</KEYWORD1>
+ <KEYWORD1>SSLOptions</KEYWORD1>
+ <KEYWORD1>SSLPassPhraseDialog</KEYWORD1>
+ <KEYWORD1>SSLProtocol</KEYWORD1>
+ <KEYWORD1>SSLProxyCACertificateFile</KEYWORD1>
+ <KEYWORD1>SSLProxyCACertificatePath</KEYWORD1>
+ <KEYWORD1>SSLProxyCARevocationFile</KEYWORD1>
+ <KEYWORD1>SSLProxyCARevocationPath</KEYWORD1>
+ <KEYWORD1>SSLProxyCipherSuite</KEYWORD1>
+ <KEYWORD1>SSLProxyEngine</KEYWORD1>
+ <KEYWORD1>SSLProxyMachineCertificateFile</KEYWORD1>
+ <KEYWORD1>SSLProxyMachineCertificatePath</KEYWORD1>
+ <KEYWORD1>SSLProxyProtocol</KEYWORD1>
+ <KEYWORD1>SSLProxyVerify</KEYWORD1>
+ <KEYWORD1>SSLProxyVerifyDepth</KEYWORD1>
+ <KEYWORD1>SSLRandomSeed</KEYWORD1>
+ <KEYWORD1>SSLSessionCache</KEYWORD1>
+ <KEYWORD1>SSLSessionCacheTimeout</KEYWORD1>
+ <KEYWORD1>SSLVerifyClient</KEYWORD1>
+ <KEYWORD1>SSLVerifyDepth</KEYWORD1>
+ <KEYWORD1>ScoreBoardFile</KEYWORD1>
+ <KEYWORD1>Script</KEYWORD1>
+ <KEYWORD1>ScriptAlias</KEYWORD1>
+ <KEYWORD1>ScriptAliasMatch</KEYWORD1>
+ <KEYWORD1>ScriptInterpreterSource</KEYWORD1>
+ <KEYWORD1>ScriptLog</KEYWORD1>
+ <KEYWORD1>ScriptLogBuffer</KEYWORD1>
+ <KEYWORD1>ScriptLogLength</KEYWORD1>
+ <KEYWORD1>ScriptSock</KEYWORD1>
+ <KEYWORD1>SecureListen</KEYWORD1>
+ <KEYWORD1>SendBufferSize</KEYWORD1>
+ <KEYWORD1>ServerAdmin</KEYWORD1>
+ <KEYWORD1>ServerLimit</KEYWORD1>
+ <KEYWORD1>ServerName</KEYWORD1>
+ <KEYWORD1>ServerRoot</KEYWORD1>
+ <KEYWORD1>ServerSignature</KEYWORD1>
+ <KEYWORD1>ServerTokens</KEYWORD1>
+ <KEYWORD1>SetEnv</KEYWORD1>
+ <KEYWORD1>SetEnvIf</KEYWORD1>
+ <KEYWORD1>SetEnvIfNoCase</KEYWORD1>
+ <KEYWORD1>SetHandler</KEYWORD1>
+ <KEYWORD1>SetInputFilter</KEYWORD1>
+ <KEYWORD1>SetOutputFilter</KEYWORD1>
+ <KEYWORD1>StartServers</KEYWORD1>
+ <KEYWORD1>StartThreads</KEYWORD1>
+ <KEYWORD1>SuexecUserGroup</KEYWORD1>
+ <KEYWORD1>ThreadLimit</KEYWORD1>
+ <KEYWORD1>ThreadStackSize</KEYWORD1>
+ <KEYWORD1>ThreadsPerChild</KEYWORD1>
+ <KEYWORD1>TimeOut</KEYWORD1>
+ <KEYWORD1>TransferLog</KEYWORD1>
+ <KEYWORD1>TypesConfig</KEYWORD1>
+ <KEYWORD1>UnsetEnv</KEYWORD1>
+ <KEYWORD1>UseCanonicalName</KEYWORD1>
+ <KEYWORD1>User</KEYWORD1>
+ <KEYWORD1>UserDir</KEYWORD1>
+ <KEYWORD1>VirtualDocumentRoot</KEYWORD1>
+ <KEYWORD1>VirtualDocumentRootIP</KEYWORD1>
+ <KEYWORD1>VirtualScriptAlias</KEYWORD1>
+ <KEYWORD1>VirtualScriptAliasIP</KEYWORD1>
+ <KEYWORD1>Win32DisableAcceptEx</KEYWORD1>
+ <KEYWORD1>XBitHack</KEYWORD1>
+
+ <!-- Apache 1.x -->
+ <KEYWORD4>AddModule</KEYWORD4>
+ <KEYWORD4>ClearModuleList</KEYWORD4>
+ <KEYWORD4>ServerType</KEYWORD4>
+ <KEYWORD4>Port</KEYWORD4>
+
+ <LITERAL2>Off</LITERAL2>
+ <LITERAL2>On</LITERAL2>
+ <LITERAL2>None</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="DIRECTIVE" DEFAULT="NULL" IGNORE_CASE="TRUE">
+
+ <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN_REGEXP HASH_CHAR="<VirtualHost" TYPE="MARKUP" DELEGATE="VHOST">
+ <BEGIN><![CDATA[<(VirtualHost)[^>]*>]]></BEGIN>
+ <END><![CDATA[</$1>]]></END>
+ </SPAN_REGEXP>
+
+ <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
+ <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
+ <END><![CDATA[</$1>]]></END>
+ </SPAN_REGEXP>
+
+ <KEYWORDS>
+
+ <KEYWORD2>AcceptMutex</KEYWORD2>
+ <KEYWORD2>AcceptPathInfo</KEYWORD2>
+ <KEYWORD2>AccessFileName</KEYWORD2>
+ <KEYWORD2>Action</KEYWORD2>
+ <KEYWORD2>AddAlt</KEYWORD2>
+ <KEYWORD2>AddAltByEncoding</KEYWORD2>
+ <KEYWORD2>AddAltByType</KEYWORD2>
+ <KEYWORD2>AddCharset</KEYWORD2>
+ <KEYWORD2>AddDefaultCharset</KEYWORD2>
+ <KEYWORD2>AddDescription</KEYWORD2>
+ <KEYWORD2>AddEncoding</KEYWORD2>
+ <KEYWORD2>AddHandler</KEYWORD2>
+ <KEYWORD2>AddIcon</KEYWORD2>
+ <KEYWORD2>AddIconByEncoding</KEYWORD2>
+ <KEYWORD2>AddIconByType</KEYWORD2>
+ <KEYWORD2>AddInputFilter</KEYWORD2>
+ <KEYWORD2>AddLanguage</KEYWORD2>
+ <KEYWORD2>AddModuleInfo</KEYWORD2>
+ <KEYWORD2>AddOutputFilter</KEYWORD2>
+ <KEYWORD2>AddOutputFilterByType</KEYWORD2>
+ <KEYWORD2>AddType</KEYWORD2>
+ <KEYWORD2>Alias</KEYWORD2>
+ <KEYWORD2>AliasMatch</KEYWORD2>
+ <KEYWORD2>Allow</KEYWORD2>
+ <KEYWORD2>AllowCONNECT</KEYWORD2>
+ <KEYWORD2>AllowEncodedSlashes</KEYWORD2>
+ <KEYWORD2>AllowOverride</KEYWORD2>
+ <KEYWORD2>Anonymous</KEYWORD2>
+ <KEYWORD2>Anonymous_Authoritative</KEYWORD2>
+ <KEYWORD2>Anonymous_LogEmail</KEYWORD2>
+ <KEYWORD2>Anonymous_MustGiveEmail</KEYWORD2>
+ <KEYWORD2>Anonymous_NoUserID</KEYWORD2>
+ <KEYWORD2>Anonymous_VerifyEmail</KEYWORD2>
+ <KEYWORD2>AuthAuthoritative</KEYWORD2>
+ <KEYWORD2>AuthDBMAuthoritative</KEYWORD2>
+ <KEYWORD2>AuthDBMGroupFile</KEYWORD2>
+ <KEYWORD2>AuthDBMType</KEYWORD2>
+ <KEYWORD2>AuthDBMUserFile</KEYWORD2>
+ <KEYWORD2>AuthDigestAlgorithm</KEYWORD2>
+ <KEYWORD2>AuthDigestDomain</KEYWORD2>
+ <KEYWORD2>AuthDigestFile</KEYWORD2>
+ <KEYWORD2>AuthDigestGroupFile</KEYWORD2>
+ <KEYWORD2>AuthDigestNcCheck</KEYWORD2>
+ <KEYWORD2>AuthDigestNonceFormat</KEYWORD2>
+ <KEYWORD2>AuthDigestNonceLifetime</KEYWORD2>
+ <KEYWORD2>AuthDigestQop</KEYWORD2>
+ <KEYWORD2>AuthDigestShmemSize</KEYWORD2>
+ <KEYWORD2>AuthGroupFile</KEYWORD2>
+ <KEYWORD2>AuthLDAPAuthoritative</KEYWORD2>
+ <KEYWORD2>AuthLDAPBindDN</KEYWORD2>
+ <KEYWORD2>AuthLDAPBindPassword</KEYWORD2>
+ <KEYWORD2>AuthLDAPCharsetConfig</KEYWORD2>
+ <KEYWORD2>AuthLDAPCompareDNOnServer</KEYWORD2>
+ <KEYWORD2>AuthLDAPDereferenceAliases</KEYWORD2>
+ <KEYWORD2>AuthLDAPEnabled</KEYWORD2>
+ <KEYWORD2>AuthLDAPFrontPageHack</KEYWORD2>
+ <KEYWORD2>AuthLDAPGroupAttribute</KEYWORD2>
+ <KEYWORD2>AuthLDAPGroupAttributeIsDN</KEYWORD2>
+ <KEYWORD2>AuthLDAPRemoteUserIsDN</KEYWORD2>
+ <KEYWORD2>AuthLDAPUrl</KEYWORD2>
+ <KEYWORD2>AuthName</KEYWORD2>
+ <KEYWORD2>AuthType</KEYWORD2>
+ <KEYWORD2>AuthUserFile</KEYWORD2>
+ <KEYWORD2>BS2000Account</KEYWORD2>
+ <KEYWORD2>BrowserMatch</KEYWORD2>
+ <KEYWORD2>BrowserMatchNoCase</KEYWORD2>
+ <KEYWORD2>CGIMapExtension</KEYWORD2>
+ <KEYWORD2>CacheDefaultExpire</KEYWORD2>
+ <KEYWORD2>CacheDirLength</KEYWORD2>
+ <KEYWORD2>CacheDirLevels</KEYWORD2>
+ <KEYWORD2>CacheDisable</KEYWORD2>
+ <KEYWORD2>CacheEnable</KEYWORD2>
+ <KEYWORD2>CacheExpiryCheck</KEYWORD2>
+ <KEYWORD2>CacheFile</KEYWORD2>
+ <KEYWORD2>CacheForceCompletion</KEYWORD2>
+ <KEYWORD2>CacheGcClean</KEYWORD2>
+ <KEYWORD2>CacheGcDaily</KEYWORD2>
+ <KEYWORD2>CacheGcInterval</KEYWORD2>
+ <KEYWORD2>CacheGcMemUsage</KEYWORD2>
+ <KEYWORD2>CacheGcUnused</KEYWORD2>
+ <KEYWORD2>CacheIgnoreCacheControl</KEYWORD2>
+ <KEYWORD2>CacheIgnoreNoLastMod</KEYWORD2>
+ <KEYWORD2>CacheLastModifiedFactor</KEYWORD2>
+ <KEYWORD2>CacheMaxExpire</KEYWORD2>
+ <KEYWORD2>CacheMaxFileSize</KEYWORD2>
+ <KEYWORD2>CacheMinFileSize</KEYWORD2>
+ <KEYWORD2>CacheNegotiatedDocs</KEYWORD2>
+ <KEYWORD2>CacheRoot</KEYWORD2>
+ <KEYWORD2>CacheSize</KEYWORD2>
+ <KEYWORD2>CacheTimeMargin</KEYWORD2>
+ <KEYWORD2>CharsetDefault</KEYWORD2>
+ <KEYWORD2>CharsetOptions</KEYWORD2>
+ <KEYWORD2>CharsetSourceEnc</KEYWORD2>
+ <KEYWORD2>CheckSpelling</KEYWORD2>
+ <KEYWORD2>ChildPerUserID</KEYWORD2>
+ <KEYWORD2>ContentDigest</KEYWORD2>
+ <KEYWORD2>CookieDomain</KEYWORD2>
+ <KEYWORD2>CookieExpires</KEYWORD2>
+ <KEYWORD2>CookieLog</KEYWORD2>
+ <KEYWORD2>CookieName</KEYWORD2>
+ <KEYWORD2>CookieStyle</KEYWORD2>
+ <KEYWORD2>CookieTracking</KEYWORD2>
+ <KEYWORD2>CoreDumpDirectory</KEYWORD2>
+ <KEYWORD2>CustomLog</KEYWORD2>
+ <KEYWORD2>Dav</KEYWORD2>
+ <KEYWORD2>DavDepthInfinity</KEYWORD2>
+ <KEYWORD2>DavLockDB</KEYWORD2>
+ <KEYWORD2>DavMinTimeout</KEYWORD2>
+ <KEYWORD2>DefaultIcon</KEYWORD2>
+ <KEYWORD2>DefaultLanguage</KEYWORD2>
+ <KEYWORD2>DefaultType</KEYWORD2>
+ <KEYWORD2>DeflateBufferSize</KEYWORD2>
+ <KEYWORD2>DeflateCompressionLevel</KEYWORD2>
+ <KEYWORD2>DeflateFilterNote</KEYWORD2>
+ <KEYWORD2>DeflateMemLevel</KEYWORD2>
+ <KEYWORD2>DeflateWindowSize</KEYWORD2>
+ <KEYWORD2>Deny</KEYWORD2>
+ <KEYWORD2>DirectoryIndex</KEYWORD2>
+ <KEYWORD1>DirectorySlash</KEYWORD1>
+ <KEYWORD2>DocumentRoot</KEYWORD2>
+ <KEYWORD2>EnableMMAP</KEYWORD2>
+ <KEYWORD2>EnableSendfile</KEYWORD2>
+ <KEYWORD2>ErrorDocument</KEYWORD2>
+ <KEYWORD2>ErrorLog</KEYWORD2>
+ <KEYWORD2>Example</KEYWORD2>
+ <KEYWORD2>ExpiresActive</KEYWORD2>
+ <KEYWORD2>ExpiresByType</KEYWORD2>
+ <KEYWORD2>ExpiresDefault</KEYWORD2>
+ <KEYWORD2>ExtFilterDefine</KEYWORD2>
+ <KEYWORD2>ExtFilterOptions</KEYWORD2>
+ <KEYWORD2>ExtendedStatus</KEYWORD2>
+ <KEYWORD2>FileETag</KEYWORD2>
+ <KEYWORD2>ForceLanguagePriority</KEYWORD2>
+ <KEYWORD2>ForceType</KEYWORD2>
+ <KEYWORD2>Group</KEYWORD2>
+ <KEYWORD2>Header</KEYWORD2>
+ <KEYWORD2>HeaderName</KEYWORD2>
+ <KEYWORD2>HostnameLookups</KEYWORD2>
+ <KEYWORD2>ISAPIAppendLogToErrors</KEYWORD2>
+ <KEYWORD2>ISAPIAppendLogToQuery</KEYWORD2>
+ <KEYWORD2>ISAPICacheFile</KEYWORD2>
+ <KEYWORD2>ISAPIFakeAsync</KEYWORD2>
+ <KEYWORD2>ISAPILogNotSupported</KEYWORD2>
+ <KEYWORD2>ISAPIReadAheadBuffer</KEYWORD2>
+ <KEYWORD2>IdentityCheck</KEYWORD2>
+ <KEYWORD2>ImapBase</KEYWORD2>
+ <KEYWORD2>ImapDefault</KEYWORD2>
+ <KEYWORD2>ImapMenu</KEYWORD2>
+ <KEYWORD2>Include</KEYWORD2>
+ <KEYWORD2>IndexIgnore</KEYWORD2>
+ <KEYWORD2>IndexOptions</KEYWORD2>
+ <KEYWORD2>IndexOrderDefault</KEYWORD2>
+ <KEYWORD2>KeepAlive</KEYWORD2>
+ <KEYWORD2>KeepAliveTimeout</KEYWORD2>
+ <KEYWORD2>LDAPCacheEntries</KEYWORD2>
+ <KEYWORD2>LDAPCacheTTL</KEYWORD2>
+ <KEYWORD2>LDAPOpCacheEntries</KEYWORD2>
+ <KEYWORD2>LDAPOpCacheTTL</KEYWORD2>
+ <KEYWORD2>LDAPSharedCacheSize</KEYWORD2>
+ <KEYWORD2>LDAPTrustedCA</KEYWORD2>
+ <KEYWORD2>LDAPTrustedCAType</KEYWORD2>
+ <KEYWORD2>LanguagePriority</KEYWORD2>
+ <KEYWORD2>LimitInternalRecursion</KEYWORD2>
+ <KEYWORD2>LimitRequestBody</KEYWORD2>
+ <KEYWORD2>LimitRequestFields</KEYWORD2>
+ <KEYWORD2>LimitRequestFieldsize</KEYWORD2>
+ <KEYWORD2>LimitRequestLine</KEYWORD2>
+ <KEYWORD2>LimitXMLRequestBody</KEYWORD2>
+ <KEYWORD2>Listen</KEYWORD2>
+ <KEYWORD2>ListenBacklog</KEYWORD2>
+ <KEYWORD2>LoadFile</KEYWORD2>
+ <KEYWORD2>LoadModule</KEYWORD2>
+ <KEYWORD2>LockFile</KEYWORD2>
+ <KEYWORD2>LogFormat</KEYWORD2>
+ <KEYWORD2>LogLevel</KEYWORD2>
+ <KEYWORD2>MCacheMaxObjectCount</KEYWORD2>
+ <KEYWORD2>MCacheMaxObjectSize</KEYWORD2>
+ <KEYWORD2>MCacheMaxStreamingBuffer</KEYWORD2>
+ <KEYWORD2>MCacheMinObjectSize</KEYWORD2>
+ <KEYWORD2>MCacheRemovalAlgorithm</KEYWORD2>
+ <KEYWORD2>MCacheSize</KEYWORD2>
+ <KEYWORD2>MMapFile</KEYWORD2>
+ <KEYWORD2>MaxClients</KEYWORD2>
+ <KEYWORD2>MaxKeepAliveRequests</KEYWORD2>
+ <KEYWORD2>MaxMemFree</KEYWORD2>
+ <KEYWORD2>MaxRequestsPerChild</KEYWORD2>
+ <KEYWORD2>MaxRequestsPerThread</KEYWORD2>
+ <KEYWORD2>MaxSpareServers</KEYWORD2>
+ <KEYWORD2>MaxSpareThreads</KEYWORD2>
+ <KEYWORD2>MaxThreads</KEYWORD2>
+ <KEYWORD2>MaxThreadsPerChild</KEYWORD2>
+ <KEYWORD2>MetaDir</KEYWORD2>
+ <KEYWORD2>MetaFiles</KEYWORD2>
+ <KEYWORD2>MetaSuffix</KEYWORD2>
+ <KEYWORD2>MimeMagicFile</KEYWORD2>
+ <KEYWORD2>MinSpareServers</KEYWORD2>
+ <KEYWORD2>MinSpareThreads</KEYWORD2>
+ <KEYWORD2>ModMimeUsePathInfo</KEYWORD2>
+ <KEYWORD2>MultiviewsMatch</KEYWORD2>
+ <KEYWORD2>NWSSLTrustedCerts</KEYWORD2>
+ <KEYWORD2>NameVirtualHost</KEYWORD2>
+ <KEYWORD2>NoProxy</KEYWORD2>
+ <KEYWORD2>NumServers</KEYWORD2>
+ <KEYWORD2>Options</KEYWORD2>
+ <KEYWORD2>Order</KEYWORD2>
+ <KEYWORD2>PassEnv</KEYWORD2>
+ <KEYWORD2>PidFile</KEYWORD2>
+ <KEYWORD2>ProtocolEcho</KEYWORD2>
+ <KEYWORD2>ProxyBadHeader</KEYWORD2>
+ <KEYWORD2>ProxyBlock</KEYWORD2>
+ <KEYWORD2>ProxyDomain</KEYWORD2>
+ <KEYWORD2>ProxyErrorOverride</KEYWORD2>
+ <KEYWORD2>ProxyIOBufferSize</KEYWORD2>
+ <KEYWORD2>ProxyMaxForwards</KEYWORD2>
+ <KEYWORD2>ProxyPass</KEYWORD2>
+ <KEYWORD2>ProxyPassReverse</KEYWORD2>
+ <KEYWORD2>ProxyPreserveHost</KEYWORD2>
+ <KEYWORD2>ProxyReceiveBufferSize</KEYWORD2>
+ <KEYWORD2>ProxyRemote</KEYWORD2>
+ <KEYWORD2>ProxyRemoteMatch</KEYWORD2>
+ <KEYWORD2>ProxyRequests</KEYWORD2>
+ <KEYWORD2>ProxyTimeout</KEYWORD2>
+ <KEYWORD2>ProxyVia</KEYWORD2>
+ <KEYWORD2>RLimitCPU</KEYWORD2>
+ <KEYWORD2>RLimitMEM</KEYWORD2>
+ <KEYWORD2>RLimitNPROC</KEYWORD2>
+ <KEYWORD2>ReadmeName</KEYWORD2>
+ <KEYWORD2>Redirect</KEYWORD2>
+ <KEYWORD2>RedirectMatch</KEYWORD2>
+ <KEYWORD2>RedirectPermanent</KEYWORD2>
+ <KEYWORD2>RedirectTemp</KEYWORD2>
+ <KEYWORD2>RemoveCharset</KEYWORD2>
+ <KEYWORD2>RemoveEncoding</KEYWORD2>
+ <KEYWORD2>RemoveHandler</KEYWORD2>
+ <KEYWORD2>RemoveInputFilter</KEYWORD2>
+ <KEYWORD2>RemoveLanguage</KEYWORD2>
+ <KEYWORD2>RemoveOutputFilter</KEYWORD2>
+ <KEYWORD2>RemoveType</KEYWORD2>
+ <KEYWORD2>RequestHeader</KEYWORD2>
+ <KEYWORD2>Require</KEYWORD2>
+ <KEYWORD2>RewriteBase</KEYWORD2>
+ <KEYWORD2>RewriteCond</KEYWORD2>
+ <KEYWORD2>RewriteEngine</KEYWORD2>
+ <KEYWORD2>RewriteLock</KEYWORD2>
+ <KEYWORD2>RewriteLog</KEYWORD2>
+ <KEYWORD2>RewriteLogLevel</KEYWORD2>
+ <KEYWORD2>RewriteMap</KEYWORD2>
+ <KEYWORD2>RewriteOptions</KEYWORD2>
+ <KEYWORD2>RewriteRule</KEYWORD2>
+ <KEYWORD2>SSIEndTag</KEYWORD2>
+ <KEYWORD2>SSIErrorMsg</KEYWORD2>
+ <KEYWORD2>SSIStartTag</KEYWORD2>
+ <KEYWORD2>SSITimeFormat</KEYWORD2>
+ <KEYWORD2>SSIUndefinedEcho</KEYWORD2>
+ <KEYWORD2>SSLCACertificateFile</KEYWORD2>
+ <KEYWORD2>SSLCACertificatePath</KEYWORD2>
+ <KEYWORD2>SSLCARevocationFile</KEYWORD2>
+ <KEYWORD2>SSLCARevocationPath</KEYWORD2>
+ <KEYWORD2>SSLCertificateChainFile</KEYWORD2>
+ <KEYWORD2>SSLCertificateFile</KEYWORD2>
+ <KEYWORD2>SSLCertificateKeyFile</KEYWORD2>
+ <KEYWORD2>SSLCipherSuite</KEYWORD2>
+ <KEYWORD2>SSLEngine</KEYWORD2>
+ <KEYWORD2>SSLMutex</KEYWORD2>
+ <KEYWORD2>SSLOptions</KEYWORD2>
+ <KEYWORD2>SSLPassPhraseDialog</KEYWORD2>
+ <KEYWORD2>SSLProtocol</KEYWORD2>
+ <KEYWORD2>SSLProxyCACertificateFile</KEYWORD2>
+ <KEYWORD2>SSLProxyCACertificatePath</KEYWORD2>
+ <KEYWORD2>SSLProxyCARevocationFile</KEYWORD2>
+ <KEYWORD2>SSLProxyCARevocationPath</KEYWORD2>
+ <KEYWORD2>SSLProxyCipherSuite</KEYWORD2>
+ <KEYWORD2>SSLProxyEngine</KEYWORD2>
+ <KEYWORD2>SSLProxyMachineCertificateFile</KEYWORD2>
+ <KEYWORD2>SSLProxyMachineCertificatePath</KEYWORD2>
+ <KEYWORD2>SSLProxyProtocol</KEYWORD2>
+ <KEYWORD2>SSLProxyVerify</KEYWORD2>
+ <KEYWORD2>SSLProxyVerifyDepth</KEYWORD2>
+ <KEYWORD2>SSLRandomSeed</KEYWORD2>
+ <KEYWORD2>SSLRequire</KEYWORD2>
+ <KEYWORD2>SSLRequireSSL</KEYWORD2>
+ <KEYWORD2>SSLSessionCache</KEYWORD2>
+ <KEYWORD2>SSLSessionCacheTimeout</KEYWORD2>
+ <KEYWORD2>SSLVerifyClient</KEYWORD2>
+ <KEYWORD2>SSLVerifyDepth</KEYWORD2>
+ <KEYWORD2>Satisfy</KEYWORD2>
+ <KEYWORD2>ScoreBoardFile</KEYWORD2>
+ <KEYWORD2>Script</KEYWORD2>
+ <KEYWORD2>ScriptAlias</KEYWORD2>
+ <KEYWORD2>ScriptAliasMatch</KEYWORD2>
+ <KEYWORD2>ScriptInterpreterSource</KEYWORD2>
+ <KEYWORD2>ScriptLog</KEYWORD2>
+ <KEYWORD2>ScriptLogBuffer</KEYWORD2>
+ <KEYWORD2>ScriptLogLength</KEYWORD2>
+ <KEYWORD2>ScriptSock</KEYWORD2>
+ <KEYWORD2>SecureListen</KEYWORD2>
+ <KEYWORD2>SendBufferSize</KEYWORD2>
+ <KEYWORD2>ServerAdmin</KEYWORD2>
+ <KEYWORD2>ServerLimit</KEYWORD2>
+ <KEYWORD2>ServerName</KEYWORD2>
+ <KEYWORD2>ServerRoot</KEYWORD2>
+ <KEYWORD2>ServerSignature</KEYWORD2>
+ <KEYWORD2>ServerTokens</KEYWORD2>
+ <KEYWORD2>SetEnv</KEYWORD2>
+ <KEYWORD2>SetEnvIf</KEYWORD2>
+ <KEYWORD2>SetEnvIfNoCase</KEYWORD2>
+ <KEYWORD2>SetHandler</KEYWORD2>
+ <KEYWORD2>SetInputFilter</KEYWORD2>
+ <KEYWORD2>SetOutputFilter</KEYWORD2>
+ <KEYWORD2>StartServers</KEYWORD2>
+ <KEYWORD2>StartThreads</KEYWORD2>
+ <KEYWORD2>SuexecUserGroup</KEYWORD2>
+ <KEYWORD2>ThreadLimit</KEYWORD2>
+ <KEYWORD2>ThreadStackSize</KEYWORD2>
+ <KEYWORD2>ThreadsPerChild</KEYWORD2>
+ <KEYWORD2>TimeOut</KEYWORD2>
+ <KEYWORD2>TransferLog</KEYWORD2>
+ <KEYWORD2>TypesConfig</KEYWORD2>
+ <KEYWORD2>UnsetEnv</KEYWORD2>
+ <KEYWORD2>UseCanonicalName</KEYWORD2>
+ <KEYWORD2>User</KEYWORD2>
+ <KEYWORD2>UserDir</KEYWORD2>
+ <KEYWORD2>VirtualDocumentRoot</KEYWORD2>
+ <KEYWORD2>VirtualDocumentRootIP</KEYWORD2>
+ <KEYWORD2>VirtualScriptAlias</KEYWORD2>
+ <KEYWORD2>VirtualScriptAliasIP</KEYWORD2>
+ <KEYWORD2>XBitHack</KEYWORD2>
+
+ <!-- Apache 1.x -->
+ <KEYWORD4>AddModule</KEYWORD4>
+ <KEYWORD4>ClearModuleList</KEYWORD4>
+
+ <!-- Subversion directives -->
+ <KEYWORD3>SVNPath</KEYWORD3>
+ <KEYWORD3>SVNParentPath</KEYWORD3>
+ <KEYWORD3>SVNIndexXSLT</KEYWORD3>
+
+ <!-- mod_python directives -->
+ <KEYWORD3>PythonHandler</KEYWORD3>
+ <KEYWORD3>PythonDebug</KEYWORD3>
+
+ <LITERAL2>All</LITERAL2>
+ <LITERAL2>ExecCGI</LITERAL2>
+ <LITERAL2>FollowSymLinks</LITERAL2>
+ <LITERAL2>Includes</LITERAL2>
+ <LITERAL2>IncludesNOEXEC</LITERAL2>
+ <LITERAL2>Indexes</LITERAL2>
+ <LITERAL2>MultiViews</LITERAL2>
+ <LITERAL2>None</LITERAL2>
+ <LITERAL2>Off</LITERAL2>
+ <LITERAL2>On</LITERAL2>
+ <LITERAL2>SymLinksIfOwnerMatch</LITERAL2>
+ <LITERAL2>from</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="VHOST" DEFAULT="NULL" IGNORE_CASE="TRUE">
+
+ <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
+
+ <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
+ <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
+ <END><![CDATA[</$1>]]></END>
+ </SPAN_REGEXP>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <KEYWORD2>AcceptMutex</KEYWORD2>
+ <KEYWORD2>AcceptPathInfo</KEYWORD2>
+ <KEYWORD2>AccessFileName</KEYWORD2>
+ <KEYWORD2>Action</KEYWORD2>
+ <KEYWORD2>AddAlt</KEYWORD2>
+ <KEYWORD2>AddAltByEncoding</KEYWORD2>
+ <KEYWORD2>AddAltByType</KEYWORD2>
+ <KEYWORD2>AddCharset</KEYWORD2>
+ <KEYWORD2>AddDefaultCharset</KEYWORD2>
+ <KEYWORD2>AddDescription</KEYWORD2>
+ <KEYWORD2>AddEncoding</KEYWORD2>
+ <KEYWORD2>AddHandler</KEYWORD2>
+ <KEYWORD2>AddIcon</KEYWORD2>
+ <KEYWORD2>AddIconByEncoding</KEYWORD2>
+ <KEYWORD2>AddIconByType</KEYWORD2>
+ <KEYWORD2>AddInputFilter</KEYWORD2>
+ <KEYWORD2>AddLanguage</KEYWORD2>
+ <KEYWORD2>AddModuleInfo</KEYWORD2>
+ <KEYWORD2>AddOutputFilter</KEYWORD2>
+ <KEYWORD2>AddOutputFilterByType</KEYWORD2>
+ <KEYWORD2>AddType</KEYWORD2>
+ <KEYWORD2>Alias</KEYWORD2>
+ <KEYWORD2>AliasMatch</KEYWORD2>
+ <KEYWORD2>AllowCONNECT</KEYWORD2>
+ <KEYWORD2>AllowEncodedSlashes</KEYWORD2>
+ <KEYWORD2>AssignUserID</KEYWORD2>
+ <KEYWORD2>AuthDigestNcCheck</KEYWORD2>
+ <KEYWORD2>AuthDigestShmemSize</KEYWORD2>
+ <KEYWORD2>AuthLDAPCharsetConfig</KEYWORD2>
+ <KEYWORD2>BS2000Account</KEYWORD2>
+ <KEYWORD2>BrowserMatch</KEYWORD2>
+ <KEYWORD2>BrowserMatchNoCase</KEYWORD2>
+ <KEYWORD2>CacheDefaultExpire</KEYWORD2>
+ <KEYWORD2>CacheDirLength</KEYWORD2>
+ <KEYWORD2>CacheDirLevels</KEYWORD2>
+ <KEYWORD2>CacheDisable</KEYWORD2>
+ <KEYWORD2>CacheEnable</KEYWORD2>
+ <KEYWORD2>CacheExpiryCheck</KEYWORD2>
+ <KEYWORD2>CacheFile</KEYWORD2>
+ <KEYWORD2>CacheForceCompletion</KEYWORD2>
+ <KEYWORD2>CacheGcClean</KEYWORD2>
+ <KEYWORD2>CacheGcDaily</KEYWORD2>
+ <KEYWORD2>CacheGcInterval</KEYWORD2>
+ <KEYWORD2>CacheGcMemUsage</KEYWORD2>
+ <KEYWORD2>CacheGcUnused</KEYWORD2>
+ <KEYWORD2>CacheIgnoreCacheControl</KEYWORD2>
+ <KEYWORD2>CacheIgnoreNoLastMod</KEYWORD2>
+ <KEYWORD2>CacheLastModifiedFactor</KEYWORD2>
+ <KEYWORD2>CacheMaxExpire</KEYWORD2>
+ <KEYWORD2>CacheMaxFileSize</KEYWORD2>
+ <KEYWORD2>CacheMinFileSize</KEYWORD2>
+ <KEYWORD2>CacheNegotiatedDocs</KEYWORD2>
+ <KEYWORD2>CacheRoot</KEYWORD2>
+ <KEYWORD2>CacheSize</KEYWORD2>
+ <KEYWORD2>CacheTimeMargin</KEYWORD2>
+ <KEYWORD2>CharsetDefault</KEYWORD2>
+ <KEYWORD2>CharsetOptions</KEYWORD2>
+ <KEYWORD2>CharsetSourceEnc</KEYWORD2>
+ <KEYWORD2>CheckSpelling</KEYWORD2>
+ <KEYWORD2>ChildPerUserID</KEYWORD2>
+ <KEYWORD2>ContentDigest</KEYWORD2>
+ <KEYWORD2>CookieDomain</KEYWORD2>
+ <KEYWORD2>CookieExpires</KEYWORD2>
+ <KEYWORD2>CookieLog</KEYWORD2>
+ <KEYWORD2>CookieName</KEYWORD2>
+ <KEYWORD2>CookieStyle</KEYWORD2>
+ <KEYWORD2>CookieTracking</KEYWORD2>
+ <KEYWORD2>CoreDumpDirectory</KEYWORD2>
+ <KEYWORD2>CustomLog</KEYWORD2>
+ <KEYWORD2>DavDepthInfinity</KEYWORD2>
+ <KEYWORD2>DavLockDB</KEYWORD2>
+ <KEYWORD2>DavMinTimeout</KEYWORD2>
+ <KEYWORD2>DefaultIcon</KEYWORD2>
+ <KEYWORD2>DefaultLanguage</KEYWORD2>
+ <KEYWORD2>DefaultType</KEYWORD2>
+ <KEYWORD2>DeflateBufferSize</KEYWORD2>
+ <KEYWORD2>DeflateCompressionLevel</KEYWORD2>
+ <KEYWORD2>DeflateFilterNote</KEYWORD2>
+ <KEYWORD2>DeflateMemLevel</KEYWORD2>
+ <KEYWORD2>DeflateWindowSize</KEYWORD2>
+ <KEYWORD2>DirectoryIndex</KEYWORD2>
+ <KEYWORD1>DirectorySlash</KEYWORD1>
+ <KEYWORD2>DocumentRoot</KEYWORD2>
+ <KEYWORD2>EnableMMAP</KEYWORD2>
+ <KEYWORD2>EnableSendfile</KEYWORD2>
+ <KEYWORD2>ErrorDocument</KEYWORD2>
+ <KEYWORD2>ErrorLog</KEYWORD2>
+ <KEYWORD2>Example</KEYWORD2>
+ <KEYWORD2>ExpiresActive</KEYWORD2>
+ <KEYWORD2>ExpiresByType</KEYWORD2>
+ <KEYWORD2>ExpiresDefault</KEYWORD2>
+ <KEYWORD2>ExtFilterDefine</KEYWORD2>
+ <KEYWORD2>ExtendedStatus</KEYWORD2>
+ <KEYWORD2>FileETag</KEYWORD2>
+ <KEYWORD2>ForceLanguagePriority</KEYWORD2>
+ <KEYWORD2>ForensicLog</KEYWORD2>
+ <KEYWORD2>Group</KEYWORD2>
+ <KEYWORD2>Header</KEYWORD2>
+ <KEYWORD2>HeaderName</KEYWORD2>
+ <KEYWORD2>HostnameLookups</KEYWORD2>
+ <KEYWORD2>ISAPIAppendLogToErrors</KEYWORD2>
+ <KEYWORD2>ISAPIAppendLogToQuery</KEYWORD2>
+ <KEYWORD2>ISAPICacheFile</KEYWORD2>
+ <KEYWORD2>ISAPIFakeAsync</KEYWORD2>
+ <KEYWORD2>ISAPILogNotSupported</KEYWORD2>
+ <KEYWORD2>ISAPIReadAheadBuffer</KEYWORD2>
+ <KEYWORD2>IdentityCheck</KEYWORD2>
+ <KEYWORD2>ImapBase</KEYWORD2>
+ <KEYWORD2>ImapDefault</KEYWORD2>
+ <KEYWORD2>ImapMenu</KEYWORD2>
+ <KEYWORD2>Include</KEYWORD2>
+ <KEYWORD2>IndexIgnore</KEYWORD2>
+ <KEYWORD2>IndexOptions</KEYWORD2>
+ <KEYWORD2>IndexOrderDefault</KEYWORD2>
+ <KEYWORD2>JkMount</KEYWORD2>
+ <KEYWORD2>KeepAlive</KEYWORD2>
+ <KEYWORD2>KeepAliveTimeout</KEYWORD2>
+ <KEYWORD2>LDAPCacheEntries</KEYWORD2>
+ <KEYWORD2>LDAPCacheTTL</KEYWORD2>
+ <KEYWORD2>LDAPOpCacheEntries</KEYWORD2>
+ <KEYWORD2>LDAPOpCacheTTL</KEYWORD2>
+ <KEYWORD2>LDAPSharedCacheSize</KEYWORD2>
+ <KEYWORD2>LDAPTrustedCA</KEYWORD2>
+ <KEYWORD2>LDAPTrustedCAType</KEYWORD2>
+ <KEYWORD2>LanguagePriority</KEYWORD2>
+ <KEYWORD2>LimitInternalRecursion</KEYWORD2>
+ <KEYWORD2>LimitRequestBody</KEYWORD2>
+ <KEYWORD2>LimitRequestFields</KEYWORD2>
+ <KEYWORD2>LimitRequestFieldsize</KEYWORD2>
+ <KEYWORD2>LimitRequestLine</KEYWORD2>
+ <KEYWORD2>LimitXMLRequestBody</KEYWORD2>
+ <KEYWORD2>Listen</KEYWORD2>
+ <KEYWORD2>ListenBacklog</KEYWORD2>
+ <KEYWORD2>LoadFile</KEYWORD2>
+ <KEYWORD2>LoadModule</KEYWORD2>
+ <KEYWORD2>LockFile</KEYWORD2>
+ <KEYWORD2>LogFormat</KEYWORD2>
+ <KEYWORD2>LogLevel</KEYWORD2>
+ <KEYWORD2>MCacheMaxObjectCount</KEYWORD2>
+ <KEYWORD2>MCacheMaxObjectSize</KEYWORD2>
+ <KEYWORD2>MCacheMaxStreamingBuffer</KEYWORD2>
+ <KEYWORD2>MCacheMinObjectSize</KEYWORD2>
+ <KEYWORD2>MCacheRemovalAlgorithm</KEYWORD2>
+ <KEYWORD2>MCacheSize</KEYWORD2>
+ <KEYWORD2>MMapFile</KEYWORD2>
+ <KEYWORD2>MaxClients</KEYWORD2>
+ <KEYWORD2>MaxKeepAliveRequests</KEYWORD2>
+ <KEYWORD2>MaxMemFree</KEYWORD2>
+ <KEYWORD2>MaxRequestsPerChild</KEYWORD2>
+ <KEYWORD2>MaxRequestsPerThread</KEYWORD2>
+ <KEYWORD2>MaxSpareServers</KEYWORD2>
+ <KEYWORD2>MaxSpareThreads</KEYWORD2>
+ <KEYWORD2>MaxThreads</KEYWORD2>
+ <KEYWORD2>MaxThreadsPerChild</KEYWORD2>
+ <KEYWORD2>MetaDir</KEYWORD2>
+ <KEYWORD2>MetaFiles</KEYWORD2>
+ <KEYWORD2>MetaSuffix</KEYWORD2>
+ <KEYWORD2>MimeMagicFile</KEYWORD2>
+ <KEYWORD2>MinSpareServers</KEYWORD2>
+ <KEYWORD2>MinSpareThreads</KEYWORD2>
+ <KEYWORD2>MultiviewsMatch</KEYWORD2>
+ <KEYWORD2>NWSSLTrustedCerts</KEYWORD2>
+ <KEYWORD2>NameVirtualHost</KEYWORD2>
+ <KEYWORD2>NoProxy</KEYWORD2>
+ <KEYWORD2>NumServers</KEYWORD2>
+ <KEYWORD2>Options</KEYWORD2>
+ <KEYWORD2>PassEnv</KEYWORD2>
+ <KEYWORD2>PidFile</KEYWORD2>
+ <KEYWORD2>ProtocolEcho</KEYWORD2>
+ <KEYWORD2>ProxyBadHeader</KEYWORD2>
+ <KEYWORD2>ProxyBlock</KEYWORD2>
+ <KEYWORD2>ProxyDomain</KEYWORD2>
+ <KEYWORD2>ProxyErrorOverride</KEYWORD2>
+ <KEYWORD2>ProxyIOBufferSize</KEYWORD2>
+ <KEYWORD2>ProxyMaxForwards</KEYWORD2>
+ <KEYWORD2>ProxyPass</KEYWORD2>
+ <KEYWORD2>ProxyPassReverse</KEYWORD2>
+ <KEYWORD2>ProxyPreserveHost</KEYWORD2>
+ <KEYWORD2>ProxyReceiveBufferSize</KEYWORD2>
+ <KEYWORD2>ProxyRemote</KEYWORD2>
+ <KEYWORD2>ProxyRemoteMatch</KEYWORD2>
+ <KEYWORD2>ProxyRequests</KEYWORD2>
+ <KEYWORD2>ProxyTimeout</KEYWORD2>
+ <KEYWORD2>ProxyVia</KEYWORD2>
+ <KEYWORD2>RLimitCPU</KEYWORD2>
+ <KEYWORD2>RLimitMEM</KEYWORD2>
+ <KEYWORD2>RLimitNPROC</KEYWORD2>
+ <KEYWORD2>ReadmeName</KEYWORD2>
+ <KEYWORD2>Redirect</KEYWORD2>
+ <KEYWORD2>RedirectMatch</KEYWORD2>
+ <KEYWORD2>RedirectPermanent</KEYWORD2>
+ <KEYWORD2>RedirectTemp</KEYWORD2>
+ <KEYWORD2>RemoveCharset</KEYWORD2>
+ <KEYWORD2>RemoveEncoding</KEYWORD2>
+ <KEYWORD2>RemoveHandler</KEYWORD2>
+ <KEYWORD2>RemoveInputFilter</KEYWORD2>
+ <KEYWORD2>RemoveLanguage</KEYWORD2>
+ <KEYWORD2>RemoveOutputFilter</KEYWORD2>
+ <KEYWORD2>RemoveType</KEYWORD2>
+ <KEYWORD2>RequestHeader</KEYWORD2>
+ <KEYWORD2>RewriteBase</KEYWORD2>
+ <KEYWORD2>RewriteCond</KEYWORD2>
+ <KEYWORD2>RewriteEngine</KEYWORD2>
+ <KEYWORD2>RewriteLock</KEYWORD2>
+ <KEYWORD2>RewriteLog</KEYWORD2>
+ <KEYWORD2>RewriteLogLevel</KEYWORD2>
+ <KEYWORD2>RewriteMap</KEYWORD2>
+ <KEYWORD2>RewriteOptions</KEYWORD2>
+ <KEYWORD2>RewriteRule</KEYWORD2>
+ <KEYWORD2>SSIEndTag</KEYWORD2>
+ <KEYWORD2>SSIErrorMsg</KEYWORD2>
+ <KEYWORD2>SSIStartTag</KEYWORD2>
+ <KEYWORD2>SSITimeFormat</KEYWORD2>
+ <KEYWORD2>SSIUndefinedEcho</KEYWORD2>
+ <KEYWORD2>SSLCACertificateFile</KEYWORD2>
+ <KEYWORD2>SSLCACertificatePath</KEYWORD2>
+ <KEYWORD2>SSLCARevocationFile</KEYWORD2>
+ <KEYWORD2>SSLCARevocationPath</KEYWORD2>
+ <KEYWORD2>SSLCertificateChainFile</KEYWORD2>
+ <KEYWORD2>SSLCertificateFile</KEYWORD2>
+ <KEYWORD2>SSLCertificateKeyFile</KEYWORD2>
+ <KEYWORD2>SSLCipherSuite</KEYWORD2>
+ <KEYWORD2>SSLEngine</KEYWORD2>
+ <KEYWORD2>SSLMutex</KEYWORD2>
+ <KEYWORD2>SSLOptions</KEYWORD2>
+ <KEYWORD2>SSLPassPhraseDialog</KEYWORD2>
+ <KEYWORD2>SSLProtocol</KEYWORD2>
+ <KEYWORD2>SSLProxyCACertificateFile</KEYWORD2>
+ <KEYWORD2>SSLProxyCACertificatePath</KEYWORD2>
+ <KEYWORD2>SSLProxyCARevocationFile</KEYWORD2>
+ <KEYWORD2>SSLProxyCARevocationPath</KEYWORD2>
+ <KEYWORD2>SSLProxyCipherSuite</KEYWORD2>
+ <KEYWORD2>SSLProxyEngine</KEYWORD2>
+ <KEYWORD2>SSLProxyMachineCertificateFile</KEYWORD2>
+ <KEYWORD2>SSLProxyMachineCertificatePath</KEYWORD2>
+ <KEYWORD2>SSLProxyProtocol</KEYWORD2>
+ <KEYWORD2>SSLProxyVerify</KEYWORD2>
+ <KEYWORD2>SSLProxyVerifyDepth</KEYWORD2>
+ <KEYWORD2>SSLRandomSeed</KEYWORD2>
+ <KEYWORD2>SSLSessionCache</KEYWORD2>
+ <KEYWORD2>SSLSessionCacheTimeout</KEYWORD2>
+ <KEYWORD2>SSLVerifyClient</KEYWORD2>
+ <KEYWORD2>SSLVerifyDepth</KEYWORD2>
+ <KEYWORD2>ScoreBoardFile</KEYWORD2>
+ <KEYWORD2>Script</KEYWORD2>
+ <KEYWORD2>ScriptAlias</KEYWORD2>
+ <KEYWORD2>ScriptAliasMatch</KEYWORD2>
+ <KEYWORD2>ScriptInterpreterSource</KEYWORD2>
+ <KEYWORD2>ScriptLog</KEYWORD2>
+ <KEYWORD2>ScriptLogBuffer</KEYWORD2>
+ <KEYWORD2>ScriptLogLength</KEYWORD2>
+ <KEYWORD2>ScriptSock</KEYWORD2>
+ <KEYWORD2>SecureListen</KEYWORD2>
+ <KEYWORD2>SendBufferSize</KEYWORD2>
+ <KEYWORD2>ServerAdmin</KEYWORD2>
+ <KEYWORD2>ServerAlias</KEYWORD2>
+ <KEYWORD2>ServerLimit</KEYWORD2>
+ <KEYWORD2>ServerName</KEYWORD2>
+ <KEYWORD2>ServerPath</KEYWORD2>
+ <KEYWORD2>ServerRoot</KEYWORD2>
+ <KEYWORD2>ServerSignature</KEYWORD2>
+ <KEYWORD2>ServerTokens</KEYWORD2>
+ <KEYWORD2>SetEnv</KEYWORD2>
+ <KEYWORD2>SetEnvIf</KEYWORD2>
+ <KEYWORD2>SetEnvIfNoCase</KEYWORD2>
+ <KEYWORD2>SetHandler</KEYWORD2>
+ <KEYWORD2>SetInputFilter</KEYWORD2>
+ <KEYWORD2>SetOutputFilter</KEYWORD2>
+ <KEYWORD2>StartServers</KEYWORD2>
+ <KEYWORD2>StartThreads</KEYWORD2>
+ <KEYWORD2>SuexecUserGroup</KEYWORD2>
+ <KEYWORD2>ThreadLimit</KEYWORD2>
+ <KEYWORD2>ThreadStackSize</KEYWORD2>
+ <KEYWORD2>ThreadsPerChild</KEYWORD2>
+ <KEYWORD2>TimeOut</KEYWORD2>
+ <KEYWORD2>TransferLog</KEYWORD2>
+ <KEYWORD2>TypesConfig</KEYWORD2>
+ <KEYWORD2>UnsetEnv</KEYWORD2>
+ <KEYWORD2>UseCanonicalName</KEYWORD2>
+ <KEYWORD2>User</KEYWORD2>
+ <KEYWORD2>UserDir</KEYWORD2>
+ <KEYWORD2>VirtualDocumentRoot</KEYWORD2>
+ <KEYWORD2>VirtualDocumentRootIP</KEYWORD2>
+ <KEYWORD2>VirtualScriptAlias</KEYWORD2>
+ <KEYWORD2>VirtualScriptAliasIP</KEYWORD2>
+ <KEYWORD2>XBitHack</KEYWORD2>
+
+ <LITERAL2>Off</LITERAL2>
+ <LITERAL2>On</LITERAL2>
+ <LITERAL2>None</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/apdl.xml b/jEdit/modes/apdl.xml
index d66f8bf..213a532 100644
--- a/jEdit/modes/apdl.xml
+++ b/jEdit/modes/apdl.xml
@@ -1,7536 +1,7536 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-
- Version 0.9.8 - generated by Randolf Mock on 11/22/2003
- Randolf.Mock at siemens.com
-
- <KEYWORD1>: ANSYS commands
- <KEYWORD2>: abbreviated *get commands
- <KEYWORD3>: ANSYS command options
-
--->
-
-<!-- The keywords and functions defined here are those of ANSYS 5.7 -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="!" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
-
- <!-- labels - eg :test -->
- <EOL_SPAN TYPE="LABEL" AT_LINE_START="TRUE">:</EOL_SPAN>
-
- <!-- comments -->
- <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
-
- <!-- literals -->
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
-<!-- Special treatment of the ANSYS commands
- beginning with a '/' or '*' character -->
-
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ABBR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ABB</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*AFUN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*AFU</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ASK</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFCLOS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFOPEN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFWRITE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFW</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CREATE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CRE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CYCLE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CYC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*DEL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*DIM</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*DO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ELSEIF</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ELSE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ENDDO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ENDIF</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*END</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*EVAL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*EVA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*EXIT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*EXI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*GET</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*GO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*IF</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*LIST</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*LIS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MFOURI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MFO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MFUN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MFU</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MOONEY</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MOO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MOPER</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MOP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MSG</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*REPEAT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*REP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*SET</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*STATUS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*STA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*TREAD</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*TRE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ULIB</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ULI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*USE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VABS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VAB</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VCOL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VCO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VCUM</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VCU</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VEDIT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VED</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFACT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFILL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFUN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFU</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VGET</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VGE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VITRP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VIT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VLEN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VLE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VMASK</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VMA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VOPER</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VOP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VPLOT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VPL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VPUT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VPU</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VREAD</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VRE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VSCFUN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VSC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VSTAT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VST</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VWRITE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VWR</SEQ>
-
-
-
-
-
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANFILE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANF</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANGLE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANG</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANNOT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANUM</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANU</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ASSIGN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ASS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUTO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUX15</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUX2</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUX</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AXLAB</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AXL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/BATCH</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/BAT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLABEL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLEAR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLOG</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CMAP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CMA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COLOR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COM</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CONFIG</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CONTOUR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CON</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COPY</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CPLANE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CPL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CTYPE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CTY</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CVAL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CVA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DELETE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DEL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DEVDISP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DEVICE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DEV</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DIST</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DIS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DSCALE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DSC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DV3D</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DV3</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EDGE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EDG</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EFACET</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EFA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EOF</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ERASE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ERA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ESHAPE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ESH</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EXIT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EXI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EXPAND</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EXP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FACET</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FAC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FDELE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FDE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FILNAME</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FIL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FOCUS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FOC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FORMAT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FOR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FTYPE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FTY</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GCMD</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GCM</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GCOLUMN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GCO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GFILE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GFI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GFORMAT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GFO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GLINE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GLI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GMARKER</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GMA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GOLIST</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GOL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GOPR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GOP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRAPHICS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRESUME</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRID</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GROPT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRTYP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GSAVE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GSA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GST</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GTHK</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GTH</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GTYPE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GTY</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/HEADER</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/HEA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/INPUT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/INP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LARC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LAR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LIGHT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LIG</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LINE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LIN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LSPEC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LSP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LSYMBOL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LSY</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MENU</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MEN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MPLIB</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MPL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MREP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MRE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MSTART</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MST</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NERR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NER</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOERASE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOLIST</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOPR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NORMAL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NUMBER</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NUM</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/OPT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/OUTPUT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/OUt</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PAGE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PAG</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PBC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PBF</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PCIRCLE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PCI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PCOPY</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PCO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PLOPTS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PLO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMACRO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMETH</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PME</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMORE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PNUM</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PNU</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POLYGON</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POST26</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POST1</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PREP7</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PRE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSEARCH</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSF</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSPEC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSTATUS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PST</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSYMB</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSY</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PWEDGE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PWE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/QUIT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/QUI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RATIO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RAT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RENAME</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/REN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/REPLOT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/REP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RESET</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RES</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RGB</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RUNST</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RUN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SECLIB</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SEC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SEG</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHADE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHOWDISP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHOW</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHRINK</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHR</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SOLU</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SOL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SSCALE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SSC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/STATUS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/STA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/STITLE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/STI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SYP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SYS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TITLE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TIT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TLABEL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TLA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TRIAD</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TRI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TRLCY</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TRL</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TSPEC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TSP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TYPE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TYP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UCMD</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UCM</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UIS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UNITS</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UNI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/USER</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/USE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VCONE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VCO</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VIEW</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VIE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VSCALE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VSC</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VUP</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/WAIT</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/WAI</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/WINDOW</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/WIN</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/XRANGE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/XRA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/YRANGE</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/YRA</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ZOOM</SEQ>
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ZOO</SEQ>
-
-
-
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <!-- *msg command: variable formats -->
- <SEQ TYPE="KEYWORD2">%C</SEQ> <!-- alphamuneric format -->
- <SEQ TYPE="KEYWORD2">%G</SEQ> <!-- double precision format -->
- <SEQ TYPE="KEYWORD2">%I</SEQ> <!-- integer format -->
- <SEQ TYPE="KEYWORD2">%/</SEQ> <!-- line break -->
-
- <!-- variables -->
- <SPAN TYPE="FUNCTION" NO_LINE_BREAK="TRUE">
- <BEGIN>%</BEGIN>
- <END>%</END>
- </SPAN>
-
- <KEYWORDS>
-
-<!-- ANSYS Commands (incl. abbreviated version) -->
-
- <KEYWORD1>A</KEYWORD1>
- <KEYWORD1>AADD</KEYWORD1>
- <KEYWORD1>AADD</KEYWORD1>
- <KEYWORD1>AATT</KEYWORD1>
- <KEYWORD1>AATT</KEYWORD1>
- <KEYWORD1>ABBR</KEYWORD1>
- <KEYWORD1>ABBRES</KEYWORD1>
- <KEYWORD1>ABBS</KEYWORD1>
- <KEYWORD1>ABBSAV</KEYWORD1>
- <KEYWORD1>ABS</KEYWORD1>
- <KEYWORD1>ACCA</KEYWORD1>
- <KEYWORD1>ACCAT</KEYWORD1>
- <KEYWORD1>ACEL</KEYWORD1>
- <KEYWORD1>ACEL</KEYWORD1>
- <KEYWORD1>ACLE</KEYWORD1>
- <KEYWORD1>ACLEAR</KEYWORD1>
- <KEYWORD1>ADAP</KEYWORD1>
- <KEYWORD1>ADAPT</KEYWORD1>
- <KEYWORD1>ADD</KEYWORD1>
- <KEYWORD1>ADDA</KEYWORD1>
- <KEYWORD1>ADDAM</KEYWORD1>
- <KEYWORD1>ADEL</KEYWORD1>
- <KEYWORD1>ADELE</KEYWORD1>
- <KEYWORD1>ADGL</KEYWORD1>
- <KEYWORD1>ADGL</KEYWORD1>
- <KEYWORD1>ADRA</KEYWORD1>
- <KEYWORD1>ADRAG</KEYWORD1>
- <KEYWORD1>AFIL</KEYWORD1>
- <KEYWORD1>AFILLT</KEYWORD1>
- <KEYWORD1>AFLI</KEYWORD1>
- <KEYWORD1>AFLIST</KEYWORD1>
- <KEYWORD1>AFSU</KEYWORD1>
- <KEYWORD1>AFSURF</KEYWORD1>
- <KEYWORD1>AGEN</KEYWORD1>
- <KEYWORD1>AGEN</KEYWORD1>
- <KEYWORD1>AGLU</KEYWORD1>
- <KEYWORD1>AGLUE</KEYWORD1>
- <KEYWORD1>AINA</KEYWORD1>
- <KEYWORD1>AINA</KEYWORD1>
- <KEYWORD1>AINP</KEYWORD1>
- <KEYWORD1>AINP</KEYWORD1>
- <KEYWORD1>AINV</KEYWORD1>
- <KEYWORD1>AINV</KEYWORD1>
- <KEYWORD1>AL</KEYWORD1>
- <KEYWORD1>ALIS</KEYWORD1>
- <KEYWORD1>ALIST</KEYWORD1>
- <KEYWORD1>ALLS</KEYWORD1>
- <KEYWORD1>ALLSEL</KEYWORD1>
- <KEYWORD1>ALPF</KEYWORD1>
- <KEYWORD1>ALPFILL</KEYWORD1>
- <KEYWORD1>ALPH</KEYWORD1>
- <KEYWORD1>ALPHAD</KEYWORD1>
- <KEYWORD1>AMAP</KEYWORD1>
- <KEYWORD1>AMAP</KEYWORD1>
- <KEYWORD1>AMES</KEYWORD1>
- <KEYWORD1>AMESH</KEYWORD1>
- <KEYWORD1>ANCN</KEYWORD1>
- <KEYWORD1>ANCNTR</KEYWORD1>
- <KEYWORD1>ANCU</KEYWORD1>
- <KEYWORD1>ANCUT</KEYWORD1>
- <KEYWORD1>ANDA</KEYWORD1>
- <KEYWORD1>ANDATA</KEYWORD1>
- <KEYWORD1>ANDS</KEYWORD1>
- <KEYWORD1>ANDSCL</KEYWORD1>
- <KEYWORD1>ANDY</KEYWORD1>
- <KEYWORD1>ANDYNA</KEYWORD1>
- <KEYWORD1>ANFL</KEYWORD1>
- <KEYWORD1>ANFLOW</KEYWORD1>
- <KEYWORD1>ANIM</KEYWORD1>
- <KEYWORD1>ANIM</KEYWORD1>
- <KEYWORD1>ANIS</KEYWORD1>
- <KEYWORD1>ANISOS</KEYWORD1>
- <KEYWORD1>ANMO</KEYWORD1>
- <KEYWORD1>ANMODE</KEYWORD1>
- <KEYWORD1>ANOR</KEYWORD1>
- <KEYWORD1>ANORM</KEYWORD1>
- <KEYWORD1>ANTI</KEYWORD1>
- <KEYWORD1>ANTIME</KEYWORD1>
- <KEYWORD1>ANTY</KEYWORD1>
- <KEYWORD1>ANTYPE</KEYWORD1>
- <KEYWORD1>AOFF</KEYWORD1>
- <KEYWORD1>AOFFST</KEYWORD1>
- <KEYWORD1>AOVL</KEYWORD1>
- <KEYWORD1>AOVLAP</KEYWORD1>
- <KEYWORD1>APLO</KEYWORD1>
- <KEYWORD1>APLOT</KEYWORD1>
- <KEYWORD1>APPE</KEYWORD1>
- <KEYWORD1>APPEND</KEYWORD1>
- <KEYWORD1>APTN</KEYWORD1>
- <KEYWORD1>APTN</KEYWORD1>
- <KEYWORD1>ARCL</KEYWORD1>
- <KEYWORD1>ARCLEN</KEYWORD1>
- <KEYWORD1>ARCO</KEYWORD1>
- <KEYWORD1>ARCOLLAPSE</KEYWORD1>
- <KEYWORD1>ARCT</KEYWORD1>
- <KEYWORD1>ARCTRM</KEYWORD1>
- <KEYWORD1>ARDE</KEYWORD1>
- <KEYWORD1>ARDETACH</KEYWORD1>
- <KEYWORD1>AREA</KEYWORD1>
- <KEYWORD1>AREAS</KEYWORD1>
- <KEYWORD1>AREF</KEYWORD1>
- <KEYWORD1>AREFINE</KEYWORD1>
- <KEYWORD1>AREV</KEYWORD1>
- <KEYWORD1>AREVERSE</KEYWORD1>
- <KEYWORD1>ARFI</KEYWORD1>
- <KEYWORD1>ARFILL</KEYWORD1>
- <KEYWORD1>ARME</KEYWORD1>
- <KEYWORD1>ARMERGE</KEYWORD1>
- <KEYWORD1>AROT</KEYWORD1>
- <KEYWORD1>AROTAT</KEYWORD1>
- <KEYWORD1>ARSC</KEYWORD1>
- <KEYWORD1>ARSCALE</KEYWORD1>
- <KEYWORD1>ARSP</KEYWORD1>
- <KEYWORD1>ARSPLIT</KEYWORD1>
- <KEYWORD1>ARSY</KEYWORD1>
- <KEYWORD1>ARSYM</KEYWORD1>
- <KEYWORD1>ASBA</KEYWORD1>
- <KEYWORD1>ASBA</KEYWORD1>
- <KEYWORD1>ASBL</KEYWORD1>
- <KEYWORD1>ASBL</KEYWORD1>
- <KEYWORD1>ASBV</KEYWORD1>
- <KEYWORD1>ASBV</KEYWORD1>
- <KEYWORD1>ASBW</KEYWORD1>
- <KEYWORD1>ASBW</KEYWORD1>
- <KEYWORD1>ASEL</KEYWORD1>
- <KEYWORD1>ASEL</KEYWORD1>
- <KEYWORD1>ASKI</KEYWORD1>
- <KEYWORD1>ASKIN</KEYWORD1>
- <KEYWORD1>ASLL</KEYWORD1>
- <KEYWORD1>ASLL</KEYWORD1>
- <KEYWORD1>ASLV</KEYWORD1>
- <KEYWORD1>ASLV</KEYWORD1>
- <KEYWORD1>ASUB</KEYWORD1>
- <KEYWORD1>ASUB</KEYWORD1>
- <KEYWORD1>ASUM</KEYWORD1>
- <KEYWORD1>ASUM</KEYWORD1>
- <KEYWORD1>ATAN</KEYWORD1>
- <KEYWORD1>ATAN</KEYWORD1>
- <KEYWORD1>ATRA</KEYWORD1>
- <KEYWORD1>ATRAN</KEYWORD1>
- <KEYWORD1>ATYP</KEYWORD1>
- <KEYWORD1>ATYPE</KEYWORD1>
- <KEYWORD1>AUTO</KEYWORD1>
- <KEYWORD1>AUTOTS</KEYWORD1>
- <KEYWORD1>AVPR</KEYWORD1>
- <KEYWORD1>AVPRIN</KEYWORD1>
- <KEYWORD1>AVRE</KEYWORD1>
- <KEYWORD1>AVRES</KEYWORD1>
- <KEYWORD1>BELL</KEYWORD1>
- <KEYWORD1>BELLOW</KEYWORD1>
- <KEYWORD1>BEND</KEYWORD1>
- <KEYWORD1>BEND</KEYWORD1>
- <KEYWORD1>BETA</KEYWORD1>
- <KEYWORD1>BETAD</KEYWORD1>
- <KEYWORD1>BF</KEYWORD1>
- <KEYWORD1>BFA</KEYWORD1>
- <KEYWORD1>BFAD</KEYWORD1>
- <KEYWORD1>BFADELE</KEYWORD1>
- <KEYWORD1>BFAL</KEYWORD1>
- <KEYWORD1>BFALIST</KEYWORD1>
- <KEYWORD1>BFCU</KEYWORD1>
- <KEYWORD1>BFCUM</KEYWORD1>
- <KEYWORD1>BFDE</KEYWORD1>
- <KEYWORD1>BFDELE</KEYWORD1>
- <KEYWORD1>BFE</KEYWORD1>
- <KEYWORD1>BFEC</KEYWORD1>
- <KEYWORD1>BFECUM</KEYWORD1>
- <KEYWORD1>BFED</KEYWORD1>
- <KEYWORD1>BFEDELE</KEYWORD1>
- <KEYWORD1>BFEL</KEYWORD1>
- <KEYWORD1>BFELIST</KEYWORD1>
- <KEYWORD1>BFES</KEYWORD1>
- <KEYWORD1>BFESCAL</KEYWORD1>
- <KEYWORD1>BFIN</KEYWORD1>
- <KEYWORD1>BFINT</KEYWORD1>
- <KEYWORD1>BFK</KEYWORD1>
- <KEYWORD1>BFKD</KEYWORD1>
- <KEYWORD1>BFKDELE</KEYWORD1>
- <KEYWORD1>BFKL</KEYWORD1>
- <KEYWORD1>BFKLIST</KEYWORD1>
- <KEYWORD1>BFL</KEYWORD1>
- <KEYWORD1>BFLD</KEYWORD1>
- <KEYWORD1>BFLDELE</KEYWORD1>
- <KEYWORD1>BFLI</KEYWORD1>
- <KEYWORD1>BFLIST</KEYWORD1>
- <KEYWORD1>BFLL</KEYWORD1>
- <KEYWORD1>BFLLIST</KEYWORD1>
- <KEYWORD1>BFSC</KEYWORD1>
- <KEYWORD1>BFSCALE</KEYWORD1>
- <KEYWORD1>BFTR</KEYWORD1>
- <KEYWORD1>BFTRAN</KEYWORD1>
- <KEYWORD1>BFUN</KEYWORD1>
- <KEYWORD1>BFUNIF</KEYWORD1>
- <KEYWORD1>BFV</KEYWORD1>
- <KEYWORD1>BFVD</KEYWORD1>
- <KEYWORD1>BFVDELE</KEYWORD1>
- <KEYWORD1>BFVL</KEYWORD1>
- <KEYWORD1>BFVLIST</KEYWORD1>
- <KEYWORD1>BIOO</KEYWORD1>
- <KEYWORD1>BIOOPT</KEYWORD1>
- <KEYWORD1>BIOT</KEYWORD1>
- <KEYWORD1>BIOT</KEYWORD1>
- <KEYWORD1>BLC4</KEYWORD1>
- <KEYWORD1>BLC4</KEYWORD1>
- <KEYWORD1>BLC5</KEYWORD1>
- <KEYWORD1>BLC5</KEYWORD1>
- <KEYWORD1>BLOC</KEYWORD1>
- <KEYWORD1>BLOCK</KEYWORD1>
- <KEYWORD1>BOOL</KEYWORD1>
- <KEYWORD1>BOOL</KEYWORD1>
- <KEYWORD1>BOPT</KEYWORD1>
- <KEYWORD1>BOPTN</KEYWORD1>
- <KEYWORD1>BRAN</KEYWORD1>
- <KEYWORD1>BRANCH</KEYWORD1>
- <KEYWORD1>BSPL</KEYWORD1>
- <KEYWORD1>BSPLIN</KEYWORD1>
- <KEYWORD1>BTOL</KEYWORD1>
- <KEYWORD1>BTOL</KEYWORD1>
- <KEYWORD1>BUCO</KEYWORD1>
- <KEYWORD1>BUCOPT</KEYWORD1>
- <KEYWORD1>CALC</KEYWORD1>
- <KEYWORD1>CALC</KEYWORD1>
- <KEYWORD1>CBDO</KEYWORD1>
- <KEYWORD1>CBDOF</KEYWORD1>
- <KEYWORD1>CDRE</KEYWORD1>
- <KEYWORD1>CDREAD</KEYWORD1>
- <KEYWORD1>CDWR</KEYWORD1>
- <KEYWORD1>CDWRITE</KEYWORD1>
- <KEYWORD1>CE</KEYWORD1>
- <KEYWORD1>CECM</KEYWORD1>
- <KEYWORD1>CECMOD</KEYWORD1>
- <KEYWORD1>CECY</KEYWORD1>
- <KEYWORD1>CECYC</KEYWORD1>
- <KEYWORD1>CEDE</KEYWORD1>
- <KEYWORD1>CEDELE</KEYWORD1>
- <KEYWORD1>CEIN</KEYWORD1>
- <KEYWORD1>CEINTF</KEYWORD1>
- <KEYWORD1>CELI</KEYWORD1>
- <KEYWORD1>CELIST</KEYWORD1>
- <KEYWORD1>CENT</KEYWORD1>
- <KEYWORD1>CENTER</KEYWORD1>
- <KEYWORD1>CEQN</KEYWORD1>
- <KEYWORD1>CEQN</KEYWORD1>
- <KEYWORD1>CERI</KEYWORD1>
- <KEYWORD1>CERIG</KEYWORD1>
- <KEYWORD1>CESG</KEYWORD1>
- <KEYWORD1>CESGEN</KEYWORD1>
- <KEYWORD1>CFAC</KEYWORD1>
- <KEYWORD1>CFACT</KEYWORD1>
- <KEYWORD1>CGLO</KEYWORD1>
- <KEYWORD1>CGLOC</KEYWORD1>
- <KEYWORD1>CGOM</KEYWORD1>
- <KEYWORD1>CGOMGA</KEYWORD1>
- <KEYWORD1>CHEC</KEYWORD1>
- <KEYWORD1>CHECK</KEYWORD1>
- <KEYWORD1>CHKM</KEYWORD1>
- <KEYWORD1>CHKMSH</KEYWORD1>
- <KEYWORD1>CIRC</KEYWORD1>
- <KEYWORD1>CIRCLE</KEYWORD1>
- <KEYWORD1>CLOC</KEYWORD1>
- <KEYWORD1>CLOCAL</KEYWORD1>
- <KEYWORD1>CLOG</KEYWORD1>
- <KEYWORD1>CLOG</KEYWORD1>
- <KEYWORD1>CLRM</KEYWORD1>
- <KEYWORD1>CLRMSHLN</KEYWORD1>
- <KEYWORD1>CM</KEYWORD1>
- <KEYWORD1>CMDE</KEYWORD1>
- <KEYWORD1>CMDELE</KEYWORD1>
- <KEYWORD1>CMED</KEYWORD1>
- <KEYWORD1>CMEDIT</KEYWORD1>
- <KEYWORD1>CMGR</KEYWORD1>
- <KEYWORD1>CMGRP</KEYWORD1>
- <KEYWORD1>CMLI</KEYWORD1>
- <KEYWORD1>CMLIST</KEYWORD1>
- <KEYWORD1>CMPL</KEYWORD1>
- <KEYWORD1>CMPLOT</KEYWORD1>
- <KEYWORD1>CMSE</KEYWORD1>
- <KEYWORD1>CMSEL</KEYWORD1>
- <KEYWORD1>CNVT</KEYWORD1>
- <KEYWORD1>CNVTOL</KEYWORD1>
- <KEYWORD1>CON4</KEYWORD1>
- <KEYWORD1>CON4</KEYWORD1>
- <KEYWORD1>CONE</KEYWORD1>
- <KEYWORD1>CONE</KEYWORD1>
- <KEYWORD1>CONJ</KEYWORD1>
- <KEYWORD1>CONJUG</KEYWORD1>
- <KEYWORD1>COUP</KEYWORD1>
- <KEYWORD1>COUPLE</KEYWORD1>
- <KEYWORD1>COVA</KEYWORD1>
- <KEYWORD1>COVAL</KEYWORD1>
- <KEYWORD1>CP</KEYWORD1>
- <KEYWORD1>CPDE</KEYWORD1>
- <KEYWORD1>CPDELE</KEYWORD1>
- <KEYWORD1>CPIN</KEYWORD1>
- <KEYWORD1>CPINTF</KEYWORD1>
- <KEYWORD1>CPLG</KEYWORD1>
- <KEYWORD1>CPLGEN</KEYWORD1>
- <KEYWORD1>CPLI</KEYWORD1>
- <KEYWORD1>CPLIST</KEYWORD1>
- <KEYWORD1>CPNG</KEYWORD1>
- <KEYWORD1>CPNGEN</KEYWORD1>
- <KEYWORD1>CPSG</KEYWORD1>
- <KEYWORD1>CPSGEN</KEYWORD1>
- <KEYWORD1>CQC</KEYWORD1>
- <KEYWORD1>CRPL</KEYWORD1>
- <KEYWORD1>CRPLIM</KEYWORD1>
- <KEYWORD1>CS</KEYWORD1>
- <KEYWORD1>CSCI</KEYWORD1>
- <KEYWORD1>CSCIR</KEYWORD1>
- <KEYWORD1>CSDE</KEYWORD1>
- <KEYWORD1>CSDELE</KEYWORD1>
- <KEYWORD1>CSKP</KEYWORD1>
- <KEYWORD1>CSKP</KEYWORD1>
- <KEYWORD1>CSLI</KEYWORD1>
- <KEYWORD1>CSLIST</KEYWORD1>
- <KEYWORD1>CSWP</KEYWORD1>
- <KEYWORD1>CSWPLA</KEYWORD1>
- <KEYWORD1>CSYS</KEYWORD1>
- <KEYWORD1>CSYS</KEYWORD1>
- <KEYWORD1>CURR2D</KEYWORD1>
- <KEYWORD1>CURR</KEYWORD1>
- <KEYWORD1>CUTC</KEYWORD1>
- <KEYWORD1>CUTCONTROL</KEYWORD1>
- <KEYWORD1>CVAR</KEYWORD1>
- <KEYWORD1>CVAR</KEYWORD1>
- <KEYWORD1>CYCG</KEYWORD1>
- <KEYWORD1>CYCGEN</KEYWORD1>
- <KEYWORD1>CYCS</KEYWORD1>
- <KEYWORD1>CYCSOL</KEYWORD1>
- <KEYWORD1>CYL4</KEYWORD1>
- <KEYWORD1>CYL4</KEYWORD1>
- <KEYWORD1>CYL5</KEYWORD1>
- <KEYWORD1>CYL5</KEYWORD1>
- <KEYWORD1>CYLI</KEYWORD1>
- <KEYWORD1>CYLIND</KEYWORD1>
- <KEYWORD1>D</KEYWORD1>
- <KEYWORD1>DA</KEYWORD1>
- <KEYWORD1>DADE</KEYWORD1>
- <KEYWORD1>DADELE</KEYWORD1>
- <KEYWORD1>DALI</KEYWORD1>
- <KEYWORD1>DALIST</KEYWORD1>
- <KEYWORD1>DATA</KEYWORD1>
- <KEYWORD1>DATA</KEYWORD1>
- <KEYWORD1>DATA</KEYWORD1>
- <KEYWORD1>DATADEF</KEYWORD1>
- <KEYWORD1>DCGO</KEYWORD1>
- <KEYWORD1>DCGOMG</KEYWORD1>
- <KEYWORD1>DCUM</KEYWORD1>
- <KEYWORD1>DCUM</KEYWORD1>
- <KEYWORD1>DDEL</KEYWORD1>
- <KEYWORD1>DDELE</KEYWORD1>
- <KEYWORD1>DEAC</KEYWORD1>
- <KEYWORD1>DEACT</KEYWORD1>
- <KEYWORD1>DEFI</KEYWORD1>
- <KEYWORD1>DEFINE</KEYWORD1>
- <KEYWORD1>DELT</KEYWORD1>
- <KEYWORD1>DELTIM</KEYWORD1>
- <KEYWORD1>DERI</KEYWORD1>
- <KEYWORD1>DERIV</KEYWORD1>
- <KEYWORD1>DESI</KEYWORD1>
- <KEYWORD1>DESIZE</KEYWORD1>
- <KEYWORD1>DESO</KEYWORD1>
- <KEYWORD1>DESOL</KEYWORD1>
- <KEYWORD1>DETA</KEYWORD1>
- <KEYWORD1>DETAB</KEYWORD1>
- <KEYWORD1>DIG</KEYWORD1>
- <KEYWORD1>DIGI</KEYWORD1>
- <KEYWORD1>DIGIT</KEYWORD1>
- <KEYWORD1>DISP</KEYWORD1>
- <KEYWORD1>DISPLAY</KEYWORD1>
- <KEYWORD1>DK</KEYWORD1>
- <KEYWORD1>DKDE</KEYWORD1>
- <KEYWORD1>DKDELE</KEYWORD1>
- <KEYWORD1>DKLI</KEYWORD1>
- <KEYWORD1>DKLIST</KEYWORD1>
- <KEYWORD1>DL</KEYWORD1>
- <KEYWORD1>DLDE</KEYWORD1>
- <KEYWORD1>DLDELE</KEYWORD1>
- <KEYWORD1>DLIS</KEYWORD1>
- <KEYWORD1>DLIST</KEYWORD1>
- <KEYWORD1>DLLI</KEYWORD1>
- <KEYWORD1>DLLIST</KEYWORD1>
- <KEYWORD1>DMOV</KEYWORD1>
- <KEYWORD1>DMOVE</KEYWORD1>
- <KEYWORD1>DMPR</KEYWORD1>
- <KEYWORD1>DMPRAT</KEYWORD1>
- <KEYWORD1>DNSO</KEYWORD1>
- <KEYWORD1>DNSOL</KEYWORD1>
- <KEYWORD1>DOF</KEYWORD1>
- <KEYWORD1>DOFS</KEYWORD1>
- <KEYWORD1>DOFSEL</KEYWORD1>
- <KEYWORD1>DOME</KEYWORD1>
- <KEYWORD1>DOMEGA</KEYWORD1>
- <KEYWORD1>DSCA</KEYWORD1>
- <KEYWORD1>DSCALE</KEYWORD1>
- <KEYWORD1>DSET</KEYWORD1>
- <KEYWORD1>DSET</KEYWORD1>
- <KEYWORD1>DSUM</KEYWORD1>
- <KEYWORD1>DSUM</KEYWORD1>
- <KEYWORD1>DSUR</KEYWORD1>
- <KEYWORD1>DSURF</KEYWORD1>
- <KEYWORD1>DSYM</KEYWORD1>
- <KEYWORD1>DSYM</KEYWORD1>
- <KEYWORD1>DSYS</KEYWORD1>
- <KEYWORD1>DSYS</KEYWORD1>
- <KEYWORD1>DTRA</KEYWORD1>
- <KEYWORD1>DTRAN</KEYWORD1>
- <KEYWORD1>DUMP</KEYWORD1>
- <KEYWORD1>DUMP</KEYWORD1>
- <KEYWORD1>DYNO</KEYWORD1>
- <KEYWORD1>DYNOPT</KEYWORD1>
- <KEYWORD1>E</KEYWORD1>
- <KEYWORD1>EALI</KEYWORD1>
- <KEYWORD1>EALIVE</KEYWORD1>
- <KEYWORD1>EDBO</KEYWORD1>
- <KEYWORD1>EDBOUND</KEYWORD1>
- <KEYWORD1>EDBV</KEYWORD1>
- <KEYWORD1>EDBVIS</KEYWORD1>
- <KEYWORD1>EDCD</KEYWORD1>
- <KEYWORD1>EDCDELE</KEYWORD1>
- <KEYWORD1>EDCG</KEYWORD1>
- <KEYWORD1>EDCGEN</KEYWORD1>
- <KEYWORD1>EDCL</KEYWORD1>
- <KEYWORD1>EDCLIST</KEYWORD1>
- <KEYWORD1>EDCO</KEYWORD1>
- <KEYWORD1>EDCONTACT</KEYWORD1>
- <KEYWORD1>EDCP</KEYWORD1>
- <KEYWORD1>EDCPU</KEYWORD1>
- <KEYWORD1>EDCR</KEYWORD1>
- <KEYWORD1>EDCRB</KEYWORD1>
- <KEYWORD1>EDCS</KEYWORD1>
- <KEYWORD1>EDCSC</KEYWORD1>
- <KEYWORD1>EDCT</KEYWORD1>
- <KEYWORD1>EDCTS</KEYWORD1>
- <KEYWORD1>EDCU</KEYWORD1>
- <KEYWORD1>EDCURVE</KEYWORD1>
- <KEYWORD1>EDDA</KEYWORD1>
- <KEYWORD1>EDDAMP</KEYWORD1>
- <KEYWORD1>EDDR</KEYWORD1>
- <KEYWORD1>EDDRELAX</KEYWORD1>
- <KEYWORD1>EDEL</KEYWORD1>
- <KEYWORD1>EDELE</KEYWORD1>
- <KEYWORD1>EDEN</KEYWORD1>
- <KEYWORD1>EDENERGY</KEYWORD1>
- <KEYWORD1>EDFP</KEYWORD1>
- <KEYWORD1>EDFPLOT</KEYWORD1>
- <KEYWORD1>EDHG</KEYWORD1>
- <KEYWORD1>EDHGLS</KEYWORD1>
- <KEYWORD1>EDHI</KEYWORD1>
- <KEYWORD1>EDHIST</KEYWORD1>
- <KEYWORD1>EDHT</KEYWORD1>
- <KEYWORD1>EDHTIME</KEYWORD1>
- <KEYWORD1>EDIN</KEYWORD1>
- <KEYWORD1>EDINT</KEYWORD1>
- <KEYWORD1>EDIV</KEYWORD1>
- <KEYWORD1>EDIVELO</KEYWORD1>
- <KEYWORD1>EDLC</KEYWORD1>
- <KEYWORD1>EDLCS</KEYWORD1>
- <KEYWORD1>EDLD</KEYWORD1>
- <KEYWORD1>EDLDPLOT</KEYWORD1>
- <KEYWORD1>EDLO</KEYWORD1>
- <KEYWORD1>EDLOAD</KEYWORD1>
- <KEYWORD1>EDMP</KEYWORD1>
- <KEYWORD1>EDMP</KEYWORD1>
- <KEYWORD1>EDND</KEYWORD1>
- <KEYWORD1>EDNDTSD</KEYWORD1>
- <KEYWORD1>EDNR</KEYWORD1>
- <KEYWORD1>EDNROT</KEYWORD1>
- <KEYWORD1>EDOP</KEYWORD1>
- <KEYWORD1>EDOPT</KEYWORD1>
- <KEYWORD1>EDOU</KEYWORD1>
- <KEYWORD1>EDOUT</KEYWORD1>
- <KEYWORD1>EDRE</KEYWORD1>
- <KEYWORD1>EDREAD</KEYWORD1>
- <KEYWORD1>EDRS</KEYWORD1>
- <KEYWORD1>EDRST</KEYWORD1>
- <KEYWORD1>EDSH</KEYWORD1>
- <KEYWORD1>EDSHELL</KEYWORD1>
- <KEYWORD1>EDSO</KEYWORD1>
- <KEYWORD1>EDSOLV</KEYWORD1>
- <KEYWORD1>EDST</KEYWORD1>
- <KEYWORD1>EDSTART</KEYWORD1>
- <KEYWORD1>EDWE</KEYWORD1>
- <KEYWORD1>EDWELD</KEYWORD1>
- <KEYWORD1>EDWR</KEYWORD1>
- <KEYWORD1>EDWRITE</KEYWORD1>
- <KEYWORD1>EGEN</KEYWORD1>
- <KEYWORD1>EGEN</KEYWORD1>
- <KEYWORD1>EINT</KEYWORD1>
- <KEYWORD1>EINTF</KEYWORD1>
- <KEYWORD1>EKIL</KEYWORD1>
- <KEYWORD1>EKILL</KEYWORD1>
- <KEYWORD1>ELEM</KEYWORD1>
- <KEYWORD1>ELEM</KEYWORD1>
- <KEYWORD1>ELIS</KEYWORD1>
- <KEYWORD1>ELIST</KEYWORD1>
- <KEYWORD1>EMAG</KEYWORD1>
- <KEYWORD1>EMAGERR</KEYWORD1>
- <KEYWORD1>EMF</KEYWORD1>
- <KEYWORD1>EMID</KEYWORD1>
- <KEYWORD1>EMID</KEYWORD1>
- <KEYWORD1>EMIS</KEYWORD1>
- <KEYWORD1>EMIS</KEYWORD1>
- <KEYWORD1>EMOD</KEYWORD1>
- <KEYWORD1>EMODIF</KEYWORD1>
- <KEYWORD1>EMOR</KEYWORD1>
- <KEYWORD1>EMORE</KEYWORD1>
- <KEYWORD1>EMSY</KEYWORD1>
- <KEYWORD1>EMSYM</KEYWORD1>
- <KEYWORD1>EMUN</KEYWORD1>
- <KEYWORD1>EMUNIT</KEYWORD1>
- <KEYWORD1>EN</KEYWORD1>
- <KEYWORD1>ENGE</KEYWORD1>
- <KEYWORD1>ENGEN</KEYWORD1>
- <KEYWORD1>ENOR</KEYWORD1>
- <KEYWORD1>ENORM</KEYWORD1>
- <KEYWORD1>ENSY</KEYWORD1>
- <KEYWORD1>ENSYM</KEYWORD1>
- <KEYWORD1>EPLO</KEYWORD1>
- <KEYWORD1>EPLOT</KEYWORD1>
- <KEYWORD1>EQSL</KEYWORD1>
- <KEYWORD1>EQSLV</KEYWORD1>
- <KEYWORD1>ERAS</KEYWORD1>
- <KEYWORD1>ERASE</KEYWORD1>
- <KEYWORD1>EREA</KEYWORD1>
- <KEYWORD1>EREAD</KEYWORD1>
- <KEYWORD1>EREF</KEYWORD1>
- <KEYWORD1>EREFINE</KEYWORD1>
- <KEYWORD1>ERES</KEYWORD1>
- <KEYWORD1>ERESX</KEYWORD1>
- <KEYWORD1>ERNO</KEYWORD1>
- <KEYWORD1>ERNORM</KEYWORD1>
- <KEYWORD1>ERRA</KEYWORD1>
- <KEYWORD1>ERRANG</KEYWORD1>
- <KEYWORD1>ESEL</KEYWORD1>
- <KEYWORD1>ESEL</KEYWORD1>
- <KEYWORD1>ESIZ</KEYWORD1>
- <KEYWORD1>ESIZE</KEYWORD1>
- <KEYWORD1>ESLA</KEYWORD1>
- <KEYWORD1>ESLA</KEYWORD1>
- <KEYWORD1>ESLL</KEYWORD1>
- <KEYWORD1>ESLL</KEYWORD1>
- <KEYWORD1>ESLN</KEYWORD1>
- <KEYWORD1>ESLN</KEYWORD1>
- <KEYWORD1>ESLV</KEYWORD1>
- <KEYWORD1>ESLV</KEYWORD1>
- <KEYWORD1>ESOL</KEYWORD1>
- <KEYWORD1>ESOL</KEYWORD1>
- <KEYWORD1>ESOR</KEYWORD1>
- <KEYWORD1>ESORT</KEYWORD1>
- <KEYWORD1>ESTI</KEYWORD1>
- <KEYWORD1>ESTIF</KEYWORD1>
- <KEYWORD1>ESUR</KEYWORD1>
- <KEYWORD1>ESURF</KEYWORD1>
- <KEYWORD1>ESYM</KEYWORD1>
- <KEYWORD1>ESYM</KEYWORD1>
- <KEYWORD1>ESYS</KEYWORD1>
- <KEYWORD1>ESYS</KEYWORD1>
- <KEYWORD1>ET</KEYWORD1>
- <KEYWORD1>ETAB</KEYWORD1>
- <KEYWORD1>ETABLE</KEYWORD1>
- <KEYWORD1>ETCH</KEYWORD1>
- <KEYWORD1>ETCHG</KEYWORD1>
- <KEYWORD1>ETDE</KEYWORD1>
- <KEYWORD1>ETDELE</KEYWORD1>
- <KEYWORD1>ETLI</KEYWORD1>
- <KEYWORD1>ETLIST</KEYWORD1>
- <KEYWORD1>ETYP</KEYWORD1>
- <KEYWORD1>ETYPE</KEYWORD1>
- <KEYWORD1>EUSO</KEYWORD1>
- <KEYWORD1>EUSORT</KEYWORD1>
- <KEYWORD1>EWRI</KEYWORD1>
- <KEYWORD1>EWRITE</KEYWORD1>
- <KEYWORD1>EXP</KEYWORD1>
- <KEYWORD1>EXPA</KEYWORD1>
- <KEYWORD1>EXPA</KEYWORD1>
- <KEYWORD1>EXPAND</KEYWORD1>
- <KEYWORD1>EXPASS</KEYWORD1>
- <KEYWORD1>EXPS</KEYWORD1>
- <KEYWORD1>EXPSOL</KEYWORD1>
- <KEYWORD1>EXTO</KEYWORD1>
- <KEYWORD1>EXTOPT</KEYWORD1>
- <KEYWORD1>EXTR</KEYWORD1>
- <KEYWORD1>EXTREM</KEYWORD1>
- <KEYWORD1>FATI</KEYWORD1>
- <KEYWORD1>FATIGUE</KEYWORD1>
- <KEYWORD1>FCUM</KEYWORD1>
- <KEYWORD1>FCUM</KEYWORD1>
- <KEYWORD1>FDEL</KEYWORD1>
- <KEYWORD1>FDELE</KEYWORD1>
- <KEYWORD1>FE</KEYWORD1>
- <KEYWORD1>FEBO</KEYWORD1>
- <KEYWORD1>FEBODY</KEYWORD1>
- <KEYWORD1>FECO</KEYWORD1>
- <KEYWORD1>FECONS</KEYWORD1>
- <KEYWORD1>FEFO</KEYWORD1>
- <KEYWORD1>FEFOR</KEYWORD1>
- <KEYWORD1>FELI</KEYWORD1>
- <KEYWORD1>FELIST</KEYWORD1>
- <KEYWORD1>FESU</KEYWORD1>
- <KEYWORD1>FESURF</KEYWORD1>
- <KEYWORD1>FILE</KEYWORD1>
- <KEYWORD1>FILE</KEYWORD1>
- <KEYWORD1>FILE</KEYWORD1>
- <KEYWORD1>FILE</KEYWORD1>
- <KEYWORD1>FILEAUX2</KEYWORD1>
- <KEYWORD1>FILEDISP</KEYWORD1>
- <KEYWORD1>FILL</KEYWORD1>
- <KEYWORD1>FILL</KEYWORD1>
- <KEYWORD1>FILL</KEYWORD1>
- <KEYWORD1>FILLDATA</KEYWORD1>
- <KEYWORD1>FINI</KEYWORD1>
- <KEYWORD1>FINISH</KEYWORD1>
- <KEYWORD1>FITE</KEYWORD1>
- <KEYWORD1>FITEM</KEYWORD1>
- <KEYWORD1>FK</KEYWORD1>
- <KEYWORD1>FKDE</KEYWORD1>
- <KEYWORD1>FKDELE</KEYWORD1>
- <KEYWORD1>FKLI</KEYWORD1>
- <KEYWORD1>FKLIST</KEYWORD1>
- <KEYWORD1>FL</KEYWORD1>
- <KEYWORD1>FLAN</KEYWORD1>
- <KEYWORD1>FLANGE</KEYWORD1>
- <KEYWORD1>FLDA</KEYWORD1>
- <KEYWORD1>FLDATA</KEYWORD1>
- <KEYWORD1>FLDATA10</KEYWORD1>
- <KEYWORD1>FLDATA11</KEYWORD1>
- <KEYWORD1>FLDATA12</KEYWORD1>
- <KEYWORD1>FLDATA13</KEYWORD1>
- <KEYWORD1>FLDATA14</KEYWORD1>
- <KEYWORD1>FLDATA15</KEYWORD1>
- <KEYWORD1>FLDATA16</KEYWORD1>
- <KEYWORD1>FLDATA17</KEYWORD1>
- <KEYWORD1>FLDATA18</KEYWORD1>
- <KEYWORD1>FLDATA19</KEYWORD1>
- <KEYWORD1>FLDATA1</KEYWORD1>
- <KEYWORD1>FLDATA20</KEYWORD1>
- <KEYWORD1>FLDATA20A</KEYWORD1>
- <KEYWORD1>FLDATA21</KEYWORD1>
- <KEYWORD1>FLDATA22</KEYWORD1>
- <KEYWORD1>FLDATA23</KEYWORD1>
- <KEYWORD1>FLDATA24</KEYWORD1>
- <KEYWORD1>FLDATA24A</KEYWORD1>
- <KEYWORD1>FLDATA24B</KEYWORD1>
- <KEYWORD1>FLDATA24C</KEYWORD1>
- <KEYWORD1>FLDATA24D</KEYWORD1>
- <KEYWORD1>FLDATA25</KEYWORD1>
- <KEYWORD1>FLDATA26</KEYWORD1>
- <KEYWORD1>FLDATA27</KEYWORD1>
- <KEYWORD1>FLDATA28</KEYWORD1>
- <KEYWORD1>FLDATA29</KEYWORD1>
- <KEYWORD1>FLDATA2</KEYWORD1>
- <KEYWORD1>FLDATA30</KEYWORD1>
- <KEYWORD1>FLDATA31</KEYWORD1>
- <KEYWORD1>FLDATA32</KEYWORD1>
- <KEYWORD1>FLDATA33</KEYWORD1>
- <KEYWORD1>FLDATA37</KEYWORD1>
- <KEYWORD1>FLDATA3</KEYWORD1>
- <KEYWORD1>FLDATA4</KEYWORD1>
- <KEYWORD1>FLDATA4A</KEYWORD1>
- <KEYWORD1>FLDATA5</KEYWORD1>
- <KEYWORD1>FLDATA6</KEYWORD1>
- <KEYWORD1>FLDATA7</KEYWORD1>
- <KEYWORD1>FLDATA8</KEYWORD1>
- <KEYWORD1>FLDATA9</KEYWORD1>
- <KEYWORD1>FLDATA</KEYWORD1>
- <KEYWORD1>FLIS</KEYWORD1>
- <KEYWORD1>FLIST</KEYWORD1>
- <KEYWORD1>FLLI</KEYWORD1>
- <KEYWORD1>FLLIST</KEYWORD1>
- <KEYWORD1>FLOC</KEYWORD1>
- <KEYWORD1>FLOCHECK</KEYWORD1>
- <KEYWORD1>FLOT</KEYWORD1>
- <KEYWORD1>FLOTRAN</KEYWORD1>
- <KEYWORD1>FLRE</KEYWORD1>
- <KEYWORD1>FLREAD</KEYWORD1>
- <KEYWORD1>FLST</KEYWORD1>
- <KEYWORD1>FLST</KEYWORD1>
- <KEYWORD1>FLUX</KEYWORD1>
- <KEYWORD1>FLUXV</KEYWORD1>
- <KEYWORD1>FMAG</KEYWORD1>
- <KEYWORD1>FMAG</KEYWORD1>
- <KEYWORD1>FMAGBC</KEYWORD1>
- <KEYWORD1>FMAGSUM</KEYWORD1>
- <KEYWORD1>FOR2</KEYWORD1>
- <KEYWORD1>FOR2D</KEYWORD1>
- <KEYWORD1>FORC</KEYWORD1>
- <KEYWORD1>FORCE</KEYWORD1>
- <KEYWORD1>FORM</KEYWORD1>
- <KEYWORD1>FORM</KEYWORD1>
- <KEYWORD1>FP</KEYWORD1>
- <KEYWORD1>FPLI</KEYWORD1>
- <KEYWORD1>FPLIST</KEYWORD1>
- <KEYWORD1>FREQ</KEYWORD1>
- <KEYWORD1>FREQ</KEYWORD1>
- <KEYWORD1>FS</KEYWORD1>
- <KEYWORD1>FSCA</KEYWORD1>
- <KEYWORD1>FSCALE</KEYWORD1>
- <KEYWORD1>FSDE</KEYWORD1>
- <KEYWORD1>FSDELE</KEYWORD1>
- <KEYWORD1>FSLI</KEYWORD1>
- <KEYWORD1>FSLIST</KEYWORD1>
- <KEYWORD1>FSNO</KEYWORD1>
- <KEYWORD1>FSNODE</KEYWORD1>
- <KEYWORD1>FSPL</KEYWORD1>
- <KEYWORD1>FSPLOT</KEYWORD1>
- <KEYWORD1>FSSE</KEYWORD1>
- <KEYWORD1>FSSECT</KEYWORD1>
- <KEYWORD1>FSUM</KEYWORD1>
- <KEYWORD1>FSUM</KEYWORD1>
- <KEYWORD1>FTCA</KEYWORD1>
- <KEYWORD1>FTCALC</KEYWORD1>
- <KEYWORD1>FTRA</KEYWORD1>
- <KEYWORD1>FTRAN</KEYWORD1>
- <KEYWORD1>FTSI</KEYWORD1>
- <KEYWORD1>FTSIZE</KEYWORD1>
- <KEYWORD1>FTWR</KEYWORD1>
- <KEYWORD1>FTWRITE</KEYWORD1>
- <KEYWORD1>FVME</KEYWORD1>
- <KEYWORD1>FVMESH</KEYWORD1>
- <KEYWORD1>GAP</KEYWORD1>
- <KEYWORD1>GAPF</KEYWORD1>
- <KEYWORD1>GAPFINISH</KEYWORD1>
- <KEYWORD1>GAPL</KEYWORD1>
- <KEYWORD1>GAPLIST</KEYWORD1>
- <KEYWORD1>GAPM</KEYWORD1>
- <KEYWORD1>GAPMERGE</KEYWORD1>
- <KEYWORD1>GAPO</KEYWORD1>
- <KEYWORD1>GAPOPT</KEYWORD1>
- <KEYWORD1>GAPP</KEYWORD1>
- <KEYWORD1>GAPPLOT</KEYWORD1>
- <KEYWORD1>GAUG</KEYWORD1>
- <KEYWORD1>GAUGE</KEYWORD1>
- <KEYWORD1>GCGE</KEYWORD1>
- <KEYWORD1>GCGEN</KEYWORD1>
- <KEYWORD1>GENO</KEYWORD1>
- <KEYWORD1>GENOPT</KEYWORD1>
- <KEYWORD1>GEOM</KEYWORD1>
- <KEYWORD1>GEOM</KEYWORD1>
- <KEYWORD1>GEOM</KEYWORD1>
- <KEYWORD1>GEOMETRY</KEYWORD1>
- <KEYWORD1>GP</KEYWORD1>
- <KEYWORD1>GPDE</KEYWORD1>
- <KEYWORD1>GPDELE</KEYWORD1>
- <KEYWORD1>GPLI</KEYWORD1>
- <KEYWORD1>GPLIST</KEYWORD1>
- <KEYWORD1>GPLO</KEYWORD1>
- <KEYWORD1>GPLOT</KEYWORD1>
- <KEYWORD1>GRP</KEYWORD1>
- <KEYWORD1>GSUM</KEYWORD1>
- <KEYWORD1>GSUM</KEYWORD1>
- <KEYWORD1>HARF</KEYWORD1>
- <KEYWORD1>HARFRQ</KEYWORD1>
- <KEYWORD1>HELP</KEYWORD1>
- <KEYWORD1>HELP</KEYWORD1>
- <KEYWORD1>HELP</KEYWORD1>
- <KEYWORD1>HELPDISP</KEYWORD1>
- <KEYWORD1>HFSW</KEYWORD1>
- <KEYWORD1>HFSWEEP</KEYWORD1>
- <KEYWORD1>HMAG</KEYWORD1>
- <KEYWORD1>HMAGSOLV</KEYWORD1>
- <KEYWORD1>HPGL</KEYWORD1>
- <KEYWORD1>HPGL</KEYWORD1>
- <KEYWORD1>HPTC</KEYWORD1>
- <KEYWORD1>HPTCREATE</KEYWORD1>
- <KEYWORD1>HPTD</KEYWORD1>
- <KEYWORD1>HPTDELETE</KEYWORD1>
- <KEYWORD1>HRCP</KEYWORD1>
- <KEYWORD1>HRCPLX</KEYWORD1>
- <KEYWORD1>HREX</KEYWORD1>
- <KEYWORD1>HREXP</KEYWORD1>
- <KEYWORD1>HROP</KEYWORD1>
- <KEYWORD1>HROPT</KEYWORD1>
- <KEYWORD1>HROU</KEYWORD1>
- <KEYWORD1>HROUT</KEYWORD1>
- <KEYWORD1>IC</KEYWORD1>
- <KEYWORD1>ICDE</KEYWORD1>
- <KEYWORD1>ICDELE</KEYWORD1>
- <KEYWORD1>ICLI</KEYWORD1>
- <KEYWORD1>ICLIST</KEYWORD1>
- <KEYWORD1>IGES</KEYWORD1>
- <KEYWORD1>IGES</KEYWORD1>
- <KEYWORD1>IGESIN</KEYWORD1>
- <KEYWORD1>IGESOUT</KEYWORD1>
- <KEYWORD1>IMAG</KEYWORD1>
- <KEYWORD1>IMAGIN</KEYWORD1>
- <KEYWORD1>IMME</KEYWORD1>
- <KEYWORD1>IMMED</KEYWORD1>
- <KEYWORD1>IMPD</KEYWORD1>
- <KEYWORD1>IMPD</KEYWORD1>
- <KEYWORD1>INRE</KEYWORD1>
- <KEYWORD1>INRES</KEYWORD1>
- <KEYWORD1>INRT</KEYWORD1>
- <KEYWORD1>INRTIA</KEYWORD1>
- <KEYWORD1>INT1</KEYWORD1>
- <KEYWORD1>INT1</KEYWORD1>
- <KEYWORD1>INTS</KEYWORD1>
- <KEYWORD1>INTSRF</KEYWORD1>
- <KEYWORD1>IOPT</KEYWORD1>
- <KEYWORD1>IOPTN</KEYWORD1>
- <KEYWORD1>IRLF</KEYWORD1>
- <KEYWORD1>IRLF</KEYWORD1>
- <KEYWORD1>IRLI</KEYWORD1>
- <KEYWORD1>IRLIST</KEYWORD1>
- <KEYWORD1>K</KEYWORD1>
- <KEYWORD1>KATT</KEYWORD1>
- <KEYWORD1>KATT</KEYWORD1>
- <KEYWORD1>KBC</KEYWORD1>
- <KEYWORD1>KBET</KEYWORD1>
- <KEYWORD1>KBETW</KEYWORD1>
- <KEYWORD1>KCAL</KEYWORD1>
- <KEYWORD1>KCALC</KEYWORD1>
- <KEYWORD1>KCEN</KEYWORD1>
- <KEYWORD1>KCENTER</KEYWORD1>
- <KEYWORD1>KCLE</KEYWORD1>
- <KEYWORD1>KCLEAR</KEYWORD1>
- <KEYWORD1>KDEL</KEYWORD1>
- <KEYWORD1>KDELE</KEYWORD1>
- <KEYWORD1>KDIS</KEYWORD1>
- <KEYWORD1>KDIST</KEYWORD1>
- <KEYWORD1>KESI</KEYWORD1>
- <KEYWORD1>KESIZE</KEYWORD1>
- <KEYWORD1>KEYO</KEYWORD1>
- <KEYWORD1>KEYOPT</KEYWORD1>
- <KEYWORD1>KEYP</KEYWORD1>
- <KEYWORD1>KEYPTS</KEYWORD1>
- <KEYWORD1>KEYW</KEYWORD1>
- <KEYWORD1>KEYW</KEYWORD1>
- <KEYWORD1>KFIL</KEYWORD1>
- <KEYWORD1>KFILL</KEYWORD1>
- <KEYWORD1>KGEN</KEYWORD1>
- <KEYWORD1>KGEN</KEYWORD1>
- <KEYWORD1>KL</KEYWORD1>
- <KEYWORD1>KLIS</KEYWORD1>
- <KEYWORD1>KLIST</KEYWORD1>
- <KEYWORD1>KMES</KEYWORD1>
- <KEYWORD1>KMESH</KEYWORD1>
- <KEYWORD1>KMOD</KEYWORD1>
- <KEYWORD1>KMODIF</KEYWORD1>
- <KEYWORD1>KMOV</KEYWORD1>
- <KEYWORD1>KMOVE</KEYWORD1>
- <KEYWORD1>KNOD</KEYWORD1>
- <KEYWORD1>KNODE</KEYWORD1>
- <KEYWORD1>KPLO</KEYWORD1>
- <KEYWORD1>KPLOT</KEYWORD1>
- <KEYWORD1>KPSC</KEYWORD1>
- <KEYWORD1>KPSCALE</KEYWORD1>
- <KEYWORD1>KREF</KEYWORD1>
- <KEYWORD1>KREFINE</KEYWORD1>
- <KEYWORD1>KSCA</KEYWORD1>
- <KEYWORD1>KSCALE</KEYWORD1>
- <KEYWORD1>KSCO</KEYWORD1>
- <KEYWORD1>KSCON</KEYWORD1>
- <KEYWORD1>KSEL</KEYWORD1>
- <KEYWORD1>KSEL</KEYWORD1>
- <KEYWORD1>KSLL</KEYWORD1>
- <KEYWORD1>KSLL</KEYWORD1>
- <KEYWORD1>KSLN</KEYWORD1>
- <KEYWORD1>KSLN</KEYWORD1>
- <KEYWORD1>KSUM</KEYWORD1>
- <KEYWORD1>KSUM</KEYWORD1>
- <KEYWORD1>KSYM</KEYWORD1>
- <KEYWORD1>KSYMM</KEYWORD1>
- <KEYWORD1>KTRA</KEYWORD1>
- <KEYWORD1>KTRAN</KEYWORD1>
- <KEYWORD1>KUSE</KEYWORD1>
- <KEYWORD1>KUSE</KEYWORD1>
- <KEYWORD1>KWPA</KEYWORD1>
- <KEYWORD1>KWPAVE</KEYWORD1>
- <KEYWORD1>KWPL</KEYWORD1>
- <KEYWORD1>KWPLAN</KEYWORD1>
- <KEYWORD1>L2AN</KEYWORD1>
- <KEYWORD1>L2ANG</KEYWORD1>
- <KEYWORD1>L2TA</KEYWORD1>
- <KEYWORD1>L2TAN</KEYWORD1>
- <KEYWORD1>L</KEYWORD1>
- <KEYWORD1>LANG</KEYWORD1>
- <KEYWORD1>LANG</KEYWORD1>
- <KEYWORD1>LARC</KEYWORD1>
- <KEYWORD1>LARC</KEYWORD1>
- <KEYWORD1>LARE</KEYWORD1>
- <KEYWORD1>LAREA</KEYWORD1>
- <KEYWORD1>LARG</KEYWORD1>
- <KEYWORD1>LARGE</KEYWORD1>
- <KEYWORD1>LATT</KEYWORD1>
- <KEYWORD1>LATT</KEYWORD1>
- <KEYWORD1>LAYE</KEYWORD1>
- <KEYWORD1>LAYE</KEYWORD1>
- <KEYWORD1>LAYER</KEYWORD1>
- <KEYWORD1>LAYERP26</KEYWORD1>
- <KEYWORD1>LAYL</KEYWORD1>
- <KEYWORD1>LAYLIST</KEYWORD1>
- <KEYWORD1>LAYP</KEYWORD1>
- <KEYWORD1>LAYPLOT</KEYWORD1>
- <KEYWORD1>LCAB</KEYWORD1>
- <KEYWORD1>LCABS</KEYWORD1>
- <KEYWORD1>LCAS</KEYWORD1>
- <KEYWORD1>LCASE</KEYWORD1>
- <KEYWORD1>LCCA</KEYWORD1>
- <KEYWORD1>LCCA</KEYWORD1>
- <KEYWORD1>LCCALC</KEYWORD1>
- <KEYWORD1>LCCAT</KEYWORD1>
- <KEYWORD1>LCDE</KEYWORD1>
- <KEYWORD1>LCDEF</KEYWORD1>
- <KEYWORD1>LCFA</KEYWORD1>
- <KEYWORD1>LCFACT</KEYWORD1>
- <KEYWORD1>LCFI</KEYWORD1>
- <KEYWORD1>LCFILE</KEYWORD1>
- <KEYWORD1>LCLE</KEYWORD1>
- <KEYWORD1>LCLEAR</KEYWORD1>
- <KEYWORD1>LCOM</KEYWORD1>
- <KEYWORD1>LCOMB</KEYWORD1>
- <KEYWORD1>LCOP</KEYWORD1>
- <KEYWORD1>LCOPER</KEYWORD1>
- <KEYWORD1>LCSE</KEYWORD1>
- <KEYWORD1>LCSEL</KEYWORD1>
- <KEYWORD1>LCSL</KEYWORD1>
- <KEYWORD1>LCSL</KEYWORD1>
- <KEYWORD1>LCSU</KEYWORD1>
- <KEYWORD1>LCSUM</KEYWORD1>
- <KEYWORD1>LCWR</KEYWORD1>
- <KEYWORD1>LCWRITE</KEYWORD1>
- <KEYWORD1>LCZE</KEYWORD1>
- <KEYWORD1>LCZERO</KEYWORD1>
- <KEYWORD1>LDEL</KEYWORD1>
- <KEYWORD1>LDELE</KEYWORD1>
- <KEYWORD1>LDIV</KEYWORD1>
- <KEYWORD1>LDIV</KEYWORD1>
- <KEYWORD1>LDRA</KEYWORD1>
- <KEYWORD1>LDRAG</KEYWORD1>
- <KEYWORD1>LDRE</KEYWORD1>
- <KEYWORD1>LDREAD</KEYWORD1>
- <KEYWORD1>LESI</KEYWORD1>
- <KEYWORD1>LESIZE</KEYWORD1>
- <KEYWORD1>LEXT</KEYWORD1>
- <KEYWORD1>LEXTND</KEYWORD1>
- <KEYWORD1>LFIL</KEYWORD1>
- <KEYWORD1>LFILLT</KEYWORD1>
- <KEYWORD1>LFSU</KEYWORD1>
- <KEYWORD1>LFSURF</KEYWORD1>
- <KEYWORD1>LGEN</KEYWORD1>
- <KEYWORD1>LGEN</KEYWORD1>
- <KEYWORD1>LGLU</KEYWORD1>
- <KEYWORD1>LGLUE</KEYWORD1>
- <KEYWORD1>LGWR</KEYWORD1>
- <KEYWORD1>LGWRITE</KEYWORD1>
- <KEYWORD1>LINA</KEYWORD1>
- <KEYWORD1>LINA</KEYWORD1>
- <KEYWORD1>LINE</KEYWORD1>
- <KEYWORD1>LINE</KEYWORD1>
- <KEYWORD1>LINE</KEYWORD1>
- <KEYWORD1>LINES</KEYWORD1>
- <KEYWORD1>LINL</KEYWORD1>
- <KEYWORD1>LINL</KEYWORD1>
- <KEYWORD1>LINP</KEYWORD1>
- <KEYWORD1>LINP</KEYWORD1>
- <KEYWORD1>LINV</KEYWORD1>
- <KEYWORD1>LINV</KEYWORD1>
- <KEYWORD1>LLIS</KEYWORD1>
- <KEYWORD1>LLIST</KEYWORD1>
- <KEYWORD1>LMAT</KEYWORD1>
- <KEYWORD1>LMATRIX</KEYWORD1>
- <KEYWORD1>LMES</KEYWORD1>
- <KEYWORD1>LMESH</KEYWORD1>
- <KEYWORD1>LNCO</KEYWORD1>
- <KEYWORD1>LNCOLLAPSE</KEYWORD1>
- <KEYWORD1>LNDE</KEYWORD1>
- <KEYWORD1>LNDETACH</KEYWORD1>
- <KEYWORD1>LNFI</KEYWORD1>
- <KEYWORD1>LNFILL</KEYWORD1>
- <KEYWORD1>LNME</KEYWORD1>
- <KEYWORD1>LNMERGE</KEYWORD1>
- <KEYWORD1>LNSP</KEYWORD1>
- <KEYWORD1>LNSPLIT</KEYWORD1>
- <KEYWORD1>LNSR</KEYWORD1>
- <KEYWORD1>LNSRCH</KEYWORD1>
- <KEYWORD1>LOCA</KEYWORD1>
- <KEYWORD1>LOCAL</KEYWORD1>
- <KEYWORD1>LOVL</KEYWORD1>
- <KEYWORD1>LOVLAP</KEYWORD1>
- <KEYWORD1>LPLO</KEYWORD1>
- <KEYWORD1>LPLOT</KEYWORD1>
- <KEYWORD1>LPTN</KEYWORD1>
- <KEYWORD1>LPTN</KEYWORD1>
- <KEYWORD1>LREF</KEYWORD1>
- <KEYWORD1>LREFINE</KEYWORD1>
- <KEYWORD1>LREV</KEYWORD1>
- <KEYWORD1>LREVERSE</KEYWORD1>
- <KEYWORD1>LROT</KEYWORD1>
- <KEYWORD1>LROTAT</KEYWORD1>
- <KEYWORD1>LSBA</KEYWORD1>
- <KEYWORD1>LSBA</KEYWORD1>
- <KEYWORD1>LSBL</KEYWORD1>
- <KEYWORD1>LSBL</KEYWORD1>
- <KEYWORD1>LSBV</KEYWORD1>
- <KEYWORD1>LSBV</KEYWORD1>
- <KEYWORD1>LSBW</KEYWORD1>
- <KEYWORD1>LSBW</KEYWORD1>
- <KEYWORD1>LSCL</KEYWORD1>
- <KEYWORD1>LSCLEAR</KEYWORD1>
- <KEYWORD1>LSDE</KEYWORD1>
- <KEYWORD1>LSDELE</KEYWORD1>
- <KEYWORD1>LSEL</KEYWORD1>
- <KEYWORD1>LSEL</KEYWORD1>
- <KEYWORD1>LSLA</KEYWORD1>
- <KEYWORD1>LSLA</KEYWORD1>
- <KEYWORD1>LSLK</KEYWORD1>
- <KEYWORD1>LSLK</KEYWORD1>
- <KEYWORD1>LSOP</KEYWORD1>
- <KEYWORD1>LSOPER</KEYWORD1>
- <KEYWORD1>LSRE</KEYWORD1>
- <KEYWORD1>LSREAD</KEYWORD1>
- <KEYWORD1>LSSC</KEYWORD1>
- <KEYWORD1>LSSCALE</KEYWORD1>
- <KEYWORD1>LSSO</KEYWORD1>
- <KEYWORD1>LSSOLVE</KEYWORD1>
- <KEYWORD1>LSTR</KEYWORD1>
- <KEYWORD1>LSTR</KEYWORD1>
- <KEYWORD1>LSUM</KEYWORD1>
- <KEYWORD1>LSUM</KEYWORD1>
- <KEYWORD1>LSWR</KEYWORD1>
- <KEYWORD1>LSWRITE</KEYWORD1>
- <KEYWORD1>LSYM</KEYWORD1>
- <KEYWORD1>LSYMM</KEYWORD1>
- <KEYWORD1>LTAN</KEYWORD1>
- <KEYWORD1>LTAN</KEYWORD1>
- <KEYWORD1>LTRA</KEYWORD1>
- <KEYWORD1>LTRAN</KEYWORD1>
- <KEYWORD1>LUMP</KEYWORD1>
- <KEYWORD1>LUMPM</KEYWORD1>
- <KEYWORD1>LVSC</KEYWORD1>
- <KEYWORD1>LVSCALE</KEYWORD1>
- <KEYWORD1>LWPL</KEYWORD1>
- <KEYWORD1>LWPLAN</KEYWORD1>
- <KEYWORD1>M</KEYWORD1>
- <KEYWORD1>MAGO</KEYWORD1>
- <KEYWORD1>MAGOPT</KEYWORD1>
- <KEYWORD1>MAGS</KEYWORD1>
- <KEYWORD1>MAGSOLV</KEYWORD1>
- <KEYWORD1>MAST</KEYWORD1>
- <KEYWORD1>MASTER</KEYWORD1>
- <KEYWORD1>MAT</KEYWORD1>
- <KEYWORD1>MATE</KEYWORD1>
- <KEYWORD1>MATER</KEYWORD1>
- <KEYWORD1>MDAM</KEYWORD1>
- <KEYWORD1>MDAMP</KEYWORD1>
- <KEYWORD1>MDEL</KEYWORD1>
- <KEYWORD1>MDELE</KEYWORD1>
- <KEYWORD1>MESH</KEYWORD1>
- <KEYWORD1>MESHING</KEYWORD1>
- <KEYWORD1>MGEN</KEYWORD1>
- <KEYWORD1>MGEN</KEYWORD1>
- <KEYWORD1>MITE</KEYWORD1>
- <KEYWORD1>MITER</KEYWORD1>
- <KEYWORD1>MLIS</KEYWORD1>
- <KEYWORD1>MLIST</KEYWORD1>
- <KEYWORD1>MMF</KEYWORD1>
- <KEYWORD1>MODE</KEYWORD1>
- <KEYWORD1>MODE</KEYWORD1>
- <KEYWORD1>MODM</KEYWORD1>
- <KEYWORD1>MODMSH</KEYWORD1>
- <KEYWORD1>MODO</KEYWORD1>
- <KEYWORD1>MODOPT</KEYWORD1>
- <KEYWORD1>MONI</KEYWORD1>
- <KEYWORD1>MONITOR</KEYWORD1>
- <KEYWORD1>MOPT</KEYWORD1>
- <KEYWORD1>MOPT</KEYWORD1>
- <KEYWORD1>MOVE</KEYWORD1>
- <KEYWORD1>MOVE</KEYWORD1>
- <KEYWORD1>MP</KEYWORD1>
- <KEYWORD1>MPAM</KEYWORD1>
- <KEYWORD1>MPAMOD</KEYWORD1>
- <KEYWORD1>MPCH</KEYWORD1>
- <KEYWORD1>MPCHG</KEYWORD1>
- <KEYWORD1>MPDA</KEYWORD1>
- <KEYWORD1>MPDATA</KEYWORD1>
- <KEYWORD1>MPDE</KEYWORD1>
- <KEYWORD1>MPDELE</KEYWORD1>
- <KEYWORD1>MPDR</KEYWORD1>
- <KEYWORD1>MPDRES</KEYWORD1>
- <KEYWORD1>MPLI</KEYWORD1>
- <KEYWORD1>MPLIST</KEYWORD1>
- <KEYWORD1>MPMO</KEYWORD1>
- <KEYWORD1>MPMOD</KEYWORD1>
- <KEYWORD1>MPPL</KEYWORD1>
- <KEYWORD1>MPPLOT</KEYWORD1>
- <KEYWORD1>MPRE</KEYWORD1>
- <KEYWORD1>MPREAD</KEYWORD1>
- <KEYWORD1>MPRI</KEYWORD1>
- <KEYWORD1>MPRINT</KEYWORD1>
- <KEYWORD1>MPTE</KEYWORD1>
- <KEYWORD1>MPTEMP</KEYWORD1>
- <KEYWORD1>MPTG</KEYWORD1>
- <KEYWORD1>MPTGEN</KEYWORD1>
- <KEYWORD1>MPTR</KEYWORD1>
- <KEYWORD1>MPTRES</KEYWORD1>
- <KEYWORD1>MPUN</KEYWORD1>
- <KEYWORD1>MPUNDO</KEYWORD1>
- <KEYWORD1>MPWR</KEYWORD1>
- <KEYWORD1>MPWRITE</KEYWORD1>
- <KEYWORD1>MSAD</KEYWORD1>
- <KEYWORD1>MSADV</KEYWORD1>
- <KEYWORD1>MSCA</KEYWORD1>
- <KEYWORD1>MSCAP</KEYWORD1>
- <KEYWORD1>MSDA</KEYWORD1>
- <KEYWORD1>MSDATA</KEYWORD1>
- <KEYWORD1>MSHA</KEYWORD1>
- <KEYWORD1>MSHAPE</KEYWORD1>
- <KEYWORD1>MSHK</KEYWORD1>
- <KEYWORD1>MSHKEY</KEYWORD1>
- <KEYWORD1>MSHM</KEYWORD1>
- <KEYWORD1>MSHMID</KEYWORD1>
- <KEYWORD1>MSHP</KEYWORD1>
- <KEYWORD1>MSHPATTERN</KEYWORD1>
- <KEYWORD1>MSME</KEYWORD1>
- <KEYWORD1>MSMETH</KEYWORD1>
- <KEYWORD1>MSNO</KEYWORD1>
- <KEYWORD1>MSNOMF</KEYWORD1>
- <KEYWORD1>MSPR</KEYWORD1>
- <KEYWORD1>MSPROP</KEYWORD1>
- <KEYWORD1>MSQU</KEYWORD1>
- <KEYWORD1>MSQUAD</KEYWORD1>
- <KEYWORD1>MSRE</KEYWORD1>
- <KEYWORD1>MSRELAX</KEYWORD1>
- <KEYWORD1>MSSO</KEYWORD1>
- <KEYWORD1>MSSOLU</KEYWORD1>
- <KEYWORD1>MSSP</KEYWORD1>
- <KEYWORD1>MSSPEC</KEYWORD1>
- <KEYWORD1>MSTE</KEYWORD1>
- <KEYWORD1>MSTERM</KEYWORD1>
- <KEYWORD1>MSVA</KEYWORD1>
- <KEYWORD1>MSVARY</KEYWORD1>
- <KEYWORD1>MXPA</KEYWORD1>
- <KEYWORD1>MXPAND</KEYWORD1>
- <KEYWORD1>N</KEYWORD1>
- <KEYWORD1>NANG</KEYWORD1>
- <KEYWORD1>NANG</KEYWORD1>
- <KEYWORD1>NCNV</KEYWORD1>
- <KEYWORD1>NCNV</KEYWORD1>
- <KEYWORD1>NDEL</KEYWORD1>
- <KEYWORD1>NDELE</KEYWORD1>
- <KEYWORD1>NDIS</KEYWORD1>
- <KEYWORD1>NDIST</KEYWORD1>
- <KEYWORD1>NEQI</KEYWORD1>
- <KEYWORD1>NEQIT</KEYWORD1>
- <KEYWORD1>NFOR</KEYWORD1>
- <KEYWORD1>NFORCE</KEYWORD1>
- <KEYWORD1>NGEN</KEYWORD1>
- <KEYWORD1>NGEN</KEYWORD1>
- <KEYWORD1>NKPT</KEYWORD1>
- <KEYWORD1>NKPT</KEYWORD1>
- <KEYWORD1>NLGE</KEYWORD1>
- <KEYWORD1>NLGEOM</KEYWORD1>
- <KEYWORD1>NLIS</KEYWORD1>
- <KEYWORD1>NLIST</KEYWORD1>
- <KEYWORD1>NLOG</KEYWORD1>
- <KEYWORD1>NLOG</KEYWORD1>
- <KEYWORD1>NLOP</KEYWORD1>
- <KEYWORD1>NLOPT</KEYWORD1>
- <KEYWORD1>NMOD</KEYWORD1>
- <KEYWORD1>NMODIF</KEYWORD1>
- <KEYWORD1>NOCO</KEYWORD1>
- <KEYWORD1>NOCOLOR</KEYWORD1>
- <KEYWORD1>NODE</KEYWORD1>
- <KEYWORD1>NODES</KEYWORD1>
- <KEYWORD1>NOOR</KEYWORD1>
- <KEYWORD1>NOORDER</KEYWORD1>
- <KEYWORD1>NPLO</KEYWORD1>
- <KEYWORD1>NPLOT</KEYWORD1>
- <KEYWORD1>NPRI</KEYWORD1>
- <KEYWORD1>NPRINT</KEYWORD1>
- <KEYWORD1>NREA</KEYWORD1>
- <KEYWORD1>NREAD</KEYWORD1>
- <KEYWORD1>NREF</KEYWORD1>
- <KEYWORD1>NREFINE</KEYWORD1>
- <KEYWORD1>NRLS</KEYWORD1>
- <KEYWORD1>NRLSUM</KEYWORD1>
- <KEYWORD1>NROP</KEYWORD1>
- <KEYWORD1>NROPT</KEYWORD1>
- <KEYWORD1>NROT</KEYWORD1>
- <KEYWORD1>NROTAT</KEYWORD1>
- <KEYWORD1>NRRA</KEYWORD1>
- <KEYWORD1>NRRANG</KEYWORD1>
- <KEYWORD1>NSCA</KEYWORD1>
- <KEYWORD1>NSCALE</KEYWORD1>
- <KEYWORD1>NSEL</KEYWORD1>
- <KEYWORD1>NSEL</KEYWORD1>
- <KEYWORD1>NSLA</KEYWORD1>
- <KEYWORD1>NSLA</KEYWORD1>
- <KEYWORD1>NSLE</KEYWORD1>
- <KEYWORD1>NSLE</KEYWORD1>
- <KEYWORD1>NSLK</KEYWORD1>
- <KEYWORD1>NSLK</KEYWORD1>
- <KEYWORD1>NSLL</KEYWORD1>
- <KEYWORD1>NSLL</KEYWORD1>
- <KEYWORD1>NSLV</KEYWORD1>
- <KEYWORD1>NSLV</KEYWORD1>
- <KEYWORD1>NSOL</KEYWORD1>
- <KEYWORD1>NSOL</KEYWORD1>
- <KEYWORD1>NSOR</KEYWORD1>
- <KEYWORD1>NSORT</KEYWORD1>
- <KEYWORD1>NSTO</KEYWORD1>
- <KEYWORD1>NSTORE</KEYWORD1>
- <KEYWORD1>NSUB</KEYWORD1>
- <KEYWORD1>NSUBST</KEYWORD1>
- <KEYWORD1>NSVR</KEYWORD1>
- <KEYWORD1>NSVR</KEYWORD1>
- <KEYWORD1>NSYM</KEYWORD1>
- <KEYWORD1>NSYM</KEYWORD1>
- <KEYWORD1>NUMC</KEYWORD1>
- <KEYWORD1>NUMCMP</KEYWORD1>
- <KEYWORD1>NUME</KEYWORD1>
- <KEYWORD1>NUMEXP</KEYWORD1>
- <KEYWORD1>NUMM</KEYWORD1>
- <KEYWORD1>NUMMRG</KEYWORD1>
- <KEYWORD1>NUMO</KEYWORD1>
- <KEYWORD1>NUMOFF</KEYWORD1>
- <KEYWORD1>NUMS</KEYWORD1>
- <KEYWORD1>NUMSTR</KEYWORD1>
- <KEYWORD1>NUMV</KEYWORD1>
- <KEYWORD1>NUMVAR</KEYWORD1>
- <KEYWORD1>NUSO</KEYWORD1>
- <KEYWORD1>NUSORT</KEYWORD1>
- <KEYWORD1>NWPA</KEYWORD1>
- <KEYWORD1>NWPAVE</KEYWORD1>
- <KEYWORD1>NWPL</KEYWORD1>
- <KEYWORD1>NWPLAN</KEYWORD1>
- <KEYWORD1>NWRI</KEYWORD1>
- <KEYWORD1>NWRITE</KEYWORD1>
- <KEYWORD1>nx</KEYWORD1>
- <KEYWORD1>ny</KEYWORD1>
- <KEYWORD1>nz</KEYWORD1>
- <KEYWORD1>OMEG</KEYWORD1>
- <KEYWORD1>OMEGA</KEYWORD1>
- <KEYWORD1>OPAD</KEYWORD1>
- <KEYWORD1>OPADD</KEYWORD1>
- <KEYWORD1>OPAN</KEYWORD1>
- <KEYWORD1>OPANL</KEYWORD1>
- <KEYWORD1>OPCL</KEYWORD1>
- <KEYWORD1>OPCLR</KEYWORD1>
- <KEYWORD1>OPDA</KEYWORD1>
- <KEYWORD1>OPDATA</KEYWORD1>
- <KEYWORD1>OPDE</KEYWORD1>
- <KEYWORD1>OPDEL</KEYWORD1>
- <KEYWORD1>OPEQ</KEYWORD1>
- <KEYWORD1>OPEQN</KEYWORD1>
- <KEYWORD1>OPER</KEYWORD1>
- <KEYWORD1>OPERATE</KEYWORD1>
- <KEYWORD1>OPEX</KEYWORD1>
- <KEYWORD1>OPEXE</KEYWORD1>
- <KEYWORD1>OPFA</KEYWORD1>
- <KEYWORD1>OPFACT</KEYWORD1>
- <KEYWORD1>OPFR</KEYWORD1>
- <KEYWORD1>OPFRST</KEYWORD1>
- <KEYWORD1>OPGR</KEYWORD1>
- <KEYWORD1>OPGRAD</KEYWORD1>
- <KEYWORD1>OPKE</KEYWORD1>
- <KEYWORD1>OPKEEP</KEYWORD1>
- <KEYWORD1>OPLF</KEYWORD1>
- <KEYWORD1>OPLFA</KEYWORD1>
- <KEYWORD1>OPLG</KEYWORD1>
- <KEYWORD1>OPLGR</KEYWORD1>
- <KEYWORD1>OPLI</KEYWORD1>
- <KEYWORD1>OPLIST</KEYWORD1>
- <KEYWORD1>OPLO</KEYWORD1>
- <KEYWORD1>OPLOOP</KEYWORD1>
- <KEYWORD1>OPLS</KEYWORD1>
- <KEYWORD1>OPLSW</KEYWORD1>
- <KEYWORD1>OPMA</KEYWORD1>
- <KEYWORD1>OPMAKE</KEYWORD1>
- <KEYWORD1>OPNC</KEYWORD1>
- <KEYWORD1>OPNCONTROL</KEYWORD1>
- <KEYWORD1>OPPR</KEYWORD1>
- <KEYWORD1>OPPRNT</KEYWORD1>
- <KEYWORD1>OPRA</KEYWORD1>
- <KEYWORD1>OPRAND</KEYWORD1>
- <KEYWORD1>OPRE</KEYWORD1>
- <KEYWORD1>OPRESU</KEYWORD1>
- <KEYWORD1>OPRF</KEYWORD1>
- <KEYWORD1>OPRFA</KEYWORD1>
- <KEYWORD1>OPRG</KEYWORD1>
- <KEYWORD1>OPRGR</KEYWORD1>
- <KEYWORD1>OPRS</KEYWORD1>
- <KEYWORD1>OPRSW</KEYWORD1>
- <KEYWORD1>OPSA</KEYWORD1>
- <KEYWORD1>OPSAVE</KEYWORD1>
- <KEYWORD1>OPSE</KEYWORD1>
- <KEYWORD1>OPSEL</KEYWORD1>
- <KEYWORD1>OPSU</KEYWORD1>
- <KEYWORD1>OPSUBP</KEYWORD1>
- <KEYWORD1>OPSW</KEYWORD1>
- <KEYWORD1>OPSWEEP</KEYWORD1>
- <KEYWORD1>OPTY</KEYWORD1>
- <KEYWORD1>OPTYPE</KEYWORD1>
- <KEYWORD1>OPUS</KEYWORD1>
- <KEYWORD1>OPUSER</KEYWORD1>
- <KEYWORD1>OPVA</KEYWORD1>
- <KEYWORD1>OPVAR</KEYWORD1>
- <KEYWORD1>OUTO</KEYWORD1>
- <KEYWORD1>OUTOPT</KEYWORD1>
- <KEYWORD1>OUTP</KEYWORD1>
- <KEYWORD1>OUTPR</KEYWORD1>
- <KEYWORD1>OUTR</KEYWORD1>
- <KEYWORD1>OUTRES</KEYWORD1>
- <KEYWORD1>PADE</KEYWORD1>
- <KEYWORD1>PADELE</KEYWORD1>
- <KEYWORD1>PAGE</KEYWORD1>
- <KEYWORD1>PAGET</KEYWORD1>
- <KEYWORD1>PAPU</KEYWORD1>
- <KEYWORD1>PAPUT</KEYWORD1>
- <KEYWORD1>PARE</KEYWORD1>
- <KEYWORD1>PARESU</KEYWORD1>
- <KEYWORD1>PARR</KEYWORD1>
- <KEYWORD1>PARRES</KEYWORD1>
- <KEYWORD1>PARS</KEYWORD1>
- <KEYWORD1>PARSAV</KEYWORD1>
- <KEYWORD1>PASA</KEYWORD1>
- <KEYWORD1>PASAVE</KEYWORD1>
- <KEYWORD1>PATH</KEYWORD1>
- <KEYWORD1>PATH</KEYWORD1>
- <KEYWORD1>PCAL</KEYWORD1>
- <KEYWORD1>PCALC</KEYWORD1>
- <KEYWORD1>PCIR</KEYWORD1>
- <KEYWORD1>PCIRC</KEYWORD1>
- <KEYWORD1>PCON</KEYWORD1>
- <KEYWORD1>PCONV</KEYWORD1>
- <KEYWORD1>PCOR</KEYWORD1>
- <KEYWORD1>PCORRO</KEYWORD1>
- <KEYWORD1>PCRO</KEYWORD1>
- <KEYWORD1>PCROSS</KEYWORD1>
- <KEYWORD1>PDEF</KEYWORD1>
- <KEYWORD1>PDEF</KEYWORD1>
- <KEYWORD1>PDOT</KEYWORD1>
- <KEYWORD1>PDOT</KEYWORD1>
- <KEYWORD1>PDRA</KEYWORD1>
- <KEYWORD1>PDRAG</KEYWORD1>
- <KEYWORD1>PERB</KEYWORD1>
- <KEYWORD1>PERBC2D</KEYWORD1>
- <KEYWORD1>PEXC</KEYWORD1>
- <KEYWORD1>PEXCLUDE</KEYWORD1>
- <KEYWORD1>PFAC</KEYWORD1>
- <KEYWORD1>PFACT</KEYWORD1>
- <KEYWORD1>PFLU</KEYWORD1>
- <KEYWORD1>PFLUID</KEYWORD1>
- <KEYWORD1>PGAP</KEYWORD1>
- <KEYWORD1>PGAP</KEYWORD1>
- <KEYWORD1>PHYS</KEYWORD1>
- <KEYWORD1>PHYSICS</KEYWORD1>
- <KEYWORD1>PINC</KEYWORD1>
- <KEYWORD1>PINCLUDE</KEYWORD1>
- <KEYWORD1>PINS</KEYWORD1>
- <KEYWORD1>PINSUL</KEYWORD1>
- <KEYWORD1>PIPE</KEYWORD1>
- <KEYWORD1>PIPE</KEYWORD1>
- <KEYWORD1>PIVC</KEYWORD1>
- <KEYWORD1>PIVCHECK</KEYWORD1>
- <KEYWORD1>PLAN</KEYWORD1>
- <KEYWORD1>PLANEWAVE</KEYWORD1>
- <KEYWORD1>PLCO</KEYWORD1>
- <KEYWORD1>PLCONV</KEYWORD1>
- <KEYWORD1>PLCP</KEYWORD1>
- <KEYWORD1>PLCPLX</KEYWORD1>
- <KEYWORD1>PLCR</KEYWORD1>
- <KEYWORD1>PLCRACK</KEYWORD1>
- <KEYWORD1>PLDI</KEYWORD1>
- <KEYWORD1>PLDISP</KEYWORD1>
- <KEYWORD1>PLES</KEYWORD1>
- <KEYWORD1>PLESOL</KEYWORD1>
- <KEYWORD1>PLET</KEYWORD1>
- <KEYWORD1>PLETAB</KEYWORD1>
- <KEYWORD1>PLF2</KEYWORD1>
- <KEYWORD1>PLF2D</KEYWORD1>
- <KEYWORD1>PLLS</KEYWORD1>
- <KEYWORD1>PLLS</KEYWORD1>
- <KEYWORD1>PLNS</KEYWORD1>
- <KEYWORD1>PLNSOL</KEYWORD1>
- <KEYWORD1>PLOT</KEYWORD1>
- <KEYWORD1>PLOT</KEYWORD1>
- <KEYWORD1>PLOT</KEYWORD1>
- <KEYWORD1>PLOTTING</KEYWORD1>
- <KEYWORD1>PLPA</KEYWORD1>
- <KEYWORD1>PLPA</KEYWORD1>
- <KEYWORD1>PLPAGM</KEYWORD1>
- <KEYWORD1>PLPATH</KEYWORD1>
- <KEYWORD1>PLSE</KEYWORD1>
- <KEYWORD1>PLSECT</KEYWORD1>
- <KEYWORD1>PLTI</KEYWORD1>
- <KEYWORD1>PLTIME</KEYWORD1>
- <KEYWORD1>PLTR</KEYWORD1>
- <KEYWORD1>PLTRAC</KEYWORD1>
- <KEYWORD1>PLVA</KEYWORD1>
- <KEYWORD1>PLVA</KEYWORD1>
- <KEYWORD1>PLVAR</KEYWORD1>
- <KEYWORD1>PLVAROPT</KEYWORD1>
- <KEYWORD1>PLVE</KEYWORD1>
- <KEYWORD1>PLVECT</KEYWORD1>
- <KEYWORD1>PMAP</KEYWORD1>
- <KEYWORD1>PMAP</KEYWORD1>
- <KEYWORD1>PMET</KEYWORD1>
- <KEYWORD1>PMETH</KEYWORD1>
- <KEYWORD1>PMGT</KEYWORD1>
- <KEYWORD1>PMGTRAN</KEYWORD1>
- <KEYWORD1>PMOP</KEYWORD1>
- <KEYWORD1>PMOPTS</KEYWORD1>
- <KEYWORD1>POIN</KEYWORD1>
- <KEYWORD1>POINT</KEYWORD1>
- <KEYWORD1>POLY</KEYWORD1>
- <KEYWORD1>POLY</KEYWORD1>
- <KEYWORD1>POPT</KEYWORD1>
- <KEYWORD1>POPT</KEYWORD1>
- <KEYWORD1>PORT</KEYWORD1>
- <KEYWORD1>PORTOPT</KEYWORD1>
- <KEYWORD1>POWE</KEYWORD1>
- <KEYWORD1>POWERH</KEYWORD1>
- <KEYWORD1>PPAT</KEYWORD1>
- <KEYWORD1>PPATH</KEYWORD1>
- <KEYWORD1>PPLO</KEYWORD1>
- <KEYWORD1>PPLOT</KEYWORD1>
- <KEYWORD1>PPRA</KEYWORD1>
- <KEYWORD1>PPRANGE</KEYWORD1>
- <KEYWORD1>PPRE</KEYWORD1>
- <KEYWORD1>PPRES</KEYWORD1>
- <KEYWORD1>PRAN</KEYWORD1>
- <KEYWORD1>PRANGE</KEYWORD1>
- <KEYWORD1>PRCO</KEYWORD1>
- <KEYWORD1>PRCONV</KEYWORD1>
- <KEYWORD1>PRCP</KEYWORD1>
- <KEYWORD1>PRCPLX</KEYWORD1>
- <KEYWORD1>PREC</KEYWORD1>
- <KEYWORD1>PRECISION</KEYWORD1>
- <KEYWORD1>PRED</KEYWORD1>
- <KEYWORD1>PRED</KEYWORD1>
- <KEYWORD1>PRER</KEYWORD1>
- <KEYWORD1>PRERR</KEYWORD1>
- <KEYWORD1>PRES</KEYWORD1>
- <KEYWORD1>PRESOL</KEYWORD1>
- <KEYWORD1>PRET</KEYWORD1>
- <KEYWORD1>PRETAB</KEYWORD1>
- <KEYWORD1>PRI2</KEYWORD1>
- <KEYWORD1>PRI2</KEYWORD1>
- <KEYWORD1>PRIM</KEYWORD1>
- <KEYWORD1>PRIM</KEYWORD1>
- <KEYWORD1>PRIN</KEYWORD1>
- <KEYWORD1>PRINT</KEYWORD1>
- <KEYWORD1>PRIS</KEYWORD1>
- <KEYWORD1>PRISM</KEYWORD1>
- <KEYWORD1>PRIT</KEYWORD1>
- <KEYWORD1>PRITER</KEYWORD1>
- <KEYWORD1>PRNL</KEYWORD1>
- <KEYWORD1>PRNLD</KEYWORD1>
- <KEYWORD1>PRNS</KEYWORD1>
- <KEYWORD1>PRNSOL</KEYWORD1>
- <KEYWORD1>PROD</KEYWORD1>
- <KEYWORD1>PROD</KEYWORD1>
- <KEYWORD1>PRPA</KEYWORD1>
- <KEYWORD1>PRPATH</KEYWORD1>
- <KEYWORD1>PRRF</KEYWORD1>
- <KEYWORD1>PRRFOR</KEYWORD1>
- <KEYWORD1>PRRS</KEYWORD1>
- <KEYWORD1>PRRSOL</KEYWORD1>
- <KEYWORD1>PRSE</KEYWORD1>
- <KEYWORD1>PRSECT</KEYWORD1>
- <KEYWORD1>PRSS</KEYWORD1>
- <KEYWORD1>PRSSOL</KEYWORD1>
- <KEYWORD1>PRTI</KEYWORD1>
- <KEYWORD1>PRTIME</KEYWORD1>
- <KEYWORD1>PRVA</KEYWORD1>
- <KEYWORD1>PRVA</KEYWORD1>
- <KEYWORD1>PRVAR</KEYWORD1>
- <KEYWORD1>PRVAROPT</KEYWORD1>
- <KEYWORD1>PRVE</KEYWORD1>
- <KEYWORD1>PRVECT</KEYWORD1>
- <KEYWORD1>PSCR</KEYWORD1>
- <KEYWORD1>PSCR</KEYWORD1>
- <KEYWORD1>PSDC</KEYWORD1>
- <KEYWORD1>PSDCOM</KEYWORD1>
- <KEYWORD1>PSDF</KEYWORD1>
- <KEYWORD1>PSDFRQ</KEYWORD1>
- <KEYWORD1>PSDR</KEYWORD1>
- <KEYWORD1>PSDRES</KEYWORD1>
- <KEYWORD1>PSDS</KEYWORD1>
- <KEYWORD1>PSDSPL</KEYWORD1>
- <KEYWORD1>PSDU</KEYWORD1>
- <KEYWORD1>PSDUNIT</KEYWORD1>
- <KEYWORD1>PSDV</KEYWORD1>
- <KEYWORD1>PSDVAL</KEYWORD1>
- <KEYWORD1>PSDW</KEYWORD1>
- <KEYWORD1>PSDWAV</KEYWORD1>
- <KEYWORD1>PSEL</KEYWORD1>
- <KEYWORD1>PSEL</KEYWORD1>
- <KEYWORD1>PSOL</KEYWORD1>
- <KEYWORD1>PSOLVE</KEYWORD1>
- <KEYWORD1>PSPE</KEYWORD1>
- <KEYWORD1>PSPEC</KEYWORD1>
- <KEYWORD1>PSPR</KEYWORD1>
- <KEYWORD1>PSPRNG</KEYWORD1>
- <KEYWORD1>PSTR</KEYWORD1>
- <KEYWORD1>PSTRES</KEYWORD1>
- <KEYWORD1>PTEM</KEYWORD1>
- <KEYWORD1>PTEMP</KEYWORD1>
- <KEYWORD1>PTXY</KEYWORD1>
- <KEYWORD1>PTXY</KEYWORD1>
- <KEYWORD1>PUNI</KEYWORD1>
- <KEYWORD1>PUNIT</KEYWORD1>
- <KEYWORD1>PVEC</KEYWORD1>
- <KEYWORD1>PVECT</KEYWORD1>
- <KEYWORD1>QDVA</KEYWORD1>
- <KEYWORD1>QDVAL</KEYWORD1>
- <KEYWORD1>QFAC</KEYWORD1>
- <KEYWORD1>QFACT</KEYWORD1>
- <KEYWORD1>QUAD</KEYWORD1>
- <KEYWORD1>QUAD</KEYWORD1>
- <KEYWORD1>QUOT</KEYWORD1>
- <KEYWORD1>QUOT</KEYWORD1>
- <KEYWORD1>R</KEYWORD1>
- <KEYWORD1>RACE</KEYWORD1>
- <KEYWORD1>RACE</KEYWORD1>
- <KEYWORD1>RALL</KEYWORD1>
- <KEYWORD1>RALL</KEYWORD1>
- <KEYWORD1>RAPP</KEYWORD1>
- <KEYWORD1>RAPPND</KEYWORD1>
- <KEYWORD1>RBE3</KEYWORD1>
- <KEYWORD1>RBE3</KEYWORD1>
- <KEYWORD1>RCON</KEYWORD1>
- <KEYWORD1>RCON</KEYWORD1>
- <KEYWORD1>RDEL</KEYWORD1>
- <KEYWORD1>RDELE</KEYWORD1>
- <KEYWORD1>REAL</KEYWORD1>
- <KEYWORD1>REAL</KEYWORD1>
- <KEYWORD1>REAL</KEYWORD1>
- <KEYWORD1>REALVAR</KEYWORD1>
- <KEYWORD1>RECT</KEYWORD1>
- <KEYWORD1>RECTNG</KEYWORD1>
- <KEYWORD1>REDU</KEYWORD1>
- <KEYWORD1>REDUCE</KEYWORD1>
- <KEYWORD1>REFL</KEYWORD1>
- <KEYWORD1>REFLCOEF</KEYWORD1>
- <KEYWORD1>REOR</KEYWORD1>
- <KEYWORD1>REORDER</KEYWORD1>
- <KEYWORD1>RESE</KEYWORD1>
- <KEYWORD1>RESET</KEYWORD1>
- <KEYWORD1>RESP</KEYWORD1>
- <KEYWORD1>RESP</KEYWORD1>
- <KEYWORD1>RESU</KEYWORD1>
- <KEYWORD1>RESUME</KEYWORD1>
- <KEYWORD1>REXP</KEYWORD1>
- <KEYWORD1>REXPORT</KEYWORD1>
- <KEYWORD1>RFIL</KEYWORD1>
- <KEYWORD1>RFILSZ</KEYWORD1>
- <KEYWORD1>RFOR</KEYWORD1>
- <KEYWORD1>RFORCE</KEYWORD1>
- <KEYWORD1>RIGI</KEYWORD1>
- <KEYWORD1>RIGID</KEYWORD1>
- <KEYWORD1>RIMP</KEYWORD1>
- <KEYWORD1>RIMPORT</KEYWORD1>
- <KEYWORD1>RITE</KEYWORD1>
- <KEYWORD1>RITER</KEYWORD1>
- <KEYWORD1>RLIS</KEYWORD1>
- <KEYWORD1>RLIST</KEYWORD1>
- <KEYWORD1>RMEM</KEYWORD1>
- <KEYWORD1>RMEMRY</KEYWORD1>
- <KEYWORD1>RMOD</KEYWORD1>
- <KEYWORD1>RMODIF</KEYWORD1>
- <KEYWORD1>RMOR</KEYWORD1>
- <KEYWORD1>RMORE</KEYWORD1>
- <KEYWORD1>ROCK</KEYWORD1>
- <KEYWORD1>ROCK</KEYWORD1>
- <KEYWORD1>RPOL</KEYWORD1>
- <KEYWORD1>RPOLY</KEYWORD1>
- <KEYWORD1>RPR4</KEYWORD1>
- <KEYWORD1>RPR4</KEYWORD1>
- <KEYWORD1>RPRI</KEYWORD1>
- <KEYWORD1>RPRISM</KEYWORD1>
- <KEYWORD1>RPSD</KEYWORD1>
- <KEYWORD1>RPSD</KEYWORD1>
- <KEYWORD1>RSPE</KEYWORD1>
- <KEYWORD1>RSPEED</KEYWORD1>
- <KEYWORD1>RSTA</KEYWORD1>
- <KEYWORD1>RSTAT</KEYWORD1>
- <KEYWORD1>RSYS</KEYWORD1>
- <KEYWORD1>RSYS</KEYWORD1>
- <KEYWORD1>RTIM</KEYWORD1>
- <KEYWORD1>RTIMST</KEYWORD1>
- <KEYWORD1>RUN</KEYWORD1>
- <KEYWORD1>RWFR</KEYWORD1>
- <KEYWORD1>RWFRNT</KEYWORD1>
- <KEYWORD1>SABS</KEYWORD1>
- <KEYWORD1>SABS</KEYWORD1>
- <KEYWORD1>SADD</KEYWORD1>
- <KEYWORD1>SADD</KEYWORD1>
- <KEYWORD1>SALL</KEYWORD1>
- <KEYWORD1>SALLOW</KEYWORD1>
- <KEYWORD1>SARP</KEYWORD1>
- <KEYWORD1>SARPLOT</KEYWORD1>
- <KEYWORD1>SAVE</KEYWORD1>
- <KEYWORD1>SAVE</KEYWORD1>
- <KEYWORD1>SBCL</KEYWORD1>
- <KEYWORD1>SBCLIST</KEYWORD1>
- <KEYWORD1>SBCT</KEYWORD1>
- <KEYWORD1>SBCTRAN</KEYWORD1>
- <KEYWORD1>SDEL</KEYWORD1>
- <KEYWORD1>SDELETE</KEYWORD1>
- <KEYWORD1>SE</KEYWORD1>
- <KEYWORD1>SECD</KEYWORD1>
- <KEYWORD1>SECDATA</KEYWORD1>
- <KEYWORD1>SECN</KEYWORD1>
- <KEYWORD1>SECNUM</KEYWORD1>
- <KEYWORD1>SECO</KEYWORD1>
- <KEYWORD1>SECOFFSET</KEYWORD1>
- <KEYWORD1>SECP</KEYWORD1>
- <KEYWORD1>SECPLOT</KEYWORD1>
- <KEYWORD1>SECR</KEYWORD1>
- <KEYWORD1>SECREAD</KEYWORD1>
- <KEYWORD1>SECT</KEYWORD1>
- <KEYWORD1>SECTYPE</KEYWORD1>
- <KEYWORD1>SECW</KEYWORD1>
- <KEYWORD1>SECWRITE</KEYWORD1>
- <KEYWORD1>SED</KEYWORD1>
- <KEYWORD1>SEDL</KEYWORD1>
- <KEYWORD1>SEDLIST</KEYWORD1>
- <KEYWORD1>SEEX</KEYWORD1>
- <KEYWORD1>SEEXP</KEYWORD1>
- <KEYWORD1>SELI</KEYWORD1>
- <KEYWORD1>SELIST</KEYWORD1>
- <KEYWORD1>SELM</KEYWORD1>
- <KEYWORD1>SELM</KEYWORD1>
- <KEYWORD1>SENE</KEYWORD1>
- <KEYWORD1>SENERGY</KEYWORD1>
- <KEYWORD1>SEOP</KEYWORD1>
- <KEYWORD1>SEOPT</KEYWORD1>
- <KEYWORD1>SESY</KEYWORD1>
- <KEYWORD1>SESYMM</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>SETR</KEYWORD1>
- <KEYWORD1>SETRAN</KEYWORD1>
- <KEYWORD1>SEXP</KEYWORD1>
- <KEYWORD1>SEXP</KEYWORD1>
- <KEYWORD1>SF</KEYWORD1>
- <KEYWORD1>SFA</KEYWORD1>
- <KEYWORD1>SFAC</KEYWORD1>
- <KEYWORD1>SFACT</KEYWORD1>
- <KEYWORD1>SFAD</KEYWORD1>
- <KEYWORD1>SFADELE</KEYWORD1>
- <KEYWORD1>SFAL</KEYWORD1>
- <KEYWORD1>SFALIST</KEYWORD1>
- <KEYWORD1>SFBE</KEYWORD1>
- <KEYWORD1>SFBEAM</KEYWORD1>
- <KEYWORD1>SFCA</KEYWORD1>
- <KEYWORD1>SFCALC</KEYWORD1>
- <KEYWORD1>SFCU</KEYWORD1>
- <KEYWORD1>SFCUM</KEYWORD1>
- <KEYWORD1>SFDE</KEYWORD1>
- <KEYWORD1>SFDELE</KEYWORD1>
- <KEYWORD1>SFE</KEYWORD1>
- <KEYWORD1>SFED</KEYWORD1>
- <KEYWORD1>SFEDELE</KEYWORD1>
- <KEYWORD1>SFEL</KEYWORD1>
- <KEYWORD1>SFELIST</KEYWORD1>
- <KEYWORD1>SFFU</KEYWORD1>
- <KEYWORD1>SFFUN</KEYWORD1>
- <KEYWORD1>SFGR</KEYWORD1>
- <KEYWORD1>SFGRAD</KEYWORD1>
- <KEYWORD1>SFL</KEYWORD1>
- <KEYWORD1>SFLD</KEYWORD1>
- <KEYWORD1>SFLDELE</KEYWORD1>
- <KEYWORD1>SFLI</KEYWORD1>
- <KEYWORD1>SFLIST</KEYWORD1>
- <KEYWORD1>SFLL</KEYWORD1>
- <KEYWORD1>SFLLIST</KEYWORD1>
- <KEYWORD1>SFSC</KEYWORD1>
- <KEYWORD1>SFSCALE</KEYWORD1>
- <KEYWORD1>SFTR</KEYWORD1>
- <KEYWORD1>SFTRAN</KEYWORD1>
- <KEYWORD1>SHEL</KEYWORD1>
- <KEYWORD1>SHELL</KEYWORD1>
- <KEYWORD1>SHPP</KEYWORD1>
- <KEYWORD1>SHPP</KEYWORD1>
- <KEYWORD1>SLIS</KEYWORD1>
- <KEYWORD1>SLIST</KEYWORD1>
- <KEYWORD1>SLPP</KEYWORD1>
- <KEYWORD1>SLPPLOT</KEYWORD1>
- <KEYWORD1>SLSP</KEYWORD1>
- <KEYWORD1>SLSPLOT</KEYWORD1>
- <KEYWORD1>SMAL</KEYWORD1>
- <KEYWORD1>SMALL</KEYWORD1>
- <KEYWORD1>SMAX</KEYWORD1>
- <KEYWORD1>SMAX</KEYWORD1>
- <KEYWORD1>SMBO</KEYWORD1>
- <KEYWORD1>SMBODY</KEYWORD1>
- <KEYWORD1>SMCO</KEYWORD1>
- <KEYWORD1>SMCONS</KEYWORD1>
- <KEYWORD1>SMFO</KEYWORD1>
- <KEYWORD1>SMFOR</KEYWORD1>
- <KEYWORD1>SMIN</KEYWORD1>
- <KEYWORD1>SMIN</KEYWORD1>
- <KEYWORD1>SMRT</KEYWORD1>
- <KEYWORD1>SMRTSIZE</KEYWORD1>
- <KEYWORD1>SMSU</KEYWORD1>
- <KEYWORD1>SMSURF</KEYWORD1>
- <KEYWORD1>SMUL</KEYWORD1>
- <KEYWORD1>SMULT</KEYWORD1>
- <KEYWORD1>SOLC</KEYWORD1>
- <KEYWORD1>SOLCONTROL</KEYWORD1>
- <KEYWORD1>SOLU</KEYWORD1>
- <KEYWORD1>SOLU</KEYWORD1>
- <KEYWORD1>SOLU</KEYWORD1>
- <KEYWORD1>SOLUOPT</KEYWORD1>
- <KEYWORD1>SOLV</KEYWORD1>
- <KEYWORD1>SOLVE</KEYWORD1>
- <KEYWORD1>SORT</KEYWORD1>
- <KEYWORD1>SORT</KEYWORD1>
- <KEYWORD1>SOUR</KEYWORD1>
- <KEYWORD1>SOURCE</KEYWORD1>
- <KEYWORD1>SPAC</KEYWORD1>
- <KEYWORD1>SPACE</KEYWORD1>
- <KEYWORD1>SPAR</KEYWORD1>
- <KEYWORD1>SPARM</KEYWORD1>
- <KEYWORD1>SPEC</KEYWORD1>
- <KEYWORD1>SPEC</KEYWORD1>
- <KEYWORD1>SPH4</KEYWORD1>
- <KEYWORD1>SPH4</KEYWORD1>
- <KEYWORD1>SPH5</KEYWORD1>
- <KEYWORD1>SPH5</KEYWORD1>
- <KEYWORD1>SPHE</KEYWORD1>
- <KEYWORD1>SPHERE</KEYWORD1>
- <KEYWORD1>SPLI</KEYWORD1>
- <KEYWORD1>SPLINE</KEYWORD1>
- <KEYWORD1>SPOI</KEYWORD1>
- <KEYWORD1>SPOINT</KEYWORD1>
- <KEYWORD1>SPOP</KEYWORD1>
- <KEYWORD1>SPOPT</KEYWORD1>
- <KEYWORD1>SPRE</KEYWORD1>
- <KEYWORD1>SPREAD</KEYWORD1>
- <KEYWORD1>SPTO</KEYWORD1>
- <KEYWORD1>SPTOPT</KEYWORD1>
- <KEYWORD1>SQRT</KEYWORD1>
- <KEYWORD1>SQRT</KEYWORD1>
- <KEYWORD1>SRCS</KEYWORD1>
- <KEYWORD1>SRCS</KEYWORD1>
- <KEYWORD1>SRSS</KEYWORD1>
- <KEYWORD1>SRSS</KEYWORD1>
- <KEYWORD1>SSLN</KEYWORD1>
- <KEYWORD1>SSLN</KEYWORD1>
- <KEYWORD1>SSTI</KEYWORD1>
- <KEYWORD1>SSTIF</KEYWORD1>
- <KEYWORD1>SSUM</KEYWORD1>
- <KEYWORD1>SSUM</KEYWORD1>
- <KEYWORD1>STAT</KEYWORD1>
- <KEYWORD1>STAT</KEYWORD1>
- <KEYWORD1>STEF</KEYWORD1>
- <KEYWORD1>STEF</KEYWORD1>
- <KEYWORD1>STOR</KEYWORD1>
- <KEYWORD1>STORE</KEYWORD1>
- <KEYWORD1>SUBO</KEYWORD1>
- <KEYWORD1>SUBOPT</KEYWORD1>
- <KEYWORD1>SUBS</KEYWORD1>
- <KEYWORD1>SUBSET</KEYWORD1>
- <KEYWORD1>SUMT</KEYWORD1>
- <KEYWORD1>SUMTYPE</KEYWORD1>
- <KEYWORD1>SV</KEYWORD1>
- <KEYWORD1>SVTY</KEYWORD1>
- <KEYWORD1>SVTYP</KEYWORD1>
- <KEYWORD1>TALL</KEYWORD1>
- <KEYWORD1>TALLOW</KEYWORD1>
- <KEYWORD1>TB</KEYWORD1>
- <KEYWORD1>TBCO</KEYWORD1>
- <KEYWORD1>TBCOPY</KEYWORD1>
- <KEYWORD1>TBDA</KEYWORD1>
- <KEYWORD1>TBDATA</KEYWORD1>
- <KEYWORD1>TBDE</KEYWORD1>
- <KEYWORD1>TBDELE</KEYWORD1>
- <KEYWORD1>TBLE</KEYWORD1>
- <KEYWORD1>TBLE</KEYWORD1>
- <KEYWORD1>TBLI</KEYWORD1>
- <KEYWORD1>TBLIST</KEYWORD1>
- <KEYWORD1>TBMO</KEYWORD1>
- <KEYWORD1>TBMODIF</KEYWORD1>
- <KEYWORD1>TBPL</KEYWORD1>
- <KEYWORD1>TBPLOT</KEYWORD1>
- <KEYWORD1>TBPT</KEYWORD1>
- <KEYWORD1>TBPT</KEYWORD1>
- <KEYWORD1>TBTE</KEYWORD1>
- <KEYWORD1>TBTEMP</KEYWORD1>
- <KEYWORD1>TCHG</KEYWORD1>
- <KEYWORD1>TCHG</KEYWORD1>
- <KEYWORD1>TEE</KEYWORD1>
- <KEYWORD1>TERM</KEYWORD1>
- <KEYWORD1>TERM</KEYWORD1>
- <KEYWORD1>TIME</KEYWORD1>
- <KEYWORD1>TIME</KEYWORD1>
- <KEYWORD1>TIME</KEYWORD1>
- <KEYWORD1>TIMERANGE</KEYWORD1>
- <KEYWORD1>TIMI</KEYWORD1>
- <KEYWORD1>TIMINT</KEYWORD1>
- <KEYWORD1>TIMP</KEYWORD1>
- <KEYWORD1>TIMP</KEYWORD1>
- <KEYWORD1>TINT</KEYWORD1>
- <KEYWORD1>TINTP</KEYWORD1>
- <KEYWORD1>TOFF</KEYWORD1>
- <KEYWORD1>TOFFST</KEYWORD1>
- <KEYWORD1>TOPD</KEYWORD1>
- <KEYWORD1>TOPDEF</KEYWORD1>
- <KEYWORD1>TOPE</KEYWORD1>
- <KEYWORD1>TOPEXE</KEYWORD1>
- <KEYWORD1>TOPI</KEYWORD1>
- <KEYWORD1>TOPITER</KEYWORD1>
- <KEYWORD1>TORQ2D</KEYWORD1>
- <KEYWORD1>TORQ</KEYWORD1>
- <KEYWORD1>TORQ</KEYWORD1>
- <KEYWORD1>TORQ</KEYWORD1>
- <KEYWORD1>TORQC2D</KEYWORD1>
- <KEYWORD1>TORQSUM</KEYWORD1>
- <KEYWORD1>TORU</KEYWORD1>
- <KEYWORD1>TORUS</KEYWORD1>
- <KEYWORD1>TOTA</KEYWORD1>
- <KEYWORD1>TOTAL</KEYWORD1>
- <KEYWORD1>TRAN</KEYWORD1>
- <KEYWORD1>TRAN</KEYWORD1>
- <KEYWORD1>TRANS</KEYWORD1>
- <KEYWORD1>TRANSFER</KEYWORD1>
- <KEYWORD1>TREF</KEYWORD1>
- <KEYWORD1>TREF</KEYWORD1>
- <KEYWORD1>TRNO</KEYWORD1>
- <KEYWORD1>TRNOPT</KEYWORD1>
- <KEYWORD1>TRPD</KEYWORD1>
- <KEYWORD1>TRPDEL</KEYWORD1>
- <KEYWORD1>TRPL</KEYWORD1>
- <KEYWORD1>TRPLIS</KEYWORD1>
- <KEYWORD1>TRPO</KEYWORD1>
- <KEYWORD1>TRPOIN</KEYWORD1>
- <KEYWORD1>TRTI</KEYWORD1>
- <KEYWORD1>TRTIME</KEYWORD1>
- <KEYWORD1>TSHA</KEYWORD1>
- <KEYWORD1>TSHAP</KEYWORD1>
- <KEYWORD1>TSRE</KEYWORD1>
- <KEYWORD1>TSRES</KEYWORD1>
- <KEYWORD1>TUNI</KEYWORD1>
- <KEYWORD1>TUNIF</KEYWORD1>
- <KEYWORD1>TVAR</KEYWORD1>
- <KEYWORD1>TVAR</KEYWORD1>
- <KEYWORD1>TYPE</KEYWORD1>
- <KEYWORD1>TYPE</KEYWORD1>
- <KEYWORD1>UIMP</KEYWORD1>
- <KEYWORD1>UIMP</KEYWORD1>
- <KEYWORD1>UPCO</KEYWORD1>
- <KEYWORD1>UPCOORD</KEYWORD1>
- <KEYWORD1>UPGE</KEYWORD1>
- <KEYWORD1>UPGEOM</KEYWORD1>
- <KEYWORD1>USRC</KEYWORD1>
- <KEYWORD1>USRCAL</KEYWORD1>
- <KEYWORD1>V</KEYWORD1>
- <KEYWORD1>VA</KEYWORD1>
- <KEYWORD1>VADD</KEYWORD1>
- <KEYWORD1>VADD</KEYWORD1>
- <KEYWORD1>VALV</KEYWORD1>
- <KEYWORD1>VALVE</KEYWORD1>
- <KEYWORD1>VARD</KEYWORD1>
- <KEYWORD1>VARDEL</KEYWORD1>
- <KEYWORD1>VARN</KEYWORD1>
- <KEYWORD1>VARNAM</KEYWORD1>
- <KEYWORD1>VATT</KEYWORD1>
- <KEYWORD1>VATT</KEYWORD1>
- <KEYWORD1>VCLE</KEYWORD1>
- <KEYWORD1>VCLEAR</KEYWORD1>
- <KEYWORD1>VCRO</KEYWORD1>
- <KEYWORD1>VCROSS</KEYWORD1>
- <KEYWORD1>VCVF</KEYWORD1>
- <KEYWORD1>VCVFILL</KEYWORD1>
- <KEYWORD1>VDDA</KEYWORD1>
- <KEYWORD1>VDDAM</KEYWORD1>
- <KEYWORD1>VDEL</KEYWORD1>
- <KEYWORD1>VDELE</KEYWORD1>
- <KEYWORD1>VDGL</KEYWORD1>
- <KEYWORD1>VDGL</KEYWORD1>
- <KEYWORD1>VDOT</KEYWORD1>
- <KEYWORD1>VDOT</KEYWORD1>
- <KEYWORD1>VDRA</KEYWORD1>
- <KEYWORD1>VDRAG</KEYWORD1>
- <KEYWORD1>VEXT</KEYWORD1>
- <KEYWORD1>VEXT</KEYWORD1>
- <KEYWORD1>VGEN</KEYWORD1>
- <KEYWORD1>VGEN</KEYWORD1>
- <KEYWORD1>VGET</KEYWORD1>
- <KEYWORD1>VGET</KEYWORD1>
- <KEYWORD1>VGLU</KEYWORD1>
- <KEYWORD1>VGLUE</KEYWORD1>
- <KEYWORD1>VIMP</KEYWORD1>
- <KEYWORD1>VIMP</KEYWORD1>
- <KEYWORD1>VINP</KEYWORD1>
- <KEYWORD1>VINP</KEYWORD1>
- <KEYWORD1>VINV</KEYWORD1>
- <KEYWORD1>VINV</KEYWORD1>
- <KEYWORD1>VLIS</KEYWORD1>
- <KEYWORD1>VLIST</KEYWORD1>
- <KEYWORD1>VLSC</KEYWORD1>
- <KEYWORD1>VLSCALE</KEYWORD1>
- <KEYWORD1>VMES</KEYWORD1>
- <KEYWORD1>VMESH</KEYWORD1>
- <KEYWORD1>VOFF</KEYWORD1>
- <KEYWORD1>VOFFST</KEYWORD1>
- <KEYWORD1>VOLU</KEYWORD1>
- <KEYWORD1>VOLUMES</KEYWORD1>
- <KEYWORD1>VOVL</KEYWORD1>
- <KEYWORD1>VOVLAP</KEYWORD1>
- <KEYWORD1>VPLO</KEYWORD1>
- <KEYWORD1>VPLOT</KEYWORD1>
- <KEYWORD1>VPTN</KEYWORD1>
- <KEYWORD1>VPTN</KEYWORD1>
- <KEYWORD1>VPUT</KEYWORD1>
- <KEYWORD1>VPUT</KEYWORD1>
- <KEYWORD1>VROT</KEYWORD1>
- <KEYWORD1>VROTAT</KEYWORD1>
- <KEYWORD1>VSBA</KEYWORD1>
- <KEYWORD1>VSBA</KEYWORD1>
- <KEYWORD1>VSBV</KEYWORD1>
- <KEYWORD1>VSBV</KEYWORD1>
- <KEYWORD1>VSBW</KEYWORD1>
- <KEYWORD1>VSBW</KEYWORD1>
- <KEYWORD1>VSEL</KEYWORD1>
- <KEYWORD1>VSEL</KEYWORD1>
- <KEYWORD1>VSLA</KEYWORD1>
- <KEYWORD1>VSLA</KEYWORD1>
- <KEYWORD1>VSUM</KEYWORD1>
- <KEYWORD1>VSUM</KEYWORD1>
- <KEYWORD1>VSWE</KEYWORD1>
- <KEYWORD1>VSWEEP</KEYWORD1>
- <KEYWORD1>VSYM</KEYWORD1>
- <KEYWORD1>VSYMM</KEYWORD1>
- <KEYWORD1>VTRA</KEYWORD1>
- <KEYWORD1>VTRAN</KEYWORD1>
- <KEYWORD1>VTYP</KEYWORD1>
- <KEYWORD1>VTYPE</KEYWORD1>
- <KEYWORD1>WAVE</KEYWORD1>
- <KEYWORD1>WAVES</KEYWORD1>
- <KEYWORD1>WERA</KEYWORD1>
- <KEYWORD1>WERASE</KEYWORD1>
- <KEYWORD1>WFRO</KEYWORD1>
- <KEYWORD1>WFRONT</KEYWORD1>
- <KEYWORD1>WMOR</KEYWORD1>
- <KEYWORD1>WMORE</KEYWORD1>
- <KEYWORD1>WPAV</KEYWORD1>
- <KEYWORD1>WPAVE</KEYWORD1>
- <KEYWORD1>WPCS</KEYWORD1>
- <KEYWORD1>WPCSYS</KEYWORD1>
- <KEYWORD1>WPLA</KEYWORD1>
- <KEYWORD1>WPLANE</KEYWORD1>
- <KEYWORD1>WPOF</KEYWORD1>
- <KEYWORD1>WPOFFS</KEYWORD1>
- <KEYWORD1>WPRO</KEYWORD1>
- <KEYWORD1>WPROTA</KEYWORD1>
- <KEYWORD1>WPST</KEYWORD1>
- <KEYWORD1>WPSTYL</KEYWORD1>
- <KEYWORD1>WRIT</KEYWORD1>
- <KEYWORD1>WRITE</KEYWORD1>
- <KEYWORD1>WSOR</KEYWORD1>
- <KEYWORD1>WSORT</KEYWORD1>
- <KEYWORD1>WSTA</KEYWORD1>
- <KEYWORD1>WSTART</KEYWORD1>
- <KEYWORD1>XVAR</KEYWORD1>
- <KEYWORD1>XVAR</KEYWORD1>
- <KEYWORD1>XVAROPT</KEYWORD1>
-
-<!-- Material properties (short notation) -->
-
- <KEYWORD1>ex</KEYWORD1>
- <KEYWORD1>ey</KEYWORD1>
- <KEYWORD1>ez</KEYWORD1>
- <KEYWORD1>nuxy</KEYWORD1>
- <KEYWORD1>nuxz</KEYWORD1>
- <KEYWORD1>nuyz</KEYWORD1>
- <KEYWORD1>gxy</KEYWORD1>
- <KEYWORD1>gxz</KEYWORD1>
- <KEYWORD1>gyz</KEYWORD1>
- <KEYWORD1>alpx</KEYWORD1>
- <KEYWORD1>alpy</KEYWORD1>
- <KEYWORD1>alpz</KEYWORD1>
- <KEYWORD1>kxx</KEYWORD1>
- <KEYWORD1>kyy</KEYWORD1>
- <KEYWORD1>kzz</KEYWORD1>
- <KEYWORD1>dens</KEYWORD1>
- <KEYWORD1>damp</KEYWORD1>
- <KEYWORD1>mu</KEYWORD1>
- <KEYWORD1>prxy</KEYWORD1>
-
-<!-- *get functions (abbreviated) -->
-
- <KEYWORD2>ANGLEK</KEYWORD2>
- <KEYWORD2>ANGLEN</KEYWORD2>
- <KEYWORD2>AREAKP</KEYWORD2>
- <KEYWORD2>AREAND</KEYWORD2>
- <KEYWORD2>ARFACE</KEYWORD2>
- <KEYWORD2>ARNEXT</KEYWORD2>
- <KEYWORD2>ARNODE</KEYWORD2>
- <KEYWORD2>AX</KEYWORD2>
- <KEYWORD2>AY</KEYWORD2>
- <KEYWORD2>AZ</KEYWORD2>
- <KEYWORD2>CENTRX</KEYWORD2>
- <KEYWORD2>CENTRY</KEYWORD2>
- <KEYWORD2>CENTRZ</KEYWORD2>
- <KEYWORD2>DISTEN</KEYWORD2>
- <KEYWORD2>DISTKP</KEYWORD2>
- <KEYWORD2>DISTND</KEYWORD2>
- <KEYWORD2>ELADJ</KEYWORD2>
- <KEYWORD2>ELNEXT</KEYWORD2>
- <KEYWORD2>ENDS</KEYWORD2>
- <KEYWORD2>ENEARN</KEYWORD2>
- <KEYWORD2>ENEXTN</KEYWORD2>
- <KEYWORD2>ENKE</KEYWORD2>
- <KEYWORD2>KNEAR</KEYWORD2>
- <KEYWORD2>KP</KEYWORD2>
- <KEYWORD2>KPNEXT</KEYWORD2>
- <KEYWORD2>KX</KEYWORD2>
- <KEYWORD2>KY</KEYWORD2>
- <KEYWORD2>KZ</KEYWORD2>
- <KEYWORD2>LOC</KEYWORD2>
- <KEYWORD2>LSNEXT</KEYWORD2>
- <KEYWORD2>LSX</KEYWORD2>
- <KEYWORD2>LSY</KEYWORD2>
- <KEYWORD2>LSZ</KEYWORD2>
- <KEYWORD2>LX</KEYWORD2>
- <KEYWORD2>LY</KEYWORD2>
- <KEYWORD2>LZ</KEYWORD2>
- <KEYWORD2>MAG</KEYWORD2>
- <KEYWORD2>NDFACE</KEYWORD2>
- <KEYWORD2>NDNEXT</KEYWORD2>
- <KEYWORD2>NELEM</KEYWORD2>
- <KEYWORD2>NMFACE</KEYWORD2>
- <KEYWORD2>NNEAR</KEYWORD2>
- <KEYWORD2>NODE</KEYWORD2>
- <KEYWORD2>NORMKX</KEYWORD2>
- <KEYWORD2>NORMKY</KEYWORD2>
- <KEYWORD2>NORMKZ</KEYWORD2>
- <KEYWORD2>NORMNX</KEYWORD2>
- <KEYWORD2>NORMNY</KEYWORD2>
- <KEYWORD2>NORMNZ</KEYWORD2>
- <KEYWORD2>NX</KEYWORD2>
- <KEYWORD2>NY</KEYWORD2>
- <KEYWORD2>NZ</KEYWORD2>
- <KEYWORD2>PRES</KEYWORD2>
- <KEYWORD2>ROTX</KEYWORD2>
- <KEYWORD2>ROTY</KEYWORD2>
- <KEYWORD2>ROTZ</KEYWORD2>
- <KEYWORD2>TEMP</KEYWORD2>
- <KEYWORD2>UX</KEYWORD2>
- <KEYWORD2>UY</KEYWORD2>
- <KEYWORD2>UZ</KEYWORD2>
- <KEYWORD2>VLNEXT</KEYWORD2>
- <KEYWORD2>VOLT</KEYWORD2>
- <KEYWORD2>VX</KEYWORD2>
- <KEYWORD2>VY</KEYWORD2>
- <KEYWORD2>VZ</KEYWORD2>
-
- <!-- [Keywords 3] -->
- <!-- command option labels -->
-
- <!-- AADD command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- *ABBRES command -->
- <KEYWORD3>new</KEYWORD3>
- <KEYWORD3>change</KEYWORD3>
-
- <!-- *AFUN command -->
- <KEYWORD3>rad</KEYWORD3>
- <KEYWORD3>deg</KEYWORD3>
-
- <!-- ALIST command -->
- <KEYWORD3>hpt</KEYWORD3>
-
- <!-- ALLSEL command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>below</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>kp</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>node</KEYWORD3>
-
- <!-- /ANFILE command -->
- <KEYWORD3>,save</KEYWORD3>
- <KEYWORD3>resume</KEYWORD3>
-
- <!-- /ANNOT command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
- <KEYWORD3>,save</KEYWORD3>
- <KEYWORD3>scale</KEYWORD3>
- <KEYWORD3>xorig</KEYWORD3>
- <KEYWORD3>yorig</KEYWORD3>
- <KEYWORD3>snap</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>defa</KEYWORD3>
- <KEYWORD3>refr</KEYWORD3>
-
- <!-- ANTYPE command -->
- <KEYWORD3>static</KEYWORD3>
- <KEYWORD3>buckle</KEYWORD3>
- <KEYWORD3>modal</KEYWORD3>
- <KEYWORD3>harmic</KEYWORD3>
- <KEYWORD3>trans</KEYWORD3>
- <KEYWORD3>substr</KEYWORD3>
- <KEYWORD3>spectr</KEYWORD3>
- <KEYWORD3>new</KEYWORD3>
- <KEYWORD3>rest</KEYWORD3>
-
- <!-- APLOT command -->
- <KEYWORD3>dege</KEYWORD3>
-
- <!-- APPEND command -->
- <KEYWORD3>first</KEYWORD3>
- <KEYWORD3>next</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>near</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
-
- <!-- ARCTRM command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>,l</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
-
- <!-- AREFINE command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>smooth</KEYWORD3>
- <KEYWORD3>clean</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- ARSPLIT command -->
- <KEYWORD3>tight</KEYWORD3>
-
- <!--ARSYM command -->
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
-
- <!--ASBA, ASBL, ASBV, ASBW commands -->
- <KEYWORD3>sepo</KEYWORD3>
- <KEYWORD3>delete</KEYWORD3>
- <KEYWORD3>keep</KEYWORD3>
-
- <!-- ASEL command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>inve</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>ext</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>hpt</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>,real</KEYWORD3>
- <KEYWORD3>,esys</KEYWORD3>
- <KEYWORD3>acca</KEYWORD3>
-
- <!-- ASLL, ASLV commands -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
-
- <!-- /ASSIGN command -->
- <KEYWORD3>emat</KEYWORD3>
- <KEYWORD3>esav</KEYWORD3>
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>redm</KEYWORD3>
- <KEYWORD3>mode</KEYWORD3>
- <KEYWORD3>rdsp</KEYWORD3>
- <KEYWORD3>rfrq</KEYWORD3>
- <KEYWORD3>tri</KEYWORD3>
- <KEYWORD3>rst</KEYWORD3>
- <KEYWORD3>rth</KEYWORD3>
- <KEYWORD3>rmg</KEYWORD3>
- <KEYWORD3>erot</KEYWORD3>
- <KEYWORD3>osav</KEYWORD3>
- <KEYWORD3>rfl</KEYWORD3>
- <KEYWORD3>seld</KEYWORD3>
-
- <!-- ASUM command -->
- <KEYWORD3>default</KEYWORD3>
- <KEYWORD3>fine</KEYWORD3>
-
- <!-- AUTOTS command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- /AXLAB command -->
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
-
- <!-- /BATCH command -->
- <KEYWORD3>list</KEYWORD3>
-
- <!-- /BEND command -->
- <KEYWORD3>lr</KEYWORD3>
- <KEYWORD3>sr</KEYWORD3>
-
- <!-- BF, BFA, BFADELE, BFALIST, BFCUM, BFDELE, BFE, BFECUM, BFEDELE, BFELIST, BFESCAL -->
- <!-- BFK, BFKDELE, BFKLIST, BFL, BFLDELE, BFLIST, BFLLIST, BFSCALE, BFUNIF, BFV, -->
- <!-- BFVDELE, BFVLIST commands -->
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>flue</KEYWORD3>
- <KEYWORD3>hgen</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>vltg</KEYWORD3>
- <KEYWORD3>mvdi</KEYWORD3>
- <KEYWORD3>chrgd</KEYWORD3>
- <KEYWORD3>forc</KEYWORD3>
- <KEYWORD3>repl</KEYWORD3>
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>igno</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
-
- <!-- BIOT command -->
- <KEYWORD3>new</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
-
- <!-- BOPTN command -->
- <KEYWORD3>defa</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>keep</KEYWORD3>
- <KEYWORD3>nwarn</KEYWORD3>
- <KEYWORD3>version</KEYWORD3>
- <KEYWORD3>no</KEYWORD3>
- <KEYWORD3>yes</KEYWORD3>
- <KEYWORD3>rv52</KEYWORD3>
- <KEYWORD3>rv51</KEYWORD3>
-
- <!-- BUCOPT command -->
- <KEYWORD3>subsp</KEYWORD3>
- <KEYWORD3>lanb</KEYWORD3>
- <KEYWORD3>reduc</KEYWORD3>
-
- <!-- CDREAD, CDWRITE commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>db</KEYWORD3>
- <KEYWORD3>solid</KEYWORD3>
- <KEYWORD3>comb</KEYWORD3>
- <KEYWORD3>geom</KEYWORD3>
- <KEYWORD3>cm</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>load</KEYWORD3>
- <KEYWORD3>blocked</KEYWORD3>
- <KEYWORD3>unblocked</KEYWORD3>
-
- <!-- CELIST command -->
- <KEYWORD3>any</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- CERIG command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>uxyz</KEYWORD3>
- <KEYWORD3>rxyz</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
-
- <!-- CFOPEN command -->
- <KEYWORD3>append</KEYWORD3>
-
- <!-- CHECK command -->
- <KEYWORD3>,esel</KEYWORD3>
- <KEYWORD3>warn</KEYWORD3>
- <KEYWORD3>err</KEYWORD3>
-
- <!-- CLEAR command -->
- <KEYWORD3>start</KEYWORD3>
- <KEYWORD3>nostart</KEYWORD3>
-
- <!-- CLOCAL, CS, CSKP, CSWPLA commands -->
- <KEYWORD3>cart</KEYWORD3>
- <KEYWORD3>cylin</KEYWORD3>
- <KEYWORD3>sphe</KEYWORD3>
- <KEYWORD3>toro</KEYWORD3>
-
- <!-- CM command -->
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>kp</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>node</KEYWORD3>
-
- <!-- CMAP command -->
- <KEYWORD3>create</KEYWORD3>
-
- <!-- CMEDIT command -->
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
-
- <!-- CMPLOT command -->
- <KEYWORD3>,n</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- CMSEL command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
-
- <!-- CNVTOL command -->
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>vf</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>curt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>vltg</KEYWORD3>
-
- <!-- COLOR command -->
- <KEYWORD3>axes</KEYWORD3>
- <KEYWORD3>axnum</KEYWORD3>
- <KEYWORD3>num</KEYWORD3>
- <KEYWORD3>outl</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>isurf</KEYWORD3>
- <KEYWORD3>wbak</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>sp01</KEYWORD3>
- <KEYWORD3>sp02</KEYWORD3>
- <KEYWORD3>sp03</KEYWORD3>
- <KEYWORD3>sp04</KEYWORD3>
- <KEYWORD3>sp05</KEYWORD3>
- <KEYWORD3>sp06</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>vf</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>curt</KEYWORD3>
- <KEYWORD3>vltg</KEYWORD3>
- <KEYWORD3>mast</KEYWORD3>
- <KEYWORD3>,cp</KEYWORD3>
- <KEYWORD3>,ce</KEYWORD3>
- <KEYWORD3>nfor</KEYWORD3>
- <KEYWORD3>nmom</KEYWORD3>
- <KEYWORD3>rfor</KEYWORD3>
- <KEYWORD3>rmom</KEYWORD3>
- <KEYWORD3>path</KEYWORD3>
- <KEYWORD3>grbak</KEYWORD3>
- <KEYWORD3>grid</KEYWORD3>
- <KEYWORD3>axlab</KEYWORD3>
- <KEYWORD3>curve</KEYWORD3>
- <KEYWORD3>cm</KEYWORD3>
- <KEYWORD3>cntr</KEYWORD3>
- <KEYWORD3>smax</KEYWORD3>
- <KEYWORD3>smin</KEYWORD3>
- <KEYWORD3>mred</KEYWORD3>
- <KEYWORD3>cblu</KEYWORD3>
- <KEYWORD3>ygre</KEYWORD3>
- <KEYWORD3>dgra</KEYWORD3>
- <KEYWORD3>mage</KEYWORD3>
- <KEYWORD3>cyan</KEYWORD3>
- <KEYWORD3>yell</KEYWORD3>
- <KEYWORD3>lgra</KEYWORD3>
- <KEYWORD3>bmag</KEYWORD3>
- <KEYWORD3>gcya</KEYWORD3>
- <KEYWORD3>oran</KEYWORD3>
- <KEYWORD3>whit</KEYWORD3>
- <KEYWORD3>blue</KEYWORD3>
- <KEYWORD3>gree</KEYWORD3>
- <KEYWORD3>red</KEYWORD3>
- <KEYWORD3>blac</KEYWORD3>
-
- <!-- CONFIG command -->
- <KEYWORD3>nres</KEYWORD3>
- <KEYWORD3>nbuf</KEYWORD3>
- <KEYWORD3>nproc</KEYWORD3>
- <KEYWORD3>locfl</KEYWORD3>
- <KEYWORD3>szbio</KEYWORD3>
- <KEYWORD3>ncont</KEYWORD3>
- <KEYWORD3>order</KEYWORD3>
- <KEYWORD3>fsplit</KEYWORD3>
- <KEYWORD3>mxnd</KEYWORD3>
- <KEYWORD3>mxel</KEYWORD3>
- <KEYWORD3>mxkp</KEYWORD3>
- <KEYWORD3>mxls</KEYWORD3>
- <KEYWORD3>mxar</KEYWORD3>
- <KEYWORD3>mxvl</KEYWORD3>
- <KEYWORD3>mxrl</KEYWORD3>
- <KEYWORD3>mxcp</KEYWORD3>
- <KEYWORD3>mxce</KEYWORD3>
- <KEYWORD3>nlcontrol</KEYWORD3>
-
- <!-- CP command -->
- <KEYWORD3>high</KEYWORD3>
- <KEYWORD3>next</KEYWORD3>
-
- <!-- CPDELE, CPLIST commands -->
- <KEYWORD3>any</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- CPINTF, D, DA, DADELE, DDELE, DK, DL, DLDELE, DOF, DOFSEL, FKLIST commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>ax</KEYWORD3>
- <KEYWORD3>ay</KEYWORD3>
- <KEYWORD3>az</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>sp01</KEYWORD3>
- <KEYWORD3>sp02</KEYWORD3>
- <KEYWORD3>sp03</KEYWORD3>
- <KEYWORD3>sp04</KEYWORD3>
- <KEYWORD3>sp05</KEYWORD3>
- <KEYWORD3>sp06</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>symm</KEYWORD3>
- <KEYWORD3>asym</KEYWORD3>
- <KEYWORD3>delete</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>disp</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>en</KEYWORD3>
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>fy</KEYWORD3>
- <KEYWORD3>fz</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>my</KEYWORD3>
- <KEYWORD3>mz</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>forc</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>chrg</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>csgx</KEYWORD3>
- <KEYWORD3>csgy</KEYWORD3>
- <KEYWORD3>csgz</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
-
- <!-- CQC command -->
- <KEYWORD3>disp</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
-
- <!-- CSDELE, CSLIST commands -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- CUTCONTROL command -->
- <KEYWORD3>plslimit</KEYWORD3>
- <KEYWORD3>crplimit</KEYWORD3>
- <KEYWORD3>dsplimit</KEYWORD3>
- <KEYWORD3>npoint</KEYWORD3>
- <KEYWORD3>noiterpredict</KEYWORD3>
-
- <!-- DCUM command -->
- <KEYWORD3>repl</KEYWORD3>
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>igno</KEYWORD3>
-
- <!-- DEL command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>_prm</KEYWORD3>
-
- <!-- DELTIM command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- DESIZE command -->
- <KEYWORD3>defa</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- DESOL, DNSOL commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>zx</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>vf</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>cmuv</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
-
- <!-- DEVDISP command -->
- <KEYWORD3>dither</KEYWORD3>
- <KEYWORD3>font</KEYWORD3>
- <KEYWORD3>text</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- DEVICE command -->
- <KEYWORD3>vector</KEYWORD3>
- <KEYWORD3>dither</KEYWORD3>
- <KEYWORD3>anim</KEYWORD3>
- <KEYWORD3>font</KEYWORD3>
- <KEYWORD3>text</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- DIM command -->
- <KEYWORD3>array</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>table</KEYWORD3>
- <KEYWORD3>time</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>velocity</KEYWORD3>
- <KEYWORD3>pressure</KEYWORD3>
-
- <!-- /DSCALE command -->
- <KEYWORD3>auto</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>user</KEYWORD3>
-
- <!-- DSUM command -->
- <KEYWORD3>disp</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
-
- <!-- DSYM command -->
- <KEYWORD3>symm</KEYWORD3>
- <KEYWORD3>asym</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
-
- <!-- DUMP command -->
- <KEYWORD3>head</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- /DV3D command -->
- <KEYWORD3>anim</KEYWORD3>
- <KEYWORD3>dgen</KEYWORD3>
- <KEYWORD3>dlist</KEYWORD3>
-
- <!-- EDBOUND command -->
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>slide</KEYWORD3>
- <KEYWORD3>cycl</KEYWORD3>
-
- <!-- EDCDELE, EDCGEN commands -->
- <KEYWORD3>ants</KEYWORD3>
- <KEYWORD3>assc</KEYWORD3>
- <KEYWORD3>asts</KEYWORD3>
- <KEYWORD3>drawbead</KEYWORD3>
- <KEYWORD3>ents</KEYWORD3>
- <KEYWORD3>ess</KEYWORD3>
- <KEYWORD3>ests</KEYWORD3>
- <KEYWORD3>nts</KEYWORD3>
- <KEYWORD3>osts</KEYWORD3>
- <KEYWORD3>rntr</KEYWORD3>
- <KEYWORD3>rotr</KEYWORD3>
- <KEYWORD3>se</KEYWORD3>
- <KEYWORD3>ss</KEYWORD3>
- <KEYWORD3>sts</KEYWORD3>
- <KEYWORD3>tdns</KEYWORD3>
- <KEYWORD3>tdss</KEYWORD3>
- <KEYWORD3>tnts</KEYWORD3>
- <KEYWORD3>tsts</KEYWORD3>
-
- <!-- EDCRB, EDCURVE, EDLCS commands -->
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
-
- <!-- EDCSC command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- EDDAMP command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- EDDRELAX command -->
- <KEYWORD3>ansys</KEYWORD3>
- <KEYWORD3>dyna</KEYWORD3>
-
- <!-- EDELE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- EDENERGY, EDFPLOT commands -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- EDHIST, EDIVELO commands -->
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
-
- <!-- EDLDPLOT, EDLOAD command -->
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>fy</KEYWORD3>
- <KEYWORD3>fz</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>my</KEYWORD3>
- <KEYWORD3>mz</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>ax</KEYWORD3>
- <KEYWORD3>ay</KEYWORD3>
- <KEYWORD3>az</KEYWORD3>
- <KEYWORD3>aclx</KEYWORD3>
- <KEYWORD3>acly</KEYWORD3>
- <KEYWORD3>aclz</KEYWORD3>
- <KEYWORD3>omgx</KEYWORD3>
- <KEYWORD3>omgy</KEYWORD3>
- <KEYWORD3>omgz</KEYWORD3>
- <KEYWORD3>press</KEYWORD3>
- <KEYWORD3>rbux</KEYWORD3>
- <KEYWORD3>rbuy</KEYWORD3>
- <KEYWORD3>rbuz</KEYWORD3>
- <KEYWORD3>rbrx</KEYWORD3>
- <KEYWORD3>rbry</KEYWORD3>
- <KEYWORD3>rbrz</KEYWORD3>
- <KEYWORD3>rbvx</KEYWORD3>
- <KEYWORD3>rbvy</KEYWORD3>
- <KEYWORD3>rbvz</KEYWORD3>
- <KEYWORD3>rbfx</KEYWORD3>
- <KEYWORD3>rbfy</KEYWORD3>
- <KEYWORD3>rbfz</KEYWORD3>
- <KEYWORD3>rbmx</KEYWORD3>
- <KEYWORD3>rbmy</KEYWORD3>
- <KEYWORD3>rbmz</KEYWORD3>
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
-
- <!-- EDMP command -->
- <KEYWORD3>hgls</KEYWORD3>
- <KEYWORD3>rigid</KEYWORD3>
- <KEYWORD3>cable</KEYWORD3>
- <KEYWORD3>ortho</KEYWORD3>
-
- <!-- EDNROT, EDOPT commands -->
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>ansys</KEYWORD3>
- <KEYWORD3>taurus</KEYWORD3>
- <KEYWORD3>both</KEYWORD3>
-
- <!-- EDOUT, EDREAD commands -->
- <KEYWORD3>glstat</KEYWORD3>
- <KEYWORD3>bndout</KEYWORD3>
- <KEYWORD3>rwforc</KEYWORD3>
- <KEYWORD3>deforc</KEYWORD3>
- <KEYWORD3>,matsum</KEYWORD3>
- <KEYWORD3>ncforc</KEYWORD3>
- <KEYWORD3>rcforc</KEYWORD3>
- <KEYWORD3>defgeo</KEYWORD3>
- <KEYWORD3>spcforc</KEYWORD3>
- <KEYWORD3>swforc</KEYWORD3>
- <KEYWORD3>rbdout</KEYWORD3>
- <KEYWORD3>gceout</KEYWORD3>
- <KEYWORD3>sleout</KEYWORD3>
- <KEYWORD3>jntforc</KEYWORD3>
- <KEYWORD3>nodout</KEYWORD3>
- <KEYWORD3>elout</KEYWORD3>
-
- <!-- EDWELD command -->
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
-
- <!-- EDWRITE command -->
- <KEYWORD3>ansys</KEYWORD3>
- <KEYWORD3>taurus</KEYWORD3>
- <KEYWORD3>both</KEYWORD3>
- <KEYWORD3>pcreate</KEYWORD3>
- <KEYWORD3>pupdate</KEYWORD3>
- <KEYWORD3>plist</KEYWORD3>
-
- <!-- EKILL, ELIST commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- *ELSEIF command -->
- <KEYWORD3>eq</KEYWORD3>
- <KEYWORD3>ne</KEYWORD3>
- <KEYWORD3>lt</KEYWORD3>
- <KEYWORD3>gt</KEYWORD3>
- <KEYWORD3>le</KEYWORD3>
- <KEYWORD3>ge</KEYWORD3>
- <KEYWORD3>ablt</KEYWORD3>
- <KEYWORD3>abgt</KEYWORD3>
-
- <!-- EMID command -->
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>remove</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>either</KEYWORD3>
- <KEYWORD3>both</KEYWORD3>
-
- <!-- EMODIF command -->
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>,real</KEYWORD3>
- <KEYWORD3>,esys</KEYWORD3>
- <KEYWORD3>secnum</KEYWORD3>
-
- <!-- EMORE, EN commands -->
- <KEYWORD3>p</KEYWORD3>
-
- <!-- EMUNIT command -->
- <KEYWORD3>mks</KEYWORD3>
- <KEYWORD3>muzro</KEYWORD3>
- <KEYWORD3>epzro</KEYWORD3>
-
- <!-- ENGEN, ENORM, ENSYM commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- EQSLV command -->
- <KEYWORD3>front</KEYWORD3>
- <KEYWORD3>sparse</KEYWORD3>
- <KEYWORD3>jcg</KEYWORD3>
- <KEYWORD3>jcgout</KEYWORD3>
- <KEYWORD3>iccg</KEYWORD3>
- <KEYWORD3>pcg</KEYWORD3>
- <KEYWORD3>pcgout</KEYWORD3>
- <KEYWORD3>iter</KEYWORD3>
-
- <!-- EREFINE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>smooth</KEYWORD3>
- <KEYWORD3>clean</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- ERESX command -->
- <KEYWORD3>defa</KEYWORD3>
- <KEYWORD3>yes</KEYWORD3>
- <KEYWORD3>no</KEYWORD3>
-
- <!-- ERNORM command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- ESEL command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>inve</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>adj</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>ename</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>,real</KEYWORD3>
- <KEYWORD3>,esys</KEYWORD3>
- <KEYWORD3>live</KEYWORD3>
- <KEYWORD3>layer</KEYWORD3>
- <KEYWORD3>sec</KEYWORD3>
- <KEYWORD3>pinc</KEYWORD3>
- <KEYWORD3>pexc</KEYWORD3>
- <KEYWORD3>sfe</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>hflux</KEYWORD3>
- <KEYWORD3>fsi</KEYWORD3>
- <KEYWORD3>impd</KEYWORD3>
- <KEYWORD3>shld</KEYWORD3>
- <KEYWORD3>mxwf</KEYWORD3>
- <KEYWORD3>chrgs</KEYWORD3>
- <KEYWORD3>inf</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>flue</KEYWORD3>
- <KEYWORD3>hgen</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>mvdi</KEYWORD3>
- <KEYWORD3>chrgd</KEYWORD3>
- <KEYWORD3>etab</KEYWORD3>
-
- <!-- ESLA, ESLL, ESLN, ESLV commands -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>active</KEYWORD3>
- <KEYWORD3>inactive</KEYWORD3>
- <KEYWORD3>corner</KEYWORD3>
- <KEYWORD3>mid</KEYWORD3>
-
- <!-- ESOL command -->
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>zx</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>cont</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>pene</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>sfric</KEYWORD3>
- <KEYWORD3>stot</KEYWORD3>
- <KEYWORD3>slide</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>vf</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>sene</KEYWORD3>
- <KEYWORD3>kene</KEYWORD3>
- <KEYWORD3>jheat</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>jt</KEYWORD3>
- <KEYWORD3>mre</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
-
- <!-- ESORT command -->
- <KEYWORD3>etab</KEYWORD3>
-
- <!-- ESURF command -->
- <KEYWORD3>top</KEYWORD3>
- <KEYWORD3>bottom</KEYWORD3>
- <KEYWORD3>reverse</KEYWORD3>
- <KEYWORD3>tri</KEYWORD3>
-
- <!-- ESYM command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- ETABLE command -->
- <KEYWORD3>refl</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>eras</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>sp01</KEYWORD3>
- <KEYWORD3>sp02</KEYWORD3>
- <KEYWORD3>sp03</KEYWORD3>
- <KEYWORD3>sp04</KEYWORD3>
- <KEYWORD3>sp05</KEYWORD3>
- <KEYWORD3>sp06</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
- <KEYWORD3>lmd1</KEYWORD3>
- <KEYWORD3>lmd2</KEYWORD3>
- <KEYWORD3>lmd3</KEYWORD3>
- <KEYWORD3>lmd4</KEYWORD3>
- <KEYWORD3>lmd5</KEYWORD3>
- <KEYWORD3>lmd6</KEYWORD3>
- <KEYWORD3>emd1</KEYWORD3>
- <KEYWORD3>emd2</KEYWORD3>
- <KEYWORD3>emd3</KEYWORD3>
- <KEYWORD3>emd4</KEYWORD3>
- <KEYWORD3>emd5</KEYWORD3>
- <KEYWORD3>emd6</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>zx</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>serr</KEYWORD3>
- <KEYWORD3>sdsg</KEYWORD3>
- <KEYWORD3>terr</KEYWORD3>
- <KEYWORD3>tdsg</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>vf</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>sene</KEYWORD3>
- <KEYWORD3>aene</KEYWORD3>
- <KEYWORD3>tene</KEYWORD3>
- <KEYWORD3>kene</KEYWORD3>
- <KEYWORD3>jheat</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>jt</KEYWORD3>
- <KEYWORD3>mre</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>cent</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>smisc</KEYWORD3>
- <KEYWORD3>nmisc</KEYWORD3>
- <KEYWORD3>surf</KEYWORD3>
- <KEYWORD3>cont</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>pene</KEYWORD3>
- <KEYWORD3>sfric</KEYWORD3>
- <KEYWORD3>stot</KEYWORD3>
- <KEYWORD3>slide</KEYWORD3>
- <KEYWORD3>gap</KEYWORD3>
- <KEYWORD3>topo</KEYWORD3>
-
- <!-- ETCHG command -->
- <KEYWORD3>eti</KEYWORD3>
- <KEYWORD3>ite</KEYWORD3>
- <KEYWORD3>tts</KEYWORD3>
- <KEYWORD3>stt</KEYWORD3>
- <KEYWORD3>mtt</KEYWORD3>
- <KEYWORD3>fts</KEYWORD3>
- <KEYWORD3>ets</KEYWORD3>
-
- <!-- ETDELE, ETLIST commands -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- EWRITE command -->
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD3>long1</KEYWORD3>
-
- <!-- /EXIT command -->
- <KEYWORD3>model</KEYWORD3>
- <KEYWORD3>solu</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>nosave</KEYWORD3>
-
- <!-- /EXPAND command -->
- <KEYWORD3>rect</KEYWORD3>
- <KEYWORD3>polar</KEYWORD3>
- <KEYWORD3>modal</KEYWORD3>
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>half</KEYWORD3>
-
- <!-- EXPASS command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- EXPSOL command -->
- <KEYWORD3>yes</KEYWORD3>
- <KEYWORD3>no</KEYWORD3>
-
- <!-- EXTOPT command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>attr</KEYWORD3>
- <KEYWORD3>esize</KEYWORD3>
- <KEYWORD3>aclear</KEYWORD3>
-
- <!-- F, FDELE, FK, FKDELE commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>fy</KEYWORD3>
- <KEYWORD3>fz</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>my</KEYWORD3>
- <KEYWORD3>mz</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>chrg</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>csgx</KEYWORD3>
- <KEYWORD3>csgy</KEYWORD3>
- <KEYWORD3>csgz</KEYWORD3>
-
- <!-- /FACET command -->
- <KEYWORD3>fine</KEYWORD3>
- <KEYWORD3>norml</KEYWORD3>
- <KEYWORD3>wire</KEYWORD3>
-
- <!-- FCUM command -->
- <KEYWORD3>repl</KEYWORD3>
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>igno</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
-
- <!-- /FDELE command -->
- <KEYWORD3>emat</KEYWORD3>
- <KEYWORD3>esav</KEYWORD3>
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>sub</KEYWORD3>
- <KEYWORD3>mode</KEYWORD3>
- <KEYWORD3>tri</KEYWORD3>
- <KEYWORD3>dsub</KEYWORD3>
- <KEYWORD3>usub</KEYWORD3>
- <KEYWORD3>osav</KEYWORD3>
- <KEYWORD3>seld</KEYWORD3>
- <KEYWORD3>keep</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
-
- <!-- FELIST command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- FILL command -->
- <KEYWORD3>p</KEYWORD3>
-
- <!-- FLDATA1 command -->
- <KEYWORD3>solu</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>turb</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>swrl</KEYWORD3>
- <KEYWORD3>tran</KEYWORD3>
- <KEYWORD3>spec</KEYWORD3>
- <KEYWORD3>true</KEYWORD3>
- <KEYWORD3>t</KEYWORD3>
- <KEYWORD3>false</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
-
- <!-- FLDATA2 command -->
- <KEYWORD3>iter</KEYWORD3>
- <KEYWORD3>exec</KEYWORD3>
- <KEYWORD3>appe</KEYWORD3>
- <KEYWORD3>over</KEYWORD3>
-
- <!-- FLDATA3 command -->
- <KEYWORD3>term</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
-
- <!-- FLDATA4 command -->
- <KEYWORD3>time</KEYWORD3>
- <KEYWORD3>step</KEYWORD3>
- <KEYWORD3>istep</KEYWORD3>
- <KEYWORD3>bc</KEYWORD3>
- <KEYWORD3>numb</KEYWORD3>
- <KEYWORD3>glob</KEYWORD3>
- <KEYWORD3>tend</KEYWORD3>
- <KEYWORD3>appe</KEYWORD3>
- <KEYWORD3>sumf</KEYWORD3>
- <KEYWORD3>over</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
-
- <!-- FLDATA4A command -->
- <KEYWORD3>step</KEYWORD3>
- <KEYWORD3>appe</KEYWORD3>
- <KEYWORD3>sumf</KEYWORD3>
- <KEYWORD3>over</KEYWORD3>
-
- <!-- FLDATA5 command -->
- <KEYWORD3>outp</KEYWORD3>
- <KEYWORD3>sumf</KEYWORD3>
- <KEYWORD3>debg</KEYWORD3>
- <KEYWORD3>resi</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
- <KEYWORD3>lmd</KEYWORD3>
- <KEYWORD3>emd</KEYWORD3>
-
- <!-- FLDATA6 command -->
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>outp</KEYWORD3>
- <KEYWORD3>iter</KEYWORD3>
- <KEYWORD3>land</KEYWORD3>
- <KEYWORD3>bloc</KEYWORD3>
- <KEYWORD3>bnow</KEYWORD3>
-
- <!-- FLDATA7 command -->
- <KEYWORD3>prot</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>constant</KEYWORD3>
- <KEYWORD3>liquid</KEYWORD3>
- <KEYWORD3>table</KEYWORD3>
- <KEYWORD3>powl</KEYWORD3>
- <KEYWORD3>carr</KEYWORD3>
- <KEYWORD3>bing</KEYWORD3>
- <KEYWORD3>usrv</KEYWORD3>
- <KEYWORD3>air</KEYWORD3>
- <KEYWORD3>air_b</KEYWORD3>
- <KEYWORD3>air-si</KEYWORD3>
- <KEYWORD3>air-si_b</KEYWORD3>
- <KEYWORD3>air-cm</KEYWORD3>
- <KEYWORD3>air-cm_b</KEYWORD3>
- <KEYWORD3>air-mm</KEYWORD3>
- <KEYWORD3>air-mm_b</KEYWORD3>
- <KEYWORD3>air-ft</KEYWORD3>
- <KEYWORD3>air-ft_b</KEYWORD3>
- <KEYWORD3>air-in</KEYWORD3>
- <KEYWORD3>air-in_b</KEYWORD3>
- <KEYWORD3>cmix</KEYWORD3>
- <KEYWORD3>user</KEYWORD3>
-
- <!-- FLDATA8 command -->
- <KEYWORD3>nomi</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
-
- <!-- FLDATA9 command -->
- <KEYWORD3>cof1</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
-
- <!-- FLDATA10 command -->
- <KEYWORD3>cof2</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
-
- <!-- FLDATA11 command -->
- <KEYWORD3>cof3</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
-
- <!-- FLDATA12 command -->
- <KEYWORD3>prop</KEYWORD3>
- <KEYWORD3>ivis</KEYWORD3>
- <KEYWORD3>ufrq</KEYWORD3>
-
- <!-- FLDATA13 command -->
- <KEYWORD3>vary</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>t</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
-
- <!-- FLDATA14 command -->
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>nomi</KEYWORD3>
- <KEYWORD3>bulk</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
-
- <!-- FLDATA15 command -->
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>refe</KEYWORD3>
-
- <!-- FLDATA16 command -->
- <KEYWORD3>bulk</KEYWORD3>
- <KEYWORD3>beta</KEYWORD3>
-
- <!-- FLDATA17 command -->
- <KEYWORD3>gamm</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
-
- <!-- FLDATA18 command -->
- <KEYWORD3>meth</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
-
- <!-- FLDATA19 command -->
- <KEYWORD3>tdma</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
-
- <!-- FLDATA20 command -->
- <KEYWORD3>srch</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
-
- <!-- FLDATA20A command -->
- <KEYWORD3>pgmr</KEYWORD3>
- <KEYWORD3>fill</KEYWORD3>
- <KEYWORD3>modp</KEYWORD3>
-
- <!-- FLDATA21 command -->
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
-
- <!-- FLDATA22 command -->
- <KEYWORD3>maxi</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
-
- <!-- FLDATA23 command -->
- <KEYWORD3>delt</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
-
- <!-- FLDATA24 command -->
- <KEYWORD3>turb</KEYWORD3>
- <KEYWORD3>modl</KEYWORD3>
- <KEYWORD3>rati</KEYWORD3>
- <KEYWORD3>inin</KEYWORD3>
- <KEYWORD3>insf</KEYWORD3>
- <KEYWORD3>sctk</KEYWORD3>
- <KEYWORD3>sctd</KEYWORD3>
- <KEYWORD3>cmu</KEYWORD3>
- <KEYWORD3>c1</KEYWORD3>
- <KEYWORD3>c2</KEYWORD3>
- <KEYWORD3>buc3</KEYWORD3>
- <KEYWORD3>buc4</KEYWORD3>
- <KEYWORD3>beta</KEYWORD3>
- <KEYWORD3>kapp</KEYWORD3>
- <KEYWORD3>ewll</KEYWORD3>
- <KEYWORD3>wall</KEYWORD3>
- <KEYWORD3>vand</KEYWORD3>
- <KEYWORD3>tran</KEYWORD3>
- <KEYWORD3>zels</KEYWORD3>
-
- <!-- FLDATA24A command -->
- <KEYWORD3>rngt</KEYWORD3>
- <KEYWORD3>sctk</KEYWORD3>
- <KEYWORD3>sctd</KEYWORD3>
- <KEYWORD3>cmu</KEYWORD3>
- <KEYWORD3>c1</KEYWORD3>
- <KEYWORD3>c2</KEYWORD3>
- <KEYWORD3>beta</KEYWORD3>
- <KEYWORD3>etai</KEYWORD3>
-
- <!-- FLDATA24B command -->
- <KEYWORD3>nket</KEYWORD3>
- <KEYWORD3>sctk</KEYWORD3>
- <KEYWORD3>sctd</KEYWORD3>
- <KEYWORD3>c2</KEYWORD3>
- <KEYWORD3>c1mx</KEYWORD3>
-
- <!-- FLDATA24C command -->
- <KEYWORD3>girt</KEYWORD3>
- <KEYWORD3>sctk</KEYWORD3>
- <KEYWORD3>sctd</KEYWORD3>
- <KEYWORD3>g0</KEYWORD3>
- <KEYWORD3>g1</KEYWORD3>
- <KEYWORD3>g2</KEYWORD3>
- <KEYWORD3>g3</KEYWORD3>
- <KEYWORD3>g4</KEYWORD3>
-
- <!-- FLDATA24D command -->
- <KEYWORD3>szlt</KEYWORD3>
- <KEYWORD3>sctk</KEYWORD3>
- <KEYWORD3>sctd</KEYWORD3>
- <KEYWORD3>szl1</KEYWORD3>
- <KEYWORD3>szl2</KEYWORD3>
- <KEYWORD3>szl3</KEYWORD3>
-
- <!-- FLDATA25 command -->
- <KEYWORD3>relx</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
-
- <!-- FLDATA26 command -->
- <KEYWORD3>stab</KEYWORD3>
- <KEYWORD3>turb</KEYWORD3>
- <KEYWORD3>mome</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
-
- <!-- FLDATA27 command -->
- <KEYWORD3>prin</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
-
- <!-- FLDATA28 command -->
- <KEYWORD3>modr</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>t</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
-
- <!-- FLDATA29 command -->
- <KEYWORD3>modv</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>sp01</KEYWORD3>
- <KEYWORD3>sp02</KEYWORD3>
- <KEYWORD3>sp03</KEYWORD3>
- <KEYWORD3>sp04</KEYWORD3>
- <KEYWORD3>sp05</KEYWORD3>
- <KEYWORD3>sp06</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>lmd</KEYWORD3>
- <KEYWORD3>emd</KEYWORD3>
-
- <!-- FLDATA30 command -->
- <KEYWORD3>quad</KEYWORD3>
- <KEYWORD3>momd</KEYWORD3>
- <KEYWORD3>moms</KEYWORD3>
- <KEYWORD3>prsd</KEYWORD3>
- <KEYWORD3>prss</KEYWORD3>
- <KEYWORD3>thrd</KEYWORD3>
- <KEYWORD3>thrs</KEYWORD3>
- <KEYWORD3>trbd</KEYWORD3>
- <KEYWORD3>trbs</KEYWORD3>
-
- <!-- FLDATA31 command -->
- <KEYWORD3>capp</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>umin</KEYWORD3>
- <KEYWORD3>umax</KEYWORD3>
- <KEYWORD3>vmin</KEYWORD3>
- <KEYWORD3>vmax</KEYWORD3>
- <KEYWORD3>wmin</KEYWORD3>
- <KEYWORD3>wmax</KEYWORD3>
- <KEYWORD3>tmin</KEYWORD3>
- <KEYWORD3>tmax</KEYWORD3>
- <KEYWORD3>pmin</KEYWORD3>
- <KEYWORD3>pmax</KEYWORD3>
-
- <!-- FLDATA32 command -->
- <KEYWORD3>rest</KEYWORD3>
- <KEYWORD3>nset</KEYWORD3>
- <KEYWORD3>iter</KEYWORD3>
- <KEYWORD3>lstp</KEYWORD3>
- <KEYWORD3>time</KEYWORD3>
- <KEYWORD3>rfil</KEYWORD3>
- <KEYWORD3>wfil</KEYWORD3>
- <KEYWORD3>over</KEYWORD3>
- <KEYWORD3>clear</KEYWORD3>
-
- <!-- FLDATA33 command -->
- <KEYWORD3>advm</KEYWORD3>
- <KEYWORD3>mome</KEYWORD3>
- <KEYWORD3>turb</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>msu</KEYWORD3>
- <KEYWORD3>supg</KEYWORD3>
-
- <!-- FLIST command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- FLLIST command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- FLST command -->
- <KEYWORD3>noor</KEYWORD3>
- <KEYWORD3>order</KEYWORD3>
-
- <!-- /FOCUS command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>auto</KEYWORD3>
- <KEYWORD3>user</KEYWORD3>
-
- <!-- FORCE command -->
- <KEYWORD3>total</KEYWORD3>
- <KEYWORD3>static</KEYWORD3>
- <KEYWORD3>damp</KEYWORD3>
- <KEYWORD3>inert</KEYWORD3>
-
- <!-- FORM command -->
- <KEYWORD3>reco</KEYWORD3>
- <KEYWORD3>ten</KEYWORD3>
- <KEYWORD3>long</KEYWORD3>
-
- <!-- /FORMAT command -->
- <KEYWORD3>g</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>e</KEYWORD3>
-
- <!-- FP command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- FSLIST command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- FSUM command -->
- <KEYWORD3>rsys</KEYWORD3>
-
- <!-- /FTYPE command -->
- <KEYWORD3>emat</KEYWORD3>
- <KEYWORD3>esav</KEYWORD3>
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>redm</KEYWORD3>
- <KEYWORD3>sub</KEYWORD3>
- <KEYWORD3>mode</KEYWORD3>
- <KEYWORD3>tri</KEYWORD3>
- <KEYWORD3>dsub</KEYWORD3>
- <KEYWORD3>usub</KEYWORD3>
- <KEYWORD3>erot</KEYWORD3>
- <KEYWORD3>osav</KEYWORD3>
- <KEYWORD3>seld</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>ext</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
-
- <!-- GAPLIST command -->
- <KEYWORD3>open</KEYWORD3>
- <KEYWORD3>closed</KEYWORD3>
-
- <!-- GAPMERGE command -->
- <KEYWORD3>toler</KEYWORD3>
- <KEYWORD3>iter</KEYWORD3>
-
- <!-- GAPOPT command -->
- <KEYWORD3>toler</KEYWORD3>
- <KEYWORD3>oesele</KEYWORD3>
- <KEYWORD3>merge</KEYWORD3>
- <KEYWORD3>remain</KEYWORD3>
-
- <!-- GAPPLOT command -->
- <KEYWORD3>open</KEYWORD3>
- <KEYWORD3>closed</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- GAUGE command -->
- <KEYWORD3>tree</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- GCGEN command -->
- <KEYWORD3>tri</KEYWORD3>
- <KEYWORD3>bot</KEYWORD3>
-
- <!-- /GCMD command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- *GET command -->
- <KEYWORD3>active</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>imme</KEYWORD3>
- <KEYWORD3>menu</KEYWORD3>
- <KEYWORD3>prkey</KEYWORD3>
- <KEYWORD3>units</KEYWORD3>
- <KEYWORD3>rout</KEYWORD3>
- <KEYWORD3>time</KEYWORD3>
- <KEYWORD3>wall</KEYWORD3>
- <KEYWORD3>cpu</KEYWORD3>
- <KEYWORD3>dbase</KEYWORD3>
- <KEYWORD3>ldate</KEYWORD3>
- <KEYWORD3>dbase</KEYWORD3>
- <KEYWORD3>ltime</KEYWORD3>
- <KEYWORD3>rev</KEYWORD3>
- <KEYWORD3>title</KEYWORD3>
- <KEYWORD3>jobnam</KEYWORD3>
-
- <KEYWORD3>parm</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>basic</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>dim</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
-
- <KEYWORD3>cmd</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>nargs</KEYWORD3>
- <KEYWORD3>field</KEYWORD3>
-
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>ncomp</KEYWORD3>
- <KEYWORD3>name</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>nscomp</KEYWORD3>
- <KEYWORD3>sname</KEYWORD3>
-
- <KEYWORD3>graph</KEYWORD3>
- <KEYWORD3>active</KEYWORD3>
- <KEYWORD3>angle</KEYWORD3>
- <KEYWORD3>contour</KEYWORD3>
- <KEYWORD3>dist</KEYWORD3>
- <KEYWORD3>dscale</KEYWORD3>
- <KEYWORD3>dmult</KEYWORD3>
- <KEYWORD3>edge</KEYWORD3>
- <KEYWORD3>focus</KEYWORD3>
- <KEYWORD3>gline</KEYWORD3>
- <KEYWORD3>mode</KEYWORD3>
- <KEYWORD3>normal</KEYWORD3>
- <KEYWORD3>range</KEYWORD3>
- <KEYWORD3>xmin</KEYWORD3>
- <KEYWORD3>ymin</KEYWORD3>
- <KEYWORD3>xmax</KEYWORD3>
- <KEYWORD3>ymax</KEYWORD3>
- <KEYWORD3>ratio</KEYWORD3>
- <KEYWORD3>sscale</KEYWORD3>
- <KEYWORD3>smult</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>vcone</KEYWORD3>
- <KEYWORD3>view</KEYWORD3>
- <KEYWORD3>vscale</KEYWORD3>
- <KEYWORD3>vratio</KEYWORD3>
- <KEYWORD3>display</KEYWORD3>
- <KEYWORD3>erase</KEYWORD3>
- <KEYWORD3>ndist</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>plopts</KEYWORD3>
- <KEYWORD3>seg</KEYWORD3>
- <KEYWORD3>shrink</KEYWORD3>
-
- <KEYWORD3>active</KEYWORD3>
- <KEYWORD3>,csys</KEYWORD3>
- <KEYWORD3>,dsys</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>,real</KEYWORD3>
- <KEYWORD3>,esys</KEYWORD3>
- <KEYWORD3>,cp</KEYWORD3>
- <KEYWORD3>,ce</KEYWORD3>
- <KEYWORD3>wfront</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>rms</KEYWORD3>
-
- <KEYWORD3>cdsy</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>ang</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>zx</KEYWORD3>
- <KEYWORD3>attr</KEYWORD3>
-
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>,nsel</KEYWORD3>
- <KEYWORD3>nxth</KEYWORD3>
- <KEYWORD3>nxtl</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>csgx</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>ax</KEYWORD3>
- <KEYWORD3>hgen</KEYWORD3>
- <KEYWORD3>num</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>min</KEYWORD3>
- <KEYWORD3>count</KEYWORD3>
- <KEYWORD3>mxloc</KEYWORD3>
- <KEYWORD3>mnloc</KEYWORD3>
-
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>cent</KEYWORD3>
- <KEYWORD3>adj</KEYWORD3>
- <KEYWORD3>attr</KEYWORD3>
- <KEYWORD3>leng</KEYWORD3>
- <KEYWORD3>lproj</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>aproj</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>,esel</KEYWORD3>
- <KEYWORD3>nxth</KEYWORD3>
- <KEYWORD3>nxtl</KEYWORD3>
- <KEYWORD3>hgen</KEYWORD3>
- <KEYWORD3>hcoe</KEYWORD3>
- <KEYWORD3>tbulk</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>shpar</KEYWORD3>
- <KEYWORD3>angd</KEYWORD3>
- <KEYWORD3>aspe</KEYWORD3>
- <KEYWORD3>jacr</KEYWORD3>
- <KEYWORD3>maxa</KEYWORD3>
- <KEYWORD3>para</KEYWORD3>
- <KEYWORD3>warp</KEYWORD3>
- <KEYWORD3>num</KEYWORD3>
- <KEYWORD3>,ksel</KEYWORD3>
- <KEYWORD3>nxth</KEYWORD3>
- <KEYWORD3>nxtl</KEYWORD3>
- <KEYWORD3>div</KEYWORD3>
-
- <KEYWORD3>kp</KEYWORD3>
- <KEYWORD3>ior</KEYWORD3>
- <KEYWORD3>imc</KEYWORD3>
- <KEYWORD3>irp</KEYWORD3>
- <KEYWORD3>ixv</KEYWORD3>
- <KEYWORD3>iyv</KEYWORD3>
- <KEYWORD3>izv</KEYWORD3>
- <KEYWORD3>nrelm</KEYWORD3>
-
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>,lsel</KEYWORD3>
-
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>,asel</KEYWORD3>
- <KEYWORD3>loop</KEYWORD3>
-
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>,vsel</KEYWORD3>
- <KEYWORD3>shell</KEYWORD3>
-
- <KEYWORD3>etyp</KEYWORD3>
-
- <KEYWORD3>rcon</KEYWORD3>
-
- <KEYWORD3>ex</KEYWORD3>
- <KEYWORD3>alpx</KEYWORD3>
- <KEYWORD3>reft</KEYWORD3>
- <KEYWORD3>prxy</KEYWORD3>
- <KEYWORD3>nuxy</KEYWORD3>
- <KEYWORD3>gxy</KEYWORD3>
- <KEYWORD3>damp</KEYWORD3>
- <KEYWORD3>mu</KEYWORD3>
- <KEYWORD3>dnes</KEYWORD3>
- <KEYWORD3>c</KEYWORD3>
- <KEYWORD3>enth</KEYWORD3>
- <KEYWORD3>kxx</KEYWORD3>
- <KEYWORD3>hf</KEYWORD3>
- <KEYWORD3>emis</KEYWORD3>
- <KEYWORD3>qrate</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>sonc</KEYWORD3>
- <KEYWORD3>rsvx</KEYWORD3>
- <KEYWORD3>perx</KEYWORD3>
- <KEYWORD3>murx</KEYWORD3>
- <KEYWORD3>mgxx</KEYWORD3>
- <KEYWORD3>lsst</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
-
- <KEYWORD3>fldata</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>turb</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>swrl</KEYWORD3>
- <KEYWORD3>tran</KEYWORD3>
- <KEYWORD3>spec</KEYWORD3>
- <KEYWORD3>exec</KEYWORD3>
- <KEYWORD3>appe</KEYWORD3>
- <KEYWORD3>over</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>step</KEYWORD3>
- <KEYWORD3>istep</KEYWORD3>
- <KEYWORD3>bc</KEYWORD3>
- <KEYWORD3>numb</KEYWORD3>
- <KEYWORD3>glob</KEYWORD3>
- <KEYWORD3>tend</KEYWORD3>
- <KEYWORD3>appe</KEYWORD3>
- <KEYWORD3>sumf</KEYWORD3>
- <KEYWORD3>over</KEYWORD3>
- <KEYWORD3>sumf</KEYWORD3>
- <KEYWORD3>debg</KEYWORD3>
- <KEYWORD3>resi</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
- <KEYWORD3>lmd</KEYWORD3>
- <KEYWORD3>emd</KEYWORD3>
- <KEYWORD3>outp</KEYWORD3>
- <KEYWORD3>iter</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>ivis</KEYWORD3>
- <KEYWORD3>ufrq</KEYWORD3>
- <KEYWORD3>nomi</KEYWORD3>
- <KEYWORD3>bulk</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>refe</KEYWORD3>
- <KEYWORD3>beta</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>fill</KEYWORD3>
- <KEYWORD3>modp</KEYWORD3>
- <KEYWORD3>modl</KEYWORD3>
- <KEYWORD3>rati</KEYWORD3>
- <KEYWORD3>inin</KEYWORD3>
- <KEYWORD3>insf</KEYWORD3>
- <KEYWORD3>sctk</KEYWORD3>
- <KEYWORD3>sctd</KEYWORD3>
- <KEYWORD3>cmu</KEYWORD3>
- <KEYWORD3>c1</KEYWORD3>
- <KEYWORD3>c2</KEYWORD3>
- <KEYWORD3>buc3</KEYWORD3>
- <KEYWORD3>buc4</KEYWORD3>
- <KEYWORD3>beta</KEYWORD3>
- <KEYWORD3>kapp</KEYWORD3>
- <KEYWORD3>ewll</KEYWORD3>
- <KEYWORD3>wall</KEYWORD3>
- <KEYWORD3>vand</KEYWORD3>
- <KEYWORD3>tran</KEYWORD3>
- <KEYWORD3>zels</KEYWORD3>
- <KEYWORD3>sctk</KEYWORD3>
- <KEYWORD3>sctd</KEYWORD3>
- <KEYWORD3>cmu</KEYWORD3>
- <KEYWORD3>c1</KEYWORD3>
- <KEYWORD3>c2</KEYWORD3>
- <KEYWORD3>etai</KEYWORD3>
- <KEYWORD3>c1mx</KEYWORD3>
- <KEYWORD3>g0</KEYWORD3>
- <KEYWORD3>g1</KEYWORD3>
- <KEYWORD3>g2</KEYWORD3>
- <KEYWORD3>g3</KEYWORD3>
- <KEYWORD3>g4</KEYWORD3>
- <KEYWORD3>szl1</KEYWORD3>
- <KEYWORD3>szl2</KEYWORD3>
- <KEYWORD3>szl3</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>mome</KEYWORD3>
- <KEYWORD3>sp01</KEYWORD3>
- <KEYWORD3>sp02</KEYWORD3>
- <KEYWORD3>sp03</KEYWORD3>
- <KEYWORD3>sp04</KEYWORD3>
- <KEYWORD3>sp05</KEYWORD3>
- <KEYWORD3>sp06</KEYWORD3>
- <KEYWORD3>momd</KEYWORD3>
- <KEYWORD3>moms</KEYWORD3>
- <KEYWORD3>prsd</KEYWORD3>
- <KEYWORD3>prss</KEYWORD3>
- <KEYWORD3>thrd</KEYWORD3>
- <KEYWORD3>thrs</KEYWORD3>
- <KEYWORD3>trbd</KEYWORD3>
- <KEYWORD3>trbs</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>umin</KEYWORD3>
- <KEYWORD3>umax</KEYWORD3>
- <KEYWORD3>vmin</KEYWORD3>
- <KEYWORD3>vmax</KEYWORD3>
- <KEYWORD3>wmin</KEYWORD3>
- <KEYWORD3>wmax</KEYWORD3>
- <KEYWORD3>tmin</KEYWORD3>
- <KEYWORD3>tmax</KEYWORD3>
- <KEYWORD3>pmin</KEYWORD3>
- <KEYWORD3>pmax</KEYWORD3>
- <KEYWORD3>nset</KEYWORD3>
- <KEYWORD3>iter</KEYWORD3>
- <KEYWORD3>lstp</KEYWORD3>
- <KEYWORD3>time</KEYWORD3>
- <KEYWORD3>rfil</KEYWORD3>
- <KEYWORD3>wfil</KEYWORD3>
- <KEYWORD3>over</KEYWORD3>
- <KEYWORD3>clear</KEYWORD3>
-
- <KEYWORD3>msdata</KEYWORD3>
- <KEYWORD3>spec</KEYWORD3>
- <KEYWORD3>ugas</KEYWORD3>
-
- <KEYWORD3>msprop</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>mdif</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>nomi</KEYWORD3>
- <KEYWORD3>cof1</KEYWORD3>
- <KEYWORD3>cof2</KEYWORD3>
- <KEYWORD3>cof3</KEYWORD3>
-
- <KEYWORD3>msspec</KEYWORD3>
- <KEYWORD3>name</KEYWORD3>
- <KEYWORD3>molw</KEYWORD3>
- <KEYWORD3>schm</KEYWORD3>
-
- <KEYWORD3>msrelax</KEYWORD3>
- <KEYWORD3>conc</KEYWORD3>
- <KEYWORD3>emdi</KEYWORD3>
- <KEYWORD3>stab</KEYWORD3>
-
- <KEYWORD3>mssolu</KEYWORD3>
- <KEYWORD3>nswe</KEYWORD3>
- <KEYWORD3>maxi</KEYWORD3>
- <KEYWORD3>nsrc</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>delt</KEYWORD3>
-
- <KEYWORD3>msmeth</KEYWORD3>
-
- <KEYWORD3>mscap</KEYWORD3>
- <KEYWORD3>key</KEYWORD3>
- <KEYWORD3>upp</KEYWORD3>
- <KEYWORD3>low</KEYWORD3>
-
- <KEYWORD3>msvary</KEYWORD3>
-
- <KEYWORD3>msnomf</KEYWORD3>
-
- <KEYWORD3>active</KEYWORD3>
- <KEYWORD3>anty</KEYWORD3>
- <KEYWORD3>solu</KEYWORD3>
- <KEYWORD3>dtime</KEYWORD3>
- <KEYWORD3>ncmls</KEYWORD3>
- <KEYWORD3>ncmss</KEYWORD3>
- <KEYWORD3>eqit</KEYWORD3>
- <KEYWORD3>ncmit</KEYWORD3>
- <KEYWORD3>cnvg</KEYWORD3>
- <KEYWORD3>mxdvl</KEYWORD3>
- <KEYWORD3>resfrq</KEYWORD3>
- <KEYWORD3>reseig</KEYWORD3>
- <KEYWORD3>dsprm</KEYWORD3>
- <KEYWORD3>focv</KEYWORD3>
- <KEYWORD3>mocv</KEYWORD3>
- <KEYWORD3>hfcv</KEYWORD3>
- <KEYWORD3>mfcv</KEYWORD3>
- <KEYWORD3>cscv</KEYWORD3>
- <KEYWORD3>cucv</KEYWORD3>
- <KEYWORD3>ffcv</KEYWORD3>
- <KEYWORD3>dicv</KEYWORD3>
- <KEYWORD3>rocv</KEYWORD3>
- <KEYWORD3>tecv</KEYWORD3>
- <KEYWORD3>vmcv</KEYWORD3>
- <KEYWORD3>smcv</KEYWORD3>
- <KEYWORD3>vocv</KEYWORD3>
- <KEYWORD3>prcv</KEYWORD3>
- <KEYWORD3>vecv</KEYWORD3>
- <KEYWORD3>nc48</KEYWORD3>
- <KEYWORD3>nc49</KEYWORD3>
- <KEYWORD3>crprat</KEYWORD3>
- <KEYWORD3>psinc</KEYWORD3>
-
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>mtot</KEYWORD3>
- <KEYWORD3>mc</KEYWORD3>
- <KEYWORD3>ior</KEYWORD3>
- <KEYWORD3>imc</KEYWORD3>
- <KEYWORD3>fmc</KEYWORD3>
- <KEYWORD3>mmor</KEYWORD3>
- <KEYWORD3>mmmc</KEYWORD3>
-
- <KEYWORD3>mode</KEYWORD3>
- <KEYWORD3>freq</KEYWORD3>
- <KEYWORD3>pfact</KEYWORD3>
- <KEYWORD3>mcoef</KEYWORD3>
- <KEYWORD3>damp</KEYWORD3>
-
- <KEYWORD3>active</KEYWORD3>
- <KEYWORD3>,set</KEYWORD3>
- <KEYWORD3>lstp</KEYWORD3>
- <KEYWORD3>sbst</KEYWORD3>
- <KEYWORD3>time</KEYWORD3>
- <KEYWORD3>rsys</KEYWORD3>
-
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>ntemp</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>rf</KEYWORD3>
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>fy</KEYWORD3>
- <KEYWORD3>fz</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>my</KEYWORD3>
- <KEYWORD3>mz</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>hs</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>conc</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>cmuv</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
-
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>serr</KEYWORD3>
- <KEYWORD3>sdsg</KEYWORD3>
- <KEYWORD3>terr</KEYWORD3>
- <KEYWORD3>tdsg</KEYWORD3>
- <KEYWORD3>sene</KEYWORD3>
- <KEYWORD3>tene</KEYWORD3>
- <KEYWORD3>kene</KEYWORD3>
- <KEYWORD3>jheat</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>etab</KEYWORD3>
- <KEYWORD3>smisc</KEYWORD3>
- <KEYWORD3>nmisc</KEYWORD3>
-
- <KEYWORD3>etab</KEYWORD3>
- <KEYWORD3>ncol</KEYWORD3>
- <KEYWORD3>nleng</KEYWORD3>
-
- <KEYWORD3>sort</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>min</KEYWORD3>
- <KEYWORD3>imax</KEYWORD3>
- <KEYWORD3>imin</KEYWORD3>
-
- <KEYWORD3>ssum</KEYWORD3>
- <KEYWORD3>item</KEYWORD3>
-
- <KEYWORD3>fsum</KEYWORD3>
-
- <KEYWORD3>path</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>nval</KEYWORD3>
-
- <KEYWORD3>kcalc</KEYWORD3>
- <KEYWORD3>k</KEYWORD3>
-
- <KEYWORD3>intsrf</KEYWORD3>
-
- <KEYWORD3>plnsol</KEYWORD3>
- <KEYWORD3>bmax</KEYWORD3>
- <KEYWORD3>bmin</KEYWORD3>
-
- <KEYWORD3>prerr</KEYWORD3>
- <KEYWORD3>sepc</KEYWORD3>
- <KEYWORD3>tepc</KEYWORD3>
- <KEYWORD3>sersm</KEYWORD3>
- <KEYWORD3>tersm</KEYWORD3>
- <KEYWORD3>sensm</KEYWORD3>
- <KEYWORD3>tensm</KEYWORD3>
-
- <KEYWORD3>section</KEYWORD3>
- <KEYWORD3>inside</KEYWORD3>
- <KEYWORD3>sx</KEYWORD3>
- <KEYWORD3>sy</KEYWORD3>
- <KEYWORD3>sz</KEYWORD3>
- <KEYWORD3>sxxy</KEYWORD3>
- <KEYWORD3>syz</KEYWORD3>
- <KEYWORD3>szx</KEYWORD3>
- <KEYWORD3>center</KEYWORD3>
- <KEYWORD3>outside</KEYWORD3>
-
- <KEYWORD3>vari</KEYWORD3>
- <KEYWORD3>extrem</KEYWORD3>
- <KEYWORD3>vmax</KEYWORD3>
- <KEYWORD3>tmax</KEYWORD3>
- <KEYWORD3>vmin</KEYWORD3>
- <KEYWORD3>tmin</KEYWORD3>
- <KEYWORD3>vlast</KEYWORD3>
- <KEYWORD3>tlast</KEYWORD3>
- <KEYWORD3>cvar</KEYWORD3>
- <KEYWORD3>rtime</KEYWORD3>
- <KEYWORD3>itime</KEYWORD3>
- <KEYWORD3>t</KEYWORD3>
- <KEYWORD3>rset</KEYWORD3>
- <KEYWORD3>iset</KEYWORD3>
- <KEYWORD3>nsets</KEYWORD3>
-
- <KEYWORD3>opt</KEYWORD3>
- <KEYWORD3>total</KEYWORD3>
- <KEYWORD3>feas</KEYWORD3>
- <KEYWORD3>term</KEYWORD3>
- <KEYWORD3>best</KEYWORD3>
-
- <KEYWORD3>topo</KEYWORD3>
- <KEYWORD3>act</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>porv</KEYWORD3>
- <KEYWORD3>loads</KEYWORD3>
-
- <KEYWORD3>runst</KEYWORD3>
- <KEYWORD3>rspeed</KEYWORD3>
- <KEYWORD3>mips</KEYWORD3>
- <KEYWORD3>smflop</KEYWORD3>
- <KEYWORD3>vmflop</KEYWORD3>
- <KEYWORD3>rfilsz</KEYWORD3>
- <KEYWORD3>emat</KEYWORD3>
- <KEYWORD3>erot</KEYWORD3>
- <KEYWORD3>esav</KEYWORD3>
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>mode</KEYWORD3>
- <KEYWORD3>rdsp</KEYWORD3>
- <KEYWORD3>redm</KEYWORD3>
- <KEYWORD3>rfrq</KEYWORD3>
- <KEYWORD3>rgeom</KEYWORD3>
- <KEYWORD3>rst</KEYWORD3>
- <KEYWORD3>tri</KEYWORD3>
- <KEYWORD3>rtimst</KEYWORD3>
- <KEYWORD3>tfirst</KEYWORD3>
- <KEYWORD3>titer</KEYWORD3>
- <KEYWORD3>eqprep</KEYWORD3>
- <KEYWORD3>,solve</KEYWORD3>
- <KEYWORD3>bsub</KEYWORD3>
- <KEYWORD3>eigen</KEYWORD3>
- <KEYWORD3>elform</KEYWORD3>
- <KEYWORD3>elstrs</KEYWORD3>
- <KEYWORD3>nelm</KEYWORD3>
- <KEYWORD3>rmemry</KEYWORD3>
- <KEYWORD3>wsreq</KEYWORD3>
- <KEYWORD3>wsavail</KEYWORD3>
- <KEYWORD3>dbpsize</KEYWORD3>
- <KEYWORD3>dbpdisk</KEYWORD3>
- <KEYWORD3>dbpmem</KEYWORD3>
- <KEYWORD3>dbsize</KEYWORD3>
- <KEYWORD3>dbmem</KEYWORD3>
- <KEYWORD3>scrsize</KEYWORD3>
- <KEYWORD3>scravail</KEYWORD3>
- <KEYWORD3>iomem</KEYWORD3>
- <KEYWORD3>iopsiz</KEYWORD3>
- <KEYWORD3>iobuf</KEYWORD3>
- <KEYWORD3>rwfrnt</KEYWORD3>
- <KEYWORD3>rms</KEYWORD3>
- <KEYWORD3>mean</KEYWORD3>
-
- <KEYWORD3>,nsel</KEYWORD3>
- <KEYWORD3>,esel</KEYWORD3>
- <KEYWORD3>,ksel</KEYWORD3>
- <KEYWORD3>,lsel</KEYWORD3>
- <KEYWORD3>,asel</KEYWORD3>
- <KEYWORD3>,vsel</KEYWORD3>
- <KEYWORD3>ndnext</KEYWORD3>
- <KEYWORD3>elnext</KEYWORD3>
- <KEYWORD3>kpnext</KEYWORD3>
- <KEYWORD3>lsnext</KEYWORD3>
- <KEYWORD3>arnext</KEYWORD3>
- <KEYWORD3>vlnext</KEYWORD3>
- <KEYWORD3>centrx</KEYWORD3>
- <KEYWORD3>centry</KEYWORD3>
- <KEYWORD3>centrz</KEYWORD3>
- <KEYWORD3>nx</KEYWORD3>
- <KEYWORD3>ny</KEYWORD3>
- <KEYWORD3>nz</KEYWORD3>
- <KEYWORD3>kx</KEYWORD3>
- <KEYWORD3>ky</KEYWORD3>
- <KEYWORD3>kz</KEYWORD3>
- <KEYWORD3>lx</KEYWORD3>
- <KEYWORD3>ly</KEYWORD3>
- <KEYWORD3>lz</KEYWORD3>
- <KEYWORD3>lsx</KEYWORD3>
- <KEYWORD3>lsy</KEYWORD3>
- <KEYWORD3>lsz</KEYWORD3>
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>kp</KEYWORD3>
- <KEYWORD3>distnd</KEYWORD3>
- <KEYWORD3>distkp</KEYWORD3>
- <KEYWORD3>disten</KEYWORD3>
- <KEYWORD3>anglen</KEYWORD3>
- <KEYWORD3>anglek</KEYWORD3>
- <KEYWORD3>nnear</KEYWORD3>
- <KEYWORD3>knear</KEYWORD3>
- <KEYWORD3>enearn</KEYWORD3>
- <KEYWORD3>areand</KEYWORD3>
- <KEYWORD3>areakp</KEYWORD3>
- <KEYWORD3>arnode</KEYWORD3>
- <KEYWORD3>normnx</KEYWORD3>
- <KEYWORD3>normny</KEYWORD3>
- <KEYWORD3>normnz</KEYWORD3>
- <KEYWORD3>normkx</KEYWORD3>
- <KEYWORD3>normky</KEYWORD3>
- <KEYWORD3>normkz</KEYWORD3>
- <KEYWORD3>enextn</KEYWORD3>
- <KEYWORD3>nelem</KEYWORD3>
- <KEYWORD3>eladj</KEYWORD3>
- <KEYWORD3>ndface</KEYWORD3>
- <KEYWORD3>nmface</KEYWORD3>
- <KEYWORD3>arface</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>ax</KEYWORD3>
- <KEYWORD3>ay</KEYWORD3>
- <KEYWORD3>az</KEYWORD3>
-
- <!-- /GFORMAT command -->
- <KEYWORD3>g</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>e</KEYWORD3>
-
- <!-- /GLINE command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- *GO command -->
- <KEYWORD3>stop</KEYWORD3>
-
- <!-- GP command -->
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>fy</KEYWORD3>
- <KEYWORD3>fz</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>my</KEYWORD3>
- <KEYWORD3>mz</KEYWORD3>
-
- <!-- GPLIST command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- /GRAPHICS command -->
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>power</KEYWORD3>
-
- <!-- /GROPT command -->
- <KEYWORD3>axdv</KEYWORD3>
- <KEYWORD3>axnm</KEYWORD3>
- <KEYWORD3>axnsc</KEYWORD3>
- <KEYWORD3>ascal</KEYWORD3>
- <KEYWORD3>logx</KEYWORD3>
- <KEYWORD3>logy</KEYWORD3>
- <KEYWORD3>fill</KEYWORD3>
- <KEYWORD3>cgrid</KEYWORD3>
- <KEYWORD3>dig1</KEYWORD3>
- <KEYWORD3>dig2</KEYWORD3>
- <KEYWORD3>view</KEYWORD3>
- <KEYWORD3>revx</KEYWORD3>
- <KEYWORD3>revy</KEYWORD3>
- <KEYWORD3>divx</KEYWORD3>
- <KEYWORD3>divy</KEYWORD3>
- <KEYWORD3>ltyp</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>front</KEYWORD3>
-
- <!-- GRP command -->
- <KEYWORD3>disp</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
-
- <!-- /GST command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- /GTHK command -->
- <KEYWORD3>axis</KEYWORD3>
- <KEYWORD3>grid</KEYWORD3>
- <KEYWORD3>curve</KEYWORD3>
-
- <!-- /GTYPE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>keyp</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>grph</KEYWORD3>
-
- <!-- /HEADER command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- HPGL command -->
- <KEYWORD3>model</KEYWORD3>
- <KEYWORD3>paper</KEYWORD3>
- <KEYWORD3>color</KEYWORD3>
- <KEYWORD3>direct</KEYWORD3>
-
- <!-- HPTCREATE command -->
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>coord</KEYWORD3>
- <KEYWORD3>ratio</KEYWORD3>
-
- <!-- HPTDELETE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- HREXP command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- HROPT command -->
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>reduc</KEYWORD3>
- <KEYWORD3>msup</KEYWORD3>
-
- <!-- HROUT command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- IC command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>sp01</KEYWORD3>
- <KEYWORD3>so02</KEYWORD3>
- <KEYWORD3>sp03</KEYWORD3>
- <KEYWORD3>sp04</KEYWORD3>
- <KEYWORD3>sp05</KEYWORD3>
- <KEYWORD3>sp06</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>ax</KEYWORD3>
- <KEYWORD3>ay</KEYWORD3>
- <KEYWORD3>az</KEYWORD3>
-
- <!-- ICLIST command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>disp</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
-
- <!-- *IF command -->
- <KEYWORD3>eq</KEYWORD3>
- <KEYWORD3>ne</KEYWORD3>
- <KEYWORD3>lt</KEYWORD3>
- <KEYWORD3>gt</KEYWORD3>
- <KEYWORD3>le</KEYWORD3>
- <KEYWORD3>ge</KEYWORD3>
- <KEYWORD3>ablt</KEYWORD3>
- <KEYWORD3>abgt</KEYWORD3>
- <KEYWORD3>stop</KEYWORD3>
- <KEYWORD3>exit</KEYWORD3>
- <KEYWORD3>cycle</KEYWORD3>
- <KEYWORD3>then</KEYWORD3>
-
- <!-- INRES command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>basic</KEYWORD3>
- <KEYWORD3>nsol</KEYWORD3>
- <KEYWORD3>rsol</KEYWORD3>
- <KEYWORD3>esol</KEYWORD3>
- <KEYWORD3>nload</KEYWORD3>
- <KEYWORD3>strs</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>fgrad</KEYWORD3>
- <KEYWORD3>fflux</KEYWORD3>
- <KEYWORD3>misc</KEYWORD3>
-
- <!-- INTSRF command -->
- <KEYWORD3>pres</KEYWORD3>
-
- <!-- IOPTN command -->
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>defa</KEYWORD3>
- <KEYWORD3>merg</KEYWORD3>
- <KEYWORD3>yes</KEYWORD3>
- <KEYWORD3>no</KEYWORD3>
- <KEYWORD3>solid</KEYWORD3>
- <KEYWORD3>gtoler</KEYWORD3>
- <KEYWORD3>file</KEYWORD3>
- <KEYWORD3>iges</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>small</KEYWORD3>
-
- <!-- K command -->
- <KEYWORD3>p</KEYWORD3>
-
- <!-- KBETW command -->
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>ratio</KEYWORD3>
- <KEYWORD3>dist</KEYWORD3>
-
- <!-- KCENTER command -->
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>kp</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
-
- <!-- KCLEAR, KDELE, KDIST, KESIZE, KFILL, KGEN, KL, KLIST, KMESH, KMODIF, -->
- <!-- KMOVE, KNODE, KPLOT, KPSCALE, KSCALE, KSCON commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>coord</KEYWORD3>
- <KEYWORD3>hpt</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
-
- <!-- KREFINE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>smooth</KEYWORD3>
- <KEYWORD3>clean</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- KSEL command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>inve</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>,real</KEYWORD3>
- <KEYWORD3>,esys</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>kp</KEYWORD3>
- <KEYWORD3>ext</KEYWORD3>
- <KEYWORD3>hpt</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
-
- <!-- KSLL, KSLN commands -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
-
- <!-- KSYMM, KTRAN, KWPAVE, KWPLAN commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
-
- <!-- L, L2ANG, L2TAN, LANG, LARC, LAREA commands -->
- <KEYWORD3>p</KEYWORD3>
-
- <!-- LAYER, LAYERP26 commands -->
- <KEYWORD3>fcmax</KEYWORD3>
-
- <!-- LAYLIST, LCABS, LCCAT, LCFACT, LCLEAR, LCOMB, LCSL, LCSUM, LDELE, -->
- <!-- LDIV, LDRAG, LESIZE, LEXTND, LFILLT, LGEN, LGLUE, /LIGHT, LINA, -->
- <!-- LINL, LINP, LINV, LMESH, LNFILL, LNMERGE, LOVLAP, LPLOT, LPTN, -->
- <!-- LREVERSE, LROTAT, LSSCALE, LSTR commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- LCDEF command -->
- <KEYWORD3>erase</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- LCOPER command -->
- <KEYWORD3>zero</KEYWORD3>
- <KEYWORD3>squa</KEYWORD3>
- <KEYWORD3>sqrt</KEYWORD3>
- <KEYWORD3>lprin</KEYWORD3>
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>sub</KEYWORD3>
- <KEYWORD3>srss</KEYWORD3>
- <KEYWORD3>min</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>abmn</KEYWORD3>
- <KEYWORD3>abmx</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>mult</KEYWORD3>
-
- <!-- LCSEL command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>inve</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
-
- <!-- LDREAD command -->
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>forc</KEYWORD3>
- <KEYWORD3>hgen</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>ehflu</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>reac</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
-
- <!-- LGWRITE command -->
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>comment</KEYWORD3>
- <KEYWORD3>remove</KEYWORD3>
-
- <!-- LLIST command -->
- <KEYWORD3>radius</KEYWORD3>
- <KEYWORD3>layer</KEYWORD3>
- <KEYWORD3>hpt</KEYWORD3>
- <KEYWORD3>orient</KEYWORD3>
-
- <!-- LNSEARCH command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>auto</KEYWORD3>
-
- <!-- LOCAL command -->
- <KEYWORD3>cart</KEYWORD3>
- <KEYWORD3>cylin</KEYWORD3>
- <KEYWORD3>sphe</KEYWORD3>
- <KEYWORD3>toro</KEYWORD3>
-
- <!-- LREFINE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>smooth</KEYWORD3>
- <KEYWORD3>clean</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- LSBA, LSBL, LSBV, LSBW commands -->
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>sepo</KEYWORD3>
- <KEYWORD3>delete</KEYWORD3>
- <KEYWORD3>keep</KEYWORD3>
-
- <!-- LSCLEAR command -->
- <KEYWORD3>solid</KEYWORD3>
- <KEYWORD3>fe</KEYWORD3>
- <KEYWORD3>iner</KEYWORD3>
- <KEYWORD3>lfact</KEYWORD3>
- <KEYWORD3>lsopt</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- LSEL command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>inve</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>ext</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>tan1</KEYWORD3>
- <KEYWORD3>tan2</KEYWORD3>
- <KEYWORD3>ndiv</KEYWORD3>
- <KEYWORD3>space</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>,real</KEYWORD3>
- <KEYWORD3>,esys</KEYWORD3>
- <KEYWORD3>sec</KEYWORD3>
- <KEYWORD3>lenght</KEYWORD3>
- <KEYWORD3>radius</KEYWORD3>
- <KEYWORD3>hpt</KEYWORD3>
- <KEYWORD3>lcca</KEYWORD3>
-
- <!-- LSLA, LSLK commands -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
-
- <!-- LSREAD, LSWRITE commands -->
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>init</KEYWORD3>
-
- <!-- LSYMM, LTAN, LTRAN, LWPLAN commands -->
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- LUMPM command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- M, MONITOR commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>fy</KEYWORD3>
- <KEYWORD3>fz</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>my</KEYWORD3>
- <KEYWORD3>mz</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
-
- <!-- MDELE, MGEN, MLIST commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- /MENU command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>grph</KEYWORD3>
-
- <!-- *MFOURI command -->
- <KEYWORD3>fit</KEYWORD3>
- <KEYWORD3>eval</KEYWORD3>
-
- <!-- *MFUN command -->
- <KEYWORD3>copy</KEYWORD3>
- <KEYWORD3>tran</KEYWORD3>
-
- <!-- MODMSH command -->
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>nocheck</KEYWORD3>
- <KEYWORD3>check</KEYWORD3>
- <KEYWORD3>detach</KEYWORD3>
-
- <!-- MODOPT command -->
- <KEYWORD3>subsp</KEYWORD3>
- <KEYWORD3>lanb</KEYWORD3>
- <KEYWORD3>reduc</KEYWORD3>
- <KEYWORD3>unsym</KEYWORD3>
- <KEYWORD3>damp</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- *MOPER command -->
- <KEYWORD3>mult</KEYWORD3>
- <KEYWORD3>solv</KEYWORD3>
- <KEYWORD3>sort</KEYWORD3>
- <KEYWORD3>covar</KEYWORD3>
- <KEYWORD3>corr</KEYWORD3>
-
- <!-- MOPT command -->
- <KEYWORD3>expnd</KEYWORD3>
- <KEYWORD3>tetexpnd</KEYWORD3>
- <KEYWORD3>trans</KEYWORD3>
- <KEYWORD3>iesz</KEYWORD3>
- <KEYWORD3>amesh</KEYWORD3>
- <KEYWORD3>default</KEYWORD3>
- <KEYWORD3>main</KEYWORD3>
- <KEYWORD3>alternate</KEYWORD3>
- <KEYWORD3>alt2</KEYWORD3>
- <KEYWORD3>qmesh</KEYWORD3>
- <KEYWORD3>vmesh</KEYWORD3>
- <KEYWORD3>split</KEYWORD3>
- <KEYWORD3>lsmo</KEYWORD3>
- <KEYWORD3>clear</KEYWORD3>
- <KEYWORD3>pyra</KEYWORD3>
- <KEYWORD3>timp</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>defa</KEYWORD3>
-
- <!-- MOVE command -->
- <KEYWORD3>p</KEYWORD3>
-
- <!-- MP, MPDATA commands -->
- <KEYWORD3>ex</KEYWORD3>
- <KEYWORD3>ey</KEYWORD3>
- <KEYWORD3>ez</KEYWORD3>
- <KEYWORD3>alpx</KEYWORD3>
- <KEYWORD3>alpy</KEYWORD3>
- <KEYWORD3>alpz</KEYWORD3>
- <KEYWORD3>reft</KEYWORD3>
- <KEYWORD3>prxy</KEYWORD3>
- <KEYWORD3>pryz</KEYWORD3>
- <KEYWORD3>prxz</KEYWORD3>
- <KEYWORD3>nuxy</KEYWORD3>
- <KEYWORD3>nuyz</KEYWORD3>
- <KEYWORD3>nuzx</KEYWORD3>
- <KEYWORD3>gxy</KEYWORD3>
- <KEYWORD3>gyz</KEYWORD3>
- <KEYWORD3>gxz</KEYWORD3>
- <KEYWORD3>damp</KEYWORD3>
- <KEYWORD3>mu</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>c</KEYWORD3>
- <KEYWORD3>enth</KEYWORD3>
- <KEYWORD3>kxx</KEYWORD3>
- <KEYWORD3>kyy</KEYWORD3>
- <KEYWORD3>kzz</KEYWORD3>
- <KEYWORD3>hf</KEYWORD3>
- <KEYWORD3>emis</KEYWORD3>
- <KEYWORD3>qrate</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>sonc</KEYWORD3>
- <KEYWORD3>rsvx</KEYWORD3>
- <KEYWORD3>rsvy</KEYWORD3>
- <KEYWORD3>rsvz</KEYWORD3>
- <KEYWORD3>perx</KEYWORD3>
- <KEYWORD3>pery</KEYWORD3>
- <KEYWORD3>perz</KEYWORD3>
- <KEYWORD3>murx</KEYWORD3>
- <KEYWORD3>mury</KEYWORD3>
- <KEYWORD3>murz</KEYWORD3>
- <KEYWORD3>mgxx</KEYWORD3>
- <KEYWORD3>mgyy</KEYWORD3>
- <KEYWORD3>mgzz</KEYWORD3>
- <KEYWORD3>lsst</KEYWORD3>
-
- <!-- MPCHG, MPDELE commands -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- /MPLIB command -->
- <KEYWORD3>read</KEYWORD3>
- <KEYWORD3>write</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
-
- <!-- MPLIST command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>evlt</KEYWORD3>
-
- <!-- MSADV command -->
- <KEYWORD3>msu</KEYWORD3>
- <KEYWORD3>supg</KEYWORD3>
-
- <!-- MSCAP command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- *MSG command -->
- <KEYWORD3>info</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>warn</KEYWORD3>
- <KEYWORD3>error</KEYWORD3>
- <KEYWORD3>fatal</KEYWORD3>
- <KEYWORD3>ui</KEYWORD3>
-
- <!-- MSHAPE command -->
- <KEYWORD3>2d</KEYWORD3>
- <KEYWORD3>3d</KEYWORD3>
-
- <!-- MSPROP command -->
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>mdif</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>constant</KEYWORD3>
- <KEYWORD3>liquid</KEYWORD3>
- <KEYWORD3>gas</KEYWORD3>
-
- <!-- /MSTART command -->
- <KEYWORD3>main</KEYWORD3>
- <KEYWORD3>input</KEYWORD3>
- <KEYWORD3>grph</KEYWORD3>
- <KEYWORD3>tool</KEYWORD3>
- <KEYWORD3>zoom</KEYWORD3>
- <KEYWORD3>work</KEYWORD3>
- <KEYWORD3>wpset</KEYWORD3>
- <KEYWORD3>abbr</KEYWORD3>
- <KEYWORD3>parm</KEYWORD3>
- <KEYWORD3>sele</KEYWORD3>
- <KEYWORD3>anno</KEYWORD3>
- <KEYWORD3>hard</KEYWORD3>
- <KEYWORD3>help</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- MSVARY command -->
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>mdif</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- MXPAND command -->
- <KEYWORD3>no</KEYWORD3>
- <KEYWORD3>yes</KEYWORD3>
-
- <!-- N, NDELE, NDIST, NGEN, NKPT commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- NLGEOM, NOORDER commands -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- NLIST, NMODIF commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>coord</KEYWORD3>
-
- <!-- NREFINE, NROTAT, NSCALE commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>smooth</KEYWORD3>
- <KEYWORD3>clean</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- NRLSUM command -->
- <KEYWORD3>disp</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
-
- <!-- NROPT command -->
- <KEYWORD3>auto</KEYWORD3>
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>modi</KEYWORD3>
- <KEYWORD3>init</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- NSEL, NSOL, NSORT commands -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>inve</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>ext</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>ang</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>zx</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>,cp</KEYWORD3>
- <KEYWORD3>,ce</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>ax</KEYWORD3>
- <KEYWORD3>ay</KEYWORD3>
- <KEYWORD3>az</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>fy</KEYWORD3>
- <KEYWORD3>fz</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>my</KEYWORD3>
- <KEYWORD3>mz</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>csgx</KEYWORD3>
- <KEYWORD3>csgy</KEYWORD3>
- <KEYWORD3>csgz</KEYWORD3>
- <KEYWORD3>chrg</KEYWORD3>
- <KEYWORD3>chrgd</KEYWORD3>
- <KEYWORD3>,bf</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>flue</KEYWORD3>
- <KEYWORD3>hgen</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>jsx</KEYWORD3>
- <KEYWORD3>jsy</KEYWORD3>
- <KEYWORD3>jsz</KEYWORD3>
- <KEYWORD3>mvdi</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>cont</KEYWORD3>
- <KEYWORD3>pene</KEYWORD3>
- <KEYWORD3>sfric</KEYWORD3>
- <KEYWORD3>stot</KEYWORD3>
- <KEYWORD3>slide</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>topo</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>cmuv</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
-
- <!-- NSLA, NSLE, NSLK, NSLL, NSLV commands -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>active</KEYWORD3>
- <KEYWORD3>inactive</KEYWORD3>
- <KEYWORD3>corner</KEYWORD3>
- <KEYWORD3>mid</KEYWORD3>
-
- <!-- NSUBST command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- NSYM command -->
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- NUMCMP, NUMMRG, NUMOFF, NUMSTR commands -->
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>kp</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>,real</KEYWORD3>
- <KEYWORD3>,cp</KEYWORD3>
- <KEYWORD3>,ce</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>low</KEYWORD3>
- <KEYWORD3>high</KEYWORD3>
- <KEYWORD3>,csys</KEYWORD3>
- <KEYWORD3>defa</KEYWORD3>
-
- <!-- NUMEXP command -->
- <KEYWORD3>yes</KEYWORD3>
- <KEYWORD3>no</KEYWORD3>
-
- <!-- NWPLAN command -->
- <KEYWORD3>p</KEYWORD3>
-
- <!-- OPDEL, OPLIST, OPRFA, OPRGR, OPRSW commands -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- OPFACT command -->
- <KEYWORD3>full</KEYWORD3>
-
- <!-- OPGRAD, OPSWEEP commands -->
- <KEYWORD3>best</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>,n</KEYWORD3>
-
- <!-- OPKEEP commmand -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- OPLFA command -->
- <KEYWORD3>main</KEYWORD3>
- <KEYWORD3>2fac</KEYWORD3>
- <KEYWORD3>3fac</KEYWORD3>
-
- <!-- OPLOOP command -->
- <KEYWORD3>top</KEYWORD3>
- <KEYWORD3>prep</KEYWORD3>
- <KEYWORD3>ignore</KEYWORD3>
- <KEYWORD3>process</KEYWORD3>
- <KEYWORD3>scalar</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- OPNCONTROL command -->
- <KEYWORD3>temp</KEYWORD3>
-
- <!-- OPPRNT command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>full</KEYWORD3>
-
- <!-- OPTYPE command -->
- <KEYWORD3>subp</KEYWORD3>
- <KEYWORD3>first</KEYWORD3>
- <KEYWORD3>rand</KEYWORD3>
- <KEYWORD3>run</KEYWORD3>
- <KEYWORD3>fact</KEYWORD3>
- <KEYWORD3>grad</KEYWORD3>
- <KEYWORD3>sweep</KEYWORD3>
- <KEYWORD3>user</KEYWORD3>
-
- <!-- OPVAR command -->
- <KEYWORD3>dv</KEYWORD3>
- <KEYWORD3>sv</KEYWORD3>
- <KEYWORD3>obj</KEYWORD3>
- <KEYWORD3>del</KEYWORD3>
-
- <!-- OUTPR command -->
- <KEYWORD3>basic</KEYWORD3>
- <KEYWORD3>nsol</KEYWORD3>
- <KEYWORD3>rsol</KEYWORD3>
- <KEYWORD3>esol</KEYWORD3>
- <KEYWORD3>nload</KEYWORD3>
- <KEYWORD3>veng</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>erase</KEYWORD3>
-
- <!-- /OUTPUT command -->
- <KEYWORD3>term</KEYWORD3>
- <KEYWORD3>append</KEYWORD3>
-
- <!-- OUTRES command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>basic</KEYWORD3>
- <KEYWORD3>nsol</KEYWORD3>
- <KEYWORD3>rsol</KEYWORD3>
- <KEYWORD3>esol</KEYWORD3>
- <KEYWORD3>nload</KEYWORD3>
- <KEYWORD3>strs</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>fgrad</KEYWORD3>
- <KEYWORD3>fflux</KEYWORD3>
- <KEYWORD3>misc</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
-
- <!-- PADELE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>name</KEYWORD3>
-
- <!-- PAGET, PAPUT commands -->
- <KEYWORD3>points</KEYWORD3>
- <KEYWORD3>table</KEYWORD3>
- <KEYWORD3>label</KEYWORD3>
-
- <!-- PARESU command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>path</KEYWORD3>
-
- <!-- PARRES command -->
- <KEYWORD3>new</KEYWORD3>
- <KEYWORD3>change</KEYWORD3>
-
- <!-- PARSAV command -->
- <KEYWORD3>scalar</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- PASAVE command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- /PBC command -->
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>vx</KEYWORD3>
- <KEYWORD3>vy</KEYWORD3>
- <KEYWORD3>vz</KEYWORD3>
- <KEYWORD3>sp01</KEYWORD3>
- <KEYWORD3>sp02</KEYWORD3>
- <KEYWORD3>sp03</KEYWORD3>
- <KEYWORD3>sp04</KEYWORD3>
- <KEYWORD3>sp05</KEYWORD3>
- <KEYWORD3>sp06</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>chrg</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>forc</KEYWORD3>
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>fy</KEYWORD3>
- <KEYWORD3>fz</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>mome</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>my</KEYWORD3>
- <KEYWORD3>mz</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>mast</KEYWORD3>
- <KEYWORD3>,cp</KEYWORD3>
- <KEYWORD3>,ce</KEYWORD3>
- <KEYWORD3>nfor</KEYWORD3>
- <KEYWORD3>nmom</KEYWORD3>
- <KEYWORD3>rfor</KEYWORD3>
- <KEYWORD3>rmom</KEYWORD3>
- <KEYWORD3>path</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
- <KEYWORD3>acelx</KEYWORD3>
- <KEYWORD3>acely</KEYWORD3>
- <KEYWORD3>acelz</KEYWORD3>
- <KEYWORD3>omeg</KEYWORD3>
- <KEYWORD3>omegx</KEYWORD3>
- <KEYWORD3>omegy</KEYWORD3>
- <KEYWORD3>omegz</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- /PBF command -->
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>flue</KEYWORD3>
- <KEYWORD3>hgen</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>jsx</KEYWORD3>
- <KEYWORD3>jsy</KEYWORD3>
- <KEYWORD3>jsz</KEYWORD3>
- <KEYWORD3>phase</KEYWORD3>
- <KEYWORD3>mvdi</KEYWORD3>
- <KEYWORD3>chrgd</KEYWORD3>
- <KEYWORD3>vltg</KEYWORD3>
- <KEYWORD3>forc</KEYWORD3>
-
- <!-- PCALC command -->
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>mult</KEYWORD3>
- <KEYWORD3>div</KEYWORD3>
- <KEYWORD3>exp</KEYWORD3>
- <KEYWORD3>deri</KEYWORD3>
- <KEYWORD3>intg</KEYWORD3>
- <KEYWORD3>sin</KEYWORD3>
- <KEYWORD3>cos</KEYWORD3>
- <KEYWORD3>asin</KEYWORD3>
- <KEYWORD3>acos</KEYWORD3>
- <KEYWORD3>log</KEYWORD3>
-
- <!-- PCONV command -->
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>erase</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
- <KEYWORD3>se</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>top</KEYWORD3>
- <KEYWORD3>mid</KEYWORD3>
- <KEYWORD3>bot</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>xz</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
-
- <!-- /PCOPY command -->
- <KEYWORD3>now</KEYWORD3>
-
- <!-- PDEF command -->
- <KEYWORD3>avg</KEYWORD3>
- <KEYWORD3>noav</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>xz</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>etab</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>cmuv</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
-
- <!-- PDRAG command -->
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
-
- <!-- PEXCLUDE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- PFACT command -->
- <KEYWORD3>base</KEYWORD3>
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>wave</KEYWORD3>
- <KEYWORD3>spat</KEYWORD3>
-
- <!-- PHYSICS command -->
- <KEYWORD3>write</KEYWORD3>
- <KEYWORD3>read</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>delete</KEYWORD3>
- <KEYWORD3>clear</KEYWORD3>
- <KEYWORD3>status</KEYWORD3>
-
- <!-- PINCLUDE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- PIVCHECK command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- PLCONV command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>se</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>top</KEYWORD3>
- <KEYWORD3>mid</KEYWORD3>
- <KEYWORD3>bot</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>xz</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
-
- <!-- PLESOL command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>xz</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>cont</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>pene</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>sfric</KEYWORD3>
- <KEYWORD3>stot</KEYWORD3>
- <KEYWORD3>slide</KEYWORD3>
- <KEYWORD3>gap</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>serr</KEYWORD3>
- <KEYWORD3>sdsg</KEYWORD3>
- <KEYWORD3>terr</KEYWORD3>
- <KEYWORD3>tdsg</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>vf</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>sene</KEYWORD3>
- <KEYWORD3>tene</KEYWORD3>
- <KEYWORD3>kene</KEYWORD3>
- <KEYWORD3>jheat</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>jt</KEYWORD3>
- <KEYWORD3>mre</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>cent</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>smisc</KEYWORD3>
- <KEYWORD3>nmisc</KEYWORD3>
- <KEYWORD3>topo</KEYWORD3>
-
- <!-- PLETAB command -->
- <KEYWORD3>noav</KEYWORD3>
- <KEYWORD3>avg</KEYWORD3>
-
- <!-- PLNSOL command -->
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>sp01</KEYWORD3>
- <KEYWORD3>sp02</KEYWORD3>
- <KEYWORD3>sp03</KEYWORD3>
- <KEYWORD3>sp04</KEYWORD3>
- <KEYWORD3>sp05</KEYWORD3>
- <KEYWORD3>sp06</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>xz</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>cont</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>pene</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>sfric</KEYWORD3>
- <KEYWORD3>stot</KEYWORD3>
- <KEYWORD3>slide</KEYWORD3>
- <KEYWORD3>gap</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>topo</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>cmuv</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
- <KEYWORD3>lmd1</KEYWORD3>
- <KEYWORD3>lmd2</KEYWORD3>
- <KEYWORD3>lmd3</KEYWORD3>
- <KEYWORD3>lmd4</KEYWORD3>
- <KEYWORD3>lmd5</KEYWORD3>
- <KEYWORD3>lmd6</KEYWORD3>
- <KEYWORD3>emd1</KEYWORD3>
- <KEYWORD3>emd2</KEYWORD3>
- <KEYWORD3>emd3</KEYWORD3>
- <KEYWORD3>emd4</KEYWORD3>
- <KEYWORD3>emd5</KEYWORD3>
- <KEYWORD3>emd6</KEYWORD3>
-
- <!-- /PLOPTS command -->
- <KEYWORD3>leg1</KEYWORD3>
- <KEYWORD3>leg2</KEYWORD3>
- <KEYWORD3>info</KEYWORD3>
- <KEYWORD3>frame</KEYWORD3>
- <KEYWORD3>title</KEYWORD3>
- <KEYWORD3>minm</KEYWORD3>
- <KEYWORD3>logo</KEYWORD3>
- <KEYWORD3>wins</KEYWORD3>
- <KEYWORD3>wp</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>auto</KEYWORD3>
-
- <!-- PLOT command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- PLPAGM command -->
- <KEYWORD3>node</KEYWORD3>
-
- <!-- PLPATH command -->
- <KEYWORD3>xg</KEYWORD3>
- <KEYWORD3>yg</KEYWORD3>
- <KEYWORD3>zg</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
-
- <!-- PLSECT command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>xz</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
-
- <!-- PLTRAC command -->
- <KEYWORD3>fluid</KEYWORD3>
- <KEYWORD3>elec</KEYWORD3>
- <KEYWORD3>magn</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>cmuv</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
-
- <!-- PLVECT command -->
- <KEYWORD3>rast</KEYWORD3>
- <KEYWORD3>vect</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>jt</KEYWORD3>
-
- <!-- PMAP command -->
- <KEYWORD3>uniform</KEYWORD3>
- <KEYWORD3>accurate</KEYWORD3>
-
- <!-- /PMETH command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
-
- <!-- /PNUM command -->
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>,real</KEYWORD3>
- <KEYWORD3>,esys</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>kp</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>sval</KEYWORD3>
- <KEYWORD3>tabnam</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- POPT command -->
- <KEYWORD3>b31.1</KEYWORD3>
- <KEYWORD3>nc</KEYWORD3>
-
- <!-- PORTOPT command -->
- <KEYWORD3>coax</KEYWORD3>
- <KEYWORD3>te10</KEYWORD3>
- <KEYWORD3>te11circ</KEYWORD3>
- <KEYWORD3>tm01circ</KEYWORD3>
-
- <!-- PPATH command -->
- <KEYWORD3>pick</KEYWORD3>
-
- <!-- PRED command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- PRESOL command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>cont</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>vf</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>forc</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>serr</KEYWORD3>
- <KEYWORD3>sdsg</KEYWORD3>
- <KEYWORD3>terr</KEYWORD3>
- <KEYWORD3>tdsg</KEYWORD3>
- <KEYWORD3>sene</KEYWORD3>
- <KEYWORD3>tene</KEYWORD3>
- <KEYWORD3>kene</KEYWORD3>
- <KEYWORD3>jheat</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>jt</KEYWORD3>
- <KEYWORD3>mre</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>cent</KEYWORD3>
- <KEYWORD3>smisc</KEYWORD3>
- <KEYWORD3>nmisc</KEYWORD3>
- <KEYWORD3>topo</KEYWORD3>
-
- <!-- PRNLD, PRRFOR, PRRSOL commands -->
- <KEYWORD3>fx</KEYWORD3>
- <KEYWORD3>fy</KEYWORD3>
- <KEYWORD3>fz</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>mx</KEYWORD3>
- <KEYWORD3>ym</KEYWORD3>
- <KEYWORD3>mz</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>vfx</KEYWORD3>
- <KEYWORD3>vfy</KEYWORD3>
- <KEYWORD3>vfz</KEYWORD3>
- <KEYWORD3>vf</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>curt</KEYWORD3>
- <KEYWORD3>vltg</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>csgx</KEYWORD3>
- <KEYWORD3>csgy</KEYWORD3>
- <KEYWORD3>csgz</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
-
- <!-- PRNSOL, PRSSOL commands -->
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>sp01</KEYWORD3>
- <KEYWORD3>sp02</KEYWORD3>
- <KEYWORD3>sp03</KEYWORD3>
- <KEYWORD3>sp04</KEYWORD3>
- <KEYWORD3>sp05</KEYWORD3>
- <KEYWORD3>sp06</KEYWORD3>
- <KEYWORD3>dof</KEYWORD3>
-
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>prin</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>cont</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>topo</KEYWORD3>
-
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>spht</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>cmuv</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
- <KEYWORD3>lmd</KEYWORD3>
- <KEYWORD3>emd</KEYWORD3>
-
- <!-- PRVECT command -->
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>js</KEYWORD3>
- <KEYWORD3>jt</KEYWORD3>
-
- <!-- PSCR command -->
- <KEYWORD3>cmap</KEYWORD3>
- <KEYWORD3>lwid</KEYWORD3>
- <KEYWORD3>color</KEYWORD3>
- <KEYWORD3>tranx</KEYWORD3>
- <KEYWORD3>trany</KEYWORD3>
- <KEYWORD3>rotate</KEYWORD3>
- <KEYWORD3>scale</KEYWORD3>
- <KEYWORD3>tiff</KEYWORD3>
- <KEYWORD3>epsi</KEYWORD3>
-
- <!-- PSDRES command -->
- <KEYWORD3>disp</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
- <KEYWORD3>rel</KEYWORD3>
- <KEYWORD3>abs</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- PSDUNIT command -->
- <KEYWORD3>disp</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
- <KEYWORD3>accg</KEYWORD3>
- <KEYWORD3>forc</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
-
- <!-- /PSEARCH command -->
- <KEYWORD3>off</KEYWORD3>
-
- <!-- PSEL command -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>inv</KEYWORD3>
-
- <!-- /PSF command -->
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>norm</KEYWORD3>
- <KEYWORD3>tanx</KEYWORD3>
- <KEYWORD3>tany</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>hcoef</KEYWORD3>
- <KEYWORD3>tbulk</KEYWORD3>
- <KEYWORD3>rad</KEYWORD3>
- <KEYWORD3>emis</KEYWORD3>
- <KEYWORD3>tamb</KEYWORD3>
- <KEYWORD3>hflux</KEYWORD3>
- <KEYWORD3>fsi</KEYWORD3>
- <KEYWORD3>impd</KEYWORD3>
- <KEYWORD3>shld</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>mur</KEYWORD3>
- <KEYWORD3>mxwf</KEYWORD3>
- <KEYWORD3>inf</KEYWORD3>
- <KEYWORD3>chrgs</KEYWORD3>
- <KEYWORD3>mci</KEYWORD3>
-
- <!-- PSOLVE command -->
- <KEYWORD3>cgsol</KEYWORD3>
- <KEYWORD3>eigdamp</KEYWORD3>
- <KEYWORD3>eigexp</KEYWORD3>
- <KEYWORD3>eigfull</KEYWORD3>
- <KEYWORD3>eigreduc</KEYWORD3>
- <KEYWORD3>eigunsym</KEYWORD3>
- <KEYWORD3>elform</KEYWORD3>
- <KEYWORD3>elprep</KEYWORD3>
- <KEYWORD3>redwrite</KEYWORD3>
- <KEYWORD3>triang</KEYWORD3>
-
- <!-- PSPRNG command -->
- <KEYWORD3>tran</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
-
- <!-- PSTRES command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- /PSYMB command -->
- <KEYWORD3>cs</KEYWORD3>
- <KEYWORD3>ndir</KEYWORD3>
- <KEYWORD3>,esys</KEYWORD3>
- <KEYWORD3>ldir</KEYWORD3>
- <KEYWORD3>layr</KEYWORD3>
- <KEYWORD3>pcon</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>dot</KEYWORD3>
- <KEYWORD3>xnod</KEYWORD3>
- <KEYWORD3>defa</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
-
- <!-- PTEMP command -->
- <KEYWORD3>none</KEYWORD3>
-
- <!-- PTXY command -->
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
-
- <!-- PUNIT command -->
- <KEYWORD3>ftin</KEYWORD3>
- <KEYWORD3>metric</KEYWORD3>
-
- <!-- PVECT command -->
- <KEYWORD3>norm</KEYWORD3>
- <KEYWORD3>tang</KEYWORD3>
- <KEYWORD3>radi</KEYWORD3>
-
- <!-- QUAD command -->
- <KEYWORD3>p</KEYWORD3>
-
- <!-- /RATIO command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- RBE3 command -->
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>uxyz</KEYWORD3>
- <KEYWORD3>rxyz</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- RDELE command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- /REPLOT command -->
- <KEYWORD3>resize</KEYWORD3>
- <KEYWORD3>fast</KEYWORD3>
-
- <!-- REXPORT command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>dyna</KEYWORD3>
-
- <!-- RFORCE command -->
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>,f</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>,m</KEYWORD3>
- <KEYWORD3>heat</KEYWORD3>
- <KEYWORD3>flow</KEYWORD3>
- <KEYWORD3>amps</KEYWORD3>
- <KEYWORD3>flux</KEYWORD3>
- <KEYWORD3>vf</KEYWORD3>
- <KEYWORD3>csg</KEYWORD3>
- <KEYWORD3>vltg</KEYWORD3>
- <KEYWORD3>durt</KEYWORD3>
-
- <!-- /RGB command -->
- <KEYWORD3>index</KEYWORD3>
- <KEYWORD3>cntr</KEYWORD3>
-
- <!-- RIGID command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>ux</KEYWORD3>
- <KEYWORD3>uy</KEYWORD3>
- <KEYWORD3>uz</KEYWORD3>
- <KEYWORD3>rotx</KEYWORD3>
- <KEYWORD3>roty</KEYWORD3>
- <KEYWORD3>rotz</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
-
- <!-- RIMPORT command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>dyna</KEYWORD3>
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>stress</KEYWORD3>
-
- <!-- RLIST command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- RSYS command -->
- <KEYWORD3>solu</KEYWORD3>
-
- <!-- SARPLOT command -->
- <KEYWORD3>factor</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>narrow</KEYWORD3>
-
- <!-- /SECLIB command -->
- <KEYWORD3>read</KEYWORD3>
- <KEYWORD3>status</KEYWORD3>
-
- <!-- SECOFFSET command -->
- <KEYWORD3>cent</KEYWORD3>
- <KEYWORD3>shrc</KEYWORD3>
- <KEYWORD3>origin</KEYWORD3>
- <KEYWORD3>user</KEYWORD3>
-
- <!-- SECREAD, SECWRITE commands -->
- <KEYWORD3>library</KEYWORD3>
- <KEYWORD3>mesh</KEYWORD3>
-
- <!-- SECTYPE command -->
- <KEYWORD3>beam</KEYWORD3>
- <KEYWORD3>rect</KEYWORD3>
- <KEYWORD3>quad</KEYWORD3>
- <KEYWORD3>csolid</KEYWORD3>
- <KEYWORD3>ctube</KEYWORD3>
- <KEYWORD3>chan</KEYWORD3>
- <KEYWORD3>i</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>,l</KEYWORD3>
- <KEYWORD3>t</KEYWORD3>
- <KEYWORD3>hats</KEYWORD3>
- <KEYWORD3>hrec</KEYWORD3>
- <KEYWORD3>asec</KEYWORD3>
- <KEYWORD3>mesh</KEYWORD3>
-
- <!-- SEDLIST command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- SEEXP command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- /SEG command -->
- <KEYWORD3>singl</KEYWORD3>
- <KEYWORD3>multi</KEYWORD3>
- <KEYWORD3>delet</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>pc</KEYWORD3>
-
- <!-- SESYMM command -->
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
-
- <!-- *SET command -->
-
- <!-- SET command -->
- <KEYWORD3>first</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>next</KEYWORD3>
- <KEYWORD3>near</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
-
- <!-- SF command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>hflux</KEYWORD3>
- <KEYWORD3>rad</KEYWORD3>
- <KEYWORD3>fsi</KEYWORD3>
- <KEYWORD3>impd</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mxwf</KEYWORD3>
- <KEYWORD3>mci</KEYWORD3>
- <KEYWORD3>chrgs</KEYWORD3>
- <KEYWORD3>inf</KEYWORD3>
- <KEYWORD3>port</KEYWORD3>
- <KEYWORD3>shld</KEYWORD3>
-
- <!-- SFA command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>hflux</KEYWORD3>
- <KEYWORD3>rad</KEYWORD3>
- <KEYWORD3>fsi</KEYWORD3>
- <KEYWORD3>impd</KEYWORD3>
- <KEYWORD3>mxwf</KEYWORD3>
- <KEYWORD3>mci</KEYWORD3>
- <KEYWORD3>mxwf</KEYWORD3>
- <KEYWORD3>chrgs</KEYWORD3>
- <KEYWORD3>inf</KEYWORD3>
- <KEYWORD3>port</KEYWORD3>
- <KEYWORD3>shld</KEYWORD3>
-
- <!-- SFACT command -->
- <KEYWORD3>,sf</KEYWORD3>
- <KEYWORD3>ms</KEYWORD3>
-
- <!-- SFADELE, SFALIST, SFBEAM commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- SFCUM command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>hflux</KEYWORD3>
- <KEYWORD3>selv</KEYWORD3>
- <KEYWORD3>chrgs</KEYWORD3>
- <KEYWORD3>mxwf</KEYWORD3>
- <KEYWORD3>inf</KEYWORD3>
- <KEYWORD3>repl</KEYWORD3>
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>igno</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
-
- <!-- SFDELE command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>hflux</KEYWORD3>
- <KEYWORD3>rad</KEYWORD3>
- <KEYWORD3>mxwf</KEYWORD3>
- <KEYWORD3>chrgs</KEYWORD3>
- <KEYWORD3>mci</KEYWORD3>
- <KEYWORD3>inf</KEYWORD3>
- <KEYWORD3>selv</KEYWORD3>
- <KEYWORD3>fsi</KEYWORD3>
- <KEYWORD3>impd</KEYWORD3>
- <KEYWORD3>port</KEYWORD3>
- <KEYWORD3>shld</KEYWORD3>
-
- <!-- SFE, SFEDELE, SFELIST commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>hflux</KEYWORD3>
- <KEYWORD3>rad</KEYWORD3>
- <KEYWORD3>mxwf</KEYWORD3>
- <KEYWORD3>chrgs</KEYWORD3>
- <KEYWORD3>mci</KEYWORD3>
- <KEYWORD3>inf</KEYWORD3>
- <KEYWORD3>selv</KEYWORD3>
- <KEYWORD3>fsi</KEYWORD3>
- <KEYWORD3>impd</KEYWORD3>
- <KEYWORD3>port</KEYWORD3>
- <KEYWORD3>shld</KEYWORD3>
-
- <!-- SFFUN, SFGRAD commands -->
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>hflux</KEYWORD3>
- <KEYWORD3>chrgs</KEYWORD3>
- <KEYWORD3>status</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
-
- <!-- SFL, SFLDELE, SFLIST, SFLLIST, SFSCALE commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>conv</KEYWORD3>
- <KEYWORD3>hflux</KEYWORD3>
- <KEYWORD3>rad</KEYWORD3>
- <KEYWORD3>fsi</KEYWORD3>
- <KEYWORD3>impd</KEYWORD3>
- <KEYWORD3>mci</KEYWORD3>
- <KEYWORD3>mxwf</KEYWORD3>
- <KEYWORD3>chrgs</KEYWORD3>
- <KEYWORD3>inf</KEYWORD3>
- <KEYWORD3>port</KEYWORD3>
- <KEYWORD3>shdl</KEYWORD3>
- <KEYWORD3>selv</KEYWORD3>
-
- <!-- /SHADE command -->
- <KEYWORD3>facet</KEYWORD3>
- <KEYWORD3>gouraud</KEYWORD3>
- <KEYWORD3>phong</KEYWORD3>
-
- <!-- SHELL command -->
- <KEYWORD3>top</KEYWORD3>
- <KEYWORD3>mid</KEYWORD3>
- <KEYWORD3>bot</KEYWORD3>
-
- <!-- /SHOW command -->
- <KEYWORD3>term</KEYWORD3>
- <KEYWORD3>file</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>pscr</KEYWORD3>
- <KEYWORD3>hpgl</KEYWORD3>
- <KEYWORD3>hpgl2</KEYWORD3>
- <KEYWORD3>vrml</KEYWORD3>
-
- <!-- /SHOWDISP command -->
- <KEYWORD3>hpgl</KEYWORD3>
- <KEYWORD3>hpgl2</KEYWORD3>
- <KEYWORD3>interleaf</KEYWORD3>
- <KEYWORD3>postscript</KEYWORD3>
- <KEYWORD3>dump</KEYWORD3>
-
- <!-- SHPP command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>warn</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>silent</KEYWORD3>
- <KEYWORD3>status</KEYWORD3>
- <KEYWORD3>summary</KEYWORD3>
- <KEYWORD3>default</KEYWORD3>
- <KEYWORD3>object</KEYWORD3>
- <KEYWORD3>modify</KEYWORD3>
- <KEYWORD3>angd</KEYWORD3>
- <KEYWORD3>aspect</KEYWORD3>
- <KEYWORD3>paral</KEYWORD3>
- <KEYWORD3>maxang</KEYWORD3>
- <KEYWORD3>jacrat</KEYWORD3>
- <KEYWORD3>warp</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>yes</KEYWORD3>
- <KEYWORD3>no</KEYWORD3>
-
- <!-- SLPPLOT, SLSPLOT commands -->
- <KEYWORD3>factor</KEYWORD3>
- <KEYWORD3>radius</KEYWORD3>
- <KEYWORD3>length</KEYWORD3>
-
- <!-- SMRTSIZE command -->
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>defa</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- SOLCONTROL command -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- SOLU command -->
- <KEYWORD3>allf</KEYWORD3>
- <KEYWORD3>aldlf</KEYWORD3>
- <KEYWORD3>arcl</KEYWORD3>
- <KEYWORD3>cnvg</KEYWORD3>
- <KEYWORD3>crprat</KEYWORD3>
- <KEYWORD3>cscv</KEYWORD3>
- <KEYWORD3>cucv</KEYWORD3>
- <KEYWORD3>dicv</KEYWORD3>
- <KEYWORD3>dsprm</KEYWORD3>
- <KEYWORD3>dtime</KEYWORD3>
- <KEYWORD3>eqit</KEYWORD3>
- <KEYWORD3>ffcv</KEYWORD3>
- <KEYWORD3>focv</KEYWORD3>
- <KEYWORD3>hfcv</KEYWORD3>
- <KEYWORD3>nc48</KEYWORD3>
- <KEYWORD3>nc49</KEYWORD3>
- <KEYWORD3>ncmit</KEYWORD3>
- <KEYWORD3>ncmls</KEYWORD3>
- <KEYWORD3>ncmss</KEYWORD3>
- <KEYWORD3>mfcv</KEYWORD3>
- <KEYWORD3>mocv</KEYWORD3>
- <KEYWORD3>mxdvl</KEYWORD3>
- <KEYWORD3>prcv</KEYWORD3>
- <KEYWORD3>psinc</KEYWORD3>
- <KEYWORD3>resfrq</KEYWORD3>
- <KEYWORD3>reseig</KEYWORD3>
- <KEYWORD3>rocv</KEYWORD3>
- <KEYWORD3>smcv</KEYWORD3>
- <KEYWORD3>tecv</KEYWORD3>
- <KEYWORD3>vecv</KEYWORD3>
- <KEYWORD3>vocv</KEYWORD3>
- <KEYWORD3>vmcv</KEYWORD3>
-
- <!-- SPOPT command -->
- <KEYWORD3>sprs</KEYWORD3>
- <KEYWORD3>mprs</KEYWORD3>
- <KEYWORD3>ddam</KEYWORD3>
- <KEYWORD3>psd</KEYWORD3>
- <KEYWORD3>no</KEYWORD3>
- <KEYWORD3>yes</KEYWORD3>
-
- <!-- SRSS command -->
- <KEYWORD3>disp</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
-
- <!-- /SSCALE command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- SSTIF command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- *STATUS command -->
- <KEYWORD3>argx</KEYWORD3>
-
- <!-- /STATUS command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>title</KEYWORD3>
- <KEYWORD3>units</KEYWORD3>
- <KEYWORD3>mem</KEYWORD3>
- <KEYWORD3>db</KEYWORD3>
- <KEYWORD3>config</KEYWORD3>
- <KEYWORD3>global</KEYWORD3>
- <KEYWORD3>solu</KEYWORD3>
- <KEYWORD3>phys</KEYWORD3>
-
- <!-- STORE command -->
- <KEYWORD3>merge</KEYWORD3>
- <KEYWORD3>new</KEYWORD3>
- <KEYWORD3>appen</KEYWORD3>
- <KEYWORD3>alloc</KEYWORD3>
- <KEYWORD3>psd</KEYWORD3>
-
- <!-- SUBOPT command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>part</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
-
- <!-- SUBSET command -->
- <KEYWORD3>first</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>next</KEYWORD3>
- <KEYWORD3>near</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>velo</KEYWORD3>
- <KEYWORD3>acel</KEYWORD3>
-
- <!-- SUMTYPE command -->
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>prin</KEYWORD3>
-
- <!-- TB command -->
- <KEYWORD3>bkin</KEYWORD3>
- <KEYWORD3>mkin</KEYWORD3>
- <KEYWORD3>miso</KEYWORD3>
- <KEYWORD3>biso</KEYWORD3>
- <KEYWORD3>aniso</KEYWORD3>
- <KEYWORD3>dp</KEYWORD3>
- <KEYWORD3>melas</KEYWORD3>
- <KEYWORD3>user</KEYWORD3>
- <KEYWORD3>kinh</KEYWORD3>
- <KEYWORD3>anand</KEYWORD3>
- <KEYWORD3>creep</KEYWORD3>
- <KEYWORD3>swell</KEYWORD3>
- <KEYWORD3>bh</KEYWORD3>
- <KEYWORD3>piez</KEYWORD3>
- <KEYWORD3>fail</KEYWORD3>
- <KEYWORD3>mooney</KEYWORD3>
- <KEYWORD3>water</KEYWORD3>
- <KEYWORD3>anel</KEYWORD3>
- <KEYWORD3>concr</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>fcon</KEYWORD3>
- <KEYWORD3>pflow</KEYWORD3>
- <KEYWORD3>evisc</KEYWORD3>
- <KEYWORD3>plaw</KEYWORD3>
- <KEYWORD3>foam</KEYWORD3>
- <KEYWORD3>honey</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>eos</KEYWORD3>
-
- <!-- TBDELE, TBLIST commands -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- TBPLOT command -->
- <KEYWORD3>mkin</KEYWORD3>
- <KEYWORD3>kinh</KEYWORD3>
- <KEYWORD3>melas</KEYWORD3>
- <KEYWORD3>miso</KEYWORD3>
- <KEYWORD3>bkin</KEYWORD3>
- <KEYWORD3>biso</KEYWORD3>
- <KEYWORD3>bh</KEYWORD3>
- <KEYWORD3>nb</KEYWORD3>
- <KEYWORD3>mh</KEYWORD3>
- <KEYWORD3>sbh</KEYWORD3>
- <KEYWORD3>snb</KEYWORD3>
- <KEYWORD3>smh</KEYWORD3>
-
- <!-- TBPT command -->
- <KEYWORD3>defi</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
-
- <!-- TEE command -->
- <KEYWORD3>wt</KEYWORD3>
- <KEYWORD3>uft</KEYWORD3>
-
- <!-- TERM command -->
- <KEYWORD3>copy</KEYWORD3>
- <KEYWORD3>loop</KEYWORD3>
- <KEYWORD3>noprom</KEYWORD3>
-
- <!-- TIMINT command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>struc</KEYWORD3>
- <KEYWORD3>therm</KEYWORD3>
- <KEYWORD3>elect</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>fluid</KEYWORD3>
-
- <!-- TIMP command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- TRANSFER command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- /TRIAD command -->
- <KEYWORD3>orig</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>lbot</KEYWORD3>
- <KEYWORD3>rbot</KEYWORD3>
- <KEYWORD3>ltop</KEYWORD3>
- <KEYWORD3>rtop</KEYWORD3>
-
- <!-- /TRLCY command -->
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>isurf</KEYWORD3>
- <KEYWORD3>cm</KEYWORD3>
- <KEYWORD3>curve</KEYWORD3>
-
- <!-- TRNOPT command -->
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>reduc</KEYWORD3>
- <KEYWORD3>msup</KEYWORD3>
- <KEYWORD3>damp</KEYWORD3>
- <KEYWORD3>nodamp</KEYWORD3>
-
- <!-- TRPDEL, TRPLIS, TRPOIN commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- TSHAP command -->
- <KEYWORD3>iine</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>para</KEYWORD3>
- <KEYWORD3>arc</KEYWORD3>
- <KEYWORD3>carc</KEYWORD3>
- <KEYWORD3>circ</KEYWORD3>
- <KEYWORD3>tria</KEYWORD3>
- <KEYWORD3>tri6</KEYWORD3>
- <KEYWORD3>quad</KEYWORD3>
- <KEYWORD3>qua8</KEYWORD3>
- <KEYWORD3>cyli</KEYWORD3>
- <KEYWORD3>cone</KEYWORD3>
- <KEYWORD3>sphe</KEYWORD3>
- <KEYWORD3>pilo</KEYWORD3>
-
- <!-- /TYPE command -->
- <KEYWORD3>basic</KEYWORD3>
- <KEYWORD3>sect</KEYWORD3>
- <KEYWORD3>hidc</KEYWORD3>
- <KEYWORD3>hidd</KEYWORD3>
- <KEYWORD3>hidp</KEYWORD3>
- <KEYWORD3>cap</KEYWORD3>
- <KEYWORD3>zbuf</KEYWORD3>
- <KEYWORD3>zcap</KEYWORD3>
- <KEYWORD3>zqsl</KEYWORD3>
- <KEYWORD3>hqsl</KEYWORD3>
-
- <!-- /UI command -->
- <KEYWORD3>help</KEYWORD3>
- <KEYWORD3>view</KEYWORD3>
- <KEYWORD3>wpse</KEYWORD3>
- <KEYWORD3>wpvi</KEYWORD3>
- <KEYWORD3>result</KEYWORD3>
- <KEYWORD3>query</KEYWORD3>
- <KEYWORD3>copy</KEYWORD3>
- <KEYWORD3>anno</KEYWORD3>
- <KEYWORD3>select</KEYWORD3>
- <KEYWORD3>,nsel</KEYWORD3>
- <KEYWORD3>,esel</KEYWORD3>
- <KEYWORD3>,ksel</KEYWORD3>
- <KEYWORD3>,lsel</KEYWORD3>
- <KEYWORD3>,asel</KEYWORD3>
- <KEYWORD3>,vsel</KEYWORD3>
- <KEYWORD3>refresh</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>element</KEYWORD3>
- <KEYWORD3>grid</KEYWORD3>
- <KEYWORD3>format</KEYWORD3>
- <KEYWORD3>pscr</KEYWORD3>
- <KEYWORD3>tiff</KEYWORD3>
- <KEYWORD3>epsi</KEYWORD3>
- <KEYWORD3>bmp</KEYWORD3>
- <KEYWORD3>wmf</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>screen</KEYWORD3>
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>graph</KEYWORD3>
- <KEYWORD3>color</KEYWORD3>
- <KEYWORD3>mono</KEYWORD3>
- <KEYWORD3>grey</KEYWORD3>
- <KEYWORD3>krev</KEYWORD3>
- <KEYWORD3>norm</KEYWORD3>
- <KEYWORD3>reverse</KEYWORD3>
- <KEYWORD3>orient</KEYWORD3>
- <KEYWORD3>landscape</KEYWORD3>
- <KEYWORD3>portrait</KEYWORD3>
- <KEYWORD3>compress</KEYWORD3>
- <KEYWORD3>yes</KEYWORD3>
- <KEYWORD3>no</KEYWORD3>
-
- <!-- /UIS command -->
- <KEYWORD3>msgpop</KEYWORD3>
- <KEYWORD3>replot</KEYWORD3>
- <KEYWORD3>abort</KEYWORD3>
- <KEYWORD3>dyna</KEYWORD3>
- <KEYWORD3>pick</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>defa</KEYWORD3>
-
- <!-- /UNITS command -->
- <KEYWORD3>user</KEYWORD3>
- <KEYWORD3>si</KEYWORD3>
- <KEYWORD3>cgs</KEYWORD3>
- <KEYWORD3>bft</KEYWORD3>
- <KEYWORD3>bin</KEYWORD3>
-
- <!-- UPCOORD command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
-
- <!-- /USER command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- USRCAL command -->
- <KEYWORD3>usrefl</KEYWORD3>
- <KEYWORD3>userfl</KEYWORD3>
- <KEYWORD3>usercv</KEYWORD3>
- <KEYWORD3>userpr</KEYWORD3>
- <KEYWORD3>userfx</KEYWORD3>
- <KEYWORD3>userch</KEYWORD3>
- <KEYWORD3>userfd</KEYWORD3>
- <KEYWORD3>userou</KEYWORD3>
- <KEYWORD3>usermc</KEYWORD3>
- <KEYWORD3>usolbeg</KEYWORD3>
- <KEYWORD3>uldbeg</KEYWORD3>
- <KEYWORD3>ussbeg</KEYWORD3>
- <KEYWORD3>uitbeg</KEYWORD3>
- <KEYWORD3>uitfin</KEYWORD3>
- <KEYWORD3>ussfin</KEYWORD3>
- <KEYWORD3>uldfin</KEYWORD3>
- <KEYWORD3>usolfin</KEYWORD3>
- <KEYWORD3>uanbeg</KEYWORD3>
- <KEYWORD3>uanfin</KEYWORD3>
- <KEYWORD3>uelmatx</KEYWORD3>
-
- <!-- VA, VADD, VCLEAR, /VCONE, VCVFILL, VDELE, VDGL, VDRAG, VEXT commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- *VFILL command -->
- <KEYWORD3>data</KEYWORD3>
- <KEYWORD3>ramp</KEYWORD3>
- <KEYWORD3>rand</KEYWORD3>
- <KEYWORD3>gdis</KEYWORD3>
- <KEYWORD3>tria</KEYWORD3>
- <KEYWORD3>beta</KEYWORD3>
- <KEYWORD3>gamm</KEYWORD3>
-
- <!-- *VFUN command -->
- <KEYWORD3>acos</KEYWORD3>
- <KEYWORD3>asin</KEYWORD3>
- <KEYWORD3>asort</KEYWORD3>
- <KEYWORD3>atan</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>copy</KEYWORD3>
- <KEYWORD3>cos</KEYWORD3>
- <KEYWORD3>cosh</KEYWORD3>
- <KEYWORD3>dircos</KEYWORD3>
- <KEYWORD3>dsort</KEYWORD3>
- <KEYWORD3>euler</KEYWORD3>
- <KEYWORD3>exp</KEYWORD3>
- <KEYWORD3>expa</KEYWORD3>
- <KEYWORD3>log</KEYWORD3>
- <KEYWORD3>log10</KEYWORD3>
- <KEYWORD3>nint</KEYWORD3>
- <KEYWORD3>not</KEYWORD3>
- <KEYWORD3>pwr</KEYWORD3>
- <KEYWORD3>sin</KEYWORD3>
- <KEYWORD3>sinh</KEYWORD3>
- <KEYWORD3>sqrt</KEYWORD3>
- <KEYWORD3>tan</KEYWORD3>
- <KEYWORD3>tanh</KEYWORD3>
- <KEYWORD3>tang</KEYWORD3>
- <KEYWORD3>norm</KEYWORD3>
- <KEYWORD3>local</KEYWORD3>
- <KEYWORD3>global</KEYWORD3>
-
- <!-- VGEN command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- *VGET command -->
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>ang</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>zx</KEYWORD3>
- <KEYWORD3>,nsel</KEYWORD3>
-
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>cent</KEYWORD3>
- <KEYWORD3>adj</KEYWORD3>
- <KEYWORD3>attr</KEYWORD3>
- <KEYWORD3>geom</KEYWORD3>
- <KEYWORD3>,esel</KEYWORD3>
- <KEYWORD3>shpar</KEYWORD3>
-
- <KEYWORD3>kp</KEYWORD3>
- <KEYWORD3>div</KEYWORD3>
- <KEYWORD3>,ksel</KEYWORD3>
-
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>leng</KEYWORD3>
- <KEYWORD3>,lsel</KEYWORD3>
-
- <KEYWORD3>area</KEYWORD3>
- <KEYWORD3>loop</KEYWORD3>
- <KEYWORD3>,asel</KEYWORD3>
-
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>shell</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>,vsel</KEYWORD3>
-
- <KEYWORD3>cdsy</KEYWORD3>
-
- <KEYWORD3>rcon</KEYWORD3>
- <KEYWORD3>const</KEYWORD3>
-
- <KEYWORD3>const</KEYWORD3>
- <KEYWORD3>bkin</KEYWORD3>
- <KEYWORD3>mkin</KEYWORD3>
- <KEYWORD3>miso</KEYWORD3>
- <KEYWORD3>biso</KEYWORD3>
- <KEYWORD3>aniso</KEYWORD3>
- <KEYWORD3>dp</KEYWORD3>
- <KEYWORD3>melas</KEYWORD3>
- <KEYWORD3>user</KEYWORD3>
- <KEYWORD3>kinh</KEYWORD3>
- <KEYWORD3>anand</KEYWORD3>
- <KEYWORD3>creep</KEYWORD3>
- <KEYWORD3>swell</KEYWORD3>
- <KEYWORD3>bh</KEYWORD3>
- <KEYWORD3>piez</KEYWORD3>
- <KEYWORD3>fail</KEYWORD3>
- <KEYWORD3>mooney</KEYWORD3>
- <KEYWORD3>water</KEYWORD3>
- <KEYWORD3>anel</KEYWORD3>
- <KEYWORD3>concr</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>fcon</KEYWORD3>
- <KEYWORD3>pflow</KEYWORD3>
- <KEYWORD3>evisc</KEYWORD3>
- <KEYWORD3>plaw</KEYWORD3>
- <KEYWORD3>foam</KEYWORD3>
- <KEYWORD3>honey</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>eos</KEYWORD3>
-
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
-
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
-
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>hs</KEYWORD3>
- <KEYWORD3>bfe</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
-
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
-
- <KEYWORD3>etab</KEYWORD3>
-
- <!-- VGLUE, VIMP, VINP, VINV, VLIST, VLSCALE, VMESH, VOFFST commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- /VIEW command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>wp</KEYWORD3>
-
- <!-- *VOPER command -->
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>sub</KEYWORD3>
- <KEYWORD3>mult</KEYWORD3>
- <KEYWORD3>div</KEYWORD3>
- <KEYWORD3>min</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>lt</KEYWORD3>
- <KEYWORD3>le</KEYWORD3>
- <KEYWORD3>eq</KEYWORD3>
- <KEYWORD3>ne</KEYWORD3>
- <KEYWORD3>ge</KEYWORD3>
- <KEYWORD3>gt</KEYWORD3>
- <KEYWORD3>der1</KEYWORD3>
- <KEYWORD3>der2</KEYWORD3>
- <KEYWORD3>int1</KEYWORD3>
- <KEYWORD3>int2</KEYWORD3>
- <KEYWORD3>dot</KEYWORD3>
- <KEYWORD3>cross</KEYWORD3>
- <KEYWORD3>gath</KEYWORD3>
- <KEYWORD3>scat</KEYWORD3>
-
- <!-- VOVLAP, VPTN commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- VPLOT command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>dege</KEYWORD3>
-
- <!-- *VPUT command -->
- <KEYWORD3>node</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>rot</KEYWORD3>
- <KEYWORD3>temp</KEYWORD3>
- <KEYWORD3>pres</KEYWORD3>
- <KEYWORD3>volt</KEYWORD3>
- <KEYWORD3>mag</KEYWORD3>
- <KEYWORD3>v</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>curr</KEYWORD3>
- <KEYWORD3>emf</KEYWORD3>
- <KEYWORD3>enke</KEYWORD3>
- <KEYWORD3>ends</KEYWORD3>
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>xy</KEYWORD3>
- <KEYWORD3>yz</KEYWORD3>
- <KEYWORD3>xz</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>epto</KEYWORD3>
- <KEYWORD3>epel</KEYWORD3>
- <KEYWORD3>eppl</KEYWORD3>
- <KEYWORD3>epcr</KEYWORD3>
- <KEYWORD3>epth</KEYWORD3>
- <KEYWORD3>epsw</KEYWORD3>
- <KEYWORD3>nl</KEYWORD3>
- <KEYWORD3>sepl</KEYWORD3>
- <KEYWORD3>srat</KEYWORD3>
- <KEYWORD3>hpres</KEYWORD3>
- <KEYWORD3>epeq</KEYWORD3>
- <KEYWORD3>psv</KEYWORD3>
- <KEYWORD3>plwk</KEYWORD3>
- <KEYWORD3>tg</KEYWORD3>
- <KEYWORD3>tf</KEYWORD3>
- <KEYWORD3>pg</KEYWORD3>
- <KEYWORD3>ef</KEYWORD3>
- <KEYWORD3>,d</KEYWORD3>
- <KEYWORD3>h</KEYWORD3>
- <KEYWORD3>b</KEYWORD3>
- <KEYWORD3>fmag</KEYWORD3>
- <KEYWORD3>ttot</KEYWORD3>
- <KEYWORD3>hflu</KEYWORD3>
- <KEYWORD3>hflm</KEYWORD3>
- <KEYWORD3>cond</KEYWORD3>
- <KEYWORD3>pcoe</KEYWORD3>
- <KEYWORD3>ptot</KEYWORD3>
- <KEYWORD3>mach</KEYWORD3>
- <KEYWORD3>strm</KEYWORD3>
- <KEYWORD3>dens</KEYWORD3>
- <KEYWORD3>visc</KEYWORD3>
- <KEYWORD3>evis</KEYWORD3>
- <KEYWORD3>econ</KEYWORD3>
- <KEYWORD3>yplu</KEYWORD3>
- <KEYWORD3>tauw</KEYWORD3>
-
- <KEYWORD3>elem</KEYWORD3>
- <KEYWORD3>etab</KEYWORD3>
-
- <!-- VROTAT command -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
-
- <!-- VSBA, VSBV, VSBW commands -->
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>sepo</KEYWORD3>
- <KEYWORD3>delete</KEYWORD3>
- <KEYWORD3>keep</KEYWORD3>
-
- <!-- *VSCFUN command -->
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>min</KEYWORD3>
- <KEYWORD3>lmax</KEYWORD3>
- <KEYWORD3>lmin</KEYWORD3>
- <KEYWORD3>first</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>medi</KEYWORD3>
- <KEYWORD3>mean</KEYWORD3>
- <KEYWORD3>vari</KEYWORD3>
- <KEYWORD3>stdv</KEYWORD3>
- <KEYWORD3>rms</KEYWORD3>
- <KEYWORD3>num</KEYWORD3>
-
- <!-- VSEL, VSLA commands -->
- <KEYWORD3>s</KEYWORD3>
- <KEYWORD3>,r</KEYWORD3>
- <KEYWORD3>,a</KEYWORD3>
- <KEYWORD3>u</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>inve</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>volu</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>,mat</KEYWORD3>
- <KEYWORD3>,type</KEYWORD3>
- <KEYWORD3>,real</KEYWORD3>
- <KEYWORD3>,esys</KEYWORD3>
-
- <!-- VSUM command -->
- <KEYWORD3>default</KEYWORD3>
- <KEYWORD3>fine</KEYWORD3>
-
- <!-- VSWEEP command -->
- <KEYWORD3>p</KEYWORD3>
-
- <!-- VSYMM, VTRAN, /VUP commands -->
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>p</KEYWORD3>
- <KEYWORD3>-x</KEYWORD3>
- <KEYWORD3>-y</KEYWORD3>
- <KEYWORD3>-z</KEYWORD3>
-
- <!-- WAVES command -->
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>rms</KEYWORD3>
-
- <!-- /WINDOW command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>full</KEYWORD3>
- <KEYWORD3>left</KEYWORD3>
- <KEYWORD3>righ</KEYWORD3>
- <KEYWORD3>top</KEYWORD3>
- <KEYWORD3>bot</KEYWORD3>
- <KEYWORD3>ltop</KEYWORD3>
- <KEYWORD3>lbot</KEYWORD3>
- <KEYWORD3>rtop</KEYWORD3>
- <KEYWORD3>rbot</KEYWORD3>
- <KEYWORD3>squa</KEYWORD3>
- <KEYWORD3>dele</KEYWORD3>
-
- <!-- WPAVE command -->
- <KEYWORD3>p</KEYWORD3>
-
- <!-- WSORT command -->
- <KEYWORD3>x</KEYWORD3>
- <KEYWORD3>y</KEYWORD3>
- <KEYWORD3>z</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>rms</KEYWORD3>
-
- <!-- WSTART command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- /YRANGE command -->
- <KEYWORD3>all</KEYWORD3>
-
- <!-- /ZOOM command -->
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>back</KEYWORD3>
- <KEYWORD3>scrn</KEYWORD3>
- <KEYWORD3>rect</KEYWORD3>
-
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+
+ Version 0.9.8 - generated by Randolf Mock on 11/22/2003
+ Randolf.Mock at siemens.com
+
+ <KEYWORD1>: ANSYS commands
+ <KEYWORD2>: abbreviated *get commands
+ <KEYWORD3>: ANSYS command options
+
+-->
+
+<!-- The keywords and functions defined here are those of ANSYS 5.7 -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="!" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+
+ <!-- labels - eg :test -->
+ <EOL_SPAN TYPE="LABEL" AT_LINE_START="TRUE">:</EOL_SPAN>
+
+ <!-- comments -->
+ <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
+
+ <!-- literals -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+<!-- Special treatment of the ANSYS commands
+ beginning with a '/' or '*' character -->
+
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ABBR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ABB</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*AFUN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*AFU</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ASK</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFCLOS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFOPEN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFWRITE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CFW</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CREATE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CRE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CYCLE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*CYC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*DEL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*DIM</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*DO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ELSEIF</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ELSE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ENDDO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ENDIF</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*END</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*EVAL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*EVA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*EXIT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*EXI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*GET</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*GO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*IF</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*LIST</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*LIS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MFOURI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MFO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MFUN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MFU</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MOONEY</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MOO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MOPER</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MOP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*MSG</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*REPEAT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*REP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*SET</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*STATUS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*STA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*TREAD</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*TRE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ULIB</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*ULI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*USE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VABS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VAB</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VCOL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VCO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VCUM</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VCU</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VEDIT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VED</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFACT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFILL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFUN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VFU</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VGET</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VGE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VITRP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VIT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VLEN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VLE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VMASK</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VMA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VOPER</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VOP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VPLOT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VPL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VPUT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VPU</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VREAD</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VRE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VSCFUN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VSC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VSTAT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VST</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VWRITE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">*VWR</SEQ>
+
+
+
+
+
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANFILE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANF</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANGLE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANG</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANNOT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANUM</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ANU</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ASSIGN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ASS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUTO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUX15</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUX2</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AUX</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AXLAB</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/AXL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/BATCH</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/BAT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLABEL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLEAR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLOG</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CLO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CMAP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CMA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COLOR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COM</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CONFIG</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CONTOUR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CON</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COPY</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/COP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CPLANE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CPL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CTYPE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CTY</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CVAL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/CVA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DELETE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DEL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DEVDISP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DEVICE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DEV</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DIST</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DIS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DSCALE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DSC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DV3D</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/DV3</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EDGE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EDG</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EFACET</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EFA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EOF</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ERASE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ERA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ESHAPE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ESH</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EXIT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EXI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EXPAND</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/EXP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FACET</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FAC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FDELE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FDE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FILNAME</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FIL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FOCUS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FOC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FORMAT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FOR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FTYPE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/FTY</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GCMD</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GCM</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GCOLUMN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GCO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GFILE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GFI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GFORMAT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GFO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GLINE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GLI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GMARKER</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GMA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GOLIST</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GOL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GOPR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GOP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRAPHICS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRESUME</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRID</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GROPT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRTYP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GRT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GSAVE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GSA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GST</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GTHK</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GTH</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GTYPE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/GTY</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/HEADER</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/HEA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/INPUT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/INP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LARC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LAR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LIGHT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LIG</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LINE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LIN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LSPEC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LSP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LSYMBOL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/LSY</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MENU</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MEN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MPLIB</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MPL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MREP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MRE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MSTART</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/MST</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NERR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NER</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOERASE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOLIST</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOPR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NORMAL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NOR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NUMBER</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/NUM</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/OPT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/OUTPUT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/OUt</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PAGE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PAG</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PBC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PBF</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PCIRCLE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PCI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PCOPY</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PCO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PLOPTS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PLO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMACRO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMETH</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PME</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMORE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PMO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PNUM</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PNU</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POLYGON</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POST26</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POST1</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/POS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PREP7</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PRE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSEARCH</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSF</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSPEC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSTATUS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PST</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSYMB</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PSY</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PWEDGE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/PWE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/QUIT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/QUI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RATIO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RAT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RENAME</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/REN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/REPLOT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/REP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RESET</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RES</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RGB</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RUNST</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/RUN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SECLIB</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SEC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SEG</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHADE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHOWDISP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHOW</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHRINK</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SHR</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SOLU</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SOL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SSCALE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SSC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/STATUS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/STA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/STITLE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/STI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SYP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/SYS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TITLE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TIT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TLABEL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TLA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TRIAD</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TRI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TRLCY</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TRL</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TSPEC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TSP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TYPE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/TYP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UCMD</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UCM</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UIS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UNITS</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/UNI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/USER</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/USE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VCONE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VCO</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VIEW</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VIE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VSCALE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VSC</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/VUP</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/WAIT</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/WAI</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/WINDOW</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/WIN</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/XRANGE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/XRA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/YRANGE</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/YRA</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ZOOM</SEQ>
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">/ZOO</SEQ>
+
+
+
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">$</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="NULL">;</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <!-- *msg command: variable formats -->
+ <SEQ TYPE="KEYWORD2">%C</SEQ> <!-- alphamuneric format -->
+ <SEQ TYPE="KEYWORD2">%G</SEQ> <!-- double precision format -->
+ <SEQ TYPE="KEYWORD2">%I</SEQ> <!-- integer format -->
+ <SEQ TYPE="KEYWORD2">%/</SEQ> <!-- line break -->
+
+ <!-- variables -->
+ <SPAN TYPE="FUNCTION" NO_LINE_BREAK="TRUE">
+ <BEGIN>%</BEGIN>
+ <END>%</END>
+ </SPAN>
+
+ <KEYWORDS>
+
+<!-- ANSYS Commands (incl. abbreviated version) -->
+
+ <KEYWORD1>A</KEYWORD1>
+ <KEYWORD1>AADD</KEYWORD1>
+ <KEYWORD1>AADD</KEYWORD1>
+ <KEYWORD1>AATT</KEYWORD1>
+ <KEYWORD1>AATT</KEYWORD1>
+ <KEYWORD1>ABBR</KEYWORD1>
+ <KEYWORD1>ABBRES</KEYWORD1>
+ <KEYWORD1>ABBS</KEYWORD1>
+ <KEYWORD1>ABBSAV</KEYWORD1>
+ <KEYWORD1>ABS</KEYWORD1>
+ <KEYWORD1>ACCA</KEYWORD1>
+ <KEYWORD1>ACCAT</KEYWORD1>
+ <KEYWORD1>ACEL</KEYWORD1>
+ <KEYWORD1>ACEL</KEYWORD1>
+ <KEYWORD1>ACLE</KEYWORD1>
+ <KEYWORD1>ACLEAR</KEYWORD1>
+ <KEYWORD1>ADAP</KEYWORD1>
+ <KEYWORD1>ADAPT</KEYWORD1>
+ <KEYWORD1>ADD</KEYWORD1>
+ <KEYWORD1>ADDA</KEYWORD1>
+ <KEYWORD1>ADDAM</KEYWORD1>
+ <KEYWORD1>ADEL</KEYWORD1>
+ <KEYWORD1>ADELE</KEYWORD1>
+ <KEYWORD1>ADGL</KEYWORD1>
+ <KEYWORD1>ADGL</KEYWORD1>
+ <KEYWORD1>ADRA</KEYWORD1>
+ <KEYWORD1>ADRAG</KEYWORD1>
+ <KEYWORD1>AFIL</KEYWORD1>
+ <KEYWORD1>AFILLT</KEYWORD1>
+ <KEYWORD1>AFLI</KEYWORD1>
+ <KEYWORD1>AFLIST</KEYWORD1>
+ <KEYWORD1>AFSU</KEYWORD1>
+ <KEYWORD1>AFSURF</KEYWORD1>
+ <KEYWORD1>AGEN</KEYWORD1>
+ <KEYWORD1>AGEN</KEYWORD1>
+ <KEYWORD1>AGLU</KEYWORD1>
+ <KEYWORD1>AGLUE</KEYWORD1>
+ <KEYWORD1>AINA</KEYWORD1>
+ <KEYWORD1>AINA</KEYWORD1>
+ <KEYWORD1>AINP</KEYWORD1>
+ <KEYWORD1>AINP</KEYWORD1>
+ <KEYWORD1>AINV</KEYWORD1>
+ <KEYWORD1>AINV</KEYWORD1>
+ <KEYWORD1>AL</KEYWORD1>
+ <KEYWORD1>ALIS</KEYWORD1>
+ <KEYWORD1>ALIST</KEYWORD1>
+ <KEYWORD1>ALLS</KEYWORD1>
+ <KEYWORD1>ALLSEL</KEYWORD1>
+ <KEYWORD1>ALPF</KEYWORD1>
+ <KEYWORD1>ALPFILL</KEYWORD1>
+ <KEYWORD1>ALPH</KEYWORD1>
+ <KEYWORD1>ALPHAD</KEYWORD1>
+ <KEYWORD1>AMAP</KEYWORD1>
+ <KEYWORD1>AMAP</KEYWORD1>
+ <KEYWORD1>AMES</KEYWORD1>
+ <KEYWORD1>AMESH</KEYWORD1>
+ <KEYWORD1>ANCN</KEYWORD1>
+ <KEYWORD1>ANCNTR</KEYWORD1>
+ <KEYWORD1>ANCU</KEYWORD1>
+ <KEYWORD1>ANCUT</KEYWORD1>
+ <KEYWORD1>ANDA</KEYWORD1>
+ <KEYWORD1>ANDATA</KEYWORD1>
+ <KEYWORD1>ANDS</KEYWORD1>
+ <KEYWORD1>ANDSCL</KEYWORD1>
+ <KEYWORD1>ANDY</KEYWORD1>
+ <KEYWORD1>ANDYNA</KEYWORD1>
+ <KEYWORD1>ANFL</KEYWORD1>
+ <KEYWORD1>ANFLOW</KEYWORD1>
+ <KEYWORD1>ANIM</KEYWORD1>
+ <KEYWORD1>ANIM</KEYWORD1>
+ <KEYWORD1>ANIS</KEYWORD1>
+ <KEYWORD1>ANISOS</KEYWORD1>
+ <KEYWORD1>ANMO</KEYWORD1>
+ <KEYWORD1>ANMODE</KEYWORD1>
+ <KEYWORD1>ANOR</KEYWORD1>
+ <KEYWORD1>ANORM</KEYWORD1>
+ <KEYWORD1>ANTI</KEYWORD1>
+ <KEYWORD1>ANTIME</KEYWORD1>
+ <KEYWORD1>ANTY</KEYWORD1>
+ <KEYWORD1>ANTYPE</KEYWORD1>
+ <KEYWORD1>AOFF</KEYWORD1>
+ <KEYWORD1>AOFFST</KEYWORD1>
+ <KEYWORD1>AOVL</KEYWORD1>
+ <KEYWORD1>AOVLAP</KEYWORD1>
+ <KEYWORD1>APLO</KEYWORD1>
+ <KEYWORD1>APLOT</KEYWORD1>
+ <KEYWORD1>APPE</KEYWORD1>
+ <KEYWORD1>APPEND</KEYWORD1>
+ <KEYWORD1>APTN</KEYWORD1>
+ <KEYWORD1>APTN</KEYWORD1>
+ <KEYWORD1>ARCL</KEYWORD1>
+ <KEYWORD1>ARCLEN</KEYWORD1>
+ <KEYWORD1>ARCO</KEYWORD1>
+ <KEYWORD1>ARCOLLAPSE</KEYWORD1>
+ <KEYWORD1>ARCT</KEYWORD1>
+ <KEYWORD1>ARCTRM</KEYWORD1>
+ <KEYWORD1>ARDE</KEYWORD1>
+ <KEYWORD1>ARDETACH</KEYWORD1>
+ <KEYWORD1>AREA</KEYWORD1>
+ <KEYWORD1>AREAS</KEYWORD1>
+ <KEYWORD1>AREF</KEYWORD1>
+ <KEYWORD1>AREFINE</KEYWORD1>
+ <KEYWORD1>AREV</KEYWORD1>
+ <KEYWORD1>AREVERSE</KEYWORD1>
+ <KEYWORD1>ARFI</KEYWORD1>
+ <KEYWORD1>ARFILL</KEYWORD1>
+ <KEYWORD1>ARME</KEYWORD1>
+ <KEYWORD1>ARMERGE</KEYWORD1>
+ <KEYWORD1>AROT</KEYWORD1>
+ <KEYWORD1>AROTAT</KEYWORD1>
+ <KEYWORD1>ARSC</KEYWORD1>
+ <KEYWORD1>ARSCALE</KEYWORD1>
+ <KEYWORD1>ARSP</KEYWORD1>
+ <KEYWORD1>ARSPLIT</KEYWORD1>
+ <KEYWORD1>ARSY</KEYWORD1>
+ <KEYWORD1>ARSYM</KEYWORD1>
+ <KEYWORD1>ASBA</KEYWORD1>
+ <KEYWORD1>ASBA</KEYWORD1>
+ <KEYWORD1>ASBL</KEYWORD1>
+ <KEYWORD1>ASBL</KEYWORD1>
+ <KEYWORD1>ASBV</KEYWORD1>
+ <KEYWORD1>ASBV</KEYWORD1>
+ <KEYWORD1>ASBW</KEYWORD1>
+ <KEYWORD1>ASBW</KEYWORD1>
+ <KEYWORD1>ASEL</KEYWORD1>
+ <KEYWORD1>ASEL</KEYWORD1>
+ <KEYWORD1>ASKI</KEYWORD1>
+ <KEYWORD1>ASKIN</KEYWORD1>
+ <KEYWORD1>ASLL</KEYWORD1>
+ <KEYWORD1>ASLL</KEYWORD1>
+ <KEYWORD1>ASLV</KEYWORD1>
+ <KEYWORD1>ASLV</KEYWORD1>
+ <KEYWORD1>ASUB</KEYWORD1>
+ <KEYWORD1>ASUB</KEYWORD1>
+ <KEYWORD1>ASUM</KEYWORD1>
+ <KEYWORD1>ASUM</KEYWORD1>
+ <KEYWORD1>ATAN</KEYWORD1>
+ <KEYWORD1>ATAN</KEYWORD1>
+ <KEYWORD1>ATRA</KEYWORD1>
+ <KEYWORD1>ATRAN</KEYWORD1>
+ <KEYWORD1>ATYP</KEYWORD1>
+ <KEYWORD1>ATYPE</KEYWORD1>
+ <KEYWORD1>AUTO</KEYWORD1>
+ <KEYWORD1>AUTOTS</KEYWORD1>
+ <KEYWORD1>AVPR</KEYWORD1>
+ <KEYWORD1>AVPRIN</KEYWORD1>
+ <KEYWORD1>AVRE</KEYWORD1>
+ <KEYWORD1>AVRES</KEYWORD1>
+ <KEYWORD1>BELL</KEYWORD1>
+ <KEYWORD1>BELLOW</KEYWORD1>
+ <KEYWORD1>BEND</KEYWORD1>
+ <KEYWORD1>BEND</KEYWORD1>
+ <KEYWORD1>BETA</KEYWORD1>
+ <KEYWORD1>BETAD</KEYWORD1>
+ <KEYWORD1>BF</KEYWORD1>
+ <KEYWORD1>BFA</KEYWORD1>
+ <KEYWORD1>BFAD</KEYWORD1>
+ <KEYWORD1>BFADELE</KEYWORD1>
+ <KEYWORD1>BFAL</KEYWORD1>
+ <KEYWORD1>BFALIST</KEYWORD1>
+ <KEYWORD1>BFCU</KEYWORD1>
+ <KEYWORD1>BFCUM</KEYWORD1>
+ <KEYWORD1>BFDE</KEYWORD1>
+ <KEYWORD1>BFDELE</KEYWORD1>
+ <KEYWORD1>BFE</KEYWORD1>
+ <KEYWORD1>BFEC</KEYWORD1>
+ <KEYWORD1>BFECUM</KEYWORD1>
+ <KEYWORD1>BFED</KEYWORD1>
+ <KEYWORD1>BFEDELE</KEYWORD1>
+ <KEYWORD1>BFEL</KEYWORD1>
+ <KEYWORD1>BFELIST</KEYWORD1>
+ <KEYWORD1>BFES</KEYWORD1>
+ <KEYWORD1>BFESCAL</KEYWORD1>
+ <KEYWORD1>BFIN</KEYWORD1>
+ <KEYWORD1>BFINT</KEYWORD1>
+ <KEYWORD1>BFK</KEYWORD1>
+ <KEYWORD1>BFKD</KEYWORD1>
+ <KEYWORD1>BFKDELE</KEYWORD1>
+ <KEYWORD1>BFKL</KEYWORD1>
+ <KEYWORD1>BFKLIST</KEYWORD1>
+ <KEYWORD1>BFL</KEYWORD1>
+ <KEYWORD1>BFLD</KEYWORD1>
+ <KEYWORD1>BFLDELE</KEYWORD1>
+ <KEYWORD1>BFLI</KEYWORD1>
+ <KEYWORD1>BFLIST</KEYWORD1>
+ <KEYWORD1>BFLL</KEYWORD1>
+ <KEYWORD1>BFLLIST</KEYWORD1>
+ <KEYWORD1>BFSC</KEYWORD1>
+ <KEYWORD1>BFSCALE</KEYWORD1>
+ <KEYWORD1>BFTR</KEYWORD1>
+ <KEYWORD1>BFTRAN</KEYWORD1>
+ <KEYWORD1>BFUN</KEYWORD1>
+ <KEYWORD1>BFUNIF</KEYWORD1>
+ <KEYWORD1>BFV</KEYWORD1>
+ <KEYWORD1>BFVD</KEYWORD1>
+ <KEYWORD1>BFVDELE</KEYWORD1>
+ <KEYWORD1>BFVL</KEYWORD1>
+ <KEYWORD1>BFVLIST</KEYWORD1>
+ <KEYWORD1>BIOO</KEYWORD1>
+ <KEYWORD1>BIOOPT</KEYWORD1>
+ <KEYWORD1>BIOT</KEYWORD1>
+ <KEYWORD1>BIOT</KEYWORD1>
+ <KEYWORD1>BLC4</KEYWORD1>
+ <KEYWORD1>BLC4</KEYWORD1>
+ <KEYWORD1>BLC5</KEYWORD1>
+ <KEYWORD1>BLC5</KEYWORD1>
+ <KEYWORD1>BLOC</KEYWORD1>
+ <KEYWORD1>BLOCK</KEYWORD1>
+ <KEYWORD1>BOOL</KEYWORD1>
+ <KEYWORD1>BOOL</KEYWORD1>
+ <KEYWORD1>BOPT</KEYWORD1>
+ <KEYWORD1>BOPTN</KEYWORD1>
+ <KEYWORD1>BRAN</KEYWORD1>
+ <KEYWORD1>BRANCH</KEYWORD1>
+ <KEYWORD1>BSPL</KEYWORD1>
+ <KEYWORD1>BSPLIN</KEYWORD1>
+ <KEYWORD1>BTOL</KEYWORD1>
+ <KEYWORD1>BTOL</KEYWORD1>
+ <KEYWORD1>BUCO</KEYWORD1>
+ <KEYWORD1>BUCOPT</KEYWORD1>
+ <KEYWORD1>CALC</KEYWORD1>
+ <KEYWORD1>CALC</KEYWORD1>
+ <KEYWORD1>CBDO</KEYWORD1>
+ <KEYWORD1>CBDOF</KEYWORD1>
+ <KEYWORD1>CDRE</KEYWORD1>
+ <KEYWORD1>CDREAD</KEYWORD1>
+ <KEYWORD1>CDWR</KEYWORD1>
+ <KEYWORD1>CDWRITE</KEYWORD1>
+ <KEYWORD1>CE</KEYWORD1>
+ <KEYWORD1>CECM</KEYWORD1>
+ <KEYWORD1>CECMOD</KEYWORD1>
+ <KEYWORD1>CECY</KEYWORD1>
+ <KEYWORD1>CECYC</KEYWORD1>
+ <KEYWORD1>CEDE</KEYWORD1>
+ <KEYWORD1>CEDELE</KEYWORD1>
+ <KEYWORD1>CEIN</KEYWORD1>
+ <KEYWORD1>CEINTF</KEYWORD1>
+ <KEYWORD1>CELI</KEYWORD1>
+ <KEYWORD1>CELIST</KEYWORD1>
+ <KEYWORD1>CENT</KEYWORD1>
+ <KEYWORD1>CENTER</KEYWORD1>
+ <KEYWORD1>CEQN</KEYWORD1>
+ <KEYWORD1>CEQN</KEYWORD1>
+ <KEYWORD1>CERI</KEYWORD1>
+ <KEYWORD1>CERIG</KEYWORD1>
+ <KEYWORD1>CESG</KEYWORD1>
+ <KEYWORD1>CESGEN</KEYWORD1>
+ <KEYWORD1>CFAC</KEYWORD1>
+ <KEYWORD1>CFACT</KEYWORD1>
+ <KEYWORD1>CGLO</KEYWORD1>
+ <KEYWORD1>CGLOC</KEYWORD1>
+ <KEYWORD1>CGOM</KEYWORD1>
+ <KEYWORD1>CGOMGA</KEYWORD1>
+ <KEYWORD1>CHEC</KEYWORD1>
+ <KEYWORD1>CHECK</KEYWORD1>
+ <KEYWORD1>CHKM</KEYWORD1>
+ <KEYWORD1>CHKMSH</KEYWORD1>
+ <KEYWORD1>CIRC</KEYWORD1>
+ <KEYWORD1>CIRCLE</KEYWORD1>
+ <KEYWORD1>CLOC</KEYWORD1>
+ <KEYWORD1>CLOCAL</KEYWORD1>
+ <KEYWORD1>CLOG</KEYWORD1>
+ <KEYWORD1>CLOG</KEYWORD1>
+ <KEYWORD1>CLRM</KEYWORD1>
+ <KEYWORD1>CLRMSHLN</KEYWORD1>
+ <KEYWORD1>CM</KEYWORD1>
+ <KEYWORD1>CMDE</KEYWORD1>
+ <KEYWORD1>CMDELE</KEYWORD1>
+ <KEYWORD1>CMED</KEYWORD1>
+ <KEYWORD1>CMEDIT</KEYWORD1>
+ <KEYWORD1>CMGR</KEYWORD1>
+ <KEYWORD1>CMGRP</KEYWORD1>
+ <KEYWORD1>CMLI</KEYWORD1>
+ <KEYWORD1>CMLIST</KEYWORD1>
+ <KEYWORD1>CMPL</KEYWORD1>
+ <KEYWORD1>CMPLOT</KEYWORD1>
+ <KEYWORD1>CMSE</KEYWORD1>
+ <KEYWORD1>CMSEL</KEYWORD1>
+ <KEYWORD1>CNVT</KEYWORD1>
+ <KEYWORD1>CNVTOL</KEYWORD1>
+ <KEYWORD1>CON4</KEYWORD1>
+ <KEYWORD1>CON4</KEYWORD1>
+ <KEYWORD1>CONE</KEYWORD1>
+ <KEYWORD1>CONE</KEYWORD1>
+ <KEYWORD1>CONJ</KEYWORD1>
+ <KEYWORD1>CONJUG</KEYWORD1>
+ <KEYWORD1>COUP</KEYWORD1>
+ <KEYWORD1>COUPLE</KEYWORD1>
+ <KEYWORD1>COVA</KEYWORD1>
+ <KEYWORD1>COVAL</KEYWORD1>
+ <KEYWORD1>CP</KEYWORD1>
+ <KEYWORD1>CPDE</KEYWORD1>
+ <KEYWORD1>CPDELE</KEYWORD1>
+ <KEYWORD1>CPIN</KEYWORD1>
+ <KEYWORD1>CPINTF</KEYWORD1>
+ <KEYWORD1>CPLG</KEYWORD1>
+ <KEYWORD1>CPLGEN</KEYWORD1>
+ <KEYWORD1>CPLI</KEYWORD1>
+ <KEYWORD1>CPLIST</KEYWORD1>
+ <KEYWORD1>CPNG</KEYWORD1>
+ <KEYWORD1>CPNGEN</KEYWORD1>
+ <KEYWORD1>CPSG</KEYWORD1>
+ <KEYWORD1>CPSGEN</KEYWORD1>
+ <KEYWORD1>CQC</KEYWORD1>
+ <KEYWORD1>CRPL</KEYWORD1>
+ <KEYWORD1>CRPLIM</KEYWORD1>
+ <KEYWORD1>CS</KEYWORD1>
+ <KEYWORD1>CSCI</KEYWORD1>
+ <KEYWORD1>CSCIR</KEYWORD1>
+ <KEYWORD1>CSDE</KEYWORD1>
+ <KEYWORD1>CSDELE</KEYWORD1>
+ <KEYWORD1>CSKP</KEYWORD1>
+ <KEYWORD1>CSKP</KEYWORD1>
+ <KEYWORD1>CSLI</KEYWORD1>
+ <KEYWORD1>CSLIST</KEYWORD1>
+ <KEYWORD1>CSWP</KEYWORD1>
+ <KEYWORD1>CSWPLA</KEYWORD1>
+ <KEYWORD1>CSYS</KEYWORD1>
+ <KEYWORD1>CSYS</KEYWORD1>
+ <KEYWORD1>CURR2D</KEYWORD1>
+ <KEYWORD1>CURR</KEYWORD1>
+ <KEYWORD1>CUTC</KEYWORD1>
+ <KEYWORD1>CUTCONTROL</KEYWORD1>
+ <KEYWORD1>CVAR</KEYWORD1>
+ <KEYWORD1>CVAR</KEYWORD1>
+ <KEYWORD1>CYCG</KEYWORD1>
+ <KEYWORD1>CYCGEN</KEYWORD1>
+ <KEYWORD1>CYCS</KEYWORD1>
+ <KEYWORD1>CYCSOL</KEYWORD1>
+ <KEYWORD1>CYL4</KEYWORD1>
+ <KEYWORD1>CYL4</KEYWORD1>
+ <KEYWORD1>CYL5</KEYWORD1>
+ <KEYWORD1>CYL5</KEYWORD1>
+ <KEYWORD1>CYLI</KEYWORD1>
+ <KEYWORD1>CYLIND</KEYWORD1>
+ <KEYWORD1>D</KEYWORD1>
+ <KEYWORD1>DA</KEYWORD1>
+ <KEYWORD1>DADE</KEYWORD1>
+ <KEYWORD1>DADELE</KEYWORD1>
+ <KEYWORD1>DALI</KEYWORD1>
+ <KEYWORD1>DALIST</KEYWORD1>
+ <KEYWORD1>DATA</KEYWORD1>
+ <KEYWORD1>DATA</KEYWORD1>
+ <KEYWORD1>DATA</KEYWORD1>
+ <KEYWORD1>DATADEF</KEYWORD1>
+ <KEYWORD1>DCGO</KEYWORD1>
+ <KEYWORD1>DCGOMG</KEYWORD1>
+ <KEYWORD1>DCUM</KEYWORD1>
+ <KEYWORD1>DCUM</KEYWORD1>
+ <KEYWORD1>DDEL</KEYWORD1>
+ <KEYWORD1>DDELE</KEYWORD1>
+ <KEYWORD1>DEAC</KEYWORD1>
+ <KEYWORD1>DEACT</KEYWORD1>
+ <KEYWORD1>DEFI</KEYWORD1>
+ <KEYWORD1>DEFINE</KEYWORD1>
+ <KEYWORD1>DELT</KEYWORD1>
+ <KEYWORD1>DELTIM</KEYWORD1>
+ <KEYWORD1>DERI</KEYWORD1>
+ <KEYWORD1>DERIV</KEYWORD1>
+ <KEYWORD1>DESI</KEYWORD1>
+ <KEYWORD1>DESIZE</KEYWORD1>
+ <KEYWORD1>DESO</KEYWORD1>
+ <KEYWORD1>DESOL</KEYWORD1>
+ <KEYWORD1>DETA</KEYWORD1>
+ <KEYWORD1>DETAB</KEYWORD1>
+ <KEYWORD1>DIG</KEYWORD1>
+ <KEYWORD1>DIGI</KEYWORD1>
+ <KEYWORD1>DIGIT</KEYWORD1>
+ <KEYWORD1>DISP</KEYWORD1>
+ <KEYWORD1>DISPLAY</KEYWORD1>
+ <KEYWORD1>DK</KEYWORD1>
+ <KEYWORD1>DKDE</KEYWORD1>
+ <KEYWORD1>DKDELE</KEYWORD1>
+ <KEYWORD1>DKLI</KEYWORD1>
+ <KEYWORD1>DKLIST</KEYWORD1>
+ <KEYWORD1>DL</KEYWORD1>
+ <KEYWORD1>DLDE</KEYWORD1>
+ <KEYWORD1>DLDELE</KEYWORD1>
+ <KEYWORD1>DLIS</KEYWORD1>
+ <KEYWORD1>DLIST</KEYWORD1>
+ <KEYWORD1>DLLI</KEYWORD1>
+ <KEYWORD1>DLLIST</KEYWORD1>
+ <KEYWORD1>DMOV</KEYWORD1>
+ <KEYWORD1>DMOVE</KEYWORD1>
+ <KEYWORD1>DMPR</KEYWORD1>
+ <KEYWORD1>DMPRAT</KEYWORD1>
+ <KEYWORD1>DNSO</KEYWORD1>
+ <KEYWORD1>DNSOL</KEYWORD1>
+ <KEYWORD1>DOF</KEYWORD1>
+ <KEYWORD1>DOFS</KEYWORD1>
+ <KEYWORD1>DOFSEL</KEYWORD1>
+ <KEYWORD1>DOME</KEYWORD1>
+ <KEYWORD1>DOMEGA</KEYWORD1>
+ <KEYWORD1>DSCA</KEYWORD1>
+ <KEYWORD1>DSCALE</KEYWORD1>
+ <KEYWORD1>DSET</KEYWORD1>
+ <KEYWORD1>DSET</KEYWORD1>
+ <KEYWORD1>DSUM</KEYWORD1>
+ <KEYWORD1>DSUM</KEYWORD1>
+ <KEYWORD1>DSUR</KEYWORD1>
+ <KEYWORD1>DSURF</KEYWORD1>
+ <KEYWORD1>DSYM</KEYWORD1>
+ <KEYWORD1>DSYM</KEYWORD1>
+ <KEYWORD1>DSYS</KEYWORD1>
+ <KEYWORD1>DSYS</KEYWORD1>
+ <KEYWORD1>DTRA</KEYWORD1>
+ <KEYWORD1>DTRAN</KEYWORD1>
+ <KEYWORD1>DUMP</KEYWORD1>
+ <KEYWORD1>DUMP</KEYWORD1>
+ <KEYWORD1>DYNO</KEYWORD1>
+ <KEYWORD1>DYNOPT</KEYWORD1>
+ <KEYWORD1>E</KEYWORD1>
+ <KEYWORD1>EALI</KEYWORD1>
+ <KEYWORD1>EALIVE</KEYWORD1>
+ <KEYWORD1>EDBO</KEYWORD1>
+ <KEYWORD1>EDBOUND</KEYWORD1>
+ <KEYWORD1>EDBV</KEYWORD1>
+ <KEYWORD1>EDBVIS</KEYWORD1>
+ <KEYWORD1>EDCD</KEYWORD1>
+ <KEYWORD1>EDCDELE</KEYWORD1>
+ <KEYWORD1>EDCG</KEYWORD1>
+ <KEYWORD1>EDCGEN</KEYWORD1>
+ <KEYWORD1>EDCL</KEYWORD1>
+ <KEYWORD1>EDCLIST</KEYWORD1>
+ <KEYWORD1>EDCO</KEYWORD1>
+ <KEYWORD1>EDCONTACT</KEYWORD1>
+ <KEYWORD1>EDCP</KEYWORD1>
+ <KEYWORD1>EDCPU</KEYWORD1>
+ <KEYWORD1>EDCR</KEYWORD1>
+ <KEYWORD1>EDCRB</KEYWORD1>
+ <KEYWORD1>EDCS</KEYWORD1>
+ <KEYWORD1>EDCSC</KEYWORD1>
+ <KEYWORD1>EDCT</KEYWORD1>
+ <KEYWORD1>EDCTS</KEYWORD1>
+ <KEYWORD1>EDCU</KEYWORD1>
+ <KEYWORD1>EDCURVE</KEYWORD1>
+ <KEYWORD1>EDDA</KEYWORD1>
+ <KEYWORD1>EDDAMP</KEYWORD1>
+ <KEYWORD1>EDDR</KEYWORD1>
+ <KEYWORD1>EDDRELAX</KEYWORD1>
+ <KEYWORD1>EDEL</KEYWORD1>
+ <KEYWORD1>EDELE</KEYWORD1>
+ <KEYWORD1>EDEN</KEYWORD1>
+ <KEYWORD1>EDENERGY</KEYWORD1>
+ <KEYWORD1>EDFP</KEYWORD1>
+ <KEYWORD1>EDFPLOT</KEYWORD1>
+ <KEYWORD1>EDHG</KEYWORD1>
+ <KEYWORD1>EDHGLS</KEYWORD1>
+ <KEYWORD1>EDHI</KEYWORD1>
+ <KEYWORD1>EDHIST</KEYWORD1>
+ <KEYWORD1>EDHT</KEYWORD1>
+ <KEYWORD1>EDHTIME</KEYWORD1>
+ <KEYWORD1>EDIN</KEYWORD1>
+ <KEYWORD1>EDINT</KEYWORD1>
+ <KEYWORD1>EDIV</KEYWORD1>
+ <KEYWORD1>EDIVELO</KEYWORD1>
+ <KEYWORD1>EDLC</KEYWORD1>
+ <KEYWORD1>EDLCS</KEYWORD1>
+ <KEYWORD1>EDLD</KEYWORD1>
+ <KEYWORD1>EDLDPLOT</KEYWORD1>
+ <KEYWORD1>EDLO</KEYWORD1>
+ <KEYWORD1>EDLOAD</KEYWORD1>
+ <KEYWORD1>EDMP</KEYWORD1>
+ <KEYWORD1>EDMP</KEYWORD1>
+ <KEYWORD1>EDND</KEYWORD1>
+ <KEYWORD1>EDNDTSD</KEYWORD1>
+ <KEYWORD1>EDNR</KEYWORD1>
+ <KEYWORD1>EDNROT</KEYWORD1>
+ <KEYWORD1>EDOP</KEYWORD1>
+ <KEYWORD1>EDOPT</KEYWORD1>
+ <KEYWORD1>EDOU</KEYWORD1>
+ <KEYWORD1>EDOUT</KEYWORD1>
+ <KEYWORD1>EDRE</KEYWORD1>
+ <KEYWORD1>EDREAD</KEYWORD1>
+ <KEYWORD1>EDRS</KEYWORD1>
+ <KEYWORD1>EDRST</KEYWORD1>
+ <KEYWORD1>EDSH</KEYWORD1>
+ <KEYWORD1>EDSHELL</KEYWORD1>
+ <KEYWORD1>EDSO</KEYWORD1>
+ <KEYWORD1>EDSOLV</KEYWORD1>
+ <KEYWORD1>EDST</KEYWORD1>
+ <KEYWORD1>EDSTART</KEYWORD1>
+ <KEYWORD1>EDWE</KEYWORD1>
+ <KEYWORD1>EDWELD</KEYWORD1>
+ <KEYWORD1>EDWR</KEYWORD1>
+ <KEYWORD1>EDWRITE</KEYWORD1>
+ <KEYWORD1>EGEN</KEYWORD1>
+ <KEYWORD1>EGEN</KEYWORD1>
+ <KEYWORD1>EINT</KEYWORD1>
+ <KEYWORD1>EINTF</KEYWORD1>
+ <KEYWORD1>EKIL</KEYWORD1>
+ <KEYWORD1>EKILL</KEYWORD1>
+ <KEYWORD1>ELEM</KEYWORD1>
+ <KEYWORD1>ELEM</KEYWORD1>
+ <KEYWORD1>ELIS</KEYWORD1>
+ <KEYWORD1>ELIST</KEYWORD1>
+ <KEYWORD1>EMAG</KEYWORD1>
+ <KEYWORD1>EMAGERR</KEYWORD1>
+ <KEYWORD1>EMF</KEYWORD1>
+ <KEYWORD1>EMID</KEYWORD1>
+ <KEYWORD1>EMID</KEYWORD1>
+ <KEYWORD1>EMIS</KEYWORD1>
+ <KEYWORD1>EMIS</KEYWORD1>
+ <KEYWORD1>EMOD</KEYWORD1>
+ <KEYWORD1>EMODIF</KEYWORD1>
+ <KEYWORD1>EMOR</KEYWORD1>
+ <KEYWORD1>EMORE</KEYWORD1>
+ <KEYWORD1>EMSY</KEYWORD1>
+ <KEYWORD1>EMSYM</KEYWORD1>
+ <KEYWORD1>EMUN</KEYWORD1>
+ <KEYWORD1>EMUNIT</KEYWORD1>
+ <KEYWORD1>EN</KEYWORD1>
+ <KEYWORD1>ENGE</KEYWORD1>
+ <KEYWORD1>ENGEN</KEYWORD1>
+ <KEYWORD1>ENOR</KEYWORD1>
+ <KEYWORD1>ENORM</KEYWORD1>
+ <KEYWORD1>ENSY</KEYWORD1>
+ <KEYWORD1>ENSYM</KEYWORD1>
+ <KEYWORD1>EPLO</KEYWORD1>
+ <KEYWORD1>EPLOT</KEYWORD1>
+ <KEYWORD1>EQSL</KEYWORD1>
+ <KEYWORD1>EQSLV</KEYWORD1>
+ <KEYWORD1>ERAS</KEYWORD1>
+ <KEYWORD1>ERASE</KEYWORD1>
+ <KEYWORD1>EREA</KEYWORD1>
+ <KEYWORD1>EREAD</KEYWORD1>
+ <KEYWORD1>EREF</KEYWORD1>
+ <KEYWORD1>EREFINE</KEYWORD1>
+ <KEYWORD1>ERES</KEYWORD1>
+ <KEYWORD1>ERESX</KEYWORD1>
+ <KEYWORD1>ERNO</KEYWORD1>
+ <KEYWORD1>ERNORM</KEYWORD1>
+ <KEYWORD1>ERRA</KEYWORD1>
+ <KEYWORD1>ERRANG</KEYWORD1>
+ <KEYWORD1>ESEL</KEYWORD1>
+ <KEYWORD1>ESEL</KEYWORD1>
+ <KEYWORD1>ESIZ</KEYWORD1>
+ <KEYWORD1>ESIZE</KEYWORD1>
+ <KEYWORD1>ESLA</KEYWORD1>
+ <KEYWORD1>ESLA</KEYWORD1>
+ <KEYWORD1>ESLL</KEYWORD1>
+ <KEYWORD1>ESLL</KEYWORD1>
+ <KEYWORD1>ESLN</KEYWORD1>
+ <KEYWORD1>ESLN</KEYWORD1>
+ <KEYWORD1>ESLV</KEYWORD1>
+ <KEYWORD1>ESLV</KEYWORD1>
+ <KEYWORD1>ESOL</KEYWORD1>
+ <KEYWORD1>ESOL</KEYWORD1>
+ <KEYWORD1>ESOR</KEYWORD1>
+ <KEYWORD1>ESORT</KEYWORD1>
+ <KEYWORD1>ESTI</KEYWORD1>
+ <KEYWORD1>ESTIF</KEYWORD1>
+ <KEYWORD1>ESUR</KEYWORD1>
+ <KEYWORD1>ESURF</KEYWORD1>
+ <KEYWORD1>ESYM</KEYWORD1>
+ <KEYWORD1>ESYM</KEYWORD1>
+ <KEYWORD1>ESYS</KEYWORD1>
+ <KEYWORD1>ESYS</KEYWORD1>
+ <KEYWORD1>ET</KEYWORD1>
+ <KEYWORD1>ETAB</KEYWORD1>
+ <KEYWORD1>ETABLE</KEYWORD1>
+ <KEYWORD1>ETCH</KEYWORD1>
+ <KEYWORD1>ETCHG</KEYWORD1>
+ <KEYWORD1>ETDE</KEYWORD1>
+ <KEYWORD1>ETDELE</KEYWORD1>
+ <KEYWORD1>ETLI</KEYWORD1>
+ <KEYWORD1>ETLIST</KEYWORD1>
+ <KEYWORD1>ETYP</KEYWORD1>
+ <KEYWORD1>ETYPE</KEYWORD1>
+ <KEYWORD1>EUSO</KEYWORD1>
+ <KEYWORD1>EUSORT</KEYWORD1>
+ <KEYWORD1>EWRI</KEYWORD1>
+ <KEYWORD1>EWRITE</KEYWORD1>
+ <KEYWORD1>EXP</KEYWORD1>
+ <KEYWORD1>EXPA</KEYWORD1>
+ <KEYWORD1>EXPA</KEYWORD1>
+ <KEYWORD1>EXPAND</KEYWORD1>
+ <KEYWORD1>EXPASS</KEYWORD1>
+ <KEYWORD1>EXPS</KEYWORD1>
+ <KEYWORD1>EXPSOL</KEYWORD1>
+ <KEYWORD1>EXTO</KEYWORD1>
+ <KEYWORD1>EXTOPT</KEYWORD1>
+ <KEYWORD1>EXTR</KEYWORD1>
+ <KEYWORD1>EXTREM</KEYWORD1>
+ <KEYWORD1>FATI</KEYWORD1>
+ <KEYWORD1>FATIGUE</KEYWORD1>
+ <KEYWORD1>FCUM</KEYWORD1>
+ <KEYWORD1>FCUM</KEYWORD1>
+ <KEYWORD1>FDEL</KEYWORD1>
+ <KEYWORD1>FDELE</KEYWORD1>
+ <KEYWORD1>FE</KEYWORD1>
+ <KEYWORD1>FEBO</KEYWORD1>
+ <KEYWORD1>FEBODY</KEYWORD1>
+ <KEYWORD1>FECO</KEYWORD1>
+ <KEYWORD1>FECONS</KEYWORD1>
+ <KEYWORD1>FEFO</KEYWORD1>
+ <KEYWORD1>FEFOR</KEYWORD1>
+ <KEYWORD1>FELI</KEYWORD1>
+ <KEYWORD1>FELIST</KEYWORD1>
+ <KEYWORD1>FESU</KEYWORD1>
+ <KEYWORD1>FESURF</KEYWORD1>
+ <KEYWORD1>FILE</KEYWORD1>
+ <KEYWORD1>FILE</KEYWORD1>
+ <KEYWORD1>FILE</KEYWORD1>
+ <KEYWORD1>FILE</KEYWORD1>
+ <KEYWORD1>FILEAUX2</KEYWORD1>
+ <KEYWORD1>FILEDISP</KEYWORD1>
+ <KEYWORD1>FILL</KEYWORD1>
+ <KEYWORD1>FILL</KEYWORD1>
+ <KEYWORD1>FILL</KEYWORD1>
+ <KEYWORD1>FILLDATA</KEYWORD1>
+ <KEYWORD1>FINI</KEYWORD1>
+ <KEYWORD1>FINISH</KEYWORD1>
+ <KEYWORD1>FITE</KEYWORD1>
+ <KEYWORD1>FITEM</KEYWORD1>
+ <KEYWORD1>FK</KEYWORD1>
+ <KEYWORD1>FKDE</KEYWORD1>
+ <KEYWORD1>FKDELE</KEYWORD1>
+ <KEYWORD1>FKLI</KEYWORD1>
+ <KEYWORD1>FKLIST</KEYWORD1>
+ <KEYWORD1>FL</KEYWORD1>
+ <KEYWORD1>FLAN</KEYWORD1>
+ <KEYWORD1>FLANGE</KEYWORD1>
+ <KEYWORD1>FLDA</KEYWORD1>
+ <KEYWORD1>FLDATA</KEYWORD1>
+ <KEYWORD1>FLDATA10</KEYWORD1>
+ <KEYWORD1>FLDATA11</KEYWORD1>
+ <KEYWORD1>FLDATA12</KEYWORD1>
+ <KEYWORD1>FLDATA13</KEYWORD1>
+ <KEYWORD1>FLDATA14</KEYWORD1>
+ <KEYWORD1>FLDATA15</KEYWORD1>
+ <KEYWORD1>FLDATA16</KEYWORD1>
+ <KEYWORD1>FLDATA17</KEYWORD1>
+ <KEYWORD1>FLDATA18</KEYWORD1>
+ <KEYWORD1>FLDATA19</KEYWORD1>
+ <KEYWORD1>FLDATA1</KEYWORD1>
+ <KEYWORD1>FLDATA20</KEYWORD1>
+ <KEYWORD1>FLDATA20A</KEYWORD1>
+ <KEYWORD1>FLDATA21</KEYWORD1>
+ <KEYWORD1>FLDATA22</KEYWORD1>
+ <KEYWORD1>FLDATA23</KEYWORD1>
+ <KEYWORD1>FLDATA24</KEYWORD1>
+ <KEYWORD1>FLDATA24A</KEYWORD1>
+ <KEYWORD1>FLDATA24B</KEYWORD1>
+ <KEYWORD1>FLDATA24C</KEYWORD1>
+ <KEYWORD1>FLDATA24D</KEYWORD1>
+ <KEYWORD1>FLDATA25</KEYWORD1>
+ <KEYWORD1>FLDATA26</KEYWORD1>
+ <KEYWORD1>FLDATA27</KEYWORD1>
+ <KEYWORD1>FLDATA28</KEYWORD1>
+ <KEYWORD1>FLDATA29</KEYWORD1>
+ <KEYWORD1>FLDATA2</KEYWORD1>
+ <KEYWORD1>FLDATA30</KEYWORD1>
+ <KEYWORD1>FLDATA31</KEYWORD1>
+ <KEYWORD1>FLDATA32</KEYWORD1>
+ <KEYWORD1>FLDATA33</KEYWORD1>
+ <KEYWORD1>FLDATA37</KEYWORD1>
+ <KEYWORD1>FLDATA3</KEYWORD1>
+ <KEYWORD1>FLDATA4</KEYWORD1>
+ <KEYWORD1>FLDATA4A</KEYWORD1>
+ <KEYWORD1>FLDATA5</KEYWORD1>
+ <KEYWORD1>FLDATA6</KEYWORD1>
+ <KEYWORD1>FLDATA7</KEYWORD1>
+ <KEYWORD1>FLDATA8</KEYWORD1>
+ <KEYWORD1>FLDATA9</KEYWORD1>
+ <KEYWORD1>FLDATA</KEYWORD1>
+ <KEYWORD1>FLIS</KEYWORD1>
+ <KEYWORD1>FLIST</KEYWORD1>
+ <KEYWORD1>FLLI</KEYWORD1>
+ <KEYWORD1>FLLIST</KEYWORD1>
+ <KEYWORD1>FLOC</KEYWORD1>
+ <KEYWORD1>FLOCHECK</KEYWORD1>
+ <KEYWORD1>FLOT</KEYWORD1>
+ <KEYWORD1>FLOTRAN</KEYWORD1>
+ <KEYWORD1>FLRE</KEYWORD1>
+ <KEYWORD1>FLREAD</KEYWORD1>
+ <KEYWORD1>FLST</KEYWORD1>
+ <KEYWORD1>FLST</KEYWORD1>
+ <KEYWORD1>FLUX</KEYWORD1>
+ <KEYWORD1>FLUXV</KEYWORD1>
+ <KEYWORD1>FMAG</KEYWORD1>
+ <KEYWORD1>FMAG</KEYWORD1>
+ <KEYWORD1>FMAGBC</KEYWORD1>
+ <KEYWORD1>FMAGSUM</KEYWORD1>
+ <KEYWORD1>FOR2</KEYWORD1>
+ <KEYWORD1>FOR2D</KEYWORD1>
+ <KEYWORD1>FORC</KEYWORD1>
+ <KEYWORD1>FORCE</KEYWORD1>
+ <KEYWORD1>FORM</KEYWORD1>
+ <KEYWORD1>FORM</KEYWORD1>
+ <KEYWORD1>FP</KEYWORD1>
+ <KEYWORD1>FPLI</KEYWORD1>
+ <KEYWORD1>FPLIST</KEYWORD1>
+ <KEYWORD1>FREQ</KEYWORD1>
+ <KEYWORD1>FREQ</KEYWORD1>
+ <KEYWORD1>FS</KEYWORD1>
+ <KEYWORD1>FSCA</KEYWORD1>
+ <KEYWORD1>FSCALE</KEYWORD1>
+ <KEYWORD1>FSDE</KEYWORD1>
+ <KEYWORD1>FSDELE</KEYWORD1>
+ <KEYWORD1>FSLI</KEYWORD1>
+ <KEYWORD1>FSLIST</KEYWORD1>
+ <KEYWORD1>FSNO</KEYWORD1>
+ <KEYWORD1>FSNODE</KEYWORD1>
+ <KEYWORD1>FSPL</KEYWORD1>
+ <KEYWORD1>FSPLOT</KEYWORD1>
+ <KEYWORD1>FSSE</KEYWORD1>
+ <KEYWORD1>FSSECT</KEYWORD1>
+ <KEYWORD1>FSUM</KEYWORD1>
+ <KEYWORD1>FSUM</KEYWORD1>
+ <KEYWORD1>FTCA</KEYWORD1>
+ <KEYWORD1>FTCALC</KEYWORD1>
+ <KEYWORD1>FTRA</KEYWORD1>
+ <KEYWORD1>FTRAN</KEYWORD1>
+ <KEYWORD1>FTSI</KEYWORD1>
+ <KEYWORD1>FTSIZE</KEYWORD1>
+ <KEYWORD1>FTWR</KEYWORD1>
+ <KEYWORD1>FTWRITE</KEYWORD1>
+ <KEYWORD1>FVME</KEYWORD1>
+ <KEYWORD1>FVMESH</KEYWORD1>
+ <KEYWORD1>GAP</KEYWORD1>
+ <KEYWORD1>GAPF</KEYWORD1>
+ <KEYWORD1>GAPFINISH</KEYWORD1>
+ <KEYWORD1>GAPL</KEYWORD1>
+ <KEYWORD1>GAPLIST</KEYWORD1>
+ <KEYWORD1>GAPM</KEYWORD1>
+ <KEYWORD1>GAPMERGE</KEYWORD1>
+ <KEYWORD1>GAPO</KEYWORD1>
+ <KEYWORD1>GAPOPT</KEYWORD1>
+ <KEYWORD1>GAPP</KEYWORD1>
+ <KEYWORD1>GAPPLOT</KEYWORD1>
+ <KEYWORD1>GAUG</KEYWORD1>
+ <KEYWORD1>GAUGE</KEYWORD1>
+ <KEYWORD1>GCGE</KEYWORD1>
+ <KEYWORD1>GCGEN</KEYWORD1>
+ <KEYWORD1>GENO</KEYWORD1>
+ <KEYWORD1>GENOPT</KEYWORD1>
+ <KEYWORD1>GEOM</KEYWORD1>
+ <KEYWORD1>GEOM</KEYWORD1>
+ <KEYWORD1>GEOM</KEYWORD1>
+ <KEYWORD1>GEOMETRY</KEYWORD1>
+ <KEYWORD1>GP</KEYWORD1>
+ <KEYWORD1>GPDE</KEYWORD1>
+ <KEYWORD1>GPDELE</KEYWORD1>
+ <KEYWORD1>GPLI</KEYWORD1>
+ <KEYWORD1>GPLIST</KEYWORD1>
+ <KEYWORD1>GPLO</KEYWORD1>
+ <KEYWORD1>GPLOT</KEYWORD1>
+ <KEYWORD1>GRP</KEYWORD1>
+ <KEYWORD1>GSUM</KEYWORD1>
+ <KEYWORD1>GSUM</KEYWORD1>
+ <KEYWORD1>HARF</KEYWORD1>
+ <KEYWORD1>HARFRQ</KEYWORD1>
+ <KEYWORD1>HELP</KEYWORD1>
+ <KEYWORD1>HELP</KEYWORD1>
+ <KEYWORD1>HELP</KEYWORD1>
+ <KEYWORD1>HELPDISP</KEYWORD1>
+ <KEYWORD1>HFSW</KEYWORD1>
+ <KEYWORD1>HFSWEEP</KEYWORD1>
+ <KEYWORD1>HMAG</KEYWORD1>
+ <KEYWORD1>HMAGSOLV</KEYWORD1>
+ <KEYWORD1>HPGL</KEYWORD1>
+ <KEYWORD1>HPGL</KEYWORD1>
+ <KEYWORD1>HPTC</KEYWORD1>
+ <KEYWORD1>HPTCREATE</KEYWORD1>
+ <KEYWORD1>HPTD</KEYWORD1>
+ <KEYWORD1>HPTDELETE</KEYWORD1>
+ <KEYWORD1>HRCP</KEYWORD1>
+ <KEYWORD1>HRCPLX</KEYWORD1>
+ <KEYWORD1>HREX</KEYWORD1>
+ <KEYWORD1>HREXP</KEYWORD1>
+ <KEYWORD1>HROP</KEYWORD1>
+ <KEYWORD1>HROPT</KEYWORD1>
+ <KEYWORD1>HROU</KEYWORD1>
+ <KEYWORD1>HROUT</KEYWORD1>
+ <KEYWORD1>IC</KEYWORD1>
+ <KEYWORD1>ICDE</KEYWORD1>
+ <KEYWORD1>ICDELE</KEYWORD1>
+ <KEYWORD1>ICLI</KEYWORD1>
+ <KEYWORD1>ICLIST</KEYWORD1>
+ <KEYWORD1>IGES</KEYWORD1>
+ <KEYWORD1>IGES</KEYWORD1>
+ <KEYWORD1>IGESIN</KEYWORD1>
+ <KEYWORD1>IGESOUT</KEYWORD1>
+ <KEYWORD1>IMAG</KEYWORD1>
+ <KEYWORD1>IMAGIN</KEYWORD1>
+ <KEYWORD1>IMME</KEYWORD1>
+ <KEYWORD1>IMMED</KEYWORD1>
+ <KEYWORD1>IMPD</KEYWORD1>
+ <KEYWORD1>IMPD</KEYWORD1>
+ <KEYWORD1>INRE</KEYWORD1>
+ <KEYWORD1>INRES</KEYWORD1>
+ <KEYWORD1>INRT</KEYWORD1>
+ <KEYWORD1>INRTIA</KEYWORD1>
+ <KEYWORD1>INT1</KEYWORD1>
+ <KEYWORD1>INT1</KEYWORD1>
+ <KEYWORD1>INTS</KEYWORD1>
+ <KEYWORD1>INTSRF</KEYWORD1>
+ <KEYWORD1>IOPT</KEYWORD1>
+ <KEYWORD1>IOPTN</KEYWORD1>
+ <KEYWORD1>IRLF</KEYWORD1>
+ <KEYWORD1>IRLF</KEYWORD1>
+ <KEYWORD1>IRLI</KEYWORD1>
+ <KEYWORD1>IRLIST</KEYWORD1>
+ <KEYWORD1>K</KEYWORD1>
+ <KEYWORD1>KATT</KEYWORD1>
+ <KEYWORD1>KATT</KEYWORD1>
+ <KEYWORD1>KBC</KEYWORD1>
+ <KEYWORD1>KBET</KEYWORD1>
+ <KEYWORD1>KBETW</KEYWORD1>
+ <KEYWORD1>KCAL</KEYWORD1>
+ <KEYWORD1>KCALC</KEYWORD1>
+ <KEYWORD1>KCEN</KEYWORD1>
+ <KEYWORD1>KCENTER</KEYWORD1>
+ <KEYWORD1>KCLE</KEYWORD1>
+ <KEYWORD1>KCLEAR</KEYWORD1>
+ <KEYWORD1>KDEL</KEYWORD1>
+ <KEYWORD1>KDELE</KEYWORD1>
+ <KEYWORD1>KDIS</KEYWORD1>
+ <KEYWORD1>KDIST</KEYWORD1>
+ <KEYWORD1>KESI</KEYWORD1>
+ <KEYWORD1>KESIZE</KEYWORD1>
+ <KEYWORD1>KEYO</KEYWORD1>
+ <KEYWORD1>KEYOPT</KEYWORD1>
+ <KEYWORD1>KEYP</KEYWORD1>
+ <KEYWORD1>KEYPTS</KEYWORD1>
+ <KEYWORD1>KEYW</KEYWORD1>
+ <KEYWORD1>KEYW</KEYWORD1>
+ <KEYWORD1>KFIL</KEYWORD1>
+ <KEYWORD1>KFILL</KEYWORD1>
+ <KEYWORD1>KGEN</KEYWORD1>
+ <KEYWORD1>KGEN</KEYWORD1>
+ <KEYWORD1>KL</KEYWORD1>
+ <KEYWORD1>KLIS</KEYWORD1>
+ <KEYWORD1>KLIST</KEYWORD1>
+ <KEYWORD1>KMES</KEYWORD1>
+ <KEYWORD1>KMESH</KEYWORD1>
+ <KEYWORD1>KMOD</KEYWORD1>
+ <KEYWORD1>KMODIF</KEYWORD1>
+ <KEYWORD1>KMOV</KEYWORD1>
+ <KEYWORD1>KMOVE</KEYWORD1>
+ <KEYWORD1>KNOD</KEYWORD1>
+ <KEYWORD1>KNODE</KEYWORD1>
+ <KEYWORD1>KPLO</KEYWORD1>
+ <KEYWORD1>KPLOT</KEYWORD1>
+ <KEYWORD1>KPSC</KEYWORD1>
+ <KEYWORD1>KPSCALE</KEYWORD1>
+ <KEYWORD1>KREF</KEYWORD1>
+ <KEYWORD1>KREFINE</KEYWORD1>
+ <KEYWORD1>KSCA</KEYWORD1>
+ <KEYWORD1>KSCALE</KEYWORD1>
+ <KEYWORD1>KSCO</KEYWORD1>
+ <KEYWORD1>KSCON</KEYWORD1>
+ <KEYWORD1>KSEL</KEYWORD1>
+ <KEYWORD1>KSEL</KEYWORD1>
+ <KEYWORD1>KSLL</KEYWORD1>
+ <KEYWORD1>KSLL</KEYWORD1>
+ <KEYWORD1>KSLN</KEYWORD1>
+ <KEYWORD1>KSLN</KEYWORD1>
+ <KEYWORD1>KSUM</KEYWORD1>
+ <KEYWORD1>KSUM</KEYWORD1>
+ <KEYWORD1>KSYM</KEYWORD1>
+ <KEYWORD1>KSYMM</KEYWORD1>
+ <KEYWORD1>KTRA</KEYWORD1>
+ <KEYWORD1>KTRAN</KEYWORD1>
+ <KEYWORD1>KUSE</KEYWORD1>
+ <KEYWORD1>KUSE</KEYWORD1>
+ <KEYWORD1>KWPA</KEYWORD1>
+ <KEYWORD1>KWPAVE</KEYWORD1>
+ <KEYWORD1>KWPL</KEYWORD1>
+ <KEYWORD1>KWPLAN</KEYWORD1>
+ <KEYWORD1>L2AN</KEYWORD1>
+ <KEYWORD1>L2ANG</KEYWORD1>
+ <KEYWORD1>L2TA</KEYWORD1>
+ <KEYWORD1>L2TAN</KEYWORD1>
+ <KEYWORD1>L</KEYWORD1>
+ <KEYWORD1>LANG</KEYWORD1>
+ <KEYWORD1>LANG</KEYWORD1>
+ <KEYWORD1>LARC</KEYWORD1>
+ <KEYWORD1>LARC</KEYWORD1>
+ <KEYWORD1>LARE</KEYWORD1>
+ <KEYWORD1>LAREA</KEYWORD1>
+ <KEYWORD1>LARG</KEYWORD1>
+ <KEYWORD1>LARGE</KEYWORD1>
+ <KEYWORD1>LATT</KEYWORD1>
+ <KEYWORD1>LATT</KEYWORD1>
+ <KEYWORD1>LAYE</KEYWORD1>
+ <KEYWORD1>LAYE</KEYWORD1>
+ <KEYWORD1>LAYER</KEYWORD1>
+ <KEYWORD1>LAYERP26</KEYWORD1>
+ <KEYWORD1>LAYL</KEYWORD1>
+ <KEYWORD1>LAYLIST</KEYWORD1>
+ <KEYWORD1>LAYP</KEYWORD1>
+ <KEYWORD1>LAYPLOT</KEYWORD1>
+ <KEYWORD1>LCAB</KEYWORD1>
+ <KEYWORD1>LCABS</KEYWORD1>
+ <KEYWORD1>LCAS</KEYWORD1>
+ <KEYWORD1>LCASE</KEYWORD1>
+ <KEYWORD1>LCCA</KEYWORD1>
+ <KEYWORD1>LCCA</KEYWORD1>
+ <KEYWORD1>LCCALC</KEYWORD1>
+ <KEYWORD1>LCCAT</KEYWORD1>
+ <KEYWORD1>LCDE</KEYWORD1>
+ <KEYWORD1>LCDEF</KEYWORD1>
+ <KEYWORD1>LCFA</KEYWORD1>
+ <KEYWORD1>LCFACT</KEYWORD1>
+ <KEYWORD1>LCFI</KEYWORD1>
+ <KEYWORD1>LCFILE</KEYWORD1>
+ <KEYWORD1>LCLE</KEYWORD1>
+ <KEYWORD1>LCLEAR</KEYWORD1>
+ <KEYWORD1>LCOM</KEYWORD1>
+ <KEYWORD1>LCOMB</KEYWORD1>
+ <KEYWORD1>LCOP</KEYWORD1>
+ <KEYWORD1>LCOPER</KEYWORD1>
+ <KEYWORD1>LCSE</KEYWORD1>
+ <KEYWORD1>LCSEL</KEYWORD1>
+ <KEYWORD1>LCSL</KEYWORD1>
+ <KEYWORD1>LCSL</KEYWORD1>
+ <KEYWORD1>LCSU</KEYWORD1>
+ <KEYWORD1>LCSUM</KEYWORD1>
+ <KEYWORD1>LCWR</KEYWORD1>
+ <KEYWORD1>LCWRITE</KEYWORD1>
+ <KEYWORD1>LCZE</KEYWORD1>
+ <KEYWORD1>LCZERO</KEYWORD1>
+ <KEYWORD1>LDEL</KEYWORD1>
+ <KEYWORD1>LDELE</KEYWORD1>
+ <KEYWORD1>LDIV</KEYWORD1>
+ <KEYWORD1>LDIV</KEYWORD1>
+ <KEYWORD1>LDRA</KEYWORD1>
+ <KEYWORD1>LDRAG</KEYWORD1>
+ <KEYWORD1>LDRE</KEYWORD1>
+ <KEYWORD1>LDREAD</KEYWORD1>
+ <KEYWORD1>LESI</KEYWORD1>
+ <KEYWORD1>LESIZE</KEYWORD1>
+ <KEYWORD1>LEXT</KEYWORD1>
+ <KEYWORD1>LEXTND</KEYWORD1>
+ <KEYWORD1>LFIL</KEYWORD1>
+ <KEYWORD1>LFILLT</KEYWORD1>
+ <KEYWORD1>LFSU</KEYWORD1>
+ <KEYWORD1>LFSURF</KEYWORD1>
+ <KEYWORD1>LGEN</KEYWORD1>
+ <KEYWORD1>LGEN</KEYWORD1>
+ <KEYWORD1>LGLU</KEYWORD1>
+ <KEYWORD1>LGLUE</KEYWORD1>
+ <KEYWORD1>LGWR</KEYWORD1>
+ <KEYWORD1>LGWRITE</KEYWORD1>
+ <KEYWORD1>LINA</KEYWORD1>
+ <KEYWORD1>LINA</KEYWORD1>
+ <KEYWORD1>LINE</KEYWORD1>
+ <KEYWORD1>LINE</KEYWORD1>
+ <KEYWORD1>LINE</KEYWORD1>
+ <KEYWORD1>LINES</KEYWORD1>
+ <KEYWORD1>LINL</KEYWORD1>
+ <KEYWORD1>LINL</KEYWORD1>
+ <KEYWORD1>LINP</KEYWORD1>
+ <KEYWORD1>LINP</KEYWORD1>
+ <KEYWORD1>LINV</KEYWORD1>
+ <KEYWORD1>LINV</KEYWORD1>
+ <KEYWORD1>LLIS</KEYWORD1>
+ <KEYWORD1>LLIST</KEYWORD1>
+ <KEYWORD1>LMAT</KEYWORD1>
+ <KEYWORD1>LMATRIX</KEYWORD1>
+ <KEYWORD1>LMES</KEYWORD1>
+ <KEYWORD1>LMESH</KEYWORD1>
+ <KEYWORD1>LNCO</KEYWORD1>
+ <KEYWORD1>LNCOLLAPSE</KEYWORD1>
+ <KEYWORD1>LNDE</KEYWORD1>
+ <KEYWORD1>LNDETACH</KEYWORD1>
+ <KEYWORD1>LNFI</KEYWORD1>
+ <KEYWORD1>LNFILL</KEYWORD1>
+ <KEYWORD1>LNME</KEYWORD1>
+ <KEYWORD1>LNMERGE</KEYWORD1>
+ <KEYWORD1>LNSP</KEYWORD1>
+ <KEYWORD1>LNSPLIT</KEYWORD1>
+ <KEYWORD1>LNSR</KEYWORD1>
+ <KEYWORD1>LNSRCH</KEYWORD1>
+ <KEYWORD1>LOCA</KEYWORD1>
+ <KEYWORD1>LOCAL</KEYWORD1>
+ <KEYWORD1>LOVL</KEYWORD1>
+ <KEYWORD1>LOVLAP</KEYWORD1>
+ <KEYWORD1>LPLO</KEYWORD1>
+ <KEYWORD1>LPLOT</KEYWORD1>
+ <KEYWORD1>LPTN</KEYWORD1>
+ <KEYWORD1>LPTN</KEYWORD1>
+ <KEYWORD1>LREF</KEYWORD1>
+ <KEYWORD1>LREFINE</KEYWORD1>
+ <KEYWORD1>LREV</KEYWORD1>
+ <KEYWORD1>LREVERSE</KEYWORD1>
+ <KEYWORD1>LROT</KEYWORD1>
+ <KEYWORD1>LROTAT</KEYWORD1>
+ <KEYWORD1>LSBA</KEYWORD1>
+ <KEYWORD1>LSBA</KEYWORD1>
+ <KEYWORD1>LSBL</KEYWORD1>
+ <KEYWORD1>LSBL</KEYWORD1>
+ <KEYWORD1>LSBV</KEYWORD1>
+ <KEYWORD1>LSBV</KEYWORD1>
+ <KEYWORD1>LSBW</KEYWORD1>
+ <KEYWORD1>LSBW</KEYWORD1>
+ <KEYWORD1>LSCL</KEYWORD1>
+ <KEYWORD1>LSCLEAR</KEYWORD1>
+ <KEYWORD1>LSDE</KEYWORD1>
+ <KEYWORD1>LSDELE</KEYWORD1>
+ <KEYWORD1>LSEL</KEYWORD1>
+ <KEYWORD1>LSEL</KEYWORD1>
+ <KEYWORD1>LSLA</KEYWORD1>
+ <KEYWORD1>LSLA</KEYWORD1>
+ <KEYWORD1>LSLK</KEYWORD1>
+ <KEYWORD1>LSLK</KEYWORD1>
+ <KEYWORD1>LSOP</KEYWORD1>
+ <KEYWORD1>LSOPER</KEYWORD1>
+ <KEYWORD1>LSRE</KEYWORD1>
+ <KEYWORD1>LSREAD</KEYWORD1>
+ <KEYWORD1>LSSC</KEYWORD1>
+ <KEYWORD1>LSSCALE</KEYWORD1>
+ <KEYWORD1>LSSO</KEYWORD1>
+ <KEYWORD1>LSSOLVE</KEYWORD1>
+ <KEYWORD1>LSTR</KEYWORD1>
+ <KEYWORD1>LSTR</KEYWORD1>
+ <KEYWORD1>LSUM</KEYWORD1>
+ <KEYWORD1>LSUM</KEYWORD1>
+ <KEYWORD1>LSWR</KEYWORD1>
+ <KEYWORD1>LSWRITE</KEYWORD1>
+ <KEYWORD1>LSYM</KEYWORD1>
+ <KEYWORD1>LSYMM</KEYWORD1>
+ <KEYWORD1>LTAN</KEYWORD1>
+ <KEYWORD1>LTAN</KEYWORD1>
+ <KEYWORD1>LTRA</KEYWORD1>
+ <KEYWORD1>LTRAN</KEYWORD1>
+ <KEYWORD1>LUMP</KEYWORD1>
+ <KEYWORD1>LUMPM</KEYWORD1>
+ <KEYWORD1>LVSC</KEYWORD1>
+ <KEYWORD1>LVSCALE</KEYWORD1>
+ <KEYWORD1>LWPL</KEYWORD1>
+ <KEYWORD1>LWPLAN</KEYWORD1>
+ <KEYWORD1>M</KEYWORD1>
+ <KEYWORD1>MAGO</KEYWORD1>
+ <KEYWORD1>MAGOPT</KEYWORD1>
+ <KEYWORD1>MAGS</KEYWORD1>
+ <KEYWORD1>MAGSOLV</KEYWORD1>
+ <KEYWORD1>MAST</KEYWORD1>
+ <KEYWORD1>MASTER</KEYWORD1>
+ <KEYWORD1>MAT</KEYWORD1>
+ <KEYWORD1>MATE</KEYWORD1>
+ <KEYWORD1>MATER</KEYWORD1>
+ <KEYWORD1>MDAM</KEYWORD1>
+ <KEYWORD1>MDAMP</KEYWORD1>
+ <KEYWORD1>MDEL</KEYWORD1>
+ <KEYWORD1>MDELE</KEYWORD1>
+ <KEYWORD1>MESH</KEYWORD1>
+ <KEYWORD1>MESHING</KEYWORD1>
+ <KEYWORD1>MGEN</KEYWORD1>
+ <KEYWORD1>MGEN</KEYWORD1>
+ <KEYWORD1>MITE</KEYWORD1>
+ <KEYWORD1>MITER</KEYWORD1>
+ <KEYWORD1>MLIS</KEYWORD1>
+ <KEYWORD1>MLIST</KEYWORD1>
+ <KEYWORD1>MMF</KEYWORD1>
+ <KEYWORD1>MODE</KEYWORD1>
+ <KEYWORD1>MODE</KEYWORD1>
+ <KEYWORD1>MODM</KEYWORD1>
+ <KEYWORD1>MODMSH</KEYWORD1>
+ <KEYWORD1>MODO</KEYWORD1>
+ <KEYWORD1>MODOPT</KEYWORD1>
+ <KEYWORD1>MONI</KEYWORD1>
+ <KEYWORD1>MONITOR</KEYWORD1>
+ <KEYWORD1>MOPT</KEYWORD1>
+ <KEYWORD1>MOPT</KEYWORD1>
+ <KEYWORD1>MOVE</KEYWORD1>
+ <KEYWORD1>MOVE</KEYWORD1>
+ <KEYWORD1>MP</KEYWORD1>
+ <KEYWORD1>MPAM</KEYWORD1>
+ <KEYWORD1>MPAMOD</KEYWORD1>
+ <KEYWORD1>MPCH</KEYWORD1>
+ <KEYWORD1>MPCHG</KEYWORD1>
+ <KEYWORD1>MPDA</KEYWORD1>
+ <KEYWORD1>MPDATA</KEYWORD1>
+ <KEYWORD1>MPDE</KEYWORD1>
+ <KEYWORD1>MPDELE</KEYWORD1>
+ <KEYWORD1>MPDR</KEYWORD1>
+ <KEYWORD1>MPDRES</KEYWORD1>
+ <KEYWORD1>MPLI</KEYWORD1>
+ <KEYWORD1>MPLIST</KEYWORD1>
+ <KEYWORD1>MPMO</KEYWORD1>
+ <KEYWORD1>MPMOD</KEYWORD1>
+ <KEYWORD1>MPPL</KEYWORD1>
+ <KEYWORD1>MPPLOT</KEYWORD1>
+ <KEYWORD1>MPRE</KEYWORD1>
+ <KEYWORD1>MPREAD</KEYWORD1>
+ <KEYWORD1>MPRI</KEYWORD1>
+ <KEYWORD1>MPRINT</KEYWORD1>
+ <KEYWORD1>MPTE</KEYWORD1>
+ <KEYWORD1>MPTEMP</KEYWORD1>
+ <KEYWORD1>MPTG</KEYWORD1>
+ <KEYWORD1>MPTGEN</KEYWORD1>
+ <KEYWORD1>MPTR</KEYWORD1>
+ <KEYWORD1>MPTRES</KEYWORD1>
+ <KEYWORD1>MPUN</KEYWORD1>
+ <KEYWORD1>MPUNDO</KEYWORD1>
+ <KEYWORD1>MPWR</KEYWORD1>
+ <KEYWORD1>MPWRITE</KEYWORD1>
+ <KEYWORD1>MSAD</KEYWORD1>
+ <KEYWORD1>MSADV</KEYWORD1>
+ <KEYWORD1>MSCA</KEYWORD1>
+ <KEYWORD1>MSCAP</KEYWORD1>
+ <KEYWORD1>MSDA</KEYWORD1>
+ <KEYWORD1>MSDATA</KEYWORD1>
+ <KEYWORD1>MSHA</KEYWORD1>
+ <KEYWORD1>MSHAPE</KEYWORD1>
+ <KEYWORD1>MSHK</KEYWORD1>
+ <KEYWORD1>MSHKEY</KEYWORD1>
+ <KEYWORD1>MSHM</KEYWORD1>
+ <KEYWORD1>MSHMID</KEYWORD1>
+ <KEYWORD1>MSHP</KEYWORD1>
+ <KEYWORD1>MSHPATTERN</KEYWORD1>
+ <KEYWORD1>MSME</KEYWORD1>
+ <KEYWORD1>MSMETH</KEYWORD1>
+ <KEYWORD1>MSNO</KEYWORD1>
+ <KEYWORD1>MSNOMF</KEYWORD1>
+ <KEYWORD1>MSPR</KEYWORD1>
+ <KEYWORD1>MSPROP</KEYWORD1>
+ <KEYWORD1>MSQU</KEYWORD1>
+ <KEYWORD1>MSQUAD</KEYWORD1>
+ <KEYWORD1>MSRE</KEYWORD1>
+ <KEYWORD1>MSRELAX</KEYWORD1>
+ <KEYWORD1>MSSO</KEYWORD1>
+ <KEYWORD1>MSSOLU</KEYWORD1>
+ <KEYWORD1>MSSP</KEYWORD1>
+ <KEYWORD1>MSSPEC</KEYWORD1>
+ <KEYWORD1>MSTE</KEYWORD1>
+ <KEYWORD1>MSTERM</KEYWORD1>
+ <KEYWORD1>MSVA</KEYWORD1>
+ <KEYWORD1>MSVARY</KEYWORD1>
+ <KEYWORD1>MXPA</KEYWORD1>
+ <KEYWORD1>MXPAND</KEYWORD1>
+ <KEYWORD1>N</KEYWORD1>
+ <KEYWORD1>NANG</KEYWORD1>
+ <KEYWORD1>NANG</KEYWORD1>
+ <KEYWORD1>NCNV</KEYWORD1>
+ <KEYWORD1>NCNV</KEYWORD1>
+ <KEYWORD1>NDEL</KEYWORD1>
+ <KEYWORD1>NDELE</KEYWORD1>
+ <KEYWORD1>NDIS</KEYWORD1>
+ <KEYWORD1>NDIST</KEYWORD1>
+ <KEYWORD1>NEQI</KEYWORD1>
+ <KEYWORD1>NEQIT</KEYWORD1>
+ <KEYWORD1>NFOR</KEYWORD1>
+ <KEYWORD1>NFORCE</KEYWORD1>
+ <KEYWORD1>NGEN</KEYWORD1>
+ <KEYWORD1>NGEN</KEYWORD1>
+ <KEYWORD1>NKPT</KEYWORD1>
+ <KEYWORD1>NKPT</KEYWORD1>
+ <KEYWORD1>NLGE</KEYWORD1>
+ <KEYWORD1>NLGEOM</KEYWORD1>
+ <KEYWORD1>NLIS</KEYWORD1>
+ <KEYWORD1>NLIST</KEYWORD1>
+ <KEYWORD1>NLOG</KEYWORD1>
+ <KEYWORD1>NLOG</KEYWORD1>
+ <KEYWORD1>NLOP</KEYWORD1>
+ <KEYWORD1>NLOPT</KEYWORD1>
+ <KEYWORD1>NMOD</KEYWORD1>
+ <KEYWORD1>NMODIF</KEYWORD1>
+ <KEYWORD1>NOCO</KEYWORD1>
+ <KEYWORD1>NOCOLOR</KEYWORD1>
+ <KEYWORD1>NODE</KEYWORD1>
+ <KEYWORD1>NODES</KEYWORD1>
+ <KEYWORD1>NOOR</KEYWORD1>
+ <KEYWORD1>NOORDER</KEYWORD1>
+ <KEYWORD1>NPLO</KEYWORD1>
+ <KEYWORD1>NPLOT</KEYWORD1>
+ <KEYWORD1>NPRI</KEYWORD1>
+ <KEYWORD1>NPRINT</KEYWORD1>
+ <KEYWORD1>NREA</KEYWORD1>
+ <KEYWORD1>NREAD</KEYWORD1>
+ <KEYWORD1>NREF</KEYWORD1>
+ <KEYWORD1>NREFINE</KEYWORD1>
+ <KEYWORD1>NRLS</KEYWORD1>
+ <KEYWORD1>NRLSUM</KEYWORD1>
+ <KEYWORD1>NROP</KEYWORD1>
+ <KEYWORD1>NROPT</KEYWORD1>
+ <KEYWORD1>NROT</KEYWORD1>
+ <KEYWORD1>NROTAT</KEYWORD1>
+ <KEYWORD1>NRRA</KEYWORD1>
+ <KEYWORD1>NRRANG</KEYWORD1>
+ <KEYWORD1>NSCA</KEYWORD1>
+ <KEYWORD1>NSCALE</KEYWORD1>
+ <KEYWORD1>NSEL</KEYWORD1>
+ <KEYWORD1>NSEL</KEYWORD1>
+ <KEYWORD1>NSLA</KEYWORD1>
+ <KEYWORD1>NSLA</KEYWORD1>
+ <KEYWORD1>NSLE</KEYWORD1>
+ <KEYWORD1>NSLE</KEYWORD1>
+ <KEYWORD1>NSLK</KEYWORD1>
+ <KEYWORD1>NSLK</KEYWORD1>
+ <KEYWORD1>NSLL</KEYWORD1>
+ <KEYWORD1>NSLL</KEYWORD1>
+ <KEYWORD1>NSLV</KEYWORD1>
+ <KEYWORD1>NSLV</KEYWORD1>
+ <KEYWORD1>NSOL</KEYWORD1>
+ <KEYWORD1>NSOL</KEYWORD1>
+ <KEYWORD1>NSOR</KEYWORD1>
+ <KEYWORD1>NSORT</KEYWORD1>
+ <KEYWORD1>NSTO</KEYWORD1>
+ <KEYWORD1>NSTORE</KEYWORD1>
+ <KEYWORD1>NSUB</KEYWORD1>
+ <KEYWORD1>NSUBST</KEYWORD1>
+ <KEYWORD1>NSVR</KEYWORD1>
+ <KEYWORD1>NSVR</KEYWORD1>
+ <KEYWORD1>NSYM</KEYWORD1>
+ <KEYWORD1>NSYM</KEYWORD1>
+ <KEYWORD1>NUMC</KEYWORD1>
+ <KEYWORD1>NUMCMP</KEYWORD1>
+ <KEYWORD1>NUME</KEYWORD1>
+ <KEYWORD1>NUMEXP</KEYWORD1>
+ <KEYWORD1>NUMM</KEYWORD1>
+ <KEYWORD1>NUMMRG</KEYWORD1>
+ <KEYWORD1>NUMO</KEYWORD1>
+ <KEYWORD1>NUMOFF</KEYWORD1>
+ <KEYWORD1>NUMS</KEYWORD1>
+ <KEYWORD1>NUMSTR</KEYWORD1>
+ <KEYWORD1>NUMV</KEYWORD1>
+ <KEYWORD1>NUMVAR</KEYWORD1>
+ <KEYWORD1>NUSO</KEYWORD1>
+ <KEYWORD1>NUSORT</KEYWORD1>
+ <KEYWORD1>NWPA</KEYWORD1>
+ <KEYWORD1>NWPAVE</KEYWORD1>
+ <KEYWORD1>NWPL</KEYWORD1>
+ <KEYWORD1>NWPLAN</KEYWORD1>
+ <KEYWORD1>NWRI</KEYWORD1>
+ <KEYWORD1>NWRITE</KEYWORD1>
+ <KEYWORD1>nx</KEYWORD1>
+ <KEYWORD1>ny</KEYWORD1>
+ <KEYWORD1>nz</KEYWORD1>
+ <KEYWORD1>OMEG</KEYWORD1>
+ <KEYWORD1>OMEGA</KEYWORD1>
+ <KEYWORD1>OPAD</KEYWORD1>
+ <KEYWORD1>OPADD</KEYWORD1>
+ <KEYWORD1>OPAN</KEYWORD1>
+ <KEYWORD1>OPANL</KEYWORD1>
+ <KEYWORD1>OPCL</KEYWORD1>
+ <KEYWORD1>OPCLR</KEYWORD1>
+ <KEYWORD1>OPDA</KEYWORD1>
+ <KEYWORD1>OPDATA</KEYWORD1>
+ <KEYWORD1>OPDE</KEYWORD1>
+ <KEYWORD1>OPDEL</KEYWORD1>
+ <KEYWORD1>OPEQ</KEYWORD1>
+ <KEYWORD1>OPEQN</KEYWORD1>
+ <KEYWORD1>OPER</KEYWORD1>
+ <KEYWORD1>OPERATE</KEYWORD1>
+ <KEYWORD1>OPEX</KEYWORD1>
+ <KEYWORD1>OPEXE</KEYWORD1>
+ <KEYWORD1>OPFA</KEYWORD1>
+ <KEYWORD1>OPFACT</KEYWORD1>
+ <KEYWORD1>OPFR</KEYWORD1>
+ <KEYWORD1>OPFRST</KEYWORD1>
+ <KEYWORD1>OPGR</KEYWORD1>
+ <KEYWORD1>OPGRAD</KEYWORD1>
+ <KEYWORD1>OPKE</KEYWORD1>
+ <KEYWORD1>OPKEEP</KEYWORD1>
+ <KEYWORD1>OPLF</KEYWORD1>
+ <KEYWORD1>OPLFA</KEYWORD1>
+ <KEYWORD1>OPLG</KEYWORD1>
+ <KEYWORD1>OPLGR</KEYWORD1>
+ <KEYWORD1>OPLI</KEYWORD1>
+ <KEYWORD1>OPLIST</KEYWORD1>
+ <KEYWORD1>OPLO</KEYWORD1>
+ <KEYWORD1>OPLOOP</KEYWORD1>
+ <KEYWORD1>OPLS</KEYWORD1>
+ <KEYWORD1>OPLSW</KEYWORD1>
+ <KEYWORD1>OPMA</KEYWORD1>
+ <KEYWORD1>OPMAKE</KEYWORD1>
+ <KEYWORD1>OPNC</KEYWORD1>
+ <KEYWORD1>OPNCONTROL</KEYWORD1>
+ <KEYWORD1>OPPR</KEYWORD1>
+ <KEYWORD1>OPPRNT</KEYWORD1>
+ <KEYWORD1>OPRA</KEYWORD1>
+ <KEYWORD1>OPRAND</KEYWORD1>
+ <KEYWORD1>OPRE</KEYWORD1>
+ <KEYWORD1>OPRESU</KEYWORD1>
+ <KEYWORD1>OPRF</KEYWORD1>
+ <KEYWORD1>OPRFA</KEYWORD1>
+ <KEYWORD1>OPRG</KEYWORD1>
+ <KEYWORD1>OPRGR</KEYWORD1>
+ <KEYWORD1>OPRS</KEYWORD1>
+ <KEYWORD1>OPRSW</KEYWORD1>
+ <KEYWORD1>OPSA</KEYWORD1>
+ <KEYWORD1>OPSAVE</KEYWORD1>
+ <KEYWORD1>OPSE</KEYWORD1>
+ <KEYWORD1>OPSEL</KEYWORD1>
+ <KEYWORD1>OPSU</KEYWORD1>
+ <KEYWORD1>OPSUBP</KEYWORD1>
+ <KEYWORD1>OPSW</KEYWORD1>
+ <KEYWORD1>OPSWEEP</KEYWORD1>
+ <KEYWORD1>OPTY</KEYWORD1>
+ <KEYWORD1>OPTYPE</KEYWORD1>
+ <KEYWORD1>OPUS</KEYWORD1>
+ <KEYWORD1>OPUSER</KEYWORD1>
+ <KEYWORD1>OPVA</KEYWORD1>
+ <KEYWORD1>OPVAR</KEYWORD1>
+ <KEYWORD1>OUTO</KEYWORD1>
+ <KEYWORD1>OUTOPT</KEYWORD1>
+ <KEYWORD1>OUTP</KEYWORD1>
+ <KEYWORD1>OUTPR</KEYWORD1>
+ <KEYWORD1>OUTR</KEYWORD1>
+ <KEYWORD1>OUTRES</KEYWORD1>
+ <KEYWORD1>PADE</KEYWORD1>
+ <KEYWORD1>PADELE</KEYWORD1>
+ <KEYWORD1>PAGE</KEYWORD1>
+ <KEYWORD1>PAGET</KEYWORD1>
+ <KEYWORD1>PAPU</KEYWORD1>
+ <KEYWORD1>PAPUT</KEYWORD1>
+ <KEYWORD1>PARE</KEYWORD1>
+ <KEYWORD1>PARESU</KEYWORD1>
+ <KEYWORD1>PARR</KEYWORD1>
+ <KEYWORD1>PARRES</KEYWORD1>
+ <KEYWORD1>PARS</KEYWORD1>
+ <KEYWORD1>PARSAV</KEYWORD1>
+ <KEYWORD1>PASA</KEYWORD1>
+ <KEYWORD1>PASAVE</KEYWORD1>
+ <KEYWORD1>PATH</KEYWORD1>
+ <KEYWORD1>PATH</KEYWORD1>
+ <KEYWORD1>PCAL</KEYWORD1>
+ <KEYWORD1>PCALC</KEYWORD1>
+ <KEYWORD1>PCIR</KEYWORD1>
+ <KEYWORD1>PCIRC</KEYWORD1>
+ <KEYWORD1>PCON</KEYWORD1>
+ <KEYWORD1>PCONV</KEYWORD1>
+ <KEYWORD1>PCOR</KEYWORD1>
+ <KEYWORD1>PCORRO</KEYWORD1>
+ <KEYWORD1>PCRO</KEYWORD1>
+ <KEYWORD1>PCROSS</KEYWORD1>
+ <KEYWORD1>PDEF</KEYWORD1>
+ <KEYWORD1>PDEF</KEYWORD1>
+ <KEYWORD1>PDOT</KEYWORD1>
+ <KEYWORD1>PDOT</KEYWORD1>
+ <KEYWORD1>PDRA</KEYWORD1>
+ <KEYWORD1>PDRAG</KEYWORD1>
+ <KEYWORD1>PERB</KEYWORD1>
+ <KEYWORD1>PERBC2D</KEYWORD1>
+ <KEYWORD1>PEXC</KEYWORD1>
+ <KEYWORD1>PEXCLUDE</KEYWORD1>
+ <KEYWORD1>PFAC</KEYWORD1>
+ <KEYWORD1>PFACT</KEYWORD1>
+ <KEYWORD1>PFLU</KEYWORD1>
+ <KEYWORD1>PFLUID</KEYWORD1>
+ <KEYWORD1>PGAP</KEYWORD1>
+ <KEYWORD1>PGAP</KEYWORD1>
+ <KEYWORD1>PHYS</KEYWORD1>
+ <KEYWORD1>PHYSICS</KEYWORD1>
+ <KEYWORD1>PINC</KEYWORD1>
+ <KEYWORD1>PINCLUDE</KEYWORD1>
+ <KEYWORD1>PINS</KEYWORD1>
+ <KEYWORD1>PINSUL</KEYWORD1>
+ <KEYWORD1>PIPE</KEYWORD1>
+ <KEYWORD1>PIPE</KEYWORD1>
+ <KEYWORD1>PIVC</KEYWORD1>
+ <KEYWORD1>PIVCHECK</KEYWORD1>
+ <KEYWORD1>PLAN</KEYWORD1>
+ <KEYWORD1>PLANEWAVE</KEYWORD1>
+ <KEYWORD1>PLCO</KEYWORD1>
+ <KEYWORD1>PLCONV</KEYWORD1>
+ <KEYWORD1>PLCP</KEYWORD1>
+ <KEYWORD1>PLCPLX</KEYWORD1>
+ <KEYWORD1>PLCR</KEYWORD1>
+ <KEYWORD1>PLCRACK</KEYWORD1>
+ <KEYWORD1>PLDI</KEYWORD1>
+ <KEYWORD1>PLDISP</KEYWORD1>
+ <KEYWORD1>PLES</KEYWORD1>
+ <KEYWORD1>PLESOL</KEYWORD1>
+ <KEYWORD1>PLET</KEYWORD1>
+ <KEYWORD1>PLETAB</KEYWORD1>
+ <KEYWORD1>PLF2</KEYWORD1>
+ <KEYWORD1>PLF2D</KEYWORD1>
+ <KEYWORD1>PLLS</KEYWORD1>
+ <KEYWORD1>PLLS</KEYWORD1>
+ <KEYWORD1>PLNS</KEYWORD1>
+ <KEYWORD1>PLNSOL</KEYWORD1>
+ <KEYWORD1>PLOT</KEYWORD1>
+ <KEYWORD1>PLOT</KEYWORD1>
+ <KEYWORD1>PLOT</KEYWORD1>
+ <KEYWORD1>PLOTTING</KEYWORD1>
+ <KEYWORD1>PLPA</KEYWORD1>
+ <KEYWORD1>PLPA</KEYWORD1>
+ <KEYWORD1>PLPAGM</KEYWORD1>
+ <KEYWORD1>PLPATH</KEYWORD1>
+ <KEYWORD1>PLSE</KEYWORD1>
+ <KEYWORD1>PLSECT</KEYWORD1>
+ <KEYWORD1>PLTI</KEYWORD1>
+ <KEYWORD1>PLTIME</KEYWORD1>
+ <KEYWORD1>PLTR</KEYWORD1>
+ <KEYWORD1>PLTRAC</KEYWORD1>
+ <KEYWORD1>PLVA</KEYWORD1>
+ <KEYWORD1>PLVA</KEYWORD1>
+ <KEYWORD1>PLVAR</KEYWORD1>
+ <KEYWORD1>PLVAROPT</KEYWORD1>
+ <KEYWORD1>PLVE</KEYWORD1>
+ <KEYWORD1>PLVECT</KEYWORD1>
+ <KEYWORD1>PMAP</KEYWORD1>
+ <KEYWORD1>PMAP</KEYWORD1>
+ <KEYWORD1>PMET</KEYWORD1>
+ <KEYWORD1>PMETH</KEYWORD1>
+ <KEYWORD1>PMGT</KEYWORD1>
+ <KEYWORD1>PMGTRAN</KEYWORD1>
+ <KEYWORD1>PMOP</KEYWORD1>
+ <KEYWORD1>PMOPTS</KEYWORD1>
+ <KEYWORD1>POIN</KEYWORD1>
+ <KEYWORD1>POINT</KEYWORD1>
+ <KEYWORD1>POLY</KEYWORD1>
+ <KEYWORD1>POLY</KEYWORD1>
+ <KEYWORD1>POPT</KEYWORD1>
+ <KEYWORD1>POPT</KEYWORD1>
+ <KEYWORD1>PORT</KEYWORD1>
+ <KEYWORD1>PORTOPT</KEYWORD1>
+ <KEYWORD1>POWE</KEYWORD1>
+ <KEYWORD1>POWERH</KEYWORD1>
+ <KEYWORD1>PPAT</KEYWORD1>
+ <KEYWORD1>PPATH</KEYWORD1>
+ <KEYWORD1>PPLO</KEYWORD1>
+ <KEYWORD1>PPLOT</KEYWORD1>
+ <KEYWORD1>PPRA</KEYWORD1>
+ <KEYWORD1>PPRANGE</KEYWORD1>
+ <KEYWORD1>PPRE</KEYWORD1>
+ <KEYWORD1>PPRES</KEYWORD1>
+ <KEYWORD1>PRAN</KEYWORD1>
+ <KEYWORD1>PRANGE</KEYWORD1>
+ <KEYWORD1>PRCO</KEYWORD1>
+ <KEYWORD1>PRCONV</KEYWORD1>
+ <KEYWORD1>PRCP</KEYWORD1>
+ <KEYWORD1>PRCPLX</KEYWORD1>
+ <KEYWORD1>PREC</KEYWORD1>
+ <KEYWORD1>PRECISION</KEYWORD1>
+ <KEYWORD1>PRED</KEYWORD1>
+ <KEYWORD1>PRED</KEYWORD1>
+ <KEYWORD1>PRER</KEYWORD1>
+ <KEYWORD1>PRERR</KEYWORD1>
+ <KEYWORD1>PRES</KEYWORD1>
+ <KEYWORD1>PRESOL</KEYWORD1>
+ <KEYWORD1>PRET</KEYWORD1>
+ <KEYWORD1>PRETAB</KEYWORD1>
+ <KEYWORD1>PRI2</KEYWORD1>
+ <KEYWORD1>PRI2</KEYWORD1>
+ <KEYWORD1>PRIM</KEYWORD1>
+ <KEYWORD1>PRIM</KEYWORD1>
+ <KEYWORD1>PRIN</KEYWORD1>
+ <KEYWORD1>PRINT</KEYWORD1>
+ <KEYWORD1>PRIS</KEYWORD1>
+ <KEYWORD1>PRISM</KEYWORD1>
+ <KEYWORD1>PRIT</KEYWORD1>
+ <KEYWORD1>PRITER</KEYWORD1>
+ <KEYWORD1>PRNL</KEYWORD1>
+ <KEYWORD1>PRNLD</KEYWORD1>
+ <KEYWORD1>PRNS</KEYWORD1>
+ <KEYWORD1>PRNSOL</KEYWORD1>
+ <KEYWORD1>PROD</KEYWORD1>
+ <KEYWORD1>PROD</KEYWORD1>
+ <KEYWORD1>PRPA</KEYWORD1>
+ <KEYWORD1>PRPATH</KEYWORD1>
+ <KEYWORD1>PRRF</KEYWORD1>
+ <KEYWORD1>PRRFOR</KEYWORD1>
+ <KEYWORD1>PRRS</KEYWORD1>
+ <KEYWORD1>PRRSOL</KEYWORD1>
+ <KEYWORD1>PRSE</KEYWORD1>
+ <KEYWORD1>PRSECT</KEYWORD1>
+ <KEYWORD1>PRSS</KEYWORD1>
+ <KEYWORD1>PRSSOL</KEYWORD1>
+ <KEYWORD1>PRTI</KEYWORD1>
+ <KEYWORD1>PRTIME</KEYWORD1>
+ <KEYWORD1>PRVA</KEYWORD1>
+ <KEYWORD1>PRVA</KEYWORD1>
+ <KEYWORD1>PRVAR</KEYWORD1>
+ <KEYWORD1>PRVAROPT</KEYWORD1>
+ <KEYWORD1>PRVE</KEYWORD1>
+ <KEYWORD1>PRVECT</KEYWORD1>
+ <KEYWORD1>PSCR</KEYWORD1>
+ <KEYWORD1>PSCR</KEYWORD1>
+ <KEYWORD1>PSDC</KEYWORD1>
+ <KEYWORD1>PSDCOM</KEYWORD1>
+ <KEYWORD1>PSDF</KEYWORD1>
+ <KEYWORD1>PSDFRQ</KEYWORD1>
+ <KEYWORD1>PSDR</KEYWORD1>
+ <KEYWORD1>PSDRES</KEYWORD1>
+ <KEYWORD1>PSDS</KEYWORD1>
+ <KEYWORD1>PSDSPL</KEYWORD1>
+ <KEYWORD1>PSDU</KEYWORD1>
+ <KEYWORD1>PSDUNIT</KEYWORD1>
+ <KEYWORD1>PSDV</KEYWORD1>
+ <KEYWORD1>PSDVAL</KEYWORD1>
+ <KEYWORD1>PSDW</KEYWORD1>
+ <KEYWORD1>PSDWAV</KEYWORD1>
+ <KEYWORD1>PSEL</KEYWORD1>
+ <KEYWORD1>PSEL</KEYWORD1>
+ <KEYWORD1>PSOL</KEYWORD1>
+ <KEYWORD1>PSOLVE</KEYWORD1>
+ <KEYWORD1>PSPE</KEYWORD1>
+ <KEYWORD1>PSPEC</KEYWORD1>
+ <KEYWORD1>PSPR</KEYWORD1>
+ <KEYWORD1>PSPRNG</KEYWORD1>
+ <KEYWORD1>PSTR</KEYWORD1>
+ <KEYWORD1>PSTRES</KEYWORD1>
+ <KEYWORD1>PTEM</KEYWORD1>
+ <KEYWORD1>PTEMP</KEYWORD1>
+ <KEYWORD1>PTXY</KEYWORD1>
+ <KEYWORD1>PTXY</KEYWORD1>
+ <KEYWORD1>PUNI</KEYWORD1>
+ <KEYWORD1>PUNIT</KEYWORD1>
+ <KEYWORD1>PVEC</KEYWORD1>
+ <KEYWORD1>PVECT</KEYWORD1>
+ <KEYWORD1>QDVA</KEYWORD1>
+ <KEYWORD1>QDVAL</KEYWORD1>
+ <KEYWORD1>QFAC</KEYWORD1>
+ <KEYWORD1>QFACT</KEYWORD1>
+ <KEYWORD1>QUAD</KEYWORD1>
+ <KEYWORD1>QUAD</KEYWORD1>
+ <KEYWORD1>QUOT</KEYWORD1>
+ <KEYWORD1>QUOT</KEYWORD1>
+ <KEYWORD1>R</KEYWORD1>
+ <KEYWORD1>RACE</KEYWORD1>
+ <KEYWORD1>RACE</KEYWORD1>
+ <KEYWORD1>RALL</KEYWORD1>
+ <KEYWORD1>RALL</KEYWORD1>
+ <KEYWORD1>RAPP</KEYWORD1>
+ <KEYWORD1>RAPPND</KEYWORD1>
+ <KEYWORD1>RBE3</KEYWORD1>
+ <KEYWORD1>RBE3</KEYWORD1>
+ <KEYWORD1>RCON</KEYWORD1>
+ <KEYWORD1>RCON</KEYWORD1>
+ <KEYWORD1>RDEL</KEYWORD1>
+ <KEYWORD1>RDELE</KEYWORD1>
+ <KEYWORD1>REAL</KEYWORD1>
+ <KEYWORD1>REAL</KEYWORD1>
+ <KEYWORD1>REAL</KEYWORD1>
+ <KEYWORD1>REALVAR</KEYWORD1>
+ <KEYWORD1>RECT</KEYWORD1>
+ <KEYWORD1>RECTNG</KEYWORD1>
+ <KEYWORD1>REDU</KEYWORD1>
+ <KEYWORD1>REDUCE</KEYWORD1>
+ <KEYWORD1>REFL</KEYWORD1>
+ <KEYWORD1>REFLCOEF</KEYWORD1>
+ <KEYWORD1>REOR</KEYWORD1>
+ <KEYWORD1>REORDER</KEYWORD1>
+ <KEYWORD1>RESE</KEYWORD1>
+ <KEYWORD1>RESET</KEYWORD1>
+ <KEYWORD1>RESP</KEYWORD1>
+ <KEYWORD1>RESP</KEYWORD1>
+ <KEYWORD1>RESU</KEYWORD1>
+ <KEYWORD1>RESUME</KEYWORD1>
+ <KEYWORD1>REXP</KEYWORD1>
+ <KEYWORD1>REXPORT</KEYWORD1>
+ <KEYWORD1>RFIL</KEYWORD1>
+ <KEYWORD1>RFILSZ</KEYWORD1>
+ <KEYWORD1>RFOR</KEYWORD1>
+ <KEYWORD1>RFORCE</KEYWORD1>
+ <KEYWORD1>RIGI</KEYWORD1>
+ <KEYWORD1>RIGID</KEYWORD1>
+ <KEYWORD1>RIMP</KEYWORD1>
+ <KEYWORD1>RIMPORT</KEYWORD1>
+ <KEYWORD1>RITE</KEYWORD1>
+ <KEYWORD1>RITER</KEYWORD1>
+ <KEYWORD1>RLIS</KEYWORD1>
+ <KEYWORD1>RLIST</KEYWORD1>
+ <KEYWORD1>RMEM</KEYWORD1>
+ <KEYWORD1>RMEMRY</KEYWORD1>
+ <KEYWORD1>RMOD</KEYWORD1>
+ <KEYWORD1>RMODIF</KEYWORD1>
+ <KEYWORD1>RMOR</KEYWORD1>
+ <KEYWORD1>RMORE</KEYWORD1>
+ <KEYWORD1>ROCK</KEYWORD1>
+ <KEYWORD1>ROCK</KEYWORD1>
+ <KEYWORD1>RPOL</KEYWORD1>
+ <KEYWORD1>RPOLY</KEYWORD1>
+ <KEYWORD1>RPR4</KEYWORD1>
+ <KEYWORD1>RPR4</KEYWORD1>
+ <KEYWORD1>RPRI</KEYWORD1>
+ <KEYWORD1>RPRISM</KEYWORD1>
+ <KEYWORD1>RPSD</KEYWORD1>
+ <KEYWORD1>RPSD</KEYWORD1>
+ <KEYWORD1>RSPE</KEYWORD1>
+ <KEYWORD1>RSPEED</KEYWORD1>
+ <KEYWORD1>RSTA</KEYWORD1>
+ <KEYWORD1>RSTAT</KEYWORD1>
+ <KEYWORD1>RSYS</KEYWORD1>
+ <KEYWORD1>RSYS</KEYWORD1>
+ <KEYWORD1>RTIM</KEYWORD1>
+ <KEYWORD1>RTIMST</KEYWORD1>
+ <KEYWORD1>RUN</KEYWORD1>
+ <KEYWORD1>RWFR</KEYWORD1>
+ <KEYWORD1>RWFRNT</KEYWORD1>
+ <KEYWORD1>SABS</KEYWORD1>
+ <KEYWORD1>SABS</KEYWORD1>
+ <KEYWORD1>SADD</KEYWORD1>
+ <KEYWORD1>SADD</KEYWORD1>
+ <KEYWORD1>SALL</KEYWORD1>
+ <KEYWORD1>SALLOW</KEYWORD1>
+ <KEYWORD1>SARP</KEYWORD1>
+ <KEYWORD1>SARPLOT</KEYWORD1>
+ <KEYWORD1>SAVE</KEYWORD1>
+ <KEYWORD1>SAVE</KEYWORD1>
+ <KEYWORD1>SBCL</KEYWORD1>
+ <KEYWORD1>SBCLIST</KEYWORD1>
+ <KEYWORD1>SBCT</KEYWORD1>
+ <KEYWORD1>SBCTRAN</KEYWORD1>
+ <KEYWORD1>SDEL</KEYWORD1>
+ <KEYWORD1>SDELETE</KEYWORD1>
+ <KEYWORD1>SE</KEYWORD1>
+ <KEYWORD1>SECD</KEYWORD1>
+ <KEYWORD1>SECDATA</KEYWORD1>
+ <KEYWORD1>SECN</KEYWORD1>
+ <KEYWORD1>SECNUM</KEYWORD1>
+ <KEYWORD1>SECO</KEYWORD1>
+ <KEYWORD1>SECOFFSET</KEYWORD1>
+ <KEYWORD1>SECP</KEYWORD1>
+ <KEYWORD1>SECPLOT</KEYWORD1>
+ <KEYWORD1>SECR</KEYWORD1>
+ <KEYWORD1>SECREAD</KEYWORD1>
+ <KEYWORD1>SECT</KEYWORD1>
+ <KEYWORD1>SECTYPE</KEYWORD1>
+ <KEYWORD1>SECW</KEYWORD1>
+ <KEYWORD1>SECWRITE</KEYWORD1>
+ <KEYWORD1>SED</KEYWORD1>
+ <KEYWORD1>SEDL</KEYWORD1>
+ <KEYWORD1>SEDLIST</KEYWORD1>
+ <KEYWORD1>SEEX</KEYWORD1>
+ <KEYWORD1>SEEXP</KEYWORD1>
+ <KEYWORD1>SELI</KEYWORD1>
+ <KEYWORD1>SELIST</KEYWORD1>
+ <KEYWORD1>SELM</KEYWORD1>
+ <KEYWORD1>SELM</KEYWORD1>
+ <KEYWORD1>SENE</KEYWORD1>
+ <KEYWORD1>SENERGY</KEYWORD1>
+ <KEYWORD1>SEOP</KEYWORD1>
+ <KEYWORD1>SEOPT</KEYWORD1>
+ <KEYWORD1>SESY</KEYWORD1>
+ <KEYWORD1>SESYMM</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>SETR</KEYWORD1>
+ <KEYWORD1>SETRAN</KEYWORD1>
+ <KEYWORD1>SEXP</KEYWORD1>
+ <KEYWORD1>SEXP</KEYWORD1>
+ <KEYWORD1>SF</KEYWORD1>
+ <KEYWORD1>SFA</KEYWORD1>
+ <KEYWORD1>SFAC</KEYWORD1>
+ <KEYWORD1>SFACT</KEYWORD1>
+ <KEYWORD1>SFAD</KEYWORD1>
+ <KEYWORD1>SFADELE</KEYWORD1>
+ <KEYWORD1>SFAL</KEYWORD1>
+ <KEYWORD1>SFALIST</KEYWORD1>
+ <KEYWORD1>SFBE</KEYWORD1>
+ <KEYWORD1>SFBEAM</KEYWORD1>
+ <KEYWORD1>SFCA</KEYWORD1>
+ <KEYWORD1>SFCALC</KEYWORD1>
+ <KEYWORD1>SFCU</KEYWORD1>
+ <KEYWORD1>SFCUM</KEYWORD1>
+ <KEYWORD1>SFDE</KEYWORD1>
+ <KEYWORD1>SFDELE</KEYWORD1>
+ <KEYWORD1>SFE</KEYWORD1>
+ <KEYWORD1>SFED</KEYWORD1>
+ <KEYWORD1>SFEDELE</KEYWORD1>
+ <KEYWORD1>SFEL</KEYWORD1>
+ <KEYWORD1>SFELIST</KEYWORD1>
+ <KEYWORD1>SFFU</KEYWORD1>
+ <KEYWORD1>SFFUN</KEYWORD1>
+ <KEYWORD1>SFGR</KEYWORD1>
+ <KEYWORD1>SFGRAD</KEYWORD1>
+ <KEYWORD1>SFL</KEYWORD1>
+ <KEYWORD1>SFLD</KEYWORD1>
+ <KEYWORD1>SFLDELE</KEYWORD1>
+ <KEYWORD1>SFLI</KEYWORD1>
+ <KEYWORD1>SFLIST</KEYWORD1>
+ <KEYWORD1>SFLL</KEYWORD1>
+ <KEYWORD1>SFLLIST</KEYWORD1>
+ <KEYWORD1>SFSC</KEYWORD1>
+ <KEYWORD1>SFSCALE</KEYWORD1>
+ <KEYWORD1>SFTR</KEYWORD1>
+ <KEYWORD1>SFTRAN</KEYWORD1>
+ <KEYWORD1>SHEL</KEYWORD1>
+ <KEYWORD1>SHELL</KEYWORD1>
+ <KEYWORD1>SHPP</KEYWORD1>
+ <KEYWORD1>SHPP</KEYWORD1>
+ <KEYWORD1>SLIS</KEYWORD1>
+ <KEYWORD1>SLIST</KEYWORD1>
+ <KEYWORD1>SLPP</KEYWORD1>
+ <KEYWORD1>SLPPLOT</KEYWORD1>
+ <KEYWORD1>SLSP</KEYWORD1>
+ <KEYWORD1>SLSPLOT</KEYWORD1>
+ <KEYWORD1>SMAL</KEYWORD1>
+ <KEYWORD1>SMALL</KEYWORD1>
+ <KEYWORD1>SMAX</KEYWORD1>
+ <KEYWORD1>SMAX</KEYWORD1>
+ <KEYWORD1>SMBO</KEYWORD1>
+ <KEYWORD1>SMBODY</KEYWORD1>
+ <KEYWORD1>SMCO</KEYWORD1>
+ <KEYWORD1>SMCONS</KEYWORD1>
+ <KEYWORD1>SMFO</KEYWORD1>
+ <KEYWORD1>SMFOR</KEYWORD1>
+ <KEYWORD1>SMIN</KEYWORD1>
+ <KEYWORD1>SMIN</KEYWORD1>
+ <KEYWORD1>SMRT</KEYWORD1>
+ <KEYWORD1>SMRTSIZE</KEYWORD1>
+ <KEYWORD1>SMSU</KEYWORD1>
+ <KEYWORD1>SMSURF</KEYWORD1>
+ <KEYWORD1>SMUL</KEYWORD1>
+ <KEYWORD1>SMULT</KEYWORD1>
+ <KEYWORD1>SOLC</KEYWORD1>
+ <KEYWORD1>SOLCONTROL</KEYWORD1>
+ <KEYWORD1>SOLU</KEYWORD1>
+ <KEYWORD1>SOLU</KEYWORD1>
+ <KEYWORD1>SOLU</KEYWORD1>
+ <KEYWORD1>SOLUOPT</KEYWORD1>
+ <KEYWORD1>SOLV</KEYWORD1>
+ <KEYWORD1>SOLVE</KEYWORD1>
+ <KEYWORD1>SORT</KEYWORD1>
+ <KEYWORD1>SORT</KEYWORD1>
+ <KEYWORD1>SOUR</KEYWORD1>
+ <KEYWORD1>SOURCE</KEYWORD1>
+ <KEYWORD1>SPAC</KEYWORD1>
+ <KEYWORD1>SPACE</KEYWORD1>
+ <KEYWORD1>SPAR</KEYWORD1>
+ <KEYWORD1>SPARM</KEYWORD1>
+ <KEYWORD1>SPEC</KEYWORD1>
+ <KEYWORD1>SPEC</KEYWORD1>
+ <KEYWORD1>SPH4</KEYWORD1>
+ <KEYWORD1>SPH4</KEYWORD1>
+ <KEYWORD1>SPH5</KEYWORD1>
+ <KEYWORD1>SPH5</KEYWORD1>
+ <KEYWORD1>SPHE</KEYWORD1>
+ <KEYWORD1>SPHERE</KEYWORD1>
+ <KEYWORD1>SPLI</KEYWORD1>
+ <KEYWORD1>SPLINE</KEYWORD1>
+ <KEYWORD1>SPOI</KEYWORD1>
+ <KEYWORD1>SPOINT</KEYWORD1>
+ <KEYWORD1>SPOP</KEYWORD1>
+ <KEYWORD1>SPOPT</KEYWORD1>
+ <KEYWORD1>SPRE</KEYWORD1>
+ <KEYWORD1>SPREAD</KEYWORD1>
+ <KEYWORD1>SPTO</KEYWORD1>
+ <KEYWORD1>SPTOPT</KEYWORD1>
+ <KEYWORD1>SQRT</KEYWORD1>
+ <KEYWORD1>SQRT</KEYWORD1>
+ <KEYWORD1>SRCS</KEYWORD1>
+ <KEYWORD1>SRCS</KEYWORD1>
+ <KEYWORD1>SRSS</KEYWORD1>
+ <KEYWORD1>SRSS</KEYWORD1>
+ <KEYWORD1>SSLN</KEYWORD1>
+ <KEYWORD1>SSLN</KEYWORD1>
+ <KEYWORD1>SSTI</KEYWORD1>
+ <KEYWORD1>SSTIF</KEYWORD1>
+ <KEYWORD1>SSUM</KEYWORD1>
+ <KEYWORD1>SSUM</KEYWORD1>
+ <KEYWORD1>STAT</KEYWORD1>
+ <KEYWORD1>STAT</KEYWORD1>
+ <KEYWORD1>STEF</KEYWORD1>
+ <KEYWORD1>STEF</KEYWORD1>
+ <KEYWORD1>STOR</KEYWORD1>
+ <KEYWORD1>STORE</KEYWORD1>
+ <KEYWORD1>SUBO</KEYWORD1>
+ <KEYWORD1>SUBOPT</KEYWORD1>
+ <KEYWORD1>SUBS</KEYWORD1>
+ <KEYWORD1>SUBSET</KEYWORD1>
+ <KEYWORD1>SUMT</KEYWORD1>
+ <KEYWORD1>SUMTYPE</KEYWORD1>
+ <KEYWORD1>SV</KEYWORD1>
+ <KEYWORD1>SVTY</KEYWORD1>
+ <KEYWORD1>SVTYP</KEYWORD1>
+ <KEYWORD1>TALL</KEYWORD1>
+ <KEYWORD1>TALLOW</KEYWORD1>
+ <KEYWORD1>TB</KEYWORD1>
+ <KEYWORD1>TBCO</KEYWORD1>
+ <KEYWORD1>TBCOPY</KEYWORD1>
+ <KEYWORD1>TBDA</KEYWORD1>
+ <KEYWORD1>TBDATA</KEYWORD1>
+ <KEYWORD1>TBDE</KEYWORD1>
+ <KEYWORD1>TBDELE</KEYWORD1>
+ <KEYWORD1>TBLE</KEYWORD1>
+ <KEYWORD1>TBLE</KEYWORD1>
+ <KEYWORD1>TBLI</KEYWORD1>
+ <KEYWORD1>TBLIST</KEYWORD1>
+ <KEYWORD1>TBMO</KEYWORD1>
+ <KEYWORD1>TBMODIF</KEYWORD1>
+ <KEYWORD1>TBPL</KEYWORD1>
+ <KEYWORD1>TBPLOT</KEYWORD1>
+ <KEYWORD1>TBPT</KEYWORD1>
+ <KEYWORD1>TBPT</KEYWORD1>
+ <KEYWORD1>TBTE</KEYWORD1>
+ <KEYWORD1>TBTEMP</KEYWORD1>
+ <KEYWORD1>TCHG</KEYWORD1>
+ <KEYWORD1>TCHG</KEYWORD1>
+ <KEYWORD1>TEE</KEYWORD1>
+ <KEYWORD1>TERM</KEYWORD1>
+ <KEYWORD1>TERM</KEYWORD1>
+ <KEYWORD1>TIME</KEYWORD1>
+ <KEYWORD1>TIME</KEYWORD1>
+ <KEYWORD1>TIME</KEYWORD1>
+ <KEYWORD1>TIMERANGE</KEYWORD1>
+ <KEYWORD1>TIMI</KEYWORD1>
+ <KEYWORD1>TIMINT</KEYWORD1>
+ <KEYWORD1>TIMP</KEYWORD1>
+ <KEYWORD1>TIMP</KEYWORD1>
+ <KEYWORD1>TINT</KEYWORD1>
+ <KEYWORD1>TINTP</KEYWORD1>
+ <KEYWORD1>TOFF</KEYWORD1>
+ <KEYWORD1>TOFFST</KEYWORD1>
+ <KEYWORD1>TOPD</KEYWORD1>
+ <KEYWORD1>TOPDEF</KEYWORD1>
+ <KEYWORD1>TOPE</KEYWORD1>
+ <KEYWORD1>TOPEXE</KEYWORD1>
+ <KEYWORD1>TOPI</KEYWORD1>
+ <KEYWORD1>TOPITER</KEYWORD1>
+ <KEYWORD1>TORQ2D</KEYWORD1>
+ <KEYWORD1>TORQ</KEYWORD1>
+ <KEYWORD1>TORQ</KEYWORD1>
+ <KEYWORD1>TORQ</KEYWORD1>
+ <KEYWORD1>TORQC2D</KEYWORD1>
+ <KEYWORD1>TORQSUM</KEYWORD1>
+ <KEYWORD1>TORU</KEYWORD1>
+ <KEYWORD1>TORUS</KEYWORD1>
+ <KEYWORD1>TOTA</KEYWORD1>
+ <KEYWORD1>TOTAL</KEYWORD1>
+ <KEYWORD1>TRAN</KEYWORD1>
+ <KEYWORD1>TRAN</KEYWORD1>
+ <KEYWORD1>TRANS</KEYWORD1>
+ <KEYWORD1>TRANSFER</KEYWORD1>
+ <KEYWORD1>TREF</KEYWORD1>
+ <KEYWORD1>TREF</KEYWORD1>
+ <KEYWORD1>TRNO</KEYWORD1>
+ <KEYWORD1>TRNOPT</KEYWORD1>
+ <KEYWORD1>TRPD</KEYWORD1>
+ <KEYWORD1>TRPDEL</KEYWORD1>
+ <KEYWORD1>TRPL</KEYWORD1>
+ <KEYWORD1>TRPLIS</KEYWORD1>
+ <KEYWORD1>TRPO</KEYWORD1>
+ <KEYWORD1>TRPOIN</KEYWORD1>
+ <KEYWORD1>TRTI</KEYWORD1>
+ <KEYWORD1>TRTIME</KEYWORD1>
+ <KEYWORD1>TSHA</KEYWORD1>
+ <KEYWORD1>TSHAP</KEYWORD1>
+ <KEYWORD1>TSRE</KEYWORD1>
+ <KEYWORD1>TSRES</KEYWORD1>
+ <KEYWORD1>TUNI</KEYWORD1>
+ <KEYWORD1>TUNIF</KEYWORD1>
+ <KEYWORD1>TVAR</KEYWORD1>
+ <KEYWORD1>TVAR</KEYWORD1>
+ <KEYWORD1>TYPE</KEYWORD1>
+ <KEYWORD1>TYPE</KEYWORD1>
+ <KEYWORD1>UIMP</KEYWORD1>
+ <KEYWORD1>UIMP</KEYWORD1>
+ <KEYWORD1>UPCO</KEYWORD1>
+ <KEYWORD1>UPCOORD</KEYWORD1>
+ <KEYWORD1>UPGE</KEYWORD1>
+ <KEYWORD1>UPGEOM</KEYWORD1>
+ <KEYWORD1>USRC</KEYWORD1>
+ <KEYWORD1>USRCAL</KEYWORD1>
+ <KEYWORD1>V</KEYWORD1>
+ <KEYWORD1>VA</KEYWORD1>
+ <KEYWORD1>VADD</KEYWORD1>
+ <KEYWORD1>VADD</KEYWORD1>
+ <KEYWORD1>VALV</KEYWORD1>
+ <KEYWORD1>VALVE</KEYWORD1>
+ <KEYWORD1>VARD</KEYWORD1>
+ <KEYWORD1>VARDEL</KEYWORD1>
+ <KEYWORD1>VARN</KEYWORD1>
+ <KEYWORD1>VARNAM</KEYWORD1>
+ <KEYWORD1>VATT</KEYWORD1>
+ <KEYWORD1>VATT</KEYWORD1>
+ <KEYWORD1>VCLE</KEYWORD1>
+ <KEYWORD1>VCLEAR</KEYWORD1>
+ <KEYWORD1>VCRO</KEYWORD1>
+ <KEYWORD1>VCROSS</KEYWORD1>
+ <KEYWORD1>VCVF</KEYWORD1>
+ <KEYWORD1>VCVFILL</KEYWORD1>
+ <KEYWORD1>VDDA</KEYWORD1>
+ <KEYWORD1>VDDAM</KEYWORD1>
+ <KEYWORD1>VDEL</KEYWORD1>
+ <KEYWORD1>VDELE</KEYWORD1>
+ <KEYWORD1>VDGL</KEYWORD1>
+ <KEYWORD1>VDGL</KEYWORD1>
+ <KEYWORD1>VDOT</KEYWORD1>
+ <KEYWORD1>VDOT</KEYWORD1>
+ <KEYWORD1>VDRA</KEYWORD1>
+ <KEYWORD1>VDRAG</KEYWORD1>
+ <KEYWORD1>VEXT</KEYWORD1>
+ <KEYWORD1>VEXT</KEYWORD1>
+ <KEYWORD1>VGEN</KEYWORD1>
+ <KEYWORD1>VGEN</KEYWORD1>
+ <KEYWORD1>VGET</KEYWORD1>
+ <KEYWORD1>VGET</KEYWORD1>
+ <KEYWORD1>VGLU</KEYWORD1>
+ <KEYWORD1>VGLUE</KEYWORD1>
+ <KEYWORD1>VIMP</KEYWORD1>
+ <KEYWORD1>VIMP</KEYWORD1>
+ <KEYWORD1>VINP</KEYWORD1>
+ <KEYWORD1>VINP</KEYWORD1>
+ <KEYWORD1>VINV</KEYWORD1>
+ <KEYWORD1>VINV</KEYWORD1>
+ <KEYWORD1>VLIS</KEYWORD1>
+ <KEYWORD1>VLIST</KEYWORD1>
+ <KEYWORD1>VLSC</KEYWORD1>
+ <KEYWORD1>VLSCALE</KEYWORD1>
+ <KEYWORD1>VMES</KEYWORD1>
+ <KEYWORD1>VMESH</KEYWORD1>
+ <KEYWORD1>VOFF</KEYWORD1>
+ <KEYWORD1>VOFFST</KEYWORD1>
+ <KEYWORD1>VOLU</KEYWORD1>
+ <KEYWORD1>VOLUMES</KEYWORD1>
+ <KEYWORD1>VOVL</KEYWORD1>
+ <KEYWORD1>VOVLAP</KEYWORD1>
+ <KEYWORD1>VPLO</KEYWORD1>
+ <KEYWORD1>VPLOT</KEYWORD1>
+ <KEYWORD1>VPTN</KEYWORD1>
+ <KEYWORD1>VPTN</KEYWORD1>
+ <KEYWORD1>VPUT</KEYWORD1>
+ <KEYWORD1>VPUT</KEYWORD1>
+ <KEYWORD1>VROT</KEYWORD1>
+ <KEYWORD1>VROTAT</KEYWORD1>
+ <KEYWORD1>VSBA</KEYWORD1>
+ <KEYWORD1>VSBA</KEYWORD1>
+ <KEYWORD1>VSBV</KEYWORD1>
+ <KEYWORD1>VSBV</KEYWORD1>
+ <KEYWORD1>VSBW</KEYWORD1>
+ <KEYWORD1>VSBW</KEYWORD1>
+ <KEYWORD1>VSEL</KEYWORD1>
+ <KEYWORD1>VSEL</KEYWORD1>
+ <KEYWORD1>VSLA</KEYWORD1>
+ <KEYWORD1>VSLA</KEYWORD1>
+ <KEYWORD1>VSUM</KEYWORD1>
+ <KEYWORD1>VSUM</KEYWORD1>
+ <KEYWORD1>VSWE</KEYWORD1>
+ <KEYWORD1>VSWEEP</KEYWORD1>
+ <KEYWORD1>VSYM</KEYWORD1>
+ <KEYWORD1>VSYMM</KEYWORD1>
+ <KEYWORD1>VTRA</KEYWORD1>
+ <KEYWORD1>VTRAN</KEYWORD1>
+ <KEYWORD1>VTYP</KEYWORD1>
+ <KEYWORD1>VTYPE</KEYWORD1>
+ <KEYWORD1>WAVE</KEYWORD1>
+ <KEYWORD1>WAVES</KEYWORD1>
+ <KEYWORD1>WERA</KEYWORD1>
+ <KEYWORD1>WERASE</KEYWORD1>
+ <KEYWORD1>WFRO</KEYWORD1>
+ <KEYWORD1>WFRONT</KEYWORD1>
+ <KEYWORD1>WMOR</KEYWORD1>
+ <KEYWORD1>WMORE</KEYWORD1>
+ <KEYWORD1>WPAV</KEYWORD1>
+ <KEYWORD1>WPAVE</KEYWORD1>
+ <KEYWORD1>WPCS</KEYWORD1>
+ <KEYWORD1>WPCSYS</KEYWORD1>
+ <KEYWORD1>WPLA</KEYWORD1>
+ <KEYWORD1>WPLANE</KEYWORD1>
+ <KEYWORD1>WPOF</KEYWORD1>
+ <KEYWORD1>WPOFFS</KEYWORD1>
+ <KEYWORD1>WPRO</KEYWORD1>
+ <KEYWORD1>WPROTA</KEYWORD1>
+ <KEYWORD1>WPST</KEYWORD1>
+ <KEYWORD1>WPSTYL</KEYWORD1>
+ <KEYWORD1>WRIT</KEYWORD1>
+ <KEYWORD1>WRITE</KEYWORD1>
+ <KEYWORD1>WSOR</KEYWORD1>
+ <KEYWORD1>WSORT</KEYWORD1>
+ <KEYWORD1>WSTA</KEYWORD1>
+ <KEYWORD1>WSTART</KEYWORD1>
+ <KEYWORD1>XVAR</KEYWORD1>
+ <KEYWORD1>XVAR</KEYWORD1>
+ <KEYWORD1>XVAROPT</KEYWORD1>
+
+<!-- Material properties (short notation) -->
+
+ <KEYWORD1>ex</KEYWORD1>
+ <KEYWORD1>ey</KEYWORD1>
+ <KEYWORD1>ez</KEYWORD1>
+ <KEYWORD1>nuxy</KEYWORD1>
+ <KEYWORD1>nuxz</KEYWORD1>
+ <KEYWORD1>nuyz</KEYWORD1>
+ <KEYWORD1>gxy</KEYWORD1>
+ <KEYWORD1>gxz</KEYWORD1>
+ <KEYWORD1>gyz</KEYWORD1>
+ <KEYWORD1>alpx</KEYWORD1>
+ <KEYWORD1>alpy</KEYWORD1>
+ <KEYWORD1>alpz</KEYWORD1>
+ <KEYWORD1>kxx</KEYWORD1>
+ <KEYWORD1>kyy</KEYWORD1>
+ <KEYWORD1>kzz</KEYWORD1>
+ <KEYWORD1>dens</KEYWORD1>
+ <KEYWORD1>damp</KEYWORD1>
+ <KEYWORD1>mu</KEYWORD1>
+ <KEYWORD1>prxy</KEYWORD1>
+
+<!-- *get functions (abbreviated) -->
+
+ <KEYWORD2>ANGLEK</KEYWORD2>
+ <KEYWORD2>ANGLEN</KEYWORD2>
+ <KEYWORD2>AREAKP</KEYWORD2>
+ <KEYWORD2>AREAND</KEYWORD2>
+ <KEYWORD2>ARFACE</KEYWORD2>
+ <KEYWORD2>ARNEXT</KEYWORD2>
+ <KEYWORD2>ARNODE</KEYWORD2>
+ <KEYWORD2>AX</KEYWORD2>
+ <KEYWORD2>AY</KEYWORD2>
+ <KEYWORD2>AZ</KEYWORD2>
+ <KEYWORD2>CENTRX</KEYWORD2>
+ <KEYWORD2>CENTRY</KEYWORD2>
+ <KEYWORD2>CENTRZ</KEYWORD2>
+ <KEYWORD2>DISTEN</KEYWORD2>
+ <KEYWORD2>DISTKP</KEYWORD2>
+ <KEYWORD2>DISTND</KEYWORD2>
+ <KEYWORD2>ELADJ</KEYWORD2>
+ <KEYWORD2>ELNEXT</KEYWORD2>
+ <KEYWORD2>ENDS</KEYWORD2>
+ <KEYWORD2>ENEARN</KEYWORD2>
+ <KEYWORD2>ENEXTN</KEYWORD2>
+ <KEYWORD2>ENKE</KEYWORD2>
+ <KEYWORD2>KNEAR</KEYWORD2>
+ <KEYWORD2>KP</KEYWORD2>
+ <KEYWORD2>KPNEXT</KEYWORD2>
+ <KEYWORD2>KX</KEYWORD2>
+ <KEYWORD2>KY</KEYWORD2>
+ <KEYWORD2>KZ</KEYWORD2>
+ <KEYWORD2>LOC</KEYWORD2>
+ <KEYWORD2>LSNEXT</KEYWORD2>
+ <KEYWORD2>LSX</KEYWORD2>
+ <KEYWORD2>LSY</KEYWORD2>
+ <KEYWORD2>LSZ</KEYWORD2>
+ <KEYWORD2>LX</KEYWORD2>
+ <KEYWORD2>LY</KEYWORD2>
+ <KEYWORD2>LZ</KEYWORD2>
+ <KEYWORD2>MAG</KEYWORD2>
+ <KEYWORD2>NDFACE</KEYWORD2>
+ <KEYWORD2>NDNEXT</KEYWORD2>
+ <KEYWORD2>NELEM</KEYWORD2>
+ <KEYWORD2>NMFACE</KEYWORD2>
+ <KEYWORD2>NNEAR</KEYWORD2>
+ <KEYWORD2>NODE</KEYWORD2>
+ <KEYWORD2>NORMKX</KEYWORD2>
+ <KEYWORD2>NORMKY</KEYWORD2>
+ <KEYWORD2>NORMKZ</KEYWORD2>
+ <KEYWORD2>NORMNX</KEYWORD2>
+ <KEYWORD2>NORMNY</KEYWORD2>
+ <KEYWORD2>NORMNZ</KEYWORD2>
+ <KEYWORD2>NX</KEYWORD2>
+ <KEYWORD2>NY</KEYWORD2>
+ <KEYWORD2>NZ</KEYWORD2>
+ <KEYWORD2>PRES</KEYWORD2>
+ <KEYWORD2>ROTX</KEYWORD2>
+ <KEYWORD2>ROTY</KEYWORD2>
+ <KEYWORD2>ROTZ</KEYWORD2>
+ <KEYWORD2>TEMP</KEYWORD2>
+ <KEYWORD2>UX</KEYWORD2>
+ <KEYWORD2>UY</KEYWORD2>
+ <KEYWORD2>UZ</KEYWORD2>
+ <KEYWORD2>VLNEXT</KEYWORD2>
+ <KEYWORD2>VOLT</KEYWORD2>
+ <KEYWORD2>VX</KEYWORD2>
+ <KEYWORD2>VY</KEYWORD2>
+ <KEYWORD2>VZ</KEYWORD2>
+
+ <!-- [Keywords 3] -->
+ <!-- command option labels -->
+
+ <!-- AADD command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- *ABBRES command -->
+ <KEYWORD3>new</KEYWORD3>
+ <KEYWORD3>change</KEYWORD3>
+
+ <!-- *AFUN command -->
+ <KEYWORD3>rad</KEYWORD3>
+ <KEYWORD3>deg</KEYWORD3>
+
+ <!-- ALIST command -->
+ <KEYWORD3>hpt</KEYWORD3>
+
+ <!-- ALLSEL command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>below</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>kp</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>node</KEYWORD3>
+
+ <!-- /ANFILE command -->
+ <KEYWORD3>,save</KEYWORD3>
+ <KEYWORD3>resume</KEYWORD3>
+
+ <!-- /ANNOT command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+ <KEYWORD3>,save</KEYWORD3>
+ <KEYWORD3>scale</KEYWORD3>
+ <KEYWORD3>xorig</KEYWORD3>
+ <KEYWORD3>yorig</KEYWORD3>
+ <KEYWORD3>snap</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>defa</KEYWORD3>
+ <KEYWORD3>refr</KEYWORD3>
+
+ <!-- ANTYPE command -->
+ <KEYWORD3>static</KEYWORD3>
+ <KEYWORD3>buckle</KEYWORD3>
+ <KEYWORD3>modal</KEYWORD3>
+ <KEYWORD3>harmic</KEYWORD3>
+ <KEYWORD3>trans</KEYWORD3>
+ <KEYWORD3>substr</KEYWORD3>
+ <KEYWORD3>spectr</KEYWORD3>
+ <KEYWORD3>new</KEYWORD3>
+ <KEYWORD3>rest</KEYWORD3>
+
+ <!-- APLOT command -->
+ <KEYWORD3>dege</KEYWORD3>
+
+ <!-- APPEND command -->
+ <KEYWORD3>first</KEYWORD3>
+ <KEYWORD3>next</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>near</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+
+ <!-- ARCTRM command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>,l</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+
+ <!-- AREFINE command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>smooth</KEYWORD3>
+ <KEYWORD3>clean</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- ARSPLIT command -->
+ <KEYWORD3>tight</KEYWORD3>
+
+ <!--ARSYM command -->
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+
+ <!--ASBA, ASBL, ASBV, ASBW commands -->
+ <KEYWORD3>sepo</KEYWORD3>
+ <KEYWORD3>delete</KEYWORD3>
+ <KEYWORD3>keep</KEYWORD3>
+
+ <!-- ASEL command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>inve</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>ext</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>hpt</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>,real</KEYWORD3>
+ <KEYWORD3>,esys</KEYWORD3>
+ <KEYWORD3>acca</KEYWORD3>
+
+ <!-- ASLL, ASLV commands -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+
+ <!-- /ASSIGN command -->
+ <KEYWORD3>emat</KEYWORD3>
+ <KEYWORD3>esav</KEYWORD3>
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>redm</KEYWORD3>
+ <KEYWORD3>mode</KEYWORD3>
+ <KEYWORD3>rdsp</KEYWORD3>
+ <KEYWORD3>rfrq</KEYWORD3>
+ <KEYWORD3>tri</KEYWORD3>
+ <KEYWORD3>rst</KEYWORD3>
+ <KEYWORD3>rth</KEYWORD3>
+ <KEYWORD3>rmg</KEYWORD3>
+ <KEYWORD3>erot</KEYWORD3>
+ <KEYWORD3>osav</KEYWORD3>
+ <KEYWORD3>rfl</KEYWORD3>
+ <KEYWORD3>seld</KEYWORD3>
+
+ <!-- ASUM command -->
+ <KEYWORD3>default</KEYWORD3>
+ <KEYWORD3>fine</KEYWORD3>
+
+ <!-- AUTOTS command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- /AXLAB command -->
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+
+ <!-- /BATCH command -->
+ <KEYWORD3>list</KEYWORD3>
+
+ <!-- /BEND command -->
+ <KEYWORD3>lr</KEYWORD3>
+ <KEYWORD3>sr</KEYWORD3>
+
+ <!-- BF, BFA, BFADELE, BFALIST, BFCUM, BFDELE, BFE, BFECUM, BFEDELE, BFELIST, BFESCAL -->
+ <!-- BFK, BFKDELE, BFKLIST, BFL, BFLDELE, BFLIST, BFLLIST, BFSCALE, BFUNIF, BFV, -->
+ <!-- BFVDELE, BFVLIST commands -->
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>flue</KEYWORD3>
+ <KEYWORD3>hgen</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>vltg</KEYWORD3>
+ <KEYWORD3>mvdi</KEYWORD3>
+ <KEYWORD3>chrgd</KEYWORD3>
+ <KEYWORD3>forc</KEYWORD3>
+ <KEYWORD3>repl</KEYWORD3>
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>igno</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+
+ <!-- BIOT command -->
+ <KEYWORD3>new</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+
+ <!-- BOPTN command -->
+ <KEYWORD3>defa</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>keep</KEYWORD3>
+ <KEYWORD3>nwarn</KEYWORD3>
+ <KEYWORD3>version</KEYWORD3>
+ <KEYWORD3>no</KEYWORD3>
+ <KEYWORD3>yes</KEYWORD3>
+ <KEYWORD3>rv52</KEYWORD3>
+ <KEYWORD3>rv51</KEYWORD3>
+
+ <!-- BUCOPT command -->
+ <KEYWORD3>subsp</KEYWORD3>
+ <KEYWORD3>lanb</KEYWORD3>
+ <KEYWORD3>reduc</KEYWORD3>
+
+ <!-- CDREAD, CDWRITE commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>db</KEYWORD3>
+ <KEYWORD3>solid</KEYWORD3>
+ <KEYWORD3>comb</KEYWORD3>
+ <KEYWORD3>geom</KEYWORD3>
+ <KEYWORD3>cm</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>load</KEYWORD3>
+ <KEYWORD3>blocked</KEYWORD3>
+ <KEYWORD3>unblocked</KEYWORD3>
+
+ <!-- CELIST command -->
+ <KEYWORD3>any</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- CERIG command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>uxyz</KEYWORD3>
+ <KEYWORD3>rxyz</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+
+ <!-- CFOPEN command -->
+ <KEYWORD3>append</KEYWORD3>
+
+ <!-- CHECK command -->
+ <KEYWORD3>,esel</KEYWORD3>
+ <KEYWORD3>warn</KEYWORD3>
+ <KEYWORD3>err</KEYWORD3>
+
+ <!-- CLEAR command -->
+ <KEYWORD3>start</KEYWORD3>
+ <KEYWORD3>nostart</KEYWORD3>
+
+ <!-- CLOCAL, CS, CSKP, CSWPLA commands -->
+ <KEYWORD3>cart</KEYWORD3>
+ <KEYWORD3>cylin</KEYWORD3>
+ <KEYWORD3>sphe</KEYWORD3>
+ <KEYWORD3>toro</KEYWORD3>
+
+ <!-- CM command -->
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>kp</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>node</KEYWORD3>
+
+ <!-- CMAP command -->
+ <KEYWORD3>create</KEYWORD3>
+
+ <!-- CMEDIT command -->
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+
+ <!-- CMPLOT command -->
+ <KEYWORD3>,n</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- CMSEL command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+
+ <!-- CNVTOL command -->
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>vf</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>curt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>vltg</KEYWORD3>
+
+ <!-- COLOR command -->
+ <KEYWORD3>axes</KEYWORD3>
+ <KEYWORD3>axnum</KEYWORD3>
+ <KEYWORD3>num</KEYWORD3>
+ <KEYWORD3>outl</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>isurf</KEYWORD3>
+ <KEYWORD3>wbak</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>sp01</KEYWORD3>
+ <KEYWORD3>sp02</KEYWORD3>
+ <KEYWORD3>sp03</KEYWORD3>
+ <KEYWORD3>sp04</KEYWORD3>
+ <KEYWORD3>sp05</KEYWORD3>
+ <KEYWORD3>sp06</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>vf</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>curt</KEYWORD3>
+ <KEYWORD3>vltg</KEYWORD3>
+ <KEYWORD3>mast</KEYWORD3>
+ <KEYWORD3>,cp</KEYWORD3>
+ <KEYWORD3>,ce</KEYWORD3>
+ <KEYWORD3>nfor</KEYWORD3>
+ <KEYWORD3>nmom</KEYWORD3>
+ <KEYWORD3>rfor</KEYWORD3>
+ <KEYWORD3>rmom</KEYWORD3>
+ <KEYWORD3>path</KEYWORD3>
+ <KEYWORD3>grbak</KEYWORD3>
+ <KEYWORD3>grid</KEYWORD3>
+ <KEYWORD3>axlab</KEYWORD3>
+ <KEYWORD3>curve</KEYWORD3>
+ <KEYWORD3>cm</KEYWORD3>
+ <KEYWORD3>cntr</KEYWORD3>
+ <KEYWORD3>smax</KEYWORD3>
+ <KEYWORD3>smin</KEYWORD3>
+ <KEYWORD3>mred</KEYWORD3>
+ <KEYWORD3>cblu</KEYWORD3>
+ <KEYWORD3>ygre</KEYWORD3>
+ <KEYWORD3>dgra</KEYWORD3>
+ <KEYWORD3>mage</KEYWORD3>
+ <KEYWORD3>cyan</KEYWORD3>
+ <KEYWORD3>yell</KEYWORD3>
+ <KEYWORD3>lgra</KEYWORD3>
+ <KEYWORD3>bmag</KEYWORD3>
+ <KEYWORD3>gcya</KEYWORD3>
+ <KEYWORD3>oran</KEYWORD3>
+ <KEYWORD3>whit</KEYWORD3>
+ <KEYWORD3>blue</KEYWORD3>
+ <KEYWORD3>gree</KEYWORD3>
+ <KEYWORD3>red</KEYWORD3>
+ <KEYWORD3>blac</KEYWORD3>
+
+ <!-- CONFIG command -->
+ <KEYWORD3>nres</KEYWORD3>
+ <KEYWORD3>nbuf</KEYWORD3>
+ <KEYWORD3>nproc</KEYWORD3>
+ <KEYWORD3>locfl</KEYWORD3>
+ <KEYWORD3>szbio</KEYWORD3>
+ <KEYWORD3>ncont</KEYWORD3>
+ <KEYWORD3>order</KEYWORD3>
+ <KEYWORD3>fsplit</KEYWORD3>
+ <KEYWORD3>mxnd</KEYWORD3>
+ <KEYWORD3>mxel</KEYWORD3>
+ <KEYWORD3>mxkp</KEYWORD3>
+ <KEYWORD3>mxls</KEYWORD3>
+ <KEYWORD3>mxar</KEYWORD3>
+ <KEYWORD3>mxvl</KEYWORD3>
+ <KEYWORD3>mxrl</KEYWORD3>
+ <KEYWORD3>mxcp</KEYWORD3>
+ <KEYWORD3>mxce</KEYWORD3>
+ <KEYWORD3>nlcontrol</KEYWORD3>
+
+ <!-- CP command -->
+ <KEYWORD3>high</KEYWORD3>
+ <KEYWORD3>next</KEYWORD3>
+
+ <!-- CPDELE, CPLIST commands -->
+ <KEYWORD3>any</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- CPINTF, D, DA, DADELE, DDELE, DK, DL, DLDELE, DOF, DOFSEL, FKLIST commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>ax</KEYWORD3>
+ <KEYWORD3>ay</KEYWORD3>
+ <KEYWORD3>az</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>sp01</KEYWORD3>
+ <KEYWORD3>sp02</KEYWORD3>
+ <KEYWORD3>sp03</KEYWORD3>
+ <KEYWORD3>sp04</KEYWORD3>
+ <KEYWORD3>sp05</KEYWORD3>
+ <KEYWORD3>sp06</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>symm</KEYWORD3>
+ <KEYWORD3>asym</KEYWORD3>
+ <KEYWORD3>delete</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>disp</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>en</KEYWORD3>
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>fy</KEYWORD3>
+ <KEYWORD3>fz</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>my</KEYWORD3>
+ <KEYWORD3>mz</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>forc</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>chrg</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>csgx</KEYWORD3>
+ <KEYWORD3>csgy</KEYWORD3>
+ <KEYWORD3>csgz</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+
+ <!-- CQC command -->
+ <KEYWORD3>disp</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+
+ <!-- CSDELE, CSLIST commands -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- CUTCONTROL command -->
+ <KEYWORD3>plslimit</KEYWORD3>
+ <KEYWORD3>crplimit</KEYWORD3>
+ <KEYWORD3>dsplimit</KEYWORD3>
+ <KEYWORD3>npoint</KEYWORD3>
+ <KEYWORD3>noiterpredict</KEYWORD3>
+
+ <!-- DCUM command -->
+ <KEYWORD3>repl</KEYWORD3>
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>igno</KEYWORD3>
+
+ <!-- DEL command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>_prm</KEYWORD3>
+
+ <!-- DELTIM command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- DESIZE command -->
+ <KEYWORD3>defa</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- DESOL, DNSOL commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>zx</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>vf</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>cmuv</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+
+ <!-- DEVDISP command -->
+ <KEYWORD3>dither</KEYWORD3>
+ <KEYWORD3>font</KEYWORD3>
+ <KEYWORD3>text</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- DEVICE command -->
+ <KEYWORD3>vector</KEYWORD3>
+ <KEYWORD3>dither</KEYWORD3>
+ <KEYWORD3>anim</KEYWORD3>
+ <KEYWORD3>font</KEYWORD3>
+ <KEYWORD3>text</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- DIM command -->
+ <KEYWORD3>array</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>table</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>velocity</KEYWORD3>
+ <KEYWORD3>pressure</KEYWORD3>
+
+ <!-- /DSCALE command -->
+ <KEYWORD3>auto</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>user</KEYWORD3>
+
+ <!-- DSUM command -->
+ <KEYWORD3>disp</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+
+ <!-- DSYM command -->
+ <KEYWORD3>symm</KEYWORD3>
+ <KEYWORD3>asym</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+
+ <!-- DUMP command -->
+ <KEYWORD3>head</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- /DV3D command -->
+ <KEYWORD3>anim</KEYWORD3>
+ <KEYWORD3>dgen</KEYWORD3>
+ <KEYWORD3>dlist</KEYWORD3>
+
+ <!-- EDBOUND command -->
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>slide</KEYWORD3>
+ <KEYWORD3>cycl</KEYWORD3>
+
+ <!-- EDCDELE, EDCGEN commands -->
+ <KEYWORD3>ants</KEYWORD3>
+ <KEYWORD3>assc</KEYWORD3>
+ <KEYWORD3>asts</KEYWORD3>
+ <KEYWORD3>drawbead</KEYWORD3>
+ <KEYWORD3>ents</KEYWORD3>
+ <KEYWORD3>ess</KEYWORD3>
+ <KEYWORD3>ests</KEYWORD3>
+ <KEYWORD3>nts</KEYWORD3>
+ <KEYWORD3>osts</KEYWORD3>
+ <KEYWORD3>rntr</KEYWORD3>
+ <KEYWORD3>rotr</KEYWORD3>
+ <KEYWORD3>se</KEYWORD3>
+ <KEYWORD3>ss</KEYWORD3>
+ <KEYWORD3>sts</KEYWORD3>
+ <KEYWORD3>tdns</KEYWORD3>
+ <KEYWORD3>tdss</KEYWORD3>
+ <KEYWORD3>tnts</KEYWORD3>
+ <KEYWORD3>tsts</KEYWORD3>
+
+ <!-- EDCRB, EDCURVE, EDLCS commands -->
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+
+ <!-- EDCSC command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- EDDAMP command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- EDDRELAX command -->
+ <KEYWORD3>ansys</KEYWORD3>
+ <KEYWORD3>dyna</KEYWORD3>
+
+ <!-- EDELE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- EDENERGY, EDFPLOT commands -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- EDHIST, EDIVELO commands -->
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+
+ <!-- EDLDPLOT, EDLOAD command -->
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>fy</KEYWORD3>
+ <KEYWORD3>fz</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>my</KEYWORD3>
+ <KEYWORD3>mz</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>ax</KEYWORD3>
+ <KEYWORD3>ay</KEYWORD3>
+ <KEYWORD3>az</KEYWORD3>
+ <KEYWORD3>aclx</KEYWORD3>
+ <KEYWORD3>acly</KEYWORD3>
+ <KEYWORD3>aclz</KEYWORD3>
+ <KEYWORD3>omgx</KEYWORD3>
+ <KEYWORD3>omgy</KEYWORD3>
+ <KEYWORD3>omgz</KEYWORD3>
+ <KEYWORD3>press</KEYWORD3>
+ <KEYWORD3>rbux</KEYWORD3>
+ <KEYWORD3>rbuy</KEYWORD3>
+ <KEYWORD3>rbuz</KEYWORD3>
+ <KEYWORD3>rbrx</KEYWORD3>
+ <KEYWORD3>rbry</KEYWORD3>
+ <KEYWORD3>rbrz</KEYWORD3>
+ <KEYWORD3>rbvx</KEYWORD3>
+ <KEYWORD3>rbvy</KEYWORD3>
+ <KEYWORD3>rbvz</KEYWORD3>
+ <KEYWORD3>rbfx</KEYWORD3>
+ <KEYWORD3>rbfy</KEYWORD3>
+ <KEYWORD3>rbfz</KEYWORD3>
+ <KEYWORD3>rbmx</KEYWORD3>
+ <KEYWORD3>rbmy</KEYWORD3>
+ <KEYWORD3>rbmz</KEYWORD3>
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+
+ <!-- EDMP command -->
+ <KEYWORD3>hgls</KEYWORD3>
+ <KEYWORD3>rigid</KEYWORD3>
+ <KEYWORD3>cable</KEYWORD3>
+ <KEYWORD3>ortho</KEYWORD3>
+
+ <!-- EDNROT, EDOPT commands -->
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>ansys</KEYWORD3>
+ <KEYWORD3>taurus</KEYWORD3>
+ <KEYWORD3>both</KEYWORD3>
+
+ <!-- EDOUT, EDREAD commands -->
+ <KEYWORD3>glstat</KEYWORD3>
+ <KEYWORD3>bndout</KEYWORD3>
+ <KEYWORD3>rwforc</KEYWORD3>
+ <KEYWORD3>deforc</KEYWORD3>
+ <KEYWORD3>,matsum</KEYWORD3>
+ <KEYWORD3>ncforc</KEYWORD3>
+ <KEYWORD3>rcforc</KEYWORD3>
+ <KEYWORD3>defgeo</KEYWORD3>
+ <KEYWORD3>spcforc</KEYWORD3>
+ <KEYWORD3>swforc</KEYWORD3>
+ <KEYWORD3>rbdout</KEYWORD3>
+ <KEYWORD3>gceout</KEYWORD3>
+ <KEYWORD3>sleout</KEYWORD3>
+ <KEYWORD3>jntforc</KEYWORD3>
+ <KEYWORD3>nodout</KEYWORD3>
+ <KEYWORD3>elout</KEYWORD3>
+
+ <!-- EDWELD command -->
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+
+ <!-- EDWRITE command -->
+ <KEYWORD3>ansys</KEYWORD3>
+ <KEYWORD3>taurus</KEYWORD3>
+ <KEYWORD3>both</KEYWORD3>
+ <KEYWORD3>pcreate</KEYWORD3>
+ <KEYWORD3>pupdate</KEYWORD3>
+ <KEYWORD3>plist</KEYWORD3>
+
+ <!-- EKILL, ELIST commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- *ELSEIF command -->
+ <KEYWORD3>eq</KEYWORD3>
+ <KEYWORD3>ne</KEYWORD3>
+ <KEYWORD3>lt</KEYWORD3>
+ <KEYWORD3>gt</KEYWORD3>
+ <KEYWORD3>le</KEYWORD3>
+ <KEYWORD3>ge</KEYWORD3>
+ <KEYWORD3>ablt</KEYWORD3>
+ <KEYWORD3>abgt</KEYWORD3>
+
+ <!-- EMID command -->
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>remove</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>either</KEYWORD3>
+ <KEYWORD3>both</KEYWORD3>
+
+ <!-- EMODIF command -->
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>,real</KEYWORD3>
+ <KEYWORD3>,esys</KEYWORD3>
+ <KEYWORD3>secnum</KEYWORD3>
+
+ <!-- EMORE, EN commands -->
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- EMUNIT command -->
+ <KEYWORD3>mks</KEYWORD3>
+ <KEYWORD3>muzro</KEYWORD3>
+ <KEYWORD3>epzro</KEYWORD3>
+
+ <!-- ENGEN, ENORM, ENSYM commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- EQSLV command -->
+ <KEYWORD3>front</KEYWORD3>
+ <KEYWORD3>sparse</KEYWORD3>
+ <KEYWORD3>jcg</KEYWORD3>
+ <KEYWORD3>jcgout</KEYWORD3>
+ <KEYWORD3>iccg</KEYWORD3>
+ <KEYWORD3>pcg</KEYWORD3>
+ <KEYWORD3>pcgout</KEYWORD3>
+ <KEYWORD3>iter</KEYWORD3>
+
+ <!-- EREFINE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>smooth</KEYWORD3>
+ <KEYWORD3>clean</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- ERESX command -->
+ <KEYWORD3>defa</KEYWORD3>
+ <KEYWORD3>yes</KEYWORD3>
+ <KEYWORD3>no</KEYWORD3>
+
+ <!-- ERNORM command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- ESEL command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>inve</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>adj</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>ename</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>,real</KEYWORD3>
+ <KEYWORD3>,esys</KEYWORD3>
+ <KEYWORD3>live</KEYWORD3>
+ <KEYWORD3>layer</KEYWORD3>
+ <KEYWORD3>sec</KEYWORD3>
+ <KEYWORD3>pinc</KEYWORD3>
+ <KEYWORD3>pexc</KEYWORD3>
+ <KEYWORD3>sfe</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>hflux</KEYWORD3>
+ <KEYWORD3>fsi</KEYWORD3>
+ <KEYWORD3>impd</KEYWORD3>
+ <KEYWORD3>shld</KEYWORD3>
+ <KEYWORD3>mxwf</KEYWORD3>
+ <KEYWORD3>chrgs</KEYWORD3>
+ <KEYWORD3>inf</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>flue</KEYWORD3>
+ <KEYWORD3>hgen</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>mvdi</KEYWORD3>
+ <KEYWORD3>chrgd</KEYWORD3>
+ <KEYWORD3>etab</KEYWORD3>
+
+ <!-- ESLA, ESLL, ESLN, ESLV commands -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>active</KEYWORD3>
+ <KEYWORD3>inactive</KEYWORD3>
+ <KEYWORD3>corner</KEYWORD3>
+ <KEYWORD3>mid</KEYWORD3>
+
+ <!-- ESOL command -->
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>zx</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>cont</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>pene</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>sfric</KEYWORD3>
+ <KEYWORD3>stot</KEYWORD3>
+ <KEYWORD3>slide</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>vf</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>sene</KEYWORD3>
+ <KEYWORD3>kene</KEYWORD3>
+ <KEYWORD3>jheat</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>jt</KEYWORD3>
+ <KEYWORD3>mre</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+
+ <!-- ESORT command -->
+ <KEYWORD3>etab</KEYWORD3>
+
+ <!-- ESURF command -->
+ <KEYWORD3>top</KEYWORD3>
+ <KEYWORD3>bottom</KEYWORD3>
+ <KEYWORD3>reverse</KEYWORD3>
+ <KEYWORD3>tri</KEYWORD3>
+
+ <!-- ESYM command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- ETABLE command -->
+ <KEYWORD3>refl</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>eras</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>sp01</KEYWORD3>
+ <KEYWORD3>sp02</KEYWORD3>
+ <KEYWORD3>sp03</KEYWORD3>
+ <KEYWORD3>sp04</KEYWORD3>
+ <KEYWORD3>sp05</KEYWORD3>
+ <KEYWORD3>sp06</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+ <KEYWORD3>lmd1</KEYWORD3>
+ <KEYWORD3>lmd2</KEYWORD3>
+ <KEYWORD3>lmd3</KEYWORD3>
+ <KEYWORD3>lmd4</KEYWORD3>
+ <KEYWORD3>lmd5</KEYWORD3>
+ <KEYWORD3>lmd6</KEYWORD3>
+ <KEYWORD3>emd1</KEYWORD3>
+ <KEYWORD3>emd2</KEYWORD3>
+ <KEYWORD3>emd3</KEYWORD3>
+ <KEYWORD3>emd4</KEYWORD3>
+ <KEYWORD3>emd5</KEYWORD3>
+ <KEYWORD3>emd6</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>zx</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>serr</KEYWORD3>
+ <KEYWORD3>sdsg</KEYWORD3>
+ <KEYWORD3>terr</KEYWORD3>
+ <KEYWORD3>tdsg</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>vf</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>sene</KEYWORD3>
+ <KEYWORD3>aene</KEYWORD3>
+ <KEYWORD3>tene</KEYWORD3>
+ <KEYWORD3>kene</KEYWORD3>
+ <KEYWORD3>jheat</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>jt</KEYWORD3>
+ <KEYWORD3>mre</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>cent</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>smisc</KEYWORD3>
+ <KEYWORD3>nmisc</KEYWORD3>
+ <KEYWORD3>surf</KEYWORD3>
+ <KEYWORD3>cont</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>pene</KEYWORD3>
+ <KEYWORD3>sfric</KEYWORD3>
+ <KEYWORD3>stot</KEYWORD3>
+ <KEYWORD3>slide</KEYWORD3>
+ <KEYWORD3>gap</KEYWORD3>
+ <KEYWORD3>topo</KEYWORD3>
+
+ <!-- ETCHG command -->
+ <KEYWORD3>eti</KEYWORD3>
+ <KEYWORD3>ite</KEYWORD3>
+ <KEYWORD3>tts</KEYWORD3>
+ <KEYWORD3>stt</KEYWORD3>
+ <KEYWORD3>mtt</KEYWORD3>
+ <KEYWORD3>fts</KEYWORD3>
+ <KEYWORD3>ets</KEYWORD3>
+
+ <!-- ETDELE, ETLIST commands -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- EWRITE command -->
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD3>long1</KEYWORD3>
+
+ <!-- /EXIT command -->
+ <KEYWORD3>model</KEYWORD3>
+ <KEYWORD3>solu</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>nosave</KEYWORD3>
+
+ <!-- /EXPAND command -->
+ <KEYWORD3>rect</KEYWORD3>
+ <KEYWORD3>polar</KEYWORD3>
+ <KEYWORD3>modal</KEYWORD3>
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>half</KEYWORD3>
+
+ <!-- EXPASS command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- EXPSOL command -->
+ <KEYWORD3>yes</KEYWORD3>
+ <KEYWORD3>no</KEYWORD3>
+
+ <!-- EXTOPT command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>attr</KEYWORD3>
+ <KEYWORD3>esize</KEYWORD3>
+ <KEYWORD3>aclear</KEYWORD3>
+
+ <!-- F, FDELE, FK, FKDELE commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>fy</KEYWORD3>
+ <KEYWORD3>fz</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>my</KEYWORD3>
+ <KEYWORD3>mz</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>chrg</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>csgx</KEYWORD3>
+ <KEYWORD3>csgy</KEYWORD3>
+ <KEYWORD3>csgz</KEYWORD3>
+
+ <!-- /FACET command -->
+ <KEYWORD3>fine</KEYWORD3>
+ <KEYWORD3>norml</KEYWORD3>
+ <KEYWORD3>wire</KEYWORD3>
+
+ <!-- FCUM command -->
+ <KEYWORD3>repl</KEYWORD3>
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>igno</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+
+ <!-- /FDELE command -->
+ <KEYWORD3>emat</KEYWORD3>
+ <KEYWORD3>esav</KEYWORD3>
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>sub</KEYWORD3>
+ <KEYWORD3>mode</KEYWORD3>
+ <KEYWORD3>tri</KEYWORD3>
+ <KEYWORD3>dsub</KEYWORD3>
+ <KEYWORD3>usub</KEYWORD3>
+ <KEYWORD3>osav</KEYWORD3>
+ <KEYWORD3>seld</KEYWORD3>
+ <KEYWORD3>keep</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+
+ <!-- FELIST command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- FILL command -->
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- FLDATA1 command -->
+ <KEYWORD3>solu</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>turb</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>swrl</KEYWORD3>
+ <KEYWORD3>tran</KEYWORD3>
+ <KEYWORD3>spec</KEYWORD3>
+ <KEYWORD3>true</KEYWORD3>
+ <KEYWORD3>t</KEYWORD3>
+ <KEYWORD3>false</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+
+ <!-- FLDATA2 command -->
+ <KEYWORD3>iter</KEYWORD3>
+ <KEYWORD3>exec</KEYWORD3>
+ <KEYWORD3>appe</KEYWORD3>
+ <KEYWORD3>over</KEYWORD3>
+
+ <!-- FLDATA3 command -->
+ <KEYWORD3>term</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+
+ <!-- FLDATA4 command -->
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>step</KEYWORD3>
+ <KEYWORD3>istep</KEYWORD3>
+ <KEYWORD3>bc</KEYWORD3>
+ <KEYWORD3>numb</KEYWORD3>
+ <KEYWORD3>glob</KEYWORD3>
+ <KEYWORD3>tend</KEYWORD3>
+ <KEYWORD3>appe</KEYWORD3>
+ <KEYWORD3>sumf</KEYWORD3>
+ <KEYWORD3>over</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+
+ <!-- FLDATA4A command -->
+ <KEYWORD3>step</KEYWORD3>
+ <KEYWORD3>appe</KEYWORD3>
+ <KEYWORD3>sumf</KEYWORD3>
+ <KEYWORD3>over</KEYWORD3>
+
+ <!-- FLDATA5 command -->
+ <KEYWORD3>outp</KEYWORD3>
+ <KEYWORD3>sumf</KEYWORD3>
+ <KEYWORD3>debg</KEYWORD3>
+ <KEYWORD3>resi</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+ <KEYWORD3>lmd</KEYWORD3>
+ <KEYWORD3>emd</KEYWORD3>
+
+ <!-- FLDATA6 command -->
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>outp</KEYWORD3>
+ <KEYWORD3>iter</KEYWORD3>
+ <KEYWORD3>land</KEYWORD3>
+ <KEYWORD3>bloc</KEYWORD3>
+ <KEYWORD3>bnow</KEYWORD3>
+
+ <!-- FLDATA7 command -->
+ <KEYWORD3>prot</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>constant</KEYWORD3>
+ <KEYWORD3>liquid</KEYWORD3>
+ <KEYWORD3>table</KEYWORD3>
+ <KEYWORD3>powl</KEYWORD3>
+ <KEYWORD3>carr</KEYWORD3>
+ <KEYWORD3>bing</KEYWORD3>
+ <KEYWORD3>usrv</KEYWORD3>
+ <KEYWORD3>air</KEYWORD3>
+ <KEYWORD3>air_b</KEYWORD3>
+ <KEYWORD3>air-si</KEYWORD3>
+ <KEYWORD3>air-si_b</KEYWORD3>
+ <KEYWORD3>air-cm</KEYWORD3>
+ <KEYWORD3>air-cm_b</KEYWORD3>
+ <KEYWORD3>air-mm</KEYWORD3>
+ <KEYWORD3>air-mm_b</KEYWORD3>
+ <KEYWORD3>air-ft</KEYWORD3>
+ <KEYWORD3>air-ft_b</KEYWORD3>
+ <KEYWORD3>air-in</KEYWORD3>
+ <KEYWORD3>air-in_b</KEYWORD3>
+ <KEYWORD3>cmix</KEYWORD3>
+ <KEYWORD3>user</KEYWORD3>
+
+ <!-- FLDATA8 command -->
+ <KEYWORD3>nomi</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+
+ <!-- FLDATA9 command -->
+ <KEYWORD3>cof1</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+
+ <!-- FLDATA10 command -->
+ <KEYWORD3>cof2</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+
+ <!-- FLDATA11 command -->
+ <KEYWORD3>cof3</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+
+ <!-- FLDATA12 command -->
+ <KEYWORD3>prop</KEYWORD3>
+ <KEYWORD3>ivis</KEYWORD3>
+ <KEYWORD3>ufrq</KEYWORD3>
+
+ <!-- FLDATA13 command -->
+ <KEYWORD3>vary</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>t</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+
+ <!-- FLDATA14 command -->
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>nomi</KEYWORD3>
+ <KEYWORD3>bulk</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+
+ <!-- FLDATA15 command -->
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>refe</KEYWORD3>
+
+ <!-- FLDATA16 command -->
+ <KEYWORD3>bulk</KEYWORD3>
+ <KEYWORD3>beta</KEYWORD3>
+
+ <!-- FLDATA17 command -->
+ <KEYWORD3>gamm</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+
+ <!-- FLDATA18 command -->
+ <KEYWORD3>meth</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+
+ <!-- FLDATA19 command -->
+ <KEYWORD3>tdma</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+
+ <!-- FLDATA20 command -->
+ <KEYWORD3>srch</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+
+ <!-- FLDATA20A command -->
+ <KEYWORD3>pgmr</KEYWORD3>
+ <KEYWORD3>fill</KEYWORD3>
+ <KEYWORD3>modp</KEYWORD3>
+
+ <!-- FLDATA21 command -->
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+
+ <!-- FLDATA22 command -->
+ <KEYWORD3>maxi</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+
+ <!-- FLDATA23 command -->
+ <KEYWORD3>delt</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+
+ <!-- FLDATA24 command -->
+ <KEYWORD3>turb</KEYWORD3>
+ <KEYWORD3>modl</KEYWORD3>
+ <KEYWORD3>rati</KEYWORD3>
+ <KEYWORD3>inin</KEYWORD3>
+ <KEYWORD3>insf</KEYWORD3>
+ <KEYWORD3>sctk</KEYWORD3>
+ <KEYWORD3>sctd</KEYWORD3>
+ <KEYWORD3>cmu</KEYWORD3>
+ <KEYWORD3>c1</KEYWORD3>
+ <KEYWORD3>c2</KEYWORD3>
+ <KEYWORD3>buc3</KEYWORD3>
+ <KEYWORD3>buc4</KEYWORD3>
+ <KEYWORD3>beta</KEYWORD3>
+ <KEYWORD3>kapp</KEYWORD3>
+ <KEYWORD3>ewll</KEYWORD3>
+ <KEYWORD3>wall</KEYWORD3>
+ <KEYWORD3>vand</KEYWORD3>
+ <KEYWORD3>tran</KEYWORD3>
+ <KEYWORD3>zels</KEYWORD3>
+
+ <!-- FLDATA24A command -->
+ <KEYWORD3>rngt</KEYWORD3>
+ <KEYWORD3>sctk</KEYWORD3>
+ <KEYWORD3>sctd</KEYWORD3>
+ <KEYWORD3>cmu</KEYWORD3>
+ <KEYWORD3>c1</KEYWORD3>
+ <KEYWORD3>c2</KEYWORD3>
+ <KEYWORD3>beta</KEYWORD3>
+ <KEYWORD3>etai</KEYWORD3>
+
+ <!-- FLDATA24B command -->
+ <KEYWORD3>nket</KEYWORD3>
+ <KEYWORD3>sctk</KEYWORD3>
+ <KEYWORD3>sctd</KEYWORD3>
+ <KEYWORD3>c2</KEYWORD3>
+ <KEYWORD3>c1mx</KEYWORD3>
+
+ <!-- FLDATA24C command -->
+ <KEYWORD3>girt</KEYWORD3>
+ <KEYWORD3>sctk</KEYWORD3>
+ <KEYWORD3>sctd</KEYWORD3>
+ <KEYWORD3>g0</KEYWORD3>
+ <KEYWORD3>g1</KEYWORD3>
+ <KEYWORD3>g2</KEYWORD3>
+ <KEYWORD3>g3</KEYWORD3>
+ <KEYWORD3>g4</KEYWORD3>
+
+ <!-- FLDATA24D command -->
+ <KEYWORD3>szlt</KEYWORD3>
+ <KEYWORD3>sctk</KEYWORD3>
+ <KEYWORD3>sctd</KEYWORD3>
+ <KEYWORD3>szl1</KEYWORD3>
+ <KEYWORD3>szl2</KEYWORD3>
+ <KEYWORD3>szl3</KEYWORD3>
+
+ <!-- FLDATA25 command -->
+ <KEYWORD3>relx</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+
+ <!-- FLDATA26 command -->
+ <KEYWORD3>stab</KEYWORD3>
+ <KEYWORD3>turb</KEYWORD3>
+ <KEYWORD3>mome</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+
+ <!-- FLDATA27 command -->
+ <KEYWORD3>prin</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+
+ <!-- FLDATA28 command -->
+ <KEYWORD3>modr</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>t</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+
+ <!-- FLDATA29 command -->
+ <KEYWORD3>modv</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>sp01</KEYWORD3>
+ <KEYWORD3>sp02</KEYWORD3>
+ <KEYWORD3>sp03</KEYWORD3>
+ <KEYWORD3>sp04</KEYWORD3>
+ <KEYWORD3>sp05</KEYWORD3>
+ <KEYWORD3>sp06</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>lmd</KEYWORD3>
+ <KEYWORD3>emd</KEYWORD3>
+
+ <!-- FLDATA30 command -->
+ <KEYWORD3>quad</KEYWORD3>
+ <KEYWORD3>momd</KEYWORD3>
+ <KEYWORD3>moms</KEYWORD3>
+ <KEYWORD3>prsd</KEYWORD3>
+ <KEYWORD3>prss</KEYWORD3>
+ <KEYWORD3>thrd</KEYWORD3>
+ <KEYWORD3>thrs</KEYWORD3>
+ <KEYWORD3>trbd</KEYWORD3>
+ <KEYWORD3>trbs</KEYWORD3>
+
+ <!-- FLDATA31 command -->
+ <KEYWORD3>capp</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>umin</KEYWORD3>
+ <KEYWORD3>umax</KEYWORD3>
+ <KEYWORD3>vmin</KEYWORD3>
+ <KEYWORD3>vmax</KEYWORD3>
+ <KEYWORD3>wmin</KEYWORD3>
+ <KEYWORD3>wmax</KEYWORD3>
+ <KEYWORD3>tmin</KEYWORD3>
+ <KEYWORD3>tmax</KEYWORD3>
+ <KEYWORD3>pmin</KEYWORD3>
+ <KEYWORD3>pmax</KEYWORD3>
+
+ <!-- FLDATA32 command -->
+ <KEYWORD3>rest</KEYWORD3>
+ <KEYWORD3>nset</KEYWORD3>
+ <KEYWORD3>iter</KEYWORD3>
+ <KEYWORD3>lstp</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>rfil</KEYWORD3>
+ <KEYWORD3>wfil</KEYWORD3>
+ <KEYWORD3>over</KEYWORD3>
+ <KEYWORD3>clear</KEYWORD3>
+
+ <!-- FLDATA33 command -->
+ <KEYWORD3>advm</KEYWORD3>
+ <KEYWORD3>mome</KEYWORD3>
+ <KEYWORD3>turb</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>msu</KEYWORD3>
+ <KEYWORD3>supg</KEYWORD3>
+
+ <!-- FLIST command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- FLLIST command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- FLST command -->
+ <KEYWORD3>noor</KEYWORD3>
+ <KEYWORD3>order</KEYWORD3>
+
+ <!-- /FOCUS command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>auto</KEYWORD3>
+ <KEYWORD3>user</KEYWORD3>
+
+ <!-- FORCE command -->
+ <KEYWORD3>total</KEYWORD3>
+ <KEYWORD3>static</KEYWORD3>
+ <KEYWORD3>damp</KEYWORD3>
+ <KEYWORD3>inert</KEYWORD3>
+
+ <!-- FORM command -->
+ <KEYWORD3>reco</KEYWORD3>
+ <KEYWORD3>ten</KEYWORD3>
+ <KEYWORD3>long</KEYWORD3>
+
+ <!-- /FORMAT command -->
+ <KEYWORD3>g</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>e</KEYWORD3>
+
+ <!-- FP command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- FSLIST command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- FSUM command -->
+ <KEYWORD3>rsys</KEYWORD3>
+
+ <!-- /FTYPE command -->
+ <KEYWORD3>emat</KEYWORD3>
+ <KEYWORD3>esav</KEYWORD3>
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>redm</KEYWORD3>
+ <KEYWORD3>sub</KEYWORD3>
+ <KEYWORD3>mode</KEYWORD3>
+ <KEYWORD3>tri</KEYWORD3>
+ <KEYWORD3>dsub</KEYWORD3>
+ <KEYWORD3>usub</KEYWORD3>
+ <KEYWORD3>erot</KEYWORD3>
+ <KEYWORD3>osav</KEYWORD3>
+ <KEYWORD3>seld</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>ext</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+
+ <!-- GAPLIST command -->
+ <KEYWORD3>open</KEYWORD3>
+ <KEYWORD3>closed</KEYWORD3>
+
+ <!-- GAPMERGE command -->
+ <KEYWORD3>toler</KEYWORD3>
+ <KEYWORD3>iter</KEYWORD3>
+
+ <!-- GAPOPT command -->
+ <KEYWORD3>toler</KEYWORD3>
+ <KEYWORD3>oesele</KEYWORD3>
+ <KEYWORD3>merge</KEYWORD3>
+ <KEYWORD3>remain</KEYWORD3>
+
+ <!-- GAPPLOT command -->
+ <KEYWORD3>open</KEYWORD3>
+ <KEYWORD3>closed</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- GAUGE command -->
+ <KEYWORD3>tree</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- GCGEN command -->
+ <KEYWORD3>tri</KEYWORD3>
+ <KEYWORD3>bot</KEYWORD3>
+
+ <!-- /GCMD command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- *GET command -->
+ <KEYWORD3>active</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>imme</KEYWORD3>
+ <KEYWORD3>menu</KEYWORD3>
+ <KEYWORD3>prkey</KEYWORD3>
+ <KEYWORD3>units</KEYWORD3>
+ <KEYWORD3>rout</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>wall</KEYWORD3>
+ <KEYWORD3>cpu</KEYWORD3>
+ <KEYWORD3>dbase</KEYWORD3>
+ <KEYWORD3>ldate</KEYWORD3>
+ <KEYWORD3>dbase</KEYWORD3>
+ <KEYWORD3>ltime</KEYWORD3>
+ <KEYWORD3>rev</KEYWORD3>
+ <KEYWORD3>title</KEYWORD3>
+ <KEYWORD3>jobnam</KEYWORD3>
+
+ <KEYWORD3>parm</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>basic</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>dim</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+
+ <KEYWORD3>cmd</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>nargs</KEYWORD3>
+ <KEYWORD3>field</KEYWORD3>
+
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>ncomp</KEYWORD3>
+ <KEYWORD3>name</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>nscomp</KEYWORD3>
+ <KEYWORD3>sname</KEYWORD3>
+
+ <KEYWORD3>graph</KEYWORD3>
+ <KEYWORD3>active</KEYWORD3>
+ <KEYWORD3>angle</KEYWORD3>
+ <KEYWORD3>contour</KEYWORD3>
+ <KEYWORD3>dist</KEYWORD3>
+ <KEYWORD3>dscale</KEYWORD3>
+ <KEYWORD3>dmult</KEYWORD3>
+ <KEYWORD3>edge</KEYWORD3>
+ <KEYWORD3>focus</KEYWORD3>
+ <KEYWORD3>gline</KEYWORD3>
+ <KEYWORD3>mode</KEYWORD3>
+ <KEYWORD3>normal</KEYWORD3>
+ <KEYWORD3>range</KEYWORD3>
+ <KEYWORD3>xmin</KEYWORD3>
+ <KEYWORD3>ymin</KEYWORD3>
+ <KEYWORD3>xmax</KEYWORD3>
+ <KEYWORD3>ymax</KEYWORD3>
+ <KEYWORD3>ratio</KEYWORD3>
+ <KEYWORD3>sscale</KEYWORD3>
+ <KEYWORD3>smult</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>vcone</KEYWORD3>
+ <KEYWORD3>view</KEYWORD3>
+ <KEYWORD3>vscale</KEYWORD3>
+ <KEYWORD3>vratio</KEYWORD3>
+ <KEYWORD3>display</KEYWORD3>
+ <KEYWORD3>erase</KEYWORD3>
+ <KEYWORD3>ndist</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>plopts</KEYWORD3>
+ <KEYWORD3>seg</KEYWORD3>
+ <KEYWORD3>shrink</KEYWORD3>
+
+ <KEYWORD3>active</KEYWORD3>
+ <KEYWORD3>,csys</KEYWORD3>
+ <KEYWORD3>,dsys</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>,real</KEYWORD3>
+ <KEYWORD3>,esys</KEYWORD3>
+ <KEYWORD3>,cp</KEYWORD3>
+ <KEYWORD3>,ce</KEYWORD3>
+ <KEYWORD3>wfront</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>rms</KEYWORD3>
+
+ <KEYWORD3>cdsy</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>ang</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>zx</KEYWORD3>
+ <KEYWORD3>attr</KEYWORD3>
+
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>,nsel</KEYWORD3>
+ <KEYWORD3>nxth</KEYWORD3>
+ <KEYWORD3>nxtl</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>csgx</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>ax</KEYWORD3>
+ <KEYWORD3>hgen</KEYWORD3>
+ <KEYWORD3>num</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>min</KEYWORD3>
+ <KEYWORD3>count</KEYWORD3>
+ <KEYWORD3>mxloc</KEYWORD3>
+ <KEYWORD3>mnloc</KEYWORD3>
+
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>cent</KEYWORD3>
+ <KEYWORD3>adj</KEYWORD3>
+ <KEYWORD3>attr</KEYWORD3>
+ <KEYWORD3>leng</KEYWORD3>
+ <KEYWORD3>lproj</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>aproj</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>,esel</KEYWORD3>
+ <KEYWORD3>nxth</KEYWORD3>
+ <KEYWORD3>nxtl</KEYWORD3>
+ <KEYWORD3>hgen</KEYWORD3>
+ <KEYWORD3>hcoe</KEYWORD3>
+ <KEYWORD3>tbulk</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>shpar</KEYWORD3>
+ <KEYWORD3>angd</KEYWORD3>
+ <KEYWORD3>aspe</KEYWORD3>
+ <KEYWORD3>jacr</KEYWORD3>
+ <KEYWORD3>maxa</KEYWORD3>
+ <KEYWORD3>para</KEYWORD3>
+ <KEYWORD3>warp</KEYWORD3>
+ <KEYWORD3>num</KEYWORD3>
+ <KEYWORD3>,ksel</KEYWORD3>
+ <KEYWORD3>nxth</KEYWORD3>
+ <KEYWORD3>nxtl</KEYWORD3>
+ <KEYWORD3>div</KEYWORD3>
+
+ <KEYWORD3>kp</KEYWORD3>
+ <KEYWORD3>ior</KEYWORD3>
+ <KEYWORD3>imc</KEYWORD3>
+ <KEYWORD3>irp</KEYWORD3>
+ <KEYWORD3>ixv</KEYWORD3>
+ <KEYWORD3>iyv</KEYWORD3>
+ <KEYWORD3>izv</KEYWORD3>
+ <KEYWORD3>nrelm</KEYWORD3>
+
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>,lsel</KEYWORD3>
+
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>,asel</KEYWORD3>
+ <KEYWORD3>loop</KEYWORD3>
+
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>,vsel</KEYWORD3>
+ <KEYWORD3>shell</KEYWORD3>
+
+ <KEYWORD3>etyp</KEYWORD3>
+
+ <KEYWORD3>rcon</KEYWORD3>
+
+ <KEYWORD3>ex</KEYWORD3>
+ <KEYWORD3>alpx</KEYWORD3>
+ <KEYWORD3>reft</KEYWORD3>
+ <KEYWORD3>prxy</KEYWORD3>
+ <KEYWORD3>nuxy</KEYWORD3>
+ <KEYWORD3>gxy</KEYWORD3>
+ <KEYWORD3>damp</KEYWORD3>
+ <KEYWORD3>mu</KEYWORD3>
+ <KEYWORD3>dnes</KEYWORD3>
+ <KEYWORD3>c</KEYWORD3>
+ <KEYWORD3>enth</KEYWORD3>
+ <KEYWORD3>kxx</KEYWORD3>
+ <KEYWORD3>hf</KEYWORD3>
+ <KEYWORD3>emis</KEYWORD3>
+ <KEYWORD3>qrate</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>sonc</KEYWORD3>
+ <KEYWORD3>rsvx</KEYWORD3>
+ <KEYWORD3>perx</KEYWORD3>
+ <KEYWORD3>murx</KEYWORD3>
+ <KEYWORD3>mgxx</KEYWORD3>
+ <KEYWORD3>lsst</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+
+ <KEYWORD3>fldata</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>turb</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>swrl</KEYWORD3>
+ <KEYWORD3>tran</KEYWORD3>
+ <KEYWORD3>spec</KEYWORD3>
+ <KEYWORD3>exec</KEYWORD3>
+ <KEYWORD3>appe</KEYWORD3>
+ <KEYWORD3>over</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>step</KEYWORD3>
+ <KEYWORD3>istep</KEYWORD3>
+ <KEYWORD3>bc</KEYWORD3>
+ <KEYWORD3>numb</KEYWORD3>
+ <KEYWORD3>glob</KEYWORD3>
+ <KEYWORD3>tend</KEYWORD3>
+ <KEYWORD3>appe</KEYWORD3>
+ <KEYWORD3>sumf</KEYWORD3>
+ <KEYWORD3>over</KEYWORD3>
+ <KEYWORD3>sumf</KEYWORD3>
+ <KEYWORD3>debg</KEYWORD3>
+ <KEYWORD3>resi</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+ <KEYWORD3>lmd</KEYWORD3>
+ <KEYWORD3>emd</KEYWORD3>
+ <KEYWORD3>outp</KEYWORD3>
+ <KEYWORD3>iter</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>ivis</KEYWORD3>
+ <KEYWORD3>ufrq</KEYWORD3>
+ <KEYWORD3>nomi</KEYWORD3>
+ <KEYWORD3>bulk</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>refe</KEYWORD3>
+ <KEYWORD3>beta</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>fill</KEYWORD3>
+ <KEYWORD3>modp</KEYWORD3>
+ <KEYWORD3>modl</KEYWORD3>
+ <KEYWORD3>rati</KEYWORD3>
+ <KEYWORD3>inin</KEYWORD3>
+ <KEYWORD3>insf</KEYWORD3>
+ <KEYWORD3>sctk</KEYWORD3>
+ <KEYWORD3>sctd</KEYWORD3>
+ <KEYWORD3>cmu</KEYWORD3>
+ <KEYWORD3>c1</KEYWORD3>
+ <KEYWORD3>c2</KEYWORD3>
+ <KEYWORD3>buc3</KEYWORD3>
+ <KEYWORD3>buc4</KEYWORD3>
+ <KEYWORD3>beta</KEYWORD3>
+ <KEYWORD3>kapp</KEYWORD3>
+ <KEYWORD3>ewll</KEYWORD3>
+ <KEYWORD3>wall</KEYWORD3>
+ <KEYWORD3>vand</KEYWORD3>
+ <KEYWORD3>tran</KEYWORD3>
+ <KEYWORD3>zels</KEYWORD3>
+ <KEYWORD3>sctk</KEYWORD3>
+ <KEYWORD3>sctd</KEYWORD3>
+ <KEYWORD3>cmu</KEYWORD3>
+ <KEYWORD3>c1</KEYWORD3>
+ <KEYWORD3>c2</KEYWORD3>
+ <KEYWORD3>etai</KEYWORD3>
+ <KEYWORD3>c1mx</KEYWORD3>
+ <KEYWORD3>g0</KEYWORD3>
+ <KEYWORD3>g1</KEYWORD3>
+ <KEYWORD3>g2</KEYWORD3>
+ <KEYWORD3>g3</KEYWORD3>
+ <KEYWORD3>g4</KEYWORD3>
+ <KEYWORD3>szl1</KEYWORD3>
+ <KEYWORD3>szl2</KEYWORD3>
+ <KEYWORD3>szl3</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>mome</KEYWORD3>
+ <KEYWORD3>sp01</KEYWORD3>
+ <KEYWORD3>sp02</KEYWORD3>
+ <KEYWORD3>sp03</KEYWORD3>
+ <KEYWORD3>sp04</KEYWORD3>
+ <KEYWORD3>sp05</KEYWORD3>
+ <KEYWORD3>sp06</KEYWORD3>
+ <KEYWORD3>momd</KEYWORD3>
+ <KEYWORD3>moms</KEYWORD3>
+ <KEYWORD3>prsd</KEYWORD3>
+ <KEYWORD3>prss</KEYWORD3>
+ <KEYWORD3>thrd</KEYWORD3>
+ <KEYWORD3>thrs</KEYWORD3>
+ <KEYWORD3>trbd</KEYWORD3>
+ <KEYWORD3>trbs</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>umin</KEYWORD3>
+ <KEYWORD3>umax</KEYWORD3>
+ <KEYWORD3>vmin</KEYWORD3>
+ <KEYWORD3>vmax</KEYWORD3>
+ <KEYWORD3>wmin</KEYWORD3>
+ <KEYWORD3>wmax</KEYWORD3>
+ <KEYWORD3>tmin</KEYWORD3>
+ <KEYWORD3>tmax</KEYWORD3>
+ <KEYWORD3>pmin</KEYWORD3>
+ <KEYWORD3>pmax</KEYWORD3>
+ <KEYWORD3>nset</KEYWORD3>
+ <KEYWORD3>iter</KEYWORD3>
+ <KEYWORD3>lstp</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>rfil</KEYWORD3>
+ <KEYWORD3>wfil</KEYWORD3>
+ <KEYWORD3>over</KEYWORD3>
+ <KEYWORD3>clear</KEYWORD3>
+
+ <KEYWORD3>msdata</KEYWORD3>
+ <KEYWORD3>spec</KEYWORD3>
+ <KEYWORD3>ugas</KEYWORD3>
+
+ <KEYWORD3>msprop</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>mdif</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>nomi</KEYWORD3>
+ <KEYWORD3>cof1</KEYWORD3>
+ <KEYWORD3>cof2</KEYWORD3>
+ <KEYWORD3>cof3</KEYWORD3>
+
+ <KEYWORD3>msspec</KEYWORD3>
+ <KEYWORD3>name</KEYWORD3>
+ <KEYWORD3>molw</KEYWORD3>
+ <KEYWORD3>schm</KEYWORD3>
+
+ <KEYWORD3>msrelax</KEYWORD3>
+ <KEYWORD3>conc</KEYWORD3>
+ <KEYWORD3>emdi</KEYWORD3>
+ <KEYWORD3>stab</KEYWORD3>
+
+ <KEYWORD3>mssolu</KEYWORD3>
+ <KEYWORD3>nswe</KEYWORD3>
+ <KEYWORD3>maxi</KEYWORD3>
+ <KEYWORD3>nsrc</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>delt</KEYWORD3>
+
+ <KEYWORD3>msmeth</KEYWORD3>
+
+ <KEYWORD3>mscap</KEYWORD3>
+ <KEYWORD3>key</KEYWORD3>
+ <KEYWORD3>upp</KEYWORD3>
+ <KEYWORD3>low</KEYWORD3>
+
+ <KEYWORD3>msvary</KEYWORD3>
+
+ <KEYWORD3>msnomf</KEYWORD3>
+
+ <KEYWORD3>active</KEYWORD3>
+ <KEYWORD3>anty</KEYWORD3>
+ <KEYWORD3>solu</KEYWORD3>
+ <KEYWORD3>dtime</KEYWORD3>
+ <KEYWORD3>ncmls</KEYWORD3>
+ <KEYWORD3>ncmss</KEYWORD3>
+ <KEYWORD3>eqit</KEYWORD3>
+ <KEYWORD3>ncmit</KEYWORD3>
+ <KEYWORD3>cnvg</KEYWORD3>
+ <KEYWORD3>mxdvl</KEYWORD3>
+ <KEYWORD3>resfrq</KEYWORD3>
+ <KEYWORD3>reseig</KEYWORD3>
+ <KEYWORD3>dsprm</KEYWORD3>
+ <KEYWORD3>focv</KEYWORD3>
+ <KEYWORD3>mocv</KEYWORD3>
+ <KEYWORD3>hfcv</KEYWORD3>
+ <KEYWORD3>mfcv</KEYWORD3>
+ <KEYWORD3>cscv</KEYWORD3>
+ <KEYWORD3>cucv</KEYWORD3>
+ <KEYWORD3>ffcv</KEYWORD3>
+ <KEYWORD3>dicv</KEYWORD3>
+ <KEYWORD3>rocv</KEYWORD3>
+ <KEYWORD3>tecv</KEYWORD3>
+ <KEYWORD3>vmcv</KEYWORD3>
+ <KEYWORD3>smcv</KEYWORD3>
+ <KEYWORD3>vocv</KEYWORD3>
+ <KEYWORD3>prcv</KEYWORD3>
+ <KEYWORD3>vecv</KEYWORD3>
+ <KEYWORD3>nc48</KEYWORD3>
+ <KEYWORD3>nc49</KEYWORD3>
+ <KEYWORD3>crprat</KEYWORD3>
+ <KEYWORD3>psinc</KEYWORD3>
+
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>mtot</KEYWORD3>
+ <KEYWORD3>mc</KEYWORD3>
+ <KEYWORD3>ior</KEYWORD3>
+ <KEYWORD3>imc</KEYWORD3>
+ <KEYWORD3>fmc</KEYWORD3>
+ <KEYWORD3>mmor</KEYWORD3>
+ <KEYWORD3>mmmc</KEYWORD3>
+
+ <KEYWORD3>mode</KEYWORD3>
+ <KEYWORD3>freq</KEYWORD3>
+ <KEYWORD3>pfact</KEYWORD3>
+ <KEYWORD3>mcoef</KEYWORD3>
+ <KEYWORD3>damp</KEYWORD3>
+
+ <KEYWORD3>active</KEYWORD3>
+ <KEYWORD3>,set</KEYWORD3>
+ <KEYWORD3>lstp</KEYWORD3>
+ <KEYWORD3>sbst</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>rsys</KEYWORD3>
+
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>ntemp</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>rf</KEYWORD3>
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>fy</KEYWORD3>
+ <KEYWORD3>fz</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>my</KEYWORD3>
+ <KEYWORD3>mz</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>hs</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>conc</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>cmuv</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>serr</KEYWORD3>
+ <KEYWORD3>sdsg</KEYWORD3>
+ <KEYWORD3>terr</KEYWORD3>
+ <KEYWORD3>tdsg</KEYWORD3>
+ <KEYWORD3>sene</KEYWORD3>
+ <KEYWORD3>tene</KEYWORD3>
+ <KEYWORD3>kene</KEYWORD3>
+ <KEYWORD3>jheat</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>etab</KEYWORD3>
+ <KEYWORD3>smisc</KEYWORD3>
+ <KEYWORD3>nmisc</KEYWORD3>
+
+ <KEYWORD3>etab</KEYWORD3>
+ <KEYWORD3>ncol</KEYWORD3>
+ <KEYWORD3>nleng</KEYWORD3>
+
+ <KEYWORD3>sort</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>min</KEYWORD3>
+ <KEYWORD3>imax</KEYWORD3>
+ <KEYWORD3>imin</KEYWORD3>
+
+ <KEYWORD3>ssum</KEYWORD3>
+ <KEYWORD3>item</KEYWORD3>
+
+ <KEYWORD3>fsum</KEYWORD3>
+
+ <KEYWORD3>path</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>nval</KEYWORD3>
+
+ <KEYWORD3>kcalc</KEYWORD3>
+ <KEYWORD3>k</KEYWORD3>
+
+ <KEYWORD3>intsrf</KEYWORD3>
+
+ <KEYWORD3>plnsol</KEYWORD3>
+ <KEYWORD3>bmax</KEYWORD3>
+ <KEYWORD3>bmin</KEYWORD3>
+
+ <KEYWORD3>prerr</KEYWORD3>
+ <KEYWORD3>sepc</KEYWORD3>
+ <KEYWORD3>tepc</KEYWORD3>
+ <KEYWORD3>sersm</KEYWORD3>
+ <KEYWORD3>tersm</KEYWORD3>
+ <KEYWORD3>sensm</KEYWORD3>
+ <KEYWORD3>tensm</KEYWORD3>
+
+ <KEYWORD3>section</KEYWORD3>
+ <KEYWORD3>inside</KEYWORD3>
+ <KEYWORD3>sx</KEYWORD3>
+ <KEYWORD3>sy</KEYWORD3>
+ <KEYWORD3>sz</KEYWORD3>
+ <KEYWORD3>sxxy</KEYWORD3>
+ <KEYWORD3>syz</KEYWORD3>
+ <KEYWORD3>szx</KEYWORD3>
+ <KEYWORD3>center</KEYWORD3>
+ <KEYWORD3>outside</KEYWORD3>
+
+ <KEYWORD3>vari</KEYWORD3>
+ <KEYWORD3>extrem</KEYWORD3>
+ <KEYWORD3>vmax</KEYWORD3>
+ <KEYWORD3>tmax</KEYWORD3>
+ <KEYWORD3>vmin</KEYWORD3>
+ <KEYWORD3>tmin</KEYWORD3>
+ <KEYWORD3>vlast</KEYWORD3>
+ <KEYWORD3>tlast</KEYWORD3>
+ <KEYWORD3>cvar</KEYWORD3>
+ <KEYWORD3>rtime</KEYWORD3>
+ <KEYWORD3>itime</KEYWORD3>
+ <KEYWORD3>t</KEYWORD3>
+ <KEYWORD3>rset</KEYWORD3>
+ <KEYWORD3>iset</KEYWORD3>
+ <KEYWORD3>nsets</KEYWORD3>
+
+ <KEYWORD3>opt</KEYWORD3>
+ <KEYWORD3>total</KEYWORD3>
+ <KEYWORD3>feas</KEYWORD3>
+ <KEYWORD3>term</KEYWORD3>
+ <KEYWORD3>best</KEYWORD3>
+
+ <KEYWORD3>topo</KEYWORD3>
+ <KEYWORD3>act</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>porv</KEYWORD3>
+ <KEYWORD3>loads</KEYWORD3>
+
+ <KEYWORD3>runst</KEYWORD3>
+ <KEYWORD3>rspeed</KEYWORD3>
+ <KEYWORD3>mips</KEYWORD3>
+ <KEYWORD3>smflop</KEYWORD3>
+ <KEYWORD3>vmflop</KEYWORD3>
+ <KEYWORD3>rfilsz</KEYWORD3>
+ <KEYWORD3>emat</KEYWORD3>
+ <KEYWORD3>erot</KEYWORD3>
+ <KEYWORD3>esav</KEYWORD3>
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>mode</KEYWORD3>
+ <KEYWORD3>rdsp</KEYWORD3>
+ <KEYWORD3>redm</KEYWORD3>
+ <KEYWORD3>rfrq</KEYWORD3>
+ <KEYWORD3>rgeom</KEYWORD3>
+ <KEYWORD3>rst</KEYWORD3>
+ <KEYWORD3>tri</KEYWORD3>
+ <KEYWORD3>rtimst</KEYWORD3>
+ <KEYWORD3>tfirst</KEYWORD3>
+ <KEYWORD3>titer</KEYWORD3>
+ <KEYWORD3>eqprep</KEYWORD3>
+ <KEYWORD3>,solve</KEYWORD3>
+ <KEYWORD3>bsub</KEYWORD3>
+ <KEYWORD3>eigen</KEYWORD3>
+ <KEYWORD3>elform</KEYWORD3>
+ <KEYWORD3>elstrs</KEYWORD3>
+ <KEYWORD3>nelm</KEYWORD3>
+ <KEYWORD3>rmemry</KEYWORD3>
+ <KEYWORD3>wsreq</KEYWORD3>
+ <KEYWORD3>wsavail</KEYWORD3>
+ <KEYWORD3>dbpsize</KEYWORD3>
+ <KEYWORD3>dbpdisk</KEYWORD3>
+ <KEYWORD3>dbpmem</KEYWORD3>
+ <KEYWORD3>dbsize</KEYWORD3>
+ <KEYWORD3>dbmem</KEYWORD3>
+ <KEYWORD3>scrsize</KEYWORD3>
+ <KEYWORD3>scravail</KEYWORD3>
+ <KEYWORD3>iomem</KEYWORD3>
+ <KEYWORD3>iopsiz</KEYWORD3>
+ <KEYWORD3>iobuf</KEYWORD3>
+ <KEYWORD3>rwfrnt</KEYWORD3>
+ <KEYWORD3>rms</KEYWORD3>
+ <KEYWORD3>mean</KEYWORD3>
+
+ <KEYWORD3>,nsel</KEYWORD3>
+ <KEYWORD3>,esel</KEYWORD3>
+ <KEYWORD3>,ksel</KEYWORD3>
+ <KEYWORD3>,lsel</KEYWORD3>
+ <KEYWORD3>,asel</KEYWORD3>
+ <KEYWORD3>,vsel</KEYWORD3>
+ <KEYWORD3>ndnext</KEYWORD3>
+ <KEYWORD3>elnext</KEYWORD3>
+ <KEYWORD3>kpnext</KEYWORD3>
+ <KEYWORD3>lsnext</KEYWORD3>
+ <KEYWORD3>arnext</KEYWORD3>
+ <KEYWORD3>vlnext</KEYWORD3>
+ <KEYWORD3>centrx</KEYWORD3>
+ <KEYWORD3>centry</KEYWORD3>
+ <KEYWORD3>centrz</KEYWORD3>
+ <KEYWORD3>nx</KEYWORD3>
+ <KEYWORD3>ny</KEYWORD3>
+ <KEYWORD3>nz</KEYWORD3>
+ <KEYWORD3>kx</KEYWORD3>
+ <KEYWORD3>ky</KEYWORD3>
+ <KEYWORD3>kz</KEYWORD3>
+ <KEYWORD3>lx</KEYWORD3>
+ <KEYWORD3>ly</KEYWORD3>
+ <KEYWORD3>lz</KEYWORD3>
+ <KEYWORD3>lsx</KEYWORD3>
+ <KEYWORD3>lsy</KEYWORD3>
+ <KEYWORD3>lsz</KEYWORD3>
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>kp</KEYWORD3>
+ <KEYWORD3>distnd</KEYWORD3>
+ <KEYWORD3>distkp</KEYWORD3>
+ <KEYWORD3>disten</KEYWORD3>
+ <KEYWORD3>anglen</KEYWORD3>
+ <KEYWORD3>anglek</KEYWORD3>
+ <KEYWORD3>nnear</KEYWORD3>
+ <KEYWORD3>knear</KEYWORD3>
+ <KEYWORD3>enearn</KEYWORD3>
+ <KEYWORD3>areand</KEYWORD3>
+ <KEYWORD3>areakp</KEYWORD3>
+ <KEYWORD3>arnode</KEYWORD3>
+ <KEYWORD3>normnx</KEYWORD3>
+ <KEYWORD3>normny</KEYWORD3>
+ <KEYWORD3>normnz</KEYWORD3>
+ <KEYWORD3>normkx</KEYWORD3>
+ <KEYWORD3>normky</KEYWORD3>
+ <KEYWORD3>normkz</KEYWORD3>
+ <KEYWORD3>enextn</KEYWORD3>
+ <KEYWORD3>nelem</KEYWORD3>
+ <KEYWORD3>eladj</KEYWORD3>
+ <KEYWORD3>ndface</KEYWORD3>
+ <KEYWORD3>nmface</KEYWORD3>
+ <KEYWORD3>arface</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>ax</KEYWORD3>
+ <KEYWORD3>ay</KEYWORD3>
+ <KEYWORD3>az</KEYWORD3>
+
+ <!-- /GFORMAT command -->
+ <KEYWORD3>g</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>e</KEYWORD3>
+
+ <!-- /GLINE command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- *GO command -->
+ <KEYWORD3>stop</KEYWORD3>
+
+ <!-- GP command -->
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>fy</KEYWORD3>
+ <KEYWORD3>fz</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>my</KEYWORD3>
+ <KEYWORD3>mz</KEYWORD3>
+
+ <!-- GPLIST command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- /GRAPHICS command -->
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>power</KEYWORD3>
+
+ <!-- /GROPT command -->
+ <KEYWORD3>axdv</KEYWORD3>
+ <KEYWORD3>axnm</KEYWORD3>
+ <KEYWORD3>axnsc</KEYWORD3>
+ <KEYWORD3>ascal</KEYWORD3>
+ <KEYWORD3>logx</KEYWORD3>
+ <KEYWORD3>logy</KEYWORD3>
+ <KEYWORD3>fill</KEYWORD3>
+ <KEYWORD3>cgrid</KEYWORD3>
+ <KEYWORD3>dig1</KEYWORD3>
+ <KEYWORD3>dig2</KEYWORD3>
+ <KEYWORD3>view</KEYWORD3>
+ <KEYWORD3>revx</KEYWORD3>
+ <KEYWORD3>revy</KEYWORD3>
+ <KEYWORD3>divx</KEYWORD3>
+ <KEYWORD3>divy</KEYWORD3>
+ <KEYWORD3>ltyp</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>front</KEYWORD3>
+
+ <!-- GRP command -->
+ <KEYWORD3>disp</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+
+ <!-- /GST command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- /GTHK command -->
+ <KEYWORD3>axis</KEYWORD3>
+ <KEYWORD3>grid</KEYWORD3>
+ <KEYWORD3>curve</KEYWORD3>
+
+ <!-- /GTYPE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>keyp</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>grph</KEYWORD3>
+
+ <!-- /HEADER command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- HPGL command -->
+ <KEYWORD3>model</KEYWORD3>
+ <KEYWORD3>paper</KEYWORD3>
+ <KEYWORD3>color</KEYWORD3>
+ <KEYWORD3>direct</KEYWORD3>
+
+ <!-- HPTCREATE command -->
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>coord</KEYWORD3>
+ <KEYWORD3>ratio</KEYWORD3>
+
+ <!-- HPTDELETE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- HREXP command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- HROPT command -->
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>reduc</KEYWORD3>
+ <KEYWORD3>msup</KEYWORD3>
+
+ <!-- HROUT command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- IC command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>sp01</KEYWORD3>
+ <KEYWORD3>so02</KEYWORD3>
+ <KEYWORD3>sp03</KEYWORD3>
+ <KEYWORD3>sp04</KEYWORD3>
+ <KEYWORD3>sp05</KEYWORD3>
+ <KEYWORD3>sp06</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>ax</KEYWORD3>
+ <KEYWORD3>ay</KEYWORD3>
+ <KEYWORD3>az</KEYWORD3>
+
+ <!-- ICLIST command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>disp</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+
+ <!-- *IF command -->
+ <KEYWORD3>eq</KEYWORD3>
+ <KEYWORD3>ne</KEYWORD3>
+ <KEYWORD3>lt</KEYWORD3>
+ <KEYWORD3>gt</KEYWORD3>
+ <KEYWORD3>le</KEYWORD3>
+ <KEYWORD3>ge</KEYWORD3>
+ <KEYWORD3>ablt</KEYWORD3>
+ <KEYWORD3>abgt</KEYWORD3>
+ <KEYWORD3>stop</KEYWORD3>
+ <KEYWORD3>exit</KEYWORD3>
+ <KEYWORD3>cycle</KEYWORD3>
+ <KEYWORD3>then</KEYWORD3>
+
+ <!-- INRES command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>basic</KEYWORD3>
+ <KEYWORD3>nsol</KEYWORD3>
+ <KEYWORD3>rsol</KEYWORD3>
+ <KEYWORD3>esol</KEYWORD3>
+ <KEYWORD3>nload</KEYWORD3>
+ <KEYWORD3>strs</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>fgrad</KEYWORD3>
+ <KEYWORD3>fflux</KEYWORD3>
+ <KEYWORD3>misc</KEYWORD3>
+
+ <!-- INTSRF command -->
+ <KEYWORD3>pres</KEYWORD3>
+
+ <!-- IOPTN command -->
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>defa</KEYWORD3>
+ <KEYWORD3>merg</KEYWORD3>
+ <KEYWORD3>yes</KEYWORD3>
+ <KEYWORD3>no</KEYWORD3>
+ <KEYWORD3>solid</KEYWORD3>
+ <KEYWORD3>gtoler</KEYWORD3>
+ <KEYWORD3>file</KEYWORD3>
+ <KEYWORD3>iges</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>small</KEYWORD3>
+
+ <!-- K command -->
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- KBETW command -->
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>ratio</KEYWORD3>
+ <KEYWORD3>dist</KEYWORD3>
+
+ <!-- KCENTER command -->
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>kp</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+
+ <!-- KCLEAR, KDELE, KDIST, KESIZE, KFILL, KGEN, KL, KLIST, KMESH, KMODIF, -->
+ <!-- KMOVE, KNODE, KPLOT, KPSCALE, KSCALE, KSCON commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>coord</KEYWORD3>
+ <KEYWORD3>hpt</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+
+ <!-- KREFINE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>smooth</KEYWORD3>
+ <KEYWORD3>clean</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- KSEL command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>inve</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>,real</KEYWORD3>
+ <KEYWORD3>,esys</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>kp</KEYWORD3>
+ <KEYWORD3>ext</KEYWORD3>
+ <KEYWORD3>hpt</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+
+ <!-- KSLL, KSLN commands -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+
+ <!-- KSYMM, KTRAN, KWPAVE, KWPLAN commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+
+ <!-- L, L2ANG, L2TAN, LANG, LARC, LAREA commands -->
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- LAYER, LAYERP26 commands -->
+ <KEYWORD3>fcmax</KEYWORD3>
+
+ <!-- LAYLIST, LCABS, LCCAT, LCFACT, LCLEAR, LCOMB, LCSL, LCSUM, LDELE, -->
+ <!-- LDIV, LDRAG, LESIZE, LEXTND, LFILLT, LGEN, LGLUE, /LIGHT, LINA, -->
+ <!-- LINL, LINP, LINV, LMESH, LNFILL, LNMERGE, LOVLAP, LPLOT, LPTN, -->
+ <!-- LREVERSE, LROTAT, LSSCALE, LSTR commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- LCDEF command -->
+ <KEYWORD3>erase</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- LCOPER command -->
+ <KEYWORD3>zero</KEYWORD3>
+ <KEYWORD3>squa</KEYWORD3>
+ <KEYWORD3>sqrt</KEYWORD3>
+ <KEYWORD3>lprin</KEYWORD3>
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>sub</KEYWORD3>
+ <KEYWORD3>srss</KEYWORD3>
+ <KEYWORD3>min</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>abmn</KEYWORD3>
+ <KEYWORD3>abmx</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>mult</KEYWORD3>
+
+ <!-- LCSEL command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>inve</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+
+ <!-- LDREAD command -->
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>forc</KEYWORD3>
+ <KEYWORD3>hgen</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>ehflu</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>reac</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+
+ <!-- LGWRITE command -->
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>comment</KEYWORD3>
+ <KEYWORD3>remove</KEYWORD3>
+
+ <!-- LLIST command -->
+ <KEYWORD3>radius</KEYWORD3>
+ <KEYWORD3>layer</KEYWORD3>
+ <KEYWORD3>hpt</KEYWORD3>
+ <KEYWORD3>orient</KEYWORD3>
+
+ <!-- LNSEARCH command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>auto</KEYWORD3>
+
+ <!-- LOCAL command -->
+ <KEYWORD3>cart</KEYWORD3>
+ <KEYWORD3>cylin</KEYWORD3>
+ <KEYWORD3>sphe</KEYWORD3>
+ <KEYWORD3>toro</KEYWORD3>
+
+ <!-- LREFINE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>smooth</KEYWORD3>
+ <KEYWORD3>clean</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- LSBA, LSBL, LSBV, LSBW commands -->
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>sepo</KEYWORD3>
+ <KEYWORD3>delete</KEYWORD3>
+ <KEYWORD3>keep</KEYWORD3>
+
+ <!-- LSCLEAR command -->
+ <KEYWORD3>solid</KEYWORD3>
+ <KEYWORD3>fe</KEYWORD3>
+ <KEYWORD3>iner</KEYWORD3>
+ <KEYWORD3>lfact</KEYWORD3>
+ <KEYWORD3>lsopt</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- LSEL command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>inve</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>ext</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>tan1</KEYWORD3>
+ <KEYWORD3>tan2</KEYWORD3>
+ <KEYWORD3>ndiv</KEYWORD3>
+ <KEYWORD3>space</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>,real</KEYWORD3>
+ <KEYWORD3>,esys</KEYWORD3>
+ <KEYWORD3>sec</KEYWORD3>
+ <KEYWORD3>lenght</KEYWORD3>
+ <KEYWORD3>radius</KEYWORD3>
+ <KEYWORD3>hpt</KEYWORD3>
+ <KEYWORD3>lcca</KEYWORD3>
+
+ <!-- LSLA, LSLK commands -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+
+ <!-- LSREAD, LSWRITE commands -->
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>init</KEYWORD3>
+
+ <!-- LSYMM, LTAN, LTRAN, LWPLAN commands -->
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- LUMPM command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- M, MONITOR commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>fy</KEYWORD3>
+ <KEYWORD3>fz</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>my</KEYWORD3>
+ <KEYWORD3>mz</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+
+ <!-- MDELE, MGEN, MLIST commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- /MENU command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>grph</KEYWORD3>
+
+ <!-- *MFOURI command -->
+ <KEYWORD3>fit</KEYWORD3>
+ <KEYWORD3>eval</KEYWORD3>
+
+ <!-- *MFUN command -->
+ <KEYWORD3>copy</KEYWORD3>
+ <KEYWORD3>tran</KEYWORD3>
+
+ <!-- MODMSH command -->
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>nocheck</KEYWORD3>
+ <KEYWORD3>check</KEYWORD3>
+ <KEYWORD3>detach</KEYWORD3>
+
+ <!-- MODOPT command -->
+ <KEYWORD3>subsp</KEYWORD3>
+ <KEYWORD3>lanb</KEYWORD3>
+ <KEYWORD3>reduc</KEYWORD3>
+ <KEYWORD3>unsym</KEYWORD3>
+ <KEYWORD3>damp</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- *MOPER command -->
+ <KEYWORD3>mult</KEYWORD3>
+ <KEYWORD3>solv</KEYWORD3>
+ <KEYWORD3>sort</KEYWORD3>
+ <KEYWORD3>covar</KEYWORD3>
+ <KEYWORD3>corr</KEYWORD3>
+
+ <!-- MOPT command -->
+ <KEYWORD3>expnd</KEYWORD3>
+ <KEYWORD3>tetexpnd</KEYWORD3>
+ <KEYWORD3>trans</KEYWORD3>
+ <KEYWORD3>iesz</KEYWORD3>
+ <KEYWORD3>amesh</KEYWORD3>
+ <KEYWORD3>default</KEYWORD3>
+ <KEYWORD3>main</KEYWORD3>
+ <KEYWORD3>alternate</KEYWORD3>
+ <KEYWORD3>alt2</KEYWORD3>
+ <KEYWORD3>qmesh</KEYWORD3>
+ <KEYWORD3>vmesh</KEYWORD3>
+ <KEYWORD3>split</KEYWORD3>
+ <KEYWORD3>lsmo</KEYWORD3>
+ <KEYWORD3>clear</KEYWORD3>
+ <KEYWORD3>pyra</KEYWORD3>
+ <KEYWORD3>timp</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>defa</KEYWORD3>
+
+ <!-- MOVE command -->
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- MP, MPDATA commands -->
+ <KEYWORD3>ex</KEYWORD3>
+ <KEYWORD3>ey</KEYWORD3>
+ <KEYWORD3>ez</KEYWORD3>
+ <KEYWORD3>alpx</KEYWORD3>
+ <KEYWORD3>alpy</KEYWORD3>
+ <KEYWORD3>alpz</KEYWORD3>
+ <KEYWORD3>reft</KEYWORD3>
+ <KEYWORD3>prxy</KEYWORD3>
+ <KEYWORD3>pryz</KEYWORD3>
+ <KEYWORD3>prxz</KEYWORD3>
+ <KEYWORD3>nuxy</KEYWORD3>
+ <KEYWORD3>nuyz</KEYWORD3>
+ <KEYWORD3>nuzx</KEYWORD3>
+ <KEYWORD3>gxy</KEYWORD3>
+ <KEYWORD3>gyz</KEYWORD3>
+ <KEYWORD3>gxz</KEYWORD3>
+ <KEYWORD3>damp</KEYWORD3>
+ <KEYWORD3>mu</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>c</KEYWORD3>
+ <KEYWORD3>enth</KEYWORD3>
+ <KEYWORD3>kxx</KEYWORD3>
+ <KEYWORD3>kyy</KEYWORD3>
+ <KEYWORD3>kzz</KEYWORD3>
+ <KEYWORD3>hf</KEYWORD3>
+ <KEYWORD3>emis</KEYWORD3>
+ <KEYWORD3>qrate</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>sonc</KEYWORD3>
+ <KEYWORD3>rsvx</KEYWORD3>
+ <KEYWORD3>rsvy</KEYWORD3>
+ <KEYWORD3>rsvz</KEYWORD3>
+ <KEYWORD3>perx</KEYWORD3>
+ <KEYWORD3>pery</KEYWORD3>
+ <KEYWORD3>perz</KEYWORD3>
+ <KEYWORD3>murx</KEYWORD3>
+ <KEYWORD3>mury</KEYWORD3>
+ <KEYWORD3>murz</KEYWORD3>
+ <KEYWORD3>mgxx</KEYWORD3>
+ <KEYWORD3>mgyy</KEYWORD3>
+ <KEYWORD3>mgzz</KEYWORD3>
+ <KEYWORD3>lsst</KEYWORD3>
+
+ <!-- MPCHG, MPDELE commands -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- /MPLIB command -->
+ <KEYWORD3>read</KEYWORD3>
+ <KEYWORD3>write</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+
+ <!-- MPLIST command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>evlt</KEYWORD3>
+
+ <!-- MSADV command -->
+ <KEYWORD3>msu</KEYWORD3>
+ <KEYWORD3>supg</KEYWORD3>
+
+ <!-- MSCAP command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- *MSG command -->
+ <KEYWORD3>info</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>warn</KEYWORD3>
+ <KEYWORD3>error</KEYWORD3>
+ <KEYWORD3>fatal</KEYWORD3>
+ <KEYWORD3>ui</KEYWORD3>
+
+ <!-- MSHAPE command -->
+ <KEYWORD3>2d</KEYWORD3>
+ <KEYWORD3>3d</KEYWORD3>
+
+ <!-- MSPROP command -->
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>mdif</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>constant</KEYWORD3>
+ <KEYWORD3>liquid</KEYWORD3>
+ <KEYWORD3>gas</KEYWORD3>
+
+ <!-- /MSTART command -->
+ <KEYWORD3>main</KEYWORD3>
+ <KEYWORD3>input</KEYWORD3>
+ <KEYWORD3>grph</KEYWORD3>
+ <KEYWORD3>tool</KEYWORD3>
+ <KEYWORD3>zoom</KEYWORD3>
+ <KEYWORD3>work</KEYWORD3>
+ <KEYWORD3>wpset</KEYWORD3>
+ <KEYWORD3>abbr</KEYWORD3>
+ <KEYWORD3>parm</KEYWORD3>
+ <KEYWORD3>sele</KEYWORD3>
+ <KEYWORD3>anno</KEYWORD3>
+ <KEYWORD3>hard</KEYWORD3>
+ <KEYWORD3>help</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- MSVARY command -->
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>mdif</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- MXPAND command -->
+ <KEYWORD3>no</KEYWORD3>
+ <KEYWORD3>yes</KEYWORD3>
+
+ <!-- N, NDELE, NDIST, NGEN, NKPT commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- NLGEOM, NOORDER commands -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- NLIST, NMODIF commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>coord</KEYWORD3>
+
+ <!-- NREFINE, NROTAT, NSCALE commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>smooth</KEYWORD3>
+ <KEYWORD3>clean</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- NRLSUM command -->
+ <KEYWORD3>disp</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+
+ <!-- NROPT command -->
+ <KEYWORD3>auto</KEYWORD3>
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>modi</KEYWORD3>
+ <KEYWORD3>init</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- NSEL, NSOL, NSORT commands -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>inve</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>ext</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>ang</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>zx</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>,cp</KEYWORD3>
+ <KEYWORD3>,ce</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>ax</KEYWORD3>
+ <KEYWORD3>ay</KEYWORD3>
+ <KEYWORD3>az</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>fy</KEYWORD3>
+ <KEYWORD3>fz</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>my</KEYWORD3>
+ <KEYWORD3>mz</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>csgx</KEYWORD3>
+ <KEYWORD3>csgy</KEYWORD3>
+ <KEYWORD3>csgz</KEYWORD3>
+ <KEYWORD3>chrg</KEYWORD3>
+ <KEYWORD3>chrgd</KEYWORD3>
+ <KEYWORD3>,bf</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>flue</KEYWORD3>
+ <KEYWORD3>hgen</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>jsx</KEYWORD3>
+ <KEYWORD3>jsy</KEYWORD3>
+ <KEYWORD3>jsz</KEYWORD3>
+ <KEYWORD3>mvdi</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>cont</KEYWORD3>
+ <KEYWORD3>pene</KEYWORD3>
+ <KEYWORD3>sfric</KEYWORD3>
+ <KEYWORD3>stot</KEYWORD3>
+ <KEYWORD3>slide</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>topo</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>cmuv</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+
+ <!-- NSLA, NSLE, NSLK, NSLL, NSLV commands -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>active</KEYWORD3>
+ <KEYWORD3>inactive</KEYWORD3>
+ <KEYWORD3>corner</KEYWORD3>
+ <KEYWORD3>mid</KEYWORD3>
+
+ <!-- NSUBST command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- NSYM command -->
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- NUMCMP, NUMMRG, NUMOFF, NUMSTR commands -->
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>kp</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>,real</KEYWORD3>
+ <KEYWORD3>,cp</KEYWORD3>
+ <KEYWORD3>,ce</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>low</KEYWORD3>
+ <KEYWORD3>high</KEYWORD3>
+ <KEYWORD3>,csys</KEYWORD3>
+ <KEYWORD3>defa</KEYWORD3>
+
+ <!-- NUMEXP command -->
+ <KEYWORD3>yes</KEYWORD3>
+ <KEYWORD3>no</KEYWORD3>
+
+ <!-- NWPLAN command -->
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- OPDEL, OPLIST, OPRFA, OPRGR, OPRSW commands -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- OPFACT command -->
+ <KEYWORD3>full</KEYWORD3>
+
+ <!-- OPGRAD, OPSWEEP commands -->
+ <KEYWORD3>best</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>,n</KEYWORD3>
+
+ <!-- OPKEEP commmand -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- OPLFA command -->
+ <KEYWORD3>main</KEYWORD3>
+ <KEYWORD3>2fac</KEYWORD3>
+ <KEYWORD3>3fac</KEYWORD3>
+
+ <!-- OPLOOP command -->
+ <KEYWORD3>top</KEYWORD3>
+ <KEYWORD3>prep</KEYWORD3>
+ <KEYWORD3>ignore</KEYWORD3>
+ <KEYWORD3>process</KEYWORD3>
+ <KEYWORD3>scalar</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- OPNCONTROL command -->
+ <KEYWORD3>temp</KEYWORD3>
+
+ <!-- OPPRNT command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>full</KEYWORD3>
+
+ <!-- OPTYPE command -->
+ <KEYWORD3>subp</KEYWORD3>
+ <KEYWORD3>first</KEYWORD3>
+ <KEYWORD3>rand</KEYWORD3>
+ <KEYWORD3>run</KEYWORD3>
+ <KEYWORD3>fact</KEYWORD3>
+ <KEYWORD3>grad</KEYWORD3>
+ <KEYWORD3>sweep</KEYWORD3>
+ <KEYWORD3>user</KEYWORD3>
+
+ <!-- OPVAR command -->
+ <KEYWORD3>dv</KEYWORD3>
+ <KEYWORD3>sv</KEYWORD3>
+ <KEYWORD3>obj</KEYWORD3>
+ <KEYWORD3>del</KEYWORD3>
+
+ <!-- OUTPR command -->
+ <KEYWORD3>basic</KEYWORD3>
+ <KEYWORD3>nsol</KEYWORD3>
+ <KEYWORD3>rsol</KEYWORD3>
+ <KEYWORD3>esol</KEYWORD3>
+ <KEYWORD3>nload</KEYWORD3>
+ <KEYWORD3>veng</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>erase</KEYWORD3>
+
+ <!-- /OUTPUT command -->
+ <KEYWORD3>term</KEYWORD3>
+ <KEYWORD3>append</KEYWORD3>
+
+ <!-- OUTRES command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>basic</KEYWORD3>
+ <KEYWORD3>nsol</KEYWORD3>
+ <KEYWORD3>rsol</KEYWORD3>
+ <KEYWORD3>esol</KEYWORD3>
+ <KEYWORD3>nload</KEYWORD3>
+ <KEYWORD3>strs</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>fgrad</KEYWORD3>
+ <KEYWORD3>fflux</KEYWORD3>
+ <KEYWORD3>misc</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+
+ <!-- PADELE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>name</KEYWORD3>
+
+ <!-- PAGET, PAPUT commands -->
+ <KEYWORD3>points</KEYWORD3>
+ <KEYWORD3>table</KEYWORD3>
+ <KEYWORD3>label</KEYWORD3>
+
+ <!-- PARESU command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>path</KEYWORD3>
+
+ <!-- PARRES command -->
+ <KEYWORD3>new</KEYWORD3>
+ <KEYWORD3>change</KEYWORD3>
+
+ <!-- PARSAV command -->
+ <KEYWORD3>scalar</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- PASAVE command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- /PBC command -->
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>vx</KEYWORD3>
+ <KEYWORD3>vy</KEYWORD3>
+ <KEYWORD3>vz</KEYWORD3>
+ <KEYWORD3>sp01</KEYWORD3>
+ <KEYWORD3>sp02</KEYWORD3>
+ <KEYWORD3>sp03</KEYWORD3>
+ <KEYWORD3>sp04</KEYWORD3>
+ <KEYWORD3>sp05</KEYWORD3>
+ <KEYWORD3>sp06</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>chrg</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>forc</KEYWORD3>
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>fy</KEYWORD3>
+ <KEYWORD3>fz</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>mome</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>my</KEYWORD3>
+ <KEYWORD3>mz</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>mast</KEYWORD3>
+ <KEYWORD3>,cp</KEYWORD3>
+ <KEYWORD3>,ce</KEYWORD3>
+ <KEYWORD3>nfor</KEYWORD3>
+ <KEYWORD3>nmom</KEYWORD3>
+ <KEYWORD3>rfor</KEYWORD3>
+ <KEYWORD3>rmom</KEYWORD3>
+ <KEYWORD3>path</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+ <KEYWORD3>acelx</KEYWORD3>
+ <KEYWORD3>acely</KEYWORD3>
+ <KEYWORD3>acelz</KEYWORD3>
+ <KEYWORD3>omeg</KEYWORD3>
+ <KEYWORD3>omegx</KEYWORD3>
+ <KEYWORD3>omegy</KEYWORD3>
+ <KEYWORD3>omegz</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- /PBF command -->
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>flue</KEYWORD3>
+ <KEYWORD3>hgen</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>jsx</KEYWORD3>
+ <KEYWORD3>jsy</KEYWORD3>
+ <KEYWORD3>jsz</KEYWORD3>
+ <KEYWORD3>phase</KEYWORD3>
+ <KEYWORD3>mvdi</KEYWORD3>
+ <KEYWORD3>chrgd</KEYWORD3>
+ <KEYWORD3>vltg</KEYWORD3>
+ <KEYWORD3>forc</KEYWORD3>
+
+ <!-- PCALC command -->
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>mult</KEYWORD3>
+ <KEYWORD3>div</KEYWORD3>
+ <KEYWORD3>exp</KEYWORD3>
+ <KEYWORD3>deri</KEYWORD3>
+ <KEYWORD3>intg</KEYWORD3>
+ <KEYWORD3>sin</KEYWORD3>
+ <KEYWORD3>cos</KEYWORD3>
+ <KEYWORD3>asin</KEYWORD3>
+ <KEYWORD3>acos</KEYWORD3>
+ <KEYWORD3>log</KEYWORD3>
+
+ <!-- PCONV command -->
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>erase</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+ <KEYWORD3>se</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>top</KEYWORD3>
+ <KEYWORD3>mid</KEYWORD3>
+ <KEYWORD3>bot</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>xz</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+
+ <!-- /PCOPY command -->
+ <KEYWORD3>now</KEYWORD3>
+
+ <!-- PDEF command -->
+ <KEYWORD3>avg</KEYWORD3>
+ <KEYWORD3>noav</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>xz</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>etab</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>cmuv</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+
+ <!-- PDRAG command -->
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+
+ <!-- PEXCLUDE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- PFACT command -->
+ <KEYWORD3>base</KEYWORD3>
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>wave</KEYWORD3>
+ <KEYWORD3>spat</KEYWORD3>
+
+ <!-- PHYSICS command -->
+ <KEYWORD3>write</KEYWORD3>
+ <KEYWORD3>read</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>delete</KEYWORD3>
+ <KEYWORD3>clear</KEYWORD3>
+ <KEYWORD3>status</KEYWORD3>
+
+ <!-- PINCLUDE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- PIVCHECK command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- PLCONV command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>se</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>top</KEYWORD3>
+ <KEYWORD3>mid</KEYWORD3>
+ <KEYWORD3>bot</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>xz</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+
+ <!-- PLESOL command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>xz</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>cont</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>pene</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>sfric</KEYWORD3>
+ <KEYWORD3>stot</KEYWORD3>
+ <KEYWORD3>slide</KEYWORD3>
+ <KEYWORD3>gap</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>serr</KEYWORD3>
+ <KEYWORD3>sdsg</KEYWORD3>
+ <KEYWORD3>terr</KEYWORD3>
+ <KEYWORD3>tdsg</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>vf</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>sene</KEYWORD3>
+ <KEYWORD3>tene</KEYWORD3>
+ <KEYWORD3>kene</KEYWORD3>
+ <KEYWORD3>jheat</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>jt</KEYWORD3>
+ <KEYWORD3>mre</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>cent</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>smisc</KEYWORD3>
+ <KEYWORD3>nmisc</KEYWORD3>
+ <KEYWORD3>topo</KEYWORD3>
+
+ <!-- PLETAB command -->
+ <KEYWORD3>noav</KEYWORD3>
+ <KEYWORD3>avg</KEYWORD3>
+
+ <!-- PLNSOL command -->
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>sp01</KEYWORD3>
+ <KEYWORD3>sp02</KEYWORD3>
+ <KEYWORD3>sp03</KEYWORD3>
+ <KEYWORD3>sp04</KEYWORD3>
+ <KEYWORD3>sp05</KEYWORD3>
+ <KEYWORD3>sp06</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>xz</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>cont</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>pene</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>sfric</KEYWORD3>
+ <KEYWORD3>stot</KEYWORD3>
+ <KEYWORD3>slide</KEYWORD3>
+ <KEYWORD3>gap</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>topo</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>cmuv</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+ <KEYWORD3>lmd1</KEYWORD3>
+ <KEYWORD3>lmd2</KEYWORD3>
+ <KEYWORD3>lmd3</KEYWORD3>
+ <KEYWORD3>lmd4</KEYWORD3>
+ <KEYWORD3>lmd5</KEYWORD3>
+ <KEYWORD3>lmd6</KEYWORD3>
+ <KEYWORD3>emd1</KEYWORD3>
+ <KEYWORD3>emd2</KEYWORD3>
+ <KEYWORD3>emd3</KEYWORD3>
+ <KEYWORD3>emd4</KEYWORD3>
+ <KEYWORD3>emd5</KEYWORD3>
+ <KEYWORD3>emd6</KEYWORD3>
+
+ <!-- /PLOPTS command -->
+ <KEYWORD3>leg1</KEYWORD3>
+ <KEYWORD3>leg2</KEYWORD3>
+ <KEYWORD3>info</KEYWORD3>
+ <KEYWORD3>frame</KEYWORD3>
+ <KEYWORD3>title</KEYWORD3>
+ <KEYWORD3>minm</KEYWORD3>
+ <KEYWORD3>logo</KEYWORD3>
+ <KEYWORD3>wins</KEYWORD3>
+ <KEYWORD3>wp</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>auto</KEYWORD3>
+
+ <!-- PLOT command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- PLPAGM command -->
+ <KEYWORD3>node</KEYWORD3>
+
+ <!-- PLPATH command -->
+ <KEYWORD3>xg</KEYWORD3>
+ <KEYWORD3>yg</KEYWORD3>
+ <KEYWORD3>zg</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+
+ <!-- PLSECT command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>xz</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+
+ <!-- PLTRAC command -->
+ <KEYWORD3>fluid</KEYWORD3>
+ <KEYWORD3>elec</KEYWORD3>
+ <KEYWORD3>magn</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>cmuv</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+
+ <!-- PLVECT command -->
+ <KEYWORD3>rast</KEYWORD3>
+ <KEYWORD3>vect</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>jt</KEYWORD3>
+
+ <!-- PMAP command -->
+ <KEYWORD3>uniform</KEYWORD3>
+ <KEYWORD3>accurate</KEYWORD3>
+
+ <!-- /PMETH command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+
+ <!-- /PNUM command -->
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>,real</KEYWORD3>
+ <KEYWORD3>,esys</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>kp</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>sval</KEYWORD3>
+ <KEYWORD3>tabnam</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- POPT command -->
+ <KEYWORD3>b31.1</KEYWORD3>
+ <KEYWORD3>nc</KEYWORD3>
+
+ <!-- PORTOPT command -->
+ <KEYWORD3>coax</KEYWORD3>
+ <KEYWORD3>te10</KEYWORD3>
+ <KEYWORD3>te11circ</KEYWORD3>
+ <KEYWORD3>tm01circ</KEYWORD3>
+
+ <!-- PPATH command -->
+ <KEYWORD3>pick</KEYWORD3>
+
+ <!-- PRED command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- PRESOL command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>cont</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>vf</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>forc</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>serr</KEYWORD3>
+ <KEYWORD3>sdsg</KEYWORD3>
+ <KEYWORD3>terr</KEYWORD3>
+ <KEYWORD3>tdsg</KEYWORD3>
+ <KEYWORD3>sene</KEYWORD3>
+ <KEYWORD3>tene</KEYWORD3>
+ <KEYWORD3>kene</KEYWORD3>
+ <KEYWORD3>jheat</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>jt</KEYWORD3>
+ <KEYWORD3>mre</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>cent</KEYWORD3>
+ <KEYWORD3>smisc</KEYWORD3>
+ <KEYWORD3>nmisc</KEYWORD3>
+ <KEYWORD3>topo</KEYWORD3>
+
+ <!-- PRNLD, PRRFOR, PRRSOL commands -->
+ <KEYWORD3>fx</KEYWORD3>
+ <KEYWORD3>fy</KEYWORD3>
+ <KEYWORD3>fz</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>mx</KEYWORD3>
+ <KEYWORD3>ym</KEYWORD3>
+ <KEYWORD3>mz</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>vfx</KEYWORD3>
+ <KEYWORD3>vfy</KEYWORD3>
+ <KEYWORD3>vfz</KEYWORD3>
+ <KEYWORD3>vf</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>curt</KEYWORD3>
+ <KEYWORD3>vltg</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>csgx</KEYWORD3>
+ <KEYWORD3>csgy</KEYWORD3>
+ <KEYWORD3>csgz</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+
+ <!-- PRNSOL, PRSSOL commands -->
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>sp01</KEYWORD3>
+ <KEYWORD3>sp02</KEYWORD3>
+ <KEYWORD3>sp03</KEYWORD3>
+ <KEYWORD3>sp04</KEYWORD3>
+ <KEYWORD3>sp05</KEYWORD3>
+ <KEYWORD3>sp06</KEYWORD3>
+ <KEYWORD3>dof</KEYWORD3>
+
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>prin</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>cont</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>topo</KEYWORD3>
+
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>spht</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>cmuv</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+ <KEYWORD3>lmd</KEYWORD3>
+ <KEYWORD3>emd</KEYWORD3>
+
+ <!-- PRVECT command -->
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>js</KEYWORD3>
+ <KEYWORD3>jt</KEYWORD3>
+
+ <!-- PSCR command -->
+ <KEYWORD3>cmap</KEYWORD3>
+ <KEYWORD3>lwid</KEYWORD3>
+ <KEYWORD3>color</KEYWORD3>
+ <KEYWORD3>tranx</KEYWORD3>
+ <KEYWORD3>trany</KEYWORD3>
+ <KEYWORD3>rotate</KEYWORD3>
+ <KEYWORD3>scale</KEYWORD3>
+ <KEYWORD3>tiff</KEYWORD3>
+ <KEYWORD3>epsi</KEYWORD3>
+
+ <!-- PSDRES command -->
+ <KEYWORD3>disp</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+ <KEYWORD3>rel</KEYWORD3>
+ <KEYWORD3>abs</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- PSDUNIT command -->
+ <KEYWORD3>disp</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+ <KEYWORD3>accg</KEYWORD3>
+ <KEYWORD3>forc</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+
+ <!-- /PSEARCH command -->
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- PSEL command -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>inv</KEYWORD3>
+
+ <!-- /PSF command -->
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>norm</KEYWORD3>
+ <KEYWORD3>tanx</KEYWORD3>
+ <KEYWORD3>tany</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>hcoef</KEYWORD3>
+ <KEYWORD3>tbulk</KEYWORD3>
+ <KEYWORD3>rad</KEYWORD3>
+ <KEYWORD3>emis</KEYWORD3>
+ <KEYWORD3>tamb</KEYWORD3>
+ <KEYWORD3>hflux</KEYWORD3>
+ <KEYWORD3>fsi</KEYWORD3>
+ <KEYWORD3>impd</KEYWORD3>
+ <KEYWORD3>shld</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>mur</KEYWORD3>
+ <KEYWORD3>mxwf</KEYWORD3>
+ <KEYWORD3>inf</KEYWORD3>
+ <KEYWORD3>chrgs</KEYWORD3>
+ <KEYWORD3>mci</KEYWORD3>
+
+ <!-- PSOLVE command -->
+ <KEYWORD3>cgsol</KEYWORD3>
+ <KEYWORD3>eigdamp</KEYWORD3>
+ <KEYWORD3>eigexp</KEYWORD3>
+ <KEYWORD3>eigfull</KEYWORD3>
+ <KEYWORD3>eigreduc</KEYWORD3>
+ <KEYWORD3>eigunsym</KEYWORD3>
+ <KEYWORD3>elform</KEYWORD3>
+ <KEYWORD3>elprep</KEYWORD3>
+ <KEYWORD3>redwrite</KEYWORD3>
+ <KEYWORD3>triang</KEYWORD3>
+
+ <!-- PSPRNG command -->
+ <KEYWORD3>tran</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+
+ <!-- PSTRES command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- /PSYMB command -->
+ <KEYWORD3>cs</KEYWORD3>
+ <KEYWORD3>ndir</KEYWORD3>
+ <KEYWORD3>,esys</KEYWORD3>
+ <KEYWORD3>ldir</KEYWORD3>
+ <KEYWORD3>layr</KEYWORD3>
+ <KEYWORD3>pcon</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>dot</KEYWORD3>
+ <KEYWORD3>xnod</KEYWORD3>
+ <KEYWORD3>defa</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+
+ <!-- PTEMP command -->
+ <KEYWORD3>none</KEYWORD3>
+
+ <!-- PTXY command -->
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+
+ <!-- PUNIT command -->
+ <KEYWORD3>ftin</KEYWORD3>
+ <KEYWORD3>metric</KEYWORD3>
+
+ <!-- PVECT command -->
+ <KEYWORD3>norm</KEYWORD3>
+ <KEYWORD3>tang</KEYWORD3>
+ <KEYWORD3>radi</KEYWORD3>
+
+ <!-- QUAD command -->
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- /RATIO command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- RBE3 command -->
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>uxyz</KEYWORD3>
+ <KEYWORD3>rxyz</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- RDELE command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- /REPLOT command -->
+ <KEYWORD3>resize</KEYWORD3>
+ <KEYWORD3>fast</KEYWORD3>
+
+ <!-- REXPORT command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>dyna</KEYWORD3>
+
+ <!-- RFORCE command -->
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>,f</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>,m</KEYWORD3>
+ <KEYWORD3>heat</KEYWORD3>
+ <KEYWORD3>flow</KEYWORD3>
+ <KEYWORD3>amps</KEYWORD3>
+ <KEYWORD3>flux</KEYWORD3>
+ <KEYWORD3>vf</KEYWORD3>
+ <KEYWORD3>csg</KEYWORD3>
+ <KEYWORD3>vltg</KEYWORD3>
+ <KEYWORD3>durt</KEYWORD3>
+
+ <!-- /RGB command -->
+ <KEYWORD3>index</KEYWORD3>
+ <KEYWORD3>cntr</KEYWORD3>
+
+ <!-- RIGID command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>ux</KEYWORD3>
+ <KEYWORD3>uy</KEYWORD3>
+ <KEYWORD3>uz</KEYWORD3>
+ <KEYWORD3>rotx</KEYWORD3>
+ <KEYWORD3>roty</KEYWORD3>
+ <KEYWORD3>rotz</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- RIMPORT command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>dyna</KEYWORD3>
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>stress</KEYWORD3>
+
+ <!-- RLIST command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- RSYS command -->
+ <KEYWORD3>solu</KEYWORD3>
+
+ <!-- SARPLOT command -->
+ <KEYWORD3>factor</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>narrow</KEYWORD3>
+
+ <!-- /SECLIB command -->
+ <KEYWORD3>read</KEYWORD3>
+ <KEYWORD3>status</KEYWORD3>
+
+ <!-- SECOFFSET command -->
+ <KEYWORD3>cent</KEYWORD3>
+ <KEYWORD3>shrc</KEYWORD3>
+ <KEYWORD3>origin</KEYWORD3>
+ <KEYWORD3>user</KEYWORD3>
+
+ <!-- SECREAD, SECWRITE commands -->
+ <KEYWORD3>library</KEYWORD3>
+ <KEYWORD3>mesh</KEYWORD3>
+
+ <!-- SECTYPE command -->
+ <KEYWORD3>beam</KEYWORD3>
+ <KEYWORD3>rect</KEYWORD3>
+ <KEYWORD3>quad</KEYWORD3>
+ <KEYWORD3>csolid</KEYWORD3>
+ <KEYWORD3>ctube</KEYWORD3>
+ <KEYWORD3>chan</KEYWORD3>
+ <KEYWORD3>i</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>,l</KEYWORD3>
+ <KEYWORD3>t</KEYWORD3>
+ <KEYWORD3>hats</KEYWORD3>
+ <KEYWORD3>hrec</KEYWORD3>
+ <KEYWORD3>asec</KEYWORD3>
+ <KEYWORD3>mesh</KEYWORD3>
+
+ <!-- SEDLIST command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- SEEXP command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- /SEG command -->
+ <KEYWORD3>singl</KEYWORD3>
+ <KEYWORD3>multi</KEYWORD3>
+ <KEYWORD3>delet</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>pc</KEYWORD3>
+
+ <!-- SESYMM command -->
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+
+ <!-- *SET command -->
+
+ <!-- SET command -->
+ <KEYWORD3>first</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>next</KEYWORD3>
+ <KEYWORD3>near</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+
+ <!-- SF command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>hflux</KEYWORD3>
+ <KEYWORD3>rad</KEYWORD3>
+ <KEYWORD3>fsi</KEYWORD3>
+ <KEYWORD3>impd</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mxwf</KEYWORD3>
+ <KEYWORD3>mci</KEYWORD3>
+ <KEYWORD3>chrgs</KEYWORD3>
+ <KEYWORD3>inf</KEYWORD3>
+ <KEYWORD3>port</KEYWORD3>
+ <KEYWORD3>shld</KEYWORD3>
+
+ <!-- SFA command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>hflux</KEYWORD3>
+ <KEYWORD3>rad</KEYWORD3>
+ <KEYWORD3>fsi</KEYWORD3>
+ <KEYWORD3>impd</KEYWORD3>
+ <KEYWORD3>mxwf</KEYWORD3>
+ <KEYWORD3>mci</KEYWORD3>
+ <KEYWORD3>mxwf</KEYWORD3>
+ <KEYWORD3>chrgs</KEYWORD3>
+ <KEYWORD3>inf</KEYWORD3>
+ <KEYWORD3>port</KEYWORD3>
+ <KEYWORD3>shld</KEYWORD3>
+
+ <!-- SFACT command -->
+ <KEYWORD3>,sf</KEYWORD3>
+ <KEYWORD3>ms</KEYWORD3>
+
+ <!-- SFADELE, SFALIST, SFBEAM commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- SFCUM command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>hflux</KEYWORD3>
+ <KEYWORD3>selv</KEYWORD3>
+ <KEYWORD3>chrgs</KEYWORD3>
+ <KEYWORD3>mxwf</KEYWORD3>
+ <KEYWORD3>inf</KEYWORD3>
+ <KEYWORD3>repl</KEYWORD3>
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>igno</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+
+ <!-- SFDELE command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>hflux</KEYWORD3>
+ <KEYWORD3>rad</KEYWORD3>
+ <KEYWORD3>mxwf</KEYWORD3>
+ <KEYWORD3>chrgs</KEYWORD3>
+ <KEYWORD3>mci</KEYWORD3>
+ <KEYWORD3>inf</KEYWORD3>
+ <KEYWORD3>selv</KEYWORD3>
+ <KEYWORD3>fsi</KEYWORD3>
+ <KEYWORD3>impd</KEYWORD3>
+ <KEYWORD3>port</KEYWORD3>
+ <KEYWORD3>shld</KEYWORD3>
+
+ <!-- SFE, SFEDELE, SFELIST commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>hflux</KEYWORD3>
+ <KEYWORD3>rad</KEYWORD3>
+ <KEYWORD3>mxwf</KEYWORD3>
+ <KEYWORD3>chrgs</KEYWORD3>
+ <KEYWORD3>mci</KEYWORD3>
+ <KEYWORD3>inf</KEYWORD3>
+ <KEYWORD3>selv</KEYWORD3>
+ <KEYWORD3>fsi</KEYWORD3>
+ <KEYWORD3>impd</KEYWORD3>
+ <KEYWORD3>port</KEYWORD3>
+ <KEYWORD3>shld</KEYWORD3>
+
+ <!-- SFFUN, SFGRAD commands -->
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>hflux</KEYWORD3>
+ <KEYWORD3>chrgs</KEYWORD3>
+ <KEYWORD3>status</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+
+ <!-- SFL, SFLDELE, SFLIST, SFLLIST, SFSCALE commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>conv</KEYWORD3>
+ <KEYWORD3>hflux</KEYWORD3>
+ <KEYWORD3>rad</KEYWORD3>
+ <KEYWORD3>fsi</KEYWORD3>
+ <KEYWORD3>impd</KEYWORD3>
+ <KEYWORD3>mci</KEYWORD3>
+ <KEYWORD3>mxwf</KEYWORD3>
+ <KEYWORD3>chrgs</KEYWORD3>
+ <KEYWORD3>inf</KEYWORD3>
+ <KEYWORD3>port</KEYWORD3>
+ <KEYWORD3>shdl</KEYWORD3>
+ <KEYWORD3>selv</KEYWORD3>
+
+ <!-- /SHADE command -->
+ <KEYWORD3>facet</KEYWORD3>
+ <KEYWORD3>gouraud</KEYWORD3>
+ <KEYWORD3>phong</KEYWORD3>
+
+ <!-- SHELL command -->
+ <KEYWORD3>top</KEYWORD3>
+ <KEYWORD3>mid</KEYWORD3>
+ <KEYWORD3>bot</KEYWORD3>
+
+ <!-- /SHOW command -->
+ <KEYWORD3>term</KEYWORD3>
+ <KEYWORD3>file</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>pscr</KEYWORD3>
+ <KEYWORD3>hpgl</KEYWORD3>
+ <KEYWORD3>hpgl2</KEYWORD3>
+ <KEYWORD3>vrml</KEYWORD3>
+
+ <!-- /SHOWDISP command -->
+ <KEYWORD3>hpgl</KEYWORD3>
+ <KEYWORD3>hpgl2</KEYWORD3>
+ <KEYWORD3>interleaf</KEYWORD3>
+ <KEYWORD3>postscript</KEYWORD3>
+ <KEYWORD3>dump</KEYWORD3>
+
+ <!-- SHPP command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>warn</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>silent</KEYWORD3>
+ <KEYWORD3>status</KEYWORD3>
+ <KEYWORD3>summary</KEYWORD3>
+ <KEYWORD3>default</KEYWORD3>
+ <KEYWORD3>object</KEYWORD3>
+ <KEYWORD3>modify</KEYWORD3>
+ <KEYWORD3>angd</KEYWORD3>
+ <KEYWORD3>aspect</KEYWORD3>
+ <KEYWORD3>paral</KEYWORD3>
+ <KEYWORD3>maxang</KEYWORD3>
+ <KEYWORD3>jacrat</KEYWORD3>
+ <KEYWORD3>warp</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>yes</KEYWORD3>
+ <KEYWORD3>no</KEYWORD3>
+
+ <!-- SLPPLOT, SLSPLOT commands -->
+ <KEYWORD3>factor</KEYWORD3>
+ <KEYWORD3>radius</KEYWORD3>
+ <KEYWORD3>length</KEYWORD3>
+
+ <!-- SMRTSIZE command -->
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>defa</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- SOLCONTROL command -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- SOLU command -->
+ <KEYWORD3>allf</KEYWORD3>
+ <KEYWORD3>aldlf</KEYWORD3>
+ <KEYWORD3>arcl</KEYWORD3>
+ <KEYWORD3>cnvg</KEYWORD3>
+ <KEYWORD3>crprat</KEYWORD3>
+ <KEYWORD3>cscv</KEYWORD3>
+ <KEYWORD3>cucv</KEYWORD3>
+ <KEYWORD3>dicv</KEYWORD3>
+ <KEYWORD3>dsprm</KEYWORD3>
+ <KEYWORD3>dtime</KEYWORD3>
+ <KEYWORD3>eqit</KEYWORD3>
+ <KEYWORD3>ffcv</KEYWORD3>
+ <KEYWORD3>focv</KEYWORD3>
+ <KEYWORD3>hfcv</KEYWORD3>
+ <KEYWORD3>nc48</KEYWORD3>
+ <KEYWORD3>nc49</KEYWORD3>
+ <KEYWORD3>ncmit</KEYWORD3>
+ <KEYWORD3>ncmls</KEYWORD3>
+ <KEYWORD3>ncmss</KEYWORD3>
+ <KEYWORD3>mfcv</KEYWORD3>
+ <KEYWORD3>mocv</KEYWORD3>
+ <KEYWORD3>mxdvl</KEYWORD3>
+ <KEYWORD3>prcv</KEYWORD3>
+ <KEYWORD3>psinc</KEYWORD3>
+ <KEYWORD3>resfrq</KEYWORD3>
+ <KEYWORD3>reseig</KEYWORD3>
+ <KEYWORD3>rocv</KEYWORD3>
+ <KEYWORD3>smcv</KEYWORD3>
+ <KEYWORD3>tecv</KEYWORD3>
+ <KEYWORD3>vecv</KEYWORD3>
+ <KEYWORD3>vocv</KEYWORD3>
+ <KEYWORD3>vmcv</KEYWORD3>
+
+ <!-- SPOPT command -->
+ <KEYWORD3>sprs</KEYWORD3>
+ <KEYWORD3>mprs</KEYWORD3>
+ <KEYWORD3>ddam</KEYWORD3>
+ <KEYWORD3>psd</KEYWORD3>
+ <KEYWORD3>no</KEYWORD3>
+ <KEYWORD3>yes</KEYWORD3>
+
+ <!-- SRSS command -->
+ <KEYWORD3>disp</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+
+ <!-- /SSCALE command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- SSTIF command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- *STATUS command -->
+ <KEYWORD3>argx</KEYWORD3>
+
+ <!-- /STATUS command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>title</KEYWORD3>
+ <KEYWORD3>units</KEYWORD3>
+ <KEYWORD3>mem</KEYWORD3>
+ <KEYWORD3>db</KEYWORD3>
+ <KEYWORD3>config</KEYWORD3>
+ <KEYWORD3>global</KEYWORD3>
+ <KEYWORD3>solu</KEYWORD3>
+ <KEYWORD3>phys</KEYWORD3>
+
+ <!-- STORE command -->
+ <KEYWORD3>merge</KEYWORD3>
+ <KEYWORD3>new</KEYWORD3>
+ <KEYWORD3>appen</KEYWORD3>
+ <KEYWORD3>alloc</KEYWORD3>
+ <KEYWORD3>psd</KEYWORD3>
+
+ <!-- SUBOPT command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>part</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+
+ <!-- SUBSET command -->
+ <KEYWORD3>first</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>next</KEYWORD3>
+ <KEYWORD3>near</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>velo</KEYWORD3>
+ <KEYWORD3>acel</KEYWORD3>
+
+ <!-- SUMTYPE command -->
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>prin</KEYWORD3>
+
+ <!-- TB command -->
+ <KEYWORD3>bkin</KEYWORD3>
+ <KEYWORD3>mkin</KEYWORD3>
+ <KEYWORD3>miso</KEYWORD3>
+ <KEYWORD3>biso</KEYWORD3>
+ <KEYWORD3>aniso</KEYWORD3>
+ <KEYWORD3>dp</KEYWORD3>
+ <KEYWORD3>melas</KEYWORD3>
+ <KEYWORD3>user</KEYWORD3>
+ <KEYWORD3>kinh</KEYWORD3>
+ <KEYWORD3>anand</KEYWORD3>
+ <KEYWORD3>creep</KEYWORD3>
+ <KEYWORD3>swell</KEYWORD3>
+ <KEYWORD3>bh</KEYWORD3>
+ <KEYWORD3>piez</KEYWORD3>
+ <KEYWORD3>fail</KEYWORD3>
+ <KEYWORD3>mooney</KEYWORD3>
+ <KEYWORD3>water</KEYWORD3>
+ <KEYWORD3>anel</KEYWORD3>
+ <KEYWORD3>concr</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>fcon</KEYWORD3>
+ <KEYWORD3>pflow</KEYWORD3>
+ <KEYWORD3>evisc</KEYWORD3>
+ <KEYWORD3>plaw</KEYWORD3>
+ <KEYWORD3>foam</KEYWORD3>
+ <KEYWORD3>honey</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>eos</KEYWORD3>
+
+ <!-- TBDELE, TBLIST commands -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- TBPLOT command -->
+ <KEYWORD3>mkin</KEYWORD3>
+ <KEYWORD3>kinh</KEYWORD3>
+ <KEYWORD3>melas</KEYWORD3>
+ <KEYWORD3>miso</KEYWORD3>
+ <KEYWORD3>bkin</KEYWORD3>
+ <KEYWORD3>biso</KEYWORD3>
+ <KEYWORD3>bh</KEYWORD3>
+ <KEYWORD3>nb</KEYWORD3>
+ <KEYWORD3>mh</KEYWORD3>
+ <KEYWORD3>sbh</KEYWORD3>
+ <KEYWORD3>snb</KEYWORD3>
+ <KEYWORD3>smh</KEYWORD3>
+
+ <!-- TBPT command -->
+ <KEYWORD3>defi</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+
+ <!-- TEE command -->
+ <KEYWORD3>wt</KEYWORD3>
+ <KEYWORD3>uft</KEYWORD3>
+
+ <!-- TERM command -->
+ <KEYWORD3>copy</KEYWORD3>
+ <KEYWORD3>loop</KEYWORD3>
+ <KEYWORD3>noprom</KEYWORD3>
+
+ <!-- TIMINT command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>struc</KEYWORD3>
+ <KEYWORD3>therm</KEYWORD3>
+ <KEYWORD3>elect</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>fluid</KEYWORD3>
+
+ <!-- TIMP command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- TRANSFER command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- /TRIAD command -->
+ <KEYWORD3>orig</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>lbot</KEYWORD3>
+ <KEYWORD3>rbot</KEYWORD3>
+ <KEYWORD3>ltop</KEYWORD3>
+ <KEYWORD3>rtop</KEYWORD3>
+
+ <!-- /TRLCY command -->
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>isurf</KEYWORD3>
+ <KEYWORD3>cm</KEYWORD3>
+ <KEYWORD3>curve</KEYWORD3>
+
+ <!-- TRNOPT command -->
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>reduc</KEYWORD3>
+ <KEYWORD3>msup</KEYWORD3>
+ <KEYWORD3>damp</KEYWORD3>
+ <KEYWORD3>nodamp</KEYWORD3>
+
+ <!-- TRPDEL, TRPLIS, TRPOIN commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- TSHAP command -->
+ <KEYWORD3>iine</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>para</KEYWORD3>
+ <KEYWORD3>arc</KEYWORD3>
+ <KEYWORD3>carc</KEYWORD3>
+ <KEYWORD3>circ</KEYWORD3>
+ <KEYWORD3>tria</KEYWORD3>
+ <KEYWORD3>tri6</KEYWORD3>
+ <KEYWORD3>quad</KEYWORD3>
+ <KEYWORD3>qua8</KEYWORD3>
+ <KEYWORD3>cyli</KEYWORD3>
+ <KEYWORD3>cone</KEYWORD3>
+ <KEYWORD3>sphe</KEYWORD3>
+ <KEYWORD3>pilo</KEYWORD3>
+
+ <!-- /TYPE command -->
+ <KEYWORD3>basic</KEYWORD3>
+ <KEYWORD3>sect</KEYWORD3>
+ <KEYWORD3>hidc</KEYWORD3>
+ <KEYWORD3>hidd</KEYWORD3>
+ <KEYWORD3>hidp</KEYWORD3>
+ <KEYWORD3>cap</KEYWORD3>
+ <KEYWORD3>zbuf</KEYWORD3>
+ <KEYWORD3>zcap</KEYWORD3>
+ <KEYWORD3>zqsl</KEYWORD3>
+ <KEYWORD3>hqsl</KEYWORD3>
+
+ <!-- /UI command -->
+ <KEYWORD3>help</KEYWORD3>
+ <KEYWORD3>view</KEYWORD3>
+ <KEYWORD3>wpse</KEYWORD3>
+ <KEYWORD3>wpvi</KEYWORD3>
+ <KEYWORD3>result</KEYWORD3>
+ <KEYWORD3>query</KEYWORD3>
+ <KEYWORD3>copy</KEYWORD3>
+ <KEYWORD3>anno</KEYWORD3>
+ <KEYWORD3>select</KEYWORD3>
+ <KEYWORD3>,nsel</KEYWORD3>
+ <KEYWORD3>,esel</KEYWORD3>
+ <KEYWORD3>,ksel</KEYWORD3>
+ <KEYWORD3>,lsel</KEYWORD3>
+ <KEYWORD3>,asel</KEYWORD3>
+ <KEYWORD3>,vsel</KEYWORD3>
+ <KEYWORD3>refresh</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>element</KEYWORD3>
+ <KEYWORD3>grid</KEYWORD3>
+ <KEYWORD3>format</KEYWORD3>
+ <KEYWORD3>pscr</KEYWORD3>
+ <KEYWORD3>tiff</KEYWORD3>
+ <KEYWORD3>epsi</KEYWORD3>
+ <KEYWORD3>bmp</KEYWORD3>
+ <KEYWORD3>wmf</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>screen</KEYWORD3>
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>graph</KEYWORD3>
+ <KEYWORD3>color</KEYWORD3>
+ <KEYWORD3>mono</KEYWORD3>
+ <KEYWORD3>grey</KEYWORD3>
+ <KEYWORD3>krev</KEYWORD3>
+ <KEYWORD3>norm</KEYWORD3>
+ <KEYWORD3>reverse</KEYWORD3>
+ <KEYWORD3>orient</KEYWORD3>
+ <KEYWORD3>landscape</KEYWORD3>
+ <KEYWORD3>portrait</KEYWORD3>
+ <KEYWORD3>compress</KEYWORD3>
+ <KEYWORD3>yes</KEYWORD3>
+ <KEYWORD3>no</KEYWORD3>
+
+ <!-- /UIS command -->
+ <KEYWORD3>msgpop</KEYWORD3>
+ <KEYWORD3>replot</KEYWORD3>
+ <KEYWORD3>abort</KEYWORD3>
+ <KEYWORD3>dyna</KEYWORD3>
+ <KEYWORD3>pick</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>defa</KEYWORD3>
+
+ <!-- /UNITS command -->
+ <KEYWORD3>user</KEYWORD3>
+ <KEYWORD3>si</KEYWORD3>
+ <KEYWORD3>cgs</KEYWORD3>
+ <KEYWORD3>bft</KEYWORD3>
+ <KEYWORD3>bin</KEYWORD3>
+
+ <!-- UPCOORD command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+
+ <!-- /USER command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- USRCAL command -->
+ <KEYWORD3>usrefl</KEYWORD3>
+ <KEYWORD3>userfl</KEYWORD3>
+ <KEYWORD3>usercv</KEYWORD3>
+ <KEYWORD3>userpr</KEYWORD3>
+ <KEYWORD3>userfx</KEYWORD3>
+ <KEYWORD3>userch</KEYWORD3>
+ <KEYWORD3>userfd</KEYWORD3>
+ <KEYWORD3>userou</KEYWORD3>
+ <KEYWORD3>usermc</KEYWORD3>
+ <KEYWORD3>usolbeg</KEYWORD3>
+ <KEYWORD3>uldbeg</KEYWORD3>
+ <KEYWORD3>ussbeg</KEYWORD3>
+ <KEYWORD3>uitbeg</KEYWORD3>
+ <KEYWORD3>uitfin</KEYWORD3>
+ <KEYWORD3>ussfin</KEYWORD3>
+ <KEYWORD3>uldfin</KEYWORD3>
+ <KEYWORD3>usolfin</KEYWORD3>
+ <KEYWORD3>uanbeg</KEYWORD3>
+ <KEYWORD3>uanfin</KEYWORD3>
+ <KEYWORD3>uelmatx</KEYWORD3>
+
+ <!-- VA, VADD, VCLEAR, /VCONE, VCVFILL, VDELE, VDGL, VDRAG, VEXT commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- *VFILL command -->
+ <KEYWORD3>data</KEYWORD3>
+ <KEYWORD3>ramp</KEYWORD3>
+ <KEYWORD3>rand</KEYWORD3>
+ <KEYWORD3>gdis</KEYWORD3>
+ <KEYWORD3>tria</KEYWORD3>
+ <KEYWORD3>beta</KEYWORD3>
+ <KEYWORD3>gamm</KEYWORD3>
+
+ <!-- *VFUN command -->
+ <KEYWORD3>acos</KEYWORD3>
+ <KEYWORD3>asin</KEYWORD3>
+ <KEYWORD3>asort</KEYWORD3>
+ <KEYWORD3>atan</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>copy</KEYWORD3>
+ <KEYWORD3>cos</KEYWORD3>
+ <KEYWORD3>cosh</KEYWORD3>
+ <KEYWORD3>dircos</KEYWORD3>
+ <KEYWORD3>dsort</KEYWORD3>
+ <KEYWORD3>euler</KEYWORD3>
+ <KEYWORD3>exp</KEYWORD3>
+ <KEYWORD3>expa</KEYWORD3>
+ <KEYWORD3>log</KEYWORD3>
+ <KEYWORD3>log10</KEYWORD3>
+ <KEYWORD3>nint</KEYWORD3>
+ <KEYWORD3>not</KEYWORD3>
+ <KEYWORD3>pwr</KEYWORD3>
+ <KEYWORD3>sin</KEYWORD3>
+ <KEYWORD3>sinh</KEYWORD3>
+ <KEYWORD3>sqrt</KEYWORD3>
+ <KEYWORD3>tan</KEYWORD3>
+ <KEYWORD3>tanh</KEYWORD3>
+ <KEYWORD3>tang</KEYWORD3>
+ <KEYWORD3>norm</KEYWORD3>
+ <KEYWORD3>local</KEYWORD3>
+ <KEYWORD3>global</KEYWORD3>
+
+ <!-- VGEN command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- *VGET command -->
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>ang</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>zx</KEYWORD3>
+ <KEYWORD3>,nsel</KEYWORD3>
+
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>cent</KEYWORD3>
+ <KEYWORD3>adj</KEYWORD3>
+ <KEYWORD3>attr</KEYWORD3>
+ <KEYWORD3>geom</KEYWORD3>
+ <KEYWORD3>,esel</KEYWORD3>
+ <KEYWORD3>shpar</KEYWORD3>
+
+ <KEYWORD3>kp</KEYWORD3>
+ <KEYWORD3>div</KEYWORD3>
+ <KEYWORD3>,ksel</KEYWORD3>
+
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>leng</KEYWORD3>
+ <KEYWORD3>,lsel</KEYWORD3>
+
+ <KEYWORD3>area</KEYWORD3>
+ <KEYWORD3>loop</KEYWORD3>
+ <KEYWORD3>,asel</KEYWORD3>
+
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>shell</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>,vsel</KEYWORD3>
+
+ <KEYWORD3>cdsy</KEYWORD3>
+
+ <KEYWORD3>rcon</KEYWORD3>
+ <KEYWORD3>const</KEYWORD3>
+
+ <KEYWORD3>const</KEYWORD3>
+ <KEYWORD3>bkin</KEYWORD3>
+ <KEYWORD3>mkin</KEYWORD3>
+ <KEYWORD3>miso</KEYWORD3>
+ <KEYWORD3>biso</KEYWORD3>
+ <KEYWORD3>aniso</KEYWORD3>
+ <KEYWORD3>dp</KEYWORD3>
+ <KEYWORD3>melas</KEYWORD3>
+ <KEYWORD3>user</KEYWORD3>
+ <KEYWORD3>kinh</KEYWORD3>
+ <KEYWORD3>anand</KEYWORD3>
+ <KEYWORD3>creep</KEYWORD3>
+ <KEYWORD3>swell</KEYWORD3>
+ <KEYWORD3>bh</KEYWORD3>
+ <KEYWORD3>piez</KEYWORD3>
+ <KEYWORD3>fail</KEYWORD3>
+ <KEYWORD3>mooney</KEYWORD3>
+ <KEYWORD3>water</KEYWORD3>
+ <KEYWORD3>anel</KEYWORD3>
+ <KEYWORD3>concr</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>fcon</KEYWORD3>
+ <KEYWORD3>pflow</KEYWORD3>
+ <KEYWORD3>evisc</KEYWORD3>
+ <KEYWORD3>plaw</KEYWORD3>
+ <KEYWORD3>foam</KEYWORD3>
+ <KEYWORD3>honey</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>eos</KEYWORD3>
+
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>hs</KEYWORD3>
+ <KEYWORD3>bfe</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+
+ <KEYWORD3>etab</KEYWORD3>
+
+ <!-- VGLUE, VIMP, VINP, VINV, VLIST, VLSCALE, VMESH, VOFFST commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- /VIEW command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>wp</KEYWORD3>
+
+ <!-- *VOPER command -->
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>sub</KEYWORD3>
+ <KEYWORD3>mult</KEYWORD3>
+ <KEYWORD3>div</KEYWORD3>
+ <KEYWORD3>min</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>lt</KEYWORD3>
+ <KEYWORD3>le</KEYWORD3>
+ <KEYWORD3>eq</KEYWORD3>
+ <KEYWORD3>ne</KEYWORD3>
+ <KEYWORD3>ge</KEYWORD3>
+ <KEYWORD3>gt</KEYWORD3>
+ <KEYWORD3>der1</KEYWORD3>
+ <KEYWORD3>der2</KEYWORD3>
+ <KEYWORD3>int1</KEYWORD3>
+ <KEYWORD3>int2</KEYWORD3>
+ <KEYWORD3>dot</KEYWORD3>
+ <KEYWORD3>cross</KEYWORD3>
+ <KEYWORD3>gath</KEYWORD3>
+ <KEYWORD3>scat</KEYWORD3>
+
+ <!-- VOVLAP, VPTN commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- VPLOT command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>dege</KEYWORD3>
+
+ <!-- *VPUT command -->
+ <KEYWORD3>node</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>rot</KEYWORD3>
+ <KEYWORD3>temp</KEYWORD3>
+ <KEYWORD3>pres</KEYWORD3>
+ <KEYWORD3>volt</KEYWORD3>
+ <KEYWORD3>mag</KEYWORD3>
+ <KEYWORD3>v</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>curr</KEYWORD3>
+ <KEYWORD3>emf</KEYWORD3>
+ <KEYWORD3>enke</KEYWORD3>
+ <KEYWORD3>ends</KEYWORD3>
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>xy</KEYWORD3>
+ <KEYWORD3>yz</KEYWORD3>
+ <KEYWORD3>xz</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>epto</KEYWORD3>
+ <KEYWORD3>epel</KEYWORD3>
+ <KEYWORD3>eppl</KEYWORD3>
+ <KEYWORD3>epcr</KEYWORD3>
+ <KEYWORD3>epth</KEYWORD3>
+ <KEYWORD3>epsw</KEYWORD3>
+ <KEYWORD3>nl</KEYWORD3>
+ <KEYWORD3>sepl</KEYWORD3>
+ <KEYWORD3>srat</KEYWORD3>
+ <KEYWORD3>hpres</KEYWORD3>
+ <KEYWORD3>epeq</KEYWORD3>
+ <KEYWORD3>psv</KEYWORD3>
+ <KEYWORD3>plwk</KEYWORD3>
+ <KEYWORD3>tg</KEYWORD3>
+ <KEYWORD3>tf</KEYWORD3>
+ <KEYWORD3>pg</KEYWORD3>
+ <KEYWORD3>ef</KEYWORD3>
+ <KEYWORD3>,d</KEYWORD3>
+ <KEYWORD3>h</KEYWORD3>
+ <KEYWORD3>b</KEYWORD3>
+ <KEYWORD3>fmag</KEYWORD3>
+ <KEYWORD3>ttot</KEYWORD3>
+ <KEYWORD3>hflu</KEYWORD3>
+ <KEYWORD3>hflm</KEYWORD3>
+ <KEYWORD3>cond</KEYWORD3>
+ <KEYWORD3>pcoe</KEYWORD3>
+ <KEYWORD3>ptot</KEYWORD3>
+ <KEYWORD3>mach</KEYWORD3>
+ <KEYWORD3>strm</KEYWORD3>
+ <KEYWORD3>dens</KEYWORD3>
+ <KEYWORD3>visc</KEYWORD3>
+ <KEYWORD3>evis</KEYWORD3>
+ <KEYWORD3>econ</KEYWORD3>
+ <KEYWORD3>yplu</KEYWORD3>
+ <KEYWORD3>tauw</KEYWORD3>
+
+ <KEYWORD3>elem</KEYWORD3>
+ <KEYWORD3>etab</KEYWORD3>
+
+ <!-- VROTAT command -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- VSBA, VSBV, VSBW commands -->
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>sepo</KEYWORD3>
+ <KEYWORD3>delete</KEYWORD3>
+ <KEYWORD3>keep</KEYWORD3>
+
+ <!-- *VSCFUN command -->
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>min</KEYWORD3>
+ <KEYWORD3>lmax</KEYWORD3>
+ <KEYWORD3>lmin</KEYWORD3>
+ <KEYWORD3>first</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>medi</KEYWORD3>
+ <KEYWORD3>mean</KEYWORD3>
+ <KEYWORD3>vari</KEYWORD3>
+ <KEYWORD3>stdv</KEYWORD3>
+ <KEYWORD3>rms</KEYWORD3>
+ <KEYWORD3>num</KEYWORD3>
+
+ <!-- VSEL, VSLA commands -->
+ <KEYWORD3>s</KEYWORD3>
+ <KEYWORD3>,r</KEYWORD3>
+ <KEYWORD3>,a</KEYWORD3>
+ <KEYWORD3>u</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>inve</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>volu</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>,mat</KEYWORD3>
+ <KEYWORD3>,type</KEYWORD3>
+ <KEYWORD3>,real</KEYWORD3>
+ <KEYWORD3>,esys</KEYWORD3>
+
+ <!-- VSUM command -->
+ <KEYWORD3>default</KEYWORD3>
+ <KEYWORD3>fine</KEYWORD3>
+
+ <!-- VSWEEP command -->
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- VSYMM, VTRAN, /VUP commands -->
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>p</KEYWORD3>
+ <KEYWORD3>-x</KEYWORD3>
+ <KEYWORD3>-y</KEYWORD3>
+ <KEYWORD3>-z</KEYWORD3>
+
+ <!-- WAVES command -->
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>rms</KEYWORD3>
+
+ <!-- /WINDOW command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>full</KEYWORD3>
+ <KEYWORD3>left</KEYWORD3>
+ <KEYWORD3>righ</KEYWORD3>
+ <KEYWORD3>top</KEYWORD3>
+ <KEYWORD3>bot</KEYWORD3>
+ <KEYWORD3>ltop</KEYWORD3>
+ <KEYWORD3>lbot</KEYWORD3>
+ <KEYWORD3>rtop</KEYWORD3>
+ <KEYWORD3>rbot</KEYWORD3>
+ <KEYWORD3>squa</KEYWORD3>
+ <KEYWORD3>dele</KEYWORD3>
+
+ <!-- WPAVE command -->
+ <KEYWORD3>p</KEYWORD3>
+
+ <!-- WSORT command -->
+ <KEYWORD3>x</KEYWORD3>
+ <KEYWORD3>y</KEYWORD3>
+ <KEYWORD3>z</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>rms</KEYWORD3>
+
+ <!-- WSTART command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- /YRANGE command -->
+ <KEYWORD3>all</KEYWORD3>
+
+ <!-- /ZOOM command -->
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>back</KEYWORD3>
+ <KEYWORD3>scrn</KEYWORD3>
+ <KEYWORD3>rect</KEYWORD3>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/applescript.xml b/jEdit/modes/applescript.xml
index 665fc8a..edb1e00 100644
--- a/jEdit/modes/applescript.xml
+++ b/jEdit/modes/applescript.xml
@@ -1,280 +1,280 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- AppleScript mode by Kris Kopicki (21/8/2002) -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="commentStart" VALUE="(*" />
- <PROPERTY NAME="commentEnd" VALUE="*)" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>(*</BEGIN>
- <END>*)</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">Â</SEQ>
-
- <!-- Constants -->
- <SEQ_REGEXP
- TYPE="LITERAL2"
- HASH_CHAR="application"
- AT_WORD_START="TRUE"
- >application[\t\s]+responses</SEQ_REGEXP>
- <SEQ_REGEXP
- TYPE="LITERAL2"
- HASH_CHAR="current"
- AT_WORD_START="TRUE"
- >current[\t\s]+application</SEQ_REGEXP>
- <SEQ_REGEXP
- TYPE="LITERAL2"
- HASH_CHAR="white"
- AT_WORD_START="TRUE"
- >white[\t\s]+space</SEQ_REGEXP>
-
- <!-- Text Styles -->
- <SEQ_REGEXP
- TYPE="LITERAL2"
- HASH_CHAR="all"
- >all[\t\s]+caps</SEQ_REGEXP>
- <SEQ_REGEXP
- TYPE="LITERAL2"
- HASH_CHAR="all"
- AT_WORD_START="TRUE"
- >all[\t\s]+lowercase</SEQ_REGEXP>
- <SEQ_REGEXP
- TYPE="LITERAL2"
- HASH_CHAR="small"
- AT_WORD_START="TRUE"
- >small[\t\s]+caps</SEQ_REGEXP>
-
- <!-- Predefined Variables -->
- <SEQ_REGEXP
- TYPE="KEYWORD3"
- HASH_CHAR="missing"
- AT_WORD_START="TRUE"
- >missing[\t\s]+value</SEQ_REGEXP>
-
- <KEYWORDS>
- <!-- Keywords -->
- <KEYWORD1>script</KEYWORD1>
- <KEYWORD1>property</KEYWORD1>
- <KEYWORD1>prop</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>global</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>given</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
- <KEYWORD1>without</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>tell</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>times</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>from</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>error</KEYWORD1>
- <KEYWORD1>considering</KEYWORD1>
- <KEYWORD1>ignoring</KEYWORD1>
- <KEYWORD1>timeout</KEYWORD1>
- <KEYWORD1>transaction</KEYWORD1>
- <KEYWORD1>my</KEYWORD1>
- <KEYWORD1>get</KEYWORD1>
- <KEYWORD1>put</KEYWORD1>
- <KEYWORD1>into</KEYWORD1>
- <KEYWORD1>is</KEYWORD1>
-
- <!-- References -->
- <KEYWORD2>each</KEYWORD2>
- <KEYWORD2>some</KEYWORD2>
- <KEYWORD2>every</KEYWORD2>
- <KEYWORD2>whose</KEYWORD2>
- <KEYWORD2>where</KEYWORD2>
- <KEYWORD2>id</KEYWORD2>
- <KEYWORD2>index</KEYWORD2>
- <KEYWORD2>first</KEYWORD2>
- <KEYWORD2>second</KEYWORD2>
- <KEYWORD2>third</KEYWORD2>
- <KEYWORD2>fourth</KEYWORD2>
- <KEYWORD2>fifth</KEYWORD2>
- <KEYWORD2>sixth</KEYWORD2>
- <KEYWORD2>seventh</KEYWORD2>
- <KEYWORD2>eighth</KEYWORD2>
- <KEYWORD2>ninth</KEYWORD2>
- <KEYWORD2>tenth</KEYWORD2>
- <KEYWORD2>last</KEYWORD2>
- <KEYWORD2>front</KEYWORD2>
- <KEYWORD2>back</KEYWORD2>
- <KEYWORD2>st</KEYWORD2>
- <KEYWORD2>nd</KEYWORD2>
- <KEYWORD2>rd</KEYWORD2>
- <KEYWORD2>th</KEYWORD2>
- <KEYWORD2>middle</KEYWORD2>
- <KEYWORD2>named</KEYWORD2>
- <KEYWORD2>through</KEYWORD2>
- <KEYWORD2>thru</KEYWORD2>
- <KEYWORD2>before</KEYWORD2>
- <KEYWORD2>after</KEYWORD2>
- <KEYWORD2>beginning</KEYWORD2>
- <KEYWORD2>the</KEYWORD2>
-
- <!-- Commands -->
- <KEYWORD3>close</KEYWORD3>
- <KEYWORD3>copy</KEYWORD3>
- <KEYWORD3>count</KEYWORD3>
- <KEYWORD3>delete</KEYWORD3>
- <KEYWORD3>duplicate</KEYWORD3>
- <KEYWORD3>exists</KEYWORD3>
- <KEYWORD3>launch</KEYWORD3>
- <KEYWORD3>make</KEYWORD3>
- <KEYWORD3>move</KEYWORD3>
- <KEYWORD3>open</KEYWORD3>
- <KEYWORD3>print</KEYWORD3>
- <KEYWORD3>quit</KEYWORD3>
- <KEYWORD3>reopen</KEYWORD3>
- <KEYWORD3>run</KEYWORD3>
- <KEYWORD3>save</KEYWORD3>
- <KEYWORD3>saving</KEYWORD3>
-
- <!-- Predefined Variables -->
- <LITERAL2>it</LITERAL2>
- <LITERAL2>me</LITERAL2>
- <LITERAL2>version</LITERAL2>
- <LITERAL2>pi</LITERAL2>
- <LITERAL2>result</LITERAL2>
- <LITERAL2>space</LITERAL2>
- <LITERAL2>tab</LITERAL2>
- <LITERAL2>anything</LITERAL2>
-
- <!-- Constants -->
- <LITERAL2>case</LITERAL2>
- <LITERAL2>diacriticals</LITERAL2>
- <LITERAL2>expansion</LITERAL2>
- <LITERAL2>hyphens</LITERAL2>
- <LITERAL2>punctuation</LITERAL2>
-
- <!-- Text Styles -->
- <LITERAL2>bold</LITERAL2>
- <LITERAL2>condensed</LITERAL2>
- <LITERAL2>expanded</LITERAL2>
- <LITERAL2>hidden</LITERAL2>
- <LITERAL2>italic</LITERAL2>
- <LITERAL2>outline</LITERAL2>
- <LITERAL2>plain</LITERAL2>
- <LITERAL2>shadow</LITERAL2>
- <LITERAL2>strikethrough</LITERAL2>
- <LITERAL2>subscript</LITERAL2>
- <LITERAL2>superscript</LITERAL2>
- <LITERAL2>underline</LITERAL2>
-
- <!-- Save options -->
- <LITERAL2>ask</LITERAL2>
- <LITERAL2>no</LITERAL2>
- <LITERAL2>yes</LITERAL2>
-
- <!-- Booleans -->
- <LITERAL2>false</LITERAL2>
- <LITERAL2>true</LITERAL2>
-
- <!-- Date & Time -->
- <LITERAL2>weekday</LITERAL2>
- <LITERAL2>monday</LITERAL2>
- <LITERAL2>mon</LITERAL2>
- <LITERAL2>tuesday</LITERAL2>
- <LITERAL2>tue</LITERAL2>
- <LITERAL2>wednesday</LITERAL2>
- <LITERAL2>wed</LITERAL2>
- <LITERAL2>thursday</LITERAL2>
- <LITERAL2>thu</LITERAL2>
- <LITERAL2>friday</LITERAL2>
- <LITERAL2>fri</LITERAL2>
- <LITERAL2>saturday</LITERAL2>
- <LITERAL2>sat</LITERAL2>
- <LITERAL2>sunday</LITERAL2>
- <LITERAL2>sun</LITERAL2>
-
- <LITERAL2>month</LITERAL2>
- <LITERAL2>january</LITERAL2>
- <LITERAL2>jan</LITERAL2>
- <LITERAL2>february</LITERAL2>
- <LITERAL2>feb</LITERAL2>
- <LITERAL2>march</LITERAL2>
- <LITERAL2>mar</LITERAL2>
- <LITERAL2>april</LITERAL2>
- <LITERAL2>apr</LITERAL2>
- <LITERAL2>may</LITERAL2>
- <LITERAL2>june</LITERAL2>
- <LITERAL2>jun</LITERAL2>
- <LITERAL2>july</LITERAL2>
- <LITERAL2>jul</LITERAL2>
- <LITERAL2>august</LITERAL2>
- <LITERAL2>aug</LITERAL2>
- <LITERAL2>september</LITERAL2>
- <LITERAL2>sep</LITERAL2>
- <LITERAL2>october</LITERAL2>
- <LITERAL2>oct</LITERAL2>
- <LITERAL2>november</LITERAL2>
- <LITERAL2>nov</LITERAL2>
- <LITERAL2>december</LITERAL2>
- <LITERAL2>dec</LITERAL2>
-
- <LITERAL2>minutes</LITERAL2>
- <LITERAL2>hours</LITERAL2>
- <LITERAL2>days</LITERAL2>
- <LITERAL2>weeks</LITERAL2>
-
- <!-- Operators -->
- <OPERATOR>div</OPERATOR>
- <OPERATOR>mod</OPERATOR>
- <OPERATOR>and</OPERATOR>
- <OPERATOR>not</OPERATOR>
- <OPERATOR>or</OPERATOR>
- <OPERATOR>as</OPERATOR>
- <OPERATOR>contains</OPERATOR>
- <OPERATOR>equal</OPERATOR>
- <OPERATOR>equals</OPERATOR>
- <OPERATOR>isn't</OPERATOR>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- AppleScript mode by Kris Kopicki (21/8/2002) -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="commentStart" VALUE="(*" />
+ <PROPERTY NAME="commentEnd" VALUE="*)" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>(*</BEGIN>
+ <END>*)</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">Â</SEQ>
+
+ <!-- Constants -->
+ <SEQ_REGEXP
+ TYPE="LITERAL2"
+ HASH_CHAR="application"
+ AT_WORD_START="TRUE"
+ >application[\t\s]+responses</SEQ_REGEXP>
+ <SEQ_REGEXP
+ TYPE="LITERAL2"
+ HASH_CHAR="current"
+ AT_WORD_START="TRUE"
+ >current[\t\s]+application</SEQ_REGEXP>
+ <SEQ_REGEXP
+ TYPE="LITERAL2"
+ HASH_CHAR="white"
+ AT_WORD_START="TRUE"
+ >white[\t\s]+space</SEQ_REGEXP>
+
+ <!-- Text Styles -->
+ <SEQ_REGEXP
+ TYPE="LITERAL2"
+ HASH_CHAR="all"
+ >all[\t\s]+caps</SEQ_REGEXP>
+ <SEQ_REGEXP
+ TYPE="LITERAL2"
+ HASH_CHAR="all"
+ AT_WORD_START="TRUE"
+ >all[\t\s]+lowercase</SEQ_REGEXP>
+ <SEQ_REGEXP
+ TYPE="LITERAL2"
+ HASH_CHAR="small"
+ AT_WORD_START="TRUE"
+ >small[\t\s]+caps</SEQ_REGEXP>
+
+ <!-- Predefined Variables -->
+ <SEQ_REGEXP
+ TYPE="KEYWORD3"
+ HASH_CHAR="missing"
+ AT_WORD_START="TRUE"
+ >missing[\t\s]+value</SEQ_REGEXP>
+
+ <KEYWORDS>
+ <!-- Keywords -->
+ <KEYWORD1>script</KEYWORD1>
+ <KEYWORD1>property</KEYWORD1>
+ <KEYWORD1>prop</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>global</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>of</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>given</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+ <KEYWORD1>without</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>tell</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>times</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>from</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>error</KEYWORD1>
+ <KEYWORD1>considering</KEYWORD1>
+ <KEYWORD1>ignoring</KEYWORD1>
+ <KEYWORD1>timeout</KEYWORD1>
+ <KEYWORD1>transaction</KEYWORD1>
+ <KEYWORD1>my</KEYWORD1>
+ <KEYWORD1>get</KEYWORD1>
+ <KEYWORD1>put</KEYWORD1>
+ <KEYWORD1>into</KEYWORD1>
+ <KEYWORD1>is</KEYWORD1>
+
+ <!-- References -->
+ <KEYWORD2>each</KEYWORD2>
+ <KEYWORD2>some</KEYWORD2>
+ <KEYWORD2>every</KEYWORD2>
+ <KEYWORD2>whose</KEYWORD2>
+ <KEYWORD2>where</KEYWORD2>
+ <KEYWORD2>id</KEYWORD2>
+ <KEYWORD2>index</KEYWORD2>
+ <KEYWORD2>first</KEYWORD2>
+ <KEYWORD2>second</KEYWORD2>
+ <KEYWORD2>third</KEYWORD2>
+ <KEYWORD2>fourth</KEYWORD2>
+ <KEYWORD2>fifth</KEYWORD2>
+ <KEYWORD2>sixth</KEYWORD2>
+ <KEYWORD2>seventh</KEYWORD2>
+ <KEYWORD2>eighth</KEYWORD2>
+ <KEYWORD2>ninth</KEYWORD2>
+ <KEYWORD2>tenth</KEYWORD2>
+ <KEYWORD2>last</KEYWORD2>
+ <KEYWORD2>front</KEYWORD2>
+ <KEYWORD2>back</KEYWORD2>
+ <KEYWORD2>st</KEYWORD2>
+ <KEYWORD2>nd</KEYWORD2>
+ <KEYWORD2>rd</KEYWORD2>
+ <KEYWORD2>th</KEYWORD2>
+ <KEYWORD2>middle</KEYWORD2>
+ <KEYWORD2>named</KEYWORD2>
+ <KEYWORD2>through</KEYWORD2>
+ <KEYWORD2>thru</KEYWORD2>
+ <KEYWORD2>before</KEYWORD2>
+ <KEYWORD2>after</KEYWORD2>
+ <KEYWORD2>beginning</KEYWORD2>
+ <KEYWORD2>the</KEYWORD2>
+
+ <!-- Commands -->
+ <KEYWORD3>close</KEYWORD3>
+ <KEYWORD3>copy</KEYWORD3>
+ <KEYWORD3>count</KEYWORD3>
+ <KEYWORD3>delete</KEYWORD3>
+ <KEYWORD3>duplicate</KEYWORD3>
+ <KEYWORD3>exists</KEYWORD3>
+ <KEYWORD3>launch</KEYWORD3>
+ <KEYWORD3>make</KEYWORD3>
+ <KEYWORD3>move</KEYWORD3>
+ <KEYWORD3>open</KEYWORD3>
+ <KEYWORD3>print</KEYWORD3>
+ <KEYWORD3>quit</KEYWORD3>
+ <KEYWORD3>reopen</KEYWORD3>
+ <KEYWORD3>run</KEYWORD3>
+ <KEYWORD3>save</KEYWORD3>
+ <KEYWORD3>saving</KEYWORD3>
+
+ <!-- Predefined Variables -->
+ <LITERAL2>it</LITERAL2>
+ <LITERAL2>me</LITERAL2>
+ <LITERAL2>version</LITERAL2>
+ <LITERAL2>pi</LITERAL2>
+ <LITERAL2>result</LITERAL2>
+ <LITERAL2>space</LITERAL2>
+ <LITERAL2>tab</LITERAL2>
+ <LITERAL2>anything</LITERAL2>
+
+ <!-- Constants -->
+ <LITERAL2>case</LITERAL2>
+ <LITERAL2>diacriticals</LITERAL2>
+ <LITERAL2>expansion</LITERAL2>
+ <LITERAL2>hyphens</LITERAL2>
+ <LITERAL2>punctuation</LITERAL2>
+
+ <!-- Text Styles -->
+ <LITERAL2>bold</LITERAL2>
+ <LITERAL2>condensed</LITERAL2>
+ <LITERAL2>expanded</LITERAL2>
+ <LITERAL2>hidden</LITERAL2>
+ <LITERAL2>italic</LITERAL2>
+ <LITERAL2>outline</LITERAL2>
+ <LITERAL2>plain</LITERAL2>
+ <LITERAL2>shadow</LITERAL2>
+ <LITERAL2>strikethrough</LITERAL2>
+ <LITERAL2>subscript</LITERAL2>
+ <LITERAL2>superscript</LITERAL2>
+ <LITERAL2>underline</LITERAL2>
+
+ <!-- Save options -->
+ <LITERAL2>ask</LITERAL2>
+ <LITERAL2>no</LITERAL2>
+ <LITERAL2>yes</LITERAL2>
+
+ <!-- Booleans -->
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+
+ <!-- Date & Time -->
+ <LITERAL2>weekday</LITERAL2>
+ <LITERAL2>monday</LITERAL2>
+ <LITERAL2>mon</LITERAL2>
+ <LITERAL2>tuesday</LITERAL2>
+ <LITERAL2>tue</LITERAL2>
+ <LITERAL2>wednesday</LITERAL2>
+ <LITERAL2>wed</LITERAL2>
+ <LITERAL2>thursday</LITERAL2>
+ <LITERAL2>thu</LITERAL2>
+ <LITERAL2>friday</LITERAL2>
+ <LITERAL2>fri</LITERAL2>
+ <LITERAL2>saturday</LITERAL2>
+ <LITERAL2>sat</LITERAL2>
+ <LITERAL2>sunday</LITERAL2>
+ <LITERAL2>sun</LITERAL2>
+
+ <LITERAL2>month</LITERAL2>
+ <LITERAL2>january</LITERAL2>
+ <LITERAL2>jan</LITERAL2>
+ <LITERAL2>february</LITERAL2>
+ <LITERAL2>feb</LITERAL2>
+ <LITERAL2>march</LITERAL2>
+ <LITERAL2>mar</LITERAL2>
+ <LITERAL2>april</LITERAL2>
+ <LITERAL2>apr</LITERAL2>
+ <LITERAL2>may</LITERAL2>
+ <LITERAL2>june</LITERAL2>
+ <LITERAL2>jun</LITERAL2>
+ <LITERAL2>july</LITERAL2>
+ <LITERAL2>jul</LITERAL2>
+ <LITERAL2>august</LITERAL2>
+ <LITERAL2>aug</LITERAL2>
+ <LITERAL2>september</LITERAL2>
+ <LITERAL2>sep</LITERAL2>
+ <LITERAL2>october</LITERAL2>
+ <LITERAL2>oct</LITERAL2>
+ <LITERAL2>november</LITERAL2>
+ <LITERAL2>nov</LITERAL2>
+ <LITERAL2>december</LITERAL2>
+ <LITERAL2>dec</LITERAL2>
+
+ <LITERAL2>minutes</LITERAL2>
+ <LITERAL2>hours</LITERAL2>
+ <LITERAL2>days</LITERAL2>
+ <LITERAL2>weeks</LITERAL2>
+
+ <!-- Operators -->
+ <OPERATOR>div</OPERATOR>
+ <OPERATOR>mod</OPERATOR>
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>as</OPERATOR>
+ <OPERATOR>contains</OPERATOR>
+ <OPERATOR>equal</OPERATOR>
+ <OPERATOR>equals</OPERATOR>
+ <OPERATOR>isn't</OPERATOR>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/asp.xml b/jEdit/modes/asp.xml
index 01735ba..9bb08a5 100644
--- a/jEdit/modes/asp.xml
+++ b/jEdit/modes/asp.xml
@@ -1,518 +1,518 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- ASP mode by Andre Kaplan
- Updated by Simon Ruggier -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE">
- <SEQ TYPE="MARKUP" DELEGATE="ASPVB"><%@LANGUAGE="VBSCRIPT"%</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="ASPJS"><%@LANGUAGE="JSCRIPT"%</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="ASPJS"><%@LANGUAGE="JAVASCRIPT"%</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="ASPPL"><%@LANGUAGE="PERLSCRIPT"%</SEQ>
-
- <!-- Inlined server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- Server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><script language="vbscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-side Javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="jscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="javascript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-side PerlScript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><script language="perlscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Client-side javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
- <BEGIN><script language="jscript"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
- <BEGIN><script language="javascript"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
- <BEGIN><script></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-Side include -->
- <SPAN TYPE="MARKUP">
- <BEGIN><!--#</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1" DELEGATE="ASPVB_SGML">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_STYLE">
- <BEGIN><STYLE></BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <!-- ******************************************************************
- ASP with VBScript as default script engine
- ****************************************************************** -->
- <RULES SET="ASPVB" IGNORE_CASE="TRUE">
- <!-- Inlined server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- Server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><script language="vbscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-side Javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="jscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="javascript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-side PerlScript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><script language="perlscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Client-side javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
- <BEGIN><script language="jscript"</BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
- <BEGIN><script language="javascript"</BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
- <BEGIN><script></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-Side include -->
- <SPAN TYPE="MARKUP">
- <BEGIN><!--#</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1" DELEGATE="ASPVB_SGML">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_STYLE">
- <BEGIN><STYLE></BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_TAGS">
- <BEGIN></</BEGIN>
- <END>></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPVB_TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <!-- ******************************************************************
- ASP with JScript as default script engine
- ****************************************************************** -->
- <RULES SET="ASPJS" IGNORE_CASE="TRUE">
- <!-- Inlined server-side Javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- Server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><script language="vbscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-side Javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="jscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="javascript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-side PerlScript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><script language="perlscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Client-side javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPJS_CSJS">
- <BEGIN><script language="jscript"</BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPJS_CSJS">
- <BEGIN><script language="javascript"</BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPJS_CSJS">
- <BEGIN><script></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-Side include -->
- <SPAN TYPE="MARKUP">
- <BEGIN><!--#</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1" DELEGATE="ASPJS_SGML">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPJS_STYLE">
- <BEGIN><STYLE></BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPJS_TAGS">
- <BEGIN></</BEGIN>
- <END>></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPJS_TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <!-- ******************************************************************
- ASP with PerlScript as default script engine
- ****************************************************************** -->
- <RULES SET="ASPPL" IGNORE_CASE="TRUE">
- <!-- Inlined server-side Perlscript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- Server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><script language="vbscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-side Javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="jscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="javascript" runat="server"</BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-side PerlScript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><script language="perlscript" runat="server"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Client-side javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPPL_CSJS">
- <BEGIN><script language="jscript"</BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPPL_CSJS">
- <BEGIN><script language="javascript"</BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPPL_CSJS">
- <BEGIN><script></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-Side include -->
- <SPAN TYPE="MARKUP">
- <BEGIN><!--#</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1" DELEGATE="ASPPL_SGML">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPPL_STYLE">
- <BEGIN><STYLE></BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="ASPPL_TAGS">
- <BEGIN></</BEGIN>
- <END>></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="ASPPL_TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <!-- ******************************************************************
- HTML Tags
- ****************************************************************** -->
- <RULES SET="ASPVB_TAGS" DEFAULT="MARKUP">
- <!-- Server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE ="ASPVB_LIT1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE ="ASPVB_LIT1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- </RULES>
-
- <RULES SET="ASPVB_LIT1" DEFAULT="LITERAL1">
- <!-- Server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
-
- <RULES SET="ASPJS_TAGS" DEFAULT="MARKUP">
- <!-- Server-side JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE ="ASPJS_LIT1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE ="ASPJS_LIT1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- </RULES>
-
- <RULES SET="ASPJS_LIT1" DEFAULT="LITERAL1">
- <!-- Server-side JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
-
- <RULES SET="ASPPL_TAGS" DEFAULT="MARKUP">
- <!-- Server-side PerlScript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE ="ASPPL_LIT1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE ="ASPPL_LIT1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- </RULES>
-
- <RULES SET="ASPPL_LIT1" DEFAULT="LITERAL1">
- <!-- Server-side PerlScript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
-
- <!-- These three rules sets handle server side scripts being mixed into client side javascript -->
- <RULES SET="ASPVB_CSJS">
- <!-- Server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- <IMPORT DELEGATE="javascript::MAIN"/>
- </RULES>
-
- <RULES SET="ASPJS_CSJS">
- <!-- Server-side JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- <IMPORT DELEGATE="javascript::MAIN"/>
- </RULES>
-
- <RULES SET="ASPPL_CSJS">
- <!-- Server-side PerlScript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- <IMPORT DELEGATE="javascript::MAIN"/>
- </RULES>
-
- <!-- These three rules sets handle server side scripts being mixed into stylesheets -->
- <RULES SET="ASPVB_STYLE">
- <!-- Server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- <IMPORT DELEGATE="css::MAIN"/>
- </RULES>
-
- <RULES SET="ASPJS_STYLE">
- <!-- Server-side JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- <IMPORT DELEGATE="css::MAIN"/>
- </RULES>
-
- <RULES SET="ASPPL_STYLE">
- <!-- Server-side PerlScript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- <IMPORT DELEGATE="css::MAIN"/>
- </RULES>
-
- <!-- These three rules sets handle server side scripts being mixed into SGML Comments -->
- <RULES SET="ASPVB_SGML" DEFAULT="COMMENT1">
- <!-- Server-side VBScript -->
- <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
-
- <RULES SET="ASPJS_SGML" DEFAULT="COMMENT1">
- <!-- Server-side JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
-
- <RULES SET="ASPPL_SGML" DEFAULT="COMMENT1">
- <!-- Server-side PerlScript -->
- <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- ASP mode by Andre Kaplan
+ Updated by Simon Ruggier -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE">
+ <SEQ TYPE="MARKUP" DELEGATE="ASPVB"><%@LANGUAGE="VBSCRIPT"%</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="ASPJS"><%@LANGUAGE="JSCRIPT"%</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="ASPJS"><%@LANGUAGE="JAVASCRIPT"%</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="ASPPL"><%@LANGUAGE="PERLSCRIPT"%</SEQ>
+
+ <!-- Inlined server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- Server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><script language="vbscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-side Javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="jscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="javascript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-side PerlScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><script language="perlscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Client-side javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
+ <BEGIN><script language="jscript"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
+ <BEGIN><script language="javascript"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
+ <BEGIN><script></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-Side include -->
+ <SPAN TYPE="MARKUP">
+ <BEGIN><!--#</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1" DELEGATE="ASPVB_SGML">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_STYLE">
+ <BEGIN><STYLE></BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <!-- ******************************************************************
+ ASP with VBScript as default script engine
+ ****************************************************************** -->
+ <RULES SET="ASPVB" IGNORE_CASE="TRUE">
+ <!-- Inlined server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- Server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><script language="vbscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-side Javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="jscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="javascript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-side PerlScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><script language="perlscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Client-side javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
+ <BEGIN><script language="jscript"</BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
+ <BEGIN><script language="javascript"</BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_CSJS">
+ <BEGIN><script></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-Side include -->
+ <SPAN TYPE="MARKUP">
+ <BEGIN><!--#</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1" DELEGATE="ASPVB_SGML">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_STYLE">
+ <BEGIN><STYLE></BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_TAGS">
+ <BEGIN></</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPVB_TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <!-- ******************************************************************
+ ASP with JScript as default script engine
+ ****************************************************************** -->
+ <RULES SET="ASPJS" IGNORE_CASE="TRUE">
+ <!-- Inlined server-side Javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- Server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><script language="vbscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-side Javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="jscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="javascript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-side PerlScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><script language="perlscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Client-side javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPJS_CSJS">
+ <BEGIN><script language="jscript"</BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPJS_CSJS">
+ <BEGIN><script language="javascript"</BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPJS_CSJS">
+ <BEGIN><script></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-Side include -->
+ <SPAN TYPE="MARKUP">
+ <BEGIN><!--#</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1" DELEGATE="ASPJS_SGML">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPJS_STYLE">
+ <BEGIN><STYLE></BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPJS_TAGS">
+ <BEGIN></</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPJS_TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <!-- ******************************************************************
+ ASP with PerlScript as default script engine
+ ****************************************************************** -->
+ <RULES SET="ASPPL" IGNORE_CASE="TRUE">
+ <!-- Inlined server-side Perlscript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- Server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><script language="vbscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-side Javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="jscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="javascript" runat="server"</BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-side PerlScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><script language="perlscript" runat="server"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Client-side javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPPL_CSJS">
+ <BEGIN><script language="jscript"</BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPPL_CSJS">
+ <BEGIN><script language="javascript"</BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPPL_CSJS">
+ <BEGIN><script></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-Side include -->
+ <SPAN TYPE="MARKUP">
+ <BEGIN><!--#</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1" DELEGATE="ASPPL_SGML">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPPL_STYLE">
+ <BEGIN><STYLE></BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="ASPPL_TAGS">
+ <BEGIN></</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="ASPPL_TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <!-- ******************************************************************
+ HTML Tags
+ ****************************************************************** -->
+ <RULES SET="ASPVB_TAGS" DEFAULT="MARKUP">
+ <!-- Server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE ="ASPVB_LIT1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE ="ASPVB_LIT1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ </RULES>
+
+ <RULES SET="ASPVB_LIT1" DEFAULT="LITERAL1">
+ <!-- Server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="ASPJS_TAGS" DEFAULT="MARKUP">
+ <!-- Server-side JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE ="ASPJS_LIT1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE ="ASPJS_LIT1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ </RULES>
+
+ <RULES SET="ASPJS_LIT1" DEFAULT="LITERAL1">
+ <!-- Server-side JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="ASPPL_TAGS" DEFAULT="MARKUP">
+ <!-- Server-side PerlScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE ="ASPPL_LIT1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE ="ASPPL_LIT1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ </RULES>
+
+ <RULES SET="ASPPL_LIT1" DEFAULT="LITERAL1">
+ <!-- Server-side PerlScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+
+ <!-- These three rules sets handle server side scripts being mixed into client side javascript -->
+ <RULES SET="ASPVB_CSJS">
+ <!-- Server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <IMPORT DELEGATE="javascript::MAIN"/>
+ </RULES>
+
+ <RULES SET="ASPJS_CSJS">
+ <!-- Server-side JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <IMPORT DELEGATE="javascript::MAIN"/>
+ </RULES>
+
+ <RULES SET="ASPPL_CSJS">
+ <!-- Server-side PerlScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <IMPORT DELEGATE="javascript::MAIN"/>
+ </RULES>
+
+ <!-- These three rules sets handle server side scripts being mixed into stylesheets -->
+ <RULES SET="ASPVB_STYLE">
+ <!-- Server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <IMPORT DELEGATE="css::MAIN"/>
+ </RULES>
+
+ <RULES SET="ASPJS_STYLE">
+ <!-- Server-side JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <IMPORT DELEGATE="css::MAIN"/>
+ </RULES>
+
+ <RULES SET="ASPPL_STYLE">
+ <!-- Server-side PerlScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <IMPORT DELEGATE="css::MAIN"/>
+ </RULES>
+
+ <!-- These three rules sets handle server side scripts being mixed into SGML Comments -->
+ <RULES SET="ASPVB_SGML" DEFAULT="COMMENT1">
+ <!-- Server-side VBScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="vbscript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="ASPJS_SGML" DEFAULT="COMMENT1">
+ <!-- Server-side JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="ASPPL_SGML" DEFAULT="COMMENT1">
+ <!-- Server-side PerlScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="perl::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/aspect-j.xml b/jEdit/modes/aspect-j.xml
index 94af02e..7695d3e 100644
--- a/jEdit/modes/aspect-j.xml
+++ b/jEdit/modes/aspect-j.xml
@@ -1,167 +1,167 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="indentPrevLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x)?[\p{XDigit}]+[lLdDfF]?">
-
- <!-- Silly comment -->
- <SEQ TYPE="COMMENT1">/**/</SEQ>
-
- <!-- Javadoc comment -->
- <SPAN TYPE="COMMENT3" DELEGATE="java::JAVADOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- Java comment (C style) -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <!-- workaround to stop "*" from being colorized
- in import statements. -->
- <SEQ TYPE="NULL">.*</SEQ>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
- <KEYWORD1>instanceof</KEYWORD1>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>throws</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>volatile</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <KEYWORD2>package</KEYWORD2>
- <KEYWORD2>import</KEYWORD2>
-
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>interface</KEYWORD3>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD3>void</KEYWORD3>
-
- <FUNCTION>assert</FUNCTION>
- <KEYWORD1>strictfp</KEYWORD1>
-
- <LITERAL2>false</LITERAL2>
- <LITERAL2>null</LITERAL2>
- <LITERAL2>super</LITERAL2>
- <LITERAL2>this</LITERAL2>
- <LITERAL2>true</LITERAL2>
-
- <INVALID>goto</INVALID>
- <INVALID>const</INVALID>
-
- <KEYWORD4>args</KEYWORD4>
- <KEYWORD4>percflow</KEYWORD4>
- <KEYWORD4>get</KEYWORD4>
- <KEYWORD4>set</KEYWORD4>
- <KEYWORD4>preinitialization</KEYWORD4>
- <KEYWORD4>handler</KEYWORD4>
- <KEYWORD4>adviceexecution</KEYWORD4>
- <KEYWORD4>cflow</KEYWORD4>
- <KEYWORD4>target</KEYWORD4>
- <KEYWORD4>cflowbelow</KEYWORD4>
- <KEYWORD4>withincode</KEYWORD4>
- <KEYWORD4>declare</KEYWORD4>
- <KEYWORD4>precedence</KEYWORD4>
- <KEYWORD4>issingleton</KEYWORD4>
- <KEYWORD4>perthis</KEYWORD4>
- <KEYWORD4>pertarget</KEYWORD4>
- <KEYWORD4>privileged</KEYWORD4>
- <KEYWORD4>after</KEYWORD4>
- <KEYWORD4>around</KEYWORD4>
- <KEYWORD4>aspect</KEYWORD4>
- <KEYWORD4>before</KEYWORD4>
- <KEYWORD4>call</KEYWORD4>
- <KEYWORD4>execution</KEYWORD4>
- <KEYWORD4>initialization</KEYWORD4>
- <KEYWORD4>pointcut</KEYWORD4>
- <KEYWORD4>proceed</KEYWORD4>
- <KEYWORD4>staticinitialization</KEYWORD4>
- <KEYWORD4>within</KEYWORD4>
- <KEYWORD4>..</KEYWORD4>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="indentPrevLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x)?[\p{XDigit}]+[lLdDfF]?">
+
+ <!-- Silly comment -->
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+
+ <!-- Javadoc comment -->
+ <SPAN TYPE="COMMENT3" DELEGATE="java::JAVADOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Java comment (C style) -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <!-- workaround to stop "*" from being colorized
+ in import statements. -->
+ <SEQ TYPE="NULL">.*</SEQ>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+ <KEYWORD1>instanceof</KEYWORD1>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>throws</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>volatile</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <KEYWORD2>package</KEYWORD2>
+ <KEYWORD2>import</KEYWORD2>
+
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>interface</KEYWORD3>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD3>void</KEYWORD3>
+
+ <FUNCTION>assert</FUNCTION>
+ <KEYWORD1>strictfp</KEYWORD1>
+
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ <LITERAL2>super</LITERAL2>
+ <LITERAL2>this</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+
+ <INVALID>goto</INVALID>
+ <INVALID>const</INVALID>
+
+ <KEYWORD4>args</KEYWORD4>
+ <KEYWORD4>percflow</KEYWORD4>
+ <KEYWORD4>get</KEYWORD4>
+ <KEYWORD4>set</KEYWORD4>
+ <KEYWORD4>preinitialization</KEYWORD4>
+ <KEYWORD4>handler</KEYWORD4>
+ <KEYWORD4>adviceexecution</KEYWORD4>
+ <KEYWORD4>cflow</KEYWORD4>
+ <KEYWORD4>target</KEYWORD4>
+ <KEYWORD4>cflowbelow</KEYWORD4>
+ <KEYWORD4>withincode</KEYWORD4>
+ <KEYWORD4>declare</KEYWORD4>
+ <KEYWORD4>precedence</KEYWORD4>
+ <KEYWORD4>issingleton</KEYWORD4>
+ <KEYWORD4>perthis</KEYWORD4>
+ <KEYWORD4>pertarget</KEYWORD4>
+ <KEYWORD4>privileged</KEYWORD4>
+ <KEYWORD4>after</KEYWORD4>
+ <KEYWORD4>around</KEYWORD4>
+ <KEYWORD4>aspect</KEYWORD4>
+ <KEYWORD4>before</KEYWORD4>
+ <KEYWORD4>call</KEYWORD4>
+ <KEYWORD4>execution</KEYWORD4>
+ <KEYWORD4>initialization</KEYWORD4>
+ <KEYWORD4>pointcut</KEYWORD4>
+ <KEYWORD4>proceed</KEYWORD4>
+ <KEYWORD4>staticinitialization</KEYWORD4>
+ <KEYWORD4>within</KEYWORD4>
+ <KEYWORD4>..</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/assembly-m68k.xml b/jEdit/modes/assembly-m68k.xml
index 03a6c4c..505c06a 100644
--- a/jEdit/modes/assembly-m68k.xml
+++ b/jEdit/modes/assembly-m68k.xml
@@ -1,508 +1,508 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- M68000 Assembly mode by Igor Lesik (curoles at yahoo.com)
- version 0.2 (July 24, 2006)
- TODO: i)add missing size qualifiers, ii)add Xcc like instructions
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x\p{XDigit}+|\d+)">
-
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">*</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
-
-
- <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="TRUE">$</MARK_FOLLOWING>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">:</SEQ>
- <SEQ TYPE="NULL">(</SEQ>
- <SEQ TYPE="NULL">)</SEQ>
- <SEQ TYPE="NULL">]</SEQ>
- <SEQ TYPE="NULL">[</SEQ>
- <SEQ TYPE="NULL">$</SEQ>
-
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
-
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
-
- <KEYWORDS>
-
- <!-- ************************* REGISTERS ********************************* -->
- <!-- For sake of commonality with existing asm86 mode we use Keyword3 for registers-->
-
- <!-- General-purpose data registers -->
- <KEYWORD3>D0</KEYWORD3>
- <KEYWORD3>D1</KEYWORD3>
- <KEYWORD3>D2</KEYWORD3>
- <KEYWORD3>D3</KEYWORD3>
- <KEYWORD3>D4</KEYWORD3>
- <KEYWORD3>D5</KEYWORD3>
- <KEYWORD3>D6</KEYWORD3>
- <KEYWORD3>D7</KEYWORD3>
-
- <!-- Address registers -->
- <KEYWORD3>A0</KEYWORD3>
- <KEYWORD3>A1</KEYWORD3>
- <KEYWORD3>A2</KEYWORD3>
- <KEYWORD3>A3</KEYWORD3>
- <KEYWORD3>A4</KEYWORD3>
- <KEYWORD3>A5</KEYWORD3>
- <KEYWORD3>A6</KEYWORD3>
- <KEYWORD3>A7</KEYWORD3>
-
- <!-- Floating-point data registers -->
- <KEYWORD3>FP0</KEYWORD3>
- <KEYWORD3>FP1</KEYWORD3>
- <KEYWORD3>FP2</KEYWORD3>
- <KEYWORD3>FP3</KEYWORD3>
- <KEYWORD3>FP4</KEYWORD3>
- <KEYWORD3>FP5</KEYWORD3>
- <KEYWORD3>FP6</KEYWORD3>
- <KEYWORD3>FP7</KEYWORD3>
-
- <KEYWORD3>SP</KEYWORD3>
- <KEYWORD3>CCR</KEYWORD3>
-
- <!-- ************************** DIRECTIVES ********************************** -->
-
- <!-- Assembler directives give instructions to the assembler (not the 68000 chip which will execute
- your program) on how to assemble your program.
- These directives may be grouped into the following categories.-->
-
- <!-- Miscellaneous -->
- <KEYWORD1>OPT</KEYWORD1>
- <KEYWORD1>INCLUDE</KEYWORD1>
- <KEYWORD1>FAIL</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>REG</KEYWORD1>
-
- <!-- Listing Control -->
- <KEYWORD1>PAGE</KEYWORD1>
- <KEYWORD1>LIST</KEYWORD1>
- <KEYWORD1>NOLIST</KEYWORD1>
- <KEYWORD1>SPC</KEYWORD1>
- <KEYWORD1>TTL</KEYWORD1>
-
- <!-- Section Control -->
- <KEYWORD1>ORG</KEYWORD1>
-
- <!-- Symbol Definition -->
- <KEYWORD1>EQU</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
-
- <!-- Data Definition -->
- <KEYWORD1>DS</KEYWORD1>
- <KEYWORD1>DC</KEYWORD1>
-
- <!-- Structured Programming Constructs -->
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>ENDF</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>ENDI</KEYWORD1>
- <KEYWORD1>REPEAT</KEYWORD1>
- <KEYWORD1>UNTIL</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
- <KEYWORD1>DO</KEYWORD1>
- <KEYWORD1>ENDW</KEYWORD1>
-
- <KEYWORD1>MACRO</KEYWORD1>
-
-
- <!-- *************************** INSTRUCTIONS **************************************** -->
- <FUNCTION>ABCD</FUNCTION>
- <FUNCTION>ADD</FUNCTION>
- <FUNCTION>ADD.B</FUNCTION>
- <FUNCTION>ADD.W</FUNCTION>
- <FUNCTION>ADD.L</FUNCTION>
- <FUNCTION>ADDA</FUNCTION>
- <FUNCTION>ADDA.W</FUNCTION>
- <FUNCTION>ADDA.L</FUNCTION>
- <FUNCTION>ADDI</FUNCTION>
- <FUNCTION>ADDI.B</FUNCTION>
- <FUNCTION>ADDI.W</FUNCTION>
- <FUNCTION>ADDI.L</FUNCTION>
- <FUNCTION>ADDQ</FUNCTION>
- <FUNCTION>ADDQ.B</FUNCTION>
- <FUNCTION>ADDQ.W</FUNCTION>
- <FUNCTION>ADDQ.L</FUNCTION>
- <FUNCTION>ADDX</FUNCTION>
- <FUNCTION>ADDX.B</FUNCTION>
- <FUNCTION>ADDX.W</FUNCTION>
- <FUNCTION>ADDX.L</FUNCTION>
- <FUNCTION>AND</FUNCTION>
- <FUNCTION>AND.B</FUNCTION>
- <FUNCTION>AND.W</FUNCTION>
- <FUNCTION>AND.L</FUNCTION>
- <FUNCTION>ANDI</FUNCTION>
- <FUNCTION>ANDI.B</FUNCTION>
- <FUNCTION>ANDI.W</FUNCTION>
- <FUNCTION>ANDI.L</FUNCTION>
- <FUNCTION>ASL</FUNCTION>
- <FUNCTION>ASL.B</FUNCTION>
- <FUNCTION>ASL.W</FUNCTION>
- <FUNCTION>ASL.L</FUNCTION>
- <FUNCTION>ASR</FUNCTION>
- <FUNCTION>ASR.B</FUNCTION>
- <FUNCTION>ASR.W</FUNCTION>
- <FUNCTION>ASR.L</FUNCTION>
- <!-- Bcc -->
- <FUNCTION>BCC</FUNCTION>
- <FUNCTION>BCS</FUNCTION>
- <FUNCTION>BEQ</FUNCTION>
- <FUNCTION>BGE</FUNCTION>
- <FUNCTION>BGT</FUNCTION>
- <FUNCTION>BHI</FUNCTION>
- <FUNCTION>BLE</FUNCTION>
- <FUNCTION>BLS</FUNCTION>
- <FUNCTION>BLT</FUNCTION>
- <FUNCTION>BMI</FUNCTION>
- <FUNCTION>BNE</FUNCTION>
- <FUNCTION>BPL</FUNCTION>
- <FUNCTION>BVC</FUNCTION>
- <FUNCTION>BVS</FUNCTION>
- <FUNCTION>BCHG</FUNCTION>
- <FUNCTION>BCLR</FUNCTION>
- <FUNCTION>BFCHG</FUNCTION>
- <FUNCTION>BFCLR</FUNCTION>
- <FUNCTION>BFEXTS</FUNCTION>
- <FUNCTION>BFEXTU</FUNCTION>
- <FUNCTION>BFFF0</FUNCTION>
- <FUNCTION>BFINS</FUNCTION>
- <FUNCTION>BFSET</FUNCTION>
- <FUNCTION>BFTST</FUNCTION>
- <FUNCTION>BGND</FUNCTION>
- <FUNCTION>BKPT</FUNCTION>
- <FUNCTION>BRA</FUNCTION>
- <FUNCTION>BSET</FUNCTION>
- <FUNCTION>BSR</FUNCTION>
- <FUNCTION>BTST</FUNCTION>
- <FUNCTION>CALLM</FUNCTION>
- <FUNCTION>CAS</FUNCTION>
- <FUNCTION>CAS2</FUNCTION>
- <FUNCTION>CHK</FUNCTION>
- <FUNCTION>CHK2</FUNCTION>
- <FUNCTION>CINV</FUNCTION>
- <FUNCTION>CLR</FUNCTION>
- <FUNCTION>CLR.B</FUNCTION>
- <FUNCTION>CLR.W</FUNCTION>
- <FUNCTION>CLR.L</FUNCTION>
- <FUNCTION>CMP</FUNCTION>
- <FUNCTION>CMP.B</FUNCTION>
- <FUNCTION>CMP.W</FUNCTION>
- <FUNCTION>CMP.L</FUNCTION>
- <FUNCTION>CMPA</FUNCTION>
- <FUNCTION>CMPA.W</FUNCTION>
- <FUNCTION>CMPA.L</FUNCTION>
- <FUNCTION>CMPI</FUNCTION>
- <FUNCTION>CMPI.B</FUNCTION>
- <FUNCTION>CMPI.W</FUNCTION>
- <FUNCTION>CMPI.L</FUNCTION>
- <FUNCTION>CMPM</FUNCTION>
- <FUNCTION>CMPM.B</FUNCTION>
- <FUNCTION>CMPM.W</FUNCTION>
- <FUNCTION>CMPM.L</FUNCTION>
- <FUNCTION>CMP2</FUNCTION>
- <FUNCTION>CMP2.B</FUNCTION>
- <FUNCTION>CMP2.W</FUNCTION>
- <FUNCTION>CMP2.L</FUNCTION>
- <!-- FUNCTION>cpBcc</FUNCTION>
- <FUNCTION>cpDBcc</FUNCTION>
- <FUNCTION>cpGEN</FUNCTION>
- <FUNCTION>cpRESTORE</FUNCTION>
- <FUNCTION>cpSAVE</FUNCTION>
- <FUNCTION>cpScc</FUNCTION>
- <FUNCTION>cpTRAPcc</FUNCTION -->
- <FUNCTION>CPUSH</FUNCTION>
- <!-- DBcc -->
- <FUNCTION>DBCC</FUNCTION>
- <FUNCTION>DBCS</FUNCTION>
- <FUNCTION>DBEQ</FUNCTION>
- <FUNCTION>DBGE</FUNCTION>
- <FUNCTION>DBGT</FUNCTION>
- <FUNCTION>DBHI</FUNCTION>
- <FUNCTION>DBLE</FUNCTION>
- <FUNCTION>DBLS</FUNCTION>
- <FUNCTION>DBLT</FUNCTION>
- <FUNCTION>DBMI</FUNCTION>
- <FUNCTION>DBNE</FUNCTION>
- <FUNCTION>DBPL</FUNCTION>
- <FUNCTION>DBVC</FUNCTION>
- <FUNCTION>DBVS</FUNCTION>
-
- <FUNCTION>DIVS</FUNCTION>
- <FUNCTION>DIVSL</FUNCTION>
- <FUNCTION>DIVU</FUNCTION>
- <FUNCTION>DIVUL</FUNCTION>
- <FUNCTION>EOR</FUNCTION>
- <FUNCTION>EOR.B</FUNCTION>
- <FUNCTION>EOR.W</FUNCTION>
- <FUNCTION>EOR.L</FUNCTION>
- <FUNCTION>EORI</FUNCTION>
- <FUNCTION>EORI.B</FUNCTION>
- <FUNCTION>EORI.W</FUNCTION>
- <FUNCTION>EORI.L</FUNCTION>
- <FUNCTION>EXG</FUNCTION>
- <FUNCTION>EXT</FUNCTION>
- <FUNCTION>EXTB</FUNCTION>
- <FUNCTION>FABS</FUNCTION>
- <FUNCTION>FSABS</FUNCTION>
- <FUNCTION>FDABS</FUNCTION>
- <FUNCTION>FACOS</FUNCTION>
- <FUNCTION>FADD</FUNCTION>
- <FUNCTION>FSADD</FUNCTION>
- <FUNCTION>FDADD</FUNCTION>
- <FUNCTION>FASIN</FUNCTION>
- <FUNCTION>FATAN</FUNCTION>
- <FUNCTION>FATANH</FUNCTION>
- <!--FUNCTION>FBcc</FUNCTION-->
- <FUNCTION>FCMP</FUNCTION>
- <FUNCTION>FCOS</FUNCTION>
- <FUNCTION>FCOSH</FUNCTION>
- <!--FUNCTION>FDBcc</FUNCTION-->
- <FUNCTION>FDIV</FUNCTION>
- <FUNCTION>FSDIV</FUNCTION>
- <FUNCTION>FDDIV</FUNCTION>
- <FUNCTION>FETOX</FUNCTION>
- <FUNCTION>FETOXM1</FUNCTION>
- <FUNCTION>FGETEXP</FUNCTION>
- <FUNCTION>FGETMAN</FUNCTION>
- <FUNCTION>FINT</FUNCTION>
- <FUNCTION>FINTRZ</FUNCTION>
- <FUNCTION>FLOG10</FUNCTION>
- <FUNCTION>FLOG2</FUNCTION>
- <FUNCTION>FLOGN</FUNCTION>
- <FUNCTION>FLOGNP1</FUNCTION>
- <FUNCTION>FMOD</FUNCTION>
- <FUNCTION>FMOVE</FUNCTION>
- <FUNCTION>FSMOVE</FUNCTION>
- <FUNCTION>FDMOVE</FUNCTION>
- <FUNCTION>FMOVECR</FUNCTION>
- <FUNCTION>FMOVEM</FUNCTION>
- <FUNCTION>FMUL</FUNCTION>
- <FUNCTION>FSMUL</FUNCTION>
- <FUNCTION>FDMUL</FUNCTION>
- <FUNCTION>FNEG</FUNCTION>
- <FUNCTION>FSNEG</FUNCTION>
- <FUNCTION>FDNEG</FUNCTION>
- <FUNCTION>FNOP</FUNCTION>
- <FUNCTION>FREM</FUNCTION>
- <FUNCTION>FRESTORE</FUNCTION>
- <FUNCTION>FSAVE</FUNCTION>
- <FUNCTION>FSCALE</FUNCTION>
- <!--FUNCTION>FScc</FUNCTION-->
- <FUNCTION>FSGLMUL</FUNCTION>
- <FUNCTION>FSIN</FUNCTION>
- <FUNCTION>FSINCOS</FUNCTION>
- <FUNCTION>FSINH</FUNCTION>
- <FUNCTION>FSQRT</FUNCTION>
- <FUNCTION>FSSQRT</FUNCTION>
- <FUNCTION>FDSQRT</FUNCTION>
- <FUNCTION>FSUB</FUNCTION>
- <FUNCTION>FSSUB</FUNCTION>
- <FUNCTION>FDSUB</FUNCTION>
- <FUNCTION>FTAN</FUNCTION>
- <FUNCTION>FTANH</FUNCTION>
- <FUNCTION>FTENTOX</FUNCTION>
- <!--FUNCTION>FTRAPcc</FUNCTION-->
- <FUNCTION>FTST</FUNCTION>
- <FUNCTION>FTWOTOX</FUNCTION>
- <FUNCTION>ILLEGAL</FUNCTION>
- <FUNCTION>JMP</FUNCTION>
- <FUNCTION>JSR</FUNCTION>
- <FUNCTION>LEA</FUNCTION>
- <FUNCTION>LINK</FUNCTION>
- <FUNCTION>LPSTOP</FUNCTION>
- <FUNCTION>LSL</FUNCTION>
- <FUNCTION>LSL.B</FUNCTION>
- <FUNCTION>LSL.W</FUNCTION>
- <FUNCTION>LSL.L</FUNCTION>
- <FUNCTION>LSR</FUNCTION>
- <FUNCTION>LSR.B</FUNCTION>
- <FUNCTION>LSR.W</FUNCTION>
- <FUNCTION>LSR.L</FUNCTION>
- <FUNCTION>MOVE</FUNCTION>
- <FUNCTION>MOVE.B</FUNCTION>
- <FUNCTION>MOVE.W</FUNCTION>
- <FUNCTION>MOVE.L</FUNCTION>
- <FUNCTION>MOVEA</FUNCTION>
- <FUNCTION>MOVEA.W</FUNCTION>
- <FUNCTION>MOVEA.L</FUNCTION>
- <FUNCTION>MOVE16</FUNCTION>
- <FUNCTION>MOVEC</FUNCTION>
- <FUNCTION>MOVEM</FUNCTION>
- <FUNCTION>MOVEP</FUNCTION>
- <FUNCTION>MOVEQ</FUNCTION>
- <FUNCTION>MOVES</FUNCTION>
- <FUNCTION>MULS</FUNCTION>
- <FUNCTION>MULU</FUNCTION>
- <FUNCTION>NBCD</FUNCTION>
- <FUNCTION>NEG</FUNCTION>
- <FUNCTION>NEG.B</FUNCTION>
- <FUNCTION>NEG.W</FUNCTION>
- <FUNCTION>NEG.L</FUNCTION>
- <FUNCTION>NEGX</FUNCTION>
- <FUNCTION>NEGX.B</FUNCTION>
- <FUNCTION>NEGX.W</FUNCTION>
- <FUNCTION>NEGX.L</FUNCTION>
- <FUNCTION>NOP</FUNCTION>
- <FUNCTION>NOT</FUNCTION>
- <FUNCTION>NOT.B</FUNCTION>
- <FUNCTION>NOT.W</FUNCTION>
- <FUNCTION>NOT.L</FUNCTION>
- <FUNCTION>OR</FUNCTION>
- <FUNCTION>OR.B</FUNCTION>
- <FUNCTION>OR.W</FUNCTION>
- <FUNCTION>OR.L</FUNCTION>
- <FUNCTION>ORI</FUNCTION>
- <FUNCTION>ORI.B</FUNCTION>
- <FUNCTION>ORI.W</FUNCTION>
- <FUNCTION>ORI.L</FUNCTION>
- <FUNCTION>PACK</FUNCTION>
- <!--FUNCTION>PBcc</FUNCTION-->
- <!--FUNCTION>PDBcc</FUNCTION-->
- <FUNCTION>PEA</FUNCTION>
- <FUNCTION>PFLUSH</FUNCTION>
- <FUNCTION>PFLUSHA</FUNCTION>
- <FUNCTION>PFLUSHR</FUNCTION>
- <FUNCTION>PFLUSHS</FUNCTION>
- <FUNCTION>PLOAD</FUNCTION>
- <FUNCTION>PMOVE</FUNCTION>
- <FUNCTION>PRESTORE</FUNCTION>
- <FUNCTION>PSAVE</FUNCTION>
- <!--FUNCTION>PScc</FUNCTION-->
- <FUNCTION>PTEST</FUNCTION>
- <!--FUNCTION>PTRAPcc</FUNCTION-->
- <FUNCTION>PVALID</FUNCTION>
- <FUNCTION>RESET</FUNCTION>
- <FUNCTION>ROL</FUNCTION>
- <FUNCTION>ROL.B</FUNCTION>
- <FUNCTION>ROL.W</FUNCTION>
- <FUNCTION>ROL.L</FUNCTION>
- <FUNCTION>ROR</FUNCTION>
- <FUNCTION>ROR.B</FUNCTION>
- <FUNCTION>ROR.W</FUNCTION>
- <FUNCTION>ROR.L</FUNCTION>
- <FUNCTION>ROXL</FUNCTION>
- <FUNCTION>ROXL.B</FUNCTION>
- <FUNCTION>ROXL.W</FUNCTION>
- <FUNCTION>ROXL.L</FUNCTION>
- <FUNCTION>ROXR</FUNCTION>
- <FUNCTION>ROXR.B</FUNCTION>
- <FUNCTION>ROXR.W</FUNCTION>
- <FUNCTION>ROXR.L</FUNCTION>
- <FUNCTION>RTD</FUNCTION>
- <FUNCTION>RTE</FUNCTION>
- <FUNCTION>RTM</FUNCTION>
- <FUNCTION>RTR</FUNCTION>
- <FUNCTION>RTS</FUNCTION>
- <FUNCTION>SBCD</FUNCTION>
- <!--Scc-->
- <FUNCTION>SCC</FUNCTION>
- <FUNCTION>SCS</FUNCTION>
- <FUNCTION>SEQ</FUNCTION>
- <FUNCTION>SF</FUNCTION>
- <FUNCTION>SGE</FUNCTION>
- <FUNCTION>SGT</FUNCTION>
- <FUNCTION>SHI</FUNCTION>
- <FUNCTION>SLE</FUNCTION>
- <FUNCTION>SLS</FUNCTION>
- <FUNCTION>SLT</FUNCTION>
- <FUNCTION>SMI</FUNCTION>
- <FUNCTION>SNE</FUNCTION>
- <FUNCTION>SPL</FUNCTION>
- <FUNCTION>ST</FUNCTION>
- <FUNCTION>SVC</FUNCTION>
- <FUNCTION>SVS</FUNCTION>
-
- <FUNCTION>STOP</FUNCTION>
- <FUNCTION>SUB</FUNCTION>
- <FUNCTION>SUB.B</FUNCTION>
- <FUNCTION>SUB.W</FUNCTION>
- <FUNCTION>SUB.L</FUNCTION>
- <FUNCTION>SUBA</FUNCTION>
- <FUNCTION>SUBI</FUNCTION>
- <FUNCTION>SUBI.B</FUNCTION>
- <FUNCTION>SUBI.W</FUNCTION>
- <FUNCTION>SUBI.L</FUNCTION>
- <FUNCTION>SUBQ</FUNCTION>
- <FUNCTION>SUBQ.B</FUNCTION>
- <FUNCTION>SUBQ.W</FUNCTION>
- <FUNCTION>SUBQ.L</FUNCTION>
- <FUNCTION>SUBX</FUNCTION>
- <FUNCTION>SUBX.B</FUNCTION>
- <FUNCTION>SUBX.W</FUNCTION>
- <FUNCTION>SUBX.L</FUNCTION>
- <FUNCTION>SWAP</FUNCTION>
- <FUNCTION>TAS</FUNCTION>
- <FUNCTION>TBLS</FUNCTION>
- <FUNCTION>TBLSN</FUNCTION>
- <FUNCTION>TBLU</FUNCTION>
- <FUNCTION>TBLUN</FUNCTION>
- <FUNCTION>TRAP</FUNCTION>
- <!--TRAPcc-->
- <FUNCTION>TRAPCC</FUNCTION>
- <FUNCTION>TRAPCS</FUNCTION>
- <FUNCTION>TRAPEQ</FUNCTION>
- <FUNCTION>TRAPF</FUNCTION>
- <FUNCTION>TRAPGE</FUNCTION>
- <FUNCTION>TRAPGT</FUNCTION>
- <FUNCTION>TRAPHI</FUNCTION>
- <FUNCTION>TRAPLE</FUNCTION>
- <FUNCTION>TRAPLS</FUNCTION>
- <FUNCTION>TRAPLT</FUNCTION>
- <FUNCTION>TRAPMI</FUNCTION>
- <FUNCTION>TRAPNE</FUNCTION>
- <FUNCTION>TRAPPL</FUNCTION>
- <FUNCTION>TRAPT</FUNCTION>
- <FUNCTION>TRAPVC</FUNCTION>
- <FUNCTION>TRAPVS</FUNCTION>
-
- <FUNCTION>TRAPV</FUNCTION>
- <FUNCTION>TST</FUNCTION>
- <FUNCTION>TST.B</FUNCTION>
- <FUNCTION>TST.W</FUNCTION>
- <FUNCTION>TST.L</FUNCTION>
- <FUNCTION>UNLK</FUNCTION>
- <FUNCTION>UNPK</FUNCTION>
-
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ M68000 Assembly mode by Igor Lesik (curoles at yahoo.com)
+ version 0.2 (July 24, 2006)
+ TODO: i)add missing size qualifiers, ii)add Xcc like instructions
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x\p{XDigit}+|\d+)">
+
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">*</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+
+
+ <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="TRUE">$</MARK_FOLLOWING>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <SEQ TYPE="NULL">,</SEQ>
+ <SEQ TYPE="NULL">:</SEQ>
+ <SEQ TYPE="NULL">(</SEQ>
+ <SEQ TYPE="NULL">)</SEQ>
+ <SEQ TYPE="NULL">]</SEQ>
+ <SEQ TYPE="NULL">[</SEQ>
+ <SEQ TYPE="NULL">$</SEQ>
+
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+
+ <KEYWORDS>
+
+ <!-- ************************* REGISTERS ********************************* -->
+ <!-- For sake of commonality with existing asm86 mode we use Keyword3 for registers-->
+
+ <!-- General-purpose data registers -->
+ <KEYWORD3>D0</KEYWORD3>
+ <KEYWORD3>D1</KEYWORD3>
+ <KEYWORD3>D2</KEYWORD3>
+ <KEYWORD3>D3</KEYWORD3>
+ <KEYWORD3>D4</KEYWORD3>
+ <KEYWORD3>D5</KEYWORD3>
+ <KEYWORD3>D6</KEYWORD3>
+ <KEYWORD3>D7</KEYWORD3>
+
+ <!-- Address registers -->
+ <KEYWORD3>A0</KEYWORD3>
+ <KEYWORD3>A1</KEYWORD3>
+ <KEYWORD3>A2</KEYWORD3>
+ <KEYWORD3>A3</KEYWORD3>
+ <KEYWORD3>A4</KEYWORD3>
+ <KEYWORD3>A5</KEYWORD3>
+ <KEYWORD3>A6</KEYWORD3>
+ <KEYWORD3>A7</KEYWORD3>
+
+ <!-- Floating-point data registers -->
+ <KEYWORD3>FP0</KEYWORD3>
+ <KEYWORD3>FP1</KEYWORD3>
+ <KEYWORD3>FP2</KEYWORD3>
+ <KEYWORD3>FP3</KEYWORD3>
+ <KEYWORD3>FP4</KEYWORD3>
+ <KEYWORD3>FP5</KEYWORD3>
+ <KEYWORD3>FP6</KEYWORD3>
+ <KEYWORD3>FP7</KEYWORD3>
+
+ <KEYWORD3>SP</KEYWORD3>
+ <KEYWORD3>CCR</KEYWORD3>
+
+ <!-- ************************** DIRECTIVES ********************************** -->
+
+ <!-- Assembler directives give instructions to the assembler (not the 68000 chip which will execute
+ your program) on how to assemble your program.
+ These directives may be grouped into the following categories.-->
+
+ <!-- Miscellaneous -->
+ <KEYWORD1>OPT</KEYWORD1>
+ <KEYWORD1>INCLUDE</KEYWORD1>
+ <KEYWORD1>FAIL</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>REG</KEYWORD1>
+
+ <!-- Listing Control -->
+ <KEYWORD1>PAGE</KEYWORD1>
+ <KEYWORD1>LIST</KEYWORD1>
+ <KEYWORD1>NOLIST</KEYWORD1>
+ <KEYWORD1>SPC</KEYWORD1>
+ <KEYWORD1>TTL</KEYWORD1>
+
+ <!-- Section Control -->
+ <KEYWORD1>ORG</KEYWORD1>
+
+ <!-- Symbol Definition -->
+ <KEYWORD1>EQU</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+
+ <!-- Data Definition -->
+ <KEYWORD1>DS</KEYWORD1>
+ <KEYWORD1>DC</KEYWORD1>
+
+ <!-- Structured Programming Constructs -->
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>ENDF</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>ENDI</KEYWORD1>
+ <KEYWORD1>REPEAT</KEYWORD1>
+ <KEYWORD1>UNTIL</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+ <KEYWORD1>DO</KEYWORD1>
+ <KEYWORD1>ENDW</KEYWORD1>
+
+ <KEYWORD1>MACRO</KEYWORD1>
+
+
+ <!-- *************************** INSTRUCTIONS **************************************** -->
+ <FUNCTION>ABCD</FUNCTION>
+ <FUNCTION>ADD</FUNCTION>
+ <FUNCTION>ADD.B</FUNCTION>
+ <FUNCTION>ADD.W</FUNCTION>
+ <FUNCTION>ADD.L</FUNCTION>
+ <FUNCTION>ADDA</FUNCTION>
+ <FUNCTION>ADDA.W</FUNCTION>
+ <FUNCTION>ADDA.L</FUNCTION>
+ <FUNCTION>ADDI</FUNCTION>
+ <FUNCTION>ADDI.B</FUNCTION>
+ <FUNCTION>ADDI.W</FUNCTION>
+ <FUNCTION>ADDI.L</FUNCTION>
+ <FUNCTION>ADDQ</FUNCTION>
+ <FUNCTION>ADDQ.B</FUNCTION>
+ <FUNCTION>ADDQ.W</FUNCTION>
+ <FUNCTION>ADDQ.L</FUNCTION>
+ <FUNCTION>ADDX</FUNCTION>
+ <FUNCTION>ADDX.B</FUNCTION>
+ <FUNCTION>ADDX.W</FUNCTION>
+ <FUNCTION>ADDX.L</FUNCTION>
+ <FUNCTION>AND</FUNCTION>
+ <FUNCTION>AND.B</FUNCTION>
+ <FUNCTION>AND.W</FUNCTION>
+ <FUNCTION>AND.L</FUNCTION>
+ <FUNCTION>ANDI</FUNCTION>
+ <FUNCTION>ANDI.B</FUNCTION>
+ <FUNCTION>ANDI.W</FUNCTION>
+ <FUNCTION>ANDI.L</FUNCTION>
+ <FUNCTION>ASL</FUNCTION>
+ <FUNCTION>ASL.B</FUNCTION>
+ <FUNCTION>ASL.W</FUNCTION>
+ <FUNCTION>ASL.L</FUNCTION>
+ <FUNCTION>ASR</FUNCTION>
+ <FUNCTION>ASR.B</FUNCTION>
+ <FUNCTION>ASR.W</FUNCTION>
+ <FUNCTION>ASR.L</FUNCTION>
+ <!-- Bcc -->
+ <FUNCTION>BCC</FUNCTION>
+ <FUNCTION>BCS</FUNCTION>
+ <FUNCTION>BEQ</FUNCTION>
+ <FUNCTION>BGE</FUNCTION>
+ <FUNCTION>BGT</FUNCTION>
+ <FUNCTION>BHI</FUNCTION>
+ <FUNCTION>BLE</FUNCTION>
+ <FUNCTION>BLS</FUNCTION>
+ <FUNCTION>BLT</FUNCTION>
+ <FUNCTION>BMI</FUNCTION>
+ <FUNCTION>BNE</FUNCTION>
+ <FUNCTION>BPL</FUNCTION>
+ <FUNCTION>BVC</FUNCTION>
+ <FUNCTION>BVS</FUNCTION>
+ <FUNCTION>BCHG</FUNCTION>
+ <FUNCTION>BCLR</FUNCTION>
+ <FUNCTION>BFCHG</FUNCTION>
+ <FUNCTION>BFCLR</FUNCTION>
+ <FUNCTION>BFEXTS</FUNCTION>
+ <FUNCTION>BFEXTU</FUNCTION>
+ <FUNCTION>BFFF0</FUNCTION>
+ <FUNCTION>BFINS</FUNCTION>
+ <FUNCTION>BFSET</FUNCTION>
+ <FUNCTION>BFTST</FUNCTION>
+ <FUNCTION>BGND</FUNCTION>
+ <FUNCTION>BKPT</FUNCTION>
+ <FUNCTION>BRA</FUNCTION>
+ <FUNCTION>BSET</FUNCTION>
+ <FUNCTION>BSR</FUNCTION>
+ <FUNCTION>BTST</FUNCTION>
+ <FUNCTION>CALLM</FUNCTION>
+ <FUNCTION>CAS</FUNCTION>
+ <FUNCTION>CAS2</FUNCTION>
+ <FUNCTION>CHK</FUNCTION>
+ <FUNCTION>CHK2</FUNCTION>
+ <FUNCTION>CINV</FUNCTION>
+ <FUNCTION>CLR</FUNCTION>
+ <FUNCTION>CLR.B</FUNCTION>
+ <FUNCTION>CLR.W</FUNCTION>
+ <FUNCTION>CLR.L</FUNCTION>
+ <FUNCTION>CMP</FUNCTION>
+ <FUNCTION>CMP.B</FUNCTION>
+ <FUNCTION>CMP.W</FUNCTION>
+ <FUNCTION>CMP.L</FUNCTION>
+ <FUNCTION>CMPA</FUNCTION>
+ <FUNCTION>CMPA.W</FUNCTION>
+ <FUNCTION>CMPA.L</FUNCTION>
+ <FUNCTION>CMPI</FUNCTION>
+ <FUNCTION>CMPI.B</FUNCTION>
+ <FUNCTION>CMPI.W</FUNCTION>
+ <FUNCTION>CMPI.L</FUNCTION>
+ <FUNCTION>CMPM</FUNCTION>
+ <FUNCTION>CMPM.B</FUNCTION>
+ <FUNCTION>CMPM.W</FUNCTION>
+ <FUNCTION>CMPM.L</FUNCTION>
+ <FUNCTION>CMP2</FUNCTION>
+ <FUNCTION>CMP2.B</FUNCTION>
+ <FUNCTION>CMP2.W</FUNCTION>
+ <FUNCTION>CMP2.L</FUNCTION>
+ <!-- FUNCTION>cpBcc</FUNCTION>
+ <FUNCTION>cpDBcc</FUNCTION>
+ <FUNCTION>cpGEN</FUNCTION>
+ <FUNCTION>cpRESTORE</FUNCTION>
+ <FUNCTION>cpSAVE</FUNCTION>
+ <FUNCTION>cpScc</FUNCTION>
+ <FUNCTION>cpTRAPcc</FUNCTION -->
+ <FUNCTION>CPUSH</FUNCTION>
+ <!-- DBcc -->
+ <FUNCTION>DBCC</FUNCTION>
+ <FUNCTION>DBCS</FUNCTION>
+ <FUNCTION>DBEQ</FUNCTION>
+ <FUNCTION>DBGE</FUNCTION>
+ <FUNCTION>DBGT</FUNCTION>
+ <FUNCTION>DBHI</FUNCTION>
+ <FUNCTION>DBLE</FUNCTION>
+ <FUNCTION>DBLS</FUNCTION>
+ <FUNCTION>DBLT</FUNCTION>
+ <FUNCTION>DBMI</FUNCTION>
+ <FUNCTION>DBNE</FUNCTION>
+ <FUNCTION>DBPL</FUNCTION>
+ <FUNCTION>DBVC</FUNCTION>
+ <FUNCTION>DBVS</FUNCTION>
+
+ <FUNCTION>DIVS</FUNCTION>
+ <FUNCTION>DIVSL</FUNCTION>
+ <FUNCTION>DIVU</FUNCTION>
+ <FUNCTION>DIVUL</FUNCTION>
+ <FUNCTION>EOR</FUNCTION>
+ <FUNCTION>EOR.B</FUNCTION>
+ <FUNCTION>EOR.W</FUNCTION>
+ <FUNCTION>EOR.L</FUNCTION>
+ <FUNCTION>EORI</FUNCTION>
+ <FUNCTION>EORI.B</FUNCTION>
+ <FUNCTION>EORI.W</FUNCTION>
+ <FUNCTION>EORI.L</FUNCTION>
+ <FUNCTION>EXG</FUNCTION>
+ <FUNCTION>EXT</FUNCTION>
+ <FUNCTION>EXTB</FUNCTION>
+ <FUNCTION>FABS</FUNCTION>
+ <FUNCTION>FSABS</FUNCTION>
+ <FUNCTION>FDABS</FUNCTION>
+ <FUNCTION>FACOS</FUNCTION>
+ <FUNCTION>FADD</FUNCTION>
+ <FUNCTION>FSADD</FUNCTION>
+ <FUNCTION>FDADD</FUNCTION>
+ <FUNCTION>FASIN</FUNCTION>
+ <FUNCTION>FATAN</FUNCTION>
+ <FUNCTION>FATANH</FUNCTION>
+ <!--FUNCTION>FBcc</FUNCTION-->
+ <FUNCTION>FCMP</FUNCTION>
+ <FUNCTION>FCOS</FUNCTION>
+ <FUNCTION>FCOSH</FUNCTION>
+ <!--FUNCTION>FDBcc</FUNCTION-->
+ <FUNCTION>FDIV</FUNCTION>
+ <FUNCTION>FSDIV</FUNCTION>
+ <FUNCTION>FDDIV</FUNCTION>
+ <FUNCTION>FETOX</FUNCTION>
+ <FUNCTION>FETOXM1</FUNCTION>
+ <FUNCTION>FGETEXP</FUNCTION>
+ <FUNCTION>FGETMAN</FUNCTION>
+ <FUNCTION>FINT</FUNCTION>
+ <FUNCTION>FINTRZ</FUNCTION>
+ <FUNCTION>FLOG10</FUNCTION>
+ <FUNCTION>FLOG2</FUNCTION>
+ <FUNCTION>FLOGN</FUNCTION>
+ <FUNCTION>FLOGNP1</FUNCTION>
+ <FUNCTION>FMOD</FUNCTION>
+ <FUNCTION>FMOVE</FUNCTION>
+ <FUNCTION>FSMOVE</FUNCTION>
+ <FUNCTION>FDMOVE</FUNCTION>
+ <FUNCTION>FMOVECR</FUNCTION>
+ <FUNCTION>FMOVEM</FUNCTION>
+ <FUNCTION>FMUL</FUNCTION>
+ <FUNCTION>FSMUL</FUNCTION>
+ <FUNCTION>FDMUL</FUNCTION>
+ <FUNCTION>FNEG</FUNCTION>
+ <FUNCTION>FSNEG</FUNCTION>
+ <FUNCTION>FDNEG</FUNCTION>
+ <FUNCTION>FNOP</FUNCTION>
+ <FUNCTION>FREM</FUNCTION>
+ <FUNCTION>FRESTORE</FUNCTION>
+ <FUNCTION>FSAVE</FUNCTION>
+ <FUNCTION>FSCALE</FUNCTION>
+ <!--FUNCTION>FScc</FUNCTION-->
+ <FUNCTION>FSGLMUL</FUNCTION>
+ <FUNCTION>FSIN</FUNCTION>
+ <FUNCTION>FSINCOS</FUNCTION>
+ <FUNCTION>FSINH</FUNCTION>
+ <FUNCTION>FSQRT</FUNCTION>
+ <FUNCTION>FSSQRT</FUNCTION>
+ <FUNCTION>FDSQRT</FUNCTION>
+ <FUNCTION>FSUB</FUNCTION>
+ <FUNCTION>FSSUB</FUNCTION>
+ <FUNCTION>FDSUB</FUNCTION>
+ <FUNCTION>FTAN</FUNCTION>
+ <FUNCTION>FTANH</FUNCTION>
+ <FUNCTION>FTENTOX</FUNCTION>
+ <!--FUNCTION>FTRAPcc</FUNCTION-->
+ <FUNCTION>FTST</FUNCTION>
+ <FUNCTION>FTWOTOX</FUNCTION>
+ <FUNCTION>ILLEGAL</FUNCTION>
+ <FUNCTION>JMP</FUNCTION>
+ <FUNCTION>JSR</FUNCTION>
+ <FUNCTION>LEA</FUNCTION>
+ <FUNCTION>LINK</FUNCTION>
+ <FUNCTION>LPSTOP</FUNCTION>
+ <FUNCTION>LSL</FUNCTION>
+ <FUNCTION>LSL.B</FUNCTION>
+ <FUNCTION>LSL.W</FUNCTION>
+ <FUNCTION>LSL.L</FUNCTION>
+ <FUNCTION>LSR</FUNCTION>
+ <FUNCTION>LSR.B</FUNCTION>
+ <FUNCTION>LSR.W</FUNCTION>
+ <FUNCTION>LSR.L</FUNCTION>
+ <FUNCTION>MOVE</FUNCTION>
+ <FUNCTION>MOVE.B</FUNCTION>
+ <FUNCTION>MOVE.W</FUNCTION>
+ <FUNCTION>MOVE.L</FUNCTION>
+ <FUNCTION>MOVEA</FUNCTION>
+ <FUNCTION>MOVEA.W</FUNCTION>
+ <FUNCTION>MOVEA.L</FUNCTION>
+ <FUNCTION>MOVE16</FUNCTION>
+ <FUNCTION>MOVEC</FUNCTION>
+ <FUNCTION>MOVEM</FUNCTION>
+ <FUNCTION>MOVEP</FUNCTION>
+ <FUNCTION>MOVEQ</FUNCTION>
+ <FUNCTION>MOVES</FUNCTION>
+ <FUNCTION>MULS</FUNCTION>
+ <FUNCTION>MULU</FUNCTION>
+ <FUNCTION>NBCD</FUNCTION>
+ <FUNCTION>NEG</FUNCTION>
+ <FUNCTION>NEG.B</FUNCTION>
+ <FUNCTION>NEG.W</FUNCTION>
+ <FUNCTION>NEG.L</FUNCTION>
+ <FUNCTION>NEGX</FUNCTION>
+ <FUNCTION>NEGX.B</FUNCTION>
+ <FUNCTION>NEGX.W</FUNCTION>
+ <FUNCTION>NEGX.L</FUNCTION>
+ <FUNCTION>NOP</FUNCTION>
+ <FUNCTION>NOT</FUNCTION>
+ <FUNCTION>NOT.B</FUNCTION>
+ <FUNCTION>NOT.W</FUNCTION>
+ <FUNCTION>NOT.L</FUNCTION>
+ <FUNCTION>OR</FUNCTION>
+ <FUNCTION>OR.B</FUNCTION>
+ <FUNCTION>OR.W</FUNCTION>
+ <FUNCTION>OR.L</FUNCTION>
+ <FUNCTION>ORI</FUNCTION>
+ <FUNCTION>ORI.B</FUNCTION>
+ <FUNCTION>ORI.W</FUNCTION>
+ <FUNCTION>ORI.L</FUNCTION>
+ <FUNCTION>PACK</FUNCTION>
+ <!--FUNCTION>PBcc</FUNCTION-->
+ <!--FUNCTION>PDBcc</FUNCTION-->
+ <FUNCTION>PEA</FUNCTION>
+ <FUNCTION>PFLUSH</FUNCTION>
+ <FUNCTION>PFLUSHA</FUNCTION>
+ <FUNCTION>PFLUSHR</FUNCTION>
+ <FUNCTION>PFLUSHS</FUNCTION>
+ <FUNCTION>PLOAD</FUNCTION>
+ <FUNCTION>PMOVE</FUNCTION>
+ <FUNCTION>PRESTORE</FUNCTION>
+ <FUNCTION>PSAVE</FUNCTION>
+ <!--FUNCTION>PScc</FUNCTION-->
+ <FUNCTION>PTEST</FUNCTION>
+ <!--FUNCTION>PTRAPcc</FUNCTION-->
+ <FUNCTION>PVALID</FUNCTION>
+ <FUNCTION>RESET</FUNCTION>
+ <FUNCTION>ROL</FUNCTION>
+ <FUNCTION>ROL.B</FUNCTION>
+ <FUNCTION>ROL.W</FUNCTION>
+ <FUNCTION>ROL.L</FUNCTION>
+ <FUNCTION>ROR</FUNCTION>
+ <FUNCTION>ROR.B</FUNCTION>
+ <FUNCTION>ROR.W</FUNCTION>
+ <FUNCTION>ROR.L</FUNCTION>
+ <FUNCTION>ROXL</FUNCTION>
+ <FUNCTION>ROXL.B</FUNCTION>
+ <FUNCTION>ROXL.W</FUNCTION>
+ <FUNCTION>ROXL.L</FUNCTION>
+ <FUNCTION>ROXR</FUNCTION>
+ <FUNCTION>ROXR.B</FUNCTION>
+ <FUNCTION>ROXR.W</FUNCTION>
+ <FUNCTION>ROXR.L</FUNCTION>
+ <FUNCTION>RTD</FUNCTION>
+ <FUNCTION>RTE</FUNCTION>
+ <FUNCTION>RTM</FUNCTION>
+ <FUNCTION>RTR</FUNCTION>
+ <FUNCTION>RTS</FUNCTION>
+ <FUNCTION>SBCD</FUNCTION>
+ <!--Scc-->
+ <FUNCTION>SCC</FUNCTION>
+ <FUNCTION>SCS</FUNCTION>
+ <FUNCTION>SEQ</FUNCTION>
+ <FUNCTION>SF</FUNCTION>
+ <FUNCTION>SGE</FUNCTION>
+ <FUNCTION>SGT</FUNCTION>
+ <FUNCTION>SHI</FUNCTION>
+ <FUNCTION>SLE</FUNCTION>
+ <FUNCTION>SLS</FUNCTION>
+ <FUNCTION>SLT</FUNCTION>
+ <FUNCTION>SMI</FUNCTION>
+ <FUNCTION>SNE</FUNCTION>
+ <FUNCTION>SPL</FUNCTION>
+ <FUNCTION>ST</FUNCTION>
+ <FUNCTION>SVC</FUNCTION>
+ <FUNCTION>SVS</FUNCTION>
+
+ <FUNCTION>STOP</FUNCTION>
+ <FUNCTION>SUB</FUNCTION>
+ <FUNCTION>SUB.B</FUNCTION>
+ <FUNCTION>SUB.W</FUNCTION>
+ <FUNCTION>SUB.L</FUNCTION>
+ <FUNCTION>SUBA</FUNCTION>
+ <FUNCTION>SUBI</FUNCTION>
+ <FUNCTION>SUBI.B</FUNCTION>
+ <FUNCTION>SUBI.W</FUNCTION>
+ <FUNCTION>SUBI.L</FUNCTION>
+ <FUNCTION>SUBQ</FUNCTION>
+ <FUNCTION>SUBQ.B</FUNCTION>
+ <FUNCTION>SUBQ.W</FUNCTION>
+ <FUNCTION>SUBQ.L</FUNCTION>
+ <FUNCTION>SUBX</FUNCTION>
+ <FUNCTION>SUBX.B</FUNCTION>
+ <FUNCTION>SUBX.W</FUNCTION>
+ <FUNCTION>SUBX.L</FUNCTION>
+ <FUNCTION>SWAP</FUNCTION>
+ <FUNCTION>TAS</FUNCTION>
+ <FUNCTION>TBLS</FUNCTION>
+ <FUNCTION>TBLSN</FUNCTION>
+ <FUNCTION>TBLU</FUNCTION>
+ <FUNCTION>TBLUN</FUNCTION>
+ <FUNCTION>TRAP</FUNCTION>
+ <!--TRAPcc-->
+ <FUNCTION>TRAPCC</FUNCTION>
+ <FUNCTION>TRAPCS</FUNCTION>
+ <FUNCTION>TRAPEQ</FUNCTION>
+ <FUNCTION>TRAPF</FUNCTION>
+ <FUNCTION>TRAPGE</FUNCTION>
+ <FUNCTION>TRAPGT</FUNCTION>
+ <FUNCTION>TRAPHI</FUNCTION>
+ <FUNCTION>TRAPLE</FUNCTION>
+ <FUNCTION>TRAPLS</FUNCTION>
+ <FUNCTION>TRAPLT</FUNCTION>
+ <FUNCTION>TRAPMI</FUNCTION>
+ <FUNCTION>TRAPNE</FUNCTION>
+ <FUNCTION>TRAPPL</FUNCTION>
+ <FUNCTION>TRAPT</FUNCTION>
+ <FUNCTION>TRAPVC</FUNCTION>
+ <FUNCTION>TRAPVS</FUNCTION>
+
+ <FUNCTION>TRAPV</FUNCTION>
+ <FUNCTION>TST</FUNCTION>
+ <FUNCTION>TST.B</FUNCTION>
+ <FUNCTION>TST.W</FUNCTION>
+ <FUNCTION>TST.L</FUNCTION>
+ <FUNCTION>UNLK</FUNCTION>
+ <FUNCTION>UNPK</FUNCTION>
+
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/assembly-macro32.xml b/jEdit/modes/assembly-macro32.xml
index 763d17e..59c2dc3 100644
--- a/jEdit/modes/assembly-macro32.xml
+++ b/jEdit/modes/assembly-macro32.xml
@@ -1,577 +1,577 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- VAX Macro32 Assembly mode by Mark Wickens (m.wickens at rhodium-consulting.com)
- based on
- x86 Assembly mode by Kristian Ovaska (kristian.ovaska at helsinki.fi)
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- </PROPS>
-
- <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- NASM: label inside a macro -->
- <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">%%</MARK_FOLLOWING>
-
- <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="TRUE">%</MARK_FOLLOWING>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <!-- Unary Operators -->
- <SEQ TYPE="OPERATOR">B^</SEQ>
- <SEQ TYPE="OPERATOR">D^</SEQ>
- <SEQ TYPE="OPERATOR">O^</SEQ>
- <SEQ TYPE="OPERATOR">X^</SEQ>
- <SEQ TYPE="OPERATOR">A^</SEQ>
- <SEQ TYPE="OPERATOR">M^</SEQ>
- <SEQ TYPE="OPERATOR">F^</SEQ>
- <SEQ TYPE="OPERATOR">C^</SEQ>
- <SEQ TYPE="OPERATOR">L^</SEQ>
- <SEQ TYPE="OPERATOR">G^</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
-
- <!-- Binary Operators -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
-
- <KEYWORDS>
- <!-- Directives -->
- <KEYWORD1>.ADDRESS</KEYWORD1>
- <KEYWORD1>.ALIGN</KEYWORD1>
- <KEYWORD1>.ALIGN</KEYWORD1>
- <KEYWORD1>.ASCIC</KEYWORD1>
- <KEYWORD1>.ASCID</KEYWORD1>
- <KEYWORD1>.ASCII</KEYWORD1>
- <KEYWORD1>.ASCIZ</KEYWORD1>
- <KEYWORD1>.BLKA</KEYWORD1>
- <KEYWORD1>.BLKB</KEYWORD1>
- <KEYWORD1>.BLKD</KEYWORD1>
- <KEYWORD1>.BLKF</KEYWORD1>
- <KEYWORD1>.BLKG</KEYWORD1>
- <KEYWORD1>.BLKH</KEYWORD1>
- <KEYWORD1>.BLKL</KEYWORD1>
- <KEYWORD1>.BLKO</KEYWORD1>
- <KEYWORD1>.BLKQ</KEYWORD1>
- <KEYWORD1>.BLKW</KEYWORD1>
- <KEYWORD1>.BYTE</KEYWORD1>
- <KEYWORD1>.CROSS</KEYWORD1>
- <KEYWORD1>.CROSS</KEYWORD1>
- <KEYWORD1>.DEBUG</KEYWORD1>
- <KEYWORD1>.DEFAULT</KEYWORD1>
- <KEYWORD1>.D_FLOATING</KEYWORD1>
- <KEYWORD1>.DISABLE</KEYWORD1>
- <KEYWORD1>.DOUBLE</KEYWORD1>
- <KEYWORD1>.DSABL</KEYWORD1>
- <KEYWORD1>.ENABL</KEYWORD1>
- <KEYWORD1>.ENABLE</KEYWORD1>
- <KEYWORD1>.END</KEYWORD1>
- <KEYWORD1>.ENDC</KEYWORD1>
- <KEYWORD1>.ENDM</KEYWORD1>
- <KEYWORD1>.ENDR</KEYWORD1>
- <KEYWORD1>.ENTRY</KEYWORD1>
- <KEYWORD1>.ERROR</KEYWORD1>
- <KEYWORD1>.EVEN</KEYWORD1>
- <KEYWORD1>.EXTERNAL</KEYWORD1>
- <KEYWORD1>.EXTRN</KEYWORD1>
- <KEYWORD1>.F_FLOATING</KEYWORD1>
- <KEYWORD1>.FLOAT</KEYWORD1>
- <KEYWORD1>.G_FLOATING</KEYWORD1>
- <KEYWORD1>.GLOBAL</KEYWORD1>
- <KEYWORD1>.GLOBL</KEYWORD1>
- <KEYWORD1>.H_FLOATING</KEYWORD1>
- <KEYWORD1>.IDENT</KEYWORD1>
- <KEYWORD1>.IF</KEYWORD1>
- <KEYWORD1>.IFF</KEYWORD1>
- <KEYWORD1>.IF_FALSE</KEYWORD1>
- <KEYWORD1>.IFT</KEYWORD1>
- <KEYWORD1>.IFTF</KEYWORD1>
- <KEYWORD1>.IF_TRUE</KEYWORD1>
- <KEYWORD1>.IF_TRUE_FALSE</KEYWORD1>
- <KEYWORD1>.IIF</KEYWORD1>
- <KEYWORD1>.IRP</KEYWORD1>
- <KEYWORD1>.IRPC</KEYWORD1>
- <KEYWORD1>.LIBRARY</KEYWORD1>
- <KEYWORD1>.LINK</KEYWORD1>
- <KEYWORD1>.LIST</KEYWORD1>
- <KEYWORD1>.LONG</KEYWORD1>
- <KEYWORD1>.MACRO</KEYWORD1>
- <KEYWORD1>.MASK</KEYWORD1>
- <KEYWORD1>.MCALL</KEYWORD1>
- <KEYWORD1>.MDELETE</KEYWORD1>
- <KEYWORD1>.MEXIT</KEYWORD1>
- <KEYWORD1>.NARG</KEYWORD1>
- <KEYWORD1>.NCHR</KEYWORD1>
- <KEYWORD1>.NLIST</KEYWORD1>
- <KEYWORD1>.NOCROSS</KEYWORD1>
- <KEYWORD1>.NOCROSS</KEYWORD1>
- <KEYWORD1>.NOSHOW</KEYWORD1>
- <KEYWORD1>.NOSHOW</KEYWORD1>
- <KEYWORD1>.NTYPE</KEYWORD1>
- <KEYWORD1>.OCTA</KEYWORD1>
- <KEYWORD1>.OCTA</KEYWORD1>
- <KEYWORD1>.ODD</KEYWORD1>
- <KEYWORD1>.OPDEF</KEYWORD1>
- <KEYWORD1>.PACKED</KEYWORD1>
- <KEYWORD1>.PAGE</KEYWORD1>
- <KEYWORD1>.PRINT</KEYWORD1>
- <KEYWORD1>.PSECT</KEYWORD1>
- <KEYWORD1>.PSECT</KEYWORD1>
- <KEYWORD1>.QUAD</KEYWORD1>
- <KEYWORD1>.QUAD</KEYWORD1>
- <KEYWORD1>.REF1</KEYWORD1>
- <KEYWORD1>.REF2</KEYWORD1>
- <KEYWORD1>.REF4</KEYWORD1>
- <KEYWORD1>.REF8</KEYWORD1>
- <KEYWORD1>.REF16</KEYWORD1>
- <KEYWORD1>.REPEAT</KEYWORD1>
- <KEYWORD1>.REPT</KEYWORD1>
- <KEYWORD1>.RESTORE</KEYWORD1>
- <KEYWORD1>.RESTORE_PSECT</KEYWORD1>
- <KEYWORD1>.SAVE</KEYWORD1>
- <KEYWORD1>.SAVE_PSECT</KEYWORD1>
- <KEYWORD1>.SBTTL</KEYWORD1>
- <KEYWORD1>.SHOW</KEYWORD1>
- <KEYWORD1>.SHOW</KEYWORD1>
- <KEYWORD1>.SIGNED_BYTE</KEYWORD1>
- <KEYWORD1>.SIGNED_WORD</KEYWORD1>
- <KEYWORD1>.SUBTITLE</KEYWORD1>
- <KEYWORD1>.TITLE</KEYWORD1>
- <KEYWORD1>.TRANSFER</KEYWORD1>
- <KEYWORD1>.WARN</KEYWORD1>
- <KEYWORD1>.WEAK</KEYWORD1>
- <KEYWORD1>.WORD</KEYWORD1>
-
- <!-- Registers -->
- <KEYWORD3>R0</KEYWORD3>
- <KEYWORD3>R1</KEYWORD3>
- <KEYWORD3>R2</KEYWORD3>
- <KEYWORD3>R3</KEYWORD3>
- <KEYWORD3>R4</KEYWORD3>
- <KEYWORD3>R5</KEYWORD3>
- <KEYWORD3>R6</KEYWORD3>
- <KEYWORD3>R7</KEYWORD3>
- <KEYWORD3>R8</KEYWORD3>
- <KEYWORD3>R9</KEYWORD3>
- <KEYWORD3>R10</KEYWORD3>
- <KEYWORD3>R11</KEYWORD3>
- <KEYWORD3>R12</KEYWORD3>
- <KEYWORD3>AP</KEYWORD3>
- <KEYWORD3>FP</KEYWORD3>
- <KEYWORD3>SP</KEYWORD3>
- <KEYWORD3>PC</KEYWORD3>
-
- <!-- Instructions -->
- <FUNCTION>ACBB</FUNCTION>
- <FUNCTION>ACBD</FUNCTION>
- <FUNCTION>ACBF</FUNCTION>
- <FUNCTION>ACBG</FUNCTION>
- <FUNCTION>ACBH</FUNCTION>
- <FUNCTION>ACBL</FUNCTION>
- <FUNCTION>ACBW</FUNCTION>
- <FUNCTION>ADAWI</FUNCTION>
- <FUNCTION>ADDB2</FUNCTION>
- <FUNCTION>ADDB3</FUNCTION>
- <FUNCTION>ADDD2</FUNCTION>
- <FUNCTION>ADDD3</FUNCTION>
- <FUNCTION>ADDF2</FUNCTION>
- <FUNCTION>ADDF3</FUNCTION>
- <FUNCTION>ADDG2</FUNCTION>
- <FUNCTION>ADDG3</FUNCTION>
- <FUNCTION>ADDH2</FUNCTION>
- <FUNCTION>ADDH3</FUNCTION>
- <FUNCTION>ADDL2</FUNCTION>
- <FUNCTION>ADDL3</FUNCTION>
- <FUNCTION>ADDP4</FUNCTION>
- <FUNCTION>ADDP6</FUNCTION>
- <FUNCTION>ADDW2</FUNCTION>
- <FUNCTION>ADDW3</FUNCTION>
- <FUNCTION>ADWC</FUNCTION>
- <FUNCTION>AOBLEQ</FUNCTION>
- <FUNCTION>AOBLSS</FUNCTION>
- <FUNCTION>ASHL</FUNCTION>
- <FUNCTION>ASHP</FUNCTION>
- <FUNCTION>ASHQ</FUNCTION>
- <FUNCTION>BBC</FUNCTION>
- <FUNCTION>BBCC</FUNCTION>
- <FUNCTION>BBCCI</FUNCTION>
- <FUNCTION>BBCS</FUNCTION>
- <FUNCTION>BBS</FUNCTION>
- <FUNCTION>BBSC</FUNCTION>
- <FUNCTION>BBSS</FUNCTION>
- <FUNCTION>BBSSI</FUNCTION>
- <FUNCTION>BCC</FUNCTION>
- <FUNCTION>BCS</FUNCTION>
- <FUNCTION>BEQL</FUNCTION>
- <FUNCTION>BEQLU</FUNCTION>
- <FUNCTION>BGEQ</FUNCTION>
- <FUNCTION>BGEQU</FUNCTION>
- <FUNCTION>BGTR</FUNCTION>
- <FUNCTION>BGTRU</FUNCTION>
- <FUNCTION>BICB2</FUNCTION>
- <FUNCTION>BICB3</FUNCTION>
- <FUNCTION>BICL2</FUNCTION>
- <FUNCTION>BICL3</FUNCTION>
- <FUNCTION>BICPSW</FUNCTION>
- <FUNCTION>BICW2</FUNCTION>
- <FUNCTION>BICW3</FUNCTION>
- <FUNCTION>BISB2</FUNCTION>
- <FUNCTION>BISB3</FUNCTION>
- <FUNCTION>BISL2</FUNCTION>
- <FUNCTION>BISL3</FUNCTION>
- <FUNCTION>BISPSW</FUNCTION>
- <FUNCTION>BISW2</FUNCTION>
- <FUNCTION>BISW3</FUNCTION>
- <FUNCTION>BITB</FUNCTION>
- <FUNCTION>BITL</FUNCTION>
- <FUNCTION>BITW</FUNCTION>
- <FUNCTION>BLBC</FUNCTION>
- <FUNCTION>BLBS</FUNCTION>
- <FUNCTION>BLEQ</FUNCTION>
- <FUNCTION>BLEQU</FUNCTION>
- <FUNCTION>BLSS</FUNCTION>
- <FUNCTION>BLSSU</FUNCTION>
- <FUNCTION>BNEQ</FUNCTION>
- <FUNCTION>BNEQU</FUNCTION>
- <FUNCTION>BPT</FUNCTION>
- <FUNCTION>BRB</FUNCTION>
- <FUNCTION>BRW</FUNCTION>
- <FUNCTION>BSBB</FUNCTION>
- <FUNCTION>BSBW</FUNCTION>
- <FUNCTION>BVC</FUNCTION>
- <FUNCTION>BVS</FUNCTION>
- <FUNCTION>CALLG</FUNCTION>
- <FUNCTION>CALLS</FUNCTION>
- <FUNCTION>CASEB</FUNCTION>
- <FUNCTION>CASEL</FUNCTION>
- <FUNCTION>CASEW</FUNCTION>
- <FUNCTION>CHME</FUNCTION>
- <FUNCTION>CHMK</FUNCTION>
- <FUNCTION>CHMS</FUNCTION>
- <FUNCTION>CHMU</FUNCTION>
- <FUNCTION>CLRB</FUNCTION>
- <FUNCTION>CLRD</FUNCTION>
- <FUNCTION>CLRF</FUNCTION>
- <FUNCTION>CLRG</FUNCTION>
- <FUNCTION>CLRH</FUNCTION>
- <FUNCTION>CLRL</FUNCTION>
- <FUNCTION>CLRO</FUNCTION>
- <FUNCTION>CLRQ</FUNCTION>
- <FUNCTION>CLRW</FUNCTION>
- <FUNCTION>CMPB</FUNCTION>
- <FUNCTION>CMPC3</FUNCTION>
- <FUNCTION>CMPC5</FUNCTION>
- <FUNCTION>CMPD</FUNCTION>
- <FUNCTION>CMPF</FUNCTION>
- <FUNCTION>CMPG</FUNCTION>
- <FUNCTION>CMPH</FUNCTION>
- <FUNCTION>CMPL</FUNCTION>
- <FUNCTION>CMPP3</FUNCTION>
- <FUNCTION>CMPP4</FUNCTION>
- <FUNCTION>CMPV</FUNCTION>
- <FUNCTION>CMPW</FUNCTION>
- <FUNCTION>CMPZV</FUNCTION>
- <FUNCTION>CRC</FUNCTION>
- <FUNCTION>CVTBD</FUNCTION>
- <FUNCTION>CVTBF</FUNCTION>
- <FUNCTION>CVTBG</FUNCTION>
- <FUNCTION>CVTBH</FUNCTION>
- <FUNCTION>CVTBL</FUNCTION>
- <FUNCTION>CVTBW</FUNCTION>
- <FUNCTION>CVTDB</FUNCTION>
- <FUNCTION>CVTDF</FUNCTION>
- <FUNCTION>CVTDH</FUNCTION>
- <FUNCTION>CVTDL</FUNCTION>
- <FUNCTION>CVTDW</FUNCTION>
- <FUNCTION>CVTFB</FUNCTION>
- <FUNCTION>CVTFD</FUNCTION>
- <FUNCTION>CVTFG</FUNCTION>
- <FUNCTION>CVTFH</FUNCTION>
- <FUNCTION>CVTFL</FUNCTION>
- <FUNCTION>CVTFW</FUNCTION>
- <FUNCTION>CVTGB</FUNCTION>
- <FUNCTION>CVTGF</FUNCTION>
- <FUNCTION>CVTGH</FUNCTION>
- <FUNCTION>CVTGL</FUNCTION>
- <FUNCTION>CVTGW</FUNCTION>
- <FUNCTION>CVTHB</FUNCTION>
- <FUNCTION>CVTHD</FUNCTION>
- <FUNCTION>CVTHF</FUNCTION>
- <FUNCTION>CVTHG</FUNCTION>
- <FUNCTION>CVTHL</FUNCTION>
- <FUNCTION>CVTHW</FUNCTION>
- <FUNCTION>CVTLB</FUNCTION>
- <FUNCTION>CVTLD</FUNCTION>
- <FUNCTION>CVTLF</FUNCTION>
- <FUNCTION>CVTLG</FUNCTION>
- <FUNCTION>CVTLH</FUNCTION>
- <FUNCTION>CVTLP</FUNCTION>
- <FUNCTION>CVTLW</FUNCTION>
- <FUNCTION>CVTPL</FUNCTION>
- <FUNCTION>CVTPS</FUNCTION>
- <FUNCTION>CVTPT</FUNCTION>
- <FUNCTION>CVTRDL</FUNCTION>
- <FUNCTION>CVTRFL</FUNCTION>
- <FUNCTION>CVTRGL</FUNCTION>
- <FUNCTION>CVTRHL</FUNCTION>
- <FUNCTION>CVTSP</FUNCTION>
- <FUNCTION>CVTTP</FUNCTION>
- <FUNCTION>CVTWB</FUNCTION>
- <FUNCTION>CVTWD</FUNCTION>
- <FUNCTION>CVTWF</FUNCTION>
- <FUNCTION>CVTWG</FUNCTION>
- <FUNCTION>CVTWH</FUNCTION>
- <FUNCTION>CVTWL</FUNCTION>
- <FUNCTION>DECB</FUNCTION>
- <FUNCTION>DECL</FUNCTION>
- <FUNCTION>DECW</FUNCTION>
- <FUNCTION>DIVB2</FUNCTION>
- <FUNCTION>DIVB3</FUNCTION>
- <FUNCTION>DIVD2</FUNCTION>
- <FUNCTION>DIVD3</FUNCTION>
- <FUNCTION>DIVF2</FUNCTION>
- <FUNCTION>DIVF3</FUNCTION>
- <FUNCTION>DIVG2</FUNCTION>
- <FUNCTION>DIVG3</FUNCTION>
- <FUNCTION>DIVH2</FUNCTION>
- <FUNCTION>DIVH3</FUNCTION>
- <FUNCTION>DIVL2</FUNCTION>
- <FUNCTION>DIVL3</FUNCTION>
- <FUNCTION>DIVP</FUNCTION>
- <FUNCTION>DIVW2</FUNCTION>
- <FUNCTION>DIVW3</FUNCTION>
- <FUNCTION>EDITPC</FUNCTION>
- <FUNCTION>EDIV</FUNCTION>
- <FUNCTION>EMODD</FUNCTION>
- <FUNCTION>EMODF</FUNCTION>
- <FUNCTION>EMODG</FUNCTION>
- <FUNCTION>EMODH</FUNCTION>
- <FUNCTION>EMUL</FUNCTION>
- <FUNCTION>EXTV</FUNCTION>
- <FUNCTION>EXTZV</FUNCTION>
- <FUNCTION>FFC</FUNCTION>
- <FUNCTION>FFS</FUNCTION>
- <FUNCTION>HALT</FUNCTION>
- <FUNCTION>INCB</FUNCTION>
- <FUNCTION>INCL</FUNCTION>
- <FUNCTION>INCW</FUNCTION>
- <FUNCTION>INDEX</FUNCTION>
- <FUNCTION>INSQHI</FUNCTION>
- <FUNCTION>INSQTI</FUNCTION>
- <FUNCTION>INSQUE</FUNCTION>
- <FUNCTION>INSV</FUNCTION>
- <FUNCTION>IOTA</FUNCTION>
- <FUNCTION>JMP</FUNCTION>
- <FUNCTION>JSB</FUNCTION>
- <FUNCTION>LDPCTX</FUNCTION>
- <FUNCTION>LOCC</FUNCTION>
- <FUNCTION>MATCHC</FUNCTION>
- <FUNCTION>MCOMB</FUNCTION>
- <FUNCTION>MCOML</FUNCTION>
- <FUNCTION>MCOMW</FUNCTION>
- <FUNCTION>MFPR</FUNCTION>
- <FUNCTION>MFVP</FUNCTION>
- <FUNCTION>MNEGB</FUNCTION>
- <FUNCTION>MNEGD</FUNCTION>
- <FUNCTION>MNEGF</FUNCTION>
- <FUNCTION>MNEGG</FUNCTION>
- <FUNCTION>MNEGH</FUNCTION>
- <FUNCTION>MNEGL</FUNCTION>
- <FUNCTION>MNEGW</FUNCTION>
- <FUNCTION>MOVAB</FUNCTION>
- <FUNCTION>MOVAD</FUNCTION>
- <FUNCTION>MOVAF</FUNCTION>
- <FUNCTION>MOVAG</FUNCTION>
- <FUNCTION>MOVAH</FUNCTION>
- <FUNCTION>MOVAL</FUNCTION>
- <FUNCTION>MOVAO</FUNCTION>
- <FUNCTION>MOVAQ</FUNCTION>
- <FUNCTION>MOVAW</FUNCTION>
- <FUNCTION>MOVB</FUNCTION>
- <FUNCTION>MOVC3</FUNCTION>
- <FUNCTION>MOVC5</FUNCTION>
- <FUNCTION>MOVD</FUNCTION>
- <FUNCTION>MOVF</FUNCTION>
- <FUNCTION>MOVG</FUNCTION>
- <FUNCTION>MOVH</FUNCTION>
- <FUNCTION>MOVL</FUNCTION>
- <FUNCTION>MOVO</FUNCTION>
- <FUNCTION>MOVP</FUNCTION>
- <FUNCTION>MOVPSL</FUNCTION>
- <FUNCTION>MOVQ</FUNCTION>
- <FUNCTION>MOVTC</FUNCTION>
- <FUNCTION>MOVTUC</FUNCTION>
- <FUNCTION>MOVW</FUNCTION>
- <FUNCTION>MOVZBL</FUNCTION>
- <FUNCTION>MOVZBW</FUNCTION>
- <FUNCTION>MOVZWL</FUNCTION>
- <FUNCTION>MTPR</FUNCTION>
- <FUNCTION>MTVP</FUNCTION>
- <FUNCTION>MULB2</FUNCTION>
- <FUNCTION>MULB3</FUNCTION>
- <FUNCTION>MULD2</FUNCTION>
- <FUNCTION>MULD3</FUNCTION>
- <FUNCTION>MULF2</FUNCTION>
- <FUNCTION>MULF3</FUNCTION>
- <FUNCTION>MULG2</FUNCTION>
- <FUNCTION>MULG3</FUNCTION>
- <FUNCTION>MULH2</FUNCTION>
- <FUNCTION>MULH3</FUNCTION>
- <FUNCTION>MULL2</FUNCTION>
- <FUNCTION>MULL3</FUNCTION>
- <FUNCTION>MULP</FUNCTION>
- <FUNCTION>MULW2</FUNCTION>
- <FUNCTION>MULW3</FUNCTION>
- <FUNCTION>NOP</FUNCTION>
- <FUNCTION>POLYD</FUNCTION>
- <FUNCTION>POLYF</FUNCTION>
- <FUNCTION>POLYG</FUNCTION>
- <FUNCTION>POLYH</FUNCTION>
- <FUNCTION>POPR</FUNCTION>
- <FUNCTION>PROBER</FUNCTION>
- <FUNCTION>PROBEW</FUNCTION>
- <FUNCTION>PUSHAB</FUNCTION>
- <FUNCTION>PUSHABL</FUNCTION>
- <FUNCTION>PUSHAL</FUNCTION>
- <FUNCTION>PUSHAD</FUNCTION>
- <FUNCTION>PUSHAF</FUNCTION>
- <FUNCTION>PUSHAG</FUNCTION>
- <FUNCTION>PUSHAH</FUNCTION>
- <FUNCTION>PUSHAL</FUNCTION>
- <FUNCTION>PUSHAO</FUNCTION>
- <FUNCTION>PUSHAQ</FUNCTION>
- <FUNCTION>PUSHAW</FUNCTION>
- <FUNCTION>PUSHL</FUNCTION>
- <FUNCTION>PUSHR</FUNCTION>
- <FUNCTION>REI</FUNCTION>
- <FUNCTION>REMQHI</FUNCTION>
- <FUNCTION>REMQTI</FUNCTION>
- <FUNCTION>REMQUE</FUNCTION>
- <FUNCTION>RET</FUNCTION>
- <FUNCTION>ROTL</FUNCTION>
- <FUNCTION>RSB</FUNCTION>
- <FUNCTION>SBWC</FUNCTION>
- <FUNCTION>SCANC</FUNCTION>
- <FUNCTION>SKPC</FUNCTION>
- <FUNCTION>SOBGEQ</FUNCTION>
- <FUNCTION>SOBGTR</FUNCTION>
- <FUNCTION>SPANC</FUNCTION>
- <FUNCTION>SUBB2</FUNCTION>
- <FUNCTION>SUBB3</FUNCTION>
- <FUNCTION>SUBD2</FUNCTION>
- <FUNCTION>SUBD3</FUNCTION>
- <FUNCTION>SUBF2</FUNCTION>
- <FUNCTION>SUBF3</FUNCTION>
- <FUNCTION>SUBG2</FUNCTION>
- <FUNCTION>SUBG3</FUNCTION>
- <FUNCTION>SUBH2</FUNCTION>
- <FUNCTION>SUBH3</FUNCTION>
- <FUNCTION>SUBL2</FUNCTION>
- <FUNCTION>SUBL3</FUNCTION>
- <FUNCTION>SUBP4</FUNCTION>
- <FUNCTION>SUBP6</FUNCTION>
- <FUNCTION>SUBW2</FUNCTION>
- <FUNCTION>SUBW3</FUNCTION>
- <FUNCTION>SVPCTX</FUNCTION>
- <FUNCTION>TSTB</FUNCTION>
- <FUNCTION>TSTD</FUNCTION>
- <FUNCTION>TSTF</FUNCTION>
- <FUNCTION>TSTG</FUNCTION>
- <FUNCTION>TSTH</FUNCTION>
- <FUNCTION>TSTL</FUNCTION>
- <FUNCTION>TSTW</FUNCTION>
- <FUNCTION>VGATHL</FUNCTION>
- <FUNCTION>VGATHQ</FUNCTION>
- <FUNCTION>VLDL</FUNCTION>
- <FUNCTION>VLDQ</FUNCTION>
- <FUNCTION>VSADDD</FUNCTION>
- <FUNCTION>VSADDF</FUNCTION>
- <FUNCTION>VSADDG</FUNCTION>
- <FUNCTION>VSADDL</FUNCTION>
- <FUNCTION>VSBICL</FUNCTION>
- <FUNCTION>VSBISL</FUNCTION>
- <FUNCTION>VSCATL</FUNCTION>
- <FUNCTION>VSCATQ</FUNCTION>
- <FUNCTION>VSCMPD</FUNCTION>
- <FUNCTION>VSCMPF</FUNCTION>
- <FUNCTION>VSCMPG</FUNCTION>
- <FUNCTION>VSCMPL</FUNCTION>
- <FUNCTION>VSDIVD</FUNCTION>
- <FUNCTION>VSDIVF</FUNCTION>
- <FUNCTION>VSDIVG</FUNCTION>
- <FUNCTION>VSMERGE</FUNCTION>
- <FUNCTION>VSMULD</FUNCTION>
- <FUNCTION>VSMULF</FUNCTION>
- <FUNCTION>VSMULG</FUNCTION>
- <FUNCTION>VSMULL</FUNCTION>
- <FUNCTION>VSSLLL</FUNCTION>
- <FUNCTION>VSSRLL</FUNCTION>
- <FUNCTION>VSSUBD</FUNCTION>
- <FUNCTION>VSSUBF</FUNCTION>
- <FUNCTION>VSSUBG</FUNCTION>
- <FUNCTION>VSSUBL</FUNCTION>
- <FUNCTION>VSTL</FUNCTION>
- <FUNCTION>VSTQ</FUNCTION>
- <FUNCTION>VSXORL</FUNCTION>
- <FUNCTION>VSYNC</FUNCTION>
- <FUNCTION>VVADDD</FUNCTION>
- <FUNCTION>VVADDF</FUNCTION>
- <FUNCTION>VVADDG</FUNCTION>
- <FUNCTION>VVADDL</FUNCTION>
- <FUNCTION>VVBICL</FUNCTION>
- <FUNCTION>VVBISL</FUNCTION>
- <FUNCTION>VVCMPD</FUNCTION>
- <FUNCTION>VVCMPF</FUNCTION>
- <FUNCTION>VVCMPG</FUNCTION>
- <FUNCTION>VVCMPL</FUNCTION>
- <FUNCTION>VVCVT</FUNCTION>
- <FUNCTION>VVDIVD</FUNCTION>
- <FUNCTION>VVDIVF</FUNCTION>
- <FUNCTION>VVDIVG</FUNCTION>
- <FUNCTION>VVMERGE</FUNCTION>
- <FUNCTION>VVMULD</FUNCTION>
- <FUNCTION>VVMULF</FUNCTION>
- <FUNCTION>VVMULG</FUNCTION>
- <FUNCTION>VVMULL</FUNCTION>
- <FUNCTION>VVSLLL</FUNCTION>
- <FUNCTION>VVSRLL</FUNCTION>
- <FUNCTION>VVSUBD</FUNCTION>
- <FUNCTION>VVSUBF</FUNCTION>
- <FUNCTION>VVSUBG</FUNCTION>
- <FUNCTION>VVSUBL</FUNCTION>
- <FUNCTION>VVXORL</FUNCTION>
- <FUNCTION>XFC</FUNCTION>
- <FUNCTION>XORB2</FUNCTION>
- <FUNCTION>XORB3</FUNCTION>
- <FUNCTION>XORL2</FUNCTION>
- <FUNCTION>XORL3</FUNCTION>
- <FUNCTION>XORW2</FUNCTION>
- <FUNCTION>XORW3</FUNCTION>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ VAX Macro32 Assembly mode by Mark Wickens (m.wickens at rhodium-consulting.com)
+ based on
+ x86 Assembly mode by Kristian Ovaska (kristian.ovaska at helsinki.fi)
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ </PROPS>
+
+ <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- NASM: label inside a macro -->
+ <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">%%</MARK_FOLLOWING>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="TRUE">%</MARK_FOLLOWING>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <!-- Unary Operators -->
+ <SEQ TYPE="OPERATOR">B^</SEQ>
+ <SEQ TYPE="OPERATOR">D^</SEQ>
+ <SEQ TYPE="OPERATOR">O^</SEQ>
+ <SEQ TYPE="OPERATOR">X^</SEQ>
+ <SEQ TYPE="OPERATOR">A^</SEQ>
+ <SEQ TYPE="OPERATOR">M^</SEQ>
+ <SEQ TYPE="OPERATOR">F^</SEQ>
+ <SEQ TYPE="OPERATOR">C^</SEQ>
+ <SEQ TYPE="OPERATOR">L^</SEQ>
+ <SEQ TYPE="OPERATOR">G^</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+
+ <!-- Binary Operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+
+ <KEYWORDS>
+ <!-- Directives -->
+ <KEYWORD1>.ADDRESS</KEYWORD1>
+ <KEYWORD1>.ALIGN</KEYWORD1>
+ <KEYWORD1>.ALIGN</KEYWORD1>
+ <KEYWORD1>.ASCIC</KEYWORD1>
+ <KEYWORD1>.ASCID</KEYWORD1>
+ <KEYWORD1>.ASCII</KEYWORD1>
+ <KEYWORD1>.ASCIZ</KEYWORD1>
+ <KEYWORD1>.BLKA</KEYWORD1>
+ <KEYWORD1>.BLKB</KEYWORD1>
+ <KEYWORD1>.BLKD</KEYWORD1>
+ <KEYWORD1>.BLKF</KEYWORD1>
+ <KEYWORD1>.BLKG</KEYWORD1>
+ <KEYWORD1>.BLKH</KEYWORD1>
+ <KEYWORD1>.BLKL</KEYWORD1>
+ <KEYWORD1>.BLKO</KEYWORD1>
+ <KEYWORD1>.BLKQ</KEYWORD1>
+ <KEYWORD1>.BLKW</KEYWORD1>
+ <KEYWORD1>.BYTE</KEYWORD1>
+ <KEYWORD1>.CROSS</KEYWORD1>
+ <KEYWORD1>.CROSS</KEYWORD1>
+ <KEYWORD1>.DEBUG</KEYWORD1>
+ <KEYWORD1>.DEFAULT</KEYWORD1>
+ <KEYWORD1>.D_FLOATING</KEYWORD1>
+ <KEYWORD1>.DISABLE</KEYWORD1>
+ <KEYWORD1>.DOUBLE</KEYWORD1>
+ <KEYWORD1>.DSABL</KEYWORD1>
+ <KEYWORD1>.ENABL</KEYWORD1>
+ <KEYWORD1>.ENABLE</KEYWORD1>
+ <KEYWORD1>.END</KEYWORD1>
+ <KEYWORD1>.ENDC</KEYWORD1>
+ <KEYWORD1>.ENDM</KEYWORD1>
+ <KEYWORD1>.ENDR</KEYWORD1>
+ <KEYWORD1>.ENTRY</KEYWORD1>
+ <KEYWORD1>.ERROR</KEYWORD1>
+ <KEYWORD1>.EVEN</KEYWORD1>
+ <KEYWORD1>.EXTERNAL</KEYWORD1>
+ <KEYWORD1>.EXTRN</KEYWORD1>
+ <KEYWORD1>.F_FLOATING</KEYWORD1>
+ <KEYWORD1>.FLOAT</KEYWORD1>
+ <KEYWORD1>.G_FLOATING</KEYWORD1>
+ <KEYWORD1>.GLOBAL</KEYWORD1>
+ <KEYWORD1>.GLOBL</KEYWORD1>
+ <KEYWORD1>.H_FLOATING</KEYWORD1>
+ <KEYWORD1>.IDENT</KEYWORD1>
+ <KEYWORD1>.IF</KEYWORD1>
+ <KEYWORD1>.IFF</KEYWORD1>
+ <KEYWORD1>.IF_FALSE</KEYWORD1>
+ <KEYWORD1>.IFT</KEYWORD1>
+ <KEYWORD1>.IFTF</KEYWORD1>
+ <KEYWORD1>.IF_TRUE</KEYWORD1>
+ <KEYWORD1>.IF_TRUE_FALSE</KEYWORD1>
+ <KEYWORD1>.IIF</KEYWORD1>
+ <KEYWORD1>.IRP</KEYWORD1>
+ <KEYWORD1>.IRPC</KEYWORD1>
+ <KEYWORD1>.LIBRARY</KEYWORD1>
+ <KEYWORD1>.LINK</KEYWORD1>
+ <KEYWORD1>.LIST</KEYWORD1>
+ <KEYWORD1>.LONG</KEYWORD1>
+ <KEYWORD1>.MACRO</KEYWORD1>
+ <KEYWORD1>.MASK</KEYWORD1>
+ <KEYWORD1>.MCALL</KEYWORD1>
+ <KEYWORD1>.MDELETE</KEYWORD1>
+ <KEYWORD1>.MEXIT</KEYWORD1>
+ <KEYWORD1>.NARG</KEYWORD1>
+ <KEYWORD1>.NCHR</KEYWORD1>
+ <KEYWORD1>.NLIST</KEYWORD1>
+ <KEYWORD1>.NOCROSS</KEYWORD1>
+ <KEYWORD1>.NOCROSS</KEYWORD1>
+ <KEYWORD1>.NOSHOW</KEYWORD1>
+ <KEYWORD1>.NOSHOW</KEYWORD1>
+ <KEYWORD1>.NTYPE</KEYWORD1>
+ <KEYWORD1>.OCTA</KEYWORD1>
+ <KEYWORD1>.OCTA</KEYWORD1>
+ <KEYWORD1>.ODD</KEYWORD1>
+ <KEYWORD1>.OPDEF</KEYWORD1>
+ <KEYWORD1>.PACKED</KEYWORD1>
+ <KEYWORD1>.PAGE</KEYWORD1>
+ <KEYWORD1>.PRINT</KEYWORD1>
+ <KEYWORD1>.PSECT</KEYWORD1>
+ <KEYWORD1>.PSECT</KEYWORD1>
+ <KEYWORD1>.QUAD</KEYWORD1>
+ <KEYWORD1>.QUAD</KEYWORD1>
+ <KEYWORD1>.REF1</KEYWORD1>
+ <KEYWORD1>.REF2</KEYWORD1>
+ <KEYWORD1>.REF4</KEYWORD1>
+ <KEYWORD1>.REF8</KEYWORD1>
+ <KEYWORD1>.REF16</KEYWORD1>
+ <KEYWORD1>.REPEAT</KEYWORD1>
+ <KEYWORD1>.REPT</KEYWORD1>
+ <KEYWORD1>.RESTORE</KEYWORD1>
+ <KEYWORD1>.RESTORE_PSECT</KEYWORD1>
+ <KEYWORD1>.SAVE</KEYWORD1>
+ <KEYWORD1>.SAVE_PSECT</KEYWORD1>
+ <KEYWORD1>.SBTTL</KEYWORD1>
+ <KEYWORD1>.SHOW</KEYWORD1>
+ <KEYWORD1>.SHOW</KEYWORD1>
+ <KEYWORD1>.SIGNED_BYTE</KEYWORD1>
+ <KEYWORD1>.SIGNED_WORD</KEYWORD1>
+ <KEYWORD1>.SUBTITLE</KEYWORD1>
+ <KEYWORD1>.TITLE</KEYWORD1>
+ <KEYWORD1>.TRANSFER</KEYWORD1>
+ <KEYWORD1>.WARN</KEYWORD1>
+ <KEYWORD1>.WEAK</KEYWORD1>
+ <KEYWORD1>.WORD</KEYWORD1>
+
+ <!-- Registers -->
+ <KEYWORD3>R0</KEYWORD3>
+ <KEYWORD3>R1</KEYWORD3>
+ <KEYWORD3>R2</KEYWORD3>
+ <KEYWORD3>R3</KEYWORD3>
+ <KEYWORD3>R4</KEYWORD3>
+ <KEYWORD3>R5</KEYWORD3>
+ <KEYWORD3>R6</KEYWORD3>
+ <KEYWORD3>R7</KEYWORD3>
+ <KEYWORD3>R8</KEYWORD3>
+ <KEYWORD3>R9</KEYWORD3>
+ <KEYWORD3>R10</KEYWORD3>
+ <KEYWORD3>R11</KEYWORD3>
+ <KEYWORD3>R12</KEYWORD3>
+ <KEYWORD3>AP</KEYWORD3>
+ <KEYWORD3>FP</KEYWORD3>
+ <KEYWORD3>SP</KEYWORD3>
+ <KEYWORD3>PC</KEYWORD3>
+
+ <!-- Instructions -->
+ <FUNCTION>ACBB</FUNCTION>
+ <FUNCTION>ACBD</FUNCTION>
+ <FUNCTION>ACBF</FUNCTION>
+ <FUNCTION>ACBG</FUNCTION>
+ <FUNCTION>ACBH</FUNCTION>
+ <FUNCTION>ACBL</FUNCTION>
+ <FUNCTION>ACBW</FUNCTION>
+ <FUNCTION>ADAWI</FUNCTION>
+ <FUNCTION>ADDB2</FUNCTION>
+ <FUNCTION>ADDB3</FUNCTION>
+ <FUNCTION>ADDD2</FUNCTION>
+ <FUNCTION>ADDD3</FUNCTION>
+ <FUNCTION>ADDF2</FUNCTION>
+ <FUNCTION>ADDF3</FUNCTION>
+ <FUNCTION>ADDG2</FUNCTION>
+ <FUNCTION>ADDG3</FUNCTION>
+ <FUNCTION>ADDH2</FUNCTION>
+ <FUNCTION>ADDH3</FUNCTION>
+ <FUNCTION>ADDL2</FUNCTION>
+ <FUNCTION>ADDL3</FUNCTION>
+ <FUNCTION>ADDP4</FUNCTION>
+ <FUNCTION>ADDP6</FUNCTION>
+ <FUNCTION>ADDW2</FUNCTION>
+ <FUNCTION>ADDW3</FUNCTION>
+ <FUNCTION>ADWC</FUNCTION>
+ <FUNCTION>AOBLEQ</FUNCTION>
+ <FUNCTION>AOBLSS</FUNCTION>
+ <FUNCTION>ASHL</FUNCTION>
+ <FUNCTION>ASHP</FUNCTION>
+ <FUNCTION>ASHQ</FUNCTION>
+ <FUNCTION>BBC</FUNCTION>
+ <FUNCTION>BBCC</FUNCTION>
+ <FUNCTION>BBCCI</FUNCTION>
+ <FUNCTION>BBCS</FUNCTION>
+ <FUNCTION>BBS</FUNCTION>
+ <FUNCTION>BBSC</FUNCTION>
+ <FUNCTION>BBSS</FUNCTION>
+ <FUNCTION>BBSSI</FUNCTION>
+ <FUNCTION>BCC</FUNCTION>
+ <FUNCTION>BCS</FUNCTION>
+ <FUNCTION>BEQL</FUNCTION>
+ <FUNCTION>BEQLU</FUNCTION>
+ <FUNCTION>BGEQ</FUNCTION>
+ <FUNCTION>BGEQU</FUNCTION>
+ <FUNCTION>BGTR</FUNCTION>
+ <FUNCTION>BGTRU</FUNCTION>
+ <FUNCTION>BICB2</FUNCTION>
+ <FUNCTION>BICB3</FUNCTION>
+ <FUNCTION>BICL2</FUNCTION>
+ <FUNCTION>BICL3</FUNCTION>
+ <FUNCTION>BICPSW</FUNCTION>
+ <FUNCTION>BICW2</FUNCTION>
+ <FUNCTION>BICW3</FUNCTION>
+ <FUNCTION>BISB2</FUNCTION>
+ <FUNCTION>BISB3</FUNCTION>
+ <FUNCTION>BISL2</FUNCTION>
+ <FUNCTION>BISL3</FUNCTION>
+ <FUNCTION>BISPSW</FUNCTION>
+ <FUNCTION>BISW2</FUNCTION>
+ <FUNCTION>BISW3</FUNCTION>
+ <FUNCTION>BITB</FUNCTION>
+ <FUNCTION>BITL</FUNCTION>
+ <FUNCTION>BITW</FUNCTION>
+ <FUNCTION>BLBC</FUNCTION>
+ <FUNCTION>BLBS</FUNCTION>
+ <FUNCTION>BLEQ</FUNCTION>
+ <FUNCTION>BLEQU</FUNCTION>
+ <FUNCTION>BLSS</FUNCTION>
+ <FUNCTION>BLSSU</FUNCTION>
+ <FUNCTION>BNEQ</FUNCTION>
+ <FUNCTION>BNEQU</FUNCTION>
+ <FUNCTION>BPT</FUNCTION>
+ <FUNCTION>BRB</FUNCTION>
+ <FUNCTION>BRW</FUNCTION>
+ <FUNCTION>BSBB</FUNCTION>
+ <FUNCTION>BSBW</FUNCTION>
+ <FUNCTION>BVC</FUNCTION>
+ <FUNCTION>BVS</FUNCTION>
+ <FUNCTION>CALLG</FUNCTION>
+ <FUNCTION>CALLS</FUNCTION>
+ <FUNCTION>CASEB</FUNCTION>
+ <FUNCTION>CASEL</FUNCTION>
+ <FUNCTION>CASEW</FUNCTION>
+ <FUNCTION>CHME</FUNCTION>
+ <FUNCTION>CHMK</FUNCTION>
+ <FUNCTION>CHMS</FUNCTION>
+ <FUNCTION>CHMU</FUNCTION>
+ <FUNCTION>CLRB</FUNCTION>
+ <FUNCTION>CLRD</FUNCTION>
+ <FUNCTION>CLRF</FUNCTION>
+ <FUNCTION>CLRG</FUNCTION>
+ <FUNCTION>CLRH</FUNCTION>
+ <FUNCTION>CLRL</FUNCTION>
+ <FUNCTION>CLRO</FUNCTION>
+ <FUNCTION>CLRQ</FUNCTION>
+ <FUNCTION>CLRW</FUNCTION>
+ <FUNCTION>CMPB</FUNCTION>
+ <FUNCTION>CMPC3</FUNCTION>
+ <FUNCTION>CMPC5</FUNCTION>
+ <FUNCTION>CMPD</FUNCTION>
+ <FUNCTION>CMPF</FUNCTION>
+ <FUNCTION>CMPG</FUNCTION>
+ <FUNCTION>CMPH</FUNCTION>
+ <FUNCTION>CMPL</FUNCTION>
+ <FUNCTION>CMPP3</FUNCTION>
+ <FUNCTION>CMPP4</FUNCTION>
+ <FUNCTION>CMPV</FUNCTION>
+ <FUNCTION>CMPW</FUNCTION>
+ <FUNCTION>CMPZV</FUNCTION>
+ <FUNCTION>CRC</FUNCTION>
+ <FUNCTION>CVTBD</FUNCTION>
+ <FUNCTION>CVTBF</FUNCTION>
+ <FUNCTION>CVTBG</FUNCTION>
+ <FUNCTION>CVTBH</FUNCTION>
+ <FUNCTION>CVTBL</FUNCTION>
+ <FUNCTION>CVTBW</FUNCTION>
+ <FUNCTION>CVTDB</FUNCTION>
+ <FUNCTION>CVTDF</FUNCTION>
+ <FUNCTION>CVTDH</FUNCTION>
+ <FUNCTION>CVTDL</FUNCTION>
+ <FUNCTION>CVTDW</FUNCTION>
+ <FUNCTION>CVTFB</FUNCTION>
+ <FUNCTION>CVTFD</FUNCTION>
+ <FUNCTION>CVTFG</FUNCTION>
+ <FUNCTION>CVTFH</FUNCTION>
+ <FUNCTION>CVTFL</FUNCTION>
+ <FUNCTION>CVTFW</FUNCTION>
+ <FUNCTION>CVTGB</FUNCTION>
+ <FUNCTION>CVTGF</FUNCTION>
+ <FUNCTION>CVTGH</FUNCTION>
+ <FUNCTION>CVTGL</FUNCTION>
+ <FUNCTION>CVTGW</FUNCTION>
+ <FUNCTION>CVTHB</FUNCTION>
+ <FUNCTION>CVTHD</FUNCTION>
+ <FUNCTION>CVTHF</FUNCTION>
+ <FUNCTION>CVTHG</FUNCTION>
+ <FUNCTION>CVTHL</FUNCTION>
+ <FUNCTION>CVTHW</FUNCTION>
+ <FUNCTION>CVTLB</FUNCTION>
+ <FUNCTION>CVTLD</FUNCTION>
+ <FUNCTION>CVTLF</FUNCTION>
+ <FUNCTION>CVTLG</FUNCTION>
+ <FUNCTION>CVTLH</FUNCTION>
+ <FUNCTION>CVTLP</FUNCTION>
+ <FUNCTION>CVTLW</FUNCTION>
+ <FUNCTION>CVTPL</FUNCTION>
+ <FUNCTION>CVTPS</FUNCTION>
+ <FUNCTION>CVTPT</FUNCTION>
+ <FUNCTION>CVTRDL</FUNCTION>
+ <FUNCTION>CVTRFL</FUNCTION>
+ <FUNCTION>CVTRGL</FUNCTION>
+ <FUNCTION>CVTRHL</FUNCTION>
+ <FUNCTION>CVTSP</FUNCTION>
+ <FUNCTION>CVTTP</FUNCTION>
+ <FUNCTION>CVTWB</FUNCTION>
+ <FUNCTION>CVTWD</FUNCTION>
+ <FUNCTION>CVTWF</FUNCTION>
+ <FUNCTION>CVTWG</FUNCTION>
+ <FUNCTION>CVTWH</FUNCTION>
+ <FUNCTION>CVTWL</FUNCTION>
+ <FUNCTION>DECB</FUNCTION>
+ <FUNCTION>DECL</FUNCTION>
+ <FUNCTION>DECW</FUNCTION>
+ <FUNCTION>DIVB2</FUNCTION>
+ <FUNCTION>DIVB3</FUNCTION>
+ <FUNCTION>DIVD2</FUNCTION>
+ <FUNCTION>DIVD3</FUNCTION>
+ <FUNCTION>DIVF2</FUNCTION>
+ <FUNCTION>DIVF3</FUNCTION>
+ <FUNCTION>DIVG2</FUNCTION>
+ <FUNCTION>DIVG3</FUNCTION>
+ <FUNCTION>DIVH2</FUNCTION>
+ <FUNCTION>DIVH3</FUNCTION>
+ <FUNCTION>DIVL2</FUNCTION>
+ <FUNCTION>DIVL3</FUNCTION>
+ <FUNCTION>DIVP</FUNCTION>
+ <FUNCTION>DIVW2</FUNCTION>
+ <FUNCTION>DIVW3</FUNCTION>
+ <FUNCTION>EDITPC</FUNCTION>
+ <FUNCTION>EDIV</FUNCTION>
+ <FUNCTION>EMODD</FUNCTION>
+ <FUNCTION>EMODF</FUNCTION>
+ <FUNCTION>EMODG</FUNCTION>
+ <FUNCTION>EMODH</FUNCTION>
+ <FUNCTION>EMUL</FUNCTION>
+ <FUNCTION>EXTV</FUNCTION>
+ <FUNCTION>EXTZV</FUNCTION>
+ <FUNCTION>FFC</FUNCTION>
+ <FUNCTION>FFS</FUNCTION>
+ <FUNCTION>HALT</FUNCTION>
+ <FUNCTION>INCB</FUNCTION>
+ <FUNCTION>INCL</FUNCTION>
+ <FUNCTION>INCW</FUNCTION>
+ <FUNCTION>INDEX</FUNCTION>
+ <FUNCTION>INSQHI</FUNCTION>
+ <FUNCTION>INSQTI</FUNCTION>
+ <FUNCTION>INSQUE</FUNCTION>
+ <FUNCTION>INSV</FUNCTION>
+ <FUNCTION>IOTA</FUNCTION>
+ <FUNCTION>JMP</FUNCTION>
+ <FUNCTION>JSB</FUNCTION>
+ <FUNCTION>LDPCTX</FUNCTION>
+ <FUNCTION>LOCC</FUNCTION>
+ <FUNCTION>MATCHC</FUNCTION>
+ <FUNCTION>MCOMB</FUNCTION>
+ <FUNCTION>MCOML</FUNCTION>
+ <FUNCTION>MCOMW</FUNCTION>
+ <FUNCTION>MFPR</FUNCTION>
+ <FUNCTION>MFVP</FUNCTION>
+ <FUNCTION>MNEGB</FUNCTION>
+ <FUNCTION>MNEGD</FUNCTION>
+ <FUNCTION>MNEGF</FUNCTION>
+ <FUNCTION>MNEGG</FUNCTION>
+ <FUNCTION>MNEGH</FUNCTION>
+ <FUNCTION>MNEGL</FUNCTION>
+ <FUNCTION>MNEGW</FUNCTION>
+ <FUNCTION>MOVAB</FUNCTION>
+ <FUNCTION>MOVAD</FUNCTION>
+ <FUNCTION>MOVAF</FUNCTION>
+ <FUNCTION>MOVAG</FUNCTION>
+ <FUNCTION>MOVAH</FUNCTION>
+ <FUNCTION>MOVAL</FUNCTION>
+ <FUNCTION>MOVAO</FUNCTION>
+ <FUNCTION>MOVAQ</FUNCTION>
+ <FUNCTION>MOVAW</FUNCTION>
+ <FUNCTION>MOVB</FUNCTION>
+ <FUNCTION>MOVC3</FUNCTION>
+ <FUNCTION>MOVC5</FUNCTION>
+ <FUNCTION>MOVD</FUNCTION>
+ <FUNCTION>MOVF</FUNCTION>
+ <FUNCTION>MOVG</FUNCTION>
+ <FUNCTION>MOVH</FUNCTION>
+ <FUNCTION>MOVL</FUNCTION>
+ <FUNCTION>MOVO</FUNCTION>
+ <FUNCTION>MOVP</FUNCTION>
+ <FUNCTION>MOVPSL</FUNCTION>
+ <FUNCTION>MOVQ</FUNCTION>
+ <FUNCTION>MOVTC</FUNCTION>
+ <FUNCTION>MOVTUC</FUNCTION>
+ <FUNCTION>MOVW</FUNCTION>
+ <FUNCTION>MOVZBL</FUNCTION>
+ <FUNCTION>MOVZBW</FUNCTION>
+ <FUNCTION>MOVZWL</FUNCTION>
+ <FUNCTION>MTPR</FUNCTION>
+ <FUNCTION>MTVP</FUNCTION>
+ <FUNCTION>MULB2</FUNCTION>
+ <FUNCTION>MULB3</FUNCTION>
+ <FUNCTION>MULD2</FUNCTION>
+ <FUNCTION>MULD3</FUNCTION>
+ <FUNCTION>MULF2</FUNCTION>
+ <FUNCTION>MULF3</FUNCTION>
+ <FUNCTION>MULG2</FUNCTION>
+ <FUNCTION>MULG3</FUNCTION>
+ <FUNCTION>MULH2</FUNCTION>
+ <FUNCTION>MULH3</FUNCTION>
+ <FUNCTION>MULL2</FUNCTION>
+ <FUNCTION>MULL3</FUNCTION>
+ <FUNCTION>MULP</FUNCTION>
+ <FUNCTION>MULW2</FUNCTION>
+ <FUNCTION>MULW3</FUNCTION>
+ <FUNCTION>NOP</FUNCTION>
+ <FUNCTION>POLYD</FUNCTION>
+ <FUNCTION>POLYF</FUNCTION>
+ <FUNCTION>POLYG</FUNCTION>
+ <FUNCTION>POLYH</FUNCTION>
+ <FUNCTION>POPR</FUNCTION>
+ <FUNCTION>PROBER</FUNCTION>
+ <FUNCTION>PROBEW</FUNCTION>
+ <FUNCTION>PUSHAB</FUNCTION>
+ <FUNCTION>PUSHABL</FUNCTION>
+ <FUNCTION>PUSHAL</FUNCTION>
+ <FUNCTION>PUSHAD</FUNCTION>
+ <FUNCTION>PUSHAF</FUNCTION>
+ <FUNCTION>PUSHAG</FUNCTION>
+ <FUNCTION>PUSHAH</FUNCTION>
+ <FUNCTION>PUSHAL</FUNCTION>
+ <FUNCTION>PUSHAO</FUNCTION>
+ <FUNCTION>PUSHAQ</FUNCTION>
+ <FUNCTION>PUSHAW</FUNCTION>
+ <FUNCTION>PUSHL</FUNCTION>
+ <FUNCTION>PUSHR</FUNCTION>
+ <FUNCTION>REI</FUNCTION>
+ <FUNCTION>REMQHI</FUNCTION>
+ <FUNCTION>REMQTI</FUNCTION>
+ <FUNCTION>REMQUE</FUNCTION>
+ <FUNCTION>RET</FUNCTION>
+ <FUNCTION>ROTL</FUNCTION>
+ <FUNCTION>RSB</FUNCTION>
+ <FUNCTION>SBWC</FUNCTION>
+ <FUNCTION>SCANC</FUNCTION>
+ <FUNCTION>SKPC</FUNCTION>
+ <FUNCTION>SOBGEQ</FUNCTION>
+ <FUNCTION>SOBGTR</FUNCTION>
+ <FUNCTION>SPANC</FUNCTION>
+ <FUNCTION>SUBB2</FUNCTION>
+ <FUNCTION>SUBB3</FUNCTION>
+ <FUNCTION>SUBD2</FUNCTION>
+ <FUNCTION>SUBD3</FUNCTION>
+ <FUNCTION>SUBF2</FUNCTION>
+ <FUNCTION>SUBF3</FUNCTION>
+ <FUNCTION>SUBG2</FUNCTION>
+ <FUNCTION>SUBG3</FUNCTION>
+ <FUNCTION>SUBH2</FUNCTION>
+ <FUNCTION>SUBH3</FUNCTION>
+ <FUNCTION>SUBL2</FUNCTION>
+ <FUNCTION>SUBL3</FUNCTION>
+ <FUNCTION>SUBP4</FUNCTION>
+ <FUNCTION>SUBP6</FUNCTION>
+ <FUNCTION>SUBW2</FUNCTION>
+ <FUNCTION>SUBW3</FUNCTION>
+ <FUNCTION>SVPCTX</FUNCTION>
+ <FUNCTION>TSTB</FUNCTION>
+ <FUNCTION>TSTD</FUNCTION>
+ <FUNCTION>TSTF</FUNCTION>
+ <FUNCTION>TSTG</FUNCTION>
+ <FUNCTION>TSTH</FUNCTION>
+ <FUNCTION>TSTL</FUNCTION>
+ <FUNCTION>TSTW</FUNCTION>
+ <FUNCTION>VGATHL</FUNCTION>
+ <FUNCTION>VGATHQ</FUNCTION>
+ <FUNCTION>VLDL</FUNCTION>
+ <FUNCTION>VLDQ</FUNCTION>
+ <FUNCTION>VSADDD</FUNCTION>
+ <FUNCTION>VSADDF</FUNCTION>
+ <FUNCTION>VSADDG</FUNCTION>
+ <FUNCTION>VSADDL</FUNCTION>
+ <FUNCTION>VSBICL</FUNCTION>
+ <FUNCTION>VSBISL</FUNCTION>
+ <FUNCTION>VSCATL</FUNCTION>
+ <FUNCTION>VSCATQ</FUNCTION>
+ <FUNCTION>VSCMPD</FUNCTION>
+ <FUNCTION>VSCMPF</FUNCTION>
+ <FUNCTION>VSCMPG</FUNCTION>
+ <FUNCTION>VSCMPL</FUNCTION>
+ <FUNCTION>VSDIVD</FUNCTION>
+ <FUNCTION>VSDIVF</FUNCTION>
+ <FUNCTION>VSDIVG</FUNCTION>
+ <FUNCTION>VSMERGE</FUNCTION>
+ <FUNCTION>VSMULD</FUNCTION>
+ <FUNCTION>VSMULF</FUNCTION>
+ <FUNCTION>VSMULG</FUNCTION>
+ <FUNCTION>VSMULL</FUNCTION>
+ <FUNCTION>VSSLLL</FUNCTION>
+ <FUNCTION>VSSRLL</FUNCTION>
+ <FUNCTION>VSSUBD</FUNCTION>
+ <FUNCTION>VSSUBF</FUNCTION>
+ <FUNCTION>VSSUBG</FUNCTION>
+ <FUNCTION>VSSUBL</FUNCTION>
+ <FUNCTION>VSTL</FUNCTION>
+ <FUNCTION>VSTQ</FUNCTION>
+ <FUNCTION>VSXORL</FUNCTION>
+ <FUNCTION>VSYNC</FUNCTION>
+ <FUNCTION>VVADDD</FUNCTION>
+ <FUNCTION>VVADDF</FUNCTION>
+ <FUNCTION>VVADDG</FUNCTION>
+ <FUNCTION>VVADDL</FUNCTION>
+ <FUNCTION>VVBICL</FUNCTION>
+ <FUNCTION>VVBISL</FUNCTION>
+ <FUNCTION>VVCMPD</FUNCTION>
+ <FUNCTION>VVCMPF</FUNCTION>
+ <FUNCTION>VVCMPG</FUNCTION>
+ <FUNCTION>VVCMPL</FUNCTION>
+ <FUNCTION>VVCVT</FUNCTION>
+ <FUNCTION>VVDIVD</FUNCTION>
+ <FUNCTION>VVDIVF</FUNCTION>
+ <FUNCTION>VVDIVG</FUNCTION>
+ <FUNCTION>VVMERGE</FUNCTION>
+ <FUNCTION>VVMULD</FUNCTION>
+ <FUNCTION>VVMULF</FUNCTION>
+ <FUNCTION>VVMULG</FUNCTION>
+ <FUNCTION>VVMULL</FUNCTION>
+ <FUNCTION>VVSLLL</FUNCTION>
+ <FUNCTION>VVSRLL</FUNCTION>
+ <FUNCTION>VVSUBD</FUNCTION>
+ <FUNCTION>VVSUBF</FUNCTION>
+ <FUNCTION>VVSUBG</FUNCTION>
+ <FUNCTION>VVSUBL</FUNCTION>
+ <FUNCTION>VVXORL</FUNCTION>
+ <FUNCTION>XFC</FUNCTION>
+ <FUNCTION>XORB2</FUNCTION>
+ <FUNCTION>XORB3</FUNCTION>
+ <FUNCTION>XORL2</FUNCTION>
+ <FUNCTION>XORL3</FUNCTION>
+ <FUNCTION>XORW2</FUNCTION>
+ <FUNCTION>XORW3</FUNCTION>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/assembly-mcs51.xml b/jEdit/modes/assembly-mcs51.xml
index 113e196..0ecb1df 100644
--- a/jEdit/modes/assembly-mcs51.xml
+++ b/jEdit/modes/assembly-mcs51.xml
@@ -1,237 +1,237 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- MCS51 Assembly mode by Mirco Bova (mirco.bova at libero.it)
-
- - KEIL syntax
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- </PROPS>
-
- <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- NASM: label inside a macro -->
- <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">%%</MARK_FOLLOWING>
-
- <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="TRUE">$</MARK_FOLLOWING>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">:</SEQ>
- <SEQ TYPE="NULL">(</SEQ>
- <SEQ TYPE="NULL">)</SEQ>
- <SEQ TYPE="NULL">]</SEQ>
- <SEQ TYPE="NULL">[</SEQ>
- <SEQ TYPE="NULL">$</SEQ>
-
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
-
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
-
- <KEYWORDS>
- <KEYWORD1>MOD</KEYWORD1>
- <KEYWORD1>SHR</KEYWORD1>
- <KEYWORD1>SHL</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>XOR</KEYWORD1>
- <KEYWORD1>HIGH</KEYWORD1>
- <KEYWORD1>LOW</KEYWORD1>
- <KEYWORD1>LT</KEYWORD1>
- <KEYWORD1>LE</KEYWORD1>
- <KEYWORD1>NE</KEYWORD1>
- <KEYWORD1>EQ</KEYWORD1>
- <KEYWORD1>GE</KEYWORD1>
- <KEYWORD1>GT</KEYWORD1>
- <KEYWORD1>DPTR</KEYWORD1>
- <KEYWORD1>PC</KEYWORD1>
- <KEYWORD1>EQU</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>NUMBER</KEYWORD1>
- <KEYWORD1>CSEG</KEYWORD1>
- <KEYWORD1>XSEG</KEYWORD1>
- <KEYWORD1>DSEG</KEYWORD1>
- <KEYWORD1>ISEG</KEYWORD1>
- <KEYWORD1>BSEG</KEYWORD1>
- <KEYWORD1>RSEG</KEYWORD1>
- <KEYWORD1>NUL</KEYWORD1>
- <KEYWORD1>DB</KEYWORD1>
- <KEYWORD1>DW</KEYWORD1>
- <KEYWORD1>DWR</KEYWORD1>
- <KEYWORD1>DS</KEYWORD1>
- <KEYWORD1>DBIT</KEYWORD1>
- <KEYWORD1>ORG</KEYWORD1>
- <KEYWORD1>USING</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>NAME</KEYWORD1>
- <KEYWORD1>PUBLIC</KEYWORD1>
- <KEYWORD1>EXTRN</KEYWORD1>
- <KEYWORD1>SEGMENT</KEYWORD1>
- <KEYWORD1>UNIT</KEYWORD1>
- <KEYWORD1>BITADDRESSABLE</KEYWORD1>
- <KEYWORD1>INPAGE</KEYWORD1>
- <KEYWORD1>INBLOCK</KEYWORD1>
- <KEYWORD1>PAGE</KEYWORD1>
- <KEYWORD1>OVERLAYABLE</KEYWORD1>
- <KEYWORD1>AT</KEYWORD1>
- <KEYWORD1>STACKLEN</KEYWORD1>
- <KEYWORD1>SBIT</KEYWORD1>
- <KEYWORD1>SFR</KEYWORD1>
- <KEYWORD1>SFR16</KEYWORD1>
- <KEYWORD1>__ERROR__</KEYWORD1>
- <KEYWORD1>ACALL</KEYWORD1>
- <KEYWORD1>ADD</KEYWORD1>
- <KEYWORD1>ADDC</KEYWORD1>
- <KEYWORD1>AJMP</KEYWORD1>
- <KEYWORD1>ANL</KEYWORD1>
- <KEYWORD1>CALL</KEYWORD1>
- <KEYWORD1>CJNE</KEYWORD1>
- <KEYWORD1>CLR</KEYWORD1>
- <KEYWORD1>CPL</KEYWORD1>
- <KEYWORD1>DA</KEYWORD1>
- <KEYWORD1>DEC</KEYWORD1>
- <KEYWORD1>DIV</KEYWORD1>
- <KEYWORD1>DJNZ</KEYWORD1>
- <KEYWORD1>INC</KEYWORD1>
- <KEYWORD1>JB</KEYWORD1>
- <KEYWORD1>JBC</KEYWORD1>
- <KEYWORD1>JC</KEYWORD1>
- <KEYWORD1>JMP</KEYWORD1>
- <KEYWORD1>JNB</KEYWORD1>
- <KEYWORD1>JNC</KEYWORD1>
- <KEYWORD1>JNZ</KEYWORD1>
- <KEYWORD1>JZ</KEYWORD1>
- <KEYWORD1>LCALL</KEYWORD1>
- <KEYWORD1>LJMP</KEYWORD1>
- <KEYWORD1>MOV</KEYWORD1>
- <KEYWORD1>MOVC</KEYWORD1>
- <KEYWORD1>MOVX</KEYWORD1>
- <KEYWORD1>MUL</KEYWORD1>
- <KEYWORD1>NOP</KEYWORD1>
- <KEYWORD1>ORL</KEYWORD1>
- <KEYWORD1>POP</KEYWORD1>
- <KEYWORD1>PUSH</KEYWORD1>
- <KEYWORD1>RET</KEYWORD1>
- <KEYWORD1>RETI</KEYWORD1>
- <KEYWORD1>RL</KEYWORD1>
- <KEYWORD1>RLC</KEYWORD1>
- <KEYWORD1>RR</KEYWORD1>
- <KEYWORD1>RRC</KEYWORD1>
- <KEYWORD1>SETB</KEYWORD1>
- <KEYWORD1>SJMP</KEYWORD1>
- <KEYWORD1>SUBB</KEYWORD1>
- <KEYWORD1>SWAP</KEYWORD1>
- <KEYWORD1>XCH</KEYWORD1>
- <KEYWORD1>XCHD</KEYWORD1>
- <KEYWORD1>XRL</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>ELSEIF</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>ENDIF</KEYWORD1>
- <KEYWORD1>MACRO</KEYWORD1>
- <KEYWORD1>REPT</KEYWORD1>
- <KEYWORD1>IRP</KEYWORD1>
- <KEYWORD1>IRPC</KEYWORD1>
- <KEYWORD1>ENDM</KEYWORD1>
- <KEYWORD1>EXITM</KEYWORD1>
- <KEYWORD1>LOCAL</KEYWORD1>
- <KEYWORD1>DPTX</KEYWORD1>
- <KEYWORD1>DPTN</KEYWORD1>
- <KEYWORD1>DPTR8</KEYWORD1>
- <KEYWORD1>DPTR16</KEYWORD1>
- <KEYWORD1>WR0</KEYWORD1>
- <KEYWORD1>WR2</KEYWORD1>
- <KEYWORD1>WR4</KEYWORD1>
- <KEYWORD1>WR6</KEYWORD1>
- <KEYWORD1>DR0</KEYWORD1>
- <KEYWORD1>DR4</KEYWORD1>
- <KEYWORD1>RJC</KEYWORD1>
- <KEYWORD1>RJNC</KEYWORD1>
- <KEYWORD1>RJZ</KEYWORD1>
- <KEYWORD1>RJNZ</KEYWORD1>
- <KEYWORD1>JMPI</KEYWORD1>
- <KEYWORD1>MOVB</KEYWORD1>
- <KEYWORD1>PUSHA</KEYWORD1>
- <KEYWORD1>POPA</KEYWORD1>
- <KEYWORD1>SUB</KEYWORD1>
- <KEYWORD1>ADDM</KEYWORD1>
- <KEYWORD1>SUBM</KEYWORD1>
- <KEYWORD1>SLEEP</KEYWORD1>
- <KEYWORD1>SYNC</KEYWORD1>
- <KEYWORD1>DEFINE</KEYWORD1>
- <KEYWORD1>SUBSTR</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>LEN</KEYWORD1>
- <KEYWORD1>EQS</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>FI</KEYWORD1>
-
- <KEYWORD2>$IF</KEYWORD2>
- <KEYWORD2>$ELSEIF</KEYWORD2>
- <KEYWORD2>$ELSE</KEYWORD2>
- <KEYWORD2>$ENDIF</KEYWORD2>
- <KEYWORD2>$MOD167</KEYWORD2>
- <KEYWORD2>$CASE</KEYWORD2>
- <KEYWORD2>$SEGMENTED</KEYWORD2>
- <KEYWORD2>$INCLUDE</KEYWORD2>
-
- <!-- memory types -->
- <KEYWORD2>CODE</KEYWORD2>
- <KEYWORD2>XDATA</KEYWORD2>
- <KEYWORD2>DATA</KEYWORD2>
- <KEYWORD2>IDATA</KEYWORD2>
- <KEYWORD2>BIT</KEYWORD2>
-
- <!-- Registers -->
- <KEYWORD3>R0</KEYWORD3>
- <KEYWORD3>R1</KEYWORD3>
- <KEYWORD3>R2</KEYWORD3>
- <KEYWORD3>R3</KEYWORD3>
- <KEYWORD3>R4</KEYWORD3>
- <KEYWORD3>R5</KEYWORD3>
- <KEYWORD3>R6</KEYWORD3>
- <KEYWORD3>R7</KEYWORD3>
-
- <KEYWORD3>SP</KEYWORD3>
- <KEYWORD3>A</KEYWORD3>
- <KEYWORD3>C</KEYWORD3>
- <KEYWORD3>AB</KEYWORD3>
-
- <!-- Instructions -->
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ MCS51 Assembly mode by Mirco Bova (mirco.bova at libero.it)
+
+ - KEIL syntax
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ </PROPS>
+
+ <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- NASM: label inside a macro -->
+ <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">%%</MARK_FOLLOWING>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="TRUE">$</MARK_FOLLOWING>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <SEQ TYPE="NULL">,</SEQ>
+ <SEQ TYPE="NULL">:</SEQ>
+ <SEQ TYPE="NULL">(</SEQ>
+ <SEQ TYPE="NULL">)</SEQ>
+ <SEQ TYPE="NULL">]</SEQ>
+ <SEQ TYPE="NULL">[</SEQ>
+ <SEQ TYPE="NULL">$</SEQ>
+
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>MOD</KEYWORD1>
+ <KEYWORD1>SHR</KEYWORD1>
+ <KEYWORD1>SHL</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>XOR</KEYWORD1>
+ <KEYWORD1>HIGH</KEYWORD1>
+ <KEYWORD1>LOW</KEYWORD1>
+ <KEYWORD1>LT</KEYWORD1>
+ <KEYWORD1>LE</KEYWORD1>
+ <KEYWORD1>NE</KEYWORD1>
+ <KEYWORD1>EQ</KEYWORD1>
+ <KEYWORD1>GE</KEYWORD1>
+ <KEYWORD1>GT</KEYWORD1>
+ <KEYWORD1>DPTR</KEYWORD1>
+ <KEYWORD1>PC</KEYWORD1>
+ <KEYWORD1>EQU</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>NUMBER</KEYWORD1>
+ <KEYWORD1>CSEG</KEYWORD1>
+ <KEYWORD1>XSEG</KEYWORD1>
+ <KEYWORD1>DSEG</KEYWORD1>
+ <KEYWORD1>ISEG</KEYWORD1>
+ <KEYWORD1>BSEG</KEYWORD1>
+ <KEYWORD1>RSEG</KEYWORD1>
+ <KEYWORD1>NUL</KEYWORD1>
+ <KEYWORD1>DB</KEYWORD1>
+ <KEYWORD1>DW</KEYWORD1>
+ <KEYWORD1>DWR</KEYWORD1>
+ <KEYWORD1>DS</KEYWORD1>
+ <KEYWORD1>DBIT</KEYWORD1>
+ <KEYWORD1>ORG</KEYWORD1>
+ <KEYWORD1>USING</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>NAME</KEYWORD1>
+ <KEYWORD1>PUBLIC</KEYWORD1>
+ <KEYWORD1>EXTRN</KEYWORD1>
+ <KEYWORD1>SEGMENT</KEYWORD1>
+ <KEYWORD1>UNIT</KEYWORD1>
+ <KEYWORD1>BITADDRESSABLE</KEYWORD1>
+ <KEYWORD1>INPAGE</KEYWORD1>
+ <KEYWORD1>INBLOCK</KEYWORD1>
+ <KEYWORD1>PAGE</KEYWORD1>
+ <KEYWORD1>OVERLAYABLE</KEYWORD1>
+ <KEYWORD1>AT</KEYWORD1>
+ <KEYWORD1>STACKLEN</KEYWORD1>
+ <KEYWORD1>SBIT</KEYWORD1>
+ <KEYWORD1>SFR</KEYWORD1>
+ <KEYWORD1>SFR16</KEYWORD1>
+ <KEYWORD1>__ERROR__</KEYWORD1>
+ <KEYWORD1>ACALL</KEYWORD1>
+ <KEYWORD1>ADD</KEYWORD1>
+ <KEYWORD1>ADDC</KEYWORD1>
+ <KEYWORD1>AJMP</KEYWORD1>
+ <KEYWORD1>ANL</KEYWORD1>
+ <KEYWORD1>CALL</KEYWORD1>
+ <KEYWORD1>CJNE</KEYWORD1>
+ <KEYWORD1>CLR</KEYWORD1>
+ <KEYWORD1>CPL</KEYWORD1>
+ <KEYWORD1>DA</KEYWORD1>
+ <KEYWORD1>DEC</KEYWORD1>
+ <KEYWORD1>DIV</KEYWORD1>
+ <KEYWORD1>DJNZ</KEYWORD1>
+ <KEYWORD1>INC</KEYWORD1>
+ <KEYWORD1>JB</KEYWORD1>
+ <KEYWORD1>JBC</KEYWORD1>
+ <KEYWORD1>JC</KEYWORD1>
+ <KEYWORD1>JMP</KEYWORD1>
+ <KEYWORD1>JNB</KEYWORD1>
+ <KEYWORD1>JNC</KEYWORD1>
+ <KEYWORD1>JNZ</KEYWORD1>
+ <KEYWORD1>JZ</KEYWORD1>
+ <KEYWORD1>LCALL</KEYWORD1>
+ <KEYWORD1>LJMP</KEYWORD1>
+ <KEYWORD1>MOV</KEYWORD1>
+ <KEYWORD1>MOVC</KEYWORD1>
+ <KEYWORD1>MOVX</KEYWORD1>
+ <KEYWORD1>MUL</KEYWORD1>
+ <KEYWORD1>NOP</KEYWORD1>
+ <KEYWORD1>ORL</KEYWORD1>
+ <KEYWORD1>POP</KEYWORD1>
+ <KEYWORD1>PUSH</KEYWORD1>
+ <KEYWORD1>RET</KEYWORD1>
+ <KEYWORD1>RETI</KEYWORD1>
+ <KEYWORD1>RL</KEYWORD1>
+ <KEYWORD1>RLC</KEYWORD1>
+ <KEYWORD1>RR</KEYWORD1>
+ <KEYWORD1>RRC</KEYWORD1>
+ <KEYWORD1>SETB</KEYWORD1>
+ <KEYWORD1>SJMP</KEYWORD1>
+ <KEYWORD1>SUBB</KEYWORD1>
+ <KEYWORD1>SWAP</KEYWORD1>
+ <KEYWORD1>XCH</KEYWORD1>
+ <KEYWORD1>XCHD</KEYWORD1>
+ <KEYWORD1>XRL</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>ELSEIF</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>ENDIF</KEYWORD1>
+ <KEYWORD1>MACRO</KEYWORD1>
+ <KEYWORD1>REPT</KEYWORD1>
+ <KEYWORD1>IRP</KEYWORD1>
+ <KEYWORD1>IRPC</KEYWORD1>
+ <KEYWORD1>ENDM</KEYWORD1>
+ <KEYWORD1>EXITM</KEYWORD1>
+ <KEYWORD1>LOCAL</KEYWORD1>
+ <KEYWORD1>DPTX</KEYWORD1>
+ <KEYWORD1>DPTN</KEYWORD1>
+ <KEYWORD1>DPTR8</KEYWORD1>
+ <KEYWORD1>DPTR16</KEYWORD1>
+ <KEYWORD1>WR0</KEYWORD1>
+ <KEYWORD1>WR2</KEYWORD1>
+ <KEYWORD1>WR4</KEYWORD1>
+ <KEYWORD1>WR6</KEYWORD1>
+ <KEYWORD1>DR0</KEYWORD1>
+ <KEYWORD1>DR4</KEYWORD1>
+ <KEYWORD1>RJC</KEYWORD1>
+ <KEYWORD1>RJNC</KEYWORD1>
+ <KEYWORD1>RJZ</KEYWORD1>
+ <KEYWORD1>RJNZ</KEYWORD1>
+ <KEYWORD1>JMPI</KEYWORD1>
+ <KEYWORD1>MOVB</KEYWORD1>
+ <KEYWORD1>PUSHA</KEYWORD1>
+ <KEYWORD1>POPA</KEYWORD1>
+ <KEYWORD1>SUB</KEYWORD1>
+ <KEYWORD1>ADDM</KEYWORD1>
+ <KEYWORD1>SUBM</KEYWORD1>
+ <KEYWORD1>SLEEP</KEYWORD1>
+ <KEYWORD1>SYNC</KEYWORD1>
+ <KEYWORD1>DEFINE</KEYWORD1>
+ <KEYWORD1>SUBSTR</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>LEN</KEYWORD1>
+ <KEYWORD1>EQS</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>FI</KEYWORD1>
+
+ <KEYWORD2>$IF</KEYWORD2>
+ <KEYWORD2>$ELSEIF</KEYWORD2>
+ <KEYWORD2>$ELSE</KEYWORD2>
+ <KEYWORD2>$ENDIF</KEYWORD2>
+ <KEYWORD2>$MOD167</KEYWORD2>
+ <KEYWORD2>$CASE</KEYWORD2>
+ <KEYWORD2>$SEGMENTED</KEYWORD2>
+ <KEYWORD2>$INCLUDE</KEYWORD2>
+
+ <!-- memory types -->
+ <KEYWORD2>CODE</KEYWORD2>
+ <KEYWORD2>XDATA</KEYWORD2>
+ <KEYWORD2>DATA</KEYWORD2>
+ <KEYWORD2>IDATA</KEYWORD2>
+ <KEYWORD2>BIT</KEYWORD2>
+
+ <!-- Registers -->
+ <KEYWORD3>R0</KEYWORD3>
+ <KEYWORD3>R1</KEYWORD3>
+ <KEYWORD3>R2</KEYWORD3>
+ <KEYWORD3>R3</KEYWORD3>
+ <KEYWORD3>R4</KEYWORD3>
+ <KEYWORD3>R5</KEYWORD3>
+ <KEYWORD3>R6</KEYWORD3>
+ <KEYWORD3>R7</KEYWORD3>
+
+ <KEYWORD3>SP</KEYWORD3>
+ <KEYWORD3>A</KEYWORD3>
+ <KEYWORD3>C</KEYWORD3>
+ <KEYWORD3>AB</KEYWORD3>
+
+ <!-- Instructions -->
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/assembly-parrot.xml b/jEdit/modes/assembly-parrot.xml
index 212e182..0e6cd75 100644
--- a/jEdit/modes/assembly-parrot.xml
+++ b/jEdit/modes/assembly-parrot.xml
@@ -1,138 +1,138 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+|[\p{Digit}]+)"
- >
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <SEQ TYPE="OPERATOR">,</SEQ>
-
- <SEQ_REGEXP TYPE="LITERAL2"
- HASH_CHARS="ISNP"
- AT_WORD_START="TRUE"
- >[ISNP]\d{1,2}</SEQ_REGEXP>
-
- <KEYWORDS>
- <KEYWORD1>abs</KEYWORD1>
- <KEYWORD1>acos</KEYWORD1>
- <KEYWORD1>add</KEYWORD1>
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>asec</KEYWORD1>
- <KEYWORD1>asin</KEYWORD1>
- <KEYWORD1>atan</KEYWORD1>
- <KEYWORD1>bounds</KEYWORD1>
- <KEYWORD1>branch</KEYWORD1>
- <KEYWORD1>bsr</KEYWORD1>
- <KEYWORD1>chopm</KEYWORD1>
- <KEYWORD1>cleari</KEYWORD1>
- <KEYWORD1>clearn</KEYWORD1>
- <KEYWORD1>clearp</KEYWORD1>
- <KEYWORD1>clears</KEYWORD1>
- <KEYWORD1>clone</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>cmod</KEYWORD1>
- <KEYWORD1>concat</KEYWORD1>
- <KEYWORD1>cos</KEYWORD1>
- <KEYWORD1>cosh</KEYWORD1>
- <KEYWORD1>debug</KEYWORD1>
- <KEYWORD1>dec</KEYWORD1>
- <KEYWORD1>div</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>entrytype</KEYWORD1>
- <KEYWORD1>eq</KEYWORD1>
- <KEYWORD1>err</KEYWORD1>
- <KEYWORD1>exp</KEYWORD1>
- <KEYWORD1>find_global</KEYWORD1>
- <KEYWORD1>find_type</KEYWORD1>
- <KEYWORD1>ge</KEYWORD1>
- <KEYWORD1>getfile</KEYWORD1>
- <KEYWORD1>getline</KEYWORD1>
- <KEYWORD1>getpackage</KEYWORD1>
- <KEYWORD1>gt</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>inc</KEYWORD1>
- <KEYWORD1>index</KEYWORD1>
- <KEYWORD1>jsr</KEYWORD1>
- <KEYWORD1>jump</KEYWORD1>
- <KEYWORD1>le</KEYWORD1>
- <KEYWORD1>length</KEYWORD1>
- <KEYWORD1>ln</KEYWORD1>
- <KEYWORD1>log2</KEYWORD1>
- <KEYWORD1>log10</KEYWORD1>
- <KEYWORD1>lt</KEYWORD1>
- <KEYWORD1>mod</KEYWORD1>
- <KEYWORD1>mul</KEYWORD1>
- <KEYWORD1>ne</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>newinterp</KEYWORD1>
- <KEYWORD1>noop</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>open</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>ord</KEYWORD1>
- <KEYWORD1>pack</KEYWORD1>
- <KEYWORD1>pop</KEYWORD1>
- <KEYWORD1>popi</KEYWORD1>
- <KEYWORD1>popn</KEYWORD1>
- <KEYWORD1>popp</KEYWORD1>
- <KEYWORD1>pops</KEYWORD1>
- <KEYWORD1>pow</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>profile</KEYWORD1>
- <KEYWORD1>push</KEYWORD1>
- <KEYWORD1>pushi</KEYWORD1>
- <KEYWORD1>pushn</KEYWORD1>
- <KEYWORD1>pushp</KEYWORD1>
- <KEYWORD1>pushs</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>readline</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>restore</KEYWORD1>
- <KEYWORD1>ret</KEYWORD1>
- <KEYWORD1>rotate_up</KEYWORD1>
- <KEYWORD1>runinterp</KEYWORD1>
- <KEYWORD1>save</KEYWORD1>
- <KEYWORD1>sec</KEYWORD1>
- <KEYWORD1>sech</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>set_keyed</KEYWORD1>
- <KEYWORD1>setfile</KEYWORD1>
- <KEYWORD1>setline</KEYWORD1>
- <KEYWORD1>setpackage</KEYWORD1>
- <KEYWORD1>shl</KEYWORD1>
- <KEYWORD1>shr</KEYWORD1>
- <KEYWORD1>sin</KEYWORD1>
- <KEYWORD1>sinh</KEYWORD1>
- <KEYWORD1>sleep</KEYWORD1>
- <KEYWORD1>sub</KEYWORD1>
- <KEYWORD1>substr</KEYWORD1>
- <KEYWORD1>tan</KEYWORD1>
- <KEYWORD1>tanh</KEYWORD1>
- <KEYWORD1>time</KEYWORD1>
- <KEYWORD1>trace</KEYWORD1>
- <KEYWORD1>typeof</KEYWORD1>
- <KEYWORD1>unless</KEYWORD1>
- <KEYWORD1>warningsoff</KEYWORD1>
- <KEYWORD1>warningson</KEYWORD1>
- <KEYWORD1>write</KEYWORD1>
- <KEYWORD1>xor</KEYWORD1>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+|[\p{Digit}]+)"
+ >
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <SEQ_REGEXP TYPE="LITERAL2"
+ HASH_CHARS="ISNP"
+ AT_WORD_START="TRUE"
+ >[ISNP]\d{1,2}</SEQ_REGEXP>
+
+ <KEYWORDS>
+ <KEYWORD1>abs</KEYWORD1>
+ <KEYWORD1>acos</KEYWORD1>
+ <KEYWORD1>add</KEYWORD1>
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>asec</KEYWORD1>
+ <KEYWORD1>asin</KEYWORD1>
+ <KEYWORD1>atan</KEYWORD1>
+ <KEYWORD1>bounds</KEYWORD1>
+ <KEYWORD1>branch</KEYWORD1>
+ <KEYWORD1>bsr</KEYWORD1>
+ <KEYWORD1>chopm</KEYWORD1>
+ <KEYWORD1>cleari</KEYWORD1>
+ <KEYWORD1>clearn</KEYWORD1>
+ <KEYWORD1>clearp</KEYWORD1>
+ <KEYWORD1>clears</KEYWORD1>
+ <KEYWORD1>clone</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>cmod</KEYWORD1>
+ <KEYWORD1>concat</KEYWORD1>
+ <KEYWORD1>cos</KEYWORD1>
+ <KEYWORD1>cosh</KEYWORD1>
+ <KEYWORD1>debug</KEYWORD1>
+ <KEYWORD1>dec</KEYWORD1>
+ <KEYWORD1>div</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>entrytype</KEYWORD1>
+ <KEYWORD1>eq</KEYWORD1>
+ <KEYWORD1>err</KEYWORD1>
+ <KEYWORD1>exp</KEYWORD1>
+ <KEYWORD1>find_global</KEYWORD1>
+ <KEYWORD1>find_type</KEYWORD1>
+ <KEYWORD1>ge</KEYWORD1>
+ <KEYWORD1>getfile</KEYWORD1>
+ <KEYWORD1>getline</KEYWORD1>
+ <KEYWORD1>getpackage</KEYWORD1>
+ <KEYWORD1>gt</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>inc</KEYWORD1>
+ <KEYWORD1>index</KEYWORD1>
+ <KEYWORD1>jsr</KEYWORD1>
+ <KEYWORD1>jump</KEYWORD1>
+ <KEYWORD1>le</KEYWORD1>
+ <KEYWORD1>length</KEYWORD1>
+ <KEYWORD1>ln</KEYWORD1>
+ <KEYWORD1>log2</KEYWORD1>
+ <KEYWORD1>log10</KEYWORD1>
+ <KEYWORD1>lt</KEYWORD1>
+ <KEYWORD1>mod</KEYWORD1>
+ <KEYWORD1>mul</KEYWORD1>
+ <KEYWORD1>ne</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>newinterp</KEYWORD1>
+ <KEYWORD1>noop</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>open</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>ord</KEYWORD1>
+ <KEYWORD1>pack</KEYWORD1>
+ <KEYWORD1>pop</KEYWORD1>
+ <KEYWORD1>popi</KEYWORD1>
+ <KEYWORD1>popn</KEYWORD1>
+ <KEYWORD1>popp</KEYWORD1>
+ <KEYWORD1>pops</KEYWORD1>
+ <KEYWORD1>pow</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>profile</KEYWORD1>
+ <KEYWORD1>push</KEYWORD1>
+ <KEYWORD1>pushi</KEYWORD1>
+ <KEYWORD1>pushn</KEYWORD1>
+ <KEYWORD1>pushp</KEYWORD1>
+ <KEYWORD1>pushs</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>readline</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>restore</KEYWORD1>
+ <KEYWORD1>ret</KEYWORD1>
+ <KEYWORD1>rotate_up</KEYWORD1>
+ <KEYWORD1>runinterp</KEYWORD1>
+ <KEYWORD1>save</KEYWORD1>
+ <KEYWORD1>sec</KEYWORD1>
+ <KEYWORD1>sech</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>set_keyed</KEYWORD1>
+ <KEYWORD1>setfile</KEYWORD1>
+ <KEYWORD1>setline</KEYWORD1>
+ <KEYWORD1>setpackage</KEYWORD1>
+ <KEYWORD1>shl</KEYWORD1>
+ <KEYWORD1>shr</KEYWORD1>
+ <KEYWORD1>sin</KEYWORD1>
+ <KEYWORD1>sinh</KEYWORD1>
+ <KEYWORD1>sleep</KEYWORD1>
+ <KEYWORD1>sub</KEYWORD1>
+ <KEYWORD1>substr</KEYWORD1>
+ <KEYWORD1>tan</KEYWORD1>
+ <KEYWORD1>tanh</KEYWORD1>
+ <KEYWORD1>time</KEYWORD1>
+ <KEYWORD1>trace</KEYWORD1>
+ <KEYWORD1>typeof</KEYWORD1>
+ <KEYWORD1>unless</KEYWORD1>
+ <KEYWORD1>warningsoff</KEYWORD1>
+ <KEYWORD1>warningson</KEYWORD1>
+ <KEYWORD1>write</KEYWORD1>
+ <KEYWORD1>xor</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/assembly-r2000.xml b/jEdit/modes/assembly-r2000.xml
index 89d0aa9..084dc2d 100644
--- a/jEdit/modes/assembly-r2000.xml
+++ b/jEdit/modes/assembly-r2000.xml
@@ -1,259 +1,259 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- MIPS/SPIM Assembly Mode from
- Marc Rummel marc.rummel at stud.uni-karlsruhe.de
- SIPM Homepage: http://www.cs.wisc.edu/~larus/spim.html
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="blockComment" VALUE="#" />
- <PROPERTY NAME="wordBreakChars" VALUE=",()" />
- </PROPS>
-
- <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
- <!-- Comment -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- Strings -->
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- Labels -->
- <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <!-- Assembler directives -->
- <KEYWORDS>
- <KEYWORD1>.align</KEYWORD1>
- <KEYWORD1>.ascii</KEYWORD1>
- <KEYWORD1>.asciiz</KEYWORD1>
- <KEYWORD1>.byte</KEYWORD1>
- <KEYWORD1>.data</KEYWORD1>
- <KEYWORD1>.double</KEYWORD1>
- <KEYWORD1>.extern</KEYWORD1>
- <KEYWORD1>.float</KEYWORD1>
- <KEYWORD1>.globl</KEYWORD1>
- <KEYWORD1>.half</KEYWORD1>
- <KEYWORD1>.kdata</KEYWORD1>
- <KEYWORD1>.ktext</KEYWORD1>
- <KEYWORD1>.space</KEYWORD1>
- <KEYWORD1>.text</KEYWORD1>
- <KEYWORD1>.word</KEYWORD1>
-
- <!-- MIPS/SPIM Operations -->
- <FUNCTION>add</FUNCTION>
- <FUNCTION>addi</FUNCTION>
- <FUNCTION>addu</FUNCTION>
- <FUNCTION>addiu</FUNCTION>
- <FUNCTION>and</FUNCTION>
- <FUNCTION>andi</FUNCTION>
- <FUNCTION>div</FUNCTION>
- <FUNCTION>divu</FUNCTION>
- <FUNCTION>mul</FUNCTION>
- <FUNCTION>mulo</FUNCTION>
- <FUNCTION>mulou</FUNCTION>
- <FUNCTION>mult</FUNCTION>
- <FUNCTION>multu</FUNCTION>
- <FUNCTION>neg</FUNCTION>
- <FUNCTION>negu</FUNCTION>
- <FUNCTION>nor</FUNCTION>
- <FUNCTION>not</FUNCTION>
- <FUNCTION>or</FUNCTION>
- <FUNCTION>ori</FUNCTION>
- <FUNCTION>rem</FUNCTION>
- <FUNCTION>remu</FUNCTION>
- <FUNCTION>rol</FUNCTION>
- <FUNCTION>ror</FUNCTION>
- <FUNCTION>sll</FUNCTION>
- <FUNCTION>sllv</FUNCTION>
- <FUNCTION>sra</FUNCTION>
- <FUNCTION>srav</FUNCTION>
- <FUNCTION>srl</FUNCTION>
- <FUNCTION>srlv</FUNCTION>
- <FUNCTION>sub</FUNCTION>
- <FUNCTION>subu</FUNCTION>
- <FUNCTION>xor</FUNCTION>
- <FUNCTION>xori</FUNCTION>
- <FUNCTION>li</FUNCTION>
- <FUNCTION>lui</FUNCTION>
- <FUNCTION>seq</FUNCTION>
- <FUNCTION>sge</FUNCTION>
- <FUNCTION>sgt</FUNCTION>
- <FUNCTION>sgtu</FUNCTION>
- <FUNCTION>sle</FUNCTION>
- <FUNCTION>sleu</FUNCTION>
- <FUNCTION>slt</FUNCTION>
- <FUNCTION>slti</FUNCTION>
- <FUNCTION>sltu</FUNCTION>
- <FUNCTION>sltiu</FUNCTION>
- <FUNCTION>sne</FUNCTION>
- <FUNCTION>b</FUNCTION>
- <FUNCTION>bczt</FUNCTION>
- <FUNCTION>bczf</FUNCTION>
- <FUNCTION>beq</FUNCTION>
- <FUNCTION>beqz</FUNCTION>
- <FUNCTION>bge</FUNCTION>
- <FUNCTION>bgeu</FUNCTION>
- <FUNCTION>bgez</FUNCTION>
- <FUNCTION>bgezal</FUNCTION>
- <FUNCTION>bgt</FUNCTION>
- <FUNCTION>bgtu</FUNCTION>
- <FUNCTION>bgtz</FUNCTION>
- <FUNCTION>ble</FUNCTION>
- <FUNCTION>bleu</FUNCTION>
- <FUNCTION>blez</FUNCTION>
- <FUNCTION>bgezal</FUNCTION>
- <FUNCTION>bltzal</FUNCTION>
- <FUNCTION>blt</FUNCTION>
- <FUNCTION>bltu</FUNCTION>
- <FUNCTION>bltz</FUNCTION>
- <FUNCTION>bne</FUNCTION>
- <FUNCTION>bnez</FUNCTION>
- <FUNCTION>j</FUNCTION>
- <FUNCTION>jal</FUNCTION>
- <FUNCTION>jalr</FUNCTION>
- <FUNCTION>jr</FUNCTION>
- <FUNCTION>la</FUNCTION>
- <FUNCTION>lb</FUNCTION>
- <FUNCTION>blu</FUNCTION>
- <FUNCTION>lh</FUNCTION>
- <FUNCTION>lhu</FUNCTION>
- <FUNCTION>lw</FUNCTION>
- <FUNCTION>lwcz</FUNCTION>
- <FUNCTION>lwl</FUNCTION>
- <FUNCTION>lwr</FUNCTION>
- <FUNCTION>ulh</FUNCTION>
- <FUNCTION>ulhu</FUNCTION>
- <FUNCTION>ulw</FUNCTION>
- <FUNCTION>sb</FUNCTION>
- <FUNCTION>sd</FUNCTION>
- <FUNCTION>sh</FUNCTION>
- <FUNCTION>sw</FUNCTION>
- <FUNCTION>swcz</FUNCTION>
- <FUNCTION>swl</FUNCTION>
- <FUNCTION>swr</FUNCTION>
- <FUNCTION>ush</FUNCTION>
- <FUNCTION>usw</FUNCTION>
- <FUNCTION>move</FUNCTION>
- <FUNCTION>mfhi</FUNCTION>
- <FUNCTION>mflo</FUNCTION>
- <FUNCTION>mthi</FUNCTION>
- <FUNCTION>mtlo</FUNCTION>
- <FUNCTION>mfcz</FUNCTION>
- <FUNCTION>mfc1.d</FUNCTION>
- <FUNCTION>mtcz</FUNCTION>
- <FUNCTION>abs.d</FUNCTION>
- <FUNCTION>abs.s</FUNCTION>
- <FUNCTION>add.d</FUNCTION>
- <FUNCTION>add.s</FUNCTION>
- <FUNCTION>c.eq.d</FUNCTION>
- <FUNCTION>c.eq.s</FUNCTION>
- <FUNCTION>c.le.d</FUNCTION>
- <FUNCTION>c.le.s</FUNCTION>
- <FUNCTION>c.lt.d</FUNCTION>
- <FUNCTION>c.lt.s</FUNCTION>
- <FUNCTION>cvt.d.s</FUNCTION>
- <FUNCTION>cbt.d.w</FUNCTION>
- <FUNCTION>cvt.s.d</FUNCTION>
- <FUNCTION>cvt.s.w</FUNCTION>
- <FUNCTION>cvt.w.d</FUNCTION>
- <FUNCTION>cvt.w.s</FUNCTION>
- <FUNCTION>div.d</FUNCTION>
- <FUNCTION>div.s</FUNCTION>
- <FUNCTION>l.d</FUNCTION>
- <FUNCTION>l.s</FUNCTION>
- <FUNCTION>mov.d</FUNCTION>
- <FUNCTION>mov.s</FUNCTION>
- <FUNCTION>mul.d</FUNCTION>
- <FUNCTION>mul.s</FUNCTION>
- <FUNCTION>neg.d</FUNCTION>
- <FUNCTION>neg.s</FUNCTION>
- <FUNCTION>s.d</FUNCTION>
- <FUNCTION>s.s</FUNCTION>
- <FUNCTION>sub.d</FUNCTION>
- <FUNCTION>sub.s</FUNCTION>
- <FUNCTION>rfe</FUNCTION>
- <FUNCTION>syscall</FUNCTION>
- <FUNCTION>break</FUNCTION>
- <FUNCTION>nop</FUNCTION>
-
- <!-- Integer Registers -->
- <KEYWORD2>$zero</KEYWORD2>
- <KEYWORD2>$at</KEYWORD2>
- <KEYWORD2>$v0</KEYWORD2>
- <KEYWORD2>$v1</KEYWORD2>
- <KEYWORD2>$a0</KEYWORD2>
- <KEYWORD2>$a1</KEYWORD2>
- <KEYWORD2>$a2</KEYWORD2>
- <KEYWORD2>$a3</KEYWORD2>
- <KEYWORD2>$t0</KEYWORD2>
- <KEYWORD2>$t1</KEYWORD2>
- <KEYWORD2>$t2</KEYWORD2>
- <KEYWORD2>$t3</KEYWORD2>
- <KEYWORD2>$t4</KEYWORD2>
- <KEYWORD2>$t5</KEYWORD2>
- <KEYWORD2>$t6</KEYWORD2>
- <KEYWORD2>$t7</KEYWORD2>
- <KEYWORD2>$s0</KEYWORD2>
- <KEYWORD2>$s1</KEYWORD2>
- <KEYWORD2>$s2</KEYWORD2>
- <KEYWORD2>$s3</KEYWORD2>
- <KEYWORD2>$s4</KEYWORD2>
- <KEYWORD2>$s5</KEYWORD2>
- <KEYWORD2>$s6</KEYWORD2>
- <KEYWORD2>$s7</KEYWORD2>
- <KEYWORD2>$t8</KEYWORD2>
- <KEYWORD2>$t9</KEYWORD2>
- <KEYWORD2>$k0</KEYWORD2>
- <KEYWORD2>$k1</KEYWORD2>
- <KEYWORD2>$gp</KEYWORD2>
- <KEYWORD2>$sp</KEYWORD2>
- <KEYWORD2>$fp</KEYWORD2>
- <KEYWORD2>$ra</KEYWORD2>
-
- <!-- Floating Point Registers -->
- <KEYWORD3>$f0</KEYWORD3>
- <KEYWORD3>$f1</KEYWORD3>
- <KEYWORD3>$f2</KEYWORD3>
- <KEYWORD3>$f3</KEYWORD3>
- <KEYWORD3>$f4</KEYWORD3>
- <KEYWORD3>$f5</KEYWORD3>
- <KEYWORD3>$f6</KEYWORD3>
- <KEYWORD3>$f7</KEYWORD3>
- <KEYWORD3>$f8</KEYWORD3>
- <KEYWORD3>$f9</KEYWORD3>
- <KEYWORD3>$f10</KEYWORD3>
- <KEYWORD3>$f11</KEYWORD3>
- <KEYWORD3>$f12</KEYWORD3>
- <KEYWORD3>$f13</KEYWORD3>
- <KEYWORD3>$f14</KEYWORD3>
- <KEYWORD3>$f15</KEYWORD3>
- <KEYWORD3>$f16</KEYWORD3>
- <KEYWORD3>$f17</KEYWORD3>
- <KEYWORD3>$f18</KEYWORD3>
- <KEYWORD3>$f19</KEYWORD3>
- <KEYWORD3>$f20</KEYWORD3>
- <KEYWORD3>$f21</KEYWORD3>
- <KEYWORD3>$f22</KEYWORD3>
- <KEYWORD3>$f23</KEYWORD3>
- <KEYWORD3>$f24</KEYWORD3>
- <KEYWORD3>$f25</KEYWORD3>
- <KEYWORD3>$f26</KEYWORD3>
- <KEYWORD3>$f27</KEYWORD3>
- <KEYWORD3>$f28</KEYWORD3>
- <KEYWORD3>$f29</KEYWORD3>
- <KEYWORD3>$f30</KEYWORD3>
- <KEYWORD3>$f31</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- MIPS/SPIM Assembly Mode from
+ Marc Rummel marc.rummel at stud.uni-karlsruhe.de
+ SIPM Homepage: http://www.cs.wisc.edu/~larus/spim.html
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="blockComment" VALUE="#" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",()" />
+ </PROPS>
+
+ <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
+ <!-- Comment -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- Strings -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- Labels -->
+ <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <!-- Assembler directives -->
+ <KEYWORDS>
+ <KEYWORD1>.align</KEYWORD1>
+ <KEYWORD1>.ascii</KEYWORD1>
+ <KEYWORD1>.asciiz</KEYWORD1>
+ <KEYWORD1>.byte</KEYWORD1>
+ <KEYWORD1>.data</KEYWORD1>
+ <KEYWORD1>.double</KEYWORD1>
+ <KEYWORD1>.extern</KEYWORD1>
+ <KEYWORD1>.float</KEYWORD1>
+ <KEYWORD1>.globl</KEYWORD1>
+ <KEYWORD1>.half</KEYWORD1>
+ <KEYWORD1>.kdata</KEYWORD1>
+ <KEYWORD1>.ktext</KEYWORD1>
+ <KEYWORD1>.space</KEYWORD1>
+ <KEYWORD1>.text</KEYWORD1>
+ <KEYWORD1>.word</KEYWORD1>
+
+ <!-- MIPS/SPIM Operations -->
+ <FUNCTION>add</FUNCTION>
+ <FUNCTION>addi</FUNCTION>
+ <FUNCTION>addu</FUNCTION>
+ <FUNCTION>addiu</FUNCTION>
+ <FUNCTION>and</FUNCTION>
+ <FUNCTION>andi</FUNCTION>
+ <FUNCTION>div</FUNCTION>
+ <FUNCTION>divu</FUNCTION>
+ <FUNCTION>mul</FUNCTION>
+ <FUNCTION>mulo</FUNCTION>
+ <FUNCTION>mulou</FUNCTION>
+ <FUNCTION>mult</FUNCTION>
+ <FUNCTION>multu</FUNCTION>
+ <FUNCTION>neg</FUNCTION>
+ <FUNCTION>negu</FUNCTION>
+ <FUNCTION>nor</FUNCTION>
+ <FUNCTION>not</FUNCTION>
+ <FUNCTION>or</FUNCTION>
+ <FUNCTION>ori</FUNCTION>
+ <FUNCTION>rem</FUNCTION>
+ <FUNCTION>remu</FUNCTION>
+ <FUNCTION>rol</FUNCTION>
+ <FUNCTION>ror</FUNCTION>
+ <FUNCTION>sll</FUNCTION>
+ <FUNCTION>sllv</FUNCTION>
+ <FUNCTION>sra</FUNCTION>
+ <FUNCTION>srav</FUNCTION>
+ <FUNCTION>srl</FUNCTION>
+ <FUNCTION>srlv</FUNCTION>
+ <FUNCTION>sub</FUNCTION>
+ <FUNCTION>subu</FUNCTION>
+ <FUNCTION>xor</FUNCTION>
+ <FUNCTION>xori</FUNCTION>
+ <FUNCTION>li</FUNCTION>
+ <FUNCTION>lui</FUNCTION>
+ <FUNCTION>seq</FUNCTION>
+ <FUNCTION>sge</FUNCTION>
+ <FUNCTION>sgt</FUNCTION>
+ <FUNCTION>sgtu</FUNCTION>
+ <FUNCTION>sle</FUNCTION>
+ <FUNCTION>sleu</FUNCTION>
+ <FUNCTION>slt</FUNCTION>
+ <FUNCTION>slti</FUNCTION>
+ <FUNCTION>sltu</FUNCTION>
+ <FUNCTION>sltiu</FUNCTION>
+ <FUNCTION>sne</FUNCTION>
+ <FUNCTION>b</FUNCTION>
+ <FUNCTION>bczt</FUNCTION>
+ <FUNCTION>bczf</FUNCTION>
+ <FUNCTION>beq</FUNCTION>
+ <FUNCTION>beqz</FUNCTION>
+ <FUNCTION>bge</FUNCTION>
+ <FUNCTION>bgeu</FUNCTION>
+ <FUNCTION>bgez</FUNCTION>
+ <FUNCTION>bgezal</FUNCTION>
+ <FUNCTION>bgt</FUNCTION>
+ <FUNCTION>bgtu</FUNCTION>
+ <FUNCTION>bgtz</FUNCTION>
+ <FUNCTION>ble</FUNCTION>
+ <FUNCTION>bleu</FUNCTION>
+ <FUNCTION>blez</FUNCTION>
+ <FUNCTION>bgezal</FUNCTION>
+ <FUNCTION>bltzal</FUNCTION>
+ <FUNCTION>blt</FUNCTION>
+ <FUNCTION>bltu</FUNCTION>
+ <FUNCTION>bltz</FUNCTION>
+ <FUNCTION>bne</FUNCTION>
+ <FUNCTION>bnez</FUNCTION>
+ <FUNCTION>j</FUNCTION>
+ <FUNCTION>jal</FUNCTION>
+ <FUNCTION>jalr</FUNCTION>
+ <FUNCTION>jr</FUNCTION>
+ <FUNCTION>la</FUNCTION>
+ <FUNCTION>lb</FUNCTION>
+ <FUNCTION>blu</FUNCTION>
+ <FUNCTION>lh</FUNCTION>
+ <FUNCTION>lhu</FUNCTION>
+ <FUNCTION>lw</FUNCTION>
+ <FUNCTION>lwcz</FUNCTION>
+ <FUNCTION>lwl</FUNCTION>
+ <FUNCTION>lwr</FUNCTION>
+ <FUNCTION>ulh</FUNCTION>
+ <FUNCTION>ulhu</FUNCTION>
+ <FUNCTION>ulw</FUNCTION>
+ <FUNCTION>sb</FUNCTION>
+ <FUNCTION>sd</FUNCTION>
+ <FUNCTION>sh</FUNCTION>
+ <FUNCTION>sw</FUNCTION>
+ <FUNCTION>swcz</FUNCTION>
+ <FUNCTION>swl</FUNCTION>
+ <FUNCTION>swr</FUNCTION>
+ <FUNCTION>ush</FUNCTION>
+ <FUNCTION>usw</FUNCTION>
+ <FUNCTION>move</FUNCTION>
+ <FUNCTION>mfhi</FUNCTION>
+ <FUNCTION>mflo</FUNCTION>
+ <FUNCTION>mthi</FUNCTION>
+ <FUNCTION>mtlo</FUNCTION>
+ <FUNCTION>mfcz</FUNCTION>
+ <FUNCTION>mfc1.d</FUNCTION>
+ <FUNCTION>mtcz</FUNCTION>
+ <FUNCTION>abs.d</FUNCTION>
+ <FUNCTION>abs.s</FUNCTION>
+ <FUNCTION>add.d</FUNCTION>
+ <FUNCTION>add.s</FUNCTION>
+ <FUNCTION>c.eq.d</FUNCTION>
+ <FUNCTION>c.eq.s</FUNCTION>
+ <FUNCTION>c.le.d</FUNCTION>
+ <FUNCTION>c.le.s</FUNCTION>
+ <FUNCTION>c.lt.d</FUNCTION>
+ <FUNCTION>c.lt.s</FUNCTION>
+ <FUNCTION>cvt.d.s</FUNCTION>
+ <FUNCTION>cbt.d.w</FUNCTION>
+ <FUNCTION>cvt.s.d</FUNCTION>
+ <FUNCTION>cvt.s.w</FUNCTION>
+ <FUNCTION>cvt.w.d</FUNCTION>
+ <FUNCTION>cvt.w.s</FUNCTION>
+ <FUNCTION>div.d</FUNCTION>
+ <FUNCTION>div.s</FUNCTION>
+ <FUNCTION>l.d</FUNCTION>
+ <FUNCTION>l.s</FUNCTION>
+ <FUNCTION>mov.d</FUNCTION>
+ <FUNCTION>mov.s</FUNCTION>
+ <FUNCTION>mul.d</FUNCTION>
+ <FUNCTION>mul.s</FUNCTION>
+ <FUNCTION>neg.d</FUNCTION>
+ <FUNCTION>neg.s</FUNCTION>
+ <FUNCTION>s.d</FUNCTION>
+ <FUNCTION>s.s</FUNCTION>
+ <FUNCTION>sub.d</FUNCTION>
+ <FUNCTION>sub.s</FUNCTION>
+ <FUNCTION>rfe</FUNCTION>
+ <FUNCTION>syscall</FUNCTION>
+ <FUNCTION>break</FUNCTION>
+ <FUNCTION>nop</FUNCTION>
+
+ <!-- Integer Registers -->
+ <KEYWORD2>$zero</KEYWORD2>
+ <KEYWORD2>$at</KEYWORD2>
+ <KEYWORD2>$v0</KEYWORD2>
+ <KEYWORD2>$v1</KEYWORD2>
+ <KEYWORD2>$a0</KEYWORD2>
+ <KEYWORD2>$a1</KEYWORD2>
+ <KEYWORD2>$a2</KEYWORD2>
+ <KEYWORD2>$a3</KEYWORD2>
+ <KEYWORD2>$t0</KEYWORD2>
+ <KEYWORD2>$t1</KEYWORD2>
+ <KEYWORD2>$t2</KEYWORD2>
+ <KEYWORD2>$t3</KEYWORD2>
+ <KEYWORD2>$t4</KEYWORD2>
+ <KEYWORD2>$t5</KEYWORD2>
+ <KEYWORD2>$t6</KEYWORD2>
+ <KEYWORD2>$t7</KEYWORD2>
+ <KEYWORD2>$s0</KEYWORD2>
+ <KEYWORD2>$s1</KEYWORD2>
+ <KEYWORD2>$s2</KEYWORD2>
+ <KEYWORD2>$s3</KEYWORD2>
+ <KEYWORD2>$s4</KEYWORD2>
+ <KEYWORD2>$s5</KEYWORD2>
+ <KEYWORD2>$s6</KEYWORD2>
+ <KEYWORD2>$s7</KEYWORD2>
+ <KEYWORD2>$t8</KEYWORD2>
+ <KEYWORD2>$t9</KEYWORD2>
+ <KEYWORD2>$k0</KEYWORD2>
+ <KEYWORD2>$k1</KEYWORD2>
+ <KEYWORD2>$gp</KEYWORD2>
+ <KEYWORD2>$sp</KEYWORD2>
+ <KEYWORD2>$fp</KEYWORD2>
+ <KEYWORD2>$ra</KEYWORD2>
+
+ <!-- Floating Point Registers -->
+ <KEYWORD3>$f0</KEYWORD3>
+ <KEYWORD3>$f1</KEYWORD3>
+ <KEYWORD3>$f2</KEYWORD3>
+ <KEYWORD3>$f3</KEYWORD3>
+ <KEYWORD3>$f4</KEYWORD3>
+ <KEYWORD3>$f5</KEYWORD3>
+ <KEYWORD3>$f6</KEYWORD3>
+ <KEYWORD3>$f7</KEYWORD3>
+ <KEYWORD3>$f8</KEYWORD3>
+ <KEYWORD3>$f9</KEYWORD3>
+ <KEYWORD3>$f10</KEYWORD3>
+ <KEYWORD3>$f11</KEYWORD3>
+ <KEYWORD3>$f12</KEYWORD3>
+ <KEYWORD3>$f13</KEYWORD3>
+ <KEYWORD3>$f14</KEYWORD3>
+ <KEYWORD3>$f15</KEYWORD3>
+ <KEYWORD3>$f16</KEYWORD3>
+ <KEYWORD3>$f17</KEYWORD3>
+ <KEYWORD3>$f18</KEYWORD3>
+ <KEYWORD3>$f19</KEYWORD3>
+ <KEYWORD3>$f20</KEYWORD3>
+ <KEYWORD3>$f21</KEYWORD3>
+ <KEYWORD3>$f22</KEYWORD3>
+ <KEYWORD3>$f23</KEYWORD3>
+ <KEYWORD3>$f24</KEYWORD3>
+ <KEYWORD3>$f25</KEYWORD3>
+ <KEYWORD3>$f26</KEYWORD3>
+ <KEYWORD3>$f27</KEYWORD3>
+ <KEYWORD3>$f28</KEYWORD3>
+ <KEYWORD3>$f29</KEYWORD3>
+ <KEYWORD3>$f30</KEYWORD3>
+ <KEYWORD3>$f31</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/assembly-x86.xml b/jEdit/modes/assembly-x86.xml
index 7cd45d6..bf609af 100644
--- a/jEdit/modes/assembly-x86.xml
+++ b/jEdit/modes/assembly-x86.xml
@@ -1,864 +1,864 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- x86 Assembly mode by Kristian Ovaska (kristian.ovaska at helsinki.fi)
-
- - Intel syntax
- - Instructions and registers of Pentium III/Athlon
- (including FPU, MMX, 3DNow! and SSE)
- - Full NASM 0.98 & MASM 6.15 keyword support, partial TASM support
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- </PROPS>
-
- <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE"
- DIGIT_RE="(0x)?[\p{Digit}a-fA-F_]+[hHdD]?">
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- NASM: label inside a macro -->
- <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">%%</MARK_FOLLOWING>
-
- <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="TRUE">%</MARK_FOLLOWING>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
-
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
-
- <KEYWORDS>
- <KEYWORD1>.186</KEYWORD1>
- <KEYWORD1>.286</KEYWORD1>
- <KEYWORD1>.286P</KEYWORD1>
- <KEYWORD1>.287</KEYWORD1>
- <KEYWORD1>.386</KEYWORD1>
- <KEYWORD1>.386P</KEYWORD1>
- <KEYWORD1>.387</KEYWORD1>
- <KEYWORD1>.486</KEYWORD1>
- <KEYWORD1>.486P</KEYWORD1>
- <KEYWORD1>.586</KEYWORD1>
- <KEYWORD1>.586P</KEYWORD1>
- <KEYWORD1>.686</KEYWORD1>
- <KEYWORD1>.686P</KEYWORD1>
- <KEYWORD1>.8086</KEYWORD1>
- <KEYWORD1>.8087</KEYWORD1>
- <KEYWORD1>.ALPHA</KEYWORD1>
- <KEYWORD1>.BREAK</KEYWORD1>
- <KEYWORD1>.BSS</KEYWORD1>
- <KEYWORD1>.CODE</KEYWORD1>
- <KEYWORD1>.CONST</KEYWORD1>
- <KEYWORD1>.CONTINUE</KEYWORD1>
- <KEYWORD1>.CREF</KEYWORD1>
- <KEYWORD1>.DATA</KEYWORD1>
- <KEYWORD1>.DATA?</KEYWORD1>
- <KEYWORD1>.DOSSEG</KEYWORD1>
- <KEYWORD1>.ELSE</KEYWORD1>
- <KEYWORD1>.ELSEIF</KEYWORD1>
- <KEYWORD1>.ENDIF</KEYWORD1>
- <KEYWORD1>.ENDW</KEYWORD1>
- <KEYWORD1>.ERR</KEYWORD1>
- <KEYWORD1>.ERR1</KEYWORD1>
- <KEYWORD1>.ERR2</KEYWORD1>
- <KEYWORD1>.ERRB</KEYWORD1>
- <KEYWORD1>.ERRDEF</KEYWORD1>
- <KEYWORD1>.ERRDIF</KEYWORD1>
- <KEYWORD1>.ERRDIFI</KEYWORD1>
- <KEYWORD1>.ERRE</KEYWORD1>
- <KEYWORD1>.ERRIDN</KEYWORD1>
- <KEYWORD1>.ERRIDNI</KEYWORD1>
- <KEYWORD1>.ERRNB</KEYWORD1>
- <KEYWORD1>.ERRNDEF</KEYWORD1>
- <KEYWORD1>.ERRNZ</KEYWORD1>
- <KEYWORD1>.EXIT</KEYWORD1>
- <KEYWORD1>.FARDATA</KEYWORD1>
- <KEYWORD1>.FARDATA?</KEYWORD1>
- <KEYWORD1>.IF</KEYWORD1>
- <KEYWORD1>.K3D</KEYWORD1>
- <KEYWORD1>.LALL</KEYWORD1>
- <KEYWORD1>.LFCOND</KEYWORD1>
- <KEYWORD1>.LIST</KEYWORD1>
- <KEYWORD1>.LISTALL</KEYWORD1>
- <KEYWORD1>.LISTIF</KEYWORD1>
- <KEYWORD1>.LISTMACRO</KEYWORD1>
- <KEYWORD1>.LISTMACROALL</KEYWORD1>
- <KEYWORD1>.MMX</KEYWORD1>
- <KEYWORD1>.MODEL</KEYWORD1>
- <KEYWORD1>.MSFLOAT</KEYWORD1>
- <KEYWORD1>.NO87</KEYWORD1>
- <KEYWORD1>.NOCREF</KEYWORD1>
- <KEYWORD1>.NOLIST</KEYWORD1>
- <KEYWORD1>.NOLISTIF</KEYWORD1>
- <KEYWORD1>.NOLISTMACRO</KEYWORD1>
- <KEYWORD1>.RADIX</KEYWORD1>
- <KEYWORD1>.REPEAT</KEYWORD1>
- <KEYWORD1>.SALL</KEYWORD1>
- <KEYWORD1>.SEQ</KEYWORD1>
- <KEYWORD1>.SFCOND</KEYWORD1>
- <KEYWORD1>.STACK</KEYWORD1>
- <KEYWORD1>.STARTUP</KEYWORD1>
- <KEYWORD1>.TEXT</KEYWORD1>
- <KEYWORD1>.TFCOND</KEYWORD1>
- <KEYWORD1>.UNTIL</KEYWORD1>
- <KEYWORD1>.UNTILCXZ</KEYWORD1>
- <KEYWORD1>.WHILE</KEYWORD1>
- <KEYWORD1>.XALL</KEYWORD1>
- <KEYWORD1>.XCREF</KEYWORD1>
- <KEYWORD1>.XLIST</KEYWORD1>
- <KEYWORD1>.XMM</KEYWORD1>
- <KEYWORD1>__FILE__</KEYWORD1>
- <KEYWORD1>__LINE__</KEYWORD1>
- <KEYWORD1>A16</KEYWORD1>
- <KEYWORD1>A32</KEYWORD1>
- <KEYWORD1>ADDR</KEYWORD1>
- <KEYWORD1>ALIGN</KEYWORD1>
- <KEYWORD1>ALIGNB</KEYWORD1>
- <KEYWORD1>ASSUME</KEYWORD1>
- <KEYWORD1>BITS</KEYWORD1>
- <KEYWORD1>CARRY?</KEYWORD1>
- <KEYWORD1>CATSTR</KEYWORD1>
- <KEYWORD1>CODESEG</KEYWORD1>
- <KEYWORD1>COMM</KEYWORD1>
- <KEYWORD1>COMMENT</KEYWORD1>
- <KEYWORD1>COMMON</KEYWORD1>
- <KEYWORD1>DATASEG</KEYWORD1>
- <KEYWORD1>DOSSEG</KEYWORD1>
- <KEYWORD1>ECHO</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>ELSEIF</KEYWORD1>
- <KEYWORD1>ELSEIF1</KEYWORD1>
- <KEYWORD1>ELSEIF2</KEYWORD1>
- <KEYWORD1>ELSEIFB</KEYWORD1>
- <KEYWORD1>ELSEIFDEF</KEYWORD1>
- <KEYWORD1>ELSEIFE</KEYWORD1>
- <KEYWORD1>ELSEIFIDN</KEYWORD1>
- <KEYWORD1>ELSEIFNB</KEYWORD1>
- <KEYWORD1>ELSEIFNDEF</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>ENDIF</KEYWORD1>
- <KEYWORD1>ENDM</KEYWORD1>
- <KEYWORD1>ENDP</KEYWORD1>
- <KEYWORD1>ENDS</KEYWORD1>
- <KEYWORD1>ENDSTRUC</KEYWORD1>
- <KEYWORD1>EVEN</KEYWORD1>
- <KEYWORD1>EXITM</KEYWORD1>
- <KEYWORD1>EXPORT</KEYWORD1>
- <KEYWORD1>EXTERN</KEYWORD1>
- <KEYWORD1>EXTERNDEF</KEYWORD1>
- <KEYWORD1>EXTRN</KEYWORD1>
- <KEYWORD1>FAR</KEYWORD1>
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>FORC</KEYWORD1>
- <KEYWORD1>GLOBAL</KEYWORD1>
- <KEYWORD1>GOTO</KEYWORD1>
- <KEYWORD1>GROUP</KEYWORD1>
- <KEYWORD1>HIGH</KEYWORD1>
- <KEYWORD1>HIGHWORD</KEYWORD1>
- <KEYWORD1>IEND</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>IF1</KEYWORD1>
- <KEYWORD1>IF2</KEYWORD1>
- <KEYWORD1>IFB</KEYWORD1>
- <KEYWORD1>IFDEF</KEYWORD1>
- <KEYWORD1>IFDIF</KEYWORD1>
- <KEYWORD1>IFDIFI</KEYWORD1>
- <KEYWORD1>IFE</KEYWORD1>
- <KEYWORD1>IFIDN</KEYWORD1>
- <KEYWORD1>IFIDNI</KEYWORD1>
- <KEYWORD1>IFNB</KEYWORD1>
- <KEYWORD1>IFNDEF</KEYWORD1>
- <KEYWORD1>IMPORT</KEYWORD1>
- <KEYWORD1>INCBIN</KEYWORD1>
- <KEYWORD1>INCLUDE</KEYWORD1>
- <KEYWORD1>INCLUDELIB</KEYWORD1>
- <KEYWORD1>INSTR</KEYWORD1>
- <KEYWORD1>INVOKE</KEYWORD1>
- <KEYWORD1>IRP</KEYWORD1>
- <KEYWORD1>IRPC</KEYWORD1>
- <KEYWORD1>ISTRUC</KEYWORD1>
- <KEYWORD1>LABEL</KEYWORD1>
- <KEYWORD1>LENGTH</KEYWORD1>
- <KEYWORD1>LENGTHOF</KEYWORD1>
- <KEYWORD1>LOCAL</KEYWORD1>
- <KEYWORD1>LOW</KEYWORD1>
- <KEYWORD1>LOWWORD</KEYWORD1>
- <KEYWORD1>LROFFSET</KEYWORD1>
- <KEYWORD1>MACRO</KEYWORD1>
- <KEYWORD1>NAME</KEYWORD1>
- <KEYWORD1>NEAR</KEYWORD1>
- <KEYWORD1>NOSPLIT</KEYWORD1>
- <KEYWORD1>O16</KEYWORD1>
- <KEYWORD1>O32</KEYWORD1>
- <KEYWORD1>OFFSET</KEYWORD1>
- <KEYWORD1>OPATTR</KEYWORD1>
- <KEYWORD1>OPTION</KEYWORD1>
- <KEYWORD1>ORG</KEYWORD1>
- <KEYWORD1>OVERFLOW?</KEYWORD1>
- <KEYWORD1>PAGE</KEYWORD1>
- <KEYWORD1>PARITY?</KEYWORD1>
- <KEYWORD1>POPCONTEXT</KEYWORD1>
- <KEYWORD1>PRIVATE</KEYWORD1>
- <KEYWORD1>PROC</KEYWORD1>
- <KEYWORD1>PROTO</KEYWORD1>
- <KEYWORD1>PTR</KEYWORD1>
- <KEYWORD1>PUBLIC</KEYWORD1>
- <KEYWORD1>PURGE</KEYWORD1>
- <KEYWORD1>PUSHCONTEXT</KEYWORD1>
- <KEYWORD1>RECORD</KEYWORD1>
- <KEYWORD1>REPEAT</KEYWORD1>
- <KEYWORD1>REPT</KEYWORD1>
- <KEYWORD1>SECTION</KEYWORD1>
- <KEYWORD1>SEG</KEYWORD1>
- <KEYWORD1>SEGMENT</KEYWORD1>
- <KEYWORD1>SHORT</KEYWORD1>
- <KEYWORD1>SIGN?</KEYWORD1>
- <KEYWORD1>SIZE</KEYWORD1>
- <KEYWORD1>SIZEOF</KEYWORD1>
- <KEYWORD1>SIZESTR</KEYWORD1>
- <KEYWORD1>STACK</KEYWORD1>
- <KEYWORD1>STRUC</KEYWORD1>
- <KEYWORD1>STRUCT</KEYWORD1>
- <KEYWORD1>SUBSTR</KEYWORD1>
- <KEYWORD1>SUBTITLE</KEYWORD1>
- <KEYWORD1>SUBTTL</KEYWORD1>
- <KEYWORD1>THIS</KEYWORD1>
- <KEYWORD1>TITLE</KEYWORD1>
- <KEYWORD1>TYPE</KEYWORD1>
- <KEYWORD1>TYPEDEF</KEYWORD1>
- <KEYWORD1>UNION</KEYWORD1>
- <KEYWORD1>USE16</KEYWORD1>
- <KEYWORD1>USE32</KEYWORD1>
- <KEYWORD1>USES</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
- <KEYWORD1>WRT</KEYWORD1>
- <KEYWORD1>ZERO?</KEYWORD1>
-
- <KEYWORD2>DB</KEYWORD2>
- <KEYWORD2>DW</KEYWORD2>
- <KEYWORD2>DD</KEYWORD2>
- <KEYWORD2>DF</KEYWORD2>
- <KEYWORD2>DQ</KEYWORD2>
- <KEYWORD2>DT</KEYWORD2>
- <KEYWORD2>RESB</KEYWORD2>
- <KEYWORD2>RESW</KEYWORD2>
- <KEYWORD2>RESD</KEYWORD2>
- <KEYWORD2>RESQ</KEYWORD2>
- <KEYWORD2>REST</KEYWORD2>
- <KEYWORD2>EQU</KEYWORD2>
- <KEYWORD2>TEXTEQU</KEYWORD2>
- <KEYWORD2>TIMES</KEYWORD2>
- <KEYWORD2>DUP</KEYWORD2>
-
- <KEYWORD2>BYTE</KEYWORD2>
- <KEYWORD2>WORD</KEYWORD2>
- <KEYWORD2>DWORD</KEYWORD2>
- <KEYWORD2>FWORD</KEYWORD2>
- <KEYWORD2>QWORD</KEYWORD2>
- <KEYWORD2>TBYTE</KEYWORD2>
- <KEYWORD2>SBYTE</KEYWORD2>
- <KEYWORD2>TWORD</KEYWORD2>
- <KEYWORD2>SWORD</KEYWORD2>
- <KEYWORD2>SDWORD</KEYWORD2>
- <KEYWORD2>REAL4</KEYWORD2>
- <KEYWORD2>REAL8</KEYWORD2>
- <KEYWORD2>REAL10</KEYWORD2>
-
- <!-- Registers -->
- <KEYWORD3>AL</KEYWORD3>
- <KEYWORD3>BL</KEYWORD3>
- <KEYWORD3>CL</KEYWORD3>
- <KEYWORD3>DL</KEYWORD3>
- <KEYWORD3>AH</KEYWORD3>
- <KEYWORD3>BH</KEYWORD3>
- <KEYWORD3>CH</KEYWORD3>
- <KEYWORD3>DH</KEYWORD3>
- <KEYWORD3>AX</KEYWORD3>
- <KEYWORD3>BX</KEYWORD3>
- <KEYWORD3>CX</KEYWORD3>
- <KEYWORD3>DX</KEYWORD3>
- <KEYWORD3>SI</KEYWORD3>
- <KEYWORD3>DI</KEYWORD3>
- <KEYWORD3>SP</KEYWORD3>
- <KEYWORD3>BP</KEYWORD3>
- <KEYWORD3>EAX</KEYWORD3>
- <KEYWORD3>EBX</KEYWORD3>
- <KEYWORD3>ECX</KEYWORD3>
- <KEYWORD3>EDX</KEYWORD3>
- <KEYWORD3>ESI</KEYWORD3>
- <KEYWORD3>EDI</KEYWORD3>
- <KEYWORD3>ESP</KEYWORD3>
- <KEYWORD3>EBP</KEYWORD3>
- <KEYWORD3>CS</KEYWORD3>
- <KEYWORD3>DS</KEYWORD3>
- <KEYWORD3>SS</KEYWORD3>
- <KEYWORD3>ES</KEYWORD3>
- <KEYWORD3>FS</KEYWORD3>
- <KEYWORD3>GS</KEYWORD3>
- <KEYWORD3>ST</KEYWORD3>
- <KEYWORD3>ST0</KEYWORD3>
- <KEYWORD3>ST1</KEYWORD3>
- <KEYWORD3>ST2</KEYWORD3>
- <KEYWORD3>ST3</KEYWORD3>
- <KEYWORD3>ST4</KEYWORD3>
- <KEYWORD3>ST5</KEYWORD3>
- <KEYWORD3>ST6</KEYWORD3>
- <KEYWORD3>ST7</KEYWORD3>
- <KEYWORD3>MM0</KEYWORD3>
- <KEYWORD3>MM1</KEYWORD3>
- <KEYWORD3>MM2</KEYWORD3>
- <KEYWORD3>MM3</KEYWORD3>
- <KEYWORD3>MM4</KEYWORD3>
- <KEYWORD3>MM5</KEYWORD3>
- <KEYWORD3>MM6</KEYWORD3>
- <KEYWORD3>MM7</KEYWORD3>
- <KEYWORD3>XMM0</KEYWORD3>
- <KEYWORD3>XMM1</KEYWORD3>
- <KEYWORD3>XMM2</KEYWORD3>
- <KEYWORD3>XMM3</KEYWORD3>
- <KEYWORD3>XMM4</KEYWORD3>
- <KEYWORD3>XMM5</KEYWORD3>
- <KEYWORD3>XMM6</KEYWORD3>
- <KEYWORD3>XMM7</KEYWORD3>
- <KEYWORD3>CR0</KEYWORD3>
- <KEYWORD3>CR2</KEYWORD3>
- <KEYWORD3>CR3</KEYWORD3>
- <KEYWORD3>CR4</KEYWORD3>
- <KEYWORD3>DR0</KEYWORD3>
- <KEYWORD3>DR1</KEYWORD3>
- <KEYWORD3>DR2</KEYWORD3>
- <KEYWORD3>DR3</KEYWORD3>
- <KEYWORD3>DR4</KEYWORD3>
- <KEYWORD3>DR5</KEYWORD3>
- <KEYWORD3>DR6</KEYWORD3>
- <KEYWORD3>DR7</KEYWORD3>
- <KEYWORD3>TR3</KEYWORD3>
- <KEYWORD3>TR4</KEYWORD3>
- <KEYWORD3>TR5</KEYWORD3>
- <KEYWORD3>TR6</KEYWORD3>
- <KEYWORD3>TR7</KEYWORD3>
-
- <!-- Instructions: Pentium III/MMX/SSE -->
- <FUNCTION>AAA</FUNCTION>
- <FUNCTION>AAD</FUNCTION>
- <FUNCTION>AAM</FUNCTION>
- <FUNCTION>AAS</FUNCTION>
- <FUNCTION>ADC</FUNCTION>
- <FUNCTION>ADD</FUNCTION>
- <FUNCTION>ADDPS</FUNCTION>
- <FUNCTION>ADDSS</FUNCTION>
- <FUNCTION>AND</FUNCTION>
- <FUNCTION>ANDNPS</FUNCTION>
- <FUNCTION>ANDPS</FUNCTION>
- <FUNCTION>ARPL</FUNCTION>
- <FUNCTION>BOUND</FUNCTION>
- <FUNCTION>BSF</FUNCTION>
- <FUNCTION>BSR</FUNCTION>
- <FUNCTION>BSWAP</FUNCTION>
- <FUNCTION>BT</FUNCTION>
- <FUNCTION>BTC</FUNCTION>
- <FUNCTION>BTR</FUNCTION>
- <FUNCTION>BTS</FUNCTION>
- <FUNCTION>CALL</FUNCTION>
- <FUNCTION>CBW</FUNCTION>
- <FUNCTION>CDQ</FUNCTION>
- <FUNCTION>CLC</FUNCTION>
- <FUNCTION>CLD</FUNCTION>
- <FUNCTION>CLI</FUNCTION>
- <FUNCTION>CLTS</FUNCTION>
- <FUNCTION>CMC</FUNCTION>
- <FUNCTION>CMOVA</FUNCTION>
- <FUNCTION>CMOVAE</FUNCTION>
- <FUNCTION>CMOVB</FUNCTION>
- <FUNCTION>CMOVBE</FUNCTION>
- <FUNCTION>CMOVC</FUNCTION>
- <FUNCTION>CMOVE</FUNCTION>
- <FUNCTION>CMOVG</FUNCTION>
- <FUNCTION>CMOVGE</FUNCTION>
- <FUNCTION>CMOVL</FUNCTION>
- <FUNCTION>CMOVLE</FUNCTION>
- <FUNCTION>CMOVNA</FUNCTION>
- <FUNCTION>CMOVNAE</FUNCTION>
- <FUNCTION>CMOVNB</FUNCTION>
- <FUNCTION>CMOVNBE</FUNCTION>
- <FUNCTION>CMOVNC</FUNCTION>
- <FUNCTION>CMOVNE</FUNCTION>
- <FUNCTION>CMOVNG</FUNCTION>
- <FUNCTION>CMOVNGE</FUNCTION>
- <FUNCTION>CMOVNL</FUNCTION>
- <FUNCTION>CMOVNLE</FUNCTION>
- <FUNCTION>CMOVNO</FUNCTION>
- <FUNCTION>CMOVNP</FUNCTION>
- <FUNCTION>CMOVNS</FUNCTION>
- <FUNCTION>CMOVNZ</FUNCTION>
- <FUNCTION>CMOVO</FUNCTION>
- <FUNCTION>CMOVP</FUNCTION>
- <FUNCTION>CMOVPE</FUNCTION>
- <FUNCTION>CMOVPO</FUNCTION>
- <FUNCTION>CMOVS</FUNCTION>
- <FUNCTION>CMOVZ</FUNCTION>
- <FUNCTION>CMP</FUNCTION>
- <FUNCTION>CMPPS</FUNCTION>
- <FUNCTION>CMPS</FUNCTION>
- <FUNCTION>CMPSB</FUNCTION>
- <FUNCTION>CMPSD</FUNCTION>
- <FUNCTION>CMPSS</FUNCTION>
- <FUNCTION>CMPSW</FUNCTION>
- <FUNCTION>CMPXCHG</FUNCTION>
- <FUNCTION>CMPXCHGB</FUNCTION>
- <FUNCTION>COMISS</FUNCTION>
- <FUNCTION>CPUID</FUNCTION>
- <FUNCTION>CWD</FUNCTION>
- <FUNCTION>CWDE</FUNCTION>
- <FUNCTION>CVTPI2PS</FUNCTION>
- <FUNCTION>CVTPS2PI</FUNCTION>
- <FUNCTION>CVTSI2SS</FUNCTION>
- <FUNCTION>CVTSS2SI</FUNCTION>
- <FUNCTION>CVTTPS2PI</FUNCTION>
- <FUNCTION>CVTTSS2SI</FUNCTION>
- <FUNCTION>DAA</FUNCTION>
- <FUNCTION>DAS</FUNCTION>
- <FUNCTION>DEC</FUNCTION>
- <FUNCTION>DIV</FUNCTION>
- <FUNCTION>DIVPS</FUNCTION>
- <FUNCTION>DIVSS</FUNCTION>
- <FUNCTION>EMMS</FUNCTION>
- <FUNCTION>ENTER</FUNCTION>
- <FUNCTION>F2XM1</FUNCTION>
- <FUNCTION>FABS</FUNCTION>
- <FUNCTION>FADD</FUNCTION>
- <FUNCTION>FADDP</FUNCTION>
- <FUNCTION>FBLD</FUNCTION>
- <FUNCTION>FBSTP</FUNCTION>
- <FUNCTION>FCHS</FUNCTION>
- <FUNCTION>FCLEX</FUNCTION>
- <FUNCTION>FCMOVB</FUNCTION>
- <FUNCTION>FCMOVBE</FUNCTION>
- <FUNCTION>FCMOVE</FUNCTION>
- <FUNCTION>FCMOVNB</FUNCTION>
- <FUNCTION>FCMOVNBE</FUNCTION>
- <FUNCTION>FCMOVNE</FUNCTION>
- <FUNCTION>FCMOVNU</FUNCTION>
- <FUNCTION>FCMOVU</FUNCTION>
- <FUNCTION>FCOM</FUNCTION>
- <FUNCTION>FCOMI</FUNCTION>
- <FUNCTION>FCOMIP</FUNCTION>
- <FUNCTION>FCOMP</FUNCTION>
- <FUNCTION>FCOMPP</FUNCTION>
- <FUNCTION>FCOS</FUNCTION>
- <FUNCTION>FDECSTP</FUNCTION>
- <FUNCTION>FDIV</FUNCTION>
- <FUNCTION>FDIVP</FUNCTION>
- <FUNCTION>FDIVR</FUNCTION>
- <FUNCTION>FDIVRP</FUNCTION>
- <FUNCTION>FFREE</FUNCTION>
- <FUNCTION>FIADD</FUNCTION>
- <FUNCTION>FICOM</FUNCTION>
- <FUNCTION>FICOMP</FUNCTION>
- <FUNCTION>FIDIV</FUNCTION>
- <FUNCTION>FIDIVR</FUNCTION>
- <FUNCTION>FILD</FUNCTION>
- <FUNCTION>FIMUL</FUNCTION>
- <FUNCTION>FINCSTP</FUNCTION>
- <FUNCTION>FINIT</FUNCTION>
- <FUNCTION>FIST</FUNCTION>
- <FUNCTION>FISTP</FUNCTION>
- <FUNCTION>FISUB</FUNCTION>
- <FUNCTION>FISUBR</FUNCTION>
- <FUNCTION>FLD1</FUNCTION>
- <FUNCTION>FLDCW</FUNCTION>
- <FUNCTION>FLDENV</FUNCTION>
- <FUNCTION>FLDL2E</FUNCTION>
- <FUNCTION>FLDL2T</FUNCTION>
- <FUNCTION>FLDLG2</FUNCTION>
- <FUNCTION>FLDLN2</FUNCTION>
- <FUNCTION>FLDPI</FUNCTION>
- <FUNCTION>FLDZ</FUNCTION>
- <FUNCTION>FMUL</FUNCTION>
- <FUNCTION>FMULP</FUNCTION>
- <FUNCTION>FNCLEX</FUNCTION>
- <FUNCTION>FNINIT</FUNCTION>
- <FUNCTION>FNOP</FUNCTION>
- <FUNCTION>FNSAVE</FUNCTION>
- <FUNCTION>FNSTCW</FUNCTION>
- <FUNCTION>FNSTENV</FUNCTION>
- <FUNCTION>FNSTSW</FUNCTION>
- <FUNCTION>FPATAN</FUNCTION>
- <FUNCTION>FPREM</FUNCTION>
- <FUNCTION>FPREMI</FUNCTION>
- <FUNCTION>FPTAN</FUNCTION>
- <FUNCTION>FRNDINT</FUNCTION>
- <FUNCTION>FRSTOR</FUNCTION>
- <FUNCTION>FSAVE</FUNCTION>
- <FUNCTION>FSCALE</FUNCTION>
- <FUNCTION>FSIN</FUNCTION>
- <FUNCTION>FSINCOS</FUNCTION>
- <FUNCTION>FSQRT</FUNCTION>
- <FUNCTION>FST</FUNCTION>
- <FUNCTION>FSTCW</FUNCTION>
- <FUNCTION>FSTENV</FUNCTION>
- <FUNCTION>FSTP</FUNCTION>
- <FUNCTION>FSTSW</FUNCTION>
- <FUNCTION>FSUB</FUNCTION>
- <FUNCTION>FSUBP</FUNCTION>
- <FUNCTION>FSUBR</FUNCTION>
- <FUNCTION>FSUBRP</FUNCTION>
- <FUNCTION>FTST</FUNCTION>
- <FUNCTION>FUCOM</FUNCTION>
- <FUNCTION>FUCOMI</FUNCTION>
- <FUNCTION>FUCOMIP</FUNCTION>
- <FUNCTION>FUCOMP</FUNCTION>
- <FUNCTION>FUCOMPP</FUNCTION>
- <FUNCTION>FWAIT</FUNCTION>
- <FUNCTION>FXAM</FUNCTION>
- <FUNCTION>FXCH</FUNCTION>
- <FUNCTION>FXRSTOR</FUNCTION>
- <FUNCTION>FXSAVE</FUNCTION>
- <FUNCTION>FXTRACT</FUNCTION>
- <FUNCTION>FYL2X</FUNCTION>
- <FUNCTION>FYL2XP1</FUNCTION>
- <FUNCTION>HLT</FUNCTION>
- <FUNCTION>IDIV</FUNCTION>
- <FUNCTION>IMUL</FUNCTION>
- <FUNCTION>IN</FUNCTION>
- <FUNCTION>INC</FUNCTION>
- <FUNCTION>INS</FUNCTION>
- <FUNCTION>INSB</FUNCTION>
- <FUNCTION>INSD</FUNCTION>
- <FUNCTION>INSW</FUNCTION>
- <FUNCTION>INT</FUNCTION>
- <FUNCTION>INTO</FUNCTION>
- <FUNCTION>INVD</FUNCTION>
- <FUNCTION>INVLPG</FUNCTION>
- <FUNCTION>IRET</FUNCTION>
- <FUNCTION>JA</FUNCTION>
- <FUNCTION>JAE</FUNCTION>
- <FUNCTION>JB</FUNCTION>
- <FUNCTION>JBE</FUNCTION>
- <FUNCTION>JC</FUNCTION>
- <FUNCTION>JCXZ</FUNCTION>
- <FUNCTION>JE</FUNCTION>
- <FUNCTION>JECXZ</FUNCTION>
- <FUNCTION>JG</FUNCTION>
- <FUNCTION>JGE</FUNCTION>
- <FUNCTION>JL</FUNCTION>
- <FUNCTION>JLE</FUNCTION>
- <FUNCTION>JMP</FUNCTION>
- <FUNCTION>JNA</FUNCTION>
- <FUNCTION>JNAE</FUNCTION>
- <FUNCTION>JNB</FUNCTION>
- <FUNCTION>JNBE</FUNCTION>
- <FUNCTION>JNC</FUNCTION>
- <FUNCTION>JNE</FUNCTION>
- <FUNCTION>JNG</FUNCTION>
- <FUNCTION>JNGE</FUNCTION>
- <FUNCTION>JNL</FUNCTION>
- <FUNCTION>JNLE</FUNCTION>
- <FUNCTION>JNO</FUNCTION>
- <FUNCTION>JNP</FUNCTION>
- <FUNCTION>JNS</FUNCTION>
- <FUNCTION>JNZ</FUNCTION>
- <FUNCTION>JO</FUNCTION>
- <FUNCTION>JP</FUNCTION>
- <FUNCTION>JPE</FUNCTION>
- <FUNCTION>JPO</FUNCTION>
- <FUNCTION>JS</FUNCTION>
- <FUNCTION>JZ</FUNCTION>
- <FUNCTION>LAHF</FUNCTION>
- <FUNCTION>LAR</FUNCTION>
- <FUNCTION>LDMXCSR</FUNCTION>
- <FUNCTION>LDS</FUNCTION>
- <FUNCTION>LEA</FUNCTION>
- <FUNCTION>LEAVE</FUNCTION>
- <FUNCTION>LES</FUNCTION>
- <FUNCTION>LFS</FUNCTION>
- <FUNCTION>LGDT</FUNCTION>
- <FUNCTION>LGS</FUNCTION>
- <FUNCTION>LIDT</FUNCTION>
- <FUNCTION>LLDT</FUNCTION>
- <FUNCTION>LMSW</FUNCTION>
- <FUNCTION>LOCK</FUNCTION>
- <FUNCTION>LODS</FUNCTION>
- <FUNCTION>LODSB</FUNCTION>
- <FUNCTION>LODSD</FUNCTION>
- <FUNCTION>LODSW</FUNCTION>
- <FUNCTION>LOOP</FUNCTION>
- <FUNCTION>LOOPE</FUNCTION>
- <FUNCTION>LOOPNE</FUNCTION>
- <FUNCTION>LOOPNZ</FUNCTION>
- <FUNCTION>LOOPZ</FUNCTION>
- <FUNCTION>LSL</FUNCTION>
- <FUNCTION>LSS</FUNCTION>
- <FUNCTION>LTR</FUNCTION>
- <FUNCTION>MASKMOVQ</FUNCTION>
- <FUNCTION>MAXPS</FUNCTION>
- <FUNCTION>MAXSS</FUNCTION>
- <FUNCTION>MINPS</FUNCTION>
- <FUNCTION>MINSS</FUNCTION>
- <FUNCTION>MOV</FUNCTION>
- <FUNCTION>MOVAPS</FUNCTION>
- <FUNCTION>MOVD</FUNCTION>
- <FUNCTION>MOVHLPS</FUNCTION>
- <FUNCTION>MOVHPS</FUNCTION>
- <FUNCTION>MOVLHPS</FUNCTION>
- <FUNCTION>MOVLPS</FUNCTION>
- <FUNCTION>MOVMSKPS</FUNCTION>
- <FUNCTION>MOVNTPS</FUNCTION>
- <FUNCTION>MOVNTQ</FUNCTION>
- <FUNCTION>MOVQ</FUNCTION>
- <FUNCTION>MOVS</FUNCTION>
- <FUNCTION>MOVSB</FUNCTION>
- <FUNCTION>MOVSD</FUNCTION>
- <FUNCTION>MOVSS</FUNCTION>
- <FUNCTION>MOVSW</FUNCTION>
- <FUNCTION>MOVSX</FUNCTION>
- <FUNCTION>MOVUPS</FUNCTION>
- <FUNCTION>MOVZX</FUNCTION>
- <FUNCTION>MUL</FUNCTION>
- <FUNCTION>MULPS</FUNCTION>
- <FUNCTION>MULSS</FUNCTION>
- <FUNCTION>NEG</FUNCTION>
- <FUNCTION>NOP</FUNCTION>
- <FUNCTION>NOT</FUNCTION>
- <FUNCTION>OR</FUNCTION>
- <FUNCTION>ORPS</FUNCTION>
- <FUNCTION>OUT</FUNCTION>
- <FUNCTION>OUTS</FUNCTION>
- <FUNCTION>OUTSB</FUNCTION>
- <FUNCTION>OUTSD</FUNCTION>
- <FUNCTION>OUTSW</FUNCTION>
- <FUNCTION>PACKSSDW</FUNCTION>
- <FUNCTION>PACKSSWB</FUNCTION>
- <FUNCTION>PACKUSWB</FUNCTION>
- <FUNCTION>PADDB</FUNCTION>
- <FUNCTION>PADDD</FUNCTION>
- <FUNCTION>PADDSB</FUNCTION>
- <FUNCTION>PADDSW</FUNCTION>
- <FUNCTION>PADDUSB</FUNCTION>
- <FUNCTION>PADDUSW</FUNCTION>
- <FUNCTION>PADDW</FUNCTION>
- <FUNCTION>PAND</FUNCTION>
- <FUNCTION>PANDN</FUNCTION>
- <FUNCTION>PAVGB</FUNCTION>
- <FUNCTION>PAVGW</FUNCTION>
- <FUNCTION>PCMPEQB</FUNCTION>
- <FUNCTION>PCMPEQD</FUNCTION>
- <FUNCTION>PCMPEQW</FUNCTION>
- <FUNCTION>PCMPGTB</FUNCTION>
- <FUNCTION>PCMPGTD</FUNCTION>
- <FUNCTION>PCMPGTW</FUNCTION>
- <FUNCTION>PEXTRW</FUNCTION>
- <FUNCTION>PINSRW</FUNCTION>
- <FUNCTION>PMADDWD</FUNCTION>
- <FUNCTION>PMAXSW</FUNCTION>
- <FUNCTION>PMAXUB</FUNCTION>
- <FUNCTION>PMINSW</FUNCTION>
- <FUNCTION>PMINUB</FUNCTION>
- <FUNCTION>PMOVMSKB</FUNCTION>
- <FUNCTION>PMULHUW</FUNCTION>
- <FUNCTION>PMULHW</FUNCTION>
- <FUNCTION>PMULLW</FUNCTION>
- <FUNCTION>POP</FUNCTION>
- <FUNCTION>POPA</FUNCTION>
- <FUNCTION>POPAD</FUNCTION>
- <FUNCTION>POPAW</FUNCTION>
- <FUNCTION>POPF</FUNCTION>
- <FUNCTION>POPFD</FUNCTION>
- <FUNCTION>POPFW</FUNCTION>
- <FUNCTION>POR</FUNCTION>
- <FUNCTION>PREFETCH</FUNCTION>
- <FUNCTION>PSADBW</FUNCTION>
- <FUNCTION>PSHUFW</FUNCTION>
- <FUNCTION>PSLLD</FUNCTION>
- <FUNCTION>PSLLQ</FUNCTION>
- <FUNCTION>PSLLW</FUNCTION>
- <FUNCTION>PSRAD</FUNCTION>
- <FUNCTION>PSRAW</FUNCTION>
- <FUNCTION>PSRLD</FUNCTION>
- <FUNCTION>PSRLQ</FUNCTION>
- <FUNCTION>PSRLW</FUNCTION>
- <FUNCTION>PSUBB</FUNCTION>
- <FUNCTION>PSUBD</FUNCTION>
- <FUNCTION>PSUBSB</FUNCTION>
- <FUNCTION>PSUBSW</FUNCTION>
- <FUNCTION>PSUBUSB</FUNCTION>
- <FUNCTION>PSUBUSW</FUNCTION>
- <FUNCTION>PSUBW</FUNCTION>
- <FUNCTION>PUNPCKHBW</FUNCTION>
- <FUNCTION>PUNPCKHDQ</FUNCTION>
- <FUNCTION>PUNPCKHWD</FUNCTION>
- <FUNCTION>PUNPCKLBW</FUNCTION>
- <FUNCTION>PUNPCKLDQ</FUNCTION>
- <FUNCTION>PUNPCKLWD</FUNCTION>
- <FUNCTION>PUSH</FUNCTION>
- <FUNCTION>PUSHA</FUNCTION>
- <FUNCTION>PUSHAD</FUNCTION>
- <FUNCTION>PUSHAW</FUNCTION>
- <FUNCTION>PUSHF</FUNCTION>
- <FUNCTION>PUSHFD</FUNCTION>
- <FUNCTION>PUSHFW</FUNCTION>
- <FUNCTION>PXOR</FUNCTION>
- <FUNCTION>RCL</FUNCTION>
- <FUNCTION>RCR</FUNCTION>
- <FUNCTION>RDMSR</FUNCTION>
- <FUNCTION>RDPMC</FUNCTION>
- <FUNCTION>RDTSC</FUNCTION>
- <FUNCTION>REP</FUNCTION>
- <FUNCTION>REPE</FUNCTION>
- <FUNCTION>REPNE</FUNCTION>
- <FUNCTION>REPNZ</FUNCTION>
- <FUNCTION>REPZ</FUNCTION>
- <FUNCTION>RET</FUNCTION>
- <FUNCTION>RETF</FUNCTION>
- <FUNCTION>RETN</FUNCTION>
- <FUNCTION>ROL</FUNCTION>
- <FUNCTION>ROR</FUNCTION>
- <FUNCTION>RSM</FUNCTION>
- <FUNCTION>SAHF</FUNCTION>
- <FUNCTION>SAL</FUNCTION>
- <FUNCTION>SAR</FUNCTION>
- <FUNCTION>SBB</FUNCTION>
- <FUNCTION>SCAS</FUNCTION>
- <FUNCTION>SCASB</FUNCTION>
- <FUNCTION>SCASD</FUNCTION>
- <FUNCTION>SCASW</FUNCTION>
- <FUNCTION>SETA</FUNCTION>
- <FUNCTION>SETAE</FUNCTION>
- <FUNCTION>SETB</FUNCTION>
- <FUNCTION>SETBE</FUNCTION>
- <FUNCTION>SETC</FUNCTION>
- <FUNCTION>SETE</FUNCTION>
- <FUNCTION>SETG</FUNCTION>
- <FUNCTION>SETGE</FUNCTION>
- <FUNCTION>SETL</FUNCTION>
- <FUNCTION>SETLE</FUNCTION>
- <FUNCTION>SETNA</FUNCTION>
- <FUNCTION>SETNAE</FUNCTION>
- <FUNCTION>SETNB</FUNCTION>
- <FUNCTION>SETNBE</FUNCTION>
- <FUNCTION>SETNC</FUNCTION>
- <FUNCTION>SETNE</FUNCTION>
- <FUNCTION>SETNG</FUNCTION>
- <FUNCTION>SETNGE</FUNCTION>
- <FUNCTION>SETNL</FUNCTION>
- <FUNCTION>SETNLE</FUNCTION>
- <FUNCTION>SETNO</FUNCTION>
- <FUNCTION>SETNP</FUNCTION>
- <FUNCTION>SETNS</FUNCTION>
- <FUNCTION>SETNZ</FUNCTION>
- <FUNCTION>SETO</FUNCTION>
- <FUNCTION>SETP</FUNCTION>
- <FUNCTION>SETPE</FUNCTION>
- <FUNCTION>SETPO</FUNCTION>
- <FUNCTION>SETS</FUNCTION>
- <FUNCTION>SETZ</FUNCTION>
- <FUNCTION>SFENCE</FUNCTION>
- <FUNCTION>SGDT</FUNCTION>
- <FUNCTION>SHL</FUNCTION>
- <FUNCTION>SHLD</FUNCTION>
- <FUNCTION>SHR</FUNCTION>
- <FUNCTION>SHRD</FUNCTION>
- <FUNCTION>SHUFPS</FUNCTION>
- <FUNCTION>SIDT</FUNCTION>
- <FUNCTION>SLDT</FUNCTION>
- <FUNCTION>SMSW</FUNCTION>
- <FUNCTION>SQRTPS</FUNCTION>
- <FUNCTION>SQRTSS</FUNCTION>
- <FUNCTION>STC</FUNCTION>
- <FUNCTION>STD</FUNCTION>
- <FUNCTION>STI</FUNCTION>
- <FUNCTION>STMXCSR</FUNCTION>
- <FUNCTION>STOS</FUNCTION>
- <FUNCTION>STOSB</FUNCTION>
- <FUNCTION>STOSD</FUNCTION>
- <FUNCTION>STOSW</FUNCTION>
- <FUNCTION>STR</FUNCTION>
- <FUNCTION>SUB</FUNCTION>
- <FUNCTION>SUBPS</FUNCTION>
- <FUNCTION>SUBSS</FUNCTION>
- <FUNCTION>SYSENTER</FUNCTION>
- <FUNCTION>SYSEXIT</FUNCTION>
- <FUNCTION>TEST</FUNCTION>
- <FUNCTION>UB2</FUNCTION>
- <FUNCTION>UCOMISS</FUNCTION>
- <FUNCTION>UNPCKHPS</FUNCTION>
- <FUNCTION>UNPCKLPS</FUNCTION>
- <FUNCTION>WAIT</FUNCTION>
- <FUNCTION>WBINVD</FUNCTION>
- <FUNCTION>VERR</FUNCTION>
- <FUNCTION>VERW</FUNCTION>
- <FUNCTION>WRMSR</FUNCTION>
- <FUNCTION>XADD</FUNCTION>
- <FUNCTION>XCHG</FUNCTION>
- <FUNCTION>XLAT</FUNCTION>
- <FUNCTION>XLATB</FUNCTION>
- <FUNCTION>XOR</FUNCTION>
- <FUNCTION>XORPS</FUNCTION>
-
- <!-- Instructions: 3DNow! -->
- <FUNCTION>FEMMS</FUNCTION>
- <FUNCTION>PAVGUSB</FUNCTION>
- <FUNCTION>PF2ID</FUNCTION>
- <FUNCTION>PFACC</FUNCTION>
- <FUNCTION>PFADD</FUNCTION>
- <FUNCTION>PFCMPEQ</FUNCTION>
- <FUNCTION>PFCMPGE</FUNCTION>
- <FUNCTION>PFCMPGT</FUNCTION>
- <FUNCTION>PFMAX</FUNCTION>
- <FUNCTION>PFMIN</FUNCTION>
- <FUNCTION>PFMUL</FUNCTION>
- <FUNCTION>PFRCP</FUNCTION>
- <FUNCTION>PFRCPIT1</FUNCTION>
- <FUNCTION>PFRCPIT2</FUNCTION>
- <FUNCTION>PFRSQIT1</FUNCTION>
- <FUNCTION>PFRSQRT</FUNCTION>
- <FUNCTION>PFSUB</FUNCTION>
- <FUNCTION>PFSUBR</FUNCTION>
- <FUNCTION>PI2FD</FUNCTION>
- <FUNCTION>PMULHRW</FUNCTION>
- <FUNCTION>PREFETCHW</FUNCTION>
-
- <!-- Instructions: 3DNow! (Athlon extensions) -->
- <FUNCTION>PF2IW</FUNCTION>
- <FUNCTION>PFNACC</FUNCTION>
- <FUNCTION>PFPNACC</FUNCTION>
- <FUNCTION>PI2FW</FUNCTION>
- <FUNCTION>PSWAPD</FUNCTION>
-
- <!-- Instructions: MMX (Athlon extensions) -->
- <FUNCTION>PREFETCHNTA</FUNCTION>
- <FUNCTION>PREFETCHT0</FUNCTION>
- <FUNCTION>PREFETCHT1</FUNCTION>
- <FUNCTION>PREFETCHT2</FUNCTION>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ x86 Assembly mode by Kristian Ovaska (kristian.ovaska at helsinki.fi)
+
+ - Intel syntax
+ - Instructions and registers of Pentium III/Athlon
+ (including FPU, MMX, 3DNow! and SSE)
+ - Full NASM 0.98 & MASM 6.15 keyword support, partial TASM support
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ </PROPS>
+
+ <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE"
+ DIGIT_RE="(0x)?[\p{Digit}a-fA-F_]+[hHdD]?">
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- NASM: label inside a macro -->
+ <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">%%</MARK_FOLLOWING>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="TRUE">%</MARK_FOLLOWING>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>.186</KEYWORD1>
+ <KEYWORD1>.286</KEYWORD1>
+ <KEYWORD1>.286P</KEYWORD1>
+ <KEYWORD1>.287</KEYWORD1>
+ <KEYWORD1>.386</KEYWORD1>
+ <KEYWORD1>.386P</KEYWORD1>
+ <KEYWORD1>.387</KEYWORD1>
+ <KEYWORD1>.486</KEYWORD1>
+ <KEYWORD1>.486P</KEYWORD1>
+ <KEYWORD1>.586</KEYWORD1>
+ <KEYWORD1>.586P</KEYWORD1>
+ <KEYWORD1>.686</KEYWORD1>
+ <KEYWORD1>.686P</KEYWORD1>
+ <KEYWORD1>.8086</KEYWORD1>
+ <KEYWORD1>.8087</KEYWORD1>
+ <KEYWORD1>.ALPHA</KEYWORD1>
+ <KEYWORD1>.BREAK</KEYWORD1>
+ <KEYWORD1>.BSS</KEYWORD1>
+ <KEYWORD1>.CODE</KEYWORD1>
+ <KEYWORD1>.CONST</KEYWORD1>
+ <KEYWORD1>.CONTINUE</KEYWORD1>
+ <KEYWORD1>.CREF</KEYWORD1>
+ <KEYWORD1>.DATA</KEYWORD1>
+ <KEYWORD1>.DATA?</KEYWORD1>
+ <KEYWORD1>.DOSSEG</KEYWORD1>
+ <KEYWORD1>.ELSE</KEYWORD1>
+ <KEYWORD1>.ELSEIF</KEYWORD1>
+ <KEYWORD1>.ENDIF</KEYWORD1>
+ <KEYWORD1>.ENDW</KEYWORD1>
+ <KEYWORD1>.ERR</KEYWORD1>
+ <KEYWORD1>.ERR1</KEYWORD1>
+ <KEYWORD1>.ERR2</KEYWORD1>
+ <KEYWORD1>.ERRB</KEYWORD1>
+ <KEYWORD1>.ERRDEF</KEYWORD1>
+ <KEYWORD1>.ERRDIF</KEYWORD1>
+ <KEYWORD1>.ERRDIFI</KEYWORD1>
+ <KEYWORD1>.ERRE</KEYWORD1>
+ <KEYWORD1>.ERRIDN</KEYWORD1>
+ <KEYWORD1>.ERRIDNI</KEYWORD1>
+ <KEYWORD1>.ERRNB</KEYWORD1>
+ <KEYWORD1>.ERRNDEF</KEYWORD1>
+ <KEYWORD1>.ERRNZ</KEYWORD1>
+ <KEYWORD1>.EXIT</KEYWORD1>
+ <KEYWORD1>.FARDATA</KEYWORD1>
+ <KEYWORD1>.FARDATA?</KEYWORD1>
+ <KEYWORD1>.IF</KEYWORD1>
+ <KEYWORD1>.K3D</KEYWORD1>
+ <KEYWORD1>.LALL</KEYWORD1>
+ <KEYWORD1>.LFCOND</KEYWORD1>
+ <KEYWORD1>.LIST</KEYWORD1>
+ <KEYWORD1>.LISTALL</KEYWORD1>
+ <KEYWORD1>.LISTIF</KEYWORD1>
+ <KEYWORD1>.LISTMACRO</KEYWORD1>
+ <KEYWORD1>.LISTMACROALL</KEYWORD1>
+ <KEYWORD1>.MMX</KEYWORD1>
+ <KEYWORD1>.MODEL</KEYWORD1>
+ <KEYWORD1>.MSFLOAT</KEYWORD1>
+ <KEYWORD1>.NO87</KEYWORD1>
+ <KEYWORD1>.NOCREF</KEYWORD1>
+ <KEYWORD1>.NOLIST</KEYWORD1>
+ <KEYWORD1>.NOLISTIF</KEYWORD1>
+ <KEYWORD1>.NOLISTMACRO</KEYWORD1>
+ <KEYWORD1>.RADIX</KEYWORD1>
+ <KEYWORD1>.REPEAT</KEYWORD1>
+ <KEYWORD1>.SALL</KEYWORD1>
+ <KEYWORD1>.SEQ</KEYWORD1>
+ <KEYWORD1>.SFCOND</KEYWORD1>
+ <KEYWORD1>.STACK</KEYWORD1>
+ <KEYWORD1>.STARTUP</KEYWORD1>
+ <KEYWORD1>.TEXT</KEYWORD1>
+ <KEYWORD1>.TFCOND</KEYWORD1>
+ <KEYWORD1>.UNTIL</KEYWORD1>
+ <KEYWORD1>.UNTILCXZ</KEYWORD1>
+ <KEYWORD1>.WHILE</KEYWORD1>
+ <KEYWORD1>.XALL</KEYWORD1>
+ <KEYWORD1>.XCREF</KEYWORD1>
+ <KEYWORD1>.XLIST</KEYWORD1>
+ <KEYWORD1>.XMM</KEYWORD1>
+ <KEYWORD1>__FILE__</KEYWORD1>
+ <KEYWORD1>__LINE__</KEYWORD1>
+ <KEYWORD1>A16</KEYWORD1>
+ <KEYWORD1>A32</KEYWORD1>
+ <KEYWORD1>ADDR</KEYWORD1>
+ <KEYWORD1>ALIGN</KEYWORD1>
+ <KEYWORD1>ALIGNB</KEYWORD1>
+ <KEYWORD1>ASSUME</KEYWORD1>
+ <KEYWORD1>BITS</KEYWORD1>
+ <KEYWORD1>CARRY?</KEYWORD1>
+ <KEYWORD1>CATSTR</KEYWORD1>
+ <KEYWORD1>CODESEG</KEYWORD1>
+ <KEYWORD1>COMM</KEYWORD1>
+ <KEYWORD1>COMMENT</KEYWORD1>
+ <KEYWORD1>COMMON</KEYWORD1>
+ <KEYWORD1>DATASEG</KEYWORD1>
+ <KEYWORD1>DOSSEG</KEYWORD1>
+ <KEYWORD1>ECHO</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>ELSEIF</KEYWORD1>
+ <KEYWORD1>ELSEIF1</KEYWORD1>
+ <KEYWORD1>ELSEIF2</KEYWORD1>
+ <KEYWORD1>ELSEIFB</KEYWORD1>
+ <KEYWORD1>ELSEIFDEF</KEYWORD1>
+ <KEYWORD1>ELSEIFE</KEYWORD1>
+ <KEYWORD1>ELSEIFIDN</KEYWORD1>
+ <KEYWORD1>ELSEIFNB</KEYWORD1>
+ <KEYWORD1>ELSEIFNDEF</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>ENDIF</KEYWORD1>
+ <KEYWORD1>ENDM</KEYWORD1>
+ <KEYWORD1>ENDP</KEYWORD1>
+ <KEYWORD1>ENDS</KEYWORD1>
+ <KEYWORD1>ENDSTRUC</KEYWORD1>
+ <KEYWORD1>EVEN</KEYWORD1>
+ <KEYWORD1>EXITM</KEYWORD1>
+ <KEYWORD1>EXPORT</KEYWORD1>
+ <KEYWORD1>EXTERN</KEYWORD1>
+ <KEYWORD1>EXTERNDEF</KEYWORD1>
+ <KEYWORD1>EXTRN</KEYWORD1>
+ <KEYWORD1>FAR</KEYWORD1>
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>FORC</KEYWORD1>
+ <KEYWORD1>GLOBAL</KEYWORD1>
+ <KEYWORD1>GOTO</KEYWORD1>
+ <KEYWORD1>GROUP</KEYWORD1>
+ <KEYWORD1>HIGH</KEYWORD1>
+ <KEYWORD1>HIGHWORD</KEYWORD1>
+ <KEYWORD1>IEND</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>IF1</KEYWORD1>
+ <KEYWORD1>IF2</KEYWORD1>
+ <KEYWORD1>IFB</KEYWORD1>
+ <KEYWORD1>IFDEF</KEYWORD1>
+ <KEYWORD1>IFDIF</KEYWORD1>
+ <KEYWORD1>IFDIFI</KEYWORD1>
+ <KEYWORD1>IFE</KEYWORD1>
+ <KEYWORD1>IFIDN</KEYWORD1>
+ <KEYWORD1>IFIDNI</KEYWORD1>
+ <KEYWORD1>IFNB</KEYWORD1>
+ <KEYWORD1>IFNDEF</KEYWORD1>
+ <KEYWORD1>IMPORT</KEYWORD1>
+ <KEYWORD1>INCBIN</KEYWORD1>
+ <KEYWORD1>INCLUDE</KEYWORD1>
+ <KEYWORD1>INCLUDELIB</KEYWORD1>
+ <KEYWORD1>INSTR</KEYWORD1>
+ <KEYWORD1>INVOKE</KEYWORD1>
+ <KEYWORD1>IRP</KEYWORD1>
+ <KEYWORD1>IRPC</KEYWORD1>
+ <KEYWORD1>ISTRUC</KEYWORD1>
+ <KEYWORD1>LABEL</KEYWORD1>
+ <KEYWORD1>LENGTH</KEYWORD1>
+ <KEYWORD1>LENGTHOF</KEYWORD1>
+ <KEYWORD1>LOCAL</KEYWORD1>
+ <KEYWORD1>LOW</KEYWORD1>
+ <KEYWORD1>LOWWORD</KEYWORD1>
+ <KEYWORD1>LROFFSET</KEYWORD1>
+ <KEYWORD1>MACRO</KEYWORD1>
+ <KEYWORD1>NAME</KEYWORD1>
+ <KEYWORD1>NEAR</KEYWORD1>
+ <KEYWORD1>NOSPLIT</KEYWORD1>
+ <KEYWORD1>O16</KEYWORD1>
+ <KEYWORD1>O32</KEYWORD1>
+ <KEYWORD1>OFFSET</KEYWORD1>
+ <KEYWORD1>OPATTR</KEYWORD1>
+ <KEYWORD1>OPTION</KEYWORD1>
+ <KEYWORD1>ORG</KEYWORD1>
+ <KEYWORD1>OVERFLOW?</KEYWORD1>
+ <KEYWORD1>PAGE</KEYWORD1>
+ <KEYWORD1>PARITY?</KEYWORD1>
+ <KEYWORD1>POPCONTEXT</KEYWORD1>
+ <KEYWORD1>PRIVATE</KEYWORD1>
+ <KEYWORD1>PROC</KEYWORD1>
+ <KEYWORD1>PROTO</KEYWORD1>
+ <KEYWORD1>PTR</KEYWORD1>
+ <KEYWORD1>PUBLIC</KEYWORD1>
+ <KEYWORD1>PURGE</KEYWORD1>
+ <KEYWORD1>PUSHCONTEXT</KEYWORD1>
+ <KEYWORD1>RECORD</KEYWORD1>
+ <KEYWORD1>REPEAT</KEYWORD1>
+ <KEYWORD1>REPT</KEYWORD1>
+ <KEYWORD1>SECTION</KEYWORD1>
+ <KEYWORD1>SEG</KEYWORD1>
+ <KEYWORD1>SEGMENT</KEYWORD1>
+ <KEYWORD1>SHORT</KEYWORD1>
+ <KEYWORD1>SIGN?</KEYWORD1>
+ <KEYWORD1>SIZE</KEYWORD1>
+ <KEYWORD1>SIZEOF</KEYWORD1>
+ <KEYWORD1>SIZESTR</KEYWORD1>
+ <KEYWORD1>STACK</KEYWORD1>
+ <KEYWORD1>STRUC</KEYWORD1>
+ <KEYWORD1>STRUCT</KEYWORD1>
+ <KEYWORD1>SUBSTR</KEYWORD1>
+ <KEYWORD1>SUBTITLE</KEYWORD1>
+ <KEYWORD1>SUBTTL</KEYWORD1>
+ <KEYWORD1>THIS</KEYWORD1>
+ <KEYWORD1>TITLE</KEYWORD1>
+ <KEYWORD1>TYPE</KEYWORD1>
+ <KEYWORD1>TYPEDEF</KEYWORD1>
+ <KEYWORD1>UNION</KEYWORD1>
+ <KEYWORD1>USE16</KEYWORD1>
+ <KEYWORD1>USE32</KEYWORD1>
+ <KEYWORD1>USES</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+ <KEYWORD1>WRT</KEYWORD1>
+ <KEYWORD1>ZERO?</KEYWORD1>
+
+ <KEYWORD2>DB</KEYWORD2>
+ <KEYWORD2>DW</KEYWORD2>
+ <KEYWORD2>DD</KEYWORD2>
+ <KEYWORD2>DF</KEYWORD2>
+ <KEYWORD2>DQ</KEYWORD2>
+ <KEYWORD2>DT</KEYWORD2>
+ <KEYWORD2>RESB</KEYWORD2>
+ <KEYWORD2>RESW</KEYWORD2>
+ <KEYWORD2>RESD</KEYWORD2>
+ <KEYWORD2>RESQ</KEYWORD2>
+ <KEYWORD2>REST</KEYWORD2>
+ <KEYWORD2>EQU</KEYWORD2>
+ <KEYWORD2>TEXTEQU</KEYWORD2>
+ <KEYWORD2>TIMES</KEYWORD2>
+ <KEYWORD2>DUP</KEYWORD2>
+
+ <KEYWORD2>BYTE</KEYWORD2>
+ <KEYWORD2>WORD</KEYWORD2>
+ <KEYWORD2>DWORD</KEYWORD2>
+ <KEYWORD2>FWORD</KEYWORD2>
+ <KEYWORD2>QWORD</KEYWORD2>
+ <KEYWORD2>TBYTE</KEYWORD2>
+ <KEYWORD2>SBYTE</KEYWORD2>
+ <KEYWORD2>TWORD</KEYWORD2>
+ <KEYWORD2>SWORD</KEYWORD2>
+ <KEYWORD2>SDWORD</KEYWORD2>
+ <KEYWORD2>REAL4</KEYWORD2>
+ <KEYWORD2>REAL8</KEYWORD2>
+ <KEYWORD2>REAL10</KEYWORD2>
+
+ <!-- Registers -->
+ <KEYWORD3>AL</KEYWORD3>
+ <KEYWORD3>BL</KEYWORD3>
+ <KEYWORD3>CL</KEYWORD3>
+ <KEYWORD3>DL</KEYWORD3>
+ <KEYWORD3>AH</KEYWORD3>
+ <KEYWORD3>BH</KEYWORD3>
+ <KEYWORD3>CH</KEYWORD3>
+ <KEYWORD3>DH</KEYWORD3>
+ <KEYWORD3>AX</KEYWORD3>
+ <KEYWORD3>BX</KEYWORD3>
+ <KEYWORD3>CX</KEYWORD3>
+ <KEYWORD3>DX</KEYWORD3>
+ <KEYWORD3>SI</KEYWORD3>
+ <KEYWORD3>DI</KEYWORD3>
+ <KEYWORD3>SP</KEYWORD3>
+ <KEYWORD3>BP</KEYWORD3>
+ <KEYWORD3>EAX</KEYWORD3>
+ <KEYWORD3>EBX</KEYWORD3>
+ <KEYWORD3>ECX</KEYWORD3>
+ <KEYWORD3>EDX</KEYWORD3>
+ <KEYWORD3>ESI</KEYWORD3>
+ <KEYWORD3>EDI</KEYWORD3>
+ <KEYWORD3>ESP</KEYWORD3>
+ <KEYWORD3>EBP</KEYWORD3>
+ <KEYWORD3>CS</KEYWORD3>
+ <KEYWORD3>DS</KEYWORD3>
+ <KEYWORD3>SS</KEYWORD3>
+ <KEYWORD3>ES</KEYWORD3>
+ <KEYWORD3>FS</KEYWORD3>
+ <KEYWORD3>GS</KEYWORD3>
+ <KEYWORD3>ST</KEYWORD3>
+ <KEYWORD3>ST0</KEYWORD3>
+ <KEYWORD3>ST1</KEYWORD3>
+ <KEYWORD3>ST2</KEYWORD3>
+ <KEYWORD3>ST3</KEYWORD3>
+ <KEYWORD3>ST4</KEYWORD3>
+ <KEYWORD3>ST5</KEYWORD3>
+ <KEYWORD3>ST6</KEYWORD3>
+ <KEYWORD3>ST7</KEYWORD3>
+ <KEYWORD3>MM0</KEYWORD3>
+ <KEYWORD3>MM1</KEYWORD3>
+ <KEYWORD3>MM2</KEYWORD3>
+ <KEYWORD3>MM3</KEYWORD3>
+ <KEYWORD3>MM4</KEYWORD3>
+ <KEYWORD3>MM5</KEYWORD3>
+ <KEYWORD3>MM6</KEYWORD3>
+ <KEYWORD3>MM7</KEYWORD3>
+ <KEYWORD3>XMM0</KEYWORD3>
+ <KEYWORD3>XMM1</KEYWORD3>
+ <KEYWORD3>XMM2</KEYWORD3>
+ <KEYWORD3>XMM3</KEYWORD3>
+ <KEYWORD3>XMM4</KEYWORD3>
+ <KEYWORD3>XMM5</KEYWORD3>
+ <KEYWORD3>XMM6</KEYWORD3>
+ <KEYWORD3>XMM7</KEYWORD3>
+ <KEYWORD3>CR0</KEYWORD3>
+ <KEYWORD3>CR2</KEYWORD3>
+ <KEYWORD3>CR3</KEYWORD3>
+ <KEYWORD3>CR4</KEYWORD3>
+ <KEYWORD3>DR0</KEYWORD3>
+ <KEYWORD3>DR1</KEYWORD3>
+ <KEYWORD3>DR2</KEYWORD3>
+ <KEYWORD3>DR3</KEYWORD3>
+ <KEYWORD3>DR4</KEYWORD3>
+ <KEYWORD3>DR5</KEYWORD3>
+ <KEYWORD3>DR6</KEYWORD3>
+ <KEYWORD3>DR7</KEYWORD3>
+ <KEYWORD3>TR3</KEYWORD3>
+ <KEYWORD3>TR4</KEYWORD3>
+ <KEYWORD3>TR5</KEYWORD3>
+ <KEYWORD3>TR6</KEYWORD3>
+ <KEYWORD3>TR7</KEYWORD3>
+
+ <!-- Instructions: Pentium III/MMX/SSE -->
+ <FUNCTION>AAA</FUNCTION>
+ <FUNCTION>AAD</FUNCTION>
+ <FUNCTION>AAM</FUNCTION>
+ <FUNCTION>AAS</FUNCTION>
+ <FUNCTION>ADC</FUNCTION>
+ <FUNCTION>ADD</FUNCTION>
+ <FUNCTION>ADDPS</FUNCTION>
+ <FUNCTION>ADDSS</FUNCTION>
+ <FUNCTION>AND</FUNCTION>
+ <FUNCTION>ANDNPS</FUNCTION>
+ <FUNCTION>ANDPS</FUNCTION>
+ <FUNCTION>ARPL</FUNCTION>
+ <FUNCTION>BOUND</FUNCTION>
+ <FUNCTION>BSF</FUNCTION>
+ <FUNCTION>BSR</FUNCTION>
+ <FUNCTION>BSWAP</FUNCTION>
+ <FUNCTION>BT</FUNCTION>
+ <FUNCTION>BTC</FUNCTION>
+ <FUNCTION>BTR</FUNCTION>
+ <FUNCTION>BTS</FUNCTION>
+ <FUNCTION>CALL</FUNCTION>
+ <FUNCTION>CBW</FUNCTION>
+ <FUNCTION>CDQ</FUNCTION>
+ <FUNCTION>CLC</FUNCTION>
+ <FUNCTION>CLD</FUNCTION>
+ <FUNCTION>CLI</FUNCTION>
+ <FUNCTION>CLTS</FUNCTION>
+ <FUNCTION>CMC</FUNCTION>
+ <FUNCTION>CMOVA</FUNCTION>
+ <FUNCTION>CMOVAE</FUNCTION>
+ <FUNCTION>CMOVB</FUNCTION>
+ <FUNCTION>CMOVBE</FUNCTION>
+ <FUNCTION>CMOVC</FUNCTION>
+ <FUNCTION>CMOVE</FUNCTION>
+ <FUNCTION>CMOVG</FUNCTION>
+ <FUNCTION>CMOVGE</FUNCTION>
+ <FUNCTION>CMOVL</FUNCTION>
+ <FUNCTION>CMOVLE</FUNCTION>
+ <FUNCTION>CMOVNA</FUNCTION>
+ <FUNCTION>CMOVNAE</FUNCTION>
+ <FUNCTION>CMOVNB</FUNCTION>
+ <FUNCTION>CMOVNBE</FUNCTION>
+ <FUNCTION>CMOVNC</FUNCTION>
+ <FUNCTION>CMOVNE</FUNCTION>
+ <FUNCTION>CMOVNG</FUNCTION>
+ <FUNCTION>CMOVNGE</FUNCTION>
+ <FUNCTION>CMOVNL</FUNCTION>
+ <FUNCTION>CMOVNLE</FUNCTION>
+ <FUNCTION>CMOVNO</FUNCTION>
+ <FUNCTION>CMOVNP</FUNCTION>
+ <FUNCTION>CMOVNS</FUNCTION>
+ <FUNCTION>CMOVNZ</FUNCTION>
+ <FUNCTION>CMOVO</FUNCTION>
+ <FUNCTION>CMOVP</FUNCTION>
+ <FUNCTION>CMOVPE</FUNCTION>
+ <FUNCTION>CMOVPO</FUNCTION>
+ <FUNCTION>CMOVS</FUNCTION>
+ <FUNCTION>CMOVZ</FUNCTION>
+ <FUNCTION>CMP</FUNCTION>
+ <FUNCTION>CMPPS</FUNCTION>
+ <FUNCTION>CMPS</FUNCTION>
+ <FUNCTION>CMPSB</FUNCTION>
+ <FUNCTION>CMPSD</FUNCTION>
+ <FUNCTION>CMPSS</FUNCTION>
+ <FUNCTION>CMPSW</FUNCTION>
+ <FUNCTION>CMPXCHG</FUNCTION>
+ <FUNCTION>CMPXCHGB</FUNCTION>
+ <FUNCTION>COMISS</FUNCTION>
+ <FUNCTION>CPUID</FUNCTION>
+ <FUNCTION>CWD</FUNCTION>
+ <FUNCTION>CWDE</FUNCTION>
+ <FUNCTION>CVTPI2PS</FUNCTION>
+ <FUNCTION>CVTPS2PI</FUNCTION>
+ <FUNCTION>CVTSI2SS</FUNCTION>
+ <FUNCTION>CVTSS2SI</FUNCTION>
+ <FUNCTION>CVTTPS2PI</FUNCTION>
+ <FUNCTION>CVTTSS2SI</FUNCTION>
+ <FUNCTION>DAA</FUNCTION>
+ <FUNCTION>DAS</FUNCTION>
+ <FUNCTION>DEC</FUNCTION>
+ <FUNCTION>DIV</FUNCTION>
+ <FUNCTION>DIVPS</FUNCTION>
+ <FUNCTION>DIVSS</FUNCTION>
+ <FUNCTION>EMMS</FUNCTION>
+ <FUNCTION>ENTER</FUNCTION>
+ <FUNCTION>F2XM1</FUNCTION>
+ <FUNCTION>FABS</FUNCTION>
+ <FUNCTION>FADD</FUNCTION>
+ <FUNCTION>FADDP</FUNCTION>
+ <FUNCTION>FBLD</FUNCTION>
+ <FUNCTION>FBSTP</FUNCTION>
+ <FUNCTION>FCHS</FUNCTION>
+ <FUNCTION>FCLEX</FUNCTION>
+ <FUNCTION>FCMOVB</FUNCTION>
+ <FUNCTION>FCMOVBE</FUNCTION>
+ <FUNCTION>FCMOVE</FUNCTION>
+ <FUNCTION>FCMOVNB</FUNCTION>
+ <FUNCTION>FCMOVNBE</FUNCTION>
+ <FUNCTION>FCMOVNE</FUNCTION>
+ <FUNCTION>FCMOVNU</FUNCTION>
+ <FUNCTION>FCMOVU</FUNCTION>
+ <FUNCTION>FCOM</FUNCTION>
+ <FUNCTION>FCOMI</FUNCTION>
+ <FUNCTION>FCOMIP</FUNCTION>
+ <FUNCTION>FCOMP</FUNCTION>
+ <FUNCTION>FCOMPP</FUNCTION>
+ <FUNCTION>FCOS</FUNCTION>
+ <FUNCTION>FDECSTP</FUNCTION>
+ <FUNCTION>FDIV</FUNCTION>
+ <FUNCTION>FDIVP</FUNCTION>
+ <FUNCTION>FDIVR</FUNCTION>
+ <FUNCTION>FDIVRP</FUNCTION>
+ <FUNCTION>FFREE</FUNCTION>
+ <FUNCTION>FIADD</FUNCTION>
+ <FUNCTION>FICOM</FUNCTION>
+ <FUNCTION>FICOMP</FUNCTION>
+ <FUNCTION>FIDIV</FUNCTION>
+ <FUNCTION>FIDIVR</FUNCTION>
+ <FUNCTION>FILD</FUNCTION>
+ <FUNCTION>FIMUL</FUNCTION>
+ <FUNCTION>FINCSTP</FUNCTION>
+ <FUNCTION>FINIT</FUNCTION>
+ <FUNCTION>FIST</FUNCTION>
+ <FUNCTION>FISTP</FUNCTION>
+ <FUNCTION>FISUB</FUNCTION>
+ <FUNCTION>FISUBR</FUNCTION>
+ <FUNCTION>FLD1</FUNCTION>
+ <FUNCTION>FLDCW</FUNCTION>
+ <FUNCTION>FLDENV</FUNCTION>
+ <FUNCTION>FLDL2E</FUNCTION>
+ <FUNCTION>FLDL2T</FUNCTION>
+ <FUNCTION>FLDLG2</FUNCTION>
+ <FUNCTION>FLDLN2</FUNCTION>
+ <FUNCTION>FLDPI</FUNCTION>
+ <FUNCTION>FLDZ</FUNCTION>
+ <FUNCTION>FMUL</FUNCTION>
+ <FUNCTION>FMULP</FUNCTION>
+ <FUNCTION>FNCLEX</FUNCTION>
+ <FUNCTION>FNINIT</FUNCTION>
+ <FUNCTION>FNOP</FUNCTION>
+ <FUNCTION>FNSAVE</FUNCTION>
+ <FUNCTION>FNSTCW</FUNCTION>
+ <FUNCTION>FNSTENV</FUNCTION>
+ <FUNCTION>FNSTSW</FUNCTION>
+ <FUNCTION>FPATAN</FUNCTION>
+ <FUNCTION>FPREM</FUNCTION>
+ <FUNCTION>FPREMI</FUNCTION>
+ <FUNCTION>FPTAN</FUNCTION>
+ <FUNCTION>FRNDINT</FUNCTION>
+ <FUNCTION>FRSTOR</FUNCTION>
+ <FUNCTION>FSAVE</FUNCTION>
+ <FUNCTION>FSCALE</FUNCTION>
+ <FUNCTION>FSIN</FUNCTION>
+ <FUNCTION>FSINCOS</FUNCTION>
+ <FUNCTION>FSQRT</FUNCTION>
+ <FUNCTION>FST</FUNCTION>
+ <FUNCTION>FSTCW</FUNCTION>
+ <FUNCTION>FSTENV</FUNCTION>
+ <FUNCTION>FSTP</FUNCTION>
+ <FUNCTION>FSTSW</FUNCTION>
+ <FUNCTION>FSUB</FUNCTION>
+ <FUNCTION>FSUBP</FUNCTION>
+ <FUNCTION>FSUBR</FUNCTION>
+ <FUNCTION>FSUBRP</FUNCTION>
+ <FUNCTION>FTST</FUNCTION>
+ <FUNCTION>FUCOM</FUNCTION>
+ <FUNCTION>FUCOMI</FUNCTION>
+ <FUNCTION>FUCOMIP</FUNCTION>
+ <FUNCTION>FUCOMP</FUNCTION>
+ <FUNCTION>FUCOMPP</FUNCTION>
+ <FUNCTION>FWAIT</FUNCTION>
+ <FUNCTION>FXAM</FUNCTION>
+ <FUNCTION>FXCH</FUNCTION>
+ <FUNCTION>FXRSTOR</FUNCTION>
+ <FUNCTION>FXSAVE</FUNCTION>
+ <FUNCTION>FXTRACT</FUNCTION>
+ <FUNCTION>FYL2X</FUNCTION>
+ <FUNCTION>FYL2XP1</FUNCTION>
+ <FUNCTION>HLT</FUNCTION>
+ <FUNCTION>IDIV</FUNCTION>
+ <FUNCTION>IMUL</FUNCTION>
+ <FUNCTION>IN</FUNCTION>
+ <FUNCTION>INC</FUNCTION>
+ <FUNCTION>INS</FUNCTION>
+ <FUNCTION>INSB</FUNCTION>
+ <FUNCTION>INSD</FUNCTION>
+ <FUNCTION>INSW</FUNCTION>
+ <FUNCTION>INT</FUNCTION>
+ <FUNCTION>INTO</FUNCTION>
+ <FUNCTION>INVD</FUNCTION>
+ <FUNCTION>INVLPG</FUNCTION>
+ <FUNCTION>IRET</FUNCTION>
+ <FUNCTION>JA</FUNCTION>
+ <FUNCTION>JAE</FUNCTION>
+ <FUNCTION>JB</FUNCTION>
+ <FUNCTION>JBE</FUNCTION>
+ <FUNCTION>JC</FUNCTION>
+ <FUNCTION>JCXZ</FUNCTION>
+ <FUNCTION>JE</FUNCTION>
+ <FUNCTION>JECXZ</FUNCTION>
+ <FUNCTION>JG</FUNCTION>
+ <FUNCTION>JGE</FUNCTION>
+ <FUNCTION>JL</FUNCTION>
+ <FUNCTION>JLE</FUNCTION>
+ <FUNCTION>JMP</FUNCTION>
+ <FUNCTION>JNA</FUNCTION>
+ <FUNCTION>JNAE</FUNCTION>
+ <FUNCTION>JNB</FUNCTION>
+ <FUNCTION>JNBE</FUNCTION>
+ <FUNCTION>JNC</FUNCTION>
+ <FUNCTION>JNE</FUNCTION>
+ <FUNCTION>JNG</FUNCTION>
+ <FUNCTION>JNGE</FUNCTION>
+ <FUNCTION>JNL</FUNCTION>
+ <FUNCTION>JNLE</FUNCTION>
+ <FUNCTION>JNO</FUNCTION>
+ <FUNCTION>JNP</FUNCTION>
+ <FUNCTION>JNS</FUNCTION>
+ <FUNCTION>JNZ</FUNCTION>
+ <FUNCTION>JO</FUNCTION>
+ <FUNCTION>JP</FUNCTION>
+ <FUNCTION>JPE</FUNCTION>
+ <FUNCTION>JPO</FUNCTION>
+ <FUNCTION>JS</FUNCTION>
+ <FUNCTION>JZ</FUNCTION>
+ <FUNCTION>LAHF</FUNCTION>
+ <FUNCTION>LAR</FUNCTION>
+ <FUNCTION>LDMXCSR</FUNCTION>
+ <FUNCTION>LDS</FUNCTION>
+ <FUNCTION>LEA</FUNCTION>
+ <FUNCTION>LEAVE</FUNCTION>
+ <FUNCTION>LES</FUNCTION>
+ <FUNCTION>LFS</FUNCTION>
+ <FUNCTION>LGDT</FUNCTION>
+ <FUNCTION>LGS</FUNCTION>
+ <FUNCTION>LIDT</FUNCTION>
+ <FUNCTION>LLDT</FUNCTION>
+ <FUNCTION>LMSW</FUNCTION>
+ <FUNCTION>LOCK</FUNCTION>
+ <FUNCTION>LODS</FUNCTION>
+ <FUNCTION>LODSB</FUNCTION>
+ <FUNCTION>LODSD</FUNCTION>
+ <FUNCTION>LODSW</FUNCTION>
+ <FUNCTION>LOOP</FUNCTION>
+ <FUNCTION>LOOPE</FUNCTION>
+ <FUNCTION>LOOPNE</FUNCTION>
+ <FUNCTION>LOOPNZ</FUNCTION>
+ <FUNCTION>LOOPZ</FUNCTION>
+ <FUNCTION>LSL</FUNCTION>
+ <FUNCTION>LSS</FUNCTION>
+ <FUNCTION>LTR</FUNCTION>
+ <FUNCTION>MASKMOVQ</FUNCTION>
+ <FUNCTION>MAXPS</FUNCTION>
+ <FUNCTION>MAXSS</FUNCTION>
+ <FUNCTION>MINPS</FUNCTION>
+ <FUNCTION>MINSS</FUNCTION>
+ <FUNCTION>MOV</FUNCTION>
+ <FUNCTION>MOVAPS</FUNCTION>
+ <FUNCTION>MOVD</FUNCTION>
+ <FUNCTION>MOVHLPS</FUNCTION>
+ <FUNCTION>MOVHPS</FUNCTION>
+ <FUNCTION>MOVLHPS</FUNCTION>
+ <FUNCTION>MOVLPS</FUNCTION>
+ <FUNCTION>MOVMSKPS</FUNCTION>
+ <FUNCTION>MOVNTPS</FUNCTION>
+ <FUNCTION>MOVNTQ</FUNCTION>
+ <FUNCTION>MOVQ</FUNCTION>
+ <FUNCTION>MOVS</FUNCTION>
+ <FUNCTION>MOVSB</FUNCTION>
+ <FUNCTION>MOVSD</FUNCTION>
+ <FUNCTION>MOVSS</FUNCTION>
+ <FUNCTION>MOVSW</FUNCTION>
+ <FUNCTION>MOVSX</FUNCTION>
+ <FUNCTION>MOVUPS</FUNCTION>
+ <FUNCTION>MOVZX</FUNCTION>
+ <FUNCTION>MUL</FUNCTION>
+ <FUNCTION>MULPS</FUNCTION>
+ <FUNCTION>MULSS</FUNCTION>
+ <FUNCTION>NEG</FUNCTION>
+ <FUNCTION>NOP</FUNCTION>
+ <FUNCTION>NOT</FUNCTION>
+ <FUNCTION>OR</FUNCTION>
+ <FUNCTION>ORPS</FUNCTION>
+ <FUNCTION>OUT</FUNCTION>
+ <FUNCTION>OUTS</FUNCTION>
+ <FUNCTION>OUTSB</FUNCTION>
+ <FUNCTION>OUTSD</FUNCTION>
+ <FUNCTION>OUTSW</FUNCTION>
+ <FUNCTION>PACKSSDW</FUNCTION>
+ <FUNCTION>PACKSSWB</FUNCTION>
+ <FUNCTION>PACKUSWB</FUNCTION>
+ <FUNCTION>PADDB</FUNCTION>
+ <FUNCTION>PADDD</FUNCTION>
+ <FUNCTION>PADDSB</FUNCTION>
+ <FUNCTION>PADDSW</FUNCTION>
+ <FUNCTION>PADDUSB</FUNCTION>
+ <FUNCTION>PADDUSW</FUNCTION>
+ <FUNCTION>PADDW</FUNCTION>
+ <FUNCTION>PAND</FUNCTION>
+ <FUNCTION>PANDN</FUNCTION>
+ <FUNCTION>PAVGB</FUNCTION>
+ <FUNCTION>PAVGW</FUNCTION>
+ <FUNCTION>PCMPEQB</FUNCTION>
+ <FUNCTION>PCMPEQD</FUNCTION>
+ <FUNCTION>PCMPEQW</FUNCTION>
+ <FUNCTION>PCMPGTB</FUNCTION>
+ <FUNCTION>PCMPGTD</FUNCTION>
+ <FUNCTION>PCMPGTW</FUNCTION>
+ <FUNCTION>PEXTRW</FUNCTION>
+ <FUNCTION>PINSRW</FUNCTION>
+ <FUNCTION>PMADDWD</FUNCTION>
+ <FUNCTION>PMAXSW</FUNCTION>
+ <FUNCTION>PMAXUB</FUNCTION>
+ <FUNCTION>PMINSW</FUNCTION>
+ <FUNCTION>PMINUB</FUNCTION>
+ <FUNCTION>PMOVMSKB</FUNCTION>
+ <FUNCTION>PMULHUW</FUNCTION>
+ <FUNCTION>PMULHW</FUNCTION>
+ <FUNCTION>PMULLW</FUNCTION>
+ <FUNCTION>POP</FUNCTION>
+ <FUNCTION>POPA</FUNCTION>
+ <FUNCTION>POPAD</FUNCTION>
+ <FUNCTION>POPAW</FUNCTION>
+ <FUNCTION>POPF</FUNCTION>
+ <FUNCTION>POPFD</FUNCTION>
+ <FUNCTION>POPFW</FUNCTION>
+ <FUNCTION>POR</FUNCTION>
+ <FUNCTION>PREFETCH</FUNCTION>
+ <FUNCTION>PSADBW</FUNCTION>
+ <FUNCTION>PSHUFW</FUNCTION>
+ <FUNCTION>PSLLD</FUNCTION>
+ <FUNCTION>PSLLQ</FUNCTION>
+ <FUNCTION>PSLLW</FUNCTION>
+ <FUNCTION>PSRAD</FUNCTION>
+ <FUNCTION>PSRAW</FUNCTION>
+ <FUNCTION>PSRLD</FUNCTION>
+ <FUNCTION>PSRLQ</FUNCTION>
+ <FUNCTION>PSRLW</FUNCTION>
+ <FUNCTION>PSUBB</FUNCTION>
+ <FUNCTION>PSUBD</FUNCTION>
+ <FUNCTION>PSUBSB</FUNCTION>
+ <FUNCTION>PSUBSW</FUNCTION>
+ <FUNCTION>PSUBUSB</FUNCTION>
+ <FUNCTION>PSUBUSW</FUNCTION>
+ <FUNCTION>PSUBW</FUNCTION>
+ <FUNCTION>PUNPCKHBW</FUNCTION>
+ <FUNCTION>PUNPCKHDQ</FUNCTION>
+ <FUNCTION>PUNPCKHWD</FUNCTION>
+ <FUNCTION>PUNPCKLBW</FUNCTION>
+ <FUNCTION>PUNPCKLDQ</FUNCTION>
+ <FUNCTION>PUNPCKLWD</FUNCTION>
+ <FUNCTION>PUSH</FUNCTION>
+ <FUNCTION>PUSHA</FUNCTION>
+ <FUNCTION>PUSHAD</FUNCTION>
+ <FUNCTION>PUSHAW</FUNCTION>
+ <FUNCTION>PUSHF</FUNCTION>
+ <FUNCTION>PUSHFD</FUNCTION>
+ <FUNCTION>PUSHFW</FUNCTION>
+ <FUNCTION>PXOR</FUNCTION>
+ <FUNCTION>RCL</FUNCTION>
+ <FUNCTION>RCR</FUNCTION>
+ <FUNCTION>RDMSR</FUNCTION>
+ <FUNCTION>RDPMC</FUNCTION>
+ <FUNCTION>RDTSC</FUNCTION>
+ <FUNCTION>REP</FUNCTION>
+ <FUNCTION>REPE</FUNCTION>
+ <FUNCTION>REPNE</FUNCTION>
+ <FUNCTION>REPNZ</FUNCTION>
+ <FUNCTION>REPZ</FUNCTION>
+ <FUNCTION>RET</FUNCTION>
+ <FUNCTION>RETF</FUNCTION>
+ <FUNCTION>RETN</FUNCTION>
+ <FUNCTION>ROL</FUNCTION>
+ <FUNCTION>ROR</FUNCTION>
+ <FUNCTION>RSM</FUNCTION>
+ <FUNCTION>SAHF</FUNCTION>
+ <FUNCTION>SAL</FUNCTION>
+ <FUNCTION>SAR</FUNCTION>
+ <FUNCTION>SBB</FUNCTION>
+ <FUNCTION>SCAS</FUNCTION>
+ <FUNCTION>SCASB</FUNCTION>
+ <FUNCTION>SCASD</FUNCTION>
+ <FUNCTION>SCASW</FUNCTION>
+ <FUNCTION>SETA</FUNCTION>
+ <FUNCTION>SETAE</FUNCTION>
+ <FUNCTION>SETB</FUNCTION>
+ <FUNCTION>SETBE</FUNCTION>
+ <FUNCTION>SETC</FUNCTION>
+ <FUNCTION>SETE</FUNCTION>
+ <FUNCTION>SETG</FUNCTION>
+ <FUNCTION>SETGE</FUNCTION>
+ <FUNCTION>SETL</FUNCTION>
+ <FUNCTION>SETLE</FUNCTION>
+ <FUNCTION>SETNA</FUNCTION>
+ <FUNCTION>SETNAE</FUNCTION>
+ <FUNCTION>SETNB</FUNCTION>
+ <FUNCTION>SETNBE</FUNCTION>
+ <FUNCTION>SETNC</FUNCTION>
+ <FUNCTION>SETNE</FUNCTION>
+ <FUNCTION>SETNG</FUNCTION>
+ <FUNCTION>SETNGE</FUNCTION>
+ <FUNCTION>SETNL</FUNCTION>
+ <FUNCTION>SETNLE</FUNCTION>
+ <FUNCTION>SETNO</FUNCTION>
+ <FUNCTION>SETNP</FUNCTION>
+ <FUNCTION>SETNS</FUNCTION>
+ <FUNCTION>SETNZ</FUNCTION>
+ <FUNCTION>SETO</FUNCTION>
+ <FUNCTION>SETP</FUNCTION>
+ <FUNCTION>SETPE</FUNCTION>
+ <FUNCTION>SETPO</FUNCTION>
+ <FUNCTION>SETS</FUNCTION>
+ <FUNCTION>SETZ</FUNCTION>
+ <FUNCTION>SFENCE</FUNCTION>
+ <FUNCTION>SGDT</FUNCTION>
+ <FUNCTION>SHL</FUNCTION>
+ <FUNCTION>SHLD</FUNCTION>
+ <FUNCTION>SHR</FUNCTION>
+ <FUNCTION>SHRD</FUNCTION>
+ <FUNCTION>SHUFPS</FUNCTION>
+ <FUNCTION>SIDT</FUNCTION>
+ <FUNCTION>SLDT</FUNCTION>
+ <FUNCTION>SMSW</FUNCTION>
+ <FUNCTION>SQRTPS</FUNCTION>
+ <FUNCTION>SQRTSS</FUNCTION>
+ <FUNCTION>STC</FUNCTION>
+ <FUNCTION>STD</FUNCTION>
+ <FUNCTION>STI</FUNCTION>
+ <FUNCTION>STMXCSR</FUNCTION>
+ <FUNCTION>STOS</FUNCTION>
+ <FUNCTION>STOSB</FUNCTION>
+ <FUNCTION>STOSD</FUNCTION>
+ <FUNCTION>STOSW</FUNCTION>
+ <FUNCTION>STR</FUNCTION>
+ <FUNCTION>SUB</FUNCTION>
+ <FUNCTION>SUBPS</FUNCTION>
+ <FUNCTION>SUBSS</FUNCTION>
+ <FUNCTION>SYSENTER</FUNCTION>
+ <FUNCTION>SYSEXIT</FUNCTION>
+ <FUNCTION>TEST</FUNCTION>
+ <FUNCTION>UB2</FUNCTION>
+ <FUNCTION>UCOMISS</FUNCTION>
+ <FUNCTION>UNPCKHPS</FUNCTION>
+ <FUNCTION>UNPCKLPS</FUNCTION>
+ <FUNCTION>WAIT</FUNCTION>
+ <FUNCTION>WBINVD</FUNCTION>
+ <FUNCTION>VERR</FUNCTION>
+ <FUNCTION>VERW</FUNCTION>
+ <FUNCTION>WRMSR</FUNCTION>
+ <FUNCTION>XADD</FUNCTION>
+ <FUNCTION>XCHG</FUNCTION>
+ <FUNCTION>XLAT</FUNCTION>
+ <FUNCTION>XLATB</FUNCTION>
+ <FUNCTION>XOR</FUNCTION>
+ <FUNCTION>XORPS</FUNCTION>
+
+ <!-- Instructions: 3DNow! -->
+ <FUNCTION>FEMMS</FUNCTION>
+ <FUNCTION>PAVGUSB</FUNCTION>
+ <FUNCTION>PF2ID</FUNCTION>
+ <FUNCTION>PFACC</FUNCTION>
+ <FUNCTION>PFADD</FUNCTION>
+ <FUNCTION>PFCMPEQ</FUNCTION>
+ <FUNCTION>PFCMPGE</FUNCTION>
+ <FUNCTION>PFCMPGT</FUNCTION>
+ <FUNCTION>PFMAX</FUNCTION>
+ <FUNCTION>PFMIN</FUNCTION>
+ <FUNCTION>PFMUL</FUNCTION>
+ <FUNCTION>PFRCP</FUNCTION>
+ <FUNCTION>PFRCPIT1</FUNCTION>
+ <FUNCTION>PFRCPIT2</FUNCTION>
+ <FUNCTION>PFRSQIT1</FUNCTION>
+ <FUNCTION>PFRSQRT</FUNCTION>
+ <FUNCTION>PFSUB</FUNCTION>
+ <FUNCTION>PFSUBR</FUNCTION>
+ <FUNCTION>PI2FD</FUNCTION>
+ <FUNCTION>PMULHRW</FUNCTION>
+ <FUNCTION>PREFETCHW</FUNCTION>
+
+ <!-- Instructions: 3DNow! (Athlon extensions) -->
+ <FUNCTION>PF2IW</FUNCTION>
+ <FUNCTION>PFNACC</FUNCTION>
+ <FUNCTION>PFPNACC</FUNCTION>
+ <FUNCTION>PI2FW</FUNCTION>
+ <FUNCTION>PSWAPD</FUNCTION>
+
+ <!-- Instructions: MMX (Athlon extensions) -->
+ <FUNCTION>PREFETCHNTA</FUNCTION>
+ <FUNCTION>PREFETCHT0</FUNCTION>
+ <FUNCTION>PREFETCHT1</FUNCTION>
+ <FUNCTION>PREFETCHT2</FUNCTION>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/awk.xml b/jEdit/modes/awk.xml
index 7351c66..9ac68d5 100644
--- a/jEdit/modes/awk.xml
+++ b/jEdit/modes/awk.xml
@@ -1,115 +1,115 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- AWK mode, by Matthias M. Schneider -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
- MATCH_TYPE="OPERATOR"
- TYPE="LABEL">:</MARK_PREVIOUS>
-
- <KEYWORDS>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>fflush</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>huge</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>nextfile</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>printf</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <KEYWORD2>atan2</KEYWORD2>
- <KEYWORD2>cos</KEYWORD2>
- <KEYWORD2>exp</KEYWORD2>
- <KEYWORD2>gensub</KEYWORD2>
- <KEYWORD2>getline</KEYWORD2>
- <KEYWORD2>gsub</KEYWORD2>
- <KEYWORD2>index</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>length</KEYWORD2>
- <KEYWORD2>log</KEYWORD2>
- <KEYWORD2>match</KEYWORD2>
- <KEYWORD2>rand</KEYWORD2>
- <KEYWORD2>sin</KEYWORD2>
- <KEYWORD2>split</KEYWORD2>
- <KEYWORD2>sprintf</KEYWORD2>
- <KEYWORD2>sqrt</KEYWORD2>
- <KEYWORD2>srand</KEYWORD2>
- <KEYWORD2>sub</KEYWORD2>
- <KEYWORD2>substr</KEYWORD2>
- <KEYWORD2>system</KEYWORD2>
- <KEYWORD2>tolower</KEYWORD2>
- <KEYWORD2>toupper</KEYWORD2>
-
- <KEYWORD3>BEGIN</KEYWORD3>
- <KEYWORD3>END</KEYWORD3>
- <KEYWORD3>$0</KEYWORD3>
- <KEYWORD3>ARGC</KEYWORD3>
- <KEYWORD3>ARGIND</KEYWORD3>
- <KEYWORD3>ARGV</KEYWORD3>
- <KEYWORD3>CONVFMT</KEYWORD3>
- <KEYWORD3>ENVIRON</KEYWORD3>
- <KEYWORD3>ERRNO</KEYWORD3>
- <KEYWORD3>FIELDSWIDTH</KEYWORD3>
- <KEYWORD3>FILENAME</KEYWORD3>
- <KEYWORD3>FNR</KEYWORD3>
- <KEYWORD3>FS</KEYWORD3>
- <KEYWORD3>IGNORECASE</KEYWORD3>
- <KEYWORD3>NF</KEYWORD3>
- <KEYWORD3>NR</KEYWORD3>
- <KEYWORD3>OFMT</KEYWORD3>
- <KEYWORD3>OFS</KEYWORD3>
- <KEYWORD3>ORS</KEYWORD3>
- <KEYWORD3>RLENGTH</KEYWORD3>
- <KEYWORD3>RS</KEYWORD3>
- <KEYWORD3>RSTART</KEYWORD3>
- <KEYWORD3>RT</KEYWORD3>
- <KEYWORD3>SUBSEP</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- AWK mode, by Matthias M. Schneider -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
+ MATCH_TYPE="OPERATOR"
+ TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <KEYWORDS>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>fflush</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>huge</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>nextfile</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>printf</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <KEYWORD2>atan2</KEYWORD2>
+ <KEYWORD2>cos</KEYWORD2>
+ <KEYWORD2>exp</KEYWORD2>
+ <KEYWORD2>gensub</KEYWORD2>
+ <KEYWORD2>getline</KEYWORD2>
+ <KEYWORD2>gsub</KEYWORD2>
+ <KEYWORD2>index</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>length</KEYWORD2>
+ <KEYWORD2>log</KEYWORD2>
+ <KEYWORD2>match</KEYWORD2>
+ <KEYWORD2>rand</KEYWORD2>
+ <KEYWORD2>sin</KEYWORD2>
+ <KEYWORD2>split</KEYWORD2>
+ <KEYWORD2>sprintf</KEYWORD2>
+ <KEYWORD2>sqrt</KEYWORD2>
+ <KEYWORD2>srand</KEYWORD2>
+ <KEYWORD2>sub</KEYWORD2>
+ <KEYWORD2>substr</KEYWORD2>
+ <KEYWORD2>system</KEYWORD2>
+ <KEYWORD2>tolower</KEYWORD2>
+ <KEYWORD2>toupper</KEYWORD2>
+
+ <KEYWORD3>BEGIN</KEYWORD3>
+ <KEYWORD3>END</KEYWORD3>
+ <KEYWORD3>$0</KEYWORD3>
+ <KEYWORD3>ARGC</KEYWORD3>
+ <KEYWORD3>ARGIND</KEYWORD3>
+ <KEYWORD3>ARGV</KEYWORD3>
+ <KEYWORD3>CONVFMT</KEYWORD3>
+ <KEYWORD3>ENVIRON</KEYWORD3>
+ <KEYWORD3>ERRNO</KEYWORD3>
+ <KEYWORD3>FIELDSWIDTH</KEYWORD3>
+ <KEYWORD3>FILENAME</KEYWORD3>
+ <KEYWORD3>FNR</KEYWORD3>
+ <KEYWORD3>FS</KEYWORD3>
+ <KEYWORD3>IGNORECASE</KEYWORD3>
+ <KEYWORD3>NF</KEYWORD3>
+ <KEYWORD3>NR</KEYWORD3>
+ <KEYWORD3>OFMT</KEYWORD3>
+ <KEYWORD3>OFS</KEYWORD3>
+ <KEYWORD3>ORS</KEYWORD3>
+ <KEYWORD3>RLENGTH</KEYWORD3>
+ <KEYWORD3>RS</KEYWORD3>
+ <KEYWORD3>RSTART</KEYWORD3>
+ <KEYWORD3>RT</KEYWORD3>
+ <KEYWORD3>SUBSEP</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/b.xml b/jEdit/modes/b.xml
index 46bce46..15ecfb2 100644
--- a/jEdit/modes/b.xml
+++ b/jEdit/modes/b.xml
@@ -1,203 +1,203 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentNextLine" VALUE="\s*(((ANY|ASSERT|CASE|CHOICE|IF|LET|PRE|SELECT|VAR|WHILE|WHEN)\s*\(|ELSE|ELSEIF|EITHER|OR|VARIANT|INVARIANT)[^;]*|for\s*\(.*)" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- B style comment -->
- <SPAN TYPE="COMMENT3">
- <BEGIN>/*?</BEGIN>
- <END>?*/</END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
- <SEQ TYPE="OPERATOR">$0</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <!-- pour le & -->
- <SEQ TYPE="OPERATOR">&</SEQ>
- <!-- pour le < et > -->
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
-
- <SEQ TYPE="OPERATOR">^</SEQ>
-
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
-
- <KEYWORDS>
-
- <!-- clauses -->
- <KEYWORD2>ABSTRACT_CONSTANTS</KEYWORD2>
- <KEYWORD2>ABSTRACT_VARIABLES</KEYWORD2>
- <KEYWORD2>CONCRETE_CONSTANTS</KEYWORD2>
- <KEYWORD2>CONCRETE_VARIABLES</KEYWORD2>
- <KEYWORD2>CONSTANTS</KEYWORD2>
- <KEYWORD2>VARIABLES</KEYWORD2>
- <KEYWORD2>ASSERTIONS</KEYWORD2>
- <KEYWORD2>CONSTRAINTS</KEYWORD2>
- <KEYWORD2>DEFINITIONS</KEYWORD2>
- <KEYWORD2>EXTENDS</KEYWORD2>
- <KEYWORD2>IMPLEMENTATION</KEYWORD2>
- <KEYWORD2>IMPORTS</KEYWORD2>
- <KEYWORD2>INCLUDES</KEYWORD2>
- <KEYWORD2>INITIALISATION</KEYWORD2>
- <KEYWORD2>INVARIANT</KEYWORD2>
- <KEYWORD2>LOCAL_OPERATIONS</KEYWORD2>
- <KEYWORD2>MACHINE</KEYWORD2>
- <KEYWORD2>OPERATIONS</KEYWORD2>
- <KEYWORD2>PROMOTES</KEYWORD2>
- <KEYWORD2>PROPERTIES</KEYWORD2>
- <KEYWORD2>REFINES</KEYWORD2>
- <KEYWORD2>REFINEMENT</KEYWORD2>
- <KEYWORD2>SEES</KEYWORD2>
- <KEYWORD2>SETS</KEYWORD2>
- <KEYWORD2>USES</KEYWORD2>
- <KEYWORD2>VALUES</KEYWORD2>
-
-
- <!-- substitutions -->
- <KEYWORD2>ANY</KEYWORD2>
- <KEYWORD2>ASSERT</KEYWORD2>
- <KEYWORD2>BE</KEYWORD2>
- <KEYWORD2>BEGIN</KEYWORD2>
- <KEYWORD2>CASE</KEYWORD2>
- <KEYWORD2>CHOICE</KEYWORD2>
- <KEYWORD2>DO</KEYWORD2>
- <KEYWORD2>EITHER</KEYWORD2>
- <KEYWORD2>ELSE</KEYWORD2>
- <KEYWORD2>ELSIF</KEYWORD2>
- <!-- voir pour le end -->
- <KEYWORD2>END</KEYWORD2>
- <KEYWORD2>IF</KEYWORD2>
- <KEYWORD2>IN</KEYWORD2>
- <KEYWORD2>LET</KEYWORD2>
- <KEYWORD2>OF</KEYWORD2>
- <KEYWORD2>OR</KEYWORD2>
- <KEYWORD2>PRE</KEYWORD2>
- <KEYWORD2>SELECT</KEYWORD2>
- <KEYWORD2>THEN</KEYWORD2>
- <KEYWORD2>VAR</KEYWORD2>
- <KEYWORD2>VARIANT</KEYWORD2>
- <KEYWORD2>WHEN</KEYWORD2>
- <KEYWORD2>WHERE</KEYWORD2>
- <KEYWORD2>WHILE</KEYWORD2>
-
-
- <KEYWORD3>FIN</KEYWORD3>
- <KEYWORD3>FIN1</KEYWORD3>
- <KEYWORD3>INT</KEYWORD3>
- <KEYWORD3>INTEGER</KEYWORD3>
- <KEYWORD3>INTER</KEYWORD3>
- <KEYWORD3>MAXINT</KEYWORD3>
- <KEYWORD3>MININT</KEYWORD3>
- <KEYWORD3>NAT</KEYWORD3>
- <KEYWORD3>NAT1</KEYWORD3>
- <KEYWORD3>NATURAL</KEYWORD3>
- <KEYWORD3>NATURAL1</KEYWORD3>
- <KEYWORD3>PI</KEYWORD3>
- <KEYWORD3>POW</KEYWORD3>
- <KEYWORD3>POW1</KEYWORD3>
- <KEYWORD3>SIGMA</KEYWORD3>
- <KEYWORD3>UNION</KEYWORD3>
-
- <FUNCTION>arity</FUNCTION>
- <FUNCTION>bin</FUNCTION>
- <FUNCTION>bool</FUNCTION>
- <FUNCTION>btree</FUNCTION>
- <FUNCTION>card</FUNCTION>
- <FUNCTION>closure</FUNCTION>
- <FUNCTION>closure1</FUNCTION>
- <FUNCTION>conc</FUNCTION>
- <FUNCTION>const</FUNCTION>
- <FUNCTION>dom</FUNCTION>
- <FUNCTION>father</FUNCTION>
- <FUNCTION>first</FUNCTION>
- <FUNCTION>fnc</FUNCTION>
- <FUNCTION>front</FUNCTION>
- <FUNCTION>id</FUNCTION>
- <FUNCTION>infix</FUNCTION>
- <FUNCTION>inter</FUNCTION>
- <FUNCTION>iseq</FUNCTION>
- <FUNCTION>iseq1</FUNCTION>
- <FUNCTION>iterate</FUNCTION>
- <FUNCTION>last</FUNCTION>
- <FUNCTION>left</FUNCTION>
- <FUNCTION>max</FUNCTION>
- <FUNCTION>min</FUNCTION>
- <FUNCTION>mirror</FUNCTION>
- <FUNCTION>mod</FUNCTION>
- <FUNCTION>not</FUNCTION>
- <FUNCTION>or</FUNCTION>
- <FUNCTION>perm</FUNCTION>
- <FUNCTION>postfix</FUNCTION>
- <FUNCTION>pred</FUNCTION>
- <FUNCTION>prefix</FUNCTION>
- <FUNCTION>prj1</FUNCTION>
- <FUNCTION>prj2</FUNCTION>
- <FUNCTION>r~</FUNCTION>
- <FUNCTION>ran</FUNCTION>
- <FUNCTION>rank</FUNCTION>
- <FUNCTION>rec</FUNCTION>
- <FUNCTION>rel</FUNCTION>
- <FUNCTION>rev</FUNCTION>
- <FUNCTION>right</FUNCTION>
- <FUNCTION>seq</FUNCTION>
- <FUNCTION>seq1</FUNCTION>
- <FUNCTION>size</FUNCTION>
- <FUNCTION>sizet</FUNCTION>
- <FUNCTION>skip</FUNCTION>
- <FUNCTION>son</FUNCTION>
- <FUNCTION>sons</FUNCTION>
- <FUNCTION>struct</FUNCTION>
- <FUNCTION>subtree</FUNCTION>
- <FUNCTION>succ</FUNCTION>
- <FUNCTION>tail</FUNCTION>
- <FUNCTION>top</FUNCTION>
- <FUNCTION>tree</FUNCTION>
- <FUNCTION>union</FUNCTION>
-
- </KEYWORDS>
-
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentNextLine" VALUE="\s*(((ANY|ASSERT|CASE|CHOICE|IF|LET|PRE|SELECT|VAR|WHILE|WHEN)\s*\(|ELSE|ELSEIF|EITHER|OR|VARIANT|INVARIANT)[^;]*|for\s*\(.*)" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- B style comment -->
+ <SPAN TYPE="COMMENT3">
+ <BEGIN>/*?</BEGIN>
+ <END>?*/</END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <SEQ TYPE="OPERATOR">$0</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <!-- pour le & -->
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <!-- pour le < et > -->
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+
+ <SEQ TYPE="OPERATOR">^</SEQ>
+
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+
+ <KEYWORDS>
+
+ <!-- clauses -->
+ <KEYWORD2>ABSTRACT_CONSTANTS</KEYWORD2>
+ <KEYWORD2>ABSTRACT_VARIABLES</KEYWORD2>
+ <KEYWORD2>CONCRETE_CONSTANTS</KEYWORD2>
+ <KEYWORD2>CONCRETE_VARIABLES</KEYWORD2>
+ <KEYWORD2>CONSTANTS</KEYWORD2>
+ <KEYWORD2>VARIABLES</KEYWORD2>
+ <KEYWORD2>ASSERTIONS</KEYWORD2>
+ <KEYWORD2>CONSTRAINTS</KEYWORD2>
+ <KEYWORD2>DEFINITIONS</KEYWORD2>
+ <KEYWORD2>EXTENDS</KEYWORD2>
+ <KEYWORD2>IMPLEMENTATION</KEYWORD2>
+ <KEYWORD2>IMPORTS</KEYWORD2>
+ <KEYWORD2>INCLUDES</KEYWORD2>
+ <KEYWORD2>INITIALISATION</KEYWORD2>
+ <KEYWORD2>INVARIANT</KEYWORD2>
+ <KEYWORD2>LOCAL_OPERATIONS</KEYWORD2>
+ <KEYWORD2>MACHINE</KEYWORD2>
+ <KEYWORD2>OPERATIONS</KEYWORD2>
+ <KEYWORD2>PROMOTES</KEYWORD2>
+ <KEYWORD2>PROPERTIES</KEYWORD2>
+ <KEYWORD2>REFINES</KEYWORD2>
+ <KEYWORD2>REFINEMENT</KEYWORD2>
+ <KEYWORD2>SEES</KEYWORD2>
+ <KEYWORD2>SETS</KEYWORD2>
+ <KEYWORD2>USES</KEYWORD2>
+ <KEYWORD2>VALUES</KEYWORD2>
+
+
+ <!-- substitutions -->
+ <KEYWORD2>ANY</KEYWORD2>
+ <KEYWORD2>ASSERT</KEYWORD2>
+ <KEYWORD2>BE</KEYWORD2>
+ <KEYWORD2>BEGIN</KEYWORD2>
+ <KEYWORD2>CASE</KEYWORD2>
+ <KEYWORD2>CHOICE</KEYWORD2>
+ <KEYWORD2>DO</KEYWORD2>
+ <KEYWORD2>EITHER</KEYWORD2>
+ <KEYWORD2>ELSE</KEYWORD2>
+ <KEYWORD2>ELSIF</KEYWORD2>
+ <!-- voir pour le end -->
+ <KEYWORD2>END</KEYWORD2>
+ <KEYWORD2>IF</KEYWORD2>
+ <KEYWORD2>IN</KEYWORD2>
+ <KEYWORD2>LET</KEYWORD2>
+ <KEYWORD2>OF</KEYWORD2>
+ <KEYWORD2>OR</KEYWORD2>
+ <KEYWORD2>PRE</KEYWORD2>
+ <KEYWORD2>SELECT</KEYWORD2>
+ <KEYWORD2>THEN</KEYWORD2>
+ <KEYWORD2>VAR</KEYWORD2>
+ <KEYWORD2>VARIANT</KEYWORD2>
+ <KEYWORD2>WHEN</KEYWORD2>
+ <KEYWORD2>WHERE</KEYWORD2>
+ <KEYWORD2>WHILE</KEYWORD2>
+
+
+ <KEYWORD3>FIN</KEYWORD3>
+ <KEYWORD3>FIN1</KEYWORD3>
+ <KEYWORD3>INT</KEYWORD3>
+ <KEYWORD3>INTEGER</KEYWORD3>
+ <KEYWORD3>INTER</KEYWORD3>
+ <KEYWORD3>MAXINT</KEYWORD3>
+ <KEYWORD3>MININT</KEYWORD3>
+ <KEYWORD3>NAT</KEYWORD3>
+ <KEYWORD3>NAT1</KEYWORD3>
+ <KEYWORD3>NATURAL</KEYWORD3>
+ <KEYWORD3>NATURAL1</KEYWORD3>
+ <KEYWORD3>PI</KEYWORD3>
+ <KEYWORD3>POW</KEYWORD3>
+ <KEYWORD3>POW1</KEYWORD3>
+ <KEYWORD3>SIGMA</KEYWORD3>
+ <KEYWORD3>UNION</KEYWORD3>
+
+ <FUNCTION>arity</FUNCTION>
+ <FUNCTION>bin</FUNCTION>
+ <FUNCTION>bool</FUNCTION>
+ <FUNCTION>btree</FUNCTION>
+ <FUNCTION>card</FUNCTION>
+ <FUNCTION>closure</FUNCTION>
+ <FUNCTION>closure1</FUNCTION>
+ <FUNCTION>conc</FUNCTION>
+ <FUNCTION>const</FUNCTION>
+ <FUNCTION>dom</FUNCTION>
+ <FUNCTION>father</FUNCTION>
+ <FUNCTION>first</FUNCTION>
+ <FUNCTION>fnc</FUNCTION>
+ <FUNCTION>front</FUNCTION>
+ <FUNCTION>id</FUNCTION>
+ <FUNCTION>infix</FUNCTION>
+ <FUNCTION>inter</FUNCTION>
+ <FUNCTION>iseq</FUNCTION>
+ <FUNCTION>iseq1</FUNCTION>
+ <FUNCTION>iterate</FUNCTION>
+ <FUNCTION>last</FUNCTION>
+ <FUNCTION>left</FUNCTION>
+ <FUNCTION>max</FUNCTION>
+ <FUNCTION>min</FUNCTION>
+ <FUNCTION>mirror</FUNCTION>
+ <FUNCTION>mod</FUNCTION>
+ <FUNCTION>not</FUNCTION>
+ <FUNCTION>or</FUNCTION>
+ <FUNCTION>perm</FUNCTION>
+ <FUNCTION>postfix</FUNCTION>
+ <FUNCTION>pred</FUNCTION>
+ <FUNCTION>prefix</FUNCTION>
+ <FUNCTION>prj1</FUNCTION>
+ <FUNCTION>prj2</FUNCTION>
+ <FUNCTION>r~</FUNCTION>
+ <FUNCTION>ran</FUNCTION>
+ <FUNCTION>rank</FUNCTION>
+ <FUNCTION>rec</FUNCTION>
+ <FUNCTION>rel</FUNCTION>
+ <FUNCTION>rev</FUNCTION>
+ <FUNCTION>right</FUNCTION>
+ <FUNCTION>seq</FUNCTION>
+ <FUNCTION>seq1</FUNCTION>
+ <FUNCTION>size</FUNCTION>
+ <FUNCTION>sizet</FUNCTION>
+ <FUNCTION>skip</FUNCTION>
+ <FUNCTION>son</FUNCTION>
+ <FUNCTION>sons</FUNCTION>
+ <FUNCTION>struct</FUNCTION>
+ <FUNCTION>subtree</FUNCTION>
+ <FUNCTION>succ</FUNCTION>
+ <FUNCTION>tail</FUNCTION>
+ <FUNCTION>top</FUNCTION>
+ <FUNCTION>tree</FUNCTION>
+ <FUNCTION>union</FUNCTION>
+
+ </KEYWORDS>
+
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/batch.xml b/jEdit/modes/batch.xml
index ebfe13a..ca13704 100644
--- a/jEdit/modes/batch.xml
+++ b/jEdit/modes/batch.xml
@@ -1,172 +1,172 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- 09-10-2003 - Mirco Bova
- Added some new batch commands using win2K help as reference.
-
- 04-12-2001 - Mirco Bova
- this file is based on the original JEdit batch.xml mode.
- The main upgrade consisting in adding the standard MS-DOS
- commands as keywords and functions:
- - keywords = internal shell commands;
- - functions = standard MS-DOS commands (.exe or .com in DOS or
- windows\command directory).
-
- Minor enhancements by Alex Jacoby on 28-feb-2003
--->
-
-<!-- The keywords and functions here defined are those of MS-DOS 6.22,
- plus a few as of Windows XP.
- -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="rem" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="(" />
- <PROPERTY NAME="indentCloseBrackets" VALUE=")" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
- <!-- 'echo off' statements -->
- <SEQ TYPE="KEYWORD3">@</SEQ>
-
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
-
- <!-- labels - eg ":test" or "goto :test" -->
- <MARK_FOLLOWING AT_WORD_START="TRUE" TYPE="LABEL">:</MARK_FOLLOWING>
-
- <!-- comments -->
- <EOL_SPAN_REGEXP AT_WHITESPACE_END="TRUE" HASH_CHAR="REM" TYPE="COMMENT1">REM\s</EOL_SPAN_REGEXP>
-
- <!-- literals -->
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- variables -->
- <SEQ TYPE="KEYWORD2">%0</SEQ>
- <SEQ TYPE="KEYWORD2">%1</SEQ>
- <SEQ TYPE="KEYWORD2">%2</SEQ>
- <SEQ TYPE="KEYWORD2">%3</SEQ>
- <SEQ TYPE="KEYWORD2">%4</SEQ>
- <SEQ TYPE="KEYWORD2">%5</SEQ>
- <SEQ TYPE="KEYWORD2">%6</SEQ>
- <SEQ TYPE="KEYWORD2">%7</SEQ>
- <SEQ TYPE="KEYWORD2">%8</SEQ>
- <SEQ TYPE="KEYWORD2">%9</SEQ>
- <!-- for-loop variable (one char after %%) -->
- <SEQ_REGEXP TYPE="KEYWORD2"
- HASH_CHAR="%%"
- AT_WORD_START="TRUE"
- >%%[\p{Alpha}]</SEQ_REGEXP>
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>%</BEGIN>
- <END>%</END>
- </SPAN>
-
- <KEYWORDS>
- <!-- KEYWORD1 are internal MS-DOS shell commands -->
- <KEYWORD1>cd</KEYWORD1>
- <KEYWORD1>chdir</KEYWORD1>
- <KEYWORD1>md</KEYWORD1>
- <KEYWORD1>mkdir</KEYWORD1>
-
- <KEYWORD1>cls</KEYWORD1>
-
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
-
- <KEYWORD1>echo</KEYWORD1>
- <KEYWORD1>echo.</KEYWORD1>
-
- <KEYWORD1>move</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>move</KEYWORD1>
- <KEYWORD1>ren</KEYWORD1>
- <KEYWORD1>del</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
-
- <!-- new KEYWORDS from Win2K help -->
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>setlocal</KEYWORD1>
- <KEYWORD1>shift</KEYWORD1>
- <KEYWORD1>endlocal</KEYWORD1>
- <KEYWORD1>pause</KEYWORD1>
-
- <!-- KEYWORD2 are commands options -->
-
- <KEYWORD2>defined</KEYWORD2>
- <KEYWORD2>exist</KEYWORD2>
- <KEYWORD2>errorlevel</KEYWORD2>
-
- <!-- new KEYWORD options from Win2K help -->
- <KEYWORD2>else</KEYWORD2>
-
- <KEYWORD2>in</KEYWORD2>
- <KEYWORD2>do</KEYWORD2>
-
- <KEYWORD2>NUL</KEYWORD2>
- <KEYWORD2>AUX</KEYWORD2>
- <KEYWORD2>PRN</KEYWORD2>
-
- <KEYWORD1>not</KEYWORD1>
-
- <!-- goto is a special case we want to distinguish it -->
- <KEYWORD3>goto</KEYWORD3>
-
- <!-- FUNCTION are standard MS-DOS commands -->
- <!-- (those you find as stand-alone .exe or .com) in win95 %windows_root%\command folder -->
- <FUNCTION>APPEND</FUNCTION>
- <FUNCTION>ATTRIB</FUNCTION>
- <FUNCTION>CHKDSK</FUNCTION>
- <FUNCTION>CHOICE</FUNCTION>
- <FUNCTION>DEBUG</FUNCTION>
- <FUNCTION>DEFRAG</FUNCTION>
- <FUNCTION>DELTREE</FUNCTION>
- <FUNCTION>DISKCOMP</FUNCTION>
- <FUNCTION>DISKCOPY</FUNCTION>
- <FUNCTION>DOSKEY</FUNCTION>
- <FUNCTION>DRVSPACE</FUNCTION>
- <FUNCTION>EMM386</FUNCTION>
- <FUNCTION>EXPAND</FUNCTION>
- <FUNCTION>FASTOPEN</FUNCTION>
- <FUNCTION>FC</FUNCTION>
- <FUNCTION>FDISK</FUNCTION>
- <FUNCTION>FIND</FUNCTION>
- <FUNCTION>FORMAT</FUNCTION>
- <FUNCTION>GRAPHICS</FUNCTION>
- <FUNCTION>KEYB</FUNCTION>
- <FUNCTION>LABEL</FUNCTION>
- <FUNCTION>LOADFIX</FUNCTION>
- <FUNCTION>MEM</FUNCTION>
- <FUNCTION>MODE</FUNCTION>
- <FUNCTION>MORE</FUNCTION>
- <FUNCTION>MOVE</FUNCTION>
- <FUNCTION>MSCDEX</FUNCTION>
- <FUNCTION>NLSFUNC</FUNCTION>
- <FUNCTION>POWER</FUNCTION>
- <FUNCTION>PRINT</FUNCTION>
- <FUNCTION>RD</FUNCTION>
- <FUNCTION>REPLACE</FUNCTION>
- <FUNCTION>RESTORE</FUNCTION>
- <FUNCTION>SETVER</FUNCTION>
- <FUNCTION>SHARE</FUNCTION>
- <FUNCTION>SORT</FUNCTION>
- <FUNCTION>SUBST</FUNCTION>
- <FUNCTION>SYS</FUNCTION>
- <FUNCTION>TREE</FUNCTION>
- <FUNCTION>UNDELETE</FUNCTION>
- <FUNCTION>UNFORMAT</FUNCTION>
- <FUNCTION>VSAFE</FUNCTION>
- <FUNCTION>XCOPY</FUNCTION>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ 09-10-2003 - Mirco Bova
+ Added some new batch commands using win2K help as reference.
+
+ 04-12-2001 - Mirco Bova
+ this file is based on the original JEdit batch.xml mode.
+ The main upgrade consisting in adding the standard MS-DOS
+ commands as keywords and functions:
+ - keywords = internal shell commands;
+ - functions = standard MS-DOS commands (.exe or .com in DOS or
+ windows\command directory).
+
+ Minor enhancements by Alex Jacoby on 28-feb-2003
+-->
+
+<!-- The keywords and functions here defined are those of MS-DOS 6.22,
+ plus a few as of Windows XP.
+ -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="rem" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE=")" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+ <!-- 'echo off' statements -->
+ <SEQ TYPE="KEYWORD3">@</SEQ>
+
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+
+ <!-- labels - eg ":test" or "goto :test" -->
+ <MARK_FOLLOWING AT_WORD_START="TRUE" TYPE="LABEL">:</MARK_FOLLOWING>
+
+ <!-- comments -->
+ <EOL_SPAN_REGEXP AT_WHITESPACE_END="TRUE" HASH_CHAR="REM" TYPE="COMMENT1">REM\s</EOL_SPAN_REGEXP>
+
+ <!-- literals -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- variables -->
+ <SEQ TYPE="KEYWORD2">%0</SEQ>
+ <SEQ TYPE="KEYWORD2">%1</SEQ>
+ <SEQ TYPE="KEYWORD2">%2</SEQ>
+ <SEQ TYPE="KEYWORD2">%3</SEQ>
+ <SEQ TYPE="KEYWORD2">%4</SEQ>
+ <SEQ TYPE="KEYWORD2">%5</SEQ>
+ <SEQ TYPE="KEYWORD2">%6</SEQ>
+ <SEQ TYPE="KEYWORD2">%7</SEQ>
+ <SEQ TYPE="KEYWORD2">%8</SEQ>
+ <SEQ TYPE="KEYWORD2">%9</SEQ>
+ <!-- for-loop variable (one char after %%) -->
+ <SEQ_REGEXP TYPE="KEYWORD2"
+ HASH_CHAR="%%"
+ AT_WORD_START="TRUE"
+ >%%[\p{Alpha}]</SEQ_REGEXP>
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>%</BEGIN>
+ <END>%</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <!-- KEYWORD1 are internal MS-DOS shell commands -->
+ <KEYWORD1>cd</KEYWORD1>
+ <KEYWORD1>chdir</KEYWORD1>
+ <KEYWORD1>md</KEYWORD1>
+ <KEYWORD1>mkdir</KEYWORD1>
+
+ <KEYWORD1>cls</KEYWORD1>
+
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+
+ <KEYWORD1>echo</KEYWORD1>
+ <KEYWORD1>echo.</KEYWORD1>
+
+ <KEYWORD1>move</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>move</KEYWORD1>
+ <KEYWORD1>ren</KEYWORD1>
+ <KEYWORD1>del</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+
+ <!-- new KEYWORDS from Win2K help -->
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>setlocal</KEYWORD1>
+ <KEYWORD1>shift</KEYWORD1>
+ <KEYWORD1>endlocal</KEYWORD1>
+ <KEYWORD1>pause</KEYWORD1>
+
+ <!-- KEYWORD2 are commands options -->
+
+ <KEYWORD2>defined</KEYWORD2>
+ <KEYWORD2>exist</KEYWORD2>
+ <KEYWORD2>errorlevel</KEYWORD2>
+
+ <!-- new KEYWORD options from Win2K help -->
+ <KEYWORD2>else</KEYWORD2>
+
+ <KEYWORD2>in</KEYWORD2>
+ <KEYWORD2>do</KEYWORD2>
+
+ <KEYWORD2>NUL</KEYWORD2>
+ <KEYWORD2>AUX</KEYWORD2>
+ <KEYWORD2>PRN</KEYWORD2>
+
+ <KEYWORD1>not</KEYWORD1>
+
+ <!-- goto is a special case we want to distinguish it -->
+ <KEYWORD3>goto</KEYWORD3>
+
+ <!-- FUNCTION are standard MS-DOS commands -->
+ <!-- (those you find as stand-alone .exe or .com) in win95 %windows_root%\command folder -->
+ <FUNCTION>APPEND</FUNCTION>
+ <FUNCTION>ATTRIB</FUNCTION>
+ <FUNCTION>CHKDSK</FUNCTION>
+ <FUNCTION>CHOICE</FUNCTION>
+ <FUNCTION>DEBUG</FUNCTION>
+ <FUNCTION>DEFRAG</FUNCTION>
+ <FUNCTION>DELTREE</FUNCTION>
+ <FUNCTION>DISKCOMP</FUNCTION>
+ <FUNCTION>DISKCOPY</FUNCTION>
+ <FUNCTION>DOSKEY</FUNCTION>
+ <FUNCTION>DRVSPACE</FUNCTION>
+ <FUNCTION>EMM386</FUNCTION>
+ <FUNCTION>EXPAND</FUNCTION>
+ <FUNCTION>FASTOPEN</FUNCTION>
+ <FUNCTION>FC</FUNCTION>
+ <FUNCTION>FDISK</FUNCTION>
+ <FUNCTION>FIND</FUNCTION>
+ <FUNCTION>FORMAT</FUNCTION>
+ <FUNCTION>GRAPHICS</FUNCTION>
+ <FUNCTION>KEYB</FUNCTION>
+ <FUNCTION>LABEL</FUNCTION>
+ <FUNCTION>LOADFIX</FUNCTION>
+ <FUNCTION>MEM</FUNCTION>
+ <FUNCTION>MODE</FUNCTION>
+ <FUNCTION>MORE</FUNCTION>
+ <FUNCTION>MOVE</FUNCTION>
+ <FUNCTION>MSCDEX</FUNCTION>
+ <FUNCTION>NLSFUNC</FUNCTION>
+ <FUNCTION>POWER</FUNCTION>
+ <FUNCTION>PRINT</FUNCTION>
+ <FUNCTION>RD</FUNCTION>
+ <FUNCTION>REPLACE</FUNCTION>
+ <FUNCTION>RESTORE</FUNCTION>
+ <FUNCTION>SETVER</FUNCTION>
+ <FUNCTION>SHARE</FUNCTION>
+ <FUNCTION>SORT</FUNCTION>
+ <FUNCTION>SUBST</FUNCTION>
+ <FUNCTION>SYS</FUNCTION>
+ <FUNCTION>TREE</FUNCTION>
+ <FUNCTION>UNDELETE</FUNCTION>
+ <FUNCTION>UNFORMAT</FUNCTION>
+ <FUNCTION>VSAFE</FUNCTION>
+ <FUNCTION>XCOPY</FUNCTION>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/bbj.xml b/jEdit/modes/bbj.xml
index 0bd9fd3..1b85ebb 100644
--- a/jEdit/modes/bbj.xml
+++ b/jEdit/modes/bbj.xml
@@ -1,308 +1,308 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- enhancement if using some preprocessor -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">REM </EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR"> and </SEQ>
- <SEQ TYPE="OPERATOR"> or </SEQ>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>ABS</KEYWORD1>
- <KEYWORD1>ADJN</KEYWORD1>
- <KEYWORD1>ARGC</KEYWORD1>
- <KEYWORD1>ARGV</KEYWORD1>
- <KEYWORD1>ASC</KEYWORD1>
- <KEYWORD1>ATH</KEYWORD1>
- <KEYWORD1>ATN</KEYWORD1>
- <KEYWORD1>BACKGROUND</KEYWORD1>
- <KEYWORD1>BIN</KEYWORD1>
- <KEYWORD1>BSZ</KEYWORD1>
- <KEYWORD1>CALLBACK</KEYWORD1>
- <KEYWORD1>CHANOPT</KEYWORD1>
- <KEYWORD1>CHR</KEYWORD1>
- <KEYWORD1>CLIPCLEAR</KEYWORD1>
- <KEYWORD1>CLIPFROMFILE</KEYWORD1>
- <KEYWORD1>CLIPFROMSTR</KEYWORD1>
- <KEYWORD1>CLIPISFORMAT</KEYWORD1>
- <KEYWORD1>CLIPLOCK</KEYWORD1>
- <KEYWORD1>CLIPREGFORMAT</KEYWORD1>
- <KEYWORD1>CLIPTOFILE</KEYWORD1>
- <KEYWORD1>CLIPTOSTR</KEYWORD1>
- <KEYWORD1>CLIPUNLOCK</KEYWORD1>
- <KEYWORD1>COS</KEYWORD1>
- <KEYWORD1>CPL</KEYWORD1>
- <KEYWORD1>CRC</KEYWORD1>
- <KEYWORD1>CRC16</KEYWORD1>
- <KEYWORD1>CTRL</KEYWORD1>
- <KEYWORD1>CVS</KEYWORD1>
- <KEYWORD1>CVT</KEYWORD1>
- <KEYWORD1>DATE</KEYWORD1>
- <KEYWORD1>DEC</KEYWORD1>
- <KEYWORD1>DIMS</KEYWORD1>
- <KEYWORD1>DSK</KEYWORD1>
- <KEYWORD1>DSZ</KEYWORD1>
- <KEYWORD1>EPT</KEYWORD1>
- <KEYWORD1>ERRMES</KEYWORD1>
- <KEYWORD1>FATTR</KEYWORD1>
- <KEYWORD1>FBIN</KEYWORD1>
- <KEYWORD1>FDEC</KEYWORD1>
- <KEYWORD1>FIELD</KEYWORD1>
- <KEYWORD1>FILEOPT</KEYWORD1>
- <KEYWORD1>FILL</KEYWORD1>
- <KEYWORD1>FLOATINGPOINT</KEYWORD1>
- <KEYWORD1>FPT</KEYWORD1>
- <KEYWORD1>GAP</KEYWORD1>
- <KEYWORD1>HSA</KEYWORD1>
- <KEYWORD1>HSH</KEYWORD1>
- <KEYWORD1>HTA</KEYWORD1>
- <KEYWORD1>IMP</KEYWORD1>
- <KEYWORD1>INFO</KEYWORD1>
- <KEYWORD1>INT</KEYWORD1>
- <KEYWORD1>JUL</KEYWORD1>
- <KEYWORD1>LCHECKIN</KEYWORD1>
- <KEYWORD1>LCHECKOUT</KEYWORD1>
- <KEYWORD1>LEN</KEYWORD1>
- <KEYWORD1>LINFO</KEYWORD1>
- <KEYWORD1>LOG</KEYWORD1>
- <KEYWORD1>LRC</KEYWORD1>
- <KEYWORD1>LST</KEYWORD1>
- <KEYWORD1>MASK</KEYWORD1>
- <KEYWORD1>MAX</KEYWORD1>
- <KEYWORD1>MENUINFO</KEYWORD1>
- <KEYWORD1>MIN</KEYWORD1>
- <KEYWORD1>MOD</KEYWORD1>
- <KEYWORD1>MSGBOX</KEYWORD1>
- <KEYWORD1>NEVAL</KEYWORD1>
- <KEYWORD1>NFIELD</KEYWORD1>
- <KEYWORD1>NOTICE</KEYWORD1>
- <KEYWORD1>NOTICETPL</KEYWORD1>
- <KEYWORD1>NUM</KEYWORD1>
- <KEYWORD1>PAD</KEYWORD1>
- <KEYWORD1>PCK</KEYWORD1>
- <KEYWORD1>PGM</KEYWORD1>
- <KEYWORD1>POS</KEYWORD1>
- <KEYWORD1>PROCESS_EVENTS</KEYWORD1>
- <KEYWORD1>PROGRAM</KEYWORD1>
- <KEYWORD1>PSZ</KEYWORD1>
- <KEYWORD1>PUB</KEYWORD1>
- <KEYWORD1>REMOVE_CALLBACK</KEYWORD1>
- <KEYWORD1>RESERVE</KEYWORD1>
- <KEYWORD1>RND</KEYWORD1>
- <KEYWORD1>ROUND</KEYWORD1>
- <KEYWORD1>SCALL</KEYWORD1>
- <KEYWORD1>SENDMSG</KEYWORD1>
- <KEYWORD1>SEVAL</KEYWORD1>
- <KEYWORD1>SGN</KEYWORD1>
- <KEYWORD1>SIN</KEYWORD1>
- <KEYWORD1>SQR</KEYWORD1>
- <KEYWORD1>SSORT</KEYWORD1>
- <KEYWORD1>SSZ</KEYWORD1>
- <KEYWORD1>STBL</KEYWORD1>
- <KEYWORD1>STR</KEYWORD1>
- <KEYWORD1>SWAP</KEYWORD1>
- <KEYWORD1>SYS</KEYWORD1>
- <KEYWORD1>TCB</KEYWORD1>
- <KEYWORD1>TMPL</KEYWORD1>
- <KEYWORD1>TSK</KEYWORD1>
- <KEYWORD1>UPK</KEYWORD1>
- <KEYWORD1>WINFIRST</KEYWORD1>
- <KEYWORD1>WININFO</KEYWORD1>
- <KEYWORD1>WINNEXT</KEYWORD1>
-
- <KEYWORD2>CHDIR</KEYWORD2>
- <KEYWORD2>CISAM</KEYWORD2>
- <KEYWORD2>CLOSE</KEYWORD2>
- <KEYWORD2>CONTINUE</KEYWORD2>
- <KEYWORD2>DIRECT</KEYWORD2>
- <KEYWORD2>DIR</KEYWORD2>
- <KEYWORD2>DISABLE</KEYWORD2>
- <KEYWORD2>DOM</KEYWORD2>
- <KEYWORD2>DUMP</KEYWORD2>
- <KEYWORD2>ENABLE</KEYWORD2>
- <KEYWORD2>END</KEYWORD2>
- <KEYWORD2>ENDTRACE</KEYWORD2>
- <KEYWORD2>ERASE</KEYWORD2>
- <KEYWORD2>EXTRACT</KEYWORD2>
- <KEYWORD2>FID</KEYWORD2>
- <KEYWORD2>FILE</KEYWORD2>
- <KEYWORD2>FIN</KEYWORD2>
- <KEYWORD2>FIND</KEYWORD2>
- <KEYWORD2>FROM</KEYWORD2>
- <KEYWORD2>IND</KEYWORD2>
- <KEYWORD2>INDEXED</KEYWORD2>
- <KEYWORD2>INPUT</KEYWORD2>
- <KEYWORD2>INPUTE</KEYWORD2>
- <KEYWORD2>INPUTN</KEYWORD2>
- <KEYWORD2>IOL</KEYWORD2>
- <KEYWORD2>IOLIST</KEYWORD2>
- <KEYWORD2>KEY</KEYWORD2>
- <KEYWORD2>KEYF</KEYWORD2>
- <KEYWORD2>KEYL</KEYWORD2>
- <KEYWORD2>KEYN</KEYWORD2>
- <KEYWORD2>KEYP</KEYWORD2>
- <KEYWORD2>KGEN</KEYWORD2>
- <KEYWORD2>KNUM</KEYWORD2>
- <KEYWORD2>LIST</KEYWORD2>
- <KEYWORD2>LOAD</KEYWORD2>
- <KEYWORD2>LOCK</KEYWORD2>
- <KEYWORD2>MERGE</KEYWORD2>
- <KEYWORD2>MKDIR</KEYWORD2>
- <KEYWORD2>MKEYED</KEYWORD2>
- <KEYWORD2>OPEN</KEYWORD2>
- <KEYWORD2>PREFIX</KEYWORD2>
- <KEYWORD2>PRINT</KEYWORD2>
- <KEYWORD2>READ_RESOURCE</KEYWORD2>
- <KEYWORD2>READ</KEYWORD2>
- <KEYWORD2>RECORD</KEYWORD2>
- <KEYWORD2>REMOVE</KEYWORD2>
- <KEYWORD2>RENAME</KEYWORD2>
- <KEYWORD2>RESCLOSE</KEYWORD2>
- <KEYWORD2>RESFIRST</KEYWORD2>
- <KEYWORD2>RESGET</KEYWORD2>
- <KEYWORD2>RESINFO</KEYWORD2>
- <KEYWORD2>RESNEXT</KEYWORD2>
- <KEYWORD2>RESOPEN</KEYWORD2>
- <KEYWORD2>REV</KEYWORD2>
- <KEYWORD2>RMDIR</KEYWORD2>
- <KEYWORD2>SAVE</KEYWORD2>
- <KEYWORD2>SELECT</KEYWORD2>
- <KEYWORD2>SERIAL</KEYWORD2>
- <KEYWORD2>SETDAY</KEYWORD2>
- <KEYWORD2>SETDRIVE</KEYWORD2>
- <KEYWORD2>SETTRACE</KEYWORD2>
- <KEYWORD2>SIZ</KEYWORD2>
- <KEYWORD2>SORT</KEYWORD2>
- <KEYWORD2>SQLCHN</KEYWORD2>
- <KEYWORD2>SQLCLOSE</KEYWORD2>
- <KEYWORD2>SQLERR</KEYWORD2>
- <KEYWORD2>SQLEXEC</KEYWORD2>
- <KEYWORD2>SQLFETCH</KEYWORD2>
- <KEYWORD2>SQLLIST</KEYWORD2>
- <KEYWORD2>SQLOPEN</KEYWORD2>
- <KEYWORD2>SQLPREP</KEYWORD2>
- <KEYWORD2>SQLSET</KEYWORD2>
- <KEYWORD2>SQLTABLES</KEYWORD2>
- <KEYWORD2>SQLTMPL</KEYWORD2>
- <KEYWORD2>SQLUNT</KEYWORD2>
- <KEYWORD2>STRING</KEYWORD2>
- <KEYWORD2>TABLE</KEYWORD2>
- <KEYWORD2>TBL</KEYWORD2>
- <KEYWORD2>TIM</KEYWORD2>
- <KEYWORD2>UNLOCK</KEYWORD2>
- <KEYWORD2>WHERE</KEYWORD2>
- <KEYWORD2>WRITE</KEYWORD2>
- <KEYWORD2>XFID</KEYWORD2>
- <KEYWORD2>XFILE</KEYWORD2>
- <KEYWORD2>XFIN</KEYWORD2>
-
- <KEYWORD3>ADDR</KEYWORD3>
- <KEYWORD3>ALL</KEYWORD3>
- <KEYWORD3>AUTO</KEYWORD3>
- <KEYWORD3>BEGIN</KEYWORD3>
- <KEYWORD3>BREAK</KEYWORD3>
- <KEYWORD3>CALL</KEYWORD3>
- <KEYWORD3>CASE</KEYWORD3>
- <KEYWORD3>CHN</KEYWORD3>
- <KEYWORD3>CLEAR</KEYWORD3>
- <KEYWORD3>CTL</KEYWORD3>
- <KEYWORD3>DATA</KEYWORD3>
- <KEYWORD3>DAY</KEYWORD3>
- <KEYWORD3>DEF</KEYWORD3>
- <KEYWORD3>DEFAULT</KEYWORD3>
- <KEYWORD3>DEFEND</KEYWORD3>
- <KEYWORD3>DELETE</KEYWORD3>
- <KEYWORD3>DIM</KEYWORD3>
- <KEYWORD3>DREAD</KEYWORD3>
- <KEYWORD3>DROP</KEYWORD3>
- <KEYWORD3>EDIT</KEYWORD3>
- <KEYWORD3>ELSE</KEYWORD3>
- <KEYWORD3>ENDIF</KEYWORD3>
- <KEYWORD3>ENTER</KEYWORD3>
- <KEYWORD3>ERR</KEYWORD3>
- <KEYWORD3>ESCAPE</KEYWORD3>
- <KEYWORD3>ESCOFF</KEYWORD3>
- <KEYWORD3>ESCON</KEYWORD3>
- <KEYWORD3>EXECUTE</KEYWORD3>
- <KEYWORD3>EXIT</KEYWORD3>
- <KEYWORD3>EXITTO</KEYWORD3>
- <KEYWORD3>FI</KEYWORD3>
- <KEYWORD3>FOR</KEYWORD3>
- <KEYWORD3>GOSUB</KEYWORD3>
- <KEYWORD3>GOTO</KEYWORD3>
- <KEYWORD3>IF</KEYWORD3>
- <KEYWORD3>IFF</KEYWORD3>
- <KEYWORD3>INITFILE</KEYWORD3>
- <KEYWORD3>IOR</KEYWORD3>
- <KEYWORD3>LET</KEYWORD3>
- <KEYWORD3>NEXT</KEYWORD3>
- <KEYWORD3>NOT</KEYWORD3>
- <KEYWORD3>ON</KEYWORD3>
- <KEYWORD3>OPTS</KEYWORD3>
- <KEYWORD3>OR</KEYWORD3>
- <KEYWORD3>PFX</KEYWORD3>
- <KEYWORD3>PRECISION</KEYWORD3>
- <KEYWORD3>RELEASE</KEYWORD3>
- <KEYWORD3>RENUM</KEYWORD3>
- <KEYWORD3>REPEAT</KEYWORD3>
- <KEYWORD3>RESET</KEYWORD3>
- <KEYWORD3>RESTORE</KEYWORD3>
- <KEYWORD3>RETRY</KEYWORD3>
- <KEYWORD3>RETURN</KEYWORD3>
- <KEYWORD3>RUN</KEYWORD3>
- <KEYWORD3>SET_CASE_SENSITIVE_OFF</KEYWORD3>
- <KEYWORD3>SET_CASE_SENSITIVE_ON</KEYWORD3>
- <KEYWORD3>SETERR</KEYWORD3>
- <KEYWORD3>SETESC</KEYWORD3>
- <KEYWORD3>SETOPTS</KEYWORD3>
- <KEYWORD3>SETTIME</KEYWORD3>
- <KEYWORD3>SSN</KEYWORD3>
- <KEYWORD3>START</KEYWORD3>
- <KEYWORD3>STEP</KEYWORD3>
- <KEYWORD3>STOP</KEYWORD3>
- <KEYWORD3>SWEND</KEYWORD3>
- <KEYWORD3>SWITCH</KEYWORD3>
- <KEYWORD3>THEN</KEYWORD3>
- <KEYWORD3>TO</KEYWORD3>
- <KEYWORD3>UNT</KEYWORD3>
- <KEYWORD3>UNTIL</KEYWORD3>
- <KEYWORD3>WAIT</KEYWORD3>
- <KEYWORD3>WEND</KEYWORD3>
- <KEYWORD3>WHILE</KEYWORD3>
- <KEYWORD3>XOR</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- enhancement if using some preprocessor -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">REM </EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR"> and </SEQ>
+ <SEQ TYPE="OPERATOR"> or </SEQ>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>ABS</KEYWORD1>
+ <KEYWORD1>ADJN</KEYWORD1>
+ <KEYWORD1>ARGC</KEYWORD1>
+ <KEYWORD1>ARGV</KEYWORD1>
+ <KEYWORD1>ASC</KEYWORD1>
+ <KEYWORD1>ATH</KEYWORD1>
+ <KEYWORD1>ATN</KEYWORD1>
+ <KEYWORD1>BACKGROUND</KEYWORD1>
+ <KEYWORD1>BIN</KEYWORD1>
+ <KEYWORD1>BSZ</KEYWORD1>
+ <KEYWORD1>CALLBACK</KEYWORD1>
+ <KEYWORD1>CHANOPT</KEYWORD1>
+ <KEYWORD1>CHR</KEYWORD1>
+ <KEYWORD1>CLIPCLEAR</KEYWORD1>
+ <KEYWORD1>CLIPFROMFILE</KEYWORD1>
+ <KEYWORD1>CLIPFROMSTR</KEYWORD1>
+ <KEYWORD1>CLIPISFORMAT</KEYWORD1>
+ <KEYWORD1>CLIPLOCK</KEYWORD1>
+ <KEYWORD1>CLIPREGFORMAT</KEYWORD1>
+ <KEYWORD1>CLIPTOFILE</KEYWORD1>
+ <KEYWORD1>CLIPTOSTR</KEYWORD1>
+ <KEYWORD1>CLIPUNLOCK</KEYWORD1>
+ <KEYWORD1>COS</KEYWORD1>
+ <KEYWORD1>CPL</KEYWORD1>
+ <KEYWORD1>CRC</KEYWORD1>
+ <KEYWORD1>CRC16</KEYWORD1>
+ <KEYWORD1>CTRL</KEYWORD1>
+ <KEYWORD1>CVS</KEYWORD1>
+ <KEYWORD1>CVT</KEYWORD1>
+ <KEYWORD1>DATE</KEYWORD1>
+ <KEYWORD1>DEC</KEYWORD1>
+ <KEYWORD1>DIMS</KEYWORD1>
+ <KEYWORD1>DSK</KEYWORD1>
+ <KEYWORD1>DSZ</KEYWORD1>
+ <KEYWORD1>EPT</KEYWORD1>
+ <KEYWORD1>ERRMES</KEYWORD1>
+ <KEYWORD1>FATTR</KEYWORD1>
+ <KEYWORD1>FBIN</KEYWORD1>
+ <KEYWORD1>FDEC</KEYWORD1>
+ <KEYWORD1>FIELD</KEYWORD1>
+ <KEYWORD1>FILEOPT</KEYWORD1>
+ <KEYWORD1>FILL</KEYWORD1>
+ <KEYWORD1>FLOATINGPOINT</KEYWORD1>
+ <KEYWORD1>FPT</KEYWORD1>
+ <KEYWORD1>GAP</KEYWORD1>
+ <KEYWORD1>HSA</KEYWORD1>
+ <KEYWORD1>HSH</KEYWORD1>
+ <KEYWORD1>HTA</KEYWORD1>
+ <KEYWORD1>IMP</KEYWORD1>
+ <KEYWORD1>INFO</KEYWORD1>
+ <KEYWORD1>INT</KEYWORD1>
+ <KEYWORD1>JUL</KEYWORD1>
+ <KEYWORD1>LCHECKIN</KEYWORD1>
+ <KEYWORD1>LCHECKOUT</KEYWORD1>
+ <KEYWORD1>LEN</KEYWORD1>
+ <KEYWORD1>LINFO</KEYWORD1>
+ <KEYWORD1>LOG</KEYWORD1>
+ <KEYWORD1>LRC</KEYWORD1>
+ <KEYWORD1>LST</KEYWORD1>
+ <KEYWORD1>MASK</KEYWORD1>
+ <KEYWORD1>MAX</KEYWORD1>
+ <KEYWORD1>MENUINFO</KEYWORD1>
+ <KEYWORD1>MIN</KEYWORD1>
+ <KEYWORD1>MOD</KEYWORD1>
+ <KEYWORD1>MSGBOX</KEYWORD1>
+ <KEYWORD1>NEVAL</KEYWORD1>
+ <KEYWORD1>NFIELD</KEYWORD1>
+ <KEYWORD1>NOTICE</KEYWORD1>
+ <KEYWORD1>NOTICETPL</KEYWORD1>
+ <KEYWORD1>NUM</KEYWORD1>
+ <KEYWORD1>PAD</KEYWORD1>
+ <KEYWORD1>PCK</KEYWORD1>
+ <KEYWORD1>PGM</KEYWORD1>
+ <KEYWORD1>POS</KEYWORD1>
+ <KEYWORD1>PROCESS_EVENTS</KEYWORD1>
+ <KEYWORD1>PROGRAM</KEYWORD1>
+ <KEYWORD1>PSZ</KEYWORD1>
+ <KEYWORD1>PUB</KEYWORD1>
+ <KEYWORD1>REMOVE_CALLBACK</KEYWORD1>
+ <KEYWORD1>RESERVE</KEYWORD1>
+ <KEYWORD1>RND</KEYWORD1>
+ <KEYWORD1>ROUND</KEYWORD1>
+ <KEYWORD1>SCALL</KEYWORD1>
+ <KEYWORD1>SENDMSG</KEYWORD1>
+ <KEYWORD1>SEVAL</KEYWORD1>
+ <KEYWORD1>SGN</KEYWORD1>
+ <KEYWORD1>SIN</KEYWORD1>
+ <KEYWORD1>SQR</KEYWORD1>
+ <KEYWORD1>SSORT</KEYWORD1>
+ <KEYWORD1>SSZ</KEYWORD1>
+ <KEYWORD1>STBL</KEYWORD1>
+ <KEYWORD1>STR</KEYWORD1>
+ <KEYWORD1>SWAP</KEYWORD1>
+ <KEYWORD1>SYS</KEYWORD1>
+ <KEYWORD1>TCB</KEYWORD1>
+ <KEYWORD1>TMPL</KEYWORD1>
+ <KEYWORD1>TSK</KEYWORD1>
+ <KEYWORD1>UPK</KEYWORD1>
+ <KEYWORD1>WINFIRST</KEYWORD1>
+ <KEYWORD1>WININFO</KEYWORD1>
+ <KEYWORD1>WINNEXT</KEYWORD1>
+
+ <KEYWORD2>CHDIR</KEYWORD2>
+ <KEYWORD2>CISAM</KEYWORD2>
+ <KEYWORD2>CLOSE</KEYWORD2>
+ <KEYWORD2>CONTINUE</KEYWORD2>
+ <KEYWORD2>DIRECT</KEYWORD2>
+ <KEYWORD2>DIR</KEYWORD2>
+ <KEYWORD2>DISABLE</KEYWORD2>
+ <KEYWORD2>DOM</KEYWORD2>
+ <KEYWORD2>DUMP</KEYWORD2>
+ <KEYWORD2>ENABLE</KEYWORD2>
+ <KEYWORD2>END</KEYWORD2>
+ <KEYWORD2>ENDTRACE</KEYWORD2>
+ <KEYWORD2>ERASE</KEYWORD2>
+ <KEYWORD2>EXTRACT</KEYWORD2>
+ <KEYWORD2>FID</KEYWORD2>
+ <KEYWORD2>FILE</KEYWORD2>
+ <KEYWORD2>FIN</KEYWORD2>
+ <KEYWORD2>FIND</KEYWORD2>
+ <KEYWORD2>FROM</KEYWORD2>
+ <KEYWORD2>IND</KEYWORD2>
+ <KEYWORD2>INDEXED</KEYWORD2>
+ <KEYWORD2>INPUT</KEYWORD2>
+ <KEYWORD2>INPUTE</KEYWORD2>
+ <KEYWORD2>INPUTN</KEYWORD2>
+ <KEYWORD2>IOL</KEYWORD2>
+ <KEYWORD2>IOLIST</KEYWORD2>
+ <KEYWORD2>KEY</KEYWORD2>
+ <KEYWORD2>KEYF</KEYWORD2>
+ <KEYWORD2>KEYL</KEYWORD2>
+ <KEYWORD2>KEYN</KEYWORD2>
+ <KEYWORD2>KEYP</KEYWORD2>
+ <KEYWORD2>KGEN</KEYWORD2>
+ <KEYWORD2>KNUM</KEYWORD2>
+ <KEYWORD2>LIST</KEYWORD2>
+ <KEYWORD2>LOAD</KEYWORD2>
+ <KEYWORD2>LOCK</KEYWORD2>
+ <KEYWORD2>MERGE</KEYWORD2>
+ <KEYWORD2>MKDIR</KEYWORD2>
+ <KEYWORD2>MKEYED</KEYWORD2>
+ <KEYWORD2>OPEN</KEYWORD2>
+ <KEYWORD2>PREFIX</KEYWORD2>
+ <KEYWORD2>PRINT</KEYWORD2>
+ <KEYWORD2>READ_RESOURCE</KEYWORD2>
+ <KEYWORD2>READ</KEYWORD2>
+ <KEYWORD2>RECORD</KEYWORD2>
+ <KEYWORD2>REMOVE</KEYWORD2>
+ <KEYWORD2>RENAME</KEYWORD2>
+ <KEYWORD2>RESCLOSE</KEYWORD2>
+ <KEYWORD2>RESFIRST</KEYWORD2>
+ <KEYWORD2>RESGET</KEYWORD2>
+ <KEYWORD2>RESINFO</KEYWORD2>
+ <KEYWORD2>RESNEXT</KEYWORD2>
+ <KEYWORD2>RESOPEN</KEYWORD2>
+ <KEYWORD2>REV</KEYWORD2>
+ <KEYWORD2>RMDIR</KEYWORD2>
+ <KEYWORD2>SAVE</KEYWORD2>
+ <KEYWORD2>SELECT</KEYWORD2>
+ <KEYWORD2>SERIAL</KEYWORD2>
+ <KEYWORD2>SETDAY</KEYWORD2>
+ <KEYWORD2>SETDRIVE</KEYWORD2>
+ <KEYWORD2>SETTRACE</KEYWORD2>
+ <KEYWORD2>SIZ</KEYWORD2>
+ <KEYWORD2>SORT</KEYWORD2>
+ <KEYWORD2>SQLCHN</KEYWORD2>
+ <KEYWORD2>SQLCLOSE</KEYWORD2>
+ <KEYWORD2>SQLERR</KEYWORD2>
+ <KEYWORD2>SQLEXEC</KEYWORD2>
+ <KEYWORD2>SQLFETCH</KEYWORD2>
+ <KEYWORD2>SQLLIST</KEYWORD2>
+ <KEYWORD2>SQLOPEN</KEYWORD2>
+ <KEYWORD2>SQLPREP</KEYWORD2>
+ <KEYWORD2>SQLSET</KEYWORD2>
+ <KEYWORD2>SQLTABLES</KEYWORD2>
+ <KEYWORD2>SQLTMPL</KEYWORD2>
+ <KEYWORD2>SQLUNT</KEYWORD2>
+ <KEYWORD2>STRING</KEYWORD2>
+ <KEYWORD2>TABLE</KEYWORD2>
+ <KEYWORD2>TBL</KEYWORD2>
+ <KEYWORD2>TIM</KEYWORD2>
+ <KEYWORD2>UNLOCK</KEYWORD2>
+ <KEYWORD2>WHERE</KEYWORD2>
+ <KEYWORD2>WRITE</KEYWORD2>
+ <KEYWORD2>XFID</KEYWORD2>
+ <KEYWORD2>XFILE</KEYWORD2>
+ <KEYWORD2>XFIN</KEYWORD2>
+
+ <KEYWORD3>ADDR</KEYWORD3>
+ <KEYWORD3>ALL</KEYWORD3>
+ <KEYWORD3>AUTO</KEYWORD3>
+ <KEYWORD3>BEGIN</KEYWORD3>
+ <KEYWORD3>BREAK</KEYWORD3>
+ <KEYWORD3>CALL</KEYWORD3>
+ <KEYWORD3>CASE</KEYWORD3>
+ <KEYWORD3>CHN</KEYWORD3>
+ <KEYWORD3>CLEAR</KEYWORD3>
+ <KEYWORD3>CTL</KEYWORD3>
+ <KEYWORD3>DATA</KEYWORD3>
+ <KEYWORD3>DAY</KEYWORD3>
+ <KEYWORD3>DEF</KEYWORD3>
+ <KEYWORD3>DEFAULT</KEYWORD3>
+ <KEYWORD3>DEFEND</KEYWORD3>
+ <KEYWORD3>DELETE</KEYWORD3>
+ <KEYWORD3>DIM</KEYWORD3>
+ <KEYWORD3>DREAD</KEYWORD3>
+ <KEYWORD3>DROP</KEYWORD3>
+ <KEYWORD3>EDIT</KEYWORD3>
+ <KEYWORD3>ELSE</KEYWORD3>
+ <KEYWORD3>ENDIF</KEYWORD3>
+ <KEYWORD3>ENTER</KEYWORD3>
+ <KEYWORD3>ERR</KEYWORD3>
+ <KEYWORD3>ESCAPE</KEYWORD3>
+ <KEYWORD3>ESCOFF</KEYWORD3>
+ <KEYWORD3>ESCON</KEYWORD3>
+ <KEYWORD3>EXECUTE</KEYWORD3>
+ <KEYWORD3>EXIT</KEYWORD3>
+ <KEYWORD3>EXITTO</KEYWORD3>
+ <KEYWORD3>FI</KEYWORD3>
+ <KEYWORD3>FOR</KEYWORD3>
+ <KEYWORD3>GOSUB</KEYWORD3>
+ <KEYWORD3>GOTO</KEYWORD3>
+ <KEYWORD3>IF</KEYWORD3>
+ <KEYWORD3>IFF</KEYWORD3>
+ <KEYWORD3>INITFILE</KEYWORD3>
+ <KEYWORD3>IOR</KEYWORD3>
+ <KEYWORD3>LET</KEYWORD3>
+ <KEYWORD3>NEXT</KEYWORD3>
+ <KEYWORD3>NOT</KEYWORD3>
+ <KEYWORD3>ON</KEYWORD3>
+ <KEYWORD3>OPTS</KEYWORD3>
+ <KEYWORD3>OR</KEYWORD3>
+ <KEYWORD3>PFX</KEYWORD3>
+ <KEYWORD3>PRECISION</KEYWORD3>
+ <KEYWORD3>RELEASE</KEYWORD3>
+ <KEYWORD3>RENUM</KEYWORD3>
+ <KEYWORD3>REPEAT</KEYWORD3>
+ <KEYWORD3>RESET</KEYWORD3>
+ <KEYWORD3>RESTORE</KEYWORD3>
+ <KEYWORD3>RETRY</KEYWORD3>
+ <KEYWORD3>RETURN</KEYWORD3>
+ <KEYWORD3>RUN</KEYWORD3>
+ <KEYWORD3>SET_CASE_SENSITIVE_OFF</KEYWORD3>
+ <KEYWORD3>SET_CASE_SENSITIVE_ON</KEYWORD3>
+ <KEYWORD3>SETERR</KEYWORD3>
+ <KEYWORD3>SETESC</KEYWORD3>
+ <KEYWORD3>SETOPTS</KEYWORD3>
+ <KEYWORD3>SETTIME</KEYWORD3>
+ <KEYWORD3>SSN</KEYWORD3>
+ <KEYWORD3>START</KEYWORD3>
+ <KEYWORD3>STEP</KEYWORD3>
+ <KEYWORD3>STOP</KEYWORD3>
+ <KEYWORD3>SWEND</KEYWORD3>
+ <KEYWORD3>SWITCH</KEYWORD3>
+ <KEYWORD3>THEN</KEYWORD3>
+ <KEYWORD3>TO</KEYWORD3>
+ <KEYWORD3>UNT</KEYWORD3>
+ <KEYWORD3>UNTIL</KEYWORD3>
+ <KEYWORD3>WAIT</KEYWORD3>
+ <KEYWORD3>WEND</KEYWORD3>
+ <KEYWORD3>WHILE</KEYWORD3>
+ <KEYWORD3>XOR</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/bcel.xml b/jEdit/modes/bcel.xml
index 19ab3cf..328858c 100644
--- a/jEdit/modes/bcel.xml
+++ b/jEdit/modes/bcel.xml
@@ -1,320 +1,320 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- Java bytecode mode. Used by Andre Kaplan's JavaInsight plugin.
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
-
-
- <RULES HIGHLIGHT_DIGITS="TRUE">
- <!-- Silly comment -->
- <SEQ TYPE="COMMENT1">/**/</SEQ>
-
- <!-- Javadoc comment -->
- <SPAN TYPE="COMMENT3" DELEGATE="JAVADOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- Java comment (C style) -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="FALSE">%</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="FALSE">#</MARK_FOLLOWING>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
-
- <KEYWORDS>
- <!-- Some java keywords -->
- <KEYWORD1>abstract</KEYWORD1>
- <!-- <KEYWORD1>break</KEYWORD1> -->
- <!-- <KEYWORD1>case</KEYWORD1> -->
- <!-- <KEYWORD1>catch</KEYWORD1> -->
- <!-- <KEYWORD1>continue</KEYWORD1> -->
- <!-- <KEYWORD1>default</KEYWORD1> -->
- <!-- <KEYWORD1>do</KEYWORD1> -->
- <!-- <KEYWORD1>else</KEYWORD1> -->
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <!-- <KEYWORD1>finally</KEYWORD1> -->
- <!-- <KEYWORD1>for</KEYWORD1> -->
- <!-- <KEYWORD1>if</KEYWORD1> -->
- <KEYWORD1>implements</KEYWORD1>
- <!-- <KEYWORD1>instanceof</KEYWORD1> -->
- <KEYWORD1>native</KEYWORD1>
- <!-- <KEYWORD1>new</KEYWORD1> -->
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <!-- <KEYWORD1>return</KEYWORD1> -->
- <KEYWORD1>static</KEYWORD1>
- <!-- <KEYWORD1>switch</KEYWORD1> -->
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>throws</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <!-- <KEYWORD1>try</KEYWORD1> -->
- <KEYWORD1>volatile</KEYWORD1>
- <!-- <KEYWORD1>while</KEYWORD1> -->
-
- <!-- <KEYWORD2>package</KEYWORD2> -->
- <!-- <KEYWORD2>import</KEYWORD2> -->
-
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>interface</KEYWORD3>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD3>void</KEYWORD3>
-
- <!-- <LITERAL2>false</LITERAL2> -->
- <!-- <LITERAL2>null</LITERAL2> -->
- <!-- <LITERAL2>super</LITERAL2> -->
- <!-- <LITERAL2>this</LITERAL2> -->
- <!-- <LITERAL2>true</LITERAL2> -->
-
- <KEYWORD1>clinit</KEYWORD1>
- <KEYWORD1>init</KEYWORD1>
-
- <!-- 00 (0x00) --><KEYWORD1>nop</KEYWORD1>
- <!-- 01 (0x01) --><KEYWORD1>aconst_null</KEYWORD1>
- <!-- 02 (0x02) --><KEYWORD1>iconst_m1</KEYWORD1>
- <!-- 03 (0x03) --><KEYWORD1>iconst_0</KEYWORD1>
- <!-- 04 (0x04) --><KEYWORD1>iconst_1</KEYWORD1>
- <!-- 05 (0x05) --><KEYWORD1>iconst_2</KEYWORD1>
- <!-- 06 (0x06) --><KEYWORD1>iconst_3</KEYWORD1>
- <!-- 07 (0x07) --><KEYWORD1>iconst_4</KEYWORD1>
- <!-- 08 (0x08) --><KEYWORD1>iconst_5</KEYWORD1>
- <!-- 09 (0x09) --><KEYWORD1>lconst_0</KEYWORD1>
- <!-- 10 (0x0a) --><KEYWORD1>lconst_1</KEYWORD1>
- <!-- 11 (0x0b) --><KEYWORD1>fconst_0</KEYWORD1>
- <!-- 12 (0x0c) --><KEYWORD1>fconst_1</KEYWORD1>
- <!-- 13 (0x0d) --><KEYWORD1>fconst_2</KEYWORD1>
- <!-- 14 (0x0e) --><KEYWORD1>dconst_0</KEYWORD1>
- <!-- 15 (0x0f) --><KEYWORD1>dconst_1</KEYWORD1>
- <!-- 16 (0x10) --><KEYWORD1>bipush</KEYWORD1>
- <!-- 17 (0x11) --><KEYWORD1>sipush</KEYWORD1>
- <!-- 18 (0x12) --><KEYWORD1>ldc</KEYWORD1>
- <!-- 19 (0x13) --><KEYWORD1>ldc_w</KEYWORD1>
- <!-- 20 (0x14) --><KEYWORD1>ldc2_w</KEYWORD1>
- <!-- 21 (0x15) --><KEYWORD1>iload</KEYWORD1>
- <!-- 22 (0x16) --><KEYWORD1>lload</KEYWORD1>
- <!-- 23 (0x17) --><KEYWORD1>fload</KEYWORD1>
- <!-- 24 (0x18) --><KEYWORD1>dload</KEYWORD1>
- <!-- 25 (0x19) --><KEYWORD1>aload</KEYWORD1>
- <!-- 26 (0x1a) --><KEYWORD1>iload_0</KEYWORD1>
- <!-- 27 (0x1b) --><KEYWORD1>iload_1</KEYWORD1>
- <!-- 28 (0x1c) --><KEYWORD1>iload_2</KEYWORD1>
- <!-- 29 (0x1d) --><KEYWORD1>iload_3</KEYWORD1>
- <!-- 30 (0x1e) --><KEYWORD1>lload_0</KEYWORD1>
- <!-- 31 (0x1f) --><KEYWORD1>lload_1</KEYWORD1>
- <!-- 32 (0x20) --><KEYWORD1>lload_2</KEYWORD1>
- <!-- 33 (0x21) --><KEYWORD1>lload_3</KEYWORD1>
- <!-- 34 (0x22) --><KEYWORD1>fload_0</KEYWORD1>
- <!-- 35 (0x23) --><KEYWORD1>fload_1</KEYWORD1>
- <!-- 36 (0x24) --><KEYWORD1>fload_2</KEYWORD1>
- <!-- 37 (0x25) --><KEYWORD1>fload_3</KEYWORD1>
- <!-- 38 (0x26) --><KEYWORD1>dload_0</KEYWORD1>
- <!-- 39 (0x27) --><KEYWORD1>dload_1</KEYWORD1>
- <!-- 40 (0x28) --><KEYWORD1>dload_2</KEYWORD1>
- <!-- 41 (0x29) --><KEYWORD1>dload_3</KEYWORD1>
- <!-- 42 (0x2a) --><KEYWORD1>aload_0</KEYWORD1>
- <!-- 43 (0x2b) --><KEYWORD1>aload_1</KEYWORD1>
- <!-- 44 (0x2c) --><KEYWORD1>aload_2</KEYWORD1>
- <!-- 45 (0x2d) --><KEYWORD1>aload_3</KEYWORD1>
- <!-- 46 (0x2e) --><KEYWORD1>iaload</KEYWORD1>
- <!-- 47 (0x2f) --><KEYWORD1>laload</KEYWORD1>
- <!-- 48 (0x30) --><KEYWORD1>faload</KEYWORD1>
- <!-- 49 (0x31) --><KEYWORD1>daload</KEYWORD1>
- <!-- 50 (0x32) --><KEYWORD1>aaload</KEYWORD1>
- <!-- 51 (0x33) --><KEYWORD1>baload</KEYWORD1>
- <!-- 52 (0x34) --><KEYWORD1>caload</KEYWORD1>
- <!-- 53 (0x35) --><KEYWORD1>saload</KEYWORD1>
- <!-- 54 (0x36) --><KEYWORD1>istore</KEYWORD1>
- <!-- 55 (0x37) --><KEYWORD1>lstore</KEYWORD1>
- <!-- 56 (0x38) --><KEYWORD1>fstore</KEYWORD1>
- <!-- 57 (0x39) --><KEYWORD1>dstore</KEYWORD1>
- <!-- 58 (0x3a) --><KEYWORD1>astore</KEYWORD1>
- <!-- 59 (0x3b) --><KEYWORD1>istore_0</KEYWORD1>
- <!-- 60 (0x3c) --><KEYWORD1>istore_1</KEYWORD1>
- <!-- 61 (0x3d) --><KEYWORD1>istore_2</KEYWORD1>
- <!-- 62 (0x3e) --><KEYWORD1>istore_3</KEYWORD1>
- <!-- 63 (0x3f) --><KEYWORD1>lstore_0</KEYWORD1>
- <!-- 64 (0x40) --><KEYWORD1>lstore_1</KEYWORD1>
- <!-- 65 (0x41) --><KEYWORD1>lstore_2</KEYWORD1>
- <!-- 66 (0x42) --><KEYWORD1>lstore_3</KEYWORD1>
- <!-- 67 (0x43) --><KEYWORD1>fstore_0</KEYWORD1>
- <!-- 68 (0x44) --><KEYWORD1>fstore_1</KEYWORD1>
- <!-- 69 (0x45) --><KEYWORD1>fstore_2</KEYWORD1>
- <!-- 70 (0x46) --><KEYWORD1>fstore_3</KEYWORD1>
- <!-- 71 (0x47) --><KEYWORD1>dstore_0</KEYWORD1>
- <!-- 72 (0x48) --><KEYWORD1>dstore_1</KEYWORD1>
- <!-- 73 (0x49) --><KEYWORD1>dstore_2</KEYWORD1>
- <!-- 74 (0x4a) --><KEYWORD1>dstore_3</KEYWORD1>
- <!-- 75 (0x4b) --><KEYWORD1>astore_0</KEYWORD1>
- <!-- 76 (0x4c) --><KEYWORD1>astore_1</KEYWORD1>
- <!-- 77 (0x4d) --><KEYWORD1>astore_2</KEYWORD1>
- <!-- 78 (0x4e) --><KEYWORD1>astore_3</KEYWORD1>
- <!-- 79 (0x4f) --><KEYWORD1>iastore</KEYWORD1>
- <!-- 80 (0x50) --><KEYWORD1>lastore</KEYWORD1>
- <!-- 81 (0x51) --><KEYWORD1>fastore</KEYWORD1>
- <!-- 82 (0x52) --><KEYWORD1>dastore</KEYWORD1>
- <!-- 83 (0x53) --><KEYWORD1>aastore</KEYWORD1>
- <!-- 84 (0x54) --><KEYWORD1>bastore</KEYWORD1>
- <!-- 85 (0x55) --><KEYWORD1>castore</KEYWORD1>
- <!-- 86 (0x56) --><KEYWORD1>sastore</KEYWORD1>
- <!-- 87 (0x57) --><KEYWORD1>pop</KEYWORD1>
- <!-- 88 (0x58) --><KEYWORD1>pop2</KEYWORD1>
- <!-- 089 (0x59) --><KEYWORD1>dup</KEYWORD1>
- <!-- 090 (0x5a) --><KEYWORD1>dup_x1</KEYWORD1>
- <!-- 091 (0x5b) --><KEYWORD1>dup_x2</KEYWORD1>
- <!-- 092 (0x5c) --><KEYWORD1>dup2</KEYWORD1>
- <!-- 093 (0x5d) --><KEYWORD1>dup2_x1</KEYWORD1>
- <!-- 094 (0x5e) --><KEYWORD1>dup2_x2</KEYWORD1>
- <!-- 095 (0x5f) --><KEYWORD1>swap</KEYWORD1>
- <!-- 096 (0x60) --><KEYWORD1>iadd</KEYWORD1>
- <!-- 097 (0x61) --><KEYWORD1>ladd</KEYWORD1>
- <!-- 098 (0x62) --><KEYWORD1>fadd</KEYWORD1>
- <!-- 099 (0x63) --><KEYWORD1>dadd</KEYWORD1>
- <!-- 100 (0x64) --><KEYWORD1>isub</KEYWORD1>
- <!-- 101 (0x65) --><KEYWORD1>lsub</KEYWORD1>
- <!-- 102 (0x66) --><KEYWORD1>fsub</KEYWORD1>
- <!-- 103 (0x67) --><KEYWORD1>dsub</KEYWORD1>
- <!-- 104 (0x68) --><KEYWORD1>imul</KEYWORD1>
- <!-- 105 (0x69) --><KEYWORD1>lmul</KEYWORD1>
- <!-- 106 (0x6a) --><KEYWORD1>fmul</KEYWORD1>
- <!-- 107 (0x6b) --><KEYWORD1>dmul</KEYWORD1>
- <!-- 108 (0x6c) --><KEYWORD1>idiv</KEYWORD1>
- <!-- 109 (0x6d) --><KEYWORD1>ldiv</KEYWORD1>
- <!-- 110 (0x6e) --><KEYWORD1>fdiv</KEYWORD1>
- <!-- 111 (0x6f) --><KEYWORD1>ddiv</KEYWORD1>
- <!-- 112 (0x70) --><KEYWORD1>irem</KEYWORD1>
- <!-- 113 (0x71) --><KEYWORD1>lrem</KEYWORD1>
- <!-- 114 (0x72) --><KEYWORD1>frem</KEYWORD1>
- <!-- 115 (0x73) --><KEYWORD1>drem</KEYWORD1>
- <!-- 116 (0x74) --><KEYWORD1>ineg</KEYWORD1>
- <!-- 117 (0x75) --><KEYWORD1>lneg</KEYWORD1>
- <!-- 118 (0x76) --><KEYWORD1>fneg</KEYWORD1>
- <!-- 119 (0x77) --><KEYWORD1>dneg</KEYWORD1>
- <!-- 120 (0x78) --><KEYWORD1>ishl</KEYWORD1>
- <!-- 121 (0x79) --><KEYWORD1>lshl</KEYWORD1>
- <!-- 122 (0x7a) --><KEYWORD1>ishr</KEYWORD1>
- <!-- 123 (0x7b) --><KEYWORD1>lshr</KEYWORD1>
- <!-- 124 (0x7c) --><KEYWORD1>iushr</KEYWORD1>
- <!-- 125 (0x7d) --><KEYWORD1>lushr</KEYWORD1>
- <!-- 126 (0x7e) --><KEYWORD1>iand</KEYWORD1>
- <!-- 127 (0x7f) --><KEYWORD1>land</KEYWORD1>
- <!-- 128 (0x80) --><KEYWORD1>ior</KEYWORD1>
- <!-- 129 (0x81) --><KEYWORD1>lor</KEYWORD1>
- <!-- 130 (0x82) --><KEYWORD1>ixor</KEYWORD1>
- <!-- 131 (0x83) --><KEYWORD1>lxor</KEYWORD1>
- <!-- 132 (0x84) --><KEYWORD1>iinc</KEYWORD1>
- <!-- 133 (0x85) --><KEYWORD1>i2l</KEYWORD1>
- <!-- 134 (0x86) --><KEYWORD1>i2f</KEYWORD1>
- <!-- 135 (0x87) --><KEYWORD1>i2d</KEYWORD1>
- <!-- 136 (0x88) --><KEYWORD1>l2i</KEYWORD1>
- <!-- 137 (0x89) --><KEYWORD1>l2f</KEYWORD1>
- <!-- 138 (0x8a) --><KEYWORD1>l2d</KEYWORD1>
- <!-- 139 (0x8b) --><KEYWORD1>f2i</KEYWORD1>
- <!-- 140 (0x8c) --><KEYWORD1>f2l</KEYWORD1>
- <!-- 141 (0x8d) --><KEYWORD1>f2d</KEYWORD1>
- <!-- 142 (0x8e) --><KEYWORD1>d2i</KEYWORD1>
- <!-- 143 (0x8f) --><KEYWORD1>d2l</KEYWORD1>
- <!-- 144 (0x90) --><KEYWORD1>d2f</KEYWORD1>
- <!-- 145 (0x91) --><KEYWORD1>i2b</KEYWORD1>
- <!-- 146 (0x92) --><KEYWORD1>i2c</KEYWORD1>
- <!-- 147 (0x93) --><KEYWORD1>i2s</KEYWORD1>
- <!-- 148 (0x94) --><KEYWORD1>lcmp</KEYWORD1>
- <!-- 149 (0x95) --><KEYWORD1>fcmpl</KEYWORD1>
- <!-- 150 (0x96) --><KEYWORD1>fcmpg</KEYWORD1>
- <!-- 151 (0x97) --><KEYWORD1>dcmpl</KEYWORD1>
- <!-- 152 (0x98) --><KEYWORD1>dcmpg</KEYWORD1>
- <!-- 153 (0x99) --><KEYWORD1>ifeq</KEYWORD1>
- <!-- 154 (0x9a) --><KEYWORD1>ifne</KEYWORD1>
- <!-- 155 (0x9b) --><KEYWORD1>iflt</KEYWORD1>
- <!-- 156 (0x9c) --><KEYWORD1>ifge</KEYWORD1>
- <!-- 157 (0x9d) --><KEYWORD1>ifgt</KEYWORD1>
- <!-- 158 (0x9e) --><KEYWORD1>ifle</KEYWORD1>
- <!-- 159 (0x9f) --><KEYWORD1>if_icmpeq</KEYWORD1>
- <!-- 160 (0xa0) --><KEYWORD1>if_icmpne</KEYWORD1>
- <!-- 161 (0xa1) --><KEYWORD1>if_icmplt</KEYWORD1>
- <!-- 162 (0xa2) --><KEYWORD1>if_icmpge</KEYWORD1>
- <!-- 163 (0xa3) --><KEYWORD1>if_icmpgt</KEYWORD1>
- <!-- 164 (0xa4) --><KEYWORD1>if_icmple</KEYWORD1>
- <!-- 165 (0xa5) --><KEYWORD1>if_acmpeq</KEYWORD1>
- <!-- 166 (0xa6) --><KEYWORD1>if_acmpne</KEYWORD1>
- <!-- 167 (0xa7) --><KEYWORD1>goto</KEYWORD1>
- <!-- 168 (0xa8) --><KEYWORD1>jsr</KEYWORD1>
- <!-- 169 (0xa9) --><KEYWORD1>ret</KEYWORD1>
- <!-- 170 (0xaa) --><KEYWORD1>tableswitch</KEYWORD1>
- <!-- 171 (0xab) --><KEYWORD1>lookupswitch</KEYWORD1>
- <!-- 172 (0xac) --><KEYWORD1>ireturn</KEYWORD1>
- <!-- 173 (0xad) --><KEYWORD1>lreturn</KEYWORD1>
- <!-- 174 (0xae) --><KEYWORD1>freturn</KEYWORD1>
- <!-- 175 (0xaf) --><KEYWORD1>dreturn</KEYWORD1>
- <!-- 176 (0xb0) --><KEYWORD1>areturn</KEYWORD1>
- <!-- 177 (0xb1) --><KEYWORD1>return</KEYWORD1>
- <!-- 178 (0xb2) --><KEYWORD1>getstatic</KEYWORD1>
- <!-- 179 (0xb3) --><KEYWORD1>putstatic</KEYWORD1>
- <!-- 180 (0xb4) --><KEYWORD1>getfield</KEYWORD1>
- <!-- 181 (0xb5) --><KEYWORD1>putfield</KEYWORD1>
- <!-- 182 (0xb6) --><KEYWORD1>invokevirtual</KEYWORD1>
- <!-- 183 (0xb7) --><KEYWORD1>invokespecial</KEYWORD1>
- <!-- 184 (0xb8) --><KEYWORD1>invokestatic</KEYWORD1>
- <!-- 185 (0xb9) --><KEYWORD1>invokeinterface</KEYWORD1>
- <!-- 186 (0xba) --><!-- xxxunusedxxx -->
- <!-- 187 (0xbb) --><KEYWORD1>new</KEYWORD1>
- <!-- 188 (0xbc) --><KEYWORD1>newarray</KEYWORD1>
- <!-- 189 (0xbd) --><KEYWORD1>anewarray</KEYWORD1>
- <!-- 190 (0xbe) --><KEYWORD1>arraylength</KEYWORD1>
- <!-- 191 (0xbf) --><KEYWORD1>athrow</KEYWORD1>
- <!-- 192 (0xc0) --><KEYWORD1>checkcast</KEYWORD1>
- <!-- 193 (0xc1) --><KEYWORD1>instanceof</KEYWORD1>
- <!-- 194 (0xc2) --><KEYWORD1>monitorenter</KEYWORD1>
- <!-- 195 (0xc3) --><KEYWORD1>monitorexit</KEYWORD1>
- <!-- 196 (0xc4) --><KEYWORD1>wide</KEYWORD1>
- <!-- 197 (0xc5) --><KEYWORD1>multianewarray</KEYWORD1>
- <!-- 198 (0xc6) --><KEYWORD1>ifnull</KEYWORD1>
- <!-- 199 (0xc7) --><KEYWORD1>ifnonnull</KEYWORD1>
- <!-- 200 (0xc8) --><KEYWORD1>goto_w</KEYWORD1>
- <!-- 201 (0xc9) --><KEYWORD1>jsr_w</KEYWORD1>
-
- <!-- Reserved opcodes: -->
- <!-- 202 (0xca) --><KEYWORD1>breakpoint</KEYWORD1>
- <!-- 254 (0xfe) --><KEYWORD1>impdep1</KEYWORD1>
- <!-- 255 (0xff) --><KEYWORD1>impdep2</KEYWORD1>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ Java bytecode mode. Used by Andre Kaplan's JavaInsight plugin.
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+
+
+ <RULES HIGHLIGHT_DIGITS="TRUE">
+ <!-- Silly comment -->
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+
+ <!-- Javadoc comment -->
+ <SPAN TYPE="COMMENT3" DELEGATE="JAVADOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Java comment (C style) -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="FALSE">%</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2" AT_LINE_START="FALSE">#</MARK_FOLLOWING>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+
+ <KEYWORDS>
+ <!-- Some java keywords -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <!-- <KEYWORD1>break</KEYWORD1> -->
+ <!-- <KEYWORD1>case</KEYWORD1> -->
+ <!-- <KEYWORD1>catch</KEYWORD1> -->
+ <!-- <KEYWORD1>continue</KEYWORD1> -->
+ <!-- <KEYWORD1>default</KEYWORD1> -->
+ <!-- <KEYWORD1>do</KEYWORD1> -->
+ <!-- <KEYWORD1>else</KEYWORD1> -->
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <!-- <KEYWORD1>finally</KEYWORD1> -->
+ <!-- <KEYWORD1>for</KEYWORD1> -->
+ <!-- <KEYWORD1>if</KEYWORD1> -->
+ <KEYWORD1>implements</KEYWORD1>
+ <!-- <KEYWORD1>instanceof</KEYWORD1> -->
+ <KEYWORD1>native</KEYWORD1>
+ <!-- <KEYWORD1>new</KEYWORD1> -->
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <!-- <KEYWORD1>return</KEYWORD1> -->
+ <KEYWORD1>static</KEYWORD1>
+ <!-- <KEYWORD1>switch</KEYWORD1> -->
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>throws</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <!-- <KEYWORD1>try</KEYWORD1> -->
+ <KEYWORD1>volatile</KEYWORD1>
+ <!-- <KEYWORD1>while</KEYWORD1> -->
+
+ <!-- <KEYWORD2>package</KEYWORD2> -->
+ <!-- <KEYWORD2>import</KEYWORD2> -->
+
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>interface</KEYWORD3>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD3>void</KEYWORD3>
+
+ <!-- <LITERAL2>false</LITERAL2> -->
+ <!-- <LITERAL2>null</LITERAL2> -->
+ <!-- <LITERAL2>super</LITERAL2> -->
+ <!-- <LITERAL2>this</LITERAL2> -->
+ <!-- <LITERAL2>true</LITERAL2> -->
+
+ <KEYWORD1>clinit</KEYWORD1>
+ <KEYWORD1>init</KEYWORD1>
+
+ <!-- 00 (0x00) --><KEYWORD1>nop</KEYWORD1>
+ <!-- 01 (0x01) --><KEYWORD1>aconst_null</KEYWORD1>
+ <!-- 02 (0x02) --><KEYWORD1>iconst_m1</KEYWORD1>
+ <!-- 03 (0x03) --><KEYWORD1>iconst_0</KEYWORD1>
+ <!-- 04 (0x04) --><KEYWORD1>iconst_1</KEYWORD1>
+ <!-- 05 (0x05) --><KEYWORD1>iconst_2</KEYWORD1>
+ <!-- 06 (0x06) --><KEYWORD1>iconst_3</KEYWORD1>
+ <!-- 07 (0x07) --><KEYWORD1>iconst_4</KEYWORD1>
+ <!-- 08 (0x08) --><KEYWORD1>iconst_5</KEYWORD1>
+ <!-- 09 (0x09) --><KEYWORD1>lconst_0</KEYWORD1>
+ <!-- 10 (0x0a) --><KEYWORD1>lconst_1</KEYWORD1>
+ <!-- 11 (0x0b) --><KEYWORD1>fconst_0</KEYWORD1>
+ <!-- 12 (0x0c) --><KEYWORD1>fconst_1</KEYWORD1>
+ <!-- 13 (0x0d) --><KEYWORD1>fconst_2</KEYWORD1>
+ <!-- 14 (0x0e) --><KEYWORD1>dconst_0</KEYWORD1>
+ <!-- 15 (0x0f) --><KEYWORD1>dconst_1</KEYWORD1>
+ <!-- 16 (0x10) --><KEYWORD1>bipush</KEYWORD1>
+ <!-- 17 (0x11) --><KEYWORD1>sipush</KEYWORD1>
+ <!-- 18 (0x12) --><KEYWORD1>ldc</KEYWORD1>
+ <!-- 19 (0x13) --><KEYWORD1>ldc_w</KEYWORD1>
+ <!-- 20 (0x14) --><KEYWORD1>ldc2_w</KEYWORD1>
+ <!-- 21 (0x15) --><KEYWORD1>iload</KEYWORD1>
+ <!-- 22 (0x16) --><KEYWORD1>lload</KEYWORD1>
+ <!-- 23 (0x17) --><KEYWORD1>fload</KEYWORD1>
+ <!-- 24 (0x18) --><KEYWORD1>dload</KEYWORD1>
+ <!-- 25 (0x19) --><KEYWORD1>aload</KEYWORD1>
+ <!-- 26 (0x1a) --><KEYWORD1>iload_0</KEYWORD1>
+ <!-- 27 (0x1b) --><KEYWORD1>iload_1</KEYWORD1>
+ <!-- 28 (0x1c) --><KEYWORD1>iload_2</KEYWORD1>
+ <!-- 29 (0x1d) --><KEYWORD1>iload_3</KEYWORD1>
+ <!-- 30 (0x1e) --><KEYWORD1>lload_0</KEYWORD1>
+ <!-- 31 (0x1f) --><KEYWORD1>lload_1</KEYWORD1>
+ <!-- 32 (0x20) --><KEYWORD1>lload_2</KEYWORD1>
+ <!-- 33 (0x21) --><KEYWORD1>lload_3</KEYWORD1>
+ <!-- 34 (0x22) --><KEYWORD1>fload_0</KEYWORD1>
+ <!-- 35 (0x23) --><KEYWORD1>fload_1</KEYWORD1>
+ <!-- 36 (0x24) --><KEYWORD1>fload_2</KEYWORD1>
+ <!-- 37 (0x25) --><KEYWORD1>fload_3</KEYWORD1>
+ <!-- 38 (0x26) --><KEYWORD1>dload_0</KEYWORD1>
+ <!-- 39 (0x27) --><KEYWORD1>dload_1</KEYWORD1>
+ <!-- 40 (0x28) --><KEYWORD1>dload_2</KEYWORD1>
+ <!-- 41 (0x29) --><KEYWORD1>dload_3</KEYWORD1>
+ <!-- 42 (0x2a) --><KEYWORD1>aload_0</KEYWORD1>
+ <!-- 43 (0x2b) --><KEYWORD1>aload_1</KEYWORD1>
+ <!-- 44 (0x2c) --><KEYWORD1>aload_2</KEYWORD1>
+ <!-- 45 (0x2d) --><KEYWORD1>aload_3</KEYWORD1>
+ <!-- 46 (0x2e) --><KEYWORD1>iaload</KEYWORD1>
+ <!-- 47 (0x2f) --><KEYWORD1>laload</KEYWORD1>
+ <!-- 48 (0x30) --><KEYWORD1>faload</KEYWORD1>
+ <!-- 49 (0x31) --><KEYWORD1>daload</KEYWORD1>
+ <!-- 50 (0x32) --><KEYWORD1>aaload</KEYWORD1>
+ <!-- 51 (0x33) --><KEYWORD1>baload</KEYWORD1>
+ <!-- 52 (0x34) --><KEYWORD1>caload</KEYWORD1>
+ <!-- 53 (0x35) --><KEYWORD1>saload</KEYWORD1>
+ <!-- 54 (0x36) --><KEYWORD1>istore</KEYWORD1>
+ <!-- 55 (0x37) --><KEYWORD1>lstore</KEYWORD1>
+ <!-- 56 (0x38) --><KEYWORD1>fstore</KEYWORD1>
+ <!-- 57 (0x39) --><KEYWORD1>dstore</KEYWORD1>
+ <!-- 58 (0x3a) --><KEYWORD1>astore</KEYWORD1>
+ <!-- 59 (0x3b) --><KEYWORD1>istore_0</KEYWORD1>
+ <!-- 60 (0x3c) --><KEYWORD1>istore_1</KEYWORD1>
+ <!-- 61 (0x3d) --><KEYWORD1>istore_2</KEYWORD1>
+ <!-- 62 (0x3e) --><KEYWORD1>istore_3</KEYWORD1>
+ <!-- 63 (0x3f) --><KEYWORD1>lstore_0</KEYWORD1>
+ <!-- 64 (0x40) --><KEYWORD1>lstore_1</KEYWORD1>
+ <!-- 65 (0x41) --><KEYWORD1>lstore_2</KEYWORD1>
+ <!-- 66 (0x42) --><KEYWORD1>lstore_3</KEYWORD1>
+ <!-- 67 (0x43) --><KEYWORD1>fstore_0</KEYWORD1>
+ <!-- 68 (0x44) --><KEYWORD1>fstore_1</KEYWORD1>
+ <!-- 69 (0x45) --><KEYWORD1>fstore_2</KEYWORD1>
+ <!-- 70 (0x46) --><KEYWORD1>fstore_3</KEYWORD1>
+ <!-- 71 (0x47) --><KEYWORD1>dstore_0</KEYWORD1>
+ <!-- 72 (0x48) --><KEYWORD1>dstore_1</KEYWORD1>
+ <!-- 73 (0x49) --><KEYWORD1>dstore_2</KEYWORD1>
+ <!-- 74 (0x4a) --><KEYWORD1>dstore_3</KEYWORD1>
+ <!-- 75 (0x4b) --><KEYWORD1>astore_0</KEYWORD1>
+ <!-- 76 (0x4c) --><KEYWORD1>astore_1</KEYWORD1>
+ <!-- 77 (0x4d) --><KEYWORD1>astore_2</KEYWORD1>
+ <!-- 78 (0x4e) --><KEYWORD1>astore_3</KEYWORD1>
+ <!-- 79 (0x4f) --><KEYWORD1>iastore</KEYWORD1>
+ <!-- 80 (0x50) --><KEYWORD1>lastore</KEYWORD1>
+ <!-- 81 (0x51) --><KEYWORD1>fastore</KEYWORD1>
+ <!-- 82 (0x52) --><KEYWORD1>dastore</KEYWORD1>
+ <!-- 83 (0x53) --><KEYWORD1>aastore</KEYWORD1>
+ <!-- 84 (0x54) --><KEYWORD1>bastore</KEYWORD1>
+ <!-- 85 (0x55) --><KEYWORD1>castore</KEYWORD1>
+ <!-- 86 (0x56) --><KEYWORD1>sastore</KEYWORD1>
+ <!-- 87 (0x57) --><KEYWORD1>pop</KEYWORD1>
+ <!-- 88 (0x58) --><KEYWORD1>pop2</KEYWORD1>
+ <!-- 089 (0x59) --><KEYWORD1>dup</KEYWORD1>
+ <!-- 090 (0x5a) --><KEYWORD1>dup_x1</KEYWORD1>
+ <!-- 091 (0x5b) --><KEYWORD1>dup_x2</KEYWORD1>
+ <!-- 092 (0x5c) --><KEYWORD1>dup2</KEYWORD1>
+ <!-- 093 (0x5d) --><KEYWORD1>dup2_x1</KEYWORD1>
+ <!-- 094 (0x5e) --><KEYWORD1>dup2_x2</KEYWORD1>
+ <!-- 095 (0x5f) --><KEYWORD1>swap</KEYWORD1>
+ <!-- 096 (0x60) --><KEYWORD1>iadd</KEYWORD1>
+ <!-- 097 (0x61) --><KEYWORD1>ladd</KEYWORD1>
+ <!-- 098 (0x62) --><KEYWORD1>fadd</KEYWORD1>
+ <!-- 099 (0x63) --><KEYWORD1>dadd</KEYWORD1>
+ <!-- 100 (0x64) --><KEYWORD1>isub</KEYWORD1>
+ <!-- 101 (0x65) --><KEYWORD1>lsub</KEYWORD1>
+ <!-- 102 (0x66) --><KEYWORD1>fsub</KEYWORD1>
+ <!-- 103 (0x67) --><KEYWORD1>dsub</KEYWORD1>
+ <!-- 104 (0x68) --><KEYWORD1>imul</KEYWORD1>
+ <!-- 105 (0x69) --><KEYWORD1>lmul</KEYWORD1>
+ <!-- 106 (0x6a) --><KEYWORD1>fmul</KEYWORD1>
+ <!-- 107 (0x6b) --><KEYWORD1>dmul</KEYWORD1>
+ <!-- 108 (0x6c) --><KEYWORD1>idiv</KEYWORD1>
+ <!-- 109 (0x6d) --><KEYWORD1>ldiv</KEYWORD1>
+ <!-- 110 (0x6e) --><KEYWORD1>fdiv</KEYWORD1>
+ <!-- 111 (0x6f) --><KEYWORD1>ddiv</KEYWORD1>
+ <!-- 112 (0x70) --><KEYWORD1>irem</KEYWORD1>
+ <!-- 113 (0x71) --><KEYWORD1>lrem</KEYWORD1>
+ <!-- 114 (0x72) --><KEYWORD1>frem</KEYWORD1>
+ <!-- 115 (0x73) --><KEYWORD1>drem</KEYWORD1>
+ <!-- 116 (0x74) --><KEYWORD1>ineg</KEYWORD1>
+ <!-- 117 (0x75) --><KEYWORD1>lneg</KEYWORD1>
+ <!-- 118 (0x76) --><KEYWORD1>fneg</KEYWORD1>
+ <!-- 119 (0x77) --><KEYWORD1>dneg</KEYWORD1>
+ <!-- 120 (0x78) --><KEYWORD1>ishl</KEYWORD1>
+ <!-- 121 (0x79) --><KEYWORD1>lshl</KEYWORD1>
+ <!-- 122 (0x7a) --><KEYWORD1>ishr</KEYWORD1>
+ <!-- 123 (0x7b) --><KEYWORD1>lshr</KEYWORD1>
+ <!-- 124 (0x7c) --><KEYWORD1>iushr</KEYWORD1>
+ <!-- 125 (0x7d) --><KEYWORD1>lushr</KEYWORD1>
+ <!-- 126 (0x7e) --><KEYWORD1>iand</KEYWORD1>
+ <!-- 127 (0x7f) --><KEYWORD1>land</KEYWORD1>
+ <!-- 128 (0x80) --><KEYWORD1>ior</KEYWORD1>
+ <!-- 129 (0x81) --><KEYWORD1>lor</KEYWORD1>
+ <!-- 130 (0x82) --><KEYWORD1>ixor</KEYWORD1>
+ <!-- 131 (0x83) --><KEYWORD1>lxor</KEYWORD1>
+ <!-- 132 (0x84) --><KEYWORD1>iinc</KEYWORD1>
+ <!-- 133 (0x85) --><KEYWORD1>i2l</KEYWORD1>
+ <!-- 134 (0x86) --><KEYWORD1>i2f</KEYWORD1>
+ <!-- 135 (0x87) --><KEYWORD1>i2d</KEYWORD1>
+ <!-- 136 (0x88) --><KEYWORD1>l2i</KEYWORD1>
+ <!-- 137 (0x89) --><KEYWORD1>l2f</KEYWORD1>
+ <!-- 138 (0x8a) --><KEYWORD1>l2d</KEYWORD1>
+ <!-- 139 (0x8b) --><KEYWORD1>f2i</KEYWORD1>
+ <!-- 140 (0x8c) --><KEYWORD1>f2l</KEYWORD1>
+ <!-- 141 (0x8d) --><KEYWORD1>f2d</KEYWORD1>
+ <!-- 142 (0x8e) --><KEYWORD1>d2i</KEYWORD1>
+ <!-- 143 (0x8f) --><KEYWORD1>d2l</KEYWORD1>
+ <!-- 144 (0x90) --><KEYWORD1>d2f</KEYWORD1>
+ <!-- 145 (0x91) --><KEYWORD1>i2b</KEYWORD1>
+ <!-- 146 (0x92) --><KEYWORD1>i2c</KEYWORD1>
+ <!-- 147 (0x93) --><KEYWORD1>i2s</KEYWORD1>
+ <!-- 148 (0x94) --><KEYWORD1>lcmp</KEYWORD1>
+ <!-- 149 (0x95) --><KEYWORD1>fcmpl</KEYWORD1>
+ <!-- 150 (0x96) --><KEYWORD1>fcmpg</KEYWORD1>
+ <!-- 151 (0x97) --><KEYWORD1>dcmpl</KEYWORD1>
+ <!-- 152 (0x98) --><KEYWORD1>dcmpg</KEYWORD1>
+ <!-- 153 (0x99) --><KEYWORD1>ifeq</KEYWORD1>
+ <!-- 154 (0x9a) --><KEYWORD1>ifne</KEYWORD1>
+ <!-- 155 (0x9b) --><KEYWORD1>iflt</KEYWORD1>
+ <!-- 156 (0x9c) --><KEYWORD1>ifge</KEYWORD1>
+ <!-- 157 (0x9d) --><KEYWORD1>ifgt</KEYWORD1>
+ <!-- 158 (0x9e) --><KEYWORD1>ifle</KEYWORD1>
+ <!-- 159 (0x9f) --><KEYWORD1>if_icmpeq</KEYWORD1>
+ <!-- 160 (0xa0) --><KEYWORD1>if_icmpne</KEYWORD1>
+ <!-- 161 (0xa1) --><KEYWORD1>if_icmplt</KEYWORD1>
+ <!-- 162 (0xa2) --><KEYWORD1>if_icmpge</KEYWORD1>
+ <!-- 163 (0xa3) --><KEYWORD1>if_icmpgt</KEYWORD1>
+ <!-- 164 (0xa4) --><KEYWORD1>if_icmple</KEYWORD1>
+ <!-- 165 (0xa5) --><KEYWORD1>if_acmpeq</KEYWORD1>
+ <!-- 166 (0xa6) --><KEYWORD1>if_acmpne</KEYWORD1>
+ <!-- 167 (0xa7) --><KEYWORD1>goto</KEYWORD1>
+ <!-- 168 (0xa8) --><KEYWORD1>jsr</KEYWORD1>
+ <!-- 169 (0xa9) --><KEYWORD1>ret</KEYWORD1>
+ <!-- 170 (0xaa) --><KEYWORD1>tableswitch</KEYWORD1>
+ <!-- 171 (0xab) --><KEYWORD1>lookupswitch</KEYWORD1>
+ <!-- 172 (0xac) --><KEYWORD1>ireturn</KEYWORD1>
+ <!-- 173 (0xad) --><KEYWORD1>lreturn</KEYWORD1>
+ <!-- 174 (0xae) --><KEYWORD1>freturn</KEYWORD1>
+ <!-- 175 (0xaf) --><KEYWORD1>dreturn</KEYWORD1>
+ <!-- 176 (0xb0) --><KEYWORD1>areturn</KEYWORD1>
+ <!-- 177 (0xb1) --><KEYWORD1>return</KEYWORD1>
+ <!-- 178 (0xb2) --><KEYWORD1>getstatic</KEYWORD1>
+ <!-- 179 (0xb3) --><KEYWORD1>putstatic</KEYWORD1>
+ <!-- 180 (0xb4) --><KEYWORD1>getfield</KEYWORD1>
+ <!-- 181 (0xb5) --><KEYWORD1>putfield</KEYWORD1>
+ <!-- 182 (0xb6) --><KEYWORD1>invokevirtual</KEYWORD1>
+ <!-- 183 (0xb7) --><KEYWORD1>invokespecial</KEYWORD1>
+ <!-- 184 (0xb8) --><KEYWORD1>invokestatic</KEYWORD1>
+ <!-- 185 (0xb9) --><KEYWORD1>invokeinterface</KEYWORD1>
+ <!-- 186 (0xba) --><!-- xxxunusedxxx -->
+ <!-- 187 (0xbb) --><KEYWORD1>new</KEYWORD1>
+ <!-- 188 (0xbc) --><KEYWORD1>newarray</KEYWORD1>
+ <!-- 189 (0xbd) --><KEYWORD1>anewarray</KEYWORD1>
+ <!-- 190 (0xbe) --><KEYWORD1>arraylength</KEYWORD1>
+ <!-- 191 (0xbf) --><KEYWORD1>athrow</KEYWORD1>
+ <!-- 192 (0xc0) --><KEYWORD1>checkcast</KEYWORD1>
+ <!-- 193 (0xc1) --><KEYWORD1>instanceof</KEYWORD1>
+ <!-- 194 (0xc2) --><KEYWORD1>monitorenter</KEYWORD1>
+ <!-- 195 (0xc3) --><KEYWORD1>monitorexit</KEYWORD1>
+ <!-- 196 (0xc4) --><KEYWORD1>wide</KEYWORD1>
+ <!-- 197 (0xc5) --><KEYWORD1>multianewarray</KEYWORD1>
+ <!-- 198 (0xc6) --><KEYWORD1>ifnull</KEYWORD1>
+ <!-- 199 (0xc7) --><KEYWORD1>ifnonnull</KEYWORD1>
+ <!-- 200 (0xc8) --><KEYWORD1>goto_w</KEYWORD1>
+ <!-- 201 (0xc9) --><KEYWORD1>jsr_w</KEYWORD1>
+
+ <!-- Reserved opcodes: -->
+ <!-- 202 (0xca) --><KEYWORD1>breakpoint</KEYWORD1>
+ <!-- 254 (0xfe) --><KEYWORD1>impdep1</KEYWORD1>
+ <!-- 255 (0xff) --><KEYWORD1>impdep2</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/bibtex.xml b/jEdit/modes/bibtex.xml
index d9211c0..d850dd1 100644
--- a/jEdit/modes/bibtex.xml
+++ b/jEdit/modes/bibtex.xml
@@ -1,960 +1,960 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- BibTeX mode, by Thomas Alspaugh alspaugh at ics.uci.edu, 2004Mar25 v1.1 -->
-<!-- Catalog entry (suggested)
-<MODE NAME="BibTeX" FILE="bibtex.xml"
- FILE_NAME_GLOB="*.bib" />
- -->
-<!--
- This BibTeX mode highlights the fields for each entry type to distinguish
- required, optional, or other fields from Lamport.
- I have added several commonly-accepted fields (highlighted in yet another
- color); these are
-
- abstract
- annotation
- day
- keywords
- lccn
- location
- references
- url
-
- The month name abbreviations are highlighted (jan, feb, mar, ...).
- Escaped quotes (as in {\"o}) are treated correctly.
- Text may be quoted "" or braced {} and may contain \{\}.
- Entries may be braced {} or parenthesized ().
- @strings are highlighted correctly.
- .
- Comments and suggestions are welcome.
- Enjoy!
- -->
-<!-- Things BibTeX mode does not do:
- - highlight keys, which must appear after the { or (
- and match [a-zA-Z0-9.:;?!`'()[\]\-/*@]+
- -->
-<!-- Use of token types:
- COMMENT1 % comments
- FUNCTION entries
- KEYWORD1 additional fields
- KEYWORD2 Lamport fields neither required nor optional
- KEYWORD3 Lamport fields optional
- KEYWORD4 Lamport fields required
- LITERAL1 "text", months, unquoted numbers
- LITERAL2 {text}
- LITERAL3 \{text\}
- OPERATOR = ,
- -->
-<!-- bibtex.xml is generated automatically from a summary of Lamport
- "LaTeX : A document preparation system : User guide and reference manual",
- 1994 (LaTeX2e) edition, appendix B, using a Perl scripts. -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="%"/>
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE">
- <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
-
- <!-- Entry types. Each entry type has its own ruleset. -->
- <!-- entry: FUNCTION -->
- <SPAN TYPE="FUNCTION" DELEGATE="article" ><BEGIN>@article{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="article" ><BEGIN>@article(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="book" ><BEGIN>@book{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="book" ><BEGIN>@book(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="booklet" ><BEGIN>@booklet{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="booklet" ><BEGIN>@booklet(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="conference" ><BEGIN>@conference{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="conference" ><BEGIN>@conference(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="inbook" ><BEGIN>@inbook{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="inbook" ><BEGIN>@inbook(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="incollection" ><BEGIN>@incollection{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="incollection" ><BEGIN>@incollection(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="inproceedings"><BEGIN>@inproceedings{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="inproceedings"><BEGIN>@inproceedings(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="manual" ><BEGIN>@manual{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="manual" ><BEGIN>@manual(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="mastersthesis"><BEGIN>@mastersthesis{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="mastersthesis"><BEGIN>@mastersthesis(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="misc" ><BEGIN>@misc{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="misc" ><BEGIN>@misc(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="phdthesis" ><BEGIN>@phdthesis{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="phdthesis" ><BEGIN>@phdthesis(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="proceedings" ><BEGIN>@proceedings{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="proceedings" ><BEGIN>@proceedings(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="techreport" ><BEGIN>@techreport{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="techreport" ><BEGIN>@techreport(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="unpublished" ><BEGIN>@unpublished{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="unpublished" ><BEGIN>@unpublished(</BEGIN><END>)</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="string" ><BEGIN>@string{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="string" ><BEGIN>@string(</BEGIN><END>)</END></SPAN>
-
- </RULES>
-
-<RULES SET="article">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>journal</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>pages</KEYWORD3>
- <KEYWORD3>volume</KEYWORD3>
- <!-- others -->
- <KEYWORD2>address</KEYWORD2>
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>editor</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>publisher</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>series</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="book">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>editor</KEYWORD4>
- <KEYWORD4>publisher</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>edition</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>series</KEYWORD3>
- <KEYWORD3>volume</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>pages</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="booklet">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>title</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>author</KEYWORD3>
- <KEYWORD3>howpublished</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>year</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>editor</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>number</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>pages</KEYWORD2>
- <KEYWORD2>publisher</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>series</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <KEYWORD2>volume</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="conference">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>booktitle</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>editor</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>organization</KEYWORD3>
- <KEYWORD3>pages</KEYWORD3>
- <KEYWORD3>publisher</KEYWORD3>
- <KEYWORD3>series</KEYWORD3>
- <KEYWORD3>volume</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="inbook">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>chapter</KEYWORD4>
- <KEYWORD4>editor</KEYWORD4>
- <KEYWORD4>pages</KEYWORD4>
- <KEYWORD4>publisher</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>edition</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>series</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>volume</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="incollection">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>booktitle</KEYWORD4>
- <KEYWORD4>publisher</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>chapter</KEYWORD3>
- <KEYWORD3>edition</KEYWORD3>
- <KEYWORD3>editor</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>pages</KEYWORD3>
- <KEYWORD3>series</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>volume</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="inproceedings">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>booktitle</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>editor</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>organization</KEYWORD3>
- <KEYWORD3>pages</KEYWORD3>
- <KEYWORD3>publisher</KEYWORD3>
- <KEYWORD3>series</KEYWORD3>
- <KEYWORD3>volume</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="manual">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>title</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>author</KEYWORD3>
- <KEYWORD3>edition</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>organization</KEYWORD3>
- <KEYWORD3>year</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>editor</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>number</KEYWORD2>
- <KEYWORD2>pages</KEYWORD2>
- <KEYWORD2>publisher</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>series</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <KEYWORD2>volume</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="mastersthesis">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>school</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>editor</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>number</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>pages</KEYWORD2>
- <KEYWORD2>publisher</KEYWORD2>
- <KEYWORD2>series</KEYWORD2>
- <KEYWORD2>volume</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="misc">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <!-- optional -->
- <KEYWORD3>author</KEYWORD3>
- <KEYWORD3>howpublished</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>title</KEYWORD3>
- <KEYWORD3>year</KEYWORD3>
- <!-- others -->
- <KEYWORD2>address</KEYWORD2>
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>editor</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>number</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>pages</KEYWORD2>
- <KEYWORD2>publisher</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>series</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <KEYWORD2>volume</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="phdthesis">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>school</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>editor</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>number</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>pages</KEYWORD2>
- <KEYWORD2>publisher</KEYWORD2>
- <KEYWORD2>series</KEYWORD2>
- <KEYWORD2>volume</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="proceedings">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>editor</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>organization</KEYWORD3>
- <KEYWORD3>publisher</KEYWORD3>
- <KEYWORD3>series</KEYWORD3>
- <KEYWORD3>volume</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>author</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>pages</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="techreport">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>institution</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <KEYWORD4>year</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>note</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <!-- others -->
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>editor</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>pages</KEYWORD2>
- <KEYWORD2>publisher</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>series</KEYWORD2>
- <KEYWORD2>volume</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
-<RULES SET="unpublished">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
- <KEYWORDS>
- <!-- required -->
- <KEYWORD4>author</KEYWORD4>
- <KEYWORD4>note</KEYWORD4>
- <KEYWORD4>title</KEYWORD4>
- <!-- optional -->
- <KEYWORD3>month</KEYWORD3>
- <KEYWORD3>year</KEYWORD3>
- <!-- others -->
- <KEYWORD2>address</KEYWORD2>
- <KEYWORD2>annote</KEYWORD2>
- <KEYWORD2>booktitle</KEYWORD2>
- <KEYWORD2>chapter</KEYWORD2>
- <KEYWORD2>crossref</KEYWORD2>
- <KEYWORD2>edition</KEYWORD2>
- <KEYWORD2>editor</KEYWORD2>
- <KEYWORD2>howpublished</KEYWORD2>
- <KEYWORD2>institution</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>key</KEYWORD2>
- <KEYWORD2>number</KEYWORD2>
- <KEYWORD2>organization</KEYWORD2>
- <KEYWORD2>pages</KEYWORD2>
- <KEYWORD2>publisher</KEYWORD2>
- <KEYWORD2>school</KEYWORD2>
- <KEYWORD2>series</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <KEYWORD2>volume</KEYWORD2>
- <!-- not in Lamport but widely accepted -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>annotation</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>keywords</KEYWORD1>
- <KEYWORD1>lccn</KEYWORD1>
- <KEYWORD1>location</KEYWORD1>
- <KEYWORD1>references</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <!-- total: 32 fields -->
- <LITERAL1>jan</LITERAL1>
- <LITERAL1>feb</LITERAL1>
- <LITERAL1>mar</LITERAL1>
- <LITERAL1>apr</LITERAL1>
- <LITERAL1>may</LITERAL1>
- <LITERAL1>jun</LITERAL1>
- <LITERAL1>jul</LITERAL1>
- <LITERAL1>aug</LITERAL1>
- <LITERAL1>sep</LITERAL1>
- <LITERAL1>oct</LITERAL1>
- <LITERAL1>nov</LITERAL1>
- <LITERAL1>dec</LITERAL1>
- </KEYWORDS>
- </RULES>
-
-
- <RULES SET="textbraced" DEFAULT="LITERAL2">
- <SPAN TYPE="LITERAL3" NO_LINE_BREAK="FALSE"><BEGIN>\{</BEGIN><END>\}</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SEQ TYPE="LITERAL3">\"</SEQ>
- </RULES>
-
- <RULES SET="textquoted" DEFAULT="LITERAL1">
- <SPAN TYPE="LITERAL3" NO_LINE_BREAK="FALSE"><BEGIN>\{</BEGIN><END>\}</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SEQ TYPE="LITERAL3">\"</SEQ>
- </RULES>
-
- <RULES SET="string" DEFAULT="LITERAL1">
- <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
- <SPAN TYPE="LITERAL3" NO_LINE_BREAK="FALSE"><BEGIN>\{</BEGIN><END>\}</END></SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="LITERAL3">\"</SEQ>
- </RULES>
-
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- BibTeX mode, by Thomas Alspaugh alspaugh at ics.uci.edu, 2004Mar25 v1.1 -->
+<!-- Catalog entry (suggested)
+<MODE NAME="BibTeX" FILE="bibtex.xml"
+ FILE_NAME_GLOB="*.bib" />
+ -->
+<!--
+ This BibTeX mode highlights the fields for each entry type to distinguish
+ required, optional, or other fields from Lamport.
+ I have added several commonly-accepted fields (highlighted in yet another
+ color); these are
+
+ abstract
+ annotation
+ day
+ keywords
+ lccn
+ location
+ references
+ url
+
+ The month name abbreviations are highlighted (jan, feb, mar, ...).
+ Escaped quotes (as in {\"o}) are treated correctly.
+ Text may be quoted "" or braced {} and may contain \{\}.
+ Entries may be braced {} or parenthesized ().
+ @strings are highlighted correctly.
+ .
+ Comments and suggestions are welcome.
+ Enjoy!
+ -->
+<!-- Things BibTeX mode does not do:
+ - highlight keys, which must appear after the { or (
+ and match [a-zA-Z0-9.:;?!`'()[\]\-/*@]+
+ -->
+<!-- Use of token types:
+ COMMENT1 % comments
+ FUNCTION entries
+ KEYWORD1 additional fields
+ KEYWORD2 Lamport fields neither required nor optional
+ KEYWORD3 Lamport fields optional
+ KEYWORD4 Lamport fields required
+ LITERAL1 "text", months, unquoted numbers
+ LITERAL2 {text}
+ LITERAL3 \{text\}
+ OPERATOR = ,
+ -->
+<!-- bibtex.xml is generated automatically from a summary of Lamport
+ "LaTeX : A document preparation system : User guide and reference manual",
+ 1994 (LaTeX2e) edition, appendix B, using a Perl scripts. -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="%"/>
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE">
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+
+ <!-- Entry types. Each entry type has its own ruleset. -->
+ <!-- entry: FUNCTION -->
+ <SPAN TYPE="FUNCTION" DELEGATE="article" ><BEGIN>@article{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="article" ><BEGIN>@article(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="book" ><BEGIN>@book{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="book" ><BEGIN>@book(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="booklet" ><BEGIN>@booklet{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="booklet" ><BEGIN>@booklet(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="conference" ><BEGIN>@conference{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="conference" ><BEGIN>@conference(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="inbook" ><BEGIN>@inbook{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="inbook" ><BEGIN>@inbook(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="incollection" ><BEGIN>@incollection{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="incollection" ><BEGIN>@incollection(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="inproceedings"><BEGIN>@inproceedings{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="inproceedings"><BEGIN>@inproceedings(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="manual" ><BEGIN>@manual{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="manual" ><BEGIN>@manual(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="mastersthesis"><BEGIN>@mastersthesis{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="mastersthesis"><BEGIN>@mastersthesis(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="misc" ><BEGIN>@misc{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="misc" ><BEGIN>@misc(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="phdthesis" ><BEGIN>@phdthesis{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="phdthesis" ><BEGIN>@phdthesis(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="proceedings" ><BEGIN>@proceedings{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="proceedings" ><BEGIN>@proceedings(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="techreport" ><BEGIN>@techreport{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="techreport" ><BEGIN>@techreport(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="unpublished" ><BEGIN>@unpublished{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="unpublished" ><BEGIN>@unpublished(</BEGIN><END>)</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="string" ><BEGIN>@string{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="string" ><BEGIN>@string(</BEGIN><END>)</END></SPAN>
+
+ </RULES>
+
+<RULES SET="article">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>journal</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>pages</KEYWORD3>
+ <KEYWORD3>volume</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>address</KEYWORD2>
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>editor</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>publisher</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>series</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="book">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>editor</KEYWORD4>
+ <KEYWORD4>publisher</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>edition</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>series</KEYWORD3>
+ <KEYWORD3>volume</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>pages</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="booklet">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>title</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>author</KEYWORD3>
+ <KEYWORD3>howpublished</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>year</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>editor</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>number</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>pages</KEYWORD2>
+ <KEYWORD2>publisher</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>series</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>volume</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="conference">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>booktitle</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>editor</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>organization</KEYWORD3>
+ <KEYWORD3>pages</KEYWORD3>
+ <KEYWORD3>publisher</KEYWORD3>
+ <KEYWORD3>series</KEYWORD3>
+ <KEYWORD3>volume</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="inbook">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>chapter</KEYWORD4>
+ <KEYWORD4>editor</KEYWORD4>
+ <KEYWORD4>pages</KEYWORD4>
+ <KEYWORD4>publisher</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>edition</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>series</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>volume</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="incollection">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>booktitle</KEYWORD4>
+ <KEYWORD4>publisher</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>chapter</KEYWORD3>
+ <KEYWORD3>edition</KEYWORD3>
+ <KEYWORD3>editor</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>pages</KEYWORD3>
+ <KEYWORD3>series</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>volume</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="inproceedings">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>booktitle</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>editor</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>organization</KEYWORD3>
+ <KEYWORD3>pages</KEYWORD3>
+ <KEYWORD3>publisher</KEYWORD3>
+ <KEYWORD3>series</KEYWORD3>
+ <KEYWORD3>volume</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="manual">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>title</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>author</KEYWORD3>
+ <KEYWORD3>edition</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>organization</KEYWORD3>
+ <KEYWORD3>year</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>editor</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>number</KEYWORD2>
+ <KEYWORD2>pages</KEYWORD2>
+ <KEYWORD2>publisher</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>series</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>volume</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="mastersthesis">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>school</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>editor</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>number</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>pages</KEYWORD2>
+ <KEYWORD2>publisher</KEYWORD2>
+ <KEYWORD2>series</KEYWORD2>
+ <KEYWORD2>volume</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="misc">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <!-- optional -->
+ <KEYWORD3>author</KEYWORD3>
+ <KEYWORD3>howpublished</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>title</KEYWORD3>
+ <KEYWORD3>year</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>address</KEYWORD2>
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>editor</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>number</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>pages</KEYWORD2>
+ <KEYWORD2>publisher</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>series</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>volume</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="phdthesis">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>school</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>editor</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>number</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>pages</KEYWORD2>
+ <KEYWORD2>publisher</KEYWORD2>
+ <KEYWORD2>series</KEYWORD2>
+ <KEYWORD2>volume</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="proceedings">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>editor</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>organization</KEYWORD3>
+ <KEYWORD3>publisher</KEYWORD3>
+ <KEYWORD3>series</KEYWORD3>
+ <KEYWORD3>volume</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>author</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>pages</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="techreport">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>institution</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <KEYWORD4>year</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>note</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>editor</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>pages</KEYWORD2>
+ <KEYWORD2>publisher</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>series</KEYWORD2>
+ <KEYWORD2>volume</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+<RULES SET="unpublished">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHARS="123456789" AT_WORD_START="TRUE">[1-9][0-9]*</SEQ_REGEXP>
+ <KEYWORDS>
+ <!-- required -->
+ <KEYWORD4>author</KEYWORD4>
+ <KEYWORD4>note</KEYWORD4>
+ <KEYWORD4>title</KEYWORD4>
+ <!-- optional -->
+ <KEYWORD3>month</KEYWORD3>
+ <KEYWORD3>year</KEYWORD3>
+ <!-- others -->
+ <KEYWORD2>address</KEYWORD2>
+ <KEYWORD2>annote</KEYWORD2>
+ <KEYWORD2>booktitle</KEYWORD2>
+ <KEYWORD2>chapter</KEYWORD2>
+ <KEYWORD2>crossref</KEYWORD2>
+ <KEYWORD2>edition</KEYWORD2>
+ <KEYWORD2>editor</KEYWORD2>
+ <KEYWORD2>howpublished</KEYWORD2>
+ <KEYWORD2>institution</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2>
+ <KEYWORD2>number</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>pages</KEYWORD2>
+ <KEYWORD2>publisher</KEYWORD2>
+ <KEYWORD2>school</KEYWORD2>
+ <KEYWORD2>series</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>volume</KEYWORD2>
+ <!-- not in Lamport but widely accepted -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>annotation</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>keywords</KEYWORD1>
+ <KEYWORD1>lccn</KEYWORD1>
+ <KEYWORD1>location</KEYWORD1>
+ <KEYWORD1>references</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <!-- total: 32 fields -->
+ <LITERAL1>jan</LITERAL1>
+ <LITERAL1>feb</LITERAL1>
+ <LITERAL1>mar</LITERAL1>
+ <LITERAL1>apr</LITERAL1>
+ <LITERAL1>may</LITERAL1>
+ <LITERAL1>jun</LITERAL1>
+ <LITERAL1>jul</LITERAL1>
+ <LITERAL1>aug</LITERAL1>
+ <LITERAL1>sep</LITERAL1>
+ <LITERAL1>oct</LITERAL1>
+ <LITERAL1>nov</LITERAL1>
+ <LITERAL1>dec</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+
+ <RULES SET="textbraced" DEFAULT="LITERAL2">
+ <SPAN TYPE="LITERAL3" NO_LINE_BREAK="FALSE"><BEGIN>\{</BEGIN><END>\}</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SEQ TYPE="LITERAL3">\"</SEQ>
+ </RULES>
+
+ <RULES SET="textquoted" DEFAULT="LITERAL1">
+ <SPAN TYPE="LITERAL3" NO_LINE_BREAK="FALSE"><BEGIN>\{</BEGIN><END>\}</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SEQ TYPE="LITERAL3">\"</SEQ>
+ </RULES>
+
+ <RULES SET="string" DEFAULT="LITERAL1">
+ <SPAN TYPE="LITERAL1" DELEGATE="textquoted" NO_LINE_BREAK="FALSE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="textbraced" NO_LINE_BREAK="FALSE"><BEGIN>{</BEGIN><END>}</END></SPAN>
+ <SPAN TYPE="LITERAL3" NO_LINE_BREAK="FALSE"><BEGIN>\{</BEGIN><END>\}</END></SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="LITERAL3">\"</SEQ>
+ </RULES>
+
+</MODE>
+
diff --git a/jEdit/modes/c.xml b/jEdit/modes/c.xml
index 5253c26..c003efa 100644
--- a/jEdit/modes/c.xml
+++ b/jEdit/modes/c.xml
@@ -1,409 +1,409 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- This is based on ISO C++ Standard, 2003 and ISO C Standard, 1999.
- The C++ keywords have been removed from this mode file, though. -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="(?!^\s*(#|//)).*(\b(if|while|for)\s*\(.*\)|\b(else|do)\b)[^{;]*$" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^\s*((case\b.*|[\p{Alpha}_][\p{Alnum}_]*)\s*:(?!:)).*$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- </PROPS>
-
- <RULES
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <EOL_SPAN TYPE="KEYWORD2" AT_WHITESPACE_END="TRUE" DELEGATE="CPP">#</EOL_SPAN>
-
- <IMPORT DELEGATE="LEX"/>
- <IMPORT DELEGATE="CORE"/>
- </RULES>
-
- <RULES SET="LEX" IGNORE_CASE="FALSE">
- <IMPORT DELEGATE="COMMENTS" />
- <IMPORT DELEGATE="C_LEXER" />
- </RULES>
-
- <!-- Comments, Trigraph, Alternate-Tokens -->
- <RULES SET="C_LEXER"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
- <BEGIN>L"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
- <BEGIN>L'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- Trigraphs -->
- <SEQ TYPE="LITERAL4">??(</SEQ>
- <SEQ TYPE="LITERAL4">??/</SEQ>
- <SEQ TYPE="LITERAL4">??)</SEQ>
- <SEQ TYPE="LITERAL4">??'</SEQ>
- <SEQ TYPE="LITERAL4">??<</SEQ>
- <SEQ TYPE="LITERAL4">??!</SEQ>
- <SEQ TYPE="LITERAL4">??></SEQ>
- <SEQ TYPE="LITERAL4">??-</SEQ>
- <SEQ TYPE="LITERAL4">??=</SEQ>
-
- <!-- Alternate tokens -->
- <SEQ TYPE="LITERAL4"><:</SEQ>
- <SEQ TYPE="LITERAL4">:></SEQ>
- <SEQ TYPE="LITERAL4"><%</SEQ>
- <SEQ TYPE="LITERAL4">%></SEQ>
- <SEQ TYPE="LITERAL4">%:</SEQ>
-
- <!-- Labels.
- This is a part of core language syntax, but must be here
- because it can't work after SEQ for ':'. -->
- <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
- MATCH_TYPE="OPERATOR"
- TYPE="LABEL">:</MARK_PREVIOUS>
-
- <!-- Function-like macro or function calls.
- This can't work after SEQ for '('. -->
- <MARK_PREVIOUS
- TYPE="FUNCTION"
- MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
-
- <KEYWORDS>
- <!-- Predefined macro names from ISO C++ Standard 2003 -->
- <LITERAL2>__DATE__</LITERAL2>
- <LITERAL2>__FILE__</LITERAL2>
- <LITERAL2>__LINE__</LITERAL2>
- <LITERAL2>__STDC_HOSTED__</LITERAL2>
- <LITERAL2>__STDC_ISO_10646__</LITERAL2>
- <LITERAL2>__STDC_VERSION__</LITERAL2>
- <LITERAL2>__STDC__</LITERAL2>
- <LITERAL2>__TIME__</LITERAL2>
- <LITERAL2>__cplusplus</LITERAL2>
- <!-- Standard library macro names from ISO C++ Standard 2003 -->
- <!-- Hilight these to indicate accidental use of them
- in user source. They may be valid, but should cause
- future conflicts. -->
- <LITERAL2>BUFSIZ</LITERAL2>
- <LITERAL2>CLOCKS_PER_SEC</LITERAL2>
- <LITERAL2>EDOM</LITERAL2>
- <LITERAL2>EILSEQ</LITERAL2>
- <LITERAL2>EOF</LITERAL2>
- <LITERAL2>ERANGE</LITERAL2>
- <LITERAL2>EXIT_FAILURE</LITERAL2>
- <LITERAL2>EXIT_SUCCESS</LITERAL2>
- <LITERAL2>FILENAME_MAX</LITERAL2>
- <LITERAL2>FOPEN_MAX</LITERAL2>
- <LITERAL2>HUGE_VAL</LITERAL2>
- <LITERAL2>LC_ALL</LITERAL2>
- <LITERAL2>LC_COLLATE</LITERAL2>
- <LITERAL2>LC_CTYPE</LITERAL2>
- <LITERAL2>LC_MONETARY</LITERAL2>
- <LITERAL2>LC_NUMERIC</LITERAL2>
- <LITERAL2>LC_TIME</LITERAL2>
- <LITERAL2>L_tmpnam</LITERAL2>
- <LITERAL2>MB_CUR_MAX</LITERAL2>
- <LITERAL2>NULL</LITERAL2>
- <LITERAL2>RAND_MAX</LITERAL2>
- <LITERAL2>SEEK_CUR</LITERAL2>
- <LITERAL2>SEEK_END</LITERAL2>
- <LITERAL2>SEEK_SET</LITERAL2>
- <LITERAL2>SIGABRT</LITERAL2>
- <LITERAL2>SIGFPE</LITERAL2>
- <LITERAL2>SIGILL</LITERAL2>
- <LITERAL2>SIGINT</LITERAL2>
- <LITERAL2>SIGSEGV</LITERAL2>
- <LITERAL2>SIGTERM</LITERAL2>
- <LITERAL2>SIG_DFL</LITERAL2>
- <LITERAL2>SIG_ERR</LITERAL2>
- <LITERAL2>SIG_IGN</LITERAL2>
- <LITERAL2>TMP_MAX</LITERAL2>
- <LITERAL2>WCHAR_MAX</LITERAL2>
- <LITERAL2>WCHAR_MIN</LITERAL2>
- <LITERAL2>WEOF</LITERAL2>
- <LITERAL2>_IOFBF</LITERAL2>
- <LITERAL2>_IOLBF</LITERAL2>
- <LITERAL2>_IONBF</LITERAL2>
- <LITERAL2>assert</LITERAL2>
- <LITERAL2>errno</LITERAL2>
- <LITERAL2>offsetof</LITERAL2>
- <LITERAL2>setjmp</LITERAL2>
- <LITERAL2>stderr</LITERAL2>
- <LITERAL2>stdin</LITERAL2>
- <LITERAL2>stdout</LITERAL2>
- <LITERAL2>va_arg</LITERAL2>
- <LITERAL2>va_end</LITERAL2>
- <LITERAL2>va_start</LITERAL2>
- <!-- Standard C library values from ISO C++ Standard 2003 -->
- <!-- These are not explicitly defined as macro. But they like
- to be due to compatibility with C library implementation.
- So, treat them like standard library macro names. -->
- <LITERAL2>CHAR_BIT</LITERAL2>
- <LITERAL2>CHAR_MAX</LITERAL2>
- <LITERAL2>CHAR_MIN</LITERAL2>
- <LITERAL2>DBL_DIG</LITERAL2>
- <LITERAL2>DBL_EPSILON</LITERAL2>
- <LITERAL2>DBL_MANT_DIG</LITERAL2>
- <LITERAL2>DBL_MAX</LITERAL2>
- <LITERAL2>DBL_MAX_10_EXP</LITERAL2>
- <LITERAL2>DBL_MAX_EXP</LITERAL2>
- <LITERAL2>DBL_MIN</LITERAL2>
- <LITERAL2>DBL_MIN_10_EXP</LITERAL2>
- <LITERAL2>DBL_MIN_EXP</LITERAL2>
- <LITERAL2>FLT_DIG</LITERAL2>
- <LITERAL2>FLT_EPSILON</LITERAL2>
- <LITERAL2>FLT_MANT_DIG</LITERAL2>
- <LITERAL2>FLT_MAX</LITERAL2>
- <LITERAL2>FLT_MAX_10_EXP</LITERAL2>
- <LITERAL2>FLT_MAX_EXP</LITERAL2>
- <LITERAL2>FLT_MIN</LITERAL2>
- <LITERAL2>FLT_MIN_10_EXP</LITERAL2>
- <LITERAL2>FLT_MIN_EXP</LITERAL2>
- <LITERAL2>FLT_RADIX</LITERAL2>
- <LITERAL2>FLT_ROUNDS</LITERAL2>
- <LITERAL2>INT_MAX</LITERAL2>
- <LITERAL2>INT_MIN</LITERAL2>
- <LITERAL2>LDBL_DIG</LITERAL2>
- <LITERAL2>LDBL_EPSILON</LITERAL2>
- <LITERAL2>LDBL_MANT_DIG</LITERAL2>
- <LITERAL2>LDBL_MAX</LITERAL2>
- <LITERAL2>LDBL_MAX_10_EXP</LITERAL2>
- <LITERAL2>LDBL_MAX_EXP</LITERAL2>
- <LITERAL2>LDBL_MIN</LITERAL2>
- <LITERAL2>LDBL_MIN_10_EXP</LITERAL2>
- <LITERAL2>LDBL_MIN_EXP</LITERAL2>
- <LITERAL2>LONG_MAX</LITERAL2>
- <LITERAL2>LONG_MIN</LITERAL2>
- <LITERAL2>MB_LEN_MAX</LITERAL2>
- <LITERAL2>SCHAR_MAX</LITERAL2>
- <LITERAL2>SCHAR_MIN</LITERAL2>
- <LITERAL2>SHRT_MAX</LITERAL2>
- <LITERAL2>SHRT_MIN</LITERAL2>
- <LITERAL2>UCHAR_MAX</LITERAL2>
- <LITERAL2>UINT_MAX</LITERAL2>
- <LITERAL2>ULONG_MAX</LITERAL2>
- <LITERAL2>USRT_MAX</LITERAL2>
- <!-- Alternative representations of some operators
- from ISO C++ Standard 2003 -->
- <!-- These are separated from CORE because they are
- available in the constant expressions after
- #if and #elif preprocessor directives. -->
- <KEYWORD3>and</KEYWORD3>
- <KEYWORD3>and_eq</KEYWORD3>
- <KEYWORD3>bitand</KEYWORD3>
- <KEYWORD3>bitor</KEYWORD3>
- <KEYWORD3>compl</KEYWORD3>
- <KEYWORD3>not</KEYWORD3>
- <KEYWORD3>not_eq</KEYWORD3>
- <KEYWORD3>or</KEYWORD3>
- <KEYWORD3>or_eq</KEYWORD3>
- <KEYWORD3>xor</KEYWORD3>
- <KEYWORD3>xor_eq</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <!-- Core language -->
- <RULES SET="CORE"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <KEYWORDS>
- <!-- Types -->
- <KEYWORD3>bool</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>enum</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD3>signed</KEYWORD3>
- <KEYWORD3>struct</KEYWORD3>
- <KEYWORD3>union</KEYWORD3>
- <KEYWORD3>unsigned</KEYWORD3>
- <!-- Keywords from ISO C++ Standard 2003 -->
- <KEYWORD2>asm</KEYWORD2>
- <KEYWORD1>auto</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD2>extern</KEYWORD2>
- <LITERAL2>false</LITERAL2>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>inline</KEYWORD1>
- <KEYWORD1>register</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>sizeof</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <LITERAL2>true</LITERAL2>
- <KEYWORD3>typedef</KEYWORD3>
- <KEYWORD1>void</KEYWORD1>
- <KEYWORD1>volatile</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <!-- Additional keywords from ISO C Standard(C99) -->
- <KEYWORD3>restrict</KEYWORD3>
- <KEYWORD3>_Bool</KEYWORD3>
- <KEYWORD3>_Complex</KEYWORD3>
- <KEYWORD3>_Pragma</KEYWORD3>
- <KEYWORD3>_Imaginary</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <!-- Different comment styles. -->
- <RULES SET="COMMENTS">
- <!-- Doxygen comment, Javadoc style -->
- <SEQ TYPE="COMMENT1">/**/</SEQ>
- <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
- <BEGIN>/**<</BEGIN>
- <END>*/</END>
- </SPAN>
- <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">///<</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">///</EOL_SPAN>
-
- <!-- Doxygen comment, Qt style -->
- <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
- <BEGIN>/*!<</BEGIN>
- <END>*/</END>
- </SPAN>
- <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
- <BEGIN>/*!</BEGIN>
- <END>*/</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">//!<</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">//!</EOL_SPAN>
-
- <!-- C style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
- </RULES>
-
- <!-- Preprocessor specific rules -->
- <RULES SET="CPP"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
-
- <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="INCLUDE">include\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="LEX">endif\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="CONDITION">elif\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="CONDITION">if\b</EOL_SPAN_REGEXP>
-
- <IMPORT DELEGATE="LEX"/>
-
- <!-- Directives -->
- <KEYWORDS>
- <MARKUP>ifdef</MARKUP>
- <MARKUP>ifndef</MARKUP>
- <MARKUP>else</MARKUP>
- <MARKUP>error</MARKUP>
- <MARKUP>line</MARKUP>
- <MARKUP>pragma</MARKUP>
- <MARKUP>undef</MARKUP>
- <MARKUP>warning</MARKUP>
- </KEYWORDS>
- </RULES>
-
- <!-- After #include directive -->
- <!-- "\"s are not escaped. -->
- <RULES SET="INCLUDE"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <IMPORT DELEGATE="LEX"/>
- </RULES>
-
- <!-- After #define directive -->
- <!-- Almost same as the normal code,
- except two additional operators # and ##. -->
- <RULES SET="DEFINE"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <SEQ TYPE="OPERATOR">#</SEQ>
- <IMPORT DELEGATE="LEX"/>
- <IMPORT DELEGATE="CORE"/>
- </RULES>
-
- <!-- After #if or #elif directive -->
- <!-- All constant expressions and a special operator
- 'defined' is available. But the core language elements
- (such as operator 'sizeof', type casting, etc...) are not. -->
- <RULES SET="CONDITION"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <IMPORT DELEGATE="LEX"/>
- <KEYWORDS>
- <KEYWORD2>defined</KEYWORD2>
- <!-- Both true and false are specially permitted by
- ISO C++ Standard 2003 16.1p4 -->
- <KEYWORD2>true</KEYWORD2>
- <KEYWORD2>false</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- This is based on ISO C++ Standard, 2003 and ISO C Standard, 1999.
+ The C++ keywords have been removed from this mode file, though. -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="(?!^\s*(#|//)).*(\b(if|while|for)\s*\(.*\)|\b(else|do)\b)[^{;]*$" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^\s*((case\b.*|[\p{Alpha}_][\p{Alnum}_]*)\s*:(?!:)).*$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+
+ <RULES
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <EOL_SPAN TYPE="KEYWORD2" AT_WHITESPACE_END="TRUE" DELEGATE="CPP">#</EOL_SPAN>
+
+ <IMPORT DELEGATE="LEX"/>
+ <IMPORT DELEGATE="CORE"/>
+ </RULES>
+
+ <RULES SET="LEX" IGNORE_CASE="FALSE">
+ <IMPORT DELEGATE="COMMENTS" />
+ <IMPORT DELEGATE="C_LEXER" />
+ </RULES>
+
+ <!-- Comments, Trigraph, Alternate-Tokens -->
+ <RULES SET="C_LEXER"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
+ <BEGIN>L"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
+ <BEGIN>L'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- Trigraphs -->
+ <SEQ TYPE="LITERAL4">??(</SEQ>
+ <SEQ TYPE="LITERAL4">??/</SEQ>
+ <SEQ TYPE="LITERAL4">??)</SEQ>
+ <SEQ TYPE="LITERAL4">??'</SEQ>
+ <SEQ TYPE="LITERAL4">??<</SEQ>
+ <SEQ TYPE="LITERAL4">??!</SEQ>
+ <SEQ TYPE="LITERAL4">??></SEQ>
+ <SEQ TYPE="LITERAL4">??-</SEQ>
+ <SEQ TYPE="LITERAL4">??=</SEQ>
+
+ <!-- Alternate tokens -->
+ <SEQ TYPE="LITERAL4"><:</SEQ>
+ <SEQ TYPE="LITERAL4">:></SEQ>
+ <SEQ TYPE="LITERAL4"><%</SEQ>
+ <SEQ TYPE="LITERAL4">%></SEQ>
+ <SEQ TYPE="LITERAL4">%:</SEQ>
+
+ <!-- Labels.
+ This is a part of core language syntax, but must be here
+ because it can't work after SEQ for ':'. -->
+ <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
+ MATCH_TYPE="OPERATOR"
+ TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <!-- Function-like macro or function calls.
+ This can't work after SEQ for '('. -->
+ <MARK_PREVIOUS
+ TYPE="FUNCTION"
+ MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+
+ <KEYWORDS>
+ <!-- Predefined macro names from ISO C++ Standard 2003 -->
+ <LITERAL2>__DATE__</LITERAL2>
+ <LITERAL2>__FILE__</LITERAL2>
+ <LITERAL2>__LINE__</LITERAL2>
+ <LITERAL2>__STDC_HOSTED__</LITERAL2>
+ <LITERAL2>__STDC_ISO_10646__</LITERAL2>
+ <LITERAL2>__STDC_VERSION__</LITERAL2>
+ <LITERAL2>__STDC__</LITERAL2>
+ <LITERAL2>__TIME__</LITERAL2>
+ <LITERAL2>__cplusplus</LITERAL2>
+ <!-- Standard library macro names from ISO C++ Standard 2003 -->
+ <!-- Hilight these to indicate accidental use of them
+ in user source. They may be valid, but should cause
+ future conflicts. -->
+ <LITERAL2>BUFSIZ</LITERAL2>
+ <LITERAL2>CLOCKS_PER_SEC</LITERAL2>
+ <LITERAL2>EDOM</LITERAL2>
+ <LITERAL2>EILSEQ</LITERAL2>
+ <LITERAL2>EOF</LITERAL2>
+ <LITERAL2>ERANGE</LITERAL2>
+ <LITERAL2>EXIT_FAILURE</LITERAL2>
+ <LITERAL2>EXIT_SUCCESS</LITERAL2>
+ <LITERAL2>FILENAME_MAX</LITERAL2>
+ <LITERAL2>FOPEN_MAX</LITERAL2>
+ <LITERAL2>HUGE_VAL</LITERAL2>
+ <LITERAL2>LC_ALL</LITERAL2>
+ <LITERAL2>LC_COLLATE</LITERAL2>
+ <LITERAL2>LC_CTYPE</LITERAL2>
+ <LITERAL2>LC_MONETARY</LITERAL2>
+ <LITERAL2>LC_NUMERIC</LITERAL2>
+ <LITERAL2>LC_TIME</LITERAL2>
+ <LITERAL2>L_tmpnam</LITERAL2>
+ <LITERAL2>MB_CUR_MAX</LITERAL2>
+ <LITERAL2>NULL</LITERAL2>
+ <LITERAL2>RAND_MAX</LITERAL2>
+ <LITERAL2>SEEK_CUR</LITERAL2>
+ <LITERAL2>SEEK_END</LITERAL2>
+ <LITERAL2>SEEK_SET</LITERAL2>
+ <LITERAL2>SIGABRT</LITERAL2>
+ <LITERAL2>SIGFPE</LITERAL2>
+ <LITERAL2>SIGILL</LITERAL2>
+ <LITERAL2>SIGINT</LITERAL2>
+ <LITERAL2>SIGSEGV</LITERAL2>
+ <LITERAL2>SIGTERM</LITERAL2>
+ <LITERAL2>SIG_DFL</LITERAL2>
+ <LITERAL2>SIG_ERR</LITERAL2>
+ <LITERAL2>SIG_IGN</LITERAL2>
+ <LITERAL2>TMP_MAX</LITERAL2>
+ <LITERAL2>WCHAR_MAX</LITERAL2>
+ <LITERAL2>WCHAR_MIN</LITERAL2>
+ <LITERAL2>WEOF</LITERAL2>
+ <LITERAL2>_IOFBF</LITERAL2>
+ <LITERAL2>_IOLBF</LITERAL2>
+ <LITERAL2>_IONBF</LITERAL2>
+ <LITERAL2>assert</LITERAL2>
+ <LITERAL2>errno</LITERAL2>
+ <LITERAL2>offsetof</LITERAL2>
+ <LITERAL2>setjmp</LITERAL2>
+ <LITERAL2>stderr</LITERAL2>
+ <LITERAL2>stdin</LITERAL2>
+ <LITERAL2>stdout</LITERAL2>
+ <LITERAL2>va_arg</LITERAL2>
+ <LITERAL2>va_end</LITERAL2>
+ <LITERAL2>va_start</LITERAL2>
+ <!-- Standard C library values from ISO C++ Standard 2003 -->
+ <!-- These are not explicitly defined as macro. But they like
+ to be due to compatibility with C library implementation.
+ So, treat them like standard library macro names. -->
+ <LITERAL2>CHAR_BIT</LITERAL2>
+ <LITERAL2>CHAR_MAX</LITERAL2>
+ <LITERAL2>CHAR_MIN</LITERAL2>
+ <LITERAL2>DBL_DIG</LITERAL2>
+ <LITERAL2>DBL_EPSILON</LITERAL2>
+ <LITERAL2>DBL_MANT_DIG</LITERAL2>
+ <LITERAL2>DBL_MAX</LITERAL2>
+ <LITERAL2>DBL_MAX_10_EXP</LITERAL2>
+ <LITERAL2>DBL_MAX_EXP</LITERAL2>
+ <LITERAL2>DBL_MIN</LITERAL2>
+ <LITERAL2>DBL_MIN_10_EXP</LITERAL2>
+ <LITERAL2>DBL_MIN_EXP</LITERAL2>
+ <LITERAL2>FLT_DIG</LITERAL2>
+ <LITERAL2>FLT_EPSILON</LITERAL2>
+ <LITERAL2>FLT_MANT_DIG</LITERAL2>
+ <LITERAL2>FLT_MAX</LITERAL2>
+ <LITERAL2>FLT_MAX_10_EXP</LITERAL2>
+ <LITERAL2>FLT_MAX_EXP</LITERAL2>
+ <LITERAL2>FLT_MIN</LITERAL2>
+ <LITERAL2>FLT_MIN_10_EXP</LITERAL2>
+ <LITERAL2>FLT_MIN_EXP</LITERAL2>
+ <LITERAL2>FLT_RADIX</LITERAL2>
+ <LITERAL2>FLT_ROUNDS</LITERAL2>
+ <LITERAL2>INT_MAX</LITERAL2>
+ <LITERAL2>INT_MIN</LITERAL2>
+ <LITERAL2>LDBL_DIG</LITERAL2>
+ <LITERAL2>LDBL_EPSILON</LITERAL2>
+ <LITERAL2>LDBL_MANT_DIG</LITERAL2>
+ <LITERAL2>LDBL_MAX</LITERAL2>
+ <LITERAL2>LDBL_MAX_10_EXP</LITERAL2>
+ <LITERAL2>LDBL_MAX_EXP</LITERAL2>
+ <LITERAL2>LDBL_MIN</LITERAL2>
+ <LITERAL2>LDBL_MIN_10_EXP</LITERAL2>
+ <LITERAL2>LDBL_MIN_EXP</LITERAL2>
+ <LITERAL2>LONG_MAX</LITERAL2>
+ <LITERAL2>LONG_MIN</LITERAL2>
+ <LITERAL2>MB_LEN_MAX</LITERAL2>
+ <LITERAL2>SCHAR_MAX</LITERAL2>
+ <LITERAL2>SCHAR_MIN</LITERAL2>
+ <LITERAL2>SHRT_MAX</LITERAL2>
+ <LITERAL2>SHRT_MIN</LITERAL2>
+ <LITERAL2>UCHAR_MAX</LITERAL2>
+ <LITERAL2>UINT_MAX</LITERAL2>
+ <LITERAL2>ULONG_MAX</LITERAL2>
+ <LITERAL2>USRT_MAX</LITERAL2>
+ <!-- Alternative representations of some operators
+ from ISO C++ Standard 2003 -->
+ <!-- These are separated from CORE because they are
+ available in the constant expressions after
+ #if and #elif preprocessor directives. -->
+ <KEYWORD3>and</KEYWORD3>
+ <KEYWORD3>and_eq</KEYWORD3>
+ <KEYWORD3>bitand</KEYWORD3>
+ <KEYWORD3>bitor</KEYWORD3>
+ <KEYWORD3>compl</KEYWORD3>
+ <KEYWORD3>not</KEYWORD3>
+ <KEYWORD3>not_eq</KEYWORD3>
+ <KEYWORD3>or</KEYWORD3>
+ <KEYWORD3>or_eq</KEYWORD3>
+ <KEYWORD3>xor</KEYWORD3>
+ <KEYWORD3>xor_eq</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- Core language -->
+ <RULES SET="CORE"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <KEYWORDS>
+ <!-- Types -->
+ <KEYWORD3>bool</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>enum</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD3>signed</KEYWORD3>
+ <KEYWORD3>struct</KEYWORD3>
+ <KEYWORD3>union</KEYWORD3>
+ <KEYWORD3>unsigned</KEYWORD3>
+ <!-- Keywords from ISO C++ Standard 2003 -->
+ <KEYWORD2>asm</KEYWORD2>
+ <KEYWORD1>auto</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD2>extern</KEYWORD2>
+ <LITERAL2>false</LITERAL2>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>inline</KEYWORD1>
+ <KEYWORD1>register</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>sizeof</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <LITERAL2>true</LITERAL2>
+ <KEYWORD3>typedef</KEYWORD3>
+ <KEYWORD1>void</KEYWORD1>
+ <KEYWORD1>volatile</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <!-- Additional keywords from ISO C Standard(C99) -->
+ <KEYWORD3>restrict</KEYWORD3>
+ <KEYWORD3>_Bool</KEYWORD3>
+ <KEYWORD3>_Complex</KEYWORD3>
+ <KEYWORD3>_Pragma</KEYWORD3>
+ <KEYWORD3>_Imaginary</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- Different comment styles. -->
+ <RULES SET="COMMENTS">
+ <!-- Doxygen comment, Javadoc style -->
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+ <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
+ <BEGIN>/**<</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">///<</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">///</EOL_SPAN>
+
+ <!-- Doxygen comment, Qt style -->
+ <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
+ <BEGIN>/*!<</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
+ <BEGIN>/*!</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">//!<</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">//!</EOL_SPAN>
+
+ <!-- C style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+ </RULES>
+
+ <!-- Preprocessor specific rules -->
+ <RULES SET="CPP"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+
+ <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="INCLUDE">include\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="LEX">endif\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="CONDITION">elif\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="CONDITION">if\b</EOL_SPAN_REGEXP>
+
+ <IMPORT DELEGATE="LEX"/>
+
+ <!-- Directives -->
+ <KEYWORDS>
+ <MARKUP>ifdef</MARKUP>
+ <MARKUP>ifndef</MARKUP>
+ <MARKUP>else</MARKUP>
+ <MARKUP>error</MARKUP>
+ <MARKUP>line</MARKUP>
+ <MARKUP>pragma</MARKUP>
+ <MARKUP>undef</MARKUP>
+ <MARKUP>warning</MARKUP>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- After #include directive -->
+ <!-- "\"s are not escaped. -->
+ <RULES SET="INCLUDE"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <IMPORT DELEGATE="LEX"/>
+ </RULES>
+
+ <!-- After #define directive -->
+ <!-- Almost same as the normal code,
+ except two additional operators # and ##. -->
+ <RULES SET="DEFINE"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <IMPORT DELEGATE="LEX"/>
+ <IMPORT DELEGATE="CORE"/>
+ </RULES>
+
+ <!-- After #if or #elif directive -->
+ <!-- All constant expressions and a special operator
+ 'defined' is available. But the core language elements
+ (such as operator 'sizeof', type casting, etc...) are not. -->
+ <RULES SET="CONDITION"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <IMPORT DELEGATE="LEX"/>
+ <KEYWORDS>
+ <KEYWORD2>defined</KEYWORD2>
+ <!-- Both true and false are specially permitted by
+ ISO C++ Standard 2003 16.1p4 -->
+ <KEYWORD2>true</KEYWORD2>
+ <KEYWORD2>false</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
+
diff --git a/jEdit/modes/catalog b/jEdit/modes/catalog
index 071177b..e69993a 100644
--- a/jEdit/modes/catalog
+++ b/jEdit/modes/catalog
@@ -1,547 +1,589 @@
-<?xml version="1.0"?>
-
-<!-- This is a mode catalog. Edit modes must be listed here, -->
-<!-- otherwise they will not be available to jEdit. -->
-
-<!DOCTYPE MODES SYSTEM "catalog.dtd">
-
-<MODES>
-
-<MODE NAME="actionscript" FILE="actionscript.xml"
- FILE_NAME_GLOB="*.as" />
-
-<MODE NAME="ada" FILE="ada.xml"
- FILE_NAME_GLOB="*.{ada,adb,ads}"/>
-
-<MODE NAME="ada95" FILE="ada95.xml" />
-
-<MODE NAME="antlr" FILE="antlr.xml"
- FILE_NAME_GLOB="*.g" />
-
-<MODE NAME="apacheconf" FILE="apacheconf.xml"
- FILE_NAME_GLOB="*httpd.conf" />
-
-<MODE NAME="apdl" FILE="apdl.xml"
- FILE_NAME_GLOB="*.{ans,inp,mak,mac}" />
-
-<MODE NAME="applescript" FILE="applescript.xml"
- FILE_NAME_GLOB="*.applescript" />
-
-<MODE NAME="asp" FILE="asp.xml"
- FILE_NAME_GLOB="*.{asp,asa}" />
-
-<MODE NAME="aspect-j" FILE="aspect-j.xml"
- FILE_NAME_GLOB="*.aj" />
-
-<MODE NAME="assembly-agc" FILE="assembly-agc.xml"
- FILE_NAME_GLOB="*.agc" />
-
-<MODE NAME="assembly-ags" FILE="assembly-ags.xml"
- FILE_NAME_GLOB="*.aea" />
-
-<MODE NAME="assembly-m68k" FILE="assembly-m68k.xml" />
-
-<MODE NAME="assembly-macro32" FILE="assembly-macro32.xml"
- FILE_NAME_GLOB="*.mar" />
-
-<MODE NAME="assembly-mcs51" FILE="assembly-mcs51.xml" />
-
-<MODE NAME="assembly-r2000" FILE="assembly-r2000.xml"
- FILE_NAME_GLOB="*.mips" />
-
-<MODE NAME="assembly-parrot" FILE="assembly-parrot.xml"
- FILE_NAME_GLOB="*.pasm" />
-
-<MODE NAME="assembly-x86" FILE="assembly-x86.xml"
- FILE_NAME_GLOB="*.asm" />
-
-<MODE NAME="awk" FILE="awk.xml"
- FILE_NAME_GLOB="*.awk"
- FIRST_LINE_GLOB="#!*awk*" />
-
-<MODE NAME="b" FILE="b.xml"
- FILE_NAME_GLOB="*.{imp,ref,mch}" />
-
-<MODE NAME="batch" FILE="batch.xml"
- FILE_NAME_GLOB="*.{bat,cmd}" />
-
-<MODE NAME="bbj" FILE="bbj.xml"
- FILE_NAME_GLOB="*.bbj" />
-
-<!-- if anyone knows a file name glob that can be used with this mode,
- please let me know -->
-<MODE NAME="bcel" FILE="bcel.xml" />
-
-<!-- Now that BeanShell 2.0 supports class declarations, its syntax is
- almost identical to Java. -->
-<MODE NAME="beanshell" FILE="java.xml"
- FILE_NAME_GLOB="*.bsh" />
-
-<MODE NAME="bibtex" FILE="bibtex.xml"
- FILE_NAME_GLOB="*.bib" />
-
-<MODE NAME="binsource-agc" FILE="binsource-agc.xml"
- FILE_NAME_GLOB="*.binsource" />
-<!-- We let c++ color the .h files -->
-<MODE NAME="c" FILE="c.xml"
- FILE_NAME_GLOB="*.c" />
-
-<MODE NAME="chill" FILE="chill.xml"
- FILE_NAME_GLOB="*.{chl,mpol}" />
-
-<MODE NAME="cil" FILE="cil.xml"
- FILE_NAME_GLOB="*.il" />
-
-<MODE NAME="clips" FILE="clips.xml"
- FILE_NAME_GLOB="*.clp" />
-
-<MODE NAME="clojure" FILE="clojure.xml" />
-
-<MODE NAME="cmake" FILE="cmake.xml"
- FILE_NAME_GLOB="CMakeLists.txt"/>
-
-<MODE NAME="cobol" FILE="cobol.xml"
- FILE_NAME_GLOB="*.cbl" />
-
-<MODE NAME="coldfusion" FILE="coldfusion.xml"
- FILE_NAME_GLOB="*.{cfm,dbm,cfc}" />
-
-<MODE NAME="c++" FILE="cplusplus.xml"
- FILE_NAME_GLOB="*.{cc,cpp,h,hh,hpp,cxx}" />
-
-<MODE NAME="c#" FILE="csharp.xml"
- FILE_NAME_GLOB="*.cs" />
-
-<MODE NAME="css" FILE="css.xml"
- FILE_NAME_GLOB="*.css" />
-
-<MODE NAME="csv" FILE="csv.xml"
- FILE_NAME_GLOB="*.csv" />
-
-<MODE NAME="cvs-commit" FILE="cvs-commit.xml"
- FILE_NAME_GLOB="cvs*.tmp"/>
-
-<MODE NAME="d" FILE="d.xml"
- FILE_NAME_GLOB="*.d" />
-
-<MODE NAME="django" FILE="django.xml"/>
-
-<MODE NAME="dot" FILE="dot.xml"
- FILE_NAME_GLOB="*.dot" />
-
-<MODE NAME="doxygen" FILE="doxygen.xml"
- FILE_NAME_GLOB="doxyfile*" />
-
-<MODE NAME="dsssl" FILE="dsssl.xml"
- FILE_NAME_GLOB="*.dsl" />
-
-<MODE NAME="embperl" FILE="embperl.xml"
- FILE_NAME_GLOB="*.epl"/>
-
-<MODE NAME="erlang" FILE="erlang.xml"
- FILE_NAME_GLOB="*.erl"/>
-
-<MODE NAME="eiffel" FILE="eiffel.xml"
- FILE_NAME_GLOB="*.e" />
-
-<MODE NAME="fhtml" FILE="fhtml.xml"
- FILE_NAME_GLOB="*.{furnace,fhtml}"/>
-
-<MODE NAME="factor" FILE="factor.xml"
- FILE_NAME_GLOB="*.factor"/>
-
-<MODE NAME="forth" FILE="forth.xml"
- FILE_NAME_GLOB="*.f" />
-
-<MODE NAME="fortran" FILE="fortran.xml"
- FILE_NAME_GLOB="*.{for,fort,f77,f90}" />
-
-<MODE NAME="foxpro" FILE="foxpro.xml"
- FILE_NAME_GLOB="*.prg" />
-
-<MODE NAME="freemarker" FILE="freemarker.xml"
- FILE_NAME_GLOB="*.ftl"
- FIRST_LINE_GLOB="<\#ftl*"/>
-
-<MODE NAME="gcbasic" FILE="gcbasic.xml"
- FILE_NAME_GLOB="*.{gc,gcb}"
- FIRST_LINE_GLOB="{*GCBASIC*,*Great Cow BASIC*}" />
-
-<MODE NAME="gettext" FILE="gettext.xml"
- FILE_NAME_GLOB="*.{po,pot}" />
-
-<MODE NAME="gnuplot" FILE="gnuplot.xml"
- FILE_NAME_GLOB="*.{dem,plt}" />
-
-<MODE NAME="groovy" FILE="groovy.xml"
- FILE_NAME_GLOB="*.{gant,gradle,groovy,grv}"/>
-
-<MODE NAME="haskell" FILE="haskell.xml"
- FILE_NAME_GLOB="*.hs" />
-
-<!-- Used by Andre Kaplan's Hex plugin -->
-<MODE NAME="hex" FILE="hex.xml" />
-
-<MODE NAME="hlsl" FILE="hlsl.xml"
- FILE_NAME_GLOB="*.fx" />
-
-<MODE NAME="htaccess" FILE="htaccess.xml"
- FILE_NAME_GLOB=".htaccess" />
-
-<MODE NAME="html" FILE="html.xml"
- FILE_NAME_GLOB="*.{html,htm,hta}" />
-
-<MODE NAME="i4gl" FILE="i4gl.xml"
- FILE_NAME_GLOB="*.4gl" />
-
-<MODE NAME="icalendar" FILE="ical.xml"
- FILE_NAME_GLOB="*.ics" />
-
-<MODE NAME="icon" FILE="icon.xml"
- FILE_NAME_GLOB="*.icn" />
-
-<MODE NAME="idl" FILE="idl.xml"
- FILE_NAME_GLOB="*.idl" />
-
-<MODE NAME="inform" FILE="inform.xml"
- FILE_NAME_GLOB="*.inf" />
-
-<MODE NAME="inno-setup" FILE="inno-setup.xml"
- FILE_NAME_GLOB="*.iss" />
-
-<MODE NAME="ini" FILE="ini.xml"
- FILE_NAME_GLOB="*.{ini,reg}" />
-
-<MODE NAME="interlis" FILE="interlis.xml"
- FILE_NAME_GLOB="*.ili" />
-
-<MODE NAME="io" FILE="io.xml"
- FILE_NAME_GLOB="*.io" />
-
-<MODE NAME="javacc" FILE="javacc.xml"
- FILE_NAME_GLOB="*.{jj,jjt}"/>
-
-<MODE NAME="java" FILE="java.xml"
- FILE_NAME_GLOB="*.java" />
-
-<MODE NAME="javafx" FILE="javafx.xml"
- FILE_NAME_GLOB="*.fx" />
-
-<MODE NAME="javascript" FILE="javascript.xml"
- FILE_NAME_GLOB="{*.js,Buildsub}" />
-
-<MODE NAME="jcl" FILE="jcl.xml"
- FILE_NAME_GLOB="*.jcl" />
-
-<MODE NAME="jedit-actions" FILE="jedit-actions.xml" />
-
-<MODE NAME="jhtml" FILE="jhtml.xml"
- FILE_NAME_GLOB="*.jhtml" />
-
-<MODE NAME="jmk" FILE="jmk.xml"
- FILE_NAME_GLOB="*.jmk" />
-
-<MODE NAME="jsp" FILE="jsp.xml"
- FILE_NAME_GLOB="*.{jsp,jsf,jspf,tag}" />
-
-<!-- Note that a generic 'tex.xml' is included as well, for minimal
- plain TeX/AMSTeX highlighting. -->
-
-<MODE NAME="latex" FILE="latex.xml"
- FILE_NAME_GLOB="*.{tex,sty,ltx}" />
-
-<MODE NAME="lilypond" FILE="lilypond.xml"
- FILE_NAME_GLOB="*.ly" />
-
-<MODE NAME="lisp" FILE="lisp.xml"
- FILE_NAME_GLOB="*.{lisp,lsp,el}" />
-
-<MODE NAME="literate-haskell" FILE="literate-haskell.xml"
- FILE_NAME_GLOB="*.lhs" />
-
-<MODE NAME="lotos" FILE="lotos.xml"
- FILE_NAME_GLOB="*.{lot,lotos}"/>
-
-<MODE NAME="lua" FILE="lua.xml"
- FILE_NAME_GLOB="*.lua" />
-
-<MODE NAME="mail" FILE="mail.xml" />
-
-<MODE NAME="makefile" FILE="makefile.xml"
- FILE_NAME_GLOB="*makefile" />
-
-<MODE NAME="maple" FILE="maple.xml"
- FILE_NAME_GLOB="*.{mpl,mws}" />
-
-<MODE NAME="ml" FILE="ml.xml"
- FILE_NAME_GLOB="*.{sml,ml}" />
-
-<MODE NAME="modula3" FILE="modula3.xml"
- FILE_NAME_GLOB="*.[im]3" />
-
-<MODE NAME="moin" FILE="moin.xml"
- FILE_NAME_GLOB="*.moin" />
-
-<MODE NAME="mqsc" FILE="mqsc.xml"
- FILE_NAME_GLOB="*.mqsc" />
-
-<MODE NAME="myghty" FILE="myghty.xml"
- FILE_NAME_GLOB="{autohandler,dhandler,*.myt}"/>
-
-<MODE NAME="mysql" FILE="mysql.xml" />
-
-<MODE NAME="n3" FILE="n3.xml"
- FILE_NAME_GLOB="*.n3" />
-
-<MODE NAME="netrexx" FILE="netrexx.xml"
- FILE_NAME_GLOB="*.nrx" />
-
-<MODE NAME="nqc" FILE="nqc.xml"
- FILE_NAME_GLOB="*.nqc" />
-
-<MODE NAME="nsis2" FILE="nsis2.xml"
- FILE_NAME_GLOB="*.{nsi,nsh}" />
-
-<MODE NAME="objective-c" FILE="objective-c.xml"
- FILE_NAME_GLOB="*.{objc,m}" />
-
-<MODE NAME="objectrexx" FILE="objectrexx.xml"
- FILE_NAME_GLOB="*.{rex,orx}" />
-
-<MODE NAME="occam" FILE="occam.xml"
- FILE_NAME_GLOB="*.icc" />
-
-<MODE NAME="omnimark" FILE="omnimark.xml"
- FILE_NAME_GLOB="*.x{om,in}" />
-
-<MODE NAME="pascal" FILE="pascal.xml"
- FILE_NAME_GLOB="*.{pas,dpr,dpk}" />
-
-<MODE NAME="patch" FILE="patch.xml"
- FILE_NAME_GLOB="*.{diff,patch}" />
-
-<MODE NAME="perl" FILE="perl.xml"
- FILE_NAME_GLOB="*.p[lm]"
- FIRST_LINE_GLOB="#!/*perl*" />
-
-<MODE NAME="php" FILE="php.xml"
- FILE_NAME_GLOB="*.{php3,php4,php,phtml,inc}"
- FIRST_LINE_GLOB="{<?php*,#!/*php*}" />
-
-<MODE NAME="pike" FILE="pike.xml"
- FILE_NAME_GLOB="*.{pike,pmod}" />
-
-<MODE NAME="pl-sql" FILE="pl-sql.xml"
- FILE_NAME_GLOB="*.pls" />
-
-<MODE NAME="pl1" FILE="pl1.xml"
- FILE_NAME_GLOB="*.pl[i1]" />
-
-<MODE NAME="pop11" FILE="pop11.xml"
- FILE_NAME_GLOB="*.{p,pop11,p11}" />
-
-<MODE NAME="postscript" FILE="postscript.xml"
- FILE_NAME_GLOB="*.{ps,eps}" />
-
-<MODE NAME="povray" FILE="povray.xml"
- FILE_NAME_GLOB="*.{pov,povray}" />
-
-<MODE NAME="powerdynamo" FILE="powerdynamo.xml"
- FILE_NAME_GLOB="*.{ssc,stm}" />
-
-<MODE NAME="powershell" FILE="powershell.xml"
- FILE_NAME_GLOB="*.ps1" />
-
-<MODE NAME="prolog" FILE="prolog.xml"
- FILE_NAME_GLOB="*.pro" />
-
-<MODE NAME="progress" FILE="progress.xml"
- FILE_NAME_GLOB="*.[piw]" />
-
-<MODE NAME="properties" FILE="props.xml"
- FILE_NAME_GLOB="*{properties,props}" />
-
-<MODE NAME="psp" FILE="psp.xml"
- FILE_NAME_GLOB="*.psp" />
-
-<MODE NAME="ptl" FILE="ptl.xml"
- FILE_NAME_GLOB="*.ptl"/>
-
-<MODE NAME="pure" FILE="pure.xml"
- FILE_NAME_GLOB="*.pure" />
-
-<MODE NAME="pvwave" FILE="pvwave.xml"
- FILE_NAME_GLOB="*.jou" />
-
-<MODE NAME="pyrex" FILE="pyrex.xml"
- FILE_NAME_GLOB="*.{pyx}" />
-
-<MODE NAME="python" FILE="python.xml"
- FILE_NAME_GLOB="*.{py,pyw,sc,jy}"
- FIRST_LINE_GLOB="#!*/*python*" />
-
-<MODE NAME="rebol" FILE="rebol.xml"
- FILE_NAME_GLOB="*.r" />
-
-<MODE NAME="redcode" FILE="redcode.xml"
- FILE_NAME_GLOB="*.{red,rc}" />
-
-<MODE NAME="relax-ng-compact" FILE="relax-ng-compact.xml"
- FILE_NAME_GLOB="*.rnc" />
-
-<MODE NAME="renderman-rib" FILE="rib.xml"
- FILE_NAME_GLOB="*.rib" />
-
-<MODE NAME="rd" FILE="rd.xml"
- FILE_NAME_GLOB="*.rd" />
-
-<MODE NAME="rest" FILE="rest.xml"
- FILE_NAME_GLOB="*.{rst,rest}"
- FIRST_LINE_GLOB="{===,~~~}*"/>
-
-<MODE NAME="rhtml" FILE="rhtml.xml"
- FILE_NAME_GLOB="*.rhtml" />
-
-<MODE NAME="rpm-spec" FILE="rpmspec.xml"
- FILE_NAME_GLOB="*.spec" />
-
-<MODE NAME="rtf" FILE="rtf.xml"
- FILE_NAME_GLOB="*.rtf" />
-
-<MODE NAME="ruby" FILE="ruby.xml"
- FILE_NAME_GLOB="*.{rb,rbw}"
- FIRST_LINE_GLOB="#!*/*ruby*" />
-
-<MODE NAME="rview" FILE="rview.xml"
- FILE_NAME_GLOB="*.rvw" />
-
-<MODE NAME="s+" FILE="splus.xml"
- FILE_NAME_GLOB="*.ssc" />
-
-<MODE NAME="s#" FILE="ssharp.xml"
- FILE_NAME_GLOB="*.{ss,ssc,ssi,ssw,sts,aml}" />
-
-<MODE NAME="sas" FILE="sas.xml"
- FILE_NAME_GLOB="*.sas" />
-
-<MODE NAME="scheme" FILE="scheme.xml"
- FILE_NAME_GLOB="*.scm" />
-
-<MODE NAME="sgml" FILE="sgml.xml"
- FILE_NAME_GLOB="*.{sgml,sgm,dtd}" />
-
-<MODE NAME="rcp" FILE="rcp.xml"
- FILE_NAME_GLOB="*.rcp" />
-
-<MODE NAME="shellscript" FILE="shellscript.xml"
- FILE_NAME_GLOB="*.{csh,sh,bash,login,profile,bashrc,bash_profile}"
- FIRST_LINE_GLOB="#!/*sh*" />
-
-<MODE NAME="shtml" FILE="shtml.xml"
- FILE_NAME_GLOB="*.{shtml,shtm,ssi}" />
-
-<MODE NAME="slate" FILE="slate.xml"
- FILE_NAME_GLOB="*.slate" />
-
-<MODE NAME="smalltalk" FILE="smalltalk.xml"
- FILE_NAME_GLOB="*.{st,sources,changes}" />
-
-<MODE NAME="sdl/pr" FILE="sdl_pr.xml"
- FILE_NAME_GLOB="*.pr"/>
-
-<MODE NAME="sql-loader" FILE="sql-loader.xml"
- FILE_NAME_GLOB="*.ctl" />
-
-<MODE NAME="smi-mib" FILE="smi-mib.xml"
- FILE_NAME_GLOB="*{.mib,-MIB.txt}" />
-
-<MODE NAME="sqr" FILE="sqr.xml"
- FILE_NAME_GLOB="*.{sqr,sqc}" />
-
-<MODE NAME="squidconf" FILE="squidconf.xml"
- FILE_NAME_GLOB="squid.conf" />
-
-<MODE NAME="stata_do" FILE="statado.xml"
- FILE_NAME_GLOB="*.{do}" />
-
-<MODE NAME="stata_ado" FILE="stataado.xml"
- FILE_NAME_GLOB="*.{ado}" />
-
-<MODE NAME="svn-commit" FILE="svn-commit.xml"
- FILE_NAME_GLOB="svn-commit*.tmp" />
-
-<MODE NAME="swig" FILE="swig.xml"
- FILE_NAME_GLOB="*.{i,swg}" />
-
-<MODE NAME="tcl" FILE="tcl.xml"
- FILE_NAME_GLOB="*.{tcl,tsh}" />
-
-<MODE NAME="texinfo" FILE="texinfo.xml"
- FILE_NAME_GLOB="*.texi" />
-
-<MODE NAME="tex" FILE="tex.xml" />
-
-<MODE NAME="text" FILE="text.xml"
- FILE_NAME_GLOB="*.txt" />
-
-<!-- This mode MUST be placed after text mode
- because filename globs are checked in reverse order -->
-<MODE NAME="rfc" FILE="rfc.xml"
- FILE_NAME_GLOB="rfc*.txt" />
-
-<MODE NAME="tsp" FILE="tsp.xml"
- FILE_NAME_GLOB="*.tsp" />
-
-<MODE NAME="tpl" FILE="tpl.xml"
- FILE_NAME_GLOB="*.tpl" />
-
-<MODE NAME="transact-sql" FILE="tsql.xml"
- FILE_NAME_GLOB="*.sql" />
-
-<MODE NAME="template-toolkit" FILE="tthtml.xml"
- FILE_NAME_GLOB="*.tt{html,css,js}" />
-
-<MODE NAME="twiki" FILE="twiki.xml"
- FILE_NAME_GLOB="*.twiki"/>
-
-<MODE NAME="typoscript" FILE="typoscript.xml"
- FILE_NAME_GLOB="*.ts"/>
-
-<MODE NAME="uscript" FILE="uscript.xml"
- FILE_NAME_GLOB="*.uc" />
-
-<MODE NAME="vbscript" FILE="vbscript.xml"
- FILE_NAME_GLOB="*.{vbs,bas,cls}" />
-
-<MODE NAME="velocity" FILE="velocity.xml"
- FILE_NAME_GLOB="*.vm" />
-
-<MODE NAME="verilog" FILE="verilog.xml"
- FILE_NAME_GLOB="*.{ver,v,sv}" />
-
-<MODE NAME="vhdl" FILE="vhdl.xml"
- FILE_NAME_GLOB="*.vh*" />
-
-<MODE NAME="vrml2" FILE="vrml2.xml"
- FILE_NAME_GLOB="*.{wrl,wrz}"/>
-
-<MODE NAME="xml" FILE="xml.xml"
- FILE_NAME_GLOB="*.{xml,xhtml,xsd,qrc,ui}"
- FIRST_LINE_GLOB="<\?xml*" />
-
-<MODE NAME="xq" FILE="xq.xml"
- FILE_NAME_GLOB="*.x{q,qm,ql}" />
-
-<MODE NAME="xsl" FILE="xsl.xml"
- FILE_NAME_GLOB="*.xsl" />
-
-<MODE NAME="yab" FILE="yab.xml"
- FILE_NAME_GLOB="*.yab" />
-
-<MODE NAME="yaml" FILE="yaml.xml"
- FILE_NAME_GLOB="*.{yml,yaml}" />
-
-<MODE NAME="zpt" FILE="zpt.xml"
- FILE_NAME_GLOB="*.{pt,zpt}"/>
-
-</MODES>
+<?xml version="1.0"?>
+
+<!-- This is a mode catalog. Edit modes must be listed here, -->
+<!-- otherwise they will not be available to jEdit. -->
+
+<!DOCTYPE MODES SYSTEM "catalog.dtd">
+
+<MODES>
+
+<MODE NAME="actionscript" FILE="actionscript.xml"
+ FILE_NAME_GLOB="*.as" />
+
+<MODE NAME="ada" FILE="ada.xml"
+ FILE_NAME_GLOB="*.{ada,adb,ads}"/>
+
+<MODE NAME="ada95" FILE="ada95.xml" />
+
+<MODE NAME="ant" FILE="ant.xml"
+ FILE_NAME_GLOB="*.xml"
+ FIRST_LINE_GLOB="<project*>" />
+
+<MODE NAME="antlr" FILE="antlr.xml"
+ FILE_NAME_GLOB="*.g" />
+
+<MODE NAME="apacheconf" FILE="apacheconf.xml"
+ FILE_NAME_GLOB="*httpd.conf" />
+
+<MODE NAME="apdl" FILE="apdl.xml"
+ FILE_NAME_GLOB="*.{ans,inp,mak,mac}" />
+
+<MODE NAME="applescript" FILE="applescript.xml"
+ FILE_NAME_GLOB="*.applescript" />
+
+<MODE NAME="asp" FILE="asp.xml"
+ FILE_NAME_GLOB="*.{asp,asa}" />
+
+<MODE NAME="aspect-j" FILE="aspect-j.xml"
+ FILE_NAME_GLOB="*.aj" />
+
+<MODE NAME="assembly-agc" FILE="assembly-agc.xml"
+ FILE_NAME_GLOB="*.agc" />
+
+<MODE NAME="assembly-ags" FILE="assembly-ags.xml"
+ FILE_NAME_GLOB="*.aea" />
+
+<MODE NAME="assembly-m68k" FILE="assembly-m68k.xml" />
+
+<MODE NAME="assembly-macro32" FILE="assembly-macro32.xml"
+ FILE_NAME_GLOB="*.mar" />
+
+<MODE NAME="assembly-mcs51" FILE="assembly-mcs51.xml" />
+
+<MODE NAME="assembly-r2000" FILE="assembly-r2000.xml"
+ FILE_NAME_GLOB="*.mips" />
+
+<MODE NAME="assembly-parrot" FILE="assembly-parrot.xml"
+ FILE_NAME_GLOB="*.pasm" />
+
+<MODE NAME="assembly-x86" FILE="assembly-x86.xml"
+ FILE_NAME_GLOB="*.asm" />
+
+<MODE NAME="awk" FILE="awk.xml"
+ FILE_NAME_GLOB="*.awk"
+ FIRST_LINE_GLOB="#!*awk*" />
+
+<MODE NAME="b" FILE="b.xml"
+ FILE_NAME_GLOB="*.{imp,ref,mch}" />
+
+<MODE NAME="batch" FILE="batch.xml"
+ FILE_NAME_GLOB="*.{bat,cmd}" />
+
+<MODE NAME="bbj" FILE="bbj.xml"
+ FILE_NAME_GLOB="*.bbj" />
+
+<!-- if anyone knows a file name glob that can be used with this mode,
+ please let me know -->
+<MODE NAME="bcel" FILE="bcel.xml" />
+
+<!-- Now that BeanShell 2.0 supports class declarations, its syntax is
+ almost identical to Java. -->
+<MODE NAME="beanshell" FILE="java.xml"
+ FILE_NAME_GLOB="*.bsh" />
+
+<MODE NAME="bibtex" FILE="bibtex.xml"
+ FILE_NAME_GLOB="*.bib" />
+
+<MODE NAME="binsource-agc" FILE="binsource-agc.xml"
+ FILE_NAME_GLOB="*.binsource" />
+<!-- We let c++ color the .h files -->
+<MODE NAME="c" FILE="c.xml"
+ FILE_NAME_GLOB="*.c" />
+
+<MODE NAME="chill" FILE="chill.xml"
+ FILE_NAME_GLOB="*.{chl,mpol}" />
+
+<MODE NAME="cil" FILE="cil.xml"
+ FILE_NAME_GLOB="*.il" />
+
+<MODE NAME="clips" FILE="clips.xml"
+ FILE_NAME_GLOB="*.clp" />
+
+<MODE NAME="clojure" FILE="clojure.xml"
+ FILE_NAME_GLOB="*.clj" />
+
+<MODE NAME="cmake" FILE="cmake.xml"
+ FILE_NAME_GLOB="CMakeLists.txt"/>
+
+<MODE NAME="cobol" FILE="cobol.xml"
+ FILE_NAME_GLOB="*.cbl" />
+
+<MODE NAME="coldfusion" FILE="coldfusion.xml"
+ FILE_NAME_GLOB="*.{cfm,dbm,cfc}" />
+
+<MODE NAME="c++" FILE="cplusplus.xml"
+ FILE_NAME_GLOB="*.{cc,cpp,h,hh,hpp,cxx}" />
+
+<MODE NAME="c#" FILE="csharp.xml"
+ FILE_NAME_GLOB="*.cs" />
+
+<MODE NAME="css" FILE="css.xml"
+ FILE_NAME_GLOB="*.css" />
+
+<MODE NAME="csv" FILE="csv.xml"
+ FILE_NAME_GLOB="*.csv" />
+
+<MODE NAME="cvs-commit" FILE="cvs-commit.xml"
+ FILE_NAME_GLOB="cvs*.tmp"/>
+
+<MODE NAME="d" FILE="d.xml"
+ FILE_NAME_GLOB="*.d" />
+
+<MODE NAME="django" FILE="django.xml"/>
+
+<MODE NAME="dot" FILE="dot.xml"
+ FILE_NAME_GLOB="*.dot" />
+
+<MODE NAME="doxygen" FILE="doxygen.xml"
+ FILE_NAME_GLOB="doxyfile*" />
+
+<MODE NAME="dsssl" FILE="dsssl.xml"
+ FILE_NAME_GLOB="*.dsl" />
+
+<MODE NAME="embperl" FILE="embperl.xml"
+ FILE_NAME_GLOB="*.epl"/>
+
+<MODE NAME="erlang" FILE="erlang.xml"
+ FILE_NAME_GLOB="*.erl"/>
+
+<MODE NAME="eiffel" FILE="eiffel.xml"
+ FILE_NAME_GLOB="*.e" />
+
+<MODE NAME="fhtml" FILE="fhtml.xml"
+ FILE_NAME_GLOB="*.{furnace,fhtml}"/>
+
+<MODE NAME="factor" FILE="factor.xml"
+ FILE_NAME_GLOB="*.factor"/>
+
+<MODE NAME="forth" FILE="forth.xml"
+ FILE_NAME_GLOB="*.f" />
+
+<MODE NAME="fortran" FILE="fortran.xml"
+ FILE_NAME_GLOB="*.{for,fort,f77,f90}" />
+
+<MODE NAME="foxpro" FILE="foxpro.xml"
+ FILE_NAME_GLOB="*.prg" />
+
+<MODE NAME="freemarker" FILE="freemarker.xml"
+ FILE_NAME_GLOB="*.ftl"
+ FIRST_LINE_GLOB="<\#ftl*"/>
+
+<MODE NAME="gcbasic" FILE="gcbasic.xml"
+ FILE_NAME_GLOB="*.{gc,gcb}"
+ FIRST_LINE_GLOB="{*GCBASIC*,*Great Cow BASIC*}" />
+
+<MODE NAME="gettext" FILE="gettext.xml"
+ FILE_NAME_GLOB="*.{po,pot}" />
+
+<MODE NAME="gnuplot" FILE="gnuplot.xml"
+ FILE_NAME_GLOB="*.{dem,plt}" />
+
+<MODE NAME="go" FILE="go.xml"
+ FILE_NAME_GLOB="*.go" />
+
+<MODE NAME="groovy" FILE="groovy.xml"
+ FILE_NAME_GLOB="*.{gant,gradle,groovy,grv}"/>
+
+<MODE NAME="gsp" FILE="jsp.xml"
+ FILE_NAME_GLOB="*.{gsp}" />
+
+<MODE NAME="haskell" FILE="haskell.xml"
+ FILE_NAME_GLOB="*.hs" />
+
+<MODE NAME="haxe" FILE="haxe.xml"
+ FILE_NAME_GLOB="*.hx" />
+
+<MODE NAME="hxml" FILE="hxml.xml"
+ FILE_NAME_GLOB="*.hxml" />
+
+<!-- Used by Andre Kaplan's Hex plugin -->
+<MODE NAME="hex" FILE="hex.xml" />
+
+<MODE NAME="hlsl" FILE="hlsl.xml"
+ FILE_NAME_GLOB="*.fx" />
+
+<MODE NAME="htaccess" FILE="htaccess.xml"
+ FILE_NAME_GLOB=".htaccess" />
+
+<MODE NAME="html" FILE="html.xml"
+ FILE_NAME_GLOB="*.{html,htm,hta}" />
+
+<MODE NAME="i4gl" FILE="i4gl.xml"
+ FILE_NAME_GLOB="*.4gl" />
+
+<MODE NAME="icalendar" FILE="ical.xml"
+ FILE_NAME_GLOB="*.ics" />
+
+<MODE NAME="icon" FILE="icon.xml"
+ FILE_NAME_GLOB="*.icn" />
+
+<MODE NAME="idl" FILE="idl.xml"
+ FILE_NAME_GLOB="*.idl" />
+
+<MODE NAME="inform" FILE="inform.xml"
+ FILE_NAME_GLOB="*.inf" />
+
+<MODE NAME="inno-setup" FILE="inno-setup.xml"
+ FILE_NAME_GLOB="*.iss" />
+
+<MODE NAME="ini" FILE="ini.xml"
+ FILE_NAME_GLOB="*.{ini,reg}" />
+
+<MODE NAME="interlis" FILE="interlis.xml"
+ FILE_NAME_GLOB="*.ili" />
+
+<MODE NAME="io" FILE="io.xml"
+ FILE_NAME_GLOB="*.io" />
+
+<MODE NAME="javacc" FILE="javacc.xml"
+ FILE_NAME_GLOB="*.{jj,jjt}"/>
+
+<MODE NAME="java" FILE="java.xml"
+ FILE_NAME_GLOB="*.java" />
+
+<MODE NAME="javafx" FILE="javafx.xml"
+ FILE_NAME_GLOB="*.fx" />
+
+<MODE NAME="javascript" FILE="javascript.xml"
+ FILE_NAME_GLOB="{*.js,Buildsub}" />
+
+<MODE NAME="jcl" FILE="jcl.xml"
+ FILE_NAME_GLOB="*.jcl" />
+
+<MODE NAME="jedit-actions" FILE="jedit-actions.xml"
+ FILE_NAME_GLOB="actions.xml"/>
+
+<MODE NAME="jhtml" FILE="jhtml.xml"
+ FILE_NAME_GLOB="*.jhtml" />
+
+<MODE NAME="jmk" FILE="jmk.xml"
+ FILE_NAME_GLOB="*.jmk" />
+
+<MODE NAME="json" FILE="json.xml"
+ FILE_NAME_GLOB="*.json" />
+
+<MODE NAME="jsp" FILE="jsp.xml"
+ FILE_NAME_GLOB="*.{jsp,jsf,jspf,tag}" />
+
+<!-- Note that a generic 'tex.xml' is included as well, for minimal
+ plain TeX/AMSTeX highlighting. -->
+
+<MODE NAME="latex" FILE="latex.xml"
+ FILE_NAME_GLOB="*.{tex,sty,ltx}" />
+
+<MODE NAME="lilypond" FILE="lilypond.xml"
+ FILE_NAME_GLOB="*.{ly,ily}" />
+
+<MODE NAME="lisp" FILE="lisp.xml"
+ FILE_NAME_GLOB="*.{lisp,lsp,el}" />
+
+<MODE NAME="literate-haskell" FILE="literate-haskell.xml"
+ FILE_NAME_GLOB="*.lhs" />
+
+<MODE NAME="logtalk" FILE="logtalk.xml"
+ FILE_NAME_GLOB="*.lgt" />
+
+<MODE NAME="lotos" FILE="lotos.xml"
+ FILE_NAME_GLOB="*.{lot,lotos}"/>
+
+<MODE NAME="lua" FILE="lua.xml"
+ FILE_NAME_GLOB="*.lua" />
+
+<MODE NAME="mail" FILE="mail.xml" />
+
+<MODE NAME="makefile" FILE="makefile.xml"
+ FILE_NAME_GLOB="*makefile" />
+
+<MODE NAME="maple" FILE="maple.xml"
+ FILE_NAME_GLOB="*.{mpl,mws}" />
+
+<MODE NAME="maven" FILE="maven.xml"
+ FILE_NAME_GLOB="pom.xml"/>
+
+<MODE NAME="ml" FILE="ml.xml"
+ FILE_NAME_GLOB="*.{sml,ml}" />
+
+<MODE NAME="modula3" FILE="modula3.xml"
+ FILE_NAME_GLOB="*.[im]3" />
+
+<MODE NAME="moin" FILE="moin.xml"
+ FILE_NAME_GLOB="*.moin" />
+
+<MODE NAME="mqsc" FILE="mqsc.xml"
+ FILE_NAME_GLOB="*.mqsc" />
+
+<MODE NAME="myghty" FILE="myghty.xml"
+ FILE_NAME_GLOB="{autohandler,dhandler,*.myt}"/>
+
+<MODE NAME="mysql" FILE="mysql.xml" />
+
+<MODE NAME="n3" FILE="n3.xml"
+ FILE_NAME_GLOB="*.n3" />
+
+<MODE NAME="netrexx" FILE="netrexx.xml"
+ FILE_NAME_GLOB="*.nrx" />
+
+<MODE NAME="nqc" FILE="nqc.xml"
+ FILE_NAME_GLOB="*.nqc" />
+
+<MODE NAME="nsis2" FILE="nsis2.xml"
+ FILE_NAME_GLOB="*.{nsi,nsh}" />
+
+<MODE NAME="objective-c" FILE="objective-c.xml"
+ FILE_NAME_GLOB="*.{objc,m}" />
+
+<MODE NAME="objectrexx" FILE="objectrexx.xml"
+ FILE_NAME_GLOB="*.{rex,orx}" />
+
+<MODE NAME="occam" FILE="occam.xml"
+ FILE_NAME_GLOB="*.icc" />
+
+<MODE NAME="omnimark" FILE="omnimark.xml"
+ FILE_NAME_GLOB="*.x{om,in}" />
+
+<MODE NAME="pascal" FILE="pascal.xml"
+ FILE_NAME_GLOB="*.{pas,dpr,dpk}" />
+
+<MODE NAME="patch" FILE="patch.xml"
+ FILE_NAME_GLOB="*.{diff,patch}" />
+
+<MODE NAME="perl" FILE="perl.xml"
+ FILE_NAME_GLOB="*.p[lm]"
+ FIRST_LINE_GLOB="#!/*perl*" />
+
+<MODE NAME="php" FILE="php.xml"
+ FILE_NAME_GLOB="*.{php3,php4,php,phtml,inc}"
+ FIRST_LINE_GLOB="{<?php*,#!/*php*}" />
+
+<MODE NAME="pike" FILE="pike.xml"
+ FILE_NAME_GLOB="*.{pike,pmod}" />
+
+<MODE NAME="plaintex" FILE="plaintex.xml" />
+
+<MODE NAME="pl-sql" FILE="pl-sql.xml"
+ FILE_NAME_GLOB="*.pls" />
+
+<MODE NAME="pl1" FILE="pl1.xml"
+ FILE_NAME_GLOB="*.pl[i1]" />
+
+<MODE NAME="pop11" FILE="pop11.xml"
+ FILE_NAME_GLOB="*.{p,pop11,p11}" />
+
+<MODE NAME="postscript" FILE="postscript.xml"
+ FILE_NAME_GLOB="*.{ps,eps}" />
+
+<MODE NAME="povray" FILE="povray.xml"
+ FILE_NAME_GLOB="*.{pov,povray}" />
+
+<MODE NAME="powerdynamo" FILE="powerdynamo.xml"
+ FILE_NAME_GLOB="*.{ssc,stm}" />
+
+<MODE NAME="powershell" FILE="powershell.xml"
+ FILE_NAME_GLOB="*.ps1" />
+
+<MODE NAME="prolog" FILE="prolog.xml"
+ FILE_NAME_GLOB="*.pro" />
+
+<MODE NAME="progress" FILE="progress.xml"
+ FILE_NAME_GLOB="*.[piw]" />
+
+<MODE NAME="properties" FILE="props.xml"
+ FILE_NAME_GLOB="*{properties,props}" />
+
+<MODE NAME="psp" FILE="psp.xml"
+ FILE_NAME_GLOB="*.psp" />
+
+<MODE NAME="ptl" FILE="ptl.xml"
+ FILE_NAME_GLOB="*.ptl"/>
+
+<MODE NAME="pure" FILE="pure.xml"
+ FILE_NAME_GLOB="*.pure"
+ FIRST_LINE_GLOB="#!*/*pure"/>
+
+<MODE NAME="pvwave" FILE="pvwave.xml"
+ FILE_NAME_GLOB="*.jou" />
+
+<MODE NAME="pyrex" FILE="pyrex.xml"
+ FILE_NAME_GLOB="*.{pyx}" />
+
+<MODE NAME="python" FILE="python.xml"
+ FILE_NAME_GLOB="*.{py,pyw,sc,jy}"
+ FIRST_LINE_GLOB="#!*/*python*" />
+
+<MODE NAME="rebol" FILE="rebol.xml"
+ FILE_NAME_GLOB="*.r" />
+
+<MODE NAME="redcode" FILE="redcode.xml"
+ FILE_NAME_GLOB="*.{red,rc}" />
+
+<MODE NAME="relax-ng-compact" FILE="relax-ng-compact.xml"
+ FILE_NAME_GLOB="*.rnc" />
+
+<MODE NAME="renderman-rib" FILE="rib.xml"
+ FILE_NAME_GLOB="*.rib" />
+
+<MODE NAME="rd" FILE="rd.xml"
+ FILE_NAME_GLOB="*.rd" />
+
+<MODE NAME="rest" FILE="rest.xml"
+ FILE_NAME_GLOB="*.{rst,rest}"
+ FIRST_LINE_GLOB="{===,~~~}*"/>
+
+<MODE NAME="rhtml" FILE="rhtml.xml"
+ FILE_NAME_GLOB="*.{rhtml,html.erb}" />
+
+<MODE NAME="rpm-spec" FILE="rpmspec.xml"
+ FILE_NAME_GLOB="*.spec" />
+
+<MODE NAME="rtf" FILE="rtf.xml"
+ FILE_NAME_GLOB="*.rtf" />
+
+<MODE NAME="ruby" FILE="ruby.xml"
+ FILE_NAME_GLOB="*.{rb,rbw}"
+ FIRST_LINE_GLOB="#!*/*ruby*" />
+
+<MODE NAME="rview" FILE="rview.xml"
+ FILE_NAME_GLOB="*.rvw" />
+
+<MODE NAME="s+" FILE="splus.xml"
+ FILE_NAME_GLOB="*.ssc" />
+
+<MODE NAME="s#" FILE="ssharp.xml"
+ FILE_NAME_GLOB="*.{ss,ssc,ssi,ssw,sts,aml}" />
+
+<MODE NAME="sas" FILE="sas.xml"
+ FILE_NAME_GLOB="*.sas" />
+
+<MODE NAME="scheme" FILE="scheme.xml"
+ FILE_NAME_GLOB="*.scm" />
+
+<MODE NAME="sgml" FILE="sgml.xml"
+ FILE_NAME_GLOB="*.{sgml,sgm,dtd}" />
+
+<MODE NAME="sip" FILE="sip.xml" />
+
+<MODE NAME="rcp" FILE="rcp.xml"
+ FILE_NAME_GLOB="*.rcp" />
+
+<MODE NAME="shellscript" FILE="shellscript.xml"
+ FILE_NAME_GLOB="*.{csh,sh,bash,login,profile,bashrc,bash_profile}"
+ FIRST_LINE_GLOB="#!/*sh*" />
+
+<MODE NAME="shtml" FILE="shtml.xml"
+ FILE_NAME_GLOB="*.{shtml,shtm,ssi}" />
+
+<MODE NAME="slate" FILE="slate.xml"
+ FILE_NAME_GLOB="*.slate" />
+
+<MODE NAME="slax" FILE="slax.xml"
+ FILE_NAME_GLOB="*.slax" />
+
+<MODE NAME="smalltalk" FILE="smalltalk.xml"
+ FILE_NAME_GLOB="*.{st,sources,changes}" />
+
+<MODE NAME="smarty" FILE="smarty.xml"
+ FILE_NAME_GLOB="*.tpl"/>
+
+<MODE NAME="sdl/pr" FILE="sdl_pr.xml"
+ FILE_NAME_GLOB="*.pr"/>
+
+<MODE NAME="sql-loader" FILE="sql-loader.xml"
+ FILE_NAME_GLOB="*.ctl" />
+
+<MODE NAME="smi-mib" FILE="smi-mib.xml"
+ FILE_NAME_GLOB="*{.mib,-MIB.txt}" />
+
+<MODE NAME="sqr" FILE="sqr.xml"
+ FILE_NAME_GLOB="*.{sqr,sqc}" />
+
+<MODE NAME="squidconf" FILE="squidconf.xml"
+ FILE_NAME_GLOB="squid.conf" />
+
+<MODE NAME="stata" FILE="stata.xml"
+ FILE_NAME_GLOB="*.{do,ado,mata}" />
+
+<MODE NAME="svn-commit" FILE="svn-commit.xml"
+ FILE_NAME_GLOB="svn-commit*.tmp" />
+
+<MODE NAME="swig" FILE="swig.xml"
+ FILE_NAME_GLOB="*.{i,swg}" />
+
+<MODE NAME="tcl" FILE="tcl.xml"
+ FILE_NAME_GLOB="*.{tcl,tsh}" />
+
+<MODE NAME="texinfo" FILE="texinfo.xml"
+ FILE_NAME_GLOB="*.texi" />
+
+<MODE NAME="tex" FILE ="tex.xml" />
+
+
+<MODE NAME="text" FILE="text.xml"
+ FILE_NAME_GLOB="*.txt" />
+
+<!-- This mode MUST be placed after text mode
+ because filename globs are checked in reverse order -->
+<MODE NAME="rfc" FILE="rfc.xml"
+ FILE_NAME_GLOB="rfc*.txt" />
+
+<MODE NAME="tld" FILE="tld.xml"
+ FILE_NAME_GLOB="*.tld"/>
+
+<MODE NAME="tsp" FILE="tsp.xml"
+ FILE_NAME_GLOB="*.tsp" />
+
+<MODE NAME="transact-sql" FILE="tsql.xml"
+ FILE_NAME_GLOB="*.sql" />
+
+<MODE NAME="template-toolkit" FILE="tthtml.xml"
+ FILE_NAME_GLOB="*.tt{html,css,js}" />
+
+<MODE NAME="twiki" FILE="twiki.xml"
+ FILE_NAME_GLOB="*.twiki"/>
+
+<MODE NAME="typoscript" FILE="typoscript.xml"
+ FILE_NAME_GLOB="*.ts"/>
+
+<MODE NAME='url' FILE='url.xml'
+ FILE_NAME_GLOB='*.url' />
+
+<MODE NAME="uscript" FILE="uscript.xml"
+ FILE_NAME_GLOB="*.uc" />
+
+<MODE NAME="vbscript" FILE="vbscript.xml"
+ FILE_NAME_GLOB="*.{vbs,bas,cls}" />
+
+<MODE NAME="velocity" FILE="velocity.xml"
+ FILE_NAME_GLOB="*.vm" />
+
+<MODE NAME="verilog" FILE="verilog.xml"
+ FILE_NAME_GLOB="*.{ver,v,sv}" />
+
+<MODE NAME="vhdl" FILE="vhdl.xml"
+ FILE_NAME_GLOB="*.vh*" />
+
+<MODE NAME="visualbasic" FILE="visualbasic.xml"
+ FILE_NAME_GLOB="*.{vb}" />
+
+<MODE NAME="vrml2" FILE="vrml2.xml"
+ FILE_NAME_GLOB="*.{wrl,wrz}"/>
+
+<MODE NAME="xml" FILE="xml.xml"
+ FILE_NAME_GLOB="*.{xml,xhtml,xsd,qrc,ui,docbook}"
+ FIRST_LINE_GLOB="<\?xml*" />
+
+<MODE NAME="xq" FILE="xq.xml"
+ FILE_NAME_GLOB="*.x{q,qm,ql}" />
+
+<MODE NAME="xsl" FILE="xsl.xml"
+ FILE_NAME_GLOB="*.xsl" />
+
+<MODE NAME="yab" FILE="yab.xml"
+ FILE_NAME_GLOB="*.yab" />
+
+<MODE NAME="yaml" FILE="yaml.xml"
+ FILE_NAME_GLOB="*.{yml,yaml}" />
+
+<MODE NAME="zpt" FILE="zpt.xml"
+ FILE_NAME_GLOB="*.{pt,zpt}"/>
+
+</MODES>
diff --git a/jEdit/modes/chill.xml b/jEdit/modes/chill.xml
index 2ef3b8f..fc17d4a 100644
--- a/jEdit/modes/chill.xml
+++ b/jEdit/modes/chill.xml
@@ -1,134 +1,134 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- CHILL mode by Rudolf Widmann (Rudi.Widmann at web.de)
- CHILL = "CCITT High Level Programming Language" used for telecommunication programming
- Pascal was used as reference.
- Keywords = KEYWORD1
- Directives = KEYWORD2.
- Everything else as is-->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
-
- <!-- Compiler directives. -->
- <SPAN TYPE="COMMENT2">
- <BEGIN><></BEGIN>
- <END><></END>
- </SPAN>
- <!-- Normal comments. -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>H'</BEGIN>
- <END>;</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">/=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
-
- <KEYWORDS>
- <!-- Reserved words -->
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>BEGIN</KEYWORD1>
- <KEYWORD1>CASE</KEYWORD1>
- <KEYWORD1>DIV</KEYWORD1>
- <KEYWORD1>DO</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>ELSIF</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>ESAC</KEYWORD1>
- <KEYWORD1>EXIT</KEYWORD1>
- <KEYWORD1>FI</KEYWORD1>
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>GOTO</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>MOD</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>OD</KEYWORD1>
- <KEYWORD1>OF</KEYWORD1>
- <KEYWORD1>ON</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>OUT</KEYWORD1>
- <KEYWORD1>RESULT</KEYWORD1>
- <KEYWORD1>RETURN</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>TO</KEYWORD1>
- <KEYWORD1>UNTIL</KEYWORD1>
- <KEYWORD1>USES</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>XOR</KEYWORD1>
- <!-- DEFINITIONS. -->
- <KEYWORD2>ARRAY</KEYWORD2>
- <KEYWORD2>DCL</KEYWORD2>
- <KEYWORD2>GRANT</KEYWORD2>
- <KEYWORD2>LABEL</KEYWORD2>
- <KEYWORD2>MODULE</KEYWORD2>
- <KEYWORD2>NEWMODE</KEYWORD2>
- <KEYWORD2>PROC</KEYWORD2>
- <KEYWORD2>POWERSET</KEYWORD2>
- <KEYWORD2>SEIZE</KEYWORD2>
- <KEYWORD2>SET</KEYWORD2>
- <KEYWORD2>STRUCT</KEYWORD2>
- <KEYWORD2>SYN</KEYWORD2>
- <KEYWORD2>SYNMODE</KEYWORD2>
- <KEYWORD2>TYPE</KEYWORD2>
- <KEYWORD2>PACK</KEYWORD2>
- <!-- ORDINAL TYPES. -->
- <KEYWORD3>BIN</KEYWORD3>
- <KEYWORD3>CHAR</KEYWORD3>
- <KEYWORD3>INT</KEYWORD3>
- <KEYWORD3>RANGE</KEYWORD3>
- <!-- BOOLEAN TYPES. -->
- <KEYWORD3>BOOL</KEYWORD3>
- <!-- UNTYPED POINTER. -->
- <KEYWORD3>PTR</KEYWORD3>
- <KEYWORD3>REF</KEYWORD3>
-
- <LABEL>MODULE_DESCRIPTION_HEADER</LABEL>
- <LABEL>PATCH_INFOS</LABEL>
- <LABEL>LIO_INFOS</LABEL>
- <LABEL>SWSG_INFOS</LABEL>
- <LABEL>MSG_XREF</LABEL>
- <LABEL>EJECT</LABEL>
-
- <LITERAL2>FALSE</LITERAL2>
- <LITERAL2>NULL</LITERAL2>
- <LITERAL2>TRUE</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- CHILL mode by Rudolf Widmann (Rudi.Widmann at web.de)
+ CHILL = "CCITT High Level Programming Language" used for telecommunication programming
+ Pascal was used as reference.
+ Keywords = KEYWORD1
+ Directives = KEYWORD2.
+ Everything else as is-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+
+ <!-- Compiler directives. -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN><></BEGIN>
+ <END><></END>
+ </SPAN>
+ <!-- Normal comments. -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>H'</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">/=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+
+ <KEYWORDS>
+ <!-- Reserved words -->
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>BEGIN</KEYWORD1>
+ <KEYWORD1>CASE</KEYWORD1>
+ <KEYWORD1>DIV</KEYWORD1>
+ <KEYWORD1>DO</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>ELSIF</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>ESAC</KEYWORD1>
+ <KEYWORD1>EXIT</KEYWORD1>
+ <KEYWORD1>FI</KEYWORD1>
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>GOTO</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>MOD</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>OD</KEYWORD1>
+ <KEYWORD1>OF</KEYWORD1>
+ <KEYWORD1>ON</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>OUT</KEYWORD1>
+ <KEYWORD1>RESULT</KEYWORD1>
+ <KEYWORD1>RETURN</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>TO</KEYWORD1>
+ <KEYWORD1>UNTIL</KEYWORD1>
+ <KEYWORD1>USES</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>XOR</KEYWORD1>
+ <!-- DEFINITIONS. -->
+ <KEYWORD2>ARRAY</KEYWORD2>
+ <KEYWORD2>DCL</KEYWORD2>
+ <KEYWORD2>GRANT</KEYWORD2>
+ <KEYWORD2>LABEL</KEYWORD2>
+ <KEYWORD2>MODULE</KEYWORD2>
+ <KEYWORD2>NEWMODE</KEYWORD2>
+ <KEYWORD2>PROC</KEYWORD2>
+ <KEYWORD2>POWERSET</KEYWORD2>
+ <KEYWORD2>SEIZE</KEYWORD2>
+ <KEYWORD2>SET</KEYWORD2>
+ <KEYWORD2>STRUCT</KEYWORD2>
+ <KEYWORD2>SYN</KEYWORD2>
+ <KEYWORD2>SYNMODE</KEYWORD2>
+ <KEYWORD2>TYPE</KEYWORD2>
+ <KEYWORD2>PACK</KEYWORD2>
+ <!-- ORDINAL TYPES. -->
+ <KEYWORD3>BIN</KEYWORD3>
+ <KEYWORD3>CHAR</KEYWORD3>
+ <KEYWORD3>INT</KEYWORD3>
+ <KEYWORD3>RANGE</KEYWORD3>
+ <!-- BOOLEAN TYPES. -->
+ <KEYWORD3>BOOL</KEYWORD3>
+ <!-- UNTYPED POINTER. -->
+ <KEYWORD3>PTR</KEYWORD3>
+ <KEYWORD3>REF</KEYWORD3>
+
+ <LABEL>MODULE_DESCRIPTION_HEADER</LABEL>
+ <LABEL>PATCH_INFOS</LABEL>
+ <LABEL>LIO_INFOS</LABEL>
+ <LABEL>SWSG_INFOS</LABEL>
+ <LABEL>MSG_XREF</LABEL>
+ <LABEL>EJECT</LABEL>
+
+ <LITERAL2>FALSE</LITERAL2>
+ <LITERAL2>NULL</LITERAL2>
+ <LITERAL2>TRUE</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/cil.xml b/jEdit/modes/cil.xml
index 93b3816..cf03d2e 100644
--- a/jEdit/modes/cil.xml
+++ b/jEdit/modes/cil.xml
@@ -1,385 +1,385 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- .NET CIL by Cullen Linn (linnc at cs.arizona.edu)
- (pg102 or 198 of PartitionII)
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+\\" />
- </PROPS>
-
- <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <KEYWORDS>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>family</KEYWORD1>
- <KEYWORD1>assembly</KEYWORD1>
- <KEYWORD1>famandassem</KEYWORD1>
- <KEYWORD1>famorassem</KEYWORD1>
- <KEYWORD1>autochar</KEYWORD1>
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>ansi</KEYWORD1>
- <KEYWORD1>beforefieldinit</KEYWORD1>
- <KEYWORD1>explicit</KEYWORD1>
- <KEYWORD1>interface</KEYWORD1>
- <KEYWORD1>nested</KEYWORD1>
- <KEYWORD1>rtspecialname</KEYWORD1>
- <KEYWORD1>sealed</KEYWORD1>
- <KEYWORD1>sequential</KEYWORD1>
- <KEYWORD1>serializable</KEYWORD1>
- <KEYWORD1>specialname</KEYWORD1>
- <KEYWORD1>unicode</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>hidebysig</KEYWORD1>
- <KEYWORD1>newslot</KEYWORD1>
- <KEYWORD1>pinvokeimpl</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>virtual</KEYWORD1>
- <KEYWORD1>cil</KEYWORD1>
- <KEYWORD1>forwardref</KEYWORD1>
- <KEYWORD1>internalcall</KEYWORD1>
- <KEYWORD1>managed</KEYWORD1>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD1>noinlining</KEYWORD1>
- <KEYWORD1>runtime</KEYWORD1>
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD1>unmanaged</KEYWORD1>
- <KEYWORD1>typedref</KEYWORD1>
- <KEYWORD1>cdecl</KEYWORD1>
- <KEYWORD1>fastcall</KEYWORD1>
- <KEYWORD1>stdcall</KEYWORD1>
- <KEYWORD1>thiscall</KEYWORD1>
- <KEYWORD1>platformapi</KEYWORD1>
- <KEYWORD1>initonly</KEYWORD1>
- <KEYWORD1>literal</KEYWORD1>
- <KEYWORD1>marshal</KEYWORD1>
- <KEYWORD1>notserialized</KEYWORD1>
- <KEYWORD1>addon</KEYWORD1>
- <KEYWORD1>removeon</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>fault</KEYWORD1>
- <KEYWORD1>filter</KEYWORD1>
- <KEYWORD1>handler</KEYWORD1>
-
- <!--Assembly Directives (Meta-Data)-->
- <KEYWORD2>.assembly</KEYWORD2>
- <KEYWORD2>.assembly extern</KEYWORD2>
- <KEYWORD2>.class</KEYWORD2>
- <KEYWORD2>.class extern</KEYWORD2>
- <KEYWORD2>.field</KEYWORD2>
- <KEYWORD2>.method</KEYWORD2>
- <KEYWORD2>.property</KEYWORD2>
- <KEYWORD2>.get</KEYWORD2>
- <KEYWORD2>.set</KEYWORD2>
- <KEYWORD2>.other</KEYWORD2>
- <KEYWORD2>.ctor</KEYWORD2>
- <KEYWORD2>.corflags</KEYWORD2>
- <KEYWORD2>.custom</KEYWORD2>
- <KEYWORD2>.data</KEYWORD2>
- <KEYWORD2>.file</KEYWORD2>
- <KEYWORD2>.mresource</KEYWORD2>
- <KEYWORD2>.module</KEYWORD2>
- <KEYWORD2>.module extern</KEYWORD2>
- <KEYWORD2>.subsystem</KEYWORD2>
- <KEYWORD2>.vtfixup</KEYWORD2>
- <KEYWORD2>.publickeytoken</KEYWORD2>
- <KEYWORD2>.ver</KEYWORD2>
- <KEYWORD2>.hash algorithm</KEYWORD2>
- <KEYWORD2>.culture</KEYWORD2>
- <KEYWORD2>.namespace</KEYWORD2>
- <KEYWORD2>.event</KEYWORD2>
- <KEYWORD2>.fire</KEYWORD2>
- <KEYWORD2>.override</KEYWORD2>
- <KEYWORD2>.try</KEYWORD2>
- <KEYWORD2>.catch</KEYWORD2>
- <KEYWORD2>.finally</KEYWORD2>
- <KEYWORD2>.locals</KEYWORD2>
- <KEYWORD2>.maxstack</KEYWORD2>
- <KEYWORD2>.entrypoint</KEYWORD2>
- <KEYWORD2>.pack</KEYWORD2>
- <KEYWORD2>.size</KEYWORD2>
-
- <!--Implementation Specific Metadata-->
- <KEYWORD2>.file alignment</KEYWORD2>
- <KEYWORD2>.imagebase</KEYWORD2>
- <KEYWORD2>.language</KEYWORD2>
- <KEYWORD2>.namespace</KEYWORD2>
-
-
- <KEYWORD3>string</KEYWORD3>
- <KEYWORD3>object</KEYWORD3>
- <KEYWORD3>bool</KEYWORD3>
- <KEYWORD3>true</KEYWORD3>
- <KEYWORD3>false</KEYWORD3>
- <KEYWORD3>bytearray</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>float32</KEYWORD3>
- <KEYWORD3>float64</KEYWORD3>
- <KEYWORD3>int8</KEYWORD3>
- <KEYWORD3>int16</KEYWORD3>
- <KEYWORD3>int32</KEYWORD3>
- <KEYWORD3>int64</KEYWORD3>
- <KEYWORD3>nullref</KEYWORD3>
-
-
- <OPERATOR>&</OPERATOR>
- <OPERATOR>*</OPERATOR>
- <OPERATOR>}</OPERATOR>
- <OPERATOR>{</OPERATOR>
-
- <!--arithmetic opcodes-->
- <FUNCTION>add</FUNCTION>
- <FUNCTION>add.ovf</FUNCTION>
- <FUNCTION>add.ovf.un</FUNCTION>
- <FUNCTION>div</FUNCTION>
- <FUNCTION>div.un</FUNCTION>
- <FUNCTION>mul</FUNCTION>
- <FUNCTION>mul.ovf</FUNCTION>
- <FUNCTION>mul.ovf.un</FUNCTION>
- <FUNCTION>sub</FUNCTION>
- <FUNCTION>sub.ovf</FUNCTION>
- <FUNCTION>sub.ovf.un</FUNCTION>
-
- <!--logical-->
- <FUNCTION>and</FUNCTION>
- <FUNCTION>not</FUNCTION>
- <FUNCTION>or</FUNCTION>
- <FUNCTION>xor</FUNCTION>
-
- <!--Branches-->
- <FUNCTION>beq</FUNCTION>
- <FUNCTION>beq.s</FUNCTION>
- <FUNCTION>bge</FUNCTION>
- <FUNCTION>bge.s</FUNCTION>
- <FUNCTION>bge.un</FUNCTION>
- <FUNCTION>bge.un.s</FUNCTION>
- <FUNCTION>bgt</FUNCTION>
- <FUNCTION>bgt.s</FUNCTION>
- <FUNCTION>bgt.un</FUNCTION>
- <FUNCTION>bgt.un.s</FUNCTION>
- <FUNCTION>ble</FUNCTION>
- <FUNCTION>ble.s</FUNCTION>
- <FUNCTION>ble.un</FUNCTION>
- <FUNCTION>ble.un.s</FUNCTION>
- <FUNCTION>blt</FUNCTION>
- <FUNCTION>blt.s</FUNCTION>
- <FUNCTION>blt.un</FUNCTION>
- <FUNCTION>blt.un.s</FUNCTION>
- <FUNCTION>bne.un</FUNCTION>
- <FUNCTION>bne.un.s</FUNCTION>
- <FUNCTION>br</FUNCTION>
- <FUNCTION>brfalse</FUNCTION>
- <FUNCTION>brfalse.s</FUNCTION>
- <FUNCTION>brtrue</FUNCTION>
- <FUNCTION>brtrue.s</FUNCTION>
- <FUNCTION>br.s</FUNCTION>
-
- <!--Conversions-->
- <FUNCTION>conv.i</FUNCTION>
- <FUNCTION>conv.i1</FUNCTION>
- <FUNCTION>conv.i2</FUNCTION>
- <FUNCTION>conv.i4</FUNCTION>
- <FUNCTION>conv.i8</FUNCTION>
- <FUNCTION>conv.ovf.i</FUNCTION>
- <FUNCTION>conv.ovf.i1</FUNCTION>
- <FUNCTION>conv.ovf.i1.un</FUNCTION>
- <FUNCTION>conv.ovf.i2</FUNCTION>
- <FUNCTION>conv.ovf.i2.un</FUNCTION>
- <FUNCTION>conv.ovf.i4</FUNCTION>
- <FUNCTION>conv.ovf.i4.un</FUNCTION>
- <FUNCTION>conv.ovf.i8</FUNCTION>
- <FUNCTION>conv.ovf.i8.un</FUNCTION>
- <FUNCTION>conv.ovf.i.un</FUNCTION>
- <FUNCTION>conv.ovf.u</FUNCTION>
- <FUNCTION>conv.ovf.u1</FUNCTION>
- <FUNCTION>conv.ovf.u1.un</FUNCTION>
- <FUNCTION>conv.ovf.u2</FUNCTION>
- <FUNCTION>conv.ovf.u2.un</FUNCTION>
- <FUNCTION>conv.ovf.u4</FUNCTION>
- <FUNCTION>conv.ovf.u4.un</FUNCTION>
- <FUNCTION>conv.ovf.u8</FUNCTION>
- <FUNCTION>conv.ovf.u8.un</FUNCTION>
- <FUNCTION>conv.ovf.u.un</FUNCTION>
- <FUNCTION>conv.r4</FUNCTION>
- <FUNCTION>conv.r8</FUNCTION>
- <FUNCTION>conv.r.un</FUNCTION>
- <FUNCTION>conv.u</FUNCTION>
- <FUNCTION>conv.u1</FUNCTION>
- <FUNCTION>conv.u2</FUNCTION>
- <FUNCTION>conv.u4</FUNCTION>
- <FUNCTION>conv.u8</FUNCTION>
-
- <!--Loads and Stores-->
- <FUNCTION>ldarg</FUNCTION>
- <FUNCTION>ldarga</FUNCTION>
- <FUNCTION>ldarga.s</FUNCTION>
- <FUNCTION>ldarg.0</FUNCTION>
- <FUNCTION>ldarg.1</FUNCTION>
- <FUNCTION>ldarg.2</FUNCTION>
- <FUNCTION>ldarg.3</FUNCTION>
- <FUNCTION>ldarg.s</FUNCTION>
- <FUNCTION>ldc.i4</FUNCTION>
- <FUNCTION>ldc.i4.0</FUNCTION>
- <FUNCTION>ldc.i4.1</FUNCTION>
- <FUNCTION>ldc.i4.2</FUNCTION>
- <FUNCTION>ldc.i4.3</FUNCTION>
- <FUNCTION>ldc.i4.4</FUNCTION>
- <FUNCTION>ldc.i4.5</FUNCTION>
- <FUNCTION>ldc.i4.6</FUNCTION>
- <FUNCTION>ldc.i4.7</FUNCTION>
- <FUNCTION>ldc.i4.8</FUNCTION>
- <FUNCTION>ldc.i4.m1</FUNCTION>
- <FUNCTION>ldc.i4.s</FUNCTION>
- <FUNCTION>ldc.i8</FUNCTION>
- <FUNCTION>ldc.r4</FUNCTION>
- <FUNCTION>ldc.r8</FUNCTION>
- <FUNCTION>ldelema</FUNCTION>
- <FUNCTION>ldelem.i</FUNCTION>
- <FUNCTION>ldelem.i1</FUNCTION>
- <FUNCTION>ldelem.i2</FUNCTION>
- <FUNCTION>ldelem.i4</FUNCTION>
- <FUNCTION>ldelem.i8</FUNCTION>
- <FUNCTION>ldelem.r4</FUNCTION>
- <FUNCTION>ldelem.r8</FUNCTION>
- <FUNCTION>ldelem.ref</FUNCTION>
- <FUNCTION>ldelem.u1</FUNCTION>
- <FUNCTION>ldelem.u2</FUNCTION>
- <FUNCTION>ldelem.u4</FUNCTION>
- <FUNCTION>ldfld</FUNCTION>
- <FUNCTION>ldflda</FUNCTION>
- <FUNCTION>ldftn</FUNCTION>
- <FUNCTION>ldind.i</FUNCTION>
- <FUNCTION>ldind.i1</FUNCTION>
- <FUNCTION>ldind.i2</FUNCTION>
- <FUNCTION>ldind.i4</FUNCTION>
- <FUNCTION>ldind.i8</FUNCTION>
- <FUNCTION>ldind.r4</FUNCTION>
- <FUNCTION>ldind.r8</FUNCTION>
- <FUNCTION>ldind.ref</FUNCTION>
- <FUNCTION>ldind.u1</FUNCTION>
- <FUNCTION>ldind.u2</FUNCTION>
- <FUNCTION>ldind.u4</FUNCTION>
- <FUNCTION>ldlen</FUNCTION>
- <FUNCTION>ldloc</FUNCTION>
- <FUNCTION>ldloca</FUNCTION>
- <FUNCTION>ldloca.s</FUNCTION>
- <FUNCTION>ldloc.0</FUNCTION>
- <FUNCTION>ldloc.1</FUNCTION>
- <FUNCTION>ldloc.2</FUNCTION>
- <FUNCTION>ldloc.3</FUNCTION>
- <FUNCTION>ldloc.s</FUNCTION>
- <FUNCTION>ldnull</FUNCTION>
- <FUNCTION>ldobj</FUNCTION>
- <FUNCTION>ldsfld</FUNCTION>
- <FUNCTION>ldsflda</FUNCTION>
- <FUNCTION>ldstr</FUNCTION>
- <FUNCTION>ldtoken</FUNCTION>
- <FUNCTION>ldvirtftn</FUNCTION>
- <FUNCTION>starg</FUNCTION>
- <FUNCTION>starg.s</FUNCTION>
- <FUNCTION>stelem.i</FUNCTION>
- <FUNCTION>stelem.i1</FUNCTION>
- <FUNCTION>stelem.i2</FUNCTION>
- <FUNCTION>stelem.i4</FUNCTION>
- <FUNCTION>stelem.i8</FUNCTION>
- <FUNCTION>stelem.r4</FUNCTION>
- <FUNCTION>stelem.r8</FUNCTION>
- <FUNCTION>stelem.ref</FUNCTION>
- <FUNCTION>stfld</FUNCTION>
- <FUNCTION>stind.i</FUNCTION>
- <FUNCTION>stind.i1</FUNCTION>
- <FUNCTION>stind.i2</FUNCTION>
- <FUNCTION>stind.i4</FUNCTION>
- <FUNCTION>stind.i8</FUNCTION>
- <FUNCTION>stind.r4</FUNCTION>
- <FUNCTION>stind.r8</FUNCTION>
- <FUNCTION>stind.ref</FUNCTION>
- <FUNCTION>stloc</FUNCTION>
- <FUNCTION>stloc.0</FUNCTION>
- <FUNCTION>stloc.1</FUNCTION>
- <FUNCTION>stloc.2</FUNCTION>
- <FUNCTION>stloc.3</FUNCTION>
- <FUNCTION>stloc.s</FUNCTION>
- <FUNCTION>stobj</FUNCTION>
- <FUNCTION>stsfld</FUNCTION>
-
- <FUNCTION>call</FUNCTION>
- <FUNCTION>calli</FUNCTION>
- <FUNCTION>callvirt</FUNCTION>
- <FUNCTION>castclass</FUNCTION>
- <FUNCTION>ceq</FUNCTION>
- <FUNCTION>cgt</FUNCTION>
- <FUNCTION>cgt.un</FUNCTION>
- <FUNCTION>ckfinite</FUNCTION>
- <FUNCTION>clt</FUNCTION>
- <FUNCTION>clt.un</FUNCTION>
- <FUNCTION>cpblk</FUNCTION>
- <FUNCTION>cpobj</FUNCTION>
-
- <FUNCTION>initblk</FUNCTION>
- <FUNCTION>initobj</FUNCTION>
- <FUNCTION>newarr</FUNCTION>
- <FUNCTION>newobj</FUNCTION>
-
- <FUNCTION>dup</FUNCTION>
- <FUNCTION>endfilter</FUNCTION>
- <FUNCTION>isinst</FUNCTION>
- <FUNCTION>box</FUNCTION>
- <FUNCTION>unbox</FUNCTION>
- <FUNCTION>arglist</FUNCTION>
- <FUNCTION>break</FUNCTION>
- <FUNCTION>jmp</FUNCTION>
- <FUNCTION>ret</FUNCTION>
- <FUNCTION>leave</FUNCTION>
- <FUNCTION>leave.s</FUNCTION>
- <FUNCTION>localloc</FUNCTION>
- <FUNCTION>mkrefany</FUNCTION>
- <FUNCTION>neg</FUNCTION>
- <FUNCTION>switch</FUNCTION>
- <FUNCTION>nop</FUNCTION>
- <FUNCTION>pop</FUNCTION>
- <FUNCTION>refanytype</FUNCTION>
- <FUNCTION>refanyval</FUNCTION>
- <FUNCTION>rem</FUNCTION>
- <FUNCTION>rem.un</FUNCTION>
- <FUNCTION>throw</FUNCTION>
- <FUNCTION>rethrow</FUNCTION>
- <FUNCTION>endfinally</FUNCTION>
- <FUNCTION>shl</FUNCTION>
- <FUNCTION>shr</FUNCTION>
- <FUNCTION>shr.un</FUNCTION>
- <FUNCTION>sizeof</FUNCTION>
- <FUNCTION>tailcall</FUNCTION>
- <FUNCTION>unaligned</FUNCTION>
- <FUNCTION>volatile</FUNCTION>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ .NET CIL by Cullen Linn (linnc at cs.arizona.edu)
+ (pg102 or 198 of PartitionII)
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+\\" />
+ </PROPS>
+
+ <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <KEYWORDS>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>family</KEYWORD1>
+ <KEYWORD1>assembly</KEYWORD1>
+ <KEYWORD1>famandassem</KEYWORD1>
+ <KEYWORD1>famorassem</KEYWORD1>
+ <KEYWORD1>autochar</KEYWORD1>
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>ansi</KEYWORD1>
+ <KEYWORD1>beforefieldinit</KEYWORD1>
+ <KEYWORD1>explicit</KEYWORD1>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD1>nested</KEYWORD1>
+ <KEYWORD1>rtspecialname</KEYWORD1>
+ <KEYWORD1>sealed</KEYWORD1>
+ <KEYWORD1>sequential</KEYWORD1>
+ <KEYWORD1>serializable</KEYWORD1>
+ <KEYWORD1>specialname</KEYWORD1>
+ <KEYWORD1>unicode</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>hidebysig</KEYWORD1>
+ <KEYWORD1>newslot</KEYWORD1>
+ <KEYWORD1>pinvokeimpl</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>virtual</KEYWORD1>
+ <KEYWORD1>cil</KEYWORD1>
+ <KEYWORD1>forwardref</KEYWORD1>
+ <KEYWORD1>internalcall</KEYWORD1>
+ <KEYWORD1>managed</KEYWORD1>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD1>noinlining</KEYWORD1>
+ <KEYWORD1>runtime</KEYWORD1>
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD1>unmanaged</KEYWORD1>
+ <KEYWORD1>typedref</KEYWORD1>
+ <KEYWORD1>cdecl</KEYWORD1>
+ <KEYWORD1>fastcall</KEYWORD1>
+ <KEYWORD1>stdcall</KEYWORD1>
+ <KEYWORD1>thiscall</KEYWORD1>
+ <KEYWORD1>platformapi</KEYWORD1>
+ <KEYWORD1>initonly</KEYWORD1>
+ <KEYWORD1>literal</KEYWORD1>
+ <KEYWORD1>marshal</KEYWORD1>
+ <KEYWORD1>notserialized</KEYWORD1>
+ <KEYWORD1>addon</KEYWORD1>
+ <KEYWORD1>removeon</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>fault</KEYWORD1>
+ <KEYWORD1>filter</KEYWORD1>
+ <KEYWORD1>handler</KEYWORD1>
+
+ <!--Assembly Directives (Meta-Data)-->
+ <KEYWORD2>.assembly</KEYWORD2>
+ <KEYWORD2>.assembly extern</KEYWORD2>
+ <KEYWORD2>.class</KEYWORD2>
+ <KEYWORD2>.class extern</KEYWORD2>
+ <KEYWORD2>.field</KEYWORD2>
+ <KEYWORD2>.method</KEYWORD2>
+ <KEYWORD2>.property</KEYWORD2>
+ <KEYWORD2>.get</KEYWORD2>
+ <KEYWORD2>.set</KEYWORD2>
+ <KEYWORD2>.other</KEYWORD2>
+ <KEYWORD2>.ctor</KEYWORD2>
+ <KEYWORD2>.corflags</KEYWORD2>
+ <KEYWORD2>.custom</KEYWORD2>
+ <KEYWORD2>.data</KEYWORD2>
+ <KEYWORD2>.file</KEYWORD2>
+ <KEYWORD2>.mresource</KEYWORD2>
+ <KEYWORD2>.module</KEYWORD2>
+ <KEYWORD2>.module extern</KEYWORD2>
+ <KEYWORD2>.subsystem</KEYWORD2>
+ <KEYWORD2>.vtfixup</KEYWORD2>
+ <KEYWORD2>.publickeytoken</KEYWORD2>
+ <KEYWORD2>.ver</KEYWORD2>
+ <KEYWORD2>.hash algorithm</KEYWORD2>
+ <KEYWORD2>.culture</KEYWORD2>
+ <KEYWORD2>.namespace</KEYWORD2>
+ <KEYWORD2>.event</KEYWORD2>
+ <KEYWORD2>.fire</KEYWORD2>
+ <KEYWORD2>.override</KEYWORD2>
+ <KEYWORD2>.try</KEYWORD2>
+ <KEYWORD2>.catch</KEYWORD2>
+ <KEYWORD2>.finally</KEYWORD2>
+ <KEYWORD2>.locals</KEYWORD2>
+ <KEYWORD2>.maxstack</KEYWORD2>
+ <KEYWORD2>.entrypoint</KEYWORD2>
+ <KEYWORD2>.pack</KEYWORD2>
+ <KEYWORD2>.size</KEYWORD2>
+
+ <!--Implementation Specific Metadata-->
+ <KEYWORD2>.file alignment</KEYWORD2>
+ <KEYWORD2>.imagebase</KEYWORD2>
+ <KEYWORD2>.language</KEYWORD2>
+ <KEYWORD2>.namespace</KEYWORD2>
+
+
+ <KEYWORD3>string</KEYWORD3>
+ <KEYWORD3>object</KEYWORD3>
+ <KEYWORD3>bool</KEYWORD3>
+ <KEYWORD3>true</KEYWORD3>
+ <KEYWORD3>false</KEYWORD3>
+ <KEYWORD3>bytearray</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>float32</KEYWORD3>
+ <KEYWORD3>float64</KEYWORD3>
+ <KEYWORD3>int8</KEYWORD3>
+ <KEYWORD3>int16</KEYWORD3>
+ <KEYWORD3>int32</KEYWORD3>
+ <KEYWORD3>int64</KEYWORD3>
+ <KEYWORD3>nullref</KEYWORD3>
+
+
+ <OPERATOR>&</OPERATOR>
+ <OPERATOR>*</OPERATOR>
+ <OPERATOR>}</OPERATOR>
+ <OPERATOR>{</OPERATOR>
+
+ <!--arithmetic opcodes-->
+ <FUNCTION>add</FUNCTION>
+ <FUNCTION>add.ovf</FUNCTION>
+ <FUNCTION>add.ovf.un</FUNCTION>
+ <FUNCTION>div</FUNCTION>
+ <FUNCTION>div.un</FUNCTION>
+ <FUNCTION>mul</FUNCTION>
+ <FUNCTION>mul.ovf</FUNCTION>
+ <FUNCTION>mul.ovf.un</FUNCTION>
+ <FUNCTION>sub</FUNCTION>
+ <FUNCTION>sub.ovf</FUNCTION>
+ <FUNCTION>sub.ovf.un</FUNCTION>
+
+ <!--logical-->
+ <FUNCTION>and</FUNCTION>
+ <FUNCTION>not</FUNCTION>
+ <FUNCTION>or</FUNCTION>
+ <FUNCTION>xor</FUNCTION>
+
+ <!--Branches-->
+ <FUNCTION>beq</FUNCTION>
+ <FUNCTION>beq.s</FUNCTION>
+ <FUNCTION>bge</FUNCTION>
+ <FUNCTION>bge.s</FUNCTION>
+ <FUNCTION>bge.un</FUNCTION>
+ <FUNCTION>bge.un.s</FUNCTION>
+ <FUNCTION>bgt</FUNCTION>
+ <FUNCTION>bgt.s</FUNCTION>
+ <FUNCTION>bgt.un</FUNCTION>
+ <FUNCTION>bgt.un.s</FUNCTION>
+ <FUNCTION>ble</FUNCTION>
+ <FUNCTION>ble.s</FUNCTION>
+ <FUNCTION>ble.un</FUNCTION>
+ <FUNCTION>ble.un.s</FUNCTION>
+ <FUNCTION>blt</FUNCTION>
+ <FUNCTION>blt.s</FUNCTION>
+ <FUNCTION>blt.un</FUNCTION>
+ <FUNCTION>blt.un.s</FUNCTION>
+ <FUNCTION>bne.un</FUNCTION>
+ <FUNCTION>bne.un.s</FUNCTION>
+ <FUNCTION>br</FUNCTION>
+ <FUNCTION>brfalse</FUNCTION>
+ <FUNCTION>brfalse.s</FUNCTION>
+ <FUNCTION>brtrue</FUNCTION>
+ <FUNCTION>brtrue.s</FUNCTION>
+ <FUNCTION>br.s</FUNCTION>
+
+ <!--Conversions-->
+ <FUNCTION>conv.i</FUNCTION>
+ <FUNCTION>conv.i1</FUNCTION>
+ <FUNCTION>conv.i2</FUNCTION>
+ <FUNCTION>conv.i4</FUNCTION>
+ <FUNCTION>conv.i8</FUNCTION>
+ <FUNCTION>conv.ovf.i</FUNCTION>
+ <FUNCTION>conv.ovf.i1</FUNCTION>
+ <FUNCTION>conv.ovf.i1.un</FUNCTION>
+ <FUNCTION>conv.ovf.i2</FUNCTION>
+ <FUNCTION>conv.ovf.i2.un</FUNCTION>
+ <FUNCTION>conv.ovf.i4</FUNCTION>
+ <FUNCTION>conv.ovf.i4.un</FUNCTION>
+ <FUNCTION>conv.ovf.i8</FUNCTION>
+ <FUNCTION>conv.ovf.i8.un</FUNCTION>
+ <FUNCTION>conv.ovf.i.un</FUNCTION>
+ <FUNCTION>conv.ovf.u</FUNCTION>
+ <FUNCTION>conv.ovf.u1</FUNCTION>
+ <FUNCTION>conv.ovf.u1.un</FUNCTION>
+ <FUNCTION>conv.ovf.u2</FUNCTION>
+ <FUNCTION>conv.ovf.u2.un</FUNCTION>
+ <FUNCTION>conv.ovf.u4</FUNCTION>
+ <FUNCTION>conv.ovf.u4.un</FUNCTION>
+ <FUNCTION>conv.ovf.u8</FUNCTION>
+ <FUNCTION>conv.ovf.u8.un</FUNCTION>
+ <FUNCTION>conv.ovf.u.un</FUNCTION>
+ <FUNCTION>conv.r4</FUNCTION>
+ <FUNCTION>conv.r8</FUNCTION>
+ <FUNCTION>conv.r.un</FUNCTION>
+ <FUNCTION>conv.u</FUNCTION>
+ <FUNCTION>conv.u1</FUNCTION>
+ <FUNCTION>conv.u2</FUNCTION>
+ <FUNCTION>conv.u4</FUNCTION>
+ <FUNCTION>conv.u8</FUNCTION>
+
+ <!--Loads and Stores-->
+ <FUNCTION>ldarg</FUNCTION>
+ <FUNCTION>ldarga</FUNCTION>
+ <FUNCTION>ldarga.s</FUNCTION>
+ <FUNCTION>ldarg.0</FUNCTION>
+ <FUNCTION>ldarg.1</FUNCTION>
+ <FUNCTION>ldarg.2</FUNCTION>
+ <FUNCTION>ldarg.3</FUNCTION>
+ <FUNCTION>ldarg.s</FUNCTION>
+ <FUNCTION>ldc.i4</FUNCTION>
+ <FUNCTION>ldc.i4.0</FUNCTION>
+ <FUNCTION>ldc.i4.1</FUNCTION>
+ <FUNCTION>ldc.i4.2</FUNCTION>
+ <FUNCTION>ldc.i4.3</FUNCTION>
+ <FUNCTION>ldc.i4.4</FUNCTION>
+ <FUNCTION>ldc.i4.5</FUNCTION>
+ <FUNCTION>ldc.i4.6</FUNCTION>
+ <FUNCTION>ldc.i4.7</FUNCTION>
+ <FUNCTION>ldc.i4.8</FUNCTION>
+ <FUNCTION>ldc.i4.m1</FUNCTION>
+ <FUNCTION>ldc.i4.s</FUNCTION>
+ <FUNCTION>ldc.i8</FUNCTION>
+ <FUNCTION>ldc.r4</FUNCTION>
+ <FUNCTION>ldc.r8</FUNCTION>
+ <FUNCTION>ldelema</FUNCTION>
+ <FUNCTION>ldelem.i</FUNCTION>
+ <FUNCTION>ldelem.i1</FUNCTION>
+ <FUNCTION>ldelem.i2</FUNCTION>
+ <FUNCTION>ldelem.i4</FUNCTION>
+ <FUNCTION>ldelem.i8</FUNCTION>
+ <FUNCTION>ldelem.r4</FUNCTION>
+ <FUNCTION>ldelem.r8</FUNCTION>
+ <FUNCTION>ldelem.ref</FUNCTION>
+ <FUNCTION>ldelem.u1</FUNCTION>
+ <FUNCTION>ldelem.u2</FUNCTION>
+ <FUNCTION>ldelem.u4</FUNCTION>
+ <FUNCTION>ldfld</FUNCTION>
+ <FUNCTION>ldflda</FUNCTION>
+ <FUNCTION>ldftn</FUNCTION>
+ <FUNCTION>ldind.i</FUNCTION>
+ <FUNCTION>ldind.i1</FUNCTION>
+ <FUNCTION>ldind.i2</FUNCTION>
+ <FUNCTION>ldind.i4</FUNCTION>
+ <FUNCTION>ldind.i8</FUNCTION>
+ <FUNCTION>ldind.r4</FUNCTION>
+ <FUNCTION>ldind.r8</FUNCTION>
+ <FUNCTION>ldind.ref</FUNCTION>
+ <FUNCTION>ldind.u1</FUNCTION>
+ <FUNCTION>ldind.u2</FUNCTION>
+ <FUNCTION>ldind.u4</FUNCTION>
+ <FUNCTION>ldlen</FUNCTION>
+ <FUNCTION>ldloc</FUNCTION>
+ <FUNCTION>ldloca</FUNCTION>
+ <FUNCTION>ldloca.s</FUNCTION>
+ <FUNCTION>ldloc.0</FUNCTION>
+ <FUNCTION>ldloc.1</FUNCTION>
+ <FUNCTION>ldloc.2</FUNCTION>
+ <FUNCTION>ldloc.3</FUNCTION>
+ <FUNCTION>ldloc.s</FUNCTION>
+ <FUNCTION>ldnull</FUNCTION>
+ <FUNCTION>ldobj</FUNCTION>
+ <FUNCTION>ldsfld</FUNCTION>
+ <FUNCTION>ldsflda</FUNCTION>
+ <FUNCTION>ldstr</FUNCTION>
+ <FUNCTION>ldtoken</FUNCTION>
+ <FUNCTION>ldvirtftn</FUNCTION>
+ <FUNCTION>starg</FUNCTION>
+ <FUNCTION>starg.s</FUNCTION>
+ <FUNCTION>stelem.i</FUNCTION>
+ <FUNCTION>stelem.i1</FUNCTION>
+ <FUNCTION>stelem.i2</FUNCTION>
+ <FUNCTION>stelem.i4</FUNCTION>
+ <FUNCTION>stelem.i8</FUNCTION>
+ <FUNCTION>stelem.r4</FUNCTION>
+ <FUNCTION>stelem.r8</FUNCTION>
+ <FUNCTION>stelem.ref</FUNCTION>
+ <FUNCTION>stfld</FUNCTION>
+ <FUNCTION>stind.i</FUNCTION>
+ <FUNCTION>stind.i1</FUNCTION>
+ <FUNCTION>stind.i2</FUNCTION>
+ <FUNCTION>stind.i4</FUNCTION>
+ <FUNCTION>stind.i8</FUNCTION>
+ <FUNCTION>stind.r4</FUNCTION>
+ <FUNCTION>stind.r8</FUNCTION>
+ <FUNCTION>stind.ref</FUNCTION>
+ <FUNCTION>stloc</FUNCTION>
+ <FUNCTION>stloc.0</FUNCTION>
+ <FUNCTION>stloc.1</FUNCTION>
+ <FUNCTION>stloc.2</FUNCTION>
+ <FUNCTION>stloc.3</FUNCTION>
+ <FUNCTION>stloc.s</FUNCTION>
+ <FUNCTION>stobj</FUNCTION>
+ <FUNCTION>stsfld</FUNCTION>
+
+ <FUNCTION>call</FUNCTION>
+ <FUNCTION>calli</FUNCTION>
+ <FUNCTION>callvirt</FUNCTION>
+ <FUNCTION>castclass</FUNCTION>
+ <FUNCTION>ceq</FUNCTION>
+ <FUNCTION>cgt</FUNCTION>
+ <FUNCTION>cgt.un</FUNCTION>
+ <FUNCTION>ckfinite</FUNCTION>
+ <FUNCTION>clt</FUNCTION>
+ <FUNCTION>clt.un</FUNCTION>
+ <FUNCTION>cpblk</FUNCTION>
+ <FUNCTION>cpobj</FUNCTION>
+
+ <FUNCTION>initblk</FUNCTION>
+ <FUNCTION>initobj</FUNCTION>
+ <FUNCTION>newarr</FUNCTION>
+ <FUNCTION>newobj</FUNCTION>
+
+ <FUNCTION>dup</FUNCTION>
+ <FUNCTION>endfilter</FUNCTION>
+ <FUNCTION>isinst</FUNCTION>
+ <FUNCTION>box</FUNCTION>
+ <FUNCTION>unbox</FUNCTION>
+ <FUNCTION>arglist</FUNCTION>
+ <FUNCTION>break</FUNCTION>
+ <FUNCTION>jmp</FUNCTION>
+ <FUNCTION>ret</FUNCTION>
+ <FUNCTION>leave</FUNCTION>
+ <FUNCTION>leave.s</FUNCTION>
+ <FUNCTION>localloc</FUNCTION>
+ <FUNCTION>mkrefany</FUNCTION>
+ <FUNCTION>neg</FUNCTION>
+ <FUNCTION>switch</FUNCTION>
+ <FUNCTION>nop</FUNCTION>
+ <FUNCTION>pop</FUNCTION>
+ <FUNCTION>refanytype</FUNCTION>
+ <FUNCTION>refanyval</FUNCTION>
+ <FUNCTION>rem</FUNCTION>
+ <FUNCTION>rem.un</FUNCTION>
+ <FUNCTION>throw</FUNCTION>
+ <FUNCTION>rethrow</FUNCTION>
+ <FUNCTION>endfinally</FUNCTION>
+ <FUNCTION>shl</FUNCTION>
+ <FUNCTION>shr</FUNCTION>
+ <FUNCTION>shr.un</FUNCTION>
+ <FUNCTION>sizeof</FUNCTION>
+ <FUNCTION>tailcall</FUNCTION>
+ <FUNCTION>unaligned</FUNCTION>
+ <FUNCTION>volatile</FUNCTION>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/clips.xml b/jEdit/modes/clips.xml
index 9ef7a40..a6f1a54 100644
--- a/jEdit/modes/clips.xml
+++ b/jEdit/modes/clips.xml
@@ -1,434 +1,434 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- jEdit CLIPS syntax file
-
- written by Orhan Alkan
- version 1.0
- created on 30 June 2007
- last revised 01 July 2007
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
-
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))">
-
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <!-- String literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- List literals -->
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE" DELEGATE="LIST">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Operators -->
- <SEQ TYPE="OPERATOR">=></SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">>-</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">**</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
-
- <!-- Parentheses -->
- <SEQ TYPE="MARKUP">(</SEQ>
- <SEQ TYPE="MARKUP">)</SEQ>
- <SEQ TYPE="MARKUP">[</SEQ>
- <SEQ TYPE="MARKUP">]</SEQ>
- <SEQ TYPE="NULL">{</SEQ>
- <SEQ TYPE="NULL">}</SEQ>
-
- <KEYWORDS>
-
- <KEYWORD1>deffacts</KEYWORD1>
- <KEYWORD1>deftemplate</KEYWORD1>
- <KEYWORD1>defglobal</KEYWORD1>
- <KEYWORD1>defrule</KEYWORD1>
- <KEYWORD1>deffunction</KEYWORD1>
- <KEYWORD1>defgeneric</KEYWORD1>
- <KEYWORD1>defmethod</KEYWORD1>
- <KEYWORD1>defclass</KEYWORD1>
- <KEYWORD1>definstance</KEYWORD1>
- <KEYWORD1>defmessage</KEYWORD1>
- <KEYWORD1>defmodule</KEYWORD1>
- <KEYWORD1>deffacts-module</KEYWORD1>
- <KEYWORD1>deffunction-module</KEYWORD1>
- <KEYWORD1>defgeneric-module</KEYWORD1>
- <KEYWORD1>defglobal-module</KEYWORD1>
- <KEYWORD1>definstances-module</KEYWORD1>
- <KEYWORD1>slot</KEYWORD1>
- <KEYWORD1>multislot</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>default-dynamic</KEYWORD1>
- <KEYWORD1>declare</KEYWORD1>
- <KEYWORD1>salience</KEYWORD1>
- <KEYWORD1>auto-focus</KEYWORD1>
- <KEYWORD1>object</KEYWORD1>
- <KEYWORD1>is-a</KEYWORD1>
- <KEYWORD1>pattern-match</KEYWORD1>
- <KEYWORD1>single-slot</KEYWORD1>
- <KEYWORD1>reactive</KEYWORD1>
- <KEYWORD1>non-reactive</KEYWORD1>
- <KEYWORD1>storage</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>shared</KEYWORD1>
- <KEYWORD1>access</KEYWORD1>
- <KEYWORD1>read-write</KEYWORD1>
- <KEYWORD1>read-only</KEYWORD1>
- <KEYWORD1>initialize-only</KEYWORD1>
- <KEYWORD1>propagation</KEYWORD1>
- <KEYWORD1>inherit</KEYWORD1>
- <KEYWORD1>non-inherit</KEYWORD1>
- <KEYWORD1>source</KEYWORD1>
- <KEYWORD1>exclusive</KEYWORD1>
- <KEYWORD1>composite</KEYWORD1>
- <KEYWORD1>visibility</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>create-accessor</KEYWORD1>
- <KEYWORD1>?NONE</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>write</KEYWORD1>
- <KEYWORD1>?DEFAULT</KEYWORD1>
- <KEYWORD1>primary</KEYWORD1>
- <KEYWORD1>around</KEYWORD1>
- <KEYWORD1>before</KEYWORD1>
- <KEYWORD1>after</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
- <KEYWORD1>export</KEYWORD1>
- <KEYWORD1>?ALL</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
- <KEYWORD1>allowed-symbols</KEYWORD1>
- <KEYWORD1>allowed-strings</KEYWORD1>
- <KEYWORD1>allowed-lexemes</KEYWORD1>
- <KEYWORD1>allowed-integers</KEYWORD1>
- <KEYWORD1>allowed-floats</KEYWORD1>
- <KEYWORD1>allowed-numbers</KEYWORD1>
- <KEYWORD1>allowed-instance-names</KEYWORD1>
- <KEYWORD1>allowed-values</KEYWORD1>
- <KEYWORD1>?VARIABLE</KEYWORD1>
-
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD2>while</KEYWORD2>
- <KEYWORD2>then</KEYWORD2>
- <KEYWORD2>else</KEYWORD2>
- <KEYWORD2>or</KEYWORD2>
- <KEYWORD2>and</KEYWORD2>
- <KEYWORD2>eq</KEYWORD2>
- <KEYWORD2>evenp</KEYWORD2>
- <KEYWORD2>floatp</KEYWORD2>
- <KEYWORD2>integerp</KEYWORD2>
- <KEYWORD2>lexemep</KEYWORD2>
- <KEYWORD2>multifieldp</KEYWORD2>
- <KEYWORD2>neq</KEYWORD2>
- <KEYWORD2>not</KEYWORD2>
- <KEYWORD2>numberp</KEYWORD2>
- <KEYWORD2>oddp</KEYWORD2>
- <KEYWORD2>pointerp</KEYWORD2>
- <KEYWORD2>stringp</KEYWORD2>
- <KEYWORD2>symbolp</KEYWORD2>
- <KEYWORD2>switch</KEYWORD2>
- <KEYWORD2>while</KEYWORD2>
-
- <KEYWORD3>assert</KEYWORD3>
- <KEYWORD3>bind</KEYWORD3>
- <KEYWORD3>class-abstractp</KEYWORD3>
- <KEYWORD3>class-existp</KEYWORD3>
- <KEYWORD3>class-subclasses</KEYWORD3>
- <KEYWORD3>class-superclasses</KEYWORD3>
- <KEYWORD3>defclass-module</KEYWORD3>
- <KEYWORD3>describe-classes</KEYWORD3>
- <KEYWORD3>get-class-defaults-mode</KEYWORD3>
- <KEYWORD3>get-defclass-list</KEYWORD3>
- <KEYWORD3>agenda</KEYWORD3>
- <KEYWORD3>list-defclasses</KEYWORD3>
- <KEYWORD3>ppdefclass</KEYWORD3>
- <KEYWORD3>set-class-defaults-mode</KEYWORD3>
- <KEYWORD3>slot-allowed-values</KEYWORD3>
- <KEYWORD3>slot-cardinality</KEYWORD3>
- <KEYWORD3>slot-default-value</KEYWORD3>
- <KEYWORD3>slot-direct-accessp</KEYWORD3>
- <KEYWORD3>slot-existp</KEYWORD3>
- <KEYWORD3>slot-facest</KEYWORD3>
- <KEYWORD3>slot-initablep</KEYWORD3>
- <KEYWORD3>slot-publicp</KEYWORD3>
- <KEYWORD3>slot-range</KEYWORD3>
- <KEYWORD3>slot-sources</KEYWORD3>
- <KEYWORD3>slot-types</KEYWORD3>
- <KEYWORD3>slot-writablep</KEYWORD3>
- <KEYWORD3>subsclassp</KEYWORD3>
- <KEYWORD3>undefclass</KEYWORD3>
- <KEYWORD3>get-deffacts-list</KEYWORD3>
- <KEYWORD3>list-deffacts</KEYWORD3>
- <KEYWORD3>ppdeffacts</KEYWORD3>
- <KEYWORD3>undeffacts</KEYWORD3>
- <KEYWORD3>get-deffunction-list</KEYWORD3>
- <KEYWORD3>list-deffunction</KEYWORD3>
- <KEYWORD3>ppdeffunction</KEYWORD3>
- <KEYWORD3>undeffunction</KEYWORD3>
- <KEYWORD3>get-defgeneric-list</KEYWORD3>
- <KEYWORD3>list-defgenerics</KEYWORD3>
- <KEYWORD3>ppdefgeneric</KEYWORD3>
- <KEYWORD3>preview-generic</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>undefgeneric</KEYWORD3>
- <KEYWORD3>get-defglobal-list</KEYWORD3>
- <KEYWORD3>get-reset-globals</KEYWORD3>
- <KEYWORD3>list-defglobals</KEYWORD3>
- <KEYWORD3>ppdefglobal</KEYWORD3>
- <KEYWORD3>set-reset-globals</KEYWORD3>
- <KEYWORD3>undefglobal</KEYWORD3>
- <KEYWORD3>get-definstances-list</KEYWORD3>
- <KEYWORD3>list-definstances</KEYWORD3>
- <KEYWORD3>ppdefinstances</KEYWORD3>
- <KEYWORD3>undefinstances</KEYWORD3>
- <KEYWORD3>call-next-handler</KEYWORD3>
- <KEYWORD3>get-defmessage-handler</KEYWORD3>
- <KEYWORD3>list-defmessage-handlers</KEYWORD3>
- <KEYWORD3>message-handler-existp</KEYWORD3>
- <KEYWORD3>handler-type</KEYWORD3>
- <KEYWORD3>next-handlerp</KEYWORD3>
- <KEYWORD3>override-next-handler</KEYWORD3>
- <KEYWORD3>ppdefmessage-handler</KEYWORD3>
- <KEYWORD3>undefmessage-handler</KEYWORD3>
- <KEYWORD3>call-next-method</KEYWORD3>
- <KEYWORD3>call-specific-method</KEYWORD3>
- <KEYWORD3>get-defmethod-list</KEYWORD3>
- <KEYWORD3>get-method-restrictions</KEYWORD3>
- <KEYWORD3>list-defmethods</KEYWORD3>
- <KEYWORD3>next-methodp</KEYWORD3>
- <KEYWORD3>override-next-method</KEYWORD3>
- <KEYWORD3>undefmethod</KEYWORD3>
- <KEYWORD3>preview-generic</KEYWORD3>
- <KEYWORD3>get-current-module</KEYWORD3>
- <KEYWORD3>get-defmodule-list</KEYWORD3>
- <KEYWORD3>list-defmodules</KEYWORD3>
- <KEYWORD3>ppdefmodules</KEYWORD3>
- <KEYWORD3>set-current-module</KEYWORD3>
- <KEYWORD3>defrule-module</KEYWORD3>
- <KEYWORD3>get-defrule-list</KEYWORD3>
- <KEYWORD3>get-incremental-reset</KEYWORD3>
- <KEYWORD3>list-defrules</KEYWORD3>
- <KEYWORD3>matches</KEYWORD3>
- <KEYWORD3>ppdefrule</KEYWORD3>
- <KEYWORD3>refresh</KEYWORD3>
- <KEYWORD3>remove-break</KEYWORD3>
- <KEYWORD3>set-break</KEYWORD3>
- <KEYWORD3>set-incremental-reset</KEYWORD3>
- <KEYWORD3>show-breaks</KEYWORD3>
- <KEYWORD3>undefrule</KEYWORD3>
- <KEYWORD3>deftemplate-module</KEYWORD3>
- <KEYWORD3>get-deftemaplate-list</KEYWORD3>
- <KEYWORD3>list-deftemplates</KEYWORD3>
- <KEYWORD3>ppdeftemplate</KEYWORD3>
- <KEYWORD3>undeftemplate</KEYWORD3>
- <KEYWORD3>apropos</KEYWORD3>
- <KEYWORD3>bacth</KEYWORD3>
- <KEYWORD3>batch*</KEYWORD3>
- <KEYWORD3>bload</KEYWORD3>
- <KEYWORD3>bsave</KEYWORD3>
- <KEYWORD3>clear</KEYWORD3>
- <KEYWORD3>exit</KEYWORD3>
- <KEYWORD3>get-auto-float-dividend</KEYWORD3>
- <KEYWORD3>get-dynamic-constraints-checking</KEYWORD3>
- <KEYWORD3>get-static-constraints-checking</KEYWORD3>
- <KEYWORD3>load</KEYWORD3>
- <KEYWORD3>load*</KEYWORD3>
- <KEYWORD3>options</KEYWORD3>
- <KEYWORD3>reset</KEYWORD3>
- <KEYWORD3>save</KEYWORD3>
- <KEYWORD3>set-auto-float-dividend</KEYWORD3>
- <KEYWORD3>set-dynamic-constriants-checking</KEYWORD3>
- <KEYWORD3>set-static-constriants-checking</KEYWORD3>
- <KEYWORD3>system</KEYWORD3>
- <KEYWORD3>assert-string</KEYWORD3>
- <KEYWORD3>dependencies</KEYWORD3>
- <KEYWORD3>dependents</KEYWORD3>
- <KEYWORD3>duplicate</KEYWORD3>
- <KEYWORD3>facts</KEYWORD3>
- <KEYWORD3>fact-existp</KEYWORD3>
- <KEYWORD3>fact-index</KEYWORD3>
- <KEYWORD3>fact-relation</KEYWORD3>
- <KEYWORD3>fact-slot-names</KEYWORD3>
- <KEYWORD3>fact-slot-value</KEYWORD3>
- <KEYWORD3>get-fact-duplication</KEYWORD3>
- <KEYWORD3>get-fact-list</KEYWORD3>
- <KEYWORD3>load-facts</KEYWORD3>
- <KEYWORD3>modify</KEYWORD3>
- <KEYWORD3>retract</KEYWORD3>
- <KEYWORD3>save-facts</KEYWORD3>
- <KEYWORD3>set-fact-duplication</KEYWORD3>
- <KEYWORD3>any-instancep</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>delayed-do-for-all-instances</KEYWORD3>
- <KEYWORD3>delete-instance</KEYWORD3>
- <KEYWORD3>direct-slot-delete$</KEYWORD3>
- <KEYWORD3>direct-slot-insert$</KEYWORD3>
- <KEYWORD3>direct-slot-replace$</KEYWORD3>
- <KEYWORD3>do-for-instance</KEYWORD3>
- <KEYWORD3>do-for-all-instances</KEYWORD3>
- <KEYWORD3>dynamic-get</KEYWORD3>
- <KEYWORD3>dynamic-put</KEYWORD3>
- <KEYWORD3>find-instance</KEYWORD3>
- <KEYWORD3>find-all-instances</KEYWORD3>
- <KEYWORD3>init-slot</KEYWORD3>
- <KEYWORD3>instance-address</KEYWORD3>
- <KEYWORD3>instance-addressp</KEYWORD3>
- <KEYWORD3>instance-existp</KEYWORD3>
- <KEYWORD3>instance-name</KEYWORD3>
- <KEYWORD3>instance-namep</KEYWORD3>
- <KEYWORD3>instance-name-to-symbol</KEYWORD3>
- <KEYWORD3>instancep</KEYWORD3>
- <KEYWORD3>instances</KEYWORD3>
- <KEYWORD3>load-instances</KEYWORD3>
- <KEYWORD3>make-intance</KEYWORD3>
- <KEYWORD3>ppinstance</KEYWORD3>
- <KEYWORD3>restore-instances</KEYWORD3>
- <KEYWORD3>save-instances</KEYWORD3>
- <KEYWORD3>send</KEYWORD3>
- <KEYWORD3>slot-delete$</KEYWORD3>
- <KEYWORD3>slot-insert$</KEYWORD3>
- <KEYWORD3>slot-replace$</KEYWORD3>
- <KEYWORD3>symbol-to-instance-name</KEYWORD3>
- <KEYWORD3>unmake-instance</KEYWORD3>
- <KEYWORD3>create$</KEYWORD3>
- <KEYWORD3>delete$</KEYWORD3>
- <KEYWORD3>delete-member$</KEYWORD3>
- <KEYWORD3>explode$</KEYWORD3>
- <KEYWORD3>first$</KEYWORD3>
- <KEYWORD3>implode$</KEYWORD3>
- <KEYWORD3>insert$</KEYWORD3>
- <KEYWORD3>length$</KEYWORD3>
- <KEYWORD3>member$</KEYWORD3>
- <KEYWORD3>nth$</KEYWORD3>
- <KEYWORD3>replace$</KEYWORD3>
- <KEYWORD3>rest$</KEYWORD3>
- <KEYWORD3>subseq$</KEYWORD3>
- <KEYWORD3>subsetp</KEYWORD3>
- <KEYWORD3>break</KEYWORD3>
- <KEYWORD3>loop-for-count</KEYWORD3>
- <KEYWORD3>progn</KEYWORD3>
- <KEYWORD3>progn$</KEYWORD3>
- <KEYWORD3>return</KEYWORD3>
- <KEYWORD3>get-profile-percent-threshold</KEYWORD3>
- <KEYWORD3>profile-contructs</KEYWORD3>
- <KEYWORD3>profile-info</KEYWORD3>
- <KEYWORD3>profile-reset</KEYWORD3>
- <KEYWORD3>set-profile-percent-threshold</KEYWORD3>
- <KEYWORD3>expand$</KEYWORD3>
- <KEYWORD3>get-sequence-operator-recognition</KEYWORD3>
- <KEYWORD3>aet-sequence-operator-recognition</KEYWORD3>
- <KEYWORD3>build</KEYWORD3>
- <KEYWORD3>check-syntax</KEYWORD3>
- <KEYWORD3>eval</KEYWORD3>
- <KEYWORD3>lowcase</KEYWORD3>
- <KEYWORD3>str-cat</KEYWORD3>
- <KEYWORD3>str-compare</KEYWORD3>
- <KEYWORD3>str-index</KEYWORD3>
- <KEYWORD3>str-length</KEYWORD3>
- <KEYWORD3>string-to-field</KEYWORD3>
- <KEYWORD3>sub-string</KEYWORD3>
- <KEYWORD3>sym-cat</KEYWORD3>
- <KEYWORD3>upcase</KEYWORD3>
- <KEYWORD3>fetch</KEYWORD3>
- <KEYWORD3>print-region</KEYWORD3>
- <KEYWORD3>toss</KEYWORD3>
-
- <KEYWORD4>abs</KEYWORD4>
- <KEYWORD4>div</KEYWORD4>
- <KEYWORD4>float</KEYWORD4>
- <KEYWORD4>integer</KEYWORD4>
- <KEYWORD4>max</KEYWORD4>
- <KEYWORD4>min</KEYWORD4>
- <KEYWORD4>deg-grad</KEYWORD4>
- <KEYWORD4>deg-rad</KEYWORD4>
- <KEYWORD4>exp</KEYWORD4>
- <KEYWORD4>grad-deg</KEYWORD4>
- <KEYWORD4>log</KEYWORD4>
- <KEYWORD4>log10</KEYWORD4>
- <KEYWORD4>mod</KEYWORD4>
- <KEYWORD4>pi</KEYWORD4>
- <KEYWORD4>rad-deg</KEYWORD4>
- <KEYWORD4>round</KEYWORD4>
- <KEYWORD4>sqrt</KEYWORD4>
- <KEYWORD4>close</KEYWORD4>
- <KEYWORD4>format</KEYWORD4>
- <KEYWORD4>open</KEYWORD4>
- <KEYWORD4>printout</KEYWORD4>
- <KEYWORD4>read</KEYWORD4>
- <KEYWORD4>readline</KEYWORD4>
- <KEYWORD4>remove</KEYWORD4>
- <KEYWORD4>rename</KEYWORD4>
- <KEYWORD4>conserve-mem</KEYWORD4>
- <KEYWORD4>mem-used</KEYWORD4>
- <KEYWORD4>mem-requests</KEYWORD4>
- <KEYWORD4>release-mem</KEYWORD4>
- <KEYWORD4>funcall</KEYWORD4>
- <KEYWORD4>gensym</KEYWORD4>
- <KEYWORD4>gemsym*</KEYWORD4>
- <KEYWORD4>get-function-restriction</KEYWORD4>
- <KEYWORD4>length</KEYWORD4>
- <KEYWORD4>random</KEYWORD4>
- <KEYWORD4>seed</KEYWORD4>
- <KEYWORD4>setgen</KEYWORD4>
- <KEYWORD4>sort</KEYWORD4>
- <KEYWORD4>time</KEYWORD4>
- <KEYWORD4>timer</KEYWORD4>
- <KEYWORD4>acos</KEYWORD4>
- <KEYWORD4>acosh</KEYWORD4>
- <KEYWORD4>acot</KEYWORD4>
- <KEYWORD4>acoth</KEYWORD4>
- <KEYWORD4>acsc</KEYWORD4>
- <KEYWORD4>acsch</KEYWORD4>
- <KEYWORD4>asec</KEYWORD4>
- <KEYWORD4>asin</KEYWORD4>
- <KEYWORD4>asinh</KEYWORD4>
- <KEYWORD4>atan</KEYWORD4>
- <KEYWORD4>atanh</KEYWORD4>
- <KEYWORD4>cos</KEYWORD4>
- <KEYWORD4>cosh</KEYWORD4>
- <KEYWORD4>cot</KEYWORD4>
- <KEYWORD4>coth</KEYWORD4>
- <KEYWORD4>csc</KEYWORD4>
- <KEYWORD4>sec</KEYWORD4>
- <KEYWORD4>sech</KEYWORD4>
- <KEYWORD4>sin</KEYWORD4>
- <KEYWORD4>sinh</KEYWORD4>
- <KEYWORD4>tan</KEYWORD4>
- <KEYWORD4>tanh</KEYWORD4>
-
- </KEYWORDS>
-
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- jEdit CLIPS syntax file
+
+ written by Orhan Alkan
+ version 1.0
+ created on 30 June 2007
+ last revised 01 July 2007
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))">
+
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <!-- String literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- List literals -->
+ <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE" DELEGATE="LIST">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Operators -->
+ <SEQ TYPE="OPERATOR">=></SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">>-</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">**</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">$</SEQ>
+
+ <!-- Parentheses -->
+ <SEQ TYPE="MARKUP">(</SEQ>
+ <SEQ TYPE="MARKUP">)</SEQ>
+ <SEQ TYPE="MARKUP">[</SEQ>
+ <SEQ TYPE="MARKUP">]</SEQ>
+ <SEQ TYPE="NULL">{</SEQ>
+ <SEQ TYPE="NULL">}</SEQ>
+
+ <KEYWORDS>
+
+ <KEYWORD1>deffacts</KEYWORD1>
+ <KEYWORD1>deftemplate</KEYWORD1>
+ <KEYWORD1>defglobal</KEYWORD1>
+ <KEYWORD1>defrule</KEYWORD1>
+ <KEYWORD1>deffunction</KEYWORD1>
+ <KEYWORD1>defgeneric</KEYWORD1>
+ <KEYWORD1>defmethod</KEYWORD1>
+ <KEYWORD1>defclass</KEYWORD1>
+ <KEYWORD1>definstance</KEYWORD1>
+ <KEYWORD1>defmessage</KEYWORD1>
+ <KEYWORD1>defmodule</KEYWORD1>
+ <KEYWORD1>deffacts-module</KEYWORD1>
+ <KEYWORD1>deffunction-module</KEYWORD1>
+ <KEYWORD1>defgeneric-module</KEYWORD1>
+ <KEYWORD1>defglobal-module</KEYWORD1>
+ <KEYWORD1>definstances-module</KEYWORD1>
+ <KEYWORD1>slot</KEYWORD1>
+ <KEYWORD1>multislot</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>default-dynamic</KEYWORD1>
+ <KEYWORD1>declare</KEYWORD1>
+ <KEYWORD1>salience</KEYWORD1>
+ <KEYWORD1>auto-focus</KEYWORD1>
+ <KEYWORD1>object</KEYWORD1>
+ <KEYWORD1>is-a</KEYWORD1>
+ <KEYWORD1>pattern-match</KEYWORD1>
+ <KEYWORD1>single-slot</KEYWORD1>
+ <KEYWORD1>reactive</KEYWORD1>
+ <KEYWORD1>non-reactive</KEYWORD1>
+ <KEYWORD1>storage</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>shared</KEYWORD1>
+ <KEYWORD1>access</KEYWORD1>
+ <KEYWORD1>read-write</KEYWORD1>
+ <KEYWORD1>read-only</KEYWORD1>
+ <KEYWORD1>initialize-only</KEYWORD1>
+ <KEYWORD1>propagation</KEYWORD1>
+ <KEYWORD1>inherit</KEYWORD1>
+ <KEYWORD1>non-inherit</KEYWORD1>
+ <KEYWORD1>source</KEYWORD1>
+ <KEYWORD1>exclusive</KEYWORD1>
+ <KEYWORD1>composite</KEYWORD1>
+ <KEYWORD1>visibility</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>create-accessor</KEYWORD1>
+ <KEYWORD1>?NONE</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>write</KEYWORD1>
+ <KEYWORD1>?DEFAULT</KEYWORD1>
+ <KEYWORD1>primary</KEYWORD1>
+ <KEYWORD1>around</KEYWORD1>
+ <KEYWORD1>before</KEYWORD1>
+ <KEYWORD1>after</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>export</KEYWORD1>
+ <KEYWORD1>?ALL</KEYWORD1>
+ <KEYWORD1>type</KEYWORD1>
+ <KEYWORD1>allowed-symbols</KEYWORD1>
+ <KEYWORD1>allowed-strings</KEYWORD1>
+ <KEYWORD1>allowed-lexemes</KEYWORD1>
+ <KEYWORD1>allowed-integers</KEYWORD1>
+ <KEYWORD1>allowed-floats</KEYWORD1>
+ <KEYWORD1>allowed-numbers</KEYWORD1>
+ <KEYWORD1>allowed-instance-names</KEYWORD1>
+ <KEYWORD1>allowed-values</KEYWORD1>
+ <KEYWORD1>?VARIABLE</KEYWORD1>
+
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>while</KEYWORD2>
+ <KEYWORD2>then</KEYWORD2>
+ <KEYWORD2>else</KEYWORD2>
+ <KEYWORD2>or</KEYWORD2>
+ <KEYWORD2>and</KEYWORD2>
+ <KEYWORD2>eq</KEYWORD2>
+ <KEYWORD2>evenp</KEYWORD2>
+ <KEYWORD2>floatp</KEYWORD2>
+ <KEYWORD2>integerp</KEYWORD2>
+ <KEYWORD2>lexemep</KEYWORD2>
+ <KEYWORD2>multifieldp</KEYWORD2>
+ <KEYWORD2>neq</KEYWORD2>
+ <KEYWORD2>not</KEYWORD2>
+ <KEYWORD2>numberp</KEYWORD2>
+ <KEYWORD2>oddp</KEYWORD2>
+ <KEYWORD2>pointerp</KEYWORD2>
+ <KEYWORD2>stringp</KEYWORD2>
+ <KEYWORD2>symbolp</KEYWORD2>
+ <KEYWORD2>switch</KEYWORD2>
+ <KEYWORD2>while</KEYWORD2>
+
+ <KEYWORD3>assert</KEYWORD3>
+ <KEYWORD3>bind</KEYWORD3>
+ <KEYWORD3>class-abstractp</KEYWORD3>
+ <KEYWORD3>class-existp</KEYWORD3>
+ <KEYWORD3>class-subclasses</KEYWORD3>
+ <KEYWORD3>class-superclasses</KEYWORD3>
+ <KEYWORD3>defclass-module</KEYWORD3>
+ <KEYWORD3>describe-classes</KEYWORD3>
+ <KEYWORD3>get-class-defaults-mode</KEYWORD3>
+ <KEYWORD3>get-defclass-list</KEYWORD3>
+ <KEYWORD3>agenda</KEYWORD3>
+ <KEYWORD3>list-defclasses</KEYWORD3>
+ <KEYWORD3>ppdefclass</KEYWORD3>
+ <KEYWORD3>set-class-defaults-mode</KEYWORD3>
+ <KEYWORD3>slot-allowed-values</KEYWORD3>
+ <KEYWORD3>slot-cardinality</KEYWORD3>
+ <KEYWORD3>slot-default-value</KEYWORD3>
+ <KEYWORD3>slot-direct-accessp</KEYWORD3>
+ <KEYWORD3>slot-existp</KEYWORD3>
+ <KEYWORD3>slot-facest</KEYWORD3>
+ <KEYWORD3>slot-initablep</KEYWORD3>
+ <KEYWORD3>slot-publicp</KEYWORD3>
+ <KEYWORD3>slot-range</KEYWORD3>
+ <KEYWORD3>slot-sources</KEYWORD3>
+ <KEYWORD3>slot-types</KEYWORD3>
+ <KEYWORD3>slot-writablep</KEYWORD3>
+ <KEYWORD3>subsclassp</KEYWORD3>
+ <KEYWORD3>undefclass</KEYWORD3>
+ <KEYWORD3>get-deffacts-list</KEYWORD3>
+ <KEYWORD3>list-deffacts</KEYWORD3>
+ <KEYWORD3>ppdeffacts</KEYWORD3>
+ <KEYWORD3>undeffacts</KEYWORD3>
+ <KEYWORD3>get-deffunction-list</KEYWORD3>
+ <KEYWORD3>list-deffunction</KEYWORD3>
+ <KEYWORD3>ppdeffunction</KEYWORD3>
+ <KEYWORD3>undeffunction</KEYWORD3>
+ <KEYWORD3>get-defgeneric-list</KEYWORD3>
+ <KEYWORD3>list-defgenerics</KEYWORD3>
+ <KEYWORD3>ppdefgeneric</KEYWORD3>
+ <KEYWORD3>preview-generic</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>undefgeneric</KEYWORD3>
+ <KEYWORD3>get-defglobal-list</KEYWORD3>
+ <KEYWORD3>get-reset-globals</KEYWORD3>
+ <KEYWORD3>list-defglobals</KEYWORD3>
+ <KEYWORD3>ppdefglobal</KEYWORD3>
+ <KEYWORD3>set-reset-globals</KEYWORD3>
+ <KEYWORD3>undefglobal</KEYWORD3>
+ <KEYWORD3>get-definstances-list</KEYWORD3>
+ <KEYWORD3>list-definstances</KEYWORD3>
+ <KEYWORD3>ppdefinstances</KEYWORD3>
+ <KEYWORD3>undefinstances</KEYWORD3>
+ <KEYWORD3>call-next-handler</KEYWORD3>
+ <KEYWORD3>get-defmessage-handler</KEYWORD3>
+ <KEYWORD3>list-defmessage-handlers</KEYWORD3>
+ <KEYWORD3>message-handler-existp</KEYWORD3>
+ <KEYWORD3>handler-type</KEYWORD3>
+ <KEYWORD3>next-handlerp</KEYWORD3>
+ <KEYWORD3>override-next-handler</KEYWORD3>
+ <KEYWORD3>ppdefmessage-handler</KEYWORD3>
+ <KEYWORD3>undefmessage-handler</KEYWORD3>
+ <KEYWORD3>call-next-method</KEYWORD3>
+ <KEYWORD3>call-specific-method</KEYWORD3>
+ <KEYWORD3>get-defmethod-list</KEYWORD3>
+ <KEYWORD3>get-method-restrictions</KEYWORD3>
+ <KEYWORD3>list-defmethods</KEYWORD3>
+ <KEYWORD3>next-methodp</KEYWORD3>
+ <KEYWORD3>override-next-method</KEYWORD3>
+ <KEYWORD3>undefmethod</KEYWORD3>
+ <KEYWORD3>preview-generic</KEYWORD3>
+ <KEYWORD3>get-current-module</KEYWORD3>
+ <KEYWORD3>get-defmodule-list</KEYWORD3>
+ <KEYWORD3>list-defmodules</KEYWORD3>
+ <KEYWORD3>ppdefmodules</KEYWORD3>
+ <KEYWORD3>set-current-module</KEYWORD3>
+ <KEYWORD3>defrule-module</KEYWORD3>
+ <KEYWORD3>get-defrule-list</KEYWORD3>
+ <KEYWORD3>get-incremental-reset</KEYWORD3>
+ <KEYWORD3>list-defrules</KEYWORD3>
+ <KEYWORD3>matches</KEYWORD3>
+ <KEYWORD3>ppdefrule</KEYWORD3>
+ <KEYWORD3>refresh</KEYWORD3>
+ <KEYWORD3>remove-break</KEYWORD3>
+ <KEYWORD3>set-break</KEYWORD3>
+ <KEYWORD3>set-incremental-reset</KEYWORD3>
+ <KEYWORD3>show-breaks</KEYWORD3>
+ <KEYWORD3>undefrule</KEYWORD3>
+ <KEYWORD3>deftemplate-module</KEYWORD3>
+ <KEYWORD3>get-deftemaplate-list</KEYWORD3>
+ <KEYWORD3>list-deftemplates</KEYWORD3>
+ <KEYWORD3>ppdeftemplate</KEYWORD3>
+ <KEYWORD3>undeftemplate</KEYWORD3>
+ <KEYWORD3>apropos</KEYWORD3>
+ <KEYWORD3>bacth</KEYWORD3>
+ <KEYWORD3>batch*</KEYWORD3>
+ <KEYWORD3>bload</KEYWORD3>
+ <KEYWORD3>bsave</KEYWORD3>
+ <KEYWORD3>clear</KEYWORD3>
+ <KEYWORD3>exit</KEYWORD3>
+ <KEYWORD3>get-auto-float-dividend</KEYWORD3>
+ <KEYWORD3>get-dynamic-constraints-checking</KEYWORD3>
+ <KEYWORD3>get-static-constraints-checking</KEYWORD3>
+ <KEYWORD3>load</KEYWORD3>
+ <KEYWORD3>load*</KEYWORD3>
+ <KEYWORD3>options</KEYWORD3>
+ <KEYWORD3>reset</KEYWORD3>
+ <KEYWORD3>save</KEYWORD3>
+ <KEYWORD3>set-auto-float-dividend</KEYWORD3>
+ <KEYWORD3>set-dynamic-constriants-checking</KEYWORD3>
+ <KEYWORD3>set-static-constriants-checking</KEYWORD3>
+ <KEYWORD3>system</KEYWORD3>
+ <KEYWORD3>assert-string</KEYWORD3>
+ <KEYWORD3>dependencies</KEYWORD3>
+ <KEYWORD3>dependents</KEYWORD3>
+ <KEYWORD3>duplicate</KEYWORD3>
+ <KEYWORD3>facts</KEYWORD3>
+ <KEYWORD3>fact-existp</KEYWORD3>
+ <KEYWORD3>fact-index</KEYWORD3>
+ <KEYWORD3>fact-relation</KEYWORD3>
+ <KEYWORD3>fact-slot-names</KEYWORD3>
+ <KEYWORD3>fact-slot-value</KEYWORD3>
+ <KEYWORD3>get-fact-duplication</KEYWORD3>
+ <KEYWORD3>get-fact-list</KEYWORD3>
+ <KEYWORD3>load-facts</KEYWORD3>
+ <KEYWORD3>modify</KEYWORD3>
+ <KEYWORD3>retract</KEYWORD3>
+ <KEYWORD3>save-facts</KEYWORD3>
+ <KEYWORD3>set-fact-duplication</KEYWORD3>
+ <KEYWORD3>any-instancep</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>delayed-do-for-all-instances</KEYWORD3>
+ <KEYWORD3>delete-instance</KEYWORD3>
+ <KEYWORD3>direct-slot-delete$</KEYWORD3>
+ <KEYWORD3>direct-slot-insert$</KEYWORD3>
+ <KEYWORD3>direct-slot-replace$</KEYWORD3>
+ <KEYWORD3>do-for-instance</KEYWORD3>
+ <KEYWORD3>do-for-all-instances</KEYWORD3>
+ <KEYWORD3>dynamic-get</KEYWORD3>
+ <KEYWORD3>dynamic-put</KEYWORD3>
+ <KEYWORD3>find-instance</KEYWORD3>
+ <KEYWORD3>find-all-instances</KEYWORD3>
+ <KEYWORD3>init-slot</KEYWORD3>
+ <KEYWORD3>instance-address</KEYWORD3>
+ <KEYWORD3>instance-addressp</KEYWORD3>
+ <KEYWORD3>instance-existp</KEYWORD3>
+ <KEYWORD3>instance-name</KEYWORD3>
+ <KEYWORD3>instance-namep</KEYWORD3>
+ <KEYWORD3>instance-name-to-symbol</KEYWORD3>
+ <KEYWORD3>instancep</KEYWORD3>
+ <KEYWORD3>instances</KEYWORD3>
+ <KEYWORD3>load-instances</KEYWORD3>
+ <KEYWORD3>make-intance</KEYWORD3>
+ <KEYWORD3>ppinstance</KEYWORD3>
+ <KEYWORD3>restore-instances</KEYWORD3>
+ <KEYWORD3>save-instances</KEYWORD3>
+ <KEYWORD3>send</KEYWORD3>
+ <KEYWORD3>slot-delete$</KEYWORD3>
+ <KEYWORD3>slot-insert$</KEYWORD3>
+ <KEYWORD3>slot-replace$</KEYWORD3>
+ <KEYWORD3>symbol-to-instance-name</KEYWORD3>
+ <KEYWORD3>unmake-instance</KEYWORD3>
+ <KEYWORD3>create$</KEYWORD3>
+ <KEYWORD3>delete$</KEYWORD3>
+ <KEYWORD3>delete-member$</KEYWORD3>
+ <KEYWORD3>explode$</KEYWORD3>
+ <KEYWORD3>first$</KEYWORD3>
+ <KEYWORD3>implode$</KEYWORD3>
+ <KEYWORD3>insert$</KEYWORD3>
+ <KEYWORD3>length$</KEYWORD3>
+ <KEYWORD3>member$</KEYWORD3>
+ <KEYWORD3>nth$</KEYWORD3>
+ <KEYWORD3>replace$</KEYWORD3>
+ <KEYWORD3>rest$</KEYWORD3>
+ <KEYWORD3>subseq$</KEYWORD3>
+ <KEYWORD3>subsetp</KEYWORD3>
+ <KEYWORD3>break</KEYWORD3>
+ <KEYWORD3>loop-for-count</KEYWORD3>
+ <KEYWORD3>progn</KEYWORD3>
+ <KEYWORD3>progn$</KEYWORD3>
+ <KEYWORD3>return</KEYWORD3>
+ <KEYWORD3>get-profile-percent-threshold</KEYWORD3>
+ <KEYWORD3>profile-contructs</KEYWORD3>
+ <KEYWORD3>profile-info</KEYWORD3>
+ <KEYWORD3>profile-reset</KEYWORD3>
+ <KEYWORD3>set-profile-percent-threshold</KEYWORD3>
+ <KEYWORD3>expand$</KEYWORD3>
+ <KEYWORD3>get-sequence-operator-recognition</KEYWORD3>
+ <KEYWORD3>aet-sequence-operator-recognition</KEYWORD3>
+ <KEYWORD3>build</KEYWORD3>
+ <KEYWORD3>check-syntax</KEYWORD3>
+ <KEYWORD3>eval</KEYWORD3>
+ <KEYWORD3>lowcase</KEYWORD3>
+ <KEYWORD3>str-cat</KEYWORD3>
+ <KEYWORD3>str-compare</KEYWORD3>
+ <KEYWORD3>str-index</KEYWORD3>
+ <KEYWORD3>str-length</KEYWORD3>
+ <KEYWORD3>string-to-field</KEYWORD3>
+ <KEYWORD3>sub-string</KEYWORD3>
+ <KEYWORD3>sym-cat</KEYWORD3>
+ <KEYWORD3>upcase</KEYWORD3>
+ <KEYWORD3>fetch</KEYWORD3>
+ <KEYWORD3>print-region</KEYWORD3>
+ <KEYWORD3>toss</KEYWORD3>
+
+ <KEYWORD4>abs</KEYWORD4>
+ <KEYWORD4>div</KEYWORD4>
+ <KEYWORD4>float</KEYWORD4>
+ <KEYWORD4>integer</KEYWORD4>
+ <KEYWORD4>max</KEYWORD4>
+ <KEYWORD4>min</KEYWORD4>
+ <KEYWORD4>deg-grad</KEYWORD4>
+ <KEYWORD4>deg-rad</KEYWORD4>
+ <KEYWORD4>exp</KEYWORD4>
+ <KEYWORD4>grad-deg</KEYWORD4>
+ <KEYWORD4>log</KEYWORD4>
+ <KEYWORD4>log10</KEYWORD4>
+ <KEYWORD4>mod</KEYWORD4>
+ <KEYWORD4>pi</KEYWORD4>
+ <KEYWORD4>rad-deg</KEYWORD4>
+ <KEYWORD4>round</KEYWORD4>
+ <KEYWORD4>sqrt</KEYWORD4>
+ <KEYWORD4>close</KEYWORD4>
+ <KEYWORD4>format</KEYWORD4>
+ <KEYWORD4>open</KEYWORD4>
+ <KEYWORD4>printout</KEYWORD4>
+ <KEYWORD4>read</KEYWORD4>
+ <KEYWORD4>readline</KEYWORD4>
+ <KEYWORD4>remove</KEYWORD4>
+ <KEYWORD4>rename</KEYWORD4>
+ <KEYWORD4>conserve-mem</KEYWORD4>
+ <KEYWORD4>mem-used</KEYWORD4>
+ <KEYWORD4>mem-requests</KEYWORD4>
+ <KEYWORD4>release-mem</KEYWORD4>
+ <KEYWORD4>funcall</KEYWORD4>
+ <KEYWORD4>gensym</KEYWORD4>
+ <KEYWORD4>gemsym*</KEYWORD4>
+ <KEYWORD4>get-function-restriction</KEYWORD4>
+ <KEYWORD4>length</KEYWORD4>
+ <KEYWORD4>random</KEYWORD4>
+ <KEYWORD4>seed</KEYWORD4>
+ <KEYWORD4>setgen</KEYWORD4>
+ <KEYWORD4>sort</KEYWORD4>
+ <KEYWORD4>time</KEYWORD4>
+ <KEYWORD4>timer</KEYWORD4>
+ <KEYWORD4>acos</KEYWORD4>
+ <KEYWORD4>acosh</KEYWORD4>
+ <KEYWORD4>acot</KEYWORD4>
+ <KEYWORD4>acoth</KEYWORD4>
+ <KEYWORD4>acsc</KEYWORD4>
+ <KEYWORD4>acsch</KEYWORD4>
+ <KEYWORD4>asec</KEYWORD4>
+ <KEYWORD4>asin</KEYWORD4>
+ <KEYWORD4>asinh</KEYWORD4>
+ <KEYWORD4>atan</KEYWORD4>
+ <KEYWORD4>atanh</KEYWORD4>
+ <KEYWORD4>cos</KEYWORD4>
+ <KEYWORD4>cosh</KEYWORD4>
+ <KEYWORD4>cot</KEYWORD4>
+ <KEYWORD4>coth</KEYWORD4>
+ <KEYWORD4>csc</KEYWORD4>
+ <KEYWORD4>sec</KEYWORD4>
+ <KEYWORD4>sech</KEYWORD4>
+ <KEYWORD4>sin</KEYWORD4>
+ <KEYWORD4>sinh</KEYWORD4>
+ <KEYWORD4>tan</KEYWORD4>
+ <KEYWORD4>tanh</KEYWORD4>
+
+ </KEYWORDS>
+
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/clojure.xml b/jEdit/modes/clojure.xml
index 6d28ee0..03a63d1 100644
--- a/jEdit/modes/clojure.xml
+++ b/jEdit/modes/clojure.xml
@@ -1,501 +1,501 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- This file is partially based on lisp.xml and mostly in
- the documentation found at: http://clojure.org/
-
- author: dsm
- date: 24/10/08
- version:0.1
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- <PROPERTY NAME="noWordSep" VALUE=".*+!-_?/" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="(" />
- <PROPERTY NAME="indentCloseBrackets" VALUE=")" />
- <PROPERTY NAME="lineUpClosingBracket" VALUE="false" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- NO_WORD_SEP=".*+!-_?/"
- DIGIT_RE="([0-9]+)|(([0-9]*\.[0-9]+)M?)|([0-9]+/[0-9]+)">
- <!-- S-exps / lists.
- Quoted first so as to not break the normal ones.
- This is highly repetitive, there must be a better way
- -->
- <SPAN TYPE="MARKUP" DELEGATE="MAIN">
- <BEGIN>#^(</BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>@(</BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>^(</BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>`(</BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>'(</BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="FUNCTION" DELEGATE="MAIN">
- <BEGIN>#(</BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="MARKUP" DELEGATE="MAIN">
- <BEGIN>(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- Vectors -->
- <SPAN TYPE="MARKUP" DELEGATE="MAIN">
- <BEGIN>#^[</BEGIN>
- <END>]</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>@[</BEGIN>
- <END>]</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>^[</BEGIN>
- <END>]</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>'[</BEGIN>
- <END>]</END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="MAIN">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Maps -->
- <SPAN TYPE="MARKUP" DELEGATE="MAIN">
- <BEGIN>#^{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>@{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>^{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>'{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="MAIN">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- Sets -->
- <SPAN TYPE="MARKUP" DELEGATE="MAIN">
- <BEGIN>#^#{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>@#{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>^#{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
- <BEGIN>'#{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="MAIN">
- <BEGIN>#{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- Quoted symbols -->
- <SEQ AT_WORD_START="TRUE" TYPE="KEYWORD1">#'</SEQ>
- <MARK_FOLLOWING
- AT_WORD_START="TRUE"
- TYPE="LITERAL3">'</MARK_FOLLOWING>
- <!-- Meta symbols -->
- <MARK_FOLLOWING
- AT_WORD_START="TRUE"
- TYPE="LABEL">^</MARK_FOLLOWING>
- <!-- Deref symbols -->
- <MARK_FOLLOWING
- AT_WORD_START="TRUE"
- TYPE="LABEL">@</MARK_FOLLOWING>
- <!-- Metadata -->
- <MARK_FOLLOWING
- AT_WORD_START="TRUE"
- TYPE="MARKUP">#^</MARK_FOLLOWING>
-
- <!-- Based on convention discussed here:
- http://www.gigamonkeys.com/book/syntax-and-semantics.html -->
- <EOL_SPAN TYPE="COMMENT4">;;;;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT3">;;;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">;;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SPAN TYPE="LITERAL2" DELEGATE="REGEXPS" ESCAPE="\">
- <BEGIN>#"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="STRINGS" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- Character literals -->
- <SEQ_REGEXP
- HASH_CHAR="\"
- AT_WORD_START="TRUE"
- TYPE="LITERAL2">\\(.|newline|space|tab)</SEQ_REGEXP>
-
- <!-- The '.' special form -->
- <SEQ AT_WORD_START="TRUE" TYPE="KEYWORD1">.</SEQ>
-
- <!-- Namespace separators -->
- <!-- <MARK_PREVIOUS
- TYPE="LITERAL4"
- MATCH_TYPE="CONTEXT">/</MARK_PREVIOUS>
- <MARK_PREVIOUS
- TYPE="LITERAL4"
- MATCH_TYPE="CONTEXT">.</MARK_PREVIOUS> -->
-
- <!-- Keywords -->
- <MARK_FOLLOWING
- AT_WORD_START="TRUE"
- TYPE="KEYWORD4">:</MARK_FOLLOWING>
-
- <KEYWORDS>
- <!-- Evaluation -->
- <KEYWORD4>read</KEYWORD4>
- <KEYWORD4>load</KEYWORD4>
- <KEYWORD4>load-file</KEYWORD4>
- <KEYWORD4>eval</KEYWORD4>
- <KEYWORD4>apply</KEYWORD4>
- <KEYWORD4>symbol</KEYWORD4>
- <KEYWORD4>keyword</KEYWORD4>
-
- <!-- Special Forms -->
- <KEYWORD1>quote</KEYWORD1>
- <KEYWORD1>monitor-enter</KEYWORD1>
- <KEYWORD1>monitor-exit</KEYWORD1>
- <KEYWORD1>locking</KEYWORD1>
- <KEYWORD1>macroexpand-1</KEYWORD1>
- <KEYWORD1>macroexpand</KEYWORD1>
- <KEYWORD3>partial</KEYWORD3>
- <KEYWORD3>complement</KEYWORD3>
- <KEYWORD3>comparator</KEYWORD3>
- <KEYWORD3>constantly</KEYWORD3>
- <KEYWORD3>identity</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
-
- <!-- Other functions -->
- <KEYWORD1>map</KEYWORD1>
- <KEYWORD1>mapcat</KEYWORD1>
- <KEYWORD1>str</KEYWORD1>
- <KEYWORD1>time</KEYWORD1>
- <KEYWORD1>line-seq</KEYWORD1>
- <KEYWORD1>reduce</KEYWORD1>
-
- <!-- Printing -->
- <KEYWORD1>pr</KEYWORD1>
- <KEYWORD1>prn</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>println</KEYWORD1>
- <KEYWORD1>pr-str</KEYWORD1>
- <KEYWORD1>prn-str</KEYWORD1>
- <KEYWORD1>print-str</KEYWORD1>
- <KEYWORD1>println-str</KEYWORD1>
- <KEYWORD2>with-out-str</KEYWORD2>
- <KEYWORD2>with-open</KEYWORD2>
- <LITERAL1>newline</LITERAL1>
-
- <!-- RegExps -->
- <KEYWORD1>re-matcher</KEYWORD1>
- <KEYWORD1>re-find</KEYWORD1>
- <KEYWORD1>re-matches</KEYWORD1>
- <KEYWORD1>re-groups</KEYWORD1>
- <KEYWORD1>re-seq</KEYWORD1>
-
- <!-- Flow control -->
- <KEYWORD2>do</KEYWORD2>
- <KEYWORD2>dotimes</KEYWORD2>
- <KEYWORD2>loop</KEYWORD2>
- <KEYWORD2>recur</KEYWORD2>
- <KEYWORD2>throw</KEYWORD2>
- <KEYWORD2>try</KEYWORD2>
- <KEYWORD2>catch</KEYWORD2>
- <KEYWORD2>finally</KEYWORD2>
- <KEYWORD2>when</KEYWORD2>
- <KEYWORD2>when-not</KEYWORD2>
- <KEYWORD2>cond</KEYWORD2>
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD3>assert</KEYWORD3>
- <KEYWORD3>for</KEYWORD3>
- <KEYWORD3>doseq</KEYWORD3>
- <KEYWORD3>dorun</KEYWORD3>
- <KEYWORD3>doall</KEYWORD3>
- <KEYWORD3>when-first</KEYWORD3>
- <KEYWORD3>refer</KEYWORD3>
- <KEYWORD3>import</KEYWORD3>
- <KEYWORD3>in-ns</KEYWORD3>
- <KEYWORD3>find-ns</KEYWORD3>
- <KEYWORD3>all-ns</KEYWORD3>
- <KEYWORD3>dosync</KEYWORD3>
- <KEYWORD3>deref</KEYWORD3>
- <KEYWORD3>ensure</KEYWORD3>
- <KEYWORD3>alter</KEYWORD3>
- <KEYWORD3>shutdown</KEYWORD3>
- <KEYWORD3>send</KEYWORD3>
- <KEYWORD3>send-off</KEYWORD3>
- <KEYWORD3>await</KEYWORD3>
- <KEYWORD3>await-for</KEYWORD3>
- <KEYWORD3>doto</KEYWORD3>
-
- <!-- Constructors -->
- <FUNCTION>defmulti</FUNCTION>
- <FUNCTION>defmethod</FUNCTION>
- <FUNCTION>remove-method</FUNCTION>
- <FUNCTION>meta</FUNCTION>
- <FUNCTION>remove-ns</FUNCTION>
- <FUNCTION>create-ns</FUNCTION>
- <FUNCTION>binding</FUNCTION>
- <FUNCTION>with-local-vars</FUNCTION>
- <FUNCTION>ref</FUNCTION>
- <FUNCTION>ref-set</FUNCTION>
- <FUNCTION>commute</FUNCTION>
- <FUNCTION>agent</FUNCTION>
- <FUNCTION>deref</FUNCTION>
- <FUNCTION>memfn</FUNCTION>
- <FUNCTION>bean</FUNCTION>
- <FUNCTION>proxy</FUNCTION>
- <FUNCTION>make-array</FUNCTION>
- <FUNCTION>list</FUNCTION>
- <FUNCTION>sorted-map</FUNCTION>
- <FUNCTION>sorted-map-by</FUNCTION>
- <FUNCTION>hash-map</FUNCTION>
- <FUNCTION>vector</FUNCTION>
- <FUNCTION>create-struct</FUNCTION>
- <FUNCTION>def</FUNCTION>
- <FUNCTION>defstruct</FUNCTION>
- <FUNCTION>defn</FUNCTION>
- <FUNCTION>fn</FUNCTION>
- <FUNCTION>defmacro</FUNCTION>
- <FUNCTION>var</FUNCTION>
- <FUNCTION>new</FUNCTION>
- <FUNCTION>let</FUNCTION>
- <FUNCTION>set!</FUNCTION>
- <FUNCTION>struct-map</FUNCTION>
- <FUNCTION>struct</FUNCTION>
- <FUNCTION>array-map</FUNCTION>
- <FUNCTION>hash-set</FUNCTION>
- <FUNCTION>sorted-set</FUNCTION>
- <FUNCTION>set</FUNCTION>
- <FUNCTION>seq</FUNCTION>
- <FUNCTION>cons</FUNCTION>
- <FUNCTION>lazy-cons</FUNCTION>
- <FUNCTION>set</FUNCTION>
- <FUNCTION>int</FUNCTION>
- <FUNCTION>long</FUNCTION>
- <FUNCTION>double</FUNCTION>
- <FUNCTION>char</FUNCTION>
- <FUNCTION>boolean</FUNCTION>
- <FUNCTION>short</FUNCTION>
- <FUNCTION>byte</FUNCTION>
- <FUNCTION>parse</FUNCTION>
-
- <!-- Collections -->
- <KEYWORD1>count</KEYWORD1>
- <KEYWORD1>seq</KEYWORD1>
- <KEYWORD1>peek</KEYWORD1>
- <KEYWORD1>pop</KEYWORD1>
- <KEYWORD1>assoc</KEYWORD1>
- <KEYWORD1>dissoc</KEYWORD1>
- <KEYWORD1>get</KEYWORD1>
- <KEYWORD1>nth</KEYWORD1>
- <KEYWORD1>rseq</KEYWORD1>
- <KEYWORD1>subvec</KEYWORD1>
- <KEYWORD1>find</KEYWORD1>
- <KEYWORD1>select-keys</KEYWORD1>
- <KEYWORD1>key</KEYWORD1>
- <KEYWORD1>val</KEYWORD1>
- <KEYWORD1>keys</KEYWORD1>
- <KEYWORD1>vals</KEYWORD1>
- <KEYWORD1>merge</KEYWORD1>
- <KEYWORD1>merge-with</KEYWORD1>
- <KEYWORD1>accessor</KEYWORD1>
- <KEYWORD1>conj</KEYWORD1>
- <KEYWORD1>disj</KEYWORD1>
- <KEYWORD1>first</KEYWORD1>
- <KEYWORD1>rest</KEYWORD1>
- <KEYWORD1>ffirst</KEYWORD1>
- <KEYWORD1>frest</KEYWORD1>
- <KEYWORD1>rfirst</KEYWORD1>
- <KEYWORD1>rrest</KEYWORD1>
- <KEYWORD1>second</KEYWORD1>
- <KEYWORD1>some</KEYWORD1>
- <KEYWORD1>concat</KEYWORD1>
- <KEYWORD1>filter</KEYWORD1>
- <KEYWORD1>take</KEYWORD1>
- <KEYWORD1>take-nth</KEYWORD1>
- <KEYWORD1>take-while</KEYWORD1>
- <KEYWORD1>drop</KEYWORD1>
- <KEYWORD1>nthrest</KEYWORD1>
- <KEYWORD1>drop-while</KEYWORD1>
- <KEYWORD1>reverse</KEYWORD1>
- <KEYWORD1>cycle</KEYWORD1>
- <KEYWORD1>interleave</KEYWORD1>
- <KEYWORD1>split-at</KEYWORD1>
- <KEYWORD1>split-with</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>replicate</KEYWORD1>
- <KEYWORD1>iterate</KEYWORD1>
- <KEYWORD1>range</KEYWORD1>
- <KEYWORD1>into</KEYWORD1>
- <KEYWORD1>sort</KEYWORD1>
- <KEYWORD1>sort-by</KEYWORD1>
- <KEYWORD1>zipmap</KEYWORD1>
- <KEYWORD1>fnseq</KEYWORD1>
- <KEYWORD1>lazy-cons</KEYWORD1>
- <KEYWORD1>lazy-cat</KEYWORD1>
- <KEYWORD1>with-meta</KEYWORD1>
- <KEYWORD1>ns-name</KEYWORD1>
- <KEYWORD1>ns-map</KEYWORD1>
- <KEYWORD1>ns-interns</KEYWORD1>
- <KEYWORD1>ns-publics</KEYWORD1>
- <KEYWORD1>ns-imports</KEYWORD1>
- <KEYWORD1>ns-refers</KEYWORD1>
- <KEYWORD1>ns-resolve</KEYWORD1>
- <KEYWORD1>resolve</KEYWORD1>
- <KEYWORD1>ns-unmap</KEYWORD1>
- <KEYWORD1>name</KEYWORD1>
- <KEYWORD1>namespace</KEYWORD1>
- <KEYWORD1>find-var</KEYWORD1>
- <KEYWORD1>var-get</KEYWORD1>
- <KEYWORD1>var-set</KEYWORD1>
- <KEYWORD1>put</KEYWORD1>
- <KEYWORD1>agent-errors</KEYWORD1>
- <KEYWORD1>clear-agent-errors</KEYWORD1>
- <KEYWORD1>alength</KEYWORD1>
- <KEYWORD1>aget</KEYWORD1>
- <KEYWORD1>aset</KEYWORD1>
- <KEYWORD1>to-array</KEYWORD1>
- <KEYWORD1>into-array</KEYWORD1>
- <KEYWORD1>to-array-2d</KEYWORD1>
-
- <!-- Tests, operators and numerical fns -->
- <KEYWORD4>-></KEYWORD4>
- <KEYWORD4>instance?</KEYWORD4>
- <KEYWORD4>every?</KEYWORD4>
- <KEYWORD4>not-every?</KEYWORD4>
- <KEYWORD4>not-any?</KEYWORD4>
- <KEYWORD4>contains?</KEYWORD4>
- <KEYWORD4>string?</KEYWORD4>
- <KEYWORD4>symbol?</KEYWORD4>
- <KEYWORD4>map?</KEYWORD4>
- <KEYWORD4>seq?</KEYWORD4>
- <KEYWORD4>vector?</KEYWORD4>
- <KEYWORD4>identical?</KEYWORD4>
- <KEYWORD4>pos?</KEYWORD4>
- <KEYWORD4>neg?</KEYWORD4>
- <KEYWORD4>zero?</KEYWORD4>
- <KEYWORD4>nil?</KEYWORD4>
- <KEYWORD4>false?</KEYWORD4>
- <KEYWORD4>true?</KEYWORD4>
- <KEYWORD4>inc</KEYWORD4>
- <KEYWORD4>dec</KEYWORD4>
- <KEYWORD4>+</KEYWORD4>
- <KEYWORD4>-</KEYWORD4>
- <KEYWORD4>=</KEYWORD4>
- <KEYWORD4>==</KEYWORD4>
- <KEYWORD4>not=</KEYWORD4>
- <KEYWORD4><=</KEYWORD4>
- <KEYWORD4>>=</KEYWORD4>
- <KEYWORD4><</KEYWORD4>
- <KEYWORD4>></KEYWORD4>
- <KEYWORD4>/</KEYWORD4>
- <KEYWORD4>*</KEYWORD4>
- <KEYWORD4>%</KEYWORD4>
- <KEYWORD4>quot</KEYWORD4>
- <KEYWORD4>inc</KEYWORD4>
- <KEYWORD4>dec</KEYWORD4>
- <KEYWORD4>rem</KEYWORD4>
- <KEYWORD4>min</KEYWORD4>
- <KEYWORD4>max</KEYWORD4>
- <KEYWORD4>and</KEYWORD4>
- <KEYWORD4>or</KEYWORD4>
- <KEYWORD4>not</KEYWORD4>
- <KEYWORD4>bit-and</KEYWORD4>
- <KEYWORD4>bit-or</KEYWORD4>
- <KEYWORD4>bit-not</KEYWORD4>
- <KEYWORD4>bit-shift-right</KEYWORD4>
- <KEYWORD4>bit-shift-left</KEYWORD4>
- <KEYWORD4>union</KEYWORD4>
- <KEYWORD4>diffference</KEYWORD4>
- <KEYWORD4>intersection</KEYWORD4>
- <KEYWORD4>select</KEYWORD4>
- <KEYWORD4>index</KEYWORD4>
- <KEYWORD4>rename</KEYWORD4>
- <KEYWORD4>join</KEYWORD4>
- <KEYWORD4>distinct</KEYWORD4>
- <KEYWORD4>submit</KEYWORD4>
-
- <!-- Pre-defined vars -->
- <KEYWORD3>*ns*</KEYWORD3>
- <KEYWORD3>*out*</KEYWORD3>
- <KEYWORD3>*print-readably*</KEYWORD3>
- <KEYWORD3>*print-readably*</KEYWORD3>
- <KEYWORD3>*warn-on-reflection*</KEYWORD3>
- <!-- Special symbols -->
- <KEYWORD3>&</KEYWORD3>
-
- <!-- Literals -->
- <LITERAL4>true</LITERAL4>
- <LITERAL4>false</LITERAL4>
- <LITERAL4>nil</LITERAL4>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="STRINGS"
- HIGHLIGHT_DIGITS="FALSE"
- DEFAULT="LITERAL1"
- IGNORE_CASE="TRUE">
- <SEQ_REGEXP
- HASH_CHAR="\"
- AT_WORD_START="FALSE"
- TYPE="LABEL">\\.</SEQ_REGEXP>
- <KEYWORDS>
- <INVALID>"</INVALID>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="REGEXPS"
- HIGHLIGHT_DIGITS="FALSE"
- DEFAULT="LITERAL1"
- IGNORE_CASE="TRUE">
- <!-- TODO: Put actual regexp syntax hilighting -->
- <SEQ_REGEXP
- HASH_CHAR="\"
- AT_WORD_START="FALSE"
- TYPE="LABEL">\\.</SEQ_REGEXP>
- <KEYWORDS>
- <INVALID>"</INVALID>
- </KEYWORDS>
- </RULES>
-</MODE>
-
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ This file is partially based on lisp.xml and mostly in
+ the documentation found at: http://clojure.org/
+
+ author: dsm
+ date: 24/10/08
+ version:0.1
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ <PROPERTY NAME="noWordSep" VALUE=".*+!-_?/" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="multipleBracketIndent" VALUE="true" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ NO_WORD_SEP=".*+!-_?/"
+ DIGIT_RE="([0-9]+)|(([0-9]*\.[0-9]+)M?)|([0-9]+/[0-9]+)">
+ <!-- S-exps / lists.
+ Quoted first so as to not break the normal ones.
+ This is highly repetitive, there must be a better way
+ -->
+ <SPAN TYPE="MARKUP" DELEGATE="MAIN">
+ <BEGIN>#^(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>@(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>^(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>`(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>'(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="FUNCTION" DELEGATE="MAIN">
+ <BEGIN>#(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="MARKUP" DELEGATE="MAIN">
+ <BEGIN>(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- Vectors -->
+ <SPAN TYPE="MARKUP" DELEGATE="MAIN">
+ <BEGIN>#^[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>@[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>^[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>'[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="MAIN">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Maps -->
+ <SPAN TYPE="MARKUP" DELEGATE="MAIN">
+ <BEGIN>#^{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>@{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>^{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>'{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="MAIN">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Sets -->
+ <SPAN TYPE="MARKUP" DELEGATE="MAIN">
+ <BEGIN>#^#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>@#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>^#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="MAIN">
+ <BEGIN>'#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="MAIN">
+ <BEGIN>#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Quoted symbols -->
+ <SEQ AT_WORD_START="TRUE" TYPE="KEYWORD1">#'</SEQ>
+ <MARK_FOLLOWING
+ AT_WORD_START="TRUE"
+ TYPE="LITERAL3">'</MARK_FOLLOWING>
+ <!-- Meta symbols -->
+ <MARK_FOLLOWING
+ AT_WORD_START="TRUE"
+ TYPE="LABEL">^</MARK_FOLLOWING>
+ <!-- Deref symbols -->
+ <MARK_FOLLOWING
+ AT_WORD_START="TRUE"
+ TYPE="LABEL">@</MARK_FOLLOWING>
+ <!-- Metadata -->
+ <MARK_FOLLOWING
+ AT_WORD_START="TRUE"
+ TYPE="MARKUP">#^</MARK_FOLLOWING>
+
+ <!-- Based on convention discussed here:
+ http://www.gigamonkeys.com/book/syntax-and-semantics.html -->
+ <EOL_SPAN TYPE="COMMENT4">;;;;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT3">;;;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">;;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL2" DELEGATE="REGEXPS" ESCAPE="\">
+ <BEGIN>#"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="STRINGS" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- Character literals -->
+ <SEQ_REGEXP
+ HASH_CHAR="\"
+ AT_WORD_START="TRUE"
+ TYPE="LITERAL2">\\(.|newline|space|tab)</SEQ_REGEXP>
+
+ <!-- The '.' special form -->
+ <SEQ AT_WORD_START="TRUE" TYPE="KEYWORD1">.</SEQ>
+
+ <!-- Namespace separators -->
+ <!-- <MARK_PREVIOUS
+ TYPE="LITERAL4"
+ MATCH_TYPE="CONTEXT">/</MARK_PREVIOUS>
+ <MARK_PREVIOUS
+ TYPE="LITERAL4"
+ MATCH_TYPE="CONTEXT">.</MARK_PREVIOUS> -->
+
+ <!-- Keywords -->
+ <MARK_FOLLOWING
+ AT_WORD_START="TRUE"
+ TYPE="KEYWORD4">:</MARK_FOLLOWING>
+
+ <KEYWORDS>
+ <!-- Evaluation -->
+ <KEYWORD4>read</KEYWORD4>
+ <KEYWORD4>load</KEYWORD4>
+ <KEYWORD4>load-file</KEYWORD4>
+ <KEYWORD4>eval</KEYWORD4>
+ <KEYWORD4>apply</KEYWORD4>
+ <KEYWORD4>symbol</KEYWORD4>
+ <KEYWORD4>keyword</KEYWORD4>
+
+ <!-- Special Forms -->
+ <KEYWORD1>quote</KEYWORD1>
+ <KEYWORD1>monitor-enter</KEYWORD1>
+ <KEYWORD1>monitor-exit</KEYWORD1>
+ <KEYWORD1>locking</KEYWORD1>
+ <KEYWORD1>macroexpand-1</KEYWORD1>
+ <KEYWORD1>macroexpand</KEYWORD1>
+ <KEYWORD3>partial</KEYWORD3>
+ <KEYWORD3>complement</KEYWORD3>
+ <KEYWORD3>comparator</KEYWORD3>
+ <KEYWORD3>constantly</KEYWORD3>
+ <KEYWORD3>identity</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+
+ <!-- Other functions -->
+ <KEYWORD1>map</KEYWORD1>
+ <KEYWORD1>mapcat</KEYWORD1>
+ <KEYWORD1>str</KEYWORD1>
+ <KEYWORD1>time</KEYWORD1>
+ <KEYWORD1>line-seq</KEYWORD1>
+ <KEYWORD1>reduce</KEYWORD1>
+
+ <!-- Printing -->
+ <KEYWORD1>pr</KEYWORD1>
+ <KEYWORD1>prn</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>println</KEYWORD1>
+ <KEYWORD1>pr-str</KEYWORD1>
+ <KEYWORD1>prn-str</KEYWORD1>
+ <KEYWORD1>print-str</KEYWORD1>
+ <KEYWORD1>println-str</KEYWORD1>
+ <KEYWORD2>with-out-str</KEYWORD2>
+ <KEYWORD2>with-open</KEYWORD2>
+ <LITERAL1>newline</LITERAL1>
+
+ <!-- RegExps -->
+ <KEYWORD1>re-matcher</KEYWORD1>
+ <KEYWORD1>re-find</KEYWORD1>
+ <KEYWORD1>re-matches</KEYWORD1>
+ <KEYWORD1>re-groups</KEYWORD1>
+ <KEYWORD1>re-seq</KEYWORD1>
+
+ <!-- Flow control -->
+ <KEYWORD2>do</KEYWORD2>
+ <KEYWORD2>dotimes</KEYWORD2>
+ <KEYWORD2>loop</KEYWORD2>
+ <KEYWORD2>recur</KEYWORD2>
+ <KEYWORD2>throw</KEYWORD2>
+ <KEYWORD2>try</KEYWORD2>
+ <KEYWORD2>catch</KEYWORD2>
+ <KEYWORD2>finally</KEYWORD2>
+ <KEYWORD2>when</KEYWORD2>
+ <KEYWORD2>when-not</KEYWORD2>
+ <KEYWORD2>cond</KEYWORD2>
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD3>assert</KEYWORD3>
+ <KEYWORD3>for</KEYWORD3>
+ <KEYWORD3>doseq</KEYWORD3>
+ <KEYWORD3>dorun</KEYWORD3>
+ <KEYWORD3>doall</KEYWORD3>
+ <KEYWORD3>when-first</KEYWORD3>
+ <KEYWORD3>refer</KEYWORD3>
+ <KEYWORD3>import</KEYWORD3>
+ <KEYWORD3>in-ns</KEYWORD3>
+ <KEYWORD3>find-ns</KEYWORD3>
+ <KEYWORD3>all-ns</KEYWORD3>
+ <KEYWORD3>dosync</KEYWORD3>
+ <KEYWORD3>deref</KEYWORD3>
+ <KEYWORD3>ensure</KEYWORD3>
+ <KEYWORD3>alter</KEYWORD3>
+ <KEYWORD3>shutdown</KEYWORD3>
+ <KEYWORD3>send</KEYWORD3>
+ <KEYWORD3>send-off</KEYWORD3>
+ <KEYWORD3>await</KEYWORD3>
+ <KEYWORD3>await-for</KEYWORD3>
+ <KEYWORD3>doto</KEYWORD3>
+
+ <!-- Constructors -->
+ <FUNCTION>defmulti</FUNCTION>
+ <FUNCTION>defmethod</FUNCTION>
+ <FUNCTION>remove-method</FUNCTION>
+ <FUNCTION>meta</FUNCTION>
+ <FUNCTION>remove-ns</FUNCTION>
+ <FUNCTION>create-ns</FUNCTION>
+ <FUNCTION>binding</FUNCTION>
+ <FUNCTION>with-local-vars</FUNCTION>
+ <FUNCTION>ref</FUNCTION>
+ <FUNCTION>ref-set</FUNCTION>
+ <FUNCTION>commute</FUNCTION>
+ <FUNCTION>agent</FUNCTION>
+ <FUNCTION>deref</FUNCTION>
+ <FUNCTION>memfn</FUNCTION>
+ <FUNCTION>bean</FUNCTION>
+ <FUNCTION>proxy</FUNCTION>
+ <FUNCTION>make-array</FUNCTION>
+ <FUNCTION>list</FUNCTION>
+ <FUNCTION>sorted-map</FUNCTION>
+ <FUNCTION>sorted-map-by</FUNCTION>
+ <FUNCTION>hash-map</FUNCTION>
+ <FUNCTION>vector</FUNCTION>
+ <FUNCTION>create-struct</FUNCTION>
+ <FUNCTION>def</FUNCTION>
+ <FUNCTION>defstruct</FUNCTION>
+ <FUNCTION>defn</FUNCTION>
+ <FUNCTION>fn</FUNCTION>
+ <FUNCTION>defmacro</FUNCTION>
+ <FUNCTION>var</FUNCTION>
+ <FUNCTION>new</FUNCTION>
+ <FUNCTION>let</FUNCTION>
+ <FUNCTION>set!</FUNCTION>
+ <FUNCTION>struct-map</FUNCTION>
+ <FUNCTION>struct</FUNCTION>
+ <FUNCTION>array-map</FUNCTION>
+ <FUNCTION>hash-set</FUNCTION>
+ <FUNCTION>sorted-set</FUNCTION>
+ <FUNCTION>set</FUNCTION>
+ <FUNCTION>seq</FUNCTION>
+ <FUNCTION>cons</FUNCTION>
+ <FUNCTION>lazy-cons</FUNCTION>
+ <FUNCTION>set</FUNCTION>
+ <FUNCTION>int</FUNCTION>
+ <FUNCTION>long</FUNCTION>
+ <FUNCTION>double</FUNCTION>
+ <FUNCTION>char</FUNCTION>
+ <FUNCTION>boolean</FUNCTION>
+ <FUNCTION>short</FUNCTION>
+ <FUNCTION>byte</FUNCTION>
+ <FUNCTION>parse</FUNCTION>
+
+ <!-- Collections -->
+ <KEYWORD1>count</KEYWORD1>
+ <KEYWORD1>seq</KEYWORD1>
+ <KEYWORD1>peek</KEYWORD1>
+ <KEYWORD1>pop</KEYWORD1>
+ <KEYWORD1>assoc</KEYWORD1>
+ <KEYWORD1>dissoc</KEYWORD1>
+ <KEYWORD1>get</KEYWORD1>
+ <KEYWORD1>nth</KEYWORD1>
+ <KEYWORD1>rseq</KEYWORD1>
+ <KEYWORD1>subvec</KEYWORD1>
+ <KEYWORD1>find</KEYWORD1>
+ <KEYWORD1>select-keys</KEYWORD1>
+ <KEYWORD1>key</KEYWORD1>
+ <KEYWORD1>val</KEYWORD1>
+ <KEYWORD1>keys</KEYWORD1>
+ <KEYWORD1>vals</KEYWORD1>
+ <KEYWORD1>merge</KEYWORD1>
+ <KEYWORD1>merge-with</KEYWORD1>
+ <KEYWORD1>accessor</KEYWORD1>
+ <KEYWORD1>conj</KEYWORD1>
+ <KEYWORD1>disj</KEYWORD1>
+ <KEYWORD1>first</KEYWORD1>
+ <KEYWORD1>rest</KEYWORD1>
+ <KEYWORD1>ffirst</KEYWORD1>
+ <KEYWORD1>frest</KEYWORD1>
+ <KEYWORD1>rfirst</KEYWORD1>
+ <KEYWORD1>rrest</KEYWORD1>
+ <KEYWORD1>second</KEYWORD1>
+ <KEYWORD1>some</KEYWORD1>
+ <KEYWORD1>concat</KEYWORD1>
+ <KEYWORD1>filter</KEYWORD1>
+ <KEYWORD1>take</KEYWORD1>
+ <KEYWORD1>take-nth</KEYWORD1>
+ <KEYWORD1>take-while</KEYWORD1>
+ <KEYWORD1>drop</KEYWORD1>
+ <KEYWORD1>nthrest</KEYWORD1>
+ <KEYWORD1>drop-while</KEYWORD1>
+ <KEYWORD1>reverse</KEYWORD1>
+ <KEYWORD1>cycle</KEYWORD1>
+ <KEYWORD1>interleave</KEYWORD1>
+ <KEYWORD1>split-at</KEYWORD1>
+ <KEYWORD1>split-with</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>replicate</KEYWORD1>
+ <KEYWORD1>iterate</KEYWORD1>
+ <KEYWORD1>range</KEYWORD1>
+ <KEYWORD1>into</KEYWORD1>
+ <KEYWORD1>sort</KEYWORD1>
+ <KEYWORD1>sort-by</KEYWORD1>
+ <KEYWORD1>zipmap</KEYWORD1>
+ <KEYWORD1>fnseq</KEYWORD1>
+ <KEYWORD1>lazy-cons</KEYWORD1>
+ <KEYWORD1>lazy-cat</KEYWORD1>
+ <KEYWORD1>with-meta</KEYWORD1>
+ <KEYWORD1>ns-name</KEYWORD1>
+ <KEYWORD1>ns-map</KEYWORD1>
+ <KEYWORD1>ns-interns</KEYWORD1>
+ <KEYWORD1>ns-publics</KEYWORD1>
+ <KEYWORD1>ns-imports</KEYWORD1>
+ <KEYWORD1>ns-refers</KEYWORD1>
+ <KEYWORD1>ns-resolve</KEYWORD1>
+ <KEYWORD1>resolve</KEYWORD1>
+ <KEYWORD1>ns-unmap</KEYWORD1>
+ <KEYWORD1>name</KEYWORD1>
+ <KEYWORD1>namespace</KEYWORD1>
+ <KEYWORD1>find-var</KEYWORD1>
+ <KEYWORD1>var-get</KEYWORD1>
+ <KEYWORD1>var-set</KEYWORD1>
+ <KEYWORD1>put</KEYWORD1>
+ <KEYWORD1>agent-errors</KEYWORD1>
+ <KEYWORD1>clear-agent-errors</KEYWORD1>
+ <KEYWORD1>alength</KEYWORD1>
+ <KEYWORD1>aget</KEYWORD1>
+ <KEYWORD1>aset</KEYWORD1>
+ <KEYWORD1>to-array</KEYWORD1>
+ <KEYWORD1>into-array</KEYWORD1>
+ <KEYWORD1>to-array-2d</KEYWORD1>
+
+ <!-- Tests, operators and numerical fns -->
+ <KEYWORD4>-></KEYWORD4>
+ <KEYWORD4>instance?</KEYWORD4>
+ <KEYWORD4>every?</KEYWORD4>
+ <KEYWORD4>not-every?</KEYWORD4>
+ <KEYWORD4>not-any?</KEYWORD4>
+ <KEYWORD4>contains?</KEYWORD4>
+ <KEYWORD4>string?</KEYWORD4>
+ <KEYWORD4>symbol?</KEYWORD4>
+ <KEYWORD4>map?</KEYWORD4>
+ <KEYWORD4>seq?</KEYWORD4>
+ <KEYWORD4>vector?</KEYWORD4>
+ <KEYWORD4>identical?</KEYWORD4>
+ <KEYWORD4>pos?</KEYWORD4>
+ <KEYWORD4>neg?</KEYWORD4>
+ <KEYWORD4>zero?</KEYWORD4>
+ <KEYWORD4>nil?</KEYWORD4>
+ <KEYWORD4>false?</KEYWORD4>
+ <KEYWORD4>true?</KEYWORD4>
+ <KEYWORD4>inc</KEYWORD4>
+ <KEYWORD4>dec</KEYWORD4>
+ <KEYWORD4>+</KEYWORD4>
+ <KEYWORD4>-</KEYWORD4>
+ <KEYWORD4>=</KEYWORD4>
+ <KEYWORD4>==</KEYWORD4>
+ <KEYWORD4>not=</KEYWORD4>
+ <KEYWORD4><=</KEYWORD4>
+ <KEYWORD4>>=</KEYWORD4>
+ <KEYWORD4><</KEYWORD4>
+ <KEYWORD4>></KEYWORD4>
+ <KEYWORD4>/</KEYWORD4>
+ <KEYWORD4>*</KEYWORD4>
+ <KEYWORD4>%</KEYWORD4>
+ <KEYWORD4>quot</KEYWORD4>
+ <KEYWORD4>inc</KEYWORD4>
+ <KEYWORD4>dec</KEYWORD4>
+ <KEYWORD4>rem</KEYWORD4>
+ <KEYWORD4>min</KEYWORD4>
+ <KEYWORD4>max</KEYWORD4>
+ <KEYWORD4>and</KEYWORD4>
+ <KEYWORD4>or</KEYWORD4>
+ <KEYWORD4>not</KEYWORD4>
+ <KEYWORD4>bit-and</KEYWORD4>
+ <KEYWORD4>bit-or</KEYWORD4>
+ <KEYWORD4>bit-not</KEYWORD4>
+ <KEYWORD4>bit-shift-right</KEYWORD4>
+ <KEYWORD4>bit-shift-left</KEYWORD4>
+ <KEYWORD4>union</KEYWORD4>
+ <KEYWORD4>diffference</KEYWORD4>
+ <KEYWORD4>intersection</KEYWORD4>
+ <KEYWORD4>select</KEYWORD4>
+ <KEYWORD4>index</KEYWORD4>
+ <KEYWORD4>rename</KEYWORD4>
+ <KEYWORD4>join</KEYWORD4>
+ <KEYWORD4>distinct</KEYWORD4>
+ <KEYWORD4>submit</KEYWORD4>
+
+ <!-- Pre-defined vars -->
+ <KEYWORD3>*ns*</KEYWORD3>
+ <KEYWORD3>*out*</KEYWORD3>
+ <KEYWORD3>*print-readably*</KEYWORD3>
+ <KEYWORD3>*print-readably*</KEYWORD3>
+ <KEYWORD3>*warn-on-reflection*</KEYWORD3>
+ <!-- Special symbols -->
+ <KEYWORD3>&</KEYWORD3>
+
+ <!-- Literals -->
+ <LITERAL4>true</LITERAL4>
+ <LITERAL4>false</LITERAL4>
+ <LITERAL4>nil</LITERAL4>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="STRINGS"
+ HIGHLIGHT_DIGITS="FALSE"
+ DEFAULT="LITERAL1"
+ IGNORE_CASE="TRUE">
+ <SEQ_REGEXP
+ HASH_CHAR="\"
+ AT_WORD_START="FALSE"
+ TYPE="LABEL">\\.</SEQ_REGEXP>
+ <KEYWORDS>
+ <INVALID>"</INVALID>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="REGEXPS"
+ HIGHLIGHT_DIGITS="FALSE"
+ DEFAULT="LITERAL1"
+ IGNORE_CASE="TRUE">
+ <!-- TODO: Put actual regexp syntax hilighting -->
+ <SEQ_REGEXP
+ HASH_CHAR="\"
+ AT_WORD_START="FALSE"
+ TYPE="LABEL">\\.</SEQ_REGEXP>
+ <KEYWORDS>
+ <INVALID>"</INVALID>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
+
diff --git a/jEdit/modes/cobol.xml b/jEdit/modes/cobol.xml
index d7786ff..897cc30 100644
--- a/jEdit/modes/cobol.xml
+++ b/jEdit/modes/cobol.xml
@@ -1,998 +1,998 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- COBOL mode, by Matthias M. Schneider -->
-<MODE>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <EOL_SPAN_REGEXP TYPE="COMMENT1" AT_LINE_START="TRUE">.{6}(\*|/)</EOL_SPAN_REGEXP>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR"> = </SEQ>
- <SEQ TYPE="OPERATOR"> >= </SEQ>
- <SEQ TYPE="OPERATOR"> <= </SEQ>
- <SEQ TYPE="OPERATOR"> + </SEQ>
- <SEQ TYPE="OPERATOR"> - </SEQ>
- <SEQ TYPE="OPERATOR"> / </SEQ>
- <SEQ TYPE="OPERATOR"> * </SEQ>
- <SEQ TYPE="OPERATOR"> ** </SEQ>
- <SEQ TYPE="OPERATOR"> > </SEQ>
- <SEQ TYPE="OPERATOR"> < </SEQ>
- <SEQ TYPE="OPERATOR"> % </SEQ>
- <SEQ TYPE="OPERATOR"> & </SEQ>
- <SEQ TYPE="OPERATOR"> | </SEQ>
- <SEQ TYPE="OPERATOR"> ^ </SEQ>
- <SEQ TYPE="OPERATOR"> ~ </SEQ>
-
- <SPAN TYPE="COMMENT2" NO_LINE_BREAK="FALSE">
- <BEGIN>EXEC SQL</BEGIN>
- <END>END-EXEC</END>
- </SPAN>
-
- <KEYWORDS>
- <KEYWORD1>ACCEPT</KEYWORD1>
- <KEYWORD1>ACCESS</KEYWORD1>
- <KEYWORD1>ACTUAL</KEYWORD1>
- <KEYWORD1>ADD</KEYWORD1>
- <KEYWORD1>ADDRESS</KEYWORD1>
- <KEYWORD1>ADVANCING</KEYWORD1>
- <KEYWORD1>AFTER</KEYWORD1>
- <KEYWORD1>ALL</KEYWORD1>
- <KEYWORD1>ALPHABET</KEYWORD1>
- <KEYWORD1>ALPHABETIC</KEYWORD1>
- <KEYWORD1>ALPHABETIC-LOWER</KEYWORD1>
- <KEYWORD1>ALPHABETIC-UPPER</KEYWORD1>
- <KEYWORD1>ALPHANUMERIC</KEYWORD1>
- <KEYWORD1>ALPHANUMERIC-EDITED</KEYWORD1>
- <KEYWORD1>ALSO</KEYWORD1>
- <KEYWORD1>ALTER</KEYWORD1>
- <KEYWORD1>ALTERNATE</KEYWORD1>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>ANY</KEYWORD1>
- <KEYWORD1>API</KEYWORD1>
- <KEYWORD1>APPLY</KEYWORD1>
- <KEYWORD1>ARE</KEYWORD1>
- <KEYWORD1>AREA</KEYWORD1>
- <KEYWORD1>AREAS</KEYWORD1>
- <KEYWORD1>ASCENDING</KEYWORD1>
- <KEYWORD1>ASSIGN</KEYWORD1>
- <KEYWORD1>AT</KEYWORD1>
- <KEYWORD1>AUTHOR</KEYWORD1>
- <KEYWORD1>AUTO</KEYWORD1>
- <KEYWORD1>AUTO-SKIP</KEYWORD1>
- <KEYWORD1>AUTOMATIC</KEYWORD1>
-
- <KEYWORD1>BACKGROUND-COLOR</KEYWORD1>
- <KEYWORD1>BACKGROUND-COLOUR</KEYWORD1>
- <KEYWORD1>BACKWARD</KEYWORD1>
- <KEYWORD1>BASIS</KEYWORD1>
- <KEYWORD1>BEEP</KEYWORD1>
- <KEYWORD1>BEFORE</KEYWORD1>
- <KEYWORD1>BEGINNING</KEYWORD1>
- <KEYWORD1>BELL</KEYWORD1>
- <KEYWORD1>BINARY</KEYWORD1>
- <KEYWORD1>BLANK</KEYWORD1>
- <KEYWORD1>BLINK</KEYWORD1>
- <KEYWORD1>BLOCK</KEYWORD1>
- <KEYWORD1>BOTTOM</KEYWORD1>
- <KEYWORD1>BY</KEYWORD1>
-
- <KEYWORD1>C01</KEYWORD1>
- <KEYWORD1>C02</KEYWORD1>
- <KEYWORD1>C03</KEYWORD1>
- <KEYWORD1>C04</KEYWORD1>
- <KEYWORD1>C05</KEYWORD1>
- <KEYWORD1>C06</KEYWORD1>
- <KEYWORD1>C07</KEYWORD1>
- <KEYWORD1>C08</KEYWORD1>
- <KEYWORD1>C09</KEYWORD1>
- <KEYWORD1>C10</KEYWORD1>
- <KEYWORD1>C11</KEYWORD1>
- <KEYWORD1>C12</KEYWORD1>
- <KEYWORD1>CALL</KEYWORD1>
- <KEYWORD1>CALL-CONVENTION</KEYWORD1>
- <KEYWORD1>CANCEL</KEYWORD1>
- <KEYWORD1>CBL</KEYWORD1>
- <KEYWORD1>CD</KEYWORD1>
- <KEYWORD1>CF</KEYWORD1>
- <KEYWORD1>CH</KEYWORD1>
- <KEYWORD1>CHAIN</KEYWORD1>
- <KEYWORD1>CHAINING</KEYWORD1>
- <KEYWORD1>CHANGED</KEYWORD1>
- <KEYWORD1>CHARACTER</KEYWORD1>
- <KEYWORD1>CHARACTERS</KEYWORD1>
- <KEYWORD1>CLASS</KEYWORD1>
- <KEYWORD1>CLOCK-UNITS</KEYWORD1>
- <KEYWORD1>CLOSE</KEYWORD1>
- <KEYWORD1>COBOL</KEYWORD1>
- <KEYWORD1>CODE</KEYWORD1>
- <KEYWORD1>CODE-SET</KEYWORD1>
- <KEYWORD1>COL</KEYWORD1>
- <KEYWORD1>COLLATING</KEYWORD1>
- <KEYWORD1>COLUMN</KEYWORD1>
- <KEYWORD1>COM-REG</KEYWORD1>
- <KEYWORD1>COMMA</KEYWORD1>
- <KEYWORD1>COMMIT</KEYWORD1>
- <KEYWORD1>COMMON</KEYWORD1>
- <KEYWORD1>COMMUNICATION</KEYWORD1>
- <KEYWORD1>COMP</KEYWORD1>
- <KEYWORD1>COMP-0</KEYWORD1>
- <KEYWORD1>COMP-1</KEYWORD1>
- <KEYWORD1>COMP-2</KEYWORD1>
- <KEYWORD1>COMP-3</KEYWORD1>
- <KEYWORD1>COMP-4</KEYWORD1>
- <KEYWORD1>COMP-5</KEYWORD1>
- <KEYWORD1>COMP-6</KEYWORD1>
- <KEYWORD1>COMP-X</KEYWORD1>
- <KEYWORD1>COMPUTATIONAL</KEYWORD1>
- <KEYWORD1>COMPUTATIONAL-0</KEYWORD1>
- <KEYWORD1>COMPUTATIONAL-1</KEYWORD1>
- <KEYWORD1>COMPUTATIONAL-2</KEYWORD1>
- <KEYWORD1>COMPUTATIONAL-3</KEYWORD1>
- <KEYWORD1>COMPUTATIONAL-4</KEYWORD1>
- <KEYWORD1>COMPUTATIONAL-5</KEYWORD1>
- <KEYWORD1>COMPUTATIONAL-6</KEYWORD1>
- <KEYWORD1>COMPUTATIONAL-X</KEYWORD1>
- <KEYWORD1>COMPUTE</KEYWORD1>
- <KEYWORD1>CONFIGURATION</KEYWORD1>
- <KEYWORD1>CONSOLE</KEYWORD1>
- <KEYWORD1>CONTAINS</KEYWORD1>
- <KEYWORD1>CONTENT</KEYWORD1>
- <KEYWORD1>CONTINUE</KEYWORD1>
- <KEYWORD1>CONTROL</KEYWORD1>
- <KEYWORD1>CONTROLS</KEYWORD1>
- <KEYWORD1>CONVERTING</KEYWORD1>
- <KEYWORD1>COPY</KEYWORD1>
- <KEYWORD1>CORE-INDEX</KEYWORD1>
- <KEYWORD1>CORR</KEYWORD1>
- <KEYWORD1>CORRESPONDING</KEYWORD1>
- <KEYWORD1>COUNT</KEYWORD1>
- <KEYWORD1>CRT</KEYWORD1>
- <KEYWORD1>CRT-UNDER</KEYWORD1>
- <KEYWORD1>CURRENCY</KEYWORD1>
- <KEYWORD1>CURRENT-DATE</KEYWORD1>
- <KEYWORD1>CURSOR</KEYWORD1>
- <KEYWORD1>CYCLE</KEYWORD1>
- <KEYWORD1>CYL-INDEX</KEYWORD1>
- <KEYWORD1>CYL-OVERFLOW</KEYWORD1>
-
- <KEYWORD1>DATA</KEYWORD1>
- <KEYWORD1>DATE</KEYWORD1>
- <KEYWORD1>DATE-COMPILED</KEYWORD1>
- <KEYWORD1>DATE-WRITTEN</KEYWORD1>
- <KEYWORD1>DAY</KEYWORD1>
- <KEYWORD1>DAY-OF-WEEK</KEYWORD1>
- <KEYWORD1>DBCS</KEYWORD1>
- <KEYWORD1>DE</KEYWORD1>
- <KEYWORD1>DEBUG</KEYWORD1>
- <KEYWORD1>DEBUG-CONTENTS</KEYWORD1>
- <KEYWORD1>DEBUG-ITEM</KEYWORD1>
- <KEYWORD1>DEBUG-LINE</KEYWORD1>
- <KEYWORD1>DEBUG-NAME</KEYWORD1>
- <KEYWORD1>DEBUG-SUB-1</KEYWORD1>
- <KEYWORD1>DEBUG-SUB-2</KEYWORD1>
- <KEYWORD1>DEBUG-SUB-3</KEYWORD1>
- <KEYWORD1>DEBUGGING</KEYWORD1>
- <KEYWORD1>DECIMAL-POINT</KEYWORD1>
- <KEYWORD1>DECLARATIVES</KEYWORD1>
- <KEYWORD1>DELETE</KEYWORD1>
- <KEYWORD1>DELIMITED</KEYWORD1>
- <KEYWORD1>DELIMITER</KEYWORD1>
- <KEYWORD1>DEPENDING</KEYWORD1>
- <KEYWORD1>DESCENDING</KEYWORD1>
- <KEYWORD1>DESTINATION</KEYWORD1>
- <KEYWORD1>DETAIL</KEYWORD1>
- <KEYWORD1>DISABLE</KEYWORD1>
- <KEYWORD1>DISK</KEYWORD1>
- <KEYWORD1>DISP</KEYWORD1>
- <KEYWORD1>DISPLAY</KEYWORD1>
- <KEYWORD1>DISPLAY-1</KEYWORD1>
- <KEYWORD1>DISPLAY-ST</KEYWORD1>
- <KEYWORD1>DIVIDE</KEYWORD1>
- <KEYWORD1>DIVISION</KEYWORD1>
- <KEYWORD1>DOWN</KEYWORD1>
- <KEYWORD1>DUPLICATES</KEYWORD1>
- <KEYWORD1>DYNAMIC</KEYWORD1>
-
- <KEYWORD1>ECHO</KEYWORD1>
- <KEYWORD1>EGCS</KEYWORD1>
- <KEYWORD1>EGI</KEYWORD1>
- <KEYWORD1>EJECT</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>EMI</KEYWORD1>
- <KEYWORD1>EMPTY-CHECK</KEYWORD1>
- <KEYWORD1>ENABLE</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>END-ACCEPT</KEYWORD1>
- <KEYWORD1>END-ADD</KEYWORD1>
- <KEYWORD1>END-CALL</KEYWORD1>
- <KEYWORD1>END-CHAIN</KEYWORD1>
- <KEYWORD1>END-COMPUTE</KEYWORD1>
- <KEYWORD1>END-DELETE</KEYWORD1>
- <KEYWORD1>END-DISPLAY</KEYWORD1>
- <KEYWORD1>END-DIVIDE</KEYWORD1>
- <KEYWORD1>END-EVALUATE</KEYWORD1>
- <KEYWORD1>END-IF</KEYWORD1>
- <KEYWORD1>END-INVOKE</KEYWORD1>
- <KEYWORD1>END-MULTIPLY</KEYWORD1>
- <KEYWORD1>END-OF-PAGE</KEYWORD1>
- <KEYWORD1>END-PERFORM</KEYWORD1>
- <KEYWORD1>END-READ</KEYWORD1>
- <KEYWORD1>END-RECEIVE</KEYWORD1>
- <KEYWORD1>END-RETURN</KEYWORD1>
- <KEYWORD1>END-REWRITE</KEYWORD1>
- <KEYWORD1>END-SEARCH</KEYWORD1>
- <KEYWORD1>END-START</KEYWORD1>
- <KEYWORD1>END-STRING</KEYWORD1>
- <KEYWORD1>END-SUBTRACT</KEYWORD1>
- <KEYWORD1>END-UNSTRING</KEYWORD1>
- <KEYWORD1>END-WRITE</KEYWORD1>
- <KEYWORD1>ENDING</KEYWORD1>
- <KEYWORD1>ENTER</KEYWORD1>
- <KEYWORD1>ENTRY</KEYWORD1>
- <KEYWORD1>ENVIRONMENT</KEYWORD1>
- <KEYWORD1>EOL</KEYWORD1>
- <KEYWORD1>EOP</KEYWORD1>
- <KEYWORD1>EOS</KEYWORD1>
- <KEYWORD1>EQUAL</KEYWORD1>
- <KEYWORD1>EQUALS</KEYWORD1>
- <KEYWORD1>ERASE</KEYWORD1>
- <KEYWORD1>ERROR</KEYWORD1>
- <KEYWORD1>ESCAPE</KEYWORD1>
- <KEYWORD1>ESI</KEYWORD1>
- <KEYWORD1>EVALUATE</KEYWORD1>
- <KEYWORD1>EVERY</KEYWORD1>
- <KEYWORD1>EXAMINE</KEYWORD1>
- <KEYWORD1>EXCEEDS</KEYWORD1>
- <KEYWORD1>EXCEPTION</KEYWORD1>
- <KEYWORD1>EXCESS-3</KEYWORD1>
- <KEYWORD1>EXCLUSIVE</KEYWORD1>
- <KEYWORD1>EXEC</KEYWORD1>
- <KEYWORD1>EXECUTE</KEYWORD1>
- <KEYWORD1>EXHIBIT</KEYWORD1>
- <KEYWORD1>EXIT</KEYWORD1>
- <KEYWORD1>EXTEND</KEYWORD1>
- <KEYWORD1>EXTENDED-SEARCH</KEYWORD1>
- <KEYWORD1>EXTERNAL</KEYWORD1>
-
- <KEYWORD1>FACTORY</KEYWORD1>
- <KEYWORD1>FALSE</KEYWORD1>
- <KEYWORD1>FD</KEYWORD1>
- <KEYWORD1>FH-FCD</KEYWORD1>
- <KEYWORD1>FH-KEYDEF</KEYWORD1>
- <KEYWORD1>FILE</KEYWORD1>
- <KEYWORD1>FILE-CONTROL</KEYWORD1>
- <KEYWORD1>FILE-ID</KEYWORD1>
- <KEYWORD1>FILE-LIMIT</KEYWORD1>
- <KEYWORD1>FILE-LIMITS</KEYWORD1>
- <KEYWORD1>FILLER</KEYWORD1>
- <KEYWORD1>FINAL</KEYWORD1>
- <KEYWORD1>FIRST</KEYWORD1>
- <KEYWORD1>FIXED</KEYWORD1>
- <KEYWORD1>FOOTING</KEYWORD1>
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>FOREGROUND-COLOR</KEYWORD1>
- <KEYWORD1>FOREGROUND-COLOUR</KEYWORD1>
- <KEYWORD1>FROM</KEYWORD1>
- <KEYWORD1>FULL</KEYWORD1>
- <KEYWORD1>FUNCTION</KEYWORD1>
-
- <KEYWORD1>GENERATE</KEYWORD1>
- <KEYWORD1>GIVING</KEYWORD1>
- <KEYWORD1>GLOBAL</KEYWORD1>
- <KEYWORD1>GO</KEYWORD1>
- <KEYWORD1>GOBACK</KEYWORD1>
- <KEYWORD1>GREATER</KEYWORD1>
- <KEYWORD1>GRID</KEYWORD1>
- <KEYWORD1>GROUP</KEYWORD1>
-
- <KEYWORD1>HEADING</KEYWORD1>
- <KEYWORD1>HIGH</KEYWORD1>
- <KEYWORD1>HIGH-VALUE</KEYWORD1>
- <KEYWORD1>HIGH-VALUES</KEYWORD1>
- <KEYWORD1>HIGHLIGHT</KEYWORD1>
-
- <KEYWORD1>I-O</KEYWORD1>
- <KEYWORD1>I-O-CONTROL</KEYWORD1>
- <KEYWORD1>ID</KEYWORD1>
- <KEYWORD1>IDENTIFICATION</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>IGNORE</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>INDEX</KEYWORD1>
- <KEYWORD1>INDEXED</KEYWORD1>
- <KEYWORD1>INDICATE</KEYWORD1>
- <KEYWORD1>INHERITING</KEYWORD1>
- <KEYWORD1>INITIAL</KEYWORD1>
- <KEYWORD1>INITIALIZE</KEYWORD1>
- <KEYWORD1>INITIATE</KEYWORD1>
- <KEYWORD1>INPUT</KEYWORD1>
- <KEYWORD1>INPUT-OUTPUT</KEYWORD1>
- <KEYWORD1>INSERT</KEYWORD1>
- <KEYWORD1>INSPECT</KEYWORD1>
- <KEYWORD1>INSTALLATION</KEYWORD1>
- <KEYWORD1>INTO</KEYWORD1>
- <KEYWORD1>INVALID</KEYWORD1>
- <KEYWORD1>INVOKE</KEYWORD1>
- <KEYWORD1>IS</KEYWORD1>
-
- <KEYWORD1>JAPANESE</KEYWORD1>
- <KEYWORD1>JUST</KEYWORD1>
- <KEYWORD1>JUSTIFIED</KEYWORD1>
-
- <KEYWORD1>KANJI</KEYWORD1>
- <KEYWORD1>KEPT</KEYWORD1>
- <KEYWORD1>KEY</KEYWORD1>
- <KEYWORD1>KEYBOARD</KEYWORD1>
-
- <KEYWORD1>LABEL</KEYWORD1>
- <KEYWORD1>LAST</KEYWORD1>
- <KEYWORD1>LEADING</KEYWORD1>
- <KEYWORD1>LEAVE</KEYWORD1>
- <KEYWORD1>LEFT</KEYWORD1>
- <KEYWORD1>LEFT-JUSTIFY</KEYWORD1>
- <KEYWORD1>LEFTLINE</KEYWORD1>
- <KEYWORD1>LENGTH</KEYWORD1>
- <KEYWORD1>LENGTH-CHECK</KEYWORD1>
- <KEYWORD1>LESS</KEYWORD1>
- <KEYWORD1>LIMIT</KEYWORD1>
- <KEYWORD1>LIMITS</KEYWORD1>
- <KEYWORD1>LIN</KEYWORD1>
- <KEYWORD1>LINAGE</KEYWORD1>
- <KEYWORD1>LINAGE-COUNTER</KEYWORD1>
- <KEYWORD1>LINE</KEYWORD1>
- <KEYWORD1>LINE-COUNTER</KEYWORD1>
- <KEYWORD1>LINES</KEYWORD1>
- <KEYWORD1>LINKAGE</KEYWORD1>
- <KEYWORD1>LOCAL-STORAGE</KEYWORD1>
- <KEYWORD1>LOCK</KEYWORD1>
- <KEYWORD1>LOCKING</KEYWORD1>
- <KEYWORD1>LOW</KEYWORD1>
- <KEYWORD1>LOW-VALUE</KEYWORD1>
- <KEYWORD1>LOW-VALUES</KEYWORD1>
- <KEYWORD1>LOWER</KEYWORD1>
- <KEYWORD1>LOWLIGHT</KEYWORD1>
-
- <KEYWORD1>MANUAL</KEYWORD1>
- <KEYWORD1>MASTER-INDEX</KEYWORD1>
- <KEYWORD1>MEMORY</KEYWORD1>
- <KEYWORD1>MERGE</KEYWORD1>
- <KEYWORD1>MESSAGE</KEYWORD1>
- <KEYWORD1>METHOD</KEYWORD1>
- <KEYWORD1>MODE</KEYWORD1>
- <KEYWORD1>MODULES</KEYWORD1>
- <KEYWORD1>MORE-LABELS</KEYWORD1>
- <KEYWORD1>MOVE</KEYWORD1>
- <KEYWORD1>MULTIPLE</KEYWORD1>
- <KEYWORD1>MULTIPLY</KEYWORD1>
-
- <KEYWORD1>NAME</KEYWORD1>
- <KEYWORD1>NAMED</KEYWORD1>
- <KEYWORD1>NATIONAL</KEYWORD1>
- <KEYWORD1>NATIONAL-EDITED</KEYWORD1>
- <KEYWORD1>NATIVE</KEYWORD1>
- <KEYWORD1>NCHAR</KEYWORD1>
- <KEYWORD1>NEGATIVE</KEYWORD1>
- <KEYWORD1>NEXT</KEYWORD1>
- <KEYWORD1>NO</KEYWORD1>
- <KEYWORD1>NO-ECHO</KEYWORD1>
- <KEYWORD1>NOMINAL</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>NOTE</KEYWORD1>
- <KEYWORD1>NSTD-REELS</KEYWORD1>
- <KEYWORD1>NULL</KEYWORD1>
- <KEYWORD1>NULLS</KEYWORD1>
- <KEYWORD1>NUMBER</KEYWORD1>
- <KEYWORD1>NUMERIC</KEYWORD1>
- <KEYWORD1>NUMERIC-EDITED</KEYWORD1>
-
- <KEYWORD1>OBJECT</KEYWORD1>
- <KEYWORD1>OBJECT-COMPUTER</KEYWORD1>
- <KEYWORD1>OBJECT-STORAGE</KEYWORD1>
- <KEYWORD1>OCCURS</KEYWORD1>
- <KEYWORD1>OF</KEYWORD1>
- <KEYWORD1>OFF</KEYWORD1>
- <KEYWORD1>OMITTED</KEYWORD1>
- <KEYWORD1>ON</KEYWORD1>
- <KEYWORD1>OOSTACKPTR</KEYWORD1>
- <KEYWORD1>OPEN</KEYWORD1>
- <KEYWORD1>OPTIONAL</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>ORDER</KEYWORD1>
- <KEYWORD1>ORGANIZATION</KEYWORD1>
- <KEYWORD1>OTHER</KEYWORD1>
- <KEYWORD1>OTHERWISE</KEYWORD1>
- <KEYWORD1>OUTPUT</KEYWORD1>
- <KEYWORD1>OVERFLOW</KEYWORD1>
- <KEYWORD1>OVERLINE</KEYWORD1>
-
- <KEYWORD1>PACKED-DECIMAL</KEYWORD1>
- <KEYWORD1>PADDING</KEYWORD1>
- <KEYWORD1>PAGE</KEYWORD1>
- <KEYWORD1>PAGE-COUNTER</KEYWORD1>
- <KEYWORD1>PARAGRAPH</KEYWORD1>
- <KEYWORD1>PASSWORD</KEYWORD1>
- <KEYWORD1>PERFORM</KEYWORD1>
- <KEYWORD1>PF</KEYWORD1>
- <KEYWORD1>PH</KEYWORD1>
- <KEYWORD1>PIC</KEYWORD1>
- <KEYWORD1>PICTURE</KEYWORD1>
- <KEYWORD1>PLUS</KEYWORD1>
- <KEYWORD1>POINTER</KEYWORD1>
- <KEYWORD1>POS</KEYWORD1>
- <KEYWORD1>POSITION</KEYWORD1>
- <KEYWORD1>POSITIONING</KEYWORD1>
- <KEYWORD1>POSITIVE</KEYWORD1>
- <KEYWORD1>PREVIOUS</KEYWORD1>
- <KEYWORD1>PRINT</KEYWORD1>
- <KEYWORD1>PRINT-SWITCH</KEYWORD1>
- <KEYWORD1>PRINTER</KEYWORD1>
- <KEYWORD1>PRINTER-1</KEYWORD1>
- <KEYWORD1>PRINTING</KEYWORD1>
- <KEYWORD1>PRIVATE</KEYWORD1>
- <KEYWORD1>PROCEDURE</KEYWORD1>
- <KEYWORD1>PROCEDURE-POINTER</KEYWORD1>
- <KEYWORD1>PROCEDURES</KEYWORD1>
- <KEYWORD1>PROCEED</KEYWORD1>
- <KEYWORD1>PROCESSING</KEYWORD1>
- <KEYWORD1>PROGRAM</KEYWORD1>
- <KEYWORD1>PROGRAM-ID</KEYWORD1>
- <KEYWORD1>PROMPT</KEYWORD1>
- <KEYWORD1>PROTECTED</KEYWORD1>
- <KEYWORD1>PUBLIC</KEYWORD1>
- <KEYWORD1>PURGE</KEYWORD1>
-
- <KEYWORD1>QUEUE</KEYWORD1>
- <KEYWORD1>QUOTE</KEYWORD1>
- <KEYWORD1>QUOTES</KEYWORD1>
-
- <KEYWORD1>RANDOM</KEYWORD1>
- <KEYWORD1>RANGE</KEYWORD1>
- <KEYWORD1>RD</KEYWORD1>
- <KEYWORD1>READ</KEYWORD1>
- <KEYWORD1>READY</KEYWORD1>
- <KEYWORD1>RECEIVE</KEYWORD1>
- <KEYWORD1>RECORD</KEYWORD1>
- <KEYWORD1>RECORD-OVERFLOW</KEYWORD1>
- <KEYWORD1>RECORDING</KEYWORD1>
- <KEYWORD1>RECORDS</KEYWORD1>
- <KEYWORD1>REDEFINES</KEYWORD1>
- <KEYWORD1>REEL</KEYWORD1>
- <KEYWORD1>REFERENCE</KEYWORD1>
- <KEYWORD1>REFERENCES</KEYWORD1>
- <KEYWORD1>RELATIVE</KEYWORD1>
- <KEYWORD1>RELEASE</KEYWORD1>
- <KEYWORD1>RELOAD</KEYWORD1>
- <KEYWORD1>REMAINDER</KEYWORD1>
- <KEYWORD1>REMARKS</KEYWORD1>
- <KEYWORD1>REMOVAL</KEYWORD1>
- <KEYWORD1>RENAMES</KEYWORD1>
- <KEYWORD1>REORG-CRITERIA</KEYWORD1>
- <KEYWORD1>REPLACE</KEYWORD1>
- <KEYWORD1>REPLACING</KEYWORD1>
- <KEYWORD1>REPORT</KEYWORD1>
- <KEYWORD1>REPORTING</KEYWORD1>
- <KEYWORD1>REPORTS</KEYWORD1>
- <KEYWORD1>REQUIRED</KEYWORD1>
- <KEYWORD1>REREAD</KEYWORD1>
- <KEYWORD1>RERUN</KEYWORD1>
- <KEYWORD1>RESERVE</KEYWORD1>
- <KEYWORD1>RESET</KEYWORD1>
- <KEYWORD1>RETURN</KEYWORD1>
- <KEYWORD1>RETURN-CODE</KEYWORD1>
- <KEYWORD1>RETURNING</KEYWORD1>
- <KEYWORD1>REVERSE</KEYWORD1>
- <KEYWORD1>REVERSE-VIDEO</KEYWORD1>
- <KEYWORD1>REVERSED</KEYWORD1>
- <KEYWORD1>REWIND</KEYWORD1>
- <KEYWORD1>REWRITE</KEYWORD1>
- <KEYWORD1>RF</KEYWORD1>
- <KEYWORD1>RH</KEYWORD1>
- <KEYWORD1>RIGHT</KEYWORD1>
- <KEYWORD1>RIGHT-JUSTIFY</KEYWORD1>
- <KEYWORD1>ROLLBACK</KEYWORD1>
- <KEYWORD1>ROUNDED</KEYWORD1>
- <KEYWORD1>RUN</KEYWORD1>
-
- <KEYWORD1>S01</KEYWORD1>
- <KEYWORD1>S02</KEYWORD1>
- <KEYWORD1>S03</KEYWORD1>
- <KEYWORD1>S04</KEYWORD1>
- <KEYWORD1>S05</KEYWORD1>
- <KEYWORD1>SAME</KEYWORD1>
- <KEYWORD1>SCREEN</KEYWORD1>
- <KEYWORD1>SD</KEYWORD1>
- <KEYWORD1>SEARCH</KEYWORD1>
- <KEYWORD1>SECTION</KEYWORD1>
- <KEYWORD1>SECURE</KEYWORD1>
- <KEYWORD1>SECURITY</KEYWORD1>
- <KEYWORD1>SEEK</KEYWORD1>
- <KEYWORD1>SEGMENT</KEYWORD1>
- <KEYWORD1>SEGMENT-LIMIT</KEYWORD1>
- <KEYWORD1>SELECT</KEYWORD1>
- <KEYWORD1>SELECTIVE</KEYWORD1>
- <KEYWORD1>SEND</KEYWORD1>
- <KEYWORD1>SENTENCE</KEYWORD1>
- <KEYWORD1>SEPARATE</KEYWORD1>
- <KEYWORD1>SEQUENCE</KEYWORD1>
- <KEYWORD1>SEQUENTIAL</KEYWORD1>
- <KEYWORD1>SERVICE</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>SHIFT-IN</KEYWORD1>
- <KEYWORD1>SHIFT-OUT</KEYWORD1>
- <KEYWORD1>SIGN</KEYWORD1>
- <KEYWORD1>SIZE</KEYWORD1>
- <KEYWORD1>SKIP1</KEYWORD1>
- <KEYWORD1>SKIP2</KEYWORD1>
- <KEYWORD1>SKIP3</KEYWORD1>
- <KEYWORD1>SORT</KEYWORD1>
- <KEYWORD1>SORT-CONTROL</KEYWORD1>
- <KEYWORD1>SORT-CORE-SIZE</KEYWORD1>
- <KEYWORD1>SORT-FILE-SIZE</KEYWORD1>
- <KEYWORD1>SORT-MERGE</KEYWORD1>
- <KEYWORD1>SORT-MESSAGE</KEYWORD1>
- <KEYWORD1>SORT-MODE-SIZE</KEYWORD1>
- <KEYWORD1>SORT-OPTION</KEYWORD1>
- <KEYWORD1>SORT-RETURN</KEYWORD1>
- <KEYWORD1>SOURCE</KEYWORD1>
- <KEYWORD1>SOURCE-COMPUTER</KEYWORD1>
- <KEYWORD1>SPACE</KEYWORD1>
- <KEYWORD1>SPACE-FILL</KEYWORD1>
- <KEYWORD1>SPACES</KEYWORD1>
- <KEYWORD1>SPECIAL-NAMES</KEYWORD1>
- <KEYWORD1>STANDARD</KEYWORD1>
- <KEYWORD1>STANDARD-1</KEYWORD1>
- <KEYWORD1>STANDARD-2</KEYWORD1>
- <KEYWORD1>START</KEYWORD1>
- <KEYWORD1>STATUS</KEYWORD1>
- <KEYWORD1>STOP</KEYWORD1>
- <KEYWORD1>STORE</KEYWORD1>
- <KEYWORD1>STRING</KEYWORD1>
- <KEYWORD1>SUB-QUEUE-1</KEYWORD1>
- <KEYWORD1>SUB-QUEUE-2</KEYWORD1>
- <KEYWORD1>SUB-QUEUE-3</KEYWORD1>
- <KEYWORD1>SUBTRACT</KEYWORD1>
- <KEYWORD1>SUM</KEYWORD1>
- <KEYWORD1>SUPER</KEYWORD1>
- <KEYWORD1>SUPPRESS</KEYWORD1>
- <KEYWORD1>SYMBOLIC</KEYWORD1>
- <KEYWORD1>SYNC</KEYWORD1>
- <KEYWORD1>SYNCHRONIZED</KEYWORD1>
- <KEYWORD1>SYSIN</KEYWORD1>
- <KEYWORD1>SYSIPT</KEYWORD1>
- <KEYWORD1>SYSLST</KEYWORD1>
- <KEYWORD1>SYSOUT</KEYWORD1>
- <KEYWORD1>SYSPCH</KEYWORD1>
- <KEYWORD1>SYSPUNCH</KEYWORD1>
-
- <KEYWORD1>TAB</KEYWORD1>
- <KEYWORD1>TABLE</KEYWORD1>
- <KEYWORD1>TALLY</KEYWORD1>
- <KEYWORD1>TALLYING</KEYWORD1>
- <KEYWORD1>TAPE</KEYWORD1>
- <KEYWORD1>TERMINAL</KEYWORD1>
- <KEYWORD1>TERMINATE</KEYWORD1>
- <KEYWORD1>TEST</KEYWORD1>
- <KEYWORD1>TEXT</KEYWORD1>
- <KEYWORD1>THAN</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>THROUGH</KEYWORD1>
- <KEYWORD1>THRU</KEYWORD1>
- <KEYWORD1>TIME</KEYWORD1>
- <KEYWORD1>TIME-OF-DAY</KEYWORD1>
- <KEYWORD1>TIME-OUT</KEYWORD1>
- <KEYWORD1>TIMEOUT</KEYWORD1>
- <KEYWORD1>TIMES</KEYWORD1>
- <KEYWORD1>TITLE</KEYWORD1>
- <KEYWORD1>TO</KEYWORD1>
- <KEYWORD1>TOP</KEYWORD1>
- <KEYWORD1>TOTALED</KEYWORD1>
- <KEYWORD1>TOTALING</KEYWORD1>
- <KEYWORD1>TRACE</KEYWORD1>
- <KEYWORD1>TRACK-AREA</KEYWORD1>
- <KEYWORD1>TRACK-LIMIT</KEYWORD1>
- <KEYWORD1>TRACKS</KEYWORD1>
- <KEYWORD1>TRAILING</KEYWORD1>
- <KEYWORD1>TRAILING-SIGN</KEYWORD1>
- <KEYWORD1>TRANSFORM</KEYWORD1>
- <KEYWORD1>TRUE</KEYWORD1>
- <KEYWORD1>TYPE</KEYWORD1>
- <KEYWORD1>TYPEDEF</KEYWORD1>
-
- <KEYWORD1>UNDERLINE</KEYWORD1>
- <KEYWORD1>UNEQUAL</KEYWORD1>
- <KEYWORD1>UNIT</KEYWORD1>
- <KEYWORD1>UNLOCK</KEYWORD1>
- <KEYWORD1>UNSTRING</KEYWORD1>
- <KEYWORD1>UNTIL</KEYWORD1>
- <KEYWORD1>UP</KEYWORD1>
- <KEYWORD1>UPDATE</KEYWORD1>
- <KEYWORD1>UPON</KEYWORD1>
- <KEYWORD1>UPPER</KEYWORD1>
- <KEYWORD1>UPSI-0</KEYWORD1>
- <KEYWORD1>UPSI-1</KEYWORD1>
- <KEYWORD1>UPSI-2</KEYWORD1>
- <KEYWORD1>UPSI-3</KEYWORD1>
- <KEYWORD1>UPSI-4</KEYWORD1>
- <KEYWORD1>UPSI-5</KEYWORD1>
- <KEYWORD1>UPSI-6</KEYWORD1>
- <KEYWORD1>UPSI-7</KEYWORD1>
- <KEYWORD1>USAGE</KEYWORD1>
- <KEYWORD1>USE</KEYWORD1>
- <KEYWORD1>USER</KEYWORD1>
- <KEYWORD1>USING</KEYWORD1>
-
- <KEYWORD1>VALUE</KEYWORD1>
- <KEYWORD1>VALUES</KEYWORD1>
- <KEYWORD1>VARIABLE</KEYWORD1>
- <KEYWORD1>VARYING</KEYWORD1>
-
- <KEYWORD1>WAIT</KEYWORD1>
- <KEYWORD1>WHEN</KEYWORD1>
- <KEYWORD1>WHEN-COMPILED</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>WORDS</KEYWORD1>
- <KEYWORD1>WORKING-STORAGE</KEYWORD1>
- <KEYWORD1>WRITE</KEYWORD1>
- <KEYWORD1>WRITE-ONLY</KEYWORD1>
- <KEYWORD1>WRITE-VERIFY</KEYWORD1>
-
- <KEYWORD1>ZERO</KEYWORD1>
- <KEYWORD1>ZERO-FILL</KEYWORD1>
- <KEYWORD1>ZEROES</KEYWORD1>
- <KEYWORD1>ZEROS</KEYWORD1>
-
- <KEYWORD2>ACOS</KEYWORD2>
- <KEYWORD2>ANNUITY</KEYWORD2>
- <KEYWORD2>ASIN</KEYWORD2>
- <KEYWORD2>ATAN</KEYWORD2>
- <KEYWORD2>CHAR</KEYWORD2>
- <KEYWORD2>COS</KEYWORD2>
- <KEYWORD2>CURRENT-DATE</KEYWORD2>
- <KEYWORD2>DATE-OF-INTEGER</KEYWORD2>
- <KEYWORD2>DAY-OF-INTEGER</KEYWORD2>
- <KEYWORD2>FACTORIAL</KEYWORD2>
- <KEYWORD2>INTEGER</KEYWORD2>
- <KEYWORD2>INTEGER-OF-DATE</KEYWORD2>
- <KEYWORD2>INTEGER-OF-DAY</KEYWORD2>
- <KEYWORD2>INTEGER-PART</KEYWORD2>
- <!-- <KEYWORD2>LENGTH</KEYWORD2> -->
- <KEYWORD2>LOG</KEYWORD2>
- <KEYWORD2>LOG10</KEYWORD2>
- <KEYWORD2>LOWER-CASE</KEYWORD2>
- <KEYWORD2>MAX</KEYWORD2>
- <KEYWORD2>MEAN</KEYWORD2>
- <KEYWORD2>MEDIAN</KEYWORD2>
- <KEYWORD2>MIDRANGE</KEYWORD2>
- <KEYWORD2>MIN</KEYWORD2>
- <KEYWORD2>MOD</KEYWORD2>
- <KEYWORD2>NUMVAL</KEYWORD2>
- <KEYWORD2>NUMVAL-C</KEYWORD2>
- <KEYWORD2>ORD</KEYWORD2>
- <KEYWORD2>ORD-MAX</KEYWORD2>
- <KEYWORD2>ORD-MIN</KEYWORD2>
- <KEYWORD2>PRESENT-VALUE</KEYWORD2>
- <KEYWORD2>RANDOM</KEYWORD2>
- <KEYWORD2>RANGE</KEYWORD2>
- <KEYWORD2>REM</KEYWORD2>
- <KEYWORD2>REVERSE</KEYWORD2>
- <KEYWORD2>SIN</KEYWORD2>
- <KEYWORD2>SQRT</KEYWORD2>
- <KEYWORD2>STANDARD-DEVIATION</KEYWORD2>
- <KEYWORD2>SUM</KEYWORD2>
- <KEYWORD2>TAN</KEYWORD2>
- <KEYWORD2>UPPER-CASE</KEYWORD2>
- <KEYWORD2>VARIANCE</KEYWORD2>
- <KEYWORD2>WHEN-COMPILED</KEYWORD2>
-
- <!-- Oracle/SQL - Reserved Words
- <KEYWORD3>ACCESS</KEYWORD3>
- <KEYWORD3>ADD</KEYWORD3>
- <KEYWORD3>ALL</KEYWORD3>
- <KEYWORD3>ALTER</KEYWORD3>
- <KEYWORD3>AND</KEYWORD3>
- <KEYWORD3>ANY</KEYWORD3>
- <KEYWORD3>ARRAYLEN</KEYWORD3>
- <KEYWORD3>AS</KEYWORD3>
- <KEYWORD3>ASC</KEYWORD3>
- <KEYWORD3>AUDIT</KEYWORD3>
- <KEYWORD3>BETWEEN</KEYWORD3>
- <KEYWORD3>BY</KEYWORD3>
- <KEYWORD3>CHAR</KEYWORD3>
- <KEYWORD3>CHECK</KEYWORD3>
- <KEYWORD3>CLUSTER</KEYWORD3>
- <KEYWORD3>COLUMN</KEYWORD3>
- <KEYWORD3>COMMENT</KEYWORD3>
- <KEYWORD3>COMPRESS</KEYWORD3>
- <KEYWORD3>CONNECT</KEYWORD3>
- <KEYWORD3>CREATE</KEYWORD3>
- <KEYWORD3>CURRENT</KEYWORD3>
- <KEYWORD3>DATE</KEYWORD3>
- <KEYWORD3>DECIMAL</KEYWORD3>
- <KEYWORD3>DEFAULT</KEYWORD3>
- <KEYWORD3>DELETE</KEYWORD3>
- <KEYWORD3>DESC</KEYWORD3>
- <KEYWORD3>DISTINCT</KEYWORD3>
- <KEYWORD3>DROP</KEYWORD3>
- <KEYWORD3>ELSE</KEYWORD3>
- <KEYWORD3>EXCLUSIVE</KEYWORD3>
- <KEYWORD3>EXEC</KEYWORD3>
- <KEYWORD3>END-EXEC</KEYWORD3>
- <KEYWORD3>EXISTS</KEYWORD3>
- <KEYWORD3>FILE</KEYWORD3>
- <KEYWORD3>FLOAT</KEYWORD3>
- <KEYWORD3>FOR</KEYWORD3>
- <KEYWORD3>FROM</KEYWORD3>
- <KEYWORD3>GRANT</KEYWORD3>
- <KEYWORD3>GROUP</KEYWORD3>
- <KEYWORD3>HAVING</KEYWORD3>
- <KEYWORD3>IDENTIFIED</KEYWORD3>
- <KEYWORD3>IMMEDIATE</KEYWORD3>
- <KEYWORD3>IN</KEYWORD3>
- <KEYWORD3>INCREMENT</KEYWORD3>
- <KEYWORD3>INDEX</KEYWORD3>
- <KEYWORD3>INITIAL</KEYWORD3>
- <KEYWORD3>INSERT</KEYWORD3>
- <KEYWORD3>INTEGER</KEYWORD3>
- <KEYWORD3>INTERSECT</KEYWORD3>
- <KEYWORD3>INTO</KEYWORD3>
- <KEYWORD3>IS</KEYWORD3>
- <KEYWORD3>LEVEL</KEYWORD3>
- <KEYWORD3>LIKE</KEYWORD3>
- <KEYWORD3>LOCK</KEYWORD3>
- <KEYWORD3>LONG</KEYWORD3>
- <KEYWORD3>MAXEXTENTS</KEYWORD3>
- <KEYWORD3>MINUS</KEYWORD3>
- <KEYWORD3>MODE</KEYWORD3>
- <KEYWORD3>MODIFY</KEYWORD3>
- <KEYWORD3>NOAUDIT</KEYWORD3>
- <KEYWORD3>NOCOMPRESS</KEYWORD3>
- <KEYWORD3>NOT</KEYWORD3>
- <KEYWORD3>NOTFOUND</KEYWORD3>
- <KEYWORD3>NOWAIT</KEYWORD3>
- <KEYWORD3>NULL</KEYWORD3>
- <KEYWORD3>NUMBER</KEYWORD3>
- <KEYWORD3>OF</KEYWORD3>
- <KEYWORD3>OFFLINE</KEYWORD3>
- <KEYWORD3>ON</KEYWORD3>
- <KEYWORD3>ONLINE</KEYWORD3>
- <KEYWORD3>OPTION</KEYWORD3>
- <KEYWORD3>OR</KEYWORD3>
- <KEYWORD3>ORDER</KEYWORD3>
- <KEYWORD3>PCTFREE</KEYWORD3>
- <KEYWORD3>PRIOR</KEYWORD3>
- <KEYWORD3>PRIVILEGES</KEYWORD3>
- <KEYWORD3>PUBLIC</KEYWORD3>
- <KEYWORD3>RAW</KEYWORD3>
- <KEYWORD3>RENAME</KEYWORD3>
- <KEYWORD3>RESOURCE</KEYWORD3>
- <KEYWORD3>REVOKE</KEYWORD3>
- <KEYWORD3>ROW</KEYWORD3>
- <KEYWORD3>ROWID</KEYWORD3>
- <KEYWORD3>ROWLABEL</KEYWORD3>
- <KEYWORD3>ROWNUM</KEYWORD3>
- <KEYWORD3>ROWS</KEYWORD3>
- <KEYWORD3>START</KEYWORD3>
- <KEYWORD3>SELECT</KEYWORD3>
- <KEYWORD3>SESSION</KEYWORD3>
- <KEYWORD3>SET</KEYWORD3>
- <KEYWORD3>SHARE</KEYWORD3>
- <KEYWORD3>SIZE</KEYWORD3>
- <KEYWORD3>SMALLINT</KEYWORD3>
- <KEYWORD3>SQLBUF</KEYWORD3>
- <KEYWORD3>SUCCESSFUL</KEYWORD3>
- <KEYWORD3>SYNONYM</KEYWORD3>
- <KEYWORD3>SYSDATE</KEYWORD3>
- <KEYWORD3>TABLE</KEYWORD3>
- <KEYWORD3>THEN</KEYWORD3>
- <KEYWORD3>TO</KEYWORD3>
- <KEYWORD3>TRIGGER</KEYWORD3>
- <KEYWORD3>UID</KEYWORD3>
- <KEYWORD3>UNION</KEYWORD3>
- <KEYWORD3>UNIQUE</KEYWORD3>
- <KEYWORD3>UPDATE</KEYWORD3>
- <KEYWORD3>USER</KEYWORD3>
- <KEYWORD3>VALIDATE</KEYWORD3>
- <KEYWORD3>VALUES</KEYWORD3>
- <KEYWORD3>VARCHAR</KEYWORD3>
- <KEYWORD3>VARCHAR2</KEYWORD3>
- <KEYWORD3>VIEW</KEYWORD3>
- <KEYWORD3>WHENEVER</KEYWORD3>
- <KEYWORD3>WHERE</KEYWORD3>
- <KEYWORD3>WITH</KEYWORD3>
- -->
-
- <!-- Oracle/SQL - Keywords
- <KEYWORD3>ADMIN</KEYWORD3>
- <KEYWORD3>AFTER</KEYWORD3>
- <KEYWORD3>ALLOCATE</KEYWORD3>
- <KEYWORD3>ANALYZE</KEYWORD3>
- <KEYWORD3>ARCHIVE</KEYWORD3>
- <KEYWORD3>ARCHIVELOG</KEYWORD3>
- <KEYWORD3>AUTHORIZATION</KEYWORD3>
- <KEYWORD3>AVG</KEYWORD3>
- <KEYWORD3>BACKUP</KEYWORD3>
- <KEYWORD3>BEGIN</KEYWORD3>
- <KEYWORD3>BECOME</KEYWORD3>
- <KEYWORD3>BEFORE</KEYWORD3>
- <KEYWORD3>BLOCK</KEYWORD3>
- <KEYWORD3>BODY</KEYWORD3>
- <KEYWORD3>CACHE</KEYWORD3>
- <KEYWORD3>CANCEL</KEYWORD3>
- <KEYWORD3>CASCADE</KEYWORD3>
- <KEYWORD3>CHANGE</KEYWORD3>
- <KEYWORD3>CHARACTER</KEYWORD3>
- <KEYWORD3>CHECKPOINT</KEYWORD3>
- <KEYWORD3>CLOSE</KEYWORD3>
- <KEYWORD3>COBOL</KEYWORD3>
- <KEYWORD3>COMMIT</KEYWORD3>
- <KEYWORD3>COMPILE</KEYWORD3>
- <KEYWORD3>CONSTRAINT</KEYWORD3>
- <KEYWORD3>CONSTRAINTS</KEYWORD3>
- <KEYWORD3>CONTENTS</KEYWORD3>
- <KEYWORD3>CONTINUE</KEYWORD3>
- <KEYWORD3>CONTROLFILE</KEYWORD3>
- <KEYWORD3>COUNT</KEYWORD3>
- <KEYWORD3>DBA</KEYWORD3>
- <KEYWORD3>CURSOR</KEYWORD3>
- <KEYWORD3>CYCLE</KEYWORD3>
- <KEYWORD3>DATABASE</KEYWORD3>
- <KEYWORD3>DATAFILE</KEYWORD3>
- <KEYWORD3>DEC</KEYWORD3>
- <KEYWORD3>DECLARE</KEYWORD3>
- <KEYWORD3>DISABLE</KEYWORD3>
- <KEYWORD3>DISMOUNT</KEYWORD3>
- <KEYWORD3>DOUBLE</KEYWORD3>
- <KEYWORD3>DUMP</KEYWORD3>
- <KEYWORD3>EACH</KEYWORD3>
- <KEYWORD3>ENABLE</KEYWORD3>
- <KEYWORD3>END</KEYWORD3>
- <KEYWORD3>ESCAPE</KEYWORD3>
- <KEYWORD3>EVENTS</KEYWORD3>
- <KEYWORD3>EXCEPT</KEYWORD3>
- <KEYWORD3>EXCEPTIONS</KEYWORD3>
- <KEYWORD3>EXEC</KEYWORD3>
- <KEYWORD3>EXPLAIN</KEYWORD3>
- <KEYWORD3>EXECUTE</KEYWORD3>
- <KEYWORD3>EXTENT</KEYWORD3>
- <KEYWORD3>EXTERNALLY</KEYWORD3>
- <KEYWORD3>FETCH</KEYWORD3>
- <KEYWORD3>FLUSH</KEYWORD3>
- <KEYWORD3>FREELIST</KEYWORD3>
- <KEYWORD3>FREELISTS</KEYWORD3>
- <KEYWORD3>FORCE</KEYWORD3>
- <KEYWORD3>FOREIGN</KEYWORD3>
- <KEYWORD3>FORTRAN</KEYWORD3>
- <KEYWORD3>FOUND</KEYWORD3>
- <KEYWORD3>FUNCTION</KEYWORD3>
- <KEYWORD3>GO</KEYWORD3>
- <KEYWORD3>GOTO</KEYWORD3>
- <KEYWORD3>GROUPS</KEYWORD3>
- <KEYWORD3>INCLUDING</KEYWORD3>
- <KEYWORD3>INDICATOR</KEYWORD3>
- <KEYWORD3>INITRANS</KEYWORD3>
- <KEYWORD3>INSTANCE</KEYWORD3>
- <KEYWORD3>INT</KEYWORD3>
- <KEYWORD3>KEY</KEYWORD3>
- <KEYWORD3>LANGUAGE</KEYWORD3>
- <KEYWORD3>LAYER</KEYWORD3>
- <KEYWORD3>LINK</KEYWORD3>
- <KEYWORD3>LISTS</KEYWORD3>
- <KEYWORD3>LOGFILE</KEYWORD3>
- <KEYWORD3>MANAGE</KEYWORD3>
- <KEYWORD3>MANUAL</KEYWORD3>
- <KEYWORD3>MAX</KEYWORD3>
- <KEYWORD3>MAXDATAFILES</KEYWORD3>
- <KEYWORD3>MAXINSTANCES</KEYWORD3>
- <KEYWORD3>MAXLOGFILES</KEYWORD3>
- <KEYWORD3>MAXLOGHISTORY</KEYWORD3>
- <KEYWORD3>MAXLOGMEMBERS</KEYWORD3>
- <KEYWORD3>MAXTRANS</KEYWORD3>
- <KEYWORD3>MAXVALUE</KEYWORD3>
- <KEYWORD3>MIN</KEYWORD3>
- <KEYWORD3>MINEXTENTS</KEYWORD3>
- <KEYWORD3>MINVALUE</KEYWORD3>
- <KEYWORD3>MODULE</KEYWORD3>
- <KEYWORD3>MOUNT</KEYWORD3>
- <KEYWORD3>NEXT</KEYWORD3>
- <KEYWORD3>NEW</KEYWORD3>
- <KEYWORD3>NOARCHIVELOG</KEYWORD3>
- <KEYWORD3>NOCACHE</KEYWORD3>
- <KEYWORD3>NOCYCLE</KEYWORD3>
- <KEYWORD3>NOMAXVALUE</KEYWORD3>
- <KEYWORD3>NOMINVALUE</KEYWORD3>
- <KEYWORD3>NONE</KEYWORD3>
- <KEYWORD3>NOORDER</KEYWORD3>
- <KEYWORD3>NORESETLOGS</KEYWORD3>
- <KEYWORD3>NORMAL</KEYWORD3>
- <KEYWORD3>NOSORT</KEYWORD3>
- <KEYWORD3>NUMERIC</KEYWORD3>
- <KEYWORD3>OFF</KEYWORD3>
- <KEYWORD3>OLD</KEYWORD3>
- <KEYWORD3>ONLY</KEYWORD3>
- <KEYWORD3>OPEN</KEYWORD3>
- <KEYWORD3>OPTIMAL</KEYWORD3>
- <KEYWORD3>OWN</KEYWORD3>
- <KEYWORD3>PACKAGE</KEYWORD3>
- <KEYWORD3>PARALLEL</KEYWORD3>
- <KEYWORD3>PCTINCREASE</KEYWORD3>
- <KEYWORD3>PCTUSED</KEYWORD3>
- <KEYWORD3>PLAN</KEYWORD3>
- <KEYWORD3>PLI</KEYWORD3>
- <KEYWORD3>PRECISION</KEYWORD3>
- <KEYWORD3>PRIMARY</KEYWORD3>
- <KEYWORD3>PRIVATE</KEYWORD3>
- <KEYWORD3>PROCEDURE</KEYWORD3>
- <KEYWORD3>PROFILE</KEYWORD3>
- <KEYWORD3>QUOTA</KEYWORD3>
- <KEYWORD3>READ</KEYWORD3>
- <KEYWORD3>REAL</KEYWORD3>
- <KEYWORD3>RECOVER</KEYWORD3>
- <KEYWORD3>REFERENCES</KEYWORD3>
- <KEYWORD3>REFERENCING</KEYWORD3>
- <KEYWORD3>RESETLOGS</KEYWORD3>
- <KEYWORD3>RESTRICTED</KEYWORD3>
- <KEYWORD3>REUSE</KEYWORD3>
- <KEYWORD3>ROLE</KEYWORD3>
- <KEYWORD3>ROLES</KEYWORD3>
- <KEYWORD3>ROLLBACK</KEYWORD3>
- <KEYWORD3>SAVEPOINT</KEYWORD3>
- <KEYWORD3>SCHEMA</KEYWORD3>
- <KEYWORD3>SCN</KEYWORD3>
- <KEYWORD3>SECTION</KEYWORD3>
- <KEYWORD3>SEGMENT</KEYWORD3>
- <KEYWORD3>SEQUENCE</KEYWORD3>
- <KEYWORD3>SHARED</KEYWORD3>
- <KEYWORD3>SNAPSHOT</KEYWORD3>
- <KEYWORD3>SOME</KEYWORD3>
- <KEYWORD3>SORT</KEYWORD3>
- <KEYWORD3>SQL</KEYWORD3>
- <KEYWORD3>SQLCODE</KEYWORD3>
- <KEYWORD3>SQLERROR</KEYWORD3>
- <KEYWORD3>SQLSTATE</KEYWORD3>
- <KEYWORD3>STATEMENT_ID</KEYWORD3>
- <KEYWORD3>STATISTICS</KEYWORD3>
- <KEYWORD3>STOP</KEYWORD3>
- <KEYWORD3>STORAGE</KEYWORD3>
- <KEYWORD3>SUM</KEYWORD3>
- <KEYWORD3>SWITCH</KEYWORD3>
- <KEYWORD3>SYSTEM</KEYWORD3>
- <KEYWORD3>TABLES</KEYWORD3>
- <KEYWORD3>TABLESPACE</KEYWORD3>
- <KEYWORD3>TEMPORARY</KEYWORD3>
- <KEYWORD3>THREAD</KEYWORD3>
- <KEYWORD3>TIME</KEYWORD3>
- <KEYWORD3>TRACING</KEYWORD3>
- <KEYWORD3>TRANSACTION</KEYWORD3>
- <KEYWORD3>TRIGGERS</KEYWORD3>
- <KEYWORD3>TRUNCATE</KEYWORD3>
- <KEYWORD3>UNDER</KEYWORD3>
- <KEYWORD3>UNLIMITED</KEYWORD3>
- <KEYWORD3>UNTIL</KEYWORD3>
- <KEYWORD3>USE</KEYWORD3>
- <KEYWORD3>USING</KEYWORD3>
- <KEYWORD3>WHEN</KEYWORD3>
- <KEYWORD3>WRITE</KEYWORD3>
- <KEYWORD3>WORK</KEYWORD3>
- -->
-
- <LITERAL2>[COPY-PREFIX]</LITERAL2>
- <LITERAL2>[COUNT]</LITERAL2>
- <LITERAL2>[DISPLAY]</LITERAL2>
- <LITERAL2>[EXECUTE]</LITERAL2>
- <LITERAL2>[PG]</LITERAL2>
- <LITERAL2>[PREFIX]</LITERAL2>
- <LITERAL2>[PROGRAM]</LITERAL2>
- <LITERAL2>[SPECIAL-PREFIX]</LITERAL2>
- <LITERAL2>[TESTCASE]</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- COBOL mode, by Matthias M. Schneider -->
+<MODE>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <EOL_SPAN_REGEXP TYPE="COMMENT1" AT_LINE_START="TRUE">.{6}(\*|/)</EOL_SPAN_REGEXP>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR"> = </SEQ>
+ <SEQ TYPE="OPERATOR"> >= </SEQ>
+ <SEQ TYPE="OPERATOR"> <= </SEQ>
+ <SEQ TYPE="OPERATOR"> + </SEQ>
+ <SEQ TYPE="OPERATOR"> - </SEQ>
+ <SEQ TYPE="OPERATOR"> / </SEQ>
+ <SEQ TYPE="OPERATOR"> * </SEQ>
+ <SEQ TYPE="OPERATOR"> ** </SEQ>
+ <SEQ TYPE="OPERATOR"> > </SEQ>
+ <SEQ TYPE="OPERATOR"> < </SEQ>
+ <SEQ TYPE="OPERATOR"> % </SEQ>
+ <SEQ TYPE="OPERATOR"> & </SEQ>
+ <SEQ TYPE="OPERATOR"> | </SEQ>
+ <SEQ TYPE="OPERATOR"> ^ </SEQ>
+ <SEQ TYPE="OPERATOR"> ~ </SEQ>
+
+ <SPAN TYPE="COMMENT2" NO_LINE_BREAK="FALSE">
+ <BEGIN>EXEC SQL</BEGIN>
+ <END>END-EXEC</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <KEYWORD1>ACCEPT</KEYWORD1>
+ <KEYWORD1>ACCESS</KEYWORD1>
+ <KEYWORD1>ACTUAL</KEYWORD1>
+ <KEYWORD1>ADD</KEYWORD1>
+ <KEYWORD1>ADDRESS</KEYWORD1>
+ <KEYWORD1>ADVANCING</KEYWORD1>
+ <KEYWORD1>AFTER</KEYWORD1>
+ <KEYWORD1>ALL</KEYWORD1>
+ <KEYWORD1>ALPHABET</KEYWORD1>
+ <KEYWORD1>ALPHABETIC</KEYWORD1>
+ <KEYWORD1>ALPHABETIC-LOWER</KEYWORD1>
+ <KEYWORD1>ALPHABETIC-UPPER</KEYWORD1>
+ <KEYWORD1>ALPHANUMERIC</KEYWORD1>
+ <KEYWORD1>ALPHANUMERIC-EDITED</KEYWORD1>
+ <KEYWORD1>ALSO</KEYWORD1>
+ <KEYWORD1>ALTER</KEYWORD1>
+ <KEYWORD1>ALTERNATE</KEYWORD1>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>ANY</KEYWORD1>
+ <KEYWORD1>API</KEYWORD1>
+ <KEYWORD1>APPLY</KEYWORD1>
+ <KEYWORD1>ARE</KEYWORD1>
+ <KEYWORD1>AREA</KEYWORD1>
+ <KEYWORD1>AREAS</KEYWORD1>
+ <KEYWORD1>ASCENDING</KEYWORD1>
+ <KEYWORD1>ASSIGN</KEYWORD1>
+ <KEYWORD1>AT</KEYWORD1>
+ <KEYWORD1>AUTHOR</KEYWORD1>
+ <KEYWORD1>AUTO</KEYWORD1>
+ <KEYWORD1>AUTO-SKIP</KEYWORD1>
+ <KEYWORD1>AUTOMATIC</KEYWORD1>
+
+ <KEYWORD1>BACKGROUND-COLOR</KEYWORD1>
+ <KEYWORD1>BACKGROUND-COLOUR</KEYWORD1>
+ <KEYWORD1>BACKWARD</KEYWORD1>
+ <KEYWORD1>BASIS</KEYWORD1>
+ <KEYWORD1>BEEP</KEYWORD1>
+ <KEYWORD1>BEFORE</KEYWORD1>
+ <KEYWORD1>BEGINNING</KEYWORD1>
+ <KEYWORD1>BELL</KEYWORD1>
+ <KEYWORD1>BINARY</KEYWORD1>
+ <KEYWORD1>BLANK</KEYWORD1>
+ <KEYWORD1>BLINK</KEYWORD1>
+ <KEYWORD1>BLOCK</KEYWORD1>
+ <KEYWORD1>BOTTOM</KEYWORD1>
+ <KEYWORD1>BY</KEYWORD1>
+
+ <KEYWORD1>C01</KEYWORD1>
+ <KEYWORD1>C02</KEYWORD1>
+ <KEYWORD1>C03</KEYWORD1>
+ <KEYWORD1>C04</KEYWORD1>
+ <KEYWORD1>C05</KEYWORD1>
+ <KEYWORD1>C06</KEYWORD1>
+ <KEYWORD1>C07</KEYWORD1>
+ <KEYWORD1>C08</KEYWORD1>
+ <KEYWORD1>C09</KEYWORD1>
+ <KEYWORD1>C10</KEYWORD1>
+ <KEYWORD1>C11</KEYWORD1>
+ <KEYWORD1>C12</KEYWORD1>
+ <KEYWORD1>CALL</KEYWORD1>
+ <KEYWORD1>CALL-CONVENTION</KEYWORD1>
+ <KEYWORD1>CANCEL</KEYWORD1>
+ <KEYWORD1>CBL</KEYWORD1>
+ <KEYWORD1>CD</KEYWORD1>
+ <KEYWORD1>CF</KEYWORD1>
+ <KEYWORD1>CH</KEYWORD1>
+ <KEYWORD1>CHAIN</KEYWORD1>
+ <KEYWORD1>CHAINING</KEYWORD1>
+ <KEYWORD1>CHANGED</KEYWORD1>
+ <KEYWORD1>CHARACTER</KEYWORD1>
+ <KEYWORD1>CHARACTERS</KEYWORD1>
+ <KEYWORD1>CLASS</KEYWORD1>
+ <KEYWORD1>CLOCK-UNITS</KEYWORD1>
+ <KEYWORD1>CLOSE</KEYWORD1>
+ <KEYWORD1>COBOL</KEYWORD1>
+ <KEYWORD1>CODE</KEYWORD1>
+ <KEYWORD1>CODE-SET</KEYWORD1>
+ <KEYWORD1>COL</KEYWORD1>
+ <KEYWORD1>COLLATING</KEYWORD1>
+ <KEYWORD1>COLUMN</KEYWORD1>
+ <KEYWORD1>COM-REG</KEYWORD1>
+ <KEYWORD1>COMMA</KEYWORD1>
+ <KEYWORD1>COMMIT</KEYWORD1>
+ <KEYWORD1>COMMON</KEYWORD1>
+ <KEYWORD1>COMMUNICATION</KEYWORD1>
+ <KEYWORD1>COMP</KEYWORD1>
+ <KEYWORD1>COMP-0</KEYWORD1>
+ <KEYWORD1>COMP-1</KEYWORD1>
+ <KEYWORD1>COMP-2</KEYWORD1>
+ <KEYWORD1>COMP-3</KEYWORD1>
+ <KEYWORD1>COMP-4</KEYWORD1>
+ <KEYWORD1>COMP-5</KEYWORD1>
+ <KEYWORD1>COMP-6</KEYWORD1>
+ <KEYWORD1>COMP-X</KEYWORD1>
+ <KEYWORD1>COMPUTATIONAL</KEYWORD1>
+ <KEYWORD1>COMPUTATIONAL-0</KEYWORD1>
+ <KEYWORD1>COMPUTATIONAL-1</KEYWORD1>
+ <KEYWORD1>COMPUTATIONAL-2</KEYWORD1>
+ <KEYWORD1>COMPUTATIONAL-3</KEYWORD1>
+ <KEYWORD1>COMPUTATIONAL-4</KEYWORD1>
+ <KEYWORD1>COMPUTATIONAL-5</KEYWORD1>
+ <KEYWORD1>COMPUTATIONAL-6</KEYWORD1>
+ <KEYWORD1>COMPUTATIONAL-X</KEYWORD1>
+ <KEYWORD1>COMPUTE</KEYWORD1>
+ <KEYWORD1>CONFIGURATION</KEYWORD1>
+ <KEYWORD1>CONSOLE</KEYWORD1>
+ <KEYWORD1>CONTAINS</KEYWORD1>
+ <KEYWORD1>CONTENT</KEYWORD1>
+ <KEYWORD1>CONTINUE</KEYWORD1>
+ <KEYWORD1>CONTROL</KEYWORD1>
+ <KEYWORD1>CONTROLS</KEYWORD1>
+ <KEYWORD1>CONVERTING</KEYWORD1>
+ <KEYWORD1>COPY</KEYWORD1>
+ <KEYWORD1>CORE-INDEX</KEYWORD1>
+ <KEYWORD1>CORR</KEYWORD1>
+ <KEYWORD1>CORRESPONDING</KEYWORD1>
+ <KEYWORD1>COUNT</KEYWORD1>
+ <KEYWORD1>CRT</KEYWORD1>
+ <KEYWORD1>CRT-UNDER</KEYWORD1>
+ <KEYWORD1>CURRENCY</KEYWORD1>
+ <KEYWORD1>CURRENT-DATE</KEYWORD1>
+ <KEYWORD1>CURSOR</KEYWORD1>
+ <KEYWORD1>CYCLE</KEYWORD1>
+ <KEYWORD1>CYL-INDEX</KEYWORD1>
+ <KEYWORD1>CYL-OVERFLOW</KEYWORD1>
+
+ <KEYWORD1>DATA</KEYWORD1>
+ <KEYWORD1>DATE</KEYWORD1>
+ <KEYWORD1>DATE-COMPILED</KEYWORD1>
+ <KEYWORD1>DATE-WRITTEN</KEYWORD1>
+ <KEYWORD1>DAY</KEYWORD1>
+ <KEYWORD1>DAY-OF-WEEK</KEYWORD1>
+ <KEYWORD1>DBCS</KEYWORD1>
+ <KEYWORD1>DE</KEYWORD1>
+ <KEYWORD1>DEBUG</KEYWORD1>
+ <KEYWORD1>DEBUG-CONTENTS</KEYWORD1>
+ <KEYWORD1>DEBUG-ITEM</KEYWORD1>
+ <KEYWORD1>DEBUG-LINE</KEYWORD1>
+ <KEYWORD1>DEBUG-NAME</KEYWORD1>
+ <KEYWORD1>DEBUG-SUB-1</KEYWORD1>
+ <KEYWORD1>DEBUG-SUB-2</KEYWORD1>
+ <KEYWORD1>DEBUG-SUB-3</KEYWORD1>
+ <KEYWORD1>DEBUGGING</KEYWORD1>
+ <KEYWORD1>DECIMAL-POINT</KEYWORD1>
+ <KEYWORD1>DECLARATIVES</KEYWORD1>
+ <KEYWORD1>DELETE</KEYWORD1>
+ <KEYWORD1>DELIMITED</KEYWORD1>
+ <KEYWORD1>DELIMITER</KEYWORD1>
+ <KEYWORD1>DEPENDING</KEYWORD1>
+ <KEYWORD1>DESCENDING</KEYWORD1>
+ <KEYWORD1>DESTINATION</KEYWORD1>
+ <KEYWORD1>DETAIL</KEYWORD1>
+ <KEYWORD1>DISABLE</KEYWORD1>
+ <KEYWORD1>DISK</KEYWORD1>
+ <KEYWORD1>DISP</KEYWORD1>
+ <KEYWORD1>DISPLAY</KEYWORD1>
+ <KEYWORD1>DISPLAY-1</KEYWORD1>
+ <KEYWORD1>DISPLAY-ST</KEYWORD1>
+ <KEYWORD1>DIVIDE</KEYWORD1>
+ <KEYWORD1>DIVISION</KEYWORD1>
+ <KEYWORD1>DOWN</KEYWORD1>
+ <KEYWORD1>DUPLICATES</KEYWORD1>
+ <KEYWORD1>DYNAMIC</KEYWORD1>
+
+ <KEYWORD1>ECHO</KEYWORD1>
+ <KEYWORD1>EGCS</KEYWORD1>
+ <KEYWORD1>EGI</KEYWORD1>
+ <KEYWORD1>EJECT</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>EMI</KEYWORD1>
+ <KEYWORD1>EMPTY-CHECK</KEYWORD1>
+ <KEYWORD1>ENABLE</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>END-ACCEPT</KEYWORD1>
+ <KEYWORD1>END-ADD</KEYWORD1>
+ <KEYWORD1>END-CALL</KEYWORD1>
+ <KEYWORD1>END-CHAIN</KEYWORD1>
+ <KEYWORD1>END-COMPUTE</KEYWORD1>
+ <KEYWORD1>END-DELETE</KEYWORD1>
+ <KEYWORD1>END-DISPLAY</KEYWORD1>
+ <KEYWORD1>END-DIVIDE</KEYWORD1>
+ <KEYWORD1>END-EVALUATE</KEYWORD1>
+ <KEYWORD1>END-IF</KEYWORD1>
+ <KEYWORD1>END-INVOKE</KEYWORD1>
+ <KEYWORD1>END-MULTIPLY</KEYWORD1>
+ <KEYWORD1>END-OF-PAGE</KEYWORD1>
+ <KEYWORD1>END-PERFORM</KEYWORD1>
+ <KEYWORD1>END-READ</KEYWORD1>
+ <KEYWORD1>END-RECEIVE</KEYWORD1>
+ <KEYWORD1>END-RETURN</KEYWORD1>
+ <KEYWORD1>END-REWRITE</KEYWORD1>
+ <KEYWORD1>END-SEARCH</KEYWORD1>
+ <KEYWORD1>END-START</KEYWORD1>
+ <KEYWORD1>END-STRING</KEYWORD1>
+ <KEYWORD1>END-SUBTRACT</KEYWORD1>
+ <KEYWORD1>END-UNSTRING</KEYWORD1>
+ <KEYWORD1>END-WRITE</KEYWORD1>
+ <KEYWORD1>ENDING</KEYWORD1>
+ <KEYWORD1>ENTER</KEYWORD1>
+ <KEYWORD1>ENTRY</KEYWORD1>
+ <KEYWORD1>ENVIRONMENT</KEYWORD1>
+ <KEYWORD1>EOL</KEYWORD1>
+ <KEYWORD1>EOP</KEYWORD1>
+ <KEYWORD1>EOS</KEYWORD1>
+ <KEYWORD1>EQUAL</KEYWORD1>
+ <KEYWORD1>EQUALS</KEYWORD1>
+ <KEYWORD1>ERASE</KEYWORD1>
+ <KEYWORD1>ERROR</KEYWORD1>
+ <KEYWORD1>ESCAPE</KEYWORD1>
+ <KEYWORD1>ESI</KEYWORD1>
+ <KEYWORD1>EVALUATE</KEYWORD1>
+ <KEYWORD1>EVERY</KEYWORD1>
+ <KEYWORD1>EXAMINE</KEYWORD1>
+ <KEYWORD1>EXCEEDS</KEYWORD1>
+ <KEYWORD1>EXCEPTION</KEYWORD1>
+ <KEYWORD1>EXCESS-3</KEYWORD1>
+ <KEYWORD1>EXCLUSIVE</KEYWORD1>
+ <KEYWORD1>EXEC</KEYWORD1>
+ <KEYWORD1>EXECUTE</KEYWORD1>
+ <KEYWORD1>EXHIBIT</KEYWORD1>
+ <KEYWORD1>EXIT</KEYWORD1>
+ <KEYWORD1>EXTEND</KEYWORD1>
+ <KEYWORD1>EXTENDED-SEARCH</KEYWORD1>
+ <KEYWORD1>EXTERNAL</KEYWORD1>
+
+ <KEYWORD1>FACTORY</KEYWORD1>
+ <KEYWORD1>FALSE</KEYWORD1>
+ <KEYWORD1>FD</KEYWORD1>
+ <KEYWORD1>FH-FCD</KEYWORD1>
+ <KEYWORD1>FH-KEYDEF</KEYWORD1>
+ <KEYWORD1>FILE</KEYWORD1>
+ <KEYWORD1>FILE-CONTROL</KEYWORD1>
+ <KEYWORD1>FILE-ID</KEYWORD1>
+ <KEYWORD1>FILE-LIMIT</KEYWORD1>
+ <KEYWORD1>FILE-LIMITS</KEYWORD1>
+ <KEYWORD1>FILLER</KEYWORD1>
+ <KEYWORD1>FINAL</KEYWORD1>
+ <KEYWORD1>FIRST</KEYWORD1>
+ <KEYWORD1>FIXED</KEYWORD1>
+ <KEYWORD1>FOOTING</KEYWORD1>
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>FOREGROUND-COLOR</KEYWORD1>
+ <KEYWORD1>FOREGROUND-COLOUR</KEYWORD1>
+ <KEYWORD1>FROM</KEYWORD1>
+ <KEYWORD1>FULL</KEYWORD1>
+ <KEYWORD1>FUNCTION</KEYWORD1>
+
+ <KEYWORD1>GENERATE</KEYWORD1>
+ <KEYWORD1>GIVING</KEYWORD1>
+ <KEYWORD1>GLOBAL</KEYWORD1>
+ <KEYWORD1>GO</KEYWORD1>
+ <KEYWORD1>GOBACK</KEYWORD1>
+ <KEYWORD1>GREATER</KEYWORD1>
+ <KEYWORD1>GRID</KEYWORD1>
+ <KEYWORD1>GROUP</KEYWORD1>
+
+ <KEYWORD1>HEADING</KEYWORD1>
+ <KEYWORD1>HIGH</KEYWORD1>
+ <KEYWORD1>HIGH-VALUE</KEYWORD1>
+ <KEYWORD1>HIGH-VALUES</KEYWORD1>
+ <KEYWORD1>HIGHLIGHT</KEYWORD1>
+
+ <KEYWORD1>I-O</KEYWORD1>
+ <KEYWORD1>I-O-CONTROL</KEYWORD1>
+ <KEYWORD1>ID</KEYWORD1>
+ <KEYWORD1>IDENTIFICATION</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>IGNORE</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>INDEX</KEYWORD1>
+ <KEYWORD1>INDEXED</KEYWORD1>
+ <KEYWORD1>INDICATE</KEYWORD1>
+ <KEYWORD1>INHERITING</KEYWORD1>
+ <KEYWORD1>INITIAL</KEYWORD1>
+ <KEYWORD1>INITIALIZE</KEYWORD1>
+ <KEYWORD1>INITIATE</KEYWORD1>
+ <KEYWORD1>INPUT</KEYWORD1>
+ <KEYWORD1>INPUT-OUTPUT</KEYWORD1>
+ <KEYWORD1>INSERT</KEYWORD1>
+ <KEYWORD1>INSPECT</KEYWORD1>
+ <KEYWORD1>INSTALLATION</KEYWORD1>
+ <KEYWORD1>INTO</KEYWORD1>
+ <KEYWORD1>INVALID</KEYWORD1>
+ <KEYWORD1>INVOKE</KEYWORD1>
+ <KEYWORD1>IS</KEYWORD1>
+
+ <KEYWORD1>JAPANESE</KEYWORD1>
+ <KEYWORD1>JUST</KEYWORD1>
+ <KEYWORD1>JUSTIFIED</KEYWORD1>
+
+ <KEYWORD1>KANJI</KEYWORD1>
+ <KEYWORD1>KEPT</KEYWORD1>
+ <KEYWORD1>KEY</KEYWORD1>
+ <KEYWORD1>KEYBOARD</KEYWORD1>
+
+ <KEYWORD1>LABEL</KEYWORD1>
+ <KEYWORD1>LAST</KEYWORD1>
+ <KEYWORD1>LEADING</KEYWORD1>
+ <KEYWORD1>LEAVE</KEYWORD1>
+ <KEYWORD1>LEFT</KEYWORD1>
+ <KEYWORD1>LEFT-JUSTIFY</KEYWORD1>
+ <KEYWORD1>LEFTLINE</KEYWORD1>
+ <KEYWORD1>LENGTH</KEYWORD1>
+ <KEYWORD1>LENGTH-CHECK</KEYWORD1>
+ <KEYWORD1>LESS</KEYWORD1>
+ <KEYWORD1>LIMIT</KEYWORD1>
+ <KEYWORD1>LIMITS</KEYWORD1>
+ <KEYWORD1>LIN</KEYWORD1>
+ <KEYWORD1>LINAGE</KEYWORD1>
+ <KEYWORD1>LINAGE-COUNTER</KEYWORD1>
+ <KEYWORD1>LINE</KEYWORD1>
+ <KEYWORD1>LINE-COUNTER</KEYWORD1>
+ <KEYWORD1>LINES</KEYWORD1>
+ <KEYWORD1>LINKAGE</KEYWORD1>
+ <KEYWORD1>LOCAL-STORAGE</KEYWORD1>
+ <KEYWORD1>LOCK</KEYWORD1>
+ <KEYWORD1>LOCKING</KEYWORD1>
+ <KEYWORD1>LOW</KEYWORD1>
+ <KEYWORD1>LOW-VALUE</KEYWORD1>
+ <KEYWORD1>LOW-VALUES</KEYWORD1>
+ <KEYWORD1>LOWER</KEYWORD1>
+ <KEYWORD1>LOWLIGHT</KEYWORD1>
+
+ <KEYWORD1>MANUAL</KEYWORD1>
+ <KEYWORD1>MASTER-INDEX</KEYWORD1>
+ <KEYWORD1>MEMORY</KEYWORD1>
+ <KEYWORD1>MERGE</KEYWORD1>
+ <KEYWORD1>MESSAGE</KEYWORD1>
+ <KEYWORD1>METHOD</KEYWORD1>
+ <KEYWORD1>MODE</KEYWORD1>
+ <KEYWORD1>MODULES</KEYWORD1>
+ <KEYWORD1>MORE-LABELS</KEYWORD1>
+ <KEYWORD1>MOVE</KEYWORD1>
+ <KEYWORD1>MULTIPLE</KEYWORD1>
+ <KEYWORD1>MULTIPLY</KEYWORD1>
+
+ <KEYWORD1>NAME</KEYWORD1>
+ <KEYWORD1>NAMED</KEYWORD1>
+ <KEYWORD1>NATIONAL</KEYWORD1>
+ <KEYWORD1>NATIONAL-EDITED</KEYWORD1>
+ <KEYWORD1>NATIVE</KEYWORD1>
+ <KEYWORD1>NCHAR</KEYWORD1>
+ <KEYWORD1>NEGATIVE</KEYWORD1>
+ <KEYWORD1>NEXT</KEYWORD1>
+ <KEYWORD1>NO</KEYWORD1>
+ <KEYWORD1>NO-ECHO</KEYWORD1>
+ <KEYWORD1>NOMINAL</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>NOTE</KEYWORD1>
+ <KEYWORD1>NSTD-REELS</KEYWORD1>
+ <KEYWORD1>NULL</KEYWORD1>
+ <KEYWORD1>NULLS</KEYWORD1>
+ <KEYWORD1>NUMBER</KEYWORD1>
+ <KEYWORD1>NUMERIC</KEYWORD1>
+ <KEYWORD1>NUMERIC-EDITED</KEYWORD1>
+
+ <KEYWORD1>OBJECT</KEYWORD1>
+ <KEYWORD1>OBJECT-COMPUTER</KEYWORD1>
+ <KEYWORD1>OBJECT-STORAGE</KEYWORD1>
+ <KEYWORD1>OCCURS</KEYWORD1>
+ <KEYWORD1>OF</KEYWORD1>
+ <KEYWORD1>OFF</KEYWORD1>
+ <KEYWORD1>OMITTED</KEYWORD1>
+ <KEYWORD1>ON</KEYWORD1>
+ <KEYWORD1>OOSTACKPTR</KEYWORD1>
+ <KEYWORD1>OPEN</KEYWORD1>
+ <KEYWORD1>OPTIONAL</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>ORDER</KEYWORD1>
+ <KEYWORD1>ORGANIZATION</KEYWORD1>
+ <KEYWORD1>OTHER</KEYWORD1>
+ <KEYWORD1>OTHERWISE</KEYWORD1>
+ <KEYWORD1>OUTPUT</KEYWORD1>
+ <KEYWORD1>OVERFLOW</KEYWORD1>
+ <KEYWORD1>OVERLINE</KEYWORD1>
+
+ <KEYWORD1>PACKED-DECIMAL</KEYWORD1>
+ <KEYWORD1>PADDING</KEYWORD1>
+ <KEYWORD1>PAGE</KEYWORD1>
+ <KEYWORD1>PAGE-COUNTER</KEYWORD1>
+ <KEYWORD1>PARAGRAPH</KEYWORD1>
+ <KEYWORD1>PASSWORD</KEYWORD1>
+ <KEYWORD1>PERFORM</KEYWORD1>
+ <KEYWORD1>PF</KEYWORD1>
+ <KEYWORD1>PH</KEYWORD1>
+ <KEYWORD1>PIC</KEYWORD1>
+ <KEYWORD1>PICTURE</KEYWORD1>
+ <KEYWORD1>PLUS</KEYWORD1>
+ <KEYWORD1>POINTER</KEYWORD1>
+ <KEYWORD1>POS</KEYWORD1>
+ <KEYWORD1>POSITION</KEYWORD1>
+ <KEYWORD1>POSITIONING</KEYWORD1>
+ <KEYWORD1>POSITIVE</KEYWORD1>
+ <KEYWORD1>PREVIOUS</KEYWORD1>
+ <KEYWORD1>PRINT</KEYWORD1>
+ <KEYWORD1>PRINT-SWITCH</KEYWORD1>
+ <KEYWORD1>PRINTER</KEYWORD1>
+ <KEYWORD1>PRINTER-1</KEYWORD1>
+ <KEYWORD1>PRINTING</KEYWORD1>
+ <KEYWORD1>PRIVATE</KEYWORD1>
+ <KEYWORD1>PROCEDURE</KEYWORD1>
+ <KEYWORD1>PROCEDURE-POINTER</KEYWORD1>
+ <KEYWORD1>PROCEDURES</KEYWORD1>
+ <KEYWORD1>PROCEED</KEYWORD1>
+ <KEYWORD1>PROCESSING</KEYWORD1>
+ <KEYWORD1>PROGRAM</KEYWORD1>
+ <KEYWORD1>PROGRAM-ID</KEYWORD1>
+ <KEYWORD1>PROMPT</KEYWORD1>
+ <KEYWORD1>PROTECTED</KEYWORD1>
+ <KEYWORD1>PUBLIC</KEYWORD1>
+ <KEYWORD1>PURGE</KEYWORD1>
+
+ <KEYWORD1>QUEUE</KEYWORD1>
+ <KEYWORD1>QUOTE</KEYWORD1>
+ <KEYWORD1>QUOTES</KEYWORD1>
+
+ <KEYWORD1>RANDOM</KEYWORD1>
+ <KEYWORD1>RANGE</KEYWORD1>
+ <KEYWORD1>RD</KEYWORD1>
+ <KEYWORD1>READ</KEYWORD1>
+ <KEYWORD1>READY</KEYWORD1>
+ <KEYWORD1>RECEIVE</KEYWORD1>
+ <KEYWORD1>RECORD</KEYWORD1>
+ <KEYWORD1>RECORD-OVERFLOW</KEYWORD1>
+ <KEYWORD1>RECORDING</KEYWORD1>
+ <KEYWORD1>RECORDS</KEYWORD1>
+ <KEYWORD1>REDEFINES</KEYWORD1>
+ <KEYWORD1>REEL</KEYWORD1>
+ <KEYWORD1>REFERENCE</KEYWORD1>
+ <KEYWORD1>REFERENCES</KEYWORD1>
+ <KEYWORD1>RELATIVE</KEYWORD1>
+ <KEYWORD1>RELEASE</KEYWORD1>
+ <KEYWORD1>RELOAD</KEYWORD1>
+ <KEYWORD1>REMAINDER</KEYWORD1>
+ <KEYWORD1>REMARKS</KEYWORD1>
+ <KEYWORD1>REMOVAL</KEYWORD1>
+ <KEYWORD1>RENAMES</KEYWORD1>
+ <KEYWORD1>REORG-CRITERIA</KEYWORD1>
+ <KEYWORD1>REPLACE</KEYWORD1>
+ <KEYWORD1>REPLACING</KEYWORD1>
+ <KEYWORD1>REPORT</KEYWORD1>
+ <KEYWORD1>REPORTING</KEYWORD1>
+ <KEYWORD1>REPORTS</KEYWORD1>
+ <KEYWORD1>REQUIRED</KEYWORD1>
+ <KEYWORD1>REREAD</KEYWORD1>
+ <KEYWORD1>RERUN</KEYWORD1>
+ <KEYWORD1>RESERVE</KEYWORD1>
+ <KEYWORD1>RESET</KEYWORD1>
+ <KEYWORD1>RETURN</KEYWORD1>
+ <KEYWORD1>RETURN-CODE</KEYWORD1>
+ <KEYWORD1>RETURNING</KEYWORD1>
+ <KEYWORD1>REVERSE</KEYWORD1>
+ <KEYWORD1>REVERSE-VIDEO</KEYWORD1>
+ <KEYWORD1>REVERSED</KEYWORD1>
+ <KEYWORD1>REWIND</KEYWORD1>
+ <KEYWORD1>REWRITE</KEYWORD1>
+ <KEYWORD1>RF</KEYWORD1>
+ <KEYWORD1>RH</KEYWORD1>
+ <KEYWORD1>RIGHT</KEYWORD1>
+ <KEYWORD1>RIGHT-JUSTIFY</KEYWORD1>
+ <KEYWORD1>ROLLBACK</KEYWORD1>
+ <KEYWORD1>ROUNDED</KEYWORD1>
+ <KEYWORD1>RUN</KEYWORD1>
+
+ <KEYWORD1>S01</KEYWORD1>
+ <KEYWORD1>S02</KEYWORD1>
+ <KEYWORD1>S03</KEYWORD1>
+ <KEYWORD1>S04</KEYWORD1>
+ <KEYWORD1>S05</KEYWORD1>
+ <KEYWORD1>SAME</KEYWORD1>
+ <KEYWORD1>SCREEN</KEYWORD1>
+ <KEYWORD1>SD</KEYWORD1>
+ <KEYWORD1>SEARCH</KEYWORD1>
+ <KEYWORD1>SECTION</KEYWORD1>
+ <KEYWORD1>SECURE</KEYWORD1>
+ <KEYWORD1>SECURITY</KEYWORD1>
+ <KEYWORD1>SEEK</KEYWORD1>
+ <KEYWORD1>SEGMENT</KEYWORD1>
+ <KEYWORD1>SEGMENT-LIMIT</KEYWORD1>
+ <KEYWORD1>SELECT</KEYWORD1>
+ <KEYWORD1>SELECTIVE</KEYWORD1>
+ <KEYWORD1>SEND</KEYWORD1>
+ <KEYWORD1>SENTENCE</KEYWORD1>
+ <KEYWORD1>SEPARATE</KEYWORD1>
+ <KEYWORD1>SEQUENCE</KEYWORD1>
+ <KEYWORD1>SEQUENTIAL</KEYWORD1>
+ <KEYWORD1>SERVICE</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>SHIFT-IN</KEYWORD1>
+ <KEYWORD1>SHIFT-OUT</KEYWORD1>
+ <KEYWORD1>SIGN</KEYWORD1>
+ <KEYWORD1>SIZE</KEYWORD1>
+ <KEYWORD1>SKIP1</KEYWORD1>
+ <KEYWORD1>SKIP2</KEYWORD1>
+ <KEYWORD1>SKIP3</KEYWORD1>
+ <KEYWORD1>SORT</KEYWORD1>
+ <KEYWORD1>SORT-CONTROL</KEYWORD1>
+ <KEYWORD1>SORT-CORE-SIZE</KEYWORD1>
+ <KEYWORD1>SORT-FILE-SIZE</KEYWORD1>
+ <KEYWORD1>SORT-MERGE</KEYWORD1>
+ <KEYWORD1>SORT-MESSAGE</KEYWORD1>
+ <KEYWORD1>SORT-MODE-SIZE</KEYWORD1>
+ <KEYWORD1>SORT-OPTION</KEYWORD1>
+ <KEYWORD1>SORT-RETURN</KEYWORD1>
+ <KEYWORD1>SOURCE</KEYWORD1>
+ <KEYWORD1>SOURCE-COMPUTER</KEYWORD1>
+ <KEYWORD1>SPACE</KEYWORD1>
+ <KEYWORD1>SPACE-FILL</KEYWORD1>
+ <KEYWORD1>SPACES</KEYWORD1>
+ <KEYWORD1>SPECIAL-NAMES</KEYWORD1>
+ <KEYWORD1>STANDARD</KEYWORD1>
+ <KEYWORD1>STANDARD-1</KEYWORD1>
+ <KEYWORD1>STANDARD-2</KEYWORD1>
+ <KEYWORD1>START</KEYWORD1>
+ <KEYWORD1>STATUS</KEYWORD1>
+ <KEYWORD1>STOP</KEYWORD1>
+ <KEYWORD1>STORE</KEYWORD1>
+ <KEYWORD1>STRING</KEYWORD1>
+ <KEYWORD1>SUB-QUEUE-1</KEYWORD1>
+ <KEYWORD1>SUB-QUEUE-2</KEYWORD1>
+ <KEYWORD1>SUB-QUEUE-3</KEYWORD1>
+ <KEYWORD1>SUBTRACT</KEYWORD1>
+ <KEYWORD1>SUM</KEYWORD1>
+ <KEYWORD1>SUPER</KEYWORD1>
+ <KEYWORD1>SUPPRESS</KEYWORD1>
+ <KEYWORD1>SYMBOLIC</KEYWORD1>
+ <KEYWORD1>SYNC</KEYWORD1>
+ <KEYWORD1>SYNCHRONIZED</KEYWORD1>
+ <KEYWORD1>SYSIN</KEYWORD1>
+ <KEYWORD1>SYSIPT</KEYWORD1>
+ <KEYWORD1>SYSLST</KEYWORD1>
+ <KEYWORD1>SYSOUT</KEYWORD1>
+ <KEYWORD1>SYSPCH</KEYWORD1>
+ <KEYWORD1>SYSPUNCH</KEYWORD1>
+
+ <KEYWORD1>TAB</KEYWORD1>
+ <KEYWORD1>TABLE</KEYWORD1>
+ <KEYWORD1>TALLY</KEYWORD1>
+ <KEYWORD1>TALLYING</KEYWORD1>
+ <KEYWORD1>TAPE</KEYWORD1>
+ <KEYWORD1>TERMINAL</KEYWORD1>
+ <KEYWORD1>TERMINATE</KEYWORD1>
+ <KEYWORD1>TEST</KEYWORD1>
+ <KEYWORD1>TEXT</KEYWORD1>
+ <KEYWORD1>THAN</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>THROUGH</KEYWORD1>
+ <KEYWORD1>THRU</KEYWORD1>
+ <KEYWORD1>TIME</KEYWORD1>
+ <KEYWORD1>TIME-OF-DAY</KEYWORD1>
+ <KEYWORD1>TIME-OUT</KEYWORD1>
+ <KEYWORD1>TIMEOUT</KEYWORD1>
+ <KEYWORD1>TIMES</KEYWORD1>
+ <KEYWORD1>TITLE</KEYWORD1>
+ <KEYWORD1>TO</KEYWORD1>
+ <KEYWORD1>TOP</KEYWORD1>
+ <KEYWORD1>TOTALED</KEYWORD1>
+ <KEYWORD1>TOTALING</KEYWORD1>
+ <KEYWORD1>TRACE</KEYWORD1>
+ <KEYWORD1>TRACK-AREA</KEYWORD1>
+ <KEYWORD1>TRACK-LIMIT</KEYWORD1>
+ <KEYWORD1>TRACKS</KEYWORD1>
+ <KEYWORD1>TRAILING</KEYWORD1>
+ <KEYWORD1>TRAILING-SIGN</KEYWORD1>
+ <KEYWORD1>TRANSFORM</KEYWORD1>
+ <KEYWORD1>TRUE</KEYWORD1>
+ <KEYWORD1>TYPE</KEYWORD1>
+ <KEYWORD1>TYPEDEF</KEYWORD1>
+
+ <KEYWORD1>UNDERLINE</KEYWORD1>
+ <KEYWORD1>UNEQUAL</KEYWORD1>
+ <KEYWORD1>UNIT</KEYWORD1>
+ <KEYWORD1>UNLOCK</KEYWORD1>
+ <KEYWORD1>UNSTRING</KEYWORD1>
+ <KEYWORD1>UNTIL</KEYWORD1>
+ <KEYWORD1>UP</KEYWORD1>
+ <KEYWORD1>UPDATE</KEYWORD1>
+ <KEYWORD1>UPON</KEYWORD1>
+ <KEYWORD1>UPPER</KEYWORD1>
+ <KEYWORD1>UPSI-0</KEYWORD1>
+ <KEYWORD1>UPSI-1</KEYWORD1>
+ <KEYWORD1>UPSI-2</KEYWORD1>
+ <KEYWORD1>UPSI-3</KEYWORD1>
+ <KEYWORD1>UPSI-4</KEYWORD1>
+ <KEYWORD1>UPSI-5</KEYWORD1>
+ <KEYWORD1>UPSI-6</KEYWORD1>
+ <KEYWORD1>UPSI-7</KEYWORD1>
+ <KEYWORD1>USAGE</KEYWORD1>
+ <KEYWORD1>USE</KEYWORD1>
+ <KEYWORD1>USER</KEYWORD1>
+ <KEYWORD1>USING</KEYWORD1>
+
+ <KEYWORD1>VALUE</KEYWORD1>
+ <KEYWORD1>VALUES</KEYWORD1>
+ <KEYWORD1>VARIABLE</KEYWORD1>
+ <KEYWORD1>VARYING</KEYWORD1>
+
+ <KEYWORD1>WAIT</KEYWORD1>
+ <KEYWORD1>WHEN</KEYWORD1>
+ <KEYWORD1>WHEN-COMPILED</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>WORDS</KEYWORD1>
+ <KEYWORD1>WORKING-STORAGE</KEYWORD1>
+ <KEYWORD1>WRITE</KEYWORD1>
+ <KEYWORD1>WRITE-ONLY</KEYWORD1>
+ <KEYWORD1>WRITE-VERIFY</KEYWORD1>
+
+ <KEYWORD1>ZERO</KEYWORD1>
+ <KEYWORD1>ZERO-FILL</KEYWORD1>
+ <KEYWORD1>ZEROES</KEYWORD1>
+ <KEYWORD1>ZEROS</KEYWORD1>
+
+ <KEYWORD2>ACOS</KEYWORD2>
+ <KEYWORD2>ANNUITY</KEYWORD2>
+ <KEYWORD2>ASIN</KEYWORD2>
+ <KEYWORD2>ATAN</KEYWORD2>
+ <KEYWORD2>CHAR</KEYWORD2>
+ <KEYWORD2>COS</KEYWORD2>
+ <KEYWORD2>CURRENT-DATE</KEYWORD2>
+ <KEYWORD2>DATE-OF-INTEGER</KEYWORD2>
+ <KEYWORD2>DAY-OF-INTEGER</KEYWORD2>
+ <KEYWORD2>FACTORIAL</KEYWORD2>
+ <KEYWORD2>INTEGER</KEYWORD2>
+ <KEYWORD2>INTEGER-OF-DATE</KEYWORD2>
+ <KEYWORD2>INTEGER-OF-DAY</KEYWORD2>
+ <KEYWORD2>INTEGER-PART</KEYWORD2>
+ <!-- <KEYWORD2>LENGTH</KEYWORD2> -->
+ <KEYWORD2>LOG</KEYWORD2>
+ <KEYWORD2>LOG10</KEYWORD2>
+ <KEYWORD2>LOWER-CASE</KEYWORD2>
+ <KEYWORD2>MAX</KEYWORD2>
+ <KEYWORD2>MEAN</KEYWORD2>
+ <KEYWORD2>MEDIAN</KEYWORD2>
+ <KEYWORD2>MIDRANGE</KEYWORD2>
+ <KEYWORD2>MIN</KEYWORD2>
+ <KEYWORD2>MOD</KEYWORD2>
+ <KEYWORD2>NUMVAL</KEYWORD2>
+ <KEYWORD2>NUMVAL-C</KEYWORD2>
+ <KEYWORD2>ORD</KEYWORD2>
+ <KEYWORD2>ORD-MAX</KEYWORD2>
+ <KEYWORD2>ORD-MIN</KEYWORD2>
+ <KEYWORD2>PRESENT-VALUE</KEYWORD2>
+ <KEYWORD2>RANDOM</KEYWORD2>
+ <KEYWORD2>RANGE</KEYWORD2>
+ <KEYWORD2>REM</KEYWORD2>
+ <KEYWORD2>REVERSE</KEYWORD2>
+ <KEYWORD2>SIN</KEYWORD2>
+ <KEYWORD2>SQRT</KEYWORD2>
+ <KEYWORD2>STANDARD-DEVIATION</KEYWORD2>
+ <KEYWORD2>SUM</KEYWORD2>
+ <KEYWORD2>TAN</KEYWORD2>
+ <KEYWORD2>UPPER-CASE</KEYWORD2>
+ <KEYWORD2>VARIANCE</KEYWORD2>
+ <KEYWORD2>WHEN-COMPILED</KEYWORD2>
+
+ <!-- Oracle/SQL - Reserved Words
+ <KEYWORD3>ACCESS</KEYWORD3>
+ <KEYWORD3>ADD</KEYWORD3>
+ <KEYWORD3>ALL</KEYWORD3>
+ <KEYWORD3>ALTER</KEYWORD3>
+ <KEYWORD3>AND</KEYWORD3>
+ <KEYWORD3>ANY</KEYWORD3>
+ <KEYWORD3>ARRAYLEN</KEYWORD3>
+ <KEYWORD3>AS</KEYWORD3>
+ <KEYWORD3>ASC</KEYWORD3>
+ <KEYWORD3>AUDIT</KEYWORD3>
+ <KEYWORD3>BETWEEN</KEYWORD3>
+ <KEYWORD3>BY</KEYWORD3>
+ <KEYWORD3>CHAR</KEYWORD3>
+ <KEYWORD3>CHECK</KEYWORD3>
+ <KEYWORD3>CLUSTER</KEYWORD3>
+ <KEYWORD3>COLUMN</KEYWORD3>
+ <KEYWORD3>COMMENT</KEYWORD3>
+ <KEYWORD3>COMPRESS</KEYWORD3>
+ <KEYWORD3>CONNECT</KEYWORD3>
+ <KEYWORD3>CREATE</KEYWORD3>
+ <KEYWORD3>CURRENT</KEYWORD3>
+ <KEYWORD3>DATE</KEYWORD3>
+ <KEYWORD3>DECIMAL</KEYWORD3>
+ <KEYWORD3>DEFAULT</KEYWORD3>
+ <KEYWORD3>DELETE</KEYWORD3>
+ <KEYWORD3>DESC</KEYWORD3>
+ <KEYWORD3>DISTINCT</KEYWORD3>
+ <KEYWORD3>DROP</KEYWORD3>
+ <KEYWORD3>ELSE</KEYWORD3>
+ <KEYWORD3>EXCLUSIVE</KEYWORD3>
+ <KEYWORD3>EXEC</KEYWORD3>
+ <KEYWORD3>END-EXEC</KEYWORD3>
+ <KEYWORD3>EXISTS</KEYWORD3>
+ <KEYWORD3>FILE</KEYWORD3>
+ <KEYWORD3>FLOAT</KEYWORD3>
+ <KEYWORD3>FOR</KEYWORD3>
+ <KEYWORD3>FROM</KEYWORD3>
+ <KEYWORD3>GRANT</KEYWORD3>
+ <KEYWORD3>GROUP</KEYWORD3>
+ <KEYWORD3>HAVING</KEYWORD3>
+ <KEYWORD3>IDENTIFIED</KEYWORD3>
+ <KEYWORD3>IMMEDIATE</KEYWORD3>
+ <KEYWORD3>IN</KEYWORD3>
+ <KEYWORD3>INCREMENT</KEYWORD3>
+ <KEYWORD3>INDEX</KEYWORD3>
+ <KEYWORD3>INITIAL</KEYWORD3>
+ <KEYWORD3>INSERT</KEYWORD3>
+ <KEYWORD3>INTEGER</KEYWORD3>
+ <KEYWORD3>INTERSECT</KEYWORD3>
+ <KEYWORD3>INTO</KEYWORD3>
+ <KEYWORD3>IS</KEYWORD3>
+ <KEYWORD3>LEVEL</KEYWORD3>
+ <KEYWORD3>LIKE</KEYWORD3>
+ <KEYWORD3>LOCK</KEYWORD3>
+ <KEYWORD3>LONG</KEYWORD3>
+ <KEYWORD3>MAXEXTENTS</KEYWORD3>
+ <KEYWORD3>MINUS</KEYWORD3>
+ <KEYWORD3>MODE</KEYWORD3>
+ <KEYWORD3>MODIFY</KEYWORD3>
+ <KEYWORD3>NOAUDIT</KEYWORD3>
+ <KEYWORD3>NOCOMPRESS</KEYWORD3>
+ <KEYWORD3>NOT</KEYWORD3>
+ <KEYWORD3>NOTFOUND</KEYWORD3>
+ <KEYWORD3>NOWAIT</KEYWORD3>
+ <KEYWORD3>NULL</KEYWORD3>
+ <KEYWORD3>NUMBER</KEYWORD3>
+ <KEYWORD3>OF</KEYWORD3>
+ <KEYWORD3>OFFLINE</KEYWORD3>
+ <KEYWORD3>ON</KEYWORD3>
+ <KEYWORD3>ONLINE</KEYWORD3>
+ <KEYWORD3>OPTION</KEYWORD3>
+ <KEYWORD3>OR</KEYWORD3>
+ <KEYWORD3>ORDER</KEYWORD3>
+ <KEYWORD3>PCTFREE</KEYWORD3>
+ <KEYWORD3>PRIOR</KEYWORD3>
+ <KEYWORD3>PRIVILEGES</KEYWORD3>
+ <KEYWORD3>PUBLIC</KEYWORD3>
+ <KEYWORD3>RAW</KEYWORD3>
+ <KEYWORD3>RENAME</KEYWORD3>
+ <KEYWORD3>RESOURCE</KEYWORD3>
+ <KEYWORD3>REVOKE</KEYWORD3>
+ <KEYWORD3>ROW</KEYWORD3>
+ <KEYWORD3>ROWID</KEYWORD3>
+ <KEYWORD3>ROWLABEL</KEYWORD3>
+ <KEYWORD3>ROWNUM</KEYWORD3>
+ <KEYWORD3>ROWS</KEYWORD3>
+ <KEYWORD3>START</KEYWORD3>
+ <KEYWORD3>SELECT</KEYWORD3>
+ <KEYWORD3>SESSION</KEYWORD3>
+ <KEYWORD3>SET</KEYWORD3>
+ <KEYWORD3>SHARE</KEYWORD3>
+ <KEYWORD3>SIZE</KEYWORD3>
+ <KEYWORD3>SMALLINT</KEYWORD3>
+ <KEYWORD3>SQLBUF</KEYWORD3>
+ <KEYWORD3>SUCCESSFUL</KEYWORD3>
+ <KEYWORD3>SYNONYM</KEYWORD3>
+ <KEYWORD3>SYSDATE</KEYWORD3>
+ <KEYWORD3>TABLE</KEYWORD3>
+ <KEYWORD3>THEN</KEYWORD3>
+ <KEYWORD3>TO</KEYWORD3>
+ <KEYWORD3>TRIGGER</KEYWORD3>
+ <KEYWORD3>UID</KEYWORD3>
+ <KEYWORD3>UNION</KEYWORD3>
+ <KEYWORD3>UNIQUE</KEYWORD3>
+ <KEYWORD3>UPDATE</KEYWORD3>
+ <KEYWORD3>USER</KEYWORD3>
+ <KEYWORD3>VALIDATE</KEYWORD3>
+ <KEYWORD3>VALUES</KEYWORD3>
+ <KEYWORD3>VARCHAR</KEYWORD3>
+ <KEYWORD3>VARCHAR2</KEYWORD3>
+ <KEYWORD3>VIEW</KEYWORD3>
+ <KEYWORD3>WHENEVER</KEYWORD3>
+ <KEYWORD3>WHERE</KEYWORD3>
+ <KEYWORD3>WITH</KEYWORD3>
+ -->
+
+ <!-- Oracle/SQL - Keywords
+ <KEYWORD3>ADMIN</KEYWORD3>
+ <KEYWORD3>AFTER</KEYWORD3>
+ <KEYWORD3>ALLOCATE</KEYWORD3>
+ <KEYWORD3>ANALYZE</KEYWORD3>
+ <KEYWORD3>ARCHIVE</KEYWORD3>
+ <KEYWORD3>ARCHIVELOG</KEYWORD3>
+ <KEYWORD3>AUTHORIZATION</KEYWORD3>
+ <KEYWORD3>AVG</KEYWORD3>
+ <KEYWORD3>BACKUP</KEYWORD3>
+ <KEYWORD3>BEGIN</KEYWORD3>
+ <KEYWORD3>BECOME</KEYWORD3>
+ <KEYWORD3>BEFORE</KEYWORD3>
+ <KEYWORD3>BLOCK</KEYWORD3>
+ <KEYWORD3>BODY</KEYWORD3>
+ <KEYWORD3>CACHE</KEYWORD3>
+ <KEYWORD3>CANCEL</KEYWORD3>
+ <KEYWORD3>CASCADE</KEYWORD3>
+ <KEYWORD3>CHANGE</KEYWORD3>
+ <KEYWORD3>CHARACTER</KEYWORD3>
+ <KEYWORD3>CHECKPOINT</KEYWORD3>
+ <KEYWORD3>CLOSE</KEYWORD3>
+ <KEYWORD3>COBOL</KEYWORD3>
+ <KEYWORD3>COMMIT</KEYWORD3>
+ <KEYWORD3>COMPILE</KEYWORD3>
+ <KEYWORD3>CONSTRAINT</KEYWORD3>
+ <KEYWORD3>CONSTRAINTS</KEYWORD3>
+ <KEYWORD3>CONTENTS</KEYWORD3>
+ <KEYWORD3>CONTINUE</KEYWORD3>
+ <KEYWORD3>CONTROLFILE</KEYWORD3>
+ <KEYWORD3>COUNT</KEYWORD3>
+ <KEYWORD3>DBA</KEYWORD3>
+ <KEYWORD3>CURSOR</KEYWORD3>
+ <KEYWORD3>CYCLE</KEYWORD3>
+ <KEYWORD3>DATABASE</KEYWORD3>
+ <KEYWORD3>DATAFILE</KEYWORD3>
+ <KEYWORD3>DEC</KEYWORD3>
+ <KEYWORD3>DECLARE</KEYWORD3>
+ <KEYWORD3>DISABLE</KEYWORD3>
+ <KEYWORD3>DISMOUNT</KEYWORD3>
+ <KEYWORD3>DOUBLE</KEYWORD3>
+ <KEYWORD3>DUMP</KEYWORD3>
+ <KEYWORD3>EACH</KEYWORD3>
+ <KEYWORD3>ENABLE</KEYWORD3>
+ <KEYWORD3>END</KEYWORD3>
+ <KEYWORD3>ESCAPE</KEYWORD3>
+ <KEYWORD3>EVENTS</KEYWORD3>
+ <KEYWORD3>EXCEPT</KEYWORD3>
+ <KEYWORD3>EXCEPTIONS</KEYWORD3>
+ <KEYWORD3>EXEC</KEYWORD3>
+ <KEYWORD3>EXPLAIN</KEYWORD3>
+ <KEYWORD3>EXECUTE</KEYWORD3>
+ <KEYWORD3>EXTENT</KEYWORD3>
+ <KEYWORD3>EXTERNALLY</KEYWORD3>
+ <KEYWORD3>FETCH</KEYWORD3>
+ <KEYWORD3>FLUSH</KEYWORD3>
+ <KEYWORD3>FREELIST</KEYWORD3>
+ <KEYWORD3>FREELISTS</KEYWORD3>
+ <KEYWORD3>FORCE</KEYWORD3>
+ <KEYWORD3>FOREIGN</KEYWORD3>
+ <KEYWORD3>FORTRAN</KEYWORD3>
+ <KEYWORD3>FOUND</KEYWORD3>
+ <KEYWORD3>FUNCTION</KEYWORD3>
+ <KEYWORD3>GO</KEYWORD3>
+ <KEYWORD3>GOTO</KEYWORD3>
+ <KEYWORD3>GROUPS</KEYWORD3>
+ <KEYWORD3>INCLUDING</KEYWORD3>
+ <KEYWORD3>INDICATOR</KEYWORD3>
+ <KEYWORD3>INITRANS</KEYWORD3>
+ <KEYWORD3>INSTANCE</KEYWORD3>
+ <KEYWORD3>INT</KEYWORD3>
+ <KEYWORD3>KEY</KEYWORD3>
+ <KEYWORD3>LANGUAGE</KEYWORD3>
+ <KEYWORD3>LAYER</KEYWORD3>
+ <KEYWORD3>LINK</KEYWORD3>
+ <KEYWORD3>LISTS</KEYWORD3>
+ <KEYWORD3>LOGFILE</KEYWORD3>
+ <KEYWORD3>MANAGE</KEYWORD3>
+ <KEYWORD3>MANUAL</KEYWORD3>
+ <KEYWORD3>MAX</KEYWORD3>
+ <KEYWORD3>MAXDATAFILES</KEYWORD3>
+ <KEYWORD3>MAXINSTANCES</KEYWORD3>
+ <KEYWORD3>MAXLOGFILES</KEYWORD3>
+ <KEYWORD3>MAXLOGHISTORY</KEYWORD3>
+ <KEYWORD3>MAXLOGMEMBERS</KEYWORD3>
+ <KEYWORD3>MAXTRANS</KEYWORD3>
+ <KEYWORD3>MAXVALUE</KEYWORD3>
+ <KEYWORD3>MIN</KEYWORD3>
+ <KEYWORD3>MINEXTENTS</KEYWORD3>
+ <KEYWORD3>MINVALUE</KEYWORD3>
+ <KEYWORD3>MODULE</KEYWORD3>
+ <KEYWORD3>MOUNT</KEYWORD3>
+ <KEYWORD3>NEXT</KEYWORD3>
+ <KEYWORD3>NEW</KEYWORD3>
+ <KEYWORD3>NOARCHIVELOG</KEYWORD3>
+ <KEYWORD3>NOCACHE</KEYWORD3>
+ <KEYWORD3>NOCYCLE</KEYWORD3>
+ <KEYWORD3>NOMAXVALUE</KEYWORD3>
+ <KEYWORD3>NOMINVALUE</KEYWORD3>
+ <KEYWORD3>NONE</KEYWORD3>
+ <KEYWORD3>NOORDER</KEYWORD3>
+ <KEYWORD3>NORESETLOGS</KEYWORD3>
+ <KEYWORD3>NORMAL</KEYWORD3>
+ <KEYWORD3>NOSORT</KEYWORD3>
+ <KEYWORD3>NUMERIC</KEYWORD3>
+ <KEYWORD3>OFF</KEYWORD3>
+ <KEYWORD3>OLD</KEYWORD3>
+ <KEYWORD3>ONLY</KEYWORD3>
+ <KEYWORD3>OPEN</KEYWORD3>
+ <KEYWORD3>OPTIMAL</KEYWORD3>
+ <KEYWORD3>OWN</KEYWORD3>
+ <KEYWORD3>PACKAGE</KEYWORD3>
+ <KEYWORD3>PARALLEL</KEYWORD3>
+ <KEYWORD3>PCTINCREASE</KEYWORD3>
+ <KEYWORD3>PCTUSED</KEYWORD3>
+ <KEYWORD3>PLAN</KEYWORD3>
+ <KEYWORD3>PLI</KEYWORD3>
+ <KEYWORD3>PRECISION</KEYWORD3>
+ <KEYWORD3>PRIMARY</KEYWORD3>
+ <KEYWORD3>PRIVATE</KEYWORD3>
+ <KEYWORD3>PROCEDURE</KEYWORD3>
+ <KEYWORD3>PROFILE</KEYWORD3>
+ <KEYWORD3>QUOTA</KEYWORD3>
+ <KEYWORD3>READ</KEYWORD3>
+ <KEYWORD3>REAL</KEYWORD3>
+ <KEYWORD3>RECOVER</KEYWORD3>
+ <KEYWORD3>REFERENCES</KEYWORD3>
+ <KEYWORD3>REFERENCING</KEYWORD3>
+ <KEYWORD3>RESETLOGS</KEYWORD3>
+ <KEYWORD3>RESTRICTED</KEYWORD3>
+ <KEYWORD3>REUSE</KEYWORD3>
+ <KEYWORD3>ROLE</KEYWORD3>
+ <KEYWORD3>ROLES</KEYWORD3>
+ <KEYWORD3>ROLLBACK</KEYWORD3>
+ <KEYWORD3>SAVEPOINT</KEYWORD3>
+ <KEYWORD3>SCHEMA</KEYWORD3>
+ <KEYWORD3>SCN</KEYWORD3>
+ <KEYWORD3>SECTION</KEYWORD3>
+ <KEYWORD3>SEGMENT</KEYWORD3>
+ <KEYWORD3>SEQUENCE</KEYWORD3>
+ <KEYWORD3>SHARED</KEYWORD3>
+ <KEYWORD3>SNAPSHOT</KEYWORD3>
+ <KEYWORD3>SOME</KEYWORD3>
+ <KEYWORD3>SORT</KEYWORD3>
+ <KEYWORD3>SQL</KEYWORD3>
+ <KEYWORD3>SQLCODE</KEYWORD3>
+ <KEYWORD3>SQLERROR</KEYWORD3>
+ <KEYWORD3>SQLSTATE</KEYWORD3>
+ <KEYWORD3>STATEMENT_ID</KEYWORD3>
+ <KEYWORD3>STATISTICS</KEYWORD3>
+ <KEYWORD3>STOP</KEYWORD3>
+ <KEYWORD3>STORAGE</KEYWORD3>
+ <KEYWORD3>SUM</KEYWORD3>
+ <KEYWORD3>SWITCH</KEYWORD3>
+ <KEYWORD3>SYSTEM</KEYWORD3>
+ <KEYWORD3>TABLES</KEYWORD3>
+ <KEYWORD3>TABLESPACE</KEYWORD3>
+ <KEYWORD3>TEMPORARY</KEYWORD3>
+ <KEYWORD3>THREAD</KEYWORD3>
+ <KEYWORD3>TIME</KEYWORD3>
+ <KEYWORD3>TRACING</KEYWORD3>
+ <KEYWORD3>TRANSACTION</KEYWORD3>
+ <KEYWORD3>TRIGGERS</KEYWORD3>
+ <KEYWORD3>TRUNCATE</KEYWORD3>
+ <KEYWORD3>UNDER</KEYWORD3>
+ <KEYWORD3>UNLIMITED</KEYWORD3>
+ <KEYWORD3>UNTIL</KEYWORD3>
+ <KEYWORD3>USE</KEYWORD3>
+ <KEYWORD3>USING</KEYWORD3>
+ <KEYWORD3>WHEN</KEYWORD3>
+ <KEYWORD3>WRITE</KEYWORD3>
+ <KEYWORD3>WORK</KEYWORD3>
+ -->
+
+ <LITERAL2>[COPY-PREFIX]</LITERAL2>
+ <LITERAL2>[COUNT]</LITERAL2>
+ <LITERAL2>[DISPLAY]</LITERAL2>
+ <LITERAL2>[EXECUTE]</LITERAL2>
+ <LITERAL2>[PG]</LITERAL2>
+ <LITERAL2>[PREFIX]</LITERAL2>
+ <LITERAL2>[PROGRAM]</LITERAL2>
+ <LITERAL2>[SPECIAL-PREFIX]</LITERAL2>
+ <LITERAL2>[TESTCASE]</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/coldfusion.xml b/jEdit/modes/coldfusion.xml
index 8385df7..c9e6e69 100644
--- a/jEdit/modes/coldfusion.xml
+++ b/jEdit/modes/coldfusion.xml
@@ -1,645 +1,645 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- CFML comment -->
- <SPAN TYPE="COMMENT4">
- <BEGIN><!---</BEGIN>
- <END>---></END>
- </SPAN>
-
- <!-- CFSCRIPT multi-line comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- CFSCRIPT single-line comment -->
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT3">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- CFScript -->
- <SPAN TYPE="KEYWORD3" DELEGATE="CFSCRIPT">
- <BEGIN><CFSCRIPT</BEGIN>
- <END></CFSCRIPT></END>
- </SPAN>
-
- <!-- CFML markup start tags -->
- <SPAN TYPE="KEYWORD3" DELEGATE="CFTAGS">
- <BEGIN><CF</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- CFML markup end tags -->
- <SPAN TYPE="KEYWORD3" DELEGATE="CFTAGS">
- <BEGIN></CF</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <RULES SET="TAGS" DEFAULT="MARKUP" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <!-- CFML markup start tags -->
- <SPAN TYPE="KEYWORD3" DELEGATE="CFTAGS">
- <BEGIN><CF</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- CFML markup end tags -->
- <SPAN TYPE="KEYWORD3" DELEGATE="CFTAGS">
- <BEGIN></CF</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- CFML markup start tags -->
- <SPAN TYPE="KEYWORD3" DELEGATE="CFSCRIPT">
- <BEGIN><CFSCRIPT</BEGIN>
- <END></CFSCRIPT></END>
- </SPAN>
- </RULES>
-
- <RULES SET="CFSCRIPT" DEFAULT="KEYWORD1" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
-
- <!-- CFSCRIPT multi-line comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- CFSCRIPT single-line comment -->
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <SPAN TYPE="LABEL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LABEL">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="LITERAL2">(</SEQ>
- <SEQ TYPE="LITERAL2">)</SEQ>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">><</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">!!</SEQ>
- <SEQ TYPE="OPERATOR">&&</SEQ>
-
- <KEYWORDS>
- <FUNCTION>{</FUNCTION>
- <FUNCTION>}</FUNCTION>
- <FUNCTION>for</FUNCTION>
- <FUNCTION>while</FUNCTION>
- <FUNCTION>if</FUNCTION>
- <FUNCTION>}else</FUNCTION>
- <FUNCTION>}else{</FUNCTION>
- <FUNCTION>if(</FUNCTION>
- <FUNCTION>else</FUNCTION>
- <FUNCTION>break</FUNCTION>
-
- <FUNCTION>ArrayAppend</FUNCTION>
- <FUNCTION>ArrayAvg</FUNCTION>
- <FUNCTION>ArrayClear</FUNCTION>
- <FUNCTION>ArrayDeleteAt</FUNCTION>
- <FUNCTION>ArrayInsertAt</FUNCTION>
- <FUNCTION>ArrayIsEmpty</FUNCTION>
- <FUNCTION>ArrayLen</FUNCTION>
- <FUNCTION>ArrayMax</FUNCTION>
- <FUNCTION>ArrayMin</FUNCTION>
- <FUNCTION>ArrayNew</FUNCTION>
- <FUNCTION>ArrayPrepend</FUNCTION>
- <FUNCTION>ArrayResize</FUNCTION>
- <FUNCTION>ArraySet</FUNCTION>
- <FUNCTION>ArraySort</FUNCTION>
- <FUNCTION>ArraySum</FUNCTION>
- <FUNCTION>ArraySwap</FUNCTION>
- <FUNCTION>ArrayToList</FUNCTION>
- <FUNCTION>IsArray</FUNCTION>
- <FUNCTION>ListToArray</FUNCTION>
-
- <FUNCTION>CreateDate</FUNCTION>
- <FUNCTION>CreateDateTime</FUNCTION>
- <FUNCTION>CreateODBCTime</FUNCTION>
- <FUNCTION>CreateODBCDate</FUNCTION>
- <FUNCTION>CreateODBCDateTime</FUNCTION>
- <FUNCTION>CreateTime</FUNCTION>
- <FUNCTION>CreateTimeSpan</FUNCTION>
- <FUNCTION>DateAdd</FUNCTION>
- <FUNCTION>DateCompare</FUNCTION>
- <FUNCTION>DateDiff</FUNCTION>
- <FUNCTION>DatePart</FUNCTION>
- <FUNCTION>Day</FUNCTION>
- <FUNCTION>DayOfWeek</FUNCTION>
- <FUNCTION>DayOfWeekAsString</FUNCTION>
- <FUNCTION>DayOfYear</FUNCTION>
- <FUNCTION>DaysInMonth</FUNCTION>
- <FUNCTION>DaysInYear</FUNCTION>
- <FUNCTION>FirstDayOfMonth</FUNCTION>
- <FUNCTION>Hour</FUNCTION>
- <FUNCTION>Minute</FUNCTION>
- <FUNCTION>Month</FUNCTION>
- <FUNCTION>MonthAsString</FUNCTION>
- <FUNCTION>Now</FUNCTION>
- <FUNCTION>ParseDateTime</FUNCTION>
- <FUNCTION>Quarter</FUNCTION>
- <FUNCTION>Second</FUNCTION>
- <FUNCTION>Week</FUNCTION>
- <FUNCTION>Year</FUNCTION>
-
- <FUNCTION>IsArray</FUNCTION>
- <FUNCTION>IsAuthenticated</FUNCTION>
- <FUNCTION>IsAuthorized</FUNCTION>
- <FUNCTION>IsBoolean</FUNCTION>
- <FUNCTION>IsDate</FUNCTION>
- <FUNCTION>IsDebugMode</FUNCTION>
- <FUNCTION>IsDefined</FUNCTION>
- <FUNCTION>IsLeapYear</FUNCTION>
- <FUNCTION>IsNumeric</FUNCTION>
- <FUNCTION>IsNumericDate</FUNCTION>
- <FUNCTION>IsQuery</FUNCTION>
- <FUNCTION>IsSimpleValue</FUNCTION>
- <FUNCTION>IsStruct</FUNCTION>
-
- <FUNCTION>DateFormat</FUNCTION>
- <FUNCTION>DecimalFormat</FUNCTION>
- <FUNCTION>DollarFormat</FUNCTION>
- <FUNCTION>FormatBaseN</FUNCTION>
- <FUNCTION>HTMLCodeFormat</FUNCTION>
- <FUNCTION>HTMLEditFormat</FUNCTION>
- <FUNCTION>NumberFormat</FUNCTION>
- <FUNCTION>ParagraphFormat</FUNCTION>
- <FUNCTION>TimeFormat</FUNCTION>
- <FUNCTION>YesNoFormat</FUNCTION>
-
- <FUNCTION>DE</FUNCTION>
- <FUNCTION>Evaluate</FUNCTION>
- <FUNCTION>IIf</FUNCTION>
- <FUNCTION>SetVariable</FUNCTION>
-
- <FUNCTION>ArrayToList</FUNCTION>
- <FUNCTION>ListAppend</FUNCTION>
- <FUNCTION>ListChangeDelims</FUNCTION>
- <FUNCTION>ListContains</FUNCTION>
- <FUNCTION>ListContainsNoCase</FUNCTION>
- <FUNCTION>ListDeleteAt</FUNCTION>
- <FUNCTION>ListFind</FUNCTION>
- <FUNCTION>ListFindNoCase</FUNCTION>
- <FUNCTION>ListFirst</FUNCTION>
- <FUNCTION>ListGetAt</FUNCTION>
- <FUNCTION>ListInsertAt</FUNCTION>
- <FUNCTION>ListLast</FUNCTION>
- <FUNCTION>ListLen</FUNCTION>
- <FUNCTION>ListPrepend</FUNCTION>
- <FUNCTION>ListRest</FUNCTION>
- <FUNCTION>ListSetAt</FUNCTION>
- <FUNCTION>ListToArray</FUNCTION>
-
- <FUNCTION>StructClear</FUNCTION>
- <FUNCTION>StructCopy</FUNCTION>
- <FUNCTION>StructCount</FUNCTION>
- <FUNCTION>StructDelete</FUNCTION>
- <FUNCTION>StructFind</FUNCTION>
- <FUNCTION>StructInsert</FUNCTION>
- <FUNCTION>StructIsEmpty</FUNCTION>
- <FUNCTION>StructKeyExists</FUNCTION>
- <FUNCTION>StructNew</FUNCTION>
- <FUNCTION>StructUpdate</FUNCTION>
-
- <FUNCTION>GetLocale</FUNCTION>
- <FUNCTION>LSCurrencyFormat</FUNCTION>
- <FUNCTION>LSDateFormat</FUNCTION>
- <FUNCTION>LSIsCurrency</FUNCTION>
- <FUNCTION>LSIsDate</FUNCTION>
- <FUNCTION>LSIsNumeric</FUNCTION>
- <FUNCTION>LSNumberFormat</FUNCTION>
- <FUNCTION>LSParseCurrency</FUNCTION>
- <FUNCTION>LSParseDateTime</FUNCTION>
- <FUNCTION>LSParseNumber</FUNCTION>
- <FUNCTION>LSTimeFormat</FUNCTION>
- <FUNCTION>SetLocale</FUNCTION>
-
- <FUNCTION>Abs</FUNCTION>
- <FUNCTION>Atn</FUNCTION>
- <FUNCTION>BitAnd</FUNCTION>
- <FUNCTION>BitMaskClear</FUNCTION>
- <FUNCTION>BitMaskRead</FUNCTION>
- <FUNCTION>BitMaskSet</FUNCTION>
- <FUNCTION>BitNot</FUNCTION>
- <FUNCTION>BitOr</FUNCTION>
- <FUNCTION>BitSHLN</FUNCTION>
- <FUNCTION>BitSHRN</FUNCTION>
- <FUNCTION>BitXor</FUNCTION>
- <FUNCTION>Ceiling</FUNCTION>
- <FUNCTION>Cos</FUNCTION>
- <FUNCTION>DecrementValue</FUNCTION>
- <FUNCTION>Exp</FUNCTION>
- <FUNCTION>Fix</FUNCTION>
- <FUNCTION>IncrementValue</FUNCTION>
- <FUNCTION>InputBaseN</FUNCTION>
- <FUNCTION>Int</FUNCTION>
- <FUNCTION>Log</FUNCTION>
- <FUNCTION>Log10</FUNCTION>
- <FUNCTION>Max</FUNCTION>
- <FUNCTION>Min</FUNCTION>
- <FUNCTION>Pi</FUNCTION>
- <FUNCTION>Rand</FUNCTION>
- <FUNCTION>Randomize</FUNCTION>
- <FUNCTION>RandRange</FUNCTION>
- <FUNCTION>Round</FUNCTION>
- <FUNCTION>Sgn</FUNCTION>
- <FUNCTION>Sin</FUNCTION>
- <FUNCTION>Sqr</FUNCTION>
- <FUNCTION>Tan</FUNCTION>
-
- <FUNCTION>Asc</FUNCTION>
- <FUNCTION>Chr</FUNCTION>
- <FUNCTION>CJustify</FUNCTION>
- <FUNCTION>Compare</FUNCTION>
- <FUNCTION>CompareNoCase</FUNCTION>
- <FUNCTION>Find</FUNCTION>
- <FUNCTION>FindNoCase</FUNCTION>
- <FUNCTION>FindOneOf</FUNCTION>
- <FUNCTION>GetToken</FUNCTION>
- <FUNCTION>Insert</FUNCTION>
- <FUNCTION>LCase</FUNCTION>
- <FUNCTION>Left</FUNCTION>
- <FUNCTION>Len</FUNCTION>
- <FUNCTION>LJustify</FUNCTION>
- <FUNCTION>LTrim</FUNCTION>
- <FUNCTION>Mid</FUNCTION>
- <FUNCTION>REFind</FUNCTION>
- <FUNCTION>REFindNoCase</FUNCTION>
- <FUNCTION>RemoveChars</FUNCTION>
- <FUNCTION>RepeatString</FUNCTION>
- <FUNCTION>Replace</FUNCTION>
- <FUNCTION>ReplaceList</FUNCTION>
- <FUNCTION>ReplaceNoCase</FUNCTION>
- <FUNCTION>REReplace</FUNCTION>
- <FUNCTION>REReplaceNoCase</FUNCTION>
- <FUNCTION>Reverse</FUNCTION>
- <FUNCTION>Right</FUNCTION>
- <FUNCTION>RJustify</FUNCTION>
- <FUNCTION>RTrim</FUNCTION>
- <FUNCTION>SpanExcluding</FUNCTION>
- <FUNCTION>SpanIncluding</FUNCTION>
- <FUNCTION>Trim</FUNCTION>
- <FUNCTION>UCase</FUNCTION>
- <FUNCTION>Val</FUNCTION>
-
- <FUNCTION>DirectoryExists</FUNCTION>
- <FUNCTION>ExpandPath</FUNCTION>
- <FUNCTION>FileExists</FUNCTION>
- <FUNCTION>GetDirectoryFromPath</FUNCTION>
- <FUNCTION>GetFileFromPath</FUNCTION>
- <FUNCTION>GetTempDirectory</FUNCTION>
- <FUNCTION>GetTempFile</FUNCTION>
- <FUNCTION>GetTemplatePath</FUNCTION>
-
- <FUNCTION>QueryAddRow</FUNCTION>
- <FUNCTION>QueryNew</FUNCTION>
- <FUNCTION>QuerySetCell</FUNCTION>
-
- <FUNCTION>Decrypt</FUNCTION>
- <FUNCTION>DeleteClientVariable</FUNCTION>
- <FUNCTION>Encrypt</FUNCTION>
- <FUNCTION>GetBaseTagData</FUNCTION>
- <FUNCTION>GetBaseTagList</FUNCTION>
- <FUNCTION>GetClientVariablesList</FUNCTION>
- <FUNCTION>GetTickCount</FUNCTION>
- <FUNCTION>PreserveSingleQuotes</FUNCTION>
- <FUNCTION>QuotedValueList</FUNCTION>
- <FUNCTION>StripCR</FUNCTION>
- <FUNCTION>URLEncodedFormat</FUNCTION>
- <FUNCTION>ValueList</FUNCTION>
- <FUNCTION>WriteOutput</FUNCTION>
-
- <FUNCTION>ParameterExists</FUNCTION>
-
- <OPERATOR>IS</OPERATOR>
- <OPERATOR>EQ</OPERATOR>
- <OPERATOR>NEQ</OPERATOR>
- <OPERATOR>GT</OPERATOR>
- <OPERATOR>GTE</OPERATOR>
- <OPERATOR>LT</OPERATOR>
- <OPERATOR>LTE</OPERATOR>
-
- <OPERATOR>LESS</OPERATOR>
- <OPERATOR>GREATER</OPERATOR>
- <OPERATOR>THAN</OPERATOR>
-
- <OPERATOR>AND</OPERATOR>
- <OPERATOR>OR</OPERATOR>
- <OPERATOR>NOT</OPERATOR>
- <OPERATOR>XOR</OPERATOR>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="CFTAGS" DEFAULT="KEYWORD3">
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="KEYWORD3">##</SEQ>
-
- <SPAN TYPE="LITERAL2">
- <BEGIN>#</BEGIN>
- <END>#</END>
- </SPAN>
-
- <KEYWORDS>
- <KEYWORD2>ArrayAppend</KEYWORD2>
- <KEYWORD2>ArrayAvg</KEYWORD2>
- <KEYWORD2>ArrayClear</KEYWORD2>
- <KEYWORD2>ArrayDeleteAt</KEYWORD2>
- <KEYWORD2>ArrayInsertAt</KEYWORD2>
- <KEYWORD2>ArrayIsEmpty</KEYWORD2>
- <KEYWORD2>ArrayLen</KEYWORD2>
- <KEYWORD2>ArrayMax</KEYWORD2>
- <KEYWORD2>ArrayMin</KEYWORD2>
- <KEYWORD2>ArrayNew</KEYWORD2>
- <KEYWORD2>ArrayPrepend</KEYWORD2>
- <KEYWORD2>ArrayResize</KEYWORD2>
- <KEYWORD2>ArraySet</KEYWORD2>
- <KEYWORD2>ArraySort</KEYWORD2>
- <KEYWORD2>ArraySum</KEYWORD2>
- <KEYWORD2>ArraySwap</KEYWORD2>
- <KEYWORD2>ArrayToList</KEYWORD2>
- <KEYWORD2>IsArray</KEYWORD2>
- <KEYWORD2>ListToArray</KEYWORD2>
-
- <KEYWORD2>CreateDate</KEYWORD2>
- <KEYWORD2>CreateDateTime</KEYWORD2>
- <KEYWORD2>CreateODBCTime</KEYWORD2>
- <KEYWORD2>CreateODBCDate</KEYWORD2>
- <KEYWORD2>CreateODBCDateTime</KEYWORD2>
- <KEYWORD2>CreateTime</KEYWORD2>
- <KEYWORD2>CreateTimeSpan</KEYWORD2>
- <KEYWORD2>DateAdd</KEYWORD2>
- <KEYWORD2>DateCompare</KEYWORD2>
- <KEYWORD2>DateDiff</KEYWORD2>
- <KEYWORD2>DatePart</KEYWORD2>
- <KEYWORD2>Day</KEYWORD2>
- <KEYWORD2>DayOfWeek</KEYWORD2>
- <KEYWORD2>DayOfWeekAsString</KEYWORD2>
- <KEYWORD2>DayOfYear</KEYWORD2>
- <KEYWORD2>DaysInMonth</KEYWORD2>
- <KEYWORD2>DaysInYear</KEYWORD2>
- <KEYWORD2>FirstDayOfMonth</KEYWORD2>
- <KEYWORD2>Hour</KEYWORD2>
- <KEYWORD2>Minute</KEYWORD2>
- <KEYWORD2>Month</KEYWORD2>
- <KEYWORD2>MonthAsString</KEYWORD2>
- <KEYWORD2>Now</KEYWORD2>
- <KEYWORD2>ParseDateTime</KEYWORD2>
- <KEYWORD2>Quarter</KEYWORD2>
- <KEYWORD2>Second</KEYWORD2>
- <KEYWORD2>Week</KEYWORD2>
- <KEYWORD2>Year</KEYWORD2>
-
- <KEYWORD2>IsArray</KEYWORD2>
- <KEYWORD2>IsAuthenticated</KEYWORD2>
- <KEYWORD2>IsAuthorized</KEYWORD2>
- <KEYWORD2>IsBoolean</KEYWORD2>
- <KEYWORD2>IsDate</KEYWORD2>
- <KEYWORD2>IsDebugMode</KEYWORD2>
- <KEYWORD2>IsDefined</KEYWORD2>
- <KEYWORD2>IsLeapYear</KEYWORD2>
- <KEYWORD2>IsNumeric</KEYWORD2>
- <KEYWORD2>IsNumericDate</KEYWORD2>
- <KEYWORD2>IsQuery</KEYWORD2>
- <KEYWORD2>IsSimpleValue</KEYWORD2>
- <KEYWORD2>IsStruct</KEYWORD2>
-
- <KEYWORD2>DateFormat</KEYWORD2>
- <KEYWORD2>DecimalFormat</KEYWORD2>
- <KEYWORD2>DollarFormat</KEYWORD2>
- <KEYWORD2>FormatBaseN</KEYWORD2>
- <KEYWORD2>HTMLCodeFormat</KEYWORD2>
- <KEYWORD2>HTMLEditFormat</KEYWORD2>
- <KEYWORD2>NumberFormat</KEYWORD2>
- <KEYWORD2>ParagraphFormat</KEYWORD2>
- <KEYWORD2>TimeFormat</KEYWORD2>
- <KEYWORD2>YesNoFormat</KEYWORD2>
-
- <KEYWORD2>DE</KEYWORD2>
- <KEYWORD2>Evaluate</KEYWORD2>
- <KEYWORD2>IIf</KEYWORD2>
- <KEYWORD2>SetVariable</KEYWORD2>
-
- <KEYWORD2>ArrayToList</KEYWORD2>
- <KEYWORD2>ListAppend</KEYWORD2>
- <KEYWORD2>ListChangeDelims</KEYWORD2>
- <KEYWORD2>ListContains</KEYWORD2>
- <KEYWORD2>ListContainsNoCase</KEYWORD2>
- <KEYWORD2>ListDeleteAt</KEYWORD2>
- <KEYWORD2>ListFind</KEYWORD2>
- <KEYWORD2>ListFindNoCase</KEYWORD2>
- <KEYWORD2>ListFirst</KEYWORD2>
- <KEYWORD2>ListGetAt</KEYWORD2>
- <KEYWORD2>ListInsertAt</KEYWORD2>
- <KEYWORD2>ListLast</KEYWORD2>
- <KEYWORD2>ListLen</KEYWORD2>
- <KEYWORD2>ListPrepend</KEYWORD2>
- <KEYWORD2>ListRest</KEYWORD2>
- <KEYWORD2>ListSetAt</KEYWORD2>
- <KEYWORD2>ListToArray</KEYWORD2>
-
- <KEYWORD2>StructClear</KEYWORD2>
- <KEYWORD2>StructCopy</KEYWORD2>
- <KEYWORD2>StructCount</KEYWORD2>
- <KEYWORD2>StructDelete</KEYWORD2>
- <KEYWORD2>StructFind</KEYWORD2>
- <KEYWORD2>StructInsert</KEYWORD2>
- <KEYWORD2>StructIsEmpty</KEYWORD2>
- <KEYWORD2>StructKeyExists</KEYWORD2>
- <KEYWORD2>StructNew</KEYWORD2>
- <KEYWORD2>StructUpdate</KEYWORD2>
-
- <KEYWORD2>GetLocale</KEYWORD2>
- <KEYWORD2>LSCurrencyFormat</KEYWORD2>
- <KEYWORD2>LSDateFormat</KEYWORD2>
- <KEYWORD2>LSIsCurrency</KEYWORD2>
- <KEYWORD2>LSIsDate</KEYWORD2>
- <KEYWORD2>LSIsNumeric</KEYWORD2>
- <KEYWORD2>LSNumberFormat</KEYWORD2>
- <KEYWORD2>LSParseCurrency</KEYWORD2>
- <KEYWORD2>LSParseDateTime</KEYWORD2>
- <KEYWORD2>LSParseNumber</KEYWORD2>
- <KEYWORD2>LSTimeFormat</KEYWORD2>
- <KEYWORD2>SetLocale</KEYWORD2>
-
- <KEYWORD2>Abs</KEYWORD2>
- <KEYWORD2>Atn</KEYWORD2>
- <KEYWORD2>BitAnd</KEYWORD2>
- <KEYWORD2>BitMaskClear</KEYWORD2>
- <KEYWORD2>BitMaskRead</KEYWORD2>
- <KEYWORD2>BitMaskSet</KEYWORD2>
- <KEYWORD2>BitNot</KEYWORD2>
- <KEYWORD2>BitOr</KEYWORD2>
- <KEYWORD2>BitSHLN</KEYWORD2>
- <KEYWORD2>BitSHRN</KEYWORD2>
- <KEYWORD2>BitXor</KEYWORD2>
- <KEYWORD2>Ceiling</KEYWORD2>
- <KEYWORD2>Cos</KEYWORD2>
- <KEYWORD2>DecrementValue</KEYWORD2>
- <KEYWORD2>Exp</KEYWORD2>
- <KEYWORD2>Fix</KEYWORD2>
- <KEYWORD2>IncrementValue</KEYWORD2>
- <KEYWORD2>InputBaseN</KEYWORD2>
- <KEYWORD2>Int</KEYWORD2>
- <KEYWORD2>Log</KEYWORD2>
- <KEYWORD2>Log10</KEYWORD2>
- <KEYWORD2>Max</KEYWORD2>
- <KEYWORD2>Min</KEYWORD2>
- <KEYWORD2>Pi</KEYWORD2>
- <KEYWORD2>Rand</KEYWORD2>
- <KEYWORD2>Randomize</KEYWORD2>
- <KEYWORD2>RandRange</KEYWORD2>
- <KEYWORD2>Round</KEYWORD2>
- <KEYWORD2>Sgn</KEYWORD2>
- <KEYWORD2>Sin</KEYWORD2>
- <KEYWORD2>Sqr</KEYWORD2>
- <KEYWORD2>Tan</KEYWORD2>
-
- <KEYWORD2>Asc</KEYWORD2>
- <KEYWORD2>Chr</KEYWORD2>
- <KEYWORD2>CJustify</KEYWORD2>
- <KEYWORD2>Compare</KEYWORD2>
- <KEYWORD2>CompareNoCase</KEYWORD2>
- <KEYWORD2>Find</KEYWORD2>
- <KEYWORD2>FindNoCase</KEYWORD2>
- <KEYWORD2>FindOneOf</KEYWORD2>
- <KEYWORD2>GetToken</KEYWORD2>
- <KEYWORD2>Insert</KEYWORD2>
- <KEYWORD2>LCase</KEYWORD2>
- <KEYWORD2>Left</KEYWORD2>
- <KEYWORD2>Len</KEYWORD2>
- <KEYWORD2>LJustify</KEYWORD2>
- <KEYWORD2>LTrim</KEYWORD2>
- <KEYWORD2>Mid</KEYWORD2>
- <KEYWORD2>REFind</KEYWORD2>
- <KEYWORD2>REFindNoCase</KEYWORD2>
- <KEYWORD2>RemoveChars</KEYWORD2>
- <KEYWORD2>RepeatString</KEYWORD2>
- <KEYWORD2>Replace</KEYWORD2>
- <KEYWORD2>ReplaceList</KEYWORD2>
- <KEYWORD2>ReplaceNoCase</KEYWORD2>
- <KEYWORD2>REReplace</KEYWORD2>
- <KEYWORD2>REReplaceNoCase</KEYWORD2>
- <KEYWORD2>Reverse</KEYWORD2>
- <KEYWORD2>Right</KEYWORD2>
- <KEYWORD2>RJustify</KEYWORD2>
- <KEYWORD2>RTrim</KEYWORD2>
- <KEYWORD2>SpanExcluding</KEYWORD2>
- <KEYWORD2>SpanIncluding</KEYWORD2>
- <KEYWORD2>Trim</KEYWORD2>
- <KEYWORD2>UCase</KEYWORD2>
- <KEYWORD2>Val</KEYWORD2>
-
- <KEYWORD2>DirectoryExists</KEYWORD2>
- <KEYWORD2>ExpandPath</KEYWORD2>
- <KEYWORD2>FileExists</KEYWORD2>
- <KEYWORD2>GetDirectoryFromPath</KEYWORD2>
- <KEYWORD2>GetFileFromPath</KEYWORD2>
- <KEYWORD2>GetTempDirectory</KEYWORD2>
- <KEYWORD2>GetTempFile</KEYWORD2>
- <KEYWORD2>GetTemplatePath</KEYWORD2>
-
- <KEYWORD2>QueryAddRow</KEYWORD2>
- <KEYWORD2>QueryNew</KEYWORD2>
- <KEYWORD2>QuerySetCell</KEYWORD2>
-
- <KEYWORD2>Decrypt</KEYWORD2>
- <KEYWORD2>DeleteClientVariable</KEYWORD2>
- <KEYWORD2>Encrypt</KEYWORD2>
- <KEYWORD2>GetBaseTagData</KEYWORD2>
- <KEYWORD2>GetBaseTagList</KEYWORD2>
- <KEYWORD2>GetClientVariablesList</KEYWORD2>
- <KEYWORD2>GetTickCount</KEYWORD2>
- <KEYWORD2>PreserveSingleQuotes</KEYWORD2>
- <KEYWORD2>QuotedValueList</KEYWORD2>
- <KEYWORD2>StripCR</KEYWORD2>
- <KEYWORD2>URLEncodedFormat</KEYWORD2>
- <KEYWORD2>ValueList</KEYWORD2>
- <KEYWORD2>WriteOutput</KEYWORD2>
-
- <KEYWORD2>ParameterExists</KEYWORD2>
-
- <OPERATOR>IS</OPERATOR>
- <OPERATOR>EQ</OPERATOR>
- <OPERATOR>NEQ</OPERATOR>
- <OPERATOR>GT</OPERATOR>
- <OPERATOR>GTE</OPERATOR>
- <OPERATOR>LT</OPERATOR>
- <OPERATOR>LTE</OPERATOR>
-
- <OPERATOR>LESS</OPERATOR>
- <OPERATOR>GREATER</OPERATOR>
- <OPERATOR>THAN</OPERATOR>
-
- <OPERATOR>AND</OPERATOR>
- <OPERATOR>OR</OPERATOR>
- <OPERATOR>NOT</OPERATOR>
- <OPERATOR>XOR</OPERATOR>
- </KEYWORDS>
- </RULES>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- CFML comment -->
+ <SPAN TYPE="COMMENT4">
+ <BEGIN><!---</BEGIN>
+ <END>---></END>
+ </SPAN>
+
+ <!-- CFSCRIPT multi-line comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- CFSCRIPT single-line comment -->
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT3">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- CFScript -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="CFSCRIPT">
+ <BEGIN><CFSCRIPT</BEGIN>
+ <END></CFSCRIPT></END>
+ </SPAN>
+
+ <!-- CFML markup start tags -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="CFTAGS">
+ <BEGIN><CF</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CFML markup end tags -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="CFTAGS">
+ <BEGIN></CF</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="TAGS" DEFAULT="MARKUP" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <!-- CFML markup start tags -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="CFTAGS">
+ <BEGIN><CF</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CFML markup end tags -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="CFTAGS">
+ <BEGIN></CF</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CFML markup start tags -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="CFSCRIPT">
+ <BEGIN><CFSCRIPT</BEGIN>
+ <END></CFSCRIPT></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="CFSCRIPT" DEFAULT="KEYWORD1" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+
+ <!-- CFSCRIPT multi-line comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- CFSCRIPT single-line comment -->
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <SPAN TYPE="LABEL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LABEL">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="LITERAL2">(</SEQ>
+ <SEQ TYPE="LITERAL2">)</SEQ>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">><</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">!!</SEQ>
+ <SEQ TYPE="OPERATOR">&&</SEQ>
+
+ <KEYWORDS>
+ <FUNCTION>{</FUNCTION>
+ <FUNCTION>}</FUNCTION>
+ <FUNCTION>for</FUNCTION>
+ <FUNCTION>while</FUNCTION>
+ <FUNCTION>if</FUNCTION>
+ <FUNCTION>}else</FUNCTION>
+ <FUNCTION>}else{</FUNCTION>
+ <FUNCTION>if(</FUNCTION>
+ <FUNCTION>else</FUNCTION>
+ <FUNCTION>break</FUNCTION>
+
+ <FUNCTION>ArrayAppend</FUNCTION>
+ <FUNCTION>ArrayAvg</FUNCTION>
+ <FUNCTION>ArrayClear</FUNCTION>
+ <FUNCTION>ArrayDeleteAt</FUNCTION>
+ <FUNCTION>ArrayInsertAt</FUNCTION>
+ <FUNCTION>ArrayIsEmpty</FUNCTION>
+ <FUNCTION>ArrayLen</FUNCTION>
+ <FUNCTION>ArrayMax</FUNCTION>
+ <FUNCTION>ArrayMin</FUNCTION>
+ <FUNCTION>ArrayNew</FUNCTION>
+ <FUNCTION>ArrayPrepend</FUNCTION>
+ <FUNCTION>ArrayResize</FUNCTION>
+ <FUNCTION>ArraySet</FUNCTION>
+ <FUNCTION>ArraySort</FUNCTION>
+ <FUNCTION>ArraySum</FUNCTION>
+ <FUNCTION>ArraySwap</FUNCTION>
+ <FUNCTION>ArrayToList</FUNCTION>
+ <FUNCTION>IsArray</FUNCTION>
+ <FUNCTION>ListToArray</FUNCTION>
+
+ <FUNCTION>CreateDate</FUNCTION>
+ <FUNCTION>CreateDateTime</FUNCTION>
+ <FUNCTION>CreateODBCTime</FUNCTION>
+ <FUNCTION>CreateODBCDate</FUNCTION>
+ <FUNCTION>CreateODBCDateTime</FUNCTION>
+ <FUNCTION>CreateTime</FUNCTION>
+ <FUNCTION>CreateTimeSpan</FUNCTION>
+ <FUNCTION>DateAdd</FUNCTION>
+ <FUNCTION>DateCompare</FUNCTION>
+ <FUNCTION>DateDiff</FUNCTION>
+ <FUNCTION>DatePart</FUNCTION>
+ <FUNCTION>Day</FUNCTION>
+ <FUNCTION>DayOfWeek</FUNCTION>
+ <FUNCTION>DayOfWeekAsString</FUNCTION>
+ <FUNCTION>DayOfYear</FUNCTION>
+ <FUNCTION>DaysInMonth</FUNCTION>
+ <FUNCTION>DaysInYear</FUNCTION>
+ <FUNCTION>FirstDayOfMonth</FUNCTION>
+ <FUNCTION>Hour</FUNCTION>
+ <FUNCTION>Minute</FUNCTION>
+ <FUNCTION>Month</FUNCTION>
+ <FUNCTION>MonthAsString</FUNCTION>
+ <FUNCTION>Now</FUNCTION>
+ <FUNCTION>ParseDateTime</FUNCTION>
+ <FUNCTION>Quarter</FUNCTION>
+ <FUNCTION>Second</FUNCTION>
+ <FUNCTION>Week</FUNCTION>
+ <FUNCTION>Year</FUNCTION>
+
+ <FUNCTION>IsArray</FUNCTION>
+ <FUNCTION>IsAuthenticated</FUNCTION>
+ <FUNCTION>IsAuthorized</FUNCTION>
+ <FUNCTION>IsBoolean</FUNCTION>
+ <FUNCTION>IsDate</FUNCTION>
+ <FUNCTION>IsDebugMode</FUNCTION>
+ <FUNCTION>IsDefined</FUNCTION>
+ <FUNCTION>IsLeapYear</FUNCTION>
+ <FUNCTION>IsNumeric</FUNCTION>
+ <FUNCTION>IsNumericDate</FUNCTION>
+ <FUNCTION>IsQuery</FUNCTION>
+ <FUNCTION>IsSimpleValue</FUNCTION>
+ <FUNCTION>IsStruct</FUNCTION>
+
+ <FUNCTION>DateFormat</FUNCTION>
+ <FUNCTION>DecimalFormat</FUNCTION>
+ <FUNCTION>DollarFormat</FUNCTION>
+ <FUNCTION>FormatBaseN</FUNCTION>
+ <FUNCTION>HTMLCodeFormat</FUNCTION>
+ <FUNCTION>HTMLEditFormat</FUNCTION>
+ <FUNCTION>NumberFormat</FUNCTION>
+ <FUNCTION>ParagraphFormat</FUNCTION>
+ <FUNCTION>TimeFormat</FUNCTION>
+ <FUNCTION>YesNoFormat</FUNCTION>
+
+ <FUNCTION>DE</FUNCTION>
+ <FUNCTION>Evaluate</FUNCTION>
+ <FUNCTION>IIf</FUNCTION>
+ <FUNCTION>SetVariable</FUNCTION>
+
+ <FUNCTION>ArrayToList</FUNCTION>
+ <FUNCTION>ListAppend</FUNCTION>
+ <FUNCTION>ListChangeDelims</FUNCTION>
+ <FUNCTION>ListContains</FUNCTION>
+ <FUNCTION>ListContainsNoCase</FUNCTION>
+ <FUNCTION>ListDeleteAt</FUNCTION>
+ <FUNCTION>ListFind</FUNCTION>
+ <FUNCTION>ListFindNoCase</FUNCTION>
+ <FUNCTION>ListFirst</FUNCTION>
+ <FUNCTION>ListGetAt</FUNCTION>
+ <FUNCTION>ListInsertAt</FUNCTION>
+ <FUNCTION>ListLast</FUNCTION>
+ <FUNCTION>ListLen</FUNCTION>
+ <FUNCTION>ListPrepend</FUNCTION>
+ <FUNCTION>ListRest</FUNCTION>
+ <FUNCTION>ListSetAt</FUNCTION>
+ <FUNCTION>ListToArray</FUNCTION>
+
+ <FUNCTION>StructClear</FUNCTION>
+ <FUNCTION>StructCopy</FUNCTION>
+ <FUNCTION>StructCount</FUNCTION>
+ <FUNCTION>StructDelete</FUNCTION>
+ <FUNCTION>StructFind</FUNCTION>
+ <FUNCTION>StructInsert</FUNCTION>
+ <FUNCTION>StructIsEmpty</FUNCTION>
+ <FUNCTION>StructKeyExists</FUNCTION>
+ <FUNCTION>StructNew</FUNCTION>
+ <FUNCTION>StructUpdate</FUNCTION>
+
+ <FUNCTION>GetLocale</FUNCTION>
+ <FUNCTION>LSCurrencyFormat</FUNCTION>
+ <FUNCTION>LSDateFormat</FUNCTION>
+ <FUNCTION>LSIsCurrency</FUNCTION>
+ <FUNCTION>LSIsDate</FUNCTION>
+ <FUNCTION>LSIsNumeric</FUNCTION>
+ <FUNCTION>LSNumberFormat</FUNCTION>
+ <FUNCTION>LSParseCurrency</FUNCTION>
+ <FUNCTION>LSParseDateTime</FUNCTION>
+ <FUNCTION>LSParseNumber</FUNCTION>
+ <FUNCTION>LSTimeFormat</FUNCTION>
+ <FUNCTION>SetLocale</FUNCTION>
+
+ <FUNCTION>Abs</FUNCTION>
+ <FUNCTION>Atn</FUNCTION>
+ <FUNCTION>BitAnd</FUNCTION>
+ <FUNCTION>BitMaskClear</FUNCTION>
+ <FUNCTION>BitMaskRead</FUNCTION>
+ <FUNCTION>BitMaskSet</FUNCTION>
+ <FUNCTION>BitNot</FUNCTION>
+ <FUNCTION>BitOr</FUNCTION>
+ <FUNCTION>BitSHLN</FUNCTION>
+ <FUNCTION>BitSHRN</FUNCTION>
+ <FUNCTION>BitXor</FUNCTION>
+ <FUNCTION>Ceiling</FUNCTION>
+ <FUNCTION>Cos</FUNCTION>
+ <FUNCTION>DecrementValue</FUNCTION>
+ <FUNCTION>Exp</FUNCTION>
+ <FUNCTION>Fix</FUNCTION>
+ <FUNCTION>IncrementValue</FUNCTION>
+ <FUNCTION>InputBaseN</FUNCTION>
+ <FUNCTION>Int</FUNCTION>
+ <FUNCTION>Log</FUNCTION>
+ <FUNCTION>Log10</FUNCTION>
+ <FUNCTION>Max</FUNCTION>
+ <FUNCTION>Min</FUNCTION>
+ <FUNCTION>Pi</FUNCTION>
+ <FUNCTION>Rand</FUNCTION>
+ <FUNCTION>Randomize</FUNCTION>
+ <FUNCTION>RandRange</FUNCTION>
+ <FUNCTION>Round</FUNCTION>
+ <FUNCTION>Sgn</FUNCTION>
+ <FUNCTION>Sin</FUNCTION>
+ <FUNCTION>Sqr</FUNCTION>
+ <FUNCTION>Tan</FUNCTION>
+
+ <FUNCTION>Asc</FUNCTION>
+ <FUNCTION>Chr</FUNCTION>
+ <FUNCTION>CJustify</FUNCTION>
+ <FUNCTION>Compare</FUNCTION>
+ <FUNCTION>CompareNoCase</FUNCTION>
+ <FUNCTION>Find</FUNCTION>
+ <FUNCTION>FindNoCase</FUNCTION>
+ <FUNCTION>FindOneOf</FUNCTION>
+ <FUNCTION>GetToken</FUNCTION>
+ <FUNCTION>Insert</FUNCTION>
+ <FUNCTION>LCase</FUNCTION>
+ <FUNCTION>Left</FUNCTION>
+ <FUNCTION>Len</FUNCTION>
+ <FUNCTION>LJustify</FUNCTION>
+ <FUNCTION>LTrim</FUNCTION>
+ <FUNCTION>Mid</FUNCTION>
+ <FUNCTION>REFind</FUNCTION>
+ <FUNCTION>REFindNoCase</FUNCTION>
+ <FUNCTION>RemoveChars</FUNCTION>
+ <FUNCTION>RepeatString</FUNCTION>
+ <FUNCTION>Replace</FUNCTION>
+ <FUNCTION>ReplaceList</FUNCTION>
+ <FUNCTION>ReplaceNoCase</FUNCTION>
+ <FUNCTION>REReplace</FUNCTION>
+ <FUNCTION>REReplaceNoCase</FUNCTION>
+ <FUNCTION>Reverse</FUNCTION>
+ <FUNCTION>Right</FUNCTION>
+ <FUNCTION>RJustify</FUNCTION>
+ <FUNCTION>RTrim</FUNCTION>
+ <FUNCTION>SpanExcluding</FUNCTION>
+ <FUNCTION>SpanIncluding</FUNCTION>
+ <FUNCTION>Trim</FUNCTION>
+ <FUNCTION>UCase</FUNCTION>
+ <FUNCTION>Val</FUNCTION>
+
+ <FUNCTION>DirectoryExists</FUNCTION>
+ <FUNCTION>ExpandPath</FUNCTION>
+ <FUNCTION>FileExists</FUNCTION>
+ <FUNCTION>GetDirectoryFromPath</FUNCTION>
+ <FUNCTION>GetFileFromPath</FUNCTION>
+ <FUNCTION>GetTempDirectory</FUNCTION>
+ <FUNCTION>GetTempFile</FUNCTION>
+ <FUNCTION>GetTemplatePath</FUNCTION>
+
+ <FUNCTION>QueryAddRow</FUNCTION>
+ <FUNCTION>QueryNew</FUNCTION>
+ <FUNCTION>QuerySetCell</FUNCTION>
+
+ <FUNCTION>Decrypt</FUNCTION>
+ <FUNCTION>DeleteClientVariable</FUNCTION>
+ <FUNCTION>Encrypt</FUNCTION>
+ <FUNCTION>GetBaseTagData</FUNCTION>
+ <FUNCTION>GetBaseTagList</FUNCTION>
+ <FUNCTION>GetClientVariablesList</FUNCTION>
+ <FUNCTION>GetTickCount</FUNCTION>
+ <FUNCTION>PreserveSingleQuotes</FUNCTION>
+ <FUNCTION>QuotedValueList</FUNCTION>
+ <FUNCTION>StripCR</FUNCTION>
+ <FUNCTION>URLEncodedFormat</FUNCTION>
+ <FUNCTION>ValueList</FUNCTION>
+ <FUNCTION>WriteOutput</FUNCTION>
+
+ <FUNCTION>ParameterExists</FUNCTION>
+
+ <OPERATOR>IS</OPERATOR>
+ <OPERATOR>EQ</OPERATOR>
+ <OPERATOR>NEQ</OPERATOR>
+ <OPERATOR>GT</OPERATOR>
+ <OPERATOR>GTE</OPERATOR>
+ <OPERATOR>LT</OPERATOR>
+ <OPERATOR>LTE</OPERATOR>
+
+ <OPERATOR>LESS</OPERATOR>
+ <OPERATOR>GREATER</OPERATOR>
+ <OPERATOR>THAN</OPERATOR>
+
+ <OPERATOR>AND</OPERATOR>
+ <OPERATOR>OR</OPERATOR>
+ <OPERATOR>NOT</OPERATOR>
+ <OPERATOR>XOR</OPERATOR>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="CFTAGS" DEFAULT="KEYWORD3">
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="KEYWORD3">##</SEQ>
+
+ <SPAN TYPE="LITERAL2">
+ <BEGIN>#</BEGIN>
+ <END>#</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <KEYWORD2>ArrayAppend</KEYWORD2>
+ <KEYWORD2>ArrayAvg</KEYWORD2>
+ <KEYWORD2>ArrayClear</KEYWORD2>
+ <KEYWORD2>ArrayDeleteAt</KEYWORD2>
+ <KEYWORD2>ArrayInsertAt</KEYWORD2>
+ <KEYWORD2>ArrayIsEmpty</KEYWORD2>
+ <KEYWORD2>ArrayLen</KEYWORD2>
+ <KEYWORD2>ArrayMax</KEYWORD2>
+ <KEYWORD2>ArrayMin</KEYWORD2>
+ <KEYWORD2>ArrayNew</KEYWORD2>
+ <KEYWORD2>ArrayPrepend</KEYWORD2>
+ <KEYWORD2>ArrayResize</KEYWORD2>
+ <KEYWORD2>ArraySet</KEYWORD2>
+ <KEYWORD2>ArraySort</KEYWORD2>
+ <KEYWORD2>ArraySum</KEYWORD2>
+ <KEYWORD2>ArraySwap</KEYWORD2>
+ <KEYWORD2>ArrayToList</KEYWORD2>
+ <KEYWORD2>IsArray</KEYWORD2>
+ <KEYWORD2>ListToArray</KEYWORD2>
+
+ <KEYWORD2>CreateDate</KEYWORD2>
+ <KEYWORD2>CreateDateTime</KEYWORD2>
+ <KEYWORD2>CreateODBCTime</KEYWORD2>
+ <KEYWORD2>CreateODBCDate</KEYWORD2>
+ <KEYWORD2>CreateODBCDateTime</KEYWORD2>
+ <KEYWORD2>CreateTime</KEYWORD2>
+ <KEYWORD2>CreateTimeSpan</KEYWORD2>
+ <KEYWORD2>DateAdd</KEYWORD2>
+ <KEYWORD2>DateCompare</KEYWORD2>
+ <KEYWORD2>DateDiff</KEYWORD2>
+ <KEYWORD2>DatePart</KEYWORD2>
+ <KEYWORD2>Day</KEYWORD2>
+ <KEYWORD2>DayOfWeek</KEYWORD2>
+ <KEYWORD2>DayOfWeekAsString</KEYWORD2>
+ <KEYWORD2>DayOfYear</KEYWORD2>
+ <KEYWORD2>DaysInMonth</KEYWORD2>
+ <KEYWORD2>DaysInYear</KEYWORD2>
+ <KEYWORD2>FirstDayOfMonth</KEYWORD2>
+ <KEYWORD2>Hour</KEYWORD2>
+ <KEYWORD2>Minute</KEYWORD2>
+ <KEYWORD2>Month</KEYWORD2>
+ <KEYWORD2>MonthAsString</KEYWORD2>
+ <KEYWORD2>Now</KEYWORD2>
+ <KEYWORD2>ParseDateTime</KEYWORD2>
+ <KEYWORD2>Quarter</KEYWORD2>
+ <KEYWORD2>Second</KEYWORD2>
+ <KEYWORD2>Week</KEYWORD2>
+ <KEYWORD2>Year</KEYWORD2>
+
+ <KEYWORD2>IsArray</KEYWORD2>
+ <KEYWORD2>IsAuthenticated</KEYWORD2>
+ <KEYWORD2>IsAuthorized</KEYWORD2>
+ <KEYWORD2>IsBoolean</KEYWORD2>
+ <KEYWORD2>IsDate</KEYWORD2>
+ <KEYWORD2>IsDebugMode</KEYWORD2>
+ <KEYWORD2>IsDefined</KEYWORD2>
+ <KEYWORD2>IsLeapYear</KEYWORD2>
+ <KEYWORD2>IsNumeric</KEYWORD2>
+ <KEYWORD2>IsNumericDate</KEYWORD2>
+ <KEYWORD2>IsQuery</KEYWORD2>
+ <KEYWORD2>IsSimpleValue</KEYWORD2>
+ <KEYWORD2>IsStruct</KEYWORD2>
+
+ <KEYWORD2>DateFormat</KEYWORD2>
+ <KEYWORD2>DecimalFormat</KEYWORD2>
+ <KEYWORD2>DollarFormat</KEYWORD2>
+ <KEYWORD2>FormatBaseN</KEYWORD2>
+ <KEYWORD2>HTMLCodeFormat</KEYWORD2>
+ <KEYWORD2>HTMLEditFormat</KEYWORD2>
+ <KEYWORD2>NumberFormat</KEYWORD2>
+ <KEYWORD2>ParagraphFormat</KEYWORD2>
+ <KEYWORD2>TimeFormat</KEYWORD2>
+ <KEYWORD2>YesNoFormat</KEYWORD2>
+
+ <KEYWORD2>DE</KEYWORD2>
+ <KEYWORD2>Evaluate</KEYWORD2>
+ <KEYWORD2>IIf</KEYWORD2>
+ <KEYWORD2>SetVariable</KEYWORD2>
+
+ <KEYWORD2>ArrayToList</KEYWORD2>
+ <KEYWORD2>ListAppend</KEYWORD2>
+ <KEYWORD2>ListChangeDelims</KEYWORD2>
+ <KEYWORD2>ListContains</KEYWORD2>
+ <KEYWORD2>ListContainsNoCase</KEYWORD2>
+ <KEYWORD2>ListDeleteAt</KEYWORD2>
+ <KEYWORD2>ListFind</KEYWORD2>
+ <KEYWORD2>ListFindNoCase</KEYWORD2>
+ <KEYWORD2>ListFirst</KEYWORD2>
+ <KEYWORD2>ListGetAt</KEYWORD2>
+ <KEYWORD2>ListInsertAt</KEYWORD2>
+ <KEYWORD2>ListLast</KEYWORD2>
+ <KEYWORD2>ListLen</KEYWORD2>
+ <KEYWORD2>ListPrepend</KEYWORD2>
+ <KEYWORD2>ListRest</KEYWORD2>
+ <KEYWORD2>ListSetAt</KEYWORD2>
+ <KEYWORD2>ListToArray</KEYWORD2>
+
+ <KEYWORD2>StructClear</KEYWORD2>
+ <KEYWORD2>StructCopy</KEYWORD2>
+ <KEYWORD2>StructCount</KEYWORD2>
+ <KEYWORD2>StructDelete</KEYWORD2>
+ <KEYWORD2>StructFind</KEYWORD2>
+ <KEYWORD2>StructInsert</KEYWORD2>
+ <KEYWORD2>StructIsEmpty</KEYWORD2>
+ <KEYWORD2>StructKeyExists</KEYWORD2>
+ <KEYWORD2>StructNew</KEYWORD2>
+ <KEYWORD2>StructUpdate</KEYWORD2>
+
+ <KEYWORD2>GetLocale</KEYWORD2>
+ <KEYWORD2>LSCurrencyFormat</KEYWORD2>
+ <KEYWORD2>LSDateFormat</KEYWORD2>
+ <KEYWORD2>LSIsCurrency</KEYWORD2>
+ <KEYWORD2>LSIsDate</KEYWORD2>
+ <KEYWORD2>LSIsNumeric</KEYWORD2>
+ <KEYWORD2>LSNumberFormat</KEYWORD2>
+ <KEYWORD2>LSParseCurrency</KEYWORD2>
+ <KEYWORD2>LSParseDateTime</KEYWORD2>
+ <KEYWORD2>LSParseNumber</KEYWORD2>
+ <KEYWORD2>LSTimeFormat</KEYWORD2>
+ <KEYWORD2>SetLocale</KEYWORD2>
+
+ <KEYWORD2>Abs</KEYWORD2>
+ <KEYWORD2>Atn</KEYWORD2>
+ <KEYWORD2>BitAnd</KEYWORD2>
+ <KEYWORD2>BitMaskClear</KEYWORD2>
+ <KEYWORD2>BitMaskRead</KEYWORD2>
+ <KEYWORD2>BitMaskSet</KEYWORD2>
+ <KEYWORD2>BitNot</KEYWORD2>
+ <KEYWORD2>BitOr</KEYWORD2>
+ <KEYWORD2>BitSHLN</KEYWORD2>
+ <KEYWORD2>BitSHRN</KEYWORD2>
+ <KEYWORD2>BitXor</KEYWORD2>
+ <KEYWORD2>Ceiling</KEYWORD2>
+ <KEYWORD2>Cos</KEYWORD2>
+ <KEYWORD2>DecrementValue</KEYWORD2>
+ <KEYWORD2>Exp</KEYWORD2>
+ <KEYWORD2>Fix</KEYWORD2>
+ <KEYWORD2>IncrementValue</KEYWORD2>
+ <KEYWORD2>InputBaseN</KEYWORD2>
+ <KEYWORD2>Int</KEYWORD2>
+ <KEYWORD2>Log</KEYWORD2>
+ <KEYWORD2>Log10</KEYWORD2>
+ <KEYWORD2>Max</KEYWORD2>
+ <KEYWORD2>Min</KEYWORD2>
+ <KEYWORD2>Pi</KEYWORD2>
+ <KEYWORD2>Rand</KEYWORD2>
+ <KEYWORD2>Randomize</KEYWORD2>
+ <KEYWORD2>RandRange</KEYWORD2>
+ <KEYWORD2>Round</KEYWORD2>
+ <KEYWORD2>Sgn</KEYWORD2>
+ <KEYWORD2>Sin</KEYWORD2>
+ <KEYWORD2>Sqr</KEYWORD2>
+ <KEYWORD2>Tan</KEYWORD2>
+
+ <KEYWORD2>Asc</KEYWORD2>
+ <KEYWORD2>Chr</KEYWORD2>
+ <KEYWORD2>CJustify</KEYWORD2>
+ <KEYWORD2>Compare</KEYWORD2>
+ <KEYWORD2>CompareNoCase</KEYWORD2>
+ <KEYWORD2>Find</KEYWORD2>
+ <KEYWORD2>FindNoCase</KEYWORD2>
+ <KEYWORD2>FindOneOf</KEYWORD2>
+ <KEYWORD2>GetToken</KEYWORD2>
+ <KEYWORD2>Insert</KEYWORD2>
+ <KEYWORD2>LCase</KEYWORD2>
+ <KEYWORD2>Left</KEYWORD2>
+ <KEYWORD2>Len</KEYWORD2>
+ <KEYWORD2>LJustify</KEYWORD2>
+ <KEYWORD2>LTrim</KEYWORD2>
+ <KEYWORD2>Mid</KEYWORD2>
+ <KEYWORD2>REFind</KEYWORD2>
+ <KEYWORD2>REFindNoCase</KEYWORD2>
+ <KEYWORD2>RemoveChars</KEYWORD2>
+ <KEYWORD2>RepeatString</KEYWORD2>
+ <KEYWORD2>Replace</KEYWORD2>
+ <KEYWORD2>ReplaceList</KEYWORD2>
+ <KEYWORD2>ReplaceNoCase</KEYWORD2>
+ <KEYWORD2>REReplace</KEYWORD2>
+ <KEYWORD2>REReplaceNoCase</KEYWORD2>
+ <KEYWORD2>Reverse</KEYWORD2>
+ <KEYWORD2>Right</KEYWORD2>
+ <KEYWORD2>RJustify</KEYWORD2>
+ <KEYWORD2>RTrim</KEYWORD2>
+ <KEYWORD2>SpanExcluding</KEYWORD2>
+ <KEYWORD2>SpanIncluding</KEYWORD2>
+ <KEYWORD2>Trim</KEYWORD2>
+ <KEYWORD2>UCase</KEYWORD2>
+ <KEYWORD2>Val</KEYWORD2>
+
+ <KEYWORD2>DirectoryExists</KEYWORD2>
+ <KEYWORD2>ExpandPath</KEYWORD2>
+ <KEYWORD2>FileExists</KEYWORD2>
+ <KEYWORD2>GetDirectoryFromPath</KEYWORD2>
+ <KEYWORD2>GetFileFromPath</KEYWORD2>
+ <KEYWORD2>GetTempDirectory</KEYWORD2>
+ <KEYWORD2>GetTempFile</KEYWORD2>
+ <KEYWORD2>GetTemplatePath</KEYWORD2>
+
+ <KEYWORD2>QueryAddRow</KEYWORD2>
+ <KEYWORD2>QueryNew</KEYWORD2>
+ <KEYWORD2>QuerySetCell</KEYWORD2>
+
+ <KEYWORD2>Decrypt</KEYWORD2>
+ <KEYWORD2>DeleteClientVariable</KEYWORD2>
+ <KEYWORD2>Encrypt</KEYWORD2>
+ <KEYWORD2>GetBaseTagData</KEYWORD2>
+ <KEYWORD2>GetBaseTagList</KEYWORD2>
+ <KEYWORD2>GetClientVariablesList</KEYWORD2>
+ <KEYWORD2>GetTickCount</KEYWORD2>
+ <KEYWORD2>PreserveSingleQuotes</KEYWORD2>
+ <KEYWORD2>QuotedValueList</KEYWORD2>
+ <KEYWORD2>StripCR</KEYWORD2>
+ <KEYWORD2>URLEncodedFormat</KEYWORD2>
+ <KEYWORD2>ValueList</KEYWORD2>
+ <KEYWORD2>WriteOutput</KEYWORD2>
+
+ <KEYWORD2>ParameterExists</KEYWORD2>
+
+ <OPERATOR>IS</OPERATOR>
+ <OPERATOR>EQ</OPERATOR>
+ <OPERATOR>NEQ</OPERATOR>
+ <OPERATOR>GT</OPERATOR>
+ <OPERATOR>GTE</OPERATOR>
+ <OPERATOR>LT</OPERATOR>
+ <OPERATOR>LTE</OPERATOR>
+
+ <OPERATOR>LESS</OPERATOR>
+ <OPERATOR>GREATER</OPERATOR>
+ <OPERATOR>THAN</OPERATOR>
+
+ <OPERATOR>AND</OPERATOR>
+ <OPERATOR>OR</OPERATOR>
+ <OPERATOR>NOT</OPERATOR>
+ <OPERATOR>XOR</OPERATOR>
+ </KEYWORDS>
+ </RULES>
</MODE>
\ No newline at end of file
diff --git a/jEdit/modes/cplusplus.xml b/jEdit/modes/cplusplus.xml
index ab20ba4..978cbaa 100644
--- a/jEdit/modes/cplusplus.xml
+++ b/jEdit/modes/cplusplus.xml
@@ -1,125 +1,125 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Extension of c.xml to add C++ specific syntax. -->
-<!-- With some Qt keywords added -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="(?!^\s*(#|//)).*(\b(if|while|for)\s*\(.*\)|\b(else|do)\b)[^{;]*$" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^\s*((.*case\b.*|[\p{Alpha}_][\p{Alnum}_]*)\s*(slots)?:(?!:)).*$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- </PROPS>
-
- <RULES
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <EOL_SPAN TYPE="KEYWORD2" AT_WHITESPACE_END="TRUE" DELEGATE="CPP">#</EOL_SPAN>
-
- <IMPORT DELEGATE="LEX"/>
- <IMPORT DELEGATE="CORE"/>
- </RULES>
-
- <!-- Core C++ language -->
- <RULES SET="LEX"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
-
- <!-- A hack not to mark namespace qualification like "std::"
- as labels. -->
- <SEQ TYPE="OPERATOR">::</SEQ>
-
- <IMPORT DELEGATE="c::LEX"/>
- </RULES>
-
- <!-- Core C++ language -->
- <RULES SET="CORE"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
-
- <IMPORT DELEGATE="c::CORE"/>
-
- <KEYWORDS>
- <KEYWORD3>catch</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>const_cast</KEYWORD3>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD3>dynamic_cast</KEYWORD3>
- <KEYWORD1>explicit</KEYWORD1>
- <KEYWORD2>export</KEYWORD2>
- <KEYWORD1>friend</KEYWORD1>
- <KEYWORD3>mutable</KEYWORD3>
- <KEYWORD2>namespace</KEYWORD2>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD3>operator</KEYWORD3>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>signals</KEYWORD1>
- <KEYWORD1>slots</KEYWORD1>
- <KEYWORD3>reinterpret_cast</KEYWORD3>
- <KEYWORD3>static_assert</KEYWORD3>
- <KEYWORD3>static_cast</KEYWORD3>
- <KEYWORD3>template</KEYWORD3>
- <LITERAL2>this</LITERAL2>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD3>typeid</KEYWORD3>
- <KEYWORD3>typename</KEYWORD3>
- <KEYWORD2>using</KEYWORD2>
- <KEYWORD1>virtual</KEYWORD1>
-
- </KEYWORDS>
- </RULES>
-
- <!-- Preprocessor specific rules -->
- <RULES SET="CPP"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
-
- <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="c::INCLUDE">include\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="c::LEX">endif\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="c::CONDITION">elif\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="c::CONDITION">if\b</EOL_SPAN_REGEXP>
-
- <IMPORT DELEGATE="LEX"/>
-
- <!-- Directives -->
- <KEYWORDS>
- <MARKUP>ifdef</MARKUP>
- <MARKUP>ifndef</MARKUP>
- <MARKUP>else</MARKUP>
- <MARKUP>error</MARKUP>
- <MARKUP>line</MARKUP>
- <MARKUP>pragma</MARKUP>
- <MARKUP>undef</MARKUP>
- <MARKUP>warning</MARKUP>
- </KEYWORDS>
- </RULES>
-
- <!-- After #define directive -->
- <!-- Almost same as the normal code,
- except two additional operators # and ##. -->
- <RULES SET="DEFINE"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <SEQ TYPE="OPERATOR">#</SEQ>
- <IMPORT DELEGATE="LEX"/>
- <IMPORT DELEGATE="CORE"/>
- </RULES>
-
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Extension of c.xml to add C++ specific syntax. -->
+<!-- With some Qt keywords added -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="(?!^\s*(#|//)).*(\b(if|while|for)\s*\(.*\)|\b(else|do)\b)[^{;]*$" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^\s*((.*case\b.*|[\p{Alpha}_][\p{Alnum}_]*)\s*(slots)?:(?!:)).*$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+
+ <RULES
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <EOL_SPAN TYPE="KEYWORD2" AT_WHITESPACE_END="TRUE" DELEGATE="CPP">#</EOL_SPAN>
+
+ <IMPORT DELEGATE="LEX"/>
+ <IMPORT DELEGATE="CORE"/>
+ </RULES>
+
+ <!-- Core C++ language -->
+ <RULES SET="LEX"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+
+ <!-- A hack not to mark namespace qualification like "std::"
+ as labels. -->
+ <SEQ TYPE="OPERATOR">::</SEQ>
+
+ <IMPORT DELEGATE="c::LEX"/>
+ </RULES>
+
+ <!-- Core C++ language -->
+ <RULES SET="CORE"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+
+ <IMPORT DELEGATE="c::CORE"/>
+
+ <KEYWORDS>
+ <KEYWORD3>catch</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>const_cast</KEYWORD3>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD3>dynamic_cast</KEYWORD3>
+ <KEYWORD1>explicit</KEYWORD1>
+ <KEYWORD2>export</KEYWORD2>
+ <KEYWORD1>friend</KEYWORD1>
+ <KEYWORD3>mutable</KEYWORD3>
+ <KEYWORD2>namespace</KEYWORD2>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD3>operator</KEYWORD3>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>signals</KEYWORD1>
+ <KEYWORD1>slots</KEYWORD1>
+ <KEYWORD3>reinterpret_cast</KEYWORD3>
+ <KEYWORD3>static_assert</KEYWORD3>
+ <KEYWORD3>static_cast</KEYWORD3>
+ <KEYWORD3>template</KEYWORD3>
+ <LITERAL2>this</LITERAL2>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD3>typeid</KEYWORD3>
+ <KEYWORD3>typename</KEYWORD3>
+ <KEYWORD2>using</KEYWORD2>
+ <KEYWORD1>virtual</KEYWORD1>
+
+ </KEYWORDS>
+ </RULES>
+
+ <!-- Preprocessor specific rules -->
+ <RULES SET="CPP"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+
+ <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="c::INCLUDE">include\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="c::LEX">endif\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="c::CONDITION">elif\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="c::CONDITION">if\b</EOL_SPAN_REGEXP>
+
+ <IMPORT DELEGATE="LEX"/>
+
+ <!-- Directives -->
+ <KEYWORDS>
+ <MARKUP>ifdef</MARKUP>
+ <MARKUP>ifndef</MARKUP>
+ <MARKUP>else</MARKUP>
+ <MARKUP>error</MARKUP>
+ <MARKUP>line</MARKUP>
+ <MARKUP>pragma</MARKUP>
+ <MARKUP>undef</MARKUP>
+ <MARKUP>warning</MARKUP>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- After #define directive -->
+ <!-- Almost same as the normal code,
+ except two additional operators # and ##. -->
+ <RULES SET="DEFINE"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <IMPORT DELEGATE="LEX"/>
+ <IMPORT DELEGATE="CORE"/>
+ </RULES>
+
+</MODE>
+
diff --git a/jEdit/modes/csharp.xml b/jEdit/modes/csharp.xml
index 167c460..92b3428 100644
--- a/jEdit/modes/csharp.xml
+++ b/jEdit/modes/csharp.xml
@@ -1,188 +1,188 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^.*(default:\s*|case.*:.*)$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- DocComments may have XML in them -->
- <EOL_SPAN TYPE="COMMENT3" DELEGATE="DOC_COMMENT">///</EOL_SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <!-- verbatim strings -->
- <SPAN TYPE="LITERAL3" NO_LINE_BREAK="FALSE">
- <BEGIN>@"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="KEYWORD2">#if</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#else</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#elif</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#endif</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#define</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#undef</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#warning</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#error</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#line</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#region</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#endregion</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
-
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>base</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>checked</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>decimal</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>delegate</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>explicit</KEYWORD1>
- <KEYWORD1>extern</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD1>fixed</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>foreach</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>implicit</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>internal</KEYWORD1>
- <KEYWORD1>is</KEYWORD1>
- <KEYWORD1>lock</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>operator</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>override</KEYWORD1>
- <KEYWORD1>params</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>readonly</KEYWORD1>
- <KEYWORD1>ref</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>sealed</KEYWORD1>
- <KEYWORD1>sizeof</KEYWORD1>
- <KEYWORD1>stackalloc</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>typeof</KEYWORD1>
- <KEYWORD1>unchecked</KEYWORD1>
- <KEYWORD1>unsafe</KEYWORD1>
- <KEYWORD1>virtual</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <KEYWORD2>using</KEYWORD2>
- <KEYWORD2>namespace</KEYWORD2>
-
- <KEYWORD3>bool</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>enum</KEYWORD3>
- <KEYWORD3>event</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>interface</KEYWORD3>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD3>object</KEYWORD3>
- <KEYWORD3>sbyte</KEYWORD3>
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD3>string</KEYWORD3>
- <KEYWORD3>struct</KEYWORD3>
- <KEYWORD3>uint</KEYWORD3>
- <KEYWORD3>ulong</KEYWORD3>
- <KEYWORD3>ushort</KEYWORD3>
- <KEYWORD3>void</KEYWORD3>
-
- <LITERAL2>false</LITERAL2>
- <LITERAL2>null</LITERAL2>
- <LITERAL2>this</LITERAL2>
- <LITERAL2>true</LITERAL2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="DOC_COMMENT" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
- <!-- XML comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><--</BEGIN>
- <END>--></END>
- </SPAN>
- <!-- XML tags -->
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^.*(default:\s*|case.*:.*)$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- DocComments may have XML in them -->
+ <EOL_SPAN TYPE="COMMENT3" DELEGATE="DOC_COMMENT">///</EOL_SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <!-- verbatim strings -->
+ <SPAN TYPE="LITERAL3" NO_LINE_BREAK="FALSE">
+ <BEGIN>@"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="KEYWORD2">#if</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#else</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#elif</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#endif</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#define</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#undef</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#warning</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#error</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#line</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#region</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#endregion</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>base</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>checked</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>decimal</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>delegate</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>explicit</KEYWORD1>
+ <KEYWORD1>extern</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD1>fixed</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>foreach</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>implicit</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>internal</KEYWORD1>
+ <KEYWORD1>is</KEYWORD1>
+ <KEYWORD1>lock</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>operator</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+ <KEYWORD1>override</KEYWORD1>
+ <KEYWORD1>params</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>readonly</KEYWORD1>
+ <KEYWORD1>ref</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>sealed</KEYWORD1>
+ <KEYWORD1>sizeof</KEYWORD1>
+ <KEYWORD1>stackalloc</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>typeof</KEYWORD1>
+ <KEYWORD1>unchecked</KEYWORD1>
+ <KEYWORD1>unsafe</KEYWORD1>
+ <KEYWORD1>virtual</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <KEYWORD2>using</KEYWORD2>
+ <KEYWORD2>namespace</KEYWORD2>
+
+ <KEYWORD3>bool</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>enum</KEYWORD3>
+ <KEYWORD3>event</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>interface</KEYWORD3>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD3>object</KEYWORD3>
+ <KEYWORD3>sbyte</KEYWORD3>
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD3>string</KEYWORD3>
+ <KEYWORD3>struct</KEYWORD3>
+ <KEYWORD3>uint</KEYWORD3>
+ <KEYWORD3>ulong</KEYWORD3>
+ <KEYWORD3>ushort</KEYWORD3>
+ <KEYWORD3>void</KEYWORD3>
+
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ <LITERAL2>this</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="DOC_COMMENT" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
+ <!-- XML comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><--</BEGIN>
+ <END>--></END>
+ </SPAN>
+ <!-- XML tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/css.xml b/jEdit/modes/css.xml
index 4ede938..35e211c 100644
--- a/jEdit/modes/css.xml
+++ b/jEdit/modes/css.xml
@@ -1,673 +1,677 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="noWordSep" VALUE="-" />
- <PROPERTY NAME="noWordSep" VALUE="_" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="-?\d+(\.\d+)?(pt|pc|in|mm|cm|em|ex|px|ms|s|%|)"
- NO_WORD_SEP="-_%">
-
- <!-- classes: -->
- <MARK_FOLLOWING TYPE="LITERAL1">.</MARK_FOLLOWING>
- <!-- IDs: -->
- <MARK_FOLLOWING TYPE="LITERAL2">#</MARK_FOLLOWING>
-
- <SEQ TYPE="OPERATOR">></SEQ>
-
- <!-- TODO: selectors, see http://www.w3.org/TR/REC-CSS2/selector.html -->
-
- <SEQ TYPE="OPERATOR" DELEGATE="PSEUDO">:</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
-
- <!-- property blocks: -->
- <SPAN TYPE="OPERATOR" DELEGATE="PROPERTIES">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <IMPORT DELEGATE="GLOBAL" />
- <IMPORT DELEGATE="html::TAGS" />
- </RULES>
-
-
- <!-- Pseudo classes like ":active" -->
- <RULES SET="PSEUDO">
- <!-- Delegate back: -->
- <SEQ TYPE="NULL" DELEGATE="MAIN"> </SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="MAIN">,</SEQ>
-
- <SEQ TYPE="OPERATOR" DELEGATE="PROPERTIES">{</SEQ>
-
- <SPAN_REGEXP HASH_CHAR="lang" TYPE="KEYWORD4">
- <BEGIN>lang\s*\(</BEGIN>
- <END>)</END>
- </SPAN_REGEXP>
-
- <SPAN_REGEXP HASH_CHAR="lang" TYPE="KEYWORD4">
- <BEGIN>lang\s*\(</BEGIN>
- <END>)</END>
- </SPAN_REGEXP>
-
- <!-- For delegating to PROPERTIES: -->
- <IMPORT DELEGATE="GLOBAL" />
-
- <KEYWORDS>
- <KEYWORD4>after</KEYWORD4>
- <KEYWORD4>before</KEYWORD4>
- <KEYWORD4>first-child</KEYWORD4>
- <KEYWORD4>link</KEYWORD4>
- <KEYWORD4>visited</KEYWORD4>
- <KEYWORD4>active</KEYWORD4>
- <KEYWORD4>hover</KEYWORD4>
- <KEYWORD4>focus</KEYWORD4>
- </KEYWORDS>
- </RULES>
-
- <!-- Properties: -->
- <RULES SET="PROPERTIES" ESCAPE="\">
- <!-- Delegate back -->
- <SEQ TYPE="OPERATOR" DELEGATE="MAIN">}</SEQ>
-
- <SEQ TYPE="OPERATOR" DELEGATE="PROP_VALUE">:</SEQ>
-
- <IMPORT DELEGATE="GLOBAL" />
-
- <KEYWORDS>
- <!-- CSS2 properties -->
-
- <!-- Color and background properties -->
- <KEYWORD2>background</KEYWORD2>
- <KEYWORD2>background-attachment</KEYWORD2>
- <KEYWORD2>background-color</KEYWORD2>
- <KEYWORD2>background-image</KEYWORD2>
- <KEYWORD2>background-position</KEYWORD2>
- <KEYWORD2>background-repeat</KEYWORD2>
- <KEYWORD2>color</KEYWORD2>
-
- <!-- Font properties -->
- <KEYWORD2>font</KEYWORD2>
- <KEYWORD2>font-family</KEYWORD2>
- <KEYWORD2>font-size</KEYWORD2>
- <KEYWORD2>font-size-adjust</KEYWORD2>
- <KEYWORD2>font-style</KEYWORD2>
- <KEYWORD2>font-variant</KEYWORD2>
- <KEYWORD2>font-weight</KEYWORD2>
- <KEYWORD2>font-stretch</KEYWORD2>
- <KEYWORD2>src</KEYWORD2>
- <KEYWORD2>definition-src</KEYWORD2>
- <KEYWORD2>unicode-range</KEYWORD2>
- <KEYWORD2>panose-1</KEYWORD2>
- <KEYWORD2>stemv</KEYWORD2>
- <KEYWORD2>stemh</KEYWORD2>
- <KEYWORD2>units-per-em</KEYWORD2>
- <KEYWORD2>slope</KEYWORD2>
- <KEYWORD2>cap-height</KEYWORD2>
- <KEYWORD2>x-height</KEYWORD2>
- <KEYWORD2>ascent</KEYWORD2>
- <KEYWORD2>descent</KEYWORD2>
- <KEYWORD2>baseline</KEYWORD2>
- <KEYWORD2>centerline</KEYWORD2>
- <KEYWORD2>mathline</KEYWORD2>
- <KEYWORD2>topline</KEYWORD2>
-
- <!-- Text properties -->
- <KEYWORD2>letter-spacing</KEYWORD2>
- <KEYWORD2>text-align</KEYWORD2>
- <KEYWORD2>text-shadow</KEYWORD2>
- <KEYWORD2>text-decoration</KEYWORD2>
- <KEYWORD2>text-indent</KEYWORD2>
- <KEYWORD2>text-transform</KEYWORD2>
- <KEYWORD2>word-spacing</KEYWORD2>
- <KEYWORD2>letter-spacing</KEYWORD2>
- <KEYWORD2>white-space</KEYWORD2>
-
- <!-- Box properties -->
- <KEYWORD2>border</KEYWORD2>
- <KEYWORD2>bottom</KEYWORD2>
- <KEYWORD2>border-collapse</KEYWORD2>
- <KEYWORD2>border-spacing</KEYWORD2>
- <KEYWORD2>border-bottom</KEYWORD2>
- <KEYWORD2>border-bottom-style</KEYWORD2>
- <KEYWORD2>border-bottom-width</KEYWORD2>
- <KEYWORD2>border-bottom-color</KEYWORD2>
- <KEYWORD2>border-left</KEYWORD2>
- <KEYWORD2>border-left-style</KEYWORD2>
- <KEYWORD2>border-left-width</KEYWORD2>
- <KEYWORD2>border-left-color</KEYWORD2>
- <KEYWORD2>border-right</KEYWORD2>
- <KEYWORD2>border-right-style</KEYWORD2>
- <KEYWORD2>border-right-width</KEYWORD2>
- <KEYWORD2>border-right-color</KEYWORD2>
- <KEYWORD2>border-top</KEYWORD2>
- <KEYWORD2>border-top-style</KEYWORD2>
- <KEYWORD2>border-top-width</KEYWORD2>
- <KEYWORD2>border-top-color</KEYWORD2>
- <KEYWORD2>border-color</KEYWORD2>
- <KEYWORD2>border-style</KEYWORD2>
- <KEYWORD2>border-width</KEYWORD2>
- <KEYWORD2>clear</KEYWORD2>
- <KEYWORD2>float</KEYWORD2>
- <KEYWORD2>height</KEYWORD2>
- <KEYWORD2>margin</KEYWORD2>
- <KEYWORD2>margin-bottom</KEYWORD2>
- <KEYWORD2>margin-left</KEYWORD2>
- <KEYWORD2>margin-right</KEYWORD2>
- <KEYWORD2>margin-top</KEYWORD2>
- <KEYWORD2>padding</KEYWORD2>
- <KEYWORD2>padding-bottom</KEYWORD2>
- <KEYWORD2>padding-left</KEYWORD2>
- <KEYWORD2>padding-right</KEYWORD2>
- <KEYWORD2>padding-top</KEYWORD2>
- <KEYWORD2>clear</KEYWORD2>
-
- <!-- Visual formatting properties -->
- <KEYWORD2>display</KEYWORD2>
- <KEYWORD2>position</KEYWORD2>
- <KEYWORD2>top</KEYWORD2>
- <KEYWORD2>right</KEYWORD2>
- <KEYWORD2>bottom</KEYWORD2>
- <KEYWORD2>left</KEYWORD2>
- <KEYWORD2>float</KEYWORD2>
- <KEYWORD2>z-index</KEYWORD2>
- <KEYWORD2>direction</KEYWORD2>
- <KEYWORD2>unicode-bidi</KEYWORD2>
- <KEYWORD2>width</KEYWORD2>
- <KEYWORD2>min-width</KEYWORD2>
- <KEYWORD2>max-width</KEYWORD2>
- <KEYWORD2>height</KEYWORD2>
- <KEYWORD2>min-height</KEYWORD2>
- <KEYWORD2>max-height</KEYWORD2>
- <KEYWORD2>line-height</KEYWORD2>
- <KEYWORD2>vertical-align</KEYWORD2>
-
- <!-- Visual effects -->
- <KEYWORD2>overflow</KEYWORD2>
- <KEYWORD2>clip</KEYWORD2>
- <KEYWORD2>visibility</KEYWORD2>
-
- <!-- Page properties -->
- <KEYWORD2>size</KEYWORD2>
- <KEYWORD2>marks</KEYWORD2>
- <KEYWORD2>page-break-before</KEYWORD2>
- <KEYWORD2>page-break-after</KEYWORD2>
- <KEYWORD2>page-break-inside</KEYWORD2>
- <KEYWORD2>page</KEYWORD2>
- <KEYWORD2>orphans</KEYWORD2>
- <KEYWORD2>widows</KEYWORD2>
-
- <!-- Table properties -->
- <KEYWORD2>caption-side</KEYWORD2>
- <KEYWORD2>table-layout</KEYWORD2>
- <KEYWORD2>border-collapse</KEYWORD2>
- <KEYWORD2>border-spacing</KEYWORD2>
- <KEYWORD2>empty-cells</KEYWORD2>
- <KEYWORD2>speak-headers</KEYWORD2>
-
- <!-- User interface -->
- <KEYWORD2>cursor</KEYWORD2>
- <KEYWORD2>outline</KEYWORD2>
- <KEYWORD2>outline-width</KEYWORD2>
- <KEYWORD2>outline-style</KEYWORD2>
- <KEYWORD2>outline-color</KEYWORD2>
-
- <!-- Aural properties -->
- <KEYWORD2>azimuth</KEYWORD2>
- <KEYWORD2>volume</KEYWORD2>
- <KEYWORD2>speak</KEYWORD2>
- <KEYWORD2>pause</KEYWORD2>
- <KEYWORD2>pause-before</KEYWORD2>
- <KEYWORD2>pause-after</KEYWORD2>
- <KEYWORD2>cue</KEYWORD2>
- <KEYWORD2>cue-before</KEYWORD2>
- <KEYWORD2>cue-after</KEYWORD2>
- <KEYWORD2>play-during</KEYWORD2>
- <KEYWORD2>elevation</KEYWORD2>
- <KEYWORD2>speech-rate</KEYWORD2>
- <KEYWORD2>voice-family</KEYWORD2>
- <KEYWORD2>pitch</KEYWORD2>
- <KEYWORD2>pitch-range</KEYWORD2>
- <KEYWORD2>stress</KEYWORD2>
- <KEYWORD2>richness</KEYWORD2>
- <KEYWORD2>speak-punctuation</KEYWORD2>
- <KEYWORD2>speak-numeral</KEYWORD2>
- <KEYWORD2>speak-header-cell</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
-
- <!-- Values: -->
- <RULES SET="PROP_VALUE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="-?\d+(\.\d+)?(pt|pc|in|mm|cm|em|ex|px|ms|s|%|)"
- NO_WORD_SEP="-_%">
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- "functions" -->
- <SPAN_REGEXP TYPE="LITERAL1" HASH_CHARS="RU" MATCH_TYPE="KEYWORD1">
- <BEGIN>(rgb|url)\s*\(</BEGIN>
- <END>)</END>
- </SPAN_REGEXP>
-
- <!-- <SEQ DELEGATE="PROP_VALUE_COLOR">#</SEQ> -->
- <MARK_FOLLOWING TYPE="DIGIT">#</MARK_FOLLOWING>
-
- <SEQ_REGEXP HASH_CHAR="!" TYPE="KEYWORD2">!\s*important</SEQ_REGEXP>
-
- <!-- proprietary IE function: -->
- <SPAN_REGEXP TYPE="FUNCTION" DELEGATE="javascript::MAIN" HASH_CHAR="expression">
- <BEGIN>expression\s*\(</BEGIN>
- <END>)</END>
- </SPAN_REGEXP>
-
- <!-- Delegate back: -->
- <SEQ TYPE="OPERATOR" DELEGATE="PROPERTIES">;</SEQ>
- <SEQ TYPE="INVALID" DELEGATE="MAIN">}</SEQ> <!-- end properties block, but it's invalid -->
-
- <IMPORT DELEGATE="GLOBAL" />
-
- <KEYWORDS>
- <KEYWORD3>left</KEYWORD3>
- <KEYWORD3>right</KEYWORD3>
- <KEYWORD3>below</KEYWORD3>
- <KEYWORD3>level</KEYWORD3>
- <KEYWORD3>above</KEYWORD3>
- <KEYWORD3>higher</KEYWORD3>
- <KEYWORD3>lower</KEYWORD3>
- <KEYWORD3>show</KEYWORD3>
- <KEYWORD3>hide</KEYWORD3>
- <KEYWORD3>normal</KEYWORD3>
- <KEYWORD3>wider</KEYWORD3>
- <KEYWORD3>narrower</KEYWORD3>
- <KEYWORD3>ultra-condensed</KEYWORD3>
- <KEYWORD3>extra-condensed</KEYWORD3>
- <KEYWORD3>condensed</KEYWORD3>
- <KEYWORD3>semi-condensed</KEYWORD3>
- <KEYWORD3>semi-expanded</KEYWORD3>
- <KEYWORD3>expanded</KEYWORD3>
- <KEYWORD3>extra-expanded</KEYWORD3>
- <KEYWORD3>ultra-expanded</KEYWORD3>
- <KEYWORD3>normal</KEYWORD3>
- <KEYWORD3>italic</KEYWORD3>
- <KEYWORD3>oblique</KEYWORD3>
- <KEYWORD3>normal</KEYWORD3>
- <KEYWORD3>xx-small</KEYWORD3>
- <KEYWORD3>x-small</KEYWORD3>
- <KEYWORD3>small</KEYWORD3>
- <KEYWORD3>large</KEYWORD3>
- <KEYWORD3>x-large</KEYWORD3>
- <KEYWORD3>xx-large</KEYWORD3>
- <KEYWORD3>thin</KEYWORD3>
- <KEYWORD3>thick</KEYWORD3>
- <KEYWORD3>smaller</KEYWORD3>
- <KEYWORD3>larger</KEYWORD3>
- <KEYWORD3>small-caps</KEYWORD3>
- <KEYWORD3>inherit</KEYWORD3>
- <KEYWORD3>bold</KEYWORD3>
- <KEYWORD3>bolder</KEYWORD3>
- <KEYWORD3>lighter</KEYWORD3>
- <KEYWORD3>inside</KEYWORD3>
- <KEYWORD3>outside</KEYWORD3>
- <KEYWORD3>disc</KEYWORD3>
- <KEYWORD3>circle</KEYWORD3>
- <KEYWORD3>square</KEYWORD3>
- <KEYWORD3>decimal</KEYWORD3>
- <KEYWORD3>decimal-leading-zero</KEYWORD3>
- <KEYWORD3>lower-roman</KEYWORD3>
- <KEYWORD3>upper-roman</KEYWORD3>
- <KEYWORD3>lower-greek</KEYWORD3>
- <KEYWORD3>lower-alpha</KEYWORD3>
- <KEYWORD3>lower-latin</KEYWORD3>
- <KEYWORD3>upper-alpha</KEYWORD3>
- <KEYWORD3>upper-latin</KEYWORD3>
- <KEYWORD3>hebrew</KEYWORD3>
- <KEYWORD3>armenian</KEYWORD3>
- <KEYWORD3>georgian</KEYWORD3>
- <KEYWORD3>cjk-ideographic</KEYWORD3>
- <KEYWORD3>hiragana</KEYWORD3>
- <KEYWORD3>katakana</KEYWORD3>
- <KEYWORD3>hiragana-iroha</KEYWORD3>
- <KEYWORD3>katakana-iroha</KEYWORD3>
- <KEYWORD3>crop</KEYWORD3>
- <KEYWORD3>cross</KEYWORD3>
- <KEYWORD3>invert</KEYWORD3>
- <KEYWORD3>hidden</KEYWORD3>
- <KEYWORD3>always</KEYWORD3>
- <KEYWORD3>avoid</KEYWORD3>
- <KEYWORD3>x-low</KEYWORD3>
- <KEYWORD3>low</KEYWORD3>
- <KEYWORD3>high</KEYWORD3>
- <KEYWORD3>x-high</KEYWORD3>
- <KEYWORD3>absolute</KEYWORD3>
- <KEYWORD3>fixed</KEYWORD3>
- <KEYWORD3>relative</KEYWORD3>
- <KEYWORD3>static</KEYWORD3>
- <KEYWORD3>portrait</KEYWORD3>
- <KEYWORD3>landscape</KEYWORD3>
- <KEYWORD3>spell-out</KEYWORD3>
- <KEYWORD3>digits</KEYWORD3>
- <KEYWORD3>continuous</KEYWORD3>
- <KEYWORD3>x-slow</KEYWORD3>
- <KEYWORD3>slow</KEYWORD3>
- <KEYWORD3>fast</KEYWORD3>
- <KEYWORD3>x-fast</KEYWORD3>
- <KEYWORD3>faster</KEYWORD3>
- <KEYWORD3>slower</KEYWORD3>
- <KEYWORD3>underline</KEYWORD3>
- <KEYWORD3>overline</KEYWORD3>
- <KEYWORD3>line-through</KEYWORD3>
- <KEYWORD3>blink</KEYWORD3>
- <KEYWORD3>capitalize</KEYWORD3>
- <KEYWORD3>uppercase</KEYWORD3>
- <KEYWORD3>lowercase</KEYWORD3>
- <KEYWORD3>embed</KEYWORD3>
- <KEYWORD3>bidi-override</KEYWORD3>
- <KEYWORD3>baseline</KEYWORD3>
- <KEYWORD3>sub</KEYWORD3>
- <KEYWORD3>super</KEYWORD3>
- <KEYWORD3>top</KEYWORD3>
- <KEYWORD3>text-top</KEYWORD3>
- <KEYWORD3>middle</KEYWORD3>
- <KEYWORD3>bottom</KEYWORD3>
- <KEYWORD3>text-bottom</KEYWORD3>
- <KEYWORD3>visible</KEYWORD3>
- <KEYWORD3>hidden</KEYWORD3>
- <KEYWORD3>collapse</KEYWORD3>
- <KEYWORD3>soft</KEYWORD3>
- <KEYWORD3>loud</KEYWORD3>
- <KEYWORD3>x-loud</KEYWORD3>
- <KEYWORD3>pre</KEYWORD3>
- <KEYWORD3>nowrap</KEYWORD3>
- <KEYWORD3>dotted</KEYWORD3>
- <KEYWORD3>dashed</KEYWORD3>
- <KEYWORD3>solid</KEYWORD3>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>groove</KEYWORD3>
- <KEYWORD3>ridge</KEYWORD3>
- <KEYWORD3>inset</KEYWORD3>
- <KEYWORD3>outset</KEYWORD3>
- <KEYWORD3>once</KEYWORD3>
- <KEYWORD3>both</KEYWORD3>
- <KEYWORD3>silent</KEYWORD3>
- <KEYWORD3>medium</KEYWORD3>
- <KEYWORD3>mix</KEYWORD3>
- <KEYWORD3>male</KEYWORD3>
- <KEYWORD3>female</KEYWORD3>
- <KEYWORD3>child</KEYWORD3>
- <KEYWORD3>code</KEYWORD3>
-
- <!-- measurement units -->
- <KEYWORD3>left-side</KEYWORD3>
- <KEYWORD3>far-left</KEYWORD3>
- <KEYWORD3>center-left</KEYWORD3>
- <KEYWORD3>center</KEYWORD3>
- <KEYWORD3>right</KEYWORD3>
- <KEYWORD3>center-right</KEYWORD3>
- <KEYWORD3>far-right</KEYWORD3>
- <KEYWORD3>right-side</KEYWORD3>
- <KEYWORD3>justify</KEYWORD3>
- <KEYWORD3>behind</KEYWORD3>
- <KEYWORD3>leftwards</KEYWORD3>
- <KEYWORD3>rightwards</KEYWORD3>
- <KEYWORD3>inherit</KEYWORD3>
- <KEYWORD3>scroll</KEYWORD3>
- <KEYWORD3>fixed</KEYWORD3>
- <KEYWORD3>transparent</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>repeat</KEYWORD3>
- <KEYWORD3>repeat-x</KEYWORD3>
- <KEYWORD3>repeat-y</KEYWORD3>
- <KEYWORD3>no-repeat</KEYWORD3>
- <KEYWORD3>collapse</KEYWORD3>
- <KEYWORD3>separate</KEYWORD3>
- <KEYWORD3>auto</KEYWORD3>
- <KEYWORD3>open-quote</KEYWORD3>
- <KEYWORD3>close-quote</KEYWORD3>
- <KEYWORD3>no-open-quote</KEYWORD3>
- <KEYWORD3>no-close-quote</KEYWORD3>
- <KEYWORD3>cue-before</KEYWORD3>
- <KEYWORD3>cue-after</KEYWORD3>
- <KEYWORD3>crosshair</KEYWORD3>
- <KEYWORD3>default</KEYWORD3>
- <KEYWORD3>pointer</KEYWORD3>
- <KEYWORD3>move</KEYWORD3>
- <KEYWORD3>e-resize</KEYWORD3>
- <KEYWORD3>ne-resize</KEYWORD3>
- <KEYWORD3>nw-resize</KEYWORD3>
- <KEYWORD3>n-resize</KEYWORD3>
- <KEYWORD3>se-resize</KEYWORD3>
- <KEYWORD3>sw-resize</KEYWORD3>
- <KEYWORD3>s-resize</KEYWORD3>
- <KEYWORD3>w-resize</KEYWORD3>
- <KEYWORD3>text</KEYWORD3>
- <KEYWORD3>wait</KEYWORD3>
- <KEYWORD3>help</KEYWORD3>
- <KEYWORD3>ltr</KEYWORD3>
- <KEYWORD3>rtl</KEYWORD3>
- <KEYWORD3>inline</KEYWORD3>
- <KEYWORD3>block</KEYWORD3>
- <KEYWORD3>list-item</KEYWORD3>
- <KEYWORD3>run-in</KEYWORD3>
- <KEYWORD3>compact</KEYWORD3>
- <KEYWORD3>marker</KEYWORD3>
- <KEYWORD3>table</KEYWORD3>
- <KEYWORD3>inline-table</KEYWORD3>
- <KEYWORD3>inline-block</KEYWORD3>
- <KEYWORD3>table-row-group</KEYWORD3>
- <KEYWORD3>table-header-group</KEYWORD3>
- <KEYWORD3>table-footer-group</KEYWORD3>
- <KEYWORD3>table-row</KEYWORD3>
- <KEYWORD3>table-column-group</KEYWORD3>
- <KEYWORD3>table-column</KEYWORD3>
- <KEYWORD3>table-cell</KEYWORD3>
- <KEYWORD3>table-caption</KEYWORD3>
-
- <!-- Colors -->
- <KEYWORD4>aliceblue</KEYWORD4>
- <KEYWORD4>antiquewhite</KEYWORD4>
- <KEYWORD4>aqua</KEYWORD4>
- <KEYWORD4>aquamarine</KEYWORD4>
- <KEYWORD4>azure</KEYWORD4>
- <KEYWORD4>beige</KEYWORD4>
- <KEYWORD4>bisque</KEYWORD4>
- <KEYWORD4>black</KEYWORD4>
- <KEYWORD4>blanchedalmond</KEYWORD4>
- <KEYWORD4>blue</KEYWORD4>
- <KEYWORD4>blueviolet</KEYWORD4>
- <KEYWORD4>brown</KEYWORD4>
- <KEYWORD4>burlywood</KEYWORD4>
- <KEYWORD4>cadetblue</KEYWORD4>
- <KEYWORD4>chartreuse</KEYWORD4>
- <KEYWORD4>chocolate</KEYWORD4>
- <KEYWORD4>coral</KEYWORD4>
- <KEYWORD4>cornflowerblue</KEYWORD4>
- <KEYWORD4>cornsilk</KEYWORD4>
- <KEYWORD4>crimson</KEYWORD4>
- <KEYWORD4>cyan</KEYWORD4>
- <KEYWORD4>darkblue</KEYWORD4>
- <KEYWORD4>darkcyan</KEYWORD4>
- <KEYWORD4>darkgoldenrod</KEYWORD4>
- <KEYWORD4>darkgray</KEYWORD4>
- <KEYWORD4>darkgreen</KEYWORD4>
- <KEYWORD4>darkgrey</KEYWORD4>
- <KEYWORD4>darkkhaki</KEYWORD4>
- <KEYWORD4>darkmagenta</KEYWORD4>
- <KEYWORD4>darkolivegreen</KEYWORD4>
- <KEYWORD4>darkorange</KEYWORD4>
- <KEYWORD4>darkorchid</KEYWORD4>
- <KEYWORD4>darkred</KEYWORD4>
- <KEYWORD4>darksalmon</KEYWORD4>
- <KEYWORD4>darkseagreen</KEYWORD4>
- <KEYWORD4>darkslateblue</KEYWORD4>
- <KEYWORD4>darkslategray</KEYWORD4>
- <KEYWORD4>darkslategrey</KEYWORD4>
- <KEYWORD4>darkturquoise</KEYWORD4>
- <KEYWORD4>darkviolet</KEYWORD4>
- <KEYWORD4>darkpink</KEYWORD4>
- <KEYWORD4>deepskyblue</KEYWORD4>
- <KEYWORD4>dimgray</KEYWORD4>
- <KEYWORD4>dimgrey</KEYWORD4>
- <KEYWORD4>dodgerblue</KEYWORD4>
- <KEYWORD4>firebrick</KEYWORD4>
- <KEYWORD4>floralwhite</KEYWORD4>
- <KEYWORD4>forestgreen</KEYWORD4>
- <KEYWORD4>fushia</KEYWORD4>
- <KEYWORD4>gainsboro</KEYWORD4>
- <KEYWORD4>ghostwhite</KEYWORD4>
- <KEYWORD4>gold</KEYWORD4>
- <KEYWORD4>goldenrod</KEYWORD4>
- <KEYWORD4>gray</KEYWORD4>
- <KEYWORD4>green</KEYWORD4>
- <KEYWORD4>greenyellow</KEYWORD4>
- <KEYWORD4>grey</KEYWORD4>
- <KEYWORD4>honeydew</KEYWORD4>
- <KEYWORD4>hotpink</KEYWORD4>
- <KEYWORD4>indianred</KEYWORD4>
- <KEYWORD4>indigo</KEYWORD4>
- <KEYWORD4>ivory</KEYWORD4>
- <KEYWORD4>khaki</KEYWORD4>
- <KEYWORD4>lavender</KEYWORD4>
- <KEYWORD4>lavenderblush</KEYWORD4>
- <KEYWORD4>lawngreen</KEYWORD4>
- <KEYWORD4>lemonchiffon</KEYWORD4>
- <KEYWORD4>lightblue</KEYWORD4>
- <KEYWORD4>lightcoral</KEYWORD4>
- <KEYWORD4>lightcyan</KEYWORD4>
- <KEYWORD4>lightgoldenrodyellow</KEYWORD4>
- <KEYWORD4>lightgray</KEYWORD4>
- <KEYWORD4>lightgreen</KEYWORD4>
- <KEYWORD4>lightgrey</KEYWORD4>
- <KEYWORD4>lightpink</KEYWORD4>
- <KEYWORD4>lightsalmon</KEYWORD4>
- <KEYWORD4>lightseagreen</KEYWORD4>
- <KEYWORD4>lightskyblue</KEYWORD4>
- <KEYWORD4>lightslategray</KEYWORD4>
- <KEYWORD4>lightslategrey</KEYWORD4>
- <KEYWORD4>lightsteelblue</KEYWORD4>
- <KEYWORD4>lightyellow</KEYWORD4>
- <KEYWORD4>lime</KEYWORD4>
- <KEYWORD4>limegreen</KEYWORD4>
- <KEYWORD4>linen</KEYWORD4>
- <KEYWORD4>magenta</KEYWORD4>
- <KEYWORD4>maroon</KEYWORD4>
- <KEYWORD4>mediumaquamarine</KEYWORD4>
- <KEYWORD4>mediumblue</KEYWORD4>
- <KEYWORD4>mediumorchid</KEYWORD4>
- <KEYWORD4>mediumpurple</KEYWORD4>
- <KEYWORD4>mediumseagreen</KEYWORD4>
- <KEYWORD4>mediumslateblue</KEYWORD4>
- <KEYWORD4>mediumspringgreen</KEYWORD4>
- <KEYWORD4>mediumturquoise</KEYWORD4>
- <KEYWORD4>mediumvioletred</KEYWORD4>
- <KEYWORD4>midnightblue</KEYWORD4>
- <KEYWORD4>mintcream</KEYWORD4>
- <KEYWORD4>mistyrose</KEYWORD4>
- <KEYWORD4>mocassin</KEYWORD4>
- <KEYWORD4>navawhite</KEYWORD4>
- <KEYWORD4>navy</KEYWORD4>
- <KEYWORD4>oldlace</KEYWORD4>
- <KEYWORD4>olive</KEYWORD4>
- <KEYWORD4>olidrab</KEYWORD4>
- <KEYWORD4>orange</KEYWORD4>
- <KEYWORD4>orangered</KEYWORD4>
- <KEYWORD4>orchid</KEYWORD4>
- <KEYWORD4>palegoldenrod</KEYWORD4>
- <KEYWORD4>palegreen</KEYWORD4>
- <KEYWORD4>paleturquoise</KEYWORD4>
- <KEYWORD4>paletvioletred</KEYWORD4>
- <KEYWORD4>papayawhip</KEYWORD4>
- <KEYWORD4>peachpuff</KEYWORD4>
- <KEYWORD4>peru</KEYWORD4>
- <KEYWORD4>pink</KEYWORD4>
- <KEYWORD4>plum</KEYWORD4>
- <KEYWORD4>powderblue</KEYWORD4>
- <KEYWORD4>purple</KEYWORD4>
- <KEYWORD4>red</KEYWORD4>
- <KEYWORD4>rosybrown</KEYWORD4>
- <KEYWORD4>royalblue</KEYWORD4>
- <KEYWORD4>saddlebrown</KEYWORD4>
- <KEYWORD4>salmon</KEYWORD4>
- <KEYWORD4>sandybrown</KEYWORD4>
- <KEYWORD4>seagreen</KEYWORD4>
- <KEYWORD4>seashell</KEYWORD4>
- <KEYWORD4>sienna</KEYWORD4>
- <KEYWORD4>silver</KEYWORD4>
- <KEYWORD4>skyblue</KEYWORD4>
- <KEYWORD4>slateblue</KEYWORD4>
- <KEYWORD4>slategray</KEYWORD4>
- <KEYWORD4>slategrey</KEYWORD4>
- <KEYWORD4>snow</KEYWORD4>
- <KEYWORD4>springgreen</KEYWORD4>
- <KEYWORD4>steelblue</KEYWORD4>
- <KEYWORD4>tan</KEYWORD4>
- <KEYWORD4>teal</KEYWORD4>
- <KEYWORD4>thistle</KEYWORD4>
- <KEYWORD4>tomato</KEYWORD4>
- <KEYWORD4>turquoise</KEYWORD4>
- <KEYWORD4>violet</KEYWORD4>
- <KEYWORD4>wheat</KEYWORD4>
- <KEYWORD4>white</KEYWORD4>
- <KEYWORD4>whitesmoke</KEYWORD4>
- <KEYWORD4>yellow</KEYWORD4>
- <KEYWORD4>yellowgreen</KEYWORD4>
-
- <!-- "functions", here for autocomplete: -->
- <KEYWORD1>rgb</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- </KEYWORDS>
- </RULES>
-
-
- <RULES SET="GLOBAL">
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SPAN TYPE="NULL" ESCAPE="\">
- <BEGIN>(</BEGIN>
- <END>)</END>
- </SPAN>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <KEYWORDS>
- <!-- Generated content, automatic listing -->
- <KEYWORD2>content</KEYWORD2>
- <KEYWORD2>quotes</KEYWORD2>
- <KEYWORD2>counter-reset</KEYWORD2>
- <KEYWORD2>counter-increment</KEYWORD2>
- <KEYWORD2>marker-offset</KEYWORD2>
- <KEYWORD2>list-style</KEYWORD2>
- <KEYWORD2>list-style-image</KEYWORD2>
- <KEYWORD2>list-style-position</KEYWORD2>
- <KEYWORD2>list-style-type</KEYWORD2>
-
- <KEYWORD2>@import</KEYWORD2>
- <KEYWORD2>@media</KEYWORD2>
- <KEYWORD2>@page</KEYWORD2>
- <KEYWORD2>@font-face</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
-</MODE>
-
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="noWordSep" VALUE="-" />
+ <PROPERTY NAME="noWordSep" VALUE="_" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="-?\d+(\.\d+)?(pt|pc|in|mm|cm|em|ex|px|ms|s|%|)"
+ NO_WORD_SEP="-_%">
+
+ <!-- classes: -->
+ <MARK_FOLLOWING TYPE="LITERAL1">.</MARK_FOLLOWING>
+ <!-- IDs: -->
+ <MARK_FOLLOWING TYPE="LITERAL2">#</MARK_FOLLOWING>
+
+ <SEQ TYPE="OPERATOR">></SEQ>
+
+ <!-- TODO: selectors, see http://www.w3.org/TR/REC-CSS2/selector.html -->
+
+ <SEQ TYPE="OPERATOR" DELEGATE="PSEUDO">:</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <!-- property blocks: -->
+ <SPAN TYPE="OPERATOR" DELEGATE="PROPERTIES">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <IMPORT DELEGATE="GLOBAL" />
+ <IMPORT DELEGATE="html::TAGS" />
+ </RULES>
+
+
+ <!-- Pseudo classes like ":active" -->
+ <RULES SET="PSEUDO">
+ <!-- Delegate back: -->
+ <SEQ TYPE="NULL" DELEGATE="MAIN"> </SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="MAIN">,</SEQ>
+
+ <SEQ TYPE="OPERATOR" DELEGATE="PROPERTIES">{</SEQ>
+
+ <SPAN_REGEXP HASH_CHAR="lang" TYPE="KEYWORD4">
+ <BEGIN>lang\s*\(</BEGIN>
+ <END>)</END>
+ </SPAN_REGEXP>
+
+ <SPAN_REGEXP HASH_CHAR="lang" TYPE="KEYWORD4">
+ <BEGIN>lang\s*\(</BEGIN>
+ <END>)</END>
+ </SPAN_REGEXP>
+
+ <!-- For delegating to PROPERTIES: -->
+ <IMPORT DELEGATE="GLOBAL" />
+
+ <KEYWORDS>
+ <KEYWORD4>after</KEYWORD4>
+ <KEYWORD4>before</KEYWORD4>
+ <KEYWORD4>first-child</KEYWORD4>
+ <KEYWORD4>last-child</KEYWORD4>
+ <KEYWORD4>link</KEYWORD4>
+ <KEYWORD4>visited</KEYWORD4>
+ <KEYWORD4>active</KEYWORD4>
+ <KEYWORD4>hover</KEYWORD4>
+ <KEYWORD4>focus</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- Properties: -->
+ <RULES SET="PROPERTIES" ESCAPE="\">
+ <!-- Delegate back -->
+ <SEQ TYPE="OPERATOR" DELEGATE="MAIN">}</SEQ>
+
+ <SEQ TYPE="OPERATOR" DELEGATE="PROP_VALUE">:</SEQ>
+
+ <IMPORT DELEGATE="GLOBAL" />
+
+ <KEYWORDS>
+ <!-- CSS2 properties -->
+
+ <!-- Color and background properties -->
+ <KEYWORD2>background</KEYWORD2>
+ <KEYWORD2>background-attachment</KEYWORD2>
+ <KEYWORD2>background-color</KEYWORD2>
+ <KEYWORD2>background-image</KEYWORD2>
+ <KEYWORD2>background-position</KEYWORD2>
+ <KEYWORD2>background-repeat</KEYWORD2>
+ <KEYWORD2>color</KEYWORD2>
+
+ <!-- Font properties -->
+ <KEYWORD2>font</KEYWORD2>
+ <KEYWORD2>font-family</KEYWORD2>
+ <KEYWORD2>font-size</KEYWORD2>
+ <KEYWORD2>font-size-adjust</KEYWORD2>
+ <KEYWORD2>font-style</KEYWORD2>
+ <KEYWORD2>font-variant</KEYWORD2>
+ <KEYWORD2>font-weight</KEYWORD2>
+ <KEYWORD2>font-stretch</KEYWORD2>
+ <KEYWORD2>src</KEYWORD2>
+ <KEYWORD2>definition-src</KEYWORD2>
+ <KEYWORD2>unicode-range</KEYWORD2>
+ <KEYWORD2>panose-1</KEYWORD2>
+ <KEYWORD2>stemv</KEYWORD2>
+ <KEYWORD2>stemh</KEYWORD2>
+ <KEYWORD2>units-per-em</KEYWORD2>
+ <KEYWORD2>slope</KEYWORD2>
+ <KEYWORD2>cap-height</KEYWORD2>
+ <KEYWORD2>x-height</KEYWORD2>
+ <KEYWORD2>ascent</KEYWORD2>
+ <KEYWORD2>descent</KEYWORD2>
+ <KEYWORD2>baseline</KEYWORD2>
+ <KEYWORD2>centerline</KEYWORD2>
+ <KEYWORD2>mathline</KEYWORD2>
+ <KEYWORD2>topline</KEYWORD2>
+
+ <!-- Text properties -->
+ <KEYWORD2>letter-spacing</KEYWORD2>
+ <KEYWORD2>text-align</KEYWORD2>
+ <KEYWORD2>text-shadow</KEYWORD2>
+ <KEYWORD2>text-decoration</KEYWORD2>
+ <KEYWORD2>text-indent</KEYWORD2>
+ <KEYWORD2>text-overflow</KEYWORD2>
+ <KEYWORD2>text-transform</KEYWORD2>
+ <KEYWORD2>word-spacing</KEYWORD2>
+ <KEYWORD2>letter-spacing</KEYWORD2>
+ <KEYWORD2>white-space</KEYWORD2>
+
+ <!-- Box properties -->
+ <KEYWORD2>border</KEYWORD2>
+ <KEYWORD2>bottom</KEYWORD2>
+ <KEYWORD2>border-collapse</KEYWORD2>
+ <KEYWORD2>border-spacing</KEYWORD2>
+ <KEYWORD2>border-bottom</KEYWORD2>
+ <KEYWORD2>border-bottom-style</KEYWORD2>
+ <KEYWORD2>border-bottom-width</KEYWORD2>
+ <KEYWORD2>border-bottom-color</KEYWORD2>
+ <KEYWORD2>border-bottom-left-radius</KEYWORD2>
+ <KEYWORD2>border-bottom-right-radius</KEYWORD2>
+ <KEYWORD2>border-left</KEYWORD2>
+ <KEYWORD2>border-left-style</KEYWORD2>
+ <KEYWORD2>border-left-width</KEYWORD2>
+ <KEYWORD2>border-left-color</KEYWORD2>
+ <KEYWORD2>border-right</KEYWORD2>
+ <KEYWORD2>border-right-style</KEYWORD2>
+ <KEYWORD2>border-right-width</KEYWORD2>
+ <KEYWORD2>border-right-color</KEYWORD2>
+ <KEYWORD2>border-top</KEYWORD2>
+ <KEYWORD2>border-top-style</KEYWORD2>
+ <KEYWORD2>border-top-width</KEYWORD2>
+ <KEYWORD2>border-top-color</KEYWORD2>
+ <KEYWORD2>border-color</KEYWORD2>
+ <KEYWORD2>border-style</KEYWORD2>
+ <KEYWORD2>border-width</KEYWORD2>
+ <KEYWORD2>clear</KEYWORD2>
+ <KEYWORD2>float</KEYWORD2>
+ <KEYWORD2>height</KEYWORD2>
+ <KEYWORD2>margin</KEYWORD2>
+ <KEYWORD2>margin-bottom</KEYWORD2>
+ <KEYWORD2>margin-left</KEYWORD2>
+ <KEYWORD2>margin-right</KEYWORD2>
+ <KEYWORD2>margin-top</KEYWORD2>
+ <KEYWORD2>padding</KEYWORD2>
+ <KEYWORD2>padding-bottom</KEYWORD2>
+ <KEYWORD2>padding-left</KEYWORD2>
+ <KEYWORD2>padding-right</KEYWORD2>
+ <KEYWORD2>padding-top</KEYWORD2>
+ <KEYWORD2>clear</KEYWORD2>
+
+ <!-- Visual formatting properties -->
+ <KEYWORD2>display</KEYWORD2>
+ <KEYWORD2>position</KEYWORD2>
+ <KEYWORD2>top</KEYWORD2>
+ <KEYWORD2>right</KEYWORD2>
+ <KEYWORD2>bottom</KEYWORD2>
+ <KEYWORD2>left</KEYWORD2>
+ <KEYWORD2>float</KEYWORD2>
+ <KEYWORD2>z-index</KEYWORD2>
+ <KEYWORD2>direction</KEYWORD2>
+ <KEYWORD2>unicode-bidi</KEYWORD2>
+ <KEYWORD2>width</KEYWORD2>
+ <KEYWORD2>min-width</KEYWORD2>
+ <KEYWORD2>max-width</KEYWORD2>
+ <KEYWORD2>height</KEYWORD2>
+ <KEYWORD2>min-height</KEYWORD2>
+ <KEYWORD2>max-height</KEYWORD2>
+ <KEYWORD2>line-height</KEYWORD2>
+ <KEYWORD2>vertical-align</KEYWORD2>
+
+ <!-- Visual effects -->
+ <KEYWORD2>overflow</KEYWORD2>
+ <KEYWORD2>clip</KEYWORD2>
+ <KEYWORD2>visibility</KEYWORD2>
+
+ <!-- Page properties -->
+ <KEYWORD2>size</KEYWORD2>
+ <KEYWORD2>marks</KEYWORD2>
+ <KEYWORD2>page-break-before</KEYWORD2>
+ <KEYWORD2>page-break-after</KEYWORD2>
+ <KEYWORD2>page-break-inside</KEYWORD2>
+ <KEYWORD2>page</KEYWORD2>
+ <KEYWORD2>orphans</KEYWORD2>
+ <KEYWORD2>widows</KEYWORD2>
+
+ <!-- Table properties -->
+ <KEYWORD2>caption-side</KEYWORD2>
+ <KEYWORD2>table-layout</KEYWORD2>
+ <KEYWORD2>border-collapse</KEYWORD2>
+ <KEYWORD2>border-spacing</KEYWORD2>
+ <KEYWORD2>empty-cells</KEYWORD2>
+ <KEYWORD2>speak-headers</KEYWORD2>
+
+ <!-- User interface -->
+ <KEYWORD2>cursor</KEYWORD2>
+ <KEYWORD2>outline</KEYWORD2>
+ <KEYWORD2>outline-width</KEYWORD2>
+ <KEYWORD2>outline-style</KEYWORD2>
+ <KEYWORD2>outline-color</KEYWORD2>
+
+ <!-- Aural properties -->
+ <KEYWORD2>azimuth</KEYWORD2>
+ <KEYWORD2>volume</KEYWORD2>
+ <KEYWORD2>speak</KEYWORD2>
+ <KEYWORD2>pause</KEYWORD2>
+ <KEYWORD2>pause-before</KEYWORD2>
+ <KEYWORD2>pause-after</KEYWORD2>
+ <KEYWORD2>cue</KEYWORD2>
+ <KEYWORD2>cue-before</KEYWORD2>
+ <KEYWORD2>cue-after</KEYWORD2>
+ <KEYWORD2>play-during</KEYWORD2>
+ <KEYWORD2>elevation</KEYWORD2>
+ <KEYWORD2>speech-rate</KEYWORD2>
+ <KEYWORD2>voice-family</KEYWORD2>
+ <KEYWORD2>pitch</KEYWORD2>
+ <KEYWORD2>pitch-range</KEYWORD2>
+ <KEYWORD2>stress</KEYWORD2>
+ <KEYWORD2>richness</KEYWORD2>
+ <KEYWORD2>speak-punctuation</KEYWORD2>
+ <KEYWORD2>speak-numeral</KEYWORD2>
+ <KEYWORD2>speak-header-cell</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+
+ <!-- Values: -->
+ <RULES SET="PROP_VALUE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="-?\d+(\.\d+)?(pt|pc|in|mm|cm|em|ex|px|ms|s|%|)"
+ NO_WORD_SEP="-_%">
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- "functions" -->
+ <SPAN_REGEXP TYPE="LITERAL1" HASH_CHARS="RU" MATCH_TYPE="KEYWORD1">
+ <BEGIN>(rgb|url)\s*\(</BEGIN>
+ <END>)</END>
+ </SPAN_REGEXP>
+
+ <!-- <SEQ DELEGATE="PROP_VALUE_COLOR">#</SEQ> -->
+ <MARK_FOLLOWING TYPE="DIGIT">#</MARK_FOLLOWING>
+
+ <SEQ_REGEXP HASH_CHAR="!" TYPE="KEYWORD2">!\s*important</SEQ_REGEXP>
+
+ <!-- proprietary IE function: -->
+ <SPAN_REGEXP TYPE="FUNCTION" DELEGATE="javascript::MAIN" HASH_CHAR="expression">
+ <BEGIN>expression\s*\(</BEGIN>
+ <END>)</END>
+ </SPAN_REGEXP>
+
+ <!-- Delegate back: -->
+ <SEQ TYPE="OPERATOR" DELEGATE="PROPERTIES">;</SEQ>
+ <SEQ TYPE="INVALID" DELEGATE="MAIN">}</SEQ> <!-- end properties block, but it's invalid -->
+
+ <IMPORT DELEGATE="GLOBAL" />
+
+ <KEYWORDS>
+ <KEYWORD3>left</KEYWORD3>
+ <KEYWORD3>right</KEYWORD3>
+ <KEYWORD3>below</KEYWORD3>
+ <KEYWORD3>level</KEYWORD3>
+ <KEYWORD3>above</KEYWORD3>
+ <KEYWORD3>higher</KEYWORD3>
+ <KEYWORD3>lower</KEYWORD3>
+ <KEYWORD3>show</KEYWORD3>
+ <KEYWORD3>hide</KEYWORD3>
+ <KEYWORD3>normal</KEYWORD3>
+ <KEYWORD3>wider</KEYWORD3>
+ <KEYWORD3>narrower</KEYWORD3>
+ <KEYWORD3>ultra-condensed</KEYWORD3>
+ <KEYWORD3>extra-condensed</KEYWORD3>
+ <KEYWORD3>condensed</KEYWORD3>
+ <KEYWORD3>semi-condensed</KEYWORD3>
+ <KEYWORD3>semi-expanded</KEYWORD3>
+ <KEYWORD3>expanded</KEYWORD3>
+ <KEYWORD3>extra-expanded</KEYWORD3>
+ <KEYWORD3>ultra-expanded</KEYWORD3>
+ <KEYWORD3>normal</KEYWORD3>
+ <KEYWORD3>italic</KEYWORD3>
+ <KEYWORD3>oblique</KEYWORD3>
+ <KEYWORD3>normal</KEYWORD3>
+ <KEYWORD3>xx-small</KEYWORD3>
+ <KEYWORD3>x-small</KEYWORD3>
+ <KEYWORD3>small</KEYWORD3>
+ <KEYWORD3>large</KEYWORD3>
+ <KEYWORD3>x-large</KEYWORD3>
+ <KEYWORD3>xx-large</KEYWORD3>
+ <KEYWORD3>thin</KEYWORD3>
+ <KEYWORD3>thick</KEYWORD3>
+ <KEYWORD3>smaller</KEYWORD3>
+ <KEYWORD3>larger</KEYWORD3>
+ <KEYWORD3>small-caps</KEYWORD3>
+ <KEYWORD3>inherit</KEYWORD3>
+ <KEYWORD3>bold</KEYWORD3>
+ <KEYWORD3>bolder</KEYWORD3>
+ <KEYWORD3>lighter</KEYWORD3>
+ <KEYWORD3>inside</KEYWORD3>
+ <KEYWORD3>outside</KEYWORD3>
+ <KEYWORD3>disc</KEYWORD3>
+ <KEYWORD3>circle</KEYWORD3>
+ <KEYWORD3>square</KEYWORD3>
+ <KEYWORD3>decimal</KEYWORD3>
+ <KEYWORD3>decimal-leading-zero</KEYWORD3>
+ <KEYWORD3>lower-roman</KEYWORD3>
+ <KEYWORD3>upper-roman</KEYWORD3>
+ <KEYWORD3>lower-greek</KEYWORD3>
+ <KEYWORD3>lower-alpha</KEYWORD3>
+ <KEYWORD3>lower-latin</KEYWORD3>
+ <KEYWORD3>upper-alpha</KEYWORD3>
+ <KEYWORD3>upper-latin</KEYWORD3>
+ <KEYWORD3>hebrew</KEYWORD3>
+ <KEYWORD3>armenian</KEYWORD3>
+ <KEYWORD3>georgian</KEYWORD3>
+ <KEYWORD3>cjk-ideographic</KEYWORD3>
+ <KEYWORD3>hiragana</KEYWORD3>
+ <KEYWORD3>katakana</KEYWORD3>
+ <KEYWORD3>hiragana-iroha</KEYWORD3>
+ <KEYWORD3>katakana-iroha</KEYWORD3>
+ <KEYWORD3>crop</KEYWORD3>
+ <KEYWORD3>cross</KEYWORD3>
+ <KEYWORD3>invert</KEYWORD3>
+ <KEYWORD3>hidden</KEYWORD3>
+ <KEYWORD3>always</KEYWORD3>
+ <KEYWORD3>avoid</KEYWORD3>
+ <KEYWORD3>x-low</KEYWORD3>
+ <KEYWORD3>low</KEYWORD3>
+ <KEYWORD3>high</KEYWORD3>
+ <KEYWORD3>x-high</KEYWORD3>
+ <KEYWORD3>absolute</KEYWORD3>
+ <KEYWORD3>fixed</KEYWORD3>
+ <KEYWORD3>relative</KEYWORD3>
+ <KEYWORD3>static</KEYWORD3>
+ <KEYWORD3>portrait</KEYWORD3>
+ <KEYWORD3>landscape</KEYWORD3>
+ <KEYWORD3>spell-out</KEYWORD3>
+ <KEYWORD3>digits</KEYWORD3>
+ <KEYWORD3>continuous</KEYWORD3>
+ <KEYWORD3>x-slow</KEYWORD3>
+ <KEYWORD3>slow</KEYWORD3>
+ <KEYWORD3>fast</KEYWORD3>
+ <KEYWORD3>x-fast</KEYWORD3>
+ <KEYWORD3>faster</KEYWORD3>
+ <KEYWORD3>slower</KEYWORD3>
+ <KEYWORD3>underline</KEYWORD3>
+ <KEYWORD3>overline</KEYWORD3>
+ <KEYWORD3>line-through</KEYWORD3>
+ <KEYWORD3>blink</KEYWORD3>
+ <KEYWORD3>capitalize</KEYWORD3>
+ <KEYWORD3>uppercase</KEYWORD3>
+ <KEYWORD3>lowercase</KEYWORD3>
+ <KEYWORD3>embed</KEYWORD3>
+ <KEYWORD3>bidi-override</KEYWORD3>
+ <KEYWORD3>baseline</KEYWORD3>
+ <KEYWORD3>sub</KEYWORD3>
+ <KEYWORD3>super</KEYWORD3>
+ <KEYWORD3>top</KEYWORD3>
+ <KEYWORD3>text-top</KEYWORD3>
+ <KEYWORD3>middle</KEYWORD3>
+ <KEYWORD3>bottom</KEYWORD3>
+ <KEYWORD3>text-bottom</KEYWORD3>
+ <KEYWORD3>visible</KEYWORD3>
+ <KEYWORD3>hidden</KEYWORD3>
+ <KEYWORD3>collapse</KEYWORD3>
+ <KEYWORD3>soft</KEYWORD3>
+ <KEYWORD3>loud</KEYWORD3>
+ <KEYWORD3>x-loud</KEYWORD3>
+ <KEYWORD3>pre</KEYWORD3>
+ <KEYWORD3>nowrap</KEYWORD3>
+ <KEYWORD3>dotted</KEYWORD3>
+ <KEYWORD3>dashed</KEYWORD3>
+ <KEYWORD3>solid</KEYWORD3>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>groove</KEYWORD3>
+ <KEYWORD3>ridge</KEYWORD3>
+ <KEYWORD3>inset</KEYWORD3>
+ <KEYWORD3>outset</KEYWORD3>
+ <KEYWORD3>once</KEYWORD3>
+ <KEYWORD3>both</KEYWORD3>
+ <KEYWORD3>silent</KEYWORD3>
+ <KEYWORD3>medium</KEYWORD3>
+ <KEYWORD3>mix</KEYWORD3>
+ <KEYWORD3>male</KEYWORD3>
+ <KEYWORD3>female</KEYWORD3>
+ <KEYWORD3>child</KEYWORD3>
+ <KEYWORD3>code</KEYWORD3>
+
+ <!-- measurement units -->
+ <KEYWORD3>left-side</KEYWORD3>
+ <KEYWORD3>far-left</KEYWORD3>
+ <KEYWORD3>center-left</KEYWORD3>
+ <KEYWORD3>center</KEYWORD3>
+ <KEYWORD3>right</KEYWORD3>
+ <KEYWORD3>center-right</KEYWORD3>
+ <KEYWORD3>far-right</KEYWORD3>
+ <KEYWORD3>right-side</KEYWORD3>
+ <KEYWORD3>justify</KEYWORD3>
+ <KEYWORD3>behind</KEYWORD3>
+ <KEYWORD3>leftwards</KEYWORD3>
+ <KEYWORD3>rightwards</KEYWORD3>
+ <KEYWORD3>inherit</KEYWORD3>
+ <KEYWORD3>scroll</KEYWORD3>
+ <KEYWORD3>fixed</KEYWORD3>
+ <KEYWORD3>transparent</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>repeat</KEYWORD3>
+ <KEYWORD3>repeat-x</KEYWORD3>
+ <KEYWORD3>repeat-y</KEYWORD3>
+ <KEYWORD3>no-repeat</KEYWORD3>
+ <KEYWORD3>collapse</KEYWORD3>
+ <KEYWORD3>separate</KEYWORD3>
+ <KEYWORD3>auto</KEYWORD3>
+ <KEYWORD3>open-quote</KEYWORD3>
+ <KEYWORD3>close-quote</KEYWORD3>
+ <KEYWORD3>no-open-quote</KEYWORD3>
+ <KEYWORD3>no-close-quote</KEYWORD3>
+ <KEYWORD3>cue-before</KEYWORD3>
+ <KEYWORD3>cue-after</KEYWORD3>
+ <KEYWORD3>crosshair</KEYWORD3>
+ <KEYWORD3>default</KEYWORD3>
+ <KEYWORD3>pointer</KEYWORD3>
+ <KEYWORD3>move</KEYWORD3>
+ <KEYWORD3>e-resize</KEYWORD3>
+ <KEYWORD3>ne-resize</KEYWORD3>
+ <KEYWORD3>nw-resize</KEYWORD3>
+ <KEYWORD3>n-resize</KEYWORD3>
+ <KEYWORD3>se-resize</KEYWORD3>
+ <KEYWORD3>sw-resize</KEYWORD3>
+ <KEYWORD3>s-resize</KEYWORD3>
+ <KEYWORD3>w-resize</KEYWORD3>
+ <KEYWORD3>text</KEYWORD3>
+ <KEYWORD3>wait</KEYWORD3>
+ <KEYWORD3>help</KEYWORD3>
+ <KEYWORD3>ltr</KEYWORD3>
+ <KEYWORD3>rtl</KEYWORD3>
+ <KEYWORD3>inline</KEYWORD3>
+ <KEYWORD3>block</KEYWORD3>
+ <KEYWORD3>list-item</KEYWORD3>
+ <KEYWORD3>run-in</KEYWORD3>
+ <KEYWORD3>compact</KEYWORD3>
+ <KEYWORD3>marker</KEYWORD3>
+ <KEYWORD3>table</KEYWORD3>
+ <KEYWORD3>inline-table</KEYWORD3>
+ <KEYWORD3>inline-block</KEYWORD3>
+ <KEYWORD3>table-row-group</KEYWORD3>
+ <KEYWORD3>table-header-group</KEYWORD3>
+ <KEYWORD3>table-footer-group</KEYWORD3>
+ <KEYWORD3>table-row</KEYWORD3>
+ <KEYWORD3>table-column-group</KEYWORD3>
+ <KEYWORD3>table-column</KEYWORD3>
+ <KEYWORD3>table-cell</KEYWORD3>
+ <KEYWORD3>table-caption</KEYWORD3>
+
+ <!-- Colors -->
+ <KEYWORD4>aliceblue</KEYWORD4>
+ <KEYWORD4>antiquewhite</KEYWORD4>
+ <KEYWORD4>aqua</KEYWORD4>
+ <KEYWORD4>aquamarine</KEYWORD4>
+ <KEYWORD4>azure</KEYWORD4>
+ <KEYWORD4>beige</KEYWORD4>
+ <KEYWORD4>bisque</KEYWORD4>
+ <KEYWORD4>black</KEYWORD4>
+ <KEYWORD4>blanchedalmond</KEYWORD4>
+ <KEYWORD4>blue</KEYWORD4>
+ <KEYWORD4>blueviolet</KEYWORD4>
+ <KEYWORD4>brown</KEYWORD4>
+ <KEYWORD4>burlywood</KEYWORD4>
+ <KEYWORD4>cadetblue</KEYWORD4>
+ <KEYWORD4>chartreuse</KEYWORD4>
+ <KEYWORD4>chocolate</KEYWORD4>
+ <KEYWORD4>coral</KEYWORD4>
+ <KEYWORD4>cornflowerblue</KEYWORD4>
+ <KEYWORD4>cornsilk</KEYWORD4>
+ <KEYWORD4>crimson</KEYWORD4>
+ <KEYWORD4>cyan</KEYWORD4>
+ <KEYWORD4>darkblue</KEYWORD4>
+ <KEYWORD4>darkcyan</KEYWORD4>
+ <KEYWORD4>darkgoldenrod</KEYWORD4>
+ <KEYWORD4>darkgray</KEYWORD4>
+ <KEYWORD4>darkgreen</KEYWORD4>
+ <KEYWORD4>darkgrey</KEYWORD4>
+ <KEYWORD4>darkkhaki</KEYWORD4>
+ <KEYWORD4>darkmagenta</KEYWORD4>
+ <KEYWORD4>darkolivegreen</KEYWORD4>
+ <KEYWORD4>darkorange</KEYWORD4>
+ <KEYWORD4>darkorchid</KEYWORD4>
+ <KEYWORD4>darkred</KEYWORD4>
+ <KEYWORD4>darksalmon</KEYWORD4>
+ <KEYWORD4>darkseagreen</KEYWORD4>
+ <KEYWORD4>darkslateblue</KEYWORD4>
+ <KEYWORD4>darkslategray</KEYWORD4>
+ <KEYWORD4>darkslategrey</KEYWORD4>
+ <KEYWORD4>darkturquoise</KEYWORD4>
+ <KEYWORD4>darkviolet</KEYWORD4>
+ <KEYWORD4>darkpink</KEYWORD4>
+ <KEYWORD4>deepskyblue</KEYWORD4>
+ <KEYWORD4>dimgray</KEYWORD4>
+ <KEYWORD4>dimgrey</KEYWORD4>
+ <KEYWORD4>dodgerblue</KEYWORD4>
+ <KEYWORD4>firebrick</KEYWORD4>
+ <KEYWORD4>floralwhite</KEYWORD4>
+ <KEYWORD4>forestgreen</KEYWORD4>
+ <KEYWORD4>fushia</KEYWORD4>
+ <KEYWORD4>gainsboro</KEYWORD4>
+ <KEYWORD4>ghostwhite</KEYWORD4>
+ <KEYWORD4>gold</KEYWORD4>
+ <KEYWORD4>goldenrod</KEYWORD4>
+ <KEYWORD4>gray</KEYWORD4>
+ <KEYWORD4>green</KEYWORD4>
+ <KEYWORD4>greenyellow</KEYWORD4>
+ <KEYWORD4>grey</KEYWORD4>
+ <KEYWORD4>honeydew</KEYWORD4>
+ <KEYWORD4>hotpink</KEYWORD4>
+ <KEYWORD4>indianred</KEYWORD4>
+ <KEYWORD4>indigo</KEYWORD4>
+ <KEYWORD4>ivory</KEYWORD4>
+ <KEYWORD4>khaki</KEYWORD4>
+ <KEYWORD4>lavender</KEYWORD4>
+ <KEYWORD4>lavenderblush</KEYWORD4>
+ <KEYWORD4>lawngreen</KEYWORD4>
+ <KEYWORD4>lemonchiffon</KEYWORD4>
+ <KEYWORD4>lightblue</KEYWORD4>
+ <KEYWORD4>lightcoral</KEYWORD4>
+ <KEYWORD4>lightcyan</KEYWORD4>
+ <KEYWORD4>lightgoldenrodyellow</KEYWORD4>
+ <KEYWORD4>lightgray</KEYWORD4>
+ <KEYWORD4>lightgreen</KEYWORD4>
+ <KEYWORD4>lightgrey</KEYWORD4>
+ <KEYWORD4>lightpink</KEYWORD4>
+ <KEYWORD4>lightsalmon</KEYWORD4>
+ <KEYWORD4>lightseagreen</KEYWORD4>
+ <KEYWORD4>lightskyblue</KEYWORD4>
+ <KEYWORD4>lightslategray</KEYWORD4>
+ <KEYWORD4>lightslategrey</KEYWORD4>
+ <KEYWORD4>lightsteelblue</KEYWORD4>
+ <KEYWORD4>lightyellow</KEYWORD4>
+ <KEYWORD4>lime</KEYWORD4>
+ <KEYWORD4>limegreen</KEYWORD4>
+ <KEYWORD4>linen</KEYWORD4>
+ <KEYWORD4>magenta</KEYWORD4>
+ <KEYWORD4>maroon</KEYWORD4>
+ <KEYWORD4>mediumaquamarine</KEYWORD4>
+ <KEYWORD4>mediumblue</KEYWORD4>
+ <KEYWORD4>mediumorchid</KEYWORD4>
+ <KEYWORD4>mediumpurple</KEYWORD4>
+ <KEYWORD4>mediumseagreen</KEYWORD4>
+ <KEYWORD4>mediumslateblue</KEYWORD4>
+ <KEYWORD4>mediumspringgreen</KEYWORD4>
+ <KEYWORD4>mediumturquoise</KEYWORD4>
+ <KEYWORD4>mediumvioletred</KEYWORD4>
+ <KEYWORD4>midnightblue</KEYWORD4>
+ <KEYWORD4>mintcream</KEYWORD4>
+ <KEYWORD4>mistyrose</KEYWORD4>
+ <KEYWORD4>mocassin</KEYWORD4>
+ <KEYWORD4>navawhite</KEYWORD4>
+ <KEYWORD4>navy</KEYWORD4>
+ <KEYWORD4>oldlace</KEYWORD4>
+ <KEYWORD4>olive</KEYWORD4>
+ <KEYWORD4>olidrab</KEYWORD4>
+ <KEYWORD4>orange</KEYWORD4>
+ <KEYWORD4>orangered</KEYWORD4>
+ <KEYWORD4>orchid</KEYWORD4>
+ <KEYWORD4>palegoldenrod</KEYWORD4>
+ <KEYWORD4>palegreen</KEYWORD4>
+ <KEYWORD4>paleturquoise</KEYWORD4>
+ <KEYWORD4>paletvioletred</KEYWORD4>
+ <KEYWORD4>papayawhip</KEYWORD4>
+ <KEYWORD4>peachpuff</KEYWORD4>
+ <KEYWORD4>peru</KEYWORD4>
+ <KEYWORD4>pink</KEYWORD4>
+ <KEYWORD4>plum</KEYWORD4>
+ <KEYWORD4>powderblue</KEYWORD4>
+ <KEYWORD4>purple</KEYWORD4>
+ <KEYWORD4>red</KEYWORD4>
+ <KEYWORD4>rosybrown</KEYWORD4>
+ <KEYWORD4>royalblue</KEYWORD4>
+ <KEYWORD4>saddlebrown</KEYWORD4>
+ <KEYWORD4>salmon</KEYWORD4>
+ <KEYWORD4>sandybrown</KEYWORD4>
+ <KEYWORD4>seagreen</KEYWORD4>
+ <KEYWORD4>seashell</KEYWORD4>
+ <KEYWORD4>sienna</KEYWORD4>
+ <KEYWORD4>silver</KEYWORD4>
+ <KEYWORD4>skyblue</KEYWORD4>
+ <KEYWORD4>slateblue</KEYWORD4>
+ <KEYWORD4>slategray</KEYWORD4>
+ <KEYWORD4>slategrey</KEYWORD4>
+ <KEYWORD4>snow</KEYWORD4>
+ <KEYWORD4>springgreen</KEYWORD4>
+ <KEYWORD4>steelblue</KEYWORD4>
+ <KEYWORD4>tan</KEYWORD4>
+ <KEYWORD4>teal</KEYWORD4>
+ <KEYWORD4>thistle</KEYWORD4>
+ <KEYWORD4>tomato</KEYWORD4>
+ <KEYWORD4>turquoise</KEYWORD4>
+ <KEYWORD4>violet</KEYWORD4>
+ <KEYWORD4>wheat</KEYWORD4>
+ <KEYWORD4>white</KEYWORD4>
+ <KEYWORD4>whitesmoke</KEYWORD4>
+ <KEYWORD4>yellow</KEYWORD4>
+ <KEYWORD4>yellowgreen</KEYWORD4>
+
+ <!-- "functions", here for autocomplete: -->
+ <KEYWORD1>rgb</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+
+
+ <RULES SET="GLOBAL">
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="NULL">;</SEQ>
+ <SPAN TYPE="NULL" ESCAPE="\">
+ <BEGIN>(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <!-- Generated content, automatic listing -->
+ <KEYWORD2>content</KEYWORD2>
+ <KEYWORD2>quotes</KEYWORD2>
+ <KEYWORD2>counter-reset</KEYWORD2>
+ <KEYWORD2>counter-increment</KEYWORD2>
+ <KEYWORD2>marker-offset</KEYWORD2>
+ <KEYWORD2>list-style</KEYWORD2>
+ <KEYWORD2>list-style-image</KEYWORD2>
+ <KEYWORD2>list-style-position</KEYWORD2>
+ <KEYWORD2>list-style-type</KEYWORD2>
+
+ <KEYWORD2>@import</KEYWORD2>
+ <KEYWORD2>@media</KEYWORD2>
+ <KEYWORD2>@page</KEYWORD2>
+ <KEYWORD2>@font-face</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
+
+
diff --git a/jEdit/modes/csv.xml b/jEdit/modes/csv.xml
index 2e6c773..f0bd696 100644
--- a/jEdit/modes/csv.xml
+++ b/jEdit/modes/csv.xml
@@ -1,140 +1,140 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-
-Author: Jaco de Groot
-Version: 2.2 20070213
-
-Comma Separated Values specification used for this mode:
-
-A file containing table data where the fields are sperated by commas. Fields
-containing commas (,) or newlines must be quoted (surrounded by quotes (")).
-Quotes in quoted fields must be escaped with two quotes.
-
-Highlighted are:
-- Even columns
-- Commas seperating values
-- Quotes surrounding values
-- Escaped quotes are highlighted.
-
-It is also possible that semicolons are used instead of commas. Therefor the
-first rules check if the first separator found is a comma or a semicolon and
-then switch to the comma or semicolon rules.
-
--->
-
-<MODE>
-
- <!-- Switch rules -->
-
- <RULES>
- <SEQ TYPE="MARKUP" DELEGATE="ODD_QUOTED" AT_LINE_START="TRUE">"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">,"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">;"</SEQ>
- <EOL_SPAN_REGEXP TYPE="MARKUP" HASH_CHAR="," DELEGATE="COMMA_LAST_COLUMN">,(?=[^,]*$)</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP TYPE="MARKUP" HASH_CHAR=";" DELEGATE="SEMICOLON_LAST_COLUMN">;(?=[^;]*$)</EOL_SPAN_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">,</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">;</SEQ>
- </RULES>
-
- <RULES SET="ODD_QUOTED">
- <SEQ TYPE="MARKUP" DELEGATE="ODD_QUOTED">""</SEQ>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="COMMA_MAIN">"(?=,[^"][^,]*$)</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="SEMICOLON_MAIN">"(?=;[^"][^;]*$)</SEQ_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">","</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">";"</SEQ>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""," DELEGATE="COMMA_MAIN">",$</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="";" DELEGATE="SEMICOLON_MAIN">";$</SEQ_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">",</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">";</SEQ>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="MAIN">"$</SEQ_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="EVEN">"</SEQ>
- </RULES>
-
- <RULES DEFAULT="COMMENT1" SET="EVEN">
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">,"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">;"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">,</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">;</SEQ>
- </RULES>
-
- <RULES DEFAULT="COMMENT1" SET="EVEN_QUOTED">
- <SEQ TYPE="MARKUP" DELEGATE="EVEN_QUOTED">""</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">","</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">";"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">",</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">";</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="MAIN">"</SEQ>
- </RULES>
-
- <!-- Comma rules -->
-
- <RULES SET="COMMA_MAIN">
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED" AT_LINE_START="TRUE">"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">,"</SEQ>
- <EOL_SPAN_REGEXP TYPE="MARKUP" HASH_CHAR="," DELEGATE="COMMA_LAST_COLUMN">,(?=[^,]*$)</EOL_SPAN_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">,</SEQ>
- </RULES>
-
- <RULES SET="COMMA_ODD_QUOTED">
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">""</SEQ>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="COMMA_MAIN">"(?=,[^"][^,]*$)</SEQ_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">","</SEQ>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""," DELEGATE="COMMA_MAIN">",$</SEQ_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">",</SEQ>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="COMMA_MAIN">"$</SEQ_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">"</SEQ>
- </RULES>
-
- <RULES SET="COMMA_EVEN" DEFAULT="COMMENT1">
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">,"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">,</SEQ>
- </RULES>
-
- <RULES SET="COMMA_EVEN_QUOTED" DEFAULT="COMMENT1">
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">""</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">","</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">",</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">"</SEQ>
- </RULES>
-
- <RULES SET="COMMA_LAST_COLUMN" DEFAULT="COMMENT1">
- </RULES>
-
- <!-- Semicolon rules -->
-
- <RULES SET="SEMICOLON_MAIN">
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED" AT_LINE_START="TRUE">"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">;"</SEQ>
- <EOL_SPAN_REGEXP TYPE="MARKUP" HASH_CHAR=";" DELEGATE="SEMICOLON_LAST_COLUMN">;(?=[^;]*$)</EOL_SPAN_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">;</SEQ>
- </RULES>
-
- <RULES SET="SEMICOLON_ODD_QUOTED">
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">""</SEQ>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="SEMICOLON_MAIN">"(?=;[^"][^;]*$)</SEQ_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">";"</SEQ>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="";" DELEGATE="SEMICOLON_MAIN">";$</SEQ_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">";</SEQ>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="SEMICOLON_MAIN">"$</SEQ_REGEXP>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">"</SEQ>
- </RULES>
-
- <RULES SET="SEMICOLON_EVEN" DEFAULT="COMMENT1">
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">;"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">;</SEQ>
- </RULES>
-
- <RULES SET="SEMICOLON_EVEN_QUOTED" DEFAULT="COMMENT1">
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">""</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">";"</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">";</SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">"</SEQ>
- </RULES>
-
- <RULES SET="SEMICOLON_LAST_COLUMN" DEFAULT="COMMENT1">
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+
+Author: Jaco de Groot
+Version: 2.2 20070213
+
+Comma Separated Values specification used for this mode:
+
+A file containing table data where the fields are sperated by commas. Fields
+containing commas (,) or newlines must be quoted (surrounded by quotes (")).
+Quotes in quoted fields must be escaped with two quotes.
+
+Highlighted are:
+- Even columns
+- Commas seperating values
+- Quotes surrounding values
+- Escaped quotes are highlighted.
+
+It is also possible that semicolons are used instead of commas. Therefor the
+first rules check if the first separator found is a comma or a semicolon and
+then switch to the comma or semicolon rules.
+
+-->
+
+<MODE>
+
+ <!-- Switch rules -->
+
+ <RULES>
+ <SEQ TYPE="MARKUP" DELEGATE="ODD_QUOTED" AT_LINE_START="TRUE">"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">,"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">;"</SEQ>
+ <EOL_SPAN_REGEXP TYPE="MARKUP" HASH_CHAR="," DELEGATE="COMMA_LAST_COLUMN">,(?=[^,]*$)</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP TYPE="MARKUP" HASH_CHAR=";" DELEGATE="SEMICOLON_LAST_COLUMN">;(?=[^;]*$)</EOL_SPAN_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">,</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">;</SEQ>
+ </RULES>
+
+ <RULES SET="ODD_QUOTED">
+ <SEQ TYPE="MARKUP" DELEGATE="ODD_QUOTED">""</SEQ>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="COMMA_MAIN">"(?=,[^"][^,]*$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="SEMICOLON_MAIN">"(?=;[^"][^;]*$)</SEQ_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">","</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">";"</SEQ>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""," DELEGATE="COMMA_MAIN">",$</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="";" DELEGATE="SEMICOLON_MAIN">";$</SEQ_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">",</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">";</SEQ>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="MAIN">"$</SEQ_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="EVEN">"</SEQ>
+ </RULES>
+
+ <RULES DEFAULT="COMMENT1" SET="EVEN">
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">,"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">;"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">,</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">;</SEQ>
+ </RULES>
+
+ <RULES DEFAULT="COMMENT1" SET="EVEN_QUOTED">
+ <SEQ TYPE="MARKUP" DELEGATE="EVEN_QUOTED">""</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">","</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">";"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">",</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">";</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="MAIN">"</SEQ>
+ </RULES>
+
+ <!-- Comma rules -->
+
+ <RULES SET="COMMA_MAIN">
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED" AT_LINE_START="TRUE">"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">,"</SEQ>
+ <EOL_SPAN_REGEXP TYPE="MARKUP" HASH_CHAR="," DELEGATE="COMMA_LAST_COLUMN">,(?=[^,]*$)</EOL_SPAN_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">,</SEQ>
+ </RULES>
+
+ <RULES SET="COMMA_ODD_QUOTED">
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">""</SEQ>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="COMMA_MAIN">"(?=,[^"][^,]*$)</SEQ_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">","</SEQ>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""," DELEGATE="COMMA_MAIN">",$</SEQ_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">",</SEQ>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="COMMA_MAIN">"$</SEQ_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN">"</SEQ>
+ </RULES>
+
+ <RULES SET="COMMA_EVEN" DEFAULT="COMMENT1">
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">,"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">,</SEQ>
+ </RULES>
+
+ <RULES SET="COMMA_EVEN_QUOTED" DEFAULT="COMMENT1">
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_EVEN_QUOTED">""</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_ODD_QUOTED">","</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">",</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="COMMA_MAIN">"</SEQ>
+ </RULES>
+
+ <RULES SET="COMMA_LAST_COLUMN" DEFAULT="COMMENT1">
+ </RULES>
+
+ <!-- Semicolon rules -->
+
+ <RULES SET="SEMICOLON_MAIN">
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED" AT_LINE_START="TRUE">"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">;"</SEQ>
+ <EOL_SPAN_REGEXP TYPE="MARKUP" HASH_CHAR=";" DELEGATE="SEMICOLON_LAST_COLUMN">;(?=[^;]*$)</EOL_SPAN_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">;</SEQ>
+ </RULES>
+
+ <RULES SET="SEMICOLON_ODD_QUOTED">
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">""</SEQ>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="SEMICOLON_MAIN">"(?=;[^"][^;]*$)</SEQ_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">";"</SEQ>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="";" DELEGATE="SEMICOLON_MAIN">";$</SEQ_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">";</SEQ>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR=""" DELEGATE="SEMICOLON_MAIN">"$</SEQ_REGEXP>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN">"</SEQ>
+ </RULES>
+
+ <RULES SET="SEMICOLON_EVEN" DEFAULT="COMMENT1">
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">;"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">;</SEQ>
+ </RULES>
+
+ <RULES SET="SEMICOLON_EVEN_QUOTED" DEFAULT="COMMENT1">
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_EVEN_QUOTED">""</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_ODD_QUOTED">";"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">";</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="SEMICOLON_MAIN">"</SEQ>
+ </RULES>
+
+ <RULES SET="SEMICOLON_LAST_COLUMN" DEFAULT="COMMENT1">
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/cvs-commit.xml b/jEdit/modes/cvs-commit.xml
index d89eee4..6bac7f2 100644
--- a/jEdit/modes/cvs-commit.xml
+++ b/jEdit/modes/cvs-commit.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-<MODE NAME="cvs-commit" FILE="cvs-commit.xml"
- FILE_NAME_GLOB="cvs*.tmp"/>
--->
-
-<MODE>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
- <EOL_SPAN TYPE="COMMENT1"
- DELEGATE="CHANGED"
- AT_LINE_START="TRUE"
- >CVS:</EOL_SPAN>
- </RULES>
- <RULES SET="CHANGED" DEFAULT="COMMENT2">
- <SEQ TYPE="COMMENT1" AT_LINE_START="TRUE">CVS:</SEQ>
- <SEQ TYPE="KEYWORD1">Committing in</SEQ>
- <SEQ TYPE="KEYWORD1">Added Files:</SEQ>
- <SEQ TYPE="KEYWORD1">Modified Files:</SEQ>
- <SEQ TYPE="KEYWORD1">Removed Files:</SEQ>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+<MODE NAME="cvs-commit" FILE="cvs-commit.xml"
+ FILE_NAME_GLOB="cvs*.tmp"/>
+-->
+
+<MODE>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+ <EOL_SPAN TYPE="COMMENT1"
+ DELEGATE="CHANGED"
+ AT_LINE_START="TRUE"
+ >CVS:</EOL_SPAN>
+ </RULES>
+ <RULES SET="CHANGED" DEFAULT="COMMENT2">
+ <SEQ TYPE="COMMENT1" AT_LINE_START="TRUE">CVS:</SEQ>
+ <SEQ TYPE="KEYWORD1">Committing in</SEQ>
+ <SEQ TYPE="KEYWORD1">Added Files:</SEQ>
+ <SEQ TYPE="KEYWORD1">Modified Files:</SEQ>
+ <SEQ TYPE="KEYWORD1">Removed Files:</SEQ>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/d.xml b/jEdit/modes/d.xml
index 564de1a..bfa5b81 100644
--- a/jEdit/modes/d.xml
+++ b/jEdit/modes/d.xml
@@ -1,212 +1,212 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^.*(default:\s*|case.*:.*)$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[0-9a-fA-F_]+[uUlL]?|[0-9_]+(e[0-9_]*)?[uUlLdDfF]?)">
-
- <!-- Silly comment -->
- <SEQ TYPE="COMMENT1">/**/</SEQ>
-
- <!-- Doxygen comment, Javadoc style -->
- <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- Doxygen comment, Qt style -->
- <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
- <BEGIN>/*!</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- C style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- Nested comment -->
- <SPAN TYPE="COMMENT1" DELEGATE="NESTED_COMMENT">
- <BEGIN>/+</BEGIN>
- <END>+/</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <!-- Wysiwyg string literal -->
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>r"</BEGIN>
- <END>"</END>
- </SPAN>
- <!-- Alternate Wysiwyg string literal -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
- <!-- Doublequoted string literal -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <!-- Hex string literal -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>x"</BEGIN>
- <END>"</END>
- </SPAN>
- <!-- Character literal -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <!-- Annotation types -->
- <MARK_FOLLOWING TYPE="KEYWORD4">@</MARK_FOLLOWING>
-
- <KEYWORDS>
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD3>alias</KEYWORD3>
- <KEYWORD4>align</KEYWORD4>
- <KEYWORD2>asm</KEYWORD2>
- <KEYWORD2>assert</KEYWORD2>
- <KEYWORD3>auto</KEYWORD3>
- <KEYWORD3>bit</KEYWORD3>
- <KEYWORD4>body</KEYWORD4>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD3>cast</KEYWORD3>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD3>cent</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>cfloat</KEYWORD3>
- <KEYWORD3>cdouble</KEYWORD3>
- <KEYWORD3>creal</KEYWORD3>
- <INVALID>const</INVALID>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD3>dchar</KEYWORD3>
- <KEYWORD2>debug</KEYWORD2>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD4>delegate</KEYWORD4>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD2>deprecated</KEYWORD2>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD3>enum</KEYWORD3>
- <KEYWORD2>export</KEYWORD2>
- <KEYWORD2>extern</KEYWORD2>
- <LITERAL2>false</LITERAL2>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>foreach</KEYWORD1>
- <KEYWORD4>function</KEYWORD4>
- <INVALID>goto</INVALID>
- <KEYWORD3>idouble</KEYWORD3>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD3>ifloat</KEYWORD3>
- <KEYWORD2>import</KEYWORD2>
- <INVALID>in</INVALID>
- <INVALID>inout</INVALID>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD2>interface</KEYWORD2>
- <KEYWORD2>invariant</KEYWORD2>
- <KEYWORD3>ireal</KEYWORD3>
- <OPERATOR>is</OPERATOR>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD4>module</KEYWORD4>
- <KEYWORD1>new</KEYWORD1>
- <LITERAL2>null</LITERAL2>
- <INVALID>out</INVALID>
- <KEYWORD4>override</KEYWORD4>
- <KEYWORD2>package</KEYWORD2>
- <KEYWORD2>pragma</KEYWORD2>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD3>real</KEYWORD3>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD3>struct</KEYWORD3>
- <LITERAL2>super</LITERAL2>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD3>template</KEYWORD3>
- <LITERAL2>this</LITERAL2>
- <KEYWORD1>throw</KEYWORD1>
- <LITERAL2>true</LITERAL2>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD3>typedef</KEYWORD3>
- <KEYWORD1>typeof</KEYWORD1>
- <KEYWORD3>ubyte</KEYWORD3>
- <KEYWORD3>ucent</KEYWORD3>
- <KEYWORD3>uint</KEYWORD3>
- <KEYWORD3>ulong</KEYWORD3>
- <KEYWORD3>union</KEYWORD3>
- <KEYWORD2>unittest</KEYWORD2>
- <KEYWORD3>ushort</KEYWORD3>
- <KEYWORD2>version</KEYWORD2>
- <KEYWORD3>void</KEYWORD3>
- <KEYWORD1>volatile</KEYWORD1>
- <KEYWORD3>wchar</KEYWORD3>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD2>with</KEYWORD2>
- </KEYWORDS>
- </RULES>
- <RULES SET="NESTED_COMMENT" DEFAULT="COMMENT1">
- <SPAN TYPE="COMMENT1" DELEGATE="NESTED_COMMENT">
- <BEGIN>/+</BEGIN>
- <END>+/</END>
- </SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^.*(default:\s*|case.*:.*)$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[0-9a-fA-F_]+[uUlL]?|[0-9_]+(e[0-9_]*)?[uUlLdDfF]?)">
+
+ <!-- Silly comment -->
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+
+ <!-- Doxygen comment, Javadoc style -->
+ <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Doxygen comment, Qt style -->
+ <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
+ <BEGIN>/*!</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- C style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Nested comment -->
+ <SPAN TYPE="COMMENT1" DELEGATE="NESTED_COMMENT">
+ <BEGIN>/+</BEGIN>
+ <END>+/</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <!-- Wysiwyg string literal -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>r"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <!-- Alternate Wysiwyg string literal -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+ <!-- Doublequoted string literal -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <!-- Hex string literal -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>x"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <!-- Character literal -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <!-- Annotation types -->
+ <MARK_FOLLOWING TYPE="KEYWORD4">@</MARK_FOLLOWING>
+
+ <KEYWORDS>
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD3>alias</KEYWORD3>
+ <KEYWORD4>align</KEYWORD4>
+ <KEYWORD2>asm</KEYWORD2>
+ <KEYWORD2>assert</KEYWORD2>
+ <KEYWORD3>auto</KEYWORD3>
+ <KEYWORD3>bit</KEYWORD3>
+ <KEYWORD4>body</KEYWORD4>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD3>cast</KEYWORD3>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD3>cent</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>cfloat</KEYWORD3>
+ <KEYWORD3>cdouble</KEYWORD3>
+ <KEYWORD3>creal</KEYWORD3>
+ <INVALID>const</INVALID>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD3>dchar</KEYWORD3>
+ <KEYWORD2>debug</KEYWORD2>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD4>delegate</KEYWORD4>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD2>deprecated</KEYWORD2>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD3>enum</KEYWORD3>
+ <KEYWORD2>export</KEYWORD2>
+ <KEYWORD2>extern</KEYWORD2>
+ <LITERAL2>false</LITERAL2>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>foreach</KEYWORD1>
+ <KEYWORD4>function</KEYWORD4>
+ <INVALID>goto</INVALID>
+ <KEYWORD3>idouble</KEYWORD3>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD3>ifloat</KEYWORD3>
+ <KEYWORD2>import</KEYWORD2>
+ <INVALID>in</INVALID>
+ <INVALID>inout</INVALID>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD2>interface</KEYWORD2>
+ <KEYWORD2>invariant</KEYWORD2>
+ <KEYWORD3>ireal</KEYWORD3>
+ <OPERATOR>is</OPERATOR>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD4>module</KEYWORD4>
+ <KEYWORD1>new</KEYWORD1>
+ <LITERAL2>null</LITERAL2>
+ <INVALID>out</INVALID>
+ <KEYWORD4>override</KEYWORD4>
+ <KEYWORD2>package</KEYWORD2>
+ <KEYWORD2>pragma</KEYWORD2>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD3>real</KEYWORD3>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD3>struct</KEYWORD3>
+ <LITERAL2>super</LITERAL2>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD3>template</KEYWORD3>
+ <LITERAL2>this</LITERAL2>
+ <KEYWORD1>throw</KEYWORD1>
+ <LITERAL2>true</LITERAL2>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD3>typedef</KEYWORD3>
+ <KEYWORD1>typeof</KEYWORD1>
+ <KEYWORD3>ubyte</KEYWORD3>
+ <KEYWORD3>ucent</KEYWORD3>
+ <KEYWORD3>uint</KEYWORD3>
+ <KEYWORD3>ulong</KEYWORD3>
+ <KEYWORD3>union</KEYWORD3>
+ <KEYWORD2>unittest</KEYWORD2>
+ <KEYWORD3>ushort</KEYWORD3>
+ <KEYWORD2>version</KEYWORD2>
+ <KEYWORD3>void</KEYWORD3>
+ <KEYWORD1>volatile</KEYWORD1>
+ <KEYWORD3>wchar</KEYWORD3>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD2>with</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+ <RULES SET="NESTED_COMMENT" DEFAULT="COMMENT1">
+ <SPAN TYPE="COMMENT1" DELEGATE="NESTED_COMMENT">
+ <BEGIN>/+</BEGIN>
+ <END>+/</END>
+ </SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/django.xml b/jEdit/modes/django.xml
index e9162d5..7121185 100644
--- a/jEdit/modes/django.xml
+++ b/jEdit/modes/django.xml
@@ -1,136 +1,268 @@
-<?xml version="1.0"?>
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="{% comment %}" />
- <PROPERTY NAME="commentEnd" VALUE="{% endcomment %}" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
- <IMPORT DELEGATE="html::MAIN"/>
-
- <SPAN TYPE="COMMENT3">
- <BEGIN>{% comment %}</BEGIN>
- <END>{% endcomment %}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD3" DELEGATE="DJANGO_BLOCK">
- <BEGIN>{%</BEGIN>
- <END>%}</END>
- </SPAN>
- <!-- variable -->
- <SPAN TYPE="KEYWORD3" DELEGATE="DJANGO_VARIABLE">
- <BEGIN>{{</BEGIN>
- <END>}}</END>
- </SPAN>
- </RULES>
-
- <RULES SET="DJANGO_VARIABLE" DEFAULT="LITERAL4">
- <IMPORT DELEGATE="DJANGO_CORE"/>
- </RULES>
-
- <RULES SET="DJANGO_BLOCK" DEFAULT="LITERAL4">
- <IMPORT DELEGATE="DJANGO_CORE"/>
- <KEYWORDS>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>block</KEYWORD1>
- <KEYWORD1>blocktrans</KEYWORD1>
- <KEYWORD1>by</KEYWORD1>
- <KEYWORD1>endblock</KEYWORD1>
- <KEYWORD1>endblocktrans</KEYWORD1>
- <KEYWORD1>comment</KEYWORD1>
- <KEYWORD1>endcomment</KEYWORD1>
- <KEYWORD1>cycle</KEYWORD1>
- <KEYWORD1>date</KEYWORD1>
- <KEYWORD1>debug</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>filter</KEYWORD1>
- <KEYWORD1>endfilter</KEYWORD1>
- <KEYWORD1>firstof</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>endfor</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>endif</KEYWORD1>
- <KEYWORD1>ifchanged</KEYWORD1>
- <KEYWORD1>endifchanged</KEYWORD1>
- <KEYWORD1>ifnotequal</KEYWORD1>
- <KEYWORD1>endifnotequal</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>load</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>now</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>parsed</KEYWORD1>
- <KEYWORD1>regroup</KEYWORD1>
- <KEYWORD1>ssi</KEYWORD1>
- <KEYWORD1>trans</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
- <KEYWORD1>widthratio</KEYWORD1>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="DJANGO_CORE">
- <SPAN TYPE="LITERAL2">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <KEYWORDS>
- <LITERAL3>openblock</LITERAL3>
- <LITERAL3>closeblock</LITERAL3>
- <LITERAL3>openvariable</LITERAL3>
- <LITERAL3>closevariable</LITERAL3>
-
- <FUNCTION>add</FUNCTION>
- <FUNCTION>addslashes</FUNCTION>
- <FUNCTION>capfirst</FUNCTION>
- <FUNCTION>center</FUNCTION>
- <FUNCTION>cut</FUNCTION>
- <FUNCTION>date</FUNCTION>
- <FUNCTION>default</FUNCTION>
- <FUNCTION>dictsort</FUNCTION>
- <FUNCTION>dictsortreversed</FUNCTION>
- <FUNCTION>divisibleby</FUNCTION>
- <FUNCTION>escape</FUNCTION>
- <FUNCTION>filesizeformat</FUNCTION>
- <FUNCTION>first</FUNCTION>
- <FUNCTION>fix_ampersands</FUNCTION>
- <FUNCTION>floatformat</FUNCTION>
- <FUNCTION>get_digit</FUNCTION>
- <FUNCTION>join</FUNCTION>
- <FUNCTION>length</FUNCTION>
- <FUNCTION>length_is</FUNCTION>
- <FUNCTION>linebreaks</FUNCTION>
- <FUNCTION>linebreaksbr</FUNCTION>
- <FUNCTION>linenumbers</FUNCTION>
- <FUNCTION>ljust</FUNCTION>
- <FUNCTION>lower</FUNCTION>
- <FUNCTION>make_list</FUNCTION>
- <FUNCTION>phone2numeric</FUNCTION>
- <FUNCTION>pluralize</FUNCTION>
- <FUNCTION>pprint</FUNCTION>
- <FUNCTION>random</FUNCTION>
- <FUNCTION>removetags</FUNCTION>
- <FUNCTION>rjust</FUNCTION>
- <FUNCTION>slice</FUNCTION>
- <FUNCTION>slugify</FUNCTION>
- <FUNCTION>stringformat</FUNCTION>
- <FUNCTION>striptags</FUNCTION>
- <FUNCTION>time</FUNCTION>
- <FUNCTION>timesince</FUNCTION>
- <FUNCTION>title</FUNCTION>
- <FUNCTION>truncatewords</FUNCTION>
- <FUNCTION>unordered_list</FUNCTION>
- <FUNCTION>upper</FUNCTION>
- <FUNCTION>urlencode</FUNCTION>
- <FUNCTION>urlize</FUNCTION>
- <FUNCTION>urlizetrunc</FUNCTION>
- <FUNCTION>wordcount</FUNCTION>
- <FUNCTION>wordwrap</FUNCTION>
- <FUNCTION>yesno</FUNCTION>
-
- </KEYWORDS>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+<!--
+Original author Ollie Rutherfurd
+
+Django 1.2 templates edit mode
+<http://docs.djangoproject.com/en/dev/topics/templates/>
+
+Updated 2010-09-10 by Jakub Roztocil <jakub at webkitchen.cz>
+* Added missing filters, tags, operators, etc.
+* Higlight Django syntax inside tags and attributes
+* Higlight CSS (and to some extent also Django tags) inside <style>
+* Higlight JavaScript inside <script>
+
+CSS & JS integration and tag highlighting inspired by the PHP mode.
+
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="{% comment %}" />
+ <PROPERTY NAME="commentEnd" VALUE="{% endcomment %}" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE">
+ <IMPORT DELEGATE="html::MAIN"/>
+ <IMPORT DELEGATE="DJANGO" />
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT_OPENTAG">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- CSS -->
+ <SPAN TYPE="MARKUP" DELEGATE="CSS_OPENTAG">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- TAGS -->
+ <SEQ_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="TAGS"></?\w+</SEQ_REGEXP>
+ </RULES>
+
+ <RULES SET="DJANGO">
+ <SPAN TYPE="COMMENT3">
+ <BEGIN>{% comment %}</BEGIN>
+ <END>{% endcomment %}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD3" DELEGATE="DJANGO_BLOCK">
+ <BEGIN>{%</BEGIN>
+ <END>%}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD3" DELEGATE="DJANGO_VARIABLE">
+ <BEGIN>{{</BEGIN>
+ <END>}}</END>
+ </SPAN>
+ </RULES>
+
+ <!-- Javascript -->
+ <RULES SET="JAVASCRIPT_OPENTAG" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="JAVASCRIPT">></SEQ>
+ <IMPORT DELEGATE="TAGS"/> <!-- handle Django in <script> tag -->
+ <IMPORT DELEGATE="html::TAGS" /> <!-- handle e.g. 'style="width:1px"' -->
+ </RULES>
+ <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" ESCAPE="\">
+ <IMPORT DELEGATE="TO_LITERAL+DJANGO"/>
+ <IMPORT DELEGATE="DJANGO"/>
+ <IMPORT DELEGATE="javascript::MAIN"/>
+ </RULES>
+
+ <!-- CSS -->
+ <RULES SET="CSS_OPENTAG" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="CSS">></SEQ>
+ <IMPORT DELEGATE="TO_LITERAL+DJANGO"/>
+ </RULES>
+ <RULES SET="CSS" DEFAULT="MARKUP">
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="" />
+ </PROPS>
+ <IMPORT DELEGATE="TO_LITERAL+DJANGO"/>
+ <IMPORT DELEGATE="DJANGO"/>
+ <IMPORT DELEGATE="css::MAIN"/>
+ </RULES>
+
+ <!-- Inside tags and attributes -->
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+ <IMPORT DELEGATE="TO_LITERAL+DJANGO" />
+ <IMPORT DELEGATE="html::TAGS" /><!-- handle e.g. 'style="width:1px"' -->
+ <SEQ TYPE="MARKUP" DELEGATE="MAIN">></SEQ>
+ </RULES>
+
+ <RULES SET="TO_LITERAL+DJANGO">
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL1+DJANGO">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL1+DJANGO">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <IMPORT DELEGATE="DJANGO"/>
+ </RULES>
+
+ <!-- LITERAL1 + Django syntax (eg. attribute values) -->
+ <RULES SET="LITERAL1+DJANGO" DEFAULT="LITERAL1">
+ <IMPORT DELEGATE="DJANGO"/>
+ </RULES>
+
+
+
+ <RULES SET="DJANGO_VARIABLE" DEFAULT="LITERAL4">
+ <IMPORT DELEGATE="DJANGO_CORE"/>
+ </RULES>
+
+ <RULES SET="DJANGO_BLOCK" DEFAULT="LITERAL4">
+ <IMPORT DELEGATE="DJANGO_CORE"/>
+ <KEYWORDS>
+
+ <OPERATOR>==</OPERATOR>
+ <OPERATOR>!=</OPERATOR>
+ <OPERATOR><</OPERATOR>
+ <OPERATOR>></OPERATOR>
+ <OPERATOR><=</OPERATOR>
+ <OPERATOR>>=</OPERATOR>
+
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+
+ <!--
+ Tags
+ <http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#built-in-tag-reference>
+ -->
+ <KEYWORD1>cache</KEYWORD1>
+ <KEYWORD1>endcache</KEYWORD1>
+ <KEYWORD1>autoescape</KEYWORD1>
+ <KEYWORD1>block</KEYWORD1>
+ <KEYWORD1>endblock</KEYWORD1>
+ <KEYWORD1>csrf_token</KEYWORD1>
+ <KEYWORD1>cycle</KEYWORD1>
+ <KEYWORD1>debug</KEYWORD1>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>filter</KEYWORD1>
+ <KEYWORD1>endfilter</KEYWORD1>
+ <KEYWORD1>firstof</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>endif</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>endfor</KEYWORD1>
+ <KEYWORD1>empty</KEYWORD1>
+ <KEYWORD1>endifchanged</KEYWORD1>
+ <KEYWORD1>endifequal</KEYWORD1>
+ <KEYWORD1>ifnotequal</KEYWORD1>
+ <KEYWORD1>endifnotequal</KEYWORD1>
+ <KEYWORD1>include</KEYWORD1>
+ <KEYWORD1>load</KEYWORD1>
+ <KEYWORD1>now</KEYWORD1>
+ <KEYWORD1>regroup</KEYWORD1>
+ <KEYWORD1>spaceless</KEYWORD1>
+ <KEYWORD1>endspaceless</KEYWORD1>
+ <KEYWORD1>ssi</KEYWORD1>
+ <KEYWORD1>templatetag</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <KEYWORD1>widthratio</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+ <KEYWORD1>endwith</KEYWORD1>
+ <KEYWORD1>trans</KEYWORD1>
+ <KEYWORD1>blocktrans</KEYWORD1>
+ <KEYWORD1>endblocktrans</KEYWORD1>
+
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="DJANGO_CORE">
+ <SPAN TYPE="LITERAL2">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL2">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <KEYWORDS>
+
+ <!--
+ {% templatetag %} arguments
+ <http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#templatetag>
+ -->
+ <LITERAL3>Argument</LITERAL3>
+ <LITERAL3>openblock</LITERAL3>
+ <LITERAL3>closeblock</LITERAL3>
+ <LITERAL3>openvariable</LITERAL3>
+ <LITERAL3>closevariable</LITERAL3>
+ <LITERAL3>openbrace</LITERAL3>
+ <LITERAL3>closebrace</LITERAL3>
+ <LITERAL3>opencomment</LITERAL3>
+ <LITERAL3>closecomment</LITERAL3>
+
+ <!--
+ Filters
+ http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#built-in-filter-reference
+ -->
+ <FUNCTION>add</FUNCTION>
+ <FUNCTION>addslashes</FUNCTION>
+ <FUNCTION>capfirst</FUNCTION>
+ <FUNCTION>center</FUNCTION>
+ <FUNCTION>cut</FUNCTION>
+ <FUNCTION>date</FUNCTION>
+ <FUNCTION>default</FUNCTION>
+ <FUNCTION>default_if_none</FUNCTION>
+ <FUNCTION>dictsort</FUNCTION>
+ <FUNCTION>dictsortreversed</FUNCTION>
+ <FUNCTION>divisibleby</FUNCTION>
+ <FUNCTION>escape</FUNCTION>
+ <FUNCTION>escapejs</FUNCTION>
+ <FUNCTION>filesizeformat</FUNCTION>
+ <FUNCTION>first</FUNCTION>
+ <FUNCTION>fix_ampersands</FUNCTION>
+ <FUNCTION>floatformat</FUNCTION>
+ <FUNCTION>force_escape</FUNCTION>
+ <FUNCTION>get_digit</FUNCTION>
+ <FUNCTION>iriencode</FUNCTION>
+ <FUNCTION>join</FUNCTION>
+ <FUNCTION>last</FUNCTION>
+ <FUNCTION>length</FUNCTION>
+ <FUNCTION>length_is</FUNCTION>
+ <FUNCTION>linebreaks</FUNCTION>
+ <FUNCTION>linebreaksbr</FUNCTION>
+ <FUNCTION>linenumbers</FUNCTION>
+ <FUNCTION>ljust</FUNCTION>
+ <FUNCTION>lower</FUNCTION>
+ <FUNCTION>make_list</FUNCTION>
+ <FUNCTION>phone2numeric</FUNCTION>
+ <FUNCTION>pluralize</FUNCTION>
+ <FUNCTION>pprint</FUNCTION>
+ <FUNCTION>random</FUNCTION>
+ <FUNCTION>removetags</FUNCTION>
+ <FUNCTION>rjust</FUNCTION>
+ <FUNCTION>safe</FUNCTION>
+ <FUNCTION>safeseq</FUNCTION>
+ <FUNCTION>slice</FUNCTION>
+ <FUNCTION>slugify</FUNCTION>
+ <FUNCTION>stringformat</FUNCTION>
+ <FUNCTION>striptags</FUNCTION>
+ <FUNCTION>time</FUNCTION>
+ <FUNCTION>timesince</FUNCTION>
+ <FUNCTION>timeuntil</FUNCTION>
+ <FUNCTION>title</FUNCTION>
+ <FUNCTION>truncatewords</FUNCTION>
+ <FUNCTION>truncatewords_html</FUNCTION>
+ <FUNCTION>unordered_list</FUNCTION>
+ <FUNCTION>upper</FUNCTION>
+ <FUNCTION>urlencode</FUNCTION>
+ <FUNCTION>urlize</FUNCTION>
+ <FUNCTION>urlizetrunc</FUNCTION>
+ <FUNCTION>wordcount</FUNCTION>
+ <FUNCTION>wordwrap</FUNCTION>
+ <FUNCTION>yesno</FUNCTION>
+
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/dot.xml b/jEdit/modes/dot.xml
index 1c22a05..a9f161e 100644
--- a/jEdit/modes/dot.xml
+++ b/jEdit/modes/dot.xml
@@ -1,624 +1,624 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- DOT mode, by Kevin Hunter of caktusgroup.com (kevin@) for jEdit 4.3 -->
-<!-- This is based on the grammar defined at
- http://graphviz.org/doc/info/lang.html -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME='commentStart' VALUE='/*' />
- <PROPERTY NAME='commentEnd' VALUE='*/' />
- <PROPERTY NAME='wordBreakChars' VALUE=',+-=<>/?^&*' />
-
- <!-- Auto indent -->
- <PROPERTY NAME='indentOpenBrackets' VALUE='[{\[]' />
- <PROPERTY NAME='indentCloseBrackets' VALUE='[}\]]' />
- <PROPERTY NAME='unalignedOpenBrackets' VALUE='(' />
- <PROPERTY NAME='unalignedCloseBrackets' VALUE=')' />
- <PROPERTY NAME='indentNextLine'
- VALUE='(?!^\s*(#|//|/\*)).*((sub|di|)graph|node|edge)\s+([\[{<]).*'
- />
- </PROPS>
-
- <RULES
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
-
- <IMPORT DELEGATE='DOT_LEXER' />
- <IMPORT DELEGATE='KEYWORDS' />
- </RULES>
-
- <RULES SET='DOT_LEXER'
- IGNORE_CASE='FALSE'
- HIGHLIGHT_DIGITS='TRUE' DIGIT_RE='[0-9][0-9a-zA-Z]*'>
-
- <EOL_SPAN TYPE='COMMENT1'>#</EOL_SPAN>
- <EOL_SPAN TYPE='COMMENT2'>//</EOL_SPAN>
- <SPAN_REGEXP TYPE='COMMENT3' MATCH_TYPE='COMMENT3' NO_LINE_BREAK='FALSE'>
- <BEGIN>/\*</BEGIN>
- <END>*/</END>
- </SPAN_REGEXP>
-
- <SEQ TYPE='OPERATOR'>-></SEQ>
- <SEQ TYPE='OPERATOR'>[</SEQ>
- <SEQ TYPE='OPERATOR'>]</SEQ>
- <SEQ TYPE='OPERATOR'>)</SEQ>
- <SEQ TYPE='OPERATOR'>}</SEQ>
- <SEQ TYPE='OPERATOR'>{</SEQ>
- <SEQ TYPE='OPERATOR'>;</SEQ>
- <SEQ TYPE='OPERATOR'>=</SEQ>
-
- <SPAN TYPE='KEYWORD3' ESCAPE='\' DELEGATE='url::MAIN'>
- <BEGIN>URL="</BEGIN>
- <END>"</END>
- </SPAN>
- <!-- Dot does not use single quotes as delimiters. -->
- <SPAN TYPE='LITERAL1' ESCAPE='\'>
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN DELEGATE='html::MAIN'>
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
- </RULES>
-
- <RULES SET='KEYWORDS' IGNORE_CASE='TRUE'>
- <KEYWORDS>
- <KEYWORD1>graph</KEYWORD1>
- <KEYWORD1>subgraph</KEYWORD1>
- <KEYWORD1>digraph</KEYWORD1>
- <KEYWORD1>node</KEYWORD1>
- <KEYWORD1>edge</KEYWORD1>
-
- <KEYWORD2>strict</KEYWORD2>
-
- <!-- Node attributes -->
- <KEYWORD3>URL</KEYWORD3>
- <KEYWORD3>label</KEYWORD3>
- <KEYWORD3>shape</KEYWORD3>
- <KEYWORD3>style</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>rank</KEYWORD3>
- <KEYWORD3>tailport</KEYWORD3>
- <KEYWORD3>headport</KEYWORD3>
-
- <!-- Node ranks -->
- <KEYWORD4>same</KEYWORD4>
-
- <!-- Node shapes -->
- <KEYWORD4>box</KEYWORD4>
- <KEYWORD4>polygon</KEYWORD4>
- <KEYWORD4>ellipse</KEYWORD4>
- <KEYWORD4>point</KEYWORD4>
- <KEYWORD4>egg</KEYWORD4>
- <KEYWORD4>triangle</KEYWORD4>
- <KEYWORD4>diamond</KEYWORD4>
- <KEYWORD4>trapezium</KEYWORD4>
- <KEYWORD4>parallelogram</KEYWORD4>
- <KEYWORD4>hexagon</KEYWORD4>
- <KEYWORD4>octagon</KEYWORD4>
- <KEYWORD4>doublecircle</KEYWORD4>
- <KEYWORD4>tripleoctagon</KEYWORD4>
- <KEYWORD4>invtriangle</KEYWORD4>
- <KEYWORD4>invtrapezium</KEYWORD4>
-
- <!-- Edge pointer shapes (arrow heads) -->
- <KEYWORD4>normal</KEYWORD4>
- <KEYWORD4>dot</KEYWORD4>
- <KEYWORD4>odot</KEYWORD4>
- <KEYWORD4>inv</KEYWORD4>
- <KEYWORD4>invdot</KEYWORD4>
- <KEYWORD4>invodot</KEYWORD4>
- <KEYWORD4>none</KEYWORD4>
-
- <!-- Colors -->
-
- <!-- Whites -->
- <KEYWORD4>antiquewhite1</KEYWORD4>
- <KEYWORD4>antiquewhite2</KEYWORD4>
- <KEYWORD4>antiquewhite3</KEYWORD4>
- <KEYWORD4>antiquewhite4</KEYWORD4>
- <KEYWORD4>azure1</KEYWORD4>
- <KEYWORD4>azure2</KEYWORD4>
- <KEYWORD4>azure3</KEYWORD4>
- <KEYWORD4>azure4</KEYWORD4>
- <KEYWORD4>bisque1</KEYWORD4>
- <KEYWORD4>bisque2</KEYWORD4>
- <KEYWORD4>bisque3</KEYWORD4>
- <KEYWORD4>bisque4</KEYWORD4>
- <KEYWORD4>blanchedalmond</KEYWORD4>
- <KEYWORD4>cornsilk1</KEYWORD4>
- <KEYWORD4>cornsilk2</KEYWORD4>
- <KEYWORD4>cornsilk3</KEYWORD4>
- <KEYWORD4>cornsilk4</KEYWORD4>
- <KEYWORD4>floralwhite</KEYWORD4>
- <KEYWORD4>gainsboro</KEYWORD4>
- <KEYWORD4>ghostwhite</KEYWORD4>
- <KEYWORD4>honeydew1</KEYWORD4>
- <KEYWORD4>honeydew2</KEYWORD4>
- <KEYWORD4>honeydew3</KEYWORD4>
- <KEYWORD4>honeydew4</KEYWORD4>
- <KEYWORD4>ivory1</KEYWORD4>
- <KEYWORD4>ivory2</KEYWORD4>
- <KEYWORD4>ivory3</KEYWORD4>
- <KEYWORD4>ivory4</KEYWORD4>
- <KEYWORD4>lavender</KEYWORD4>
- <KEYWORD4>lavenderblush1</KEYWORD4>
- <KEYWORD4>lavenderblush2</KEYWORD4>
- <KEYWORD4>lavenderblush3</KEYWORD4>
- <KEYWORD4>lavenderblush4</KEYWORD4>
- <KEYWORD4>lemonchiffon1</KEYWORD4>
- <KEYWORD4>lemonchiffon2</KEYWORD4>
- <KEYWORD4>lemonchiffon3</KEYWORD4>
- <KEYWORD4>lemonchiffon4</KEYWORD4>
- <KEYWORD4>linen</KEYWORD4>
- <KEYWORD4>mintcream</KEYWORD4>
- <KEYWORD4>mistyrose1</KEYWORD4>
- <KEYWORD4>mistyrose2</KEYWORD4>
- <KEYWORD4>mistyrose3</KEYWORD4>
- <KEYWORD4>mistyrose4</KEYWORD4>
- <KEYWORD4>moccasin</KEYWORD4>
- <KEYWORD4>navajowhite1</KEYWORD4>
- <KEYWORD4>navajowhite2</KEYWORD4>
- <KEYWORD4>navajowhite3</KEYWORD4>
- <KEYWORD4>navajowhite4</KEYWORD4>
- <KEYWORD4>oldlace</KEYWORD4>
- <KEYWORD4>papayawhip</KEYWORD4>
- <KEYWORD4>peachpuff1</KEYWORD4>
- <KEYWORD4>peachpuff2</KEYWORD4>
- <KEYWORD4>peachpuff3</KEYWORD4>
- <KEYWORD4>peachpuff4</KEYWORD4>
- <KEYWORD4>seashell1</KEYWORD4>
- <KEYWORD4>seashell2</KEYWORD4>
- <KEYWORD4>seashell3</KEYWORD4>
- <KEYWORD4>seashell4</KEYWORD4>
- <KEYWORD4>snow1</KEYWORD4>
- <KEYWORD4>snow2</KEYWORD4>
- <KEYWORD4>snow3</KEYWORD4>
- <KEYWORD4>snow4</KEYWORD4>
- <KEYWORD4>thistle1</KEYWORD4>
- <KEYWORD4>thistle2</KEYWORD4>
- <KEYWORD4>thistle3</KEYWORD4>
- <KEYWORD4>thistle4</KEYWORD4>
- <KEYWORD4>wheat1</KEYWORD4>
- <KEYWORD4>wheat2</KEYWORD4>
- <KEYWORD4>wheat3</KEYWORD4>
- <KEYWORD4>wheat4</KEYWORD4>
- <KEYWORD4>white</KEYWORD4>
- <KEYWORD4>whitesmoke</KEYWORD4>
-
- <!-- Reds -->
- <KEYWORD4>coral1</KEYWORD4>
- <KEYWORD4>coral2</KEYWORD4>
- <KEYWORD4>coral3</KEYWORD4>
- <KEYWORD4>coral4</KEYWORD4>
- <KEYWORD4>crimson</KEYWORD4>
- <KEYWORD4>darksalmon</KEYWORD4>
- <KEYWORD4>deeppink1</KEYWORD4>
- <KEYWORD4>deeppink2</KEYWORD4>
- <KEYWORD4>deeppink3</KEYWORD4>
- <KEYWORD4>deeppink4</KEYWORD4>
- <KEYWORD4>firebrick1</KEYWORD4>
- <KEYWORD4>firebrick2</KEYWORD4>
- <KEYWORD4>firebrick3</KEYWORD4>
- <KEYWORD4>firebrick4</KEYWORD4>
- <KEYWORD4>hotpink1</KEYWORD4>
- <KEYWORD4>hotpink2</KEYWORD4>
- <KEYWORD4>hotpink3</KEYWORD4>
- <KEYWORD4>hotpink4</KEYWORD4>
- <KEYWORD4>indianred1</KEYWORD4>
- <KEYWORD4>indianred2</KEYWORD4>
- <KEYWORD4>indianred3</KEYWORD4>
- <KEYWORD4>indianred4</KEYWORD4>
- <KEYWORD4>lightpink1</KEYWORD4>
- <KEYWORD4>lightpink2</KEYWORD4>
- <KEYWORD4>lightpink3</KEYWORD4>
- <KEYWORD4>lightpink4</KEYWORD4>
- <KEYWORD4>lightsalmon1</KEYWORD4>
- <KEYWORD4>lightsalmon2</KEYWORD4>
- <KEYWORD4>lightsalmon3</KEYWORD4>
- <KEYWORD4>lightsalmon4</KEYWORD4>
- <KEYWORD4>maroon1</KEYWORD4>
- <KEYWORD4>maroon2</KEYWORD4>
- <KEYWORD4>maroon3</KEYWORD4>
- <KEYWORD4>maroon4</KEYWORD4>
- <KEYWORD4>mediumvioletred</KEYWORD4>
- <KEYWORD4>orangered1</KEYWORD4>
- <KEYWORD4>orangered2</KEYWORD4>
- <KEYWORD4>orangered3</KEYWORD4>
- <KEYWORD4>orangered4</KEYWORD4>
- <KEYWORD4>palevioletred1</KEYWORD4>
- <KEYWORD4>palevioletred2</KEYWORD4>
- <KEYWORD4>palevioletred3</KEYWORD4>
- <KEYWORD4>palevioletred4</KEYWORD4>
- <KEYWORD4>pink1</KEYWORD4>
- <KEYWORD4>pink2</KEYWORD4>
- <KEYWORD4>pink3</KEYWORD4>
- <KEYWORD4>pink4</KEYWORD4>
- <KEYWORD4>red1</KEYWORD4>
- <KEYWORD4>red2</KEYWORD4>
- <KEYWORD4>red3</KEYWORD4>
- <KEYWORD4>red4</KEYWORD4>
- <KEYWORD4>salmon1</KEYWORD4>
- <KEYWORD4>salmon2</KEYWORD4>
- <KEYWORD4>salmon3</KEYWORD4>
- <KEYWORD4>salmon4</KEYWORD4>
- <KEYWORD4>tomato1</KEYWORD4>
- <KEYWORD4>tomato2</KEYWORD4>
- <KEYWORD4>tomato3</KEYWORD4>
- <KEYWORD4>tomato4</KEYWORD4>
- <KEYWORD4>violetred1</KEYWORD4>
- <KEYWORD4>violetred2</KEYWORD4>
- <KEYWORD4>violetred3</KEYWORD4>
- <KEYWORD4>violetred4</KEYWORD4>
-
- <!-- Yellows -->
- <KEYWORD4>darkgoldenrod1</KEYWORD4>
- <KEYWORD4>darkgoldenrod2</KEYWORD4>
- <KEYWORD4>darkgoldenrod3</KEYWORD4>
- <KEYWORD4>darkgoldenrod4</KEYWORD4>
- <KEYWORD4>gold1</KEYWORD4>
- <KEYWORD4>gold2</KEYWORD4>
- <KEYWORD4>gold3</KEYWORD4>
- <KEYWORD4>gold4</KEYWORD4>
- <KEYWORD4>goldenrod1</KEYWORD4>
- <KEYWORD4>goldenrod2</KEYWORD4>
- <KEYWORD4>goldenrod3</KEYWORD4>
- <KEYWORD4>goldenrod4</KEYWORD4>
- <KEYWORD4>greenyellow</KEYWORD4>
- <KEYWORD4>lightgoldenrod1</KEYWORD4>
- <KEYWORD4>lightgoldenrod2</KEYWORD4>
- <KEYWORD4>lightgoldenrod3</KEYWORD4>
- <KEYWORD4>lightgoldenrod4</KEYWORD4>
- <KEYWORD4>lightgoldenrodyellow</KEYWORD4>
- <KEYWORD4>lightyellow1</KEYWORD4>
- <KEYWORD4>lightyellow2</KEYWORD4>
- <KEYWORD4>lightyellow3</KEYWORD4>
- <KEYWORD4>lightyellow4</KEYWORD4>
- <KEYWORD4>palegoldenrod</KEYWORD4>
- <KEYWORD4>yellow1</KEYWORD4>
- <KEYWORD4>yellow2</KEYWORD4>
- <KEYWORD4>yellow3</KEYWORD4>
- <KEYWORD4>yellow4</KEYWORD4>
- <KEYWORD4>yellowgreen</KEYWORD4>
-
- <!-- Magentas -->
- <KEYWORD4>blueviolet</KEYWORD4>
- <KEYWORD4>darkorchid1</KEYWORD4>
- <KEYWORD4>darkorchid2</KEYWORD4>
- <KEYWORD4>darkorchid3</KEYWORD4>
- <KEYWORD4>darkorchid4</KEYWORD4>
- <KEYWORD4>darkviolet</KEYWORD4>
- <KEYWORD4>magenta1</KEYWORD4>
- <KEYWORD4>magenta2</KEYWORD4>
- <KEYWORD4>magenta3</KEYWORD4>
- <KEYWORD4>magenta4</KEYWORD4>
- <KEYWORD4>mediumorchid1</KEYWORD4>
- <KEYWORD4>mediumorchid2</KEYWORD4>
- <KEYWORD4>mediumorchid3</KEYWORD4>
- <KEYWORD4>mediumorchid4</KEYWORD4>
- <KEYWORD4>mediumpurple1</KEYWORD4>
- <KEYWORD4>mediumpurple2</KEYWORD4>
- <KEYWORD4>mediumpurple3</KEYWORD4>
- <KEYWORD4>mediumpurple4</KEYWORD4>
- <KEYWORD4>mediumvioletred</KEYWORD4>
- <KEYWORD4>orchid1</KEYWORD4>
- <KEYWORD4>orchid2</KEYWORD4>
- <KEYWORD4>orchid3</KEYWORD4>
- <KEYWORD4>orchid4</KEYWORD4>
- <KEYWORD4>palevioletred1</KEYWORD4>
- <KEYWORD4>palevioletred2</KEYWORD4>
- <KEYWORD4>palevioletred3</KEYWORD4>
- <KEYWORD4>palevioletred4</KEYWORD4>
- <KEYWORD4>plum1</KEYWORD4>
- <KEYWORD4>plum2</KEYWORD4>
- <KEYWORD4>plum3</KEYWORD4>
- <KEYWORD4>plum4</KEYWORD4>
- <KEYWORD4>purple1</KEYWORD4>
- <KEYWORD4>purple2</KEYWORD4>
- <KEYWORD4>purple3</KEYWORD4>
- <KEYWORD4>purple4</KEYWORD4>
- <KEYWORD4>violet</KEYWORD4>
- <KEYWORD4>violetred1</KEYWORD4>
- <KEYWORD4>violetred2</KEYWORD4>
- <KEYWORD4>violetred3</KEYWORD4>
- <KEYWORD4>violetred4</KEYWORD4>
-
- <!-- Blues -->
- <KEYWORD4>aliceblue</KEYWORD4>
- <KEYWORD4>blue1</KEYWORD4>
- <KEYWORD4>blue2</KEYWORD4>
- <KEYWORD4>blue3</KEYWORD4>
- <KEYWORD4>blue4</KEYWORD4>
- <KEYWORD4>blueviolet</KEYWORD4>
- <KEYWORD4>cadetblue1</KEYWORD4>
- <KEYWORD4>cadetblue2</KEYWORD4>
- <KEYWORD4>cadetblue3</KEYWORD4>
- <KEYWORD4>cadetblue4</KEYWORD4>
- <KEYWORD4>cornflowerblue</KEYWORD4>
- <KEYWORD4>darkslateblue</KEYWORD4>
- <KEYWORD4>deepskyblue1</KEYWORD4>
- <KEYWORD4>deepskyblue2</KEYWORD4>
- <KEYWORD4>deepskyblue3</KEYWORD4>
- <KEYWORD4>deepskyblue4</KEYWORD4>
- <KEYWORD4>dodgerblue1</KEYWORD4>
- <KEYWORD4>dodgerblue2</KEYWORD4>
- <KEYWORD4>dodgerblue3</KEYWORD4>
- <KEYWORD4>dodgerblue4</KEYWORD4>
- <KEYWORD4>indigo</KEYWORD4>
- <KEYWORD4>lightblue1</KEYWORD4>
- <KEYWORD4>lightblue2</KEYWORD4>
- <KEYWORD4>lightblue3</KEYWORD4>
- <KEYWORD4>lightblue4</KEYWORD4>
- <KEYWORD4>lightskyblue1</KEYWORD4>
- <KEYWORD4>lightskyblue2</KEYWORD4>
- <KEYWORD4>lightskyblue3</KEYWORD4>
- <KEYWORD4>lightskyblue4</KEYWORD4>
- <KEYWORD4>lightslateblue1</KEYWORD4>
- <KEYWORD4>lightslateblue2</KEYWORD4>
- <KEYWORD4>lightslateblue3</KEYWORD4>
- <KEYWORD4>lightslateblue4</KEYWORD4>
- <KEYWORD4>mediumblue</KEYWORD4>
- <KEYWORD4>mediumslateblue</KEYWORD4>
- <KEYWORD4>midnightblue</KEYWORD4>
- <KEYWORD4>navy</KEYWORD4>
- <KEYWORD4>navyblue</KEYWORD4>
- <KEYWORD4>powderblue</KEYWORD4>
- <KEYWORD4>royalblue1</KEYWORD4>
- <KEYWORD4>royalblue2</KEYWORD4>
- <KEYWORD4>royalblue3</KEYWORD4>
- <KEYWORD4>royalblue4</KEYWORD4>
- <KEYWORD4>skyblue1</KEYWORD4>
- <KEYWORD4>skyblue2</KEYWORD4>
- <KEYWORD4>skyblue3</KEYWORD4>
- <KEYWORD4>skyblue4</KEYWORD4>
- <KEYWORD4>slateblue1</KEYWORD4>
- <KEYWORD4>slateblue2</KEYWORD4>
- <KEYWORD4>slateblue3</KEYWORD4>
- <KEYWORD4>slateblue4</KEYWORD4>
- <KEYWORD4>steelblue1</KEYWORD4>
- <KEYWORD4>steelblue2</KEYWORD4>
- <KEYWORD4>steelblue3</KEYWORD4>
- <KEYWORD4>steelblue4</KEYWORD4>
-
- <!-- Greens -->
- <KEYWORD4>chartreuse1</KEYWORD4>
- <KEYWORD4>chartreuse2</KEYWORD4>
- <KEYWORD4>chartreuse3</KEYWORD4>
- <KEYWORD4>chartreuse4</KEYWORD4>
- <KEYWORD4>darkgreen</KEYWORD4>
- <KEYWORD4>darkolivegreen1</KEYWORD4>
- <KEYWORD4>darkolivegreen2</KEYWORD4>
- <KEYWORD4>darkolivegreen3</KEYWORD4>
- <KEYWORD4>darkolivegreen4</KEYWORD4>
- <KEYWORD4>darkseagreen1</KEYWORD4>
- <KEYWORD4>darkseagreen2</KEYWORD4>
- <KEYWORD4>darkseagreen3</KEYWORD4>
- <KEYWORD4>darkseagreen4</KEYWORD4>
- <KEYWORD4>forestgreen</KEYWORD4>
- <KEYWORD4>green1</KEYWORD4>
- <KEYWORD4>green2</KEYWORD4>
- <KEYWORD4>green3</KEYWORD4>
- <KEYWORD4>green4</KEYWORD4>
- <KEYWORD4>greenyellow</KEYWORD4>
- <KEYWORD4>lawngreen</KEYWORD4>
- <KEYWORD4>lightseagreen</KEYWORD4>
- <KEYWORD4>limegreen</KEYWORD4>
- <KEYWORD4>mediumseagreen</KEYWORD4>
- <KEYWORD4>mediumspringgreen</KEYWORD4>
- <KEYWORD4>mintcream</KEYWORD4>
- <KEYWORD4>olivedrab1</KEYWORD4>
- <KEYWORD4>olivedrab2</KEYWORD4>
- <KEYWORD4>olivedrab3</KEYWORD4>
- <KEYWORD4>olivedrab4</KEYWORD4>
- <KEYWORD4>palegreen1</KEYWORD4>
- <KEYWORD4>palegreen2</KEYWORD4>
- <KEYWORD4>palegreen3</KEYWORD4>
- <KEYWORD4>palegreen4</KEYWORD4>
- <KEYWORD4>seagreen1</KEYWORD4>
- <KEYWORD4>seagreen2</KEYWORD4>
- <KEYWORD4>seagreen3</KEYWORD4>
- <KEYWORD4>seagreen4</KEYWORD4>
- <KEYWORD4>springgreen1</KEYWORD4>
- <KEYWORD4>springgreen2</KEYWORD4>
- <KEYWORD4>springgreen3</KEYWORD4>
- <KEYWORD4>springgreen4</KEYWORD4>
- <KEYWORD4>yellowgreen</KEYWORD4>
-
- <!-- Browns -->
- <KEYWORD4>beige</KEYWORD4>
- <KEYWORD4>brown1</KEYWORD4>
- <KEYWORD4>brown2</KEYWORD4>
- <KEYWORD4>brown3</KEYWORD4>
- <KEYWORD4>brown4</KEYWORD4>
- <KEYWORD4>burlywood1</KEYWORD4>
- <KEYWORD4>burlywood2</KEYWORD4>
- <KEYWORD4>burlywood3</KEYWORD4>
- <KEYWORD4>burlywood4</KEYWORD4>
- <KEYWORD4>chocolate1</KEYWORD4>
- <KEYWORD4>chocolate2</KEYWORD4>
- <KEYWORD4>chocolate3</KEYWORD4>
- <KEYWORD4>chocolate4</KEYWORD4>
- <KEYWORD4>darkkhaki</KEYWORD4>
- <KEYWORD4>khaki1</KEYWORD4>
- <KEYWORD4>khaki2</KEYWORD4>
- <KEYWORD4>khaki3</KEYWORD4>
- <KEYWORD4>khaki4</KEYWORD4>
- <KEYWORD4>peru</KEYWORD4>
- <KEYWORD4>rosybrown1</KEYWORD4>
- <KEYWORD4>rosybrown2</KEYWORD4>
- <KEYWORD4>rosybrown3</KEYWORD4>
- <KEYWORD4>rosybrown4</KEYWORD4>
- <KEYWORD4>saddlebrown</KEYWORD4>
- <KEYWORD4>sandybrown</KEYWORD4>
- <KEYWORD4>sienna1</KEYWORD4>
- <KEYWORD4>sienna2</KEYWORD4>
- <KEYWORD4>sienna3</KEYWORD4>
- <KEYWORD4>sienna4</KEYWORD4>
- <KEYWORD4>tan1</KEYWORD4>
- <KEYWORD4>tan2</KEYWORD4>
- <KEYWORD4>tan3</KEYWORD4>
- <KEYWORD4>tan4</KEYWORD4>
-
- <!-- Greys -->
- <KEYWORD4>darkslategray1</KEYWORD4>
- <KEYWORD4>darkslategray2</KEYWORD4>
- <KEYWORD4>darkslategray3</KEYWORD4>
- <KEYWORD4>darkslategray4</KEYWORD4>
- <KEYWORD4>dimgray</KEYWORD4>
- <KEYWORD4>gray</KEYWORD4>
- <KEYWORD4>gray0</KEYWORD4>
- <KEYWORD4>gray1</KEYWORD4>
- <KEYWORD4>gray2</KEYWORD4>
- <KEYWORD4>gray3</KEYWORD4>
- <KEYWORD4>gray4</KEYWORD4>
- <KEYWORD4>gray5</KEYWORD4>
- <KEYWORD4>gray6</KEYWORD4>
- <KEYWORD4>gray7</KEYWORD4>
- <KEYWORD4>gray8</KEYWORD4>
- <KEYWORD4>gray9</KEYWORD4>
- <KEYWORD4>gray10</KEYWORD4>
- <KEYWORD4>gray11</KEYWORD4>
- <KEYWORD4>gray12</KEYWORD4>
- <KEYWORD4>gray13</KEYWORD4>
- <KEYWORD4>gray14</KEYWORD4>
- <KEYWORD4>gray15</KEYWORD4>
- <KEYWORD4>gray16</KEYWORD4>
- <KEYWORD4>gray17</KEYWORD4>
- <KEYWORD4>gray18</KEYWORD4>
- <KEYWORD4>gray19</KEYWORD4>
- <KEYWORD4>gray20</KEYWORD4>
- <KEYWORD4>gray21</KEYWORD4>
- <KEYWORD4>gray22</KEYWORD4>
- <KEYWORD4>gray23</KEYWORD4>
- <KEYWORD4>gray24</KEYWORD4>
- <KEYWORD4>gray25</KEYWORD4>
- <KEYWORD4>gray26</KEYWORD4>
- <KEYWORD4>gray27</KEYWORD4>
- <KEYWORD4>gray28</KEYWORD4>
- <KEYWORD4>gray29</KEYWORD4>
- <KEYWORD4>gray30</KEYWORD4>
- <KEYWORD4>gray31</KEYWORD4>
- <KEYWORD4>gray32</KEYWORD4>
- <KEYWORD4>gray33</KEYWORD4>
- <KEYWORD4>gray34</KEYWORD4>
- <KEYWORD4>gray35</KEYWORD4>
- <KEYWORD4>gray36</KEYWORD4>
- <KEYWORD4>gray37</KEYWORD4>
- <KEYWORD4>gray38</KEYWORD4>
- <KEYWORD4>gray39</KEYWORD4>
- <KEYWORD4>gray40</KEYWORD4>
- <KEYWORD4>gray41</KEYWORD4>
- <KEYWORD4>gray42</KEYWORD4>
- <KEYWORD4>gray43</KEYWORD4>
- <KEYWORD4>gray44</KEYWORD4>
- <KEYWORD4>gray45</KEYWORD4>
- <KEYWORD4>gray46</KEYWORD4>
- <KEYWORD4>gray47</KEYWORD4>
- <KEYWORD4>gray48</KEYWORD4>
- <KEYWORD4>gray49</KEYWORD4>
- <KEYWORD4>gray50</KEYWORD4>
- <KEYWORD4>gray51</KEYWORD4>
- <KEYWORD4>gray52</KEYWORD4>
- <KEYWORD4>gray53</KEYWORD4>
- <KEYWORD4>gray54</KEYWORD4>
- <KEYWORD4>gray55</KEYWORD4>
- <KEYWORD4>gray56</KEYWORD4>
- <KEYWORD4>gray57</KEYWORD4>
- <KEYWORD4>gray58</KEYWORD4>
- <KEYWORD4>gray59</KEYWORD4>
- <KEYWORD4>gray60</KEYWORD4>
- <KEYWORD4>gray61</KEYWORD4>
- <KEYWORD4>gray62</KEYWORD4>
- <KEYWORD4>gray63</KEYWORD4>
- <KEYWORD4>gray64</KEYWORD4>
- <KEYWORD4>gray65</KEYWORD4>
- <KEYWORD4>gray66</KEYWORD4>
- <KEYWORD4>gray67</KEYWORD4>
- <KEYWORD4>gray68</KEYWORD4>
- <KEYWORD4>gray69</KEYWORD4>
- <KEYWORD4>gray70</KEYWORD4>
- <KEYWORD4>gray71</KEYWORD4>
- <KEYWORD4>gray72</KEYWORD4>
- <KEYWORD4>gray73</KEYWORD4>
- <KEYWORD4>gray74</KEYWORD4>
- <KEYWORD4>gray75</KEYWORD4>
- <KEYWORD4>gray76</KEYWORD4>
- <KEYWORD4>gray77</KEYWORD4>
- <KEYWORD4>gray78</KEYWORD4>
- <KEYWORD4>gray79</KEYWORD4>
- <KEYWORD4>gray80</KEYWORD4>
- <KEYWORD4>gray81</KEYWORD4>
- <KEYWORD4>gray82</KEYWORD4>
- <KEYWORD4>gray83</KEYWORD4>
- <KEYWORD4>gray84</KEYWORD4>
- <KEYWORD4>gray85</KEYWORD4>
- <KEYWORD4>gray86</KEYWORD4>
- <KEYWORD4>gray87</KEYWORD4>
- <KEYWORD4>gray88</KEYWORD4>
- <KEYWORD4>gray89</KEYWORD4>
- <KEYWORD4>gray90</KEYWORD4>
- <KEYWORD4>gray91</KEYWORD4>
- <KEYWORD4>gray92</KEYWORD4>
- <KEYWORD4>gray93</KEYWORD4>
- <KEYWORD4>gray94</KEYWORD4>
- <KEYWORD4>gray95</KEYWORD4>
- <KEYWORD4>gray96</KEYWORD4>
- <KEYWORD4>gray97</KEYWORD4>
- <KEYWORD4>gray98</KEYWORD4>
- <KEYWORD4>gray99</KEYWORD4>
- <KEYWORD4>gray100</KEYWORD4>
- <KEYWORD4>lightgray</KEYWORD4>
- <KEYWORD4>lightslategray</KEYWORD4>
- <KEYWORD4>slategray1</KEYWORD4>
- <KEYWORD4>slategray2</KEYWORD4>
- <KEYWORD4>slategray3</KEYWORD4>
- <KEYWORD4>slategray4</KEYWORD4>
-
- <!-- Cyans -->
- <KEYWORD4>aquamarine1</KEYWORD4>
- <KEYWORD4>aquamarine2</KEYWORD4>
- <KEYWORD4>aquamarine3</KEYWORD4>
- <KEYWORD4>aquamarine4</KEYWORD4>
- <KEYWORD4>cyan1</KEYWORD4>
- <KEYWORD4>cyan2</KEYWORD4>
- <KEYWORD4>cyan3</KEYWORD4>
- <KEYWORD4>cyan4</KEYWORD4>
- <KEYWORD4>darkturquoise</KEYWORD4>
- <KEYWORD4>lightcyan1</KEYWORD4>
- <KEYWORD4>lightcyan2</KEYWORD4>
- <KEYWORD4>lightcyan3</KEYWORD4>
- <KEYWORD4>lightcyan4</KEYWORD4>
- <KEYWORD4>mediumaquamarine</KEYWORD4>
- <KEYWORD4>mediumturquoise</KEYWORD4>
- <KEYWORD4>paleturquoise1</KEYWORD4>
- <KEYWORD4>paleturquoise2</KEYWORD4>
- <KEYWORD4>paleturquoise3</KEYWORD4>
- <KEYWORD4>paleturquoise4</KEYWORD4>
- <KEYWORD4>turquoise1</KEYWORD4>
- <KEYWORD4>turquoise2</KEYWORD4>
- <KEYWORD4>turquoise3</KEYWORD4>
- <KEYWORD4>turquoise4</KEYWORD4>
-
- <!-- Oranges -->
- <KEYWORD4>darkorange1</KEYWORD4>
- <KEYWORD4>darkorange2</KEYWORD4>
- <KEYWORD4>darkorange3</KEYWORD4>
- <KEYWORD4>darkorange4</KEYWORD4>
- <KEYWORD4>orange1</KEYWORD4>
- <KEYWORD4>orange2</KEYWORD4>
- <KEYWORD4>orange3</KEYWORD4>
- <KEYWORD4>orange4</KEYWORD4>
- <KEYWORD4>orangered1</KEYWORD4>
- <KEYWORD4>orangered2</KEYWORD4>
- <KEYWORD4>orangered3</KEYWORD4>
- <KEYWORD4>orangered4</KEYWORD4>
-
- <!-- Blacks -->
- <KEYWORD4>black</KEYWORD4>
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- DOT mode, by Kevin Hunter of caktusgroup.com (kevin@) for jEdit 4.3 -->
+<!-- This is based on the grammar defined at
+ http://graphviz.org/doc/info/lang.html -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME='commentStart' VALUE='/*' />
+ <PROPERTY NAME='commentEnd' VALUE='*/' />
+ <PROPERTY NAME='wordBreakChars' VALUE=',+-=<>/?^&*' />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME='indentOpenBrackets' VALUE='[{' />
+ <PROPERTY NAME='indentCloseBrackets' VALUE=']}' />
+ <PROPERTY NAME='unalignedOpenBrackets' VALUE='(' />
+ <PROPERTY NAME='unalignedCloseBrackets' VALUE=')' />
+ <PROPERTY NAME='indentNextLine'
+ VALUE='(?!^\s*(#|//|/\*)).*((sub|di|)graph|node|edge)\s+([\[{<]).*'
+ />
+ </PROPS>
+
+ <RULES
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+
+ <IMPORT DELEGATE='DOT_LEXER' />
+ <IMPORT DELEGATE='KEYWORDS' />
+ </RULES>
+
+ <RULES SET='DOT_LEXER'
+ IGNORE_CASE='FALSE'
+ HIGHLIGHT_DIGITS='TRUE' DIGIT_RE='[0-9][0-9a-zA-Z]*'>
+
+ <EOL_SPAN TYPE='COMMENT1'>#</EOL_SPAN>
+ <EOL_SPAN TYPE='COMMENT2'>//</EOL_SPAN>
+ <SPAN_REGEXP TYPE='COMMENT3' MATCH_TYPE='COMMENT3' NO_LINE_BREAK='FALSE'>
+ <BEGIN>/\*</BEGIN>
+ <END>*/</END>
+ </SPAN_REGEXP>
+
+ <SEQ TYPE='OPERATOR'>-></SEQ>
+ <SEQ TYPE='OPERATOR'>[</SEQ>
+ <SEQ TYPE='OPERATOR'>]</SEQ>
+ <SEQ TYPE='OPERATOR'>)</SEQ>
+ <SEQ TYPE='OPERATOR'>}</SEQ>
+ <SEQ TYPE='OPERATOR'>{</SEQ>
+ <SEQ TYPE='OPERATOR'>;</SEQ>
+ <SEQ TYPE='OPERATOR'>=</SEQ>
+
+ <SPAN TYPE='KEYWORD3' ESCAPE='\' DELEGATE='url::MAIN'>
+ <BEGIN>URL="</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <!-- Dot does not use single quotes as delimiters. -->
+ <SPAN TYPE='LITERAL1' ESCAPE='\'>
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN DELEGATE='html::MAIN'>
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET='KEYWORDS' IGNORE_CASE='TRUE'>
+ <KEYWORDS>
+ <KEYWORD1>graph</KEYWORD1>
+ <KEYWORD1>subgraph</KEYWORD1>
+ <KEYWORD1>digraph</KEYWORD1>
+ <KEYWORD1>node</KEYWORD1>
+ <KEYWORD1>edge</KEYWORD1>
+
+ <KEYWORD2>strict</KEYWORD2>
+
+ <!-- Node attributes -->
+ <KEYWORD3>URL</KEYWORD3>
+ <KEYWORD3>label</KEYWORD3>
+ <KEYWORD3>shape</KEYWORD3>
+ <KEYWORD3>style</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>rank</KEYWORD3>
+ <KEYWORD3>tailport</KEYWORD3>
+ <KEYWORD3>headport</KEYWORD3>
+
+ <!-- Node ranks -->
+ <KEYWORD4>same</KEYWORD4>
+
+ <!-- Node shapes -->
+ <KEYWORD4>box</KEYWORD4>
+ <KEYWORD4>polygon</KEYWORD4>
+ <KEYWORD4>ellipse</KEYWORD4>
+ <KEYWORD4>point</KEYWORD4>
+ <KEYWORD4>egg</KEYWORD4>
+ <KEYWORD4>triangle</KEYWORD4>
+ <KEYWORD4>diamond</KEYWORD4>
+ <KEYWORD4>trapezium</KEYWORD4>
+ <KEYWORD4>parallelogram</KEYWORD4>
+ <KEYWORD4>hexagon</KEYWORD4>
+ <KEYWORD4>octagon</KEYWORD4>
+ <KEYWORD4>doublecircle</KEYWORD4>
+ <KEYWORD4>tripleoctagon</KEYWORD4>
+ <KEYWORD4>invtriangle</KEYWORD4>
+ <KEYWORD4>invtrapezium</KEYWORD4>
+
+ <!-- Edge pointer shapes (arrow heads) -->
+ <KEYWORD4>normal</KEYWORD4>
+ <KEYWORD4>dot</KEYWORD4>
+ <KEYWORD4>odot</KEYWORD4>
+ <KEYWORD4>inv</KEYWORD4>
+ <KEYWORD4>invdot</KEYWORD4>
+ <KEYWORD4>invodot</KEYWORD4>
+ <KEYWORD4>none</KEYWORD4>
+
+ <!-- Colors -->
+
+ <!-- Whites -->
+ <KEYWORD4>antiquewhite1</KEYWORD4>
+ <KEYWORD4>antiquewhite2</KEYWORD4>
+ <KEYWORD4>antiquewhite3</KEYWORD4>
+ <KEYWORD4>antiquewhite4</KEYWORD4>
+ <KEYWORD4>azure1</KEYWORD4>
+ <KEYWORD4>azure2</KEYWORD4>
+ <KEYWORD4>azure3</KEYWORD4>
+ <KEYWORD4>azure4</KEYWORD4>
+ <KEYWORD4>bisque1</KEYWORD4>
+ <KEYWORD4>bisque2</KEYWORD4>
+ <KEYWORD4>bisque3</KEYWORD4>
+ <KEYWORD4>bisque4</KEYWORD4>
+ <KEYWORD4>blanchedalmond</KEYWORD4>
+ <KEYWORD4>cornsilk1</KEYWORD4>
+ <KEYWORD4>cornsilk2</KEYWORD4>
+ <KEYWORD4>cornsilk3</KEYWORD4>
+ <KEYWORD4>cornsilk4</KEYWORD4>
+ <KEYWORD4>floralwhite</KEYWORD4>
+ <KEYWORD4>gainsboro</KEYWORD4>
+ <KEYWORD4>ghostwhite</KEYWORD4>
+ <KEYWORD4>honeydew1</KEYWORD4>
+ <KEYWORD4>honeydew2</KEYWORD4>
+ <KEYWORD4>honeydew3</KEYWORD4>
+ <KEYWORD4>honeydew4</KEYWORD4>
+ <KEYWORD4>ivory1</KEYWORD4>
+ <KEYWORD4>ivory2</KEYWORD4>
+ <KEYWORD4>ivory3</KEYWORD4>
+ <KEYWORD4>ivory4</KEYWORD4>
+ <KEYWORD4>lavender</KEYWORD4>
+ <KEYWORD4>lavenderblush1</KEYWORD4>
+ <KEYWORD4>lavenderblush2</KEYWORD4>
+ <KEYWORD4>lavenderblush3</KEYWORD4>
+ <KEYWORD4>lavenderblush4</KEYWORD4>
+ <KEYWORD4>lemonchiffon1</KEYWORD4>
+ <KEYWORD4>lemonchiffon2</KEYWORD4>
+ <KEYWORD4>lemonchiffon3</KEYWORD4>
+ <KEYWORD4>lemonchiffon4</KEYWORD4>
+ <KEYWORD4>linen</KEYWORD4>
+ <KEYWORD4>mintcream</KEYWORD4>
+ <KEYWORD4>mistyrose1</KEYWORD4>
+ <KEYWORD4>mistyrose2</KEYWORD4>
+ <KEYWORD4>mistyrose3</KEYWORD4>
+ <KEYWORD4>mistyrose4</KEYWORD4>
+ <KEYWORD4>moccasin</KEYWORD4>
+ <KEYWORD4>navajowhite1</KEYWORD4>
+ <KEYWORD4>navajowhite2</KEYWORD4>
+ <KEYWORD4>navajowhite3</KEYWORD4>
+ <KEYWORD4>navajowhite4</KEYWORD4>
+ <KEYWORD4>oldlace</KEYWORD4>
+ <KEYWORD4>papayawhip</KEYWORD4>
+ <KEYWORD4>peachpuff1</KEYWORD4>
+ <KEYWORD4>peachpuff2</KEYWORD4>
+ <KEYWORD4>peachpuff3</KEYWORD4>
+ <KEYWORD4>peachpuff4</KEYWORD4>
+ <KEYWORD4>seashell1</KEYWORD4>
+ <KEYWORD4>seashell2</KEYWORD4>
+ <KEYWORD4>seashell3</KEYWORD4>
+ <KEYWORD4>seashell4</KEYWORD4>
+ <KEYWORD4>snow1</KEYWORD4>
+ <KEYWORD4>snow2</KEYWORD4>
+ <KEYWORD4>snow3</KEYWORD4>
+ <KEYWORD4>snow4</KEYWORD4>
+ <KEYWORD4>thistle1</KEYWORD4>
+ <KEYWORD4>thistle2</KEYWORD4>
+ <KEYWORD4>thistle3</KEYWORD4>
+ <KEYWORD4>thistle4</KEYWORD4>
+ <KEYWORD4>wheat1</KEYWORD4>
+ <KEYWORD4>wheat2</KEYWORD4>
+ <KEYWORD4>wheat3</KEYWORD4>
+ <KEYWORD4>wheat4</KEYWORD4>
+ <KEYWORD4>white</KEYWORD4>
+ <KEYWORD4>whitesmoke</KEYWORD4>
+
+ <!-- Reds -->
+ <KEYWORD4>coral1</KEYWORD4>
+ <KEYWORD4>coral2</KEYWORD4>
+ <KEYWORD4>coral3</KEYWORD4>
+ <KEYWORD4>coral4</KEYWORD4>
+ <KEYWORD4>crimson</KEYWORD4>
+ <KEYWORD4>darksalmon</KEYWORD4>
+ <KEYWORD4>deeppink1</KEYWORD4>
+ <KEYWORD4>deeppink2</KEYWORD4>
+ <KEYWORD4>deeppink3</KEYWORD4>
+ <KEYWORD4>deeppink4</KEYWORD4>
+ <KEYWORD4>firebrick1</KEYWORD4>
+ <KEYWORD4>firebrick2</KEYWORD4>
+ <KEYWORD4>firebrick3</KEYWORD4>
+ <KEYWORD4>firebrick4</KEYWORD4>
+ <KEYWORD4>hotpink1</KEYWORD4>
+ <KEYWORD4>hotpink2</KEYWORD4>
+ <KEYWORD4>hotpink3</KEYWORD4>
+ <KEYWORD4>hotpink4</KEYWORD4>
+ <KEYWORD4>indianred1</KEYWORD4>
+ <KEYWORD4>indianred2</KEYWORD4>
+ <KEYWORD4>indianred3</KEYWORD4>
+ <KEYWORD4>indianred4</KEYWORD4>
+ <KEYWORD4>lightpink1</KEYWORD4>
+ <KEYWORD4>lightpink2</KEYWORD4>
+ <KEYWORD4>lightpink3</KEYWORD4>
+ <KEYWORD4>lightpink4</KEYWORD4>
+ <KEYWORD4>lightsalmon1</KEYWORD4>
+ <KEYWORD4>lightsalmon2</KEYWORD4>
+ <KEYWORD4>lightsalmon3</KEYWORD4>
+ <KEYWORD4>lightsalmon4</KEYWORD4>
+ <KEYWORD4>maroon1</KEYWORD4>
+ <KEYWORD4>maroon2</KEYWORD4>
+ <KEYWORD4>maroon3</KEYWORD4>
+ <KEYWORD4>maroon4</KEYWORD4>
+ <KEYWORD4>mediumvioletred</KEYWORD4>
+ <KEYWORD4>orangered1</KEYWORD4>
+ <KEYWORD4>orangered2</KEYWORD4>
+ <KEYWORD4>orangered3</KEYWORD4>
+ <KEYWORD4>orangered4</KEYWORD4>
+ <KEYWORD4>palevioletred1</KEYWORD4>
+ <KEYWORD4>palevioletred2</KEYWORD4>
+ <KEYWORD4>palevioletred3</KEYWORD4>
+ <KEYWORD4>palevioletred4</KEYWORD4>
+ <KEYWORD4>pink1</KEYWORD4>
+ <KEYWORD4>pink2</KEYWORD4>
+ <KEYWORD4>pink3</KEYWORD4>
+ <KEYWORD4>pink4</KEYWORD4>
+ <KEYWORD4>red1</KEYWORD4>
+ <KEYWORD4>red2</KEYWORD4>
+ <KEYWORD4>red3</KEYWORD4>
+ <KEYWORD4>red4</KEYWORD4>
+ <KEYWORD4>salmon1</KEYWORD4>
+ <KEYWORD4>salmon2</KEYWORD4>
+ <KEYWORD4>salmon3</KEYWORD4>
+ <KEYWORD4>salmon4</KEYWORD4>
+ <KEYWORD4>tomato1</KEYWORD4>
+ <KEYWORD4>tomato2</KEYWORD4>
+ <KEYWORD4>tomato3</KEYWORD4>
+ <KEYWORD4>tomato4</KEYWORD4>
+ <KEYWORD4>violetred1</KEYWORD4>
+ <KEYWORD4>violetred2</KEYWORD4>
+ <KEYWORD4>violetred3</KEYWORD4>
+ <KEYWORD4>violetred4</KEYWORD4>
+
+ <!-- Yellows -->
+ <KEYWORD4>darkgoldenrod1</KEYWORD4>
+ <KEYWORD4>darkgoldenrod2</KEYWORD4>
+ <KEYWORD4>darkgoldenrod3</KEYWORD4>
+ <KEYWORD4>darkgoldenrod4</KEYWORD4>
+ <KEYWORD4>gold1</KEYWORD4>
+ <KEYWORD4>gold2</KEYWORD4>
+ <KEYWORD4>gold3</KEYWORD4>
+ <KEYWORD4>gold4</KEYWORD4>
+ <KEYWORD4>goldenrod1</KEYWORD4>
+ <KEYWORD4>goldenrod2</KEYWORD4>
+ <KEYWORD4>goldenrod3</KEYWORD4>
+ <KEYWORD4>goldenrod4</KEYWORD4>
+ <KEYWORD4>greenyellow</KEYWORD4>
+ <KEYWORD4>lightgoldenrod1</KEYWORD4>
+ <KEYWORD4>lightgoldenrod2</KEYWORD4>
+ <KEYWORD4>lightgoldenrod3</KEYWORD4>
+ <KEYWORD4>lightgoldenrod4</KEYWORD4>
+ <KEYWORD4>lightgoldenrodyellow</KEYWORD4>
+ <KEYWORD4>lightyellow1</KEYWORD4>
+ <KEYWORD4>lightyellow2</KEYWORD4>
+ <KEYWORD4>lightyellow3</KEYWORD4>
+ <KEYWORD4>lightyellow4</KEYWORD4>
+ <KEYWORD4>palegoldenrod</KEYWORD4>
+ <KEYWORD4>yellow1</KEYWORD4>
+ <KEYWORD4>yellow2</KEYWORD4>
+ <KEYWORD4>yellow3</KEYWORD4>
+ <KEYWORD4>yellow4</KEYWORD4>
+ <KEYWORD4>yellowgreen</KEYWORD4>
+
+ <!-- Magentas -->
+ <KEYWORD4>blueviolet</KEYWORD4>
+ <KEYWORD4>darkorchid1</KEYWORD4>
+ <KEYWORD4>darkorchid2</KEYWORD4>
+ <KEYWORD4>darkorchid3</KEYWORD4>
+ <KEYWORD4>darkorchid4</KEYWORD4>
+ <KEYWORD4>darkviolet</KEYWORD4>
+ <KEYWORD4>magenta1</KEYWORD4>
+ <KEYWORD4>magenta2</KEYWORD4>
+ <KEYWORD4>magenta3</KEYWORD4>
+ <KEYWORD4>magenta4</KEYWORD4>
+ <KEYWORD4>mediumorchid1</KEYWORD4>
+ <KEYWORD4>mediumorchid2</KEYWORD4>
+ <KEYWORD4>mediumorchid3</KEYWORD4>
+ <KEYWORD4>mediumorchid4</KEYWORD4>
+ <KEYWORD4>mediumpurple1</KEYWORD4>
+ <KEYWORD4>mediumpurple2</KEYWORD4>
+ <KEYWORD4>mediumpurple3</KEYWORD4>
+ <KEYWORD4>mediumpurple4</KEYWORD4>
+ <KEYWORD4>mediumvioletred</KEYWORD4>
+ <KEYWORD4>orchid1</KEYWORD4>
+ <KEYWORD4>orchid2</KEYWORD4>
+ <KEYWORD4>orchid3</KEYWORD4>
+ <KEYWORD4>orchid4</KEYWORD4>
+ <KEYWORD4>palevioletred1</KEYWORD4>
+ <KEYWORD4>palevioletred2</KEYWORD4>
+ <KEYWORD4>palevioletred3</KEYWORD4>
+ <KEYWORD4>palevioletred4</KEYWORD4>
+ <KEYWORD4>plum1</KEYWORD4>
+ <KEYWORD4>plum2</KEYWORD4>
+ <KEYWORD4>plum3</KEYWORD4>
+ <KEYWORD4>plum4</KEYWORD4>
+ <KEYWORD4>purple1</KEYWORD4>
+ <KEYWORD4>purple2</KEYWORD4>
+ <KEYWORD4>purple3</KEYWORD4>
+ <KEYWORD4>purple4</KEYWORD4>
+ <KEYWORD4>violet</KEYWORD4>
+ <KEYWORD4>violetred1</KEYWORD4>
+ <KEYWORD4>violetred2</KEYWORD4>
+ <KEYWORD4>violetred3</KEYWORD4>
+ <KEYWORD4>violetred4</KEYWORD4>
+
+ <!-- Blues -->
+ <KEYWORD4>aliceblue</KEYWORD4>
+ <KEYWORD4>blue1</KEYWORD4>
+ <KEYWORD4>blue2</KEYWORD4>
+ <KEYWORD4>blue3</KEYWORD4>
+ <KEYWORD4>blue4</KEYWORD4>
+ <KEYWORD4>blueviolet</KEYWORD4>
+ <KEYWORD4>cadetblue1</KEYWORD4>
+ <KEYWORD4>cadetblue2</KEYWORD4>
+ <KEYWORD4>cadetblue3</KEYWORD4>
+ <KEYWORD4>cadetblue4</KEYWORD4>
+ <KEYWORD4>cornflowerblue</KEYWORD4>
+ <KEYWORD4>darkslateblue</KEYWORD4>
+ <KEYWORD4>deepskyblue1</KEYWORD4>
+ <KEYWORD4>deepskyblue2</KEYWORD4>
+ <KEYWORD4>deepskyblue3</KEYWORD4>
+ <KEYWORD4>deepskyblue4</KEYWORD4>
+ <KEYWORD4>dodgerblue1</KEYWORD4>
+ <KEYWORD4>dodgerblue2</KEYWORD4>
+ <KEYWORD4>dodgerblue3</KEYWORD4>
+ <KEYWORD4>dodgerblue4</KEYWORD4>
+ <KEYWORD4>indigo</KEYWORD4>
+ <KEYWORD4>lightblue1</KEYWORD4>
+ <KEYWORD4>lightblue2</KEYWORD4>
+ <KEYWORD4>lightblue3</KEYWORD4>
+ <KEYWORD4>lightblue4</KEYWORD4>
+ <KEYWORD4>lightskyblue1</KEYWORD4>
+ <KEYWORD4>lightskyblue2</KEYWORD4>
+ <KEYWORD4>lightskyblue3</KEYWORD4>
+ <KEYWORD4>lightskyblue4</KEYWORD4>
+ <KEYWORD4>lightslateblue1</KEYWORD4>
+ <KEYWORD4>lightslateblue2</KEYWORD4>
+ <KEYWORD4>lightslateblue3</KEYWORD4>
+ <KEYWORD4>lightslateblue4</KEYWORD4>
+ <KEYWORD4>mediumblue</KEYWORD4>
+ <KEYWORD4>mediumslateblue</KEYWORD4>
+ <KEYWORD4>midnightblue</KEYWORD4>
+ <KEYWORD4>navy</KEYWORD4>
+ <KEYWORD4>navyblue</KEYWORD4>
+ <KEYWORD4>powderblue</KEYWORD4>
+ <KEYWORD4>royalblue1</KEYWORD4>
+ <KEYWORD4>royalblue2</KEYWORD4>
+ <KEYWORD4>royalblue3</KEYWORD4>
+ <KEYWORD4>royalblue4</KEYWORD4>
+ <KEYWORD4>skyblue1</KEYWORD4>
+ <KEYWORD4>skyblue2</KEYWORD4>
+ <KEYWORD4>skyblue3</KEYWORD4>
+ <KEYWORD4>skyblue4</KEYWORD4>
+ <KEYWORD4>slateblue1</KEYWORD4>
+ <KEYWORD4>slateblue2</KEYWORD4>
+ <KEYWORD4>slateblue3</KEYWORD4>
+ <KEYWORD4>slateblue4</KEYWORD4>
+ <KEYWORD4>steelblue1</KEYWORD4>
+ <KEYWORD4>steelblue2</KEYWORD4>
+ <KEYWORD4>steelblue3</KEYWORD4>
+ <KEYWORD4>steelblue4</KEYWORD4>
+
+ <!-- Greens -->
+ <KEYWORD4>chartreuse1</KEYWORD4>
+ <KEYWORD4>chartreuse2</KEYWORD4>
+ <KEYWORD4>chartreuse3</KEYWORD4>
+ <KEYWORD4>chartreuse4</KEYWORD4>
+ <KEYWORD4>darkgreen</KEYWORD4>
+ <KEYWORD4>darkolivegreen1</KEYWORD4>
+ <KEYWORD4>darkolivegreen2</KEYWORD4>
+ <KEYWORD4>darkolivegreen3</KEYWORD4>
+ <KEYWORD4>darkolivegreen4</KEYWORD4>
+ <KEYWORD4>darkseagreen1</KEYWORD4>
+ <KEYWORD4>darkseagreen2</KEYWORD4>
+ <KEYWORD4>darkseagreen3</KEYWORD4>
+ <KEYWORD4>darkseagreen4</KEYWORD4>
+ <KEYWORD4>forestgreen</KEYWORD4>
+ <KEYWORD4>green1</KEYWORD4>
+ <KEYWORD4>green2</KEYWORD4>
+ <KEYWORD4>green3</KEYWORD4>
+ <KEYWORD4>green4</KEYWORD4>
+ <KEYWORD4>greenyellow</KEYWORD4>
+ <KEYWORD4>lawngreen</KEYWORD4>
+ <KEYWORD4>lightseagreen</KEYWORD4>
+ <KEYWORD4>limegreen</KEYWORD4>
+ <KEYWORD4>mediumseagreen</KEYWORD4>
+ <KEYWORD4>mediumspringgreen</KEYWORD4>
+ <KEYWORD4>mintcream</KEYWORD4>
+ <KEYWORD4>olivedrab1</KEYWORD4>
+ <KEYWORD4>olivedrab2</KEYWORD4>
+ <KEYWORD4>olivedrab3</KEYWORD4>
+ <KEYWORD4>olivedrab4</KEYWORD4>
+ <KEYWORD4>palegreen1</KEYWORD4>
+ <KEYWORD4>palegreen2</KEYWORD4>
+ <KEYWORD4>palegreen3</KEYWORD4>
+ <KEYWORD4>palegreen4</KEYWORD4>
+ <KEYWORD4>seagreen1</KEYWORD4>
+ <KEYWORD4>seagreen2</KEYWORD4>
+ <KEYWORD4>seagreen3</KEYWORD4>
+ <KEYWORD4>seagreen4</KEYWORD4>
+ <KEYWORD4>springgreen1</KEYWORD4>
+ <KEYWORD4>springgreen2</KEYWORD4>
+ <KEYWORD4>springgreen3</KEYWORD4>
+ <KEYWORD4>springgreen4</KEYWORD4>
+ <KEYWORD4>yellowgreen</KEYWORD4>
+
+ <!-- Browns -->
+ <KEYWORD4>beige</KEYWORD4>
+ <KEYWORD4>brown1</KEYWORD4>
+ <KEYWORD4>brown2</KEYWORD4>
+ <KEYWORD4>brown3</KEYWORD4>
+ <KEYWORD4>brown4</KEYWORD4>
+ <KEYWORD4>burlywood1</KEYWORD4>
+ <KEYWORD4>burlywood2</KEYWORD4>
+ <KEYWORD4>burlywood3</KEYWORD4>
+ <KEYWORD4>burlywood4</KEYWORD4>
+ <KEYWORD4>chocolate1</KEYWORD4>
+ <KEYWORD4>chocolate2</KEYWORD4>
+ <KEYWORD4>chocolate3</KEYWORD4>
+ <KEYWORD4>chocolate4</KEYWORD4>
+ <KEYWORD4>darkkhaki</KEYWORD4>
+ <KEYWORD4>khaki1</KEYWORD4>
+ <KEYWORD4>khaki2</KEYWORD4>
+ <KEYWORD4>khaki3</KEYWORD4>
+ <KEYWORD4>khaki4</KEYWORD4>
+ <KEYWORD4>peru</KEYWORD4>
+ <KEYWORD4>rosybrown1</KEYWORD4>
+ <KEYWORD4>rosybrown2</KEYWORD4>
+ <KEYWORD4>rosybrown3</KEYWORD4>
+ <KEYWORD4>rosybrown4</KEYWORD4>
+ <KEYWORD4>saddlebrown</KEYWORD4>
+ <KEYWORD4>sandybrown</KEYWORD4>
+ <KEYWORD4>sienna1</KEYWORD4>
+ <KEYWORD4>sienna2</KEYWORD4>
+ <KEYWORD4>sienna3</KEYWORD4>
+ <KEYWORD4>sienna4</KEYWORD4>
+ <KEYWORD4>tan1</KEYWORD4>
+ <KEYWORD4>tan2</KEYWORD4>
+ <KEYWORD4>tan3</KEYWORD4>
+ <KEYWORD4>tan4</KEYWORD4>
+
+ <!-- Greys -->
+ <KEYWORD4>darkslategray1</KEYWORD4>
+ <KEYWORD4>darkslategray2</KEYWORD4>
+ <KEYWORD4>darkslategray3</KEYWORD4>
+ <KEYWORD4>darkslategray4</KEYWORD4>
+ <KEYWORD4>dimgray</KEYWORD4>
+ <KEYWORD4>gray</KEYWORD4>
+ <KEYWORD4>gray0</KEYWORD4>
+ <KEYWORD4>gray1</KEYWORD4>
+ <KEYWORD4>gray2</KEYWORD4>
+ <KEYWORD4>gray3</KEYWORD4>
+ <KEYWORD4>gray4</KEYWORD4>
+ <KEYWORD4>gray5</KEYWORD4>
+ <KEYWORD4>gray6</KEYWORD4>
+ <KEYWORD4>gray7</KEYWORD4>
+ <KEYWORD4>gray8</KEYWORD4>
+ <KEYWORD4>gray9</KEYWORD4>
+ <KEYWORD4>gray10</KEYWORD4>
+ <KEYWORD4>gray11</KEYWORD4>
+ <KEYWORD4>gray12</KEYWORD4>
+ <KEYWORD4>gray13</KEYWORD4>
+ <KEYWORD4>gray14</KEYWORD4>
+ <KEYWORD4>gray15</KEYWORD4>
+ <KEYWORD4>gray16</KEYWORD4>
+ <KEYWORD4>gray17</KEYWORD4>
+ <KEYWORD4>gray18</KEYWORD4>
+ <KEYWORD4>gray19</KEYWORD4>
+ <KEYWORD4>gray20</KEYWORD4>
+ <KEYWORD4>gray21</KEYWORD4>
+ <KEYWORD4>gray22</KEYWORD4>
+ <KEYWORD4>gray23</KEYWORD4>
+ <KEYWORD4>gray24</KEYWORD4>
+ <KEYWORD4>gray25</KEYWORD4>
+ <KEYWORD4>gray26</KEYWORD4>
+ <KEYWORD4>gray27</KEYWORD4>
+ <KEYWORD4>gray28</KEYWORD4>
+ <KEYWORD4>gray29</KEYWORD4>
+ <KEYWORD4>gray30</KEYWORD4>
+ <KEYWORD4>gray31</KEYWORD4>
+ <KEYWORD4>gray32</KEYWORD4>
+ <KEYWORD4>gray33</KEYWORD4>
+ <KEYWORD4>gray34</KEYWORD4>
+ <KEYWORD4>gray35</KEYWORD4>
+ <KEYWORD4>gray36</KEYWORD4>
+ <KEYWORD4>gray37</KEYWORD4>
+ <KEYWORD4>gray38</KEYWORD4>
+ <KEYWORD4>gray39</KEYWORD4>
+ <KEYWORD4>gray40</KEYWORD4>
+ <KEYWORD4>gray41</KEYWORD4>
+ <KEYWORD4>gray42</KEYWORD4>
+ <KEYWORD4>gray43</KEYWORD4>
+ <KEYWORD4>gray44</KEYWORD4>
+ <KEYWORD4>gray45</KEYWORD4>
+ <KEYWORD4>gray46</KEYWORD4>
+ <KEYWORD4>gray47</KEYWORD4>
+ <KEYWORD4>gray48</KEYWORD4>
+ <KEYWORD4>gray49</KEYWORD4>
+ <KEYWORD4>gray50</KEYWORD4>
+ <KEYWORD4>gray51</KEYWORD4>
+ <KEYWORD4>gray52</KEYWORD4>
+ <KEYWORD4>gray53</KEYWORD4>
+ <KEYWORD4>gray54</KEYWORD4>
+ <KEYWORD4>gray55</KEYWORD4>
+ <KEYWORD4>gray56</KEYWORD4>
+ <KEYWORD4>gray57</KEYWORD4>
+ <KEYWORD4>gray58</KEYWORD4>
+ <KEYWORD4>gray59</KEYWORD4>
+ <KEYWORD4>gray60</KEYWORD4>
+ <KEYWORD4>gray61</KEYWORD4>
+ <KEYWORD4>gray62</KEYWORD4>
+ <KEYWORD4>gray63</KEYWORD4>
+ <KEYWORD4>gray64</KEYWORD4>
+ <KEYWORD4>gray65</KEYWORD4>
+ <KEYWORD4>gray66</KEYWORD4>
+ <KEYWORD4>gray67</KEYWORD4>
+ <KEYWORD4>gray68</KEYWORD4>
+ <KEYWORD4>gray69</KEYWORD4>
+ <KEYWORD4>gray70</KEYWORD4>
+ <KEYWORD4>gray71</KEYWORD4>
+ <KEYWORD4>gray72</KEYWORD4>
+ <KEYWORD4>gray73</KEYWORD4>
+ <KEYWORD4>gray74</KEYWORD4>
+ <KEYWORD4>gray75</KEYWORD4>
+ <KEYWORD4>gray76</KEYWORD4>
+ <KEYWORD4>gray77</KEYWORD4>
+ <KEYWORD4>gray78</KEYWORD4>
+ <KEYWORD4>gray79</KEYWORD4>
+ <KEYWORD4>gray80</KEYWORD4>
+ <KEYWORD4>gray81</KEYWORD4>
+ <KEYWORD4>gray82</KEYWORD4>
+ <KEYWORD4>gray83</KEYWORD4>
+ <KEYWORD4>gray84</KEYWORD4>
+ <KEYWORD4>gray85</KEYWORD4>
+ <KEYWORD4>gray86</KEYWORD4>
+ <KEYWORD4>gray87</KEYWORD4>
+ <KEYWORD4>gray88</KEYWORD4>
+ <KEYWORD4>gray89</KEYWORD4>
+ <KEYWORD4>gray90</KEYWORD4>
+ <KEYWORD4>gray91</KEYWORD4>
+ <KEYWORD4>gray92</KEYWORD4>
+ <KEYWORD4>gray93</KEYWORD4>
+ <KEYWORD4>gray94</KEYWORD4>
+ <KEYWORD4>gray95</KEYWORD4>
+ <KEYWORD4>gray96</KEYWORD4>
+ <KEYWORD4>gray97</KEYWORD4>
+ <KEYWORD4>gray98</KEYWORD4>
+ <KEYWORD4>gray99</KEYWORD4>
+ <KEYWORD4>gray100</KEYWORD4>
+ <KEYWORD4>lightgray</KEYWORD4>
+ <KEYWORD4>lightslategray</KEYWORD4>
+ <KEYWORD4>slategray1</KEYWORD4>
+ <KEYWORD4>slategray2</KEYWORD4>
+ <KEYWORD4>slategray3</KEYWORD4>
+ <KEYWORD4>slategray4</KEYWORD4>
+
+ <!-- Cyans -->
+ <KEYWORD4>aquamarine1</KEYWORD4>
+ <KEYWORD4>aquamarine2</KEYWORD4>
+ <KEYWORD4>aquamarine3</KEYWORD4>
+ <KEYWORD4>aquamarine4</KEYWORD4>
+ <KEYWORD4>cyan1</KEYWORD4>
+ <KEYWORD4>cyan2</KEYWORD4>
+ <KEYWORD4>cyan3</KEYWORD4>
+ <KEYWORD4>cyan4</KEYWORD4>
+ <KEYWORD4>darkturquoise</KEYWORD4>
+ <KEYWORD4>lightcyan1</KEYWORD4>
+ <KEYWORD4>lightcyan2</KEYWORD4>
+ <KEYWORD4>lightcyan3</KEYWORD4>
+ <KEYWORD4>lightcyan4</KEYWORD4>
+ <KEYWORD4>mediumaquamarine</KEYWORD4>
+ <KEYWORD4>mediumturquoise</KEYWORD4>
+ <KEYWORD4>paleturquoise1</KEYWORD4>
+ <KEYWORD4>paleturquoise2</KEYWORD4>
+ <KEYWORD4>paleturquoise3</KEYWORD4>
+ <KEYWORD4>paleturquoise4</KEYWORD4>
+ <KEYWORD4>turquoise1</KEYWORD4>
+ <KEYWORD4>turquoise2</KEYWORD4>
+ <KEYWORD4>turquoise3</KEYWORD4>
+ <KEYWORD4>turquoise4</KEYWORD4>
+
+ <!-- Oranges -->
+ <KEYWORD4>darkorange1</KEYWORD4>
+ <KEYWORD4>darkorange2</KEYWORD4>
+ <KEYWORD4>darkorange3</KEYWORD4>
+ <KEYWORD4>darkorange4</KEYWORD4>
+ <KEYWORD4>orange1</KEYWORD4>
+ <KEYWORD4>orange2</KEYWORD4>
+ <KEYWORD4>orange3</KEYWORD4>
+ <KEYWORD4>orange4</KEYWORD4>
+ <KEYWORD4>orangered1</KEYWORD4>
+ <KEYWORD4>orangered2</KEYWORD4>
+ <KEYWORD4>orangered3</KEYWORD4>
+ <KEYWORD4>orangered4</KEYWORD4>
+
+ <!-- Blacks -->
+ <KEYWORD4>black</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/doxygen.xml b/jEdit/modes/doxygen.xml
index 5714ca6..72d44ca 100644
--- a/jEdit/modes/doxygen.xml
+++ b/jEdit/modes/doxygen.xml
@@ -1,313 +1,361 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comment -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <MARK_PREVIOUS TYPE="KEYWORD1"
- AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">=</MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD1"
- AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">+=</MARK_PREVIOUS>
-
- <!-- Literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
- <KEYWORDS>
- <KEYWORD2>YES</KEYWORD2>
- <KEYWORD3>NO</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="DOXYGEN" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
- <!-- so that *@param is highlighted -->
- <SEQ TYPE="COMMENT3">*</SEQ>
-
- <!-- HTML comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- Doxygen allows this -->
- <SEQ TYPE="COMMENT3"><<</SEQ>
- <SEQ TYPE="COMMENT3"><=</SEQ>
- <SEQ TYPE="COMMENT3">< </SEQ>
-
- <!-- HTML tags -->
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS"
- NO_LINE_BREAK="TRUE">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <KEYWORDS>
- <LABEL>\a</LABEL>
- <LABEL>\addindex</LABEL>
- <LABEL>\addtogroup</LABEL>
- <LABEL>\anchor</LABEL>
- <LABEL>\arg</LABEL>
- <LABEL>\attention</LABEL>
- <LABEL>\author</LABEL>
- <LABEL>\b</LABEL>
- <LABEL>\brief</LABEL>
- <LABEL>\bug</LABEL>
- <LABEL>\c</LABEL>
- <LABEL>\callgraph</LABEL>
- <LABEL>\category</LABEL>
- <LABEL>\class</LABEL>
- <LABEL>\code</LABEL>
- <LABEL>\copydoc</LABEL>
- <LABEL>\date</LABEL>
- <LABEL>\def</LABEL>
- <LABEL>\defgroup</LABEL>
- <LABEL>\deprecated</LABEL>
- <LABEL>\dontinclude</LABEL>
- <LABEL>\dot</LABEL>
- <LABEL>\dotfile</LABEL>
- <LABEL>\e</LABEL>
- <LABEL>\else</LABEL>
- <LABEL>\elseif</LABEL>
- <LABEL>\em</LABEL>
- <LABEL>\endcode</LABEL>
- <LABEL>\enddot</LABEL>
- <LABEL>\endhtmlonly</LABEL>
- <LABEL>\endif</LABEL>
- <LABEL>\endlatexonly</LABEL>
- <LABEL>\endlink</LABEL>
- <LABEL>\endmanonly</LABEL>
- <LABEL>\endverbatim</LABEL>
- <LABEL>\endxmlonly</LABEL>
- <LABEL>\enum</LABEL>
- <LABEL>\example</LABEL>
- <LABEL>\exception</LABEL>
- <LABEL>\f$</LABEL>
- <LABEL>\f[</LABEL>
- <LABEL>\f]</LABEL>
- <LABEL>\file</LABEL>
- <LABEL>\fn</LABEL>
- <LABEL>\hideinitializer</LABEL>
- <LABEL>\htmlinclude</LABEL>
- <LABEL>\htmlonly</LABEL>
- <LABEL>\if</LABEL>
- <LABEL>\ifnot</LABEL>
- <LABEL>\image</LABEL>
- <LABEL>\include</LABEL>
- <LABEL>\includelineno</LABEL>
- <LABEL>\ingroup</LABEL>
- <LABEL>\internal</LABEL>
- <LABEL>\invariant</LABEL>
- <LABEL>\interface</LABEL>
- <LABEL>\latexonly</LABEL>
- <LABEL>\li</LABEL>
- <LABEL>\line</LABEL>
- <LABEL>\link</LABEL>
- <LABEL>\mainpage</LABEL>
- <LABEL>\manonly</LABEL>
- <LABEL>\n</LABEL>
- <LABEL>\name</LABEL>
- <LABEL>\namespace</LABEL>
- <LABEL>\nosubgrouping</LABEL>
- <LABEL>\note</LABEL>
- <LABEL>\overload</LABEL>
- <LABEL>\p</LABEL>
- <LABEL>\package</LABEL>
- <LABEL>\page</LABEL>
- <LABEL>\par</LABEL>
- <LABEL>\paragraph</LABEL>
- <LABEL>\param</LABEL>
- <LABEL>\param[in]</LABEL>
- <LABEL>\param[out]</LABEL>
- <LABEL>\param[in,out]</LABEL>
- <LABEL>\post</LABEL>
- <LABEL>\pre</LABEL>
- <LABEL>\private</LABEL>
- <LABEL>\privatesection</LABEL>
- <LABEL>\property</LABEL>
- <LABEL>\protected</LABEL>
- <LABEL>\protectedsection</LABEL>
- <LABEL>\protocol</LABEL>
- <LABEL>\public</LABEL>
- <LABEL>\publicsection</LABEL>
- <LABEL>\ref</LABEL>
- <LABEL>\relates</LABEL>
- <LABEL>\relatesalso</LABEL>
- <LABEL>\remarks</LABEL>
- <LABEL>\return</LABEL>
- <LABEL>\retval</LABEL>
- <LABEL>\sa</LABEL>
- <LABEL>\section</LABEL>
- <LABEL>\showinitializer</LABEL>
- <LABEL>\since</LABEL>
- <LABEL>\skip</LABEL>
- <LABEL>\skipline</LABEL>
- <LABEL>\struct</LABEL>
- <LABEL>\subsection</LABEL>
- <LABEL>\subsubsection</LABEL>
- <LABEL>\test</LABEL>
- <LABEL>\throw</LABEL>
- <LABEL>\todo</LABEL>
- <LABEL>\typedef</LABEL>
- <LABEL>\union</LABEL>
- <LABEL>\until</LABEL>
- <LABEL>\var</LABEL>
- <LABEL>\verbatim</LABEL>
- <LABEL>\verbinclude</LABEL>
- <LABEL>\version</LABEL>
- <LABEL>\warning</LABEL>
- <LABEL>\weakgroup</LABEL>
- <LABEL>\xmlonly</LABEL>
- <LABEL>\xrefitem</LABEL>
- <LABEL>\$</LABEL>
- <LABEL>\@</LABEL>
- <LABEL>\\</LABEL>
- <LABEL>\&</LABEL>
- <LABEL>\~</LABEL>
- <LABEL>\<</LABEL>
- <LABEL>\></LABEL>
- <LABEL>\#</LABEL>
- <LABEL>\%</LABEL>
- <LABEL>@a</LABEL>
- <LABEL>@addindex</LABEL>
- <LABEL>@addtogroup</LABEL>
- <LABEL>@anchor</LABEL>
- <LABEL>@arg</LABEL>
- <LABEL>@attention</LABEL>
- <LABEL>@author</LABEL>
- <LABEL>@b</LABEL>
- <LABEL>@brief</LABEL>
- <LABEL>@bug</LABEL>
- <LABEL>@c</LABEL>
- <LABEL>@callgraph</LABEL>
- <LABEL>@category</LABEL>
- <LABEL>@class</LABEL>
- <LABEL>@code</LABEL>
- <LABEL>@copydoc</LABEL>
- <LABEL>@date</LABEL>
- <LABEL>@def</LABEL>
- <LABEL>@defgroup</LABEL>
- <LABEL>@deprecated</LABEL>
- <LABEL>@dontinclude</LABEL>
- <LABEL>@dot</LABEL>
- <LABEL>@dotfile</LABEL>
- <LABEL>@e</LABEL>
- <LABEL>@else</LABEL>
- <LABEL>@elseif</LABEL>
- <LABEL>@em</LABEL>
- <LABEL>@endcode</LABEL>
- <LABEL>@enddot</LABEL>
- <LABEL>@endhtmlonly</LABEL>
- <LABEL>@endif</LABEL>
- <LABEL>@endlatexonly</LABEL>
- <LABEL>@endlink</LABEL>
- <LABEL>@endmanonly</LABEL>
- <LABEL>@endverbatim</LABEL>
- <LABEL>@endxmlonly</LABEL>
- <LABEL>@enum</LABEL>
- <LABEL>@example</LABEL>
- <LABEL>@exception</LABEL>
- <LABEL>@f$</LABEL>
- <LABEL>@f[</LABEL>
- <LABEL>@f]</LABEL>
- <LABEL>@file</LABEL>
- <LABEL>@fn</LABEL>
- <LABEL>@hideinitializer</LABEL>
- <LABEL>@htmlinclude</LABEL>
- <LABEL>@htmlonly</LABEL>
- <LABEL>@if</LABEL>
- <LABEL>@ifnot</LABEL>
- <LABEL>@image</LABEL>
- <LABEL>@include</LABEL>
- <LABEL>@includelineno</LABEL>
- <LABEL>@ingroup</LABEL>
- <LABEL>@internal</LABEL>
- <LABEL>@invariant</LABEL>
- <LABEL>@interface</LABEL>
- <LABEL>@latexonly</LABEL>
- <LABEL>@li</LABEL>
- <LABEL>@line</LABEL>
- <LABEL>@link</LABEL>
- <LABEL>@mainpage</LABEL>
- <LABEL>@manonly</LABEL>
- <LABEL>@n</LABEL>
- <LABEL>@name</LABEL>
- <LABEL>@namespace</LABEL>
- <LABEL>@nosubgrouping</LABEL>
- <LABEL>@note</LABEL>
- <LABEL>@overload</LABEL>
- <LABEL>@p</LABEL>
- <LABEL>@package</LABEL>
- <LABEL>@page</LABEL>
- <LABEL>@par</LABEL>
- <LABEL>@paragraph</LABEL>
- <LABEL>@param</LABEL>
- <LABEL>@param[in]</LABEL>
- <LABEL>@param[out]</LABEL>
- <LABEL>@param[in,out]</LABEL>
- <LABEL>@post</LABEL>
- <LABEL>@pre</LABEL>
- <LABEL>@private</LABEL>
- <LABEL>@privatesection</LABEL>
- <LABEL>@property</LABEL>
- <LABEL>@protected</LABEL>
- <LABEL>@protectedsection</LABEL>
- <LABEL>@protocol</LABEL>
- <LABEL>@public</LABEL>
- <LABEL>@publicsection</LABEL>
- <LABEL>@ref</LABEL>
- <LABEL>@relates</LABEL>
- <LABEL>@relatesalso</LABEL>
- <LABEL>@remarks</LABEL>
- <LABEL>@return</LABEL>
- <LABEL>@retval</LABEL>
- <LABEL>@sa</LABEL>
- <LABEL>@section</LABEL>
- <LABEL>@showinitializer</LABEL>
- <LABEL>@since</LABEL>
- <LABEL>@skip</LABEL>
- <LABEL>@skipline</LABEL>
- <LABEL>@struct</LABEL>
- <LABEL>@subsection</LABEL>
- <LABEL>@subsubsection</LABEL>
- <LABEL>@test</LABEL>
- <LABEL>@throw</LABEL>
- <LABEL>@todo</LABEL>
- <LABEL>@typedef</LABEL>
- <LABEL>@union</LABEL>
- <LABEL>@until</LABEL>
- <LABEL>@var</LABEL>
- <LABEL>@verbatim</LABEL>
- <LABEL>@verbinclude</LABEL>
- <LABEL>@version</LABEL>
- <LABEL>@warning</LABEL>
- <LABEL>@weakgroup</LABEL>
- <LABEL>@xmlonly</LABEL>
- <LABEL>@xrefitem</LABEL>
- <LABEL>@$</LABEL>
- <LABEL>@@</LABEL>
- <LABEL>@\</LABEL>
- <LABEL>@&</LABEL>
- <LABEL>@~</LABEL>
- <LABEL>@<</LABEL>
- <LABEL>@></LABEL>
- <LABEL>@#</LABEL>
- <LABEL>@%</LABEL>
- </KEYWORDS>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+ <!-- just in case someone wonders just like me, what this set of rules is for,
+ it's actually for doxygen configuration files, a sample of which can
+ be found here http://www.stack.nl/~dimitri/doxygen/config.html#cfg_extract_static
+ -->
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comment -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <MARK_PREVIOUS TYPE="KEYWORD1"
+ AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">=</MARK_PREVIOUS>
+ <MARK_PREVIOUS TYPE="KEYWORD1"
+ AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">+=</MARK_PREVIOUS>
+
+ <!-- Literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+ <KEYWORDS>
+ <KEYWORD2>YES</KEYWORD2>
+ <KEYWORD3>NO</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- this rule set is used as a delegate in c and d modes -->
+ <RULES SET="DOXYGEN" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
+ <!-- so that *@param is highlighted -->
+ <SEQ TYPE="COMMENT3">*</SEQ>
+
+ <!-- quoted strings -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- HTML comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- Doxygen allows this -->
+ <SEQ TYPE="COMMENT3"><<</SEQ>
+ <SEQ TYPE="COMMENT3"><=</SEQ>
+ <SEQ TYPE="COMMENT3">< </SEQ>
+
+ <!-- HTML tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS"
+ NO_LINE_BREAK="TRUE">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <KEYWORDS>
+ <LABEL>\a</LABEL>
+ <LABEL>\addindex</LABEL>
+ <LABEL>\addtogroup</LABEL>
+ <LABEL>\anchor</LABEL>
+ <LABEL>\arg</LABEL>
+ <LABEL>\attention</LABEL>
+ <LABEL>\author</LABEL>
+ <LABEL>\b</LABEL>
+ <LABEL>\brief</LABEL>
+ <LABEL>\bug</LABEL>
+ <LABEL>\c</LABEL>
+ <LABEL>\callgraph</LABEL>
+ <LABEL>\callergraph</LABEL>
+ <LABEL>\category</LABEL>
+ <LABEL>\class</LABEL>
+ <LABEL>\code</LABEL>
+ <LABEL>\cond</LABEL>
+ <LABEL>\copybrief</LABEL>
+ <LABEL>\copydetails</LABEL>
+ <LABEL>\copydoc</LABEL>
+ <LABEL>\date</LABEL>
+ <LABEL>\def</LABEL>
+ <LABEL>\defgroup</LABEL>
+ <LABEL>\deprecated</LABEL>
+ <LABEL>\details</LABEL>
+ <LABEL>\dir</LABEL>
+ <LABEL>\dontinclude</LABEL>
+ <LABEL>\dot</LABEL>
+ <LABEL>\dotfile</LABEL>
+ <LABEL>\e</LABEL>
+ <LABEL>\else</LABEL>
+ <LABEL>\elseif</LABEL>
+ <LABEL>\em</LABEL>
+ <LABEL>\endcode</LABEL>
+ <LABEL>\endcond</LABEL>
+ <LABEL>\enddot</LABEL>
+ <LABEL>\endhtmlonly</LABEL>
+ <LABEL>\endif</LABEL>
+ <LABEL>\endlatexonly</LABEL>
+ <LABEL>\endlink</LABEL>
+ <LABEL>\endmanonly</LABEL>
+ <LABEL>\endmsc</LABEL>
+ <LABEL>\endverbatim</LABEL>
+ <LABEL>\endxmlonly</LABEL>
+ <LABEL>\enum</LABEL>
+ <LABEL>\example</LABEL>
+ <LABEL>\exception</LABEL>
+ <LABEL>\extends</LABEL>
+ <LABEL>\f$</LABEL>
+ <LABEL>\f[</LABEL>
+ <LABEL>\f]</LABEL>
+ <LABEL>\f{</LABEL>
+ <LABEL>\f}</LABEL>
+ <LABEL>\file</LABEL>
+ <LABEL>\fn</LABEL>
+ <LABEL>\headerfile</LABEL>
+ <LABEL>\hideinitializer</LABEL>
+ <LABEL>\htmlinclude</LABEL>
+ <LABEL>\htmlonly</LABEL>
+ <LABEL>\if</LABEL>
+ <LABEL>\ifnot</LABEL>
+ <LABEL>\image</LABEL>
+ <LABEL>\implements</LABEL>
+ <LABEL>\include</LABEL>
+ <LABEL>\includelineno</LABEL>
+ <LABEL>\ingroup</LABEL>
+ <LABEL>\internal</LABEL>
+ <LABEL>\invariant</LABEL>
+ <LABEL>\interface</LABEL>
+ <LABEL>\latexonly</LABEL>
+ <LABEL>\li</LABEL>
+ <LABEL>\line</LABEL>
+ <LABEL>\link</LABEL>
+ <LABEL>\mainpage</LABEL>
+ <LABEL>\manonly</LABEL>
+ <LABEL>\memberof</LABEL>
+ <LABEL>\msc</LABEL>
+ <LABEL>\n</LABEL>
+ <LABEL>\name</LABEL>
+ <LABEL>\namespace</LABEL>
+ <LABEL>\nosubgrouping</LABEL>
+ <LABEL>\note</LABEL>
+ <LABEL>\overload</LABEL>
+ <LABEL>\p</LABEL>
+ <LABEL>\package</LABEL>
+ <LABEL>\page</LABEL>
+ <LABEL>\par</LABEL>
+ <LABEL>\paragraph</LABEL>
+ <LABEL>\param</LABEL>
+ <LABEL>\param[in]</LABEL>
+ <LABEL>\param[out]</LABEL>
+ <LABEL>\param[in,out]</LABEL>
+ <LABEL>\post</LABEL>
+ <LABEL>\pre</LABEL>
+ <LABEL>\private</LABEL>
+ <LABEL>\privatesection</LABEL>
+ <LABEL>\property</LABEL>
+ <LABEL>\protected</LABEL>
+ <LABEL>\protectedsection</LABEL>
+ <LABEL>\protocol</LABEL>
+ <LABEL>\public</LABEL>
+ <LABEL>\publicsection</LABEL>
+ <LABEL>\ref</LABEL>
+ <LABEL>\relates</LABEL>
+ <LABEL>\relatesalso</LABEL>
+ <LABEL>\remarks</LABEL>
+ <LABEL>\return</LABEL>
+ <LABEL>\retval</LABEL>
+ <LABEL>\sa</LABEL>
+ <LABEL>\section</LABEL>
+ <LABEL>\see</LABEL>
+ <LABEL>\showinitializer</LABEL>
+ <LABEL>\since</LABEL>
+ <LABEL>\skip</LABEL>
+ <LABEL>\skipline</LABEL>
+ <LABEL>\struct</LABEL>
+ <LABEL>\subpage</LABEL>
+ <LABEL>\subsection</LABEL>
+ <LABEL>\subsubsection</LABEL>
+ <LABEL>\test</LABEL>
+ <LABEL>\throw</LABEL>
+ <LABEL>\todo</LABEL>
+ <LABEL>\tparam</LABEL>
+ <LABEL>\typedef</LABEL>
+ <LABEL>\union</LABEL>
+ <LABEL>\until</LABEL>
+ <LABEL>\var</LABEL>
+ <LABEL>\verbatim</LABEL>
+ <LABEL>\verbinclude</LABEL>
+ <LABEL>\version</LABEL>
+ <LABEL>\warning</LABEL>
+ <LABEL>\weakgroup</LABEL>
+ <LABEL>\xmlonly</LABEL>
+ <LABEL>\xrefitem</LABEL>
+ <LABEL>\$</LABEL>
+ <LABEL>\@</LABEL>
+ <LABEL>\\</LABEL>
+ <LABEL>\&</LABEL>
+ <LABEL>\~</LABEL>
+ <LABEL>\<</LABEL>
+ <LABEL>\></LABEL>
+ <LABEL>\#</LABEL>
+ <LABEL>\%</LABEL>
+ <LABEL>\"</LABEL>
+ <LABEL>@a</LABEL>
+ <LABEL>@addindex</LABEL>
+ <LABEL>@addtogroup</LABEL>
+ <LABEL>@anchor</LABEL>
+ <LABEL>@arg</LABEL>
+ <LABEL>@attention</LABEL>
+ <LABEL>@author</LABEL>
+ <LABEL>@b</LABEL>
+ <LABEL>@brief</LABEL>
+ <LABEL>@bug</LABEL>
+ <LABEL>@c</LABEL>
+ <LABEL>@callgraph</LABEL>
+ <LABEL>@callergraph</LABEL>
+ <LABEL>@category</LABEL>
+ <LABEL>@class</LABEL>
+ <LABEL>@code</LABEL>
+ <LABEL>@cond</LABEL>
+ <LABEL>@copybrief</LABEL>
+ <LABEL>@copydetails</LABEL>
+ <LABEL>@copydoc</LABEL>
+ <LABEL>@date</LABEL>
+ <LABEL>@def</LABEL>
+ <LABEL>@defgroup</LABEL>
+ <LABEL>@deprecated</LABEL>
+ <LABEL>@details</LABEL>
+ <LABEL>@dir</LABEL>
+ <LABEL>@dontinclude</LABEL>
+ <LABEL>@dot</LABEL>
+ <LABEL>@dotfile</LABEL>
+ <LABEL>@e</LABEL>
+ <LABEL>@else</LABEL>
+ <LABEL>@elseif</LABEL>
+ <LABEL>@em</LABEL>
+ <LABEL>@endcode</LABEL>
+ <LABEL>@endcond</LABEL>
+ <LABEL>@enddot</LABEL>
+ <LABEL>@endhtmlonly</LABEL>
+ <LABEL>@endif</LABEL>
+ <LABEL>@endlatexonly</LABEL>
+ <LABEL>@endlink</LABEL>
+ <LABEL>@endmanonly</LABEL>
+ <LABEL>@endmsc</LABEL>
+ <LABEL>@endverbatim</LABEL>
+ <LABEL>@endxmlonly</LABEL>
+ <LABEL>@enum</LABEL>
+ <LABEL>@example</LABEL>
+ <LABEL>@exception</LABEL>
+ <LABEL>@extends</LABEL>
+ <LABEL>@f$</LABEL>
+ <LABEL>@f[</LABEL>
+ <LABEL>@f]</LABEL>
+ <LABEL>@f{</LABEL>
+ <LABEL>@f}</LABEL>
+ <LABEL>@file</LABEL>
+ <LABEL>@fn</LABEL>
+ <LABEL>@headerfile</LABEL>
+ <LABEL>@hideinitializer</LABEL>
+ <LABEL>@htmlinclude</LABEL>
+ <LABEL>@htmlonly</LABEL>
+ <LABEL>@if</LABEL>
+ <LABEL>@ifnot</LABEL>
+ <LABEL>@image</LABEL>
+ <LABEL>@implements</LABEL>
+ <LABEL>@include</LABEL>
+ <LABEL>@includelineno</LABEL>
+ <LABEL>@ingroup</LABEL>
+ <LABEL>@internal</LABEL>
+ <LABEL>@invariant</LABEL>
+ <LABEL>@interface</LABEL>
+ <LABEL>@latexonly</LABEL>
+ <LABEL>@li</LABEL>
+ <LABEL>@line</LABEL>
+ <LABEL>@link</LABEL>
+ <LABEL>@mainpage</LABEL>
+ <LABEL>@manonly</LABEL>
+ <LABEL>@memberof</LABEL>
+ <LABEL>@msc</LABEL>
+ <LABEL>@n</LABEL>
+ <LABEL>@name</LABEL>
+ <LABEL>@namespace</LABEL>
+ <LABEL>@nosubgrouping</LABEL>
+ <LABEL>@note</LABEL>
+ <LABEL>@overload</LABEL>
+ <LABEL>@p</LABEL>
+ <LABEL>@package</LABEL>
+ <LABEL>@page</LABEL>
+ <LABEL>@par</LABEL>
+ <LABEL>@paragraph</LABEL>
+ <LABEL>@param</LABEL>
+ <LABEL>@param[in]</LABEL>
+ <LABEL>@param[out]</LABEL>
+ <LABEL>@param[in,out]</LABEL>
+ <LABEL>@post</LABEL>
+ <LABEL>@pre</LABEL>
+ <LABEL>@private</LABEL>
+ <LABEL>@privatesection</LABEL>
+ <LABEL>@property</LABEL>
+ <LABEL>@protected</LABEL>
+ <LABEL>@protectedsection</LABEL>
+ <LABEL>@protocol</LABEL>
+ <LABEL>@public</LABEL>
+ <LABEL>@publicsection</LABEL>
+ <LABEL>@ref</LABEL>
+ <LABEL>@relates</LABEL>
+ <LABEL>@relatesalso</LABEL>
+ <LABEL>@remarks</LABEL>
+ <LABEL>@return</LABEL>
+ <LABEL>@retval</LABEL>
+ <LABEL>@sa</LABEL>
+ <LABEL>@section</LABEL>
+ <LABEL>@see</LABEL>
+ <LABEL>@showinitializer</LABEL>
+ <LABEL>@since</LABEL>
+ <LABEL>@skip</LABEL>
+ <LABEL>@skipline</LABEL>
+ <LABEL>@struct</LABEL>
+ <LABEL>@subpage</LABEL>
+ <LABEL>@subsection</LABEL>
+ <LABEL>@subsubsection</LABEL>
+ <LABEL>@test</LABEL>
+ <LABEL>@throw</LABEL>
+ <LABEL>@todo</LABEL>
+ <LABEL>@tparam</LABEL>
+ <LABEL>@typedef</LABEL>
+ <LABEL>@union</LABEL>
+ <LABEL>@until</LABEL>
+ <LABEL>@var</LABEL>
+ <LABEL>@verbatim</LABEL>
+ <LABEL>@verbinclude</LABEL>
+ <LABEL>@version</LABEL>
+ <LABEL>@warning</LABEL>
+ <LABEL>@weakgroup</LABEL>
+ <LABEL>@xmlonly</LABEL>
+ <LABEL>@xrefitem</LABEL>
+ <LABEL>@$</LABEL>
+ <LABEL>@@</LABEL>
+ <LABEL>@\</LABEL>
+ <LABEL>@&</LABEL>
+ <LABEL>@~</LABEL>
+ <LABEL>@<</LABEL>
+ <LABEL>@></LABEL>
+ <LABEL>@#</LABEL>
+ <LABEL>@%</LABEL>
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/dsssl.xml b/jEdit/modes/dsssl.xml
index 789c5c0..22dc318 100644
--- a/jEdit/modes/dsssl.xml
+++ b/jEdit/modes/dsssl.xml
@@ -1,153 +1,153 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- DSSSL is the Document Style Semantics Specification Language,
- used by the Jade SGML documentation generation tool -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <PROPERTY NAME="lineComment" VALUE=";" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- EOL comment -->
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- LISP stuff -->
- <SEQ TYPE="NULL">'(</SEQ>
-
- <MARK_FOLLOWING TYPE="LITERAL1">'</MARK_FOLLOWING>
-
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- DSSSL stuff -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>$</BEGIN>
- <END>$</END>
- </SPAN>
-
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>%</BEGIN>
- <END>%</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="LITERAL2">#</MARK_FOLLOWING>
-
- <!-- DTD Entity declarations -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::ENTITY-TAGS">
- <BEGIN><!ENTITY</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- CDATA sections -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::CDATA">
- <BEGIN><![CDATA[</BEGIN>
- <END>]]></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SEQ TYPE="NULL"><=</SEQ>
-
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
- <BEGIN></style-specification</BEGIN>
- <END>></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
- <BEGIN></style-sheet</BEGIN>
- <END>></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
- <BEGIN><style-specification</BEGIN>
- <END>></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
- <BEGIN><external-specification</BEGIN>
- <END>></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
- <BEGIN><style-sheet</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
-
- <KEYWORDS>
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>cond</KEYWORD1>
- <KEYWORD1>define</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>lambda</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>quote</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>let*</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>list</KEYWORD1>
- <KEYWORD1>append</KEYWORD1>
- <KEYWORD1>children</KEYWORD1>
- <KEYWORD1>normalize</KEYWORD1>
-
- <KEYWORD2>car</KEYWORD2>
- <KEYWORD2>cdr</KEYWORD2>
- <KEYWORD2>cons</KEYWORD2>
- <KEYWORD2>node-list-first</KEYWORD2>
- <KEYWORD2>node-list-rest</KEYWORD2>
-
- <KEYWORD3>eq?</KEYWORD3>
- <KEYWORD3>null?</KEYWORD3>
- <KEYWORD3>pair?</KEYWORD3>
- <KEYWORD3>zero?</KEYWORD3>
- <KEYWORD3>equal?</KEYWORD3>
- <KEYWORD3>node-list-empty?</KEYWORD3>
-
- <FUNCTION>external-procedure</FUNCTION>
- <FUNCTION>root</FUNCTION>
- <FUNCTION>make</FUNCTION>
- <FUNCTION>process-children</FUNCTION>
- <FUNCTION>current-node</FUNCTION>
- <FUNCTION>node</FUNCTION>
- <FUNCTION>empty-sosofo</FUNCTION>
- <FUNCTION>default</FUNCTION>
- <FUNCTION>attribute-string</FUNCTION>
- <FUNCTION>select-elements</FUNCTION>
- <FUNCTION>with-mode</FUNCTION>
- <FUNCTION>literal</FUNCTION>
- <FUNCTION>process-node-list</FUNCTION>
- <FUNCTION>element</FUNCTION>
- <FUNCTION>mode</FUNCTION>
- <FUNCTION>gi</FUNCTION>
- <FUNCTION>sosofo-append</FUNCTION>
- <FUNCTION>sequence</FUNCTION>
-
- <LABEL>attributes:</LABEL>
- <LABEL>gi:</LABEL>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- DSSSL is the Document Style Semantics Specification Language,
+ used by the Jade SGML documentation generation tool -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- EOL comment -->
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- LISP stuff -->
+ <SEQ TYPE="NULL">'(</SEQ>
+
+ <MARK_FOLLOWING TYPE="LITERAL1">'</MARK_FOLLOWING>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- DSSSL stuff -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>$</BEGIN>
+ <END>$</END>
+ </SPAN>
+
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>%</BEGIN>
+ <END>%</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="LITERAL2">#</MARK_FOLLOWING>
+
+ <!-- DTD Entity declarations -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::ENTITY-TAGS">
+ <BEGIN><!ENTITY</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CDATA sections -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::CDATA">
+ <BEGIN><![CDATA[</BEGIN>
+ <END>]]></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SEQ TYPE="NULL"><=</SEQ>
+
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
+ <BEGIN></style-specification</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
+ <BEGIN></style-sheet</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
+ <BEGIN><style-specification</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
+ <BEGIN><external-specification</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
+ <BEGIN><style-sheet</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>cond</KEYWORD1>
+ <KEYWORD1>define</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>lambda</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>quote</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>let</KEYWORD1>
+ <KEYWORD1>let*</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>list</KEYWORD1>
+ <KEYWORD1>append</KEYWORD1>
+ <KEYWORD1>children</KEYWORD1>
+ <KEYWORD1>normalize</KEYWORD1>
+
+ <KEYWORD2>car</KEYWORD2>
+ <KEYWORD2>cdr</KEYWORD2>
+ <KEYWORD2>cons</KEYWORD2>
+ <KEYWORD2>node-list-first</KEYWORD2>
+ <KEYWORD2>node-list-rest</KEYWORD2>
+
+ <KEYWORD3>eq?</KEYWORD3>
+ <KEYWORD3>null?</KEYWORD3>
+ <KEYWORD3>pair?</KEYWORD3>
+ <KEYWORD3>zero?</KEYWORD3>
+ <KEYWORD3>equal?</KEYWORD3>
+ <KEYWORD3>node-list-empty?</KEYWORD3>
+
+ <FUNCTION>external-procedure</FUNCTION>
+ <FUNCTION>root</FUNCTION>
+ <FUNCTION>make</FUNCTION>
+ <FUNCTION>process-children</FUNCTION>
+ <FUNCTION>current-node</FUNCTION>
+ <FUNCTION>node</FUNCTION>
+ <FUNCTION>empty-sosofo</FUNCTION>
+ <FUNCTION>default</FUNCTION>
+ <FUNCTION>attribute-string</FUNCTION>
+ <FUNCTION>select-elements</FUNCTION>
+ <FUNCTION>with-mode</FUNCTION>
+ <FUNCTION>literal</FUNCTION>
+ <FUNCTION>process-node-list</FUNCTION>
+ <FUNCTION>element</FUNCTION>
+ <FUNCTION>mode</FUNCTION>
+ <FUNCTION>gi</FUNCTION>
+ <FUNCTION>sosofo-append</FUNCTION>
+ <FUNCTION>sequence</FUNCTION>
+
+ <LABEL>attributes:</LABEL>
+ <LABEL>gi:</LABEL>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/eiffel.xml b/jEdit/modes/eiffel.xml
index c30cfa8..efea4ea 100644
--- a/jEdit/modes/eiffel.xml
+++ b/jEdit/modes/eiffel.xml
@@ -1,115 +1,115 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Eiffel mode, by Slava Pestov. Based on EiffelTokenMarker by
- Artur Biesiadowski -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="--" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comment -->
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
-
- <!-- Standard literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- some of these should be marked OPERATOR -->
- <!-- <SEQ TYPE="NULL">)</SEQ>
- <SEQ TYPE="NULL">(</SEQ>
- <SEQ TYPE="NULL">=</SEQ>
- <SEQ TYPE="NULL">!</SEQ>
- <SEQ TYPE="NULL">>=</SEQ>
- <SEQ TYPE="NULL"><=</SEQ>
- <SEQ TYPE="NULL">+</SEQ>
- <SEQ TYPE="NULL">-</SEQ>
- <SEQ TYPE="NULL">/</SEQ>
- <SEQ TYPE="NULL">*</SEQ>
- <SEQ TYPE="NULL">></SEQ>
- <SEQ TYPE="NULL"><</SEQ>
- <SEQ TYPE="NULL">%</SEQ>
- <SEQ TYPE="NULL">&</SEQ>
- <SEQ TYPE="NULL">|</SEQ>
- <SEQ TYPE="NULL">^</SEQ>
- <SEQ TYPE="NULL">~</SEQ>
- <SEQ TYPE="NULL">}</SEQ>
- <SEQ TYPE="NULL">{</SEQ>
- <SEQ TYPE="NULL">.</SEQ>
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SEQ TYPE="NULL">]</SEQ>
- <SEQ TYPE="NULL">[</SEQ>
- <SEQ TYPE="NULL">?</SEQ>
- <SEQ TYPE="NULL">:</SEQ> -->
-
- <KEYWORDS>
- <KEYWORD1>alias</KEYWORD1>
- <KEYWORD1>all</KEYWORD1>
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>check</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>creation</KEYWORD1>
- <KEYWORD1>debug</KEYWORD1>
- <KEYWORD1>deferred</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>elseif</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>ensure</KEYWORD1>
- <KEYWORD1>expanded</KEYWORD1>
- <KEYWORD1>export</KEYWORD1>
- <KEYWORD1>external</KEYWORD1>
- <KEYWORD1>feature</KEYWORD1>
- <KEYWORD1>from</KEYWORD1>
- <KEYWORD1>frozen</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>implies</KEYWORD1>
- <KEYWORD1>indexing</KEYWORD1>
- <KEYWORD1>infix</KEYWORD1>
- <KEYWORD1>inherit</KEYWORD1>
- <KEYWORD1>inspect</KEYWORD1>
- <KEYWORD1>invariant</KEYWORD1>
- <KEYWORD1>is</KEYWORD1>
- <KEYWORD1>like</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>obsolete</KEYWORD1>
- <KEYWORD1>old</KEYWORD1>
- <KEYWORD1>once</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>prefix</KEYWORD1>
- <KEYWORD1>redefine</KEYWORD1>
- <KEYWORD1>rename</KEYWORD1>
- <KEYWORD1>require</KEYWORD1>
- <KEYWORD1>rescue</KEYWORD1>
- <KEYWORD1>retry</KEYWORD1>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>separate</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>undefine</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>variant</KEYWORD1>
- <KEYWORD1>when</KEYWORD1>
- <KEYWORD1>xor</KEYWORD1>
-
- <LITERAL2>current</LITERAL2>
- <LITERAL2>false</LITERAL2>
- <LITERAL2>precursor</LITERAL2>
- <LITERAL2>result</LITERAL2>
- <LITERAL2>strip</LITERAL2>
- <LITERAL2>true</LITERAL2>
- <LITERAL2>unique</LITERAL2>
- <LITERAL2>void</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Eiffel mode, by Slava Pestov. Based on EiffelTokenMarker by
+ Artur Biesiadowski -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comment -->
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+
+ <!-- Standard literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- some of these should be marked OPERATOR -->
+ <!-- <SEQ TYPE="NULL">)</SEQ>
+ <SEQ TYPE="NULL">(</SEQ>
+ <SEQ TYPE="NULL">=</SEQ>
+ <SEQ TYPE="NULL">!</SEQ>
+ <SEQ TYPE="NULL">>=</SEQ>
+ <SEQ TYPE="NULL"><=</SEQ>
+ <SEQ TYPE="NULL">+</SEQ>
+ <SEQ TYPE="NULL">-</SEQ>
+ <SEQ TYPE="NULL">/</SEQ>
+ <SEQ TYPE="NULL">*</SEQ>
+ <SEQ TYPE="NULL">></SEQ>
+ <SEQ TYPE="NULL"><</SEQ>
+ <SEQ TYPE="NULL">%</SEQ>
+ <SEQ TYPE="NULL">&</SEQ>
+ <SEQ TYPE="NULL">|</SEQ>
+ <SEQ TYPE="NULL">^</SEQ>
+ <SEQ TYPE="NULL">~</SEQ>
+ <SEQ TYPE="NULL">}</SEQ>
+ <SEQ TYPE="NULL">{</SEQ>
+ <SEQ TYPE="NULL">.</SEQ>
+ <SEQ TYPE="NULL">,</SEQ>
+ <SEQ TYPE="NULL">;</SEQ>
+ <SEQ TYPE="NULL">]</SEQ>
+ <SEQ TYPE="NULL">[</SEQ>
+ <SEQ TYPE="NULL">?</SEQ>
+ <SEQ TYPE="NULL">:</SEQ> -->
+
+ <KEYWORDS>
+ <KEYWORD1>alias</KEYWORD1>
+ <KEYWORD1>all</KEYWORD1>
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>check</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>creation</KEYWORD1>
+ <KEYWORD1>debug</KEYWORD1>
+ <KEYWORD1>deferred</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>elseif</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>ensure</KEYWORD1>
+ <KEYWORD1>expanded</KEYWORD1>
+ <KEYWORD1>export</KEYWORD1>
+ <KEYWORD1>external</KEYWORD1>
+ <KEYWORD1>feature</KEYWORD1>
+ <KEYWORD1>from</KEYWORD1>
+ <KEYWORD1>frozen</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>implies</KEYWORD1>
+ <KEYWORD1>indexing</KEYWORD1>
+ <KEYWORD1>infix</KEYWORD1>
+ <KEYWORD1>inherit</KEYWORD1>
+ <KEYWORD1>inspect</KEYWORD1>
+ <KEYWORD1>invariant</KEYWORD1>
+ <KEYWORD1>is</KEYWORD1>
+ <KEYWORD1>like</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>obsolete</KEYWORD1>
+ <KEYWORD1>old</KEYWORD1>
+ <KEYWORD1>once</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>prefix</KEYWORD1>
+ <KEYWORD1>redefine</KEYWORD1>
+ <KEYWORD1>rename</KEYWORD1>
+ <KEYWORD1>require</KEYWORD1>
+ <KEYWORD1>rescue</KEYWORD1>
+ <KEYWORD1>retry</KEYWORD1>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>separate</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>undefine</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>variant</KEYWORD1>
+ <KEYWORD1>when</KEYWORD1>
+ <KEYWORD1>xor</KEYWORD1>
+
+ <LITERAL2>current</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>precursor</LITERAL2>
+ <LITERAL2>result</LITERAL2>
+ <LITERAL2>strip</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>unique</LITERAL2>
+ <LITERAL2>void</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/embperl.xml b/jEdit/modes/embperl.xml
index 4dcc35e..4e0a586 100644
--- a/jEdit/modes/embperl.xml
+++ b/jEdit/modes/embperl.xml
@@ -1,51 +1,51 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-catalog entry:
-
-<MODE NAME="embperl" FILE="embperl.xml"
- FILE_NAME_GLOB="*.epl"/>
-
-sidekick parser entry:
-mode.embperl.sidekick.parser=html
-
-xml completion entry:
-mode.embperl.xml.completion-info=jeditresource:/XML.jar!/xml/completion/html-complete.xml
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
- <SPAN TYPE="COMMENT2">
- <BEGIN>[#</BEGIN>
- <END>#]</END>
- </SPAN>
- <!-- output result -->
- <SPAN DELEGATE="perl::MAIN" TYPE="LITERAL3">
- <BEGIN>[+</BEGIN>
- <END>+]</END>
- </SPAN>
- <!-- execute code -->
- <SPAN DELEGATE="perl::MAIN" TYPE="LITERAL3">
- <BEGIN>[-</BEGIN>
- <END>-]</END>
- </SPAN>
- <!-- control flow -->
- <SPAN DELEGATE="perl::MAIN" TYPE="LITERAL3">
- <BEGIN>[$</BEGIN>
- <END>$]</END>
- </SPAN>
- <!-- execute once -->
- <SPAN DELEGATE="perl::MAIN" TYPE="LITERAL3">
- <BEGIN>[!</BEGIN>
- <END>!]</END>
- </SPAN>
- <IMPORT DELEGATE="html::MAIN"/>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+catalog entry:
+
+<MODE NAME="embperl" FILE="embperl.xml"
+ FILE_NAME_GLOB="*.epl"/>
+
+sidekick parser entry:
+mode.embperl.sidekick.parser=html
+
+xml completion entry:
+mode.embperl.xml.completion-info=jeditresource:/XML.jar!/xml/completion/html-complete.xml
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>[#</BEGIN>
+ <END>#]</END>
+ </SPAN>
+ <!-- output result -->
+ <SPAN DELEGATE="perl::MAIN" TYPE="LITERAL3">
+ <BEGIN>[+</BEGIN>
+ <END>+]</END>
+ </SPAN>
+ <!-- execute code -->
+ <SPAN DELEGATE="perl::MAIN" TYPE="LITERAL3">
+ <BEGIN>[-</BEGIN>
+ <END>-]</END>
+ </SPAN>
+ <!-- control flow -->
+ <SPAN DELEGATE="perl::MAIN" TYPE="LITERAL3">
+ <BEGIN>[$</BEGIN>
+ <END>$]</END>
+ </SPAN>
+ <!-- execute once -->
+ <SPAN DELEGATE="perl::MAIN" TYPE="LITERAL3">
+ <BEGIN>[!</BEGIN>
+ <END>!]</END>
+ </SPAN>
+ <IMPORT DELEGATE="html::MAIN"/>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/erlang.xml b/jEdit/modes/erlang.xml
index 46e78ee..5d8b40e 100644
--- a/jEdit/modes/erlang.xml
+++ b/jEdit/modes/erlang.xml
@@ -1,267 +1,267 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="%"/>
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <MARK_PREVIOUS TYPE="LITERAL2" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
-
- <SEQ_REGEXP HASH_CHAR="$"
- TYPE="LITERAL3"
- AT_WORD_START="TRUE"
- >\$.\w*</SEQ_REGEXP>
-
- <SEQ TYPE="LITERAL3">badarg</SEQ>
- <SEQ TYPE="LITERAL3">nocookie</SEQ>
- <SEQ TYPE="LITERAL3">false</SEQ>
- <SEQ TYPE="LITERAL3">true</SEQ>
-
- <SEQ TYPE="OPERATOR">-></SEQ>
- <SEQ TYPE="OPERATOR"><-</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <!--
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- -->
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
-
- <!-- div -->
- <SEQ_REGEXP HASH_CHAR="div"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bdiv\b</SEQ_REGEXP>
- <!-- rem -->
- <SEQ_REGEXP HASH_CHAR="rem"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\brem\b</SEQ_REGEXP>
- <!-- or -->
- <SEQ_REGEXP HASH_CHAR="or"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bor\b</SEQ_REGEXP>
- <!-- xor -->
- <SEQ_REGEXP HASH_CHAR="xor"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bxor\b</SEQ_REGEXP>
- <!-- bor -->
- <SEQ_REGEXP HASH_CHAR="bor"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bbor\b</SEQ_REGEXP>
- <!-- bxor -->
- <SEQ_REGEXP HASH_CHAR="bxor"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bbxor\b</SEQ_REGEXP>
- <!-- bsl -->
- <SEQ_REGEXP HASH_CHAR="bsl"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bbsl\b</SEQ_REGEXP>
- <!-- bsr -->
- <SEQ_REGEXP HASH_CHAR="bsr"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bbsr\b</SEQ_REGEXP>
- <!-- and -->
- <SEQ_REGEXP HASH_CHAR="and"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\band\b</SEQ_REGEXP>
- <!-- band -->
- <SEQ_REGEXP HASH_CHAR="band"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bband\b</SEQ_REGEXP>
- <!-- not -->
- <SEQ_REGEXP HASH_CHAR="not"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bnot\b</SEQ_REGEXP>
- <!-- bnot -->
- <SEQ_REGEXP HASH_CHAR="bnot"
- TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- >\bbnot\b</SEQ_REGEXP>
-
- <KEYWORDS>
- <!-- keywords -->
- <KEYWORD1>after</KEYWORD1>
- <KEYWORD1>begin</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>cond</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>fun</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>query</KEYWORD1>
- <KEYWORD1>receive</KEYWORD1>
- <KEYWORD1>when</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
-
- <!-- built-in-functions BIFs -->
- <KEYWORD2>abs</KEYWORD2>
- <KEYWORD2>alive</KEYWORD2>
- <KEYWORD2>apply</KEYWORD2>
- <KEYWORD2>atom_to_list</KEYWORD2>
- <KEYWORD2>binary_to_list</KEYWORD2>
- <KEYWORD2>binary_to_term</KEYWORD2>
- <KEYWORD2>concat_binary</KEYWORD2>
- <KEYWORD2>date</KEYWORD2>
- <KEYWORD2>disconnect_node</KEYWORD2>
- <KEYWORD2>element</KEYWORD2>
- <KEYWORD2>erase</KEYWORD2>
- <KEYWORD2>exit</KEYWORD2>
- <KEYWORD2>float</KEYWORD2>
- <KEYWORD2>float_to_list</KEYWORD2>
- <KEYWORD2>get</KEYWORD2>
- <KEYWORD2>get_keys</KEYWORD2>
- <KEYWORD2>group_leader</KEYWORD2>
- <KEYWORD2>halt</KEYWORD2>
- <KEYWORD2>hd</KEYWORD2>
- <KEYWORD2>integer_to_list</KEYWORD2>
- <KEYWORD2>is_alive</KEYWORD2>
- <KEYWORD2>length</KEYWORD2>
- <KEYWORD2>link</KEYWORD2>
- <KEYWORD2>list_to_atom</KEYWORD2>
- <KEYWORD2>list_to_binary</KEYWORD2>
- <KEYWORD2>list_to_float</KEYWORD2>
- <KEYWORD2>list_to_integer</KEYWORD2>
- <KEYWORD2>list_to_pid</KEYWORD2>
- <KEYWORD2>list_to_tuple</KEYWORD2>
- <KEYWORD2>load_module</KEYWORD2>
- <KEYWORD2>make_ref</KEYWORD2>
- <KEYWORD2>monitor_node</KEYWORD2>
- <KEYWORD2>node</KEYWORD2>
- <KEYWORD2>nodes</KEYWORD2>
- <KEYWORD2>now</KEYWORD2>
- <KEYWORD2>open_port</KEYWORD2>
- <KEYWORD2>pid_to_list</KEYWORD2>
- <KEYWORD2>process_flag</KEYWORD2>
- <KEYWORD2>process_info</KEYWORD2>
- <KEYWORD2>process</KEYWORD2>
- <KEYWORD2>put</KEYWORD2>
- <KEYWORD2>register</KEYWORD2>
- <KEYWORD2>registered</KEYWORD2>
- <KEYWORD2>round</KEYWORD2>
- <KEYWORD2>self</KEYWORD2>
- <KEYWORD2>setelement</KEYWORD2>
- <KEYWORD2>size</KEYWORD2>
- <KEYWORD2>spawn</KEYWORD2>
- <KEYWORD2>spawn_link</KEYWORD2>
- <KEYWORD2>split_binary</KEYWORD2>
- <KEYWORD2>statistics</KEYWORD2>
- <KEYWORD2>term_to_binary</KEYWORD2>
- <KEYWORD2>throw</KEYWORD2>
- <KEYWORD2>time</KEYWORD2>
- <KEYWORD2>tl</KEYWORD2>
- <KEYWORD2>trunc</KEYWORD2>
- <KEYWORD2>tuple_to_list</KEYWORD2>
- <KEYWORD2>unlink</KEYWORD2>
- <KEYWORD2>unregister</KEYWORD2>
- <KEYWORD2>whereis</KEYWORD2>
-
- <!-- other BIFs -->
- <KEYWORD2>atom</KEYWORD2>
- <KEYWORD2>binary</KEYWORD2>
- <KEYWORD2>constant</KEYWORD2>
- <KEYWORD2>function</KEYWORD2>
- <KEYWORD2>integer</KEYWORD2>
- <KEYWORD2>list</KEYWORD2>
- <KEYWORD2>number</KEYWORD2>
- <KEYWORD2>pid</KEYWORD2>
- <KEYWORD2>ports</KEYWORD2>
- <KEYWORD2>port_close</KEYWORD2>
- <KEYWORD2>port_info</KEYWORD2>
- <KEYWORD2>reference</KEYWORD2>
- <KEYWORD2>record</KEYWORD2>
-
- <!-- erlang:BIFs -->
- <KEYWORD2>check_process_code</KEYWORD2>
- <KEYWORD2>delete_module</KEYWORD2>
- <KEYWORD2>get_cookie</KEYWORD2>
- <KEYWORD2>hash</KEYWORD2>
- <KEYWORD2>math</KEYWORD2>
- <KEYWORD2>module_loaded</KEYWORD2>
- <KEYWORD2>preloaded</KEYWORD2>
- <KEYWORD2>processes</KEYWORD2>
- <KEYWORD2>purge_module</KEYWORD2>
- <KEYWORD2>set_cookie</KEYWORD2>
- <KEYWORD2>set_node</KEYWORD2>
-
- <!-- math functions -->
- <KEYWORD2>acos</KEYWORD2>
- <KEYWORD2>asin</KEYWORD2>
- <KEYWORD2>atan</KEYWORD2>
- <KEYWORD2>atan2</KEYWORD2>
- <KEYWORD2>cos</KEYWORD2>
- <KEYWORD2>cosh</KEYWORD2>
- <KEYWORD2>exp</KEYWORD2>
- <KEYWORD2>log</KEYWORD2>
- <KEYWORD2>log10</KEYWORD2>
- <KEYWORD2>pi</KEYWORD2>
- <KEYWORD2>pow</KEYWORD2>
- <KEYWORD2>power</KEYWORD2>
- <KEYWORD2>sin</KEYWORD2>
- <KEYWORD2>sinh</KEYWORD2>
- <KEYWORD2>sqrt</KEYWORD2>
- <KEYWORD2>tan</KEYWORD2>
- <KEYWORD2>tanh</KEYWORD2>
-
- <!-- directives -->
- <KEYWORD3>-behaviour</KEYWORD3>
- <KEYWORD3>-compile</KEYWORD3>
- <KEYWORD3>-define</KEYWORD3>
- <KEYWORD3>-else</KEYWORD3>
- <KEYWORD3>-endif</KEYWORD3>
- <KEYWORD3>-export</KEYWORD3>
- <KEYWORD3>-file</KEYWORD3>
- <KEYWORD3>-ifdef</KEYWORD3>
- <KEYWORD3>-ifndef</KEYWORD3>
- <KEYWORD3>-import</KEYWORD3>
- <KEYWORD3>-include</KEYWORD3>
- <KEYWORD3>-include_lib</KEYWORD3>
- <KEYWORD3>-module</KEYWORD3>
- <KEYWORD3>-record</KEYWORD3>
- <KEYWORD3>-undef</KEYWORD3>
- </KEYWORDS>
-
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="%"/>
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <MARK_PREVIOUS TYPE="LITERAL2" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+
+ <SEQ_REGEXP HASH_CHAR="$"
+ TYPE="LITERAL3"
+ AT_WORD_START="TRUE"
+ >\$.\w*</SEQ_REGEXP>
+
+ <SEQ TYPE="LITERAL3">badarg</SEQ>
+ <SEQ TYPE="LITERAL3">nocookie</SEQ>
+ <SEQ TYPE="LITERAL3">false</SEQ>
+ <SEQ TYPE="LITERAL3">true</SEQ>
+
+ <SEQ TYPE="OPERATOR">-></SEQ>
+ <SEQ TYPE="OPERATOR"><-</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <!--
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ -->
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+
+ <!-- div -->
+ <SEQ_REGEXP HASH_CHAR="div"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bdiv\b</SEQ_REGEXP>
+ <!-- rem -->
+ <SEQ_REGEXP HASH_CHAR="rem"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\brem\b</SEQ_REGEXP>
+ <!-- or -->
+ <SEQ_REGEXP HASH_CHAR="or"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bor\b</SEQ_REGEXP>
+ <!-- xor -->
+ <SEQ_REGEXP HASH_CHAR="xor"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bxor\b</SEQ_REGEXP>
+ <!-- bor -->
+ <SEQ_REGEXP HASH_CHAR="bor"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bbor\b</SEQ_REGEXP>
+ <!-- bxor -->
+ <SEQ_REGEXP HASH_CHAR="bxor"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bbxor\b</SEQ_REGEXP>
+ <!-- bsl -->
+ <SEQ_REGEXP HASH_CHAR="bsl"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bbsl\b</SEQ_REGEXP>
+ <!-- bsr -->
+ <SEQ_REGEXP HASH_CHAR="bsr"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bbsr\b</SEQ_REGEXP>
+ <!-- and -->
+ <SEQ_REGEXP HASH_CHAR="and"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\band\b</SEQ_REGEXP>
+ <!-- band -->
+ <SEQ_REGEXP HASH_CHAR="band"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bband\b</SEQ_REGEXP>
+ <!-- not -->
+ <SEQ_REGEXP HASH_CHAR="not"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bnot\b</SEQ_REGEXP>
+ <!-- bnot -->
+ <SEQ_REGEXP HASH_CHAR="bnot"
+ TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ >\bbnot\b</SEQ_REGEXP>
+
+ <KEYWORDS>
+ <!-- keywords -->
+ <KEYWORD1>after</KEYWORD1>
+ <KEYWORD1>begin</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>cond</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>fun</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>let</KEYWORD1>
+ <KEYWORD1>of</KEYWORD1>
+ <KEYWORD1>query</KEYWORD1>
+ <KEYWORD1>receive</KEYWORD1>
+ <KEYWORD1>when</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+
+ <!-- built-in-functions BIFs -->
+ <KEYWORD2>abs</KEYWORD2>
+ <KEYWORD2>alive</KEYWORD2>
+ <KEYWORD2>apply</KEYWORD2>
+ <KEYWORD2>atom_to_list</KEYWORD2>
+ <KEYWORD2>binary_to_list</KEYWORD2>
+ <KEYWORD2>binary_to_term</KEYWORD2>
+ <KEYWORD2>concat_binary</KEYWORD2>
+ <KEYWORD2>date</KEYWORD2>
+ <KEYWORD2>disconnect_node</KEYWORD2>
+ <KEYWORD2>element</KEYWORD2>
+ <KEYWORD2>erase</KEYWORD2>
+ <KEYWORD2>exit</KEYWORD2>
+ <KEYWORD2>float</KEYWORD2>
+ <KEYWORD2>float_to_list</KEYWORD2>
+ <KEYWORD2>get</KEYWORD2>
+ <KEYWORD2>get_keys</KEYWORD2>
+ <KEYWORD2>group_leader</KEYWORD2>
+ <KEYWORD2>halt</KEYWORD2>
+ <KEYWORD2>hd</KEYWORD2>
+ <KEYWORD2>integer_to_list</KEYWORD2>
+ <KEYWORD2>is_alive</KEYWORD2>
+ <KEYWORD2>length</KEYWORD2>
+ <KEYWORD2>link</KEYWORD2>
+ <KEYWORD2>list_to_atom</KEYWORD2>
+ <KEYWORD2>list_to_binary</KEYWORD2>
+ <KEYWORD2>list_to_float</KEYWORD2>
+ <KEYWORD2>list_to_integer</KEYWORD2>
+ <KEYWORD2>list_to_pid</KEYWORD2>
+ <KEYWORD2>list_to_tuple</KEYWORD2>
+ <KEYWORD2>load_module</KEYWORD2>
+ <KEYWORD2>make_ref</KEYWORD2>
+ <KEYWORD2>monitor_node</KEYWORD2>
+ <KEYWORD2>node</KEYWORD2>
+ <KEYWORD2>nodes</KEYWORD2>
+ <KEYWORD2>now</KEYWORD2>
+ <KEYWORD2>open_port</KEYWORD2>
+ <KEYWORD2>pid_to_list</KEYWORD2>
+ <KEYWORD2>process_flag</KEYWORD2>
+ <KEYWORD2>process_info</KEYWORD2>
+ <KEYWORD2>process</KEYWORD2>
+ <KEYWORD2>put</KEYWORD2>
+ <KEYWORD2>register</KEYWORD2>
+ <KEYWORD2>registered</KEYWORD2>
+ <KEYWORD2>round</KEYWORD2>
+ <KEYWORD2>self</KEYWORD2>
+ <KEYWORD2>setelement</KEYWORD2>
+ <KEYWORD2>size</KEYWORD2>
+ <KEYWORD2>spawn</KEYWORD2>
+ <KEYWORD2>spawn_link</KEYWORD2>
+ <KEYWORD2>split_binary</KEYWORD2>
+ <KEYWORD2>statistics</KEYWORD2>
+ <KEYWORD2>term_to_binary</KEYWORD2>
+ <KEYWORD2>throw</KEYWORD2>
+ <KEYWORD2>time</KEYWORD2>
+ <KEYWORD2>tl</KEYWORD2>
+ <KEYWORD2>trunc</KEYWORD2>
+ <KEYWORD2>tuple_to_list</KEYWORD2>
+ <KEYWORD2>unlink</KEYWORD2>
+ <KEYWORD2>unregister</KEYWORD2>
+ <KEYWORD2>whereis</KEYWORD2>
+
+ <!-- other BIFs -->
+ <KEYWORD2>atom</KEYWORD2>
+ <KEYWORD2>binary</KEYWORD2>
+ <KEYWORD2>constant</KEYWORD2>
+ <KEYWORD2>function</KEYWORD2>
+ <KEYWORD2>integer</KEYWORD2>
+ <KEYWORD2>list</KEYWORD2>
+ <KEYWORD2>number</KEYWORD2>
+ <KEYWORD2>pid</KEYWORD2>
+ <KEYWORD2>ports</KEYWORD2>
+ <KEYWORD2>port_close</KEYWORD2>
+ <KEYWORD2>port_info</KEYWORD2>
+ <KEYWORD2>reference</KEYWORD2>
+ <KEYWORD2>record</KEYWORD2>
+
+ <!-- erlang:BIFs -->
+ <KEYWORD2>check_process_code</KEYWORD2>
+ <KEYWORD2>delete_module</KEYWORD2>
+ <KEYWORD2>get_cookie</KEYWORD2>
+ <KEYWORD2>hash</KEYWORD2>
+ <KEYWORD2>math</KEYWORD2>
+ <KEYWORD2>module_loaded</KEYWORD2>
+ <KEYWORD2>preloaded</KEYWORD2>
+ <KEYWORD2>processes</KEYWORD2>
+ <KEYWORD2>purge_module</KEYWORD2>
+ <KEYWORD2>set_cookie</KEYWORD2>
+ <KEYWORD2>set_node</KEYWORD2>
+
+ <!-- math functions -->
+ <KEYWORD2>acos</KEYWORD2>
+ <KEYWORD2>asin</KEYWORD2>
+ <KEYWORD2>atan</KEYWORD2>
+ <KEYWORD2>atan2</KEYWORD2>
+ <KEYWORD2>cos</KEYWORD2>
+ <KEYWORD2>cosh</KEYWORD2>
+ <KEYWORD2>exp</KEYWORD2>
+ <KEYWORD2>log</KEYWORD2>
+ <KEYWORD2>log10</KEYWORD2>
+ <KEYWORD2>pi</KEYWORD2>
+ <KEYWORD2>pow</KEYWORD2>
+ <KEYWORD2>power</KEYWORD2>
+ <KEYWORD2>sin</KEYWORD2>
+ <KEYWORD2>sinh</KEYWORD2>
+ <KEYWORD2>sqrt</KEYWORD2>
+ <KEYWORD2>tan</KEYWORD2>
+ <KEYWORD2>tanh</KEYWORD2>
+
+ <!-- directives -->
+ <KEYWORD3>-behaviour</KEYWORD3>
+ <KEYWORD3>-compile</KEYWORD3>
+ <KEYWORD3>-define</KEYWORD3>
+ <KEYWORD3>-else</KEYWORD3>
+ <KEYWORD3>-endif</KEYWORD3>
+ <KEYWORD3>-export</KEYWORD3>
+ <KEYWORD3>-file</KEYWORD3>
+ <KEYWORD3>-ifdef</KEYWORD3>
+ <KEYWORD3>-ifndef</KEYWORD3>
+ <KEYWORD3>-import</KEYWORD3>
+ <KEYWORD3>-include</KEYWORD3>
+ <KEYWORD3>-include_lib</KEYWORD3>
+ <KEYWORD3>-module</KEYWORD3>
+ <KEYWORD3>-record</KEYWORD3>
+ <KEYWORD3>-undef</KEYWORD3>
+ </KEYWORDS>
+
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/factor.xml b/jEdit/modes/factor.xml
index 12fde0c..2bfff1f 100644
--- a/jEdit/modes/factor.xml
+++ b/jEdit/modes/factor.xml
@@ -1,99 +1,99 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="[{"/>
- <PROPERTY NAME="indentCloseBrackets" VALUE="]}"/>
- <PROPERTY NAME="indentNextLines" VALUE="^(:|M:|C:|PREDICATE:)[^;]*"/>
- <PROPERTY NAME="unindentNextLines" VALUE="^.*;.*$"/>
- <PROPERTY NAME="doubleBracketIndent" VALUE="true"/>
- <PROPERTY NAME="commentStart" VALUE="("/>
- <PROPERTY NAME="commentEnd" VALUE=")"/>
- <PROPERTY NAME="lineComment" VALUE="!"/>
- <PROPERTY NAME="noWordSep" VALUE="+-*=><;.?/'()%,_|"/>
- </PROPS>
- <RULES IGNORE_CASE="FALSE" NO_WORD_SEP="+-*=><;.?/'()%,_"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="-?\d+([./]\d+)?">
- <EOL_SPAN TYPE="COMMENT2" AT_WORD_START="TRUE"
- DELEGATE="COMMENT">#! </EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1" AT_WORD_START="TRUE"
- DELEGATE="COMMENT">! </EOL_SPAN>
-
- <!-- parsing words -->
- <SEQ_REGEXP TYPE="MARKUP"
- HASH_CHAR="\"
- AT_WORD_START="TRUE">\\\s+(\S+)</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="MARKUP"
- HASH_CHAR=":"
- AT_WORD_START="TRUE">:\s+(\S+)</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="MARKUP"
- HASH_CHAR="IN:"
- AT_WORD_START="TRUE">IN:\s+(\S+)</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="MARKUP"
- HASH_CHAR="USE:"
- AT_WORD_START="TRUE">USE:\s+(\S+)</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="LITERAL2"
- HASH_CHAR="CHAR:"
- AT_WORD_START="TRUE">CHAR:\s+(\S+)</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="LITERAL2"
- HASH_CHAR="BIN:"
- AT_WORD_START="TRUE">BIN:\s+(\S+)</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="LITERAL2"
- HASH_CHAR="OCT:"
- AT_WORD_START="TRUE">OCT:\s+(\S+)</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="LITERAL2"
- HASH_CHAR="HEX:"
- AT_WORD_START="TRUE">HEX:\s+(\S+)</SEQ_REGEXP>
-
- <SPAN TYPE="COMMENT3" DELEGATE="STACK_EFFECT" NO_LINE_BREAK="TRUE">
- <BEGIN>( </BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE"
- DELEGATE="LITERAL">
- <BEGIN>SBUF" </BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE"
- DELEGATE="LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="MARKUP" DELEGATE="USING">
- <BEGIN>USING: </BEGIN>
- <END>;</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>>r</KEYWORD1>
- <KEYWORD1>r></KEYWORD1>
-
- <MARKUP>;</MARKUP>
-
- <LITERAL3>t</LITERAL3>
- <LITERAL4>f</LITERAL4>
-
- <COMMENT2>#!</COMMENT2>
- <COMMENT1>!</COMMENT1>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="STACK_EFFECT" DEFAULT="COMMENT4">
- <SEQ TYPE="COMMENT3">--</SEQ>
- </RULES>
-
- <RULES SET="LITERAL" DEFAULT="LITERAL1">
- </RULES>
-
- <RULES SET="COMMENT" DEFAULT="COMMENT1">
- </RULES>
-
- <RULES SET="USING" DEFAULT="LITERAL2">
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="[{"/>
+ <PROPERTY NAME="indentCloseBrackets" VALUE="]}"/>
+ <PROPERTY NAME="indentNextLines" VALUE="^(:|M:|C:|PREDICATE:)[^;]*"/>
+ <PROPERTY NAME="unindentNextLines" VALUE="^.*;.*$"/>
+ <PROPERTY NAME="doubleBracketIndent" VALUE="true"/>
+ <PROPERTY NAME="commentStart" VALUE="("/>
+ <PROPERTY NAME="commentEnd" VALUE=")"/>
+ <PROPERTY NAME="lineComment" VALUE="!"/>
+ <PROPERTY NAME="noWordSep" VALUE="+-*=><;.?/'()%,_|"/>
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" NO_WORD_SEP="+-*=><;.?/'()%,_"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="-?\d+([./]\d+)?">
+ <EOL_SPAN TYPE="COMMENT2" AT_WORD_START="TRUE"
+ DELEGATE="COMMENT">#! </EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1" AT_WORD_START="TRUE"
+ DELEGATE="COMMENT">! </EOL_SPAN>
+
+ <!-- parsing words -->
+ <SEQ_REGEXP TYPE="MARKUP"
+ HASH_CHAR="\"
+ AT_WORD_START="TRUE">\\\s+(\S+)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="MARKUP"
+ HASH_CHAR=":"
+ AT_WORD_START="TRUE">:\s+(\S+)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="MARKUP"
+ HASH_CHAR="IN:"
+ AT_WORD_START="TRUE">IN:\s+(\S+)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="MARKUP"
+ HASH_CHAR="USE:"
+ AT_WORD_START="TRUE">USE:\s+(\S+)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="LITERAL2"
+ HASH_CHAR="CHAR:"
+ AT_WORD_START="TRUE">CHAR:\s+(\S+)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="LITERAL2"
+ HASH_CHAR="BIN:"
+ AT_WORD_START="TRUE">BIN:\s+(\S+)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="LITERAL2"
+ HASH_CHAR="OCT:"
+ AT_WORD_START="TRUE">OCT:\s+(\S+)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="LITERAL2"
+ HASH_CHAR="HEX:"
+ AT_WORD_START="TRUE">HEX:\s+(\S+)</SEQ_REGEXP>
+
+ <SPAN TYPE="COMMENT3" DELEGATE="STACK_EFFECT" NO_LINE_BREAK="TRUE">
+ <BEGIN>( </BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE"
+ DELEGATE="LITERAL">
+ <BEGIN>SBUF" </BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE"
+ DELEGATE="LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="MARKUP" DELEGATE="USING">
+ <BEGIN>USING: </BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>>r</KEYWORD1>
+ <KEYWORD1>r></KEYWORD1>
+
+ <MARKUP>;</MARKUP>
+
+ <LITERAL3>t</LITERAL3>
+ <LITERAL4>f</LITERAL4>
+
+ <COMMENT2>#!</COMMENT2>
+ <COMMENT1>!</COMMENT1>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="STACK_EFFECT" DEFAULT="COMMENT4">
+ <SEQ TYPE="COMMENT3">--</SEQ>
+ </RULES>
+
+ <RULES SET="LITERAL" DEFAULT="LITERAL1">
+ </RULES>
+
+ <RULES SET="COMMENT" DEFAULT="COMMENT1">
+ </RULES>
+
+ <RULES SET="USING" DEFAULT="LITERAL2">
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/fhtml.xml b/jEdit/modes/fhtml.xml
index 23abd4f..759ce57 100644
--- a/jEdit/modes/fhtml.xml
+++ b/jEdit/modes/fhtml.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- fhtml (factor+html) mode -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <PROPERTY NAME="commentStart" VALUE="<%#" />
- <PROPERTY NAME="commentEnd" VALUE="%>" />
- <PROPERTY NAME="tabSize" VALUE="4" />
- <PROPERTY NAME="noTabs" VALUE="true" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
- <SPAN TYPE="MARKUP" DELEGATE="factor::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <IMPORT DELEGATE="html::MAIN" />
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- fhtml (factor+html) mode -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <PROPERTY NAME="commentStart" VALUE="<%#" />
+ <PROPERTY NAME="commentEnd" VALUE="%>" />
+ <PROPERTY NAME="tabSize" VALUE="4" />
+ <PROPERTY NAME="noTabs" VALUE="true" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+ <SPAN TYPE="MARKUP" DELEGATE="factor::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <IMPORT DELEGATE="html::MAIN" />
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/forth.xml b/jEdit/modes/forth.xml
index 450676b..b9d76bd 100644
--- a/jEdit/modes/forth.xml
+++ b/jEdit/modes/forth.xml
@@ -1,153 +1,153 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- RetroForth is one of the nicest Forth implementations, so we
-support that one. You can extend this to your own Forth's vocabulary
-easily. -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentNextLines" VALUE="^:[^;]*" />
- <PROPERTY NAME="unindentNextLines" VALUE="^.*;$" />
- <PROPERTY NAME="commentStart" VALUE="(" />
- <PROPERTY NAME="commentEnd" VALUE=")" />
- <PROPERTY NAME="lineComment" VALUE="|" />
- <PROPERTY NAME="noWordSep" VALUE="+-*=><;.?/'()%,_|$" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- NO_WORD_SEP="+-*=><;.?/'"()%,_$"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="|-?\d+([./]\d+)?">
-
- <EOL_SPAN TYPE="COMMENT1" AT_WORD_START="TRUE">| </EOL_SPAN>
-
- <MARK_FOLLOWING TYPE="DIGIT" AT_WORD_START="TRUE">$</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL3" AT_WORD_START="TRUE">'</MARK_FOLLOWING>
-
- <!-- parsing words -->
- <SEQ_REGEXP TYPE="MARKUP"
- HASH_CHAR=":"
- AT_WORD_START="TRUE">:\s+(\S+)</SEQ_REGEXP>
-
- <SPAN TYPE="COMMENT3" DELEGATE="STACK_EFFECT">
- <BEGIN>( </BEGIN>
- <END>)</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE"
- AT_WORD_START="TRUE">
- <BEGIN>s"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE"
- AT_WORD_START="TRUE">
- <BEGIN>."</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL3" NO_LINE_BREAK="TRUE"
- AT_WORD_START="TRUE">
- <BEGIN>f"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL3" NO_LINE_BREAK="TRUE"
- AT_WORD_START="TRUE">
- <BEGIN>m"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL4" NO_LINE_BREAK="TRUE"
- AT_WORD_START="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <KEYWORDS>
- <MARKUP>;</MARKUP>
- <MARKUP>;;</MARKUP>
- <MARKUP>0;</MARKUP>
-
- <KEYWORD1>swap</KEYWORD1>
- <KEYWORD1>drop</KEYWORD1>
- <KEYWORD1>dup</KEYWORD1>
- <KEYWORD1>nip</KEYWORD1>
- <KEYWORD1>over</KEYWORD1>
- <KEYWORD1>rot</KEYWORD1>
- <KEYWORD1>-rot</KEYWORD1>
- <KEYWORD1>2dup</KEYWORD1>
- <KEYWORD1>2drop</KEYWORD1>
- <KEYWORD1>2over</KEYWORD1>
- <KEYWORD1>2swap</KEYWORD1>
- <KEYWORD1>>r</KEYWORD1>
- <KEYWORD1>r></KEYWORD1>
-
- <KEYWORD2>and</KEYWORD2>
- <KEYWORD2>or</KEYWORD2>
- <KEYWORD2>xor</KEYWORD2>
- <KEYWORD2>>></KEYWORD2>
- <KEYWORD2><<</KEYWORD2>
- <KEYWORD2>not</KEYWORD2>
- <KEYWORD2>+</KEYWORD2>
- <KEYWORD2>*</KEYWORD2>
- <KEYWORD2>negate</KEYWORD2>
- <KEYWORD2>-</KEYWORD2>
- <KEYWORD2>/</KEYWORD2>
- <KEYWORD2>mod</KEYWORD2>
- <KEYWORD2>/mod</KEYWORD2>
- <KEYWORD2>*/</KEYWORD2>
- <KEYWORD2>1+</KEYWORD2>
- <KEYWORD2>1-</KEYWORD2>
- <KEYWORD2>base</KEYWORD2>
- <KEYWORD2>hex</KEYWORD2>
- <KEYWORD2>decimal</KEYWORD2>
- <KEYWORD2>binary</KEYWORD2>
- <KEYWORD2>octal</KEYWORD2>
-
- <KEYWORD3>@</KEYWORD3>
- <KEYWORD3>!</KEYWORD3>
- <KEYWORD3>c@</KEYWORD3>
- <KEYWORD3>c!</KEYWORD3>
- <KEYWORD3>+!</KEYWORD3>
- <KEYWORD3>cell+</KEYWORD3>
- <KEYWORD3>cells</KEYWORD3>
- <KEYWORD3>char+</KEYWORD3>
- <KEYWORD3>chars</KEYWORD3>
-
- <KEYWORD4>[</KEYWORD4>
- <KEYWORD4>]</KEYWORD4>
- <KEYWORD4>create</KEYWORD4>
- <KEYWORD4>does></KEYWORD4>
- <KEYWORD4>variable</KEYWORD4>
- <KEYWORD4>variable,</KEYWORD4>
- <KEYWORD4>literal</KEYWORD4>
- <KEYWORD4>last</KEYWORD4>
- <KEYWORD4>1,</KEYWORD4>
- <KEYWORD4>2,</KEYWORD4>
- <KEYWORD4>3,</KEYWORD4>
- <KEYWORD4>,</KEYWORD4>
- <KEYWORD4>here</KEYWORD4>
- <KEYWORD4>allot</KEYWORD4>
- <KEYWORD4>parse</KEYWORD4>
- <KEYWORD4>find</KEYWORD4>
- <KEYWORD4>compile</KEYWORD4>
-
- <OPERATOR>if</OPERATOR>
- <OPERATOR>=if</OPERATOR>
- <OPERATOR><if</OPERATOR>
- <OPERATOR>>if</OPERATOR>
- <OPERATOR><>if</OPERATOR>
- <OPERATOR>then</OPERATOR>
- <OPERATOR>repeat</OPERATOR>
- <OPERATOR>until</OPERATOR>
-
- <OPERATOR>forth</OPERATOR>
- <OPERATOR>macro</OPERATOR>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="STACK_EFFECT" DEFAULT="COMMENT4">
- <SEQ TYPE="COMMENT3">--</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- RetroForth is one of the nicest Forth implementations, so we
+support that one. You can extend this to your own Forth's vocabulary
+easily. -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentNextLines" VALUE="^:[^;]*" />
+ <PROPERTY NAME="unindentNextLines" VALUE="^.*;$" />
+ <PROPERTY NAME="commentStart" VALUE="(" />
+ <PROPERTY NAME="commentEnd" VALUE=")" />
+ <PROPERTY NAME="lineComment" VALUE="|" />
+ <PROPERTY NAME="noWordSep" VALUE="+-*=><;.?/'()%,_|$" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ NO_WORD_SEP="+-*=><;.?/'"()%,_$"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="|-?\d+([./]\d+)?">
+
+ <EOL_SPAN TYPE="COMMENT1" AT_WORD_START="TRUE">| </EOL_SPAN>
+
+ <MARK_FOLLOWING TYPE="DIGIT" AT_WORD_START="TRUE">$</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL3" AT_WORD_START="TRUE">'</MARK_FOLLOWING>
+
+ <!-- parsing words -->
+ <SEQ_REGEXP TYPE="MARKUP"
+ HASH_CHAR=":"
+ AT_WORD_START="TRUE">:\s+(\S+)</SEQ_REGEXP>
+
+ <SPAN TYPE="COMMENT3" DELEGATE="STACK_EFFECT">
+ <BEGIN>( </BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE"
+ AT_WORD_START="TRUE">
+ <BEGIN>s"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE"
+ AT_WORD_START="TRUE">
+ <BEGIN>."</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL3" NO_LINE_BREAK="TRUE"
+ AT_WORD_START="TRUE">
+ <BEGIN>f"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL3" NO_LINE_BREAK="TRUE"
+ AT_WORD_START="TRUE">
+ <BEGIN>m"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL4" NO_LINE_BREAK="TRUE"
+ AT_WORD_START="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <MARKUP>;</MARKUP>
+ <MARKUP>;;</MARKUP>
+ <MARKUP>0;</MARKUP>
+
+ <KEYWORD1>swap</KEYWORD1>
+ <KEYWORD1>drop</KEYWORD1>
+ <KEYWORD1>dup</KEYWORD1>
+ <KEYWORD1>nip</KEYWORD1>
+ <KEYWORD1>over</KEYWORD1>
+ <KEYWORD1>rot</KEYWORD1>
+ <KEYWORD1>-rot</KEYWORD1>
+ <KEYWORD1>2dup</KEYWORD1>
+ <KEYWORD1>2drop</KEYWORD1>
+ <KEYWORD1>2over</KEYWORD1>
+ <KEYWORD1>2swap</KEYWORD1>
+ <KEYWORD1>>r</KEYWORD1>
+ <KEYWORD1>r></KEYWORD1>
+
+ <KEYWORD2>and</KEYWORD2>
+ <KEYWORD2>or</KEYWORD2>
+ <KEYWORD2>xor</KEYWORD2>
+ <KEYWORD2>>></KEYWORD2>
+ <KEYWORD2><<</KEYWORD2>
+ <KEYWORD2>not</KEYWORD2>
+ <KEYWORD2>+</KEYWORD2>
+ <KEYWORD2>*</KEYWORD2>
+ <KEYWORD2>negate</KEYWORD2>
+ <KEYWORD2>-</KEYWORD2>
+ <KEYWORD2>/</KEYWORD2>
+ <KEYWORD2>mod</KEYWORD2>
+ <KEYWORD2>/mod</KEYWORD2>
+ <KEYWORD2>*/</KEYWORD2>
+ <KEYWORD2>1+</KEYWORD2>
+ <KEYWORD2>1-</KEYWORD2>
+ <KEYWORD2>base</KEYWORD2>
+ <KEYWORD2>hex</KEYWORD2>
+ <KEYWORD2>decimal</KEYWORD2>
+ <KEYWORD2>binary</KEYWORD2>
+ <KEYWORD2>octal</KEYWORD2>
+
+ <KEYWORD3>@</KEYWORD3>
+ <KEYWORD3>!</KEYWORD3>
+ <KEYWORD3>c@</KEYWORD3>
+ <KEYWORD3>c!</KEYWORD3>
+ <KEYWORD3>+!</KEYWORD3>
+ <KEYWORD3>cell+</KEYWORD3>
+ <KEYWORD3>cells</KEYWORD3>
+ <KEYWORD3>char+</KEYWORD3>
+ <KEYWORD3>chars</KEYWORD3>
+
+ <KEYWORD4>[</KEYWORD4>
+ <KEYWORD4>]</KEYWORD4>
+ <KEYWORD4>create</KEYWORD4>
+ <KEYWORD4>does></KEYWORD4>
+ <KEYWORD4>variable</KEYWORD4>
+ <KEYWORD4>variable,</KEYWORD4>
+ <KEYWORD4>literal</KEYWORD4>
+ <KEYWORD4>last</KEYWORD4>
+ <KEYWORD4>1,</KEYWORD4>
+ <KEYWORD4>2,</KEYWORD4>
+ <KEYWORD4>3,</KEYWORD4>
+ <KEYWORD4>,</KEYWORD4>
+ <KEYWORD4>here</KEYWORD4>
+ <KEYWORD4>allot</KEYWORD4>
+ <KEYWORD4>parse</KEYWORD4>
+ <KEYWORD4>find</KEYWORD4>
+ <KEYWORD4>compile</KEYWORD4>
+
+ <OPERATOR>if</OPERATOR>
+ <OPERATOR>=if</OPERATOR>
+ <OPERATOR><if</OPERATOR>
+ <OPERATOR>>if</OPERATOR>
+ <OPERATOR><>if</OPERATOR>
+ <OPERATOR>then</OPERATOR>
+ <OPERATOR>repeat</OPERATOR>
+ <OPERATOR>until</OPERATOR>
+
+ <OPERATOR>forth</OPERATOR>
+ <OPERATOR>macro</OPERATOR>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="STACK_EFFECT" DEFAULT="COMMENT4">
+ <SEQ TYPE="COMMENT3">--</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/fortran.xml b/jEdit/modes/fortran.xml
index 20d8846..2aa2053 100644
--- a/jEdit/modes/fortran.xml
+++ b/jEdit/modes/fortran.xml
@@ -1,252 +1,252 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!-- FORTRAN edit mode
- Version 1.3
- 2007-06-21
- suitable for jEdit 4.2final and jEdit 4.3pre9
--->
-<!-- This is a mode for FORTRAN source files. In general, this supports
-common features of the F90 specification. This may however contain some
-platform or vendor specific keywords (in paticular COMPAQ(Digital) FORTRAN).
--->
-<!-- Suggested catalog file entry:
-
-<MODE NAME="FORTRAN" FILE="FORTRAN.xml"
- FILE_NAME_GLOB="*.{f,for,fort,f77,f90}" />
- -->
-<MODE>
- <PROPS>
- <!-- To get the line comment inserted correctly at line start:
- use the "toggle-line-comment"-action of TextTools plugin
- with the active option "Insert line comments at start of line" -->
- <PROPERTY NAME="lineComment" VALUE="C" />
-
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- <!--<PROPERTY NAME="indentNextLine" VALUE="\s*((if\s*\(.*\)\s*then|else\s*|do\s*)*)" />-->
- <PROPERTY NAME="indentNextLines" VALUE="\s*((if\s*\(.*\)\s*then|else\s*|do\s*)*)" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
-<!-- In fixed form, column 72 is the last column parsed, unless the
-\extend_source option is invoked -->
- <!-- TERMINATE AT_CHAR="72" / -->
-
-<!-- comment either !, C, or * can be used as a comment in the first column
-in either free or fixed form FORTRAN-->
-<EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">C</EOL_SPAN>
-<EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">!</EOL_SPAN>
-<EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">*</EOL_SPAN>
-<EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
-<EOL_SPAN TYPE="COMMENT2" AT_LINE_START="TRUE">D</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
-<!-- Highlighted Operators -->
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">/=</SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">.lt.</SEQ>
- <SEQ TYPE="OPERATOR">.gt.</SEQ>
- <SEQ TYPE="OPERATOR">.eq.</SEQ>
- <SEQ TYPE="OPERATOR">.ne.</SEQ>
- <SEQ TYPE="OPERATOR">.le.</SEQ>
- <SEQ TYPE="OPERATOR">.ge.</SEQ>
- <SEQ TYPE="OPERATOR">.AND.</SEQ>
- <SEQ TYPE="OPERATOR">.OR.</SEQ>
-
-<KEYWORDS>
-<!-- unclassified keywords -->
-<KEYWORD1>INCLUDE</KEYWORD1>
-<!-- Program units and calling them -->
-<KEYWORD1>PROGRAM</KEYWORD1>
-<KEYWORD1>MODULE</KEYWORD1>
-<KEYWORD1>SUBROUTINE</KEYWORD1>
-<KEYWORD1>FUNCTION</KEYWORD1>
-<KEYWORD1>CONTAINS</KEYWORD1>
-<KEYWORD1>USE</KEYWORD1>
-<KEYWORD1>CALL</KEYWORD1>
-<KEYWORD1>RETURN</KEYWORD1>
-<!-- data types, declaration, and allocation keywords -->
-<KEYWORD1>IMPLICIT</KEYWORD1>
-<KEYWORD1>EXPLICIT</KEYWORD1>
-<KEYWORD1>NONE</KEYWORD1>
-<KEYWORD1>DATA</KEYWORD1>
-<KEYWORD1>PARAMETER</KEYWORD1>
-<KEYWORD1>ALLOCATE</KEYWORD1>
-<KEYWORD1>ALLOCATABLE</KEYWORD1>
-<KEYWORD1>ALLOCATED</KEYWORD1>
-<KEYWORD1>DEALLOCATE</KEYWORD1>
-<KEYWORD1>INTEGER</KEYWORD1>
-<KEYWORD1>REAL</KEYWORD1>
-<KEYWORD1>DOUBLE</KEYWORD1>
-<KEYWORD1>PRECISION</KEYWORD1>
-<KEYWORD1>COMPLEX</KEYWORD1>
-<KEYWORD1>LOGICAL</KEYWORD1>
-<KEYWORD1>CHARACTER</KEYWORD1>
-<KEYWORD1>DIMENSION</KEYWORD1>
-<KEYWORD1>KIND</KEYWORD1>
-<!-- FORTRAN Statements -->
-<KEYWORD1>CASE</KEYWORD1>
-<KEYWORD1>SELECT</KEYWORD1>
-<KEYWORD1>DEFAULT</KEYWORD1>
-<KEYWORD1>CONTINUE</KEYWORD1>
-<KEYWORD1>CYCLE</KEYWORD1>
-<KEYWORD1>DO</KEYWORD1>
-<KEYWORD1>WHILE</KEYWORD1>
-<KEYWORD1>ELSE</KEYWORD1>
-<KEYWORD1>IF</KEYWORD1>
-<KEYWORD1>ELSEIF</KEYWORD1>
-<KEYWORD1>THEN</KEYWORD1>
-<KEYWORD1>ELSEWHERE</KEYWORD1>
-<KEYWORD1>END</KEYWORD1>
-<KEYWORD1>ENDIF</KEYWORD1>
-<KEYWORD1>ENDDO</KEYWORD1>
-<KEYWORD1>FORALL</KEYWORD1>
-<KEYWORD1>WHERE</KEYWORD1>
-<KEYWORD1>EXIT</KEYWORD1>
-<KEYWORD1>GOTO</KEYWORD1>
-<KEYWORD1>PAUSE</KEYWORD1>
-<KEYWORD1>STOP</KEYWORD1>
-<!-- i/o keywords -->
-<KEYWORD1>BACKSPACE</KEYWORD1>
-<KEYWORD1>CLOSE</KEYWORD1>
-<KEYWORD1>ENDFILE</KEYWORD1>
-<KEYWORD1>INQUIRE</KEYWORD1>
-<KEYWORD1>OPEN</KEYWORD1>
-<KEYWORD1>PRINT</KEYWORD1>
-<KEYWORD1>READ</KEYWORD1>
-<KEYWORD1>REWIND</KEYWORD1>
-<KEYWORD1>WRITE</KEYWORD1>
-<KEYWORD1>FORMAT</KEYWORD1>
-<!-- Type conversion and utility functions -->
-<KEYWORD1>AIMAG</KEYWORD1>
-<KEYWORD1>AINT</KEYWORD1>
-<KEYWORD1>AMAX0</KEYWORD1>
-<KEYWORD1>AMIN0</KEYWORD1>
-<KEYWORD1>ANINT</KEYWORD1>
-<KEYWORD1>CEILING</KEYWORD1>
-<KEYWORD1>CMPLX</KEYWORD1>
-<KEYWORD1>CONJG</KEYWORD1>
-<KEYWORD1>DBLE</KEYWORD1>
-<KEYWORD1>DCMPLX</KEYWORD1>
-<KEYWORD1>DFLOAT</KEYWORD1>
-<KEYWORD1>DIM</KEYWORD1>
-<KEYWORD1>DPROD</KEYWORD1>
-<KEYWORD1>FLOAT</KEYWORD1>
-<KEYWORD1>FLOOR</KEYWORD1>
-<KEYWORD1>IFIX</KEYWORD1>
-<KEYWORD1>IMAG</KEYWORD1>
-<KEYWORD1>INT</KEYWORD1>
-<KEYWORD1>LOGICAL</KEYWORD1>
-<KEYWORD1>MODULO</KEYWORD1>
-<KEYWORD1>NINT</KEYWORD1>
-<KEYWORD1>REAL</KEYWORD1>
-<KEYWORD1>SIGN</KEYWORD1>
-<KEYWORD1>SNGL</KEYWORD1>
-<KEYWORD1>TRANSFER</KEYWORD1>
-<KEYWORD1>ZEXT</KEYWORD1>
-<!-- More Functions -->
-<KEYWORD1>ABS</KEYWORD1>
-<KEYWORD1>ACOS</KEYWORD1>
-<KEYWORD1>AIMAG</KEYWORD1>
-<KEYWORD1>AINT</KEYWORD1>
-<KEYWORD1>ALOG</KEYWORD1>
-<KEYWORD1>ALOG10</KEYWORD1>
-<KEYWORD1>AMAX0</KEYWORD1>
-<KEYWORD1>AMAX1</KEYWORD1>
-<KEYWORD1>AMIN0</KEYWORD1>
-<KEYWORD1>AMIN1</KEYWORD1>
-<KEYWORD1>AMOD</KEYWORD1>
-<KEYWORD1>ANINT</KEYWORD1>
-<KEYWORD1>ASIN</KEYWORD1>
-<KEYWORD1>ATAN</KEYWORD1>
-<KEYWORD1>ATAN2</KEYWORD1>
-<KEYWORD1>CABS</KEYWORD1>
-<KEYWORD1>CCOS</KEYWORD1>
-<KEYWORD1>CHAR</KEYWORD1>
-<KEYWORD1>CLOG</KEYWORD1>
-<KEYWORD1>CMPLX</KEYWORD1>
-<KEYWORD1>CONJG</KEYWORD1>
-<KEYWORD1>COS</KEYWORD1>
-<KEYWORD1>COSH</KEYWORD1>
-<KEYWORD1>CSIN</KEYWORD1>
-<KEYWORD1>CSQRT</KEYWORD1>
-<KEYWORD1>DABS</KEYWORD1>
-<KEYWORD1>DACOS</KEYWORD1>
-<KEYWORD1>DASIN</KEYWORD1>
-<KEYWORD1>DATAN</KEYWORD1>
-<KEYWORD1>DATAN2</KEYWORD1>
-<KEYWORD1>DBLE</KEYWORD1>
-<KEYWORD1>DCOS</KEYWORD1>
-<KEYWORD1>DCOSH</KEYWORD1>
-<KEYWORD1>DDIM</KEYWORD1>
-<KEYWORD1>DEXP</KEYWORD1>
-<KEYWORD1>DIM</KEYWORD1>
-<KEYWORD1>DINT</KEYWORD1>
-<KEYWORD1>DLOG</KEYWORD1>
-<KEYWORD1>DLOG10</KEYWORD1>
-<KEYWORD1>DMAX1</KEYWORD1>
-<KEYWORD1>DMIN1</KEYWORD1>
-<KEYWORD1>DMOD</KEYWORD1>
-<KEYWORD1>DNINT</KEYWORD1>
-<KEYWORD1>DPROD</KEYWORD1>
-<KEYWORD1>DREAL</KEYWORD1>
-<KEYWORD1>DSIGN</KEYWORD1>
-<KEYWORD1>DSIN</KEYWORD1>
-<KEYWORD1>DSINH</KEYWORD1>
-<KEYWORD1>DSQRT</KEYWORD1>
-<KEYWORD1>DTAN</KEYWORD1>
-<KEYWORD1>DTANH</KEYWORD1>
-<KEYWORD1>EXP</KEYWORD1>
-<KEYWORD1>FLOAT</KEYWORD1>
-<KEYWORD1>IABS</KEYWORD1>
-<KEYWORD1>ICHAR</KEYWORD1>
-<KEYWORD1>IDIM</KEYWORD1>
-<KEYWORD1>IDINT</KEYWORD1>
-<KEYWORD1>IDNINT</KEYWORD1>
-<KEYWORD1>IFIX</KEYWORD1>
-<KEYWORD1>INDEX</KEYWORD1>
-<KEYWORD1>INT</KEYWORD1>
-<KEYWORD1>ISIGN</KEYWORD1>
-<KEYWORD1>LEN</KEYWORD1>
-<KEYWORD1>LGE</KEYWORD1>
-<KEYWORD1>LGT</KEYWORD1>
-<KEYWORD1>LLE</KEYWORD1>
-<KEYWORD1>LLT</KEYWORD1>
-<KEYWORD1>LOG</KEYWORD1>
-<KEYWORD1>LOG10</KEYWORD1>
-<KEYWORD1>MAX</KEYWORD1>
-<KEYWORD1>MAX0</KEYWORD1>
-<KEYWORD1>MAX1</KEYWORD1>
-<KEYWORD1>MIN</KEYWORD1>
-<KEYWORD1>MIN0</KEYWORD1>
-<KEYWORD1>MIN1</KEYWORD1>
-<KEYWORD1>MOD</KEYWORD1>
-<KEYWORD1>NINT</KEYWORD1>
-<KEYWORD1>REAL</KEYWORD1>
-<KEYWORD1>SIGN</KEYWORD1>
-<KEYWORD1>SIN</KEYWORD1>
-<KEYWORD1>SINH</KEYWORD1>
-<KEYWORD1>SNGL</KEYWORD1>
-<KEYWORD1>SQRT</KEYWORD1>
-<KEYWORD1>TAN</KEYWORD1>
-<KEYWORD1>TANH</KEYWORD1>
-<!-- logical values -->
-<KEYWORD1>.false.</KEYWORD1>
-<KEYWORD1>.true.</KEYWORD1>
-
-</KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!-- FORTRAN edit mode
+ Version 1.3
+ 2007-06-21
+ suitable for jEdit 4.2final and jEdit 4.3pre9
+-->
+<!-- This is a mode for FORTRAN source files. In general, this supports
+common features of the F90 specification. This may however contain some
+platform or vendor specific keywords (in paticular COMPAQ(Digital) FORTRAN).
+-->
+<!-- Suggested catalog file entry:
+
+<MODE NAME="FORTRAN" FILE="FORTRAN.xml"
+ FILE_NAME_GLOB="*.{f,for,fort,f77,f90}" />
+ -->
+<MODE>
+ <PROPS>
+ <!-- To get the line comment inserted correctly at line start:
+ use the "toggle-line-comment"-action of TextTools plugin
+ with the active option "Insert line comments at start of line" -->
+ <PROPERTY NAME="lineComment" VALUE="C" />
+
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ <!--<PROPERTY NAME="indentNextLine" VALUE="\s*((if\s*\(.*\)\s*then|else\s*|do\s*)*)" />-->
+ <PROPERTY NAME="indentNextLines" VALUE="\s*((if\s*\(.*\)\s*then|else\s*|do\s*)*)" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+<!-- In fixed form, column 72 is the last column parsed, unless the
+\extend_source option is invoked -->
+ <!-- TERMINATE AT_CHAR="72" / -->
+
+<!-- comment either !, C, or * can be used as a comment in the first column
+in either free or fixed form FORTRAN-->
+<EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">C</EOL_SPAN>
+<EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">!</EOL_SPAN>
+<EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">*</EOL_SPAN>
+<EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
+<EOL_SPAN TYPE="COMMENT2" AT_LINE_START="TRUE">D</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+<!-- Highlighted Operators -->
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">/=</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">.lt.</SEQ>
+ <SEQ TYPE="OPERATOR">.gt.</SEQ>
+ <SEQ TYPE="OPERATOR">.eq.</SEQ>
+ <SEQ TYPE="OPERATOR">.ne.</SEQ>
+ <SEQ TYPE="OPERATOR">.le.</SEQ>
+ <SEQ TYPE="OPERATOR">.ge.</SEQ>
+ <SEQ TYPE="OPERATOR">.AND.</SEQ>
+ <SEQ TYPE="OPERATOR">.OR.</SEQ>
+
+<KEYWORDS>
+<!-- unclassified keywords -->
+<KEYWORD1>INCLUDE</KEYWORD1>
+<!-- Program units and calling them -->
+<KEYWORD1>PROGRAM</KEYWORD1>
+<KEYWORD1>MODULE</KEYWORD1>
+<KEYWORD1>SUBROUTINE</KEYWORD1>
+<KEYWORD1>FUNCTION</KEYWORD1>
+<KEYWORD1>CONTAINS</KEYWORD1>
+<KEYWORD1>USE</KEYWORD1>
+<KEYWORD1>CALL</KEYWORD1>
+<KEYWORD1>RETURN</KEYWORD1>
+<!-- data types, declaration, and allocation keywords -->
+<KEYWORD1>IMPLICIT</KEYWORD1>
+<KEYWORD1>EXPLICIT</KEYWORD1>
+<KEYWORD1>NONE</KEYWORD1>
+<KEYWORD1>DATA</KEYWORD1>
+<KEYWORD1>PARAMETER</KEYWORD1>
+<KEYWORD1>ALLOCATE</KEYWORD1>
+<KEYWORD1>ALLOCATABLE</KEYWORD1>
+<KEYWORD1>ALLOCATED</KEYWORD1>
+<KEYWORD1>DEALLOCATE</KEYWORD1>
+<KEYWORD1>INTEGER</KEYWORD1>
+<KEYWORD1>REAL</KEYWORD1>
+<KEYWORD1>DOUBLE</KEYWORD1>
+<KEYWORD1>PRECISION</KEYWORD1>
+<KEYWORD1>COMPLEX</KEYWORD1>
+<KEYWORD1>LOGICAL</KEYWORD1>
+<KEYWORD1>CHARACTER</KEYWORD1>
+<KEYWORD1>DIMENSION</KEYWORD1>
+<KEYWORD1>KIND</KEYWORD1>
+<!-- FORTRAN Statements -->
+<KEYWORD1>CASE</KEYWORD1>
+<KEYWORD1>SELECT</KEYWORD1>
+<KEYWORD1>DEFAULT</KEYWORD1>
+<KEYWORD1>CONTINUE</KEYWORD1>
+<KEYWORD1>CYCLE</KEYWORD1>
+<KEYWORD1>DO</KEYWORD1>
+<KEYWORD1>WHILE</KEYWORD1>
+<KEYWORD1>ELSE</KEYWORD1>
+<KEYWORD1>IF</KEYWORD1>
+<KEYWORD1>ELSEIF</KEYWORD1>
+<KEYWORD1>THEN</KEYWORD1>
+<KEYWORD1>ELSEWHERE</KEYWORD1>
+<KEYWORD1>END</KEYWORD1>
+<KEYWORD1>ENDIF</KEYWORD1>
+<KEYWORD1>ENDDO</KEYWORD1>
+<KEYWORD1>FORALL</KEYWORD1>
+<KEYWORD1>WHERE</KEYWORD1>
+<KEYWORD1>EXIT</KEYWORD1>
+<KEYWORD1>GOTO</KEYWORD1>
+<KEYWORD1>PAUSE</KEYWORD1>
+<KEYWORD1>STOP</KEYWORD1>
+<!-- i/o keywords -->
+<KEYWORD1>BACKSPACE</KEYWORD1>
+<KEYWORD1>CLOSE</KEYWORD1>
+<KEYWORD1>ENDFILE</KEYWORD1>
+<KEYWORD1>INQUIRE</KEYWORD1>
+<KEYWORD1>OPEN</KEYWORD1>
+<KEYWORD1>PRINT</KEYWORD1>
+<KEYWORD1>READ</KEYWORD1>
+<KEYWORD1>REWIND</KEYWORD1>
+<KEYWORD1>WRITE</KEYWORD1>
+<KEYWORD1>FORMAT</KEYWORD1>
+<!-- Type conversion and utility functions -->
+<KEYWORD1>AIMAG</KEYWORD1>
+<KEYWORD1>AINT</KEYWORD1>
+<KEYWORD1>AMAX0</KEYWORD1>
+<KEYWORD1>AMIN0</KEYWORD1>
+<KEYWORD1>ANINT</KEYWORD1>
+<KEYWORD1>CEILING</KEYWORD1>
+<KEYWORD1>CMPLX</KEYWORD1>
+<KEYWORD1>CONJG</KEYWORD1>
+<KEYWORD1>DBLE</KEYWORD1>
+<KEYWORD1>DCMPLX</KEYWORD1>
+<KEYWORD1>DFLOAT</KEYWORD1>
+<KEYWORD1>DIM</KEYWORD1>
+<KEYWORD1>DPROD</KEYWORD1>
+<KEYWORD1>FLOAT</KEYWORD1>
+<KEYWORD1>FLOOR</KEYWORD1>
+<KEYWORD1>IFIX</KEYWORD1>
+<KEYWORD1>IMAG</KEYWORD1>
+<KEYWORD1>INT</KEYWORD1>
+<KEYWORD1>LOGICAL</KEYWORD1>
+<KEYWORD1>MODULO</KEYWORD1>
+<KEYWORD1>NINT</KEYWORD1>
+<KEYWORD1>REAL</KEYWORD1>
+<KEYWORD1>SIGN</KEYWORD1>
+<KEYWORD1>SNGL</KEYWORD1>
+<KEYWORD1>TRANSFER</KEYWORD1>
+<KEYWORD1>ZEXT</KEYWORD1>
+<!-- More Functions -->
+<KEYWORD1>ABS</KEYWORD1>
+<KEYWORD1>ACOS</KEYWORD1>
+<KEYWORD1>AIMAG</KEYWORD1>
+<KEYWORD1>AINT</KEYWORD1>
+<KEYWORD1>ALOG</KEYWORD1>
+<KEYWORD1>ALOG10</KEYWORD1>
+<KEYWORD1>AMAX0</KEYWORD1>
+<KEYWORD1>AMAX1</KEYWORD1>
+<KEYWORD1>AMIN0</KEYWORD1>
+<KEYWORD1>AMIN1</KEYWORD1>
+<KEYWORD1>AMOD</KEYWORD1>
+<KEYWORD1>ANINT</KEYWORD1>
+<KEYWORD1>ASIN</KEYWORD1>
+<KEYWORD1>ATAN</KEYWORD1>
+<KEYWORD1>ATAN2</KEYWORD1>
+<KEYWORD1>CABS</KEYWORD1>
+<KEYWORD1>CCOS</KEYWORD1>
+<KEYWORD1>CHAR</KEYWORD1>
+<KEYWORD1>CLOG</KEYWORD1>
+<KEYWORD1>CMPLX</KEYWORD1>
+<KEYWORD1>CONJG</KEYWORD1>
+<KEYWORD1>COS</KEYWORD1>
+<KEYWORD1>COSH</KEYWORD1>
+<KEYWORD1>CSIN</KEYWORD1>
+<KEYWORD1>CSQRT</KEYWORD1>
+<KEYWORD1>DABS</KEYWORD1>
+<KEYWORD1>DACOS</KEYWORD1>
+<KEYWORD1>DASIN</KEYWORD1>
+<KEYWORD1>DATAN</KEYWORD1>
+<KEYWORD1>DATAN2</KEYWORD1>
+<KEYWORD1>DBLE</KEYWORD1>
+<KEYWORD1>DCOS</KEYWORD1>
+<KEYWORD1>DCOSH</KEYWORD1>
+<KEYWORD1>DDIM</KEYWORD1>
+<KEYWORD1>DEXP</KEYWORD1>
+<KEYWORD1>DIM</KEYWORD1>
+<KEYWORD1>DINT</KEYWORD1>
+<KEYWORD1>DLOG</KEYWORD1>
+<KEYWORD1>DLOG10</KEYWORD1>
+<KEYWORD1>DMAX1</KEYWORD1>
+<KEYWORD1>DMIN1</KEYWORD1>
+<KEYWORD1>DMOD</KEYWORD1>
+<KEYWORD1>DNINT</KEYWORD1>
+<KEYWORD1>DPROD</KEYWORD1>
+<KEYWORD1>DREAL</KEYWORD1>
+<KEYWORD1>DSIGN</KEYWORD1>
+<KEYWORD1>DSIN</KEYWORD1>
+<KEYWORD1>DSINH</KEYWORD1>
+<KEYWORD1>DSQRT</KEYWORD1>
+<KEYWORD1>DTAN</KEYWORD1>
+<KEYWORD1>DTANH</KEYWORD1>
+<KEYWORD1>EXP</KEYWORD1>
+<KEYWORD1>FLOAT</KEYWORD1>
+<KEYWORD1>IABS</KEYWORD1>
+<KEYWORD1>ICHAR</KEYWORD1>
+<KEYWORD1>IDIM</KEYWORD1>
+<KEYWORD1>IDINT</KEYWORD1>
+<KEYWORD1>IDNINT</KEYWORD1>
+<KEYWORD1>IFIX</KEYWORD1>
+<KEYWORD1>INDEX</KEYWORD1>
+<KEYWORD1>INT</KEYWORD1>
+<KEYWORD1>ISIGN</KEYWORD1>
+<KEYWORD1>LEN</KEYWORD1>
+<KEYWORD1>LGE</KEYWORD1>
+<KEYWORD1>LGT</KEYWORD1>
+<KEYWORD1>LLE</KEYWORD1>
+<KEYWORD1>LLT</KEYWORD1>
+<KEYWORD1>LOG</KEYWORD1>
+<KEYWORD1>LOG10</KEYWORD1>
+<KEYWORD1>MAX</KEYWORD1>
+<KEYWORD1>MAX0</KEYWORD1>
+<KEYWORD1>MAX1</KEYWORD1>
+<KEYWORD1>MIN</KEYWORD1>
+<KEYWORD1>MIN0</KEYWORD1>
+<KEYWORD1>MIN1</KEYWORD1>
+<KEYWORD1>MOD</KEYWORD1>
+<KEYWORD1>NINT</KEYWORD1>
+<KEYWORD1>REAL</KEYWORD1>
+<KEYWORD1>SIGN</KEYWORD1>
+<KEYWORD1>SIN</KEYWORD1>
+<KEYWORD1>SINH</KEYWORD1>
+<KEYWORD1>SNGL</KEYWORD1>
+<KEYWORD1>SQRT</KEYWORD1>
+<KEYWORD1>TAN</KEYWORD1>
+<KEYWORD1>TANH</KEYWORD1>
+<!-- logical values -->
+<KEYWORD1>.false.</KEYWORD1>
+<KEYWORD1>.true.</KEYWORD1>
+
+</KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/foxpro.xml b/jEdit/modes/foxpro.xml
index b49b233..7cab3e5 100644
--- a/jEdit/modes/foxpro.xml
+++ b/jEdit/modes/foxpro.xml
@@ -1,1858 +1,1858 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <!-- Created by Matthew J. Price (Matt at SoWaky.com) -->
- <PROPS>
- <PROPERTY NAME="blockComment" VALUE="&&" />
- <!-- Auto indent -->
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|do\swhile|do\scase|try)\s*\(|else\s*|elseif\s*\|case|catch(|for\s*\(.*\))[^{;]*)" />
-
- <PROPERTY NAME="lineComment" VALUE="&&" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- String Literals -->
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- conditional compilation -->
- <EOL_SPAN TYPE="KEYWORD2">#if</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#else</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#end</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#define</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#include</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#Elif</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#Else</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#Endif</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#If</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#Itsexpression</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#Readclauses</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#Region</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#Section</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#Undef</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#Wname</EOL_SPAN>
-
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="FALSE">&&</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">*</EOL_SPAN>
-
- <!-- Comparison operators -->
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <!-- See in keywords: is -->
-
- <!-- Arithmetic operators -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <!-- See in keywords: mod -->
- <SEQ TYPE="OPERATOR">^</SEQ>
-
- <!-- Concatenation operators -->
- <SEQ TYPE="OPERATOR">+</SEQ>
-
- <!-- Logical operators -->
- <!-- See in keywords: and, or, not, xor, eqv -->
-
- <!-- EOL Continuation -->
- <!-- <SEQ TYPE="NULL">_</SEQ>-->
- <!-- Instruction separator -->
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <KEYWORDS>
- <FUNCTION>Function</FUNCTION>
- <FUNCTION>Procedure</FUNCTION>
- <FUNCTION>EndFunc</FUNCTION>
- <FUNCTION>EndProc</FUNCTION>
-
- <!-- Conditional Statements -->
- <KEYWORD3>if</KEYWORD3>
- <KEYWORD3>then</KEYWORD3>
- <KEYWORD3>else</KEYWORD3>
- <KEYWORD3>elseif</KEYWORD3>
- <KEYWORD3>select</KEYWORD3>
- <KEYWORD3>case</KEYWORD3>
-
- <!-- Loop Statements -->
- <!-- For..Next -->
- <KEYWORD3>for</KEYWORD3>
- <KEYWORD3>to</KEYWORD3>
- <KEYWORD3>step</KEYWORD3>
- <KEYWORD3>next</KEYWORD3>
- <!-- For Each..Next -->
- <KEYWORD3>each</KEYWORD3>
- <KEYWORD3>in</KEYWORD3>
- <!-- Do..Loop -->
- <KEYWORD3>do</KEYWORD3>
- <KEYWORD3>while</KEYWORD3>
- <KEYWORD3>until</KEYWORD3>
- <KEYWORD3>loop</KEYWORD3>
- <!-- While..Wend -->
- <KEYWORD3>wend</KEYWORD3>
-
- <!-- Closing, Exit Statements -->
- <KEYWORD3>exit</KEYWORD3>
- <KEYWORD3>end</KEYWORD3>
- <KEYWORD3>endif</KEYWORD3>
-
- <!-- Methods, Functions, Class, Properties, Variables -->
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>property</KEYWORD3>
- <KEYWORD3>get</KEYWORD3>
- <KEYWORD3>let</KEYWORD3>
- <KEYWORD3>set</KEYWORD3>
-
- <!-- Parameters passing -->
- <KEYWORD3>byval</KEYWORD3>
- <KEYWORD3>byref</KEYWORD3>
-
- <!-- Declaration -->
- <KEYWORD3>const</KEYWORD3>
- <KEYWORD3>dim</KEYWORD3>
- <KEYWORD3>redim</KEYWORD3>
- <KEYWORD3>preserve</KEYWORD3>
- <KEYWORD3>as</KEYWORD3>
-
- <!-- Object Assignement/Instantiation -->
- <KEYWORD3>set</KEYWORD3>
- <KEYWORD3>with</KEYWORD3>
- <KEYWORD3>new</KEYWORD3>
-
- <!-- Visibility -->
- <KEYWORD3>public</KEYWORD3>
- <KEYWORD3>default</KEYWORD3>
- <KEYWORD3>private</KEYWORD3>
-
- <!-- Comments -->
- <KEYWORD3>rem</KEYWORD3>
-
- <!-- Function Call - Dynamic Evaluation -->
- <KEYWORD3>call</KEYWORD3>
- <KEYWORD3>execute</KEYWORD3>
- <KEYWORD3>eval</KEYWORD3>
-
- <!-- Miscellaneous -->
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>error</KEYWORD3>
- <KEYWORD3>goto</KEYWORD3>
- <KEYWORD3>resume</KEYWORD3>
- <KEYWORD3>option</KEYWORD3>
- <KEYWORD3>explicit</KEYWORD3>
- <KEYWORD3>erase</KEYWORD3>
- <KEYWORD3>randomize</KEYWORD3>
-
- <!-- Operators -->
- <!-- Comparison operators -->
- <OPERATOR>is</OPERATOR>
- <!-- Arithmetic operators -->
- <OPERATOR>mod</OPERATOR>
- <!-- Logical operators -->
- <OPERATOR>and</OPERATOR>
- <OPERATOR>or</OPERATOR>
- <OPERATOR>not</OPERATOR>
- <OPERATOR>xor</OPERATOR>
- <OPERATOR>imp</OPERATOR>
- <OPERATOR>?</OPERATOR>
-
- <!-- Datatypes Constants/Literals -->
- <KEYWORD3>false</KEYWORD3>
- <KEYWORD3>true</KEYWORD3>
- <KEYWORD3>empty</KEYWORD3>
- <KEYWORD3>nothing</KEYWORD3>
- <KEYWORD3>null</KEYWORD3>
-
- <!-- FoxPro's Methods -->
- <KEYWORD3>Activate</KEYWORD3>
- <KEYWORD3>ActivateCell</KEYWORD3>
- <KEYWORD3>AddColumn</KEYWORD3>
- <KEYWORD3>AddItem</KEYWORD3>
- <KEYWORD3>AddListItem</KEYWORD3>
- <KEYWORD3>AddObject</KEYWORD3>
- <KEYWORD3>AfterCloseTables</KEYWORD3>
- <KEYWORD3>AfterDock</KEYWORD3>
- <KEYWORD3>AfterRowColChange</KEYWORD3>
- <KEYWORD3>BeforeDock</KEYWORD3>
- <KEYWORD3>BeforeOpenTables</KEYWORD3>
- <KEYWORD3>BeforeRowColChange</KEYWORD3>
- <KEYWORD3>Box</KEYWORD3>
- <KEYWORD3>Circle</KEYWORD3>
- <KEYWORD3>Clear</KEYWORD3>
- <KEYWORD3>Click</KEYWORD3>
- <KEYWORD3>CloneObject</KEYWORD3>
- <KEYWORD3>CloseEditor</KEYWORD3>
- <KEYWORD3>CloseTables</KEYWORD3>
- <KEYWORD3>Cls</KEYWORD3>
- <KEYWORD3>DblClick</KEYWORD3>
- <KEYWORD3>Deactivate</KEYWORD3>
- <KEYWORD3>Delete</KEYWORD3>
- <KEYWORD3>DeleteColumn</KEYWORD3>
- <KEYWORD3>Deleted</KEYWORD3>
- <KEYWORD3>Destroy</KEYWORD3>
- <KEYWORD3>Dock</KEYWORD3>
- <KEYWORD3>DoScroll</KEYWORD3>
- <KEYWORD3>DoVerb</KEYWORD3>
- <KEYWORD3>DownClick</KEYWORD3>
- <KEYWORD3>Drag</KEYWORD3>
- <KEYWORD3>DragDrop</KEYWORD3>
- <KEYWORD3>DragOver</KEYWORD3>
- <KEYWORD3>Draw</KEYWORD3>
- <KEYWORD3>DropDown</KEYWORD3>
- <KEYWORD3>Error</KEYWORD3>
- <KEYWORD3>ErrorMessage</KEYWORD3>
- <KEYWORD3>FormatChange</KEYWORD3>
- <KEYWORD3>GotFocus</KEYWORD3>
- <KEYWORD3>Hide</KEYWORD3>
- <KEYWORD3>IndexToItemId</KEYWORD3>
- <KEYWORD3>Init</KEYWORD3>
- <KEYWORD3>InteractiveChange</KEYWORD3>
- <KEYWORD3>ItemIdToIndex</KEYWORD3>
- <KEYWORD3>KeyPress</KEYWORD3>
- <KEYWORD3>Line</KEYWORD3>
- <KEYWORD3>Load</KEYWORD3>
- <KEYWORD3>LostFocus</KEYWORD3>
- <KEYWORD3>Message</KEYWORD3>
- <KEYWORD3>MouseDown</KEYWORD3>
- <KEYWORD3>MouseMove</KEYWORD3>
- <KEYWORD3>MouseUp</KEYWORD3>
- <KEYWORD3>Move</KEYWORD3>
- <KEYWORD3>Moved</KEYWORD3>
- <KEYWORD3>OpenEditor</KEYWORD3>
- <KEYWORD3>OpenTables</KEYWORD3>
- <KEYWORD3>Paint</KEYWORD3>
- <KEYWORD3>Point</KEYWORD3>
- <KEYWORD3>Print</KEYWORD3>
- <KEYWORD3>ProgrammaticChange</KEYWORD3>
- <KEYWORD3>PSet</KEYWORD3>
- <KEYWORD3>QueryUnload</KEYWORD3>
- <KEYWORD3>RangeHigh</KEYWORD3>
- <KEYWORD3>RangeLow</KEYWORD3>
- <KEYWORD3>ReadActivate</KEYWORD3>
- <KEYWORD3>ReadDeactivate</KEYWORD3>
- <KEYWORD3>ReadExpression</KEYWORD3>
- <KEYWORD3>ReadMethod</KEYWORD3>
- <KEYWORD3>ReadShow</KEYWORD3>
- <KEYWORD3>ReadValid</KEYWORD3>
- <KEYWORD3>ReadWhen</KEYWORD3>
- <KEYWORD3>Refresh</KEYWORD3>
- <KEYWORD3>Release</KEYWORD3>
- <KEYWORD3>RemoveItem</KEYWORD3>
- <KEYWORD3>RemoveListItem</KEYWORD3>
- <KEYWORD3>RemoveObject</KEYWORD3>
- <KEYWORD3>Requery</KEYWORD3>
- <KEYWORD3>Reset</KEYWORD3>
- <KEYWORD3>Resize</KEYWORD3>
- <KEYWORD3>RightClick</KEYWORD3>
- <KEYWORD3>SaveAs</KEYWORD3>
- <KEYWORD3>SaveAsClass</KEYWORD3>
- <KEYWORD3>Scrolled</KEYWORD3>
- <KEYWORD3>SetAll</KEYWORD3>
- <KEYWORD3>SetFocus</KEYWORD3>
- <KEYWORD3>Show</KEYWORD3>
- <KEYWORD3>TextHeight</KEYWORD3>
- <KEYWORD3>TextWidth</KEYWORD3>
- <KEYWORD3>Timer</KEYWORD3>
- <KEYWORD3>UIEnable</KEYWORD3>
- <KEYWORD3>UnDock</KEYWORD3>
- <KEYWORD3>Unload</KEYWORD3>
- <KEYWORD3>UpClick</KEYWORD3>
- <KEYWORD3>Valid</KEYWORD3>
- <KEYWORD3>When</KEYWORD3>
- <KEYWORD3>WriteExpression</KEYWORD3>
- <KEYWORD3>WriteMethod</KEYWORD3>
- <KEYWORD3>ZOrder</KEYWORD3>
- <KEYWORD3>DataToClip</KEYWORD3>
- <KEYWORD3>DoCmd</KEYWORD3>
- <KEYWORD3>MiddleClick</KEYWORD3>
- <KEYWORD3>MouseWheel</KEYWORD3>
- <KEYWORD3>RequestData</KEYWORD3>
- <KEYWORD3>SetVar</KEYWORD3>
- <KEYWORD3>ShowWhatsThis</KEYWORD3>
- <KEYWORD3>WhatsThisMode</KEYWORD3>
- <KEYWORD3>AddProperty</KEYWORD3>
- <KEYWORD3>NewObject</KEYWORD3>
- <KEYWORD3>CommandTargetExec</KEYWORD3>
- <KEYWORD3>CommandTargetQueryStas</KEYWORD3>
- <KEYWORD3>ContainerRelease</KEYWORD3>
- <KEYWORD3>EnterFocus</KEYWORD3>
- <KEYWORD3>ExitFocus</KEYWORD3>
- <KEYWORD3>HideDoc</KEYWORD3>
- <KEYWORD3>Run</KEYWORD3>
- <KEYWORD3>ShowDoc</KEYWORD3>
- <KEYWORD3>ClearData</KEYWORD3>
- <KEYWORD3>GetData</KEYWORD3>
- <KEYWORD3>GetFormat</KEYWORD3>
- <KEYWORD3>SetData</KEYWORD3>
- <KEYWORD3>SetFormat</KEYWORD3>
- <KEYWORD3>OLECompleteDrag</KEYWORD3>
- <KEYWORD3>OLEGiveFeedback</KEYWORD3>
- <KEYWORD3>OLESetData</KEYWORD3>
- <KEYWORD3>OLEStartDrag</KEYWORD3>
- <KEYWORD3>OLEDrag</KEYWORD3>
- <KEYWORD3>OLEDragDrop</KEYWORD3>
- <KEYWORD3>OLEDragOver</KEYWORD3>
- <KEYWORD3>SetMain</KEYWORD3>
- <KEYWORD3>AfterBuild</KEYWORD3>
- <KEYWORD3>BeforeBuild</KEYWORD3>
- <KEYWORD3>QueryAddFile</KEYWORD3>
- <KEYWORD3>QueryModifyFile</KEYWORD3>
- <KEYWORD3>QueryRemoveFile</KEYWORD3>
- <KEYWORD3>QueryRunFile</KEYWORD3>
- <KEYWORD3>Add</KEYWORD3>
- <KEYWORD3>AddToSCC</KEYWORD3>
- <KEYWORD3>CheckIn</KEYWORD3>
- <KEYWORD3>CheckOut</KEYWORD3>
- <KEYWORD3>GetLatestVersion</KEYWORD3>
- <KEYWORD3>RemoveFromSCC</KEYWORD3>
- <KEYWORD3>UndoCheckOut</KEYWORD3>
- <KEYWORD3>Modify</KEYWORD3>
-
- <!-- FoxPro's Properties -->
- <KEYWORD3>Accelerate</KEYWORD3>
- <KEYWORD3>ActiveColumn</KEYWORD3>
- <KEYWORD3>ActiveControl</KEYWORD3>
- <KEYWORD3>ActiveForm</KEYWORD3>
- <KEYWORD3>ActiveObjectId</KEYWORD3>
- <KEYWORD3>ActivePage</KEYWORD3>
- <KEYWORD3>ActiveRow</KEYWORD3>
- <KEYWORD3>Alias</KEYWORD3>
- <KEYWORD3>Alignment</KEYWORD3>
- <KEYWORD3>AllowResize</KEYWORD3>
- <KEYWORD3>AllowTabs</KEYWORD3>
- <KEYWORD3>AlwaysOnTop</KEYWORD3>
- <KEYWORD3>ATGetColors</KEYWORD3>
- <KEYWORD3>ATListColors</KEYWORD3>
- <KEYWORD3>AutoActivate</KEYWORD3>
- <KEYWORD3>AutoCenter</KEYWORD3>
- <KEYWORD3>AutoCloseTables</KEYWORD3>
- <KEYWORD3>AutoOpenTables</KEYWORD3>
- <KEYWORD3>AutoRelease</KEYWORD3>
- <KEYWORD3>AutoSize</KEYWORD3>
- <KEYWORD3>AvailNum</KEYWORD3>
- <KEYWORD3>BackColor</KEYWORD3>
- <KEYWORD3>BackStyle</KEYWORD3>
- <KEYWORD3>BaseClass</KEYWORD3>
- <KEYWORD3>BorderColor</KEYWORD3>
- <KEYWORD3>BorderStyle</KEYWORD3>
- <KEYWORD3>BorderWidth</KEYWORD3>
- <KEYWORD3>Bound</KEYWORD3>
- <KEYWORD3>BoundColumn</KEYWORD3>
- <KEYWORD3>BrowseAlignment</KEYWORD3>
- <KEYWORD3>BrowseCellMarg</KEYWORD3>
- <KEYWORD3>BrowseDestWidth</KEYWORD3>
- <KEYWORD3>BufferMode</KEYWORD3>
- <KEYWORD3>BufferModeOverride</KEYWORD3>
- <KEYWORD3>ButtonCount</KEYWORD3>
- <KEYWORD3>ButtonIndex</KEYWORD3>
- <KEYWORD3>Buttons</KEYWORD3>
- <KEYWORD3>CanAccelerate</KEYWORD3>
- <KEYWORD3>Cancel</KEYWORD3>
- <KEYWORD3>CanGetFocus</KEYWORD3>
- <KEYWORD3>CanLoseFocus</KEYWORD3>
- <KEYWORD3>Caption</KEYWORD3>
- <KEYWORD3>ChildAlias</KEYWORD3>
- <KEYWORD3>ChildOrder</KEYWORD3>
- <KEYWORD3>Class</KEYWORD3>
- <KEYWORD3>ClassLibrary</KEYWORD3>
- <KEYWORD3>ClipControls</KEYWORD3>
- <KEYWORD3>ClipRect</KEYWORD3>
- <KEYWORD3>Closable</KEYWORD3>
- <KEYWORD3>ColorScheme</KEYWORD3>
- <KEYWORD3>ColorSource</KEYWORD3>
- <KEYWORD3>ColumnCount</KEYWORD3>
- <KEYWORD3>ColumnHeaders</KEYWORD3>
- <KEYWORD3>ColumnLines</KEYWORD3>
- <KEYWORD3>ColumnOrder</KEYWORD3>
- <KEYWORD3>Columns</KEYWORD3>
- <KEYWORD3>ColumnWidths</KEYWORD3>
- <KEYWORD3>Comment</KEYWORD3>
- <KEYWORD3>ControlBox</KEYWORD3>
- <KEYWORD3>ControlCount</KEYWORD3>
- <KEYWORD3>ControlIndex</KEYWORD3>
- <KEYWORD3>Controls</KEYWORD3>
- <KEYWORD3>ControlSource</KEYWORD3>
- <KEYWORD3>CurrentControl</KEYWORD3>
- <KEYWORD3>CurrentX</KEYWORD3>
- <KEYWORD3>CurrentY</KEYWORD3>
- <KEYWORD3>CursorSource</KEYWORD3>
- <KEYWORD3>Curvature</KEYWORD3>
- <KEYWORD3>Database</KEYWORD3>
- <KEYWORD3>DataSession</KEYWORD3>
- <KEYWORD3>DataSessionId</KEYWORD3>
- <KEYWORD3>DataSourceObj</KEYWORD3>
- <KEYWORD3>DataType</KEYWORD3>
- <KEYWORD3>Default</KEYWORD3>
- <KEYWORD3>DefButton</KEYWORD3>
- <KEYWORD3>DefButtonOrig</KEYWORD3>
- <KEYWORD3>DefHeight</KEYWORD3>
- <KEYWORD3>DefineWindows</KEYWORD3>
- <KEYWORD3>DefLeft</KEYWORD3>
- <KEYWORD3>DefTop</KEYWORD3>
- <KEYWORD3>DefWidth</KEYWORD3>
- <KEYWORD3>DeleteMark</KEYWORD3>
- <KEYWORD3>Desktop</KEYWORD3>
- <KEYWORD3>Dirty</KEYWORD3>
- <KEYWORD3>DisabledBackColor</KEYWORD3>
- <KEYWORD3>DisabledByEOF</KEYWORD3>
- <KEYWORD3>DisabledForeColor</KEYWORD3>
- <KEYWORD3>DisabledItemBackColor</KEYWORD3>
- <KEYWORD3>DisabledItemForeColor</KEYWORD3>
- <KEYWORD3>DisabledPicture</KEYWORD3>
- <KEYWORD3>DisplayValue</KEYWORD3>
- <KEYWORD3>DispPageHeight</KEYWORD3>
- <KEYWORD3>DispPageWidth</KEYWORD3>
- <KEYWORD3>Docked</KEYWORD3>
- <KEYWORD3>DockPosition</KEYWORD3>
- <KEYWORD3>DoCreate</KEYWORD3>
- <KEYWORD3>DocumentFile</KEYWORD3>
- <KEYWORD3>DownPicture</KEYWORD3>
- <KEYWORD3>DragIcon</KEYWORD3>
- <KEYWORD3>DragMode</KEYWORD3>
- <KEYWORD3>DragState</KEYWORD3>
- <KEYWORD3>DrawMode</KEYWORD3>
- <KEYWORD3>DrawStyle</KEYWORD3>
- <KEYWORD3>DrawWidth</KEYWORD3>
- <KEYWORD3>DynamicAlignment</KEYWORD3>
- <KEYWORD3>DynamicBackColor</KEYWORD3>
- <KEYWORD3>DynamicCurrentControl</KEYWORD3>
- <KEYWORD3>DynamicFontBold</KEYWORD3>
- <KEYWORD3>DynamicFontItalic</KEYWORD3>
- <KEYWORD3>DynamicFontName</KEYWORD3>
- <KEYWORD3>DynamicFontOutline</KEYWORD3>
- <KEYWORD3>DynamicFontShadow</KEYWORD3>
- <KEYWORD3>DynamicFontSize</KEYWORD3>
- <KEYWORD3>DynamicFontStrikethru</KEYWORD3>
- <KEYWORD3>DynamicFontUnderline</KEYWORD3>
- <KEYWORD3>DynamicForeColor</KEYWORD3>
- <KEYWORD3>EditFlags</KEYWORD3>
- <KEYWORD3>Enabled</KEYWORD3>
- <KEYWORD3>EnabledByReadLock</KEYWORD3>
- <KEYWORD3>EnvLevel</KEYWORD3>
- <KEYWORD3>ErasePage</KEYWORD3>
- <KEYWORD3>FillColor</KEYWORD3>
- <KEYWORD3>FillStyle</KEYWORD3>
- <KEYWORD3>Filter</KEYWORD3>
- <KEYWORD3>FirstElement</KEYWORD3>
- <KEYWORD3>FontBold</KEYWORD3>
- <KEYWORD3>FontItalic</KEYWORD3>
- <KEYWORD3>FontName</KEYWORD3>
- <KEYWORD3>FontOutline</KEYWORD3>
- <KEYWORD3>FontShadow</KEYWORD3>
- <KEYWORD3>FontSize</KEYWORD3>
- <KEYWORD3>FontStrikethru</KEYWORD3>
- <KEYWORD3>FontUnderline</KEYWORD3>
- <KEYWORD3>ForceFocus</KEYWORD3>
- <KEYWORD3>ForeColor</KEYWORD3>
- <KEYWORD3>Format</KEYWORD3>
- <KEYWORD3>FormCount</KEYWORD3>
- <KEYWORD3>FormIndex</KEYWORD3>
- <KEYWORD3>FormPageCount</KEYWORD3>
- <KEYWORD3>FormPageIndex</KEYWORD3>
- <KEYWORD3>Forms</KEYWORD3>
- <KEYWORD3>FoxFont</KEYWORD3>
- <KEYWORD3>GoFirst</KEYWORD3>
- <KEYWORD3>GoLast</KEYWORD3>
- <KEYWORD3>GridLineColor</KEYWORD3>
- <KEYWORD3>GridLines</KEYWORD3>
- <KEYWORD3>GridLineWidth</KEYWORD3>
- <KEYWORD3>HalfHeightCaption</KEYWORD3>
- <KEYWORD3>HasClip</KEYWORD3>
- <KEYWORD3>HeaderGap</KEYWORD3>
- <KEYWORD3>HeaderHeight</KEYWORD3>
- <KEYWORD3>Height</KEYWORD3>
- <KEYWORD3>HelpContextID</KEYWORD3>
- <KEYWORD3>HideSelection</KEYWORD3>
- <KEYWORD3>Highlight</KEYWORD3>
- <KEYWORD3>HostName</KEYWORD3>
- <KEYWORD3>HotKey</KEYWORD3>
- <KEYWORD3>HPROJ</KEYWORD3>
- <KEYWORD3>HWnd</KEYWORD3>
- <KEYWORD3>Icon</KEYWORD3>
- <KEYWORD3>IgnoreInsert</KEYWORD3>
- <KEYWORD3>Increment</KEYWORD3>
- <KEYWORD3>IncrementalSearch</KEYWORD3>
- <KEYWORD3>InitialSelectedAlias</KEYWORD3>
- <KEYWORD3>InputMask</KEYWORD3>
- <KEYWORD3>InResize</KEYWORD3>
- <KEYWORD3>Interval</KEYWORD3>
- <KEYWORD3>ItemBackColor</KEYWORD3>
- <KEYWORD3>ItemData</KEYWORD3>
- <KEYWORD3>ItemForeColor</KEYWORD3>
- <KEYWORD3>ItemIDData</KEYWORD3>
- <KEYWORD3>JustReadLocked</KEYWORD3>
- <KEYWORD3>KeyboardHighValue</KEYWORD3>
- <KEYWORD3>KeyboardLowValue</KEYWORD3>
- <KEYWORD3>KeyPreview</KEYWORD3>
- <KEYWORD3>Left</KEYWORD3>
- <KEYWORD3>LeftColumn</KEYWORD3>
- <KEYWORD3>LineSlant</KEYWORD3>
- <KEYWORD3>LinkMaster</KEYWORD3>
- <KEYWORD3>List</KEYWORD3>
- <KEYWORD3>ListCount</KEYWORD3>
- <KEYWORD3>ListIndex</KEYWORD3>
- <KEYWORD3>ListItem</KEYWORD3>
- <KEYWORD3>ListItemId</KEYWORD3>
- <KEYWORD3>LockDataSource</KEYWORD3>
- <KEYWORD3>LockScreen</KEYWORD3>
- <KEYWORD3>Margin</KEYWORD3>
- <KEYWORD3>MaxButton</KEYWORD3>
- <KEYWORD3>MaxHeight</KEYWORD3>
- <KEYWORD3>MaxLeft</KEYWORD3>
- <KEYWORD3>MaxLength</KEYWORD3>
- <KEYWORD3>MaxTop</KEYWORD3>
- <KEYWORD3>MaxWidth</KEYWORD3>
- <KEYWORD3>MDIForm</KEYWORD3>
- <KEYWORD3>MemoWindow</KEYWORD3>
- <KEYWORD3>MinButton</KEYWORD3>
- <KEYWORD3>MinHeight</KEYWORD3>
- <KEYWORD3>MinWidth</KEYWORD3>
- <KEYWORD3>MousePointer</KEYWORD3>
- <KEYWORD3>Movable</KEYWORD3>
- <KEYWORD3>MoverBars</KEYWORD3>
- <KEYWORD3>MultiSelect</KEYWORD3>
- <KEYWORD3>Name</KEYWORD3>
- <KEYWORD3>NapTime</KEYWORD3>
- <KEYWORD3>NewIndex</KEYWORD3>
- <KEYWORD3>NewItemId</KEYWORD3>
- <KEYWORD3>NoDataOnLoad</KEYWORD3>
- <KEYWORD3>NoDefine</KEYWORD3>
- <KEYWORD3>NotifyContainer</KEYWORD3>
- <KEYWORD3>NumberOfElements</KEYWORD3>
- <KEYWORD3>OleClass</KEYWORD3>
- <KEYWORD3>OleClassId</KEYWORD3>
- <KEYWORD3>OleControlContainer</KEYWORD3>
- <KEYWORD3>OleIDispatchIncoming</KEYWORD3>
- <KEYWORD3>OleIDispatchOutgoing</KEYWORD3>
- <KEYWORD3>OleIDispInValue</KEYWORD3>
- <KEYWORD3>OleIDispOutValue</KEYWORD3>
- <KEYWORD3>OLETypeAllowed</KEYWORD3>
- <KEYWORD3>OneToMany</KEYWORD3>
- <KEYWORD3>OnResize</KEYWORD3>
- <KEYWORD3>OpenWindow</KEYWORD3>
- <KEYWORD3>PageCount</KEYWORD3>
- <KEYWORD3>PageHeight</KEYWORD3>
- <KEYWORD3>PageOrder</KEYWORD3>
- <KEYWORD3>Pages</KEYWORD3>
- <KEYWORD3>PageWidth</KEYWORD3>
- <KEYWORD3>Panel</KEYWORD3>
- <KEYWORD3>PanelLink</KEYWORD3>
- <KEYWORD3>Parent</KEYWORD3>
- <KEYWORD3>ParentAlias</KEYWORD3>
- <KEYWORD3>ParentClass</KEYWORD3>
- <KEYWORD3>Partition</KEYWORD3>
- <KEYWORD3>PasswordChar</KEYWORD3>
- <KEYWORD3>Picture</KEYWORD3>
- <KEYWORD3>ReadColors</KEYWORD3>
- <KEYWORD3>ReadCycle</KEYWORD3>
- <KEYWORD3>ReadFiller</KEYWORD3>
- <KEYWORD3>ReadLock</KEYWORD3>
- <KEYWORD3>ReadMouse</KEYWORD3>
- <KEYWORD3>ReadOnly</KEYWORD3>
- <KEYWORD3>ReadSave</KEYWORD3>
- <KEYWORD3>ReadSize</KEYWORD3>
- <KEYWORD3>ReadTimeout</KEYWORD3>
- <KEYWORD3>RecordMark</KEYWORD3>
- <KEYWORD3>RecordSource</KEYWORD3>
- <KEYWORD3>RecordSourceType</KEYWORD3>
- <KEYWORD3>Rect</KEYWORD3>
- <KEYWORD3>RelationalExpr</KEYWORD3>
- <KEYWORD3>RelativeColumn</KEYWORD3>
- <KEYWORD3>RelativeRow</KEYWORD3>
- <KEYWORD3>ReleaseErase</KEYWORD3>
- <KEYWORD3>ReleaseType</KEYWORD3>
- <KEYWORD3>ReleaseWindows</KEYWORD3>
- <KEYWORD3>Resizable</KEYWORD3>
- <KEYWORD3>RowHeight</KEYWORD3>
- <KEYWORD3>RowSource</KEYWORD3>
- <KEYWORD3>RowSourceType</KEYWORD3>
- <KEYWORD3>ScaleMode</KEYWORD3>
- <KEYWORD3>ScrollBars</KEYWORD3>
- <KEYWORD3>Selected</KEYWORD3>
- <KEYWORD3>SelectedBackColor</KEYWORD3>
- <KEYWORD3>SelectedForeColor</KEYWORD3>
- <KEYWORD3>SelectedID</KEYWORD3>
- <KEYWORD3>SelectedItemBackColor</KEYWORD3>
- <KEYWORD3>SelectedItemForeColor</KEYWORD3>
- <KEYWORD3>SelectOnEntry</KEYWORD3>
- <KEYWORD3>SelfEdit</KEYWORD3>
- <KEYWORD3>SelLength</KEYWORD3>
- <KEYWORD3>SelStart</KEYWORD3>
- <KEYWORD3>SelText</KEYWORD3>
- <KEYWORD3>ShowTips</KEYWORD3>
- <KEYWORD3>Sizable</KEYWORD3>
- <KEYWORD3>Skip</KEYWORD3>
- <KEYWORD3>SkipForm</KEYWORD3>
- <KEYWORD3>Sorted</KEYWORD3>
- <KEYWORD3>SourceType</KEYWORD3>
- <KEYWORD3>Sparse</KEYWORD3>
- <KEYWORD3>SpecialEffect</KEYWORD3>
- <KEYWORD3>SpinnerHighValue</KEYWORD3>
- <KEYWORD3>SpinnerLowValue</KEYWORD3>
- <KEYWORD3>StatusBarText</KEYWORD3>
- <KEYWORD3>Stretch</KEYWORD3>
- <KEYWORD3>Style</KEYWORD3>
- <KEYWORD3>SystemRefCount</KEYWORD3>
- <KEYWORD3>Tabhit</KEYWORD3>
- <KEYWORD3>TabIndex</KEYWORD3>
- <KEYWORD3>Tabs</KEYWORD3>
- <KEYWORD3>TabStop</KEYWORD3>
- <KEYWORD3>TabStretch</KEYWORD3>
- <KEYWORD3>Tag</KEYWORD3>
- <KEYWORD3>TerminateRead</KEYWORD3>
- <KEYWORD3>ToolTipText</KEYWORD3>
- <KEYWORD3>Top</KEYWORD3>
- <KEYWORD3>TopIndex</KEYWORD3>
- <KEYWORD3>TopItemId</KEYWORD3>
- <KEYWORD3>UnlockDataSource</KEYWORD3>
- <KEYWORD3>Value</KEYWORD3>
- <KEYWORD3>ValueDirty</KEYWORD3>
- <KEYWORD3>View</KEYWORD3>
- <KEYWORD3>Visible</KEYWORD3>
- <KEYWORD3>WasActive</KEYWORD3>
- <KEYWORD3>WasOpen</KEYWORD3>
- <KEYWORD3>Width</KEYWORD3>
- <KEYWORD3>WindowList</KEYWORD3>
- <KEYWORD3>WindowNTIList</KEYWORD3>
- <KEYWORD3>WindowState</KEYWORD3>
- <KEYWORD3>WindowType</KEYWORD3>
- <KEYWORD3>WordWrap</KEYWORD3>
- <KEYWORD3>ZOrderSet</KEYWORD3>
- <KEYWORD3>AllowAddNew</KEYWORD3>
- <KEYWORD3>AllowHeaderSizing</KEYWORD3>
- <KEYWORD3>AllowRowSizing</KEYWORD3>
- <KEYWORD3>Application</KEYWORD3>
- <KEYWORD3>AutoVerbMenu</KEYWORD3>
- <KEYWORD3>AutoYield</KEYWORD3>
- <KEYWORD3>BoundTo</KEYWORD3>
- <KEYWORD3>DateFormat</KEYWORD3>
- <KEYWORD3>DateMark</KEYWORD3>
- <KEYWORD3>DefaultFilePath</KEYWORD3>
- <KEYWORD3>FullName</KEYWORD3>
- <KEYWORD3>Hours</KEYWORD3>
- <KEYWORD3>IMEMode</KEYWORD3>
- <KEYWORD3>IntegralHeight</KEYWORD3>
- <KEYWORD3>ItemTips</KEYWORD3>
- <KEYWORD3>MouseIcon</KEYWORD3>
- <KEYWORD3>NullDisplay</KEYWORD3>
- <KEYWORD3>OLERequestPendingTimou</KEYWORD3>
- <KEYWORD3>OLEServerBusyRaiseErro</KEYWORD3>
- <KEYWORD3>OLEServerBusyTimout</KEYWORD3>
- <KEYWORD3>OpenViews</KEYWORD3>
- <KEYWORD3>RightToLeft</KEYWORD3>
- <KEYWORD3>SDIForm</KEYWORD3>
- <KEYWORD3>ShowWindow</KEYWORD3>
- <KEYWORD3>SplitBar</KEYWORD3>
- <KEYWORD3>StrictDateEntry</KEYWORD3>
- <KEYWORD3>TabStyle</KEYWORD3>
- <KEYWORD3>WhatsThisButton</KEYWORD3>
- <KEYWORD3>WhatsThisHelp</KEYWORD3>
- <KEYWORD3>WhatsThisHelpID</KEYWORD3>
- <KEYWORD3>DisplayCount</KEYWORD3>
- <KEYWORD3>ContinuousScroll</KEYWORD3>
- <KEYWORD3>HscrollSmallChange</KEYWORD3>
- <KEYWORD3>TitleBar</KEYWORD3>
- <KEYWORD3>VscrollSmallChange</KEYWORD3>
- <KEYWORD3>ViewPortTop</KEYWORD3>
- <KEYWORD3>ViewPortLeft</KEYWORD3>
- <KEYWORD3>ViewPortHeight</KEYWORD3>
- <KEYWORD3>ViewPortWidth</KEYWORD3>
- <KEYWORD3>SetViewPort</KEYWORD3>
- <KEYWORD3>Scrolled</KEYWORD3>
- <KEYWORD3>StartMode</KEYWORD3>
- <KEYWORD3>ServerName</KEYWORD3>
- <KEYWORD3>OLEDragMode</KEYWORD3>
- <KEYWORD3>OLEDragPicture</KEYWORD3>
- <KEYWORD3>OLEDropEffects</KEYWORD3>
- <KEYWORD3>OLEDropHasData</KEYWORD3>
- <KEYWORD3>OLEDropMode</KEYWORD3>
- <KEYWORD3>ActiveProject</KEYWORD3>
- <KEYWORD3>Projects</KEYWORD3>
- <KEYWORD3>AutoIncrement</KEYWORD3>
- <KEYWORD3>BuildDateTime</KEYWORD3>
- <KEYWORD3>Debug</KEYWORD3>
- <KEYWORD3>Encrypted</KEYWORD3>
- <KEYWORD3>Files</KEYWORD3>
- <KEYWORD3>HomeDir</KEYWORD3>
- <KEYWORD3>MainClass</KEYWORD3>
- <KEYWORD3>MainFile</KEYWORD3>
- <KEYWORD3>ProjectHookClass</KEYWORD3>
- <KEYWORD3>ProjectHookLibrary</KEYWORD3>
- <KEYWORD3>SCCProvider</KEYWORD3>
- <KEYWORD3>ServerHelpFile</KEYWORD3>
- <KEYWORD3>ServerProject</KEYWORD3>
- <KEYWORD3>TypeLibCLSID</KEYWORD3>
- <KEYWORD3>TypeLibDesc</KEYWORD3>
- <KEYWORD3>TypeLibName</KEYWORD3>
- <KEYWORD3>VersionComments</KEYWORD3>
- <KEYWORD3>VersionCompany</KEYWORD3>
- <KEYWORD3>VersionCopyright</KEYWORD3>
- <KEYWORD3>VersionDescription</KEYWORD3>
- <KEYWORD3>VersionNumber</KEYWORD3>
- <KEYWORD3>VersionProduct</KEYWORD3>
- <KEYWORD3>VersionTrademarks</KEYWORD3>
- <KEYWORD3>Item</KEYWORD3>
- <KEYWORD3>CodePage</KEYWORD3>
- <KEYWORD3>Description</KEYWORD3>
- <KEYWORD3>FileClass</KEYWORD3>
- <KEYWORD3>FileClassLibrary</KEYWORD3>
- <KEYWORD3>LastModified</KEYWORD3>
- <KEYWORD3>SCCStatus</KEYWORD3>
- <KEYWORD3>CLSID</KEYWORD3>
- <KEYWORD3>Instancing</KEYWORD3>
- <KEYWORD3>ProgID</KEYWORD3>
- <KEYWORD3>ServerClass</KEYWORD3>
- <KEYWORD3>ServerClassLibrary</KEYWORD3>
- <KEYWORD3>ThreadID</KEYWORD3>
- <KEYWORD3>ProcessID</KEYWORD3>
- <KEYWORD3>AddLineFeeds</KEYWORD3>
-
- <!-- Other FoxPro's Keywords -->
- <KEYWORD3>MULTILOCKS</KEYWORD3>
- <KEYWORD3>FULLPATH</KEYWORD3>
- <KEYWORD3>UNIQUE</KEYWORD3>
- <KEYWORD3>CLASSLIB</KEYWORD3>
- <KEYWORD3>LIBRARY</KEYWORD3>
- <KEYWORD3>structure</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>production</KEYWORD3>
- <KEYWORD3>path</KEYWORD3>
- <KEYWORD3>date</KEYWORD3>
- <KEYWORD3>datetime</KEYWORD3>
- <KEYWORD3>rest</KEYWORD3>
- <KEYWORD3>fields</KEYWORD3>
- <KEYWORD3>array</KEYWORD3>
- <KEYWORD3>free</KEYWORD3>
- <KEYWORD3>structure</KEYWORD3>
- <KEYWORD3>ASCENDING</KEYWORD3>
- <KEYWORD3>window</KEYWORD3>
- <KEYWORD3>nowait</KEYWORD3>
- <KEYWORD3>between</KEYWORD3>
- <KEYWORD3>dbf</KEYWORD3>
- <KEYWORD3>noconsole</KEYWORD3>
- <KEYWORD3>dif</KEYWORD3>
- <KEYWORD3>xls</KEYWORD3>
- <KEYWORD3>csv</KEYWORD3>
- <KEYWORD3>delimited</KEYWORD3>
- <KEYWORD3>right</KEYWORD3>
- <KEYWORD3>decimal</KEYWORD3>
- <KEYWORD3>additive</KEYWORD3>
- <KEYWORD3>between</KEYWORD3>
- <KEYWORD3>noupdate</KEYWORD3>
-
- <KEYWORD3>Abs</KEYWORD3>
- <KEYWORD3>Accept</KEYWORD3>
- <KEYWORD3>Access</KEYWORD3>
- <KEYWORD3>Aclass</KEYWORD3>
- <KEYWORD3>Acopy</KEYWORD3>
- <KEYWORD3>Acos</KEYWORD3>
- <KEYWORD3>Adatabases</KEYWORD3>
- <KEYWORD3>Adbobjects</KEYWORD3>
- <KEYWORD3>Add</KEYWORD3>
- <KEYWORD3>Addrelationtoenv</KEYWORD3>
- <KEYWORD3>Addtabletoenv</KEYWORD3>
- <KEYWORD3>Adel</KEYWORD3>
- <KEYWORD3>Adir</KEYWORD3>
- <KEYWORD3>Aelement</KEYWORD3>
- <KEYWORD3>Aerror</KEYWORD3>
- <KEYWORD3>Afields</KEYWORD3>
- <KEYWORD3>Afont</KEYWORD3>
- <KEYWORD3>Again</KEYWORD3>
- <KEYWORD3>Ains</KEYWORD3>
- <KEYWORD3>Ainstance</KEYWORD3>
- <KEYWORD3>Alen</KEYWORD3>
- <KEYWORD3>All</KEYWORD3>
- <KEYWORD3>Alltrim</KEYWORD3>
- <KEYWORD3>Alter</KEYWORD3>
- <KEYWORD3>Amembers</KEYWORD3>
- <KEYWORD3>Ansitooem</KEYWORD3>
- <KEYWORD3>Append</KEYWORD3>
- <KEYWORD3>Aprinters</KEYWORD3>
- <KEYWORD3>Ascan</KEYWORD3>
- <KEYWORD3>Aselobj</KEYWORD3>
- <KEYWORD3>Asin</KEYWORD3>
- <KEYWORD3>Asort</KEYWORD3>
- <KEYWORD3>Assist</KEYWORD3>
- <KEYWORD3>Asubscript</KEYWORD3>
- <KEYWORD3>Asynchronous</KEYWORD3>
- <KEYWORD3>Atan</KEYWORD3>
- <KEYWORD3>Atc</KEYWORD3>
- <KEYWORD3>Atcline</KEYWORD3>
- <KEYWORD3>Atline</KEYWORD3>
- <KEYWORD3>Atn2</KEYWORD3>
- <KEYWORD3>Aused</KEYWORD3>
- <KEYWORD3>Autoform</KEYWORD3>
- <KEYWORD3>Autoreport</KEYWORD3>
- <KEYWORD3>Average</KEYWORD3>
- <KEYWORD3>Bar</KEYWORD3>
- <KEYWORD3>BatchMode</KEYWORD3>
- <KEYWORD3>BatchUpdateCount</KEYWORD3>
- <KEYWORD3>Begin</KEYWORD3>
- <KEYWORD3>Bell</KEYWORD3>
- <KEYWORD3>BellSound</KEYWORD3>
- <KEYWORD3>Bitand</KEYWORD3>
- <KEYWORD3>Bitclear</KEYWORD3>
- <KEYWORD3>Bitlshift</KEYWORD3>
- <KEYWORD3>Bitnot</KEYWORD3>
- <KEYWORD3>Bitor</KEYWORD3>
- <KEYWORD3>Bitrshift</KEYWORD3>
- <KEYWORD3>Bitset</KEYWORD3>
- <KEYWORD3>Bittest</KEYWORD3>
- <KEYWORD3>Bitxor</KEYWORD3>
- <KEYWORD3>Bof</KEYWORD3>
- <KEYWORD3>Bottom</KEYWORD3>
- <KEYWORD3>Browse</KEYWORD3>
- <KEYWORD3>BrowseRefresh</KEYWORD3>
- <KEYWORD3>Buffering</KEYWORD3>
- <KEYWORD3>Build</KEYWORD3>
- <KEYWORD3>BuilderLock</KEYWORD3>
- <KEYWORD3>By</KEYWORD3>
- <KEYWORD3>Calculate</KEYWORD3>
- <KEYWORD3>Call</KEYWORD3>
- <KEYWORD3>Capslock</KEYWORD3>
- <KEYWORD3>Case</KEYWORD3>
- <KEYWORD3>Cd</KEYWORD3>
- <KEYWORD3>Cdow</KEYWORD3>
- <KEYWORD3>Ceiling</KEYWORD3>
- <KEYWORD3>Central</KEYWORD3>
- <KEYWORD3>Century</KEYWORD3>
- <KEYWORD3>Change</KEYWORD3>
- <KEYWORD3>Char</KEYWORD3>
- <KEYWORD3>Chdir</KEYWORD3>
- <KEYWORD3>Checkbox</KEYWORD3>
- <KEYWORD3>Chr</KEYWORD3>
- <KEYWORD3>Chrsaw</KEYWORD3>
- <KEYWORD3>Chrtran</KEYWORD3>
- <KEYWORD3>Close</KEYWORD3>
- <KEYWORD3>Cmonth</KEYWORD3>
- <KEYWORD3>Cntbar</KEYWORD3>
- <KEYWORD3>Cntpad</KEYWORD3>
- <KEYWORD3>Col</KEYWORD3>
- <KEYWORD3>Column</KEYWORD3>
- <KEYWORD3>ComboBox</KEYWORD3>
- <KEYWORD3>CommandButton</KEYWORD3>
- <KEYWORD3>CommandGroup</KEYWORD3>
- <KEYWORD3>Compile</KEYWORD3>
- <KEYWORD3>Completed</KEYWORD3>
- <KEYWORD3>Compobj</KEYWORD3>
- <KEYWORD3>Compute</KEYWORD3>
- <KEYWORD3>Concat</KEYWORD3>
- <KEYWORD3>ConnectBusy</KEYWORD3>
- <KEYWORD3>ConnectHandle</KEYWORD3>
- <KEYWORD3>ConnectName</KEYWORD3>
- <KEYWORD3>ConnectString</KEYWORD3>
- <KEYWORD3>ConnectTimeOut</KEYWORD3>
- <KEYWORD3>Container</KEYWORD3>
- <KEYWORD3>Continue</KEYWORD3>
- <KEYWORD3>Control</KEYWORD3>
- <KEYWORD3>Copy</KEYWORD3>
- <KEYWORD3>Cos</KEYWORD3>
- <KEYWORD3>Cot</KEYWORD3>
- <KEYWORD3>Count</KEYWORD3>
- <KEYWORD3>Cpconvert</KEYWORD3>
- <KEYWORD3>Cpcurrent</KEYWORD3>
- <KEYWORD3>CPDialog</KEYWORD3>
- <KEYWORD3>Cpdbf</KEYWORD3>
- <KEYWORD3>Cpnotrans</KEYWORD3>
- <KEYWORD3>Create</KEYWORD3>
- <KEYWORD3>Createobject</KEYWORD3>
- <KEYWORD3>CrsBuffering</KEYWORD3>
- <KEYWORD3>CrsFetchMemo</KEYWORD3>
- <KEYWORD3>CrsFetchSize</KEYWORD3>
- <KEYWORD3>CrsMaxRows</KEYWORD3>
- <KEYWORD3>CrsMethodUsed</KEYWORD3>
- <KEYWORD3>CrsNumBatch</KEYWORD3>
- <KEYWORD3>CrsShareConnection</KEYWORD3>
- <KEYWORD3>CrsUseMemoSize</KEYWORD3>
- <KEYWORD3>CrsWhereClause</KEYWORD3>
- <KEYWORD3>Ctod</KEYWORD3>
- <KEYWORD3>Ctot</KEYWORD3>
- <KEYWORD3>Curdate</KEYWORD3>
- <KEYWORD3>Curdir</KEYWORD3>
- <KEYWORD3>CurrLeft</KEYWORD3>
- <KEYWORD3>CurrSymbol</KEYWORD3>
- <KEYWORD3>Cursor</KEYWORD3>
- <KEYWORD3>Curtime</KEYWORD3>
- <KEYWORD3>Curval</KEYWORD3>
- <KEYWORD3>Custom</KEYWORD3>
- <KEYWORD3>DataEnvironment</KEYWORD3>
- <KEYWORD3>Databases</KEYWORD3>
- <KEYWORD3>Datetime</KEYWORD3>
- <KEYWORD3>Day</KEYWORD3>
- <KEYWORD3>Dayname</KEYWORD3>
- <KEYWORD3>Dayofmonth</KEYWORD3>
- <KEYWORD3>Dayofweek</KEYWORD3>
- <KEYWORD3>Dayofyear</KEYWORD3>
- <KEYWORD3>Dbalias</KEYWORD3>
- <KEYWORD3>Dbused</KEYWORD3>
- <KEYWORD3>DB_BufLockRow</KEYWORD3>
- <KEYWORD3>DB_BufLockTable</KEYWORD3>
- <KEYWORD3>DB_BufOff</KEYWORD3>
- <KEYWORD3>DB_BufOptRow</KEYWORD3>
- <KEYWORD3>DB_BufOptTable</KEYWORD3>
- <KEYWORD3>DB_Complette</KEYWORD3>
- <KEYWORD3>DB_DeleteInsert</KEYWORD3>
- <KEYWORD3>DB_KeyAndModified</KEYWORD3>
- <KEYWORD3>DB_KeyAndTimestamp</KEYWORD3>
- <KEYWORD3>DB_KeyAndUpdatable</KEYWORD3>
- <KEYWORD3>DB_LocalSQL</KEYWORD3>
- <KEYWORD3>DB_NoPrompt</KEYWORD3>
- <KEYWORD3>DB_Prompt</KEYWORD3>
- <KEYWORD3>DB_RemoteSQL</KEYWORD3>
- <KEYWORD3>DB_TransAuto</KEYWORD3>
- <KEYWORD3>DB_TransManual</KEYWORD3>
- <KEYWORD3>DB_TransNone</KEYWORD3>
- <KEYWORD3>DB_Update</KEYWORD3>
- <KEYWORD3>Ddeaborttrans</KEYWORD3>
- <KEYWORD3>Ddeadvise</KEYWORD3>
- <KEYWORD3>Ddeenabled</KEYWORD3>
- <KEYWORD3>Ddeexecute</KEYWORD3>
- <KEYWORD3>Ddeinitiate</KEYWORD3>
- <KEYWORD3>Ddelasterror</KEYWORD3>
- <KEYWORD3>Ddepoke</KEYWORD3>
- <KEYWORD3>Dderequest</KEYWORD3>
- <KEYWORD3>Ddesetoption</KEYWORD3>
- <KEYWORD3>Ddesetservice</KEYWORD3>
- <KEYWORD3>Ddesettopic</KEYWORD3>
- <KEYWORD3>Ddeterminate</KEYWORD3>
- <KEYWORD3>Declare</KEYWORD3>
- <KEYWORD3>DefaultValue</KEYWORD3>
- <KEYWORD3>Define</KEYWORD3>
- <KEYWORD3>Degrees</KEYWORD3>
- <KEYWORD3>DeleteTrigger</KEYWORD3>
- <KEYWORD3>Desc</KEYWORD3>
- <KEYWORD3>Description</KEYWORD3>
- <KEYWORD3>Difference</KEYWORD3>
- <KEYWORD3>Dimension</KEYWORD3>
- <KEYWORD3>Dir</KEYWORD3>
- <KEYWORD3>Directory</KEYWORD3>
- <KEYWORD3>Diskspace</KEYWORD3>
- <KEYWORD3>Display</KEYWORD3>
- <KEYWORD3>DispLogin</KEYWORD3>
- <KEYWORD3>DispWarnings</KEYWORD3>
- <KEYWORD3>Distinct</KEYWORD3>
- <KEYWORD3>Dmy</KEYWORD3>
- <KEYWORD3>Do</KEYWORD3>
- <KEYWORD3>Doc</KEYWORD3>
- <KEYWORD3>Dow</KEYWORD3>
- <KEYWORD3>Drop</KEYWORD3>
- <KEYWORD3>Dtoc</KEYWORD3>
- <KEYWORD3>Dtor</KEYWORD3>
- <KEYWORD3>Dtos</KEYWORD3>
- <KEYWORD3>Dtot</KEYWORD3>
- <KEYWORD3>Edit</KEYWORD3>
- <KEYWORD3>EditBox</KEYWORD3>
- <KEYWORD3>Eject</KEYWORD3>
- <KEYWORD3>Elif</KEYWORD3>
- <KEYWORD3>Else</KEYWORD3>
- <KEYWORD3>Empty</KEYWORD3>
- <KEYWORD3>End</KEYWORD3>
- <KEYWORD3>Endcase</KEYWORD3>
- <KEYWORD3>Enddefine</KEYWORD3>
- <KEYWORD3>Enddo</KEYWORD3>
- <KEYWORD3>Endfor</KEYWORD3>
- <KEYWORD3>Endif</KEYWORD3>
- <KEYWORD3>Endprintjob</KEYWORD3>
- <KEYWORD3>Endscan</KEYWORD3>
- <KEYWORD3>Endtext</KEYWORD3>
- <KEYWORD3>Endwith</KEYWORD3>
- <KEYWORD3>Eof</KEYWORD3>
- <KEYWORD3>Erase</KEYWORD3>
- <KEYWORD3>Evaluate</KEYWORD3>
- <KEYWORD3>Exact</KEYWORD3>
- <KEYWORD3>Exclusive</KEYWORD3>
- <KEYWORD3>Exit</KEYWORD3>
- <KEYWORD3>Exp</KEYWORD3>
- <KEYWORD3>Export</KEYWORD3>
- <KEYWORD3>External</KEYWORD3>
- <KEYWORD3>Fchsize</KEYWORD3>
- <KEYWORD3>Fclose</KEYWORD3>
- <KEYWORD3>Fcount</KEYWORD3>
- <KEYWORD3>Fcreate</KEYWORD3>
- <KEYWORD3>Feof</KEYWORD3>
- <KEYWORD3>Ferror</KEYWORD3>
- <KEYWORD3>FetchMemo</KEYWORD3>
- <KEYWORD3>FetchSize</KEYWORD3>
- <KEYWORD3>Fflush</KEYWORD3>
- <KEYWORD3>Fgets</KEYWORD3>
- <KEYWORD3>File</KEYWORD3>
- <KEYWORD3>Filer</KEYWORD3>
- <KEYWORD3>Find</KEYWORD3>
- <KEYWORD3>Fklabel</KEYWORD3>
- <KEYWORD3>Fkmax</KEYWORD3>
- <KEYWORD3>Fldlist</KEYWORD3>
- <KEYWORD3>Flock</KEYWORD3>
- <KEYWORD3>Floor</KEYWORD3>
- <KEYWORD3>Flush</KEYWORD3>
- <KEYWORD3>FontClass</KEYWORD3>
- <KEYWORD3>Fontmetric</KEYWORD3>
- <KEYWORD3>Fopen</KEYWORD3>
- <KEYWORD3>For</KEYWORD3>
- <KEYWORD3>Form</KEYWORD3>
- <KEYWORD3>FormsClass</KEYWORD3>
- <KEYWORD3>Formset</KEYWORD3>
- <KEYWORD3>FormSetClass</KEYWORD3>
- <KEYWORD3>FormSetLib</KEYWORD3>
- <KEYWORD3>FormsLib</KEYWORD3>
- <KEYWORD3>Found</KEYWORD3>
- <KEYWORD3>Foxcode</KEYWORD3>
- <KEYWORD3>Foxdoc</KEYWORD3>
- <KEYWORD3>Foxgen</KEYWORD3>
- <KEYWORD3>Foxgraph</KEYWORD3>
- <KEYWORD3>FoxPro</KEYWORD3>
- <KEYWORD3>Foxview</KEYWORD3>
- <KEYWORD3>Fputs</KEYWORD3>
- <KEYWORD3>Fread</KEYWORD3>
- <KEYWORD3>From</KEYWORD3>
- <KEYWORD3>Fseek</KEYWORD3>
- <KEYWORD3>Fsize</KEYWORD3>
- <KEYWORD3>Fv</KEYWORD3>
- <KEYWORD3>Fwrite</KEYWORD3>
- <KEYWORD3>Gather</KEYWORD3>
- <KEYWORD3>General</KEYWORD3>
- <KEYWORD3>Getbar</KEYWORD3>
- <KEYWORD3>Getcolor</KEYWORD3>
- <KEYWORD3>Getcp</KEYWORD3>
- <KEYWORD3>Getdir</KEYWORD3>
- <KEYWORD3>Getenv</KEYWORD3>
- <KEYWORD3>Getexpr</KEYWORD3>
- <KEYWORD3>Getfile</KEYWORD3>
- <KEYWORD3>Getfldstate</KEYWORD3>
- <KEYWORD3>Getfont</KEYWORD3>
- <KEYWORD3>Getnextmodified</KEYWORD3>
- <KEYWORD3>Getobject</KEYWORD3>
- <KEYWORD3>Getpad</KEYWORD3>
- <KEYWORD3>Getpict</KEYWORD3>
- <KEYWORD3>Getprinter</KEYWORD3>
- <KEYWORD3>Go</KEYWORD3>
- <KEYWORD3>Gomonth</KEYWORD3>
- <KEYWORD3>Goto</KEYWORD3>
- <KEYWORD3>Graph</KEYWORD3>
- <KEYWORD3>Grid</KEYWORD3>
- <KEYWORD3>GridHorz</KEYWORD3>
- <KEYWORD3>GridShow</KEYWORD3>
- <KEYWORD3>GridShowPos</KEYWORD3>
- <KEYWORD3>GridSnap</KEYWORD3>
- <KEYWORD3>GridVert</KEYWORD3>
- <KEYWORD3>Header</KEYWORD3>
- <KEYWORD3>Help</KEYWORD3>
- <KEYWORD3>HelpOn</KEYWORD3>
- <KEYWORD3>HelpTo</KEYWORD3>
- <KEYWORD3>Hour</KEYWORD3>
- <KEYWORD3>IdleTimeOut</KEYWORD3>
- <KEYWORD3>Idxcollate</KEYWORD3>
- <KEYWORD3>If</KEYWORD3>
- <KEYWORD3>Ifdef</KEYWORD3>
- <KEYWORD3>Ifndef</KEYWORD3>
- <KEYWORD3>Iif</KEYWORD3>
- <KEYWORD3>Image</KEYWORD3>
- <KEYWORD3>Import</KEYWORD3>
- <KEYWORD3>Include</KEYWORD3>
- <KEYWORD3>Indbc</KEYWORD3>
- <KEYWORD3>Index</KEYWORD3>
- <KEYWORD3>Inkey</KEYWORD3>
- <KEYWORD3>Inlist</KEYWORD3>
- <KEYWORD3>Input</KEYWORD3>
- <KEYWORD3>Insert</KEYWORD3>
- <KEYWORD3>InsertTrigger</KEYWORD3>
- <KEYWORD3>Insmode</KEYWORD3>
- <KEYWORD3>Into</KEYWORD3>
- <KEYWORD3>Isalpha</KEYWORD3>
- <KEYWORD3>Iscolor</KEYWORD3>
- <KEYWORD3>Isdigit</KEYWORD3>
- <KEYWORD3>Isexclusive</KEYWORD3>
- <KEYWORD3>Islower</KEYWORD3>
- <KEYWORD3>Isnull</KEYWORD3>
- <KEYWORD3>Isreadonly</KEYWORD3>
- <KEYWORD3>Isupper</KEYWORD3>
- <KEYWORD3>Join</KEYWORD3>
- <KEYWORD3>Keyboard</KEYWORD3>
- <KEYWORD3>KeyField</KEYWORD3>
- <KEYWORD3>KeyFieldList</KEYWORD3>
- <KEYWORD3>Keymatch</KEYWORD3>
- <KEYWORD3>Label</KEYWORD3>
- <KEYWORD3>Lastkey</KEYWORD3>
- <KEYWORD3>LastProject</KEYWORD3>
- <KEYWORD3>Lcase</KEYWORD3>
- <KEYWORD3>Len</KEYWORD3>
- <KEYWORD3>Length</KEYWORD3>
- <KEYWORD3>Lineno</KEYWORD3>
- <KEYWORD3>ListBox</KEYWORD3>
- <KEYWORD3>Local</KEYWORD3>
- <KEYWORD3>Locate</KEYWORD3>
- <KEYWORD3>Locfile</KEYWORD3>
- <KEYWORD3>Log</KEYWORD3>
- <KEYWORD3>Log10</KEYWORD3>
- <KEYWORD3>Logout</KEYWORD3>
- <KEYWORD3>Lookup</KEYWORD3>
- <KEYWORD3>Loop</KEYWORD3>
- <KEYWORD3>Lower</KEYWORD3>
- <KEYWORD3>Lparameters</KEYWORD3>
- <KEYWORD3>Ltrim</KEYWORD3>
- <KEYWORD3>Lupdate</KEYWORD3>
- <KEYWORD3>Mail</KEYWORD3>
- <KEYWORD3>MaxRecords</KEYWORD3>
- <KEYWORD3>Mcol</KEYWORD3>
- <KEYWORD3>Md</KEYWORD3>
- <KEYWORD3>Mdown</KEYWORD3>
- <KEYWORD3>Mdx</KEYWORD3>
- <KEYWORD3>Mdy</KEYWORD3>
- <KEYWORD3>Memlines</KEYWORD3>
- <KEYWORD3>Memo</KEYWORD3>
- <KEYWORD3>Menu</KEYWORD3>
- <KEYWORD3>Messagebox</KEYWORD3>
- <KEYWORD3>Minute</KEYWORD3>
- <KEYWORD3>Mkdir</KEYWORD3>
- <KEYWORD3>Mline</KEYWORD3>
- <KEYWORD3>Modify</KEYWORD3>
- <KEYWORD3>Month</KEYWORD3>
- <KEYWORD3>Monthname</KEYWORD3>
- <KEYWORD3>Mouse</KEYWORD3>
- <KEYWORD3>Mrkbar</KEYWORD3>
- <KEYWORD3>Mrkpad</KEYWORD3>
- <KEYWORD3>Mrow</KEYWORD3>
- <KEYWORD3>Mton</KEYWORD3>
- <KEYWORD3>Mwindow</KEYWORD3>
- <KEYWORD3>Native</KEYWORD3>
- <KEYWORD3>Ndx</KEYWORD3>
- <KEYWORD3>Network</KEYWORD3>
- <KEYWORD3>Next</KEYWORD3>
- <KEYWORD3>Nodefault</KEYWORD3>
- <KEYWORD3>Normalize</KEYWORD3>
- <KEYWORD3>Note</KEYWORD3>
- <KEYWORD3>Now</KEYWORD3>
- <KEYWORD3>Ntom</KEYWORD3>
- <KEYWORD3>NullString</KEYWORD3>
- <KEYWORD3>Numlock</KEYWORD3>
- <KEYWORD3>Nvl</KEYWORD3>
- <KEYWORD3>Objnum</KEYWORD3>
- <KEYWORD3>Objref</KEYWORD3>
- <KEYWORD3>Objtoclient</KEYWORD3>
- <KEYWORD3>Objvar</KEYWORD3>
- <KEYWORD3>Occurs</KEYWORD3>
- <KEYWORD3>ODBChdbc</KEYWORD3>
- <KEYWORD3>ODBChstmt</KEYWORD3>
- <KEYWORD3>Oemtoansi</KEYWORD3>
- <KEYWORD3>Off</KEYWORD3>
- <KEYWORD3>Oldval</KEYWORD3>
- <KEYWORD3>OleBaseControl</KEYWORD3>
- <KEYWORD3>OleBoundControl</KEYWORD3>
- <KEYWORD3>OleClassIDispOut</KEYWORD3>
- <KEYWORD3>OleControl</KEYWORD3>
- <KEYWORD3>On</KEYWORD3>
- <KEYWORD3>Open</KEYWORD3>
- <KEYWORD3>OptionButton</KEYWORD3>
- <KEYWORD3>OptionGroup</KEYWORD3>
- <KEYWORD3>Oracle</KEYWORD3>
- <KEYWORD3>Order</KEYWORD3>
- <KEYWORD3>Os</KEYWORD3>
- <KEYWORD3>Otherwise</KEYWORD3>
- <KEYWORD3>Pack</KEYWORD3>
- <KEYWORD3>PacketSize</KEYWORD3>
- <KEYWORD3>Padc</KEYWORD3>
- <KEYWORD3>Padl</KEYWORD3>
- <KEYWORD3>Padr</KEYWORD3>
- <KEYWORD3>Page</KEYWORD3>
- <KEYWORD3>PageFrame</KEYWORD3>
- <KEYWORD3>Parameters</KEYWORD3>
- <KEYWORD3>Payment</KEYWORD3>
- <KEYWORD3>Pcol</KEYWORD3>
- <KEYWORD3>Percent</KEYWORD3>
- <KEYWORD3>Pi</KEYWORD3>
- <KEYWORD3>Pivot</KEYWORD3>
- <KEYWORD3>Play</KEYWORD3>
- <KEYWORD3>Pop</KEYWORD3>
- <KEYWORD3>Power</KEYWORD3>
- <KEYWORD3>PrimaryKey</KEYWORD3>
- <KEYWORD3>Printjob</KEYWORD3>
- <KEYWORD3>Printstatus</KEYWORD3>
- <KEYWORD3>Private</KEYWORD3>
- <KEYWORD3>Prmbar</KEYWORD3>
- <KEYWORD3>Prmpad</KEYWORD3>
- <KEYWORD3>Program</KEYWORD3>
- <KEYWORD3>ProjectClick</KEYWORD3>
- <KEYWORD3>Proper</KEYWORD3>
- <KEYWORD3>Protected</KEYWORD3>
- <KEYWORD3>Prow</KEYWORD3>
- <KEYWORD3>Prtinfo</KEYWORD3>
- <KEYWORD3>Public</KEYWORD3>
- <KEYWORD3>Push</KEYWORD3>
- <KEYWORD3>Putfile</KEYWORD3>
- <KEYWORD3>Pv</KEYWORD3>
- <KEYWORD3>Qpr</KEYWORD3>
- <KEYWORD3>Quater</KEYWORD3>
- <KEYWORD3>QueryTimeOut</KEYWORD3>
- <KEYWORD3>Quit</KEYWORD3>
- <KEYWORD3>Radians</KEYWORD3>
- <KEYWORD3>Rand</KEYWORD3>
- <KEYWORD3>Rat</KEYWORD3>
- <KEYWORD3>Ratline</KEYWORD3>
- <KEYWORD3>Rd</KEYWORD3>
- <KEYWORD3>Rdlevel</KEYWORD3>
- <KEYWORD3>Read</KEYWORD3>
- <KEYWORD3>Readkey</KEYWORD3>
- <KEYWORD3>Recall</KEYWORD3>
- <KEYWORD3>Reccount</KEYWORD3>
- <KEYWORD3>RecentlyUsedFiles</KEYWORD3>
- <KEYWORD3>Recno</KEYWORD3>
- <KEYWORD3>Recsize</KEYWORD3>
- <KEYWORD3>RectClass</KEYWORD3>
- <KEYWORD3>Regional</KEYWORD3>
- <KEYWORD3>Reindex</KEYWORD3>
- <KEYWORD3>RelatedChild</KEYWORD3>
- <KEYWORD3>RelatedTable</KEYWORD3>
- <KEYWORD3>RelatedTag</KEYWORD3>
- <KEYWORD3>Relation</KEYWORD3>
- <KEYWORD3>Remove</KEYWORD3>
- <KEYWORD3>Rename</KEYWORD3>
- <KEYWORD3>Repeat</KEYWORD3>
- <KEYWORD3>Replace</KEYWORD3>
- <KEYWORD3>Replicate</KEYWORD3>
- <KEYWORD3>Report</KEYWORD3>
- <KEYWORD3>Reprocess</KEYWORD3>
- <KEYWORD3>ResHeight</KEYWORD3>
- <KEYWORD3>ResourceOn</KEYWORD3>
- <KEYWORD3>ResourceTo</KEYWORD3>
- <KEYWORD3>Restore</KEYWORD3>
- <KEYWORD3>Resume</KEYWORD3>
- <KEYWORD3>ResWidth</KEYWORD3>
- <KEYWORD3>Retry</KEYWORD3>
- <KEYWORD3>Return</KEYWORD3>
- <KEYWORD3>Rgbscheme</KEYWORD3>
- <KEYWORD3>Rlock</KEYWORD3>
- <KEYWORD3>Rmdir</KEYWORD3>
- <KEYWORD3>Rollback</KEYWORD3>
- <KEYWORD3>Round</KEYWORD3>
- <KEYWORD3>Rtod</KEYWORD3>
- <KEYWORD3>Rtrim</KEYWORD3>
- <KEYWORD3>RuleExpression</KEYWORD3>
- <KEYWORD3>RuleText</KEYWORD3>
- <KEYWORD3>Run</KEYWORD3>
- <KEYWORD3>Runscript</KEYWORD3>
- <KEYWORD3>Rview</KEYWORD3>
- <KEYWORD3>Save</KEYWORD3>
- <KEYWORD3>Safety</KEYWORD3>
- <KEYWORD3>ScaleUnits</KEYWORD3>
- <KEYWORD3>Scan</KEYWORD3>
- <KEYWORD3>Scatter</KEYWORD3>
- <KEYWORD3>Scols</KEYWORD3>
- <KEYWORD3>Scroll</KEYWORD3>
- <KEYWORD3>Sec</KEYWORD3>
- <KEYWORD3>Second</KEYWORD3>
- <KEYWORD3>Seek</KEYWORD3>
- <KEYWORD3>Select</KEYWORD3>
- <KEYWORD3>SendUpdates</KEYWORD3>
- <KEYWORD3>Separator</KEYWORD3>
- <KEYWORD3>Set</KEYWORD3>
- <KEYWORD3>SetDefault</KEYWORD3>
- <KEYWORD3>Setfldstate</KEYWORD3>
- <KEYWORD3>Setup</KEYWORD3>
- <KEYWORD3>Shape</KEYWORD3>
- <KEYWORD3>Shared</KEYWORD3>
- <KEYWORD3>ShareConnection</KEYWORD3>
- <KEYWORD3>ShowOLEControls</KEYWORD3>
- <KEYWORD3>ShowOLEInsertable</KEYWORD3>
- <KEYWORD3>ShowVCXs</KEYWORD3>
- <KEYWORD3>Sign</KEYWORD3>
- <KEYWORD3>Sin</KEYWORD3>
- <KEYWORD3>Size</KEYWORD3>
- <KEYWORD3>Skpbar</KEYWORD3>
- <KEYWORD3>Skppad</KEYWORD3>
- <KEYWORD3>Sort</KEYWORD3>
- <KEYWORD3>Soundex</KEYWORD3>
- <KEYWORD3>SourceName</KEYWORD3>
- <KEYWORD3>Spinner</KEYWORD3>
- <KEYWORD3>SQLAsynchronous</KEYWORD3>
- <KEYWORD3>SQLBatchMode</KEYWORD3>
- <KEYWORD3>Sqlcommit</KEYWORD3>
- <KEYWORD3>SQLConnectTimeOut</KEYWORD3>
- <KEYWORD3>SQLDispLogin</KEYWORD3>
- <KEYWORD3>SQLDispWarnings</KEYWORD3>
- <KEYWORD3>SQLIdleTimeOut</KEYWORD3>
- <KEYWORD3>Sqll</KEYWORD3>
- <KEYWORD3>SQLQueryTimeOut</KEYWORD3>
- <KEYWORD3>Sqlrollback</KEYWORD3>
- <KEYWORD3>Sqlstringconnect</KEYWORD3>
- <KEYWORD3>SQLTransactions</KEYWORD3>
- <KEYWORD3>SQLWaitTime</KEYWORD3>
- <KEYWORD3>Sqrt</KEYWORD3>
- <KEYWORD3>Srows</KEYWORD3>
- <KEYWORD3>StatusBar</KEYWORD3>
- <KEYWORD3>Status</KEYWORD3>
- <KEYWORD3>Store</KEYWORD3>
- <KEYWORD3>Str</KEYWORD3>
- <KEYWORD3>Strtran</KEYWORD3>
- <KEYWORD3>Stuff</KEYWORD3>
- <KEYWORD3>Substr</KEYWORD3>
- <KEYWORD3>Substring</KEYWORD3>
- <KEYWORD3>Sum</KEYWORD3>
- <KEYWORD3>Suspend</KEYWORD3>
- <KEYWORD3>Sys</KEYWORD3>
- <KEYWORD3>Sysmetric</KEYWORD3>
- <KEYWORD3>Table</KEYWORD3>
- <KEYWORD3>TableRefresh</KEYWORD3>
- <KEYWORD3>Tablerevert</KEYWORD3>
- <KEYWORD3>Tableupdate</KEYWORD3>
- <KEYWORD3>TabOrdering</KEYWORD3>
- <KEYWORD3>Talk</KEYWORD3>
- <KEYWORD3>Tan</KEYWORD3>
- <KEYWORD3>Target</KEYWORD3>
- <KEYWORD3>Text</KEYWORD3>
- <KEYWORD3>TextBox</KEYWORD3>
- <KEYWORD3>Timestamp</KEYWORD3>
- <KEYWORD3>Timestampdiff</KEYWORD3>
- <KEYWORD3>To</KEYWORD3>
- <KEYWORD3>Toolbar</KEYWORD3>
- <KEYWORD3>Total</KEYWORD3>
- <KEYWORD3>Transaction</KEYWORD3>
- <KEYWORD3>Transform</KEYWORD3>
- <KEYWORD3>Trim</KEYWORD3>
- <KEYWORD3>Truncate</KEYWORD3>
- <KEYWORD3>Ttoc</KEYWORD3>
- <KEYWORD3>Ttod</KEYWORD3>
- <KEYWORD3>Txnlevel</KEYWORD3>
- <KEYWORD3>Txtwidth</KEYWORD3>
- <KEYWORD3>Type</KEYWORD3>
- <KEYWORD3>Ucase</KEYWORD3>
- <KEYWORD3>Undefine</KEYWORD3>
- <KEYWORD3>Unlock</KEYWORD3>
- <KEYWORD3>Unpack</KEYWORD3>
- <KEYWORD3>Updatable</KEYWORD3>
- <KEYWORD3>UpdatableFieldList</KEYWORD3>
- <KEYWORD3>Update</KEYWORD3>
- <KEYWORD3>Updated</KEYWORD3>
- <KEYWORD3>UpdateName</KEYWORD3>
- <KEYWORD3>UpdateNameList</KEYWORD3>
- <KEYWORD3>UpdateTrigger</KEYWORD3>
- <KEYWORD3>UpdateType</KEYWORD3>
- <KEYWORD3>Upper</KEYWORD3>
- <KEYWORD3>Upsizing</KEYWORD3>
- <KEYWORD3>Use</KEYWORD3>
- <KEYWORD3>Used</KEYWORD3>
- <KEYWORD3>UseMemoSize</KEYWORD3>
- <KEYWORD3>Val</KEYWORD3>
- <KEYWORD3>Validate</KEYWORD3>
- <KEYWORD3>Values</KEYWORD3>
- <KEYWORD3>Varread</KEYWORD3>
- <KEYWORD3>Version</KEYWORD3>
- <KEYWORD3>Wait</KEYWORD3>
- <KEYWORD3>WaitTime</KEYWORD3>
- <KEYWORD3>Wborder</KEYWORD3>
- <KEYWORD3>Wchild</KEYWORD3>
- <KEYWORD3>Wcols</KEYWORD3>
- <KEYWORD3>Week</KEYWORD3>
- <KEYWORD3>Wexist</KEYWORD3>
- <KEYWORD3>Wfont</KEYWORD3>
- <KEYWORD3>Where</KEYWORD3>
- <KEYWORD3>WhereType</KEYWORD3>
- <KEYWORD3>While</KEYWORD3>
- <KEYWORD3>Windcmd</KEYWORD3>
- <KEYWORD3>Windhelp</KEYWORD3>
- <KEYWORD3>Windmemo</KEYWORD3>
- <KEYWORD3>Windmenu</KEYWORD3>
- <KEYWORD3>Windmodify</KEYWORD3>
- <KEYWORD3>Windquery</KEYWORD3>
- <KEYWORD3>Windscreen</KEYWORD3>
- <KEYWORD3>Windsnip</KEYWORD3>
- <KEYWORD3>Windstproc</KEYWORD3>
- <KEYWORD3>With</KEYWORD3>
- <KEYWORD3>WizardPrompt</KEYWORD3>
- <KEYWORD3>Wlast</KEYWORD3>
- <KEYWORD3>Wlcol</KEYWORD3>
- <KEYWORD3>Wlrow</KEYWORD3>
- <KEYWORD3>Wmaximum</KEYWORD3>
- <KEYWORD3>Wminimum</KEYWORD3>
- <KEYWORD3>Wontop</KEYWORD3>
- <KEYWORD3>Woutput</KEYWORD3>
- <KEYWORD3>Wparent</KEYWORD3>
- <KEYWORD3>Wread</KEYWORD3>
- <KEYWORD3>Wrows</KEYWORD3>
- <KEYWORD3>Wtitle</KEYWORD3>
- <KEYWORD3>Wvisible</KEYWORD3>
- <KEYWORD3>Year</KEYWORD3>
- <KEYWORD3>Zap</KEYWORD3>
- <KEYWORD3>[</KEYWORD3>
- <KEYWORD3>]</KEYWORD3>
- <KEYWORD3>^</KEYWORD3>
- <KEYWORD3>_Alignment</KEYWORD3>
- <KEYWORD3>_Asciicols</KEYWORD3>
- <KEYWORD3>_Asciirows</KEYWORD3>
- <KEYWORD3>_Assist</KEYWORD3>
- <KEYWORD3>_Beautify</KEYWORD3>
- <KEYWORD3>_Box</KEYWORD3>
- <KEYWORD3>_Browser</KEYWORD3>
- <KEYWORD3>_Builder</KEYWORD3>
- <KEYWORD3>_Calcmem</KEYWORD3>
- <KEYWORD3>_Calcvalue</KEYWORD3>
- <KEYWORD3>_Cliptext</KEYWORD3>
- <KEYWORD3>_Converter</KEYWORD3>
- <KEYWORD3>_Curobj</KEYWORD3>
- <KEYWORD3>_Dblclick</KEYWORD3>
- <KEYWORD3>_Diarydate</KEYWORD3>
- <KEYWORD3>_Dos</KEYWORD3>
- <KEYWORD3>_Foxdoc</KEYWORD3>
- <KEYWORD3>_Foxgraph</KEYWORD3>
- <KEYWORD3>_Gengraph</KEYWORD3>
- <KEYWORD3>_Genmenu</KEYWORD3>
- <KEYWORD3>_Genpd</KEYWORD3>
- <KEYWORD3>_Genscrn</KEYWORD3>
- <KEYWORD3>_Genxtab</KEYWORD3>
- <KEYWORD3>_Indent</KEYWORD3>
- <KEYWORD3>_Lmargin</KEYWORD3>
- <KEYWORD3>_Mac</KEYWORD3>
- <KEYWORD3>_Mbrowse</KEYWORD3>
- <KEYWORD3>_Mbr_appnd</KEYWORD3>
- <KEYWORD3>_Mbr_cpart</KEYWORD3>
- <KEYWORD3>_Mbr_delet</KEYWORD3>
- <KEYWORD3>_Mbr_font</KEYWORD3>
- <KEYWORD3>_Mbr_goto</KEYWORD3>
- <KEYWORD3>_Mbr_grid</KEYWORD3>
- <KEYWORD3>_Mbr_link</KEYWORD3>
- <KEYWORD3>_Mbr_mode</KEYWORD3>
- <KEYWORD3>_Mbr_mvfld</KEYWORD3>
- <KEYWORD3>_Mbr_mvprt</KEYWORD3>
- <KEYWORD3>_Mbr_seek</KEYWORD3>
- <KEYWORD3>_Mbr_sp100</KEYWORD3>
- <KEYWORD3>_Mbr_sp200</KEYWORD3>
- <KEYWORD3>_Mbr_szfld</KEYWORD3>
- <KEYWORD3>_Mdata</KEYWORD3>
- <KEYWORD3>_Mda_appnd</KEYWORD3>
- <KEYWORD3>_Mda_avg</KEYWORD3>
- <KEYWORD3>_Mda_brow</KEYWORD3>
- <KEYWORD3>_Mda_calc</KEYWORD3>
- <KEYWORD3>_Mda_copy</KEYWORD3>
- <KEYWORD3>_Mda_count</KEYWORD3>
- <KEYWORD3>_Mda_label</KEYWORD3>
- <KEYWORD3>_Mda_pack</KEYWORD3>
- <KEYWORD3>_Mda_reprt</KEYWORD3>
- <KEYWORD3>_Mda_rindx</KEYWORD3>
- <KEYWORD3>_Mda_setup</KEYWORD3>
- <KEYWORD3>_Mda_sort</KEYWORD3>
- <KEYWORD3>_Mda_sp100</KEYWORD3>
- <KEYWORD3>_Mda_sp200</KEYWORD3>
- <KEYWORD3>_Mda_sp300</KEYWORD3>
- <KEYWORD3>_Mda_sum</KEYWORD3>
- <KEYWORD3>_Mda_total</KEYWORD3>
- <KEYWORD3>_Mdiary</KEYWORD3>
- <KEYWORD3>_Medit</KEYWORD3>
- <KEYWORD3>_Med_clear</KEYWORD3>
- <KEYWORD3>_Med_copy</KEYWORD3>
- <KEYWORD3>_Med_cut</KEYWORD3>
- <KEYWORD3>_Med_cvtst</KEYWORD3>
- <KEYWORD3>_Med_find</KEYWORD3>
- <KEYWORD3>_Med_finda</KEYWORD3>
- <KEYWORD3>_Med_goto</KEYWORD3>
- <KEYWORD3>_Med_insob</KEYWORD3>
- <KEYWORD3>_Med_link</KEYWORD3>
- <KEYWORD3>_Med_obj</KEYWORD3>
- <KEYWORD3>_Med_paste</KEYWORD3>
- <KEYWORD3>_Med_pref</KEYWORD3>
- <KEYWORD3>_Med_pstlk</KEYWORD3>
- <KEYWORD3>_Med_redo</KEYWORD3>
- <KEYWORD3>_Med_repl</KEYWORD3>
- <KEYWORD3>_Med_repla</KEYWORD3>
- <KEYWORD3>_Med_slcta</KEYWORD3>
- <KEYWORD3>_Med_sp100</KEYWORD3>
- <KEYWORD3>_Med_sp200</KEYWORD3>
- <KEYWORD3>_Med_sp300</KEYWORD3>
- <KEYWORD3>_Med_sp400</KEYWORD3>
- <KEYWORD3>_Med_sp500</KEYWORD3>
- <KEYWORD3>_Med_undo</KEYWORD3>
- <KEYWORD3>_Mfile</KEYWORD3>
- <KEYWORD3>_Mfiler</KEYWORD3>
- <KEYWORD3>_Mfirst</KEYWORD3>
- <KEYWORD3>_Mfi_clall</KEYWORD3>
- <KEYWORD3>_Mfi_close</KEYWORD3>
- <KEYWORD3>_Mfi_export</KEYWORD3>
- <KEYWORD3>_Mfi_import</KEYWORD3>
- <KEYWORD3>_Mfi_new</KEYWORD3>
- <KEYWORD3>_Mfi_open</KEYWORD3>
- <KEYWORD3>_Mfi_pgset</KEYWORD3>
- <KEYWORD3>_Mfi_prevu</KEYWORD3>
- <KEYWORD3>_Mfi_print</KEYWORD3>
- <KEYWORD3>_Mfi_quit</KEYWORD3>
- <KEYWORD3>_Mfi_revrt</KEYWORD3>
- <KEYWORD3>_Mfi_savas</KEYWORD3>
- <KEYWORD3>_Mfi_save</KEYWORD3>
- <KEYWORD3>_Mfi_send</KEYWORD3>
- <KEYWORD3>_Mfi_setup</KEYWORD3>
- <KEYWORD3>_Mfi_sp100</KEYWORD3>
- <KEYWORD3>_Mfi_sp200</KEYWORD3>
- <KEYWORD3>_Mfi_sp300</KEYWORD3>
- <KEYWORD3>_Mfi_sp400</KEYWORD3>
- <KEYWORD3>_Mlabel</KEYWORD3>
- <KEYWORD3>_Mlast</KEYWORD3>
- <KEYWORD3>_Mline</KEYWORD3>
- <KEYWORD3>_Mmacro</KEYWORD3>
- <KEYWORD3>_Mmbldr</KEYWORD3>
- <KEYWORD3>_Mprog</KEYWORD3>
- <KEYWORD3>_Mproj</KEYWORD3>
- <KEYWORD3>_Mpr_beaut</KEYWORD3>
- <KEYWORD3>_Mpr_cancl</KEYWORD3>
- <KEYWORD3>_Mpr_compl</KEYWORD3>
- <KEYWORD3>_Mpr_do</KEYWORD3>
- <KEYWORD3>_Mpr_docum</KEYWORD3>
- <KEYWORD3>_Mpr_formwz</KEYWORD3>
- <KEYWORD3>_Mpr_gener</KEYWORD3>
- <KEYWORD3>_Mpr_graph</KEYWORD3>
- <KEYWORD3>_Mpr_resum</KEYWORD3>
- <KEYWORD3>_Mpr_sp100</KEYWORD3>
- <KEYWORD3>_Mpr_sp200</KEYWORD3>
- <KEYWORD3>_Mpr_sp300</KEYWORD3>
- <KEYWORD3>_Mpr_suspend</KEYWORD3>
- <KEYWORD3>_Mrc_appnd</KEYWORD3>
- <KEYWORD3>_Mrc_chnge</KEYWORD3>
- <KEYWORD3>_Mrc_cont</KEYWORD3>
- <KEYWORD3>_Mrc_delet</KEYWORD3>
- <KEYWORD3>_Mrc_goto</KEYWORD3>
- <KEYWORD3>_Mrc_locat</KEYWORD3>
- <KEYWORD3>_Mrc_recal</KEYWORD3>
- <KEYWORD3>_Mrc_repl</KEYWORD3>
- <KEYWORD3>_Mrc_seek</KEYWORD3>
- <KEYWORD3>_Mrc_sp100</KEYWORD3>
- <KEYWORD3>_Mrc_sp200</KEYWORD3>
- <KEYWORD3>_Mrecord</KEYWORD3>
- <KEYWORD3>_Mreport</KEYWORD3>
- <KEYWORD3>_Mrqbe</KEYWORD3>
- <KEYWORD3>_Mscreen</KEYWORD3>
- <KEYWORD3>_Msm_data</KEYWORD3>
- <KEYWORD3>_Msm_edit</KEYWORD3>
- <KEYWORD3>_Msm_file</KEYWORD3>
- <KEYWORD3>_Msm_format</KEYWORD3>
- <KEYWORD3>_Msm_prog</KEYWORD3>
- <KEYWORD3>_Msm_recrd</KEYWORD3>
- <KEYWORD3>_Msm_systm</KEYWORD3>
- <KEYWORD3>_Msm_text</KEYWORD3>
- <KEYWORD3>_Msm_tools</KEYWORD3>
- <KEYWORD3>_Msm_view</KEYWORD3>
- <KEYWORD3>_Msm_windo</KEYWORD3>
- <KEYWORD3>_Mst_about</KEYWORD3>
- <KEYWORD3>_Mst_ascii</KEYWORD3>
- <KEYWORD3>_Mst_calcu</KEYWORD3>
- <KEYWORD3>_Mst_captr</KEYWORD3>
- <KEYWORD3>_Mst_dbase</KEYWORD3>
- <KEYWORD3>_Mst_diary</KEYWORD3>
- <KEYWORD3>_Mst_filer</KEYWORD3>
- <KEYWORD3>_Mst_help</KEYWORD3>
- <KEYWORD3>_Mst_hphow</KEYWORD3>
- <KEYWORD3>_Mst_hpsch</KEYWORD3>
- <KEYWORD3>_Mst_macro</KEYWORD3>
- <KEYWORD3>_Mst_office</KEYWORD3>
- <KEYWORD3>_Mst_puzzl</KEYWORD3>
- <KEYWORD3>_Mst_sp100</KEYWORD3>
- <KEYWORD3>_Mst_sp200</KEYWORD3>
- <KEYWORD3>_Mst_sp300</KEYWORD3>
- <KEYWORD3>_Mst_specl</KEYWORD3>
- <KEYWORD3>_Msysmenu</KEYWORD3>
- <KEYWORD3>_Msystem</KEYWORD3>
- <KEYWORD3>_Mtable</KEYWORD3>
- <KEYWORD3>_Mtb_appnd</KEYWORD3>
- <KEYWORD3>_Mtb_cpart</KEYWORD3>
- <KEYWORD3>_Mtb_delet</KEYWORD3>
- <KEYWORD3>_Mtb_delrc</KEYWORD3>
- <KEYWORD3>_Mtb_goto</KEYWORD3>
- <KEYWORD3>_Mtb_link</KEYWORD3>
- <KEYWORD3>_Mtb_mvfld</KEYWORD3>
- <KEYWORD3>_Mtb_mvprt</KEYWORD3>
- <KEYWORD3>_Mtb_props</KEYWORD3>
- <KEYWORD3>_Mtb_recal</KEYWORD3>
- <KEYWORD3>_Mtb_sp100</KEYWORD3>
- <KEYWORD3>_Mtb_sp200</KEYWORD3>
- <KEYWORD3>_Mtb_sp300</KEYWORD3>
- <KEYWORD3>_Mtb_sp400</KEYWORD3>
- <KEYWORD3>_Mtb_szfld</KEYWORD3>
- <KEYWORD3>_Mwindow</KEYWORD3>
- <KEYWORD3>_Mwizards</KEYWORD3>
- <KEYWORD3>_Mwi_arran</KEYWORD3>
- <KEYWORD3>_Mwi_clear</KEYWORD3>
- <KEYWORD3>_Mwi_cmd</KEYWORD3>
- <KEYWORD3>_Mwi_color</KEYWORD3>
- <KEYWORD3>_Mwi_debug</KEYWORD3>
- <KEYWORD3>_Mwi_hide</KEYWORD3>
- <KEYWORD3>_Mwi_hidea</KEYWORD3>
- <KEYWORD3>_Mwi_min</KEYWORD3>
- <KEYWORD3>_Mwi_move</KEYWORD3>
- <KEYWORD3>_Mwi_rotat</KEYWORD3>
- <KEYWORD3>_Mwi_showa</KEYWORD3>
- <KEYWORD3>_Mwi_size</KEYWORD3>
- <KEYWORD3>_Mwi_sp100</KEYWORD3>
- <KEYWORD3>_Mwi_sp200</KEYWORD3>
- <KEYWORD3>_Mwi_toolb</KEYWORD3>
- <KEYWORD3>_Mwi_trace</KEYWORD3>
- <KEYWORD3>_Mwi_view</KEYWORD3>
- <KEYWORD3>_Mwi_zoom</KEYWORD3>
- <KEYWORD3>_Mwz_all</KEYWORD3>
- <KEYWORD3>_Mwz_form</KEYWORD3>
- <KEYWORD3>_Mwz_foxdoc</KEYWORD3>
- <KEYWORD3>_Mwz_import</KEYWORD3>
- <KEYWORD3>_Mwz_label</KEYWORD3>
- <KEYWORD3>_Mwz_mail</KEYWORD3>
- <KEYWORD3>_Mwz_pivot</KEYWORD3>
- <KEYWORD3>_Mwz_query</KEYWORD3>
- <KEYWORD3>_Mwz_reprt</KEYWORD3>
- <KEYWORD3>_Mwz_setup</KEYWORD3>
- <KEYWORD3>_Mwz_table</KEYWORD3>
- <KEYWORD3>_Mwz_upsizing</KEYWORD3>
- <KEYWORD3>_Netware</KEYWORD3>
- <KEYWORD3>_Oracle</KEYWORD3>
- <KEYWORD3>_Padvance</KEYWORD3>
- <KEYWORD3>_Pageno</KEYWORD3>
- <KEYWORD3>_Pbpage</KEYWORD3>
- <KEYWORD3>_Pcolno</KEYWORD3>
- <KEYWORD3>_Pcopies</KEYWORD3>
- <KEYWORD3>_Pdparms</KEYWORD3>
- <KEYWORD3>_Pdriver</KEYWORD3>
- <KEYWORD3>_Pdsetup</KEYWORD3>
- <KEYWORD3>_Pecode</KEYWORD3>
- <KEYWORD3>_Peject</KEYWORD3>
- <KEYWORD3>_Pepage</KEYWORD3>
- <KEYWORD3>_Pform</KEYWORD3>
- <KEYWORD3>_Plength</KEYWORD3>
- <KEYWORD3>_Plineno</KEYWORD3>
- <KEYWORD3>_Ploffset</KEYWORD3>
- <KEYWORD3>_Ppitch</KEYWORD3>
- <KEYWORD3>_Pquality</KEYWORD3>
- <KEYWORD3>_Pretext</KEYWORD3>
- <KEYWORD3>_Pscode</KEYWORD3>
- <KEYWORD3>_Pspacing</KEYWORD3>
- <KEYWORD3>_Pwait</KEYWORD3>
- <KEYWORD3>_Rmargin</KEYWORD3>
- <KEYWORD3>_Screen</KEYWORD3>
- <KEYWORD3>_Shell</KEYWORD3>
- <KEYWORD3>_Spellchk</KEYWORD3>
- <KEYWORD3>_Sqlserver</KEYWORD3>
- <KEYWORD3>_Startup</KEYWORD3>
- <KEYWORD3>_Tabs</KEYWORD3>
- <KEYWORD3>_Tally</KEYWORD3>
- <KEYWORD3>_Text</KEYWORD3>
- <KEYWORD3>_Throttle</KEYWORD3>
- <KEYWORD3>_Transport</KEYWORD3>
- <KEYWORD3>_Triggerlevel</KEYWORD3>
- <KEYWORD3>_Unix</KEYWORD3>
- <KEYWORD3>_Windows</KEYWORD3>
- <KEYWORD3>_Wizard</KEYWORD3>
- <KEYWORD3>_Wrap</KEYWORD3>
- <KEYWORD3>French</KEYWORD3>
- <KEYWORD3>German</KEYWORD3>
- <KEYWORD3>Italian</KEYWORD3>
- <KEYWORD3>Japan</KEYWORD3>
- <KEYWORD3>Usa</KEYWORD3>
- <KEYWORD3>Lparameter</KEYWORD3>
- <KEYWORD3>This</KEYWORD3>
- <KEYWORD3>Thisform</KEYWORD3>
- <KEYWORD3>Thisformset</KEYWORD3>
- <KEYWORD3>F</KEYWORD3>
- <KEYWORD3>T</KEYWORD3>
- <KEYWORD3>N</KEYWORD3>
- <KEYWORD3>Y</KEYWORD3>
- <KEYWORD3>OlePublic</KEYWORD3>
- <KEYWORD3>Hidden</KEYWORD3>
- <KEYWORD3>Each</KEYWORD3>
- <KEYWORD3>DoEvents</KEYWORD3>
- <KEYWORD3>Dll</KEYWORD3>
- <KEYWORD3>Outer</KEYWORD3>
- <KEYWORD3>At_c</KEYWORD3>
- <KEYWORD3>Atcc</KEYWORD3>
- <KEYWORD3>Ratc</KEYWORD3>
- <KEYWORD3>Leftc</KEYWORD3>
- <KEYWORD3>Rightc</KEYWORD3>
- <KEYWORD3>Substrc</KEYWORD3>
- <KEYWORD3>Stuffc</KEYWORD3>
- <KEYWORD3>Lenc</KEYWORD3>
- <KEYWORD3>Chrtranc</KEYWORD3>
- <KEYWORD3>IsLeadByte</KEYWORD3>
- <KEYWORD3>IMEStatus</KEYWORD3>
- <KEYWORD3>Strconv</KEYWORD3>
- <KEYWORD3>BinToC</KEYWORD3>
- <KEYWORD3>CToBin</KEYWORD3>
- <KEYWORD3>IsFLocked</KEYWORD3>
- <KEYWORD3>IsRLocked</KEYWORD3>
- <KEYWORD3>LoadPicture</KEYWORD3>
- <KEYWORD3>SavePicture</KEYWORD3>
- <KEYWORD3>Assert</KEYWORD3>
- <KEYWORD3>DoDefault</KEYWORD3>
- <KEYWORD3>_WebMenu</KEYWORD3>
- <KEYWORD3>_scctext</KEYWORD3>
- <KEYWORD3>_WebVFPHomePage</KEYWORD3>
- <KEYWORD3>_WebVfpOnlineSupport</KEYWORD3>
- <KEYWORD3>_WebDevOnly</KEYWORD3>
- <KEYWORD3>_WebMsftHomePage</KEYWORD3>
- <KEYWORD3>_Coverage</KEYWORD3>
- <KEYWORD3>_vfp</KEYWORD3>
- <KEYWORD3>Bintoc</KEYWORD3>
- <KEYWORD3>Resources</KEYWORD3>
- <KEYWORD3>Ctobin</KEYWORD3>
- <KEYWORD3>Createoffline</KEYWORD3>
- <KEYWORD3>Debugout</KEYWORD3>
- <KEYWORD3>Doevents</KEYWORD3>
- <KEYWORD3>Dropoffline</KEYWORD3>
- <KEYWORD3>Each</KEYWORD3>
- <KEYWORD3>Isflocked</KEYWORD3>
- <KEYWORD3>Isrlocked</KEYWORD3>
- <KEYWORD3>Loadpicture</KEYWORD3>
- <KEYWORD3>Revertoffline</KEYWORD3>
- <KEYWORD3>Savepicture</KEYWORD3>
- <KEYWORD3>Asserts</KEYWORD3>
- <KEYWORD3>Coverage</KEYWORD3>
- <KEYWORD3>Eventtracking</KEYWORD3>
- <KEYWORD3>DBGetProp</KEYWORD3>
- <KEYWORD3>DBSetProp</KEYWORD3>
- <KEYWORD3>CursorGetProp</KEYWORD3>
- <KEYWORD3>CursorSetProp</KEYWORD3>
- <KEYWORD3>Addbs</KEYWORD3>
- <KEYWORD3>Agetclass</KEYWORD3>
- <KEYWORD3>Agetfileversion</KEYWORD3>
- <KEYWORD3>Alines</KEYWORD3>
- <KEYWORD3>Amouseobj</KEYWORD3>
- <KEYWORD3>Anetresources</KEYWORD3>
- <KEYWORD3>Avcxclasses</KEYWORD3>
- <KEYWORD3>Comclassinfo</KEYWORD3>
- <KEYWORD3>Createobjectex</KEYWORD3>
- <KEYWORD3>Defaultext</KEYWORD3>
- <KEYWORD3>Drivetype</KEYWORD3>
- <KEYWORD3>Filetostr</KEYWORD3>
- <KEYWORD3>Forceext</KEYWORD3>
- <KEYWORD3>Forcepath</KEYWORD3>
- <KEYWORD3>Gethost</KEYWORD3>
- <KEYWORD3>Indexseek</KEYWORD3>
- <KEYWORD3>Ishosted</KEYWORD3>
- <KEYWORD3>Justdrive</KEYWORD3>
- <KEYWORD3>Justext</KEYWORD3>
- <KEYWORD3>Justfname</KEYWORD3>
- <KEYWORD3>Justpath</KEYWORD3>
- <KEYWORD3>Juststem</KEYWORD3>
- <KEYWORD3>Newobject</KEYWORD3>
- <KEYWORD3>Olereturnerror</KEYWORD3>
- <KEYWORD3>Strtofile</KEYWORD3>
- <KEYWORD3>Vartype</KEYWORD3>
- <KEYWORD3>_Coverage</KEYWORD3>
- <KEYWORD3>_Gallery</KEYWORD3>
- <KEYWORD3>_Genhtml</KEYWORD3>
- <KEYWORD3>_Getexpr</KEYWORD3>
- <KEYWORD3>_Include</KEYWORD3>
- <KEYWORD3>_Runactivedoc</KEYWORD3>
- <KEYWORD3>ProjectHook</KEYWORD3>
- <KEYWORD3>ActiveDoc</KEYWORD3>
- <KEYWORD3>HyperLink</KEYWORD3>
- <KEYWORD3>Session</KEYWORD3>
- <KEYWORD3>Mtdll</KEYWORD3>
-
- <!-- New in Visual Foxpro 8.0 -->
- <KEYWORD3>ADOCKTIP</KEYWORD3>
- <KEYWORD3>ADirtip</KEYWORD3>
- <KEYWORD3>ADockState</KEYWORD3>
- <KEYWORD3>AEvents</KEYWORD3>
- <KEYWORD3>AFONTTIP</KEYWORD3>
- <KEYWORD3>ALanguage</KEYWORD3>
- <KEYWORD3>AProcInfo</KEYWORD3>
- <KEYWORD3>AStackInfo</KEYWORD3>
- <KEYWORD3>ATagInfo</KEYWORD3>
- <KEYWORD3>Adlls</KEYWORD3>
- <KEYWORD3>Alentip</KEYWORD3>
- <KEYWORD3>Amemberstip</KEYWORD3>
- <KEYWORD3>Amemberstip2</KEYWORD3>
- <KEYWORD3>Ascantip</KEYWORD3>
- <KEYWORD3>Aselobjtip</KEYWORD3>
- <KEYWORD3>Asessions</KEYWORD3>
- <KEYWORD3>Asorttip</KEYWORD3>
- <KEYWORD3>Asorttip2</KEYWORD3>
- <KEYWORD3>BINDEVENTTIP</KEYWORD3>
- <KEYWORD3>BindEvent</KEYWORD3>
- <KEYWORD3>COMARRAYTIP</KEYWORD3>
- <KEYWORD3>COMPROPTIP</KEYWORD3>
- <KEYWORD3>Candidate</KEYWORD3>
- <KEYWORD3>Cdx</KEYWORD3>
- <KEYWORD3>ComArray</KEYWORD3>
- <KEYWORD3>ComReturnError</KEYWORD3>
- <KEYWORD3>Comprop</KEYWORD3>
- <KEYWORD3>CreateBinary</KEYWORD3>
- <KEYWORD3>CursorToXML</KEYWORD3>
- <KEYWORD3>DIRTIP</KEYWORD3>
- <KEYWORD3>Descending</KEYWORD3>
- <KEYWORD3>DisplayPath</KEYWORD3>
- <KEYWORD3>EditSource</KEYWORD3>
- <KEYWORD3>EventHandler</KEYWORD3>
- <KEYWORD3>Evl</KEYWORD3>
- <KEYWORD3>ExecScript</KEYWORD3>
- <KEYWORD3>FCREATETIP</KEYWORD3>
- <KEYWORD3>FIELDTIP</KEYWORD3>
- <KEYWORD3>FILETIP</KEYWORD3>
- <KEYWORD3>FOPENTIP</KEYWORD3>
- <KEYWORD3>FSEEKTIP</KEYWORD3>
- <KEYWORD3>Fdate</KEYWORD3>
- <KEYWORD3>Ftime</KEYWORD3>
- <KEYWORD3>GetCursorAdapter</KEYWORD3>
- <KEYWORD3>GetInterface</KEYWORD3>
- <KEYWORD3>GetPem</KEYWORD3>
- <KEYWORD3>GetWordCount</KEYWORD3>
- <KEYWORD3>GetWordNum</KEYWORD3>
- <KEYWORD3>InputBox</KEYWORD3>
- <KEYWORD3>IsBlank</KEYWORD3>
- <KEYWORD3>IsMouse</KEYWORD3>
- <KEYWORD3>Like</KEYWORD3>
- <KEYWORD3>Likec</KEYWORD3>
- <KEYWORD3>Memory</KEYWORD3>
- <KEYWORD3>Msgboxtip</KEYWORD3>
- <KEYWORD3>Pcount</KEYWORD3>
- <KEYWORD3>PemStatus</KEYWORD3>
- <KEYWORD3>Popup</KEYWORD3>
- <KEYWORD3>Quarter</KEYWORD3>
- <KEYWORD3>RaiseEvent</KEYWORD3>
- <KEYWORD3>RemoveProperty</KEYWORD3>
- <KEYWORD3>SQLCancel</KEYWORD3>
- <KEYWORD3>SQLColumns</KEYWORD3>
- <KEYWORD3>SQLDisconnect</KEYWORD3>
- <KEYWORD3>SQLExec</KEYWORD3>
- <KEYWORD3>SQLGetProp</KEYWORD3>
- <KEYWORD3>SQLMoreResults</KEYWORD3>
- <KEYWORD3>SQLPrepare</KEYWORD3>
- <KEYWORD3>SQLSetProp</KEYWORD3>
- <KEYWORD3>SQLTables</KEYWORD3>
- <KEYWORD3>STRTOFILETIP</KEYWORD3>
- <KEYWORD3>Seconds</KEYWORD3>
- <KEYWORD3>StrExTip</KEYWORD3>
- <KEYWORD3>StrExtract</KEYWORD3>
- <KEYWORD3>Strtrantip</KEYWORD3>
- <KEYWORD3>Tagcount</KEYWORD3>
- <KEYWORD3>Tagno</KEYWORD3>
- <KEYWORD3>Textmerge</KEYWORD3>
- <KEYWORD3>Try</KEYWORD3>
- <KEYWORD3>UnBindEvents</KEYWORD3>
- <KEYWORD3>WDockable</KEYWORD3>
- <KEYWORD3>XMLTIP</KEYWORD3>
- <KEYWORD3>XMLTIP2</KEYWORD3>
- <KEYWORD3>XMLTIP3</KEYWORD3>
- <KEYWORD3>XMLTIP4</KEYWORD3>
- <KEYWORD3>XMLTIP5</KEYWORD3>
- <KEYWORD3>XMLTIP6</KEYWORD3>
- <KEYWORD3>XMLToCursor</KEYWORD3>
- <KEYWORD3>XMLUpdategram</KEYWORD3>
- <KEYWORD3>Blank</KEYWORD3>
- <KEYWORD3>Catch</KEYWORD3>
- <KEYWORD3>Dotip</KEYWORD3>
- <KEYWORD3>EndTry</KEYWORD3>
- <KEYWORD3>Finally</KEYWORD3>
- <KEYWORD3>Implements</KEYWORD3>
- <KEYWORD3>Opendatatip</KEYWORD3>
- <KEYWORD3>Repltip</KEYWORD3>
- <KEYWORD3>Throw</KEYWORD3>
- <KEYWORD3>Usetip</KEYWORD3>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <!-- Created by Matthew J. Price (Matt at SoWaky.com) -->
+ <PROPS>
+ <PROPERTY NAME="blockComment" VALUE="&&" />
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|do\swhile|do\scase|try)\s*\(|else\s*|elseif\s*\|case|catch(|for\s*\(.*\))[^{;]*)" />
+
+ <PROPERTY NAME="lineComment" VALUE="&&" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- String Literals -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- conditional compilation -->
+ <EOL_SPAN TYPE="KEYWORD2">#if</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#else</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#end</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#define</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#include</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#Elif</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#Else</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#Endif</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#If</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#Itsexpression</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#Readclauses</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#Region</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#Section</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#Undef</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#Wname</EOL_SPAN>
+
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="FALSE">&&</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">*</EOL_SPAN>
+
+ <!-- Comparison operators -->
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <!-- See in keywords: is -->
+
+ <!-- Arithmetic operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <!-- See in keywords: mod -->
+ <SEQ TYPE="OPERATOR">^</SEQ>
+
+ <!-- Concatenation operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+
+ <!-- Logical operators -->
+ <!-- See in keywords: and, or, not, xor, eqv -->
+
+ <!-- EOL Continuation -->
+ <!-- <SEQ TYPE="NULL">_</SEQ>-->
+ <!-- Instruction separator -->
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <KEYWORDS>
+ <FUNCTION>Function</FUNCTION>
+ <FUNCTION>Procedure</FUNCTION>
+ <FUNCTION>EndFunc</FUNCTION>
+ <FUNCTION>EndProc</FUNCTION>
+
+ <!-- Conditional Statements -->
+ <KEYWORD3>if</KEYWORD3>
+ <KEYWORD3>then</KEYWORD3>
+ <KEYWORD3>else</KEYWORD3>
+ <KEYWORD3>elseif</KEYWORD3>
+ <KEYWORD3>select</KEYWORD3>
+ <KEYWORD3>case</KEYWORD3>
+
+ <!-- Loop Statements -->
+ <!-- For..Next -->
+ <KEYWORD3>for</KEYWORD3>
+ <KEYWORD3>to</KEYWORD3>
+ <KEYWORD3>step</KEYWORD3>
+ <KEYWORD3>next</KEYWORD3>
+ <!-- For Each..Next -->
+ <KEYWORD3>each</KEYWORD3>
+ <KEYWORD3>in</KEYWORD3>
+ <!-- Do..Loop -->
+ <KEYWORD3>do</KEYWORD3>
+ <KEYWORD3>while</KEYWORD3>
+ <KEYWORD3>until</KEYWORD3>
+ <KEYWORD3>loop</KEYWORD3>
+ <!-- While..Wend -->
+ <KEYWORD3>wend</KEYWORD3>
+
+ <!-- Closing, Exit Statements -->
+ <KEYWORD3>exit</KEYWORD3>
+ <KEYWORD3>end</KEYWORD3>
+ <KEYWORD3>endif</KEYWORD3>
+
+ <!-- Methods, Functions, Class, Properties, Variables -->
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>property</KEYWORD3>
+ <KEYWORD3>get</KEYWORD3>
+ <KEYWORD3>let</KEYWORD3>
+ <KEYWORD3>set</KEYWORD3>
+
+ <!-- Parameters passing -->
+ <KEYWORD3>byval</KEYWORD3>
+ <KEYWORD3>byref</KEYWORD3>
+
+ <!-- Declaration -->
+ <KEYWORD3>const</KEYWORD3>
+ <KEYWORD3>dim</KEYWORD3>
+ <KEYWORD3>redim</KEYWORD3>
+ <KEYWORD3>preserve</KEYWORD3>
+ <KEYWORD3>as</KEYWORD3>
+
+ <!-- Object Assignement/Instantiation -->
+ <KEYWORD3>set</KEYWORD3>
+ <KEYWORD3>with</KEYWORD3>
+ <KEYWORD3>new</KEYWORD3>
+
+ <!-- Visibility -->
+ <KEYWORD3>public</KEYWORD3>
+ <KEYWORD3>default</KEYWORD3>
+ <KEYWORD3>private</KEYWORD3>
+
+ <!-- Comments -->
+ <KEYWORD3>rem</KEYWORD3>
+
+ <!-- Function Call - Dynamic Evaluation -->
+ <KEYWORD3>call</KEYWORD3>
+ <KEYWORD3>execute</KEYWORD3>
+ <KEYWORD3>eval</KEYWORD3>
+
+ <!-- Miscellaneous -->
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>error</KEYWORD3>
+ <KEYWORD3>goto</KEYWORD3>
+ <KEYWORD3>resume</KEYWORD3>
+ <KEYWORD3>option</KEYWORD3>
+ <KEYWORD3>explicit</KEYWORD3>
+ <KEYWORD3>erase</KEYWORD3>
+ <KEYWORD3>randomize</KEYWORD3>
+
+ <!-- Operators -->
+ <!-- Comparison operators -->
+ <OPERATOR>is</OPERATOR>
+ <!-- Arithmetic operators -->
+ <OPERATOR>mod</OPERATOR>
+ <!-- Logical operators -->
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+ <OPERATOR>xor</OPERATOR>
+ <OPERATOR>imp</OPERATOR>
+ <OPERATOR>?</OPERATOR>
+
+ <!-- Datatypes Constants/Literals -->
+ <KEYWORD3>false</KEYWORD3>
+ <KEYWORD3>true</KEYWORD3>
+ <KEYWORD3>empty</KEYWORD3>
+ <KEYWORD3>nothing</KEYWORD3>
+ <KEYWORD3>null</KEYWORD3>
+
+ <!-- FoxPro's Methods -->
+ <KEYWORD3>Activate</KEYWORD3>
+ <KEYWORD3>ActivateCell</KEYWORD3>
+ <KEYWORD3>AddColumn</KEYWORD3>
+ <KEYWORD3>AddItem</KEYWORD3>
+ <KEYWORD3>AddListItem</KEYWORD3>
+ <KEYWORD3>AddObject</KEYWORD3>
+ <KEYWORD3>AfterCloseTables</KEYWORD3>
+ <KEYWORD3>AfterDock</KEYWORD3>
+ <KEYWORD3>AfterRowColChange</KEYWORD3>
+ <KEYWORD3>BeforeDock</KEYWORD3>
+ <KEYWORD3>BeforeOpenTables</KEYWORD3>
+ <KEYWORD3>BeforeRowColChange</KEYWORD3>
+ <KEYWORD3>Box</KEYWORD3>
+ <KEYWORD3>Circle</KEYWORD3>
+ <KEYWORD3>Clear</KEYWORD3>
+ <KEYWORD3>Click</KEYWORD3>
+ <KEYWORD3>CloneObject</KEYWORD3>
+ <KEYWORD3>CloseEditor</KEYWORD3>
+ <KEYWORD3>CloseTables</KEYWORD3>
+ <KEYWORD3>Cls</KEYWORD3>
+ <KEYWORD3>DblClick</KEYWORD3>
+ <KEYWORD3>Deactivate</KEYWORD3>
+ <KEYWORD3>Delete</KEYWORD3>
+ <KEYWORD3>DeleteColumn</KEYWORD3>
+ <KEYWORD3>Deleted</KEYWORD3>
+ <KEYWORD3>Destroy</KEYWORD3>
+ <KEYWORD3>Dock</KEYWORD3>
+ <KEYWORD3>DoScroll</KEYWORD3>
+ <KEYWORD3>DoVerb</KEYWORD3>
+ <KEYWORD3>DownClick</KEYWORD3>
+ <KEYWORD3>Drag</KEYWORD3>
+ <KEYWORD3>DragDrop</KEYWORD3>
+ <KEYWORD3>DragOver</KEYWORD3>
+ <KEYWORD3>Draw</KEYWORD3>
+ <KEYWORD3>DropDown</KEYWORD3>
+ <KEYWORD3>Error</KEYWORD3>
+ <KEYWORD3>ErrorMessage</KEYWORD3>
+ <KEYWORD3>FormatChange</KEYWORD3>
+ <KEYWORD3>GotFocus</KEYWORD3>
+ <KEYWORD3>Hide</KEYWORD3>
+ <KEYWORD3>IndexToItemId</KEYWORD3>
+ <KEYWORD3>Init</KEYWORD3>
+ <KEYWORD3>InteractiveChange</KEYWORD3>
+ <KEYWORD3>ItemIdToIndex</KEYWORD3>
+ <KEYWORD3>KeyPress</KEYWORD3>
+ <KEYWORD3>Line</KEYWORD3>
+ <KEYWORD3>Load</KEYWORD3>
+ <KEYWORD3>LostFocus</KEYWORD3>
+ <KEYWORD3>Message</KEYWORD3>
+ <KEYWORD3>MouseDown</KEYWORD3>
+ <KEYWORD3>MouseMove</KEYWORD3>
+ <KEYWORD3>MouseUp</KEYWORD3>
+ <KEYWORD3>Move</KEYWORD3>
+ <KEYWORD3>Moved</KEYWORD3>
+ <KEYWORD3>OpenEditor</KEYWORD3>
+ <KEYWORD3>OpenTables</KEYWORD3>
+ <KEYWORD3>Paint</KEYWORD3>
+ <KEYWORD3>Point</KEYWORD3>
+ <KEYWORD3>Print</KEYWORD3>
+ <KEYWORD3>ProgrammaticChange</KEYWORD3>
+ <KEYWORD3>PSet</KEYWORD3>
+ <KEYWORD3>QueryUnload</KEYWORD3>
+ <KEYWORD3>RangeHigh</KEYWORD3>
+ <KEYWORD3>RangeLow</KEYWORD3>
+ <KEYWORD3>ReadActivate</KEYWORD3>
+ <KEYWORD3>ReadDeactivate</KEYWORD3>
+ <KEYWORD3>ReadExpression</KEYWORD3>
+ <KEYWORD3>ReadMethod</KEYWORD3>
+ <KEYWORD3>ReadShow</KEYWORD3>
+ <KEYWORD3>ReadValid</KEYWORD3>
+ <KEYWORD3>ReadWhen</KEYWORD3>
+ <KEYWORD3>Refresh</KEYWORD3>
+ <KEYWORD3>Release</KEYWORD3>
+ <KEYWORD3>RemoveItem</KEYWORD3>
+ <KEYWORD3>RemoveListItem</KEYWORD3>
+ <KEYWORD3>RemoveObject</KEYWORD3>
+ <KEYWORD3>Requery</KEYWORD3>
+ <KEYWORD3>Reset</KEYWORD3>
+ <KEYWORD3>Resize</KEYWORD3>
+ <KEYWORD3>RightClick</KEYWORD3>
+ <KEYWORD3>SaveAs</KEYWORD3>
+ <KEYWORD3>SaveAsClass</KEYWORD3>
+ <KEYWORD3>Scrolled</KEYWORD3>
+ <KEYWORD3>SetAll</KEYWORD3>
+ <KEYWORD3>SetFocus</KEYWORD3>
+ <KEYWORD3>Show</KEYWORD3>
+ <KEYWORD3>TextHeight</KEYWORD3>
+ <KEYWORD3>TextWidth</KEYWORD3>
+ <KEYWORD3>Timer</KEYWORD3>
+ <KEYWORD3>UIEnable</KEYWORD3>
+ <KEYWORD3>UnDock</KEYWORD3>
+ <KEYWORD3>Unload</KEYWORD3>
+ <KEYWORD3>UpClick</KEYWORD3>
+ <KEYWORD3>Valid</KEYWORD3>
+ <KEYWORD3>When</KEYWORD3>
+ <KEYWORD3>WriteExpression</KEYWORD3>
+ <KEYWORD3>WriteMethod</KEYWORD3>
+ <KEYWORD3>ZOrder</KEYWORD3>
+ <KEYWORD3>DataToClip</KEYWORD3>
+ <KEYWORD3>DoCmd</KEYWORD3>
+ <KEYWORD3>MiddleClick</KEYWORD3>
+ <KEYWORD3>MouseWheel</KEYWORD3>
+ <KEYWORD3>RequestData</KEYWORD3>
+ <KEYWORD3>SetVar</KEYWORD3>
+ <KEYWORD3>ShowWhatsThis</KEYWORD3>
+ <KEYWORD3>WhatsThisMode</KEYWORD3>
+ <KEYWORD3>AddProperty</KEYWORD3>
+ <KEYWORD3>NewObject</KEYWORD3>
+ <KEYWORD3>CommandTargetExec</KEYWORD3>
+ <KEYWORD3>CommandTargetQueryStas</KEYWORD3>
+ <KEYWORD3>ContainerRelease</KEYWORD3>
+ <KEYWORD3>EnterFocus</KEYWORD3>
+ <KEYWORD3>ExitFocus</KEYWORD3>
+ <KEYWORD3>HideDoc</KEYWORD3>
+ <KEYWORD3>Run</KEYWORD3>
+ <KEYWORD3>ShowDoc</KEYWORD3>
+ <KEYWORD3>ClearData</KEYWORD3>
+ <KEYWORD3>GetData</KEYWORD3>
+ <KEYWORD3>GetFormat</KEYWORD3>
+ <KEYWORD3>SetData</KEYWORD3>
+ <KEYWORD3>SetFormat</KEYWORD3>
+ <KEYWORD3>OLECompleteDrag</KEYWORD3>
+ <KEYWORD3>OLEGiveFeedback</KEYWORD3>
+ <KEYWORD3>OLESetData</KEYWORD3>
+ <KEYWORD3>OLEStartDrag</KEYWORD3>
+ <KEYWORD3>OLEDrag</KEYWORD3>
+ <KEYWORD3>OLEDragDrop</KEYWORD3>
+ <KEYWORD3>OLEDragOver</KEYWORD3>
+ <KEYWORD3>SetMain</KEYWORD3>
+ <KEYWORD3>AfterBuild</KEYWORD3>
+ <KEYWORD3>BeforeBuild</KEYWORD3>
+ <KEYWORD3>QueryAddFile</KEYWORD3>
+ <KEYWORD3>QueryModifyFile</KEYWORD3>
+ <KEYWORD3>QueryRemoveFile</KEYWORD3>
+ <KEYWORD3>QueryRunFile</KEYWORD3>
+ <KEYWORD3>Add</KEYWORD3>
+ <KEYWORD3>AddToSCC</KEYWORD3>
+ <KEYWORD3>CheckIn</KEYWORD3>
+ <KEYWORD3>CheckOut</KEYWORD3>
+ <KEYWORD3>GetLatestVersion</KEYWORD3>
+ <KEYWORD3>RemoveFromSCC</KEYWORD3>
+ <KEYWORD3>UndoCheckOut</KEYWORD3>
+ <KEYWORD3>Modify</KEYWORD3>
+
+ <!-- FoxPro's Properties -->
+ <KEYWORD3>Accelerate</KEYWORD3>
+ <KEYWORD3>ActiveColumn</KEYWORD3>
+ <KEYWORD3>ActiveControl</KEYWORD3>
+ <KEYWORD3>ActiveForm</KEYWORD3>
+ <KEYWORD3>ActiveObjectId</KEYWORD3>
+ <KEYWORD3>ActivePage</KEYWORD3>
+ <KEYWORD3>ActiveRow</KEYWORD3>
+ <KEYWORD3>Alias</KEYWORD3>
+ <KEYWORD3>Alignment</KEYWORD3>
+ <KEYWORD3>AllowResize</KEYWORD3>
+ <KEYWORD3>AllowTabs</KEYWORD3>
+ <KEYWORD3>AlwaysOnTop</KEYWORD3>
+ <KEYWORD3>ATGetColors</KEYWORD3>
+ <KEYWORD3>ATListColors</KEYWORD3>
+ <KEYWORD3>AutoActivate</KEYWORD3>
+ <KEYWORD3>AutoCenter</KEYWORD3>
+ <KEYWORD3>AutoCloseTables</KEYWORD3>
+ <KEYWORD3>AutoOpenTables</KEYWORD3>
+ <KEYWORD3>AutoRelease</KEYWORD3>
+ <KEYWORD3>AutoSize</KEYWORD3>
+ <KEYWORD3>AvailNum</KEYWORD3>
+ <KEYWORD3>BackColor</KEYWORD3>
+ <KEYWORD3>BackStyle</KEYWORD3>
+ <KEYWORD3>BaseClass</KEYWORD3>
+ <KEYWORD3>BorderColor</KEYWORD3>
+ <KEYWORD3>BorderStyle</KEYWORD3>
+ <KEYWORD3>BorderWidth</KEYWORD3>
+ <KEYWORD3>Bound</KEYWORD3>
+ <KEYWORD3>BoundColumn</KEYWORD3>
+ <KEYWORD3>BrowseAlignment</KEYWORD3>
+ <KEYWORD3>BrowseCellMarg</KEYWORD3>
+ <KEYWORD3>BrowseDestWidth</KEYWORD3>
+ <KEYWORD3>BufferMode</KEYWORD3>
+ <KEYWORD3>BufferModeOverride</KEYWORD3>
+ <KEYWORD3>ButtonCount</KEYWORD3>
+ <KEYWORD3>ButtonIndex</KEYWORD3>
+ <KEYWORD3>Buttons</KEYWORD3>
+ <KEYWORD3>CanAccelerate</KEYWORD3>
+ <KEYWORD3>Cancel</KEYWORD3>
+ <KEYWORD3>CanGetFocus</KEYWORD3>
+ <KEYWORD3>CanLoseFocus</KEYWORD3>
+ <KEYWORD3>Caption</KEYWORD3>
+ <KEYWORD3>ChildAlias</KEYWORD3>
+ <KEYWORD3>ChildOrder</KEYWORD3>
+ <KEYWORD3>Class</KEYWORD3>
+ <KEYWORD3>ClassLibrary</KEYWORD3>
+ <KEYWORD3>ClipControls</KEYWORD3>
+ <KEYWORD3>ClipRect</KEYWORD3>
+ <KEYWORD3>Closable</KEYWORD3>
+ <KEYWORD3>ColorScheme</KEYWORD3>
+ <KEYWORD3>ColorSource</KEYWORD3>
+ <KEYWORD3>ColumnCount</KEYWORD3>
+ <KEYWORD3>ColumnHeaders</KEYWORD3>
+ <KEYWORD3>ColumnLines</KEYWORD3>
+ <KEYWORD3>ColumnOrder</KEYWORD3>
+ <KEYWORD3>Columns</KEYWORD3>
+ <KEYWORD3>ColumnWidths</KEYWORD3>
+ <KEYWORD3>Comment</KEYWORD3>
+ <KEYWORD3>ControlBox</KEYWORD3>
+ <KEYWORD3>ControlCount</KEYWORD3>
+ <KEYWORD3>ControlIndex</KEYWORD3>
+ <KEYWORD3>Controls</KEYWORD3>
+ <KEYWORD3>ControlSource</KEYWORD3>
+ <KEYWORD3>CurrentControl</KEYWORD3>
+ <KEYWORD3>CurrentX</KEYWORD3>
+ <KEYWORD3>CurrentY</KEYWORD3>
+ <KEYWORD3>CursorSource</KEYWORD3>
+ <KEYWORD3>Curvature</KEYWORD3>
+ <KEYWORD3>Database</KEYWORD3>
+ <KEYWORD3>DataSession</KEYWORD3>
+ <KEYWORD3>DataSessionId</KEYWORD3>
+ <KEYWORD3>DataSourceObj</KEYWORD3>
+ <KEYWORD3>DataType</KEYWORD3>
+ <KEYWORD3>Default</KEYWORD3>
+ <KEYWORD3>DefButton</KEYWORD3>
+ <KEYWORD3>DefButtonOrig</KEYWORD3>
+ <KEYWORD3>DefHeight</KEYWORD3>
+ <KEYWORD3>DefineWindows</KEYWORD3>
+ <KEYWORD3>DefLeft</KEYWORD3>
+ <KEYWORD3>DefTop</KEYWORD3>
+ <KEYWORD3>DefWidth</KEYWORD3>
+ <KEYWORD3>DeleteMark</KEYWORD3>
+ <KEYWORD3>Desktop</KEYWORD3>
+ <KEYWORD3>Dirty</KEYWORD3>
+ <KEYWORD3>DisabledBackColor</KEYWORD3>
+ <KEYWORD3>DisabledByEOF</KEYWORD3>
+ <KEYWORD3>DisabledForeColor</KEYWORD3>
+ <KEYWORD3>DisabledItemBackColor</KEYWORD3>
+ <KEYWORD3>DisabledItemForeColor</KEYWORD3>
+ <KEYWORD3>DisabledPicture</KEYWORD3>
+ <KEYWORD3>DisplayValue</KEYWORD3>
+ <KEYWORD3>DispPageHeight</KEYWORD3>
+ <KEYWORD3>DispPageWidth</KEYWORD3>
+ <KEYWORD3>Docked</KEYWORD3>
+ <KEYWORD3>DockPosition</KEYWORD3>
+ <KEYWORD3>DoCreate</KEYWORD3>
+ <KEYWORD3>DocumentFile</KEYWORD3>
+ <KEYWORD3>DownPicture</KEYWORD3>
+ <KEYWORD3>DragIcon</KEYWORD3>
+ <KEYWORD3>DragMode</KEYWORD3>
+ <KEYWORD3>DragState</KEYWORD3>
+ <KEYWORD3>DrawMode</KEYWORD3>
+ <KEYWORD3>DrawStyle</KEYWORD3>
+ <KEYWORD3>DrawWidth</KEYWORD3>
+ <KEYWORD3>DynamicAlignment</KEYWORD3>
+ <KEYWORD3>DynamicBackColor</KEYWORD3>
+ <KEYWORD3>DynamicCurrentControl</KEYWORD3>
+ <KEYWORD3>DynamicFontBold</KEYWORD3>
+ <KEYWORD3>DynamicFontItalic</KEYWORD3>
+ <KEYWORD3>DynamicFontName</KEYWORD3>
+ <KEYWORD3>DynamicFontOutline</KEYWORD3>
+ <KEYWORD3>DynamicFontShadow</KEYWORD3>
+ <KEYWORD3>DynamicFontSize</KEYWORD3>
+ <KEYWORD3>DynamicFontStrikethru</KEYWORD3>
+ <KEYWORD3>DynamicFontUnderline</KEYWORD3>
+ <KEYWORD3>DynamicForeColor</KEYWORD3>
+ <KEYWORD3>EditFlags</KEYWORD3>
+ <KEYWORD3>Enabled</KEYWORD3>
+ <KEYWORD3>EnabledByReadLock</KEYWORD3>
+ <KEYWORD3>EnvLevel</KEYWORD3>
+ <KEYWORD3>ErasePage</KEYWORD3>
+ <KEYWORD3>FillColor</KEYWORD3>
+ <KEYWORD3>FillStyle</KEYWORD3>
+ <KEYWORD3>Filter</KEYWORD3>
+ <KEYWORD3>FirstElement</KEYWORD3>
+ <KEYWORD3>FontBold</KEYWORD3>
+ <KEYWORD3>FontItalic</KEYWORD3>
+ <KEYWORD3>FontName</KEYWORD3>
+ <KEYWORD3>FontOutline</KEYWORD3>
+ <KEYWORD3>FontShadow</KEYWORD3>
+ <KEYWORD3>FontSize</KEYWORD3>
+ <KEYWORD3>FontStrikethru</KEYWORD3>
+ <KEYWORD3>FontUnderline</KEYWORD3>
+ <KEYWORD3>ForceFocus</KEYWORD3>
+ <KEYWORD3>ForeColor</KEYWORD3>
+ <KEYWORD3>Format</KEYWORD3>
+ <KEYWORD3>FormCount</KEYWORD3>
+ <KEYWORD3>FormIndex</KEYWORD3>
+ <KEYWORD3>FormPageCount</KEYWORD3>
+ <KEYWORD3>FormPageIndex</KEYWORD3>
+ <KEYWORD3>Forms</KEYWORD3>
+ <KEYWORD3>FoxFont</KEYWORD3>
+ <KEYWORD3>GoFirst</KEYWORD3>
+ <KEYWORD3>GoLast</KEYWORD3>
+ <KEYWORD3>GridLineColor</KEYWORD3>
+ <KEYWORD3>GridLines</KEYWORD3>
+ <KEYWORD3>GridLineWidth</KEYWORD3>
+ <KEYWORD3>HalfHeightCaption</KEYWORD3>
+ <KEYWORD3>HasClip</KEYWORD3>
+ <KEYWORD3>HeaderGap</KEYWORD3>
+ <KEYWORD3>HeaderHeight</KEYWORD3>
+ <KEYWORD3>Height</KEYWORD3>
+ <KEYWORD3>HelpContextID</KEYWORD3>
+ <KEYWORD3>HideSelection</KEYWORD3>
+ <KEYWORD3>Highlight</KEYWORD3>
+ <KEYWORD3>HostName</KEYWORD3>
+ <KEYWORD3>HotKey</KEYWORD3>
+ <KEYWORD3>HPROJ</KEYWORD3>
+ <KEYWORD3>HWnd</KEYWORD3>
+ <KEYWORD3>Icon</KEYWORD3>
+ <KEYWORD3>IgnoreInsert</KEYWORD3>
+ <KEYWORD3>Increment</KEYWORD3>
+ <KEYWORD3>IncrementalSearch</KEYWORD3>
+ <KEYWORD3>InitialSelectedAlias</KEYWORD3>
+ <KEYWORD3>InputMask</KEYWORD3>
+ <KEYWORD3>InResize</KEYWORD3>
+ <KEYWORD3>Interval</KEYWORD3>
+ <KEYWORD3>ItemBackColor</KEYWORD3>
+ <KEYWORD3>ItemData</KEYWORD3>
+ <KEYWORD3>ItemForeColor</KEYWORD3>
+ <KEYWORD3>ItemIDData</KEYWORD3>
+ <KEYWORD3>JustReadLocked</KEYWORD3>
+ <KEYWORD3>KeyboardHighValue</KEYWORD3>
+ <KEYWORD3>KeyboardLowValue</KEYWORD3>
+ <KEYWORD3>KeyPreview</KEYWORD3>
+ <KEYWORD3>Left</KEYWORD3>
+ <KEYWORD3>LeftColumn</KEYWORD3>
+ <KEYWORD3>LineSlant</KEYWORD3>
+ <KEYWORD3>LinkMaster</KEYWORD3>
+ <KEYWORD3>List</KEYWORD3>
+ <KEYWORD3>ListCount</KEYWORD3>
+ <KEYWORD3>ListIndex</KEYWORD3>
+ <KEYWORD3>ListItem</KEYWORD3>
+ <KEYWORD3>ListItemId</KEYWORD3>
+ <KEYWORD3>LockDataSource</KEYWORD3>
+ <KEYWORD3>LockScreen</KEYWORD3>
+ <KEYWORD3>Margin</KEYWORD3>
+ <KEYWORD3>MaxButton</KEYWORD3>
+ <KEYWORD3>MaxHeight</KEYWORD3>
+ <KEYWORD3>MaxLeft</KEYWORD3>
+ <KEYWORD3>MaxLength</KEYWORD3>
+ <KEYWORD3>MaxTop</KEYWORD3>
+ <KEYWORD3>MaxWidth</KEYWORD3>
+ <KEYWORD3>MDIForm</KEYWORD3>
+ <KEYWORD3>MemoWindow</KEYWORD3>
+ <KEYWORD3>MinButton</KEYWORD3>
+ <KEYWORD3>MinHeight</KEYWORD3>
+ <KEYWORD3>MinWidth</KEYWORD3>
+ <KEYWORD3>MousePointer</KEYWORD3>
+ <KEYWORD3>Movable</KEYWORD3>
+ <KEYWORD3>MoverBars</KEYWORD3>
+ <KEYWORD3>MultiSelect</KEYWORD3>
+ <KEYWORD3>Name</KEYWORD3>
+ <KEYWORD3>NapTime</KEYWORD3>
+ <KEYWORD3>NewIndex</KEYWORD3>
+ <KEYWORD3>NewItemId</KEYWORD3>
+ <KEYWORD3>NoDataOnLoad</KEYWORD3>
+ <KEYWORD3>NoDefine</KEYWORD3>
+ <KEYWORD3>NotifyContainer</KEYWORD3>
+ <KEYWORD3>NumberOfElements</KEYWORD3>
+ <KEYWORD3>OleClass</KEYWORD3>
+ <KEYWORD3>OleClassId</KEYWORD3>
+ <KEYWORD3>OleControlContainer</KEYWORD3>
+ <KEYWORD3>OleIDispatchIncoming</KEYWORD3>
+ <KEYWORD3>OleIDispatchOutgoing</KEYWORD3>
+ <KEYWORD3>OleIDispInValue</KEYWORD3>
+ <KEYWORD3>OleIDispOutValue</KEYWORD3>
+ <KEYWORD3>OLETypeAllowed</KEYWORD3>
+ <KEYWORD3>OneToMany</KEYWORD3>
+ <KEYWORD3>OnResize</KEYWORD3>
+ <KEYWORD3>OpenWindow</KEYWORD3>
+ <KEYWORD3>PageCount</KEYWORD3>
+ <KEYWORD3>PageHeight</KEYWORD3>
+ <KEYWORD3>PageOrder</KEYWORD3>
+ <KEYWORD3>Pages</KEYWORD3>
+ <KEYWORD3>PageWidth</KEYWORD3>
+ <KEYWORD3>Panel</KEYWORD3>
+ <KEYWORD3>PanelLink</KEYWORD3>
+ <KEYWORD3>Parent</KEYWORD3>
+ <KEYWORD3>ParentAlias</KEYWORD3>
+ <KEYWORD3>ParentClass</KEYWORD3>
+ <KEYWORD3>Partition</KEYWORD3>
+ <KEYWORD3>PasswordChar</KEYWORD3>
+ <KEYWORD3>Picture</KEYWORD3>
+ <KEYWORD3>ReadColors</KEYWORD3>
+ <KEYWORD3>ReadCycle</KEYWORD3>
+ <KEYWORD3>ReadFiller</KEYWORD3>
+ <KEYWORD3>ReadLock</KEYWORD3>
+ <KEYWORD3>ReadMouse</KEYWORD3>
+ <KEYWORD3>ReadOnly</KEYWORD3>
+ <KEYWORD3>ReadSave</KEYWORD3>
+ <KEYWORD3>ReadSize</KEYWORD3>
+ <KEYWORD3>ReadTimeout</KEYWORD3>
+ <KEYWORD3>RecordMark</KEYWORD3>
+ <KEYWORD3>RecordSource</KEYWORD3>
+ <KEYWORD3>RecordSourceType</KEYWORD3>
+ <KEYWORD3>Rect</KEYWORD3>
+ <KEYWORD3>RelationalExpr</KEYWORD3>
+ <KEYWORD3>RelativeColumn</KEYWORD3>
+ <KEYWORD3>RelativeRow</KEYWORD3>
+ <KEYWORD3>ReleaseErase</KEYWORD3>
+ <KEYWORD3>ReleaseType</KEYWORD3>
+ <KEYWORD3>ReleaseWindows</KEYWORD3>
+ <KEYWORD3>Resizable</KEYWORD3>
+ <KEYWORD3>RowHeight</KEYWORD3>
+ <KEYWORD3>RowSource</KEYWORD3>
+ <KEYWORD3>RowSourceType</KEYWORD3>
+ <KEYWORD3>ScaleMode</KEYWORD3>
+ <KEYWORD3>ScrollBars</KEYWORD3>
+ <KEYWORD3>Selected</KEYWORD3>
+ <KEYWORD3>SelectedBackColor</KEYWORD3>
+ <KEYWORD3>SelectedForeColor</KEYWORD3>
+ <KEYWORD3>SelectedID</KEYWORD3>
+ <KEYWORD3>SelectedItemBackColor</KEYWORD3>
+ <KEYWORD3>SelectedItemForeColor</KEYWORD3>
+ <KEYWORD3>SelectOnEntry</KEYWORD3>
+ <KEYWORD3>SelfEdit</KEYWORD3>
+ <KEYWORD3>SelLength</KEYWORD3>
+ <KEYWORD3>SelStart</KEYWORD3>
+ <KEYWORD3>SelText</KEYWORD3>
+ <KEYWORD3>ShowTips</KEYWORD3>
+ <KEYWORD3>Sizable</KEYWORD3>
+ <KEYWORD3>Skip</KEYWORD3>
+ <KEYWORD3>SkipForm</KEYWORD3>
+ <KEYWORD3>Sorted</KEYWORD3>
+ <KEYWORD3>SourceType</KEYWORD3>
+ <KEYWORD3>Sparse</KEYWORD3>
+ <KEYWORD3>SpecialEffect</KEYWORD3>
+ <KEYWORD3>SpinnerHighValue</KEYWORD3>
+ <KEYWORD3>SpinnerLowValue</KEYWORD3>
+ <KEYWORD3>StatusBarText</KEYWORD3>
+ <KEYWORD3>Stretch</KEYWORD3>
+ <KEYWORD3>Style</KEYWORD3>
+ <KEYWORD3>SystemRefCount</KEYWORD3>
+ <KEYWORD3>Tabhit</KEYWORD3>
+ <KEYWORD3>TabIndex</KEYWORD3>
+ <KEYWORD3>Tabs</KEYWORD3>
+ <KEYWORD3>TabStop</KEYWORD3>
+ <KEYWORD3>TabStretch</KEYWORD3>
+ <KEYWORD3>Tag</KEYWORD3>
+ <KEYWORD3>TerminateRead</KEYWORD3>
+ <KEYWORD3>ToolTipText</KEYWORD3>
+ <KEYWORD3>Top</KEYWORD3>
+ <KEYWORD3>TopIndex</KEYWORD3>
+ <KEYWORD3>TopItemId</KEYWORD3>
+ <KEYWORD3>UnlockDataSource</KEYWORD3>
+ <KEYWORD3>Value</KEYWORD3>
+ <KEYWORD3>ValueDirty</KEYWORD3>
+ <KEYWORD3>View</KEYWORD3>
+ <KEYWORD3>Visible</KEYWORD3>
+ <KEYWORD3>WasActive</KEYWORD3>
+ <KEYWORD3>WasOpen</KEYWORD3>
+ <KEYWORD3>Width</KEYWORD3>
+ <KEYWORD3>WindowList</KEYWORD3>
+ <KEYWORD3>WindowNTIList</KEYWORD3>
+ <KEYWORD3>WindowState</KEYWORD3>
+ <KEYWORD3>WindowType</KEYWORD3>
+ <KEYWORD3>WordWrap</KEYWORD3>
+ <KEYWORD3>ZOrderSet</KEYWORD3>
+ <KEYWORD3>AllowAddNew</KEYWORD3>
+ <KEYWORD3>AllowHeaderSizing</KEYWORD3>
+ <KEYWORD3>AllowRowSizing</KEYWORD3>
+ <KEYWORD3>Application</KEYWORD3>
+ <KEYWORD3>AutoVerbMenu</KEYWORD3>
+ <KEYWORD3>AutoYield</KEYWORD3>
+ <KEYWORD3>BoundTo</KEYWORD3>
+ <KEYWORD3>DateFormat</KEYWORD3>
+ <KEYWORD3>DateMark</KEYWORD3>
+ <KEYWORD3>DefaultFilePath</KEYWORD3>
+ <KEYWORD3>FullName</KEYWORD3>
+ <KEYWORD3>Hours</KEYWORD3>
+ <KEYWORD3>IMEMode</KEYWORD3>
+ <KEYWORD3>IntegralHeight</KEYWORD3>
+ <KEYWORD3>ItemTips</KEYWORD3>
+ <KEYWORD3>MouseIcon</KEYWORD3>
+ <KEYWORD3>NullDisplay</KEYWORD3>
+ <KEYWORD3>OLERequestPendingTimou</KEYWORD3>
+ <KEYWORD3>OLEServerBusyRaiseErro</KEYWORD3>
+ <KEYWORD3>OLEServerBusyTimout</KEYWORD3>
+ <KEYWORD3>OpenViews</KEYWORD3>
+ <KEYWORD3>RightToLeft</KEYWORD3>
+ <KEYWORD3>SDIForm</KEYWORD3>
+ <KEYWORD3>ShowWindow</KEYWORD3>
+ <KEYWORD3>SplitBar</KEYWORD3>
+ <KEYWORD3>StrictDateEntry</KEYWORD3>
+ <KEYWORD3>TabStyle</KEYWORD3>
+ <KEYWORD3>WhatsThisButton</KEYWORD3>
+ <KEYWORD3>WhatsThisHelp</KEYWORD3>
+ <KEYWORD3>WhatsThisHelpID</KEYWORD3>
+ <KEYWORD3>DisplayCount</KEYWORD3>
+ <KEYWORD3>ContinuousScroll</KEYWORD3>
+ <KEYWORD3>HscrollSmallChange</KEYWORD3>
+ <KEYWORD3>TitleBar</KEYWORD3>
+ <KEYWORD3>VscrollSmallChange</KEYWORD3>
+ <KEYWORD3>ViewPortTop</KEYWORD3>
+ <KEYWORD3>ViewPortLeft</KEYWORD3>
+ <KEYWORD3>ViewPortHeight</KEYWORD3>
+ <KEYWORD3>ViewPortWidth</KEYWORD3>
+ <KEYWORD3>SetViewPort</KEYWORD3>
+ <KEYWORD3>Scrolled</KEYWORD3>
+ <KEYWORD3>StartMode</KEYWORD3>
+ <KEYWORD3>ServerName</KEYWORD3>
+ <KEYWORD3>OLEDragMode</KEYWORD3>
+ <KEYWORD3>OLEDragPicture</KEYWORD3>
+ <KEYWORD3>OLEDropEffects</KEYWORD3>
+ <KEYWORD3>OLEDropHasData</KEYWORD3>
+ <KEYWORD3>OLEDropMode</KEYWORD3>
+ <KEYWORD3>ActiveProject</KEYWORD3>
+ <KEYWORD3>Projects</KEYWORD3>
+ <KEYWORD3>AutoIncrement</KEYWORD3>
+ <KEYWORD3>BuildDateTime</KEYWORD3>
+ <KEYWORD3>Debug</KEYWORD3>
+ <KEYWORD3>Encrypted</KEYWORD3>
+ <KEYWORD3>Files</KEYWORD3>
+ <KEYWORD3>HomeDir</KEYWORD3>
+ <KEYWORD3>MainClass</KEYWORD3>
+ <KEYWORD3>MainFile</KEYWORD3>
+ <KEYWORD3>ProjectHookClass</KEYWORD3>
+ <KEYWORD3>ProjectHookLibrary</KEYWORD3>
+ <KEYWORD3>SCCProvider</KEYWORD3>
+ <KEYWORD3>ServerHelpFile</KEYWORD3>
+ <KEYWORD3>ServerProject</KEYWORD3>
+ <KEYWORD3>TypeLibCLSID</KEYWORD3>
+ <KEYWORD3>TypeLibDesc</KEYWORD3>
+ <KEYWORD3>TypeLibName</KEYWORD3>
+ <KEYWORD3>VersionComments</KEYWORD3>
+ <KEYWORD3>VersionCompany</KEYWORD3>
+ <KEYWORD3>VersionCopyright</KEYWORD3>
+ <KEYWORD3>VersionDescription</KEYWORD3>
+ <KEYWORD3>VersionNumber</KEYWORD3>
+ <KEYWORD3>VersionProduct</KEYWORD3>
+ <KEYWORD3>VersionTrademarks</KEYWORD3>
+ <KEYWORD3>Item</KEYWORD3>
+ <KEYWORD3>CodePage</KEYWORD3>
+ <KEYWORD3>Description</KEYWORD3>
+ <KEYWORD3>FileClass</KEYWORD3>
+ <KEYWORD3>FileClassLibrary</KEYWORD3>
+ <KEYWORD3>LastModified</KEYWORD3>
+ <KEYWORD3>SCCStatus</KEYWORD3>
+ <KEYWORD3>CLSID</KEYWORD3>
+ <KEYWORD3>Instancing</KEYWORD3>
+ <KEYWORD3>ProgID</KEYWORD3>
+ <KEYWORD3>ServerClass</KEYWORD3>
+ <KEYWORD3>ServerClassLibrary</KEYWORD3>
+ <KEYWORD3>ThreadID</KEYWORD3>
+ <KEYWORD3>ProcessID</KEYWORD3>
+ <KEYWORD3>AddLineFeeds</KEYWORD3>
+
+ <!-- Other FoxPro's Keywords -->
+ <KEYWORD3>MULTILOCKS</KEYWORD3>
+ <KEYWORD3>FULLPATH</KEYWORD3>
+ <KEYWORD3>UNIQUE</KEYWORD3>
+ <KEYWORD3>CLASSLIB</KEYWORD3>
+ <KEYWORD3>LIBRARY</KEYWORD3>
+ <KEYWORD3>structure</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>production</KEYWORD3>
+ <KEYWORD3>path</KEYWORD3>
+ <KEYWORD3>date</KEYWORD3>
+ <KEYWORD3>datetime</KEYWORD3>
+ <KEYWORD3>rest</KEYWORD3>
+ <KEYWORD3>fields</KEYWORD3>
+ <KEYWORD3>array</KEYWORD3>
+ <KEYWORD3>free</KEYWORD3>
+ <KEYWORD3>structure</KEYWORD3>
+ <KEYWORD3>ASCENDING</KEYWORD3>
+ <KEYWORD3>window</KEYWORD3>
+ <KEYWORD3>nowait</KEYWORD3>
+ <KEYWORD3>between</KEYWORD3>
+ <KEYWORD3>dbf</KEYWORD3>
+ <KEYWORD3>noconsole</KEYWORD3>
+ <KEYWORD3>dif</KEYWORD3>
+ <KEYWORD3>xls</KEYWORD3>
+ <KEYWORD3>csv</KEYWORD3>
+ <KEYWORD3>delimited</KEYWORD3>
+ <KEYWORD3>right</KEYWORD3>
+ <KEYWORD3>decimal</KEYWORD3>
+ <KEYWORD3>additive</KEYWORD3>
+ <KEYWORD3>between</KEYWORD3>
+ <KEYWORD3>noupdate</KEYWORD3>
+
+ <KEYWORD3>Abs</KEYWORD3>
+ <KEYWORD3>Accept</KEYWORD3>
+ <KEYWORD3>Access</KEYWORD3>
+ <KEYWORD3>Aclass</KEYWORD3>
+ <KEYWORD3>Acopy</KEYWORD3>
+ <KEYWORD3>Acos</KEYWORD3>
+ <KEYWORD3>Adatabases</KEYWORD3>
+ <KEYWORD3>Adbobjects</KEYWORD3>
+ <KEYWORD3>Add</KEYWORD3>
+ <KEYWORD3>Addrelationtoenv</KEYWORD3>
+ <KEYWORD3>Addtabletoenv</KEYWORD3>
+ <KEYWORD3>Adel</KEYWORD3>
+ <KEYWORD3>Adir</KEYWORD3>
+ <KEYWORD3>Aelement</KEYWORD3>
+ <KEYWORD3>Aerror</KEYWORD3>
+ <KEYWORD3>Afields</KEYWORD3>
+ <KEYWORD3>Afont</KEYWORD3>
+ <KEYWORD3>Again</KEYWORD3>
+ <KEYWORD3>Ains</KEYWORD3>
+ <KEYWORD3>Ainstance</KEYWORD3>
+ <KEYWORD3>Alen</KEYWORD3>
+ <KEYWORD3>All</KEYWORD3>
+ <KEYWORD3>Alltrim</KEYWORD3>
+ <KEYWORD3>Alter</KEYWORD3>
+ <KEYWORD3>Amembers</KEYWORD3>
+ <KEYWORD3>Ansitooem</KEYWORD3>
+ <KEYWORD3>Append</KEYWORD3>
+ <KEYWORD3>Aprinters</KEYWORD3>
+ <KEYWORD3>Ascan</KEYWORD3>
+ <KEYWORD3>Aselobj</KEYWORD3>
+ <KEYWORD3>Asin</KEYWORD3>
+ <KEYWORD3>Asort</KEYWORD3>
+ <KEYWORD3>Assist</KEYWORD3>
+ <KEYWORD3>Asubscript</KEYWORD3>
+ <KEYWORD3>Asynchronous</KEYWORD3>
+ <KEYWORD3>Atan</KEYWORD3>
+ <KEYWORD3>Atc</KEYWORD3>
+ <KEYWORD3>Atcline</KEYWORD3>
+ <KEYWORD3>Atline</KEYWORD3>
+ <KEYWORD3>Atn2</KEYWORD3>
+ <KEYWORD3>Aused</KEYWORD3>
+ <KEYWORD3>Autoform</KEYWORD3>
+ <KEYWORD3>Autoreport</KEYWORD3>
+ <KEYWORD3>Average</KEYWORD3>
+ <KEYWORD3>Bar</KEYWORD3>
+ <KEYWORD3>BatchMode</KEYWORD3>
+ <KEYWORD3>BatchUpdateCount</KEYWORD3>
+ <KEYWORD3>Begin</KEYWORD3>
+ <KEYWORD3>Bell</KEYWORD3>
+ <KEYWORD3>BellSound</KEYWORD3>
+ <KEYWORD3>Bitand</KEYWORD3>
+ <KEYWORD3>Bitclear</KEYWORD3>
+ <KEYWORD3>Bitlshift</KEYWORD3>
+ <KEYWORD3>Bitnot</KEYWORD3>
+ <KEYWORD3>Bitor</KEYWORD3>
+ <KEYWORD3>Bitrshift</KEYWORD3>
+ <KEYWORD3>Bitset</KEYWORD3>
+ <KEYWORD3>Bittest</KEYWORD3>
+ <KEYWORD3>Bitxor</KEYWORD3>
+ <KEYWORD3>Bof</KEYWORD3>
+ <KEYWORD3>Bottom</KEYWORD3>
+ <KEYWORD3>Browse</KEYWORD3>
+ <KEYWORD3>BrowseRefresh</KEYWORD3>
+ <KEYWORD3>Buffering</KEYWORD3>
+ <KEYWORD3>Build</KEYWORD3>
+ <KEYWORD3>BuilderLock</KEYWORD3>
+ <KEYWORD3>By</KEYWORD3>
+ <KEYWORD3>Calculate</KEYWORD3>
+ <KEYWORD3>Call</KEYWORD3>
+ <KEYWORD3>Capslock</KEYWORD3>
+ <KEYWORD3>Case</KEYWORD3>
+ <KEYWORD3>Cd</KEYWORD3>
+ <KEYWORD3>Cdow</KEYWORD3>
+ <KEYWORD3>Ceiling</KEYWORD3>
+ <KEYWORD3>Central</KEYWORD3>
+ <KEYWORD3>Century</KEYWORD3>
+ <KEYWORD3>Change</KEYWORD3>
+ <KEYWORD3>Char</KEYWORD3>
+ <KEYWORD3>Chdir</KEYWORD3>
+ <KEYWORD3>Checkbox</KEYWORD3>
+ <KEYWORD3>Chr</KEYWORD3>
+ <KEYWORD3>Chrsaw</KEYWORD3>
+ <KEYWORD3>Chrtran</KEYWORD3>
+ <KEYWORD3>Close</KEYWORD3>
+ <KEYWORD3>Cmonth</KEYWORD3>
+ <KEYWORD3>Cntbar</KEYWORD3>
+ <KEYWORD3>Cntpad</KEYWORD3>
+ <KEYWORD3>Col</KEYWORD3>
+ <KEYWORD3>Column</KEYWORD3>
+ <KEYWORD3>ComboBox</KEYWORD3>
+ <KEYWORD3>CommandButton</KEYWORD3>
+ <KEYWORD3>CommandGroup</KEYWORD3>
+ <KEYWORD3>Compile</KEYWORD3>
+ <KEYWORD3>Completed</KEYWORD3>
+ <KEYWORD3>Compobj</KEYWORD3>
+ <KEYWORD3>Compute</KEYWORD3>
+ <KEYWORD3>Concat</KEYWORD3>
+ <KEYWORD3>ConnectBusy</KEYWORD3>
+ <KEYWORD3>ConnectHandle</KEYWORD3>
+ <KEYWORD3>ConnectName</KEYWORD3>
+ <KEYWORD3>ConnectString</KEYWORD3>
+ <KEYWORD3>ConnectTimeOut</KEYWORD3>
+ <KEYWORD3>Container</KEYWORD3>
+ <KEYWORD3>Continue</KEYWORD3>
+ <KEYWORD3>Control</KEYWORD3>
+ <KEYWORD3>Copy</KEYWORD3>
+ <KEYWORD3>Cos</KEYWORD3>
+ <KEYWORD3>Cot</KEYWORD3>
+ <KEYWORD3>Count</KEYWORD3>
+ <KEYWORD3>Cpconvert</KEYWORD3>
+ <KEYWORD3>Cpcurrent</KEYWORD3>
+ <KEYWORD3>CPDialog</KEYWORD3>
+ <KEYWORD3>Cpdbf</KEYWORD3>
+ <KEYWORD3>Cpnotrans</KEYWORD3>
+ <KEYWORD3>Create</KEYWORD3>
+ <KEYWORD3>Createobject</KEYWORD3>
+ <KEYWORD3>CrsBuffering</KEYWORD3>
+ <KEYWORD3>CrsFetchMemo</KEYWORD3>
+ <KEYWORD3>CrsFetchSize</KEYWORD3>
+ <KEYWORD3>CrsMaxRows</KEYWORD3>
+ <KEYWORD3>CrsMethodUsed</KEYWORD3>
+ <KEYWORD3>CrsNumBatch</KEYWORD3>
+ <KEYWORD3>CrsShareConnection</KEYWORD3>
+ <KEYWORD3>CrsUseMemoSize</KEYWORD3>
+ <KEYWORD3>CrsWhereClause</KEYWORD3>
+ <KEYWORD3>Ctod</KEYWORD3>
+ <KEYWORD3>Ctot</KEYWORD3>
+ <KEYWORD3>Curdate</KEYWORD3>
+ <KEYWORD3>Curdir</KEYWORD3>
+ <KEYWORD3>CurrLeft</KEYWORD3>
+ <KEYWORD3>CurrSymbol</KEYWORD3>
+ <KEYWORD3>Cursor</KEYWORD3>
+ <KEYWORD3>Curtime</KEYWORD3>
+ <KEYWORD3>Curval</KEYWORD3>
+ <KEYWORD3>Custom</KEYWORD3>
+ <KEYWORD3>DataEnvironment</KEYWORD3>
+ <KEYWORD3>Databases</KEYWORD3>
+ <KEYWORD3>Datetime</KEYWORD3>
+ <KEYWORD3>Day</KEYWORD3>
+ <KEYWORD3>Dayname</KEYWORD3>
+ <KEYWORD3>Dayofmonth</KEYWORD3>
+ <KEYWORD3>Dayofweek</KEYWORD3>
+ <KEYWORD3>Dayofyear</KEYWORD3>
+ <KEYWORD3>Dbalias</KEYWORD3>
+ <KEYWORD3>Dbused</KEYWORD3>
+ <KEYWORD3>DB_BufLockRow</KEYWORD3>
+ <KEYWORD3>DB_BufLockTable</KEYWORD3>
+ <KEYWORD3>DB_BufOff</KEYWORD3>
+ <KEYWORD3>DB_BufOptRow</KEYWORD3>
+ <KEYWORD3>DB_BufOptTable</KEYWORD3>
+ <KEYWORD3>DB_Complette</KEYWORD3>
+ <KEYWORD3>DB_DeleteInsert</KEYWORD3>
+ <KEYWORD3>DB_KeyAndModified</KEYWORD3>
+ <KEYWORD3>DB_KeyAndTimestamp</KEYWORD3>
+ <KEYWORD3>DB_KeyAndUpdatable</KEYWORD3>
+ <KEYWORD3>DB_LocalSQL</KEYWORD3>
+ <KEYWORD3>DB_NoPrompt</KEYWORD3>
+ <KEYWORD3>DB_Prompt</KEYWORD3>
+ <KEYWORD3>DB_RemoteSQL</KEYWORD3>
+ <KEYWORD3>DB_TransAuto</KEYWORD3>
+ <KEYWORD3>DB_TransManual</KEYWORD3>
+ <KEYWORD3>DB_TransNone</KEYWORD3>
+ <KEYWORD3>DB_Update</KEYWORD3>
+ <KEYWORD3>Ddeaborttrans</KEYWORD3>
+ <KEYWORD3>Ddeadvise</KEYWORD3>
+ <KEYWORD3>Ddeenabled</KEYWORD3>
+ <KEYWORD3>Ddeexecute</KEYWORD3>
+ <KEYWORD3>Ddeinitiate</KEYWORD3>
+ <KEYWORD3>Ddelasterror</KEYWORD3>
+ <KEYWORD3>Ddepoke</KEYWORD3>
+ <KEYWORD3>Dderequest</KEYWORD3>
+ <KEYWORD3>Ddesetoption</KEYWORD3>
+ <KEYWORD3>Ddesetservice</KEYWORD3>
+ <KEYWORD3>Ddesettopic</KEYWORD3>
+ <KEYWORD3>Ddeterminate</KEYWORD3>
+ <KEYWORD3>Declare</KEYWORD3>
+ <KEYWORD3>DefaultValue</KEYWORD3>
+ <KEYWORD3>Define</KEYWORD3>
+ <KEYWORD3>Degrees</KEYWORD3>
+ <KEYWORD3>DeleteTrigger</KEYWORD3>
+ <KEYWORD3>Desc</KEYWORD3>
+ <KEYWORD3>Description</KEYWORD3>
+ <KEYWORD3>Difference</KEYWORD3>
+ <KEYWORD3>Dimension</KEYWORD3>
+ <KEYWORD3>Dir</KEYWORD3>
+ <KEYWORD3>Directory</KEYWORD3>
+ <KEYWORD3>Diskspace</KEYWORD3>
+ <KEYWORD3>Display</KEYWORD3>
+ <KEYWORD3>DispLogin</KEYWORD3>
+ <KEYWORD3>DispWarnings</KEYWORD3>
+ <KEYWORD3>Distinct</KEYWORD3>
+ <KEYWORD3>Dmy</KEYWORD3>
+ <KEYWORD3>Do</KEYWORD3>
+ <KEYWORD3>Doc</KEYWORD3>
+ <KEYWORD3>Dow</KEYWORD3>
+ <KEYWORD3>Drop</KEYWORD3>
+ <KEYWORD3>Dtoc</KEYWORD3>
+ <KEYWORD3>Dtor</KEYWORD3>
+ <KEYWORD3>Dtos</KEYWORD3>
+ <KEYWORD3>Dtot</KEYWORD3>
+ <KEYWORD3>Edit</KEYWORD3>
+ <KEYWORD3>EditBox</KEYWORD3>
+ <KEYWORD3>Eject</KEYWORD3>
+ <KEYWORD3>Elif</KEYWORD3>
+ <KEYWORD3>Else</KEYWORD3>
+ <KEYWORD3>Empty</KEYWORD3>
+ <KEYWORD3>End</KEYWORD3>
+ <KEYWORD3>Endcase</KEYWORD3>
+ <KEYWORD3>Enddefine</KEYWORD3>
+ <KEYWORD3>Enddo</KEYWORD3>
+ <KEYWORD3>Endfor</KEYWORD3>
+ <KEYWORD3>Endif</KEYWORD3>
+ <KEYWORD3>Endprintjob</KEYWORD3>
+ <KEYWORD3>Endscan</KEYWORD3>
+ <KEYWORD3>Endtext</KEYWORD3>
+ <KEYWORD3>Endwith</KEYWORD3>
+ <KEYWORD3>Eof</KEYWORD3>
+ <KEYWORD3>Erase</KEYWORD3>
+ <KEYWORD3>Evaluate</KEYWORD3>
+ <KEYWORD3>Exact</KEYWORD3>
+ <KEYWORD3>Exclusive</KEYWORD3>
+ <KEYWORD3>Exit</KEYWORD3>
+ <KEYWORD3>Exp</KEYWORD3>
+ <KEYWORD3>Export</KEYWORD3>
+ <KEYWORD3>External</KEYWORD3>
+ <KEYWORD3>Fchsize</KEYWORD3>
+ <KEYWORD3>Fclose</KEYWORD3>
+ <KEYWORD3>Fcount</KEYWORD3>
+ <KEYWORD3>Fcreate</KEYWORD3>
+ <KEYWORD3>Feof</KEYWORD3>
+ <KEYWORD3>Ferror</KEYWORD3>
+ <KEYWORD3>FetchMemo</KEYWORD3>
+ <KEYWORD3>FetchSize</KEYWORD3>
+ <KEYWORD3>Fflush</KEYWORD3>
+ <KEYWORD3>Fgets</KEYWORD3>
+ <KEYWORD3>File</KEYWORD3>
+ <KEYWORD3>Filer</KEYWORD3>
+ <KEYWORD3>Find</KEYWORD3>
+ <KEYWORD3>Fklabel</KEYWORD3>
+ <KEYWORD3>Fkmax</KEYWORD3>
+ <KEYWORD3>Fldlist</KEYWORD3>
+ <KEYWORD3>Flock</KEYWORD3>
+ <KEYWORD3>Floor</KEYWORD3>
+ <KEYWORD3>Flush</KEYWORD3>
+ <KEYWORD3>FontClass</KEYWORD3>
+ <KEYWORD3>Fontmetric</KEYWORD3>
+ <KEYWORD3>Fopen</KEYWORD3>
+ <KEYWORD3>For</KEYWORD3>
+ <KEYWORD3>Form</KEYWORD3>
+ <KEYWORD3>FormsClass</KEYWORD3>
+ <KEYWORD3>Formset</KEYWORD3>
+ <KEYWORD3>FormSetClass</KEYWORD3>
+ <KEYWORD3>FormSetLib</KEYWORD3>
+ <KEYWORD3>FormsLib</KEYWORD3>
+ <KEYWORD3>Found</KEYWORD3>
+ <KEYWORD3>Foxcode</KEYWORD3>
+ <KEYWORD3>Foxdoc</KEYWORD3>
+ <KEYWORD3>Foxgen</KEYWORD3>
+ <KEYWORD3>Foxgraph</KEYWORD3>
+ <KEYWORD3>FoxPro</KEYWORD3>
+ <KEYWORD3>Foxview</KEYWORD3>
+ <KEYWORD3>Fputs</KEYWORD3>
+ <KEYWORD3>Fread</KEYWORD3>
+ <KEYWORD3>From</KEYWORD3>
+ <KEYWORD3>Fseek</KEYWORD3>
+ <KEYWORD3>Fsize</KEYWORD3>
+ <KEYWORD3>Fv</KEYWORD3>
+ <KEYWORD3>Fwrite</KEYWORD3>
+ <KEYWORD3>Gather</KEYWORD3>
+ <KEYWORD3>General</KEYWORD3>
+ <KEYWORD3>Getbar</KEYWORD3>
+ <KEYWORD3>Getcolor</KEYWORD3>
+ <KEYWORD3>Getcp</KEYWORD3>
+ <KEYWORD3>Getdir</KEYWORD3>
+ <KEYWORD3>Getenv</KEYWORD3>
+ <KEYWORD3>Getexpr</KEYWORD3>
+ <KEYWORD3>Getfile</KEYWORD3>
+ <KEYWORD3>Getfldstate</KEYWORD3>
+ <KEYWORD3>Getfont</KEYWORD3>
+ <KEYWORD3>Getnextmodified</KEYWORD3>
+ <KEYWORD3>Getobject</KEYWORD3>
+ <KEYWORD3>Getpad</KEYWORD3>
+ <KEYWORD3>Getpict</KEYWORD3>
+ <KEYWORD3>Getprinter</KEYWORD3>
+ <KEYWORD3>Go</KEYWORD3>
+ <KEYWORD3>Gomonth</KEYWORD3>
+ <KEYWORD3>Goto</KEYWORD3>
+ <KEYWORD3>Graph</KEYWORD3>
+ <KEYWORD3>Grid</KEYWORD3>
+ <KEYWORD3>GridHorz</KEYWORD3>
+ <KEYWORD3>GridShow</KEYWORD3>
+ <KEYWORD3>GridShowPos</KEYWORD3>
+ <KEYWORD3>GridSnap</KEYWORD3>
+ <KEYWORD3>GridVert</KEYWORD3>
+ <KEYWORD3>Header</KEYWORD3>
+ <KEYWORD3>Help</KEYWORD3>
+ <KEYWORD3>HelpOn</KEYWORD3>
+ <KEYWORD3>HelpTo</KEYWORD3>
+ <KEYWORD3>Hour</KEYWORD3>
+ <KEYWORD3>IdleTimeOut</KEYWORD3>
+ <KEYWORD3>Idxcollate</KEYWORD3>
+ <KEYWORD3>If</KEYWORD3>
+ <KEYWORD3>Ifdef</KEYWORD3>
+ <KEYWORD3>Ifndef</KEYWORD3>
+ <KEYWORD3>Iif</KEYWORD3>
+ <KEYWORD3>Image</KEYWORD3>
+ <KEYWORD3>Import</KEYWORD3>
+ <KEYWORD3>Include</KEYWORD3>
+ <KEYWORD3>Indbc</KEYWORD3>
+ <KEYWORD3>Index</KEYWORD3>
+ <KEYWORD3>Inkey</KEYWORD3>
+ <KEYWORD3>Inlist</KEYWORD3>
+ <KEYWORD3>Input</KEYWORD3>
+ <KEYWORD3>Insert</KEYWORD3>
+ <KEYWORD3>InsertTrigger</KEYWORD3>
+ <KEYWORD3>Insmode</KEYWORD3>
+ <KEYWORD3>Into</KEYWORD3>
+ <KEYWORD3>Isalpha</KEYWORD3>
+ <KEYWORD3>Iscolor</KEYWORD3>
+ <KEYWORD3>Isdigit</KEYWORD3>
+ <KEYWORD3>Isexclusive</KEYWORD3>
+ <KEYWORD3>Islower</KEYWORD3>
+ <KEYWORD3>Isnull</KEYWORD3>
+ <KEYWORD3>Isreadonly</KEYWORD3>
+ <KEYWORD3>Isupper</KEYWORD3>
+ <KEYWORD3>Join</KEYWORD3>
+ <KEYWORD3>Keyboard</KEYWORD3>
+ <KEYWORD3>KeyField</KEYWORD3>
+ <KEYWORD3>KeyFieldList</KEYWORD3>
+ <KEYWORD3>Keymatch</KEYWORD3>
+ <KEYWORD3>Label</KEYWORD3>
+ <KEYWORD3>Lastkey</KEYWORD3>
+ <KEYWORD3>LastProject</KEYWORD3>
+ <KEYWORD3>Lcase</KEYWORD3>
+ <KEYWORD3>Len</KEYWORD3>
+ <KEYWORD3>Length</KEYWORD3>
+ <KEYWORD3>Lineno</KEYWORD3>
+ <KEYWORD3>ListBox</KEYWORD3>
+ <KEYWORD3>Local</KEYWORD3>
+ <KEYWORD3>Locate</KEYWORD3>
+ <KEYWORD3>Locfile</KEYWORD3>
+ <KEYWORD3>Log</KEYWORD3>
+ <KEYWORD3>Log10</KEYWORD3>
+ <KEYWORD3>Logout</KEYWORD3>
+ <KEYWORD3>Lookup</KEYWORD3>
+ <KEYWORD3>Loop</KEYWORD3>
+ <KEYWORD3>Lower</KEYWORD3>
+ <KEYWORD3>Lparameters</KEYWORD3>
+ <KEYWORD3>Ltrim</KEYWORD3>
+ <KEYWORD3>Lupdate</KEYWORD3>
+ <KEYWORD3>Mail</KEYWORD3>
+ <KEYWORD3>MaxRecords</KEYWORD3>
+ <KEYWORD3>Mcol</KEYWORD3>
+ <KEYWORD3>Md</KEYWORD3>
+ <KEYWORD3>Mdown</KEYWORD3>
+ <KEYWORD3>Mdx</KEYWORD3>
+ <KEYWORD3>Mdy</KEYWORD3>
+ <KEYWORD3>Memlines</KEYWORD3>
+ <KEYWORD3>Memo</KEYWORD3>
+ <KEYWORD3>Menu</KEYWORD3>
+ <KEYWORD3>Messagebox</KEYWORD3>
+ <KEYWORD3>Minute</KEYWORD3>
+ <KEYWORD3>Mkdir</KEYWORD3>
+ <KEYWORD3>Mline</KEYWORD3>
+ <KEYWORD3>Modify</KEYWORD3>
+ <KEYWORD3>Month</KEYWORD3>
+ <KEYWORD3>Monthname</KEYWORD3>
+ <KEYWORD3>Mouse</KEYWORD3>
+ <KEYWORD3>Mrkbar</KEYWORD3>
+ <KEYWORD3>Mrkpad</KEYWORD3>
+ <KEYWORD3>Mrow</KEYWORD3>
+ <KEYWORD3>Mton</KEYWORD3>
+ <KEYWORD3>Mwindow</KEYWORD3>
+ <KEYWORD3>Native</KEYWORD3>
+ <KEYWORD3>Ndx</KEYWORD3>
+ <KEYWORD3>Network</KEYWORD3>
+ <KEYWORD3>Next</KEYWORD3>
+ <KEYWORD3>Nodefault</KEYWORD3>
+ <KEYWORD3>Normalize</KEYWORD3>
+ <KEYWORD3>Note</KEYWORD3>
+ <KEYWORD3>Now</KEYWORD3>
+ <KEYWORD3>Ntom</KEYWORD3>
+ <KEYWORD3>NullString</KEYWORD3>
+ <KEYWORD3>Numlock</KEYWORD3>
+ <KEYWORD3>Nvl</KEYWORD3>
+ <KEYWORD3>Objnum</KEYWORD3>
+ <KEYWORD3>Objref</KEYWORD3>
+ <KEYWORD3>Objtoclient</KEYWORD3>
+ <KEYWORD3>Objvar</KEYWORD3>
+ <KEYWORD3>Occurs</KEYWORD3>
+ <KEYWORD3>ODBChdbc</KEYWORD3>
+ <KEYWORD3>ODBChstmt</KEYWORD3>
+ <KEYWORD3>Oemtoansi</KEYWORD3>
+ <KEYWORD3>Off</KEYWORD3>
+ <KEYWORD3>Oldval</KEYWORD3>
+ <KEYWORD3>OleBaseControl</KEYWORD3>
+ <KEYWORD3>OleBoundControl</KEYWORD3>
+ <KEYWORD3>OleClassIDispOut</KEYWORD3>
+ <KEYWORD3>OleControl</KEYWORD3>
+ <KEYWORD3>On</KEYWORD3>
+ <KEYWORD3>Open</KEYWORD3>
+ <KEYWORD3>OptionButton</KEYWORD3>
+ <KEYWORD3>OptionGroup</KEYWORD3>
+ <KEYWORD3>Oracle</KEYWORD3>
+ <KEYWORD3>Order</KEYWORD3>
+ <KEYWORD3>Os</KEYWORD3>
+ <KEYWORD3>Otherwise</KEYWORD3>
+ <KEYWORD3>Pack</KEYWORD3>
+ <KEYWORD3>PacketSize</KEYWORD3>
+ <KEYWORD3>Padc</KEYWORD3>
+ <KEYWORD3>Padl</KEYWORD3>
+ <KEYWORD3>Padr</KEYWORD3>
+ <KEYWORD3>Page</KEYWORD3>
+ <KEYWORD3>PageFrame</KEYWORD3>
+ <KEYWORD3>Parameters</KEYWORD3>
+ <KEYWORD3>Payment</KEYWORD3>
+ <KEYWORD3>Pcol</KEYWORD3>
+ <KEYWORD3>Percent</KEYWORD3>
+ <KEYWORD3>Pi</KEYWORD3>
+ <KEYWORD3>Pivot</KEYWORD3>
+ <KEYWORD3>Play</KEYWORD3>
+ <KEYWORD3>Pop</KEYWORD3>
+ <KEYWORD3>Power</KEYWORD3>
+ <KEYWORD3>PrimaryKey</KEYWORD3>
+ <KEYWORD3>Printjob</KEYWORD3>
+ <KEYWORD3>Printstatus</KEYWORD3>
+ <KEYWORD3>Private</KEYWORD3>
+ <KEYWORD3>Prmbar</KEYWORD3>
+ <KEYWORD3>Prmpad</KEYWORD3>
+ <KEYWORD3>Program</KEYWORD3>
+ <KEYWORD3>ProjectClick</KEYWORD3>
+ <KEYWORD3>Proper</KEYWORD3>
+ <KEYWORD3>Protected</KEYWORD3>
+ <KEYWORD3>Prow</KEYWORD3>
+ <KEYWORD3>Prtinfo</KEYWORD3>
+ <KEYWORD3>Public</KEYWORD3>
+ <KEYWORD3>Push</KEYWORD3>
+ <KEYWORD3>Putfile</KEYWORD3>
+ <KEYWORD3>Pv</KEYWORD3>
+ <KEYWORD3>Qpr</KEYWORD3>
+ <KEYWORD3>Quater</KEYWORD3>
+ <KEYWORD3>QueryTimeOut</KEYWORD3>
+ <KEYWORD3>Quit</KEYWORD3>
+ <KEYWORD3>Radians</KEYWORD3>
+ <KEYWORD3>Rand</KEYWORD3>
+ <KEYWORD3>Rat</KEYWORD3>
+ <KEYWORD3>Ratline</KEYWORD3>
+ <KEYWORD3>Rd</KEYWORD3>
+ <KEYWORD3>Rdlevel</KEYWORD3>
+ <KEYWORD3>Read</KEYWORD3>
+ <KEYWORD3>Readkey</KEYWORD3>
+ <KEYWORD3>Recall</KEYWORD3>
+ <KEYWORD3>Reccount</KEYWORD3>
+ <KEYWORD3>RecentlyUsedFiles</KEYWORD3>
+ <KEYWORD3>Recno</KEYWORD3>
+ <KEYWORD3>Recsize</KEYWORD3>
+ <KEYWORD3>RectClass</KEYWORD3>
+ <KEYWORD3>Regional</KEYWORD3>
+ <KEYWORD3>Reindex</KEYWORD3>
+ <KEYWORD3>RelatedChild</KEYWORD3>
+ <KEYWORD3>RelatedTable</KEYWORD3>
+ <KEYWORD3>RelatedTag</KEYWORD3>
+ <KEYWORD3>Relation</KEYWORD3>
+ <KEYWORD3>Remove</KEYWORD3>
+ <KEYWORD3>Rename</KEYWORD3>
+ <KEYWORD3>Repeat</KEYWORD3>
+ <KEYWORD3>Replace</KEYWORD3>
+ <KEYWORD3>Replicate</KEYWORD3>
+ <KEYWORD3>Report</KEYWORD3>
+ <KEYWORD3>Reprocess</KEYWORD3>
+ <KEYWORD3>ResHeight</KEYWORD3>
+ <KEYWORD3>ResourceOn</KEYWORD3>
+ <KEYWORD3>ResourceTo</KEYWORD3>
+ <KEYWORD3>Restore</KEYWORD3>
+ <KEYWORD3>Resume</KEYWORD3>
+ <KEYWORD3>ResWidth</KEYWORD3>
+ <KEYWORD3>Retry</KEYWORD3>
+ <KEYWORD3>Return</KEYWORD3>
+ <KEYWORD3>Rgbscheme</KEYWORD3>
+ <KEYWORD3>Rlock</KEYWORD3>
+ <KEYWORD3>Rmdir</KEYWORD3>
+ <KEYWORD3>Rollback</KEYWORD3>
+ <KEYWORD3>Round</KEYWORD3>
+ <KEYWORD3>Rtod</KEYWORD3>
+ <KEYWORD3>Rtrim</KEYWORD3>
+ <KEYWORD3>RuleExpression</KEYWORD3>
+ <KEYWORD3>RuleText</KEYWORD3>
+ <KEYWORD3>Run</KEYWORD3>
+ <KEYWORD3>Runscript</KEYWORD3>
+ <KEYWORD3>Rview</KEYWORD3>
+ <KEYWORD3>Save</KEYWORD3>
+ <KEYWORD3>Safety</KEYWORD3>
+ <KEYWORD3>ScaleUnits</KEYWORD3>
+ <KEYWORD3>Scan</KEYWORD3>
+ <KEYWORD3>Scatter</KEYWORD3>
+ <KEYWORD3>Scols</KEYWORD3>
+ <KEYWORD3>Scroll</KEYWORD3>
+ <KEYWORD3>Sec</KEYWORD3>
+ <KEYWORD3>Second</KEYWORD3>
+ <KEYWORD3>Seek</KEYWORD3>
+ <KEYWORD3>Select</KEYWORD3>
+ <KEYWORD3>SendUpdates</KEYWORD3>
+ <KEYWORD3>Separator</KEYWORD3>
+ <KEYWORD3>Set</KEYWORD3>
+ <KEYWORD3>SetDefault</KEYWORD3>
+ <KEYWORD3>Setfldstate</KEYWORD3>
+ <KEYWORD3>Setup</KEYWORD3>
+ <KEYWORD3>Shape</KEYWORD3>
+ <KEYWORD3>Shared</KEYWORD3>
+ <KEYWORD3>ShareConnection</KEYWORD3>
+ <KEYWORD3>ShowOLEControls</KEYWORD3>
+ <KEYWORD3>ShowOLEInsertable</KEYWORD3>
+ <KEYWORD3>ShowVCXs</KEYWORD3>
+ <KEYWORD3>Sign</KEYWORD3>
+ <KEYWORD3>Sin</KEYWORD3>
+ <KEYWORD3>Size</KEYWORD3>
+ <KEYWORD3>Skpbar</KEYWORD3>
+ <KEYWORD3>Skppad</KEYWORD3>
+ <KEYWORD3>Sort</KEYWORD3>
+ <KEYWORD3>Soundex</KEYWORD3>
+ <KEYWORD3>SourceName</KEYWORD3>
+ <KEYWORD3>Spinner</KEYWORD3>
+ <KEYWORD3>SQLAsynchronous</KEYWORD3>
+ <KEYWORD3>SQLBatchMode</KEYWORD3>
+ <KEYWORD3>Sqlcommit</KEYWORD3>
+ <KEYWORD3>SQLConnectTimeOut</KEYWORD3>
+ <KEYWORD3>SQLDispLogin</KEYWORD3>
+ <KEYWORD3>SQLDispWarnings</KEYWORD3>
+ <KEYWORD3>SQLIdleTimeOut</KEYWORD3>
+ <KEYWORD3>Sqll</KEYWORD3>
+ <KEYWORD3>SQLQueryTimeOut</KEYWORD3>
+ <KEYWORD3>Sqlrollback</KEYWORD3>
+ <KEYWORD3>Sqlstringconnect</KEYWORD3>
+ <KEYWORD3>SQLTransactions</KEYWORD3>
+ <KEYWORD3>SQLWaitTime</KEYWORD3>
+ <KEYWORD3>Sqrt</KEYWORD3>
+ <KEYWORD3>Srows</KEYWORD3>
+ <KEYWORD3>StatusBar</KEYWORD3>
+ <KEYWORD3>Status</KEYWORD3>
+ <KEYWORD3>Store</KEYWORD3>
+ <KEYWORD3>Str</KEYWORD3>
+ <KEYWORD3>Strtran</KEYWORD3>
+ <KEYWORD3>Stuff</KEYWORD3>
+ <KEYWORD3>Substr</KEYWORD3>
+ <KEYWORD3>Substring</KEYWORD3>
+ <KEYWORD3>Sum</KEYWORD3>
+ <KEYWORD3>Suspend</KEYWORD3>
+ <KEYWORD3>Sys</KEYWORD3>
+ <KEYWORD3>Sysmetric</KEYWORD3>
+ <KEYWORD3>Table</KEYWORD3>
+ <KEYWORD3>TableRefresh</KEYWORD3>
+ <KEYWORD3>Tablerevert</KEYWORD3>
+ <KEYWORD3>Tableupdate</KEYWORD3>
+ <KEYWORD3>TabOrdering</KEYWORD3>
+ <KEYWORD3>Talk</KEYWORD3>
+ <KEYWORD3>Tan</KEYWORD3>
+ <KEYWORD3>Target</KEYWORD3>
+ <KEYWORD3>Text</KEYWORD3>
+ <KEYWORD3>TextBox</KEYWORD3>
+ <KEYWORD3>Timestamp</KEYWORD3>
+ <KEYWORD3>Timestampdiff</KEYWORD3>
+ <KEYWORD3>To</KEYWORD3>
+ <KEYWORD3>Toolbar</KEYWORD3>
+ <KEYWORD3>Total</KEYWORD3>
+ <KEYWORD3>Transaction</KEYWORD3>
+ <KEYWORD3>Transform</KEYWORD3>
+ <KEYWORD3>Trim</KEYWORD3>
+ <KEYWORD3>Truncate</KEYWORD3>
+ <KEYWORD3>Ttoc</KEYWORD3>
+ <KEYWORD3>Ttod</KEYWORD3>
+ <KEYWORD3>Txnlevel</KEYWORD3>
+ <KEYWORD3>Txtwidth</KEYWORD3>
+ <KEYWORD3>Type</KEYWORD3>
+ <KEYWORD3>Ucase</KEYWORD3>
+ <KEYWORD3>Undefine</KEYWORD3>
+ <KEYWORD3>Unlock</KEYWORD3>
+ <KEYWORD3>Unpack</KEYWORD3>
+ <KEYWORD3>Updatable</KEYWORD3>
+ <KEYWORD3>UpdatableFieldList</KEYWORD3>
+ <KEYWORD3>Update</KEYWORD3>
+ <KEYWORD3>Updated</KEYWORD3>
+ <KEYWORD3>UpdateName</KEYWORD3>
+ <KEYWORD3>UpdateNameList</KEYWORD3>
+ <KEYWORD3>UpdateTrigger</KEYWORD3>
+ <KEYWORD3>UpdateType</KEYWORD3>
+ <KEYWORD3>Upper</KEYWORD3>
+ <KEYWORD3>Upsizing</KEYWORD3>
+ <KEYWORD3>Use</KEYWORD3>
+ <KEYWORD3>Used</KEYWORD3>
+ <KEYWORD3>UseMemoSize</KEYWORD3>
+ <KEYWORD3>Val</KEYWORD3>
+ <KEYWORD3>Validate</KEYWORD3>
+ <KEYWORD3>Values</KEYWORD3>
+ <KEYWORD3>Varread</KEYWORD3>
+ <KEYWORD3>Version</KEYWORD3>
+ <KEYWORD3>Wait</KEYWORD3>
+ <KEYWORD3>WaitTime</KEYWORD3>
+ <KEYWORD3>Wborder</KEYWORD3>
+ <KEYWORD3>Wchild</KEYWORD3>
+ <KEYWORD3>Wcols</KEYWORD3>
+ <KEYWORD3>Week</KEYWORD3>
+ <KEYWORD3>Wexist</KEYWORD3>
+ <KEYWORD3>Wfont</KEYWORD3>
+ <KEYWORD3>Where</KEYWORD3>
+ <KEYWORD3>WhereType</KEYWORD3>
+ <KEYWORD3>While</KEYWORD3>
+ <KEYWORD3>Windcmd</KEYWORD3>
+ <KEYWORD3>Windhelp</KEYWORD3>
+ <KEYWORD3>Windmemo</KEYWORD3>
+ <KEYWORD3>Windmenu</KEYWORD3>
+ <KEYWORD3>Windmodify</KEYWORD3>
+ <KEYWORD3>Windquery</KEYWORD3>
+ <KEYWORD3>Windscreen</KEYWORD3>
+ <KEYWORD3>Windsnip</KEYWORD3>
+ <KEYWORD3>Windstproc</KEYWORD3>
+ <KEYWORD3>With</KEYWORD3>
+ <KEYWORD3>WizardPrompt</KEYWORD3>
+ <KEYWORD3>Wlast</KEYWORD3>
+ <KEYWORD3>Wlcol</KEYWORD3>
+ <KEYWORD3>Wlrow</KEYWORD3>
+ <KEYWORD3>Wmaximum</KEYWORD3>
+ <KEYWORD3>Wminimum</KEYWORD3>
+ <KEYWORD3>Wontop</KEYWORD3>
+ <KEYWORD3>Woutput</KEYWORD3>
+ <KEYWORD3>Wparent</KEYWORD3>
+ <KEYWORD3>Wread</KEYWORD3>
+ <KEYWORD3>Wrows</KEYWORD3>
+ <KEYWORD3>Wtitle</KEYWORD3>
+ <KEYWORD3>Wvisible</KEYWORD3>
+ <KEYWORD3>Year</KEYWORD3>
+ <KEYWORD3>Zap</KEYWORD3>
+ <KEYWORD3>[</KEYWORD3>
+ <KEYWORD3>]</KEYWORD3>
+ <KEYWORD3>^</KEYWORD3>
+ <KEYWORD3>_Alignment</KEYWORD3>
+ <KEYWORD3>_Asciicols</KEYWORD3>
+ <KEYWORD3>_Asciirows</KEYWORD3>
+ <KEYWORD3>_Assist</KEYWORD3>
+ <KEYWORD3>_Beautify</KEYWORD3>
+ <KEYWORD3>_Box</KEYWORD3>
+ <KEYWORD3>_Browser</KEYWORD3>
+ <KEYWORD3>_Builder</KEYWORD3>
+ <KEYWORD3>_Calcmem</KEYWORD3>
+ <KEYWORD3>_Calcvalue</KEYWORD3>
+ <KEYWORD3>_Cliptext</KEYWORD3>
+ <KEYWORD3>_Converter</KEYWORD3>
+ <KEYWORD3>_Curobj</KEYWORD3>
+ <KEYWORD3>_Dblclick</KEYWORD3>
+ <KEYWORD3>_Diarydate</KEYWORD3>
+ <KEYWORD3>_Dos</KEYWORD3>
+ <KEYWORD3>_Foxdoc</KEYWORD3>
+ <KEYWORD3>_Foxgraph</KEYWORD3>
+ <KEYWORD3>_Gengraph</KEYWORD3>
+ <KEYWORD3>_Genmenu</KEYWORD3>
+ <KEYWORD3>_Genpd</KEYWORD3>
+ <KEYWORD3>_Genscrn</KEYWORD3>
+ <KEYWORD3>_Genxtab</KEYWORD3>
+ <KEYWORD3>_Indent</KEYWORD3>
+ <KEYWORD3>_Lmargin</KEYWORD3>
+ <KEYWORD3>_Mac</KEYWORD3>
+ <KEYWORD3>_Mbrowse</KEYWORD3>
+ <KEYWORD3>_Mbr_appnd</KEYWORD3>
+ <KEYWORD3>_Mbr_cpart</KEYWORD3>
+ <KEYWORD3>_Mbr_delet</KEYWORD3>
+ <KEYWORD3>_Mbr_font</KEYWORD3>
+ <KEYWORD3>_Mbr_goto</KEYWORD3>
+ <KEYWORD3>_Mbr_grid</KEYWORD3>
+ <KEYWORD3>_Mbr_link</KEYWORD3>
+ <KEYWORD3>_Mbr_mode</KEYWORD3>
+ <KEYWORD3>_Mbr_mvfld</KEYWORD3>
+ <KEYWORD3>_Mbr_mvprt</KEYWORD3>
+ <KEYWORD3>_Mbr_seek</KEYWORD3>
+ <KEYWORD3>_Mbr_sp100</KEYWORD3>
+ <KEYWORD3>_Mbr_sp200</KEYWORD3>
+ <KEYWORD3>_Mbr_szfld</KEYWORD3>
+ <KEYWORD3>_Mdata</KEYWORD3>
+ <KEYWORD3>_Mda_appnd</KEYWORD3>
+ <KEYWORD3>_Mda_avg</KEYWORD3>
+ <KEYWORD3>_Mda_brow</KEYWORD3>
+ <KEYWORD3>_Mda_calc</KEYWORD3>
+ <KEYWORD3>_Mda_copy</KEYWORD3>
+ <KEYWORD3>_Mda_count</KEYWORD3>
+ <KEYWORD3>_Mda_label</KEYWORD3>
+ <KEYWORD3>_Mda_pack</KEYWORD3>
+ <KEYWORD3>_Mda_reprt</KEYWORD3>
+ <KEYWORD3>_Mda_rindx</KEYWORD3>
+ <KEYWORD3>_Mda_setup</KEYWORD3>
+ <KEYWORD3>_Mda_sort</KEYWORD3>
+ <KEYWORD3>_Mda_sp100</KEYWORD3>
+ <KEYWORD3>_Mda_sp200</KEYWORD3>
+ <KEYWORD3>_Mda_sp300</KEYWORD3>
+ <KEYWORD3>_Mda_sum</KEYWORD3>
+ <KEYWORD3>_Mda_total</KEYWORD3>
+ <KEYWORD3>_Mdiary</KEYWORD3>
+ <KEYWORD3>_Medit</KEYWORD3>
+ <KEYWORD3>_Med_clear</KEYWORD3>
+ <KEYWORD3>_Med_copy</KEYWORD3>
+ <KEYWORD3>_Med_cut</KEYWORD3>
+ <KEYWORD3>_Med_cvtst</KEYWORD3>
+ <KEYWORD3>_Med_find</KEYWORD3>
+ <KEYWORD3>_Med_finda</KEYWORD3>
+ <KEYWORD3>_Med_goto</KEYWORD3>
+ <KEYWORD3>_Med_insob</KEYWORD3>
+ <KEYWORD3>_Med_link</KEYWORD3>
+ <KEYWORD3>_Med_obj</KEYWORD3>
+ <KEYWORD3>_Med_paste</KEYWORD3>
+ <KEYWORD3>_Med_pref</KEYWORD3>
+ <KEYWORD3>_Med_pstlk</KEYWORD3>
+ <KEYWORD3>_Med_redo</KEYWORD3>
+ <KEYWORD3>_Med_repl</KEYWORD3>
+ <KEYWORD3>_Med_repla</KEYWORD3>
+ <KEYWORD3>_Med_slcta</KEYWORD3>
+ <KEYWORD3>_Med_sp100</KEYWORD3>
+ <KEYWORD3>_Med_sp200</KEYWORD3>
+ <KEYWORD3>_Med_sp300</KEYWORD3>
+ <KEYWORD3>_Med_sp400</KEYWORD3>
+ <KEYWORD3>_Med_sp500</KEYWORD3>
+ <KEYWORD3>_Med_undo</KEYWORD3>
+ <KEYWORD3>_Mfile</KEYWORD3>
+ <KEYWORD3>_Mfiler</KEYWORD3>
+ <KEYWORD3>_Mfirst</KEYWORD3>
+ <KEYWORD3>_Mfi_clall</KEYWORD3>
+ <KEYWORD3>_Mfi_close</KEYWORD3>
+ <KEYWORD3>_Mfi_export</KEYWORD3>
+ <KEYWORD3>_Mfi_import</KEYWORD3>
+ <KEYWORD3>_Mfi_new</KEYWORD3>
+ <KEYWORD3>_Mfi_open</KEYWORD3>
+ <KEYWORD3>_Mfi_pgset</KEYWORD3>
+ <KEYWORD3>_Mfi_prevu</KEYWORD3>
+ <KEYWORD3>_Mfi_print</KEYWORD3>
+ <KEYWORD3>_Mfi_quit</KEYWORD3>
+ <KEYWORD3>_Mfi_revrt</KEYWORD3>
+ <KEYWORD3>_Mfi_savas</KEYWORD3>
+ <KEYWORD3>_Mfi_save</KEYWORD3>
+ <KEYWORD3>_Mfi_send</KEYWORD3>
+ <KEYWORD3>_Mfi_setup</KEYWORD3>
+ <KEYWORD3>_Mfi_sp100</KEYWORD3>
+ <KEYWORD3>_Mfi_sp200</KEYWORD3>
+ <KEYWORD3>_Mfi_sp300</KEYWORD3>
+ <KEYWORD3>_Mfi_sp400</KEYWORD3>
+ <KEYWORD3>_Mlabel</KEYWORD3>
+ <KEYWORD3>_Mlast</KEYWORD3>
+ <KEYWORD3>_Mline</KEYWORD3>
+ <KEYWORD3>_Mmacro</KEYWORD3>
+ <KEYWORD3>_Mmbldr</KEYWORD3>
+ <KEYWORD3>_Mprog</KEYWORD3>
+ <KEYWORD3>_Mproj</KEYWORD3>
+ <KEYWORD3>_Mpr_beaut</KEYWORD3>
+ <KEYWORD3>_Mpr_cancl</KEYWORD3>
+ <KEYWORD3>_Mpr_compl</KEYWORD3>
+ <KEYWORD3>_Mpr_do</KEYWORD3>
+ <KEYWORD3>_Mpr_docum</KEYWORD3>
+ <KEYWORD3>_Mpr_formwz</KEYWORD3>
+ <KEYWORD3>_Mpr_gener</KEYWORD3>
+ <KEYWORD3>_Mpr_graph</KEYWORD3>
+ <KEYWORD3>_Mpr_resum</KEYWORD3>
+ <KEYWORD3>_Mpr_sp100</KEYWORD3>
+ <KEYWORD3>_Mpr_sp200</KEYWORD3>
+ <KEYWORD3>_Mpr_sp300</KEYWORD3>
+ <KEYWORD3>_Mpr_suspend</KEYWORD3>
+ <KEYWORD3>_Mrc_appnd</KEYWORD3>
+ <KEYWORD3>_Mrc_chnge</KEYWORD3>
+ <KEYWORD3>_Mrc_cont</KEYWORD3>
+ <KEYWORD3>_Mrc_delet</KEYWORD3>
+ <KEYWORD3>_Mrc_goto</KEYWORD3>
+ <KEYWORD3>_Mrc_locat</KEYWORD3>
+ <KEYWORD3>_Mrc_recal</KEYWORD3>
+ <KEYWORD3>_Mrc_repl</KEYWORD3>
+ <KEYWORD3>_Mrc_seek</KEYWORD3>
+ <KEYWORD3>_Mrc_sp100</KEYWORD3>
+ <KEYWORD3>_Mrc_sp200</KEYWORD3>
+ <KEYWORD3>_Mrecord</KEYWORD3>
+ <KEYWORD3>_Mreport</KEYWORD3>
+ <KEYWORD3>_Mrqbe</KEYWORD3>
+ <KEYWORD3>_Mscreen</KEYWORD3>
+ <KEYWORD3>_Msm_data</KEYWORD3>
+ <KEYWORD3>_Msm_edit</KEYWORD3>
+ <KEYWORD3>_Msm_file</KEYWORD3>
+ <KEYWORD3>_Msm_format</KEYWORD3>
+ <KEYWORD3>_Msm_prog</KEYWORD3>
+ <KEYWORD3>_Msm_recrd</KEYWORD3>
+ <KEYWORD3>_Msm_systm</KEYWORD3>
+ <KEYWORD3>_Msm_text</KEYWORD3>
+ <KEYWORD3>_Msm_tools</KEYWORD3>
+ <KEYWORD3>_Msm_view</KEYWORD3>
+ <KEYWORD3>_Msm_windo</KEYWORD3>
+ <KEYWORD3>_Mst_about</KEYWORD3>
+ <KEYWORD3>_Mst_ascii</KEYWORD3>
+ <KEYWORD3>_Mst_calcu</KEYWORD3>
+ <KEYWORD3>_Mst_captr</KEYWORD3>
+ <KEYWORD3>_Mst_dbase</KEYWORD3>
+ <KEYWORD3>_Mst_diary</KEYWORD3>
+ <KEYWORD3>_Mst_filer</KEYWORD3>
+ <KEYWORD3>_Mst_help</KEYWORD3>
+ <KEYWORD3>_Mst_hphow</KEYWORD3>
+ <KEYWORD3>_Mst_hpsch</KEYWORD3>
+ <KEYWORD3>_Mst_macro</KEYWORD3>
+ <KEYWORD3>_Mst_office</KEYWORD3>
+ <KEYWORD3>_Mst_puzzl</KEYWORD3>
+ <KEYWORD3>_Mst_sp100</KEYWORD3>
+ <KEYWORD3>_Mst_sp200</KEYWORD3>
+ <KEYWORD3>_Mst_sp300</KEYWORD3>
+ <KEYWORD3>_Mst_specl</KEYWORD3>
+ <KEYWORD3>_Msysmenu</KEYWORD3>
+ <KEYWORD3>_Msystem</KEYWORD3>
+ <KEYWORD3>_Mtable</KEYWORD3>
+ <KEYWORD3>_Mtb_appnd</KEYWORD3>
+ <KEYWORD3>_Mtb_cpart</KEYWORD3>
+ <KEYWORD3>_Mtb_delet</KEYWORD3>
+ <KEYWORD3>_Mtb_delrc</KEYWORD3>
+ <KEYWORD3>_Mtb_goto</KEYWORD3>
+ <KEYWORD3>_Mtb_link</KEYWORD3>
+ <KEYWORD3>_Mtb_mvfld</KEYWORD3>
+ <KEYWORD3>_Mtb_mvprt</KEYWORD3>
+ <KEYWORD3>_Mtb_props</KEYWORD3>
+ <KEYWORD3>_Mtb_recal</KEYWORD3>
+ <KEYWORD3>_Mtb_sp100</KEYWORD3>
+ <KEYWORD3>_Mtb_sp200</KEYWORD3>
+ <KEYWORD3>_Mtb_sp300</KEYWORD3>
+ <KEYWORD3>_Mtb_sp400</KEYWORD3>
+ <KEYWORD3>_Mtb_szfld</KEYWORD3>
+ <KEYWORD3>_Mwindow</KEYWORD3>
+ <KEYWORD3>_Mwizards</KEYWORD3>
+ <KEYWORD3>_Mwi_arran</KEYWORD3>
+ <KEYWORD3>_Mwi_clear</KEYWORD3>
+ <KEYWORD3>_Mwi_cmd</KEYWORD3>
+ <KEYWORD3>_Mwi_color</KEYWORD3>
+ <KEYWORD3>_Mwi_debug</KEYWORD3>
+ <KEYWORD3>_Mwi_hide</KEYWORD3>
+ <KEYWORD3>_Mwi_hidea</KEYWORD3>
+ <KEYWORD3>_Mwi_min</KEYWORD3>
+ <KEYWORD3>_Mwi_move</KEYWORD3>
+ <KEYWORD3>_Mwi_rotat</KEYWORD3>
+ <KEYWORD3>_Mwi_showa</KEYWORD3>
+ <KEYWORD3>_Mwi_size</KEYWORD3>
+ <KEYWORD3>_Mwi_sp100</KEYWORD3>
+ <KEYWORD3>_Mwi_sp200</KEYWORD3>
+ <KEYWORD3>_Mwi_toolb</KEYWORD3>
+ <KEYWORD3>_Mwi_trace</KEYWORD3>
+ <KEYWORD3>_Mwi_view</KEYWORD3>
+ <KEYWORD3>_Mwi_zoom</KEYWORD3>
+ <KEYWORD3>_Mwz_all</KEYWORD3>
+ <KEYWORD3>_Mwz_form</KEYWORD3>
+ <KEYWORD3>_Mwz_foxdoc</KEYWORD3>
+ <KEYWORD3>_Mwz_import</KEYWORD3>
+ <KEYWORD3>_Mwz_label</KEYWORD3>
+ <KEYWORD3>_Mwz_mail</KEYWORD3>
+ <KEYWORD3>_Mwz_pivot</KEYWORD3>
+ <KEYWORD3>_Mwz_query</KEYWORD3>
+ <KEYWORD3>_Mwz_reprt</KEYWORD3>
+ <KEYWORD3>_Mwz_setup</KEYWORD3>
+ <KEYWORD3>_Mwz_table</KEYWORD3>
+ <KEYWORD3>_Mwz_upsizing</KEYWORD3>
+ <KEYWORD3>_Netware</KEYWORD3>
+ <KEYWORD3>_Oracle</KEYWORD3>
+ <KEYWORD3>_Padvance</KEYWORD3>
+ <KEYWORD3>_Pageno</KEYWORD3>
+ <KEYWORD3>_Pbpage</KEYWORD3>
+ <KEYWORD3>_Pcolno</KEYWORD3>
+ <KEYWORD3>_Pcopies</KEYWORD3>
+ <KEYWORD3>_Pdparms</KEYWORD3>
+ <KEYWORD3>_Pdriver</KEYWORD3>
+ <KEYWORD3>_Pdsetup</KEYWORD3>
+ <KEYWORD3>_Pecode</KEYWORD3>
+ <KEYWORD3>_Peject</KEYWORD3>
+ <KEYWORD3>_Pepage</KEYWORD3>
+ <KEYWORD3>_Pform</KEYWORD3>
+ <KEYWORD3>_Plength</KEYWORD3>
+ <KEYWORD3>_Plineno</KEYWORD3>
+ <KEYWORD3>_Ploffset</KEYWORD3>
+ <KEYWORD3>_Ppitch</KEYWORD3>
+ <KEYWORD3>_Pquality</KEYWORD3>
+ <KEYWORD3>_Pretext</KEYWORD3>
+ <KEYWORD3>_Pscode</KEYWORD3>
+ <KEYWORD3>_Pspacing</KEYWORD3>
+ <KEYWORD3>_Pwait</KEYWORD3>
+ <KEYWORD3>_Rmargin</KEYWORD3>
+ <KEYWORD3>_Screen</KEYWORD3>
+ <KEYWORD3>_Shell</KEYWORD3>
+ <KEYWORD3>_Spellchk</KEYWORD3>
+ <KEYWORD3>_Sqlserver</KEYWORD3>
+ <KEYWORD3>_Startup</KEYWORD3>
+ <KEYWORD3>_Tabs</KEYWORD3>
+ <KEYWORD3>_Tally</KEYWORD3>
+ <KEYWORD3>_Text</KEYWORD3>
+ <KEYWORD3>_Throttle</KEYWORD3>
+ <KEYWORD3>_Transport</KEYWORD3>
+ <KEYWORD3>_Triggerlevel</KEYWORD3>
+ <KEYWORD3>_Unix</KEYWORD3>
+ <KEYWORD3>_Windows</KEYWORD3>
+ <KEYWORD3>_Wizard</KEYWORD3>
+ <KEYWORD3>_Wrap</KEYWORD3>
+ <KEYWORD3>French</KEYWORD3>
+ <KEYWORD3>German</KEYWORD3>
+ <KEYWORD3>Italian</KEYWORD3>
+ <KEYWORD3>Japan</KEYWORD3>
+ <KEYWORD3>Usa</KEYWORD3>
+ <KEYWORD3>Lparameter</KEYWORD3>
+ <KEYWORD3>This</KEYWORD3>
+ <KEYWORD3>Thisform</KEYWORD3>
+ <KEYWORD3>Thisformset</KEYWORD3>
+ <KEYWORD3>F</KEYWORD3>
+ <KEYWORD3>T</KEYWORD3>
+ <KEYWORD3>N</KEYWORD3>
+ <KEYWORD3>Y</KEYWORD3>
+ <KEYWORD3>OlePublic</KEYWORD3>
+ <KEYWORD3>Hidden</KEYWORD3>
+ <KEYWORD3>Each</KEYWORD3>
+ <KEYWORD3>DoEvents</KEYWORD3>
+ <KEYWORD3>Dll</KEYWORD3>
+ <KEYWORD3>Outer</KEYWORD3>
+ <KEYWORD3>At_c</KEYWORD3>
+ <KEYWORD3>Atcc</KEYWORD3>
+ <KEYWORD3>Ratc</KEYWORD3>
+ <KEYWORD3>Leftc</KEYWORD3>
+ <KEYWORD3>Rightc</KEYWORD3>
+ <KEYWORD3>Substrc</KEYWORD3>
+ <KEYWORD3>Stuffc</KEYWORD3>
+ <KEYWORD3>Lenc</KEYWORD3>
+ <KEYWORD3>Chrtranc</KEYWORD3>
+ <KEYWORD3>IsLeadByte</KEYWORD3>
+ <KEYWORD3>IMEStatus</KEYWORD3>
+ <KEYWORD3>Strconv</KEYWORD3>
+ <KEYWORD3>BinToC</KEYWORD3>
+ <KEYWORD3>CToBin</KEYWORD3>
+ <KEYWORD3>IsFLocked</KEYWORD3>
+ <KEYWORD3>IsRLocked</KEYWORD3>
+ <KEYWORD3>LoadPicture</KEYWORD3>
+ <KEYWORD3>SavePicture</KEYWORD3>
+ <KEYWORD3>Assert</KEYWORD3>
+ <KEYWORD3>DoDefault</KEYWORD3>
+ <KEYWORD3>_WebMenu</KEYWORD3>
+ <KEYWORD3>_scctext</KEYWORD3>
+ <KEYWORD3>_WebVFPHomePage</KEYWORD3>
+ <KEYWORD3>_WebVfpOnlineSupport</KEYWORD3>
+ <KEYWORD3>_WebDevOnly</KEYWORD3>
+ <KEYWORD3>_WebMsftHomePage</KEYWORD3>
+ <KEYWORD3>_Coverage</KEYWORD3>
+ <KEYWORD3>_vfp</KEYWORD3>
+ <KEYWORD3>Bintoc</KEYWORD3>
+ <KEYWORD3>Resources</KEYWORD3>
+ <KEYWORD3>Ctobin</KEYWORD3>
+ <KEYWORD3>Createoffline</KEYWORD3>
+ <KEYWORD3>Debugout</KEYWORD3>
+ <KEYWORD3>Doevents</KEYWORD3>
+ <KEYWORD3>Dropoffline</KEYWORD3>
+ <KEYWORD3>Each</KEYWORD3>
+ <KEYWORD3>Isflocked</KEYWORD3>
+ <KEYWORD3>Isrlocked</KEYWORD3>
+ <KEYWORD3>Loadpicture</KEYWORD3>
+ <KEYWORD3>Revertoffline</KEYWORD3>
+ <KEYWORD3>Savepicture</KEYWORD3>
+ <KEYWORD3>Asserts</KEYWORD3>
+ <KEYWORD3>Coverage</KEYWORD3>
+ <KEYWORD3>Eventtracking</KEYWORD3>
+ <KEYWORD3>DBGetProp</KEYWORD3>
+ <KEYWORD3>DBSetProp</KEYWORD3>
+ <KEYWORD3>CursorGetProp</KEYWORD3>
+ <KEYWORD3>CursorSetProp</KEYWORD3>
+ <KEYWORD3>Addbs</KEYWORD3>
+ <KEYWORD3>Agetclass</KEYWORD3>
+ <KEYWORD3>Agetfileversion</KEYWORD3>
+ <KEYWORD3>Alines</KEYWORD3>
+ <KEYWORD3>Amouseobj</KEYWORD3>
+ <KEYWORD3>Anetresources</KEYWORD3>
+ <KEYWORD3>Avcxclasses</KEYWORD3>
+ <KEYWORD3>Comclassinfo</KEYWORD3>
+ <KEYWORD3>Createobjectex</KEYWORD3>
+ <KEYWORD3>Defaultext</KEYWORD3>
+ <KEYWORD3>Drivetype</KEYWORD3>
+ <KEYWORD3>Filetostr</KEYWORD3>
+ <KEYWORD3>Forceext</KEYWORD3>
+ <KEYWORD3>Forcepath</KEYWORD3>
+ <KEYWORD3>Gethost</KEYWORD3>
+ <KEYWORD3>Indexseek</KEYWORD3>
+ <KEYWORD3>Ishosted</KEYWORD3>
+ <KEYWORD3>Justdrive</KEYWORD3>
+ <KEYWORD3>Justext</KEYWORD3>
+ <KEYWORD3>Justfname</KEYWORD3>
+ <KEYWORD3>Justpath</KEYWORD3>
+ <KEYWORD3>Juststem</KEYWORD3>
+ <KEYWORD3>Newobject</KEYWORD3>
+ <KEYWORD3>Olereturnerror</KEYWORD3>
+ <KEYWORD3>Strtofile</KEYWORD3>
+ <KEYWORD3>Vartype</KEYWORD3>
+ <KEYWORD3>_Coverage</KEYWORD3>
+ <KEYWORD3>_Gallery</KEYWORD3>
+ <KEYWORD3>_Genhtml</KEYWORD3>
+ <KEYWORD3>_Getexpr</KEYWORD3>
+ <KEYWORD3>_Include</KEYWORD3>
+ <KEYWORD3>_Runactivedoc</KEYWORD3>
+ <KEYWORD3>ProjectHook</KEYWORD3>
+ <KEYWORD3>ActiveDoc</KEYWORD3>
+ <KEYWORD3>HyperLink</KEYWORD3>
+ <KEYWORD3>Session</KEYWORD3>
+ <KEYWORD3>Mtdll</KEYWORD3>
+
+ <!-- New in Visual Foxpro 8.0 -->
+ <KEYWORD3>ADOCKTIP</KEYWORD3>
+ <KEYWORD3>ADirtip</KEYWORD3>
+ <KEYWORD3>ADockState</KEYWORD3>
+ <KEYWORD3>AEvents</KEYWORD3>
+ <KEYWORD3>AFONTTIP</KEYWORD3>
+ <KEYWORD3>ALanguage</KEYWORD3>
+ <KEYWORD3>AProcInfo</KEYWORD3>
+ <KEYWORD3>AStackInfo</KEYWORD3>
+ <KEYWORD3>ATagInfo</KEYWORD3>
+ <KEYWORD3>Adlls</KEYWORD3>
+ <KEYWORD3>Alentip</KEYWORD3>
+ <KEYWORD3>Amemberstip</KEYWORD3>
+ <KEYWORD3>Amemberstip2</KEYWORD3>
+ <KEYWORD3>Ascantip</KEYWORD3>
+ <KEYWORD3>Aselobjtip</KEYWORD3>
+ <KEYWORD3>Asessions</KEYWORD3>
+ <KEYWORD3>Asorttip</KEYWORD3>
+ <KEYWORD3>Asorttip2</KEYWORD3>
+ <KEYWORD3>BINDEVENTTIP</KEYWORD3>
+ <KEYWORD3>BindEvent</KEYWORD3>
+ <KEYWORD3>COMARRAYTIP</KEYWORD3>
+ <KEYWORD3>COMPROPTIP</KEYWORD3>
+ <KEYWORD3>Candidate</KEYWORD3>
+ <KEYWORD3>Cdx</KEYWORD3>
+ <KEYWORD3>ComArray</KEYWORD3>
+ <KEYWORD3>ComReturnError</KEYWORD3>
+ <KEYWORD3>Comprop</KEYWORD3>
+ <KEYWORD3>CreateBinary</KEYWORD3>
+ <KEYWORD3>CursorToXML</KEYWORD3>
+ <KEYWORD3>DIRTIP</KEYWORD3>
+ <KEYWORD3>Descending</KEYWORD3>
+ <KEYWORD3>DisplayPath</KEYWORD3>
+ <KEYWORD3>EditSource</KEYWORD3>
+ <KEYWORD3>EventHandler</KEYWORD3>
+ <KEYWORD3>Evl</KEYWORD3>
+ <KEYWORD3>ExecScript</KEYWORD3>
+ <KEYWORD3>FCREATETIP</KEYWORD3>
+ <KEYWORD3>FIELDTIP</KEYWORD3>
+ <KEYWORD3>FILETIP</KEYWORD3>
+ <KEYWORD3>FOPENTIP</KEYWORD3>
+ <KEYWORD3>FSEEKTIP</KEYWORD3>
+ <KEYWORD3>Fdate</KEYWORD3>
+ <KEYWORD3>Ftime</KEYWORD3>
+ <KEYWORD3>GetCursorAdapter</KEYWORD3>
+ <KEYWORD3>GetInterface</KEYWORD3>
+ <KEYWORD3>GetPem</KEYWORD3>
+ <KEYWORD3>GetWordCount</KEYWORD3>
+ <KEYWORD3>GetWordNum</KEYWORD3>
+ <KEYWORD3>InputBox</KEYWORD3>
+ <KEYWORD3>IsBlank</KEYWORD3>
+ <KEYWORD3>IsMouse</KEYWORD3>
+ <KEYWORD3>Like</KEYWORD3>
+ <KEYWORD3>Likec</KEYWORD3>
+ <KEYWORD3>Memory</KEYWORD3>
+ <KEYWORD3>Msgboxtip</KEYWORD3>
+ <KEYWORD3>Pcount</KEYWORD3>
+ <KEYWORD3>PemStatus</KEYWORD3>
+ <KEYWORD3>Popup</KEYWORD3>
+ <KEYWORD3>Quarter</KEYWORD3>
+ <KEYWORD3>RaiseEvent</KEYWORD3>
+ <KEYWORD3>RemoveProperty</KEYWORD3>
+ <KEYWORD3>SQLCancel</KEYWORD3>
+ <KEYWORD3>SQLColumns</KEYWORD3>
+ <KEYWORD3>SQLDisconnect</KEYWORD3>
+ <KEYWORD3>SQLExec</KEYWORD3>
+ <KEYWORD3>SQLGetProp</KEYWORD3>
+ <KEYWORD3>SQLMoreResults</KEYWORD3>
+ <KEYWORD3>SQLPrepare</KEYWORD3>
+ <KEYWORD3>SQLSetProp</KEYWORD3>
+ <KEYWORD3>SQLTables</KEYWORD3>
+ <KEYWORD3>STRTOFILETIP</KEYWORD3>
+ <KEYWORD3>Seconds</KEYWORD3>
+ <KEYWORD3>StrExTip</KEYWORD3>
+ <KEYWORD3>StrExtract</KEYWORD3>
+ <KEYWORD3>Strtrantip</KEYWORD3>
+ <KEYWORD3>Tagcount</KEYWORD3>
+ <KEYWORD3>Tagno</KEYWORD3>
+ <KEYWORD3>Textmerge</KEYWORD3>
+ <KEYWORD3>Try</KEYWORD3>
+ <KEYWORD3>UnBindEvents</KEYWORD3>
+ <KEYWORD3>WDockable</KEYWORD3>
+ <KEYWORD3>XMLTIP</KEYWORD3>
+ <KEYWORD3>XMLTIP2</KEYWORD3>
+ <KEYWORD3>XMLTIP3</KEYWORD3>
+ <KEYWORD3>XMLTIP4</KEYWORD3>
+ <KEYWORD3>XMLTIP5</KEYWORD3>
+ <KEYWORD3>XMLTIP6</KEYWORD3>
+ <KEYWORD3>XMLToCursor</KEYWORD3>
+ <KEYWORD3>XMLUpdategram</KEYWORD3>
+ <KEYWORD3>Blank</KEYWORD3>
+ <KEYWORD3>Catch</KEYWORD3>
+ <KEYWORD3>Dotip</KEYWORD3>
+ <KEYWORD3>EndTry</KEYWORD3>
+ <KEYWORD3>Finally</KEYWORD3>
+ <KEYWORD3>Implements</KEYWORD3>
+ <KEYWORD3>Opendatatip</KEYWORD3>
+ <KEYWORD3>Repltip</KEYWORD3>
+ <KEYWORD3>Throw</KEYWORD3>
+ <KEYWORD3>Usetip</KEYWORD3>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/freemarker.xml b/jEdit/modes/freemarker.xml
index 1590e72..d039bed 100644
--- a/jEdit/modes/freemarker.xml
+++ b/jEdit/modes/freemarker.xml
@@ -1,204 +1,204 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- A JEdit mode configuration file for FTL (FreeMarker Template Language)
- Note that this version will only work with JEdit 4.1pre6 or later.
- by Jonathan Revusky, revusky at users.sourceforge.net -->
-
-<MODE>
- <RULES IGNORE_CASE="FALSE">
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><script</BEGIN>
- <END></script></END>
- </SPAN>
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><Script</BEGIN>
- <END></Script></END>
- </SPAN>
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><style</BEGIN>
- <END></style></END>
- </SPAN>
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><Style</BEGIN>
- <END></Style></END>
- </SPAN>
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- XML/HTML comment -->
- <SPAN TYPE="COMMENT2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- FTL markup starts here. -->
-
- <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
- <BEGIN>#{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SPAN_REGEXP TYPE="KEYWORD1" HASH_CHAR="<#ftl" DELEGATE="EXPRESSION">
- <BEGIN><#ftl\b</BEGIN>
- <END>></END>
- </SPAN_REGEXP>
-
- <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="<">
- <BEGIN><#?(if|elseif|switch|foreach|list|case|assign|local|global|setting|include|import|stop|escape|macro|function|transform|call|visit|recurse)(\s|/|$)</BEGIN>
- <END>></END>
- </SPAN_REGEXP>
-
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="</"
- ></#?(assign|local|global|if|switch|foreach|list|escape|macro|function|transform|compress|noescape)></SEQ_REGEXP>
-
- <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="<">
- <BEGIN><#?(else|compress|noescape|default|break|flush|nested|t|rt|lt|return|recurse)\b</BEGIN>
- <END>></END>
- </SPAN_REGEXP>
-
- <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="</@">
- <BEGIN></@(([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*)*?)?</BEGIN>
- <END>></END>
- </SPAN_REGEXP>
-
- <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="<@">
- <BEGIN><@([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*?)*</BEGIN>
- <END>></END>
- </SPAN_REGEXP>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN><#--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SEQ TYPE="KEYWORD1"><stop></SEQ>
- <SPAN TYPE="COMMENT1">
- <BEGIN><comment></BEGIN>
- <END></comment></END>
- </SPAN>
- <SPAN TYPE="INVALID">
- <BEGIN><#</BEGIN>
- <END>></END>
- </SPAN>
- <SPAN TYPE="INVALID">
- <BEGIN></#</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- non-FTL markup -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
- </RULES>
-
- <RULES SET="EXPRESSION"
- DEFAULT="KEYWORD2"
- HIGHLIGHT_DIGITS="TRUE"
- IGNORE_CASE="FALSE"
- >
- <SPAN TYPE="COMMENT1">
- <BEGIN><#--</BEGIN>
- <END>--></END>
- </SPAN>
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="OPERATOR" DELEGATE="EXPRESSION">
- <BEGIN>(</BEGIN><END>)</END>
- </SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <!-- Builtins -->
- <MARK_FOLLOWING TYPE="FUNCTION">?</MARK_FOLLOWING>
- <KEYWORDS>
- <KEYWORD1>true</KEYWORD1>
- <KEYWORD1>false</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>using</KEYWORD1>
- <OPERATOR>gt</OPERATOR>
- <OPERATOR>gte</OPERATOR>
- <OPERATOR>lt</OPERATOR>
- <OPERATOR>lte</OPERATOR>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="TAGS" DEFAULT="MARKUP">
- <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- </RULES>
-
-
- <!-- a ruleset for when we are within a quoted string within an SGML tag
- It can contain FTL interpolations -->
- <RULES SET="INQUOTE" ESCAPE="\">
- <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
- <BEGIN>#{</BEGIN>
- <END>}</END>
- </SPAN>
- </RULES>
-
- <!-- empty ruleset to delegate to for spots where any non-whitespace is invalid -->
- <RULES SET="INVALID" DEFAULT="INVALID" />
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- A JEdit mode configuration file for FTL (FreeMarker Template Language)
+ Note that this version will only work with JEdit 4.1pre6 or later.
+ by Jonathan Revusky, revusky at users.sourceforge.net -->
+
+<MODE>
+ <RULES IGNORE_CASE="FALSE">
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><script</BEGIN>
+ <END></script></END>
+ </SPAN>
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><Script</BEGIN>
+ <END></Script></END>
+ </SPAN>
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><style</BEGIN>
+ <END></style></END>
+ </SPAN>
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><Style</BEGIN>
+ <END></Style></END>
+ </SPAN>
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- XML/HTML comment -->
+ <SPAN TYPE="COMMENT2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- FTL markup starts here. -->
+
+ <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
+ <BEGIN>#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SPAN_REGEXP TYPE="KEYWORD1" HASH_CHAR="<#ftl" DELEGATE="EXPRESSION">
+ <BEGIN><#ftl\b</BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+
+ <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="<">
+ <BEGIN><#?(if|elseif|switch|foreach|list|case|assign|local|global|setting|include|import|stop|escape|macro|function|transform|call|visit|recurse)(\s|/|$)</BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="</"
+ ></#?(assign|local|global|if|switch|foreach|list|escape|macro|function|transform|compress|noescape)></SEQ_REGEXP>
+
+ <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="<">
+ <BEGIN><#?(else|compress|noescape|default|break|flush|nested|t|rt|lt|return|recurse)\b</BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+
+ <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="INVALID" HASH_CHAR="</@">
+ <BEGIN></@(([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*)*?)?</BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+
+ <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="<@">
+ <BEGIN><@([_@\p{Alpha}][_@\p{Alnum}]*)(\.[_@\p{Alpha}][_@\p{Alnum}]*?)*</BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><#--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SEQ TYPE="KEYWORD1"><stop></SEQ>
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><comment></BEGIN>
+ <END></comment></END>
+ </SPAN>
+ <SPAN TYPE="INVALID">
+ <BEGIN><#</BEGIN>
+ <END>></END>
+ </SPAN>
+ <SPAN TYPE="INVALID">
+ <BEGIN></#</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- non-FTL markup -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="EXPRESSION"
+ DEFAULT="KEYWORD2"
+ HIGHLIGHT_DIGITS="TRUE"
+ IGNORE_CASE="FALSE"
+ >
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><#--</BEGIN>
+ <END>--></END>
+ </SPAN>
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="OPERATOR" DELEGATE="EXPRESSION">
+ <BEGIN>(</BEGIN><END>)</END>
+ </SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <!-- Builtins -->
+ <MARK_FOLLOWING TYPE="FUNCTION">?</MARK_FOLLOWING>
+ <KEYWORDS>
+ <KEYWORD1>true</KEYWORD1>
+ <KEYWORD1>false</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>using</KEYWORD1>
+ <OPERATOR>gt</OPERATOR>
+ <OPERATOR>gte</OPERATOR>
+ <OPERATOR>lt</OPERATOR>
+ <OPERATOR>lte</OPERATOR>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+ <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="INQUOTE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ </RULES>
+
+
+ <!-- a ruleset for when we are within a quoted string within an SGML tag
+ It can contain FTL interpolations -->
+ <RULES SET="INQUOTE" ESCAPE="\">
+ <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="EXPRESSION">
+ <BEGIN>#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ </RULES>
+
+ <!-- empty ruleset to delegate to for spots where any non-whitespace is invalid -->
+ <RULES SET="INVALID" DEFAULT="INVALID" />
+</MODE>
diff --git a/jEdit/modes/gcbasic.xml b/jEdit/modes/gcbasic.xml
index e060611..181d12e 100644
--- a/jEdit/modes/gcbasic.xml
+++ b/jEdit/modes/gcbasic.xml
@@ -1,894 +1,894 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Name: gcbasic.xml -->
-<!-- Version: 1.0 for jEdit 4.3 pre 15 -->
-<!-- Version: 17 August 2008 -->
-<!-- Title: jEdit Syntax highlighting Mode file for GCBASIC -->
-<!-- Author: Mark J. Twomey -->
-
-<!--
-Add a MODE entry in the catalog file for the following:
- NAME="gcbasic" FILE="gcbasic.xml"
- FILE_NAME_GLOB="*.{gc,gcb}"
- FIRST_LINE_GLOB="{*GCBASIC*,*Great Cow BASIC*}"
-===================================================================
-
-Note 1: GCBASIC (Great Cow BASIC) is an open-source BASIC compiler for Microchip PIC microcontrollers.
- For more information go here http://gcbasic.sourceforge.net/
-
-Note 2: It will not unindent as you type.
- However, if you do "Select All" (Ctrl-A), and then do "Indent Lines" (Ctrl-i),
- then it fixes the indentation of the whole program. It works great!
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="'" />
- <PROPERTY NAME="ignoreWhitespace" VALUE="TRUE" />
-
- <PROPERTY NAME="indentNextLines" VALUE="^(SUB\s.*|FUNCTION\s.*|MACRO\s.*|\s+DO\s+.*|\s+DO$|DO\s+.*|DO$|\s*FOR\s.*|FOR\s.*|REPEAT\s.*|CASE\s.*|\s+IF\s+.*\s+THEN$|IF\s+.*\s+THEN$|\s+#ifdef\s+.*$|#ifdef\s+.*$)" />
- <PROPERTY NAME="unindentThisLine" VALUE="^(\s+END\s+SUB.*|END\s+SUB.*|\s+END\s+FUNCTION.*|END\s+FUNCTION.*|\s+END\s+MACRO.*|END\s+MACRO.*|\s+LOOP.*|LOOP.*|\s+NEXT.*|NEXT.*|\s+END\s+IF.*|END\s+IF.*|\s+#endif.*|#endif.*|\s+#endif|#endif)" />
- <PROPERTY NAME="unindentNextLines" VALUE="^(\s+END\s+SUB|END\s+SUB|\s+END\s+SUB\s+|END\s+SUB\s+|\s+END\s+FUNCTION|END\s+FUNCTION|\s+END\s+FUNCTION\s+|END\s+FUNCTION\s+|\s+END\s+MACRO|END\s+MACRO|\s+END\s+MACRO\s+|END\s+MACRO\s+|\s+LOOP|LOOP|\s+LOOP\s+|LOOP\s+|\s+NEXT|NEXT|\s+NEXT\s+|NEXT\s+|\s+END\s+IF|END\s+IF|\s+END\s+IF\s+|END\s+IF\s+|\s+#endif|#endif|\s+#endif\s+|#endif\s+)" />
- </PROPS>
-
- <RULES ESCAPE="\" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT4">'</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT4">rem </EOL_SPAN>
-
- <!-- Arithmetic operators -->
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">+=</SEQ>
- <SEQ TYPE="OPERATOR">-=</SEQ>
-
- <!-- Logical operators -->
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
-
- <!-- Comparison operators -->
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
-
- <KEYWORDS>
- <!-- Compiler Directives -->
- <KEYWORD3>#include</KEYWORD3>
- <KEYWORD3>#define</KEYWORD3>
- <KEYWORD3>#chip</KEYWORD3>
- <KEYWORD3>#osc</KEYWORD3>
- <KEYWORD3>#config</KEYWORD3>
- <KEYWORD3>#IFDEF</KEYWORD3>
- <KEYWORD3>#ENDIF</KEYWORD3>
- <KEYWORD3>#SCRIPT</KEYWORD3>
- <KEYWORD3>#ENDSCRIPT</KEYWORD3>
- <KEYWORD3>#int</KEYWORD3>
- <KEYWORD3>#startup</KEYWORD3>
- <KEYWORD3>#RAM</KEYWORD3>
- <KEYWORD3>#mem</KEYWORD3>
-
- <!-- ====== CHIP DATA : START ====== -->
- <!-- [Ports] -->
- <KEYWORD2>PORTA</KEYWORD2>
- <KEYWORD2>PORTB</KEYWORD2>
- <KEYWORD2>PORTC</KEYWORD2>
- <KEYWORD2>PORTD</KEYWORD2>
- <KEYWORD2>PORTE</KEYWORD2>
- <KEYWORD2>PORTF</KEYWORD2>
- <KEYWORD2>PORTG</KEYWORD2>
- <KEYWORD2>PORTH</KEYWORD2>
- <KEYWORD2>PORTI</KEYWORD2>
- <KEYWORD2>PORTJ</KEYWORD2>
-
- <!-- [ChipData] -->
- <KEYWORD2>Prog</KEYWORD2>
- <KEYWORD2>EEPROM</KEYWORD2>
- <KEYWORD2>RAM</KEYWORD2>
- <KEYWORD2>I/O</KEYWORD2>
- <KEYWORD2>ADC</KEYWORD2>
- <KEYWORD2>MaxMHz</KEYWORD2>
- <KEYWORD2>IntOsc</KEYWORD2>
- <KEYWORD2>Pins</KEYWORD2>
- <KEYWORD2>Family</KEYWORD2>
- <KEYWORD2>ConfigWords</KEYWORD2>
- <KEYWORD2>PSP</KEYWORD2>
- <KEYWORD2>MaxAddress</KEYWORD2>
-
- <!-- [Interrupts] -->
- <KEYWORD2>ADCReady</KEYWORD2>
- <KEYWORD2>CCP1</KEYWORD2>
- <KEYWORD2>CCP2</KEYWORD2>
- <KEYWORD2>Comp1Change</KEYWORD2>
- <KEYWORD2>Comp2Change</KEYWORD2>
- <KEYWORD2>EEPROMReady</KEYWORD2>
- <KEYWORD2>ExtInt0</KEYWORD2>
- <KEYWORD2>LPWU</KEYWORD2>
- <KEYWORD2>OscillatorFail</KEYWORD2>
- <KEYWORD2>PORTBChange</KEYWORD2>
- <KEYWORD2>SSP1Collision</KEYWORD2>
- <KEYWORD2>SSP1Ready</KEYWORD2>
- <KEYWORD2>Timer0Overflow</KEYWORD2>
- <KEYWORD2>Timer1Overflow</KEYWORD2>
- <KEYWORD2>Timer2Overflow</KEYWORD2>
- <KEYWORD2>UsartRX1Ready</KEYWORD2>
- <KEYWORD2>UsartTX1Ready</KEYWORD2>
-
- <!-- [Registers] -->
- <KEYWORD2>INDF</KEYWORD2>
- <KEYWORD2>TMR0</KEYWORD2>
- <KEYWORD2>PCL</KEYWORD2>
- <KEYWORD2>STATUS</KEYWORD2>
- <KEYWORD2>FSR</KEYWORD2>
- <KEYWORD2>PCLATH</KEYWORD2>
- <KEYWORD2>INTCON</KEYWORD2>
- <KEYWORD2>PIR1</KEYWORD2>
- <KEYWORD2>PIR2</KEYWORD2>
- <KEYWORD2>TMR1L</KEYWORD2>
- <KEYWORD2>TMR1H</KEYWORD2>
- <KEYWORD2>T1CON</KEYWORD2>
- <KEYWORD2>TMR2</KEYWORD2>
- <KEYWORD2>T2CON</KEYWORD2>
- <KEYWORD2>SSPBUF</KEYWORD2>
- <KEYWORD2>SSPCON</KEYWORD2>
- <KEYWORD2>CCPR1L</KEYWORD2>
- <KEYWORD2>CCPR1H</KEYWORD2>
- <KEYWORD2>CCP1CON</KEYWORD2>
- <KEYWORD2>RCSTA</KEYWORD2>
- <KEYWORD2>TXREG</KEYWORD2>
- <KEYWORD2>RCREG</KEYWORD2>
- <KEYWORD2>CCPR2L</KEYWORD2>
- <KEYWORD2>CCPR2H</KEYWORD2>
- <KEYWORD2>CCP2CON</KEYWORD2>
- <KEYWORD2>ADRESH</KEYWORD2>
- <KEYWORD2>ADCON0</KEYWORD2>
- <KEYWORD2>OPTION_REG</KEYWORD2>
- <KEYWORD2>TRISA</KEYWORD2>
- <KEYWORD2>TRISB</KEYWORD2>
- <KEYWORD2>TRISC</KEYWORD2>
- <KEYWORD2>TRISD</KEYWORD2>
- <KEYWORD2>TRISE</KEYWORD2>
- <KEYWORD2>PIE1</KEYWORD2>
- <KEYWORD2>PIE2</KEYWORD2>
- <KEYWORD2>PCON</KEYWORD2>
- <KEYWORD2>OSCCON</KEYWORD2>
- <KEYWORD2>OSCTUNE</KEYWORD2>
- <KEYWORD2>SSPCON2</KEYWORD2>
- <KEYWORD2>PR2</KEYWORD2>
- <KEYWORD2>SSPADD</KEYWORD2>
- <KEYWORD2>SSPMSK</KEYWORD2>
- <KEYWORD2>MSK</KEYWORD2>
- <KEYWORD2>SSPSTAT</KEYWORD2>
- <KEYWORD2>WPUB</KEYWORD2>
- <KEYWORD2>IOCB</KEYWORD2>
- <KEYWORD2>VRCON</KEYWORD2>
- <KEYWORD2>TXSTA</KEYWORD2>
- <KEYWORD2>SPBRG</KEYWORD2>
- <KEYWORD2>SPBRGH</KEYWORD2>
- <KEYWORD2>PWM1CON</KEYWORD2>
- <KEYWORD2>ECCPAS</KEYWORD2>
- <KEYWORD2>PSTRCON</KEYWORD2>
- <KEYWORD2>ADRESL</KEYWORD2>
- <KEYWORD2>ADCON1</KEYWORD2>
- <KEYWORD2>WDTCON</KEYWORD2>
- <KEYWORD2>CM1CON0</KEYWORD2>
- <KEYWORD2>CM2CON0</KEYWORD2>
- <KEYWORD2>CM2CON1</KEYWORD2>
- <KEYWORD2>EEDATA</KEYWORD2>
- <KEYWORD2>EEDAT</KEYWORD2>
- <KEYWORD2>EEADR</KEYWORD2>
- <KEYWORD2>EEDATH</KEYWORD2>
- <KEYWORD2>EEADRH</KEYWORD2>
- <KEYWORD2>SRCON</KEYWORD2>
- <KEYWORD2>BAUDCTL</KEYWORD2>
- <KEYWORD2>ANSEL</KEYWORD2>
- <KEYWORD2>ANSELH</KEYWORD2>
- <KEYWORD2>EECON1</KEYWORD2>
- <KEYWORD2>EECON2</KEYWORD2>
-
- <!-- [Bits] -->
- <KEYWORD2>IRP</KEYWORD2>
- <KEYWORD2>RP1</KEYWORD2>
- <KEYWORD2>RP0</KEYWORD2>
- <KEYWORD2>NOT_TO</KEYWORD2>
- <KEYWORD2>NOT_PD</KEYWORD2>
- <KEYWORD2>Z</KEYWORD2>
- <KEYWORD2>DC</KEYWORD2>
- <KEYWORD2>C</KEYWORD2>
- <KEYWORD2>GIE</KEYWORD2>
- <KEYWORD2>PEIE</KEYWORD2>
- <KEYWORD2>T0IE</KEYWORD2>
- <KEYWORD2>TMR0IE</KEYWORD2>
- <KEYWORD2>INTE</KEYWORD2>
- <KEYWORD2>RBIE</KEYWORD2>
- <KEYWORD2>T0IF</KEYWORD2>
- <KEYWORD2>TMR0IF</KEYWORD2>
- <KEYWORD2>INTF</KEYWORD2>
- <KEYWORD2>RBIF</KEYWORD2>
- <KEYWORD2>ADIF</KEYWORD2>
- <KEYWORD2>RCIF</KEYWORD2>
- <KEYWORD2>TXIF</KEYWORD2>
- <KEYWORD2>SSPIF</KEYWORD2>
- <KEYWORD2>CCP1IF</KEYWORD2>
- <KEYWORD2>TMR2IF</KEYWORD2>
- <KEYWORD2>TMR1IF</KEYWORD2>
- <KEYWORD2>OSFIF</KEYWORD2>
- <KEYWORD2>C2IF</KEYWORD2>
- <KEYWORD2>C1IF</KEYWORD2>
- <KEYWORD2>EEIF</KEYWORD2>
- <KEYWORD2>BCLIF</KEYWORD2>
- <KEYWORD2>ULPWUIF</KEYWORD2>
- <KEYWORD2>CCP2IF</KEYWORD2>
- <KEYWORD2>T1GIV</KEYWORD2>
- <KEYWORD2>TMR1GE</KEYWORD2>
- <KEYWORD2>T1CKPS1</KEYWORD2>
- <KEYWORD2>T1CKPS0</KEYWORD2>
- <KEYWORD2>T1OSCEN</KEYWORD2>
- <KEYWORD2>NOT_T1SYNC</KEYWORD2>
- <KEYWORD2>T1INSYNC</KEYWORD2>
- <KEYWORD2>T1SYNC</KEYWORD2>
- <KEYWORD2>TMR1CS</KEYWORD2>
- <KEYWORD2>TMR1ON</KEYWORD2>
- <KEYWORD2>TOUTPS3</KEYWORD2>
- <KEYWORD2>TOUTPS2</KEYWORD2>
- <KEYWORD2>TOUTPS1</KEYWORD2>
- <KEYWORD2>TOUTPS0</KEYWORD2>
- <KEYWORD2>TMR2ON</KEYWORD2>
- <KEYWORD2>T2CKPS1</KEYWORD2>
- <KEYWORD2>T2CKPS0</KEYWORD2>
- <KEYWORD2>WCOL</KEYWORD2>
- <KEYWORD2>SSPOV</KEYWORD2>
- <KEYWORD2>SSPEN</KEYWORD2>
- <KEYWORD2>CKP</KEYWORD2>
- <KEYWORD2>SSPM3</KEYWORD2>
- <KEYWORD2>SSPM2</KEYWORD2>
- <KEYWORD2>SSPM1</KEYWORD2>
- <KEYWORD2>SSPM0</KEYWORD2>
- <KEYWORD2>P1M1</KEYWORD2>
- <KEYWORD2>P1M0</KEYWORD2>
- <KEYWORD2>DC1B1</KEYWORD2>
- <KEYWORD2>CCP1X</KEYWORD2>
- <KEYWORD2>DC1B0</KEYWORD2>
- <KEYWORD2>CCP1Y</KEYWORD2>
- <KEYWORD2>CCP1M3</KEYWORD2>
- <KEYWORD2>CCP1M2</KEYWORD2>
- <KEYWORD2>CCP1M1</KEYWORD2>
- <KEYWORD2>CCP1M0</KEYWORD2>
- <KEYWORD2>SPEN</KEYWORD2>
- <KEYWORD2>RX9</KEYWORD2>
- <KEYWORD2>RC9</KEYWORD2>
- <KEYWORD2>NOT_RC8</KEYWORD2>
- <KEYWORD2>RC8_9</KEYWORD2>
- <KEYWORD2>SREN</KEYWORD2>
- <KEYWORD2>CREN</KEYWORD2>
- <KEYWORD2>ADDEN</KEYWORD2>
- <KEYWORD2>FERR</KEYWORD2>
- <KEYWORD2>OERR</KEYWORD2>
- <KEYWORD2>RX9D</KEYWORD2>
- <KEYWORD2>RCD8</KEYWORD2>
- <KEYWORD2>CCP2X</KEYWORD2>
- <KEYWORD2>DC2B1</KEYWORD2>
- <KEYWORD2>CCP2Y</KEYWORD2>
- <KEYWORD2>DC2B0</KEYWORD2>
- <KEYWORD2>CCP2M3</KEYWORD2>
- <KEYWORD2>CCP2M2</KEYWORD2>
- <KEYWORD2>CCP2M1</KEYWORD2>
- <KEYWORD2>CCP2M0</KEYWORD2>
- <KEYWORD2>ADCS1</KEYWORD2>
- <KEYWORD2>ADCS0</KEYWORD2>
- <KEYWORD2>CHS3</KEYWORD2>
- <KEYWORD2>CHS2</KEYWORD2>
- <KEYWORD2>CHS1</KEYWORD2>
- <KEYWORD2>CHS0</KEYWORD2>
- <KEYWORD2>GO</KEYWORD2>
- <KEYWORD2>NOT_DONE</KEYWORD2>
- <KEYWORD2>GO_DONE</KEYWORD2>
- <KEYWORD2>ADON</KEYWORD2>
- <KEYWORD2>NOT_RBPU</KEYWORD2>
- <KEYWORD2>INTEDG</KEYWORD2>
- <KEYWORD2>T0CS</KEYWORD2>
- <KEYWORD2>T0SE</KEYWORD2>
- <KEYWORD2>PSA</KEYWORD2>
- <KEYWORD2>PS2</KEYWORD2>
- <KEYWORD2>PS1</KEYWORD2>
- <KEYWORD2>PS0</KEYWORD2>
- <KEYWORD2>ADIE</KEYWORD2>
- <KEYWORD2>RCIE</KEYWORD2>
- <KEYWORD2>TXIE</KEYWORD2>
- <KEYWORD2>SSPIE</KEYWORD2>
- <KEYWORD2>CCP1IE</KEYWORD2>
- <KEYWORD2>TMR2IE</KEYWORD2>
- <KEYWORD2>TMR1IE</KEYWORD2>
- <KEYWORD2>OSFIE</KEYWORD2>
- <KEYWORD2>C2IE</KEYWORD2>
- <KEYWORD2>C1IE</KEYWORD2>
- <KEYWORD2>EEIE</KEYWORD2>
- <KEYWORD2>BCLIE</KEYWORD2>
- <KEYWORD2>ULPWUIE</KEYWORD2>
- <KEYWORD2>CCP2IE</KEYWORD2>
- <KEYWORD2>ULPWUE</KEYWORD2>
- <KEYWORD2>SBOREN</KEYWORD2>
- <KEYWORD2>NOT_POR</KEYWORD2>
- <KEYWORD2>NOT_BO</KEYWORD2>
- <KEYWORD2>NOT_BOR</KEYWORD2>
- <KEYWORD2>IRCF2</KEYWORD2>
- <KEYWORD2>IRCF1</KEYWORD2>
- <KEYWORD2>IRCF0</KEYWORD2>
- <KEYWORD2>OSTS</KEYWORD2>
- <KEYWORD2>HTS</KEYWORD2>
- <KEYWORD2>LTS</KEYWORD2>
- <KEYWORD2>SCS</KEYWORD2>
- <KEYWORD2>TUN4</KEYWORD2>
- <KEYWORD2>TUN3</KEYWORD2>
- <KEYWORD2>TUN2</KEYWORD2>
- <KEYWORD2>TUN1</KEYWORD2>
- <KEYWORD2>TUN0</KEYWORD2>
- <KEYWORD2>GCEN</KEYWORD2>
- <KEYWORD2>ACKSTAT</KEYWORD2>
- <KEYWORD2>ACKDT</KEYWORD2>
- <KEYWORD2>ACKEN</KEYWORD2>
- <KEYWORD2>RCEN</KEYWORD2>
- <KEYWORD2>PEN</KEYWORD2>
- <KEYWORD2>RSEN</KEYWORD2>
- <KEYWORD2>SEN</KEYWORD2>
- <KEYWORD2>SMP</KEYWORD2>
- <KEYWORD2>CKE</KEYWORD2>
- <KEYWORD2>D</KEYWORD2>
- <KEYWORD2>I2C_DATA</KEYWORD2>
- <KEYWORD2>NOT_A</KEYWORD2>
- <KEYWORD2>NOT_ADDRESS</KEYWORD2>
- <KEYWORD2>D_A</KEYWORD2>
- <KEYWORD2>DATA_ADDRESS</KEYWORD2>
- <KEYWORD2>P</KEYWORD2>
- <KEYWORD2>I2C_STOP</KEYWORD2>
- <KEYWORD2>S</KEYWORD2>
- <KEYWORD2>I2C_START</KEYWORD2>
- <KEYWORD2>R</KEYWORD2>
- <KEYWORD2>I2C_READ</KEYWORD2>
- <KEYWORD2>NOT_W</KEYWORD2>
- <KEYWORD2>NOT_WRITE</KEYWORD2>
- <KEYWORD2>R_W</KEYWORD2>
- <KEYWORD2>READ_WRITE</KEYWORD2>
- <KEYWORD2>UA</KEYWORD2>
- <KEYWORD2>BF</KEYWORD2>
- <KEYWORD2>WPUB7</KEYWORD2>
- <KEYWORD2>WPUB6</KEYWORD2>
- <KEYWORD2>WPUB5</KEYWORD2>
- <KEYWORD2>WPUB4</KEYWORD2>
- <KEYWORD2>WPUB3</KEYWORD2>
- <KEYWORD2>WPUB2</KEYWORD2>
- <KEYWORD2>WPUB1</KEYWORD2>
- <KEYWORD2>WPUB0</KEYWORD2>
- <KEYWORD2>IOCB7</KEYWORD2>
- <KEYWORD2>IOCB6</KEYWORD2>
- <KEYWORD2>IOCB5</KEYWORD2>
- <KEYWORD2>IOCB4</KEYWORD2>
- <KEYWORD2>IOCB3</KEYWORD2>
- <KEYWORD2>IOCB2</KEYWORD2>
- <KEYWORD2>IOCB1</KEYWORD2>
- <KEYWORD2>IOCB0</KEYWORD2>
- <KEYWORD2>VREN</KEYWORD2>
- <KEYWORD2>VROE</KEYWORD2>
- <KEYWORD2>VRR</KEYWORD2>
- <KEYWORD2>VRSS</KEYWORD2>
- <KEYWORD2>VR3</KEYWORD2>
- <KEYWORD2>VR2</KEYWORD2>
- <KEYWORD2>VR1</KEYWORD2>
- <KEYWORD2>VR0</KEYWORD2>
- <KEYWORD2>CSRC</KEYWORD2>
- <KEYWORD2>TX9</KEYWORD2>
- <KEYWORD2>NOT_TX8</KEYWORD2>
- <KEYWORD2>TX8_9</KEYWORD2>
- <KEYWORD2>TXEN</KEYWORD2>
- <KEYWORD2>SYNC</KEYWORD2>
- <KEYWORD2>SENDB</KEYWORD2>
- <KEYWORD2>BRGH</KEYWORD2>
- <KEYWORD2>TRMT</KEYWORD2>
- <KEYWORD2>TX9D</KEYWORD2>
- <KEYWORD2>TXD8</KEYWORD2>
- <KEYWORD2>BRG7</KEYWORD2>
- <KEYWORD2>BRG6</KEYWORD2>
- <KEYWORD2>BRG5</KEYWORD2>
- <KEYWORD2>BRG4</KEYWORD2>
- <KEYWORD2>BRG3</KEYWORD2>
- <KEYWORD2>BRG2</KEYWORD2>
- <KEYWORD2>BRG1</KEYWORD2>
- <KEYWORD2>BRG0</KEYWORD2>
- <KEYWORD2>BRG15</KEYWORD2>
- <KEYWORD2>BRG14</KEYWORD2>
- <KEYWORD2>BRG13</KEYWORD2>
- <KEYWORD2>BRG12</KEYWORD2>
- <KEYWORD2>BRG11</KEYWORD2>
- <KEYWORD2>BRG10</KEYWORD2>
- <KEYWORD2>BRG9</KEYWORD2>
- <KEYWORD2>BRG8</KEYWORD2>
- <KEYWORD2>PRSEN</KEYWORD2>
- <KEYWORD2>PDC6</KEYWORD2>
- <KEYWORD2>PDC5</KEYWORD2>
- <KEYWORD2>PDC4</KEYWORD2>
- <KEYWORD2>PDC3</KEYWORD2>
- <KEYWORD2>PDC2</KEYWORD2>
- <KEYWORD2>PDC1</KEYWORD2>
- <KEYWORD2>PDC0</KEYWORD2>
- <KEYWORD2>ECCPASE</KEYWORD2>
- <KEYWORD2>ECCPAS2</KEYWORD2>
- <KEYWORD2>ECCPAS1</KEYWORD2>
- <KEYWORD2>ECCPAS0</KEYWORD2>
- <KEYWORD2>PSSAC1</KEYWORD2>
- <KEYWORD2>PSSAC0</KEYWORD2>
- <KEYWORD2>PSSBD1</KEYWORD2>
- <KEYWORD2>PSSBD0</KEYWORD2>
- <KEYWORD2>STRSYNC</KEYWORD2>
- <KEYWORD2>STRD</KEYWORD2>
- <KEYWORD2>STRC</KEYWORD2>
- <KEYWORD2>STRB</KEYWORD2>
- <KEYWORD2>STRA</KEYWORD2>
- <KEYWORD2>ADFM</KEYWORD2>
- <KEYWORD2>VCFG1</KEYWORD2>
- <KEYWORD2>VCFG0</KEYWORD2>
- <KEYWORD2>WDTPS3</KEYWORD2>
- <KEYWORD2>WDTPS2</KEYWORD2>
- <KEYWORD2>WDTPS1</KEYWORD2>
- <KEYWORD2>WDTPS0</KEYWORD2>
- <KEYWORD2>SWDTEN</KEYWORD2>
- <KEYWORD2>C1ON</KEYWORD2>
- <KEYWORD2>C1OUT</KEYWORD2>
- <KEYWORD2>C1OE</KEYWORD2>
- <KEYWORD2>C1POL</KEYWORD2>
- <KEYWORD2>C1R</KEYWORD2>
- <KEYWORD2>C1CH1</KEYWORD2>
- <KEYWORD2>C1CH0</KEYWORD2>
- <KEYWORD2>C2ON</KEYWORD2>
- <KEYWORD2>C2OUT</KEYWORD2>
- <KEYWORD2>C2OE</KEYWORD2>
- <KEYWORD2>C2POL</KEYWORD2>
- <KEYWORD2>C2R</KEYWORD2>
- <KEYWORD2>C2CH1</KEYWORD2>
- <KEYWORD2>C2CH0</KEYWORD2>
- <KEYWORD2>MC1OUT</KEYWORD2>
- <KEYWORD2>MC2OUT</KEYWORD2>
- <KEYWORD2>C1RSEL</KEYWORD2>
- <KEYWORD2>C2RSEL</KEYWORD2>
- <KEYWORD2>T1GSS</KEYWORD2>
- <KEYWORD2>C2SYNC</KEYWORD2>
- <KEYWORD2>SR0</KEYWORD2>
- <KEYWORD2>SR1</KEYWORD2>
- <KEYWORD2>C1SEN</KEYWORD2>
- <KEYWORD2>C2REN</KEYWORD2>
- <KEYWORD2>PULSS</KEYWORD2>
- <KEYWORD2>PULSR</KEYWORD2>
- <KEYWORD2>FVREN</KEYWORD2>
- <KEYWORD2>ABDOVF</KEYWORD2>
- <KEYWORD2>RCIDL</KEYWORD2>
- <KEYWORD2>SCKP</KEYWORD2>
- <KEYWORD2>BRG16</KEYWORD2>
- <KEYWORD2>WUE</KEYWORD2>
- <KEYWORD2>ABDEN</KEYWORD2>
-
- <KEYWORD2>ANS0</KEYWORD2>
- <KEYWORD2>ANS1</KEYWORD2>
- <KEYWORD2>ANS2</KEYWORD2>
- <KEYWORD2>ANS3</KEYWORD2>
- <KEYWORD2>ANS4</KEYWORD2>
- <KEYWORD2>ANS5</KEYWORD2>
- <KEYWORD2>ANS6</KEYWORD2>
- <KEYWORD2>ANS7</KEYWORD2>
- <KEYWORD2>ANS8</KEYWORD2>
- <KEYWORD2>ANS9</KEYWORD2>
- <KEYWORD2>ANS10</KEYWORD2>
- <KEYWORD2>ANS11</KEYWORD2>
- <KEYWORD2>ANS12</KEYWORD2>
- <KEYWORD2>ANS13</KEYWORD2>
-
- <KEYWORD2>EEPGD</KEYWORD2>
- <KEYWORD2>WRERR</KEYWORD2>
- <KEYWORD2>WREN</KEYWORD2>
- <KEYWORD2>WR</KEYWORD2>
- <KEYWORD2>RD</KEYWORD2>
-
- <!-- [Pins-DIP] -->
- <KEYWORD2>RA0</KEYWORD2>
- <KEYWORD2>RA1</KEYWORD2>
- <KEYWORD2>RA2</KEYWORD2>
- <KEYWORD2>RA3</KEYWORD2>
- <KEYWORD2>RA4</KEYWORD2>
- <KEYWORD2>RA5</KEYWORD2>
- <KEYWORD2>RA6</KEYWORD2>
- <KEYWORD2>RA7</KEYWORD2>
-
- <KEYWORD2>RB0</KEYWORD2>
- <KEYWORD2>RB1</KEYWORD2>
- <KEYWORD2>RB2</KEYWORD2>
- <KEYWORD2>RB3</KEYWORD2>
- <KEYWORD2>RB4</KEYWORD2>
- <KEYWORD2>RB5</KEYWORD2>
- <KEYWORD2>RB6</KEYWORD2>
- <KEYWORD2>RB7</KEYWORD2>
-
- <KEYWORD2>RC0</KEYWORD2>
- <KEYWORD2>RC1</KEYWORD2>
- <KEYWORD2>RC2</KEYWORD2>
- <KEYWORD2>RC3</KEYWORD2>
- <KEYWORD2>RC4</KEYWORD2>
- <KEYWORD2>RC5</KEYWORD2>
- <KEYWORD2>RC6</KEYWORD2>
- <KEYWORD2>RC7</KEYWORD2>
-
- <KEYWORD2>RD0</KEYWORD2>
- <KEYWORD2>RD1</KEYWORD2>
- <KEYWORD2>RD2</KEYWORD2>
- <KEYWORD2>RD3</KEYWORD2>
- <KEYWORD2>RD4</KEYWORD2>
- <KEYWORD2>RD5</KEYWORD2>
- <KEYWORD2>RD6</KEYWORD2>
- <KEYWORD2>RD7</KEYWORD2>
-
- <KEYWORD2>RE0</KEYWORD2>
- <KEYWORD2>RE1</KEYWORD2>
- <KEYWORD2>RE2</KEYWORD2>
- <KEYWORD2>RE3</KEYWORD2>
- <KEYWORD2>RE4</KEYWORD2>
- <KEYWORD2>RE5</KEYWORD2>
- <KEYWORD2>RE6</KEYWORD2>
- <KEYWORD2>RE7</KEYWORD2>
-
- <KEYWORD2>RF0</KEYWORD2>
- <KEYWORD2>RF1</KEYWORD2>
- <KEYWORD2>RF2</KEYWORD2>
- <KEYWORD2>RF3</KEYWORD2>
- <KEYWORD2>RF4</KEYWORD2>
- <KEYWORD2>RF5</KEYWORD2>
- <KEYWORD2>RF6</KEYWORD2>
- <KEYWORD2>RF7</KEYWORD2>
-
- <KEYWORD2>RG0</KEYWORD2>
- <KEYWORD2>RG1</KEYWORD2>
- <KEYWORD2>RG2</KEYWORD2>
- <KEYWORD2>RG3</KEYWORD2>
- <KEYWORD2>RG4</KEYWORD2>
- <KEYWORD2>RG5</KEYWORD2>
- <KEYWORD2>RG6</KEYWORD2>
- <KEYWORD2>RG7</KEYWORD2>
-
- <KEYWORD2>RH0</KEYWORD2>
- <KEYWORD2>RH1</KEYWORD2>
- <KEYWORD2>RH2</KEYWORD2>
- <KEYWORD2>RH3</KEYWORD2>
- <KEYWORD2>RH4</KEYWORD2>
- <KEYWORD2>RH5</KEYWORD2>
- <KEYWORD2>RH6</KEYWORD2>
- <KEYWORD2>RH7</KEYWORD2>
-
- <KEYWORD2>RI0</KEYWORD2>
- <KEYWORD2>RI1</KEYWORD2>
- <KEYWORD2>RI2</KEYWORD2>
- <KEYWORD2>RI3</KEYWORD2>
- <KEYWORD2>RI4</KEYWORD2>
- <KEYWORD2>RI5</KEYWORD2>
- <KEYWORD2>RI6</KEYWORD2>
- <KEYWORD2>RI7</KEYWORD2>
-
- <KEYWORD2>RJ0</KEYWORD2>
- <KEYWORD2>RJ1</KEYWORD2>
- <KEYWORD2>RJ2</KEYWORD2>
- <KEYWORD2>RJ3</KEYWORD2>
- <KEYWORD2>RJ4</KEYWORD2>
- <KEYWORD2>RJ5</KEYWORD2>
- <KEYWORD2>RJ6</KEYWORD2>
- <KEYWORD2>RJ7</KEYWORD2>
-
- <KEYWORD2>AN0</KEYWORD2>
- <KEYWORD2>AN1</KEYWORD2>
- <KEYWORD2>AN2</KEYWORD2>
- <KEYWORD2>AN3</KEYWORD2>
- <KEYWORD2>AN4</KEYWORD2>
- <KEYWORD2>AN5</KEYWORD2>
- <KEYWORD2>AN6</KEYWORD2>
- <KEYWORD2>AN7</KEYWORD2>
- <KEYWORD2>AN8</KEYWORD2>
- <KEYWORD2>AN9</KEYWORD2>
- <KEYWORD2>AN0</KEYWORD2>
- <KEYWORD2>AN11</KEYWORD2>
- <KEYWORD2>AN12</KEYWORD2>
- <KEYWORD2>AN13</KEYWORD2>
- <KEYWORD2>AN14</KEYWORD2>
- <KEYWORD2>AN15</KEYWORD2>
- <KEYWORD2>AN16</KEYWORD2>
- <KEYWORD2>AN17</KEYWORD2>
- <KEYWORD2>AN18</KEYWORD2>
- <KEYWORD2>AN19</KEYWORD2>
-
- <KEYWORD2>MCLR</KEYWORD2>
-
- <KEYWORD2>C1INP</KEYWORD2>
- <KEYWORD2>C2INP</KEYWORD2>
-
- <KEYWORD2>T1G</KEYWORD2>
-
- <KEYWORD2>T1CKI</KEYWORD2>
- <KEYWORD2>T0CKI</KEYWORD2>
-
- <KEYWORD2>C1OUT</KEYWORD2>
- <KEYWORD2>C2OUT</KEYWORD2>
-
- <KEYWORD2>OSC1</KEYWORD2>
- <KEYWORD2>OSC2</KEYWORD2>
-
- <KEYWORD2>U1TX</KEYWORD2>
- <KEYWORD2>U1RX</KEYWORD2>
-
- <KEYWORD2>CCP1</KEYWORD2>
- <KEYWORD2>CCP2</KEYWORD2>
-
- <KEYWORD2>ECCPA</KEYWORD2>
- <KEYWORD2>ECCPB</KEYWORD2>
- <KEYWORD2>ECCPC</KEYWORD2>
- <KEYWORD2>ECCPD</KEYWORD2>
-
- <KEYWORD2>Vss</KEYWORD2>
- <KEYWORD2>Vdd</KEYWORD2>
- <KEYWORD2>Vss</KEYWORD2>
- <KEYWORD2>Vdd</KEYWORD2>
-
- <!-- [ConfigOps] -->
- <KEYWORD2>DEBUG</KEYWORD2>
- <KEYWORD2>LVP</KEYWORD2>
- <KEYWORD2>FCMEN</KEYWORD2>
- <KEYWORD2>IESO</KEYWORD2>
- <KEYWORD2>BOR</KEYWORD2>
- <KEYWORD2>CPD</KEYWORD2>
- <KEYWORD2>CP</KEYWORD2>
- <KEYWORD2>MCLRE</KEYWORD2>
- <KEYWORD2>PWRTE</KEYWORD2>
- <KEYWORD2>WDT</KEYWORD2>
- <KEYWORD2>OSC</KEYWORD2>
- <KEYWORD2>WRT</KEYWORD2>
- <KEYWORD2>BORV</KEYWORD2>
-
-
- <!-- [Config] -->
- <KEYWORD2>DEBUG_ON</KEYWORD2>
- <KEYWORD2>DEBUG_OFF</KEYWORD2>
- <KEYWORD2>LVP_ON</KEYWORD2>
- <KEYWORD2>LVP_OFF</KEYWORD2>
- <KEYWORD2>FCMEN_ON</KEYWORD2>
- <KEYWORD2>FCMEN_OFF</KEYWORD2>
- <KEYWORD2>IESO_ON</KEYWORD2>
- <KEYWORD2>IESO_OFF</KEYWORD2>
- <KEYWORD2>BOR_ON</KEYWORD2>
- <KEYWORD2>BOR_NSLEEP</KEYWORD2>
- <KEYWORD2>BOR_SBODEN</KEYWORD2>
- <KEYWORD2>BOR_OFF</KEYWORD2>
- <KEYWORD2>CPD_ON</KEYWORD2>
- <KEYWORD2>CPD_OFF</KEYWORD2>
- <KEYWORD2>CP_ON</KEYWORD2>
- <KEYWORD2>CP_OFF</KEYWORD2>
- <KEYWORD2>MCLRE_ON</KEYWORD2>
- <KEYWORD2>MCLRE_OFF</KEYWORD2>
- <KEYWORD2>PWRTE_ON</KEYWORD2>
- <KEYWORD2>PWRTE_OFF</KEYWORD2>
- <KEYWORD2>WDT_ON</KEYWORD2>
- <KEYWORD2>WDT_OFF</KEYWORD2>
- <KEYWORD2>LP_OSC</KEYWORD2>
- <KEYWORD2>XT_OSC</KEYWORD2>
- <KEYWORD2>HS_OSC</KEYWORD2>
- <KEYWORD2>EC_OSC</KEYWORD2>
- <KEYWORD2>INTRC_OSC_NOCLKOUT</KEYWORD2>
- <KEYWORD2>INTRC_OSC_CLKOUT</KEYWORD2>
- <KEYWORD2>EXTRC_OSC_NOCLKOUT</KEYWORD2>
- <KEYWORD2>EXTRC_OSC_CLKOUT</KEYWORD2>
- <KEYWORD2>INTOSCIO</KEYWORD2>
- <KEYWORD2>INTOSC</KEYWORD2>
- <KEYWORD2>EXTRCIO</KEYWORD2>
- <KEYWORD2>EXTRC</KEYWORD2>
- <KEYWORD2>WRT_OFF</KEYWORD2>
- <KEYWORD2>WRT_256</KEYWORD2>
- <KEYWORD2>WRT_1FOURTH</KEYWORD2>
- <KEYWORD2>WRT_HALF</KEYWORD2>
- <KEYWORD2>BOR21V</KEYWORD2>
- <KEYWORD2>BOR40V</KEYWORD2>
-
-
- <!-- ====== CHIP DATA : END ====== -->
-
-
- <!-- Flow Control -->
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>gosub</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
-
- <!-- Loop Statements -->
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>step</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
-
- <!-- Do..Loop -->
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
-
- <!-- Repeat..Loop -->
- <KEYWORD1>repeat</KEYWORD1>
-
- <!-- Select..Case -->
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
-
- <!-- Call..Every -->
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>every</KEYWORD1>
-
- <!-- Closing, Exit Statements -->
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
-
- <!-- Methods, Functions, Class, Properties, Variables -->
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>sub</KEYWORD1>
- <KEYWORD1>macro</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
-
- <!-- Declaration -->
- <KEYWORD1>dim</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
-
- <!-- Bitwise -->
- <KEYWORD1>rotate</KEYWORD1>
- <KEYWORD1>left</KEYWORD1>
- <KEYWORD1>right</KEYWORD1>
- <KEYWORD1>simple</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
-
- <!-- Comments -->
- <KEYWORD1>rem</KEYWORD1>
-
- <!-- RS 232 Commands -->
- <KEYWORD1>InitSer </KEYWORD1>
- <KEYWORD1>SerSend </KEYWORD1>
- <KEYWORD1>SerReceive </KEYWORD1>
- <KEYWORD1>SerPrint </KEYWORD1>
-
- <!-- A/D Commands -->
- <KEYWORD1>ReadAD </KEYWORD1>
- <KEYWORD1>ADFormat </KEYWORD1>
- <KEYWORD1>ADOff </KEYWORD1>
-
- <!-- SPI/I2C Commands -->
- <KEYWORD1>SPIMode </KEYWORD1>
- <KEYWORD1>SPITransfer </KEYWORD1>
-
- <!-- EEPROM Commands -->
- <KEYWORD1>EPRead </KEYWORD1>
- <KEYWORD1>EPWrite </KEYWORD1>
- <KEYWORD1>ProgramWrite </KEYWORD1>
- <KEYWORD1>ProgramRead </KEYWORD1>
- <KEYWORD1>ProgramErase </KEYWORD1>
-
- <!-- Hardware PWM Commands -->
- <KEYWORD1>PWMOn </KEYWORD1>
- <KEYWORD1>PWMOff </KEYWORD1>
- <KEYWORD1>HPWM </KEYWORD1>
-
- <!-- SRF04 Distance Sensor PWM Commands -->
- <KEYWORD1>USDistance </KEYWORD1>
-
- <!-- Sound PWM Commands -->
- <KEYWORD1>Tone </KEYWORD1>
-
- <!-- LCD Display Commands -->
- <KEYWORD1>PRINT </KEYWORD1>
- <KEYWORD1>LOCATE </KEYWORD1>
- <KEYWORD1>PUT </KEYWORD1>
- <KEYWORD1>CLS </KEYWORD1>
- <KEYWORD1>LCDInt </KEYWORD1>
- <KEYWORD1>LCDHex </KEYWORD1>
- <KEYWORD1>LCDWord </KEYWORD1>
-
- <!-- 7-Segment Display Commands -->
- <KEYWORD1>DisplayValue </KEYWORD1>
- <KEYWORD1>DisplayChar </KEYWORD1>
-
- <!-- Keypad Commands -->
- <KEYWORD1>KeypadRaw</KEYWORD1>
- <KEYWORD1>KeypadData</KEYWORD1>
-
- <!-- String handling Functions -->
- <KEYWORD1>LEN </KEYWORD1>
- <KEYWORD1>MID$ </KEYWORD1>
-
- <!-- Timer Functions -->
- <KEYWORD1>InitTimer0</KEYWORD1>
- <KEYWORD1>InitTimer1</KEYWORD1>
- <KEYWORD1>InitTimer2</KEYWORD1>
- <KEYWORD1>ClearTimer</KEYWORD1>
- <KEYWORD1>StartTimer</KEYWORD1>
- <KEYWORD1>StopTimer</KEYWORD1>
-
- <!-- Miscellaneous Commands/Functions -->
- <KEYWORD1>WAIT</KEYWORD1>
- <KEYWORD1>SLEEP</KEYWORD1>
- <KEYWORD1>DIR</KEYWORD1>
- <KEYWORD3>IN</KEYWORD3>
- <KEYWORD3>OUT</KEYWORD3>
- <KEYWORD1>PORT</KEYWORD1>
- <KEYWORD1>PULSEOUT</KEYWORD1>
- <KEYWORD1>POT</KEYWORD1>
- <KEYWORD1>PWMOut</KEYWORD1>
- <KEYWORD1>PEEK</KEYWORD1>
- <KEYWORD1>POKE</KEYWORD1>
- <KEYWORD1>Random</KEYWORD1>
- <KEYWORD1>Swap</KEYWORD1>
- <KEYWORD1>Swap4</KEYWORD1>
- <KEYWORD1>Table</KEYWORD1>
- <KEYWORD1>ReadTable</KEYWORD1>
-
- <!-- Logical operators -->
- <OPERATOR>and</OPERATOR>
- <OPERATOR>or</OPERATOR>
- <OPERATOR>not</OPERATOR>
- <OPERATOR>xor</OPERATOR>
-
- <!-- Datatypes Constants/Literals -->
- <KEYWORD3>false</KEYWORD3>
- <KEYWORD3>true</KEYWORD3>
- <KEYWORD3>on</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
-
- <!-- Constants Time Units -->
- <LITERAL2>us</LITERAL2>
- <LITERAL2>10us</LITERAL2>
- <LITERAL2>ms</LITERAL2>
- <LITERAL2>10ms</LITERAL2>
- <LITERAL2>s</LITERAL2>
- <LITERAL2>sec</LITERAL2>
- <LITERAL2>m</LITERAL2>
- <LITERAL2>h</LITERAL2>
-
- <!-- Data Types -->
- <LITERAL2>bit</LITERAL2>
- <LITERAL2>byte</LITERAL2>
- <LITERAL2>word</LITERAL2>
- <LITERAL2>float</LITERAL2>
-
- <!-- Built-in #defines (used for #IFDEF) -->
- <LITERAL2>ChipMHz</LITERAL2>
- <LITERAL2>ChipName</LITERAL2>
- <LITERAL2>ChipFamily</LITERAL2>
- <LITERAL2>OSC</LITERAL2>
- <LITERAL2>Var</LITERAL2>
- <LITERAL2>NoVar</LITERAL2>
- <LITERAL2>Bit</LITERAL2>
- <LITERAL2>NoBit</LITERAL2>
- <LITERAL2>AllOf</LITERAL2>
- <LITERAL2>OneOf</LITERAL2>
-
- </KEYWORDS>
-
- <!-- Binary Numbers instead of single quote comments. For example b'00011011' -->
- <SPAN TYPE="LITERAL1" >
- <BEGIN>b'</BEGIN><END>'</END>
- </SPAN>
-
- </RULES>
-
-</MODE>
-
-
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Name: gcbasic.xml -->
+<!-- Version: 1.0 for jEdit 4.3 pre 15 -->
+<!-- Version: 17 August 2008 -->
+<!-- Title: jEdit Syntax highlighting Mode file for GCBASIC -->
+<!-- Author: Mark J. Twomey -->
+
+<!--
+Add a MODE entry in the catalog file for the following:
+ NAME="gcbasic" FILE="gcbasic.xml"
+ FILE_NAME_GLOB="*.{gc,gcb}"
+ FIRST_LINE_GLOB="{*GCBASIC*,*Great Cow BASIC*}"
+===================================================================
+
+Note 1: GCBASIC (Great Cow BASIC) is an open-source BASIC compiler for Microchip PIC microcontrollers.
+ For more information go here http://gcbasic.sourceforge.net/
+
+Note 2: It will not unindent as you type.
+ However, if you do "Select All" (Ctrl-A), and then do "Indent Lines" (Ctrl-i),
+ then it fixes the indentation of the whole program. It works great!
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="'" />
+ <PROPERTY NAME="ignoreWhitespace" VALUE="TRUE" />
+
+ <PROPERTY NAME="indentNextLines" VALUE="^(SUB\s.*|FUNCTION\s.*|MACRO\s.*|\s+DO\s+.*|\s+DO$|DO\s+.*|DO$|\s*FOR\s.*|FOR\s.*|REPEAT\s.*|CASE\s.*|\s+IF\s+.*\s+THEN$|IF\s+.*\s+THEN$|\s+#ifdef\s+.*$|#ifdef\s+.*$)" />
+ <PROPERTY NAME="unindentThisLine" VALUE="^(\s+END\s+SUB.*|END\s+SUB.*|\s+END\s+FUNCTION.*|END\s+FUNCTION.*|\s+END\s+MACRO.*|END\s+MACRO.*|\s+LOOP.*|LOOP.*|\s+NEXT.*|NEXT.*|\s+END\s+IF.*|END\s+IF.*|\s+#endif.*|#endif.*|\s+#endif|#endif)" />
+ <PROPERTY NAME="unindentNextLines" VALUE="^(\s+END\s+SUB|END\s+SUB|\s+END\s+SUB\s+|END\s+SUB\s+|\s+END\s+FUNCTION|END\s+FUNCTION|\s+END\s+FUNCTION\s+|END\s+FUNCTION\s+|\s+END\s+MACRO|END\s+MACRO|\s+END\s+MACRO\s+|END\s+MACRO\s+|\s+LOOP|LOOP|\s+LOOP\s+|LOOP\s+|\s+NEXT|NEXT|\s+NEXT\s+|NEXT\s+|\s+END\s+IF|END\s+IF|\s+END\s+IF\s+|END\s+IF\s+|\s+#endif|#endif|\s+#endif\s+|#endif\s+)" />
+ </PROPS>
+
+ <RULES ESCAPE="\" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT4">'</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT4">rem </EOL_SPAN>
+
+ <!-- Arithmetic operators -->
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">+=</SEQ>
+ <SEQ TYPE="OPERATOR">-=</SEQ>
+
+ <!-- Logical operators -->
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+
+ <!-- Comparison operators -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+
+ <KEYWORDS>
+ <!-- Compiler Directives -->
+ <KEYWORD3>#include</KEYWORD3>
+ <KEYWORD3>#define</KEYWORD3>
+ <KEYWORD3>#chip</KEYWORD3>
+ <KEYWORD3>#osc</KEYWORD3>
+ <KEYWORD3>#config</KEYWORD3>
+ <KEYWORD3>#IFDEF</KEYWORD3>
+ <KEYWORD3>#ENDIF</KEYWORD3>
+ <KEYWORD3>#SCRIPT</KEYWORD3>
+ <KEYWORD3>#ENDSCRIPT</KEYWORD3>
+ <KEYWORD3>#int</KEYWORD3>
+ <KEYWORD3>#startup</KEYWORD3>
+ <KEYWORD3>#RAM</KEYWORD3>
+ <KEYWORD3>#mem</KEYWORD3>
+
+ <!-- ====== CHIP DATA : START ====== -->
+ <!-- [Ports] -->
+ <KEYWORD2>PORTA</KEYWORD2>
+ <KEYWORD2>PORTB</KEYWORD2>
+ <KEYWORD2>PORTC</KEYWORD2>
+ <KEYWORD2>PORTD</KEYWORD2>
+ <KEYWORD2>PORTE</KEYWORD2>
+ <KEYWORD2>PORTF</KEYWORD2>
+ <KEYWORD2>PORTG</KEYWORD2>
+ <KEYWORD2>PORTH</KEYWORD2>
+ <KEYWORD2>PORTI</KEYWORD2>
+ <KEYWORD2>PORTJ</KEYWORD2>
+
+ <!-- [ChipData] -->
+ <KEYWORD2>Prog</KEYWORD2>
+ <KEYWORD2>EEPROM</KEYWORD2>
+ <KEYWORD2>RAM</KEYWORD2>
+ <KEYWORD2>I/O</KEYWORD2>
+ <KEYWORD2>ADC</KEYWORD2>
+ <KEYWORD2>MaxMHz</KEYWORD2>
+ <KEYWORD2>IntOsc</KEYWORD2>
+ <KEYWORD2>Pins</KEYWORD2>
+ <KEYWORD2>Family</KEYWORD2>
+ <KEYWORD2>ConfigWords</KEYWORD2>
+ <KEYWORD2>PSP</KEYWORD2>
+ <KEYWORD2>MaxAddress</KEYWORD2>
+
+ <!-- [Interrupts] -->
+ <KEYWORD2>ADCReady</KEYWORD2>
+ <KEYWORD2>CCP1</KEYWORD2>
+ <KEYWORD2>CCP2</KEYWORD2>
+ <KEYWORD2>Comp1Change</KEYWORD2>
+ <KEYWORD2>Comp2Change</KEYWORD2>
+ <KEYWORD2>EEPROMReady</KEYWORD2>
+ <KEYWORD2>ExtInt0</KEYWORD2>
+ <KEYWORD2>LPWU</KEYWORD2>
+ <KEYWORD2>OscillatorFail</KEYWORD2>
+ <KEYWORD2>PORTBChange</KEYWORD2>
+ <KEYWORD2>SSP1Collision</KEYWORD2>
+ <KEYWORD2>SSP1Ready</KEYWORD2>
+ <KEYWORD2>Timer0Overflow</KEYWORD2>
+ <KEYWORD2>Timer1Overflow</KEYWORD2>
+ <KEYWORD2>Timer2Overflow</KEYWORD2>
+ <KEYWORD2>UsartRX1Ready</KEYWORD2>
+ <KEYWORD2>UsartTX1Ready</KEYWORD2>
+
+ <!-- [Registers] -->
+ <KEYWORD2>INDF</KEYWORD2>
+ <KEYWORD2>TMR0</KEYWORD2>
+ <KEYWORD2>PCL</KEYWORD2>
+ <KEYWORD2>STATUS</KEYWORD2>
+ <KEYWORD2>FSR</KEYWORD2>
+ <KEYWORD2>PCLATH</KEYWORD2>
+ <KEYWORD2>INTCON</KEYWORD2>
+ <KEYWORD2>PIR1</KEYWORD2>
+ <KEYWORD2>PIR2</KEYWORD2>
+ <KEYWORD2>TMR1L</KEYWORD2>
+ <KEYWORD2>TMR1H</KEYWORD2>
+ <KEYWORD2>T1CON</KEYWORD2>
+ <KEYWORD2>TMR2</KEYWORD2>
+ <KEYWORD2>T2CON</KEYWORD2>
+ <KEYWORD2>SSPBUF</KEYWORD2>
+ <KEYWORD2>SSPCON</KEYWORD2>
+ <KEYWORD2>CCPR1L</KEYWORD2>
+ <KEYWORD2>CCPR1H</KEYWORD2>
+ <KEYWORD2>CCP1CON</KEYWORD2>
+ <KEYWORD2>RCSTA</KEYWORD2>
+ <KEYWORD2>TXREG</KEYWORD2>
+ <KEYWORD2>RCREG</KEYWORD2>
+ <KEYWORD2>CCPR2L</KEYWORD2>
+ <KEYWORD2>CCPR2H</KEYWORD2>
+ <KEYWORD2>CCP2CON</KEYWORD2>
+ <KEYWORD2>ADRESH</KEYWORD2>
+ <KEYWORD2>ADCON0</KEYWORD2>
+ <KEYWORD2>OPTION_REG</KEYWORD2>
+ <KEYWORD2>TRISA</KEYWORD2>
+ <KEYWORD2>TRISB</KEYWORD2>
+ <KEYWORD2>TRISC</KEYWORD2>
+ <KEYWORD2>TRISD</KEYWORD2>
+ <KEYWORD2>TRISE</KEYWORD2>
+ <KEYWORD2>PIE1</KEYWORD2>
+ <KEYWORD2>PIE2</KEYWORD2>
+ <KEYWORD2>PCON</KEYWORD2>
+ <KEYWORD2>OSCCON</KEYWORD2>
+ <KEYWORD2>OSCTUNE</KEYWORD2>
+ <KEYWORD2>SSPCON2</KEYWORD2>
+ <KEYWORD2>PR2</KEYWORD2>
+ <KEYWORD2>SSPADD</KEYWORD2>
+ <KEYWORD2>SSPMSK</KEYWORD2>
+ <KEYWORD2>MSK</KEYWORD2>
+ <KEYWORD2>SSPSTAT</KEYWORD2>
+ <KEYWORD2>WPUB</KEYWORD2>
+ <KEYWORD2>IOCB</KEYWORD2>
+ <KEYWORD2>VRCON</KEYWORD2>
+ <KEYWORD2>TXSTA</KEYWORD2>
+ <KEYWORD2>SPBRG</KEYWORD2>
+ <KEYWORD2>SPBRGH</KEYWORD2>
+ <KEYWORD2>PWM1CON</KEYWORD2>
+ <KEYWORD2>ECCPAS</KEYWORD2>
+ <KEYWORD2>PSTRCON</KEYWORD2>
+ <KEYWORD2>ADRESL</KEYWORD2>
+ <KEYWORD2>ADCON1</KEYWORD2>
+ <KEYWORD2>WDTCON</KEYWORD2>
+ <KEYWORD2>CM1CON0</KEYWORD2>
+ <KEYWORD2>CM2CON0</KEYWORD2>
+ <KEYWORD2>CM2CON1</KEYWORD2>
+ <KEYWORD2>EEDATA</KEYWORD2>
+ <KEYWORD2>EEDAT</KEYWORD2>
+ <KEYWORD2>EEADR</KEYWORD2>
+ <KEYWORD2>EEDATH</KEYWORD2>
+ <KEYWORD2>EEADRH</KEYWORD2>
+ <KEYWORD2>SRCON</KEYWORD2>
+ <KEYWORD2>BAUDCTL</KEYWORD2>
+ <KEYWORD2>ANSEL</KEYWORD2>
+ <KEYWORD2>ANSELH</KEYWORD2>
+ <KEYWORD2>EECON1</KEYWORD2>
+ <KEYWORD2>EECON2</KEYWORD2>
+
+ <!-- [Bits] -->
+ <KEYWORD2>IRP</KEYWORD2>
+ <KEYWORD2>RP1</KEYWORD2>
+ <KEYWORD2>RP0</KEYWORD2>
+ <KEYWORD2>NOT_TO</KEYWORD2>
+ <KEYWORD2>NOT_PD</KEYWORD2>
+ <KEYWORD2>Z</KEYWORD2>
+ <KEYWORD2>DC</KEYWORD2>
+ <KEYWORD2>C</KEYWORD2>
+ <KEYWORD2>GIE</KEYWORD2>
+ <KEYWORD2>PEIE</KEYWORD2>
+ <KEYWORD2>T0IE</KEYWORD2>
+ <KEYWORD2>TMR0IE</KEYWORD2>
+ <KEYWORD2>INTE</KEYWORD2>
+ <KEYWORD2>RBIE</KEYWORD2>
+ <KEYWORD2>T0IF</KEYWORD2>
+ <KEYWORD2>TMR0IF</KEYWORD2>
+ <KEYWORD2>INTF</KEYWORD2>
+ <KEYWORD2>RBIF</KEYWORD2>
+ <KEYWORD2>ADIF</KEYWORD2>
+ <KEYWORD2>RCIF</KEYWORD2>
+ <KEYWORD2>TXIF</KEYWORD2>
+ <KEYWORD2>SSPIF</KEYWORD2>
+ <KEYWORD2>CCP1IF</KEYWORD2>
+ <KEYWORD2>TMR2IF</KEYWORD2>
+ <KEYWORD2>TMR1IF</KEYWORD2>
+ <KEYWORD2>OSFIF</KEYWORD2>
+ <KEYWORD2>C2IF</KEYWORD2>
+ <KEYWORD2>C1IF</KEYWORD2>
+ <KEYWORD2>EEIF</KEYWORD2>
+ <KEYWORD2>BCLIF</KEYWORD2>
+ <KEYWORD2>ULPWUIF</KEYWORD2>
+ <KEYWORD2>CCP2IF</KEYWORD2>
+ <KEYWORD2>T1GIV</KEYWORD2>
+ <KEYWORD2>TMR1GE</KEYWORD2>
+ <KEYWORD2>T1CKPS1</KEYWORD2>
+ <KEYWORD2>T1CKPS0</KEYWORD2>
+ <KEYWORD2>T1OSCEN</KEYWORD2>
+ <KEYWORD2>NOT_T1SYNC</KEYWORD2>
+ <KEYWORD2>T1INSYNC</KEYWORD2>
+ <KEYWORD2>T1SYNC</KEYWORD2>
+ <KEYWORD2>TMR1CS</KEYWORD2>
+ <KEYWORD2>TMR1ON</KEYWORD2>
+ <KEYWORD2>TOUTPS3</KEYWORD2>
+ <KEYWORD2>TOUTPS2</KEYWORD2>
+ <KEYWORD2>TOUTPS1</KEYWORD2>
+ <KEYWORD2>TOUTPS0</KEYWORD2>
+ <KEYWORD2>TMR2ON</KEYWORD2>
+ <KEYWORD2>T2CKPS1</KEYWORD2>
+ <KEYWORD2>T2CKPS0</KEYWORD2>
+ <KEYWORD2>WCOL</KEYWORD2>
+ <KEYWORD2>SSPOV</KEYWORD2>
+ <KEYWORD2>SSPEN</KEYWORD2>
+ <KEYWORD2>CKP</KEYWORD2>
+ <KEYWORD2>SSPM3</KEYWORD2>
+ <KEYWORD2>SSPM2</KEYWORD2>
+ <KEYWORD2>SSPM1</KEYWORD2>
+ <KEYWORD2>SSPM0</KEYWORD2>
+ <KEYWORD2>P1M1</KEYWORD2>
+ <KEYWORD2>P1M0</KEYWORD2>
+ <KEYWORD2>DC1B1</KEYWORD2>
+ <KEYWORD2>CCP1X</KEYWORD2>
+ <KEYWORD2>DC1B0</KEYWORD2>
+ <KEYWORD2>CCP1Y</KEYWORD2>
+ <KEYWORD2>CCP1M3</KEYWORD2>
+ <KEYWORD2>CCP1M2</KEYWORD2>
+ <KEYWORD2>CCP1M1</KEYWORD2>
+ <KEYWORD2>CCP1M0</KEYWORD2>
+ <KEYWORD2>SPEN</KEYWORD2>
+ <KEYWORD2>RX9</KEYWORD2>
+ <KEYWORD2>RC9</KEYWORD2>
+ <KEYWORD2>NOT_RC8</KEYWORD2>
+ <KEYWORD2>RC8_9</KEYWORD2>
+ <KEYWORD2>SREN</KEYWORD2>
+ <KEYWORD2>CREN</KEYWORD2>
+ <KEYWORD2>ADDEN</KEYWORD2>
+ <KEYWORD2>FERR</KEYWORD2>
+ <KEYWORD2>OERR</KEYWORD2>
+ <KEYWORD2>RX9D</KEYWORD2>
+ <KEYWORD2>RCD8</KEYWORD2>
+ <KEYWORD2>CCP2X</KEYWORD2>
+ <KEYWORD2>DC2B1</KEYWORD2>
+ <KEYWORD2>CCP2Y</KEYWORD2>
+ <KEYWORD2>DC2B0</KEYWORD2>
+ <KEYWORD2>CCP2M3</KEYWORD2>
+ <KEYWORD2>CCP2M2</KEYWORD2>
+ <KEYWORD2>CCP2M1</KEYWORD2>
+ <KEYWORD2>CCP2M0</KEYWORD2>
+ <KEYWORD2>ADCS1</KEYWORD2>
+ <KEYWORD2>ADCS0</KEYWORD2>
+ <KEYWORD2>CHS3</KEYWORD2>
+ <KEYWORD2>CHS2</KEYWORD2>
+ <KEYWORD2>CHS1</KEYWORD2>
+ <KEYWORD2>CHS0</KEYWORD2>
+ <KEYWORD2>GO</KEYWORD2>
+ <KEYWORD2>NOT_DONE</KEYWORD2>
+ <KEYWORD2>GO_DONE</KEYWORD2>
+ <KEYWORD2>ADON</KEYWORD2>
+ <KEYWORD2>NOT_RBPU</KEYWORD2>
+ <KEYWORD2>INTEDG</KEYWORD2>
+ <KEYWORD2>T0CS</KEYWORD2>
+ <KEYWORD2>T0SE</KEYWORD2>
+ <KEYWORD2>PSA</KEYWORD2>
+ <KEYWORD2>PS2</KEYWORD2>
+ <KEYWORD2>PS1</KEYWORD2>
+ <KEYWORD2>PS0</KEYWORD2>
+ <KEYWORD2>ADIE</KEYWORD2>
+ <KEYWORD2>RCIE</KEYWORD2>
+ <KEYWORD2>TXIE</KEYWORD2>
+ <KEYWORD2>SSPIE</KEYWORD2>
+ <KEYWORD2>CCP1IE</KEYWORD2>
+ <KEYWORD2>TMR2IE</KEYWORD2>
+ <KEYWORD2>TMR1IE</KEYWORD2>
+ <KEYWORD2>OSFIE</KEYWORD2>
+ <KEYWORD2>C2IE</KEYWORD2>
+ <KEYWORD2>C1IE</KEYWORD2>
+ <KEYWORD2>EEIE</KEYWORD2>
+ <KEYWORD2>BCLIE</KEYWORD2>
+ <KEYWORD2>ULPWUIE</KEYWORD2>
+ <KEYWORD2>CCP2IE</KEYWORD2>
+ <KEYWORD2>ULPWUE</KEYWORD2>
+ <KEYWORD2>SBOREN</KEYWORD2>
+ <KEYWORD2>NOT_POR</KEYWORD2>
+ <KEYWORD2>NOT_BO</KEYWORD2>
+ <KEYWORD2>NOT_BOR</KEYWORD2>
+ <KEYWORD2>IRCF2</KEYWORD2>
+ <KEYWORD2>IRCF1</KEYWORD2>
+ <KEYWORD2>IRCF0</KEYWORD2>
+ <KEYWORD2>OSTS</KEYWORD2>
+ <KEYWORD2>HTS</KEYWORD2>
+ <KEYWORD2>LTS</KEYWORD2>
+ <KEYWORD2>SCS</KEYWORD2>
+ <KEYWORD2>TUN4</KEYWORD2>
+ <KEYWORD2>TUN3</KEYWORD2>
+ <KEYWORD2>TUN2</KEYWORD2>
+ <KEYWORD2>TUN1</KEYWORD2>
+ <KEYWORD2>TUN0</KEYWORD2>
+ <KEYWORD2>GCEN</KEYWORD2>
+ <KEYWORD2>ACKSTAT</KEYWORD2>
+ <KEYWORD2>ACKDT</KEYWORD2>
+ <KEYWORD2>ACKEN</KEYWORD2>
+ <KEYWORD2>RCEN</KEYWORD2>
+ <KEYWORD2>PEN</KEYWORD2>
+ <KEYWORD2>RSEN</KEYWORD2>
+ <KEYWORD2>SEN</KEYWORD2>
+ <KEYWORD2>SMP</KEYWORD2>
+ <KEYWORD2>CKE</KEYWORD2>
+ <KEYWORD2>D</KEYWORD2>
+ <KEYWORD2>I2C_DATA</KEYWORD2>
+ <KEYWORD2>NOT_A</KEYWORD2>
+ <KEYWORD2>NOT_ADDRESS</KEYWORD2>
+ <KEYWORD2>D_A</KEYWORD2>
+ <KEYWORD2>DATA_ADDRESS</KEYWORD2>
+ <KEYWORD2>P</KEYWORD2>
+ <KEYWORD2>I2C_STOP</KEYWORD2>
+ <KEYWORD2>S</KEYWORD2>
+ <KEYWORD2>I2C_START</KEYWORD2>
+ <KEYWORD2>R</KEYWORD2>
+ <KEYWORD2>I2C_READ</KEYWORD2>
+ <KEYWORD2>NOT_W</KEYWORD2>
+ <KEYWORD2>NOT_WRITE</KEYWORD2>
+ <KEYWORD2>R_W</KEYWORD2>
+ <KEYWORD2>READ_WRITE</KEYWORD2>
+ <KEYWORD2>UA</KEYWORD2>
+ <KEYWORD2>BF</KEYWORD2>
+ <KEYWORD2>WPUB7</KEYWORD2>
+ <KEYWORD2>WPUB6</KEYWORD2>
+ <KEYWORD2>WPUB5</KEYWORD2>
+ <KEYWORD2>WPUB4</KEYWORD2>
+ <KEYWORD2>WPUB3</KEYWORD2>
+ <KEYWORD2>WPUB2</KEYWORD2>
+ <KEYWORD2>WPUB1</KEYWORD2>
+ <KEYWORD2>WPUB0</KEYWORD2>
+ <KEYWORD2>IOCB7</KEYWORD2>
+ <KEYWORD2>IOCB6</KEYWORD2>
+ <KEYWORD2>IOCB5</KEYWORD2>
+ <KEYWORD2>IOCB4</KEYWORD2>
+ <KEYWORD2>IOCB3</KEYWORD2>
+ <KEYWORD2>IOCB2</KEYWORD2>
+ <KEYWORD2>IOCB1</KEYWORD2>
+ <KEYWORD2>IOCB0</KEYWORD2>
+ <KEYWORD2>VREN</KEYWORD2>
+ <KEYWORD2>VROE</KEYWORD2>
+ <KEYWORD2>VRR</KEYWORD2>
+ <KEYWORD2>VRSS</KEYWORD2>
+ <KEYWORD2>VR3</KEYWORD2>
+ <KEYWORD2>VR2</KEYWORD2>
+ <KEYWORD2>VR1</KEYWORD2>
+ <KEYWORD2>VR0</KEYWORD2>
+ <KEYWORD2>CSRC</KEYWORD2>
+ <KEYWORD2>TX9</KEYWORD2>
+ <KEYWORD2>NOT_TX8</KEYWORD2>
+ <KEYWORD2>TX8_9</KEYWORD2>
+ <KEYWORD2>TXEN</KEYWORD2>
+ <KEYWORD2>SYNC</KEYWORD2>
+ <KEYWORD2>SENDB</KEYWORD2>
+ <KEYWORD2>BRGH</KEYWORD2>
+ <KEYWORD2>TRMT</KEYWORD2>
+ <KEYWORD2>TX9D</KEYWORD2>
+ <KEYWORD2>TXD8</KEYWORD2>
+ <KEYWORD2>BRG7</KEYWORD2>
+ <KEYWORD2>BRG6</KEYWORD2>
+ <KEYWORD2>BRG5</KEYWORD2>
+ <KEYWORD2>BRG4</KEYWORD2>
+ <KEYWORD2>BRG3</KEYWORD2>
+ <KEYWORD2>BRG2</KEYWORD2>
+ <KEYWORD2>BRG1</KEYWORD2>
+ <KEYWORD2>BRG0</KEYWORD2>
+ <KEYWORD2>BRG15</KEYWORD2>
+ <KEYWORD2>BRG14</KEYWORD2>
+ <KEYWORD2>BRG13</KEYWORD2>
+ <KEYWORD2>BRG12</KEYWORD2>
+ <KEYWORD2>BRG11</KEYWORD2>
+ <KEYWORD2>BRG10</KEYWORD2>
+ <KEYWORD2>BRG9</KEYWORD2>
+ <KEYWORD2>BRG8</KEYWORD2>
+ <KEYWORD2>PRSEN</KEYWORD2>
+ <KEYWORD2>PDC6</KEYWORD2>
+ <KEYWORD2>PDC5</KEYWORD2>
+ <KEYWORD2>PDC4</KEYWORD2>
+ <KEYWORD2>PDC3</KEYWORD2>
+ <KEYWORD2>PDC2</KEYWORD2>
+ <KEYWORD2>PDC1</KEYWORD2>
+ <KEYWORD2>PDC0</KEYWORD2>
+ <KEYWORD2>ECCPASE</KEYWORD2>
+ <KEYWORD2>ECCPAS2</KEYWORD2>
+ <KEYWORD2>ECCPAS1</KEYWORD2>
+ <KEYWORD2>ECCPAS0</KEYWORD2>
+ <KEYWORD2>PSSAC1</KEYWORD2>
+ <KEYWORD2>PSSAC0</KEYWORD2>
+ <KEYWORD2>PSSBD1</KEYWORD2>
+ <KEYWORD2>PSSBD0</KEYWORD2>
+ <KEYWORD2>STRSYNC</KEYWORD2>
+ <KEYWORD2>STRD</KEYWORD2>
+ <KEYWORD2>STRC</KEYWORD2>
+ <KEYWORD2>STRB</KEYWORD2>
+ <KEYWORD2>STRA</KEYWORD2>
+ <KEYWORD2>ADFM</KEYWORD2>
+ <KEYWORD2>VCFG1</KEYWORD2>
+ <KEYWORD2>VCFG0</KEYWORD2>
+ <KEYWORD2>WDTPS3</KEYWORD2>
+ <KEYWORD2>WDTPS2</KEYWORD2>
+ <KEYWORD2>WDTPS1</KEYWORD2>
+ <KEYWORD2>WDTPS0</KEYWORD2>
+ <KEYWORD2>SWDTEN</KEYWORD2>
+ <KEYWORD2>C1ON</KEYWORD2>
+ <KEYWORD2>C1OUT</KEYWORD2>
+ <KEYWORD2>C1OE</KEYWORD2>
+ <KEYWORD2>C1POL</KEYWORD2>
+ <KEYWORD2>C1R</KEYWORD2>
+ <KEYWORD2>C1CH1</KEYWORD2>
+ <KEYWORD2>C1CH0</KEYWORD2>
+ <KEYWORD2>C2ON</KEYWORD2>
+ <KEYWORD2>C2OUT</KEYWORD2>
+ <KEYWORD2>C2OE</KEYWORD2>
+ <KEYWORD2>C2POL</KEYWORD2>
+ <KEYWORD2>C2R</KEYWORD2>
+ <KEYWORD2>C2CH1</KEYWORD2>
+ <KEYWORD2>C2CH0</KEYWORD2>
+ <KEYWORD2>MC1OUT</KEYWORD2>
+ <KEYWORD2>MC2OUT</KEYWORD2>
+ <KEYWORD2>C1RSEL</KEYWORD2>
+ <KEYWORD2>C2RSEL</KEYWORD2>
+ <KEYWORD2>T1GSS</KEYWORD2>
+ <KEYWORD2>C2SYNC</KEYWORD2>
+ <KEYWORD2>SR0</KEYWORD2>
+ <KEYWORD2>SR1</KEYWORD2>
+ <KEYWORD2>C1SEN</KEYWORD2>
+ <KEYWORD2>C2REN</KEYWORD2>
+ <KEYWORD2>PULSS</KEYWORD2>
+ <KEYWORD2>PULSR</KEYWORD2>
+ <KEYWORD2>FVREN</KEYWORD2>
+ <KEYWORD2>ABDOVF</KEYWORD2>
+ <KEYWORD2>RCIDL</KEYWORD2>
+ <KEYWORD2>SCKP</KEYWORD2>
+ <KEYWORD2>BRG16</KEYWORD2>
+ <KEYWORD2>WUE</KEYWORD2>
+ <KEYWORD2>ABDEN</KEYWORD2>
+
+ <KEYWORD2>ANS0</KEYWORD2>
+ <KEYWORD2>ANS1</KEYWORD2>
+ <KEYWORD2>ANS2</KEYWORD2>
+ <KEYWORD2>ANS3</KEYWORD2>
+ <KEYWORD2>ANS4</KEYWORD2>
+ <KEYWORD2>ANS5</KEYWORD2>
+ <KEYWORD2>ANS6</KEYWORD2>
+ <KEYWORD2>ANS7</KEYWORD2>
+ <KEYWORD2>ANS8</KEYWORD2>
+ <KEYWORD2>ANS9</KEYWORD2>
+ <KEYWORD2>ANS10</KEYWORD2>
+ <KEYWORD2>ANS11</KEYWORD2>
+ <KEYWORD2>ANS12</KEYWORD2>
+ <KEYWORD2>ANS13</KEYWORD2>
+
+ <KEYWORD2>EEPGD</KEYWORD2>
+ <KEYWORD2>WRERR</KEYWORD2>
+ <KEYWORD2>WREN</KEYWORD2>
+ <KEYWORD2>WR</KEYWORD2>
+ <KEYWORD2>RD</KEYWORD2>
+
+ <!-- [Pins-DIP] -->
+ <KEYWORD2>RA0</KEYWORD2>
+ <KEYWORD2>RA1</KEYWORD2>
+ <KEYWORD2>RA2</KEYWORD2>
+ <KEYWORD2>RA3</KEYWORD2>
+ <KEYWORD2>RA4</KEYWORD2>
+ <KEYWORD2>RA5</KEYWORD2>
+ <KEYWORD2>RA6</KEYWORD2>
+ <KEYWORD2>RA7</KEYWORD2>
+
+ <KEYWORD2>RB0</KEYWORD2>
+ <KEYWORD2>RB1</KEYWORD2>
+ <KEYWORD2>RB2</KEYWORD2>
+ <KEYWORD2>RB3</KEYWORD2>
+ <KEYWORD2>RB4</KEYWORD2>
+ <KEYWORD2>RB5</KEYWORD2>
+ <KEYWORD2>RB6</KEYWORD2>
+ <KEYWORD2>RB7</KEYWORD2>
+
+ <KEYWORD2>RC0</KEYWORD2>
+ <KEYWORD2>RC1</KEYWORD2>
+ <KEYWORD2>RC2</KEYWORD2>
+ <KEYWORD2>RC3</KEYWORD2>
+ <KEYWORD2>RC4</KEYWORD2>
+ <KEYWORD2>RC5</KEYWORD2>
+ <KEYWORD2>RC6</KEYWORD2>
+ <KEYWORD2>RC7</KEYWORD2>
+
+ <KEYWORD2>RD0</KEYWORD2>
+ <KEYWORD2>RD1</KEYWORD2>
+ <KEYWORD2>RD2</KEYWORD2>
+ <KEYWORD2>RD3</KEYWORD2>
+ <KEYWORD2>RD4</KEYWORD2>
+ <KEYWORD2>RD5</KEYWORD2>
+ <KEYWORD2>RD6</KEYWORD2>
+ <KEYWORD2>RD7</KEYWORD2>
+
+ <KEYWORD2>RE0</KEYWORD2>
+ <KEYWORD2>RE1</KEYWORD2>
+ <KEYWORD2>RE2</KEYWORD2>
+ <KEYWORD2>RE3</KEYWORD2>
+ <KEYWORD2>RE4</KEYWORD2>
+ <KEYWORD2>RE5</KEYWORD2>
+ <KEYWORD2>RE6</KEYWORD2>
+ <KEYWORD2>RE7</KEYWORD2>
+
+ <KEYWORD2>RF0</KEYWORD2>
+ <KEYWORD2>RF1</KEYWORD2>
+ <KEYWORD2>RF2</KEYWORD2>
+ <KEYWORD2>RF3</KEYWORD2>
+ <KEYWORD2>RF4</KEYWORD2>
+ <KEYWORD2>RF5</KEYWORD2>
+ <KEYWORD2>RF6</KEYWORD2>
+ <KEYWORD2>RF7</KEYWORD2>
+
+ <KEYWORD2>RG0</KEYWORD2>
+ <KEYWORD2>RG1</KEYWORD2>
+ <KEYWORD2>RG2</KEYWORD2>
+ <KEYWORD2>RG3</KEYWORD2>
+ <KEYWORD2>RG4</KEYWORD2>
+ <KEYWORD2>RG5</KEYWORD2>
+ <KEYWORD2>RG6</KEYWORD2>
+ <KEYWORD2>RG7</KEYWORD2>
+
+ <KEYWORD2>RH0</KEYWORD2>
+ <KEYWORD2>RH1</KEYWORD2>
+ <KEYWORD2>RH2</KEYWORD2>
+ <KEYWORD2>RH3</KEYWORD2>
+ <KEYWORD2>RH4</KEYWORD2>
+ <KEYWORD2>RH5</KEYWORD2>
+ <KEYWORD2>RH6</KEYWORD2>
+ <KEYWORD2>RH7</KEYWORD2>
+
+ <KEYWORD2>RI0</KEYWORD2>
+ <KEYWORD2>RI1</KEYWORD2>
+ <KEYWORD2>RI2</KEYWORD2>
+ <KEYWORD2>RI3</KEYWORD2>
+ <KEYWORD2>RI4</KEYWORD2>
+ <KEYWORD2>RI5</KEYWORD2>
+ <KEYWORD2>RI6</KEYWORD2>
+ <KEYWORD2>RI7</KEYWORD2>
+
+ <KEYWORD2>RJ0</KEYWORD2>
+ <KEYWORD2>RJ1</KEYWORD2>
+ <KEYWORD2>RJ2</KEYWORD2>
+ <KEYWORD2>RJ3</KEYWORD2>
+ <KEYWORD2>RJ4</KEYWORD2>
+ <KEYWORD2>RJ5</KEYWORD2>
+ <KEYWORD2>RJ6</KEYWORD2>
+ <KEYWORD2>RJ7</KEYWORD2>
+
+ <KEYWORD2>AN0</KEYWORD2>
+ <KEYWORD2>AN1</KEYWORD2>
+ <KEYWORD2>AN2</KEYWORD2>
+ <KEYWORD2>AN3</KEYWORD2>
+ <KEYWORD2>AN4</KEYWORD2>
+ <KEYWORD2>AN5</KEYWORD2>
+ <KEYWORD2>AN6</KEYWORD2>
+ <KEYWORD2>AN7</KEYWORD2>
+ <KEYWORD2>AN8</KEYWORD2>
+ <KEYWORD2>AN9</KEYWORD2>
+ <KEYWORD2>AN0</KEYWORD2>
+ <KEYWORD2>AN11</KEYWORD2>
+ <KEYWORD2>AN12</KEYWORD2>
+ <KEYWORD2>AN13</KEYWORD2>
+ <KEYWORD2>AN14</KEYWORD2>
+ <KEYWORD2>AN15</KEYWORD2>
+ <KEYWORD2>AN16</KEYWORD2>
+ <KEYWORD2>AN17</KEYWORD2>
+ <KEYWORD2>AN18</KEYWORD2>
+ <KEYWORD2>AN19</KEYWORD2>
+
+ <KEYWORD2>MCLR</KEYWORD2>
+
+ <KEYWORD2>C1INP</KEYWORD2>
+ <KEYWORD2>C2INP</KEYWORD2>
+
+ <KEYWORD2>T1G</KEYWORD2>
+
+ <KEYWORD2>T1CKI</KEYWORD2>
+ <KEYWORD2>T0CKI</KEYWORD2>
+
+ <KEYWORD2>C1OUT</KEYWORD2>
+ <KEYWORD2>C2OUT</KEYWORD2>
+
+ <KEYWORD2>OSC1</KEYWORD2>
+ <KEYWORD2>OSC2</KEYWORD2>
+
+ <KEYWORD2>U1TX</KEYWORD2>
+ <KEYWORD2>U1RX</KEYWORD2>
+
+ <KEYWORD2>CCP1</KEYWORD2>
+ <KEYWORD2>CCP2</KEYWORD2>
+
+ <KEYWORD2>ECCPA</KEYWORD2>
+ <KEYWORD2>ECCPB</KEYWORD2>
+ <KEYWORD2>ECCPC</KEYWORD2>
+ <KEYWORD2>ECCPD</KEYWORD2>
+
+ <KEYWORD2>Vss</KEYWORD2>
+ <KEYWORD2>Vdd</KEYWORD2>
+ <KEYWORD2>Vss</KEYWORD2>
+ <KEYWORD2>Vdd</KEYWORD2>
+
+ <!-- [ConfigOps] -->
+ <KEYWORD2>DEBUG</KEYWORD2>
+ <KEYWORD2>LVP</KEYWORD2>
+ <KEYWORD2>FCMEN</KEYWORD2>
+ <KEYWORD2>IESO</KEYWORD2>
+ <KEYWORD2>BOR</KEYWORD2>
+ <KEYWORD2>CPD</KEYWORD2>
+ <KEYWORD2>CP</KEYWORD2>
+ <KEYWORD2>MCLRE</KEYWORD2>
+ <KEYWORD2>PWRTE</KEYWORD2>
+ <KEYWORD2>WDT</KEYWORD2>
+ <KEYWORD2>OSC</KEYWORD2>
+ <KEYWORD2>WRT</KEYWORD2>
+ <KEYWORD2>BORV</KEYWORD2>
+
+
+ <!-- [Config] -->
+ <KEYWORD2>DEBUG_ON</KEYWORD2>
+ <KEYWORD2>DEBUG_OFF</KEYWORD2>
+ <KEYWORD2>LVP_ON</KEYWORD2>
+ <KEYWORD2>LVP_OFF</KEYWORD2>
+ <KEYWORD2>FCMEN_ON</KEYWORD2>
+ <KEYWORD2>FCMEN_OFF</KEYWORD2>
+ <KEYWORD2>IESO_ON</KEYWORD2>
+ <KEYWORD2>IESO_OFF</KEYWORD2>
+ <KEYWORD2>BOR_ON</KEYWORD2>
+ <KEYWORD2>BOR_NSLEEP</KEYWORD2>
+ <KEYWORD2>BOR_SBODEN</KEYWORD2>
+ <KEYWORD2>BOR_OFF</KEYWORD2>
+ <KEYWORD2>CPD_ON</KEYWORD2>
+ <KEYWORD2>CPD_OFF</KEYWORD2>
+ <KEYWORD2>CP_ON</KEYWORD2>
+ <KEYWORD2>CP_OFF</KEYWORD2>
+ <KEYWORD2>MCLRE_ON</KEYWORD2>
+ <KEYWORD2>MCLRE_OFF</KEYWORD2>
+ <KEYWORD2>PWRTE_ON</KEYWORD2>
+ <KEYWORD2>PWRTE_OFF</KEYWORD2>
+ <KEYWORD2>WDT_ON</KEYWORD2>
+ <KEYWORD2>WDT_OFF</KEYWORD2>
+ <KEYWORD2>LP_OSC</KEYWORD2>
+ <KEYWORD2>XT_OSC</KEYWORD2>
+ <KEYWORD2>HS_OSC</KEYWORD2>
+ <KEYWORD2>EC_OSC</KEYWORD2>
+ <KEYWORD2>INTRC_OSC_NOCLKOUT</KEYWORD2>
+ <KEYWORD2>INTRC_OSC_CLKOUT</KEYWORD2>
+ <KEYWORD2>EXTRC_OSC_NOCLKOUT</KEYWORD2>
+ <KEYWORD2>EXTRC_OSC_CLKOUT</KEYWORD2>
+ <KEYWORD2>INTOSCIO</KEYWORD2>
+ <KEYWORD2>INTOSC</KEYWORD2>
+ <KEYWORD2>EXTRCIO</KEYWORD2>
+ <KEYWORD2>EXTRC</KEYWORD2>
+ <KEYWORD2>WRT_OFF</KEYWORD2>
+ <KEYWORD2>WRT_256</KEYWORD2>
+ <KEYWORD2>WRT_1FOURTH</KEYWORD2>
+ <KEYWORD2>WRT_HALF</KEYWORD2>
+ <KEYWORD2>BOR21V</KEYWORD2>
+ <KEYWORD2>BOR40V</KEYWORD2>
+
+
+ <!-- ====== CHIP DATA : END ====== -->
+
+
+ <!-- Flow Control -->
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>gosub</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+
+ <!-- Loop Statements -->
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>step</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+
+ <!-- Do..Loop -->
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+
+ <!-- Repeat..Loop -->
+ <KEYWORD1>repeat</KEYWORD1>
+
+ <!-- Select..Case -->
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+
+ <!-- Call..Every -->
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>every</KEYWORD1>
+
+ <!-- Closing, Exit Statements -->
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+
+ <!-- Methods, Functions, Class, Properties, Variables -->
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>sub</KEYWORD1>
+ <KEYWORD1>macro</KEYWORD1>
+ <KEYWORD1>let</KEYWORD1>
+
+ <!-- Declaration -->
+ <KEYWORD1>dim</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+
+ <!-- Bitwise -->
+ <KEYWORD1>rotate</KEYWORD1>
+ <KEYWORD1>left</KEYWORD1>
+ <KEYWORD1>right</KEYWORD1>
+ <KEYWORD1>simple</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+
+ <!-- Comments -->
+ <KEYWORD1>rem</KEYWORD1>
+
+ <!-- RS 232 Commands -->
+ <KEYWORD1>InitSer </KEYWORD1>
+ <KEYWORD1>SerSend </KEYWORD1>
+ <KEYWORD1>SerReceive </KEYWORD1>
+ <KEYWORD1>SerPrint </KEYWORD1>
+
+ <!-- A/D Commands -->
+ <KEYWORD1>ReadAD </KEYWORD1>
+ <KEYWORD1>ADFormat </KEYWORD1>
+ <KEYWORD1>ADOff </KEYWORD1>
+
+ <!-- SPI/I2C Commands -->
+ <KEYWORD1>SPIMode </KEYWORD1>
+ <KEYWORD1>SPITransfer </KEYWORD1>
+
+ <!-- EEPROM Commands -->
+ <KEYWORD1>EPRead </KEYWORD1>
+ <KEYWORD1>EPWrite </KEYWORD1>
+ <KEYWORD1>ProgramWrite </KEYWORD1>
+ <KEYWORD1>ProgramRead </KEYWORD1>
+ <KEYWORD1>ProgramErase </KEYWORD1>
+
+ <!-- Hardware PWM Commands -->
+ <KEYWORD1>PWMOn </KEYWORD1>
+ <KEYWORD1>PWMOff </KEYWORD1>
+ <KEYWORD1>HPWM </KEYWORD1>
+
+ <!-- SRF04 Distance Sensor PWM Commands -->
+ <KEYWORD1>USDistance </KEYWORD1>
+
+ <!-- Sound PWM Commands -->
+ <KEYWORD1>Tone </KEYWORD1>
+
+ <!-- LCD Display Commands -->
+ <KEYWORD1>PRINT </KEYWORD1>
+ <KEYWORD1>LOCATE </KEYWORD1>
+ <KEYWORD1>PUT </KEYWORD1>
+ <KEYWORD1>CLS </KEYWORD1>
+ <KEYWORD1>LCDInt </KEYWORD1>
+ <KEYWORD1>LCDHex </KEYWORD1>
+ <KEYWORD1>LCDWord </KEYWORD1>
+
+ <!-- 7-Segment Display Commands -->
+ <KEYWORD1>DisplayValue </KEYWORD1>
+ <KEYWORD1>DisplayChar </KEYWORD1>
+
+ <!-- Keypad Commands -->
+ <KEYWORD1>KeypadRaw</KEYWORD1>
+ <KEYWORD1>KeypadData</KEYWORD1>
+
+ <!-- String handling Functions -->
+ <KEYWORD1>LEN </KEYWORD1>
+ <KEYWORD1>MID$ </KEYWORD1>
+
+ <!-- Timer Functions -->
+ <KEYWORD1>InitTimer0</KEYWORD1>
+ <KEYWORD1>InitTimer1</KEYWORD1>
+ <KEYWORD1>InitTimer2</KEYWORD1>
+ <KEYWORD1>ClearTimer</KEYWORD1>
+ <KEYWORD1>StartTimer</KEYWORD1>
+ <KEYWORD1>StopTimer</KEYWORD1>
+
+ <!-- Miscellaneous Commands/Functions -->
+ <KEYWORD1>WAIT</KEYWORD1>
+ <KEYWORD1>SLEEP</KEYWORD1>
+ <KEYWORD1>DIR</KEYWORD1>
+ <KEYWORD3>IN</KEYWORD3>
+ <KEYWORD3>OUT</KEYWORD3>
+ <KEYWORD1>PORT</KEYWORD1>
+ <KEYWORD1>PULSEOUT</KEYWORD1>
+ <KEYWORD1>POT</KEYWORD1>
+ <KEYWORD1>PWMOut</KEYWORD1>
+ <KEYWORD1>PEEK</KEYWORD1>
+ <KEYWORD1>POKE</KEYWORD1>
+ <KEYWORD1>Random</KEYWORD1>
+ <KEYWORD1>Swap</KEYWORD1>
+ <KEYWORD1>Swap4</KEYWORD1>
+ <KEYWORD1>Table</KEYWORD1>
+ <KEYWORD1>ReadTable</KEYWORD1>
+
+ <!-- Logical operators -->
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+ <OPERATOR>xor</OPERATOR>
+
+ <!-- Datatypes Constants/Literals -->
+ <KEYWORD3>false</KEYWORD3>
+ <KEYWORD3>true</KEYWORD3>
+ <KEYWORD3>on</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+
+ <!-- Constants Time Units -->
+ <LITERAL2>us</LITERAL2>
+ <LITERAL2>10us</LITERAL2>
+ <LITERAL2>ms</LITERAL2>
+ <LITERAL2>10ms</LITERAL2>
+ <LITERAL2>s</LITERAL2>
+ <LITERAL2>sec</LITERAL2>
+ <LITERAL2>m</LITERAL2>
+ <LITERAL2>h</LITERAL2>
+
+ <!-- Data Types -->
+ <LITERAL2>bit</LITERAL2>
+ <LITERAL2>byte</LITERAL2>
+ <LITERAL2>word</LITERAL2>
+ <LITERAL2>float</LITERAL2>
+
+ <!-- Built-in #defines (used for #IFDEF) -->
+ <LITERAL2>ChipMHz</LITERAL2>
+ <LITERAL2>ChipName</LITERAL2>
+ <LITERAL2>ChipFamily</LITERAL2>
+ <LITERAL2>OSC</LITERAL2>
+ <LITERAL2>Var</LITERAL2>
+ <LITERAL2>NoVar</LITERAL2>
+ <LITERAL2>Bit</LITERAL2>
+ <LITERAL2>NoBit</LITERAL2>
+ <LITERAL2>AllOf</LITERAL2>
+ <LITERAL2>OneOf</LITERAL2>
+
+ </KEYWORDS>
+
+ <!-- Binary Numbers instead of single quote comments. For example b'00011011' -->
+ <SPAN TYPE="LITERAL1" >
+ <BEGIN>b'</BEGIN><END>'</END>
+ </SPAN>
+
+ </RULES>
+
+</MODE>
+
+
+
diff --git a/jEdit/modes/gettext.xml b/jEdit/modes/gettext.xml
index b84e7c4..857ec33 100644
--- a/jEdit/modes/gettext.xml
+++ b/jEdit/modes/gettext.xml
@@ -1,58 +1,58 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
-<!--
- ** jEdit edit mode for gettext catalogs (.po/.pot extension)
- ** Use the ConfigurableFoldHandler plugin for optimal
- ** results. =)
--->
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="# " />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT2">#:</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1"># </EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">#.</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">#~</EOL_SPAN>
-
- <MARK_FOLLOWING TYPE="COMMENT2">#,</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD3">%</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD3">$</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD3">@</MARK_FOLLOWING>
-
- <SPAN TYPE="LITERAL1" DELEGATE="QUOTED" >
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- keywords -->
- <KEYWORDS>
- <KEYWORD1>msgid</KEYWORD1>
- <KEYWORD1>msgid_plural</KEYWORD1>
- <KEYWORD1>msgstr</KEYWORD1>
- <KEYWORD2>fuzzy</KEYWORD2>
-<!-- ** Ideally, we'd highlight the next msgstr differently
- ** whenever fuzzy is encountered, but this doesn't seem
- ** to be possible just yet.
--->
- <KEYWORD2>c-format</KEYWORD2>
- <KEYWORD2>no-c-format</KEYWORD2>
- </KEYWORDS>
-
- </RULES>
-
- <RULES SET="QUOTED" DEFAULT="LITERAL1">
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE">
- <BEGIN>\"</BEGIN>
- <END>\"</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD3">%</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD3">$</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD3">@</MARK_FOLLOWING>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+<!--
+ ** jEdit edit mode for gettext catalogs (.po/.pot extension)
+ ** Use the ConfigurableFoldHandler plugin for optimal
+ ** results. =)
+-->
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="# " />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT2">#:</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1"># </EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">#.</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">#~</EOL_SPAN>
+
+ <MARK_FOLLOWING TYPE="COMMENT2">#,</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD3">%</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD3">$</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD3">@</MARK_FOLLOWING>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="QUOTED" >
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- keywords -->
+ <KEYWORDS>
+ <KEYWORD1>msgid</KEYWORD1>
+ <KEYWORD1>msgid_plural</KEYWORD1>
+ <KEYWORD1>msgstr</KEYWORD1>
+ <KEYWORD2>fuzzy</KEYWORD2>
+<!-- ** Ideally, we'd highlight the next msgstr differently
+ ** whenever fuzzy is encountered, but this doesn't seem
+ ** to be possible just yet.
+-->
+ <KEYWORD2>c-format</KEYWORD2>
+ <KEYWORD2>no-c-format</KEYWORD2>
+ </KEYWORDS>
+
+ </RULES>
+
+ <RULES SET="QUOTED" DEFAULT="LITERAL1">
+ <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE">
+ <BEGIN>\"</BEGIN>
+ <END>\"</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD3">%</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD3">$</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD3">@</MARK_FOLLOWING>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/gnuplot.xml b/jEdit/modes/gnuplot.xml
index 8abb18d..508116b 100644
--- a/jEdit/modes/gnuplot.xml
+++ b/jEdit/modes/gnuplot.xml
@@ -1,270 +1,270 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- COBOL mode, by Loren Charnley III -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE">
-
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- Literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL2" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL2" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL2" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- Operators -->
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
-
- <!-- Keywords -->
- <KEYWORDS>
-
- <!-- GNUplot Commands -->
- <KEYWORD1>cd</KEYWORD1>
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>fit</KEYWORD1>
- <KEYWORD1>help</KEYWORD1>
- <KEYWORD1>history</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>load</KEYWORD1>
- <KEYWORD1>pause</KEYWORD1>
- <KEYWORD1>plot</KEYWORD1>
- <KEYWORD1>using</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
- <KEYWORD1>index</KEYWORD1>
- <KEYWORD1>every</KEYWORD1>
- <KEYWORD1>smooth</KEYWORD1>
- <KEYWORD1>thru</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>pwd</KEYWORD1>
- <KEYWORD1>quit</KEYWORD1>
- <KEYWORD1>replot</KEYWORD1>
- <KEYWORD1>reread</KEYWORD1>
- <KEYWORD1>reset</KEYWORD1>
- <KEYWORD1>save</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>show</KEYWORD1>
- <KEYWORD1>unset</KEYWORD1>
- <KEYWORD1>shell</KEYWORD1>
- <KEYWORD1>splot</KEYWORD1>
- <KEYWORD1>system</KEYWORD1>
- <KEYWORD1>test</KEYWORD1>
- <KEYWORD1>unset</KEYWORD1>
- <KEYWORD1>update</KEYWORD1>
-
- <!-- GNUplot Functions -->
- <KEYWORD2>abs</KEYWORD2>
- <KEYWORD2>acos</KEYWORD2>
- <KEYWORD2>acosh</KEYWORD2>
- <KEYWORD2>arg</KEYWORD2>
- <KEYWORD2>asin</KEYWORD2>
- <KEYWORD2>asinh</KEYWORD2>
- <KEYWORD2>atan</KEYWORD2>
- <KEYWORD2>atan2</KEYWORD2>
- <KEYWORD2>atanh</KEYWORD2>
- <KEYWORD2>besj0</KEYWORD2>
- <KEYWORD2>besj1</KEYWORD2>
- <KEYWORD2>besy0</KEYWORD2>
- <KEYWORD2>besy1</KEYWORD2>
- <KEYWORD2>ceil</KEYWORD2>
- <KEYWORD2>cos</KEYWORD2>
- <KEYWORD2>cosh</KEYWORD2>
- <KEYWORD2>erf</KEYWORD2>
- <KEYWORD2>erfc</KEYWORD2>
- <KEYWORD2>exp</KEYWORD2>
- <KEYWORD2>floor</KEYWORD2>
- <KEYWORD2>gamma</KEYWORD2>
- <KEYWORD2>ibeta</KEYWORD2>
- <KEYWORD2>inverf</KEYWORD2>
- <KEYWORD2>igamma</KEYWORD2>
- <KEYWORD2>imag</KEYWORD2>
- <KEYWORD2>invnorm</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>lambertw</KEYWORD2>
- <KEYWORD2>lgamma</KEYWORD2>
- <KEYWORD2>log</KEYWORD2>
- <KEYWORD2>log10</KEYWORD2>
- <KEYWORD2>norm</KEYWORD2>
- <KEYWORD2>rand</KEYWORD2>
- <KEYWORD2>real</KEYWORD2>
- <KEYWORD2>sgn</KEYWORD2>
- <KEYWORD2>sin</KEYWORD2>
- <KEYWORD2>sinh</KEYWORD2>
- <KEYWORD2>sqrt</KEYWORD2>
- <KEYWORD2>tan</KEYWORD2>
- <KEYWORD2>tanh</KEYWORD2>
- <KEYWORD2>column</KEYWORD2>
- <KEYWORD2>defined</KEYWORD2>
- <KEYWORD2>tm_hour</KEYWORD2>
- <KEYWORD2>tm_mday</KEYWORD2>
- <KEYWORD2>tm_min</KEYWORD2>
- <KEYWORD2>tm_mon</KEYWORD2>
- <KEYWORD2>tm_sec</KEYWORD2>
- <KEYWORD2>tm_wday</KEYWORD2>
- <KEYWORD2>tm_yday</KEYWORD2>
- <KEYWORD2>tm_year</KEYWORD2>
- <KEYWORD2>valid</KEYWORD2>
-
- <!-- GNUplot Built-in Variables -->
- <KEYWORD3>angles</KEYWORD3>
- <KEYWORD3>arrow</KEYWORD3>
- <KEYWORD3>autoscale</KEYWORD3>
- <KEYWORD3>bars</KEYWORD3>
- <KEYWORD3>bmargin</KEYWORD3>
- <KEYWORD3>border</KEYWORD3>
- <KEYWORD3>boxwidth</KEYWORD3>
- <KEYWORD3>clabel</KEYWORD3>
- <KEYWORD3>clip</KEYWORD3>
- <KEYWORD3>cntrparam</KEYWORD3>
- <KEYWORD3>colorbox</KEYWORD3>
- <KEYWORD3>contour</KEYWORD3>
- <KEYWORD3>datafile </KEYWORD3>
- <KEYWORD3>decimalsign</KEYWORD3>
- <KEYWORD3>dgrid3d</KEYWORD3>
- <KEYWORD3>dummy</KEYWORD3>
- <KEYWORD3>encoding</KEYWORD3>
- <KEYWORD3>fit</KEYWORD3>
- <KEYWORD3>fontpath</KEYWORD3>
- <KEYWORD3>format</KEYWORD3>
- <KEYWORD3>functions</KEYWORD3>
- <KEYWORD3>function</KEYWORD3>
- <KEYWORD3>grid</KEYWORD3>
- <KEYWORD3>hidden3d</KEYWORD3>
- <KEYWORD3>historysize</KEYWORD3>
- <KEYWORD3>isosamples</KEYWORD3>
- <KEYWORD3>key</KEYWORD3>
- <KEYWORD3>label</KEYWORD3>
- <KEYWORD3>lmargin</KEYWORD3>
- <KEYWORD3>loadpath</KEYWORD3>
- <KEYWORD3>locale</KEYWORD3>
- <KEYWORD3>logscale</KEYWORD3>
- <KEYWORD3>mapping</KEYWORD3>
- <KEYWORD3>margin</KEYWORD3>
- <KEYWORD3>mouse</KEYWORD3>
- <KEYWORD3>multiplot</KEYWORD3>
- <KEYWORD3>mx2tics</KEYWORD3>
- <KEYWORD3>mxtics</KEYWORD3>
- <KEYWORD3>my2tics</KEYWORD3>
- <KEYWORD3>mytics</KEYWORD3>
- <KEYWORD3>mztics</KEYWORD3>
- <KEYWORD3>offsets</KEYWORD3>
- <KEYWORD3>origin</KEYWORD3>
- <KEYWORD3>output</KEYWORD3>
- <KEYWORD3>parametric</KEYWORD3>
- <KEYWORD3>plot</KEYWORD3>
- <KEYWORD3>pm3d</KEYWORD3>
- <KEYWORD3>palette</KEYWORD3>
- <KEYWORD3>pointsize</KEYWORD3>
- <KEYWORD3>polar</KEYWORD3>
- <KEYWORD3>print</KEYWORD3>
- <KEYWORD3>rmargin</KEYWORD3>
- <KEYWORD3>rrange</KEYWORD3>
- <KEYWORD3>samples</KEYWORD3>
- <KEYWORD3>size</KEYWORD3>
- <KEYWORD3>style</KEYWORD3>
- <KEYWORD3>surface</KEYWORD3>
- <KEYWORD3>terminal</KEYWORD3>
- <KEYWORD3>tics</KEYWORD3>
- <KEYWORD3>ticslevel</KEYWORD3>
- <KEYWORD3>ticscale</KEYWORD3>
- <KEYWORD3>timestamp</KEYWORD3>
- <KEYWORD3>timefmt</KEYWORD3>
- <KEYWORD3>title</KEYWORD3>
- <KEYWORD3>tmargin</KEYWORD3>
- <KEYWORD3>trange</KEYWORD3>
- <KEYWORD3>urange</KEYWORD3>
- <KEYWORD3>variables</KEYWORD3>
- <KEYWORD3>version</KEYWORD3>
- <KEYWORD3>view</KEYWORD3>
- <KEYWORD3>vrange</KEYWORD3>
- <KEYWORD3>x2data</KEYWORD3>
- <KEYWORD3>x2dtics</KEYWORD3>
- <KEYWORD3>x2label</KEYWORD3>
- <KEYWORD3>x2mtics</KEYWORD3>
- <KEYWORD3>x2range</KEYWORD3>
- <KEYWORD3>x2tics</KEYWORD3>
- <KEYWORD3>x2zeroaxis</KEYWORD3>
- <KEYWORD3>xdata</KEYWORD3>
- <KEYWORD3>xdtics</KEYWORD3>
- <KEYWORD3>xlabel</KEYWORD3>
- <KEYWORD3>xmtics</KEYWORD3>
- <KEYWORD3>xrange</KEYWORD3>
- <KEYWORD3>xtics</KEYWORD3>
- <KEYWORD3>xzeroaxis</KEYWORD3>
- <KEYWORD3>y2data</KEYWORD3>
- <KEYWORD3>y2dtics</KEYWORD3>
- <KEYWORD3>y2label</KEYWORD3>
- <KEYWORD3>y2mtics</KEYWORD3>
- <KEYWORD3>y2range</KEYWORD3>
- <KEYWORD3>y2tics</KEYWORD3>
- <KEYWORD3>y2zeroaxis</KEYWORD3>
- <KEYWORD3>ydata</KEYWORD3>
- <KEYWORD3>ydtics</KEYWORD3>
- <KEYWORD3>ylabel</KEYWORD3>
- <KEYWORD3>ymtics</KEYWORD3>
- <KEYWORD3>yrange</KEYWORD3>
- <KEYWORD3>ytics</KEYWORD3>
- <KEYWORD3>yzeroaxis</KEYWORD3>
- <KEYWORD3>zdata</KEYWORD3>
- <KEYWORD3>zdtics</KEYWORD3>
- <KEYWORD3>cbdata</KEYWORD3>
- <KEYWORD3>cbdtics</KEYWORD3>
- <KEYWORD3>zero</KEYWORD3>
- <KEYWORD3>zeroaxis</KEYWORD3>
- <KEYWORD3>zlabel</KEYWORD3>
- <KEYWORD3>zmtics</KEYWORD3>
- <KEYWORD3>zrange</KEYWORD3>
- <KEYWORD3>ztics</KEYWORD3>
- <KEYWORD3>cblabel</KEYWORD3>
- <KEYWORD3>cbmtics</KEYWORD3>
- <KEYWORD3>cbrange</KEYWORD3>
- <KEYWORD3>cbtics</KEYWORD3>
-
- </KEYWORDS>
-
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- COBOL mode, by Loren Charnley III -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE">
+
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- Literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL2" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL2" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL2" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Operators -->
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">$</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+
+ <!-- Keywords -->
+ <KEYWORDS>
+
+ <!-- GNUplot Commands -->
+ <KEYWORD1>cd</KEYWORD1>
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>fit</KEYWORD1>
+ <KEYWORD1>help</KEYWORD1>
+ <KEYWORD1>history</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>load</KEYWORD1>
+ <KEYWORD1>pause</KEYWORD1>
+ <KEYWORD1>plot</KEYWORD1>
+ <KEYWORD1>using</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+ <KEYWORD1>index</KEYWORD1>
+ <KEYWORD1>every</KEYWORD1>
+ <KEYWORD1>smooth</KEYWORD1>
+ <KEYWORD1>thru</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>pwd</KEYWORD1>
+ <KEYWORD1>quit</KEYWORD1>
+ <KEYWORD1>replot</KEYWORD1>
+ <KEYWORD1>reread</KEYWORD1>
+ <KEYWORD1>reset</KEYWORD1>
+ <KEYWORD1>save</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>show</KEYWORD1>
+ <KEYWORD1>unset</KEYWORD1>
+ <KEYWORD1>shell</KEYWORD1>
+ <KEYWORD1>splot</KEYWORD1>
+ <KEYWORD1>system</KEYWORD1>
+ <KEYWORD1>test</KEYWORD1>
+ <KEYWORD1>unset</KEYWORD1>
+ <KEYWORD1>update</KEYWORD1>
+
+ <!-- GNUplot Functions -->
+ <KEYWORD2>abs</KEYWORD2>
+ <KEYWORD2>acos</KEYWORD2>
+ <KEYWORD2>acosh</KEYWORD2>
+ <KEYWORD2>arg</KEYWORD2>
+ <KEYWORD2>asin</KEYWORD2>
+ <KEYWORD2>asinh</KEYWORD2>
+ <KEYWORD2>atan</KEYWORD2>
+ <KEYWORD2>atan2</KEYWORD2>
+ <KEYWORD2>atanh</KEYWORD2>
+ <KEYWORD2>besj0</KEYWORD2>
+ <KEYWORD2>besj1</KEYWORD2>
+ <KEYWORD2>besy0</KEYWORD2>
+ <KEYWORD2>besy1</KEYWORD2>
+ <KEYWORD2>ceil</KEYWORD2>
+ <KEYWORD2>cos</KEYWORD2>
+ <KEYWORD2>cosh</KEYWORD2>
+ <KEYWORD2>erf</KEYWORD2>
+ <KEYWORD2>erfc</KEYWORD2>
+ <KEYWORD2>exp</KEYWORD2>
+ <KEYWORD2>floor</KEYWORD2>
+ <KEYWORD2>gamma</KEYWORD2>
+ <KEYWORD2>ibeta</KEYWORD2>
+ <KEYWORD2>inverf</KEYWORD2>
+ <KEYWORD2>igamma</KEYWORD2>
+ <KEYWORD2>imag</KEYWORD2>
+ <KEYWORD2>invnorm</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>lambertw</KEYWORD2>
+ <KEYWORD2>lgamma</KEYWORD2>
+ <KEYWORD2>log</KEYWORD2>
+ <KEYWORD2>log10</KEYWORD2>
+ <KEYWORD2>norm</KEYWORD2>
+ <KEYWORD2>rand</KEYWORD2>
+ <KEYWORD2>real</KEYWORD2>
+ <KEYWORD2>sgn</KEYWORD2>
+ <KEYWORD2>sin</KEYWORD2>
+ <KEYWORD2>sinh</KEYWORD2>
+ <KEYWORD2>sqrt</KEYWORD2>
+ <KEYWORD2>tan</KEYWORD2>
+ <KEYWORD2>tanh</KEYWORD2>
+ <KEYWORD2>column</KEYWORD2>
+ <KEYWORD2>defined</KEYWORD2>
+ <KEYWORD2>tm_hour</KEYWORD2>
+ <KEYWORD2>tm_mday</KEYWORD2>
+ <KEYWORD2>tm_min</KEYWORD2>
+ <KEYWORD2>tm_mon</KEYWORD2>
+ <KEYWORD2>tm_sec</KEYWORD2>
+ <KEYWORD2>tm_wday</KEYWORD2>
+ <KEYWORD2>tm_yday</KEYWORD2>
+ <KEYWORD2>tm_year</KEYWORD2>
+ <KEYWORD2>valid</KEYWORD2>
+
+ <!-- GNUplot Built-in Variables -->
+ <KEYWORD3>angles</KEYWORD3>
+ <KEYWORD3>arrow</KEYWORD3>
+ <KEYWORD3>autoscale</KEYWORD3>
+ <KEYWORD3>bars</KEYWORD3>
+ <KEYWORD3>bmargin</KEYWORD3>
+ <KEYWORD3>border</KEYWORD3>
+ <KEYWORD3>boxwidth</KEYWORD3>
+ <KEYWORD3>clabel</KEYWORD3>
+ <KEYWORD3>clip</KEYWORD3>
+ <KEYWORD3>cntrparam</KEYWORD3>
+ <KEYWORD3>colorbox</KEYWORD3>
+ <KEYWORD3>contour</KEYWORD3>
+ <KEYWORD3>datafile </KEYWORD3>
+ <KEYWORD3>decimalsign</KEYWORD3>
+ <KEYWORD3>dgrid3d</KEYWORD3>
+ <KEYWORD3>dummy</KEYWORD3>
+ <KEYWORD3>encoding</KEYWORD3>
+ <KEYWORD3>fit</KEYWORD3>
+ <KEYWORD3>fontpath</KEYWORD3>
+ <KEYWORD3>format</KEYWORD3>
+ <KEYWORD3>functions</KEYWORD3>
+ <KEYWORD3>function</KEYWORD3>
+ <KEYWORD3>grid</KEYWORD3>
+ <KEYWORD3>hidden3d</KEYWORD3>
+ <KEYWORD3>historysize</KEYWORD3>
+ <KEYWORD3>isosamples</KEYWORD3>
+ <KEYWORD3>key</KEYWORD3>
+ <KEYWORD3>label</KEYWORD3>
+ <KEYWORD3>lmargin</KEYWORD3>
+ <KEYWORD3>loadpath</KEYWORD3>
+ <KEYWORD3>locale</KEYWORD3>
+ <KEYWORD3>logscale</KEYWORD3>
+ <KEYWORD3>mapping</KEYWORD3>
+ <KEYWORD3>margin</KEYWORD3>
+ <KEYWORD3>mouse</KEYWORD3>
+ <KEYWORD3>multiplot</KEYWORD3>
+ <KEYWORD3>mx2tics</KEYWORD3>
+ <KEYWORD3>mxtics</KEYWORD3>
+ <KEYWORD3>my2tics</KEYWORD3>
+ <KEYWORD3>mytics</KEYWORD3>
+ <KEYWORD3>mztics</KEYWORD3>
+ <KEYWORD3>offsets</KEYWORD3>
+ <KEYWORD3>origin</KEYWORD3>
+ <KEYWORD3>output</KEYWORD3>
+ <KEYWORD3>parametric</KEYWORD3>
+ <KEYWORD3>plot</KEYWORD3>
+ <KEYWORD3>pm3d</KEYWORD3>
+ <KEYWORD3>palette</KEYWORD3>
+ <KEYWORD3>pointsize</KEYWORD3>
+ <KEYWORD3>polar</KEYWORD3>
+ <KEYWORD3>print</KEYWORD3>
+ <KEYWORD3>rmargin</KEYWORD3>
+ <KEYWORD3>rrange</KEYWORD3>
+ <KEYWORD3>samples</KEYWORD3>
+ <KEYWORD3>size</KEYWORD3>
+ <KEYWORD3>style</KEYWORD3>
+ <KEYWORD3>surface</KEYWORD3>
+ <KEYWORD3>terminal</KEYWORD3>
+ <KEYWORD3>tics</KEYWORD3>
+ <KEYWORD3>ticslevel</KEYWORD3>
+ <KEYWORD3>ticscale</KEYWORD3>
+ <KEYWORD3>timestamp</KEYWORD3>
+ <KEYWORD3>timefmt</KEYWORD3>
+ <KEYWORD3>title</KEYWORD3>
+ <KEYWORD3>tmargin</KEYWORD3>
+ <KEYWORD3>trange</KEYWORD3>
+ <KEYWORD3>urange</KEYWORD3>
+ <KEYWORD3>variables</KEYWORD3>
+ <KEYWORD3>version</KEYWORD3>
+ <KEYWORD3>view</KEYWORD3>
+ <KEYWORD3>vrange</KEYWORD3>
+ <KEYWORD3>x2data</KEYWORD3>
+ <KEYWORD3>x2dtics</KEYWORD3>
+ <KEYWORD3>x2label</KEYWORD3>
+ <KEYWORD3>x2mtics</KEYWORD3>
+ <KEYWORD3>x2range</KEYWORD3>
+ <KEYWORD3>x2tics</KEYWORD3>
+ <KEYWORD3>x2zeroaxis</KEYWORD3>
+ <KEYWORD3>xdata</KEYWORD3>
+ <KEYWORD3>xdtics</KEYWORD3>
+ <KEYWORD3>xlabel</KEYWORD3>
+ <KEYWORD3>xmtics</KEYWORD3>
+ <KEYWORD3>xrange</KEYWORD3>
+ <KEYWORD3>xtics</KEYWORD3>
+ <KEYWORD3>xzeroaxis</KEYWORD3>
+ <KEYWORD3>y2data</KEYWORD3>
+ <KEYWORD3>y2dtics</KEYWORD3>
+ <KEYWORD3>y2label</KEYWORD3>
+ <KEYWORD3>y2mtics</KEYWORD3>
+ <KEYWORD3>y2range</KEYWORD3>
+ <KEYWORD3>y2tics</KEYWORD3>
+ <KEYWORD3>y2zeroaxis</KEYWORD3>
+ <KEYWORD3>ydata</KEYWORD3>
+ <KEYWORD3>ydtics</KEYWORD3>
+ <KEYWORD3>ylabel</KEYWORD3>
+ <KEYWORD3>ymtics</KEYWORD3>
+ <KEYWORD3>yrange</KEYWORD3>
+ <KEYWORD3>ytics</KEYWORD3>
+ <KEYWORD3>yzeroaxis</KEYWORD3>
+ <KEYWORD3>zdata</KEYWORD3>
+ <KEYWORD3>zdtics</KEYWORD3>
+ <KEYWORD3>cbdata</KEYWORD3>
+ <KEYWORD3>cbdtics</KEYWORD3>
+ <KEYWORD3>zero</KEYWORD3>
+ <KEYWORD3>zeroaxis</KEYWORD3>
+ <KEYWORD3>zlabel</KEYWORD3>
+ <KEYWORD3>zmtics</KEYWORD3>
+ <KEYWORD3>zrange</KEYWORD3>
+ <KEYWORD3>ztics</KEYWORD3>
+ <KEYWORD3>cblabel</KEYWORD3>
+ <KEYWORD3>cbmtics</KEYWORD3>
+ <KEYWORD3>cbrange</KEYWORD3>
+ <KEYWORD3>cbtics</KEYWORD3>
+
+ </KEYWORDS>
+
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/go.xml b/jEdit/modes/go.xml
new file mode 100644
index 0000000..92125de
--- /dev/null
+++ b/jEdit/modes/go.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Syntax highlighting mode for Go (http://www.golang.org).
+ Jim Lawton (jim.lawton at gmail.com)
+ This is based on the first release of Go, November 2009. -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="(?!^\s*(#|//)).*(\b(if|for)\s*\(.*\)|\b(else)\b)[^{;]*$" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^\s*((case\b.*|[\p{Alpha}_][\p{Alnum}_]*)\s*:(?!:)).*$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+
+ <RULES
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="LITERAL4">??(</SEQ>
+ <SEQ TYPE="LITERAL4">??/</SEQ>
+ <SEQ TYPE="LITERAL4">??)</SEQ>
+ <SEQ TYPE="LITERAL4">??'</SEQ>
+ <SEQ TYPE="LITERAL4">??<</SEQ>
+ <SEQ TYPE="LITERAL4">??!</SEQ>
+ <SEQ TYPE="LITERAL4">??></SEQ>
+ <SEQ TYPE="LITERAL4">??-</SEQ>
+ <SEQ TYPE="LITERAL4">??=</SEQ>
+
+ <SEQ TYPE="LITERAL4"><:</SEQ>
+ <SEQ TYPE="LITERAL4">:></SEQ>
+ <SEQ TYPE="LITERAL4"><%</SEQ>
+ <SEQ TYPE="LITERAL4">%></SEQ>
+ <SEQ TYPE="LITERAL4">%:</SEQ>
+
+ <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
+ MATCH_TYPE="OPERATOR"
+ TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <MARK_PREVIOUS
+ TYPE="FUNCTION"
+ MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">+=</SEQ>
+ <SEQ TYPE="OPERATOR">-=</SEQ>
+ <SEQ TYPE="OPERATOR">*=</SEQ>
+ <SEQ TYPE="OPERATOR">/=</SEQ>
+ <SEQ TYPE="OPERATOR">&=</SEQ>
+ <SEQ TYPE="OPERATOR">&&</SEQ>
+ <SEQ TYPE="OPERATOR">&^</SEQ>
+ <SEQ TYPE="OPERATOR">&^=</SEQ>
+ <SEQ TYPE="OPERATOR">|=</SEQ>
+ <SEQ TYPE="OPERATOR">||</SEQ>
+ <SEQ TYPE="OPERATOR">^=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">++</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">--</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">>></SEQ>
+ <SEQ TYPE="OPERATOR">>>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><-</SEQ>
+ <SEQ TYPE="OPERATOR"><<</SEQ>
+ <SEQ TYPE="OPERATOR"><<=</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">%=</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">...</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>package</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>func</KEYWORD1>
+ <KEYWORD1>type</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD1>chan</KEYWORD1>
+
+ <KEYWORD2>for</KEYWORD2>
+ <KEYWORD2>goto</KEYWORD2>
+ <KEYWORD2>go</KEYWORD2>
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>return</KEYWORD2>
+ <KEYWORD2>switch</KEYWORD2>
+ <KEYWORD2>break</KEYWORD2>
+ <KEYWORD2>case</KEYWORD2>
+ <KEYWORD2>continue</KEYWORD2>
+ <KEYWORD2>default</KEYWORD2>
+ <KEYWORD2>else</KEYWORD2>
+ <KEYWORD2>defer</KEYWORD2>
+ <KEYWORD2>select</KEYWORD2>
+ <KEYWORD2>fallthrough</KEYWORD2>
+ <KEYWORD2>range</KEYWORD2>
+ <KEYWORD2>map</KEYWORD2>
+ <KEYWORD2>new</KEYWORD2>
+ <KEYWORD2>make</KEYWORD2>
+ <KEYWORD2>iota</KEYWORD2>
+
+ <KEYWORD3>string</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>bool</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>float32</KEYWORD3>
+ <KEYWORD3>float64</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>int8</KEYWORD3>
+ <KEYWORD3>int16</KEYWORD3>
+ <KEYWORD3>int32</KEYWORD3>
+ <KEYWORD3>int64</KEYWORD3>
+ <KEYWORD3>uint</KEYWORD3>
+ <KEYWORD3>uint8</KEYWORD3>
+ <KEYWORD3>uint16</KEYWORD3>
+ <KEYWORD3>uint32</KEYWORD3>
+ <KEYWORD3>uint64</KEYWORD3>
+ <KEYWORD3>uintptr</KEYWORD3>
+ <KEYWORD3>struct</KEYWORD3>
+
+ <LITERAL2>nil</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
+
+
+
diff --git a/jEdit/modes/groovy.xml b/jEdit/modes/groovy.xml
index 0357b06..b51d02d 100644
--- a/jEdit/modes/groovy.xml
+++ b/jEdit/modes/groovy.xml
@@ -1,262 +1,262 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-<MODE NAME="groovy" FILE="groovy.xml"
- FILE_NAME_GLOB="*.{groovy,grv}"/>
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- </PROPS>
-
- <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="FALSE">
- <!-- Silly comment -->
- <SEQ TYPE="COMMENT1">/**/</SEQ>
-
- <!-- Javadoc comment -->
- <SPAN TYPE="COMMENT3" DELEGATE="GROOVYDOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- Java comment (C style) -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- heredoc -->
- <SPAN_REGEXP HASH_CHAR="<<<" TYPE="LITERAL1" DELEGATE="LITERAL">
- <BEGIN><![CDATA[<<<([\p{Alpha}_][\p{Alnum}_]*)\s*]]></BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <SEQ TYPE="OPERATOR">=~</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR"><=></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-></SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
-
- <!-- workaround to stop "*" from being colorized
- in import statements. -->
- <SEQ TYPE="NULL">.*</SEQ>
-
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
- <KEYWORD1>instanceof</KEYWORD1>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>throws</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>volatile</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <KEYWORD1>strictfp</KEYWORD1>
-
- <KEYWORD1>package</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
-
- <!-- groovy keywords -->
- <KEYWORD2>as</KEYWORD2>
- <KEYWORD2>assert</KEYWORD2>
- <KEYWORD2>def</KEYWORD2>
- <KEYWORD2>mixin</KEYWORD2>
- <KEYWORD2>property</KEYWORD2>
- <KEYWORD2>test</KEYWORD2>
- <KEYWORD2>using</KEYWORD2>
- <KEYWORD2>in</KEYWORD2>
-
- <!-- types -->
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>interface</KEYWORD3>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD3>void</KEYWORD3>
-
- <!-- Groovy JDK stuff -->
- <KEYWORD4>abs</KEYWORD4>
- <KEYWORD4>any</KEYWORD4>
- <KEYWORD4>append</KEYWORD4>
- <KEYWORD4>asList</KEYWORD4>
- <KEYWORD4>asWritable</KEYWORD4>
- <KEYWORD4>call</KEYWORD4>
- <KEYWORD4>collect</KEYWORD4>
- <KEYWORD4>compareTo</KEYWORD4>
- <KEYWORD4>count</KEYWORD4>
- <KEYWORD4>div</KEYWORD4>
- <KEYWORD4>dump</KEYWORD4>
- <KEYWORD4>each</KEYWORD4>
- <KEYWORD4>eachByte</KEYWORD4>
- <KEYWORD4>eachFile</KEYWORD4>
- <KEYWORD4>eachLine</KEYWORD4>
- <KEYWORD4>every</KEYWORD4>
- <KEYWORD4>find</KEYWORD4>
- <KEYWORD4>findAll</KEYWORD4>
- <KEYWORD4>flatten</KEYWORD4>
- <KEYWORD4>getAt</KEYWORD4>
- <KEYWORD4>getErr</KEYWORD4>
- <KEYWORD4>getIn</KEYWORD4>
- <KEYWORD4>getOut</KEYWORD4>
- <KEYWORD4>getText</KEYWORD4>
- <KEYWORD4>grep</KEYWORD4>
- <KEYWORD4>immutable</KEYWORD4>
- <KEYWORD4>inject</KEYWORD4>
- <KEYWORD4>inspect</KEYWORD4>
- <KEYWORD4>intersect</KEYWORD4>
- <KEYWORD4>invokeMethods</KEYWORD4>
- <KEYWORD4>isCase</KEYWORD4>
- <KEYWORD4>join</KEYWORD4>
- <KEYWORD4>leftShift</KEYWORD4>
- <KEYWORD4>minus</KEYWORD4>
- <KEYWORD4>multiply</KEYWORD4>
- <KEYWORD4>newInputStream</KEYWORD4>
- <KEYWORD4>newOutputStream</KEYWORD4>
- <KEYWORD4>newPrintWriter</KEYWORD4>
- <KEYWORD4>newReader</KEYWORD4>
- <KEYWORD4>newWriter</KEYWORD4>
- <KEYWORD4>next</KEYWORD4>
- <KEYWORD4>plus</KEYWORD4>
- <KEYWORD4>pop</KEYWORD4>
- <KEYWORD4>power</KEYWORD4>
- <KEYWORD4>previous</KEYWORD4>
- <KEYWORD4>print</KEYWORD4>
- <KEYWORD4>println</KEYWORD4>
- <KEYWORD4>push</KEYWORD4>
- <KEYWORD4>putAt</KEYWORD4>
- <KEYWORD4>read</KEYWORD4>
- <KEYWORD4>readBytes</KEYWORD4>
- <KEYWORD4>readLines</KEYWORD4>
- <KEYWORD4>reverse</KEYWORD4>
- <KEYWORD4>reverseEach</KEYWORD4>
- <KEYWORD4>round</KEYWORD4>
- <KEYWORD4>size</KEYWORD4>
- <KEYWORD4>sort</KEYWORD4>
- <KEYWORD4>splitEachLine</KEYWORD4>
- <KEYWORD4>step</KEYWORD4>
- <KEYWORD4>subMap</KEYWORD4>
- <KEYWORD4>times</KEYWORD4>
- <KEYWORD4>toInteger</KEYWORD4>
- <KEYWORD4>toList</KEYWORD4>
- <KEYWORD4>tokenize</KEYWORD4>
- <KEYWORD4>upto</KEYWORD4>
- <KEYWORD4>waitForOrKill</KEYWORD4>
- <KEYWORD4>withPrintWriter</KEYWORD4>
- <KEYWORD4>withReader</KEYWORD4>
- <KEYWORD4>withStream</KEYWORD4>
- <KEYWORD4>withWriter</KEYWORD4>
- <KEYWORD4>withWriterAppend</KEYWORD4>
- <KEYWORD4>write</KEYWORD4>
- <KEYWORD4>writeLine</KEYWORD4>
-
- <LITERAL2>false</LITERAL2>
- <LITERAL2>null</LITERAL2>
- <LITERAL2>super</LITERAL2>
- <LITERAL2>this</LITERAL2>
- <LITERAL2>true</LITERAL2>
-
- <!-- this is specific to groovy, treat like `this`? -->
- <LITERAL3>it</LITERAL3>
-
- <INVALID>goto</INVALID>
- <INVALID>const</INVALID>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
- <!-- Variables -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
- </RULES>
-
- <RULES SET="GROOVYDOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
- <!-- so that @link{...} is highlighted -->
- <SEQ TYPE="COMMENT3">{</SEQ>
-
- <!-- so that *@param is highlighted -->
- <SEQ TYPE="COMMENT3">*</SEQ>
-
- <!-- HTML comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- Javadoc allows this -->
- <SEQ TYPE="COMMENT3"><<</SEQ>
- <SEQ TYPE="COMMENT3"><=</SEQ>
- <SEQ TYPE="COMMENT3">< </SEQ>
-
- <!-- HTML tags -->
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS"
- NO_LINE_BREAK="TRUE">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="LABEL">@</MARK_FOLLOWING>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+<MODE NAME="groovy" FILE="groovy.xml"
+ FILE_NAME_GLOB="*.{groovy,grv}"/>
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ </PROPS>
+
+ <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="FALSE">
+ <!-- Silly comment -->
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+
+ <!-- Javadoc comment -->
+ <SPAN TYPE="COMMENT3" DELEGATE="GROOVYDOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Java comment (C style) -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- heredoc -->
+ <SPAN_REGEXP HASH_CHAR="<<<" TYPE="LITERAL1" DELEGATE="LITERAL">
+ <BEGIN><![CDATA[<<<([\p{Alpha}_][\p{Alnum}_]*)\s*]]></BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <SEQ TYPE="OPERATOR">=~</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR"><=></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-></SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+
+ <!-- workaround to stop "*" from being colorized
+ in import statements. -->
+ <SEQ TYPE="NULL">.*</SEQ>
+
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+ <KEYWORD1>instanceof</KEYWORD1>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>throws</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>volatile</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <KEYWORD1>strictfp</KEYWORD1>
+
+ <KEYWORD1>package</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+
+ <!-- groovy keywords -->
+ <KEYWORD2>as</KEYWORD2>
+ <KEYWORD2>assert</KEYWORD2>
+ <KEYWORD2>def</KEYWORD2>
+ <KEYWORD2>mixin</KEYWORD2>
+ <KEYWORD2>property</KEYWORD2>
+ <KEYWORD2>test</KEYWORD2>
+ <KEYWORD2>using</KEYWORD2>
+ <KEYWORD2>in</KEYWORD2>
+
+ <!-- types -->
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>interface</KEYWORD3>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD3>void</KEYWORD3>
+
+ <!-- Groovy JDK stuff -->
+ <KEYWORD4>abs</KEYWORD4>
+ <KEYWORD4>any</KEYWORD4>
+ <KEYWORD4>append</KEYWORD4>
+ <KEYWORD4>asList</KEYWORD4>
+ <KEYWORD4>asWritable</KEYWORD4>
+ <KEYWORD4>call</KEYWORD4>
+ <KEYWORD4>collect</KEYWORD4>
+ <KEYWORD4>compareTo</KEYWORD4>
+ <KEYWORD4>count</KEYWORD4>
+ <KEYWORD4>div</KEYWORD4>
+ <KEYWORD4>dump</KEYWORD4>
+ <KEYWORD4>each</KEYWORD4>
+ <KEYWORD4>eachByte</KEYWORD4>
+ <KEYWORD4>eachFile</KEYWORD4>
+ <KEYWORD4>eachLine</KEYWORD4>
+ <KEYWORD4>every</KEYWORD4>
+ <KEYWORD4>find</KEYWORD4>
+ <KEYWORD4>findAll</KEYWORD4>
+ <KEYWORD4>flatten</KEYWORD4>
+ <KEYWORD4>getAt</KEYWORD4>
+ <KEYWORD4>getErr</KEYWORD4>
+ <KEYWORD4>getIn</KEYWORD4>
+ <KEYWORD4>getOut</KEYWORD4>
+ <KEYWORD4>getText</KEYWORD4>
+ <KEYWORD4>grep</KEYWORD4>
+ <KEYWORD4>immutable</KEYWORD4>
+ <KEYWORD4>inject</KEYWORD4>
+ <KEYWORD4>inspect</KEYWORD4>
+ <KEYWORD4>intersect</KEYWORD4>
+ <KEYWORD4>invokeMethods</KEYWORD4>
+ <KEYWORD4>isCase</KEYWORD4>
+ <KEYWORD4>join</KEYWORD4>
+ <KEYWORD4>leftShift</KEYWORD4>
+ <KEYWORD4>minus</KEYWORD4>
+ <KEYWORD4>multiply</KEYWORD4>
+ <KEYWORD4>newInputStream</KEYWORD4>
+ <KEYWORD4>newOutputStream</KEYWORD4>
+ <KEYWORD4>newPrintWriter</KEYWORD4>
+ <KEYWORD4>newReader</KEYWORD4>
+ <KEYWORD4>newWriter</KEYWORD4>
+ <KEYWORD4>next</KEYWORD4>
+ <KEYWORD4>plus</KEYWORD4>
+ <KEYWORD4>pop</KEYWORD4>
+ <KEYWORD4>power</KEYWORD4>
+ <KEYWORD4>previous</KEYWORD4>
+ <KEYWORD4>print</KEYWORD4>
+ <KEYWORD4>println</KEYWORD4>
+ <KEYWORD4>push</KEYWORD4>
+ <KEYWORD4>putAt</KEYWORD4>
+ <KEYWORD4>read</KEYWORD4>
+ <KEYWORD4>readBytes</KEYWORD4>
+ <KEYWORD4>readLines</KEYWORD4>
+ <KEYWORD4>reverse</KEYWORD4>
+ <KEYWORD4>reverseEach</KEYWORD4>
+ <KEYWORD4>round</KEYWORD4>
+ <KEYWORD4>size</KEYWORD4>
+ <KEYWORD4>sort</KEYWORD4>
+ <KEYWORD4>splitEachLine</KEYWORD4>
+ <KEYWORD4>step</KEYWORD4>
+ <KEYWORD4>subMap</KEYWORD4>
+ <KEYWORD4>times</KEYWORD4>
+ <KEYWORD4>toInteger</KEYWORD4>
+ <KEYWORD4>toList</KEYWORD4>
+ <KEYWORD4>tokenize</KEYWORD4>
+ <KEYWORD4>upto</KEYWORD4>
+ <KEYWORD4>waitForOrKill</KEYWORD4>
+ <KEYWORD4>withPrintWriter</KEYWORD4>
+ <KEYWORD4>withReader</KEYWORD4>
+ <KEYWORD4>withStream</KEYWORD4>
+ <KEYWORD4>withWriter</KEYWORD4>
+ <KEYWORD4>withWriterAppend</KEYWORD4>
+ <KEYWORD4>write</KEYWORD4>
+ <KEYWORD4>writeLine</KEYWORD4>
+
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ <LITERAL2>super</LITERAL2>
+ <LITERAL2>this</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+
+ <!-- this is specific to groovy, treat like `this`? -->
+ <LITERAL3>it</LITERAL3>
+
+ <INVALID>goto</INVALID>
+ <INVALID>const</INVALID>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
+ <!-- Variables -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+ </RULES>
+
+ <RULES SET="GROOVYDOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
+ <!-- so that @link{...} is highlighted -->
+ <SEQ TYPE="COMMENT3">{</SEQ>
+
+ <!-- so that *@param is highlighted -->
+ <SEQ TYPE="COMMENT3">*</SEQ>
+
+ <!-- HTML comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- Javadoc allows this -->
+ <SEQ TYPE="COMMENT3"><<</SEQ>
+ <SEQ TYPE="COMMENT3"><=</SEQ>
+ <SEQ TYPE="COMMENT3">< </SEQ>
+
+ <!-- HTML tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS"
+ NO_LINE_BREAK="TRUE">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="LABEL">@</MARK_FOLLOWING>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/haskell.xml b/jEdit/modes/haskell.xml
index cc996c4..103406a 100644
--- a/jEdit/modes/haskell.xml
+++ b/jEdit/modes/haskell.xml
@@ -1,180 +1,120 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- Haskell mode by Kristian Ovaska (kristian.ovaska at helsinki.fi)
- Based on Haskell 98
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="{-" />
- <PROPERTY NAME="commentEnd" VALUE="-}" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- <!-- apparently, this is required... -->
- <PROPERTY NAME="tabSize" VALUE="8" />
- <PROPERTY NAME="indentSize" VALUE="8" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Pragmas. -->
- <SPAN TYPE="COMMENT2">
- <BEGIN>{-#</BEGIN>
- <END>#-}</END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>{-</BEGIN>
- <END>-}</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- ' causes problems because not all ' are character
- definitions. I implemented an ugly and partial workaround. -->
- <SEQ TYPE="LITERAL1">' '</SEQ>
- <SEQ TYPE="LITERAL1">'!'</SEQ>
- <SEQ TYPE="LITERAL1">'"'</SEQ>
- <SEQ TYPE="LITERAL1">'$'</SEQ>
- <SEQ TYPE="LITERAL1">'%'</SEQ>
- <SEQ TYPE="LITERAL1">'/'</SEQ>
- <SEQ TYPE="LITERAL1">'('</SEQ>
- <SEQ TYPE="LITERAL1">')'</SEQ>
- <SEQ TYPE="LITERAL1">'['</SEQ>
- <SEQ TYPE="LITERAL1">']'</SEQ>
- <SEQ TYPE="LITERAL1">'+'</SEQ>
- <SEQ TYPE="LITERAL1">'-'</SEQ>
- <SEQ TYPE="LITERAL1">'*'</SEQ>
- <SEQ TYPE="LITERAL1">'='</SEQ>
- <SEQ TYPE="LITERAL1">'/'</SEQ>
- <SEQ TYPE="LITERAL1">'^'</SEQ>
- <SEQ TYPE="LITERAL1">'.'</SEQ>
- <SEQ TYPE="LITERAL1">','</SEQ>
- <SEQ TYPE="LITERAL1">':'</SEQ>
- <SEQ TYPE="LITERAL1">';'</SEQ>
- <SEQ TYPE="LITERAL1">'<'</SEQ>
- <SEQ TYPE="LITERAL1">'>'</SEQ>
- <SEQ TYPE="LITERAL1">'|'</SEQ>
- <SEQ TYPE="LITERAL1">'@'</SEQ>
-
- <SPAN TYPE="LITERAL1" NO_WORD_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">..</SEQ>
- <SEQ TYPE="OPERATOR">&&</SEQ>
- <SEQ TYPE="OPERATOR">::</SEQ>
-
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
-
- <!-- Defining this as OPERATOR causes float numbers not to be
- highlighted... Which is more important? -->
- <!-- <SEQ TYPE="NULL">.</SEQ> -->
-
- <KEYWORDS>
- <!-- Reserved words. -->
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>data</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>deriving</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>infix</KEYWORD1>
- <KEYWORD1>infixl</KEYWORD1>
- <KEYWORD1>infixr</KEYWORD1>
- <KEYWORD1>instance</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>module</KEYWORD1>
- <KEYWORD1>newtype</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
- <KEYWORD1>where</KEYWORD1>
- <KEYWORD1>_</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>qualified</KEYWORD1>
- <KEYWORD1>hiding</KEYWORD1>
-
- <KEYWORD3>Addr</KEYWORD3>
- <KEYWORD3>Bool</KEYWORD3>
- <KEYWORD3>Bounded</KEYWORD3>
- <KEYWORD3>Char</KEYWORD3>
- <KEYWORD3>Double</KEYWORD3>
- <KEYWORD3>Either</KEYWORD3>
- <KEYWORD3>Enum</KEYWORD3>
- <KEYWORD3>Eq</KEYWORD3>
- <KEYWORD3>FilePath</KEYWORD3>
- <KEYWORD3>Float</KEYWORD3>
- <KEYWORD3>Floating</KEYWORD3>
- <KEYWORD3>Fractional</KEYWORD3>
- <KEYWORD3>Functor</KEYWORD3>
- <KEYWORD3>IO</KEYWORD3>
- <KEYWORD3>IOError</KEYWORD3>
- <KEYWORD3>IOResult</KEYWORD3>
- <KEYWORD3>Int</KEYWORD3>
- <KEYWORD3>Integer</KEYWORD3>
- <KEYWORD3>Integral</KEYWORD3>
- <KEYWORD3>Ix</KEYWORD3>
- <KEYWORD3>Maybe</KEYWORD3>
- <KEYWORD3>Monad</KEYWORD3>
- <KEYWORD3>Num</KEYWORD3>
- <KEYWORD3>Ord</KEYWORD3>
- <KEYWORD3>Ordering</KEYWORD3>
- <KEYWORD3>Ratio</KEYWORD3>
- <KEYWORD3>Rational</KEYWORD3>
- <KEYWORD3>Read</KEYWORD3>
- <KEYWORD3>ReadS</KEYWORD3>
- <KEYWORD3>Real</KEYWORD3>
- <KEYWORD3>RealFloat</KEYWORD3>
- <KEYWORD3>RealFrac</KEYWORD3>
- <KEYWORD3>Show</KEYWORD3>
- <KEYWORD3>ShowS</KEYWORD3>
- <KEYWORD3>String</KEYWORD3>
-
- <LITERAL2>:</LITERAL2>
- <LITERAL2>EQ</LITERAL2>
- <LITERAL2>False</LITERAL2>
- <LITERAL2>GT</LITERAL2>
- <LITERAL2>Just</LITERAL2>
- <LITERAL2>LT</LITERAL2>
- <LITERAL2>Left</LITERAL2>
- <LITERAL2>Nothing</LITERAL2>
- <LITERAL2>Right</LITERAL2>
- <LITERAL2>True</LITERAL2>
-
- <OPERATOR>quot</OPERATOR>
- <OPERATOR>rem</OPERATOR>
- <OPERATOR>div</OPERATOR>
- <OPERATOR>mod</OPERATOR>
- <OPERATOR>elem</OPERATOR>
- <OPERATOR>notElem</OPERATOR>
- <OPERATOR>seq</OPERATOR>
- </KEYWORDS>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ Haskell mode by Stephen Blackheath
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="{-" />
+ <PROPERTY NAME="commentEnd" VALUE="-}" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ <!-- apparently, this is required... -->
+ <PROPERTY NAME="tabSize" VALUE="8" />
+ <PROPERTY NAME="indentSize" VALUE="8" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE">
+ <!-- Pragmas. -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>{-#</BEGIN>
+ <END>#-}</END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>{-</BEGIN>
+ <END>-}</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- Reserved words. -->
+ <SEQ_REGEXP TYPE="KEYWORD1">case(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">class(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">data(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">default(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">deriving(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">do(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">else(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">if(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">import(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">in(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">infix(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">infixl(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">infixr(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">instance(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">let(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">module(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">newtype(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">of(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">then(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">type(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">where(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">_(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">as(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">qualified(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">hiding(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <!-- Non-Haskell-98 keywords -->
+ <SEQ_REGEXP TYPE="KEYWORD1">foreign(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1">family(?![a-z_A-Z0-9'])</SEQ_REGEXP>
+
+ <SEQ_REGEXP TYPE="DIGIT">0[xXoO][0-9a-fA-F]+</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="DIGIT">[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?</SEQ_REGEXP>
+
+ <!-- Reserved operators -->
+ <SEQ_REGEXP TYPE="KEYWORD4">\.\.(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4">:(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4">::(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4">=(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+ <SEQ TYPE="KEYWORD4">\</SEQ>
+ <SEQ_REGEXP TYPE="KEYWORD4">\|(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4"><-(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4">->(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4">@(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4">~(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4">=>(?![!#$%&\*+\./<=>?@\\\^\|\-~:])</SEQ_REGEXP>
+
+ <!-- Normal operators, backquoted operators -->
+ <SEQ_REGEXP TYPE="OPERATOR">([A-Z][a-z_A-Z0-9']*\.)*[!#$%&\*+\./<=>?@\\\^\|\-~][!#$%&\*+\./<=>?@\\\^\|\-~:]*</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="OPERATOR">`([A-Z][a-z_A-Z0-9']*\.)*[a-z_][a-z_A-Z0-9']*`</SEQ_REGEXP>
+
+ <!-- variable/function (qualified or not) -->
+ <SEQ_REGEXP TYPE="NULL">([A-Z][a-z_A-Z0-9']*\.)*[a-z_][a-z_A-Z0-9']*</SEQ_REGEXP>
+ <!-- contructor/type (qualified or not) -->
+ <SEQ_REGEXP TYPE="KEYWORD2">[A-Z][a-z_A-Z0-9']*(\.[A-Z][a-z_A-Z0-9']*)*</SEQ_REGEXP>
+
+ <!-- Operators in parentheses appear like functions, but this
+ doesn't match the special case of (..) used for imports -->
+ <SEQ_REGEXP TYPE="NULL">\(\s*([A-Z][a-z_A-Z0-9']*\.)*[!#$%&\*+\./<=>?@\\\^\|\-~]\s*\)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="NULL">\(\s*([A-Z][a-z_A-Z0-9']*\.)*[!#$%&\*+\./<=>?@\\\^\|\-~][!#$%&\*+/<=>?@\\\^\|\-~:][!#$%&\*+\./<=>?@\\\^\|\-~:]*\s*\)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="NULL">\(\s*([A-Z][a-z_A-Z0-9']*\.)*[!#$%&\*+/<=>?@\\\^\|\-~][!#$%&\*+\./<=>?@\\\^\|\-~:][!#$%&\*+\./<=>?@\\\^\|\-~:]*\s*\)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="NULL">\(\s*([A-Z][a-z_A-Z0-9']*\.)*[!#$%&\*+\./<=>?@\\\^\|\-~][!#$%&\*+\./<=>?@\\\^\|\-~:]{2,}\)</SEQ_REGEXP>
+
+ <!-- Infix constructors -->
+ <SEQ_REGEXP TYPE="KEYWORD2">([A-Z][a-z_A-Z0-9']*\.)*:[!#$%&\*+\./<=>?@\\\^\|\-~:]*</SEQ_REGEXP>
+ <!-- Infix constructors in parentheses -->
+ <SEQ_REGEXP TYPE="KEYWORD2">\(\s*([A-Z][a-z_A-Z0-9']*\.)*:[!#$%&\*+\./<=>?@\\\^\|\-~:]*\s*\)</SEQ_REGEXP>
+
+ <!-- (, including the specific case of (..) but excluding all other cases
+ where it's an operator in parentheses -->
+ <SEQ_REGEXP TYPE="KEYWORD3">\((?!\s*([!#$%&\*+\./<=>?@\\\^\|\-~]\s*\)|[!#$%&\*+\./<=>?@\\\^\|\-~][!#$%&\*+/<=>?@\\\^\|\-~:][!#$%&\*+\./<=>?@\\\^\|\-~:]*\s*\)|[!#$%&\*+/<=>?@\\\^\|\-~][!#$%&\*+\./<=>?@\\\^\|\-~:][!#$%&\*+\./<=>?@\\\^\|\-~:]*\s*\)|[!#$%&\*+\./<=>?@\\\^\|\-~][!#$%&\*+\./<=>?@\\\^\|\-~:]{2,}\s*\)))</SEQ_REGEXP>
+ <SEQ TYPE="KEYWORD3">)</SEQ>
+ <SEQ TYPE="KEYWORD3">,</SEQ>
+ <SEQ TYPE="KEYWORD3">[</SEQ>
+ <SEQ TYPE="KEYWORD3">]</SEQ>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/haxe.xml b/jEdit/modes/haxe.xml
new file mode 100644
index 0000000..baf66e2
--- /dev/null
+++ b/jEdit/modes/haxe.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ ~ jEdit - Programmer's Text Editor
+ ~ :tabSize=8:indentSize=8:noTabs=false:
+ ~ :folding=explicit:collapseFolds=1:
+ ~
+ ~ Copyright © 2010 jEdit contributors
+ ~
+ ~ This program is free software; you can redistribute it and/or
+ ~ modify it under the terms of the GNU General Public License
+ ~ as published by the Free Software Foundation; either version 2
+ ~ of the License, or any later version.
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program; if not, write to the Free Software
+ ~ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ -->
+
+<!--
+ This mode highlights the syntax of haXe, but unlike most modes,
+ it does not attempt to highlight standard API, except those core
+ types defined prior to any imports, e.g. the Bool class.
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <!-- the ; hack is there so that stuff like if(bob) fred();
+ does not indent the next line -->
+ <PROPERTY NAME="indentPrevLine"
+ VALUE="\s*(if|while)\s*(|else|case|default:)[^;]*|for\s*\(.*)" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE="+-.,=<>/?^&*" />
+ </PROPS>
+
+ <RULES ESCAPE="\\"
+ IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[[:xdigit:]]+|[[:digit:]]+((E|e|)[[:digit:]]*)?)">
+ <!-- whitespace: (space and tab) -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- Mark anything preceding ( as a function. -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="CONTEXT">(</MARK_PREVIOUS>
+ <!-- Sometimes I leave a space. -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="CONTEXT"> (</MARK_PREVIOUS>
+
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+
+ <!-- Make preprocessor directive look like comment 3 -->
+ <EOL_SPAN TYPE="COMMENT3">#</EOL_SPAN>
+
+ <!-- Regular expression highlighting -->
+ <SEQ_REGEXP TYPE="MARKUP"
+ HASH_CHAR="~"
+ AT_WORD_START="TRUE"
+ >~([[:punct:]])(?:.*?[^\\])*?\1[sgiexom]*</SEQ_REGEXP>
+
+ <SEQ TYPE="NULL">)</SEQ>
+ <SEQ TYPE="NULL">(</SEQ>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <KEYWORDS>
+
+ <!-- haXe's flow control words -->
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <!-- haXe's declarative words -->
+ <KEYWORD2>class</KEYWORD2>
+ <KEYWORD2>enum</KEYWORD2>
+ <KEYWORD2>extends</KEYWORD2>
+ <KEYWORD2>extern</KEYWORD2>
+ <KEYWORD2>function</KEYWORD2>
+ <KEYWORD2>implements</KEYWORD2>
+ <KEYWORD2>import</KEYWORD2>
+ <KEYWORD2>using</KEYWORD2>
+ <KEYWORD2>interface</KEYWORD2>
+ <KEYWORD2>inline</KEYWORD2>
+ <KEYWORD2>override</KEYWORD2>
+ <KEYWORD2>package</KEYWORD2>
+ <KEYWORD2>private</KEYWORD2>
+ <KEYWORD2>public</KEYWORD2>
+ <KEYWORD2>static</KEYWORD2>
+ <KEYWORD2>typedef</KEYWORD2>
+ <KEYWORD2>using</KEYWORD2>
+ <KEYWORD2>var</KEYWORD2>
+
+ <!-- Built-in types -->
+ <KEYWORD3>ArrayAccess</KEYWORD3>
+ <KEYWORD3>Array</KEYWORD3>
+ <KEYWORD3>Bool</KEYWORD3>
+ <KEYWORD3>Dynamic</KEYWORD3>
+ <KEYWORD3>Float</KEYWORD3>
+ <KEYWORD3>Int</KEYWORD3>
+ <KEYWORD3>Iterator</KEYWORD3>
+ <KEYWORD3>Iterable</KEYWORD3>
+ <KEYWORD3>Null</KEYWORD3>
+ <KEYWORD3>Object</KEYWORD3>
+ <KEYWORD3>String</KEYWORD3>
+ <KEYWORD3>UInt</KEYWORD3>
+ <KEYWORD3>Void</KEYWORD3>
+
+ <!-- Special keywords -->
+ <LITERAL2>cast</LITERAL2>
+ <LITERAL2>new</LITERAL2>
+ <LITERAL2>super</LITERAL2>
+ <LITERAL2>this</LITERAL2>
+ <LITERAL2>trace</LITERAL2>
+ <LITERAL2>typeof</LITERAL2>
+ <LITERAL2>untyped</LITERAL2>
+ <!-- Literals -->
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>undefined</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/hex.xml b/jEdit/modes/hex.xml
index 73a8db9..895e736 100644
--- a/jEdit/modes/hex.xml
+++ b/jEdit/modes/hex.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- Hex mode by Andre Kaplan.
- To be used in conjunction with the Hex plugin.
--->
-
-<MODE>
- <RULES DEFAULT="LITERAL1">
-
- <MARK_PREVIOUS
- TYPE="KEYWORD1"
- AT_LINE_START="TRUE"
- >:</MARK_PREVIOUS>
-
- <EOL_SPAN TYPE="KEYWORD2">;</EOL_SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ Hex mode by Andre Kaplan.
+ To be used in conjunction with the Hex plugin.
+-->
+
+<MODE>
+ <RULES DEFAULT="LITERAL1">
+
+ <MARK_PREVIOUS
+ TYPE="KEYWORD1"
+ AT_LINE_START="TRUE"
+ >:</MARK_PREVIOUS>
+
+ <EOL_SPAN TYPE="KEYWORD2">;</EOL_SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/hlsl.xml b/jEdit/modes/hlsl.xml
index 1bdff8f..036b085 100644
--- a/jEdit/modes/hlsl.xml
+++ b/jEdit/modes/hlsl.xml
@@ -1,478 +1,478 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
-<!--
-DirectX FX Files Syntax Highlighting (Edit Mode) for jEdit
-Including: Preprocessor, HLSL and Shader Assembler up to shader version 3.0
-
-Author: Adam Sawicki
-- Homepage: http://regedit.gamedev.pl/
-- E-mail: sawickiap at poczta.onet.pl
-- IRC: #warsztat @ PolNet
-- Gadu-Gadu: 2272474
-
--->
-
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=".,+-*/=<>?^&[]{}" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="indentNextLine" VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
- </PROPS>
-
- <RULES
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="((0[xX][0-9a-fA-F]+|\d+)[uUIL]?|\d+([eE]\d*)?[hHfF]?)">
-
- <!-- C style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- preprocessor statements -->
- <SEQ TYPE="KEYWORD2">##</SEQ>
- <SEQ TYPE="KEYWORD2">#@</SEQ>
- <EOL_SPAN TYPE="KEYWORD2" DELEGATE="Preprocessor">#</EOL_SPAN>
-
- <!-- asm -->
- <SPAN AT_WORD_START="TRUE" EXCLUDE_MATCH="FALSE" TYPE="KEYWORD1" DELEGATE="Asm">
- <BEGIN>asm</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN AT_WORD_START="TRUE" EXCLUDE_MATCH="FALSE" TYPE="KEYWORD1" DELEGATE="Asm">
- <BEGIN>ASM</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN AT_WORD_START="TRUE" EXCLUDE_MATCH="FALSE" TYPE="KEYWORD1" DELEGATE="Asm">
- <BEGIN>Asm</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN AT_WORD_START="TRUE" EXCLUDE_MATCH="FALSE" TYPE="KEYWORD1" DELEGATE="Asm">
- <BEGIN>asm_fragment</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- C style comment -->
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <!-- Operators - multi character -->
- <SEQ TYPE="OPERATOR">++</SEQ>
- <SEQ TYPE="OPERATOR">--</SEQ>
- <SEQ TYPE="OPERATOR">&&</SEQ>
- <SEQ TYPE="OPERATOR">||</SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">::</SEQ>
- <SEQ TYPE="OPERATOR"><<</SEQ>
- <SEQ TYPE="OPERATOR"><<=</SEQ>
- <SEQ TYPE="OPERATOR">>></SEQ>
- <SEQ TYPE="OPERATOR">>>=</SEQ>
- <SEQ TYPE="OPERATOR">...</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR">*=</SEQ>
- <SEQ TYPE="OPERATOR">/=</SEQ>
- <SEQ TYPE="OPERATOR">+=</SEQ>
- <SEQ TYPE="OPERATOR">-=</SEQ>
- <SEQ TYPE="OPERATOR">%=</SEQ>
- <SEQ TYPE="OPERATOR">&=</SEQ>
- <SEQ TYPE="OPERATOR">|=</SEQ>
- <SEQ TYPE="OPERATOR">^=</SEQ>
- <SEQ TYPE="OPERATOR">-></SEQ>
-
- <!-- Operators - single characters -->
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">(</MARK_PREVIOUS>
-
- <!-- Swizzle operator for vectors/scalars (a.xyzw OR b.rgba), matrices (c._m00_m01 OR d._11_12) indexing -->
- <SEQ_REGEXP TYPE="OPERATOR" HASH_CHAR=".">.(([xyzw]{1,4})|([rgba]{1,4})|((_m[0123][0123])+)|((_[1234][1234])+))(?!\p{Alnum})</SEQ_REGEXP>
-
- <!-- Atomic, but complex types -->
- <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="bool">bool[1234](x[1234])?\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="int">int[1234](x[1234])?\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="half">half[1234](x[1234])?\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="float">float[1234](x[1234])?\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="double">double[1234](x[1234])?\b</SEQ_REGEXP>
-
- <!-- Semantics -->
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR=":">:\s*(register\s*\(\w+(\s*\,\s*\w+\s*)?\)|\w+)</SEQ_REGEXP>
-
- <KEYWORDS>
- <!-- Control flow keywords -->
- <KEYWORD1>discard</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>typedef</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <!-- Other keywords -->
- <KEYWORD1>compile</KEYWORD1>
- <KEYWORD1>compile_fragment</KEYWORD1>
- <KEYWORD1>register</KEYWORD1>
- <KEYWORD1>sampler_state</KEYWORD1>
- <KEYWORD1>stateblock_state</KEYWORD1>
- <KEYWORD1>technique</KEYWORD1>
- <KEYWORD1>Technique</KEYWORD1>
- <KEYWORD1>TECHNIQUE</KEYWORD1>
- <KEYWORD1>pass</KEYWORD1>
- <KEYWORD1>Pass</KEYWORD1>
- <KEYWORD1>PASS</KEYWORD1>
- <KEYWORD1>decl</KEYWORD1>
- <KEYWORD1>Decl</KEYWORD1>
- <KEYWORD1>DECL</KEYWORD1>
-
- <!-- Atomic type keywords -->
- <KEYWORD2>void</KEYWORD2>
- <KEYWORD2>bool</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>half</KEYWORD2>
- <KEYWORD2>float</KEYWORD2>
- <KEYWORD2>double</KEYWORD2>
- <KEYWORD2>vector</KEYWORD2>
- <KEYWORD2>matrix</KEYWORD2>
-
- <!-- Object type keywords -->
- <KEYWORD3>string</KEYWORD3>
- <KEYWORD3>texture</KEYWORD3>
- <KEYWORD3>texture1D</KEYWORD3>
- <KEYWORD3>texture2D</KEYWORD3>
- <KEYWORD3>texture3D</KEYWORD3>
- <KEYWORD3>textureCUBE</KEYWORD3>
- <KEYWORD3>sampler</KEYWORD3>
- <KEYWORD3>sampler1D</KEYWORD3>
- <KEYWORD3>sampler2D</KEYWORD3>
- <KEYWORD3>sampler3D</KEYWORD3>
- <KEYWORD3>samplerCUBE</KEYWORD3>
- <KEYWORD3>pixelfragment</KEYWORD3>
- <KEYWORD3>vertexfragment</KEYWORD3>
- <KEYWORD3>pixelshader</KEYWORD3>
- <KEYWORD3>vertexshader</KEYWORD3>
- <KEYWORD3>stateblock</KEYWORD3>
- <KEYWORD3>struct</KEYWORD3>
-
- <!-- Usage keywords -->
- <KEYWORD4>static</KEYWORD4>
- <KEYWORD4>uniform</KEYWORD4>
- <KEYWORD4>extern</KEYWORD4>
- <KEYWORD4>volatile</KEYWORD4>
- <KEYWORD4>inline</KEYWORD4>
- <KEYWORD4>shared</KEYWORD4>
- <KEYWORD4>const</KEYWORD4>
- <KEYWORD4>row_major</KEYWORD4>
- <KEYWORD4>column_major</KEYWORD4>
- <KEYWORD4>in</KEYWORD4>
- <KEYWORD4>inout</KEYWORD4>
- <KEYWORD4>out</KEYWORD4>
-
- <!-- Literals -->
- <LITERAL1>false</LITERAL1>
- <LITERAL1>true</LITERAL1>
- <LITERAL1>NULL</LITERAL1>
-
- <!-- Intrinsic functions -->
- <LITERAL2>abs</LITERAL2>
- <LITERAL2>acos</LITERAL2>
- <LITERAL2>all</LITERAL2>
- <LITERAL2>any</LITERAL2>
- <LITERAL2>asin</LITERAL2>
- <LITERAL2>atan</LITERAL2>
- <LITERAL2>atan2</LITERAL2>
- <LITERAL2>ceil</LITERAL2>
- <LITERAL2>clamp</LITERAL2>
- <LITERAL2>clip</LITERAL2>
- <LITERAL2>cos</LITERAL2>
- <LITERAL2>cosh</LITERAL2>
- <LITERAL2>cross</LITERAL2>
- <LITERAL2>D3DCOLORtoUBYTE4</LITERAL2>
- <LITERAL2>ddx</LITERAL2>
- <LITERAL2>ddy</LITERAL2>
- <LITERAL2>degrees</LITERAL2>
- <LITERAL2>determinant</LITERAL2>
- <LITERAL2>distance</LITERAL2>
- <LITERAL2>dot</LITERAL2>
- <LITERAL2>exp</LITERAL2>
- <LITERAL2>exp2</LITERAL2>
- <LITERAL2>faceforward</LITERAL2>
- <LITERAL2>floor</LITERAL2>
- <LITERAL2>fmod</LITERAL2>
- <LITERAL2>frac</LITERAL2>
- <LITERAL2>frexp</LITERAL2>
- <LITERAL2>fwidth</LITERAL2>
- <LITERAL2>isfinite</LITERAL2>
- <LITERAL2>isinf</LITERAL2>
- <LITERAL2>isnan</LITERAL2>
- <LITERAL2>ldexp</LITERAL2>
- <LITERAL2>length</LITERAL2>
- <LITERAL2>lerp</LITERAL2>
- <LITERAL2>lit</LITERAL2>
- <LITERAL2>log</LITERAL2>
- <LITERAL2>log10</LITERAL2>
- <LITERAL2>log2</LITERAL2>
- <LITERAL2>max</LITERAL2>
- <LITERAL2>min</LITERAL2>
- <LITERAL2>modf</LITERAL2>
- <LITERAL2>mul</LITERAL2>
- <LITERAL2>noise</LITERAL2>
- <LITERAL2>normalize</LITERAL2>
- <LITERAL2>pow</LITERAL2>
- <LITERAL2>radians</LITERAL2>
- <LITERAL2>reflect</LITERAL2>
- <LITERAL2>refract</LITERAL2>
- <LITERAL2>round</LITERAL2>
- <LITERAL2>rsqrt</LITERAL2>
- <LITERAL2>saturate</LITERAL2>
- <LITERAL2>sign</LITERAL2>
- <LITERAL2>sin</LITERAL2>
- <LITERAL2>sincos</LITERAL2>
- <LITERAL2>sinh</LITERAL2>
- <LITERAL2>smoothstep</LITERAL2>
- <LITERAL2>sqrt</LITERAL2>
- <LITERAL2>step</LITERAL2>
- <LITERAL2>tan</LITERAL2>
- <LITERAL2>tanh</LITERAL2>
- <LITERAL2>transpose</LITERAL2>
-
- <!-- Intrinsic functions - sampling -->
- <LITERAL3>tex1D</LITERAL3>
- <LITERAL3>tex1Dgrad</LITERAL3>
- <LITERAL3>tex1Dbias</LITERAL3>
- <LITERAL3>tex1Dgrad</LITERAL3>
- <LITERAL3>tex1Dlod</LITERAL3>
- <LITERAL3>tex1Dproj</LITERAL3>
- <LITERAL3>tex2D</LITERAL3>
- <LITERAL3>tex2D</LITERAL3>
- <LITERAL3>tex2Dbias</LITERAL3>
- <LITERAL3>tex2Dgrad</LITERAL3>
- <LITERAL3>tex2Dlod</LITERAL3>
- <LITERAL3>tex2Dproj</LITERAL3>
- <LITERAL3>tex3D</LITERAL3>
- <LITERAL3>tex3D</LITERAL3>
- <LITERAL3>tex3Dbias</LITERAL3>
- <LITERAL3>tex3Dgrad</LITERAL3>
- <LITERAL3>tex3Dlod</LITERAL3>
- <LITERAL3>tex3Dproj</LITERAL3>
- <LITERAL3>texCUBE</LITERAL3>
- <LITERAL3>texCUBE</LITERAL3>
- <LITERAL3>texCUBEbias</LITERAL3>
- <LITERAL3>texCUBEgrad</LITERAL3>
- <LITERAL3>texCUBElod</LITERAL3>
- <LITERAL3>texCUBEproj</LITERAL3>
-
- <!-- Reserved but unused words -->
- <INVALID>auto</INVALID>
- <INVALID>break</INVALID>
- <INVALID>case</INVALID>
- <INVALID>catch</INVALID>
- <INVALID>char</INVALID>
- <INVALID>class</INVALID>
- <INVALID>const_cast</INVALID>
- <INVALID>continue</INVALID>
- <INVALID>default</INVALID>
- <INVALID>delete</INVALID>
- <INVALID>dynamic_cast</INVALID>
- <INVALID>enum</INVALID>
- <INVALID>explicit</INVALID>
- <INVALID>friend</INVALID>
- <INVALID>goto</INVALID>
- <INVALID>long</INVALID>
- <INVALID>mutable</INVALID>
- <INVALID>namespace</INVALID>
- <INVALID>new</INVALID>
- <INVALID>operator</INVALID>
- <INVALID>private</INVALID>
- <INVALID>protected</INVALID>
- <INVALID>public</INVALID>
- <INVALID>reinterpret_cast</INVALID>
- <INVALID>short</INVALID>
- <INVALID>signed</INVALID>
- <INVALID>sizeof</INVALID>
- <INVALID>static_cast</INVALID>
- <INVALID>switch</INVALID>
- <INVALID>template</INVALID>
- <INVALID>this</INVALID>
- <INVALID>throw</INVALID>
- <INVALID>try</INVALID>
- <INVALID>typename</INVALID>
- <INVALID>union</INVALID>
- <INVALID>unsigned</INVALID>
- <INVALID>using</INVALID>
- <INVALID>virtual</INVALID>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="Include" DEFAULT="KEYWORD2" />
-
- <RULES
- SET="Preprocessor"
- DEFAULT="KEYWORD2"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="((0x[[:xdigit:]]+|[[:digit:]]+)[uUIL]?|[[:digit:]]+([eE][[:digit:]]*)?[hHfF]?)">
-
- <!-- C style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- this is a hack so that #include <net/if.h> does not get the if highlighted -->
- <EOL_SPAN TYPE="MARKUP" DELEGATE="Include">include</EOL_SPAN>
-
- <KEYWORDS>
- <!-- Directives -->
- <MARKUP>define</MARKUP>
- <MARKUP>elif</MARKUP>
- <MARKUP>else</MARKUP>
- <MARKUP>endif</MARKUP>
- <MARKUP>error</MARKUP>
- <MARKUP>if</MARKUP>
- <MARKUP>ifdef</MARKUP>
- <MARKUP>ifndef</MARKUP>
- <MARKUP>line</MARKUP>
- <MARKUP>pragma</MARKUP>
- <MARKUP>undef</MARKUP>
-
- <!-- Other -->
- <LITERAL1>pack_matrix</LITERAL1>
- <LITERAL1>warning</LITERAL1>
- <LITERAL1>def</LITERAL1>
- <LITERAL1>defined</LITERAL1>
- <LITERAL1>D3DX</LITERAL1>
- <LITERAL1>D3DX_VERSION</LITERAL1>
- <LITERAL1>DIRECT3D</LITERAL1>
- <LITERAL1>DIRECT3D_VERSION</LITERAL1>
- <LITERAL1>__FILE__</LITERAL1>
- <LITERAL1>__LINE__</LITERAL1>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="Asm"
- DEFAULT="NULL"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="((0x[[:xdigit:]]+|[[:digit:]]+)[uUIL]?|[[:digit:]]+([eE][[:digit:]]*)?[hHfF]?)">
-
- <!-- Starting... -->
- <SEQ TYPE="OPERATOR">{</SEQ>
-
- <!-- Comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">;</EOL_SPAN>
-
- <!-- Operators -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
-
- <!-- Swizzle operator -->
- <SEQ_REGEXP TYPE="OPERATOR" HASH_CHAR=".">.(([xyzw]{1,4}))</SEQ_REGEXP>
-
- <!-- Instruction -->
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="abs">abs(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="add">add(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="bem">bem(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="break_comp">break_comp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="breakp">breakp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="callnz">callnz(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="cmp">cmp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="cnd">cnd(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="crs">crs(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dp2add">dp2add(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dp3">dp3(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dp4">dp4(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dst">dst(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dsx">dsx(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dsy">dsy(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="else">else(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="endif">endif(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="endloop">endloop(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="endrep">endrep(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="exp">exp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="frc">frc(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="if">if(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="label">label(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="lit">lit(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="logp">logp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="loop">loop(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="lrp">lrp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m3x2">m3x2(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m3x3">m3x3(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m3x4">m3x4(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m4x3">m4x3(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m4x4">m4x4(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="mad">mad(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="mov">mov(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="max">max(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="min">min(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="mova">mova(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="mul">mul(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="nop">nop(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="nrm">nrm(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="phase">phase(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="pow">pow(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="rcp">rcp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="rep">rep(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="ret">ret(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="rsq">rsq(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="setp_comp">setp_comp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="sge">sge(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="sgn">sgn(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="sincos">sincos(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="slt">slt(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="sub">sub(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
- <!-- (seen in preshader -->
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="neg">neg(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
-
- <!-- Texturing instruction -->
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2" HASH_CHAR="tex">tex\w*</SEQ_REGEXP>
-
- <!-- Main instruction -->
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1" HASH_CHAR="ps">ps\w*</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1" HASH_CHAR="vs">vs\w*</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1" HASH_CHAR="def">def\w*</SEQ_REGEXP>
- <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1" HASH_CHAR="dcl">dcl\w*</SEQ_REGEXP>
-
- <KEYWORDS>
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+<!--
+DirectX FX Files Syntax Highlighting (Edit Mode) for jEdit
+Including: Preprocessor, HLSL and Shader Assembler up to shader version 3.0
+
+Author: Adam Sawicki
+- Homepage: http://regedit.gamedev.pl/
+- E-mail: sawickiap at poczta.onet.pl
+- IRC: #warsztat @ PolNet
+- Gadu-Gadu: 2272474
+
+-->
+
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=".,+-*/=<>?^&[]{}" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="indentNextLine" VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
+ </PROPS>
+
+ <RULES
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="((0[xX][0-9a-fA-F]+|\d+)[uUIL]?|\d+([eE]\d*)?[hHfF]?)">
+
+ <!-- C style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- preprocessor statements -->
+ <SEQ TYPE="KEYWORD2">##</SEQ>
+ <SEQ TYPE="KEYWORD2">#@</SEQ>
+ <EOL_SPAN TYPE="KEYWORD2" DELEGATE="Preprocessor">#</EOL_SPAN>
+
+ <!-- asm -->
+ <SPAN AT_WORD_START="TRUE" EXCLUDE_MATCH="FALSE" TYPE="KEYWORD1" DELEGATE="Asm">
+ <BEGIN>asm</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN AT_WORD_START="TRUE" EXCLUDE_MATCH="FALSE" TYPE="KEYWORD1" DELEGATE="Asm">
+ <BEGIN>ASM</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN AT_WORD_START="TRUE" EXCLUDE_MATCH="FALSE" TYPE="KEYWORD1" DELEGATE="Asm">
+ <BEGIN>Asm</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN AT_WORD_START="TRUE" EXCLUDE_MATCH="FALSE" TYPE="KEYWORD1" DELEGATE="Asm">
+ <BEGIN>asm_fragment</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- C style comment -->
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <!-- Operators - multi character -->
+ <SEQ TYPE="OPERATOR">++</SEQ>
+ <SEQ TYPE="OPERATOR">--</SEQ>
+ <SEQ TYPE="OPERATOR">&&</SEQ>
+ <SEQ TYPE="OPERATOR">||</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">::</SEQ>
+ <SEQ TYPE="OPERATOR"><<</SEQ>
+ <SEQ TYPE="OPERATOR"><<=</SEQ>
+ <SEQ TYPE="OPERATOR">>></SEQ>
+ <SEQ TYPE="OPERATOR">>>=</SEQ>
+ <SEQ TYPE="OPERATOR">...</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">*=</SEQ>
+ <SEQ TYPE="OPERATOR">/=</SEQ>
+ <SEQ TYPE="OPERATOR">+=</SEQ>
+ <SEQ TYPE="OPERATOR">-=</SEQ>
+ <SEQ TYPE="OPERATOR">%=</SEQ>
+ <SEQ TYPE="OPERATOR">&=</SEQ>
+ <SEQ TYPE="OPERATOR">|=</SEQ>
+ <SEQ TYPE="OPERATOR">^=</SEQ>
+ <SEQ TYPE="OPERATOR">-></SEQ>
+
+ <!-- Operators - single characters -->
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">(</MARK_PREVIOUS>
+
+ <!-- Swizzle operator for vectors/scalars (a.xyzw OR b.rgba), matrices (c._m00_m01 OR d._11_12) indexing -->
+ <SEQ_REGEXP TYPE="OPERATOR" HASH_CHAR=".">.(([xyzw]{1,4})|([rgba]{1,4})|((_m[0123][0123])+)|((_[1234][1234])+))(?!\p{Alnum})</SEQ_REGEXP>
+
+ <!-- Atomic, but complex types -->
+ <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="bool">bool[1234](x[1234])?\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="int">int[1234](x[1234])?\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="half">half[1234](x[1234])?\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="float">float[1234](x[1234])?\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="double">double[1234](x[1234])?\b</SEQ_REGEXP>
+
+ <!-- Semantics -->
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR=":">:\s*(register\s*\(\w+(\s*\,\s*\w+\s*)?\)|\w+)</SEQ_REGEXP>
+
+ <KEYWORDS>
+ <!-- Control flow keywords -->
+ <KEYWORD1>discard</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>typedef</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <!-- Other keywords -->
+ <KEYWORD1>compile</KEYWORD1>
+ <KEYWORD1>compile_fragment</KEYWORD1>
+ <KEYWORD1>register</KEYWORD1>
+ <KEYWORD1>sampler_state</KEYWORD1>
+ <KEYWORD1>stateblock_state</KEYWORD1>
+ <KEYWORD1>technique</KEYWORD1>
+ <KEYWORD1>Technique</KEYWORD1>
+ <KEYWORD1>TECHNIQUE</KEYWORD1>
+ <KEYWORD1>pass</KEYWORD1>
+ <KEYWORD1>Pass</KEYWORD1>
+ <KEYWORD1>PASS</KEYWORD1>
+ <KEYWORD1>decl</KEYWORD1>
+ <KEYWORD1>Decl</KEYWORD1>
+ <KEYWORD1>DECL</KEYWORD1>
+
+ <!-- Atomic type keywords -->
+ <KEYWORD2>void</KEYWORD2>
+ <KEYWORD2>bool</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>half</KEYWORD2>
+ <KEYWORD2>float</KEYWORD2>
+ <KEYWORD2>double</KEYWORD2>
+ <KEYWORD2>vector</KEYWORD2>
+ <KEYWORD2>matrix</KEYWORD2>
+
+ <!-- Object type keywords -->
+ <KEYWORD3>string</KEYWORD3>
+ <KEYWORD3>texture</KEYWORD3>
+ <KEYWORD3>texture1D</KEYWORD3>
+ <KEYWORD3>texture2D</KEYWORD3>
+ <KEYWORD3>texture3D</KEYWORD3>
+ <KEYWORD3>textureCUBE</KEYWORD3>
+ <KEYWORD3>sampler</KEYWORD3>
+ <KEYWORD3>sampler1D</KEYWORD3>
+ <KEYWORD3>sampler2D</KEYWORD3>
+ <KEYWORD3>sampler3D</KEYWORD3>
+ <KEYWORD3>samplerCUBE</KEYWORD3>
+ <KEYWORD3>pixelfragment</KEYWORD3>
+ <KEYWORD3>vertexfragment</KEYWORD3>
+ <KEYWORD3>pixelshader</KEYWORD3>
+ <KEYWORD3>vertexshader</KEYWORD3>
+ <KEYWORD3>stateblock</KEYWORD3>
+ <KEYWORD3>struct</KEYWORD3>
+
+ <!-- Usage keywords -->
+ <KEYWORD4>static</KEYWORD4>
+ <KEYWORD4>uniform</KEYWORD4>
+ <KEYWORD4>extern</KEYWORD4>
+ <KEYWORD4>volatile</KEYWORD4>
+ <KEYWORD4>inline</KEYWORD4>
+ <KEYWORD4>shared</KEYWORD4>
+ <KEYWORD4>const</KEYWORD4>
+ <KEYWORD4>row_major</KEYWORD4>
+ <KEYWORD4>column_major</KEYWORD4>
+ <KEYWORD4>in</KEYWORD4>
+ <KEYWORD4>inout</KEYWORD4>
+ <KEYWORD4>out</KEYWORD4>
+
+ <!-- Literals -->
+ <LITERAL1>false</LITERAL1>
+ <LITERAL1>true</LITERAL1>
+ <LITERAL1>NULL</LITERAL1>
+
+ <!-- Intrinsic functions -->
+ <LITERAL2>abs</LITERAL2>
+ <LITERAL2>acos</LITERAL2>
+ <LITERAL2>all</LITERAL2>
+ <LITERAL2>any</LITERAL2>
+ <LITERAL2>asin</LITERAL2>
+ <LITERAL2>atan</LITERAL2>
+ <LITERAL2>atan2</LITERAL2>
+ <LITERAL2>ceil</LITERAL2>
+ <LITERAL2>clamp</LITERAL2>
+ <LITERAL2>clip</LITERAL2>
+ <LITERAL2>cos</LITERAL2>
+ <LITERAL2>cosh</LITERAL2>
+ <LITERAL2>cross</LITERAL2>
+ <LITERAL2>D3DCOLORtoUBYTE4</LITERAL2>
+ <LITERAL2>ddx</LITERAL2>
+ <LITERAL2>ddy</LITERAL2>
+ <LITERAL2>degrees</LITERAL2>
+ <LITERAL2>determinant</LITERAL2>
+ <LITERAL2>distance</LITERAL2>
+ <LITERAL2>dot</LITERAL2>
+ <LITERAL2>exp</LITERAL2>
+ <LITERAL2>exp2</LITERAL2>
+ <LITERAL2>faceforward</LITERAL2>
+ <LITERAL2>floor</LITERAL2>
+ <LITERAL2>fmod</LITERAL2>
+ <LITERAL2>frac</LITERAL2>
+ <LITERAL2>frexp</LITERAL2>
+ <LITERAL2>fwidth</LITERAL2>
+ <LITERAL2>isfinite</LITERAL2>
+ <LITERAL2>isinf</LITERAL2>
+ <LITERAL2>isnan</LITERAL2>
+ <LITERAL2>ldexp</LITERAL2>
+ <LITERAL2>length</LITERAL2>
+ <LITERAL2>lerp</LITERAL2>
+ <LITERAL2>lit</LITERAL2>
+ <LITERAL2>log</LITERAL2>
+ <LITERAL2>log10</LITERAL2>
+ <LITERAL2>log2</LITERAL2>
+ <LITERAL2>max</LITERAL2>
+ <LITERAL2>min</LITERAL2>
+ <LITERAL2>modf</LITERAL2>
+ <LITERAL2>mul</LITERAL2>
+ <LITERAL2>noise</LITERAL2>
+ <LITERAL2>normalize</LITERAL2>
+ <LITERAL2>pow</LITERAL2>
+ <LITERAL2>radians</LITERAL2>
+ <LITERAL2>reflect</LITERAL2>
+ <LITERAL2>refract</LITERAL2>
+ <LITERAL2>round</LITERAL2>
+ <LITERAL2>rsqrt</LITERAL2>
+ <LITERAL2>saturate</LITERAL2>
+ <LITERAL2>sign</LITERAL2>
+ <LITERAL2>sin</LITERAL2>
+ <LITERAL2>sincos</LITERAL2>
+ <LITERAL2>sinh</LITERAL2>
+ <LITERAL2>smoothstep</LITERAL2>
+ <LITERAL2>sqrt</LITERAL2>
+ <LITERAL2>step</LITERAL2>
+ <LITERAL2>tan</LITERAL2>
+ <LITERAL2>tanh</LITERAL2>
+ <LITERAL2>transpose</LITERAL2>
+
+ <!-- Intrinsic functions - sampling -->
+ <LITERAL3>tex1D</LITERAL3>
+ <LITERAL3>tex1Dgrad</LITERAL3>
+ <LITERAL3>tex1Dbias</LITERAL3>
+ <LITERAL3>tex1Dgrad</LITERAL3>
+ <LITERAL3>tex1Dlod</LITERAL3>
+ <LITERAL3>tex1Dproj</LITERAL3>
+ <LITERAL3>tex2D</LITERAL3>
+ <LITERAL3>tex2D</LITERAL3>
+ <LITERAL3>tex2Dbias</LITERAL3>
+ <LITERAL3>tex2Dgrad</LITERAL3>
+ <LITERAL3>tex2Dlod</LITERAL3>
+ <LITERAL3>tex2Dproj</LITERAL3>
+ <LITERAL3>tex3D</LITERAL3>
+ <LITERAL3>tex3D</LITERAL3>
+ <LITERAL3>tex3Dbias</LITERAL3>
+ <LITERAL3>tex3Dgrad</LITERAL3>
+ <LITERAL3>tex3Dlod</LITERAL3>
+ <LITERAL3>tex3Dproj</LITERAL3>
+ <LITERAL3>texCUBE</LITERAL3>
+ <LITERAL3>texCUBE</LITERAL3>
+ <LITERAL3>texCUBEbias</LITERAL3>
+ <LITERAL3>texCUBEgrad</LITERAL3>
+ <LITERAL3>texCUBElod</LITERAL3>
+ <LITERAL3>texCUBEproj</LITERAL3>
+
+ <!-- Reserved but unused words -->
+ <INVALID>auto</INVALID>
+ <INVALID>break</INVALID>
+ <INVALID>case</INVALID>
+ <INVALID>catch</INVALID>
+ <INVALID>char</INVALID>
+ <INVALID>class</INVALID>
+ <INVALID>const_cast</INVALID>
+ <INVALID>continue</INVALID>
+ <INVALID>default</INVALID>
+ <INVALID>delete</INVALID>
+ <INVALID>dynamic_cast</INVALID>
+ <INVALID>enum</INVALID>
+ <INVALID>explicit</INVALID>
+ <INVALID>friend</INVALID>
+ <INVALID>goto</INVALID>
+ <INVALID>long</INVALID>
+ <INVALID>mutable</INVALID>
+ <INVALID>namespace</INVALID>
+ <INVALID>new</INVALID>
+ <INVALID>operator</INVALID>
+ <INVALID>private</INVALID>
+ <INVALID>protected</INVALID>
+ <INVALID>public</INVALID>
+ <INVALID>reinterpret_cast</INVALID>
+ <INVALID>short</INVALID>
+ <INVALID>signed</INVALID>
+ <INVALID>sizeof</INVALID>
+ <INVALID>static_cast</INVALID>
+ <INVALID>switch</INVALID>
+ <INVALID>template</INVALID>
+ <INVALID>this</INVALID>
+ <INVALID>throw</INVALID>
+ <INVALID>try</INVALID>
+ <INVALID>typename</INVALID>
+ <INVALID>union</INVALID>
+ <INVALID>unsigned</INVALID>
+ <INVALID>using</INVALID>
+ <INVALID>virtual</INVALID>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="Include" DEFAULT="KEYWORD2" />
+
+ <RULES
+ SET="Preprocessor"
+ DEFAULT="KEYWORD2"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="((0x[[:xdigit:]]+|[[:digit:]]+)[uUIL]?|[[:digit:]]+([eE][[:digit:]]*)?[hHfF]?)">
+
+ <!-- C style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- this is a hack so that #include <net/if.h> does not get the if highlighted -->
+ <EOL_SPAN TYPE="MARKUP" DELEGATE="Include">include</EOL_SPAN>
+
+ <KEYWORDS>
+ <!-- Directives -->
+ <MARKUP>define</MARKUP>
+ <MARKUP>elif</MARKUP>
+ <MARKUP>else</MARKUP>
+ <MARKUP>endif</MARKUP>
+ <MARKUP>error</MARKUP>
+ <MARKUP>if</MARKUP>
+ <MARKUP>ifdef</MARKUP>
+ <MARKUP>ifndef</MARKUP>
+ <MARKUP>line</MARKUP>
+ <MARKUP>pragma</MARKUP>
+ <MARKUP>undef</MARKUP>
+
+ <!-- Other -->
+ <LITERAL1>pack_matrix</LITERAL1>
+ <LITERAL1>warning</LITERAL1>
+ <LITERAL1>def</LITERAL1>
+ <LITERAL1>defined</LITERAL1>
+ <LITERAL1>D3DX</LITERAL1>
+ <LITERAL1>D3DX_VERSION</LITERAL1>
+ <LITERAL1>DIRECT3D</LITERAL1>
+ <LITERAL1>DIRECT3D_VERSION</LITERAL1>
+ <LITERAL1>__FILE__</LITERAL1>
+ <LITERAL1>__LINE__</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="Asm"
+ DEFAULT="NULL"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="((0x[[:xdigit:]]+|[[:digit:]]+)[uUIL]?|[[:digit:]]+([eE][[:digit:]]*)?[hHfF]?)">
+
+ <!-- Starting... -->
+ <SEQ TYPE="OPERATOR">{</SEQ>
+
+ <!-- Comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">;</EOL_SPAN>
+
+ <!-- Operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <!-- Swizzle operator -->
+ <SEQ_REGEXP TYPE="OPERATOR" HASH_CHAR=".">.(([xyzw]{1,4}))</SEQ_REGEXP>
+
+ <!-- Instruction -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="abs">abs(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="add">add(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="bem">bem(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="break_comp">break_comp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="breakp">breakp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="callnz">callnz(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="cmp">cmp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="cnd">cnd(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="crs">crs(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dp2add">dp2add(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dp3">dp3(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dp4">dp4(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dst">dst(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dsx">dsx(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="dsy">dsy(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="else">else(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="endif">endif(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="endloop">endloop(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="endrep">endrep(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="exp">exp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="frc">frc(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="if">if(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="label">label(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="lit">lit(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="logp">logp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="loop">loop(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="lrp">lrp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m3x2">m3x2(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m3x3">m3x3(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m3x4">m3x4(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m4x3">m4x3(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="m4x4">m4x4(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="mad">mad(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="mov">mov(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="max">max(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="min">min(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="mova">mova(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="mul">mul(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="nop">nop(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="nrm">nrm(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="phase">phase(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="pow">pow(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="rcp">rcp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="rep">rep(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="ret">ret(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="rsq">rsq(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="setp_comp">setp_comp(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="sge">sge(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="sgn">sgn(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="sincos">sincos(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="slt">slt(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="sub">sub(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+ <!-- (seen in preshader -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="FUNCTION" HASH_CHAR="neg">neg(_pp|_sat|_x2|_x4|_x8|_bx2|_d2|_d4|_d8)*\b</SEQ_REGEXP>
+
+ <!-- Texturing instruction -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2" HASH_CHAR="tex">tex\w*</SEQ_REGEXP>
+
+ <!-- Main instruction -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1" HASH_CHAR="ps">ps\w*</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1" HASH_CHAR="vs">vs\w*</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1" HASH_CHAR="def">def\w*</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1" HASH_CHAR="dcl">dcl\w*</SEQ_REGEXP>
+
+ <KEYWORDS>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/htaccess.xml b/jEdit/modes/htaccess.xml
index 253e4f1..f805f4c 100644
--- a/jEdit/modes/htaccess.xml
+++ b/jEdit/modes/htaccess.xml
@@ -1,567 +1,567 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="noWordSep" VALUE="-" />
- </PROPS>
- <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="TRUE">
-
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
- <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
- <END><![CDATA[</$1>]]></END>
- </SPAN_REGEXP>
-
- <KEYWORDS>
-
- <KEYWORD1>AcceptPathInfo</KEYWORD1>
- <KEYWORD1>Action</KEYWORD1>
- <KEYWORD1>AddAlt</KEYWORD1>
- <KEYWORD1>AddAltByEncoding</KEYWORD1>
- <KEYWORD1>AddAltByType</KEYWORD1>
- <KEYWORD1>AddCharset</KEYWORD1>
- <KEYWORD1>AddDefaultCharset</KEYWORD1>
- <KEYWORD1>AddDescription</KEYWORD1>
- <KEYWORD1>AddEncoding</KEYWORD1>
- <KEYWORD1>AddHandler</KEYWORD1>
- <KEYWORD1>AddIcon</KEYWORD1>
- <KEYWORD1>AddIconByEncoding</KEYWORD1>
- <KEYWORD1>AddIconByType</KEYWORD1>
- <KEYWORD1>AddInputFilter</KEYWORD1>
- <KEYWORD1>AddLanguage</KEYWORD1>
- <KEYWORD1>AddOutputFilter</KEYWORD1>
- <KEYWORD1>AddOutputFilterByType</KEYWORD1>
- <KEYWORD1>AddType</KEYWORD1>
- <KEYWORD1>Allow</KEYWORD1>
- <KEYWORD1>Anonymous</KEYWORD1>
- <KEYWORD1>Anonymous_Authoritative</KEYWORD1>
- <KEYWORD1>Anonymous_LogEmail</KEYWORD1>
- <KEYWORD1>Anonymous_MustGiveEmail</KEYWORD1>
- <KEYWORD1>Anonymous_NoUserID</KEYWORD1>
- <KEYWORD1>Anonymous_VerifyEmail</KEYWORD1>
- <KEYWORD1>AuthAuthoritative</KEYWORD1>
- <KEYWORD1>AuthBasicAuthoritative</KEYWORD1>
- <KEYWORD1>AuthBasicProvider</KEYWORD1>
- <KEYWORD1>AuthDBMAuthoritative</KEYWORD1>
- <KEYWORD1>AuthDBMGroupFile</KEYWORD1>
- <KEYWORD1>AuthDBMType</KEYWORD1>
- <KEYWORD1>AuthDBMUserFile</KEYWORD1>
- <KEYWORD1>AuthDigestAlgorithm</KEYWORD1>
- <KEYWORD1>AuthDigestDomain</KEYWORD1>
- <KEYWORD1>AuthDigestFile</KEYWORD1>
- <KEYWORD1>AuthDigestGroupFile</KEYWORD1>
- <KEYWORD1>AuthDigestNonceFormat</KEYWORD1>
- <KEYWORD1>AuthDigestNonceLifetime</KEYWORD1>
- <KEYWORD1>AuthDigestQop</KEYWORD1>
- <KEYWORD1>AuthGroupFile</KEYWORD1>
- <KEYWORD1>AuthLDAPAuthoritative</KEYWORD1>
- <KEYWORD1>AuthLDAPBindDN</KEYWORD1>
- <KEYWORD1>AuthLDAPBindPassword</KEYWORD1>
- <KEYWORD1>AuthLDAPCompareDNOnServer</KEYWORD1>
- <KEYWORD1>AuthLDAPDereferenceAliases</KEYWORD1>
- <KEYWORD1>AuthLDAPEnabled</KEYWORD1>
- <KEYWORD1>AuthLDAPFrontPageHack</KEYWORD1>
- <KEYWORD1>AuthLDAPGroupAttribute</KEYWORD1>
- <KEYWORD1>AuthLDAPGroupAttributeIsDN</KEYWORD1>
- <KEYWORD1>AuthLDAPRemoteUserIsDN</KEYWORD1>
- <KEYWORD1>AuthLDAPUrl</KEYWORD1>
- <KEYWORD1>AuthName</KEYWORD1>
- <KEYWORD1>AuthType</KEYWORD1>
- <KEYWORD1>AuthUserFile</KEYWORD1>
- <KEYWORD1>BrowserMatch</KEYWORD1>
- <KEYWORD1>BrowserMatchNoCase</KEYWORD1>
- <KEYWORD1>CGIMapExtension</KEYWORD1>
- <KEYWORD1>CharsetDefault</KEYWORD1>
- <KEYWORD1>CharsetOptions</KEYWORD1>
- <KEYWORD1>CharsetSourceEnc</KEYWORD1>
- <KEYWORD1>CheckSpelling</KEYWORD1>
- <KEYWORD1>ContentDigest</KEYWORD1>
- <KEYWORD1>CookieDomain</KEYWORD1>
- <KEYWORD1>CookieExpires</KEYWORD1>
- <KEYWORD1>CookieName</KEYWORD1>
- <KEYWORD1>CookieStyle</KEYWORD1>
- <KEYWORD1>CookieTracking</KEYWORD1>
- <KEYWORD1>DefaultIcon</KEYWORD1>
- <KEYWORD1>DefaultLanguage</KEYWORD1>
- <KEYWORD1>DefaultType</KEYWORD1>
- <KEYWORD1>Deny</KEYWORD1>
- <KEYWORD1>DirectoryIndex</KEYWORD1>
- <KEYWORD1>DirectorySlash</KEYWORD1>
- <KEYWORD1>EnableMMAP</KEYWORD1>
- <KEYWORD1>EnableSendfile</KEYWORD1>
- <KEYWORD1>ErrorDocument</KEYWORD1>
- <KEYWORD1>Example</KEYWORD1>
- <KEYWORD1>ExpiresActive</KEYWORD1>
- <KEYWORD1>ExpiresByType</KEYWORD1>
- <KEYWORD1>ExpiresDefault</KEYWORD1>
- <KEYWORD1>FileETag</KEYWORD1>
- <KEYWORD1>ForceLanguagePriority</KEYWORD1>
- <KEYWORD1>ForceType</KEYWORD1>
- <KEYWORD1>Header</KEYWORD1>
- <KEYWORD1>HeaderName</KEYWORD1>
- <KEYWORD1>ImapBase</KEYWORD1>
- <KEYWORD1>ImapDefault</KEYWORD1>
- <KEYWORD1>ImapMenu</KEYWORD1>
- <KEYWORD1>IndexIgnore</KEYWORD1>
- <KEYWORD1>IndexOptions</KEYWORD1>
- <KEYWORD1>IndexOrderDefault</KEYWORD1>
- <KEYWORD1>ISAPIAppendLogToErrors</KEYWORD1>
- <KEYWORD1>ISAPIAppendLogToQuery</KEYWORD1>
- <KEYWORD1>ISAPIFakeAsync</KEYWORD1>
- <KEYWORD1>ISAPILogNotSupported</KEYWORD1>
- <KEYWORD1>ISAPIReadAheadBuffer</KEYWORD1>
- <KEYWORD1>LanguagePriority</KEYWORD1>
- <KEYWORD1>LimitRequestBody</KEYWORD1>
- <KEYWORD1>LimitXMLRequestBody</KEYWORD1>
- <KEYWORD1>MetaDir</KEYWORD1>
- <KEYWORD1>MetaFiles</KEYWORD1>
- <KEYWORD1>MetaSuffix</KEYWORD1>
- <KEYWORD1>MultiviewsMatch</KEYWORD1>
- <KEYWORD1>Options</KEYWORD1>
- <KEYWORD1>Order</KEYWORD1>
- <KEYWORD1>PassEnv</KEYWORD1>
- <KEYWORD1>ReadmeName</KEYWORD1>
- <KEYWORD1>Redirect</KEYWORD1>
- <KEYWORD1>RedirectMatch</KEYWORD1>
- <KEYWORD1>RedirectPermanent</KEYWORD1>
- <KEYWORD1>RedirectTemp</KEYWORD1>
- <KEYWORD1>RemoveCharset</KEYWORD1>
- <KEYWORD1>RemoveEncoding</KEYWORD1>
- <KEYWORD1>RemoveHandler</KEYWORD1>
- <KEYWORD1>RemoveInputFilter</KEYWORD1>
- <KEYWORD1>RemoveLanguage</KEYWORD1>
- <KEYWORD1>RemoveOutputFilter</KEYWORD1>
- <KEYWORD1>RemoveType</KEYWORD1>
- <KEYWORD1>RequestHeader</KEYWORD1>
- <KEYWORD1>Require</KEYWORD1>
- <KEYWORD1>RewriteBase</KEYWORD1>
- <KEYWORD1>RewriteCond</KEYWORD1>
- <KEYWORD1>RewriteEngine</KEYWORD1>
- <KEYWORD1>RewriteOptions</KEYWORD1>
- <KEYWORD1>RewriteRule</KEYWORD1>
- <KEYWORD1>RLimitCPU</KEYWORD1>
- <KEYWORD1>RLimitMEM</KEYWORD1>
- <KEYWORD1>RLimitNPROC</KEYWORD1>
- <KEYWORD1>Satisfy</KEYWORD1>
- <KEYWORD1>ScriptInterpreterSource</KEYWORD1>
- <KEYWORD1>ServerSignature</KEYWORD1>
- <KEYWORD1>SetEnv</KEYWORD1>
- <KEYWORD1>SetEnvIf</KEYWORD1>
- <KEYWORD1>SetEnvIfNoCase</KEYWORD1>
- <KEYWORD1>SetHandler</KEYWORD1>
- <KEYWORD1>SetInputFilter</KEYWORD1>
- <KEYWORD1>SetOutputFilter</KEYWORD1>
- <KEYWORD1>SSIErrorMsg</KEYWORD1>
- <KEYWORD1>SSITimeFormat</KEYWORD1>
- <KEYWORD1>SSLCipherSuite</KEYWORD1>
- <KEYWORD1>SSLOptions</KEYWORD1>
- <KEYWORD1>SSLProxyCipherSuite</KEYWORD1>
- <KEYWORD1>SSLProxyVerify</KEYWORD1>
- <KEYWORD1>SSLProxyVerifyDepth</KEYWORD1>
- <KEYWORD1>SSLRequire</KEYWORD1>
- <KEYWORD1>SSLRequireSSL</KEYWORD1>
- <KEYWORD1>SSLUserName</KEYWORD1>
- <KEYWORD1>SSLVerifyClient</KEYWORD1>
- <KEYWORD1>SSLVerifyDepth</KEYWORD1>
- <KEYWORD1>UnsetEnv</KEYWORD1>
- <KEYWORD1>XBitHack</KEYWORD1>
-
- <LITERAL3>Basic</LITERAL3>
- <LITERAL3>Digest</LITERAL3>
- <LITERAL3>None</LITERAL3>
- <LITERAL3>Off</LITERAL3>
- <LITERAL3>On</LITERAL3>
- </KEYWORDS>
-
- </RULES>
-
- <RULES SET="DIRECTIVE" DEFAULT="NULL" IGNORE_CASE="TRUE">
-
- <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
- <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
- <END><![CDATA[</$1>]]></END>
- </SPAN_REGEXP>
-
- <KEYWORDS>
-
- <KEYWORD2>AcceptMutex</KEYWORD2>
- <KEYWORD2>AcceptPathInfo</KEYWORD2>
- <KEYWORD2>AccessFileName</KEYWORD2>
- <KEYWORD2>Action</KEYWORD2>
- <KEYWORD2>AddAlt</KEYWORD2>
- <KEYWORD2>AddAltByEncoding</KEYWORD2>
- <KEYWORD2>AddAltByType</KEYWORD2>
- <KEYWORD2>AddCharset</KEYWORD2>
- <KEYWORD2>AddDefaultCharset</KEYWORD2>
- <KEYWORD2>AddDescription</KEYWORD2>
- <KEYWORD2>AddEncoding</KEYWORD2>
- <KEYWORD2>AddHandler</KEYWORD2>
- <KEYWORD2>AddIcon</KEYWORD2>
- <KEYWORD2>AddIconByEncoding</KEYWORD2>
- <KEYWORD2>AddIconByType</KEYWORD2>
- <KEYWORD2>AddInputFilter</KEYWORD2>
- <KEYWORD2>AddLanguage</KEYWORD2>
- <KEYWORD2>AddModuleInfo</KEYWORD2>
- <KEYWORD2>AddOutputFilter</KEYWORD2>
- <KEYWORD2>AddOutputFilterByType</KEYWORD2>
- <KEYWORD2>AddType</KEYWORD2>
- <KEYWORD2>Alias</KEYWORD2>
- <KEYWORD2>AliasMatch</KEYWORD2>
- <KEYWORD2>Allow</KEYWORD2>
- <KEYWORD2>AllowCONNECT</KEYWORD2>
- <KEYWORD2>AllowEncodedSlashes</KEYWORD2>
- <KEYWORD2>AllowOverride</KEYWORD2>
- <KEYWORD2>Anonymous</KEYWORD2>
- <KEYWORD2>Anonymous_Authoritative</KEYWORD2>
- <KEYWORD2>Anonymous_LogEmail</KEYWORD2>
- <KEYWORD2>Anonymous_MustGiveEmail</KEYWORD2>
- <KEYWORD2>Anonymous_NoUserID</KEYWORD2>
- <KEYWORD2>Anonymous_VerifyEmail</KEYWORD2>
- <KEYWORD2>AuthAuthoritative</KEYWORD2>
- <KEYWORD2>AuthBasicAuthoritative</KEYWORD2>
- <KEYWORD2>AuthBasicProvider</KEYWORD2>
- <KEYWORD2>AuthDBMAuthoritative</KEYWORD2>
- <KEYWORD2>AuthDBMGroupFile</KEYWORD2>
- <KEYWORD2>AuthDBMType</KEYWORD2>
- <KEYWORD2>AuthDBMUserFile</KEYWORD2>
- <KEYWORD2>AuthDigestAlgorithm</KEYWORD2>
- <KEYWORD2>AuthDigestDomain</KEYWORD2>
- <KEYWORD2>AuthDigestFile</KEYWORD2>
- <KEYWORD2>AuthDigestGroupFile</KEYWORD2>
- <KEYWORD2>AuthDigestNcCheck</KEYWORD2>
- <KEYWORD2>AuthDigestNonceFormat</KEYWORD2>
- <KEYWORD2>AuthDigestNonceLifetime</KEYWORD2>
- <KEYWORD2>AuthDigestQop</KEYWORD2>
- <KEYWORD2>AuthDigestShmemSize</KEYWORD2>
- <KEYWORD2>AuthGroupFile</KEYWORD2>
- <KEYWORD2>AuthLDAPAuthoritative</KEYWORD2>
- <KEYWORD2>AuthLDAPBindDN</KEYWORD2>
- <KEYWORD2>AuthLDAPBindPassword</KEYWORD2>
- <KEYWORD2>AuthLDAPCharsetConfig</KEYWORD2>
- <KEYWORD2>AuthLDAPCompareDNOnServer</KEYWORD2>
- <KEYWORD2>AuthLDAPDereferenceAliases</KEYWORD2>
- <KEYWORD2>AuthLDAPEnabled</KEYWORD2>
- <KEYWORD2>AuthLDAPFrontPageHack</KEYWORD2>
- <KEYWORD2>AuthLDAPGroupAttribute</KEYWORD2>
- <KEYWORD2>AuthLDAPGroupAttributeIsDN</KEYWORD2>
- <KEYWORD2>AuthLDAPRemoteUserIsDN</KEYWORD2>
- <KEYWORD2>AuthLDAPUrl</KEYWORD2>
- <KEYWORD2>AuthName</KEYWORD2>
- <KEYWORD2>AuthType</KEYWORD2>
- <KEYWORD2>AuthUserFile</KEYWORD2>
- <KEYWORD2>BS2000Account</KEYWORD2>
- <KEYWORD2>BrowserMatch</KEYWORD2>
- <KEYWORD2>BrowserMatchNoCase</KEYWORD2>
- <KEYWORD2>CGIMapExtension</KEYWORD2>
- <KEYWORD2>CacheDefaultExpire</KEYWORD2>
- <KEYWORD2>CacheDirLength</KEYWORD2>
- <KEYWORD2>CacheDirLevels</KEYWORD2>
- <KEYWORD2>CacheDisable</KEYWORD2>
- <KEYWORD2>CacheEnable</KEYWORD2>
- <KEYWORD2>CacheExpiryCheck</KEYWORD2>
- <KEYWORD2>CacheFile</KEYWORD2>
- <KEYWORD2>CacheForceCompletion</KEYWORD2>
- <KEYWORD2>CacheGcClean</KEYWORD2>
- <KEYWORD2>CacheGcDaily</KEYWORD2>
- <KEYWORD2>CacheGcInterval</KEYWORD2>
- <KEYWORD2>CacheGcMemUsage</KEYWORD2>
- <KEYWORD2>CacheGcUnused</KEYWORD2>
- <KEYWORD2>CacheIgnoreCacheControl</KEYWORD2>
- <KEYWORD2>CacheIgnoreNoLastMod</KEYWORD2>
- <KEYWORD2>CacheLastModifiedFactor</KEYWORD2>
- <KEYWORD2>CacheMaxExpire</KEYWORD2>
- <KEYWORD2>CacheMaxFileSize</KEYWORD2>
- <KEYWORD2>CacheMinFileSize</KEYWORD2>
- <KEYWORD2>CacheNegotiatedDocs</KEYWORD2>
- <KEYWORD2>CacheRoot</KEYWORD2>
- <KEYWORD2>CacheSize</KEYWORD2>
- <KEYWORD2>CacheTimeMargin</KEYWORD2>
- <KEYWORD2>CharsetDefault</KEYWORD2>
- <KEYWORD2>CharsetOptions</KEYWORD2>
- <KEYWORD2>CharsetSourceEnc</KEYWORD2>
- <KEYWORD2>CheckSpelling</KEYWORD2>
- <KEYWORD2>ChildPerUserID</KEYWORD2>
- <KEYWORD2>ContentDigest</KEYWORD2>
- <KEYWORD2>CookieDomain</KEYWORD2>
- <KEYWORD2>CookieExpires</KEYWORD2>
- <KEYWORD2>CookieLog</KEYWORD2>
- <KEYWORD2>CookieName</KEYWORD2>
- <KEYWORD2>CookieStyle</KEYWORD2>
- <KEYWORD2>CookieTracking</KEYWORD2>
- <KEYWORD2>CoreDumpDirectory</KEYWORD2>
- <KEYWORD2>CustomLog</KEYWORD2>
- <KEYWORD2>Dav</KEYWORD2>
- <KEYWORD2>DavDepthInfinity</KEYWORD2>
- <KEYWORD2>DavLockDB</KEYWORD2>
- <KEYWORD2>DavMinTimeout</KEYWORD2>
- <KEYWORD2>DefaultIcon</KEYWORD2>
- <KEYWORD2>DefaultLanguage</KEYWORD2>
- <KEYWORD2>DefaultType</KEYWORD2>
- <KEYWORD2>DeflateBufferSize</KEYWORD2>
- <KEYWORD2>DeflateCompressionLevel</KEYWORD2>
- <KEYWORD2>DeflateFilterNote</KEYWORD2>
- <KEYWORD2>DeflateMemLevel</KEYWORD2>
- <KEYWORD2>DeflateWindowSize</KEYWORD2>
- <KEYWORD2>Deny</KEYWORD2>
- <KEYWORD2>DirectoryIndex</KEYWORD2>
- <KEYWORD1>DirectorySlash</KEYWORD1>
- <KEYWORD2>DocumentRoot</KEYWORD2>
- <KEYWORD2>EnableMMAP</KEYWORD2>
- <KEYWORD2>EnableSendfile</KEYWORD2>
- <KEYWORD2>ErrorDocument</KEYWORD2>
- <KEYWORD2>ErrorLog</KEYWORD2>
- <KEYWORD2>Example</KEYWORD2>
- <KEYWORD2>ExpiresActive</KEYWORD2>
- <KEYWORD2>ExpiresByType</KEYWORD2>
- <KEYWORD2>ExpiresDefault</KEYWORD2>
- <KEYWORD2>ExtFilterDefine</KEYWORD2>
- <KEYWORD2>ExtFilterOptions</KEYWORD2>
- <KEYWORD2>ExtendedStatus</KEYWORD2>
- <KEYWORD2>FileETag</KEYWORD2>
- <KEYWORD2>ForceLanguagePriority</KEYWORD2>
- <KEYWORD2>ForceType</KEYWORD2>
- <KEYWORD2>Group</KEYWORD2>
- <KEYWORD2>Header</KEYWORD2>
- <KEYWORD2>HeaderName</KEYWORD2>
- <KEYWORD2>HostnameLookups</KEYWORD2>
- <KEYWORD2>ISAPIAppendLogToErrors</KEYWORD2>
- <KEYWORD2>ISAPIAppendLogToQuery</KEYWORD2>
- <KEYWORD2>ISAPICacheFile</KEYWORD2>
- <KEYWORD2>ISAPIFakeAsync</KEYWORD2>
- <KEYWORD2>ISAPILogNotSupported</KEYWORD2>
- <KEYWORD2>ISAPIReadAheadBuffer</KEYWORD2>
- <KEYWORD2>IdentityCheck</KEYWORD2>
- <KEYWORD2>ImapBase</KEYWORD2>
- <KEYWORD2>ImapDefault</KEYWORD2>
- <KEYWORD2>ImapMenu</KEYWORD2>
- <KEYWORD2>Include</KEYWORD2>
- <KEYWORD2>IndexIgnore</KEYWORD2>
- <KEYWORD2>IndexOptions</KEYWORD2>
- <KEYWORD2>IndexOrderDefault</KEYWORD2>
- <KEYWORD2>KeepAlive</KEYWORD2>
- <KEYWORD2>KeepAliveTimeout</KEYWORD2>
- <KEYWORD2>LDAPCacheEntries</KEYWORD2>
- <KEYWORD2>LDAPCacheTTL</KEYWORD2>
- <KEYWORD2>LDAPOpCacheEntries</KEYWORD2>
- <KEYWORD2>LDAPOpCacheTTL</KEYWORD2>
- <KEYWORD2>LDAPSharedCacheSize</KEYWORD2>
- <KEYWORD2>LDAPTrustedCA</KEYWORD2>
- <KEYWORD2>LDAPTrustedCAType</KEYWORD2>
- <KEYWORD2>LanguagePriority</KEYWORD2>
- <KEYWORD2>LimitInternalRecursion</KEYWORD2>
- <KEYWORD2>LimitRequestBody</KEYWORD2>
- <KEYWORD2>LimitRequestFields</KEYWORD2>
- <KEYWORD2>LimitRequestFieldsize</KEYWORD2>
- <KEYWORD2>LimitRequestLine</KEYWORD2>
- <KEYWORD2>LimitXMLRequestBody</KEYWORD2>
- <KEYWORD2>Listen</KEYWORD2>
- <KEYWORD2>ListenBacklog</KEYWORD2>
- <KEYWORD2>LoadFile</KEYWORD2>
- <KEYWORD2>LoadModule</KEYWORD2>
- <KEYWORD2>LockFile</KEYWORD2>
- <KEYWORD2>LogFormat</KEYWORD2>
- <KEYWORD2>LogLevel</KEYWORD2>
- <KEYWORD2>MCacheMaxObjectCount</KEYWORD2>
- <KEYWORD2>MCacheMaxObjectSize</KEYWORD2>
- <KEYWORD2>MCacheMaxStreamingBuffer</KEYWORD2>
- <KEYWORD2>MCacheMinObjectSize</KEYWORD2>
- <KEYWORD2>MCacheRemovalAlgorithm</KEYWORD2>
- <KEYWORD2>MCacheSize</KEYWORD2>
- <KEYWORD2>MMapFile</KEYWORD2>
- <KEYWORD2>MaxClients</KEYWORD2>
- <KEYWORD2>MaxKeepAliveRequests</KEYWORD2>
- <KEYWORD2>MaxMemFree</KEYWORD2>
- <KEYWORD2>MaxRequestsPerChild</KEYWORD2>
- <KEYWORD2>MaxRequestsPerThread</KEYWORD2>
- <KEYWORD2>MaxSpareServers</KEYWORD2>
- <KEYWORD2>MaxSpareThreads</KEYWORD2>
- <KEYWORD2>MaxThreads</KEYWORD2>
- <KEYWORD2>MaxThreadsPerChild</KEYWORD2>
- <KEYWORD2>MetaDir</KEYWORD2>
- <KEYWORD2>MetaFiles</KEYWORD2>
- <KEYWORD2>MetaSuffix</KEYWORD2>
- <KEYWORD2>MimeMagicFile</KEYWORD2>
- <KEYWORD2>MinSpareServers</KEYWORD2>
- <KEYWORD2>MinSpareThreads</KEYWORD2>
- <KEYWORD2>ModMimeUsePathInfo</KEYWORD2>
- <KEYWORD2>MultiviewsMatch</KEYWORD2>
- <KEYWORD2>NWSSLTrustedCerts</KEYWORD2>
- <KEYWORD2>NameVirtualHost</KEYWORD2>
- <KEYWORD2>NoProxy</KEYWORD2>
- <KEYWORD2>NumServers</KEYWORD2>
- <KEYWORD2>Options</KEYWORD2>
- <KEYWORD2>Order</KEYWORD2>
- <KEYWORD2>PassEnv</KEYWORD2>
- <KEYWORD2>PidFile</KEYWORD2>
- <KEYWORD2>ProtocolEcho</KEYWORD2>
- <KEYWORD2>ProxyBadHeader</KEYWORD2>
- <KEYWORD2>ProxyBlock</KEYWORD2>
- <KEYWORD2>ProxyDomain</KEYWORD2>
- <KEYWORD2>ProxyErrorOverride</KEYWORD2>
- <KEYWORD2>ProxyIOBufferSize</KEYWORD2>
- <KEYWORD2>ProxyMaxForwards</KEYWORD2>
- <KEYWORD2>ProxyPass</KEYWORD2>
- <KEYWORD2>ProxyPassReverse</KEYWORD2>
- <KEYWORD2>ProxyPreserveHost</KEYWORD2>
- <KEYWORD2>ProxyReceiveBufferSize</KEYWORD2>
- <KEYWORD2>ProxyRemote</KEYWORD2>
- <KEYWORD2>ProxyRemoteMatch</KEYWORD2>
- <KEYWORD2>ProxyRequests</KEYWORD2>
- <KEYWORD2>ProxyTimeout</KEYWORD2>
- <KEYWORD2>ProxyVia</KEYWORD2>
- <KEYWORD2>RLimitCPU</KEYWORD2>
- <KEYWORD2>RLimitMEM</KEYWORD2>
- <KEYWORD2>RLimitNPROC</KEYWORD2>
- <KEYWORD2>ReadmeName</KEYWORD2>
- <KEYWORD2>Redirect</KEYWORD2>
- <KEYWORD2>RedirectMatch</KEYWORD2>
- <KEYWORD2>RedirectPermanent</KEYWORD2>
- <KEYWORD2>RedirectTemp</KEYWORD2>
- <KEYWORD2>RemoveCharset</KEYWORD2>
- <KEYWORD2>RemoveEncoding</KEYWORD2>
- <KEYWORD2>RemoveHandler</KEYWORD2>
- <KEYWORD2>RemoveInputFilter</KEYWORD2>
- <KEYWORD2>RemoveLanguage</KEYWORD2>
- <KEYWORD2>RemoveOutputFilter</KEYWORD2>
- <KEYWORD2>RemoveType</KEYWORD2>
- <KEYWORD2>RequestHeader</KEYWORD2>
- <KEYWORD2>Require</KEYWORD2>
- <KEYWORD2>RewriteBase</KEYWORD2>
- <KEYWORD2>RewriteCond</KEYWORD2>
- <KEYWORD2>RewriteEngine</KEYWORD2>
- <KEYWORD2>RewriteLock</KEYWORD2>
- <KEYWORD2>RewriteLog</KEYWORD2>
- <KEYWORD2>RewriteLogLevel</KEYWORD2>
- <KEYWORD2>RewriteMap</KEYWORD2>
- <KEYWORD2>RewriteOptions</KEYWORD2>
- <KEYWORD2>RewriteRule</KEYWORD2>
- <KEYWORD2>SSIEndTag</KEYWORD2>
- <KEYWORD2>SSIErrorMsg</KEYWORD2>
- <KEYWORD2>SSIStartTag</KEYWORD2>
- <KEYWORD2>SSITimeFormat</KEYWORD2>
- <KEYWORD2>SSIUndefinedEcho</KEYWORD2>
- <KEYWORD2>SSLCACertificateFile</KEYWORD2>
- <KEYWORD2>SSLCACertificatePath</KEYWORD2>
- <KEYWORD2>SSLCARevocationFile</KEYWORD2>
- <KEYWORD2>SSLCARevocationPath</KEYWORD2>
- <KEYWORD2>SSLCertificateChainFile</KEYWORD2>
- <KEYWORD2>SSLCertificateFile</KEYWORD2>
- <KEYWORD2>SSLCertificateKeyFile</KEYWORD2>
- <KEYWORD2>SSLCipherSuite</KEYWORD2>
- <KEYWORD2>SSLEngine</KEYWORD2>
- <KEYWORD2>SSLMutex</KEYWORD2>
- <KEYWORD2>SSLOptions</KEYWORD2>
- <KEYWORD2>SSLPassPhraseDialog</KEYWORD2>
- <KEYWORD2>SSLProtocol</KEYWORD2>
- <KEYWORD2>SSLProxyCACertificateFile</KEYWORD2>
- <KEYWORD2>SSLProxyCACertificatePath</KEYWORD2>
- <KEYWORD2>SSLProxyCARevocationFile</KEYWORD2>
- <KEYWORD2>SSLProxyCARevocationPath</KEYWORD2>
- <KEYWORD2>SSLProxyCipherSuite</KEYWORD2>
- <KEYWORD2>SSLProxyEngine</KEYWORD2>
- <KEYWORD2>SSLProxyMachineCertificateFile</KEYWORD2>
- <KEYWORD2>SSLProxyMachineCertificatePath</KEYWORD2>
- <KEYWORD2>SSLProxyProtocol</KEYWORD2>
- <KEYWORD2>SSLProxyVerify</KEYWORD2>
- <KEYWORD2>SSLProxyVerifyDepth</KEYWORD2>
- <KEYWORD2>SSLRandomSeed</KEYWORD2>
- <KEYWORD2>SSLRequire</KEYWORD2>
- <KEYWORD2>SSLRequireSSL</KEYWORD2>
- <KEYWORD2>SSLSessionCache</KEYWORD2>
- <KEYWORD2>SSLSessionCacheTimeout</KEYWORD2>
- <KEYWORD2>SSLVerifyClient</KEYWORD2>
- <KEYWORD2>SSLVerifyDepth</KEYWORD2>
- <KEYWORD2>Satisfy</KEYWORD2>
- <KEYWORD2>ScoreBoardFile</KEYWORD2>
- <KEYWORD2>Script</KEYWORD2>
- <KEYWORD2>ScriptAlias</KEYWORD2>
- <KEYWORD2>ScriptAliasMatch</KEYWORD2>
- <KEYWORD2>ScriptInterpreterSource</KEYWORD2>
- <KEYWORD2>ScriptLog</KEYWORD2>
- <KEYWORD2>ScriptLogBuffer</KEYWORD2>
- <KEYWORD2>ScriptLogLength</KEYWORD2>
- <KEYWORD2>ScriptSock</KEYWORD2>
- <KEYWORD2>SecureListen</KEYWORD2>
- <KEYWORD2>SendBufferSize</KEYWORD2>
- <KEYWORD2>ServerAdmin</KEYWORD2>
- <KEYWORD2>ServerLimit</KEYWORD2>
- <KEYWORD2>ServerName</KEYWORD2>
- <KEYWORD2>ServerRoot</KEYWORD2>
- <KEYWORD2>ServerSignature</KEYWORD2>
- <KEYWORD2>ServerTokens</KEYWORD2>
- <KEYWORD2>SetEnv</KEYWORD2>
- <KEYWORD2>SetEnvIf</KEYWORD2>
- <KEYWORD2>SetEnvIfNoCase</KEYWORD2>
- <KEYWORD2>SetHandler</KEYWORD2>
- <KEYWORD2>SetInputFilter</KEYWORD2>
- <KEYWORD2>SetOutputFilter</KEYWORD2>
- <KEYWORD2>StartServers</KEYWORD2>
- <KEYWORD2>StartThreads</KEYWORD2>
- <KEYWORD2>SuexecUserGroup</KEYWORD2>
- <KEYWORD2>ThreadLimit</KEYWORD2>
- <KEYWORD2>ThreadStackSize</KEYWORD2>
- <KEYWORD2>ThreadsPerChild</KEYWORD2>
- <KEYWORD2>TimeOut</KEYWORD2>
- <KEYWORD2>TransferLog</KEYWORD2>
- <KEYWORD2>TypesConfig</KEYWORD2>
- <KEYWORD2>UnsetEnv</KEYWORD2>
- <KEYWORD2>UseCanonicalName</KEYWORD2>
- <KEYWORD2>User</KEYWORD2>
- <KEYWORD2>UserDir</KEYWORD2>
- <KEYWORD2>VirtualDocumentRoot</KEYWORD2>
- <KEYWORD2>VirtualDocumentRootIP</KEYWORD2>
- <KEYWORD2>VirtualScriptAlias</KEYWORD2>
- <KEYWORD2>VirtualScriptAliasIP</KEYWORD2>
- <KEYWORD2>XBitHack</KEYWORD2>
-
- <!-- Apache 1.x -->
- <!-- using 4 for apache 1.x vs 2.x -->
- <KEYWORD4>AddModule</KEYWORD4>
- <KEYWORD4>ClearModuleList</KEYWORD4>
-
- <!-- Subversion directives -->
- <KEYWORD3>SVNPath</KEYWORD3>
- <KEYWORD3>SVNParentPath</KEYWORD3>
- <KEYWORD3>SVNIndexXSLT</KEYWORD3>
-
- <!-- mod_python directives -->
- <KEYWORD3>PythonHandler</KEYWORD3>
- <KEYWORD3>PythonDebug</KEYWORD3>
-
- <!-- mod_php -->
- <KEYWORD3>php_value</KEYWORD3>
- <!-- using 4 for apache 1.x vs 2.x -->
- <KEYWORD4>php_flag</KEYWORD4>
-
- <LITERAL2>All</LITERAL2>
- <LITERAL2>ExecCGI</LITERAL2>
- <LITERAL2>FollowSymLinks</LITERAL2>
- <LITERAL2>Includes</LITERAL2>
- <LITERAL2>IncludesNOEXEC</LITERAL2>
- <LITERAL2>Indexes</LITERAL2>
- <LITERAL2>MultiViews</LITERAL2>
- <LITERAL2>None</LITERAL2>
- <LITERAL2>Off</LITERAL2>
- <LITERAL2>On</LITERAL2>
- <LITERAL2>SymLinksIfOwnerMatch</LITERAL2>
- <LITERAL2>from</LITERAL2>
- </KEYWORDS>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="noWordSep" VALUE="-" />
+ </PROPS>
+ <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="TRUE">
+
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
+ <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
+ <END><![CDATA[</$1>]]></END>
+ </SPAN_REGEXP>
+
+ <KEYWORDS>
+
+ <KEYWORD1>AcceptPathInfo</KEYWORD1>
+ <KEYWORD1>Action</KEYWORD1>
+ <KEYWORD1>AddAlt</KEYWORD1>
+ <KEYWORD1>AddAltByEncoding</KEYWORD1>
+ <KEYWORD1>AddAltByType</KEYWORD1>
+ <KEYWORD1>AddCharset</KEYWORD1>
+ <KEYWORD1>AddDefaultCharset</KEYWORD1>
+ <KEYWORD1>AddDescription</KEYWORD1>
+ <KEYWORD1>AddEncoding</KEYWORD1>
+ <KEYWORD1>AddHandler</KEYWORD1>
+ <KEYWORD1>AddIcon</KEYWORD1>
+ <KEYWORD1>AddIconByEncoding</KEYWORD1>
+ <KEYWORD1>AddIconByType</KEYWORD1>
+ <KEYWORD1>AddInputFilter</KEYWORD1>
+ <KEYWORD1>AddLanguage</KEYWORD1>
+ <KEYWORD1>AddOutputFilter</KEYWORD1>
+ <KEYWORD1>AddOutputFilterByType</KEYWORD1>
+ <KEYWORD1>AddType</KEYWORD1>
+ <KEYWORD1>Allow</KEYWORD1>
+ <KEYWORD1>Anonymous</KEYWORD1>
+ <KEYWORD1>Anonymous_Authoritative</KEYWORD1>
+ <KEYWORD1>Anonymous_LogEmail</KEYWORD1>
+ <KEYWORD1>Anonymous_MustGiveEmail</KEYWORD1>
+ <KEYWORD1>Anonymous_NoUserID</KEYWORD1>
+ <KEYWORD1>Anonymous_VerifyEmail</KEYWORD1>
+ <KEYWORD1>AuthAuthoritative</KEYWORD1>
+ <KEYWORD1>AuthBasicAuthoritative</KEYWORD1>
+ <KEYWORD1>AuthBasicProvider</KEYWORD1>
+ <KEYWORD1>AuthDBMAuthoritative</KEYWORD1>
+ <KEYWORD1>AuthDBMGroupFile</KEYWORD1>
+ <KEYWORD1>AuthDBMType</KEYWORD1>
+ <KEYWORD1>AuthDBMUserFile</KEYWORD1>
+ <KEYWORD1>AuthDigestAlgorithm</KEYWORD1>
+ <KEYWORD1>AuthDigestDomain</KEYWORD1>
+ <KEYWORD1>AuthDigestFile</KEYWORD1>
+ <KEYWORD1>AuthDigestGroupFile</KEYWORD1>
+ <KEYWORD1>AuthDigestNonceFormat</KEYWORD1>
+ <KEYWORD1>AuthDigestNonceLifetime</KEYWORD1>
+ <KEYWORD1>AuthDigestQop</KEYWORD1>
+ <KEYWORD1>AuthGroupFile</KEYWORD1>
+ <KEYWORD1>AuthLDAPAuthoritative</KEYWORD1>
+ <KEYWORD1>AuthLDAPBindDN</KEYWORD1>
+ <KEYWORD1>AuthLDAPBindPassword</KEYWORD1>
+ <KEYWORD1>AuthLDAPCompareDNOnServer</KEYWORD1>
+ <KEYWORD1>AuthLDAPDereferenceAliases</KEYWORD1>
+ <KEYWORD1>AuthLDAPEnabled</KEYWORD1>
+ <KEYWORD1>AuthLDAPFrontPageHack</KEYWORD1>
+ <KEYWORD1>AuthLDAPGroupAttribute</KEYWORD1>
+ <KEYWORD1>AuthLDAPGroupAttributeIsDN</KEYWORD1>
+ <KEYWORD1>AuthLDAPRemoteUserIsDN</KEYWORD1>
+ <KEYWORD1>AuthLDAPUrl</KEYWORD1>
+ <KEYWORD1>AuthName</KEYWORD1>
+ <KEYWORD1>AuthType</KEYWORD1>
+ <KEYWORD1>AuthUserFile</KEYWORD1>
+ <KEYWORD1>BrowserMatch</KEYWORD1>
+ <KEYWORD1>BrowserMatchNoCase</KEYWORD1>
+ <KEYWORD1>CGIMapExtension</KEYWORD1>
+ <KEYWORD1>CharsetDefault</KEYWORD1>
+ <KEYWORD1>CharsetOptions</KEYWORD1>
+ <KEYWORD1>CharsetSourceEnc</KEYWORD1>
+ <KEYWORD1>CheckSpelling</KEYWORD1>
+ <KEYWORD1>ContentDigest</KEYWORD1>
+ <KEYWORD1>CookieDomain</KEYWORD1>
+ <KEYWORD1>CookieExpires</KEYWORD1>
+ <KEYWORD1>CookieName</KEYWORD1>
+ <KEYWORD1>CookieStyle</KEYWORD1>
+ <KEYWORD1>CookieTracking</KEYWORD1>
+ <KEYWORD1>DefaultIcon</KEYWORD1>
+ <KEYWORD1>DefaultLanguage</KEYWORD1>
+ <KEYWORD1>DefaultType</KEYWORD1>
+ <KEYWORD1>Deny</KEYWORD1>
+ <KEYWORD1>DirectoryIndex</KEYWORD1>
+ <KEYWORD1>DirectorySlash</KEYWORD1>
+ <KEYWORD1>EnableMMAP</KEYWORD1>
+ <KEYWORD1>EnableSendfile</KEYWORD1>
+ <KEYWORD1>ErrorDocument</KEYWORD1>
+ <KEYWORD1>Example</KEYWORD1>
+ <KEYWORD1>ExpiresActive</KEYWORD1>
+ <KEYWORD1>ExpiresByType</KEYWORD1>
+ <KEYWORD1>ExpiresDefault</KEYWORD1>
+ <KEYWORD1>FileETag</KEYWORD1>
+ <KEYWORD1>ForceLanguagePriority</KEYWORD1>
+ <KEYWORD1>ForceType</KEYWORD1>
+ <KEYWORD1>Header</KEYWORD1>
+ <KEYWORD1>HeaderName</KEYWORD1>
+ <KEYWORD1>ImapBase</KEYWORD1>
+ <KEYWORD1>ImapDefault</KEYWORD1>
+ <KEYWORD1>ImapMenu</KEYWORD1>
+ <KEYWORD1>IndexIgnore</KEYWORD1>
+ <KEYWORD1>IndexOptions</KEYWORD1>
+ <KEYWORD1>IndexOrderDefault</KEYWORD1>
+ <KEYWORD1>ISAPIAppendLogToErrors</KEYWORD1>
+ <KEYWORD1>ISAPIAppendLogToQuery</KEYWORD1>
+ <KEYWORD1>ISAPIFakeAsync</KEYWORD1>
+ <KEYWORD1>ISAPILogNotSupported</KEYWORD1>
+ <KEYWORD1>ISAPIReadAheadBuffer</KEYWORD1>
+ <KEYWORD1>LanguagePriority</KEYWORD1>
+ <KEYWORD1>LimitRequestBody</KEYWORD1>
+ <KEYWORD1>LimitXMLRequestBody</KEYWORD1>
+ <KEYWORD1>MetaDir</KEYWORD1>
+ <KEYWORD1>MetaFiles</KEYWORD1>
+ <KEYWORD1>MetaSuffix</KEYWORD1>
+ <KEYWORD1>MultiviewsMatch</KEYWORD1>
+ <KEYWORD1>Options</KEYWORD1>
+ <KEYWORD1>Order</KEYWORD1>
+ <KEYWORD1>PassEnv</KEYWORD1>
+ <KEYWORD1>ReadmeName</KEYWORD1>
+ <KEYWORD1>Redirect</KEYWORD1>
+ <KEYWORD1>RedirectMatch</KEYWORD1>
+ <KEYWORD1>RedirectPermanent</KEYWORD1>
+ <KEYWORD1>RedirectTemp</KEYWORD1>
+ <KEYWORD1>RemoveCharset</KEYWORD1>
+ <KEYWORD1>RemoveEncoding</KEYWORD1>
+ <KEYWORD1>RemoveHandler</KEYWORD1>
+ <KEYWORD1>RemoveInputFilter</KEYWORD1>
+ <KEYWORD1>RemoveLanguage</KEYWORD1>
+ <KEYWORD1>RemoveOutputFilter</KEYWORD1>
+ <KEYWORD1>RemoveType</KEYWORD1>
+ <KEYWORD1>RequestHeader</KEYWORD1>
+ <KEYWORD1>Require</KEYWORD1>
+ <KEYWORD1>RewriteBase</KEYWORD1>
+ <KEYWORD1>RewriteCond</KEYWORD1>
+ <KEYWORD1>RewriteEngine</KEYWORD1>
+ <KEYWORD1>RewriteOptions</KEYWORD1>
+ <KEYWORD1>RewriteRule</KEYWORD1>
+ <KEYWORD1>RLimitCPU</KEYWORD1>
+ <KEYWORD1>RLimitMEM</KEYWORD1>
+ <KEYWORD1>RLimitNPROC</KEYWORD1>
+ <KEYWORD1>Satisfy</KEYWORD1>
+ <KEYWORD1>ScriptInterpreterSource</KEYWORD1>
+ <KEYWORD1>ServerSignature</KEYWORD1>
+ <KEYWORD1>SetEnv</KEYWORD1>
+ <KEYWORD1>SetEnvIf</KEYWORD1>
+ <KEYWORD1>SetEnvIfNoCase</KEYWORD1>
+ <KEYWORD1>SetHandler</KEYWORD1>
+ <KEYWORD1>SetInputFilter</KEYWORD1>
+ <KEYWORD1>SetOutputFilter</KEYWORD1>
+ <KEYWORD1>SSIErrorMsg</KEYWORD1>
+ <KEYWORD1>SSITimeFormat</KEYWORD1>
+ <KEYWORD1>SSLCipherSuite</KEYWORD1>
+ <KEYWORD1>SSLOptions</KEYWORD1>
+ <KEYWORD1>SSLProxyCipherSuite</KEYWORD1>
+ <KEYWORD1>SSLProxyVerify</KEYWORD1>
+ <KEYWORD1>SSLProxyVerifyDepth</KEYWORD1>
+ <KEYWORD1>SSLRequire</KEYWORD1>
+ <KEYWORD1>SSLRequireSSL</KEYWORD1>
+ <KEYWORD1>SSLUserName</KEYWORD1>
+ <KEYWORD1>SSLVerifyClient</KEYWORD1>
+ <KEYWORD1>SSLVerifyDepth</KEYWORD1>
+ <KEYWORD1>UnsetEnv</KEYWORD1>
+ <KEYWORD1>XBitHack</KEYWORD1>
+
+ <LITERAL3>Basic</LITERAL3>
+ <LITERAL3>Digest</LITERAL3>
+ <LITERAL3>None</LITERAL3>
+ <LITERAL3>Off</LITERAL3>
+ <LITERAL3>On</LITERAL3>
+ </KEYWORDS>
+
+ </RULES>
+
+ <RULES SET="DIRECTIVE" DEFAULT="NULL" IGNORE_CASE="TRUE">
+
+ <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="DIRECTIVE">
+ <BEGIN><![CDATA[<(\w+)[^>]*>]]></BEGIN>
+ <END><![CDATA[</$1>]]></END>
+ </SPAN_REGEXP>
+
+ <KEYWORDS>
+
+ <KEYWORD2>AcceptMutex</KEYWORD2>
+ <KEYWORD2>AcceptPathInfo</KEYWORD2>
+ <KEYWORD2>AccessFileName</KEYWORD2>
+ <KEYWORD2>Action</KEYWORD2>
+ <KEYWORD2>AddAlt</KEYWORD2>
+ <KEYWORD2>AddAltByEncoding</KEYWORD2>
+ <KEYWORD2>AddAltByType</KEYWORD2>
+ <KEYWORD2>AddCharset</KEYWORD2>
+ <KEYWORD2>AddDefaultCharset</KEYWORD2>
+ <KEYWORD2>AddDescription</KEYWORD2>
+ <KEYWORD2>AddEncoding</KEYWORD2>
+ <KEYWORD2>AddHandler</KEYWORD2>
+ <KEYWORD2>AddIcon</KEYWORD2>
+ <KEYWORD2>AddIconByEncoding</KEYWORD2>
+ <KEYWORD2>AddIconByType</KEYWORD2>
+ <KEYWORD2>AddInputFilter</KEYWORD2>
+ <KEYWORD2>AddLanguage</KEYWORD2>
+ <KEYWORD2>AddModuleInfo</KEYWORD2>
+ <KEYWORD2>AddOutputFilter</KEYWORD2>
+ <KEYWORD2>AddOutputFilterByType</KEYWORD2>
+ <KEYWORD2>AddType</KEYWORD2>
+ <KEYWORD2>Alias</KEYWORD2>
+ <KEYWORD2>AliasMatch</KEYWORD2>
+ <KEYWORD2>Allow</KEYWORD2>
+ <KEYWORD2>AllowCONNECT</KEYWORD2>
+ <KEYWORD2>AllowEncodedSlashes</KEYWORD2>
+ <KEYWORD2>AllowOverride</KEYWORD2>
+ <KEYWORD2>Anonymous</KEYWORD2>
+ <KEYWORD2>Anonymous_Authoritative</KEYWORD2>
+ <KEYWORD2>Anonymous_LogEmail</KEYWORD2>
+ <KEYWORD2>Anonymous_MustGiveEmail</KEYWORD2>
+ <KEYWORD2>Anonymous_NoUserID</KEYWORD2>
+ <KEYWORD2>Anonymous_VerifyEmail</KEYWORD2>
+ <KEYWORD2>AuthAuthoritative</KEYWORD2>
+ <KEYWORD2>AuthBasicAuthoritative</KEYWORD2>
+ <KEYWORD2>AuthBasicProvider</KEYWORD2>
+ <KEYWORD2>AuthDBMAuthoritative</KEYWORD2>
+ <KEYWORD2>AuthDBMGroupFile</KEYWORD2>
+ <KEYWORD2>AuthDBMType</KEYWORD2>
+ <KEYWORD2>AuthDBMUserFile</KEYWORD2>
+ <KEYWORD2>AuthDigestAlgorithm</KEYWORD2>
+ <KEYWORD2>AuthDigestDomain</KEYWORD2>
+ <KEYWORD2>AuthDigestFile</KEYWORD2>
+ <KEYWORD2>AuthDigestGroupFile</KEYWORD2>
+ <KEYWORD2>AuthDigestNcCheck</KEYWORD2>
+ <KEYWORD2>AuthDigestNonceFormat</KEYWORD2>
+ <KEYWORD2>AuthDigestNonceLifetime</KEYWORD2>
+ <KEYWORD2>AuthDigestQop</KEYWORD2>
+ <KEYWORD2>AuthDigestShmemSize</KEYWORD2>
+ <KEYWORD2>AuthGroupFile</KEYWORD2>
+ <KEYWORD2>AuthLDAPAuthoritative</KEYWORD2>
+ <KEYWORD2>AuthLDAPBindDN</KEYWORD2>
+ <KEYWORD2>AuthLDAPBindPassword</KEYWORD2>
+ <KEYWORD2>AuthLDAPCharsetConfig</KEYWORD2>
+ <KEYWORD2>AuthLDAPCompareDNOnServer</KEYWORD2>
+ <KEYWORD2>AuthLDAPDereferenceAliases</KEYWORD2>
+ <KEYWORD2>AuthLDAPEnabled</KEYWORD2>
+ <KEYWORD2>AuthLDAPFrontPageHack</KEYWORD2>
+ <KEYWORD2>AuthLDAPGroupAttribute</KEYWORD2>
+ <KEYWORD2>AuthLDAPGroupAttributeIsDN</KEYWORD2>
+ <KEYWORD2>AuthLDAPRemoteUserIsDN</KEYWORD2>
+ <KEYWORD2>AuthLDAPUrl</KEYWORD2>
+ <KEYWORD2>AuthName</KEYWORD2>
+ <KEYWORD2>AuthType</KEYWORD2>
+ <KEYWORD2>AuthUserFile</KEYWORD2>
+ <KEYWORD2>BS2000Account</KEYWORD2>
+ <KEYWORD2>BrowserMatch</KEYWORD2>
+ <KEYWORD2>BrowserMatchNoCase</KEYWORD2>
+ <KEYWORD2>CGIMapExtension</KEYWORD2>
+ <KEYWORD2>CacheDefaultExpire</KEYWORD2>
+ <KEYWORD2>CacheDirLength</KEYWORD2>
+ <KEYWORD2>CacheDirLevels</KEYWORD2>
+ <KEYWORD2>CacheDisable</KEYWORD2>
+ <KEYWORD2>CacheEnable</KEYWORD2>
+ <KEYWORD2>CacheExpiryCheck</KEYWORD2>
+ <KEYWORD2>CacheFile</KEYWORD2>
+ <KEYWORD2>CacheForceCompletion</KEYWORD2>
+ <KEYWORD2>CacheGcClean</KEYWORD2>
+ <KEYWORD2>CacheGcDaily</KEYWORD2>
+ <KEYWORD2>CacheGcInterval</KEYWORD2>
+ <KEYWORD2>CacheGcMemUsage</KEYWORD2>
+ <KEYWORD2>CacheGcUnused</KEYWORD2>
+ <KEYWORD2>CacheIgnoreCacheControl</KEYWORD2>
+ <KEYWORD2>CacheIgnoreNoLastMod</KEYWORD2>
+ <KEYWORD2>CacheLastModifiedFactor</KEYWORD2>
+ <KEYWORD2>CacheMaxExpire</KEYWORD2>
+ <KEYWORD2>CacheMaxFileSize</KEYWORD2>
+ <KEYWORD2>CacheMinFileSize</KEYWORD2>
+ <KEYWORD2>CacheNegotiatedDocs</KEYWORD2>
+ <KEYWORD2>CacheRoot</KEYWORD2>
+ <KEYWORD2>CacheSize</KEYWORD2>
+ <KEYWORD2>CacheTimeMargin</KEYWORD2>
+ <KEYWORD2>CharsetDefault</KEYWORD2>
+ <KEYWORD2>CharsetOptions</KEYWORD2>
+ <KEYWORD2>CharsetSourceEnc</KEYWORD2>
+ <KEYWORD2>CheckSpelling</KEYWORD2>
+ <KEYWORD2>ChildPerUserID</KEYWORD2>
+ <KEYWORD2>ContentDigest</KEYWORD2>
+ <KEYWORD2>CookieDomain</KEYWORD2>
+ <KEYWORD2>CookieExpires</KEYWORD2>
+ <KEYWORD2>CookieLog</KEYWORD2>
+ <KEYWORD2>CookieName</KEYWORD2>
+ <KEYWORD2>CookieStyle</KEYWORD2>
+ <KEYWORD2>CookieTracking</KEYWORD2>
+ <KEYWORD2>CoreDumpDirectory</KEYWORD2>
+ <KEYWORD2>CustomLog</KEYWORD2>
+ <KEYWORD2>Dav</KEYWORD2>
+ <KEYWORD2>DavDepthInfinity</KEYWORD2>
+ <KEYWORD2>DavLockDB</KEYWORD2>
+ <KEYWORD2>DavMinTimeout</KEYWORD2>
+ <KEYWORD2>DefaultIcon</KEYWORD2>
+ <KEYWORD2>DefaultLanguage</KEYWORD2>
+ <KEYWORD2>DefaultType</KEYWORD2>
+ <KEYWORD2>DeflateBufferSize</KEYWORD2>
+ <KEYWORD2>DeflateCompressionLevel</KEYWORD2>
+ <KEYWORD2>DeflateFilterNote</KEYWORD2>
+ <KEYWORD2>DeflateMemLevel</KEYWORD2>
+ <KEYWORD2>DeflateWindowSize</KEYWORD2>
+ <KEYWORD2>Deny</KEYWORD2>
+ <KEYWORD2>DirectoryIndex</KEYWORD2>
+ <KEYWORD1>DirectorySlash</KEYWORD1>
+ <KEYWORD2>DocumentRoot</KEYWORD2>
+ <KEYWORD2>EnableMMAP</KEYWORD2>
+ <KEYWORD2>EnableSendfile</KEYWORD2>
+ <KEYWORD2>ErrorDocument</KEYWORD2>
+ <KEYWORD2>ErrorLog</KEYWORD2>
+ <KEYWORD2>Example</KEYWORD2>
+ <KEYWORD2>ExpiresActive</KEYWORD2>
+ <KEYWORD2>ExpiresByType</KEYWORD2>
+ <KEYWORD2>ExpiresDefault</KEYWORD2>
+ <KEYWORD2>ExtFilterDefine</KEYWORD2>
+ <KEYWORD2>ExtFilterOptions</KEYWORD2>
+ <KEYWORD2>ExtendedStatus</KEYWORD2>
+ <KEYWORD2>FileETag</KEYWORD2>
+ <KEYWORD2>ForceLanguagePriority</KEYWORD2>
+ <KEYWORD2>ForceType</KEYWORD2>
+ <KEYWORD2>Group</KEYWORD2>
+ <KEYWORD2>Header</KEYWORD2>
+ <KEYWORD2>HeaderName</KEYWORD2>
+ <KEYWORD2>HostnameLookups</KEYWORD2>
+ <KEYWORD2>ISAPIAppendLogToErrors</KEYWORD2>
+ <KEYWORD2>ISAPIAppendLogToQuery</KEYWORD2>
+ <KEYWORD2>ISAPICacheFile</KEYWORD2>
+ <KEYWORD2>ISAPIFakeAsync</KEYWORD2>
+ <KEYWORD2>ISAPILogNotSupported</KEYWORD2>
+ <KEYWORD2>ISAPIReadAheadBuffer</KEYWORD2>
+ <KEYWORD2>IdentityCheck</KEYWORD2>
+ <KEYWORD2>ImapBase</KEYWORD2>
+ <KEYWORD2>ImapDefault</KEYWORD2>
+ <KEYWORD2>ImapMenu</KEYWORD2>
+ <KEYWORD2>Include</KEYWORD2>
+ <KEYWORD2>IndexIgnore</KEYWORD2>
+ <KEYWORD2>IndexOptions</KEYWORD2>
+ <KEYWORD2>IndexOrderDefault</KEYWORD2>
+ <KEYWORD2>KeepAlive</KEYWORD2>
+ <KEYWORD2>KeepAliveTimeout</KEYWORD2>
+ <KEYWORD2>LDAPCacheEntries</KEYWORD2>
+ <KEYWORD2>LDAPCacheTTL</KEYWORD2>
+ <KEYWORD2>LDAPOpCacheEntries</KEYWORD2>
+ <KEYWORD2>LDAPOpCacheTTL</KEYWORD2>
+ <KEYWORD2>LDAPSharedCacheSize</KEYWORD2>
+ <KEYWORD2>LDAPTrustedCA</KEYWORD2>
+ <KEYWORD2>LDAPTrustedCAType</KEYWORD2>
+ <KEYWORD2>LanguagePriority</KEYWORD2>
+ <KEYWORD2>LimitInternalRecursion</KEYWORD2>
+ <KEYWORD2>LimitRequestBody</KEYWORD2>
+ <KEYWORD2>LimitRequestFields</KEYWORD2>
+ <KEYWORD2>LimitRequestFieldsize</KEYWORD2>
+ <KEYWORD2>LimitRequestLine</KEYWORD2>
+ <KEYWORD2>LimitXMLRequestBody</KEYWORD2>
+ <KEYWORD2>Listen</KEYWORD2>
+ <KEYWORD2>ListenBacklog</KEYWORD2>
+ <KEYWORD2>LoadFile</KEYWORD2>
+ <KEYWORD2>LoadModule</KEYWORD2>
+ <KEYWORD2>LockFile</KEYWORD2>
+ <KEYWORD2>LogFormat</KEYWORD2>
+ <KEYWORD2>LogLevel</KEYWORD2>
+ <KEYWORD2>MCacheMaxObjectCount</KEYWORD2>
+ <KEYWORD2>MCacheMaxObjectSize</KEYWORD2>
+ <KEYWORD2>MCacheMaxStreamingBuffer</KEYWORD2>
+ <KEYWORD2>MCacheMinObjectSize</KEYWORD2>
+ <KEYWORD2>MCacheRemovalAlgorithm</KEYWORD2>
+ <KEYWORD2>MCacheSize</KEYWORD2>
+ <KEYWORD2>MMapFile</KEYWORD2>
+ <KEYWORD2>MaxClients</KEYWORD2>
+ <KEYWORD2>MaxKeepAliveRequests</KEYWORD2>
+ <KEYWORD2>MaxMemFree</KEYWORD2>
+ <KEYWORD2>MaxRequestsPerChild</KEYWORD2>
+ <KEYWORD2>MaxRequestsPerThread</KEYWORD2>
+ <KEYWORD2>MaxSpareServers</KEYWORD2>
+ <KEYWORD2>MaxSpareThreads</KEYWORD2>
+ <KEYWORD2>MaxThreads</KEYWORD2>
+ <KEYWORD2>MaxThreadsPerChild</KEYWORD2>
+ <KEYWORD2>MetaDir</KEYWORD2>
+ <KEYWORD2>MetaFiles</KEYWORD2>
+ <KEYWORD2>MetaSuffix</KEYWORD2>
+ <KEYWORD2>MimeMagicFile</KEYWORD2>
+ <KEYWORD2>MinSpareServers</KEYWORD2>
+ <KEYWORD2>MinSpareThreads</KEYWORD2>
+ <KEYWORD2>ModMimeUsePathInfo</KEYWORD2>
+ <KEYWORD2>MultiviewsMatch</KEYWORD2>
+ <KEYWORD2>NWSSLTrustedCerts</KEYWORD2>
+ <KEYWORD2>NameVirtualHost</KEYWORD2>
+ <KEYWORD2>NoProxy</KEYWORD2>
+ <KEYWORD2>NumServers</KEYWORD2>
+ <KEYWORD2>Options</KEYWORD2>
+ <KEYWORD2>Order</KEYWORD2>
+ <KEYWORD2>PassEnv</KEYWORD2>
+ <KEYWORD2>PidFile</KEYWORD2>
+ <KEYWORD2>ProtocolEcho</KEYWORD2>
+ <KEYWORD2>ProxyBadHeader</KEYWORD2>
+ <KEYWORD2>ProxyBlock</KEYWORD2>
+ <KEYWORD2>ProxyDomain</KEYWORD2>
+ <KEYWORD2>ProxyErrorOverride</KEYWORD2>
+ <KEYWORD2>ProxyIOBufferSize</KEYWORD2>
+ <KEYWORD2>ProxyMaxForwards</KEYWORD2>
+ <KEYWORD2>ProxyPass</KEYWORD2>
+ <KEYWORD2>ProxyPassReverse</KEYWORD2>
+ <KEYWORD2>ProxyPreserveHost</KEYWORD2>
+ <KEYWORD2>ProxyReceiveBufferSize</KEYWORD2>
+ <KEYWORD2>ProxyRemote</KEYWORD2>
+ <KEYWORD2>ProxyRemoteMatch</KEYWORD2>
+ <KEYWORD2>ProxyRequests</KEYWORD2>
+ <KEYWORD2>ProxyTimeout</KEYWORD2>
+ <KEYWORD2>ProxyVia</KEYWORD2>
+ <KEYWORD2>RLimitCPU</KEYWORD2>
+ <KEYWORD2>RLimitMEM</KEYWORD2>
+ <KEYWORD2>RLimitNPROC</KEYWORD2>
+ <KEYWORD2>ReadmeName</KEYWORD2>
+ <KEYWORD2>Redirect</KEYWORD2>
+ <KEYWORD2>RedirectMatch</KEYWORD2>
+ <KEYWORD2>RedirectPermanent</KEYWORD2>
+ <KEYWORD2>RedirectTemp</KEYWORD2>
+ <KEYWORD2>RemoveCharset</KEYWORD2>
+ <KEYWORD2>RemoveEncoding</KEYWORD2>
+ <KEYWORD2>RemoveHandler</KEYWORD2>
+ <KEYWORD2>RemoveInputFilter</KEYWORD2>
+ <KEYWORD2>RemoveLanguage</KEYWORD2>
+ <KEYWORD2>RemoveOutputFilter</KEYWORD2>
+ <KEYWORD2>RemoveType</KEYWORD2>
+ <KEYWORD2>RequestHeader</KEYWORD2>
+ <KEYWORD2>Require</KEYWORD2>
+ <KEYWORD2>RewriteBase</KEYWORD2>
+ <KEYWORD2>RewriteCond</KEYWORD2>
+ <KEYWORD2>RewriteEngine</KEYWORD2>
+ <KEYWORD2>RewriteLock</KEYWORD2>
+ <KEYWORD2>RewriteLog</KEYWORD2>
+ <KEYWORD2>RewriteLogLevel</KEYWORD2>
+ <KEYWORD2>RewriteMap</KEYWORD2>
+ <KEYWORD2>RewriteOptions</KEYWORD2>
+ <KEYWORD2>RewriteRule</KEYWORD2>
+ <KEYWORD2>SSIEndTag</KEYWORD2>
+ <KEYWORD2>SSIErrorMsg</KEYWORD2>
+ <KEYWORD2>SSIStartTag</KEYWORD2>
+ <KEYWORD2>SSITimeFormat</KEYWORD2>
+ <KEYWORD2>SSIUndefinedEcho</KEYWORD2>
+ <KEYWORD2>SSLCACertificateFile</KEYWORD2>
+ <KEYWORD2>SSLCACertificatePath</KEYWORD2>
+ <KEYWORD2>SSLCARevocationFile</KEYWORD2>
+ <KEYWORD2>SSLCARevocationPath</KEYWORD2>
+ <KEYWORD2>SSLCertificateChainFile</KEYWORD2>
+ <KEYWORD2>SSLCertificateFile</KEYWORD2>
+ <KEYWORD2>SSLCertificateKeyFile</KEYWORD2>
+ <KEYWORD2>SSLCipherSuite</KEYWORD2>
+ <KEYWORD2>SSLEngine</KEYWORD2>
+ <KEYWORD2>SSLMutex</KEYWORD2>
+ <KEYWORD2>SSLOptions</KEYWORD2>
+ <KEYWORD2>SSLPassPhraseDialog</KEYWORD2>
+ <KEYWORD2>SSLProtocol</KEYWORD2>
+ <KEYWORD2>SSLProxyCACertificateFile</KEYWORD2>
+ <KEYWORD2>SSLProxyCACertificatePath</KEYWORD2>
+ <KEYWORD2>SSLProxyCARevocationFile</KEYWORD2>
+ <KEYWORD2>SSLProxyCARevocationPath</KEYWORD2>
+ <KEYWORD2>SSLProxyCipherSuite</KEYWORD2>
+ <KEYWORD2>SSLProxyEngine</KEYWORD2>
+ <KEYWORD2>SSLProxyMachineCertificateFile</KEYWORD2>
+ <KEYWORD2>SSLProxyMachineCertificatePath</KEYWORD2>
+ <KEYWORD2>SSLProxyProtocol</KEYWORD2>
+ <KEYWORD2>SSLProxyVerify</KEYWORD2>
+ <KEYWORD2>SSLProxyVerifyDepth</KEYWORD2>
+ <KEYWORD2>SSLRandomSeed</KEYWORD2>
+ <KEYWORD2>SSLRequire</KEYWORD2>
+ <KEYWORD2>SSLRequireSSL</KEYWORD2>
+ <KEYWORD2>SSLSessionCache</KEYWORD2>
+ <KEYWORD2>SSLSessionCacheTimeout</KEYWORD2>
+ <KEYWORD2>SSLVerifyClient</KEYWORD2>
+ <KEYWORD2>SSLVerifyDepth</KEYWORD2>
+ <KEYWORD2>Satisfy</KEYWORD2>
+ <KEYWORD2>ScoreBoardFile</KEYWORD2>
+ <KEYWORD2>Script</KEYWORD2>
+ <KEYWORD2>ScriptAlias</KEYWORD2>
+ <KEYWORD2>ScriptAliasMatch</KEYWORD2>
+ <KEYWORD2>ScriptInterpreterSource</KEYWORD2>
+ <KEYWORD2>ScriptLog</KEYWORD2>
+ <KEYWORD2>ScriptLogBuffer</KEYWORD2>
+ <KEYWORD2>ScriptLogLength</KEYWORD2>
+ <KEYWORD2>ScriptSock</KEYWORD2>
+ <KEYWORD2>SecureListen</KEYWORD2>
+ <KEYWORD2>SendBufferSize</KEYWORD2>
+ <KEYWORD2>ServerAdmin</KEYWORD2>
+ <KEYWORD2>ServerLimit</KEYWORD2>
+ <KEYWORD2>ServerName</KEYWORD2>
+ <KEYWORD2>ServerRoot</KEYWORD2>
+ <KEYWORD2>ServerSignature</KEYWORD2>
+ <KEYWORD2>ServerTokens</KEYWORD2>
+ <KEYWORD2>SetEnv</KEYWORD2>
+ <KEYWORD2>SetEnvIf</KEYWORD2>
+ <KEYWORD2>SetEnvIfNoCase</KEYWORD2>
+ <KEYWORD2>SetHandler</KEYWORD2>
+ <KEYWORD2>SetInputFilter</KEYWORD2>
+ <KEYWORD2>SetOutputFilter</KEYWORD2>
+ <KEYWORD2>StartServers</KEYWORD2>
+ <KEYWORD2>StartThreads</KEYWORD2>
+ <KEYWORD2>SuexecUserGroup</KEYWORD2>
+ <KEYWORD2>ThreadLimit</KEYWORD2>
+ <KEYWORD2>ThreadStackSize</KEYWORD2>
+ <KEYWORD2>ThreadsPerChild</KEYWORD2>
+ <KEYWORD2>TimeOut</KEYWORD2>
+ <KEYWORD2>TransferLog</KEYWORD2>
+ <KEYWORD2>TypesConfig</KEYWORD2>
+ <KEYWORD2>UnsetEnv</KEYWORD2>
+ <KEYWORD2>UseCanonicalName</KEYWORD2>
+ <KEYWORD2>User</KEYWORD2>
+ <KEYWORD2>UserDir</KEYWORD2>
+ <KEYWORD2>VirtualDocumentRoot</KEYWORD2>
+ <KEYWORD2>VirtualDocumentRootIP</KEYWORD2>
+ <KEYWORD2>VirtualScriptAlias</KEYWORD2>
+ <KEYWORD2>VirtualScriptAliasIP</KEYWORD2>
+ <KEYWORD2>XBitHack</KEYWORD2>
+
+ <!-- Apache 1.x -->
+ <!-- using 4 for apache 1.x vs 2.x -->
+ <KEYWORD4>AddModule</KEYWORD4>
+ <KEYWORD4>ClearModuleList</KEYWORD4>
+
+ <!-- Subversion directives -->
+ <KEYWORD3>SVNPath</KEYWORD3>
+ <KEYWORD3>SVNParentPath</KEYWORD3>
+ <KEYWORD3>SVNIndexXSLT</KEYWORD3>
+
+ <!-- mod_python directives -->
+ <KEYWORD3>PythonHandler</KEYWORD3>
+ <KEYWORD3>PythonDebug</KEYWORD3>
+
+ <!-- mod_php -->
+ <KEYWORD3>php_value</KEYWORD3>
+ <!-- using 4 for apache 1.x vs 2.x -->
+ <KEYWORD4>php_flag</KEYWORD4>
+
+ <LITERAL2>All</LITERAL2>
+ <LITERAL2>ExecCGI</LITERAL2>
+ <LITERAL2>FollowSymLinks</LITERAL2>
+ <LITERAL2>Includes</LITERAL2>
+ <LITERAL2>IncludesNOEXEC</LITERAL2>
+ <LITERAL2>Indexes</LITERAL2>
+ <LITERAL2>MultiViews</LITERAL2>
+ <LITERAL2>None</LITERAL2>
+ <LITERAL2>Off</LITERAL2>
+ <LITERAL2>On</LITERAL2>
+ <LITERAL2>SymLinksIfOwnerMatch</LITERAL2>
+ <LITERAL2>from</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/html.xml b/jEdit/modes/html.xml
index d061629..06a3edb 100644
--- a/jEdit/modes/html.xml
+++ b/jEdit/modes/html.xml
@@ -1,192 +1,192 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <!-- ESCAPE is not exactly right but it is needed to correctly
- handle JavaScript in on* parameters.
- NOTE: ESCAPE moved from RULE to SPANs! -->
- <RULES SET="TAGS" DEFAULT="MARKUP">
- <!-- Inline CSS -->
- <SPAN_REGEXP AT_WORD_START="TRUE" TYPE="MARKUP" DELEGATE="css::PROPERTIES" HASH_CHAR="style">
- <BEGIN>style\s*=\s*(["'])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- Javascript: delegate on* attributes to Javascript mode -->
- <SPAN_REGEXP AT_WORD_START="TRUE" DELEGATE="javascript::MAIN" HASH_CHAR="on" TYPE="MARKUP">
- <BEGIN>on[a-z]+\s*=\s*(["'])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- NOTE: no ESCAPE for quotes, at least for attributes; e.g onclick="alert(\"foo\");" is invalid! -->
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <KEYWORDS>
- <!-- HTML/XHTML elements, taken from http://de.selfhtml.org/html/referenz/elemente.htm -->
- <MARKUP>a</MARKUP>
- <MARKUP>abbr</MARKUP>
- <MARKUP>acronym</MARKUP>
- <MARKUP>address</MARKUP>
- <MARKUP>applet</MARKUP>
- <MARKUP>area</MARKUP>
- <MARKUP>b</MARKUP>
- <MARKUP>base</MARKUP>
- <MARKUP>basefont</MARKUP>
- <MARKUP>bdo</MARKUP>
- <MARKUP>big</MARKUP>
- <MARKUP>blockquote</MARKUP>
- <MARKUP>body</MARKUP>
- <MARKUP>br</MARKUP>
- <MARKUP>button</MARKUP>
- <MARKUP>caption</MARKUP>
- <MARKUP>center</MARKUP>
- <MARKUP>cite</MARKUP>
- <MARKUP>code</MARKUP>
- <MARKUP>col</MARKUP>
- <MARKUP>colgroup</MARKUP>
- <MARKUP>dd</MARKUP>
- <MARKUP>del</MARKUP>
- <MARKUP>dfn</MARKUP>
- <MARKUP>dir</MARKUP>
- <MARKUP>div</MARKUP>
- <MARKUP>dl</MARKUP>
- <MARKUP>dt</MARKUP>
- <MARKUP>em</MARKUP>
- <MARKUP>fieldset</MARKUP>
- <MARKUP>font</MARKUP>
- <MARKUP>form</MARKUP>
- <MARKUP>frame</MARKUP>
- <MARKUP>frameset</MARKUP>
- <MARKUP>h1</MARKUP>
- <MARKUP>h2</MARKUP>
- <MARKUP>h3</MARKUP>
- <MARKUP>h4</MARKUP>
- <MARKUP>h5</MARKUP>
- <MARKUP>h6</MARKUP>
- <MARKUP>head</MARKUP>
- <MARKUP>hr</MARKUP>
- <MARKUP>html</MARKUP>
- <MARKUP>i</MARKUP>
- <MARKUP>iframe</MARKUP>
- <MARKUP>img</MARKUP>
- <MARKUP>input</MARKUP>
- <MARKUP>ins</MARKUP>
- <MARKUP>isindex</MARKUP>
- <MARKUP>kbd</MARKUP>
- <MARKUP>label</MARKUP>
- <MARKUP>legend</MARKUP>
- <MARKUP>li</MARKUP>
- <MARKUP>link</MARKUP>
- <MARKUP>map</MARKUP>
- <MARKUP>menu</MARKUP>
- <MARKUP>meta</MARKUP>
- <MARKUP>noframes</MARKUP>
- <MARKUP>noscript</MARKUP>
- <MARKUP>object</MARKUP>
- <MARKUP>ol</MARKUP>
- <MARKUP>optgroup</MARKUP>
- <MARKUP>option</MARKUP>
- <MARKUP>p</MARKUP>
- <MARKUP>param</MARKUP>
- <MARKUP>pre</MARKUP>
- <MARKUP>q</MARKUP>
- <MARKUP>s</MARKUP>
- <MARKUP>samp</MARKUP>
- <MARKUP>script</MARKUP>
- <MARKUP>select</MARKUP>
- <MARKUP>small</MARKUP>
- <MARKUP>span</MARKUP>
- <MARKUP>strike</MARKUP>
- <MARKUP>strong</MARKUP>
- <MARKUP>style</MARKUP>
- <MARKUP>sub</MARKUP>
- <MARKUP>sup</MARKUP>
- <MARKUP>table</MARKUP>
- <MARKUP>tbody</MARKUP>
- <MARKUP>td</MARKUP>
- <MARKUP>textarea</MARKUP>
- <MARKUP>tfoot</MARKUP>
- <MARKUP>th</MARKUP>
- <MARKUP>thead</MARKUP>
- <MARKUP>title</MARKUP>
- <MARKUP>tr</MARKUP>
- <MARKUP>tt</MARKUP>
- <MARKUP>u</MARKUP>
- <MARKUP>ul</MARKUP>
- <MARKUP>var</MARKUP>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
- <SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">></SEQ>
- <!-- handle <SCRIPT SRC="..."> properly -->
- <SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
-
- <!-- Inline CSS -->
- <SPAN_REGEXP TYPE="MARKUP" DELEGATE="css::PROPERTIES" HASH_CHAR="style">
- <BEGIN>style\s*=\s*(["'])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
- </RULES>
-
- <RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
- <SEQ TYPE="MARKUP" DELEGATE="html::MAIN">></SEQ>
- </RULES>
-
- <RULES SET="CSS" DEFAULT="MARKUP">
- <SEQ TYPE="MARKUP" DELEGATE="css::MAIN">></SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <!-- ESCAPE is not exactly right but it is needed to correctly
+ handle JavaScript in on* parameters.
+ NOTE: ESCAPE moved from RULE to SPANs! -->
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+ <!-- Inline CSS -->
+ <SPAN_REGEXP AT_WORD_START="TRUE" TYPE="MARKUP" DELEGATE="css::PROPERTIES" HASH_CHAR="style">
+ <BEGIN>style\s*=\s*(["'])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- Javascript: delegate on* attributes to Javascript mode -->
+ <SPAN_REGEXP AT_WORD_START="TRUE" DELEGATE="javascript::MAIN" HASH_CHAR="on" TYPE="MARKUP">
+ <BEGIN>on[a-z]+\s*=\s*(["'])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- NOTE: no ESCAPE for quotes, at least for attributes; e.g onclick="alert(\"foo\");" is invalid! -->
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <KEYWORDS>
+ <!-- HTML/XHTML elements, taken from http://de.selfhtml.org/html/referenz/elemente.htm -->
+ <MARKUP>a</MARKUP>
+ <MARKUP>abbr</MARKUP>
+ <MARKUP>acronym</MARKUP>
+ <MARKUP>address</MARKUP>
+ <MARKUP>applet</MARKUP>
+ <MARKUP>area</MARKUP>
+ <MARKUP>b</MARKUP>
+ <MARKUP>base</MARKUP>
+ <MARKUP>basefont</MARKUP>
+ <MARKUP>bdo</MARKUP>
+ <MARKUP>big</MARKUP>
+ <MARKUP>blockquote</MARKUP>
+ <MARKUP>body</MARKUP>
+ <MARKUP>br</MARKUP>
+ <MARKUP>button</MARKUP>
+ <MARKUP>caption</MARKUP>
+ <MARKUP>center</MARKUP>
+ <MARKUP>cite</MARKUP>
+ <MARKUP>code</MARKUP>
+ <MARKUP>col</MARKUP>
+ <MARKUP>colgroup</MARKUP>
+ <MARKUP>dd</MARKUP>
+ <MARKUP>del</MARKUP>
+ <MARKUP>dfn</MARKUP>
+ <MARKUP>dir</MARKUP>
+ <MARKUP>div</MARKUP>
+ <MARKUP>dl</MARKUP>
+ <MARKUP>dt</MARKUP>
+ <MARKUP>em</MARKUP>
+ <MARKUP>fieldset</MARKUP>
+ <MARKUP>font</MARKUP>
+ <MARKUP>form</MARKUP>
+ <MARKUP>frame</MARKUP>
+ <MARKUP>frameset</MARKUP>
+ <MARKUP>h1</MARKUP>
+ <MARKUP>h2</MARKUP>
+ <MARKUP>h3</MARKUP>
+ <MARKUP>h4</MARKUP>
+ <MARKUP>h5</MARKUP>
+ <MARKUP>h6</MARKUP>
+ <MARKUP>head</MARKUP>
+ <MARKUP>hr</MARKUP>
+ <MARKUP>html</MARKUP>
+ <MARKUP>i</MARKUP>
+ <MARKUP>iframe</MARKUP>
+ <MARKUP>img</MARKUP>
+ <MARKUP>input</MARKUP>
+ <MARKUP>ins</MARKUP>
+ <MARKUP>isindex</MARKUP>
+ <MARKUP>kbd</MARKUP>
+ <MARKUP>label</MARKUP>
+ <MARKUP>legend</MARKUP>
+ <MARKUP>li</MARKUP>
+ <MARKUP>link</MARKUP>
+ <MARKUP>map</MARKUP>
+ <MARKUP>menu</MARKUP>
+ <MARKUP>meta</MARKUP>
+ <MARKUP>noframes</MARKUP>
+ <MARKUP>noscript</MARKUP>
+ <MARKUP>object</MARKUP>
+ <MARKUP>ol</MARKUP>
+ <MARKUP>optgroup</MARKUP>
+ <MARKUP>option</MARKUP>
+ <MARKUP>p</MARKUP>
+ <MARKUP>param</MARKUP>
+ <MARKUP>pre</MARKUP>
+ <MARKUP>q</MARKUP>
+ <MARKUP>s</MARKUP>
+ <MARKUP>samp</MARKUP>
+ <MARKUP>script</MARKUP>
+ <MARKUP>select</MARKUP>
+ <MARKUP>small</MARKUP>
+ <MARKUP>span</MARKUP>
+ <MARKUP>strike</MARKUP>
+ <MARKUP>strong</MARKUP>
+ <MARKUP>style</MARKUP>
+ <MARKUP>sub</MARKUP>
+ <MARKUP>sup</MARKUP>
+ <MARKUP>table</MARKUP>
+ <MARKUP>tbody</MARKUP>
+ <MARKUP>td</MARKUP>
+ <MARKUP>textarea</MARKUP>
+ <MARKUP>tfoot</MARKUP>
+ <MARKUP>th</MARKUP>
+ <MARKUP>thead</MARKUP>
+ <MARKUP>title</MARKUP>
+ <MARKUP>tr</MARKUP>
+ <MARKUP>tt</MARKUP>
+ <MARKUP>u</MARKUP>
+ <MARKUP>ul</MARKUP>
+ <MARKUP>var</MARKUP>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
+ <SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">></SEQ>
+ <!-- handle <SCRIPT SRC="..."> properly -->
+ <SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
+
+ <!-- Inline CSS -->
+ <SPAN_REGEXP TYPE="MARKUP" DELEGATE="css::PROPERTIES" HASH_CHAR="style">
+ <BEGIN>style\s*=\s*(["'])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+ </RULES>
+
+ <RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="html::MAIN">></SEQ>
+ </RULES>
+
+ <RULES SET="CSS" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="css::MAIN">></SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/hxml.xml b/jEdit/modes/hxml.xml
new file mode 100644
index 0000000..d888b1c
--- /dev/null
+++ b/jEdit/modes/hxml.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ This mode highlights the syntax of haXe build file.
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+
+ <!-- Comment -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <KEYWORDS IGNORE_CASE="FALSE">
+
+ <!-- target keywords -->
+ <KEYWORD1>--next</KEYWORD1>
+ <KEYWORD1>-cpp</KEYWORD1>
+ <KEYWORD1>-js</KEYWORD1>
+ <KEYWORD1>-as3</KEYWORD1>
+ <KEYWORD1>-swf</KEYWORD1>
+ <KEYWORD1>-swf9</KEYWORD1>
+ <KEYWORD1>-neko</KEYWORD1>
+ <KEYWORD1>-php</KEYWORD1>
+ <KEYWORD1>-xml</KEYWORD1>
+
+ <!-- options -->
+ <KEYWORD2>-cp</KEYWORD2>
+ <KEYWORD2>-main</KEYWORD2>
+ <KEYWORD2>-lib</KEYWORD2>
+ <KEYWORD2>-D</KEYWORD2>
+ <KEYWORD2>-v</KEYWORD2>
+ <KEYWORD2>-debug</KEYWORD2>
+ <KEYWORD2>-swf-version</KEYWORD2>
+ <KEYWORD2>-swf-header</KEYWORD2>
+ <KEYWORD2>-swf-lib</KEYWORD2>
+ <KEYWORD2>-x</KEYWORD2>
+ <KEYWORD2>-resource</KEYWORD2>
+ <KEYWORD2>-exclude</KEYWORD2>
+ <KEYWORD2>-prompt</KEYWORD2>
+ <KEYWORD2>-cmd</KEYWORD2>
+
+ <!-- advanced options -->
+ <KEYWORD3>--flash-strict</KEYWORD3>
+ <KEYWORD3>--no-traces</KEYWORD3>
+ <KEYWORD3>--flash-use-stage</KEYWORD3>
+ <KEYWORD3>--neko-source</KEYWORD3>
+ <KEYWORD3>--gen-hx-classes</KEYWORD3>
+ <KEYWORD3>--display</KEYWORD3>
+ <KEYWORD3>--no-output</KEYWORD3>
+ <KEYWORD3>--times</KEYWORD3>
+ <KEYWORD3>--no-inline</KEYWORD3>
+ <KEYWORD3>--no-opt</KEYWORD3>
+ <KEYWORD3>--php-front</KEYWORD3>
+ <KEYWORD3>--js-namespace</KEYWORD3>
+ <KEYWORD3>--remap</KEYWORD3>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/i4gl.xml b/jEdit/modes/i4gl.xml
index aedc7b7..2f48b68 100644
--- a/jEdit/modes/i4gl.xml
+++ b/jEdit/modes/i4gl.xml
@@ -1,665 +1,665 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- i4gl.xml -->
-<!-- Informix 4GL mode, by Jozsa Stefan, joozsa at flash.ro -->
-<!-- Based on 'reserved.Z' from www.iiug.org by J.Leffler -->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="{" />
- <PROPERTY NAME="commentEnd" VALUE="}" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- <PROPERTY NAME="noWordSep" VALUE="_" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SEQ TYPE="NULL">)</SEQ>
- <!-- <SEQ TYPE="NULL">(</SEQ> -->
- <SEQ TYPE="NULL">]</SEQ>
- <SEQ TYPE="NULL">[</SEQ>
- <SEQ TYPE="NULL">.</SEQ>
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SEQ TYPE="NULL">:</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">||</SEQ>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
-
- <!-- 4GL Reserved Keywords. -->
- <!-- Many keywords because SQL is embeded in 4GL -->
- <KEYWORD1>ABORT</KEYWORD1>
- <KEYWORD1>ABS</KEYWORD1>
- <KEYWORD1>ABSOLUTE</KEYWORD1>
- <KEYWORD1>ACCEPT</KEYWORD1>
- <KEYWORD1>ACCESS</KEYWORD1>
- <KEYWORD1>ACOS</KEYWORD1>
- <KEYWORD1>ADA</KEYWORD1>
- <KEYWORD1>ADD</KEYWORD1>
- <KEYWORD1>AFTER</KEYWORD1>
- <KEYWORD1>ALL</KEYWORD1>
- <KEYWORD1>ALLOCATE</KEYWORD1>
- <KEYWORD1>ALTER</KEYWORD1>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>ANSI</KEYWORD1>
- <KEYWORD1>ANY</KEYWORD1>
- <KEYWORD1>APPEND</KEYWORD1>
- <KEYWORD1>ARG_VAL</KEYWORD1>
- <KEYWORD1>ARRAY</KEYWORD1>
- <KEYWORD1>ARR_COUNT</KEYWORD1>
- <KEYWORD1>ARR_CURR</KEYWORD1>
- <KEYWORD1>AS</KEYWORD1>
- <KEYWORD1>ASC</KEYWORD1>
- <KEYWORD1>ASCENDING</KEYWORD1>
- <KEYWORD1>ASCII</KEYWORD1>
- <KEYWORD1>ASIN</KEYWORD1>
- <KEYWORD1>AT</KEYWORD1>
- <KEYWORD1>ATAN</KEYWORD1>
- <KEYWORD1>ATAN2</KEYWORD1>
- <KEYWORD1>ATTACH</KEYWORD1>
- <KEYWORD1>ATTRIBUTE</KEYWORD1>
- <KEYWORD1>ATTRIBUTES</KEYWORD1>
- <KEYWORD1>AUDIT</KEYWORD1>
- <KEYWORD1>AUTHORIZATION</KEYWORD1>
- <KEYWORD1>AUTO</KEYWORD1>
- <KEYWORD1>AUTONEXT</KEYWORD1>
- <KEYWORD1>AVERAGE</KEYWORD1>
- <KEYWORD1>AVG</KEYWORD1>
- <KEYWORD1>BEFORE</KEYWORD1>
- <KEYWORD1>BEGIN</KEYWORD1>
- <KEYWORD1>BETWEEN</KEYWORD1>
- <KEYWORD1>BLACK</KEYWORD1>
- <KEYWORD1>BLINK</KEYWORD1>
- <KEYWORD1>BLUE</KEYWORD1>
- <KEYWORD1>BOLD</KEYWORD1>
- <KEYWORD1>BORDER</KEYWORD1>
- <KEYWORD1>BOTH</KEYWORD1>
- <KEYWORD1>BOTTOM</KEYWORD1>
- <KEYWORD1>BREAK</KEYWORD1>
- <KEYWORD1>BUFFERED</KEYWORD1>
- <KEYWORD1>BY</KEYWORD1>
- <KEYWORD1>BYTE</KEYWORD1>
- <KEYWORD1>CALL</KEYWORD1>
- <KEYWORD1>CASCADE</KEYWORD1>
- <KEYWORD1>CASE</KEYWORD1>
- <KEYWORD1>CHAR</KEYWORD1>
- <KEYWORD1>CHARACTER</KEYWORD1>
- <KEYWORD1>CHARACTER_LENGTH</KEYWORD1>
- <KEYWORD1>CHAR_LENGTH</KEYWORD1>
- <KEYWORD1>CHECK</KEYWORD1>
- <KEYWORD1>CLASS_ORIGIN</KEYWORD1>
- <KEYWORD1>CLEAR</KEYWORD1>
- <KEYWORD1>CLIPPED</KEYWORD1>
- <KEYWORD1>CLOSE</KEYWORD1>
- <KEYWORD1>CLUSTER</KEYWORD1>
- <KEYWORD1>COBOL</KEYWORD1>
- <KEYWORD1>COLOR</KEYWORD1>
- <KEYWORD1>COLUMN</KEYWORD1>
- <KEYWORD1>COLUMNS</KEYWORD1>
- <KEYWORD1>COMMAND</KEYWORD1>
- <KEYWORD1>COMMENT</KEYWORD1>
- <KEYWORD1>COMMENTS</KEYWORD1>
- <KEYWORD1>COMMIT</KEYWORD1>
- <KEYWORD1>COMMITTED</KEYWORD1>
- <KEYWORD1>COMPOSITES</KEYWORD1>
- <KEYWORD1>COMPRESS</KEYWORD1>
- <KEYWORD1>CONCURRENT</KEYWORD1>
- <KEYWORD1>CONNECT</KEYWORD1>
- <KEYWORD1>CONNECTION</KEYWORD1>
- <KEYWORD1>CONNECTION_ALIAS</KEYWORD1>
- <KEYWORD1>CONSTRAINED</KEYWORD1>
- <KEYWORD1>CONSTRAINT</KEYWORD1>
- <KEYWORD1>CONSTRAINTS</KEYWORD1>
- <KEYWORD1>CONSTRUCT</KEYWORD1>
- <KEYWORD1>CONTINUE</KEYWORD1>
- <KEYWORD1>CONTROL</KEYWORD1>
- <KEYWORD1>COS</KEYWORD1>
- <KEYWORD1>COUNT</KEYWORD1>
- <KEYWORD1>CREATE</KEYWORD1>
- <KEYWORD1>CURRENT</KEYWORD1>
- <KEYWORD1>CURSOR</KEYWORD1>
- <KEYWORD1>CYAN</KEYWORD1>
- <KEYWORD1>DATA</KEYWORD1>
- <KEYWORD1>DATABASE</KEYWORD1>
- <KEYWORD1>DATASKIP</KEYWORD1>
- <KEYWORD1>DATE</KEYWORD1>
- <KEYWORD1>DATETIME</KEYWORD1>
- <KEYWORD1>DAY</KEYWORD1>
- <KEYWORD1>DBA</KEYWORD1>
- <KEYWORD1>DBINFO</KEYWORD1>
- <KEYWORD1>DBSERVERNAME</KEYWORD1>
- <KEYWORD1>DEALLOCATE</KEYWORD1>
- <KEYWORD1>DEBUG</KEYWORD1>
- <KEYWORD1>DEC</KEYWORD1>
- <KEYWORD1>DECIMAL</KEYWORD1>
- <KEYWORD1>DECLARE</KEYWORD1>
- <KEYWORD1>DEFAULT</KEYWORD1>
- <KEYWORD1>DEFAULTS</KEYWORD1>
- <KEYWORD1>DEFER</KEYWORD1>
- <KEYWORD1>DEFERRED</KEYWORD1>
- <KEYWORD1>DEFINE</KEYWORD1>
- <KEYWORD1>DELETE</KEYWORD1>
- <KEYWORD1>DELIMITER</KEYWORD1>
- <KEYWORD1>DELIMITERS</KEYWORD1>
- <KEYWORD1>DESC</KEYWORD1>
- <KEYWORD1>DESCENDING</KEYWORD1>
- <KEYWORD1>DESCRIBE</KEYWORD1>
- <KEYWORD1>DESCRIPTOR</KEYWORD1>
- <KEYWORD1>DETACH</KEYWORD1>
- <KEYWORD1>DIAGNOSTICS</KEYWORD1>
- <KEYWORD1>DIM</KEYWORD1>
- <KEYWORD1>DIRTY</KEYWORD1>
- <KEYWORD1>DISABLED</KEYWORD1>
- <KEYWORD1>DISCONNECT</KEYWORD1>
- <KEYWORD1>DISPLAY</KEYWORD1>
- <KEYWORD1>DISTINCT</KEYWORD1>
- <KEYWORD1>DISTRIBUTIONS</KEYWORD1>
- <KEYWORD1>DO</KEYWORD1>
- <KEYWORD1>DORMANT</KEYWORD1>
- <KEYWORD1>DOUBLE</KEYWORD1>
- <KEYWORD1>DOWN</KEYWORD1>
- <KEYWORD1>DOWNSHIFT</KEYWORD1>
- <KEYWORD1>DROP</KEYWORD1>
- <KEYWORD1>EACH</KEYWORD1>
- <KEYWORD1>ELIF</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>ENABLED</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>ENTRY</KEYWORD1>
- <KEYWORD1>ERROR</KEYWORD1>
- <KEYWORD1>ERRORLOG</KEYWORD1>
- <KEYWORD1>ERR_GET</KEYWORD1>
- <KEYWORD1>ERR_PRINT</KEYWORD1>
- <KEYWORD1>ERR_QUIT</KEYWORD1>
- <KEYWORD1>ESC</KEYWORD1>
- <KEYWORD1>ESCAPE</KEYWORD1>
- <KEYWORD1>EVERY</KEYWORD1>
- <KEYWORD1>EXCEPTION</KEYWORD1>
- <KEYWORD1>EXCLUSIVE</KEYWORD1>
- <KEYWORD1>EXEC</KEYWORD1>
- <KEYWORD1>EXECUTE</KEYWORD1>
- <KEYWORD1>EXISTS</KEYWORD1>
- <KEYWORD1>EXIT</KEYWORD1>
- <KEYWORD1>EXP</KEYWORD1>
- <KEYWORD1>EXPLAIN</KEYWORD1>
- <KEYWORD1>EXPRESSION</KEYWORD1>
- <KEYWORD1>EXTEND</KEYWORD1>
- <KEYWORD1>EXTENT</KEYWORD1>
- <KEYWORD1>EXTERN</KEYWORD1>
- <KEYWORD1>EXTERNAL</KEYWORD1>
- <KEYWORD1>F1</KEYWORD1>
- <KEYWORD1>F10</KEYWORD1>
- <KEYWORD1>F11</KEYWORD1>
- <KEYWORD1>F12</KEYWORD1>
- <KEYWORD1>F13</KEYWORD1>
- <KEYWORD1>F14</KEYWORD1>
- <KEYWORD1>F15</KEYWORD1>
- <KEYWORD1>F16</KEYWORD1>
- <KEYWORD1>F17</KEYWORD1>
- <KEYWORD1>F18</KEYWORD1>
- <KEYWORD1>F19</KEYWORD1>
- <KEYWORD1>F2</KEYWORD1>
- <KEYWORD1>F20</KEYWORD1>
- <KEYWORD1>F21</KEYWORD1>
- <KEYWORD1>F22</KEYWORD1>
- <KEYWORD1>F23</KEYWORD1>
- <KEYWORD1>F24</KEYWORD1>
- <KEYWORD1>F25</KEYWORD1>
- <KEYWORD1>F26</KEYWORD1>
- <KEYWORD1>F27</KEYWORD1>
- <KEYWORD1>F28</KEYWORD1>
- <KEYWORD1>F29</KEYWORD1>
- <KEYWORD1>F3</KEYWORD1>
- <KEYWORD1>F30</KEYWORD1>
- <KEYWORD1>F31</KEYWORD1>
- <KEYWORD1>F32</KEYWORD1>
- <KEYWORD1>F33</KEYWORD1>
- <KEYWORD1>F34</KEYWORD1>
- <KEYWORD1>F35</KEYWORD1>
- <KEYWORD1>F36</KEYWORD1>
- <KEYWORD1>F37</KEYWORD1>
- <KEYWORD1>F38</KEYWORD1>
- <KEYWORD1>F39</KEYWORD1>
- <KEYWORD1>F4</KEYWORD1>
- <KEYWORD1>F40</KEYWORD1>
- <KEYWORD1>F41</KEYWORD1>
- <KEYWORD1>F42</KEYWORD1>
- <KEYWORD1>F43</KEYWORD1>
- <KEYWORD1>F44</KEYWORD1>
- <KEYWORD1>F45</KEYWORD1>
- <KEYWORD1>F46</KEYWORD1>
- <KEYWORD1>F47</KEYWORD1>
- <KEYWORD1>F48</KEYWORD1>
- <KEYWORD1>F49</KEYWORD1>
- <KEYWORD1>F5</KEYWORD1>
- <KEYWORD1>F50</KEYWORD1>
- <KEYWORD1>F51</KEYWORD1>
- <KEYWORD1>F52</KEYWORD1>
- <KEYWORD1>F53</KEYWORD1>
- <KEYWORD1>F54</KEYWORD1>
- <KEYWORD1>F55</KEYWORD1>
- <KEYWORD1>F56</KEYWORD1>
- <KEYWORD1>F57</KEYWORD1>
- <KEYWORD1>F58</KEYWORD1>
- <KEYWORD1>F59</KEYWORD1>
- <KEYWORD1>F6</KEYWORD1>
- <KEYWORD1>F60</KEYWORD1>
- <KEYWORD1>F61</KEYWORD1>
- <KEYWORD1>F62</KEYWORD1>
- <KEYWORD1>F63</KEYWORD1>
- <KEYWORD1>F64</KEYWORD1>
- <KEYWORD1>F7</KEYWORD1>
- <KEYWORD1>F8</KEYWORD1>
- <KEYWORD1>F9</KEYWORD1>
- <KEYWORD1>FALSE</KEYWORD1>
- <KEYWORD1>FETCH</KEYWORD1>
- <KEYWORD1>FGL_GETENV</KEYWORD1>
- <KEYWORD1>FGL_KEYVAL</KEYWORD1>
- <KEYWORD1>FGL_LASTKEY</KEYWORD1>
- <KEYWORD1>FIELD</KEYWORD1>
- <KEYWORD1>FIELD_TOUCHED</KEYWORD1>
- <KEYWORD1>FILE</KEYWORD1>
- <KEYWORD1>FILLFACTOR</KEYWORD1>
- <KEYWORD1>FILTERING</KEYWORD1>
- <KEYWORD1>FINISH</KEYWORD1>
- <KEYWORD1>FIRST</KEYWORD1>
- <KEYWORD1>FLOAT</KEYWORD1>
- <KEYWORD1>FLUSH</KEYWORD1>
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>FOREACH</KEYWORD1>
- <KEYWORD1>FOREIGN</KEYWORD1>
- <KEYWORD1>FORM</KEYWORD1>
- <KEYWORD1>FORMAT</KEYWORD1>
- <KEYWORD1>FORMONLY</KEYWORD1>
- <KEYWORD1>FORTRAN</KEYWORD1>
- <KEYWORD1>FOUND</KEYWORD1>
- <KEYWORD1>FRACTION</KEYWORD1>
- <KEYWORD1>FRAGMENT</KEYWORD1>
- <KEYWORD1>FREE</KEYWORD1>
- <KEYWORD1>FROM</KEYWORD1>
- <KEYWORD1>FUNCTION</KEYWORD1>
- <KEYWORD1>GET_FLDBUF</KEYWORD1>
- <KEYWORD1>GLOBAL</KEYWORD1>
- <KEYWORD1>GLOBALS</KEYWORD1>
- <KEYWORD1>GO</KEYWORD1>
- <KEYWORD1>GOTO</KEYWORD1>
- <KEYWORD1>GRANT</KEYWORD1>
- <KEYWORD1>GREEN</KEYWORD1>
- <KEYWORD1>GROUP</KEYWORD1>
- <KEYWORD1>HAVING</KEYWORD1>
- <KEYWORD1>HEADER</KEYWORD1>
- <KEYWORD1>HELP</KEYWORD1>
- <KEYWORD1>HEX</KEYWORD1>
- <KEYWORD1>HIDE</KEYWORD1>
- <KEYWORD1>HIGH</KEYWORD1>
- <KEYWORD1>HOLD</KEYWORD1>
- <KEYWORD1>HOUR</KEYWORD1>
- <KEYWORD1>IDATA</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>ILENGTH</KEYWORD1>
- <KEYWORD1>IMMEDIATE</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>INCLUDE</KEYWORD1>
- <KEYWORD1>INDEX</KEYWORD1>
- <KEYWORD1>INDEXES</KEYWORD1>
- <KEYWORD1>INDICATOR</KEYWORD1>
- <KEYWORD1>INFIELD</KEYWORD1>
- <KEYWORD1>INIT</KEYWORD1>
- <KEYWORD1>INITIALIZE</KEYWORD1>
- <KEYWORD1>INPUT</KEYWORD1>
- <KEYWORD1>INSERT</KEYWORD1>
- <KEYWORD1>INSTRUCTIONS</KEYWORD1>
- <KEYWORD1>INT</KEYWORD1>
- <KEYWORD1>INTEGER</KEYWORD1>
- <KEYWORD1>INTERRUPT</KEYWORD1>
- <KEYWORD1>INTERVAL</KEYWORD1>
- <KEYWORD1>INTO</KEYWORD1>
- <KEYWORD1>INT_FLAG</KEYWORD1>
- <KEYWORD1>INVISIBLE</KEYWORD1>
- <KEYWORD1>IS</KEYWORD1>
- <KEYWORD1>ISAM</KEYWORD1>
- <KEYWORD1>ISOLATION</KEYWORD1>
- <KEYWORD1>ITYPE</KEYWORD1>
- <KEYWORD1>KEY</KEYWORD1>
- <KEYWORD1>LABEL</KEYWORD1>
- <KEYWORD1>LANGUAGE</KEYWORD1>
- <KEYWORD1>LAST</KEYWORD1>
- <KEYWORD1>LEADING</KEYWORD1>
- <KEYWORD1>LEFT</KEYWORD1>
- <KEYWORD1>LENGTH</KEYWORD1>
- <KEYWORD1>LET</KEYWORD1>
- <KEYWORD1>LIKE</KEYWORD1>
- <KEYWORD1>LINE</KEYWORD1>
- <KEYWORD1>LINENO</KEYWORD1>
- <KEYWORD1>LINES</KEYWORD1>
- <KEYWORD1>LOAD</KEYWORD1>
- <KEYWORD1>LOCATE</KEYWORD1>
- <KEYWORD1>LOCK</KEYWORD1>
- <KEYWORD1>LOG</KEYWORD1>
- <KEYWORD1>LOG10</KEYWORD1>
- <KEYWORD1>LOGN</KEYWORD1>
- <KEYWORD1>LONG</KEYWORD1>
- <KEYWORD1>LOW</KEYWORD1>
- <KEYWORD1>MAGENTA</KEYWORD1>
- <KEYWORD1>MAIN</KEYWORD1>
- <KEYWORD1>MARGIN</KEYWORD1>
- <KEYWORD1>MATCHES</KEYWORD1>
- <KEYWORD1>MAX</KEYWORD1>
- <KEYWORD1>MDY</KEYWORD1>
- <KEYWORD1>MEDIUM</KEYWORD1>
- <KEYWORD1>MEMORY</KEYWORD1>
- <KEYWORD1>MENU</KEYWORD1>
- <KEYWORD1>MESSAGE</KEYWORD1>
- <KEYWORD1>MESSAGE_LENGTH</KEYWORD1>
- <KEYWORD1>MESSAGE_TEXT</KEYWORD1>
- <KEYWORD1>MIN</KEYWORD1>
- <KEYWORD1>MINUTE</KEYWORD1>
- <KEYWORD1>MOD</KEYWORD1>
- <KEYWORD1>MODE</KEYWORD1>
- <KEYWORD1>MODIFY</KEYWORD1>
- <KEYWORD1>MODULE</KEYWORD1>
- <KEYWORD1>MONEY</KEYWORD1>
- <KEYWORD1>MONTH</KEYWORD1>
- <KEYWORD1>MORE</KEYWORD1>
- <KEYWORD1>NAME</KEYWORD1>
- <KEYWORD1>NCHAR</KEYWORD1>
- <KEYWORD1>NEED</KEYWORD1>
- <KEYWORD1>NEW</KEYWORD1>
- <KEYWORD1>NEXT</KEYWORD1>
- <KEYWORD1>NEXTPAGE</KEYWORD1>
- <KEYWORD1>NO</KEYWORD1>
- <KEYWORD1>NOCR</KEYWORD1>
- <KEYWORD1>NOENTRY</KEYWORD1>
- <KEYWORD1>NONE</KEYWORD1>
- <KEYWORD1>NORMAL</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>NOTFOUND</KEYWORD1>
- <KEYWORD1>NULL</KEYWORD1>
- <KEYWORD1>NULLABLE</KEYWORD1>
- <KEYWORD1>NUMBER</KEYWORD1>
- <KEYWORD1>NUMERIC</KEYWORD1>
- <KEYWORD1>NUM_ARGS</KEYWORD1>
- <KEYWORD1>NVARCHAR</KEYWORD1>
- <KEYWORD1>OCTET_LENGTH</KEYWORD1>
- <KEYWORD1>OF</KEYWORD1>
- <KEYWORD1>OFF</KEYWORD1>
- <KEYWORD1>OLD</KEYWORD1>
- <KEYWORD1>ON</KEYWORD1>
- <KEYWORD1>ONLY</KEYWORD1>
- <KEYWORD1>OPEN</KEYWORD1>
- <KEYWORD1>OPTIMIZATION</KEYWORD1>
- <KEYWORD1>OPTION</KEYWORD1>
- <KEYWORD1>OPTIONS</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>ORDER</KEYWORD1>
- <KEYWORD1>OTHERWISE</KEYWORD1>
- <KEYWORD1>OUTER</KEYWORD1>
- <KEYWORD1>OUTPUT</KEYWORD1>
- <KEYWORD1>PAGE</KEYWORD1>
- <KEYWORD1>PAGENO</KEYWORD1>
- <KEYWORD1>PASCAL</KEYWORD1>
- <KEYWORD1>PAUSE</KEYWORD1>
- <KEYWORD1>PDQPRIORITY</KEYWORD1>
- <KEYWORD1>PERCENT</KEYWORD1>
- <KEYWORD1>PICTURE</KEYWORD1>
- <KEYWORD1>PIPE</KEYWORD1>
- <KEYWORD1>PLI</KEYWORD1>
- <KEYWORD1>POW</KEYWORD1>
- <KEYWORD1>PRECISION</KEYWORD1>
- <KEYWORD1>PREPARE</KEYWORD1>
- <KEYWORD1>PREVIOUS</KEYWORD1>
- <KEYWORD1>PREVPAGE</KEYWORD1>
- <KEYWORD1>PRIMARY</KEYWORD1>
- <KEYWORD1>PRINT</KEYWORD1>
- <KEYWORD1>PRINTER</KEYWORD1>
- <KEYWORD1>PRIOR</KEYWORD1>
- <KEYWORD1>PRIVATE</KEYWORD1>
- <KEYWORD1>PRIVILEGES</KEYWORD1>
- <KEYWORD1>PROCEDURE</KEYWORD1>
- <KEYWORD1>PROGRAM</KEYWORD1>
- <KEYWORD1>PROMPT</KEYWORD1>
- <KEYWORD1>PUBLIC</KEYWORD1>
- <KEYWORD1>PUT</KEYWORD1>
- <KEYWORD1>QUIT</KEYWORD1>
- <KEYWORD1>QUIT_FLAG</KEYWORD1>
- <KEYWORD1>RAISE</KEYWORD1>
- <KEYWORD1>RANGE</KEYWORD1>
- <KEYWORD1>READ</KEYWORD1>
- <KEYWORD1>READONLY</KEYWORD1>
- <KEYWORD1>REAL</KEYWORD1>
- <KEYWORD1>RECORD</KEYWORD1>
- <KEYWORD1>RECOVER</KEYWORD1>
- <KEYWORD1>RED</KEYWORD1>
- <KEYWORD1>REFERENCES</KEYWORD1>
- <KEYWORD1>REFERENCING</KEYWORD1>
- <KEYWORD1>REGISTER</KEYWORD1>
- <KEYWORD1>RELATIVE</KEYWORD1>
- <KEYWORD1>REMAINDER</KEYWORD1>
- <KEYWORD1>REMOVE</KEYWORD1>
- <KEYWORD1>RENAME</KEYWORD1>
- <KEYWORD1>REOPTIMIZATION</KEYWORD1>
- <KEYWORD1>REPEATABLE</KEYWORD1>
- <KEYWORD1>REPORT</KEYWORD1>
- <KEYWORD1>REQUIRED</KEYWORD1>
- <KEYWORD1>RESOLUTION</KEYWORD1>
- <KEYWORD1>RESOURCE</KEYWORD1>
- <KEYWORD1>RESTRICT</KEYWORD1>
- <KEYWORD1>RESUME</KEYWORD1>
- <KEYWORD1>RETURN</KEYWORD1>
- <KEYWORD1>RETURNED_SQLSTATE</KEYWORD1>
- <KEYWORD1>RETURNING</KEYWORD1>
- <KEYWORD1>REVERSE</KEYWORD1>
- <KEYWORD1>REVOKE</KEYWORD1>
- <KEYWORD1>RIGHT</KEYWORD1>
- <KEYWORD1>ROBIN</KEYWORD1>
- <KEYWORD1>ROLE</KEYWORD1>
- <KEYWORD1>ROLLBACK</KEYWORD1>
- <KEYWORD1>ROLLFORWARD</KEYWORD1>
- <KEYWORD1>ROOT</KEYWORD1>
- <KEYWORD1>ROUND</KEYWORD1>
- <KEYWORD1>ROW</KEYWORD1>
- <KEYWORD1>ROWID</KEYWORD1>
- <KEYWORD1>ROWIDS</KEYWORD1>
- <KEYWORD1>ROWS</KEYWORD1>
- <KEYWORD1>ROW_COUNT</KEYWORD1>
- <KEYWORD1>RUN</KEYWORD1>
- <KEYWORD1>SCALE</KEYWORD1>
- <KEYWORD1>SCHEMA</KEYWORD1>
- <KEYWORD1>SCREEN</KEYWORD1>
- <KEYWORD1>SCROLL</KEYWORD1>
- <KEYWORD1>SCR_LINE</KEYWORD1>
- <KEYWORD1>SECOND</KEYWORD1>
- <KEYWORD1>SECTION</KEYWORD1>
- <KEYWORD1>SELECT</KEYWORD1>
- <KEYWORD1>SERIAL</KEYWORD1>
- <KEYWORD1>SERIALIZABLE</KEYWORD1>
- <KEYWORD1>SERVER_NAME</KEYWORD1>
- <KEYWORD1>SESSION</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>SET_COUNT</KEYWORD1>
- <KEYWORD1>SHARE</KEYWORD1>
- <KEYWORD1>SHORT</KEYWORD1>
- <KEYWORD1>SHOW</KEYWORD1>
- <KEYWORD1>SITENAME</KEYWORD1>
- <KEYWORD1>SIZE</KEYWORD1>
- <KEYWORD1>SIZEOF</KEYWORD1>
- <KEYWORD1>SKIP</KEYWORD1>
- <KEYWORD1>SLEEP</KEYWORD1>
- <KEYWORD1>SMALLFLOAT</KEYWORD1>
- <KEYWORD1>SMALLINT</KEYWORD1>
- <KEYWORD1>SOME</KEYWORD1>
- <KEYWORD1>SPACE</KEYWORD1>
- <KEYWORD1>SPACES</KEYWORD1>
- <KEYWORD1>SQL</KEYWORD1>
- <KEYWORD1>SQLAWARN</KEYWORD1>
- <KEYWORD1>SQLCA</KEYWORD1>
- <KEYWORD1>SQLCODE</KEYWORD1>
- <KEYWORD1>SQLERRD</KEYWORD1>
- <KEYWORD1>SQLERRM</KEYWORD1>
- <KEYWORD1>SQLERROR</KEYWORD1>
- <KEYWORD1>SQLERRP</KEYWORD1>
- <KEYWORD1>SQLSTATE</KEYWORD1>
- <KEYWORD1>SQLWARNING</KEYWORD1>
- <KEYWORD1>SQRT</KEYWORD1>
- <KEYWORD1>STABILITY</KEYWORD1>
- <KEYWORD1>START</KEYWORD1>
- <KEYWORD1>STARTLOG</KEYWORD1>
- <KEYWORD1>STATIC</KEYWORD1>
- <KEYWORD1>STATISTICS</KEYWORD1>
- <KEYWORD1>STATUS</KEYWORD1>
- <KEYWORD1>STDEV</KEYWORD1>
- <KEYWORD1>STEP</KEYWORD1>
- <KEYWORD1>STOP</KEYWORD1>
- <KEYWORD1>STRING</KEYWORD1>
- <KEYWORD1>STRUCT</KEYWORD1>
- <KEYWORD1>SUBCLASS_ORIGIN</KEYWORD1>
- <KEYWORD1>SUM</KEYWORD1>
- <KEYWORD1>SWITCH</KEYWORD1>
- <KEYWORD1>SYNONYM</KEYWORD1>
- <KEYWORD1>SYSTEM</KEYWORD1>
- <KEYWORD1>SysBlobs</KEYWORD1>
- <KEYWORD1>SysChecks</KEYWORD1>
- <KEYWORD1>SysColAuth</KEYWORD1>
- <KEYWORD1>SysColDepend</KEYWORD1>
- <KEYWORD1>SysColumns</KEYWORD1>
- <KEYWORD1>SysConstraints</KEYWORD1>
- <KEYWORD1>SysDefaults</KEYWORD1>
- <KEYWORD1>SysDepend</KEYWORD1>
- <KEYWORD1>SysDistrib</KEYWORD1>
- <KEYWORD1>SysFragAuth</KEYWORD1>
- <KEYWORD1>SysFragments</KEYWORD1>
- <KEYWORD1>SysIndexes</KEYWORD1>
- <KEYWORD1>SysObjState</KEYWORD1>
- <KEYWORD1>SysOpClstr</KEYWORD1>
- <KEYWORD1>SysProcAuth</KEYWORD1>
- <KEYWORD1>SysProcBody</KEYWORD1>
- <KEYWORD1>SysProcPlan</KEYWORD1>
- <KEYWORD1>SysProcedures</KEYWORD1>
- <KEYWORD1>SysReferences</KEYWORD1>
- <KEYWORD1>SysRoleAuth</KEYWORD1>
- <KEYWORD1>SysSynTable</KEYWORD1>
- <KEYWORD1>SysSynonyms</KEYWORD1>
- <KEYWORD1>SysTabAuth</KEYWORD1>
- <KEYWORD1>SysTables</KEYWORD1>
- <KEYWORD1>SysTrigBody</KEYWORD1>
- <KEYWORD1>SysTriggers</KEYWORD1>
- <KEYWORD1>SysUsers</KEYWORD1>
- <KEYWORD1>SysViews</KEYWORD1>
- <KEYWORD1>SysViolations</KEYWORD1>
- <KEYWORD1>TAB</KEYWORD1>
- <KEYWORD1>TABLE</KEYWORD1>
- <KEYWORD1>TABLES</KEYWORD1>
- <KEYWORD1>TAN</KEYWORD1>
- <KEYWORD1>TEMP</KEYWORD1>
- <KEYWORD1>TEXT</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>THROUGH</KEYWORD1>
- <KEYWORD1>THRU</KEYWORD1>
- <KEYWORD1>TIME</KEYWORD1>
- <KEYWORD1>TO</KEYWORD1>
- <KEYWORD1>TODAY</KEYWORD1>
- <KEYWORD1>TOP</KEYWORD1>
- <KEYWORD1>TOTAL</KEYWORD1>
- <KEYWORD1>TRACE</KEYWORD1>
- <KEYWORD1>TRAILER</KEYWORD1>
- <KEYWORD1>TRAILING</KEYWORD1>
- <KEYWORD1>TRANSACTION</KEYWORD1>
- <KEYWORD1>TRIGGER</KEYWORD1>
- <KEYWORD1>TRIGGERS</KEYWORD1>
- <KEYWORD1>TRIM</KEYWORD1>
- <KEYWORD1>TRUE</KEYWORD1>
- <KEYWORD1>TRUNC</KEYWORD1>
- <KEYWORD1>TYPE</KEYWORD1>
- <KEYWORD1>TYPEDEF</KEYWORD1>
- <KEYWORD1>UNCOMMITTED</KEYWORD1>
- <KEYWORD1>UNCONSTRAINED</KEYWORD1>
- <KEYWORD1>UNDERLINE</KEYWORD1>
- <KEYWORD1>UNION</KEYWORD1>
- <KEYWORD1>UNIQUE</KEYWORD1>
- <KEYWORD1>UNITS</KEYWORD1>
- <KEYWORD1>UNLOAD</KEYWORD1>
- <KEYWORD1>UNLOCK</KEYWORD1>
- <KEYWORD1>UNSIGNED</KEYWORD1>
- <KEYWORD1>UP</KEYWORD1>
- <KEYWORD1>UPDATE</KEYWORD1>
- <KEYWORD1>UPSHIFT</KEYWORD1>
- <KEYWORD1>USER</KEYWORD1>
- <KEYWORD1>USING</KEYWORD1>
- <KEYWORD1>VALIDATE</KEYWORD1>
- <KEYWORD1>VALUE</KEYWORD1>
- <KEYWORD1>VALUES</KEYWORD1>
- <KEYWORD1>VARCHAR</KEYWORD1>
- <KEYWORD1>VARIABLES</KEYWORD1>
- <KEYWORD1>VARIANCE</KEYWORD1>
- <KEYWORD1>VARYING</KEYWORD1>
- <KEYWORD1>VERIFY</KEYWORD1>
- <KEYWORD1>VIEW</KEYWORD1>
- <KEYWORD1>VIOLATIONS</KEYWORD1>
- <KEYWORD1>WAIT</KEYWORD1>
- <KEYWORD1>WAITING</KEYWORD1>
- <KEYWORD1>WARNING</KEYWORD1>
- <KEYWORD1>WEEKDAY</KEYWORD1>
- <KEYWORD1>WHEN</KEYWORD1>
- <KEYWORD1>WHENEVER</KEYWORD1>
- <KEYWORD1>WHERE</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
- <KEYWORD1>WHITE</KEYWORD1>
- <KEYWORD1>WINDOW</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>WITHOUT</KEYWORD1>
- <KEYWORD1>WORDWRAP</KEYWORD1>
- <KEYWORD1>WORK</KEYWORD1>
- <KEYWORD1>WRAP</KEYWORD1>
- <KEYWORD1>WRITE</KEYWORD1>
- <KEYWORD1>YEAR</KEYWORD1>
- <KEYWORD1>YELLOW</KEYWORD1>
- <KEYWORD1>ZEROFILL</KEYWORD1>
-
-
- <!-- special, keywords/literals -->
- <LITERAL2>FALSE</LITERAL2>
- <LITERAL2>NULL</LITERAL2>
- <LITERAL2>TRUE</LITERAL2>
-
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- i4gl.xml -->
+<!-- Informix 4GL mode, by Jozsa Stefan, joozsa at flash.ro -->
+<!-- Based on 'reserved.Z' from www.iiug.org by J.Leffler -->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="{" />
+ <PROPERTY NAME="commentEnd" VALUE="}" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ <PROPERTY NAME="noWordSep" VALUE="_" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SEQ TYPE="NULL">)</SEQ>
+ <!-- <SEQ TYPE="NULL">(</SEQ> -->
+ <SEQ TYPE="NULL">]</SEQ>
+ <SEQ TYPE="NULL">[</SEQ>
+ <SEQ TYPE="NULL">.</SEQ>
+ <SEQ TYPE="NULL">,</SEQ>
+ <SEQ TYPE="NULL">;</SEQ>
+ <SEQ TYPE="NULL">:</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">||</SEQ>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+
+ <!-- 4GL Reserved Keywords. -->
+ <!-- Many keywords because SQL is embeded in 4GL -->
+ <KEYWORD1>ABORT</KEYWORD1>
+ <KEYWORD1>ABS</KEYWORD1>
+ <KEYWORD1>ABSOLUTE</KEYWORD1>
+ <KEYWORD1>ACCEPT</KEYWORD1>
+ <KEYWORD1>ACCESS</KEYWORD1>
+ <KEYWORD1>ACOS</KEYWORD1>
+ <KEYWORD1>ADA</KEYWORD1>
+ <KEYWORD1>ADD</KEYWORD1>
+ <KEYWORD1>AFTER</KEYWORD1>
+ <KEYWORD1>ALL</KEYWORD1>
+ <KEYWORD1>ALLOCATE</KEYWORD1>
+ <KEYWORD1>ALTER</KEYWORD1>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>ANSI</KEYWORD1>
+ <KEYWORD1>ANY</KEYWORD1>
+ <KEYWORD1>APPEND</KEYWORD1>
+ <KEYWORD1>ARG_VAL</KEYWORD1>
+ <KEYWORD1>ARRAY</KEYWORD1>
+ <KEYWORD1>ARR_COUNT</KEYWORD1>
+ <KEYWORD1>ARR_CURR</KEYWORD1>
+ <KEYWORD1>AS</KEYWORD1>
+ <KEYWORD1>ASC</KEYWORD1>
+ <KEYWORD1>ASCENDING</KEYWORD1>
+ <KEYWORD1>ASCII</KEYWORD1>
+ <KEYWORD1>ASIN</KEYWORD1>
+ <KEYWORD1>AT</KEYWORD1>
+ <KEYWORD1>ATAN</KEYWORD1>
+ <KEYWORD1>ATAN2</KEYWORD1>
+ <KEYWORD1>ATTACH</KEYWORD1>
+ <KEYWORD1>ATTRIBUTE</KEYWORD1>
+ <KEYWORD1>ATTRIBUTES</KEYWORD1>
+ <KEYWORD1>AUDIT</KEYWORD1>
+ <KEYWORD1>AUTHORIZATION</KEYWORD1>
+ <KEYWORD1>AUTO</KEYWORD1>
+ <KEYWORD1>AUTONEXT</KEYWORD1>
+ <KEYWORD1>AVERAGE</KEYWORD1>
+ <KEYWORD1>AVG</KEYWORD1>
+ <KEYWORD1>BEFORE</KEYWORD1>
+ <KEYWORD1>BEGIN</KEYWORD1>
+ <KEYWORD1>BETWEEN</KEYWORD1>
+ <KEYWORD1>BLACK</KEYWORD1>
+ <KEYWORD1>BLINK</KEYWORD1>
+ <KEYWORD1>BLUE</KEYWORD1>
+ <KEYWORD1>BOLD</KEYWORD1>
+ <KEYWORD1>BORDER</KEYWORD1>
+ <KEYWORD1>BOTH</KEYWORD1>
+ <KEYWORD1>BOTTOM</KEYWORD1>
+ <KEYWORD1>BREAK</KEYWORD1>
+ <KEYWORD1>BUFFERED</KEYWORD1>
+ <KEYWORD1>BY</KEYWORD1>
+ <KEYWORD1>BYTE</KEYWORD1>
+ <KEYWORD1>CALL</KEYWORD1>
+ <KEYWORD1>CASCADE</KEYWORD1>
+ <KEYWORD1>CASE</KEYWORD1>
+ <KEYWORD1>CHAR</KEYWORD1>
+ <KEYWORD1>CHARACTER</KEYWORD1>
+ <KEYWORD1>CHARACTER_LENGTH</KEYWORD1>
+ <KEYWORD1>CHAR_LENGTH</KEYWORD1>
+ <KEYWORD1>CHECK</KEYWORD1>
+ <KEYWORD1>CLASS_ORIGIN</KEYWORD1>
+ <KEYWORD1>CLEAR</KEYWORD1>
+ <KEYWORD1>CLIPPED</KEYWORD1>
+ <KEYWORD1>CLOSE</KEYWORD1>
+ <KEYWORD1>CLUSTER</KEYWORD1>
+ <KEYWORD1>COBOL</KEYWORD1>
+ <KEYWORD1>COLOR</KEYWORD1>
+ <KEYWORD1>COLUMN</KEYWORD1>
+ <KEYWORD1>COLUMNS</KEYWORD1>
+ <KEYWORD1>COMMAND</KEYWORD1>
+ <KEYWORD1>COMMENT</KEYWORD1>
+ <KEYWORD1>COMMENTS</KEYWORD1>
+ <KEYWORD1>COMMIT</KEYWORD1>
+ <KEYWORD1>COMMITTED</KEYWORD1>
+ <KEYWORD1>COMPOSITES</KEYWORD1>
+ <KEYWORD1>COMPRESS</KEYWORD1>
+ <KEYWORD1>CONCURRENT</KEYWORD1>
+ <KEYWORD1>CONNECT</KEYWORD1>
+ <KEYWORD1>CONNECTION</KEYWORD1>
+ <KEYWORD1>CONNECTION_ALIAS</KEYWORD1>
+ <KEYWORD1>CONSTRAINED</KEYWORD1>
+ <KEYWORD1>CONSTRAINT</KEYWORD1>
+ <KEYWORD1>CONSTRAINTS</KEYWORD1>
+ <KEYWORD1>CONSTRUCT</KEYWORD1>
+ <KEYWORD1>CONTINUE</KEYWORD1>
+ <KEYWORD1>CONTROL</KEYWORD1>
+ <KEYWORD1>COS</KEYWORD1>
+ <KEYWORD1>COUNT</KEYWORD1>
+ <KEYWORD1>CREATE</KEYWORD1>
+ <KEYWORD1>CURRENT</KEYWORD1>
+ <KEYWORD1>CURSOR</KEYWORD1>
+ <KEYWORD1>CYAN</KEYWORD1>
+ <KEYWORD1>DATA</KEYWORD1>
+ <KEYWORD1>DATABASE</KEYWORD1>
+ <KEYWORD1>DATASKIP</KEYWORD1>
+ <KEYWORD1>DATE</KEYWORD1>
+ <KEYWORD1>DATETIME</KEYWORD1>
+ <KEYWORD1>DAY</KEYWORD1>
+ <KEYWORD1>DBA</KEYWORD1>
+ <KEYWORD1>DBINFO</KEYWORD1>
+ <KEYWORD1>DBSERVERNAME</KEYWORD1>
+ <KEYWORD1>DEALLOCATE</KEYWORD1>
+ <KEYWORD1>DEBUG</KEYWORD1>
+ <KEYWORD1>DEC</KEYWORD1>
+ <KEYWORD1>DECIMAL</KEYWORD1>
+ <KEYWORD1>DECLARE</KEYWORD1>
+ <KEYWORD1>DEFAULT</KEYWORD1>
+ <KEYWORD1>DEFAULTS</KEYWORD1>
+ <KEYWORD1>DEFER</KEYWORD1>
+ <KEYWORD1>DEFERRED</KEYWORD1>
+ <KEYWORD1>DEFINE</KEYWORD1>
+ <KEYWORD1>DELETE</KEYWORD1>
+ <KEYWORD1>DELIMITER</KEYWORD1>
+ <KEYWORD1>DELIMITERS</KEYWORD1>
+ <KEYWORD1>DESC</KEYWORD1>
+ <KEYWORD1>DESCENDING</KEYWORD1>
+ <KEYWORD1>DESCRIBE</KEYWORD1>
+ <KEYWORD1>DESCRIPTOR</KEYWORD1>
+ <KEYWORD1>DETACH</KEYWORD1>
+ <KEYWORD1>DIAGNOSTICS</KEYWORD1>
+ <KEYWORD1>DIM</KEYWORD1>
+ <KEYWORD1>DIRTY</KEYWORD1>
+ <KEYWORD1>DISABLED</KEYWORD1>
+ <KEYWORD1>DISCONNECT</KEYWORD1>
+ <KEYWORD1>DISPLAY</KEYWORD1>
+ <KEYWORD1>DISTINCT</KEYWORD1>
+ <KEYWORD1>DISTRIBUTIONS</KEYWORD1>
+ <KEYWORD1>DO</KEYWORD1>
+ <KEYWORD1>DORMANT</KEYWORD1>
+ <KEYWORD1>DOUBLE</KEYWORD1>
+ <KEYWORD1>DOWN</KEYWORD1>
+ <KEYWORD1>DOWNSHIFT</KEYWORD1>
+ <KEYWORD1>DROP</KEYWORD1>
+ <KEYWORD1>EACH</KEYWORD1>
+ <KEYWORD1>ELIF</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>ENABLED</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>ENTRY</KEYWORD1>
+ <KEYWORD1>ERROR</KEYWORD1>
+ <KEYWORD1>ERRORLOG</KEYWORD1>
+ <KEYWORD1>ERR_GET</KEYWORD1>
+ <KEYWORD1>ERR_PRINT</KEYWORD1>
+ <KEYWORD1>ERR_QUIT</KEYWORD1>
+ <KEYWORD1>ESC</KEYWORD1>
+ <KEYWORD1>ESCAPE</KEYWORD1>
+ <KEYWORD1>EVERY</KEYWORD1>
+ <KEYWORD1>EXCEPTION</KEYWORD1>
+ <KEYWORD1>EXCLUSIVE</KEYWORD1>
+ <KEYWORD1>EXEC</KEYWORD1>
+ <KEYWORD1>EXECUTE</KEYWORD1>
+ <KEYWORD1>EXISTS</KEYWORD1>
+ <KEYWORD1>EXIT</KEYWORD1>
+ <KEYWORD1>EXP</KEYWORD1>
+ <KEYWORD1>EXPLAIN</KEYWORD1>
+ <KEYWORD1>EXPRESSION</KEYWORD1>
+ <KEYWORD1>EXTEND</KEYWORD1>
+ <KEYWORD1>EXTENT</KEYWORD1>
+ <KEYWORD1>EXTERN</KEYWORD1>
+ <KEYWORD1>EXTERNAL</KEYWORD1>
+ <KEYWORD1>F1</KEYWORD1>
+ <KEYWORD1>F10</KEYWORD1>
+ <KEYWORD1>F11</KEYWORD1>
+ <KEYWORD1>F12</KEYWORD1>
+ <KEYWORD1>F13</KEYWORD1>
+ <KEYWORD1>F14</KEYWORD1>
+ <KEYWORD1>F15</KEYWORD1>
+ <KEYWORD1>F16</KEYWORD1>
+ <KEYWORD1>F17</KEYWORD1>
+ <KEYWORD1>F18</KEYWORD1>
+ <KEYWORD1>F19</KEYWORD1>
+ <KEYWORD1>F2</KEYWORD1>
+ <KEYWORD1>F20</KEYWORD1>
+ <KEYWORD1>F21</KEYWORD1>
+ <KEYWORD1>F22</KEYWORD1>
+ <KEYWORD1>F23</KEYWORD1>
+ <KEYWORD1>F24</KEYWORD1>
+ <KEYWORD1>F25</KEYWORD1>
+ <KEYWORD1>F26</KEYWORD1>
+ <KEYWORD1>F27</KEYWORD1>
+ <KEYWORD1>F28</KEYWORD1>
+ <KEYWORD1>F29</KEYWORD1>
+ <KEYWORD1>F3</KEYWORD1>
+ <KEYWORD1>F30</KEYWORD1>
+ <KEYWORD1>F31</KEYWORD1>
+ <KEYWORD1>F32</KEYWORD1>
+ <KEYWORD1>F33</KEYWORD1>
+ <KEYWORD1>F34</KEYWORD1>
+ <KEYWORD1>F35</KEYWORD1>
+ <KEYWORD1>F36</KEYWORD1>
+ <KEYWORD1>F37</KEYWORD1>
+ <KEYWORD1>F38</KEYWORD1>
+ <KEYWORD1>F39</KEYWORD1>
+ <KEYWORD1>F4</KEYWORD1>
+ <KEYWORD1>F40</KEYWORD1>
+ <KEYWORD1>F41</KEYWORD1>
+ <KEYWORD1>F42</KEYWORD1>
+ <KEYWORD1>F43</KEYWORD1>
+ <KEYWORD1>F44</KEYWORD1>
+ <KEYWORD1>F45</KEYWORD1>
+ <KEYWORD1>F46</KEYWORD1>
+ <KEYWORD1>F47</KEYWORD1>
+ <KEYWORD1>F48</KEYWORD1>
+ <KEYWORD1>F49</KEYWORD1>
+ <KEYWORD1>F5</KEYWORD1>
+ <KEYWORD1>F50</KEYWORD1>
+ <KEYWORD1>F51</KEYWORD1>
+ <KEYWORD1>F52</KEYWORD1>
+ <KEYWORD1>F53</KEYWORD1>
+ <KEYWORD1>F54</KEYWORD1>
+ <KEYWORD1>F55</KEYWORD1>
+ <KEYWORD1>F56</KEYWORD1>
+ <KEYWORD1>F57</KEYWORD1>
+ <KEYWORD1>F58</KEYWORD1>
+ <KEYWORD1>F59</KEYWORD1>
+ <KEYWORD1>F6</KEYWORD1>
+ <KEYWORD1>F60</KEYWORD1>
+ <KEYWORD1>F61</KEYWORD1>
+ <KEYWORD1>F62</KEYWORD1>
+ <KEYWORD1>F63</KEYWORD1>
+ <KEYWORD1>F64</KEYWORD1>
+ <KEYWORD1>F7</KEYWORD1>
+ <KEYWORD1>F8</KEYWORD1>
+ <KEYWORD1>F9</KEYWORD1>
+ <KEYWORD1>FALSE</KEYWORD1>
+ <KEYWORD1>FETCH</KEYWORD1>
+ <KEYWORD1>FGL_GETENV</KEYWORD1>
+ <KEYWORD1>FGL_KEYVAL</KEYWORD1>
+ <KEYWORD1>FGL_LASTKEY</KEYWORD1>
+ <KEYWORD1>FIELD</KEYWORD1>
+ <KEYWORD1>FIELD_TOUCHED</KEYWORD1>
+ <KEYWORD1>FILE</KEYWORD1>
+ <KEYWORD1>FILLFACTOR</KEYWORD1>
+ <KEYWORD1>FILTERING</KEYWORD1>
+ <KEYWORD1>FINISH</KEYWORD1>
+ <KEYWORD1>FIRST</KEYWORD1>
+ <KEYWORD1>FLOAT</KEYWORD1>
+ <KEYWORD1>FLUSH</KEYWORD1>
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>FOREACH</KEYWORD1>
+ <KEYWORD1>FOREIGN</KEYWORD1>
+ <KEYWORD1>FORM</KEYWORD1>
+ <KEYWORD1>FORMAT</KEYWORD1>
+ <KEYWORD1>FORMONLY</KEYWORD1>
+ <KEYWORD1>FORTRAN</KEYWORD1>
+ <KEYWORD1>FOUND</KEYWORD1>
+ <KEYWORD1>FRACTION</KEYWORD1>
+ <KEYWORD1>FRAGMENT</KEYWORD1>
+ <KEYWORD1>FREE</KEYWORD1>
+ <KEYWORD1>FROM</KEYWORD1>
+ <KEYWORD1>FUNCTION</KEYWORD1>
+ <KEYWORD1>GET_FLDBUF</KEYWORD1>
+ <KEYWORD1>GLOBAL</KEYWORD1>
+ <KEYWORD1>GLOBALS</KEYWORD1>
+ <KEYWORD1>GO</KEYWORD1>
+ <KEYWORD1>GOTO</KEYWORD1>
+ <KEYWORD1>GRANT</KEYWORD1>
+ <KEYWORD1>GREEN</KEYWORD1>
+ <KEYWORD1>GROUP</KEYWORD1>
+ <KEYWORD1>HAVING</KEYWORD1>
+ <KEYWORD1>HEADER</KEYWORD1>
+ <KEYWORD1>HELP</KEYWORD1>
+ <KEYWORD1>HEX</KEYWORD1>
+ <KEYWORD1>HIDE</KEYWORD1>
+ <KEYWORD1>HIGH</KEYWORD1>
+ <KEYWORD1>HOLD</KEYWORD1>
+ <KEYWORD1>HOUR</KEYWORD1>
+ <KEYWORD1>IDATA</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>ILENGTH</KEYWORD1>
+ <KEYWORD1>IMMEDIATE</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>INCLUDE</KEYWORD1>
+ <KEYWORD1>INDEX</KEYWORD1>
+ <KEYWORD1>INDEXES</KEYWORD1>
+ <KEYWORD1>INDICATOR</KEYWORD1>
+ <KEYWORD1>INFIELD</KEYWORD1>
+ <KEYWORD1>INIT</KEYWORD1>
+ <KEYWORD1>INITIALIZE</KEYWORD1>
+ <KEYWORD1>INPUT</KEYWORD1>
+ <KEYWORD1>INSERT</KEYWORD1>
+ <KEYWORD1>INSTRUCTIONS</KEYWORD1>
+ <KEYWORD1>INT</KEYWORD1>
+ <KEYWORD1>INTEGER</KEYWORD1>
+ <KEYWORD1>INTERRUPT</KEYWORD1>
+ <KEYWORD1>INTERVAL</KEYWORD1>
+ <KEYWORD1>INTO</KEYWORD1>
+ <KEYWORD1>INT_FLAG</KEYWORD1>
+ <KEYWORD1>INVISIBLE</KEYWORD1>
+ <KEYWORD1>IS</KEYWORD1>
+ <KEYWORD1>ISAM</KEYWORD1>
+ <KEYWORD1>ISOLATION</KEYWORD1>
+ <KEYWORD1>ITYPE</KEYWORD1>
+ <KEYWORD1>KEY</KEYWORD1>
+ <KEYWORD1>LABEL</KEYWORD1>
+ <KEYWORD1>LANGUAGE</KEYWORD1>
+ <KEYWORD1>LAST</KEYWORD1>
+ <KEYWORD1>LEADING</KEYWORD1>
+ <KEYWORD1>LEFT</KEYWORD1>
+ <KEYWORD1>LENGTH</KEYWORD1>
+ <KEYWORD1>LET</KEYWORD1>
+ <KEYWORD1>LIKE</KEYWORD1>
+ <KEYWORD1>LINE</KEYWORD1>
+ <KEYWORD1>LINENO</KEYWORD1>
+ <KEYWORD1>LINES</KEYWORD1>
+ <KEYWORD1>LOAD</KEYWORD1>
+ <KEYWORD1>LOCATE</KEYWORD1>
+ <KEYWORD1>LOCK</KEYWORD1>
+ <KEYWORD1>LOG</KEYWORD1>
+ <KEYWORD1>LOG10</KEYWORD1>
+ <KEYWORD1>LOGN</KEYWORD1>
+ <KEYWORD1>LONG</KEYWORD1>
+ <KEYWORD1>LOW</KEYWORD1>
+ <KEYWORD1>MAGENTA</KEYWORD1>
+ <KEYWORD1>MAIN</KEYWORD1>
+ <KEYWORD1>MARGIN</KEYWORD1>
+ <KEYWORD1>MATCHES</KEYWORD1>
+ <KEYWORD1>MAX</KEYWORD1>
+ <KEYWORD1>MDY</KEYWORD1>
+ <KEYWORD1>MEDIUM</KEYWORD1>
+ <KEYWORD1>MEMORY</KEYWORD1>
+ <KEYWORD1>MENU</KEYWORD1>
+ <KEYWORD1>MESSAGE</KEYWORD1>
+ <KEYWORD1>MESSAGE_LENGTH</KEYWORD1>
+ <KEYWORD1>MESSAGE_TEXT</KEYWORD1>
+ <KEYWORD1>MIN</KEYWORD1>
+ <KEYWORD1>MINUTE</KEYWORD1>
+ <KEYWORD1>MOD</KEYWORD1>
+ <KEYWORD1>MODE</KEYWORD1>
+ <KEYWORD1>MODIFY</KEYWORD1>
+ <KEYWORD1>MODULE</KEYWORD1>
+ <KEYWORD1>MONEY</KEYWORD1>
+ <KEYWORD1>MONTH</KEYWORD1>
+ <KEYWORD1>MORE</KEYWORD1>
+ <KEYWORD1>NAME</KEYWORD1>
+ <KEYWORD1>NCHAR</KEYWORD1>
+ <KEYWORD1>NEED</KEYWORD1>
+ <KEYWORD1>NEW</KEYWORD1>
+ <KEYWORD1>NEXT</KEYWORD1>
+ <KEYWORD1>NEXTPAGE</KEYWORD1>
+ <KEYWORD1>NO</KEYWORD1>
+ <KEYWORD1>NOCR</KEYWORD1>
+ <KEYWORD1>NOENTRY</KEYWORD1>
+ <KEYWORD1>NONE</KEYWORD1>
+ <KEYWORD1>NORMAL</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>NOTFOUND</KEYWORD1>
+ <KEYWORD1>NULL</KEYWORD1>
+ <KEYWORD1>NULLABLE</KEYWORD1>
+ <KEYWORD1>NUMBER</KEYWORD1>
+ <KEYWORD1>NUMERIC</KEYWORD1>
+ <KEYWORD1>NUM_ARGS</KEYWORD1>
+ <KEYWORD1>NVARCHAR</KEYWORD1>
+ <KEYWORD1>OCTET_LENGTH</KEYWORD1>
+ <KEYWORD1>OF</KEYWORD1>
+ <KEYWORD1>OFF</KEYWORD1>
+ <KEYWORD1>OLD</KEYWORD1>
+ <KEYWORD1>ON</KEYWORD1>
+ <KEYWORD1>ONLY</KEYWORD1>
+ <KEYWORD1>OPEN</KEYWORD1>
+ <KEYWORD1>OPTIMIZATION</KEYWORD1>
+ <KEYWORD1>OPTION</KEYWORD1>
+ <KEYWORD1>OPTIONS</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>ORDER</KEYWORD1>
+ <KEYWORD1>OTHERWISE</KEYWORD1>
+ <KEYWORD1>OUTER</KEYWORD1>
+ <KEYWORD1>OUTPUT</KEYWORD1>
+ <KEYWORD1>PAGE</KEYWORD1>
+ <KEYWORD1>PAGENO</KEYWORD1>
+ <KEYWORD1>PASCAL</KEYWORD1>
+ <KEYWORD1>PAUSE</KEYWORD1>
+ <KEYWORD1>PDQPRIORITY</KEYWORD1>
+ <KEYWORD1>PERCENT</KEYWORD1>
+ <KEYWORD1>PICTURE</KEYWORD1>
+ <KEYWORD1>PIPE</KEYWORD1>
+ <KEYWORD1>PLI</KEYWORD1>
+ <KEYWORD1>POW</KEYWORD1>
+ <KEYWORD1>PRECISION</KEYWORD1>
+ <KEYWORD1>PREPARE</KEYWORD1>
+ <KEYWORD1>PREVIOUS</KEYWORD1>
+ <KEYWORD1>PREVPAGE</KEYWORD1>
+ <KEYWORD1>PRIMARY</KEYWORD1>
+ <KEYWORD1>PRINT</KEYWORD1>
+ <KEYWORD1>PRINTER</KEYWORD1>
+ <KEYWORD1>PRIOR</KEYWORD1>
+ <KEYWORD1>PRIVATE</KEYWORD1>
+ <KEYWORD1>PRIVILEGES</KEYWORD1>
+ <KEYWORD1>PROCEDURE</KEYWORD1>
+ <KEYWORD1>PROGRAM</KEYWORD1>
+ <KEYWORD1>PROMPT</KEYWORD1>
+ <KEYWORD1>PUBLIC</KEYWORD1>
+ <KEYWORD1>PUT</KEYWORD1>
+ <KEYWORD1>QUIT</KEYWORD1>
+ <KEYWORD1>QUIT_FLAG</KEYWORD1>
+ <KEYWORD1>RAISE</KEYWORD1>
+ <KEYWORD1>RANGE</KEYWORD1>
+ <KEYWORD1>READ</KEYWORD1>
+ <KEYWORD1>READONLY</KEYWORD1>
+ <KEYWORD1>REAL</KEYWORD1>
+ <KEYWORD1>RECORD</KEYWORD1>
+ <KEYWORD1>RECOVER</KEYWORD1>
+ <KEYWORD1>RED</KEYWORD1>
+ <KEYWORD1>REFERENCES</KEYWORD1>
+ <KEYWORD1>REFERENCING</KEYWORD1>
+ <KEYWORD1>REGISTER</KEYWORD1>
+ <KEYWORD1>RELATIVE</KEYWORD1>
+ <KEYWORD1>REMAINDER</KEYWORD1>
+ <KEYWORD1>REMOVE</KEYWORD1>
+ <KEYWORD1>RENAME</KEYWORD1>
+ <KEYWORD1>REOPTIMIZATION</KEYWORD1>
+ <KEYWORD1>REPEATABLE</KEYWORD1>
+ <KEYWORD1>REPORT</KEYWORD1>
+ <KEYWORD1>REQUIRED</KEYWORD1>
+ <KEYWORD1>RESOLUTION</KEYWORD1>
+ <KEYWORD1>RESOURCE</KEYWORD1>
+ <KEYWORD1>RESTRICT</KEYWORD1>
+ <KEYWORD1>RESUME</KEYWORD1>
+ <KEYWORD1>RETURN</KEYWORD1>
+ <KEYWORD1>RETURNED_SQLSTATE</KEYWORD1>
+ <KEYWORD1>RETURNING</KEYWORD1>
+ <KEYWORD1>REVERSE</KEYWORD1>
+ <KEYWORD1>REVOKE</KEYWORD1>
+ <KEYWORD1>RIGHT</KEYWORD1>
+ <KEYWORD1>ROBIN</KEYWORD1>
+ <KEYWORD1>ROLE</KEYWORD1>
+ <KEYWORD1>ROLLBACK</KEYWORD1>
+ <KEYWORD1>ROLLFORWARD</KEYWORD1>
+ <KEYWORD1>ROOT</KEYWORD1>
+ <KEYWORD1>ROUND</KEYWORD1>
+ <KEYWORD1>ROW</KEYWORD1>
+ <KEYWORD1>ROWID</KEYWORD1>
+ <KEYWORD1>ROWIDS</KEYWORD1>
+ <KEYWORD1>ROWS</KEYWORD1>
+ <KEYWORD1>ROW_COUNT</KEYWORD1>
+ <KEYWORD1>RUN</KEYWORD1>
+ <KEYWORD1>SCALE</KEYWORD1>
+ <KEYWORD1>SCHEMA</KEYWORD1>
+ <KEYWORD1>SCREEN</KEYWORD1>
+ <KEYWORD1>SCROLL</KEYWORD1>
+ <KEYWORD1>SCR_LINE</KEYWORD1>
+ <KEYWORD1>SECOND</KEYWORD1>
+ <KEYWORD1>SECTION</KEYWORD1>
+ <KEYWORD1>SELECT</KEYWORD1>
+ <KEYWORD1>SERIAL</KEYWORD1>
+ <KEYWORD1>SERIALIZABLE</KEYWORD1>
+ <KEYWORD1>SERVER_NAME</KEYWORD1>
+ <KEYWORD1>SESSION</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>SET_COUNT</KEYWORD1>
+ <KEYWORD1>SHARE</KEYWORD1>
+ <KEYWORD1>SHORT</KEYWORD1>
+ <KEYWORD1>SHOW</KEYWORD1>
+ <KEYWORD1>SITENAME</KEYWORD1>
+ <KEYWORD1>SIZE</KEYWORD1>
+ <KEYWORD1>SIZEOF</KEYWORD1>
+ <KEYWORD1>SKIP</KEYWORD1>
+ <KEYWORD1>SLEEP</KEYWORD1>
+ <KEYWORD1>SMALLFLOAT</KEYWORD1>
+ <KEYWORD1>SMALLINT</KEYWORD1>
+ <KEYWORD1>SOME</KEYWORD1>
+ <KEYWORD1>SPACE</KEYWORD1>
+ <KEYWORD1>SPACES</KEYWORD1>
+ <KEYWORD1>SQL</KEYWORD1>
+ <KEYWORD1>SQLAWARN</KEYWORD1>
+ <KEYWORD1>SQLCA</KEYWORD1>
+ <KEYWORD1>SQLCODE</KEYWORD1>
+ <KEYWORD1>SQLERRD</KEYWORD1>
+ <KEYWORD1>SQLERRM</KEYWORD1>
+ <KEYWORD1>SQLERROR</KEYWORD1>
+ <KEYWORD1>SQLERRP</KEYWORD1>
+ <KEYWORD1>SQLSTATE</KEYWORD1>
+ <KEYWORD1>SQLWARNING</KEYWORD1>
+ <KEYWORD1>SQRT</KEYWORD1>
+ <KEYWORD1>STABILITY</KEYWORD1>
+ <KEYWORD1>START</KEYWORD1>
+ <KEYWORD1>STARTLOG</KEYWORD1>
+ <KEYWORD1>STATIC</KEYWORD1>
+ <KEYWORD1>STATISTICS</KEYWORD1>
+ <KEYWORD1>STATUS</KEYWORD1>
+ <KEYWORD1>STDEV</KEYWORD1>
+ <KEYWORD1>STEP</KEYWORD1>
+ <KEYWORD1>STOP</KEYWORD1>
+ <KEYWORD1>STRING</KEYWORD1>
+ <KEYWORD1>STRUCT</KEYWORD1>
+ <KEYWORD1>SUBCLASS_ORIGIN</KEYWORD1>
+ <KEYWORD1>SUM</KEYWORD1>
+ <KEYWORD1>SWITCH</KEYWORD1>
+ <KEYWORD1>SYNONYM</KEYWORD1>
+ <KEYWORD1>SYSTEM</KEYWORD1>
+ <KEYWORD1>SysBlobs</KEYWORD1>
+ <KEYWORD1>SysChecks</KEYWORD1>
+ <KEYWORD1>SysColAuth</KEYWORD1>
+ <KEYWORD1>SysColDepend</KEYWORD1>
+ <KEYWORD1>SysColumns</KEYWORD1>
+ <KEYWORD1>SysConstraints</KEYWORD1>
+ <KEYWORD1>SysDefaults</KEYWORD1>
+ <KEYWORD1>SysDepend</KEYWORD1>
+ <KEYWORD1>SysDistrib</KEYWORD1>
+ <KEYWORD1>SysFragAuth</KEYWORD1>
+ <KEYWORD1>SysFragments</KEYWORD1>
+ <KEYWORD1>SysIndexes</KEYWORD1>
+ <KEYWORD1>SysObjState</KEYWORD1>
+ <KEYWORD1>SysOpClstr</KEYWORD1>
+ <KEYWORD1>SysProcAuth</KEYWORD1>
+ <KEYWORD1>SysProcBody</KEYWORD1>
+ <KEYWORD1>SysProcPlan</KEYWORD1>
+ <KEYWORD1>SysProcedures</KEYWORD1>
+ <KEYWORD1>SysReferences</KEYWORD1>
+ <KEYWORD1>SysRoleAuth</KEYWORD1>
+ <KEYWORD1>SysSynTable</KEYWORD1>
+ <KEYWORD1>SysSynonyms</KEYWORD1>
+ <KEYWORD1>SysTabAuth</KEYWORD1>
+ <KEYWORD1>SysTables</KEYWORD1>
+ <KEYWORD1>SysTrigBody</KEYWORD1>
+ <KEYWORD1>SysTriggers</KEYWORD1>
+ <KEYWORD1>SysUsers</KEYWORD1>
+ <KEYWORD1>SysViews</KEYWORD1>
+ <KEYWORD1>SysViolations</KEYWORD1>
+ <KEYWORD1>TAB</KEYWORD1>
+ <KEYWORD1>TABLE</KEYWORD1>
+ <KEYWORD1>TABLES</KEYWORD1>
+ <KEYWORD1>TAN</KEYWORD1>
+ <KEYWORD1>TEMP</KEYWORD1>
+ <KEYWORD1>TEXT</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>THROUGH</KEYWORD1>
+ <KEYWORD1>THRU</KEYWORD1>
+ <KEYWORD1>TIME</KEYWORD1>
+ <KEYWORD1>TO</KEYWORD1>
+ <KEYWORD1>TODAY</KEYWORD1>
+ <KEYWORD1>TOP</KEYWORD1>
+ <KEYWORD1>TOTAL</KEYWORD1>
+ <KEYWORD1>TRACE</KEYWORD1>
+ <KEYWORD1>TRAILER</KEYWORD1>
+ <KEYWORD1>TRAILING</KEYWORD1>
+ <KEYWORD1>TRANSACTION</KEYWORD1>
+ <KEYWORD1>TRIGGER</KEYWORD1>
+ <KEYWORD1>TRIGGERS</KEYWORD1>
+ <KEYWORD1>TRIM</KEYWORD1>
+ <KEYWORD1>TRUE</KEYWORD1>
+ <KEYWORD1>TRUNC</KEYWORD1>
+ <KEYWORD1>TYPE</KEYWORD1>
+ <KEYWORD1>TYPEDEF</KEYWORD1>
+ <KEYWORD1>UNCOMMITTED</KEYWORD1>
+ <KEYWORD1>UNCONSTRAINED</KEYWORD1>
+ <KEYWORD1>UNDERLINE</KEYWORD1>
+ <KEYWORD1>UNION</KEYWORD1>
+ <KEYWORD1>UNIQUE</KEYWORD1>
+ <KEYWORD1>UNITS</KEYWORD1>
+ <KEYWORD1>UNLOAD</KEYWORD1>
+ <KEYWORD1>UNLOCK</KEYWORD1>
+ <KEYWORD1>UNSIGNED</KEYWORD1>
+ <KEYWORD1>UP</KEYWORD1>
+ <KEYWORD1>UPDATE</KEYWORD1>
+ <KEYWORD1>UPSHIFT</KEYWORD1>
+ <KEYWORD1>USER</KEYWORD1>
+ <KEYWORD1>USING</KEYWORD1>
+ <KEYWORD1>VALIDATE</KEYWORD1>
+ <KEYWORD1>VALUE</KEYWORD1>
+ <KEYWORD1>VALUES</KEYWORD1>
+ <KEYWORD1>VARCHAR</KEYWORD1>
+ <KEYWORD1>VARIABLES</KEYWORD1>
+ <KEYWORD1>VARIANCE</KEYWORD1>
+ <KEYWORD1>VARYING</KEYWORD1>
+ <KEYWORD1>VERIFY</KEYWORD1>
+ <KEYWORD1>VIEW</KEYWORD1>
+ <KEYWORD1>VIOLATIONS</KEYWORD1>
+ <KEYWORD1>WAIT</KEYWORD1>
+ <KEYWORD1>WAITING</KEYWORD1>
+ <KEYWORD1>WARNING</KEYWORD1>
+ <KEYWORD1>WEEKDAY</KEYWORD1>
+ <KEYWORD1>WHEN</KEYWORD1>
+ <KEYWORD1>WHENEVER</KEYWORD1>
+ <KEYWORD1>WHERE</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+ <KEYWORD1>WHITE</KEYWORD1>
+ <KEYWORD1>WINDOW</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>WITHOUT</KEYWORD1>
+ <KEYWORD1>WORDWRAP</KEYWORD1>
+ <KEYWORD1>WORK</KEYWORD1>
+ <KEYWORD1>WRAP</KEYWORD1>
+ <KEYWORD1>WRITE</KEYWORD1>
+ <KEYWORD1>YEAR</KEYWORD1>
+ <KEYWORD1>YELLOW</KEYWORD1>
+ <KEYWORD1>ZEROFILL</KEYWORD1>
+
+
+ <!-- special, keywords/literals -->
+ <LITERAL2>FALSE</LITERAL2>
+ <LITERAL2>NULL</LITERAL2>
+ <LITERAL2>TRUE</LITERAL2>
+
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/icon.xml b/jEdit/modes/icon.xml
index c915796..8d7100c 100644
--- a/jEdit/modes/icon.xml
+++ b/jEdit/modes/icon.xml
@@ -1,198 +1,198 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Icon mode by Silas Smith (smiths at cs.arizona.edu) -->
-<!-- Updated 08/07/2003 -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="wordBreakChars" VALUE="|.\\:,+-*/=?^!@%<>&" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
- <!-- comments -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- string literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- cset literals -->
- <SPAN TYPE="LITERAL2" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">~===</SEQ>
- <SEQ TYPE="OPERATOR">===</SEQ>
- <SEQ TYPE="OPERATOR">|||</SEQ> <!-- list concatenation -->
-
- <!-- lexical operators -->
- <SEQ TYPE="OPERATOR">>>=</SEQ> <!-- ">>=" -->
- <SEQ TYPE="OPERATOR">>></SEQ> <!-- ">>" -->
- <SEQ TYPE="OPERATOR"><<=</SEQ> <!-- "<<=" -->
- <SEQ TYPE="OPERATOR"><<</SEQ> <!-- "<<" -->
- <SEQ TYPE="OPERATOR">~==</SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">||</SEQ>
-
- <!-- set operators -->
- <SEQ TYPE="OPERATOR">++</SEQ> <!-- union -->
- <SEQ TYPE="OPERATOR">**</SEQ> <!-- intersection -->
- <SEQ TYPE="OPERATOR">--</SEQ> <!-- difference -->
-
- <SEQ TYPE="OPERATOR"><-></SEQ> <!-- "<->" -->
- <SEQ TYPE="OPERATOR"><-</SEQ> <!-- "<-" -->
- <SEQ TYPE="OPERATOR">op:=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">~=</SEQ>
- <SEQ TYPE="OPERATOR">:=:</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">-:</SEQ>
- <SEQ TYPE="OPERATOR">+:</SEQ>
-
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">not</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
-
- <!-- numerical operators -->
- <!-- NOTE: '*' defined above -->
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>by</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>create</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>every</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>initial</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <KEYWORD2>break</KEYWORD2>
- <KEYWORD2>end</KEYWORD2>
- <KEYWORD2>fail</KEYWORD2>
- <KEYWORD2>global</KEYWORD2>
- <KEYWORD2>invocable</KEYWORD2>
- <KEYWORD2>link</KEYWORD2>
- <KEYWORD2>local</KEYWORD2>
- <KEYWORD2>procedure</KEYWORD2>
- <KEYWORD2>record</KEYWORD2>
- <KEYWORD2>return</KEYWORD2>
- <KEYWORD2>static</KEYWORD2>
- <KEYWORD2>suspend</KEYWORD2>
-
- <KEYWORD3>&allocated</KEYWORD3>
- <KEYWORD3>&ascii</KEYWORD3>
- <KEYWORD3>&clock</KEYWORD3>
- <KEYWORD3>&collections</KEYWORD3>
- <KEYWORD3>&cset</KEYWORD3>
- <KEYWORD3>¤t</KEYWORD3>
- <KEYWORD3>&date</KEYWORD3>
- <KEYWORD3>&dateline</KEYWORD3>
- <KEYWORD3>&digits</KEYWORD3>
- <KEYWORD3>&dump</KEYWORD3>
- <KEYWORD3>&e</KEYWORD3>
- <KEYWORD3>&error</KEYWORD3>
- <KEYWORD3>&errornumber</KEYWORD3>
- <KEYWORD3>&errortext</KEYWORD3>
- <KEYWORD3>&errorvalue</KEYWORD3>
- <KEYWORD3>&errout</KEYWORD3>
- <KEYWORD3>&fail</KEYWORD3>
- <KEYWORD3>&features</KEYWORD3>
- <KEYWORD3>&file</KEYWORD3>
- <KEYWORD3>&host</KEYWORD3>
- <KEYWORD3>&input</KEYWORD3>
- <KEYWORD3>&lcase</KEYWORD3>
- <KEYWORD3>&letters</KEYWORD3>
- <KEYWORD3>&level</KEYWORD3>
- <KEYWORD3>&line</KEYWORD3>
- <KEYWORD3>&main</KEYWORD3>
- <KEYWORD3>&null</KEYWORD3>
- <KEYWORD3>&output</KEYWORD3>
- <KEYWORD3>&phi</KEYWORD3>
- <KEYWORD3>&pi</KEYWORD3>
- <KEYWORD3>&pos</KEYWORD3>
- <KEYWORD3>&progname</KEYWORD3>
- <KEYWORD3>&random</KEYWORD3>
- <KEYWORD3>®ions</KEYWORD3>
- <KEYWORD3>&source</KEYWORD3>
- <KEYWORD3>&storage</KEYWORD3>
- <KEYWORD3>&subject</KEYWORD3>
- <KEYWORD3>&time</KEYWORD3>
- <KEYWORD3>&trace</KEYWORD3>
- <KEYWORD3>&ucase</KEYWORD3>
- <KEYWORD3>&version</KEYWORD3>
-
- <!-- preprocessor directives -->
- <KEYWORD3>$define</KEYWORD3>
- <KEYWORD3>$else</KEYWORD3>
- <KEYWORD3>$endif</KEYWORD3>
- <KEYWORD3>$error</KEYWORD3>
- <KEYWORD3>$ifdef</KEYWORD3>
- <KEYWORD3>$ifndef</KEYWORD3>
- <KEYWORD3>$include</KEYWORD3>
- <KEYWORD3>$line</KEYWORD3>
- <KEYWORD3>$undef</KEYWORD3>
-
- <!-- predefined prepocessor symbols -->
- <KEYWORD3>_MACINTOSH</KEYWORD3>
- <KEYWORD3>_MS_WINDOWS_NT</KEYWORD3>
- <KEYWORD3>_MS_WINDOWS</KEYWORD3>
- <KEYWORD3>_MSDOS_386</KEYWORD3>
- <KEYWORD3>_MSDOS</KEYWORD3>
- <KEYWORD3>_OS2</KEYWORD3>
- <KEYWORD3>_PIPES</KEYWORD3>
- <KEYWORD3>_PRESENTATION_MGR</KEYWORD3>
- <KEYWORD3>_SYSTEM_FUNCTION</KEYWORD3>
- <KEYWORD3>_UNIX</KEYWORD3>
- <KEYWORD3>_VMS</KEYWORD3>
- <KEYWORD3>_WINDOW_FUNCTIONS</KEYWORD3>
- <KEYWORD3>_X_WINDOW_SYSTEM</KEYWORD3>
-
- <KEYWORD4>co-expression</KEYWORD4>
- <KEYWORD4>cset</KEYWORD4>
- <KEYWORD4>file</KEYWORD4>
- <KEYWORD4>integer</KEYWORD4>
- <KEYWORD4>list</KEYWORD4>
- <KEYWORD4>null</KEYWORD4>
- <KEYWORD4>real</KEYWORD4>
- <KEYWORD4>set</KEYWORD4>
- <KEYWORD4>string</KEYWORD4>
- <KEYWORD4>table</KEYWORD4>
- <KEYWORD4>window</KEYWORD4>
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Icon mode by Silas Smith (smiths at cs.arizona.edu) -->
+<!-- Updated 08/07/2003 -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="wordBreakChars" VALUE="|.\\:,+-*/=?^!@%<>&" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+ <!-- comments -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- string literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- cset literals -->
+ <SPAN TYPE="LITERAL2" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">~===</SEQ>
+ <SEQ TYPE="OPERATOR">===</SEQ>
+ <SEQ TYPE="OPERATOR">|||</SEQ> <!-- list concatenation -->
+
+ <!-- lexical operators -->
+ <SEQ TYPE="OPERATOR">>>=</SEQ> <!-- ">>=" -->
+ <SEQ TYPE="OPERATOR">>></SEQ> <!-- ">>" -->
+ <SEQ TYPE="OPERATOR"><<=</SEQ> <!-- "<<=" -->
+ <SEQ TYPE="OPERATOR"><<</SEQ> <!-- "<<" -->
+ <SEQ TYPE="OPERATOR">~==</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">||</SEQ>
+
+ <!-- set operators -->
+ <SEQ TYPE="OPERATOR">++</SEQ> <!-- union -->
+ <SEQ TYPE="OPERATOR">**</SEQ> <!-- intersection -->
+ <SEQ TYPE="OPERATOR">--</SEQ> <!-- difference -->
+
+ <SEQ TYPE="OPERATOR"><-></SEQ> <!-- "<->" -->
+ <SEQ TYPE="OPERATOR"><-</SEQ> <!-- "<-" -->
+ <SEQ TYPE="OPERATOR">op:=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">~=</SEQ>
+ <SEQ TYPE="OPERATOR">:=:</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">-:</SEQ>
+ <SEQ TYPE="OPERATOR">+:</SEQ>
+
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">not</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+
+ <!-- numerical operators -->
+ <!-- NOTE: '*' defined above -->
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>by</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>create</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>every</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>initial</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>of</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <KEYWORD2>break</KEYWORD2>
+ <KEYWORD2>end</KEYWORD2>
+ <KEYWORD2>fail</KEYWORD2>
+ <KEYWORD2>global</KEYWORD2>
+ <KEYWORD2>invocable</KEYWORD2>
+ <KEYWORD2>link</KEYWORD2>
+ <KEYWORD2>local</KEYWORD2>
+ <KEYWORD2>procedure</KEYWORD2>
+ <KEYWORD2>record</KEYWORD2>
+ <KEYWORD2>return</KEYWORD2>
+ <KEYWORD2>static</KEYWORD2>
+ <KEYWORD2>suspend</KEYWORD2>
+
+ <KEYWORD3>&allocated</KEYWORD3>
+ <KEYWORD3>&ascii</KEYWORD3>
+ <KEYWORD3>&clock</KEYWORD3>
+ <KEYWORD3>&collections</KEYWORD3>
+ <KEYWORD3>&cset</KEYWORD3>
+ <KEYWORD3>¤t</KEYWORD3>
+ <KEYWORD3>&date</KEYWORD3>
+ <KEYWORD3>&dateline</KEYWORD3>
+ <KEYWORD3>&digits</KEYWORD3>
+ <KEYWORD3>&dump</KEYWORD3>
+ <KEYWORD3>&e</KEYWORD3>
+ <KEYWORD3>&error</KEYWORD3>
+ <KEYWORD3>&errornumber</KEYWORD3>
+ <KEYWORD3>&errortext</KEYWORD3>
+ <KEYWORD3>&errorvalue</KEYWORD3>
+ <KEYWORD3>&errout</KEYWORD3>
+ <KEYWORD3>&fail</KEYWORD3>
+ <KEYWORD3>&features</KEYWORD3>
+ <KEYWORD3>&file</KEYWORD3>
+ <KEYWORD3>&host</KEYWORD3>
+ <KEYWORD3>&input</KEYWORD3>
+ <KEYWORD3>&lcase</KEYWORD3>
+ <KEYWORD3>&letters</KEYWORD3>
+ <KEYWORD3>&level</KEYWORD3>
+ <KEYWORD3>&line</KEYWORD3>
+ <KEYWORD3>&main</KEYWORD3>
+ <KEYWORD3>&null</KEYWORD3>
+ <KEYWORD3>&output</KEYWORD3>
+ <KEYWORD3>&phi</KEYWORD3>
+ <KEYWORD3>&pi</KEYWORD3>
+ <KEYWORD3>&pos</KEYWORD3>
+ <KEYWORD3>&progname</KEYWORD3>
+ <KEYWORD3>&random</KEYWORD3>
+ <KEYWORD3>®ions</KEYWORD3>
+ <KEYWORD3>&source</KEYWORD3>
+ <KEYWORD3>&storage</KEYWORD3>
+ <KEYWORD3>&subject</KEYWORD3>
+ <KEYWORD3>&time</KEYWORD3>
+ <KEYWORD3>&trace</KEYWORD3>
+ <KEYWORD3>&ucase</KEYWORD3>
+ <KEYWORD3>&version</KEYWORD3>
+
+ <!-- preprocessor directives -->
+ <KEYWORD3>$define</KEYWORD3>
+ <KEYWORD3>$else</KEYWORD3>
+ <KEYWORD3>$endif</KEYWORD3>
+ <KEYWORD3>$error</KEYWORD3>
+ <KEYWORD3>$ifdef</KEYWORD3>
+ <KEYWORD3>$ifndef</KEYWORD3>
+ <KEYWORD3>$include</KEYWORD3>
+ <KEYWORD3>$line</KEYWORD3>
+ <KEYWORD3>$undef</KEYWORD3>
+
+ <!-- predefined prepocessor symbols -->
+ <KEYWORD3>_MACINTOSH</KEYWORD3>
+ <KEYWORD3>_MS_WINDOWS_NT</KEYWORD3>
+ <KEYWORD3>_MS_WINDOWS</KEYWORD3>
+ <KEYWORD3>_MSDOS_386</KEYWORD3>
+ <KEYWORD3>_MSDOS</KEYWORD3>
+ <KEYWORD3>_OS2</KEYWORD3>
+ <KEYWORD3>_PIPES</KEYWORD3>
+ <KEYWORD3>_PRESENTATION_MGR</KEYWORD3>
+ <KEYWORD3>_SYSTEM_FUNCTION</KEYWORD3>
+ <KEYWORD3>_UNIX</KEYWORD3>
+ <KEYWORD3>_VMS</KEYWORD3>
+ <KEYWORD3>_WINDOW_FUNCTIONS</KEYWORD3>
+ <KEYWORD3>_X_WINDOW_SYSTEM</KEYWORD3>
+
+ <KEYWORD4>co-expression</KEYWORD4>
+ <KEYWORD4>cset</KEYWORD4>
+ <KEYWORD4>file</KEYWORD4>
+ <KEYWORD4>integer</KEYWORD4>
+ <KEYWORD4>list</KEYWORD4>
+ <KEYWORD4>null</KEYWORD4>
+ <KEYWORD4>real</KEYWORD4>
+ <KEYWORD4>set</KEYWORD4>
+ <KEYWORD4>string</KEYWORD4>
+ <KEYWORD4>table</KEYWORD4>
+ <KEYWORD4>window</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/idl.xml b/jEdit/modes/idl.xml
index 6727fcc..3b9a5cc 100644
--- a/jEdit/modes/idl.xml
+++ b/jEdit/modes/idl.xml
@@ -1,158 +1,158 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- IDL mode, by Slava Pestov
- based on Java mode by Mike Dillon and IDLTokenMarker by Juha Lindfors -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="boxComment" VALUE="*" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE">
- <EOL_SPAN TYPE="KEYWORD2"
- AT_WHITESPACE_END="TRUE"
- DELEGATE="PREPROCESSOR">#</EOL_SPAN>
- <IMPORT DELEGATE="LEX" />
- </RULES>
-
- <RULES SET="LEX" IGNORE_CASE="FALSE">
-
- <IMPORT DELEGATE="c::COMMENTS" />
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <!-- some of these should be marked OPERATOR -->
- <!--
- <SEQ TYPE="NULL">!</SEQ>
- <SEQ TYPE="NULL">>=</SEQ>
- <SEQ TYPE="NULL"><=</SEQ>
- <SEQ TYPE="NULL">+</SEQ>
- <SEQ TYPE="NULL">-</SEQ>
- <SEQ TYPE="NULL">/</SEQ>
- <SEQ TYPE="NULL">*</SEQ>
- <SEQ TYPE="NULL">%</SEQ>
- <SEQ TYPE="NULL">&</SEQ>
- <SEQ TYPE="NULL">|</SEQ>
- <SEQ TYPE="NULL">^</SEQ>
- <SEQ TYPE="NULL">~</SEQ>
- <SEQ TYPE="NULL">.</SEQ>
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SEQ TYPE="NULL">]</SEQ>
- <SEQ TYPE="NULL">[</SEQ>
- <SEQ TYPE="NULL">?</SEQ> -->
-
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
-
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD3>any</KEYWORD3>
- <KEYWORD1>attribute</KEYWORD1>
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>context</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>enum</KEYWORD3>
- <KEYWORD1>exception</KEYWORD1>
- <LITERAL2>FALSE</LITERAL2>
- <KEYWORD1>fixed</KEYWORD1>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>inout</KEYWORD1>
- <KEYWORD1>interface</KEYWORD1>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD1>module</KEYWORD1>
- <KEYWORD3>Object</KEYWORD3>
- <KEYWORD3>octet</KEYWORD3>
- <KEYWORD1>oneway</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>raises</KEYWORD1>
- <KEYWORD1>readonly</KEYWORD1>
- <KEYWORD3>sequence</KEYWORD3>
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD3>string</KEYWORD3>
- <KEYWORD3>struct</KEYWORD3>
- <KEYWORD1>switch</KEYWORD1>
- <LITERAL2>TRUE</LITERAL2>
- <KEYWORD3>typedef</KEYWORD3>
- <KEYWORD3>unsigned</KEYWORD3>
- <KEYWORD3>union</KEYWORD3>
- <KEYWORD3>void</KEYWORD3>
- <KEYWORD3>wchar</KEYWORD3>
- <KEYWORD3>wstring</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <!-- Preprocessor specific rules. This is borrowed from the C mode,
- since the IDL spec says the preprocessor is compatible with the
- C++ standard. -->
- <RULES SET="PREPROCESSOR"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
-
- <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="INCLUDE">include\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="LEX">endif\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="c::CONDITION">elif\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="c::CONDITION">if\b</EOL_SPAN_REGEXP>
-
- <IMPORT DELEGATE="LEX"/>
-
- <!-- Directives -->
- <KEYWORDS>
- <MARKUP>ifdef</MARKUP>
- <MARKUP>ifndef</MARKUP>
- <MARKUP>else</MARKUP>
- <MARKUP>undef</MARKUP>
- <MARKUP>warning</MARKUP>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="INCLUDE"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <IMPORT DELEGATE="LEX"/>
- </RULES>
-
- <RULES SET="DEFINE"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <SEQ TYPE="OPERATOR">#</SEQ>
- <IMPORT DELEGATE="LEX"/>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- IDL mode, by Slava Pestov
+ based on Java mode by Mike Dillon and IDLTokenMarker by Juha Lindfors -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="boxComment" VALUE="*" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE">
+ <EOL_SPAN TYPE="KEYWORD2"
+ AT_WHITESPACE_END="TRUE"
+ DELEGATE="PREPROCESSOR">#</EOL_SPAN>
+ <IMPORT DELEGATE="LEX" />
+ </RULES>
+
+ <RULES SET="LEX" IGNORE_CASE="FALSE">
+
+ <IMPORT DELEGATE="c::COMMENTS" />
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <!-- some of these should be marked OPERATOR -->
+ <!--
+ <SEQ TYPE="NULL">!</SEQ>
+ <SEQ TYPE="NULL">>=</SEQ>
+ <SEQ TYPE="NULL"><=</SEQ>
+ <SEQ TYPE="NULL">+</SEQ>
+ <SEQ TYPE="NULL">-</SEQ>
+ <SEQ TYPE="NULL">/</SEQ>
+ <SEQ TYPE="NULL">*</SEQ>
+ <SEQ TYPE="NULL">%</SEQ>
+ <SEQ TYPE="NULL">&</SEQ>
+ <SEQ TYPE="NULL">|</SEQ>
+ <SEQ TYPE="NULL">^</SEQ>
+ <SEQ TYPE="NULL">~</SEQ>
+ <SEQ TYPE="NULL">.</SEQ>
+ <SEQ TYPE="NULL">,</SEQ>
+ <SEQ TYPE="NULL">;</SEQ>
+ <SEQ TYPE="NULL">]</SEQ>
+ <SEQ TYPE="NULL">[</SEQ>
+ <SEQ TYPE="NULL">?</SEQ> -->
+
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD3>any</KEYWORD3>
+ <KEYWORD1>attribute</KEYWORD1>
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>context</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>enum</KEYWORD3>
+ <KEYWORD1>exception</KEYWORD1>
+ <LITERAL2>FALSE</LITERAL2>
+ <KEYWORD1>fixed</KEYWORD1>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>inout</KEYWORD1>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD1>module</KEYWORD1>
+ <KEYWORD3>Object</KEYWORD3>
+ <KEYWORD3>octet</KEYWORD3>
+ <KEYWORD1>oneway</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+ <KEYWORD1>raises</KEYWORD1>
+ <KEYWORD1>readonly</KEYWORD1>
+ <KEYWORD3>sequence</KEYWORD3>
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD3>string</KEYWORD3>
+ <KEYWORD3>struct</KEYWORD3>
+ <KEYWORD1>switch</KEYWORD1>
+ <LITERAL2>TRUE</LITERAL2>
+ <KEYWORD3>typedef</KEYWORD3>
+ <KEYWORD3>unsigned</KEYWORD3>
+ <KEYWORD3>union</KEYWORD3>
+ <KEYWORD3>void</KEYWORD3>
+ <KEYWORD3>wchar</KEYWORD3>
+ <KEYWORD3>wstring</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- Preprocessor specific rules. This is borrowed from the C mode,
+ since the IDL spec says the preprocessor is compatible with the
+ C++ standard. -->
+ <RULES SET="PREPROCESSOR"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+
+ <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="INCLUDE">include\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="LEX">endif\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="c::CONDITION">elif\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="c::CONDITION">if\b</EOL_SPAN_REGEXP>
+
+ <IMPORT DELEGATE="LEX"/>
+
+ <!-- Directives -->
+ <KEYWORDS>
+ <MARKUP>ifdef</MARKUP>
+ <MARKUP>ifndef</MARKUP>
+ <MARKUP>else</MARKUP>
+ <MARKUP>undef</MARKUP>
+ <MARKUP>warning</MARKUP>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="INCLUDE"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <IMPORT DELEGATE="LEX"/>
+ </RULES>
+
+ <RULES SET="DEFINE"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <IMPORT DELEGATE="LEX"/>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/inform.xml b/jEdit/modes/inform.xml
index fdd7153..75cd42c 100644
--- a/jEdit/modes/inform.xml
+++ b/jEdit/modes/inform.xml
@@ -1,205 +1,205 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <!-- Syntax highlighting mode for the Inform language. You can find out more about inform at
- http://www.gnelson.demon.co.uk/inform.html
- And an inform language guide at
- http://www.gnelson.demon.co.uk/dman/index.html
- -->
- <PROPS>
- <!--
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- -->
- <PROPERTY NAME="lineComment" VALUE="!" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{[" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}]" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
-
- <PROPERTY NAME="filenameGlob" VALUE="*.(inf|h)" />
- </PROPS>
-
- <RULES
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(\$[\p{XDigit}]|[\p{Digit}])">
- <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
-
- <!-- strings can span lines -->
- <SPAN TYPE="LITERAL1" DELEGATE="InformInnerText">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL2">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- preprocessor statements -->
- <EOL_SPAN TYPE="KEYWORD2">#</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
-
- <!-- special sequences that require special highlighting -->
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">~=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
-
- <SEQ TYPE="OPERATOR">.&</SEQ>
- <SEQ TYPE="OPERATOR">.#</SEQ>
- <SEQ TYPE="OPERATOR">--></SEQ>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">::</MARK_PREVIOUS>
-
- <MARK_PREVIOUS AT_WHITESPACE_END="FALSE"
- MATCH_TYPE="OPERATOR"
- TYPE="LABEL">:</MARK_PREVIOUS>
-
- <KEYWORDS>
- <!-- operators -->
- <KEYWORD1>has</KEYWORD1>
- <KEYWORD1>hasnt</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>notin</KEYWORD1>
- <KEYWORD1>ofclass</KEYWORD1>
- <KEYWORD1>provides</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
-
- <!-- text-base conversion functions -->
- <LITERAL2>char</LITERAL2>
- <LITERAL2>string</LITERAL2>
- <LITERAL2>address</LITERAL2>
- <LITERAL2>name</LITERAL2>
- <LITERAL2>a</LITERAL2>
- <LITERAL2>an</LITERAL2>
- <LITERAL2>the</LITERAL2>
- <LITERAL2>The</LITERAL2>
- <LITERAL2>property</LITERAL2>
- <LITERAL2>object</LITERAL2>
-
- <!-- language semantics -->
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>give</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>inversion</KEYWORD1>
- <KEYWORD1>jump</KEYWORD1>
- <KEYWORD1>move</KEYWORD1>
- <KEYWORD2>to</KEYWORD2>
- <KEYWORD1>objectloop</KEYWORD1>
- <KEYWORD1>remove</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>rfalse</KEYWORD1>
- <KEYWORD1>rtrue</KEYWORD1>
- <KEYWORD1>string</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <!-- class keyworks -->
- <KEYWORD1>with</KEYWORD1>
-<!-- <KEYWORD1>has</KEYWORD1> -->
-
- <!-- built-in functions -->
- <FUNCTION>new_line</FUNCTION>
- <FUNCTION>print</FUNCTION>
- <FUNCTION>print_ret</FUNCTION>
- <FUNCTION>box</FUNCTION>
- <FUNCTION>font</FUNCTION>
- <KEYWORD2>on</KEYWORD2>
- <KEYWORD2>off</KEYWORD2>
- <FUNCTION>quit</FUNCTION>
- <FUNCTION>read</FUNCTION>
- <FUNCTION>restore</FUNCTION>
- <FUNCTION>save</FUNCTION>
- <FUNCTION>spaces</FUNCTION>
- <FUNCTION>style</FUNCTION>
- <KEYWORD2>roman</KEYWORD2>
- <KEYWORD2>bold</KEYWORD2>
- <KEYWORD2>underline</KEYWORD2>
- <KEYWORD2>reverse</KEYWORD2>
- <KEYWORD2>fixed</KEYWORD2>
- <FUNCTION>score</FUNCTION>
- <FUNCTION>time</FUNCTION>
-
- <!-- Top-level keyworks -->
- <KEYWORD3>Abbreviate</KEYWORD3>
- <KEYWORD3>Array</KEYWORD3>
- <KEYWORD3>Attribute</KEYWORD3>
- <KEYWORD3>Class</KEYWORD3>
- <KEYWORD3>Constant</KEYWORD3>
- <KEYWORD3>Default</KEYWORD3>
- <KEYWORD3>End</KEYWORD3>
- <KEYWORD3>Endif</KEYWORD3>
- <KEYWORD3>Extend</KEYWORD3>
- <KEYWORD3>Global</KEYWORD3>
- <KEYWORD3>Ifdef</KEYWORD3>
- <KEYWORD3>Ifndef</KEYWORD3>
- <KEYWORD3>Ifnot</KEYWORD3>
- <KEYWORD3>Iftrue</KEYWORD3>
- <KEYWORD3>Iffalse</KEYWORD3>
- <KEYWORD3>Import</KEYWORD3>
- <KEYWORD3>Include</KEYWORD3>
- <KEYWORD3>Link</KEYWORD3>
- <KEYWORD3>Lowstring</KEYWORD3>
- <KEYWORD3>Message</KEYWORD3>
- <KEYWORD3>Object</KEYWORD3>
- <KEYWORD3>Property</KEYWORD3>
- <KEYWORD3>Replace</KEYWORD3>
- <KEYWORD3>Serial</KEYWORD3>
- <KEYWORD3>Switches</KEYWORD3>
- <KEYWORD3>Statusline</KEYWORD3>
- <KEYWORD3>System_file</KEYWORD3>
- <KEYWORD3>Verb</KEYWORD3>
- <KEYWORD3>private</KEYWORD3>
-
- <LITERAL2>false</LITERAL2>
- <LITERAL2>true</LITERAL2>
- <LITERAL2>null</LITERAL2>
- <LITERAL2>super</LITERAL2>
- <LITERAL2>self</LITERAL2>
-
- <INVALID>this</INVALID>
- </KEYWORDS>
- </RULES>
- <RULES SET="InformInnerText" IGNORE_CASE="FALSE" DEFAULT="LITERAL1">
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
-
- <!-- escaping the @ symbol -->
- <SEQ TYPE="LITERAL2">@@</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <!-- Syntax highlighting mode for the Inform language. You can find out more about inform at
+ http://www.gnelson.demon.co.uk/inform.html
+ And an inform language guide at
+ http://www.gnelson.demon.co.uk/dman/index.html
+ -->
+ <PROPS>
+ <!--
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ -->
+ <PROPERTY NAME="lineComment" VALUE="!" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{[" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}]" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+
+ <PROPERTY NAME="filenameGlob" VALUE="*.(inf|h)" />
+ </PROPS>
+
+ <RULES
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(\$[\p{XDigit}]|[\p{Digit}])">
+ <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
+
+ <!-- strings can span lines -->
+ <SPAN TYPE="LITERAL1" DELEGATE="InformInnerText">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL2">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- preprocessor statements -->
+ <EOL_SPAN TYPE="KEYWORD2">#</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
+
+ <!-- special sequences that require special highlighting -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">~=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">$</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+
+ <SEQ TYPE="OPERATOR">.&</SEQ>
+ <SEQ TYPE="OPERATOR">.#</SEQ>
+ <SEQ TYPE="OPERATOR">--></SEQ>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">::</MARK_PREVIOUS>
+
+ <MARK_PREVIOUS AT_WHITESPACE_END="FALSE"
+ MATCH_TYPE="OPERATOR"
+ TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <KEYWORDS>
+ <!-- operators -->
+ <KEYWORD1>has</KEYWORD1>
+ <KEYWORD1>hasnt</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>notin</KEYWORD1>
+ <KEYWORD1>ofclass</KEYWORD1>
+ <KEYWORD1>provides</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+
+ <!-- text-base conversion functions -->
+ <LITERAL2>char</LITERAL2>
+ <LITERAL2>string</LITERAL2>
+ <LITERAL2>address</LITERAL2>
+ <LITERAL2>name</LITERAL2>
+ <LITERAL2>a</LITERAL2>
+ <LITERAL2>an</LITERAL2>
+ <LITERAL2>the</LITERAL2>
+ <LITERAL2>The</LITERAL2>
+ <LITERAL2>property</LITERAL2>
+ <LITERAL2>object</LITERAL2>
+
+ <!-- language semantics -->
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>give</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>inversion</KEYWORD1>
+ <KEYWORD1>jump</KEYWORD1>
+ <KEYWORD1>move</KEYWORD1>
+ <KEYWORD2>to</KEYWORD2>
+ <KEYWORD1>objectloop</KEYWORD1>
+ <KEYWORD1>remove</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>rfalse</KEYWORD1>
+ <KEYWORD1>rtrue</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <!-- class keyworks -->
+ <KEYWORD1>with</KEYWORD1>
+<!-- <KEYWORD1>has</KEYWORD1> -->
+
+ <!-- built-in functions -->
+ <FUNCTION>new_line</FUNCTION>
+ <FUNCTION>print</FUNCTION>
+ <FUNCTION>print_ret</FUNCTION>
+ <FUNCTION>box</FUNCTION>
+ <FUNCTION>font</FUNCTION>
+ <KEYWORD2>on</KEYWORD2>
+ <KEYWORD2>off</KEYWORD2>
+ <FUNCTION>quit</FUNCTION>
+ <FUNCTION>read</FUNCTION>
+ <FUNCTION>restore</FUNCTION>
+ <FUNCTION>save</FUNCTION>
+ <FUNCTION>spaces</FUNCTION>
+ <FUNCTION>style</FUNCTION>
+ <KEYWORD2>roman</KEYWORD2>
+ <KEYWORD2>bold</KEYWORD2>
+ <KEYWORD2>underline</KEYWORD2>
+ <KEYWORD2>reverse</KEYWORD2>
+ <KEYWORD2>fixed</KEYWORD2>
+ <FUNCTION>score</FUNCTION>
+ <FUNCTION>time</FUNCTION>
+
+ <!-- Top-level keyworks -->
+ <KEYWORD3>Abbreviate</KEYWORD3>
+ <KEYWORD3>Array</KEYWORD3>
+ <KEYWORD3>Attribute</KEYWORD3>
+ <KEYWORD3>Class</KEYWORD3>
+ <KEYWORD3>Constant</KEYWORD3>
+ <KEYWORD3>Default</KEYWORD3>
+ <KEYWORD3>End</KEYWORD3>
+ <KEYWORD3>Endif</KEYWORD3>
+ <KEYWORD3>Extend</KEYWORD3>
+ <KEYWORD3>Global</KEYWORD3>
+ <KEYWORD3>Ifdef</KEYWORD3>
+ <KEYWORD3>Ifndef</KEYWORD3>
+ <KEYWORD3>Ifnot</KEYWORD3>
+ <KEYWORD3>Iftrue</KEYWORD3>
+ <KEYWORD3>Iffalse</KEYWORD3>
+ <KEYWORD3>Import</KEYWORD3>
+ <KEYWORD3>Include</KEYWORD3>
+ <KEYWORD3>Link</KEYWORD3>
+ <KEYWORD3>Lowstring</KEYWORD3>
+ <KEYWORD3>Message</KEYWORD3>
+ <KEYWORD3>Object</KEYWORD3>
+ <KEYWORD3>Property</KEYWORD3>
+ <KEYWORD3>Replace</KEYWORD3>
+ <KEYWORD3>Serial</KEYWORD3>
+ <KEYWORD3>Switches</KEYWORD3>
+ <KEYWORD3>Statusline</KEYWORD3>
+ <KEYWORD3>System_file</KEYWORD3>
+ <KEYWORD3>Verb</KEYWORD3>
+ <KEYWORD3>private</KEYWORD3>
+
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ <LITERAL2>super</LITERAL2>
+ <LITERAL2>self</LITERAL2>
+
+ <INVALID>this</INVALID>
+ </KEYWORDS>
+ </RULES>
+ <RULES SET="InformInnerText" IGNORE_CASE="FALSE" DEFAULT="LITERAL1">
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+
+ <!-- escaping the @ symbol -->
+ <SEQ TYPE="LITERAL2">@@</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/ini.xml b/jEdit/modes/ini.xml
index 71c50b6..3c3b95a 100644
--- a/jEdit/modes/ini.xml
+++ b/jEdit/modes/ini.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- </PROPS>
- <RULES HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="KEYWORD2" AT_LINE_START="TRUE">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">#</EOL_SPAN>
-
- <MARK_PREVIOUS TYPE="KEYWORD1"
- AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">=</MARK_PREVIOUS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ </PROPS>
+ <RULES HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="KEYWORD2" AT_LINE_START="TRUE">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">#</EOL_SPAN>
+
+ <MARK_PREVIOUS TYPE="KEYWORD1"
+ AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">=</MARK_PREVIOUS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/inno-setup.xml b/jEdit/modes/inno-setup.xml
index d40575e..2967836 100644
--- a/jEdit/modes/inno-setup.xml
+++ b/jEdit/modes/inno-setup.xml
@@ -1,406 +1,406 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- </PROPS>
- <RULES HIGHLIGHT_DIGITS="FALSE">
-
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE" DELEGATE="pascal::MAIN">[code]</SEQ>
-
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Setup]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Types]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Components]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Tasks]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Dirs]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Files]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Icons]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[INI]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[InstallDelete]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Languages]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Messages]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[CustomMessages]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[LangOptions]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Registry]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Run]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[UninstallRun]</SEQ>
- <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[UninstallDelete]</SEQ>
-
- <!-- pre-processor directives -->
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#define </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#dim </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#undef </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#include </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#emit </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#expr </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#insert </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#append </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#if </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#elif </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#else </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#endif</EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#ifexist </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#ifnexist </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#ifdef </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#for </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#sub </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#endsub</EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#pragma </EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#error </EOL_SPAN>
- <SPAN TYPE="LITERAL4">
- <BEGIN>{#</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="LITERAL2">%</MARK_FOLLOWING>
-
- <SPAN TYPE="LITERAL1" DELEGATE="STRING">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" DELEGATE="STRING">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <!-- variable -->
- <SPAN TYPE="KEYWORD3">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">#</EOL_SPAN>
-
- <!--
- <MARK_PREVIOUS TYPE="KEYWORD1"
- AT_LINE_START="TRUE" MATCH_TYPE="CONTEXT"">=</MARK_PREVIOUS>
- -->
-
- <KEYWORDS>
- <!-- [Setup] -->
- <!-- compiler -->
- <KEYWORD1>Compression</KEYWORD1>
- <KEYWORD1>DiskClusterSize</KEYWORD1>
- <KEYWORD1>DiskSliceSize</KEYWORD1>
- <KEYWORD1>DiskSpanning</KEYWORD1>
- <KEYWORD1>Encryption</KEYWORD1>
- <KEYWORD1>InternalCompressLevel</KEYWORD1>
- <KEYWORD1>MergeDuplicateFiles</KEYWORD1>
- <KEYWORD1>OutputBaseFilename</KEYWORD1>
- <KEYWORD1>OutputDir</KEYWORD1>
- <KEYWORD1>ReserveBytes</KEYWORD1>
- <KEYWORD1>SlicesPerDisk</KEYWORD1>
- <KEYWORD1>SolidCompression</KEYWORD1>
- <KEYWORD1>SourceDir</KEYWORD1>
- <KEYWORD1>UseSetupLdr</KEYWORD1>
- <KEYWORD1>VersionInfoCompany</KEYWORD1>
- <KEYWORD1>VersionInfoDescription</KEYWORD1>
- <KEYWORD1>VersionInfoTextVersion</KEYWORD1>
- <KEYWORD1>VersionInfoVersion</KEYWORD1>
- <!-- installer, functional -->
- <KEYWORD1>AllowCancelDuringInstall</KEYWORD1>
- <KEYWORD1>AllowNoIcons</KEYWORD1>
- <KEYWORD1>AllowRootDirectory</KEYWORD1>
- <KEYWORD1>AllowUNCPath</KEYWORD1>
- <KEYWORD1>AlwaysRestart</KEYWORD1>
- <KEYWORD1>AlwaysShowComponentsList</KEYWORD1>
- <KEYWORD1>AlwaysShowDirOnReadyPage</KEYWORD1>
- <KEYWORD1>AlwaysShowGroupOnReadyPage</KEYWORD1>
- <KEYWORD1>AlwaysUsePersonalGroup</KEYWORD1>
- <KEYWORD1>AppendDefaultDirName</KEYWORD1>
- <KEYWORD1>AppendDefaultGroupName</KEYWORD1>
- <KEYWORD1>AppComments</KEYWORD1>
- <KEYWORD1>AppContact</KEYWORD1>
- <KEYWORD1>AppId</KEYWORD1>
- <KEYWORD1>AppModifyPath</KEYWORD1>
- <KEYWORD1>AppMutex</KEYWORD1>
- <KEYWORD1>AppName</KEYWORD1>
- <KEYWORD1>AppPublisher</KEYWORD1>
- <KEYWORD1>AppPublisherURL</KEYWORD1>
- <KEYWORD1>AppReadmeFile</KEYWORD1>
- <KEYWORD1>AppSupportURL</KEYWORD1>
- <KEYWORD1>AppUpdatesURL</KEYWORD1>
- <KEYWORD1>AppVersion</KEYWORD1>
- <KEYWORD1>AppVerName</KEYWORD1>
- <KEYWORD1>ChangesAssociations</KEYWORD1>
- <KEYWORD1>CreateAppDir</KEYWORD1>
- <KEYWORD1>CreateUninstallRegKey</KEYWORD1>
- <KEYWORD1>DefaultDirName</KEYWORD1>
- <KEYWORD1>DefaultGroupName</KEYWORD1>
- <KEYWORD1>DefaultUserInfoName</KEYWORD1>
- <KEYWORD1>DefaultUserInfoOrg</KEYWORD1>
- <KEYWORD1>DefaultUserInfoSerial</KEYWORD1>
- <KEYWORD1>DirExistsWarning</KEYWORD1>
- <KEYWORD1>DisableDirPage</KEYWORD1>
- <KEYWORD1>DisableFinishedPage</KEYWORD1>
- <KEYWORD1>DisableProgramGroupPage</KEYWORD1>
- <KEYWORD1>DisableReadyMemo</KEYWORD1>
- <KEYWORD1>DisableReadyPage</KEYWORD1>
- <KEYWORD1>DisableStartupPrompt</KEYWORD1>
- <KEYWORD1>EnableDirDoesntExistWarning</KEYWORD1>
- <KEYWORD1>ExtraDiskSpaceRequired</KEYWORD1>
- <KEYWORD1>InfoAfterFile</KEYWORD1>
- <KEYWORD1>InfoBeforeFile</KEYWORD1>
- <KEYWORD1>LanguageDetectionMethod</KEYWORD1>
- <KEYWORD1>LicenseFile</KEYWORD1>
- <KEYWORD1>MinVersion</KEYWORD1>
- <KEYWORD1>OnlyBelowVersion</KEYWORD1>
- <KEYWORD1>Password</KEYWORD1>
- <KEYWORD1>PrivilegesRequired</KEYWORD1>
- <KEYWORD1>RestartIfNeededByRun</KEYWORD1>
- <KEYWORD1>ShowLanguageDialog</KEYWORD1>
- <KEYWORD1>TimeStampRounding</KEYWORD1>
- <KEYWORD1>TimeStampsInUTC</KEYWORD1>
- <KEYWORD1>TouchDate</KEYWORD1>
- <KEYWORD1>TouchTime</KEYWORD1>
- <KEYWORD1>Uninstallable</KEYWORD1>
- <KEYWORD1>UninstallDisplayIcon</KEYWORD1>
- <KEYWORD1>UninstallDisplayName</KEYWORD1>
- <KEYWORD1>UninstallFilesDir</KEYWORD1>
- <KEYWORD1>UninstallLogMode</KEYWORD1>
- <KEYWORD1>UninstallRestartComputer</KEYWORD1>
- <KEYWORD1>UpdateUninstallLogAppName</KEYWORD1>
- <KEYWORD1>UsePreviousAppDir</KEYWORD1>
- <KEYWORD1>UsePreviousGroup</KEYWORD1>
- <KEYWORD1>UsePreviousSetupType</KEYWORD1>
- <KEYWORD1>UsePreviousTasks</KEYWORD1>
- <KEYWORD1>UsePreviousUserInfo</KEYWORD1>
- <KEYWORD1>UserInfoPage</KEYWORD1>
- <!-- installer, cosmetic -->
- <KEYWORD1>AppCopyright</KEYWORD1>
- <KEYWORD1>BackColor</KEYWORD1>
- <KEYWORD1>BackColor2</KEYWORD1>
- <KEYWORD1>BackColorDirection</KEYWORD1>
- <KEYWORD1>BackSolid</KEYWORD1>
- <KEYWORD1>FlatComponentsList</KEYWORD1>
- <KEYWORD1>SetupIconFile</KEYWORD1>
- <KEYWORD1>ShowComponentSizes</KEYWORD1>
- <KEYWORD1>ShowTasksTreeLines</KEYWORD1>
- <KEYWORD1>UninstallStyle</KEYWORD1>
- <KEYWORD1>WindowShowCaption</KEYWORD1>
- <KEYWORD1>WindowStartMaximized</KEYWORD1>
- <KEYWORD1>WindowResizable</KEYWORD1>
- <KEYWORD1>WindowVisible</KEYWORD1>
- <KEYWORD1>WizardImageBackColor</KEYWORD1>
- <KEYWORD1>WizardImageFile</KEYWORD1>
- <KEYWORD1>WizardImageStretch</KEYWORD1>
- <KEYWORD1>WizardSmallImageBackColor</KEYWORD1>
- <KEYWORD1>WizardSmallImageFile</KEYWORD1>
- <KEYWORD1>UninstallIconFile</KEYWORD1>
-
- <!-- parameters -->
- <KEYWORD4>AfterInstall</KEYWORD4>
- <KEYWORD4>Attribs</KEYWORD4>
- <KEYWORD4>BeforeInstall</KEYWORD4>
- <KEYWORD4>Check</KEYWORD4>
- <KEYWORD4>Comment</KEYWORD4>
- <KEYWORD4>Components</KEYWORD4>
- <KEYWORD4>CopyMode</KEYWORD4>
- <KEYWORD4>Description</KEYWORD4>
- <KEYWORD4>DestDir</KEYWORD4>
- <KEYWORD4>DestName</KEYWORD4>
- <KEYWORD4>Excludes</KEYWORD4>
- <KEYWORD4>ExtraDiskSpaceRequired</KEYWORD4>
- <KEYWORD4>Filename</KEYWORD4>
- <KEYWORD4>Flags</KEYWORD4>
- <KEYWORD4>FontInstall</KEYWORD4>
- <KEYWORD4>GroupDescription</KEYWORD4>
- <KEYWORD4>HotKey</KEYWORD4>
- <KEYWORD4>IconFilename</KEYWORD4>
- <KEYWORD4>IconIndex</KEYWORD4>
- <KEYWORD4>InfoBeforeFile</KEYWORD4>
- <KEYWORD4>InfoAfterFile</KEYWORD4>
- <KEYWORD4>Key</KEYWORD4>
- <!--<KEYWORD4>LicenseFile</KEYWORD4>-->
- <KEYWORD4>MessagesFile</KEYWORD4>
- <KEYWORD4>Name</KEYWORD4>
- <KEYWORD4>Parameters</KEYWORD4>
- <KEYWORD4>Permissions</KEYWORD4>
- <KEYWORD4>Root</KEYWORD4>
- <KEYWORD4>RunOnceId</KEYWORD4>
- <KEYWORD4>Section</KEYWORD4>
- <KEYWORD4>Source</KEYWORD4>
- <KEYWORD4>StatusMsg</KEYWORD4>
- <KEYWORD4>String</KEYWORD4>
- <KEYWORD4>Subkey</KEYWORD4>
- <KEYWORD4>Tasks</KEYWORD4>
- <KEYWORD4>Type</KEYWORD4>
- <KEYWORD4>Types</KEYWORD4>
- <KEYWORD4>ValueType</KEYWORD4>
- <KEYWORD4>ValueName</KEYWORD4>
- <KEYWORD4>ValueData</KEYWORD4>
- <KEYWORD4>WorkingDir</KEYWORD4>
-
- <!-- flags -->
- <LITERAL3>allowunsafefiles</LITERAL3>
- <LITERAL3>checkedonce</LITERAL3>
- <LITERAL3>closeonexit</LITERAL3>
- <LITERAL3>compact</LITERAL3>
- <LITERAL3>comparetimestamp</LITERAL3>
- <LITERAL3>confirmoverwrite</LITERAL3>
- <LITERAL3>createkeyifdoesntexist</LITERAL3>
- <LITERAL3>createonlyiffileexists</LITERAL3>
- <LITERAL3>createvalueifdoesntexist</LITERAL3>
- <LITERAL3>deleteafterinstall</LITERAL3>
- <LITERAL3>deletekey</LITERAL3>
- <LITERAL3>deletevalue</LITERAL3>
- <LITERAL3>desktopicon</LITERAL3>
- <LITERAL3>dirifempty</LITERAL3>
- <LITERAL3>disablenouninstallwarning</LITERAL3>
- <LITERAL3>dontcloseonexit</LITERAL3>
- <LITERAL3>dontcopy</LITERAL3>
- <LITERAL3>dontcreatekey</LITERAL3>
- <LITERAL3>dontinheritcheck</LITERAL3>
- <LITERAL3>dontverifychecksum</LITERAL3>
- <LITERAL3>exclusive</LITERAL3>
- <LITERAL3>external</LITERAL3>
- <LITERAL3>files</LITERAL3>
- <LITERAL3>filesandordirs</LITERAL3>
- <LITERAL3>fixed</LITERAL3>
- <LITERAL3>fontisnttruetype</LITERAL3>
- <LITERAL3>full</LITERAL3>
- <LITERAL3>ignoreversion</LITERAL3>
- <LITERAL3>iscustom</LITERAL3>
- <LITERAL3>isreadme</LITERAL3>
- <LITERAL3>hidden</LITERAL3>
- <LITERAL3>hidewizard</LITERAL3>
- <LITERAL3>modify</LITERAL3>
- <LITERAL3>nocompression</LITERAL3>
- <LITERAL3>noencryption</LITERAL3>
- <LITERAL3>noerror</LITERAL3>
- <LITERAL3>noregerror</LITERAL3>
- <LITERAL3>nowait</LITERAL3>
- <LITERAL3>onlyifdestfileexists</LITERAL3>
- <LITERAL3>onlyifdoesntexist</LITERAL3>
- <LITERAL3>overwritereadonly</LITERAL3>
- <LITERAL3>postinstall</LITERAL3>
- <LITERAL3>preservestringtype</LITERAL3>
- <LITERAL3>promptifolder</LITERAL3>
- <LITERAL3>quicklaunchicon</LITERAL3>
- <LITERAL3>read</LITERAL3>
- <LITERAL3>readonly</LITERAL3>
- <LITERAL3>readexec</LITERAL3>
- <LITERAL3>recursesubdirs</LITERAL3>
- <LITERAL3>regserver</LITERAL3>
- <LITERAL3>regtypelib</LITERAL3>
- <LITERAL3>replacesameversion</LITERAL3>
- <LITERAL3>restart</LITERAL3>
- <LITERAL3>restartreplace</LITERAL3>
- <LITERAL3>runhidden</LITERAL3>
- <LITERAL3>runmaximized</LITERAL3>
- <LITERAL3>runminimized</LITERAL3>
- <LITERAL3>sharedfile</LITERAL3>
- <LITERAL3>shellexec</LITERAL3>
- <LITERAL3>skipifnotsilent</LITERAL3>
- <LITERAL3>skipifsilent</LITERAL3>
- <LITERAL3>skipifdoesntexist</LITERAL3>
- <LITERAL3>skipifsourcedoesntexist</LITERAL3>
- <LITERAL3>sortfilesbyextension</LITERAL3>
- <LITERAL3>system</LITERAL3>
- <LITERAL3>touch</LITERAL3>
- <LITERAL3>unchecked</LITERAL3>
- <LITERAL3>uninsalwaysuninstall</LITERAL3>
- <LITERAL3>uninsclearvalue</LITERAL3>
- <LITERAL3>uninsdeleteentry</LITERAL3>
- <LITERAL3>uninsdeletekey</LITERAL3>
- <LITERAL3>uninsdeletekeyifempty</LITERAL3>
- <LITERAL3>uninsdeletesection</LITERAL3>
- <LITERAL3>uninsdeletesectionifempty</LITERAL3>
- <LITERAL3>uninsdeletevalue</LITERAL3>
- <LITERAL3>uninsneveruninstall</LITERAL3>
- <LITERAL3>uninsremovereadonly</LITERAL3>
- <LITERAL3>uninsrestartdelete</LITERAL3>
- <LITERAL3>useapppaths</LITERAL3>
- <LITERAL3>waituntilidle</LITERAL3>
-
- <!-- registry root keys -->
- <LITERAL3>HKCR</LITERAL3>
- <LITERAL3>HKCU</LITERAL3>
- <LITERAL3>HKLM</LITERAL3>
- <LITERAL3>HKU</LITERAL3>
- <LITERAL3>HKCC</LITERAL3>
-
- <!-- registry value types -->
- <LITERAL3>none</LITERAL3>
- <LITERAL3>string</LITERAL3>
- <LITERAL3>expandsz</LITERAL3>
- <LITERAL3>multisz</LITERAL3>
- <LITERAL3>dword</LITERAL3>
- <LITERAL3>binary</LITERAL3>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="STRING" DEFAULT="LITERAL1" IGNORE_CASE="TRUE">
- <!-- pre-processor constant -->
- <SPAN TYPE="LITERAL4">
- <BEGIN>{#</BEGIN>
- <END>}</END>
- </SPAN>
- <!-- constant -->
- <SPAN TYPE="KEYWORD3" DELEGATE="CONSTANT">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
- </RULES>
-
- <RULES SET="CONSTANT" DEFAULT="KEYWORD3">
- <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="CONTEXT">code:</MARK_FOLLOWING>
- <SEQ TYPE="OPERATOR">|</SEQ>
- </RULES>
-
- <!-- pre-processor directives -->
- <RULES SET="DIRECTIVE" DEFAULT="LITERAL4" IGNORE_CASE="TRUE">
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SPAN TYPE="COMMENT2">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- pre-processor defined functions -->
- <KEYWORDS>
- <FUNCTION>Defined</FUNCTION>
- <FUNCTION>TypeOf</FUNCTION>
- <FUNCTION>GetFileVersion</FUNCTION>
- <FUNCTION>GetStringFileInfo</FUNCTION>
- <FUNCTION>Int</FUNCTION>
- <FUNCTION>Str</FUNCTION>
- <FUNCTION>FileExists</FUNCTION>
- <FUNCTION>FileSize</FUNCTION>
- <FUNCTION>ReadIni</FUNCTION>
- <FUNCTION>WriteIni</FUNCTION>
- <FUNCTION>ReadReg</FUNCTION>
- <FUNCTION>Exec</FUNCTION>
- <FUNCTION>Copy</FUNCTION>
- <FUNCTION>Pos</FUNCTION>
- <FUNCTION>RPos</FUNCTION>
- <FUNCTION>Len</FUNCTION>
- <FUNCTION>SaveToFile</FUNCTION>
- <FUNCTION>Find</FUNCTION>
- <FUNCTION>SetupSetting</FUNCTION>
- <FUNCTION>SetSetupSetting</FUNCTION>
- <FUNCTION>LowerCase</FUNCTION>
- <FUNCTION>EntryCount</FUNCTION>
- <FUNCTION>GetEnv</FUNCTION>
- <FUNCTION>DeleteFile</FUNCTION>
- <FUNCTION>CopyFile</FUNCTION>
- <FUNCTION>FindFirst</FUNCTION>
- <FUNCTION>FindNext</FUNCTION>
- <FUNCTION>FindClose</FUNCTION>
- <FUNCTION>FindGetFileName</FUNCTION>
- <FUNCTION>FileOpen</FUNCTION>
- <FUNCTION>FileRead</FUNCTION>
- <FUNCTION>FileReset</FUNCTION>
- <FUNCTION>FileEof</FUNCTION>
- <FUNCTION>FileClose</FUNCTION>
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ </PROPS>
+ <RULES HIGHLIGHT_DIGITS="FALSE">
+
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE" DELEGATE="pascal::MAIN">[code]</SEQ>
+
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Setup]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Types]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Components]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Tasks]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Dirs]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Files]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Icons]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[INI]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[InstallDelete]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Languages]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Messages]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[CustomMessages]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[LangOptions]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Registry]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[Run]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[UninstallRun]</SEQ>
+ <SEQ TYPE="KEYWORD2" AT_LINE_START="TRUE">[UninstallDelete]</SEQ>
+
+ <!-- pre-processor directives -->
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#define </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#dim </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#undef </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#include </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#emit </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#expr </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#insert </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#append </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#if </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#elif </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#else </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#endif</EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#ifexist </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#ifnexist </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#ifdef </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#for </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#sub </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#endsub</EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#pragma </EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">#error </EOL_SPAN>
+ <SPAN TYPE="LITERAL4">
+ <BEGIN>{#</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="LITERAL2">%</MARK_FOLLOWING>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="STRING">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="STRING">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <!-- variable -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">#</EOL_SPAN>
+
+ <!--
+ <MARK_PREVIOUS TYPE="KEYWORD1"
+ AT_LINE_START="TRUE" MATCH_TYPE="CONTEXT"">=</MARK_PREVIOUS>
+ -->
+
+ <KEYWORDS>
+ <!-- [Setup] -->
+ <!-- compiler -->
+ <KEYWORD1>Compression</KEYWORD1>
+ <KEYWORD1>DiskClusterSize</KEYWORD1>
+ <KEYWORD1>DiskSliceSize</KEYWORD1>
+ <KEYWORD1>DiskSpanning</KEYWORD1>
+ <KEYWORD1>Encryption</KEYWORD1>
+ <KEYWORD1>InternalCompressLevel</KEYWORD1>
+ <KEYWORD1>MergeDuplicateFiles</KEYWORD1>
+ <KEYWORD1>OutputBaseFilename</KEYWORD1>
+ <KEYWORD1>OutputDir</KEYWORD1>
+ <KEYWORD1>ReserveBytes</KEYWORD1>
+ <KEYWORD1>SlicesPerDisk</KEYWORD1>
+ <KEYWORD1>SolidCompression</KEYWORD1>
+ <KEYWORD1>SourceDir</KEYWORD1>
+ <KEYWORD1>UseSetupLdr</KEYWORD1>
+ <KEYWORD1>VersionInfoCompany</KEYWORD1>
+ <KEYWORD1>VersionInfoDescription</KEYWORD1>
+ <KEYWORD1>VersionInfoTextVersion</KEYWORD1>
+ <KEYWORD1>VersionInfoVersion</KEYWORD1>
+ <!-- installer, functional -->
+ <KEYWORD1>AllowCancelDuringInstall</KEYWORD1>
+ <KEYWORD1>AllowNoIcons</KEYWORD1>
+ <KEYWORD1>AllowRootDirectory</KEYWORD1>
+ <KEYWORD1>AllowUNCPath</KEYWORD1>
+ <KEYWORD1>AlwaysRestart</KEYWORD1>
+ <KEYWORD1>AlwaysShowComponentsList</KEYWORD1>
+ <KEYWORD1>AlwaysShowDirOnReadyPage</KEYWORD1>
+ <KEYWORD1>AlwaysShowGroupOnReadyPage</KEYWORD1>
+ <KEYWORD1>AlwaysUsePersonalGroup</KEYWORD1>
+ <KEYWORD1>AppendDefaultDirName</KEYWORD1>
+ <KEYWORD1>AppendDefaultGroupName</KEYWORD1>
+ <KEYWORD1>AppComments</KEYWORD1>
+ <KEYWORD1>AppContact</KEYWORD1>
+ <KEYWORD1>AppId</KEYWORD1>
+ <KEYWORD1>AppModifyPath</KEYWORD1>
+ <KEYWORD1>AppMutex</KEYWORD1>
+ <KEYWORD1>AppName</KEYWORD1>
+ <KEYWORD1>AppPublisher</KEYWORD1>
+ <KEYWORD1>AppPublisherURL</KEYWORD1>
+ <KEYWORD1>AppReadmeFile</KEYWORD1>
+ <KEYWORD1>AppSupportURL</KEYWORD1>
+ <KEYWORD1>AppUpdatesURL</KEYWORD1>
+ <KEYWORD1>AppVersion</KEYWORD1>
+ <KEYWORD1>AppVerName</KEYWORD1>
+ <KEYWORD1>ChangesAssociations</KEYWORD1>
+ <KEYWORD1>CreateAppDir</KEYWORD1>
+ <KEYWORD1>CreateUninstallRegKey</KEYWORD1>
+ <KEYWORD1>DefaultDirName</KEYWORD1>
+ <KEYWORD1>DefaultGroupName</KEYWORD1>
+ <KEYWORD1>DefaultUserInfoName</KEYWORD1>
+ <KEYWORD1>DefaultUserInfoOrg</KEYWORD1>
+ <KEYWORD1>DefaultUserInfoSerial</KEYWORD1>
+ <KEYWORD1>DirExistsWarning</KEYWORD1>
+ <KEYWORD1>DisableDirPage</KEYWORD1>
+ <KEYWORD1>DisableFinishedPage</KEYWORD1>
+ <KEYWORD1>DisableProgramGroupPage</KEYWORD1>
+ <KEYWORD1>DisableReadyMemo</KEYWORD1>
+ <KEYWORD1>DisableReadyPage</KEYWORD1>
+ <KEYWORD1>DisableStartupPrompt</KEYWORD1>
+ <KEYWORD1>EnableDirDoesntExistWarning</KEYWORD1>
+ <KEYWORD1>ExtraDiskSpaceRequired</KEYWORD1>
+ <KEYWORD1>InfoAfterFile</KEYWORD1>
+ <KEYWORD1>InfoBeforeFile</KEYWORD1>
+ <KEYWORD1>LanguageDetectionMethod</KEYWORD1>
+ <KEYWORD1>LicenseFile</KEYWORD1>
+ <KEYWORD1>MinVersion</KEYWORD1>
+ <KEYWORD1>OnlyBelowVersion</KEYWORD1>
+ <KEYWORD1>Password</KEYWORD1>
+ <KEYWORD1>PrivilegesRequired</KEYWORD1>
+ <KEYWORD1>RestartIfNeededByRun</KEYWORD1>
+ <KEYWORD1>ShowLanguageDialog</KEYWORD1>
+ <KEYWORD1>TimeStampRounding</KEYWORD1>
+ <KEYWORD1>TimeStampsInUTC</KEYWORD1>
+ <KEYWORD1>TouchDate</KEYWORD1>
+ <KEYWORD1>TouchTime</KEYWORD1>
+ <KEYWORD1>Uninstallable</KEYWORD1>
+ <KEYWORD1>UninstallDisplayIcon</KEYWORD1>
+ <KEYWORD1>UninstallDisplayName</KEYWORD1>
+ <KEYWORD1>UninstallFilesDir</KEYWORD1>
+ <KEYWORD1>UninstallLogMode</KEYWORD1>
+ <KEYWORD1>UninstallRestartComputer</KEYWORD1>
+ <KEYWORD1>UpdateUninstallLogAppName</KEYWORD1>
+ <KEYWORD1>UsePreviousAppDir</KEYWORD1>
+ <KEYWORD1>UsePreviousGroup</KEYWORD1>
+ <KEYWORD1>UsePreviousSetupType</KEYWORD1>
+ <KEYWORD1>UsePreviousTasks</KEYWORD1>
+ <KEYWORD1>UsePreviousUserInfo</KEYWORD1>
+ <KEYWORD1>UserInfoPage</KEYWORD1>
+ <!-- installer, cosmetic -->
+ <KEYWORD1>AppCopyright</KEYWORD1>
+ <KEYWORD1>BackColor</KEYWORD1>
+ <KEYWORD1>BackColor2</KEYWORD1>
+ <KEYWORD1>BackColorDirection</KEYWORD1>
+ <KEYWORD1>BackSolid</KEYWORD1>
+ <KEYWORD1>FlatComponentsList</KEYWORD1>
+ <KEYWORD1>SetupIconFile</KEYWORD1>
+ <KEYWORD1>ShowComponentSizes</KEYWORD1>
+ <KEYWORD1>ShowTasksTreeLines</KEYWORD1>
+ <KEYWORD1>UninstallStyle</KEYWORD1>
+ <KEYWORD1>WindowShowCaption</KEYWORD1>
+ <KEYWORD1>WindowStartMaximized</KEYWORD1>
+ <KEYWORD1>WindowResizable</KEYWORD1>
+ <KEYWORD1>WindowVisible</KEYWORD1>
+ <KEYWORD1>WizardImageBackColor</KEYWORD1>
+ <KEYWORD1>WizardImageFile</KEYWORD1>
+ <KEYWORD1>WizardImageStretch</KEYWORD1>
+ <KEYWORD1>WizardSmallImageBackColor</KEYWORD1>
+ <KEYWORD1>WizardSmallImageFile</KEYWORD1>
+ <KEYWORD1>UninstallIconFile</KEYWORD1>
+
+ <!-- parameters -->
+ <KEYWORD4>AfterInstall</KEYWORD4>
+ <KEYWORD4>Attribs</KEYWORD4>
+ <KEYWORD4>BeforeInstall</KEYWORD4>
+ <KEYWORD4>Check</KEYWORD4>
+ <KEYWORD4>Comment</KEYWORD4>
+ <KEYWORD4>Components</KEYWORD4>
+ <KEYWORD4>CopyMode</KEYWORD4>
+ <KEYWORD4>Description</KEYWORD4>
+ <KEYWORD4>DestDir</KEYWORD4>
+ <KEYWORD4>DestName</KEYWORD4>
+ <KEYWORD4>Excludes</KEYWORD4>
+ <KEYWORD4>ExtraDiskSpaceRequired</KEYWORD4>
+ <KEYWORD4>Filename</KEYWORD4>
+ <KEYWORD4>Flags</KEYWORD4>
+ <KEYWORD4>FontInstall</KEYWORD4>
+ <KEYWORD4>GroupDescription</KEYWORD4>
+ <KEYWORD4>HotKey</KEYWORD4>
+ <KEYWORD4>IconFilename</KEYWORD4>
+ <KEYWORD4>IconIndex</KEYWORD4>
+ <KEYWORD4>InfoBeforeFile</KEYWORD4>
+ <KEYWORD4>InfoAfterFile</KEYWORD4>
+ <KEYWORD4>Key</KEYWORD4>
+ <!--<KEYWORD4>LicenseFile</KEYWORD4>-->
+ <KEYWORD4>MessagesFile</KEYWORD4>
+ <KEYWORD4>Name</KEYWORD4>
+ <KEYWORD4>Parameters</KEYWORD4>
+ <KEYWORD4>Permissions</KEYWORD4>
+ <KEYWORD4>Root</KEYWORD4>
+ <KEYWORD4>RunOnceId</KEYWORD4>
+ <KEYWORD4>Section</KEYWORD4>
+ <KEYWORD4>Source</KEYWORD4>
+ <KEYWORD4>StatusMsg</KEYWORD4>
+ <KEYWORD4>String</KEYWORD4>
+ <KEYWORD4>Subkey</KEYWORD4>
+ <KEYWORD4>Tasks</KEYWORD4>
+ <KEYWORD4>Type</KEYWORD4>
+ <KEYWORD4>Types</KEYWORD4>
+ <KEYWORD4>ValueType</KEYWORD4>
+ <KEYWORD4>ValueName</KEYWORD4>
+ <KEYWORD4>ValueData</KEYWORD4>
+ <KEYWORD4>WorkingDir</KEYWORD4>
+
+ <!-- flags -->
+ <LITERAL3>allowunsafefiles</LITERAL3>
+ <LITERAL3>checkedonce</LITERAL3>
+ <LITERAL3>closeonexit</LITERAL3>
+ <LITERAL3>compact</LITERAL3>
+ <LITERAL3>comparetimestamp</LITERAL3>
+ <LITERAL3>confirmoverwrite</LITERAL3>
+ <LITERAL3>createkeyifdoesntexist</LITERAL3>
+ <LITERAL3>createonlyiffileexists</LITERAL3>
+ <LITERAL3>createvalueifdoesntexist</LITERAL3>
+ <LITERAL3>deleteafterinstall</LITERAL3>
+ <LITERAL3>deletekey</LITERAL3>
+ <LITERAL3>deletevalue</LITERAL3>
+ <LITERAL3>desktopicon</LITERAL3>
+ <LITERAL3>dirifempty</LITERAL3>
+ <LITERAL3>disablenouninstallwarning</LITERAL3>
+ <LITERAL3>dontcloseonexit</LITERAL3>
+ <LITERAL3>dontcopy</LITERAL3>
+ <LITERAL3>dontcreatekey</LITERAL3>
+ <LITERAL3>dontinheritcheck</LITERAL3>
+ <LITERAL3>dontverifychecksum</LITERAL3>
+ <LITERAL3>exclusive</LITERAL3>
+ <LITERAL3>external</LITERAL3>
+ <LITERAL3>files</LITERAL3>
+ <LITERAL3>filesandordirs</LITERAL3>
+ <LITERAL3>fixed</LITERAL3>
+ <LITERAL3>fontisnttruetype</LITERAL3>
+ <LITERAL3>full</LITERAL3>
+ <LITERAL3>ignoreversion</LITERAL3>
+ <LITERAL3>iscustom</LITERAL3>
+ <LITERAL3>isreadme</LITERAL3>
+ <LITERAL3>hidden</LITERAL3>
+ <LITERAL3>hidewizard</LITERAL3>
+ <LITERAL3>modify</LITERAL3>
+ <LITERAL3>nocompression</LITERAL3>
+ <LITERAL3>noencryption</LITERAL3>
+ <LITERAL3>noerror</LITERAL3>
+ <LITERAL3>noregerror</LITERAL3>
+ <LITERAL3>nowait</LITERAL3>
+ <LITERAL3>onlyifdestfileexists</LITERAL3>
+ <LITERAL3>onlyifdoesntexist</LITERAL3>
+ <LITERAL3>overwritereadonly</LITERAL3>
+ <LITERAL3>postinstall</LITERAL3>
+ <LITERAL3>preservestringtype</LITERAL3>
+ <LITERAL3>promptifolder</LITERAL3>
+ <LITERAL3>quicklaunchicon</LITERAL3>
+ <LITERAL3>read</LITERAL3>
+ <LITERAL3>readonly</LITERAL3>
+ <LITERAL3>readexec</LITERAL3>
+ <LITERAL3>recursesubdirs</LITERAL3>
+ <LITERAL3>regserver</LITERAL3>
+ <LITERAL3>regtypelib</LITERAL3>
+ <LITERAL3>replacesameversion</LITERAL3>
+ <LITERAL3>restart</LITERAL3>
+ <LITERAL3>restartreplace</LITERAL3>
+ <LITERAL3>runhidden</LITERAL3>
+ <LITERAL3>runmaximized</LITERAL3>
+ <LITERAL3>runminimized</LITERAL3>
+ <LITERAL3>sharedfile</LITERAL3>
+ <LITERAL3>shellexec</LITERAL3>
+ <LITERAL3>skipifnotsilent</LITERAL3>
+ <LITERAL3>skipifsilent</LITERAL3>
+ <LITERAL3>skipifdoesntexist</LITERAL3>
+ <LITERAL3>skipifsourcedoesntexist</LITERAL3>
+ <LITERAL3>sortfilesbyextension</LITERAL3>
+ <LITERAL3>system</LITERAL3>
+ <LITERAL3>touch</LITERAL3>
+ <LITERAL3>unchecked</LITERAL3>
+ <LITERAL3>uninsalwaysuninstall</LITERAL3>
+ <LITERAL3>uninsclearvalue</LITERAL3>
+ <LITERAL3>uninsdeleteentry</LITERAL3>
+ <LITERAL3>uninsdeletekey</LITERAL3>
+ <LITERAL3>uninsdeletekeyifempty</LITERAL3>
+ <LITERAL3>uninsdeletesection</LITERAL3>
+ <LITERAL3>uninsdeletesectionifempty</LITERAL3>
+ <LITERAL3>uninsdeletevalue</LITERAL3>
+ <LITERAL3>uninsneveruninstall</LITERAL3>
+ <LITERAL3>uninsremovereadonly</LITERAL3>
+ <LITERAL3>uninsrestartdelete</LITERAL3>
+ <LITERAL3>useapppaths</LITERAL3>
+ <LITERAL3>waituntilidle</LITERAL3>
+
+ <!-- registry root keys -->
+ <LITERAL3>HKCR</LITERAL3>
+ <LITERAL3>HKCU</LITERAL3>
+ <LITERAL3>HKLM</LITERAL3>
+ <LITERAL3>HKU</LITERAL3>
+ <LITERAL3>HKCC</LITERAL3>
+
+ <!-- registry value types -->
+ <LITERAL3>none</LITERAL3>
+ <LITERAL3>string</LITERAL3>
+ <LITERAL3>expandsz</LITERAL3>
+ <LITERAL3>multisz</LITERAL3>
+ <LITERAL3>dword</LITERAL3>
+ <LITERAL3>binary</LITERAL3>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="STRING" DEFAULT="LITERAL1" IGNORE_CASE="TRUE">
+ <!-- pre-processor constant -->
+ <SPAN TYPE="LITERAL4">
+ <BEGIN>{#</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <!-- constant -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="CONSTANT">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="CONSTANT" DEFAULT="KEYWORD3">
+ <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="CONTEXT">code:</MARK_FOLLOWING>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ </RULES>
+
+ <!-- pre-processor directives -->
+ <RULES SET="DIRECTIVE" DEFAULT="LITERAL4" IGNORE_CASE="TRUE">
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- pre-processor defined functions -->
+ <KEYWORDS>
+ <FUNCTION>Defined</FUNCTION>
+ <FUNCTION>TypeOf</FUNCTION>
+ <FUNCTION>GetFileVersion</FUNCTION>
+ <FUNCTION>GetStringFileInfo</FUNCTION>
+ <FUNCTION>Int</FUNCTION>
+ <FUNCTION>Str</FUNCTION>
+ <FUNCTION>FileExists</FUNCTION>
+ <FUNCTION>FileSize</FUNCTION>
+ <FUNCTION>ReadIni</FUNCTION>
+ <FUNCTION>WriteIni</FUNCTION>
+ <FUNCTION>ReadReg</FUNCTION>
+ <FUNCTION>Exec</FUNCTION>
+ <FUNCTION>Copy</FUNCTION>
+ <FUNCTION>Pos</FUNCTION>
+ <FUNCTION>RPos</FUNCTION>
+ <FUNCTION>Len</FUNCTION>
+ <FUNCTION>SaveToFile</FUNCTION>
+ <FUNCTION>Find</FUNCTION>
+ <FUNCTION>SetupSetting</FUNCTION>
+ <FUNCTION>SetSetupSetting</FUNCTION>
+ <FUNCTION>LowerCase</FUNCTION>
+ <FUNCTION>EntryCount</FUNCTION>
+ <FUNCTION>GetEnv</FUNCTION>
+ <FUNCTION>DeleteFile</FUNCTION>
+ <FUNCTION>CopyFile</FUNCTION>
+ <FUNCTION>FindFirst</FUNCTION>
+ <FUNCTION>FindNext</FUNCTION>
+ <FUNCTION>FindClose</FUNCTION>
+ <FUNCTION>FindGetFileName</FUNCTION>
+ <FUNCTION>FileOpen</FUNCTION>
+ <FUNCTION>FileRead</FUNCTION>
+ <FUNCTION>FileReset</FUNCTION>
+ <FUNCTION>FileEof</FUNCTION>
+ <FUNCTION>FileClose</FUNCTION>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/interlis.xml b/jEdit/modes/interlis.xml
index 28960bf..776aafe 100644
--- a/jEdit/modes/interlis.xml
+++ b/jEdit/modes/interlis.xml
@@ -1,262 +1,262 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- INTERLIS mode (www.interlis.ch) by Claude Eisenhut (ce at eisenhutinformatik.ch). -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="blockComment" VALUE="!!" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE">
- <!-- Normal comments. -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">!!</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- Explanations. -->
- <SPAN TYPE="COMMENT2">
- <BEGIN>//</BEGIN>
- <END>//</END>
- </SPAN>
-
- <!-- INTERLIS 1 -->
- <SEQ TYPE="OPERATOR">-></SEQ>
- <SEQ TYPE="OPERATOR"><-</SEQ>
- <SEQ TYPE="OPERATOR">..</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <!-- INTERLIS 2.1 -->
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">--</SEQ>
- <SEQ TYPE="OPERATOR">-<#></SEQ>
- <SEQ TYPE="OPERATOR">-<></SEQ>
- <SEQ TYPE="OPERATOR">-></SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">..</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
-
- <KEYWORDS>
- <!-- INTERLIS 1 -->
- <KEYWORD1>ANY</KEYWORD1>
- <KEYWORD1>ARCS</KEYWORD1>
- <KEYWORD1>AREA</KEYWORD1>
- <KEYWORD1>BASE</KEYWORD1>
- <KEYWORD1>BLANK</KEYWORD1>
- <KEYWORD1>CODE</KEYWORD1>
- <KEYWORD1>CONTINUE</KEYWORD1>
- <KEYWORD1>CONTOUR</KEYWORD1>
- <KEYWORD1>COORD2</KEYWORD1>
- <KEYWORD1>COORD3</KEYWORD1>
- <KEYWORD1>DATE</KEYWORD1>
- <KEYWORD1>DEFAULT</KEYWORD1>
- <KEYWORD1>DEGREES</KEYWORD1>
- <KEYWORD1>DERIVATIVES</KEYWORD1>
- <KEYWORD1>DIM1</KEYWORD1>
- <KEYWORD1>DIM2</KEYWORD1>
- <KEYWORD1>DOMAIN</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>FIX</KEYWORD1>
- <KEYWORD1>FONT</KEYWORD1>
- <KEYWORD1>FORMAT</KEYWORD1>
- <KEYWORD1>FREE</KEYWORD1>
- <KEYWORD1>GRADS</KEYWORD1>
- <KEYWORD1>HALIGNMENT</KEYWORD1>
- <KEYWORD1>I16</KEYWORD1>
- <KEYWORD1>I32</KEYWORD1>
- <KEYWORD1>IDENT</KEYWORD1>
- <KEYWORD1>LINEATTR</KEYWORD1>
- <KEYWORD1>LINESIZE</KEYWORD1>
- <KEYWORD1>MODEL</KEYWORD1>
- <KEYWORD1>NO</KEYWORD1>
- <KEYWORD1>OPTIONAL</KEYWORD1>
- <KEYWORD1>OVERLAPS</KEYWORD1>
- <KEYWORD1>PERIPHERY</KEYWORD1>
- <KEYWORD1>POLYLINE</KEYWORD1>
- <KEYWORD1>RADIANS</KEYWORD1>
- <KEYWORD1>STRAIGHTS</KEYWORD1>
- <KEYWORD1>SURFACE</KEYWORD1>
- <KEYWORD1>TABLE</KEYWORD1>
- <KEYWORD1>TEXT</KEYWORD1>
- <KEYWORD1>TID</KEYWORD1>
- <KEYWORD1>TIDSIZE</KEYWORD1>
- <KEYWORD1>TOPIC</KEYWORD1>
- <KEYWORD1>TRANSFER</KEYWORD1>
- <KEYWORD1>UNDEFINED</KEYWORD1>
- <KEYWORD1>VALIGNMENT</KEYWORD1>
- <KEYWORD1>VERTEX</KEYWORD1>
- <KEYWORD1>VERTEXINFO</KEYWORD1>
- <KEYWORD1>VIEW</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>WITHOUT</KEYWORD1>
-
- <!-- INTERLIS 2.3 -->
- <KEYWORD1>ABSTRACT</KEYWORD1>
- <KEYWORD1>ACCORDING</KEYWORD1>
- <KEYWORD1>AGGREGATES</KEYWORD1>
- <KEYWORD1>AGGREGATION</KEYWORD1>
- <KEYWORD1>ALL</KEYWORD1>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>ANY</KEYWORD1>
- <KEYWORD1>ANYCLASS</KEYWORD1>
- <KEYWORD1>ANYSTRUCTURE</KEYWORD1>
- <KEYWORD1>ARCS</KEYWORD1>
- <KEYWORD1>AREA</KEYWORD1>
- <KEYWORD1>AS</KEYWORD1>
- <KEYWORD1>ASSOCIATION</KEYWORD1>
- <KEYWORD1>AT</KEYWORD1>
- <KEYWORD1>ATTRIBUTE</KEYWORD1>
- <KEYWORD1>ATTRIBUTES</KEYWORD1>
- <KEYWORD1>BAG</KEYWORD1>
- <KEYWORD1>BASE</KEYWORD1>
- <KEYWORD1>BASED</KEYWORD1>
- <KEYWORD1>BASKET</KEYWORD1>
- <KEYWORD1>BINARY</KEYWORD1>
- <KEYWORD1>BLACKBOX</KEYWORD1>
- <KEYWORD1>BOOLEAN</KEYWORD1>
- <KEYWORD1>BY</KEYWORD1>
- <KEYWORD1>CARDINALITY</KEYWORD1>
- <KEYWORD1>CIRCULAR</KEYWORD1>
- <KEYWORD1>CLASS</KEYWORD1>
- <KEYWORD1>CLOCKWISE</KEYWORD1>
- <KEYWORD1>CONSTRAINT</KEYWORD1>
- <KEYWORD1>CONSTRAINTS</KEYWORD1>
- <KEYWORD1>CONTINUE</KEYWORD1>
- <KEYWORD1>CONTINUOUS</KEYWORD1>
- <KEYWORD1>CONTRACTED</KEYWORD1>
- <KEYWORD1>COORD</KEYWORD1>
- <KEYWORD1>COUNTERCLOCKWISE</KEYWORD1>
- <KEYWORD1>DEFINED</KEYWORD1>
- <KEYWORD1>DEPENDS</KEYWORD1>
- <KEYWORD1>DERIVED</KEYWORD1>
- <KEYWORD1>DIRECTED</KEYWORD1>
- <KEYWORD1>DOMAIN</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>ENUMTREEVAL</KEYWORD1>
- <KEYWORD1>ENUMVAL</KEYWORD1>
- <KEYWORD1>EQUAL</KEYWORD1>
- <KEYWORD1>EXISTENCE</KEYWORD1>
- <KEYWORD1>EXTENDED</KEYWORD1>
- <KEYWORD1>EXTENDS</KEYWORD1>
- <KEYWORD1>EXTERNAL</KEYWORD1>
- <KEYWORD1>FINAL</KEYWORD1>
- <KEYWORD1>FIRST</KEYWORD1>
- <KEYWORD1>FORM</KEYWORD1>
- <KEYWORD1>FROM</KEYWORD1>
- <KEYWORD1>FUNCTION</KEYWORD1>
- <KEYWORD1>GRAPHIC</KEYWORD1>
- <KEYWORD1>HALIGNMENT</KEYWORD1>
- <KEYWORD1>HIDING</KEYWORD1>
- <KEYWORD1>IMPORTS</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>INHERITANCE</KEYWORD1>
- <KEYWORD1>INSPECTION</KEYWORD1>
- <KEYWORD1>INTERLIS</KEYWORD1>
- <KEYWORD1>JOIN</KEYWORD1>
- <KEYWORD1>LAST</KEYWORD1>
- <KEYWORD1>LINE</KEYWORD1>
- <KEYWORD1>LIST</KEYWORD1>
- <KEYWORD1>LNBASE</KEYWORD1>
- <KEYWORD1>LOCAL</KEYWORD1>
- <KEYWORD1>MANDATORY</KEYWORD1>
- <KEYWORD1>METAOBJECT</KEYWORD1>
- <KEYWORD1>MODEL</KEYWORD1>
- <KEYWORD1>MTEXT</KEYWORD1>
- <KEYWORD1>NAME</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>NO</KEYWORD1>
- <KEYWORD1>NULL</KEYWORD1>
- <KEYWORD1>NUMERIC</KEYWORD1>
- <KEYWORD1>OBJECT</KEYWORD1>
- <KEYWORD1>OF</KEYWORD1>
- <KEYWORD1>OID</KEYWORD1>
- <KEYWORD1>ON</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>ORDERED</KEYWORD1>
- <KEYWORD1>OTHERS</KEYWORD1>
- <KEYWORD1>OVERLAPS</KEYWORD1>
- <KEYWORD1>PARAMETER</KEYWORD1>
- <KEYWORD1>PARENT</KEYWORD1>
- <KEYWORD1>PI</KEYWORD1>
- <KEYWORD1>POLYLINE</KEYWORD1>
- <KEYWORD1>PROJECTION</KEYWORD1>
- <KEYWORD1>REFERENCE</KEYWORD1>
- <KEYWORD1>REFSYSTEM</KEYWORD1>
- <KEYWORD1>REQUIRED</KEYWORD1>
- <KEYWORD1>RESTRICTED</KEYWORD1>
- <KEYWORD1>ROTATION</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>SIGN</KEYWORD1>
- <KEYWORD1>STRAIGHTS</KEYWORD1>
- <KEYWORD1>STRUCTURE</KEYWORD1>
- <KEYWORD1>SUBDIVISION</KEYWORD1>
- <KEYWORD1>SURFACE</KEYWORD1>
- <KEYWORD1>SYMBOLOGY</KEYWORD1>
- <KEYWORD1>TEXT</KEYWORD1>
- <KEYWORD1>THATAREA</KEYWORD1>
- <KEYWORD1>THIS</KEYWORD1>
- <KEYWORD1>THISAREA</KEYWORD1>
- <KEYWORD1>TO</KEYWORD1>
- <KEYWORD1>TOPIC</KEYWORD1>
- <KEYWORD1>TRANSIENT</KEYWORD1>
- <KEYWORD1>TRANSLATION</KEYWORD1>
- <KEYWORD1>TYPE</KEYWORD1>
- <KEYWORD1>UNDEFINED</KEYWORD1>
- <KEYWORD1>UNION</KEYWORD1>
- <KEYWORD1>UNIQUE</KEYWORD1>
- <KEYWORD1>UNIT</KEYWORD1>
- <KEYWORD1>UNQUALIFIED</KEYWORD1>
- <KEYWORD1>URI</KEYWORD1>
- <KEYWORD1>VALIGNMENT</KEYWORD1>
- <KEYWORD1>VERSION</KEYWORD1>
- <KEYWORD1>VERTEX</KEYWORD1>
- <KEYWORD1>VIEW</KEYWORD1>
- <KEYWORD1>WHEN</KEYWORD1>
- <KEYWORD1>WHERE</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>WITHOUT</KEYWORD1>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- INTERLIS mode (www.interlis.ch) by Claude Eisenhut (ce at eisenhutinformatik.ch). -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="blockComment" VALUE="!!" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE">
+ <!-- Normal comments. -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">!!</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- Explanations. -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>//</BEGIN>
+ <END>//</END>
+ </SPAN>
+
+ <!-- INTERLIS 1 -->
+ <SEQ TYPE="OPERATOR">-></SEQ>
+ <SEQ TYPE="OPERATOR"><-</SEQ>
+ <SEQ TYPE="OPERATOR">..</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <!-- INTERLIS 2.1 -->
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">--</SEQ>
+ <SEQ TYPE="OPERATOR">-<#></SEQ>
+ <SEQ TYPE="OPERATOR">-<></SEQ>
+ <SEQ TYPE="OPERATOR">-></SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">..</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+
+ <KEYWORDS>
+ <!-- INTERLIS 1 -->
+ <KEYWORD1>ANY</KEYWORD1>
+ <KEYWORD1>ARCS</KEYWORD1>
+ <KEYWORD1>AREA</KEYWORD1>
+ <KEYWORD1>BASE</KEYWORD1>
+ <KEYWORD1>BLANK</KEYWORD1>
+ <KEYWORD1>CODE</KEYWORD1>
+ <KEYWORD1>CONTINUE</KEYWORD1>
+ <KEYWORD1>CONTOUR</KEYWORD1>
+ <KEYWORD1>COORD2</KEYWORD1>
+ <KEYWORD1>COORD3</KEYWORD1>
+ <KEYWORD1>DATE</KEYWORD1>
+ <KEYWORD1>DEFAULT</KEYWORD1>
+ <KEYWORD1>DEGREES</KEYWORD1>
+ <KEYWORD1>DERIVATIVES</KEYWORD1>
+ <KEYWORD1>DIM1</KEYWORD1>
+ <KEYWORD1>DIM2</KEYWORD1>
+ <KEYWORD1>DOMAIN</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>FIX</KEYWORD1>
+ <KEYWORD1>FONT</KEYWORD1>
+ <KEYWORD1>FORMAT</KEYWORD1>
+ <KEYWORD1>FREE</KEYWORD1>
+ <KEYWORD1>GRADS</KEYWORD1>
+ <KEYWORD1>HALIGNMENT</KEYWORD1>
+ <KEYWORD1>I16</KEYWORD1>
+ <KEYWORD1>I32</KEYWORD1>
+ <KEYWORD1>IDENT</KEYWORD1>
+ <KEYWORD1>LINEATTR</KEYWORD1>
+ <KEYWORD1>LINESIZE</KEYWORD1>
+ <KEYWORD1>MODEL</KEYWORD1>
+ <KEYWORD1>NO</KEYWORD1>
+ <KEYWORD1>OPTIONAL</KEYWORD1>
+ <KEYWORD1>OVERLAPS</KEYWORD1>
+ <KEYWORD1>PERIPHERY</KEYWORD1>
+ <KEYWORD1>POLYLINE</KEYWORD1>
+ <KEYWORD1>RADIANS</KEYWORD1>
+ <KEYWORD1>STRAIGHTS</KEYWORD1>
+ <KEYWORD1>SURFACE</KEYWORD1>
+ <KEYWORD1>TABLE</KEYWORD1>
+ <KEYWORD1>TEXT</KEYWORD1>
+ <KEYWORD1>TID</KEYWORD1>
+ <KEYWORD1>TIDSIZE</KEYWORD1>
+ <KEYWORD1>TOPIC</KEYWORD1>
+ <KEYWORD1>TRANSFER</KEYWORD1>
+ <KEYWORD1>UNDEFINED</KEYWORD1>
+ <KEYWORD1>VALIGNMENT</KEYWORD1>
+ <KEYWORD1>VERTEX</KEYWORD1>
+ <KEYWORD1>VERTEXINFO</KEYWORD1>
+ <KEYWORD1>VIEW</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>WITHOUT</KEYWORD1>
+
+ <!-- INTERLIS 2.3 -->
+ <KEYWORD1>ABSTRACT</KEYWORD1>
+ <KEYWORD1>ACCORDING</KEYWORD1>
+ <KEYWORD1>AGGREGATES</KEYWORD1>
+ <KEYWORD1>AGGREGATION</KEYWORD1>
+ <KEYWORD1>ALL</KEYWORD1>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>ANY</KEYWORD1>
+ <KEYWORD1>ANYCLASS</KEYWORD1>
+ <KEYWORD1>ANYSTRUCTURE</KEYWORD1>
+ <KEYWORD1>ARCS</KEYWORD1>
+ <KEYWORD1>AREA</KEYWORD1>
+ <KEYWORD1>AS</KEYWORD1>
+ <KEYWORD1>ASSOCIATION</KEYWORD1>
+ <KEYWORD1>AT</KEYWORD1>
+ <KEYWORD1>ATTRIBUTE</KEYWORD1>
+ <KEYWORD1>ATTRIBUTES</KEYWORD1>
+ <KEYWORD1>BAG</KEYWORD1>
+ <KEYWORD1>BASE</KEYWORD1>
+ <KEYWORD1>BASED</KEYWORD1>
+ <KEYWORD1>BASKET</KEYWORD1>
+ <KEYWORD1>BINARY</KEYWORD1>
+ <KEYWORD1>BLACKBOX</KEYWORD1>
+ <KEYWORD1>BOOLEAN</KEYWORD1>
+ <KEYWORD1>BY</KEYWORD1>
+ <KEYWORD1>CARDINALITY</KEYWORD1>
+ <KEYWORD1>CIRCULAR</KEYWORD1>
+ <KEYWORD1>CLASS</KEYWORD1>
+ <KEYWORD1>CLOCKWISE</KEYWORD1>
+ <KEYWORD1>CONSTRAINT</KEYWORD1>
+ <KEYWORD1>CONSTRAINTS</KEYWORD1>
+ <KEYWORD1>CONTINUE</KEYWORD1>
+ <KEYWORD1>CONTINUOUS</KEYWORD1>
+ <KEYWORD1>CONTRACTED</KEYWORD1>
+ <KEYWORD1>COORD</KEYWORD1>
+ <KEYWORD1>COUNTERCLOCKWISE</KEYWORD1>
+ <KEYWORD1>DEFINED</KEYWORD1>
+ <KEYWORD1>DEPENDS</KEYWORD1>
+ <KEYWORD1>DERIVED</KEYWORD1>
+ <KEYWORD1>DIRECTED</KEYWORD1>
+ <KEYWORD1>DOMAIN</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>ENUMTREEVAL</KEYWORD1>
+ <KEYWORD1>ENUMVAL</KEYWORD1>
+ <KEYWORD1>EQUAL</KEYWORD1>
+ <KEYWORD1>EXISTENCE</KEYWORD1>
+ <KEYWORD1>EXTENDED</KEYWORD1>
+ <KEYWORD1>EXTENDS</KEYWORD1>
+ <KEYWORD1>EXTERNAL</KEYWORD1>
+ <KEYWORD1>FINAL</KEYWORD1>
+ <KEYWORD1>FIRST</KEYWORD1>
+ <KEYWORD1>FORM</KEYWORD1>
+ <KEYWORD1>FROM</KEYWORD1>
+ <KEYWORD1>FUNCTION</KEYWORD1>
+ <KEYWORD1>GRAPHIC</KEYWORD1>
+ <KEYWORD1>HALIGNMENT</KEYWORD1>
+ <KEYWORD1>HIDING</KEYWORD1>
+ <KEYWORD1>IMPORTS</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>INHERITANCE</KEYWORD1>
+ <KEYWORD1>INSPECTION</KEYWORD1>
+ <KEYWORD1>INTERLIS</KEYWORD1>
+ <KEYWORD1>JOIN</KEYWORD1>
+ <KEYWORD1>LAST</KEYWORD1>
+ <KEYWORD1>LINE</KEYWORD1>
+ <KEYWORD1>LIST</KEYWORD1>
+ <KEYWORD1>LNBASE</KEYWORD1>
+ <KEYWORD1>LOCAL</KEYWORD1>
+ <KEYWORD1>MANDATORY</KEYWORD1>
+ <KEYWORD1>METAOBJECT</KEYWORD1>
+ <KEYWORD1>MODEL</KEYWORD1>
+ <KEYWORD1>MTEXT</KEYWORD1>
+ <KEYWORD1>NAME</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>NO</KEYWORD1>
+ <KEYWORD1>NULL</KEYWORD1>
+ <KEYWORD1>NUMERIC</KEYWORD1>
+ <KEYWORD1>OBJECT</KEYWORD1>
+ <KEYWORD1>OF</KEYWORD1>
+ <KEYWORD1>OID</KEYWORD1>
+ <KEYWORD1>ON</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>ORDERED</KEYWORD1>
+ <KEYWORD1>OTHERS</KEYWORD1>
+ <KEYWORD1>OVERLAPS</KEYWORD1>
+ <KEYWORD1>PARAMETER</KEYWORD1>
+ <KEYWORD1>PARENT</KEYWORD1>
+ <KEYWORD1>PI</KEYWORD1>
+ <KEYWORD1>POLYLINE</KEYWORD1>
+ <KEYWORD1>PROJECTION</KEYWORD1>
+ <KEYWORD1>REFERENCE</KEYWORD1>
+ <KEYWORD1>REFSYSTEM</KEYWORD1>
+ <KEYWORD1>REQUIRED</KEYWORD1>
+ <KEYWORD1>RESTRICTED</KEYWORD1>
+ <KEYWORD1>ROTATION</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>SIGN</KEYWORD1>
+ <KEYWORD1>STRAIGHTS</KEYWORD1>
+ <KEYWORD1>STRUCTURE</KEYWORD1>
+ <KEYWORD1>SUBDIVISION</KEYWORD1>
+ <KEYWORD1>SURFACE</KEYWORD1>
+ <KEYWORD1>SYMBOLOGY</KEYWORD1>
+ <KEYWORD1>TEXT</KEYWORD1>
+ <KEYWORD1>THATAREA</KEYWORD1>
+ <KEYWORD1>THIS</KEYWORD1>
+ <KEYWORD1>THISAREA</KEYWORD1>
+ <KEYWORD1>TO</KEYWORD1>
+ <KEYWORD1>TOPIC</KEYWORD1>
+ <KEYWORD1>TRANSIENT</KEYWORD1>
+ <KEYWORD1>TRANSLATION</KEYWORD1>
+ <KEYWORD1>TYPE</KEYWORD1>
+ <KEYWORD1>UNDEFINED</KEYWORD1>
+ <KEYWORD1>UNION</KEYWORD1>
+ <KEYWORD1>UNIQUE</KEYWORD1>
+ <KEYWORD1>UNIT</KEYWORD1>
+ <KEYWORD1>UNQUALIFIED</KEYWORD1>
+ <KEYWORD1>URI</KEYWORD1>
+ <KEYWORD1>VALIGNMENT</KEYWORD1>
+ <KEYWORD1>VERSION</KEYWORD1>
+ <KEYWORD1>VERTEX</KEYWORD1>
+ <KEYWORD1>VIEW</KEYWORD1>
+ <KEYWORD1>WHEN</KEYWORD1>
+ <KEYWORD1>WHERE</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>WITHOUT</KEYWORD1>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/io.xml b/jEdit/modes/io.xml
index 60c83ac..ae0e39f 100644
--- a/jEdit/modes/io.xml
+++ b/jEdit/modes/io.xml
@@ -1,153 +1,153 @@
-<?xml version="1.0"?>
-
-<!-- @RisingSun//XML//1.0//EN________________________________________________
-
- JEdit syntax mode for Io
-
- ..........................................................................
-
- File name : io.xml
- Description : JEdit syntax file for the Io programming language
- Related links : <http://www.iolanguage.com>, <http://www.jedit.org>
-
- ..........................................................................
- Author : Sébastien Pierre <spierre at type-z.org>
- ..........................................................................
-
- Creation date : 05-May-2003
- Last revision : 19-May-2003
- Revision : 1.1
- History :
- 19-May-2003 Added primitives highlighting.
- 05-May-2003 First release
-
- ..................................................................... -->
-
-<!-- ________________________________________________________D O C T Y P E -->
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- ____________________________________________D O C U M E N T _ R O O T -->
-<MODE>
-
- <!-- Properties_______________________________________________________ -->
-
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentStart" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- <!-- FIXME: There may be a problem with this redefinition of
- lineComment-->
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="(" />
- <PROPERTY NAME="indentCloseBrackets" VALUE=")" />
- </PROPS>
-
- <!-- Rules____________________________________________________________ -->
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
-
- <!-- Comments_____________________________________________________ -->
-
- <!-- Shell-like comments -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
-
- <!-- C-like comments -->
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- Strings______________________________________________________ -->
-
- <!-- Single quotes -->
- <SPAN TYPE="LITERAL2" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- Triple quotes -->
- <SPAN TYPE="LITERAL2" ESCAPE="\">
- <BEGIN>"""</BEGIN>
- <END>"""</END>
- </SPAN>
-
- <!-- Operatiors___________________________________________________ -->
-
- <SEQ TYPE="OPERATOR">`</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">@@</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
-
- <!-- Keywords_____________________________________________________ -->
-
- <KEYWORDS>
-
- <!-- Io primitives -->
- <KEYWORD1>Block</KEYWORD1>
- <KEYWORD1>Buffer</KEYWORD1>
- <KEYWORD1>CFunction</KEYWORD1>
- <KEYWORD1>Date</KEYWORD1>
- <KEYWORD1>Duration</KEYWORD1>
- <KEYWORD1>File</KEYWORD1>
- <KEYWORD1>Future</KEYWORD1>
- <KEYWORD1>List</KEYWORD1>
- <KEYWORD1>LinkedList</KEYWORD1>
- <KEYWORD1>Map</KEYWORD1>
- <KEYWORD1>Nop</KEYWORD1>
- <KEYWORD1>Message</KEYWORD1>
- <KEYWORD1>Nil</KEYWORD1>
- <KEYWORD1>Number</KEYWORD1>
- <KEYWORD1>Object</KEYWORD1>
- <KEYWORD1>String</KEYWORD1>
- <KEYWORD1>WeakLink</KEYWORD1>
-
- <!-- Io lambda-like primitives -->
- <KEYWORD1>block</KEYWORD1>
- <KEYWORD1>method</KEYWORD1>
-
- <!-- Io control primitives -->
- <KEYWORD2>while</KEYWORD2>
- <KEYWORD2>foreach</KEYWORD2>
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD2>else</KEYWORD2>
- <KEYWORD2>do</KEYWORD2>
-
- <!-- Io basic messages -->
- <KEYWORD3>super</KEYWORD3>
- <KEYWORD3>self</KEYWORD3>
- <KEYWORD3>clone</KEYWORD3>
- <KEYWORD3>proto</KEYWORD3>
- <KEYWORD3>setSlot</KEYWORD3>
- <KEYWORD3>hasSlot</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>write</KEYWORD3>
- <KEYWORD3>print</KEYWORD3>
- <KEYWORD3>forward</KEYWORD3>
-
- </KEYWORDS>
-
- </RULES>
-
-</MODE>
-
-<!-- EOF-UNIX/iso-8895-1__________________________ at RisingSun//XML//1.0//EN -->
+<?xml version="1.0"?>
+
+<!-- @RisingSun//XML//1.0//EN________________________________________________
+
+ JEdit syntax mode for Io
+
+ ..........................................................................
+
+ File name : io.xml
+ Description : JEdit syntax file for the Io programming language
+ Related links : <http://www.iolanguage.com>, <http://www.jedit.org>
+
+ ..........................................................................
+ Author : Sébastien Pierre <spierre at type-z.org>
+ ..........................................................................
+
+ Creation date : 05-May-2003
+ Last revision : 19-May-2003
+ Revision : 1.1
+ History :
+ 19-May-2003 Added primitives highlighting.
+ 05-May-2003 First release
+
+ ..................................................................... -->
+
+<!-- ________________________________________________________D O C T Y P E -->
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- ____________________________________________D O C U M E N T _ R O O T -->
+<MODE>
+
+ <!-- Properties_______________________________________________________ -->
+
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentStart" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <!-- FIXME: There may be a problem with this redefinition of
+ lineComment-->
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE=")" />
+ </PROPS>
+
+ <!-- Rules____________________________________________________________ -->
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+
+ <!-- Comments_____________________________________________________ -->
+
+ <!-- Shell-like comments -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+
+ <!-- C-like comments -->
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Strings______________________________________________________ -->
+
+ <!-- Single quotes -->
+ <SPAN TYPE="LITERAL2" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- Triple quotes -->
+ <SPAN TYPE="LITERAL2" ESCAPE="\">
+ <BEGIN>"""</BEGIN>
+ <END>"""</END>
+ </SPAN>
+
+ <!-- Operatiors___________________________________________________ -->
+
+ <SEQ TYPE="OPERATOR">`</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">@@</SEQ>
+ <SEQ TYPE="OPERATOR">$</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+
+ <!-- Keywords_____________________________________________________ -->
+
+ <KEYWORDS>
+
+ <!-- Io primitives -->
+ <KEYWORD1>Block</KEYWORD1>
+ <KEYWORD1>Buffer</KEYWORD1>
+ <KEYWORD1>CFunction</KEYWORD1>
+ <KEYWORD1>Date</KEYWORD1>
+ <KEYWORD1>Duration</KEYWORD1>
+ <KEYWORD1>File</KEYWORD1>
+ <KEYWORD1>Future</KEYWORD1>
+ <KEYWORD1>List</KEYWORD1>
+ <KEYWORD1>LinkedList</KEYWORD1>
+ <KEYWORD1>Map</KEYWORD1>
+ <KEYWORD1>Nop</KEYWORD1>
+ <KEYWORD1>Message</KEYWORD1>
+ <KEYWORD1>Nil</KEYWORD1>
+ <KEYWORD1>Number</KEYWORD1>
+ <KEYWORD1>Object</KEYWORD1>
+ <KEYWORD1>String</KEYWORD1>
+ <KEYWORD1>WeakLink</KEYWORD1>
+
+ <!-- Io lambda-like primitives -->
+ <KEYWORD1>block</KEYWORD1>
+ <KEYWORD1>method</KEYWORD1>
+
+ <!-- Io control primitives -->
+ <KEYWORD2>while</KEYWORD2>
+ <KEYWORD2>foreach</KEYWORD2>
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>else</KEYWORD2>
+ <KEYWORD2>do</KEYWORD2>
+
+ <!-- Io basic messages -->
+ <KEYWORD3>super</KEYWORD3>
+ <KEYWORD3>self</KEYWORD3>
+ <KEYWORD3>clone</KEYWORD3>
+ <KEYWORD3>proto</KEYWORD3>
+ <KEYWORD3>setSlot</KEYWORD3>
+ <KEYWORD3>hasSlot</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>write</KEYWORD3>
+ <KEYWORD3>print</KEYWORD3>
+ <KEYWORD3>forward</KEYWORD3>
+
+ </KEYWORDS>
+
+ </RULES>
+
+</MODE>
+
+<!-- EOF-UNIX/iso-8895-1__________________________ at RisingSun//XML//1.0//EN -->
diff --git a/jEdit/modes/java.xml b/jEdit/modes/java.xml
index abaf79c..0337ad4 100644
--- a/jEdit/modes/java.xml
+++ b/jEdit/modes/java.xml
@@ -1,278 +1,278 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^.*(default:\s*|case.*:.*)$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))">
-
- <!-- Silly comment -->
- <SEQ TYPE="COMMENT1">/**/</SEQ>
-
- <!-- Javadoc comment -->
- <SPAN TYPE="COMMENT3" DELEGATE="JAVADOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- Java comment (C style) -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <!-- workaround to stop "*" from being colorized
- in import statements. -->
- <SEQ TYPE="NULL">.*</SEQ>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <!-- Annotation types -->
- <MARK_FOLLOWING TYPE="KEYWORD4">@</MARK_FOLLOWING>
-
- <KEYWORDS>
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
- <KEYWORD1>instanceof</KEYWORD1>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>throws</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>volatile</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <KEYWORD2>package</KEYWORD2>
- <KEYWORD2>import</KEYWORD2>
-
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>interface</KEYWORD3>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD3>void</KEYWORD3>
-
- <KEYWORD1>assert</KEYWORD1>
- <KEYWORD1>strictfp</KEYWORD1>
-
-
- <LITERAL2>false</LITERAL2>
- <LITERAL2>null</LITERAL2>
- <LITERAL2>super</LITERAL2>
- <LITERAL2>this</LITERAL2>
- <LITERAL2>true</LITERAL2>
-
- <INVALID>goto</INVALID>
- <INVALID>const</INVALID>
-
- <!-- Java 1.5 -->
- <KEYWORD3>enum</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="JAVADOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
-
- <!-- so that *@param is highlighted -->
- <SEQ TYPE="COMMENT3">*</SEQ>
-
- <!-- Javadoc ignores tags inside <pre> -->
- <!-- XXX no it doesn't -->
- <!-- SPAN TYPE="MARKUP" DELEGATE="JAVADOC_PRE">
- <BEGIN><pre></BEGIN>
- <END></pre></END>
- </SPAN -->
-
- <!-- HTML comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- Javadoc allows this -->
- <SEQ TYPE="COMMENT3"><<</SEQ>
- <SEQ TYPE="COMMENT3"><=</SEQ>
- <SEQ TYPE="COMMENT3">< </SEQ>
-
- <!-- strings in quotes -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- HTML tags -->
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS"
- NO_LINE_BREAK="TRUE">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- so that @link{...} is highlighted -->
- <!-- XXX: this is wrong, {@link ..} is correct, see below -->
- <!--<SEQ TYPE="COMMENT3">{</SEQ>-->
-
- <SPAN_REGEXP TYPE="LABEL" HASH_CHAR="{@" NO_WORD_BREAK="FALSE" DELEGATE="JAVADOC_PARAM">
- <BEGIN>\{@(link|linkplain|docRoot|code|literal)\s</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
-
- <!-- for the common usage of the cvs keyword $Id: java.xml 16047 2009-08-23 21:57:40Z kpouer $ -->
- <SPAN_REGEXP TYPE="LABEL" HASH_CHAR="@version" NO_WORD_BREAK="FALSE" DELEGATE="JAVADOC_PARAM">
- <BEGIN>@version\s+\$</BEGIN>
- <END>$</END>
- </SPAN_REGEXP>
-
- <!-- This works only when you use the same whitespace before and after the param's name,
- eg. a tab before and after, but mixing space and tab won't work.
- The reason is that you can't enter a regexp in END, except for the backreference operator $n -->
- <SPAN_REGEXP TYPE="LABEL" HASH_CHAR="@" NO_WORD_BREAK="FALSE" DELEGATE="JAVADOC_PARAM">
- <BEGIN>@(?:param|throws|exception|serialField)(\s)</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <KEYWORDS>
- <!-- Note: the labels in comments are handled by SPANs above -->
-
- <!-- Official javadoc tags:
- http://java.sun.com/j2se/1.5/docs/tooldocs/windows/javadoc.html#javadoctags -->
- <LABEL>@author</LABEL>
- <LABEL>@deprecated</LABEL>
- <!--<LABEL>@docRoot</LABEL>-->
- <!--<LABEL>@exception</LABEL>-->
- <LABEL>{@inheritDoc}</LABEL>
- <!--<LABEL>@link</LABEL>-->
- <!--<LABEL>@linkplain</LABEL>-->
- <!--<LABEL>@param</LABEL>-->
- <LABEL>@return</LABEL>
- <LABEL>@see</LABEL>
- <LABEL>@serial</LABEL>
- <LABEL>@serialData</LABEL>
- <!--<LABEL>@serialField</LABEL>-->
- <LABEL>@since</LABEL>
- <!--<LABEL>@throws</LABEL>-->
- <LABEL>{@value}</LABEL>
- <LABEL>@version</LABEL>
-
- <!-- new in 1.5 -->
- <!--<LABEL>@code</LABEL>-->
- <!--<LABEL>@literal</LABEL>-->
-
- <!-- SUNs proposed tags:
- http://java.sun.com/j2se/javadoc/proposed-tags.html -->
- <KEYWORD2>@category</KEYWORD2>
- <KEYWORD2>@example</KEYWORD2>
- <KEYWORD2>@exclude</KEYWORD2>
- <KEYWORD2>@index</KEYWORD2>
- <KEYWORD2>@internal</KEYWORD2>
- <KEYWORD2>@obsolete</KEYWORD2>
- <KEYWORD2>@threadsafety</KEYWORD2>
- <KEYWORD2>@tutorial</KEYWORD2>
- <KEYWORD2>@todo</KEYWORD2>
-
- <!-- Custom tags -->
- <KEYWORD4>@access</KEYWORD4>
- <KEYWORD4>@beaninfo</KEYWORD4>
- <KEYWORD4>@bon</KEYWORD4>
- <KEYWORD4>@bug</KEYWORD4>
- <KEYWORD4>@complexity</KEYWORD4>
- <KEYWORD4>@design</KEYWORD4>
- <KEYWORD4>@ensures</KEYWORD4>
- <KEYWORD4>@equivalent</KEYWORD4>
- <KEYWORD4>@generates</KEYWORD4>
- <KEYWORD4>@guard</KEYWORD4>
- <KEYWORD4>@hides</KEYWORD4>
- <KEYWORD4>@history</KEYWORD4>
- <KEYWORD4>@idea</KEYWORD4>
- <KEYWORD4>@invariant</KEYWORD4>
- <KEYWORD4>@modifies</KEYWORD4>
- <KEYWORD4>@overrides</KEYWORD4>
- <KEYWORD4>@post</KEYWORD4>
- <KEYWORD4>@pre</KEYWORD4>
- <KEYWORD4>@references</KEYWORD4>
- <KEYWORD4>@requires</KEYWORD4>
- <KEYWORD4>@review</KEYWORD4>
- <KEYWORD4>@spec</KEYWORD4>
- <KEYWORD4>@uses</KEYWORD4>
- <KEYWORD4>@values</KEYWORD4>
- </KEYWORDS>
- </RULES>
-
- <!-- just a dummy which makes use of the default token type COMMENT4 for highlighting the word after @param in javadoc -->
- <RULES SET="JAVADOC_PARAM" DEFAULT="COMMENT4" IGNORE_CASE="TRUE" />
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^.*(default:\s*|case.*:.*)$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))">
+
+ <!-- Silly comment -->
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+
+ <!-- Javadoc comment -->
+ <SPAN TYPE="COMMENT3" DELEGATE="JAVADOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Java comment (C style) -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <!-- workaround to stop "*" from being colorized
+ in import statements. -->
+ <SEQ TYPE="NULL">.*</SEQ>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <!-- Annotation types -->
+ <MARK_FOLLOWING TYPE="KEYWORD4">@</MARK_FOLLOWING>
+
+ <KEYWORDS>
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+ <KEYWORD1>instanceof</KEYWORD1>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>throws</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>volatile</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <KEYWORD2>package</KEYWORD2>
+ <KEYWORD2>import</KEYWORD2>
+
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>interface</KEYWORD3>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD3>void</KEYWORD3>
+
+ <KEYWORD1>assert</KEYWORD1>
+ <KEYWORD1>strictfp</KEYWORD1>
+
+
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ <LITERAL2>super</LITERAL2>
+ <LITERAL2>this</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+
+ <INVALID>goto</INVALID>
+ <INVALID>const</INVALID>
+
+ <!-- Java 1.5 -->
+ <KEYWORD3>enum</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="JAVADOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
+
+ <!-- so that *@param is highlighted -->
+ <SEQ TYPE="COMMENT3">*</SEQ>
+
+ <!-- Javadoc ignores tags inside <pre> -->
+ <!-- XXX no it doesn't -->
+ <!-- SPAN TYPE="MARKUP" DELEGATE="JAVADOC_PRE">
+ <BEGIN><pre></BEGIN>
+ <END></pre></END>
+ </SPAN -->
+
+ <!-- HTML comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- Javadoc allows this -->
+ <SEQ TYPE="COMMENT3"><<</SEQ>
+ <SEQ TYPE="COMMENT3"><=</SEQ>
+ <SEQ TYPE="COMMENT3">< </SEQ>
+
+ <!-- strings in quotes -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- HTML tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS"
+ NO_LINE_BREAK="TRUE">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- so that @link{...} is highlighted -->
+ <!-- XXX: this is wrong, {@link ..} is correct, see below -->
+ <!--<SEQ TYPE="COMMENT3">{</SEQ>-->
+
+ <SPAN_REGEXP TYPE="LABEL" HASH_CHAR="{@" NO_WORD_BREAK="FALSE" DELEGATE="JAVADOC_PARAM">
+ <BEGIN>\{@(link|linkplain|docRoot|code|literal)\s</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+
+ <!-- for the common usage of the cvs keyword $Id: java.xml 19234 2011-01-21 02:37:38Z ezust $ -->
+ <SPAN_REGEXP TYPE="LABEL" HASH_CHAR="@version" NO_WORD_BREAK="FALSE" DELEGATE="JAVADOC_PARAM">
+ <BEGIN>@version\s+\$</BEGIN>
+ <END>$</END>
+ </SPAN_REGEXP>
+
+ <!-- This works only when you use the same whitespace before and after the param's name,
+ eg. a tab before and after, but mixing space and tab won't work.
+ The reason is that you can't enter a regexp in END, except for the backreference operator $n -->
+ <SPAN_REGEXP TYPE="LABEL" HASH_CHAR="@" NO_WORD_BREAK="FALSE" DELEGATE="JAVADOC_PARAM">
+ <BEGIN>@(?:param|throws|exception|serialField)(\s)</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <KEYWORDS>
+ <!-- Note: the labels in comments are handled by SPANs above -->
+
+ <!-- Official javadoc tags:
+ http://download.oracle.com/javase/6/docs/technotes/tools/windows/javadoc.html#javadoctags -->
+ <LABEL>@author</LABEL>
+ <LABEL>@deprecated</LABEL>
+ <!--<LABEL>@docRoot</LABEL>-->
+ <!--<LABEL>@exception</LABEL>-->
+ <LABEL>{@inheritDoc}</LABEL>
+ <!--<LABEL>@link</LABEL>-->
+ <!--<LABEL>@linkplain</LABEL>-->
+ <!--<LABEL>@param</LABEL>-->
+ <LABEL>@return</LABEL>
+ <LABEL>@see</LABEL>
+ <LABEL>@serial</LABEL>
+ <LABEL>@serialData</LABEL>
+ <!--<LABEL>@serialField</LABEL>-->
+ <LABEL>@since</LABEL>
+ <!--<LABEL>@throws</LABEL>-->
+ <LABEL>{@value}</LABEL>
+ <LABEL>@version</LABEL>
+
+ <!-- new in 1.5 -->
+ <!--<LABEL>@code</LABEL>-->
+ <!--<LABEL>@literal</LABEL>-->
+
+ <!-- SUNs proposed tags:
+ http://java.sun.com/j2se/javadoc/proposed-tags.html -->
+ <KEYWORD2>@category</KEYWORD2>
+ <KEYWORD2>@example</KEYWORD2>
+ <KEYWORD2>@exclude</KEYWORD2>
+ <KEYWORD2>@index</KEYWORD2>
+ <KEYWORD2>@internal</KEYWORD2>
+ <KEYWORD2>@obsolete</KEYWORD2>
+ <KEYWORD2>@threadsafety</KEYWORD2>
+ <KEYWORD2>@tutorial</KEYWORD2>
+ <KEYWORD2>@todo</KEYWORD2>
+
+ <!-- Custom tags -->
+ <KEYWORD4>@access</KEYWORD4>
+ <KEYWORD4>@beaninfo</KEYWORD4>
+ <KEYWORD4>@bon</KEYWORD4>
+ <KEYWORD4>@bug</KEYWORD4>
+ <KEYWORD4>@complexity</KEYWORD4>
+ <KEYWORD4>@design</KEYWORD4>
+ <KEYWORD4>@ensures</KEYWORD4>
+ <KEYWORD4>@equivalent</KEYWORD4>
+ <KEYWORD4>@generates</KEYWORD4>
+ <KEYWORD4>@guard</KEYWORD4>
+ <KEYWORD4>@hides</KEYWORD4>
+ <KEYWORD4>@history</KEYWORD4>
+ <KEYWORD4>@idea</KEYWORD4>
+ <KEYWORD4>@invariant</KEYWORD4>
+ <KEYWORD4>@modifies</KEYWORD4>
+ <KEYWORD4>@overrides</KEYWORD4>
+ <KEYWORD4>@post</KEYWORD4>
+ <KEYWORD4>@pre</KEYWORD4>
+ <KEYWORD4>@references</KEYWORD4>
+ <KEYWORD4>@requires</KEYWORD4>
+ <KEYWORD4>@review</KEYWORD4>
+ <KEYWORD4>@spec</KEYWORD4>
+ <KEYWORD4>@uses</KEYWORD4>
+ <KEYWORD4>@values</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- just a dummy which makes use of the default token type COMMENT4 for highlighting the word after @param in javadoc -->
+ <RULES SET="JAVADOC_PARAM" DEFAULT="COMMENT4" IGNORE_CASE="TRUE" />
+</MODE>
diff --git a/jEdit/modes/javacc.xml b/jEdit/modes/javacc.xml
index d3172d2..e1e176e 100644
--- a/jEdit/modes/javacc.xml
+++ b/jEdit/modes/javacc.xml
@@ -1,39 +1,98 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^.*(default:\s*|case.*:.*)$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE">
- <IMPORT DELEGATE="java::MAIN"/>
-
- <KEYWORDS>
- <KEYWORD1>EOF</KEYWORD1>
- <KEYWORD1>IGNORE_CASE</KEYWORD1>
- <KEYWORD1>JAVACODE</KEYWORD1>
- <KEYWORD1>LOOKAHEAD</KEYWORD1>
- <KEYWORD1>MORE</KEYWORD1>
- <KEYWORD1>PARSER_BEGIN</KEYWORD1>
- <KEYWORD1>PARSER_END</KEYWORD1>
- <KEYWORD1>SKIP</KEYWORD1>
- <KEYWORD1>SPECIAL_TOKEN</KEYWORD1>
- <KEYWORD1>TOKEN</KEYWORD1>
- <KEYWORD1>TOKEN_MGR_DECLS</KEYWORD1>
- <KEYWORD1>options</KEYWORD1>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^.*(default:\s*|case.*:.*)$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE">
+ <IMPORT DELEGATE="java::MAIN"/>
+
+ <!-- regular expression definitions -->
+ <SEQ_REGEXP HASH_CHAR="<" TYPE="KEYWORD2"><[[:space:]]*\w+[[:space:]]*[:]</SEQ_REGEXP>
+
+ <!-- regular expression label(s) -->
+ <SEQ_REGEXP HASH_CHAR="<" TYPE="KEYWORD2"><[[:space:]]*\w+([[:space:]]*[,][[:space:]]*\w+[[:space:]]*)*[[:space:]]*></SEQ_REGEXP>
+
+ <!-- private regular expression labels -->
+ <SEQ_REGEXP HASH_CHAR="#" TYPE="KEYWORD2">[#]\w+[:]</SEQ_REGEXP>
+
+ <KEYWORDS>
+ <!-- javacc keywords -->
+ <KEYWORD1>EOF</KEYWORD1>
+ <KEYWORD1>IGNORE_CASE</KEYWORD1>
+ <KEYWORD1>JAVACODE</KEYWORD1>
+ <KEYWORD1>LOOKAHEAD</KEYWORD1>
+ <KEYWORD1>MORE</KEYWORD1>
+ <KEYWORD1>PARSER_BEGIN</KEYWORD1>
+ <KEYWORD1>PARSER_END</KEYWORD1>
+ <KEYWORD1>SKIP</KEYWORD1>
+ <KEYWORD1>SPECIAL_TOKEN</KEYWORD1>
+ <KEYWORD1>TOKEN</KEYWORD1>
+ <KEYWORD1>TOKEN_MGR_DECLS</KEYWORD1>
+ <KEYWORD1>options</KEYWORD1>
+
+ <!-- javacc option keywords -->
+ <KEYWORD1>CHOICE_AMBIGUITY_CHECK</KEYWORD1>
+ <KEYWORD1>OTHER_AMBIGUITY_CHECK</KEYWORD1>
+ <KEYWORD1>STATIC</KEYWORD1>
+ <KEYWORD1>SUPPORT_CLASS_VISIBILITY_PUBLIC</KEYWORD1>
+ <KEYWORD1>DEBUG_PARSER</KEYWORD1>
+ <KEYWORD1>DEBUG_LOOKAHEAD</KEYWORD1>
+ <KEYWORD1>DEBUG_TOKEN_MANAGER</KEYWORD1>
+ <KEYWORD1>ERROR_REPORTING</KEYWORD1>
+ <KEYWORD1>JAVA_UNICODE_ESCAPE</KEYWORD1>
+ <KEYWORD1>UNICODE_INPUT</KEYWORD1>
+ <KEYWORD1>IGNORE_CASE</KEYWORD1>
+ <KEYWORD1>USER_TOKEN_MANAGER</KEYWORD1>
+ <KEYWORD1>USER_CHAR_STREAM</KEYWORD1>
+ <KEYWORD1>BUILD_PARSER</KEYWORD1>
+ <KEYWORD1>BUILD_TOKEN_MANAGER</KEYWORD1>
+ <KEYWORD1>TOKEN_EXTENDS</KEYWORD1>
+ <KEYWORD1>TOKEN_FACTORY</KEYWORD1>
+ <KEYWORD1>TOKEN_MANAGER_USES_PARSER</KEYWORD1>
+ <KEYWORD1>SANITY_CHECK</KEYWORD1>
+ <KEYWORD1>FORCE_LA_CHECK</KEYWORD1>
+ <KEYWORD1>COMMON_TOKEN_ACTION</KEYWORD1>
+ <KEYWORD1>CACHE_TOKENS</KEYWORD1>
+ <KEYWORD1>OUTPUT_DIRECTORY</KEYWORD1>
+
+ <!-- jjtree keywords -->
+ <KEYWORD1>BUILD_NODE_FILES</KEYWORD1>
+ <KEYWORD1>MULTI</KEYWORD1>
+ <KEYWORD1>NODE_DEFAULT_VOID</KEYWORD1>
+ <KEYWORD1>NODE_CLASS</KEYWORD1>
+ <KEYWORD1>NODE_FACTORY</KEYWORD1>
+ <KEYWORD1>NODE_PACKAGE</KEYWORD1>
+ <KEYWORD1>NODE_EXTENDS</KEYWORD1>
+ <KEYWORD1>NODE_PREFIX</KEYWORD1>
+ <KEYWORD1>NODE_SCOPE_HOOK</KEYWORD1>
+ <KEYWORD1>NODE_USES_PARSER</KEYWORD1>
+ <KEYWORD1>TRACK_TOKENS</KEYWORD1>
+ <KEYWORD1>STATIC</KEYWORD1>
+ <KEYWORD1>VISITOR</KEYWORD1>
+ <KEYWORD1>VISITOR_DATA_TYPE</KEYWORD1>
+ <KEYWORD1>VISITOR_RETURN_TYPE</KEYWORD1>
+ <KEYWORD1>VISITOR_EXCEPTION</KEYWORD1>
+ <KEYWORD1>JJTREE_OUTPUT_DIRECTORY</KEYWORD1>
+
+ <!-- DEFAULT is the standard lexical state -->
+ <KEYWORD2>DEFAULT</KEYWORD2>
+ </KEYWORDS>
+
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/javascript.xml b/jEdit/modes/javascript.xml
index f4d50fa..88cf935 100644
--- a/jEdit/modes/javascript.xml
+++ b/jEdit/modes/javascript.xml
@@ -1,559 +1,559 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- JavaScript mode by Andre Kaplan -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{[" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="]}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^.*(default:\s*|case.*:.*)$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- </PROPS>
-
- <RULES
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
-
- <!-- The rest of the javascript info -->
-
- <SPAN TYPE="COMMENT3">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <SEQ TYPE="COMMENT2">//--></SEQ>
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="/" AT_WORD_START="TRUE">/[^\p{Blank}]*?/</SEQ_REGEXP>
-
- <SEQ TYPE="COMMENT1"><!--</SEQ>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
- MATCH_TYPE="OPERATOR"
- TYPE="LABEL">:</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">:</SEQ>
-
- <KEYWORDS>
- <!-- ECMAScript keywords -->
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <LITERAL2>this</LITERAL2>
- <KEYWORD1>typeof</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
- <KEYWORD3>void</KEYWORD3>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
-
- <!--ECMAScript keywords-->
- <!-- Reserved for future use
- (some are already used in some Javascript Engines)
- -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>debugger</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
-
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD1>enum</KEYWORD1>
- <KEYWORD2>export</KEYWORD2>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
-
- <KEYWORD2>import</KEYWORD2>
- <KEYWORD1>instanceof</KEYWORD1>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD1>interface</KEYWORD1>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD2>package</KEYWORD2>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
-
- <KEYWORD3>short</KEYWORD3>
- <KEYWORD1>static</KEYWORD1>
- <LITERAL2>super</LITERAL2>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>throws</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>volatile</KEYWORD1>
-
- <!-- Intrinsic Objects (Good idea not to use these names!!)-->
- <KEYWORD3>Array</KEYWORD3>
- <KEYWORD3>Boolean</KEYWORD3>
- <KEYWORD3>Date</KEYWORD3>
- <KEYWORD3>Function</KEYWORD3>
- <KEYWORD3>Global</KEYWORD3>
- <KEYWORD3>Math</KEYWORD3>
- <KEYWORD3>Number</KEYWORD3>
- <KEYWORD3>Object</KEYWORD3>
- <KEYWORD3>RegExp</KEYWORD3><!-- Not ECMA -->
- <KEYWORD3>String</KEYWORD3>
-
- <!-- Literals -->
- <LITERAL2>false</LITERAL2>
- <LITERAL2>null</LITERAL2>
- <LITERAL2>true</LITERAL2>
-
- <LITERAL2>NaN</LITERAL2>
- <LITERAL2>Infinity</LITERAL2>
-
- <!-- Global functions -->
- <LITERAL2>eval</LITERAL2>
- <LITERAL2>parseInt</LITERAL2>
- <LITERAL2>parseFloat</LITERAL2>
- <LITERAL2>escape</LITERAL2>
- <LITERAL2>unescape</LITERAL2>
- <LITERAL2>isNaN</LITERAL2>
- <LITERAL2>isFinite</LITERAL2>
-
- <!-- Comment/Uncomment your favorite ADO Constants-->
-
- <!-- ADO Constants-->
-
- <!-- CursorTypeEnum Values -->
- <LITERAL2>adOpenForwardOnly</LITERAL2>
- <LITERAL2>adOpenKeyset</LITERAL2>
- <LITERAL2>adOpenDynamic</LITERAL2>
- <LITERAL2>adOpenStatic</LITERAL2>
-
- <!-- CursorOptionEnum Values -->
-<!-- <LITERAL2>adHoldRecords</LITERAL2>
- <LITERAL2>adMovePrevious</LITERAL2>
- <LITERAL2>adAddNew</LITERAL2>
- <LITERAL2>adDelete</LITERAL2>
- <LITERAL2>adUpdate</LITERAL2>
- <LITERAL2>adBookmark</LITERAL2>
- <LITERAL2>adApproxPosition</LITERAL2>
- <LITERAL2>adUpdateBatch</LITERAL2>
- <LITERAL2>adResync</LITERAL2>
- <LITERAL2>adNotify</LITERAL2>
- <LITERAL2>adFind</LITERAL2>
- <LITERAL2>adSeek</LITERAL2>
- <LITERAL2>adIndex</LITERAL2>
--->
- <!-- LockTypeEnum Values -->
- <LITERAL2>adLockReadOnly</LITERAL2>
- <LITERAL2>adLockPessimistic</LITERAL2>
- <LITERAL2>adLockOptimistic</LITERAL2>
- <LITERAL2>adLockBatchOptimistic</LITERAL2>
-
- <!-- ExecuteOptionEnum Values -->
- <LITERAL2>adRunAsync</LITERAL2>
- <LITERAL2>adAsyncExecute</LITERAL2>
- <LITERAL2>adAsyncFetch</LITERAL2>
- <LITERAL2>adAsyncFetchNonBlocking</LITERAL2>
- <LITERAL2>adExecuteNoRecords</LITERAL2>
-
- <!-- ConnectOptionEnum Values -->
-<!-- <LITERAL2>adAsyncConnect</LITERAL2>
--->
- <!-- ObjectStateEnum Values -->
- <LITERAL2>adStateClosed</LITERAL2>
- <LITERAL2>adStateOpen</LITERAL2>
- <LITERAL2>adStateConnecting</LITERAL2>
- <LITERAL2>adStateExecuting</LITERAL2>
- <LITERAL2>adStateFetching</LITERAL2>
-
- <!-- CursorLocationEnum Values -->
- <LITERAL2>adUseServer</LITERAL2>
- <LITERAL2>adUseClient</LITERAL2>
-
- <!-- DataTypeEnum Values -->
- <LITERAL2>adEmpty</LITERAL2>
- <LITERAL2>adTinyInt</LITERAL2>
- <LITERAL2>adSmallInt</LITERAL2>
- <LITERAL2>adInteger</LITERAL2>
- <LITERAL2>adBigInt</LITERAL2>
- <LITERAL2>adUnsignedTinyInt</LITERAL2>
- <LITERAL2>adUnsignedSmallInt</LITERAL2>
- <LITERAL2>adUnsignedInt</LITERAL2>
- <LITERAL2>adUnsignedBigInt</LITERAL2>
- <LITERAL2>adSingle</LITERAL2>
- <LITERAL2>adDouble</LITERAL2>
- <LITERAL2>adCurrency</LITERAL2>
- <LITERAL2>adDecimal</LITERAL2>
- <LITERAL2>adNumeric</LITERAL2>
- <LITERAL2>adBoolean</LITERAL2>
- <LITERAL2>adError</LITERAL2>
- <LITERAL2>adUserDefined</LITERAL2>
- <LITERAL2>adVariant</LITERAL2>
- <LITERAL2>adIDispatch</LITERAL2>
- <LITERAL2>adIUnknown</LITERAL2>
- <LITERAL2>adGUID</LITERAL2>
- <LITERAL2>adDate</LITERAL2>
- <LITERAL2>adDBDate</LITERAL2>
- <LITERAL2>adDBTime</LITERAL2>
- <LITERAL2>adDBTimeStamp</LITERAL2>
- <LITERAL2>adBSTR</LITERAL2>
- <LITERAL2>adChar</LITERAL2>
- <LITERAL2>adVarChar</LITERAL2>
- <LITERAL2>adLongVarChar</LITERAL2>
- <LITERAL2>adWChar</LITERAL2>
- <LITERAL2>adVarWChar</LITERAL2>
- <LITERAL2>adLongVarWChar</LITERAL2>
- <LITERAL2>adBinary</LITERAL2>
- <LITERAL2>adVarBinary</LITERAL2>
- <LITERAL2>adLongVarBinary</LITERAL2>
- <LITERAL2>adChapter</LITERAL2>
- <LITERAL2>adFileTime</LITERAL2>
- <LITERAL2>adDBFileTime</LITERAL2>
- <LITERAL2>adPropVariant</LITERAL2>
- <LITERAL2>adVarNumeric</LITERAL2>
-
- <!-- FieldAttributeEnum Values -->
-<!-- <LITERAL2>adFldMayDefer</LITERAL2>
- <LITERAL2>adFldUpdatable</LITERAL2>
- <LITERAL2>adFldUnknownUpdatable</LITERAL2>
- <LITERAL2>adFldFixed</LITERAL2>
- <LITERAL2>adFldIsNullable</LITERAL2>
- <LITERAL2>adFldMayBeNull</LITERAL2>
- <LITERAL2>adFldLong</LITERAL2>
- <LITERAL2>adFldRowID</LITERAL2>
- <LITERAL2>adFldRowVersion</LITERAL2>
- <LITERAL2>adFldCacheDeferred</LITERAL2>
- <LITERAL2>adFldKeyColumn</LITERAL2>
--->
-
- <!-- EditModeEnum Values -->
-<!-- <LITERAL2>adEditNone</LITERAL2>
- <LITERAL2>adEditInProgress</LITERAL2>
- <LITERAL2>adEditAdd</LITERAL2>
- <LITERAL2>adEditDelete</LITERAL2>
--->
- <!-- RecordStatusEnum Values -->
-<!-- <LITERAL2>adRecOK</LITERAL2>
- <LITERAL2>adRecNew</LITERAL2>
- <LITERAL2>adRecModified</LITERAL2>
- <LITERAL2>adRecDeleted</LITERAL2>
- <LITERAL2>adRecUnmodified</LITERAL2>
- <LITERAL2>adRecInvalid</LITERAL2>
- <LITERAL2>adRecMultipleChanges</LITERAL2>
- <LITERAL2>adRecPendingChanges</LITERAL2>
- <LITERAL2>adRecCanceled</LITERAL2>
- <LITERAL2>adRecCantRelease</LITERAL2>
- <LITERAL2>adRecConcurrencyViolation</LITERAL2>
- <LITERAL2>adRecIntegrityViolation</LITERAL2>
- <LITERAL2>adRecMaxChangesExceeded</LITERAL2>
- <LITERAL2>adRecObjectOpen</LITERAL2>
- <LITERAL2>adRecOutOfMemory</LITERAL2>
- <LITERAL2>adRecPermissionDenied</LITERAL2>
- <LITERAL2>adRecSchemaViolation</LITERAL2>
- <LITERAL2>adRecDBDeleted</LITERAL2>
--->
- <!-- GetRowsOptionEnum Values -->
-<!-- <LITERAL2>adGetRowsRest</LITERAL2>
--->
-
- <!-- PositionEnum Values -->
-<!-- <LITERAL2>adPosUnknown</LITERAL2>
- <LITERAL2>adPosBOF</LITERAL2>
- <LITERAL2>adPosEOF</LITERAL2>
--->
-
- <!-- enum Values -->
-<!-- <LITERAL2>adBookmarkCurrent</LITERAL2>
- <LITERAL2>adBookmarkFirst</LITERAL2>
- <LITERAL2>adBookmarkLast</LITERAL2>
--->
- <!-- MarshalOptionsEnum Values -->
-<!-- <LITERAL2>adMarshalAll</LITERAL2>
- <LITERAL2>adMarshalModifiedOnly</LITERAL2>
--->
- <!-- AffectEnum Values -->
-<!-- <LITERAL2>adAffectCurrent</LITERAL2>
- <LITERAL2>adAffectGroup</LITERAL2>
- <LITERAL2>adAffectAll</LITERAL2>
- <LITERAL2>adAffectAllChapters</LITERAL2>
--->
-
- <!-- ResyncEnum Values -->
-<!-- <LITERAL2>adResyncUnderlyingValues</LITERAL2>
- <LITERAL2>adResyncAllValues</LITERAL2>
--->
- <!-- CompareEnum Values -->
-<!-- <LITERAL2>adCompareLessThan</LITERAL2>
- <LITERAL2>adCompareEqual</LITERAL2>
- <LITERAL2>adCompareGreaterThan</LITERAL2>
- <LITERAL2>adCompareNotEqual</LITERAL2>
- <LITERAL2>adCompareNotComparable</LITERAL2>
--->
- <!-- FilterGroupEnum Values -->
-<!-- <LITERAL2>adFilterNone</LITERAL2>
- <LITERAL2>adFilterPendingRecords</LITERAL2>
- <LITERAL2>adFilterAffectedRecords</LITERAL2>
- <LITERAL2>adFilterFetchedRecords</LITERAL2>
- <LITERAL2>adFilterPredicate</LITERAL2>
- <LITERAL2>adFilterConflictingRecords</LITERAL2>
--->
- <!-- SearchDirectionEnum Values -->
-<!-- <LITERAL2>adSearchForward</LITERAL2>
- <LITERAL2>adSearchBackward</LITERAL2>
--->
-
- <!-- PersistFormatEnum Values -->
- <LITERAL2>adPersistADTG</LITERAL2>
- <LITERAL2>adPersistXML</LITERAL2>
-
- <!-- StringFormatEnum Values -->
-<!-- <LITERAL2>adStringXML</LITERAL2>
- <LITERAL2>adStringHTML</LITERAL2>
- <LITERAL2>adClipString</LITERAL2>
--->
- <!-- ConnectPromptEnum Values -->
-<!-- <LITERAL2>adPromptAlways</LITERAL2>
- <LITERAL2>adPromptComplete</LITERAL2>
- <LITERAL2>adPromptCompleteRequired</LITERAL2>
- <LITERAL2>adPromptNever</LITERAL2>
--->
- <!-- ConnectModeEnum Values -->
-<!-- <LITERAL2>adModeUnknown</LITERAL2>
- <LITERAL2>adModeRead</LITERAL2>
- <LITERAL2>adModeWrite</LITERAL2>
- <LITERAL2>adModeReadWrite</LITERAL2>
- <LITERAL2>adModeShareDenyRead</LITERAL2>
- <LITERAL2>adModeShareDenyWrite</LITERAL2>
- <LITERAL2>adModeShareExclusive</LITERAL2>
- <LITERAL2>adModeShareDenyNone</LITERAL2>
--->
- <!-- IsolationLevelEnum Values -->
-<!-- <LITERAL2>adXactUnspecified</LITERAL2>
- <LITERAL2>adXactChaos</LITERAL2>
- <LITERAL2>adXactReadUncommitted</LITERAL2>
- <LITERAL2>adXactBrowse</LITERAL2>
- <LITERAL2>adXactCursorStability</LITERAL2>
- <LITERAL2>adXactReadCommitted</LITERAL2>
- <LITERAL2>adXactRepeatableRead</LITERAL2>
- <LITERAL2>adXactSerializable</LITERAL2>
- <LITERAL2>adXactIsolated</LITERAL2>
--->
- <!-- XactAttributeEnum Values -->
-<!-- <LITERAL2>adXactCommitRetaining</LITERAL2>
- <LITERAL2>adXactAbortRetaining</LITERAL2>
--->
- <!-- PropertyAttributesEnum Values -->
-<!-- <LITERAL2>adPropNotSupported</LITERAL2>
- <LITERAL2>adPropRequired</LITERAL2>
- <LITERAL2>adPropOptional</LITERAL2>
- <LITERAL2>adPropRead</LITERAL2>
- <LITERAL2>adPropWrite</LITERAL2>
--->
- <!-- ErrorValueEnum Values -->
-<!-- <LITERAL2>adErrInvalidArgument</LITERAL2>
- <LITERAL2>adErrNoCurrentRecord</LITERAL2>
- <LITERAL2>adErrIllegalOperation</LITERAL2>
- <LITERAL2>adErrInTransaction</LITERAL2>
- <LITERAL2>adErrFeatureNotAvailable</LITERAL2>
- <LITERAL2>adErrItemNotFound</LITERAL2>
- <LITERAL2>adErrObjectInCollection</LITERAL2>
- <LITERAL2>adErrObjectNotSet</LITERAL2>
- <LITERAL2>adErrDataConversion</LITERAL2>
- <LITERAL2>adErrObjectClosed</LITERAL2>
- <LITERAL2>adErrObjectOpen</LITERAL2>
- <LITERAL2>adErrProviderNotFound</LITERAL2>
- <LITERAL2>adErrBoundToCommand</LITERAL2>
- <LITERAL2>adErrInvalidParamInfo</LITERAL2>
- <LITERAL2>adErrInvalidConnection</LITERAL2>
- <LITERAL2>adErrNotReentrant</LITERAL2>
- <LITERAL2>adErrStillExecuting</LITERAL2>
- <LITERAL2>adErrOperationCancelled</LITERAL2>
- <LITERAL2>adErrStillConnecting</LITERAL2>
- <LITERAL2>adErrNotExecuting</LITERAL2>
- <LITERAL2>adErrUnsafeOperation</LITERAL2>
--->
- <!-- ParameterAttributesEnum Values -->
- <LITERAL2>adParamSigned</LITERAL2>
- <LITERAL2>adParamNullable</LITERAL2>
- <LITERAL2>adParamLong</LITERAL2>
-
- <!-- ParameterDirectionEnum Values -->
- <LITERAL2>adParamUnknown</LITERAL2>
- <LITERAL2>adParamInput</LITERAL2>
- <LITERAL2>adParamOutput</LITERAL2>
- <LITERAL2>adParamInputOutput</LITERAL2>
- <LITERAL2>adParamReturnValue</LITERAL2>
-
- <!-- CommandTypeEnum Values -->
- <LITERAL2>adCmdUnknown</LITERAL2>
- <LITERAL2>adCmdText</LITERAL2>
- <LITERAL2>adCmdTable</LITERAL2>
- <LITERAL2>adCmdStoredProc</LITERAL2>
- <LITERAL2>adCmdFile</LITERAL2>
- <LITERAL2>adCmdTableDirect</LITERAL2>
-
- <!-- EventStatusEnum Values -->
-<!-- <LITERAL2>adStatusOK</LITERAL2>
- <LITERAL2>adStatusErrorsOccurred</LITERAL2>
- <LITERAL2>adStatusCantDeny</LITERAL2>
- <LITERAL2>adStatusCancel</LITERAL2>
- <LITERAL2>adStatusUnwantedEvent</LITERAL2>
--->
- <!-- EventReasonEnum Values -->
-<!-- <LITERAL2>adRsnAddNew</LITERAL2>
- <LITERAL2>adRsnDelete</LITERAL2>
- <LITERAL2>adRsnUpdate</LITERAL2>
- <LITERAL2>adRsnUndoUpdate</LITERAL2>
- <LITERAL2>adRsnUndoAddNew</LITERAL2>
- <LITERAL2>adRsnUndoDelete</LITERAL2>
- <LITERAL2>adRsnRequery</LITERAL2>
- <LITERAL2>adRsnResynch</LITERAL2>
- <LITERAL2>adRsnClose</LITERAL2>
- <LITERAL2>adRsnMove</LITERAL2>
- <LITERAL2>adRsnFirstChange</LITERAL2>
- <LITERAL2>adRsnMoveFirst</LITERAL2>
- <LITERAL2>adRsnMoveNext</LITERAL2>
- <LITERAL2>adRsnMovePrevious</LITERAL2>
- <LITERAL2>adRsnMoveLast</LITERAL2>
--->
- <!-- SchemaEnum Values -->
-<!-- <LITERAL2>adSchemaProviderSpecific</LITERAL2>
- <LITERAL2>adSchemaAsserts</LITERAL2>
- <LITERAL2>adSchemaCatalogs</LITERAL2>
- <LITERAL2>adSchemaCharacterSets</LITERAL2>
- <LITERAL2>adSchemaCollations</LITERAL2>
- <LITERAL2>adSchemaColumns</LITERAL2>
- <LITERAL2>adSchemaCheckConstraints</LITERAL2>
- <LITERAL2>adSchemaConstraintColumnUsage</LITERAL2>
- <LITERAL2>adSchemaConstraintTableUsage</LITERAL2>
- <LITERAL2>adSchemaKeyColumnUsage</LITERAL2>
- <LITERAL2>adSchemaReferentialConstraints</LITERAL2>
- <LITERAL2>adSchemaTableConstraints</LITERAL2>
- <LITERAL2>adSchemaColumnsDomainUsage</LITERAL2>
- <LITERAL2>adSchemaIndexes</LITERAL2>
- <LITERAL2>adSchemaColumnPrivileges</LITERAL2>
- <LITERAL2>adSchemaTablePrivileges</LITERAL2>
- <LITERAL2>adSchemaUsagePrivileges</LITERAL2>
- <LITERAL2>adSchemaProcedures</LITERAL2>
- <LITERAL2>adSchemaSchemata</LITERAL2>
- <LITERAL2>adSchemaSQLLanguages</LITERAL2>
- <LITERAL2>adSchemaStatistics</LITERAL2>
- <LITERAL2>adSchemaTables</LITERAL2>
- <LITERAL2>adSchemaTranslations</LITERAL2>
- <LITERAL2>adSchemaProviderTypes</LITERAL2>
- <LITERAL2>adSchemaViews</LITERAL2>
- <LITERAL2>adSchemaViewColumnUsage</LITERAL2>
- <LITERAL2>adSchemaViewTableUsage</LITERAL2>
- <LITERAL2>adSchemaProcedureParameters</LITERAL2>
- <LITERAL2>adSchemaForeignKeys</LITERAL2>
- <LITERAL2>adSchemaPrimaryKeys</LITERAL2>
- <LITERAL2>adSchemaProcedureColumns</LITERAL2>
- <LITERAL2>adSchemaDBInfoKeywords</LITERAL2>
- <LITERAL2>adSchemaDBInfoLiterals</LITERAL2>
- <LITERAL2>adSchemaCubes</LITERAL2>
- <LITERAL2>adSchemaDimensions</LITERAL2>
- <LITERAL2>adSchemaHierarchies</LITERAL2>
- <LITERAL2>adSchemaLevels</LITERAL2>
- <LITERAL2>adSchemaMeasures</LITERAL2>
- <LITERAL2>adSchemaProperties</LITERAL2>
- <LITERAL2>adSchemaMembers</LITERAL2>
--->
- <!-- SeekEnum Values -->
-<!-- <LITERAL2>adSeekFirstEQ</LITERAL2>
- <LITERAL2>adSeekLastEQ</LITERAL2>
- <LITERAL2>adSeekAfterEQ</LITERAL2>
- <LITERAL2>adSeekAfter</LITERAL2>
- <LITERAL2>adSeekBeforeEQ</LITERAL2>
- <LITERAL2>adSeekBefore</LITERAL2>
--->
- <!-- ADCPROP_UPDATECRITERIA_ENUM Values -->
-<!-- <LITERAL2>adCriteriaKey</LITERAL2>
- <LITERAL2>adCriteriaAllCols</LITERAL2>
- <LITERAL2>adCriteriaUpdCols</LITERAL2>
- <LITERAL2>adCriteriaTimeStamp</LITERAL2>
--->
- <!-- ADCPROP_ASYNCTHREADPRIORITY_ENUM Values -->
-<!-- <LITERAL2>adPriorityLowest</LITERAL2>
- <LITERAL2>adPriorityBelowNormal</LITERAL2>
- <LITERAL2>adPriorityNormal</LITERAL2>
- <LITERAL2>adPriorityAboveNormal</LITERAL2>
- <LITERAL2>adPriorityHighest</LITERAL2>
--->
- <!-- CEResyncEnum Values -->
-<!-- <LITERAL2>adResyncNone</LITERAL2>
- <LITERAL2>adResyncAutoIncrement</LITERAL2>
- <LITERAL2>adResyncConflicts</LITERAL2>
- <LITERAL2>adResyncUpdates</LITERAL2>
- <LITERAL2>adResyncInserts</LITERAL2>
- <LITERAL2>adResyncAll</LITERAL2>
--->
- <!-- ADCPROP_AUTORECALC_ENUM Values -->
-<!-- <LITERAL2>adRecalcUpFront</LITERAL2>
- <LITERAL2>adRecalcAlways</LITERAL2>
--->
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- JavaScript mode by Andre Kaplan -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{[" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="]}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^.*(default:\s*|case.*:.*)$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+
+ <RULES
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+
+ <!-- The rest of the javascript info -->
+
+ <SPAN TYPE="COMMENT3">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <SEQ TYPE="COMMENT2">//--></SEQ>
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="/" AT_WORD_START="TRUE">/[^\p{Blank}]*?/</SEQ_REGEXP>
+
+ <SEQ TYPE="COMMENT1"><!--</SEQ>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
+ MATCH_TYPE="OPERATOR"
+ TYPE="LABEL">:</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <KEYWORDS>
+ <!-- ECMAScript keywords -->
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <LITERAL2>this</LITERAL2>
+ <KEYWORD1>typeof</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD3>void</KEYWORD3>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+
+ <!--ECMAScript keywords-->
+ <!-- Reserved for future use
+ (some are already used in some Javascript Engines)
+ -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>debugger</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD1>enum</KEYWORD1>
+ <KEYWORD2>export</KEYWORD2>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+
+ <KEYWORD2>import</KEYWORD2>
+ <KEYWORD1>instanceof</KEYWORD1>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD2>package</KEYWORD2>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+
+ <KEYWORD3>short</KEYWORD3>
+ <KEYWORD1>static</KEYWORD1>
+ <LITERAL2>super</LITERAL2>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>throws</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>volatile</KEYWORD1>
+
+ <!-- Intrinsic Objects (Good idea not to use these names!!)-->
+ <KEYWORD3>Array</KEYWORD3>
+ <KEYWORD3>Boolean</KEYWORD3>
+ <KEYWORD3>Date</KEYWORD3>
+ <KEYWORD3>Function</KEYWORD3>
+ <KEYWORD3>Global</KEYWORD3>
+ <KEYWORD3>Math</KEYWORD3>
+ <KEYWORD3>Number</KEYWORD3>
+ <KEYWORD3>Object</KEYWORD3>
+ <KEYWORD3>RegExp</KEYWORD3><!-- Not ECMA -->
+ <KEYWORD3>String</KEYWORD3>
+
+ <!-- Literals -->
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+
+ <LITERAL2>NaN</LITERAL2>
+ <LITERAL2>Infinity</LITERAL2>
+
+ <!-- Global functions -->
+ <LITERAL2>eval</LITERAL2>
+ <LITERAL2>parseInt</LITERAL2>
+ <LITERAL2>parseFloat</LITERAL2>
+ <LITERAL2>escape</LITERAL2>
+ <LITERAL2>unescape</LITERAL2>
+ <LITERAL2>isNaN</LITERAL2>
+ <LITERAL2>isFinite</LITERAL2>
+
+ <!-- Comment/Uncomment your favorite ADO Constants-->
+
+ <!-- ADO Constants-->
+
+ <!-- CursorTypeEnum Values -->
+ <LITERAL2>adOpenForwardOnly</LITERAL2>
+ <LITERAL2>adOpenKeyset</LITERAL2>
+ <LITERAL2>adOpenDynamic</LITERAL2>
+ <LITERAL2>adOpenStatic</LITERAL2>
+
+ <!-- CursorOptionEnum Values -->
+<!-- <LITERAL2>adHoldRecords</LITERAL2>
+ <LITERAL2>adMovePrevious</LITERAL2>
+ <LITERAL2>adAddNew</LITERAL2>
+ <LITERAL2>adDelete</LITERAL2>
+ <LITERAL2>adUpdate</LITERAL2>
+ <LITERAL2>adBookmark</LITERAL2>
+ <LITERAL2>adApproxPosition</LITERAL2>
+ <LITERAL2>adUpdateBatch</LITERAL2>
+ <LITERAL2>adResync</LITERAL2>
+ <LITERAL2>adNotify</LITERAL2>
+ <LITERAL2>adFind</LITERAL2>
+ <LITERAL2>adSeek</LITERAL2>
+ <LITERAL2>adIndex</LITERAL2>
+-->
+ <!-- LockTypeEnum Values -->
+ <LITERAL2>adLockReadOnly</LITERAL2>
+ <LITERAL2>adLockPessimistic</LITERAL2>
+ <LITERAL2>adLockOptimistic</LITERAL2>
+ <LITERAL2>adLockBatchOptimistic</LITERAL2>
+
+ <!-- ExecuteOptionEnum Values -->
+ <LITERAL2>adRunAsync</LITERAL2>
+ <LITERAL2>adAsyncExecute</LITERAL2>
+ <LITERAL2>adAsyncFetch</LITERAL2>
+ <LITERAL2>adAsyncFetchNonBlocking</LITERAL2>
+ <LITERAL2>adExecuteNoRecords</LITERAL2>
+
+ <!-- ConnectOptionEnum Values -->
+<!-- <LITERAL2>adAsyncConnect</LITERAL2>
+-->
+ <!-- ObjectStateEnum Values -->
+ <LITERAL2>adStateClosed</LITERAL2>
+ <LITERAL2>adStateOpen</LITERAL2>
+ <LITERAL2>adStateConnecting</LITERAL2>
+ <LITERAL2>adStateExecuting</LITERAL2>
+ <LITERAL2>adStateFetching</LITERAL2>
+
+ <!-- CursorLocationEnum Values -->
+ <LITERAL2>adUseServer</LITERAL2>
+ <LITERAL2>adUseClient</LITERAL2>
+
+ <!-- DataTypeEnum Values -->
+ <LITERAL2>adEmpty</LITERAL2>
+ <LITERAL2>adTinyInt</LITERAL2>
+ <LITERAL2>adSmallInt</LITERAL2>
+ <LITERAL2>adInteger</LITERAL2>
+ <LITERAL2>adBigInt</LITERAL2>
+ <LITERAL2>adUnsignedTinyInt</LITERAL2>
+ <LITERAL2>adUnsignedSmallInt</LITERAL2>
+ <LITERAL2>adUnsignedInt</LITERAL2>
+ <LITERAL2>adUnsignedBigInt</LITERAL2>
+ <LITERAL2>adSingle</LITERAL2>
+ <LITERAL2>adDouble</LITERAL2>
+ <LITERAL2>adCurrency</LITERAL2>
+ <LITERAL2>adDecimal</LITERAL2>
+ <LITERAL2>adNumeric</LITERAL2>
+ <LITERAL2>adBoolean</LITERAL2>
+ <LITERAL2>adError</LITERAL2>
+ <LITERAL2>adUserDefined</LITERAL2>
+ <LITERAL2>adVariant</LITERAL2>
+ <LITERAL2>adIDispatch</LITERAL2>
+ <LITERAL2>adIUnknown</LITERAL2>
+ <LITERAL2>adGUID</LITERAL2>
+ <LITERAL2>adDate</LITERAL2>
+ <LITERAL2>adDBDate</LITERAL2>
+ <LITERAL2>adDBTime</LITERAL2>
+ <LITERAL2>adDBTimeStamp</LITERAL2>
+ <LITERAL2>adBSTR</LITERAL2>
+ <LITERAL2>adChar</LITERAL2>
+ <LITERAL2>adVarChar</LITERAL2>
+ <LITERAL2>adLongVarChar</LITERAL2>
+ <LITERAL2>adWChar</LITERAL2>
+ <LITERAL2>adVarWChar</LITERAL2>
+ <LITERAL2>adLongVarWChar</LITERAL2>
+ <LITERAL2>adBinary</LITERAL2>
+ <LITERAL2>adVarBinary</LITERAL2>
+ <LITERAL2>adLongVarBinary</LITERAL2>
+ <LITERAL2>adChapter</LITERAL2>
+ <LITERAL2>adFileTime</LITERAL2>
+ <LITERAL2>adDBFileTime</LITERAL2>
+ <LITERAL2>adPropVariant</LITERAL2>
+ <LITERAL2>adVarNumeric</LITERAL2>
+
+ <!-- FieldAttributeEnum Values -->
+<!-- <LITERAL2>adFldMayDefer</LITERAL2>
+ <LITERAL2>adFldUpdatable</LITERAL2>
+ <LITERAL2>adFldUnknownUpdatable</LITERAL2>
+ <LITERAL2>adFldFixed</LITERAL2>
+ <LITERAL2>adFldIsNullable</LITERAL2>
+ <LITERAL2>adFldMayBeNull</LITERAL2>
+ <LITERAL2>adFldLong</LITERAL2>
+ <LITERAL2>adFldRowID</LITERAL2>
+ <LITERAL2>adFldRowVersion</LITERAL2>
+ <LITERAL2>adFldCacheDeferred</LITERAL2>
+ <LITERAL2>adFldKeyColumn</LITERAL2>
+-->
+
+ <!-- EditModeEnum Values -->
+<!-- <LITERAL2>adEditNone</LITERAL2>
+ <LITERAL2>adEditInProgress</LITERAL2>
+ <LITERAL2>adEditAdd</LITERAL2>
+ <LITERAL2>adEditDelete</LITERAL2>
+-->
+ <!-- RecordStatusEnum Values -->
+<!-- <LITERAL2>adRecOK</LITERAL2>
+ <LITERAL2>adRecNew</LITERAL2>
+ <LITERAL2>adRecModified</LITERAL2>
+ <LITERAL2>adRecDeleted</LITERAL2>
+ <LITERAL2>adRecUnmodified</LITERAL2>
+ <LITERAL2>adRecInvalid</LITERAL2>
+ <LITERAL2>adRecMultipleChanges</LITERAL2>
+ <LITERAL2>adRecPendingChanges</LITERAL2>
+ <LITERAL2>adRecCanceled</LITERAL2>
+ <LITERAL2>adRecCantRelease</LITERAL2>
+ <LITERAL2>adRecConcurrencyViolation</LITERAL2>
+ <LITERAL2>adRecIntegrityViolation</LITERAL2>
+ <LITERAL2>adRecMaxChangesExceeded</LITERAL2>
+ <LITERAL2>adRecObjectOpen</LITERAL2>
+ <LITERAL2>adRecOutOfMemory</LITERAL2>
+ <LITERAL2>adRecPermissionDenied</LITERAL2>
+ <LITERAL2>adRecSchemaViolation</LITERAL2>
+ <LITERAL2>adRecDBDeleted</LITERAL2>
+-->
+ <!-- GetRowsOptionEnum Values -->
+<!-- <LITERAL2>adGetRowsRest</LITERAL2>
+-->
+
+ <!-- PositionEnum Values -->
+<!-- <LITERAL2>adPosUnknown</LITERAL2>
+ <LITERAL2>adPosBOF</LITERAL2>
+ <LITERAL2>adPosEOF</LITERAL2>
+-->
+
+ <!-- enum Values -->
+<!-- <LITERAL2>adBookmarkCurrent</LITERAL2>
+ <LITERAL2>adBookmarkFirst</LITERAL2>
+ <LITERAL2>adBookmarkLast</LITERAL2>
+-->
+ <!-- MarshalOptionsEnum Values -->
+<!-- <LITERAL2>adMarshalAll</LITERAL2>
+ <LITERAL2>adMarshalModifiedOnly</LITERAL2>
+-->
+ <!-- AffectEnum Values -->
+<!-- <LITERAL2>adAffectCurrent</LITERAL2>
+ <LITERAL2>adAffectGroup</LITERAL2>
+ <LITERAL2>adAffectAll</LITERAL2>
+ <LITERAL2>adAffectAllChapters</LITERAL2>
+-->
+
+ <!-- ResyncEnum Values -->
+<!-- <LITERAL2>adResyncUnderlyingValues</LITERAL2>
+ <LITERAL2>adResyncAllValues</LITERAL2>
+-->
+ <!-- CompareEnum Values -->
+<!-- <LITERAL2>adCompareLessThan</LITERAL2>
+ <LITERAL2>adCompareEqual</LITERAL2>
+ <LITERAL2>adCompareGreaterThan</LITERAL2>
+ <LITERAL2>adCompareNotEqual</LITERAL2>
+ <LITERAL2>adCompareNotComparable</LITERAL2>
+-->
+ <!-- FilterGroupEnum Values -->
+<!-- <LITERAL2>adFilterNone</LITERAL2>
+ <LITERAL2>adFilterPendingRecords</LITERAL2>
+ <LITERAL2>adFilterAffectedRecords</LITERAL2>
+ <LITERAL2>adFilterFetchedRecords</LITERAL2>
+ <LITERAL2>adFilterPredicate</LITERAL2>
+ <LITERAL2>adFilterConflictingRecords</LITERAL2>
+-->
+ <!-- SearchDirectionEnum Values -->
+<!-- <LITERAL2>adSearchForward</LITERAL2>
+ <LITERAL2>adSearchBackward</LITERAL2>
+-->
+
+ <!-- PersistFormatEnum Values -->
+ <LITERAL2>adPersistADTG</LITERAL2>
+ <LITERAL2>adPersistXML</LITERAL2>
+
+ <!-- StringFormatEnum Values -->
+<!-- <LITERAL2>adStringXML</LITERAL2>
+ <LITERAL2>adStringHTML</LITERAL2>
+ <LITERAL2>adClipString</LITERAL2>
+-->
+ <!-- ConnectPromptEnum Values -->
+<!-- <LITERAL2>adPromptAlways</LITERAL2>
+ <LITERAL2>adPromptComplete</LITERAL2>
+ <LITERAL2>adPromptCompleteRequired</LITERAL2>
+ <LITERAL2>adPromptNever</LITERAL2>
+-->
+ <!-- ConnectModeEnum Values -->
+<!-- <LITERAL2>adModeUnknown</LITERAL2>
+ <LITERAL2>adModeRead</LITERAL2>
+ <LITERAL2>adModeWrite</LITERAL2>
+ <LITERAL2>adModeReadWrite</LITERAL2>
+ <LITERAL2>adModeShareDenyRead</LITERAL2>
+ <LITERAL2>adModeShareDenyWrite</LITERAL2>
+ <LITERAL2>adModeShareExclusive</LITERAL2>
+ <LITERAL2>adModeShareDenyNone</LITERAL2>
+-->
+ <!-- IsolationLevelEnum Values -->
+<!-- <LITERAL2>adXactUnspecified</LITERAL2>
+ <LITERAL2>adXactChaos</LITERAL2>
+ <LITERAL2>adXactReadUncommitted</LITERAL2>
+ <LITERAL2>adXactBrowse</LITERAL2>
+ <LITERAL2>adXactCursorStability</LITERAL2>
+ <LITERAL2>adXactReadCommitted</LITERAL2>
+ <LITERAL2>adXactRepeatableRead</LITERAL2>
+ <LITERAL2>adXactSerializable</LITERAL2>
+ <LITERAL2>adXactIsolated</LITERAL2>
+-->
+ <!-- XactAttributeEnum Values -->
+<!-- <LITERAL2>adXactCommitRetaining</LITERAL2>
+ <LITERAL2>adXactAbortRetaining</LITERAL2>
+-->
+ <!-- PropertyAttributesEnum Values -->
+<!-- <LITERAL2>adPropNotSupported</LITERAL2>
+ <LITERAL2>adPropRequired</LITERAL2>
+ <LITERAL2>adPropOptional</LITERAL2>
+ <LITERAL2>adPropRead</LITERAL2>
+ <LITERAL2>adPropWrite</LITERAL2>
+-->
+ <!-- ErrorValueEnum Values -->
+<!-- <LITERAL2>adErrInvalidArgument</LITERAL2>
+ <LITERAL2>adErrNoCurrentRecord</LITERAL2>
+ <LITERAL2>adErrIllegalOperation</LITERAL2>
+ <LITERAL2>adErrInTransaction</LITERAL2>
+ <LITERAL2>adErrFeatureNotAvailable</LITERAL2>
+ <LITERAL2>adErrItemNotFound</LITERAL2>
+ <LITERAL2>adErrObjectInCollection</LITERAL2>
+ <LITERAL2>adErrObjectNotSet</LITERAL2>
+ <LITERAL2>adErrDataConversion</LITERAL2>
+ <LITERAL2>adErrObjectClosed</LITERAL2>
+ <LITERAL2>adErrObjectOpen</LITERAL2>
+ <LITERAL2>adErrProviderNotFound</LITERAL2>
+ <LITERAL2>adErrBoundToCommand</LITERAL2>
+ <LITERAL2>adErrInvalidParamInfo</LITERAL2>
+ <LITERAL2>adErrInvalidConnection</LITERAL2>
+ <LITERAL2>adErrNotReentrant</LITERAL2>
+ <LITERAL2>adErrStillExecuting</LITERAL2>
+ <LITERAL2>adErrOperationCancelled</LITERAL2>
+ <LITERAL2>adErrStillConnecting</LITERAL2>
+ <LITERAL2>adErrNotExecuting</LITERAL2>
+ <LITERAL2>adErrUnsafeOperation</LITERAL2>
+-->
+ <!-- ParameterAttributesEnum Values -->
+ <LITERAL2>adParamSigned</LITERAL2>
+ <LITERAL2>adParamNullable</LITERAL2>
+ <LITERAL2>adParamLong</LITERAL2>
+
+ <!-- ParameterDirectionEnum Values -->
+ <LITERAL2>adParamUnknown</LITERAL2>
+ <LITERAL2>adParamInput</LITERAL2>
+ <LITERAL2>adParamOutput</LITERAL2>
+ <LITERAL2>adParamInputOutput</LITERAL2>
+ <LITERAL2>adParamReturnValue</LITERAL2>
+
+ <!-- CommandTypeEnum Values -->
+ <LITERAL2>adCmdUnknown</LITERAL2>
+ <LITERAL2>adCmdText</LITERAL2>
+ <LITERAL2>adCmdTable</LITERAL2>
+ <LITERAL2>adCmdStoredProc</LITERAL2>
+ <LITERAL2>adCmdFile</LITERAL2>
+ <LITERAL2>adCmdTableDirect</LITERAL2>
+
+ <!-- EventStatusEnum Values -->
+<!-- <LITERAL2>adStatusOK</LITERAL2>
+ <LITERAL2>adStatusErrorsOccurred</LITERAL2>
+ <LITERAL2>adStatusCantDeny</LITERAL2>
+ <LITERAL2>adStatusCancel</LITERAL2>
+ <LITERAL2>adStatusUnwantedEvent</LITERAL2>
+-->
+ <!-- EventReasonEnum Values -->
+<!-- <LITERAL2>adRsnAddNew</LITERAL2>
+ <LITERAL2>adRsnDelete</LITERAL2>
+ <LITERAL2>adRsnUpdate</LITERAL2>
+ <LITERAL2>adRsnUndoUpdate</LITERAL2>
+ <LITERAL2>adRsnUndoAddNew</LITERAL2>
+ <LITERAL2>adRsnUndoDelete</LITERAL2>
+ <LITERAL2>adRsnRequery</LITERAL2>
+ <LITERAL2>adRsnResynch</LITERAL2>
+ <LITERAL2>adRsnClose</LITERAL2>
+ <LITERAL2>adRsnMove</LITERAL2>
+ <LITERAL2>adRsnFirstChange</LITERAL2>
+ <LITERAL2>adRsnMoveFirst</LITERAL2>
+ <LITERAL2>adRsnMoveNext</LITERAL2>
+ <LITERAL2>adRsnMovePrevious</LITERAL2>
+ <LITERAL2>adRsnMoveLast</LITERAL2>
+-->
+ <!-- SchemaEnum Values -->
+<!-- <LITERAL2>adSchemaProviderSpecific</LITERAL2>
+ <LITERAL2>adSchemaAsserts</LITERAL2>
+ <LITERAL2>adSchemaCatalogs</LITERAL2>
+ <LITERAL2>adSchemaCharacterSets</LITERAL2>
+ <LITERAL2>adSchemaCollations</LITERAL2>
+ <LITERAL2>adSchemaColumns</LITERAL2>
+ <LITERAL2>adSchemaCheckConstraints</LITERAL2>
+ <LITERAL2>adSchemaConstraintColumnUsage</LITERAL2>
+ <LITERAL2>adSchemaConstraintTableUsage</LITERAL2>
+ <LITERAL2>adSchemaKeyColumnUsage</LITERAL2>
+ <LITERAL2>adSchemaReferentialConstraints</LITERAL2>
+ <LITERAL2>adSchemaTableConstraints</LITERAL2>
+ <LITERAL2>adSchemaColumnsDomainUsage</LITERAL2>
+ <LITERAL2>adSchemaIndexes</LITERAL2>
+ <LITERAL2>adSchemaColumnPrivileges</LITERAL2>
+ <LITERAL2>adSchemaTablePrivileges</LITERAL2>
+ <LITERAL2>adSchemaUsagePrivileges</LITERAL2>
+ <LITERAL2>adSchemaProcedures</LITERAL2>
+ <LITERAL2>adSchemaSchemata</LITERAL2>
+ <LITERAL2>adSchemaSQLLanguages</LITERAL2>
+ <LITERAL2>adSchemaStatistics</LITERAL2>
+ <LITERAL2>adSchemaTables</LITERAL2>
+ <LITERAL2>adSchemaTranslations</LITERAL2>
+ <LITERAL2>adSchemaProviderTypes</LITERAL2>
+ <LITERAL2>adSchemaViews</LITERAL2>
+ <LITERAL2>adSchemaViewColumnUsage</LITERAL2>
+ <LITERAL2>adSchemaViewTableUsage</LITERAL2>
+ <LITERAL2>adSchemaProcedureParameters</LITERAL2>
+ <LITERAL2>adSchemaForeignKeys</LITERAL2>
+ <LITERAL2>adSchemaPrimaryKeys</LITERAL2>
+ <LITERAL2>adSchemaProcedureColumns</LITERAL2>
+ <LITERAL2>adSchemaDBInfoKeywords</LITERAL2>
+ <LITERAL2>adSchemaDBInfoLiterals</LITERAL2>
+ <LITERAL2>adSchemaCubes</LITERAL2>
+ <LITERAL2>adSchemaDimensions</LITERAL2>
+ <LITERAL2>adSchemaHierarchies</LITERAL2>
+ <LITERAL2>adSchemaLevels</LITERAL2>
+ <LITERAL2>adSchemaMeasures</LITERAL2>
+ <LITERAL2>adSchemaProperties</LITERAL2>
+ <LITERAL2>adSchemaMembers</LITERAL2>
+-->
+ <!-- SeekEnum Values -->
+<!-- <LITERAL2>adSeekFirstEQ</LITERAL2>
+ <LITERAL2>adSeekLastEQ</LITERAL2>
+ <LITERAL2>adSeekAfterEQ</LITERAL2>
+ <LITERAL2>adSeekAfter</LITERAL2>
+ <LITERAL2>adSeekBeforeEQ</LITERAL2>
+ <LITERAL2>adSeekBefore</LITERAL2>
+-->
+ <!-- ADCPROP_UPDATECRITERIA_ENUM Values -->
+<!-- <LITERAL2>adCriteriaKey</LITERAL2>
+ <LITERAL2>adCriteriaAllCols</LITERAL2>
+ <LITERAL2>adCriteriaUpdCols</LITERAL2>
+ <LITERAL2>adCriteriaTimeStamp</LITERAL2>
+-->
+ <!-- ADCPROP_ASYNCTHREADPRIORITY_ENUM Values -->
+<!-- <LITERAL2>adPriorityLowest</LITERAL2>
+ <LITERAL2>adPriorityBelowNormal</LITERAL2>
+ <LITERAL2>adPriorityNormal</LITERAL2>
+ <LITERAL2>adPriorityAboveNormal</LITERAL2>
+ <LITERAL2>adPriorityHighest</LITERAL2>
+-->
+ <!-- CEResyncEnum Values -->
+<!-- <LITERAL2>adResyncNone</LITERAL2>
+ <LITERAL2>adResyncAutoIncrement</LITERAL2>
+ <LITERAL2>adResyncConflicts</LITERAL2>
+ <LITERAL2>adResyncUpdates</LITERAL2>
+ <LITERAL2>adResyncInserts</LITERAL2>
+ <LITERAL2>adResyncAll</LITERAL2>
+-->
+ <!-- ADCPROP_AUTORECALC_ENUM Values -->
+<!-- <LITERAL2>adRecalcUpFront</LITERAL2>
+ <LITERAL2>adRecalcAlways</LITERAL2>
+-->
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/jcl.xml b/jEdit/modes/jcl.xml
index b7f0ed5..c1bbede 100644
--- a/jEdit/modes/jcl.xml
+++ b/jEdit/modes/jcl.xml
@@ -1,67 +1,67 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!--
- JCL edit mode by Bill McMilleon (bill at mcmilleon.com)
- March 19, 2003
-
- Suggested catalog file entry:
-
- <MODE NAME="JCL" FILE="JCL.xml"
- FILE_NAME_GLOB="*.{jcl}" />
-
--->
-
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
-
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
-
-<!-- In fixed form, column 72 is the last column parsed, unless the
-\extend_source option is invoked -->
- <!-- TERMINATE AT_CHAR="72" / -->
-
-
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">//*</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
-<!-- Highlighted Operators -->
-<SEQ TYPE="OPERATOR">=</SEQ>
-<SEQ TYPE="OPERATOR"><</SEQ>
-<SEQ TYPE="OPERATOR">></SEQ>
-<SEQ TYPE="OPERATOR">&</SEQ>
-<SEQ TYPE="OPERATOR">|</SEQ>
-<SEQ TYPE="OPERATOR">,</SEQ>
-
-<KEYWORDS>
- <KEYWORD2>COMMAND</KEYWORD2>
- <KEYWORD2>CNTL</KEYWORD2>
- <KEYWORD2>DD</KEYWORD2>
- <KEYWORD2>ENCNTL</KEYWORD2>
- <KEYWORD2>EXEC</KEYWORD2>
- <KEYWORD2>IF</KEYWORD2>
- <KEYWORD2>THEN</KEYWORD2>
- <KEYWORD2>ELSE</KEYWORD2>
- <KEYWORD2>ENDIF</KEYWORD2>
- <KEYWORD2>INCLUDE</KEYWORD2>
- <KEYWORD2>JCLIB</KEYWORD2>
- <KEYWORD2>JOB</KEYWORD2>
- <KEYWORD2>MSG</KEYWORD2>
- <KEYWORD2>OUTPUT</KEYWORD2>
- <KEYWORD2>PEND</KEYWORD2>
- <KEYWORD2>PROC</KEYWORD2>
- <KEYWORD2>SET</KEYWORD2>
- <KEYWORD2>XMIT</KEYWORD2>
-</KEYWORDS>
-
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!--
+ JCL edit mode by Bill McMilleon (bill at mcmilleon.com)
+ March 19, 2003
+
+ Suggested catalog file entry:
+
+ <MODE NAME="JCL" FILE="JCL.xml"
+ FILE_NAME_GLOB="*.{jcl}" />
+
+-->
+
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+
+<!-- In fixed form, column 72 is the last column parsed, unless the
+\extend_source option is invoked -->
+ <!-- TERMINATE AT_CHAR="72" / -->
+
+
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">//*</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+<!-- Highlighted Operators -->
+<SEQ TYPE="OPERATOR">=</SEQ>
+<SEQ TYPE="OPERATOR"><</SEQ>
+<SEQ TYPE="OPERATOR">></SEQ>
+<SEQ TYPE="OPERATOR">&</SEQ>
+<SEQ TYPE="OPERATOR">|</SEQ>
+<SEQ TYPE="OPERATOR">,</SEQ>
+
+<KEYWORDS>
+ <KEYWORD2>COMMAND</KEYWORD2>
+ <KEYWORD2>CNTL</KEYWORD2>
+ <KEYWORD2>DD</KEYWORD2>
+ <KEYWORD2>ENCNTL</KEYWORD2>
+ <KEYWORD2>EXEC</KEYWORD2>
+ <KEYWORD2>IF</KEYWORD2>
+ <KEYWORD2>THEN</KEYWORD2>
+ <KEYWORD2>ELSE</KEYWORD2>
+ <KEYWORD2>ENDIF</KEYWORD2>
+ <KEYWORD2>INCLUDE</KEYWORD2>
+ <KEYWORD2>JCLIB</KEYWORD2>
+ <KEYWORD2>JOB</KEYWORD2>
+ <KEYWORD2>MSG</KEYWORD2>
+ <KEYWORD2>OUTPUT</KEYWORD2>
+ <KEYWORD2>PEND</KEYWORD2>
+ <KEYWORD2>PROC</KEYWORD2>
+ <KEYWORD2>SET</KEYWORD2>
+ <KEYWORD2>XMIT</KEYWORD2>
+</KEYWORDS>
+
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/jhtml.xml b/jEdit/modes/jhtml.xml
index 5a15907..72d03bb 100644
--- a/jEdit/modes/jhtml.xml
+++ b/jEdit/modes/jhtml.xml
@@ -1,144 +1,144 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- JHTML mode by Will Sargent <wsargent at atg.com>
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <!-- Indent droplets and oparams -->
- <PROPERTY NAME="indentNextLines"
- VALUE="\s*(<\s*(droplet|oparam))\s+.*" />
- <!-- Sadly, there doesn't seem to be a way to
- undent when we see a /oparam> tag... -->
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
- <!-- Allow for Dynamo SSI -->
- <SPAN TYPE="NULL">
- <BEGIN><!--#</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="java::MAIN">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <!-- Embedded Java -->
- <SPAN TYPE="MARKUP" DELEGATE="java::MAIN">
- <BEGIN><java></BEGIN>
- <END></java></END>
- </SPAN>
-
- <!-- Don't know how to do this correctly.
- <SPAN TYPE="MARKUP" DELEGATE="java::MAIN">
- <BEGIN><java type=</BEGIN>
- <END></java></END>
- </SPAN>
- -->
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- All markup defaults to JHTML. -->
- <SPAN TYPE="MARKUP" DELEGATE="JHTML">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <RULES SET="JHTML" DEFAULT="MARKUP">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="MARKUP">/</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>importbean</KEYWORD1>
- <KEYWORD1>droplet</KEYWORD1>
- <KEYWORD1>param</KEYWORD1>
- <KEYWORD1>oparam</KEYWORD1>
- <KEYWORD1>valueof</KEYWORD1>
- <KEYWORD1>setvalue</KEYWORD1>
- <KEYWORD1>servlet</KEYWORD1>
- <KEYWORD2>bean</KEYWORD2>
- <KEYWORD2>submitvalue</KEYWORD2>
- <KEYWORD2>declareparam</KEYWORD2>
- <KEYWORD2>synchronized</KEYWORD2>
- <KEYWORD2>priority</KEYWORD2>
-
- <!-- standard converters -->
- <KEYWORD2>converter</KEYWORD2>
- <KEYWORD2>date</KEYWORD2>
- <KEYWORD2>number</KEYWORD2>
- <KEYWORD2>required</KEYWORD2>
- <KEYWORD2>nullable</KEYWORD2>
- <KEYWORD2>currency</KEYWORD2>
- <KEYWORD2>currencyConversion</KEYWORD2>
- <KEYWORD2>euro</KEYWORD2>
- <KEYWORD2>locale</KEYWORD2>
- <KEYWORD2>symbol</KEYWORD2>
-
- <!-- Can't use this because of image src... -->
- <!-- <KEYWORD2>src</KEYWORD2> -->
- </KEYWORDS>
- </RULES>
-
- <RULES SET="ATTRVALUE" DEFAULT="LITERAL1" HIGHLIGHT_DIGITS="TRUE">
- <!-- backticks are java -->
- <SPAN TYPE="MARKUP" DELEGATE="java::MAIN">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <!-- Allow param: and bean: properties to be marked up -->
- <SEQ TYPE="LABEL">param:</SEQ>
- <SEQ TYPE="LABEL">bean:</SEQ>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ JHTML mode by Will Sargent <wsargent at atg.com>
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <!-- Indent droplets and oparams -->
+ <PROPERTY NAME="indentNextLines"
+ VALUE="\s*(<\s*(droplet|oparam))\s+.*" />
+ <!-- Sadly, there doesn't seem to be a way to
+ undent when we see a /oparam> tag... -->
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+ <!-- Allow for Dynamo SSI -->
+ <SPAN TYPE="NULL">
+ <BEGIN><!--#</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="java::MAIN">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <!-- Embedded Java -->
+ <SPAN TYPE="MARKUP" DELEGATE="java::MAIN">
+ <BEGIN><java></BEGIN>
+ <END></java></END>
+ </SPAN>
+
+ <!-- Don't know how to do this correctly.
+ <SPAN TYPE="MARKUP" DELEGATE="java::MAIN">
+ <BEGIN><java type=</BEGIN>
+ <END></java></END>
+ </SPAN>
+ -->
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- All markup defaults to JHTML. -->
+ <SPAN TYPE="MARKUP" DELEGATE="JHTML">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="JHTML" DEFAULT="MARKUP">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="MARKUP">/</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>importbean</KEYWORD1>
+ <KEYWORD1>droplet</KEYWORD1>
+ <KEYWORD1>param</KEYWORD1>
+ <KEYWORD1>oparam</KEYWORD1>
+ <KEYWORD1>valueof</KEYWORD1>
+ <KEYWORD1>setvalue</KEYWORD1>
+ <KEYWORD1>servlet</KEYWORD1>
+ <KEYWORD2>bean</KEYWORD2>
+ <KEYWORD2>submitvalue</KEYWORD2>
+ <KEYWORD2>declareparam</KEYWORD2>
+ <KEYWORD2>synchronized</KEYWORD2>
+ <KEYWORD2>priority</KEYWORD2>
+
+ <!-- standard converters -->
+ <KEYWORD2>converter</KEYWORD2>
+ <KEYWORD2>date</KEYWORD2>
+ <KEYWORD2>number</KEYWORD2>
+ <KEYWORD2>required</KEYWORD2>
+ <KEYWORD2>nullable</KEYWORD2>
+ <KEYWORD2>currency</KEYWORD2>
+ <KEYWORD2>currencyConversion</KEYWORD2>
+ <KEYWORD2>euro</KEYWORD2>
+ <KEYWORD2>locale</KEYWORD2>
+ <KEYWORD2>symbol</KEYWORD2>
+
+ <!-- Can't use this because of image src... -->
+ <!-- <KEYWORD2>src</KEYWORD2> -->
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="ATTRVALUE" DEFAULT="LITERAL1" HIGHLIGHT_DIGITS="TRUE">
+ <!-- backticks are java -->
+ <SPAN TYPE="MARKUP" DELEGATE="java::MAIN">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <!-- Allow param: and bean: properties to be marked up -->
+ <SEQ TYPE="LABEL">param:</SEQ>
+ <SEQ TYPE="LABEL">bean:</SEQ>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/jmk.xml b/jEdit/modes/jmk.xml
index ac07923..4a4bfc2 100644
--- a/jEdit/modes/jmk.xml
+++ b/jEdit/modes/jmk.xml
@@ -1,67 +1,67 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comment -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- Literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- Brackets -->
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>cat</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>create</KEYWORD1>
- <KEYWORD1>delall</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD1>dirs</KEYWORD1>
- <KEYWORD1>equal</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>exec</KEYWORD1>
- <KEYWORD1>first</KEYWORD1>
- <KEYWORD1>forname</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>getprop</KEYWORD1>
- <KEYWORD1>glob</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>join</KEYWORD1>
- <KEYWORD1>load</KEYWORD1>
- <KEYWORD1>mkdir</KEYWORD1>
- <KEYWORD1>mkdirs</KEYWORD1>
- <KEYWORD1>note</KEYWORD1>
- <KEYWORD1>patsubst</KEYWORD1>
- <KEYWORD1>rename</KEYWORD1>
- <KEYWORD1>rest</KEYWORD1>
- <KEYWORD1>subst</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD2>@</KEYWORD2>
- <KEYWORD2>?</KEYWORD2>
- <KEYWORD2><</KEYWORD2>
- <KEYWORD2>%</KEYWORD2>
- <KEYWORD3>include</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comment -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- Literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- Brackets -->
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>cat</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>create</KEYWORD1>
+ <KEYWORD1>delall</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>dirs</KEYWORD1>
+ <KEYWORD1>equal</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>exec</KEYWORD1>
+ <KEYWORD1>first</KEYWORD1>
+ <KEYWORD1>forname</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>getprop</KEYWORD1>
+ <KEYWORD1>glob</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>join</KEYWORD1>
+ <KEYWORD1>load</KEYWORD1>
+ <KEYWORD1>mkdir</KEYWORD1>
+ <KEYWORD1>mkdirs</KEYWORD1>
+ <KEYWORD1>note</KEYWORD1>
+ <KEYWORD1>patsubst</KEYWORD1>
+ <KEYWORD1>rename</KEYWORD1>
+ <KEYWORD1>rest</KEYWORD1>
+ <KEYWORD1>subst</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD2>@</KEYWORD2>
+ <KEYWORD2>?</KEYWORD2>
+ <KEYWORD2><</KEYWORD2>
+ <KEYWORD2>%</KEYWORD2>
+ <KEYWORD3>include</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/json.xml b/jEdit/modes/json.xml
new file mode 100644
index 0000000..11b5714
--- /dev/null
+++ b/jEdit/modes/json.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <PROPS>
+ <!-- auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="[{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}]" />
+ </PROPS>
+
+ <RULES>
+ <!-- mark numbers as DIGIT -->
+ <SEQ_REGEXP HASH_CHARS="-0123456789." TYPE="DIGIT">[-]?\d+([.]\d*)?([eE][+-]?\d+)?</SEQ_REGEXP>
+
+ <!-- mark strings as LITERAL1 -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- mark pair separator as OPERATOR -->
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <!-- mark these special values as LITERAL2 -->
+ <SEQ TYPE="LITERAL2">true</SEQ>
+ <SEQ TYPE="LITERAL2">false</SEQ>
+ <SEQ TYPE="LITERAL2">null</SEQ>
+ </RULES>
+</MODE>
\ No newline at end of file
diff --git a/jEdit/modes/jsp.xml b/jEdit/modes/jsp.xml
index c194f4a..a3df000 100644
--- a/jEdit/modes/jsp.xml
+++ b/jEdit/modes/jsp.xml
@@ -1,256 +1,256 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<%--" />
- <PROPERTY NAME="commentEnd" VALUE="--%>" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
- <!-- JSP comment -->
- <SPAN TYPE="COMMENT2">
- <BEGIN><%--</BEGIN>
- <END>--%></END>
- </SPAN>
-
- <!-- JSP directive -->
- <SPAN TYPE="KEYWORD1" DELEGATE="DIRECTIVES">
- <BEGIN><%@</BEGIN>
- <END>%></END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="DIRECTIVES">
- <BEGIN><jsp:directive></BEGIN>
- <END></jsp:directive></END>
- </SPAN>
-
- <!-- JSP scriptlet expression -->
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><jsp:expression></BEGIN>
- <END></jsp:expression></END>
- </SPAN>
-
- <!-- JSP scriptlet code block -->
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><%!</BEGIN>
- <END>%></END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><jsp:declaration></BEGIN>
- <END></jsp:declaration></END>
- </SPAN>
-
- <!-- JSP scriptlet -->
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><jsp:scriptlet></BEGIN>
- <END></jsp:scriptlet></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
-
- <SPAN TYPE="KEYWORD2" DELEGATE="EL">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- </RULES>
- <RULES SET="COMMENT" DEFAULT="COMMENT1" IGNORE_CASE="TRUE">
- <!-- JSP comment -->
- <SPAN TYPE="COMMENT2">
- <BEGIN><%--</BEGIN>
- <END>--%></END>
- </SPAN>
-
- <!-- JSP scriptlet expression -->
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- JSP scriptlet -->
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
- <RULES SET="DIRECTIVES" DEFAULT="MARKUP">
- <!-- JSP scriptlet expression -->
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="MARKUP">/</SEQ>
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">:</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>taglib</KEYWORD1>
- <KEYWORD1>include</KEYWORD1>
- <KEYWORD1>page</KEYWORD1>
- <KEYWORD1>tag</KEYWORD1>
- <KEYWORD1>tagAttribute</KEYWORD1>
- <KEYWORD1>tagVariable</KEYWORD1>
-
- <KEYWORD2>language</KEYWORD2>
- <KEYWORD2>session</KEYWORD2>
- <KEYWORD2>contentType</KEYWORD2>
- <KEYWORD2>charset</KEYWORD2>
- <KEYWORD2>import</KEYWORD2>
- <KEYWORD2>buffer</KEYWORD2>
- <KEYWORD2>autoflush</KEYWORD2>
- <KEYWORD2>isThreadSafe</KEYWORD2>
- <KEYWORD2>info</KEYWORD2>
- <KEYWORD2>errorPage</KEYWORD2>
- <KEYWORD2>isErrorpage</KEYWORD2>
- <KEYWORD2>extends</KEYWORD2>
- <KEYWORD2>file</KEYWORD2>
- <KEYWORD2>uri</KEYWORD2>
- <KEYWORD2>prefix</KEYWORD2>
- <KEYWORD2>method</KEYWORD2>
- <KEYWORD2>name</KEYWORD2>
- <KEYWORD2>default</KEYWORD2>
- <KEYWORD2>required</KEYWORD2>
- <KEYWORD2>rtexprvalue</KEYWORD2>
- <KEYWORD2>id</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <KEYWORD2>scope</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="TAGS" DEFAULT="MARKUP">
- <!-- JSP comment -->
- <SPAN TYPE="COMMENT2">
- <BEGIN><%--</BEGIN>
- <END>--%></END>
- </SPAN>
-
- <!-- JSP scriptlet expression -->
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="CSS+JSP">
- <BEGIN>style='</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="CSS+JSP">
- <BEGIN>style="</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="MARKUP">/</SEQ>
- <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="OPERATOR">:</MARK_FOLLOWING>
- <SEQ TYPE="OPERATOR">:</SEQ>
- </RULES>
-
-
-
- <RULES SET="CSS+JSP" DEFAULT="LITERAL1">
- <SPAN TYPE="KEYWORD2" DELEGATE="java::MAIN">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
- <SPAN TYPE="KEYWORD2" DELEGATE="EL">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
- <IMPORT DELEGATE="css::MAIN"/>
- </RULES>
-
- <RULES SET="ATTRVALUE" DEFAULT="LITERAL1" ESCAPE="\">
- <!-- JSP scriptlet expression -->
- <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
- <SPAN TYPE="KEYWORD2" DELEGATE="EL">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
- <SEQ TYPE="LITERAL1" DELEGATE="JAVASCRIPT+JSP">javascript:</SEQ>
- </RULES>
-
-
- <RULES SET="JAVASCRIPT+JSP">
- <!-- JSP scriptlet expression -->
- <SPAN TYPE="KEYWORD2" DELEGATE="java::MAIN">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
- <SPAN TYPE="KEYWORD2" DELEGATE="EL">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
- <IMPORT DELEGATE="javascript::MAIN"/>
- </RULES>
-
- <RULES SET="EL" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))">
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
- <IMPORT DELEGATE="java::MAIN"/>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<%--" />
+ <PROPERTY NAME="commentEnd" VALUE="--%>" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+ <!-- JSP comment -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN><%--</BEGIN>
+ <END>--%></END>
+ </SPAN>
+
+ <!-- JSP directive -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="DIRECTIVES">
+ <BEGIN><%@</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="DIRECTIVES">
+ <BEGIN><jsp:directive></BEGIN>
+ <END></jsp:directive></END>
+ </SPAN>
+
+ <!-- JSP scriptlet expression -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><jsp:expression></BEGIN>
+ <END></jsp:expression></END>
+ </SPAN>
+
+ <!-- JSP scriptlet code block -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><%!</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><jsp:declaration></BEGIN>
+ <END></jsp:declaration></END>
+ </SPAN>
+
+ <!-- JSP scriptlet -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><jsp:scriptlet></BEGIN>
+ <END></jsp:scriptlet></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <SPAN TYPE="KEYWORD2" DELEGATE="EL">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ </RULES>
+ <RULES SET="COMMENT" DEFAULT="COMMENT1" IGNORE_CASE="TRUE">
+ <!-- JSP comment -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN><%--</BEGIN>
+ <END>--%></END>
+ </SPAN>
+
+ <!-- JSP scriptlet expression -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- JSP scriptlet -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+ <RULES SET="DIRECTIVES" DEFAULT="MARKUP">
+ <!-- JSP scriptlet expression -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="MARKUP">/</SEQ>
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>taglib</KEYWORD1>
+ <KEYWORD1>include</KEYWORD1>
+ <KEYWORD1>page</KEYWORD1>
+ <KEYWORD1>tag</KEYWORD1>
+ <KEYWORD1>tagAttribute</KEYWORD1>
+ <KEYWORD1>tagVariable</KEYWORD1>
+
+ <KEYWORD2>language</KEYWORD2>
+ <KEYWORD2>session</KEYWORD2>
+ <KEYWORD2>contentType</KEYWORD2>
+ <KEYWORD2>charset</KEYWORD2>
+ <KEYWORD2>import</KEYWORD2>
+ <KEYWORD2>buffer</KEYWORD2>
+ <KEYWORD2>autoflush</KEYWORD2>
+ <KEYWORD2>isThreadSafe</KEYWORD2>
+ <KEYWORD2>info</KEYWORD2>
+ <KEYWORD2>errorPage</KEYWORD2>
+ <KEYWORD2>isErrorpage</KEYWORD2>
+ <KEYWORD2>extends</KEYWORD2>
+ <KEYWORD2>file</KEYWORD2>
+ <KEYWORD2>uri</KEYWORD2>
+ <KEYWORD2>prefix</KEYWORD2>
+ <KEYWORD2>method</KEYWORD2>
+ <KEYWORD2>name</KEYWORD2>
+ <KEYWORD2>default</KEYWORD2>
+ <KEYWORD2>required</KEYWORD2>
+ <KEYWORD2>rtexprvalue</KEYWORD2>
+ <KEYWORD2>id</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>scope</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+ <!-- JSP comment -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN><%--</BEGIN>
+ <END>--%></END>
+ </SPAN>
+
+ <!-- JSP scriptlet expression -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="CSS+JSP">
+ <BEGIN>style='</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="CSS+JSP">
+ <BEGIN>style="</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="ATTRVALUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="MARKUP">/</SEQ>
+ <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="OPERATOR">:</MARK_FOLLOWING>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ </RULES>
+
+
+
+ <RULES SET="CSS+JSP" DEFAULT="LITERAL1">
+ <SPAN TYPE="KEYWORD2" DELEGATE="java::MAIN">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD2" DELEGATE="EL">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <IMPORT DELEGATE="css::MAIN"/>
+ </RULES>
+
+ <RULES SET="ATTRVALUE" DEFAULT="LITERAL1" ESCAPE="\">
+ <!-- JSP scriptlet expression -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="java::MAIN">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD2" DELEGATE="EL">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SEQ TYPE="LITERAL1" DELEGATE="JAVASCRIPT+JSP">javascript:</SEQ>
+ </RULES>
+
+
+ <RULES SET="JAVASCRIPT+JSP">
+ <!-- JSP scriptlet expression -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="java::MAIN">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD2" DELEGATE="EL">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <IMPORT DELEGATE="javascript::MAIN"/>
+ </RULES>
+
+ <RULES SET="EL" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))">
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+ <IMPORT DELEGATE="java::MAIN"/>
+ </RULES>
+</MODE>
<!-- :noTabs=false: -->
\ No newline at end of file
diff --git a/jEdit/modes/latex.xml b/jEdit/modes/latex.xml
index 55fc787..ebf4b24 100644
--- a/jEdit/modes/latex.xml
+++ b/jEdit/modes/latex.xml
@@ -1,223 +1,240 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- jEdit LaTeX mode
- written by: Michael Schlotter, m.schlotter at bath.ac.uk
- latex.xml, v.1.2, 29 Mar 2008
-
- Suggested catalog entry:
- <MODE NAME="latex" FILE="latex.xml"
- FILE_NAME_GLOB="*.{tex,ltx,latex,sty,cls}" />
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="%" />
- <PROPERTY NAME="deepIndent" VALUE="FALSE" />
- <PROPERTY NAME="wordBreakChars" VALUE="" />
- <PROPERTY NAME="noWordSep" VALUE="\@_-:*<>" />
- </PROPS>
-
- <!-- default rules -->
- <RULES
- IGNORE_CASE="FALSE"
- NO_WORD_SEP="@_-:*"
- HIGHLIGHT_DIGITS="FALSE">
-
- <!-- \verb|sometext|; any delimeter except * can be used -->
- <SPAN_REGEXP
- TYPE="KEYWORD2" DELEGATE="VerbatimRules"
- HASH_CHAR="\" NO_LINE_BREAK="TRUE">
- <BEGIN>.verb[\*]?([\p{Punct}&&[^*]])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- verbatim environments -->
- <SPAN TYPE="KEYWORD1" DELEGATE="VerbatimRules">
- <BEGIN>\begin{verbatim*}</BEGIN><END>\end{verbatim*}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="VerbatimRules">
- <BEGIN>\begin{verbatim}</BEGIN><END>\end{verbatim}</END>
- </SPAN>
-
- <!-- mathematical environments, including AMS definitions -->
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>$$</BEGIN><END>$$</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>$</BEGIN><END>$</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\(</BEGIN><END>\)</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\[</BEGIN><END>\]</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{math}</BEGIN><END>\end{math}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{displaymath}</BEGIN><END>\end{displaymath}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{equation*}</BEGIN><END>\end{equation*}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{equation}</BEGIN><END>\end{equation}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{eqnarray*}</BEGIN><END>\end{eqnarray*}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{eqnarray}</BEGIN><END>\end{eqnarray}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{align*}</BEGIN><END>\end{align*}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{align}</BEGIN><END>\end{align}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{flalign*}</BEGIN><END>\end{flalign*}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{flalign}</BEGIN><END>\end{flalign}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{gather*}</BEGIN><END>\end{gather*}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{gather}</BEGIN><END>\end{gather}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{multline*}</BEGIN><END>\end{multline*}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
- <BEGIN>\begin{multline}</BEGIN><END>\end{multline}</END>
- </SPAN>
-
- <!-- labels - includes all commands ending with `ref' and `ref*' -->
- <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
- <BEGIN>\label{</BEGIN><END>}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
- <BEGIN>\cite{</BEGIN><END>}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
- <BEGIN>\hyperlink{</BEGIN><END>}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
- <BEGIN>\hypertarget{</BEGIN><END>}</END>
- </SPAN>
- <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
- <BEGIN>\url{</BEGIN><END>}</END>
- </SPAN>
- <SPAN_REGEXP
- TYPE="KEYWORD4" DELEGATE="LabelRules"
- HASH_CHAR="\" NO_LINE_BREAK="TRUE">
- <BEGIN>.[\p{Alnum}]*ref[\*]?\{</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
-
- <!-- escaped characters which are treated as normal text -->
- <SEQ TYPE="NULL">\&</SEQ>
- <SEQ TYPE="NULL">\$</SEQ>
- <SEQ TYPE="NULL">\%</SEQ>
- <SEQ TYPE="NULL">\#</SEQ>
- <SEQ TYPE="NULL">\_</SEQ>
- <SEQ TYPE="NULL">\{</SEQ>
- <SEQ TYPE="NULL">\}</SEQ>
-
- <!-- tabbing tokens (or accents, depending on environment) -->
- <SEQ TYPE="KEYWORD2">\=</SEQ>
- <SEQ TYPE="KEYWORD2">\></SEQ>
- <SEQ TYPE="KEYWORD2">\<</SEQ>
- <SEQ TYPE="KEYWORD2">\+</SEQ>
- <SEQ TYPE="KEYWORD2">\-</SEQ>
- <SEQ TYPE="KEYWORD2">\'</SEQ>
- <SEQ TYPE="KEYWORD2">\`</SEQ>
-
- <!-- more accents incl. those specific to tabbing environment -->
- <SEQ TYPE="KEYWORD2">\^</SEQ>
- <SEQ TYPE="KEYWORD2">\"</SEQ>
- <SEQ TYPE="KEYWORD2">\~</SEQ>
- <SEQ TYPE="KEYWORD2">\.</SEQ>
- <SEQ TYPE="KEYWORD2">\a'</SEQ>
- <SEQ TYPE="KEYWORD2">\a`</SEQ>
- <SEQ TYPE="KEYWORD2">\a=</SEQ>
-
- <!-- special tokens: macro parameter, linebreak, alignment tab -->
- <SEQ_REGEXP TYPE="DIGIT">#[1-9]</SEQ_REGEXP>
- <SEQ TYPE="KEYWORD3">\\</SEQ>
- <SEQ TYPE="KEYWORD3">&</SEQ>
-
- <!-- comments -->
- <SPAN TYPE="COMMENT2">
- <BEGIN>\iffalse</BEGIN><END>\fi</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
-
- <!-- quotes, including those defined by package `(n)german' -->
- <SPAN TYPE="LITERAL1"><BEGIN>``</BEGIN><END>''</END></SPAN>
- <SPAN TYPE="LITERAL1"><BEGIN>"`</BEGIN><END>"'</END></SPAN>
- <SPAN TYPE="LITERAL1"><BEGIN>"<</BEGIN><END>"></END></SPAN>
- <SPAN TYPE="LITERAL1"><BEGIN>\glqq</BEGIN><END>\grqq</END></SPAN>
- <SPAN TYPE="LITERAL1"><BEGIN>\glq</BEGIN><END>\grq</END></SPAN>
- <SPAN TYPE="LITERAL1"><BEGIN>\flqq</BEGIN><END>\frqq</END></SPAN>
- <SPAN TYPE="LITERAL1"><BEGIN>\flq</BEGIN><END>\frq</END></SPAN>
-
- <!-- environment delimeters: \begin{...} ... \end{...} -->
- <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD1"
- >(.begin\{([\p{Alnum}|@|\*]*)\})</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD1"
- >(.end\{([\p{Alnum}|@|\*]*)\})</SEQ_REGEXP>
-
- <!-- \... commands -->
- <MARK_FOLLOWING TYPE="KEYWORD2">\</MARK_FOLLOWING>
-
- <!-- group delimeters -->
- <SEQ TYPE="KEYWORD4">{</SEQ>
- <SEQ TYPE="KEYWORD4">}</SEQ>
- <SEQ TYPE="KEYWORD4">[</SEQ>
- <SEQ TYPE="KEYWORD4">]</SEQ>
- </RULES>
-
- <!-- math rules -->
- <RULES
- SET="MathRules"
- DEFAULT="LITERAL2"
- IGNORE_CASE="FALSE"
- NO_WORD_SEP="@:"
- HIGHLIGHT_DIGITS="FALSE">
-
- <!-- labels -->
- <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
- <BEGIN>\label{</BEGIN><END>}</END>
- </SPAN>
-
- <!-- escaped characters which are treated as normal text -->
- <SEQ TYPE="LITERAL2">\&</SEQ>
- <SEQ TYPE="LITERAL2">\$</SEQ>
- <SEQ TYPE="LITERAL2">\%</SEQ>
-
- <!-- special tokens: macro parameter, linebreak, alignment tab -->
- <SEQ_REGEXP TYPE="DIGIT">#[1-9]</SEQ_REGEXP>
- <SEQ TYPE="KEYWORD3">\\</SEQ>
- <SEQ TYPE="KEYWORD3">&</SEQ>
-
- <!-- labels -->
- <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="KEYWORD4"
- >\label{</MARK_FOLLOWING>
-
- <!-- comments -->
- <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
- </RULES>
-
- <!-- verbatim rules -->
- <RULES SET="VerbatimRules" DEFAULT="LITERAL3" />
-
- <!-- label rules -->
- <RULES SET="LabelRules" DEFAULT="LABEL" />
-
-</MODE>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- jEdit LaTeX mode
+ written by: Michael Schlotter, m.schlotter at bath.ac.uk
+ latex.xml, v1.4.2, 26 November 2009
+
+ Suggested catalog entry:
+ <MODE NAME="latex" FILE="latex.xml"
+ FILE_NAME_GLOB="*.{tex,ltx,latex,sty,cls}" />
+-->
+
+<MODE>
+ <PROPS>
+ <!-- comments, word separators -->
+ <PROPERTY NAME="lineComment" VALUE="%" />
+ <PROPERTY NAME="wordBreakChars" VALUE="" />
+ <PROPERTY NAME="noWordSep" VALUE="\@_-:*<>" />
+
+ <!-- indenting -->
+ <PROPERTY NAME="deepIndent" VALUE="FALSE" />
+ <PROPERTY NAME="doubleBracketIndent" VALUE="FALSE" />
+ <PROPERTY NAME="lineUpClosingBrackets" VALUE="FALSE" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{[" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="]}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLines" VALUE="^.*(\\begin\s*\{.*)$" />
+ <PROPERTY NAME="unindentThisLine" VALUE="^[ \t]*(\\item.*|\\end\s*\{.*)$" />
+ <PROPERTY NAME="unindentNextLines" VALUE="^.*(\\end\s*\{.*)$" />
+ <PROPERTY NAME="electricKeys"
+ VALUE="{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" />
+ </PROPS>
+
+ <!-- default rules -->
+ <RULES
+ IGNORE_CASE="FALSE"
+ NO_WORD_SEP="@_-:*"
+ HIGHLIGHT_DIGITS="FALSE">
+
+ <!-- \verb|sometext|; any delimeter except * can be used -->
+ <SPAN_REGEXP TYPE="KEYWORD2" DELEGATE="VerbatimRules"
+ HASH_CHAR="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>.verb[\*]?([\p{Punct}&&[^*]])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- verbatim environments -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="VerbatimRules">
+ <BEGIN>\begin{verbatim*}</BEGIN><END>\end{verbatim*}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="VerbatimRules">
+ <BEGIN>\begin{verbatim}</BEGIN><END>\end{verbatim}</END>
+ </SPAN>
+
+ <!-- mathematical environments, including AMS definitions -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>$$</BEGIN><END>$$</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>$</BEGIN><END>$</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\(</BEGIN><END>\)</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\[</BEGIN><END>\]</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{math}</BEGIN><END>\end{math}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{displaymath}</BEGIN><END>\end{displaymath}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{equation*}</BEGIN><END>\end{equation*}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{equation}</BEGIN><END>\end{equation}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{eqnarray*}</BEGIN><END>\end{eqnarray*}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{eqnarray}</BEGIN><END>\end{eqnarray}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{align*}</BEGIN><END>\end{align*}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{align}</BEGIN><END>\end{align}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{alignat*}</BEGIN><END>\end{alignat*}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{alignat}</BEGIN><END>\end{alignat}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{flalign*}</BEGIN><END>\end{flalign*}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{flalign}</BEGIN><END>\end{flalign}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{gather*}</BEGIN><END>\end{gather*}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{gather}</BEGIN><END>\end{gather}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{multline*}</BEGIN><END>\end{multline*}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
+ <BEGIN>\begin{multline}</BEGIN><END>\end{multline}</END>
+ </SPAN>
+
+ <!-- labels - includes all commands ending with `ref' and `*ref' -->
+ <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
+ <BEGIN>\label{</BEGIN><END>}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
+ <BEGIN>\cite{</BEGIN><END>}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
+ <BEGIN>\hyperlink{</BEGIN><END>}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
+ <BEGIN>\hypertarget{</BEGIN><END>}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
+ <BEGIN>\url{</BEGIN><END>}</END>
+ </SPAN>
+ <SPAN_REGEXP TYPE="KEYWORD4" DELEGATE="LabelRules"
+ HASH_CHAR="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>.[\p{Alnum}]*ref[\*]?\{</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+
+ <!-- escaped characters which are treated as normal text -->
+ <SEQ TYPE="NULL">\&</SEQ>
+ <SEQ TYPE="NULL">\$</SEQ>
+ <SEQ TYPE="NULL">\%</SEQ>
+ <SEQ TYPE="NULL">\#</SEQ>
+ <SEQ TYPE="NULL">\_</SEQ>
+ <SEQ TYPE="NULL">\{</SEQ>
+ <SEQ TYPE="NULL">\}</SEQ>
+
+ <!-- tabbing tokens (or accents, depending on environment) -->
+ <SEQ TYPE="KEYWORD2">\=</SEQ>
+ <SEQ TYPE="KEYWORD2">\></SEQ>
+ <SEQ TYPE="KEYWORD2">\<</SEQ>
+ <SEQ TYPE="KEYWORD2">\+</SEQ>
+ <SEQ TYPE="KEYWORD2">\-</SEQ>
+ <SEQ TYPE="KEYWORD2">\'</SEQ>
+ <SEQ TYPE="KEYWORD2">\`</SEQ>
+
+ <!-- more accents incl. those specific to tabbing environment -->
+ <SEQ TYPE="KEYWORD2">\^</SEQ>
+ <SEQ TYPE="KEYWORD2">\"</SEQ>
+ <SEQ TYPE="KEYWORD2">\~</SEQ>
+ <SEQ TYPE="KEYWORD2">\.</SEQ>
+ <SEQ TYPE="KEYWORD2">\a'</SEQ>
+ <SEQ TYPE="KEYWORD2">\a`</SEQ>
+ <SEQ TYPE="KEYWORD2">\a=</SEQ>
+
+ <!-- special tokens: macro parameter, linebreak, alignment tab -->
+ <SEQ_REGEXP TYPE="DIGIT">#[1-9]</SEQ_REGEXP>
+ <SEQ TYPE="KEYWORD3">\\</SEQ>
+ <SEQ TYPE="KEYWORD3">&</SEQ>
+
+ <!-- comments -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>\iffalse</BEGIN><END>\fi</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+
+ <!-- quotes, including those defined by package `(n)german' -->
+ <SPAN TYPE="LITERAL1"><BEGIN>``</BEGIN><END>''</END></SPAN>
+ <SPAN TYPE="LITERAL1"><BEGIN>"`</BEGIN><END>"'</END></SPAN>
+ <SPAN TYPE="LITERAL1"><BEGIN>"<</BEGIN><END>"></END></SPAN>
+ <SPAN TYPE="LITERAL1"><BEGIN>\glqq</BEGIN><END>\grqq</END></SPAN>
+ <SPAN TYPE="LITERAL1"><BEGIN>\glq</BEGIN><END>\grq</END></SPAN>
+ <SPAN TYPE="LITERAL1"><BEGIN>\flqq</BEGIN><END>\frqq</END></SPAN>
+ <SPAN TYPE="LITERAL1"><BEGIN>\flq</BEGIN><END>\frq</END></SPAN>
+
+ <!-- environment delimeters: \begin{...} ... \end{...} -->
+ <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD1"
+ >(.begin\{([\p{Alnum}|@|\*]*)\})</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD1"
+ >(.end\{([\p{Alnum}|@|\*]*)\})</SEQ_REGEXP>
+
+ <!-- \... commands -->
+ <MARK_FOLLOWING TYPE="KEYWORD2">\</MARK_FOLLOWING>
+
+ <!-- group delimeters -->
+ <SEQ TYPE="KEYWORD4">{</SEQ>
+ <SEQ TYPE="KEYWORD4">}</SEQ>
+ <SEQ TYPE="KEYWORD4">[</SEQ>
+ <SEQ TYPE="KEYWORD4">]</SEQ>
+ </RULES>
+
+ <!-- math rules -->
+ <RULES
+ SET="MathRules"
+ DEFAULT="LITERAL2"
+ IGNORE_CASE="FALSE"
+ NO_WORD_SEP="@:"
+ HIGHLIGHT_DIGITS="FALSE">
+
+ <!-- labels -->
+ <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
+ <BEGIN>\label{</BEGIN><END>}</END>
+ </SPAN>
+
+ <!-- escaped characters which are treated as normal text -->
+ <SEQ TYPE="LITERAL2">\&</SEQ>
+ <SEQ TYPE="LITERAL2">\$</SEQ>
+ <SEQ TYPE="LITERAL2">\%</SEQ>
+
+ <!-- special tokens: macro parameter, linebreak, alignment tab -->
+ <SEQ_REGEXP TYPE="DIGIT">#[1-9]</SEQ_REGEXP>
+ <SEQ TYPE="KEYWORD3">\\</SEQ>
+ <SEQ TYPE="KEYWORD3">&</SEQ>
+
+ <!-- labels -->
+ <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="KEYWORD4">\label{</MARK_FOLLOWING>
+
+ <!-- comments -->
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+ </RULES>
+
+ <!-- verbatim rules -->
+ <RULES SET="VerbatimRules" DEFAULT="LITERAL3" />
+
+ <!-- label rules -->
+ <RULES SET="LabelRules" DEFAULT="LABEL" />
+
+</MODE>
+
diff --git a/jEdit/modes/lilypond.xml b/jEdit/modes/lilypond.xml
index 6203a24..6ae5295 100644
--- a/jEdit/modes/lilypond.xml
+++ b/jEdit/modes/lilypond.xml
@@ -1,2678 +1,2681 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- LilyPond (www.lilypond.org) mode by Bertalan Fodor <lilypondtool at organum.hu> & others at http://lily4jedit.sf.net
- Requires jEdit 4.3pre6 or compatible
-Recommended jEdit/modes/catalog entry:
- <MODE NAME="lilypond" FILE="lilypond.xml"
- FILE_NAME_GLOB="*.ly" />
-
--->
-
-<MODE>
-<PROPS>
- <PROPERTY NAME="commentStart" VALUE="%{" />
- <PROPERTY NAME="commentEnd" VALUE="%}" />
- <PROPERTY NAME="lineComment" VALUE="%" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="wordBreakChars" VALUE="=" />
-</PROPS>
-
-<RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE">
-
- <SPAN TYPE="COMMENT2" NO_LINE_BREAK="FALSE">
- <BEGIN>%{</BEGIN><END>%}</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SEQ TYPE="DIGIT">\breve</SEQ>
- <SEQ TYPE="DIGIT">\longa</SEQ>
- <SEQ TYPE="DIGIT">\maxima</SEQ>
- <MARK_PREVIOUS TYPE="FUNCTION" AT_WHITESPACE_END="TRUE">=</MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="FUNCTION" AT_WHITESPACE_END="TRUE"> =</MARK_PREVIOUS>
- <SEQ TYPE="MARKUP">{</SEQ>
- <SEQ TYPE="MARKUP">}</SEQ>
- <SEQ TYPE="MARKUP">[</SEQ>
- <SEQ TYPE="MARKUP">]</SEQ>
- <SEQ TYPE="MARKUP"><<</SEQ>
- <SEQ TYPE="MARKUP">>></SEQ>
- <SEQ TYPE="NULL">-<</SEQ>
- <SEQ TYPE="NULL">-></SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ_REGEXP HASH_CHAR=""" TYPE = "LITERAL1">"(\\"|[^\\"]|\\)+"</SEQ_REGEXP>
- <SPAN TYPE="LITERAL1"><BEGIN>"</BEGIN><END>"</END></SPAN>
-
-<!-- Less can be more: Notes are simple black.
- Now digits are highlighted.
- Octave jumps now are as highlighted as markup. -->
-
- <!--octave-->
- <SEQ TYPE="MARKUP">'</SEQ>
- <SEQ TYPE="MARKUP">,</SEQ>
-
- <!-- rests and skip -->
-
- <SEQ_REGEXP TYPE="LITERAL4" AT_WORD_START="TRUE" HASH_CHARS="rRs">[rRs]\d*\b</SEQ_REGEXP>
-
- <SEQ_REGEXP TYPE="DIGIT" AT_WORD_START="FALSE" HASH_CHARS="1234567890">\d+\b</SEQ_REGEXP>
-
- <MARK_FOLLOWING TYPE="FUNCTION">ly:</MARK_FOLLOWING>
-
-<!-- Generated part follows -->
-<!-- internal commands -->
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\override">\\override\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\version">\\version\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\include">\\include\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\invalid">\\invalid\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\addquote">\\addquote\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\alternative">\\alternative\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\book">\\book\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\~">\\~\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\mark">\\mark\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\default">\\default\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\key">\\key\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\skip">\\skip\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\octave">\\octave\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\partial">\\partial\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\time">\\time\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\change">\\change\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\consists">\\consists\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\remove">\\remove\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\accepts">\\accepts\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\defaultchild">\\defaultchild\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\denies">\\denies\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\alias">\\alias\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\type">\\type\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\description">\\description\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\name">\\name\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\context">\\context\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\grobdescriptions">\\grobdescriptions\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\markup">\\markup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\header">\\header\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\notemode">\\notemode\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\drummode">\\drummode\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\figuremode">\\figuremode\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\chordmode">\\chordmode\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\lyricmode">\\lyricmode\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\drums">\\drums\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\figures">\\figures\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\chords">\\chords\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\lyrics">\\lyrics\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\once">\\once\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\revert">\\revert\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\set">\\set\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\unset">\\unset\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\addlyrics">\\addlyrics\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\objectid">\\objectid\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\with">\\with\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\rest">\\rest\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\paper">\\paper\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\midi">\\midi\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\layout">\\layout\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\new">\\new\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\times">\\times\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\transpose">\\transpose\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\tag">\\tag\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\relative">\\relative\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\renameinput">\\renameinput\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\repeat">\\repeat\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\lyricsto">\\lyricsto\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\score">\\score\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\sequential">\\sequential\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\simultaneous">\\simultaneous\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\longa">\\longa\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\breve">\\breve\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\maxima">\\maxima\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\tempo">\\tempo\b</SEQ_REGEXP>
-<!-- identifiers -->
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\AncientRemoveEmptyStaffContext">\\AncientRemoveEmptyStaffContext\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\RemoveEmptyRhythmicStaffContext">\\RemoveEmptyRhythmicStaffContext\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\RemoveEmptyStaffContext">\\RemoveEmptyStaffContext\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\accent">\\accent\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\aeolian">\\aeolian\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\afterGraceFraction">\\afterGraceFraction\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\aikenHeads">\\aikenHeads\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggio">\\arpeggio\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioArrowDown">\\arpeggioArrowDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioArrowUp">\\arpeggioArrowUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioBracket">\\arpeggioBracket\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioNormal">\\arpeggioNormal\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioParenthesis">\\arpeggioParenthesis\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\autoBeamOff">\\autoBeamOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\autoBeamOn">\\autoBeamOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\balloonLengthOff">\\balloonLengthOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\balloonLengthOn">\\balloonLengthOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureExtendersOff">\\bassFigureExtendersOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureExtendersOn">\\bassFigureExtendersOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureStaffAlignmentDown">\\bassFigureStaffAlignmentDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureStaffAlignmentNeutral">\\bassFigureStaffAlignmentNeutral\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureStaffAlignmentUp">\\bassFigureStaffAlignmentUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\between-system-padding">\\between-system-padding\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\between-system-space">\\between-system-space\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bigger">\\bigger\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\blackTriangleMarkup">\\blackTriangleMarkup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bookTitleMarkup">\\bookTitleMarkup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bracketCloseSymbol">\\bracketCloseSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bracketOpenSymbol">\\bracketOpenSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\break">\\break\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\breve">\\breve\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cadenzaOff">\\cadenzaOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cadenzaOn">\\cadenzaOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\center">\\center\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\chordmodifiers">\\chordmodifiers\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cm">\\cm\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\coda">\\coda\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\compressFullBarRests">\\compressFullBarRests\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cr">\\cr\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cresc">\\cresc\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\crescHairpin">\\crescHairpin\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\crescTextCresc">\\crescTextCresc\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\decr">\\decr\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\defaultTimeSignature">\\defaultTimeSignature\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dim">\\dim\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dimHairpin">\\dimHairpin\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dimTextDecr">\\dimTextDecr\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dimTextDecresc">\\dimTextDecresc\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dimTextDim">\\dimTextDim\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dorian">\\dorian\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dotsDown">\\dotsDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dotsNeutral">\\dotsNeutral\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dotsUp">\\dotsUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\down">\\down\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\downbow">\\downbow\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\downmordent">\\downmordent\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\downprall">\\downprall\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\drumPitchNames">\\drumPitchNames\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dutchPitchnames">\\dutchPitchnames\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dynamicDown">\\dynamicDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dynamicNeutral">\\dynamicNeutral\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dynamicUp">\\dynamicUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\easyHeadsOff">\\easyHeadsOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\easyHeadsOn">\\easyHeadsOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\endcr">\\endcr\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\endcresc">\\endcresc\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\enddecr">\\enddecr\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\enddim">\\enddim\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\endincipit">\\endincipit\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedBiggerSymbol">\\escapedBiggerSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedExclamationSymbol">\\escapedExclamationSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedParenthesisCloseSymbol">\\escapedParenthesisCloseSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedParenthesisOpenSymbol">\\escapedParenthesisOpenSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedSmallerSymbol">\\escapedSmallerSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\espressivo">\\espressivo\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\evenHeaderMarkup">\\evenHeaderMarkup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\expandFullBarRests">\\expandFullBarRests\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\f">\\f\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fermata">\\fermata\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fermataMarkup">\\fermataMarkup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ff">\\ff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fff">\\fff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ffff">\\ffff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\first-page-number">\\first-page-number\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\flageolet">\\flageolet\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fp">\\fp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\frenchChords">\\frenchChords\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fullJazzExceptions">\\fullJazzExceptions\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fz">\\fz\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\germanChords">\\germanChords\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\glissando">\\glissando\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\harmonic">\\harmonic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\hideNotes">\\hideNotes\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\hideStaffSwitch">\\hideStaffSwitch\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\huge">\\huge\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ignatzekExceptionMusic">\\ignatzekExceptionMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ignatzekExceptions">\\ignatzekExceptions\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\improvisationOff">\\improvisationOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\improvisationOn">\\improvisationOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\in">\\in\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\instrument-definitions">\\instrument-definitions\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ionian">\\ionian\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\italianChords">\\italianChords\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\laissezVibrer">\\laissezVibrer\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\large">\\large\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\left">\\left\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\lheel">\\lheel\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\lineprall">\\lineprall\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\locrian">\\locrian\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\longa">\\longa\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\longfermata">\\longfermata\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ltoe">\\ltoe\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\lydian">\\lydian\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\major">\\major\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\marcato">\\marcato\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\maxima">\\maxima\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\melisma">\\melisma\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\melismaEnd">\\melismaEnd\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mergeDifferentlyDottedOff">\\mergeDifferentlyDottedOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mergeDifferentlyDottedOn">\\mergeDifferentlyDottedOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mergeDifferentlyHeadedOff">\\mergeDifferentlyHeadedOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mergeDifferentlyHeadedOn">\\mergeDifferentlyHeadedOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mf">\\mf\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\midiDrumPitches">\\midiDrumPitches\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\minor">\\minor\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mixolydian">\\mixolydian\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mm">\\mm\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mordent">\\mordent\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mp">\\mp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\newSpacingSection">\\newSpacingSection\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\noBeam">\\noBeam\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\noBreak">\\noBreak\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\normalsize">\\normalsize\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\numericTimeSignature">\\numericTimeSignature\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\oddFooterMarkup">\\oddFooterMarkup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\oddHeaderMarkup">\\oddHeaderMarkup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\oneVoice">\\oneVoice\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\open">\\open\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\output-scale">\\output-scale\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\p">\\p\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\page-limit-inter-system-space">\\page-limit-inter-system-space\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\page-top-space">\\page-top-space\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\parenthesisCloseSymbol">\\parenthesisCloseSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\parenthesisOpenSymbol">\\parenthesisOpenSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\partialJazzExceptions">\\partialJazzExceptions\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\partialJazzMusic">\\partialJazzMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurDashed">\\phrasingSlurDashed\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurDotted">\\phrasingSlurDotted\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurDown">\\phrasingSlurDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurNeutral">\\phrasingSlurNeutral\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurSolid">\\phrasingSlurSolid\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurUp">\\phrasingSlurUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrygian">\\phrygian\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pipeSymbol">\\pipeSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pitchnames">\\pitchnames\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\portato">\\portato\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pp">\\pp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ppp">\\ppp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pppp">\\pppp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ppppp">\\ppppp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\prall">\\prall\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pralldown">\\pralldown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\prallmordent">\\prallmordent\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\prallprall">\\prallprall\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\prallup">\\prallup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\predefinedFretboardsOff">\\predefinedFretboardsOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\predefinedFretboardsOn">\\predefinedFretboardsOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\print-first-page-number">\\print-first-page-number\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\print-page-number">\\print-page-number\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pt">\\pt\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ragged-bottom">\\ragged-bottom\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ragged-last-bottom">\\ragged-last-bottom\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\repeatTie">\\repeatTie\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\reverseturn">\\reverseturn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\rfz">\\rfz\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\rheel">\\rheel\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\right">\\right\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\rtoe">\\rtoe\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sacredHarpHeads">\\sacredHarpHeads\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\scoreTitleMarkup">\\scoreTitleMarkup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\segno">\\segno\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\semiGermanChords">\\semiGermanChords\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\setDefaultDurationToQuarter">\\setDefaultDurationToQuarter\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sf">\\sf\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sff">\\sff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sfp">\\sfp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sfz">\\sfz\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftOff">\\shiftOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftOn">\\shiftOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftOnn">\\shiftOnn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftOnnn">\\shiftOnnn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shortfermata">\\shortfermata\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\showStaffSwitch">\\showStaffSwitch\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\signumcongruentiae">\\signumcongruentiae\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slashSeparator">\\slashSeparator\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurDashed">\\slurDashed\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurDotted">\\slurDotted\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurDown">\\slurDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurNeutral">\\slurNeutral\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurSolid">\\slurSolid\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurUp">\\slurUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\small">\\small\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\smaller">\\smaller\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sostenutoOff">\\sostenutoOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sostenutoOn">\\sostenutoOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sp">\\sp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\spp">\\spp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\staccatissimo">\\staccatissimo\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\staccato">\\staccato\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\start">\\start\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startAcciaccaturaMusic">\\startAcciaccaturaMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startAppoggiaturaMusic">\\startAppoggiaturaMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startGraceMusic">\\startGraceMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startGroup">\\startGroup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startStaff">\\startStaff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startTextSpan">\\startTextSpan\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startTrillSpan">\\startTrillSpan\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stemDown">\\stemDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stemNeutral">\\stemNeutral\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stemUp">\\stemUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stop">\\stop\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopAcciaccaturaMusic">\\stopAcciaccaturaMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopAppoggiaturaMusic">\\stopAppoggiaturaMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopGraceMusic">\\stopGraceMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopGroup">\\stopGroup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopStaff">\\stopStaff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopTextSpan">\\stopTextSpan\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopTrillSpan">\\stopTrillSpan\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopped">\\stopped\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sustainOff">\\sustainOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sustainOn">\\sustainOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tagline">\\tagline\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\teeny">\\teeny\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tenuto">\\tenuto\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textLengthOff">\\textLengthOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textLengthOn">\\textLengthOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textSpannerDown">\\textSpannerDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textSpannerNeutral">\\textSpannerNeutral\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textSpannerUp">\\textSpannerUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\thumb">\\thumb\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieDashed">\\tieDashed\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieDotted">\\tieDotted\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieDown">\\tieDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieNeutral">\\tieNeutral\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieSolid">\\tieSolid\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieUp">\\tieUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tildeSymbol">\\tildeSymbol\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tiny">\\tiny\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tocItemMarkup">\\tocItemMarkup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tocTitleMarkup">\\tocTitleMarkup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\treCorde">\\treCorde\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\trill">\\trill\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tupletDown">\\tupletDown\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tupletNeutral">\\tupletNeutral\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tupletUp">\\tupletUp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\turn">\\turn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\unHideNotes">\\unHideNotes\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\unaCorda">\\unaCorda\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\unit">\\unit\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\up">\\up\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\upbow">\\upbow\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\upmordent">\\upmordent\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\upprall">\\upprall\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\varcoda">\\varcoda\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\verylongfermata">\\verylongfermata\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceFour">\\voiceFour\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceFourStyle">\\voiceFourStyle\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceNeutralStyle">\\voiceNeutralStyle\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceOne">\\voiceOne\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceOneStyle">\\voiceOneStyle\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceThree">\\voiceThree\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceThreeStyle">\\voiceThreeStyle\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceTwo">\\voiceTwo\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceTwoStyle">\\voiceTwoStyle\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\whiteTriangleMarkup">\\whiteTriangleMarkup\b</SEQ_REGEXP>
-<!-- music functions -->
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\acciaccatura">\\acciaccatura\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\addChordShape">\\addChordShape\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\addInstrumentDefinition">\\addInstrumentDefinition\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\addQuote">\\addQuote\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\afterGrace">\\afterGrace\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\allowPageTurn">\\allowPageTurn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\applyContext">\\applyContext\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\applyMusic">\\applyMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\applyOutput">\\applyOutput\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\appoggiatura">\\appoggiatura\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\assertBeamQuant">\\assertBeamQuant\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\assertBeamSlope">\\assertBeamSlope\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\autochange">\\autochange\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\balloonGrobText">\\balloonGrobText\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\balloonText">\\balloonText\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bar">\\bar\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\barNumberCheck">\\barNumberCheck\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bendAfter">\\bendAfter\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\breathe">\\breathe\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\clef">\\clef\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cueDuring">\\cueDuring\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\displayLilyMusic">\\displayLilyMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\displayMusic">\\displayMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\endSpanners">\\endSpanners\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\featherDurations">\\featherDurations\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\grace">\\grace\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\includePageLayoutFile">\\includePageLayoutFile\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\instrumentSwitch">\\instrumentSwitch\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\keepWithTag">\\keepWithTag\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\killCues">\\killCues\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\label">\\label\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\makeClusters">\\makeClusters\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\musicMap">\\musicMap\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\noPageBreak">\\noPageBreak\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\noPageTurn">\\noPageTurn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\octaveCheck">\\octaveCheck\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\oldaddlyrics">\\oldaddlyrics\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ottava">\\ottava\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\overrideProperty">\\overrideProperty\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pageBreak">\\pageBreak\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pageTurn">\\pageTurn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\parallelMusic">\\parallelMusic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\parenthesize">\\parenthesize\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\partcombine">\\partcombine\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pitchedTrill">\\pitchedTrill\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pointAndClickOff">\\pointAndClickOff\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pointAndClickOn">\\pointAndClickOn\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\quoteDuring">\\quoteDuring\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\removeWithTag">\\removeWithTag\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\resetRelativeOctave">\\resetRelativeOctave\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\rightHandFinger">\\rightHandFinger\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\scaleDurations">\\scaleDurations\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\scoreTweak">\\scoreTweak\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftDurations">\\shiftDurations\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\spacingTweaks">\\spacingTweaks\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\storePredefinedDiagram">\\storePredefinedDiagram\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tag">\\tag\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tocItem">\\tocItem\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\transposedCueDuring">\\transposedCueDuring\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\transposition">\\transposition\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tweak">\\tweak\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\unfoldRepeats">\\unfoldRepeats\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\withMusicProperty">\\withMusicProperty\b</SEQ_REGEXP>
-<!-- markup commands -->
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\abs-fontsize">\\abs-fontsize\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\arrow-head">\\arrow-head\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\backslashed-digit">\\backslashed-digit\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\beam">\\beam\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\bold">\\bold\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\box">\\box\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\bracket">\\bracket\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\caps">\\caps\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\center-align">\\center-align\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\center-column">\\center-column\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\char">\\char\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\circle">\\circle\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\column">\\column\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\combine">\\combine\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\concat">\\concat\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\dir-column">\\dir-column\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\doubleflat">\\doubleflat\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\doublesharp">\\doublesharp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\draw-circle">\\draw-circle\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\draw-line">\\draw-line\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\dynamic">\\dynamic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\epsfile">\\epsfile\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fill-line">\\fill-line\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\filled-box">\\filled-box\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\finger">\\finger\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\flat">\\flat\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fontCaps">\\fontCaps\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fontsize">\\fontsize\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fraction">\\fraction\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fret-diagram">\\fret-diagram\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fret-diagram-terse">\\fret-diagram-terse\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fret-diagram-verbose">\\fret-diagram-verbose\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fromproperty">\\fromproperty\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\general-align">\\general-align\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\halign">\\halign\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\harp-pedal">\\harp-pedal\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\hbracket">\\hbracket\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\hcenter-in">\\hcenter-in\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\hspace">\\hspace\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\huge">\\huge\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\italic">\\italic\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\justify">\\justify\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\justify-field">\\justify-field\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\justify-string">\\justify-string\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\large">\\large\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\larger">\\larger\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\left-align">\\left-align\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\left-column">\\left-column\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\line">\\line\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\lookup">\\lookup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\lower">\\lower\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\magnify">\\magnify\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\markalphabet">\\markalphabet\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\markletter">\\markletter\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\medium">\\medium\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\musicglyph">\\musicglyph\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\natural">\\natural\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\normal-size-sub">\\normal-size-sub\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\normal-size-super">\\normal-size-super\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\normal-text">\\normal-text\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\normalsize">\\normalsize\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\note">\\note\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\note-by-number">\\note-by-number\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\null">\\null\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\number">\\number\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\on-the-fly">\\on-the-fly\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\override">\\override\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\pad-around">\\pad-around\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\pad-markup">\\pad-markup\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\pad-to-box">\\pad-to-box\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\pad-x">\\pad-x\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\page-ref">\\page-ref\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\postscript">\\postscript\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\put-adjacent">\\put-adjacent\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\raise">\\raise\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\right-align">\\right-align\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\right-column">\\right-column\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\roman">\\roman\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\rotate">\\rotate\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\rounded-box">\\rounded-box\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sans">\\sans\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\score">\\score\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\semiflat">\\semiflat\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\semisharp">\\semisharp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sesquiflat">\\sesquiflat\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sesquisharp">\\sesquisharp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sharp">\\sharp\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\simple">\\simple\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\slashed-digit">\\slashed-digit\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\small">\\small\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\smallCaps">\\smallCaps\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\smaller">\\smaller\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\stencil">\\stencil\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\strut">\\strut\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sub">\\sub\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\super">\\super\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\teeny">\\teeny\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\text">\\text\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\tied-lyric">\\tied-lyric\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\tiny">\\tiny\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\translate">\\translate\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\translate-scaled">\\translate-scaled\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\transparent">\\transparent\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\triangle">\\triangle\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\typewriter">\\typewriter\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\underline">\\underline\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\upright">\\upright\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\vcenter">\\vcenter\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\verbatim-file">\\verbatim-file\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\whiteout">\\whiteout\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\with-color">\\with-color\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\with-dimensions">\\with-dimensions\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\with-url">\\with-url\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\wordwrap">\\wordwrap\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\wordwrap-field">\\wordwrap-field\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\wordwrap-string">\\wordwrap-string\b</SEQ_REGEXP>
-<MARK_FOLLOWING TYPE="FUNCTION">\</MARK_FOLLOWING>
-<KEYWORDS>
- <KEYWORD2>Forbid_line_break_engraver</KEYWORD2>
- <KEYWORD2>staff-symbol-referencer-interface</KEYWORD2>
- <KEYWORD2>clef-interface</KEYWORD2>
- <KEYWORD2>note-name-interface</KEYWORD2>
- <KEYWORD2>lyric-extender-interface</KEYWORD2>
- <KEYWORD2>mensural-ligature-interface</KEYWORD2>
- <KEYWORD2>Multi_measure_rest_engraver</KEYWORD2>
- <KEYWORD2>bass-figure-alignment-interface</KEYWORD2>
- <KEYWORD2>Slur_engraver</KEYWORD2>
- <KEYWORD2>Completion_heads_engraver</KEYWORD2>
- <KEYWORD2>rhythmic-grob-interface</KEYWORD2>
- <KEYWORD2>span-bar-interface</KEYWORD2>
- <KEYWORD2>Drum_note_performer</KEYWORD2>
- <KEYWORD2>InnerChoirStaff</KEYWORD2>
- <KEYWORD2>Score</KEYWORD2>
- <KEYWORD2>Bar_engraver</KEYWORD2>
- <KEYWORD2>Breathing_sign_engraver</KEYWORD2>
- <KEYWORD2>Staff</KEYWORD2>
- <KEYWORD2>spanner-interface</KEYWORD2>
- <KEYWORD2>Ligature_bracket_engraver</KEYWORD2>
- <KEYWORD2>Chord_name_engraver</KEYWORD2>
- <KEYWORD2>accidental-placement-interface</KEYWORD2>
- <KEYWORD2>Span_arpeggio_engraver</KEYWORD2>
- <KEYWORD2>MensuralVoice</KEYWORD2>
- <KEYWORD2>Stanza_number_engraver</KEYWORD2>
- <KEYWORD2>Grace_engraver</KEYWORD2>
- <KEYWORD2>Grace_beam_engraver</KEYWORD2>
- <KEYWORD2>script-interface</KEYWORD2>
- <KEYWORD2>Time_signature_engraver</KEYWORD2>
- <KEYWORD2>Stanza_number_align_engraver</KEYWORD2>
- <KEYWORD2>GregorianTranscriptionStaff</KEYWORD2>
- <KEYWORD2>Key_engraver</KEYWORD2>
- <KEYWORD2>cluster-beacon-interface</KEYWORD2>
- <KEYWORD2>TabVoice</KEYWORD2>
- <KEYWORD2>Dynamic_engraver</KEYWORD2>
- <KEYWORD2>rhythmic-head-interface</KEYWORD2>
- <KEYWORD2>Repeat_acknowledge_engraver</KEYWORD2>
- <KEYWORD2>dynamic-interface</KEYWORD2>
- <KEYWORD2>volta-bracket-interface</KEYWORD2>
- <KEYWORD2>bar-line-interface</KEYWORD2>
- <KEYWORD2>piano-pedal-interface</KEYWORD2>
- <KEYWORD2>font-interface</KEYWORD2>
- <KEYWORD2>VaticanaVoice</KEYWORD2>
- <KEYWORD2>staff-spacing-interface</KEYWORD2>
- <KEYWORD2>tie-interface</KEYWORD2>
- <KEYWORD2>Devnull</KEYWORD2>
- <KEYWORD2>dynamic-text-spanner-interface</KEYWORD2>
- <KEYWORD2>Script_row_engraver</KEYWORD2>
- <KEYWORD2>Stem_engraver</KEYWORD2>
- <KEYWORD2>grid-line-interface</KEYWORD2>
- <KEYWORD2>grob-interface</KEYWORD2>
- <KEYWORD2>custos-interface</KEYWORD2>
- <KEYWORD2>Font_size_engraver</KEYWORD2>
- <KEYWORD2>trill-pitch-accidental-interface</KEYWORD2>
- <KEYWORD2>Clef_engraver</KEYWORD2>
- <KEYWORD2>Text_engraver</KEYWORD2>
- <KEYWORD2>dynamic-line-spanner-interface</KEYWORD2>
- <KEYWORD2>Repeat_tie_engraver</KEYWORD2>
- <KEYWORD2>tablature-interface</KEYWORD2>
- <KEYWORD2>staff-symbol-interface</KEYWORD2>
- <KEYWORD2>rest-collision-interface</KEYWORD2>
- <KEYWORD2>Horizontal_bracket_engraver</KEYWORD2>
- <KEYWORD2>accidental-suggestion-interface</KEYWORD2>
- <KEYWORD2>Beam_performer</KEYWORD2>
- <KEYWORD2>Lyric_performer</KEYWORD2>
- <KEYWORD2>Piano_pedal_engraver</KEYWORD2>
- <KEYWORD2>vaticana-ligature-interface</KEYWORD2>
- <KEYWORD2>Tab_note_heads_engraver</KEYWORD2>
- <KEYWORD2>text-interface</KEYWORD2>
- <KEYWORD2>break-alignable-interface</KEYWORD2>
- <KEYWORD2>lyric-hyphen-interface</KEYWORD2>
- <KEYWORD2>grace-spacing-interface</KEYWORD2>
- <KEYWORD2>note-column-interface</KEYWORD2>
- <KEYWORD2>Vertical_align_engraver</KEYWORD2>
- <KEYWORD2>break-aligned-interface</KEYWORD2>
- <KEYWORD2>Staff_performer</KEYWORD2>
- <KEYWORD2>Ledger_line_engraver</KEYWORD2>
- <KEYWORD2>rest-interface</KEYWORD2>
- <KEYWORD2>Fingering_engraver</KEYWORD2>
- <KEYWORD2>figured-bass-continuation-interface</KEYWORD2>
- <KEYWORD2>metronome-mark-interface</KEYWORD2>
- <KEYWORD2>Key_performer</KEYWORD2>
- <KEYWORD2>Separating_line_group_engraver</KEYWORD2>
- <KEYWORD2>bend-after-interface</KEYWORD2>
- <KEYWORD2>DrumStaff</KEYWORD2>
- <KEYWORD2>unbreakable-spanner-interface</KEYWORD2>
- <KEYWORD2>trill-spanner-interface</KEYWORD2>
- <KEYWORD2>Grace_spacing_engraver</KEYWORD2>
- <KEYWORD2>Ambitus_engraver</KEYWORD2>
- <KEYWORD2>system-interface</KEYWORD2>
- <KEYWORD2>Swallow_engraver</KEYWORD2>
- <KEYWORD2>Cluster_spanner_engraver</KEYWORD2>
- <KEYWORD2>fret-diagram-interface</KEYWORD2>
- <KEYWORD2>gregorian-ligature-interface</KEYWORD2>
- <KEYWORD2>dots-interface</KEYWORD2>
- <KEYWORD2>percent-repeat-item-interface</KEYWORD2>
- <KEYWORD2>Time_signature_performer</KEYWORD2>
- <KEYWORD2>semi-tie-column-interface</KEYWORD2>
- <KEYWORD2>spacing-spanner-interface</KEYWORD2>
- <KEYWORD2>Staff_symbol_engraver</KEYWORD2>
- <KEYWORD2>mark-interface</KEYWORD2>
- <KEYWORD2>accidental-interface</KEYWORD2>
- <KEYWORD2>Text_spanner_engraver</KEYWORD2>
- <KEYWORD2>Swallow_performer</KEYWORD2>
- <KEYWORD2>system-start-text-interface</KEYWORD2>
- <KEYWORD2>Mensural_ligature_engraver</KEYWORD2>
- <KEYWORD2>chord-name-interface</KEYWORD2>
- <KEYWORD2>Lyric_engraver</KEYWORD2>
- <KEYWORD2>Translator</KEYWORD2>
- <KEYWORD2>script-column-interface</KEYWORD2>
- <KEYWORD2>Instrument_switch_engraver</KEYWORD2>
- <KEYWORD2>Grob_pq_engraver</KEYWORD2>
- <KEYWORD2>Volta_engraver</KEYWORD2>
- <KEYWORD2>breathing-sign-interface</KEYWORD2>
- <KEYWORD2>Span_bar_engraver</KEYWORD2>
- <KEYWORD2>Tab_harmonic_engraver</KEYWORD2>
- <KEYWORD2>Note_performer</KEYWORD2>
- <KEYWORD2>beam-interface</KEYWORD2>
- <KEYWORD2>note-collision-interface</KEYWORD2>
- <KEYWORD2>only-prebreak-interface</KEYWORD2>
- <KEYWORD2>stroke-finger-interface</KEYWORD2>
- <KEYWORD2>InnerStaffGroup</KEYWORD2>
- <KEYWORD2>tie-column-interface</KEYWORD2>
- <KEYWORD2>FretBoards</KEYWORD2>
- <KEYWORD2>Tie_engraver</KEYWORD2>
- <KEYWORD2>Laissez_vibrer_engraver</KEYWORD2>
- <KEYWORD2>slur-interface</KEYWORD2>
- <KEYWORD2>Custos_engraver</KEYWORD2>
- <KEYWORD2>Note_swallow_translator</KEYWORD2>
- <KEYWORD2>Rhythmic_column_engraver</KEYWORD2>
- <KEYWORD2>Default_bar_line_engraver</KEYWORD2>
- <KEYWORD2>note-spacing-interface</KEYWORD2>
- <KEYWORD2>FiguredBass</KEYWORD2>
- <KEYWORD2>vertically-spaceable-interface</KEYWORD2>
- <KEYWORD2>GregorianTranscriptionVoice</KEYWORD2>
- <KEYWORD2>stem-tremolo-interface</KEYWORD2>
- <KEYWORD2>measure-grouping-interface</KEYWORD2>
- <KEYWORD2>Spacing_engraver</KEYWORD2>
- <KEYWORD2>side-position-interface</KEYWORD2>
- <KEYWORD2>semi-tie-interface</KEYWORD2>
- <KEYWORD2>lyric-syllable-interface</KEYWORD2>
- <KEYWORD2>Engraver</KEYWORD2>
- <KEYWORD2>Pitched_trill_engraver</KEYWORD2>
- <KEYWORD2>ledger-line-spanner-interface</KEYWORD2>
- <KEYWORD2>stem-interface</KEYWORD2>
- <KEYWORD2>Extender_engraver</KEYWORD2>
- <KEYWORD2>Pitch_squash_engraver</KEYWORD2>
- <KEYWORD2>align-interface</KEYWORD2>
- <KEYWORD2>ambitus-interface</KEYWORD2>
- <KEYWORD2>Rest_swallow_translator</KEYWORD2>
- <KEYWORD2>string-number-interface</KEYWORD2>
- <KEYWORD2>self-alignment-interface</KEYWORD2>
- <KEYWORD2>Rest_collision_engraver</KEYWORD2>
- <KEYWORD2>hairpin-interface</KEYWORD2>
- <KEYWORD2>NoteNames</KEYWORD2>
- <KEYWORD2>Drum_notes_engraver</KEYWORD2>
- <KEYWORD2>arpeggio-interface</KEYWORD2>
- <KEYWORD2>Tweak_engraver</KEYWORD2>
- <KEYWORD2>ledgered-interface</KEYWORD2>
- <KEYWORD2>Global</KEYWORD2>
- <KEYWORD2>StaffGroup</KEYWORD2>
- <KEYWORD2>DrumVoice</KEYWORD2>
- <KEYWORD2>Voice</KEYWORD2>
- <KEYWORD2>GrandStaff</KEYWORD2>
- <KEYWORD2>Staff_collecting_engraver</KEYWORD2>
- <KEYWORD2>melody-spanner-interface</KEYWORD2>
- <KEYWORD2>Hara_kiri_engraver</KEYWORD2>
- <KEYWORD2>Figured_bass_position_engraver</KEYWORD2>
- <KEYWORD2>Tempo_performer</KEYWORD2>
- <KEYWORD2>New_dynamic_engraver</KEYWORD2>
- <KEYWORD2>Measure_grouping_engraver</KEYWORD2>
- <KEYWORD2>Hyphen_engraver</KEYWORD2>
- <KEYWORD2>Skip_event_swallow_translator</KEYWORD2>
- <KEYWORD2>Vaticana_ligature_engraver</KEYWORD2>
- <KEYWORD2>text-script-interface</KEYWORD2>
- <KEYWORD2>Tuplet_engraver</KEYWORD2>
- <KEYWORD2>Slur_performer</KEYWORD2>
- <KEYWORD2>spaceable-grob-interface</KEYWORD2>
- <KEYWORD2>Tie_performer</KEYWORD2>
- <KEYWORD2>Vertically_spaced_contexts_engraver</KEYWORD2>
- <KEYWORD2>Trill_spanner_engraver</KEYWORD2>
- <KEYWORD2>Spanner_break_forbid_engraver</KEYWORD2>
- <KEYWORD2>CueVoice</KEYWORD2>
- <KEYWORD2>ChoirStaff</KEYWORD2>
- <KEYWORD2>Glissando_engraver</KEYWORD2>
- <KEYWORD2>Balloon_engraver</KEYWORD2>
- <KEYWORD2>separation-item-interface</KEYWORD2>
- <KEYWORD2>Accidental_engraver</KEYWORD2>
- <KEYWORD2>Output_property_engraver</KEYWORD2>
- <KEYWORD2>hara-kiri-group-spanner-interface</KEYWORD2>
- <KEYWORD2>piano-pedal-script-interface</KEYWORD2>
- <KEYWORD2>system-start-delimiter-interface</KEYWORD2>
- <KEYWORD2>multi-measure-rest-interface</KEYWORD2>
- <KEYWORD2>Note_name_engraver</KEYWORD2>
- <KEYWORD2>Note_spacing_engraver</KEYWORD2>
- <KEYWORD2>Timing_translator</KEYWORD2>
- <KEYWORD2>Mark_engraver</KEYWORD2>
- <KEYWORD2>Control_track_performer</KEYWORD2>
- <KEYWORD2>Part_combine_engraver</KEYWORD2>
- <KEYWORD2>axis-group-interface</KEYWORD2>
- <KEYWORD2>note-head-interface</KEYWORD2>
- <KEYWORD2>horizontal-bracket-interface</KEYWORD2>
- <KEYWORD2>PianoStaff</KEYWORD2>
- <KEYWORD2>Slash_repeat_engraver</KEYWORD2>
- <KEYWORD2>Page_turn_engraver</KEYWORD2>
- <KEYWORD2>parentheses-interface</KEYWORD2>
- <KEYWORD2>key-signature-interface</KEYWORD2>
- <KEYWORD2>lyric-interface</KEYWORD2>
- <KEYWORD2>grid-point-interface</KEYWORD2>
- <KEYWORD2>item-interface</KEYWORD2>
- <KEYWORD2>Ottava_spanner_engraver</KEYWORD2>
- <KEYWORD2>Melody_engraver</KEYWORD2>
- <KEYWORD2>Percent_repeat_engraver</KEYWORD2>
- <KEYWORD2>tuplet-number-interface</KEYWORD2>
- <KEYWORD2>Rest_engraver</KEYWORD2>
- <KEYWORD2>stanza-number-interface</KEYWORD2>
- <KEYWORD2>enclosing-bracket-interface</KEYWORD2>
- <KEYWORD2>Break_align_engraver</KEYWORD2>
- <KEYWORD2>Piano_pedal_performer</KEYWORD2>
- <KEYWORD2>Paper_column_engraver</KEYWORD2>
- <KEYWORD2>pitched-trill-interface</KEYWORD2>
- <KEYWORD2>Grid_line_span_engraver</KEYWORD2>
- <KEYWORD2>Lyrics</KEYWORD2>
- <KEYWORD2>Instrument_name_engraver</KEYWORD2>
- <KEYWORD2>line-interface</KEYWORD2>
- <KEYWORD2>Bend_engraver</KEYWORD2>
- <KEYWORD2>Arpeggio_engraver</KEYWORD2>
- <KEYWORD2>key-cancellation-interface</KEYWORD2>
- <KEYWORD2>Grid_point_engraver</KEYWORD2>
- <KEYWORD2>Script_column_engraver</KEYWORD2>
- <KEYWORD2>Note_head_line_engraver</KEYWORD2>
- <KEYWORD2>spacing-options-interface</KEYWORD2>
- <KEYWORD2>Dot_column_engraver</KEYWORD2>
- <KEYWORD2>Chord_tremolo_engraver</KEYWORD2>
- <KEYWORD2>bass-figure-interface</KEYWORD2>
- <KEYWORD2>ottava-bracket-interface</KEYWORD2>
- <KEYWORD2>Bar_number_engraver</KEYWORD2>
- <KEYWORD2>Axis_group_engraver</KEYWORD2>
- <KEYWORD2>tuplet-bracket-interface</KEYWORD2>
- <KEYWORD2>Phrasing_slur_engraver</KEYWORD2>
- <KEYWORD2>Dynamic_align_engraver</KEYWORD2>
- <KEYWORD2>Piano_pedal_align_engraver</KEYWORD2>
- <KEYWORD2>Collision_engraver</KEYWORD2>
- <KEYWORD2>Dots_engraver</KEYWORD2>
- <KEYWORD2>New_fingering_engraver</KEYWORD2>
- <KEYWORD2>Figured_bass_engraver</KEYWORD2>
- <KEYWORD2>dot-column-interface</KEYWORD2>
- <KEYWORD2>multi-measure-interface</KEYWORD2>
- <KEYWORD2>Fretboard_engraver</KEYWORD2>
- <KEYWORD2>ligature-interface</KEYWORD2>
- <KEYWORD2>instrument-specific-markup-interface</KEYWORD2>
- <KEYWORD2>time-signature-interface</KEYWORD2>
- <KEYWORD2>Metronome_mark_engraver</KEYWORD2>
- <KEYWORD2>break-alignment-interface</KEYWORD2>
- <KEYWORD2>Auto_beam_engraver</KEYWORD2>
- <KEYWORD2>balloon-interface</KEYWORD2>
- <KEYWORD2>VaticanaStaff</KEYWORD2>
- <KEYWORD2>Script_engraver</KEYWORD2>
- <KEYWORD2>System_start_delimiter_engraver</KEYWORD2>
- <KEYWORD2>spacing-interface</KEYWORD2>
- <KEYWORD2>ligature-bracket-interface</KEYWORD2>
- <KEYWORD2>percent-repeat-interface</KEYWORD2>
- <KEYWORD2>ChordNames</KEYWORD2>
- <KEYWORD2>finger-interface</KEYWORD2>
- <KEYWORD2>TabStaff</KEYWORD2>
- <KEYWORD2>cluster-interface</KEYWORD2>
- <KEYWORD2>Beam_engraver</KEYWORD2>
- <KEYWORD2>RhythmicStaff</KEYWORD2>
- <KEYWORD2>String_number_engraver</KEYWORD2>
- <KEYWORD2>Dynamic_performer</KEYWORD2>
- <KEYWORD2>piano-pedal-bracket-interface</KEYWORD2>
- <KEYWORD2>Parenthesis_engraver</KEYWORD2>
- <KEYWORD2>Tab_staff_symbol_engraver</KEYWORD2>
- <KEYWORD2>paper-column-interface</KEYWORD2>
- <KEYWORD2>Note_heads_engraver</KEYWORD2>
- <KEYWORD2>MensuralStaff</KEYWORD2>
- <KEYWORD2>line-spanner-interface</KEYWORD2>
-<!-- GUILE procedures -->
-<KEYWORD2>#:behaviour</KEYWORD2>
-<KEYWORD2>#:column</KEYWORD2>
-<KEYWORD2>#:condition</KEYWORD2>
-<KEYWORD2>#:depth</KEYWORD2>
-<KEYWORD2>#:exit-depth</KEYWORD2>
-<KEYWORD2>#:expression</KEYWORD2>
-<KEYWORD2>#:file-name</KEYWORD2>
-<KEYWORD2>#:file-regexp</KEYWORD2>
-<KEYWORD2>#:line</KEYWORD2>
-<KEYWORD2>#:procedure</KEYWORD2>
-<KEYWORD2>#:repeat-identical-behaviour</KEYWORD2>
-<KEYWORD2>#:single-shot</KEYWORD2>
-<KEYWORD2>#:skip-count</KEYWORD2>
-<KEYWORD2>$abs</KEYWORD2>
-<KEYWORD2>$acos</KEYWORD2>
-<KEYWORD2>$acosh</KEYWORD2>
-<KEYWORD2>$asin</KEYWORD2>
-<KEYWORD2>$asinh</KEYWORD2>
-<KEYWORD2>$atan</KEYWORD2>
-<KEYWORD2>$atan2</KEYWORD2>
-<KEYWORD2>$atanh</KEYWORD2>
-<KEYWORD2>$cos</KEYWORD2>
-<KEYWORD2>$cosh</KEYWORD2>
-<KEYWORD2>$exp</KEYWORD2>
-<KEYWORD2>$expt</KEYWORD2>
-<KEYWORD2>$log</KEYWORD2>
-<KEYWORD2>$sin</KEYWORD2>
-<KEYWORD2>$sinh</KEYWORD2>
-<KEYWORD2>$sqrt</KEYWORD2>
-<KEYWORD2>$tan</KEYWORD2>
-<KEYWORD2>$tanh</KEYWORD2>
-<KEYWORD2>%library-dir</KEYWORD2>
-<KEYWORD2>%make-void-port</KEYWORD2>
-<KEYWORD2>%package-data-dir</KEYWORD2>
-<KEYWORD2>%read-delimited!</KEYWORD2>
-<KEYWORD2>%read-line</KEYWORD2>
-<KEYWORD2>%search-load-path</KEYWORD2>
-<KEYWORD2>%site-dir</KEYWORD2>
-<KEYWORD2>,@</KEYWORD2>
-<KEYWORD2>->char-set</KEYWORD2>
-<KEYWORD2>1+</KEYWORD2>
-<KEYWORD2>1-</KEYWORD2>
-<KEYWORD2><apply-trap></KEYWORD2>
-<KEYWORD2><entry-trap></KEYWORD2>
-<KEYWORD2><exit-trap></KEYWORD2>
-<KEYWORD2><group>-disable</KEYWORD2>
-<KEYWORD2><group>-enable</KEYWORD2>
-<KEYWORD2><group>-options</KEYWORD2>
-<KEYWORD2><group>-set!</KEYWORD2>
-<KEYWORD2><location-trap></KEYWORD2>
-<KEYWORD2><procedure-trap></KEYWORD2>
-<KEYWORD2><source-trap></KEYWORD2>
-<KEYWORD2><step-trap></KEYWORD2>
-<KEYWORD2><trap></KEYWORD2>
-<KEYWORD2>abs</KEYWORD2>
-<KEYWORD2>accept</KEYWORD2>
-<KEYWORD2>access?</KEYWORD2>
-<KEYWORD2>acons</KEYWORD2>
-<KEYWORD2>acos</KEYWORD2>
-<KEYWORD2>acosh</KEYWORD2>
-<KEYWORD2>activate-readline</KEYWORD2>
-<KEYWORD2>add-duration</KEYWORD2>
-<KEYWORD2>add-duration!</KEYWORD2>
-<KEYWORD2>add-hook!</KEYWORD2>
-<KEYWORD2>alarm</KEYWORD2>
-<KEYWORD2>alist->hash-table</KEYWORD2>
-<KEYWORD2>alist-cons</KEYWORD2>
-<KEYWORD2>alist-copy</KEYWORD2>
-<KEYWORD2>alist-delete</KEYWORD2>
-<KEYWORD2>alist-delete!</KEYWORD2>
-<KEYWORD2>all-threads</KEYWORD2>
-<KEYWORD2>all-traps</KEYWORD2>
-<KEYWORD2>and</KEYWORD2>
-<KEYWORD2>and-let*</KEYWORD2>
-<KEYWORD2>angle</KEYWORD2>
-<KEYWORD2>any</KEYWORD2>
-<KEYWORD2>any->c32vector</KEYWORD2>
-<KEYWORD2>any->c64vector</KEYWORD2>
-<KEYWORD2>any->f32vector</KEYWORD2>
-<KEYWORD2>any->f64vector</KEYWORD2>
-<KEYWORD2>any->s16vector</KEYWORD2>
-<KEYWORD2>any->s32vector</KEYWORD2>
-<KEYWORD2>any->s64vector</KEYWORD2>
-<KEYWORD2>any->s8vector</KEYWORD2>
-<KEYWORD2>any->u16vector</KEYWORD2>
-<KEYWORD2>any->u32vector</KEYWORD2>
-<KEYWORD2>any->u64vector</KEYWORD2>
-<KEYWORD2>any->u8vector</KEYWORD2>
-<KEYWORD2>any-bits-set?</KEYWORD2>
-<KEYWORD2>append</KEYWORD2>
-<KEYWORD2>append!</KEYWORD2>
-<KEYWORD2>append-map</KEYWORD2>
-<KEYWORD2>append-map!</KEYWORD2>
-<KEYWORD2>append-reverse</KEYWORD2>
-<KEYWORD2>append-reverse!</KEYWORD2>
-<KEYWORD2>apply</KEYWORD2>
-<KEYWORD2>apply:nconc2last</KEYWORD2>
-<KEYWORD2>apropos-completion-function</KEYWORD2>
-<KEYWORD2>args-fold</KEYWORD2>
-<KEYWORD2>arithmetic-shift</KEYWORD2>
-<KEYWORD2>array->list</KEYWORD2>
-<KEYWORD2>array-contents</KEYWORD2>
-<KEYWORD2>array-copy!</KEYWORD2>
-<KEYWORD2>array-copy-in-order!</KEYWORD2>
-<KEYWORD2>array-dimensions</KEYWORD2>
-<KEYWORD2>array-equal?</KEYWORD2>
-<KEYWORD2>array-fill!</KEYWORD2>
-<KEYWORD2>array-for-each</KEYWORD2>
-<KEYWORD2>array-in-bounds?</KEYWORD2>
-<KEYWORD2>array-index-map!</KEYWORD2>
-<KEYWORD2>array-map!</KEYWORD2>
-<KEYWORD2>array-map-in-order!</KEYWORD2>
-<KEYWORD2>array-rank</KEYWORD2>
-<KEYWORD2>array-ref</KEYWORD2>
-<KEYWORD2>array-set!</KEYWORD2>
-<KEYWORD2>array-shape</KEYWORD2>
-<KEYWORD2>array-type</KEYWORD2>
-<KEYWORD2>array?</KEYWORD2>
-<KEYWORD2>ash</KEYWORD2>
-<KEYWORD2>asin</KEYWORD2>
-<KEYWORD2>asinh</KEYWORD2>
-<KEYWORD2>assoc</KEYWORD2>
-<KEYWORD2>assoc</KEYWORD2>
-<KEYWORD2>assoc-ref</KEYWORD2>
-<KEYWORD2>assoc-remove!</KEYWORD2>
-<KEYWORD2>assoc-set!</KEYWORD2>
-<KEYWORD2>assq</KEYWORD2>
-<KEYWORD2>assq-ref</KEYWORD2>
-<KEYWORD2>assq-remove!</KEYWORD2>
-<KEYWORD2>assq-set!</KEYWORD2>
-<KEYWORD2>assv</KEYWORD2>
-<KEYWORD2>assv-ref</KEYWORD2>
-<KEYWORD2>assv-remove!</KEYWORD2>
-<KEYWORD2>assv-set!</KEYWORD2>
-<KEYWORD2>async</KEYWORD2>
-<KEYWORD2>async-mark</KEYWORD2>
-<KEYWORD2>atan</KEYWORD2>
-<KEYWORD2>atanh</KEYWORD2>
-<KEYWORD2>backtrace</KEYWORD2>
-<KEYWORD2>backtrace</KEYWORD2>
-<KEYWORD2>basename</KEYWORD2>
-<KEYWORD2>begin</KEYWORD2>
-<KEYWORD2>begin-thread</KEYWORD2>
-<KEYWORD2>bind</KEYWORD2>
-<KEYWORD2>bind-textdomain-codeset</KEYWORD2>
-<KEYWORD2>bindtextdomain</KEYWORD2>
-<KEYWORD2>bit-count</KEYWORD2>
-<KEYWORD2>bit-count</KEYWORD2>
-<KEYWORD2>bit-count*</KEYWORD2>
-<KEYWORD2>bit-extract</KEYWORD2>
-<KEYWORD2>bit-field</KEYWORD2>
-<KEYWORD2>bit-invert!</KEYWORD2>
-<KEYWORD2>bit-position</KEYWORD2>
-<KEYWORD2>bit-set*!</KEYWORD2>
-<KEYWORD2>bit-set?</KEYWORD2>
-<KEYWORD2>bitvector</KEYWORD2>
-<KEYWORD2>bitvector->list</KEYWORD2>
-<KEYWORD2>bitvector-fill!</KEYWORD2>
-<KEYWORD2>bitvector-length</KEYWORD2>
-<KEYWORD2>bitvector-ref</KEYWORD2>
-<KEYWORD2>bitvector-set!</KEYWORD2>
-<KEYWORD2>bitvector?</KEYWORD2>
-<KEYWORD2>bitwise-and</KEYWORD2>
-<KEYWORD2>bitwise-if</KEYWORD2>
-<KEYWORD2>bitwise-ior</KEYWORD2>
-<KEYWORD2>bitwise-merge</KEYWORD2>
-<KEYWORD2>bitwise-not</KEYWORD2>
-<KEYWORD2>bitwise-xor</KEYWORD2>
-<KEYWORD2>boolean?</KEYWORD2>
-<KEYWORD2>booleans->integer</KEYWORD2>
-<KEYWORD2>break</KEYWORD2>
-<KEYWORD2>break</KEYWORD2>
-<KEYWORD2>break!</KEYWORD2>
-<KEYWORD2>broadcast-condition-variable</KEYWORD2>
-<KEYWORD2>bt</KEYWORD2>
-<KEYWORD2>c32vector</KEYWORD2>
-<KEYWORD2>c32vector->list</KEYWORD2>
-<KEYWORD2>c32vector-length</KEYWORD2>
-<KEYWORD2>c32vector-ref</KEYWORD2>
-<KEYWORD2>c32vector-set!</KEYWORD2>
-<KEYWORD2>c32vector?</KEYWORD2>
-<KEYWORD2>c64vector</KEYWORD2>
-<KEYWORD2>c64vector->list</KEYWORD2>
-<KEYWORD2>c64vector-length</KEYWORD2>
-<KEYWORD2>c64vector-ref</KEYWORD2>
-<KEYWORD2>c64vector-set!</KEYWORD2>
-<KEYWORD2>c64vector?</KEYWORD2>
-<KEYWORD2>caaaar</KEYWORD2>
-<KEYWORD2>caaadr</KEYWORD2>
-<KEYWORD2>caaar</KEYWORD2>
-<KEYWORD2>caadar</KEYWORD2>
-<KEYWORD2>caaddr</KEYWORD2>
-<KEYWORD2>caadr</KEYWORD2>
-<KEYWORD2>caar</KEYWORD2>
-<KEYWORD2>cadaar</KEYWORD2>
-<KEYWORD2>cadadr</KEYWORD2>
-<KEYWORD2>cadar</KEYWORD2>
-<KEYWORD2>caddar</KEYWORD2>
-<KEYWORD2>cadddr</KEYWORD2>
-<KEYWORD2>caddr</KEYWORD2>
-<KEYWORD2>cadr</KEYWORD2>
-<KEYWORD2>call-with-blocked-asyncs</KEYWORD2>
-<KEYWORD2>call-with-current-continuation</KEYWORD2>
-<KEYWORD2>call-with-input-file</KEYWORD2>
-<KEYWORD2>call-with-input-string</KEYWORD2>
-<KEYWORD2>call-with-new-thread</KEYWORD2>
-<KEYWORD2>call-with-output-file</KEYWORD2>
-<KEYWORD2>call-with-output-string</KEYWORD2>
-<KEYWORD2>call-with-unblocked-asyncs</KEYWORD2>
-<KEYWORD2>call-with-values</KEYWORD2>
-<KEYWORD2>call/cc</KEYWORD2>
-<KEYWORD2>car</KEYWORD2>
-<KEYWORD2>car+cdr</KEYWORD2>
-<KEYWORD2>case</KEYWORD2>
-<KEYWORD2>case-lambda</KEYWORD2>
-<KEYWORD2>catch</KEYWORD2>
-<KEYWORD2>cd</KEYWORD2>
-<KEYWORD2>cdaaar</KEYWORD2>
-<KEYWORD2>cdaadr</KEYWORD2>
-<KEYWORD2>cdaar</KEYWORD2>
-<KEYWORD2>cdadar</KEYWORD2>
-<KEYWORD2>cdaddr</KEYWORD2>
-<KEYWORD2>cdadr</KEYWORD2>
-<KEYWORD2>cdar</KEYWORD2>
-<KEYWORD2>cddaar</KEYWORD2>
-<KEYWORD2>cddadr</KEYWORD2>
-<KEYWORD2>cddar</KEYWORD2>
-<KEYWORD2>cdddar</KEYWORD2>
-<KEYWORD2>cddddr</KEYWORD2>
-<KEYWORD2>cdddr</KEYWORD2>
-<KEYWORD2>cddr</KEYWORD2>
-<KEYWORD2>cdr</KEYWORD2>
-<KEYWORD2>ceiling</KEYWORD2>
-<KEYWORD2>char->integer</KEYWORD2>
-<KEYWORD2>char-alphabetic?</KEYWORD2>
-<KEYWORD2>char-ci<=?</KEYWORD2>
-<KEYWORD2>char-ci<?</KEYWORD2>
-<KEYWORD2>char-ci=?</KEYWORD2>
-<KEYWORD2>char-ci>=?</KEYWORD2>
-<KEYWORD2>char-ci>?</KEYWORD2>
-<KEYWORD2>char-downcase</KEYWORD2>
-<KEYWORD2>char-is-both?</KEYWORD2>
-<KEYWORD2>char-lower-case?</KEYWORD2>
-<KEYWORD2>char-numeric?</KEYWORD2>
-<KEYWORD2>char-ready?</KEYWORD2>
-<KEYWORD2>char-set</KEYWORD2>
-<KEYWORD2>char-set->list</KEYWORD2>
-<KEYWORD2>char-set->string</KEYWORD2>
-<KEYWORD2>char-set-adjoin</KEYWORD2>
-<KEYWORD2>char-set-adjoin!</KEYWORD2>
-<KEYWORD2>char-set-any</KEYWORD2>
-<KEYWORD2>char-set-complement</KEYWORD2>
-<KEYWORD2>char-set-complement!</KEYWORD2>
-<KEYWORD2>char-set-contains?</KEYWORD2>
-<KEYWORD2>char-set-copy</KEYWORD2>
-<KEYWORD2>char-set-count</KEYWORD2>
-<KEYWORD2>char-set-cursor</KEYWORD2>
-<KEYWORD2>char-set-cursor-next</KEYWORD2>
-<KEYWORD2>char-set-delete</KEYWORD2>
-<KEYWORD2>char-set-delete!</KEYWORD2>
-<KEYWORD2>char-set-diff+intersection</KEYWORD2>
-<KEYWORD2>char-set-diff+intersection!</KEYWORD2>
-<KEYWORD2>char-set-difference</KEYWORD2>
-<KEYWORD2>char-set-difference!</KEYWORD2>
-<KEYWORD2>char-set-every</KEYWORD2>
-<KEYWORD2>char-set-filter</KEYWORD2>
-<KEYWORD2>char-set-filter!</KEYWORD2>
-<KEYWORD2>char-set-fold</KEYWORD2>
-<KEYWORD2>char-set-for-each</KEYWORD2>
-<KEYWORD2>char-set-hash</KEYWORD2>
-<KEYWORD2>char-set-intersection</KEYWORD2>
-<KEYWORD2>char-set-intersection!</KEYWORD2>
-<KEYWORD2>char-set-map</KEYWORD2>
-<KEYWORD2>char-set-ref</KEYWORD2>
-<KEYWORD2>char-set-size</KEYWORD2>
-<KEYWORD2>char-set-unfold</KEYWORD2>
-<KEYWORD2>char-set-unfold!</KEYWORD2>
-<KEYWORD2>char-set-union</KEYWORD2>
-<KEYWORD2>char-set-union!</KEYWORD2>
-<KEYWORD2>char-set-xor</KEYWORD2>
-<KEYWORD2>char-set-xor!</KEYWORD2>
-<KEYWORD2>char-set<=</KEYWORD2>
-<KEYWORD2>char-set=</KEYWORD2>
-<KEYWORD2>char-set?</KEYWORD2>
-<KEYWORD2>char-upcase</KEYWORD2>
-<KEYWORD2>char-upper-case?</KEYWORD2>
-<KEYWORD2>char-whitespace?</KEYWORD2>
-<KEYWORD2>char<=?</KEYWORD2>
-<KEYWORD2>char<?</KEYWORD2>
-<KEYWORD2>char=?</KEYWORD2>
-<KEYWORD2>char>=?</KEYWORD2>
-<KEYWORD2>char>?</KEYWORD2>
-<KEYWORD2>char?</KEYWORD2>
-<KEYWORD2>chdir</KEYWORD2>
-<KEYWORD2>chmod</KEYWORD2>
-<KEYWORD2>chown</KEYWORD2>
-<KEYWORD2>chroot</KEYWORD2>
-<KEYWORD2>circular-list</KEYWORD2>
-<KEYWORD2>circular-list?</KEYWORD2>
-<KEYWORD2>close</KEYWORD2>
-<KEYWORD2>close-fdes</KEYWORD2>
-<KEYWORD2>close-input-port</KEYWORD2>
-<KEYWORD2>close-output-port</KEYWORD2>
-<KEYWORD2>close-pipe</KEYWORD2>
-<KEYWORD2>close-port</KEYWORD2>
-<KEYWORD2>closedir</KEYWORD2>
-<KEYWORD2>closure?</KEYWORD2>
-<KEYWORD2>command-line</KEYWORD2>
-<KEYWORD2>complex?</KEYWORD2>
-<KEYWORD2>concatenate</KEYWORD2>
-<KEYWORD2>concatenate!</KEYWORD2>
-<KEYWORD2>cond</KEYWORD2>
-<KEYWORD2>cond-expand</KEYWORD2>
-<KEYWORD2>condition</KEYWORD2>
-<KEYWORD2>condition-has-type?</KEYWORD2>
-<KEYWORD2>condition-message</KEYWORD2>
-<KEYWORD2>condition-ref</KEYWORD2>
-<KEYWORD2>condition-type?</KEYWORD2>
-<KEYWORD2>connect</KEYWORD2>
-<KEYWORD2>cons</KEYWORD2>
-<KEYWORD2>cons*</KEYWORD2>
-<KEYWORD2>cons-source</KEYWORD2>
-<KEYWORD2>continue</KEYWORD2>
-<KEYWORD2>continue</KEYWORD2>
-<KEYWORD2>copy-bit</KEYWORD2>
-<KEYWORD2>copy-bit-field</KEYWORD2>
-<KEYWORD2>copy-file</KEYWORD2>
-<KEYWORD2>copy-random-state</KEYWORD2>
-<KEYWORD2>copy-time</KEYWORD2>
-<KEYWORD2>copy-tree</KEYWORD2>
-<KEYWORD2>cos</KEYWORD2>
-<KEYWORD2>cosh</KEYWORD2>
-<KEYWORD2>count</KEYWORD2>
-<KEYWORD2>crypt</KEYWORD2>
-<KEYWORD2>ctermid</KEYWORD2>
-<KEYWORD2>current-date</KEYWORD2>
-<KEYWORD2>current-dynamic-state</KEYWORD2>
-<KEYWORD2>current-error-port</KEYWORD2>
-<KEYWORD2>current-error-port</KEYWORD2>
-<KEYWORD2>current-input-port</KEYWORD2>
-<KEYWORD2>current-input-port</KEYWORD2>
-<KEYWORD2>current-julian-day</KEYWORD2>
-<KEYWORD2>current-load-port</KEYWORD2>
-<KEYWORD2>current-modified-julian-day</KEYWORD2>
-<KEYWORD2>current-module</KEYWORD2>
-<KEYWORD2>current-output-port</KEYWORD2>
-<KEYWORD2>current-output-port</KEYWORD2>
-<KEYWORD2>current-thread</KEYWORD2>
-<KEYWORD2>current-time</KEYWORD2>
-<KEYWORD2>current-time</KEYWORD2>
-<KEYWORD2>cuserid</KEYWORD2>
-<KEYWORD2>cut</KEYWORD2>
-<KEYWORD2>cute</KEYWORD2>
-<KEYWORD2>date->julian-day</KEYWORD2>
-<KEYWORD2>date->modified-julian-day</KEYWORD2>
-<KEYWORD2>date->string</KEYWORD2>
-<KEYWORD2>date->time-monotonic</KEYWORD2>
-<KEYWORD2>date->time-tai</KEYWORD2>
-<KEYWORD2>date->time-utc</KEYWORD2>
-<KEYWORD2>date-day</KEYWORD2>
-<KEYWORD2>date-hour</KEYWORD2>
-<KEYWORD2>date-minute</KEYWORD2>
-<KEYWORD2>date-month</KEYWORD2>
-<KEYWORD2>date-nanosecond</KEYWORD2>
-<KEYWORD2>date-second</KEYWORD2>
-<KEYWORD2>date-week-day</KEYWORD2>
-<KEYWORD2>date-week-number</KEYWORD2>
-<KEYWORD2>date-year</KEYWORD2>
-<KEYWORD2>date-year-day</KEYWORD2>
-<KEYWORD2>date-zone-offset</KEYWORD2>
-<KEYWORD2>date?</KEYWORD2>
-<KEYWORD2>debug</KEYWORD2>
-<KEYWORD2>debug-disable</KEYWORD2>
-<KEYWORD2>debug-enable</KEYWORD2>
-<KEYWORD2>debug-object?</KEYWORD2>
-<KEYWORD2>debug-options</KEYWORD2>
-<KEYWORD2>debug-options-interface</KEYWORD2>
-<KEYWORD2>debug-set!</KEYWORD2>
-<KEYWORD2>debug-trap</KEYWORD2>
-<KEYWORD2>default-duplicate-binding-handler</KEYWORD2>
-<KEYWORD2>define</KEYWORD2>
-<KEYWORD2>define*</KEYWORD2>
-<KEYWORD2>define*-public</KEYWORD2>
-<KEYWORD2>define-condition-type</KEYWORD2>
-<KEYWORD2>define-macro</KEYWORD2>
-<KEYWORD2>define-module</KEYWORD2>
-<KEYWORD2>define-public</KEYWORD2>
-<KEYWORD2>define-reader-ctor</KEYWORD2>
-<KEYWORD2>define-record-type</KEYWORD2>
-<KEYWORD2>defined?</KEYWORD2>
-<KEYWORD2>defmacro</KEYWORD2>
-<KEYWORD2>defmacro*</KEYWORD2>
-<KEYWORD2>defmacro*-public</KEYWORD2>
-<KEYWORD2>delay</KEYWORD2>
-<KEYWORD2>delete</KEYWORD2>
-<KEYWORD2>delete</KEYWORD2>
-<KEYWORD2>delete!</KEYWORD2>
-<KEYWORD2>delete!</KEYWORD2>
-<KEYWORD2>delete-duplicates</KEYWORD2>
-<KEYWORD2>delete-duplicates!</KEYWORD2>
-<KEYWORD2>delete-file</KEYWORD2>
-<KEYWORD2>delete1!</KEYWORD2>
-<KEYWORD2>delq</KEYWORD2>
-<KEYWORD2>delq!</KEYWORD2>
-<KEYWORD2>delq1!</KEYWORD2>
-<KEYWORD2>delv</KEYWORD2>
-<KEYWORD2>delv!</KEYWORD2>
-<KEYWORD2>delv1!</KEYWORD2>
-<KEYWORD2>denominator</KEYWORD2>
-<KEYWORD2>deq!</KEYWORD2>
-<KEYWORD2>directory-stream?</KEYWORD2>
-<KEYWORD2>dirname</KEYWORD2>
-<KEYWORD2>display</KEYWORD2>
-<KEYWORD2>display-application</KEYWORD2>
-<KEYWORD2>display-backtrace</KEYWORD2>
-<KEYWORD2>display-error</KEYWORD2>
-<KEYWORD2>do</KEYWORD2>
-<KEYWORD2>dotted-list?</KEYWORD2>
-<KEYWORD2>doubly-weak-hash-table?</KEYWORD2>
-<KEYWORD2>down</KEYWORD2>
-<KEYWORD2>drain-input</KEYWORD2>
-<KEYWORD2>drop</KEYWORD2>
-<KEYWORD2>drop-right</KEYWORD2>
-<KEYWORD2>drop-right!</KEYWORD2>
-<KEYWORD2>drop-while</KEYWORD2>
-<KEYWORD2>dup</KEYWORD2>
-<KEYWORD2>dup->fdes</KEYWORD2>
-<KEYWORD2>dup->inport</KEYWORD2>
-<KEYWORD2>dup->outport</KEYWORD2>
-<KEYWORD2>dup->port</KEYWORD2>
-<KEYWORD2>dup2</KEYWORD2>
-<KEYWORD2>duplicate-port</KEYWORD2>
-<KEYWORD2>dynamic-args-call</KEYWORD2>
-<KEYWORD2>dynamic-call</KEYWORD2>
-<KEYWORD2>dynamic-func</KEYWORD2>
-<KEYWORD2>dynamic-link</KEYWORD2>
-<KEYWORD2>dynamic-object?</KEYWORD2>
-<KEYWORD2>dynamic-state?</KEYWORD2>
-<KEYWORD2>dynamic-unlink</KEYWORD2>
-<KEYWORD2>dynamic-wind</KEYWORD2>
-<KEYWORD2>effective-version</KEYWORD2>
-<KEYWORD2>eighth</KEYWORD2>
-<KEYWORD2>enclose-array</KEYWORD2>
-<KEYWORD2>end-of-char-set?</KEYWORD2>
-<KEYWORD2>endgrent</KEYWORD2>
-<KEYWORD2>endhostent</KEYWORD2>
-<KEYWORD2>endnetent</KEYWORD2>
-<KEYWORD2>endprotoent</KEYWORD2>
-<KEYWORD2>endpwent</KEYWORD2>
-<KEYWORD2>endservent</KEYWORD2>
-<KEYWORD2>enq!</KEYWORD2>
-<KEYWORD2>entity?</KEYWORD2>
-<KEYWORD2>environ</KEYWORD2>
-<KEYWORD2>eof-object?</KEYWORD2>
-<KEYWORD2>eq?</KEYWORD2>
-<KEYWORD2>equal?</KEYWORD2>
-<KEYWORD2>eqv?</KEYWORD2>
-<KEYWORD2>error</KEYWORD2>
-<KEYWORD2>error?</KEYWORD2>
-<KEYWORD2>eval</KEYWORD2>
-<KEYWORD2>eval-disable</KEYWORD2>
-<KEYWORD2>eval-enable</KEYWORD2>
-<KEYWORD2>eval-options</KEYWORD2>
-<KEYWORD2>eval-options-interface</KEYWORD2>
-<KEYWORD2>eval-options-interface</KEYWORD2>
-<KEYWORD2>eval-set!</KEYWORD2>
-<KEYWORD2>eval-string</KEYWORD2>
-<KEYWORD2>evaluate</KEYWORD2>
-<KEYWORD2>evaluator-traps-interface</KEYWORD2>
-<KEYWORD2>evaluator-traps-interface</KEYWORD2>
-<KEYWORD2>even?</KEYWORD2>
-<KEYWORD2>every</KEYWORD2>
-<KEYWORD2>exact->inexact</KEYWORD2>
-<KEYWORD2>exact?</KEYWORD2>
-<KEYWORD2>execl</KEYWORD2>
-<KEYWORD2>execle</KEYWORD2>
-<KEYWORD2>execlp</KEYWORD2>
-<KEYWORD2>exp</KEYWORD2>
-<KEYWORD2>expect</KEYWORD2>
-<KEYWORD2>expect-strings</KEYWORD2>
-<KEYWORD2>export</KEYWORD2>
-<KEYWORD2>expt</KEYWORD2>
-<KEYWORD2>extract-condition</KEYWORD2>
-<KEYWORD2>f32vector</KEYWORD2>
-<KEYWORD2>f32vector->list</KEYWORD2>
-<KEYWORD2>f32vector-length</KEYWORD2>
-<KEYWORD2>f32vector-ref</KEYWORD2>
-<KEYWORD2>f32vector-set!</KEYWORD2>
-<KEYWORD2>f32vector?</KEYWORD2>
-<KEYWORD2>f64vector</KEYWORD2>
-<KEYWORD2>f64vector->list</KEYWORD2>
-<KEYWORD2>f64vector-length</KEYWORD2>
-<KEYWORD2>f64vector-ref</KEYWORD2>
-<KEYWORD2>f64vector-set!</KEYWORD2>
-<KEYWORD2>f64vector?</KEYWORD2>
-<KEYWORD2>false-if-exception</KEYWORD2>
-<KEYWORD2>fchmod</KEYWORD2>
-<KEYWORD2>fchown</KEYWORD2>
-<KEYWORD2>fcntl</KEYWORD2>
-<KEYWORD2>fdes->inport</KEYWORD2>
-<KEYWORD2>fdes->outport</KEYWORD2>
-<KEYWORD2>fdes->ports</KEYWORD2>
-<KEYWORD2>fdopen</KEYWORD2>
-<KEYWORD2>feature?</KEYWORD2>
-<KEYWORD2>fflush</KEYWORD2>
-<KEYWORD2>fifth</KEYWORD2>
-<KEYWORD2>file-exists?</KEYWORD2>
-<KEYWORD2>file-port?</KEYWORD2>
-<KEYWORD2>filename-completion-function</KEYWORD2>
-<KEYWORD2>fileno</KEYWORD2>
-<KEYWORD2>filter</KEYWORD2>
-<KEYWORD2>filter!</KEYWORD2>
-<KEYWORD2>filter-map</KEYWORD2>
-<KEYWORD2>find</KEYWORD2>
-<KEYWORD2>find-tail</KEYWORD2>
-<KEYWORD2>finish</KEYWORD2>
-<KEYWORD2>first</KEYWORD2>
-<KEYWORD2>first-set-bit</KEYWORD2>
-<KEYWORD2>flock</KEYWORD2>
-<KEYWORD2>floor</KEYWORD2>
-<KEYWORD2>fluid-ref</KEYWORD2>
-<KEYWORD2>fluid-set!</KEYWORD2>
-<KEYWORD2>fluid?</KEYWORD2>
-<KEYWORD2>flush-all-ports</KEYWORD2>
-<KEYWORD2>fn</KEYWORD2>
-<KEYWORD2>fold</KEYWORD2>
-<KEYWORD2>fold-matches</KEYWORD2>
-<KEYWORD2>fold-right</KEYWORD2>
-<KEYWORD2>for-each</KEYWORD2>
-<KEYWORD2>for-each</KEYWORD2>
-<KEYWORD2>force</KEYWORD2>
-<KEYWORD2>force-output</KEYWORD2>
-<KEYWORD2>format</KEYWORD2>
-<KEYWORD2>fourth</KEYWORD2>
-<KEYWORD2>frame</KEYWORD2>
-<KEYWORD2>frame-arguments</KEYWORD2>
-<KEYWORD2>frame-evaluating-args?</KEYWORD2>
-<KEYWORD2>frame-next</KEYWORD2>
-<KEYWORD2>frame-number</KEYWORD2>
-<KEYWORD2>frame-overflow?</KEYWORD2>
-<KEYWORD2>frame-previous</KEYWORD2>
-<KEYWORD2>frame-procedure</KEYWORD2>
-<KEYWORD2>frame-procedure?</KEYWORD2>
-<KEYWORD2>frame-real?</KEYWORD2>
-<KEYWORD2>frame-source</KEYWORD2>
-<KEYWORD2>frame?</KEYWORD2>
-<KEYWORD2>fstat</KEYWORD2>
-<KEYWORD2>fsync</KEYWORD2>
-<KEYWORD2>ftell</KEYWORD2>
-<KEYWORD2>ftruncate</KEYWORD2>
-<KEYWORD2>ftw</KEYWORD2>
-<KEYWORD2>gc</KEYWORD2>
-<KEYWORD2>gc-live-object-stats</KEYWORD2>
-<KEYWORD2>gc-stats</KEYWORD2>
-<KEYWORD2>gcd</KEYWORD2>
-<KEYWORD2>gds-apropos</KEYWORD2>
-<KEYWORD2>gds-complete-symbol</KEYWORD2>
-<KEYWORD2>gds-debug-trap</KEYWORD2>
-<KEYWORD2>gds-down</KEYWORD2>
-<KEYWORD2>gds-eval-defun</KEYWORD2>
-<KEYWORD2>gds-eval-expression</KEYWORD2>
-<KEYWORD2>gds-eval-last-sexp</KEYWORD2>
-<KEYWORD2>gds-eval-region</KEYWORD2>
-<KEYWORD2>gds-evaluate</KEYWORD2>
-<KEYWORD2>gds-frame-args</KEYWORD2>
-<KEYWORD2>gds-frame-info</KEYWORD2>
-<KEYWORD2>gds-go</KEYWORD2>
-<KEYWORD2>gds-help-symbol</KEYWORD2>
-<KEYWORD2>gds-proc-source</KEYWORD2>
-<KEYWORD2>gds-select-stack-frame</KEYWORD2>
-<KEYWORD2>gds-step-file</KEYWORD2>
-<KEYWORD2>gds-step-into</KEYWORD2>
-<KEYWORD2>gds-step-over</KEYWORD2>
-<KEYWORD2>gds-up</KEYWORD2>
-<KEYWORD2>generalized-vector->list</KEYWORD2>
-<KEYWORD2>generalized-vector-length</KEYWORD2>
-<KEYWORD2>generalized-vector-ref</KEYWORD2>
-<KEYWORD2>generalized-vector-set!</KEYWORD2>
-<KEYWORD2>generalized-vector?</KEYWORD2>
-<KEYWORD2>gensym</KEYWORD2>
-<KEYWORD2>get-internal-real-time</KEYWORD2>
-<KEYWORD2>get-internal-run-time</KEYWORD2>
-<KEYWORD2>get-output-string</KEYWORD2>
-<KEYWORD2>get-print-state</KEYWORD2>
-<KEYWORD2>get-trap</KEYWORD2>
-<KEYWORD2>getcwd</KEYWORD2>
-<KEYWORD2>getegid</KEYWORD2>
-<KEYWORD2>getenv</KEYWORD2>
-<KEYWORD2>geteuid</KEYWORD2>
-<KEYWORD2>getgid</KEYWORD2>
-<KEYWORD2>getgr</KEYWORD2>
-<KEYWORD2>getgrent</KEYWORD2>
-<KEYWORD2>getgrgid</KEYWORD2>
-<KEYWORD2>getgrnam</KEYWORD2>
-<KEYWORD2>getgroups</KEYWORD2>
-<KEYWORD2>gethost</KEYWORD2>
-<KEYWORD2>gethostbyaddr</KEYWORD2>
-<KEYWORD2>gethostbyname</KEYWORD2>
-<KEYWORD2>gethostent</KEYWORD2>
-<KEYWORD2>gethostname</KEYWORD2>
-<KEYWORD2>getitimer</KEYWORD2>
-<KEYWORD2>getlogin</KEYWORD2>
-<KEYWORD2>getnet</KEYWORD2>
-<KEYWORD2>getnetbyaddr</KEYWORD2>
-<KEYWORD2>getnetbyname</KEYWORD2>
-<KEYWORD2>getnetent</KEYWORD2>
-<KEYWORD2>getopt-long</KEYWORD2>
-<KEYWORD2>getpass</KEYWORD2>
-<KEYWORD2>getpeername</KEYWORD2>
-<KEYWORD2>getpgrp</KEYWORD2>
-<KEYWORD2>getpid</KEYWORD2>
-<KEYWORD2>getppid</KEYWORD2>
-<KEYWORD2>getpriority</KEYWORD2>
-<KEYWORD2>getproto</KEYWORD2>
-<KEYWORD2>getprotobyname</KEYWORD2>
-<KEYWORD2>getprotobynumber</KEYWORD2>
-<KEYWORD2>getprotoent</KEYWORD2>
-<KEYWORD2>getpw</KEYWORD2>
-<KEYWORD2>getpwent</KEYWORD2>
-<KEYWORD2>getpwnam</KEYWORD2>
-<KEYWORD2>getpwuid</KEYWORD2>
-<KEYWORD2>getserv</KEYWORD2>
-<KEYWORD2>getservbyname</KEYWORD2>
-<KEYWORD2>getservbyport</KEYWORD2>
-<KEYWORD2>getservent</KEYWORD2>
-<KEYWORD2>getsockname</KEYWORD2>
-<KEYWORD2>getsockopt</KEYWORD2>
-<KEYWORD2>getter-with-setter</KEYWORD2>
-<KEYWORD2>gettext</KEYWORD2>
-<KEYWORD2>gettimeofday</KEYWORD2>
-<KEYWORD2>getuid</KEYWORD2>
-<KEYWORD2>GH_ALLOW_INTS</KEYWORD2>
-<KEYWORD2>gh_append</KEYWORD2>
-<KEYWORD2>gh_append2</KEYWORD2>
-<KEYWORD2>gh_append3</KEYWORD2>
-<KEYWORD2>gh_append4</KEYWORD2>
-<KEYWORD2>gh_apply</KEYWORD2>
-<KEYWORD2>gh_assoc</KEYWORD2>
-<KEYWORD2>gh_assq</KEYWORD2>
-<KEYWORD2>gh_assv</KEYWORD2>
-<KEYWORD2>gh_bool2scm</KEYWORD2>
-<KEYWORD2>gh_boolean_p</KEYWORD2>
-<KEYWORD2>gh_c</KEYWORD2>
-<KEYWORD2>gh_call0</KEYWORD2>
-<KEYWORD2>gh_call1</KEYWORD2>
-<KEYWORD2>gh_call2</KEYWORD2>
-<KEYWORD2>gh_call3</KEYWORD2>
-<KEYWORD2>gh_car</KEYWORD2>
-<KEYWORD2>gh_catch</KEYWORD2>
-<KEYWORD2>gh_cdr</KEYWORD2>
-<KEYWORD2>gh_char2scm</KEYWORD2>
-<KEYWORD2>gh_char_p</KEYWORD2>
-<KEYWORD2>gh_chars2byvect</KEYWORD2>
-<KEYWORD2>gh_cons</KEYWORD2>
-<KEYWORD2>GH_DEFER_INTS</KEYWORD2>
-<KEYWORD2>gh_define</KEYWORD2>
-<KEYWORD2>gh_double2scm</KEYWORD2>
-<KEYWORD2>gh_doubles2dvect</KEYWORD2>
-<KEYWORD2>gh_doubles2scm</KEYWORD2>
-<KEYWORD2>gh_enter</KEYWORD2>
-<KEYWORD2>gh_eq_p</KEYWORD2>
-<KEYWORD2>gh_equal_p</KEYWORD2>
-<KEYWORD2>gh_eqv_p</KEYWORD2>
-<KEYWORD2>gh_eval_file</KEYWORD2>
-<KEYWORD2>gh_eval_str</KEYWORD2>
-<KEYWORD2>gh_exact_p</KEYWORD2>
-<KEYWORD2>gh_floats2fvect</KEYWORD2>
-<KEYWORD2>gh_get_substr</KEYWORD2>
-<KEYWORD2>gh_inexact_p</KEYWORD2>
-<KEYWORD2>gh_ints2scm</KEYWORD2>
-<KEYWORD2>gh_is_eq</KEYWORD2>
-<KEYWORD2>gh_is_equal</KEYWORD2>
-<KEYWORD2>gh_is_eqv</KEYWORD2>
-<KEYWORD2>gh_length</KEYWORD2>
-<KEYWORD2>gh_list</KEYWORD2>
-<KEYWORD2>gh_list_p</KEYWORD2>
-<KEYWORD2>gh_list_ref</KEYWORD2>
-<KEYWORD2>gh_list_tail</KEYWORD2>
-<KEYWORD2>gh_list_to_vector</KEYWORD2>
-<KEYWORD2>gh_load</KEYWORD2>
-<KEYWORD2>gh_long2scm</KEYWORD2>
-<KEYWORD2>gh_longs2ivect</KEYWORD2>
-<KEYWORD2>gh_make_vector</KEYWORD2>
-<KEYWORD2>gh_member</KEYWORD2>
-<KEYWORD2>gh_memq</KEYWORD2>
-<KEYWORD2>gh_memv</KEYWORD2>
-<KEYWORD2>gh_new_procedure</KEYWORD2>
-<KEYWORD2>gh_null_p</KEYWORD2>
-<KEYWORD2>gh_obj_length</KEYWORD2>
-<KEYWORD2>gh_pair_p</KEYWORD2>
-<KEYWORD2>gh_procedure_p</KEYWORD2>
-<KEYWORD2>gh_repl</KEYWORD2>
-<KEYWORD2>gh_reverse</KEYWORD2>
-<KEYWORD2>gh_scm2bool</KEYWORD2>
-<KEYWORD2>gh_scm2char</KEYWORD2>
-<KEYWORD2>gh_scm2chars</KEYWORD2>
-<KEYWORD2>gh_scm2double</KEYWORD2>
-<KEYWORD2>gh_scm2doubles</KEYWORD2>
-<KEYWORD2>gh_scm2floats</KEYWORD2>
-<KEYWORD2>gh_scm2long</KEYWORD2>
-<KEYWORD2>gh_scm2longs</KEYWORD2>
-<KEYWORD2>gh_scm2newstr</KEYWORD2>
-<KEYWORD2>gh_scm2shorts</KEYWORD2>
-<KEYWORD2>gh_scm2ulong</KEYWORD2>
-<KEYWORD2>gh_set_car_x</KEYWORD2>
-<KEYWORD2>gh_set_cdr_x</KEYWORD2>
-<KEYWORD2>gh_set_substr</KEYWORD2>
-<KEYWORD2>gh_shorts2svect</KEYWORD2>
-<KEYWORD2>gh_str02scm</KEYWORD2>
-<KEYWORD2>gh_str2scm</KEYWORD2>
-<KEYWORD2>gh_string_equal_p</KEYWORD2>
-<KEYWORD2>gh_symbol2newstr</KEYWORD2>
-<KEYWORD2>gh_symbol2scm</KEYWORD2>
-<KEYWORD2>gh_symbol_p</KEYWORD2>
-<KEYWORD2>gh_throw</KEYWORD2>
-<KEYWORD2>gh_ulong2scm</KEYWORD2>
-<KEYWORD2>gh_ulongs2uvect</KEYWORD2>
-<KEYWORD2>gh_vector</KEYWORD2>
-<KEYWORD2>gh_vector_length</KEYWORD2>
-<KEYWORD2>gh_vector_p</KEYWORD2>
-<KEYWORD2>gh_vector_ref</KEYWORD2>
-<KEYWORD2>gh_vector_set</KEYWORD2>
-<KEYWORD2>gmtime</KEYWORD2>
-<KEYWORD2>group:gid</KEYWORD2>
-<KEYWORD2>group:mem</KEYWORD2>
-<KEYWORD2>group:name</KEYWORD2>
-<KEYWORD2>group:passwd</KEYWORD2>
-<KEYWORD2>GUILE_CHECK_RETVAL</KEYWORD2>
-<KEYWORD2>GUILE_FLAGS</KEYWORD2>
-<KEYWORD2>GUILE_MODULE_AVAILABLE</KEYWORD2>
-<KEYWORD2>GUILE_MODULE_CHECK</KEYWORD2>
-<KEYWORD2>GUILE_MODULE_EXPORTS</KEYWORD2>
-<KEYWORD2>GUILE_MODULE_REQUIRED</KEYWORD2>
-<KEYWORD2>GUILE_MODULE_REQUIRED_EXPORT</KEYWORD2>
-<KEYWORD2>GUILE_PROGS</KEYWORD2>
-<KEYWORD2>GUILE_SITE_DIR</KEYWORD2>
-<KEYWORD2>hash</KEYWORD2>
-<KEYWORD2>hash</KEYWORD2>
-<KEYWORD2>hash-by-identity</KEYWORD2>
-<KEYWORD2>hash-clear!</KEYWORD2>
-<KEYWORD2>hash-create-handle!</KEYWORD2>
-<KEYWORD2>hash-fold</KEYWORD2>
-<KEYWORD2>hash-for-each</KEYWORD2>
-<KEYWORD2>hash-for-each-handle</KEYWORD2>
-<KEYWORD2>hash-get-handle</KEYWORD2>
-<KEYWORD2>hash-map->list</KEYWORD2>
-<KEYWORD2>hash-ref</KEYWORD2>
-<KEYWORD2>hash-remove!</KEYWORD2>
-<KEYWORD2>hash-set!</KEYWORD2>
-<KEYWORD2>hash-table->alist</KEYWORD2>
-<KEYWORD2>hash-table-delete!</KEYWORD2>
-<KEYWORD2>hash-table-equivalence-function</KEYWORD2>
-<KEYWORD2>hash-table-exists?</KEYWORD2>
-<KEYWORD2>hash-table-fold</KEYWORD2>
-<KEYWORD2>hash-table-hash-function</KEYWORD2>
-<KEYWORD2>hash-table-keys</KEYWORD2>
-<KEYWORD2>hash-table-ref</KEYWORD2>
-<KEYWORD2>hash-table-ref/default</KEYWORD2>
-<KEYWORD2>hash-table-set!</KEYWORD2>
-<KEYWORD2>hash-table-size</KEYWORD2>
-<KEYWORD2>hash-table-update!</KEYWORD2>
-<KEYWORD2>hash-table-update!/default</KEYWORD2>
-<KEYWORD2>hash-table-values</KEYWORD2>
-<KEYWORD2>hash-table-walk</KEYWORD2>
-<KEYWORD2>hash-table?</KEYWORD2>
-<KEYWORD2>hashq</KEYWORD2>
-<KEYWORD2>hashq-create-handle!</KEYWORD2>
-<KEYWORD2>hashq-get-handle</KEYWORD2>
-<KEYWORD2>hashq-ref</KEYWORD2>
-<KEYWORD2>hashq-remove!</KEYWORD2>
-<KEYWORD2>hashq-set!</KEYWORD2>
-<KEYWORD2>hashv</KEYWORD2>
-<KEYWORD2>hashv-create-handle!</KEYWORD2>
-<KEYWORD2>hashv-get-handle</KEYWORD2>
-<KEYWORD2>hashv-ref</KEYWORD2>
-<KEYWORD2>hashv-remove!</KEYWORD2>
-<KEYWORD2>hashv-set!</KEYWORD2>
-<KEYWORD2>hashx-create-handle!</KEYWORD2>
-<KEYWORD2>hashx-get-handle</KEYWORD2>
-<KEYWORD2>hashx-ref</KEYWORD2>
-<KEYWORD2>hashx-remove!</KEYWORD2>
-<KEYWORD2>hashx-set!</KEYWORD2>
-<KEYWORD2>hook->list</KEYWORD2>
-<KEYWORD2>hook-empty?</KEYWORD2>
-<KEYWORD2>hook?</KEYWORD2>
-<KEYWORD2>hostent:addr-list</KEYWORD2>
-<KEYWORD2>hostent:addrtype</KEYWORD2>
-<KEYWORD2>hostent:aliases</KEYWORD2>
-<KEYWORD2>hostent:length</KEYWORD2>
-<KEYWORD2>hostent:name</KEYWORD2>
-<KEYWORD2>htonl</KEYWORD2>
-<KEYWORD2>htons</KEYWORD2>
-<KEYWORD2>if</KEYWORD2>
-<KEYWORD2>imag-part</KEYWORD2>
-<KEYWORD2>inet-aton</KEYWORD2>
-<KEYWORD2>inet-lnaof</KEYWORD2>
-<KEYWORD2>inet-makeaddr</KEYWORD2>
-<KEYWORD2>inet-netof</KEYWORD2>
-<KEYWORD2>inet-ntoa</KEYWORD2>
-<KEYWORD2>inet-ntop</KEYWORD2>
-<KEYWORD2>inet-pton</KEYWORD2>
-<KEYWORD2>inexact->exact</KEYWORD2>
-<KEYWORD2>inexact?</KEYWORD2>
-<KEYWORD2>inf</KEYWORD2>
-<KEYWORD2>inf?</KEYWORD2>
-<KEYWORD2>info args</KEYWORD2>
-<KEYWORD2>info frame</KEYWORD2>
-<KEYWORD2>input-port?</KEYWORD2>
-<KEYWORD2>install-trap</KEYWORD2>
-<KEYWORD2>integer->char</KEYWORD2>
-<KEYWORD2>integer->list</KEYWORD2>
-<KEYWORD2>integer-expt</KEYWORD2>
-<KEYWORD2>integer-length</KEYWORD2>
-<KEYWORD2>integer?</KEYWORD2>
-<KEYWORD2>interaction-environment</KEYWORD2>
-<KEYWORD2>iota</KEYWORD2>
-<KEYWORD2>isatty?</KEYWORD2>
-<KEYWORD2>join-thread</KEYWORD2>
-<KEYWORD2>julian-day->date</KEYWORD2>
-<KEYWORD2>julian-day->time-monotonic</KEYWORD2>
-<KEYWORD2>julian-day->time-tai</KEYWORD2>
-<KEYWORD2>julian-day->time-utc</KEYWORD2>
-<KEYWORD2>key</KEYWORD2>
-<KEYWORD2>keyword->string</KEYWORD2>
-<KEYWORD2>keyword->symbol</KEYWORD2>
-<KEYWORD2>keyword?</KEYWORD2>
-<KEYWORD2>keyword?</KEYWORD2>
-<KEYWORD2>kill</KEYWORD2>
-<KEYWORD2>lambda</KEYWORD2>
-<KEYWORD2>lambda*</KEYWORD2>
-<KEYWORD2>last</KEYWORD2>
-<KEYWORD2>last-pair</KEYWORD2>
-<KEYWORD2>last-stack-frame</KEYWORD2>
-<KEYWORD2>lazy-catch</KEYWORD2>
-<KEYWORD2>lchown</KEYWORD2>
-<KEYWORD2>lcm</KEYWORD2>
-<KEYWORD2>length</KEYWORD2>
-<KEYWORD2>length+</KEYWORD2>
-<KEYWORD2>let</KEYWORD2>
-<KEYWORD2>let*</KEYWORD2>
-<KEYWORD2>let*-values</KEYWORD2>
-<KEYWORD2>let-keywords</KEYWORD2>
-<KEYWORD2>let-keywords*</KEYWORD2>
-<KEYWORD2>let-optional</KEYWORD2>
-<KEYWORD2>let-optional*</KEYWORD2>
-<KEYWORD2>let-values</KEYWORD2>
-<KEYWORD2>letpar</KEYWORD2>
-<KEYWORD2>letrec</KEYWORD2>
-<KEYWORD2>link</KEYWORD2>
-<KEYWORD2>list</KEYWORD2>
-<KEYWORD2>list->array</KEYWORD2>
-<KEYWORD2>list->bitvector</KEYWORD2>
-<KEYWORD2>list->c32vector</KEYWORD2>
-<KEYWORD2>list->c64vector</KEYWORD2>
-<KEYWORD2>list->char-set</KEYWORD2>
-<KEYWORD2>list->char-set!</KEYWORD2>
-<KEYWORD2>list->f32vector</KEYWORD2>
-<KEYWORD2>list->f64vector</KEYWORD2>
-<KEYWORD2>list->integer</KEYWORD2>
-<KEYWORD2>list->s16vector</KEYWORD2>
-<KEYWORD2>list->s32vector</KEYWORD2>
-<KEYWORD2>list->s64vector</KEYWORD2>
-<KEYWORD2>list->s8vector</KEYWORD2>
-<KEYWORD2>list->stream</KEYWORD2>
-<KEYWORD2>list->string</KEYWORD2>
-<KEYWORD2>list->typed-array</KEYWORD2>
-<KEYWORD2>list->u16vector</KEYWORD2>
-<KEYWORD2>list->u32vector</KEYWORD2>
-<KEYWORD2>list->u64vector</KEYWORD2>
-<KEYWORD2>list->u8vector</KEYWORD2>
-<KEYWORD2>list->vector</KEYWORD2>
-<KEYWORD2>list->weak-vector</KEYWORD2>
-<KEYWORD2>list-cdr-ref</KEYWORD2>
-<KEYWORD2>list-cdr-set!</KEYWORD2>
-<KEYWORD2>list-copy</KEYWORD2>
-<KEYWORD2>list-copy</KEYWORD2>
-<KEYWORD2>list-head</KEYWORD2>
-<KEYWORD2>list-index</KEYWORD2>
-<KEYWORD2>list-matches</KEYWORD2>
-<KEYWORD2>list-ref</KEYWORD2>
-<KEYWORD2>list-set!</KEYWORD2>
-<KEYWORD2>list-tabulate</KEYWORD2>
-<KEYWORD2>list-tail</KEYWORD2>
-<KEYWORD2>list-traps</KEYWORD2>
-<KEYWORD2>list=</KEYWORD2>
-<KEYWORD2>list?</KEYWORD2>
-<KEYWORD2>listen</KEYWORD2>
-<KEYWORD2>load</KEYWORD2>
-<KEYWORD2>load-extension</KEYWORD2>
-<KEYWORD2>load-from-path</KEYWORD2>
-<KEYWORD2>local-eval</KEYWORD2>
-<KEYWORD2>localtime</KEYWORD2>
-<KEYWORD2>lock-mutex</KEYWORD2>
-<KEYWORD2>log</KEYWORD2>
-<KEYWORD2>log10</KEYWORD2>
-<KEYWORD2>log2-binary-factors</KEYWORD2>
-<KEYWORD2>logand</KEYWORD2>
-<KEYWORD2>logbit?</KEYWORD2>
-<KEYWORD2>logcount</KEYWORD2>
-<KEYWORD2>logior</KEYWORD2>
-<KEYWORD2>lognot</KEYWORD2>
-<KEYWORD2>logtest</KEYWORD2>
-<KEYWORD2>logxor</KEYWORD2>
-<KEYWORD2>lset-adjoin</KEYWORD2>
-<KEYWORD2>lset-diff+intersection</KEYWORD2>
-<KEYWORD2>lset-diff+intersection!</KEYWORD2>
-<KEYWORD2>lset-difference</KEYWORD2>
-<KEYWORD2>lset-difference!</KEYWORD2>
-<KEYWORD2>lset-intersection</KEYWORD2>
-<KEYWORD2>lset-intersection!</KEYWORD2>
-<KEYWORD2>lset-union</KEYWORD2>
-<KEYWORD2>lset-union!</KEYWORD2>
-<KEYWORD2>lset-xor</KEYWORD2>
-<KEYWORD2>lset-xor!</KEYWORD2>
-<KEYWORD2>lset<=</KEYWORD2>
-<KEYWORD2>lset=</KEYWORD2>
-<KEYWORD2>lstat</KEYWORD2>
-<KEYWORD2>macro-name</KEYWORD2>
-<KEYWORD2>macro-transformer</KEYWORD2>
-<KEYWORD2>macro-type</KEYWORD2>
-<KEYWORD2>macro?</KEYWORD2>
-<KEYWORD2>magnitude</KEYWORD2>
-<KEYWORD2>main_prog</KEYWORD2>
-<KEYWORD2>major-version</KEYWORD2>
-<KEYWORD2>make-arbiter</KEYWORD2>
-<KEYWORD2>make-array</KEYWORD2>
-<KEYWORD2>make-bitvector</KEYWORD2>
-<KEYWORD2>make-buffered-input-port</KEYWORD2>
-<KEYWORD2>make-c32vector</KEYWORD2>
-<KEYWORD2>make-c64vector</KEYWORD2>
-<KEYWORD2>make-class-object</KEYWORD2>
-<KEYWORD2>make-completion-function</KEYWORD2>
-<KEYWORD2>make-compound-condition</KEYWORD2>
-<KEYWORD2>make-condition</KEYWORD2>
-<KEYWORD2>make-condition-type</KEYWORD2>
-<KEYWORD2>make-condition-variable</KEYWORD2>
-<KEYWORD2>make-date</KEYWORD2>
-<KEYWORD2>make-doubly-weak-hash-table</KEYWORD2>
-<KEYWORD2>make-dynamic-state</KEYWORD2>
-<KEYWORD2>make-f32vector</KEYWORD2>
-<KEYWORD2>make-f64vector</KEYWORD2>
-<KEYWORD2>make-fluid</KEYWORD2>
-<KEYWORD2>make-guardian</KEYWORD2>
-<KEYWORD2>make-hash-table</KEYWORD2>
-<KEYWORD2>make-hash-table</KEYWORD2>
-<KEYWORD2>make-hook</KEYWORD2>
-<KEYWORD2>make-line-buffered-input-port</KEYWORD2>
-<KEYWORD2>make-list</KEYWORD2>
-<KEYWORD2>make-mutex</KEYWORD2>
-<KEYWORD2>make-object-property</KEYWORD2>
-<KEYWORD2>make-parameter</KEYWORD2>
-<KEYWORD2>make-polar</KEYWORD2>
-<KEYWORD2>make-procedure-with-setter</KEYWORD2>
-<KEYWORD2>make-q</KEYWORD2>
-<KEYWORD2>make-record-type</KEYWORD2>
-<KEYWORD2>make-rectangular</KEYWORD2>
-<KEYWORD2>make-recursive-mutex</KEYWORD2>
-<KEYWORD2>make-regexp</KEYWORD2>
-<KEYWORD2>make-s16vector</KEYWORD2>
-<KEYWORD2>make-s32vector</KEYWORD2>
-<KEYWORD2>make-s64vector</KEYWORD2>
-<KEYWORD2>make-s8vector</KEYWORD2>
-<KEYWORD2>make-shared-array</KEYWORD2>
-<KEYWORD2>make-socket-address</KEYWORD2>
-<KEYWORD2>make-soft-port</KEYWORD2>
-<KEYWORD2>make-stack</KEYWORD2>
-<KEYWORD2>make-stream</KEYWORD2>
-<KEYWORD2>make-string</KEYWORD2>
-<KEYWORD2>make-struct</KEYWORD2>
-<KEYWORD2>make-struct-layout</KEYWORD2>
-<KEYWORD2>make-subclass-object</KEYWORD2>
-<KEYWORD2>make-symbol</KEYWORD2>
-<KEYWORD2>make-thread</KEYWORD2>
-<KEYWORD2>make-time</KEYWORD2>
-<KEYWORD2>make-typed-array</KEYWORD2>
-<KEYWORD2>make-u16vector</KEYWORD2>
-<KEYWORD2>make-u32vector</KEYWORD2>
-<KEYWORD2>make-u64vector</KEYWORD2>
-<KEYWORD2>make-u8vector</KEYWORD2>
-<KEYWORD2>make-undefined-variable</KEYWORD2>
-<KEYWORD2>make-variable</KEYWORD2>
-<KEYWORD2>make-vector</KEYWORD2>
-<KEYWORD2>make-vtable</KEYWORD2>
-<KEYWORD2>make-vtable-vtable</KEYWORD2>
-<KEYWORD2>make-weak-key-hash-table</KEYWORD2>
-<KEYWORD2>make-weak-value-hash-table</KEYWORD2>
-<KEYWORD2>make-weak-vector</KEYWORD2>
-<KEYWORD2>malloc-stats</KEYWORD2>
-<KEYWORD2>map</KEYWORD2>
-<KEYWORD2>map</KEYWORD2>
-<KEYWORD2>map!</KEYWORD2>
-<KEYWORD2>map-in-order</KEYWORD2>
-<KEYWORD2>match:count</KEYWORD2>
-<KEYWORD2>match:end</KEYWORD2>
-<KEYWORD2>match:prefix</KEYWORD2>
-<KEYWORD2>match:start</KEYWORD2>
-<KEYWORD2>match:string</KEYWORD2>
-<KEYWORD2>match:substring</KEYWORD2>
-<KEYWORD2>match:suffix</KEYWORD2>
-<KEYWORD2>max</KEYWORD2>
-<KEYWORD2>member</KEYWORD2>
-<KEYWORD2>member</KEYWORD2>
-<KEYWORD2>memoized-environment</KEYWORD2>
-<KEYWORD2>memoized?</KEYWORD2>
-<KEYWORD2>memq</KEYWORD2>
-<KEYWORD2>memv</KEYWORD2>
-<KEYWORD2>merge</KEYWORD2>
-<KEYWORD2>merge!</KEYWORD2>
-<KEYWORD2>message-condition?</KEYWORD2>
-<KEYWORD2>micro-version</KEYWORD2>
-<KEYWORD2>min</KEYWORD2>
-<KEYWORD2>minor-version</KEYWORD2>
-<KEYWORD2>mkdir</KEYWORD2>
-<KEYWORD2>mknod</KEYWORD2>
-<KEYWORD2>mkstemp!</KEYWORD2>
-<KEYWORD2>mktime</KEYWORD2>
-<KEYWORD2>modified-julian-day->date</KEYWORD2>
-<KEYWORD2>modified-julian-day->time-monotonic</KEYWORD2>
-<KEYWORD2>modified-julian-day->time-tai</KEYWORD2>
-<KEYWORD2>modified-julian-day->time-utc</KEYWORD2>
-<KEYWORD2>module-use!</KEYWORD2>
-<KEYWORD2>modulo</KEYWORD2>
-<KEYWORD2>modulo-expt</KEYWORD2>
-<KEYWORD2>monitor</KEYWORD2>
-<KEYWORD2>move->fdes</KEYWORD2>
-<KEYWORD2>n-for-each-par-map</KEYWORD2>
-<KEYWORD2>n-par-for-each</KEYWORD2>
-<KEYWORD2>n-par-map</KEYWORD2>
-<KEYWORD2>nan</KEYWORD2>
-<KEYWORD2>nan?</KEYWORD2>
-<KEYWORD2>negative?</KEYWORD2>
-<KEYWORD2>netent:addrtype</KEYWORD2>
-<KEYWORD2>netent:aliases</KEYWORD2>
-<KEYWORD2>netent:name</KEYWORD2>
-<KEYWORD2>netent:net</KEYWORD2>
-<KEYWORD2>newline</KEYWORD2>
-<KEYWORD2>next</KEYWORD2>
-<KEYWORD2>nftw</KEYWORD2>
-<KEYWORD2>ngettext</KEYWORD2>
-<KEYWORD2>nice</KEYWORD2>
-<KEYWORD2>nil-car</KEYWORD2>
-<KEYWORD2>nil-cdr</KEYWORD2>
-<KEYWORD2>nil-cons</KEYWORD2>
-<KEYWORD2>nil-eq</KEYWORD2>
-<KEYWORD2>ninth</KEYWORD2>
-<KEYWORD2>not</KEYWORD2>
-<KEYWORD2>not-pair?</KEYWORD2>
-<KEYWORD2>ntohl</KEYWORD2>
-<KEYWORD2>ntohs</KEYWORD2>
-<KEYWORD2>null</KEYWORD2>
-<KEYWORD2>null-environment</KEYWORD2>
-<KEYWORD2>null-list?</KEYWORD2>
-<KEYWORD2>null?</KEYWORD2>
-<KEYWORD2>number->string</KEYWORD2>
-<KEYWORD2>number?</KEYWORD2>
-<KEYWORD2>numerator</KEYWORD2>
-<KEYWORD2>object->string</KEYWORD2>
-<KEYWORD2>object-properties</KEYWORD2>
-<KEYWORD2>object-property</KEYWORD2>
-<KEYWORD2>odd?</KEYWORD2>
-<KEYWORD2>open</KEYWORD2>
-<KEYWORD2>open-fdes</KEYWORD2>
-<KEYWORD2>open-file</KEYWORD2>
-<KEYWORD2>open-input-file</KEYWORD2>
-<KEYWORD2>open-input-output-pipe</KEYWORD2>
-<KEYWORD2>open-input-pipe</KEYWORD2>
-<KEYWORD2>open-input-string</KEYWORD2>
-<KEYWORD2>open-output-file</KEYWORD2>
-<KEYWORD2>open-output-pipe</KEYWORD2>
-<KEYWORD2>open-output-string</KEYWORD2>
-<KEYWORD2>open-pipe</KEYWORD2>
-<KEYWORD2>open-pipe*</KEYWORD2>
-<KEYWORD2>opendir</KEYWORD2>
-<KEYWORD2>operator?</KEYWORD2>
-<KEYWORD2>option</KEYWORD2>
-<KEYWORD2>option-names</KEYWORD2>
-<KEYWORD2>option-optional-arg?</KEYWORD2>
-<KEYWORD2>option-processor</KEYWORD2>
-<KEYWORD2>option-ref</KEYWORD2>
-<KEYWORD2>option-required-arg?</KEYWORD2>
-<KEYWORD2>or</KEYWORD2>
-<KEYWORD2>output-port?</KEYWORD2>
-<KEYWORD2>pair-fold</KEYWORD2>
-<KEYWORD2>pair-fold-right</KEYWORD2>
-<KEYWORD2>pair-for-each</KEYWORD2>
-<KEYWORD2>pair?</KEYWORD2>
-<KEYWORD2>par-for-each</KEYWORD2>
-<KEYWORD2>par-map</KEYWORD2>
-<KEYWORD2>parallel</KEYWORD2>
-<KEYWORD2>parameterize</KEYWORD2>
-<KEYWORD2>parse-path</KEYWORD2>
-<KEYWORD2>partition</KEYWORD2>
-<KEYWORD2>partition!</KEYWORD2>
-<KEYWORD2>passwd:dir</KEYWORD2>
-<KEYWORD2>passwd:gecos</KEYWORD2>
-<KEYWORD2>passwd:gid</KEYWORD2>
-<KEYWORD2>passwd:name</KEYWORD2>
-<KEYWORD2>passwd:passwd</KEYWORD2>
-<KEYWORD2>passwd:shell</KEYWORD2>
-<KEYWORD2>passwd:uid</KEYWORD2>
-<KEYWORD2>pause</KEYWORD2>
-<KEYWORD2>pclose</KEYWORD2>
-<KEYWORD2>peek-char</KEYWORD2>
-<KEYWORD2>pipe</KEYWORD2>
-<KEYWORD2>PKG_CHECK_MODULES</KEYWORD2>
-<KEYWORD2>popen</KEYWORD2>
-<KEYWORD2>port->fdes</KEYWORD2>
-<KEYWORD2>port->stream</KEYWORD2>
-<KEYWORD2>port-closed?</KEYWORD2>
-<KEYWORD2>port-column</KEYWORD2>
-<KEYWORD2>port-filename</KEYWORD2>
-<KEYWORD2>port-for-each</KEYWORD2>
-<KEYWORD2>port-line</KEYWORD2>
-<KEYWORD2>port-mode</KEYWORD2>
-<KEYWORD2>port-mode</KEYWORD2>
-<KEYWORD2>port-revealed</KEYWORD2>
-<KEYWORD2>port-with-print-state</KEYWORD2>
-<KEYWORD2>port?</KEYWORD2>
-<KEYWORD2>position</KEYWORD2>
-<KEYWORD2>positive?</KEYWORD2>
-<KEYWORD2>pretty-print</KEYWORD2>
-<KEYWORD2>primitive-_exit</KEYWORD2>
-<KEYWORD2>primitive-eval</KEYWORD2>
-<KEYWORD2>primitive-exit</KEYWORD2>
-<KEYWORD2>primitive-fork</KEYWORD2>
-<KEYWORD2>primitive-load</KEYWORD2>
-<KEYWORD2>primitive-load-path</KEYWORD2>
-<KEYWORD2>primitive-make-property</KEYWORD2>
-<KEYWORD2>primitive-move->fdes</KEYWORD2>
-<KEYWORD2>primitive-property-del!</KEYWORD2>
-<KEYWORD2>primitive-property-ref</KEYWORD2>
-<KEYWORD2>primitive-property-set!</KEYWORD2>
-<KEYWORD2>print-disable</KEYWORD2>
-<KEYWORD2>print-enable</KEYWORD2>
-<KEYWORD2>print-options</KEYWORD2>
-<KEYWORD2>print-options-interface</KEYWORD2>
-<KEYWORD2>print-options-interface</KEYWORD2>
-<KEYWORD2>print-set!</KEYWORD2>
-<KEYWORD2>procedure</KEYWORD2>
-<KEYWORD2>procedure->macro</KEYWORD2>
-<KEYWORD2>procedure->memoizing-macro</KEYWORD2>
-<KEYWORD2>procedure->syntax</KEYWORD2>
-<KEYWORD2>procedure-documentation</KEYWORD2>
-<KEYWORD2>procedure-environment</KEYWORD2>
-<KEYWORD2>procedure-name</KEYWORD2>
-<KEYWORD2>procedure-properties</KEYWORD2>
-<KEYWORD2>procedure-property</KEYWORD2>
-<KEYWORD2>procedure-source</KEYWORD2>
-<KEYWORD2>procedure-with-setter?</KEYWORD2>
-<KEYWORD2>procedure?</KEYWORD2>
-<KEYWORD2>program-arguments</KEYWORD2>
-<KEYWORD2>promise?</KEYWORD2>
-<KEYWORD2>proper-list?</KEYWORD2>
-<KEYWORD2>protoent:aliases</KEYWORD2>
-<KEYWORD2>protoent:name</KEYWORD2>
-<KEYWORD2>protoent:proto</KEYWORD2>
-<KEYWORD2>provide</KEYWORD2>
-<KEYWORD2>provided?</KEYWORD2>
-<KEYWORD2>PTR2SCM</KEYWORD2>
-<KEYWORD2>putenv</KEYWORD2>
-<KEYWORD2>pwd</KEYWORD2>
-<KEYWORD2>q-empty-check</KEYWORD2>
-<KEYWORD2>q-empty?</KEYWORD2>
-<KEYWORD2>q-front</KEYWORD2>
-<KEYWORD2>q-length</KEYWORD2>
-<KEYWORD2>q-pop!</KEYWORD2>
-<KEYWORD2>q-push!</KEYWORD2>
-<KEYWORD2>q-rear</KEYWORD2>
-<KEYWORD2>q-remove!</KEYWORD2>
-<KEYWORD2>q?</KEYWORD2>
-<KEYWORD2>quasiquote</KEYWORD2>
-<KEYWORD2>quit</KEYWORD2>
-<KEYWORD2>quote</KEYWORD2>
-<KEYWORD2>quotient</KEYWORD2>
-<KEYWORD2>raise</KEYWORD2>
-<KEYWORD2>random</KEYWORD2>
-<KEYWORD2>random:exp</KEYWORD2>
-<KEYWORD2>random:hollow-sphere!</KEYWORD2>
-<KEYWORD2>random:normal</KEYWORD2>
-<KEYWORD2>random:normal-vector!</KEYWORD2>
-<KEYWORD2>random:solid-sphere!</KEYWORD2>
-<KEYWORD2>random:uniform</KEYWORD2>
-<KEYWORD2>rational?</KEYWORD2>
-<KEYWORD2>rationalize</KEYWORD2>
-<KEYWORD2>re-export</KEYWORD2>
-<KEYWORD2>read</KEYWORD2>
-<KEYWORD2>read-char</KEYWORD2>
-<KEYWORD2>read-delimited</KEYWORD2>
-<KEYWORD2>read-delimited!</KEYWORD2>
-<KEYWORD2>read-disable</KEYWORD2>
-<KEYWORD2>read-disable</KEYWORD2>
-<KEYWORD2>read-enable</KEYWORD2>
-<KEYWORD2>read-enable</KEYWORD2>
-<KEYWORD2>read-hash-extend</KEYWORD2>
-<KEYWORD2>read-line</KEYWORD2>
-<KEYWORD2>read-line!</KEYWORD2>
-<KEYWORD2>read-options</KEYWORD2>
-<KEYWORD2>read-options</KEYWORD2>
-<KEYWORD2>read-options-interface</KEYWORD2>
-<KEYWORD2>read-options-interface</KEYWORD2>
-<KEYWORD2>read-set!</KEYWORD2>
-<KEYWORD2>read-set!</KEYWORD2>
-<KEYWORD2>read-string!/partial</KEYWORD2>
-<KEYWORD2>readdir</KEYWORD2>
-<KEYWORD2>readline</KEYWORD2>
-<KEYWORD2>readline-disable</KEYWORD2>
-<KEYWORD2>readline-enable</KEYWORD2>
-<KEYWORD2>readline-options</KEYWORD2>
-<KEYWORD2>readline-port</KEYWORD2>
-<KEYWORD2>readline-set!</KEYWORD2>
-<KEYWORD2>readlink</KEYWORD2>
-<KEYWORD2>real-part</KEYWORD2>
-<KEYWORD2>real?</KEYWORD2>
-<KEYWORD2>rec</KEYWORD2>
-<KEYWORD2>receive</KEYWORD2>
-<KEYWORD2>record-accessor</KEYWORD2>
-<KEYWORD2>record-constructor</KEYWORD2>
-<KEYWORD2>record-modifier</KEYWORD2>
-<KEYWORD2>record-predicate</KEYWORD2>
-<KEYWORD2>record-type-descriptor</KEYWORD2>
-<KEYWORD2>record-type-fields</KEYWORD2>
-<KEYWORD2>record-type-name</KEYWORD2>
-<KEYWORD2>record?</KEYWORD2>
-<KEYWORD2>recv!</KEYWORD2>
-<KEYWORD2>recvfrom!</KEYWORD2>
-<KEYWORD2>redirect-port</KEYWORD2>
-<KEYWORD2>reduce</KEYWORD2>
-<KEYWORD2>reduce-right</KEYWORD2>
-<KEYWORD2>regexp-exec</KEYWORD2>
-<KEYWORD2>regexp-match?</KEYWORD2>
-<KEYWORD2>regexp-quote</KEYWORD2>
-<KEYWORD2>regexp-substitute</KEYWORD2>
-<KEYWORD2>regexp-substitute/global</KEYWORD2>
-<KEYWORD2>regexp?</KEYWORD2>
-<KEYWORD2>release-arbiter</KEYWORD2>
-<KEYWORD2>release-port-handle</KEYWORD2>
-<KEYWORD2>remainder</KEYWORD2>
-<KEYWORD2>remove</KEYWORD2>
-<KEYWORD2>remove!</KEYWORD2>
-<KEYWORD2>remove-hook!</KEYWORD2>
-<KEYWORD2>rename</KEYWORD2>
-<KEYWORD2>rename-file</KEYWORD2>
-<KEYWORD2>require</KEYWORD2>
-<KEYWORD2>require-extension</KEYWORD2>
-<KEYWORD2>reset-hook!</KEYWORD2>
-<KEYWORD2>resolve-interface</KEYWORD2>
-<KEYWORD2>resolve-module</KEYWORD2>
-<KEYWORD2>restore-signals</KEYWORD2>
-<KEYWORD2>restricted-vector-sort!</KEYWORD2>
-<KEYWORD2>reverse</KEYWORD2>
-<KEYWORD2>reverse!</KEYWORD2>
-<KEYWORD2>reverse-bit-field</KEYWORD2>
-<KEYWORD2>reverse-list->string</KEYWORD2>
-<KEYWORD2>rewinddir</KEYWORD2>
-<KEYWORD2>rmdir</KEYWORD2>
-<KEYWORD2>rotate-bit-field</KEYWORD2>
-<KEYWORD2>round</KEYWORD2>
-<KEYWORD2>run-asyncs</KEYWORD2>
-<KEYWORD2>run-hook</KEYWORD2>
-<KEYWORD2>s16vector</KEYWORD2>
-<KEYWORD2>s16vector->list</KEYWORD2>
-<KEYWORD2>s16vector-length</KEYWORD2>
-<KEYWORD2>s16vector-ref</KEYWORD2>
-<KEYWORD2>s16vector-set!</KEYWORD2>
-<KEYWORD2>s16vector?</KEYWORD2>
-<KEYWORD2>s32vector</KEYWORD2>
-<KEYWORD2>s32vector->list</KEYWORD2>
-<KEYWORD2>s32vector-length</KEYWORD2>
-<KEYWORD2>s32vector-ref</KEYWORD2>
-<KEYWORD2>s32vector-set!</KEYWORD2>
-<KEYWORD2>s32vector?</KEYWORD2>
-<KEYWORD2>s64vector</KEYWORD2>
-<KEYWORD2>s64vector->list</KEYWORD2>
-<KEYWORD2>s64vector-length</KEYWORD2>
-<KEYWORD2>s64vector-ref</KEYWORD2>
-<KEYWORD2>s64vector-set!</KEYWORD2>
-<KEYWORD2>s64vector?</KEYWORD2>
-<KEYWORD2>s8vector</KEYWORD2>
-<KEYWORD2>s8vector->list</KEYWORD2>
-<KEYWORD2>s8vector-length</KEYWORD2>
-<KEYWORD2>s8vector-ref</KEYWORD2>
-<KEYWORD2>s8vector-set!</KEYWORD2>
-<KEYWORD2>s8vector?</KEYWORD2>
-<KEYWORD2>save-module-excursion</KEYWORD2>
-<KEYWORD2>scheme-report-environment</KEYWORD2>
-<KEYWORD2>search-path</KEYWORD2>
-<KEYWORD2>second</KEYWORD2>
-<KEYWORD2>seed->random-state</KEYWORD2>
-<KEYWORD2>seek</KEYWORD2>
-<KEYWORD2>select</KEYWORD2>
-<KEYWORD2>send</KEYWORD2>
-<KEYWORD2>sendto</KEYWORD2>
-<KEYWORD2>serious-condition?</KEYWORD2>
-<KEYWORD2>servent:aliases</KEYWORD2>
-<KEYWORD2>servent:name</KEYWORD2>
-<KEYWORD2>servent:port</KEYWORD2>
-<KEYWORD2>servent:proto</KEYWORD2>
-<KEYWORD2>set-buffered-input-continuation?!</KEYWORD2>
-<KEYWORD2>set-car!</KEYWORD2>
-<KEYWORD2>set-cdr!</KEYWORD2>
-<KEYWORD2>set-current-dynamic-state</KEYWORD2>
-<KEYWORD2>set-current-error-port</KEYWORD2>
-<KEYWORD2>set-current-input-port</KEYWORD2>
-<KEYWORD2>set-current-module</KEYWORD2>
-<KEYWORD2>set-current-output-port</KEYWORD2>
-<KEYWORD2>set-object-procedure!</KEYWORD2>
-<KEYWORD2>set-object-properties!</KEYWORD2>
-<KEYWORD2>set-object-property!</KEYWORD2>
-<KEYWORD2>set-port-column!</KEYWORD2>
-<KEYWORD2>set-port-filename!</KEYWORD2>
-<KEYWORD2>set-port-line!</KEYWORD2>
-<KEYWORD2>set-port-revealed!</KEYWORD2>
-<KEYWORD2>set-procedure-properties!</KEYWORD2>
-<KEYWORD2>set-procedure-property!</KEYWORD2>
-<KEYWORD2>set-program-arguments</KEYWORD2>
-<KEYWORD2>set-readline-input-port!</KEYWORD2>
-<KEYWORD2>set-readline-output-port!</KEYWORD2>
-<KEYWORD2>set-readline-prompt!</KEYWORD2>
-<KEYWORD2>set-source-properties!</KEYWORD2>
-<KEYWORD2>set-source-property!</KEYWORD2>
-<KEYWORD2>set-struct-vtable-name!</KEYWORD2>
-<KEYWORD2>set-symbol-property!</KEYWORD2>
-<KEYWORD2>set-time-nanosecond!</KEYWORD2>
-<KEYWORD2>set-time-second!</KEYWORD2>
-<KEYWORD2>set-time-type!</KEYWORD2>
-<KEYWORD2>set-tm:gmtoff</KEYWORD2>
-<KEYWORD2>set-tm:hour</KEYWORD2>
-<KEYWORD2>set-tm:isdst</KEYWORD2>
-<KEYWORD2>set-tm:mday</KEYWORD2>
-<KEYWORD2>set-tm:min</KEYWORD2>
-<KEYWORD2>set-tm:mon</KEYWORD2>
-<KEYWORD2>set-tm:sec</KEYWORD2>
-<KEYWORD2>set-tm:wday</KEYWORD2>
-<KEYWORD2>set-tm:yday</KEYWORD2>
-<KEYWORD2>set-tm:year</KEYWORD2>
-<KEYWORD2>set-tm:zone</KEYWORD2>
-<KEYWORD2>set-trace-layout</KEYWORD2>
-<KEYWORD2>set!</KEYWORD2>
-<KEYWORD2>setegid</KEYWORD2>
-<KEYWORD2>setenv</KEYWORD2>
-<KEYWORD2>seteuid</KEYWORD2>
-<KEYWORD2>setgid</KEYWORD2>
-<KEYWORD2>setgr</KEYWORD2>
-<KEYWORD2>setgrent</KEYWORD2>
-<KEYWORD2>setgroups</KEYWORD2>
-<KEYWORD2>sethost</KEYWORD2>
-<KEYWORD2>sethostent</KEYWORD2>
-<KEYWORD2>sethostname</KEYWORD2>
-<KEYWORD2>setitimer</KEYWORD2>
-<KEYWORD2>setlocale</KEYWORD2>
-<KEYWORD2>setnet</KEYWORD2>
-<KEYWORD2>setnetent</KEYWORD2>
-<KEYWORD2>setpgid</KEYWORD2>
-<KEYWORD2>setpriority</KEYWORD2>
-<KEYWORD2>setproto</KEYWORD2>
-<KEYWORD2>setprotoent</KEYWORD2>
-<KEYWORD2>setpw</KEYWORD2>
-<KEYWORD2>setpwent</KEYWORD2>
-<KEYWORD2>setserv</KEYWORD2>
-<KEYWORD2>setservent</KEYWORD2>
-<KEYWORD2>setsid</KEYWORD2>
-<KEYWORD2>setsockopt</KEYWORD2>
-<KEYWORD2>setter</KEYWORD2>
-<KEYWORD2>setuid</KEYWORD2>
-<KEYWORD2>setvbuf</KEYWORD2>
-<KEYWORD2>seventh</KEYWORD2>
-<KEYWORD2>shared-array-increments</KEYWORD2>
-<KEYWORD2>shared-array-offset</KEYWORD2>
-<KEYWORD2>shared-array-root</KEYWORD2>
-<KEYWORD2>shutdown</KEYWORD2>
-<KEYWORD2>sigaction</KEYWORD2>
-<KEYWORD2>signal-condition-variable</KEYWORD2>
-<KEYWORD2>simple-format</KEYWORD2>
-<KEYWORD2>sin</KEYWORD2>
-<KEYWORD2>sinh</KEYWORD2>
-<KEYWORD2>sixth</KEYWORD2>
-<KEYWORD2>sleep</KEYWORD2>
-<KEYWORD2>sloppy-assoc</KEYWORD2>
-<KEYWORD2>sloppy-assq</KEYWORD2>
-<KEYWORD2>sloppy-assv</KEYWORD2>
-<KEYWORD2>sockaddr:addr</KEYWORD2>
-<KEYWORD2>sockaddr:fam</KEYWORD2>
-<KEYWORD2>sockaddr:flowinfo</KEYWORD2>
-<KEYWORD2>sockaddr:path</KEYWORD2>
-<KEYWORD2>sockaddr:port</KEYWORD2>
-<KEYWORD2>sockaddr:scopeid</KEYWORD2>
-<KEYWORD2>socket</KEYWORD2>
-<KEYWORD2>socketpair</KEYWORD2>
-<KEYWORD2>sort</KEYWORD2>
-<KEYWORD2>sort!</KEYWORD2>
-<KEYWORD2>sort-list</KEYWORD2>
-<KEYWORD2>sort-list!</KEYWORD2>
-<KEYWORD2>sorted?</KEYWORD2>
-<KEYWORD2>source-properties</KEYWORD2>
-<KEYWORD2>source-property</KEYWORD2>
-<KEYWORD2>span</KEYWORD2>
-<KEYWORD2>span!</KEYWORD2>
-<KEYWORD2>split-at</KEYWORD2>
-<KEYWORD2>split-at!</KEYWORD2>
-<KEYWORD2>sqrt</KEYWORD2>
-<KEYWORD2>stable-sort</KEYWORD2>
-<KEYWORD2>stable-sort!</KEYWORD2>
-<KEYWORD2>stack-id</KEYWORD2>
-<KEYWORD2>stack-length</KEYWORD2>
-<KEYWORD2>stack-ref</KEYWORD2>
-<KEYWORD2>stack?</KEYWORD2>
-<KEYWORD2>start-stack</KEYWORD2>
-<KEYWORD2>stat</KEYWORD2>
-<KEYWORD2>stat:atime</KEYWORD2>
-<KEYWORD2>stat:blksize</KEYWORD2>
-<KEYWORD2>stat:blocks</KEYWORD2>
-<KEYWORD2>stat:ctime</KEYWORD2>
-<KEYWORD2>stat:dev</KEYWORD2>
-<KEYWORD2>stat:gid</KEYWORD2>
-<KEYWORD2>stat:ino</KEYWORD2>
-<KEYWORD2>stat:mode</KEYWORD2>
-<KEYWORD2>stat:mtime</KEYWORD2>
-<KEYWORD2>stat:nlink</KEYWORD2>
-<KEYWORD2>stat:perms</KEYWORD2>
-<KEYWORD2>stat:rdev</KEYWORD2>
-<KEYWORD2>stat:size</KEYWORD2>
-<KEYWORD2>stat:type</KEYWORD2>
-<KEYWORD2>stat:uid</KEYWORD2>
-<KEYWORD2>status:exit-val</KEYWORD2>
-<KEYWORD2>status:stop-sig</KEYWORD2>
-<KEYWORD2>status:term-sig</KEYWORD2>
-<KEYWORD2>step</KEYWORD2>
-<KEYWORD2>stream->list</KEYWORD2>
-<KEYWORD2>stream->list&length</KEYWORD2>
-<KEYWORD2>stream->reversed-list</KEYWORD2>
-<KEYWORD2>stream->reversed-list&length</KEYWORD2>
-<KEYWORD2>stream->vector</KEYWORD2>
-<KEYWORD2>stream-car</KEYWORD2>
-<KEYWORD2>stream-cdr</KEYWORD2>
-<KEYWORD2>stream-fold</KEYWORD2>
-<KEYWORD2>stream-for-each</KEYWORD2>
-<KEYWORD2>stream-map</KEYWORD2>
-<KEYWORD2>stream-null?</KEYWORD2>
-<KEYWORD2>strerror</KEYWORD2>
-<KEYWORD2>strftime</KEYWORD2>
-<KEYWORD2>string</KEYWORD2>
-<KEYWORD2>string->char-set</KEYWORD2>
-<KEYWORD2>string->char-set!</KEYWORD2>
-<KEYWORD2>string->date</KEYWORD2>
-<KEYWORD2>string->keyword</KEYWORD2>
-<KEYWORD2>string->list</KEYWORD2>
-<KEYWORD2>string->number</KEYWORD2>
-<KEYWORD2>string->symbol</KEYWORD2>
-<KEYWORD2>string-any</KEYWORD2>
-<KEYWORD2>string-append</KEYWORD2>
-<KEYWORD2>string-append/shared</KEYWORD2>
-<KEYWORD2>string-capitalize</KEYWORD2>
-<KEYWORD2>string-capitalize!</KEYWORD2>
-<KEYWORD2>string-ci->symbol</KEYWORD2>
-<KEYWORD2>string-ci-hash</KEYWORD2>
-<KEYWORD2>string-ci<</KEYWORD2>
-<KEYWORD2>string-ci<=</KEYWORD2>
-<KEYWORD2>string-ci<=?</KEYWORD2>
-<KEYWORD2>string-ci<></KEYWORD2>
-<KEYWORD2>string-ci<?</KEYWORD2>
-<KEYWORD2>string-ci=</KEYWORD2>
-<KEYWORD2>string-ci=?</KEYWORD2>
-<KEYWORD2>string-ci></KEYWORD2>
-<KEYWORD2>string-ci>=</KEYWORD2>
-<KEYWORD2>string-ci>=?</KEYWORD2>
-<KEYWORD2>string-ci>?</KEYWORD2>
-<KEYWORD2>string-compare</KEYWORD2>
-<KEYWORD2>string-compare-ci</KEYWORD2>
-<KEYWORD2>string-concatenate</KEYWORD2>
-<KEYWORD2>string-concatenate-reverse</KEYWORD2>
-<KEYWORD2>string-concatenate-reverse/shared</KEYWORD2>
-<KEYWORD2>string-concatenate/shared</KEYWORD2>
-<KEYWORD2>string-contains</KEYWORD2>
-<KEYWORD2>string-contains-ci</KEYWORD2>
-<KEYWORD2>string-copy</KEYWORD2>
-<KEYWORD2>string-copy!</KEYWORD2>
-<KEYWORD2>string-count</KEYWORD2>
-<KEYWORD2>string-delete</KEYWORD2>
-<KEYWORD2>string-downcase</KEYWORD2>
-<KEYWORD2>string-downcase!</KEYWORD2>
-<KEYWORD2>string-drop</KEYWORD2>
-<KEYWORD2>string-drop-right</KEYWORD2>
-<KEYWORD2>string-every</KEYWORD2>
-<KEYWORD2>string-fill!</KEYWORD2>
-<KEYWORD2>string-filter</KEYWORD2>
-<KEYWORD2>string-fold</KEYWORD2>
-<KEYWORD2>string-fold-right</KEYWORD2>
-<KEYWORD2>string-for-each</KEYWORD2>
-<KEYWORD2>string-for-each-index</KEYWORD2>
-<KEYWORD2>string-hash</KEYWORD2>
-<KEYWORD2>string-hash</KEYWORD2>
-<KEYWORD2>string-hash-ci</KEYWORD2>
-<KEYWORD2>string-index</KEYWORD2>
-<KEYWORD2>string-index-right</KEYWORD2>
-<KEYWORD2>string-join</KEYWORD2>
-<KEYWORD2>string-length</KEYWORD2>
-<KEYWORD2>string-map</KEYWORD2>
-<KEYWORD2>string-map!</KEYWORD2>
-<KEYWORD2>string-match</KEYWORD2>
-<KEYWORD2>string-null?</KEYWORD2>
-<KEYWORD2>string-pad</KEYWORD2>
-<KEYWORD2>string-pad-right</KEYWORD2>
-<KEYWORD2>string-prefix-ci?</KEYWORD2>
-<KEYWORD2>string-prefix-length</KEYWORD2>
-<KEYWORD2>string-prefix-length-ci</KEYWORD2>
-<KEYWORD2>string-prefix?</KEYWORD2>
-<KEYWORD2>string-ref</KEYWORD2>
-<KEYWORD2>string-replace</KEYWORD2>
-<KEYWORD2>string-reverse</KEYWORD2>
-<KEYWORD2>string-reverse!</KEYWORD2>
-<KEYWORD2>string-rindex</KEYWORD2>
-<KEYWORD2>string-set!</KEYWORD2>
-<KEYWORD2>string-skip</KEYWORD2>
-<KEYWORD2>string-skip-right</KEYWORD2>
-<KEYWORD2>string-split</KEYWORD2>
-<KEYWORD2>string-suffix-ci?</KEYWORD2>
-<KEYWORD2>string-suffix-length</KEYWORD2>
-<KEYWORD2>string-suffix-length-ci</KEYWORD2>
-<KEYWORD2>string-suffix?</KEYWORD2>
-<KEYWORD2>string-tabulate</KEYWORD2>
-<KEYWORD2>string-take</KEYWORD2>
-<KEYWORD2>string-take-right</KEYWORD2>
-<KEYWORD2>string-titlecase</KEYWORD2>
-<KEYWORD2>string-titlecase!</KEYWORD2>
-<KEYWORD2>string-tokenize</KEYWORD2>
-<KEYWORD2>string-trim</KEYWORD2>
-<KEYWORD2>string-trim-both</KEYWORD2>
-<KEYWORD2>string-trim-right</KEYWORD2>
-<KEYWORD2>string-unfold</KEYWORD2>
-<KEYWORD2>string-unfold-right</KEYWORD2>
-<KEYWORD2>string-upcase</KEYWORD2>
-<KEYWORD2>string-upcase!</KEYWORD2>
-<KEYWORD2>string-xcopy!</KEYWORD2>
-<KEYWORD2>string<</KEYWORD2>
-<KEYWORD2>string<=</KEYWORD2>
-<KEYWORD2>string<=?</KEYWORD2>
-<KEYWORD2>string<>></KEYWORD2>
-<KEYWORD2>string<?</KEYWORD2>
-<KEYWORD2>string=</KEYWORD2>
-<KEYWORD2>string=?</KEYWORD2>
-<KEYWORD2>string></KEYWORD2>
-<KEYWORD2>string>=</KEYWORD2>
-<KEYWORD2>string>=?</KEYWORD2>
-<KEYWORD2>string>?</KEYWORD2>
-<KEYWORD2>string?</KEYWORD2>
-<KEYWORD2>strptime</KEYWORD2>
-<KEYWORD2>struct-ref</KEYWORD2>
-<KEYWORD2>struct-set!</KEYWORD2>
-<KEYWORD2>struct-vtable</KEYWORD2>
-<KEYWORD2>struct-vtable-name</KEYWORD2>
-<KEYWORD2>struct-vtable-tag</KEYWORD2>
-<KEYWORD2>struct-vtable?</KEYWORD2>
-<KEYWORD2>struct?</KEYWORD2>
-<KEYWORD2>substring</KEYWORD2>
-<KEYWORD2>substring-fill!</KEYWORD2>
-<KEYWORD2>substring-move!</KEYWORD2>
-<KEYWORD2>substring/copy</KEYWORD2>
-<KEYWORD2>substring/read-only</KEYWORD2>
-<KEYWORD2>substring/shared</KEYWORD2>
-<KEYWORD2>subtract-duration</KEYWORD2>
-<KEYWORD2>subtract-duration!</KEYWORD2>
-<KEYWORD2>symbol->keyword</KEYWORD2>
-<KEYWORD2>symbol->string</KEYWORD2>
-<KEYWORD2>symbol-fref</KEYWORD2>
-<KEYWORD2>symbol-fset!</KEYWORD2>
-<KEYWORD2>symbol-hash</KEYWORD2>
-<KEYWORD2>symbol-interned?</KEYWORD2>
-<KEYWORD2>symbol-pref</KEYWORD2>
-<KEYWORD2>symbol-prefix-proc</KEYWORD2>
-<KEYWORD2>symbol-property</KEYWORD2>
-<KEYWORD2>symbol-property-remove!</KEYWORD2>
-<KEYWORD2>symbol-pset!</KEYWORD2>
-<KEYWORD2>symbol?</KEYWORD2>
-<KEYWORD2>symlink</KEYWORD2>
-<KEYWORD2>sync</KEYWORD2>
-<KEYWORD2>sync-q!</KEYWORD2>
-<KEYWORD2>system</KEYWORD2>
-<KEYWORD2>system*</KEYWORD2>
-<KEYWORD2>system-async-mark</KEYWORD2>
-<KEYWORD2>system-error-errno</KEYWORD2>
-<KEYWORD2>take</KEYWORD2>
-<KEYWORD2>take!</KEYWORD2>
-<KEYWORD2>take-right</KEYWORD2>
-<KEYWORD2>take-while</KEYWORD2>
-<KEYWORD2>take-while!</KEYWORD2>
-<KEYWORD2>tan</KEYWORD2>
-<KEYWORD2>tanh</KEYWORD2>
-<KEYWORD2>tc:depth</KEYWORD2>
-<KEYWORD2>tc:frame</KEYWORD2>
-<KEYWORD2>tc:real-depth</KEYWORD2>
-<KEYWORD2>tc:return-value</KEYWORD2>
-<KEYWORD2>tc:stack</KEYWORD2>
-<KEYWORD2>tc:type</KEYWORD2>
-<KEYWORD2>tcgetpgrp</KEYWORD2>
-<KEYWORD2>tcsetpgrp</KEYWORD2>
-<KEYWORD2>tenth</KEYWORD2>
-<KEYWORD2>textdomain</KEYWORD2>
-<KEYWORD2>third</KEYWORD2>
-<KEYWORD2>thread-exited?</KEYWORD2>
-<KEYWORD2>throw</KEYWORD2>
-<KEYWORD2>thunk?</KEYWORD2>
-<KEYWORD2>time-difference</KEYWORD2>
-<KEYWORD2>time-difference!</KEYWORD2>
-<KEYWORD2>time-monotonic->date</KEYWORD2>
-<KEYWORD2>time-monotonic->time-tai</KEYWORD2>
-<KEYWORD2>time-monotonic->time-tai!</KEYWORD2>
-<KEYWORD2>time-monotonic->time-utc</KEYWORD2>
-<KEYWORD2>time-monotonic->time-utc!</KEYWORD2>
-<KEYWORD2>time-nanosecond</KEYWORD2>
-<KEYWORD2>time-resolution</KEYWORD2>
-<KEYWORD2>time-second</KEYWORD2>
-<KEYWORD2>time-tai->date</KEYWORD2>
-<KEYWORD2>time-tai->julian-day</KEYWORD2>
-<KEYWORD2>time-tai->modified-julian-day</KEYWORD2>
-<KEYWORD2>time-tai->time-monotonic</KEYWORD2>
-<KEYWORD2>time-tai->time-monotonic!</KEYWORD2>
-<KEYWORD2>time-tai->time-utc</KEYWORD2>
-<KEYWORD2>time-tai->time-utc!</KEYWORD2>
-<KEYWORD2>time-type</KEYWORD2>
-<KEYWORD2>time-utc->date</KEYWORD2>
-<KEYWORD2>time-utc->julian-day</KEYWORD2>
-<KEYWORD2>time-utc->modified-julian-day</KEYWORD2>
-<KEYWORD2>time-utc->time-monotonic</KEYWORD2>
-<KEYWORD2>time-utc->time-monotonic!</KEYWORD2>
-<KEYWORD2>time-utc->time-tai</KEYWORD2>
-<KEYWORD2>time-utc->time-tai!</KEYWORD2>
-<KEYWORD2>time<=?</KEYWORD2>
-<KEYWORD2>time<?</KEYWORD2>
-<KEYWORD2>time=?</KEYWORD2>
-<KEYWORD2>time>=?</KEYWORD2>
-<KEYWORD2>time>?</KEYWORD2>
-<KEYWORD2>time?</KEYWORD2>
-<KEYWORD2>times</KEYWORD2>
-<KEYWORD2>tm:gmtoff</KEYWORD2>
-<KEYWORD2>tm:hour</KEYWORD2>
-<KEYWORD2>tm:isdst</KEYWORD2>
-<KEYWORD2>tm:mday</KEYWORD2>
-<KEYWORD2>tm:min</KEYWORD2>
-<KEYWORD2>tm:mon</KEYWORD2>
-<KEYWORD2>tm:sec</KEYWORD2>
-<KEYWORD2>tm:wday</KEYWORD2>
-<KEYWORD2>tm:yday</KEYWORD2>
-<KEYWORD2>tm:year</KEYWORD2>
-<KEYWORD2>tm:zone</KEYWORD2>
-<KEYWORD2>tmpnam</KEYWORD2>
-<KEYWORD2>tms:clock</KEYWORD2>
-<KEYWORD2>tms:cstime</KEYWORD2>
-<KEYWORD2>tms:cutime</KEYWORD2>
-<KEYWORD2>tms:stime</KEYWORD2>
-<KEYWORD2>tms:utime</KEYWORD2>
-<KEYWORD2>trace</KEYWORD2>
-<KEYWORD2>trace-at-exit</KEYWORD2>
-<KEYWORD2>trace-port</KEYWORD2>
-<KEYWORD2>trace-trap</KEYWORD2>
-<KEYWORD2>trace-until-exit</KEYWORD2>
-<KEYWORD2>trace/info</KEYWORD2>
-<KEYWORD2>trace/pid</KEYWORD2>
-<KEYWORD2>trace/real?</KEYWORD2>
-<KEYWORD2>trace/source</KEYWORD2>
-<KEYWORD2>trace/source-column</KEYWORD2>
-<KEYWORD2>trace/source-file-name</KEYWORD2>
-<KEYWORD2>trace/source-line</KEYWORD2>
-<KEYWORD2>trace/stack</KEYWORD2>
-<KEYWORD2>trace/stack-depth</KEYWORD2>
-<KEYWORD2>trace/stack-id</KEYWORD2>
-<KEYWORD2>trace/stack-real-depth</KEYWORD2>
-<KEYWORD2>trace/type</KEYWORD2>
-<KEYWORD2>transpose-array</KEYWORD2>
-<KEYWORD2>trap-disable</KEYWORD2>
-<KEYWORD2>trap-disable</KEYWORD2>
-<KEYWORD2>trap-enable</KEYWORD2>
-<KEYWORD2>trap-enable</KEYWORD2>
-<KEYWORD2>trap-here</KEYWORD2>
-<KEYWORD2>trap-set!</KEYWORD2>
-<KEYWORD2>trap-set!</KEYWORD2>
-<KEYWORD2>traps</KEYWORD2>
-<KEYWORD2>traps</KEYWORD2>
-<KEYWORD2>truncate</KEYWORD2>
-<KEYWORD2>truncate</KEYWORD2>
-<KEYWORD2>truncate-file</KEYWORD2>
-<KEYWORD2>try-arbiter</KEYWORD2>
-<KEYWORD2>try-mutex</KEYWORD2>
-<KEYWORD2>ttyname</KEYWORD2>
-<KEYWORD2>typed-array?</KEYWORD2>
-<KEYWORD2>tzset</KEYWORD2>
-<KEYWORD2>u16vector</KEYWORD2>
-<KEYWORD2>u16vector->list</KEYWORD2>
-<KEYWORD2>u16vector-length</KEYWORD2>
-<KEYWORD2>u16vector-ref</KEYWORD2>
-<KEYWORD2>u16vector-set!</KEYWORD2>
-<KEYWORD2>u16vector?</KEYWORD2>
-<KEYWORD2>u32vector</KEYWORD2>
-<KEYWORD2>u32vector->list</KEYWORD2>
-<KEYWORD2>u32vector-length</KEYWORD2>
-<KEYWORD2>u32vector-ref</KEYWORD2>
-<KEYWORD2>u32vector-set!</KEYWORD2>
-<KEYWORD2>u32vector?</KEYWORD2>
-<KEYWORD2>u64vector</KEYWORD2>
-<KEYWORD2>u64vector->list</KEYWORD2>
-<KEYWORD2>u64vector-length</KEYWORD2>
-<KEYWORD2>u64vector-ref</KEYWORD2>
-<KEYWORD2>u64vector-set!</KEYWORD2>
-<KEYWORD2>u64vector?</KEYWORD2>
-<KEYWORD2>u8vector</KEYWORD2>
-<KEYWORD2>u8vector->list</KEYWORD2>
-<KEYWORD2>u8vector-length</KEYWORD2>
-<KEYWORD2>u8vector-ref</KEYWORD2>
-<KEYWORD2>u8vector-set!</KEYWORD2>
-<KEYWORD2>u8vector?</KEYWORD2>
-<KEYWORD2>ucs-range->char-set</KEYWORD2>
-<KEYWORD2>ucs-range->char-set!</KEYWORD2>
-<KEYWORD2>umask</KEYWORD2>
-<KEYWORD2>uname</KEYWORD2>
-<KEYWORD2>unfold</KEYWORD2>
-<KEYWORD2>unfold-right</KEYWORD2>
-<KEYWORD2>uniform-array-read!</KEYWORD2>
-<KEYWORD2>uniform-array-write</KEYWORD2>
-<KEYWORD2>uniform-vector->list</KEYWORD2>
-<KEYWORD2>uniform-vector-length</KEYWORD2>
-<KEYWORD2>uniform-vector-read!</KEYWORD2>
-<KEYWORD2>uniform-vector-ref</KEYWORD2>
-<KEYWORD2>uniform-vector-set!</KEYWORD2>
-<KEYWORD2>uniform-vector-write</KEYWORD2>
-<KEYWORD2>uniform-vector?</KEYWORD2>
-<KEYWORD2>uninstall-trap</KEYWORD2>
-<KEYWORD2>unlink</KEYWORD2>
-<KEYWORD2>unlock-mutex</KEYWORD2>
-<KEYWORD2>unmemoize</KEYWORD2>
-<KEYWORD2>unquote</KEYWORD2>
-<KEYWORD2>unquote-splicing</KEYWORD2>
-<KEYWORD2>unread-char</KEYWORD2>
-<KEYWORD2>unread-char</KEYWORD2>
-<KEYWORD2>unread-string</KEYWORD2>
-<KEYWORD2>unread-string</KEYWORD2>
-<KEYWORD2>unsetenv</KEYWORD2>
-<KEYWORD2>untrace</KEYWORD2>
-<KEYWORD2>unzip1</KEYWORD2>
-<KEYWORD2>unzip2</KEYWORD2>
-<KEYWORD2>unzip3</KEYWORD2>
-<KEYWORD2>unzip4</KEYWORD2>
-<KEYWORD2>unzip5</KEYWORD2>
-<KEYWORD2>up</KEYWORD2>
-<KEYWORD2>use-modules</KEYWORD2>
-<KEYWORD2>use-syntax</KEYWORD2>
-<KEYWORD2>usleep</KEYWORD2>
-<KEYWORD2>utime</KEYWORD2>
-<KEYWORD2>utsname:machine</KEYWORD2>
-<KEYWORD2>utsname:nodename</KEYWORD2>
-<KEYWORD2>utsname:release</KEYWORD2>
-<KEYWORD2>utsname:sysname</KEYWORD2>
-<KEYWORD2>utsname:version</KEYWORD2>
-<KEYWORD2>values</KEYWORD2>
-<KEYWORD2>variable-bound?</KEYWORD2>
-<KEYWORD2>variable-ref</KEYWORD2>
-<KEYWORD2>variable-set!</KEYWORD2>
-<KEYWORD2>variable?</KEYWORD2>
-<KEYWORD2>vector</KEYWORD2>
-<KEYWORD2>vector->list</KEYWORD2>
-<KEYWORD2>vector->stream</KEYWORD2>
-<KEYWORD2>vector-copy</KEYWORD2>
-<KEYWORD2>vector-fill!</KEYWORD2>
-<KEYWORD2>vector-length</KEYWORD2>
-<KEYWORD2>vector-move-left!</KEYWORD2>
-<KEYWORD2>vector-move-right!</KEYWORD2>
-<KEYWORD2>vector-ref</KEYWORD2>
-<KEYWORD2>vector-set!</KEYWORD2>
-<KEYWORD2>vector?</KEYWORD2>
-<KEYWORD2>version</KEYWORD2>
-<!-- <KEYWORD2>void *</KEYWORD2> -->
-<KEYWORD2>wait-condition-variable</KEYWORD2>
-<KEYWORD2>waitpid</KEYWORD2>
-<KEYWORD2>weak-key-hash-table?</KEYWORD2>
-<KEYWORD2>weak-value-hash-table?</KEYWORD2>
-<KEYWORD2>weak-vector</KEYWORD2>
-<KEYWORD2>weak-vector?</KEYWORD2>
-<KEYWORD2>where</KEYWORD2>
-<KEYWORD2>while</KEYWORD2>
-<KEYWORD2>with-continuation-barrier</KEYWORD2>
-<KEYWORD2>with-dynamic-state</KEYWORD2>
-<KEYWORD2>with-error-to-file</KEYWORD2>
-<KEYWORD2>with-fluid*</KEYWORD2>
-<KEYWORD2>with-fluids</KEYWORD2>
-<KEYWORD2>with-fluids*</KEYWORD2>
-<KEYWORD2>with-input-from-file</KEYWORD2>
-<KEYWORD2>with-input-from-string</KEYWORD2>
-<KEYWORD2>with-mutex</KEYWORD2>
-<KEYWORD2>with-output-to-file</KEYWORD2>
-<KEYWORD2>with-output-to-string</KEYWORD2>
-<KEYWORD2>with-parameters*</KEYWORD2>
-<KEYWORD2>with-readline-completion-function</KEYWORD2>
-<KEYWORD2>with-throw-handler</KEYWORD2>
-<KEYWORD2>with-traps</KEYWORD2>
-<KEYWORD2>write</KEYWORD2>
-<KEYWORD2>write-char</KEYWORD2>
-<KEYWORD2>write-line</KEYWORD2>
-<KEYWORD2>write-string/partial</KEYWORD2>
-<KEYWORD2>xcons</KEYWORD2>
-<KEYWORD2>xsubstring</KEYWORD2>
-<KEYWORD2>yield</KEYWORD2>
-<KEYWORD2>zero?</KEYWORD2>
-<KEYWORD2>zip</KEYWORD2>
-
-<LITERAL2>#t</LITERAL2>
-<LITERAL2>#f</LITERAL2>
-</KEYWORDS>
-<!-- Generated part ended -->
-
-</RULES>
-
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- LilyPond (www.lilypond.org) mode by Bertalan Fodor <lilypondtool at organum.hu> & others at http://lily4jedit.sf.net
+ Requires jEdit 4.3pre6 or compatible
+Recommended jEdit/modes/catalog entry:
+ <MODE NAME="lilypond" FILE="lilypond.xml"
+ FILE_NAME_GLOB="*.{ly,ily}" />
+
+-->
+
+<MODE>
+<PROPS>
+ <PROPERTY NAME="commentStart" VALUE="%{" />
+ <PROPERTY NAME="commentEnd" VALUE="%}" />
+ <PROPERTY NAME="lineComment" VALUE="%" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="indentNextLines" VALUE=".*<<.*" />
+ <PROPERTY NAME="unindentThisLine" VALUE=".*>>.*" />
+ <PROPERTY NAME="unindentNextLines" VALUE=".*>>.*" />
+ <PROPERTY NAME="unindentThisLine" VALUE="(?!(.*<<)).*>>.*" />
+ <PROPERTY NAME="electricKeys" VALUE=">" />
+ <PROPERTY NAME="wordBreakChars" VALUE="=" />
+</PROPS>
+
+<RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+
+ <SPAN TYPE="COMMENT2" NO_LINE_BREAK="FALSE">
+ <BEGIN>%{</BEGIN><END>%}</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SEQ TYPE="DIGIT">\breve</SEQ>
+ <SEQ TYPE="DIGIT">\longa</SEQ>
+ <SEQ TYPE="DIGIT">\maxima</SEQ>
+ <MARK_PREVIOUS TYPE="FUNCTION" AT_WHITESPACE_END="TRUE">=</MARK_PREVIOUS>
+ <MARK_PREVIOUS TYPE="FUNCTION" AT_WHITESPACE_END="TRUE"> =</MARK_PREVIOUS>
+ <SEQ TYPE="MARKUP">{</SEQ>
+ <SEQ TYPE="MARKUP">}</SEQ>
+ <SEQ TYPE="MARKUP">[</SEQ>
+ <SEQ TYPE="MARKUP">]</SEQ>
+ <SEQ TYPE="MARKUP"><<</SEQ>
+ <SEQ TYPE="MARKUP">>></SEQ>
+ <SEQ TYPE="NULL">-<</SEQ>
+ <SEQ TYPE="NULL">-></SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ_REGEXP HASH_CHAR=""" TYPE = "LITERAL1">"(\\"|[^\\"]|\\)+"</SEQ_REGEXP>
+ <SPAN TYPE="LITERAL1"><BEGIN>"</BEGIN><END>"</END></SPAN>
+
+<!-- Less can be more: Notes are simple black.
+ Now digits are highlighted.
+ Octave jumps now are as highlighted as markup. -->
+
+ <!--octave-->
+ <SEQ TYPE="MARKUP">'</SEQ>
+ <SEQ TYPE="MARKUP">,</SEQ>
+
+ <!-- rests and skip -->
+
+ <SEQ_REGEXP TYPE="LITERAL4" AT_WORD_START="TRUE" HASH_CHARS="rRs">[rRs]\d*\b</SEQ_REGEXP>
+
+ <MARK_FOLLOWING TYPE="FUNCTION">ly:</MARK_FOLLOWING>
+
+<!-- Generated part follows -->
+<!-- internal commands -->
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\override">\\override\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\version">\\version\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\include">\\include\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\invalid">\\invalid\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\addquote">\\addquote\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\alternative">\\alternative\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\book">\\book\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\~">\\~\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\mark">\\mark\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\default">\\default\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\key">\\key\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\skip">\\skip\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\octave">\\octave\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\partial">\\partial\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\time">\\time\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\change">\\change\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\consists">\\consists\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\remove">\\remove\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\accepts">\\accepts\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\defaultchild">\\defaultchild\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\denies">\\denies\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\alias">\\alias\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\type">\\type\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\description">\\description\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\name">\\name\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\context">\\context\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\grobdescriptions">\\grobdescriptions\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\markup">\\markup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\header">\\header\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\notemode">\\notemode\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\drummode">\\drummode\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\figuremode">\\figuremode\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\chordmode">\\chordmode\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\lyricmode">\\lyricmode\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\drums">\\drums\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\figures">\\figures\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\chords">\\chords\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\lyrics">\\lyrics\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\once">\\once\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\revert">\\revert\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\set">\\set\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\unset">\\unset\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\addlyrics">\\addlyrics\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\objectid">\\objectid\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\with">\\with\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\rest">\\rest\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\paper">\\paper\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\midi">\\midi\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\layout">\\layout\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\new">\\new\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\times">\\times\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\transpose">\\transpose\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\tag">\\tag\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\relative">\\relative\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\renameinput">\\renameinput\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\repeat">\\repeat\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\lyricsto">\\lyricsto\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\score">\\score\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\sequential">\\sequential\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\simultaneous">\\simultaneous\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\longa">\\longa\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\breve">\\breve\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\maxima">\\maxima\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="\tempo">\\tempo\b</SEQ_REGEXP>
+<!-- identifiers -->
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\AncientRemoveEmptyStaffContext">\\AncientRemoveEmptyStaffContext\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\RemoveEmptyRhythmicStaffContext">\\RemoveEmptyRhythmicStaffContext\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\RemoveEmptyStaffContext">\\RemoveEmptyStaffContext\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\accent">\\accent\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\aeolian">\\aeolian\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\afterGraceFraction">\\afterGraceFraction\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\aikenHeads">\\aikenHeads\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggio">\\arpeggio\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioArrowDown">\\arpeggioArrowDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioArrowUp">\\arpeggioArrowUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioBracket">\\arpeggioBracket\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioNormal">\\arpeggioNormal\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\arpeggioParenthesis">\\arpeggioParenthesis\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\autoBeamOff">\\autoBeamOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\autoBeamOn">\\autoBeamOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\balloonLengthOff">\\balloonLengthOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\balloonLengthOn">\\balloonLengthOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureExtendersOff">\\bassFigureExtendersOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureExtendersOn">\\bassFigureExtendersOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureStaffAlignmentDown">\\bassFigureStaffAlignmentDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureStaffAlignmentNeutral">\\bassFigureStaffAlignmentNeutral\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bassFigureStaffAlignmentUp">\\bassFigureStaffAlignmentUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\between-system-padding">\\between-system-padding\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\between-system-space">\\between-system-space\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bigger">\\bigger\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\blackTriangleMarkup">\\blackTriangleMarkup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bookTitleMarkup">\\bookTitleMarkup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bracketCloseSymbol">\\bracketCloseSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bracketOpenSymbol">\\bracketOpenSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\break">\\break\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\breve">\\breve\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cadenzaOff">\\cadenzaOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cadenzaOn">\\cadenzaOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\center">\\center\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\chordmodifiers">\\chordmodifiers\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cm">\\cm\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\coda">\\coda\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\compressFullBarRests">\\compressFullBarRests\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cr">\\cr\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cresc">\\cresc\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\crescHairpin">\\crescHairpin\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\crescTextCresc">\\crescTextCresc\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\decr">\\decr\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\defaultTimeSignature">\\defaultTimeSignature\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dim">\\dim\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dimHairpin">\\dimHairpin\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dimTextDecr">\\dimTextDecr\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dimTextDecresc">\\dimTextDecresc\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dimTextDim">\\dimTextDim\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dorian">\\dorian\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dotsDown">\\dotsDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dotsNeutral">\\dotsNeutral\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dotsUp">\\dotsUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\down">\\down\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\downbow">\\downbow\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\downmordent">\\downmordent\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\downprall">\\downprall\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\drumPitchNames">\\drumPitchNames\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dutchPitchnames">\\dutchPitchnames\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dynamicDown">\\dynamicDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dynamicNeutral">\\dynamicNeutral\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\dynamicUp">\\dynamicUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\easyHeadsOff">\\easyHeadsOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\easyHeadsOn">\\easyHeadsOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\endcr">\\endcr\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\endcresc">\\endcresc\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\enddecr">\\enddecr\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\enddim">\\enddim\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\endincipit">\\endincipit\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedBiggerSymbol">\\escapedBiggerSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedExclamationSymbol">\\escapedExclamationSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedParenthesisCloseSymbol">\\escapedParenthesisCloseSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedParenthesisOpenSymbol">\\escapedParenthesisOpenSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\escapedSmallerSymbol">\\escapedSmallerSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\espressivo">\\espressivo\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\evenHeaderMarkup">\\evenHeaderMarkup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\expandFullBarRests">\\expandFullBarRests\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\f">\\f\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fermata">\\fermata\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fermataMarkup">\\fermataMarkup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ff">\\ff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fff">\\fff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ffff">\\ffff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\first-page-number">\\first-page-number\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\flageolet">\\flageolet\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fp">\\fp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\frenchChords">\\frenchChords\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fullJazzExceptions">\\fullJazzExceptions\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\fz">\\fz\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\germanChords">\\germanChords\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\glissando">\\glissando\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\harmonic">\\harmonic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\hideNotes">\\hideNotes\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\hideStaffSwitch">\\hideStaffSwitch\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\huge">\\huge\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ignatzekExceptionMusic">\\ignatzekExceptionMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ignatzekExceptions">\\ignatzekExceptions\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\improvisationOff">\\improvisationOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\improvisationOn">\\improvisationOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\in">\\in\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\instrument-definitions">\\instrument-definitions\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ionian">\\ionian\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\italianChords">\\italianChords\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\laissezVibrer">\\laissezVibrer\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\large">\\large\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\left">\\left\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\lheel">\\lheel\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\lineprall">\\lineprall\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\locrian">\\locrian\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\longa">\\longa\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\longfermata">\\longfermata\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ltoe">\\ltoe\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\lydian">\\lydian\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\major">\\major\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\marcato">\\marcato\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\maxima">\\maxima\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\melisma">\\melisma\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\melismaEnd">\\melismaEnd\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mergeDifferentlyDottedOff">\\mergeDifferentlyDottedOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mergeDifferentlyDottedOn">\\mergeDifferentlyDottedOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mergeDifferentlyHeadedOff">\\mergeDifferentlyHeadedOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mergeDifferentlyHeadedOn">\\mergeDifferentlyHeadedOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mf">\\mf\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\midiDrumPitches">\\midiDrumPitches\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\minor">\\minor\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mixolydian">\\mixolydian\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mm">\\mm\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mordent">\\mordent\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\mp">\\mp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\newSpacingSection">\\newSpacingSection\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\noBeam">\\noBeam\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\noBreak">\\noBreak\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\normalsize">\\normalsize\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\numericTimeSignature">\\numericTimeSignature\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\oddFooterMarkup">\\oddFooterMarkup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\oddHeaderMarkup">\\oddHeaderMarkup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\oneVoice">\\oneVoice\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\open">\\open\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\output-scale">\\output-scale\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\p">\\p\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\page-limit-inter-system-space">\\page-limit-inter-system-space\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\page-top-space">\\page-top-space\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\parenthesisCloseSymbol">\\parenthesisCloseSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\parenthesisOpenSymbol">\\parenthesisOpenSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\partialJazzExceptions">\\partialJazzExceptions\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\partialJazzMusic">\\partialJazzMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurDashed">\\phrasingSlurDashed\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurDotted">\\phrasingSlurDotted\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurDown">\\phrasingSlurDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurNeutral">\\phrasingSlurNeutral\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurSolid">\\phrasingSlurSolid\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrasingSlurUp">\\phrasingSlurUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\phrygian">\\phrygian\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pipeSymbol">\\pipeSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pitchnames">\\pitchnames\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\portato">\\portato\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pp">\\pp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ppp">\\ppp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pppp">\\pppp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ppppp">\\ppppp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\prall">\\prall\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pralldown">\\pralldown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\prallmordent">\\prallmordent\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\prallprall">\\prallprall\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\prallup">\\prallup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\predefinedFretboardsOff">\\predefinedFretboardsOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\predefinedFretboardsOn">\\predefinedFretboardsOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\print-first-page-number">\\print-first-page-number\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\print-page-number">\\print-page-number\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pt">\\pt\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ragged-bottom">\\ragged-bottom\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ragged-last-bottom">\\ragged-last-bottom\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\repeatTie">\\repeatTie\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\reverseturn">\\reverseturn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\rfz">\\rfz\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\rheel">\\rheel\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\right">\\right\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\rtoe">\\rtoe\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sacredHarpHeads">\\sacredHarpHeads\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\scoreTitleMarkup">\\scoreTitleMarkup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\segno">\\segno\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\semiGermanChords">\\semiGermanChords\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\setDefaultDurationToQuarter">\\setDefaultDurationToQuarter\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sf">\\sf\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sff">\\sff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sfp">\\sfp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sfz">\\sfz\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftOff">\\shiftOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftOn">\\shiftOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftOnn">\\shiftOnn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftOnnn">\\shiftOnnn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shortfermata">\\shortfermata\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\showStaffSwitch">\\showStaffSwitch\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\signumcongruentiae">\\signumcongruentiae\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slashSeparator">\\slashSeparator\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurDashed">\\slurDashed\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurDotted">\\slurDotted\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurDown">\\slurDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurNeutral">\\slurNeutral\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurSolid">\\slurSolid\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\slurUp">\\slurUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\small">\\small\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\smaller">\\smaller\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sostenutoOff">\\sostenutoOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sostenutoOn">\\sostenutoOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sp">\\sp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\spp">\\spp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\staccatissimo">\\staccatissimo\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\staccato">\\staccato\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\start">\\start\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startAcciaccaturaMusic">\\startAcciaccaturaMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startAppoggiaturaMusic">\\startAppoggiaturaMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startGraceMusic">\\startGraceMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startGroup">\\startGroup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startStaff">\\startStaff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startTextSpan">\\startTextSpan\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\startTrillSpan">\\startTrillSpan\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stemDown">\\stemDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stemNeutral">\\stemNeutral\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stemUp">\\stemUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stop">\\stop\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopAcciaccaturaMusic">\\stopAcciaccaturaMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopAppoggiaturaMusic">\\stopAppoggiaturaMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopGraceMusic">\\stopGraceMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopGroup">\\stopGroup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopStaff">\\stopStaff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopTextSpan">\\stopTextSpan\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopTrillSpan">\\stopTrillSpan\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\stopped">\\stopped\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sustainOff">\\sustainOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\sustainOn">\\sustainOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tagline">\\tagline\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\teeny">\\teeny\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tenuto">\\tenuto\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textLengthOff">\\textLengthOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textLengthOn">\\textLengthOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textSpannerDown">\\textSpannerDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textSpannerNeutral">\\textSpannerNeutral\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\textSpannerUp">\\textSpannerUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\thumb">\\thumb\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieDashed">\\tieDashed\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieDotted">\\tieDotted\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieDown">\\tieDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieNeutral">\\tieNeutral\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieSolid">\\tieSolid\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tieUp">\\tieUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tildeSymbol">\\tildeSymbol\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tiny">\\tiny\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tocItemMarkup">\\tocItemMarkup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tocTitleMarkup">\\tocTitleMarkup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\treCorde">\\treCorde\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\trill">\\trill\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tupletDown">\\tupletDown\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tupletNeutral">\\tupletNeutral\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tupletUp">\\tupletUp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\turn">\\turn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\unHideNotes">\\unHideNotes\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\unaCorda">\\unaCorda\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\unit">\\unit\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\up">\\up\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\upbow">\\upbow\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\upmordent">\\upmordent\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\upprall">\\upprall\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\varcoda">\\varcoda\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\verylongfermata">\\verylongfermata\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceFour">\\voiceFour\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceFourStyle">\\voiceFourStyle\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceNeutralStyle">\\voiceNeutralStyle\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceOne">\\voiceOne\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceOneStyle">\\voiceOneStyle\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceThree">\\voiceThree\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceThreeStyle">\\voiceThreeStyle\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceTwo">\\voiceTwo\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\voiceTwoStyle">\\voiceTwoStyle\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\whiteTriangleMarkup">\\whiteTriangleMarkup\b</SEQ_REGEXP>
+<!-- music functions -->
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\acciaccatura">\\acciaccatura\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\addChordShape">\\addChordShape\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\addInstrumentDefinition">\\addInstrumentDefinition\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\addQuote">\\addQuote\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\afterGrace">\\afterGrace\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\allowPageTurn">\\allowPageTurn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\applyContext">\\applyContext\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\applyMusic">\\applyMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\applyOutput">\\applyOutput\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\appoggiatura">\\appoggiatura\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\assertBeamQuant">\\assertBeamQuant\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\assertBeamSlope">\\assertBeamSlope\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\autochange">\\autochange\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\balloonGrobText">\\balloonGrobText\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\balloonText">\\balloonText\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bar">\\bar\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\barNumberCheck">\\barNumberCheck\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\bendAfter">\\bendAfter\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\breathe">\\breathe\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\clef">\\clef\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\cueDuring">\\cueDuring\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\displayLilyMusic">\\displayLilyMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\displayMusic">\\displayMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\endSpanners">\\endSpanners\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\featherDurations">\\featherDurations\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\grace">\\grace\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\includePageLayoutFile">\\includePageLayoutFile\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\instrumentSwitch">\\instrumentSwitch\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\keepWithTag">\\keepWithTag\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\killCues">\\killCues\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\label">\\label\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\makeClusters">\\makeClusters\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\musicMap">\\musicMap\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\noPageBreak">\\noPageBreak\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\noPageTurn">\\noPageTurn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\octaveCheck">\\octaveCheck\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\oldaddlyrics">\\oldaddlyrics\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\ottava">\\ottava\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\overrideProperty">\\overrideProperty\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pageBreak">\\pageBreak\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pageTurn">\\pageTurn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\parallelMusic">\\parallelMusic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\parenthesize">\\parenthesize\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\partcombine">\\partcombine\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pitchedTrill">\\pitchedTrill\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pointAndClickOff">\\pointAndClickOff\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\pointAndClickOn">\\pointAndClickOn\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\quoteDuring">\\quoteDuring\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\removeWithTag">\\removeWithTag\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\resetRelativeOctave">\\resetRelativeOctave\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\rightHandFinger">\\rightHandFinger\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\scaleDurations">\\scaleDurations\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\scoreTweak">\\scoreTweak\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\shiftDurations">\\shiftDurations\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\spacingTweaks">\\spacingTweaks\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\storePredefinedDiagram">\\storePredefinedDiagram\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tag">\\tag\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tocItem">\\tocItem\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\transposedCueDuring">\\transposedCueDuring\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\transposition">\\transposition\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\tweak">\\tweak\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\unfoldRepeats">\\unfoldRepeats\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="\withMusicProperty">\\withMusicProperty\b</SEQ_REGEXP>
+<!-- markup commands -->
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\abs-fontsize">\\abs-fontsize\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\arrow-head">\\arrow-head\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\backslashed-digit">\\backslashed-digit\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\beam">\\beam\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\bold">\\bold\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\box">\\box\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\bracket">\\bracket\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\caps">\\caps\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\center-align">\\center-align\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\center-column">\\center-column\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\char">\\char\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\circle">\\circle\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\column">\\column\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\combine">\\combine\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\concat">\\concat\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\dir-column">\\dir-column\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\doubleflat">\\doubleflat\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\doublesharp">\\doublesharp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\draw-circle">\\draw-circle\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\draw-line">\\draw-line\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\dynamic">\\dynamic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\epsfile">\\epsfile\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fill-line">\\fill-line\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\filled-box">\\filled-box\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\finger">\\finger\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\flat">\\flat\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fontCaps">\\fontCaps\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fontsize">\\fontsize\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fraction">\\fraction\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fret-diagram">\\fret-diagram\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fret-diagram-terse">\\fret-diagram-terse\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fret-diagram-verbose">\\fret-diagram-verbose\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\fromproperty">\\fromproperty\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\general-align">\\general-align\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\halign">\\halign\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\harp-pedal">\\harp-pedal\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\hbracket">\\hbracket\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\hcenter-in">\\hcenter-in\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\hspace">\\hspace\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\huge">\\huge\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\italic">\\italic\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\justify">\\justify\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\justify-field">\\justify-field\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\justify-string">\\justify-string\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\large">\\large\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\larger">\\larger\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\left-align">\\left-align\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\left-column">\\left-column\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\line">\\line\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\lookup">\\lookup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\lower">\\lower\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\magnify">\\magnify\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\markalphabet">\\markalphabet\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\markletter">\\markletter\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\medium">\\medium\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\musicglyph">\\musicglyph\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\natural">\\natural\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\normal-size-sub">\\normal-size-sub\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\normal-size-super">\\normal-size-super\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\normal-text">\\normal-text\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\normalsize">\\normalsize\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\note">\\note\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\note-by-number">\\note-by-number\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\null">\\null\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\number">\\number\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\on-the-fly">\\on-the-fly\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\override">\\override\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\pad-around">\\pad-around\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\pad-markup">\\pad-markup\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\pad-to-box">\\pad-to-box\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\pad-x">\\pad-x\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\page-ref">\\page-ref\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\postscript">\\postscript\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\put-adjacent">\\put-adjacent\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\raise">\\raise\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\right-align">\\right-align\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\right-column">\\right-column\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\roman">\\roman\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\rotate">\\rotate\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\rounded-box">\\rounded-box\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sans">\\sans\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\score">\\score\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\semiflat">\\semiflat\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\semisharp">\\semisharp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sesquiflat">\\sesquiflat\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sesquisharp">\\sesquisharp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sharp">\\sharp\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\simple">\\simple\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\slashed-digit">\\slashed-digit\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\small">\\small\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\smallCaps">\\smallCaps\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\smaller">\\smaller\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\stencil">\\stencil\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\strut">\\strut\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\sub">\\sub\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\super">\\super\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\teeny">\\teeny\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\text">\\text\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\tied-lyric">\\tied-lyric\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\tiny">\\tiny\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\translate">\\translate\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\translate-scaled">\\translate-scaled\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\transparent">\\transparent\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\triangle">\\triangle\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\typewriter">\\typewriter\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\underline">\\underline\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\upright">\\upright\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\vcenter">\\vcenter\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\verbatim-file">\\verbatim-file\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\whiteout">\\whiteout\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\with-color">\\with-color\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\with-dimensions">\\with-dimensions\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\with-url">\\with-url\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\wordwrap">\\wordwrap\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\wordwrap-field">\\wordwrap-field\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="\wordwrap-string">\\wordwrap-string\b</SEQ_REGEXP>
+<MARK_FOLLOWING TYPE="FUNCTION">\</MARK_FOLLOWING>
+<KEYWORDS>
+ <KEYWORD2>Forbid_line_break_engraver</KEYWORD2>
+ <KEYWORD2>staff-symbol-referencer-interface</KEYWORD2>
+ <KEYWORD2>clef-interface</KEYWORD2>
+ <KEYWORD2>note-name-interface</KEYWORD2>
+ <KEYWORD2>lyric-extender-interface</KEYWORD2>
+ <KEYWORD2>mensural-ligature-interface</KEYWORD2>
+ <KEYWORD2>Multi_measure_rest_engraver</KEYWORD2>
+ <KEYWORD2>bass-figure-alignment-interface</KEYWORD2>
+ <KEYWORD2>Slur_engraver</KEYWORD2>
+ <KEYWORD2>Completion_heads_engraver</KEYWORD2>
+ <KEYWORD2>rhythmic-grob-interface</KEYWORD2>
+ <KEYWORD2>span-bar-interface</KEYWORD2>
+ <KEYWORD2>Drum_note_performer</KEYWORD2>
+ <KEYWORD2>InnerChoirStaff</KEYWORD2>
+ <KEYWORD2>Score</KEYWORD2>
+ <KEYWORD2>Bar_engraver</KEYWORD2>
+ <KEYWORD2>Breathing_sign_engraver</KEYWORD2>
+ <KEYWORD2>Staff</KEYWORD2>
+ <KEYWORD2>spanner-interface</KEYWORD2>
+ <KEYWORD2>Ligature_bracket_engraver</KEYWORD2>
+ <KEYWORD2>Chord_name_engraver</KEYWORD2>
+ <KEYWORD2>accidental-placement-interface</KEYWORD2>
+ <KEYWORD2>Span_arpeggio_engraver</KEYWORD2>
+ <KEYWORD2>MensuralVoice</KEYWORD2>
+ <KEYWORD2>Stanza_number_engraver</KEYWORD2>
+ <KEYWORD2>Grace_engraver</KEYWORD2>
+ <KEYWORD2>Grace_beam_engraver</KEYWORD2>
+ <KEYWORD2>script-interface</KEYWORD2>
+ <KEYWORD2>Time_signature_engraver</KEYWORD2>
+ <KEYWORD2>Stanza_number_align_engraver</KEYWORD2>
+ <KEYWORD2>GregorianTranscriptionStaff</KEYWORD2>
+ <KEYWORD2>Key_engraver</KEYWORD2>
+ <KEYWORD2>cluster-beacon-interface</KEYWORD2>
+ <KEYWORD2>TabVoice</KEYWORD2>
+ <KEYWORD2>Dynamic_engraver</KEYWORD2>
+ <KEYWORD2>rhythmic-head-interface</KEYWORD2>
+ <KEYWORD2>Repeat_acknowledge_engraver</KEYWORD2>
+ <KEYWORD2>dynamic-interface</KEYWORD2>
+ <KEYWORD2>volta-bracket-interface</KEYWORD2>
+ <KEYWORD2>bar-line-interface</KEYWORD2>
+ <KEYWORD2>piano-pedal-interface</KEYWORD2>
+ <KEYWORD2>font-interface</KEYWORD2>
+ <KEYWORD2>VaticanaVoice</KEYWORD2>
+ <KEYWORD2>staff-spacing-interface</KEYWORD2>
+ <KEYWORD2>tie-interface</KEYWORD2>
+ <KEYWORD2>Devnull</KEYWORD2>
+ <KEYWORD2>dynamic-text-spanner-interface</KEYWORD2>
+ <KEYWORD2>Script_row_engraver</KEYWORD2>
+ <KEYWORD2>Stem_engraver</KEYWORD2>
+ <KEYWORD2>grid-line-interface</KEYWORD2>
+ <KEYWORD2>grob-interface</KEYWORD2>
+ <KEYWORD2>custos-interface</KEYWORD2>
+ <KEYWORD2>Font_size_engraver</KEYWORD2>
+ <KEYWORD2>trill-pitch-accidental-interface</KEYWORD2>
+ <KEYWORD2>Clef_engraver</KEYWORD2>
+ <KEYWORD2>Text_engraver</KEYWORD2>
+ <KEYWORD2>dynamic-line-spanner-interface</KEYWORD2>
+ <KEYWORD2>Repeat_tie_engraver</KEYWORD2>
+ <KEYWORD2>tablature-interface</KEYWORD2>
+ <KEYWORD2>staff-symbol-interface</KEYWORD2>
+ <KEYWORD2>rest-collision-interface</KEYWORD2>
+ <KEYWORD2>Horizontal_bracket_engraver</KEYWORD2>
+ <KEYWORD2>accidental-suggestion-interface</KEYWORD2>
+ <KEYWORD2>Beam_performer</KEYWORD2>
+ <KEYWORD2>Lyric_performer</KEYWORD2>
+ <KEYWORD2>Piano_pedal_engraver</KEYWORD2>
+ <KEYWORD2>vaticana-ligature-interface</KEYWORD2>
+ <KEYWORD2>Tab_note_heads_engraver</KEYWORD2>
+ <KEYWORD2>text-interface</KEYWORD2>
+ <KEYWORD2>break-alignable-interface</KEYWORD2>
+ <KEYWORD2>lyric-hyphen-interface</KEYWORD2>
+ <KEYWORD2>grace-spacing-interface</KEYWORD2>
+ <KEYWORD2>note-column-interface</KEYWORD2>
+ <KEYWORD2>Vertical_align_engraver</KEYWORD2>
+ <KEYWORD2>break-aligned-interface</KEYWORD2>
+ <KEYWORD2>Staff_performer</KEYWORD2>
+ <KEYWORD2>Ledger_line_engraver</KEYWORD2>
+ <KEYWORD2>rest-interface</KEYWORD2>
+ <KEYWORD2>Fingering_engraver</KEYWORD2>
+ <KEYWORD2>figured-bass-continuation-interface</KEYWORD2>
+ <KEYWORD2>metronome-mark-interface</KEYWORD2>
+ <KEYWORD2>Key_performer</KEYWORD2>
+ <KEYWORD2>Separating_line_group_engraver</KEYWORD2>
+ <KEYWORD2>bend-after-interface</KEYWORD2>
+ <KEYWORD2>DrumStaff</KEYWORD2>
+ <KEYWORD2>unbreakable-spanner-interface</KEYWORD2>
+ <KEYWORD2>trill-spanner-interface</KEYWORD2>
+ <KEYWORD2>Grace_spacing_engraver</KEYWORD2>
+ <KEYWORD2>Ambitus_engraver</KEYWORD2>
+ <KEYWORD2>system-interface</KEYWORD2>
+ <KEYWORD2>Swallow_engraver</KEYWORD2>
+ <KEYWORD2>Cluster_spanner_engraver</KEYWORD2>
+ <KEYWORD2>fret-diagram-interface</KEYWORD2>
+ <KEYWORD2>gregorian-ligature-interface</KEYWORD2>
+ <KEYWORD2>dots-interface</KEYWORD2>
+ <KEYWORD2>percent-repeat-item-interface</KEYWORD2>
+ <KEYWORD2>Time_signature_performer</KEYWORD2>
+ <KEYWORD2>semi-tie-column-interface</KEYWORD2>
+ <KEYWORD2>spacing-spanner-interface</KEYWORD2>
+ <KEYWORD2>Staff_symbol_engraver</KEYWORD2>
+ <KEYWORD2>mark-interface</KEYWORD2>
+ <KEYWORD2>accidental-interface</KEYWORD2>
+ <KEYWORD2>Text_spanner_engraver</KEYWORD2>
+ <KEYWORD2>Swallow_performer</KEYWORD2>
+ <KEYWORD2>system-start-text-interface</KEYWORD2>
+ <KEYWORD2>Mensural_ligature_engraver</KEYWORD2>
+ <KEYWORD2>chord-name-interface</KEYWORD2>
+ <KEYWORD2>Lyric_engraver</KEYWORD2>
+ <KEYWORD2>Translator</KEYWORD2>
+ <KEYWORD2>script-column-interface</KEYWORD2>
+ <KEYWORD2>Instrument_switch_engraver</KEYWORD2>
+ <KEYWORD2>Grob_pq_engraver</KEYWORD2>
+ <KEYWORD2>Volta_engraver</KEYWORD2>
+ <KEYWORD2>breathing-sign-interface</KEYWORD2>
+ <KEYWORD2>Span_bar_engraver</KEYWORD2>
+ <KEYWORD2>Tab_harmonic_engraver</KEYWORD2>
+ <KEYWORD2>Note_performer</KEYWORD2>
+ <KEYWORD2>beam-interface</KEYWORD2>
+ <KEYWORD2>note-collision-interface</KEYWORD2>
+ <KEYWORD2>only-prebreak-interface</KEYWORD2>
+ <KEYWORD2>stroke-finger-interface</KEYWORD2>
+ <KEYWORD2>InnerStaffGroup</KEYWORD2>
+ <KEYWORD2>tie-column-interface</KEYWORD2>
+ <KEYWORD2>FretBoards</KEYWORD2>
+ <KEYWORD2>Tie_engraver</KEYWORD2>
+ <KEYWORD2>Laissez_vibrer_engraver</KEYWORD2>
+ <KEYWORD2>slur-interface</KEYWORD2>
+ <KEYWORD2>Custos_engraver</KEYWORD2>
+ <KEYWORD2>Note_swallow_translator</KEYWORD2>
+ <KEYWORD2>Rhythmic_column_engraver</KEYWORD2>
+ <KEYWORD2>Default_bar_line_engraver</KEYWORD2>
+ <KEYWORD2>note-spacing-interface</KEYWORD2>
+ <KEYWORD2>FiguredBass</KEYWORD2>
+ <KEYWORD2>vertically-spaceable-interface</KEYWORD2>
+ <KEYWORD2>GregorianTranscriptionVoice</KEYWORD2>
+ <KEYWORD2>stem-tremolo-interface</KEYWORD2>
+ <KEYWORD2>measure-grouping-interface</KEYWORD2>
+ <KEYWORD2>Spacing_engraver</KEYWORD2>
+ <KEYWORD2>side-position-interface</KEYWORD2>
+ <KEYWORD2>semi-tie-interface</KEYWORD2>
+ <KEYWORD2>lyric-syllable-interface</KEYWORD2>
+ <KEYWORD2>Engraver</KEYWORD2>
+ <KEYWORD2>Pitched_trill_engraver</KEYWORD2>
+ <KEYWORD2>ledger-line-spanner-interface</KEYWORD2>
+ <KEYWORD2>stem-interface</KEYWORD2>
+ <KEYWORD2>Extender_engraver</KEYWORD2>
+ <KEYWORD2>Pitch_squash_engraver</KEYWORD2>
+ <KEYWORD2>align-interface</KEYWORD2>
+ <KEYWORD2>ambitus-interface</KEYWORD2>
+ <KEYWORD2>Rest_swallow_translator</KEYWORD2>
+ <KEYWORD2>string-number-interface</KEYWORD2>
+ <KEYWORD2>self-alignment-interface</KEYWORD2>
+ <KEYWORD2>Rest_collision_engraver</KEYWORD2>
+ <KEYWORD2>hairpin-interface</KEYWORD2>
+ <KEYWORD2>NoteNames</KEYWORD2>
+ <KEYWORD2>Drum_notes_engraver</KEYWORD2>
+ <KEYWORD2>arpeggio-interface</KEYWORD2>
+ <KEYWORD2>Tweak_engraver</KEYWORD2>
+ <KEYWORD2>ledgered-interface</KEYWORD2>
+ <KEYWORD2>Global</KEYWORD2>
+ <KEYWORD2>StaffGroup</KEYWORD2>
+ <KEYWORD2>DrumVoice</KEYWORD2>
+ <KEYWORD2>Voice</KEYWORD2>
+ <KEYWORD2>GrandStaff</KEYWORD2>
+ <KEYWORD2>Staff_collecting_engraver</KEYWORD2>
+ <KEYWORD2>melody-spanner-interface</KEYWORD2>
+ <KEYWORD2>Hara_kiri_engraver</KEYWORD2>
+ <KEYWORD2>Figured_bass_position_engraver</KEYWORD2>
+ <KEYWORD2>Tempo_performer</KEYWORD2>
+ <KEYWORD2>New_dynamic_engraver</KEYWORD2>
+ <KEYWORD2>Measure_grouping_engraver</KEYWORD2>
+ <KEYWORD2>Hyphen_engraver</KEYWORD2>
+ <KEYWORD2>Skip_event_swallow_translator</KEYWORD2>
+ <KEYWORD2>Vaticana_ligature_engraver</KEYWORD2>
+ <KEYWORD2>text-script-interface</KEYWORD2>
+ <KEYWORD2>Tuplet_engraver</KEYWORD2>
+ <KEYWORD2>Slur_performer</KEYWORD2>
+ <KEYWORD2>spaceable-grob-interface</KEYWORD2>
+ <KEYWORD2>Tie_performer</KEYWORD2>
+ <KEYWORD2>Vertically_spaced_contexts_engraver</KEYWORD2>
+ <KEYWORD2>Trill_spanner_engraver</KEYWORD2>
+ <KEYWORD2>Spanner_break_forbid_engraver</KEYWORD2>
+ <KEYWORD2>CueVoice</KEYWORD2>
+ <KEYWORD2>ChoirStaff</KEYWORD2>
+ <KEYWORD2>Glissando_engraver</KEYWORD2>
+ <KEYWORD2>Balloon_engraver</KEYWORD2>
+ <KEYWORD2>separation-item-interface</KEYWORD2>
+ <KEYWORD2>Accidental_engraver</KEYWORD2>
+ <KEYWORD2>Output_property_engraver</KEYWORD2>
+ <KEYWORD2>hara-kiri-group-spanner-interface</KEYWORD2>
+ <KEYWORD2>piano-pedal-script-interface</KEYWORD2>
+ <KEYWORD2>system-start-delimiter-interface</KEYWORD2>
+ <KEYWORD2>multi-measure-rest-interface</KEYWORD2>
+ <KEYWORD2>Note_name_engraver</KEYWORD2>
+ <KEYWORD2>Note_spacing_engraver</KEYWORD2>
+ <KEYWORD2>Timing_translator</KEYWORD2>
+ <KEYWORD2>Mark_engraver</KEYWORD2>
+ <KEYWORD2>Control_track_performer</KEYWORD2>
+ <KEYWORD2>Part_combine_engraver</KEYWORD2>
+ <KEYWORD2>axis-group-interface</KEYWORD2>
+ <KEYWORD2>note-head-interface</KEYWORD2>
+ <KEYWORD2>horizontal-bracket-interface</KEYWORD2>
+ <KEYWORD2>PianoStaff</KEYWORD2>
+ <KEYWORD2>Slash_repeat_engraver</KEYWORD2>
+ <KEYWORD2>Page_turn_engraver</KEYWORD2>
+ <KEYWORD2>parentheses-interface</KEYWORD2>
+ <KEYWORD2>key-signature-interface</KEYWORD2>
+ <KEYWORD2>lyric-interface</KEYWORD2>
+ <KEYWORD2>grid-point-interface</KEYWORD2>
+ <KEYWORD2>item-interface</KEYWORD2>
+ <KEYWORD2>Ottava_spanner_engraver</KEYWORD2>
+ <KEYWORD2>Melody_engraver</KEYWORD2>
+ <KEYWORD2>Percent_repeat_engraver</KEYWORD2>
+ <KEYWORD2>tuplet-number-interface</KEYWORD2>
+ <KEYWORD2>Rest_engraver</KEYWORD2>
+ <KEYWORD2>stanza-number-interface</KEYWORD2>
+ <KEYWORD2>enclosing-bracket-interface</KEYWORD2>
+ <KEYWORD2>Break_align_engraver</KEYWORD2>
+ <KEYWORD2>Piano_pedal_performer</KEYWORD2>
+ <KEYWORD2>Paper_column_engraver</KEYWORD2>
+ <KEYWORD2>pitched-trill-interface</KEYWORD2>
+ <KEYWORD2>Grid_line_span_engraver</KEYWORD2>
+ <KEYWORD2>Lyrics</KEYWORD2>
+ <KEYWORD2>Instrument_name_engraver</KEYWORD2>
+ <KEYWORD2>line-interface</KEYWORD2>
+ <KEYWORD2>Bend_engraver</KEYWORD2>
+ <KEYWORD2>Arpeggio_engraver</KEYWORD2>
+ <KEYWORD2>key-cancellation-interface</KEYWORD2>
+ <KEYWORD2>Grid_point_engraver</KEYWORD2>
+ <KEYWORD2>Script_column_engraver</KEYWORD2>
+ <KEYWORD2>Note_head_line_engraver</KEYWORD2>
+ <KEYWORD2>spacing-options-interface</KEYWORD2>
+ <KEYWORD2>Dot_column_engraver</KEYWORD2>
+ <KEYWORD2>Chord_tremolo_engraver</KEYWORD2>
+ <KEYWORD2>bass-figure-interface</KEYWORD2>
+ <KEYWORD2>ottava-bracket-interface</KEYWORD2>
+ <KEYWORD2>Bar_number_engraver</KEYWORD2>
+ <KEYWORD2>Axis_group_engraver</KEYWORD2>
+ <KEYWORD2>tuplet-bracket-interface</KEYWORD2>
+ <KEYWORD2>Phrasing_slur_engraver</KEYWORD2>
+ <KEYWORD2>Dynamic_align_engraver</KEYWORD2>
+ <KEYWORD2>Piano_pedal_align_engraver</KEYWORD2>
+ <KEYWORD2>Collision_engraver</KEYWORD2>
+ <KEYWORD2>Dots_engraver</KEYWORD2>
+ <KEYWORD2>New_fingering_engraver</KEYWORD2>
+ <KEYWORD2>Figured_bass_engraver</KEYWORD2>
+ <KEYWORD2>dot-column-interface</KEYWORD2>
+ <KEYWORD2>multi-measure-interface</KEYWORD2>
+ <KEYWORD2>Fretboard_engraver</KEYWORD2>
+ <KEYWORD2>ligature-interface</KEYWORD2>
+ <KEYWORD2>instrument-specific-markup-interface</KEYWORD2>
+ <KEYWORD2>time-signature-interface</KEYWORD2>
+ <KEYWORD2>Metronome_mark_engraver</KEYWORD2>
+ <KEYWORD2>break-alignment-interface</KEYWORD2>
+ <KEYWORD2>Auto_beam_engraver</KEYWORD2>
+ <KEYWORD2>balloon-interface</KEYWORD2>
+ <KEYWORD2>VaticanaStaff</KEYWORD2>
+ <KEYWORD2>Script_engraver</KEYWORD2>
+ <KEYWORD2>System_start_delimiter_engraver</KEYWORD2>
+ <KEYWORD2>spacing-interface</KEYWORD2>
+ <KEYWORD2>ligature-bracket-interface</KEYWORD2>
+ <KEYWORD2>percent-repeat-interface</KEYWORD2>
+ <KEYWORD2>ChordNames</KEYWORD2>
+ <KEYWORD2>finger-interface</KEYWORD2>
+ <KEYWORD2>TabStaff</KEYWORD2>
+ <KEYWORD2>cluster-interface</KEYWORD2>
+ <KEYWORD2>Beam_engraver</KEYWORD2>
+ <KEYWORD2>RhythmicStaff</KEYWORD2>
+ <KEYWORD2>String_number_engraver</KEYWORD2>
+ <KEYWORD2>Dynamic_performer</KEYWORD2>
+ <KEYWORD2>piano-pedal-bracket-interface</KEYWORD2>
+ <KEYWORD2>Parenthesis_engraver</KEYWORD2>
+ <KEYWORD2>Tab_staff_symbol_engraver</KEYWORD2>
+ <KEYWORD2>paper-column-interface</KEYWORD2>
+ <KEYWORD2>Note_heads_engraver</KEYWORD2>
+ <KEYWORD2>MensuralStaff</KEYWORD2>
+ <KEYWORD2>line-spanner-interface</KEYWORD2>
+<!-- GUILE procedures -->
+<KEYWORD2>#:behaviour</KEYWORD2>
+<KEYWORD2>#:column</KEYWORD2>
+<KEYWORD2>#:condition</KEYWORD2>
+<KEYWORD2>#:depth</KEYWORD2>
+<KEYWORD2>#:exit-depth</KEYWORD2>
+<KEYWORD2>#:expression</KEYWORD2>
+<KEYWORD2>#:file-name</KEYWORD2>
+<KEYWORD2>#:file-regexp</KEYWORD2>
+<KEYWORD2>#:line</KEYWORD2>
+<KEYWORD2>#:procedure</KEYWORD2>
+<KEYWORD2>#:repeat-identical-behaviour</KEYWORD2>
+<KEYWORD2>#:single-shot</KEYWORD2>
+<KEYWORD2>#:skip-count</KEYWORD2>
+<KEYWORD2>$abs</KEYWORD2>
+<KEYWORD2>$acos</KEYWORD2>
+<KEYWORD2>$acosh</KEYWORD2>
+<KEYWORD2>$asin</KEYWORD2>
+<KEYWORD2>$asinh</KEYWORD2>
+<KEYWORD2>$atan</KEYWORD2>
+<KEYWORD2>$atan2</KEYWORD2>
+<KEYWORD2>$atanh</KEYWORD2>
+<KEYWORD2>$cos</KEYWORD2>
+<KEYWORD2>$cosh</KEYWORD2>
+<KEYWORD2>$exp</KEYWORD2>
+<KEYWORD2>$expt</KEYWORD2>
+<KEYWORD2>$log</KEYWORD2>
+<KEYWORD2>$sin</KEYWORD2>
+<KEYWORD2>$sinh</KEYWORD2>
+<KEYWORD2>$sqrt</KEYWORD2>
+<KEYWORD2>$tan</KEYWORD2>
+<KEYWORD2>$tanh</KEYWORD2>
+<KEYWORD2>%library-dir</KEYWORD2>
+<KEYWORD2>%make-void-port</KEYWORD2>
+<KEYWORD2>%package-data-dir</KEYWORD2>
+<KEYWORD2>%read-delimited!</KEYWORD2>
+<KEYWORD2>%read-line</KEYWORD2>
+<KEYWORD2>%search-load-path</KEYWORD2>
+<KEYWORD2>%site-dir</KEYWORD2>
+<KEYWORD2>,@</KEYWORD2>
+<KEYWORD2>->char-set</KEYWORD2>
+<KEYWORD2>1+</KEYWORD2>
+<KEYWORD2>1-</KEYWORD2>
+<KEYWORD2><apply-trap></KEYWORD2>
+<KEYWORD2><entry-trap></KEYWORD2>
+<KEYWORD2><exit-trap></KEYWORD2>
+<KEYWORD2><group>-disable</KEYWORD2>
+<KEYWORD2><group>-enable</KEYWORD2>
+<KEYWORD2><group>-options</KEYWORD2>
+<KEYWORD2><group>-set!</KEYWORD2>
+<KEYWORD2><location-trap></KEYWORD2>
+<KEYWORD2><procedure-trap></KEYWORD2>
+<KEYWORD2><source-trap></KEYWORD2>
+<KEYWORD2><step-trap></KEYWORD2>
+<KEYWORD2><trap></KEYWORD2>
+<KEYWORD2>abs</KEYWORD2>
+<KEYWORD2>accept</KEYWORD2>
+<KEYWORD2>access?</KEYWORD2>
+<KEYWORD2>acons</KEYWORD2>
+<KEYWORD2>acos</KEYWORD2>
+<KEYWORD2>acosh</KEYWORD2>
+<KEYWORD2>activate-readline</KEYWORD2>
+<KEYWORD2>add-duration</KEYWORD2>
+<KEYWORD2>add-duration!</KEYWORD2>
+<KEYWORD2>add-hook!</KEYWORD2>
+<KEYWORD2>alarm</KEYWORD2>
+<KEYWORD2>alist->hash-table</KEYWORD2>
+<KEYWORD2>alist-cons</KEYWORD2>
+<KEYWORD2>alist-copy</KEYWORD2>
+<KEYWORD2>alist-delete</KEYWORD2>
+<KEYWORD2>alist-delete!</KEYWORD2>
+<KEYWORD2>all-threads</KEYWORD2>
+<KEYWORD2>all-traps</KEYWORD2>
+<KEYWORD2>and</KEYWORD2>
+<KEYWORD2>and-let*</KEYWORD2>
+<KEYWORD2>angle</KEYWORD2>
+<KEYWORD2>any</KEYWORD2>
+<KEYWORD2>any->c32vector</KEYWORD2>
+<KEYWORD2>any->c64vector</KEYWORD2>
+<KEYWORD2>any->f32vector</KEYWORD2>
+<KEYWORD2>any->f64vector</KEYWORD2>
+<KEYWORD2>any->s16vector</KEYWORD2>
+<KEYWORD2>any->s32vector</KEYWORD2>
+<KEYWORD2>any->s64vector</KEYWORD2>
+<KEYWORD2>any->s8vector</KEYWORD2>
+<KEYWORD2>any->u16vector</KEYWORD2>
+<KEYWORD2>any->u32vector</KEYWORD2>
+<KEYWORD2>any->u64vector</KEYWORD2>
+<KEYWORD2>any->u8vector</KEYWORD2>
+<KEYWORD2>any-bits-set?</KEYWORD2>
+<KEYWORD2>append</KEYWORD2>
+<KEYWORD2>append!</KEYWORD2>
+<KEYWORD2>append-map</KEYWORD2>
+<KEYWORD2>append-map!</KEYWORD2>
+<KEYWORD2>append-reverse</KEYWORD2>
+<KEYWORD2>append-reverse!</KEYWORD2>
+<KEYWORD2>apply</KEYWORD2>
+<KEYWORD2>apply:nconc2last</KEYWORD2>
+<KEYWORD2>apropos-completion-function</KEYWORD2>
+<KEYWORD2>args-fold</KEYWORD2>
+<KEYWORD2>arithmetic-shift</KEYWORD2>
+<KEYWORD2>array->list</KEYWORD2>
+<KEYWORD2>array-contents</KEYWORD2>
+<KEYWORD2>array-copy!</KEYWORD2>
+<KEYWORD2>array-copy-in-order!</KEYWORD2>
+<KEYWORD2>array-dimensions</KEYWORD2>
+<KEYWORD2>array-equal?</KEYWORD2>
+<KEYWORD2>array-fill!</KEYWORD2>
+<KEYWORD2>array-for-each</KEYWORD2>
+<KEYWORD2>array-in-bounds?</KEYWORD2>
+<KEYWORD2>array-index-map!</KEYWORD2>
+<KEYWORD2>array-map!</KEYWORD2>
+<KEYWORD2>array-map-in-order!</KEYWORD2>
+<KEYWORD2>array-rank</KEYWORD2>
+<KEYWORD2>array-ref</KEYWORD2>
+<KEYWORD2>array-set!</KEYWORD2>
+<KEYWORD2>array-shape</KEYWORD2>
+<KEYWORD2>array-type</KEYWORD2>
+<KEYWORD2>array?</KEYWORD2>
+<KEYWORD2>ash</KEYWORD2>
+<KEYWORD2>asin</KEYWORD2>
+<KEYWORD2>asinh</KEYWORD2>
+<KEYWORD2>assoc</KEYWORD2>
+<KEYWORD2>assoc</KEYWORD2>
+<KEYWORD2>assoc-ref</KEYWORD2>
+<KEYWORD2>assoc-remove!</KEYWORD2>
+<KEYWORD2>assoc-set!</KEYWORD2>
+<KEYWORD2>assq</KEYWORD2>
+<KEYWORD2>assq-ref</KEYWORD2>
+<KEYWORD2>assq-remove!</KEYWORD2>
+<KEYWORD2>assq-set!</KEYWORD2>
+<KEYWORD2>assv</KEYWORD2>
+<KEYWORD2>assv-ref</KEYWORD2>
+<KEYWORD2>assv-remove!</KEYWORD2>
+<KEYWORD2>assv-set!</KEYWORD2>
+<KEYWORD2>async</KEYWORD2>
+<KEYWORD2>async-mark</KEYWORD2>
+<KEYWORD2>atan</KEYWORD2>
+<KEYWORD2>atanh</KEYWORD2>
+<KEYWORD2>backtrace</KEYWORD2>
+<KEYWORD2>backtrace</KEYWORD2>
+<KEYWORD2>basename</KEYWORD2>
+<KEYWORD2>begin</KEYWORD2>
+<KEYWORD2>begin-thread</KEYWORD2>
+<KEYWORD2>bind</KEYWORD2>
+<KEYWORD2>bind-textdomain-codeset</KEYWORD2>
+<KEYWORD2>bindtextdomain</KEYWORD2>
+<KEYWORD2>bit-count</KEYWORD2>
+<KEYWORD2>bit-count</KEYWORD2>
+<KEYWORD2>bit-count*</KEYWORD2>
+<KEYWORD2>bit-extract</KEYWORD2>
+<KEYWORD2>bit-field</KEYWORD2>
+<KEYWORD2>bit-invert!</KEYWORD2>
+<KEYWORD2>bit-position</KEYWORD2>
+<KEYWORD2>bit-set*!</KEYWORD2>
+<KEYWORD2>bit-set?</KEYWORD2>
+<KEYWORD2>bitvector</KEYWORD2>
+<KEYWORD2>bitvector->list</KEYWORD2>
+<KEYWORD2>bitvector-fill!</KEYWORD2>
+<KEYWORD2>bitvector-length</KEYWORD2>
+<KEYWORD2>bitvector-ref</KEYWORD2>
+<KEYWORD2>bitvector-set!</KEYWORD2>
+<KEYWORD2>bitvector?</KEYWORD2>
+<KEYWORD2>bitwise-and</KEYWORD2>
+<KEYWORD2>bitwise-if</KEYWORD2>
+<KEYWORD2>bitwise-ior</KEYWORD2>
+<KEYWORD2>bitwise-merge</KEYWORD2>
+<KEYWORD2>bitwise-not</KEYWORD2>
+<KEYWORD2>bitwise-xor</KEYWORD2>
+<KEYWORD2>boolean?</KEYWORD2>
+<KEYWORD2>booleans->integer</KEYWORD2>
+<KEYWORD2>break</KEYWORD2>
+<KEYWORD2>break</KEYWORD2>
+<KEYWORD2>break!</KEYWORD2>
+<KEYWORD2>broadcast-condition-variable</KEYWORD2>
+<KEYWORD2>bt</KEYWORD2>
+<KEYWORD2>c32vector</KEYWORD2>
+<KEYWORD2>c32vector->list</KEYWORD2>
+<KEYWORD2>c32vector-length</KEYWORD2>
+<KEYWORD2>c32vector-ref</KEYWORD2>
+<KEYWORD2>c32vector-set!</KEYWORD2>
+<KEYWORD2>c32vector?</KEYWORD2>
+<KEYWORD2>c64vector</KEYWORD2>
+<KEYWORD2>c64vector->list</KEYWORD2>
+<KEYWORD2>c64vector-length</KEYWORD2>
+<KEYWORD2>c64vector-ref</KEYWORD2>
+<KEYWORD2>c64vector-set!</KEYWORD2>
+<KEYWORD2>c64vector?</KEYWORD2>
+<KEYWORD2>caaaar</KEYWORD2>
+<KEYWORD2>caaadr</KEYWORD2>
+<KEYWORD2>caaar</KEYWORD2>
+<KEYWORD2>caadar</KEYWORD2>
+<KEYWORD2>caaddr</KEYWORD2>
+<KEYWORD2>caadr</KEYWORD2>
+<KEYWORD2>caar</KEYWORD2>
+<KEYWORD2>cadaar</KEYWORD2>
+<KEYWORD2>cadadr</KEYWORD2>
+<KEYWORD2>cadar</KEYWORD2>
+<KEYWORD2>caddar</KEYWORD2>
+<KEYWORD2>cadddr</KEYWORD2>
+<KEYWORD2>caddr</KEYWORD2>
+<KEYWORD2>cadr</KEYWORD2>
+<KEYWORD2>call-with-blocked-asyncs</KEYWORD2>
+<KEYWORD2>call-with-current-continuation</KEYWORD2>
+<KEYWORD2>call-with-input-file</KEYWORD2>
+<KEYWORD2>call-with-input-string</KEYWORD2>
+<KEYWORD2>call-with-new-thread</KEYWORD2>
+<KEYWORD2>call-with-output-file</KEYWORD2>
+<KEYWORD2>call-with-output-string</KEYWORD2>
+<KEYWORD2>call-with-unblocked-asyncs</KEYWORD2>
+<KEYWORD2>call-with-values</KEYWORD2>
+<KEYWORD2>call/cc</KEYWORD2>
+<KEYWORD2>car</KEYWORD2>
+<KEYWORD2>car+cdr</KEYWORD2>
+<KEYWORD2>case</KEYWORD2>
+<KEYWORD2>case-lambda</KEYWORD2>
+<KEYWORD2>catch</KEYWORD2>
+<KEYWORD2>cd</KEYWORD2>
+<KEYWORD2>cdaaar</KEYWORD2>
+<KEYWORD2>cdaadr</KEYWORD2>
+<KEYWORD2>cdaar</KEYWORD2>
+<KEYWORD2>cdadar</KEYWORD2>
+<KEYWORD2>cdaddr</KEYWORD2>
+<KEYWORD2>cdadr</KEYWORD2>
+<KEYWORD2>cdar</KEYWORD2>
+<KEYWORD2>cddaar</KEYWORD2>
+<KEYWORD2>cddadr</KEYWORD2>
+<KEYWORD2>cddar</KEYWORD2>
+<KEYWORD2>cdddar</KEYWORD2>
+<KEYWORD2>cddddr</KEYWORD2>
+<KEYWORD2>cdddr</KEYWORD2>
+<KEYWORD2>cddr</KEYWORD2>
+<KEYWORD2>cdr</KEYWORD2>
+<KEYWORD2>ceiling</KEYWORD2>
+<KEYWORD2>char->integer</KEYWORD2>
+<KEYWORD2>char-alphabetic?</KEYWORD2>
+<KEYWORD2>char-ci<=?</KEYWORD2>
+<KEYWORD2>char-ci<?</KEYWORD2>
+<KEYWORD2>char-ci=?</KEYWORD2>
+<KEYWORD2>char-ci>=?</KEYWORD2>
+<KEYWORD2>char-ci>?</KEYWORD2>
+<KEYWORD2>char-downcase</KEYWORD2>
+<KEYWORD2>char-is-both?</KEYWORD2>
+<KEYWORD2>char-lower-case?</KEYWORD2>
+<KEYWORD2>char-numeric?</KEYWORD2>
+<KEYWORD2>char-ready?</KEYWORD2>
+<KEYWORD2>char-set</KEYWORD2>
+<KEYWORD2>char-set->list</KEYWORD2>
+<KEYWORD2>char-set->string</KEYWORD2>
+<KEYWORD2>char-set-adjoin</KEYWORD2>
+<KEYWORD2>char-set-adjoin!</KEYWORD2>
+<KEYWORD2>char-set-any</KEYWORD2>
+<KEYWORD2>char-set-complement</KEYWORD2>
+<KEYWORD2>char-set-complement!</KEYWORD2>
+<KEYWORD2>char-set-contains?</KEYWORD2>
+<KEYWORD2>char-set-copy</KEYWORD2>
+<KEYWORD2>char-set-count</KEYWORD2>
+<KEYWORD2>char-set-cursor</KEYWORD2>
+<KEYWORD2>char-set-cursor-next</KEYWORD2>
+<KEYWORD2>char-set-delete</KEYWORD2>
+<KEYWORD2>char-set-delete!</KEYWORD2>
+<KEYWORD2>char-set-diff+intersection</KEYWORD2>
+<KEYWORD2>char-set-diff+intersection!</KEYWORD2>
+<KEYWORD2>char-set-difference</KEYWORD2>
+<KEYWORD2>char-set-difference!</KEYWORD2>
+<KEYWORD2>char-set-every</KEYWORD2>
+<KEYWORD2>char-set-filter</KEYWORD2>
+<KEYWORD2>char-set-filter!</KEYWORD2>
+<KEYWORD2>char-set-fold</KEYWORD2>
+<KEYWORD2>char-set-for-each</KEYWORD2>
+<KEYWORD2>char-set-hash</KEYWORD2>
+<KEYWORD2>char-set-intersection</KEYWORD2>
+<KEYWORD2>char-set-intersection!</KEYWORD2>
+<KEYWORD2>char-set-map</KEYWORD2>
+<KEYWORD2>char-set-ref</KEYWORD2>
+<KEYWORD2>char-set-size</KEYWORD2>
+<KEYWORD2>char-set-unfold</KEYWORD2>
+<KEYWORD2>char-set-unfold!</KEYWORD2>
+<KEYWORD2>char-set-union</KEYWORD2>
+<KEYWORD2>char-set-union!</KEYWORD2>
+<KEYWORD2>char-set-xor</KEYWORD2>
+<KEYWORD2>char-set-xor!</KEYWORD2>
+<KEYWORD2>char-set<=</KEYWORD2>
+<KEYWORD2>char-set=</KEYWORD2>
+<KEYWORD2>char-set?</KEYWORD2>
+<KEYWORD2>char-upcase</KEYWORD2>
+<KEYWORD2>char-upper-case?</KEYWORD2>
+<KEYWORD2>char-whitespace?</KEYWORD2>
+<KEYWORD2>char<=?</KEYWORD2>
+<KEYWORD2>char<?</KEYWORD2>
+<KEYWORD2>char=?</KEYWORD2>
+<KEYWORD2>char>=?</KEYWORD2>
+<KEYWORD2>char>?</KEYWORD2>
+<KEYWORD2>char?</KEYWORD2>
+<KEYWORD2>chdir</KEYWORD2>
+<KEYWORD2>chmod</KEYWORD2>
+<KEYWORD2>chown</KEYWORD2>
+<KEYWORD2>chroot</KEYWORD2>
+<KEYWORD2>circular-list</KEYWORD2>
+<KEYWORD2>circular-list?</KEYWORD2>
+<KEYWORD2>close</KEYWORD2>
+<KEYWORD2>close-fdes</KEYWORD2>
+<KEYWORD2>close-input-port</KEYWORD2>
+<KEYWORD2>close-output-port</KEYWORD2>
+<KEYWORD2>close-pipe</KEYWORD2>
+<KEYWORD2>close-port</KEYWORD2>
+<KEYWORD2>closedir</KEYWORD2>
+<KEYWORD2>closure?</KEYWORD2>
+<KEYWORD2>command-line</KEYWORD2>
+<KEYWORD2>complex?</KEYWORD2>
+<KEYWORD2>concatenate</KEYWORD2>
+<KEYWORD2>concatenate!</KEYWORD2>
+<KEYWORD2>cond</KEYWORD2>
+<KEYWORD2>cond-expand</KEYWORD2>
+<KEYWORD2>condition</KEYWORD2>
+<KEYWORD2>condition-has-type?</KEYWORD2>
+<KEYWORD2>condition-message</KEYWORD2>
+<KEYWORD2>condition-ref</KEYWORD2>
+<KEYWORD2>condition-type?</KEYWORD2>
+<KEYWORD2>connect</KEYWORD2>
+<KEYWORD2>cons</KEYWORD2>
+<KEYWORD2>cons*</KEYWORD2>
+<KEYWORD2>cons-source</KEYWORD2>
+<KEYWORD2>continue</KEYWORD2>
+<KEYWORD2>continue</KEYWORD2>
+<KEYWORD2>copy-bit</KEYWORD2>
+<KEYWORD2>copy-bit-field</KEYWORD2>
+<KEYWORD2>copy-file</KEYWORD2>
+<KEYWORD2>copy-random-state</KEYWORD2>
+<KEYWORD2>copy-time</KEYWORD2>
+<KEYWORD2>copy-tree</KEYWORD2>
+<KEYWORD2>cos</KEYWORD2>
+<KEYWORD2>cosh</KEYWORD2>
+<KEYWORD2>count</KEYWORD2>
+<KEYWORD2>crypt</KEYWORD2>
+<KEYWORD2>ctermid</KEYWORD2>
+<KEYWORD2>current-date</KEYWORD2>
+<KEYWORD2>current-dynamic-state</KEYWORD2>
+<KEYWORD2>current-error-port</KEYWORD2>
+<KEYWORD2>current-error-port</KEYWORD2>
+<KEYWORD2>current-input-port</KEYWORD2>
+<KEYWORD2>current-input-port</KEYWORD2>
+<KEYWORD2>current-julian-day</KEYWORD2>
+<KEYWORD2>current-load-port</KEYWORD2>
+<KEYWORD2>current-modified-julian-day</KEYWORD2>
+<KEYWORD2>current-module</KEYWORD2>
+<KEYWORD2>current-output-port</KEYWORD2>
+<KEYWORD2>current-output-port</KEYWORD2>
+<KEYWORD2>current-thread</KEYWORD2>
+<KEYWORD2>current-time</KEYWORD2>
+<KEYWORD2>current-time</KEYWORD2>
+<KEYWORD2>cuserid</KEYWORD2>
+<KEYWORD2>cut</KEYWORD2>
+<KEYWORD2>cute</KEYWORD2>
+<KEYWORD2>date->julian-day</KEYWORD2>
+<KEYWORD2>date->modified-julian-day</KEYWORD2>
+<KEYWORD2>date->string</KEYWORD2>
+<KEYWORD2>date->time-monotonic</KEYWORD2>
+<KEYWORD2>date->time-tai</KEYWORD2>
+<KEYWORD2>date->time-utc</KEYWORD2>
+<KEYWORD2>date-day</KEYWORD2>
+<KEYWORD2>date-hour</KEYWORD2>
+<KEYWORD2>date-minute</KEYWORD2>
+<KEYWORD2>date-month</KEYWORD2>
+<KEYWORD2>date-nanosecond</KEYWORD2>
+<KEYWORD2>date-second</KEYWORD2>
+<KEYWORD2>date-week-day</KEYWORD2>
+<KEYWORD2>date-week-number</KEYWORD2>
+<KEYWORD2>date-year</KEYWORD2>
+<KEYWORD2>date-year-day</KEYWORD2>
+<KEYWORD2>date-zone-offset</KEYWORD2>
+<KEYWORD2>date?</KEYWORD2>
+<KEYWORD2>debug</KEYWORD2>
+<KEYWORD2>debug-disable</KEYWORD2>
+<KEYWORD2>debug-enable</KEYWORD2>
+<KEYWORD2>debug-object?</KEYWORD2>
+<KEYWORD2>debug-options</KEYWORD2>
+<KEYWORD2>debug-options-interface</KEYWORD2>
+<KEYWORD2>debug-set!</KEYWORD2>
+<KEYWORD2>debug-trap</KEYWORD2>
+<KEYWORD2>default-duplicate-binding-handler</KEYWORD2>
+<KEYWORD2>define</KEYWORD2>
+<KEYWORD2>define*</KEYWORD2>
+<KEYWORD2>define*-public</KEYWORD2>
+<KEYWORD2>define-condition-type</KEYWORD2>
+<KEYWORD2>define-macro</KEYWORD2>
+<KEYWORD2>define-module</KEYWORD2>
+<KEYWORD2>define-public</KEYWORD2>
+<KEYWORD2>define-reader-ctor</KEYWORD2>
+<KEYWORD2>define-record-type</KEYWORD2>
+<KEYWORD2>defined?</KEYWORD2>
+<KEYWORD2>defmacro</KEYWORD2>
+<KEYWORD2>defmacro*</KEYWORD2>
+<KEYWORD2>defmacro*-public</KEYWORD2>
+<KEYWORD2>delay</KEYWORD2>
+<KEYWORD2>delete</KEYWORD2>
+<KEYWORD2>delete</KEYWORD2>
+<KEYWORD2>delete!</KEYWORD2>
+<KEYWORD2>delete!</KEYWORD2>
+<KEYWORD2>delete-duplicates</KEYWORD2>
+<KEYWORD2>delete-duplicates!</KEYWORD2>
+<KEYWORD2>delete-file</KEYWORD2>
+<KEYWORD2>delete1!</KEYWORD2>
+<KEYWORD2>delq</KEYWORD2>
+<KEYWORD2>delq!</KEYWORD2>
+<KEYWORD2>delq1!</KEYWORD2>
+<KEYWORD2>delv</KEYWORD2>
+<KEYWORD2>delv!</KEYWORD2>
+<KEYWORD2>delv1!</KEYWORD2>
+<KEYWORD2>denominator</KEYWORD2>
+<KEYWORD2>deq!</KEYWORD2>
+<KEYWORD2>directory-stream?</KEYWORD2>
+<KEYWORD2>dirname</KEYWORD2>
+<KEYWORD2>display</KEYWORD2>
+<KEYWORD2>display-application</KEYWORD2>
+<KEYWORD2>display-backtrace</KEYWORD2>
+<KEYWORD2>display-error</KEYWORD2>
+<!-- KEYWORD2>do</KEYWORD2 -->
+<KEYWORD2>dotted-list?</KEYWORD2>
+<KEYWORD2>doubly-weak-hash-table?</KEYWORD2>
+<KEYWORD2>down</KEYWORD2>
+<KEYWORD2>drain-input</KEYWORD2>
+<KEYWORD2>drop</KEYWORD2>
+<KEYWORD2>drop-right</KEYWORD2>
+<KEYWORD2>drop-right!</KEYWORD2>
+<KEYWORD2>drop-while</KEYWORD2>
+<KEYWORD2>dup</KEYWORD2>
+<KEYWORD2>dup->fdes</KEYWORD2>
+<KEYWORD2>dup->inport</KEYWORD2>
+<KEYWORD2>dup->outport</KEYWORD2>
+<KEYWORD2>dup->port</KEYWORD2>
+<KEYWORD2>dup2</KEYWORD2>
+<KEYWORD2>duplicate-port</KEYWORD2>
+<KEYWORD2>dynamic-args-call</KEYWORD2>
+<KEYWORD2>dynamic-call</KEYWORD2>
+<KEYWORD2>dynamic-func</KEYWORD2>
+<KEYWORD2>dynamic-link</KEYWORD2>
+<KEYWORD2>dynamic-object?</KEYWORD2>
+<KEYWORD2>dynamic-state?</KEYWORD2>
+<KEYWORD2>dynamic-unlink</KEYWORD2>
+<KEYWORD2>dynamic-wind</KEYWORD2>
+<KEYWORD2>effective-version</KEYWORD2>
+<KEYWORD2>eighth</KEYWORD2>
+<KEYWORD2>enclose-array</KEYWORD2>
+<KEYWORD2>end-of-char-set?</KEYWORD2>
+<KEYWORD2>endgrent</KEYWORD2>
+<KEYWORD2>endhostent</KEYWORD2>
+<KEYWORD2>endnetent</KEYWORD2>
+<KEYWORD2>endprotoent</KEYWORD2>
+<KEYWORD2>endpwent</KEYWORD2>
+<KEYWORD2>endservent</KEYWORD2>
+<KEYWORD2>enq!</KEYWORD2>
+<KEYWORD2>entity?</KEYWORD2>
+<KEYWORD2>environ</KEYWORD2>
+<KEYWORD2>eof-object?</KEYWORD2>
+<KEYWORD2>eq?</KEYWORD2>
+<KEYWORD2>equal?</KEYWORD2>
+<KEYWORD2>eqv?</KEYWORD2>
+<KEYWORD2>error</KEYWORD2>
+<KEYWORD2>error?</KEYWORD2>
+<KEYWORD2>eval</KEYWORD2>
+<KEYWORD2>eval-disable</KEYWORD2>
+<KEYWORD2>eval-enable</KEYWORD2>
+<KEYWORD2>eval-options</KEYWORD2>
+<KEYWORD2>eval-options-interface</KEYWORD2>
+<KEYWORD2>eval-options-interface</KEYWORD2>
+<KEYWORD2>eval-set!</KEYWORD2>
+<KEYWORD2>eval-string</KEYWORD2>
+<KEYWORD2>evaluate</KEYWORD2>
+<KEYWORD2>evaluator-traps-interface</KEYWORD2>
+<KEYWORD2>evaluator-traps-interface</KEYWORD2>
+<KEYWORD2>even?</KEYWORD2>
+<KEYWORD2>every</KEYWORD2>
+<KEYWORD2>exact->inexact</KEYWORD2>
+<KEYWORD2>exact?</KEYWORD2>
+<KEYWORD2>execl</KEYWORD2>
+<KEYWORD2>execle</KEYWORD2>
+<KEYWORD2>execlp</KEYWORD2>
+<KEYWORD2>exp</KEYWORD2>
+<KEYWORD2>expect</KEYWORD2>
+<KEYWORD2>expect-strings</KEYWORD2>
+<KEYWORD2>export</KEYWORD2>
+<KEYWORD2>expt</KEYWORD2>
+<KEYWORD2>extract-condition</KEYWORD2>
+<KEYWORD2>f32vector</KEYWORD2>
+<KEYWORD2>f32vector->list</KEYWORD2>
+<KEYWORD2>f32vector-length</KEYWORD2>
+<KEYWORD2>f32vector-ref</KEYWORD2>
+<KEYWORD2>f32vector-set!</KEYWORD2>
+<KEYWORD2>f32vector?</KEYWORD2>
+<KEYWORD2>f64vector</KEYWORD2>
+<KEYWORD2>f64vector->list</KEYWORD2>
+<KEYWORD2>f64vector-length</KEYWORD2>
+<KEYWORD2>f64vector-ref</KEYWORD2>
+<KEYWORD2>f64vector-set!</KEYWORD2>
+<KEYWORD2>f64vector?</KEYWORD2>
+<KEYWORD2>false-if-exception</KEYWORD2>
+<KEYWORD2>fchmod</KEYWORD2>
+<KEYWORD2>fchown</KEYWORD2>
+<KEYWORD2>fcntl</KEYWORD2>
+<KEYWORD2>fdes->inport</KEYWORD2>
+<KEYWORD2>fdes->outport</KEYWORD2>
+<KEYWORD2>fdes->ports</KEYWORD2>
+<KEYWORD2>fdopen</KEYWORD2>
+<KEYWORD2>feature?</KEYWORD2>
+<KEYWORD2>fflush</KEYWORD2>
+<KEYWORD2>fifth</KEYWORD2>
+<KEYWORD2>file-exists?</KEYWORD2>
+<KEYWORD2>file-port?</KEYWORD2>
+<KEYWORD2>filename-completion-function</KEYWORD2>
+<KEYWORD2>fileno</KEYWORD2>
+<KEYWORD2>filter</KEYWORD2>
+<KEYWORD2>filter!</KEYWORD2>
+<KEYWORD2>filter-map</KEYWORD2>
+<KEYWORD2>find</KEYWORD2>
+<KEYWORD2>find-tail</KEYWORD2>
+<KEYWORD2>finish</KEYWORD2>
+<KEYWORD2>first</KEYWORD2>
+<KEYWORD2>first-set-bit</KEYWORD2>
+<KEYWORD2>flock</KEYWORD2>
+<KEYWORD2>floor</KEYWORD2>
+<KEYWORD2>fluid-ref</KEYWORD2>
+<KEYWORD2>fluid-set!</KEYWORD2>
+<KEYWORD2>fluid?</KEYWORD2>
+<KEYWORD2>flush-all-ports</KEYWORD2>
+<KEYWORD2>fn</KEYWORD2>
+<KEYWORD2>fold</KEYWORD2>
+<KEYWORD2>fold-matches</KEYWORD2>
+<KEYWORD2>fold-right</KEYWORD2>
+<KEYWORD2>for-each</KEYWORD2>
+<KEYWORD2>for-each</KEYWORD2>
+<KEYWORD2>force</KEYWORD2>
+<KEYWORD2>force-output</KEYWORD2>
+<KEYWORD2>format</KEYWORD2>
+<KEYWORD2>fourth</KEYWORD2>
+<KEYWORD2>frame</KEYWORD2>
+<KEYWORD2>frame-arguments</KEYWORD2>
+<KEYWORD2>frame-evaluating-args?</KEYWORD2>
+<KEYWORD2>frame-next</KEYWORD2>
+<KEYWORD2>frame-number</KEYWORD2>
+<KEYWORD2>frame-overflow?</KEYWORD2>
+<KEYWORD2>frame-previous</KEYWORD2>
+<KEYWORD2>frame-procedure</KEYWORD2>
+<KEYWORD2>frame-procedure?</KEYWORD2>
+<KEYWORD2>frame-real?</KEYWORD2>
+<KEYWORD2>frame-source</KEYWORD2>
+<KEYWORD2>frame?</KEYWORD2>
+<KEYWORD2>fstat</KEYWORD2>
+<KEYWORD2>fsync</KEYWORD2>
+<KEYWORD2>ftell</KEYWORD2>
+<KEYWORD2>ftruncate</KEYWORD2>
+<KEYWORD2>ftw</KEYWORD2>
+<KEYWORD2>gc</KEYWORD2>
+<KEYWORD2>gc-live-object-stats</KEYWORD2>
+<KEYWORD2>gc-stats</KEYWORD2>
+<KEYWORD2>gcd</KEYWORD2>
+<KEYWORD2>gds-apropos</KEYWORD2>
+<KEYWORD2>gds-complete-symbol</KEYWORD2>
+<KEYWORD2>gds-debug-trap</KEYWORD2>
+<KEYWORD2>gds-down</KEYWORD2>
+<KEYWORD2>gds-eval-defun</KEYWORD2>
+<KEYWORD2>gds-eval-expression</KEYWORD2>
+<KEYWORD2>gds-eval-last-sexp</KEYWORD2>
+<KEYWORD2>gds-eval-region</KEYWORD2>
+<KEYWORD2>gds-evaluate</KEYWORD2>
+<KEYWORD2>gds-frame-args</KEYWORD2>
+<KEYWORD2>gds-frame-info</KEYWORD2>
+<KEYWORD2>gds-go</KEYWORD2>
+<KEYWORD2>gds-help-symbol</KEYWORD2>
+<KEYWORD2>gds-proc-source</KEYWORD2>
+<KEYWORD2>gds-select-stack-frame</KEYWORD2>
+<KEYWORD2>gds-step-file</KEYWORD2>
+<KEYWORD2>gds-step-into</KEYWORD2>
+<KEYWORD2>gds-step-over</KEYWORD2>
+<KEYWORD2>gds-up</KEYWORD2>
+<KEYWORD2>generalized-vector->list</KEYWORD2>
+<KEYWORD2>generalized-vector-length</KEYWORD2>
+<KEYWORD2>generalized-vector-ref</KEYWORD2>
+<KEYWORD2>generalized-vector-set!</KEYWORD2>
+<KEYWORD2>generalized-vector?</KEYWORD2>
+<KEYWORD2>gensym</KEYWORD2>
+<KEYWORD2>get-internal-real-time</KEYWORD2>
+<KEYWORD2>get-internal-run-time</KEYWORD2>
+<KEYWORD2>get-output-string</KEYWORD2>
+<KEYWORD2>get-print-state</KEYWORD2>
+<KEYWORD2>get-trap</KEYWORD2>
+<KEYWORD2>getcwd</KEYWORD2>
+<KEYWORD2>getegid</KEYWORD2>
+<KEYWORD2>getenv</KEYWORD2>
+<KEYWORD2>geteuid</KEYWORD2>
+<KEYWORD2>getgid</KEYWORD2>
+<KEYWORD2>getgr</KEYWORD2>
+<KEYWORD2>getgrent</KEYWORD2>
+<KEYWORD2>getgrgid</KEYWORD2>
+<KEYWORD2>getgrnam</KEYWORD2>
+<KEYWORD2>getgroups</KEYWORD2>
+<KEYWORD2>gethost</KEYWORD2>
+<KEYWORD2>gethostbyaddr</KEYWORD2>
+<KEYWORD2>gethostbyname</KEYWORD2>
+<KEYWORD2>gethostent</KEYWORD2>
+<KEYWORD2>gethostname</KEYWORD2>
+<KEYWORD2>getitimer</KEYWORD2>
+<KEYWORD2>getlogin</KEYWORD2>
+<KEYWORD2>getnet</KEYWORD2>
+<KEYWORD2>getnetbyaddr</KEYWORD2>
+<KEYWORD2>getnetbyname</KEYWORD2>
+<KEYWORD2>getnetent</KEYWORD2>
+<KEYWORD2>getopt-long</KEYWORD2>
+<KEYWORD2>getpass</KEYWORD2>
+<KEYWORD2>getpeername</KEYWORD2>
+<KEYWORD2>getpgrp</KEYWORD2>
+<KEYWORD2>getpid</KEYWORD2>
+<KEYWORD2>getppid</KEYWORD2>
+<KEYWORD2>getpriority</KEYWORD2>
+<KEYWORD2>getproto</KEYWORD2>
+<KEYWORD2>getprotobyname</KEYWORD2>
+<KEYWORD2>getprotobynumber</KEYWORD2>
+<KEYWORD2>getprotoent</KEYWORD2>
+<KEYWORD2>getpw</KEYWORD2>
+<KEYWORD2>getpwent</KEYWORD2>
+<KEYWORD2>getpwnam</KEYWORD2>
+<KEYWORD2>getpwuid</KEYWORD2>
+<KEYWORD2>getserv</KEYWORD2>
+<KEYWORD2>getservbyname</KEYWORD2>
+<KEYWORD2>getservbyport</KEYWORD2>
+<KEYWORD2>getservent</KEYWORD2>
+<KEYWORD2>getsockname</KEYWORD2>
+<KEYWORD2>getsockopt</KEYWORD2>
+<KEYWORD2>getter-with-setter</KEYWORD2>
+<KEYWORD2>gettext</KEYWORD2>
+<KEYWORD2>gettimeofday</KEYWORD2>
+<KEYWORD2>getuid</KEYWORD2>
+<KEYWORD2>GH_ALLOW_INTS</KEYWORD2>
+<KEYWORD2>gh_append</KEYWORD2>
+<KEYWORD2>gh_append2</KEYWORD2>
+<KEYWORD2>gh_append3</KEYWORD2>
+<KEYWORD2>gh_append4</KEYWORD2>
+<KEYWORD2>gh_apply</KEYWORD2>
+<KEYWORD2>gh_assoc</KEYWORD2>
+<KEYWORD2>gh_assq</KEYWORD2>
+<KEYWORD2>gh_assv</KEYWORD2>
+<KEYWORD2>gh_bool2scm</KEYWORD2>
+<KEYWORD2>gh_boolean_p</KEYWORD2>
+<KEYWORD2>gh_c</KEYWORD2>
+<KEYWORD2>gh_call0</KEYWORD2>
+<KEYWORD2>gh_call1</KEYWORD2>
+<KEYWORD2>gh_call2</KEYWORD2>
+<KEYWORD2>gh_call3</KEYWORD2>
+<KEYWORD2>gh_car</KEYWORD2>
+<KEYWORD2>gh_catch</KEYWORD2>
+<KEYWORD2>gh_cdr</KEYWORD2>
+<KEYWORD2>gh_char2scm</KEYWORD2>
+<KEYWORD2>gh_char_p</KEYWORD2>
+<KEYWORD2>gh_chars2byvect</KEYWORD2>
+<KEYWORD2>gh_cons</KEYWORD2>
+<KEYWORD2>GH_DEFER_INTS</KEYWORD2>
+<KEYWORD2>gh_define</KEYWORD2>
+<KEYWORD2>gh_double2scm</KEYWORD2>
+<KEYWORD2>gh_doubles2dvect</KEYWORD2>
+<KEYWORD2>gh_doubles2scm</KEYWORD2>
+<KEYWORD2>gh_enter</KEYWORD2>
+<KEYWORD2>gh_eq_p</KEYWORD2>
+<KEYWORD2>gh_equal_p</KEYWORD2>
+<KEYWORD2>gh_eqv_p</KEYWORD2>
+<KEYWORD2>gh_eval_file</KEYWORD2>
+<KEYWORD2>gh_eval_str</KEYWORD2>
+<KEYWORD2>gh_exact_p</KEYWORD2>
+<KEYWORD2>gh_floats2fvect</KEYWORD2>
+<KEYWORD2>gh_get_substr</KEYWORD2>
+<KEYWORD2>gh_inexact_p</KEYWORD2>
+<KEYWORD2>gh_ints2scm</KEYWORD2>
+<KEYWORD2>gh_is_eq</KEYWORD2>
+<KEYWORD2>gh_is_equal</KEYWORD2>
+<KEYWORD2>gh_is_eqv</KEYWORD2>
+<KEYWORD2>gh_length</KEYWORD2>
+<KEYWORD2>gh_list</KEYWORD2>
+<KEYWORD2>gh_list_p</KEYWORD2>
+<KEYWORD2>gh_list_ref</KEYWORD2>
+<KEYWORD2>gh_list_tail</KEYWORD2>
+<KEYWORD2>gh_list_to_vector</KEYWORD2>
+<KEYWORD2>gh_load</KEYWORD2>
+<KEYWORD2>gh_long2scm</KEYWORD2>
+<KEYWORD2>gh_longs2ivect</KEYWORD2>
+<KEYWORD2>gh_make_vector</KEYWORD2>
+<KEYWORD2>gh_member</KEYWORD2>
+<KEYWORD2>gh_memq</KEYWORD2>
+<KEYWORD2>gh_memv</KEYWORD2>
+<KEYWORD2>gh_new_procedure</KEYWORD2>
+<KEYWORD2>gh_null_p</KEYWORD2>
+<KEYWORD2>gh_obj_length</KEYWORD2>
+<KEYWORD2>gh_pair_p</KEYWORD2>
+<KEYWORD2>gh_procedure_p</KEYWORD2>
+<KEYWORD2>gh_repl</KEYWORD2>
+<KEYWORD2>gh_reverse</KEYWORD2>
+<KEYWORD2>gh_scm2bool</KEYWORD2>
+<KEYWORD2>gh_scm2char</KEYWORD2>
+<KEYWORD2>gh_scm2chars</KEYWORD2>
+<KEYWORD2>gh_scm2double</KEYWORD2>
+<KEYWORD2>gh_scm2doubles</KEYWORD2>
+<KEYWORD2>gh_scm2floats</KEYWORD2>
+<KEYWORD2>gh_scm2long</KEYWORD2>
+<KEYWORD2>gh_scm2longs</KEYWORD2>
+<KEYWORD2>gh_scm2newstr</KEYWORD2>
+<KEYWORD2>gh_scm2shorts</KEYWORD2>
+<KEYWORD2>gh_scm2ulong</KEYWORD2>
+<KEYWORD2>gh_set_car_x</KEYWORD2>
+<KEYWORD2>gh_set_cdr_x</KEYWORD2>
+<KEYWORD2>gh_set_substr</KEYWORD2>
+<KEYWORD2>gh_shorts2svect</KEYWORD2>
+<KEYWORD2>gh_str02scm</KEYWORD2>
+<KEYWORD2>gh_str2scm</KEYWORD2>
+<KEYWORD2>gh_string_equal_p</KEYWORD2>
+<KEYWORD2>gh_symbol2newstr</KEYWORD2>
+<KEYWORD2>gh_symbol2scm</KEYWORD2>
+<KEYWORD2>gh_symbol_p</KEYWORD2>
+<KEYWORD2>gh_throw</KEYWORD2>
+<KEYWORD2>gh_ulong2scm</KEYWORD2>
+<KEYWORD2>gh_ulongs2uvect</KEYWORD2>
+<KEYWORD2>gh_vector</KEYWORD2>
+<KEYWORD2>gh_vector_length</KEYWORD2>
+<KEYWORD2>gh_vector_p</KEYWORD2>
+<KEYWORD2>gh_vector_ref</KEYWORD2>
+<KEYWORD2>gh_vector_set</KEYWORD2>
+<KEYWORD2>gmtime</KEYWORD2>
+<KEYWORD2>group:gid</KEYWORD2>
+<KEYWORD2>group:mem</KEYWORD2>
+<KEYWORD2>group:name</KEYWORD2>
+<KEYWORD2>group:passwd</KEYWORD2>
+<KEYWORD2>GUILE_CHECK_RETVAL</KEYWORD2>
+<KEYWORD2>GUILE_FLAGS</KEYWORD2>
+<KEYWORD2>GUILE_MODULE_AVAILABLE</KEYWORD2>
+<KEYWORD2>GUILE_MODULE_CHECK</KEYWORD2>
+<KEYWORD2>GUILE_MODULE_EXPORTS</KEYWORD2>
+<KEYWORD2>GUILE_MODULE_REQUIRED</KEYWORD2>
+<KEYWORD2>GUILE_MODULE_REQUIRED_EXPORT</KEYWORD2>
+<KEYWORD2>GUILE_PROGS</KEYWORD2>
+<KEYWORD2>GUILE_SITE_DIR</KEYWORD2>
+<KEYWORD2>hash</KEYWORD2>
+<KEYWORD2>hash</KEYWORD2>
+<KEYWORD2>hash-by-identity</KEYWORD2>
+<KEYWORD2>hash-clear!</KEYWORD2>
+<KEYWORD2>hash-create-handle!</KEYWORD2>
+<KEYWORD2>hash-fold</KEYWORD2>
+<KEYWORD2>hash-for-each</KEYWORD2>
+<KEYWORD2>hash-for-each-handle</KEYWORD2>
+<KEYWORD2>hash-get-handle</KEYWORD2>
+<KEYWORD2>hash-map->list</KEYWORD2>
+<KEYWORD2>hash-ref</KEYWORD2>
+<KEYWORD2>hash-remove!</KEYWORD2>
+<KEYWORD2>hash-set!</KEYWORD2>
+<KEYWORD2>hash-table->alist</KEYWORD2>
+<KEYWORD2>hash-table-delete!</KEYWORD2>
+<KEYWORD2>hash-table-equivalence-function</KEYWORD2>
+<KEYWORD2>hash-table-exists?</KEYWORD2>
+<KEYWORD2>hash-table-fold</KEYWORD2>
+<KEYWORD2>hash-table-hash-function</KEYWORD2>
+<KEYWORD2>hash-table-keys</KEYWORD2>
+<KEYWORD2>hash-table-ref</KEYWORD2>
+<KEYWORD2>hash-table-ref/default</KEYWORD2>
+<KEYWORD2>hash-table-set!</KEYWORD2>
+<KEYWORD2>hash-table-size</KEYWORD2>
+<KEYWORD2>hash-table-update!</KEYWORD2>
+<KEYWORD2>hash-table-update!/default</KEYWORD2>
+<KEYWORD2>hash-table-values</KEYWORD2>
+<KEYWORD2>hash-table-walk</KEYWORD2>
+<KEYWORD2>hash-table?</KEYWORD2>
+<KEYWORD2>hashq</KEYWORD2>
+<KEYWORD2>hashq-create-handle!</KEYWORD2>
+<KEYWORD2>hashq-get-handle</KEYWORD2>
+<KEYWORD2>hashq-ref</KEYWORD2>
+<KEYWORD2>hashq-remove!</KEYWORD2>
+<KEYWORD2>hashq-set!</KEYWORD2>
+<KEYWORD2>hashv</KEYWORD2>
+<KEYWORD2>hashv-create-handle!</KEYWORD2>
+<KEYWORD2>hashv-get-handle</KEYWORD2>
+<KEYWORD2>hashv-ref</KEYWORD2>
+<KEYWORD2>hashv-remove!</KEYWORD2>
+<KEYWORD2>hashv-set!</KEYWORD2>
+<KEYWORD2>hashx-create-handle!</KEYWORD2>
+<KEYWORD2>hashx-get-handle</KEYWORD2>
+<KEYWORD2>hashx-ref</KEYWORD2>
+<KEYWORD2>hashx-remove!</KEYWORD2>
+<KEYWORD2>hashx-set!</KEYWORD2>
+<KEYWORD2>hook->list</KEYWORD2>
+<KEYWORD2>hook-empty?</KEYWORD2>
+<KEYWORD2>hook?</KEYWORD2>
+<KEYWORD2>hostent:addr-list</KEYWORD2>
+<KEYWORD2>hostent:addrtype</KEYWORD2>
+<KEYWORD2>hostent:aliases</KEYWORD2>
+<KEYWORD2>hostent:length</KEYWORD2>
+<KEYWORD2>hostent:name</KEYWORD2>
+<KEYWORD2>htonl</KEYWORD2>
+<KEYWORD2>htons</KEYWORD2>
+<KEYWORD2>if</KEYWORD2>
+<KEYWORD2>imag-part</KEYWORD2>
+<KEYWORD2>inet-aton</KEYWORD2>
+<KEYWORD2>inet-lnaof</KEYWORD2>
+<KEYWORD2>inet-makeaddr</KEYWORD2>
+<KEYWORD2>inet-netof</KEYWORD2>
+<KEYWORD2>inet-ntoa</KEYWORD2>
+<KEYWORD2>inet-ntop</KEYWORD2>
+<KEYWORD2>inet-pton</KEYWORD2>
+<KEYWORD2>inexact->exact</KEYWORD2>
+<KEYWORD2>inexact?</KEYWORD2>
+<KEYWORD2>inf</KEYWORD2>
+<KEYWORD2>inf?</KEYWORD2>
+<KEYWORD2>info args</KEYWORD2>
+<KEYWORD2>info frame</KEYWORD2>
+<KEYWORD2>input-port?</KEYWORD2>
+<KEYWORD2>install-trap</KEYWORD2>
+<KEYWORD2>integer->char</KEYWORD2>
+<KEYWORD2>integer->list</KEYWORD2>
+<KEYWORD2>integer-expt</KEYWORD2>
+<KEYWORD2>integer-length</KEYWORD2>
+<KEYWORD2>integer?</KEYWORD2>
+<KEYWORD2>interaction-environment</KEYWORD2>
+<KEYWORD2>iota</KEYWORD2>
+<KEYWORD2>isatty?</KEYWORD2>
+<KEYWORD2>join-thread</KEYWORD2>
+<KEYWORD2>julian-day->date</KEYWORD2>
+<KEYWORD2>julian-day->time-monotonic</KEYWORD2>
+<KEYWORD2>julian-day->time-tai</KEYWORD2>
+<KEYWORD2>julian-day->time-utc</KEYWORD2>
+<KEYWORD2>key</KEYWORD2>
+<KEYWORD2>keyword->string</KEYWORD2>
+<KEYWORD2>keyword->symbol</KEYWORD2>
+<KEYWORD2>keyword?</KEYWORD2>
+<KEYWORD2>keyword?</KEYWORD2>
+<KEYWORD2>kill</KEYWORD2>
+<KEYWORD2>lambda</KEYWORD2>
+<KEYWORD2>lambda*</KEYWORD2>
+<KEYWORD2>last</KEYWORD2>
+<KEYWORD2>last-pair</KEYWORD2>
+<KEYWORD2>last-stack-frame</KEYWORD2>
+<KEYWORD2>lazy-catch</KEYWORD2>
+<KEYWORD2>lchown</KEYWORD2>
+<KEYWORD2>lcm</KEYWORD2>
+<KEYWORD2>length</KEYWORD2>
+<KEYWORD2>length+</KEYWORD2>
+<KEYWORD2>let</KEYWORD2>
+<KEYWORD2>let*</KEYWORD2>
+<KEYWORD2>let*-values</KEYWORD2>
+<KEYWORD2>let-keywords</KEYWORD2>
+<KEYWORD2>let-keywords*</KEYWORD2>
+<KEYWORD2>let-optional</KEYWORD2>
+<KEYWORD2>let-optional*</KEYWORD2>
+<KEYWORD2>let-values</KEYWORD2>
+<KEYWORD2>letpar</KEYWORD2>
+<KEYWORD2>letrec</KEYWORD2>
+<KEYWORD2>link</KEYWORD2>
+<KEYWORD2>list</KEYWORD2>
+<KEYWORD2>list->array</KEYWORD2>
+<KEYWORD2>list->bitvector</KEYWORD2>
+<KEYWORD2>list->c32vector</KEYWORD2>
+<KEYWORD2>list->c64vector</KEYWORD2>
+<KEYWORD2>list->char-set</KEYWORD2>
+<KEYWORD2>list->char-set!</KEYWORD2>
+<KEYWORD2>list->f32vector</KEYWORD2>
+<KEYWORD2>list->f64vector</KEYWORD2>
+<KEYWORD2>list->integer</KEYWORD2>
+<KEYWORD2>list->s16vector</KEYWORD2>
+<KEYWORD2>list->s32vector</KEYWORD2>
+<KEYWORD2>list->s64vector</KEYWORD2>
+<KEYWORD2>list->s8vector</KEYWORD2>
+<KEYWORD2>list->stream</KEYWORD2>
+<KEYWORD2>list->string</KEYWORD2>
+<KEYWORD2>list->typed-array</KEYWORD2>
+<KEYWORD2>list->u16vector</KEYWORD2>
+<KEYWORD2>list->u32vector</KEYWORD2>
+<KEYWORD2>list->u64vector</KEYWORD2>
+<KEYWORD2>list->u8vector</KEYWORD2>
+<KEYWORD2>list->vector</KEYWORD2>
+<KEYWORD2>list->weak-vector</KEYWORD2>
+<KEYWORD2>list-cdr-ref</KEYWORD2>
+<KEYWORD2>list-cdr-set!</KEYWORD2>
+<KEYWORD2>list-copy</KEYWORD2>
+<KEYWORD2>list-copy</KEYWORD2>
+<KEYWORD2>list-head</KEYWORD2>
+<KEYWORD2>list-index</KEYWORD2>
+<KEYWORD2>list-matches</KEYWORD2>
+<KEYWORD2>list-ref</KEYWORD2>
+<KEYWORD2>list-set!</KEYWORD2>
+<KEYWORD2>list-tabulate</KEYWORD2>
+<KEYWORD2>list-tail</KEYWORD2>
+<KEYWORD2>list-traps</KEYWORD2>
+<KEYWORD2>list=</KEYWORD2>
+<KEYWORD2>list?</KEYWORD2>
+<KEYWORD2>listen</KEYWORD2>
+<KEYWORD2>load</KEYWORD2>
+<KEYWORD2>load-extension</KEYWORD2>
+<KEYWORD2>load-from-path</KEYWORD2>
+<KEYWORD2>local-eval</KEYWORD2>
+<KEYWORD2>localtime</KEYWORD2>
+<KEYWORD2>lock-mutex</KEYWORD2>
+<KEYWORD2>log</KEYWORD2>
+<KEYWORD2>log10</KEYWORD2>
+<KEYWORD2>log2-binary-factors</KEYWORD2>
+<KEYWORD2>logand</KEYWORD2>
+<KEYWORD2>logbit?</KEYWORD2>
+<KEYWORD2>logcount</KEYWORD2>
+<KEYWORD2>logior</KEYWORD2>
+<KEYWORD2>lognot</KEYWORD2>
+<KEYWORD2>logtest</KEYWORD2>
+<KEYWORD2>logxor</KEYWORD2>
+<KEYWORD2>lset-adjoin</KEYWORD2>
+<KEYWORD2>lset-diff+intersection</KEYWORD2>
+<KEYWORD2>lset-diff+intersection!</KEYWORD2>
+<KEYWORD2>lset-difference</KEYWORD2>
+<KEYWORD2>lset-difference!</KEYWORD2>
+<KEYWORD2>lset-intersection</KEYWORD2>
+<KEYWORD2>lset-intersection!</KEYWORD2>
+<KEYWORD2>lset-union</KEYWORD2>
+<KEYWORD2>lset-union!</KEYWORD2>
+<KEYWORD2>lset-xor</KEYWORD2>
+<KEYWORD2>lset-xor!</KEYWORD2>
+<KEYWORD2>lset<=</KEYWORD2>
+<KEYWORD2>lset=</KEYWORD2>
+<KEYWORD2>lstat</KEYWORD2>
+<KEYWORD2>macro-name</KEYWORD2>
+<KEYWORD2>macro-transformer</KEYWORD2>
+<KEYWORD2>macro-type</KEYWORD2>
+<KEYWORD2>macro?</KEYWORD2>
+<KEYWORD2>magnitude</KEYWORD2>
+<KEYWORD2>main_prog</KEYWORD2>
+<KEYWORD2>major-version</KEYWORD2>
+<KEYWORD2>make-arbiter</KEYWORD2>
+<KEYWORD2>make-array</KEYWORD2>
+<KEYWORD2>make-bitvector</KEYWORD2>
+<KEYWORD2>make-buffered-input-port</KEYWORD2>
+<KEYWORD2>make-c32vector</KEYWORD2>
+<KEYWORD2>make-c64vector</KEYWORD2>
+<KEYWORD2>make-class-object</KEYWORD2>
+<KEYWORD2>make-completion-function</KEYWORD2>
+<KEYWORD2>make-compound-condition</KEYWORD2>
+<KEYWORD2>make-condition</KEYWORD2>
+<KEYWORD2>make-condition-type</KEYWORD2>
+<KEYWORD2>make-condition-variable</KEYWORD2>
+<KEYWORD2>make-date</KEYWORD2>
+<KEYWORD2>make-doubly-weak-hash-table</KEYWORD2>
+<KEYWORD2>make-dynamic-state</KEYWORD2>
+<KEYWORD2>make-f32vector</KEYWORD2>
+<KEYWORD2>make-f64vector</KEYWORD2>
+<KEYWORD2>make-fluid</KEYWORD2>
+<KEYWORD2>make-guardian</KEYWORD2>
+<KEYWORD2>make-hash-table</KEYWORD2>
+<KEYWORD2>make-hash-table</KEYWORD2>
+<KEYWORD2>make-hook</KEYWORD2>
+<KEYWORD2>make-line-buffered-input-port</KEYWORD2>
+<KEYWORD2>make-list</KEYWORD2>
+<KEYWORD2>make-mutex</KEYWORD2>
+<KEYWORD2>make-object-property</KEYWORD2>
+<KEYWORD2>make-parameter</KEYWORD2>
+<KEYWORD2>make-polar</KEYWORD2>
+<KEYWORD2>make-procedure-with-setter</KEYWORD2>
+<KEYWORD2>make-q</KEYWORD2>
+<KEYWORD2>make-record-type</KEYWORD2>
+<KEYWORD2>make-rectangular</KEYWORD2>
+<KEYWORD2>make-recursive-mutex</KEYWORD2>
+<KEYWORD2>make-regexp</KEYWORD2>
+<KEYWORD2>make-s16vector</KEYWORD2>
+<KEYWORD2>make-s32vector</KEYWORD2>
+<KEYWORD2>make-s64vector</KEYWORD2>
+<KEYWORD2>make-s8vector</KEYWORD2>
+<KEYWORD2>make-shared-array</KEYWORD2>
+<KEYWORD2>make-socket-address</KEYWORD2>
+<KEYWORD2>make-soft-port</KEYWORD2>
+<KEYWORD2>make-stack</KEYWORD2>
+<KEYWORD2>make-stream</KEYWORD2>
+<KEYWORD2>make-string</KEYWORD2>
+<KEYWORD2>make-struct</KEYWORD2>
+<KEYWORD2>make-struct-layout</KEYWORD2>
+<KEYWORD2>make-subclass-object</KEYWORD2>
+<KEYWORD2>make-symbol</KEYWORD2>
+<KEYWORD2>make-thread</KEYWORD2>
+<KEYWORD2>make-time</KEYWORD2>
+<KEYWORD2>make-typed-array</KEYWORD2>
+<KEYWORD2>make-u16vector</KEYWORD2>
+<KEYWORD2>make-u32vector</KEYWORD2>
+<KEYWORD2>make-u64vector</KEYWORD2>
+<KEYWORD2>make-u8vector</KEYWORD2>
+<KEYWORD2>make-undefined-variable</KEYWORD2>
+<KEYWORD2>make-variable</KEYWORD2>
+<KEYWORD2>make-vector</KEYWORD2>
+<KEYWORD2>make-vtable</KEYWORD2>
+<KEYWORD2>make-vtable-vtable</KEYWORD2>
+<KEYWORD2>make-weak-key-hash-table</KEYWORD2>
+<KEYWORD2>make-weak-value-hash-table</KEYWORD2>
+<KEYWORD2>make-weak-vector</KEYWORD2>
+<KEYWORD2>malloc-stats</KEYWORD2>
+<KEYWORD2>map</KEYWORD2>
+<KEYWORD2>map</KEYWORD2>
+<KEYWORD2>map!</KEYWORD2>
+<KEYWORD2>map-in-order</KEYWORD2>
+<KEYWORD2>match:count</KEYWORD2>
+<KEYWORD2>match:end</KEYWORD2>
+<KEYWORD2>match:prefix</KEYWORD2>
+<KEYWORD2>match:start</KEYWORD2>
+<KEYWORD2>match:string</KEYWORD2>
+<KEYWORD2>match:substring</KEYWORD2>
+<KEYWORD2>match:suffix</KEYWORD2>
+<KEYWORD2>max</KEYWORD2>
+<KEYWORD2>member</KEYWORD2>
+<KEYWORD2>member</KEYWORD2>
+<KEYWORD2>memoized-environment</KEYWORD2>
+<KEYWORD2>memoized?</KEYWORD2>
+<KEYWORD2>memq</KEYWORD2>
+<KEYWORD2>memv</KEYWORD2>
+<KEYWORD2>merge</KEYWORD2>
+<KEYWORD2>merge!</KEYWORD2>
+<KEYWORD2>message-condition?</KEYWORD2>
+<KEYWORD2>micro-version</KEYWORD2>
+<KEYWORD2>min</KEYWORD2>
+<KEYWORD2>minor-version</KEYWORD2>
+<KEYWORD2>mkdir</KEYWORD2>
+<KEYWORD2>mknod</KEYWORD2>
+<KEYWORD2>mkstemp!</KEYWORD2>
+<KEYWORD2>mktime</KEYWORD2>
+<KEYWORD2>modified-julian-day->date</KEYWORD2>
+<KEYWORD2>modified-julian-day->time-monotonic</KEYWORD2>
+<KEYWORD2>modified-julian-day->time-tai</KEYWORD2>
+<KEYWORD2>modified-julian-day->time-utc</KEYWORD2>
+<KEYWORD2>module-use!</KEYWORD2>
+<KEYWORD2>modulo</KEYWORD2>
+<KEYWORD2>modulo-expt</KEYWORD2>
+<KEYWORD2>monitor</KEYWORD2>
+<KEYWORD2>move->fdes</KEYWORD2>
+<KEYWORD2>n-for-each-par-map</KEYWORD2>
+<KEYWORD2>n-par-for-each</KEYWORD2>
+<KEYWORD2>n-par-map</KEYWORD2>
+<KEYWORD2>nan</KEYWORD2>
+<KEYWORD2>nan?</KEYWORD2>
+<KEYWORD2>negative?</KEYWORD2>
+<KEYWORD2>netent:addrtype</KEYWORD2>
+<KEYWORD2>netent:aliases</KEYWORD2>
+<KEYWORD2>netent:name</KEYWORD2>
+<KEYWORD2>netent:net</KEYWORD2>
+<KEYWORD2>newline</KEYWORD2>
+<KEYWORD2>next</KEYWORD2>
+<KEYWORD2>nftw</KEYWORD2>
+<KEYWORD2>ngettext</KEYWORD2>
+<KEYWORD2>nice</KEYWORD2>
+<KEYWORD2>nil-car</KEYWORD2>
+<KEYWORD2>nil-cdr</KEYWORD2>
+<KEYWORD2>nil-cons</KEYWORD2>
+<KEYWORD2>nil-eq</KEYWORD2>
+<KEYWORD2>ninth</KEYWORD2>
+<KEYWORD2>not</KEYWORD2>
+<KEYWORD2>not-pair?</KEYWORD2>
+<KEYWORD2>ntohl</KEYWORD2>
+<KEYWORD2>ntohs</KEYWORD2>
+<KEYWORD2>null</KEYWORD2>
+<KEYWORD2>null-environment</KEYWORD2>
+<KEYWORD2>null-list?</KEYWORD2>
+<KEYWORD2>null?</KEYWORD2>
+<KEYWORD2>number->string</KEYWORD2>
+<KEYWORD2>number?</KEYWORD2>
+<KEYWORD2>numerator</KEYWORD2>
+<KEYWORD2>object->string</KEYWORD2>
+<KEYWORD2>object-properties</KEYWORD2>
+<KEYWORD2>object-property</KEYWORD2>
+<KEYWORD2>odd?</KEYWORD2>
+<KEYWORD2>open</KEYWORD2>
+<KEYWORD2>open-fdes</KEYWORD2>
+<KEYWORD2>open-file</KEYWORD2>
+<KEYWORD2>open-input-file</KEYWORD2>
+<KEYWORD2>open-input-output-pipe</KEYWORD2>
+<KEYWORD2>open-input-pipe</KEYWORD2>
+<KEYWORD2>open-input-string</KEYWORD2>
+<KEYWORD2>open-output-file</KEYWORD2>
+<KEYWORD2>open-output-pipe</KEYWORD2>
+<KEYWORD2>open-output-string</KEYWORD2>
+<KEYWORD2>open-pipe</KEYWORD2>
+<KEYWORD2>open-pipe*</KEYWORD2>
+<KEYWORD2>opendir</KEYWORD2>
+<KEYWORD2>operator?</KEYWORD2>
+<KEYWORD2>option</KEYWORD2>
+<KEYWORD2>option-names</KEYWORD2>
+<KEYWORD2>option-optional-arg?</KEYWORD2>
+<KEYWORD2>option-processor</KEYWORD2>
+<KEYWORD2>option-ref</KEYWORD2>
+<KEYWORD2>option-required-arg?</KEYWORD2>
+<KEYWORD2>or</KEYWORD2>
+<KEYWORD2>output-port?</KEYWORD2>
+<KEYWORD2>pair-fold</KEYWORD2>
+<KEYWORD2>pair-fold-right</KEYWORD2>
+<KEYWORD2>pair-for-each</KEYWORD2>
+<KEYWORD2>pair?</KEYWORD2>
+<KEYWORD2>par-for-each</KEYWORD2>
+<KEYWORD2>par-map</KEYWORD2>
+<KEYWORD2>parallel</KEYWORD2>
+<KEYWORD2>parameterize</KEYWORD2>
+<KEYWORD2>parse-path</KEYWORD2>
+<KEYWORD2>partition</KEYWORD2>
+<KEYWORD2>partition!</KEYWORD2>
+<KEYWORD2>passwd:dir</KEYWORD2>
+<KEYWORD2>passwd:gecos</KEYWORD2>
+<KEYWORD2>passwd:gid</KEYWORD2>
+<KEYWORD2>passwd:name</KEYWORD2>
+<KEYWORD2>passwd:passwd</KEYWORD2>
+<KEYWORD2>passwd:shell</KEYWORD2>
+<KEYWORD2>passwd:uid</KEYWORD2>
+<KEYWORD2>pause</KEYWORD2>
+<KEYWORD2>pclose</KEYWORD2>
+<KEYWORD2>peek-char</KEYWORD2>
+<KEYWORD2>pipe</KEYWORD2>
+<KEYWORD2>PKG_CHECK_MODULES</KEYWORD2>
+<KEYWORD2>popen</KEYWORD2>
+<KEYWORD2>port->fdes</KEYWORD2>
+<KEYWORD2>port->stream</KEYWORD2>
+<KEYWORD2>port-closed?</KEYWORD2>
+<KEYWORD2>port-column</KEYWORD2>
+<KEYWORD2>port-filename</KEYWORD2>
+<KEYWORD2>port-for-each</KEYWORD2>
+<KEYWORD2>port-line</KEYWORD2>
+<KEYWORD2>port-mode</KEYWORD2>
+<KEYWORD2>port-mode</KEYWORD2>
+<KEYWORD2>port-revealed</KEYWORD2>
+<KEYWORD2>port-with-print-state</KEYWORD2>
+<KEYWORD2>port?</KEYWORD2>
+<KEYWORD2>position</KEYWORD2>
+<KEYWORD2>positive?</KEYWORD2>
+<KEYWORD2>pretty-print</KEYWORD2>
+<KEYWORD2>primitive-_exit</KEYWORD2>
+<KEYWORD2>primitive-eval</KEYWORD2>
+<KEYWORD2>primitive-exit</KEYWORD2>
+<KEYWORD2>primitive-fork</KEYWORD2>
+<KEYWORD2>primitive-load</KEYWORD2>
+<KEYWORD2>primitive-load-path</KEYWORD2>
+<KEYWORD2>primitive-make-property</KEYWORD2>
+<KEYWORD2>primitive-move->fdes</KEYWORD2>
+<KEYWORD2>primitive-property-del!</KEYWORD2>
+<KEYWORD2>primitive-property-ref</KEYWORD2>
+<KEYWORD2>primitive-property-set!</KEYWORD2>
+<KEYWORD2>print-disable</KEYWORD2>
+<KEYWORD2>print-enable</KEYWORD2>
+<KEYWORD2>print-options</KEYWORD2>
+<KEYWORD2>print-options-interface</KEYWORD2>
+<KEYWORD2>print-options-interface</KEYWORD2>
+<KEYWORD2>print-set!</KEYWORD2>
+<KEYWORD2>procedure</KEYWORD2>
+<KEYWORD2>procedure->macro</KEYWORD2>
+<KEYWORD2>procedure->memoizing-macro</KEYWORD2>
+<KEYWORD2>procedure->syntax</KEYWORD2>
+<KEYWORD2>procedure-documentation</KEYWORD2>
+<KEYWORD2>procedure-environment</KEYWORD2>
+<KEYWORD2>procedure-name</KEYWORD2>
+<KEYWORD2>procedure-properties</KEYWORD2>
+<KEYWORD2>procedure-property</KEYWORD2>
+<KEYWORD2>procedure-source</KEYWORD2>
+<KEYWORD2>procedure-with-setter?</KEYWORD2>
+<KEYWORD2>procedure?</KEYWORD2>
+<KEYWORD2>program-arguments</KEYWORD2>
+<KEYWORD2>promise?</KEYWORD2>
+<KEYWORD2>proper-list?</KEYWORD2>
+<KEYWORD2>protoent:aliases</KEYWORD2>
+<KEYWORD2>protoent:name</KEYWORD2>
+<KEYWORD2>protoent:proto</KEYWORD2>
+<KEYWORD2>provide</KEYWORD2>
+<KEYWORD2>provided?</KEYWORD2>
+<KEYWORD2>PTR2SCM</KEYWORD2>
+<KEYWORD2>putenv</KEYWORD2>
+<KEYWORD2>pwd</KEYWORD2>
+<KEYWORD2>q-empty-check</KEYWORD2>
+<KEYWORD2>q-empty?</KEYWORD2>
+<KEYWORD2>q-front</KEYWORD2>
+<KEYWORD2>q-length</KEYWORD2>
+<KEYWORD2>q-pop!</KEYWORD2>
+<KEYWORD2>q-push!</KEYWORD2>
+<KEYWORD2>q-rear</KEYWORD2>
+<KEYWORD2>q-remove!</KEYWORD2>
+<KEYWORD2>q?</KEYWORD2>
+<KEYWORD2>quasiquote</KEYWORD2>
+<KEYWORD2>quit</KEYWORD2>
+<KEYWORD2>quote</KEYWORD2>
+<KEYWORD2>quotient</KEYWORD2>
+<KEYWORD2>raise</KEYWORD2>
+<KEYWORD2>random</KEYWORD2>
+<KEYWORD2>random:exp</KEYWORD2>
+<KEYWORD2>random:hollow-sphere!</KEYWORD2>
+<KEYWORD2>random:normal</KEYWORD2>
+<KEYWORD2>random:normal-vector!</KEYWORD2>
+<KEYWORD2>random:solid-sphere!</KEYWORD2>
+<KEYWORD2>random:uniform</KEYWORD2>
+<KEYWORD2>rational?</KEYWORD2>
+<KEYWORD2>rationalize</KEYWORD2>
+<KEYWORD2>re-export</KEYWORD2>
+<KEYWORD2>read</KEYWORD2>
+<KEYWORD2>read-char</KEYWORD2>
+<KEYWORD2>read-delimited</KEYWORD2>
+<KEYWORD2>read-delimited!</KEYWORD2>
+<KEYWORD2>read-disable</KEYWORD2>
+<KEYWORD2>read-disable</KEYWORD2>
+<KEYWORD2>read-enable</KEYWORD2>
+<KEYWORD2>read-enable</KEYWORD2>
+<KEYWORD2>read-hash-extend</KEYWORD2>
+<KEYWORD2>read-line</KEYWORD2>
+<KEYWORD2>read-line!</KEYWORD2>
+<KEYWORD2>read-options</KEYWORD2>
+<KEYWORD2>read-options</KEYWORD2>
+<KEYWORD2>read-options-interface</KEYWORD2>
+<KEYWORD2>read-options-interface</KEYWORD2>
+<KEYWORD2>read-set!</KEYWORD2>
+<KEYWORD2>read-set!</KEYWORD2>
+<KEYWORD2>read-string!/partial</KEYWORD2>
+<KEYWORD2>readdir</KEYWORD2>
+<KEYWORD2>readline</KEYWORD2>
+<KEYWORD2>readline-disable</KEYWORD2>
+<KEYWORD2>readline-enable</KEYWORD2>
+<KEYWORD2>readline-options</KEYWORD2>
+<KEYWORD2>readline-port</KEYWORD2>
+<KEYWORD2>readline-set!</KEYWORD2>
+<KEYWORD2>readlink</KEYWORD2>
+<KEYWORD2>real-part</KEYWORD2>
+<KEYWORD2>real?</KEYWORD2>
+<KEYWORD2>rec</KEYWORD2>
+<KEYWORD2>receive</KEYWORD2>
+<KEYWORD2>record-accessor</KEYWORD2>
+<KEYWORD2>record-constructor</KEYWORD2>
+<KEYWORD2>record-modifier</KEYWORD2>
+<KEYWORD2>record-predicate</KEYWORD2>
+<KEYWORD2>record-type-descriptor</KEYWORD2>
+<KEYWORD2>record-type-fields</KEYWORD2>
+<KEYWORD2>record-type-name</KEYWORD2>
+<KEYWORD2>record?</KEYWORD2>
+<KEYWORD2>recv!</KEYWORD2>
+<KEYWORD2>recvfrom!</KEYWORD2>
+<KEYWORD2>redirect-port</KEYWORD2>
+<KEYWORD2>reduce</KEYWORD2>
+<KEYWORD2>reduce-right</KEYWORD2>
+<KEYWORD2>regexp-exec</KEYWORD2>
+<KEYWORD2>regexp-match?</KEYWORD2>
+<KEYWORD2>regexp-quote</KEYWORD2>
+<KEYWORD2>regexp-substitute</KEYWORD2>
+<KEYWORD2>regexp-substitute/global</KEYWORD2>
+<KEYWORD2>regexp?</KEYWORD2>
+<KEYWORD2>release-arbiter</KEYWORD2>
+<KEYWORD2>release-port-handle</KEYWORD2>
+<KEYWORD2>remainder</KEYWORD2>
+<KEYWORD2>remove</KEYWORD2>
+<KEYWORD2>remove!</KEYWORD2>
+<KEYWORD2>remove-hook!</KEYWORD2>
+<KEYWORD2>rename</KEYWORD2>
+<KEYWORD2>rename-file</KEYWORD2>
+<KEYWORD2>require</KEYWORD2>
+<KEYWORD2>require-extension</KEYWORD2>
+<KEYWORD2>reset-hook!</KEYWORD2>
+<KEYWORD2>resolve-interface</KEYWORD2>
+<KEYWORD2>resolve-module</KEYWORD2>
+<KEYWORD2>restore-signals</KEYWORD2>
+<KEYWORD2>restricted-vector-sort!</KEYWORD2>
+<KEYWORD2>reverse</KEYWORD2>
+<KEYWORD2>reverse!</KEYWORD2>
+<KEYWORD2>reverse-bit-field</KEYWORD2>
+<KEYWORD2>reverse-list->string</KEYWORD2>
+<KEYWORD2>rewinddir</KEYWORD2>
+<KEYWORD2>rmdir</KEYWORD2>
+<KEYWORD2>rotate-bit-field</KEYWORD2>
+<KEYWORD2>round</KEYWORD2>
+<KEYWORD2>run-asyncs</KEYWORD2>
+<KEYWORD2>run-hook</KEYWORD2>
+<KEYWORD2>s16vector</KEYWORD2>
+<KEYWORD2>s16vector->list</KEYWORD2>
+<KEYWORD2>s16vector-length</KEYWORD2>
+<KEYWORD2>s16vector-ref</KEYWORD2>
+<KEYWORD2>s16vector-set!</KEYWORD2>
+<KEYWORD2>s16vector?</KEYWORD2>
+<KEYWORD2>s32vector</KEYWORD2>
+<KEYWORD2>s32vector->list</KEYWORD2>
+<KEYWORD2>s32vector-length</KEYWORD2>
+<KEYWORD2>s32vector-ref</KEYWORD2>
+<KEYWORD2>s32vector-set!</KEYWORD2>
+<KEYWORD2>s32vector?</KEYWORD2>
+<KEYWORD2>s64vector</KEYWORD2>
+<KEYWORD2>s64vector->list</KEYWORD2>
+<KEYWORD2>s64vector-length</KEYWORD2>
+<KEYWORD2>s64vector-ref</KEYWORD2>
+<KEYWORD2>s64vector-set!</KEYWORD2>
+<KEYWORD2>s64vector?</KEYWORD2>
+<KEYWORD2>s8vector</KEYWORD2>
+<KEYWORD2>s8vector->list</KEYWORD2>
+<KEYWORD2>s8vector-length</KEYWORD2>
+<KEYWORD2>s8vector-ref</KEYWORD2>
+<KEYWORD2>s8vector-set!</KEYWORD2>
+<KEYWORD2>s8vector?</KEYWORD2>
+<KEYWORD2>save-module-excursion</KEYWORD2>
+<KEYWORD2>scheme-report-environment</KEYWORD2>
+<KEYWORD2>search-path</KEYWORD2>
+<KEYWORD2>second</KEYWORD2>
+<KEYWORD2>seed->random-state</KEYWORD2>
+<KEYWORD2>seek</KEYWORD2>
+<KEYWORD2>select</KEYWORD2>
+<KEYWORD2>send</KEYWORD2>
+<KEYWORD2>sendto</KEYWORD2>
+<KEYWORD2>serious-condition?</KEYWORD2>
+<KEYWORD2>servent:aliases</KEYWORD2>
+<KEYWORD2>servent:name</KEYWORD2>
+<KEYWORD2>servent:port</KEYWORD2>
+<KEYWORD2>servent:proto</KEYWORD2>
+<KEYWORD2>set-buffered-input-continuation?!</KEYWORD2>
+<KEYWORD2>set-car!</KEYWORD2>
+<KEYWORD2>set-cdr!</KEYWORD2>
+<KEYWORD2>set-current-dynamic-state</KEYWORD2>
+<KEYWORD2>set-current-error-port</KEYWORD2>
+<KEYWORD2>set-current-input-port</KEYWORD2>
+<KEYWORD2>set-current-module</KEYWORD2>
+<KEYWORD2>set-current-output-port</KEYWORD2>
+<KEYWORD2>set-object-procedure!</KEYWORD2>
+<KEYWORD2>set-object-properties!</KEYWORD2>
+<KEYWORD2>set-object-property!</KEYWORD2>
+<KEYWORD2>set-port-column!</KEYWORD2>
+<KEYWORD2>set-port-filename!</KEYWORD2>
+<KEYWORD2>set-port-line!</KEYWORD2>
+<KEYWORD2>set-port-revealed!</KEYWORD2>
+<KEYWORD2>set-procedure-properties!</KEYWORD2>
+<KEYWORD2>set-procedure-property!</KEYWORD2>
+<KEYWORD2>set-program-arguments</KEYWORD2>
+<KEYWORD2>set-readline-input-port!</KEYWORD2>
+<KEYWORD2>set-readline-output-port!</KEYWORD2>
+<KEYWORD2>set-readline-prompt!</KEYWORD2>
+<KEYWORD2>set-source-properties!</KEYWORD2>
+<KEYWORD2>set-source-property!</KEYWORD2>
+<KEYWORD2>set-struct-vtable-name!</KEYWORD2>
+<KEYWORD2>set-symbol-property!</KEYWORD2>
+<KEYWORD2>set-time-nanosecond!</KEYWORD2>
+<KEYWORD2>set-time-second!</KEYWORD2>
+<KEYWORD2>set-time-type!</KEYWORD2>
+<KEYWORD2>set-tm:gmtoff</KEYWORD2>
+<KEYWORD2>set-tm:hour</KEYWORD2>
+<KEYWORD2>set-tm:isdst</KEYWORD2>
+<KEYWORD2>set-tm:mday</KEYWORD2>
+<KEYWORD2>set-tm:min</KEYWORD2>
+<KEYWORD2>set-tm:mon</KEYWORD2>
+<KEYWORD2>set-tm:sec</KEYWORD2>
+<KEYWORD2>set-tm:wday</KEYWORD2>
+<KEYWORD2>set-tm:yday</KEYWORD2>
+<KEYWORD2>set-tm:year</KEYWORD2>
+<KEYWORD2>set-tm:zone</KEYWORD2>
+<KEYWORD2>set-trace-layout</KEYWORD2>
+<KEYWORD2>set!</KEYWORD2>
+<KEYWORD2>setegid</KEYWORD2>
+<KEYWORD2>setenv</KEYWORD2>
+<KEYWORD2>seteuid</KEYWORD2>
+<KEYWORD2>setgid</KEYWORD2>
+<KEYWORD2>setgr</KEYWORD2>
+<KEYWORD2>setgrent</KEYWORD2>
+<KEYWORD2>setgroups</KEYWORD2>
+<KEYWORD2>sethost</KEYWORD2>
+<KEYWORD2>sethostent</KEYWORD2>
+<KEYWORD2>sethostname</KEYWORD2>
+<KEYWORD2>setitimer</KEYWORD2>
+<KEYWORD2>setlocale</KEYWORD2>
+<KEYWORD2>setnet</KEYWORD2>
+<KEYWORD2>setnetent</KEYWORD2>
+<KEYWORD2>setpgid</KEYWORD2>
+<KEYWORD2>setpriority</KEYWORD2>
+<KEYWORD2>setproto</KEYWORD2>
+<KEYWORD2>setprotoent</KEYWORD2>
+<KEYWORD2>setpw</KEYWORD2>
+<KEYWORD2>setpwent</KEYWORD2>
+<KEYWORD2>setserv</KEYWORD2>
+<KEYWORD2>setservent</KEYWORD2>
+<KEYWORD2>setsid</KEYWORD2>
+<KEYWORD2>setsockopt</KEYWORD2>
+<KEYWORD2>setter</KEYWORD2>
+<KEYWORD2>setuid</KEYWORD2>
+<KEYWORD2>setvbuf</KEYWORD2>
+<KEYWORD2>seventh</KEYWORD2>
+<KEYWORD2>shared-array-increments</KEYWORD2>
+<KEYWORD2>shared-array-offset</KEYWORD2>
+<KEYWORD2>shared-array-root</KEYWORD2>
+<KEYWORD2>shutdown</KEYWORD2>
+<KEYWORD2>sigaction</KEYWORD2>
+<KEYWORD2>signal-condition-variable</KEYWORD2>
+<KEYWORD2>simple-format</KEYWORD2>
+<KEYWORD2>sin</KEYWORD2>
+<KEYWORD2>sinh</KEYWORD2>
+<KEYWORD2>sixth</KEYWORD2>
+<KEYWORD2>sleep</KEYWORD2>
+<KEYWORD2>sloppy-assoc</KEYWORD2>
+<KEYWORD2>sloppy-assq</KEYWORD2>
+<KEYWORD2>sloppy-assv</KEYWORD2>
+<KEYWORD2>sockaddr:addr</KEYWORD2>
+<KEYWORD2>sockaddr:fam</KEYWORD2>
+<KEYWORD2>sockaddr:flowinfo</KEYWORD2>
+<KEYWORD2>sockaddr:path</KEYWORD2>
+<KEYWORD2>sockaddr:port</KEYWORD2>
+<KEYWORD2>sockaddr:scopeid</KEYWORD2>
+<KEYWORD2>socket</KEYWORD2>
+<KEYWORD2>socketpair</KEYWORD2>
+<KEYWORD2>sort</KEYWORD2>
+<KEYWORD2>sort!</KEYWORD2>
+<KEYWORD2>sort-list</KEYWORD2>
+<KEYWORD2>sort-list!</KEYWORD2>
+<KEYWORD2>sorted?</KEYWORD2>
+<KEYWORD2>source-properties</KEYWORD2>
+<KEYWORD2>source-property</KEYWORD2>
+<KEYWORD2>span</KEYWORD2>
+<KEYWORD2>span!</KEYWORD2>
+<KEYWORD2>split-at</KEYWORD2>
+<KEYWORD2>split-at!</KEYWORD2>
+<KEYWORD2>sqrt</KEYWORD2>
+<KEYWORD2>stable-sort</KEYWORD2>
+<KEYWORD2>stable-sort!</KEYWORD2>
+<KEYWORD2>stack-id</KEYWORD2>
+<KEYWORD2>stack-length</KEYWORD2>
+<KEYWORD2>stack-ref</KEYWORD2>
+<KEYWORD2>stack?</KEYWORD2>
+<KEYWORD2>start-stack</KEYWORD2>
+<KEYWORD2>stat</KEYWORD2>
+<KEYWORD2>stat:atime</KEYWORD2>
+<KEYWORD2>stat:blksize</KEYWORD2>
+<KEYWORD2>stat:blocks</KEYWORD2>
+<KEYWORD2>stat:ctime</KEYWORD2>
+<KEYWORD2>stat:dev</KEYWORD2>
+<KEYWORD2>stat:gid</KEYWORD2>
+<KEYWORD2>stat:ino</KEYWORD2>
+<KEYWORD2>stat:mode</KEYWORD2>
+<KEYWORD2>stat:mtime</KEYWORD2>
+<KEYWORD2>stat:nlink</KEYWORD2>
+<KEYWORD2>stat:perms</KEYWORD2>
+<KEYWORD2>stat:rdev</KEYWORD2>
+<KEYWORD2>stat:size</KEYWORD2>
+<KEYWORD2>stat:type</KEYWORD2>
+<KEYWORD2>stat:uid</KEYWORD2>
+<KEYWORD2>status:exit-val</KEYWORD2>
+<KEYWORD2>status:stop-sig</KEYWORD2>
+<KEYWORD2>status:term-sig</KEYWORD2>
+<KEYWORD2>step</KEYWORD2>
+<KEYWORD2>stream->list</KEYWORD2>
+<KEYWORD2>stream->list&length</KEYWORD2>
+<KEYWORD2>stream->reversed-list</KEYWORD2>
+<KEYWORD2>stream->reversed-list&length</KEYWORD2>
+<KEYWORD2>stream->vector</KEYWORD2>
+<KEYWORD2>stream-car</KEYWORD2>
+<KEYWORD2>stream-cdr</KEYWORD2>
+<KEYWORD2>stream-fold</KEYWORD2>
+<KEYWORD2>stream-for-each</KEYWORD2>
+<KEYWORD2>stream-map</KEYWORD2>
+<KEYWORD2>stream-null?</KEYWORD2>
+<KEYWORD2>strerror</KEYWORD2>
+<KEYWORD2>strftime</KEYWORD2>
+<KEYWORD2>string</KEYWORD2>
+<KEYWORD2>string->char-set</KEYWORD2>
+<KEYWORD2>string->char-set!</KEYWORD2>
+<KEYWORD2>string->date</KEYWORD2>
+<KEYWORD2>string->keyword</KEYWORD2>
+<KEYWORD2>string->list</KEYWORD2>
+<KEYWORD2>string->number</KEYWORD2>
+<KEYWORD2>string->symbol</KEYWORD2>
+<KEYWORD2>string-any</KEYWORD2>
+<KEYWORD2>string-append</KEYWORD2>
+<KEYWORD2>string-append/shared</KEYWORD2>
+<KEYWORD2>string-capitalize</KEYWORD2>
+<KEYWORD2>string-capitalize!</KEYWORD2>
+<KEYWORD2>string-ci->symbol</KEYWORD2>
+<KEYWORD2>string-ci-hash</KEYWORD2>
+<KEYWORD2>string-ci<</KEYWORD2>
+<KEYWORD2>string-ci<=</KEYWORD2>
+<KEYWORD2>string-ci<=?</KEYWORD2>
+<KEYWORD2>string-ci<></KEYWORD2>
+<KEYWORD2>string-ci<?</KEYWORD2>
+<KEYWORD2>string-ci=</KEYWORD2>
+<KEYWORD2>string-ci=?</KEYWORD2>
+<KEYWORD2>string-ci></KEYWORD2>
+<KEYWORD2>string-ci>=</KEYWORD2>
+<KEYWORD2>string-ci>=?</KEYWORD2>
+<KEYWORD2>string-ci>?</KEYWORD2>
+<KEYWORD2>string-compare</KEYWORD2>
+<KEYWORD2>string-compare-ci</KEYWORD2>
+<KEYWORD2>string-concatenate</KEYWORD2>
+<KEYWORD2>string-concatenate-reverse</KEYWORD2>
+<KEYWORD2>string-concatenate-reverse/shared</KEYWORD2>
+<KEYWORD2>string-concatenate/shared</KEYWORD2>
+<KEYWORD2>string-contains</KEYWORD2>
+<KEYWORD2>string-contains-ci</KEYWORD2>
+<KEYWORD2>string-copy</KEYWORD2>
+<KEYWORD2>string-copy!</KEYWORD2>
+<KEYWORD2>string-count</KEYWORD2>
+<KEYWORD2>string-delete</KEYWORD2>
+<KEYWORD2>string-downcase</KEYWORD2>
+<KEYWORD2>string-downcase!</KEYWORD2>
+<KEYWORD2>string-drop</KEYWORD2>
+<KEYWORD2>string-drop-right</KEYWORD2>
+<KEYWORD2>string-every</KEYWORD2>
+<KEYWORD2>string-fill!</KEYWORD2>
+<KEYWORD2>string-filter</KEYWORD2>
+<KEYWORD2>string-fold</KEYWORD2>
+<KEYWORD2>string-fold-right</KEYWORD2>
+<KEYWORD2>string-for-each</KEYWORD2>
+<KEYWORD2>string-for-each-index</KEYWORD2>
+<KEYWORD2>string-hash</KEYWORD2>
+<KEYWORD2>string-hash</KEYWORD2>
+<KEYWORD2>string-hash-ci</KEYWORD2>
+<KEYWORD2>string-index</KEYWORD2>
+<KEYWORD2>string-index-right</KEYWORD2>
+<KEYWORD2>string-join</KEYWORD2>
+<KEYWORD2>string-length</KEYWORD2>
+<KEYWORD2>string-map</KEYWORD2>
+<KEYWORD2>string-map!</KEYWORD2>
+<KEYWORD2>string-match</KEYWORD2>
+<KEYWORD2>string-null?</KEYWORD2>
+<KEYWORD2>string-pad</KEYWORD2>
+<KEYWORD2>string-pad-right</KEYWORD2>
+<KEYWORD2>string-prefix-ci?</KEYWORD2>
+<KEYWORD2>string-prefix-length</KEYWORD2>
+<KEYWORD2>string-prefix-length-ci</KEYWORD2>
+<KEYWORD2>string-prefix?</KEYWORD2>
+<KEYWORD2>string-ref</KEYWORD2>
+<KEYWORD2>string-replace</KEYWORD2>
+<KEYWORD2>string-reverse</KEYWORD2>
+<KEYWORD2>string-reverse!</KEYWORD2>
+<KEYWORD2>string-rindex</KEYWORD2>
+<KEYWORD2>string-set!</KEYWORD2>
+<KEYWORD2>string-skip</KEYWORD2>
+<KEYWORD2>string-skip-right</KEYWORD2>
+<KEYWORD2>string-split</KEYWORD2>
+<KEYWORD2>string-suffix-ci?</KEYWORD2>
+<KEYWORD2>string-suffix-length</KEYWORD2>
+<KEYWORD2>string-suffix-length-ci</KEYWORD2>
+<KEYWORD2>string-suffix?</KEYWORD2>
+<KEYWORD2>string-tabulate</KEYWORD2>
+<KEYWORD2>string-take</KEYWORD2>
+<KEYWORD2>string-take-right</KEYWORD2>
+<KEYWORD2>string-titlecase</KEYWORD2>
+<KEYWORD2>string-titlecase!</KEYWORD2>
+<KEYWORD2>string-tokenize</KEYWORD2>
+<KEYWORD2>string-trim</KEYWORD2>
+<KEYWORD2>string-trim-both</KEYWORD2>
+<KEYWORD2>string-trim-right</KEYWORD2>
+<KEYWORD2>string-unfold</KEYWORD2>
+<KEYWORD2>string-unfold-right</KEYWORD2>
+<KEYWORD2>string-upcase</KEYWORD2>
+<KEYWORD2>string-upcase!</KEYWORD2>
+<KEYWORD2>string-xcopy!</KEYWORD2>
+<KEYWORD2>string<</KEYWORD2>
+<KEYWORD2>string<=</KEYWORD2>
+<KEYWORD2>string<=?</KEYWORD2>
+<KEYWORD2>string<>></KEYWORD2>
+<KEYWORD2>string<?</KEYWORD2>
+<KEYWORD2>string=</KEYWORD2>
+<KEYWORD2>string=?</KEYWORD2>
+<KEYWORD2>string></KEYWORD2>
+<KEYWORD2>string>=</KEYWORD2>
+<KEYWORD2>string>=?</KEYWORD2>
+<KEYWORD2>string>?</KEYWORD2>
+<KEYWORD2>string?</KEYWORD2>
+<KEYWORD2>strptime</KEYWORD2>
+<KEYWORD2>struct-ref</KEYWORD2>
+<KEYWORD2>struct-set!</KEYWORD2>
+<KEYWORD2>struct-vtable</KEYWORD2>
+<KEYWORD2>struct-vtable-name</KEYWORD2>
+<KEYWORD2>struct-vtable-tag</KEYWORD2>
+<KEYWORD2>struct-vtable?</KEYWORD2>
+<KEYWORD2>struct?</KEYWORD2>
+<KEYWORD2>substring</KEYWORD2>
+<KEYWORD2>substring-fill!</KEYWORD2>
+<KEYWORD2>substring-move!</KEYWORD2>
+<KEYWORD2>substring/copy</KEYWORD2>
+<KEYWORD2>substring/read-only</KEYWORD2>
+<KEYWORD2>substring/shared</KEYWORD2>
+<KEYWORD2>subtract-duration</KEYWORD2>
+<KEYWORD2>subtract-duration!</KEYWORD2>
+<KEYWORD2>symbol->keyword</KEYWORD2>
+<KEYWORD2>symbol->string</KEYWORD2>
+<KEYWORD2>symbol-fref</KEYWORD2>
+<KEYWORD2>symbol-fset!</KEYWORD2>
+<KEYWORD2>symbol-hash</KEYWORD2>
+<KEYWORD2>symbol-interned?</KEYWORD2>
+<KEYWORD2>symbol-pref</KEYWORD2>
+<KEYWORD2>symbol-prefix-proc</KEYWORD2>
+<KEYWORD2>symbol-property</KEYWORD2>
+<KEYWORD2>symbol-property-remove!</KEYWORD2>
+<KEYWORD2>symbol-pset!</KEYWORD2>
+<KEYWORD2>symbol?</KEYWORD2>
+<KEYWORD2>symlink</KEYWORD2>
+<KEYWORD2>sync</KEYWORD2>
+<KEYWORD2>sync-q!</KEYWORD2>
+<KEYWORD2>system</KEYWORD2>
+<KEYWORD2>system*</KEYWORD2>
+<KEYWORD2>system-async-mark</KEYWORD2>
+<KEYWORD2>system-error-errno</KEYWORD2>
+<KEYWORD2>take</KEYWORD2>
+<KEYWORD2>take!</KEYWORD2>
+<KEYWORD2>take-right</KEYWORD2>
+<KEYWORD2>take-while</KEYWORD2>
+<KEYWORD2>take-while!</KEYWORD2>
+<KEYWORD2>tan</KEYWORD2>
+<KEYWORD2>tanh</KEYWORD2>
+<KEYWORD2>tc:depth</KEYWORD2>
+<KEYWORD2>tc:frame</KEYWORD2>
+<KEYWORD2>tc:real-depth</KEYWORD2>
+<KEYWORD2>tc:return-value</KEYWORD2>
+<KEYWORD2>tc:stack</KEYWORD2>
+<KEYWORD2>tc:type</KEYWORD2>
+<KEYWORD2>tcgetpgrp</KEYWORD2>
+<KEYWORD2>tcsetpgrp</KEYWORD2>
+<KEYWORD2>tenth</KEYWORD2>
+<KEYWORD2>textdomain</KEYWORD2>
+<KEYWORD2>third</KEYWORD2>
+<KEYWORD2>thread-exited?</KEYWORD2>
+<KEYWORD2>throw</KEYWORD2>
+<KEYWORD2>thunk?</KEYWORD2>
+<KEYWORD2>time-difference</KEYWORD2>
+<KEYWORD2>time-difference!</KEYWORD2>
+<KEYWORD2>time-monotonic->date</KEYWORD2>
+<KEYWORD2>time-monotonic->time-tai</KEYWORD2>
+<KEYWORD2>time-monotonic->time-tai!</KEYWORD2>
+<KEYWORD2>time-monotonic->time-utc</KEYWORD2>
+<KEYWORD2>time-monotonic->time-utc!</KEYWORD2>
+<KEYWORD2>time-nanosecond</KEYWORD2>
+<KEYWORD2>time-resolution</KEYWORD2>
+<KEYWORD2>time-second</KEYWORD2>
+<KEYWORD2>time-tai->date</KEYWORD2>
+<KEYWORD2>time-tai->julian-day</KEYWORD2>
+<KEYWORD2>time-tai->modified-julian-day</KEYWORD2>
+<KEYWORD2>time-tai->time-monotonic</KEYWORD2>
+<KEYWORD2>time-tai->time-monotonic!</KEYWORD2>
+<KEYWORD2>time-tai->time-utc</KEYWORD2>
+<KEYWORD2>time-tai->time-utc!</KEYWORD2>
+<KEYWORD2>time-type</KEYWORD2>
+<KEYWORD2>time-utc->date</KEYWORD2>
+<KEYWORD2>time-utc->julian-day</KEYWORD2>
+<KEYWORD2>time-utc->modified-julian-day</KEYWORD2>
+<KEYWORD2>time-utc->time-monotonic</KEYWORD2>
+<KEYWORD2>time-utc->time-monotonic!</KEYWORD2>
+<KEYWORD2>time-utc->time-tai</KEYWORD2>
+<KEYWORD2>time-utc->time-tai!</KEYWORD2>
+<KEYWORD2>time<=?</KEYWORD2>
+<KEYWORD2>time<?</KEYWORD2>
+<KEYWORD2>time=?</KEYWORD2>
+<KEYWORD2>time>=?</KEYWORD2>
+<KEYWORD2>time>?</KEYWORD2>
+<KEYWORD2>time?</KEYWORD2>
+<KEYWORD2>times</KEYWORD2>
+<KEYWORD2>tm:gmtoff</KEYWORD2>
+<KEYWORD2>tm:hour</KEYWORD2>
+<KEYWORD2>tm:isdst</KEYWORD2>
+<KEYWORD2>tm:mday</KEYWORD2>
+<KEYWORD2>tm:min</KEYWORD2>
+<KEYWORD2>tm:mon</KEYWORD2>
+<KEYWORD2>tm:sec</KEYWORD2>
+<KEYWORD2>tm:wday</KEYWORD2>
+<KEYWORD2>tm:yday</KEYWORD2>
+<KEYWORD2>tm:year</KEYWORD2>
+<KEYWORD2>tm:zone</KEYWORD2>
+<KEYWORD2>tmpnam</KEYWORD2>
+<KEYWORD2>tms:clock</KEYWORD2>
+<KEYWORD2>tms:cstime</KEYWORD2>
+<KEYWORD2>tms:cutime</KEYWORD2>
+<KEYWORD2>tms:stime</KEYWORD2>
+<KEYWORD2>tms:utime</KEYWORD2>
+<KEYWORD2>trace</KEYWORD2>
+<KEYWORD2>trace-at-exit</KEYWORD2>
+<KEYWORD2>trace-port</KEYWORD2>
+<KEYWORD2>trace-trap</KEYWORD2>
+<KEYWORD2>trace-until-exit</KEYWORD2>
+<KEYWORD2>trace/info</KEYWORD2>
+<KEYWORD2>trace/pid</KEYWORD2>
+<KEYWORD2>trace/real?</KEYWORD2>
+<KEYWORD2>trace/source</KEYWORD2>
+<KEYWORD2>trace/source-column</KEYWORD2>
+<KEYWORD2>trace/source-file-name</KEYWORD2>
+<KEYWORD2>trace/source-line</KEYWORD2>
+<KEYWORD2>trace/stack</KEYWORD2>
+<KEYWORD2>trace/stack-depth</KEYWORD2>
+<KEYWORD2>trace/stack-id</KEYWORD2>
+<KEYWORD2>trace/stack-real-depth</KEYWORD2>
+<KEYWORD2>trace/type</KEYWORD2>
+<KEYWORD2>transpose-array</KEYWORD2>
+<KEYWORD2>trap-disable</KEYWORD2>
+<KEYWORD2>trap-disable</KEYWORD2>
+<KEYWORD2>trap-enable</KEYWORD2>
+<KEYWORD2>trap-enable</KEYWORD2>
+<KEYWORD2>trap-here</KEYWORD2>
+<KEYWORD2>trap-set!</KEYWORD2>
+<KEYWORD2>trap-set!</KEYWORD2>
+<KEYWORD2>traps</KEYWORD2>
+<KEYWORD2>traps</KEYWORD2>
+<KEYWORD2>truncate</KEYWORD2>
+<KEYWORD2>truncate</KEYWORD2>
+<KEYWORD2>truncate-file</KEYWORD2>
+<KEYWORD2>try-arbiter</KEYWORD2>
+<KEYWORD2>try-mutex</KEYWORD2>
+<KEYWORD2>ttyname</KEYWORD2>
+<KEYWORD2>typed-array?</KEYWORD2>
+<KEYWORD2>tzset</KEYWORD2>
+<KEYWORD2>u16vector</KEYWORD2>
+<KEYWORD2>u16vector->list</KEYWORD2>
+<KEYWORD2>u16vector-length</KEYWORD2>
+<KEYWORD2>u16vector-ref</KEYWORD2>
+<KEYWORD2>u16vector-set!</KEYWORD2>
+<KEYWORD2>u16vector?</KEYWORD2>
+<KEYWORD2>u32vector</KEYWORD2>
+<KEYWORD2>u32vector->list</KEYWORD2>
+<KEYWORD2>u32vector-length</KEYWORD2>
+<KEYWORD2>u32vector-ref</KEYWORD2>
+<KEYWORD2>u32vector-set!</KEYWORD2>
+<KEYWORD2>u32vector?</KEYWORD2>
+<KEYWORD2>u64vector</KEYWORD2>
+<KEYWORD2>u64vector->list</KEYWORD2>
+<KEYWORD2>u64vector-length</KEYWORD2>
+<KEYWORD2>u64vector-ref</KEYWORD2>
+<KEYWORD2>u64vector-set!</KEYWORD2>
+<KEYWORD2>u64vector?</KEYWORD2>
+<KEYWORD2>u8vector</KEYWORD2>
+<KEYWORD2>u8vector->list</KEYWORD2>
+<KEYWORD2>u8vector-length</KEYWORD2>
+<KEYWORD2>u8vector-ref</KEYWORD2>
+<KEYWORD2>u8vector-set!</KEYWORD2>
+<KEYWORD2>u8vector?</KEYWORD2>
+<KEYWORD2>ucs-range->char-set</KEYWORD2>
+<KEYWORD2>ucs-range->char-set!</KEYWORD2>
+<KEYWORD2>umask</KEYWORD2>
+<KEYWORD2>uname</KEYWORD2>
+<KEYWORD2>unfold</KEYWORD2>
+<KEYWORD2>unfold-right</KEYWORD2>
+<KEYWORD2>uniform-array-read!</KEYWORD2>
+<KEYWORD2>uniform-array-write</KEYWORD2>
+<KEYWORD2>uniform-vector->list</KEYWORD2>
+<KEYWORD2>uniform-vector-length</KEYWORD2>
+<KEYWORD2>uniform-vector-read!</KEYWORD2>
+<KEYWORD2>uniform-vector-ref</KEYWORD2>
+<KEYWORD2>uniform-vector-set!</KEYWORD2>
+<KEYWORD2>uniform-vector-write</KEYWORD2>
+<KEYWORD2>uniform-vector?</KEYWORD2>
+<KEYWORD2>uninstall-trap</KEYWORD2>
+<KEYWORD2>unlink</KEYWORD2>
+<KEYWORD2>unlock-mutex</KEYWORD2>
+<KEYWORD2>unmemoize</KEYWORD2>
+<KEYWORD2>unquote</KEYWORD2>
+<KEYWORD2>unquote-splicing</KEYWORD2>
+<KEYWORD2>unread-char</KEYWORD2>
+<KEYWORD2>unread-char</KEYWORD2>
+<KEYWORD2>unread-string</KEYWORD2>
+<KEYWORD2>unread-string</KEYWORD2>
+<KEYWORD2>unsetenv</KEYWORD2>
+<KEYWORD2>untrace</KEYWORD2>
+<KEYWORD2>unzip1</KEYWORD2>
+<KEYWORD2>unzip2</KEYWORD2>
+<KEYWORD2>unzip3</KEYWORD2>
+<KEYWORD2>unzip4</KEYWORD2>
+<KEYWORD2>unzip5</KEYWORD2>
+<KEYWORD2>up</KEYWORD2>
+<KEYWORD2>use-modules</KEYWORD2>
+<KEYWORD2>use-syntax</KEYWORD2>
+<KEYWORD2>usleep</KEYWORD2>
+<KEYWORD2>utime</KEYWORD2>
+<KEYWORD2>utsname:machine</KEYWORD2>
+<KEYWORD2>utsname:nodename</KEYWORD2>
+<KEYWORD2>utsname:release</KEYWORD2>
+<KEYWORD2>utsname:sysname</KEYWORD2>
+<KEYWORD2>utsname:version</KEYWORD2>
+<KEYWORD2>values</KEYWORD2>
+<KEYWORD2>variable-bound?</KEYWORD2>
+<KEYWORD2>variable-ref</KEYWORD2>
+<KEYWORD2>variable-set!</KEYWORD2>
+<KEYWORD2>variable?</KEYWORD2>
+<KEYWORD2>vector</KEYWORD2>
+<KEYWORD2>vector->list</KEYWORD2>
+<KEYWORD2>vector->stream</KEYWORD2>
+<KEYWORD2>vector-copy</KEYWORD2>
+<KEYWORD2>vector-fill!</KEYWORD2>
+<KEYWORD2>vector-length</KEYWORD2>
+<KEYWORD2>vector-move-left!</KEYWORD2>
+<KEYWORD2>vector-move-right!</KEYWORD2>
+<KEYWORD2>vector-ref</KEYWORD2>
+<KEYWORD2>vector-set!</KEYWORD2>
+<KEYWORD2>vector?</KEYWORD2>
+<KEYWORD2>version</KEYWORD2>
+<!-- <KEYWORD2>void *</KEYWORD2> -->
+<KEYWORD2>wait-condition-variable</KEYWORD2>
+<KEYWORD2>waitpid</KEYWORD2>
+<KEYWORD2>weak-key-hash-table?</KEYWORD2>
+<KEYWORD2>weak-value-hash-table?</KEYWORD2>
+<KEYWORD2>weak-vector</KEYWORD2>
+<KEYWORD2>weak-vector?</KEYWORD2>
+<KEYWORD2>where</KEYWORD2>
+<KEYWORD2>while</KEYWORD2>
+<KEYWORD2>with-continuation-barrier</KEYWORD2>
+<KEYWORD2>with-dynamic-state</KEYWORD2>
+<KEYWORD2>with-error-to-file</KEYWORD2>
+<KEYWORD2>with-fluid*</KEYWORD2>
+<KEYWORD2>with-fluids</KEYWORD2>
+<KEYWORD2>with-fluids*</KEYWORD2>
+<KEYWORD2>with-input-from-file</KEYWORD2>
+<KEYWORD2>with-input-from-string</KEYWORD2>
+<KEYWORD2>with-mutex</KEYWORD2>
+<KEYWORD2>with-output-to-file</KEYWORD2>
+<KEYWORD2>with-output-to-string</KEYWORD2>
+<KEYWORD2>with-parameters*</KEYWORD2>
+<KEYWORD2>with-readline-completion-function</KEYWORD2>
+<KEYWORD2>with-throw-handler</KEYWORD2>
+<KEYWORD2>with-traps</KEYWORD2>
+<KEYWORD2>write</KEYWORD2>
+<KEYWORD2>write-char</KEYWORD2>
+<KEYWORD2>write-line</KEYWORD2>
+<KEYWORD2>write-string/partial</KEYWORD2>
+<KEYWORD2>xcons</KEYWORD2>
+<KEYWORD2>xsubstring</KEYWORD2>
+<KEYWORD2>yield</KEYWORD2>
+<KEYWORD2>zero?</KEYWORD2>
+<KEYWORD2>zip</KEYWORD2>
+
+<LITERAL2>#t</LITERAL2>
+<LITERAL2>#f</LITERAL2>
+</KEYWORDS>
+<!-- Generated part ended -->
+
+</RULES>
+
+</MODE>
diff --git a/jEdit/modes/lisp.xml b/jEdit/modes/lisp.xml
index dcb7489..24ba20a 100644
--- a/jEdit/modes/lisp.xml
+++ b/jEdit/modes/lisp.xml
@@ -1,1037 +1,1037 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="#| " />
- <PROPERTY NAME="commentEnd" VALUE=" |#" />
- <PROPERTY NAME="lineComment" VALUE=";" />
- <PROPERTY NAME="noWordSep" VALUE="_-+?:" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="multipleBracketIndent" VALUE="true" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- NO_WORD_SEP="_-+?:"
- DIGIT_RE="-?\d+([./]\d+)?"
- >
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>#|</BEGIN>
- <END>|#</END>
- </SPAN>
-
- <SEQ TYPE="NULL">'(</SEQ>
-
- <MARK_FOLLOWING TYPE="LITERAL1">'</MARK_FOLLOWING>
-
- <MARK_FOLLOWING AT_WORD_START="TRUE" TYPE="KEYWORD4">&</MARK_FOLLOWING>
-
- <SEQ TYPE="OPERATOR">`</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
-
- <!--
- Based on convention discussed here:
- http://www.gigamonkeys.com/book/syntax-and-semantics.html
- -->
- <EOL_SPAN TYPE="COMMENT4">;;;;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT3">;;;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">;;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!--
- keywords from j
- (http://armedbear-j.sourceforge.net/)
- Duplicates removed; KEYWORD1 and KEYWORD2
- better aligned with Emacs Lisp mode
- Missing Common Lisp symbols added; now 970 symbols total
- 2004-01-22 dsh
- -->
- <KEYWORDS>
- <KEYWORD1>defclass</KEYWORD1>
- <KEYWORD1>defconstant</KEYWORD1>
- <KEYWORD1>defgeneric</KEYWORD1>
- <KEYWORD1>define-compiler-macro</KEYWORD1>
- <KEYWORD1>define-condition</KEYWORD1>
- <KEYWORD1>define-method-combination</KEYWORD1>
- <KEYWORD1>define-modify-macro</KEYWORD1>
- <KEYWORD1>define-setf-expander</KEYWORD1>
- <KEYWORD1>define-symbol-macro</KEYWORD1>
- <KEYWORD1>defmacro</KEYWORD1>
- <KEYWORD1>defmethod</KEYWORD1>
- <KEYWORD1>defpackage</KEYWORD1>
- <KEYWORD1>defparameter</KEYWORD1>
- <KEYWORD1>defsetf</KEYWORD1>
- <KEYWORD1>defstruct</KEYWORD1>
- <KEYWORD1>deftype</KEYWORD1>
- <KEYWORD1>defun</KEYWORD1>
- <KEYWORD1>defvar</KEYWORD1>
-
- <KEYWORD2>abort</KEYWORD2>
- <KEYWORD2>assert</KEYWORD2>
- <KEYWORD2>block</KEYWORD2>
- <KEYWORD2>break</KEYWORD2>
- <KEYWORD2>case</KEYWORD2>
- <KEYWORD2>catch</KEYWORD2>
- <KEYWORD2>ccase</KEYWORD2>
- <KEYWORD2>cerror</KEYWORD2>
- <KEYWORD2>cond</KEYWORD2>
- <KEYWORD2>ctypecase</KEYWORD2>
- <KEYWORD2>declaim</KEYWORD2>
- <KEYWORD2>declare</KEYWORD2>
- <KEYWORD2>do</KEYWORD2>
- <KEYWORD2>do*</KEYWORD2>
- <KEYWORD2>do-all-symbols</KEYWORD2>
- <KEYWORD2>do-external-symbols</KEYWORD2>
- <KEYWORD2>do-symbols</KEYWORD2>
- <KEYWORD2>dolist</KEYWORD2>
- <KEYWORD2>dotimes</KEYWORD2>
- <KEYWORD2>ecase</KEYWORD2>
- <KEYWORD2>error</KEYWORD2>
- <KEYWORD2>etypecase</KEYWORD2>
- <KEYWORD2>eval-when</KEYWORD2>
- <KEYWORD2>flet</KEYWORD2>
- <KEYWORD2>handler-bind</KEYWORD2>
- <KEYWORD2>handler-case</KEYWORD2>
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD2>ignore-errors</KEYWORD2>
- <KEYWORD2>in-package</KEYWORD2>
- <KEYWORD2>labels</KEYWORD2>
- <KEYWORD2>lambda</KEYWORD2>
- <KEYWORD2>let</KEYWORD2>
- <KEYWORD2>let*</KEYWORD2>
- <KEYWORD2>locally</KEYWORD2>
- <KEYWORD2>loop</KEYWORD2>
- <KEYWORD2>macrolet</KEYWORD2>
- <KEYWORD2>multiple-value-bind</KEYWORD2>
- <KEYWORD2>proclaim</KEYWORD2>
- <KEYWORD2>prog</KEYWORD2>
- <KEYWORD2>prog*</KEYWORD2>
- <KEYWORD2>prog1</KEYWORD2>
- <KEYWORD2>prog2</KEYWORD2>
- <KEYWORD2>progn</KEYWORD2>
- <KEYWORD2>progv</KEYWORD2>
- <KEYWORD2>provide</KEYWORD2>
- <KEYWORD2>require</KEYWORD2>
- <KEYWORD2>restart-bind</KEYWORD2>
- <KEYWORD2>restart-case</KEYWORD2>
- <KEYWORD2>restart-name</KEYWORD2>
- <KEYWORD2>return</KEYWORD2>
- <KEYWORD2>return-from</KEYWORD2>
- <KEYWORD2>signal</KEYWORD2>
- <KEYWORD2>symbol-macrolet</KEYWORD2>
- <KEYWORD2>tagbody</KEYWORD2>
- <KEYWORD2>the</KEYWORD2>
- <KEYWORD2>throw</KEYWORD2>
- <KEYWORD2>typecase</KEYWORD2>
- <KEYWORD2>unless</KEYWORD2>
- <KEYWORD2>unwind-protect</KEYWORD2>
- <KEYWORD2>when</KEYWORD2>
- <KEYWORD2>with-accessors</KEYWORD2>
- <KEYWORD2>with-compilation-unit</KEYWORD2>
- <KEYWORD2>with-condition-restarts</KEYWORD2>
- <KEYWORD2>with-hash-table-iterator</KEYWORD2>
- <KEYWORD2>with-input-from-string</KEYWORD2>
- <KEYWORD2>with-open-file</KEYWORD2>
- <KEYWORD2>with-open-stream</KEYWORD2>
- <KEYWORD2>with-output-to-string</KEYWORD2>
- <KEYWORD2>with-package-iterator</KEYWORD2>
- <KEYWORD2>with-simple-restart</KEYWORD2>
- <KEYWORD2>with-slots</KEYWORD2>
- <KEYWORD2>with-standard-io-syntax</KEYWORD2>
-
- <KEYWORD3>*</KEYWORD3>
- <KEYWORD3>**</KEYWORD3>
- <KEYWORD3>***</KEYWORD3>
- <KEYWORD3>*break-on-signals*</KEYWORD3>
- <KEYWORD3>*compile-file-pathname*</KEYWORD3>
- <KEYWORD3>*compile-file-truename*</KEYWORD3>
- <KEYWORD3>*compile-print*</KEYWORD3>
- <KEYWORD3>*compile-verbose*</KEYWORD3>
- <KEYWORD3>*debug-io*</KEYWORD3>
- <KEYWORD3>*debugger-hook*</KEYWORD3>
- <KEYWORD3>*default-pathname-defaults*</KEYWORD3>
- <KEYWORD3>*error-output*</KEYWORD3>
- <KEYWORD3>*features*</KEYWORD3>
- <KEYWORD3>*gensym-counter*</KEYWORD3>
- <KEYWORD3>*load-pathname*</KEYWORD3>
- <KEYWORD3>*load-print*</KEYWORD3>
- <KEYWORD3>*load-truename*</KEYWORD3>
- <KEYWORD3>*load-verbose*</KEYWORD3>
- <KEYWORD3>*macroexpand-hook*</KEYWORD3>
- <KEYWORD3>*modules*</KEYWORD3>
- <KEYWORD3>*package*</KEYWORD3>
- <KEYWORD3>*print-array*</KEYWORD3>
- <KEYWORD3>*print-base*</KEYWORD3>
- <KEYWORD3>*print-case*</KEYWORD3>
- <KEYWORD3>*print-circle*</KEYWORD3>
- <KEYWORD3>*print-escape*</KEYWORD3>
- <KEYWORD3>*print-gensym*</KEYWORD3>
- <KEYWORD3>*print-length*</KEYWORD3>
- <KEYWORD3>*print-level*</KEYWORD3>
- <KEYWORD3>*print-lines*</KEYWORD3>
- <KEYWORD3>*print-miser-width*</KEYWORD3>
- <KEYWORD3>*print-pprint-dispatch*</KEYWORD3>
- <KEYWORD3>*print-pretty*</KEYWORD3>
- <KEYWORD3>*print-radix*</KEYWORD3>
- <KEYWORD3>*print-readably*</KEYWORD3>
- <KEYWORD3>*print-right-margin*</KEYWORD3>
- <KEYWORD3>*query-io*</KEYWORD3>
- <KEYWORD3>*random-state*</KEYWORD3>
- <KEYWORD3>*read-base*</KEYWORD3>
- <KEYWORD3>*read-default-float-format*</KEYWORD3>
- <KEYWORD3>*read-eval*</KEYWORD3>
- <KEYWORD3>*read-suppress*</KEYWORD3>
- <KEYWORD3>*readtable*</KEYWORD3>
- <KEYWORD3>*standard-input*</KEYWORD3>
- <KEYWORD3>*standard-output*</KEYWORD3>
- <KEYWORD3>*terminal-io*</KEYWORD3>
- <KEYWORD3>*trace-output*</KEYWORD3>
- <KEYWORD3>+</KEYWORD3>
- <KEYWORD3>++</KEYWORD3>
- <KEYWORD3>+++</KEYWORD3>
- <KEYWORD3>-</KEYWORD3>
- <KEYWORD3>/</KEYWORD3>
- <KEYWORD3>//</KEYWORD3>
- <KEYWORD3>///</KEYWORD3>
- <KEYWORD3>/=</KEYWORD3>
- <KEYWORD3>1+</KEYWORD3>
- <KEYWORD3>1-</KEYWORD3>
- <KEYWORD3><</KEYWORD3>
- <KEYWORD3><=</KEYWORD3>
- <KEYWORD3>=</KEYWORD3>
- <KEYWORD3>></KEYWORD3>
- <KEYWORD3>>=</KEYWORD3>
- <KEYWORD3>abs</KEYWORD3>
- <KEYWORD3>acons</KEYWORD3>
- <KEYWORD3>acos</KEYWORD3>
- <KEYWORD3>acosh</KEYWORD3>
- <KEYWORD3>add-method</KEYWORD3>
- <KEYWORD3>adjoin</KEYWORD3>
- <KEYWORD3>adjust-array</KEYWORD3>
- <KEYWORD3>adjustable-array-p</KEYWORD3>
- <KEYWORD3>allocate-instance</KEYWORD3>
- <KEYWORD3>alpha-char-p</KEYWORD3>
- <KEYWORD3>alphanumericp</KEYWORD3>
- <KEYWORD3>and</KEYWORD3>
- <KEYWORD3>append</KEYWORD3>
- <KEYWORD3>apply</KEYWORD3>
- <KEYWORD3>apropos</KEYWORD3>
- <KEYWORD3>apropos-list</KEYWORD3>
- <KEYWORD3>aref</KEYWORD3>
- <KEYWORD3>arithmetic-error</KEYWORD3>
- <KEYWORD3>arithmetic-error-operands</KEYWORD3>
- <KEYWORD3>arithmetic-error-operation</KEYWORD3>
- <KEYWORD3>array</KEYWORD3>
- <KEYWORD3>array-dimension</KEYWORD3>
- <KEYWORD3>array-dimension-limit</KEYWORD3>
- <KEYWORD3>array-dimensions</KEYWORD3>
- <KEYWORD3>array-displacement</KEYWORD3>
- <KEYWORD3>array-element-type</KEYWORD3>
- <KEYWORD3>array-has-fill-pointer-p</KEYWORD3>
- <KEYWORD3>array-in-bounds-p</KEYWORD3>
- <KEYWORD3>array-rank</KEYWORD3>
- <KEYWORD3>array-rank-limit</KEYWORD3>
- <KEYWORD3>array-row-major-index</KEYWORD3>
- <KEYWORD3>array-total-size</KEYWORD3>
- <KEYWORD3>array-total-size-limit</KEYWORD3>
- <KEYWORD3>arrayp</KEYWORD3>
- <KEYWORD3>ash</KEYWORD3>
- <KEYWORD3>asin</KEYWORD3>
- <KEYWORD3>asinh</KEYWORD3>
- <KEYWORD3>assoc</KEYWORD3>
- <KEYWORD3>assoc-if</KEYWORD3>
- <KEYWORD3>assoc-if-not</KEYWORD3>
- <KEYWORD3>atan</KEYWORD3>
- <KEYWORD3>atanh</KEYWORD3>
- <KEYWORD3>atom</KEYWORD3>
- <KEYWORD3>base-char</KEYWORD3>
- <KEYWORD3>base-string</KEYWORD3>
- <KEYWORD3>bignum</KEYWORD3>
- <KEYWORD3>bit</KEYWORD3>
- <KEYWORD3>bit-and</KEYWORD3>
- <KEYWORD3>bit-andc1</KEYWORD3>
- <KEYWORD3>bit-andc2</KEYWORD3>
- <KEYWORD3>bit-eqv</KEYWORD3>
- <KEYWORD3>bit-ior</KEYWORD3>
- <KEYWORD3>bit-nand</KEYWORD3>
- <KEYWORD3>bit-nor</KEYWORD3>
- <KEYWORD3>bit-not</KEYWORD3>
- <KEYWORD3>bit-orc1</KEYWORD3>
- <KEYWORD3>bit-orc2</KEYWORD3>
- <KEYWORD3>bit-vector</KEYWORD3>
- <KEYWORD3>bit-vector-p</KEYWORD3>
- <KEYWORD3>bit-xor</KEYWORD3>
- <KEYWORD3>boole</KEYWORD3>
- <KEYWORD3>boole-1</KEYWORD3>
- <KEYWORD3>boole-2</KEYWORD3>
- <KEYWORD3>boole-and</KEYWORD3>
- <KEYWORD3>boole-andc1</KEYWORD3>
- <KEYWORD3>boole-andc2</KEYWORD3>
- <KEYWORD3>boole-c1</KEYWORD3>
- <KEYWORD3>boole-c2</KEYWORD3>
- <KEYWORD3>boole-clr</KEYWORD3>
- <KEYWORD3>boole-eqv</KEYWORD3>
- <KEYWORD3>boole-ior</KEYWORD3>
- <KEYWORD3>boole-nand</KEYWORD3>
- <KEYWORD3>boole-nor</KEYWORD3>
- <KEYWORD3>boole-orc1</KEYWORD3>
- <KEYWORD3>boole-orc2</KEYWORD3>
- <KEYWORD3>boole-set</KEYWORD3>
- <KEYWORD3>boole-xor</KEYWORD3>
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD3>both-case-p</KEYWORD3>
- <KEYWORD3>boundp</KEYWORD3>
- <KEYWORD3>broadcast-stream</KEYWORD3>
- <KEYWORD3>broadcast-stream-streams</KEYWORD3>
- <KEYWORD3>built-in-class</KEYWORD3>
- <KEYWORD3>butlast</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>byte-position</KEYWORD3>
- <KEYWORD3>byte-size</KEYWORD3>
- <KEYWORD3>caaaar</KEYWORD3>
- <KEYWORD3>caaadr</KEYWORD3>
- <KEYWORD3>caaar</KEYWORD3>
- <KEYWORD3>caadar</KEYWORD3>
- <KEYWORD3>caaddr</KEYWORD3>
- <KEYWORD3>caadr</KEYWORD3>
- <KEYWORD3>caar</KEYWORD3>
- <KEYWORD3>cadaar</KEYWORD3>
- <KEYWORD3>cadadr</KEYWORD3>
- <KEYWORD3>cadar</KEYWORD3>
- <KEYWORD3>caddar</KEYWORD3>
- <KEYWORD3>cadddr</KEYWORD3>
- <KEYWORD3>caddr</KEYWORD3>
- <KEYWORD3>cadr</KEYWORD3>
- <KEYWORD3>call-arguments-limit</KEYWORD3>
- <KEYWORD3>call-method</KEYWORD3>
- <KEYWORD3>call-next-method</KEYWORD3>
- <KEYWORD3>car</KEYWORD3>
- <KEYWORD3>cdaaar</KEYWORD3>
- <KEYWORD3>cdaadr</KEYWORD3>
- <KEYWORD3>cdaar</KEYWORD3>
- <KEYWORD3>cdadar</KEYWORD3>
- <KEYWORD3>cdaddr</KEYWORD3>
- <KEYWORD3>cdadr</KEYWORD3>
- <KEYWORD3>cdar</KEYWORD3>
- <KEYWORD3>cddaar</KEYWORD3>
- <KEYWORD3>cddadr</KEYWORD3>
- <KEYWORD3>cddar</KEYWORD3>
- <KEYWORD3>cdddar</KEYWORD3>
- <KEYWORD3>cddddr</KEYWORD3>
- <KEYWORD3>cdddr</KEYWORD3>
- <KEYWORD3>cddr</KEYWORD3>
- <KEYWORD3>cdr</KEYWORD3>
- <KEYWORD3>ceiling</KEYWORD3>
- <KEYWORD3>cell-error</KEYWORD3>
- <KEYWORD3>cell-error-name</KEYWORD3>
- <KEYWORD3>change-class</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>char-code</KEYWORD3>
- <KEYWORD3>char-code-limit</KEYWORD3>
- <KEYWORD3>char-downcase</KEYWORD3>
- <KEYWORD3>char-equal</KEYWORD3>
- <KEYWORD3>char-greaterp</KEYWORD3>
- <KEYWORD3>char-int</KEYWORD3>
- <KEYWORD3>char-lessp</KEYWORD3>
- <KEYWORD3>char-name</KEYWORD3>
- <KEYWORD3>char-not-equal</KEYWORD3>
- <KEYWORD3>char-not-greaterp</KEYWORD3>
- <KEYWORD3>char-not-lessp</KEYWORD3>
- <KEYWORD3>char-upcase</KEYWORD3>
- <KEYWORD3>char/=</KEYWORD3>
- <KEYWORD3>char></KEYWORD3>
- <KEYWORD3>char>=</KEYWORD3>
- <KEYWORD3>char<</KEYWORD3>
- <KEYWORD3>char<=</KEYWORD3>
- <KEYWORD3>char=</KEYWORD3>
- <KEYWORD3>character</KEYWORD3>
- <KEYWORD3>characterp</KEYWORD3>
- <KEYWORD3>check-type</KEYWORD3>
- <KEYWORD3>cis</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>class-name</KEYWORD3>
- <KEYWORD3>class-of</KEYWORD3>
- <KEYWORD3>clear-input</KEYWORD3>
- <KEYWORD3>clear-output</KEYWORD3>
- <KEYWORD3>close</KEYWORD3>
- <KEYWORD3>clrhash</KEYWORD3>
- <KEYWORD3>code-char</KEYWORD3>
- <KEYWORD3>coerce</KEYWORD3>
- <KEYWORD3>compilation-speed</KEYWORD3>
- <KEYWORD3>compile</KEYWORD3>
- <KEYWORD3>compile-file</KEYWORD3>
- <KEYWORD3>compile-file-pathname</KEYWORD3>
- <KEYWORD3>compiled-function</KEYWORD3>
- <KEYWORD3>compiled-function-p</KEYWORD3>
- <KEYWORD3>compiler-macro</KEYWORD3>
- <KEYWORD3>compiler-macro-function</KEYWORD3>
- <KEYWORD3>complement</KEYWORD3>
- <KEYWORD3>complex</KEYWORD3>
- <KEYWORD3>complexp</KEYWORD3>
- <KEYWORD3>compute-applicable-methods</KEYWORD3>
- <KEYWORD3>compute-restarts</KEYWORD3>
- <KEYWORD3>concatenate</KEYWORD3>
- <KEYWORD3>concatenated-stream</KEYWORD3>
- <KEYWORD3>concatenated-stream-streams</KEYWORD3>
- <KEYWORD3>condition</KEYWORD3>
- <KEYWORD3>conjugate</KEYWORD3>
- <KEYWORD3>cons</KEYWORD3>
- <KEYWORD3>consp</KEYWORD3>
- <KEYWORD3>constantly</KEYWORD3>
- <KEYWORD3>constantp</KEYWORD3>
- <KEYWORD3>continue</KEYWORD3>
- <KEYWORD3>control-error</KEYWORD3>
- <KEYWORD3>copy-alist</KEYWORD3>
- <KEYWORD3>copy-list</KEYWORD3>
- <KEYWORD3>copy-pprint-dispatch</KEYWORD3>
- <KEYWORD3>copy-readtable</KEYWORD3>
- <KEYWORD3>copy-seq</KEYWORD3>
- <KEYWORD3>copy-structure</KEYWORD3>
- <KEYWORD3>copy-symbol</KEYWORD3>
- <KEYWORD3>copy-tree</KEYWORD3>
- <KEYWORD3>cos</KEYWORD3>
- <KEYWORD3>cosh</KEYWORD3>
- <KEYWORD3>count</KEYWORD3>
- <KEYWORD3>count-if</KEYWORD3>
- <KEYWORD3>count-if-not</KEYWORD3>
- <KEYWORD3>debug</KEYWORD3>
- <KEYWORD3>decf</KEYWORD3>
- <KEYWORD3>declaration</KEYWORD3>
- <KEYWORD3>decode-float</KEYWORD3>
- <KEYWORD3>decode-universal-time</KEYWORD3>
- <KEYWORD3>delete</KEYWORD3>
- <KEYWORD3>delete-duplicates</KEYWORD3>
- <KEYWORD3>delete-file</KEYWORD3>
- <KEYWORD3>delete-if</KEYWORD3>
- <KEYWORD3>delete-if-not</KEYWORD3>
- <KEYWORD3>delete-package</KEYWORD3>
- <KEYWORD3>denominator</KEYWORD3>
- <KEYWORD3>deposit-field</KEYWORD3>
- <KEYWORD3>describe</KEYWORD3>
- <KEYWORD3>describe-object</KEYWORD3>
- <KEYWORD3>destructuring-bind</KEYWORD3>
- <KEYWORD3>digit-char</KEYWORD3>
- <KEYWORD3>digit-char-p</KEYWORD3>
- <KEYWORD3>directory</KEYWORD3>
- <KEYWORD3>directory-namestring</KEYWORD3>
- <KEYWORD3>disassemble</KEYWORD3>
- <KEYWORD3>division-by-zero</KEYWORD3>
- <KEYWORD3>documentation</KEYWORD3>
- <KEYWORD3>double-float</KEYWORD3>
- <KEYWORD3>double-float-epsilon</KEYWORD3>
- <KEYWORD3>double-float-negative-epsilon</KEYWORD3>
- <KEYWORD3>dpb</KEYWORD3>
- <KEYWORD3>dribble</KEYWORD3>
- <KEYWORD3>dynamic-extent</KEYWORD3>
- <KEYWORD3>echo-stream</KEYWORD3>
- <KEYWORD3>echo-stream-input-stream</KEYWORD3>
- <KEYWORD3>echo-stream-output-stream</KEYWORD3>
- <KEYWORD3>ed</KEYWORD3>
- <KEYWORD3>eighth</KEYWORD3>
- <KEYWORD3>elt</KEYWORD3>
- <KEYWORD3>encode-universal-time</KEYWORD3>
- <KEYWORD3>end-of-file</KEYWORD3>
- <KEYWORD3>endp</KEYWORD3>
- <KEYWORD3>enough-namestring</KEYWORD3>
- <KEYWORD3>ensure-directories-exist</KEYWORD3>
- <KEYWORD3>ensure-generic-function</KEYWORD3>
- <KEYWORD3>eq</KEYWORD3>
- <KEYWORD3>eql</KEYWORD3>
- <KEYWORD3>equal</KEYWORD3>
- <KEYWORD3>equalp</KEYWORD3>
- <KEYWORD3>eval</KEYWORD3>
- <KEYWORD3>evenp</KEYWORD3>
- <KEYWORD3>every</KEYWORD3>
- <KEYWORD3>exp</KEYWORD3>
- <KEYWORD3>export</KEYWORD3>
- <KEYWORD3>expt</KEYWORD3>
- <KEYWORD3>extended-char</KEYWORD3>
- <KEYWORD3>fboundp</KEYWORD3>
- <KEYWORD3>fceiling</KEYWORD3>
- <KEYWORD3>fdefinition</KEYWORD3>
- <KEYWORD3>ffloor</KEYWORD3>
- <KEYWORD3>fifth</KEYWORD3>
- <KEYWORD3>file-author</KEYWORD3>
- <KEYWORD3>file-error</KEYWORD3>
- <KEYWORD3>file-error-pathname</KEYWORD3>
- <KEYWORD3>file-length</KEYWORD3>
- <KEYWORD3>file-namestring</KEYWORD3>
- <KEYWORD3>file-position</KEYWORD3>
- <KEYWORD3>file-stream</KEYWORD3>
- <KEYWORD3>file-string-length</KEYWORD3>
- <KEYWORD3>file-write-date</KEYWORD3>
- <KEYWORD3>fill</KEYWORD3>
- <KEYWORD3>fill-pointer</KEYWORD3>
- <KEYWORD3>find</KEYWORD3>
- <KEYWORD3>find-all-symbols</KEYWORD3>
- <KEYWORD3>find-class</KEYWORD3>
- <KEYWORD3>find-if</KEYWORD3>
- <KEYWORD3>find-if-not</KEYWORD3>
- <KEYWORD3>find-method</KEYWORD3>
- <KEYWORD3>find-package</KEYWORD3>
- <KEYWORD3>find-restart</KEYWORD3>
- <KEYWORD3>find-symbol</KEYWORD3>
- <KEYWORD3>finish-output</KEYWORD3>
- <KEYWORD3>first</KEYWORD3>
- <KEYWORD3>fixnum</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>float-digits</KEYWORD3>
- <KEYWORD3>float-precision</KEYWORD3>
- <KEYWORD3>float-radix</KEYWORD3>
- <KEYWORD3>float-sign</KEYWORD3>
- <KEYWORD3>floating-point-inexact</KEYWORD3>
- <KEYWORD3>floating-point-invalid-operation</KEYWORD3>
- <KEYWORD3>floating-point-overflow</KEYWORD3>
- <KEYWORD3>floating-point-underflow</KEYWORD3>
- <KEYWORD3>floatp</KEYWORD3>
- <KEYWORD3>floor</KEYWORD3>
- <KEYWORD3>fmakunbound</KEYWORD3>
- <KEYWORD3>force-output</KEYWORD3>
- <KEYWORD3>format</KEYWORD3>
- <KEYWORD3>formatter</KEYWORD3>
- <KEYWORD3>fourth</KEYWORD3>
- <KEYWORD3>fresh-line</KEYWORD3>
- <KEYWORD3>fround</KEYWORD3>
- <KEYWORD3>ftruncate</KEYWORD3>
- <KEYWORD3>ftype</KEYWORD3>
- <KEYWORD3>funcall</KEYWORD3>
- <KEYWORD3>function</KEYWORD3>
- <KEYWORD3>function-keywords</KEYWORD3>
- <KEYWORD3>function-lambda-expression</KEYWORD3>
- <KEYWORD3>functionp</KEYWORD3>
- <KEYWORD3>gcd</KEYWORD3>
- <KEYWORD3>generic-function</KEYWORD3>
- <KEYWORD3>gensym</KEYWORD3>
- <KEYWORD3>gentemp</KEYWORD3>
- <KEYWORD3>get</KEYWORD3>
- <KEYWORD3>get-decoded-time</KEYWORD3>
- <KEYWORD3>get-dispatch-macro-character</KEYWORD3>
- <KEYWORD3>get-internal-real-time</KEYWORD3>
- <KEYWORD3>get-internal-run-time</KEYWORD3>
- <KEYWORD3>get-macro-character</KEYWORD3>
- <KEYWORD3>get-output-stream-string</KEYWORD3>
- <KEYWORD3>get-properties</KEYWORD3>
- <KEYWORD3>get-setf-expansion</KEYWORD3>
- <KEYWORD3>get-universal-time</KEYWORD3>
- <KEYWORD3>getf</KEYWORD3>
- <KEYWORD3>gethash</KEYWORD3>
- <KEYWORD3>go</KEYWORD3>
- <KEYWORD3>graphic-char-p</KEYWORD3>
- <KEYWORD3>hash-table</KEYWORD3>
- <KEYWORD3>hash-table-count</KEYWORD3>
- <KEYWORD3>hash-table-p</KEYWORD3>
- <KEYWORD3>hash-table-rehash-size</KEYWORD3>
- <KEYWORD3>hash-table-rehash-threshold</KEYWORD3>
- <KEYWORD3>hash-table-size</KEYWORD3>
- <KEYWORD3>hash-table-test</KEYWORD3>
- <KEYWORD3>host-namestring</KEYWORD3>
- <KEYWORD3>identity</KEYWORD3>
- <KEYWORD3>ignorable</KEYWORD3>
- <KEYWORD3>ignore</KEYWORD3>
- <KEYWORD3>imagpart</KEYWORD3>
- <KEYWORD3>import</KEYWORD3>
- <KEYWORD3>incf</KEYWORD3>
- <KEYWORD3>initialize-instance</KEYWORD3>
- <KEYWORD3>inline</KEYWORD3>
- <KEYWORD3>input-stream-p</KEYWORD3>
- <KEYWORD3>inspect</KEYWORD3>
- <KEYWORD3>integer</KEYWORD3>
- <KEYWORD3>integer-decode-float</KEYWORD3>
- <KEYWORD3>integer-length</KEYWORD3>
- <KEYWORD3>integerp</KEYWORD3>
- <KEYWORD3>interactive-stream-p</KEYWORD3>
- <KEYWORD3>intern</KEYWORD3>
- <KEYWORD3>internal-time-units-per-second</KEYWORD3>
- <KEYWORD3>intersection</KEYWORD3>
- <KEYWORD3>invalid-method-error</KEYWORD3>
- <KEYWORD3>invoke-debugger</KEYWORD3>
- <KEYWORD3>invoke-restart</KEYWORD3>
- <KEYWORD3>invoke-restart-interactively</KEYWORD3>
- <KEYWORD3>isqrt</KEYWORD3>
- <KEYWORD3>keyword</KEYWORD3>
- <KEYWORD3>keywordp</KEYWORD3>
- <KEYWORD3>lambda-list-keywords</KEYWORD3>
- <KEYWORD3>lambda-parameters-limit</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>lcm</KEYWORD3>
- <KEYWORD3>ldb</KEYWORD3>
- <KEYWORD3>ldb-test</KEYWORD3>
- <KEYWORD3>ldiff</KEYWORD3>
- <KEYWORD3>least-negative-double-float</KEYWORD3>
- <KEYWORD3>least-negative-long-float</KEYWORD3>
- <KEYWORD3>least-negative-normalized-double-float</KEYWORD3>
- <KEYWORD3>least-negative-normalized-long-float</KEYWORD3>
- <KEYWORD3>least-negative-normalized-short-float</KEYWORD3>
- <KEYWORD3>least-negative-normalized-single-float</KEYWORD3>
- <KEYWORD3>least-negative-short-float</KEYWORD3>
- <KEYWORD3>least-negative-single-float</KEYWORD3>
- <KEYWORD3>least-positive-double-float</KEYWORD3>
- <KEYWORD3>least-positive-long-float</KEYWORD3>
- <KEYWORD3>least-positive-normalized-double-float</KEYWORD3>
- <KEYWORD3>least-positive-normalized-long-float</KEYWORD3>
- <KEYWORD3>least-positive-normalized-short-float</KEYWORD3>
- <KEYWORD3>least-positive-normalized-single-float</KEYWORD3>
- <KEYWORD3>least-positive-short-float</KEYWORD3>
- <KEYWORD3>least-positive-single-float</KEYWORD3>
- <KEYWORD3>length</KEYWORD3>
- <KEYWORD3>lisp-implementation-type</KEYWORD3>
- <KEYWORD3>lisp-implementation-version</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>list*</KEYWORD3>
- <KEYWORD3>list-all-packages</KEYWORD3>
- <KEYWORD3>list-length</KEYWORD3>
- <KEYWORD3>listen</KEYWORD3>
- <KEYWORD3>listp</KEYWORD3>
- <KEYWORD3>load</KEYWORD3>
- <KEYWORD3>load-logical-pathname-translations</KEYWORD3>
- <KEYWORD3>load-time-value</KEYWORD3>
- <KEYWORD3>log</KEYWORD3>
- <KEYWORD3>logand</KEYWORD3>
- <KEYWORD3>logandc1</KEYWORD3>
- <KEYWORD3>logandc2</KEYWORD3>
- <KEYWORD3>logbitp</KEYWORD3>
- <KEYWORD3>logcount</KEYWORD3>
- <KEYWORD3>logeqv</KEYWORD3>
- <KEYWORD3>logical-pathname</KEYWORD3>
- <KEYWORD3>logical-pathname-translations</KEYWORD3>
- <KEYWORD3>logior</KEYWORD3>
- <KEYWORD3>lognand</KEYWORD3>
- <KEYWORD3>lognor</KEYWORD3>
- <KEYWORD3>lognot</KEYWORD3>
- <KEYWORD3>logorc1</KEYWORD3>
- <KEYWORD3>logorc2</KEYWORD3>
- <KEYWORD3>logtest</KEYWORD3>
- <KEYWORD3>logxor</KEYWORD3>
- <KEYWORD3>long-float</KEYWORD3>
- <KEYWORD3>long-float-epsilon</KEYWORD3>
- <KEYWORD3>long-float-negative-epsilon</KEYWORD3>
- <KEYWORD3>long-site-name</KEYWORD3>
- <KEYWORD3>loop-finish</KEYWORD3>
- <KEYWORD3>lower-case-p</KEYWORD3>
- <KEYWORD3>machine-instance</KEYWORD3>
- <KEYWORD3>machine-type</KEYWORD3>
- <KEYWORD3>machine-version</KEYWORD3>
- <KEYWORD3>macro-function</KEYWORD3>
- <KEYWORD3>macroexpand</KEYWORD3>
- <KEYWORD3>macroexpand-1</KEYWORD3>
- <KEYWORD3>make-array</KEYWORD3>
- <KEYWORD3>make-broadcast-stream</KEYWORD3>
- <KEYWORD3>make-concatenated-stream</KEYWORD3>
- <KEYWORD3>make-condition</KEYWORD3>
- <KEYWORD3>make-dispatch-macro-character</KEYWORD3>
- <KEYWORD3>make-echo-stream</KEYWORD3>
- <KEYWORD3>make-hash-table</KEYWORD3>
- <KEYWORD3>make-instance</KEYWORD3>
- <KEYWORD3>make-instances-obsolete</KEYWORD3>
- <KEYWORD3>make-list</KEYWORD3>
- <KEYWORD3>make-load-form</KEYWORD3>
- <KEYWORD3>make-load-form-saving-slots</KEYWORD3>
- <KEYWORD3>make-method</KEYWORD3>
- <KEYWORD3>make-package</KEYWORD3>
- <KEYWORD3>make-pathname</KEYWORD3>
- <KEYWORD3>make-random-state</KEYWORD3>
- <KEYWORD3>make-sequence</KEYWORD3>
- <KEYWORD3>make-string</KEYWORD3>
- <KEYWORD3>make-string-input-stream</KEYWORD3>
- <KEYWORD3>make-string-output-stream</KEYWORD3>
- <KEYWORD3>make-symbol</KEYWORD3>
- <KEYWORD3>make-synonym-stream</KEYWORD3>
- <KEYWORD3>make-two-way-stream</KEYWORD3>
- <KEYWORD3>makunbound</KEYWORD3>
- <KEYWORD3>map</KEYWORD3>
- <KEYWORD3>map-into</KEYWORD3>
- <KEYWORD3>mapc</KEYWORD3>
- <KEYWORD3>mapcan</KEYWORD3>
- <KEYWORD3>mapcar</KEYWORD3>
- <KEYWORD3>mapcon</KEYWORD3>
- <KEYWORD3>maphash</KEYWORD3>
- <KEYWORD3>mapl</KEYWORD3>
- <KEYWORD3>maplist</KEYWORD3>
- <KEYWORD3>mask-field</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>member</KEYWORD3>
- <KEYWORD3>member-if</KEYWORD3>
- <KEYWORD3>member-if-not</KEYWORD3>
- <KEYWORD3>merge</KEYWORD3>
- <KEYWORD3>merge-pathnames</KEYWORD3>
- <KEYWORD3>method</KEYWORD3>
- <KEYWORD3>method-combination</KEYWORD3>
- <KEYWORD3>method-combination-error</KEYWORD3>
- <KEYWORD3>method-qualifiers</KEYWORD3>
- <KEYWORD3>min</KEYWORD3>
- <KEYWORD3>minusp</KEYWORD3>
- <KEYWORD3>mismatch</KEYWORD3>
- <KEYWORD3>mod</KEYWORD3>
- <KEYWORD3>most-negative-double-float</KEYWORD3>
- <KEYWORD3>most-negative-fixnum</KEYWORD3>
- <KEYWORD3>most-negative-long-float</KEYWORD3>
- <KEYWORD3>most-negative-short-float</KEYWORD3>
- <KEYWORD3>most-negative-single-float</KEYWORD3>
- <KEYWORD3>most-positive-double-float</KEYWORD3>
- <KEYWORD3>most-positive-fixnum</KEYWORD3>
- <KEYWORD3>most-positive-long-float</KEYWORD3>
- <KEYWORD3>most-positive-short-float</KEYWORD3>
- <KEYWORD3>most-positive-single-float</KEYWORD3>
- <KEYWORD3>muffle-warning</KEYWORD3>
- <KEYWORD3>multiple-value-call</KEYWORD3>
- <KEYWORD3>multiple-value-list</KEYWORD3>
- <KEYWORD3>multiple-value-prog1</KEYWORD3>
- <KEYWORD3>multiple-value-setq</KEYWORD3>
- <KEYWORD3>multiple-values-limit</KEYWORD3>
- <KEYWORD3>name-char</KEYWORD3>
- <KEYWORD3>namestring</KEYWORD3>
- <KEYWORD3>nbutlast</KEYWORD3>
- <KEYWORD3>nconc</KEYWORD3>
- <KEYWORD3>next-method-p</KEYWORD3>
- <KEYWORD3>nintersection</KEYWORD3>
- <KEYWORD3>ninth</KEYWORD3>
- <KEYWORD3>no-applicable-method</KEYWORD3>
- <KEYWORD3>no-next-method</KEYWORD3>
- <KEYWORD3>not</KEYWORD3>
- <KEYWORD3>notany</KEYWORD3>
- <KEYWORD3>notevery</KEYWORD3>
- <KEYWORD3>notinline</KEYWORD3>
- <KEYWORD3>nreconc</KEYWORD3>
- <KEYWORD3>nreverse</KEYWORD3>
- <KEYWORD3>nset-difference</KEYWORD3>
- <KEYWORD3>nset-exclusive-or</KEYWORD3>
- <KEYWORD3>nstring-capitalize</KEYWORD3>
- <KEYWORD3>nstring-downcase</KEYWORD3>
- <KEYWORD3>nstring-upcase</KEYWORD3>
- <KEYWORD3>nsublis</KEYWORD3>
- <KEYWORD3>nsubst</KEYWORD3>
- <KEYWORD3>nsubst-if</KEYWORD3>
- <KEYWORD3>nsubst-if-not</KEYWORD3>
- <KEYWORD3>nsubstitute</KEYWORD3>
- <KEYWORD3>nsubstitute-if</KEYWORD3>
- <KEYWORD3>nsubstitute-if-not</KEYWORD3>
- <KEYWORD3>nth</KEYWORD3>
- <KEYWORD3>nth-value</KEYWORD3>
- <KEYWORD3>nthcdr</KEYWORD3>
- <KEYWORD3>null</KEYWORD3>
- <KEYWORD3>number</KEYWORD3>
- <KEYWORD3>numberp</KEYWORD3>
- <KEYWORD3>numerator</KEYWORD3>
- <KEYWORD3>nunion</KEYWORD3>
- <KEYWORD3>oddp</KEYWORD3>
- <KEYWORD3>open</KEYWORD3>
- <KEYWORD3>open-stream-p</KEYWORD3>
- <KEYWORD3>optimize</KEYWORD3>
- <KEYWORD3>or</KEYWORD3>
- <KEYWORD3>otherwise</KEYWORD3>
- <KEYWORD3>output-stream-p</KEYWORD3>
- <KEYWORD3>package</KEYWORD3>
- <KEYWORD3>package-error</KEYWORD3>
- <KEYWORD3>package-error-package</KEYWORD3>
- <KEYWORD3>package-name</KEYWORD3>
- <KEYWORD3>package-nicknames</KEYWORD3>
- <KEYWORD3>package-shadowing-symbols</KEYWORD3>
- <KEYWORD3>package-use-list</KEYWORD3>
- <KEYWORD3>package-used-by-list</KEYWORD3>
- <KEYWORD3>packagep</KEYWORD3>
- <KEYWORD3>pairlis</KEYWORD3>
- <KEYWORD3>parse-error</KEYWORD3>
- <KEYWORD3>parse-integer</KEYWORD3>
- <KEYWORD3>parse-namestring</KEYWORD3>
- <KEYWORD3>pathname</KEYWORD3>
- <KEYWORD3>pathname-device</KEYWORD3>
- <KEYWORD3>pathname-directory</KEYWORD3>
- <KEYWORD3>pathname-host</KEYWORD3>
- <KEYWORD3>pathname-match-p</KEYWORD3>
- <KEYWORD3>pathname-name</KEYWORD3>
- <KEYWORD3>pathname-type</KEYWORD3>
- <KEYWORD3>pathname-version</KEYWORD3>
- <KEYWORD3>pathnamep</KEYWORD3>
- <KEYWORD3>peek-char</KEYWORD3>
- <KEYWORD3>phase</KEYWORD3>
- <KEYWORD3>pi</KEYWORD3>
- <KEYWORD3>plusp</KEYWORD3>
- <KEYWORD3>pop</KEYWORD3>
- <KEYWORD3>position</KEYWORD3>
- <KEYWORD3>position-if</KEYWORD3>
- <KEYWORD3>position-if-not</KEYWORD3>
- <KEYWORD3>pprint</KEYWORD3>
- <KEYWORD3>pprint-dispatch</KEYWORD3>
- <KEYWORD3>pprint-exit-if-list-exhausted</KEYWORD3>
- <KEYWORD3>pprint-fill</KEYWORD3>
- <KEYWORD3>pprint-indent</KEYWORD3>
- <KEYWORD3>pprint-linear</KEYWORD3>
- <KEYWORD3>pprint-logical-block</KEYWORD3>
- <KEYWORD3>pprint-newline</KEYWORD3>
- <KEYWORD3>pprint-pop</KEYWORD3>
- <KEYWORD3>pprint-tab</KEYWORD3>
- <KEYWORD3>pprint-tabular</KEYWORD3>
- <KEYWORD3>prin1</KEYWORD3>
- <KEYWORD3>prin1-to-string</KEYWORD3>
- <KEYWORD3>princ</KEYWORD3>
- <KEYWORD3>princ-to-string</KEYWORD3>
- <KEYWORD3>print</KEYWORD3>
- <KEYWORD3>print-not-readable</KEYWORD3>
- <KEYWORD3>print-not-readable-object</KEYWORD3>
- <KEYWORD3>print-object</KEYWORD3>
- <KEYWORD3>print-unreadable-object</KEYWORD3>
- <KEYWORD3>probe-file</KEYWORD3>
- <KEYWORD3>program-error</KEYWORD3>
- <KEYWORD3>psetf</KEYWORD3>
- <KEYWORD3>psetq</KEYWORD3>
- <KEYWORD3>push</KEYWORD3>
- <KEYWORD3>pushnew</KEYWORD3>
- <KEYWORD3>quote</KEYWORD3>
- <KEYWORD3>random</KEYWORD3>
- <KEYWORD3>random-state</KEYWORD3>
- <KEYWORD3>random-state-p</KEYWORD3>
- <KEYWORD3>rassoc</KEYWORD3>
- <KEYWORD3>rassoc-if</KEYWORD3>
- <KEYWORD3>rassoc-if-not</KEYWORD3>
- <KEYWORD3>ratio</KEYWORD3>
- <KEYWORD3>rational</KEYWORD3>
- <KEYWORD3>rationalize</KEYWORD3>
- <KEYWORD3>rationalp</KEYWORD3>
- <KEYWORD3>read</KEYWORD3>
- <KEYWORD3>read-byte</KEYWORD3>
- <KEYWORD3>read-char</KEYWORD3>
- <KEYWORD3>read-char-no-hang</KEYWORD3>
- <KEYWORD3>read-delimited-list</KEYWORD3>
- <KEYWORD3>read-from-string</KEYWORD3>
- <KEYWORD3>read-line</KEYWORD3>
- <KEYWORD3>read-preserving-whitespace</KEYWORD3>
- <KEYWORD3>read-sequence</KEYWORD3>
- <KEYWORD3>reader-error</KEYWORD3>
- <KEYWORD3>readtable</KEYWORD3>
- <KEYWORD3>readtable-case</KEYWORD3>
- <KEYWORD3>readtablep</KEYWORD3>
- <KEYWORD3>real</KEYWORD3>
- <KEYWORD3>realp</KEYWORD3>
- <KEYWORD3>realpart</KEYWORD3>
- <KEYWORD3>reduce</KEYWORD3>
- <KEYWORD3>reinitialize-instance</KEYWORD3>
- <KEYWORD3>rem</KEYWORD3>
- <KEYWORD3>remf</KEYWORD3>
- <KEYWORD3>remhash</KEYWORD3>
- <KEYWORD3>remove</KEYWORD3>
- <KEYWORD3>remove-duplicates</KEYWORD3>
- <KEYWORD3>remove-if</KEYWORD3>
- <KEYWORD3>remove-if-not</KEYWORD3>
- <KEYWORD3>remove-method</KEYWORD3>
- <KEYWORD3>remprop</KEYWORD3>
- <KEYWORD3>rename-file</KEYWORD3>
- <KEYWORD3>rename-package</KEYWORD3>
- <KEYWORD3>replace</KEYWORD3>
- <KEYWORD3>rest</KEYWORD3>
- <KEYWORD3>restart</KEYWORD3>
- <KEYWORD3>revappend</KEYWORD3>
- <KEYWORD3>reverse</KEYWORD3>
- <KEYWORD3>room</KEYWORD3>
- <KEYWORD3>rotatef</KEYWORD3>
- <KEYWORD3>round</KEYWORD3>
- <KEYWORD3>row-major-aref</KEYWORD3>
- <KEYWORD3>rplaca</KEYWORD3>
- <KEYWORD3>rplacd</KEYWORD3>
- <KEYWORD3>safety</KEYWORD3>
- <KEYWORD3>satisfies</KEYWORD3>
- <KEYWORD3>sbit</KEYWORD3>
- <KEYWORD3>scale-float</KEYWORD3>
- <KEYWORD3>schar</KEYWORD3>
- <KEYWORD3>search</KEYWORD3>
- <KEYWORD3>second</KEYWORD3>
- <KEYWORD3>sequence</KEYWORD3>
- <KEYWORD3>serious-condition</KEYWORD3>
- <KEYWORD3>set</KEYWORD3>
- <KEYWORD3>set-difference</KEYWORD3>
- <KEYWORD3>set-dispatch-macro-character</KEYWORD3>
- <KEYWORD3>set-exclusive-or</KEYWORD3>
- <KEYWORD3>set-macro-character</KEYWORD3>
- <KEYWORD3>set-pprint-dispatch</KEYWORD3>
- <KEYWORD3>set-syntax-from-char</KEYWORD3>
- <KEYWORD3>setf</KEYWORD3>
- <KEYWORD3>setq</KEYWORD3>
- <KEYWORD3>seventh</KEYWORD3>
- <KEYWORD3>shadow</KEYWORD3>
- <KEYWORD3>shadowing-import</KEYWORD3>
- <KEYWORD3>shared-initialize</KEYWORD3>
- <KEYWORD3>shiftf</KEYWORD3>
- <KEYWORD3>short-float</KEYWORD3>
- <KEYWORD3>short-float-epsilon</KEYWORD3>
- <KEYWORD3>short-float-negative-epsilon</KEYWORD3>
- <KEYWORD3>short-site-name</KEYWORD3>
- <KEYWORD3>signed-byte</KEYWORD3>
- <KEYWORD3>signum</KEYWORD3>
- <KEYWORD3>simple-array</KEYWORD3>
- <KEYWORD3>simple-base-string</KEYWORD3>
- <KEYWORD3>simple-bit-vector</KEYWORD3>
- <KEYWORD3>simple-bit-vector-p</KEYWORD3>
- <KEYWORD3>simple-condition</KEYWORD3>
- <KEYWORD3>simple-condition-format-arguments</KEYWORD3>
- <KEYWORD3>simple-condition-format-control</KEYWORD3>
- <KEYWORD3>simple-error</KEYWORD3>
- <KEYWORD3>simple-string</KEYWORD3>
- <KEYWORD3>simple-string-p</KEYWORD3>
- <KEYWORD3>simple-type-error</KEYWORD3>
- <KEYWORD3>simple-vector</KEYWORD3>
- <KEYWORD3>simple-vector-p</KEYWORD3>
- <KEYWORD3>simple-warning</KEYWORD3>
- <KEYWORD3>sin</KEYWORD3>
- <KEYWORD3>single-float</KEYWORD3>
- <KEYWORD3>single-float-epsilon</KEYWORD3>
- <KEYWORD3>single-float-negative-epsilon</KEYWORD3>
- <KEYWORD3>sinh</KEYWORD3>
- <KEYWORD3>sixth</KEYWORD3>
- <KEYWORD3>sleep</KEYWORD3>
- <KEYWORD3>slot-boundp</KEYWORD3>
- <KEYWORD3>slot-exists-p</KEYWORD3>
- <KEYWORD3>slot-makunbound</KEYWORD3>
- <KEYWORD3>slot-missing</KEYWORD3>
- <KEYWORD3>slot-unbound</KEYWORD3>
- <KEYWORD3>slot-value</KEYWORD3>
- <KEYWORD3>software-type</KEYWORD3>
- <KEYWORD3>software-version</KEYWORD3>
- <KEYWORD3>some</KEYWORD3>
- <KEYWORD3>sort</KEYWORD3>
- <KEYWORD3>space</KEYWORD3>
- <KEYWORD3>special</KEYWORD3>
- <KEYWORD3>special-operator-p</KEYWORD3>
- <KEYWORD3>speed</KEYWORD3>
- <KEYWORD3>sqrt</KEYWORD3>
- <KEYWORD3>stable-sort</KEYWORD3>
- <KEYWORD3>standard</KEYWORD3>
- <KEYWORD3>standard-char</KEYWORD3>
- <KEYWORD3>standard-char-p</KEYWORD3>
- <KEYWORD3>standard-class</KEYWORD3>
- <KEYWORD3>standard-generic-function</KEYWORD3>
- <KEYWORD3>standard-method</KEYWORD3>
- <KEYWORD3>standard-object</KEYWORD3>
- <KEYWORD3>step</KEYWORD3>
- <KEYWORD3>storage-condition</KEYWORD3>
- <KEYWORD3>store-value</KEYWORD3>
- <KEYWORD3>stream</KEYWORD3>
- <KEYWORD3>stream-element-type</KEYWORD3>
- <KEYWORD3>stream-error</KEYWORD3>
- <KEYWORD3>stream-error-stream</KEYWORD3>
- <KEYWORD3>stream-external-format</KEYWORD3>
- <KEYWORD3>streamp</KEYWORD3>
- <KEYWORD3>string</KEYWORD3>
- <KEYWORD3>string-capitalize</KEYWORD3>
- <KEYWORD3>string-downcase</KEYWORD3>
- <KEYWORD3>string-equal</KEYWORD3>
- <KEYWORD3>string-greaterp</KEYWORD3>
- <KEYWORD3>string-left-trim</KEYWORD3>
- <KEYWORD3>string-lessp</KEYWORD3>
- <KEYWORD3>string-not-equal</KEYWORD3>
- <KEYWORD3>string-not-greaterp</KEYWORD3>
- <KEYWORD3>string-not-lessp</KEYWORD3>
- <KEYWORD3>string-right-trim</KEYWORD3>
- <KEYWORD3>string-stream</KEYWORD3>
- <KEYWORD3>string-trim</KEYWORD3>
- <KEYWORD3>string-upcase</KEYWORD3>
- <KEYWORD3>string/=</KEYWORD3>
- <KEYWORD3>string<</KEYWORD3>
- <KEYWORD3>string<=</KEYWORD3>
- <KEYWORD3>string=</KEYWORD3>
- <KEYWORD3>string></KEYWORD3>
- <KEYWORD3>string>=</KEYWORD3>
- <KEYWORD3>stringp</KEYWORD3>
- <KEYWORD3>structure</KEYWORD3>
- <KEYWORD3>structure-class</KEYWORD3>
- <KEYWORD3>structure-object</KEYWORD3>
- <KEYWORD3>style-warning</KEYWORD3>
- <KEYWORD3>sublis</KEYWORD3>
- <KEYWORD3>subseq</KEYWORD3>
- <KEYWORD3>subsetp</KEYWORD3>
- <KEYWORD3>subst</KEYWORD3>
- <KEYWORD3>subst-if</KEYWORD3>
- <KEYWORD3>subst-if-not</KEYWORD3>
- <KEYWORD3>substitute</KEYWORD3>
- <KEYWORD3>substitute-if</KEYWORD3>
- <KEYWORD3>substitute-if-not</KEYWORD3>
- <KEYWORD3>subtypep</KEYWORD3>
- <KEYWORD3>svref</KEYWORD3>
- <KEYWORD3>sxhash</KEYWORD3>
- <KEYWORD3>symbol</KEYWORD3>
- <KEYWORD3>symbol-function</KEYWORD3>
- <KEYWORD3>symbol-name</KEYWORD3>
- <KEYWORD3>symbol-package</KEYWORD3>
- <KEYWORD3>symbol-plist</KEYWORD3>
- <KEYWORD3>symbol-value</KEYWORD3>
- <KEYWORD3>symbolp</KEYWORD3>
- <KEYWORD3>synonym-stream</KEYWORD3>
- <KEYWORD3>synonym-stream-symbol</KEYWORD3>
- <KEYWORD3>tailp</KEYWORD3>
- <KEYWORD3>tan</KEYWORD3>
- <KEYWORD3>tanh</KEYWORD3>
- <KEYWORD3>tenth</KEYWORD3>
- <KEYWORD3>terpri</KEYWORD3>
- <KEYWORD3>third</KEYWORD3>
- <KEYWORD3>time</KEYWORD3>
- <KEYWORD3>trace</KEYWORD3>
- <KEYWORD3>translate-logical-pathname</KEYWORD3>
- <KEYWORD3>translate-pathname</KEYWORD3>
- <KEYWORD3>tree-equal</KEYWORD3>
- <KEYWORD3>truename</KEYWORD3>
- <KEYWORD3>truncate</KEYWORD3>
- <KEYWORD3>two-way-stream</KEYWORD3>
- <KEYWORD3>two-way-stream-input-stream</KEYWORD3>
- <KEYWORD3>two-way-stream-output-stream</KEYWORD3>
- <KEYWORD3>type-error-datum</KEYWORD3>
- <KEYWORD3>type-error-expected-type</KEYWORD3>
- <KEYWORD3>type-error</KEYWORD3>
- <KEYWORD3>type-of</KEYWORD3>
- <KEYWORD3>typep</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>unbound-slot-instance</KEYWORD3>
- <KEYWORD3>unbound-slot</KEYWORD3>
- <KEYWORD3>unbound-variable</KEYWORD3>
- <KEYWORD3>undefined-function</KEYWORD3>
- <KEYWORD3>unexport</KEYWORD3>
- <KEYWORD3>unintern</KEYWORD3>
- <KEYWORD3>union</KEYWORD3>
- <KEYWORD3>unread-char</KEYWORD3>
- <KEYWORD3>unsigned-byte</KEYWORD3>
- <KEYWORD3>untrace</KEYWORD3>
- <KEYWORD3>unuse-package</KEYWORD3>
- <KEYWORD3>update-instance-for-different-class</KEYWORD3>
- <KEYWORD3>update-instance-for-redefined-class</KEYWORD3>
- <KEYWORD3>upgraded-array-element-type</KEYWORD3>
- <KEYWORD3>upgraded-complex-part-type</KEYWORD3>
- <KEYWORD3>upper-case-p</KEYWORD3>
- <KEYWORD3>use-package</KEYWORD3>
- <KEYWORD3>use-value</KEYWORD3>
- <KEYWORD3>user-homedir-pathname</KEYWORD3>
- <KEYWORD3>values</KEYWORD3>
- <KEYWORD3>values-list</KEYWORD3>
- <KEYWORD3>variable</KEYWORD3>
- <KEYWORD3>vector</KEYWORD3>
- <KEYWORD3>vector-pop</KEYWORD3>
- <KEYWORD3>vector-push</KEYWORD3>
- <KEYWORD3>vector-push-extend</KEYWORD3>
- <KEYWORD3>vectorp</KEYWORD3>
- <KEYWORD3>warn</KEYWORD3>
- <KEYWORD3>warning</KEYWORD3>
- <KEYWORD3>wild-pathname-p</KEYWORD3>
- <KEYWORD3>write</KEYWORD3>
- <KEYWORD3>write-byte</KEYWORD3>
- <KEYWORD3>write-char</KEYWORD3>
- <KEYWORD3>write-line</KEYWORD3>
- <KEYWORD3>write-sequence</KEYWORD3>
- <KEYWORD3>write-string</KEYWORD3>
- <KEYWORD3>write-to-string</KEYWORD3>
- <KEYWORD3>y-or-n-p</KEYWORD3>
- <KEYWORD3>yes-or-no-p</KEYWORD3>
- <KEYWORD3>zerop</KEYWORD3>
-
- <LITERAL2>t</LITERAL2>
- <LITERAL2>nil</LITERAL2>
- </KEYWORDS>
-
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="#| " />
+ <PROPERTY NAME="commentEnd" VALUE=" |#" />
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ <PROPERTY NAME="noWordSep" VALUE="_-+?:" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="multipleBracketIndent" VALUE="true" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ NO_WORD_SEP="_-+?:"
+ DIGIT_RE="-?\d+([./]\d+)?"
+ >
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>#|</BEGIN>
+ <END>|#</END>
+ </SPAN>
+
+ <SEQ TYPE="NULL">'(</SEQ>
+
+ <MARK_FOLLOWING TYPE="LITERAL1">'</MARK_FOLLOWING>
+
+ <MARK_FOLLOWING AT_WORD_START="TRUE" TYPE="KEYWORD4">&</MARK_FOLLOWING>
+
+ <SEQ TYPE="OPERATOR">`</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <!--
+ Based on convention discussed here:
+ http://www.gigamonkeys.com/book/syntax-and-semantics.html
+ -->
+ <EOL_SPAN TYPE="COMMENT4">;;;;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT3">;;;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">;;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!--
+ keywords from j
+ (http://armedbear-j.sourceforge.net/)
+ Duplicates removed; KEYWORD1 and KEYWORD2
+ better aligned with Emacs Lisp mode
+ Missing Common Lisp symbols added; now 970 symbols total
+ 2004-01-22 dsh
+ -->
+ <KEYWORDS>
+ <KEYWORD1>defclass</KEYWORD1>
+ <KEYWORD1>defconstant</KEYWORD1>
+ <KEYWORD1>defgeneric</KEYWORD1>
+ <KEYWORD1>define-compiler-macro</KEYWORD1>
+ <KEYWORD1>define-condition</KEYWORD1>
+ <KEYWORD1>define-method-combination</KEYWORD1>
+ <KEYWORD1>define-modify-macro</KEYWORD1>
+ <KEYWORD1>define-setf-expander</KEYWORD1>
+ <KEYWORD1>define-symbol-macro</KEYWORD1>
+ <KEYWORD1>defmacro</KEYWORD1>
+ <KEYWORD1>defmethod</KEYWORD1>
+ <KEYWORD1>defpackage</KEYWORD1>
+ <KEYWORD1>defparameter</KEYWORD1>
+ <KEYWORD1>defsetf</KEYWORD1>
+ <KEYWORD1>defstruct</KEYWORD1>
+ <KEYWORD1>deftype</KEYWORD1>
+ <KEYWORD1>defun</KEYWORD1>
+ <KEYWORD1>defvar</KEYWORD1>
+
+ <KEYWORD2>abort</KEYWORD2>
+ <KEYWORD2>assert</KEYWORD2>
+ <KEYWORD2>block</KEYWORD2>
+ <KEYWORD2>break</KEYWORD2>
+ <KEYWORD2>case</KEYWORD2>
+ <KEYWORD2>catch</KEYWORD2>
+ <KEYWORD2>ccase</KEYWORD2>
+ <KEYWORD2>cerror</KEYWORD2>
+ <KEYWORD2>cond</KEYWORD2>
+ <KEYWORD2>ctypecase</KEYWORD2>
+ <KEYWORD2>declaim</KEYWORD2>
+ <KEYWORD2>declare</KEYWORD2>
+ <KEYWORD2>do</KEYWORD2>
+ <KEYWORD2>do*</KEYWORD2>
+ <KEYWORD2>do-all-symbols</KEYWORD2>
+ <KEYWORD2>do-external-symbols</KEYWORD2>
+ <KEYWORD2>do-symbols</KEYWORD2>
+ <KEYWORD2>dolist</KEYWORD2>
+ <KEYWORD2>dotimes</KEYWORD2>
+ <KEYWORD2>ecase</KEYWORD2>
+ <KEYWORD2>error</KEYWORD2>
+ <KEYWORD2>etypecase</KEYWORD2>
+ <KEYWORD2>eval-when</KEYWORD2>
+ <KEYWORD2>flet</KEYWORD2>
+ <KEYWORD2>handler-bind</KEYWORD2>
+ <KEYWORD2>handler-case</KEYWORD2>
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>ignore-errors</KEYWORD2>
+ <KEYWORD2>in-package</KEYWORD2>
+ <KEYWORD2>labels</KEYWORD2>
+ <KEYWORD2>lambda</KEYWORD2>
+ <KEYWORD2>let</KEYWORD2>
+ <KEYWORD2>let*</KEYWORD2>
+ <KEYWORD2>locally</KEYWORD2>
+ <KEYWORD2>loop</KEYWORD2>
+ <KEYWORD2>macrolet</KEYWORD2>
+ <KEYWORD2>multiple-value-bind</KEYWORD2>
+ <KEYWORD2>proclaim</KEYWORD2>
+ <KEYWORD2>prog</KEYWORD2>
+ <KEYWORD2>prog*</KEYWORD2>
+ <KEYWORD2>prog1</KEYWORD2>
+ <KEYWORD2>prog2</KEYWORD2>
+ <KEYWORD2>progn</KEYWORD2>
+ <KEYWORD2>progv</KEYWORD2>
+ <KEYWORD2>provide</KEYWORD2>
+ <KEYWORD2>require</KEYWORD2>
+ <KEYWORD2>restart-bind</KEYWORD2>
+ <KEYWORD2>restart-case</KEYWORD2>
+ <KEYWORD2>restart-name</KEYWORD2>
+ <KEYWORD2>return</KEYWORD2>
+ <KEYWORD2>return-from</KEYWORD2>
+ <KEYWORD2>signal</KEYWORD2>
+ <KEYWORD2>symbol-macrolet</KEYWORD2>
+ <KEYWORD2>tagbody</KEYWORD2>
+ <KEYWORD2>the</KEYWORD2>
+ <KEYWORD2>throw</KEYWORD2>
+ <KEYWORD2>typecase</KEYWORD2>
+ <KEYWORD2>unless</KEYWORD2>
+ <KEYWORD2>unwind-protect</KEYWORD2>
+ <KEYWORD2>when</KEYWORD2>
+ <KEYWORD2>with-accessors</KEYWORD2>
+ <KEYWORD2>with-compilation-unit</KEYWORD2>
+ <KEYWORD2>with-condition-restarts</KEYWORD2>
+ <KEYWORD2>with-hash-table-iterator</KEYWORD2>
+ <KEYWORD2>with-input-from-string</KEYWORD2>
+ <KEYWORD2>with-open-file</KEYWORD2>
+ <KEYWORD2>with-open-stream</KEYWORD2>
+ <KEYWORD2>with-output-to-string</KEYWORD2>
+ <KEYWORD2>with-package-iterator</KEYWORD2>
+ <KEYWORD2>with-simple-restart</KEYWORD2>
+ <KEYWORD2>with-slots</KEYWORD2>
+ <KEYWORD2>with-standard-io-syntax</KEYWORD2>
+
+ <KEYWORD3>*</KEYWORD3>
+ <KEYWORD3>**</KEYWORD3>
+ <KEYWORD3>***</KEYWORD3>
+ <KEYWORD3>*break-on-signals*</KEYWORD3>
+ <KEYWORD3>*compile-file-pathname*</KEYWORD3>
+ <KEYWORD3>*compile-file-truename*</KEYWORD3>
+ <KEYWORD3>*compile-print*</KEYWORD3>
+ <KEYWORD3>*compile-verbose*</KEYWORD3>
+ <KEYWORD3>*debug-io*</KEYWORD3>
+ <KEYWORD3>*debugger-hook*</KEYWORD3>
+ <KEYWORD3>*default-pathname-defaults*</KEYWORD3>
+ <KEYWORD3>*error-output*</KEYWORD3>
+ <KEYWORD3>*features*</KEYWORD3>
+ <KEYWORD3>*gensym-counter*</KEYWORD3>
+ <KEYWORD3>*load-pathname*</KEYWORD3>
+ <KEYWORD3>*load-print*</KEYWORD3>
+ <KEYWORD3>*load-truename*</KEYWORD3>
+ <KEYWORD3>*load-verbose*</KEYWORD3>
+ <KEYWORD3>*macroexpand-hook*</KEYWORD3>
+ <KEYWORD3>*modules*</KEYWORD3>
+ <KEYWORD3>*package*</KEYWORD3>
+ <KEYWORD3>*print-array*</KEYWORD3>
+ <KEYWORD3>*print-base*</KEYWORD3>
+ <KEYWORD3>*print-case*</KEYWORD3>
+ <KEYWORD3>*print-circle*</KEYWORD3>
+ <KEYWORD3>*print-escape*</KEYWORD3>
+ <KEYWORD3>*print-gensym*</KEYWORD3>
+ <KEYWORD3>*print-length*</KEYWORD3>
+ <KEYWORD3>*print-level*</KEYWORD3>
+ <KEYWORD3>*print-lines*</KEYWORD3>
+ <KEYWORD3>*print-miser-width*</KEYWORD3>
+ <KEYWORD3>*print-pprint-dispatch*</KEYWORD3>
+ <KEYWORD3>*print-pretty*</KEYWORD3>
+ <KEYWORD3>*print-radix*</KEYWORD3>
+ <KEYWORD3>*print-readably*</KEYWORD3>
+ <KEYWORD3>*print-right-margin*</KEYWORD3>
+ <KEYWORD3>*query-io*</KEYWORD3>
+ <KEYWORD3>*random-state*</KEYWORD3>
+ <KEYWORD3>*read-base*</KEYWORD3>
+ <KEYWORD3>*read-default-float-format*</KEYWORD3>
+ <KEYWORD3>*read-eval*</KEYWORD3>
+ <KEYWORD3>*read-suppress*</KEYWORD3>
+ <KEYWORD3>*readtable*</KEYWORD3>
+ <KEYWORD3>*standard-input*</KEYWORD3>
+ <KEYWORD3>*standard-output*</KEYWORD3>
+ <KEYWORD3>*terminal-io*</KEYWORD3>
+ <KEYWORD3>*trace-output*</KEYWORD3>
+ <KEYWORD3>+</KEYWORD3>
+ <KEYWORD3>++</KEYWORD3>
+ <KEYWORD3>+++</KEYWORD3>
+ <KEYWORD3>-</KEYWORD3>
+ <KEYWORD3>/</KEYWORD3>
+ <KEYWORD3>//</KEYWORD3>
+ <KEYWORD3>///</KEYWORD3>
+ <KEYWORD3>/=</KEYWORD3>
+ <KEYWORD3>1+</KEYWORD3>
+ <KEYWORD3>1-</KEYWORD3>
+ <KEYWORD3><</KEYWORD3>
+ <KEYWORD3><=</KEYWORD3>
+ <KEYWORD3>=</KEYWORD3>
+ <KEYWORD3>></KEYWORD3>
+ <KEYWORD3>>=</KEYWORD3>
+ <KEYWORD3>abs</KEYWORD3>
+ <KEYWORD3>acons</KEYWORD3>
+ <KEYWORD3>acos</KEYWORD3>
+ <KEYWORD3>acosh</KEYWORD3>
+ <KEYWORD3>add-method</KEYWORD3>
+ <KEYWORD3>adjoin</KEYWORD3>
+ <KEYWORD3>adjust-array</KEYWORD3>
+ <KEYWORD3>adjustable-array-p</KEYWORD3>
+ <KEYWORD3>allocate-instance</KEYWORD3>
+ <KEYWORD3>alpha-char-p</KEYWORD3>
+ <KEYWORD3>alphanumericp</KEYWORD3>
+ <KEYWORD3>and</KEYWORD3>
+ <KEYWORD3>append</KEYWORD3>
+ <KEYWORD3>apply</KEYWORD3>
+ <KEYWORD3>apropos</KEYWORD3>
+ <KEYWORD3>apropos-list</KEYWORD3>
+ <KEYWORD3>aref</KEYWORD3>
+ <KEYWORD3>arithmetic-error</KEYWORD3>
+ <KEYWORD3>arithmetic-error-operands</KEYWORD3>
+ <KEYWORD3>arithmetic-error-operation</KEYWORD3>
+ <KEYWORD3>array</KEYWORD3>
+ <KEYWORD3>array-dimension</KEYWORD3>
+ <KEYWORD3>array-dimension-limit</KEYWORD3>
+ <KEYWORD3>array-dimensions</KEYWORD3>
+ <KEYWORD3>array-displacement</KEYWORD3>
+ <KEYWORD3>array-element-type</KEYWORD3>
+ <KEYWORD3>array-has-fill-pointer-p</KEYWORD3>
+ <KEYWORD3>array-in-bounds-p</KEYWORD3>
+ <KEYWORD3>array-rank</KEYWORD3>
+ <KEYWORD3>array-rank-limit</KEYWORD3>
+ <KEYWORD3>array-row-major-index</KEYWORD3>
+ <KEYWORD3>array-total-size</KEYWORD3>
+ <KEYWORD3>array-total-size-limit</KEYWORD3>
+ <KEYWORD3>arrayp</KEYWORD3>
+ <KEYWORD3>ash</KEYWORD3>
+ <KEYWORD3>asin</KEYWORD3>
+ <KEYWORD3>asinh</KEYWORD3>
+ <KEYWORD3>assoc</KEYWORD3>
+ <KEYWORD3>assoc-if</KEYWORD3>
+ <KEYWORD3>assoc-if-not</KEYWORD3>
+ <KEYWORD3>atan</KEYWORD3>
+ <KEYWORD3>atanh</KEYWORD3>
+ <KEYWORD3>atom</KEYWORD3>
+ <KEYWORD3>base-char</KEYWORD3>
+ <KEYWORD3>base-string</KEYWORD3>
+ <KEYWORD3>bignum</KEYWORD3>
+ <KEYWORD3>bit</KEYWORD3>
+ <KEYWORD3>bit-and</KEYWORD3>
+ <KEYWORD3>bit-andc1</KEYWORD3>
+ <KEYWORD3>bit-andc2</KEYWORD3>
+ <KEYWORD3>bit-eqv</KEYWORD3>
+ <KEYWORD3>bit-ior</KEYWORD3>
+ <KEYWORD3>bit-nand</KEYWORD3>
+ <KEYWORD3>bit-nor</KEYWORD3>
+ <KEYWORD3>bit-not</KEYWORD3>
+ <KEYWORD3>bit-orc1</KEYWORD3>
+ <KEYWORD3>bit-orc2</KEYWORD3>
+ <KEYWORD3>bit-vector</KEYWORD3>
+ <KEYWORD3>bit-vector-p</KEYWORD3>
+ <KEYWORD3>bit-xor</KEYWORD3>
+ <KEYWORD3>boole</KEYWORD3>
+ <KEYWORD3>boole-1</KEYWORD3>
+ <KEYWORD3>boole-2</KEYWORD3>
+ <KEYWORD3>boole-and</KEYWORD3>
+ <KEYWORD3>boole-andc1</KEYWORD3>
+ <KEYWORD3>boole-andc2</KEYWORD3>
+ <KEYWORD3>boole-c1</KEYWORD3>
+ <KEYWORD3>boole-c2</KEYWORD3>
+ <KEYWORD3>boole-clr</KEYWORD3>
+ <KEYWORD3>boole-eqv</KEYWORD3>
+ <KEYWORD3>boole-ior</KEYWORD3>
+ <KEYWORD3>boole-nand</KEYWORD3>
+ <KEYWORD3>boole-nor</KEYWORD3>
+ <KEYWORD3>boole-orc1</KEYWORD3>
+ <KEYWORD3>boole-orc2</KEYWORD3>
+ <KEYWORD3>boole-set</KEYWORD3>
+ <KEYWORD3>boole-xor</KEYWORD3>
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD3>both-case-p</KEYWORD3>
+ <KEYWORD3>boundp</KEYWORD3>
+ <KEYWORD3>broadcast-stream</KEYWORD3>
+ <KEYWORD3>broadcast-stream-streams</KEYWORD3>
+ <KEYWORD3>built-in-class</KEYWORD3>
+ <KEYWORD3>butlast</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>byte-position</KEYWORD3>
+ <KEYWORD3>byte-size</KEYWORD3>
+ <KEYWORD3>caaaar</KEYWORD3>
+ <KEYWORD3>caaadr</KEYWORD3>
+ <KEYWORD3>caaar</KEYWORD3>
+ <KEYWORD3>caadar</KEYWORD3>
+ <KEYWORD3>caaddr</KEYWORD3>
+ <KEYWORD3>caadr</KEYWORD3>
+ <KEYWORD3>caar</KEYWORD3>
+ <KEYWORD3>cadaar</KEYWORD3>
+ <KEYWORD3>cadadr</KEYWORD3>
+ <KEYWORD3>cadar</KEYWORD3>
+ <KEYWORD3>caddar</KEYWORD3>
+ <KEYWORD3>cadddr</KEYWORD3>
+ <KEYWORD3>caddr</KEYWORD3>
+ <KEYWORD3>cadr</KEYWORD3>
+ <KEYWORD3>call-arguments-limit</KEYWORD3>
+ <KEYWORD3>call-method</KEYWORD3>
+ <KEYWORD3>call-next-method</KEYWORD3>
+ <KEYWORD3>car</KEYWORD3>
+ <KEYWORD3>cdaaar</KEYWORD3>
+ <KEYWORD3>cdaadr</KEYWORD3>
+ <KEYWORD3>cdaar</KEYWORD3>
+ <KEYWORD3>cdadar</KEYWORD3>
+ <KEYWORD3>cdaddr</KEYWORD3>
+ <KEYWORD3>cdadr</KEYWORD3>
+ <KEYWORD3>cdar</KEYWORD3>
+ <KEYWORD3>cddaar</KEYWORD3>
+ <KEYWORD3>cddadr</KEYWORD3>
+ <KEYWORD3>cddar</KEYWORD3>
+ <KEYWORD3>cdddar</KEYWORD3>
+ <KEYWORD3>cddddr</KEYWORD3>
+ <KEYWORD3>cdddr</KEYWORD3>
+ <KEYWORD3>cddr</KEYWORD3>
+ <KEYWORD3>cdr</KEYWORD3>
+ <KEYWORD3>ceiling</KEYWORD3>
+ <KEYWORD3>cell-error</KEYWORD3>
+ <KEYWORD3>cell-error-name</KEYWORD3>
+ <KEYWORD3>change-class</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>char-code</KEYWORD3>
+ <KEYWORD3>char-code-limit</KEYWORD3>
+ <KEYWORD3>char-downcase</KEYWORD3>
+ <KEYWORD3>char-equal</KEYWORD3>
+ <KEYWORD3>char-greaterp</KEYWORD3>
+ <KEYWORD3>char-int</KEYWORD3>
+ <KEYWORD3>char-lessp</KEYWORD3>
+ <KEYWORD3>char-name</KEYWORD3>
+ <KEYWORD3>char-not-equal</KEYWORD3>
+ <KEYWORD3>char-not-greaterp</KEYWORD3>
+ <KEYWORD3>char-not-lessp</KEYWORD3>
+ <KEYWORD3>char-upcase</KEYWORD3>
+ <KEYWORD3>char/=</KEYWORD3>
+ <KEYWORD3>char></KEYWORD3>
+ <KEYWORD3>char>=</KEYWORD3>
+ <KEYWORD3>char<</KEYWORD3>
+ <KEYWORD3>char<=</KEYWORD3>
+ <KEYWORD3>char=</KEYWORD3>
+ <KEYWORD3>character</KEYWORD3>
+ <KEYWORD3>characterp</KEYWORD3>
+ <KEYWORD3>check-type</KEYWORD3>
+ <KEYWORD3>cis</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>class-name</KEYWORD3>
+ <KEYWORD3>class-of</KEYWORD3>
+ <KEYWORD3>clear-input</KEYWORD3>
+ <KEYWORD3>clear-output</KEYWORD3>
+ <KEYWORD3>close</KEYWORD3>
+ <KEYWORD3>clrhash</KEYWORD3>
+ <KEYWORD3>code-char</KEYWORD3>
+ <KEYWORD3>coerce</KEYWORD3>
+ <KEYWORD3>compilation-speed</KEYWORD3>
+ <KEYWORD3>compile</KEYWORD3>
+ <KEYWORD3>compile-file</KEYWORD3>
+ <KEYWORD3>compile-file-pathname</KEYWORD3>
+ <KEYWORD3>compiled-function</KEYWORD3>
+ <KEYWORD3>compiled-function-p</KEYWORD3>
+ <KEYWORD3>compiler-macro</KEYWORD3>
+ <KEYWORD3>compiler-macro-function</KEYWORD3>
+ <KEYWORD3>complement</KEYWORD3>
+ <KEYWORD3>complex</KEYWORD3>
+ <KEYWORD3>complexp</KEYWORD3>
+ <KEYWORD3>compute-applicable-methods</KEYWORD3>
+ <KEYWORD3>compute-restarts</KEYWORD3>
+ <KEYWORD3>concatenate</KEYWORD3>
+ <KEYWORD3>concatenated-stream</KEYWORD3>
+ <KEYWORD3>concatenated-stream-streams</KEYWORD3>
+ <KEYWORD3>condition</KEYWORD3>
+ <KEYWORD3>conjugate</KEYWORD3>
+ <KEYWORD3>cons</KEYWORD3>
+ <KEYWORD3>consp</KEYWORD3>
+ <KEYWORD3>constantly</KEYWORD3>
+ <KEYWORD3>constantp</KEYWORD3>
+ <KEYWORD3>continue</KEYWORD3>
+ <KEYWORD3>control-error</KEYWORD3>
+ <KEYWORD3>copy-alist</KEYWORD3>
+ <KEYWORD3>copy-list</KEYWORD3>
+ <KEYWORD3>copy-pprint-dispatch</KEYWORD3>
+ <KEYWORD3>copy-readtable</KEYWORD3>
+ <KEYWORD3>copy-seq</KEYWORD3>
+ <KEYWORD3>copy-structure</KEYWORD3>
+ <KEYWORD3>copy-symbol</KEYWORD3>
+ <KEYWORD3>copy-tree</KEYWORD3>
+ <KEYWORD3>cos</KEYWORD3>
+ <KEYWORD3>cosh</KEYWORD3>
+ <KEYWORD3>count</KEYWORD3>
+ <KEYWORD3>count-if</KEYWORD3>
+ <KEYWORD3>count-if-not</KEYWORD3>
+ <KEYWORD3>debug</KEYWORD3>
+ <KEYWORD3>decf</KEYWORD3>
+ <KEYWORD3>declaration</KEYWORD3>
+ <KEYWORD3>decode-float</KEYWORD3>
+ <KEYWORD3>decode-universal-time</KEYWORD3>
+ <KEYWORD3>delete</KEYWORD3>
+ <KEYWORD3>delete-duplicates</KEYWORD3>
+ <KEYWORD3>delete-file</KEYWORD3>
+ <KEYWORD3>delete-if</KEYWORD3>
+ <KEYWORD3>delete-if-not</KEYWORD3>
+ <KEYWORD3>delete-package</KEYWORD3>
+ <KEYWORD3>denominator</KEYWORD3>
+ <KEYWORD3>deposit-field</KEYWORD3>
+ <KEYWORD3>describe</KEYWORD3>
+ <KEYWORD3>describe-object</KEYWORD3>
+ <KEYWORD3>destructuring-bind</KEYWORD3>
+ <KEYWORD3>digit-char</KEYWORD3>
+ <KEYWORD3>digit-char-p</KEYWORD3>
+ <KEYWORD3>directory</KEYWORD3>
+ <KEYWORD3>directory-namestring</KEYWORD3>
+ <KEYWORD3>disassemble</KEYWORD3>
+ <KEYWORD3>division-by-zero</KEYWORD3>
+ <KEYWORD3>documentation</KEYWORD3>
+ <KEYWORD3>double-float</KEYWORD3>
+ <KEYWORD3>double-float-epsilon</KEYWORD3>
+ <KEYWORD3>double-float-negative-epsilon</KEYWORD3>
+ <KEYWORD3>dpb</KEYWORD3>
+ <KEYWORD3>dribble</KEYWORD3>
+ <KEYWORD3>dynamic-extent</KEYWORD3>
+ <KEYWORD3>echo-stream</KEYWORD3>
+ <KEYWORD3>echo-stream-input-stream</KEYWORD3>
+ <KEYWORD3>echo-stream-output-stream</KEYWORD3>
+ <KEYWORD3>ed</KEYWORD3>
+ <KEYWORD3>eighth</KEYWORD3>
+ <KEYWORD3>elt</KEYWORD3>
+ <KEYWORD3>encode-universal-time</KEYWORD3>
+ <KEYWORD3>end-of-file</KEYWORD3>
+ <KEYWORD3>endp</KEYWORD3>
+ <KEYWORD3>enough-namestring</KEYWORD3>
+ <KEYWORD3>ensure-directories-exist</KEYWORD3>
+ <KEYWORD3>ensure-generic-function</KEYWORD3>
+ <KEYWORD3>eq</KEYWORD3>
+ <KEYWORD3>eql</KEYWORD3>
+ <KEYWORD3>equal</KEYWORD3>
+ <KEYWORD3>equalp</KEYWORD3>
+ <KEYWORD3>eval</KEYWORD3>
+ <KEYWORD3>evenp</KEYWORD3>
+ <KEYWORD3>every</KEYWORD3>
+ <KEYWORD3>exp</KEYWORD3>
+ <KEYWORD3>export</KEYWORD3>
+ <KEYWORD3>expt</KEYWORD3>
+ <KEYWORD3>extended-char</KEYWORD3>
+ <KEYWORD3>fboundp</KEYWORD3>
+ <KEYWORD3>fceiling</KEYWORD3>
+ <KEYWORD3>fdefinition</KEYWORD3>
+ <KEYWORD3>ffloor</KEYWORD3>
+ <KEYWORD3>fifth</KEYWORD3>
+ <KEYWORD3>file-author</KEYWORD3>
+ <KEYWORD3>file-error</KEYWORD3>
+ <KEYWORD3>file-error-pathname</KEYWORD3>
+ <KEYWORD3>file-length</KEYWORD3>
+ <KEYWORD3>file-namestring</KEYWORD3>
+ <KEYWORD3>file-position</KEYWORD3>
+ <KEYWORD3>file-stream</KEYWORD3>
+ <KEYWORD3>file-string-length</KEYWORD3>
+ <KEYWORD3>file-write-date</KEYWORD3>
+ <KEYWORD3>fill</KEYWORD3>
+ <KEYWORD3>fill-pointer</KEYWORD3>
+ <KEYWORD3>find</KEYWORD3>
+ <KEYWORD3>find-all-symbols</KEYWORD3>
+ <KEYWORD3>find-class</KEYWORD3>
+ <KEYWORD3>find-if</KEYWORD3>
+ <KEYWORD3>find-if-not</KEYWORD3>
+ <KEYWORD3>find-method</KEYWORD3>
+ <KEYWORD3>find-package</KEYWORD3>
+ <KEYWORD3>find-restart</KEYWORD3>
+ <KEYWORD3>find-symbol</KEYWORD3>
+ <KEYWORD3>finish-output</KEYWORD3>
+ <KEYWORD3>first</KEYWORD3>
+ <KEYWORD3>fixnum</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>float-digits</KEYWORD3>
+ <KEYWORD3>float-precision</KEYWORD3>
+ <KEYWORD3>float-radix</KEYWORD3>
+ <KEYWORD3>float-sign</KEYWORD3>
+ <KEYWORD3>floating-point-inexact</KEYWORD3>
+ <KEYWORD3>floating-point-invalid-operation</KEYWORD3>
+ <KEYWORD3>floating-point-overflow</KEYWORD3>
+ <KEYWORD3>floating-point-underflow</KEYWORD3>
+ <KEYWORD3>floatp</KEYWORD3>
+ <KEYWORD3>floor</KEYWORD3>
+ <KEYWORD3>fmakunbound</KEYWORD3>
+ <KEYWORD3>force-output</KEYWORD3>
+ <KEYWORD3>format</KEYWORD3>
+ <KEYWORD3>formatter</KEYWORD3>
+ <KEYWORD3>fourth</KEYWORD3>
+ <KEYWORD3>fresh-line</KEYWORD3>
+ <KEYWORD3>fround</KEYWORD3>
+ <KEYWORD3>ftruncate</KEYWORD3>
+ <KEYWORD3>ftype</KEYWORD3>
+ <KEYWORD3>funcall</KEYWORD3>
+ <KEYWORD3>function</KEYWORD3>
+ <KEYWORD3>function-keywords</KEYWORD3>
+ <KEYWORD3>function-lambda-expression</KEYWORD3>
+ <KEYWORD3>functionp</KEYWORD3>
+ <KEYWORD3>gcd</KEYWORD3>
+ <KEYWORD3>generic-function</KEYWORD3>
+ <KEYWORD3>gensym</KEYWORD3>
+ <KEYWORD3>gentemp</KEYWORD3>
+ <KEYWORD3>get</KEYWORD3>
+ <KEYWORD3>get-decoded-time</KEYWORD3>
+ <KEYWORD3>get-dispatch-macro-character</KEYWORD3>
+ <KEYWORD3>get-internal-real-time</KEYWORD3>
+ <KEYWORD3>get-internal-run-time</KEYWORD3>
+ <KEYWORD3>get-macro-character</KEYWORD3>
+ <KEYWORD3>get-output-stream-string</KEYWORD3>
+ <KEYWORD3>get-properties</KEYWORD3>
+ <KEYWORD3>get-setf-expansion</KEYWORD3>
+ <KEYWORD3>get-universal-time</KEYWORD3>
+ <KEYWORD3>getf</KEYWORD3>
+ <KEYWORD3>gethash</KEYWORD3>
+ <KEYWORD3>go</KEYWORD3>
+ <KEYWORD3>graphic-char-p</KEYWORD3>
+ <KEYWORD3>hash-table</KEYWORD3>
+ <KEYWORD3>hash-table-count</KEYWORD3>
+ <KEYWORD3>hash-table-p</KEYWORD3>
+ <KEYWORD3>hash-table-rehash-size</KEYWORD3>
+ <KEYWORD3>hash-table-rehash-threshold</KEYWORD3>
+ <KEYWORD3>hash-table-size</KEYWORD3>
+ <KEYWORD3>hash-table-test</KEYWORD3>
+ <KEYWORD3>host-namestring</KEYWORD3>
+ <KEYWORD3>identity</KEYWORD3>
+ <KEYWORD3>ignorable</KEYWORD3>
+ <KEYWORD3>ignore</KEYWORD3>
+ <KEYWORD3>imagpart</KEYWORD3>
+ <KEYWORD3>import</KEYWORD3>
+ <KEYWORD3>incf</KEYWORD3>
+ <KEYWORD3>initialize-instance</KEYWORD3>
+ <KEYWORD3>inline</KEYWORD3>
+ <KEYWORD3>input-stream-p</KEYWORD3>
+ <KEYWORD3>inspect</KEYWORD3>
+ <KEYWORD3>integer</KEYWORD3>
+ <KEYWORD3>integer-decode-float</KEYWORD3>
+ <KEYWORD3>integer-length</KEYWORD3>
+ <KEYWORD3>integerp</KEYWORD3>
+ <KEYWORD3>interactive-stream-p</KEYWORD3>
+ <KEYWORD3>intern</KEYWORD3>
+ <KEYWORD3>internal-time-units-per-second</KEYWORD3>
+ <KEYWORD3>intersection</KEYWORD3>
+ <KEYWORD3>invalid-method-error</KEYWORD3>
+ <KEYWORD3>invoke-debugger</KEYWORD3>
+ <KEYWORD3>invoke-restart</KEYWORD3>
+ <KEYWORD3>invoke-restart-interactively</KEYWORD3>
+ <KEYWORD3>isqrt</KEYWORD3>
+ <KEYWORD3>keyword</KEYWORD3>
+ <KEYWORD3>keywordp</KEYWORD3>
+ <KEYWORD3>lambda-list-keywords</KEYWORD3>
+ <KEYWORD3>lambda-parameters-limit</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>lcm</KEYWORD3>
+ <KEYWORD3>ldb</KEYWORD3>
+ <KEYWORD3>ldb-test</KEYWORD3>
+ <KEYWORD3>ldiff</KEYWORD3>
+ <KEYWORD3>least-negative-double-float</KEYWORD3>
+ <KEYWORD3>least-negative-long-float</KEYWORD3>
+ <KEYWORD3>least-negative-normalized-double-float</KEYWORD3>
+ <KEYWORD3>least-negative-normalized-long-float</KEYWORD3>
+ <KEYWORD3>least-negative-normalized-short-float</KEYWORD3>
+ <KEYWORD3>least-negative-normalized-single-float</KEYWORD3>
+ <KEYWORD3>least-negative-short-float</KEYWORD3>
+ <KEYWORD3>least-negative-single-float</KEYWORD3>
+ <KEYWORD3>least-positive-double-float</KEYWORD3>
+ <KEYWORD3>least-positive-long-float</KEYWORD3>
+ <KEYWORD3>least-positive-normalized-double-float</KEYWORD3>
+ <KEYWORD3>least-positive-normalized-long-float</KEYWORD3>
+ <KEYWORD3>least-positive-normalized-short-float</KEYWORD3>
+ <KEYWORD3>least-positive-normalized-single-float</KEYWORD3>
+ <KEYWORD3>least-positive-short-float</KEYWORD3>
+ <KEYWORD3>least-positive-single-float</KEYWORD3>
+ <KEYWORD3>length</KEYWORD3>
+ <KEYWORD3>lisp-implementation-type</KEYWORD3>
+ <KEYWORD3>lisp-implementation-version</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>list*</KEYWORD3>
+ <KEYWORD3>list-all-packages</KEYWORD3>
+ <KEYWORD3>list-length</KEYWORD3>
+ <KEYWORD3>listen</KEYWORD3>
+ <KEYWORD3>listp</KEYWORD3>
+ <KEYWORD3>load</KEYWORD3>
+ <KEYWORD3>load-logical-pathname-translations</KEYWORD3>
+ <KEYWORD3>load-time-value</KEYWORD3>
+ <KEYWORD3>log</KEYWORD3>
+ <KEYWORD3>logand</KEYWORD3>
+ <KEYWORD3>logandc1</KEYWORD3>
+ <KEYWORD3>logandc2</KEYWORD3>
+ <KEYWORD3>logbitp</KEYWORD3>
+ <KEYWORD3>logcount</KEYWORD3>
+ <KEYWORD3>logeqv</KEYWORD3>
+ <KEYWORD3>logical-pathname</KEYWORD3>
+ <KEYWORD3>logical-pathname-translations</KEYWORD3>
+ <KEYWORD3>logior</KEYWORD3>
+ <KEYWORD3>lognand</KEYWORD3>
+ <KEYWORD3>lognor</KEYWORD3>
+ <KEYWORD3>lognot</KEYWORD3>
+ <KEYWORD3>logorc1</KEYWORD3>
+ <KEYWORD3>logorc2</KEYWORD3>
+ <KEYWORD3>logtest</KEYWORD3>
+ <KEYWORD3>logxor</KEYWORD3>
+ <KEYWORD3>long-float</KEYWORD3>
+ <KEYWORD3>long-float-epsilon</KEYWORD3>
+ <KEYWORD3>long-float-negative-epsilon</KEYWORD3>
+ <KEYWORD3>long-site-name</KEYWORD3>
+ <KEYWORD3>loop-finish</KEYWORD3>
+ <KEYWORD3>lower-case-p</KEYWORD3>
+ <KEYWORD3>machine-instance</KEYWORD3>
+ <KEYWORD3>machine-type</KEYWORD3>
+ <KEYWORD3>machine-version</KEYWORD3>
+ <KEYWORD3>macro-function</KEYWORD3>
+ <KEYWORD3>macroexpand</KEYWORD3>
+ <KEYWORD3>macroexpand-1</KEYWORD3>
+ <KEYWORD3>make-array</KEYWORD3>
+ <KEYWORD3>make-broadcast-stream</KEYWORD3>
+ <KEYWORD3>make-concatenated-stream</KEYWORD3>
+ <KEYWORD3>make-condition</KEYWORD3>
+ <KEYWORD3>make-dispatch-macro-character</KEYWORD3>
+ <KEYWORD3>make-echo-stream</KEYWORD3>
+ <KEYWORD3>make-hash-table</KEYWORD3>
+ <KEYWORD3>make-instance</KEYWORD3>
+ <KEYWORD3>make-instances-obsolete</KEYWORD3>
+ <KEYWORD3>make-list</KEYWORD3>
+ <KEYWORD3>make-load-form</KEYWORD3>
+ <KEYWORD3>make-load-form-saving-slots</KEYWORD3>
+ <KEYWORD3>make-method</KEYWORD3>
+ <KEYWORD3>make-package</KEYWORD3>
+ <KEYWORD3>make-pathname</KEYWORD3>
+ <KEYWORD3>make-random-state</KEYWORD3>
+ <KEYWORD3>make-sequence</KEYWORD3>
+ <KEYWORD3>make-string</KEYWORD3>
+ <KEYWORD3>make-string-input-stream</KEYWORD3>
+ <KEYWORD3>make-string-output-stream</KEYWORD3>
+ <KEYWORD3>make-symbol</KEYWORD3>
+ <KEYWORD3>make-synonym-stream</KEYWORD3>
+ <KEYWORD3>make-two-way-stream</KEYWORD3>
+ <KEYWORD3>makunbound</KEYWORD3>
+ <KEYWORD3>map</KEYWORD3>
+ <KEYWORD3>map-into</KEYWORD3>
+ <KEYWORD3>mapc</KEYWORD3>
+ <KEYWORD3>mapcan</KEYWORD3>
+ <KEYWORD3>mapcar</KEYWORD3>
+ <KEYWORD3>mapcon</KEYWORD3>
+ <KEYWORD3>maphash</KEYWORD3>
+ <KEYWORD3>mapl</KEYWORD3>
+ <KEYWORD3>maplist</KEYWORD3>
+ <KEYWORD3>mask-field</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>member</KEYWORD3>
+ <KEYWORD3>member-if</KEYWORD3>
+ <KEYWORD3>member-if-not</KEYWORD3>
+ <KEYWORD3>merge</KEYWORD3>
+ <KEYWORD3>merge-pathnames</KEYWORD3>
+ <KEYWORD3>method</KEYWORD3>
+ <KEYWORD3>method-combination</KEYWORD3>
+ <KEYWORD3>method-combination-error</KEYWORD3>
+ <KEYWORD3>method-qualifiers</KEYWORD3>
+ <KEYWORD3>min</KEYWORD3>
+ <KEYWORD3>minusp</KEYWORD3>
+ <KEYWORD3>mismatch</KEYWORD3>
+ <KEYWORD3>mod</KEYWORD3>
+ <KEYWORD3>most-negative-double-float</KEYWORD3>
+ <KEYWORD3>most-negative-fixnum</KEYWORD3>
+ <KEYWORD3>most-negative-long-float</KEYWORD3>
+ <KEYWORD3>most-negative-short-float</KEYWORD3>
+ <KEYWORD3>most-negative-single-float</KEYWORD3>
+ <KEYWORD3>most-positive-double-float</KEYWORD3>
+ <KEYWORD3>most-positive-fixnum</KEYWORD3>
+ <KEYWORD3>most-positive-long-float</KEYWORD3>
+ <KEYWORD3>most-positive-short-float</KEYWORD3>
+ <KEYWORD3>most-positive-single-float</KEYWORD3>
+ <KEYWORD3>muffle-warning</KEYWORD3>
+ <KEYWORD3>multiple-value-call</KEYWORD3>
+ <KEYWORD3>multiple-value-list</KEYWORD3>
+ <KEYWORD3>multiple-value-prog1</KEYWORD3>
+ <KEYWORD3>multiple-value-setq</KEYWORD3>
+ <KEYWORD3>multiple-values-limit</KEYWORD3>
+ <KEYWORD3>name-char</KEYWORD3>
+ <KEYWORD3>namestring</KEYWORD3>
+ <KEYWORD3>nbutlast</KEYWORD3>
+ <KEYWORD3>nconc</KEYWORD3>
+ <KEYWORD3>next-method-p</KEYWORD3>
+ <KEYWORD3>nintersection</KEYWORD3>
+ <KEYWORD3>ninth</KEYWORD3>
+ <KEYWORD3>no-applicable-method</KEYWORD3>
+ <KEYWORD3>no-next-method</KEYWORD3>
+ <KEYWORD3>not</KEYWORD3>
+ <KEYWORD3>notany</KEYWORD3>
+ <KEYWORD3>notevery</KEYWORD3>
+ <KEYWORD3>notinline</KEYWORD3>
+ <KEYWORD3>nreconc</KEYWORD3>
+ <KEYWORD3>nreverse</KEYWORD3>
+ <KEYWORD3>nset-difference</KEYWORD3>
+ <KEYWORD3>nset-exclusive-or</KEYWORD3>
+ <KEYWORD3>nstring-capitalize</KEYWORD3>
+ <KEYWORD3>nstring-downcase</KEYWORD3>
+ <KEYWORD3>nstring-upcase</KEYWORD3>
+ <KEYWORD3>nsublis</KEYWORD3>
+ <KEYWORD3>nsubst</KEYWORD3>
+ <KEYWORD3>nsubst-if</KEYWORD3>
+ <KEYWORD3>nsubst-if-not</KEYWORD3>
+ <KEYWORD3>nsubstitute</KEYWORD3>
+ <KEYWORD3>nsubstitute-if</KEYWORD3>
+ <KEYWORD3>nsubstitute-if-not</KEYWORD3>
+ <KEYWORD3>nth</KEYWORD3>
+ <KEYWORD3>nth-value</KEYWORD3>
+ <KEYWORD3>nthcdr</KEYWORD3>
+ <KEYWORD3>null</KEYWORD3>
+ <KEYWORD3>number</KEYWORD3>
+ <KEYWORD3>numberp</KEYWORD3>
+ <KEYWORD3>numerator</KEYWORD3>
+ <KEYWORD3>nunion</KEYWORD3>
+ <KEYWORD3>oddp</KEYWORD3>
+ <KEYWORD3>open</KEYWORD3>
+ <KEYWORD3>open-stream-p</KEYWORD3>
+ <KEYWORD3>optimize</KEYWORD3>
+ <KEYWORD3>or</KEYWORD3>
+ <KEYWORD3>otherwise</KEYWORD3>
+ <KEYWORD3>output-stream-p</KEYWORD3>
+ <KEYWORD3>package</KEYWORD3>
+ <KEYWORD3>package-error</KEYWORD3>
+ <KEYWORD3>package-error-package</KEYWORD3>
+ <KEYWORD3>package-name</KEYWORD3>
+ <KEYWORD3>package-nicknames</KEYWORD3>
+ <KEYWORD3>package-shadowing-symbols</KEYWORD3>
+ <KEYWORD3>package-use-list</KEYWORD3>
+ <KEYWORD3>package-used-by-list</KEYWORD3>
+ <KEYWORD3>packagep</KEYWORD3>
+ <KEYWORD3>pairlis</KEYWORD3>
+ <KEYWORD3>parse-error</KEYWORD3>
+ <KEYWORD3>parse-integer</KEYWORD3>
+ <KEYWORD3>parse-namestring</KEYWORD3>
+ <KEYWORD3>pathname</KEYWORD3>
+ <KEYWORD3>pathname-device</KEYWORD3>
+ <KEYWORD3>pathname-directory</KEYWORD3>
+ <KEYWORD3>pathname-host</KEYWORD3>
+ <KEYWORD3>pathname-match-p</KEYWORD3>
+ <KEYWORD3>pathname-name</KEYWORD3>
+ <KEYWORD3>pathname-type</KEYWORD3>
+ <KEYWORD3>pathname-version</KEYWORD3>
+ <KEYWORD3>pathnamep</KEYWORD3>
+ <KEYWORD3>peek-char</KEYWORD3>
+ <KEYWORD3>phase</KEYWORD3>
+ <KEYWORD3>pi</KEYWORD3>
+ <KEYWORD3>plusp</KEYWORD3>
+ <KEYWORD3>pop</KEYWORD3>
+ <KEYWORD3>position</KEYWORD3>
+ <KEYWORD3>position-if</KEYWORD3>
+ <KEYWORD3>position-if-not</KEYWORD3>
+ <KEYWORD3>pprint</KEYWORD3>
+ <KEYWORD3>pprint-dispatch</KEYWORD3>
+ <KEYWORD3>pprint-exit-if-list-exhausted</KEYWORD3>
+ <KEYWORD3>pprint-fill</KEYWORD3>
+ <KEYWORD3>pprint-indent</KEYWORD3>
+ <KEYWORD3>pprint-linear</KEYWORD3>
+ <KEYWORD3>pprint-logical-block</KEYWORD3>
+ <KEYWORD3>pprint-newline</KEYWORD3>
+ <KEYWORD3>pprint-pop</KEYWORD3>
+ <KEYWORD3>pprint-tab</KEYWORD3>
+ <KEYWORD3>pprint-tabular</KEYWORD3>
+ <KEYWORD3>prin1</KEYWORD3>
+ <KEYWORD3>prin1-to-string</KEYWORD3>
+ <KEYWORD3>princ</KEYWORD3>
+ <KEYWORD3>princ-to-string</KEYWORD3>
+ <KEYWORD3>print</KEYWORD3>
+ <KEYWORD3>print-not-readable</KEYWORD3>
+ <KEYWORD3>print-not-readable-object</KEYWORD3>
+ <KEYWORD3>print-object</KEYWORD3>
+ <KEYWORD3>print-unreadable-object</KEYWORD3>
+ <KEYWORD3>probe-file</KEYWORD3>
+ <KEYWORD3>program-error</KEYWORD3>
+ <KEYWORD3>psetf</KEYWORD3>
+ <KEYWORD3>psetq</KEYWORD3>
+ <KEYWORD3>push</KEYWORD3>
+ <KEYWORD3>pushnew</KEYWORD3>
+ <KEYWORD3>quote</KEYWORD3>
+ <KEYWORD3>random</KEYWORD3>
+ <KEYWORD3>random-state</KEYWORD3>
+ <KEYWORD3>random-state-p</KEYWORD3>
+ <KEYWORD3>rassoc</KEYWORD3>
+ <KEYWORD3>rassoc-if</KEYWORD3>
+ <KEYWORD3>rassoc-if-not</KEYWORD3>
+ <KEYWORD3>ratio</KEYWORD3>
+ <KEYWORD3>rational</KEYWORD3>
+ <KEYWORD3>rationalize</KEYWORD3>
+ <KEYWORD3>rationalp</KEYWORD3>
+ <KEYWORD3>read</KEYWORD3>
+ <KEYWORD3>read-byte</KEYWORD3>
+ <KEYWORD3>read-char</KEYWORD3>
+ <KEYWORD3>read-char-no-hang</KEYWORD3>
+ <KEYWORD3>read-delimited-list</KEYWORD3>
+ <KEYWORD3>read-from-string</KEYWORD3>
+ <KEYWORD3>read-line</KEYWORD3>
+ <KEYWORD3>read-preserving-whitespace</KEYWORD3>
+ <KEYWORD3>read-sequence</KEYWORD3>
+ <KEYWORD3>reader-error</KEYWORD3>
+ <KEYWORD3>readtable</KEYWORD3>
+ <KEYWORD3>readtable-case</KEYWORD3>
+ <KEYWORD3>readtablep</KEYWORD3>
+ <KEYWORD3>real</KEYWORD3>
+ <KEYWORD3>realp</KEYWORD3>
+ <KEYWORD3>realpart</KEYWORD3>
+ <KEYWORD3>reduce</KEYWORD3>
+ <KEYWORD3>reinitialize-instance</KEYWORD3>
+ <KEYWORD3>rem</KEYWORD3>
+ <KEYWORD3>remf</KEYWORD3>
+ <KEYWORD3>remhash</KEYWORD3>
+ <KEYWORD3>remove</KEYWORD3>
+ <KEYWORD3>remove-duplicates</KEYWORD3>
+ <KEYWORD3>remove-if</KEYWORD3>
+ <KEYWORD3>remove-if-not</KEYWORD3>
+ <KEYWORD3>remove-method</KEYWORD3>
+ <KEYWORD3>remprop</KEYWORD3>
+ <KEYWORD3>rename-file</KEYWORD3>
+ <KEYWORD3>rename-package</KEYWORD3>
+ <KEYWORD3>replace</KEYWORD3>
+ <KEYWORD3>rest</KEYWORD3>
+ <KEYWORD3>restart</KEYWORD3>
+ <KEYWORD3>revappend</KEYWORD3>
+ <KEYWORD3>reverse</KEYWORD3>
+ <KEYWORD3>room</KEYWORD3>
+ <KEYWORD3>rotatef</KEYWORD3>
+ <KEYWORD3>round</KEYWORD3>
+ <KEYWORD3>row-major-aref</KEYWORD3>
+ <KEYWORD3>rplaca</KEYWORD3>
+ <KEYWORD3>rplacd</KEYWORD3>
+ <KEYWORD3>safety</KEYWORD3>
+ <KEYWORD3>satisfies</KEYWORD3>
+ <KEYWORD3>sbit</KEYWORD3>
+ <KEYWORD3>scale-float</KEYWORD3>
+ <KEYWORD3>schar</KEYWORD3>
+ <KEYWORD3>search</KEYWORD3>
+ <KEYWORD3>second</KEYWORD3>
+ <KEYWORD3>sequence</KEYWORD3>
+ <KEYWORD3>serious-condition</KEYWORD3>
+ <KEYWORD3>set</KEYWORD3>
+ <KEYWORD3>set-difference</KEYWORD3>
+ <KEYWORD3>set-dispatch-macro-character</KEYWORD3>
+ <KEYWORD3>set-exclusive-or</KEYWORD3>
+ <KEYWORD3>set-macro-character</KEYWORD3>
+ <KEYWORD3>set-pprint-dispatch</KEYWORD3>
+ <KEYWORD3>set-syntax-from-char</KEYWORD3>
+ <KEYWORD3>setf</KEYWORD3>
+ <KEYWORD3>setq</KEYWORD3>
+ <KEYWORD3>seventh</KEYWORD3>
+ <KEYWORD3>shadow</KEYWORD3>
+ <KEYWORD3>shadowing-import</KEYWORD3>
+ <KEYWORD3>shared-initialize</KEYWORD3>
+ <KEYWORD3>shiftf</KEYWORD3>
+ <KEYWORD3>short-float</KEYWORD3>
+ <KEYWORD3>short-float-epsilon</KEYWORD3>
+ <KEYWORD3>short-float-negative-epsilon</KEYWORD3>
+ <KEYWORD3>short-site-name</KEYWORD3>
+ <KEYWORD3>signed-byte</KEYWORD3>
+ <KEYWORD3>signum</KEYWORD3>
+ <KEYWORD3>simple-array</KEYWORD3>
+ <KEYWORD3>simple-base-string</KEYWORD3>
+ <KEYWORD3>simple-bit-vector</KEYWORD3>
+ <KEYWORD3>simple-bit-vector-p</KEYWORD3>
+ <KEYWORD3>simple-condition</KEYWORD3>
+ <KEYWORD3>simple-condition-format-arguments</KEYWORD3>
+ <KEYWORD3>simple-condition-format-control</KEYWORD3>
+ <KEYWORD3>simple-error</KEYWORD3>
+ <KEYWORD3>simple-string</KEYWORD3>
+ <KEYWORD3>simple-string-p</KEYWORD3>
+ <KEYWORD3>simple-type-error</KEYWORD3>
+ <KEYWORD3>simple-vector</KEYWORD3>
+ <KEYWORD3>simple-vector-p</KEYWORD3>
+ <KEYWORD3>simple-warning</KEYWORD3>
+ <KEYWORD3>sin</KEYWORD3>
+ <KEYWORD3>single-float</KEYWORD3>
+ <KEYWORD3>single-float-epsilon</KEYWORD3>
+ <KEYWORD3>single-float-negative-epsilon</KEYWORD3>
+ <KEYWORD3>sinh</KEYWORD3>
+ <KEYWORD3>sixth</KEYWORD3>
+ <KEYWORD3>sleep</KEYWORD3>
+ <KEYWORD3>slot-boundp</KEYWORD3>
+ <KEYWORD3>slot-exists-p</KEYWORD3>
+ <KEYWORD3>slot-makunbound</KEYWORD3>
+ <KEYWORD3>slot-missing</KEYWORD3>
+ <KEYWORD3>slot-unbound</KEYWORD3>
+ <KEYWORD3>slot-value</KEYWORD3>
+ <KEYWORD3>software-type</KEYWORD3>
+ <KEYWORD3>software-version</KEYWORD3>
+ <KEYWORD3>some</KEYWORD3>
+ <KEYWORD3>sort</KEYWORD3>
+ <KEYWORD3>space</KEYWORD3>
+ <KEYWORD3>special</KEYWORD3>
+ <KEYWORD3>special-operator-p</KEYWORD3>
+ <KEYWORD3>speed</KEYWORD3>
+ <KEYWORD3>sqrt</KEYWORD3>
+ <KEYWORD3>stable-sort</KEYWORD3>
+ <KEYWORD3>standard</KEYWORD3>
+ <KEYWORD3>standard-char</KEYWORD3>
+ <KEYWORD3>standard-char-p</KEYWORD3>
+ <KEYWORD3>standard-class</KEYWORD3>
+ <KEYWORD3>standard-generic-function</KEYWORD3>
+ <KEYWORD3>standard-method</KEYWORD3>
+ <KEYWORD3>standard-object</KEYWORD3>
+ <KEYWORD3>step</KEYWORD3>
+ <KEYWORD3>storage-condition</KEYWORD3>
+ <KEYWORD3>store-value</KEYWORD3>
+ <KEYWORD3>stream</KEYWORD3>
+ <KEYWORD3>stream-element-type</KEYWORD3>
+ <KEYWORD3>stream-error</KEYWORD3>
+ <KEYWORD3>stream-error-stream</KEYWORD3>
+ <KEYWORD3>stream-external-format</KEYWORD3>
+ <KEYWORD3>streamp</KEYWORD3>
+ <KEYWORD3>string</KEYWORD3>
+ <KEYWORD3>string-capitalize</KEYWORD3>
+ <KEYWORD3>string-downcase</KEYWORD3>
+ <KEYWORD3>string-equal</KEYWORD3>
+ <KEYWORD3>string-greaterp</KEYWORD3>
+ <KEYWORD3>string-left-trim</KEYWORD3>
+ <KEYWORD3>string-lessp</KEYWORD3>
+ <KEYWORD3>string-not-equal</KEYWORD3>
+ <KEYWORD3>string-not-greaterp</KEYWORD3>
+ <KEYWORD3>string-not-lessp</KEYWORD3>
+ <KEYWORD3>string-right-trim</KEYWORD3>
+ <KEYWORD3>string-stream</KEYWORD3>
+ <KEYWORD3>string-trim</KEYWORD3>
+ <KEYWORD3>string-upcase</KEYWORD3>
+ <KEYWORD3>string/=</KEYWORD3>
+ <KEYWORD3>string<</KEYWORD3>
+ <KEYWORD3>string<=</KEYWORD3>
+ <KEYWORD3>string=</KEYWORD3>
+ <KEYWORD3>string></KEYWORD3>
+ <KEYWORD3>string>=</KEYWORD3>
+ <KEYWORD3>stringp</KEYWORD3>
+ <KEYWORD3>structure</KEYWORD3>
+ <KEYWORD3>structure-class</KEYWORD3>
+ <KEYWORD3>structure-object</KEYWORD3>
+ <KEYWORD3>style-warning</KEYWORD3>
+ <KEYWORD3>sublis</KEYWORD3>
+ <KEYWORD3>subseq</KEYWORD3>
+ <KEYWORD3>subsetp</KEYWORD3>
+ <KEYWORD3>subst</KEYWORD3>
+ <KEYWORD3>subst-if</KEYWORD3>
+ <KEYWORD3>subst-if-not</KEYWORD3>
+ <KEYWORD3>substitute</KEYWORD3>
+ <KEYWORD3>substitute-if</KEYWORD3>
+ <KEYWORD3>substitute-if-not</KEYWORD3>
+ <KEYWORD3>subtypep</KEYWORD3>
+ <KEYWORD3>svref</KEYWORD3>
+ <KEYWORD3>sxhash</KEYWORD3>
+ <KEYWORD3>symbol</KEYWORD3>
+ <KEYWORD3>symbol-function</KEYWORD3>
+ <KEYWORD3>symbol-name</KEYWORD3>
+ <KEYWORD3>symbol-package</KEYWORD3>
+ <KEYWORD3>symbol-plist</KEYWORD3>
+ <KEYWORD3>symbol-value</KEYWORD3>
+ <KEYWORD3>symbolp</KEYWORD3>
+ <KEYWORD3>synonym-stream</KEYWORD3>
+ <KEYWORD3>synonym-stream-symbol</KEYWORD3>
+ <KEYWORD3>tailp</KEYWORD3>
+ <KEYWORD3>tan</KEYWORD3>
+ <KEYWORD3>tanh</KEYWORD3>
+ <KEYWORD3>tenth</KEYWORD3>
+ <KEYWORD3>terpri</KEYWORD3>
+ <KEYWORD3>third</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>trace</KEYWORD3>
+ <KEYWORD3>translate-logical-pathname</KEYWORD3>
+ <KEYWORD3>translate-pathname</KEYWORD3>
+ <KEYWORD3>tree-equal</KEYWORD3>
+ <KEYWORD3>truename</KEYWORD3>
+ <KEYWORD3>truncate</KEYWORD3>
+ <KEYWORD3>two-way-stream</KEYWORD3>
+ <KEYWORD3>two-way-stream-input-stream</KEYWORD3>
+ <KEYWORD3>two-way-stream-output-stream</KEYWORD3>
+ <KEYWORD3>type-error-datum</KEYWORD3>
+ <KEYWORD3>type-error-expected-type</KEYWORD3>
+ <KEYWORD3>type-error</KEYWORD3>
+ <KEYWORD3>type-of</KEYWORD3>
+ <KEYWORD3>typep</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>unbound-slot-instance</KEYWORD3>
+ <KEYWORD3>unbound-slot</KEYWORD3>
+ <KEYWORD3>unbound-variable</KEYWORD3>
+ <KEYWORD3>undefined-function</KEYWORD3>
+ <KEYWORD3>unexport</KEYWORD3>
+ <KEYWORD3>unintern</KEYWORD3>
+ <KEYWORD3>union</KEYWORD3>
+ <KEYWORD3>unread-char</KEYWORD3>
+ <KEYWORD3>unsigned-byte</KEYWORD3>
+ <KEYWORD3>untrace</KEYWORD3>
+ <KEYWORD3>unuse-package</KEYWORD3>
+ <KEYWORD3>update-instance-for-different-class</KEYWORD3>
+ <KEYWORD3>update-instance-for-redefined-class</KEYWORD3>
+ <KEYWORD3>upgraded-array-element-type</KEYWORD3>
+ <KEYWORD3>upgraded-complex-part-type</KEYWORD3>
+ <KEYWORD3>upper-case-p</KEYWORD3>
+ <KEYWORD3>use-package</KEYWORD3>
+ <KEYWORD3>use-value</KEYWORD3>
+ <KEYWORD3>user-homedir-pathname</KEYWORD3>
+ <KEYWORD3>values</KEYWORD3>
+ <KEYWORD3>values-list</KEYWORD3>
+ <KEYWORD3>variable</KEYWORD3>
+ <KEYWORD3>vector</KEYWORD3>
+ <KEYWORD3>vector-pop</KEYWORD3>
+ <KEYWORD3>vector-push</KEYWORD3>
+ <KEYWORD3>vector-push-extend</KEYWORD3>
+ <KEYWORD3>vectorp</KEYWORD3>
+ <KEYWORD3>warn</KEYWORD3>
+ <KEYWORD3>warning</KEYWORD3>
+ <KEYWORD3>wild-pathname-p</KEYWORD3>
+ <KEYWORD3>write</KEYWORD3>
+ <KEYWORD3>write-byte</KEYWORD3>
+ <KEYWORD3>write-char</KEYWORD3>
+ <KEYWORD3>write-line</KEYWORD3>
+ <KEYWORD3>write-sequence</KEYWORD3>
+ <KEYWORD3>write-string</KEYWORD3>
+ <KEYWORD3>write-to-string</KEYWORD3>
+ <KEYWORD3>y-or-n-p</KEYWORD3>
+ <KEYWORD3>yes-or-no-p</KEYWORD3>
+ <KEYWORD3>zerop</KEYWORD3>
+
+ <LITERAL2>t</LITERAL2>
+ <LITERAL2>nil</LITERAL2>
+ </KEYWORDS>
+
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/literate-haskell.xml b/jEdit/modes/literate-haskell.xml
index c74ad3a..2aa0b1e 100644
--- a/jEdit/modes/literate-haskell.xml
+++ b/jEdit/modes/literate-haskell.xml
@@ -1,37 +1,37 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- Literate Haskell mode by Cameron Morrison (c.morrison at iinet.net.au)
- Modified version of the Haskell mode by Kristian Ovaska (kristian.ovaska at helsinki.fi)
- Based on Haskell 98
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="{-" />
- <PROPERTY NAME="commentEnd" VALUE="-}" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- <!-- apparently, this is required... -->
- <PROPERTY NAME="tabSize" VALUE="8" />
- <PROPERTY NAME="indentSize" VALUE="8" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" DEFAULT="COMMENT4">
- <EOL_SPAN AT_WHITESPACE_END="TRUE" TYPE="FUNCTION" DELEGATE="haskell::MAIN">></EOL_SPAN>
- <!-- for LaTeX-style -->
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT3">%</EOL_SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="haskell::MAIN">
- <BEGIN>\begin{code}</BEGIN>
- <END>\end{code}</END>
- </SPAN>
- <!--
- <EOL_SPAN_REGEXP HASH_CHAR="\" AT_LINE_START="TRUE"
- DELEGATE="latex::MAIN" TYPE="KEYWORD1"
- >\\\w+</EOL_SPAN_REGEXP>
- -->
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ Literate Haskell mode by Cameron Morrison (c.morrison at iinet.net.au)
+ Modified version of the Haskell mode by Kristian Ovaska (kristian.ovaska at helsinki.fi)
+ Based on Haskell 98
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="{-" />
+ <PROPERTY NAME="commentEnd" VALUE="-}" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ <!-- apparently, this is required... -->
+ <PROPERTY NAME="tabSize" VALUE="8" />
+ <PROPERTY NAME="indentSize" VALUE="8" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" DEFAULT="COMMENT4">
+ <EOL_SPAN AT_WHITESPACE_END="TRUE" TYPE="FUNCTION" DELEGATE="haskell::MAIN">></EOL_SPAN>
+ <!-- for LaTeX-style -->
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT3">%</EOL_SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="haskell::MAIN">
+ <BEGIN>\begin{code}</BEGIN>
+ <END>\end{code}</END>
+ </SPAN>
+ <!--
+ <EOL_SPAN_REGEXP HASH_CHAR="\" AT_LINE_START="TRUE"
+ DELEGATE="latex::MAIN" TYPE="KEYWORD1"
+ >\\\w+</EOL_SPAN_REGEXP>
+ -->
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/logtalk.xml b/jEdit/modes/logtalk.xml
new file mode 100644
index 0000000..25b231d
--- /dev/null
+++ b/jEdit/modes/logtalk.xml
@@ -0,0 +1,397 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- jEdit 4.3 Logtalk syntax file
+
+ written by Paulo Moura
+ version 1.93
+ created on 5 May 2002
+ last revised 23 January 2010
+
+ To install, copy this file to the "modes" subdirectory in jEdit
+ directory installation. Next, check the "catalog" file in the
+ same subdirectory and add (if not present) the following entry:
+
+ <MODE NAME="logtalk" FILE="logtalk.xml" FILE_NAME_GLOB="*.{lgt}" />
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="%" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="tabSize" VALUE="4" />
+ <PROPERTY NAME="indentSize" VALUE="4" />
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentNextLine" VALUE="((^\s*:-\s(object|protocol|category)\(.*,$)|.*\s:-$)" />
+ </PROPS>
+
+ <RULES SET="MAIN" IGNORE_CASE="FALSE">
+
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+ <SPAN TYPE="COMMENT1" NO_LINE_BREAK="FALSE">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Entity directives -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\s(category|object|protocol)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\send_(category|object|protocol)(?=[.])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\smodule(?=[(])</SEQ_REGEXP>
+ <!-- Predicate scope directives -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\sp(ublic|r(otected|ivate))(?=[(])</SEQ_REGEXP>
+ <!-- Conditional compilation directives -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\s(el)?if(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\se(lse|ndif)(?=[.])</SEQ_REGEXP>
+ <!-- Other directives -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\se(n(coding|sure_loaded)|xport)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\sin(fo|itialization)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\s(dynamic|synchronized|threaded)(?=[.])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\s(alias|d(ynamic|iscontiguous)|m(eta_predicate|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\sop(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">^\s*:-\s(calls|reexport|use(s|_module))(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD1">(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])</SEQ_REGEXP>
+
+ <!-- Event handlers -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(after|before)(?=[(])</SEQ_REGEXP>
+ <!-- Method execution context -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(parameter|this|se(lf|nder))(?=[(])</SEQ_REGEXP>
+ <!-- Reflection -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(current_predicate|predicate_property)(?=[(])</SEQ_REGEXP>
+ <!-- DCGs -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(expand_(goal|term)|(goal|term)_expansion|phrase)(?=[(])</SEQ_REGEXP>
+ <!-- Entity -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(object|protocol|category)_property(?=[(])</SEQ_REGEXP>
+ <!-- Entity relations -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bcomplements_object(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bextends_(object|protocol|category)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bimp(lements_protocol|orts_category)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(instantiat|specializ)es_class(?=[(])</SEQ_REGEXP>
+ <!-- Events -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(current_event|(abolish|define)_events)(?=[(])</SEQ_REGEXP>
+ <!-- Flags -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(current|set)_logtalk_flag(?=[(])</SEQ_REGEXP>
+ <!-- Compiling, loading, and library paths -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\blogtalk_(compile|l(ibrary_path|oad))(?=[(])</SEQ_REGEXP>
+ <!-- Database -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(clause|retract(all)?)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\ba(bolish|ssert(a|z))(?=[(])</SEQ_REGEXP>
+ <!-- Control -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(ca(ll|tch)|throw)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(fail|true)\b</SEQ_REGEXP>
+ <!-- All solutions -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b((bag|set)of|f(ind|or)all)(?=[(])</SEQ_REGEXP>
+ <!-- Multi-threading meta-predicates -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bthreaded(_(call|once|ignore|exit|peek|wait|notify))?(?=[(])</SEQ_REGEXP>
+ <!-- Term unification -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bunify_with_occurs_check(?=[(])</SEQ_REGEXP>
+ <!-- Term creation and decomposition -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(functor|arg|copy_term)(?=[(])</SEQ_REGEXP>
+ <!-- Evaluable functors -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(rem|mod|abs|sign)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bfloat(_(integer|fractional)_part)?(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(floor|truncate|round|ceiling)(?=[(])</SEQ_REGEXP>
+ <!-- Other arithmetic functors -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(cos|atan|exp|log|s(in|qrt))(?=[(])</SEQ_REGEXP>
+ <!-- Term testing -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])</SEQ_REGEXP>
+ <!-- Stream selection and control -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(current|set)_(in|out)put(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(open|close)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bflush_output(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(flush_output|at_end_of_stream)\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])</SEQ_REGEXP>
+ <!-- Character and byte input/output -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bnl\b</SEQ_REGEXP>
+ <!-- Term input/output -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bread(_term)?(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bwrite(q|_(canonical|term))?(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(current_)?op(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(current_)?char_conversion(?=[(])</SEQ_REGEXP>
+ <!-- Atomic term processing -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\batom_(length|c(hars|o(ncat|des)))(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(char_code|sub_atom)(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bnumber_c(hars|odes)(?=[(])</SEQ_REGEXP>
+ <!-- Implementation defined hooks functions -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\b(set|current)_prolog_flag(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bhalt\b</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bhalt(?=[(])</SEQ_REGEXP>
+ <!-- Logic and control -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\bonce(?=[(])</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="KEYWORD2">\brepeat\b</SEQ_REGEXP>
+
+ <!-- Variables -->
+ <SEQ_REGEXP HASH_CHARS="_ABCDEFGHIJKLMNOPQRSTUVWXYZ" AT_WORD_START="TRUE" TYPE="MARKUP">[_A-Z]+[a-zA-Z0-9]*</SEQ_REGEXP>
+
+ <!-- String literals -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- External call -->
+ <SPAN TYPE="OPERATOR" DELEGATE="MAIN">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Character code constants -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" HASH_CHAR="0" TYPE="DIGIT">0'.</SEQ_REGEXP>
+ <!-- Binary, octal, and hexadecimal numbers -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" HASH_CHAR="0" TYPE="DIGIT">0b[0-1]+</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" HASH_CHAR="0" TYPE="DIGIT">0o[0-7]+</SEQ_REGEXP>
+ <SEQ_REGEXP AT_WORD_START="TRUE" HASH_CHAR="0" TYPE="DIGIT">0x\p{XDigit}+</SEQ_REGEXP>
+ <!-- Numbers -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="DIGIT">\d+(\.\d+)?([eE]([-+])?\d+)?</SEQ_REGEXP>
+
+ <!-- Logtalk message sending operators -->
+ <SEQ TYPE="OPERATOR">::</SEQ>
+ <SEQ TYPE="OPERATOR">^^</SEQ>
+
+ <!-- Other Logtalk control construct operators -->
+ <SEQ_REGEXP TYPE="OPERATOR">:(?![:-])</SEQ_REGEXP>
+
+ <!-- Control constructs -->
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">--></SEQ>
+ <SEQ TYPE="OPERATOR">-></SEQ>
+
+ <!-- Term unification -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">\=</SEQ>
+
+ <!-- Term comparison -->
+ <SEQ TYPE="OPERATOR">@=<</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">\==</SEQ>
+ <SEQ TYPE="OPERATOR">@<</SEQ>
+ <SEQ TYPE="OPERATOR">@></SEQ>
+ <SEQ TYPE="OPERATOR">@>=</SEQ>
+
+ <!-- Term creation and decomposition -->
+ <SEQ TYPE="OPERATOR">=..</SEQ>
+
+ <!-- Arithemtic evaluation -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" TYPE="OPERATOR">\bis\b</SEQ_REGEXP>
+
+ <!-- Arithemtic comparison -->
+ <SEQ TYPE="OPERATOR">=:=</SEQ>
+ <SEQ TYPE="OPERATOR">=\=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">=<</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+
+ <!-- Logic and control -->
+ <SEQ TYPE="OPERATOR">\+</SEQ>
+
+ <!-- Evaluable functors -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">//</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <!-- Other arithemtic functors -->
+ <SEQ TYPE="OPERATOR">**</SEQ>
+
+ <!-- Bitwise functors -->
+ <SEQ TYPE="OPERATOR">>></SEQ>
+ <SEQ TYPE="OPERATOR"><<</SEQ>
+ <SEQ TYPE="OPERATOR">/\</SEQ>
+ <SEQ TYPE="OPERATOR">\/</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+
+ <!-- Clause operators -->
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ_REGEXP TYPE="OPERATOR">\s:-($|\s)</SEQ_REGEXP>
+
+ <!-- Mode operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+
+ <!-- Existential quantifier operator -->
+ <SEQ TYPE="OPERATOR">^</SEQ>
+
+ <KEYWORDS> <!-- just for code completion to work! -->
+
+ <NULL>abolish</NULL>
+ <NULL>abolish_category</NULL>
+ <NULL>abolish_events</NULL>
+ <NULL>abolish_object</NULL>
+ <NULL>abolish_protocol</NULL>
+ <NULL>after</NULL>
+ <NULL>alias</NULL>
+ <NULL>arg</NULL>
+ <NULL>asserta</NULL>
+ <NULL>assertz</NULL>
+ <NULL>atom</NULL>
+ <NULL>atomic</NULL>
+ <NULL>atom_chars</NULL>
+ <NULL>atom_codes</NULL>
+ <NULL>atom_concat</NULL>
+ <NULL>atom_length</NULL>
+ <NULL>at_end_of_stream</NULL>
+ <NULL>bagof</NULL>
+ <NULL>before</NULL>
+ <NULL>call</NULL>
+ <NULL>calls</NULL>
+ <NULL>catch</NULL>
+ <NULL>category</NULL>
+ <NULL>category_property</NULL>
+ <NULL>char_code</NULL>
+ <NULL>char_conversion</NULL>
+ <NULL>clause</NULL>
+ <NULL>close</NULL>
+ <NULL>complements</NULL>
+ <NULL>complements_object</NULL>
+ <NULL>compound</NULL>
+ <NULL>copy_term</NULL>
+ <NULL>create_category</NULL>
+ <NULL>create_object</NULL>
+ <NULL>create_protocol</NULL>
+ <NULL>current_category</NULL>
+ <NULL>current_char_conversion</NULL>
+ <NULL>current_event</NULL>
+ <NULL>current_input</NULL>
+ <NULL>current_logtalk_flag</NULL>
+ <NULL>current_object</NULL>
+ <NULL>current_op</NULL>
+ <NULL>current_output</NULL>
+ <NULL>current_predicate</NULL>
+ <NULL>current_prolog_flag</NULL>
+ <NULL>current_protocol</NULL>
+ <NULL>define_events</NULL>
+ <NULL>discontiguous</NULL>
+ <NULL>dynamic</NULL>
+ <NULL>encoding</NULL>
+ <NULL>end_category</NULL>
+ <NULL>end_object</NULL>
+ <NULL>end_protocol</NULL>
+ <NULL>expand_term</NULL>
+ <NULL>extends</NULL>
+ <NULL>extends_object</NULL>
+ <NULL>extends_protocol</NULL>
+ <NULL>extends_category</NULL>
+ <NULL>fail</NULL>
+ <NULL>findall</NULL>
+ <NULL>float</NULL>
+ <NULL>flush_output</NULL>
+ <NULL>forall</NULL>
+ <NULL>functor</NULL>
+ <NULL>get_byte</NULL>
+ <NULL>get_char</NULL>
+ <NULL>get_code</NULL>
+ <NULL>halt</NULL>
+ <NULL>implements</NULL>
+ <NULL>implements_protocol</NULL>
+ <NULL>imports</NULL>
+ <NULL>imports_category</NULL>
+ <NULL>info</NULL>
+ <NULL>initialization</NULL>
+ <NULL>instantiates</NULL>
+ <NULL>instantiates_class</NULL>
+ <NULL>integer</NULL>
+ <NULL>logtalk_compile</NULL>
+ <NULL>logtalk_library_path</NULL>
+ <NULL>logtalk_load</NULL>
+ <NULL>meta_predicate</NULL>
+ <NULL>mode</NULL>
+ <NULL>nl</NULL>
+ <NULL>nonvar</NULL>
+ <NULL>number</NULL>
+ <NULL>number_chars</NULL>
+ <NULL>number_codes</NULL>
+ <NULL>object</NULL>
+ <NULL>object_property</NULL>
+ <NULL>once</NULL>
+ <NULL>op</NULL>
+ <NULL>open</NULL>
+ <NULL>parameter</NULL>
+ <NULL>peek_byte</NULL>
+ <NULL>peek_char</NULL>
+ <NULL>peek_code</NULL>
+ <NULL>phrase</NULL>
+ <NULL>predicate_property</NULL>
+ <NULL>private</NULL>
+ <NULL>protected</NULL>
+ <NULL>protocol</NULL>
+ <NULL>protocol_property</NULL>
+ <NULL>public</NULL>
+ <NULL>put_byte</NULL>
+ <NULL>put_char</NULL>
+ <NULL>put_code</NULL>
+ <NULL>read</NULL>
+ <NULL>read_term</NULL>
+ <NULL>repeat</NULL>
+ <NULL>retract</NULL>
+ <NULL>retractall</NULL>
+ <NULL>self</NULL>
+ <NULL>sender</NULL>
+ <NULL>setof</NULL>
+ <NULL>set_input</NULL>
+ <NULL>set_logtalk_flag</NULL>
+ <NULL>set_output</NULL>
+ <NULL>set_prolog_flag</NULL>
+ <NULL>set_stream_position</NULL>
+ <NULL>specializes</NULL>
+ <NULL>specializes_class</NULL>
+ <NULL>stream_property</NULL>
+ <NULL>sub_atom</NULL>
+ <NULL>synchronized</NULL>
+ <NULL>goal_expansion</NULL>
+ <NULL>term_expansion</NULL>
+ <NULL>this</NULL>
+ <NULL>threaded</NULL>
+ <NULL>threaded_call</NULL>
+ <NULL>threaded_once</NULL>
+ <NULL>threaded_ignore</NULL>
+ <NULL>threaded_exit</NULL>
+ <NULL>threaded_peek</NULL>
+ <NULL>threaded_wait</NULL>
+ <NULL>threaded_notify</NULL>
+ <NULL>throw</NULL>
+ <NULL>true</NULL>
+ <NULL>unify_with_occurs_check</NULL>
+ <NULL>uses</NULL>
+ <NULL>var</NULL>
+ <NULL>write</NULL>
+ <NULL>writeq</NULL>
+ <NULL>write_canonical</NULL>
+ <NULL>abs</NULL>
+ <NULL>atan</NULL>
+ <NULL>ceiling</NULL>
+ <NULL>cos</NULL>
+ <NULL>exp</NULL>
+ <NULL>float_fractional_part</NULL>
+ <NULL>float_integer_part</NULL>
+ <NULL>floor</NULL>
+ <NULL>log</NULL>
+ <NULL>mod</NULL>
+ <NULL>rem</NULL>
+ <NULL>round</NULL>
+ <NULL>sign</NULL>
+ <NULL>sin</NULL>
+ <NULL>sqrt</NULL>
+ <NULL>truncate</NULL>
+
+ </KEYWORDS>
+
+ </RULES>
+
+</MODE>
+
+
diff --git a/jEdit/modes/lotos.xml b/jEdit/modes/lotos.xml
index bd1d4b7..d47cc91 100644
--- a/jEdit/modes/lotos.xml
+++ b/jEdit/modes/lotos.xml
@@ -1,125 +1,125 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- lotos.xml K. J. Turner <kjt at cs.stir.ac.uk> 24th April 2003
-
- LOTOS (Language Of Temporal Ordering Specification) is an ISO standard
- (8807) for a formal specification language used in communications and system
- specification generally.
-
- This mode does not (yet) deal with ISO 15437 (E-LOTOS, Enhanced LOTOS).
-
- Auto-indentation occurs if the following are at the start of a line
- (ignoring leading white space): "let", "library", "process", "specification",
- "type", , ">>". This also happens if the following appear on their own (i.e.
- also ignoring trailing white space): "(", "[]", "[>", "||" "|||", "|[...]|",
- "[...]->".
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="(*"/>
- <PROPERTY NAME="commentEnd" VALUE="*)"/>
- <PROPERTY NAME="indentNextLines"
- VALUE="\s*(let|library|process|specification|type|>>).*|\s*(\(|\[\]|\[>|\|\||\|\|\||\|\[.*\]\||\[.*\]\s*->)\s*"/>
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
- <!-- Comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>(*</BEGIN>
- <END>*)</END>
- </SPAN>
-
- <!-- Standard Operators -->
- <SEQ TYPE="OPERATOR">>></SEQ>
- <SEQ TYPE="OPERATOR">[></SEQ>
- <SEQ TYPE="OPERATOR">|||</SEQ>
- <SEQ TYPE="OPERATOR">||</SEQ>
- <SEQ TYPE="OPERATOR">|[</SEQ>
- <SEQ TYPE="OPERATOR">]|</SEQ>
- <SEQ TYPE="OPERATOR">[]</SEQ>
-
- <KEYWORDS>
- <!-- Reserved Words -->
- <KEYWORD1>accept</KEYWORD1>
- <KEYWORD1>actualizedby</KEYWORD1>
- <KEYWORD1>any</KEYWORD1>
- <KEYWORD1>behavior</KEYWORD1>
- <KEYWORD1>behaviour</KEYWORD1>
- <KEYWORD1>choice</KEYWORD1>
- <KEYWORD1>endlib</KEYWORD1>
- <KEYWORD1>endproc</KEYWORD1>
- <KEYWORD1>endspec</KEYWORD1>
- <KEYWORD1>endtype</KEYWORD1>
- <KEYWORD1>eqns</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>forall</KEYWORD1>
- <KEYWORD1>formaleqns</KEYWORD1>
- <KEYWORD1>formalopns</KEYWORD1>
- <KEYWORD1>formalsorts</KEYWORD1>
- <KEYWORD1>hide</KEYWORD1>
- <KEYWORD1>i</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>is</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>library</KEYWORD1>
- <KEYWORD1>noexit</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>ofsort</KEYWORD1>
- <KEYWORD1>opnnames</KEYWORD1>
- <KEYWORD1>opns</KEYWORD1>
- <KEYWORD1>par</KEYWORD1>
- <KEYWORD1>process</KEYWORD1>
- <KEYWORD1>renamedby</KEYWORD1>
- <KEYWORD1>sortnames</KEYWORD1>
- <KEYWORD1>sorts</KEYWORD1>
- <KEYWORD1>specification</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
- <KEYWORD1>using</KEYWORD1>
- <KEYWORD1>where</KEYWORD1>
-
- <!-- Standard Library Sorts -->
- <KEYWORD2>Bit</KEYWORD2>
- <KEYWORD2>BitString</KEYWORD2>
- <KEYWORD2>Bool</KEYWORD2>
- <KEYWORD2>DecDigit</KEYWORD2>
- <KEYWORD2>DecString</KEYWORD2>
- <KEYWORD2>Element</KEYWORD2>
- <KEYWORD2>FBool</KEYWORD2>
- <KEYWORD2>HexDigit</KEYWORD2>
- <KEYWORD2>HexString</KEYWORD2>
- <KEYWORD2>OctDigit</KEYWORD2>
- <KEYWORD2>Octet</KEYWORD2>
- <KEYWORD2>OctString</KEYWORD2>
- <KEYWORD2>Nat</KEYWORD2>
- <KEYWORD2>NonEmptyString</KEYWORD2>
- <KEYWORD2>OctetString</KEYWORD2>
- <KEYWORD2>Set</KEYWORD2>
- <KEYWORD2>String</KEYWORD2>
-
- <!-- Standard Library Types (where differing from Sorts) -->
- <KEYWORD2>BasicNaturalNumber</KEYWORD2>
- <KEYWORD2>BasicNonEmptyString</KEYWORD2>
- <KEYWORD2>BitNatRepr</KEYWORD2>
- <KEYWORD2>Boolean</KEYWORD2>
- <KEYWORD2>FBoolean</KEYWORD2>
- <KEYWORD2>DecNatRepr</KEYWORD2>
- <KEYWORD2>HexNatRepr</KEYWORD2>
- <KEYWORD2>NatRepresentations</KEYWORD2>
- <KEYWORD2>NaturalNumber</KEYWORD2>
- <KEYWORD2>OctNatRepr</KEYWORD2>
- <KEYWORD2>RicherNonEmptyString</KEYWORD2>
- <KEYWORD2>String0</KEYWORD2>
- <KEYWORD2>String1</KEYWORD2>
-
- <!-- Standard Library Literals -->
- <LITERAL1>false</LITERAL1>
- <LITERAL1>true</LITERAL1>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ lotos.xml K. J. Turner <kjt at cs.stir.ac.uk> 24th April 2003
+
+ LOTOS (Language Of Temporal Ordering Specification) is an ISO standard
+ (8807) for a formal specification language used in communications and system
+ specification generally.
+
+ This mode does not (yet) deal with ISO 15437 (E-LOTOS, Enhanced LOTOS).
+
+ Auto-indentation occurs if the following are at the start of a line
+ (ignoring leading white space): "let", "library", "process", "specification",
+ "type", , ">>". This also happens if the following appear on their own (i.e.
+ also ignoring trailing white space): "(", "[]", "[>", "||" "|||", "|[...]|",
+ "[...]->".
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="(*"/>
+ <PROPERTY NAME="commentEnd" VALUE="*)"/>
+ <PROPERTY NAME="indentNextLines"
+ VALUE="\s*(let|library|process|specification|type|>>).*|\s*(\(|\[\]|\[>|\|\||\|\|\||\|\[.*\]\||\[.*\]\s*->)\s*"/>
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+ <!-- Comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>(*</BEGIN>
+ <END>*)</END>
+ </SPAN>
+
+ <!-- Standard Operators -->
+ <SEQ TYPE="OPERATOR">>></SEQ>
+ <SEQ TYPE="OPERATOR">[></SEQ>
+ <SEQ TYPE="OPERATOR">|||</SEQ>
+ <SEQ TYPE="OPERATOR">||</SEQ>
+ <SEQ TYPE="OPERATOR">|[</SEQ>
+ <SEQ TYPE="OPERATOR">]|</SEQ>
+ <SEQ TYPE="OPERATOR">[]</SEQ>
+
+ <KEYWORDS>
+ <!-- Reserved Words -->
+ <KEYWORD1>accept</KEYWORD1>
+ <KEYWORD1>actualizedby</KEYWORD1>
+ <KEYWORD1>any</KEYWORD1>
+ <KEYWORD1>behavior</KEYWORD1>
+ <KEYWORD1>behaviour</KEYWORD1>
+ <KEYWORD1>choice</KEYWORD1>
+ <KEYWORD1>endlib</KEYWORD1>
+ <KEYWORD1>endproc</KEYWORD1>
+ <KEYWORD1>endspec</KEYWORD1>
+ <KEYWORD1>endtype</KEYWORD1>
+ <KEYWORD1>eqns</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>forall</KEYWORD1>
+ <KEYWORD1>formaleqns</KEYWORD1>
+ <KEYWORD1>formalopns</KEYWORD1>
+ <KEYWORD1>formalsorts</KEYWORD1>
+ <KEYWORD1>hide</KEYWORD1>
+ <KEYWORD1>i</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>is</KEYWORD1>
+ <KEYWORD1>let</KEYWORD1>
+ <KEYWORD1>library</KEYWORD1>
+ <KEYWORD1>noexit</KEYWORD1>
+ <KEYWORD1>of</KEYWORD1>
+ <KEYWORD1>ofsort</KEYWORD1>
+ <KEYWORD1>opnnames</KEYWORD1>
+ <KEYWORD1>opns</KEYWORD1>
+ <KEYWORD1>par</KEYWORD1>
+ <KEYWORD1>process</KEYWORD1>
+ <KEYWORD1>renamedby</KEYWORD1>
+ <KEYWORD1>sortnames</KEYWORD1>
+ <KEYWORD1>sorts</KEYWORD1>
+ <KEYWORD1>specification</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>type</KEYWORD1>
+ <KEYWORD1>using</KEYWORD1>
+ <KEYWORD1>where</KEYWORD1>
+
+ <!-- Standard Library Sorts -->
+ <KEYWORD2>Bit</KEYWORD2>
+ <KEYWORD2>BitString</KEYWORD2>
+ <KEYWORD2>Bool</KEYWORD2>
+ <KEYWORD2>DecDigit</KEYWORD2>
+ <KEYWORD2>DecString</KEYWORD2>
+ <KEYWORD2>Element</KEYWORD2>
+ <KEYWORD2>FBool</KEYWORD2>
+ <KEYWORD2>HexDigit</KEYWORD2>
+ <KEYWORD2>HexString</KEYWORD2>
+ <KEYWORD2>OctDigit</KEYWORD2>
+ <KEYWORD2>Octet</KEYWORD2>
+ <KEYWORD2>OctString</KEYWORD2>
+ <KEYWORD2>Nat</KEYWORD2>
+ <KEYWORD2>NonEmptyString</KEYWORD2>
+ <KEYWORD2>OctetString</KEYWORD2>
+ <KEYWORD2>Set</KEYWORD2>
+ <KEYWORD2>String</KEYWORD2>
+
+ <!-- Standard Library Types (where differing from Sorts) -->
+ <KEYWORD2>BasicNaturalNumber</KEYWORD2>
+ <KEYWORD2>BasicNonEmptyString</KEYWORD2>
+ <KEYWORD2>BitNatRepr</KEYWORD2>
+ <KEYWORD2>Boolean</KEYWORD2>
+ <KEYWORD2>FBoolean</KEYWORD2>
+ <KEYWORD2>DecNatRepr</KEYWORD2>
+ <KEYWORD2>HexNatRepr</KEYWORD2>
+ <KEYWORD2>NatRepresentations</KEYWORD2>
+ <KEYWORD2>NaturalNumber</KEYWORD2>
+ <KEYWORD2>OctNatRepr</KEYWORD2>
+ <KEYWORD2>RicherNonEmptyString</KEYWORD2>
+ <KEYWORD2>String0</KEYWORD2>
+ <KEYWORD2>String1</KEYWORD2>
+
+ <!-- Standard Library Literals -->
+ <LITERAL1>false</LITERAL1>
+ <LITERAL1>true</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/lua.xml b/jEdit/modes/lua.xml
index 04f9f76..b473b98 100644
--- a/jEdit/modes/lua.xml
+++ b/jEdit/modes/lua.xml
@@ -1,238 +1,238 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!-- Lua 5.0 Mode, written by Philipp Janda -->
-
-<!-- TODO:
- * Autoindent screws up, if { or ( gets typed after the indentNextLines trigger
- -> This is very annoying, so I disabled the automatic indenting in this case!
- -> It should be fixed if you set doubleBracketIndent to "true", but I keep it
- disabled anyway since it is not that useful if you don't have an unindent!
- * Should I use FUNCTION and OPERATOR tags inside of <KEYWORDS>??!!
--->
-
-<MODE>
- <PROPS>
- <!-- Comments -->
- <PROPERTY NAME="lineComment" VALUE="--"/>
- <PROPERTY NAME="commentStart" VALUE="--[["/>
- <PROPERTY NAME="commentEnd" VALUE="]]"/>
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*"/>
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{"/>
- <PROPERTY NAME="indentCloseBrackets" VALUE="}"/>
- <!--
- <PROPERTY NAME="indentNextLines" VALUE=".*((then|else|do|function)).*"/>
- -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="true"/>
- </PROPS>
- <RULES IGNORE_CASE="FALSE" NO_WORD_SEP="_:." HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="[\p{Digit}]*(\.[\p{Digit}]*)?([eE][+-]?[\p{Digit}]*)?">
- <!-- Multiline comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>--[[</BEGIN>
- <END>]]</END>
- </SPAN>
- <!-- Single line comments -->
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">#!</EOL_SPAN>
- <!-- Simple string literals -->
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <!-- Multiline string literals -->
- <SPAN TYPE="LITERAL1">
- <BEGIN>[[</BEGIN>
- <END>]]</END>
- </SPAN>
- <!-- Operators -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">..</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">~=</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <!-- Function calls and definitions -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">{</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">"</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">"</SEQ>
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">'</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">'</SEQ>
-
- <KEYWORDS>
- <!-- Keywords -->
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>elseif</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD3>nil</KEYWORD3>
- <KEYWORD3>true</KEYWORD3>
- <KEYWORD3>false</KEYWORD3>
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <!-- Builtin functions or special names -->
- <KEYWORD2>assert</KEYWORD2>
- <KEYWORD2>collectgarbage</KEYWORD2>
- <KEYWORD2>dofile</KEYWORD2>
- <KEYWORD2>error</KEYWORD2>
- <KEYWORD2>_G</KEYWORD2>
- <KEYWORD2>getfenv</KEYWORD2>
- <KEYWORD2>getmetatable</KEYWORD2>
- <KEYWORD2>gcinfo</KEYWORD2>
- <KEYWORD2>ipairs</KEYWORD2>
- <KEYWORD2>loadfile</KEYWORD2>
- <KEYWORD2>loadlib</KEYWORD2>
- <KEYWORD2>loadstring</KEYWORD2>
- <KEYWORD2>next</KEYWORD2>
- <KEYWORD2>pairs</KEYWORD2>
- <KEYWORD2>pcall</KEYWORD2>
- <KEYWORD2>print</KEYWORD2>
- <KEYWORD2>rawequal</KEYWORD2>
- <KEYWORD2>rawget</KEYWORD2>
- <KEYWORD2>rawset</KEYWORD2>
- <KEYWORD2>require</KEYWORD2>
- <KEYWORD2>setfenv</KEYWORD2>
- <KEYWORD2>setmetatable</KEYWORD2>
- <KEYWORD2>tonumber</KEYWORD2>
- <KEYWORD2>tostring</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <KEYWORD2>unpack</KEYWORD2>
- <KEYWORD2>xpcall</KEYWORD2>
- <KEYWORD2>_VERSION</KEYWORD2>
- <KEYWORD2>LUA_PATH</KEYWORD2>
- <KEYWORD2>_LOADED</KEYWORD2>
- <KEYWORD2>_REQUIREDNAME</KEYWORD2>
- <KEYWORD2>_ALERT</KEYWORD2>
- <KEYWORD2>_ERRORMESSAGE</KEYWORD2>
- <KEYWORD2>_PROMPT</KEYWORD2>
- <KEYWORD2>__add</KEYWORD2>
- <KEYWORD2>__sub</KEYWORD2>
- <KEYWORD2>__mul</KEYWORD2>
- <KEYWORD2>__div</KEYWORD2>
- <KEYWORD2>__pow</KEYWORD2>
- <KEYWORD2>__unm</KEYWORD2>
- <KEYWORD2>__concat</KEYWORD2>
- <KEYWORD2>__eq</KEYWORD2>
- <KEYWORD2>__lt</KEYWORD2>
- <KEYWORD2>__le</KEYWORD2>
- <KEYWORD2>__index</KEYWORD2>
- <KEYWORD2>__newindex</KEYWORD2>
- <KEYWORD2>__call</KEYWORD2>
- <KEYWORD2>__metatable</KEYWORD2>
- <KEYWORD2>__mode</KEYWORD2>
- <KEYWORD2>__tostring</KEYWORD2>
- <KEYWORD2>__fenv</KEYWORD2>
- <KEYWORD2>...</KEYWORD2>
- <KEYWORD2>arg</KEYWORD2>
- <KEYWORD2>coroutine.create</KEYWORD2>
- <KEYWORD2>coroutine.resume</KEYWORD2>
- <KEYWORD2>coroutine.status</KEYWORD2>
- <KEYWORD2>coroutine.wrap</KEYWORD2>
- <KEYWORD2>coroutine.yield</KEYWORD2>
- <KEYWORD2>string.byte</KEYWORD2>
- <KEYWORD2>string.char</KEYWORD2>
- <KEYWORD2>string.dump</KEYWORD2>
- <KEYWORD2>string.find</KEYWORD2>
- <KEYWORD2>string.len</KEYWORD2>
- <KEYWORD2>string.lower</KEYWORD2>
- <KEYWORD2>string.rep</KEYWORD2>
- <KEYWORD2>string.sub</KEYWORD2>
- <KEYWORD2>string.upper</KEYWORD2>
- <KEYWORD2>string.format</KEYWORD2>
- <KEYWORD2>string.gfind</KEYWORD2>
- <KEYWORD2>string.gsub</KEYWORD2>
- <KEYWORD2>table.concat</KEYWORD2>
- <KEYWORD2>table.foreach</KEYWORD2>
- <KEYWORD2>table.foreachi</KEYWORD2>
- <KEYWORD2>table.getn</KEYWORD2>
- <KEYWORD2>table.sort</KEYWORD2>
- <KEYWORD2>table.insert</KEYWORD2>
- <KEYWORD2>table.remove</KEYWORD2>
- <KEYWORD2>table.setn</KEYWORD2>
- <KEYWORD2>math.abs</KEYWORD2>
- <KEYWORD2>math.acos</KEYWORD2>
- <KEYWORD2>math.asin</KEYWORD2>
- <KEYWORD2>math.atan</KEYWORD2>
- <KEYWORD2>math.atan2</KEYWORD2>
- <KEYWORD2>math.ceil</KEYWORD2>
- <KEYWORD2>math.cos</KEYWORD2>
- <KEYWORD2>math.deg</KEYWORD2>
- <KEYWORD2>math.exp</KEYWORD2>
- <KEYWORD2>math.floor</KEYWORD2>
- <KEYWORD2>math.log</KEYWORD2>
- <KEYWORD2>math.log10</KEYWORD2>
- <KEYWORD2>math.max</KEYWORD2>
- <KEYWORD2>math.min</KEYWORD2>
- <KEYWORD2>math.mod</KEYWORD2>
- <KEYWORD2>math.pow</KEYWORD2>
- <KEYWORD2>math.rad</KEYWORD2>
- <KEYWORD2>math.sin</KEYWORD2>
- <KEYWORD2>math.sqrt</KEYWORD2>
- <KEYWORD2>math.tan</KEYWORD2>
- <KEYWORD2>math.frexp</KEYWORD2>
- <KEYWORD2>math.ldexp</KEYWORD2>
- <KEYWORD2>math.random</KEYWORD2>
- <KEYWORD2>math.randomseed</KEYWORD2>
- <KEYWORD2>math.pi</KEYWORD2>
- <KEYWORD2>io.close</KEYWORD2>
- <KEYWORD2>io.flush</KEYWORD2>
- <KEYWORD2>io.input</KEYWORD2>
- <KEYWORD2>io.lines</KEYWORD2>
- <KEYWORD2>io.open</KEYWORD2>
- <KEYWORD2>io.read</KEYWORD2>
- <KEYWORD2>io.tmpfile</KEYWORD2>
- <KEYWORD2>io.type</KEYWORD2>
- <KEYWORD2>io.write</KEYWORD2>
- <KEYWORD2>io.stdin</KEYWORD2>
- <KEYWORD2>io.stdout</KEYWORD2>
- <KEYWORD2>io.stderr</KEYWORD2>
- <KEYWORD2>os.clock</KEYWORD2>
- <KEYWORD2>os.date</KEYWORD2>
- <KEYWORD2>os.difftime</KEYWORD2>
- <KEYWORD2>os.execute</KEYWORD2>
- <KEYWORD2>os.exit</KEYWORD2>
- <KEYWORD2>os.getenv</KEYWORD2>
- <KEYWORD2>os.remove</KEYWORD2>
- <KEYWORD2>os.rename</KEYWORD2>
- <KEYWORD2>os.setlocale</KEYWORD2>
- <KEYWORD2>os.time</KEYWORD2>
- <KEYWORD2>os.tmpname</KEYWORD2>
- <KEYWORD2>debug.debug</KEYWORD2>
- <KEYWORD2>debug.gethook</KEYWORD2>
- <KEYWORD2>debug.getinfo</KEYWORD2>
- <KEYWORD2>debug.getlocal</KEYWORD2>
- <KEYWORD2>debug.getupvalue</KEYWORD2>
- <KEYWORD2>debug.setlocal</KEYWORD2>
- <KEYWORD2>debug.setupvalue</KEYWORD2>
- <KEYWORD2>debug.sethook</KEYWORD2>
- <KEYWORD2>debug.traceback</KEYWORD2>
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!-- Lua 5.0 Mode, written by Philipp Janda -->
+
+<!-- TODO:
+ * Autoindent screws up, if { or ( gets typed after the indentNextLines trigger
+ -> This is very annoying, so I disabled the automatic indenting in this case!
+ -> It should be fixed if you set doubleBracketIndent to "true", but I keep it
+ disabled anyway since it is not that useful if you don't have an unindent!
+ * Should I use FUNCTION and OPERATOR tags inside of <KEYWORDS>??!!
+-->
+
+<MODE>
+ <PROPS>
+ <!-- Comments -->
+ <PROPERTY NAME="lineComment" VALUE="--"/>
+ <PROPERTY NAME="commentStart" VALUE="--[["/>
+ <PROPERTY NAME="commentEnd" VALUE="]]"/>
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*"/>
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{"/>
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}"/>
+ <!--
+ <PROPERTY NAME="indentNextLines" VALUE=".*((then|else|do|function)).*"/>
+ -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="true"/>
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" NO_WORD_SEP="_:." HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="[\p{Digit}]*(\.[\p{Digit}]*)?([eE][+-]?[\p{Digit}]*)?">
+ <!-- Multiline comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--[[</BEGIN>
+ <END>]]</END>
+ </SPAN>
+ <!-- Single line comments -->
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">#!</EOL_SPAN>
+ <!-- Simple string literals -->
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <!-- Multiline string literals -->
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>[[</BEGIN>
+ <END>]]</END>
+ </SPAN>
+ <!-- Operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">..</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">~=</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <!-- Function calls and definitions -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">{</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">"</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">"</SEQ>
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">'</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">'</SEQ>
+
+ <KEYWORDS>
+ <!-- Keywords -->
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>elseif</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD3>nil</KEYWORD3>
+ <KEYWORD3>true</KEYWORD3>
+ <KEYWORD3>false</KEYWORD3>
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <!-- Builtin functions or special names -->
+ <KEYWORD2>assert</KEYWORD2>
+ <KEYWORD2>collectgarbage</KEYWORD2>
+ <KEYWORD2>dofile</KEYWORD2>
+ <KEYWORD2>error</KEYWORD2>
+ <KEYWORD2>_G</KEYWORD2>
+ <KEYWORD2>getfenv</KEYWORD2>
+ <KEYWORD2>getmetatable</KEYWORD2>
+ <KEYWORD2>gcinfo</KEYWORD2>
+ <KEYWORD2>ipairs</KEYWORD2>
+ <KEYWORD2>loadfile</KEYWORD2>
+ <KEYWORD2>loadlib</KEYWORD2>
+ <KEYWORD2>loadstring</KEYWORD2>
+ <KEYWORD2>next</KEYWORD2>
+ <KEYWORD2>pairs</KEYWORD2>
+ <KEYWORD2>pcall</KEYWORD2>
+ <KEYWORD2>print</KEYWORD2>
+ <KEYWORD2>rawequal</KEYWORD2>
+ <KEYWORD2>rawget</KEYWORD2>
+ <KEYWORD2>rawset</KEYWORD2>
+ <KEYWORD2>require</KEYWORD2>
+ <KEYWORD2>setfenv</KEYWORD2>
+ <KEYWORD2>setmetatable</KEYWORD2>
+ <KEYWORD2>tonumber</KEYWORD2>
+ <KEYWORD2>tostring</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>unpack</KEYWORD2>
+ <KEYWORD2>xpcall</KEYWORD2>
+ <KEYWORD2>_VERSION</KEYWORD2>
+ <KEYWORD2>LUA_PATH</KEYWORD2>
+ <KEYWORD2>_LOADED</KEYWORD2>
+ <KEYWORD2>_REQUIREDNAME</KEYWORD2>
+ <KEYWORD2>_ALERT</KEYWORD2>
+ <KEYWORD2>_ERRORMESSAGE</KEYWORD2>
+ <KEYWORD2>_PROMPT</KEYWORD2>
+ <KEYWORD2>__add</KEYWORD2>
+ <KEYWORD2>__sub</KEYWORD2>
+ <KEYWORD2>__mul</KEYWORD2>
+ <KEYWORD2>__div</KEYWORD2>
+ <KEYWORD2>__pow</KEYWORD2>
+ <KEYWORD2>__unm</KEYWORD2>
+ <KEYWORD2>__concat</KEYWORD2>
+ <KEYWORD2>__eq</KEYWORD2>
+ <KEYWORD2>__lt</KEYWORD2>
+ <KEYWORD2>__le</KEYWORD2>
+ <KEYWORD2>__index</KEYWORD2>
+ <KEYWORD2>__newindex</KEYWORD2>
+ <KEYWORD2>__call</KEYWORD2>
+ <KEYWORD2>__metatable</KEYWORD2>
+ <KEYWORD2>__mode</KEYWORD2>
+ <KEYWORD2>__tostring</KEYWORD2>
+ <KEYWORD2>__fenv</KEYWORD2>
+ <KEYWORD2>...</KEYWORD2>
+ <KEYWORD2>arg</KEYWORD2>
+ <KEYWORD2>coroutine.create</KEYWORD2>
+ <KEYWORD2>coroutine.resume</KEYWORD2>
+ <KEYWORD2>coroutine.status</KEYWORD2>
+ <KEYWORD2>coroutine.wrap</KEYWORD2>
+ <KEYWORD2>coroutine.yield</KEYWORD2>
+ <KEYWORD2>string.byte</KEYWORD2>
+ <KEYWORD2>string.char</KEYWORD2>
+ <KEYWORD2>string.dump</KEYWORD2>
+ <KEYWORD2>string.find</KEYWORD2>
+ <KEYWORD2>string.len</KEYWORD2>
+ <KEYWORD2>string.lower</KEYWORD2>
+ <KEYWORD2>string.rep</KEYWORD2>
+ <KEYWORD2>string.sub</KEYWORD2>
+ <KEYWORD2>string.upper</KEYWORD2>
+ <KEYWORD2>string.format</KEYWORD2>
+ <KEYWORD2>string.gfind</KEYWORD2>
+ <KEYWORD2>string.gsub</KEYWORD2>
+ <KEYWORD2>table.concat</KEYWORD2>
+ <KEYWORD2>table.foreach</KEYWORD2>
+ <KEYWORD2>table.foreachi</KEYWORD2>
+ <KEYWORD2>table.getn</KEYWORD2>
+ <KEYWORD2>table.sort</KEYWORD2>
+ <KEYWORD2>table.insert</KEYWORD2>
+ <KEYWORD2>table.remove</KEYWORD2>
+ <KEYWORD2>table.setn</KEYWORD2>
+ <KEYWORD2>math.abs</KEYWORD2>
+ <KEYWORD2>math.acos</KEYWORD2>
+ <KEYWORD2>math.asin</KEYWORD2>
+ <KEYWORD2>math.atan</KEYWORD2>
+ <KEYWORD2>math.atan2</KEYWORD2>
+ <KEYWORD2>math.ceil</KEYWORD2>
+ <KEYWORD2>math.cos</KEYWORD2>
+ <KEYWORD2>math.deg</KEYWORD2>
+ <KEYWORD2>math.exp</KEYWORD2>
+ <KEYWORD2>math.floor</KEYWORD2>
+ <KEYWORD2>math.log</KEYWORD2>
+ <KEYWORD2>math.log10</KEYWORD2>
+ <KEYWORD2>math.max</KEYWORD2>
+ <KEYWORD2>math.min</KEYWORD2>
+ <KEYWORD2>math.mod</KEYWORD2>
+ <KEYWORD2>math.pow</KEYWORD2>
+ <KEYWORD2>math.rad</KEYWORD2>
+ <KEYWORD2>math.sin</KEYWORD2>
+ <KEYWORD2>math.sqrt</KEYWORD2>
+ <KEYWORD2>math.tan</KEYWORD2>
+ <KEYWORD2>math.frexp</KEYWORD2>
+ <KEYWORD2>math.ldexp</KEYWORD2>
+ <KEYWORD2>math.random</KEYWORD2>
+ <KEYWORD2>math.randomseed</KEYWORD2>
+ <KEYWORD2>math.pi</KEYWORD2>
+ <KEYWORD2>io.close</KEYWORD2>
+ <KEYWORD2>io.flush</KEYWORD2>
+ <KEYWORD2>io.input</KEYWORD2>
+ <KEYWORD2>io.lines</KEYWORD2>
+ <KEYWORD2>io.open</KEYWORD2>
+ <KEYWORD2>io.read</KEYWORD2>
+ <KEYWORD2>io.tmpfile</KEYWORD2>
+ <KEYWORD2>io.type</KEYWORD2>
+ <KEYWORD2>io.write</KEYWORD2>
+ <KEYWORD2>io.stdin</KEYWORD2>
+ <KEYWORD2>io.stdout</KEYWORD2>
+ <KEYWORD2>io.stderr</KEYWORD2>
+ <KEYWORD2>os.clock</KEYWORD2>
+ <KEYWORD2>os.date</KEYWORD2>
+ <KEYWORD2>os.difftime</KEYWORD2>
+ <KEYWORD2>os.execute</KEYWORD2>
+ <KEYWORD2>os.exit</KEYWORD2>
+ <KEYWORD2>os.getenv</KEYWORD2>
+ <KEYWORD2>os.remove</KEYWORD2>
+ <KEYWORD2>os.rename</KEYWORD2>
+ <KEYWORD2>os.setlocale</KEYWORD2>
+ <KEYWORD2>os.time</KEYWORD2>
+ <KEYWORD2>os.tmpname</KEYWORD2>
+ <KEYWORD2>debug.debug</KEYWORD2>
+ <KEYWORD2>debug.gethook</KEYWORD2>
+ <KEYWORD2>debug.getinfo</KEYWORD2>
+ <KEYWORD2>debug.getlocal</KEYWORD2>
+ <KEYWORD2>debug.getupvalue</KEYWORD2>
+ <KEYWORD2>debug.setlocal</KEYWORD2>
+ <KEYWORD2>debug.setupvalue</KEYWORD2>
+ <KEYWORD2>debug.sethook</KEYWORD2>
+ <KEYWORD2>debug.traceback</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/mail.xml b/jEdit/modes/mail.xml
index ac49069..e4766c5 100644
--- a/jEdit/modes/mail.xml
+++ b/jEdit/modes/mail.xml
@@ -1,35 +1,35 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=">" />
- <PROPERTY NAME="noWordSep" VALUE="-_" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP="-_:)">
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT3">>>></EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">>></EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">></EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">| </EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">:</EOL_SPAN>
- <SEQ TYPE="COMMENT2" DELEGATE="SIGNATURE"
- AT_LINE_START="TRUE">-- </SEQ>
- <SEQ TYPE="KEYWORD1">:-)</SEQ>
- <SEQ TYPE="KEYWORD1">:-(</SEQ>
- <SEQ TYPE="KEYWORD1">:)</SEQ>
- <SEQ TYPE="KEYWORD1">:(</SEQ>
- <SEQ TYPE="KEYWORD1">;-)</SEQ>
- <SEQ TYPE="KEYWORD1">;-(</SEQ>
- <SEQ TYPE="KEYWORD1">;)</SEQ>
- <SEQ TYPE="KEYWORD1">;(</SEQ>
- <MARK_PREVIOUS AT_LINE_START="TRUE" TYPE="LABEL">:</MARK_PREVIOUS>
- </RULES>
- <RULES SET="SIGNATURE" DEFAULT="COMMENT2"/>
- <RULES SET="HEADER" DEFAULT="MARKUP">
- <SPAN NO_LINE_BREAK="TRUE" TYPE="KEYWORD2">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=">" />
+ <PROPERTY NAME="noWordSep" VALUE="-_" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP="-_:)">
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT3">>>></EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">>></EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">></EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">| </EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">:</EOL_SPAN>
+ <SEQ TYPE="COMMENT2" DELEGATE="SIGNATURE"
+ AT_LINE_START="TRUE">-- </SEQ>
+ <SEQ TYPE="KEYWORD1">:-)</SEQ>
+ <SEQ TYPE="KEYWORD1">:-(</SEQ>
+ <SEQ TYPE="KEYWORD1">:)</SEQ>
+ <SEQ TYPE="KEYWORD1">:(</SEQ>
+ <SEQ TYPE="KEYWORD1">;-)</SEQ>
+ <SEQ TYPE="KEYWORD1">;-(</SEQ>
+ <SEQ TYPE="KEYWORD1">;)</SEQ>
+ <SEQ TYPE="KEYWORD1">;(</SEQ>
+ <MARK_PREVIOUS AT_LINE_START="TRUE" TYPE="LABEL">:</MARK_PREVIOUS>
+ </RULES>
+ <RULES SET="SIGNATURE" DEFAULT="COMMENT2"/>
+ <RULES SET="HEADER" DEFAULT="MARKUP">
+ <SPAN NO_LINE_BREAK="TRUE" TYPE="KEYWORD2">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/makefile.xml b/jEdit/modes/makefile.xml
index 0f3ef57..a728de8 100644
--- a/jEdit/modes/makefile.xml
+++ b/jEdit/modes/makefile.xml
@@ -1,101 +1,101 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comment -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- Function calls -->
- <SPAN_REGEXP TYPE="FUNCTION" HASH_CHAR="$" DELEGATE="MAIN">
- <BEGIN>\$\([a-zA-Z][\w-]* </BEGIN>
- <END>)</END>
- </SPAN_REGEXP>
-
- <!-- $(...) variables -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>$(</BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
-
- <!-- Literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">+=</SEQ>
- <SEQ TYPE="OPERATOR">?=</SEQ>
-
- <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <KEYWORDS>
- <KEYWORD1>subst</KEYWORD1>
- <KEYWORD1>addprefix</KEYWORD1>
- <KEYWORD1>addsuffix</KEYWORD1>
- <KEYWORD1>basename</KEYWORD1>
- <KEYWORD1>dir</KEYWORD1>
- <KEYWORD1>filter</KEYWORD1>
- <KEYWORD1>filter-out</KEYWORD1>
- <KEYWORD1>findstring</KEYWORD1>
- <KEYWORD1>firstword</KEYWORD1>
- <KEYWORD1>foreach</KEYWORD1>
- <KEYWORD1>join</KEYWORD1>
- <KEYWORD1>notdir</KEYWORD1>
- <KEYWORD1>origin</KEYWORD1>
- <KEYWORD1>patsubst</KEYWORD1>
- <KEYWORD1>shell</KEYWORD1>
- <KEYWORD1>sort</KEYWORD1>
- <KEYWORD1>strip</KEYWORD1>
- <KEYWORD1>suffix</KEYWORD1>
- <KEYWORD1>wildcard</KEYWORD1>
- <KEYWORD1>word</KEYWORD1>
- <KEYWORD1>words</KEYWORD1>
- <KEYWORD1>ifeq</KEYWORD1>
- <KEYWORD1>ifneq</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>endif</KEYWORD1>
- <KEYWORD1>define</KEYWORD1>
- <KEYWORD1>endef</KEYWORD1>
- <KEYWORD1>ifdef</KEYWORD1>
- <KEYWORD1>ifndef</KEYWORD1>
- </KEYWORDS>
-
- </RULES>
-
- <RULES SET="VARIABLE" ESCAPE="\" IGNORE_CASE="FALSE"
- DEFAULT="KEYWORD2">
- <!-- Comment -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- $(...) variables -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>$(</BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comment -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- Function calls -->
+ <SPAN_REGEXP TYPE="FUNCTION" HASH_CHAR="$" DELEGATE="MAIN">
+ <BEGIN>\$\([a-zA-Z][\w-]* </BEGIN>
+ <END>)</END>
+ </SPAN_REGEXP>
+
+ <!-- $(...) variables -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>$(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+
+ <!-- Literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">+=</SEQ>
+ <SEQ TYPE="OPERATOR">?=</SEQ>
+
+ <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <KEYWORDS>
+ <KEYWORD1>subst</KEYWORD1>
+ <KEYWORD1>addprefix</KEYWORD1>
+ <KEYWORD1>addsuffix</KEYWORD1>
+ <KEYWORD1>basename</KEYWORD1>
+ <KEYWORD1>dir</KEYWORD1>
+ <KEYWORD1>filter</KEYWORD1>
+ <KEYWORD1>filter-out</KEYWORD1>
+ <KEYWORD1>findstring</KEYWORD1>
+ <KEYWORD1>firstword</KEYWORD1>
+ <KEYWORD1>foreach</KEYWORD1>
+ <KEYWORD1>join</KEYWORD1>
+ <KEYWORD1>notdir</KEYWORD1>
+ <KEYWORD1>origin</KEYWORD1>
+ <KEYWORD1>patsubst</KEYWORD1>
+ <KEYWORD1>shell</KEYWORD1>
+ <KEYWORD1>sort</KEYWORD1>
+ <KEYWORD1>strip</KEYWORD1>
+ <KEYWORD1>suffix</KEYWORD1>
+ <KEYWORD1>wildcard</KEYWORD1>
+ <KEYWORD1>word</KEYWORD1>
+ <KEYWORD1>words</KEYWORD1>
+ <KEYWORD1>ifeq</KEYWORD1>
+ <KEYWORD1>ifneq</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>endif</KEYWORD1>
+ <KEYWORD1>define</KEYWORD1>
+ <KEYWORD1>endef</KEYWORD1>
+ <KEYWORD1>ifdef</KEYWORD1>
+ <KEYWORD1>ifndef</KEYWORD1>
+ </KEYWORDS>
+
+ </RULES>
+
+ <RULES SET="VARIABLE" ESCAPE="\" IGNORE_CASE="FALSE"
+ DEFAULT="KEYWORD2">
+ <!-- Comment -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- $(...) variables -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>$(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/maple.xml b/jEdit/modes/maple.xml
index 29816e9..8925d1b 100644
--- a/jEdit/modes/maple.xml
+++ b/jEdit/modes/maple.xml
@@ -1,735 +1,735 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Maple mode, by Jack Perry jeperry at eos.ncsu.edu -->
-<!-- Based on commands for Maple 7 -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Standard literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
- <SEQ TYPE="OPERATOR">@@</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">||</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">::</SEQ>
- <SEQ TYPE="OPERATOR">:-</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
-
- <KEYWORDS>
- <!-- Reserved words -->
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>xor</KEYWORD1>
- <KEYWORD1>union</KEYWORD1>
- <KEYWORD1>intersect</KEYWORD1>
- <KEYWORD1>minus</KEYWORD1>
- <KEYWORD1>mod</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>assuming</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>by</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>description</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>done</KEYWORD1>
- <KEYWORD1>elif</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>error</KEYWORD1>
- <KEYWORD1>export</KEYWORD1>
- <KEYWORD1>fi</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>from</KEYWORD1>
- <KEYWORD1>global</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>implies</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>module</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>od</KEYWORD1>
- <KEYWORD1>option</KEYWORD1>
- <KEYWORD1>options</KEYWORD1>
- <KEYWORD1>proc</KEYWORD1>
- <KEYWORD1>quit</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>save</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>subset</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <!-- Standard library functions -->
- <FUNCTION>about</FUNCTION>
- <FUNCTION>ans</FUNCTION>
- <FUNCTION>add</FUNCTION>
- <FUNCTION>addcoords</FUNCTION>
- <FUNCTION>additionally</FUNCTION>
- <FUNCTION>addproperty</FUNCTION>
- <FUNCTION>addressof</FUNCTION>
- <FUNCTION>AFactor</FUNCTION>
- <FUNCTION>AFactors</FUNCTION>
- <FUNCTION>AIrreduc</FUNCTION>
- <FUNCTION>AiryAi</FUNCTION>
- <FUNCTION>AiryAiZeros</FUNCTION>
- <FUNCTION>AiryBi</FUNCTION>
- <FUNCTION>AiryBiZeros</FUNCTION>
- <FUNCTION>algebraic</FUNCTION>
- <FUNCTION>algsubs</FUNCTION>
- <FUNCTION>alias</FUNCTION>
- <FUNCTION>allvalues</FUNCTION>
- <FUNCTION>anames</FUNCTION>
- <FUNCTION>AngerJ</FUNCTION>
- <FUNCTION>antihermitian</FUNCTION>
- <FUNCTION>antisymm</FUNCTION>
- <FUNCTION>apply</FUNCTION>
- <FUNCTION>applyop</FUNCTION>
- <FUNCTION>applyrule</FUNCTION>
- <FUNCTION>arccos</FUNCTION>
- <FUNCTION>arccosh</FUNCTION>
- <FUNCTION>arccot</FUNCTION>
- <FUNCTION>arccoth</FUNCTION>
- <FUNCTION>arccsc</FUNCTION>
- <FUNCTION>arccsch</FUNCTION>
- <FUNCTION>arcsec</FUNCTION>
- <FUNCTION>arcsech</FUNCTION>
- <FUNCTION>arcsin</FUNCTION>
- <FUNCTION>arcsinh</FUNCTION>
- <FUNCTION>arctan</FUNCTION>
- <FUNCTION>arctanh</FUNCTION>
- <FUNCTION>argument</FUNCTION>
- <FUNCTION>Array</FUNCTION>
- <FUNCTION>array</FUNCTION>
- <FUNCTION>ArrayDims</FUNCTION>
- <FUNCTION>ArrayElems</FUNCTION>
- <FUNCTION>ArrayIndFns</FUNCTION>
- <FUNCTION>ArrayOptions</FUNCTION>
- <FUNCTION>assign</FUNCTION>
- <FUNCTION>assigned</FUNCTION>
- <FUNCTION>asspar</FUNCTION>
- <FUNCTION>assume</FUNCTION>
- <FUNCTION>asympt</FUNCTION>
- <FUNCTION>attributes</FUNCTION>
- <FUNCTION>band</FUNCTION>
- <FUNCTION>Berlekamp</FUNCTION>
- <FUNCTION>bernoulli</FUNCTION>
- <FUNCTION>bernstein</FUNCTION>
- <FUNCTION>BesselI</FUNCTION>
- <FUNCTION>BesselJ</FUNCTION>
- <FUNCTION>BesselJZeros</FUNCTION>
- <FUNCTION>BesselK</FUNCTION>
- <FUNCTION>BesselY</FUNCTION>
- <FUNCTION>BesselYZeros</FUNCTION>
- <FUNCTION>Beta</FUNCTION>
- <FUNCTION>branches</FUNCTION>
- <FUNCTION>C</FUNCTION>
- <FUNCTION>cat</FUNCTION>
- <FUNCTION>ceil</FUNCTION>
- <FUNCTION>changecoords</FUNCTION>
- <FUNCTION>charfcn</FUNCTION>
- <FUNCTION>ChebyshevT</FUNCTION>
- <FUNCTION>ChebyShevU</FUNCTION>
- <FUNCTION>CheckArgs</FUNCTION>
- <FUNCTION>Chi</FUNCTION>
- <FUNCTION>chrem</FUNCTION>
- <FUNCTION>Ci</FUNCTION>
- <FUNCTION>close</FUNCTION>
- <FUNCTION>coeff</FUNCTION>
- <FUNCTION>coeffs</FUNCTION>
- <FUNCTION>coeftayl</FUNCTION>
- <FUNCTION>collect</FUNCTION>
- <FUNCTION>combine</FUNCTION>
- <FUNCTION>comparray</FUNCTION>
- <FUNCTION>compiletable</FUNCTION>
- <FUNCTION>compoly</FUNCTION>
- <FUNCTION>CompSeq</FUNCTION>
- <FUNCTION>conjugate</FUNCTION>
- <FUNCTION>constant</FUNCTION>
- <FUNCTION>Content</FUNCTION>
- <FUNCTION>content</FUNCTION>
- <FUNCTION>convergs</FUNCTION>
- <FUNCTION>convert</FUNCTION>
- <FUNCTION>coords</FUNCTION>
- <FUNCTION>copy</FUNCTION>
- <FUNCTION>CopySign</FUNCTION>
- <FUNCTION>cos</FUNCTION>
- <FUNCTION>cosh</FUNCTION>
- <FUNCTION>cot</FUNCTION>
- <FUNCTION>coth</FUNCTION>
- <FUNCTION>coulditbe</FUNCTION>
- <FUNCTION>csc</FUNCTION>
- <FUNCTION>csch</FUNCTION>
- <FUNCTION>csgn</FUNCTION>
- <FUNCTION>currentdir</FUNCTION>
- <FUNCTION>curry</FUNCTION>
- <FUNCTION>CylinderD</FUNCTION>
- <FUNCTION>CylinderU</FUNCTION>
- <FUNCTION>CylinderV</FUNCTION>
- <FUNCTION>D</FUNCTION>
- <FUNCTION>dawson</FUNCTION>
- <FUNCTION>Default0</FUNCTION>
- <FUNCTION>DefaultOverflow</FUNCTION>
- <FUNCTION>DefaultUnderflow</FUNCTION>
- <FUNCTION>define</FUNCTION>
- <FUNCTION>define_external</FUNCTION>
- <FUNCTION>degree</FUNCTION>
- <FUNCTION>denom</FUNCTION>
- <FUNCTION>depends</FUNCTION>
- <FUNCTION>DESol</FUNCTION>
- <FUNCTION>Det</FUNCTION>
- <FUNCTION>diagon</FUNCTION>
- <FUNCTION>Diff</FUNCTION>
- <FUNCTION>diff</FUNCTION>
- <FUNCTION>diffop</FUNCTION>
- <FUNCTION>Digits</FUNCTION>
- <FUNCTION>dilog</FUNCTION>
- <FUNCTION>dinterp</FUNCTION>
- <FUNCTION>Dirac</FUNCTION>
- <FUNCTION>disassemble</FUNCTION>
- <FUNCTION>discont</FUNCTION>
- <FUNCTION>discrim</FUNCTION>
- <FUNCTION>dismantle</FUNCTION>
- <FUNCTION>DistDeg</FUNCTION>
- <FUNCTION>Divide</FUNCTION>
- <FUNCTION>divide</FUNCTION>
- <FUNCTION>dsolve</FUNCTION>
- <FUNCTION>efficiency</FUNCTION>
- <FUNCTION>Ei</FUNCTION>
- <FUNCTION>Eigenvals</FUNCTION>
- <FUNCTION>eliminate</FUNCTION>
- <FUNCTION>ellipsoid</FUNCTION>
- <FUNCTION>EllipticCE</FUNCTION>
- <FUNCTION>EllipticCK</FUNCTION>
- <FUNCTION>EllipticCPi</FUNCTION>
- <FUNCTION>EllipticE</FUNCTION>
- <FUNCTION>EllipticF</FUNCTION>
- <FUNCTION>EllipticK</FUNCTION>
- <FUNCTION>EllipticModulus</FUNCTION>
- <FUNCTION>EllipticNome</FUNCTION>
- <FUNCTION>EllipticPi</FUNCTION>
- <FUNCTION>elliptic_int</FUNCTION>
- <FUNCTION>entries</FUNCTION>
- <FUNCTION>erf</FUNCTION>
- <FUNCTION>erfc</FUNCTION>
- <FUNCTION>erfi</FUNCTION>
- <FUNCTION>euler</FUNCTION>
- <FUNCTION>eulermac</FUNCTION>
- <FUNCTION>Eval</FUNCTION>
- <FUNCTION>eval</FUNCTION>
- <FUNCTION>evala</FUNCTION>
- <FUNCTION>evalapply</FUNCTION>
- <FUNCTION>evalb</FUNCTION>
- <FUNCTION>evalc</FUNCTION>
- <FUNCTION>evalf</FUNCTION>
- <FUNCTION>evalfint</FUNCTION>
- <FUNCTION>evalhf</FUNCTION>
- <FUNCTION>evalm</FUNCTION>
- <FUNCTION>evaln</FUNCTION>
- <FUNCTION>evalr</FUNCTION>
- <FUNCTION>evalrC</FUNCTION>
- <FUNCTION>events</FUNCTION>
- <FUNCTION>Excel</FUNCTION>
- <FUNCTION>exists</FUNCTION>
- <FUNCTION>exp</FUNCTION>
- <FUNCTION>Expand</FUNCTION>
- <FUNCTION>expand</FUNCTION>
- <FUNCTION>expandoff</FUNCTION>
- <FUNCTION>expandon</FUNCTION>
- <FUNCTION>exports</FUNCTION>
- <FUNCTION>extract</FUNCTION>
- <FUNCTION>extrema</FUNCTION>
- <FUNCTION>Factor</FUNCTION>
- <FUNCTION>factor</FUNCTION>
- <FUNCTION>Factors</FUNCTION>
- <FUNCTION>factors</FUNCTION>
- <FUNCTION>fclose</FUNCTION>
- <FUNCTION>fdiscont</FUNCTION>
- <FUNCTION>feof</FUNCTION>
- <FUNCTION>fflush</FUNCTION>
- <FUNCTION>FFT</FUNCTION>
- <FUNCTION>filepos</FUNCTION>
- <FUNCTION>fixdiv</FUNCTION>
- <FUNCTION>float</FUNCTION>
- <FUNCTION>floor</FUNCTION>
- <FUNCTION>fnormal</FUNCTION>
- <FUNCTION>fold</FUNCTION>
- <FUNCTION>fopen</FUNCTION>
- <FUNCTION>forall</FUNCTION>
- <FUNCTION>forget</FUNCTION>
- <FUNCTION>fprintf</FUNCTION>
- <FUNCTION>frac</FUNCTION>
- <FUNCTION>freeze</FUNCTION>
- <FUNCTION>frem</FUNCTION>
- <FUNCTION>fremove</FUNCTION>
- <FUNCTION>FresnelC</FUNCTION>
- <FUNCTION>Fresnelf</FUNCTION>
- <FUNCTION>Fresnelg</FUNCTION>
- <FUNCTION>FresnelS</FUNCTION>
- <FUNCTION>FromInert</FUNCTION>
- <FUNCTION>frontend</FUNCTION>
- <FUNCTION>fscanf</FUNCTION>
- <FUNCTION>fsolve</FUNCTION>
- <FUNCTION>galois</FUNCTION>
- <FUNCTION>GAMMA</FUNCTION>
- <FUNCTION>GaussAGM</FUNCTION>
- <FUNCTION>Gausselim</FUNCTION>
- <FUNCTION>Gaussjord</FUNCTION>
- <FUNCTION>gc</FUNCTION>
- <FUNCTION>Gcd</FUNCTION>
- <FUNCTION>gcd</FUNCTION>
- <FUNCTION>Gcdex</FUNCTION>
- <FUNCTION>gcdex</FUNCTION>
- <FUNCTION>GegenbauerC</FUNCTION>
- <FUNCTION>genpoly</FUNCTION>
- <FUNCTION>getenv</FUNCTION>
- <FUNCTION>GetResultDataType</FUNCTION>
- <FUNCTION>GetResultShape</FUNCTION>
- <FUNCTION>GF</FUNCTION>
- <FUNCTION>Greek</FUNCTION>
- <FUNCTION>HankelH1</FUNCTION>
- <FUNCTION>HankelH2</FUNCTION>
- <FUNCTION>harmonic</FUNCTION>
- <FUNCTION>has</FUNCTION>
- <FUNCTION>hasfun</FUNCTION>
- <FUNCTION>hasoption</FUNCTION>
- <FUNCTION>hastype</FUNCTION>
- <FUNCTION>heap</FUNCTION>
- <FUNCTION>Heaviside</FUNCTION>
- <FUNCTION>Hermite</FUNCTION>
- <FUNCTION>HermiteH</FUNCTION>
- <FUNCTION>hermitian</FUNCTION>
- <FUNCTION>Hessenberg</FUNCTION>
- <FUNCTION>hfarray</FUNCTION>
- <FUNCTION>history</FUNCTION>
- <FUNCTION>hypergeom</FUNCTION>
- <FUNCTION>icontent</FUNCTION>
- <FUNCTION>identity</FUNCTION>
- <FUNCTION>IEEEdiffs</FUNCTION>
- <FUNCTION>ifactor</FUNCTION>
- <FUNCTION>ifactors</FUNCTION>
- <FUNCTION>iFFT</FUNCTION>
- <FUNCTION>igcd</FUNCTION>
- <FUNCTION>igcdex</FUNCTION>
- <FUNCTION>ilcm</FUNCTION>
- <FUNCTION>ilog10</FUNCTION>
- <FUNCTION>ilog2</FUNCTION>
- <FUNCTION>ilog</FUNCTION>
- <FUNCTION>Im</FUNCTION>
- <FUNCTION>implicitdiff</FUNCTION>
- <FUNCTION>ImportMatrix</FUNCTION>
- <FUNCTION>ImportVector</FUNCTION>
- <FUNCTION>indets</FUNCTION>
- <FUNCTION>index</FUNCTION>
- <FUNCTION>indexed</FUNCTION>
- <FUNCTION>indices</FUNCTION>
- <FUNCTION>inifcn</FUNCTION>
- <FUNCTION>ininame</FUNCTION>
- <FUNCTION>initialcondition</FUNCTION>
- <FUNCTION>initialize</FUNCTION>
- <FUNCTION>insert</FUNCTION>
- <FUNCTION>int</FUNCTION>
- <FUNCTION>intat</FUNCTION>
- <FUNCTION>interface</FUNCTION>
- <FUNCTION>Interp</FUNCTION>
- <FUNCTION>interp</FUNCTION>
- <FUNCTION>Inverse</FUNCTION>
- <FUNCTION>invfunc</FUNCTION>
- <FUNCTION>invztrans</FUNCTION>
- <FUNCTION>iostatus</FUNCTION>
- <FUNCTION>iperfpow</FUNCTION>
- <FUNCTION>iquo</FUNCTION>
- <FUNCTION>iratrecon</FUNCTION>
- <FUNCTION>irem</FUNCTION>
- <FUNCTION>iroot</FUNCTION>
- <FUNCTION>Irreduc</FUNCTION>
- <FUNCTION>irreduc</FUNCTION>
- <FUNCTION>is</FUNCTION>
- <FUNCTION>iscont</FUNCTION>
- <FUNCTION>isdifferential</FUNCTION>
- <FUNCTION>IsMatrixShape</FUNCTION>
- <FUNCTION>isolate</FUNCTION>
- <FUNCTION>isolve</FUNCTION>
- <FUNCTION>ispoly</FUNCTION>
- <FUNCTION>isprime</FUNCTION>
- <FUNCTION>isqrfree</FUNCTION>
- <FUNCTION>isqrt</FUNCTION>
- <FUNCTION>issqr</FUNCTION>
- <FUNCTION>ithprime</FUNCTION>
- <FUNCTION>JacobiAM</FUNCTION>
- <FUNCTION>JacobiCD</FUNCTION>
- <FUNCTION>JacobiCN</FUNCTION>
- <FUNCTION>JacobiCS</FUNCTION>
- <FUNCTION>JacobiDC</FUNCTION>
- <FUNCTION>JacobiDN</FUNCTION>
- <FUNCTION>JacobiDS</FUNCTION>
- <FUNCTION>JacobiNC</FUNCTION>
- <FUNCTION>JacobiND</FUNCTION>
- <FUNCTION>JacobiNS</FUNCTION>
- <FUNCTION>JacobiP</FUNCTION>
- <FUNCTION>JacobiSC</FUNCTION>
- <FUNCTION>JacobiSD</FUNCTION>
- <FUNCTION>JacobiSN</FUNCTION>
- <FUNCTION>JacobiTheta1</FUNCTION>
- <FUNCTION>JacobiTheta2</FUNCTION>
- <FUNCTION>JacobiTheta3</FUNCTION>
- <FUNCTION>JacobiTheta4</FUNCTION>
- <FUNCTION>JacobiZeta</FUNCTION>
- <FUNCTION>KelvinBei</FUNCTION>
- <FUNCTION>KelvinBer</FUNCTION>
- <FUNCTION>KelvinHei</FUNCTION>
- <FUNCTION>KelvinHer</FUNCTION>
- <FUNCTION>KelvinKei</FUNCTION>
- <FUNCTION>KelvinKer</FUNCTION>
- <FUNCTION>KummerM</FUNCTION>
- <FUNCTION>KummerU</FUNCTION>
- <FUNCTION>LaguerreL</FUNCTION>
- <FUNCTION>LambertW</FUNCTION>
- <FUNCTION>latex</FUNCTION>
- <FUNCTION>lattice</FUNCTION>
- <FUNCTION>lcm</FUNCTION>
- <FUNCTION>Lcm</FUNCTION>
- <FUNCTION>lcoeff</FUNCTION>
- <FUNCTION>leadterm</FUNCTION>
- <FUNCTION>LegendreP</FUNCTION>
- <FUNCTION>LegendreQ</FUNCTION>
- <FUNCTION>length</FUNCTION>
- <FUNCTION>LerchPhi</FUNCTION>
- <FUNCTION>lexorder</FUNCTION>
- <FUNCTION>lhs</FUNCTION>
- <FUNCTION>CLi</FUNCTION>
- <FUNCTION>Limit</FUNCTION>
- <FUNCTION>limit</FUNCTION>
- <FUNCTION>Linsolve</FUNCTION>
- <FUNCTION>ln</FUNCTION>
- <FUNCTION>lnGAMMA</FUNCTION>
- <FUNCTION>log</FUNCTION>
- <FUNCTION>log10</FUNCTION>
- <FUNCTION>LommelS1</FUNCTION>
- <FUNCTION>Lommels2</FUNCTION>
- <FUNCTION>lprint</FUNCTION>
- <FUNCTION>map</FUNCTION>
- <FUNCTION>map2</FUNCTION>
- <FUNCTION>Maple_floats</FUNCTION>
- <FUNCTION>match</FUNCTION>
- <FUNCTION>MatlabMatrix</FUNCTION>
- <FUNCTION>Matrix</FUNCTION>
- <FUNCTION>matrix</FUNCTION>
- <FUNCTION>MatrixOptions</FUNCTION>
- <FUNCTION>max</FUNCTION>
- <FUNCTION>maximize</FUNCTION>
- <FUNCTION>maxnorm</FUNCTION>
- <FUNCTION>maxorder</FUNCTION>
- <FUNCTION>MeijerG</FUNCTION>
- <FUNCTION>member</FUNCTION>
- <FUNCTION>min</FUNCTION>
- <FUNCTION>minimize</FUNCTION>
- <FUNCTION>mkdir</FUNCTION>
- <FUNCTION>ModifiedMeijerG</FUNCTION>
- <FUNCTION>modp</FUNCTION>
- <FUNCTION>modp1</FUNCTION>
- <FUNCTION>modp2</FUNCTION>
- <FUNCTION>modpol</FUNCTION>
- <FUNCTION>mods</FUNCTION>
- <FUNCTION>module</FUNCTION>
- <FUNCTION>MOLS</FUNCTION>
- <FUNCTION>msolve</FUNCTION>
- <FUNCTION>mtaylor</FUNCTION>
- <FUNCTION>mul</FUNCTION>
- <FUNCTION>NextAfter</FUNCTION>
- <FUNCTION>nextprime</FUNCTION>
- <FUNCTION>nops</FUNCTION>
- <FUNCTION>norm</FUNCTION>
- <FUNCTION>norm</FUNCTION>
- <FUNCTION>Normal</FUNCTION>
- <FUNCTION>normal</FUNCTION>
- <FUNCTION>nprintf</FUNCTION>
- <FUNCTION>Nullspace</FUNCTION>
- <FUNCTION>numboccur</FUNCTION>
- <FUNCTION>numer</FUNCTION>
- <FUNCTION>NumericClass</FUNCTION>
- <FUNCTION>NumericEvent</FUNCTION>
- <FUNCTION>NumericEventHandler</FUNCTION>
- <FUNCTION>NumericException</FUNCTION>
- <FUNCTION>numerics</FUNCTION>
- <FUNCTION>NumericStatus</FUNCTION>
- <FUNCTION>odetest</FUNCTION>
- <FUNCTION>op</FUNCTION>
- <FUNCTION>open</FUNCTION>
- <FUNCTION>order</FUNCTION>
- <FUNCTION>OrderedNE</FUNCTION>
- <FUNCTION>parse</FUNCTION>
- <FUNCTION>patmatch</FUNCTION>
- <FUNCTION>pclose</FUNCTION>
- <FUNCTION>PDEplot_options</FUNCTION>
- <FUNCTION>pdesolve</FUNCTION>
- <FUNCTION>pdetest</FUNCTION>
- <FUNCTION>pdsolve</FUNCTION>
- <FUNCTION>piecewise</FUNCTION>
- <FUNCTION>plot</FUNCTION>
- <FUNCTION>plot3d</FUNCTION>
- <FUNCTION>plotsetup</FUNCTION>
- <FUNCTION>pochhammer</FUNCTION>
- <FUNCTION>pointto</FUNCTION>
- <FUNCTION>poisson</FUNCTION>
- <FUNCTION>polar</FUNCTION>
- <FUNCTION>polylog</FUNCTION>
- <FUNCTION>polynom</FUNCTION>
- <FUNCTION>Power</FUNCTION>
- <FUNCTION>Powmod</FUNCTION>
- <FUNCTION>powmod</FUNCTION>
- <FUNCTION>Prem</FUNCTION>
- <FUNCTION>prem</FUNCTION>
- <FUNCTION>Preprocessor</FUNCTION>
- <FUNCTION>prevprime</FUNCTION>
- <FUNCTION>Primitive</FUNCTION>
- <FUNCTION>Primpart</FUNCTION>
- <FUNCTION>primpart</FUNCTION>
- <FUNCTION>print</FUNCTION>
- <FUNCTION>printf</FUNCTION>
- <FUNCTION>ProbSplit</FUNCTION>
- <FUNCTION>procbody</FUNCTION>
- <FUNCTION>ProcessOptions</FUNCTION>
- <FUNCTION>procmake</FUNCTION>
- <FUNCTION>Product</FUNCTION>
- <FUNCTION>product</FUNCTION>
- <FUNCTION>proot</FUNCTION>
- <FUNCTION>property</FUNCTION>
- <FUNCTION>protect</FUNCTION>
- <FUNCTION>Psi</FUNCTION>
- <FUNCTION>psqrt</FUNCTION>
- <FUNCTION>queue</FUNCTION>
- <FUNCTION>Quo</FUNCTION>
- <FUNCTION>quo</FUNCTION>
- <FUNCTION>radfield</FUNCTION>
- <FUNCTION>radnormal</FUNCTION>
- <FUNCTION>radsimp</FUNCTION>
- <FUNCTION>rand</FUNCTION>
- <FUNCTION>randomize</FUNCTION>
- <FUNCTION>Randpoly</FUNCTION>
- <FUNCTION>randpoly</FUNCTION>
- <FUNCTION>Randprime</FUNCTION>
- <FUNCTION>range</FUNCTION>
- <FUNCTION>ratinterp</FUNCTION>
- <FUNCTION>rationalize</FUNCTION>
- <FUNCTION>Ratrecon</FUNCTION>
- <FUNCTION>ratrecon</FUNCTION>
- <FUNCTION>Re</FUNCTION>
- <FUNCTION>readbytes</FUNCTION>
- <FUNCTION>readdata</FUNCTION>
- <FUNCTION>readlib</FUNCTION>
- <FUNCTION>readline</FUNCTION>
- <FUNCTION>readstat</FUNCTION>
- <FUNCTION>realroot</FUNCTION>
- <FUNCTION>Record</FUNCTION>
- <FUNCTION>Reduce</FUNCTION>
- <FUNCTION>references</FUNCTION>
- <FUNCTION>release</FUNCTION>
- <FUNCTION>Rem</FUNCTION>
- <FUNCTION>rem</FUNCTION>
- <FUNCTION>remove</FUNCTION>
- <FUNCTION>repository</FUNCTION>
- <FUNCTION>requires</FUNCTION>
- <FUNCTION>residue</FUNCTION>
- <FUNCTION>RESol</FUNCTION>
- <FUNCTION>Resultant</FUNCTION>
- <FUNCTION>resultant</FUNCTION>
- <FUNCTION>rhs</FUNCTION>
- <FUNCTION>rmdir</FUNCTION>
- <FUNCTION>root</FUNCTION>
- <FUNCTION>rootbound</FUNCTION>
- <FUNCTION>RootOf</FUNCTION>
- <FUNCTION>Roots</FUNCTION>
- <FUNCTION>roots</FUNCTION>
- <FUNCTION>round</FUNCTION>
- <FUNCTION>Rounding</FUNCTION>
- <FUNCTION>rsolve</FUNCTION>
- <FUNCTION>rtable</FUNCTION>
- <FUNCTION>rtable_algebra</FUNCTION>
- <FUNCTION>rtable_dims</FUNCTION>
- <FUNCTION>rtable_elems</FUNCTION>
- <FUNCTION>rtable_indfns</FUNCTION>
- <FUNCTION>rtable_options</FUNCTION>
- <FUNCTION>rtable_printf</FUNCTION>
- <FUNCTION>rtable_scanf</FUNCTION>
- <FUNCTION>SampleRTable</FUNCTION>
- <FUNCTION>savelib</FUNCTION>
- <FUNCTION>Scale10</FUNCTION>
- <FUNCTION>Scale2</FUNCTION>
- <FUNCTION>scalar</FUNCTION>
- <FUNCTION>scan</FUNCTION>
- <FUNCTION>scanf</FUNCTION>
- <FUNCTION>SearchText</FUNCTION>
- <FUNCTION>searchtext</FUNCTION>
- <FUNCTION>sec</FUNCTION>
- <FUNCTION>sech</FUNCTION>
- <FUNCTION>select</FUNCTION>
- <FUNCTION>selectfun</FUNCTION>
- <FUNCTION>selectremove</FUNCTION>
- <FUNCTION>seq</FUNCTION>
- <FUNCTION>series</FUNCTION>
- <FUNCTION>setattribute</FUNCTION>
- <FUNCTION>SFloatExponent</FUNCTION>
- <FUNCTION>SFloatMantissa</FUNCTION>
- <FUNCTION>shale</FUNCTION>
- <FUNCTION>Shi</FUNCTION>
- <FUNCTION>showprofile</FUNCTION>
- <FUNCTION>showtime</FUNCTION>
- <FUNCTION>Si</FUNCTION>
- <FUNCTION>sign</FUNCTION>
- <FUNCTION>signum</FUNCTION>
- <FUNCTION>Simplify</FUNCTION>
- <FUNCTION>simplify</FUNCTION>
- <FUNCTION>sin</FUNCTION>
- <FUNCTION>sinh</FUNCTION>
- <FUNCTION>singular</FUNCTION>
- <FUNCTION>sinterp</FUNCTION>
- <FUNCTION>smartplot3d</FUNCTION>
- <FUNCTION>Smith</FUNCTION>
- <FUNCTION>solve</FUNCTION>
- <FUNCTION>solvefor</FUNCTION>
- <FUNCTION>sort</FUNCTION>
- <FUNCTION>sparse</FUNCTION>
- <FUNCTION>spec_eval_rule</FUNCTION>
- <FUNCTION>spline</FUNCTION>
- <FUNCTION>spreadsheet</FUNCTION>
- <FUNCTION>SPrem</FUNCTION>
- <FUNCTION>sprem</FUNCTION>
- <FUNCTION>sprintf</FUNCTION>
- <FUNCTION>Sqrfree</FUNCTION>
- <FUNCTION>sqrfree</FUNCTION>
- <FUNCTION>sqrt</FUNCTION>
- <FUNCTION>sscanf</FUNCTION>
- <FUNCTION>Ssi</FUNCTION>
- <FUNCTION>ssystem</FUNCTION>
- <FUNCTION>storage</FUNCTION>
- <FUNCTION>string</FUNCTION>
- <FUNCTION>StruveH</FUNCTION>
- <FUNCTION>StruveL</FUNCTION>
- <FUNCTION>sturm</FUNCTION>
- <FUNCTION>sturmseq</FUNCTION>
- <FUNCTION>subs</FUNCTION>
- <FUNCTION>subsindets</FUNCTION>
- <FUNCTION>subsop</FUNCTION>
- <FUNCTION>substring</FUNCTION>
- <FUNCTION>subtype</FUNCTION>
- <FUNCTION>Sum</FUNCTION>
- <FUNCTION>sum</FUNCTION>
- <FUNCTION>surd</FUNCTION>
- <FUNCTION>Svd</FUNCTION>
- <FUNCTION>symmdiff</FUNCTION>
- <FUNCTION>symmetric</FUNCTION>
- <FUNCTION>syntax</FUNCTION>
- <FUNCTION>system</FUNCTION>
- <FUNCTION>table</FUNCTION>
- <FUNCTION>tan</FUNCTION>
- <FUNCTION>tang</FUNCTION>
- <FUNCTION>taylor</FUNCTION>
- <FUNCTION>testeq</FUNCTION>
- <FUNCTION>testfloat</FUNCTION>
- <FUNCTION>TEXT</FUNCTION>
- <FUNCTION>thaw</FUNCTION>
- <FUNCTION>thiele</FUNCTION>
- <FUNCTION>time</FUNCTION>
- <FUNCTION>timelimit</FUNCTION>
- <FUNCTION>ToInert</FUNCTION>
- <FUNCTION>TopologicalSort</FUNCTION>
- <FUNCTION>traperror</FUNCTION>
- <FUNCTION>triangular</FUNCTION>
- <FUNCTION>trigsubs</FUNCTION>
- <FUNCTION>trunc</FUNCTION>
- <FUNCTION>type</FUNCTION>
- <FUNCTION>typematch</FUNCTION>
- <FUNCTION>unames</FUNCTION>
- <FUNCTION>unapply</FUNCTION>
- <FUNCTION>unassign</FUNCTION>
- <FUNCTION>undefined</FUNCTION>
- <FUNCTION>unit</FUNCTION>
- <FUNCTION>Unordered</FUNCTION>
- <FUNCTION>unprotect</FUNCTION>
- <FUNCTION>update</FUNCTION>
- <FUNCTION>UseHardwareFloats</FUNCTION>
- <FUNCTION>userinfo</FUNCTION>
- <FUNCTION>value</FUNCTION>
- <FUNCTION>Vector</FUNCTION>
- <FUNCTION>vector</FUNCTION>
- <FUNCTION>verify</FUNCTION>
- <FUNCTION>WeierstrassP</FUNCTION>
- <FUNCTION>WeberE</FUNCTION>
- <FUNCTION>WeierstrassPPrime</FUNCTION>
- <FUNCTION>WeierstrassSigma</FUNCTION>
- <FUNCTION>WeierstrassZeta</FUNCTION>
- <FUNCTION>whattype</FUNCTION>
- <FUNCTION>WhittakerM</FUNCTION>
- <FUNCTION>WhittakerW</FUNCTION>
- <FUNCTION>with</FUNCTION>
- <FUNCTION>worksheet</FUNCTION>
- <FUNCTION>writebytes</FUNCTION>
- <FUNCTION>writedata</FUNCTION>
- <FUNCTION>writeline</FUNCTION>
- <FUNCTION>writestat</FUNCTION>
- <FUNCTION>writeto</FUNCTION>
- <FUNCTION>zero</FUNCTION>
- <FUNCTION>Zeta</FUNCTION>
- <FUNCTION>zip</FUNCTION>
- <FUNCTION>ztrans</FUNCTION>
-
- <!-- Initially known names -->
- <LITERAL2>Catalan</LITERAL2>
- <LITERAL2>constants</LITERAL2>
- <LITERAL2>Digits</LITERAL2>
- <LITERAL2>FAIL</LITERAL2>
- <LITERAL2>false</LITERAL2>
- <LITERAL2>gamma</LITERAL2>
- <LITERAL2>I</LITERAL2>
- <LITERAL2>infinity</LITERAL2>
- <LITERAL2>integrate</LITERAL2>
- <LITERAL2>lasterror</LITERAL2>
- <LITERAL2>libname</LITERAL2>
- <LITERAL2>`mod`</LITERAL2>
- <LITERAL2>NULL</LITERAL2>
- <LITERAL2>Order</LITERAL2>
- <LITERAL2>Pi</LITERAL2>
- <LITERAL2>printlevel</LITERAL2>
- <LITERAL2>true</LITERAL2>
- <LITERAL2>undefined</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Maple mode, by Jack Perry jeperry at eos.ncsu.edu -->
+<!-- Based on commands for Maple 7 -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Standard literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">$</SEQ>
+ <SEQ TYPE="OPERATOR">@@</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">||</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">::</SEQ>
+ <SEQ TYPE="OPERATOR">:-</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+
+ <KEYWORDS>
+ <!-- Reserved words -->
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>xor</KEYWORD1>
+ <KEYWORD1>union</KEYWORD1>
+ <KEYWORD1>intersect</KEYWORD1>
+ <KEYWORD1>minus</KEYWORD1>
+ <KEYWORD1>mod</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>assuming</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>by</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>description</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>done</KEYWORD1>
+ <KEYWORD1>elif</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>error</KEYWORD1>
+ <KEYWORD1>export</KEYWORD1>
+ <KEYWORD1>fi</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>from</KEYWORD1>
+ <KEYWORD1>global</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>implies</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>module</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>od</KEYWORD1>
+ <KEYWORD1>option</KEYWORD1>
+ <KEYWORD1>options</KEYWORD1>
+ <KEYWORD1>proc</KEYWORD1>
+ <KEYWORD1>quit</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>save</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>subset</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>use</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <!-- Standard library functions -->
+ <FUNCTION>about</FUNCTION>
+ <FUNCTION>ans</FUNCTION>
+ <FUNCTION>add</FUNCTION>
+ <FUNCTION>addcoords</FUNCTION>
+ <FUNCTION>additionally</FUNCTION>
+ <FUNCTION>addproperty</FUNCTION>
+ <FUNCTION>addressof</FUNCTION>
+ <FUNCTION>AFactor</FUNCTION>
+ <FUNCTION>AFactors</FUNCTION>
+ <FUNCTION>AIrreduc</FUNCTION>
+ <FUNCTION>AiryAi</FUNCTION>
+ <FUNCTION>AiryAiZeros</FUNCTION>
+ <FUNCTION>AiryBi</FUNCTION>
+ <FUNCTION>AiryBiZeros</FUNCTION>
+ <FUNCTION>algebraic</FUNCTION>
+ <FUNCTION>algsubs</FUNCTION>
+ <FUNCTION>alias</FUNCTION>
+ <FUNCTION>allvalues</FUNCTION>
+ <FUNCTION>anames</FUNCTION>
+ <FUNCTION>AngerJ</FUNCTION>
+ <FUNCTION>antihermitian</FUNCTION>
+ <FUNCTION>antisymm</FUNCTION>
+ <FUNCTION>apply</FUNCTION>
+ <FUNCTION>applyop</FUNCTION>
+ <FUNCTION>applyrule</FUNCTION>
+ <FUNCTION>arccos</FUNCTION>
+ <FUNCTION>arccosh</FUNCTION>
+ <FUNCTION>arccot</FUNCTION>
+ <FUNCTION>arccoth</FUNCTION>
+ <FUNCTION>arccsc</FUNCTION>
+ <FUNCTION>arccsch</FUNCTION>
+ <FUNCTION>arcsec</FUNCTION>
+ <FUNCTION>arcsech</FUNCTION>
+ <FUNCTION>arcsin</FUNCTION>
+ <FUNCTION>arcsinh</FUNCTION>
+ <FUNCTION>arctan</FUNCTION>
+ <FUNCTION>arctanh</FUNCTION>
+ <FUNCTION>argument</FUNCTION>
+ <FUNCTION>Array</FUNCTION>
+ <FUNCTION>array</FUNCTION>
+ <FUNCTION>ArrayDims</FUNCTION>
+ <FUNCTION>ArrayElems</FUNCTION>
+ <FUNCTION>ArrayIndFns</FUNCTION>
+ <FUNCTION>ArrayOptions</FUNCTION>
+ <FUNCTION>assign</FUNCTION>
+ <FUNCTION>assigned</FUNCTION>
+ <FUNCTION>asspar</FUNCTION>
+ <FUNCTION>assume</FUNCTION>
+ <FUNCTION>asympt</FUNCTION>
+ <FUNCTION>attributes</FUNCTION>
+ <FUNCTION>band</FUNCTION>
+ <FUNCTION>Berlekamp</FUNCTION>
+ <FUNCTION>bernoulli</FUNCTION>
+ <FUNCTION>bernstein</FUNCTION>
+ <FUNCTION>BesselI</FUNCTION>
+ <FUNCTION>BesselJ</FUNCTION>
+ <FUNCTION>BesselJZeros</FUNCTION>
+ <FUNCTION>BesselK</FUNCTION>
+ <FUNCTION>BesselY</FUNCTION>
+ <FUNCTION>BesselYZeros</FUNCTION>
+ <FUNCTION>Beta</FUNCTION>
+ <FUNCTION>branches</FUNCTION>
+ <FUNCTION>C</FUNCTION>
+ <FUNCTION>cat</FUNCTION>
+ <FUNCTION>ceil</FUNCTION>
+ <FUNCTION>changecoords</FUNCTION>
+ <FUNCTION>charfcn</FUNCTION>
+ <FUNCTION>ChebyshevT</FUNCTION>
+ <FUNCTION>ChebyShevU</FUNCTION>
+ <FUNCTION>CheckArgs</FUNCTION>
+ <FUNCTION>Chi</FUNCTION>
+ <FUNCTION>chrem</FUNCTION>
+ <FUNCTION>Ci</FUNCTION>
+ <FUNCTION>close</FUNCTION>
+ <FUNCTION>coeff</FUNCTION>
+ <FUNCTION>coeffs</FUNCTION>
+ <FUNCTION>coeftayl</FUNCTION>
+ <FUNCTION>collect</FUNCTION>
+ <FUNCTION>combine</FUNCTION>
+ <FUNCTION>comparray</FUNCTION>
+ <FUNCTION>compiletable</FUNCTION>
+ <FUNCTION>compoly</FUNCTION>
+ <FUNCTION>CompSeq</FUNCTION>
+ <FUNCTION>conjugate</FUNCTION>
+ <FUNCTION>constant</FUNCTION>
+ <FUNCTION>Content</FUNCTION>
+ <FUNCTION>content</FUNCTION>
+ <FUNCTION>convergs</FUNCTION>
+ <FUNCTION>convert</FUNCTION>
+ <FUNCTION>coords</FUNCTION>
+ <FUNCTION>copy</FUNCTION>
+ <FUNCTION>CopySign</FUNCTION>
+ <FUNCTION>cos</FUNCTION>
+ <FUNCTION>cosh</FUNCTION>
+ <FUNCTION>cot</FUNCTION>
+ <FUNCTION>coth</FUNCTION>
+ <FUNCTION>coulditbe</FUNCTION>
+ <FUNCTION>csc</FUNCTION>
+ <FUNCTION>csch</FUNCTION>
+ <FUNCTION>csgn</FUNCTION>
+ <FUNCTION>currentdir</FUNCTION>
+ <FUNCTION>curry</FUNCTION>
+ <FUNCTION>CylinderD</FUNCTION>
+ <FUNCTION>CylinderU</FUNCTION>
+ <FUNCTION>CylinderV</FUNCTION>
+ <FUNCTION>D</FUNCTION>
+ <FUNCTION>dawson</FUNCTION>
+ <FUNCTION>Default0</FUNCTION>
+ <FUNCTION>DefaultOverflow</FUNCTION>
+ <FUNCTION>DefaultUnderflow</FUNCTION>
+ <FUNCTION>define</FUNCTION>
+ <FUNCTION>define_external</FUNCTION>
+ <FUNCTION>degree</FUNCTION>
+ <FUNCTION>denom</FUNCTION>
+ <FUNCTION>depends</FUNCTION>
+ <FUNCTION>DESol</FUNCTION>
+ <FUNCTION>Det</FUNCTION>
+ <FUNCTION>diagon</FUNCTION>
+ <FUNCTION>Diff</FUNCTION>
+ <FUNCTION>diff</FUNCTION>
+ <FUNCTION>diffop</FUNCTION>
+ <FUNCTION>Digits</FUNCTION>
+ <FUNCTION>dilog</FUNCTION>
+ <FUNCTION>dinterp</FUNCTION>
+ <FUNCTION>Dirac</FUNCTION>
+ <FUNCTION>disassemble</FUNCTION>
+ <FUNCTION>discont</FUNCTION>
+ <FUNCTION>discrim</FUNCTION>
+ <FUNCTION>dismantle</FUNCTION>
+ <FUNCTION>DistDeg</FUNCTION>
+ <FUNCTION>Divide</FUNCTION>
+ <FUNCTION>divide</FUNCTION>
+ <FUNCTION>dsolve</FUNCTION>
+ <FUNCTION>efficiency</FUNCTION>
+ <FUNCTION>Ei</FUNCTION>
+ <FUNCTION>Eigenvals</FUNCTION>
+ <FUNCTION>eliminate</FUNCTION>
+ <FUNCTION>ellipsoid</FUNCTION>
+ <FUNCTION>EllipticCE</FUNCTION>
+ <FUNCTION>EllipticCK</FUNCTION>
+ <FUNCTION>EllipticCPi</FUNCTION>
+ <FUNCTION>EllipticE</FUNCTION>
+ <FUNCTION>EllipticF</FUNCTION>
+ <FUNCTION>EllipticK</FUNCTION>
+ <FUNCTION>EllipticModulus</FUNCTION>
+ <FUNCTION>EllipticNome</FUNCTION>
+ <FUNCTION>EllipticPi</FUNCTION>
+ <FUNCTION>elliptic_int</FUNCTION>
+ <FUNCTION>entries</FUNCTION>
+ <FUNCTION>erf</FUNCTION>
+ <FUNCTION>erfc</FUNCTION>
+ <FUNCTION>erfi</FUNCTION>
+ <FUNCTION>euler</FUNCTION>
+ <FUNCTION>eulermac</FUNCTION>
+ <FUNCTION>Eval</FUNCTION>
+ <FUNCTION>eval</FUNCTION>
+ <FUNCTION>evala</FUNCTION>
+ <FUNCTION>evalapply</FUNCTION>
+ <FUNCTION>evalb</FUNCTION>
+ <FUNCTION>evalc</FUNCTION>
+ <FUNCTION>evalf</FUNCTION>
+ <FUNCTION>evalfint</FUNCTION>
+ <FUNCTION>evalhf</FUNCTION>
+ <FUNCTION>evalm</FUNCTION>
+ <FUNCTION>evaln</FUNCTION>
+ <FUNCTION>evalr</FUNCTION>
+ <FUNCTION>evalrC</FUNCTION>
+ <FUNCTION>events</FUNCTION>
+ <FUNCTION>Excel</FUNCTION>
+ <FUNCTION>exists</FUNCTION>
+ <FUNCTION>exp</FUNCTION>
+ <FUNCTION>Expand</FUNCTION>
+ <FUNCTION>expand</FUNCTION>
+ <FUNCTION>expandoff</FUNCTION>
+ <FUNCTION>expandon</FUNCTION>
+ <FUNCTION>exports</FUNCTION>
+ <FUNCTION>extract</FUNCTION>
+ <FUNCTION>extrema</FUNCTION>
+ <FUNCTION>Factor</FUNCTION>
+ <FUNCTION>factor</FUNCTION>
+ <FUNCTION>Factors</FUNCTION>
+ <FUNCTION>factors</FUNCTION>
+ <FUNCTION>fclose</FUNCTION>
+ <FUNCTION>fdiscont</FUNCTION>
+ <FUNCTION>feof</FUNCTION>
+ <FUNCTION>fflush</FUNCTION>
+ <FUNCTION>FFT</FUNCTION>
+ <FUNCTION>filepos</FUNCTION>
+ <FUNCTION>fixdiv</FUNCTION>
+ <FUNCTION>float</FUNCTION>
+ <FUNCTION>floor</FUNCTION>
+ <FUNCTION>fnormal</FUNCTION>
+ <FUNCTION>fold</FUNCTION>
+ <FUNCTION>fopen</FUNCTION>
+ <FUNCTION>forall</FUNCTION>
+ <FUNCTION>forget</FUNCTION>
+ <FUNCTION>fprintf</FUNCTION>
+ <FUNCTION>frac</FUNCTION>
+ <FUNCTION>freeze</FUNCTION>
+ <FUNCTION>frem</FUNCTION>
+ <FUNCTION>fremove</FUNCTION>
+ <FUNCTION>FresnelC</FUNCTION>
+ <FUNCTION>Fresnelf</FUNCTION>
+ <FUNCTION>Fresnelg</FUNCTION>
+ <FUNCTION>FresnelS</FUNCTION>
+ <FUNCTION>FromInert</FUNCTION>
+ <FUNCTION>frontend</FUNCTION>
+ <FUNCTION>fscanf</FUNCTION>
+ <FUNCTION>fsolve</FUNCTION>
+ <FUNCTION>galois</FUNCTION>
+ <FUNCTION>GAMMA</FUNCTION>
+ <FUNCTION>GaussAGM</FUNCTION>
+ <FUNCTION>Gausselim</FUNCTION>
+ <FUNCTION>Gaussjord</FUNCTION>
+ <FUNCTION>gc</FUNCTION>
+ <FUNCTION>Gcd</FUNCTION>
+ <FUNCTION>gcd</FUNCTION>
+ <FUNCTION>Gcdex</FUNCTION>
+ <FUNCTION>gcdex</FUNCTION>
+ <FUNCTION>GegenbauerC</FUNCTION>
+ <FUNCTION>genpoly</FUNCTION>
+ <FUNCTION>getenv</FUNCTION>
+ <FUNCTION>GetResultDataType</FUNCTION>
+ <FUNCTION>GetResultShape</FUNCTION>
+ <FUNCTION>GF</FUNCTION>
+ <FUNCTION>Greek</FUNCTION>
+ <FUNCTION>HankelH1</FUNCTION>
+ <FUNCTION>HankelH2</FUNCTION>
+ <FUNCTION>harmonic</FUNCTION>
+ <FUNCTION>has</FUNCTION>
+ <FUNCTION>hasfun</FUNCTION>
+ <FUNCTION>hasoption</FUNCTION>
+ <FUNCTION>hastype</FUNCTION>
+ <FUNCTION>heap</FUNCTION>
+ <FUNCTION>Heaviside</FUNCTION>
+ <FUNCTION>Hermite</FUNCTION>
+ <FUNCTION>HermiteH</FUNCTION>
+ <FUNCTION>hermitian</FUNCTION>
+ <FUNCTION>Hessenberg</FUNCTION>
+ <FUNCTION>hfarray</FUNCTION>
+ <FUNCTION>history</FUNCTION>
+ <FUNCTION>hypergeom</FUNCTION>
+ <FUNCTION>icontent</FUNCTION>
+ <FUNCTION>identity</FUNCTION>
+ <FUNCTION>IEEEdiffs</FUNCTION>
+ <FUNCTION>ifactor</FUNCTION>
+ <FUNCTION>ifactors</FUNCTION>
+ <FUNCTION>iFFT</FUNCTION>
+ <FUNCTION>igcd</FUNCTION>
+ <FUNCTION>igcdex</FUNCTION>
+ <FUNCTION>ilcm</FUNCTION>
+ <FUNCTION>ilog10</FUNCTION>
+ <FUNCTION>ilog2</FUNCTION>
+ <FUNCTION>ilog</FUNCTION>
+ <FUNCTION>Im</FUNCTION>
+ <FUNCTION>implicitdiff</FUNCTION>
+ <FUNCTION>ImportMatrix</FUNCTION>
+ <FUNCTION>ImportVector</FUNCTION>
+ <FUNCTION>indets</FUNCTION>
+ <FUNCTION>index</FUNCTION>
+ <FUNCTION>indexed</FUNCTION>
+ <FUNCTION>indices</FUNCTION>
+ <FUNCTION>inifcn</FUNCTION>
+ <FUNCTION>ininame</FUNCTION>
+ <FUNCTION>initialcondition</FUNCTION>
+ <FUNCTION>initialize</FUNCTION>
+ <FUNCTION>insert</FUNCTION>
+ <FUNCTION>int</FUNCTION>
+ <FUNCTION>intat</FUNCTION>
+ <FUNCTION>interface</FUNCTION>
+ <FUNCTION>Interp</FUNCTION>
+ <FUNCTION>interp</FUNCTION>
+ <FUNCTION>Inverse</FUNCTION>
+ <FUNCTION>invfunc</FUNCTION>
+ <FUNCTION>invztrans</FUNCTION>
+ <FUNCTION>iostatus</FUNCTION>
+ <FUNCTION>iperfpow</FUNCTION>
+ <FUNCTION>iquo</FUNCTION>
+ <FUNCTION>iratrecon</FUNCTION>
+ <FUNCTION>irem</FUNCTION>
+ <FUNCTION>iroot</FUNCTION>
+ <FUNCTION>Irreduc</FUNCTION>
+ <FUNCTION>irreduc</FUNCTION>
+ <FUNCTION>is</FUNCTION>
+ <FUNCTION>iscont</FUNCTION>
+ <FUNCTION>isdifferential</FUNCTION>
+ <FUNCTION>IsMatrixShape</FUNCTION>
+ <FUNCTION>isolate</FUNCTION>
+ <FUNCTION>isolve</FUNCTION>
+ <FUNCTION>ispoly</FUNCTION>
+ <FUNCTION>isprime</FUNCTION>
+ <FUNCTION>isqrfree</FUNCTION>
+ <FUNCTION>isqrt</FUNCTION>
+ <FUNCTION>issqr</FUNCTION>
+ <FUNCTION>ithprime</FUNCTION>
+ <FUNCTION>JacobiAM</FUNCTION>
+ <FUNCTION>JacobiCD</FUNCTION>
+ <FUNCTION>JacobiCN</FUNCTION>
+ <FUNCTION>JacobiCS</FUNCTION>
+ <FUNCTION>JacobiDC</FUNCTION>
+ <FUNCTION>JacobiDN</FUNCTION>
+ <FUNCTION>JacobiDS</FUNCTION>
+ <FUNCTION>JacobiNC</FUNCTION>
+ <FUNCTION>JacobiND</FUNCTION>
+ <FUNCTION>JacobiNS</FUNCTION>
+ <FUNCTION>JacobiP</FUNCTION>
+ <FUNCTION>JacobiSC</FUNCTION>
+ <FUNCTION>JacobiSD</FUNCTION>
+ <FUNCTION>JacobiSN</FUNCTION>
+ <FUNCTION>JacobiTheta1</FUNCTION>
+ <FUNCTION>JacobiTheta2</FUNCTION>
+ <FUNCTION>JacobiTheta3</FUNCTION>
+ <FUNCTION>JacobiTheta4</FUNCTION>
+ <FUNCTION>JacobiZeta</FUNCTION>
+ <FUNCTION>KelvinBei</FUNCTION>
+ <FUNCTION>KelvinBer</FUNCTION>
+ <FUNCTION>KelvinHei</FUNCTION>
+ <FUNCTION>KelvinHer</FUNCTION>
+ <FUNCTION>KelvinKei</FUNCTION>
+ <FUNCTION>KelvinKer</FUNCTION>
+ <FUNCTION>KummerM</FUNCTION>
+ <FUNCTION>KummerU</FUNCTION>
+ <FUNCTION>LaguerreL</FUNCTION>
+ <FUNCTION>LambertW</FUNCTION>
+ <FUNCTION>latex</FUNCTION>
+ <FUNCTION>lattice</FUNCTION>
+ <FUNCTION>lcm</FUNCTION>
+ <FUNCTION>Lcm</FUNCTION>
+ <FUNCTION>lcoeff</FUNCTION>
+ <FUNCTION>leadterm</FUNCTION>
+ <FUNCTION>LegendreP</FUNCTION>
+ <FUNCTION>LegendreQ</FUNCTION>
+ <FUNCTION>length</FUNCTION>
+ <FUNCTION>LerchPhi</FUNCTION>
+ <FUNCTION>lexorder</FUNCTION>
+ <FUNCTION>lhs</FUNCTION>
+ <FUNCTION>CLi</FUNCTION>
+ <FUNCTION>Limit</FUNCTION>
+ <FUNCTION>limit</FUNCTION>
+ <FUNCTION>Linsolve</FUNCTION>
+ <FUNCTION>ln</FUNCTION>
+ <FUNCTION>lnGAMMA</FUNCTION>
+ <FUNCTION>log</FUNCTION>
+ <FUNCTION>log10</FUNCTION>
+ <FUNCTION>LommelS1</FUNCTION>
+ <FUNCTION>Lommels2</FUNCTION>
+ <FUNCTION>lprint</FUNCTION>
+ <FUNCTION>map</FUNCTION>
+ <FUNCTION>map2</FUNCTION>
+ <FUNCTION>Maple_floats</FUNCTION>
+ <FUNCTION>match</FUNCTION>
+ <FUNCTION>MatlabMatrix</FUNCTION>
+ <FUNCTION>Matrix</FUNCTION>
+ <FUNCTION>matrix</FUNCTION>
+ <FUNCTION>MatrixOptions</FUNCTION>
+ <FUNCTION>max</FUNCTION>
+ <FUNCTION>maximize</FUNCTION>
+ <FUNCTION>maxnorm</FUNCTION>
+ <FUNCTION>maxorder</FUNCTION>
+ <FUNCTION>MeijerG</FUNCTION>
+ <FUNCTION>member</FUNCTION>
+ <FUNCTION>min</FUNCTION>
+ <FUNCTION>minimize</FUNCTION>
+ <FUNCTION>mkdir</FUNCTION>
+ <FUNCTION>ModifiedMeijerG</FUNCTION>
+ <FUNCTION>modp</FUNCTION>
+ <FUNCTION>modp1</FUNCTION>
+ <FUNCTION>modp2</FUNCTION>
+ <FUNCTION>modpol</FUNCTION>
+ <FUNCTION>mods</FUNCTION>
+ <FUNCTION>module</FUNCTION>
+ <FUNCTION>MOLS</FUNCTION>
+ <FUNCTION>msolve</FUNCTION>
+ <FUNCTION>mtaylor</FUNCTION>
+ <FUNCTION>mul</FUNCTION>
+ <FUNCTION>NextAfter</FUNCTION>
+ <FUNCTION>nextprime</FUNCTION>
+ <FUNCTION>nops</FUNCTION>
+ <FUNCTION>norm</FUNCTION>
+ <FUNCTION>norm</FUNCTION>
+ <FUNCTION>Normal</FUNCTION>
+ <FUNCTION>normal</FUNCTION>
+ <FUNCTION>nprintf</FUNCTION>
+ <FUNCTION>Nullspace</FUNCTION>
+ <FUNCTION>numboccur</FUNCTION>
+ <FUNCTION>numer</FUNCTION>
+ <FUNCTION>NumericClass</FUNCTION>
+ <FUNCTION>NumericEvent</FUNCTION>
+ <FUNCTION>NumericEventHandler</FUNCTION>
+ <FUNCTION>NumericException</FUNCTION>
+ <FUNCTION>numerics</FUNCTION>
+ <FUNCTION>NumericStatus</FUNCTION>
+ <FUNCTION>odetest</FUNCTION>
+ <FUNCTION>op</FUNCTION>
+ <FUNCTION>open</FUNCTION>
+ <FUNCTION>order</FUNCTION>
+ <FUNCTION>OrderedNE</FUNCTION>
+ <FUNCTION>parse</FUNCTION>
+ <FUNCTION>patmatch</FUNCTION>
+ <FUNCTION>pclose</FUNCTION>
+ <FUNCTION>PDEplot_options</FUNCTION>
+ <FUNCTION>pdesolve</FUNCTION>
+ <FUNCTION>pdetest</FUNCTION>
+ <FUNCTION>pdsolve</FUNCTION>
+ <FUNCTION>piecewise</FUNCTION>
+ <FUNCTION>plot</FUNCTION>
+ <FUNCTION>plot3d</FUNCTION>
+ <FUNCTION>plotsetup</FUNCTION>
+ <FUNCTION>pochhammer</FUNCTION>
+ <FUNCTION>pointto</FUNCTION>
+ <FUNCTION>poisson</FUNCTION>
+ <FUNCTION>polar</FUNCTION>
+ <FUNCTION>polylog</FUNCTION>
+ <FUNCTION>polynom</FUNCTION>
+ <FUNCTION>Power</FUNCTION>
+ <FUNCTION>Powmod</FUNCTION>
+ <FUNCTION>powmod</FUNCTION>
+ <FUNCTION>Prem</FUNCTION>
+ <FUNCTION>prem</FUNCTION>
+ <FUNCTION>Preprocessor</FUNCTION>
+ <FUNCTION>prevprime</FUNCTION>
+ <FUNCTION>Primitive</FUNCTION>
+ <FUNCTION>Primpart</FUNCTION>
+ <FUNCTION>primpart</FUNCTION>
+ <FUNCTION>print</FUNCTION>
+ <FUNCTION>printf</FUNCTION>
+ <FUNCTION>ProbSplit</FUNCTION>
+ <FUNCTION>procbody</FUNCTION>
+ <FUNCTION>ProcessOptions</FUNCTION>
+ <FUNCTION>procmake</FUNCTION>
+ <FUNCTION>Product</FUNCTION>
+ <FUNCTION>product</FUNCTION>
+ <FUNCTION>proot</FUNCTION>
+ <FUNCTION>property</FUNCTION>
+ <FUNCTION>protect</FUNCTION>
+ <FUNCTION>Psi</FUNCTION>
+ <FUNCTION>psqrt</FUNCTION>
+ <FUNCTION>queue</FUNCTION>
+ <FUNCTION>Quo</FUNCTION>
+ <FUNCTION>quo</FUNCTION>
+ <FUNCTION>radfield</FUNCTION>
+ <FUNCTION>radnormal</FUNCTION>
+ <FUNCTION>radsimp</FUNCTION>
+ <FUNCTION>rand</FUNCTION>
+ <FUNCTION>randomize</FUNCTION>
+ <FUNCTION>Randpoly</FUNCTION>
+ <FUNCTION>randpoly</FUNCTION>
+ <FUNCTION>Randprime</FUNCTION>
+ <FUNCTION>range</FUNCTION>
+ <FUNCTION>ratinterp</FUNCTION>
+ <FUNCTION>rationalize</FUNCTION>
+ <FUNCTION>Ratrecon</FUNCTION>
+ <FUNCTION>ratrecon</FUNCTION>
+ <FUNCTION>Re</FUNCTION>
+ <FUNCTION>readbytes</FUNCTION>
+ <FUNCTION>readdata</FUNCTION>
+ <FUNCTION>readlib</FUNCTION>
+ <FUNCTION>readline</FUNCTION>
+ <FUNCTION>readstat</FUNCTION>
+ <FUNCTION>realroot</FUNCTION>
+ <FUNCTION>Record</FUNCTION>
+ <FUNCTION>Reduce</FUNCTION>
+ <FUNCTION>references</FUNCTION>
+ <FUNCTION>release</FUNCTION>
+ <FUNCTION>Rem</FUNCTION>
+ <FUNCTION>rem</FUNCTION>
+ <FUNCTION>remove</FUNCTION>
+ <FUNCTION>repository</FUNCTION>
+ <FUNCTION>requires</FUNCTION>
+ <FUNCTION>residue</FUNCTION>
+ <FUNCTION>RESol</FUNCTION>
+ <FUNCTION>Resultant</FUNCTION>
+ <FUNCTION>resultant</FUNCTION>
+ <FUNCTION>rhs</FUNCTION>
+ <FUNCTION>rmdir</FUNCTION>
+ <FUNCTION>root</FUNCTION>
+ <FUNCTION>rootbound</FUNCTION>
+ <FUNCTION>RootOf</FUNCTION>
+ <FUNCTION>Roots</FUNCTION>
+ <FUNCTION>roots</FUNCTION>
+ <FUNCTION>round</FUNCTION>
+ <FUNCTION>Rounding</FUNCTION>
+ <FUNCTION>rsolve</FUNCTION>
+ <FUNCTION>rtable</FUNCTION>
+ <FUNCTION>rtable_algebra</FUNCTION>
+ <FUNCTION>rtable_dims</FUNCTION>
+ <FUNCTION>rtable_elems</FUNCTION>
+ <FUNCTION>rtable_indfns</FUNCTION>
+ <FUNCTION>rtable_options</FUNCTION>
+ <FUNCTION>rtable_printf</FUNCTION>
+ <FUNCTION>rtable_scanf</FUNCTION>
+ <FUNCTION>SampleRTable</FUNCTION>
+ <FUNCTION>savelib</FUNCTION>
+ <FUNCTION>Scale10</FUNCTION>
+ <FUNCTION>Scale2</FUNCTION>
+ <FUNCTION>scalar</FUNCTION>
+ <FUNCTION>scan</FUNCTION>
+ <FUNCTION>scanf</FUNCTION>
+ <FUNCTION>SearchText</FUNCTION>
+ <FUNCTION>searchtext</FUNCTION>
+ <FUNCTION>sec</FUNCTION>
+ <FUNCTION>sech</FUNCTION>
+ <FUNCTION>select</FUNCTION>
+ <FUNCTION>selectfun</FUNCTION>
+ <FUNCTION>selectremove</FUNCTION>
+ <FUNCTION>seq</FUNCTION>
+ <FUNCTION>series</FUNCTION>
+ <FUNCTION>setattribute</FUNCTION>
+ <FUNCTION>SFloatExponent</FUNCTION>
+ <FUNCTION>SFloatMantissa</FUNCTION>
+ <FUNCTION>shale</FUNCTION>
+ <FUNCTION>Shi</FUNCTION>
+ <FUNCTION>showprofile</FUNCTION>
+ <FUNCTION>showtime</FUNCTION>
+ <FUNCTION>Si</FUNCTION>
+ <FUNCTION>sign</FUNCTION>
+ <FUNCTION>signum</FUNCTION>
+ <FUNCTION>Simplify</FUNCTION>
+ <FUNCTION>simplify</FUNCTION>
+ <FUNCTION>sin</FUNCTION>
+ <FUNCTION>sinh</FUNCTION>
+ <FUNCTION>singular</FUNCTION>
+ <FUNCTION>sinterp</FUNCTION>
+ <FUNCTION>smartplot3d</FUNCTION>
+ <FUNCTION>Smith</FUNCTION>
+ <FUNCTION>solve</FUNCTION>
+ <FUNCTION>solvefor</FUNCTION>
+ <FUNCTION>sort</FUNCTION>
+ <FUNCTION>sparse</FUNCTION>
+ <FUNCTION>spec_eval_rule</FUNCTION>
+ <FUNCTION>spline</FUNCTION>
+ <FUNCTION>spreadsheet</FUNCTION>
+ <FUNCTION>SPrem</FUNCTION>
+ <FUNCTION>sprem</FUNCTION>
+ <FUNCTION>sprintf</FUNCTION>
+ <FUNCTION>Sqrfree</FUNCTION>
+ <FUNCTION>sqrfree</FUNCTION>
+ <FUNCTION>sqrt</FUNCTION>
+ <FUNCTION>sscanf</FUNCTION>
+ <FUNCTION>Ssi</FUNCTION>
+ <FUNCTION>ssystem</FUNCTION>
+ <FUNCTION>storage</FUNCTION>
+ <FUNCTION>string</FUNCTION>
+ <FUNCTION>StruveH</FUNCTION>
+ <FUNCTION>StruveL</FUNCTION>
+ <FUNCTION>sturm</FUNCTION>
+ <FUNCTION>sturmseq</FUNCTION>
+ <FUNCTION>subs</FUNCTION>
+ <FUNCTION>subsindets</FUNCTION>
+ <FUNCTION>subsop</FUNCTION>
+ <FUNCTION>substring</FUNCTION>
+ <FUNCTION>subtype</FUNCTION>
+ <FUNCTION>Sum</FUNCTION>
+ <FUNCTION>sum</FUNCTION>
+ <FUNCTION>surd</FUNCTION>
+ <FUNCTION>Svd</FUNCTION>
+ <FUNCTION>symmdiff</FUNCTION>
+ <FUNCTION>symmetric</FUNCTION>
+ <FUNCTION>syntax</FUNCTION>
+ <FUNCTION>system</FUNCTION>
+ <FUNCTION>table</FUNCTION>
+ <FUNCTION>tan</FUNCTION>
+ <FUNCTION>tang</FUNCTION>
+ <FUNCTION>taylor</FUNCTION>
+ <FUNCTION>testeq</FUNCTION>
+ <FUNCTION>testfloat</FUNCTION>
+ <FUNCTION>TEXT</FUNCTION>
+ <FUNCTION>thaw</FUNCTION>
+ <FUNCTION>thiele</FUNCTION>
+ <FUNCTION>time</FUNCTION>
+ <FUNCTION>timelimit</FUNCTION>
+ <FUNCTION>ToInert</FUNCTION>
+ <FUNCTION>TopologicalSort</FUNCTION>
+ <FUNCTION>traperror</FUNCTION>
+ <FUNCTION>triangular</FUNCTION>
+ <FUNCTION>trigsubs</FUNCTION>
+ <FUNCTION>trunc</FUNCTION>
+ <FUNCTION>type</FUNCTION>
+ <FUNCTION>typematch</FUNCTION>
+ <FUNCTION>unames</FUNCTION>
+ <FUNCTION>unapply</FUNCTION>
+ <FUNCTION>unassign</FUNCTION>
+ <FUNCTION>undefined</FUNCTION>
+ <FUNCTION>unit</FUNCTION>
+ <FUNCTION>Unordered</FUNCTION>
+ <FUNCTION>unprotect</FUNCTION>
+ <FUNCTION>update</FUNCTION>
+ <FUNCTION>UseHardwareFloats</FUNCTION>
+ <FUNCTION>userinfo</FUNCTION>
+ <FUNCTION>value</FUNCTION>
+ <FUNCTION>Vector</FUNCTION>
+ <FUNCTION>vector</FUNCTION>
+ <FUNCTION>verify</FUNCTION>
+ <FUNCTION>WeierstrassP</FUNCTION>
+ <FUNCTION>WeberE</FUNCTION>
+ <FUNCTION>WeierstrassPPrime</FUNCTION>
+ <FUNCTION>WeierstrassSigma</FUNCTION>
+ <FUNCTION>WeierstrassZeta</FUNCTION>
+ <FUNCTION>whattype</FUNCTION>
+ <FUNCTION>WhittakerM</FUNCTION>
+ <FUNCTION>WhittakerW</FUNCTION>
+ <FUNCTION>with</FUNCTION>
+ <FUNCTION>worksheet</FUNCTION>
+ <FUNCTION>writebytes</FUNCTION>
+ <FUNCTION>writedata</FUNCTION>
+ <FUNCTION>writeline</FUNCTION>
+ <FUNCTION>writestat</FUNCTION>
+ <FUNCTION>writeto</FUNCTION>
+ <FUNCTION>zero</FUNCTION>
+ <FUNCTION>Zeta</FUNCTION>
+ <FUNCTION>zip</FUNCTION>
+ <FUNCTION>ztrans</FUNCTION>
+
+ <!-- Initially known names -->
+ <LITERAL2>Catalan</LITERAL2>
+ <LITERAL2>constants</LITERAL2>
+ <LITERAL2>Digits</LITERAL2>
+ <LITERAL2>FAIL</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>gamma</LITERAL2>
+ <LITERAL2>I</LITERAL2>
+ <LITERAL2>infinity</LITERAL2>
+ <LITERAL2>integrate</LITERAL2>
+ <LITERAL2>lasterror</LITERAL2>
+ <LITERAL2>libname</LITERAL2>
+ <LITERAL2>`mod`</LITERAL2>
+ <LITERAL2>NULL</LITERAL2>
+ <LITERAL2>Order</LITERAL2>
+ <LITERAL2>Pi</LITERAL2>
+ <LITERAL2>printlevel</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>undefined</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/maven.xml b/jEdit/modes/maven.xml
new file mode 100644
index 0000000..7400387
--- /dev/null
+++ b/jEdit/modes/maven.xml
@@ -0,0 +1,372 @@
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd"><!-- mode for tag library description (maven) files -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+ <!-- {{{ MAIN -->
+ <RULES>
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- variables -->
+ <SPAN TYPE="KEYWORD4">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- DTD Entity declarations -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="ENTITY-TAGS">
+ <BEGIN><!ENTITY</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CDATA sections -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="CDATA">
+ <BEGIN><![CDATA[</BEGIN>
+ <END>]]></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- PI directives -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN><?</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <KEYWORD4>true</KEYWORD4>
+ <KEYWORD4>false</KEYWORD4>
+ <KEYWORD4>default</KEYWORD4>
+ </KEYWORDS>
+
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ TAGS -->
+ <RULES SET="TAGS" DEFAULT="MARKUP" NO_WORD_SEP="-_">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="MARKUP" DELEGATE="STRING">"</SEQ>
+
+ <!-- variables -->
+ <SPAN TYPE="KEYWORD4">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SEQ TYPE="MARKUP" DELEGATE="maven::MAIN">/></SEQ>
+ <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <KEYWORDS>
+ <KEYWORD1>project</KEYWORD1>
+
+ <KEYWORD2>basedir</KEYWORD2>
+ <KEYWORD2>project.baseUri</KEYWORD2>
+ <KEYWORD2>maven.build.timestamp</KEYWORD2>
+ <KEYWORD2>maven.build.timestamp.format</KEYWORD2>
+
+
+ <KEYWORD2>activation</KEYWORD2>
+ <KEYWORD2>activeByDefault</KEYWORD2>
+ <KEYWORD2>address</KEYWORD2>
+ <KEYWORD2>arch</KEYWORD2>
+ <KEYWORD2>archive</KEYWORD2>
+ <KEYWORD2>artifactId</KEYWORD2>
+ <KEYWORD2>build</KEYWORD2>
+ <KEYWORD2>checksumPolicy</KEYWORD2>
+ <KEYWORD2>ciManagement</KEYWORD2>
+ <KEYWORD2>classifier</KEYWORD2>
+ <KEYWORD2>comments</KEYWORD2>
+ <KEYWORD2>configuration</KEYWORD2>
+ <KEYWORD2>connection</KEYWORD2>
+ <KEYWORD2>contributors</KEYWORD2>
+ <KEYWORD2>defaultGoal</KEYWORD2>
+ <KEYWORD2>dependencies</KEYWORD2>
+ <KEYWORD2>dependencyManagement</KEYWORD2>
+ <KEYWORD2>description</KEYWORD2>
+ <KEYWORD2>developerConnection</KEYWORD2>
+ <KEYWORD2>developers</KEYWORD2>
+ <KEYWORD2>directory</KEYWORD2>
+ <KEYWORD2>distribution</KEYWORD2>
+ <KEYWORD2>distributionManagement</KEYWORD2>
+ <KEYWORD2>downloadUrl</KEYWORD2>
+ <KEYWORD2>email</KEYWORD2>
+ <KEYWORD2>enabled</KEYWORD2>
+ <KEYWORD2>excludeDefaults</KEYWORD2>
+ <KEYWORD2>excludes</KEYWORD2>
+ <KEYWORD2>exclusions</KEYWORD2>
+ <KEYWORD2>executions</KEYWORD2>
+ <KEYWORD2>exists</KEYWORD2>
+ <KEYWORD2>extensions</KEYWORD2>
+ <KEYWORD2>family</KEYWORD2>
+ <KEYWORD2>file</KEYWORD2>
+ <KEYWORD2>filtering</KEYWORD2>
+ <KEYWORD2>filters</KEYWORD2>
+ <KEYWORD2>finalName</KEYWORD2>
+ <KEYWORD2>goals</KEYWORD2>
+ <KEYWORD2>groupId</KEYWORD2>
+ <KEYWORD2>id</KEYWORD2>
+ <KEYWORD2>inceptionYear</KEYWORD2>
+ <KEYWORD2>includes</KEYWORD2>
+ <KEYWORD2>inherited</KEYWORD2>
+ <KEYWORD2>issueManagement</KEYWORD2>
+ <KEYWORD2>jdk</KEYWORD2>
+ <KEYWORD2>layout</KEYWORD2>
+ <KEYWORD2>licenses</KEYWORD2>
+ <KEYWORD2>mailingLists</KEYWORD2>
+ <KEYWORD2>maven</KEYWORD2>
+ <KEYWORD2>message</KEYWORD2>
+ <KEYWORD2>missing</KEYWORD2>
+ <KEYWORD2>modelVersion</KEYWORD2>
+ <KEYWORD2>modules</KEYWORD2>
+ <KEYWORD2>name</KEYWORD2>
+ <KEYWORD2>notifiers</KEYWORD2>
+ <KEYWORD2>optional</KEYWORD2>
+ <KEYWORD2>organization</KEYWORD2>
+ <KEYWORD2>organizationUrl</KEYWORD2>
+ <KEYWORD2>os</KEYWORD2>
+ <KEYWORD2>otherArchives</KEYWORD2>
+ <KEYWORD2>outputDirectory</KEYWORD2>
+ <KEYWORD2>packaging</KEYWORD2>
+ <KEYWORD2>parent</KEYWORD2>
+ <KEYWORD2>phase</KEYWORD2>
+ <KEYWORD2>pluginManagement</KEYWORD2>
+ <KEYWORD2>pluginRepositories</KEYWORD2>
+ <KEYWORD2>plugins</KEYWORD2>
+ <KEYWORD2>post</KEYWORD2>
+ <KEYWORD2>prerequisites</KEYWORD2>
+ <KEYWORD2>profiles</KEYWORD2>
+ <KEYWORD2>properties</KEYWORD2>
+ <KEYWORD2>property</KEYWORD2>
+ <KEYWORD2>relativePath</KEYWORD2>
+ <KEYWORD2>releases</KEYWORD2>
+ <KEYWORD2>relocation</KEYWORD2>
+ <KEYWORD2>reportSets</KEYWORD2>
+ <KEYWORD2>reporting</KEYWORD2>
+ <KEYWORD2>reports</KEYWORD2>
+ <KEYWORD2>repositories</KEYWORD2>
+ <KEYWORD2>repository</KEYWORD2>
+ <KEYWORD2>resources</KEYWORD2>
+ <KEYWORD2>roles</KEYWORD2>
+ <KEYWORD2>scm</KEYWORD2>
+ <KEYWORD2>scope</KEYWORD2>
+ <KEYWORD2>scriptSourceDirectory</KEYWORD2>
+ <KEYWORD2>sendOnError</KEYWORD2>
+ <KEYWORD2>sendOnFailure</KEYWORD2>
+ <KEYWORD2>sendOnSuccess</KEYWORD2>
+ <KEYWORD2>sendOnWarning</KEYWORD2>
+ <KEYWORD2>site</KEYWORD2>
+ <KEYWORD2>snapshotRepository</KEYWORD2>
+ <KEYWORD2>snapshots</KEYWORD2>
+ <KEYWORD2>sourceDirectory</KEYWORD2>
+ <KEYWORD2>status</KEYWORD2>
+ <KEYWORD2>subscribe</KEYWORD2>
+ <KEYWORD2>system</KEYWORD2>
+ <KEYWORD2>systemPath</KEYWORD2>
+ <KEYWORD2>tag</KEYWORD2>
+ <KEYWORD2>targetPath</KEYWORD2>
+ <KEYWORD2>testOutputDirectory</KEYWORD2>
+ <KEYWORD2>testResources</KEYWORD2>
+ <KEYWORD2>testSourceDirectory</KEYWORD2>
+ <KEYWORD2>timezone</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>uniqueVersion</KEYWORD2>
+ <KEYWORD2>unsubscribe</KEYWORD2>
+ <KEYWORD2>updatePolicy</KEYWORD2>
+ <KEYWORD2>url</KEYWORD2>
+ <KEYWORD2>value</KEYWORD2>
+ <KEYWORD2>version</KEYWORD2>
+
+ <KEYWORD3>contributor</KEYWORD3>
+ <KEYWORD3>dependency</KEYWORD3>
+ <KEYWORD3>developer</KEYWORD3>
+ <KEYWORD3>exclude</KEYWORD3>
+ <KEYWORD3>exclusion</KEYWORD3>
+ <KEYWORD3>execution</KEYWORD3>
+ <KEYWORD3>extension</KEYWORD3>
+ <KEYWORD3>filter</KEYWORD3>
+ <KEYWORD3>goal</KEYWORD3>
+ <KEYWORD3>include</KEYWORD3>
+ <KEYWORD3>license</KEYWORD3>
+ <KEYWORD3>mailingList</KEYWORD3>
+ <KEYWORD3>module</KEYWORD3>
+ <KEYWORD3>notifier</KEYWORD3>
+ <KEYWORD3>otherArchive</KEYWORD3>
+ <KEYWORD3>plugin</KEYWORD3>
+ <KEYWORD3>pluginRepository</KEYWORD3>
+ <KEYWORD3>profile</KEYWORD3>
+ <KEYWORD3>report</KEYWORD3>
+ <KEYWORD3>reportSet</KEYWORD3>
+ <KEYWORD3>repository</KEYWORD3>
+ <KEYWORD3>resource</KEYWORD3>
+ <KEYWORD3>role</KEYWORD3>
+ <KEYWORD3>testResource</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ DTD-TAGS -->
+ <RULES SET="DTD-TAGS" DEFAULT="KEYWORD2" IGNORE_CASE="FALSE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <!-- Parameter entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>%</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- This appears in some SGML documents -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="MAIN">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>CDATA</KEYWORD1>
+ <KEYWORD1>EMPTY</KEYWORD1>
+ <KEYWORD1>INCLUDE</KEYWORD1>
+ <KEYWORD1>IGNORE</KEYWORD1>
+ <KEYWORD1>NDATA</KEYWORD1>
+ <KEYWORD1>#IMPLIED</KEYWORD1>
+ <KEYWORD1>#PCDATA</KEYWORD1>
+ <KEYWORD1>#REQUIRED</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ ENTITY-TAGS -->
+ <RULES SET="ENTITY-TAGS" DEFAULT="KEYWORD2">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>SYSTEM</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ CDATA -->
+ <RULES SET="CDATA" DEFAULT="COMMENT2">
+ <KEYWORDS>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>yes</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ STRING -->
+ <RULES SET="STRING" DEFAULT="LITERAL1">
+ <!-- variables -->
+ <SPAN TYPE="KEYWORD4">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SEQ TYPE="NULL">\"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="TAGS">"</SEQ>
+
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ <KEYWORDS>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>yes</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <RULES SET="BACK_TO_XML" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="maven::TAGS">></SEQ>
+ </RULES>
+</MODE>
+
+
diff --git a/jEdit/modes/ml.xml b/jEdit/modes/ml.xml
index 0be47b6..b7f9bc6 100644
--- a/jEdit/modes/ml.xml
+++ b/jEdit/modes/ml.xml
@@ -1,216 +1,216 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- SML MODE 1.0.1 by Lucas Dixon, based on Ingmar Stein's ml mode -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="(*"/>
- <PROPERTY NAME="commentEnd" VALUE="*)"/>
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*\\/(){}" />
-<!-- JEdit's indent mechanism is not expressive enough for ML.
- It is best not to even try to have automated indentation for ML until significant improvements are made to the indent language. -->
-<!--
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="([{" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")]}" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="([{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE=")]}" />
- <PROPERTY NAME="indentNextLines"
- VALUE="(^|.*\s+)(let|sig|struct|local)(\W+.*|)$" />
- <PROPERTY NAME="unindentNextLines"
- VALUE="(^|.*\s+)(end)(\W+.*|)$" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="(^|\s+)(local|val|fun|end|in|open)(\W+.*|)$" />
--->
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>(*</BEGIN>
- <END>*)</END>
- </SPAN>
-
- <!-- character literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>#"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- string literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- built-in operators -->
-
- <!-- infix precedence 7 -->
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <!-- reserved & operator characters -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
-
-
- <MARK_FOLLOWING TYPE="FUNCTION"
- MATCH_TYPE="KEYWORD1">fun </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION"
- MATCH_TYPE="KEYWORD1">val </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION"
- MATCH_TYPE="KEYWORD1">exception </MARK_FOLLOWING>
-
- <MARK_FOLLOWING TYPE="FUNCTION"
- MATCH_TYPE="KEYWORD1">type </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION"
- MATCH_TYPE="KEYWORD1">abstype </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION"
- MATCH_TYPE="KEYWORD1">eqtype </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION"
- MATCH_TYPE="KEYWORD1">datatype </MARK_FOLLOWING>
-
- <MARK_FOLLOWING TYPE="LITERAL3"
- MATCH_TYPE="KEYWORD1">functor </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL3"
- MATCH_TYPE="KEYWORD1">structure </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL3"
- MATCH_TYPE="KEYWORD1">signature </MARK_FOLLOWING>
-
- <!-- reserved words -->
- <KEYWORDS>
- <!-- built-in operators -->
-
- <!-- infix precedence 7 -->
- <OPERATOR>div</OPERATOR>
- <OPERATOR>mod</OPERATOR>
-
- <!-- infix precedence 3 -->
- <OPERATOR>o</OPERATOR>
-
- <!-- infix precedence 0 -->
- <OPERATOR>before</OPERATOR>
-
- <!-- type def -->
- <KEYWORD1>abstype</KEYWORD1>
- <KEYWORD1>datatype</KEYWORD1>
- <KEYWORD1>eqtype</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
-
- <!-- value definitions -->
- <KEYWORD1>exception</KEYWORD1>
- <KEYWORD1>fun</KEYWORD1>
- <KEYWORD1>val</KEYWORD1>
- <KEYWORD1>fn</KEYWORD1>
-
- <!-- generic definitional -->
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>infix</KEYWORD1>
- <KEYWORD1>infixr</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>op</KEYWORD1>
-
- <!-- module level -->
- <KEYWORD1>functor</KEYWORD1>
- <KEYWORD1>include</KEYWORD1>
- <KEYWORD1>open</KEYWORD1>
- <KEYWORD1>sharing</KEYWORD1>
- <KEYWORD1>sig</KEYWORD1>
- <KEYWORD1>signature</KEYWORD1>
- <KEYWORD1>struct</KEYWORD1>
- <KEYWORD1>structure</KEYWORD1>
- <KEYWORD1>where</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
-
- <!-- logic/control flow -->
- <KEYWORD1>andalso</KEYWORD1>
- <KEYWORD1>orelse</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>handle</KEYWORD1>
- <KEYWORD1>raise</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
-
- <!--- other -->
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>nonfix</KEYWORD1>
- <KEYWORD1>rec</KEYWORD1>
- <KEYWORD1>withtype</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <!-- built-in types -->
- <KEYWORD3>array</KEYWORD3>
- <KEYWORD3>bool</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>exn</KEYWORD3>
- <KEYWORD3>frag</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>option</KEYWORD3>
- <KEYWORD3>order</KEYWORD3>
- <KEYWORD3>real</KEYWORD3>
- <KEYWORD3>ref</KEYWORD3>
- <KEYWORD3>string</KEYWORD3>
- <KEYWORD3>substring</KEYWORD3>
- <KEYWORD3>unit</KEYWORD3>
- <KEYWORD3>vector</KEYWORD3>
- <KEYWORD3>word</KEYWORD3>
- <KEYWORD3>word8</KEYWORD3>
-
- <!-- build-in exception constructors -->
- <KEYWORD2>Bind</KEYWORD2>
- <KEYWORD2>Chr</KEYWORD2>
- <KEYWORD2>Domain</KEYWORD2>
- <KEYWORD2>Div</KEYWORD2>
- <KEYWORD2>Fail</KEYWORD2>
- <KEYWORD2>Graphic</KEYWORD2>
- <KEYWORD2>Interrupt</KEYWORD2>
- <KEYWORD2>Io</KEYWORD2>
- <KEYWORD2>Match</KEYWORD2>
- <KEYWORD2>Option</KEYWORD2>
- <KEYWORD2>Ord</KEYWORD2>
- <KEYWORD2>Overflow</KEYWORD2>
- <KEYWORD2>Size</KEYWORD2>
- <KEYWORD2>Subscript</KEYWORD2>
- <KEYWORD2>SysErr</KEYWORD2>
-
- <!-- built-in literals -->
- <LITERAL2>false</LITERAL2>
- <LITERAL2>true</LITERAL2>
- <LITERAL2>QUOTE</LITERAL2>
- <LITERAL2>ANTIQUOTE</LITERAL2>
- <LITERAL2>nil</LITERAL2>
- <LITERAL2>NONE</LITERAL2>
- <LITERAL2>SOME</LITERAL2>
- <LITERAL2>LESS</LITERAL2>
- <LITERAL2>EQUAL</LITERAL2>
- <LITERAL2>GREATER</LITERAL2>
- </KEYWORDS>
-
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- SML MODE 1.0.1 by Lucas Dixon, based on Ingmar Stein's ml mode -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="(*"/>
+ <PROPERTY NAME="commentEnd" VALUE="*)"/>
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*\\/(){}" />
+<!-- JEdit's indent mechanism is not expressive enough for ML.
+ It is best not to even try to have automated indentation for ML until significant improvements are made to the indent language. -->
+<!--
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="([{" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")]}" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="([{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE=")]}" />
+ <PROPERTY NAME="indentNextLines"
+ VALUE="(^|.*\s+)(let|sig|struct|local)(\W+.*|)$" />
+ <PROPERTY NAME="unindentNextLines"
+ VALUE="(^|.*\s+)(end)(\W+.*|)$" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="(^|\s+)(local|val|fun|end|in|open)(\W+.*|)$" />
+-->
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>(*</BEGIN>
+ <END>*)</END>
+ </SPAN>
+
+ <!-- character literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>#"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- string literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- built-in operators -->
+
+ <!-- infix precedence 7 -->
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <!-- reserved & operator characters -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+
+
+ <MARK_FOLLOWING TYPE="FUNCTION"
+ MATCH_TYPE="KEYWORD1">fun </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION"
+ MATCH_TYPE="KEYWORD1">val </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION"
+ MATCH_TYPE="KEYWORD1">exception </MARK_FOLLOWING>
+
+ <MARK_FOLLOWING TYPE="FUNCTION"
+ MATCH_TYPE="KEYWORD1">type </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION"
+ MATCH_TYPE="KEYWORD1">abstype </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION"
+ MATCH_TYPE="KEYWORD1">eqtype </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION"
+ MATCH_TYPE="KEYWORD1">datatype </MARK_FOLLOWING>
+
+ <MARK_FOLLOWING TYPE="LITERAL3"
+ MATCH_TYPE="KEYWORD1">functor </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL3"
+ MATCH_TYPE="KEYWORD1">structure </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL3"
+ MATCH_TYPE="KEYWORD1">signature </MARK_FOLLOWING>
+
+ <!-- reserved words -->
+ <KEYWORDS>
+ <!-- built-in operators -->
+
+ <!-- infix precedence 7 -->
+ <OPERATOR>div</OPERATOR>
+ <OPERATOR>mod</OPERATOR>
+
+ <!-- infix precedence 3 -->
+ <OPERATOR>o</OPERATOR>
+
+ <!-- infix precedence 0 -->
+ <OPERATOR>before</OPERATOR>
+
+ <!-- type def -->
+ <KEYWORD1>abstype</KEYWORD1>
+ <KEYWORD1>datatype</KEYWORD1>
+ <KEYWORD1>eqtype</KEYWORD1>
+ <KEYWORD1>type</KEYWORD1>
+
+ <!-- value definitions -->
+ <KEYWORD1>exception</KEYWORD1>
+ <KEYWORD1>fun</KEYWORD1>
+ <KEYWORD1>val</KEYWORD1>
+ <KEYWORD1>fn</KEYWORD1>
+
+ <!-- generic definitional -->
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>infix</KEYWORD1>
+ <KEYWORD1>infixr</KEYWORD1>
+ <KEYWORD1>let</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>of</KEYWORD1>
+ <KEYWORD1>op</KEYWORD1>
+
+ <!-- module level -->
+ <KEYWORD1>functor</KEYWORD1>
+ <KEYWORD1>include</KEYWORD1>
+ <KEYWORD1>open</KEYWORD1>
+ <KEYWORD1>sharing</KEYWORD1>
+ <KEYWORD1>sig</KEYWORD1>
+ <KEYWORD1>signature</KEYWORD1>
+ <KEYWORD1>struct</KEYWORD1>
+ <KEYWORD1>structure</KEYWORD1>
+ <KEYWORD1>where</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+
+ <!-- logic/control flow -->
+ <KEYWORD1>andalso</KEYWORD1>
+ <KEYWORD1>orelse</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>handle</KEYWORD1>
+ <KEYWORD1>raise</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+
+ <!--- other -->
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>nonfix</KEYWORD1>
+ <KEYWORD1>rec</KEYWORD1>
+ <KEYWORD1>withtype</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <!-- built-in types -->
+ <KEYWORD3>array</KEYWORD3>
+ <KEYWORD3>bool</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>exn</KEYWORD3>
+ <KEYWORD3>frag</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>option</KEYWORD3>
+ <KEYWORD3>order</KEYWORD3>
+ <KEYWORD3>real</KEYWORD3>
+ <KEYWORD3>ref</KEYWORD3>
+ <KEYWORD3>string</KEYWORD3>
+ <KEYWORD3>substring</KEYWORD3>
+ <KEYWORD3>unit</KEYWORD3>
+ <KEYWORD3>vector</KEYWORD3>
+ <KEYWORD3>word</KEYWORD3>
+ <KEYWORD3>word8</KEYWORD3>
+
+ <!-- build-in exception constructors -->
+ <KEYWORD2>Bind</KEYWORD2>
+ <KEYWORD2>Chr</KEYWORD2>
+ <KEYWORD2>Domain</KEYWORD2>
+ <KEYWORD2>Div</KEYWORD2>
+ <KEYWORD2>Fail</KEYWORD2>
+ <KEYWORD2>Graphic</KEYWORD2>
+ <KEYWORD2>Interrupt</KEYWORD2>
+ <KEYWORD2>Io</KEYWORD2>
+ <KEYWORD2>Match</KEYWORD2>
+ <KEYWORD2>Option</KEYWORD2>
+ <KEYWORD2>Ord</KEYWORD2>
+ <KEYWORD2>Overflow</KEYWORD2>
+ <KEYWORD2>Size</KEYWORD2>
+ <KEYWORD2>Subscript</KEYWORD2>
+ <KEYWORD2>SysErr</KEYWORD2>
+
+ <!-- built-in literals -->
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>QUOTE</LITERAL2>
+ <LITERAL2>ANTIQUOTE</LITERAL2>
+ <LITERAL2>nil</LITERAL2>
+ <LITERAL2>NONE</LITERAL2>
+ <LITERAL2>SOME</LITERAL2>
+ <LITERAL2>LESS</LITERAL2>
+ <LITERAL2>EQUAL</LITERAL2>
+ <LITERAL2>GREATER</LITERAL2>
+ </KEYWORDS>
+
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/modula3.xml b/jEdit/modes/modula3.xml
index ea79d00..5409f82 100644
--- a/jEdit/modes/modula3.xml
+++ b/jEdit/modes/modula3.xml
@@ -1,178 +1,178 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Modula-3 mode, by Marcio Marchini mqm at magma.ca -->
-<!-- See http://www.research.compaq.com/SRC/m3defn/html/syntax.html -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="(*" />
- <PROPERTY NAME="commentEnd" VALUE="*)" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comment -->
- <!-- Compiler directives. -->
- <SPAN TYPE="COMMENT2">
- <BEGIN><*</BEGIN>
- <END>*></END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>(*</BEGIN>
- <END>*)</END>
- </SPAN>
-
- <!-- Standard literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>DO</KEYWORD1>
- <KEYWORD1>FROM</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>REPEAT</KEYWORD1>
- <KEYWORD1>UNTIL</KEYWORD1>
- <KEYWORD1>ANY</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>GENERIC</KEYWORD1>
- <KEYWORD1>OBJECT</KEYWORD1>
- <KEYWORD1>RETURN</KEYWORD1>
- <KEYWORD1>UNTRACED</KEYWORD1>
- <KEYWORD1>ARRAY</KEYWORD1>
- <KEYWORD1>ELSIF</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>OF</KEYWORD1>
- <KEYWORD1>REVEAL</KEYWORD1>
- <KEYWORD1>VALUE</KEYWORD1>
- <KEYWORD1>AS</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>IMPORT</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>ROOT</KEYWORD1>
- <KEYWORD1>VAR</KEYWORD1>
- <KEYWORD1>BEGIN</KEYWORD1>
- <KEYWORD1>EVAL</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>OVERRIDES</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
- <KEYWORD1>BITS</KEYWORD1>
- <KEYWORD1>EXCEPT</KEYWORD1>
- <KEYWORD1>INTERFACE</KEYWORD1>
- <KEYWORD1>PROCEDURE</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>BRANDED</KEYWORD1>
- <KEYWORD1>EXCEPTION</KEYWORD1>
- <KEYWORD1>LOCK</KEYWORD1>
- <KEYWORD1>RAISE</KEYWORD1>
- <KEYWORD1>TO</KEYWORD1>
- <KEYWORD1>BY</KEYWORD1>
- <KEYWORD1>EXIT</KEYWORD1>
- <KEYWORD1>LOOP</KEYWORD1>
- <KEYWORD1>RAISES</KEYWORD1>
- <KEYWORD1>TRY</KEYWORD1>
- <KEYWORD1>CASE</KEYWORD1>
- <KEYWORD1>EXPORTS</KEYWORD1>
- <KEYWORD1>METHODS</KEYWORD1>
- <KEYWORD1>READONLY</KEYWORD1>
- <KEYWORD1>TYPE</KEYWORD1>
- <KEYWORD1>CONST</KEYWORD1>
- <KEYWORD1>FINALLY</KEYWORD1>
- <KEYWORD1>MOD</KEYWORD1>
- <KEYWORD1>RECORD</KEYWORD1>
- <KEYWORD1>TYPECASE</KEYWORD1>
- <KEYWORD1>DIV</KEYWORD1>
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>MODULE</KEYWORD1>
- <KEYWORD1>REF</KEYWORD1>
- <KEYWORD1>UNSAFE</KEYWORD1>
-
- <!-- Reserved identifiers -->
- <LITERAL2>ABS</LITERAL2>
- <LITERAL2>BYTESIZE</LITERAL2>
- <LITERAL2>EXTENDED</LITERAL2>
- <LITERAL2>INTEGER</LITERAL2>
- <LITERAL2>MIN</LITERAL2>
- <LITERAL2>NUMBER</LITERAL2>
- <LITERAL2>TEXT</LITERAL2>
- <LITERAL2>ADDRESS</LITERAL2>
- <LITERAL2>CARDINAL</LITERAL2>
- <LITERAL2>FALSE</LITERAL2>
- <LITERAL2>ISTYPE</LITERAL2>
- <LITERAL2>MUTEX</LITERAL2>
- <LITERAL2>ORD</LITERAL2>
- <LITERAL2>TRUE</LITERAL2>
- <LITERAL2>ADR</LITERAL2>
- <LITERAL2>CEILING</LITERAL2>
- <LITERAL2>FIRST</LITERAL2>
- <LITERAL2>LAST</LITERAL2>
- <LITERAL2>NARROW</LITERAL2>
- <LITERAL2>REAL</LITERAL2>
- <LITERAL2>TRUNC</LITERAL2>
- <LITERAL2>ADRSIZE</LITERAL2>
- <LITERAL2>CHAR</LITERAL2>
- <LITERAL2>FLOAT</LITERAL2>
- <LITERAL2>LONGREAL</LITERAL2>
- <LITERAL2>NEW</LITERAL2>
- <LITERAL2>REFANY</LITERAL2>
- <LITERAL2>TYPECODE</LITERAL2>
- <LITERAL2>BITSIZE</LITERAL2>
- <LITERAL2>DEC</LITERAL2>
- <LITERAL2>FLOOR</LITERAL2>
- <LITERAL2>LOOPHOLE</LITERAL2>
- <LITERAL2>NIL</LITERAL2>
- <LITERAL2>ROUND</LITERAL2>
- <LITERAL2>VAL</LITERAL2>
- <LITERAL2>BOOLEAN</LITERAL2>
- <LITERAL2>DISPOSE</LITERAL2>
- <LITERAL2>INC</LITERAL2>
- <LITERAL2>MAX</LITERAL2>
- <LITERAL2>NULL</LITERAL2>
- <LITERAL2>SUBARRAY</LITERAL2>
-
- <!-- Standard interfaces -->
- <!-- http://www.research.compaq.com/SRC/m3defn/html/intfs.html -->
- <KEYWORD2>Text</KEYWORD2>
- <KEYWORD2>Thread</KEYWORD2>
- <KEYWORD2>Word</KEYWORD2>
- <KEYWORD2>Real</KEYWORD2>
- <KEYWORD2>LongReal</KEYWORD2>
- <KEYWORD2>ExtendedReal</KEYWORD2>
- <KEYWORD2>RealFloat</KEYWORD2>
- <KEYWORD2>LongFloat</KEYWORD2>
- <KEYWORD2>ExtendedFloat</KEYWORD2>
- <KEYWORD2>FloatMode</KEYWORD2>
-
- <!-- Recommended interfaces -->
- <!-- http://www.research.compaq.com/SRC/m3defn/html/intfs.html -->
- <KEYWORD3>Fmt</KEYWORD3>
- <KEYWORD3>Lex</KEYWORD3>
- <KEYWORD3>Pickle</KEYWORD3>
- <KEYWORD3>Table</KEYWORD3>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Modula-3 mode, by Marcio Marchini mqm at magma.ca -->
+<!-- See http://www.research.compaq.com/SRC/m3defn/html/syntax.html -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="(*" />
+ <PROPERTY NAME="commentEnd" VALUE="*)" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comment -->
+ <!-- Compiler directives. -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN><*</BEGIN>
+ <END>*></END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>(*</BEGIN>
+ <END>*)</END>
+ </SPAN>
+
+ <!-- Standard literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>DO</KEYWORD1>
+ <KEYWORD1>FROM</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>REPEAT</KEYWORD1>
+ <KEYWORD1>UNTIL</KEYWORD1>
+ <KEYWORD1>ANY</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>GENERIC</KEYWORD1>
+ <KEYWORD1>OBJECT</KEYWORD1>
+ <KEYWORD1>RETURN</KEYWORD1>
+ <KEYWORD1>UNTRACED</KEYWORD1>
+ <KEYWORD1>ARRAY</KEYWORD1>
+ <KEYWORD1>ELSIF</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>OF</KEYWORD1>
+ <KEYWORD1>REVEAL</KEYWORD1>
+ <KEYWORD1>VALUE</KEYWORD1>
+ <KEYWORD1>AS</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>IMPORT</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>ROOT</KEYWORD1>
+ <KEYWORD1>VAR</KEYWORD1>
+ <KEYWORD1>BEGIN</KEYWORD1>
+ <KEYWORD1>EVAL</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>OVERRIDES</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+ <KEYWORD1>BITS</KEYWORD1>
+ <KEYWORD1>EXCEPT</KEYWORD1>
+ <KEYWORD1>INTERFACE</KEYWORD1>
+ <KEYWORD1>PROCEDURE</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>BRANDED</KEYWORD1>
+ <KEYWORD1>EXCEPTION</KEYWORD1>
+ <KEYWORD1>LOCK</KEYWORD1>
+ <KEYWORD1>RAISE</KEYWORD1>
+ <KEYWORD1>TO</KEYWORD1>
+ <KEYWORD1>BY</KEYWORD1>
+ <KEYWORD1>EXIT</KEYWORD1>
+ <KEYWORD1>LOOP</KEYWORD1>
+ <KEYWORD1>RAISES</KEYWORD1>
+ <KEYWORD1>TRY</KEYWORD1>
+ <KEYWORD1>CASE</KEYWORD1>
+ <KEYWORD1>EXPORTS</KEYWORD1>
+ <KEYWORD1>METHODS</KEYWORD1>
+ <KEYWORD1>READONLY</KEYWORD1>
+ <KEYWORD1>TYPE</KEYWORD1>
+ <KEYWORD1>CONST</KEYWORD1>
+ <KEYWORD1>FINALLY</KEYWORD1>
+ <KEYWORD1>MOD</KEYWORD1>
+ <KEYWORD1>RECORD</KEYWORD1>
+ <KEYWORD1>TYPECASE</KEYWORD1>
+ <KEYWORD1>DIV</KEYWORD1>
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>MODULE</KEYWORD1>
+ <KEYWORD1>REF</KEYWORD1>
+ <KEYWORD1>UNSAFE</KEYWORD1>
+
+ <!-- Reserved identifiers -->
+ <LITERAL2>ABS</LITERAL2>
+ <LITERAL2>BYTESIZE</LITERAL2>
+ <LITERAL2>EXTENDED</LITERAL2>
+ <LITERAL2>INTEGER</LITERAL2>
+ <LITERAL2>MIN</LITERAL2>
+ <LITERAL2>NUMBER</LITERAL2>
+ <LITERAL2>TEXT</LITERAL2>
+ <LITERAL2>ADDRESS</LITERAL2>
+ <LITERAL2>CARDINAL</LITERAL2>
+ <LITERAL2>FALSE</LITERAL2>
+ <LITERAL2>ISTYPE</LITERAL2>
+ <LITERAL2>MUTEX</LITERAL2>
+ <LITERAL2>ORD</LITERAL2>
+ <LITERAL2>TRUE</LITERAL2>
+ <LITERAL2>ADR</LITERAL2>
+ <LITERAL2>CEILING</LITERAL2>
+ <LITERAL2>FIRST</LITERAL2>
+ <LITERAL2>LAST</LITERAL2>
+ <LITERAL2>NARROW</LITERAL2>
+ <LITERAL2>REAL</LITERAL2>
+ <LITERAL2>TRUNC</LITERAL2>
+ <LITERAL2>ADRSIZE</LITERAL2>
+ <LITERAL2>CHAR</LITERAL2>
+ <LITERAL2>FLOAT</LITERAL2>
+ <LITERAL2>LONGREAL</LITERAL2>
+ <LITERAL2>NEW</LITERAL2>
+ <LITERAL2>REFANY</LITERAL2>
+ <LITERAL2>TYPECODE</LITERAL2>
+ <LITERAL2>BITSIZE</LITERAL2>
+ <LITERAL2>DEC</LITERAL2>
+ <LITERAL2>FLOOR</LITERAL2>
+ <LITERAL2>LOOPHOLE</LITERAL2>
+ <LITERAL2>NIL</LITERAL2>
+ <LITERAL2>ROUND</LITERAL2>
+ <LITERAL2>VAL</LITERAL2>
+ <LITERAL2>BOOLEAN</LITERAL2>
+ <LITERAL2>DISPOSE</LITERAL2>
+ <LITERAL2>INC</LITERAL2>
+ <LITERAL2>MAX</LITERAL2>
+ <LITERAL2>NULL</LITERAL2>
+ <LITERAL2>SUBARRAY</LITERAL2>
+
+ <!-- Standard interfaces -->
+ <!-- http://www.research.compaq.com/SRC/m3defn/html/intfs.html -->
+ <KEYWORD2>Text</KEYWORD2>
+ <KEYWORD2>Thread</KEYWORD2>
+ <KEYWORD2>Word</KEYWORD2>
+ <KEYWORD2>Real</KEYWORD2>
+ <KEYWORD2>LongReal</KEYWORD2>
+ <KEYWORD2>ExtendedReal</KEYWORD2>
+ <KEYWORD2>RealFloat</KEYWORD2>
+ <KEYWORD2>LongFloat</KEYWORD2>
+ <KEYWORD2>ExtendedFloat</KEYWORD2>
+ <KEYWORD2>FloatMode</KEYWORD2>
+
+ <!-- Recommended interfaces -->
+ <!-- http://www.research.compaq.com/SRC/m3defn/html/intfs.html -->
+ <KEYWORD3>Fmt</KEYWORD3>
+ <KEYWORD3>Lex</KEYWORD3>
+ <KEYWORD3>Pickle</KEYWORD3>
+ <KEYWORD3>Table</KEYWORD3>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/moin.xml b/jEdit/modes/moin.xml
index 798e766..1e62d2a 100644
--- a/jEdit/modes/moin.xml
+++ b/jEdit/modes/moin.xml
@@ -1,111 +1,111 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="##" />
- <PROPERTY NAME="wrap" VALUE="soft" />
- </PROPS>
- <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="FALSE">
-
- <!-- comment -->
- <EOL_SPAN TYPE="COMMENT1">##</EOL_SPAN>
-
- <!-- directive -->
- <EOL_SPAN TYPE="KEYWORD2">#pragma</EOL_SPAN>
-
- <!-- macro -->
- <SPAN TYPE="KEYWORD4">
- <BEGIN>[[</BEGIN>
- <END>]]</END>
- </SPAN>
-
- <!-- term definition -->
- <SEQ_REGEXP
- HASH_CHAR=' '
- AT_LINE_START='TRUE'
- TYPE="LABEL"
- >\s+(?:\(|\)|\w)[\p{Alnum}\p{Blank}.()]+::</SEQ_REGEXP>
-
- <!-- smileys -->
- <!-- not on by default because it slows things down a bit
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\sB\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\)\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\;\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:D\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\%lt;\:\(\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\sX\-\(\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:o\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\(\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\/\!\\\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\%lt;\!\b\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\(\!\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\-\?\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\b\:\b\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\%\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\@\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\|\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\;\)\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\(\.\/\)\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{OK\}\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{X\}\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{i\}\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{1\}\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{2\}\s</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{3\}\s</SEQ_REGEXP>
- -->
-
- <!-- code or literal -->
- <SPAN TYPE="LITERAL2">
- <BEGIN>{{{</BEGIN>
- <END>}}}</END>
- </SPAN>
-
- <!-- code or literal -->
- <SPAN TYPE="LITERAL2" ESCAPE="\">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <!-- bold or italic -->
- <SEQ_REGEXP
- HASH_CHAR="''"
- TYPE="LITERAL1"
- >('{2,5})[^']+\1[^']</SEQ_REGEXP>
-
- <!-- horizontal rule -->
- <SEQ_REGEXP
- HASH_CHAR="----"
- TYPE="LITERAL4"
- >-{4,}</SEQ_REGEXP>
-
- <!-- section header -->
- <SPAN_REGEXP
- HASH_CHAR="="
- TYPE="KEYWORD1"
- AT_LINE_START="TRUE"
- >
- <BEGIN>(={1,5}) </BEGIN>
- <END> $1</END>
- </SPAN_REGEXP>
-
- <!-- implicit WikiWords - a bit of a hack, but I can't think of a better way... -->
- <SEQ_REGEXP HASH_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZ" AT_WORD_START="TRUE" TYPE="KEYWORD2">[A-Z][a-z]+[A-Z][a-zA-Z]+</SEQ_REGEXP>
-
- <!-- explicit WikiWord -->
- <SPAN TYPE="KEYWORD2">
- <BEGIN>["</BEGIN>
- <END>"]</END>
- </SPAN>
-
- <!-- url -->
- <SPAN TYPE="KEYWORD3">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="##" />
+ <PROPERTY NAME="wrap" VALUE="soft" />
+ </PROPS>
+ <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="FALSE">
+
+ <!-- comment -->
+ <EOL_SPAN TYPE="COMMENT1">##</EOL_SPAN>
+
+ <!-- directive -->
+ <EOL_SPAN TYPE="KEYWORD2">#pragma</EOL_SPAN>
+
+ <!-- macro -->
+ <SPAN TYPE="KEYWORD4">
+ <BEGIN>[[</BEGIN>
+ <END>]]</END>
+ </SPAN>
+
+ <!-- term definition -->
+ <SEQ_REGEXP
+ HASH_CHAR=' '
+ AT_LINE_START='TRUE'
+ TYPE="LABEL"
+ >\s+(?:\(|\)|\w)[\p{Alnum}\p{Blank}.()]+::</SEQ_REGEXP>
+
+ <!-- smileys -->
+ <!-- not on by default because it slows things down a bit
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\sB\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\)\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\;\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:D\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\%lt;\:\(\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\sX\-\(\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:o\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\(\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\/\!\\\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\%lt;\!\b\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\(\!\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\-\?\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\:\b\:\b\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\%\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\@\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\|\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\;\)\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\(\.\/\)\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{OK\}\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{X\}\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{i\}\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{1\}\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{2\}\s</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=' ' AT_LINE_START='FALSE' TYPE="LITERAL3">\s\{3\}\s</SEQ_REGEXP>
+ -->
+
+ <!-- code or literal -->
+ <SPAN TYPE="LITERAL2">
+ <BEGIN>{{{</BEGIN>
+ <END>}}}</END>
+ </SPAN>
+
+ <!-- code or literal -->
+ <SPAN TYPE="LITERAL2" ESCAPE="\">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <!-- bold or italic -->
+ <SEQ_REGEXP
+ HASH_CHAR="''"
+ TYPE="LITERAL1"
+ >('{2,5})[^']+\1[^']</SEQ_REGEXP>
+
+ <!-- horizontal rule -->
+ <SEQ_REGEXP
+ HASH_CHAR="----"
+ TYPE="LITERAL4"
+ >-{4,}</SEQ_REGEXP>
+
+ <!-- section header -->
+ <SPAN_REGEXP
+ HASH_CHAR="="
+ TYPE="KEYWORD1"
+ AT_LINE_START="TRUE"
+ >
+ <BEGIN>(={1,5}) </BEGIN>
+ <END> $1</END>
+ </SPAN_REGEXP>
+
+ <!-- implicit WikiWords - a bit of a hack, but I can't think of a better way... -->
+ <SEQ_REGEXP HASH_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZ" AT_WORD_START="TRUE" TYPE="KEYWORD2">[A-Z][a-z]+[A-Z][a-zA-Z]+</SEQ_REGEXP>
+
+ <!-- explicit WikiWord -->
+ <SPAN TYPE="KEYWORD2">
+ <BEGIN>["</BEGIN>
+ <END>"]</END>
+ </SPAN>
+
+ <!-- url -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/mqsc.xml b/jEdit/modes/mqsc.xml
index 5187a2d..ce7fe43 100644
--- a/jEdit/modes/mqsc.xml
+++ b/jEdit/modes/mqsc.xml
@@ -1,231 +1,231 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!--
- IBM WebSphere MQ Scripting (MQSC)
- - by Aaron Bell <aaron at clockworklogic.co.uk>
- - accurate for WebSphere MQ 5.2.
- - ensure your LITERAL1 and LITERAL2 colours are set differently.
--->
-<MODE>
- <PROPS>
- <!-- asterisks are comments -->
- <PROPERTY NAME="lineComment" VALUE="*"/>
- </PROPS>
- <!-- ignore case, highlight numbers -->
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
-
- <!-- lines beginning with asterisk are comments -->
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">*</EOL_SPAN>
-
- <!-- brackets on one line delimit parameter values, don't parse -->
- <!-- case 1: string values using apostrophe marks -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE" MATCH_TYPE="OPERATOR">
- <BEGIN>('</BEGIN>
- <END>')</END>
- </SPAN>
- <!-- case 2: literal values and object names -->
- <SPAN TYPE="LITERAL2" ESCAPE="\" NO_LINE_BREAK="TRUE" MATCH_TYPE="OPERATOR">
- <BEGIN>(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- line continuation symbol -->
- <SEQ TYPE="OPERATOR">+</SEQ>
-
- <KEYWORDS>
- <!-- KEYWORD1 are core MQSC commands -->
- <KEYWORD1>all</KEYWORD1><!-- as in DIS Q(X) ALL -->
- <KEYWORD1>alter</KEYWORD1>
- <KEYWORD1>alt</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>define</KEYWORD1>
- <KEYWORD1>def</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD1>display</KEYWORD1>
- <KEYWORD1>dis</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>like</KEYWORD1><!-- as in DEF Q(X) LIKE(Y) -->
- <KEYWORD1>ping</KEYWORD1>
- <KEYWORD1>refresh</KEYWORD1>
- <KEYWORD1>ref</KEYWORD1>
- <KEYWORD1>replace</KEYWORD1><!-- as in DEF Q(X) REPLACE -->
- <KEYWORD1>reset</KEYWORD1>
- <KEYWORD1>resolve</KEYWORD1>
- <KEYWORD1>resume</KEYWORD1>
- <KEYWORD1>start</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>suspend</KEYWORD1>
-
- <!-- KEYWORD2 are object types -->
- <KEYWORD2>channel</KEYWORD2>
- <KEYWORD2>chl</KEYWORD2>
- <KEYWORD2>chstatus</KEYWORD2>
- <KEYWORD2>chst</KEYWORD2>
- <KEYWORD2>clusqmgr</KEYWORD2>
- <KEYWORD2>process</KEYWORD2>
- <KEYWORD2>proc</KEYWORD2>
- <KEYWORD2>namelist</KEYWORD2>
- <KEYWORD2>nl</KEYWORD2>
- <KEYWORD2>qalias</KEYWORD2>
- <KEYWORD2>qa</KEYWORD2>
- <KEYWORD2>qcluster</KEYWORD2>
- <KEYWORD2>qc</KEYWORD2>
- <KEYWORD2>qlocal</KEYWORD2>
- <KEYWORD2>ql</KEYWORD2>
- <KEYWORD2>qmodel</KEYWORD2>
- <KEYWORD2>qm</KEYWORD2>
- <KEYWORD2>qmgr</KEYWORD2>
- <KEYWORD2>qremote</KEYWORD2>
- <KEYWORD2>qr</KEYWORD2>
- <KEYWORD2>queue</KEYWORD2>
-
- <!-- MARKUP are object attributes -->
- <MARKUP>altdate</MARKUP>
- <MARKUP>alttime</MARKUP>
- <MARKUP>applicid</MARKUP>
- <MARKUP>appltype</MARKUP>
- <MARKUP>authorev</MARKUP>
- <MARKUP>batches</MARKUP>
- <MARKUP>batchint</MARKUP>
- <MARKUP>batchsz</MARKUP>
- <MARKUP>boqname</MARKUP>
- <MARKUP>bothresh</MARKUP>
- <MARKUP>bufsrcvd</MARKUP>
- <MARKUP>bufssent</MARKUP>
- <MARKUP>bytsrcvd</MARKUP>
- <MARKUP>bytssent</MARKUP>
- <MARKUP>ccsid</MARKUP>
- <MARKUP>chad</MARKUP>
- <MARKUP>chadev</MARKUP>
- <MARKUP>chadexit</MARKUP>
- <MARKUP>channel</MARKUP>
- <MARKUP>chltype</MARKUP>
- <MARKUP>chstada</MARKUP>
- <MARKUP>chstati</MARKUP>
- <MARKUP>clusdate</MARKUP>
- <MARKUP>clusinfo</MARKUP>
- <MARKUP>clusnl</MARKUP>
- <MARKUP>clusqmgr</MARKUP>
- <MARKUP>clusqt</MARKUP>
- <MARKUP>cluster</MARKUP>
- <MARKUP>clustime</MARKUP>
- <MARKUP>clwldata</MARKUP>
- <MARKUP>clwlexit</MARKUP>
- <MARKUP>clwlwen</MARKUP>
- <MARKUP>cmdlevel</MARKUP>
- <MARKUP>commandq</MARKUP>
- <MARKUP>conname</MARKUP>
- <MARKUP>convert</MARKUP>
- <MARKUP>crdate</MARKUP>
- <MARKUP>crtime</MARKUP>
- <MARKUP>curdepth</MARKUP>
- <MARKUP>curluwid</MARKUP>
- <MARKUP>curmsgs</MARKUP>
- <MARKUP>curseqno</MARKUP>
- <MARKUP>deadq</MARKUP>
- <MARKUP>defbind</MARKUP>
- <MARKUP>defprty</MARKUP>
- <MARKUP>defpsist</MARKUP>
- <MARKUP>defsopt</MARKUP>
- <MARKUP>deftype</MARKUP>
- <MARKUP>defxmitq</MARKUP>
- <MARKUP>descr</MARKUP>
- <MARKUP>discint</MARKUP>
- <MARKUP>distl</MARKUP>
- <MARKUP>envrdata</MARKUP>
- <MARKUP>get</MARKUP>
- <MARKUP>hardenbo</MARKUP>
- <MARKUP>hbint</MARKUP>
- <MARKUP>indoubt</MARKUP>
- <MARKUP>inhibtev</MARKUP>
- <MARKUP>initq</MARKUP>
- <MARKUP>ipprocs</MARKUP>
- <MARKUP>jobname</MARKUP>
- <MARKUP>localev</MARKUP>
- <MARKUP>longrts</MARKUP>
- <MARKUP>longrty</MARKUP>
- <MARKUP>longtmr</MARKUP>
- <MARKUP>lstluwid</MARKUP>
- <MARKUP>lstmsgda</MARKUP>
- <MARKUP>lstmsgti</MARKUP>
- <MARKUP>lstseqno</MARKUP>
- <MARKUP>maxdepth</MARKUP>
- <MARKUP>maxhands</MARKUP>
- <MARKUP>maxmsgl</MARKUP>
- <MARKUP>maxprty</MARKUP>
- <MARKUP>maxumsgs</MARKUP>
- <MARKUP>mcaname</MARKUP>
- <MARKUP>mcastat</MARKUP>
- <MARKUP>mcatype</MARKUP>
- <MARKUP>mcauser</MARKUP>
- <MARKUP>modename</MARKUP>
- <MARKUP>mrdata</MARKUP>
- <MARKUP>mrexit</MARKUP>
- <MARKUP>mrrty</MARKUP>
- <MARKUP>mrtmr</MARKUP>
- <MARKUP>msgdata</MARKUP>
- <MARKUP>msgdlvsq</MARKUP>
- <MARKUP>msgexit</MARKUP>
- <MARKUP>msgs</MARKUP>
- <MARKUP>namcount</MARKUP>
- <MARKUP>names</MARKUP>
- <MARKUP>netprty</MARKUP>
- <MARKUP>npmspeed</MARKUP>
- <MARKUP>opprocs</MARKUP>
- <MARKUP>password</MARKUP>
- <MARKUP>perfmev</MARKUP>
- <MARKUP>platform</MARKUP>
- <MARKUP>process</MARKUP>
- <MARKUP>put</MARKUP>
- <MARKUP>putaut</MARKUP>
- <MARKUP>qdepthhi</MARKUP>
- <MARKUP>qdepthlo</MARKUP>
- <MARKUP>qdphiev</MARKUP>
- <MARKUP>qdploev</MARKUP>
- <MARKUP>qdpmaxev</MARKUP>
- <MARKUP>qmid</MARKUP>
- <MARKUP>qmname</MARKUP>
- <MARKUP>qmtype</MARKUP>
- <MARKUP>qsvciev</MARKUP>
- <MARKUP>qsvcint</MARKUP>
- <MARKUP>qtype</MARKUP>
- <MARKUP>rcvdata</MARKUP>
- <MARKUP>rcvexit</MARKUP>
- <MARKUP>remoteev</MARKUP>
- <MARKUP>repos</MARKUP>
- <MARKUP>reposnl</MARKUP>
- <MARKUP>retintvl</MARKUP>
- <MARKUP>rname</MARKUP>
- <MARKUP>rqmname</MARKUP>
- <MARKUP>scope</MARKUP>
- <MARKUP>scydata</MARKUP>
- <MARKUP>scyexit</MARKUP>
- <MARKUP>senddata</MARKUP>
- <MARKUP>sendexit</MARKUP>
- <MARKUP>seqwrap</MARKUP>
- <MARKUP>share</MARKUP>
- <MARKUP>shortrts</MARKUP>
- <MARKUP>shortrty</MARKUP>
- <MARKUP>shorttmr</MARKUP>
- <MARKUP>status</MARKUP>
- <MARKUP>stopreq</MARKUP>
- <MARKUP>strstpev</MARKUP>
- <MARKUP>suspend</MARKUP>
- <MARKUP>syncpt</MARKUP>
- <MARKUP>targq</MARKUP>
- <MARKUP>tpname</MARKUP>
- <MARKUP>trigdata</MARKUP>
- <MARKUP>trigdpth</MARKUP>
- <MARKUP>trigger</MARKUP>
- <MARKUP>trigint</MARKUP>
- <MARKUP>trigmpri</MARKUP>
- <MARKUP>trigtype</MARKUP>
- <MARKUP>trptype</MARKUP>
- <MARKUP>type</MARKUP>
- <MARKUP>usage</MARKUP>
- <MARKUP>userdata</MARKUP>
- <MARKUP>userid</MARKUP>
- <MARKUP>xmitq</MARKUP>
- </KEYWORDS>
- </RULES>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!--
+ IBM WebSphere MQ Scripting (MQSC)
+ - by Aaron Bell <aaron at clockworklogic.co.uk>
+ - accurate for WebSphere MQ 5.2.
+ - ensure your LITERAL1 and LITERAL2 colours are set differently.
+-->
+<MODE>
+ <PROPS>
+ <!-- asterisks are comments -->
+ <PROPERTY NAME="lineComment" VALUE="*"/>
+ </PROPS>
+ <!-- ignore case, highlight numbers -->
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+
+ <!-- lines beginning with asterisk are comments -->
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">*</EOL_SPAN>
+
+ <!-- brackets on one line delimit parameter values, don't parse -->
+ <!-- case 1: string values using apostrophe marks -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE" MATCH_TYPE="OPERATOR">
+ <BEGIN>('</BEGIN>
+ <END>')</END>
+ </SPAN>
+ <!-- case 2: literal values and object names -->
+ <SPAN TYPE="LITERAL2" ESCAPE="\" NO_LINE_BREAK="TRUE" MATCH_TYPE="OPERATOR">
+ <BEGIN>(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- line continuation symbol -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+
+ <KEYWORDS>
+ <!-- KEYWORD1 are core MQSC commands -->
+ <KEYWORD1>all</KEYWORD1><!-- as in DIS Q(X) ALL -->
+ <KEYWORD1>alter</KEYWORD1>
+ <KEYWORD1>alt</KEYWORD1>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>define</KEYWORD1>
+ <KEYWORD1>def</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>display</KEYWORD1>
+ <KEYWORD1>dis</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>like</KEYWORD1><!-- as in DEF Q(X) LIKE(Y) -->
+ <KEYWORD1>ping</KEYWORD1>
+ <KEYWORD1>refresh</KEYWORD1>
+ <KEYWORD1>ref</KEYWORD1>
+ <KEYWORD1>replace</KEYWORD1><!-- as in DEF Q(X) REPLACE -->
+ <KEYWORD1>reset</KEYWORD1>
+ <KEYWORD1>resolve</KEYWORD1>
+ <KEYWORD1>resume</KEYWORD1>
+ <KEYWORD1>start</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>suspend</KEYWORD1>
+
+ <!-- KEYWORD2 are object types -->
+ <KEYWORD2>channel</KEYWORD2>
+ <KEYWORD2>chl</KEYWORD2>
+ <KEYWORD2>chstatus</KEYWORD2>
+ <KEYWORD2>chst</KEYWORD2>
+ <KEYWORD2>clusqmgr</KEYWORD2>
+ <KEYWORD2>process</KEYWORD2>
+ <KEYWORD2>proc</KEYWORD2>
+ <KEYWORD2>namelist</KEYWORD2>
+ <KEYWORD2>nl</KEYWORD2>
+ <KEYWORD2>qalias</KEYWORD2>
+ <KEYWORD2>qa</KEYWORD2>
+ <KEYWORD2>qcluster</KEYWORD2>
+ <KEYWORD2>qc</KEYWORD2>
+ <KEYWORD2>qlocal</KEYWORD2>
+ <KEYWORD2>ql</KEYWORD2>
+ <KEYWORD2>qmodel</KEYWORD2>
+ <KEYWORD2>qm</KEYWORD2>
+ <KEYWORD2>qmgr</KEYWORD2>
+ <KEYWORD2>qremote</KEYWORD2>
+ <KEYWORD2>qr</KEYWORD2>
+ <KEYWORD2>queue</KEYWORD2>
+
+ <!-- MARKUP are object attributes -->
+ <MARKUP>altdate</MARKUP>
+ <MARKUP>alttime</MARKUP>
+ <MARKUP>applicid</MARKUP>
+ <MARKUP>appltype</MARKUP>
+ <MARKUP>authorev</MARKUP>
+ <MARKUP>batches</MARKUP>
+ <MARKUP>batchint</MARKUP>
+ <MARKUP>batchsz</MARKUP>
+ <MARKUP>boqname</MARKUP>
+ <MARKUP>bothresh</MARKUP>
+ <MARKUP>bufsrcvd</MARKUP>
+ <MARKUP>bufssent</MARKUP>
+ <MARKUP>bytsrcvd</MARKUP>
+ <MARKUP>bytssent</MARKUP>
+ <MARKUP>ccsid</MARKUP>
+ <MARKUP>chad</MARKUP>
+ <MARKUP>chadev</MARKUP>
+ <MARKUP>chadexit</MARKUP>
+ <MARKUP>channel</MARKUP>
+ <MARKUP>chltype</MARKUP>
+ <MARKUP>chstada</MARKUP>
+ <MARKUP>chstati</MARKUP>
+ <MARKUP>clusdate</MARKUP>
+ <MARKUP>clusinfo</MARKUP>
+ <MARKUP>clusnl</MARKUP>
+ <MARKUP>clusqmgr</MARKUP>
+ <MARKUP>clusqt</MARKUP>
+ <MARKUP>cluster</MARKUP>
+ <MARKUP>clustime</MARKUP>
+ <MARKUP>clwldata</MARKUP>
+ <MARKUP>clwlexit</MARKUP>
+ <MARKUP>clwlwen</MARKUP>
+ <MARKUP>cmdlevel</MARKUP>
+ <MARKUP>commandq</MARKUP>
+ <MARKUP>conname</MARKUP>
+ <MARKUP>convert</MARKUP>
+ <MARKUP>crdate</MARKUP>
+ <MARKUP>crtime</MARKUP>
+ <MARKUP>curdepth</MARKUP>
+ <MARKUP>curluwid</MARKUP>
+ <MARKUP>curmsgs</MARKUP>
+ <MARKUP>curseqno</MARKUP>
+ <MARKUP>deadq</MARKUP>
+ <MARKUP>defbind</MARKUP>
+ <MARKUP>defprty</MARKUP>
+ <MARKUP>defpsist</MARKUP>
+ <MARKUP>defsopt</MARKUP>
+ <MARKUP>deftype</MARKUP>
+ <MARKUP>defxmitq</MARKUP>
+ <MARKUP>descr</MARKUP>
+ <MARKUP>discint</MARKUP>
+ <MARKUP>distl</MARKUP>
+ <MARKUP>envrdata</MARKUP>
+ <MARKUP>get</MARKUP>
+ <MARKUP>hardenbo</MARKUP>
+ <MARKUP>hbint</MARKUP>
+ <MARKUP>indoubt</MARKUP>
+ <MARKUP>inhibtev</MARKUP>
+ <MARKUP>initq</MARKUP>
+ <MARKUP>ipprocs</MARKUP>
+ <MARKUP>jobname</MARKUP>
+ <MARKUP>localev</MARKUP>
+ <MARKUP>longrts</MARKUP>
+ <MARKUP>longrty</MARKUP>
+ <MARKUP>longtmr</MARKUP>
+ <MARKUP>lstluwid</MARKUP>
+ <MARKUP>lstmsgda</MARKUP>
+ <MARKUP>lstmsgti</MARKUP>
+ <MARKUP>lstseqno</MARKUP>
+ <MARKUP>maxdepth</MARKUP>
+ <MARKUP>maxhands</MARKUP>
+ <MARKUP>maxmsgl</MARKUP>
+ <MARKUP>maxprty</MARKUP>
+ <MARKUP>maxumsgs</MARKUP>
+ <MARKUP>mcaname</MARKUP>
+ <MARKUP>mcastat</MARKUP>
+ <MARKUP>mcatype</MARKUP>
+ <MARKUP>mcauser</MARKUP>
+ <MARKUP>modename</MARKUP>
+ <MARKUP>mrdata</MARKUP>
+ <MARKUP>mrexit</MARKUP>
+ <MARKUP>mrrty</MARKUP>
+ <MARKUP>mrtmr</MARKUP>
+ <MARKUP>msgdata</MARKUP>
+ <MARKUP>msgdlvsq</MARKUP>
+ <MARKUP>msgexit</MARKUP>
+ <MARKUP>msgs</MARKUP>
+ <MARKUP>namcount</MARKUP>
+ <MARKUP>names</MARKUP>
+ <MARKUP>netprty</MARKUP>
+ <MARKUP>npmspeed</MARKUP>
+ <MARKUP>opprocs</MARKUP>
+ <MARKUP>password</MARKUP>
+ <MARKUP>perfmev</MARKUP>
+ <MARKUP>platform</MARKUP>
+ <MARKUP>process</MARKUP>
+ <MARKUP>put</MARKUP>
+ <MARKUP>putaut</MARKUP>
+ <MARKUP>qdepthhi</MARKUP>
+ <MARKUP>qdepthlo</MARKUP>
+ <MARKUP>qdphiev</MARKUP>
+ <MARKUP>qdploev</MARKUP>
+ <MARKUP>qdpmaxev</MARKUP>
+ <MARKUP>qmid</MARKUP>
+ <MARKUP>qmname</MARKUP>
+ <MARKUP>qmtype</MARKUP>
+ <MARKUP>qsvciev</MARKUP>
+ <MARKUP>qsvcint</MARKUP>
+ <MARKUP>qtype</MARKUP>
+ <MARKUP>rcvdata</MARKUP>
+ <MARKUP>rcvexit</MARKUP>
+ <MARKUP>remoteev</MARKUP>
+ <MARKUP>repos</MARKUP>
+ <MARKUP>reposnl</MARKUP>
+ <MARKUP>retintvl</MARKUP>
+ <MARKUP>rname</MARKUP>
+ <MARKUP>rqmname</MARKUP>
+ <MARKUP>scope</MARKUP>
+ <MARKUP>scydata</MARKUP>
+ <MARKUP>scyexit</MARKUP>
+ <MARKUP>senddata</MARKUP>
+ <MARKUP>sendexit</MARKUP>
+ <MARKUP>seqwrap</MARKUP>
+ <MARKUP>share</MARKUP>
+ <MARKUP>shortrts</MARKUP>
+ <MARKUP>shortrty</MARKUP>
+ <MARKUP>shorttmr</MARKUP>
+ <MARKUP>status</MARKUP>
+ <MARKUP>stopreq</MARKUP>
+ <MARKUP>strstpev</MARKUP>
+ <MARKUP>suspend</MARKUP>
+ <MARKUP>syncpt</MARKUP>
+ <MARKUP>targq</MARKUP>
+ <MARKUP>tpname</MARKUP>
+ <MARKUP>trigdata</MARKUP>
+ <MARKUP>trigdpth</MARKUP>
+ <MARKUP>trigger</MARKUP>
+ <MARKUP>trigint</MARKUP>
+ <MARKUP>trigmpri</MARKUP>
+ <MARKUP>trigtype</MARKUP>
+ <MARKUP>trptype</MARKUP>
+ <MARKUP>type</MARKUP>
+ <MARKUP>usage</MARKUP>
+ <MARKUP>userdata</MARKUP>
+ <MARKUP>userid</MARKUP>
+ <MARKUP>xmitq</MARKUP>
+ </KEYWORDS>
+ </RULES>
</MODE>
\ No newline at end of file
diff --git a/jEdit/modes/myghty.xml b/jEdit/modes/myghty.xml
index 1cf83ef..b6e39dc 100644
--- a/jEdit/modes/myghty.xml
+++ b/jEdit/modes/myghty.xml
@@ -1,130 +1,130 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-<MODE NAME="myghty" FILE="myghty.xml"
- FILE_NAME_GLOB="*.myt"/>
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
-
- <EOL_SPAN TYPE="COMMENT2" AT_LINE_START="TRUE">#</EOL_SPAN>
- <!-- <SEQ TYPE="LITERAL4" AT_LINE_END="TRUE">\</SEQ> -->
-
- <!-- attr block (python) -->
- <SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
- <BEGIN><%attr></BEGIN>
- <END></%attr></END>
- </SPAN>
-
- <!-- def, closure, method -->
- <SPAN_REGEXP HASH_CHAR="<%" TYPE="LITERAL4" DELEGATE="DEF">
- <BEGIN><%(def|closure|method)</BEGIN>
- <END>></END>
- </SPAN_REGEXP>
- <SEQ_REGEXP HASH_CHAR="</%" TYPE="LITERAL4"></%(def|closure|method)></SEQ_REGEXP>
-
- <!-- doc block -->
- <SPAN TYPE="COMMENT4">
- <BEGIN><%doc></BEGIN>
- <END></%doc></END>
- </SPAN>
-
- <!-- flags block (python) -->
- <SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
- <BEGIN><%flags></BEGIN>
- <END></%flags></END>
- </SPAN>
-
- <!-- python block -->
- <SPAN_REGEXP HASH_CHAR="<%python" DELEGATE="MYGHTY" TYPE="LITERAL4">
- <BEGIN><%python[^>]*></BEGIN>
- <END></%python></END>
- </SPAN_REGEXP>
-
- <!-- python block aliases - don't take args -->
- <SPAN_REGEXP HASH_CHAR="<%" DELEGATE="MYGHTY" TYPE="LITERAL4">
- <BEGIN><%(args|cleanup|filter|global|init|once|requestlocal|requestonce|shared|threadlocal|threadonce)></BEGIN>
- <END></%$1></END>
- </SPAN_REGEXP>
-
- <!-- text block -->
- <SPAN TYPE="LITERAL3">
- <BEGIN><%text></BEGIN>
- <END></%text></END>
- </SPAN>
-
- <!-- calling component -->
- <SEQ TYPE="LITERAL4"></&></SEQ>
- <SPAN_REGEXP HASH_CHAR="<&" TYPE="LITERAL4" DELEGATE="MYGHTY">
- <BEGIN><&[|]?</BEGIN>
- <END>&></END>
- </SPAN_REGEXP>
-
- <!-- substitutions -->
- <SPAN TYPE="LITERAL3" DELEGATE="MYGHTY">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <EOL_SPAN
- AT_LINE_START="TRUE"
- DELEGATE="MYGHTY"
- TYPE="LITERAL4">%</EOL_SPAN>
-
- <IMPORT DELEGATE="html::MAIN"/>
-
- <KEYWORDS>
- <!-- only here for complete-word -->
- <NULL>args</NULL>
- <NULL>attr</NULL>
- <NULL>cleanup</NULL>
- <NULL>closure</NULL>
- <NULL>def</NULL>
- <NULL>doc</NULL>
- <NULL>filter</NULL>
- <NULL>flags</NULL>
- <NULL>global</NULL>
- <NULL>init</NULL>
- <NULL>method</NULL>
- <NULL>once</NULL>
- <NULL>python</NULL>
- <NULL>requestlocal</NULL>
- <NULL>requestonce</NULL>
- <NULL>shared</NULL>
- <NULL>threadlocal</NULL>
- <NULL>threadonce</NULL>
- </KEYWORDS>
-
- </RULES>
-
- <RULES IGNORE_CASE="FALSE" SET="MYGHTY">
- <!-- alias for MODULE -->
- <SEQ TYPE="KEYWORD4">@</SEQ>
- <IMPORT DELEGATE="python::MAIN"/>
- <KEYWORDS>
- <KEYWORD4>ARGS</KEYWORD4>
- <KEYWORD4>MODULE</KEYWORD4>
- <KEYWORD4>SELF</KEYWORD4>
- <KEYWORD4>m</KEYWORD4>
- <!-- request -->
- <KEYWORD4>r</KEYWORD4>
- <!-- session -->
- <KEYWORD4>s</KEYWORD4>
- <!-- URL encode -->
- <KEYWORD4>u</KEYWORD4>
- <!-- HTML encode -->
- <KEYWORD4>h</KEYWORD4>
- </KEYWORDS>
- </RULES>
-
- <!-- only exists to color component name like a function -->
- <RULES IGNORE_CASE="TRUE" SET="DEF" DEFAULT="FUNCTION">
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+<MODE NAME="myghty" FILE="myghty.xml"
+ FILE_NAME_GLOB="*.myt"/>
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+
+ <EOL_SPAN TYPE="COMMENT2" AT_LINE_START="TRUE">#</EOL_SPAN>
+ <!-- <SEQ TYPE="LITERAL4" AT_LINE_END="TRUE">\</SEQ> -->
+
+ <!-- attr block (python) -->
+ <SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
+ <BEGIN><%attr></BEGIN>
+ <END></%attr></END>
+ </SPAN>
+
+ <!-- def, closure, method -->
+ <SPAN_REGEXP HASH_CHAR="<%" TYPE="LITERAL4" DELEGATE="DEF">
+ <BEGIN><%(def|closure|method)</BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="</%" TYPE="LITERAL4"></%(def|closure|method)></SEQ_REGEXP>
+
+ <!-- doc block -->
+ <SPAN TYPE="COMMENT4">
+ <BEGIN><%doc></BEGIN>
+ <END></%doc></END>
+ </SPAN>
+
+ <!-- flags block (python) -->
+ <SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
+ <BEGIN><%flags></BEGIN>
+ <END></%flags></END>
+ </SPAN>
+
+ <!-- python block -->
+ <SPAN_REGEXP HASH_CHAR="<%python" DELEGATE="MYGHTY" TYPE="LITERAL4">
+ <BEGIN><%python[^>]*></BEGIN>
+ <END></%python></END>
+ </SPAN_REGEXP>
+
+ <!-- python block aliases - don't take args -->
+ <SPAN_REGEXP HASH_CHAR="<%" DELEGATE="MYGHTY" TYPE="LITERAL4">
+ <BEGIN><%(args|cleanup|filter|global|init|once|requestlocal|requestonce|shared|threadlocal|threadonce)></BEGIN>
+ <END></%$1></END>
+ </SPAN_REGEXP>
+
+ <!-- text block -->
+ <SPAN TYPE="LITERAL3">
+ <BEGIN><%text></BEGIN>
+ <END></%text></END>
+ </SPAN>
+
+ <!-- calling component -->
+ <SEQ TYPE="LITERAL4"></&></SEQ>
+ <SPAN_REGEXP HASH_CHAR="<&" TYPE="LITERAL4" DELEGATE="MYGHTY">
+ <BEGIN><&[|]?</BEGIN>
+ <END>&></END>
+ </SPAN_REGEXP>
+
+ <!-- substitutions -->
+ <SPAN TYPE="LITERAL3" DELEGATE="MYGHTY">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <EOL_SPAN
+ AT_LINE_START="TRUE"
+ DELEGATE="MYGHTY"
+ TYPE="LITERAL4">%</EOL_SPAN>
+
+ <IMPORT DELEGATE="html::MAIN"/>
+
+ <KEYWORDS>
+ <!-- only here for complete-word -->
+ <NULL>args</NULL>
+ <NULL>attr</NULL>
+ <NULL>cleanup</NULL>
+ <NULL>closure</NULL>
+ <NULL>def</NULL>
+ <NULL>doc</NULL>
+ <NULL>filter</NULL>
+ <NULL>flags</NULL>
+ <NULL>global</NULL>
+ <NULL>init</NULL>
+ <NULL>method</NULL>
+ <NULL>once</NULL>
+ <NULL>python</NULL>
+ <NULL>requestlocal</NULL>
+ <NULL>requestonce</NULL>
+ <NULL>shared</NULL>
+ <NULL>threadlocal</NULL>
+ <NULL>threadonce</NULL>
+ </KEYWORDS>
+
+ </RULES>
+
+ <RULES IGNORE_CASE="FALSE" SET="MYGHTY">
+ <!-- alias for MODULE -->
+ <SEQ TYPE="KEYWORD4">@</SEQ>
+ <IMPORT DELEGATE="python::MAIN"/>
+ <KEYWORDS>
+ <KEYWORD4>ARGS</KEYWORD4>
+ <KEYWORD4>MODULE</KEYWORD4>
+ <KEYWORD4>SELF</KEYWORD4>
+ <KEYWORD4>m</KEYWORD4>
+ <!-- request -->
+ <KEYWORD4>r</KEYWORD4>
+ <!-- session -->
+ <KEYWORD4>s</KEYWORD4>
+ <!-- URL encode -->
+ <KEYWORD4>u</KEYWORD4>
+ <!-- HTML encode -->
+ <KEYWORD4>h</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- only exists to color component name like a function -->
+ <RULES IGNORE_CASE="TRUE" SET="DEF" DEFAULT="FUNCTION">
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/mysql.xml b/jEdit/modes/mysql.xml
index 68775b4..3a3ee21 100644
--- a/jEdit/modes/mysql.xml
+++ b/jEdit/modes/mysql.xml
@@ -1,244 +1,244 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <KEYWORDS>
-
- <KEYWORD1>ADD</KEYWORD1>
- <KEYWORD1>ALL</KEYWORD1>
- <KEYWORD1>ALTER</KEYWORD1>
- <KEYWORD1>ANALYZE</KEYWORD1>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>AS</KEYWORD1>
- <KEYWORD1>ASC</KEYWORD1>
- <KEYWORD1>ASENSITIVE</KEYWORD1>
- <KEYWORD1>BEFORE</KEYWORD1>
- <KEYWORD1>BETWEEN</KEYWORD1>
- <KEYWORD1>BIGINT</KEYWORD1>
- <KEYWORD1>BINARY</KEYWORD1>
- <KEYWORD1>BLOB</KEYWORD1>
- <KEYWORD1>BOTH</KEYWORD1>
- <KEYWORD1>BY</KEYWORD1>
- <KEYWORD1>CALL</KEYWORD1>
- <KEYWORD1>CASCADE</KEYWORD1>
- <KEYWORD1>CASE</KEYWORD1>
- <KEYWORD1>CHANGE</KEYWORD1>
- <KEYWORD1>CHAR</KEYWORD1>
- <KEYWORD1>CHARACTER</KEYWORD1>
- <KEYWORD1>CHECK</KEYWORD1>
- <KEYWORD1>COLLATE</KEYWORD1>
- <KEYWORD1>COLUMN</KEYWORD1>
- <KEYWORD1>CONDITION</KEYWORD1>
- <KEYWORD1>CONNECTION</KEYWORD1>
- <KEYWORD1>CONSTRAINT</KEYWORD1>
- <KEYWORD1>CONTINUE</KEYWORD1>
- <KEYWORD1>CONVERT</KEYWORD1>
- <KEYWORD1>CREATE</KEYWORD1>
- <KEYWORD1>CROSS</KEYWORD1>
- <KEYWORD1>CURRENT_DATE</KEYWORD1>
- <KEYWORD1>CURRENT_TIME</KEYWORD1>
- <KEYWORD1>CURRENT_TIMESTAMP</KEYWORD1>
- <KEYWORD1>CURRENT_USER</KEYWORD1>
- <KEYWORD1>CURSOR</KEYWORD1>
- <KEYWORD1>DATABASE</KEYWORD1>
- <KEYWORD1>DATABASES</KEYWORD1>
- <KEYWORD1>DAY_HOUR</KEYWORD1>
- <KEYWORD1>DAY_MICROSECOND</KEYWORD1>
- <KEYWORD1>DAY_MINUTE</KEYWORD1>
- <KEYWORD1>DAY_SECOND</KEYWORD1>
- <KEYWORD1>DEC</KEYWORD1>
- <KEYWORD1>DECIMAL</KEYWORD1>
- <KEYWORD1>DECLARE</KEYWORD1>
- <KEYWORD1>DEFAULT</KEYWORD1>
- <KEYWORD1>DELAYED</KEYWORD1>
- <KEYWORD1>DELETE</KEYWORD1>
- <KEYWORD1>DESC</KEYWORD1>
- <KEYWORD1>DESCRIBE</KEYWORD1>
- <KEYWORD1>DETERMINISTIC</KEYWORD1>
- <KEYWORD1>DISTINCT</KEYWORD1>
- <KEYWORD1>DISTINCTROW</KEYWORD1>
- <KEYWORD1>DIV</KEYWORD1>
- <KEYWORD1>DOUBLE</KEYWORD1>
- <KEYWORD1>DROP</KEYWORD1>
- <KEYWORD1>DUAL</KEYWORD1>
- <KEYWORD1>EACH</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>ELSEIF</KEYWORD1>
- <KEYWORD1>ENCLOSED</KEYWORD1>
- <KEYWORD1>ESCAPED</KEYWORD1>
- <KEYWORD1>EXISTS</KEYWORD1>
- <KEYWORD1>EXIT</KEYWORD1>
- <KEYWORD1>EXPLAIN</KEYWORD1>
- <KEYWORD1>FALSE</KEYWORD1>
- <KEYWORD1>FETCH</KEYWORD1>
- <KEYWORD1>FLOAT</KEYWORD1>
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>FORCE</KEYWORD1>
- <KEYWORD1>FOREIGN</KEYWORD1>
- <KEYWORD1>FROM</KEYWORD1>
- <KEYWORD1>FULLTEXT</KEYWORD1>
- <KEYWORD1>GOTO</KEYWORD1>
- <KEYWORD1>GRANT</KEYWORD1>
- <KEYWORD1>GROUP</KEYWORD1>
- <KEYWORD1>HAVING</KEYWORD1>
- <KEYWORD1>HIGH_PRIORITY</KEYWORD1>
- <KEYWORD1>HOUR_MICROSECOND</KEYWORD1>
- <KEYWORD1>HOUR_MINUTE</KEYWORD1>
- <KEYWORD1>HOUR_SECOND</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>IGNORE</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>INDEX</KEYWORD1>
- <KEYWORD1>INFILE</KEYWORD1>
- <KEYWORD1>INNER</KEYWORD1>
- <KEYWORD1>INOUT</KEYWORD1>
- <KEYWORD1>INSENSITIVE</KEYWORD1>
- <KEYWORD1>INSERT</KEYWORD1>
- <KEYWORD1>INT</KEYWORD1>
- <KEYWORD1>INTEGER</KEYWORD1>
- <KEYWORD1>INTERVAL</KEYWORD1>
- <KEYWORD1>INTO</KEYWORD1>
- <KEYWORD1>IS</KEYWORD1>
- <KEYWORD1>ITERATE</KEYWORD1>
- <KEYWORD1>JOIN</KEYWORD1>
- <KEYWORD1>KEY</KEYWORD1>
- <KEYWORD1>KEYS</KEYWORD1>
- <KEYWORD1>KILL</KEYWORD1>
- <KEYWORD1>LEADING</KEYWORD1>
- <KEYWORD1>LEAVE</KEYWORD1>
- <KEYWORD1>LEFT</KEYWORD1>
- <KEYWORD1>LIKE</KEYWORD1>
- <KEYWORD1>LIMIT</KEYWORD1>
- <KEYWORD1>LINES</KEYWORD1>
- <KEYWORD1>LOAD</KEYWORD1>
- <KEYWORD1>LOCALTIME</KEYWORD1>
- <KEYWORD1>LOCALTIMESTAMP</KEYWORD1>
- <KEYWORD1>LOCK</KEYWORD1>
- <KEYWORD1>LONG</KEYWORD1>
- <KEYWORD1>LONGBLOB</KEYWORD1>
- <KEYWORD1>LONGTEXT</KEYWORD1>
- <KEYWORD1>LOOP</KEYWORD1>
- <KEYWORD1>LOW_PRIORITY</KEYWORD1>
- <KEYWORD1>MATCH</KEYWORD1>
- <KEYWORD1>MEDIUMBLOB</KEYWORD1>
- <KEYWORD1>MEDIUMINT</KEYWORD1>
- <KEYWORD1>MEDIUMTEXT</KEYWORD1>
- <KEYWORD1>MIDDLEINT</KEYWORD1>
- <KEYWORD1>MINUTE_MICROSECOND</KEYWORD1>
- <KEYWORD1>MINUTE_SECOND</KEYWORD1>
- <KEYWORD1>MOD</KEYWORD1>
- <KEYWORD1>MODIFIES</KEYWORD1>
- <KEYWORD1>NATURAL</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>NO_WRITE_TO_BINLOG</KEYWORD1>
- <KEYWORD1>NULL</KEYWORD1>
- <KEYWORD1>NUMERIC</KEYWORD1>
- <KEYWORD1>ON</KEYWORD1>
- <KEYWORD1>OPTIMIZE</KEYWORD1>
- <KEYWORD1>OPTION</KEYWORD1>
- <KEYWORD1>OPTIONALLY</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>ORDER</KEYWORD1>
- <KEYWORD1>OUT</KEYWORD1>
- <KEYWORD1>OUTER</KEYWORD1>
- <KEYWORD1>OUTFILE</KEYWORD1>
- <KEYWORD1>PRECISION</KEYWORD1>
- <KEYWORD1>PRIMARY</KEYWORD1>
- <KEYWORD1>PROCEDURE</KEYWORD1>
- <KEYWORD1>PURGE</KEYWORD1>
- <KEYWORD1>READ</KEYWORD1>
- <KEYWORD1>READS</KEYWORD1>
- <KEYWORD1>REAL</KEYWORD1>
- <KEYWORD1>REFERENCES</KEYWORD1>
- <KEYWORD1>REGEXP</KEYWORD1>
- <KEYWORD1>RENAME</KEYWORD1>
- <KEYWORD1>REPEAT</KEYWORD1>
- <KEYWORD1>REPLACE</KEYWORD1>
- <KEYWORD1>REQUIRE</KEYWORD1>
- <KEYWORD1>RESTRICT</KEYWORD1>
- <KEYWORD1>RETURN</KEYWORD1>
- <KEYWORD1>REVOKE</KEYWORD1>
- <KEYWORD1>RIGHT</KEYWORD1>
- <KEYWORD1>RLIKE</KEYWORD1>
- <KEYWORD1>SCHEMA</KEYWORD1>
- <KEYWORD1>SCHEMAS</KEYWORD1>
- <KEYWORD1>SECOND_MICROSECOND</KEYWORD1>
- <KEYWORD1>SELECT</KEYWORD1>
- <KEYWORD1>SENSITIVE</KEYWORD1>
- <KEYWORD1>SEPARATOR</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>SHOW</KEYWORD1>
- <KEYWORD1>SMALLINT</KEYWORD1>
- <KEYWORD1>SONAME</KEYWORD1>
- <KEYWORD1>SPATIAL</KEYWORD1>
- <KEYWORD1>SPECIFIC</KEYWORD1>
- <KEYWORD1>SQL</KEYWORD1>
- <KEYWORD1>SQLEXCEPTION</KEYWORD1>
- <KEYWORD1>SQLSTATE</KEYWORD1>
- <KEYWORD1>SQLWARNING</KEYWORD1>
- <KEYWORD1>SQL_BIG_RESULT</KEYWORD1>
- <KEYWORD1>SQL_CALC_FOUND_ROWS</KEYWORD1>
- <KEYWORD1>SQL_SMALL_RESULT</KEYWORD1>
- <KEYWORD1>SSL</KEYWORD1>
- <KEYWORD1>STARTING</KEYWORD1>
- <KEYWORD1>STRAIGHT_JOIN</KEYWORD1>
- <KEYWORD1>TABLE</KEYWORD1>
- <KEYWORD1>TERMINATED</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>TINYBLOB</KEYWORD1>
- <KEYWORD1>TINYINT</KEYWORD1>
- <KEYWORD1>TINYTEXT</KEYWORD1>
- <KEYWORD1>TO</KEYWORD1>
- <KEYWORD1>TRAILING</KEYWORD1>
- <KEYWORD1>TRIGGER</KEYWORD1>
- <KEYWORD1>TRUE</KEYWORD1>
- <KEYWORD1>UNDO</KEYWORD1>
- <KEYWORD1>UNION</KEYWORD1>
- <KEYWORD1>UNIQUE</KEYWORD1>
- <KEYWORD1>UNLOCK</KEYWORD1>
- <KEYWORD1>UNSIGNED</KEYWORD1>
- <KEYWORD1>UPDATE</KEYWORD1>
- <KEYWORD1>USAGE</KEYWORD1>
- <KEYWORD1>USE</KEYWORD1>
- <KEYWORD1>USING</KEYWORD1>
- <KEYWORD1>UTC_DATE</KEYWORD1>
- <KEYWORD1>UTC_TIME</KEYWORD1>
- <KEYWORD1>UTC_TIMESTAMP</KEYWORD1>
- <KEYWORD1>VALUES</KEYWORD1>
- <KEYWORD1>VARBINARY</KEYWORD1>
- <KEYWORD1>VARCHAR</KEYWORD1>
- <KEYWORD1>VARCHARACTER</KEYWORD1>
- <KEYWORD1>VARYING</KEYWORD1>
- <KEYWORD1>WHEN</KEYWORD1>
- <KEYWORD1>WHERE</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>WRITE</KEYWORD1>
- <KEYWORD1>XOR</KEYWORD1>
- <KEYWORD1>YEAR_MONTH</KEYWORD1>
- <KEYWORD1>ZEROFILL</KEYWORD1>
-
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <KEYWORDS>
+
+ <KEYWORD1>ADD</KEYWORD1>
+ <KEYWORD1>ALL</KEYWORD1>
+ <KEYWORD1>ALTER</KEYWORD1>
+ <KEYWORD1>ANALYZE</KEYWORD1>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>AS</KEYWORD1>
+ <KEYWORD1>ASC</KEYWORD1>
+ <KEYWORD1>ASENSITIVE</KEYWORD1>
+ <KEYWORD1>BEFORE</KEYWORD1>
+ <KEYWORD1>BETWEEN</KEYWORD1>
+ <KEYWORD1>BIGINT</KEYWORD1>
+ <KEYWORD1>BINARY</KEYWORD1>
+ <KEYWORD1>BLOB</KEYWORD1>
+ <KEYWORD1>BOTH</KEYWORD1>
+ <KEYWORD1>BY</KEYWORD1>
+ <KEYWORD1>CALL</KEYWORD1>
+ <KEYWORD1>CASCADE</KEYWORD1>
+ <KEYWORD1>CASE</KEYWORD1>
+ <KEYWORD1>CHANGE</KEYWORD1>
+ <KEYWORD1>CHAR</KEYWORD1>
+ <KEYWORD1>CHARACTER</KEYWORD1>
+ <KEYWORD1>CHECK</KEYWORD1>
+ <KEYWORD1>COLLATE</KEYWORD1>
+ <KEYWORD1>COLUMN</KEYWORD1>
+ <KEYWORD1>CONDITION</KEYWORD1>
+ <KEYWORD1>CONNECTION</KEYWORD1>
+ <KEYWORD1>CONSTRAINT</KEYWORD1>
+ <KEYWORD1>CONTINUE</KEYWORD1>
+ <KEYWORD1>CONVERT</KEYWORD1>
+ <KEYWORD1>CREATE</KEYWORD1>
+ <KEYWORD1>CROSS</KEYWORD1>
+ <KEYWORD1>CURRENT_DATE</KEYWORD1>
+ <KEYWORD1>CURRENT_TIME</KEYWORD1>
+ <KEYWORD1>CURRENT_TIMESTAMP</KEYWORD1>
+ <KEYWORD1>CURRENT_USER</KEYWORD1>
+ <KEYWORD1>CURSOR</KEYWORD1>
+ <KEYWORD1>DATABASE</KEYWORD1>
+ <KEYWORD1>DATABASES</KEYWORD1>
+ <KEYWORD1>DAY_HOUR</KEYWORD1>
+ <KEYWORD1>DAY_MICROSECOND</KEYWORD1>
+ <KEYWORD1>DAY_MINUTE</KEYWORD1>
+ <KEYWORD1>DAY_SECOND</KEYWORD1>
+ <KEYWORD1>DEC</KEYWORD1>
+ <KEYWORD1>DECIMAL</KEYWORD1>
+ <KEYWORD1>DECLARE</KEYWORD1>
+ <KEYWORD1>DEFAULT</KEYWORD1>
+ <KEYWORD1>DELAYED</KEYWORD1>
+ <KEYWORD1>DELETE</KEYWORD1>
+ <KEYWORD1>DESC</KEYWORD1>
+ <KEYWORD1>DESCRIBE</KEYWORD1>
+ <KEYWORD1>DETERMINISTIC</KEYWORD1>
+ <KEYWORD1>DISTINCT</KEYWORD1>
+ <KEYWORD1>DISTINCTROW</KEYWORD1>
+ <KEYWORD1>DIV</KEYWORD1>
+ <KEYWORD1>DOUBLE</KEYWORD1>
+ <KEYWORD1>DROP</KEYWORD1>
+ <KEYWORD1>DUAL</KEYWORD1>
+ <KEYWORD1>EACH</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>ELSEIF</KEYWORD1>
+ <KEYWORD1>ENCLOSED</KEYWORD1>
+ <KEYWORD1>ESCAPED</KEYWORD1>
+ <KEYWORD1>EXISTS</KEYWORD1>
+ <KEYWORD1>EXIT</KEYWORD1>
+ <KEYWORD1>EXPLAIN</KEYWORD1>
+ <KEYWORD1>FALSE</KEYWORD1>
+ <KEYWORD1>FETCH</KEYWORD1>
+ <KEYWORD1>FLOAT</KEYWORD1>
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>FORCE</KEYWORD1>
+ <KEYWORD1>FOREIGN</KEYWORD1>
+ <KEYWORD1>FROM</KEYWORD1>
+ <KEYWORD1>FULLTEXT</KEYWORD1>
+ <KEYWORD1>GOTO</KEYWORD1>
+ <KEYWORD1>GRANT</KEYWORD1>
+ <KEYWORD1>GROUP</KEYWORD1>
+ <KEYWORD1>HAVING</KEYWORD1>
+ <KEYWORD1>HIGH_PRIORITY</KEYWORD1>
+ <KEYWORD1>HOUR_MICROSECOND</KEYWORD1>
+ <KEYWORD1>HOUR_MINUTE</KEYWORD1>
+ <KEYWORD1>HOUR_SECOND</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>IGNORE</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>INDEX</KEYWORD1>
+ <KEYWORD1>INFILE</KEYWORD1>
+ <KEYWORD1>INNER</KEYWORD1>
+ <KEYWORD1>INOUT</KEYWORD1>
+ <KEYWORD1>INSENSITIVE</KEYWORD1>
+ <KEYWORD1>INSERT</KEYWORD1>
+ <KEYWORD1>INT</KEYWORD1>
+ <KEYWORD1>INTEGER</KEYWORD1>
+ <KEYWORD1>INTERVAL</KEYWORD1>
+ <KEYWORD1>INTO</KEYWORD1>
+ <KEYWORD1>IS</KEYWORD1>
+ <KEYWORD1>ITERATE</KEYWORD1>
+ <KEYWORD1>JOIN</KEYWORD1>
+ <KEYWORD1>KEY</KEYWORD1>
+ <KEYWORD1>KEYS</KEYWORD1>
+ <KEYWORD1>KILL</KEYWORD1>
+ <KEYWORD1>LEADING</KEYWORD1>
+ <KEYWORD1>LEAVE</KEYWORD1>
+ <KEYWORD1>LEFT</KEYWORD1>
+ <KEYWORD1>LIKE</KEYWORD1>
+ <KEYWORD1>LIMIT</KEYWORD1>
+ <KEYWORD1>LINES</KEYWORD1>
+ <KEYWORD1>LOAD</KEYWORD1>
+ <KEYWORD1>LOCALTIME</KEYWORD1>
+ <KEYWORD1>LOCALTIMESTAMP</KEYWORD1>
+ <KEYWORD1>LOCK</KEYWORD1>
+ <KEYWORD1>LONG</KEYWORD1>
+ <KEYWORD1>LONGBLOB</KEYWORD1>
+ <KEYWORD1>LONGTEXT</KEYWORD1>
+ <KEYWORD1>LOOP</KEYWORD1>
+ <KEYWORD1>LOW_PRIORITY</KEYWORD1>
+ <KEYWORD1>MATCH</KEYWORD1>
+ <KEYWORD1>MEDIUMBLOB</KEYWORD1>
+ <KEYWORD1>MEDIUMINT</KEYWORD1>
+ <KEYWORD1>MEDIUMTEXT</KEYWORD1>
+ <KEYWORD1>MIDDLEINT</KEYWORD1>
+ <KEYWORD1>MINUTE_MICROSECOND</KEYWORD1>
+ <KEYWORD1>MINUTE_SECOND</KEYWORD1>
+ <KEYWORD1>MOD</KEYWORD1>
+ <KEYWORD1>MODIFIES</KEYWORD1>
+ <KEYWORD1>NATURAL</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>NO_WRITE_TO_BINLOG</KEYWORD1>
+ <KEYWORD1>NULL</KEYWORD1>
+ <KEYWORD1>NUMERIC</KEYWORD1>
+ <KEYWORD1>ON</KEYWORD1>
+ <KEYWORD1>OPTIMIZE</KEYWORD1>
+ <KEYWORD1>OPTION</KEYWORD1>
+ <KEYWORD1>OPTIONALLY</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>ORDER</KEYWORD1>
+ <KEYWORD1>OUT</KEYWORD1>
+ <KEYWORD1>OUTER</KEYWORD1>
+ <KEYWORD1>OUTFILE</KEYWORD1>
+ <KEYWORD1>PRECISION</KEYWORD1>
+ <KEYWORD1>PRIMARY</KEYWORD1>
+ <KEYWORD1>PROCEDURE</KEYWORD1>
+ <KEYWORD1>PURGE</KEYWORD1>
+ <KEYWORD1>READ</KEYWORD1>
+ <KEYWORD1>READS</KEYWORD1>
+ <KEYWORD1>REAL</KEYWORD1>
+ <KEYWORD1>REFERENCES</KEYWORD1>
+ <KEYWORD1>REGEXP</KEYWORD1>
+ <KEYWORD1>RENAME</KEYWORD1>
+ <KEYWORD1>REPEAT</KEYWORD1>
+ <KEYWORD1>REPLACE</KEYWORD1>
+ <KEYWORD1>REQUIRE</KEYWORD1>
+ <KEYWORD1>RESTRICT</KEYWORD1>
+ <KEYWORD1>RETURN</KEYWORD1>
+ <KEYWORD1>REVOKE</KEYWORD1>
+ <KEYWORD1>RIGHT</KEYWORD1>
+ <KEYWORD1>RLIKE</KEYWORD1>
+ <KEYWORD1>SCHEMA</KEYWORD1>
+ <KEYWORD1>SCHEMAS</KEYWORD1>
+ <KEYWORD1>SECOND_MICROSECOND</KEYWORD1>
+ <KEYWORD1>SELECT</KEYWORD1>
+ <KEYWORD1>SENSITIVE</KEYWORD1>
+ <KEYWORD1>SEPARATOR</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>SHOW</KEYWORD1>
+ <KEYWORD1>SMALLINT</KEYWORD1>
+ <KEYWORD1>SONAME</KEYWORD1>
+ <KEYWORD1>SPATIAL</KEYWORD1>
+ <KEYWORD1>SPECIFIC</KEYWORD1>
+ <KEYWORD1>SQL</KEYWORD1>
+ <KEYWORD1>SQLEXCEPTION</KEYWORD1>
+ <KEYWORD1>SQLSTATE</KEYWORD1>
+ <KEYWORD1>SQLWARNING</KEYWORD1>
+ <KEYWORD1>SQL_BIG_RESULT</KEYWORD1>
+ <KEYWORD1>SQL_CALC_FOUND_ROWS</KEYWORD1>
+ <KEYWORD1>SQL_SMALL_RESULT</KEYWORD1>
+ <KEYWORD1>SSL</KEYWORD1>
+ <KEYWORD1>STARTING</KEYWORD1>
+ <KEYWORD1>STRAIGHT_JOIN</KEYWORD1>
+ <KEYWORD1>TABLE</KEYWORD1>
+ <KEYWORD1>TERMINATED</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>TINYBLOB</KEYWORD1>
+ <KEYWORD1>TINYINT</KEYWORD1>
+ <KEYWORD1>TINYTEXT</KEYWORD1>
+ <KEYWORD1>TO</KEYWORD1>
+ <KEYWORD1>TRAILING</KEYWORD1>
+ <KEYWORD1>TRIGGER</KEYWORD1>
+ <KEYWORD1>TRUE</KEYWORD1>
+ <KEYWORD1>UNDO</KEYWORD1>
+ <KEYWORD1>UNION</KEYWORD1>
+ <KEYWORD1>UNIQUE</KEYWORD1>
+ <KEYWORD1>UNLOCK</KEYWORD1>
+ <KEYWORD1>UNSIGNED</KEYWORD1>
+ <KEYWORD1>UPDATE</KEYWORD1>
+ <KEYWORD1>USAGE</KEYWORD1>
+ <KEYWORD1>USE</KEYWORD1>
+ <KEYWORD1>USING</KEYWORD1>
+ <KEYWORD1>UTC_DATE</KEYWORD1>
+ <KEYWORD1>UTC_TIME</KEYWORD1>
+ <KEYWORD1>UTC_TIMESTAMP</KEYWORD1>
+ <KEYWORD1>VALUES</KEYWORD1>
+ <KEYWORD1>VARBINARY</KEYWORD1>
+ <KEYWORD1>VARCHAR</KEYWORD1>
+ <KEYWORD1>VARCHARACTER</KEYWORD1>
+ <KEYWORD1>VARYING</KEYWORD1>
+ <KEYWORD1>WHEN</KEYWORD1>
+ <KEYWORD1>WHERE</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>WRITE</KEYWORD1>
+ <KEYWORD1>XOR</KEYWORD1>
+ <KEYWORD1>YEAR_MONTH</KEYWORD1>
+ <KEYWORD1>ZEROFILL</KEYWORD1>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/n3.xml b/jEdit/modes/n3.xml
index 24e028c..c3fad47 100644
--- a/jEdit/modes/n3.xml
+++ b/jEdit/modes/n3.xml
@@ -1,86 +1,86 @@
-<?xml version="1.0"?>
-<!--
-Basic N3 mode by Jakub RoztoÄil <jakub at roztocil.name>
-
- N3 (Notation3) is a shorthand non-XML serialization of RDF
- <http://www.w3.org/DesignIssues/Notation3.html>
-
-Catalog entry:
-
- <MODE NAME="n3" FILE="n3.xml" FILE_NAME_GLOB="*.n3" />
-
-TODO:
- * different highlighting for subject, predicate and object
- * higlight qnames, not only prefixes (prefix:qname)
-
--->
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<MODE>
- <PROPS>
- <!-- Indent when writting more statements about the same subject -->
- <PROPERTY NAME="indentNextLines" VALUE="\S+\s+\S+\s+\S+\s*;$" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="[{(" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}])" />
- <PROPERTY NAME="ignoreWhitespace" VALUE="false" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
-
- <RULES HIGHLIGHT_DIGITS="TRUE">
-
-
- <!-- @foo -->
- <MARK_FOLLOWING TYPE="KEYWORD1">@</MARK_FOLLOWING>
-
- <!-- Prefixes -->
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
-
- <!-- Resource URI -->
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- Strings -->
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE" ESCAPE="\">
- <BEGIN>"""</BEGIN>
- <END>"""</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- Operators -->
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">^^</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">=></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <!-- COMMENTS -->
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="FALSE">#</EOL_SPAN>
-
- <!-- KEYWORDS -->
- <KEYWORDS>
- <KEYWORD2>a</KEYWORD2>
- <KEYWORD2>is</KEYWORD2>
- <KEYWORD2>has</KEYWORD2>
- <KEYWORD2>of</KEYWORD2>
- <KEYWORD3>true</KEYWORD3>
- <KEYWORD3>false</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
-
-</MODE>
-
-
+<?xml version="1.0"?>
+<!--
+Basic N3 mode by Jakub RoztoÄil <jakub at roztocil.name>
+
+ N3 (Notation3) is a shorthand non-XML serialization of RDF
+ <http://www.w3.org/DesignIssues/Notation3.html>
+
+Catalog entry:
+
+ <MODE NAME="n3" FILE="n3.xml" FILE_NAME_GLOB="*.n3" />
+
+TODO:
+ * different highlighting for subject, predicate and object
+ * higlight qnames, not only prefixes (prefix:qname)
+
+-->
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <PROPS>
+ <!-- Indent when writting more statements about the same subject -->
+ <PROPERTY NAME="indentNextLines" VALUE="\S+\s+\S+\s+\S+\s*;$" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="[{(" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}])" />
+ <PROPERTY NAME="ignoreWhitespace" VALUE="false" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+
+ <RULES HIGHLIGHT_DIGITS="TRUE">
+
+
+ <!-- @foo -->
+ <MARK_FOLLOWING TYPE="KEYWORD1">@</MARK_FOLLOWING>
+
+ <!-- Prefixes -->
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+
+ <!-- Resource URI -->
+ <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- Strings -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE" ESCAPE="\">
+ <BEGIN>"""</BEGIN>
+ <END>"""</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- Operators -->
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">^^</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">=></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <!-- COMMENTS -->
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="FALSE">#</EOL_SPAN>
+
+ <!-- KEYWORDS -->
+ <KEYWORDS>
+ <KEYWORD2>a</KEYWORD2>
+ <KEYWORD2>is</KEYWORD2>
+ <KEYWORD2>has</KEYWORD2>
+ <KEYWORD2>of</KEYWORD2>
+ <KEYWORD3>true</KEYWORD3>
+ <KEYWORD3>false</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+
+</MODE>
+
+
diff --git a/jEdit/modes/netrexx.xml b/jEdit/modes/netrexx.xml
index 62debd9..b253cfd 100644
--- a/jEdit/modes/netrexx.xml
+++ b/jEdit/modes/netrexx.xml
@@ -1,414 +1,414 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentNextLines"
- VALUE="\s*(if|loop|do|else|select|otherwise|catch|finally|class|method|properties)(.*)"/>
- <!-- VALUE="\s*(((if|while)\s*\(|else\s*(\{|$)|else\s+if\s*\(|case\s+.+:|default:)[^;]*|for\s*\(.*)" -->
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Documentation comment -->
- <SPAN TYPE="COMMENT2" DELEGATE="java::JAVADOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- C style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <!-- workaround to stop "*" from being colorized
- in import statements. -->
- <SEQ TYPE="NULL">.*</SEQ>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
-
- <KEYWORDS>
-
- <FUNCTION>abbrev</FUNCTION>
- <FUNCTION>abs</FUNCTION>
- <FUNCTION>b2x</FUNCTION>
- <FUNCTION>center</FUNCTION>
- <FUNCTION>centre</FUNCTION>
- <FUNCTION>changestr</FUNCTION>
- <FUNCTION>charAt</FUNCTION>
- <FUNCTION>compare</FUNCTION>
- <FUNCTION>copies</FUNCTION>
- <FUNCTION>copyIndexed</FUNCTION>
- <FUNCTION>countstr</FUNCTION>
- <FUNCTION>c2d</FUNCTION>
- <FUNCTION>c2x</FUNCTION>
- <FUNCTION>datatype</FUNCTION>
- <FUNCTION>delstr</FUNCTION>
- <FUNCTION>delword</FUNCTION>
- <FUNCTION>d2c</FUNCTION>
- <FUNCTION>d2X</FUNCTION>
- <FUNCTION>equals</FUNCTION>
- <FUNCTION>exists</FUNCTION>
- <FUNCTION>format</FUNCTION>
- <FUNCTION>hashCode</FUNCTION>
- <FUNCTION>insert</FUNCTION>
- <FUNCTION>lastpos</FUNCTION>
- <FUNCTION>left</FUNCTION>
- <FUNCTION>length</FUNCTION>
- <FUNCTION>lower</FUNCTION>
- <FUNCTION>max</FUNCTION>
- <FUNCTION>min</FUNCTION>
- <FUNCTION>nop</FUNCTION>
- <FUNCTION>overlay</FUNCTION>
- <FUNCTION>parse</FUNCTION>
- <FUNCTION>pos</FUNCTION>
- <FUNCTION>reverse</FUNCTION>
- <FUNCTION>right</FUNCTION>
- <FUNCTION>say</FUNCTION>
- <FUNCTION>sequence</FUNCTION>
- <FUNCTION>sign</FUNCTION>
- <FUNCTION>space</FUNCTION>
- <FUNCTION>strip</FUNCTION>
- <FUNCTION>substr</FUNCTION>
- <FUNCTION>subword</FUNCTION>
- <FUNCTION>toCharArray</FUNCTION>
- <FUNCTION>toString</FUNCTION>
- <FUNCTION>toboolean</FUNCTION>
- <FUNCTION>tobyte</FUNCTION>
- <FUNCTION>tochar</FUNCTION>
- <FUNCTION>todouble</FUNCTION>
- <FUNCTION>tofloat</FUNCTION>
- <FUNCTION>toint</FUNCTION>
- <FUNCTION>tolong</FUNCTION>
- <FUNCTION>toshort</FUNCTION>
- <FUNCTION>trunc</FUNCTION>
- <FUNCTION>translate</FUNCTION>
- <FUNCTION>upper</FUNCTION>
- <FUNCTION>verify</FUNCTION>
- <FUNCTION>word</FUNCTION>
- <FUNCTION>wordindex</FUNCTION>
- <FUNCTION>wordlength</FUNCTION>
- <FUNCTION>wordpos</FUNCTION>
- <FUNCTION>words</FUNCTION>
- <FUNCTION>x2b</FUNCTION>
- <FUNCTION>x2c</FUNCTION>
- <FUNCTION>x2d</FUNCTION>
-
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>interface</KEYWORD1>
- <KEYWORD1>dependent</KEYWORD1>
- <KEYWORD1>adapter</KEYWORD1>
- <KEYWORD1>deprecated</KEYWORD1>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>uses</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
-
- <KEYWORD1>method</KEYWORD1>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD1>returns</KEYWORD1>
- <KEYWORD1>signals</KEYWORD1>
-
- <KEYWORD1>properties</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>inheritable</KEYWORD1>
- <KEYWORD1>constant</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>volatile</KEYWORD1>
- <KEYWORD1>unused</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <KEYWORD1>indirect</KEYWORD1>
-
- <KEYWORD2>do</KEYWORD2>
- <KEYWORD2>label</KEYWORD2>
- <KEYWORD2>protect</KEYWORD2>
- <KEYWORD2>catch</KEYWORD2>
- <KEYWORD2>finally</KEYWORD2>
- <KEYWORD2>end</KEYWORD2>
- <KEYWORD2>signal</KEYWORD2>
-
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD2>then</KEYWORD2>
- <KEYWORD2>else</KEYWORD2>
- <KEYWORD2>select</KEYWORD2>
- <KEYWORD2>case</KEYWORD2>
- <KEYWORD2>when</KEYWORD2>
- <KEYWORD2>otherwise</KEYWORD2>
-
- <KEYWORD2>loop</KEYWORD2>
- <KEYWORD2>forever</KEYWORD2>
- <KEYWORD2>for</KEYWORD2>
- <KEYWORD2>to</KEYWORD2>
- <KEYWORD2>by</KEYWORD2>
- <KEYWORD2>over</KEYWORD2>
- <KEYWORD2>until</KEYWORD2>
- <KEYWORD2>while</KEYWORD2>
- <KEYWORD2>leave</KEYWORD2>
- <KEYWORD2>iterate</KEYWORD2>
-
- <KEYWORD2>return</KEYWORD2>
- <KEYWORD2>exit</KEYWORD2>
-
- <KEYWORD3>ask</KEYWORD3>
- <KEYWORD3>digits</KEYWORD3>
- <KEYWORD3>form</KEYWORD3>
- <KEYWORD3>null</KEYWORD3>
- <KEYWORD3>source</KEYWORD3>
- <KEYWORD3>this</KEYWORD3>
- <KEYWORD3>super</KEYWORD3>
- <KEYWORD3>parent</KEYWORD3>
- <KEYWORD3>sourceline</KEYWORD3>
- <KEYWORD3>version</KEYWORD3>
-
- <KEYWORD3>trace</KEYWORD3>
- <KEYWORD3>var</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>results</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>methods</KEYWORD3>
-
- <KEYWORD3>package</KEYWORD3>
- <KEYWORD3>import</KEYWORD3>
- <KEYWORD3>numeric</KEYWORD3>
- <KEYWORD3>scientific</KEYWORD3>
- <KEYWORD3>engineering</KEYWORD3>
-
- <LITERAL2>options</LITERAL2>
- <LITERAL2>comments</LITERAL2>
- <LITERAL2>nocomments</LITERAL2>
- <LITERAL2>keep</LITERAL2>
- <LITERAL2>nokeep</LITERAL2>
- <LITERAL2>compact</LITERAL2>
- <LITERAL2>nocompact</LITERAL2>
- <LITERAL2>console</LITERAL2>
- <LITERAL2>noconsole</LITERAL2>
- <LITERAL2>decimal</LITERAL2>
- <LITERAL2>nodecimal</LITERAL2>
- <LITERAL2>explicit</LITERAL2>
- <LITERAL2>noexplicit</LITERAL2>
- <LITERAL2>java</LITERAL2>
- <LITERAL2>nojava</LITERAL2>
- <LITERAL2>savelog</LITERAL2>
- <LITERAL2>nosavelog</LITERAL2>
-
- <LITERAL2>sourcedir</LITERAL2>
- <LITERAL2>nosourcedir</LITERAL2>
- <LITERAL2>symbols</LITERAL2>
- <LITERAL2>nosymbols</LITERAL2>
- <LITERAL2>utf8</LITERAL2>
- <LITERAL2>noutf8</LITERAL2>
-
- <LITERAL2>notrace</LITERAL2>
- <LITERAL2>binary</LITERAL2>
- <LITERAL2>nobinary</LITERAL2>
- <LITERAL2>crossref</LITERAL2>
- <LITERAL2>nocrossref</LITERAL2>
- <LITERAL2>diag</LITERAL2>
- <LITERAL2>nodiag</LITERAL2>
- <LITERAL2>format</LITERAL2>
- <LITERAL2>noformat</LITERAL2>
- <LITERAL2>logo</LITERAL2>
- <LITERAL2>nologo</LITERAL2>
- <LITERAL2>replace</LITERAL2>
- <LITERAL2>noreplace</LITERAL2>
-
- <LITERAL2>strictassign</LITERAL2>
- <LITERAL2>nostrictassign</LITERAL2>
- <LITERAL2>strictcase</LITERAL2>
- <LITERAL2>nostrictcase</LITERAL2>
- <LITERAL2>strictargs</LITERAL2>
- <LITERAL2>nostrictargs</LITERAL2>
- <LITERAL2>strictimport</LITERAL2>
- <LITERAL2>nostrictimport</LITERAL2>
- <LITERAL2>strictsignal</LITERAL2>
- <LITERAL2>nostrictsignal</LITERAL2>
- <LITERAL2>strictprops</LITERAL2>
- <LITERAL2>nostrictprops</LITERAL2>
-
- <LITERAL2>verbose</LITERAL2>
- <LITERAL2>noverbose</LITERAL2>
- <LITERAL2>verbose0</LITERAL2>
- <LITERAL2>verbose1</LITERAL2>
- <LITERAL2>verbose2</LITERAL2>
- <LITERAL2>verbose3</LITERAL2>
- <LITERAL2>verbose4</LITERAL2>
- <LITERAL2>verbose5</LITERAL2>
-
- <LABEL>boolean</LABEL>
- <LABEL>char</LABEL>
- <LABEL>byte</LABEL>
- <LABEL>short</LABEL>
- <LABEL>int</LABEL>
- <LABEL>long</LABEL>
- <LABEL>float</LABEL>
- <LABEL>double</LABEL>
- <LABEL>Boolean</LABEL>
- <LABEL>Character</LABEL>
- <LABEL>Byte</LABEL>
- <LABEL>Short</LABEL>
- <LABEL>Integer</LABEL>
- <LABEL>Long</LABEL>
- <LABEL>Float</LABEL>
- <LABEL>Double</LABEL>
- <LABEL>BigDecimal</LABEL>
- <LABEL>BigInteger</LABEL>
- <LABEL>String</LABEL>
- <LABEL>Rexx</LABEL>
-
- <LABEL>StringBuffer</LABEL>
- <LABEL>Object</LABEL>
- <LABEL>Number</LABEL>
- <LABEL>ArrayList</LABEL>
- <LABEL>Calendar</LABEL>
- <LABEL>Date</LABEL>
- <LABEL>HashMap</LABEL>
- <LABEL>HashSet</LABEL>
- <LABEL>Hashtable</LABEL>
- <LABEL>LinkedHashMap</LABEL>
- <LABEL>LinkedHashSet</LABEL>
- <LABEL>TreeMap</LABEL>
- <LABEL>TreeSet</LABEL>
- <LABEL>Vector</LABEL>
- <LABEL>ConcurrentModificationException</LABEL>
-
- <LABEL>BufferedInputStream</LABEL>
- <LABEL>BufferedOutputStream</LABEL>
- <LABEL>BufferedReader</LABEL>
- <LABEL>BufferedWriter</LABEL>
- <LABEL>ByteArrayInputStream</LABEL>
- <LABEL>ByteArrayOutputStream</LABEL>
- <LABEL>CharArrayReader</LABEL>
- <LABEL>CharArrayWriter</LABEL>
- <LABEL>DataInputStream</LABEL>
- <LABEL>DataOutputStream</LABEL>
- <LABEL>File</LABEL>
- <LABEL>FileDescriptor</LABEL>
- <LABEL>FileInputStream</LABEL>
- <LABEL>FileOutputStream</LABEL>
- <LABEL>FilePermission</LABEL>
- <LABEL>FileReader</LABEL>
- <LABEL>FileWriter</LABEL>
- <LABEL>FilterInputStream</LABEL>
- <LABEL>FilterOutputStream</LABEL>
- <LABEL>FilterReader</LABEL>
- <LABEL>FilterWriter</LABEL>
- <LABEL>InputStream</LABEL>
- <LABEL>InputStreamReader</LABEL>
- <LABEL>LineNumberInputStream</LABEL>
- <LABEL>LineNumberReader</LABEL>
- <LABEL>ObjectInputStream</LABEL>
- <LABEL>ObjectOutputStream</LABEL>
- <LABEL>OutputStream</LABEL>
- <LABEL>OutputStreamWriter</LABEL>
- <LABEL>PipedInputStream</LABEL>
- <LABEL>PipedOutputStream</LABEL>
- <LABEL>PipedReader</LABEL>
- <LABEL>PipedWriter</LABEL>
- <LABEL>PrintStream</LABEL>
- <LABEL>PrintWriter</LABEL>
- <LABEL>PushbackInputStream</LABEL>
- <LABEL>PushbackReader</LABEL>
- <LABEL>RandomAccessFile</LABEL>
- <LABEL>Reader</LABEL>
- <LABEL>SequenceInputStream</LABEL>
- <LABEL>StreamTokenizer</LABEL>
- <LABEL>StringBufferInputStream</LABEL>
- <LABEL>StringReader</LABEL>
- <LABEL>StringWriter</LABEL>
- <LABEL>Writer</LABEL>
-
- <!-- Commonly used (=java.lang.* and java.io.*) Exceptions -->
- <MARKUP>ArithmeticException</MARKUP>
- <MARKUP>ArrayIndexOutOfBoundsException</MARKUP>
- <MARKUP>ArrayStoreException</MARKUP>
- <MARKUP>ClassCastException</MARKUP>
- <MARKUP>ClassNotFoundException</MARKUP>
- <MARKUP>CloneNotSupportedException</MARKUP>
- <MARKUP>Exception</MARKUP>
- <MARKUP>IllegalAccessException</MARKUP>
- <MARKUP>IllegalArgumentException</MARKUP>
- <MARKUP>IllegalMonitorStateException</MARKUP>
- <MARKUP>IllegalStateException</MARKUP>
- <MARKUP>IllegalThreadStateException</MARKUP>
- <MARKUP>IndexOutOfBoundsException</MARKUP>
- <MARKUP>InstantiationException</MARKUP>
- <MARKUP>InterruptedException</MARKUP>
- <MARKUP>NegativeArraySizeException</MARKUP>
- <MARKUP>NoSuchFieldException</MARKUP>
- <MARKUP>NoSuchMethodException</MARKUP>
- <MARKUP>NullPointerException</MARKUP>
- <MARKUP>NumberFormatException</MARKUP>
- <MARKUP>RuntimeException</MARKUP>
- <MARKUP>SecurityException</MARKUP>
- <MARKUP>StringIndexOutOfBoundsException</MARKUP>
- <MARKUP>UnsupportedOperationException</MARKUP>
-
- <MARKUP>CharConversionException</MARKUP>
- <MARKUP>EOFException</MARKUP>
- <MARKUP>FileNotFoundException</MARKUP>
- <MARKUP>InterruptedIOException</MARKUP>
- <MARKUP>InvalidClassException</MARKUP>
- <MARKUP>InvalidObjectException</MARKUP>
- <MARKUP>IOException</MARKUP>
- <MARKUP>NotActiveException</MARKUP>
- <MARKUP>NotSerializableException</MARKUP>
- <MARKUP>ObjectStreamException</MARKUP>
- <MARKUP>OptionalDataException</MARKUP>
- <MARKUP>StreamCorruptedException</MARKUP>
- <MARKUP>SyncFailedException</MARKUP>
- <MARKUP>UnsupportedEncodingException</MARKUP>
- <MARKUP>UTFDataFormatException</MARKUP>
- <MARKUP>WriteAbortedException</MARKUP>
-
- <!-- all rmi functions need to signal this -->
- <MARKUP>RemoteException</MARKUP>
-
- <!-- Rexx specific Exception -->
- <MARKUP>BadArgumentException</MARKUP>
- <MARKUP>BadColumnException</MARKUP>
- <MARKUP>BadNumericException</MARKUP>
- <MARKUP>DivideException</MARKUP>
- <MARKUP>ExponentOverflowException</MARKUP>
- <MARKUP>NoOtherwiseException</MARKUP>
- <MARKUP>NotCharacterException</MARKUP>
- <MARKUP>NotLogicException</MARKUP>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentNextLines"
+ VALUE="\s*(if|loop|do|else|select|otherwise|catch|finally|class|method|properties)(.*)"/>
+ <!-- VALUE="\s*(((if|while)\s*\(|else\s*(\{|$)|else\s+if\s*\(|case\s+.+:|default:)[^;]*|for\s*\(.*)" -->
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Documentation comment -->
+ <SPAN TYPE="COMMENT2" DELEGATE="java::JAVADOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- C style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <!-- workaround to stop "*" from being colorized
+ in import statements. -->
+ <SEQ TYPE="NULL">.*</SEQ>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+
+ <KEYWORDS>
+
+ <FUNCTION>abbrev</FUNCTION>
+ <FUNCTION>abs</FUNCTION>
+ <FUNCTION>b2x</FUNCTION>
+ <FUNCTION>center</FUNCTION>
+ <FUNCTION>centre</FUNCTION>
+ <FUNCTION>changestr</FUNCTION>
+ <FUNCTION>charAt</FUNCTION>
+ <FUNCTION>compare</FUNCTION>
+ <FUNCTION>copies</FUNCTION>
+ <FUNCTION>copyIndexed</FUNCTION>
+ <FUNCTION>countstr</FUNCTION>
+ <FUNCTION>c2d</FUNCTION>
+ <FUNCTION>c2x</FUNCTION>
+ <FUNCTION>datatype</FUNCTION>
+ <FUNCTION>delstr</FUNCTION>
+ <FUNCTION>delword</FUNCTION>
+ <FUNCTION>d2c</FUNCTION>
+ <FUNCTION>d2X</FUNCTION>
+ <FUNCTION>equals</FUNCTION>
+ <FUNCTION>exists</FUNCTION>
+ <FUNCTION>format</FUNCTION>
+ <FUNCTION>hashCode</FUNCTION>
+ <FUNCTION>insert</FUNCTION>
+ <FUNCTION>lastpos</FUNCTION>
+ <FUNCTION>left</FUNCTION>
+ <FUNCTION>length</FUNCTION>
+ <FUNCTION>lower</FUNCTION>
+ <FUNCTION>max</FUNCTION>
+ <FUNCTION>min</FUNCTION>
+ <FUNCTION>nop</FUNCTION>
+ <FUNCTION>overlay</FUNCTION>
+ <FUNCTION>parse</FUNCTION>
+ <FUNCTION>pos</FUNCTION>
+ <FUNCTION>reverse</FUNCTION>
+ <FUNCTION>right</FUNCTION>
+ <FUNCTION>say</FUNCTION>
+ <FUNCTION>sequence</FUNCTION>
+ <FUNCTION>sign</FUNCTION>
+ <FUNCTION>space</FUNCTION>
+ <FUNCTION>strip</FUNCTION>
+ <FUNCTION>substr</FUNCTION>
+ <FUNCTION>subword</FUNCTION>
+ <FUNCTION>toCharArray</FUNCTION>
+ <FUNCTION>toString</FUNCTION>
+ <FUNCTION>toboolean</FUNCTION>
+ <FUNCTION>tobyte</FUNCTION>
+ <FUNCTION>tochar</FUNCTION>
+ <FUNCTION>todouble</FUNCTION>
+ <FUNCTION>tofloat</FUNCTION>
+ <FUNCTION>toint</FUNCTION>
+ <FUNCTION>tolong</FUNCTION>
+ <FUNCTION>toshort</FUNCTION>
+ <FUNCTION>trunc</FUNCTION>
+ <FUNCTION>translate</FUNCTION>
+ <FUNCTION>upper</FUNCTION>
+ <FUNCTION>verify</FUNCTION>
+ <FUNCTION>word</FUNCTION>
+ <FUNCTION>wordindex</FUNCTION>
+ <FUNCTION>wordlength</FUNCTION>
+ <FUNCTION>wordpos</FUNCTION>
+ <FUNCTION>words</FUNCTION>
+ <FUNCTION>x2b</FUNCTION>
+ <FUNCTION>x2c</FUNCTION>
+ <FUNCTION>x2d</FUNCTION>
+
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD1>dependent</KEYWORD1>
+ <KEYWORD1>adapter</KEYWORD1>
+ <KEYWORD1>deprecated</KEYWORD1>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>uses</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+
+ <KEYWORD1>method</KEYWORD1>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD1>returns</KEYWORD1>
+ <KEYWORD1>signals</KEYWORD1>
+
+ <KEYWORD1>properties</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>inheritable</KEYWORD1>
+ <KEYWORD1>constant</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>volatile</KEYWORD1>
+ <KEYWORD1>unused</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <KEYWORD1>indirect</KEYWORD1>
+
+ <KEYWORD2>do</KEYWORD2>
+ <KEYWORD2>label</KEYWORD2>
+ <KEYWORD2>protect</KEYWORD2>
+ <KEYWORD2>catch</KEYWORD2>
+ <KEYWORD2>finally</KEYWORD2>
+ <KEYWORD2>end</KEYWORD2>
+ <KEYWORD2>signal</KEYWORD2>
+
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>then</KEYWORD2>
+ <KEYWORD2>else</KEYWORD2>
+ <KEYWORD2>select</KEYWORD2>
+ <KEYWORD2>case</KEYWORD2>
+ <KEYWORD2>when</KEYWORD2>
+ <KEYWORD2>otherwise</KEYWORD2>
+
+ <KEYWORD2>loop</KEYWORD2>
+ <KEYWORD2>forever</KEYWORD2>
+ <KEYWORD2>for</KEYWORD2>
+ <KEYWORD2>to</KEYWORD2>
+ <KEYWORD2>by</KEYWORD2>
+ <KEYWORD2>over</KEYWORD2>
+ <KEYWORD2>until</KEYWORD2>
+ <KEYWORD2>while</KEYWORD2>
+ <KEYWORD2>leave</KEYWORD2>
+ <KEYWORD2>iterate</KEYWORD2>
+
+ <KEYWORD2>return</KEYWORD2>
+ <KEYWORD2>exit</KEYWORD2>
+
+ <KEYWORD3>ask</KEYWORD3>
+ <KEYWORD3>digits</KEYWORD3>
+ <KEYWORD3>form</KEYWORD3>
+ <KEYWORD3>null</KEYWORD3>
+ <KEYWORD3>source</KEYWORD3>
+ <KEYWORD3>this</KEYWORD3>
+ <KEYWORD3>super</KEYWORD3>
+ <KEYWORD3>parent</KEYWORD3>
+ <KEYWORD3>sourceline</KEYWORD3>
+ <KEYWORD3>version</KEYWORD3>
+
+ <KEYWORD3>trace</KEYWORD3>
+ <KEYWORD3>var</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>results</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>methods</KEYWORD3>
+
+ <KEYWORD3>package</KEYWORD3>
+ <KEYWORD3>import</KEYWORD3>
+ <KEYWORD3>numeric</KEYWORD3>
+ <KEYWORD3>scientific</KEYWORD3>
+ <KEYWORD3>engineering</KEYWORD3>
+
+ <LITERAL2>options</LITERAL2>
+ <LITERAL2>comments</LITERAL2>
+ <LITERAL2>nocomments</LITERAL2>
+ <LITERAL2>keep</LITERAL2>
+ <LITERAL2>nokeep</LITERAL2>
+ <LITERAL2>compact</LITERAL2>
+ <LITERAL2>nocompact</LITERAL2>
+ <LITERAL2>console</LITERAL2>
+ <LITERAL2>noconsole</LITERAL2>
+ <LITERAL2>decimal</LITERAL2>
+ <LITERAL2>nodecimal</LITERAL2>
+ <LITERAL2>explicit</LITERAL2>
+ <LITERAL2>noexplicit</LITERAL2>
+ <LITERAL2>java</LITERAL2>
+ <LITERAL2>nojava</LITERAL2>
+ <LITERAL2>savelog</LITERAL2>
+ <LITERAL2>nosavelog</LITERAL2>
+
+ <LITERAL2>sourcedir</LITERAL2>
+ <LITERAL2>nosourcedir</LITERAL2>
+ <LITERAL2>symbols</LITERAL2>
+ <LITERAL2>nosymbols</LITERAL2>
+ <LITERAL2>utf8</LITERAL2>
+ <LITERAL2>noutf8</LITERAL2>
+
+ <LITERAL2>notrace</LITERAL2>
+ <LITERAL2>binary</LITERAL2>
+ <LITERAL2>nobinary</LITERAL2>
+ <LITERAL2>crossref</LITERAL2>
+ <LITERAL2>nocrossref</LITERAL2>
+ <LITERAL2>diag</LITERAL2>
+ <LITERAL2>nodiag</LITERAL2>
+ <LITERAL2>format</LITERAL2>
+ <LITERAL2>noformat</LITERAL2>
+ <LITERAL2>logo</LITERAL2>
+ <LITERAL2>nologo</LITERAL2>
+ <LITERAL2>replace</LITERAL2>
+ <LITERAL2>noreplace</LITERAL2>
+
+ <LITERAL2>strictassign</LITERAL2>
+ <LITERAL2>nostrictassign</LITERAL2>
+ <LITERAL2>strictcase</LITERAL2>
+ <LITERAL2>nostrictcase</LITERAL2>
+ <LITERAL2>strictargs</LITERAL2>
+ <LITERAL2>nostrictargs</LITERAL2>
+ <LITERAL2>strictimport</LITERAL2>
+ <LITERAL2>nostrictimport</LITERAL2>
+ <LITERAL2>strictsignal</LITERAL2>
+ <LITERAL2>nostrictsignal</LITERAL2>
+ <LITERAL2>strictprops</LITERAL2>
+ <LITERAL2>nostrictprops</LITERAL2>
+
+ <LITERAL2>verbose</LITERAL2>
+ <LITERAL2>noverbose</LITERAL2>
+ <LITERAL2>verbose0</LITERAL2>
+ <LITERAL2>verbose1</LITERAL2>
+ <LITERAL2>verbose2</LITERAL2>
+ <LITERAL2>verbose3</LITERAL2>
+ <LITERAL2>verbose4</LITERAL2>
+ <LITERAL2>verbose5</LITERAL2>
+
+ <LABEL>boolean</LABEL>
+ <LABEL>char</LABEL>
+ <LABEL>byte</LABEL>
+ <LABEL>short</LABEL>
+ <LABEL>int</LABEL>
+ <LABEL>long</LABEL>
+ <LABEL>float</LABEL>
+ <LABEL>double</LABEL>
+ <LABEL>Boolean</LABEL>
+ <LABEL>Character</LABEL>
+ <LABEL>Byte</LABEL>
+ <LABEL>Short</LABEL>
+ <LABEL>Integer</LABEL>
+ <LABEL>Long</LABEL>
+ <LABEL>Float</LABEL>
+ <LABEL>Double</LABEL>
+ <LABEL>BigDecimal</LABEL>
+ <LABEL>BigInteger</LABEL>
+ <LABEL>String</LABEL>
+ <LABEL>Rexx</LABEL>
+
+ <LABEL>StringBuffer</LABEL>
+ <LABEL>Object</LABEL>
+ <LABEL>Number</LABEL>
+ <LABEL>ArrayList</LABEL>
+ <LABEL>Calendar</LABEL>
+ <LABEL>Date</LABEL>
+ <LABEL>HashMap</LABEL>
+ <LABEL>HashSet</LABEL>
+ <LABEL>Hashtable</LABEL>
+ <LABEL>LinkedHashMap</LABEL>
+ <LABEL>LinkedHashSet</LABEL>
+ <LABEL>TreeMap</LABEL>
+ <LABEL>TreeSet</LABEL>
+ <LABEL>Vector</LABEL>
+ <LABEL>ConcurrentModificationException</LABEL>
+
+ <LABEL>BufferedInputStream</LABEL>
+ <LABEL>BufferedOutputStream</LABEL>
+ <LABEL>BufferedReader</LABEL>
+ <LABEL>BufferedWriter</LABEL>
+ <LABEL>ByteArrayInputStream</LABEL>
+ <LABEL>ByteArrayOutputStream</LABEL>
+ <LABEL>CharArrayReader</LABEL>
+ <LABEL>CharArrayWriter</LABEL>
+ <LABEL>DataInputStream</LABEL>
+ <LABEL>DataOutputStream</LABEL>
+ <LABEL>File</LABEL>
+ <LABEL>FileDescriptor</LABEL>
+ <LABEL>FileInputStream</LABEL>
+ <LABEL>FileOutputStream</LABEL>
+ <LABEL>FilePermission</LABEL>
+ <LABEL>FileReader</LABEL>
+ <LABEL>FileWriter</LABEL>
+ <LABEL>FilterInputStream</LABEL>
+ <LABEL>FilterOutputStream</LABEL>
+ <LABEL>FilterReader</LABEL>
+ <LABEL>FilterWriter</LABEL>
+ <LABEL>InputStream</LABEL>
+ <LABEL>InputStreamReader</LABEL>
+ <LABEL>LineNumberInputStream</LABEL>
+ <LABEL>LineNumberReader</LABEL>
+ <LABEL>ObjectInputStream</LABEL>
+ <LABEL>ObjectOutputStream</LABEL>
+ <LABEL>OutputStream</LABEL>
+ <LABEL>OutputStreamWriter</LABEL>
+ <LABEL>PipedInputStream</LABEL>
+ <LABEL>PipedOutputStream</LABEL>
+ <LABEL>PipedReader</LABEL>
+ <LABEL>PipedWriter</LABEL>
+ <LABEL>PrintStream</LABEL>
+ <LABEL>PrintWriter</LABEL>
+ <LABEL>PushbackInputStream</LABEL>
+ <LABEL>PushbackReader</LABEL>
+ <LABEL>RandomAccessFile</LABEL>
+ <LABEL>Reader</LABEL>
+ <LABEL>SequenceInputStream</LABEL>
+ <LABEL>StreamTokenizer</LABEL>
+ <LABEL>StringBufferInputStream</LABEL>
+ <LABEL>StringReader</LABEL>
+ <LABEL>StringWriter</LABEL>
+ <LABEL>Writer</LABEL>
+
+ <!-- Commonly used (=java.lang.* and java.io.*) Exceptions -->
+ <MARKUP>ArithmeticException</MARKUP>
+ <MARKUP>ArrayIndexOutOfBoundsException</MARKUP>
+ <MARKUP>ArrayStoreException</MARKUP>
+ <MARKUP>ClassCastException</MARKUP>
+ <MARKUP>ClassNotFoundException</MARKUP>
+ <MARKUP>CloneNotSupportedException</MARKUP>
+ <MARKUP>Exception</MARKUP>
+ <MARKUP>IllegalAccessException</MARKUP>
+ <MARKUP>IllegalArgumentException</MARKUP>
+ <MARKUP>IllegalMonitorStateException</MARKUP>
+ <MARKUP>IllegalStateException</MARKUP>
+ <MARKUP>IllegalThreadStateException</MARKUP>
+ <MARKUP>IndexOutOfBoundsException</MARKUP>
+ <MARKUP>InstantiationException</MARKUP>
+ <MARKUP>InterruptedException</MARKUP>
+ <MARKUP>NegativeArraySizeException</MARKUP>
+ <MARKUP>NoSuchFieldException</MARKUP>
+ <MARKUP>NoSuchMethodException</MARKUP>
+ <MARKUP>NullPointerException</MARKUP>
+ <MARKUP>NumberFormatException</MARKUP>
+ <MARKUP>RuntimeException</MARKUP>
+ <MARKUP>SecurityException</MARKUP>
+ <MARKUP>StringIndexOutOfBoundsException</MARKUP>
+ <MARKUP>UnsupportedOperationException</MARKUP>
+
+ <MARKUP>CharConversionException</MARKUP>
+ <MARKUP>EOFException</MARKUP>
+ <MARKUP>FileNotFoundException</MARKUP>
+ <MARKUP>InterruptedIOException</MARKUP>
+ <MARKUP>InvalidClassException</MARKUP>
+ <MARKUP>InvalidObjectException</MARKUP>
+ <MARKUP>IOException</MARKUP>
+ <MARKUP>NotActiveException</MARKUP>
+ <MARKUP>NotSerializableException</MARKUP>
+ <MARKUP>ObjectStreamException</MARKUP>
+ <MARKUP>OptionalDataException</MARKUP>
+ <MARKUP>StreamCorruptedException</MARKUP>
+ <MARKUP>SyncFailedException</MARKUP>
+ <MARKUP>UnsupportedEncodingException</MARKUP>
+ <MARKUP>UTFDataFormatException</MARKUP>
+ <MARKUP>WriteAbortedException</MARKUP>
+
+ <!-- all rmi functions need to signal this -->
+ <MARKUP>RemoteException</MARKUP>
+
+ <!-- Rexx specific Exception -->
+ <MARKUP>BadArgumentException</MARKUP>
+ <MARKUP>BadColumnException</MARKUP>
+ <MARKUP>BadNumericException</MARKUP>
+ <MARKUP>DivideException</MARKUP>
+ <MARKUP>ExponentOverflowException</MARKUP>
+ <MARKUP>NoOtherwiseException</MARKUP>
+ <MARKUP>NotCharacterException</MARKUP>
+ <MARKUP>NotLogicException</MARKUP>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/nqc.xml b/jEdit/modes/nqc.xml
index 574b3cd..d8e9e0a 100644
--- a/jEdit/modes/nqc.xml
+++ b/jEdit/modes/nqc.xml
@@ -1,218 +1,218 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
-
- <!-- C style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- preprocessor statements -->
- <EOL_SPAN TYPE="KEYWORD2">#</EOL_SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
- MATCH_TYPE="OPERATOR"
- TYPE="LABEL">:</MARK_PREVIOUS>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>__event_src</KEYWORD1>
- <KEYWORD1>__sensor</KEYWORD1>
- <KEYWORD1>__type</KEYWORD1>
- <KEYWORD1>abs</KEYWORD1>
- <KEYWORD1>aquire</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>monitor</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>sign</KEYWORD1>
- <KEYWORD1>start</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>sub</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>task</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <KEYWORD2>asm</KEYWORD2>
- <KEYWORD2>inline</KEYWORD2>
-
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>void</KEYWORD3>
-
- <LITERAL2>true</LITERAL2>
- <LITERAL2>false</LITERAL2>
- <LITERAL2>NULL</LITERAL2>
-
- <LITERAL2>SENSOR_1</LITERAL2>
- <LITERAL2>SENSOR_2</LITERAL2>
- <LITERAL2>SENSOR_3</LITERAL2>
-
- <LITERAL2>SENSOR_TYPE_NONE</LITERAL2>
- <LITERAL2>SENSOR_TYPE_TOUCH</LITERAL2>
- <LITERAL2>SENSOR_TYPE_TEMPERATURE</LITERAL2>
- <LITERAL2>SENSOR_TYPE_LIGHT</LITERAL2>
- <LITERAL2>SENSOR_TYPE_ROTATION</LITERAL2>
-
- <LITERAL2>SENSOR_MODE_RAW</LITERAL2>
- <LITERAL2>SENSOR_MODE_BOOL</LITERAL2>
- <LITERAL2>SENSOR_MODE_EDGE</LITERAL2>
- <LITERAL2>SENSOR_MODE_PULSE</LITERAL2>
- <LITERAL2>SENSOR_MODE_PERCENT</LITERAL2>
- <LITERAL2>SENSOR_MODE_FAHRENHEIT</LITERAL2>
- <LITERAL2>SENSOR_MODE_CELSIUS</LITERAL2>
- <LITERAL2>SENSOR_MODE_ROTATION</LITERAL2>
-
- <LITERAL2>SENSOR_TOUCH</LITERAL2>
- <LITERAL2>SENSOR_LIGHT</LITERAL2>
- <LITERAL2>SENSOR_EDGE</LITERAL2>
- <LITERAL2>SENSOR_PULSE</LITERAL2>
- <LITERAL2>SENSOR_FAHRENHEIT</LITERAL2>
- <LITERAL2>SENSOR_CELSIUS</LITERAL2>
- <LITERAL2>SENSOR_ROTATION</LITERAL2>
-
- <LITERAL2>OUT_A</LITERAL2>
- <LITERAL2>OUT_B</LITERAL2>
- <LITERAL2>OUT_C</LITERAL2>
-
- <LITERAL2>OUT_OFF</LITERAL2>
- <LITERAL2>OUT_ON</LITERAL2>
- <LITERAL2>OUT_FLOAT</LITERAL2>
-
- <LITERAL2>OUT_FWD</LITERAL2>
- <LITERAL2>OUT_REV</LITERAL2>
- <LITERAL2>OUT_TOOGLE</LITERAL2>
-
- <LITERAL2>OUT_FULL</LITERAL2>
- <LITERAL2>OUT_HALF</LITERAL2>
- <LITERAL2>OUT_LOW</LITERAL2>
-
- <LITERAL2>SOUND_CLICK</LITERAL2>
- <LITERAL2>SOUND_DOUBLE_BEEP</LITERAL2>
- <LITERAL2>SOUND_DOWN</LITERAL2>
- <LITERAL2>SOUND_UP</LITERAL2>
- <LITERAL2>SOUND_LOW_BEEP</LITERAL2>
- <LITERAL2>SOUND_FAST_UP</LITERAL2>
-
- <LITERAL2>DISPLAY_WATCH</LITERAL2>
- <LITERAL2>DISPLAY_OUT_A</LITERAL2>
- <LITERAL2>DISPLAY_OUT_B</LITERAL2>
- <LITERAL2>DISPLAY_OUT_C</LITERAL2>
- <LITERAL2>DISPLAY_SENSOR_1</LITERAL2>
- <LITERAL2>DISPLAY_SENSOR_2</LITERAL2>
- <LITERAL2>DISPLAY_SENSOR_3</LITERAL2>
-
- <LITERAL2>TX_POWER_LO</LITERAL2>
- <LITERAL2>TX_POWER_HI</LITERAL2>
-
- <LITERAL2>SERIAL_COMM_DEFAULT</LITERAL2>
- <LITERAL2>SERIAL_COMM_4800</LITERAL2>
- <LITERAL2>SERIAL_COMM_DUTY25</LITERAL2>
- <LITERAL2>SERIAL_COMM_76KHZ</LITERAL2>
-
- <LITERAL2>SERIAL_PACKET_PREAMBLE</LITERAL2>
- <LITERAL2>SERIAL_PACKET_DEFAULT</LITERAL2>
- <LITERAL2>SERIAL_PACKET_NEGATED</LITERAL2>
- <LITERAL2>SERIAL_PACKET_CHECKSUM</LITERAL2>
- <LITERAL2>SERIAL_PACKET_RCX</LITERAL2>
- <LITERAL2>SERIAL_PACKET_</LITERAL2>
-
- <LITERAL2>ACQUIRE_OUT_A</LITERAL2>
- <LITERAL2>ACQUIRE_OUT_B</LITERAL2>
- <LITERAL2>ACQUIRE_OUT_C</LITERAL2>
- <LITERAL2>ACQUIRE_SOUND</LITERAL2>
- <LITERAL2>ACQUIRE_USER_1</LITERAL2>
- <LITERAL2>ACQUIRE_USER_2</LITERAL2>
- <LITERAL2>ACQUIRE_USER_3</LITERAL2>
- <LITERAL2>ACQUIRE_USER_4</LITERAL2>
-
- <LITERAL2>EVENT_TYPE_PRESSED</LITERAL2>
- <LITERAL2>EVENT_TYPE_RELEASED</LITERAL2>
- <LITERAL2>EVENT_TYPE_PULSE</LITERAL2>
- <LITERAL2>EVENT_TYPE_EDGE</LITERAL2>
- <LITERAL2>EVENT_TYPE_FASTCHANGE</LITERAL2>
- <LITERAL2>EVENT_TYPE_LOW</LITERAL2>
- <LITERAL2>EVENT_TYPE_NORMAL</LITERAL2>
- <LITERAL2>EVENT_TYPE_HIGH</LITERAL2>
- <LITERAL2>EVENT_TYPE_CLICK</LITERAL2>
- <LITERAL2>EVENT_TYPE_DOUBLECLICK</LITERAL2>
- <LITERAL2>EVENT_TYPE_MESSAGE</LITERAL2>
-
- <LITERAL2>EVENT_1_PRESSED</LITERAL2>
- <LITERAL2>EVENT_1_RELEASED</LITERAL2>
- <LITERAL2>EVENT_2_PRESSED</LITERAL2>
- <LITERAL2>EVENT_2_RELEASED</LITERAL2>
- <LITERAL2>EVENT_LIGHT_HIGH</LITERAL2>
- <LITERAL2>EVENT_LIGHT_NORMAL</LITERAL2>
- <LITERAL2>EVENT_LIGHT_LOW</LITERAL2>
- <LITERAL2>EVENT_LIGHT_CLICK</LITERAL2>
- <LITERAL2>EVENT_LIGHT_DOUBLECLICK</LITERAL2>
- <LITERAL2>EVENT_COUNTER_0</LITERAL2>
- <LITERAL2>EVENT_COUNTER_1</LITERAL2>
- <LITERAL2>EVENT_TIMER_0</LITERAL2>
- <LITERAL2>EVENT_TIMER_1</LITERAL2>
- <LITERAL2>EVENT_TIMER_2</LITERAL2>
- <LITERAL2>EVENT_MESSAGE</LITERAL2>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+
+ <!-- C style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- preprocessor statements -->
+ <EOL_SPAN TYPE="KEYWORD2">#</EOL_SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
+ MATCH_TYPE="OPERATOR"
+ TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>__event_src</KEYWORD1>
+ <KEYWORD1>__sensor</KEYWORD1>
+ <KEYWORD1>__type</KEYWORD1>
+ <KEYWORD1>abs</KEYWORD1>
+ <KEYWORD1>aquire</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>monitor</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>sign</KEYWORD1>
+ <KEYWORD1>start</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>sub</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>task</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <KEYWORD2>asm</KEYWORD2>
+ <KEYWORD2>inline</KEYWORD2>
+
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>void</KEYWORD3>
+
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>NULL</LITERAL2>
+
+ <LITERAL2>SENSOR_1</LITERAL2>
+ <LITERAL2>SENSOR_2</LITERAL2>
+ <LITERAL2>SENSOR_3</LITERAL2>
+
+ <LITERAL2>SENSOR_TYPE_NONE</LITERAL2>
+ <LITERAL2>SENSOR_TYPE_TOUCH</LITERAL2>
+ <LITERAL2>SENSOR_TYPE_TEMPERATURE</LITERAL2>
+ <LITERAL2>SENSOR_TYPE_LIGHT</LITERAL2>
+ <LITERAL2>SENSOR_TYPE_ROTATION</LITERAL2>
+
+ <LITERAL2>SENSOR_MODE_RAW</LITERAL2>
+ <LITERAL2>SENSOR_MODE_BOOL</LITERAL2>
+ <LITERAL2>SENSOR_MODE_EDGE</LITERAL2>
+ <LITERAL2>SENSOR_MODE_PULSE</LITERAL2>
+ <LITERAL2>SENSOR_MODE_PERCENT</LITERAL2>
+ <LITERAL2>SENSOR_MODE_FAHRENHEIT</LITERAL2>
+ <LITERAL2>SENSOR_MODE_CELSIUS</LITERAL2>
+ <LITERAL2>SENSOR_MODE_ROTATION</LITERAL2>
+
+ <LITERAL2>SENSOR_TOUCH</LITERAL2>
+ <LITERAL2>SENSOR_LIGHT</LITERAL2>
+ <LITERAL2>SENSOR_EDGE</LITERAL2>
+ <LITERAL2>SENSOR_PULSE</LITERAL2>
+ <LITERAL2>SENSOR_FAHRENHEIT</LITERAL2>
+ <LITERAL2>SENSOR_CELSIUS</LITERAL2>
+ <LITERAL2>SENSOR_ROTATION</LITERAL2>
+
+ <LITERAL2>OUT_A</LITERAL2>
+ <LITERAL2>OUT_B</LITERAL2>
+ <LITERAL2>OUT_C</LITERAL2>
+
+ <LITERAL2>OUT_OFF</LITERAL2>
+ <LITERAL2>OUT_ON</LITERAL2>
+ <LITERAL2>OUT_FLOAT</LITERAL2>
+
+ <LITERAL2>OUT_FWD</LITERAL2>
+ <LITERAL2>OUT_REV</LITERAL2>
+ <LITERAL2>OUT_TOOGLE</LITERAL2>
+
+ <LITERAL2>OUT_FULL</LITERAL2>
+ <LITERAL2>OUT_HALF</LITERAL2>
+ <LITERAL2>OUT_LOW</LITERAL2>
+
+ <LITERAL2>SOUND_CLICK</LITERAL2>
+ <LITERAL2>SOUND_DOUBLE_BEEP</LITERAL2>
+ <LITERAL2>SOUND_DOWN</LITERAL2>
+ <LITERAL2>SOUND_UP</LITERAL2>
+ <LITERAL2>SOUND_LOW_BEEP</LITERAL2>
+ <LITERAL2>SOUND_FAST_UP</LITERAL2>
+
+ <LITERAL2>DISPLAY_WATCH</LITERAL2>
+ <LITERAL2>DISPLAY_OUT_A</LITERAL2>
+ <LITERAL2>DISPLAY_OUT_B</LITERAL2>
+ <LITERAL2>DISPLAY_OUT_C</LITERAL2>
+ <LITERAL2>DISPLAY_SENSOR_1</LITERAL2>
+ <LITERAL2>DISPLAY_SENSOR_2</LITERAL2>
+ <LITERAL2>DISPLAY_SENSOR_3</LITERAL2>
+
+ <LITERAL2>TX_POWER_LO</LITERAL2>
+ <LITERAL2>TX_POWER_HI</LITERAL2>
+
+ <LITERAL2>SERIAL_COMM_DEFAULT</LITERAL2>
+ <LITERAL2>SERIAL_COMM_4800</LITERAL2>
+ <LITERAL2>SERIAL_COMM_DUTY25</LITERAL2>
+ <LITERAL2>SERIAL_COMM_76KHZ</LITERAL2>
+
+ <LITERAL2>SERIAL_PACKET_PREAMBLE</LITERAL2>
+ <LITERAL2>SERIAL_PACKET_DEFAULT</LITERAL2>
+ <LITERAL2>SERIAL_PACKET_NEGATED</LITERAL2>
+ <LITERAL2>SERIAL_PACKET_CHECKSUM</LITERAL2>
+ <LITERAL2>SERIAL_PACKET_RCX</LITERAL2>
+ <LITERAL2>SERIAL_PACKET_</LITERAL2>
+
+ <LITERAL2>ACQUIRE_OUT_A</LITERAL2>
+ <LITERAL2>ACQUIRE_OUT_B</LITERAL2>
+ <LITERAL2>ACQUIRE_OUT_C</LITERAL2>
+ <LITERAL2>ACQUIRE_SOUND</LITERAL2>
+ <LITERAL2>ACQUIRE_USER_1</LITERAL2>
+ <LITERAL2>ACQUIRE_USER_2</LITERAL2>
+ <LITERAL2>ACQUIRE_USER_3</LITERAL2>
+ <LITERAL2>ACQUIRE_USER_4</LITERAL2>
+
+ <LITERAL2>EVENT_TYPE_PRESSED</LITERAL2>
+ <LITERAL2>EVENT_TYPE_RELEASED</LITERAL2>
+ <LITERAL2>EVENT_TYPE_PULSE</LITERAL2>
+ <LITERAL2>EVENT_TYPE_EDGE</LITERAL2>
+ <LITERAL2>EVENT_TYPE_FASTCHANGE</LITERAL2>
+ <LITERAL2>EVENT_TYPE_LOW</LITERAL2>
+ <LITERAL2>EVENT_TYPE_NORMAL</LITERAL2>
+ <LITERAL2>EVENT_TYPE_HIGH</LITERAL2>
+ <LITERAL2>EVENT_TYPE_CLICK</LITERAL2>
+ <LITERAL2>EVENT_TYPE_DOUBLECLICK</LITERAL2>
+ <LITERAL2>EVENT_TYPE_MESSAGE</LITERAL2>
+
+ <LITERAL2>EVENT_1_PRESSED</LITERAL2>
+ <LITERAL2>EVENT_1_RELEASED</LITERAL2>
+ <LITERAL2>EVENT_2_PRESSED</LITERAL2>
+ <LITERAL2>EVENT_2_RELEASED</LITERAL2>
+ <LITERAL2>EVENT_LIGHT_HIGH</LITERAL2>
+ <LITERAL2>EVENT_LIGHT_NORMAL</LITERAL2>
+ <LITERAL2>EVENT_LIGHT_LOW</LITERAL2>
+ <LITERAL2>EVENT_LIGHT_CLICK</LITERAL2>
+ <LITERAL2>EVENT_LIGHT_DOUBLECLICK</LITERAL2>
+ <LITERAL2>EVENT_COUNTER_0</LITERAL2>
+ <LITERAL2>EVENT_COUNTER_1</LITERAL2>
+ <LITERAL2>EVENT_TIMER_0</LITERAL2>
+ <LITERAL2>EVENT_TIMER_1</LITERAL2>
+ <LITERAL2>EVENT_TIMER_2</LITERAL2>
+ <LITERAL2>EVENT_MESSAGE</LITERAL2>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/nsis2.xml b/jEdit/modes/nsis2.xml
index 574d69f..91dad84 100644
--- a/jEdit/modes/nsis2.xml
+++ b/jEdit/modes/nsis2.xml
@@ -1,484 +1,485 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-Nullsoft Scriptable Installation System mode by Ryan Grove 2003
-Updated by Uwe Stöhr (donovaly at users.sourceforge.net) 2007
-Updated for 4.3pre9 by Alan Ezust 2007
-$Id: nsis2.xml 11164 2007-11-28 23:30:31Z blueyed $
-
-This file should be accurate as of the version of NSIS 2.30. If I've left something out, please let me know.
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- <PROPERTY NAME="indentNextLine" VALUE="\s*(.*:|(function\s+.*)|(section\s+.*)|(subsection\s+.*))" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" DEFAULT="NULL">
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD3">$</MARK_FOLLOWING>
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">::</MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
-
- <SPAN TYPE="LITERAL1" DELEGATE="NSIS_LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="NSIS_LITERAL">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="NSIS_LITERAL">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <KEYWORDS>
- <!-- Deprecated stuff -->
- <INVALID>dim</INVALID>
- <INVALID>uninstallexename</INVALID>
-
- <!-- Global variables -->
- <KEYWORD3>$0</KEYWORD3>
- <KEYWORD3>$1</KEYWORD3>
- <KEYWORD3>$2</KEYWORD3>
- <KEYWORD3>$3</KEYWORD3>
- <KEYWORD3>$4</KEYWORD3>
- <KEYWORD3>$5</KEYWORD3>
- <KEYWORD3>$6</KEYWORD3>
- <KEYWORD3>$7</KEYWORD3>
- <KEYWORD3>$8</KEYWORD3>
- <KEYWORD3>$9</KEYWORD3>
- <KEYWORD3>$INSTDIR</KEYWORD3>
- <KEYWORD3>$OUTDIR</KEYWORD3>
- <KEYWORD3>$CMDLINE</KEYWORD3>
- <KEYWORD3>$LANGUAGE</KEYWORD3>
-
- <!-- Local variables -->
- <KEYWORD3>$R0</KEYWORD3>
- <KEYWORD3>$R1</KEYWORD3>
- <KEYWORD3>$R2</KEYWORD3>
- <KEYWORD3>$R3</KEYWORD3>
- <KEYWORD3>$R4</KEYWORD3>
- <KEYWORD3>$R5</KEYWORD3>
- <KEYWORD3>$R6</KEYWORD3>
- <KEYWORD3>$R7</KEYWORD3>
- <KEYWORD3>$R8</KEYWORD3>
- <KEYWORD3>$R9</KEYWORD3>
-
- <!-- Constants -->
- <LITERAL3>ARCHIVE</LITERAL3>
- <LITERAL3>CENTER</LITERAL3>
- <LITERAL3>CONTROL</LITERAL3>
- <LITERAL3>CUR</LITERAL3>
- <LITERAL3>EXT</LITERAL3>
- <LITERAL3>F1</LITERAL3>
- <LITERAL3>F2</LITERAL3>
- <LITERAL3>F3</LITERAL3>
- <LITERAL3>F4</LITERAL3>
- <LITERAL3>F5</LITERAL3>
- <LITERAL3>F6</LITERAL3>
- <LITERAL3>F7</LITERAL3>
- <LITERAL3>F8</LITERAL3>
- <LITERAL3>F9</LITERAL3>
- <LITERAL3>F10</LITERAL3>
- <LITERAL3>F11</LITERAL3>
- <LITERAL3>F12</LITERAL3>
- <LITERAL3>F13</LITERAL3>
- <LITERAL3>F14</LITERAL3>
- <LITERAL3>F15</LITERAL3>
- <LITERAL3>F16</LITERAL3>
- <LITERAL3>F17</LITERAL3>
- <LITERAL3>F18</LITERAL3>
- <LITERAL3>F19</LITERAL3>
- <LITERAL3>F20</LITERAL3>
- <LITERAL3>F21</LITERAL3>
- <LITERAL3>F22</LITERAL3>
- <LITERAL3>F23</LITERAL3>
- <LITERAL3>F24</LITERAL3>
- <LITERAL3>FILE_ATTRIBUTE_ARCHIVE</LITERAL3>
- <LITERAL3>MB_ABORTRETRYIGNORE</LITERAL3>
- <LITERAL3>RIGHT</LITERAL3>
- <LITERAL3>RO</LITERAL3>
- <LITERAL3>SET</LITERAL3>
- <LITERAL3>SHIFT</LITERAL3>
- <LITERAL3>SW_SHOWMAXIMIZED</LITERAL3>
- <LITERAL3>SW_SHOWMINIMIZED</LITERAL3>
- <LITERAL3>SW_SHOWNORMAL</LITERAL3>
- <LITERAL3>a</LITERAL3>
- <LITERAL3>admin</LITERAL3>
- <LITERAL3>all</LITERAL3>
- <LITERAL3>alwaysoff</LITERAL3>
- <LITERAL3>auto</LITERAL3>
- <LITERAL3>both</LITERAL3>
- <LITERAL3>bottom</LITERAL3>
- <LITERAL3>bzip2</LITERAL3>
- <LITERAL3>checkbox</LITERAL3>
- <LITERAL3>colored</LITERAL3>
- <LITERAL3>components</LITERAL3>
- <LITERAL3>current</LITERAL3>
- <LITERAL3>custom</LITERAL3>
- <LITERAL3>directory</LITERAL3>
- <LITERAL3>false</LITERAL3>
- <LITERAL3>force</LITERAL3>
- <LITERAL3>hide</LITERAL3>
- <LITERAL3>highest</LITERAL3>
- <LITERAL3>ifnewer</LITERAL3>
- <LITERAL3>instfiles</LITERAL3>
- <LITERAL3>license</LITERAL3>
- <LITERAL3>listonly</LITERAL3>
- <LITERAL3>manual</LITERAL3>
- <LITERAL3>nevershow</LITERAL3>
- <LITERAL3>none</LITERAL3>
- <LITERAL3>off</LITERAL3>
- <LITERAL3>on</LITERAL3>
- <LITERAL3>r</LITERAL3>
- <LITERAL3>radiobuttons</LITERAL3>
- <LITERAL3>show</LITERAL3>
- <LITERAL3>silent</LITERAL3>
- <LITERAL3>silentlog</LITERAL3>
- <LITERAL3>smooth</LITERAL3>
- <LITERAL3>textonly</LITERAL3>
- <LITERAL3>top</LITERAL3>
- <LITERAL3>true</LITERAL3>
- <LITERAL3>try</LITERAL3>
- <LITERAL3>uninstConfirm</LITERAL3>
- <LITERAL3>user</LITERAL3>
- <LITERAL3>w</LITERAL3>
- <LITERAL3>zlib</LITERAL3>
- <LITERAL3>$$</LITERAL3>
- <LITERAL3>$DESKTOP</LITERAL3>
- <LITERAL3>$EXEDIR</LITERAL3>
- <LITERAL3>$HWNDPARENT</LITERAL3>
- <LITERAL3>$PLUGINSDIR</LITERAL3>
- <LITERAL3>$PROGRAMFILES</LITERAL3>
- <LITERAL3>$QUICKLAUNCH</LITERAL3>
- <LITERAL3>$SMPROGRAMS</LITERAL3>
- <LITERAL3>$SMSTARTUP</LITERAL3>
- <LITERAL3>$STARTMENU</LITERAL3>
- <LITERAL3>$SYSDIR</LITERAL3>
- <LITERAL3>$TEMP</LITERAL3>
- <LITERAL3>$WINDIR</LITERAL3>
- <LITERAL3>$\n</LITERAL3>
- <LITERAL3>$\r</LITERAL3>
- <LITERAL3>${NSISDIR}</LITERAL3>
- <LITERAL3>ALT</LITERAL3>
- <LITERAL3>END</LITERAL3>
- <LITERAL3>FILE_ATTRIBUTE_HIDDEN</LITERAL3>
- <LITERAL3>FILE_ATTRIBUTE_NORMAL</LITERAL3>
- <LITERAL3>FILE_ATTRIBUTE_OFFLINE</LITERAL3>
- <LITERAL3>FILE_ATTRIBUTE_READONLY</LITERAL3>
- <LITERAL3>FILE_ATTRIBUTE_SYSTEM</LITERAL3>
- <LITERAL3>FILE_ATTRIBUTE_TEMPORARY</LITERAL3>
- <LITERAL3>HIDDEN</LITERAL3>
- <LITERAL3>HKCC</LITERAL3>
- <LITERAL3>HKCR</LITERAL3>
- <LITERAL3>HKCU</LITERAL3>
- <LITERAL3>HKDD</LITERAL3>
- <LITERAL3>HKLM</LITERAL3>
- <LITERAL3>HKPD</LITERAL3>
- <LITERAL3>HKU</LITERAL3>
- <LITERAL3>SHCTX</LITERAL3>
- <LITERAL3>IDABORT</LITERAL3>
- <LITERAL3>IDCANCEL</LITERAL3>
- <LITERAL3>IDIGNORE</LITERAL3>
- <LITERAL3>IDNO</LITERAL3>
- <LITERAL3>IDOK</LITERAL3>
- <LITERAL3>IDRETRY</LITERAL3>
- <LITERAL3>IDYES</LITERAL3>
- <LITERAL3>LEFT</LITERAL3>
- <LITERAL3>MB_DEFBUTTON1</LITERAL3>
- <LITERAL3>MB_DEFBUTTON2</LITERAL3>
- <LITERAL3>MB_DEFBUTTON3</LITERAL3>
- <LITERAL3>MB_DEFBUTTON4</LITERAL3>
- <LITERAL3>MB_ICONEXCLAMATION</LITERAL3>
- <LITERAL3>MB_ICONINFORMATION</LITERAL3>
- <LITERAL3>MB_ICONQUESTION</LITERAL3>
- <LITERAL3>MB_ICONSTOP</LITERAL3>
- <LITERAL3>MB_OK</LITERAL3>
- <LITERAL3>MB_OKCANCEL</LITERAL3>
- <LITERAL3>MB_RETRYCANCEL</LITERAL3>
- <LITERAL3>MB_RIGHT</LITERAL3>
- <LITERAL3>MB_SETFOREGROUND</LITERAL3>
- <LITERAL3>MB_TOPMOST</LITERAL3>
- <LITERAL3>MB_YESNO</LITERAL3>
- <LITERAL3>MB_YESNOCANCEL</LITERAL3>
- <LITERAL3>NORMAL</LITERAL3>
- <LITERAL3>OFFLINE</LITERAL3>
- <LITERAL3>READONLY</LITERAL3>
- <LITERAL3>SYSTEM</LITERAL3>
- <LITERAL3>TEMPORARY</LITERAL3>
-
- <!-- Command flags -->
- <KEYWORD4>/0</KEYWORD4>
- <KEYWORD4>/COMPONENTSONLYONCUSTOM</KEYWORD4>
- <KEYWORD4>/CUSTOMSTRING</KEYWORD4>
- <KEYWORD4>/FILESONLY</KEYWORD4>
- <KEYWORD4>/IMGID</KEYWORD4>
- <KEYWORD4>/ITALIC</KEYWORD4>
- <KEYWORD4>/LANG</KEYWORD4>
- <KEYWORD4>/NOCUSTOM</KEYWORD4>
- <KEYWORD4>/NOUNLOAD</KEYWORD4>
- <KEYWORD4>/REBOOTOK</KEYWORD4>
- <KEYWORD4>/RESIZETOFIT</KEYWORD4>
- <KEYWORD4>/RTL</KEYWORD4>
- <KEYWORD4>/SHORT</KEYWORD4>
- <KEYWORD4>/SILENT</KEYWORD4>
- <KEYWORD4>/STRIKE</KEYWORD4>
- <KEYWORD4>/TIMEOUT</KEYWORD4>
- <KEYWORD4>/TRIM</KEYWORD4>
- <KEYWORD4>/UNDERLINE</KEYWORD4>
- <KEYWORD4>/a</KEYWORD4>
- <KEYWORD4>/e</KEYWORD4>
- <KEYWORD4>/ifempty</KEYWORD4>
- <KEYWORD4>/nonfatal</KEYWORD4>
- <KEYWORD4>/oname</KEYWORD4>
- <KEYWORD4>/r</KEYWORD4>
- <KEYWORD4>/windows</KEYWORD4>
-
- <!-- Compiler utility commands -->
- <KEYWORD2>!addincludedir</KEYWORD2>
- <KEYWORD2>!addplugindir</KEYWORD2>
- <KEYWORD2>!define</KEYWORD2>
- <KEYWORD2>!include</KEYWORD2>
- <KEYWORD2>!cd</KEYWORD2>
- <KEYWORD2>!echo</KEYWORD2>
- <KEYWORD2>!error</KEYWORD2>
- <KEYWORD2>!insertmacro</KEYWORD2>
- <KEYWORD2>!packhdr</KEYWORD2>
- <KEYWORD2>!system</KEYWORD2>
- <KEYWORD2>!warning</KEYWORD2>
- <KEYWORD2>!undef</KEYWORD2>
- <KEYWORD2>!verbose</KEYWORD2>
-
- <!-- Conditional compilation -->
- <KEYWORD1>!ifdef</KEYWORD1>
- <KEYWORD1>!ifndef</KEYWORD1>
- <KEYWORD1>!if</KEYWORD1>
- <KEYWORD1>!else</KEYWORD1>
- <KEYWORD1>!endif</KEYWORD1>
- <KEYWORD1>!macro</KEYWORD1>
- <KEYWORD1>!macroend</KEYWORD1>
-
- <!-- Keywords -->
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>functionend</KEYWORD1>
- <KEYWORD1>section</KEYWORD1>
- <KEYWORD1>sectionend</KEYWORD1>
- <KEYWORD1>subsection</KEYWORD1>
- <KEYWORD1>subsectionend</KEYWORD1>
-
- <!-- Instructions -->
- <KEYWORD2>addbrandingimage</KEYWORD2>
- <KEYWORD2>addsize</KEYWORD2>
- <KEYWORD2>allowrootdirinstall</KEYWORD2>
- <KEYWORD2>allowskipfiles</KEYWORD2>
- <KEYWORD2>autoclosewindow</KEYWORD2>
- <KEYWORD2>bggradient</KEYWORD2>
- <KEYWORD2>brandingtext</KEYWORD2>
- <KEYWORD2>bringtofront</KEYWORD2>
- <KEYWORD2>callinstdll</KEYWORD2>
- <KEYWORD2>caption</KEYWORD2>
- <KEYWORD2>changeui</KEYWORD2>
- <KEYWORD2>checkbitmap</KEYWORD2>
- <KEYWORD2>completedtext</KEYWORD2>
- <KEYWORD2>componenttext</KEYWORD2>
- <KEYWORD2>copyfiles</KEYWORD2>
- <KEYWORD2>crccheck</KEYWORD2>
- <KEYWORD2>createdirectory</KEYWORD2>
- <KEYWORD2>createfont</KEYWORD2>
- <KEYWORD2>createshortcut</KEYWORD2>
- <KEYWORD2>delete</KEYWORD2>
- <KEYWORD2>deleteinisec</KEYWORD2>
- <KEYWORD2>deleteinistr</KEYWORD2>
- <KEYWORD2>deleteregkey</KEYWORD2>
- <KEYWORD2>deleteregvalue</KEYWORD2>
- <KEYWORD2>detailprint</KEYWORD2>
- <KEYWORD2>detailsbuttontext</KEYWORD2>
- <KEYWORD2>dirshow</KEYWORD2>
- <KEYWORD2>dirtext</KEYWORD2>
- <KEYWORD2>enumregkey</KEYWORD2>
- <KEYWORD2>enumregvalue</KEYWORD2>
- <KEYWORD2>exch</KEYWORD2>
- <KEYWORD2>exec</KEYWORD2>
- <KEYWORD2>execshell</KEYWORD2>
- <KEYWORD2>execwait</KEYWORD2>
- <KEYWORD2>expandenvstrings</KEYWORD2>
- <KEYWORD2>file</KEYWORD2>
- <KEYWORD2>fileclose</KEYWORD2>
- <KEYWORD2>fileerrortext</KEYWORD2>
- <KEYWORD2>fileopen</KEYWORD2>
- <KEYWORD2>fileread</KEYWORD2>
- <KEYWORD2>filereadbyte</KEYWORD2>
- <KEYWORD2>fileseek</KEYWORD2>
- <KEYWORD2>filewrite</KEYWORD2>
- <KEYWORD2>filewritebyte</KEYWORD2>
- <KEYWORD2>findclose</KEYWORD2>
- <KEYWORD2>findfirst</KEYWORD2>
- <KEYWORD2>findnext</KEYWORD2>
- <KEYWORD2>findwindow</KEYWORD2>
- <KEYWORD2>flushini</KEYWORD2>
- <KEYWORD2>getcurinsttype</KEYWORD2>
- <KEYWORD2>getcurrentaddress</KEYWORD2>
- <KEYWORD2>getdlgitem</KEYWORD2>
- <KEYWORD2>getdllversion</KEYWORD2>
- <KEYWORD2>getdllversionlocal</KEYWORD2>
- <KEYWORD2>getfiletime</KEYWORD2>
- <KEYWORD2>getfiletimelocal</KEYWORD2>
- <KEYWORD2>getfullpathname</KEYWORD2>
- <KEYWORD2>getfunctionaddress</KEYWORD2>
- <KEYWORD2>getlabeladdress</KEYWORD2>
- <KEYWORD2>gettempfilename</KEYWORD2>
- <KEYWORD2>getwindowtext</KEYWORD2>
- <KEYWORD2>hidewindow</KEYWORD2>
- <KEYWORD2>icon</KEYWORD2>
- <KEYWORD2>initpluginsdir</KEYWORD2>
- <KEYWORD2>installbuttontext</KEYWORD2>
- <KEYWORD2>installcolors</KEYWORD2>
- <KEYWORD2>installdir</KEYWORD2>
- <KEYWORD2>installdirregkey</KEYWORD2>
- <KEYWORD2>instprogressflags</KEYWORD2>
- <KEYWORD2>insttype</KEYWORD2>
- <KEYWORD2>insttypegettext</KEYWORD2>
- <KEYWORD2>insttypesettext</KEYWORD2>
- <KEYWORD2>intfmt</KEYWORD2>
- <KEYWORD2>intop</KEYWORD2>
- <KEYWORD2>langstring</KEYWORD2>
- <KEYWORD2>langstringup</KEYWORD2>
- <KEYWORD2>licensebkcolor</KEYWORD2>
- <KEYWORD2>licensedata</KEYWORD2>
- <KEYWORD2>licenseforceselection</KEYWORD2>
- <KEYWORD2>licensetext</KEYWORD2>
- <KEYWORD2>loadlanguagefile</KEYWORD2>
- <KEYWORD2>loadlanguagefile</KEYWORD2>
- <KEYWORD2>logset</KEYWORD2>
- <KEYWORD2>logtext</KEYWORD2>
- <KEYWORD2>miscbuttontext</KEYWORD2>
- <KEYWORD2>name</KEYWORD2>
- <KEYWORD2>nop</KEYWORD2>
- <KEYWORD2>outfile</KEYWORD2>
- <KEYWORD2>page</KEYWORD2>
- <KEYWORD2>plugindir</KEYWORD2>
- <KEYWORD2>pop</KEYWORD2>
- <KEYWORD2>push</KEYWORD2>
- <KEYWORD2>readenvstr</KEYWORD2>
- <KEYWORD2>readinistr</KEYWORD2>
- <KEYWORD2>readregdword</KEYWORD2>
- <KEYWORD2>readregstr</KEYWORD2>
- <KEYWORD2>regdll</KEYWORD2>
- <KEYWORD2>rename</KEYWORD2>
- <KEYWORD2>requestexecutionlevel</KEYWORD2>
- <KEYWORD2>reservefile</KEYWORD2>
- <KEYWORD2>rmdir</KEYWORD2>
- <KEYWORD2>searchpath</KEYWORD2>
- <KEYWORD2>sectiongetflags</KEYWORD2>
- <KEYWORD2>sectiongetinsttypes</KEYWORD2>
- <KEYWORD2>sectiongetsize</KEYWORD2>
- <KEYWORD2>sectiongettext</KEYWORD2>
- <KEYWORD2>sectionin</KEYWORD2>
- <KEYWORD2>sectionsetflags</KEYWORD2>
- <KEYWORD2>sectionsetinsttypes</KEYWORD2>
- <KEYWORD2>sectionsetsize</KEYWORD2>
- <KEYWORD2>sectionsettext</KEYWORD2>
- <KEYWORD2>sendmessage</KEYWORD2>
- <KEYWORD2>setautoclose</KEYWORD2>
- <KEYWORD2>setbkcolor</KEYWORD2>
- <KEYWORD2>setbrandingimage</KEYWORD2>
- <KEYWORD2>setcompress</KEYWORD2>
- <KEYWORD2>setcompressor</KEYWORD2>
- <KEYWORD2>setcurinsttype</KEYWORD2>
- <KEYWORD2>setdatablockoptimize</KEYWORD2>
- <KEYWORD2>setdatesave</KEYWORD2>
- <KEYWORD2>setdetailsprint</KEYWORD2>
- <KEYWORD2>setdetailsview</KEYWORD2>
- <KEYWORD2>setfileattributes</KEYWORD2>
- <KEYWORD2>setfont</KEYWORD2>
- <KEYWORD2>setoutpath</KEYWORD2>
- <KEYWORD2>setoverwrite</KEYWORD2>
- <KEYWORD2>setpluginunload</KEYWORD2>
- <KEYWORD2>setrebootflag</KEYWORD2>
- <KEYWORD2>setshellvarcontext</KEYWORD2>
- <KEYWORD2>setstaticbkcolor</KEYWORD2>
- <KEYWORD2>setwindowlong</KEYWORD2>
- <KEYWORD2>showinstdetails</KEYWORD2>
- <KEYWORD2>showuninstdetails</KEYWORD2>
- <KEYWORD2>showwindow</KEYWORD2>
- <KEYWORD2>silentinstall</KEYWORD2>
- <KEYWORD2>silentuninstall</KEYWORD2>
- <KEYWORD2>sleep</KEYWORD2>
- <KEYWORD2>spacetexts</KEYWORD2>
- <KEYWORD2>strcpy</KEYWORD2>
- <KEYWORD2>strlen</KEYWORD2>
- <KEYWORD2>subcaption</KEYWORD2>
- <KEYWORD2>uninstallbuttontext</KEYWORD2>
- <KEYWORD2>uninstallcaption</KEYWORD2>
- <KEYWORD2>uninstallicon</KEYWORD2>
- <KEYWORD2>uninstallsubcaption</KEYWORD2>
- <KEYWORD2>uninstalltext</KEYWORD2>
- <KEYWORD2>uninstpage</KEYWORD2>
- <KEYWORD2>unregdll</KEYWORD2>
- <KEYWORD2>var</KEYWORD2>
- <KEYWORD2>viaddversionkey</KEYWORD2>
- <KEYWORD2>videscription</KEYWORD2>
- <KEYWORD2>vicompanyname</KEYWORD2>
- <KEYWORD2>vicomments</KEYWORD2>
- <KEYWORD2>vilegalcopyrights</KEYWORD2>
- <KEYWORD2>vilegaltrademarks</KEYWORD2>
- <KEYWORD2>viproductname</KEYWORD2>
- <KEYWORD2>viproductversion</KEYWORD2>
- <KEYWORD2>windowicon</KEYWORD2>
- <KEYWORD2>writeinistr</KEYWORD2>
- <KEYWORD2>writeregbin</KEYWORD2>
- <KEYWORD2>writeregdword</KEYWORD2>
- <KEYWORD2>writeregexpandstr</KEYWORD2>
- <KEYWORD2>writeregstr</KEYWORD2>
- <KEYWORD2>writeuninstaller</KEYWORD2>
- <KEYWORD2>xpstyle</KEYWORD2>
-
- <!-- Flow control instructions -->
- <KEYWORD1>abort</KEYWORD1>
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>clearerrors</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>ifabort</KEYWORD1>
- <KEYWORD1>iferrors</KEYWORD1>
- <KEYWORD1>iffileexists</KEYWORD1>
- <KEYWORD1>ifrebootflag</KEYWORD1>
- <KEYWORD1>intcmp</KEYWORD1>
- <KEYWORD1>intcmpu</KEYWORD1>
- <KEYWORD1>iswindow</KEYWORD1>
- <KEYWORD1>messagebox</KEYWORD1>
- <KEYWORD1>reboot</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>quit</KEYWORD1>
- <KEYWORD1>seterrors</KEYWORD1>
- <KEYWORD1>strcmp</KEYWORD1>
-
- <!-- Callback functions -->
- <KEYWORD3>.onguiinit</KEYWORD3>
- <KEYWORD3>.oninit</KEYWORD3>
- <KEYWORD3>.oninstfailed</KEYWORD3>
- <KEYWORD3>.oninstsuccess</KEYWORD3>
- <KEYWORD3>.onmouseoversection</KEYWORD3>
- <KEYWORD3>.onselchange</KEYWORD3>
- <KEYWORD3>.onuserabort</KEYWORD3>
- <KEYWORD3>.onverifyinstdir</KEYWORD3>
- <KEYWORD3>un.onguiinit</KEYWORD3>
- <KEYWORD3>un.oninit</KEYWORD3>
- <KEYWORD3>un.onuninstfailed</KEYWORD3>
- <KEYWORD3>un.onuninstsuccess</KEYWORD3>
- <KEYWORD3>un.onuserabort</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="NSIS_LITERAL" ESCAPE="$\" DEFAULT="LITERAL1" NO_WORD_SEP="-{}_">
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+Nullsoft Scriptable Installation System mode by Ryan Grove 2003
+Updated by Uwe Stöhr (donovaly at users.sourceforge.net) 2007
+Updated for 4.3pre9 by Alan Ezust 2007
+$Id: nsis2.xml 18011 2010-06-08 04:25:19Z ezust $
+
+This file should be accurate as of the version of NSIS 2.30. If I've left something out, please let me know.
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ <PROPERTY NAME="indentNextLine" VALUE="\s*(.*:|(function\s+.*)|(section\s+.*)|(subsection\s+.*))" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" DEFAULT="NULL">
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD3">$</MARK_FOLLOWING>
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">::</MARK_PREVIOUS>
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="NSIS_LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="NSIS_LITERAL">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="NSIS_LITERAL">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <!-- Deprecated stuff -->
+ <INVALID>dim</INVALID>
+ <INVALID>uninstallexename</INVALID>
+
+ <!-- Global variables -->
+ <KEYWORD3>$0</KEYWORD3>
+ <KEYWORD3>$1</KEYWORD3>
+ <KEYWORD3>$2</KEYWORD3>
+ <KEYWORD3>$3</KEYWORD3>
+ <KEYWORD3>$4</KEYWORD3>
+ <KEYWORD3>$5</KEYWORD3>
+ <KEYWORD3>$6</KEYWORD3>
+ <KEYWORD3>$7</KEYWORD3>
+ <KEYWORD3>$8</KEYWORD3>
+ <KEYWORD3>$9</KEYWORD3>
+ <KEYWORD3>$INSTDIR</KEYWORD3>
+ <KEYWORD3>$OUTDIR</KEYWORD3>
+ <KEYWORD3>$CMDLINE</KEYWORD3>
+ <KEYWORD3>$LANGUAGE</KEYWORD3>
+
+ <!-- Local variables -->
+ <KEYWORD3>$R0</KEYWORD3>
+ <KEYWORD3>$R1</KEYWORD3>
+ <KEYWORD3>$R2</KEYWORD3>
+ <KEYWORD3>$R3</KEYWORD3>
+ <KEYWORD3>$R4</KEYWORD3>
+ <KEYWORD3>$R5</KEYWORD3>
+ <KEYWORD3>$R6</KEYWORD3>
+ <KEYWORD3>$R7</KEYWORD3>
+ <KEYWORD3>$R8</KEYWORD3>
+ <KEYWORD3>$R9</KEYWORD3>
+
+ <!-- Constants -->
+ <LITERAL3>ARCHIVE</LITERAL3>
+ <LITERAL3>CENTER</LITERAL3>
+ <LITERAL3>CONTROL</LITERAL3>
+ <LITERAL3>CUR</LITERAL3>
+ <LITERAL3>EXT</LITERAL3>
+ <LITERAL3>F1</LITERAL3>
+ <LITERAL3>F2</LITERAL3>
+ <LITERAL3>F3</LITERAL3>
+ <LITERAL3>F4</LITERAL3>
+ <LITERAL3>F5</LITERAL3>
+ <LITERAL3>F6</LITERAL3>
+ <LITERAL3>F7</LITERAL3>
+ <LITERAL3>F8</LITERAL3>
+ <LITERAL3>F9</LITERAL3>
+ <LITERAL3>F10</LITERAL3>
+ <LITERAL3>F11</LITERAL3>
+ <LITERAL3>F12</LITERAL3>
+ <LITERAL3>F13</LITERAL3>
+ <LITERAL3>F14</LITERAL3>
+ <LITERAL3>F15</LITERAL3>
+ <LITERAL3>F16</LITERAL3>
+ <LITERAL3>F17</LITERAL3>
+ <LITERAL3>F18</LITERAL3>
+ <LITERAL3>F19</LITERAL3>
+ <LITERAL3>F20</LITERAL3>
+ <LITERAL3>F21</LITERAL3>
+ <LITERAL3>F22</LITERAL3>
+ <LITERAL3>F23</LITERAL3>
+ <LITERAL3>F24</LITERAL3>
+ <LITERAL3>FILE_ATTRIBUTE_ARCHIVE</LITERAL3>
+ <LITERAL3>MB_ABORTRETRYIGNORE</LITERAL3>
+ <LITERAL3>RIGHT</LITERAL3>
+ <LITERAL3>RO</LITERAL3>
+ <LITERAL3>SET</LITERAL3>
+ <LITERAL3>SHIFT</LITERAL3>
+ <LITERAL3>SW_SHOWMAXIMIZED</LITERAL3>
+ <LITERAL3>SW_SHOWMINIMIZED</LITERAL3>
+ <LITERAL3>SW_SHOWNORMAL</LITERAL3>
+ <LITERAL3>a</LITERAL3>
+ <LITERAL3>admin</LITERAL3>
+ <LITERAL3>all</LITERAL3>
+ <LITERAL3>alwaysoff</LITERAL3>
+ <LITERAL3>auto</LITERAL3>
+ <LITERAL3>both</LITERAL3>
+ <LITERAL3>bottom</LITERAL3>
+ <LITERAL3>bzip2</LITERAL3>
+ <LITERAL3>checkbox</LITERAL3>
+ <LITERAL3>colored</LITERAL3>
+ <LITERAL3>components</LITERAL3>
+ <LITERAL3>current</LITERAL3>
+ <LITERAL3>custom</LITERAL3>
+ <LITERAL3>directory</LITERAL3>
+ <LITERAL3>false</LITERAL3>
+ <LITERAL3>force</LITERAL3>
+ <LITERAL3>hide</LITERAL3>
+ <LITERAL3>highest</LITERAL3>
+ <LITERAL3>ifnewer</LITERAL3>
+ <LITERAL3>instfiles</LITERAL3>
+ <LITERAL3>license</LITERAL3>
+ <LITERAL3>listonly</LITERAL3>
+ <LITERAL3>manual</LITERAL3>
+ <LITERAL3>nevershow</LITERAL3>
+ <LITERAL3>none</LITERAL3>
+ <LITERAL3>off</LITERAL3>
+ <LITERAL3>on</LITERAL3>
+ <LITERAL3>r</LITERAL3>
+ <LITERAL3>radiobuttons</LITERAL3>
+ <LITERAL3>show</LITERAL3>
+ <LITERAL3>silent</LITERAL3>
+ <LITERAL3>silentlog</LITERAL3>
+ <LITERAL3>smooth</LITERAL3>
+ <LITERAL3>textonly</LITERAL3>
+ <LITERAL3>top</LITERAL3>
+ <LITERAL3>true</LITERAL3>
+ <LITERAL3>try</LITERAL3>
+ <LITERAL3>uninstConfirm</LITERAL3>
+ <LITERAL3>user</LITERAL3>
+ <LITERAL3>w</LITERAL3>
+ <LITERAL3>zlib</LITERAL3>
+ <LITERAL3>$$</LITERAL3>
+ <LITERAL3>$DESKTOP</LITERAL3>
+ <LITERAL3>$EXEDIR</LITERAL3>
+ <LITERAL3>$HWNDPARENT</LITERAL3>
+ <LITERAL3>$PLUGINSDIR</LITERAL3>
+ <LITERAL3>$PROGRAMFILES</LITERAL3>
+ <LITERAL3>$QUICKLAUNCH</LITERAL3>
+ <LITERAL3>$SMPROGRAMS</LITERAL3>
+ <LITERAL3>$SMSTARTUP</LITERAL3>
+ <LITERAL3>$STARTMENU</LITERAL3>
+ <LITERAL3>$SYSDIR</LITERAL3>
+ <LITERAL3>$TEMP</LITERAL3>
+ <LITERAL3>$WINDIR</LITERAL3>
+ <LITERAL3>$\n</LITERAL3>
+ <LITERAL3>$\r</LITERAL3>
+ <LITERAL3>${NSISDIR}</LITERAL3>
+ <LITERAL3>ALT</LITERAL3>
+ <LITERAL3>END</LITERAL3>
+ <LITERAL3>FILE_ATTRIBUTE_HIDDEN</LITERAL3>
+ <LITERAL3>FILE_ATTRIBUTE_NORMAL</LITERAL3>
+ <LITERAL3>FILE_ATTRIBUTE_OFFLINE</LITERAL3>
+ <LITERAL3>FILE_ATTRIBUTE_READONLY</LITERAL3>
+ <LITERAL3>FILE_ATTRIBUTE_SYSTEM</LITERAL3>
+ <LITERAL3>FILE_ATTRIBUTE_TEMPORARY</LITERAL3>
+ <LITERAL3>HIDDEN</LITERAL3>
+ <LITERAL3>HKCC</LITERAL3>
+ <LITERAL3>HKCR</LITERAL3>
+ <LITERAL3>HKCU</LITERAL3>
+ <LITERAL3>HKDD</LITERAL3>
+ <LITERAL3>HKLM</LITERAL3>
+ <LITERAL3>HKPD</LITERAL3>
+ <LITERAL3>HKU</LITERAL3>
+ <LITERAL3>SHCTX</LITERAL3>
+ <LITERAL3>IDABORT</LITERAL3>
+ <LITERAL3>IDCANCEL</LITERAL3>
+ <LITERAL3>IDIGNORE</LITERAL3>
+ <LITERAL3>IDNO</LITERAL3>
+ <LITERAL3>IDOK</LITERAL3>
+ <LITERAL3>IDRETRY</LITERAL3>
+ <LITERAL3>IDYES</LITERAL3>
+ <LITERAL3>LEFT</LITERAL3>
+ <LITERAL3>MB_DEFBUTTON1</LITERAL3>
+ <LITERAL3>MB_DEFBUTTON2</LITERAL3>
+ <LITERAL3>MB_DEFBUTTON3</LITERAL3>
+ <LITERAL3>MB_DEFBUTTON4</LITERAL3>
+ <LITERAL3>MB_ICONEXCLAMATION</LITERAL3>
+ <LITERAL3>MB_ICONINFORMATION</LITERAL3>
+ <LITERAL3>MB_ICONQUESTION</LITERAL3>
+ <LITERAL3>MB_ICONSTOP</LITERAL3>
+ <LITERAL3>MB_OK</LITERAL3>
+ <LITERAL3>MB_OKCANCEL</LITERAL3>
+ <LITERAL3>MB_RETRYCANCEL</LITERAL3>
+ <LITERAL3>MB_RIGHT</LITERAL3>
+ <LITERAL3>MB_SETFOREGROUND</LITERAL3>
+ <LITERAL3>MB_TOPMOST</LITERAL3>
+ <LITERAL3>MB_YESNO</LITERAL3>
+ <LITERAL3>MB_YESNOCANCEL</LITERAL3>
+ <LITERAL3>NORMAL</LITERAL3>
+ <LITERAL3>OFFLINE</LITERAL3>
+ <LITERAL3>READONLY</LITERAL3>
+ <LITERAL3>SYSTEM</LITERAL3>
+ <LITERAL3>TEMPORARY</LITERAL3>
+
+ <!-- Command flags -->
+ <KEYWORD4>/0</KEYWORD4>
+ <KEYWORD4>/COMPONENTSONLYONCUSTOM</KEYWORD4>
+ <KEYWORD4>/CUSTOMSTRING</KEYWORD4>
+ <KEYWORD4>/FILESONLY</KEYWORD4>
+ <KEYWORD4>/IMGID</KEYWORD4>
+ <KEYWORD4>/ITALIC</KEYWORD4>
+ <KEYWORD4>/LANG</KEYWORD4>
+ <KEYWORD4>/NOCUSTOM</KEYWORD4>
+ <KEYWORD4>/NOUNLOAD</KEYWORD4>
+ <KEYWORD4>/REBOOTOK</KEYWORD4>
+ <KEYWORD4>/RESIZETOFIT</KEYWORD4>
+ <KEYWORD4>/RTL</KEYWORD4>
+ <KEYWORD4>/SHORT</KEYWORD4>
+ <KEYWORD4>/SILENT</KEYWORD4>
+ <KEYWORD4>/STRIKE</KEYWORD4>
+ <KEYWORD4>/TIMEOUT</KEYWORD4>
+ <KEYWORD4>/TRIM</KEYWORD4>
+ <KEYWORD4>/UNDERLINE</KEYWORD4>
+ <KEYWORD4>/a</KEYWORD4>
+ <KEYWORD4>/e</KEYWORD4>
+ <KEYWORD4>/ifempty</KEYWORD4>
+ <KEYWORD4>/nonfatal</KEYWORD4>
+ <KEYWORD4>/oname</KEYWORD4>
+ <KEYWORD4>/r</KEYWORD4>
+ <KEYWORD4>/windows</KEYWORD4>
+
+ <!-- Compiler utility commands -->
+ <KEYWORD2>!addincludedir</KEYWORD2>
+ <KEYWORD2>!addplugindir</KEYWORD2>
+ <KEYWORD2>!define</KEYWORD2>
+ <KEYWORD2>!include</KEYWORD2>
+ <KEYWORD2>!cd</KEYWORD2>
+ <KEYWORD2>!echo</KEYWORD2>
+ <KEYWORD2>!error</KEYWORD2>
+ <KEYWORD2>!insertmacro</KEYWORD2>
+ <KEYWORD2>!packhdr</KEYWORD2>
+ <KEYWORD2>!system</KEYWORD2>
+ <KEYWORD2>!warning</KEYWORD2>
+ <KEYWORD2>!undef</KEYWORD2>
+ <KEYWORD2>!verbose</KEYWORD2>
+
+ <!-- Conditional compilation -->
+ <KEYWORD1>!ifdef</KEYWORD1>
+ <KEYWORD1>!ifndef</KEYWORD1>
+ <KEYWORD1>!if</KEYWORD1>
+ <KEYWORD1>!else</KEYWORD1>
+ <KEYWORD1>!endif</KEYWORD1>
+ <KEYWORD1>!macro</KEYWORD1>
+ <KEYWORD1>!macroend</KEYWORD1>
+
+ <!-- Keywords -->
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>functionend</KEYWORD1>
+ <KEYWORD1>section</KEYWORD1>
+ <KEYWORD1>sectionend</KEYWORD1>
+ <KEYWORD1>subsection</KEYWORD1>
+ <KEYWORD1>subsectionend</KEYWORD1>
+
+ <!-- Instructions -->
+ <KEYWORD2>addbrandingimage</KEYWORD2>
+ <KEYWORD2>addsize</KEYWORD2>
+ <KEYWORD2>allowrootdirinstall</KEYWORD2>
+ <KEYWORD2>allowskipfiles</KEYWORD2>
+ <KEYWORD2>autoclosewindow</KEYWORD2>
+ <KEYWORD2>bggradient</KEYWORD2>
+ <KEYWORD2>brandingtext</KEYWORD2>
+ <KEYWORD2>bringtofront</KEYWORD2>
+ <KEYWORD2>callinstdll</KEYWORD2>
+ <KEYWORD2>caption</KEYWORD2>
+ <KEYWORD2>changeui</KEYWORD2>
+ <KEYWORD2>checkbitmap</KEYWORD2>
+ <KEYWORD2>completedtext</KEYWORD2>
+ <KEYWORD2>componenttext</KEYWORD2>
+ <KEYWORD2>copyfiles</KEYWORD2>
+ <KEYWORD2>crccheck</KEYWORD2>
+ <KEYWORD2>createdirectory</KEYWORD2>
+ <KEYWORD2>createfont</KEYWORD2>
+ <KEYWORD2>createshortcut</KEYWORD2>
+ <KEYWORD2>delete</KEYWORD2>
+ <KEYWORD2>deleteinisec</KEYWORD2>
+ <KEYWORD2>deleteinistr</KEYWORD2>
+ <KEYWORD2>deleteregkey</KEYWORD2>
+ <KEYWORD2>deleteregvalue</KEYWORD2>
+ <KEYWORD2>detailprint</KEYWORD2>
+ <KEYWORD2>detailsbuttontext</KEYWORD2>
+ <KEYWORD2>dirshow</KEYWORD2>
+ <KEYWORD2>dirtext</KEYWORD2>
+ <KEYWORD2>enumregkey</KEYWORD2>
+ <KEYWORD2>enumregvalue</KEYWORD2>
+ <KEYWORD2>exch</KEYWORD2>
+ <KEYWORD2>exec</KEYWORD2>
+ <KEYWORD2>execshell</KEYWORD2>
+ <KEYWORD2>execwait</KEYWORD2>
+ <KEYWORD2>expandenvstrings</KEYWORD2>
+ <KEYWORD2>file</KEYWORD2>
+ <KEYWORD2>fileclose</KEYWORD2>
+ <KEYWORD2>fileerrortext</KEYWORD2>
+ <KEYWORD2>fileopen</KEYWORD2>
+ <KEYWORD2>fileread</KEYWORD2>
+ <KEYWORD2>filereadbyte</KEYWORD2>
+ <KEYWORD2>fileseek</KEYWORD2>
+ <KEYWORD2>filewrite</KEYWORD2>
+ <KEYWORD2>filewritebyte</KEYWORD2>
+ <KEYWORD2>findclose</KEYWORD2>
+ <KEYWORD2>findfirst</KEYWORD2>
+ <KEYWORD2>findnext</KEYWORD2>
+ <KEYWORD2>findwindow</KEYWORD2>
+ <KEYWORD2>flushini</KEYWORD2>
+ <KEYWORD2>getcurinsttype</KEYWORD2>
+ <KEYWORD2>getcurrentaddress</KEYWORD2>
+ <KEYWORD2>getdlgitem</KEYWORD2>
+ <KEYWORD2>getdllversion</KEYWORD2>
+ <KEYWORD2>getdllversionlocal</KEYWORD2>
+ <KEYWORD2>getfiletime</KEYWORD2>
+ <KEYWORD2>getfiletimelocal</KEYWORD2>
+ <KEYWORD2>getfullpathname</KEYWORD2>
+ <KEYWORD2>getfunctionaddress</KEYWORD2>
+ <KEYWORD2>getlabeladdress</KEYWORD2>
+ <KEYWORD2>gettempfilename</KEYWORD2>
+ <KEYWORD2>getwindowtext</KEYWORD2>
+ <KEYWORD2>hidewindow</KEYWORD2>
+ <KEYWORD2>icon</KEYWORD2>
+ <KEYWORD2>initpluginsdir</KEYWORD2>
+ <KEYWORD2>installbuttontext</KEYWORD2>
+ <KEYWORD2>installcolors</KEYWORD2>
+ <KEYWORD2>installdir</KEYWORD2>
+ <KEYWORD2>installdirregkey</KEYWORD2>
+ <KEYWORD2>instprogressflags</KEYWORD2>
+ <KEYWORD2>insttype</KEYWORD2>
+ <KEYWORD2>insttypegettext</KEYWORD2>
+ <KEYWORD2>insttypesettext</KEYWORD2>
+ <KEYWORD2>intfmt</KEYWORD2>
+ <KEYWORD2>intop</KEYWORD2>
+ <KEYWORD2>langstring</KEYWORD2>
+ <KEYWORD2>langstringup</KEYWORD2>
+ <KEYWORD2>licensebkcolor</KEYWORD2>
+ <KEYWORD2>licensedata</KEYWORD2>
+ <KEYWORD2>licenseforceselection</KEYWORD2>
+ <KEYWORD2>licensetext</KEYWORD2>
+ <KEYWORD2>loadlanguagefile</KEYWORD2>
+ <KEYWORD2>loadlanguagefile</KEYWORD2>
+ <KEYWORD2>logset</KEYWORD2>
+ <KEYWORD2>logtext</KEYWORD2>
+ <KEYWORD2>miscbuttontext</KEYWORD2>
+ <KEYWORD2>name</KEYWORD2>
+ <KEYWORD2>nop</KEYWORD2>
+ <KEYWORD2>outfile</KEYWORD2>
+ <KEYWORD2>page</KEYWORD2>
+ <KEYWORD2>plugindir</KEYWORD2>
+ <KEYWORD2>pop</KEYWORD2>
+ <KEYWORD2>push</KEYWORD2>
+ <KEYWORD2>readenvstr</KEYWORD2>
+ <KEYWORD2>readinistr</KEYWORD2>
+ <KEYWORD2>readregdword</KEYWORD2>
+ <KEYWORD2>readregstr</KEYWORD2>
+ <KEYWORD2>regdll</KEYWORD2>
+ <KEYWORD2>rename</KEYWORD2>
+ <KEYWORD2>requestexecutionlevel</KEYWORD2>
+ <KEYWORD2>reservefile</KEYWORD2>
+ <KEYWORD2>rmdir</KEYWORD2>
+ <KEYWORD2>searchpath</KEYWORD2>
+ <KEYWORD2>sectiongetflags</KEYWORD2>
+ <KEYWORD2>sectiongetinsttypes</KEYWORD2>
+ <KEYWORD2>sectiongetsize</KEYWORD2>
+ <KEYWORD2>sectiongettext</KEYWORD2>
+ <KEYWORD2>sectionin</KEYWORD2>
+ <KEYWORD2>sectionsetflags</KEYWORD2>
+ <KEYWORD2>sectionsetinsttypes</KEYWORD2>
+ <KEYWORD2>sectionsetsize</KEYWORD2>
+ <KEYWORD2>sectionsettext</KEYWORD2>
+ <KEYWORD2>sendmessage</KEYWORD2>
+ <KEYWORD2>setautoclose</KEYWORD2>
+ <KEYWORD2>setbkcolor</KEYWORD2>
+ <KEYWORD2>setbrandingimage</KEYWORD2>
+ <KEYWORD2>setcompress</KEYWORD2>
+ <KEYWORD2>setcompressor</KEYWORD2>
+ <KEYWORD2>setcurinsttype</KEYWORD2>
+ <KEYWORD2>setdatablockoptimize</KEYWORD2>
+ <KEYWORD2>setdatesave</KEYWORD2>
+ <KEYWORD2>setdetailsprint</KEYWORD2>
+ <KEYWORD2>setdetailsview</KEYWORD2>
+ <KEYWORD2>setfileattributes</KEYWORD2>
+ <KEYWORD2>setfont</KEYWORD2>
+ <KEYWORD2>setoutpath</KEYWORD2>
+ <KEYWORD2>setoverwrite</KEYWORD2>
+ <KEYWORD2>setpluginunload</KEYWORD2>
+ <KEYWORD2>setrebootflag</KEYWORD2>
+ <KEYWORD2>setshellvarcontext</KEYWORD2>
+ <KEYWORD2>setstaticbkcolor</KEYWORD2>
+ <KEYWORD2>setwindowlong</KEYWORD2>
+ <KEYWORD2>showinstdetails</KEYWORD2>
+ <KEYWORD2>showuninstdetails</KEYWORD2>
+ <KEYWORD2>showwindow</KEYWORD2>
+ <KEYWORD2>silentinstall</KEYWORD2>
+ <KEYWORD2>silentuninstall</KEYWORD2>
+ <KEYWORD2>sleep</KEYWORD2>
+ <KEYWORD2>spacetexts</KEYWORD2>
+ <KEYWORD2>strcpy</KEYWORD2>
+ <KEYWORD2>strlen</KEYWORD2>
+ <KEYWORD2>subcaption</KEYWORD2>
+ <KEYWORD2>uninstallbuttontext</KEYWORD2>
+ <KEYWORD2>uninstallcaption</KEYWORD2>
+ <KEYWORD2>uninstallicon</KEYWORD2>
+ <KEYWORD2>uninstallsubcaption</KEYWORD2>
+ <KEYWORD2>uninstalltext</KEYWORD2>
+ <KEYWORD2>uninstpage</KEYWORD2>
+ <KEYWORD2>unregdll</KEYWORD2>
+ <KEYWORD2>var</KEYWORD2>
+ <KEYWORD2>viaddversionkey</KEYWORD2>
+ <KEYWORD2>videscription</KEYWORD2>
+ <KEYWORD2>vicompanyname</KEYWORD2>
+ <KEYWORD2>vicomments</KEYWORD2>
+ <KEYWORD2>vilegalcopyrights</KEYWORD2>
+ <KEYWORD2>vilegaltrademarks</KEYWORD2>
+ <KEYWORD2>viproductname</KEYWORD2>
+ <KEYWORD2>viproductversion</KEYWORD2>
+ <KEYWORD2>windowicon</KEYWORD2>
+ <KEYWORD2>writeinistr</KEYWORD2>
+ <KEYWORD2>writeregbin</KEYWORD2>
+ <KEYWORD2>writeregdword</KEYWORD2>
+ <KEYWORD2>writeregexpandstr</KEYWORD2>
+ <KEYWORD2>writeregstr</KEYWORD2>
+ <KEYWORD2>writeuninstaller</KEYWORD2>
+ <KEYWORD2>xpstyle</KEYWORD2>
+
+ <!-- Flow control instructions -->
+ <KEYWORD1>abort</KEYWORD1>
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>clearerrors</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>ifabort</KEYWORD1>
+ <KEYWORD1>iferrors</KEYWORD1>
+ <KEYWORD1>iffileexists</KEYWORD1>
+ <KEYWORD1>ifrebootflag</KEYWORD1>
+ <KEYWORD1>intcmp</KEYWORD1>
+ <KEYWORD1>intcmpu</KEYWORD1>
+ <KEYWORD1>iswindow</KEYWORD1>
+ <KEYWORD1>messagebox</KEYWORD1>
+ <KEYWORD1>reboot</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>quit</KEYWORD1>
+ <KEYWORD1>seterrors</KEYWORD1>
+ <KEYWORD1>strcmp</KEYWORD1>
+ <KEYWORD1>strcmps</KEYWORD1>
+
+ <!-- Callback functions -->
+ <KEYWORD3>.onguiinit</KEYWORD3>
+ <KEYWORD3>.oninit</KEYWORD3>
+ <KEYWORD3>.oninstfailed</KEYWORD3>
+ <KEYWORD3>.oninstsuccess</KEYWORD3>
+ <KEYWORD3>.onmouseoversection</KEYWORD3>
+ <KEYWORD3>.onselchange</KEYWORD3>
+ <KEYWORD3>.onuserabort</KEYWORD3>
+ <KEYWORD3>.onverifyinstdir</KEYWORD3>
+ <KEYWORD3>un.onguiinit</KEYWORD3>
+ <KEYWORD3>un.oninit</KEYWORD3>
+ <KEYWORD3>un.onuninstfailed</KEYWORD3>
+ <KEYWORD3>un.onuninstsuccess</KEYWORD3>
+ <KEYWORD3>un.onuserabort</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="NSIS_LITERAL" ESCAPE="$\" DEFAULT="LITERAL1" NO_WORD_SEP="-{}_">
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/objective-c.xml b/jEdit/modes/objective-c.xml
index 6936381..3e7c230 100644
--- a/jEdit/modes/objective-c.xml
+++ b/jEdit/modes/objective-c.xml
@@ -1,119 +1,119 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Extension of c.xml to handle Objective-C keywords. -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^.*(default:\s*|case.*:.*)$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- </PROPS>
-
- <RULES
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <EOL_SPAN TYPE="KEYWORD2" AT_WHITESPACE_END="TRUE" DELEGATE="CPP">#</EOL_SPAN>
-
- <IMPORT DELEGATE="c::LEX"/>
- <IMPORT DELEGATE="c::CORE"/>
- <IMPORT DELEGATE="CORE"/>
- </RULES>
-
- <!-- Core language -->
- <RULES SET="CORE"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <KEYWORDS>
- <!-- Types (Objective C) -->
- <KEYWORD3>id</KEYWORD3>
- <KEYWORD3>Class</KEYWORD3>
- <KEYWORD3>SEL</KEYWORD3>
- <KEYWORD3>IMP</KEYWORD3>
- <KEYWORD3>BOOL</KEYWORD3>
-
- <!-- Keywords (Objective C) -->
- <KEYWORD1>oneway</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>inout</KEYWORD1>
- <KEYWORD1>bycopy</KEYWORD1>
- <KEYWORD1>byref</KEYWORD1>
- <KEYWORD1>self</KEYWORD1>
- <KEYWORD1>super</KEYWORD1>
-
- <!-- Preprocessor Directives (Objective C)-->
- <KEYWORD1>@interface</KEYWORD1>
- <KEYWORD1>@implementation</KEYWORD1>
- <KEYWORD1>@protocol</KEYWORD1>
- <KEYWORD1>@end</KEYWORD1>
- <KEYWORD1>@private</KEYWORD1>
- <KEYWORD1>@protected</KEYWORD1>
- <KEYWORD1>@public</KEYWORD1>
- <KEYWORD1>@class</KEYWORD1>
- <KEYWORD1>@selector</KEYWORD1>
- <KEYWORD1>@endcode</KEYWORD1>
- <KEYWORD1>@defs</KEYWORD1>
-
- <LITERAL2>TRUE</LITERAL2>
- <LITERAL2>FALSE</LITERAL2>
- <LITERAL2>YES</LITERAL2>
- <LITERAL2>NO</LITERAL2>
- <LITERAL2>NULL</LITERAL2>
- <LITERAL2>nil</LITERAL2>
- <LITERAL2>Nil</LITERAL2>
- </KEYWORDS>
- </RULES>
-
- <!-- Preprocessor specific rules -->
- <RULES SET="CPP"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
-
- <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="c::INCLUDE">include\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="import" TYPE="MARKUP" DELEGATE="c::INCLUDE">import\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="c::LEX">endif\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="c::CONDITION">elif\b</EOL_SPAN_REGEXP>
- <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="c::CONDITION">if\b</EOL_SPAN_REGEXP>
-
- <IMPORT DELEGATE="LEX"/>
-
- <!-- Directives -->
- <KEYWORDS>
- <MARKUP>ifdef</MARKUP>
- <MARKUP>ifndef</MARKUP>
- <MARKUP>else</MARKUP>
- <MARKUP>error</MARKUP>
- <MARKUP>line</MARKUP>
- <MARKUP>pragma</MARKUP>
- <MARKUP>undef</MARKUP>
- <MARKUP>warning</MARKUP>
- </KEYWORDS>
- </RULES>
-
- <!-- After #define directive -->
- <!-- Almost same as the normal code,
- except two additional operators # and ##. -->
- <RULES SET="DEFINE"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
- <SEQ TYPE="OPERATOR">#</SEQ>
- <IMPORT DELEGATE="c::LEX"/>
- <IMPORT DELEGATE="c::CORE"/>
- <IMPORT DELEGATE="CORE"/>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Extension of c.xml to handle Objective-C keywords. -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^.*(default:\s*|case.*:.*)$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+
+ <RULES
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <EOL_SPAN TYPE="KEYWORD2" AT_WHITESPACE_END="TRUE" DELEGATE="CPP">#</EOL_SPAN>
+
+ <IMPORT DELEGATE="c::LEX"/>
+ <IMPORT DELEGATE="c::CORE"/>
+ <IMPORT DELEGATE="CORE"/>
+ </RULES>
+
+ <!-- Core language -->
+ <RULES SET="CORE"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <KEYWORDS>
+ <!-- Types (Objective C) -->
+ <KEYWORD3>id</KEYWORD3>
+ <KEYWORD3>Class</KEYWORD3>
+ <KEYWORD3>SEL</KEYWORD3>
+ <KEYWORD3>IMP</KEYWORD3>
+ <KEYWORD3>BOOL</KEYWORD3>
+
+ <!-- Keywords (Objective C) -->
+ <KEYWORD1>oneway</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+ <KEYWORD1>inout</KEYWORD1>
+ <KEYWORD1>bycopy</KEYWORD1>
+ <KEYWORD1>byref</KEYWORD1>
+ <KEYWORD1>self</KEYWORD1>
+ <KEYWORD1>super</KEYWORD1>
+
+ <!-- Preprocessor Directives (Objective C)-->
+ <KEYWORD1>@interface</KEYWORD1>
+ <KEYWORD1>@implementation</KEYWORD1>
+ <KEYWORD1>@protocol</KEYWORD1>
+ <KEYWORD1>@end</KEYWORD1>
+ <KEYWORD1>@private</KEYWORD1>
+ <KEYWORD1>@protected</KEYWORD1>
+ <KEYWORD1>@public</KEYWORD1>
+ <KEYWORD1>@class</KEYWORD1>
+ <KEYWORD1>@selector</KEYWORD1>
+ <KEYWORD1>@endcode</KEYWORD1>
+ <KEYWORD1>@defs</KEYWORD1>
+
+ <LITERAL2>TRUE</LITERAL2>
+ <LITERAL2>FALSE</LITERAL2>
+ <LITERAL2>YES</LITERAL2>
+ <LITERAL2>NO</LITERAL2>
+ <LITERAL2>NULL</LITERAL2>
+ <LITERAL2>nil</LITERAL2>
+ <LITERAL2>Nil</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- Preprocessor specific rules -->
+ <RULES SET="CPP"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+
+ <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="c::INCLUDE">include\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="import" TYPE="MARKUP" DELEGATE="c::INCLUDE">import\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="c::LEX">endif\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="c::CONDITION">elif\b</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="c::CONDITION">if\b</EOL_SPAN_REGEXP>
+
+ <IMPORT DELEGATE="LEX"/>
+
+ <!-- Directives -->
+ <KEYWORDS>
+ <MARKUP>ifdef</MARKUP>
+ <MARKUP>ifndef</MARKUP>
+ <MARKUP>else</MARKUP>
+ <MARKUP>error</MARKUP>
+ <MARKUP>line</MARKUP>
+ <MARKUP>pragma</MARKUP>
+ <MARKUP>undef</MARKUP>
+ <MARKUP>warning</MARKUP>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- After #define directive -->
+ <!-- Almost same as the normal code,
+ except two additional operators # and ##. -->
+ <RULES SET="DEFINE"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <IMPORT DELEGATE="c::LEX"/>
+ <IMPORT DELEGATE="c::CORE"/>
+ <IMPORT DELEGATE="CORE"/>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/objectrexx.xml b/jEdit/modes/objectrexx.xml
index ef8b833..fae5fd7 100644
--- a/jEdit/modes/objectrexx.xml
+++ b/jEdit/modes/objectrexx.xml
@@ -1,245 +1,245 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentNextLines"
- VALUE="\s*(if|loop|do|else|select|otherwise|catch|finally|class|method|properties)(.*)"/>
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
-
- <!-- C style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- preprocessor statements -->
- <EOL_SPAN TYPE="KEYWORD2">#</EOL_SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
-
- <MARK_PREVIOUS TYPE="FUNCTION">::</MARK_PREVIOUS>
-
- <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
- MATCH_TYPE="OPERATOR"
- TYPE="LABEL">:</MARK_PREVIOUS>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>Address</KEYWORD1>
- <KEYWORD1>Arg</KEYWORD1>
- <KEYWORD1>Call</KEYWORD1>
- <KEYWORD1>Do</KEYWORD1>
- <KEYWORD1>Drop</KEYWORD1>
- <KEYWORD1>Exit</KEYWORD1>
- <KEYWORD1>Expose</KEYWORD1>
- <KEYWORD1>Forward</KEYWORD1>
- <KEYWORD1>Guard</KEYWORD1>
- <KEYWORD1>If</KEYWORD1>
- <KEYWORD1>Interpret</KEYWORD1>
- <KEYWORD1>Iterate</KEYWORD1>
- <KEYWORD1>Leave</KEYWORD1>
- <KEYWORD1>Nop</KEYWORD1>
- <KEYWORD1>Numeric</KEYWORD1>
- <KEYWORD1>Parse</KEYWORD1>
- <KEYWORD1>Procedure</KEYWORD1>
- <KEYWORD1>pull</KEYWORD1>
- <KEYWORD1>Push</KEYWORD1>
- <KEYWORD1>Queue</KEYWORD1>
- <KEYWORD1>Raise</KEYWORD1>
- <KEYWORD1>reply</KEYWORD1>
- <KEYWORD1>Return</KEYWORD1>
- <KEYWORD1>Say</KEYWORD1>
- <KEYWORD1>Seleect</KEYWORD1>
- <KEYWORD1>Signal</KEYWORD1>
- <KEYWORD1>Trace</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
- <KEYWORD1>Class</KEYWORD1>
- <KEYWORD1>Method</KEYWORD1>
- <KEYWORD1>Requires</KEYWORD1>
- <KEYWORD1>Routine</KEYWORD1>
- <KEYWORD1>Result</KEYWORD1>
- <KEYWORD1>RC</KEYWORD1>
- <KEYWORD1>Self</KEYWORD1>
- <KEYWORD1>Sigl</KEYWORD1>
- <KEYWORD1>Super</KEYWORD1>
- <KEYWORD2>Abbrev</KEYWORD2>
- <KEYWORD2>Abs</KEYWORD2>
- <KEYWORD2>Address</KEYWORD2>
- <KEYWORD2>Arg</KEYWORD2>
- <KEYWORD2>Beep</KEYWORD2>
- <KEYWORD2>BitAnd</KEYWORD2>
- <KEYWORD2>BitOr</KEYWORD2>
- <KEYWORD2>BitXor</KEYWORD2>
- <KEYWORD2>B2X</KEYWORD2>
- <KEYWORD2>Center</KEYWORD2>
- <KEYWORD2>ChangeStr</KEYWORD2>
- <KEYWORD2>CharIn</KEYWORD2>
- <KEYWORD2>CharOut</KEYWORD2>
- <KEYWORD2>Chars</KEYWORD2>
- <KEYWORD2>Compare</KEYWORD2>
- <KEYWORD2>Consition</KEYWORD2>
- <KEYWORD2>Copies</KEYWORD2>
- <KEYWORD2>CountStr</KEYWORD2>
- <KEYWORD2>C2D</KEYWORD2>
- <KEYWORD2>C2X</KEYWORD2>
- <KEYWORD2>DataType</KEYWORD2>
- <KEYWORD2>Date</KEYWORD2>
- <KEYWORD2>DelStr</KEYWORD2>
- <KEYWORD2>DelWord</KEYWORD2>
- <KEYWORD2>Digits</KEYWORD2>
- <KEYWORD2>Directory</KEYWORD2>
- <KEYWORD2>D2C</KEYWORD2>
- <KEYWORD2>D2X</KEYWORD2>
- <KEYWORD2>ErrorText</KEYWORD2>
- <KEYWORD2>FileSpec</KEYWORD2>
- <KEYWORD2>Form</KEYWORD2>
- <KEYWORD2>Format</KEYWORD2>
- <KEYWORD2>Fuzz</KEYWORD2>
- <KEYWORD2>Insert</KEYWORD2>
- <KEYWORD2>LastPos</KEYWORD2>
- <KEYWORD2>Left</KEYWORD2>
- <KEYWORD2>Length</KEYWORD2>
- <KEYWORD2>LineIn</KEYWORD2>
- <KEYWORD2>LineOut</KEYWORD2>
- <KEYWORD2>Lines</KEYWORD2>
- <KEYWORD2>Max</KEYWORD2>
- <KEYWORD2>Min</KEYWORD2>
- <KEYWORD2>Overlay</KEYWORD2>
- <KEYWORD2>Pos</KEYWORD2>
- <KEYWORD2>Queued</KEYWORD2>
- <KEYWORD2>Random</KEYWORD2>
- <KEYWORD2>Reverse</KEYWORD2>
- <KEYWORD2>Right</KEYWORD2>
- <KEYWORD2>Sign</KEYWORD2>
- <KEYWORD2>SourceLine</KEYWORD2>
- <KEYWORD2>Space</KEYWORD2>
- <KEYWORD2>Stream</KEYWORD2>
- <KEYWORD2>Strip</KEYWORD2>
- <KEYWORD2>SubStr</KEYWORD2>
- <KEYWORD2>SubWord</KEYWORD2>
- <KEYWORD2>Symbol</KEYWORD2>
- <KEYWORD2>Time</KEYWORD2>
- <KEYWORD2>Trace</KEYWORD2>
- <KEYWORD2>Translate</KEYWORD2>
- <KEYWORD2>Trunc</KEYWORD2>
- <KEYWORD2>Value</KEYWORD2>
- <KEYWORD2>Var</KEYWORD2>
- <KEYWORD2>Verify</KEYWORD2>
- <KEYWORD2>Word</KEYWORD2>
- <KEYWORD2>WordIndex</KEYWORD2>
- <KEYWORD2>WordLength</KEYWORD2>
- <KEYWORD2>WordPos</KEYWORD2>
- <KEYWORD2>Words</KEYWORD2>
- <KEYWORD2>XRange</KEYWORD2>
- <KEYWORD2>X2B</KEYWORD2>
- <KEYWORD2>X2C</KEYWORD2>
- <KEYWORD2>X2D</KEYWORD2>
- <KEYWORD2>RxFuncAdd</KEYWORD2>
- <KEYWORD2>RxFuncDrop</KEYWORD2>
- <KEYWORD2>RxFuncQuery</KEYWORD2>
- <KEYWORD2>RxMessageBox</KEYWORD2>
- <KEYWORD2>RxWinExec</KEYWORD2>
- <KEYWORD2>SysAddRexxMacro</KEYWORD2>
- <KEYWORD2>SysBootDrive</KEYWORD2>
- <KEYWORD2>SysClearRexxMacroSpace</KEYWORD2>
- <KEYWORD2>SysCloseEventSem</KEYWORD2>
- <KEYWORD2>SysCloseMutexSem</KEYWORD2>
- <KEYWORD2>SysCls</KEYWORD2>
- <KEYWORD2>SysCreateEventSem</KEYWORD2>
- <KEYWORD2>SysCreateMutexSem</KEYWORD2>
- <KEYWORD2>SysCurPos</KEYWORD2>
- <KEYWORD2>SysCurState</KEYWORD2>
- <KEYWORD2>SysDriveInfo</KEYWORD2>
- <KEYWORD2>SysDriveMap</KEYWORD2>
- <KEYWORD2>SysDropFuncs</KEYWORD2>
- <KEYWORD2>SysDropRexxMacro</KEYWORD2>
- <KEYWORD2>SysDumpVariables</KEYWORD2>
- <KEYWORD2>SysFileDelete</KEYWORD2>
- <KEYWORD2>SysFileSearch</KEYWORD2>
- <KEYWORD2>SysFileSystemType</KEYWORD2>
- <KEYWORD2>SysFileTree</KEYWORD2>
- <KEYWORD2>SysFromUnicode</KEYWORD2>
- <KEYWORD2>SysToUnicode</KEYWORD2>
- <KEYWORD2>SysGetErrortext</KEYWORD2>
- <KEYWORD2>SysGetFileDateTime</KEYWORD2>
- <KEYWORD2>SysGetKey</KEYWORD2>
- <KEYWORD2>SysIni</KEYWORD2>
- <KEYWORD2>SysLoadFuncs</KEYWORD2>
- <KEYWORD2>SysLoadRexxMacroSpace</KEYWORD2>
- <KEYWORD2>SysMkDir</KEYWORD2>
- <KEYWORD2>SysOpenEventSem</KEYWORD2>
- <KEYWORD2>SysOpenMutexSem</KEYWORD2>
- <KEYWORD2>SysPostEventSem</KEYWORD2>
- <KEYWORD2>SysPulseEventSem</KEYWORD2>
- <KEYWORD2>SysQueryProcess</KEYWORD2>
- <KEYWORD2>SysQueryRexxMacro</KEYWORD2>
- <KEYWORD2>SysReleaseMutexSem</KEYWORD2>
- <KEYWORD2>SysReorderRexxMacro</KEYWORD2>
- <KEYWORD2>SysRequestMutexSem</KEYWORD2>
- <KEYWORD2>SysResetEventSem</KEYWORD2>
- <KEYWORD2>SysRmDir</KEYWORD2>
- <KEYWORD2>SysSaveRexxMacroSpace</KEYWORD2>
- <KEYWORD2>SysSearchPath</KEYWORD2>
- <KEYWORD2>SysSetFileDateTime</KEYWORD2>
- <KEYWORD2>SysSetPriority</KEYWORD2>
- <KEYWORD2>SysSleep</KEYWORD2>
- <KEYWORD2>SysStemCopy</KEYWORD2>
- <KEYWORD2>SysStemDelete</KEYWORD2>
- <KEYWORD2>SysStemInsert</KEYWORD2>
- <KEYWORD2>SysStemSort</KEYWORD2>
- <KEYWORD2>SysSwitchSession</KEYWORD2>
- <KEYWORD2>SysSystemDirectory</KEYWORD2>
- <KEYWORD2>SysTempFileName</KEYWORD2>
- <KEYWORD2>SysTextScreenRead</KEYWORD2>
- <KEYWORD2>SysTextScreenSize</KEYWORD2>
- <KEYWORD2>SysUtilVersion</KEYWORD2>
- <KEYWORD2>SysVersion</KEYWORD2>
- <KEYWORD2>SysVolumeLabel</KEYWORD2>
- <KEYWORD2>SysWaitEventSem</KEYWORD2>
- <KEYWORD2>SysWaitNamedPipe</KEYWORD2>
- <KEYWORD2>SysWinDecryptFile</KEYWORD2>
- <KEYWORD2>SysWinEncryptFile</KEYWORD2>
- <KEYWORD2>SysWinVer</KEYWORD2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentNextLines"
+ VALUE="\s*(if|loop|do|else|select|otherwise|catch|finally|class|method|properties)(.*)"/>
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+
+ <!-- C style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- preprocessor statements -->
+ <EOL_SPAN TYPE="KEYWORD2">#</EOL_SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+
+ <MARK_PREVIOUS TYPE="FUNCTION">::</MARK_PREVIOUS>
+
+ <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
+ MATCH_TYPE="OPERATOR"
+ TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>Address</KEYWORD1>
+ <KEYWORD1>Arg</KEYWORD1>
+ <KEYWORD1>Call</KEYWORD1>
+ <KEYWORD1>Do</KEYWORD1>
+ <KEYWORD1>Drop</KEYWORD1>
+ <KEYWORD1>Exit</KEYWORD1>
+ <KEYWORD1>Expose</KEYWORD1>
+ <KEYWORD1>Forward</KEYWORD1>
+ <KEYWORD1>Guard</KEYWORD1>
+ <KEYWORD1>If</KEYWORD1>
+ <KEYWORD1>Interpret</KEYWORD1>
+ <KEYWORD1>Iterate</KEYWORD1>
+ <KEYWORD1>Leave</KEYWORD1>
+ <KEYWORD1>Nop</KEYWORD1>
+ <KEYWORD1>Numeric</KEYWORD1>
+ <KEYWORD1>Parse</KEYWORD1>
+ <KEYWORD1>Procedure</KEYWORD1>
+ <KEYWORD1>pull</KEYWORD1>
+ <KEYWORD1>Push</KEYWORD1>
+ <KEYWORD1>Queue</KEYWORD1>
+ <KEYWORD1>Raise</KEYWORD1>
+ <KEYWORD1>reply</KEYWORD1>
+ <KEYWORD1>Return</KEYWORD1>
+ <KEYWORD1>Say</KEYWORD1>
+ <KEYWORD1>Seleect</KEYWORD1>
+ <KEYWORD1>Signal</KEYWORD1>
+ <KEYWORD1>Trace</KEYWORD1>
+ <KEYWORD1>use</KEYWORD1>
+ <KEYWORD1>Class</KEYWORD1>
+ <KEYWORD1>Method</KEYWORD1>
+ <KEYWORD1>Requires</KEYWORD1>
+ <KEYWORD1>Routine</KEYWORD1>
+ <KEYWORD1>Result</KEYWORD1>
+ <KEYWORD1>RC</KEYWORD1>
+ <KEYWORD1>Self</KEYWORD1>
+ <KEYWORD1>Sigl</KEYWORD1>
+ <KEYWORD1>Super</KEYWORD1>
+ <KEYWORD2>Abbrev</KEYWORD2>
+ <KEYWORD2>Abs</KEYWORD2>
+ <KEYWORD2>Address</KEYWORD2>
+ <KEYWORD2>Arg</KEYWORD2>
+ <KEYWORD2>Beep</KEYWORD2>
+ <KEYWORD2>BitAnd</KEYWORD2>
+ <KEYWORD2>BitOr</KEYWORD2>
+ <KEYWORD2>BitXor</KEYWORD2>
+ <KEYWORD2>B2X</KEYWORD2>
+ <KEYWORD2>Center</KEYWORD2>
+ <KEYWORD2>ChangeStr</KEYWORD2>
+ <KEYWORD2>CharIn</KEYWORD2>
+ <KEYWORD2>CharOut</KEYWORD2>
+ <KEYWORD2>Chars</KEYWORD2>
+ <KEYWORD2>Compare</KEYWORD2>
+ <KEYWORD2>Consition</KEYWORD2>
+ <KEYWORD2>Copies</KEYWORD2>
+ <KEYWORD2>CountStr</KEYWORD2>
+ <KEYWORD2>C2D</KEYWORD2>
+ <KEYWORD2>C2X</KEYWORD2>
+ <KEYWORD2>DataType</KEYWORD2>
+ <KEYWORD2>Date</KEYWORD2>
+ <KEYWORD2>DelStr</KEYWORD2>
+ <KEYWORD2>DelWord</KEYWORD2>
+ <KEYWORD2>Digits</KEYWORD2>
+ <KEYWORD2>Directory</KEYWORD2>
+ <KEYWORD2>D2C</KEYWORD2>
+ <KEYWORD2>D2X</KEYWORD2>
+ <KEYWORD2>ErrorText</KEYWORD2>
+ <KEYWORD2>FileSpec</KEYWORD2>
+ <KEYWORD2>Form</KEYWORD2>
+ <KEYWORD2>Format</KEYWORD2>
+ <KEYWORD2>Fuzz</KEYWORD2>
+ <KEYWORD2>Insert</KEYWORD2>
+ <KEYWORD2>LastPos</KEYWORD2>
+ <KEYWORD2>Left</KEYWORD2>
+ <KEYWORD2>Length</KEYWORD2>
+ <KEYWORD2>LineIn</KEYWORD2>
+ <KEYWORD2>LineOut</KEYWORD2>
+ <KEYWORD2>Lines</KEYWORD2>
+ <KEYWORD2>Max</KEYWORD2>
+ <KEYWORD2>Min</KEYWORD2>
+ <KEYWORD2>Overlay</KEYWORD2>
+ <KEYWORD2>Pos</KEYWORD2>
+ <KEYWORD2>Queued</KEYWORD2>
+ <KEYWORD2>Random</KEYWORD2>
+ <KEYWORD2>Reverse</KEYWORD2>
+ <KEYWORD2>Right</KEYWORD2>
+ <KEYWORD2>Sign</KEYWORD2>
+ <KEYWORD2>SourceLine</KEYWORD2>
+ <KEYWORD2>Space</KEYWORD2>
+ <KEYWORD2>Stream</KEYWORD2>
+ <KEYWORD2>Strip</KEYWORD2>
+ <KEYWORD2>SubStr</KEYWORD2>
+ <KEYWORD2>SubWord</KEYWORD2>
+ <KEYWORD2>Symbol</KEYWORD2>
+ <KEYWORD2>Time</KEYWORD2>
+ <KEYWORD2>Trace</KEYWORD2>
+ <KEYWORD2>Translate</KEYWORD2>
+ <KEYWORD2>Trunc</KEYWORD2>
+ <KEYWORD2>Value</KEYWORD2>
+ <KEYWORD2>Var</KEYWORD2>
+ <KEYWORD2>Verify</KEYWORD2>
+ <KEYWORD2>Word</KEYWORD2>
+ <KEYWORD2>WordIndex</KEYWORD2>
+ <KEYWORD2>WordLength</KEYWORD2>
+ <KEYWORD2>WordPos</KEYWORD2>
+ <KEYWORD2>Words</KEYWORD2>
+ <KEYWORD2>XRange</KEYWORD2>
+ <KEYWORD2>X2B</KEYWORD2>
+ <KEYWORD2>X2C</KEYWORD2>
+ <KEYWORD2>X2D</KEYWORD2>
+ <KEYWORD2>RxFuncAdd</KEYWORD2>
+ <KEYWORD2>RxFuncDrop</KEYWORD2>
+ <KEYWORD2>RxFuncQuery</KEYWORD2>
+ <KEYWORD2>RxMessageBox</KEYWORD2>
+ <KEYWORD2>RxWinExec</KEYWORD2>
+ <KEYWORD2>SysAddRexxMacro</KEYWORD2>
+ <KEYWORD2>SysBootDrive</KEYWORD2>
+ <KEYWORD2>SysClearRexxMacroSpace</KEYWORD2>
+ <KEYWORD2>SysCloseEventSem</KEYWORD2>
+ <KEYWORD2>SysCloseMutexSem</KEYWORD2>
+ <KEYWORD2>SysCls</KEYWORD2>
+ <KEYWORD2>SysCreateEventSem</KEYWORD2>
+ <KEYWORD2>SysCreateMutexSem</KEYWORD2>
+ <KEYWORD2>SysCurPos</KEYWORD2>
+ <KEYWORD2>SysCurState</KEYWORD2>
+ <KEYWORD2>SysDriveInfo</KEYWORD2>
+ <KEYWORD2>SysDriveMap</KEYWORD2>
+ <KEYWORD2>SysDropFuncs</KEYWORD2>
+ <KEYWORD2>SysDropRexxMacro</KEYWORD2>
+ <KEYWORD2>SysDumpVariables</KEYWORD2>
+ <KEYWORD2>SysFileDelete</KEYWORD2>
+ <KEYWORD2>SysFileSearch</KEYWORD2>
+ <KEYWORD2>SysFileSystemType</KEYWORD2>
+ <KEYWORD2>SysFileTree</KEYWORD2>
+ <KEYWORD2>SysFromUnicode</KEYWORD2>
+ <KEYWORD2>SysToUnicode</KEYWORD2>
+ <KEYWORD2>SysGetErrortext</KEYWORD2>
+ <KEYWORD2>SysGetFileDateTime</KEYWORD2>
+ <KEYWORD2>SysGetKey</KEYWORD2>
+ <KEYWORD2>SysIni</KEYWORD2>
+ <KEYWORD2>SysLoadFuncs</KEYWORD2>
+ <KEYWORD2>SysLoadRexxMacroSpace</KEYWORD2>
+ <KEYWORD2>SysMkDir</KEYWORD2>
+ <KEYWORD2>SysOpenEventSem</KEYWORD2>
+ <KEYWORD2>SysOpenMutexSem</KEYWORD2>
+ <KEYWORD2>SysPostEventSem</KEYWORD2>
+ <KEYWORD2>SysPulseEventSem</KEYWORD2>
+ <KEYWORD2>SysQueryProcess</KEYWORD2>
+ <KEYWORD2>SysQueryRexxMacro</KEYWORD2>
+ <KEYWORD2>SysReleaseMutexSem</KEYWORD2>
+ <KEYWORD2>SysReorderRexxMacro</KEYWORD2>
+ <KEYWORD2>SysRequestMutexSem</KEYWORD2>
+ <KEYWORD2>SysResetEventSem</KEYWORD2>
+ <KEYWORD2>SysRmDir</KEYWORD2>
+ <KEYWORD2>SysSaveRexxMacroSpace</KEYWORD2>
+ <KEYWORD2>SysSearchPath</KEYWORD2>
+ <KEYWORD2>SysSetFileDateTime</KEYWORD2>
+ <KEYWORD2>SysSetPriority</KEYWORD2>
+ <KEYWORD2>SysSleep</KEYWORD2>
+ <KEYWORD2>SysStemCopy</KEYWORD2>
+ <KEYWORD2>SysStemDelete</KEYWORD2>
+ <KEYWORD2>SysStemInsert</KEYWORD2>
+ <KEYWORD2>SysStemSort</KEYWORD2>
+ <KEYWORD2>SysSwitchSession</KEYWORD2>
+ <KEYWORD2>SysSystemDirectory</KEYWORD2>
+ <KEYWORD2>SysTempFileName</KEYWORD2>
+ <KEYWORD2>SysTextScreenRead</KEYWORD2>
+ <KEYWORD2>SysTextScreenSize</KEYWORD2>
+ <KEYWORD2>SysUtilVersion</KEYWORD2>
+ <KEYWORD2>SysVersion</KEYWORD2>
+ <KEYWORD2>SysVolumeLabel</KEYWORD2>
+ <KEYWORD2>SysWaitEventSem</KEYWORD2>
+ <KEYWORD2>SysWaitNamedPipe</KEYWORD2>
+ <KEYWORD2>SysWinDecryptFile</KEYWORD2>
+ <KEYWORD2>SysWinEncryptFile</KEYWORD2>
+ <KEYWORD2>SysWinVer</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/occam.xml b/jEdit/modes/occam.xml
index 4e7265e..a7088c5 100644
--- a/jEdit/modes/occam.xml
+++ b/jEdit/modes/occam.xml
@@ -1,260 +1,260 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Occam mode by Rick Beton. -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="--" />
- <PROPERTY NAME="commentEnd" VALUE="" />
- <PROPERTY NAME="blockComment" VALUE="" />
- <PROPERTY NAME="noWordSep" VALUE="." />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
-
- <!-- Normal comments. -->
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
-
- <!-- Compiler directives. -->
- <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">>></SEQ>
- <SEQ TYPE="OPERATOR"><<</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">/\</SEQ>
- <SEQ TYPE="OPERATOR">\/</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
-
- <KEYWORDS>
- <!-- Structure keywords -->
- <KEYWORD1>ALT</KEYWORD1>
- <KEYWORD1>ASM</KEYWORD1>
- <KEYWORD1>CASE</KEYWORD1>
- <KEYWORD1>FUNCTION</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>INLINE</KEYWORD1>
- <KEYWORD1>PAR</KEYWORD1>
- <KEYWORD1>PLACED</KEYWORD1>
- <KEYWORD1>PRI</KEYWORD1>
- <KEYWORD1>PROC</KEYWORD1>
- <KEYWORD1>RESULT</KEYWORD1>
- <KEYWORD1>SEQ</KEYWORD1>
- <KEYWORD1>VALOF</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
-
- <!-- main keywords -->
- <KEYWORD2>AT</KEYWORD2>
- <KEYWORD2>ELSE</KEYWORD2>
- <KEYWORD2>FOR</KEYWORD2>
- <KEYWORD2>FROM</KEYWORD2>
- <KEYWORD2>IS</KEYWORD2>
- <KEYWORD2>PLACE</KEYWORD2>
- <KEYWORD2>PORT</KEYWORD2>
- <KEYWORD2>PROTOCOL</KEYWORD2>
- <KEYWORD2>SKIP</KEYWORD2>
- <KEYWORD2>STOP</KEYWORD2>
- <KEYWORD2>VAL</KEYWORD2>
-
- <!-- type and conversion keywords -->
- <KEYWORD2>AFTER</KEYWORD2>
- <KEYWORD2>AND</KEYWORD2>
- <KEYWORD2>ANY</KEYWORD2>
- <KEYWORD2>BITAND</KEYWORD2>
- <KEYWORD2>BITNOT</KEYWORD2>
- <KEYWORD2>BITOR</KEYWORD2>
- <KEYWORD2>BOOL</KEYWORD2>
- <KEYWORD2>BYTE</KEYWORD2>
- <KEYWORD2>BYTESIN</KEYWORD2>
- <KEYWORD2>CHAN</KEYWORD2>
- <KEYWORD2>DATA</KEYWORD2>
- <KEYWORD2>INT</KEYWORD2>
- <KEYWORD2>INT32</KEYWORD2>
- <KEYWORD2>INT16</KEYWORD2>
- <KEYWORD2>INT64</KEYWORD2>
- <KEYWORD2>MINUS</KEYWORD2>
- <KEYWORD2>MOSTNEG</KEYWORD2>
- <KEYWORD2>MOSTPOS</KEYWORD2>
- <KEYWORD2>NOT</KEYWORD2>
- <KEYWORD2>PLUS</KEYWORD2>
- <KEYWORD2>OF</KEYWORD2>
- <KEYWORD2>OFFSETOF</KEYWORD2>
- <KEYWORD2>OR</KEYWORD2>
- <KEYWORD2>PACKED</KEYWORD2>
- <KEYWORD2>REAL32</KEYWORD2>
- <KEYWORD2>REAL64</KEYWORD2>
- <KEYWORD2>RECORD</KEYWORD2>
- <KEYWORD2>REM</KEYWORD2>
- <KEYWORD2>RESHAPES</KEYWORD2>
- <KEYWORD2>RETYPES</KEYWORD2>
- <KEYWORD2>ROUND</KEYWORD2>
- <KEYWORD2>SIZE</KEYWORD2>
- <KEYWORD2>TIMER</KEYWORD2>
- <KEYWORD2>TIMES</KEYWORD2>
- <KEYWORD2>TRUNC</KEYWORD2>
- <KEYWORD2>TYPE</KEYWORD2>
-
- <!-- Occam3 and extensions to occam2.1 -->
- <KEYWORD2>BUCKET</KEYWORD2>
- <KEYWORD2>CLAIM</KEYWORD2>
- <KEYWORD2>ENROLL</KEYWORD2>
- <KEYWORD2>EVENT</KEYWORD2>
- <KEYWORD2>FALL</KEYWORD2>
- <KEYWORD2>FLUSH</KEYWORD2>
- <KEYWORD2>GRANT</KEYWORD2>
- <KEYWORD2>INITIAL</KEYWORD2>
- <KEYWORD2>RESOURCE</KEYWORD2>
- <KEYWORD2>SEMAPHORE</KEYWORD2>
- <KEYWORD2>SHARED</KEYWORD2>
- <KEYWORD2>SYNC</KEYWORD2>
-
- <!-- arithmetic & trigonometric functions -->
- <KEYWORD3>LONGADD</KEYWORD3>
- <KEYWORD3>LONGSUB</KEYWORD3>
- <KEYWORD3>ASHIFTRIGHT</KEYWORD3>
- <KEYWORD3>ASHIFTLEFT</KEYWORD3>
- <KEYWORD3>ROTATERIGHT</KEYWORD3>
- <KEYWORD3>ROTATELEFT</KEYWORD3>
- <KEYWORD3>LONGSUM</KEYWORD3>
- <KEYWORD3>LONGDIFF</KEYWORD3>
- <KEYWORD3>LONGPROD</KEYWORD3>
- <KEYWORD3>LONGDIV</KEYWORD3>
- <KEYWORD3>SHIFTLEFT</KEYWORD3>
- <KEYWORD3>SHIFTRIGHT</KEYWORD3>
- <KEYWORD3>NORMALISE</KEYWORD3>
- <KEYWORD3>ABS</KEYWORD3>
- <KEYWORD3>DABS</KEYWORD3>
- <KEYWORD3>SCALEB</KEYWORD3>
- <KEYWORD3>DSCALEB</KEYWORD3>
- <KEYWORD3>COPYSIGN</KEYWORD3>
- <KEYWORD3>DCOPYSIGN</KEYWORD3>
- <KEYWORD3>SQRT</KEYWORD3>
- <KEYWORD3>DSQRT</KEYWORD3>
- <KEYWORD3>MINUSX</KEYWORD3>
- <KEYWORD3>DMINUSX</KEYWORD3>
- <KEYWORD3>NEXTAFTER</KEYWORD3>
- <KEYWORD3>DNEXTAFTER</KEYWORD3>
- <KEYWORD3>MULBY2</KEYWORD3>
- <KEYWORD3>DMULBY2</KEYWORD3>
- <KEYWORD3>DIVBY2</KEYWORD3>
- <KEYWORD3>DDIVBY2</KEYWORD3>
- <KEYWORD3>LOGB</KEYWORD3>
- <KEYWORD3>DLOGB</KEYWORD3>
- <KEYWORD3>ISNAN</KEYWORD3>
- <KEYWORD3>DISNAN</KEYWORD3>
- <KEYWORD3>NOTFINITE</KEYWORD3>
- <KEYWORD3>DNOTFINITE</KEYWORD3>
- <KEYWORD3>ORDERED</KEYWORD3>
- <KEYWORD3>DORDERED</KEYWORD3>
- <KEYWORD3>FLOATING.UNPACK</KEYWORD3>
- <KEYWORD3>DFLOATING.UNPACK</KEYWORD3>
- <KEYWORD3>ARGUMENT.REDUCE</KEYWORD3>
- <KEYWORD3>DARGUMENT.REDUCE</KEYWORD3>
- <KEYWORD3>FPINT</KEYWORD3>
- <KEYWORD3>DFPINT</KEYWORD3>
- <KEYWORD3>REAL32OP</KEYWORD3>
- <KEYWORD3>REAL64OP</KEYWORD3>
- <KEYWORD3>IEEE32OP</KEYWORD3>
- <KEYWORD3>IEEE64OP</KEYWORD3>
- <KEYWORD3>REAL32REM</KEYWORD3>
- <KEYWORD3>REAL64REM</KEYWORD3>
- <KEYWORD3>IEEE32REM</KEYWORD3>
- <KEYWORD3>IEEE64REM</KEYWORD3>
- <KEYWORD3>REAL32EQ</KEYWORD3>
- <KEYWORD3>REAL64EQ</KEYWORD3>
- <KEYWORD3>REAL32GT</KEYWORD3>
- <KEYWORD3>REAL64GT</KEYWORD3>
- <KEYWORD3>IEEECOMPARE</KEYWORD3>
- <KEYWORD3>DIEEECOMPARE</KEYWORD3>
- <KEYWORD3>ALOG</KEYWORD3>
- <KEYWORD3>DALOG</KEYWORD3>
- <KEYWORD3>ALOG10</KEYWORD3>
- <KEYWORD3>DALOG10</KEYWORD3>
- <KEYWORD3>EXP</KEYWORD3>
- <KEYWORD3>DEXP</KEYWORD3>
- <KEYWORD3>TAN</KEYWORD3>
- <KEYWORD3>DTAN</KEYWORD3>
- <KEYWORD3>SIN</KEYWORD3>
- <KEYWORD3>DSIN</KEYWORD3>
- <KEYWORD3>ASIN</KEYWORD3>
- <KEYWORD3>DASIN</KEYWORD3>
- <KEYWORD3>COS</KEYWORD3>
- <KEYWORD3>DCOS</KEYWORD3>
- <KEYWORD3>SINH</KEYWORD3>
- <KEYWORD3>DSINH</KEYWORD3>
- <KEYWORD3>COSH</KEYWORD3>
- <KEYWORD3>DCOSH</KEYWORD3>
- <KEYWORD3>TANH</KEYWORD3>
- <KEYWORD3>DTANH</KEYWORD3>
- <KEYWORD3>ATAN</KEYWORD3>
- <KEYWORD3>DATAN</KEYWORD3>
- <KEYWORD3>ATAN2</KEYWORD3>
- <KEYWORD3>DATAN2</KEYWORD3>
- <KEYWORD3>RAN</KEYWORD3>
- <KEYWORD3>DRAN</KEYWORD3>
- <KEYWORD3>POWER</KEYWORD3>
- <KEYWORD3>DPOWER</KEYWORD3>
-
- <!-- basic data conversion functions -->
- <KEYWORD3>INTTOSTRING</KEYWORD3>
- <KEYWORD3>INT16TOSTRING</KEYWORD3>
- <KEYWORD3>INT32TOSTRING</KEYWORD3>
- <KEYWORD3>INT64TOSTRING</KEYWORD3>
- <KEYWORD3>STRINGTOINT</KEYWORD3>
- <KEYWORD3>STRINGTOINT16</KEYWORD3>
- <KEYWORD3>STRINGTOINT32</KEYWORD3>
- <KEYWORD3>STRINGTOINT64</KEYWORD3>
- <KEYWORD3>HEXTOSTRING</KEYWORD3>
- <KEYWORD3>HEX16TOSTRING</KEYWORD3>
- <KEYWORD3>HEX32TOSTRING</KEYWORD3>
- <KEYWORD3>HEX64TOSTRING</KEYWORD3>
- <KEYWORD3>STRINGTOHEX</KEYWORD3>
- <KEYWORD3>STRINGTOHEX16</KEYWORD3>
- <KEYWORD3>STRINGTOHEX32</KEYWORD3>
- <KEYWORD3>STRINGTOHEX64</KEYWORD3>
- <KEYWORD3>STRINGTOREAL32</KEYWORD3>
- <KEYWORD3>STRINGTOREAL64</KEYWORD3>
- <KEYWORD3>REAL32TOSTRING</KEYWORD3>
- <KEYWORD3>REAL64TOSTRING</KEYWORD3>
- <KEYWORD3>STRINGTOBOOL</KEYWORD3>
- <KEYWORD3>BOOLTOSTRING</KEYWORD3>
- <KEYWORD3>RESCHEDULE</KEYWORD3>
- <KEYWORD3>ASSERT</KEYWORD3>
-
- <!-- preprocessor directives
- #INCLUDE
- #USE
- #OPTION
- #PRAGMA
- #COMMENT
- -->
-
- <LITERAL2>FALSE</LITERAL2>
- <LITERAL2>TRUE</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Occam mode by Rick Beton. -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="--" />
+ <PROPERTY NAME="commentEnd" VALUE="" />
+ <PROPERTY NAME="blockComment" VALUE="" />
+ <PROPERTY NAME="noWordSep" VALUE="." />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+
+ <!-- Normal comments. -->
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+
+ <!-- Compiler directives. -->
+ <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">>></SEQ>
+ <SEQ TYPE="OPERATOR"><<</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">/\</SEQ>
+ <SEQ TYPE="OPERATOR">\/</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+
+ <KEYWORDS>
+ <!-- Structure keywords -->
+ <KEYWORD1>ALT</KEYWORD1>
+ <KEYWORD1>ASM</KEYWORD1>
+ <KEYWORD1>CASE</KEYWORD1>
+ <KEYWORD1>FUNCTION</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>INLINE</KEYWORD1>
+ <KEYWORD1>PAR</KEYWORD1>
+ <KEYWORD1>PLACED</KEYWORD1>
+ <KEYWORD1>PRI</KEYWORD1>
+ <KEYWORD1>PROC</KEYWORD1>
+ <KEYWORD1>RESULT</KEYWORD1>
+ <KEYWORD1>SEQ</KEYWORD1>
+ <KEYWORD1>VALOF</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+
+ <!-- main keywords -->
+ <KEYWORD2>AT</KEYWORD2>
+ <KEYWORD2>ELSE</KEYWORD2>
+ <KEYWORD2>FOR</KEYWORD2>
+ <KEYWORD2>FROM</KEYWORD2>
+ <KEYWORD2>IS</KEYWORD2>
+ <KEYWORD2>PLACE</KEYWORD2>
+ <KEYWORD2>PORT</KEYWORD2>
+ <KEYWORD2>PROTOCOL</KEYWORD2>
+ <KEYWORD2>SKIP</KEYWORD2>
+ <KEYWORD2>STOP</KEYWORD2>
+ <KEYWORD2>VAL</KEYWORD2>
+
+ <!-- type and conversion keywords -->
+ <KEYWORD2>AFTER</KEYWORD2>
+ <KEYWORD2>AND</KEYWORD2>
+ <KEYWORD2>ANY</KEYWORD2>
+ <KEYWORD2>BITAND</KEYWORD2>
+ <KEYWORD2>BITNOT</KEYWORD2>
+ <KEYWORD2>BITOR</KEYWORD2>
+ <KEYWORD2>BOOL</KEYWORD2>
+ <KEYWORD2>BYTE</KEYWORD2>
+ <KEYWORD2>BYTESIN</KEYWORD2>
+ <KEYWORD2>CHAN</KEYWORD2>
+ <KEYWORD2>DATA</KEYWORD2>
+ <KEYWORD2>INT</KEYWORD2>
+ <KEYWORD2>INT32</KEYWORD2>
+ <KEYWORD2>INT16</KEYWORD2>
+ <KEYWORD2>INT64</KEYWORD2>
+ <KEYWORD2>MINUS</KEYWORD2>
+ <KEYWORD2>MOSTNEG</KEYWORD2>
+ <KEYWORD2>MOSTPOS</KEYWORD2>
+ <KEYWORD2>NOT</KEYWORD2>
+ <KEYWORD2>PLUS</KEYWORD2>
+ <KEYWORD2>OF</KEYWORD2>
+ <KEYWORD2>OFFSETOF</KEYWORD2>
+ <KEYWORD2>OR</KEYWORD2>
+ <KEYWORD2>PACKED</KEYWORD2>
+ <KEYWORD2>REAL32</KEYWORD2>
+ <KEYWORD2>REAL64</KEYWORD2>
+ <KEYWORD2>RECORD</KEYWORD2>
+ <KEYWORD2>REM</KEYWORD2>
+ <KEYWORD2>RESHAPES</KEYWORD2>
+ <KEYWORD2>RETYPES</KEYWORD2>
+ <KEYWORD2>ROUND</KEYWORD2>
+ <KEYWORD2>SIZE</KEYWORD2>
+ <KEYWORD2>TIMER</KEYWORD2>
+ <KEYWORD2>TIMES</KEYWORD2>
+ <KEYWORD2>TRUNC</KEYWORD2>
+ <KEYWORD2>TYPE</KEYWORD2>
+
+ <!-- Occam3 and extensions to occam2.1 -->
+ <KEYWORD2>BUCKET</KEYWORD2>
+ <KEYWORD2>CLAIM</KEYWORD2>
+ <KEYWORD2>ENROLL</KEYWORD2>
+ <KEYWORD2>EVENT</KEYWORD2>
+ <KEYWORD2>FALL</KEYWORD2>
+ <KEYWORD2>FLUSH</KEYWORD2>
+ <KEYWORD2>GRANT</KEYWORD2>
+ <KEYWORD2>INITIAL</KEYWORD2>
+ <KEYWORD2>RESOURCE</KEYWORD2>
+ <KEYWORD2>SEMAPHORE</KEYWORD2>
+ <KEYWORD2>SHARED</KEYWORD2>
+ <KEYWORD2>SYNC</KEYWORD2>
+
+ <!-- arithmetic & trigonometric functions -->
+ <KEYWORD3>LONGADD</KEYWORD3>
+ <KEYWORD3>LONGSUB</KEYWORD3>
+ <KEYWORD3>ASHIFTRIGHT</KEYWORD3>
+ <KEYWORD3>ASHIFTLEFT</KEYWORD3>
+ <KEYWORD3>ROTATERIGHT</KEYWORD3>
+ <KEYWORD3>ROTATELEFT</KEYWORD3>
+ <KEYWORD3>LONGSUM</KEYWORD3>
+ <KEYWORD3>LONGDIFF</KEYWORD3>
+ <KEYWORD3>LONGPROD</KEYWORD3>
+ <KEYWORD3>LONGDIV</KEYWORD3>
+ <KEYWORD3>SHIFTLEFT</KEYWORD3>
+ <KEYWORD3>SHIFTRIGHT</KEYWORD3>
+ <KEYWORD3>NORMALISE</KEYWORD3>
+ <KEYWORD3>ABS</KEYWORD3>
+ <KEYWORD3>DABS</KEYWORD3>
+ <KEYWORD3>SCALEB</KEYWORD3>
+ <KEYWORD3>DSCALEB</KEYWORD3>
+ <KEYWORD3>COPYSIGN</KEYWORD3>
+ <KEYWORD3>DCOPYSIGN</KEYWORD3>
+ <KEYWORD3>SQRT</KEYWORD3>
+ <KEYWORD3>DSQRT</KEYWORD3>
+ <KEYWORD3>MINUSX</KEYWORD3>
+ <KEYWORD3>DMINUSX</KEYWORD3>
+ <KEYWORD3>NEXTAFTER</KEYWORD3>
+ <KEYWORD3>DNEXTAFTER</KEYWORD3>
+ <KEYWORD3>MULBY2</KEYWORD3>
+ <KEYWORD3>DMULBY2</KEYWORD3>
+ <KEYWORD3>DIVBY2</KEYWORD3>
+ <KEYWORD3>DDIVBY2</KEYWORD3>
+ <KEYWORD3>LOGB</KEYWORD3>
+ <KEYWORD3>DLOGB</KEYWORD3>
+ <KEYWORD3>ISNAN</KEYWORD3>
+ <KEYWORD3>DISNAN</KEYWORD3>
+ <KEYWORD3>NOTFINITE</KEYWORD3>
+ <KEYWORD3>DNOTFINITE</KEYWORD3>
+ <KEYWORD3>ORDERED</KEYWORD3>
+ <KEYWORD3>DORDERED</KEYWORD3>
+ <KEYWORD3>FLOATING.UNPACK</KEYWORD3>
+ <KEYWORD3>DFLOATING.UNPACK</KEYWORD3>
+ <KEYWORD3>ARGUMENT.REDUCE</KEYWORD3>
+ <KEYWORD3>DARGUMENT.REDUCE</KEYWORD3>
+ <KEYWORD3>FPINT</KEYWORD3>
+ <KEYWORD3>DFPINT</KEYWORD3>
+ <KEYWORD3>REAL32OP</KEYWORD3>
+ <KEYWORD3>REAL64OP</KEYWORD3>
+ <KEYWORD3>IEEE32OP</KEYWORD3>
+ <KEYWORD3>IEEE64OP</KEYWORD3>
+ <KEYWORD3>REAL32REM</KEYWORD3>
+ <KEYWORD3>REAL64REM</KEYWORD3>
+ <KEYWORD3>IEEE32REM</KEYWORD3>
+ <KEYWORD3>IEEE64REM</KEYWORD3>
+ <KEYWORD3>REAL32EQ</KEYWORD3>
+ <KEYWORD3>REAL64EQ</KEYWORD3>
+ <KEYWORD3>REAL32GT</KEYWORD3>
+ <KEYWORD3>REAL64GT</KEYWORD3>
+ <KEYWORD3>IEEECOMPARE</KEYWORD3>
+ <KEYWORD3>DIEEECOMPARE</KEYWORD3>
+ <KEYWORD3>ALOG</KEYWORD3>
+ <KEYWORD3>DALOG</KEYWORD3>
+ <KEYWORD3>ALOG10</KEYWORD3>
+ <KEYWORD3>DALOG10</KEYWORD3>
+ <KEYWORD3>EXP</KEYWORD3>
+ <KEYWORD3>DEXP</KEYWORD3>
+ <KEYWORD3>TAN</KEYWORD3>
+ <KEYWORD3>DTAN</KEYWORD3>
+ <KEYWORD3>SIN</KEYWORD3>
+ <KEYWORD3>DSIN</KEYWORD3>
+ <KEYWORD3>ASIN</KEYWORD3>
+ <KEYWORD3>DASIN</KEYWORD3>
+ <KEYWORD3>COS</KEYWORD3>
+ <KEYWORD3>DCOS</KEYWORD3>
+ <KEYWORD3>SINH</KEYWORD3>
+ <KEYWORD3>DSINH</KEYWORD3>
+ <KEYWORD3>COSH</KEYWORD3>
+ <KEYWORD3>DCOSH</KEYWORD3>
+ <KEYWORD3>TANH</KEYWORD3>
+ <KEYWORD3>DTANH</KEYWORD3>
+ <KEYWORD3>ATAN</KEYWORD3>
+ <KEYWORD3>DATAN</KEYWORD3>
+ <KEYWORD3>ATAN2</KEYWORD3>
+ <KEYWORD3>DATAN2</KEYWORD3>
+ <KEYWORD3>RAN</KEYWORD3>
+ <KEYWORD3>DRAN</KEYWORD3>
+ <KEYWORD3>POWER</KEYWORD3>
+ <KEYWORD3>DPOWER</KEYWORD3>
+
+ <!-- basic data conversion functions -->
+ <KEYWORD3>INTTOSTRING</KEYWORD3>
+ <KEYWORD3>INT16TOSTRING</KEYWORD3>
+ <KEYWORD3>INT32TOSTRING</KEYWORD3>
+ <KEYWORD3>INT64TOSTRING</KEYWORD3>
+ <KEYWORD3>STRINGTOINT</KEYWORD3>
+ <KEYWORD3>STRINGTOINT16</KEYWORD3>
+ <KEYWORD3>STRINGTOINT32</KEYWORD3>
+ <KEYWORD3>STRINGTOINT64</KEYWORD3>
+ <KEYWORD3>HEXTOSTRING</KEYWORD3>
+ <KEYWORD3>HEX16TOSTRING</KEYWORD3>
+ <KEYWORD3>HEX32TOSTRING</KEYWORD3>
+ <KEYWORD3>HEX64TOSTRING</KEYWORD3>
+ <KEYWORD3>STRINGTOHEX</KEYWORD3>
+ <KEYWORD3>STRINGTOHEX16</KEYWORD3>
+ <KEYWORD3>STRINGTOHEX32</KEYWORD3>
+ <KEYWORD3>STRINGTOHEX64</KEYWORD3>
+ <KEYWORD3>STRINGTOREAL32</KEYWORD3>
+ <KEYWORD3>STRINGTOREAL64</KEYWORD3>
+ <KEYWORD3>REAL32TOSTRING</KEYWORD3>
+ <KEYWORD3>REAL64TOSTRING</KEYWORD3>
+ <KEYWORD3>STRINGTOBOOL</KEYWORD3>
+ <KEYWORD3>BOOLTOSTRING</KEYWORD3>
+ <KEYWORD3>RESCHEDULE</KEYWORD3>
+ <KEYWORD3>ASSERT</KEYWORD3>
+
+ <!-- preprocessor directives
+ #INCLUDE
+ #USE
+ #OPTION
+ #PRAGMA
+ #COMMENT
+ -->
+
+ <LITERAL2>FALSE</LITERAL2>
+ <LITERAL2>TRUE</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/omnimark.xml b/jEdit/modes/omnimark.xml
index 3816988..9c8a529 100644
--- a/jEdit/modes/omnimark.xml
+++ b/jEdit/modes/omnimark.xml
@@ -1,455 +1,455 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!-- contributed by Lionel Fiol <lio-sand at ifrance.com> -->
-<!-- 09/NOV/2001: add automatic indentation properties -->
-<!-- correct and add some keywords -->
-<!-- reorganize all keywords (sorted) -->
-<!-- 20/APR/2004: all keywords are now in lower case -->
-<!-- 06/MAY/2004: add specific patterns for invalid literals -->
-<!-- 06/JUN/2004: add '.' (dot) in the noWordSep property -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentNextLines" VALUE="\s*((PROCESS|MARKUP|EXTERNAL|DOCUMENT|DTD|ELEMENT|FIND|TRANSLATE)((-|\s).*|\s*)|(DO|ELSE|REPEAT|MATCH|CASE|USING|GROUP|DEFINE|MACRO)(\s+.*|\s*))" />
- <PROPERTY NAME="lineComment" VALUE=";" />
- <PROPERTY NAME="noWordSep" VALUE=".-_" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT1">#!</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
- <!-- Literals -->
- <SPAN_REGEXP HASH_CHAR='"' NO_LINE_BREAK="TRUE" TYPE="INVALID">
- <BEGIN>"((?!$)[^"])*$</BEGIN>
- <END>$</END>
- </SPAN_REGEXP>
- <SPAN TYPE="LITERAL1" ESCAPE="%" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN_REGEXP HASH_CHAR="'" NO_LINE_BREAK="TRUE" TYPE="INVALID">
- <BEGIN>'((?!$)[^'])*$</BEGIN>
- <END>$</END>
- </SPAN_REGEXP>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <!-- Operators -->
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <!-- two next lines were removed as they conflict with the noWordSep property -->
- <!-- <SEQ TYPE="OPERATOR">-</SEQ> -->
- <!-- <SEQ TYPE="OPERATOR">_</SEQ> -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <!-- Keywords -->
- <KEYWORDS>
- <KEYWORD2>#additional-info</KEYWORD2>
- <KEYWORD2>#appinfo</KEYWORD2>
- <KEYWORD2>#args</KEYWORD2>
- <KEYWORD2>#capacity</KEYWORD2>
- <KEYWORD2>#charset</KEYWORD2>
- <KEYWORD2>#class</KEYWORD2>
- <KEYWORD2>#command-line-names</KEYWORD2>
- <KEYWORD2>#console</KEYWORD2>
- <KEYWORD2>#current-input</KEYWORD2>
- <KEYWORD2>#current-output</KEYWORD2>
- <KEYWORD2>#data</KEYWORD2>
- <KEYWORD2>#doctype</KEYWORD2>
- <KEYWORD2>#document</KEYWORD2>
- <KEYWORD2>#dtd</KEYWORD2>
- <KEYWORD2>#empty</KEYWORD2>
- <KEYWORD2>#error</KEYWORD2>
- <KEYWORD2>#error-code</KEYWORD2>
- <KEYWORD2>#external-exception</KEYWORD2>
- <KEYWORD2>#file-name</KEYWORD2>
- <KEYWORD2>#first</KEYWORD2>
- <KEYWORD2>#group</KEYWORD2>
- <KEYWORD2>#implied</KEYWORD2>
- <KEYWORD2>#item</KEYWORD2>
- <KEYWORD2>#language-version</KEYWORD2>
- <KEYWORD2>#last</KEYWORD2>
- <KEYWORD2>#libpath</KEYWORD2>
- <KEYWORD2>#library</KEYWORD2>
- <KEYWORD2>#libvalue</KEYWORD2>
- <KEYWORD2>#line-number</KEYWORD2>
- <KEYWORD2>#main-input</KEYWORD2>
- <KEYWORD2>#main-output</KEYWORD2>
- <KEYWORD2>#markup-error-count</KEYWORD2>
- <KEYWORD2>#markup-error-total</KEYWORD2>
- <KEYWORD2>#markup-parser</KEYWORD2>
- <KEYWORD2>#markup-warning-count</KEYWORD2>
- <KEYWORD2>#markup-warning-total</KEYWORD2>
- <KEYWORD2>#message</KEYWORD2>
- <KEYWORD2>#none</KEYWORD2>
- <KEYWORD2>#output</KEYWORD2>
- <KEYWORD2>#platform-info</KEYWORD2>
- <KEYWORD2>#process-input</KEYWORD2>
- <KEYWORD2>#process-output</KEYWORD2>
- <KEYWORD2>#program-error</KEYWORD2>
- <KEYWORD2>#recovery-info</KEYWORD2>
- <KEYWORD2>#sgml</KEYWORD2>
- <KEYWORD2>#sgml-error-count</KEYWORD2>
- <KEYWORD2>#sgml-error-total</KEYWORD2>
- <KEYWORD2>#sgml-warning-count</KEYWORD2>
- <KEYWORD2>#sgml-warning-total</KEYWORD2>
- <KEYWORD2>#suppress</KEYWORD2>
- <KEYWORD2>#syntax</KEYWORD2>
- <KEYWORD2>#!</KEYWORD2>
- <OPERATOR>abs</OPERATOR>
- <KEYWORD1>activate</KEYWORD1>
- <OPERATOR>active</OPERATOR>
- <KEYWORD2>after</KEYWORD2>
- <KEYWORD1>again</KEYWORD1>
- <KEYWORD2>ancestor</KEYWORD2>
- <KEYWORD2>and</KEYWORD2>
- <KEYWORD2>another</KEYWORD2>
- <KEYWORD1>always</KEYWORD1>
- <OPERATOR>and</OPERATOR>
- <KEYWORD3>any</KEYWORD3>
- <KEYWORD3>any-text</KEYWORD3>
- <KEYWORD2>arg</KEYWORD2>
- <OPERATOR>as</OPERATOR>
- <KEYWORD1>assert</KEYWORD1>
- <KEYWORD2>attached</KEYWORD2>
- <KEYWORD2>attribute</KEYWORD2>
- <KEYWORD2>attributes</KEYWORD2>
- <OPERATOR>base</OPERATOR>
- <KEYWORD2>bcd</KEYWORD2>
- <KEYWORD2>before</KEYWORD2>
- <OPERATOR>binary</OPERATOR>
- <KEYWORD2>binary-input</KEYWORD2>
- <KEYWORD2>binary-mode</KEYWORD2>
- <KEYWORD2>binary-output</KEYWORD2>
- <KEYWORD3>blank</KEYWORD3>
- <KEYWORD2>break-width</KEYWORD2>
- <KEYWORD2>buffer</KEYWORD2>
- <KEYWORD2>buffered</KEYWORD2>
- <KEYWORD2>by</KEYWORD2>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD2>catchable</KEYWORD2>
- <KEYWORD3>cdata</KEYWORD3>
- <KEYWORD2>cdata-entity</KEYWORD2>
- <OPERATOR>ceiling</OPERATOR>
- <KEYWORD2>children</KEYWORD2>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD2>closed</KEYWORD2>
- <OPERATOR>compiled-date</OPERATOR>
- <OPERATOR>complement</OPERATOR>
- <KEYWORD2>conref</KEYWORD2>
- <KEYWORD2>content</KEYWORD2>
- <KEYWORD3>content-end</KEYWORD3>
- <KEYWORD3>content-start</KEYWORD3>
- <KEYWORD2>context-translate</KEYWORD2>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>copy-clear</KEYWORD1>
- <KEYWORD2>counter</KEYWORD2>
- <KEYWORD2>created</KEYWORD2>
- <OPERATOR>creating</OPERATOR>
- <OPERATOR>creator</OPERATOR>
- <KEYWORD2>cross-translate</KEYWORD2>
- <KEYWORD2>current</KEYWORD2>
- <KEYWORD2>data-attribute</KEYWORD2>
- <KEYWORD2>data-attributes</KEYWORD2>
- <KEYWORD2>data-content</KEYWORD2>
- <KEYWORD2>data-letters</KEYWORD2>
- <OPERATOR>date</OPERATOR>
- <KEYWORD1>deactivate</KEYWORD1>
- <KEYWORD2>declare</KEYWORD2>
- <KEYWORD2>declared-conref</KEYWORD2>
- <KEYWORD2>declared-current</KEYWORD2>
- <KEYWORD2>declared-defaulted</KEYWORD2>
- <KEYWORD2>declared-fixed</KEYWORD2>
- <KEYWORD2>declared-implied</KEYWORD2>
- <KEYWORD2>declared-required</KEYWORD2>
- <KEYWORD1>decrement</KEYWORD1>
- <KEYWORD2>default-entity</KEYWORD2>
- <KEYWORD2>defaulted</KEYWORD2>
- <KEYWORD2>defaulting</KEYWORD2>
- <KEYWORD2>define</KEYWORD2>
- <KEYWORD2>delimiter</KEYWORD2>
- <OPERATOR>difference</OPERATOR>
- <KEYWORD3>digit</KEYWORD3>
- <KEYWORD2>directory</KEYWORD2>
- <KEYWORD1>discard</KEYWORD1>
- <OPERATOR>divide</OPERATOR>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD2>doctype</KEYWORD2>
- <KEYWORD2>document</KEYWORD2>
- <KEYWORD2>document-element</KEYWORD2>
- <KEYWORD2>document-end</KEYWORD2>
- <KEYWORD2>document-start</KEYWORD2>
- <KEYWORD2>domain-free</KEYWORD2>
- <KEYWORD1>done</KEYWORD1>
- <KEYWORD2>down-translate</KEYWORD2>
- <OPERATOR>drop</OPERATOR>
- <KEYWORD2>dtd</KEYWORD2>
- <KEYWORD2>dtd-end</KEYWORD2>
- <KEYWORD2>dtd-start</KEYWORD2>
- <KEYWORD2>dtds</KEYWORD2>
- <KEYWORD2>element</KEYWORD2>
- <KEYWORD2>elements</KEYWORD2>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD2>elsewhere</KEYWORD2>
- <KEYWORD2>empty</KEYWORD2>
- <KEYWORD2>entities</KEYWORD2>
- <KEYWORD2>entity</KEYWORD2>
- <KEYWORD2>epilog-start</KEYWORD2>
- <OPERATOR>equal</OPERATOR>
- <OPERATOR>equals</OPERATOR>
- <KEYWORD2>escape</KEYWORD2>
- <KEYWORD1>except</KEYWORD1>
- <OPERATOR>exists</OPERATOR>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD2>external</KEYWORD2>
- <KEYWORD2>external-data-entity</KEYWORD2>
- <KEYWORD2>external-entity</KEYWORD2>
- <KEYWORD2>external-function</KEYWORD2>
- <KEYWORD2>external-output-function</KEYWORD2>
- <KEYWORD2>external-text-entity</KEYWORD2>
- <KEYWORD2>false</KEYWORD2>
- <OPERATOR>file</OPERATOR>
- <KEYWORD2>find</KEYWORD2>
- <KEYWORD2>find-end</KEYWORD2>
- <KEYWORD2>find-start</KEYWORD2>
- <OPERATOR>floor</OPERATOR>
- <KEYWORD1>flush</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>format</KEYWORD1>
- <KEYWORD2>function</KEYWORD2>
- <KEYWORD2>function-library</KEYWORD2>
- <KEYWORD2>general</KEYWORD2>
- <KEYWORD2>global</KEYWORD2>
- <OPERATOR>greater-equal</OPERATOR>
- <OPERATOR>greater-than</OPERATOR>
- <KEYWORD2>group</KEYWORD2>
- <KEYWORD2>groups</KEYWORD2>
- <KEYWORD1>halt</KEYWORD1>
- <KEYWORD1>halt-everything</KEYWORD1>
- <OPERATOR>has</OPERATOR>
- <OPERATOR>hasnt</OPERATOR>
- <KEYWORD2>heralded-names</KEYWORD2>
- <KEYWORD2>id</KEYWORD2>
- <KEYWORD2>id-checking</KEYWORD2>
- <KEYWORD2>idref</KEYWORD2>
- <KEYWORD2>idrefs</KEYWORD2>
- <KEYWORD2>ignore</KEYWORD2>
- <KEYWORD2>implied</KEYWORD2>
- <KEYWORD2>in</KEYWORD2>
- <KEYWORD2>in-library</KEYWORD2>
- <KEYWORD2>include</KEYWORD2>
- <KEYWORD2>include-end</KEYWORD2>
- <KEYWORD2>include-guard</KEYWORD2>
- <KEYWORD2>include-start</KEYWORD2>
- <KEYWORD2>inclusion</KEYWORD2>
- <KEYWORD1>increment</KEYWORD1>
- <KEYWORD2>initial</KEYWORD2>
- <KEYWORD2>initial-size</KEYWORD2>
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD2>insertion-break</KEYWORD2>
- <KEYWORD2>instance</KEYWORD2>
- <KEYWORD2>integer</KEYWORD2>
- <KEYWORD2>internal</KEYWORD2>
- <KEYWORD2>invalid-data</KEYWORD2>
- <OPERATOR>is</OPERATOR>
- <OPERATOR>isnt</OPERATOR>
- <OPERATOR>item</OPERATOR>
- <KEYWORD1>join</KEYWORD1>
- <OPERATOR>key</OPERATOR>
- <KEYWORD2>keyed</KEYWORD2>
- <OPERATOR>last</OPERATOR>
- <OPERATOR>lastmost</OPERATOR>
- <KEYWORD3>lc</KEYWORD3>
- <OPERATOR>length</OPERATOR>
- <OPERATOR>less-equal</OPERATOR>
- <OPERATOR>less-than</OPERATOR>
- <KEYWORD3>letter</KEYWORD3>
- <KEYWORD2>letters</KEYWORD2>
- <KEYWORD2>library</KEYWORD2>
- <KEYWORD3>line-end</KEYWORD3>
- <KEYWORD3>line-start</KEYWORD3>
- <OPERATOR>literal</OPERATOR>
- <KEYWORD2>local</KEYWORD2>
- <OPERATOR>ln</OPERATOR>
- <KEYWORD1>log</KEYWORD1>
- <OPERATOR>log10</OPERATOR>
- <OPERATOR>lookahead</OPERATOR>
- <KEYWORD2>macro</KEYWORD2>
- <KEYWORD2>macro-end</KEYWORD2>
- <KEYWORD2>marked-section</KEYWORD2>
- <KEYWORD2>markup-comment</KEYWORD2>
- <KEYWORD2>markup-error</KEYWORD2>
- <KEYWORD2>markup-parser</KEYWORD2>
- <KEYWORD2>markup-wrapper</KEYWORD2>
- <OPERATOR>mask</OPERATOR>
- <KEYWORD1>match</KEYWORD1>
- <OPERATOR>matches</OPERATOR>
- <OPERATOR>minus</OPERATOR>
- <KEYWORD2>mixed</KEYWORD2>
- <KEYWORD2>modifiable</KEYWORD2>
- <OPERATOR>modulo</OPERATOR>
- <OPERATOR>name</OPERATOR>
- <KEYWORD2>name-letters</KEYWORD2>
- <KEYWORD2>namecase</KEYWORD2>
- <KEYWORD2>named</KEYWORD2>
- <KEYWORD2>names</KEYWORD2>
- <KEYWORD2>ndata-entity</KEYWORD2>
- <OPERATOR>negate</OPERATOR>
- <KEYWORD2>nested-referents</KEYWORD2>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD2>newline</KEYWORD2>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD2>nmtoken</KEYWORD2>
- <KEYWORD2>nmtokens</KEYWORD2>
- <KEYWORD2>no</KEYWORD2>
- <KEYWORD2>no-default-io</KEYWORD2>
- <KEYWORD3>non-cdata</KEYWORD3>
- <KEYWORD2>non-implied</KEYWORD2>
- <KEYWORD3>non-sdata</KEYWORD3>
- <OPERATOR>not</OPERATOR>
- <KEYWORD1>not-reached</KEYWORD1>
- <KEYWORD2>notation</KEYWORD2>
- <KEYWORD2>number</KEYWORD2>
- <OPERATOR>number-of</OPERATOR>
- <KEYWORD2>numbers</KEYWORD2>
- <KEYWORD3>null</KEYWORD3>
- <KEYWORD2>nutoken</KEYWORD2>
- <KEYWORD2>nutokens</KEYWORD2>
- <OPERATOR>occurrence</OPERATOR>
- <OPERATOR>of</OPERATOR>
- <KEYWORD2>opaque</KEYWORD2>
- <KEYWORD1>open</KEYWORD1>
- <KEYWORD2>optional</KEYWORD2>
- <OPERATOR>or</OPERATOR>
- <KEYWORD1>output</KEYWORD1>
- <KEYWORD1>output-to</KEYWORD1>
- <KEYWORD1>over</KEYWORD1>
- <KEYWORD2>parameter</KEYWORD2>
- <KEYWORD2>parent</KEYWORD2>
- <KEYWORD2>past</KEYWORD2>
- <KEYWORD2>pattern</KEYWORD2>
- <KEYWORD3>pcdata</KEYWORD3>
- <KEYWORD2>plus</KEYWORD2>
- <KEYWORD2>preparent</KEYWORD2>
- <KEYWORD2>previous</KEYWORD2>
- <KEYWORD2>process</KEYWORD2>
- <KEYWORD2>process-end</KEYWORD2>
- <KEYWORD2>process-start</KEYWORD2>
- <KEYWORD2>processing-instruction</KEYWORD2>
- <KEYWORD2>prolog-end</KEYWORD2>
- <KEYWORD2>prolog-in-error</KEYWORD2>
- <KEYWORD2>proper</KEYWORD2>
- <KEYWORD2>public</KEYWORD2>
- <KEYWORD1>put</KEYWORD1>
- <KEYWORD3>rcdata</KEYWORD3>
- <KEYWORD1>remove</KEYWORD1>
- <KEYWORD2>read-only</KEYWORD2>
- <KEYWORD2>readable</KEYWORD2>
- <KEYWORD2>referent</KEYWORD2>
- <KEYWORD2>referents</KEYWORD2>
- <KEYWORD2>referents-allowed</KEYWORD2>
- <KEYWORD2>referents-displayed</KEYWORD2>
- <KEYWORD2>referents-not-allowed</KEYWORD2>
- <KEYWORD2>remainder</KEYWORD2>
- <KEYWORD1>reopen</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD2>repeated</KEYWORD2>
- <KEYWORD2>replacement-break</KEYWORD2>
- <KEYWORD1>reset</KEYWORD1>
- <KEYWORD1>rethrow</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD2>reversed</KEYWORD2>
- <OPERATOR>round</OPERATOR>
- <KEYWORD1>save</KEYWORD1>
- <KEYWORD1>save-clear</KEYWORD1>
- <KEYWORD1>scan</KEYWORD1>
- <KEYWORD3>sdata</KEYWORD3>
- <KEYWORD2>sdata-entity</KEYWORD2>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>sgml</KEYWORD1>
- <KEYWORD2>sgml-comment</KEYWORD2>
- <KEYWORD2>sgml-declaration-end</KEYWORD2>
- <KEYWORD2>sgml-dtd</KEYWORD2>
- <KEYWORD2>sgml-dtds</KEYWORD2>
- <KEYWORD2>sgml-error</KEYWORD2>
- <KEYWORD1>sgml-in</KEYWORD1>
- <KEYWORD1>sgml-out</KEYWORD1>
- <KEYWORD1>sgml-parse</KEYWORD1>
- <KEYWORD1>sgml-parser</KEYWORD1>
- <OPERATOR>shift</OPERATOR>
- <KEYWORD2>silent-referent</KEYWORD2>
- <KEYWORD2>size</KEYWORD2>
- <KEYWORD1>skip</KEYWORD1>
- <KEYWORD2>source</KEYWORD2>
- <KEYWORD3>space</KEYWORD3>
- <KEYWORD2>specified</KEYWORD2>
- <OPERATOR>sqrt</OPERATOR>
- <OPERATOR>status</OPERATOR>
- <KEYWORD2>stream</KEYWORD2>
- <KEYWORD2>subdoc-entity</KEYWORD2>
- <KEYWORD2>subdocument</KEYWORD2>
- <KEYWORD2>subdocuments</KEYWORD2>
- <KEYWORD2>subelement</KEYWORD2>
- <KEYWORD1>submit</KEYWORD1>
- <KEYWORD1>succeed</KEYWORD1>
- <KEYWORD1>suppress</KEYWORD1>
- <KEYWORD2>switch</KEYWORD2>
- <KEYWORD2>symbol</KEYWORD2>
- <KEYWORD2>system</KEYWORD2>
- <KEYWORD1>system-call</KEYWORD1>
- <OPERATOR>take</OPERATOR>
- <KEYWORD1>test-system</KEYWORD1>
- <KEYWORD3>text</KEYWORD3>
- <KEYWORD2>text-mode</KEYWORD2>
- <OPERATOR>this</OPERATOR>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD2>thrown</KEYWORD2>
- <KEYWORD2>times</KEYWORD2>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD2>token</KEYWORD2>
- <KEYWORD2>translate</KEYWORD2>
- <KEYWORD2>true</KEYWORD2>
- <OPERATOR>truncate</OPERATOR>
- <KEYWORD3>uc</KEYWORD3>
- <OPERATOR>ul</OPERATOR>
- <OPERATOR>unanchored</OPERATOR>
- <KEYWORD2>unattached</KEYWORD2>
- <KEYWORD2>unbuffered</KEYWORD2>
- <OPERATOR>union</OPERATOR>
- <KEYWORD1>unless</KEYWORD1>
- <KEYWORD2>up-translate</KEYWORD2>
- <OPERATOR>usemap</OPERATOR>
- <KEYWORD1>using</KEYWORD1>
- <KEYWORD2>value</KEYWORD2>
- <KEYWORD3>value-end</KEYWORD3>
- <KEYWORD3>value-start</KEYWORD3>
- <KEYWORD2>valued</KEYWORD2>
- <KEYWORD2>variable</KEYWORD2>
- <KEYWORD1>when</KEYWORD1>
- <KEYWORD3>white-space</KEYWORD3>
- <OPERATOR>with</OPERATOR>
- <KEYWORD3>word-end</KEYWORD3>
- <KEYWORD3>word-start</KEYWORD3>
- <KEYWORD2>writable</KEYWORD2>
- <KEYWORD2>xml</KEYWORD2>
- <KEYWORD2>xml-dtd</KEYWORD2>
- <KEYWORD2>xml-dtds</KEYWORD2>
- <KEYWORD1>xml-parse</KEYWORD1>
- <KEYWORD2>yes</KEYWORD2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!-- contributed by Lionel Fiol <lio-sand at ifrance.com> -->
+<!-- 09/NOV/2001: add automatic indentation properties -->
+<!-- correct and add some keywords -->
+<!-- reorganize all keywords (sorted) -->
+<!-- 20/APR/2004: all keywords are now in lower case -->
+<!-- 06/MAY/2004: add specific patterns for invalid literals -->
+<!-- 06/JUN/2004: add '.' (dot) in the noWordSep property -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentNextLines" VALUE="\s*((PROCESS|MARKUP|EXTERNAL|DOCUMENT|DTD|ELEMENT|FIND|TRANSLATE)((-|\s).*|\s*)|(DO|ELSE|REPEAT|MATCH|CASE|USING|GROUP|DEFINE|MACRO)(\s+.*|\s*))" />
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ <PROPERTY NAME="noWordSep" VALUE=".-_" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1">#!</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+ <!-- Literals -->
+ <SPAN_REGEXP HASH_CHAR='"' NO_LINE_BREAK="TRUE" TYPE="INVALID">
+ <BEGIN>"((?!$)[^"])*$</BEGIN>
+ <END>$</END>
+ </SPAN_REGEXP>
+ <SPAN TYPE="LITERAL1" ESCAPE="%" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN_REGEXP HASH_CHAR="'" NO_LINE_BREAK="TRUE" TYPE="INVALID">
+ <BEGIN>'((?!$)[^'])*$</BEGIN>
+ <END>$</END>
+ </SPAN_REGEXP>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <!-- Operators -->
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <!-- two next lines were removed as they conflict with the noWordSep property -->
+ <!-- <SEQ TYPE="OPERATOR">-</SEQ> -->
+ <!-- <SEQ TYPE="OPERATOR">_</SEQ> -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">$</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <!-- Keywords -->
+ <KEYWORDS>
+ <KEYWORD2>#additional-info</KEYWORD2>
+ <KEYWORD2>#appinfo</KEYWORD2>
+ <KEYWORD2>#args</KEYWORD2>
+ <KEYWORD2>#capacity</KEYWORD2>
+ <KEYWORD2>#charset</KEYWORD2>
+ <KEYWORD2>#class</KEYWORD2>
+ <KEYWORD2>#command-line-names</KEYWORD2>
+ <KEYWORD2>#console</KEYWORD2>
+ <KEYWORD2>#current-input</KEYWORD2>
+ <KEYWORD2>#current-output</KEYWORD2>
+ <KEYWORD2>#data</KEYWORD2>
+ <KEYWORD2>#doctype</KEYWORD2>
+ <KEYWORD2>#document</KEYWORD2>
+ <KEYWORD2>#dtd</KEYWORD2>
+ <KEYWORD2>#empty</KEYWORD2>
+ <KEYWORD2>#error</KEYWORD2>
+ <KEYWORD2>#error-code</KEYWORD2>
+ <KEYWORD2>#external-exception</KEYWORD2>
+ <KEYWORD2>#file-name</KEYWORD2>
+ <KEYWORD2>#first</KEYWORD2>
+ <KEYWORD2>#group</KEYWORD2>
+ <KEYWORD2>#implied</KEYWORD2>
+ <KEYWORD2>#item</KEYWORD2>
+ <KEYWORD2>#language-version</KEYWORD2>
+ <KEYWORD2>#last</KEYWORD2>
+ <KEYWORD2>#libpath</KEYWORD2>
+ <KEYWORD2>#library</KEYWORD2>
+ <KEYWORD2>#libvalue</KEYWORD2>
+ <KEYWORD2>#line-number</KEYWORD2>
+ <KEYWORD2>#main-input</KEYWORD2>
+ <KEYWORD2>#main-output</KEYWORD2>
+ <KEYWORD2>#markup-error-count</KEYWORD2>
+ <KEYWORD2>#markup-error-total</KEYWORD2>
+ <KEYWORD2>#markup-parser</KEYWORD2>
+ <KEYWORD2>#markup-warning-count</KEYWORD2>
+ <KEYWORD2>#markup-warning-total</KEYWORD2>
+ <KEYWORD2>#message</KEYWORD2>
+ <KEYWORD2>#none</KEYWORD2>
+ <KEYWORD2>#output</KEYWORD2>
+ <KEYWORD2>#platform-info</KEYWORD2>
+ <KEYWORD2>#process-input</KEYWORD2>
+ <KEYWORD2>#process-output</KEYWORD2>
+ <KEYWORD2>#program-error</KEYWORD2>
+ <KEYWORD2>#recovery-info</KEYWORD2>
+ <KEYWORD2>#sgml</KEYWORD2>
+ <KEYWORD2>#sgml-error-count</KEYWORD2>
+ <KEYWORD2>#sgml-error-total</KEYWORD2>
+ <KEYWORD2>#sgml-warning-count</KEYWORD2>
+ <KEYWORD2>#sgml-warning-total</KEYWORD2>
+ <KEYWORD2>#suppress</KEYWORD2>
+ <KEYWORD2>#syntax</KEYWORD2>
+ <KEYWORD2>#!</KEYWORD2>
+ <OPERATOR>abs</OPERATOR>
+ <KEYWORD1>activate</KEYWORD1>
+ <OPERATOR>active</OPERATOR>
+ <KEYWORD2>after</KEYWORD2>
+ <KEYWORD1>again</KEYWORD1>
+ <KEYWORD2>ancestor</KEYWORD2>
+ <KEYWORD2>and</KEYWORD2>
+ <KEYWORD2>another</KEYWORD2>
+ <KEYWORD1>always</KEYWORD1>
+ <OPERATOR>and</OPERATOR>
+ <KEYWORD3>any</KEYWORD3>
+ <KEYWORD3>any-text</KEYWORD3>
+ <KEYWORD2>arg</KEYWORD2>
+ <OPERATOR>as</OPERATOR>
+ <KEYWORD1>assert</KEYWORD1>
+ <KEYWORD2>attached</KEYWORD2>
+ <KEYWORD2>attribute</KEYWORD2>
+ <KEYWORD2>attributes</KEYWORD2>
+ <OPERATOR>base</OPERATOR>
+ <KEYWORD2>bcd</KEYWORD2>
+ <KEYWORD2>before</KEYWORD2>
+ <OPERATOR>binary</OPERATOR>
+ <KEYWORD2>binary-input</KEYWORD2>
+ <KEYWORD2>binary-mode</KEYWORD2>
+ <KEYWORD2>binary-output</KEYWORD2>
+ <KEYWORD3>blank</KEYWORD3>
+ <KEYWORD2>break-width</KEYWORD2>
+ <KEYWORD2>buffer</KEYWORD2>
+ <KEYWORD2>buffered</KEYWORD2>
+ <KEYWORD2>by</KEYWORD2>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD2>catchable</KEYWORD2>
+ <KEYWORD3>cdata</KEYWORD3>
+ <KEYWORD2>cdata-entity</KEYWORD2>
+ <OPERATOR>ceiling</OPERATOR>
+ <KEYWORD2>children</KEYWORD2>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD2>closed</KEYWORD2>
+ <OPERATOR>compiled-date</OPERATOR>
+ <OPERATOR>complement</OPERATOR>
+ <KEYWORD2>conref</KEYWORD2>
+ <KEYWORD2>content</KEYWORD2>
+ <KEYWORD3>content-end</KEYWORD3>
+ <KEYWORD3>content-start</KEYWORD3>
+ <KEYWORD2>context-translate</KEYWORD2>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>copy-clear</KEYWORD1>
+ <KEYWORD2>counter</KEYWORD2>
+ <KEYWORD2>created</KEYWORD2>
+ <OPERATOR>creating</OPERATOR>
+ <OPERATOR>creator</OPERATOR>
+ <KEYWORD2>cross-translate</KEYWORD2>
+ <KEYWORD2>current</KEYWORD2>
+ <KEYWORD2>data-attribute</KEYWORD2>
+ <KEYWORD2>data-attributes</KEYWORD2>
+ <KEYWORD2>data-content</KEYWORD2>
+ <KEYWORD2>data-letters</KEYWORD2>
+ <OPERATOR>date</OPERATOR>
+ <KEYWORD1>deactivate</KEYWORD1>
+ <KEYWORD2>declare</KEYWORD2>
+ <KEYWORD2>declared-conref</KEYWORD2>
+ <KEYWORD2>declared-current</KEYWORD2>
+ <KEYWORD2>declared-defaulted</KEYWORD2>
+ <KEYWORD2>declared-fixed</KEYWORD2>
+ <KEYWORD2>declared-implied</KEYWORD2>
+ <KEYWORD2>declared-required</KEYWORD2>
+ <KEYWORD1>decrement</KEYWORD1>
+ <KEYWORD2>default-entity</KEYWORD2>
+ <KEYWORD2>defaulted</KEYWORD2>
+ <KEYWORD2>defaulting</KEYWORD2>
+ <KEYWORD2>define</KEYWORD2>
+ <KEYWORD2>delimiter</KEYWORD2>
+ <OPERATOR>difference</OPERATOR>
+ <KEYWORD3>digit</KEYWORD3>
+ <KEYWORD2>directory</KEYWORD2>
+ <KEYWORD1>discard</KEYWORD1>
+ <OPERATOR>divide</OPERATOR>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD2>doctype</KEYWORD2>
+ <KEYWORD2>document</KEYWORD2>
+ <KEYWORD2>document-element</KEYWORD2>
+ <KEYWORD2>document-end</KEYWORD2>
+ <KEYWORD2>document-start</KEYWORD2>
+ <KEYWORD2>domain-free</KEYWORD2>
+ <KEYWORD1>done</KEYWORD1>
+ <KEYWORD2>down-translate</KEYWORD2>
+ <OPERATOR>drop</OPERATOR>
+ <KEYWORD2>dtd</KEYWORD2>
+ <KEYWORD2>dtd-end</KEYWORD2>
+ <KEYWORD2>dtd-start</KEYWORD2>
+ <KEYWORD2>dtds</KEYWORD2>
+ <KEYWORD2>element</KEYWORD2>
+ <KEYWORD2>elements</KEYWORD2>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD2>elsewhere</KEYWORD2>
+ <KEYWORD2>empty</KEYWORD2>
+ <KEYWORD2>entities</KEYWORD2>
+ <KEYWORD2>entity</KEYWORD2>
+ <KEYWORD2>epilog-start</KEYWORD2>
+ <OPERATOR>equal</OPERATOR>
+ <OPERATOR>equals</OPERATOR>
+ <KEYWORD2>escape</KEYWORD2>
+ <KEYWORD1>except</KEYWORD1>
+ <OPERATOR>exists</OPERATOR>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD2>external</KEYWORD2>
+ <KEYWORD2>external-data-entity</KEYWORD2>
+ <KEYWORD2>external-entity</KEYWORD2>
+ <KEYWORD2>external-function</KEYWORD2>
+ <KEYWORD2>external-output-function</KEYWORD2>
+ <KEYWORD2>external-text-entity</KEYWORD2>
+ <KEYWORD2>false</KEYWORD2>
+ <OPERATOR>file</OPERATOR>
+ <KEYWORD2>find</KEYWORD2>
+ <KEYWORD2>find-end</KEYWORD2>
+ <KEYWORD2>find-start</KEYWORD2>
+ <OPERATOR>floor</OPERATOR>
+ <KEYWORD1>flush</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>format</KEYWORD1>
+ <KEYWORD2>function</KEYWORD2>
+ <KEYWORD2>function-library</KEYWORD2>
+ <KEYWORD2>general</KEYWORD2>
+ <KEYWORD2>global</KEYWORD2>
+ <OPERATOR>greater-equal</OPERATOR>
+ <OPERATOR>greater-than</OPERATOR>
+ <KEYWORD2>group</KEYWORD2>
+ <KEYWORD2>groups</KEYWORD2>
+ <KEYWORD1>halt</KEYWORD1>
+ <KEYWORD1>halt-everything</KEYWORD1>
+ <OPERATOR>has</OPERATOR>
+ <OPERATOR>hasnt</OPERATOR>
+ <KEYWORD2>heralded-names</KEYWORD2>
+ <KEYWORD2>id</KEYWORD2>
+ <KEYWORD2>id-checking</KEYWORD2>
+ <KEYWORD2>idref</KEYWORD2>
+ <KEYWORD2>idrefs</KEYWORD2>
+ <KEYWORD2>ignore</KEYWORD2>
+ <KEYWORD2>implied</KEYWORD2>
+ <KEYWORD2>in</KEYWORD2>
+ <KEYWORD2>in-library</KEYWORD2>
+ <KEYWORD2>include</KEYWORD2>
+ <KEYWORD2>include-end</KEYWORD2>
+ <KEYWORD2>include-guard</KEYWORD2>
+ <KEYWORD2>include-start</KEYWORD2>
+ <KEYWORD2>inclusion</KEYWORD2>
+ <KEYWORD1>increment</KEYWORD1>
+ <KEYWORD2>initial</KEYWORD2>
+ <KEYWORD2>initial-size</KEYWORD2>
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD2>insertion-break</KEYWORD2>
+ <KEYWORD2>instance</KEYWORD2>
+ <KEYWORD2>integer</KEYWORD2>
+ <KEYWORD2>internal</KEYWORD2>
+ <KEYWORD2>invalid-data</KEYWORD2>
+ <OPERATOR>is</OPERATOR>
+ <OPERATOR>isnt</OPERATOR>
+ <OPERATOR>item</OPERATOR>
+ <KEYWORD1>join</KEYWORD1>
+ <OPERATOR>key</OPERATOR>
+ <KEYWORD2>keyed</KEYWORD2>
+ <OPERATOR>last</OPERATOR>
+ <OPERATOR>lastmost</OPERATOR>
+ <KEYWORD3>lc</KEYWORD3>
+ <OPERATOR>length</OPERATOR>
+ <OPERATOR>less-equal</OPERATOR>
+ <OPERATOR>less-than</OPERATOR>
+ <KEYWORD3>letter</KEYWORD3>
+ <KEYWORD2>letters</KEYWORD2>
+ <KEYWORD2>library</KEYWORD2>
+ <KEYWORD3>line-end</KEYWORD3>
+ <KEYWORD3>line-start</KEYWORD3>
+ <OPERATOR>literal</OPERATOR>
+ <KEYWORD2>local</KEYWORD2>
+ <OPERATOR>ln</OPERATOR>
+ <KEYWORD1>log</KEYWORD1>
+ <OPERATOR>log10</OPERATOR>
+ <OPERATOR>lookahead</OPERATOR>
+ <KEYWORD2>macro</KEYWORD2>
+ <KEYWORD2>macro-end</KEYWORD2>
+ <KEYWORD2>marked-section</KEYWORD2>
+ <KEYWORD2>markup-comment</KEYWORD2>
+ <KEYWORD2>markup-error</KEYWORD2>
+ <KEYWORD2>markup-parser</KEYWORD2>
+ <KEYWORD2>markup-wrapper</KEYWORD2>
+ <OPERATOR>mask</OPERATOR>
+ <KEYWORD1>match</KEYWORD1>
+ <OPERATOR>matches</OPERATOR>
+ <OPERATOR>minus</OPERATOR>
+ <KEYWORD2>mixed</KEYWORD2>
+ <KEYWORD2>modifiable</KEYWORD2>
+ <OPERATOR>modulo</OPERATOR>
+ <OPERATOR>name</OPERATOR>
+ <KEYWORD2>name-letters</KEYWORD2>
+ <KEYWORD2>namecase</KEYWORD2>
+ <KEYWORD2>named</KEYWORD2>
+ <KEYWORD2>names</KEYWORD2>
+ <KEYWORD2>ndata-entity</KEYWORD2>
+ <OPERATOR>negate</OPERATOR>
+ <KEYWORD2>nested-referents</KEYWORD2>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD2>newline</KEYWORD2>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD2>nmtoken</KEYWORD2>
+ <KEYWORD2>nmtokens</KEYWORD2>
+ <KEYWORD2>no</KEYWORD2>
+ <KEYWORD2>no-default-io</KEYWORD2>
+ <KEYWORD3>non-cdata</KEYWORD3>
+ <KEYWORD2>non-implied</KEYWORD2>
+ <KEYWORD3>non-sdata</KEYWORD3>
+ <OPERATOR>not</OPERATOR>
+ <KEYWORD1>not-reached</KEYWORD1>
+ <KEYWORD2>notation</KEYWORD2>
+ <KEYWORD2>number</KEYWORD2>
+ <OPERATOR>number-of</OPERATOR>
+ <KEYWORD2>numbers</KEYWORD2>
+ <KEYWORD3>null</KEYWORD3>
+ <KEYWORD2>nutoken</KEYWORD2>
+ <KEYWORD2>nutokens</KEYWORD2>
+ <OPERATOR>occurrence</OPERATOR>
+ <OPERATOR>of</OPERATOR>
+ <KEYWORD2>opaque</KEYWORD2>
+ <KEYWORD1>open</KEYWORD1>
+ <KEYWORD2>optional</KEYWORD2>
+ <OPERATOR>or</OPERATOR>
+ <KEYWORD1>output</KEYWORD1>
+ <KEYWORD1>output-to</KEYWORD1>
+ <KEYWORD1>over</KEYWORD1>
+ <KEYWORD2>parameter</KEYWORD2>
+ <KEYWORD2>parent</KEYWORD2>
+ <KEYWORD2>past</KEYWORD2>
+ <KEYWORD2>pattern</KEYWORD2>
+ <KEYWORD3>pcdata</KEYWORD3>
+ <KEYWORD2>plus</KEYWORD2>
+ <KEYWORD2>preparent</KEYWORD2>
+ <KEYWORD2>previous</KEYWORD2>
+ <KEYWORD2>process</KEYWORD2>
+ <KEYWORD2>process-end</KEYWORD2>
+ <KEYWORD2>process-start</KEYWORD2>
+ <KEYWORD2>processing-instruction</KEYWORD2>
+ <KEYWORD2>prolog-end</KEYWORD2>
+ <KEYWORD2>prolog-in-error</KEYWORD2>
+ <KEYWORD2>proper</KEYWORD2>
+ <KEYWORD2>public</KEYWORD2>
+ <KEYWORD1>put</KEYWORD1>
+ <KEYWORD3>rcdata</KEYWORD3>
+ <KEYWORD1>remove</KEYWORD1>
+ <KEYWORD2>read-only</KEYWORD2>
+ <KEYWORD2>readable</KEYWORD2>
+ <KEYWORD2>referent</KEYWORD2>
+ <KEYWORD2>referents</KEYWORD2>
+ <KEYWORD2>referents-allowed</KEYWORD2>
+ <KEYWORD2>referents-displayed</KEYWORD2>
+ <KEYWORD2>referents-not-allowed</KEYWORD2>
+ <KEYWORD2>remainder</KEYWORD2>
+ <KEYWORD1>reopen</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD2>repeated</KEYWORD2>
+ <KEYWORD2>replacement-break</KEYWORD2>
+ <KEYWORD1>reset</KEYWORD1>
+ <KEYWORD1>rethrow</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD2>reversed</KEYWORD2>
+ <OPERATOR>round</OPERATOR>
+ <KEYWORD1>save</KEYWORD1>
+ <KEYWORD1>save-clear</KEYWORD1>
+ <KEYWORD1>scan</KEYWORD1>
+ <KEYWORD3>sdata</KEYWORD3>
+ <KEYWORD2>sdata-entity</KEYWORD2>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>sgml</KEYWORD1>
+ <KEYWORD2>sgml-comment</KEYWORD2>
+ <KEYWORD2>sgml-declaration-end</KEYWORD2>
+ <KEYWORD2>sgml-dtd</KEYWORD2>
+ <KEYWORD2>sgml-dtds</KEYWORD2>
+ <KEYWORD2>sgml-error</KEYWORD2>
+ <KEYWORD1>sgml-in</KEYWORD1>
+ <KEYWORD1>sgml-out</KEYWORD1>
+ <KEYWORD1>sgml-parse</KEYWORD1>
+ <KEYWORD1>sgml-parser</KEYWORD1>
+ <OPERATOR>shift</OPERATOR>
+ <KEYWORD2>silent-referent</KEYWORD2>
+ <KEYWORD2>size</KEYWORD2>
+ <KEYWORD1>skip</KEYWORD1>
+ <KEYWORD2>source</KEYWORD2>
+ <KEYWORD3>space</KEYWORD3>
+ <KEYWORD2>specified</KEYWORD2>
+ <OPERATOR>sqrt</OPERATOR>
+ <OPERATOR>status</OPERATOR>
+ <KEYWORD2>stream</KEYWORD2>
+ <KEYWORD2>subdoc-entity</KEYWORD2>
+ <KEYWORD2>subdocument</KEYWORD2>
+ <KEYWORD2>subdocuments</KEYWORD2>
+ <KEYWORD2>subelement</KEYWORD2>
+ <KEYWORD1>submit</KEYWORD1>
+ <KEYWORD1>succeed</KEYWORD1>
+ <KEYWORD1>suppress</KEYWORD1>
+ <KEYWORD2>switch</KEYWORD2>
+ <KEYWORD2>symbol</KEYWORD2>
+ <KEYWORD2>system</KEYWORD2>
+ <KEYWORD1>system-call</KEYWORD1>
+ <OPERATOR>take</OPERATOR>
+ <KEYWORD1>test-system</KEYWORD1>
+ <KEYWORD3>text</KEYWORD3>
+ <KEYWORD2>text-mode</KEYWORD2>
+ <OPERATOR>this</OPERATOR>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD2>thrown</KEYWORD2>
+ <KEYWORD2>times</KEYWORD2>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD2>token</KEYWORD2>
+ <KEYWORD2>translate</KEYWORD2>
+ <KEYWORD2>true</KEYWORD2>
+ <OPERATOR>truncate</OPERATOR>
+ <KEYWORD3>uc</KEYWORD3>
+ <OPERATOR>ul</OPERATOR>
+ <OPERATOR>unanchored</OPERATOR>
+ <KEYWORD2>unattached</KEYWORD2>
+ <KEYWORD2>unbuffered</KEYWORD2>
+ <OPERATOR>union</OPERATOR>
+ <KEYWORD1>unless</KEYWORD1>
+ <KEYWORD2>up-translate</KEYWORD2>
+ <OPERATOR>usemap</OPERATOR>
+ <KEYWORD1>using</KEYWORD1>
+ <KEYWORD2>value</KEYWORD2>
+ <KEYWORD3>value-end</KEYWORD3>
+ <KEYWORD3>value-start</KEYWORD3>
+ <KEYWORD2>valued</KEYWORD2>
+ <KEYWORD2>variable</KEYWORD2>
+ <KEYWORD1>when</KEYWORD1>
+ <KEYWORD3>white-space</KEYWORD3>
+ <OPERATOR>with</OPERATOR>
+ <KEYWORD3>word-end</KEYWORD3>
+ <KEYWORD3>word-start</KEYWORD3>
+ <KEYWORD2>writable</KEYWORD2>
+ <KEYWORD2>xml</KEYWORD2>
+ <KEYWORD2>xml-dtd</KEYWORD2>
+ <KEYWORD2>xml-dtds</KEYWORD2>
+ <KEYWORD1>xml-parse</KEYWORD1>
+ <KEYWORD2>yes</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/pascal.xml b/jEdit/modes/pascal.xml
index d411d56..fcae780 100644
--- a/jEdit/modes/pascal.xml
+++ b/jEdit/modes/pascal.xml
@@ -1,221 +1,221 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Pascal mode by Kristian Ovaska.
- Delphi 3 was used as reference.
- Modified by Barry Carr (Ixian Software Components Ltd)
- Delphi 6 was used as reference.
- Modified by Barry Carr (Ixian Software Components Ltd) Feb '04
- Delphi 8 (for .NET) was used as reference
- Keywords = KEYWORD1
- Directives = KEYWORD2.
- Everything else as is-->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="{" />
- <PROPERTY NAME="commentEnd" VALUE="}" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Compiler directives. -->
- <SPAN TYPE="COMMENT3">
- <BEGIN>{$</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="COMMENT3">
- <BEGIN>(*$</BEGIN>
- <END>*)</END>
- </SPAN>
-
- <!-- Normal comments. -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>(*</BEGIN>
- <END>*)</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <KEYWORDS>
- <!-- Reserved words. Standard directives are not included, except
- private, protected, public, published, and automated. -->
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>array</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>at</KEYWORD1>
- <KEYWORD1>asm</KEYWORD1>
- <KEYWORD1>begin</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>constructor</KEYWORD1>
- <KEYWORD1>destructor</KEYWORD1>
- <KEYWORD1>dispinterface</KEYWORD1>
- <KEYWORD1>div</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>downto</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>except</KEYWORD1>
- <KEYWORD1>exports</KEYWORD1>
- <KEYWORD1>file</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>finalization</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>implementation</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>inherited</KEYWORD1>
- <KEYWORD1>initialization</KEYWORD1>
- <KEYWORD1>inline</KEYWORD1>
- <KEYWORD1>interface</KEYWORD1>
- <KEYWORD1>is</KEYWORD1>
- <KEYWORD1>label</KEYWORD1>
- <KEYWORD1>mod</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>object</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>packed</KEYWORD1>
- <KEYWORD1>procedure</KEYWORD1>
- <KEYWORD1>program</KEYWORD1>
- <KEYWORD1>property</KEYWORD1>
- <KEYWORD1>raise</KEYWORD1>
- <KEYWORD1>record</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>resourcestring</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>sealed</KEYWORD1>
- <KEYWORD1>shl</KEYWORD1>
- <KEYWORD1>shr</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>string</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>threadvar</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
- <KEYWORD1>unit</KEYWORD1>
- <KEYWORD1>unsafe</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>uses</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
- <KEYWORD1>xor</KEYWORD1>
-
- <KEYWORD2>absolute</KEYWORD2>
- <KEYWORD2>abstract</KEYWORD2>
- <KEYWORD2>assembler</KEYWORD2>
- <KEYWORD2>automated</KEYWORD2>
- <KEYWORD2>cdecl</KEYWORD2>
- <KEYWORD2>contains</KEYWORD2>
- <KEYWORD2>default</KEYWORD2>
- <KEYWORD2>deprecated</KEYWORD2>
- <KEYWORD2>dispid</KEYWORD2>
- <KEYWORD2>dynamic</KEYWORD2>
- <KEYWORD2>export</KEYWORD2>
- <KEYWORD2>external</KEYWORD2>
- <KEYWORD2>far</KEYWORD2>
- <KEYWORD2>forward</KEYWORD2>
- <KEYWORD2>implements</KEYWORD2>
- <KEYWORD2>index</KEYWORD2>
- <KEYWORD2>library</KEYWORD2>
- <KEYWORD2>local</KEYWORD2>
- <KEYWORD2>message</KEYWORD2>
- <KEYWORD2>name</KEYWORD2>
- <KEYWORD2>namespaces</KEYWORD2>
- <KEYWORD2>near</KEYWORD2>
- <KEYWORD2>nodefault</KEYWORD2>
- <KEYWORD2>overload</KEYWORD2>
- <KEYWORD2>override</KEYWORD2>
- <KEYWORD2>package</KEYWORD2>
- <KEYWORD2>pascal</KEYWORD2>
- <KEYWORD2>platform</KEYWORD2>
- <KEYWORD2>private</KEYWORD2>
- <KEYWORD2>protected</KEYWORD2>
- <KEYWORD2>public</KEYWORD2>
- <KEYWORD2>published</KEYWORD2>
- <KEYWORD2>read</KEYWORD2>
- <KEYWORD2>readonly</KEYWORD2>
- <KEYWORD2>register</KEYWORD2>
- <KEYWORD2>reintroduce</KEYWORD2>
- <KEYWORD2>requires</KEYWORD2>
- <KEYWORD2>resident</KEYWORD2>
- <KEYWORD2>safecall</KEYWORD2>
- <KEYWORD2>stdcall</KEYWORD2>
- <KEYWORD2>stored</KEYWORD2>
- <KEYWORD2>varargs</KEYWORD2>
- <KEYWORD2>virtual</KEYWORD2>
- <KEYWORD2>write</KEYWORD2>
- <KEYWORD2>writeonly</KEYWORD2>
-
- <!-- Ordinal types. -->
- <KEYWORD3>shortint</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>smallint</KEYWORD3>
- <KEYWORD3>integer</KEYWORD3>
- <KEYWORD3>word</KEYWORD3>
- <KEYWORD3>longint</KEYWORD3>
- <KEYWORD3>cardinal</KEYWORD3>
- <!-- Boolean types. -->
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD3>bytebool</KEYWORD3>
- <KEYWORD3>wordbool</KEYWORD3>
- <KEYWORD3>longbool</KEYWORD3>
- <!-- Real types. -->
- <KEYWORD3>real</KEYWORD3>
- <KEYWORD3>single</KEYWORD3>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>extended</KEYWORD3>
- <KEYWORD3>comp</KEYWORD3>
- <KEYWORD3>currency</KEYWORD3>
- <!-- Untyped pointer. -->
- <KEYWORD3>pointer</KEYWORD3>
-
- <LITERAL2>false</LITERAL2>
- <LITERAL2>nil</LITERAL2>
- <LITERAL2>self</LITERAL2>
- <LITERAL2>true</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Pascal mode by Kristian Ovaska.
+ Delphi 3 was used as reference.
+ Modified by Barry Carr (Ixian Software Components Ltd)
+ Delphi 6 was used as reference.
+ Modified by Barry Carr (Ixian Software Components Ltd) Feb '04
+ Delphi 8 (for .NET) was used as reference
+ Keywords = KEYWORD1
+ Directives = KEYWORD2.
+ Everything else as is-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="{" />
+ <PROPERTY NAME="commentEnd" VALUE="}" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Compiler directives. -->
+ <SPAN TYPE="COMMENT3">
+ <BEGIN>{$</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="COMMENT3">
+ <BEGIN>(*$</BEGIN>
+ <END>*)</END>
+ </SPAN>
+
+ <!-- Normal comments. -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>(*</BEGIN>
+ <END>*)</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <KEYWORDS>
+ <!-- Reserved words. Standard directives are not included, except
+ private, protected, public, published, and automated. -->
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>array</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>at</KEYWORD1>
+ <KEYWORD1>asm</KEYWORD1>
+ <KEYWORD1>begin</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>constructor</KEYWORD1>
+ <KEYWORD1>destructor</KEYWORD1>
+ <KEYWORD1>dispinterface</KEYWORD1>
+ <KEYWORD1>div</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>downto</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>except</KEYWORD1>
+ <KEYWORD1>exports</KEYWORD1>
+ <KEYWORD1>file</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>finalization</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>implementation</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>inherited</KEYWORD1>
+ <KEYWORD1>initialization</KEYWORD1>
+ <KEYWORD1>inline</KEYWORD1>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD1>is</KEYWORD1>
+ <KEYWORD1>label</KEYWORD1>
+ <KEYWORD1>mod</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>object</KEYWORD1>
+ <KEYWORD1>of</KEYWORD1>
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+ <KEYWORD1>packed</KEYWORD1>
+ <KEYWORD1>procedure</KEYWORD1>
+ <KEYWORD1>program</KEYWORD1>
+ <KEYWORD1>property</KEYWORD1>
+ <KEYWORD1>raise</KEYWORD1>
+ <KEYWORD1>record</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>resourcestring</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>sealed</KEYWORD1>
+ <KEYWORD1>shl</KEYWORD1>
+ <KEYWORD1>shr</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>threadvar</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>type</KEYWORD1>
+ <KEYWORD1>unit</KEYWORD1>
+ <KEYWORD1>unsafe</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>uses</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+ <KEYWORD1>xor</KEYWORD1>
+
+ <KEYWORD2>absolute</KEYWORD2>
+ <KEYWORD2>abstract</KEYWORD2>
+ <KEYWORD2>assembler</KEYWORD2>
+ <KEYWORD2>automated</KEYWORD2>
+ <KEYWORD2>cdecl</KEYWORD2>
+ <KEYWORD2>contains</KEYWORD2>
+ <KEYWORD2>default</KEYWORD2>
+ <KEYWORD2>deprecated</KEYWORD2>
+ <KEYWORD2>dispid</KEYWORD2>
+ <KEYWORD2>dynamic</KEYWORD2>
+ <KEYWORD2>export</KEYWORD2>
+ <KEYWORD2>external</KEYWORD2>
+ <KEYWORD2>far</KEYWORD2>
+ <KEYWORD2>forward</KEYWORD2>
+ <KEYWORD2>implements</KEYWORD2>
+ <KEYWORD2>index</KEYWORD2>
+ <KEYWORD2>library</KEYWORD2>
+ <KEYWORD2>local</KEYWORD2>
+ <KEYWORD2>message</KEYWORD2>
+ <KEYWORD2>name</KEYWORD2>
+ <KEYWORD2>namespaces</KEYWORD2>
+ <KEYWORD2>near</KEYWORD2>
+ <KEYWORD2>nodefault</KEYWORD2>
+ <KEYWORD2>overload</KEYWORD2>
+ <KEYWORD2>override</KEYWORD2>
+ <KEYWORD2>package</KEYWORD2>
+ <KEYWORD2>pascal</KEYWORD2>
+ <KEYWORD2>platform</KEYWORD2>
+ <KEYWORD2>private</KEYWORD2>
+ <KEYWORD2>protected</KEYWORD2>
+ <KEYWORD2>public</KEYWORD2>
+ <KEYWORD2>published</KEYWORD2>
+ <KEYWORD2>read</KEYWORD2>
+ <KEYWORD2>readonly</KEYWORD2>
+ <KEYWORD2>register</KEYWORD2>
+ <KEYWORD2>reintroduce</KEYWORD2>
+ <KEYWORD2>requires</KEYWORD2>
+ <KEYWORD2>resident</KEYWORD2>
+ <KEYWORD2>safecall</KEYWORD2>
+ <KEYWORD2>stdcall</KEYWORD2>
+ <KEYWORD2>stored</KEYWORD2>
+ <KEYWORD2>varargs</KEYWORD2>
+ <KEYWORD2>virtual</KEYWORD2>
+ <KEYWORD2>write</KEYWORD2>
+ <KEYWORD2>writeonly</KEYWORD2>
+
+ <!-- Ordinal types. -->
+ <KEYWORD3>shortint</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>smallint</KEYWORD3>
+ <KEYWORD3>integer</KEYWORD3>
+ <KEYWORD3>word</KEYWORD3>
+ <KEYWORD3>longint</KEYWORD3>
+ <KEYWORD3>cardinal</KEYWORD3>
+ <!-- Boolean types. -->
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD3>bytebool</KEYWORD3>
+ <KEYWORD3>wordbool</KEYWORD3>
+ <KEYWORD3>longbool</KEYWORD3>
+ <!-- Real types. -->
+ <KEYWORD3>real</KEYWORD3>
+ <KEYWORD3>single</KEYWORD3>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>extended</KEYWORD3>
+ <KEYWORD3>comp</KEYWORD3>
+ <KEYWORD3>currency</KEYWORD3>
+ <!-- Untyped pointer. -->
+ <KEYWORD3>pointer</KEYWORD3>
+
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>nil</LITERAL2>
+ <LITERAL2>self</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/patch.xml b/jEdit/modes/patch.xml
index c2ac51a..15d2392 100644
--- a/jEdit/modes/patch.xml
+++ b/jEdit/modes/patch.xml
@@ -1,18 +1,18 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <RULES>
- <EOL_SPAN TYPE="LITERAL1" AT_LINE_START="TRUE">+++</EOL_SPAN>
- <EOL_SPAN TYPE="LITERAL2" AT_LINE_START="TRUE">---</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD3" AT_LINE_START="TRUE">Index: </EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD1" AT_LINE_START="TRUE">+</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD1" AT_LINE_START="TRUE">></EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2" AT_LINE_START="TRUE">-</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2" AT_LINE_START="TRUE"><</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD3" AT_LINE_START="TRUE">!</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD3" AT_LINE_START="TRUE">@@</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD3" AT_LINE_START="TRUE">*</EOL_SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <RULES>
+ <EOL_SPAN TYPE="LITERAL1" AT_LINE_START="TRUE">+++</EOL_SPAN>
+ <EOL_SPAN TYPE="LITERAL2" AT_LINE_START="TRUE">---</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD3" AT_LINE_START="TRUE">Index: </EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD1" AT_LINE_START="TRUE">+</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD1" AT_LINE_START="TRUE">></EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2" AT_LINE_START="TRUE">-</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2" AT_LINE_START="TRUE"><</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD3" AT_LINE_START="TRUE">!</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD3" AT_LINE_START="TRUE">@@</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD3" AT_LINE_START="TRUE">*</EOL_SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/perl.xml b/jEdit/modes/perl.xml
index 789e77a..78e881f 100644
--- a/jEdit/modes/perl.xml
+++ b/jEdit/modes/perl.xml
@@ -1,815 +1,815 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine" VALUE="[^#]*\.\s*$" />
- </PROPS>
-
- <!-- no ESCAPE char because we need the backslash for references -->
- <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="FALSE">
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- TYPE is LABEL so that =head1 and =cut are highlighted as so -->
- <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
- <BEGIN>=head1</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
- <BEGIN>=head2</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
- <BEGIN>=head3</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
- <BEGIN>=head4</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN TYPE="LABEL" AT_LINE_START="TRUE" DELEGATE="POD">
- <BEGIN>=item</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
- <BEGIN>=over</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
- <BEGIN>=back</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
- <BEGIN>=pod</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
- <BEGIN>=for</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
- <BEGIN>=begin</BEGIN>
- <END>=cut</END>
- </SPAN>
- <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
- <BEGIN>=end</BEGIN>
- <END>=cut</END>
- </SPAN>
-
- <!-- Some other things that confuse the mode file. -->
- <SEQ TYPE="OPERATOR">*"</SEQ>
- <SEQ TYPE="OPERATOR">*'</SEQ>
- <SEQ TYPE="OPERATOR">&"</SEQ>
- <SEQ TYPE="OPERATOR">&'</SEQ>
-
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- Scalar variables -->
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
-
- <!-- Array variables -->
- <SEQ_REGEXP HASH_CHAR="@" TYPE="KEYWORD2">@((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
-
- <!-- Associative Array (= Hash) variables -->
- <SEQ_REGEXP HASH_CHAR="%" TYPE="KEYWORD2">%((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
-
- <!-- Dereferences -->
- <SEQ_REGEXP HASH_CHAR="$$" TYPE="KEYWORD4">\$\$+((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="@$" TYPE="KEYWORD4">@\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="%$" TYPE="KEYWORD4">%\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="*" TYPE="KEYWORD4">\*((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
-
- <!-- Perl predefined variables -->
- <SEQ_REGEXP HASH_CHAR="$^" TYPE="KEYWORD2">\$\^\p{Alpha}</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$\p{Punct}</SEQ_REGEXP>
-
- <!-- references to vars and code, starting with a backslash -->
- <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD4">\\[@%\$&]((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
-
- <!-- complex code dereference -->
- <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">
- <BEGIN>&{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- Function calls from variables -->
- <SEQ_REGEXP HASH_CHAR="&$" TYPE="FUNCTION">&\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
-
- <!-- Highlight calls to subs that contain ' in the name. -->
- <SEQ_REGEXP HASH_CHAR="&" TYPE="FUNCTION"
- >&\p{Alpha}[\p{Alnum}_]*'\p{Alpha}[\p{Alnum}_]*</SEQ_REGEXP>
-
- <!-- Literals -->
- <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- apostrophe literals -->
- <SPAN TYPE="LITERAL1" DELEGATE="APOSTR">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SEQ_REGEXP TYPE="LITERAL1">\b\w+\b(?=\s*=>)</SEQ_REGEXP>
-
- <!-- options: -text -->
- <SEQ_REGEXP HASH_CHAR="-" TYPE="LITERAL1">-[\p{Lower}]\w+</SEQ_REGEXP>
-
- <!-- file stat expressions -->
- <SEQ_REGEXP HASH_CHAR="-" TYPE="KEYWORD3">-[\p{Lower}]</SEQ_REGEXP>
-
- <!-- non-quoted literals in hashes -->
- <SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="{" NO_LINE_BREAK="TRUE" DELEGATE="LITERAL">
- <BEGIN>\{(?=\s*[\p{Alpha}_\-][\p{Alnum}_]*\s*\})</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
-
- <!-- Code blocks. This is a hack to correctly highlight some
- complex expressions that can have arbitrary perl code
- inside brackets (like array deferences below). Declaring
- this *before* the other rules is needed to maintain
- correct bracket matching.
- -->
- <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" DELEGATE="MAIN">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- Array dereference -->
- <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">
- <BEGIN>@{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- Hash dereference -->
- <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">
- <BEGIN>%{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- labels, catches also package prefixes at line start :( -->
- <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
-
- <!-- __DATA__ and similar -->
- <SEQ_REGEXP HASH_CHAR="__" TYPE="KEYWORD4">__\w+__</SEQ_REGEXP>
-
- <!-- Exec -->
- <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <!-- file globs / IO operators -->
- <SEQ_REGEXP HASH_CHAR="<" TYPE="KEYWORD4"><[\p{Punct}\p{Alnum}_]*></SEQ_REGEXP>
-
- <!-- Heredoc -->
- <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL2" DELEGATE="LITERAL">
- <BEGIN><![CDATA[<<\p{Space}*(['"])([\p{Space}\p{Alnum}_]*)\1;?\s*]]></BEGIN>
- <END AT_LINE_START="TRUE">$2</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL2" DELEGATE="LITERAL">
- <BEGIN><![CDATA[<<([\p{Alpha}_][\p{Alnum}_]*);?\s*]]></BEGIN>
- <END AT_LINE_START="TRUE">$1</END>
- </SPAN_REGEXP>
-
- <!-- jEdit 4.1 adds regular expression syntax rules so we can
- highlight this sort of crap. -->
-
- <!-- /Regexp/, avoid confusion with a sequence of two divisions! -->
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="/"
- AT_WORD_START="TRUE">/.*?[^\\]/([cgimosx]+\b|(?=[^cgimosx])|$)(?!\s*[\d\$\@\(\{\-A-Z"'])</SEQ_REGEXP>
-
- <!-- q//, qq//, qx// -->
- <SPAN_REGEXP HASH_CHAR="q"
- TYPE="LITERAL1"
- ESCAPE="\"
- MATCH_TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- NO_LINE_BREAK="FALSE">
- <BEGIN>q[qxw]?([#/\|!])</BEGIN>
- <END>~1</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP HASH_CHAR="q"
- MATCH_TYPE="OPERATOR"
- DELEGATE="QUOTED_BRACKET"
- AT_WORD_START="TRUE"
- NO_LINE_BREAK="FALSE">
- <BEGIN>q[qxw]?(\[)</BEGIN>
- <END>~1</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP HASH_CHAR="q"
- MATCH_TYPE="OPERATOR"
- DELEGATE="QUOTED_BRACE"
- AT_WORD_START="TRUE"
- NO_LINE_BREAK="FALSE">
- <BEGIN>q[qxw]?(\{)</BEGIN>
- <END>~1</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP HASH_CHAR="q"
- MATCH_TYPE="OPERATOR"
- DELEGATE="QUOTED_PAREN"
- AT_WORD_START="TRUE"
- NO_LINE_BREAK="FALSE">
- <BEGIN>q[qxw]?(\()</BEGIN>
- <END>~1</END>
- </SPAN_REGEXP>
-
- <!-- qr// should match other regex highlight colors -->
- <SPAN_REGEXP HASH_CHAR="q"
- ESCAPE="\"
- TYPE="LITERAL1"
- MATCH_TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- NO_LINE_BREAK="FALSE">
- <BEGIN>qr([#/\|!])</BEGIN>
- <END>~1</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP HASH_CHAR="q"
- DELEGATE="QUOTED_BRACKET"
- MATCH_TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- NO_LINE_BREAK="FALSE">
- <BEGIN>qr(\[)</BEGIN>
- <END>~1</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP HASH_CHAR="q"
- DELEGATE="QUOTED_BRACE"
- MATCH_TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- NO_LINE_BREAK="FALSE">
- <BEGIN>qr(\{)</BEGIN>
- <END>~1</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP HASH_CHAR="q"
- DELEGATE="QUOTED_PAREN"
- ESCAPE="\"
- MATCH_TYPE="OPERATOR"
- AT_WORD_START="TRUE"
- NO_LINE_BREAK="FALSE">
- <BEGIN>qr(\()</BEGIN>
- <END>~1</END>
- </SPAN_REGEXP>
-
- <!-- tr/// transliteration -->
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="tr"
- AT_WORD_START="TRUE">tr\s*\{.*?[^\\]\}\s*\{(?:.*?[^\\])*?\}[cds]*</SEQ_REGEXP>
-
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="tr"
- AT_WORD_START="TRUE">tr([^\p{Alnum}\p{Space}\}])(?:.*?)\1(?:.*?)\1[cds]*</SEQ_REGEXP>
-
- <!-- y/// translation -->
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="y"
- AT_WORD_START="TRUE">y\s*\{.*?[^\\]\}\s*\{(?:.*?[^\\])*?\}[cds]*</SEQ_REGEXP>
-
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="y"
- AT_WORD_START="TRUE">y([^\p{Alnum}\p{Space}\}_])(?:.*?)\1(?:.*?)\1[cds]*</SEQ_REGEXP>
-
- <!-- m// regular expression matching -->
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="m"
- AT_WORD_START="TRUE">m\s*\{.*?[^\\]\}[cgimosx]*</SEQ_REGEXP>
-
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="m"
- AT_WORD_START="TRUE">m([^\p{Alnum}\p{Space}\}])(?:.*?[^\\])\1[cgimosx]*</SEQ_REGEXP>
-
- <!-- s/// regular expression substitution -->
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="s"
- AT_WORD_START="TRUE">s\s*\{.*?\}\s*\{.*?\}[egimosx]*</SEQ_REGEXP>
-
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="s"
- AT_WORD_START="TRUE">s([^\p{Alnum}\p{Space}\}])(?:.*?)\1(?:.*?)\1[egimosx]*</SEQ_REGEXP>
-
- <!-- complex operators -->
- <SEQ TYPE="OPERATOR">||</SEQ>
- <SEQ TYPE="OPERATOR">//</SEQ>
- <SEQ TYPE="OPERATOR">&&</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR"><=></SEQ>
- <SEQ TYPE="OPERATOR">-></SEQ>
- <SEQ TYPE="OPERATOR">=></SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">=~</SEQ>
- <SEQ TYPE="OPERATOR">!~</SEQ>
- <SEQ TYPE="OPERATOR">~~</SEQ>
-
- <SEQ TYPE="OPERATOR">+=</SEQ>
- <SEQ TYPE="OPERATOR">-=</SEQ>
- <SEQ TYPE="OPERATOR">/=</SEQ>
- <SEQ TYPE="OPERATOR">*=</SEQ>
- <SEQ TYPE="OPERATOR">.=</SEQ>
- <SEQ TYPE="OPERATOR">%=</SEQ>
-
- <SEQ TYPE="OPERATOR">&=</SEQ>
- <SEQ TYPE="OPERATOR">|=</SEQ>
- <SEQ TYPE="OPERATOR">**=</SEQ>
- <SEQ TYPE="OPERATOR"><<=</SEQ>
- <SEQ TYPE="OPERATOR">>>=</SEQ>
- <SEQ TYPE="OPERATOR">&&=</SEQ>
- <SEQ TYPE="OPERATOR">||=</SEQ>
- <SEQ TYPE="OPERATOR">^=</SEQ>
- <SEQ TYPE="OPERATOR">x=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
-
- <!-- simple operators -->
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">**</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
-
- <!-- Keywords -->
- <KEYWORDS>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>elsif</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>unless</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>foreach</KEYWORD1>
- <KEYWORD1>BEGIN</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
-
- <OPERATOR>cmp</OPERATOR>
- <OPERATOR>eq</OPERATOR>
- <OPERATOR>ne</OPERATOR>
- <OPERATOR>le</OPERATOR>
- <OPERATOR>ge</OPERATOR>
- <OPERATOR>not</OPERATOR>
- <OPERATOR>and</OPERATOR>
- <OPERATOR>or</OPERATOR>
- <OPERATOR>xor</OPERATOR>
-
- <!-- At least attempt to highlight 'x', although this misses some -->
- <OPERATOR>x</OPERATOR>
-
- <!--
- The following function list was derived from the perlfunc man
- page, Perl version 5.00503
-
- Certain keywords have been commented out where they appear more
- than once, and the y///, qx//, etc. functions have been removed,
- since they would are colorized not as keywords, but with separate
- rules.
- -->
-
- <!-- Functions for SCALARs or strings -->
- <KEYWORD3>chomp</KEYWORD3>
- <KEYWORD3>chop</KEYWORD3>
- <KEYWORD3>chr</KEYWORD3>
- <KEYWORD3>crypt</KEYWORD3>
- <KEYWORD3>hex</KEYWORD3>
- <KEYWORD3>index</KEYWORD3>
- <KEYWORD3>lc</KEYWORD3>
- <KEYWORD3>lcfirst</KEYWORD3>
- <KEYWORD3>length</KEYWORD3>
- <KEYWORD3>oct</KEYWORD3>
- <KEYWORD3>ord</KEYWORD3>
- <KEYWORD3>pack</KEYWORD3>
- <KEYWORD3>reverse</KEYWORD3>
- <KEYWORD3>rindex</KEYWORD3>
- <KEYWORD3>sprintf</KEYWORD3>
- <KEYWORD3>substr</KEYWORD3>
- <KEYWORD3>uc</KEYWORD3>
- <KEYWORD3>ucfirst</KEYWORD3>
-
- <!-- Regular expressions and pattern matching -->
- <KEYWORD3>pos</KEYWORD3>
- <KEYWORD3>quotemeta</KEYWORD3>
- <KEYWORD3>split</KEYWORD3>
- <KEYWORD3>study</KEYWORD3>
-
- <!-- Numeric functions -->
- <KEYWORD3>abs</KEYWORD3>
- <KEYWORD3>atan2</KEYWORD3>
- <KEYWORD3>cos</KEYWORD3>
- <KEYWORD3>exp</KEYWORD3>
- <!--<KEYWORD3>hex</KEYWORD3>-->
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>log</KEYWORD3>
- <!--<KEYWORD3>oct</KEYWORD3>-->
- <KEYWORD3>rand</KEYWORD3>
- <KEYWORD3>sin</KEYWORD3>
- <KEYWORD3>sqrt</KEYWORD3>
- <KEYWORD3>srand</KEYWORD3>
-
- <!-- Functions for real @ARRAYs -->
- <KEYWORD3>pop</KEYWORD3>
- <KEYWORD3>push</KEYWORD3>
- <KEYWORD3>shift</KEYWORD3>
- <KEYWORD3>splice</KEYWORD3>
- <KEYWORD3>unshift</KEYWORD3>
-
- <!-- Functions for list data -->
- <KEYWORD3>grep</KEYWORD3>
- <KEYWORD3>join</KEYWORD3>
- <KEYWORD3>map</KEYWORD3>
- <!--<KEYWORD3>reverse</KEYWORD3>-->
- <KEYWORD3>sort</KEYWORD3>
- <KEYWORD3>unpack</KEYWORD3>
-
- <!-- Functions for real %HASHes -->
- <KEYWORD3>delete</KEYWORD3>
- <KEYWORD3>each</KEYWORD3>
- <KEYWORD3>exists</KEYWORD3>
- <KEYWORD3>keys</KEYWORD3>
- <KEYWORD3>values</KEYWORD3>
-
- <!-- Input and output functions -->
- <KEYWORD3>binmode</KEYWORD3>
- <KEYWORD3>close</KEYWORD3>
- <KEYWORD3>closedir</KEYWORD3>
- <KEYWORD3>dbmclose</KEYWORD3>
- <KEYWORD3>dbmopen</KEYWORD3>
- <!--<KEYWORD3>die</KEYWORD3>-->
- <KEYWORD3>eof</KEYWORD3>
- <KEYWORD3>fileno</KEYWORD3>
- <KEYWORD3>flock</KEYWORD3>
- <KEYWORD3>format</KEYWORD3>
- <KEYWORD3>getc</KEYWORD3>
- <KEYWORD3>print</KEYWORD3>
- <KEYWORD3>printf</KEYWORD3>
- <KEYWORD3>read</KEYWORD3>
- <KEYWORD3>readdir</KEYWORD3>
- <KEYWORD3>rewinddir</KEYWORD3>
- <KEYWORD3>say</KEYWORD3>
- <KEYWORD3>seek</KEYWORD3>
- <KEYWORD3>seekdir</KEYWORD3>
- <KEYWORD3>select</KEYWORD3>
- <KEYWORD3>syscall</KEYWORD3>
- <KEYWORD3>sysread</KEYWORD3>
- <KEYWORD3>sysseek</KEYWORD3>
- <KEYWORD3>syswrite</KEYWORD3>
- <KEYWORD3>tell</KEYWORD3>
- <KEYWORD3>telldir</KEYWORD3>
- <KEYWORD3>truncate</KEYWORD3>
- <KEYWORD3>warn</KEYWORD3>
- <KEYWORD3>write</KEYWORD3>
-
- <!-- Functions for fixed length data or records -->
- <!--<KEYWORD3>pack</KEYWORD3>-->
- <!--<KEYWORD3>read</KEYWORD3>-->
- <!--<KEYWORD3>syscall</KEYWORD3>-->
- <!--<KEYWORD3>sysread</KEYWORD3>-->
- <!--<KEYWORD3>syswrite</KEYWORD3>-->
- <!--<KEYWORD3>unpack</KEYWORD3>-->
- <KEYWORD3>vec</KEYWORD3>
-
- <!-- Functions for filehandles, files, or directories -->
- <KEYWORD3>chdir</KEYWORD3>
- <KEYWORD3>chmod</KEYWORD3>
- <KEYWORD3>chown</KEYWORD3>
- <KEYWORD3>chroot</KEYWORD3>
- <KEYWORD3>fcntl</KEYWORD3>
- <KEYWORD3>glob</KEYWORD3>
- <KEYWORD3>ioctl</KEYWORD3>
- <KEYWORD3>link</KEYWORD3>
- <KEYWORD3>lstat</KEYWORD3>
- <KEYWORD3>mkdir</KEYWORD3>
- <KEYWORD3>open</KEYWORD3>
- <KEYWORD3>opendir</KEYWORD3>
- <KEYWORD3>readlink</KEYWORD3>
- <KEYWORD3>rename</KEYWORD3>
- <KEYWORD3>rmdir</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>symlink</KEYWORD3>
- <KEYWORD3>umask</KEYWORD3>
- <KEYWORD3>unlink</KEYWORD3>
- <KEYWORD3>utime</KEYWORD3>
-
- <!-- Keywords related to the control flow of your perl program -->
- <KEYWORD1>caller</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>die</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>dump</KEYWORD1>
- <KEYWORD1>eval</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>last</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>redo</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>wantarray</KEYWORD1>
-
- <!-- Keywords related to switch -->
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>given</KEYWORD1>
- <KEYWORD1>when</KEYWORD1>
-
- <!-- Keywords related to scoping -->
- <!--<KEYWORD1>caller</KEYWORD1>-->
- <!--<KEYWORD1>import</KEYWORD1>-->
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>my</KEYWORD1>
- <KEYWORD1>our</KEYWORD1>
- <KEYWORD1>package</KEYWORD1>
- <KEYWORD1>state</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
-
- <!-- Miscellaneous functions -->
- <KEYWORD3>defined</KEYWORD3>
- <!--<KEYWORD3>dump</KEYWORD3>-->
- <!--<KEYWORD3>eval</KEYWORD3>-->
- <KEYWORD3>formline</KEYWORD3>
- <!--<KEYWORD3>local</KEYWORD3>-->
- <!--<KEYWORD3>my</KEYWORD3>-->
- <KEYWORD3>reset</KEYWORD3>
- <KEYWORD3>scalar</KEYWORD3>
- <KEYWORD3>undef</KEYWORD3>
- <!--<KEYWORD3>wantarray</KEYWORD3>-->
-
- <!-- Functions for processes and process groups -->
- <KEYWORD3>alarm</KEYWORD3>
- <KEYWORD3>exec</KEYWORD3>
- <KEYWORD3>fork</KEYWORD3>
- <KEYWORD3>getpgrp</KEYWORD3>
- <KEYWORD3>getppid</KEYWORD3>
- <KEYWORD3>getpriority</KEYWORD3>
- <KEYWORD3>kill</KEYWORD3>
- <KEYWORD3>pipe</KEYWORD3>
- <KEYWORD3>setpgrp</KEYWORD3>
- <KEYWORD3>setpriority</KEYWORD3>
- <KEYWORD3>sleep</KEYWORD3>
- <KEYWORD3>system</KEYWORD3>
- <KEYWORD3>times</KEYWORD3>
- <KEYWORD3>wait</KEYWORD3>
- <KEYWORD3>waitpid</KEYWORD3>
-
- <!-- Keywords related to perl modules -->
- <!--<KEYWORD1>do</KEYWORD1>-->
- <KEYWORD1>import</KEYWORD1>
- <KEYWORD1>no</KEYWORD1>
- <!--<KEYWORD1>package</KEYWORD1>-->
- <KEYWORD1>require</KEYWORD1>
- <!--<KEYWORD1>use</KEYWORD1>-->
-
- <!-- Keywords related to classes and object-orientedness -->
- <KEYWORD3>bless</KEYWORD3>
- <!--<KEYWORD3>dbmclose</KEYWORD3>-->
- <!--<KEYWORD3>dbmopen</KEYWORD3>-->
- <!--<KEYWORD3>package</KEYWORD3>-->
- <KEYWORD3>ref</KEYWORD3>
- <KEYWORD3>tie</KEYWORD3>
- <KEYWORD3>tied</KEYWORD3>
- <KEYWORD3>untie</KEYWORD3>
- <!--<KEYWORD3>use</KEYWORD3>-->
-
- <!-- Low-level socket functions -->
- <KEYWORD3>accept</KEYWORD3>
- <KEYWORD3>bind</KEYWORD3>
- <KEYWORD3>connect</KEYWORD3>
- <KEYWORD3>getpeername</KEYWORD3>
- <KEYWORD3>getsockname</KEYWORD3>
- <KEYWORD3>getsockopt</KEYWORD3>
- <KEYWORD3>listen</KEYWORD3>
- <KEYWORD3>recv</KEYWORD3>
- <KEYWORD3>send</KEYWORD3>
- <KEYWORD3>setsockopt</KEYWORD3>
- <KEYWORD3>shutdown</KEYWORD3>
- <KEYWORD3>socket</KEYWORD3>
- <KEYWORD3>socketpair</KEYWORD3>
-
- <!-- System V interprocess communication functions -->
- <KEYWORD3>msgctl</KEYWORD3>
- <KEYWORD3>msgget</KEYWORD3>
- <KEYWORD3>msgrcv</KEYWORD3>
- <KEYWORD3>msgsnd</KEYWORD3>
- <KEYWORD3>semctl</KEYWORD3>
- <KEYWORD3>semget</KEYWORD3>
-
- <KEYWORD3>semop</KEYWORD3>
- <KEYWORD3>shmctl</KEYWORD3>
- <KEYWORD3>shmget</KEYWORD3>
- <KEYWORD3>shmread</KEYWORD3>
- <KEYWORD3>shmwrite</KEYWORD3>
-
- <!-- Fetching user and group info -->
- <KEYWORD3>endgrent</KEYWORD3>
- <KEYWORD3>endhostent</KEYWORD3>
- <KEYWORD3>endnetent</KEYWORD3>
- <KEYWORD3>endpwent</KEYWORD3>
- <KEYWORD3>getgrent</KEYWORD3>
- <KEYWORD3>getgrgid</KEYWORD3>
- <KEYWORD3>getgrnam</KEYWORD3>
- <KEYWORD3>getlogin</KEYWORD3>
- <KEYWORD3>getpwent</KEYWORD3>
- <KEYWORD3>getpwnam</KEYWORD3>
- <KEYWORD3>getpwuid</KEYWORD3>
- <KEYWORD3>setgrent</KEYWORD3>
- <KEYWORD3>setpwent</KEYWORD3>
-
- <!-- Fetching network info -->
- <KEYWORD3>endprotoent</KEYWORD3>
- <KEYWORD3>endservent</KEYWORD3>
- <KEYWORD3>gethostbyaddr</KEYWORD3>
- <KEYWORD3>gethostbyname</KEYWORD3>
- <KEYWORD3>gethostent</KEYWORD3>
- <KEYWORD3>getnetbyaddr</KEYWORD3>
- <KEYWORD3>getnetbyname</KEYWORD3>
- <KEYWORD3>getnetent</KEYWORD3>
- <KEYWORD3>getprotobyname</KEYWORD3>
- <KEYWORD3>getprotobynumber</KEYWORD3>
- <KEYWORD3>getprotoent</KEYWORD3>
- <KEYWORD3>getservbyname</KEYWORD3>
- <KEYWORD3>getservbyport</KEYWORD3>
- <KEYWORD3>getservent</KEYWORD3>
- <KEYWORD3>sethostent</KEYWORD3>
- <KEYWORD3>setnetent</KEYWORD3>
- <KEYWORD3>setprotoent</KEYWORD3>
- <KEYWORD3>setservent</KEYWORD3>
-
- <!-- Time-related functions -->
- <KEYWORD3>gmtime</KEYWORD3>
- <KEYWORD3>localtime</KEYWORD3>
- <KEYWORD3>time</KEYWORD3>
- <!--<KEYWORD3>times</KEYWORD3>-->
-
- <FUNCTION>sub</FUNCTION>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="POD" DEFAULT="COMMENT2">
- <MARK_FOLLOWING TYPE="LABEL" AT_LINE_START="TRUE">=</MARK_FOLLOWING>
- </RULES>
-
- <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
- <!-- Variables inside a Literal -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- object method inside a Literal -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>->{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
-
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>@{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">@</MARK_FOLLOWING>
-
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>%{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
-
- <SEQ TYPE="LITERAL1">|</SEQ>
- <SEQ TYPE="LITERAL1">&</SEQ>
- <SEQ TYPE="LITERAL1">!</SEQ>
- <SEQ TYPE="LITERAL1">></SEQ>
- <SEQ TYPE="LITERAL1"><</SEQ>
- <SEQ TYPE="LITERAL1">)</SEQ>
- <SEQ TYPE="LITERAL1">(</SEQ>
- <SEQ TYPE="LITERAL1">=</SEQ>
- <SEQ TYPE="LITERAL1">!</SEQ>
- <SEQ TYPE="LITERAL1">+</SEQ>
- <SEQ TYPE="LITERAL1">-</SEQ>
- <SEQ TYPE="LITERAL1">/</SEQ>
- <SEQ TYPE="LITERAL1">*</SEQ>
- <SEQ TYPE="LITERAL1">^</SEQ>
- <SEQ TYPE="LITERAL1">~</SEQ>
- <SEQ TYPE="LITERAL1">}</SEQ>
- <SEQ TYPE="LITERAL1">{</SEQ>
- <SEQ TYPE="LITERAL1">.</SEQ>
- <SEQ TYPE="LITERAL1">,</SEQ>
- <SEQ TYPE="LITERAL1">;</SEQ>
- <SEQ TYPE="LITERAL1">]</SEQ>
- <SEQ TYPE="LITERAL1">[</SEQ>
- <SEQ TYPE="LITERAL1">?</SEQ>
- <SEQ TYPE="LITERAL1">:</SEQ>
- </RULES>
-
- <!-- Literals framed by apostrophs -->
- <RULES SET="APOSTR" DEFAULT="LITERAL1" ESCAPE="\">
-
- <!-- just a hack for sprintf -->
- <SEQ_REGEXP HASH_CHAR="%" TYPE="LITERAL4">%\d*\.?\d*[dfis]</SEQ_REGEXP>
-
- </RULES>
-
- <RULES SET="EXEC" DEFAULT="KEYWORD3" ESCAPE="\">
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- Variables -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
-
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>@{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">@</MARK_FOLLOWING>
-
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>%{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
- </RULES>
-
- <RULES SET="VARIABLE" DEFAULT="KEYWORD2" ESCAPE="\">
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">-></SEQ>
- </RULES>
-
- <RULES SET="REGEXP" DEFAULT="MARKUP" ESCAPE="\">
- <!-- ??? -->
- <SEQ TYPE="MARKUP">)(</SEQ>
- </RULES>
-
- <RULES SET="SUB_NAME" DEFAULT="FUNCTION">
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
- <SPAN TYPE="OPERATOR" DELEGATE="SUB_PROTO">
- <BEGIN>(</BEGIN>
- <END>)</END>
- </SPAN>
- </RULES>
-
- <RULES SET="SUB_PROTO" DEFAULT="LITERAL1">
- <SEQ TYPE="LITERAL2">$</SEQ>
- <SEQ TYPE="LITERAL2">@</SEQ>
- <SEQ TYPE="LITERAL2">%</SEQ>
- <SEQ TYPE="LITERAL2">&</SEQ>
- <SEQ TYPE="LITERAL2">*</SEQ>
- <SEQ TYPE="LITERAL3">\</SEQ>
- </RULES>
-
- <!-- Used for quote-like operators; just makes sure the brackets are balanced. -->
- <RULES SET="QUOTED_BRACKET" DEFAULT="LITERAL1" ESCAPE="\">
- <SPAN NO_LINE_BREAK="FALSE"
- TYPE="LITERAL1"
- MATCH_TYPE="OPERATOR"
- DELEGATE="QUOTED_BRACKET"
- HASH_CHARS="[">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
- </RULES>
- <RULES SET="QUOTED_BRACE" DEFAULT="LITERAL1" ESCAPE="\">
- <SPAN NO_LINE_BREAK="FALSE"
- TYPE="LITERAL1"
- MATCH_TYPE="OPERATOR"
- DELEGATE="QUOTED_BRACE"
- HASH_CHARS="{">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
- </RULES>
- <RULES SET="QUOTED_PAREN" DEFAULT="LITERAL1" ESCAPE="\">
- <SPAN NO_LINE_BREAK="FALSE"
- TYPE="LITERAL1"
- MATCH_TYPE="OPERATOR"
- DELEGATE="QUOTED_PAREN"
- HASH_CHARS="(">
- <BEGIN>(</BEGIN>
- <END>)</END>
- </SPAN>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine" VALUE="[^#]*\.\s*$" />
+ </PROPS>
+
+ <!-- no ESCAPE char because we need the backslash for references -->
+ <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="FALSE">
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- TYPE is LABEL so that =head1 and =cut are highlighted as so -->
+ <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
+ <BEGIN>=head1</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
+ <BEGIN>=head2</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
+ <BEGIN>=head3</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
+ <BEGIN>=head4</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN TYPE="LABEL" AT_LINE_START="TRUE" DELEGATE="POD">
+ <BEGIN>=item</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
+ <BEGIN>=over</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
+ <BEGIN>=back</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
+ <BEGIN>=pod</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
+ <BEGIN>=for</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="POD" AT_LINE_START="TRUE">
+ <BEGIN>=begin</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+ <SPAN AT_LINE_START="TRUE" TYPE="LABEL" DELEGATE="POD">
+ <BEGIN>=end</BEGIN>
+ <END>=cut</END>
+ </SPAN>
+
+ <!-- Some other things that confuse the mode file. -->
+ <SEQ TYPE="OPERATOR">*"</SEQ>
+ <SEQ TYPE="OPERATOR">*'</SEQ>
+ <SEQ TYPE="OPERATOR">&"</SEQ>
+ <SEQ TYPE="OPERATOR">&'</SEQ>
+
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Scalar variables -->
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+
+ <!-- Array variables -->
+ <SEQ_REGEXP HASH_CHAR="@" TYPE="KEYWORD2">@((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+
+ <!-- Associative Array (= Hash) variables -->
+ <SEQ_REGEXP HASH_CHAR="%" TYPE="KEYWORD2">%((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+
+ <!-- Dereferences -->
+ <SEQ_REGEXP HASH_CHAR="$$" TYPE="KEYWORD4">\$\$+((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="@$" TYPE="KEYWORD4">@\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="%$" TYPE="KEYWORD4">%\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="*" TYPE="KEYWORD4">\*((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+
+ <!-- Perl predefined variables -->
+ <SEQ_REGEXP HASH_CHAR="$^" TYPE="KEYWORD2">\$\^\p{Alpha}</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$\p{Punct}</SEQ_REGEXP>
+
+ <!-- references to vars and code, starting with a backslash -->
+ <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD4">\\[@%\$&]((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+
+ <!-- complex code dereference -->
+ <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">
+ <BEGIN>&{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Function calls from variables -->
+ <SEQ_REGEXP HASH_CHAR="&$" TYPE="FUNCTION">&\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+
+ <!-- Highlight calls to subs that contain ' in the name. -->
+ <SEQ_REGEXP HASH_CHAR="&" TYPE="FUNCTION"
+ >&\p{Alpha}[\p{Alnum}_]*'\p{Alpha}[\p{Alnum}_]*</SEQ_REGEXP>
+
+ <!-- Literals -->
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- apostrophe literals -->
+ <SPAN TYPE="LITERAL1" DELEGATE="APOSTR">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SEQ_REGEXP TYPE="LITERAL1">\b\w+\b(?=\s*=>)</SEQ_REGEXP>
+
+ <!-- options: -text -->
+ <SEQ_REGEXP HASH_CHAR="-" TYPE="LITERAL1">-[\p{Lower}]\w+</SEQ_REGEXP>
+
+ <!-- file stat expressions -->
+ <SEQ_REGEXP HASH_CHAR="-" TYPE="KEYWORD3">-[\p{Lower}]</SEQ_REGEXP>
+
+ <!-- non-quoted literals in hashes -->
+ <SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="{" NO_LINE_BREAK="TRUE" DELEGATE="LITERAL">
+ <BEGIN>\{(?=\s*[\p{Alpha}_\-][\p{Alnum}_]*\s*\})</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+
+ <!-- Code blocks. This is a hack to correctly highlight some
+ complex expressions that can have arbitrary perl code
+ inside brackets (like array deferences below). Declaring
+ this *before* the other rules is needed to maintain
+ correct bracket matching.
+ -->
+ <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" DELEGATE="MAIN">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Array dereference -->
+ <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">
+ <BEGIN>@{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Hash dereference -->
+ <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" DELEGATE="MAIN">
+ <BEGIN>%{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- labels, catches also package prefixes at line start :( -->
+ <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+
+ <!-- __DATA__ and similar -->
+ <SEQ_REGEXP HASH_CHAR="__" TYPE="KEYWORD4">__\w+__</SEQ_REGEXP>
+
+ <!-- Exec -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <!-- file globs / IO operators -->
+ <SEQ_REGEXP HASH_CHAR="<" TYPE="KEYWORD4"><[\p{Punct}\p{Alnum}_]*></SEQ_REGEXP>
+
+ <!-- Heredoc -->
+ <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL2" DELEGATE="LITERAL">
+ <BEGIN><![CDATA[<<\p{Space}*(['"])([\p{Space}\p{Alnum}_]*)\1;?\s*]]></BEGIN>
+ <END AT_LINE_START="TRUE">$2</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL2" DELEGATE="LITERAL">
+ <BEGIN><![CDATA[<<([\p{Alpha}_][\p{Alnum}_]*);?\s*]]></BEGIN>
+ <END AT_LINE_START="TRUE">$1</END>
+ </SPAN_REGEXP>
+
+ <!-- jEdit 4.1 adds regular expression syntax rules so we can
+ highlight this sort of crap. -->
+
+ <!-- /Regexp/, avoid confusion with a sequence of two divisions! -->
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="/"
+ AT_WORD_START="TRUE">/.*?[^\\]/([cgimosx]+\b|(?=[^cgimosx])|$)(?!\s*[\d\$\@\(\{\-A-Z"'])</SEQ_REGEXP>
+
+ <!-- q//, qq//, qx// -->
+ <SPAN_REGEXP HASH_CHAR="q"
+ TYPE="LITERAL1"
+ ESCAPE="\"
+ MATCH_TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ NO_LINE_BREAK="FALSE">
+ <BEGIN>q[qxw]?([#/\|!])</BEGIN>
+ <END>~1</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP HASH_CHAR="q"
+ MATCH_TYPE="OPERATOR"
+ DELEGATE="QUOTED_BRACKET"
+ AT_WORD_START="TRUE"
+ NO_LINE_BREAK="FALSE">
+ <BEGIN>q[qxw]?(\[)</BEGIN>
+ <END>~1</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP HASH_CHAR="q"
+ MATCH_TYPE="OPERATOR"
+ DELEGATE="QUOTED_BRACE"
+ AT_WORD_START="TRUE"
+ NO_LINE_BREAK="FALSE">
+ <BEGIN>q[qxw]?(\{)</BEGIN>
+ <END>~1</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP HASH_CHAR="q"
+ MATCH_TYPE="OPERATOR"
+ DELEGATE="QUOTED_PAREN"
+ AT_WORD_START="TRUE"
+ NO_LINE_BREAK="FALSE">
+ <BEGIN>q[qxw]?(\()</BEGIN>
+ <END>~1</END>
+ </SPAN_REGEXP>
+
+ <!-- qr// should match other regex highlight colors -->
+ <SPAN_REGEXP HASH_CHAR="q"
+ ESCAPE="\"
+ TYPE="LITERAL1"
+ MATCH_TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ NO_LINE_BREAK="FALSE">
+ <BEGIN>qr([#/\|!])</BEGIN>
+ <END>~1</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP HASH_CHAR="q"
+ DELEGATE="QUOTED_BRACKET"
+ MATCH_TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ NO_LINE_BREAK="FALSE">
+ <BEGIN>qr(\[)</BEGIN>
+ <END>~1</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP HASH_CHAR="q"
+ DELEGATE="QUOTED_BRACE"
+ MATCH_TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ NO_LINE_BREAK="FALSE">
+ <BEGIN>qr(\{)</BEGIN>
+ <END>~1</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP HASH_CHAR="q"
+ DELEGATE="QUOTED_PAREN"
+ ESCAPE="\"
+ MATCH_TYPE="OPERATOR"
+ AT_WORD_START="TRUE"
+ NO_LINE_BREAK="FALSE">
+ <BEGIN>qr(\()</BEGIN>
+ <END>~1</END>
+ </SPAN_REGEXP>
+
+ <!-- tr/// transliteration -->
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="tr"
+ AT_WORD_START="TRUE">tr\s*\{.*?[^\\]\}\s*\{(?:.*?[^\\])*?\}[cds]*</SEQ_REGEXP>
+
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="tr"
+ AT_WORD_START="TRUE">tr([^\p{Alnum}\p{Space}\}])(?:.*?)\1(?:.*?)\1[cds]*</SEQ_REGEXP>
+
+ <!-- y/// translation -->
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="y"
+ AT_WORD_START="TRUE">y\s*\{.*?[^\\]\}\s*\{(?:.*?[^\\])*?\}[cds]*</SEQ_REGEXP>
+
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="y"
+ AT_WORD_START="TRUE">y([^\p{Alnum}\p{Space}\}_])(?:.*?)\1(?:.*?)\1[cds]*</SEQ_REGEXP>
+
+ <!-- m// regular expression matching -->
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="m"
+ AT_WORD_START="TRUE">m\s*\{.*?[^\\]\}[cgimosx]*</SEQ_REGEXP>
+
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="m"
+ AT_WORD_START="TRUE">m([^\p{Alnum}\p{Space}\}])(?:.*?[^\\])\1[cgimosx]*</SEQ_REGEXP>
+
+ <!-- s/// regular expression substitution -->
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="s"
+ AT_WORD_START="TRUE">s\s*\{.*?\}\s*\{.*?\}[egimosx]*</SEQ_REGEXP>
+
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="s"
+ AT_WORD_START="TRUE">s([^\p{Alnum}\p{Space}\}])(?:.*?)\1(?:.*?)\1[egimosx]*</SEQ_REGEXP>
+
+ <!-- complex operators -->
+ <SEQ TYPE="OPERATOR">||</SEQ>
+ <SEQ TYPE="OPERATOR">//</SEQ>
+ <SEQ TYPE="OPERATOR">&&</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR"><=></SEQ>
+ <SEQ TYPE="OPERATOR">-></SEQ>
+ <SEQ TYPE="OPERATOR">=></SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">=~</SEQ>
+ <SEQ TYPE="OPERATOR">!~</SEQ>
+ <SEQ TYPE="OPERATOR">~~</SEQ>
+
+ <SEQ TYPE="OPERATOR">+=</SEQ>
+ <SEQ TYPE="OPERATOR">-=</SEQ>
+ <SEQ TYPE="OPERATOR">/=</SEQ>
+ <SEQ TYPE="OPERATOR">*=</SEQ>
+ <SEQ TYPE="OPERATOR">.=</SEQ>
+ <SEQ TYPE="OPERATOR">%=</SEQ>
+
+ <SEQ TYPE="OPERATOR">&=</SEQ>
+ <SEQ TYPE="OPERATOR">|=</SEQ>
+ <SEQ TYPE="OPERATOR">**=</SEQ>
+ <SEQ TYPE="OPERATOR"><<=</SEQ>
+ <SEQ TYPE="OPERATOR">>>=</SEQ>
+ <SEQ TYPE="OPERATOR">&&=</SEQ>
+ <SEQ TYPE="OPERATOR">||=</SEQ>
+ <SEQ TYPE="OPERATOR">^=</SEQ>
+ <SEQ TYPE="OPERATOR">x=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+
+ <!-- simple operators -->
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">**</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <!-- Keywords -->
+ <KEYWORDS>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>elsif</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>unless</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>foreach</KEYWORD1>
+ <KEYWORD1>BEGIN</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+
+ <OPERATOR>cmp</OPERATOR>
+ <OPERATOR>eq</OPERATOR>
+ <OPERATOR>ne</OPERATOR>
+ <OPERATOR>le</OPERATOR>
+ <OPERATOR>ge</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>xor</OPERATOR>
+
+ <!-- At least attempt to highlight 'x', although this misses some -->
+ <OPERATOR>x</OPERATOR>
+
+ <!--
+ The following function list was derived from the perlfunc man
+ page, Perl version 5.00503
+
+ Certain keywords have been commented out where they appear more
+ than once, and the y///, qx//, etc. functions have been removed,
+ since they would are colorized not as keywords, but with separate
+ rules.
+ -->
+
+ <!-- Functions for SCALARs or strings -->
+ <KEYWORD3>chomp</KEYWORD3>
+ <KEYWORD3>chop</KEYWORD3>
+ <KEYWORD3>chr</KEYWORD3>
+ <KEYWORD3>crypt</KEYWORD3>
+ <KEYWORD3>hex</KEYWORD3>
+ <KEYWORD3>index</KEYWORD3>
+ <KEYWORD3>lc</KEYWORD3>
+ <KEYWORD3>lcfirst</KEYWORD3>
+ <KEYWORD3>length</KEYWORD3>
+ <KEYWORD3>oct</KEYWORD3>
+ <KEYWORD3>ord</KEYWORD3>
+ <KEYWORD3>pack</KEYWORD3>
+ <KEYWORD3>reverse</KEYWORD3>
+ <KEYWORD3>rindex</KEYWORD3>
+ <KEYWORD3>sprintf</KEYWORD3>
+ <KEYWORD3>substr</KEYWORD3>
+ <KEYWORD3>uc</KEYWORD3>
+ <KEYWORD3>ucfirst</KEYWORD3>
+
+ <!-- Regular expressions and pattern matching -->
+ <KEYWORD3>pos</KEYWORD3>
+ <KEYWORD3>quotemeta</KEYWORD3>
+ <KEYWORD3>split</KEYWORD3>
+ <KEYWORD3>study</KEYWORD3>
+
+ <!-- Numeric functions -->
+ <KEYWORD3>abs</KEYWORD3>
+ <KEYWORD3>atan2</KEYWORD3>
+ <KEYWORD3>cos</KEYWORD3>
+ <KEYWORD3>exp</KEYWORD3>
+ <!--<KEYWORD3>hex</KEYWORD3>-->
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>log</KEYWORD3>
+ <!--<KEYWORD3>oct</KEYWORD3>-->
+ <KEYWORD3>rand</KEYWORD3>
+ <KEYWORD3>sin</KEYWORD3>
+ <KEYWORD3>sqrt</KEYWORD3>
+ <KEYWORD3>srand</KEYWORD3>
+
+ <!-- Functions for real @ARRAYs -->
+ <KEYWORD3>pop</KEYWORD3>
+ <KEYWORD3>push</KEYWORD3>
+ <KEYWORD3>shift</KEYWORD3>
+ <KEYWORD3>splice</KEYWORD3>
+ <KEYWORD3>unshift</KEYWORD3>
+
+ <!-- Functions for list data -->
+ <KEYWORD3>grep</KEYWORD3>
+ <KEYWORD3>join</KEYWORD3>
+ <KEYWORD3>map</KEYWORD3>
+ <!--<KEYWORD3>reverse</KEYWORD3>-->
+ <KEYWORD3>sort</KEYWORD3>
+ <KEYWORD3>unpack</KEYWORD3>
+
+ <!-- Functions for real %HASHes -->
+ <KEYWORD3>delete</KEYWORD3>
+ <KEYWORD3>each</KEYWORD3>
+ <KEYWORD3>exists</KEYWORD3>
+ <KEYWORD3>keys</KEYWORD3>
+ <KEYWORD3>values</KEYWORD3>
+
+ <!-- Input and output functions -->
+ <KEYWORD3>binmode</KEYWORD3>
+ <KEYWORD3>close</KEYWORD3>
+ <KEYWORD3>closedir</KEYWORD3>
+ <KEYWORD3>dbmclose</KEYWORD3>
+ <KEYWORD3>dbmopen</KEYWORD3>
+ <!--<KEYWORD3>die</KEYWORD3>-->
+ <KEYWORD3>eof</KEYWORD3>
+ <KEYWORD3>fileno</KEYWORD3>
+ <KEYWORD3>flock</KEYWORD3>
+ <KEYWORD3>format</KEYWORD3>
+ <KEYWORD3>getc</KEYWORD3>
+ <KEYWORD3>print</KEYWORD3>
+ <KEYWORD3>printf</KEYWORD3>
+ <KEYWORD3>read</KEYWORD3>
+ <KEYWORD3>readdir</KEYWORD3>
+ <KEYWORD3>rewinddir</KEYWORD3>
+ <KEYWORD3>say</KEYWORD3>
+ <KEYWORD3>seek</KEYWORD3>
+ <KEYWORD3>seekdir</KEYWORD3>
+ <KEYWORD3>select</KEYWORD3>
+ <KEYWORD3>syscall</KEYWORD3>
+ <KEYWORD3>sysread</KEYWORD3>
+ <KEYWORD3>sysseek</KEYWORD3>
+ <KEYWORD3>syswrite</KEYWORD3>
+ <KEYWORD3>tell</KEYWORD3>
+ <KEYWORD3>telldir</KEYWORD3>
+ <KEYWORD3>truncate</KEYWORD3>
+ <KEYWORD3>warn</KEYWORD3>
+ <KEYWORD3>write</KEYWORD3>
+
+ <!-- Functions for fixed length data or records -->
+ <!--<KEYWORD3>pack</KEYWORD3>-->
+ <!--<KEYWORD3>read</KEYWORD3>-->
+ <!--<KEYWORD3>syscall</KEYWORD3>-->
+ <!--<KEYWORD3>sysread</KEYWORD3>-->
+ <!--<KEYWORD3>syswrite</KEYWORD3>-->
+ <!--<KEYWORD3>unpack</KEYWORD3>-->
+ <KEYWORD3>vec</KEYWORD3>
+
+ <!-- Functions for filehandles, files, or directories -->
+ <KEYWORD3>chdir</KEYWORD3>
+ <KEYWORD3>chmod</KEYWORD3>
+ <KEYWORD3>chown</KEYWORD3>
+ <KEYWORD3>chroot</KEYWORD3>
+ <KEYWORD3>fcntl</KEYWORD3>
+ <KEYWORD3>glob</KEYWORD3>
+ <KEYWORD3>ioctl</KEYWORD3>
+ <KEYWORD3>link</KEYWORD3>
+ <KEYWORD3>lstat</KEYWORD3>
+ <KEYWORD3>mkdir</KEYWORD3>
+ <KEYWORD3>open</KEYWORD3>
+ <KEYWORD3>opendir</KEYWORD3>
+ <KEYWORD3>readlink</KEYWORD3>
+ <KEYWORD3>rename</KEYWORD3>
+ <KEYWORD3>rmdir</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>symlink</KEYWORD3>
+ <KEYWORD3>umask</KEYWORD3>
+ <KEYWORD3>unlink</KEYWORD3>
+ <KEYWORD3>utime</KEYWORD3>
+
+ <!-- Keywords related to the control flow of your perl program -->
+ <KEYWORD1>caller</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>die</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>dump</KEYWORD1>
+ <KEYWORD1>eval</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>last</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>redo</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>wantarray</KEYWORD1>
+
+ <!-- Keywords related to switch -->
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>given</KEYWORD1>
+ <KEYWORD1>when</KEYWORD1>
+
+ <!-- Keywords related to scoping -->
+ <!--<KEYWORD1>caller</KEYWORD1>-->
+ <!--<KEYWORD1>import</KEYWORD1>-->
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>my</KEYWORD1>
+ <KEYWORD1>our</KEYWORD1>
+ <KEYWORD1>package</KEYWORD1>
+ <KEYWORD1>state</KEYWORD1>
+ <KEYWORD1>use</KEYWORD1>
+
+ <!-- Miscellaneous functions -->
+ <KEYWORD3>defined</KEYWORD3>
+ <!--<KEYWORD3>dump</KEYWORD3>-->
+ <!--<KEYWORD3>eval</KEYWORD3>-->
+ <KEYWORD3>formline</KEYWORD3>
+ <!--<KEYWORD3>local</KEYWORD3>-->
+ <!--<KEYWORD3>my</KEYWORD3>-->
+ <KEYWORD3>reset</KEYWORD3>
+ <KEYWORD3>scalar</KEYWORD3>
+ <KEYWORD3>undef</KEYWORD3>
+ <!--<KEYWORD3>wantarray</KEYWORD3>-->
+
+ <!-- Functions for processes and process groups -->
+ <KEYWORD3>alarm</KEYWORD3>
+ <KEYWORD3>exec</KEYWORD3>
+ <KEYWORD3>fork</KEYWORD3>
+ <KEYWORD3>getpgrp</KEYWORD3>
+ <KEYWORD3>getppid</KEYWORD3>
+ <KEYWORD3>getpriority</KEYWORD3>
+ <KEYWORD3>kill</KEYWORD3>
+ <KEYWORD3>pipe</KEYWORD3>
+ <KEYWORD3>setpgrp</KEYWORD3>
+ <KEYWORD3>setpriority</KEYWORD3>
+ <KEYWORD3>sleep</KEYWORD3>
+ <KEYWORD3>system</KEYWORD3>
+ <KEYWORD3>times</KEYWORD3>
+ <KEYWORD3>wait</KEYWORD3>
+ <KEYWORD3>waitpid</KEYWORD3>
+
+ <!-- Keywords related to perl modules -->
+ <!--<KEYWORD1>do</KEYWORD1>-->
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>no</KEYWORD1>
+ <!--<KEYWORD1>package</KEYWORD1>-->
+ <KEYWORD1>require</KEYWORD1>
+ <!--<KEYWORD1>use</KEYWORD1>-->
+
+ <!-- Keywords related to classes and object-orientedness -->
+ <KEYWORD3>bless</KEYWORD3>
+ <!--<KEYWORD3>dbmclose</KEYWORD3>-->
+ <!--<KEYWORD3>dbmopen</KEYWORD3>-->
+ <!--<KEYWORD3>package</KEYWORD3>-->
+ <KEYWORD3>ref</KEYWORD3>
+ <KEYWORD3>tie</KEYWORD3>
+ <KEYWORD3>tied</KEYWORD3>
+ <KEYWORD3>untie</KEYWORD3>
+ <!--<KEYWORD3>use</KEYWORD3>-->
+
+ <!-- Low-level socket functions -->
+ <KEYWORD3>accept</KEYWORD3>
+ <KEYWORD3>bind</KEYWORD3>
+ <KEYWORD3>connect</KEYWORD3>
+ <KEYWORD3>getpeername</KEYWORD3>
+ <KEYWORD3>getsockname</KEYWORD3>
+ <KEYWORD3>getsockopt</KEYWORD3>
+ <KEYWORD3>listen</KEYWORD3>
+ <KEYWORD3>recv</KEYWORD3>
+ <KEYWORD3>send</KEYWORD3>
+ <KEYWORD3>setsockopt</KEYWORD3>
+ <KEYWORD3>shutdown</KEYWORD3>
+ <KEYWORD3>socket</KEYWORD3>
+ <KEYWORD3>socketpair</KEYWORD3>
+
+ <!-- System V interprocess communication functions -->
+ <KEYWORD3>msgctl</KEYWORD3>
+ <KEYWORD3>msgget</KEYWORD3>
+ <KEYWORD3>msgrcv</KEYWORD3>
+ <KEYWORD3>msgsnd</KEYWORD3>
+ <KEYWORD3>semctl</KEYWORD3>
+ <KEYWORD3>semget</KEYWORD3>
+
+ <KEYWORD3>semop</KEYWORD3>
+ <KEYWORD3>shmctl</KEYWORD3>
+ <KEYWORD3>shmget</KEYWORD3>
+ <KEYWORD3>shmread</KEYWORD3>
+ <KEYWORD3>shmwrite</KEYWORD3>
+
+ <!-- Fetching user and group info -->
+ <KEYWORD3>endgrent</KEYWORD3>
+ <KEYWORD3>endhostent</KEYWORD3>
+ <KEYWORD3>endnetent</KEYWORD3>
+ <KEYWORD3>endpwent</KEYWORD3>
+ <KEYWORD3>getgrent</KEYWORD3>
+ <KEYWORD3>getgrgid</KEYWORD3>
+ <KEYWORD3>getgrnam</KEYWORD3>
+ <KEYWORD3>getlogin</KEYWORD3>
+ <KEYWORD3>getpwent</KEYWORD3>
+ <KEYWORD3>getpwnam</KEYWORD3>
+ <KEYWORD3>getpwuid</KEYWORD3>
+ <KEYWORD3>setgrent</KEYWORD3>
+ <KEYWORD3>setpwent</KEYWORD3>
+
+ <!-- Fetching network info -->
+ <KEYWORD3>endprotoent</KEYWORD3>
+ <KEYWORD3>endservent</KEYWORD3>
+ <KEYWORD3>gethostbyaddr</KEYWORD3>
+ <KEYWORD3>gethostbyname</KEYWORD3>
+ <KEYWORD3>gethostent</KEYWORD3>
+ <KEYWORD3>getnetbyaddr</KEYWORD3>
+ <KEYWORD3>getnetbyname</KEYWORD3>
+ <KEYWORD3>getnetent</KEYWORD3>
+ <KEYWORD3>getprotobyname</KEYWORD3>
+ <KEYWORD3>getprotobynumber</KEYWORD3>
+ <KEYWORD3>getprotoent</KEYWORD3>
+ <KEYWORD3>getservbyname</KEYWORD3>
+ <KEYWORD3>getservbyport</KEYWORD3>
+ <KEYWORD3>getservent</KEYWORD3>
+ <KEYWORD3>sethostent</KEYWORD3>
+ <KEYWORD3>setnetent</KEYWORD3>
+ <KEYWORD3>setprotoent</KEYWORD3>
+ <KEYWORD3>setservent</KEYWORD3>
+
+ <!-- Time-related functions -->
+ <KEYWORD3>gmtime</KEYWORD3>
+ <KEYWORD3>localtime</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <!--<KEYWORD3>times</KEYWORD3>-->
+
+ <FUNCTION>sub</FUNCTION>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="POD" DEFAULT="COMMENT2">
+ <MARK_FOLLOWING TYPE="LABEL" AT_LINE_START="TRUE">=</MARK_FOLLOWING>
+ </RULES>
+
+ <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
+ <!-- Variables inside a Literal -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- object method inside a Literal -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>->{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>@{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">@</MARK_FOLLOWING>
+
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>%{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
+
+ <SEQ TYPE="LITERAL1">|</SEQ>
+ <SEQ TYPE="LITERAL1">&</SEQ>
+ <SEQ TYPE="LITERAL1">!</SEQ>
+ <SEQ TYPE="LITERAL1">></SEQ>
+ <SEQ TYPE="LITERAL1"><</SEQ>
+ <SEQ TYPE="LITERAL1">)</SEQ>
+ <SEQ TYPE="LITERAL1">(</SEQ>
+ <SEQ TYPE="LITERAL1">=</SEQ>
+ <SEQ TYPE="LITERAL1">!</SEQ>
+ <SEQ TYPE="LITERAL1">+</SEQ>
+ <SEQ TYPE="LITERAL1">-</SEQ>
+ <SEQ TYPE="LITERAL1">/</SEQ>
+ <SEQ TYPE="LITERAL1">*</SEQ>
+ <SEQ TYPE="LITERAL1">^</SEQ>
+ <SEQ TYPE="LITERAL1">~</SEQ>
+ <SEQ TYPE="LITERAL1">}</SEQ>
+ <SEQ TYPE="LITERAL1">{</SEQ>
+ <SEQ TYPE="LITERAL1">.</SEQ>
+ <SEQ TYPE="LITERAL1">,</SEQ>
+ <SEQ TYPE="LITERAL1">;</SEQ>
+ <SEQ TYPE="LITERAL1">]</SEQ>
+ <SEQ TYPE="LITERAL1">[</SEQ>
+ <SEQ TYPE="LITERAL1">?</SEQ>
+ <SEQ TYPE="LITERAL1">:</SEQ>
+ </RULES>
+
+ <!-- Literals framed by apostrophs -->
+ <RULES SET="APOSTR" DEFAULT="LITERAL1" ESCAPE="\">
+
+ <!-- just a hack for sprintf -->
+ <SEQ_REGEXP HASH_CHAR="%" TYPE="LITERAL4">%\d*\.?\d*[dfis]</SEQ_REGEXP>
+
+ </RULES>
+
+ <RULES SET="EXEC" DEFAULT="KEYWORD3" ESCAPE="\">
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- Variables -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>@{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">@</MARK_FOLLOWING>
+
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>%{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
+ </RULES>
+
+ <RULES SET="VARIABLE" DEFAULT="KEYWORD2" ESCAPE="\">
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">-></SEQ>
+ </RULES>
+
+ <RULES SET="REGEXP" DEFAULT="MARKUP" ESCAPE="\">
+ <!-- ??? -->
+ <SEQ TYPE="MARKUP">)(</SEQ>
+ </RULES>
+
+ <RULES SET="SUB_NAME" DEFAULT="FUNCTION">
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+ <SPAN TYPE="OPERATOR" DELEGATE="SUB_PROTO">
+ <BEGIN>(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="SUB_PROTO" DEFAULT="LITERAL1">
+ <SEQ TYPE="LITERAL2">$</SEQ>
+ <SEQ TYPE="LITERAL2">@</SEQ>
+ <SEQ TYPE="LITERAL2">%</SEQ>
+ <SEQ TYPE="LITERAL2">&</SEQ>
+ <SEQ TYPE="LITERAL2">*</SEQ>
+ <SEQ TYPE="LITERAL3">\</SEQ>
+ </RULES>
+
+ <!-- Used for quote-like operators; just makes sure the brackets are balanced. -->
+ <RULES SET="QUOTED_BRACKET" DEFAULT="LITERAL1" ESCAPE="\">
+ <SPAN NO_LINE_BREAK="FALSE"
+ TYPE="LITERAL1"
+ MATCH_TYPE="OPERATOR"
+ DELEGATE="QUOTED_BRACKET"
+ HASH_CHARS="[">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ </RULES>
+ <RULES SET="QUOTED_BRACE" DEFAULT="LITERAL1" ESCAPE="\">
+ <SPAN NO_LINE_BREAK="FALSE"
+ TYPE="LITERAL1"
+ MATCH_TYPE="OPERATOR"
+ DELEGATE="QUOTED_BRACE"
+ HASH_CHARS="{">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ </RULES>
+ <RULES SET="QUOTED_PAREN" DEFAULT="LITERAL1" ESCAPE="\">
+ <SPAN NO_LINE_BREAK="FALSE"
+ TYPE="LITERAL1"
+ MATCH_TYPE="OPERATOR"
+ DELEGATE="QUOTED_PAREN"
+ HASH_CHARS="(">
+ <BEGIN>(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/php.xml b/jEdit/modes/php.xml
index 06a2697..5df8ab4 100644
--- a/jEdit/modes/php.xml
+++ b/jEdit/modes/php.xml
@@ -1,5137 +1,5144 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Catalog entry:
-<MODE NAME="php" FILE="php.xml"
- FILE_NAME_GLOB="*.{php3,php4,php5,php,phtml}"
- FIRST_LINE_GLOB="<?php*" />
--->
-
-
-<!--
-Usage of keywords:
- - COMMENT1: range comments (/* ... */)
- - COMMENT2: line comments (using //)
- - COMMENT3: phpdoc comments (/** .. */)
- - COMMENT4: line comments (using #)
- - DIGIT: numbers
- - FUNCTION: custom functions and class/object methods, e.g. foo(), $foo->bar() and foo::bar()
- - KEYWORD1: basic PHP keywords, e.g. true, false, extends, implements
- language constructs, e.g. if .. then .. else
- - KEYWORD2: internal PHP functions,
- - KEYWORD3: variables, e.g. $foo
- - KEYWORD4: class definitions, object members, internal PHP objects
- - LABEL: phpdoc labels, like @see
- CDATA blocks
- - LITERAL1: Strings in single quotes, e.g. 'foo'
- - LITERAL2: Strings in double quotes, e.g. "foo"
- - LITERAL3: Strings in backtick quotes, e.g. `foo`
- - LITERAL4: heredocs, e.g. "<<< FOO .... FOO
- - MARKUP: tags, e.g. <?php .. ?>
- - OPERATOR: normal operators, e.g. + - ( ) { } [ ]
- PHP language types in phpdoc block (TODO: sane?!)
--->
-
-<!--
-TODO:
- - cleanup/factorize PHPDOC section
--->
-
-
-<MODE>
- <PROPS>
- <!-- Default comment props (used when a ruleset has no other props) -->
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
-
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while|else\s*(if)?|for(each)?|switch|declare)\s*\(.*\)[^{:;]*)|(do\s*[^\({:;]*))" />
- <PROPERTY NAME="lineUpClosingBracket" VALUE="true" /><!-- @deprecated since 4.3pre2 -->
- <PROPERTY NAME="unindentThisLine"
- VALUE="^.*(default:\s*|case.*:.*)$" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- </PROPS>
-
-
- <RULES IGNORE_CASE="TRUE">
- <PROPS>
- <!-- comment props for "HTML"/not-PHP: -->
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <PROPERTY NAME="lineComment" VALUE="" />
- </PROPS>
-
- <!-- regular PHP tags -->
- <SPAN TYPE="MARKUP" DELEGATE="PHP">
- <BEGIN><?php</BEGIN>
- <END>?></END>
- </SPAN>
-
- <!-- short tags: -->
- <SPAN TYPE="MARKUP" DELEGATE="PHP">
- <BEGIN><?</BEGIN>
- <END>?></END>
- </SPAN>
- <SPAN TYPE="MARKUP" DELEGATE="PHP">
- <BEGIN><?=</BEGIN>
- <END>?></END>
- </SPAN>
-
- <!-- ASP style tags: -->
- <SPAN TYPE="MARKUP" DELEGATE="PHP">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- <SPAN TYPE="MARKUP" DELEGATE="PHP">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- SSI? -->
- <SPAN_REGEXP HASH_CHAR="<SCRIPT" TYPE="MARKUP" DELEGATE="PHP">
- <BEGIN><SCRIPT\s+LANGUAGE="?PHP"?></BEGIN>
- <END></SCRIPT></END>
- </SPAN_REGEXP>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1" DELEGATE="COMMENT1+PHP">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT_OPENTAG">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- CSS -->
- <SPAN TYPE="MARKUP" DELEGATE="CSS_OPENTAG">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- CDATA -->
- <SPAN TYPE="LABEL" DELEGATE="MAIN">
- <BEGIN><![CDATA[</BEGIN>
- <END>]]></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="MARKUP" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SEQ_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="TAGS"></?\w+</SEQ_REGEXP>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
-
- <!-- HTML tags (from MAIN rule) -->
- <RULES SET="TAGS" DEFAULT="MARKUP" ESCAPE="\">
- <PROPS>
- <!-- comment props for "HTML"/not-PHP: -->
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <PROPERTY NAME="lineComment" VALUE="" />
- </PROPS>
-
- <SEQ TYPE="MARKUP" DELEGATE="MAIN">></SEQ><!-- from SEQ_REGEXP delegate -->
-
- <IMPORT DELEGATE="TO_LITERAL+PHP" />
- <IMPORT DELEGATE="TO_PHP" />
- <IMPORT DELEGATE="INVALID_LT" />
- <IMPORT DELEGATE="html::TAGS" />
- </RULES>
-
-
- <!-- CSS where PHP code may be injected -->
- <RULES SET="CSS_OPENTAG" DEFAULT="MARKUP">
- <SEQ TYPE="MARKUP" DELEGATE="CSS">></SEQ>
-
- <IMPORT DELEGATE="TO_LITERAL+PHP"/>
- </RULES>
-
- <RULES SET="CSS" DEFAULT="MARKUP">
- <!-- CSS has no line comment: -->
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="" />
- </PROPS>
-
- <SPAN DELEGATE="CSS"><!-- give priority to PHP -->
- <BEGIN>(</BEGIN>
- <END>)</END>
- </SPAN>
- <IMPORT DELEGATE="TO_PHP"/>
- <IMPORT DELEGATE="css::MAIN"/>
- </RULES>
-
-
- <!-- Helper for class references in rule PHP -->
- <RULES SET="OBJECT_PHP" DEFAULT="KEYWORD4" ESCAPE="\"> <!-- TODO: ESCAPE should not be needed, see http://sourceforge.net/tracker/index.php?func=detail&aid=1600458&group_id=588&atid=100588 -->
- <SPAN TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Keep brackets together and handle the expression therein with "PHP_EXPRESSION" -->
- <SPAN TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">
- <BEGIN>(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- Delegate expressions methods/members, e.g. $a->{'bar-'.substr($b,1)}: -->
- <SPAN_REGEXP HASH_CHAR="->" TYPE="KEYWORD4" DELEGATE="PHP_EXPRESSION">
- <BEGIN>->\s*\{</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
-
- <!-- Recurse methods: -->
- <SEQ_REGEXP HASH_CHAR="->" TYPE="FUNCTION" DELEGATE="OBJECT_PHP">->\s*\w+\s*(?=\()</SEQ_REGEXP>
-
- <!-- Recurse members: -->
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHP">->\w*</SEQ_REGEXP>
-
- <!-- Handle comments (without phpdoc, which makes no sense here) -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT4">#</EOL_SPAN>
-
- <!-- Operators delegate back to PHP_EXPRESSION {{{ -->
- <SEQ_REGEXP DELEGATE="PHP_EXPRESSION">\s</SEQ_REGEXP>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">!</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">%</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">&</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">></SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION"><</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">*</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">/</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">+</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">,</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">-</SEQ><!-- "->" gets handled before -->
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">.</SEQ>
- <SEQ_REGEXP HASH_CHAR="/" TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">/(?!/)</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=":" TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">:(?!:)</SEQ_REGEXP><!-- not "::" -->
- <SEQ TYPE="OPERATOR" DELEGATE="PHP">;</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">=</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">?</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">@</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">[</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">]</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">^</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">`</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">{</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">|</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">}</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">~</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">\</SEQ>
- <!-- }}} -->
-
- <IMPORT DELEGATE="PHP_EXPRESSION" />
- <IMPORT DELEGATE="PHP_VAR" />
- <IMPORT DELEGATE="PHP_KEYWORDS" />
- </RULES>
-
-
- <!-- PHP literal where variables get parsed -->
- <RULES SET="PHP_LITERAL2" DEFAULT="LITERAL2" ESCAPE="\">
- <!-- expressions in curly braces ("{$foo}") -->
- <SPAN_REGEXP HASH_CHAR="{" TYPE="LITERAL2" DELEGATE="OBJECT_PHP">
- <BEGIN>\{(?=\$)</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
-
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHP_LITERAL2">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[\$?[\s\w'"]+\])?->)</SEQ_REGEXP>
- <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
-
- <!-- Vars like "${foo}" (does not work for objects/methods) -->
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3">[\$]+\{[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\}</SEQ_REGEXP>
-
- <IMPORT DELEGATE="PHP_VAR" />
- </RULES>
-
- <!-- Helper for class references in rule PHP_LITERAL2 ("foo") -->
- <RULES SET="OBJECT_PHP_LITERAL2" DEFAULT="KEYWORD4" ESCAPE="\"> <!-- TODO: ESCAPE should not be needed, see http://sourceforge.net/tracker/index.php?func=detail&aid=1600458&group_id=588&atid=100588 -->
- <SPAN TYPE="OPERATOR" DELEGATE="PHP">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Recurse members: -->
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHP_LITERAL2">->\w*</SEQ_REGEXP>
-
- <!-- Operators delegate back to PHP_LITERAL2 {{{ -->
- <SEQ_REGEXP DELEGATE="PHP_LITERAL2">\s</SEQ_REGEXP>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">'</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">`</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">!</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">%</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">&</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">></SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2"><</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">*</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">/</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">+</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">,</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">-</SEQ><!-- "->" gets handled before -->
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">.</SEQ>
- <SEQ_REGEXP HASH_CHAR="/" TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">/(?!/)</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=":" TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">:(?!:)</SEQ_REGEXP><!-- not "::" -->
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">;</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">=</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">?</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">@</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">[</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">]</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">^</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">`</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">{</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">|</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">}</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">~</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">(</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">)</SEQ>
- <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">\</SEQ>
- <!-- }}} -->
- </RULES>
-
-
- <!-- PHP literal in backticks, where variables get parsed; based on PHP_LITERAL2 -->
- <RULES SET="PHP_LITERAL3" DEFAULT="LITERAL3" ESCAPE="\">
- <!-- expressions in curly braces ("{$foo}") -->
- <SPAN_REGEXP HASH_CHAR="{" TYPE="LITERAL3" DELEGATE="OBJECT_PHP">
- <BEGIN>\{(?=\$)</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
-
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHP_LITERAL3">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[\$?[\s\w'"]+\])?->)</SEQ_REGEXP>
- <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
-
- <!-- Vars like "${foo}" (does not work for objects/methods) -->
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3">[\$]+\{[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\}</SEQ_REGEXP>
-
- <IMPORT DELEGATE="PHP_VAR" />
- </RULES>
-
- <!-- Helper for class references in rule PHP_LITERAL3 (`foo`) -->
- <RULES SET="OBJECT_PHP_LITERAL3" DEFAULT="KEYWORD4" ESCAPE="\"> <!-- TODO: ESCAPE should not be needed, see http://sourceforge.net/tracker/index.php?func=detail&aid=1600458&group_id=588&atid=100588 -->
- <SPAN TYPE="OPERATOR" DELEGATE="PHP">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Recurse members: -->
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHP_LITERAL3">->\w*</SEQ_REGEXP>
-
- <!-- Operators delegate back to PHP_LITERAL3 {{{ -->
- <SEQ_REGEXP DELEGATE="PHP_LITERAL3">\s</SEQ_REGEXP>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">"</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">'</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">!</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">%</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">&</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">></SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3"><</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">*</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">/</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">+</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">,</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">-</SEQ><!-- "->" gets handled before -->
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">.</SEQ>
- <SEQ_REGEXP HASH_CHAR="/" TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">/(?!/)</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=":" TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">:(?!:)</SEQ_REGEXP><!-- not "::" -->
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">;</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">=</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">?</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">@</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">[</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">]</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">^</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">`</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">{</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">|</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">}</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">~</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">(</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">)</SEQ>
- <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">\</SEQ>
- <!-- }}} -->
- </RULES>
-
-
- <!-- PHP heredoc blocks, where variables get parsed; see PHP_LITERAL2 -->
- <RULES SET="PHP_LITERAL4" DEFAULT="LITERAL4" ESCAPE="\">
- <!-- expressions in curly braces ("{$foo}") -->
- <SPAN_REGEXP HASH_CHAR="{" TYPE="LITERAL4" DELEGATE="OBJECT_PHP">
- <BEGIN>\{(?=\$)</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
-
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHP_LITERAL4">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[\$?[\s\w'"]+\])?->)</SEQ_REGEXP>
- <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
-
- <!-- Vars like "${foo}" (does not work for objects/methods) -->
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3">[\$]+\{[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\}</SEQ_REGEXP>
-
- <IMPORT DELEGATE="PHP_VAR" />
- </RULES>
-
- <!-- Helper for class references in rule PHP_LITERAL4 ("<<< FOO .. FOO") -->
- <RULES SET="OBJECT_PHP_LITERAL4" DEFAULT="KEYWORD4" ESCAPE="\"> <!-- TODO: ESCAPE should not be needed, see http://sourceforge.net/tracker/index.php?func=detail&aid=1600458&group_id=588&atid=100588 -->
- <SPAN TYPE="OPERATOR" DELEGATE="PHP">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Recurse members: -->
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHP_LITERAL4">->\w*</SEQ_REGEXP>
-
- <!-- Operators delegate back to PHP_LITERAL4 {{{ -->
- <SEQ_REGEXP DELEGATE="PHP_LITERAL4">\s</SEQ_REGEXP>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">'</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">"</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">`</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">!</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">%</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">&</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">></SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4"><</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">*</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">/</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">+</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">,</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">-</SEQ><!-- "->" gets handled before -->
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">.</SEQ>
- <SEQ_REGEXP HASH_CHAR="/" TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">/(?!/)</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR=":" TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">:(?!:)</SEQ_REGEXP><!-- not "::" -->
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">;</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">=</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">?</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">@</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">[</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">]</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">^</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">`</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">{</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">|</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">}</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">~</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">(</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">)</SEQ>
- <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">\</SEQ>
- <!-- }}} -->
- </RULES>
-
-
- <!-- Helper for class / interface definition -->
- <RULES SET="DEF_CLASS" DEFAULT="KEYWORD4">
- <!-- back to "PHP" for curly brace, the closing one gets handled there -->
- <SEQ TYPE="OPERATOR" DELEGATE="PHP">{</SEQ>
- <!-- Invalid, go back: -->
- <SEQ TYPE="INVALID" DELEGATE="PHP">;</SEQ>
- <SEQ TYPE="INVALID" DELEGATE="PHP">=</SEQ>
-
- <IMPORT DELEGATE="PHP_COMMENTS" />
-
- <KEYWORDS>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
- </KEYWORDS>
- </RULES>
-
-
- <!-- Function definition -->
- <RULES SET="DEF_FUNCTION" DEFAULT="FUNCTION">
- <!-- Invalid, go back: -->
- <SEQ TYPE="INVALID" DELEGATE="PHP">;</SEQ>
-
- <SEQ TYPE="OPERATOR">&</SEQ><!-- return by reference -->
- <SEQ TYPE="OPERATOR" DELEGATE="DEF_FUNCTION_ARGS">(</SEQ>
-
- <IMPORT DELEGATE="PHP_COMMENTS" />
- </RULES>
-
- <!-- Arguments of a function definition -->
- <RULES SET="DEF_FUNCTION_ARGS" DEFAULT="KEYWORD4">
- <!-- back to "PHP" for closing bracket: -->
- <SEQ TYPE="OPERATOR" DELEGATE="PHP">)</SEQ>
-
- <SEQ TYPE="OPERATOR" DELEGATE="DEF_FUNCTION_ARGS_VALUE">=</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
-
- <IMPORT DELEGATE="PHP_VAR" />
- <IMPORT DELEGATE="PHP_COMMENTS" />
- <IMPORT DELEGATE="PHP_TYPES" />
- </RULES>
-
- <!-- Default values of a function argument -->
- <RULES SET="DEF_FUNCTION_ARGS_VALUE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
- <!-- Literals, without var substitution: -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN_REGEXP HASH_CHAR="array" TYPE="KEYWORD4" DELEGATE="DEF_FUNCTION_ARGS_VALUE_ARRAY">
- <BEGIN>array\s*\(</BEGIN>
- <END>)</END>
- </SPAN_REGEXP>
- <SEQ TYPE="KEYWORD4">null</SEQ>
-
- <SEQ TYPE="OPERATOR" DELEGATE="DEF_FUNCTION_ARGS">,</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP">)</SEQ>
-
- <IMPORT DELEGATE="PHP_COMMENTS" />
- <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
- </RULES>
-
- <!-- Body of "array(...)" in function argument default values -->
- <RULES SET="DEF_FUNCTION_ARGS_VALUE_ARRAY" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
- <!-- Literals, without var substitution: -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SEQ TYPE="OPERATOR">,</SEQ>
- </RULES>
-
-
- <!-- Comments in PHP -->
- <RULES SET="PHP_COMMENTS">
- <!-- special case -->
- <SEQ TYPE="COMMENT1">/**/</SEQ>
-
- <!-- PHPdoc comment -->
- <SPAN TYPE="COMMENT3" DELEGATE="PHPDOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- range comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- line comments -->
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT4">#</EOL_SPAN>
- </RULES>
-
-
- <!-- PHP variables (PHPDOC_VAR for phpdoc blocks) -->
- <RULES SET="PHP_VAR">
- <!-- (Class-)Variables -->
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD4">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=\s*=\s*(&\s*)?new)</SEQ_REGEXP>
-
- <!-- Normal variables -->
- <!-- Not using MARK_FOLLOWING, which would match $foo\" completely (in PHP_LITERAL2) -->
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*</SEQ_REGEXP>
- </RULES>
-
-
- <RULES SET="PHP" ESCAPE="\" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
- <!-- Class definitions.
- This uses SEQ_REGEXP (instead of SPAN_*) for the keywords only,
- so that the curly braces can be highlighted as operator. -->
- <SEQ_REGEXP HASH_CHARS="ci" AT_WORD_START="TRUE" DELEGATE="DEF_CLASS" TYPE="KEYWORD1">(class|interface)(\s+|$)</SEQ_REGEXP>
-
- <SEQ_REGEXP HASH_CHAR="function" AT_WORD_START="TRUE" DELEGATE="DEF_FUNCTION" TYPE="KEYWORD1">(function)(\s+|$)</SEQ_REGEXP>
-
- <!-- Imports: -->
- <IMPORT DELEGATE="PHP_EXPRESSION" />
- </RULES>
-
-
- <!-- A basic PHP expression, as it can be used in $a->{EXPR} -->
- <RULES SET="PHP_EXPRESSION" ESCAPE="\" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
- <!-- Comments: -->
- <!-- special case -->
- <SEQ TYPE="COMMENT1">/**/</SEQ>
- <!-- PHPdoc comment -->
- <SPAN TYPE="COMMENT3" DELEGATE="PHPDOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
- <!-- range comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <!-- line comments: -->
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT4">#</EOL_SPAN>
-
- <!-- back to MAIN for "?>" -->
- <SEQ TYPE="MARKUP" DELEGATE="MAIN">?></SEQ>
-
- <!-- Literals: -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <!--
- TODO: these should not highlight e.g. "(int)$bar"
- -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR"> (</MARK_PREVIOUS>
-
- <!-- Variable functions, e.g. $foo() -->
- <SEQ_REGEXP HASH_CHAR="$" TYPE="FUNCTION">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\s*(?=\()</SEQ_REGEXP>
-
- <!-- Readins/Heredoc -->
- <SPAN_REGEXP HASH_CHAR="<<<" TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">
- <BEGIN><![CDATA[<<<[\p{Space}'"]*([\p{Alnum}_]+)[\p{Space}'"]*]]></BEGIN>
- <END AT_LINE_START="TRUE">$1</END>
- </SPAN_REGEXP>
-
-
- <!-- Keep blocks of curly braces (scopes) together.
- This is required e.g. for handling $a->{if(1){ echo 1; }}. -->
- <!--
- TODO: this does not work with the following and therefore is commented out (should match brackets in PHP blocks only!):
- <?php { ?>
- }
- <?php } ?>
- <SPAN TYPE="OPERATOR" DELEGATE="PHP">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
- -->
-
- <!-- operators -->
- <!-- {{{ -->
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
-
- <!-- TODO: does not get used, because of MARK_PREVIOUS for FUNCTION below -->
- <SEQ TYPE="OPERATOR">(array)</SEQ>
- <SEQ TYPE="OPERATOR">(bool)</SEQ>
- <SEQ TYPE="OPERATOR">(boolean)</SEQ>
- <SEQ TYPE="OPERATOR">(double)</SEQ>
- <SEQ TYPE="OPERATOR">(float)</SEQ>
- <SEQ TYPE="OPERATOR">(int)</SEQ>
- <SEQ TYPE="OPERATOR">(integer)</SEQ>
- <SEQ TYPE="OPERATOR">(object)</SEQ>
- <SEQ TYPE="OPERATOR">(real)</SEQ>
- <SEQ TYPE="OPERATOR">(string)</SEQ>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ_REGEXP HASH_CHAR=":" TYPE="OPERATOR">:(?!:)</SEQ_REGEXP><!-- not "::" -->
- <SEQ TYPE="OPERATOR" DELEGATE="PHP">;</SEQ><!-- expression end => PHP -->
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">`</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <!-- }}} -->
-
- <!-- to OBJECT_PHP: (Class-)Variables/Methods -->
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHP">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[\$?[\s\w'"]+\])?->)</SEQ_REGEXP>
- <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
-
- <!-- handle "new" keyword: -->
- <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="new" AT_WORD_START="TRUE" DELEGATE="PHP_VAR_NEW_KW">new\s+</SEQ_REGEXP>
-
- <!-- Imports: -->
- <IMPORT DELEGATE="PHP_VAR" />
- <!-- TODO: split this, so e.g. "new", "class" etc don't show up here, but only in "PHP" -->
- <IMPORT DELEGATE="PHP_KEYWORDS" />
- </RULES>
-
- <RULES SET="PHP_VAR_NEW_KW" DEFAULT="KEYWORD4">
- <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">(</SEQ>
- <SEQ TYPE="OPERATOR" DELEGATE="PHP">;</SEQ>
- </RULES>
-
- <RULES SET="PHP_BASIC_KEYWORD1">
- <KEYWORDS>
- <KEYWORD1>true</KEYWORD1>
- <KEYWORD1>false</KEYWORD1>
- <KEYWORD1>null</KEYWORD1>
- </KEYWORDS>
- </RULES>
-
-
- <RULES SET="PHP_TYPES">
- <!-- Taken from: http://php.net/manual/en/language.types.php -->
- <KEYWORDS>
- <OPERATOR>array</OPERATOR>
- <OPERATOR>bool</OPERATOR>
- <OPERATOR>boolean</OPERATOR>
- <OPERATOR>callback</OPERATOR>
- <OPERATOR>double</OPERATOR>
- <OPERATOR>float</OPERATOR>
- <OPERATOR>int</OPERATOR>
- <OPERATOR>integer</OPERATOR>
- <OPERATOR>mixed</OPERATOR>
- <OPERATOR>number</OPERATOR>
- <OPERATOR>NULL</OPERATOR>
- <OPERATOR>object</OPERATOR>
- <OPERATOR>real</OPERATOR><!-- not listed, but valid in a typecast -->
- <OPERATOR>resource</OPERATOR>
- <OPERATOR>string</OPERATOR>
- </KEYWORDS>
- </RULES>
-
-
- <RULES SET="PHP_KEYWORDS">
- <IMPORT DELEGATE="KEYWORDS_VISIBILITY" />
- <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
-
- <KEYWORDS>
- <!-- start: generated by buildfunctionlist.php -->
- <!-- {{{ -->
- <!-- Internal classes (61) -->
- <KEYWORD4>arrayiterator</KEYWORD4>
- <KEYWORD4>arrayobject</KEYWORD4>
- <KEYWORD4>cachingiterator</KEYWORD4>
- <KEYWORD4>cachingrecursiveiterator</KEYWORD4>
- <KEYWORD4>collection</KEYWORD4>
- <KEYWORD4>descriptor</KEYWORD4>
- <KEYWORD4>directoryiterator</KEYWORD4>
- <KEYWORD4>domattr</KEYWORD4>
- <KEYWORD4>domattribute</KEYWORD4>
- <KEYWORD4>domcharacterdata</KEYWORD4>
- <KEYWORD4>domdocument</KEYWORD4>
- <KEYWORD4>domdocumenttype</KEYWORD4>
- <KEYWORD4>domelement</KEYWORD4>
- <KEYWORD4>domimplementation</KEYWORD4>
- <KEYWORD4>domnamednodemap</KEYWORD4>
- <KEYWORD4>domnode</KEYWORD4>
- <KEYWORD4>domnodelist</KEYWORD4>
- <KEYWORD4>domprocessinginstruction</KEYWORD4>
- <KEYWORD4>domtext</KEYWORD4>
- <KEYWORD4>domxpath</KEYWORD4>
- <KEYWORD4>domxsltstylesheet</KEYWORD4>
- <KEYWORD4>filteriterator</KEYWORD4>
- <KEYWORD4>hw_api</KEYWORD4>
- <KEYWORD4>hw_api_attribute</KEYWORD4>
- <KEYWORD4>hw_api_content</KEYWORD4>
- <KEYWORD4>hw_api_error</KEYWORD4>
- <KEYWORD4>hw_api_object</KEYWORD4>
- <KEYWORD4>hw_api_reason</KEYWORD4>
- <KEYWORD4>limititerator</KEYWORD4>
- <KEYWORD4>lob</KEYWORD4>
- <KEYWORD4>memcache</KEYWORD4>
- <KEYWORD4>parentiterator</KEYWORD4>
- <KEYWORD4>pdo</KEYWORD4>
- <KEYWORD4>pdostatement</KEYWORD4>
- <KEYWORD4>rar</KEYWORD4>
- <KEYWORD4>recursivedirectoryiterator</KEYWORD4>
- <KEYWORD4>recursiveiteratoriterator</KEYWORD4>
- <KEYWORD4>simplexmlelement</KEYWORD4>
- <KEYWORD4>simplexmliterator</KEYWORD4>
- <KEYWORD4>soapclient</KEYWORD4>
- <KEYWORD4>soapfault</KEYWORD4>
- <KEYWORD4>soapheader</KEYWORD4>
- <KEYWORD4>soapparam</KEYWORD4>
- <KEYWORD4>soapserver</KEYWORD4>
- <KEYWORD4>soapvar</KEYWORD4>
- <KEYWORD4>swfaction</KEYWORD4>
- <KEYWORD4>swfbitmap</KEYWORD4>
- <KEYWORD4>swfbutton</KEYWORD4>
- <KEYWORD4>swfdisplayitem</KEYWORD4>
- <KEYWORD4>swffill</KEYWORD4>
- <KEYWORD4>swffont</KEYWORD4>
- <KEYWORD4>swfgradient</KEYWORD4>
- <KEYWORD4>swfmorph</KEYWORD4>
- <KEYWORD4>swfmovie</KEYWORD4>
- <KEYWORD4>swfshape</KEYWORD4>
- <KEYWORD4>swfsprite</KEYWORD4>
- <KEYWORD4>swftext</KEYWORD4>
- <KEYWORD4>swftextfield</KEYWORD4>
- <KEYWORD4>tidy</KEYWORD4>
- <KEYWORD4>tidy_node</KEYWORD4>
- <KEYWORD4>variant</KEYWORD4>
-
-
- <!-- Internal functions (3549) -->
- <KEYWORD2>__call</KEYWORD2> <!-- soapclient -->
- <KEYWORD2>__construct</KEYWORD2> <!-- arrayobject, directoryiterator, pdo, tidy -->
- <KEYWORD2>__getfunctions</KEYWORD2> <!-- soapclient -->
- <KEYWORD2>__getlastrequest</KEYWORD2> <!-- soapclient -->
- <KEYWORD2>__getlastresponse</KEYWORD2> <!-- soapclient -->
- <KEYWORD2>__gettypes</KEYWORD2> <!-- soapclient -->
- <KEYWORD2>__tostring</KEYWORD2> <!-- cachingiterator -->
- <KEYWORD2>abs</KEYWORD2>
- <KEYWORD2>acos</KEYWORD2>
- <KEYWORD2>acosh</KEYWORD2>
- <KEYWORD2>add</KEYWORD2> <!-- memcache, swfmovie, swfsprite -->
- <KEYWORD2>add_namespace</KEYWORD2> <!-- domnode -->
- <KEYWORD2>add_root</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>addaction</KEYWORD2> <!-- swfbutton -->
- <KEYWORD2>addcolor</KEYWORD2> <!-- swfdisplayitem -->
- <KEYWORD2>addcslashes</KEYWORD2>
- <KEYWORD2>addentry</KEYWORD2> <!-- swfgradient -->
- <KEYWORD2>addfill</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>addfunction</KEYWORD2> <!-- soapserver -->
- <KEYWORD2>addshape</KEYWORD2> <!-- swfbutton -->
- <KEYWORD2>addslashes</KEYWORD2>
- <KEYWORD2>addstring</KEYWORD2> <!-- swftext, swftextfield -->
- <KEYWORD2>aggregate</KEYWORD2>
- <KEYWORD2>aggregate_info</KEYWORD2>
- <KEYWORD2>aggregate_methods</KEYWORD2>
- <KEYWORD2>aggregate_methods_by_list</KEYWORD2>
- <KEYWORD2>aggregate_methods_by_regexp</KEYWORD2>
- <KEYWORD2>aggregate_properties</KEYWORD2>
- <KEYWORD2>aggregate_properties_by_list</KEYWORD2>
- <KEYWORD2>aggregate_properties_by_regexp</KEYWORD2>
- <KEYWORD2>aggregation_info</KEYWORD2>
- <KEYWORD2>align</KEYWORD2> <!-- swftextfield -->
- <KEYWORD2>apache_child_terminate</KEYWORD2>
- <KEYWORD2>apache_get_modules</KEYWORD2>
- <KEYWORD2>apache_get_version</KEYWORD2>
- <KEYWORD2>apache_getenv</KEYWORD2>
- <KEYWORD2>apache_lookup_uri</KEYWORD2>
- <KEYWORD2>apache_note</KEYWORD2>
- <KEYWORD2>apache_request_headers</KEYWORD2>
- <KEYWORD2>apache_response_headers</KEYWORD2>
- <KEYWORD2>apache_setenv</KEYWORD2>
- <KEYWORD2>apd_breakpoint</KEYWORD2>
- <KEYWORD2>apd_callstack</KEYWORD2>
- <KEYWORD2>apd_clunk</KEYWORD2>
- <KEYWORD2>apd_continue</KEYWORD2>
- <KEYWORD2>apd_croak</KEYWORD2>
- <KEYWORD2>apd_dump_function_table</KEYWORD2>
- <KEYWORD2>apd_dump_persistent_resources</KEYWORD2>
- <KEYWORD2>apd_dump_regular_resources</KEYWORD2>
- <KEYWORD2>apd_echo</KEYWORD2>
- <KEYWORD2>apd_get_active_symbols</KEYWORD2>
- <KEYWORD2>apd_set_pprof_trace</KEYWORD2>
- <KEYWORD2>apd_set_session</KEYWORD2>
- <KEYWORD2>apd_set_session_trace</KEYWORD2>
- <KEYWORD2>apd_set_socket_session_trace</KEYWORD2>
- <KEYWORD2>append</KEYWORD2> <!-- arrayobject, collection, lob -->
- <KEYWORD2>append_child</KEYWORD2> <!-- domnode -->
- <KEYWORD2>append_sibling</KEYWORD2> <!-- domnode -->
- <KEYWORD2>appendchild</KEYWORD2> <!-- domnode -->
- <KEYWORD2>appenddata</KEYWORD2> <!-- domcharacterdata -->
- <KEYWORD2>array_change_key_case</KEYWORD2>
- <KEYWORD2>array_chunk</KEYWORD2>
- <KEYWORD2>array_combine</KEYWORD2>
- <KEYWORD2>array_count_values</KEYWORD2>
- <KEYWORD2>array_diff</KEYWORD2>
- <KEYWORD2>array_diff_assoc</KEYWORD2>
- <KEYWORD2>array_diff_key</KEYWORD2>
- <KEYWORD2>array_diff_uassoc</KEYWORD2>
- <KEYWORD2>array_diff_ukey</KEYWORD2>
- <KEYWORD2>array_fill</KEYWORD2>
- <KEYWORD2>array_filter</KEYWORD2>
- <KEYWORD2>array_flip</KEYWORD2>
- <KEYWORD2>array_intersect</KEYWORD2>
- <KEYWORD2>array_intersect_assoc</KEYWORD2>
- <KEYWORD2>array_intersect_key</KEYWORD2>
- <KEYWORD2>array_intersect_uassoc</KEYWORD2>
- <KEYWORD2>array_intersect_ukey</KEYWORD2>
- <KEYWORD2>array_key_exists</KEYWORD2>
- <KEYWORD2>array_keys</KEYWORD2>
- <KEYWORD2>array_map</KEYWORD2>
- <KEYWORD2>array_merge</KEYWORD2>
- <KEYWORD2>array_merge_recursive</KEYWORD2>
- <KEYWORD2>array_multisort</KEYWORD2>
- <KEYWORD2>array_pad</KEYWORD2>
- <KEYWORD2>array_pop</KEYWORD2>
- <KEYWORD2>array_push</KEYWORD2>
- <KEYWORD2>array_rand</KEYWORD2>
- <KEYWORD2>array_reduce</KEYWORD2>
- <KEYWORD2>array_reverse</KEYWORD2>
- <KEYWORD2>array_search</KEYWORD2>
- <KEYWORD2>array_shift</KEYWORD2>
- <KEYWORD2>array_slice</KEYWORD2>
- <KEYWORD2>array_splice</KEYWORD2>
- <KEYWORD2>array_sum</KEYWORD2>
- <KEYWORD2>array_udiff</KEYWORD2>
- <KEYWORD2>array_udiff_assoc</KEYWORD2>
- <KEYWORD2>array_udiff_uassoc</KEYWORD2>
- <KEYWORD2>array_uintersect</KEYWORD2>
- <KEYWORD2>array_uintersect_assoc</KEYWORD2>
- <KEYWORD2>array_uintersect_uassoc</KEYWORD2>
- <KEYWORD2>array_unique</KEYWORD2>
- <KEYWORD2>array_unshift</KEYWORD2>
- <KEYWORD2>array_values</KEYWORD2>
- <KEYWORD2>array_walk</KEYWORD2>
- <KEYWORD2>array_walk_recursive</KEYWORD2>
- <KEYWORD2>arsort</KEYWORD2>
- <KEYWORD2>ascii2ebcdic</KEYWORD2>
- <KEYWORD2>asin</KEYWORD2>
- <KEYWORD2>asinh</KEYWORD2>
- <KEYWORD2>asort</KEYWORD2>
- <KEYWORD2>aspell_check</KEYWORD2>
- <KEYWORD2>aspell_check_raw</KEYWORD2>
- <KEYWORD2>aspell_new</KEYWORD2>
- <KEYWORD2>aspell_suggest</KEYWORD2>
- <KEYWORD2>assert</KEYWORD2>
- <KEYWORD2>assert_options</KEYWORD2>
- <KEYWORD2>assign</KEYWORD2> <!-- collection, hw_api_object -->
- <KEYWORD2>assignelem</KEYWORD2> <!-- collection -->
- <KEYWORD2>asxml</KEYWORD2> <!-- simplexmlelement -->
- <KEYWORD2>atan</KEYWORD2>
- <KEYWORD2>atan2</KEYWORD2>
- <KEYWORD2>atanh</KEYWORD2>
- <KEYWORD2>attreditable</KEYWORD2> <!-- hw_api_object -->
- <KEYWORD2>attributes</KEYWORD2> <!-- domnode, simplexmlelement, tidy_node -->
- <KEYWORD2>base64_decode</KEYWORD2>
- <KEYWORD2>base64_encode</KEYWORD2>
- <KEYWORD2>base_convert</KEYWORD2>
- <KEYWORD2>basename</KEYWORD2>
- <KEYWORD2>bcadd</KEYWORD2>
- <KEYWORD2>bccomp</KEYWORD2>
- <KEYWORD2>bcdiv</KEYWORD2>
- <KEYWORD2>bcmod</KEYWORD2>
- <KEYWORD2>bcmul</KEYWORD2>
- <KEYWORD2>bcpow</KEYWORD2>
- <KEYWORD2>bcpowmod</KEYWORD2>
- <KEYWORD2>bcscale</KEYWORD2>
- <KEYWORD2>bcsqrt</KEYWORD2>
- <KEYWORD2>bcsub</KEYWORD2>
- <KEYWORD2>begintransaction</KEYWORD2> <!-- pdo -->
- <KEYWORD2>bin2hex</KEYWORD2>
- <KEYWORD2>bind_textdomain_codeset</KEYWORD2>
- <KEYWORD2>bindcolumn</KEYWORD2> <!-- pdostatement -->
- <KEYWORD2>bindec</KEYWORD2>
- <KEYWORD2>bindparam</KEYWORD2> <!-- pdostatement -->
- <KEYWORD2>bindtextdomain</KEYWORD2>
- <KEYWORD2>bzclose</KEYWORD2>
- <KEYWORD2>bzcompress</KEYWORD2>
- <KEYWORD2>bzdecompress</KEYWORD2>
- <KEYWORD2>bzerrno</KEYWORD2>
- <KEYWORD2>bzerror</KEYWORD2>
- <KEYWORD2>bzerrstr</KEYWORD2>
- <KEYWORD2>bzflush</KEYWORD2>
- <KEYWORD2>bzopen</KEYWORD2>
- <KEYWORD2>bzread</KEYWORD2>
- <KEYWORD2>bzwrite</KEYWORD2>
- <KEYWORD2>cal_days_in_month</KEYWORD2>
- <KEYWORD2>cal_from_jd</KEYWORD2>
- <KEYWORD2>cal_info</KEYWORD2>
- <KEYWORD2>cal_to_jd</KEYWORD2>
- <KEYWORD2>call_user_func</KEYWORD2>
- <KEYWORD2>call_user_func_array</KEYWORD2>
- <KEYWORD2>call_user_method</KEYWORD2>
- <KEYWORD2>call_user_method_array</KEYWORD2>
- <KEYWORD2>ccvs_add</KEYWORD2>
- <KEYWORD2>ccvs_auth</KEYWORD2>
- <KEYWORD2>ccvs_command</KEYWORD2>
- <KEYWORD2>ccvs_count</KEYWORD2>
- <KEYWORD2>ccvs_delete</KEYWORD2>
- <KEYWORD2>ccvs_done</KEYWORD2>
- <KEYWORD2>ccvs_init</KEYWORD2>
- <KEYWORD2>ccvs_lookup</KEYWORD2>
- <KEYWORD2>ccvs_new</KEYWORD2>
- <KEYWORD2>ccvs_report</KEYWORD2>
- <KEYWORD2>ccvs_return</KEYWORD2>
- <KEYWORD2>ccvs_reverse</KEYWORD2>
- <KEYWORD2>ccvs_sale</KEYWORD2>
- <KEYWORD2>ccvs_status</KEYWORD2>
- <KEYWORD2>ccvs_textvalue</KEYWORD2>
- <KEYWORD2>ccvs_void</KEYWORD2>
- <KEYWORD2>ceil</KEYWORD2>
- <KEYWORD2>chdir</KEYWORD2>
- <KEYWORD2>checkdate</KEYWORD2>
- <KEYWORD2>checkdnsrr</KEYWORD2>
- <KEYWORD2>checkin</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>checkout</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>chgrp</KEYWORD2>
- <KEYWORD2>child_nodes</KEYWORD2> <!-- domnode -->
- <KEYWORD2>children</KEYWORD2> <!-- hw_api, simplexmlelement, tidy_node -->
- <KEYWORD2>chmod</KEYWORD2>
- <KEYWORD2>chop</KEYWORD2>
- <KEYWORD2>chown</KEYWORD2>
- <KEYWORD2>chr</KEYWORD2>
- <KEYWORD2>chroot</KEYWORD2>
- <KEYWORD2>chunk_split</KEYWORD2>
- <KEYWORD2>class_exists</KEYWORD2>
- <KEYWORD2>class_implements</KEYWORD2>
- <KEYWORD2>class_parents</KEYWORD2>
- <KEYWORD2>classkit_import</KEYWORD2>
- <KEYWORD2>classkit_method_add</KEYWORD2>
- <KEYWORD2>classkit_method_copy</KEYWORD2>
- <KEYWORD2>classkit_method_redefine</KEYWORD2>
- <KEYWORD2>classkit_method_remove</KEYWORD2>
- <KEYWORD2>classkit_method_rename</KEYWORD2>
- <KEYWORD2>clearstatcache</KEYWORD2>
- <KEYWORD2>clone_node</KEYWORD2> <!-- domnode -->
- <KEYWORD2>clonenode</KEYWORD2> <!-- domnode -->
- <KEYWORD2>close</KEYWORD2> <!-- lob, memcache -->
- <KEYWORD2>closedir</KEYWORD2>
- <KEYWORD2>closelog</KEYWORD2>
- <KEYWORD2>com</KEYWORD2>
- <KEYWORD2>com_addref</KEYWORD2>
- <KEYWORD2>com_create_guid</KEYWORD2>
- <KEYWORD2>com_event_sink</KEYWORD2>
- <KEYWORD2>com_get</KEYWORD2>
- <KEYWORD2>com_get_active_object</KEYWORD2>
- <KEYWORD2>com_invoke</KEYWORD2>
- <KEYWORD2>com_isenum</KEYWORD2>
- <KEYWORD2>com_load</KEYWORD2>
- <KEYWORD2>com_load_typelib</KEYWORD2>
- <KEYWORD2>com_message_pump</KEYWORD2>
- <KEYWORD2>com_print_typeinfo</KEYWORD2>
- <KEYWORD2>com_propget</KEYWORD2>
- <KEYWORD2>com_propput</KEYWORD2>
- <KEYWORD2>com_propset</KEYWORD2>
- <KEYWORD2>com_release</KEYWORD2>
- <KEYWORD2>com_set</KEYWORD2>
- <KEYWORD2>commit</KEYWORD2> <!-- pdo -->
- <KEYWORD2>compact</KEYWORD2>
- <KEYWORD2>connect</KEYWORD2> <!-- memcache -->
- <KEYWORD2>connection_aborted</KEYWORD2>
- <KEYWORD2>connection_status</KEYWORD2>
- <KEYWORD2>connection_timeout</KEYWORD2>
- <KEYWORD2>constant</KEYWORD2>
- <KEYWORD2>content</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>convert_cyr_string</KEYWORD2>
- <KEYWORD2>convert_uudecode</KEYWORD2>
- <KEYWORD2>convert_uuencode</KEYWORD2>
- <KEYWORD2>copy</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>cos</KEYWORD2>
- <KEYWORD2>cosh</KEYWORD2>
- <KEYWORD2>count</KEYWORD2> <!-- arrayobject, hw_api_error, hw_api_object -->
- <KEYWORD2>count_chars</KEYWORD2>
- <KEYWORD2>cpdf_add_annotation</KEYWORD2>
- <KEYWORD2>cpdf_add_outline</KEYWORD2>
- <KEYWORD2>cpdf_arc</KEYWORD2>
- <KEYWORD2>cpdf_begin_text</KEYWORD2>
- <KEYWORD2>cpdf_circle</KEYWORD2>
- <KEYWORD2>cpdf_clip</KEYWORD2>
- <KEYWORD2>cpdf_close</KEYWORD2>
- <KEYWORD2>cpdf_closepath</KEYWORD2>
- <KEYWORD2>cpdf_closepath_fill_stroke</KEYWORD2>
- <KEYWORD2>cpdf_closepath_stroke</KEYWORD2>
- <KEYWORD2>cpdf_continue_text</KEYWORD2>
- <KEYWORD2>cpdf_curveto</KEYWORD2>
- <KEYWORD2>cpdf_end_text</KEYWORD2>
- <KEYWORD2>cpdf_fill</KEYWORD2>
- <KEYWORD2>cpdf_fill_stroke</KEYWORD2>
- <KEYWORD2>cpdf_finalize</KEYWORD2>
- <KEYWORD2>cpdf_finalize_page</KEYWORD2>
- <KEYWORD2>cpdf_global_set_document_limits</KEYWORD2>
- <KEYWORD2>cpdf_import_jpeg</KEYWORD2>
- <KEYWORD2>cpdf_lineto</KEYWORD2>
- <KEYWORD2>cpdf_moveto</KEYWORD2>
- <KEYWORD2>cpdf_newpath</KEYWORD2>
- <KEYWORD2>cpdf_open</KEYWORD2>
- <KEYWORD2>cpdf_output_buffer</KEYWORD2>
- <KEYWORD2>cpdf_page_init</KEYWORD2>
- <KEYWORD2>cpdf_place_inline_image</KEYWORD2>
- <KEYWORD2>cpdf_rect</KEYWORD2>
- <KEYWORD2>cpdf_restore</KEYWORD2>
- <KEYWORD2>cpdf_rlineto</KEYWORD2>
- <KEYWORD2>cpdf_rmoveto</KEYWORD2>
- <KEYWORD2>cpdf_rotate</KEYWORD2>
- <KEYWORD2>cpdf_rotate_text</KEYWORD2>
- <KEYWORD2>cpdf_save</KEYWORD2>
- <KEYWORD2>cpdf_save_to_file</KEYWORD2>
- <KEYWORD2>cpdf_scale</KEYWORD2>
- <KEYWORD2>cpdf_set_action_url</KEYWORD2>
- <KEYWORD2>cpdf_set_char_spacing</KEYWORD2>
- <KEYWORD2>cpdf_set_creator</KEYWORD2>
- <KEYWORD2>cpdf_set_current_page</KEYWORD2>
- <KEYWORD2>cpdf_set_font</KEYWORD2>
- <KEYWORD2>cpdf_set_font_directories</KEYWORD2>
- <KEYWORD2>cpdf_set_font_map_file</KEYWORD2>
- <KEYWORD2>cpdf_set_horiz_scaling</KEYWORD2>
- <KEYWORD2>cpdf_set_keywords</KEYWORD2>
- <KEYWORD2>cpdf_set_leading</KEYWORD2>
- <KEYWORD2>cpdf_set_page_animation</KEYWORD2>
- <KEYWORD2>cpdf_set_subject</KEYWORD2>
- <KEYWORD2>cpdf_set_text_matrix</KEYWORD2>
- <KEYWORD2>cpdf_set_text_pos</KEYWORD2>
- <KEYWORD2>cpdf_set_text_rendering</KEYWORD2>
- <KEYWORD2>cpdf_set_text_rise</KEYWORD2>
- <KEYWORD2>cpdf_set_title</KEYWORD2>
- <KEYWORD2>cpdf_set_viewer_preferences</KEYWORD2>
- <KEYWORD2>cpdf_set_word_spacing</KEYWORD2>
- <KEYWORD2>cpdf_setdash</KEYWORD2>
- <KEYWORD2>cpdf_setflat</KEYWORD2>
- <KEYWORD2>cpdf_setgray</KEYWORD2>
- <KEYWORD2>cpdf_setgray_fill</KEYWORD2>
- <KEYWORD2>cpdf_setgray_stroke</KEYWORD2>
- <KEYWORD2>cpdf_setlinecap</KEYWORD2>
- <KEYWORD2>cpdf_setlinejoin</KEYWORD2>
- <KEYWORD2>cpdf_setlinewidth</KEYWORD2>
- <KEYWORD2>cpdf_setmiterlimit</KEYWORD2>
- <KEYWORD2>cpdf_setrgbcolor</KEYWORD2>
- <KEYWORD2>cpdf_setrgbcolor_fill</KEYWORD2>
- <KEYWORD2>cpdf_setrgbcolor_stroke</KEYWORD2>
- <KEYWORD2>cpdf_show</KEYWORD2>
- <KEYWORD2>cpdf_show_xy</KEYWORD2>
- <KEYWORD2>cpdf_stringwidth</KEYWORD2>
- <KEYWORD2>cpdf_stroke</KEYWORD2>
- <KEYWORD2>cpdf_text</KEYWORD2>
- <KEYWORD2>cpdf_translate</KEYWORD2>
- <KEYWORD2>crack_check</KEYWORD2>
- <KEYWORD2>crack_closedict</KEYWORD2>
- <KEYWORD2>crack_getlastmessage</KEYWORD2>
- <KEYWORD2>crack_opendict</KEYWORD2>
- <KEYWORD2>crc32</KEYWORD2>
- <KEYWORD2>create_attribute</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>create_cdata_section</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>create_comment</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>create_element</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>create_element_ns</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>create_entity_reference</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>create_function</KEYWORD2>
- <KEYWORD2>create_processing_instruction</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>create_text_node</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createattribute</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createattributens</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createcdatasection</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createcomment</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createdocument</KEYWORD2> <!-- domimplementation -->
- <KEYWORD2>createdocumentfragment</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createdocumenttype</KEYWORD2> <!-- domimplementation -->
- <KEYWORD2>createelement</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createelementns</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createentityreference</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createprocessinginstruction</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>createtextnode</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>crypt</KEYWORD2>
- <KEYWORD2>ctype_alnum</KEYWORD2>
- <KEYWORD2>ctype_alpha</KEYWORD2>
- <KEYWORD2>ctype_cntrl</KEYWORD2>
- <KEYWORD2>ctype_digit</KEYWORD2>
- <KEYWORD2>ctype_graph</KEYWORD2>
- <KEYWORD2>ctype_lower</KEYWORD2>
- <KEYWORD2>ctype_print</KEYWORD2>
- <KEYWORD2>ctype_punct</KEYWORD2>
- <KEYWORD2>ctype_space</KEYWORD2>
- <KEYWORD2>ctype_upper</KEYWORD2>
- <KEYWORD2>ctype_xdigit</KEYWORD2>
- <KEYWORD2>curl_close</KEYWORD2>
- <KEYWORD2>curl_copy_handle</KEYWORD2>
- <KEYWORD2>curl_errno</KEYWORD2>
- <KEYWORD2>curl_error</KEYWORD2>
- <KEYWORD2>curl_exec</KEYWORD2>
- <KEYWORD2>curl_getinfo</KEYWORD2>
- <KEYWORD2>curl_init</KEYWORD2>
- <KEYWORD2>curl_multi_add_handle</KEYWORD2>
- <KEYWORD2>curl_multi_close</KEYWORD2>
- <KEYWORD2>curl_multi_exec</KEYWORD2>
- <KEYWORD2>curl_multi_getcontent</KEYWORD2>
- <KEYWORD2>curl_multi_info_read</KEYWORD2>
- <KEYWORD2>curl_multi_init</KEYWORD2>
- <KEYWORD2>curl_multi_remove_handle</KEYWORD2>
- <KEYWORD2>curl_multi_select</KEYWORD2>
- <KEYWORD2>curl_setopt</KEYWORD2>
- <KEYWORD2>curl_version</KEYWORD2>
- <KEYWORD2>current</KEYWORD2> <!-- arrayiterator, directoryiterator, filteriterator, recursiveiteratoriterator, simplexmliterator -->
- <KEYWORD2>cybercash_base64_decode</KEYWORD2>
- <KEYWORD2>cybercash_base64_encode</KEYWORD2>
- <KEYWORD2>cybercash_decr</KEYWORD2>
- <KEYWORD2>cybercash_encr</KEYWORD2>
- <KEYWORD2>cyrus_authenticate</KEYWORD2>
- <KEYWORD2>cyrus_bind</KEYWORD2>
- <KEYWORD2>cyrus_close</KEYWORD2>
- <KEYWORD2>cyrus_connect</KEYWORD2>
- <KEYWORD2>cyrus_query</KEYWORD2>
- <KEYWORD2>cyrus_unbind</KEYWORD2>
- <KEYWORD2>data</KEYWORD2> <!-- domprocessinginstruction -->
- <KEYWORD2>date</KEYWORD2>
- <KEYWORD2>date_sunrise</KEYWORD2>
- <KEYWORD2>date_sunset</KEYWORD2>
- <KEYWORD2>dba_close</KEYWORD2>
- <KEYWORD2>dba_delete</KEYWORD2>
- <KEYWORD2>dba_exists</KEYWORD2>
- <KEYWORD2>dba_fetch</KEYWORD2>
- <KEYWORD2>dba_firstkey</KEYWORD2>
- <KEYWORD2>dba_handlers</KEYWORD2>
- <KEYWORD2>dba_insert</KEYWORD2>
- <KEYWORD2>dba_key_split</KEYWORD2>
- <KEYWORD2>dba_list</KEYWORD2>
- <KEYWORD2>dba_nextkey</KEYWORD2>
- <KEYWORD2>dba_open</KEYWORD2>
- <KEYWORD2>dba_optimize</KEYWORD2>
- <KEYWORD2>dba_popen</KEYWORD2>
- <KEYWORD2>dba_replace</KEYWORD2>
- <KEYWORD2>dba_sync</KEYWORD2>
- <KEYWORD2>dbase_add_record</KEYWORD2>
- <KEYWORD2>dbase_close</KEYWORD2>
- <KEYWORD2>dbase_create</KEYWORD2>
- <KEYWORD2>dbase_delete_record</KEYWORD2>
- <KEYWORD2>dbase_get_header_info</KEYWORD2>
- <KEYWORD2>dbase_get_record</KEYWORD2>
- <KEYWORD2>dbase_get_record_with_names</KEYWORD2>
- <KEYWORD2>dbase_numfields</KEYWORD2>
- <KEYWORD2>dbase_numrecords</KEYWORD2>
- <KEYWORD2>dbase_open</KEYWORD2>
- <KEYWORD2>dbase_pack</KEYWORD2>
- <KEYWORD2>dbase_replace_record</KEYWORD2>
- <KEYWORD2>dblist</KEYWORD2>
- <KEYWORD2>dbmclose</KEYWORD2>
- <KEYWORD2>dbmdelete</KEYWORD2>
- <KEYWORD2>dbmexists</KEYWORD2>
- <KEYWORD2>dbmfetch</KEYWORD2>
- <KEYWORD2>dbmfirstkey</KEYWORD2>
- <KEYWORD2>dbminsert</KEYWORD2>
- <KEYWORD2>dbmnextkey</KEYWORD2>
- <KEYWORD2>dbmopen</KEYWORD2>
- <KEYWORD2>dbmreplace</KEYWORD2>
- <KEYWORD2>dbplus_add</KEYWORD2>
- <KEYWORD2>dbplus_aql</KEYWORD2>
- <KEYWORD2>dbplus_chdir</KEYWORD2>
- <KEYWORD2>dbplus_close</KEYWORD2>
- <KEYWORD2>dbplus_curr</KEYWORD2>
- <KEYWORD2>dbplus_errcode</KEYWORD2>
- <KEYWORD2>dbplus_errno</KEYWORD2>
- <KEYWORD2>dbplus_find</KEYWORD2>
- <KEYWORD2>dbplus_first</KEYWORD2>
- <KEYWORD2>dbplus_flush</KEYWORD2>
- <KEYWORD2>dbplus_freealllocks</KEYWORD2>
- <KEYWORD2>dbplus_freelock</KEYWORD2>
- <KEYWORD2>dbplus_freerlocks</KEYWORD2>
- <KEYWORD2>dbplus_getlock</KEYWORD2>
- <KEYWORD2>dbplus_getunique</KEYWORD2>
- <KEYWORD2>dbplus_info</KEYWORD2>
- <KEYWORD2>dbplus_last</KEYWORD2>
- <KEYWORD2>dbplus_lockrel</KEYWORD2>
- <KEYWORD2>dbplus_next</KEYWORD2>
- <KEYWORD2>dbplus_open</KEYWORD2>
- <KEYWORD2>dbplus_prev</KEYWORD2>
- <KEYWORD2>dbplus_rchperm</KEYWORD2>
- <KEYWORD2>dbplus_rcreate</KEYWORD2>
- <KEYWORD2>dbplus_rcrtexact</KEYWORD2>
- <KEYWORD2>dbplus_rcrtlike</KEYWORD2>
- <KEYWORD2>dbplus_resolve</KEYWORD2>
- <KEYWORD2>dbplus_restorepos</KEYWORD2>
- <KEYWORD2>dbplus_rkeys</KEYWORD2>
- <KEYWORD2>dbplus_ropen</KEYWORD2>
- <KEYWORD2>dbplus_rquery</KEYWORD2>
- <KEYWORD2>dbplus_rrename</KEYWORD2>
- <KEYWORD2>dbplus_rsecindex</KEYWORD2>
- <KEYWORD2>dbplus_runlink</KEYWORD2>
- <KEYWORD2>dbplus_rzap</KEYWORD2>
- <KEYWORD2>dbplus_savepos</KEYWORD2>
- <KEYWORD2>dbplus_setindex</KEYWORD2>
- <KEYWORD2>dbplus_setindexbynumber</KEYWORD2>
- <KEYWORD2>dbplus_sql</KEYWORD2>
- <KEYWORD2>dbplus_tcl</KEYWORD2>
- <KEYWORD2>dbplus_tremove</KEYWORD2>
- <KEYWORD2>dbplus_undo</KEYWORD2>
- <KEYWORD2>dbplus_undoprepare</KEYWORD2>
- <KEYWORD2>dbplus_unlockrel</KEYWORD2>
- <KEYWORD2>dbplus_unselect</KEYWORD2>
- <KEYWORD2>dbplus_update</KEYWORD2>
- <KEYWORD2>dbplus_xlockrel</KEYWORD2>
- <KEYWORD2>dbplus_xunlockrel</KEYWORD2>
- <KEYWORD2>dbstat</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>dbx_close</KEYWORD2>
- <KEYWORD2>dbx_compare</KEYWORD2>
- <KEYWORD2>dbx_connect</KEYWORD2>
- <KEYWORD2>dbx_error</KEYWORD2>
- <KEYWORD2>dbx_escape_string</KEYWORD2>
- <KEYWORD2>dbx_fetch_row</KEYWORD2>
- <KEYWORD2>dbx_query</KEYWORD2>
- <KEYWORD2>dbx_sort</KEYWORD2>
- <KEYWORD2>dcgettext</KEYWORD2>
- <KEYWORD2>dcngettext</KEYWORD2>
- <KEYWORD2>dcstat</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>deaggregate</KEYWORD2>
- <KEYWORD2>debug_backtrace</KEYWORD2>
- <KEYWORD2>debug_print_backtrace</KEYWORD2>
- <KEYWORD2>debug_zval_dump</KEYWORD2>
- <KEYWORD2>debugger_off</KEYWORD2>
- <KEYWORD2>debugger_on</KEYWORD2>
- <KEYWORD2>decbin</KEYWORD2>
- <KEYWORD2>dechex</KEYWORD2>
- <KEYWORD2>decoct</KEYWORD2>
- <KEYWORD2>decrement</KEYWORD2> <!-- memcache -->
- <KEYWORD2>define</KEYWORD2>
- <KEYWORD2>define_syslog_variables</KEYWORD2>
- <KEYWORD2>defined</KEYWORD2>
- <KEYWORD2>deg2rad</KEYWORD2>
- <KEYWORD2>delete</KEYWORD2> <!-- memcache -->
- <KEYWORD2>deletedata</KEYWORD2> <!-- domcharacterdata -->
- <KEYWORD2>description</KEYWORD2> <!-- hw_api_reason -->
- <KEYWORD2>dgettext</KEYWORD2>
- <KEYWORD2>dio_close</KEYWORD2>
- <KEYWORD2>dio_fcntl</KEYWORD2>
- <KEYWORD2>dio_open</KEYWORD2>
- <KEYWORD2>dio_read</KEYWORD2>
- <KEYWORD2>dio_seek</KEYWORD2>
- <KEYWORD2>dio_stat</KEYWORD2>
- <KEYWORD2>dio_tcsetattr</KEYWORD2>
- <KEYWORD2>dio_truncate</KEYWORD2>
- <KEYWORD2>dio_write</KEYWORD2>
- <KEYWORD2>dir</KEYWORD2>
- <KEYWORD2>dirname</KEYWORD2>
- <KEYWORD2>disk_free_space</KEYWORD2>
- <KEYWORD2>disk_total_space</KEYWORD2>
- <KEYWORD2>diskfreespace</KEYWORD2>
- <KEYWORD2>dl</KEYWORD2>
- <KEYWORD2>dngettext</KEYWORD2>
- <KEYWORD2>dns_check_record</KEYWORD2>
- <KEYWORD2>dns_get_mx</KEYWORD2>
- <KEYWORD2>dns_get_record</KEYWORD2>
- <KEYWORD2>doctype</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>document_element</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>dom_import_simplexml</KEYWORD2>
- <KEYWORD2>domxml_new_doc</KEYWORD2>
- <KEYWORD2>domxml_open_file</KEYWORD2>
- <KEYWORD2>domxml_open_mem</KEYWORD2>
- <KEYWORD2>domxml_version</KEYWORD2>
- <KEYWORD2>domxml_xmltree</KEYWORD2>
- <KEYWORD2>domxml_xslt_stylesheet</KEYWORD2>
- <KEYWORD2>domxml_xslt_stylesheet_doc</KEYWORD2>
- <KEYWORD2>domxml_xslt_stylesheet_file</KEYWORD2>
- <KEYWORD2>dotnet</KEYWORD2>
- <KEYWORD2>dotnet_load</KEYWORD2>
- <KEYWORD2>doubleval</KEYWORD2>
- <KEYWORD2>drawcurve</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>drawcurveto</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>drawline</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>drawlineto</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>dstanchors</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>dstofsrcanchors</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>dump_file</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>dump_mem</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>dump_node</KEYWORD2> <!-- domnode -->
- <KEYWORD2>each</KEYWORD2>
- <KEYWORD2>easter_date</KEYWORD2>
- <KEYWORD2>easter_days</KEYWORD2>
- <KEYWORD2>ebcdic2ascii</KEYWORD2>
- <KEYWORD2>end</KEYWORD2>
- <KEYWORD2>entities</KEYWORD2> <!-- domdocumenttype -->
- <KEYWORD2>eof</KEYWORD2> <!-- lob -->
- <KEYWORD2>erase</KEYWORD2> <!-- lob -->
- <KEYWORD2>ereg</KEYWORD2>
- <KEYWORD2>ereg_replace</KEYWORD2>
- <KEYWORD2>eregi</KEYWORD2>
- <KEYWORD2>eregi_replace</KEYWORD2>
- <KEYWORD2>error_log</KEYWORD2>
- <KEYWORD2>error_reporting</KEYWORD2>
- <KEYWORD2>errorcode</KEYWORD2> <!-- pdo, pdostatement -->
- <KEYWORD2>errorinfo</KEYWORD2> <!-- pdo, pdostatement -->
- <KEYWORD2>escapeshellarg</KEYWORD2>
- <KEYWORD2>escapeshellcmd</KEYWORD2>
- <KEYWORD2>exec</KEYWORD2> <!-- pdo -->
- <KEYWORD2>execute</KEYWORD2> <!-- pdostatement -->
- <KEYWORD2>exif_imagetype</KEYWORD2>
- <KEYWORD2>exif_read_data</KEYWORD2>
- <KEYWORD2>exif_tagname</KEYWORD2>
- <KEYWORD2>exif_thumbnail</KEYWORD2>
- <KEYWORD2>exp</KEYWORD2>
- <KEYWORD2>explode</KEYWORD2>
- <KEYWORD2>expm1</KEYWORD2>
- <KEYWORD2>export</KEYWORD2> <!-- lob -->
- <KEYWORD2>extension_loaded</KEYWORD2>
- <KEYWORD2>extract</KEYWORD2> <!-- rar -->
- <KEYWORD2>ezmlm_hash</KEYWORD2>
- <KEYWORD2>fam_cancel_monitor</KEYWORD2>
- <KEYWORD2>fam_close</KEYWORD2>
- <KEYWORD2>fam_monitor_collection</KEYWORD2>
- <KEYWORD2>fam_monitor_directory</KEYWORD2>
- <KEYWORD2>fam_monitor_file</KEYWORD2>
- <KEYWORD2>fam_next_event</KEYWORD2>
- <KEYWORD2>fam_open</KEYWORD2>
- <KEYWORD2>fam_pending</KEYWORD2>
- <KEYWORD2>fam_resume_monitor</KEYWORD2>
- <KEYWORD2>fam_suspend_monitor</KEYWORD2>
- <KEYWORD2>fbsql_affected_rows</KEYWORD2>
- <KEYWORD2>fbsql_autocommit</KEYWORD2>
- <KEYWORD2>fbsql_blob_size</KEYWORD2>
- <KEYWORD2>fbsql_change_user</KEYWORD2>
- <KEYWORD2>fbsql_clob_size</KEYWORD2>
- <KEYWORD2>fbsql_close</KEYWORD2>
- <KEYWORD2>fbsql_commit</KEYWORD2>
- <KEYWORD2>fbsql_connect</KEYWORD2>
- <KEYWORD2>fbsql_create_blob</KEYWORD2>
- <KEYWORD2>fbsql_create_clob</KEYWORD2>
- <KEYWORD2>fbsql_create_db</KEYWORD2>
- <KEYWORD2>fbsql_data_seek</KEYWORD2>
- <KEYWORD2>fbsql_database</KEYWORD2>
- <KEYWORD2>fbsql_database_password</KEYWORD2>
- <KEYWORD2>fbsql_db_query</KEYWORD2>
- <KEYWORD2>fbsql_db_status</KEYWORD2>
- <KEYWORD2>fbsql_drop_db</KEYWORD2>
- <KEYWORD2>fbsql_errno</KEYWORD2>
- <KEYWORD2>fbsql_error</KEYWORD2>
- <KEYWORD2>fbsql_fetch_array</KEYWORD2>
- <KEYWORD2>fbsql_fetch_assoc</KEYWORD2>
- <KEYWORD2>fbsql_fetch_field</KEYWORD2>
- <KEYWORD2>fbsql_fetch_lengths</KEYWORD2>
- <KEYWORD2>fbsql_fetch_object</KEYWORD2>
- <KEYWORD2>fbsql_fetch_row</KEYWORD2>
- <KEYWORD2>fbsql_field_flags</KEYWORD2>
- <KEYWORD2>fbsql_field_len</KEYWORD2>
- <KEYWORD2>fbsql_field_name</KEYWORD2>
- <KEYWORD2>fbsql_field_seek</KEYWORD2>
- <KEYWORD2>fbsql_field_table</KEYWORD2>
- <KEYWORD2>fbsql_field_type</KEYWORD2>
- <KEYWORD2>fbsql_free_result</KEYWORD2>
- <KEYWORD2>fbsql_get_autostart_info</KEYWORD2>
- <KEYWORD2>fbsql_hostname</KEYWORD2>
- <KEYWORD2>fbsql_insert_id</KEYWORD2>
- <KEYWORD2>fbsql_list_dbs</KEYWORD2>
- <KEYWORD2>fbsql_list_fields</KEYWORD2>
- <KEYWORD2>fbsql_list_tables</KEYWORD2>
- <KEYWORD2>fbsql_next_result</KEYWORD2>
- <KEYWORD2>fbsql_num_fields</KEYWORD2>
- <KEYWORD2>fbsql_num_rows</KEYWORD2>
- <KEYWORD2>fbsql_password</KEYWORD2>
- <KEYWORD2>fbsql_pconnect</KEYWORD2>
- <KEYWORD2>fbsql_query</KEYWORD2>
- <KEYWORD2>fbsql_read_blob</KEYWORD2>
- <KEYWORD2>fbsql_read_clob</KEYWORD2>
- <KEYWORD2>fbsql_result</KEYWORD2>
- <KEYWORD2>fbsql_rollback</KEYWORD2>
- <KEYWORD2>fbsql_select_db</KEYWORD2>
- <KEYWORD2>fbsql_set_lob_mode</KEYWORD2>
- <KEYWORD2>fbsql_set_password</KEYWORD2>
- <KEYWORD2>fbsql_set_transaction</KEYWORD2>
- <KEYWORD2>fbsql_start_db</KEYWORD2>
- <KEYWORD2>fbsql_stop_db</KEYWORD2>
- <KEYWORD2>fbsql_tablename</KEYWORD2>
- <KEYWORD2>fbsql_username</KEYWORD2>
- <KEYWORD2>fbsql_warnings</KEYWORD2>
- <KEYWORD2>fclose</KEYWORD2>
- <KEYWORD2>fdf_add_doc_javascript</KEYWORD2>
- <KEYWORD2>fdf_add_template</KEYWORD2>
- <KEYWORD2>fdf_close</KEYWORD2>
- <KEYWORD2>fdf_create</KEYWORD2>
- <KEYWORD2>fdf_enum_values</KEYWORD2>
- <KEYWORD2>fdf_errno</KEYWORD2>
- <KEYWORD2>fdf_error</KEYWORD2>
- <KEYWORD2>fdf_get_ap</KEYWORD2>
- <KEYWORD2>fdf_get_attachment</KEYWORD2>
- <KEYWORD2>fdf_get_encoding</KEYWORD2>
- <KEYWORD2>fdf_get_file</KEYWORD2>
- <KEYWORD2>fdf_get_flags</KEYWORD2>
- <KEYWORD2>fdf_get_opt</KEYWORD2>
- <KEYWORD2>fdf_get_status</KEYWORD2>
- <KEYWORD2>fdf_get_value</KEYWORD2>
- <KEYWORD2>fdf_get_version</KEYWORD2>
- <KEYWORD2>fdf_header</KEYWORD2>
- <KEYWORD2>fdf_next_field_name</KEYWORD2>
- <KEYWORD2>fdf_open</KEYWORD2>
- <KEYWORD2>fdf_open_string</KEYWORD2>
- <KEYWORD2>fdf_remove_item</KEYWORD2>
- <KEYWORD2>fdf_save</KEYWORD2>
- <KEYWORD2>fdf_save_string</KEYWORD2>
- <KEYWORD2>fdf_set_ap</KEYWORD2>
- <KEYWORD2>fdf_set_encoding</KEYWORD2>
- <KEYWORD2>fdf_set_file</KEYWORD2>
- <KEYWORD2>fdf_set_flags</KEYWORD2>
- <KEYWORD2>fdf_set_javascript_action</KEYWORD2>
- <KEYWORD2>fdf_set_on_import_javascript</KEYWORD2>
- <KEYWORD2>fdf_set_opt</KEYWORD2>
- <KEYWORD2>fdf_set_status</KEYWORD2>
- <KEYWORD2>fdf_set_submit_form_action</KEYWORD2>
- <KEYWORD2>fdf_set_target_frame</KEYWORD2>
- <KEYWORD2>fdf_set_value</KEYWORD2>
- <KEYWORD2>fdf_set_version</KEYWORD2>
- <KEYWORD2>feof</KEYWORD2>
- <KEYWORD2>fetch</KEYWORD2> <!-- pdostatement -->
- <KEYWORD2>fetchall</KEYWORD2> <!-- pdostatement -->
- <KEYWORD2>fetchsingle</KEYWORD2> <!-- pdostatement -->
- <KEYWORD2>fflush</KEYWORD2>
- <KEYWORD2>fgetc</KEYWORD2>
- <KEYWORD2>fgetcsv</KEYWORD2>
- <KEYWORD2>fgets</KEYWORD2>
- <KEYWORD2>fgetss</KEYWORD2>
- <KEYWORD2>file</KEYWORD2>
- <KEYWORD2>file_exists</KEYWORD2>
- <KEYWORD2>file_get_contents</KEYWORD2>
- <KEYWORD2>file_put_contents</KEYWORD2>
- <KEYWORD2>fileatime</KEYWORD2>
- <KEYWORD2>filectime</KEYWORD2>
- <KEYWORD2>filegroup</KEYWORD2>
- <KEYWORD2>fileinode</KEYWORD2>
- <KEYWORD2>filemtime</KEYWORD2>
- <KEYWORD2>fileowner</KEYWORD2>
- <KEYWORD2>fileperms</KEYWORD2>
- <KEYWORD2>filepro</KEYWORD2>
- <KEYWORD2>filepro_fieldcount</KEYWORD2>
- <KEYWORD2>filepro_fieldname</KEYWORD2>
- <KEYWORD2>filepro_fieldtype</KEYWORD2>
- <KEYWORD2>filepro_fieldwidth</KEYWORD2>
- <KEYWORD2>filepro_retrieve</KEYWORD2>
- <KEYWORD2>filepro_rowcount</KEYWORD2>
- <KEYWORD2>filesize</KEYWORD2>
- <KEYWORD2>filetype</KEYWORD2>
- <KEYWORD2>find</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>first_child</KEYWORD2> <!-- domnode -->
- <KEYWORD2>floatval</KEYWORD2>
- <KEYWORD2>flock</KEYWORD2>
- <KEYWORD2>floor</KEYWORD2>
- <KEYWORD2>flush</KEYWORD2> <!-- lob, memcache -->
- <KEYWORD2>fmod</KEYWORD2>
- <KEYWORD2>fnmatch</KEYWORD2>
- <KEYWORD2>fopen</KEYWORD2>
- <KEYWORD2>fpassthru</KEYWORD2>
- <KEYWORD2>fprintf</KEYWORD2>
- <KEYWORD2>fputcsv</KEYWORD2>
- <KEYWORD2>fputs</KEYWORD2>
- <KEYWORD2>fread</KEYWORD2>
- <KEYWORD2>free</KEYWORD2> <!-- collection, descriptor -->
- <KEYWORD2>frenchtojd</KEYWORD2>
- <KEYWORD2>fribidi_log2vis</KEYWORD2>
- <KEYWORD2>fscanf</KEYWORD2>
- <KEYWORD2>fseek</KEYWORD2>
- <KEYWORD2>fsockopen</KEYWORD2>
- <KEYWORD2>fstat</KEYWORD2>
- <KEYWORD2>ftell</KEYWORD2>
- <KEYWORD2>ftok</KEYWORD2>
- <KEYWORD2>ftp_alloc</KEYWORD2>
- <KEYWORD2>ftp_cdup</KEYWORD2>
- <KEYWORD2>ftp_chdir</KEYWORD2>
- <KEYWORD2>ftp_chmod</KEYWORD2>
- <KEYWORD2>ftp_close</KEYWORD2>
- <KEYWORD2>ftp_connect</KEYWORD2>
- <KEYWORD2>ftp_delete</KEYWORD2>
- <KEYWORD2>ftp_exec</KEYWORD2>
- <KEYWORD2>ftp_fget</KEYWORD2>
- <KEYWORD2>ftp_fput</KEYWORD2>
- <KEYWORD2>ftp_get</KEYWORD2>
- <KEYWORD2>ftp_get_option</KEYWORD2>
- <KEYWORD2>ftp_login</KEYWORD2>
- <KEYWORD2>ftp_mdtm</KEYWORD2>
- <KEYWORD2>ftp_mkdir</KEYWORD2>
- <KEYWORD2>ftp_nb_continue</KEYWORD2>
- <KEYWORD2>ftp_nb_fget</KEYWORD2>
- <KEYWORD2>ftp_nb_fput</KEYWORD2>
- <KEYWORD2>ftp_nb_get</KEYWORD2>
- <KEYWORD2>ftp_nb_put</KEYWORD2>
- <KEYWORD2>ftp_nlist</KEYWORD2>
- <KEYWORD2>ftp_pasv</KEYWORD2>
- <KEYWORD2>ftp_put</KEYWORD2>
- <KEYWORD2>ftp_pwd</KEYWORD2>
- <KEYWORD2>ftp_quit</KEYWORD2>
- <KEYWORD2>ftp_raw</KEYWORD2>
- <KEYWORD2>ftp_rawlist</KEYWORD2>
- <KEYWORD2>ftp_rename</KEYWORD2>
- <KEYWORD2>ftp_rmdir</KEYWORD2>
- <KEYWORD2>ftp_set_option</KEYWORD2>
- <KEYWORD2>ftp_site</KEYWORD2>
- <KEYWORD2>ftp_size</KEYWORD2>
- <KEYWORD2>ftp_ssl_connect</KEYWORD2>
- <KEYWORD2>ftp_systype</KEYWORD2>
- <KEYWORD2>ftruncate</KEYWORD2>
- <KEYWORD2>ftstat</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>func_get_arg</KEYWORD2>
- <KEYWORD2>func_get_args</KEYWORD2>
- <KEYWORD2>func_num_args</KEYWORD2>
- <KEYWORD2>function_exists</KEYWORD2>
- <KEYWORD2>fwrite</KEYWORD2>
- <KEYWORD2>gd_info</KEYWORD2>
- <KEYWORD2>get</KEYWORD2> <!-- memcache -->
- <KEYWORD2>get_attr</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>get_attribute</KEYWORD2> <!-- domelement -->
- <KEYWORD2>get_attribute_node</KEYWORD2> <!-- domelement -->
- <KEYWORD2>get_browser</KEYWORD2>
- <KEYWORD2>get_cfg_var</KEYWORD2>
- <KEYWORD2>get_class</KEYWORD2>
- <KEYWORD2>get_class_methods</KEYWORD2>
- <KEYWORD2>get_class_vars</KEYWORD2>
- <KEYWORD2>get_content</KEYWORD2> <!-- domnode -->
- <KEYWORD2>get_current_user</KEYWORD2>
- <KEYWORD2>get_declared_classes</KEYWORD2>
- <KEYWORD2>get_declared_interfaces</KEYWORD2>
- <KEYWORD2>get_defined_constants</KEYWORD2>
- <KEYWORD2>get_defined_functions</KEYWORD2>
- <KEYWORD2>get_defined_vars</KEYWORD2>
- <KEYWORD2>get_element_by_id</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>get_elements_by_tagname</KEYWORD2> <!-- domdocument, domelement -->
- <KEYWORD2>get_extension_funcs</KEYWORD2>
- <KEYWORD2>get_headers</KEYWORD2>
- <KEYWORD2>get_html_translation_table</KEYWORD2>
- <KEYWORD2>get_include_path</KEYWORD2>
- <KEYWORD2>get_included_files</KEYWORD2>
- <KEYWORD2>get_loaded_extensions</KEYWORD2>
- <KEYWORD2>get_magic_quotes_gpc</KEYWORD2>
- <KEYWORD2>get_magic_quotes_runtime</KEYWORD2>
- <KEYWORD2>get_meta_tags</KEYWORD2>
- <KEYWORD2>get_nodes</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>get_object_vars</KEYWORD2>
- <KEYWORD2>get_parent_class</KEYWORD2>
- <KEYWORD2>get_required_files</KEYWORD2>
- <KEYWORD2>get_resource_type</KEYWORD2>
- <KEYWORD2>getallheaders</KEYWORD2>
- <KEYWORD2>getatime</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getattr</KEYWORD2> <!-- rar -->
- <KEYWORD2>getattribute</KEYWORD2> <!-- domelement -->
- <KEYWORD2>getattributenode</KEYWORD2> <!-- domelement -->
- <KEYWORD2>getattributenodens</KEYWORD2> <!-- domelement -->
- <KEYWORD2>getattributens</KEYWORD2> <!-- domelement -->
- <KEYWORD2>getbuffering</KEYWORD2> <!-- lob -->
- <KEYWORD2>getchildren</KEYWORD2> <!-- cachingrecursiveiterator, directoryiterator, parentiterator, recursivedirectoryiterator, simplexmliterator -->
- <KEYWORD2>getcrc</KEYWORD2> <!-- rar -->
- <KEYWORD2>getctime</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getcwd</KEYWORD2>
- <KEYWORD2>getdate</KEYWORD2>
- <KEYWORD2>getdepth</KEYWORD2> <!-- recursiveiteratoriterator -->
- <KEYWORD2>getelem</KEYWORD2> <!-- collection -->
- <KEYWORD2>getelementbyid</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>getelementsbytagname</KEYWORD2> <!-- domdocument, domelement -->
- <KEYWORD2>getelementsbytagnamens</KEYWORD2> <!-- domdocument, domelement -->
- <KEYWORD2>getenv</KEYWORD2>
- <KEYWORD2>getfilename</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getfiletime</KEYWORD2> <!-- rar -->
- <KEYWORD2>getfunctions</KEYWORD2> <!-- soapserver -->
- <KEYWORD2>getgroup</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getheight</KEYWORD2> <!-- swfbitmap -->
- <KEYWORD2>gethostbyaddr</KEYWORD2>
- <KEYWORD2>gethostbyname</KEYWORD2>
- <KEYWORD2>gethostbynamel</KEYWORD2>
- <KEYWORD2>gethostos</KEYWORD2> <!-- rar -->
- <KEYWORD2>getimagesize</KEYWORD2>
- <KEYWORD2>getinneriterator</KEYWORD2> <!-- filteriterator -->
- <KEYWORD2>getinode</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getiterator</KEYWORD2> <!-- arrayobject -->
- <KEYWORD2>getlastmod</KEYWORD2>
- <KEYWORD2>getmethod</KEYWORD2> <!-- rar -->
- <KEYWORD2>getmtime</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getmxrr</KEYWORD2>
- <KEYWORD2>getmygid</KEYWORD2>
- <KEYWORD2>getmyinode</KEYWORD2>
- <KEYWORD2>getmypid</KEYWORD2>
- <KEYWORD2>getmyuid</KEYWORD2>
- <KEYWORD2>getname</KEYWORD2> <!-- rar -->
- <KEYWORD2>getnameditem</KEYWORD2> <!-- domnamednodemap -->
- <KEYWORD2>getnameditemns</KEYWORD2> <!-- domnamednodemap -->
- <KEYWORD2>getopt</KEYWORD2>
- <KEYWORD2>getowner</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getpackedsize</KEYWORD2> <!-- rar -->
- <KEYWORD2>getpath</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getpathname</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getperms</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getposition</KEYWORD2> <!-- limititerator -->
- <KEYWORD2>getprotobyname</KEYWORD2>
- <KEYWORD2>getprotobynumber</KEYWORD2>
- <KEYWORD2>getrandmax</KEYWORD2>
- <KEYWORD2>getrusage</KEYWORD2>
- <KEYWORD2>getservbyname</KEYWORD2>
- <KEYWORD2>getservbyport</KEYWORD2>
- <KEYWORD2>getshape1</KEYWORD2> <!-- swfmorph -->
- <KEYWORD2>getshape2</KEYWORD2> <!-- swfmorph -->
- <KEYWORD2>getsize</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getstats</KEYWORD2> <!-- memcache -->
- <KEYWORD2>getsubiterator</KEYWORD2> <!-- recursiveiteratoriterator -->
- <KEYWORD2>gettext</KEYWORD2>
- <KEYWORD2>gettimeofday</KEYWORD2>
- <KEYWORD2>gettype</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>getunpackedsize</KEYWORD2> <!-- rar -->
- <KEYWORD2>getversion</KEYWORD2> <!-- memcache, rar -->
- <KEYWORD2>getwidth</KEYWORD2> <!-- swfbitmap, swffont, swftext -->
- <KEYWORD2>glob</KEYWORD2>
- <KEYWORD2>gmdate</KEYWORD2>
- <KEYWORD2>gmmktime</KEYWORD2>
- <KEYWORD2>gmp_abs</KEYWORD2>
- <KEYWORD2>gmp_add</KEYWORD2>
- <KEYWORD2>gmp_and</KEYWORD2>
- <KEYWORD2>gmp_clrbit</KEYWORD2>
- <KEYWORD2>gmp_cmp</KEYWORD2>
- <KEYWORD2>gmp_com</KEYWORD2>
- <KEYWORD2>gmp_div</KEYWORD2>
- <KEYWORD2>gmp_div_q</KEYWORD2>
- <KEYWORD2>gmp_div_qr</KEYWORD2>
- <KEYWORD2>gmp_div_r</KEYWORD2>
- <KEYWORD2>gmp_divexact</KEYWORD2>
- <KEYWORD2>gmp_fact</KEYWORD2>
- <KEYWORD2>gmp_gcd</KEYWORD2>
- <KEYWORD2>gmp_gcdext</KEYWORD2>
- <KEYWORD2>gmp_hamdist</KEYWORD2>
- <KEYWORD2>gmp_init</KEYWORD2>
- <KEYWORD2>gmp_intval</KEYWORD2>
- <KEYWORD2>gmp_invert</KEYWORD2>
- <KEYWORD2>gmp_jacobi</KEYWORD2>
- <KEYWORD2>gmp_legendre</KEYWORD2>
- <KEYWORD2>gmp_mod</KEYWORD2>
- <KEYWORD2>gmp_mul</KEYWORD2>
- <KEYWORD2>gmp_neg</KEYWORD2>
- <KEYWORD2>gmp_or</KEYWORD2>
- <KEYWORD2>gmp_perfect_square</KEYWORD2>
- <KEYWORD2>gmp_popcount</KEYWORD2>
- <KEYWORD2>gmp_pow</KEYWORD2>
- <KEYWORD2>gmp_powm</KEYWORD2>
- <KEYWORD2>gmp_prob_prime</KEYWORD2>
- <KEYWORD2>gmp_random</KEYWORD2>
- <KEYWORD2>gmp_scan0</KEYWORD2>
- <KEYWORD2>gmp_scan1</KEYWORD2>
- <KEYWORD2>gmp_setbit</KEYWORD2>
- <KEYWORD2>gmp_sign</KEYWORD2>
- <KEYWORD2>gmp_sqrt</KEYWORD2>
- <KEYWORD2>gmp_sqrtrem</KEYWORD2>
- <KEYWORD2>gmp_strval</KEYWORD2>
- <KEYWORD2>gmp_sub</KEYWORD2>
- <KEYWORD2>gmp_xor</KEYWORD2>
- <KEYWORD2>gmstrftime</KEYWORD2>
- <KEYWORD2>gregoriantojd</KEYWORD2>
- <KEYWORD2>gzclose</KEYWORD2>
- <KEYWORD2>gzcompress</KEYWORD2>
- <KEYWORD2>gzdeflate</KEYWORD2>
- <KEYWORD2>gzencode</KEYWORD2>
- <KEYWORD2>gzeof</KEYWORD2>
- <KEYWORD2>gzfile</KEYWORD2>
- <KEYWORD2>gzgetc</KEYWORD2>
- <KEYWORD2>gzgets</KEYWORD2>
- <KEYWORD2>gzgetss</KEYWORD2>
- <KEYWORD2>gzinflate</KEYWORD2>
- <KEYWORD2>gzopen</KEYWORD2>
- <KEYWORD2>gzpassthru</KEYWORD2>
- <KEYWORD2>gzputs</KEYWORD2>
- <KEYWORD2>gzread</KEYWORD2>
- <KEYWORD2>gzrewind</KEYWORD2>
- <KEYWORD2>gzseek</KEYWORD2>
- <KEYWORD2>gztell</KEYWORD2>
- <KEYWORD2>gzuncompress</KEYWORD2>
- <KEYWORD2>gzwrite</KEYWORD2>
- <KEYWORD2>handle</KEYWORD2> <!-- soapserver -->
- <KEYWORD2>has_attribute</KEYWORD2> <!-- domelement -->
- <KEYWORD2>has_attributes</KEYWORD2> <!-- domnode -->
- <KEYWORD2>has_child_nodes</KEYWORD2> <!-- domnode -->
- <KEYWORD2>hasattribute</KEYWORD2> <!-- domelement -->
- <KEYWORD2>hasattributens</KEYWORD2> <!-- domelement -->
- <KEYWORD2>hasattributes</KEYWORD2> <!-- domnode -->
- <KEYWORD2>haschildnodes</KEYWORD2> <!-- domnode -->
- <KEYWORD2>haschildren</KEYWORD2> <!-- cachingrecursiveiterator, parentiterator, recursivedirectoryiterator, simplexmliterator, tidy_node -->
- <KEYWORD2>hasfeature</KEYWORD2> <!-- domimplementation -->
- <KEYWORD2>hasnext</KEYWORD2> <!-- cachingiterator -->
- <KEYWORD2>hassiblings</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>header</KEYWORD2>
- <KEYWORD2>headers_list</KEYWORD2>
- <KEYWORD2>headers_sent</KEYWORD2>
- <KEYWORD2>hebrev</KEYWORD2>
- <KEYWORD2>hebrevc</KEYWORD2>
- <KEYWORD2>hexdec</KEYWORD2>
- <KEYWORD2>highlight_file</KEYWORD2>
- <KEYWORD2>highlight_string</KEYWORD2>
- <KEYWORD2>html_dump_mem</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>html_entity_decode</KEYWORD2>
- <KEYWORD2>htmlentities</KEYWORD2>
- <KEYWORD2>htmlspecialchars</KEYWORD2>
- <KEYWORD2>http_build_query</KEYWORD2>
- <KEYWORD2>hw_array2objrec</KEYWORD2>
- <KEYWORD2>hw_changeobject</KEYWORD2>
- <KEYWORD2>hw_children</KEYWORD2>
- <KEYWORD2>hw_childrenobj</KEYWORD2>
- <KEYWORD2>hw_close</KEYWORD2>
- <KEYWORD2>hw_connect</KEYWORD2>
- <KEYWORD2>hw_connection_info</KEYWORD2>
- <KEYWORD2>hw_cp</KEYWORD2>
- <KEYWORD2>hw_deleteobject</KEYWORD2>
- <KEYWORD2>hw_docbyanchor</KEYWORD2>
- <KEYWORD2>hw_docbyanchorobj</KEYWORD2>
- <KEYWORD2>hw_document_attributes</KEYWORD2>
- <KEYWORD2>hw_document_bodytag</KEYWORD2>
- <KEYWORD2>hw_document_content</KEYWORD2>
- <KEYWORD2>hw_document_setcontent</KEYWORD2>
- <KEYWORD2>hw_document_size</KEYWORD2>
- <KEYWORD2>hw_dummy</KEYWORD2>
- <KEYWORD2>hw_edittext</KEYWORD2>
- <KEYWORD2>hw_error</KEYWORD2>
- <KEYWORD2>hw_errormsg</KEYWORD2>
- <KEYWORD2>hw_free_document</KEYWORD2>
- <KEYWORD2>hw_getanchors</KEYWORD2>
- <KEYWORD2>hw_getanchorsobj</KEYWORD2>
- <KEYWORD2>hw_getandlock</KEYWORD2>
- <KEYWORD2>hw_getchildcoll</KEYWORD2>
- <KEYWORD2>hw_getchildcollobj</KEYWORD2>
- <KEYWORD2>hw_getchilddoccoll</KEYWORD2>
- <KEYWORD2>hw_getchilddoccollobj</KEYWORD2>
- <KEYWORD2>hw_getobject</KEYWORD2>
- <KEYWORD2>hw_getobjectbyquery</KEYWORD2>
- <KEYWORD2>hw_getobjectbyquerycoll</KEYWORD2>
- <KEYWORD2>hw_getobjectbyquerycollobj</KEYWORD2>
- <KEYWORD2>hw_getobjectbyqueryobj</KEYWORD2>
- <KEYWORD2>hw_getparents</KEYWORD2>
- <KEYWORD2>hw_getparentsobj</KEYWORD2>
- <KEYWORD2>hw_getrellink</KEYWORD2>
- <KEYWORD2>hw_getremote</KEYWORD2>
- <KEYWORD2>hw_getremotechildren</KEYWORD2>
- <KEYWORD2>hw_getsrcbydestobj</KEYWORD2>
- <KEYWORD2>hw_gettext</KEYWORD2>
- <KEYWORD2>hw_getusername</KEYWORD2>
- <KEYWORD2>hw_identify</KEYWORD2>
- <KEYWORD2>hw_incollections</KEYWORD2>
- <KEYWORD2>hw_info</KEYWORD2>
- <KEYWORD2>hw_inscoll</KEYWORD2>
- <KEYWORD2>hw_insdoc</KEYWORD2>
- <KEYWORD2>hw_insertanchors</KEYWORD2>
- <KEYWORD2>hw_insertdocument</KEYWORD2>
- <KEYWORD2>hw_insertobject</KEYWORD2>
- <KEYWORD2>hw_mapid</KEYWORD2>
- <KEYWORD2>hw_modifyobject</KEYWORD2>
- <KEYWORD2>hw_mv</KEYWORD2>
- <KEYWORD2>hw_new_document</KEYWORD2>
- <KEYWORD2>hw_objrec2array</KEYWORD2>
- <KEYWORD2>hw_output_document</KEYWORD2>
- <KEYWORD2>hw_pconnect</KEYWORD2>
- <KEYWORD2>hw_pipedocument</KEYWORD2>
- <KEYWORD2>hw_root</KEYWORD2>
- <KEYWORD2>hw_setlinkroot</KEYWORD2>
- <KEYWORD2>hw_stat</KEYWORD2>
- <KEYWORD2>hw_unlock</KEYWORD2>
- <KEYWORD2>hw_who</KEYWORD2>
- <KEYWORD2>hwapi_hgcsp</KEYWORD2>
- <KEYWORD2>hwstat</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>hypot</KEYWORD2>
- <KEYWORD2>ibase_add_user</KEYWORD2>
- <KEYWORD2>ibase_affected_rows</KEYWORD2>
- <KEYWORD2>ibase_backup</KEYWORD2>
- <KEYWORD2>ibase_blob_add</KEYWORD2>
- <KEYWORD2>ibase_blob_cancel</KEYWORD2>
- <KEYWORD2>ibase_blob_close</KEYWORD2>
- <KEYWORD2>ibase_blob_create</KEYWORD2>
- <KEYWORD2>ibase_blob_echo</KEYWORD2>
- <KEYWORD2>ibase_blob_get</KEYWORD2>
- <KEYWORD2>ibase_blob_import</KEYWORD2>
- <KEYWORD2>ibase_blob_info</KEYWORD2>
- <KEYWORD2>ibase_blob_open</KEYWORD2>
- <KEYWORD2>ibase_close</KEYWORD2>
- <KEYWORD2>ibase_commit</KEYWORD2>
- <KEYWORD2>ibase_commit_ret</KEYWORD2>
- <KEYWORD2>ibase_connect</KEYWORD2>
- <KEYWORD2>ibase_db_info</KEYWORD2>
- <KEYWORD2>ibase_delete_user</KEYWORD2>
- <KEYWORD2>ibase_drop_db</KEYWORD2>
- <KEYWORD2>ibase_errcode</KEYWORD2>
- <KEYWORD2>ibase_errmsg</KEYWORD2>
- <KEYWORD2>ibase_execute</KEYWORD2>
- <KEYWORD2>ibase_fetch_assoc</KEYWORD2>
- <KEYWORD2>ibase_fetch_object</KEYWORD2>
- <KEYWORD2>ibase_fetch_row</KEYWORD2>
- <KEYWORD2>ibase_field_info</KEYWORD2>
- <KEYWORD2>ibase_free_event_handler</KEYWORD2>
- <KEYWORD2>ibase_free_query</KEYWORD2>
- <KEYWORD2>ibase_free_result</KEYWORD2>
- <KEYWORD2>ibase_gen_id</KEYWORD2>
- <KEYWORD2>ibase_maintain_db</KEYWORD2>
- <KEYWORD2>ibase_modify_user</KEYWORD2>
- <KEYWORD2>ibase_name_result</KEYWORD2>
- <KEYWORD2>ibase_num_fields</KEYWORD2>
- <KEYWORD2>ibase_num_params</KEYWORD2>
- <KEYWORD2>ibase_param_info</KEYWORD2>
- <KEYWORD2>ibase_pconnect</KEYWORD2>
- <KEYWORD2>ibase_prepare</KEYWORD2>
- <KEYWORD2>ibase_query</KEYWORD2>
- <KEYWORD2>ibase_restore</KEYWORD2>
- <KEYWORD2>ibase_rollback</KEYWORD2>
- <KEYWORD2>ibase_rollback_ret</KEYWORD2>
- <KEYWORD2>ibase_server_info</KEYWORD2>
- <KEYWORD2>ibase_service_attach</KEYWORD2>
- <KEYWORD2>ibase_service_detach</KEYWORD2>
- <KEYWORD2>ibase_set_event_handler</KEYWORD2>
- <KEYWORD2>ibase_timefmt</KEYWORD2>
- <KEYWORD2>ibase_trans</KEYWORD2>
- <KEYWORD2>ibase_wait_event</KEYWORD2>
- <KEYWORD2>iconv</KEYWORD2>
- <KEYWORD2>iconv_get_encoding</KEYWORD2>
- <KEYWORD2>iconv_mime_decode</KEYWORD2>
- <KEYWORD2>iconv_mime_decode_headers</KEYWORD2>
- <KEYWORD2>iconv_mime_encode</KEYWORD2>
- <KEYWORD2>iconv_set_encoding</KEYWORD2>
- <KEYWORD2>iconv_strlen</KEYWORD2>
- <KEYWORD2>iconv_strpos</KEYWORD2>
- <KEYWORD2>iconv_strrpos</KEYWORD2>
- <KEYWORD2>iconv_substr</KEYWORD2>
- <KEYWORD2>id3_get_genre_id</KEYWORD2>
- <KEYWORD2>id3_get_genre_list</KEYWORD2>
- <KEYWORD2>id3_get_genre_name</KEYWORD2>
- <KEYWORD2>id3_get_tag</KEYWORD2>
- <KEYWORD2>id3_get_version</KEYWORD2>
- <KEYWORD2>id3_remove_tag</KEYWORD2>
- <KEYWORD2>id3_set_tag</KEYWORD2>
- <KEYWORD2>idate</KEYWORD2>
- <KEYWORD2>identify</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>ifx_affected_rows</KEYWORD2>
- <KEYWORD2>ifx_blobinfile_mode</KEYWORD2>
- <KEYWORD2>ifx_byteasvarchar</KEYWORD2>
- <KEYWORD2>ifx_close</KEYWORD2>
- <KEYWORD2>ifx_connect</KEYWORD2>
- <KEYWORD2>ifx_copy_blob</KEYWORD2>
- <KEYWORD2>ifx_create_blob</KEYWORD2>
- <KEYWORD2>ifx_create_char</KEYWORD2>
- <KEYWORD2>ifx_do</KEYWORD2>
- <KEYWORD2>ifx_error</KEYWORD2>
- <KEYWORD2>ifx_errormsg</KEYWORD2>
- <KEYWORD2>ifx_fetch_row</KEYWORD2>
- <KEYWORD2>ifx_fieldproperties</KEYWORD2>
- <KEYWORD2>ifx_fieldtypes</KEYWORD2>
- <KEYWORD2>ifx_free_blob</KEYWORD2>
- <KEYWORD2>ifx_free_char</KEYWORD2>
- <KEYWORD2>ifx_free_result</KEYWORD2>
- <KEYWORD2>ifx_get_blob</KEYWORD2>
- <KEYWORD2>ifx_get_char</KEYWORD2>
- <KEYWORD2>ifx_getsqlca</KEYWORD2>
- <KEYWORD2>ifx_htmltbl_result</KEYWORD2>
- <KEYWORD2>ifx_nullformat</KEYWORD2>
- <KEYWORD2>ifx_num_fields</KEYWORD2>
- <KEYWORD2>ifx_num_rows</KEYWORD2>
- <KEYWORD2>ifx_pconnect</KEYWORD2>
- <KEYWORD2>ifx_prepare</KEYWORD2>
- <KEYWORD2>ifx_query</KEYWORD2>
- <KEYWORD2>ifx_textasvarchar</KEYWORD2>
- <KEYWORD2>ifx_update_blob</KEYWORD2>
- <KEYWORD2>ifx_update_char</KEYWORD2>
- <KEYWORD2>ifxus_close_slob</KEYWORD2>
- <KEYWORD2>ifxus_create_slob</KEYWORD2>
- <KEYWORD2>ifxus_free_slob</KEYWORD2>
- <KEYWORD2>ifxus_open_slob</KEYWORD2>
- <KEYWORD2>ifxus_read_slob</KEYWORD2>
- <KEYWORD2>ifxus_seek_slob</KEYWORD2>
- <KEYWORD2>ifxus_tell_slob</KEYWORD2>
- <KEYWORD2>ifxus_write_slob</KEYWORD2>
- <KEYWORD2>ignore_user_abort</KEYWORD2>
- <KEYWORD2>image2wbmp</KEYWORD2>
- <KEYWORD2>image_type_to_extension</KEYWORD2>
- <KEYWORD2>image_type_to_mime_type</KEYWORD2>
- <KEYWORD2>imagealphablending</KEYWORD2>
- <KEYWORD2>imageantialias</KEYWORD2>
- <KEYWORD2>imagearc</KEYWORD2>
- <KEYWORD2>imagechar</KEYWORD2>
- <KEYWORD2>imagecharup</KEYWORD2>
- <KEYWORD2>imagecolorallocate</KEYWORD2>
- <KEYWORD2>imagecolorallocatealpha</KEYWORD2>
- <KEYWORD2>imagecolorat</KEYWORD2>
- <KEYWORD2>imagecolorclosest</KEYWORD2>
- <KEYWORD2>imagecolorclosestalpha</KEYWORD2>
- <KEYWORD2>imagecolorclosesthwb</KEYWORD2>
- <KEYWORD2>imagecolordeallocate</KEYWORD2>
- <KEYWORD2>imagecolorexact</KEYWORD2>
- <KEYWORD2>imagecolorexactalpha</KEYWORD2>
- <KEYWORD2>imagecolormatch</KEYWORD2>
- <KEYWORD2>imagecolorresolve</KEYWORD2>
- <KEYWORD2>imagecolorresolvealpha</KEYWORD2>
- <KEYWORD2>imagecolorset</KEYWORD2>
- <KEYWORD2>imagecolorsforindex</KEYWORD2>
- <KEYWORD2>imagecolorstotal</KEYWORD2>
- <KEYWORD2>imagecolortransparent</KEYWORD2>
- <KEYWORD2>imagecopy</KEYWORD2>
- <KEYWORD2>imagecopymerge</KEYWORD2>
- <KEYWORD2>imagecopymergegray</KEYWORD2>
- <KEYWORD2>imagecopyresampled</KEYWORD2>
- <KEYWORD2>imagecopyresized</KEYWORD2>
- <KEYWORD2>imagecreate</KEYWORD2>
- <KEYWORD2>imagecreatefromgd</KEYWORD2>
- <KEYWORD2>imagecreatefromgd2</KEYWORD2>
- <KEYWORD2>imagecreatefromgd2part</KEYWORD2>
- <KEYWORD2>imagecreatefromgif</KEYWORD2>
- <KEYWORD2>imagecreatefromjpeg</KEYWORD2>
- <KEYWORD2>imagecreatefrompng</KEYWORD2>
- <KEYWORD2>imagecreatefromstring</KEYWORD2>
- <KEYWORD2>imagecreatefromwbmp</KEYWORD2>
- <KEYWORD2>imagecreatefromxbm</KEYWORD2>
- <KEYWORD2>imagecreatefromxpm</KEYWORD2>
- <KEYWORD2>imagecreatetruecolor</KEYWORD2>
- <KEYWORD2>imagedashedline</KEYWORD2>
- <KEYWORD2>imagedestroy</KEYWORD2>
- <KEYWORD2>imageellipse</KEYWORD2>
- <KEYWORD2>imagefill</KEYWORD2>
- <KEYWORD2>imagefilledarc</KEYWORD2>
- <KEYWORD2>imagefilledellipse</KEYWORD2>
- <KEYWORD2>imagefilledpolygon</KEYWORD2>
- <KEYWORD2>imagefilledrectangle</KEYWORD2>
- <KEYWORD2>imagefilltoborder</KEYWORD2>
- <KEYWORD2>imagefilter</KEYWORD2>
- <KEYWORD2>imagefontheight</KEYWORD2>
- <KEYWORD2>imagefontwidth</KEYWORD2>
- <KEYWORD2>imageftbbox</KEYWORD2>
- <KEYWORD2>imagefttext</KEYWORD2>
- <KEYWORD2>imagegammacorrect</KEYWORD2>
- <KEYWORD2>imagegd</KEYWORD2>
- <KEYWORD2>imagegd2</KEYWORD2>
- <KEYWORD2>imagegif</KEYWORD2>
- <KEYWORD2>imageinterlace</KEYWORD2>
- <KEYWORD2>imageistruecolor</KEYWORD2>
- <KEYWORD2>imagejpeg</KEYWORD2>
- <KEYWORD2>imagelayereffect</KEYWORD2>
- <KEYWORD2>imageline</KEYWORD2>
- <KEYWORD2>imageloadfont</KEYWORD2>
- <KEYWORD2>imagepalettecopy</KEYWORD2>
- <KEYWORD2>imagepng</KEYWORD2>
- <KEYWORD2>imagepolygon</KEYWORD2>
- <KEYWORD2>imagepsbbox</KEYWORD2>
- <KEYWORD2>imagepscopyfont</KEYWORD2>
- <KEYWORD2>imagepsencodefont</KEYWORD2>
- <KEYWORD2>imagepsextendfont</KEYWORD2>
- <KEYWORD2>imagepsfreefont</KEYWORD2>
- <KEYWORD2>imagepsloadfont</KEYWORD2>
- <KEYWORD2>imagepsslantfont</KEYWORD2>
- <KEYWORD2>imagepstext</KEYWORD2>
- <KEYWORD2>imagerectangle</KEYWORD2>
- <KEYWORD2>imagerotate</KEYWORD2>
- <KEYWORD2>imagesavealpha</KEYWORD2>
- <KEYWORD2>imagesetbrush</KEYWORD2>
- <KEYWORD2>imagesetpixel</KEYWORD2>
- <KEYWORD2>imagesetstyle</KEYWORD2>
- <KEYWORD2>imagesetthickness</KEYWORD2>
- <KEYWORD2>imagesettile</KEYWORD2>
- <KEYWORD2>imagestring</KEYWORD2>
- <KEYWORD2>imagestringup</KEYWORD2>
- <KEYWORD2>imagesx</KEYWORD2>
- <KEYWORD2>imagesy</KEYWORD2>
- <KEYWORD2>imagetruecolortopalette</KEYWORD2>
- <KEYWORD2>imagettfbbox</KEYWORD2>
- <KEYWORD2>imagettftext</KEYWORD2>
- <KEYWORD2>imagetypes</KEYWORD2>
- <KEYWORD2>imagewbmp</KEYWORD2>
- <KEYWORD2>imagexbm</KEYWORD2>
- <KEYWORD2>imap_8bit</KEYWORD2>
- <KEYWORD2>imap_alerts</KEYWORD2>
- <KEYWORD2>imap_append</KEYWORD2>
- <KEYWORD2>imap_base64</KEYWORD2>
- <KEYWORD2>imap_binary</KEYWORD2>
- <KEYWORD2>imap_body</KEYWORD2>
- <KEYWORD2>imap_bodystruct</KEYWORD2>
- <KEYWORD2>imap_check</KEYWORD2>
- <KEYWORD2>imap_clearflag_full</KEYWORD2>
- <KEYWORD2>imap_close</KEYWORD2>
- <KEYWORD2>imap_createmailbox</KEYWORD2>
- <KEYWORD2>imap_delete</KEYWORD2>
- <KEYWORD2>imap_deletemailbox</KEYWORD2>
- <KEYWORD2>imap_errors</KEYWORD2>
- <KEYWORD2>imap_expunge</KEYWORD2>
- <KEYWORD2>imap_fetch_overview</KEYWORD2>
- <KEYWORD2>imap_fetchbody</KEYWORD2>
- <KEYWORD2>imap_fetchheader</KEYWORD2>
- <KEYWORD2>imap_fetchstructure</KEYWORD2>
- <KEYWORD2>imap_get_quota</KEYWORD2>
- <KEYWORD2>imap_get_quotaroot</KEYWORD2>
- <KEYWORD2>imap_getacl</KEYWORD2>
- <KEYWORD2>imap_getmailboxes</KEYWORD2>
- <KEYWORD2>imap_getsubscribed</KEYWORD2>
- <KEYWORD2>imap_header</KEYWORD2>
- <KEYWORD2>imap_headerinfo</KEYWORD2>
- <KEYWORD2>imap_headers</KEYWORD2>
- <KEYWORD2>imap_last_error</KEYWORD2>
- <KEYWORD2>imap_list</KEYWORD2>
- <KEYWORD2>imap_listmailbox</KEYWORD2>
- <KEYWORD2>imap_listscan</KEYWORD2>
- <KEYWORD2>imap_listsubscribed</KEYWORD2>
- <KEYWORD2>imap_lsub</KEYWORD2>
- <KEYWORD2>imap_mail</KEYWORD2>
- <KEYWORD2>imap_mail_compose</KEYWORD2>
- <KEYWORD2>imap_mail_copy</KEYWORD2>
- <KEYWORD2>imap_mail_move</KEYWORD2>
- <KEYWORD2>imap_mailboxmsginfo</KEYWORD2>
- <KEYWORD2>imap_mime_header_decode</KEYWORD2>
- <KEYWORD2>imap_msgno</KEYWORD2>
- <KEYWORD2>imap_num_msg</KEYWORD2>
- <KEYWORD2>imap_num_recent</KEYWORD2>
- <KEYWORD2>imap_open</KEYWORD2>
- <KEYWORD2>imap_ping</KEYWORD2>
- <KEYWORD2>imap_qprint</KEYWORD2>
- <KEYWORD2>imap_renamemailbox</KEYWORD2>
- <KEYWORD2>imap_reopen</KEYWORD2>
- <KEYWORD2>imap_rfc822_parse_adrlist</KEYWORD2>
- <KEYWORD2>imap_rfc822_parse_headers</KEYWORD2>
- <KEYWORD2>imap_rfc822_write_address</KEYWORD2>
- <KEYWORD2>imap_scanmailbox</KEYWORD2>
- <KEYWORD2>imap_search</KEYWORD2>
- <KEYWORD2>imap_set_quota</KEYWORD2>
- <KEYWORD2>imap_setacl</KEYWORD2>
- <KEYWORD2>imap_setflag_full</KEYWORD2>
- <KEYWORD2>imap_sort</KEYWORD2>
- <KEYWORD2>imap_status</KEYWORD2>
- <KEYWORD2>imap_subscribe</KEYWORD2>
- <KEYWORD2>imap_thread</KEYWORD2>
- <KEYWORD2>imap_timeout</KEYWORD2>
- <KEYWORD2>imap_uid</KEYWORD2>
- <KEYWORD2>imap_undelete</KEYWORD2>
- <KEYWORD2>imap_unsubscribe</KEYWORD2>
- <KEYWORD2>imap_utf7_decode</KEYWORD2>
- <KEYWORD2>imap_utf7_encode</KEYWORD2>
- <KEYWORD2>imap_utf8</KEYWORD2>
- <KEYWORD2>implode</KEYWORD2>
- <KEYWORD2>import</KEYWORD2> <!-- lob -->
- <KEYWORD2>import_request_variables</KEYWORD2>
- <KEYWORD2>importnode</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>in_array</KEYWORD2>
- <KEYWORD2>increment</KEYWORD2> <!-- memcache -->
- <KEYWORD2>inet_ntop</KEYWORD2>
- <KEYWORD2>inet_pton</KEYWORD2>
- <KEYWORD2>info</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>ingres_autocommit</KEYWORD2>
- <KEYWORD2>ingres_close</KEYWORD2>
- <KEYWORD2>ingres_commit</KEYWORD2>
- <KEYWORD2>ingres_connect</KEYWORD2>
- <KEYWORD2>ingres_fetch_array</KEYWORD2>
- <KEYWORD2>ingres_fetch_object</KEYWORD2>
- <KEYWORD2>ingres_fetch_row</KEYWORD2>
- <KEYWORD2>ingres_field_length</KEYWORD2>
- <KEYWORD2>ingres_field_name</KEYWORD2>
- <KEYWORD2>ingres_field_nullable</KEYWORD2>
- <KEYWORD2>ingres_field_precision</KEYWORD2>
- <KEYWORD2>ingres_field_scale</KEYWORD2>
- <KEYWORD2>ingres_field_type</KEYWORD2>
- <KEYWORD2>ingres_num_fields</KEYWORD2>
- <KEYWORD2>ingres_num_rows</KEYWORD2>
- <KEYWORD2>ingres_pconnect</KEYWORD2>
- <KEYWORD2>ingres_query</KEYWORD2>
- <KEYWORD2>ingres_rollback</KEYWORD2>
- <KEYWORD2>ini_alter</KEYWORD2>
- <KEYWORD2>ini_get</KEYWORD2>
- <KEYWORD2>ini_get_all</KEYWORD2>
- <KEYWORD2>ini_restore</KEYWORD2>
- <KEYWORD2>ini_set</KEYWORD2>
- <KEYWORD2>insert</KEYWORD2> <!-- hw_api, hw_api_object -->
- <KEYWORD2>insert_before</KEYWORD2> <!-- domnode -->
- <KEYWORD2>insertanchor</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>insertbefore</KEYWORD2> <!-- domnode -->
- <KEYWORD2>insertcollection</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>insertdata</KEYWORD2> <!-- domcharacterdata -->
- <KEYWORD2>insertdocument</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>interface_exists</KEYWORD2>
- <KEYWORD2>internal_subset</KEYWORD2> <!-- domdocumenttype -->
- <KEYWORD2>intval</KEYWORD2>
- <KEYWORD2>ip2long</KEYWORD2>
- <KEYWORD2>iptcembed</KEYWORD2>
- <KEYWORD2>iptcparse</KEYWORD2>
- <KEYWORD2>ircg_channel_mode</KEYWORD2>
- <KEYWORD2>ircg_disconnect</KEYWORD2>
- <KEYWORD2>ircg_eval_ecmascript_params</KEYWORD2>
- <KEYWORD2>ircg_fetch_error_msg</KEYWORD2>
- <KEYWORD2>ircg_get_username</KEYWORD2>
- <KEYWORD2>ircg_html_encode</KEYWORD2>
- <KEYWORD2>ircg_ignore_add</KEYWORD2>
- <KEYWORD2>ircg_ignore_del</KEYWORD2>
- <KEYWORD2>ircg_invite</KEYWORD2>
- <KEYWORD2>ircg_is_conn_alive</KEYWORD2>
- <KEYWORD2>ircg_join</KEYWORD2>
- <KEYWORD2>ircg_kick</KEYWORD2>
- <KEYWORD2>ircg_list</KEYWORD2>
- <KEYWORD2>ircg_lookup_format_messages</KEYWORD2>
- <KEYWORD2>ircg_lusers</KEYWORD2>
- <KEYWORD2>ircg_msg</KEYWORD2>
- <KEYWORD2>ircg_names</KEYWORD2>
- <KEYWORD2>ircg_nick</KEYWORD2>
- <KEYWORD2>ircg_nickname_escape</KEYWORD2>
- <KEYWORD2>ircg_nickname_unescape</KEYWORD2>
- <KEYWORD2>ircg_notice</KEYWORD2>
- <KEYWORD2>ircg_oper</KEYWORD2>
- <KEYWORD2>ircg_part</KEYWORD2>
- <KEYWORD2>ircg_pconnect</KEYWORD2>
- <KEYWORD2>ircg_register_format_messages</KEYWORD2>
- <KEYWORD2>ircg_set_current</KEYWORD2>
- <KEYWORD2>ircg_set_file</KEYWORD2>
- <KEYWORD2>ircg_set_on_die</KEYWORD2>
- <KEYWORD2>ircg_topic</KEYWORD2>
- <KEYWORD2>ircg_who</KEYWORD2>
- <KEYWORD2>ircg_whois</KEYWORD2>
- <KEYWORD2>is_a</KEYWORD2>
- <KEYWORD2>is_array</KEYWORD2>
- <KEYWORD2>is_blank_node</KEYWORD2> <!-- domnode -->
- <KEYWORD2>is_bool</KEYWORD2>
- <KEYWORD2>is_callable</KEYWORD2>
- <KEYWORD2>is_dir</KEYWORD2>
- <KEYWORD2>is_double</KEYWORD2>
- <KEYWORD2>is_executable</KEYWORD2>
- <KEYWORD2>is_file</KEYWORD2>
- <KEYWORD2>is_finite</KEYWORD2>
- <KEYWORD2>is_float</KEYWORD2>
- <KEYWORD2>is_infinite</KEYWORD2>
- <KEYWORD2>is_int</KEYWORD2>
- <KEYWORD2>is_integer</KEYWORD2>
- <KEYWORD2>is_link</KEYWORD2>
- <KEYWORD2>is_long</KEYWORD2>
- <KEYWORD2>is_nan</KEYWORD2>
- <KEYWORD2>is_null</KEYWORD2>
- <KEYWORD2>is_numeric</KEYWORD2>
- <KEYWORD2>is_object</KEYWORD2>
- <KEYWORD2>is_readable</KEYWORD2>
- <KEYWORD2>is_real</KEYWORD2>
- <KEYWORD2>is_resource</KEYWORD2>
- <KEYWORD2>is_scalar</KEYWORD2>
- <KEYWORD2>is_soap_fault</KEYWORD2>
- <KEYWORD2>is_string</KEYWORD2>
- <KEYWORD2>is_subclass_of</KEYWORD2>
- <KEYWORD2>is_uploaded_file</KEYWORD2>
- <KEYWORD2>is_writable</KEYWORD2>
- <KEYWORD2>is_writeable</KEYWORD2>
- <KEYWORD2>isasp</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>iscomment</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>isdir</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>isdot</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>isexecutable</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>isfile</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>ishtml</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>isid</KEYWORD2> <!-- domattr -->
- <KEYWORD2>isjste</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>islink</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>isphp</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>isreadable</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>issamenode</KEYWORD2> <!-- domnode -->
- <KEYWORD2>issupported</KEYWORD2> <!-- domnode -->
- <KEYWORD2>istext</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>iswhitespaceinelementcontent</KEYWORD2> <!-- domtext -->
- <KEYWORD2>iswritable</KEYWORD2> <!-- directoryiterator -->
- <KEYWORD2>isxhtml</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>isxml</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>item</KEYWORD2> <!-- domnamednodemap, domnodelist -->
- <KEYWORD2>iterator_count</KEYWORD2>
- <KEYWORD2>iterator_to_array</KEYWORD2>
- <KEYWORD2>java_last_exception_clear</KEYWORD2>
- <KEYWORD2>java_last_exception_get</KEYWORD2>
- <KEYWORD2>jddayofweek</KEYWORD2>
- <KEYWORD2>jdmonthname</KEYWORD2>
- <KEYWORD2>jdtofrench</KEYWORD2>
- <KEYWORD2>jdtogregorian</KEYWORD2>
- <KEYWORD2>jdtojewish</KEYWORD2>
- <KEYWORD2>jdtojulian</KEYWORD2>
- <KEYWORD2>jdtounix</KEYWORD2>
- <KEYWORD2>jewishtojd</KEYWORD2>
- <KEYWORD2>join</KEYWORD2>
- <KEYWORD2>jpeg2wbmp</KEYWORD2>
- <KEYWORD2>json_decode</KEYWORD2>
- <KEYWORD2>json_encode</KEYWORD2>
- <KEYWORD2>juliantojd</KEYWORD2>
- <KEYWORD2>key</KEYWORD2> <!-- arrayiterator, directoryiterator, filteriterator, hw_api_attribute, recursivedirectoryiterator, recursiveiteratoriterator, simplexmliterator -->
- <KEYWORD2>krsort</KEYWORD2>
- <KEYWORD2>ksort</KEYWORD2>
- <KEYWORD2>langdepvalue</KEYWORD2> <!-- hw_api_attribute -->
- <KEYWORD2>last_child</KEYWORD2> <!-- domnode -->
- <KEYWORD2>lastinsertid</KEYWORD2> <!-- pdo -->
- <KEYWORD2>lcg_value</KEYWORD2>
- <KEYWORD2>ldap_8859_to_t61</KEYWORD2>
- <KEYWORD2>ldap_add</KEYWORD2>
- <KEYWORD2>ldap_bind</KEYWORD2>
- <KEYWORD2>ldap_close</KEYWORD2>
- <KEYWORD2>ldap_compare</KEYWORD2>
- <KEYWORD2>ldap_connect</KEYWORD2>
- <KEYWORD2>ldap_count_entries</KEYWORD2>
- <KEYWORD2>ldap_delete</KEYWORD2>
- <KEYWORD2>ldap_dn2ufn</KEYWORD2>
- <KEYWORD2>ldap_err2str</KEYWORD2>
- <KEYWORD2>ldap_errno</KEYWORD2>
- <KEYWORD2>ldap_error</KEYWORD2>
- <KEYWORD2>ldap_explode_dn</KEYWORD2>
- <KEYWORD2>ldap_first_attribute</KEYWORD2>
- <KEYWORD2>ldap_first_entry</KEYWORD2>
- <KEYWORD2>ldap_first_reference</KEYWORD2>
- <KEYWORD2>ldap_free_result</KEYWORD2>
- <KEYWORD2>ldap_get_attributes</KEYWORD2>
- <KEYWORD2>ldap_get_dn</KEYWORD2>
- <KEYWORD2>ldap_get_entries</KEYWORD2>
- <KEYWORD2>ldap_get_option</KEYWORD2>
- <KEYWORD2>ldap_get_values</KEYWORD2>
- <KEYWORD2>ldap_get_values_len</KEYWORD2>
- <KEYWORD2>ldap_list</KEYWORD2>
- <KEYWORD2>ldap_mod_add</KEYWORD2>
- <KEYWORD2>ldap_mod_del</KEYWORD2>
- <KEYWORD2>ldap_mod_replace</KEYWORD2>
- <KEYWORD2>ldap_modify</KEYWORD2>
- <KEYWORD2>ldap_next_attribute</KEYWORD2>
- <KEYWORD2>ldap_next_entry</KEYWORD2>
- <KEYWORD2>ldap_next_reference</KEYWORD2>
- <KEYWORD2>ldap_parse_reference</KEYWORD2>
- <KEYWORD2>ldap_parse_result</KEYWORD2>
- <KEYWORD2>ldap_read</KEYWORD2>
- <KEYWORD2>ldap_rename</KEYWORD2>
- <KEYWORD2>ldap_sasl_bind</KEYWORD2>
- <KEYWORD2>ldap_search</KEYWORD2>
- <KEYWORD2>ldap_set_option</KEYWORD2>
- <KEYWORD2>ldap_set_rebind_proc</KEYWORD2>
- <KEYWORD2>ldap_sort</KEYWORD2>
- <KEYWORD2>ldap_start_tls</KEYWORD2>
- <KEYWORD2>ldap_t61_to_8859</KEYWORD2>
- <KEYWORD2>ldap_unbind</KEYWORD2>
- <KEYWORD2>levenshtein</KEYWORD2>
- <KEYWORD2>link</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>linkinfo</KEYWORD2>
- <KEYWORD2>load</KEYWORD2> <!-- domdocument, lob -->
- <KEYWORD2>loadhtml</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>loadhtmlfile</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>loadxml</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>localeconv</KEYWORD2>
- <KEYWORD2>localtime</KEYWORD2>
- <KEYWORD2>lock</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>log</KEYWORD2>
- <KEYWORD2>log10</KEYWORD2>
- <KEYWORD2>log1p</KEYWORD2>
- <KEYWORD2>long2ip</KEYWORD2>
- <KEYWORD2>lookupnamespaceuri</KEYWORD2> <!-- domnode -->
- <KEYWORD2>lookupprefix</KEYWORD2> <!-- domnode -->
- <KEYWORD2>lstat</KEYWORD2>
- <KEYWORD2>ltrim</KEYWORD2>
- <KEYWORD2>lzf_compress</KEYWORD2>
- <KEYWORD2>lzf_decompress</KEYWORD2>
- <KEYWORD2>lzf_optimized_for</KEYWORD2>
- <KEYWORD2>mail</KEYWORD2>
- <KEYWORD2>mailparse_determine_best_xfer_encoding</KEYWORD2>
- <KEYWORD2>mailparse_msg_create</KEYWORD2>
- <KEYWORD2>mailparse_msg_extract_part</KEYWORD2>
- <KEYWORD2>mailparse_msg_extract_part_file</KEYWORD2>
- <KEYWORD2>mailparse_msg_free</KEYWORD2>
- <KEYWORD2>mailparse_msg_get_part</KEYWORD2>
- <KEYWORD2>mailparse_msg_get_part_data</KEYWORD2>
- <KEYWORD2>mailparse_msg_get_structure</KEYWORD2>
- <KEYWORD2>mailparse_msg_parse</KEYWORD2>
- <KEYWORD2>mailparse_msg_parse_file</KEYWORD2>
- <KEYWORD2>mailparse_rfc822_parse_addresses</KEYWORD2>
- <KEYWORD2>mailparse_stream_encode</KEYWORD2>
- <KEYWORD2>mailparse_uudecode_all</KEYWORD2>
- <KEYWORD2>main</KEYWORD2>
- <KEYWORD2>max</KEYWORD2> <!-- collection -->
- <KEYWORD2>mb_convert_case</KEYWORD2>
- <KEYWORD2>mb_convert_encoding</KEYWORD2>
- <KEYWORD2>mb_convert_kana</KEYWORD2>
- <KEYWORD2>mb_convert_variables</KEYWORD2>
- <KEYWORD2>mb_decode_mimeheader</KEYWORD2>
- <KEYWORD2>mb_decode_numericentity</KEYWORD2>
- <KEYWORD2>mb_detect_encoding</KEYWORD2>
- <KEYWORD2>mb_detect_order</KEYWORD2>
- <KEYWORD2>mb_encode_mimeheader</KEYWORD2>
- <KEYWORD2>mb_encode_numericentity</KEYWORD2>
- <KEYWORD2>mb_ereg</KEYWORD2>
- <KEYWORD2>mb_ereg_match</KEYWORD2>
- <KEYWORD2>mb_ereg_replace</KEYWORD2>
- <KEYWORD2>mb_ereg_search</KEYWORD2>
- <KEYWORD2>mb_ereg_search_getpos</KEYWORD2>
- <KEYWORD2>mb_ereg_search_getregs</KEYWORD2>
- <KEYWORD2>mb_ereg_search_init</KEYWORD2>
- <KEYWORD2>mb_ereg_search_pos</KEYWORD2>
- <KEYWORD2>mb_ereg_search_regs</KEYWORD2>
- <KEYWORD2>mb_ereg_search_setpos</KEYWORD2>
- <KEYWORD2>mb_eregi</KEYWORD2>
- <KEYWORD2>mb_eregi_replace</KEYWORD2>
- <KEYWORD2>mb_get_info</KEYWORD2>
- <KEYWORD2>mb_http_input</KEYWORD2>
- <KEYWORD2>mb_http_output</KEYWORD2>
- <KEYWORD2>mb_internal_encoding</KEYWORD2>
- <KEYWORD2>mb_language</KEYWORD2>
- <KEYWORD2>mb_list_encodings</KEYWORD2>
- <KEYWORD2>mb_output_handler</KEYWORD2>
- <KEYWORD2>mb_parse_str</KEYWORD2>
- <KEYWORD2>mb_preferred_mime_name</KEYWORD2>
- <KEYWORD2>mb_regex_encoding</KEYWORD2>
- <KEYWORD2>mb_regex_set_options</KEYWORD2>
- <KEYWORD2>mb_send_mail</KEYWORD2>
- <KEYWORD2>mb_split</KEYWORD2>
- <KEYWORD2>mb_strcut</KEYWORD2>
- <KEYWORD2>mb_strimwidth</KEYWORD2>
- <KEYWORD2>mb_strlen</KEYWORD2>
- <KEYWORD2>mb_strpos</KEYWORD2>
- <KEYWORD2>mb_strrpos</KEYWORD2>
- <KEYWORD2>mb_strtolower</KEYWORD2>
- <KEYWORD2>mb_strtoupper</KEYWORD2>
- <KEYWORD2>mb_strwidth</KEYWORD2>
- <KEYWORD2>mb_substitute_character</KEYWORD2>
- <KEYWORD2>mb_substr</KEYWORD2>
- <KEYWORD2>mb_substr_count</KEYWORD2>
- <KEYWORD2>mcal_append_event</KEYWORD2>
- <KEYWORD2>mcal_close</KEYWORD2>
- <KEYWORD2>mcal_create_calendar</KEYWORD2>
- <KEYWORD2>mcal_date_compare</KEYWORD2>
- <KEYWORD2>mcal_date_valid</KEYWORD2>
- <KEYWORD2>mcal_day_of_week</KEYWORD2>
- <KEYWORD2>mcal_day_of_year</KEYWORD2>
- <KEYWORD2>mcal_days_in_month</KEYWORD2>
- <KEYWORD2>mcal_delete_calendar</KEYWORD2>
- <KEYWORD2>mcal_delete_event</KEYWORD2>
- <KEYWORD2>mcal_event_add_attribute</KEYWORD2>
- <KEYWORD2>mcal_event_init</KEYWORD2>
- <KEYWORD2>mcal_event_set_alarm</KEYWORD2>
- <KEYWORD2>mcal_event_set_category</KEYWORD2>
- <KEYWORD2>mcal_event_set_class</KEYWORD2>
- <KEYWORD2>mcal_event_set_description</KEYWORD2>
- <KEYWORD2>mcal_event_set_end</KEYWORD2>
- <KEYWORD2>mcal_event_set_recur_daily</KEYWORD2>
- <KEYWORD2>mcal_event_set_recur_monthly_mday</KEYWORD2>
- <KEYWORD2>mcal_event_set_recur_monthly_wday</KEYWORD2>
- <KEYWORD2>mcal_event_set_recur_none</KEYWORD2>
- <KEYWORD2>mcal_event_set_recur_weekly</KEYWORD2>
- <KEYWORD2>mcal_event_set_recur_yearly</KEYWORD2>
- <KEYWORD2>mcal_event_set_start</KEYWORD2>
- <KEYWORD2>mcal_event_set_title</KEYWORD2>
- <KEYWORD2>mcal_expunge</KEYWORD2>
- <KEYWORD2>mcal_fetch_current_stream_event</KEYWORD2>
- <KEYWORD2>mcal_fetch_event</KEYWORD2>
- <KEYWORD2>mcal_is_leap_year</KEYWORD2>
- <KEYWORD2>mcal_list_alarms</KEYWORD2>
- <KEYWORD2>mcal_list_events</KEYWORD2>
- <KEYWORD2>mcal_next_recurrence</KEYWORD2>
- <KEYWORD2>mcal_open</KEYWORD2>
- <KEYWORD2>mcal_popen</KEYWORD2>
- <KEYWORD2>mcal_rename_calendar</KEYWORD2>
- <KEYWORD2>mcal_reopen</KEYWORD2>
- <KEYWORD2>mcal_snooze</KEYWORD2>
- <KEYWORD2>mcal_store_event</KEYWORD2>
- <KEYWORD2>mcal_time_valid</KEYWORD2>
- <KEYWORD2>mcal_week_of_year</KEYWORD2>
- <KEYWORD2>mcrypt_cbc</KEYWORD2>
- <KEYWORD2>mcrypt_cfb</KEYWORD2>
- <KEYWORD2>mcrypt_create_iv</KEYWORD2>
- <KEYWORD2>mcrypt_decrypt</KEYWORD2>
- <KEYWORD2>mcrypt_ecb</KEYWORD2>
- <KEYWORD2>mcrypt_enc_get_algorithms_name</KEYWORD2>
- <KEYWORD2>mcrypt_enc_get_block_size</KEYWORD2>
- <KEYWORD2>mcrypt_enc_get_iv_size</KEYWORD2>
- <KEYWORD2>mcrypt_enc_get_key_size</KEYWORD2>
- <KEYWORD2>mcrypt_enc_get_modes_name</KEYWORD2>
- <KEYWORD2>mcrypt_enc_get_supported_key_sizes</KEYWORD2>
- <KEYWORD2>mcrypt_enc_is_block_algorithm</KEYWORD2>
- <KEYWORD2>mcrypt_enc_is_block_algorithm_mode</KEYWORD2>
- <KEYWORD2>mcrypt_enc_is_block_mode</KEYWORD2>
- <KEYWORD2>mcrypt_enc_self_test</KEYWORD2>
- <KEYWORD2>mcrypt_encrypt</KEYWORD2>
- <KEYWORD2>mcrypt_generic</KEYWORD2>
- <KEYWORD2>mcrypt_generic_deinit</KEYWORD2>
- <KEYWORD2>mcrypt_generic_end</KEYWORD2>
- <KEYWORD2>mcrypt_generic_init</KEYWORD2>
- <KEYWORD2>mcrypt_get_block_size</KEYWORD2>
- <KEYWORD2>mcrypt_get_cipher_name</KEYWORD2>
- <KEYWORD2>mcrypt_get_iv_size</KEYWORD2>
- <KEYWORD2>mcrypt_get_key_size</KEYWORD2>
- <KEYWORD2>mcrypt_list_algorithms</KEYWORD2>
- <KEYWORD2>mcrypt_list_modes</KEYWORD2>
- <KEYWORD2>mcrypt_module_close</KEYWORD2>
- <KEYWORD2>mcrypt_module_get_algo_block_size</KEYWORD2>
- <KEYWORD2>mcrypt_module_get_algo_key_size</KEYWORD2>
- <KEYWORD2>mcrypt_module_get_supported_key_sizes</KEYWORD2>
- <KEYWORD2>mcrypt_module_is_block_algorithm</KEYWORD2>
- <KEYWORD2>mcrypt_module_is_block_algorithm_mode</KEYWORD2>
- <KEYWORD2>mcrypt_module_is_block_mode</KEYWORD2>
- <KEYWORD2>mcrypt_module_open</KEYWORD2>
- <KEYWORD2>mcrypt_module_self_test</KEYWORD2>
- <KEYWORD2>mcrypt_ofb</KEYWORD2>
- <KEYWORD2>mcve_adduser</KEYWORD2>
- <KEYWORD2>mcve_adduserarg</KEYWORD2>
- <KEYWORD2>mcve_bt</KEYWORD2>
- <KEYWORD2>mcve_checkstatus</KEYWORD2>
- <KEYWORD2>mcve_chkpwd</KEYWORD2>
- <KEYWORD2>mcve_chngpwd</KEYWORD2>
- <KEYWORD2>mcve_completeauthorizations</KEYWORD2>
- <KEYWORD2>mcve_connect</KEYWORD2>
- <KEYWORD2>mcve_connectionerror</KEYWORD2>
- <KEYWORD2>mcve_deleteresponse</KEYWORD2>
- <KEYWORD2>mcve_deletetrans</KEYWORD2>
- <KEYWORD2>mcve_deleteusersetup</KEYWORD2>
- <KEYWORD2>mcve_deluser</KEYWORD2>
- <KEYWORD2>mcve_destroyconn</KEYWORD2>
- <KEYWORD2>mcve_destroyengine</KEYWORD2>
- <KEYWORD2>mcve_disableuser</KEYWORD2>
- <KEYWORD2>mcve_edituser</KEYWORD2>
- <KEYWORD2>mcve_enableuser</KEYWORD2>
- <KEYWORD2>mcve_force</KEYWORD2>
- <KEYWORD2>mcve_getcell</KEYWORD2>
- <KEYWORD2>mcve_getcellbynum</KEYWORD2>
- <KEYWORD2>mcve_getcommadelimited</KEYWORD2>
- <KEYWORD2>mcve_getheader</KEYWORD2>
- <KEYWORD2>mcve_getuserarg</KEYWORD2>
- <KEYWORD2>mcve_getuserparam</KEYWORD2>
- <KEYWORD2>mcve_gft</KEYWORD2>
- <KEYWORD2>mcve_gl</KEYWORD2>
- <KEYWORD2>mcve_gut</KEYWORD2>
- <KEYWORD2>mcve_initconn</KEYWORD2>
- <KEYWORD2>mcve_initengine</KEYWORD2>
- <KEYWORD2>mcve_initusersetup</KEYWORD2>
- <KEYWORD2>mcve_iscommadelimited</KEYWORD2>
- <KEYWORD2>mcve_liststats</KEYWORD2>
- <KEYWORD2>mcve_listusers</KEYWORD2>
- <KEYWORD2>mcve_maxconntimeout</KEYWORD2>
- <KEYWORD2>mcve_monitor</KEYWORD2>
- <KEYWORD2>mcve_numcolumns</KEYWORD2>
- <KEYWORD2>mcve_numrows</KEYWORD2>
- <KEYWORD2>mcve_override</KEYWORD2>
- <KEYWORD2>mcve_parsecommadelimited</KEYWORD2>
- <KEYWORD2>mcve_ping</KEYWORD2>
- <KEYWORD2>mcve_preauth</KEYWORD2>
- <KEYWORD2>mcve_preauthcompletion</KEYWORD2>
- <KEYWORD2>mcve_qc</KEYWORD2>
- <KEYWORD2>mcve_responseparam</KEYWORD2>
- <KEYWORD2>mcve_return</KEYWORD2>
- <KEYWORD2>mcve_returncode</KEYWORD2>
- <KEYWORD2>mcve_returnstatus</KEYWORD2>
- <KEYWORD2>mcve_sale</KEYWORD2>
- <KEYWORD2>mcve_setblocking</KEYWORD2>
- <KEYWORD2>mcve_setdropfile</KEYWORD2>
- <KEYWORD2>mcve_setip</KEYWORD2>
- <KEYWORD2>mcve_setssl</KEYWORD2>
- <KEYWORD2>mcve_setssl_files</KEYWORD2>
- <KEYWORD2>mcve_settimeout</KEYWORD2>
- <KEYWORD2>mcve_settle</KEYWORD2>
- <KEYWORD2>mcve_text_avs</KEYWORD2>
- <KEYWORD2>mcve_text_code</KEYWORD2>
- <KEYWORD2>mcve_text_cv</KEYWORD2>
- <KEYWORD2>mcve_transactionauth</KEYWORD2>
- <KEYWORD2>mcve_transactionavs</KEYWORD2>
- <KEYWORD2>mcve_transactionbatch</KEYWORD2>
- <KEYWORD2>mcve_transactioncv</KEYWORD2>
- <KEYWORD2>mcve_transactionid</KEYWORD2>
- <KEYWORD2>mcve_transactionitem</KEYWORD2>
- <KEYWORD2>mcve_transactionssent</KEYWORD2>
- <KEYWORD2>mcve_transactiontext</KEYWORD2>
- <KEYWORD2>mcve_transinqueue</KEYWORD2>
- <KEYWORD2>mcve_transnew</KEYWORD2>
- <KEYWORD2>mcve_transparam</KEYWORD2>
- <KEYWORD2>mcve_transsend</KEYWORD2>
- <KEYWORD2>mcve_ub</KEYWORD2>
- <KEYWORD2>mcve_uwait</KEYWORD2>
- <KEYWORD2>mcve_verifyconnection</KEYWORD2>
- <KEYWORD2>mcve_verifysslcert</KEYWORD2>
- <KEYWORD2>mcve_void</KEYWORD2>
- <KEYWORD2>md5</KEYWORD2>
- <KEYWORD2>md5_file</KEYWORD2>
- <KEYWORD2>mdecrypt_generic</KEYWORD2>
- <KEYWORD2>memcache_debug</KEYWORD2>
- <KEYWORD2>memory_get_usage</KEYWORD2>
- <KEYWORD2>metaphone</KEYWORD2>
- <KEYWORD2>method_exists</KEYWORD2>
- <KEYWORD2>mhash</KEYWORD2>
- <KEYWORD2>mhash_count</KEYWORD2>
- <KEYWORD2>mhash_get_block_size</KEYWORD2>
- <KEYWORD2>mhash_get_hash_name</KEYWORD2>
- <KEYWORD2>mhash_keygen_s2k</KEYWORD2>
- <KEYWORD2>microtime</KEYWORD2>
- <KEYWORD2>mime_content_type</KEYWORD2>
- <KEYWORD2>mimetype</KEYWORD2> <!-- hw_api_content -->
- <KEYWORD2>min</KEYWORD2>
- <KEYWORD2>ming_setcubicthreshold</KEYWORD2>
- <KEYWORD2>ming_setscale</KEYWORD2>
- <KEYWORD2>ming_useswfversion</KEYWORD2>
- <KEYWORD2>mkdir</KEYWORD2>
- <KEYWORD2>mktime</KEYWORD2>
- <KEYWORD2>money_format</KEYWORD2>
- <KEYWORD2>move</KEYWORD2> <!-- hw_api, swfdisplayitem -->
- <KEYWORD2>move_uploaded_file</KEYWORD2>
- <KEYWORD2>movepen</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>movepento</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>moveto</KEYWORD2> <!-- swfdisplayitem, swffill, swftext -->
- <KEYWORD2>msession_connect</KEYWORD2>
- <KEYWORD2>msession_count</KEYWORD2>
- <KEYWORD2>msession_create</KEYWORD2>
- <KEYWORD2>msession_destroy</KEYWORD2>
- <KEYWORD2>msession_disconnect</KEYWORD2>
- <KEYWORD2>msession_find</KEYWORD2>
- <KEYWORD2>msession_get</KEYWORD2>
- <KEYWORD2>msession_get_array</KEYWORD2>
- <KEYWORD2>msession_get_data</KEYWORD2>
- <KEYWORD2>msession_inc</KEYWORD2>
- <KEYWORD2>msession_list</KEYWORD2>
- <KEYWORD2>msession_listvar</KEYWORD2>
- <KEYWORD2>msession_lock</KEYWORD2>
- <KEYWORD2>msession_plugin</KEYWORD2>
- <KEYWORD2>msession_randstr</KEYWORD2>
- <KEYWORD2>msession_set</KEYWORD2>
- <KEYWORD2>msession_set_array</KEYWORD2>
- <KEYWORD2>msession_set_data</KEYWORD2>
- <KEYWORD2>msession_timeout</KEYWORD2>
- <KEYWORD2>msession_uniq</KEYWORD2>
- <KEYWORD2>msession_unlock</KEYWORD2>
- <KEYWORD2>msg_get_queue</KEYWORD2>
- <KEYWORD2>msg_receive</KEYWORD2>
- <KEYWORD2>msg_remove_queue</KEYWORD2>
- <KEYWORD2>msg_send</KEYWORD2>
- <KEYWORD2>msg_set_queue</KEYWORD2>
- <KEYWORD2>msg_stat_queue</KEYWORD2>
- <KEYWORD2>msql</KEYWORD2>
- <KEYWORD2>msql_affected_rows</KEYWORD2>
- <KEYWORD2>msql_close</KEYWORD2>
- <KEYWORD2>msql_connect</KEYWORD2>
- <KEYWORD2>msql_create_db</KEYWORD2>
- <KEYWORD2>msql_createdb</KEYWORD2>
- <KEYWORD2>msql_data_seek</KEYWORD2>
- <KEYWORD2>msql_db_query</KEYWORD2>
- <KEYWORD2>msql_dbname</KEYWORD2>
- <KEYWORD2>msql_drop_db</KEYWORD2>
- <KEYWORD2>msql_error</KEYWORD2>
- <KEYWORD2>msql_fetch_array</KEYWORD2>
- <KEYWORD2>msql_fetch_field</KEYWORD2>
- <KEYWORD2>msql_fetch_object</KEYWORD2>
- <KEYWORD2>msql_fetch_row</KEYWORD2>
- <KEYWORD2>msql_field_flags</KEYWORD2>
- <KEYWORD2>msql_field_len</KEYWORD2>
- <KEYWORD2>msql_field_name</KEYWORD2>
- <KEYWORD2>msql_field_seek</KEYWORD2>
- <KEYWORD2>msql_field_table</KEYWORD2>
- <KEYWORD2>msql_field_type</KEYWORD2>
- <KEYWORD2>msql_fieldflags</KEYWORD2>
- <KEYWORD2>msql_fieldlen</KEYWORD2>
- <KEYWORD2>msql_fieldname</KEYWORD2>
- <KEYWORD2>msql_fieldtable</KEYWORD2>
- <KEYWORD2>msql_fieldtype</KEYWORD2>
- <KEYWORD2>msql_free_result</KEYWORD2>
- <KEYWORD2>msql_list_dbs</KEYWORD2>
- <KEYWORD2>msql_list_fields</KEYWORD2>
- <KEYWORD2>msql_list_tables</KEYWORD2>
- <KEYWORD2>msql_num_fields</KEYWORD2>
- <KEYWORD2>msql_num_rows</KEYWORD2>
- <KEYWORD2>msql_numfields</KEYWORD2>
- <KEYWORD2>msql_numrows</KEYWORD2>
- <KEYWORD2>msql_pconnect</KEYWORD2>
- <KEYWORD2>msql_query</KEYWORD2>
- <KEYWORD2>msql_regcase</KEYWORD2>
- <KEYWORD2>msql_result</KEYWORD2>
- <KEYWORD2>msql_select_db</KEYWORD2>
- <KEYWORD2>msql_tablename</KEYWORD2>
- <KEYWORD2>mssql_bind</KEYWORD2>
- <KEYWORD2>mssql_close</KEYWORD2>
- <KEYWORD2>mssql_connect</KEYWORD2>
- <KEYWORD2>mssql_data_seek</KEYWORD2>
- <KEYWORD2>mssql_execute</KEYWORD2>
- <KEYWORD2>mssql_fetch_array</KEYWORD2>
- <KEYWORD2>mssql_fetch_assoc</KEYWORD2>
- <KEYWORD2>mssql_fetch_batch</KEYWORD2>
- <KEYWORD2>mssql_fetch_field</KEYWORD2>
- <KEYWORD2>mssql_fetch_object</KEYWORD2>
- <KEYWORD2>mssql_fetch_row</KEYWORD2>
- <KEYWORD2>mssql_field_length</KEYWORD2>
- <KEYWORD2>mssql_field_name</KEYWORD2>
- <KEYWORD2>mssql_field_seek</KEYWORD2>
- <KEYWORD2>mssql_field_type</KEYWORD2>
- <KEYWORD2>mssql_free_result</KEYWORD2>
- <KEYWORD2>mssql_free_statement</KEYWORD2>
- <KEYWORD2>mssql_get_last_message</KEYWORD2>
- <KEYWORD2>mssql_guid_string</KEYWORD2>
- <KEYWORD2>mssql_init</KEYWORD2>
- <KEYWORD2>mssql_min_error_severity</KEYWORD2>
- <KEYWORD2>mssql_min_message_severity</KEYWORD2>
- <KEYWORD2>mssql_next_result</KEYWORD2>
- <KEYWORD2>mssql_num_fields</KEYWORD2>
- <KEYWORD2>mssql_num_rows</KEYWORD2>
- <KEYWORD2>mssql_pconnect</KEYWORD2>
- <KEYWORD2>mssql_query</KEYWORD2>
- <KEYWORD2>mssql_result</KEYWORD2>
- <KEYWORD2>mssql_rows_affected</KEYWORD2>
- <KEYWORD2>mssql_select_db</KEYWORD2>
- <KEYWORD2>mt_getrandmax</KEYWORD2>
- <KEYWORD2>mt_rand</KEYWORD2>
- <KEYWORD2>mt_srand</KEYWORD2>
- <KEYWORD2>multcolor</KEYWORD2> <!-- swfdisplayitem -->
- <KEYWORD2>muscat_close</KEYWORD2>
- <KEYWORD2>muscat_get</KEYWORD2>
- <KEYWORD2>muscat_give</KEYWORD2>
- <KEYWORD2>muscat_setup</KEYWORD2>
- <KEYWORD2>muscat_setup_net</KEYWORD2>
- <KEYWORD2>mysql_affected_rows</KEYWORD2>
- <KEYWORD2>mysql_change_user</KEYWORD2>
- <KEYWORD2>mysql_client_encoding</KEYWORD2>
- <KEYWORD2>mysql_close</KEYWORD2>
- <KEYWORD2>mysql_connect</KEYWORD2>
- <KEYWORD2>mysql_create_db</KEYWORD2>
- <KEYWORD2>mysql_data_seek</KEYWORD2>
- <KEYWORD2>mysql_db_name</KEYWORD2>
- <KEYWORD2>mysql_db_query</KEYWORD2>
- <KEYWORD2>mysql_drop_db</KEYWORD2>
- <KEYWORD2>mysql_errno</KEYWORD2>
- <KEYWORD2>mysql_error</KEYWORD2>
- <KEYWORD2>mysql_escape_string</KEYWORD2>
- <KEYWORD2>mysql_fetch_array</KEYWORD2>
- <KEYWORD2>mysql_fetch_assoc</KEYWORD2>
- <KEYWORD2>mysql_fetch_field</KEYWORD2>
- <KEYWORD2>mysql_fetch_lengths</KEYWORD2>
- <KEYWORD2>mysql_fetch_object</KEYWORD2>
- <KEYWORD2>mysql_fetch_row</KEYWORD2>
- <KEYWORD2>mysql_field_flags</KEYWORD2>
- <KEYWORD2>mysql_field_len</KEYWORD2>
- <KEYWORD2>mysql_field_name</KEYWORD2>
- <KEYWORD2>mysql_field_seek</KEYWORD2>
- <KEYWORD2>mysql_field_table</KEYWORD2>
- <KEYWORD2>mysql_field_type</KEYWORD2>
- <KEYWORD2>mysql_free_result</KEYWORD2>
- <KEYWORD2>mysql_get_client_info</KEYWORD2>
- <KEYWORD2>mysql_get_host_info</KEYWORD2>
- <KEYWORD2>mysql_get_proto_info</KEYWORD2>
- <KEYWORD2>mysql_get_server_info</KEYWORD2>
- <KEYWORD2>mysql_info</KEYWORD2>
- <KEYWORD2>mysql_insert_id</KEYWORD2>
- <KEYWORD2>mysql_list_dbs</KEYWORD2>
- <KEYWORD2>mysql_list_fields</KEYWORD2>
- <KEYWORD2>mysql_list_processes</KEYWORD2>
- <KEYWORD2>mysql_list_tables</KEYWORD2>
- <KEYWORD2>mysql_num_fields</KEYWORD2>
- <KEYWORD2>mysql_num_rows</KEYWORD2>
- <KEYWORD2>mysql_pconnect</KEYWORD2>
- <KEYWORD2>mysql_ping</KEYWORD2>
- <KEYWORD2>mysql_query</KEYWORD2>
- <KEYWORD2>mysql_real_escape_string</KEYWORD2>
- <KEYWORD2>mysql_result</KEYWORD2>
- <KEYWORD2>mysql_select_db</KEYWORD2>
- <KEYWORD2>mysql_stat</KEYWORD2>
- <KEYWORD2>mysql_tablename</KEYWORD2>
- <KEYWORD2>mysql_thread_id</KEYWORD2>
- <KEYWORD2>mysql_unbuffered_query</KEYWORD2>
- <KEYWORD2>mysqli_affected_rows</KEYWORD2>
- <KEYWORD2>mysqli_autocommit</KEYWORD2>
- <KEYWORD2>mysqli_bind_param</KEYWORD2>
- <KEYWORD2>mysqli_bind_result</KEYWORD2>
- <KEYWORD2>mysqli_change_user</KEYWORD2>
- <KEYWORD2>mysqli_character_set_name</KEYWORD2>
- <KEYWORD2>mysqli_client_encoding</KEYWORD2>
- <KEYWORD2>mysqli_close</KEYWORD2>
- <KEYWORD2>mysqli_commit</KEYWORD2>
- <KEYWORD2>mysqli_connect</KEYWORD2>
- <KEYWORD2>mysqli_connect_errno</KEYWORD2>
- <KEYWORD2>mysqli_connect_error</KEYWORD2>
- <KEYWORD2>mysqli_data_seek</KEYWORD2>
- <KEYWORD2>mysqli_debug</KEYWORD2>
- <KEYWORD2>mysqli_disable_reads_from_master</KEYWORD2>
- <KEYWORD2>mysqli_disable_rpl_parse</KEYWORD2>
- <KEYWORD2>mysqli_dump_debug_info</KEYWORD2>
- <KEYWORD2>mysqli_embedded_connect</KEYWORD2>
- <KEYWORD2>mysqli_enable_reads_from_master</KEYWORD2>
- <KEYWORD2>mysqli_enable_rpl_parse</KEYWORD2>
- <KEYWORD2>mysqli_errno</KEYWORD2>
- <KEYWORD2>mysqli_error</KEYWORD2>
- <KEYWORD2>mysqli_escape_string</KEYWORD2>
- <KEYWORD2>mysqli_execute</KEYWORD2>
- <KEYWORD2>mysqli_fetch</KEYWORD2>
- <KEYWORD2>mysqli_fetch_array</KEYWORD2>
- <KEYWORD2>mysqli_fetch_assoc</KEYWORD2>
- <KEYWORD2>mysqli_fetch_field</KEYWORD2>
- <KEYWORD2>mysqli_fetch_field_direct</KEYWORD2>
- <KEYWORD2>mysqli_fetch_fields</KEYWORD2>
- <KEYWORD2>mysqli_fetch_lengths</KEYWORD2>
- <KEYWORD2>mysqli_fetch_object</KEYWORD2>
- <KEYWORD2>mysqli_fetch_row</KEYWORD2>
- <KEYWORD2>mysqli_field_count</KEYWORD2>
- <KEYWORD2>mysqli_field_seek</KEYWORD2>
- <KEYWORD2>mysqli_field_tell</KEYWORD2>
- <KEYWORD2>mysqli_free_result</KEYWORD2>
- <KEYWORD2>mysqli_get_client_info</KEYWORD2>
- <KEYWORD2>mysqli_get_client_version</KEYWORD2>
- <KEYWORD2>mysqli_get_host_info</KEYWORD2>
- <KEYWORD2>mysqli_get_metadata</KEYWORD2>
- <KEYWORD2>mysqli_get_proto_info</KEYWORD2>
- <KEYWORD2>mysqli_get_server_info</KEYWORD2>
- <KEYWORD2>mysqli_get_server_version</KEYWORD2>
- <KEYWORD2>mysqli_info</KEYWORD2>
- <KEYWORD2>mysqli_init</KEYWORD2>
- <KEYWORD2>mysqli_insert_id</KEYWORD2>
- <KEYWORD2>mysqli_kill</KEYWORD2>
- <KEYWORD2>mysqli_master_query</KEYWORD2>
- <KEYWORD2>mysqli_more_results</KEYWORD2>
- <KEYWORD2>mysqli_multi_query</KEYWORD2>
- <KEYWORD2>mysqli_next_result</KEYWORD2>
- <KEYWORD2>mysqli_num_fields</KEYWORD2>
- <KEYWORD2>mysqli_num_rows</KEYWORD2>
- <KEYWORD2>mysqli_options</KEYWORD2>
- <KEYWORD2>mysqli_param_count</KEYWORD2>
- <KEYWORD2>mysqli_ping</KEYWORD2>
- <KEYWORD2>mysqli_prepare</KEYWORD2>
- <KEYWORD2>mysqli_query</KEYWORD2>
- <KEYWORD2>mysqli_real_connect</KEYWORD2>
- <KEYWORD2>mysqli_real_escape_string</KEYWORD2>
- <KEYWORD2>mysqli_real_query</KEYWORD2>
- <KEYWORD2>mysqli_report</KEYWORD2>
- <KEYWORD2>mysqli_rollback</KEYWORD2>
- <KEYWORD2>mysqli_rpl_parse_enabled</KEYWORD2>
- <KEYWORD2>mysqli_rpl_probe</KEYWORD2>
- <KEYWORD2>mysqli_rpl_query_type</KEYWORD2>
- <KEYWORD2>mysqli_select_db</KEYWORD2>
- <KEYWORD2>mysqli_send_long_data</KEYWORD2>
- <KEYWORD2>mysqli_send_query</KEYWORD2>
- <KEYWORD2>mysqli_server_end</KEYWORD2>
- <KEYWORD2>mysqli_server_init</KEYWORD2>
- <KEYWORD2>mysqli_set_opt</KEYWORD2>
- <KEYWORD2>mysqli_sqlstate</KEYWORD2>
- <KEYWORD2>mysqli_ssl_set</KEYWORD2>
- <KEYWORD2>mysqli_stat</KEYWORD2>
- <KEYWORD2>mysqli_stmt_affected_rows</KEYWORD2>
- <KEYWORD2>mysqli_stmt_bind_param</KEYWORD2>
- <KEYWORD2>mysqli_stmt_bind_result</KEYWORD2>
- <KEYWORD2>mysqli_stmt_close</KEYWORD2>
- <KEYWORD2>mysqli_stmt_data_seek</KEYWORD2>
- <KEYWORD2>mysqli_stmt_errno</KEYWORD2>
- <KEYWORD2>mysqli_stmt_error</KEYWORD2>
- <KEYWORD2>mysqli_stmt_execute</KEYWORD2>
- <KEYWORD2>mysqli_stmt_fetch</KEYWORD2>
- <KEYWORD2>mysqli_stmt_free_result</KEYWORD2>
- <KEYWORD2>mysqli_stmt_init</KEYWORD2>
- <KEYWORD2>mysqli_stmt_num_rows</KEYWORD2>
- <KEYWORD2>mysqli_stmt_param_count</KEYWORD2>
- <KEYWORD2>mysqli_stmt_prepare</KEYWORD2>
- <KEYWORD2>mysqli_stmt_reset</KEYWORD2>
- <KEYWORD2>mysqli_stmt_result_metadata</KEYWORD2>
- <KEYWORD2>mysqli_stmt_send_long_data</KEYWORD2>
- <KEYWORD2>mysqli_stmt_sqlstate</KEYWORD2>
- <KEYWORD2>mysqli_stmt_store_result</KEYWORD2>
- <KEYWORD2>mysqli_store_result</KEYWORD2>
- <KEYWORD2>mysqli_thread_id</KEYWORD2>
- <KEYWORD2>mysqli_thread_safe</KEYWORD2>
- <KEYWORD2>mysqli_use_result</KEYWORD2>
- <KEYWORD2>mysqli_warning_count</KEYWORD2>
- <KEYWORD2>name</KEYWORD2> <!-- domattribute, domdocumenttype -->
- <KEYWORD2>natcasesort</KEYWORD2>
- <KEYWORD2>natsort</KEYWORD2>
- <KEYWORD2>ncurses_addch</KEYWORD2>
- <KEYWORD2>ncurses_addchnstr</KEYWORD2>
- <KEYWORD2>ncurses_addchstr</KEYWORD2>
- <KEYWORD2>ncurses_addnstr</KEYWORD2>
- <KEYWORD2>ncurses_addstr</KEYWORD2>
- <KEYWORD2>ncurses_assume_default_colors</KEYWORD2>
- <KEYWORD2>ncurses_attroff</KEYWORD2>
- <KEYWORD2>ncurses_attron</KEYWORD2>
- <KEYWORD2>ncurses_attrset</KEYWORD2>
- <KEYWORD2>ncurses_baudrate</KEYWORD2>
- <KEYWORD2>ncurses_beep</KEYWORD2>
- <KEYWORD2>ncurses_bkgd</KEYWORD2>
- <KEYWORD2>ncurses_bkgdset</KEYWORD2>
- <KEYWORD2>ncurses_border</KEYWORD2>
- <KEYWORD2>ncurses_bottom_panel</KEYWORD2>
- <KEYWORD2>ncurses_can_change_color</KEYWORD2>
- <KEYWORD2>ncurses_cbreak</KEYWORD2>
- <KEYWORD2>ncurses_clear</KEYWORD2>
- <KEYWORD2>ncurses_clrtobot</KEYWORD2>
- <KEYWORD2>ncurses_clrtoeol</KEYWORD2>
- <KEYWORD2>ncurses_color_content</KEYWORD2>
- <KEYWORD2>ncurses_color_set</KEYWORD2>
- <KEYWORD2>ncurses_curs_set</KEYWORD2>
- <KEYWORD2>ncurses_def_prog_mode</KEYWORD2>
- <KEYWORD2>ncurses_def_shell_mode</KEYWORD2>
- <KEYWORD2>ncurses_define_key</KEYWORD2>
- <KEYWORD2>ncurses_del_panel</KEYWORD2>
- <KEYWORD2>ncurses_delay_output</KEYWORD2>
- <KEYWORD2>ncurses_delch</KEYWORD2>
- <KEYWORD2>ncurses_deleteln</KEYWORD2>
- <KEYWORD2>ncurses_delwin</KEYWORD2>
- <KEYWORD2>ncurses_doupdate</KEYWORD2>
- <KEYWORD2>ncurses_echo</KEYWORD2>
- <KEYWORD2>ncurses_echochar</KEYWORD2>
- <KEYWORD2>ncurses_end</KEYWORD2>
- <KEYWORD2>ncurses_erase</KEYWORD2>
- <KEYWORD2>ncurses_erasechar</KEYWORD2>
- <KEYWORD2>ncurses_filter</KEYWORD2>
- <KEYWORD2>ncurses_flash</KEYWORD2>
- <KEYWORD2>ncurses_flushinp</KEYWORD2>
- <KEYWORD2>ncurses_getch</KEYWORD2>
- <KEYWORD2>ncurses_getmaxyx</KEYWORD2>
- <KEYWORD2>ncurses_getmouse</KEYWORD2>
- <KEYWORD2>ncurses_getyx</KEYWORD2>
- <KEYWORD2>ncurses_halfdelay</KEYWORD2>
- <KEYWORD2>ncurses_has_colors</KEYWORD2>
- <KEYWORD2>ncurses_has_ic</KEYWORD2>
- <KEYWORD2>ncurses_has_il</KEYWORD2>
- <KEYWORD2>ncurses_has_key</KEYWORD2>
- <KEYWORD2>ncurses_hide_panel</KEYWORD2>
- <KEYWORD2>ncurses_hline</KEYWORD2>
- <KEYWORD2>ncurses_inch</KEYWORD2>
- <KEYWORD2>ncurses_init</KEYWORD2>
- <KEYWORD2>ncurses_init_color</KEYWORD2>
- <KEYWORD2>ncurses_init_pair</KEYWORD2>
- <KEYWORD2>ncurses_insch</KEYWORD2>
- <KEYWORD2>ncurses_insdelln</KEYWORD2>
- <KEYWORD2>ncurses_insertln</KEYWORD2>
- <KEYWORD2>ncurses_insstr</KEYWORD2>
- <KEYWORD2>ncurses_instr</KEYWORD2>
- <KEYWORD2>ncurses_isendwin</KEYWORD2>
- <KEYWORD2>ncurses_keyok</KEYWORD2>
- <KEYWORD2>ncurses_keypad</KEYWORD2>
- <KEYWORD2>ncurses_killchar</KEYWORD2>
- <KEYWORD2>ncurses_longname</KEYWORD2>
- <KEYWORD2>ncurses_meta</KEYWORD2>
- <KEYWORD2>ncurses_mouse_trafo</KEYWORD2>
- <KEYWORD2>ncurses_mouseinterval</KEYWORD2>
- <KEYWORD2>ncurses_mousemask</KEYWORD2>
- <KEYWORD2>ncurses_move</KEYWORD2>
- <KEYWORD2>ncurses_move_panel</KEYWORD2>
- <KEYWORD2>ncurses_mvaddch</KEYWORD2>
- <KEYWORD2>ncurses_mvaddchnstr</KEYWORD2>
- <KEYWORD2>ncurses_mvaddchstr</KEYWORD2>
- <KEYWORD2>ncurses_mvaddnstr</KEYWORD2>
- <KEYWORD2>ncurses_mvaddstr</KEYWORD2>
- <KEYWORD2>ncurses_mvcur</KEYWORD2>
- <KEYWORD2>ncurses_mvdelch</KEYWORD2>
- <KEYWORD2>ncurses_mvgetch</KEYWORD2>
- <KEYWORD2>ncurses_mvhline</KEYWORD2>
- <KEYWORD2>ncurses_mvinch</KEYWORD2>
- <KEYWORD2>ncurses_mvvline</KEYWORD2>
- <KEYWORD2>ncurses_mvwaddstr</KEYWORD2>
- <KEYWORD2>ncurses_napms</KEYWORD2>
- <KEYWORD2>ncurses_new_panel</KEYWORD2>
- <KEYWORD2>ncurses_newpad</KEYWORD2>
- <KEYWORD2>ncurses_newwin</KEYWORD2>
- <KEYWORD2>ncurses_nl</KEYWORD2>
- <KEYWORD2>ncurses_nocbreak</KEYWORD2>
- <KEYWORD2>ncurses_noecho</KEYWORD2>
- <KEYWORD2>ncurses_nonl</KEYWORD2>
- <KEYWORD2>ncurses_noqiflush</KEYWORD2>
- <KEYWORD2>ncurses_noraw</KEYWORD2>
- <KEYWORD2>ncurses_pair_content</KEYWORD2>
- <KEYWORD2>ncurses_panel_above</KEYWORD2>
- <KEYWORD2>ncurses_panel_below</KEYWORD2>
- <KEYWORD2>ncurses_panel_window</KEYWORD2>
- <KEYWORD2>ncurses_pnoutrefresh</KEYWORD2>
- <KEYWORD2>ncurses_prefresh</KEYWORD2>
- <KEYWORD2>ncurses_putp</KEYWORD2>
- <KEYWORD2>ncurses_qiflush</KEYWORD2>
- <KEYWORD2>ncurses_raw</KEYWORD2>
- <KEYWORD2>ncurses_refresh</KEYWORD2>
- <KEYWORD2>ncurses_replace_panel</KEYWORD2>
- <KEYWORD2>ncurses_reset_prog_mode</KEYWORD2>
- <KEYWORD2>ncurses_reset_shell_mode</KEYWORD2>
- <KEYWORD2>ncurses_resetty</KEYWORD2>
- <KEYWORD2>ncurses_savetty</KEYWORD2>
- <KEYWORD2>ncurses_scr_dump</KEYWORD2>
- <KEYWORD2>ncurses_scr_init</KEYWORD2>
- <KEYWORD2>ncurses_scr_restore</KEYWORD2>
- <KEYWORD2>ncurses_scr_set</KEYWORD2>
- <KEYWORD2>ncurses_scrl</KEYWORD2>
- <KEYWORD2>ncurses_show_panel</KEYWORD2>
- <KEYWORD2>ncurses_slk_attr</KEYWORD2>
- <KEYWORD2>ncurses_slk_attroff</KEYWORD2>
- <KEYWORD2>ncurses_slk_attron</KEYWORD2>
- <KEYWORD2>ncurses_slk_attrset</KEYWORD2>
- <KEYWORD2>ncurses_slk_clear</KEYWORD2>
- <KEYWORD2>ncurses_slk_color</KEYWORD2>
- <KEYWORD2>ncurses_slk_init</KEYWORD2>
- <KEYWORD2>ncurses_slk_noutrefresh</KEYWORD2>
- <KEYWORD2>ncurses_slk_refresh</KEYWORD2>
- <KEYWORD2>ncurses_slk_restore</KEYWORD2>
- <KEYWORD2>ncurses_slk_set</KEYWORD2>
- <KEYWORD2>ncurses_slk_touch</KEYWORD2>
- <KEYWORD2>ncurses_standend</KEYWORD2>
- <KEYWORD2>ncurses_standout</KEYWORD2>
- <KEYWORD2>ncurses_start_color</KEYWORD2>
- <KEYWORD2>ncurses_termattrs</KEYWORD2>
- <KEYWORD2>ncurses_termname</KEYWORD2>
- <KEYWORD2>ncurses_timeout</KEYWORD2>
- <KEYWORD2>ncurses_top_panel</KEYWORD2>
- <KEYWORD2>ncurses_typeahead</KEYWORD2>
- <KEYWORD2>ncurses_ungetch</KEYWORD2>
- <KEYWORD2>ncurses_ungetmouse</KEYWORD2>
- <KEYWORD2>ncurses_update_panels</KEYWORD2>
- <KEYWORD2>ncurses_use_default_colors</KEYWORD2>
- <KEYWORD2>ncurses_use_env</KEYWORD2>
- <KEYWORD2>ncurses_use_extended_names</KEYWORD2>
- <KEYWORD2>ncurses_vidattr</KEYWORD2>
- <KEYWORD2>ncurses_vline</KEYWORD2>
- <KEYWORD2>ncurses_waddch</KEYWORD2>
- <KEYWORD2>ncurses_waddstr</KEYWORD2>
- <KEYWORD2>ncurses_wattroff</KEYWORD2>
- <KEYWORD2>ncurses_wattron</KEYWORD2>
- <KEYWORD2>ncurses_wattrset</KEYWORD2>
- <KEYWORD2>ncurses_wborder</KEYWORD2>
- <KEYWORD2>ncurses_wclear</KEYWORD2>
- <KEYWORD2>ncurses_wcolor_set</KEYWORD2>
- <KEYWORD2>ncurses_werase</KEYWORD2>
- <KEYWORD2>ncurses_wgetch</KEYWORD2>
- <KEYWORD2>ncurses_whline</KEYWORD2>
- <KEYWORD2>ncurses_wmouse_trafo</KEYWORD2>
- <KEYWORD2>ncurses_wmove</KEYWORD2>
- <KEYWORD2>ncurses_wnoutrefresh</KEYWORD2>
- <KEYWORD2>ncurses_wrefresh</KEYWORD2>
- <KEYWORD2>ncurses_wstandend</KEYWORD2>
- <KEYWORD2>ncurses_wstandout</KEYWORD2>
- <KEYWORD2>ncurses_wvline</KEYWORD2>
- <KEYWORD2>next</KEYWORD2> <!-- arrayiterator, cachingiterator, directoryiterator, filteriterator, limititerator, parentiterator, recursivedirectoryiterator, recursiveiteratoriterator, simplexmliterator, tidy_node -->
- <KEYWORD2>next_sibling</KEYWORD2> <!-- domnode -->
- <KEYWORD2>nextframe</KEYWORD2> <!-- swfmovie, swfsprite -->
- <KEYWORD2>ngettext</KEYWORD2>
- <KEYWORD2>nl2br</KEYWORD2>
- <KEYWORD2>nl_langinfo</KEYWORD2>
- <KEYWORD2>node_name</KEYWORD2> <!-- domnode -->
- <KEYWORD2>node_type</KEYWORD2> <!-- domnode -->
- <KEYWORD2>node_value</KEYWORD2> <!-- domnode -->
- <KEYWORD2>normalize</KEYWORD2> <!-- domdocument, domnode -->
- <KEYWORD2>notations</KEYWORD2> <!-- domdocumenttype -->
- <KEYWORD2>notes_body</KEYWORD2>
- <KEYWORD2>notes_copy_db</KEYWORD2>
- <KEYWORD2>notes_create_db</KEYWORD2>
- <KEYWORD2>notes_create_note</KEYWORD2>
- <KEYWORD2>notes_drop_db</KEYWORD2>
- <KEYWORD2>notes_find_note</KEYWORD2>
- <KEYWORD2>notes_header_info</KEYWORD2>
- <KEYWORD2>notes_list_msgs</KEYWORD2>
- <KEYWORD2>notes_mark_read</KEYWORD2>
- <KEYWORD2>notes_mark_unread</KEYWORD2>
- <KEYWORD2>notes_nav_create</KEYWORD2>
- <KEYWORD2>notes_search</KEYWORD2>
- <KEYWORD2>notes_unread</KEYWORD2>
- <KEYWORD2>notes_version</KEYWORD2>
- <KEYWORD2>nsapi_request_headers</KEYWORD2>
- <KEYWORD2>nsapi_response_headers</KEYWORD2>
- <KEYWORD2>nsapi_virtual</KEYWORD2>
- <KEYWORD2>number_format</KEYWORD2>
- <KEYWORD2>ob_clean</KEYWORD2>
- <KEYWORD2>ob_end_clean</KEYWORD2>
- <KEYWORD2>ob_end_flush</KEYWORD2>
- <KEYWORD2>ob_flush</KEYWORD2>
- <KEYWORD2>ob_get_clean</KEYWORD2>
- <KEYWORD2>ob_get_contents</KEYWORD2>
- <KEYWORD2>ob_get_flush</KEYWORD2>
- <KEYWORD2>ob_get_length</KEYWORD2>
- <KEYWORD2>ob_get_level</KEYWORD2>
- <KEYWORD2>ob_get_status</KEYWORD2>
- <KEYWORD2>ob_gzhandler</KEYWORD2>
- <KEYWORD2>ob_iconv_handler</KEYWORD2>
- <KEYWORD2>ob_implicit_flush</KEYWORD2>
- <KEYWORD2>ob_list_handlers</KEYWORD2>
- <KEYWORD2>ob_start</KEYWORD2>
- <KEYWORD2>ob_tidyhandler</KEYWORD2>
- <KEYWORD2>object</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>objectbyanchor</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>oci_bind_by_name</KEYWORD2>
- <KEYWORD2>oci_cancel</KEYWORD2>
- <KEYWORD2>oci_close</KEYWORD2>
- <KEYWORD2>oci_commit</KEYWORD2>
- <KEYWORD2>oci_connect</KEYWORD2>
- <KEYWORD2>oci_define_by_name</KEYWORD2>
- <KEYWORD2>oci_error</KEYWORD2>
- <KEYWORD2>oci_execute</KEYWORD2>
- <KEYWORD2>oci_fetch</KEYWORD2>
- <KEYWORD2>oci_fetch_all</KEYWORD2>
- <KEYWORD2>oci_fetch_array</KEYWORD2>
- <KEYWORD2>oci_fetch_assoc</KEYWORD2>
- <KEYWORD2>oci_fetch_object</KEYWORD2>
- <KEYWORD2>oci_fetch_row</KEYWORD2>
- <KEYWORD2>oci_field_is_null</KEYWORD2>
- <KEYWORD2>oci_field_name</KEYWORD2>
- <KEYWORD2>oci_field_precision</KEYWORD2>
- <KEYWORD2>oci_field_scale</KEYWORD2>
- <KEYWORD2>oci_field_size</KEYWORD2>
- <KEYWORD2>oci_field_type</KEYWORD2>
- <KEYWORD2>oci_field_type_raw</KEYWORD2>
- <KEYWORD2>oci_free_statement</KEYWORD2>
- <KEYWORD2>oci_internal_debug</KEYWORD2>
- <KEYWORD2>oci_lob_copy</KEYWORD2>
- <KEYWORD2>oci_lob_is_equal</KEYWORD2>
- <KEYWORD2>oci_new_collection</KEYWORD2>
- <KEYWORD2>oci_new_connect</KEYWORD2>
- <KEYWORD2>oci_new_cursor</KEYWORD2>
- <KEYWORD2>oci_new_descriptor</KEYWORD2>
- <KEYWORD2>oci_num_fields</KEYWORD2>
- <KEYWORD2>oci_num_rows</KEYWORD2>
- <KEYWORD2>oci_parse</KEYWORD2>
- <KEYWORD2>oci_password_change</KEYWORD2>
- <KEYWORD2>oci_pconnect</KEYWORD2>
- <KEYWORD2>oci_result</KEYWORD2>
- <KEYWORD2>oci_rollback</KEYWORD2>
- <KEYWORD2>oci_server_version</KEYWORD2>
- <KEYWORD2>oci_set_prefetch</KEYWORD2>
- <KEYWORD2>oci_statement_type</KEYWORD2>
- <KEYWORD2>ocibindbyname</KEYWORD2>
- <KEYWORD2>ocicancel</KEYWORD2>
- <KEYWORD2>ocicloselob</KEYWORD2>
- <KEYWORD2>ocicollappend</KEYWORD2>
- <KEYWORD2>ocicollassign</KEYWORD2>
- <KEYWORD2>ocicollassignelem</KEYWORD2>
- <KEYWORD2>ocicollgetelem</KEYWORD2>
- <KEYWORD2>ocicollmax</KEYWORD2>
- <KEYWORD2>ocicollsize</KEYWORD2>
- <KEYWORD2>ocicolltrim</KEYWORD2>
- <KEYWORD2>ocicolumnisnull</KEYWORD2>
- <KEYWORD2>ocicolumnname</KEYWORD2>
- <KEYWORD2>ocicolumnprecision</KEYWORD2>
- <KEYWORD2>ocicolumnscale</KEYWORD2>
- <KEYWORD2>ocicolumnsize</KEYWORD2>
- <KEYWORD2>ocicolumntype</KEYWORD2>
- <KEYWORD2>ocicolumntyperaw</KEYWORD2>
- <KEYWORD2>ocicommit</KEYWORD2>
- <KEYWORD2>ocidefinebyname</KEYWORD2>
- <KEYWORD2>ocierror</KEYWORD2>
- <KEYWORD2>ociexecute</KEYWORD2>
- <KEYWORD2>ocifetch</KEYWORD2>
- <KEYWORD2>ocifetchinto</KEYWORD2>
- <KEYWORD2>ocifetchstatement</KEYWORD2>
- <KEYWORD2>ocifreecollection</KEYWORD2>
- <KEYWORD2>ocifreecursor</KEYWORD2>
- <KEYWORD2>ocifreedesc</KEYWORD2>
- <KEYWORD2>ocifreestatement</KEYWORD2>
- <KEYWORD2>ociinternaldebug</KEYWORD2>
- <KEYWORD2>ociloadlob</KEYWORD2>
- <KEYWORD2>ocilogoff</KEYWORD2>
- <KEYWORD2>ocilogon</KEYWORD2>
- <KEYWORD2>ocinewcollection</KEYWORD2>
- <KEYWORD2>ocinewcursor</KEYWORD2>
- <KEYWORD2>ocinewdescriptor</KEYWORD2>
- <KEYWORD2>ocinlogon</KEYWORD2>
- <KEYWORD2>ocinumcols</KEYWORD2>
- <KEYWORD2>ociparse</KEYWORD2>
- <KEYWORD2>ociplogon</KEYWORD2>
- <KEYWORD2>ociresult</KEYWORD2>
- <KEYWORD2>ocirollback</KEYWORD2>
- <KEYWORD2>ocirowcount</KEYWORD2>
- <KEYWORD2>ocisavelob</KEYWORD2>
- <KEYWORD2>ocisavelobfile</KEYWORD2>
- <KEYWORD2>ociserverversion</KEYWORD2>
- <KEYWORD2>ocisetprefetch</KEYWORD2>
- <KEYWORD2>ocistatementtype</KEYWORD2>
- <KEYWORD2>ociwritelobtofile</KEYWORD2>
- <KEYWORD2>ociwritetemporarylob</KEYWORD2>
- <KEYWORD2>octdec</KEYWORD2>
- <KEYWORD2>odbc_autocommit</KEYWORD2>
- <KEYWORD2>odbc_binmode</KEYWORD2>
- <KEYWORD2>odbc_close</KEYWORD2>
- <KEYWORD2>odbc_close_all</KEYWORD2>
- <KEYWORD2>odbc_columnprivileges</KEYWORD2>
- <KEYWORD2>odbc_columns</KEYWORD2>
- <KEYWORD2>odbc_commit</KEYWORD2>
- <KEYWORD2>odbc_connect</KEYWORD2>
- <KEYWORD2>odbc_cursor</KEYWORD2>
- <KEYWORD2>odbc_data_source</KEYWORD2>
- <KEYWORD2>odbc_do</KEYWORD2>
- <KEYWORD2>odbc_error</KEYWORD2>
- <KEYWORD2>odbc_errormsg</KEYWORD2>
- <KEYWORD2>odbc_exec</KEYWORD2>
- <KEYWORD2>odbc_execute</KEYWORD2>
- <KEYWORD2>odbc_fetch_array</KEYWORD2>
- <KEYWORD2>odbc_fetch_into</KEYWORD2>
- <KEYWORD2>odbc_fetch_object</KEYWORD2>
- <KEYWORD2>odbc_fetch_row</KEYWORD2>
- <KEYWORD2>odbc_field_len</KEYWORD2>
- <KEYWORD2>odbc_field_name</KEYWORD2>
- <KEYWORD2>odbc_field_num</KEYWORD2>
- <KEYWORD2>odbc_field_precision</KEYWORD2>
- <KEYWORD2>odbc_field_scale</KEYWORD2>
- <KEYWORD2>odbc_field_type</KEYWORD2>
- <KEYWORD2>odbc_foreignkeys</KEYWORD2>
- <KEYWORD2>odbc_free_result</KEYWORD2>
- <KEYWORD2>odbc_gettypeinfo</KEYWORD2>
- <KEYWORD2>odbc_longreadlen</KEYWORD2>
- <KEYWORD2>odbc_next_result</KEYWORD2>
- <KEYWORD2>odbc_num_fields</KEYWORD2>
- <KEYWORD2>odbc_num_rows</KEYWORD2>
- <KEYWORD2>odbc_pconnect</KEYWORD2>
- <KEYWORD2>odbc_prepare</KEYWORD2>
- <KEYWORD2>odbc_primarykeys</KEYWORD2>
- <KEYWORD2>odbc_procedurecolumns</KEYWORD2>
- <KEYWORD2>odbc_procedures</KEYWORD2>
- <KEYWORD2>odbc_result</KEYWORD2>
- <KEYWORD2>odbc_result_all</KEYWORD2>
- <KEYWORD2>odbc_rollback</KEYWORD2>
- <KEYWORD2>odbc_setoption</KEYWORD2>
- <KEYWORD2>odbc_specialcolumns</KEYWORD2>
- <KEYWORD2>odbc_statistics</KEYWORD2>
- <KEYWORD2>odbc_tableprivileges</KEYWORD2>
- <KEYWORD2>odbc_tables</KEYWORD2>
- <KEYWORD2>offsetexists</KEYWORD2> <!-- arrayobject -->
- <KEYWORD2>offsetget</KEYWORD2> <!-- arrayobject -->
- <KEYWORD2>offsetset</KEYWORD2> <!-- arrayobject -->
- <KEYWORD2>offsetunset</KEYWORD2> <!-- arrayobject -->
- <KEYWORD2>openal_buffer_create</KEYWORD2>
- <KEYWORD2>openal_buffer_data</KEYWORD2>
- <KEYWORD2>openal_buffer_destroy</KEYWORD2>
- <KEYWORD2>openal_buffer_get</KEYWORD2>
- <KEYWORD2>openal_buffer_loadwav</KEYWORD2>
- <KEYWORD2>openal_context_create</KEYWORD2>
- <KEYWORD2>openal_context_current</KEYWORD2>
- <KEYWORD2>openal_context_destroy</KEYWORD2>
- <KEYWORD2>openal_context_process</KEYWORD2>
- <KEYWORD2>openal_context_suspend</KEYWORD2>
- <KEYWORD2>openal_device_close</KEYWORD2>
- <KEYWORD2>openal_device_open</KEYWORD2>
- <KEYWORD2>openal_listener_get</KEYWORD2>
- <KEYWORD2>openal_listener_set</KEYWORD2>
- <KEYWORD2>openal_source_create</KEYWORD2>
- <KEYWORD2>openal_source_destroy</KEYWORD2>
- <KEYWORD2>openal_source_get</KEYWORD2>
- <KEYWORD2>openal_source_pause</KEYWORD2>
- <KEYWORD2>openal_source_play</KEYWORD2>
- <KEYWORD2>openal_source_rewind</KEYWORD2>
- <KEYWORD2>openal_source_set</KEYWORD2>
- <KEYWORD2>openal_source_stop</KEYWORD2>
- <KEYWORD2>openal_stream</KEYWORD2>
- <KEYWORD2>opendir</KEYWORD2>
- <KEYWORD2>openlog</KEYWORD2>
- <KEYWORD2>openssl_csr_export</KEYWORD2>
- <KEYWORD2>openssl_csr_export_to_file</KEYWORD2>
- <KEYWORD2>openssl_csr_new</KEYWORD2>
- <KEYWORD2>openssl_csr_sign</KEYWORD2>
- <KEYWORD2>openssl_error_string</KEYWORD2>
- <KEYWORD2>openssl_free_key</KEYWORD2>
- <KEYWORD2>openssl_get_privatekey</KEYWORD2>
- <KEYWORD2>openssl_get_publickey</KEYWORD2>
- <KEYWORD2>openssl_open</KEYWORD2>
- <KEYWORD2>openssl_pkcs7_decrypt</KEYWORD2>
- <KEYWORD2>openssl_pkcs7_encrypt</KEYWORD2>
- <KEYWORD2>openssl_pkcs7_sign</KEYWORD2>
- <KEYWORD2>openssl_pkcs7_verify</KEYWORD2>
- <KEYWORD2>openssl_pkey_export</KEYWORD2>
- <KEYWORD2>openssl_pkey_export_to_file</KEYWORD2>
- <KEYWORD2>openssl_pkey_get_private</KEYWORD2>
- <KEYWORD2>openssl_pkey_get_public</KEYWORD2>
- <KEYWORD2>openssl_pkey_new</KEYWORD2>
- <KEYWORD2>openssl_private_decrypt</KEYWORD2>
- <KEYWORD2>openssl_private_encrypt</KEYWORD2>
- <KEYWORD2>openssl_public_decrypt</KEYWORD2>
- <KEYWORD2>openssl_public_encrypt</KEYWORD2>
- <KEYWORD2>openssl_seal</KEYWORD2>
- <KEYWORD2>openssl_sign</KEYWORD2>
- <KEYWORD2>openssl_verify</KEYWORD2>
- <KEYWORD2>openssl_x509_check_private_key</KEYWORD2>
- <KEYWORD2>openssl_x509_checkpurpose</KEYWORD2>
- <KEYWORD2>openssl_x509_export</KEYWORD2>
- <KEYWORD2>openssl_x509_export_to_file</KEYWORD2>
- <KEYWORD2>openssl_x509_free</KEYWORD2>
- <KEYWORD2>openssl_x509_parse</KEYWORD2>
- <KEYWORD2>openssl_x509_read</KEYWORD2>
- <KEYWORD2>ora_bind</KEYWORD2>
- <KEYWORD2>ora_close</KEYWORD2>
- <KEYWORD2>ora_columnname</KEYWORD2>
- <KEYWORD2>ora_columnsize</KEYWORD2>
- <KEYWORD2>ora_columntype</KEYWORD2>
- <KEYWORD2>ora_commit</KEYWORD2>
- <KEYWORD2>ora_commitoff</KEYWORD2>
- <KEYWORD2>ora_commiton</KEYWORD2>
- <KEYWORD2>ora_do</KEYWORD2>
- <KEYWORD2>ora_error</KEYWORD2>
- <KEYWORD2>ora_errorcode</KEYWORD2>
- <KEYWORD2>ora_exec</KEYWORD2>
- <KEYWORD2>ora_fetch</KEYWORD2>
- <KEYWORD2>ora_fetch_into</KEYWORD2>
- <KEYWORD2>ora_getcolumn</KEYWORD2>
- <KEYWORD2>ora_logoff</KEYWORD2>
- <KEYWORD2>ora_logon</KEYWORD2>
- <KEYWORD2>ora_numcols</KEYWORD2>
- <KEYWORD2>ora_numrows</KEYWORD2>
- <KEYWORD2>ora_open</KEYWORD2>
- <KEYWORD2>ora_parse</KEYWORD2>
- <KEYWORD2>ora_plogon</KEYWORD2>
- <KEYWORD2>ora_rollback</KEYWORD2>
- <KEYWORD2>ord</KEYWORD2>
- <KEYWORD2>output</KEYWORD2> <!-- swfmovie -->
- <KEYWORD2>output_add_rewrite_var</KEYWORD2>
- <KEYWORD2>output_reset_rewrite_vars</KEYWORD2>
- <KEYWORD2>overload</KEYWORD2>
- <KEYWORD2>override_function</KEYWORD2>
- <KEYWORD2>ovrimos_close</KEYWORD2>
- <KEYWORD2>ovrimos_commit</KEYWORD2>
- <KEYWORD2>ovrimos_connect</KEYWORD2>
- <KEYWORD2>ovrimos_cursor</KEYWORD2>
- <KEYWORD2>ovrimos_exec</KEYWORD2>
- <KEYWORD2>ovrimos_execute</KEYWORD2>
- <KEYWORD2>ovrimos_fetch_into</KEYWORD2>
- <KEYWORD2>ovrimos_fetch_row</KEYWORD2>
- <KEYWORD2>ovrimos_field_len</KEYWORD2>
- <KEYWORD2>ovrimos_field_name</KEYWORD2>
- <KEYWORD2>ovrimos_field_num</KEYWORD2>
- <KEYWORD2>ovrimos_field_type</KEYWORD2>
- <KEYWORD2>ovrimos_free_result</KEYWORD2>
- <KEYWORD2>ovrimos_longreadlen</KEYWORD2>
- <KEYWORD2>ovrimos_num_fields</KEYWORD2>
- <KEYWORD2>ovrimos_num_rows</KEYWORD2>
- <KEYWORD2>ovrimos_prepare</KEYWORD2>
- <KEYWORD2>ovrimos_result</KEYWORD2>
- <KEYWORD2>ovrimos_result_all</KEYWORD2>
- <KEYWORD2>ovrimos_rollback</KEYWORD2>
- <KEYWORD2>owner_document</KEYWORD2> <!-- domnode -->
- <KEYWORD2>pack</KEYWORD2>
- <KEYWORD2>parent_node</KEYWORD2> <!-- domnode -->
- <KEYWORD2>parents</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>parse_ini_file</KEYWORD2>
- <KEYWORD2>parse_str</KEYWORD2>
- <KEYWORD2>parse_url</KEYWORD2>
- <KEYWORD2>parsekit_compile_file</KEYWORD2>
- <KEYWORD2>parsekit_compile_string</KEYWORD2>
- <KEYWORD2>parsekit_func_arginfo</KEYWORD2>
- <KEYWORD2>passthru</KEYWORD2>
- <KEYWORD2>pathinfo</KEYWORD2>
- <KEYWORD2>pclose</KEYWORD2>
- <KEYWORD2>pcntl_alarm</KEYWORD2>
- <KEYWORD2>pcntl_exec</KEYWORD2>
- <KEYWORD2>pcntl_fork</KEYWORD2>
- <KEYWORD2>pcntl_getpriority</KEYWORD2>
- <KEYWORD2>pcntl_setpriority</KEYWORD2>
- <KEYWORD2>pcntl_signal</KEYWORD2>
- <KEYWORD2>pcntl_wait</KEYWORD2>
- <KEYWORD2>pcntl_waitpid</KEYWORD2>
- <KEYWORD2>pcntl_wexitstatus</KEYWORD2>
- <KEYWORD2>pcntl_wifexited</KEYWORD2>
- <KEYWORD2>pcntl_wifsignaled</KEYWORD2>
- <KEYWORD2>pcntl_wifstopped</KEYWORD2>
- <KEYWORD2>pcntl_wstopsig</KEYWORD2>
- <KEYWORD2>pcntl_wtermsig</KEYWORD2>
- <KEYWORD2>pconnect</KEYWORD2> <!-- memcache -->
- <KEYWORD2>pdf_add_annotation</KEYWORD2>
- <KEYWORD2>pdf_add_bookmark</KEYWORD2>
- <KEYWORD2>pdf_add_launchlink</KEYWORD2>
- <KEYWORD2>pdf_add_locallink</KEYWORD2>
- <KEYWORD2>pdf_add_note</KEYWORD2>
- <KEYWORD2>pdf_add_outline</KEYWORD2>
- <KEYWORD2>pdf_add_pdflink</KEYWORD2>
- <KEYWORD2>pdf_add_thumbnail</KEYWORD2>
- <KEYWORD2>pdf_add_weblink</KEYWORD2>
- <KEYWORD2>pdf_arc</KEYWORD2>
- <KEYWORD2>pdf_arcn</KEYWORD2>
- <KEYWORD2>pdf_attach_file</KEYWORD2>
- <KEYWORD2>pdf_begin_page</KEYWORD2>
- <KEYWORD2>pdf_begin_pattern</KEYWORD2>
- <KEYWORD2>pdf_begin_template</KEYWORD2>
- <KEYWORD2>pdf_circle</KEYWORD2>
- <KEYWORD2>pdf_clip</KEYWORD2>
- <KEYWORD2>pdf_close</KEYWORD2>
- <KEYWORD2>pdf_close_image</KEYWORD2>
- <KEYWORD2>pdf_close_pdi</KEYWORD2>
- <KEYWORD2>pdf_close_pdi_page</KEYWORD2>
- <KEYWORD2>pdf_closepath</KEYWORD2>
- <KEYWORD2>pdf_closepath_fill_stroke</KEYWORD2>
- <KEYWORD2>pdf_closepath_stroke</KEYWORD2>
- <KEYWORD2>pdf_concat</KEYWORD2>
- <KEYWORD2>pdf_continue_text</KEYWORD2>
- <KEYWORD2>pdf_curveto</KEYWORD2>
- <KEYWORD2>pdf_delete</KEYWORD2>
- <KEYWORD2>pdf_end_page</KEYWORD2>
- <KEYWORD2>pdf_end_pattern</KEYWORD2>
- <KEYWORD2>pdf_end_template</KEYWORD2>
- <KEYWORD2>pdf_endpath</KEYWORD2>
- <KEYWORD2>pdf_fill</KEYWORD2>
- <KEYWORD2>pdf_fill_stroke</KEYWORD2>
- <KEYWORD2>pdf_findfont</KEYWORD2>
- <KEYWORD2>pdf_fit_pdi_page</KEYWORD2>
- <KEYWORD2>pdf_get_buffer</KEYWORD2>
- <KEYWORD2>pdf_get_font</KEYWORD2>
- <KEYWORD2>pdf_get_fontname</KEYWORD2>
- <KEYWORD2>pdf_get_fontsize</KEYWORD2>
- <KEYWORD2>pdf_get_image_height</KEYWORD2>
- <KEYWORD2>pdf_get_image_width</KEYWORD2>
- <KEYWORD2>pdf_get_majorversion</KEYWORD2>
- <KEYWORD2>pdf_get_minorversion</KEYWORD2>
- <KEYWORD2>pdf_get_parameter</KEYWORD2>
- <KEYWORD2>pdf_get_pdi_parameter</KEYWORD2>
- <KEYWORD2>pdf_get_pdi_value</KEYWORD2>
- <KEYWORD2>pdf_get_value</KEYWORD2>
- <KEYWORD2>pdf_initgraphics</KEYWORD2>
- <KEYWORD2>pdf_lineto</KEYWORD2>
- <KEYWORD2>pdf_load_font</KEYWORD2>
- <KEYWORD2>pdf_makespotcolor</KEYWORD2>
- <KEYWORD2>pdf_moveto</KEYWORD2>
- <KEYWORD2>pdf_new</KEYWORD2>
- <KEYWORD2>pdf_open</KEYWORD2>
- <KEYWORD2>pdf_open_ccitt</KEYWORD2>
- <KEYWORD2>pdf_open_file</KEYWORD2>
- <KEYWORD2>pdf_open_gif</KEYWORD2>
- <KEYWORD2>pdf_open_image</KEYWORD2>
- <KEYWORD2>pdf_open_image_file</KEYWORD2>
- <KEYWORD2>pdf_open_jpeg</KEYWORD2>
- <KEYWORD2>pdf_open_memory_image</KEYWORD2>
- <KEYWORD2>pdf_open_pdi</KEYWORD2>
- <KEYWORD2>pdf_open_pdi_page</KEYWORD2>
- <KEYWORD2>pdf_open_png</KEYWORD2>
- <KEYWORD2>pdf_open_tiff</KEYWORD2>
- <KEYWORD2>pdf_place_image</KEYWORD2>
- <KEYWORD2>pdf_place_pdi_page</KEYWORD2>
- <KEYWORD2>pdf_rect</KEYWORD2>
- <KEYWORD2>pdf_restore</KEYWORD2>
- <KEYWORD2>pdf_rotate</KEYWORD2>
- <KEYWORD2>pdf_save</KEYWORD2>
- <KEYWORD2>pdf_scale</KEYWORD2>
- <KEYWORD2>pdf_set_border_color</KEYWORD2>
- <KEYWORD2>pdf_set_border_dash</KEYWORD2>
- <KEYWORD2>pdf_set_border_style</KEYWORD2>
- <KEYWORD2>pdf_set_char_spacing</KEYWORD2>
- <KEYWORD2>pdf_set_duration</KEYWORD2>
- <KEYWORD2>pdf_set_font</KEYWORD2>
- <KEYWORD2>pdf_set_horiz_scaling</KEYWORD2>
- <KEYWORD2>pdf_set_info</KEYWORD2>
- <KEYWORD2>pdf_set_info_author</KEYWORD2>
- <KEYWORD2>pdf_set_info_creator</KEYWORD2>
- <KEYWORD2>pdf_set_info_keywords</KEYWORD2>
- <KEYWORD2>pdf_set_info_subject</KEYWORD2>
- <KEYWORD2>pdf_set_info_title</KEYWORD2>
- <KEYWORD2>pdf_set_leading</KEYWORD2>
- <KEYWORD2>pdf_set_parameter</KEYWORD2>
- <KEYWORD2>pdf_set_text_matrix</KEYWORD2>
- <KEYWORD2>pdf_set_text_pos</KEYWORD2>
- <KEYWORD2>pdf_set_text_rendering</KEYWORD2>
- <KEYWORD2>pdf_set_text_rise</KEYWORD2>
- <KEYWORD2>pdf_set_value</KEYWORD2>
- <KEYWORD2>pdf_set_word_spacing</KEYWORD2>
- <KEYWORD2>pdf_setcolor</KEYWORD2>
- <KEYWORD2>pdf_setdash</KEYWORD2>
- <KEYWORD2>pdf_setflat</KEYWORD2>
- <KEYWORD2>pdf_setfont</KEYWORD2>
- <KEYWORD2>pdf_setgray</KEYWORD2>
- <KEYWORD2>pdf_setgray_fill</KEYWORD2>
- <KEYWORD2>pdf_setgray_stroke</KEYWORD2>
- <KEYWORD2>pdf_setlinecap</KEYWORD2>
- <KEYWORD2>pdf_setlinejoin</KEYWORD2>
- <KEYWORD2>pdf_setlinewidth</KEYWORD2>
- <KEYWORD2>pdf_setmatrix</KEYWORD2>
- <KEYWORD2>pdf_setmiterlimit</KEYWORD2>
- <KEYWORD2>pdf_setpolydash</KEYWORD2>
- <KEYWORD2>pdf_setrgbcolor</KEYWORD2>
- <KEYWORD2>pdf_setrgbcolor_fill</KEYWORD2>
- <KEYWORD2>pdf_setrgbcolor_stroke</KEYWORD2>
- <KEYWORD2>pdf_show</KEYWORD2>
- <KEYWORD2>pdf_show_boxed</KEYWORD2>
- <KEYWORD2>pdf_show_xy</KEYWORD2>
- <KEYWORD2>pdf_skew</KEYWORD2>
- <KEYWORD2>pdf_stringwidth</KEYWORD2>
- <KEYWORD2>pdf_stroke</KEYWORD2>
- <KEYWORD2>pdf_translate</KEYWORD2>
- <KEYWORD2>pfpro_cleanup</KEYWORD2>
- <KEYWORD2>pfpro_init</KEYWORD2>
- <KEYWORD2>pfpro_process</KEYWORD2>
- <KEYWORD2>pfpro_process_raw</KEYWORD2>
- <KEYWORD2>pfpro_version</KEYWORD2>
- <KEYWORD2>pfsockopen</KEYWORD2>
- <KEYWORD2>pg_affected_rows</KEYWORD2>
- <KEYWORD2>pg_cancel_query</KEYWORD2>
- <KEYWORD2>pg_client_encoding</KEYWORD2>
- <KEYWORD2>pg_close</KEYWORD2>
- <KEYWORD2>pg_connect</KEYWORD2>
- <KEYWORD2>pg_connection_busy</KEYWORD2>
- <KEYWORD2>pg_connection_reset</KEYWORD2>
- <KEYWORD2>pg_connection_status</KEYWORD2>
- <KEYWORD2>pg_convert</KEYWORD2>
- <KEYWORD2>pg_copy_from</KEYWORD2>
- <KEYWORD2>pg_copy_to</KEYWORD2>
- <KEYWORD2>pg_dbname</KEYWORD2>
- <KEYWORD2>pg_delete</KEYWORD2>
- <KEYWORD2>pg_end_copy</KEYWORD2>
- <KEYWORD2>pg_escape_bytea</KEYWORD2>
- <KEYWORD2>pg_escape_string</KEYWORD2>
- <KEYWORD2>pg_fetch_all</KEYWORD2>
- <KEYWORD2>pg_fetch_array</KEYWORD2>
- <KEYWORD2>pg_fetch_assoc</KEYWORD2>
- <KEYWORD2>pg_fetch_object</KEYWORD2>
- <KEYWORD2>pg_fetch_result</KEYWORD2>
- <KEYWORD2>pg_fetch_row</KEYWORD2>
- <KEYWORD2>pg_field_is_null</KEYWORD2>
- <KEYWORD2>pg_field_name</KEYWORD2>
- <KEYWORD2>pg_field_num</KEYWORD2>
- <KEYWORD2>pg_field_prtlen</KEYWORD2>
- <KEYWORD2>pg_field_size</KEYWORD2>
- <KEYWORD2>pg_field_type</KEYWORD2>
- <KEYWORD2>pg_free_result</KEYWORD2>
- <KEYWORD2>pg_get_notify</KEYWORD2>
- <KEYWORD2>pg_get_pid</KEYWORD2>
- <KEYWORD2>pg_get_result</KEYWORD2>
- <KEYWORD2>pg_host</KEYWORD2>
- <KEYWORD2>pg_insert</KEYWORD2>
- <KEYWORD2>pg_last_error</KEYWORD2>
- <KEYWORD2>pg_last_notice</KEYWORD2>
- <KEYWORD2>pg_last_oid</KEYWORD2>
- <KEYWORD2>pg_lo_close</KEYWORD2>
- <KEYWORD2>pg_lo_create</KEYWORD2>
- <KEYWORD2>pg_lo_export</KEYWORD2>
- <KEYWORD2>pg_lo_import</KEYWORD2>
- <KEYWORD2>pg_lo_open</KEYWORD2>
- <KEYWORD2>pg_lo_read</KEYWORD2>
- <KEYWORD2>pg_lo_read_all</KEYWORD2>
- <KEYWORD2>pg_lo_seek</KEYWORD2>
- <KEYWORD2>pg_lo_tell</KEYWORD2>
- <KEYWORD2>pg_lo_unlink</KEYWORD2>
- <KEYWORD2>pg_lo_write</KEYWORD2>
- <KEYWORD2>pg_meta_data</KEYWORD2>
- <KEYWORD2>pg_num_fields</KEYWORD2>
- <KEYWORD2>pg_num_rows</KEYWORD2>
- <KEYWORD2>pg_options</KEYWORD2>
- <KEYWORD2>pg_parameter_status</KEYWORD2>
- <KEYWORD2>pg_pconnect</KEYWORD2>
- <KEYWORD2>pg_ping</KEYWORD2>
- <KEYWORD2>pg_port</KEYWORD2>
- <KEYWORD2>pg_put_line</KEYWORD2>
- <KEYWORD2>pg_query</KEYWORD2>
- <KEYWORD2>pg_result_error</KEYWORD2>
- <KEYWORD2>pg_result_seek</KEYWORD2>
- <KEYWORD2>pg_result_status</KEYWORD2>
- <KEYWORD2>pg_select</KEYWORD2>
- <KEYWORD2>pg_send_query</KEYWORD2>
- <KEYWORD2>pg_set_client_encoding</KEYWORD2>
- <KEYWORD2>pg_trace</KEYWORD2>
- <KEYWORD2>pg_tty</KEYWORD2>
- <KEYWORD2>pg_unescape_bytea</KEYWORD2>
- <KEYWORD2>pg_untrace</KEYWORD2>
- <KEYWORD2>pg_update</KEYWORD2>
- <KEYWORD2>pg_version</KEYWORD2>
- <KEYWORD2>php_check_syntax</KEYWORD2>
- <KEYWORD2>php_ini_scanned_files</KEYWORD2>
- <KEYWORD2>php_logo_guid</KEYWORD2>
- <KEYWORD2>php_sapi_name</KEYWORD2>
- <KEYWORD2>php_strip_whitespace</KEYWORD2>
- <KEYWORD2>php_uname</KEYWORD2>
- <KEYWORD2>phpcredits</KEYWORD2>
- <KEYWORD2>phpinfo</KEYWORD2>
- <KEYWORD2>phpversion</KEYWORD2>
- <KEYWORD2>pi</KEYWORD2>
- <KEYWORD2>png2wbmp</KEYWORD2>
- <KEYWORD2>popen</KEYWORD2>
- <KEYWORD2>pos</KEYWORD2>
- <KEYWORD2>posix_ctermid</KEYWORD2>
- <KEYWORD2>posix_get_last_error</KEYWORD2>
- <KEYWORD2>posix_getcwd</KEYWORD2>
- <KEYWORD2>posix_getegid</KEYWORD2>
- <KEYWORD2>posix_geteuid</KEYWORD2>
- <KEYWORD2>posix_getgid</KEYWORD2>
- <KEYWORD2>posix_getgrgid</KEYWORD2>
- <KEYWORD2>posix_getgrnam</KEYWORD2>
- <KEYWORD2>posix_getgroups</KEYWORD2>
- <KEYWORD2>posix_getlogin</KEYWORD2>
- <KEYWORD2>posix_getpgid</KEYWORD2>
- <KEYWORD2>posix_getpgrp</KEYWORD2>
- <KEYWORD2>posix_getpid</KEYWORD2>
- <KEYWORD2>posix_getppid</KEYWORD2>
- <KEYWORD2>posix_getpwnam</KEYWORD2>
- <KEYWORD2>posix_getpwuid</KEYWORD2>
- <KEYWORD2>posix_getrlimit</KEYWORD2>
- <KEYWORD2>posix_getsid</KEYWORD2>
- <KEYWORD2>posix_getuid</KEYWORD2>
- <KEYWORD2>posix_isatty</KEYWORD2>
- <KEYWORD2>posix_kill</KEYWORD2>
- <KEYWORD2>posix_mkfifo</KEYWORD2>
- <KEYWORD2>posix_setegid</KEYWORD2>
- <KEYWORD2>posix_seteuid</KEYWORD2>
- <KEYWORD2>posix_setgid</KEYWORD2>
- <KEYWORD2>posix_setpgid</KEYWORD2>
- <KEYWORD2>posix_setsid</KEYWORD2>
- <KEYWORD2>posix_setuid</KEYWORD2>
- <KEYWORD2>posix_strerror</KEYWORD2>
- <KEYWORD2>posix_times</KEYWORD2>
- <KEYWORD2>posix_ttyname</KEYWORD2>
- <KEYWORD2>posix_uname</KEYWORD2>
- <KEYWORD2>pow</KEYWORD2>
- <KEYWORD2>prefix</KEYWORD2> <!-- domnode -->
- <KEYWORD2>preg_grep</KEYWORD2>
- <KEYWORD2>preg_match</KEYWORD2>
- <KEYWORD2>preg_match_all</KEYWORD2>
- <KEYWORD2>preg_quote</KEYWORD2>
- <KEYWORD2>preg_replace</KEYWORD2>
- <KEYWORD2>preg_replace_callback</KEYWORD2>
- <KEYWORD2>preg_split</KEYWORD2>
- <KEYWORD2>prepare</KEYWORD2> <!-- pdo -->
- <KEYWORD2>prev</KEYWORD2> <!-- tidy_node -->
- <KEYWORD2>previous_sibling</KEYWORD2> <!-- domnode -->
- <KEYWORD2>print_r</KEYWORD2>
- <KEYWORD2>printer_abort</KEYWORD2>
- <KEYWORD2>printer_close</KEYWORD2>
- <KEYWORD2>printer_create_brush</KEYWORD2>
- <KEYWORD2>printer_create_dc</KEYWORD2>
- <KEYWORD2>printer_create_font</KEYWORD2>
- <KEYWORD2>printer_create_pen</KEYWORD2>
- <KEYWORD2>printer_delete_brush</KEYWORD2>
- <KEYWORD2>printer_delete_dc</KEYWORD2>
- <KEYWORD2>printer_delete_font</KEYWORD2>
- <KEYWORD2>printer_delete_pen</KEYWORD2>
- <KEYWORD2>printer_draw_bmp</KEYWORD2>
- <KEYWORD2>printer_draw_chord</KEYWORD2>
- <KEYWORD2>printer_draw_elipse</KEYWORD2>
- <KEYWORD2>printer_draw_line</KEYWORD2>
- <KEYWORD2>printer_draw_pie</KEYWORD2>
- <KEYWORD2>printer_draw_rectangle</KEYWORD2>
- <KEYWORD2>printer_draw_roundrect</KEYWORD2>
- <KEYWORD2>printer_draw_text</KEYWORD2>
- <KEYWORD2>printer_end_doc</KEYWORD2>
- <KEYWORD2>printer_end_page</KEYWORD2>
- <KEYWORD2>printer_get_option</KEYWORD2>
- <KEYWORD2>printer_list</KEYWORD2>
- <KEYWORD2>printer_logical_fontheight</KEYWORD2>
- <KEYWORD2>printer_open</KEYWORD2>
- <KEYWORD2>printer_select_brush</KEYWORD2>
- <KEYWORD2>printer_select_font</KEYWORD2>
- <KEYWORD2>printer_select_pen</KEYWORD2>
- <KEYWORD2>printer_set_option</KEYWORD2>
- <KEYWORD2>printer_start_doc</KEYWORD2>
- <KEYWORD2>printer_start_page</KEYWORD2>
- <KEYWORD2>printer_write</KEYWORD2>
- <KEYWORD2>printf</KEYWORD2>
- <KEYWORD2>proc_close</KEYWORD2>
- <KEYWORD2>proc_get_status</KEYWORD2>
- <KEYWORD2>proc_nice</KEYWORD2>
- <KEYWORD2>proc_open</KEYWORD2>
- <KEYWORD2>proc_terminate</KEYWORD2>
- <KEYWORD2>process</KEYWORD2> <!-- domxsltstylesheet -->
- <KEYWORD2>property_exists</KEYWORD2>
- <KEYWORD2>pspell_add_to_personal</KEYWORD2>
- <KEYWORD2>pspell_add_to_session</KEYWORD2>
- <KEYWORD2>pspell_check</KEYWORD2>
- <KEYWORD2>pspell_clear_session</KEYWORD2>
- <KEYWORD2>pspell_config_create</KEYWORD2>
- <KEYWORD2>pspell_config_data_dir</KEYWORD2>
- <KEYWORD2>pspell_config_dict_dir</KEYWORD2>
- <KEYWORD2>pspell_config_ignore</KEYWORD2>
- <KEYWORD2>pspell_config_mode</KEYWORD2>
- <KEYWORD2>pspell_config_personal</KEYWORD2>
- <KEYWORD2>pspell_config_repl</KEYWORD2>
- <KEYWORD2>pspell_config_runtogether</KEYWORD2>
- <KEYWORD2>pspell_config_save_repl</KEYWORD2>
- <KEYWORD2>pspell_new</KEYWORD2>
- <KEYWORD2>pspell_new_config</KEYWORD2>
- <KEYWORD2>pspell_new_personal</KEYWORD2>
- <KEYWORD2>pspell_save_wordlist</KEYWORD2>
- <KEYWORD2>pspell_store_replacement</KEYWORD2>
- <KEYWORD2>pspell_suggest</KEYWORD2>
- <KEYWORD2>public_id</KEYWORD2> <!-- domdocumenttype -->
- <KEYWORD2>putenv</KEYWORD2>
- <KEYWORD2>qdom_error</KEYWORD2>
- <KEYWORD2>qdom_tree</KEYWORD2>
- <KEYWORD2>query</KEYWORD2> <!-- domxpath -->
- <KEYWORD2>quoted_printable_decode</KEYWORD2>
- <KEYWORD2>quotemeta</KEYWORD2>
- <KEYWORD2>rad2deg</KEYWORD2>
- <KEYWORD2>rand</KEYWORD2>
- <KEYWORD2>range</KEYWORD2>
- <KEYWORD2>rar_close</KEYWORD2>
- <KEYWORD2>rar_entry_get</KEYWORD2>
- <KEYWORD2>rar_list</KEYWORD2>
- <KEYWORD2>rar_open</KEYWORD2>
- <KEYWORD2>rawurldecode</KEYWORD2>
- <KEYWORD2>rawurlencode</KEYWORD2>
- <KEYWORD2>read</KEYWORD2> <!-- hw_api_content, lob -->
- <KEYWORD2>read_exif_data</KEYWORD2>
- <KEYWORD2>readdir</KEYWORD2>
- <KEYWORD2>readfile</KEYWORD2>
- <KEYWORD2>readgzfile</KEYWORD2>
- <KEYWORD2>readline</KEYWORD2>
- <KEYWORD2>readline_add_history</KEYWORD2>
- <KEYWORD2>readline_callback_handler_install</KEYWORD2>
- <KEYWORD2>readline_callback_handler_remove</KEYWORD2>
- <KEYWORD2>readline_callback_read_char</KEYWORD2>
- <KEYWORD2>readline_clear_history</KEYWORD2>
- <KEYWORD2>readline_completion_function</KEYWORD2>
- <KEYWORD2>readline_info</KEYWORD2>
- <KEYWORD2>readline_list_history</KEYWORD2>
- <KEYWORD2>readline_on_new_line</KEYWORD2>
- <KEYWORD2>readline_read_history</KEYWORD2>
- <KEYWORD2>readline_redisplay</KEYWORD2>
- <KEYWORD2>readline_write_history</KEYWORD2>
- <KEYWORD2>readlink</KEYWORD2>
- <KEYWORD2>realpath</KEYWORD2>
- <KEYWORD2>reason</KEYWORD2> <!-- hw_api_error -->
- <KEYWORD2>recode</KEYWORD2>
- <KEYWORD2>recode_file</KEYWORD2>
- <KEYWORD2>recode_string</KEYWORD2>
- <KEYWORD2>register_shutdown_function</KEYWORD2>
- <KEYWORD2>register_tick_function</KEYWORD2>
- <KEYWORD2>registernamespace</KEYWORD2> <!-- domxpath -->
- <KEYWORD2>relaxngvalidate</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>relaxngvalidatesource</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>remove</KEYWORD2> <!-- hw_api, hw_api_object, swfdisplayitem, swfmovie, swfsprite -->
- <KEYWORD2>remove_attribute</KEYWORD2> <!-- domelement -->
- <KEYWORD2>remove_child</KEYWORD2> <!-- domnode -->
- <KEYWORD2>removeattribute</KEYWORD2> <!-- domelement -->
- <KEYWORD2>removeattributenode</KEYWORD2> <!-- domelement -->
- <KEYWORD2>removeattributens</KEYWORD2> <!-- domelement -->
- <KEYWORD2>removechild</KEYWORD2> <!-- domnode -->
- <KEYWORD2>rename</KEYWORD2>
- <KEYWORD2>rename_function</KEYWORD2>
- <KEYWORD2>replace</KEYWORD2> <!-- hw_api, memcache -->
- <KEYWORD2>replace_child</KEYWORD2> <!-- domnode -->
- <KEYWORD2>replace_node</KEYWORD2> <!-- domnode -->
- <KEYWORD2>replacechild</KEYWORD2> <!-- domnode -->
- <KEYWORD2>replacedata</KEYWORD2> <!-- domcharacterdata -->
- <KEYWORD2>reset</KEYWORD2>
- <KEYWORD2>restore_error_handler</KEYWORD2>
- <KEYWORD2>restore_exception_handler</KEYWORD2>
- <KEYWORD2>restore_include_path</KEYWORD2>
- <KEYWORD2>result_dump_file</KEYWORD2> <!-- domxsltstylesheet -->
- <KEYWORD2>result_dump_mem</KEYWORD2> <!-- domxsltstylesheet -->
- <KEYWORD2>rewind</KEYWORD2> <!-- arrayiterator, cachingiterator, directoryiterator, filteriterator, limititerator, lob, parentiterator, recursivedirectoryiterator, recursiveiteratoriterator, simplexmliterator -->
- <KEYWORD2>rewinddir</KEYWORD2>
- <KEYWORD2>rmdir</KEYWORD2>
- <KEYWORD2>rollback</KEYWORD2> <!-- pdo -->
- <KEYWORD2>rotate</KEYWORD2> <!-- swfdisplayitem -->
- <KEYWORD2>rotateto</KEYWORD2> <!-- swfdisplayitem, swffill -->
- <KEYWORD2>round</KEYWORD2>
- <KEYWORD2>rowcount</KEYWORD2> <!-- pdostatement -->
- <KEYWORD2>rsort</KEYWORD2>
- <KEYWORD2>rtrim</KEYWORD2>
- <KEYWORD2>save</KEYWORD2> <!-- domdocument, lob, swfmovie -->
- <KEYWORD2>savehtml</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>savehtmlfile</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>savexml</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>scale</KEYWORD2> <!-- swfdisplayitem -->
- <KEYWORD2>scaleto</KEYWORD2> <!-- swfdisplayitem, swffill -->
- <KEYWORD2>scandir</KEYWORD2>
- <KEYWORD2>schemavalidate</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>schemavalidatesource</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>seek</KEYWORD2> <!-- arrayiterator, limititerator, lob -->
- <KEYWORD2>sem_acquire</KEYWORD2>
- <KEYWORD2>sem_get</KEYWORD2>
- <KEYWORD2>sem_release</KEYWORD2>
- <KEYWORD2>sem_remove</KEYWORD2>
- <KEYWORD2>serialize</KEYWORD2>
- <KEYWORD2>sesam_affected_rows</KEYWORD2>
- <KEYWORD2>sesam_commit</KEYWORD2>
- <KEYWORD2>sesam_connect</KEYWORD2>
- <KEYWORD2>sesam_diagnostic</KEYWORD2>
- <KEYWORD2>sesam_disconnect</KEYWORD2>
- <KEYWORD2>sesam_errormsg</KEYWORD2>
- <KEYWORD2>sesam_execimm</KEYWORD2>
- <KEYWORD2>sesam_fetch_array</KEYWORD2>
- <KEYWORD2>sesam_fetch_result</KEYWORD2>
- <KEYWORD2>sesam_fetch_row</KEYWORD2>
- <KEYWORD2>sesam_field_array</KEYWORD2>
- <KEYWORD2>sesam_field_name</KEYWORD2>
- <KEYWORD2>sesam_free_result</KEYWORD2>
- <KEYWORD2>sesam_num_fields</KEYWORD2>
- <KEYWORD2>sesam_query</KEYWORD2>
- <KEYWORD2>sesam_rollback</KEYWORD2>
- <KEYWORD2>sesam_seek_row</KEYWORD2>
- <KEYWORD2>sesam_settransaction</KEYWORD2>
- <KEYWORD2>session_cache_expire</KEYWORD2>
- <KEYWORD2>session_cache_limiter</KEYWORD2>
- <KEYWORD2>session_commit</KEYWORD2>
- <KEYWORD2>session_decode</KEYWORD2>
- <KEYWORD2>session_destroy</KEYWORD2>
- <KEYWORD2>session_encode</KEYWORD2>
- <KEYWORD2>session_get_cookie_params</KEYWORD2>
- <KEYWORD2>session_id</KEYWORD2>
- <KEYWORD2>session_is_registered</KEYWORD2>
- <KEYWORD2>session_module_name</KEYWORD2>
- <KEYWORD2>session_name</KEYWORD2>
- <KEYWORD2>session_regenerate_id</KEYWORD2>
- <KEYWORD2>session_register</KEYWORD2>
- <KEYWORD2>session_save_path</KEYWORD2>
- <KEYWORD2>session_set_cookie_params</KEYWORD2>
- <KEYWORD2>session_set_save_handler</KEYWORD2>
- <KEYWORD2>session_start</KEYWORD2>
- <KEYWORD2>session_unregister</KEYWORD2>
- <KEYWORD2>session_unset</KEYWORD2>
- <KEYWORD2>session_write_close</KEYWORD2>
- <KEYWORD2>set</KEYWORD2> <!-- memcache -->
- <KEYWORD2>set_attribute</KEYWORD2> <!-- domelement -->
- <KEYWORD2>set_content</KEYWORD2> <!-- domnode -->
- <KEYWORD2>set_error_handler</KEYWORD2>
- <KEYWORD2>set_exception_handler</KEYWORD2>
- <KEYWORD2>set_file_buffer</KEYWORD2>
- <KEYWORD2>set_include_path</KEYWORD2>
- <KEYWORD2>set_magic_quotes_runtime</KEYWORD2>
- <KEYWORD2>set_name</KEYWORD2> <!-- domnode -->
- <KEYWORD2>set_namespace</KEYWORD2> <!-- domnode -->
- <KEYWORD2>set_time_limit</KEYWORD2>
- <KEYWORD2>setaction</KEYWORD2> <!-- swfbutton -->
- <KEYWORD2>setattribute</KEYWORD2> <!-- domelement, pdo -->
- <KEYWORD2>setattributenode</KEYWORD2> <!-- domelement -->
- <KEYWORD2>setattributenodens</KEYWORD2> <!-- domelement -->
- <KEYWORD2>setattributens</KEYWORD2> <!-- domelement -->
- <KEYWORD2>setbackground</KEYWORD2> <!-- swfmovie -->
- <KEYWORD2>setbounds</KEYWORD2> <!-- swftextfield -->
- <KEYWORD2>setbuffering</KEYWORD2> <!-- lob -->
- <KEYWORD2>setclass</KEYWORD2> <!-- soapserver -->
- <KEYWORD2>setcolor</KEYWORD2> <!-- swftext, swftextfield -->
- <KEYWORD2>setcommitedversion</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>setcookie</KEYWORD2>
- <KEYWORD2>setdepth</KEYWORD2> <!-- swfdisplayitem -->
- <KEYWORD2>setdimension</KEYWORD2> <!-- swfmovie -->
- <KEYWORD2>setdown</KEYWORD2> <!-- swfbutton -->
- <KEYWORD2>setfont</KEYWORD2> <!-- swftext, swftextfield -->
- <KEYWORD2>setframes</KEYWORD2> <!-- swfmovie, swfsprite -->
- <KEYWORD2>setheight</KEYWORD2> <!-- swftext, swftextfield -->
- <KEYWORD2>sethit</KEYWORD2> <!-- swfbutton -->
- <KEYWORD2>setindentation</KEYWORD2> <!-- swftextfield -->
- <KEYWORD2>setleftfill</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>setleftmargin</KEYWORD2> <!-- swftextfield -->
- <KEYWORD2>setline</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>setlinespacing</KEYWORD2> <!-- swftextfield -->
- <KEYWORD2>setlocale</KEYWORD2>
- <KEYWORD2>setmargins</KEYWORD2> <!-- swftextfield -->
- <KEYWORD2>setname</KEYWORD2> <!-- swfdisplayitem, swftextfield -->
- <KEYWORD2>setover</KEYWORD2> <!-- swfbutton -->
- <KEYWORD2>setpersistence</KEYWORD2> <!-- soapserver -->
- <KEYWORD2>setrate</KEYWORD2> <!-- swfmovie -->
- <KEYWORD2>setratio</KEYWORD2> <!-- swfdisplayitem -->
- <KEYWORD2>setrawcookie</KEYWORD2>
- <KEYWORD2>setrightfill</KEYWORD2> <!-- swfshape -->
- <KEYWORD2>setrightmargin</KEYWORD2> <!-- swftextfield -->
- <KEYWORD2>setspacing</KEYWORD2> <!-- swftext -->
- <KEYWORD2>settype</KEYWORD2>
- <KEYWORD2>setup</KEYWORD2> <!-- swfbutton -->
- <KEYWORD2>sha1</KEYWORD2>
- <KEYWORD2>sha1_file</KEYWORD2>
- <KEYWORD2>shell_exec</KEYWORD2>
- <KEYWORD2>shm_attach</KEYWORD2>
- <KEYWORD2>shm_detach</KEYWORD2>
- <KEYWORD2>shm_get_var</KEYWORD2>
- <KEYWORD2>shm_put_var</KEYWORD2>
- <KEYWORD2>shm_remove</KEYWORD2>
- <KEYWORD2>shm_remove_var</KEYWORD2>
- <KEYWORD2>shmop_close</KEYWORD2>
- <KEYWORD2>shmop_delete</KEYWORD2>
- <KEYWORD2>shmop_open</KEYWORD2>
- <KEYWORD2>shmop_read</KEYWORD2>
- <KEYWORD2>shmop_size</KEYWORD2>
- <KEYWORD2>shmop_write</KEYWORD2>
- <KEYWORD2>show_source</KEYWORD2>
- <KEYWORD2>shuffle</KEYWORD2>
- <KEYWORD2>similar_text</KEYWORD2>
- <KEYWORD2>simplexml_import_dom</KEYWORD2>
- <KEYWORD2>simplexml_load_file</KEYWORD2>
- <KEYWORD2>simplexml_load_string</KEYWORD2>
- <KEYWORD2>sin</KEYWORD2>
- <KEYWORD2>sinh</KEYWORD2>
- <KEYWORD2>size</KEYWORD2> <!-- collection, lob -->
- <KEYWORD2>sizeof</KEYWORD2>
- <KEYWORD2>skewx</KEYWORD2> <!-- swfdisplayitem -->
- <KEYWORD2>skewxto</KEYWORD2> <!-- swfdisplayitem, swffill -->
- <KEYWORD2>skewy</KEYWORD2> <!-- swfdisplayitem -->
- <KEYWORD2>skewyto</KEYWORD2> <!-- swfdisplayitem, swffill -->
- <KEYWORD2>sleep</KEYWORD2>
- <KEYWORD2>snmp_get_quick_print</KEYWORD2>
- <KEYWORD2>snmp_get_valueretrieval</KEYWORD2>
- <KEYWORD2>snmp_read_mib</KEYWORD2>
- <KEYWORD2>snmp_set_enum_print</KEYWORD2>
- <KEYWORD2>snmp_set_oid_numeric_print</KEYWORD2>
- <KEYWORD2>snmp_set_quick_print</KEYWORD2>
- <KEYWORD2>snmp_set_valueretrieval</KEYWORD2>
- <KEYWORD2>snmpget</KEYWORD2>
- <KEYWORD2>snmpgetnext</KEYWORD2>
- <KEYWORD2>snmprealwalk</KEYWORD2>
- <KEYWORD2>snmpset</KEYWORD2>
- <KEYWORD2>snmpwalk</KEYWORD2>
- <KEYWORD2>snmpwalkoid</KEYWORD2>
- <KEYWORD2>socket_accept</KEYWORD2>
- <KEYWORD2>socket_bind</KEYWORD2>
- <KEYWORD2>socket_clear_error</KEYWORD2>
- <KEYWORD2>socket_close</KEYWORD2>
- <KEYWORD2>socket_connect</KEYWORD2>
- <KEYWORD2>socket_create</KEYWORD2>
- <KEYWORD2>socket_create_listen</KEYWORD2>
- <KEYWORD2>socket_create_pair</KEYWORD2>
- <KEYWORD2>socket_get_option</KEYWORD2>
- <KEYWORD2>socket_get_status</KEYWORD2>
- <KEYWORD2>socket_getpeername</KEYWORD2>
- <KEYWORD2>socket_getsockname</KEYWORD2>
- <KEYWORD2>socket_last_error</KEYWORD2>
- <KEYWORD2>socket_listen</KEYWORD2>
- <KEYWORD2>socket_read</KEYWORD2>
- <KEYWORD2>socket_recv</KEYWORD2>
- <KEYWORD2>socket_recvfrom</KEYWORD2>
- <KEYWORD2>socket_select</KEYWORD2>
- <KEYWORD2>socket_send</KEYWORD2>
- <KEYWORD2>socket_sendto</KEYWORD2>
- <KEYWORD2>socket_set_block</KEYWORD2>
- <KEYWORD2>socket_set_blocking</KEYWORD2>
- <KEYWORD2>socket_set_nonblock</KEYWORD2>
- <KEYWORD2>socket_set_option</KEYWORD2>
- <KEYWORD2>socket_set_timeout</KEYWORD2>
- <KEYWORD2>socket_shutdown</KEYWORD2>
- <KEYWORD2>socket_strerror</KEYWORD2>
- <KEYWORD2>socket_write</KEYWORD2>
- <KEYWORD2>sort</KEYWORD2>
- <KEYWORD2>soundex</KEYWORD2>
- <KEYWORD2>specified</KEYWORD2> <!-- domattribute -->
- <KEYWORD2>spl_classes</KEYWORD2>
- <KEYWORD2>split</KEYWORD2>
- <KEYWORD2>spliti</KEYWORD2>
- <KEYWORD2>splittext</KEYWORD2> <!-- domtext -->
- <KEYWORD2>sprintf</KEYWORD2>
- <KEYWORD2>sql_regcase</KEYWORD2>
- <KEYWORD2>sqlite_array_query</KEYWORD2>
- <KEYWORD2>sqlite_busy_timeout</KEYWORD2>
- <KEYWORD2>sqlite_changes</KEYWORD2>
- <KEYWORD2>sqlite_close</KEYWORD2>
- <KEYWORD2>sqlite_column</KEYWORD2>
- <KEYWORD2>sqlite_create_aggregate</KEYWORD2>
- <KEYWORD2>sqlite_create_function</KEYWORD2>
- <KEYWORD2>sqlite_current</KEYWORD2>
- <KEYWORD2>sqlite_error_string</KEYWORD2>
- <KEYWORD2>sqlite_escape_string</KEYWORD2>
- <KEYWORD2>sqlite_exec</KEYWORD2>
- <KEYWORD2>sqlite_factory</KEYWORD2>
- <KEYWORD2>sqlite_fetch_all</KEYWORD2>
- <KEYWORD2>sqlite_fetch_array</KEYWORD2>
- <KEYWORD2>sqlite_fetch_column_types</KEYWORD2>
- <KEYWORD2>sqlite_fetch_object</KEYWORD2>
- <KEYWORD2>sqlite_fetch_single</KEYWORD2>
- <KEYWORD2>sqlite_fetch_string</KEYWORD2>
- <KEYWORD2>sqlite_field_name</KEYWORD2>
- <KEYWORD2>sqlite_has_more</KEYWORD2>
- <KEYWORD2>sqlite_has_prev</KEYWORD2>
- <KEYWORD2>sqlite_last_error</KEYWORD2>
- <KEYWORD2>sqlite_last_insert_rowid</KEYWORD2>
- <KEYWORD2>sqlite_libencoding</KEYWORD2>
- <KEYWORD2>sqlite_libversion</KEYWORD2>
- <KEYWORD2>sqlite_next</KEYWORD2>
- <KEYWORD2>sqlite_num_fields</KEYWORD2>
- <KEYWORD2>sqlite_num_rows</KEYWORD2>
- <KEYWORD2>sqlite_open</KEYWORD2>
- <KEYWORD2>sqlite_popen</KEYWORD2>
- <KEYWORD2>sqlite_prev</KEYWORD2>
- <KEYWORD2>sqlite_query</KEYWORD2>
- <KEYWORD2>sqlite_rewind</KEYWORD2>
- <KEYWORD2>sqlite_seek</KEYWORD2>
- <KEYWORD2>sqlite_single_query</KEYWORD2>
- <KEYWORD2>sqlite_udf_decode_binary</KEYWORD2>
- <KEYWORD2>sqlite_udf_encode_binary</KEYWORD2>
- <KEYWORD2>sqlite_unbuffered_query</KEYWORD2>
- <KEYWORD2>sqrt</KEYWORD2>
- <KEYWORD2>srand</KEYWORD2>
- <KEYWORD2>srcanchors</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>srcsofdst</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>sscanf</KEYWORD2>
- <KEYWORD2>stat</KEYWORD2>
- <KEYWORD2>str_ireplace</KEYWORD2>
- <KEYWORD2>str_pad</KEYWORD2>
- <KEYWORD2>str_repeat</KEYWORD2>
- <KEYWORD2>str_replace</KEYWORD2>
- <KEYWORD2>str_rot13</KEYWORD2>
- <KEYWORD2>str_shuffle</KEYWORD2>
- <KEYWORD2>str_split</KEYWORD2>
- <KEYWORD2>str_word_count</KEYWORD2>
- <KEYWORD2>strcasecmp</KEYWORD2>
- <KEYWORD2>strchr</KEYWORD2>
- <KEYWORD2>strcmp</KEYWORD2>
- <KEYWORD2>strcoll</KEYWORD2>
- <KEYWORD2>strcspn</KEYWORD2>
- <KEYWORD2>stream_context_create</KEYWORD2>
- <KEYWORD2>stream_context_get_default</KEYWORD2>
- <KEYWORD2>stream_context_get_options</KEYWORD2>
- <KEYWORD2>stream_context_set_option</KEYWORD2>
- <KEYWORD2>stream_context_set_params</KEYWORD2>
- <KEYWORD2>stream_copy_to_stream</KEYWORD2>
- <KEYWORD2>stream_filter_append</KEYWORD2>
- <KEYWORD2>stream_filter_prepend</KEYWORD2>
- <KEYWORD2>stream_filter_register</KEYWORD2>
- <KEYWORD2>stream_filter_remove</KEYWORD2>
- <KEYWORD2>stream_get_contents</KEYWORD2>
- <KEYWORD2>stream_get_filters</KEYWORD2>
- <KEYWORD2>stream_get_line</KEYWORD2>
- <KEYWORD2>stream_get_meta_data</KEYWORD2>
- <KEYWORD2>stream_get_transports</KEYWORD2>
- <KEYWORD2>stream_get_wrappers</KEYWORD2>
- <KEYWORD2>stream_register_wrapper</KEYWORD2>
- <KEYWORD2>stream_select</KEYWORD2>
- <KEYWORD2>stream_set_blocking</KEYWORD2>
- <KEYWORD2>stream_set_timeout</KEYWORD2>
- <KEYWORD2>stream_set_write_buffer</KEYWORD2>
- <KEYWORD2>stream_socket_accept</KEYWORD2>
- <KEYWORD2>stream_socket_client</KEYWORD2>
- <KEYWORD2>stream_socket_enable_crypto</KEYWORD2>
- <KEYWORD2>stream_socket_get_name</KEYWORD2>
- <KEYWORD2>stream_socket_recvfrom</KEYWORD2>
- <KEYWORD2>stream_socket_sendto</KEYWORD2>
- <KEYWORD2>stream_socket_server</KEYWORD2>
- <KEYWORD2>stream_wrapper_register</KEYWORD2>
- <KEYWORD2>stream_wrapper_restore</KEYWORD2>
- <KEYWORD2>stream_wrapper_unregister</KEYWORD2>
- <KEYWORD2>streammp3</KEYWORD2> <!-- swfmovie -->
- <KEYWORD2>strftime</KEYWORD2>
- <KEYWORD2>strip_tags</KEYWORD2>
- <KEYWORD2>stripcslashes</KEYWORD2>
- <KEYWORD2>stripos</KEYWORD2>
- <KEYWORD2>stripslashes</KEYWORD2>
- <KEYWORD2>stristr</KEYWORD2>
- <KEYWORD2>strlen</KEYWORD2>
- <KEYWORD2>strnatcasecmp</KEYWORD2>
- <KEYWORD2>strnatcmp</KEYWORD2>
- <KEYWORD2>strncasecmp</KEYWORD2>
- <KEYWORD2>strncmp</KEYWORD2>
- <KEYWORD2>strpbrk</KEYWORD2>
- <KEYWORD2>strpos</KEYWORD2>
- <KEYWORD2>strptime</KEYWORD2>
- <KEYWORD2>strrchr</KEYWORD2>
- <KEYWORD2>strrev</KEYWORD2>
- <KEYWORD2>strripos</KEYWORD2>
- <KEYWORD2>strrpos</KEYWORD2>
- <KEYWORD2>strspn</KEYWORD2>
- <KEYWORD2>strstr</KEYWORD2>
- <KEYWORD2>strtok</KEYWORD2>
- <KEYWORD2>strtolower</KEYWORD2>
- <KEYWORD2>strtotime</KEYWORD2>
- <KEYWORD2>strtoupper</KEYWORD2>
- <KEYWORD2>strtr</KEYWORD2>
- <KEYWORD2>strval</KEYWORD2>
- <KEYWORD2>substr</KEYWORD2>
- <KEYWORD2>substr_compare</KEYWORD2>
- <KEYWORD2>substr_count</KEYWORD2>
- <KEYWORD2>substr_replace</KEYWORD2>
- <KEYWORD2>substringdata</KEYWORD2> <!-- domcharacterdata -->
- <KEYWORD2>swf_actiongeturl</KEYWORD2>
- <KEYWORD2>swf_actiongotoframe</KEYWORD2>
- <KEYWORD2>swf_actiongotolabel</KEYWORD2>
- <KEYWORD2>swf_actionnextframe</KEYWORD2>
- <KEYWORD2>swf_actionplay</KEYWORD2>
- <KEYWORD2>swf_actionprevframe</KEYWORD2>
- <KEYWORD2>swf_actionsettarget</KEYWORD2>
- <KEYWORD2>swf_actionstop</KEYWORD2>
- <KEYWORD2>swf_actiontogglequality</KEYWORD2>
- <KEYWORD2>swf_actionwaitforframe</KEYWORD2>
- <KEYWORD2>swf_addbuttonrecord</KEYWORD2>
- <KEYWORD2>swf_addcolor</KEYWORD2>
- <KEYWORD2>swf_closefile</KEYWORD2>
- <KEYWORD2>swf_definebitmap</KEYWORD2>
- <KEYWORD2>swf_definefont</KEYWORD2>
- <KEYWORD2>swf_defineline</KEYWORD2>
- <KEYWORD2>swf_definepoly</KEYWORD2>
- <KEYWORD2>swf_definerect</KEYWORD2>
- <KEYWORD2>swf_definetext</KEYWORD2>
- <KEYWORD2>swf_endbutton</KEYWORD2>
- <KEYWORD2>swf_enddoaction</KEYWORD2>
- <KEYWORD2>swf_endshape</KEYWORD2>
- <KEYWORD2>swf_endsymbol</KEYWORD2>
- <KEYWORD2>swf_fontsize</KEYWORD2>
- <KEYWORD2>swf_fontslant</KEYWORD2>
- <KEYWORD2>swf_fonttracking</KEYWORD2>
- <KEYWORD2>swf_getbitmapinfo</KEYWORD2>
- <KEYWORD2>swf_getfontinfo</KEYWORD2>
- <KEYWORD2>swf_getframe</KEYWORD2>
- <KEYWORD2>swf_labelframe</KEYWORD2>
- <KEYWORD2>swf_lookat</KEYWORD2>
- <KEYWORD2>swf_modifyobject</KEYWORD2>
- <KEYWORD2>swf_mulcolor</KEYWORD2>
- <KEYWORD2>swf_nextid</KEYWORD2>
- <KEYWORD2>swf_oncondition</KEYWORD2>
- <KEYWORD2>swf_openfile</KEYWORD2>
- <KEYWORD2>swf_ortho</KEYWORD2>
- <KEYWORD2>swf_ortho2</KEYWORD2>
- <KEYWORD2>swf_perspective</KEYWORD2>
- <KEYWORD2>swf_placeobject</KEYWORD2>
- <KEYWORD2>swf_polarview</KEYWORD2>
- <KEYWORD2>swf_popmatrix</KEYWORD2>
- <KEYWORD2>swf_posround</KEYWORD2>
- <KEYWORD2>swf_pushmatrix</KEYWORD2>
- <KEYWORD2>swf_removeobject</KEYWORD2>
- <KEYWORD2>swf_rotate</KEYWORD2>
- <KEYWORD2>swf_scale</KEYWORD2>
- <KEYWORD2>swf_setfont</KEYWORD2>
- <KEYWORD2>swf_setframe</KEYWORD2>
- <KEYWORD2>swf_shapearc</KEYWORD2>
- <KEYWORD2>swf_shapecurveto</KEYWORD2>
- <KEYWORD2>swf_shapecurveto3</KEYWORD2>
- <KEYWORD2>swf_shapefillbitmapclip</KEYWORD2>
- <KEYWORD2>swf_shapefillbitmaptile</KEYWORD2>
- <KEYWORD2>swf_shapefilloff</KEYWORD2>
- <KEYWORD2>swf_shapefillsolid</KEYWORD2>
- <KEYWORD2>swf_shapelinesolid</KEYWORD2>
- <KEYWORD2>swf_shapelineto</KEYWORD2>
- <KEYWORD2>swf_shapemoveto</KEYWORD2>
- <KEYWORD2>swf_showframe</KEYWORD2>
- <KEYWORD2>swf_startbutton</KEYWORD2>
- <KEYWORD2>swf_startdoaction</KEYWORD2>
- <KEYWORD2>swf_startshape</KEYWORD2>
- <KEYWORD2>swf_startsymbol</KEYWORD2>
- <KEYWORD2>swf_textwidth</KEYWORD2>
- <KEYWORD2>swf_translate</KEYWORD2>
- <KEYWORD2>swf_viewport</KEYWORD2>
- <KEYWORD2>swfbutton_keypress</KEYWORD2>
- <KEYWORD2>sybase_affected_rows</KEYWORD2>
- <KEYWORD2>sybase_close</KEYWORD2>
- <KEYWORD2>sybase_connect</KEYWORD2>
- <KEYWORD2>sybase_data_seek</KEYWORD2>
- <KEYWORD2>sybase_deadlock_retry_count</KEYWORD2>
- <KEYWORD2>sybase_fetch_array</KEYWORD2>
- <KEYWORD2>sybase_fetch_assoc</KEYWORD2>
- <KEYWORD2>sybase_fetch_field</KEYWORD2>
- <KEYWORD2>sybase_fetch_object</KEYWORD2>
- <KEYWORD2>sybase_fetch_row</KEYWORD2>
- <KEYWORD2>sybase_field_seek</KEYWORD2>
- <KEYWORD2>sybase_free_result</KEYWORD2>
- <KEYWORD2>sybase_get_last_message</KEYWORD2>
- <KEYWORD2>sybase_min_client_severity</KEYWORD2>
- <KEYWORD2>sybase_min_error_severity</KEYWORD2>
- <KEYWORD2>sybase_min_message_severity</KEYWORD2>
- <KEYWORD2>sybase_min_server_severity</KEYWORD2>
- <KEYWORD2>sybase_num_fields</KEYWORD2>
- <KEYWORD2>sybase_num_rows</KEYWORD2>
- <KEYWORD2>sybase_pconnect</KEYWORD2>
- <KEYWORD2>sybase_query</KEYWORD2>
- <KEYWORD2>sybase_result</KEYWORD2>
- <KEYWORD2>sybase_select_db</KEYWORD2>
- <KEYWORD2>sybase_set_message_handler</KEYWORD2>
- <KEYWORD2>sybase_unbuffered_query</KEYWORD2>
- <KEYWORD2>symlink</KEYWORD2>
- <KEYWORD2>syslog</KEYWORD2>
- <KEYWORD2>system</KEYWORD2>
- <KEYWORD2>system_id</KEYWORD2> <!-- domdocumenttype -->
- <KEYWORD2>tagname</KEYWORD2> <!-- domelement -->
- <KEYWORD2>tan</KEYWORD2>
- <KEYWORD2>tanh</KEYWORD2>
- <KEYWORD2>target</KEYWORD2> <!-- domprocessinginstruction -->
- <KEYWORD2>tcpwrap_check</KEYWORD2>
- <KEYWORD2>tell</KEYWORD2> <!-- lob -->
- <KEYWORD2>tempnam</KEYWORD2>
- <KEYWORD2>textdomain</KEYWORD2>
- <KEYWORD2>tidy_access_count</KEYWORD2>
- <KEYWORD2>tidy_clean_repair</KEYWORD2>
- <KEYWORD2>tidy_config_count</KEYWORD2>
- <KEYWORD2>tidy_diagnose</KEYWORD2>
- <KEYWORD2>tidy_error_count</KEYWORD2>
- <KEYWORD2>tidy_get_body</KEYWORD2>
- <KEYWORD2>tidy_get_config</KEYWORD2>
- <KEYWORD2>tidy_get_error_buffer</KEYWORD2>
- <KEYWORD2>tidy_get_head</KEYWORD2>
- <KEYWORD2>tidy_get_html</KEYWORD2>
- <KEYWORD2>tidy_get_html_ver</KEYWORD2>
- <KEYWORD2>tidy_get_output</KEYWORD2>
- <KEYWORD2>tidy_get_release</KEYWORD2>
- <KEYWORD2>tidy_get_root</KEYWORD2>
- <KEYWORD2>tidy_get_status</KEYWORD2>
- <KEYWORD2>tidy_getopt</KEYWORD2>
- <KEYWORD2>tidy_is_xhtml</KEYWORD2>
- <KEYWORD2>tidy_is_xml</KEYWORD2>
- <KEYWORD2>tidy_load_config</KEYWORD2>
- <KEYWORD2>tidy_parse_file</KEYWORD2>
- <KEYWORD2>tidy_parse_string</KEYWORD2>
- <KEYWORD2>tidy_repair_file</KEYWORD2>
- <KEYWORD2>tidy_repair_string</KEYWORD2>
- <KEYWORD2>tidy_reset_config</KEYWORD2>
- <KEYWORD2>tidy_save_config</KEYWORD2>
- <KEYWORD2>tidy_set_encoding</KEYWORD2>
- <KEYWORD2>tidy_setopt</KEYWORD2>
- <KEYWORD2>tidy_warning_count</KEYWORD2>
- <KEYWORD2>time</KEYWORD2>
- <KEYWORD2>time_nanosleep</KEYWORD2>
- <KEYWORD2>title</KEYWORD2> <!-- hw_api_object -->
- <KEYWORD2>tmpfile</KEYWORD2>
- <KEYWORD2>token_get_all</KEYWORD2>
- <KEYWORD2>token_name</KEYWORD2>
- <KEYWORD2>touch</KEYWORD2>
- <KEYWORD2>trigger_error</KEYWORD2>
- <KEYWORD2>trim</KEYWORD2> <!-- collection -->
- <KEYWORD2>truncate</KEYWORD2> <!-- lob -->
- <KEYWORD2>type</KEYWORD2> <!-- hw_api_reason -->
- <KEYWORD2>uasort</KEYWORD2>
- <KEYWORD2>ucfirst</KEYWORD2>
- <KEYWORD2>ucwords</KEYWORD2>
- <KEYWORD2>udm_add_search_limit</KEYWORD2>
- <KEYWORD2>udm_alloc_agent</KEYWORD2>
- <KEYWORD2>udm_alloc_agent_array</KEYWORD2>
- <KEYWORD2>udm_api_version</KEYWORD2>
- <KEYWORD2>udm_cat_list</KEYWORD2>
- <KEYWORD2>udm_cat_path</KEYWORD2>
- <KEYWORD2>udm_check_charset</KEYWORD2>
- <KEYWORD2>udm_check_stored</KEYWORD2>
- <KEYWORD2>udm_clear_search_limits</KEYWORD2>
- <KEYWORD2>udm_close_stored</KEYWORD2>
- <KEYWORD2>udm_crc32</KEYWORD2>
- <KEYWORD2>udm_errno</KEYWORD2>
- <KEYWORD2>udm_error</KEYWORD2>
- <KEYWORD2>udm_find</KEYWORD2>
- <KEYWORD2>udm_free_agent</KEYWORD2>
- <KEYWORD2>udm_free_ispell_data</KEYWORD2>
- <KEYWORD2>udm_free_res</KEYWORD2>
- <KEYWORD2>udm_get_doc_count</KEYWORD2>
- <KEYWORD2>udm_get_res_field</KEYWORD2>
- <KEYWORD2>udm_get_res_param</KEYWORD2>
- <KEYWORD2>udm_hash32</KEYWORD2>
- <KEYWORD2>udm_load_ispell_data</KEYWORD2>
- <KEYWORD2>udm_open_stored</KEYWORD2>
- <KEYWORD2>udm_set_agent_param</KEYWORD2>
- <KEYWORD2>uksort</KEYWORD2>
- <KEYWORD2>umask</KEYWORD2>
- <KEYWORD2>uniqid</KEYWORD2>
- <KEYWORD2>unixtojd</KEYWORD2>
- <KEYWORD2>unlink</KEYWORD2>
- <KEYWORD2>unlink_node</KEYWORD2> <!-- domnode -->
- <KEYWORD2>unlock</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>unpack</KEYWORD2>
- <KEYWORD2>unregister_tick_function</KEYWORD2>
- <KEYWORD2>unserialize</KEYWORD2>
- <KEYWORD2>urldecode</KEYWORD2>
- <KEYWORD2>urlencode</KEYWORD2>
- <KEYWORD2>user</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>user_error</KEYWORD2>
- <KEYWORD2>userlist</KEYWORD2> <!-- hw_api -->
- <KEYWORD2>usleep</KEYWORD2>
- <KEYWORD2>usort</KEYWORD2>
- <KEYWORD2>utf8_decode</KEYWORD2>
- <KEYWORD2>utf8_encode</KEYWORD2>
- <KEYWORD2>valid</KEYWORD2> <!-- arrayiterator, cachingiterator, directoryiterator, filteriterator, limititerator, recursiveiteratoriterator, simplexmliterator -->
- <KEYWORD2>validate</KEYWORD2> <!-- domdocument -->
- <KEYWORD2>value</KEYWORD2> <!-- domattribute, hw_api_attribute, hw_api_object -->
- <KEYWORD2>values</KEYWORD2> <!-- hw_api_attribute -->
- <KEYWORD2>var_dump</KEYWORD2>
- <KEYWORD2>var_export</KEYWORD2>
- <KEYWORD2>variant_abs</KEYWORD2>
- <KEYWORD2>variant_add</KEYWORD2>
- <KEYWORD2>variant_and</KEYWORD2>
- <KEYWORD2>variant_cast</KEYWORD2>
- <KEYWORD2>variant_cat</KEYWORD2>
- <KEYWORD2>variant_cmp</KEYWORD2>
- <KEYWORD2>variant_date_from_timestamp</KEYWORD2>
- <KEYWORD2>variant_date_to_timestamp</KEYWORD2>
- <KEYWORD2>variant_div</KEYWORD2>
- <KEYWORD2>variant_eqv</KEYWORD2>
- <KEYWORD2>variant_fix</KEYWORD2>
- <KEYWORD2>variant_get_type</KEYWORD2>
- <KEYWORD2>variant_idiv</KEYWORD2>
- <KEYWORD2>variant_imp</KEYWORD2>
- <KEYWORD2>variant_int</KEYWORD2>
- <KEYWORD2>variant_mod</KEYWORD2>
- <KEYWORD2>variant_mul</KEYWORD2>
- <KEYWORD2>variant_neg</KEYWORD2>
- <KEYWORD2>variant_not</KEYWORD2>
- <KEYWORD2>variant_or</KEYWORD2>
- <KEYWORD2>variant_pow</KEYWORD2>
- <KEYWORD2>variant_round</KEYWORD2>
- <KEYWORD2>variant_set</KEYWORD2>
- <KEYWORD2>variant_set_type</KEYWORD2>
- <KEYWORD2>variant_sub</KEYWORD2>
- <KEYWORD2>variant_xor</KEYWORD2>
- <KEYWORD2>version_compare</KEYWORD2>
- <KEYWORD2>vfprintf</KEYWORD2>
- <KEYWORD2>virtual</KEYWORD2>
- <KEYWORD2>vpopmail_add_alias_domain</KEYWORD2>
- <KEYWORD2>vpopmail_add_alias_domain_ex</KEYWORD2>
- <KEYWORD2>vpopmail_add_domain</KEYWORD2>
- <KEYWORD2>vpopmail_add_domain_ex</KEYWORD2>
- <KEYWORD2>vpopmail_add_user</KEYWORD2>
- <KEYWORD2>vpopmail_alias_add</KEYWORD2>
- <KEYWORD2>vpopmail_alias_del</KEYWORD2>
- <KEYWORD2>vpopmail_alias_del_domain</KEYWORD2>
- <KEYWORD2>vpopmail_alias_get</KEYWORD2>
- <KEYWORD2>vpopmail_alias_get_all</KEYWORD2>
- <KEYWORD2>vpopmail_auth_user</KEYWORD2>
- <KEYWORD2>vpopmail_del_domain</KEYWORD2>
- <KEYWORD2>vpopmail_del_domain_ex</KEYWORD2>
- <KEYWORD2>vpopmail_del_user</KEYWORD2>
- <KEYWORD2>vpopmail_error</KEYWORD2>
- <KEYWORD2>vpopmail_passwd</KEYWORD2>
- <KEYWORD2>vpopmail_set_user_quota</KEYWORD2>
- <KEYWORD2>vprintf</KEYWORD2>
- <KEYWORD2>vsprintf</KEYWORD2>
- <KEYWORD2>w32api_deftype</KEYWORD2>
- <KEYWORD2>w32api_init_dtype</KEYWORD2>
- <KEYWORD2>w32api_invoke_function</KEYWORD2>
- <KEYWORD2>w32api_register_function</KEYWORD2>
- <KEYWORD2>w32api_set_call_method</KEYWORD2>
- <KEYWORD2>wddx_add_vars</KEYWORD2>
- <KEYWORD2>wddx_deserialize</KEYWORD2>
- <KEYWORD2>wddx_packet_end</KEYWORD2>
- <KEYWORD2>wddx_packet_start</KEYWORD2>
- <KEYWORD2>wddx_serialize_value</KEYWORD2>
- <KEYWORD2>wddx_serialize_vars</KEYWORD2>
- <KEYWORD2>wordwrap</KEYWORD2>
- <KEYWORD2>write</KEYWORD2> <!-- lob -->
- <KEYWORD2>writetemporary</KEYWORD2> <!-- lob -->
- <KEYWORD2>xattr_get</KEYWORD2>
- <KEYWORD2>xattr_list</KEYWORD2>
- <KEYWORD2>xattr_remove</KEYWORD2>
- <KEYWORD2>xattr_set</KEYWORD2>
- <KEYWORD2>xattr_supported</KEYWORD2>
- <KEYWORD2>xdiff_file_diff</KEYWORD2>
- <KEYWORD2>xdiff_file_diff_binary</KEYWORD2>
- <KEYWORD2>xdiff_file_merge3</KEYWORD2>
- <KEYWORD2>xdiff_file_patch</KEYWORD2>
- <KEYWORD2>xdiff_file_patch_binary</KEYWORD2>
- <KEYWORD2>xdiff_string_diff</KEYWORD2>
- <KEYWORD2>xdiff_string_diff_binary</KEYWORD2>
- <KEYWORD2>xdiff_string_merge3</KEYWORD2>
- <KEYWORD2>xdiff_string_patch</KEYWORD2>
- <KEYWORD2>xdiff_string_patch_binary</KEYWORD2>
- <KEYWORD2>xinclude</KEYWORD2> <!-- domdocument, domdocument -->
- <KEYWORD2>xml_error_string</KEYWORD2>
- <KEYWORD2>xml_get_current_byte_index</KEYWORD2>
- <KEYWORD2>xml_get_current_column_number</KEYWORD2>
- <KEYWORD2>xml_get_current_line_number</KEYWORD2>
- <KEYWORD2>xml_get_error_code</KEYWORD2>
- <KEYWORD2>xml_parse</KEYWORD2>
- <KEYWORD2>xml_parse_into_struct</KEYWORD2>
- <KEYWORD2>xml_parser_create</KEYWORD2>
- <KEYWORD2>xml_parser_create_ns</KEYWORD2>
- <KEYWORD2>xml_parser_free</KEYWORD2>
- <KEYWORD2>xml_parser_get_option</KEYWORD2>
- <KEYWORD2>xml_parser_set_option</KEYWORD2>
- <KEYWORD2>xml_set_character_data_handler</KEYWORD2>
- <KEYWORD2>xml_set_default_handler</KEYWORD2>
- <KEYWORD2>xml_set_element_handler</KEYWORD2>
- <KEYWORD2>xml_set_end_namespace_decl_handler</KEYWORD2>
- <KEYWORD2>xml_set_external_entity_ref_handler</KEYWORD2>
- <KEYWORD2>xml_set_notation_decl_handler</KEYWORD2>
- <KEYWORD2>xml_set_object</KEYWORD2>
- <KEYWORD2>xml_set_processing_instruction_handler</KEYWORD2>
- <KEYWORD2>xml_set_start_namespace_decl_handler</KEYWORD2>
- <KEYWORD2>xml_set_unparsed_entity_decl_handler</KEYWORD2>
- <KEYWORD2>xmlrpc_decode</KEYWORD2>
- <KEYWORD2>xmlrpc_decode_request</KEYWORD2>
- <KEYWORD2>xmlrpc_encode</KEYWORD2>
- <KEYWORD2>xmlrpc_encode_request</KEYWORD2>
- <KEYWORD2>xmlrpc_get_type</KEYWORD2>
- <KEYWORD2>xmlrpc_is_fault</KEYWORD2>
- <KEYWORD2>xmlrpc_parse_method_descriptions</KEYWORD2>
- <KEYWORD2>xmlrpc_server_add_introspection_data</KEYWORD2>
- <KEYWORD2>xmlrpc_server_call_method</KEYWORD2>
- <KEYWORD2>xmlrpc_server_create</KEYWORD2>
- <KEYWORD2>xmlrpc_server_destroy</KEYWORD2>
- <KEYWORD2>xmlrpc_server_register_introspection_callback</KEYWORD2>
- <KEYWORD2>xmlrpc_server_register_method</KEYWORD2>
- <KEYWORD2>xmlrpc_set_type</KEYWORD2>
- <KEYWORD2>xpath</KEYWORD2> <!-- simplexmlelement -->
- <KEYWORD2>xpath_eval</KEYWORD2>
- <KEYWORD2>xpath_eval_expression</KEYWORD2>
- <KEYWORD2>xpath_new_context</KEYWORD2>
- <KEYWORD2>xptr_eval</KEYWORD2>
- <KEYWORD2>xptr_new_context</KEYWORD2>
- <KEYWORD2>xsl_xsltprocessor_get_parameter</KEYWORD2>
- <KEYWORD2>xsl_xsltprocessor_has_exslt_support</KEYWORD2>
- <KEYWORD2>xsl_xsltprocessor_import_stylesheet</KEYWORD2>
- <KEYWORD2>xsl_xsltprocessor_register_php_functions</KEYWORD2>
- <KEYWORD2>xsl_xsltprocessor_remove_parameter</KEYWORD2>
- <KEYWORD2>xsl_xsltprocessor_set_parameter</KEYWORD2>
- <KEYWORD2>xsl_xsltprocessor_transform_to_doc</KEYWORD2>
- <KEYWORD2>xsl_xsltprocessor_transform_to_uri</KEYWORD2>
- <KEYWORD2>xsl_xsltprocessor_transform_to_xml</KEYWORD2>
- <KEYWORD2>xslt_backend_info</KEYWORD2>
- <KEYWORD2>xslt_backend_name</KEYWORD2>
- <KEYWORD2>xslt_backend_version</KEYWORD2>
- <KEYWORD2>xslt_create</KEYWORD2>
- <KEYWORD2>xslt_errno</KEYWORD2>
- <KEYWORD2>xslt_error</KEYWORD2>
- <KEYWORD2>xslt_free</KEYWORD2>
- <KEYWORD2>xslt_getopt</KEYWORD2>
- <KEYWORD2>xslt_process</KEYWORD2>
- <KEYWORD2>xslt_set_base</KEYWORD2>
- <KEYWORD2>xslt_set_encoding</KEYWORD2>
- <KEYWORD2>xslt_set_error_handler</KEYWORD2>
- <KEYWORD2>xslt_set_log</KEYWORD2>
- <KEYWORD2>xslt_set_object</KEYWORD2>
- <KEYWORD2>xslt_set_sax_handler</KEYWORD2>
- <KEYWORD2>xslt_set_sax_handlers</KEYWORD2>
- <KEYWORD2>xslt_set_scheme_handler</KEYWORD2>
- <KEYWORD2>xslt_set_scheme_handlers</KEYWORD2>
- <KEYWORD2>xslt_setopt</KEYWORD2>
- <KEYWORD2>yaz_addinfo</KEYWORD2>
- <KEYWORD2>yaz_ccl_conf</KEYWORD2>
- <KEYWORD2>yaz_ccl_parse</KEYWORD2>
- <KEYWORD2>yaz_close</KEYWORD2>
- <KEYWORD2>yaz_connect</KEYWORD2>
- <KEYWORD2>yaz_database</KEYWORD2>
- <KEYWORD2>yaz_element</KEYWORD2>
- <KEYWORD2>yaz_errno</KEYWORD2>
- <KEYWORD2>yaz_error</KEYWORD2>
- <KEYWORD2>yaz_es_result</KEYWORD2>
- <KEYWORD2>yaz_get_option</KEYWORD2>
- <KEYWORD2>yaz_hits</KEYWORD2>
- <KEYWORD2>yaz_itemorder</KEYWORD2>
- <KEYWORD2>yaz_present</KEYWORD2>
- <KEYWORD2>yaz_range</KEYWORD2>
- <KEYWORD2>yaz_record</KEYWORD2>
- <KEYWORD2>yaz_scan</KEYWORD2>
- <KEYWORD2>yaz_scan_result</KEYWORD2>
- <KEYWORD2>yaz_schema</KEYWORD2>
- <KEYWORD2>yaz_search</KEYWORD2>
- <KEYWORD2>yaz_set_option</KEYWORD2>
- <KEYWORD2>yaz_sort</KEYWORD2>
- <KEYWORD2>yaz_syntax</KEYWORD2>
- <KEYWORD2>yaz_wait</KEYWORD2>
- <KEYWORD2>yp_all</KEYWORD2>
- <KEYWORD2>yp_cat</KEYWORD2>
- <KEYWORD2>yp_err_string</KEYWORD2>
- <KEYWORD2>yp_errno</KEYWORD2>
- <KEYWORD2>yp_first</KEYWORD2>
- <KEYWORD2>yp_get_default_domain</KEYWORD2>
- <KEYWORD2>yp_master</KEYWORD2>
- <KEYWORD2>yp_match</KEYWORD2>
- <KEYWORD2>yp_next</KEYWORD2>
- <KEYWORD2>yp_order</KEYWORD2>
- <KEYWORD2>zend_logo_guid</KEYWORD2>
- <KEYWORD2>zend_version</KEYWORD2>
- <KEYWORD2>zip_close</KEYWORD2>
- <KEYWORD2>zip_entry_close</KEYWORD2>
- <KEYWORD2>zip_entry_compressedsize</KEYWORD2>
- <KEYWORD2>zip_entry_compressionmethod</KEYWORD2>
- <KEYWORD2>zip_entry_filesize</KEYWORD2>
- <KEYWORD2>zip_entry_name</KEYWORD2>
- <KEYWORD2>zip_entry_open</KEYWORD2>
- <KEYWORD2>zip_entry_read</KEYWORD2>
- <KEYWORD2>zip_open</KEYWORD2>
- <KEYWORD2>zip_read</KEYWORD2>
- <KEYWORD2>zlib_get_coding_type</KEYWORD2>
-
-
- <!-- Alias functions (343)
- http://zend.com/phpfunc/all_aliases.php -->
- <KEYWORD2>apache_request_headers</KEYWORD2>
- <KEYWORD2>apache_response_headers</KEYWORD2>
- <KEYWORD2>attr_get</KEYWORD2>
- <KEYWORD2>attr_set</KEYWORD2>
- <KEYWORD2>autocommit</KEYWORD2>
- <KEYWORD2>bind_param</KEYWORD2>
- <KEYWORD2>bind_result</KEYWORD2>
- <KEYWORD2>bzclose</KEYWORD2>
- <KEYWORD2>bzflush</KEYWORD2>
- <KEYWORD2>bzwrite</KEYWORD2>
- <KEYWORD2>change_user</KEYWORD2>
- <KEYWORD2>character_set_name</KEYWORD2>
- <KEYWORD2>checkdnsrr</KEYWORD2>
- <KEYWORD2>chop</KEYWORD2>
- <KEYWORD2>client_encoding</KEYWORD2>
- <KEYWORD2>close</KEYWORD2>
- <KEYWORD2>commit</KEYWORD2>
- <KEYWORD2>connect</KEYWORD2>
- <KEYWORD2>data_seek</KEYWORD2>
- <KEYWORD2>debug</KEYWORD2>
- <KEYWORD2>disable_reads_from_master</KEYWORD2>
- <KEYWORD2>disable_rpl_parse</KEYWORD2>
- <KEYWORD2>diskfreespace</KEYWORD2>
- <KEYWORD2>doubleval</KEYWORD2>
- <KEYWORD2>dump_debug_info</KEYWORD2>
- <KEYWORD2>enable_reads_from_master</KEYWORD2>
- <KEYWORD2>enable_rpl_parse</KEYWORD2>
- <KEYWORD2>escape_string</KEYWORD2>
- <KEYWORD2>execute</KEYWORD2>
- <KEYWORD2>fbird_add_user</KEYWORD2>
- <KEYWORD2>fbird_affected_rows</KEYWORD2>
- <KEYWORD2>fbird_backup</KEYWORD2>
- <KEYWORD2>fbird_blob_add</KEYWORD2>
- <KEYWORD2>fbird_blob_cancel</KEYWORD2>
- <KEYWORD2>fbird_blob_close</KEYWORD2>
- <KEYWORD2>fbird_blob_create</KEYWORD2>
- <KEYWORD2>fbird_blob_echo</KEYWORD2>
- <KEYWORD2>fbird_blob_get</KEYWORD2>
- <KEYWORD2>fbird_blob_import</KEYWORD2>
- <KEYWORD2>fbird_blob_info</KEYWORD2>
- <KEYWORD2>fbird_blob_open</KEYWORD2>
- <KEYWORD2>fbird_close</KEYWORD2>
- <KEYWORD2>fbird_commit</KEYWORD2>
- <KEYWORD2>fbird_commit_ret</KEYWORD2>
- <KEYWORD2>fbird_connect</KEYWORD2>
- <KEYWORD2>fbird_db_info</KEYWORD2>
- <KEYWORD2>fbird_delete_user</KEYWORD2>
- <KEYWORD2>fbird_drop_db</KEYWORD2>
- <KEYWORD2>fbird_errcode</KEYWORD2>
- <KEYWORD2>fbird_errmsg</KEYWORD2>
- <KEYWORD2>fbird_execute</KEYWORD2>
- <KEYWORD2>fbird_fetch_assoc</KEYWORD2>
- <KEYWORD2>fbird_fetch_object</KEYWORD2>
- <KEYWORD2>fbird_fetch_row</KEYWORD2>
- <KEYWORD2>fbird_field_info</KEYWORD2>
- <KEYWORD2>fbird_free_event_handler</KEYWORD2>
- <KEYWORD2>fbird_free_query</KEYWORD2>
- <KEYWORD2>fbird_free_result</KEYWORD2>
- <KEYWORD2>fbird_gen_id</KEYWORD2>
- <KEYWORD2>fbird_maintain_db</KEYWORD2>
- <KEYWORD2>fbird_modify_user</KEYWORD2>
- <KEYWORD2>fbird_name_result</KEYWORD2>
- <KEYWORD2>fbird_num_fields</KEYWORD2>
- <KEYWORD2>fbird_num_params</KEYWORD2>
- <KEYWORD2>fbird_num_rows</KEYWORD2>
- <KEYWORD2>fbird_param_info</KEYWORD2>
- <KEYWORD2>fbird_pconnect</KEYWORD2>
- <KEYWORD2>fbird_prepare</KEYWORD2>
- <KEYWORD2>fbird_query</KEYWORD2>
- <KEYWORD2>fbird_restore</KEYWORD2>
- <KEYWORD2>fbird_rollback</KEYWORD2>
- <KEYWORD2>fbird_rollback_ret</KEYWORD2>
- <KEYWORD2>fbird_server_info</KEYWORD2>
- <KEYWORD2>fbird_service_attach</KEYWORD2>
- <KEYWORD2>fbird_service_detach</KEYWORD2>
- <KEYWORD2>fbird_set_event_handler</KEYWORD2>
- <KEYWORD2>fbird_trans</KEYWORD2>
- <KEYWORD2>fbird_wait_event</KEYWORD2>
- <KEYWORD2>fbsql</KEYWORD2>
- <KEYWORD2>fbsql_tablename</KEYWORD2>
- <KEYWORD2>fetch</KEYWORD2>
- <KEYWORD2>fetch_array</KEYWORD2>
- <KEYWORD2>fetch_assoc</KEYWORD2>
- <KEYWORD2>fetch_field</KEYWORD2>
- <KEYWORD2>fetch_field_direct</KEYWORD2>
- <KEYWORD2>fetch_fields</KEYWORD2>
- <KEYWORD2>fetch_object</KEYWORD2>
- <KEYWORD2>fetch_row</KEYWORD2>
- <KEYWORD2>field_count</KEYWORD2>
- <KEYWORD2>field_seek</KEYWORD2>
- <KEYWORD2>fputs</KEYWORD2>
- <KEYWORD2>free</KEYWORD2>
- <KEYWORD2>free_result</KEYWORD2>
- <KEYWORD2>ftp_quit</KEYWORD2>
- <KEYWORD2>get_client_info</KEYWORD2>
- <KEYWORD2>get_required_files</KEYWORD2>
- <KEYWORD2>get_server_info</KEYWORD2>
- <KEYWORD2>getallheaders</KEYWORD2>
- <KEYWORD2>getmxrr</KEYWORD2>
- <KEYWORD2>gmp_div</KEYWORD2>
- <KEYWORD2>gzclose</KEYWORD2>
- <KEYWORD2>gzeof</KEYWORD2>
- <KEYWORD2>gzgetc</KEYWORD2>
- <KEYWORD2>gzgets</KEYWORD2>
- <KEYWORD2>gzgetss</KEYWORD2>
- <KEYWORD2>gzpassthru</KEYWORD2>
- <KEYWORD2>gzputs</KEYWORD2>
- <KEYWORD2>gzread</KEYWORD2>
- <KEYWORD2>gzrewind</KEYWORD2>
- <KEYWORD2>gzseek</KEYWORD2>
- <KEYWORD2>gztell</KEYWORD2>
- <KEYWORD2>gzwrite</KEYWORD2>
- <KEYWORD2>imap_create</KEYWORD2>
- <KEYWORD2>imap_fetchtext</KEYWORD2>
- <KEYWORD2>imap_header</KEYWORD2>
- <KEYWORD2>imap_listmailbox</KEYWORD2>
- <KEYWORD2>imap_listsubscribed</KEYWORD2>
- <KEYWORD2>imap_rename</KEYWORD2>
- <KEYWORD2>ini_alter</KEYWORD2>
- <KEYWORD2>init</KEYWORD2>
- <KEYWORD2>is_double</KEYWORD2>
- <KEYWORD2>is_int</KEYWORD2>
- <KEYWORD2>is_integer</KEYWORD2>
- <KEYWORD2>is_real</KEYWORD2>
- <KEYWORD2>is_writeable</KEYWORD2>
- <KEYWORD2>join</KEYWORD2>
- <KEYWORD2>key_exists</KEYWORD2>
- <KEYWORD2>kill</KEYWORD2>
- <KEYWORD2>ldap_close</KEYWORD2>
- <KEYWORD2>ldap_modify</KEYWORD2>
- <KEYWORD2>magic_quotes_runtime</KEYWORD2>
- <KEYWORD2>master_query</KEYWORD2>
- <KEYWORD2>ming_keypress</KEYWORD2>
- <KEYWORD2>ming_setcubicthreshold</KEYWORD2>
- <KEYWORD2>ming_setscale</KEYWORD2>
- <KEYWORD2>ming_useconstants</KEYWORD2>
- <KEYWORD2>ming_useswfversion</KEYWORD2>
- <KEYWORD2>more_results</KEYWORD2>
- <KEYWORD2>msql</KEYWORD2>
- <KEYWORD2>msql_affected_rows</KEYWORD2>
- <KEYWORD2>msql_createdb</KEYWORD2>
- <KEYWORD2>msql_dbname</KEYWORD2>
- <KEYWORD2>msql_dropdb</KEYWORD2>
- <KEYWORD2>msql_fieldflags</KEYWORD2>
- <KEYWORD2>msql_fieldlen</KEYWORD2>
- <KEYWORD2>msql_fieldname</KEYWORD2>
- <KEYWORD2>msql_fieldtable</KEYWORD2>
- <KEYWORD2>msql_fieldtype</KEYWORD2>
- <KEYWORD2>msql_freeresult</KEYWORD2>
- <KEYWORD2>msql_listdbs</KEYWORD2>
- <KEYWORD2>msql_listfields</KEYWORD2>
- <KEYWORD2>msql_listtables</KEYWORD2>
- <KEYWORD2>msql_numfields</KEYWORD2>
- <KEYWORD2>msql_numrows</KEYWORD2>
- <KEYWORD2>msql_regcase</KEYWORD2>
- <KEYWORD2>msql_selectdb</KEYWORD2>
- <KEYWORD2>msql_tablename</KEYWORD2>
- <KEYWORD2>mssql_affected_rows</KEYWORD2>
- <KEYWORD2>mssql_close</KEYWORD2>
- <KEYWORD2>mssql_connect</KEYWORD2>
- <KEYWORD2>mssql_data_seek</KEYWORD2>
- <KEYWORD2>mssql_deadlock_retry_count</KEYWORD2>
- <KEYWORD2>mssql_fetch_array</KEYWORD2>
- <KEYWORD2>mssql_fetch_assoc</KEYWORD2>
- <KEYWORD2>mssql_fetch_field</KEYWORD2>
- <KEYWORD2>mssql_fetch_object</KEYWORD2>
- <KEYWORD2>mssql_fetch_row</KEYWORD2>
- <KEYWORD2>mssql_field_seek</KEYWORD2>
- <KEYWORD2>mssql_free_result</KEYWORD2>
- <KEYWORD2>mssql_get_last_message</KEYWORD2>
- <KEYWORD2>mssql_min_client_severity</KEYWORD2>
- <KEYWORD2>mssql_min_error_severity</KEYWORD2>
- <KEYWORD2>mssql_min_message_severity</KEYWORD2>
- <KEYWORD2>mssql_min_server_severity</KEYWORD2>
- <KEYWORD2>mssql_num_fields</KEYWORD2>
- <KEYWORD2>mssql_num_rows</KEYWORD2>
- <KEYWORD2>mssql_pconnect</KEYWORD2>
- <KEYWORD2>mssql_query</KEYWORD2>
- <KEYWORD2>mssql_result</KEYWORD2>
- <KEYWORD2>mssql_select_db</KEYWORD2>
- <KEYWORD2>mssql_set_message_handler</KEYWORD2>
- <KEYWORD2>mssql_unbuffered_query</KEYWORD2>
- <KEYWORD2>multi_query</KEYWORD2>
- <KEYWORD2>mysql</KEYWORD2>
- <KEYWORD2>mysql_createdb</KEYWORD2>
- <KEYWORD2>mysql_db_name</KEYWORD2>
- <KEYWORD2>mysql_dbname</KEYWORD2>
- <KEYWORD2>mysql_dropdb</KEYWORD2>
- <KEYWORD2>mysql_fieldflags</KEYWORD2>
- <KEYWORD2>mysql_fieldlen</KEYWORD2>
- <KEYWORD2>mysql_fieldname</KEYWORD2>
- <KEYWORD2>mysql_fieldtable</KEYWORD2>
- <KEYWORD2>mysql_fieldtype</KEYWORD2>
- <KEYWORD2>mysql_freeresult</KEYWORD2>
- <KEYWORD2>mysql_listdbs</KEYWORD2>
- <KEYWORD2>mysql_listfields</KEYWORD2>
- <KEYWORD2>mysql_listtables</KEYWORD2>
- <KEYWORD2>mysql_numfields</KEYWORD2>
- <KEYWORD2>mysql_numrows</KEYWORD2>
- <KEYWORD2>mysql_selectdb</KEYWORD2>
- <KEYWORD2>mysql_table_name</KEYWORD2>
- <KEYWORD2>mysql_tablename</KEYWORD2>
- <KEYWORD2>mysqli</KEYWORD2>
- <KEYWORD2>mysqli_execute</KEYWORD2>
- <KEYWORD2>mysqli_fetch</KEYWORD2>
- <KEYWORD2>mysqli_set_opt</KEYWORD2>
- <KEYWORD2>next_result</KEYWORD2>
- <KEYWORD2>num_rows</KEYWORD2>
- <KEYWORD2>oci_free_cursor</KEYWORD2>
- <KEYWORD2>ocibindbyname</KEYWORD2>
- <KEYWORD2>ocicancel</KEYWORD2>
- <KEYWORD2>ocicollappend</KEYWORD2>
- <KEYWORD2>ocicollassignelem</KEYWORD2>
- <KEYWORD2>ocicollgetelem</KEYWORD2>
- <KEYWORD2>ocicollmax</KEYWORD2>
- <KEYWORD2>ocicollsize</KEYWORD2>
- <KEYWORD2>ocicolltrim</KEYWORD2>
- <KEYWORD2>ocicolumnisnull</KEYWORD2>
- <KEYWORD2>ocicolumnname</KEYWORD2>
- <KEYWORD2>ocicolumnprecision</KEYWORD2>
- <KEYWORD2>ocicolumnscale</KEYWORD2>
- <KEYWORD2>ocicolumnsize</KEYWORD2>
- <KEYWORD2>ocicolumntype</KEYWORD2>
- <KEYWORD2>ocicolumntyperaw</KEYWORD2>
- <KEYWORD2>ocicommit</KEYWORD2>
- <KEYWORD2>ocidefinebyname</KEYWORD2>
- <KEYWORD2>ocierror</KEYWORD2>
- <KEYWORD2>ociexecute</KEYWORD2>
- <KEYWORD2>ocifetch</KEYWORD2>
- <KEYWORD2>ocifetchstatement</KEYWORD2>
- <KEYWORD2>ocifreecollection</KEYWORD2>
- <KEYWORD2>ocifreecursor</KEYWORD2>
- <KEYWORD2>ocifreedesc</KEYWORD2>
- <KEYWORD2>ocifreestatement</KEYWORD2>
- <KEYWORD2>ociinternaldebug</KEYWORD2>
- <KEYWORD2>ociloadlob</KEYWORD2>
- <KEYWORD2>ocilogoff</KEYWORD2>
- <KEYWORD2>ocilogon</KEYWORD2>
- <KEYWORD2>ocinewcollection</KEYWORD2>
- <KEYWORD2>ocinewcursor</KEYWORD2>
- <KEYWORD2>ocinewdescriptor</KEYWORD2>
- <KEYWORD2>ocinlogon</KEYWORD2>
- <KEYWORD2>ocinumcols</KEYWORD2>
- <KEYWORD2>ociparse</KEYWORD2>
- <KEYWORD2>ocipasswordchange</KEYWORD2>
- <KEYWORD2>ociplogon</KEYWORD2>
- <KEYWORD2>ociresult</KEYWORD2>
- <KEYWORD2>ocirollback</KEYWORD2>
- <KEYWORD2>ocirowcount</KEYWORD2>
- <KEYWORD2>ocisavelob</KEYWORD2>
- <KEYWORD2>ocisavelobfile</KEYWORD2>
- <KEYWORD2>ociserverversion</KEYWORD2>
- <KEYWORD2>ocisetprefetch</KEYWORD2>
- <KEYWORD2>ocistatementtype</KEYWORD2>
- <KEYWORD2>ociwritelobtofile</KEYWORD2>
- <KEYWORD2>odbc_do</KEYWORD2>
- <KEYWORD2>odbc_field_precision</KEYWORD2>
- <KEYWORD2>openssl_free_key</KEYWORD2>
- <KEYWORD2>openssl_get_privatekey</KEYWORD2>
- <KEYWORD2>openssl_get_publickey</KEYWORD2>
- <KEYWORD2>options</KEYWORD2>
- <KEYWORD2>pg_clientencoding</KEYWORD2>
- <KEYWORD2>pg_cmdtuples</KEYWORD2>
- <KEYWORD2>pg_errormessage</KEYWORD2>
- <KEYWORD2>pg_exec</KEYWORD2>
- <KEYWORD2>pg_fieldisnull</KEYWORD2>
- <KEYWORD2>pg_fieldname</KEYWORD2>
- <KEYWORD2>pg_fieldnum</KEYWORD2>
- <KEYWORD2>pg_fieldprtlen</KEYWORD2>
- <KEYWORD2>pg_fieldsize</KEYWORD2>
- <KEYWORD2>pg_fieldtype</KEYWORD2>
- <KEYWORD2>pg_freeresult</KEYWORD2>
- <KEYWORD2>pg_getlastoid</KEYWORD2>
- <KEYWORD2>pg_loclose</KEYWORD2>
- <KEYWORD2>pg_locreate</KEYWORD2>
- <KEYWORD2>pg_loexport</KEYWORD2>
- <KEYWORD2>pg_loimport</KEYWORD2>
- <KEYWORD2>pg_loopen</KEYWORD2>
- <KEYWORD2>pg_loread</KEYWORD2>
- <KEYWORD2>pg_loreadall</KEYWORD2>
- <KEYWORD2>pg_lounlink</KEYWORD2>
- <KEYWORD2>pg_lowrite</KEYWORD2>
- <KEYWORD2>pg_numfields</KEYWORD2>
- <KEYWORD2>pg_numrows</KEYWORD2>
- <KEYWORD2>pg_result</KEYWORD2>
- <KEYWORD2>pg_setclientencoding</KEYWORD2>
- <KEYWORD2>ping</KEYWORD2>
- <KEYWORD2>pos</KEYWORD2>
- <KEYWORD2>posix_errno</KEYWORD2>
- <KEYWORD2>prepare</KEYWORD2>
- <KEYWORD2>query</KEYWORD2>
- <KEYWORD2>read_exif_data</KEYWORD2>
- <KEYWORD2>real_connect</KEYWORD2>
- <KEYWORD2>real_escape_string</KEYWORD2>
- <KEYWORD2>real_query</KEYWORD2>
- <KEYWORD2>recode</KEYWORD2>
- <KEYWORD2>reset</KEYWORD2>
- <KEYWORD2>result_metadata</KEYWORD2>
- <KEYWORD2>rollback</KEYWORD2>
- <KEYWORD2>rpl_parse_enabled</KEYWORD2>
- <KEYWORD2>rpl_probe</KEYWORD2>
- <KEYWORD2>rpl_query_type</KEYWORD2>
- <KEYWORD2>select_db</KEYWORD2>
- <KEYWORD2>send_long_data</KEYWORD2>
- <KEYWORD2>session_commit</KEYWORD2>
- <KEYWORD2>set_file_buffer</KEYWORD2>
- <KEYWORD2>set_local_infile_default</KEYWORD2>
- <KEYWORD2>set_local_infile_handler</KEYWORD2>
- <KEYWORD2>set_opt</KEYWORD2>
- <KEYWORD2>show_source</KEYWORD2>
- <KEYWORD2>sizeof</KEYWORD2>
- <KEYWORD2>slave_query</KEYWORD2>
- <KEYWORD2>snmpwalkoid</KEYWORD2>
- <KEYWORD2>socket_get_status</KEYWORD2>
- <KEYWORD2>socket_getopt</KEYWORD2>
- <KEYWORD2>socket_set_blocking</KEYWORD2>
- <KEYWORD2>socket_set_timeout</KEYWORD2>
- <KEYWORD2>socket_setopt</KEYWORD2>
- <KEYWORD2>sqlite_fetch_string</KEYWORD2>
- <KEYWORD2>sqlite_has_more</KEYWORD2>
- <KEYWORD2>ssl_set</KEYWORD2>
- <KEYWORD2>stat</KEYWORD2>
- <KEYWORD2>stmt</KEYWORD2>
- <KEYWORD2>stmt_init</KEYWORD2>
- <KEYWORD2>store_result</KEYWORD2>
- <KEYWORD2>strchr</KEYWORD2>
- <KEYWORD2>stream_register_wrapper</KEYWORD2>
- <KEYWORD2>thread_safe</KEYWORD2>
- <KEYWORD2>use_result</KEYWORD2>
- <KEYWORD2>user_error</KEYWORD2>
- <KEYWORD2>velocis_autocommit</KEYWORD2>
- <KEYWORD2>velocis_close</KEYWORD2>
- <KEYWORD2>velocis_commit</KEYWORD2>
- <KEYWORD2>velocis_connect</KEYWORD2>
- <KEYWORD2>velocis_exec</KEYWORD2>
- <KEYWORD2>velocis_fetch</KEYWORD2>
- <KEYWORD2>velocis_fieldname</KEYWORD2>
- <KEYWORD2>velocis_fieldnum</KEYWORD2>
- <KEYWORD2>velocis_freeresult</KEYWORD2>
- <KEYWORD2>velocis_off_autocommit</KEYWORD2>
- <KEYWORD2>velocis_result</KEYWORD2>
- <KEYWORD2>velocis_rollback</KEYWORD2>
- <KEYWORD2>virtual</KEYWORD2>
-
-
- <!-- Language constructs (69)
- http://www.php.net/manual/en/reserved.php -->
- <KEYWORD1>__CLASS__</KEYWORD1>
- <KEYWORD1>__DIR__</KEYWORD1>
- <KEYWORD1>__FILE__</KEYWORD1>
- <KEYWORD1>__FUNCTION__</KEYWORD1>
- <KEYWORD1>__LINE__</KEYWORD1>
- <KEYWORD1>__METHOD__</KEYWORD1>
- <KEYWORD1>__NAMESPACE__</KEYWORD1>
- <KEYWORD1>abstract</KEYWORD1>
- <OPERATOR>and</OPERATOR>
- <KEYWORD1>array</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>cfunction</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>clone</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>declare</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>die</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>echo</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>elseif</KEYWORD1>
- <KEYWORD1>empty</KEYWORD1>
- <KEYWORD1>enddeclare</KEYWORD1>
- <KEYWORD1>endfor</KEYWORD1>
- <KEYWORD1>endforeach</KEYWORD1>
- <KEYWORD1>endif</KEYWORD1>
- <KEYWORD1>endswitch</KEYWORD1>
- <KEYWORD1>endwhile</KEYWORD1>
- <KEYWORD1>eval</KEYWORD1>
- <KEYWORD1>exception</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>false</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>foreach</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>global</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
- <KEYWORD1>include</KEYWORD1>
- <KEYWORD1>include_once</KEYWORD1>
- <KEYWORD1>instanceof</KEYWORD1>
- <KEYWORD1>interface</KEYWORD1>
- <KEYWORD1>isset</KEYWORD1>
- <KEYWORD1>list</KEYWORD1>
- <KEYWORD1>namespace</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>null</KEYWORD1>
- <KEYWORD1>old_function</KEYWORD1>
- <OPERATOR>or</OPERATOR>
- <KEYWORD1>php_user_filter</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>require</KEYWORD1>
- <KEYWORD1>require_once</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>true</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>unset</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <OPERATOR>xor</OPERATOR>
- <!-- end: generated by buildfunctionlist.php -->
- <!-- }}} -->
-
- <!-- xdebug functions -->
- <!-- {{{ -->
- <KEYWORD2>xdebug_break</KEYWORD2>
- <KEYWORD2>xdebug_call_class</KEYWORD2>
- <KEYWORD2>xdebug_call_file</KEYWORD2>
- <KEYWORD2>xdebug_call_function</KEYWORD2>
- <KEYWORD2>xdebug_call_line</KEYWORD2>
- <KEYWORD2>xdebug_disable</KEYWORD2>
- <KEYWORD2>xdebug_dump_function_profile</KEYWORD2><!-- version 1 only -->
- <KEYWORD2>xdebug_dump_function_trace</KEYWORD2><!-- version 1 only -->
- <KEYWORD2>xdebug_dump_superglobals</KEYWORD2>
- <KEYWORD2>xdebug_enable</KEYWORD2>
- <KEYWORD2>xdebug_get_code_coverage</KEYWORD2>
- <KEYWORD2>xdebug_get_function_count</KEYWORD2>
- <KEYWORD2>xdebug_get_function_profile</KEYWORD2><!-- version 1 only -->
- <KEYWORD2>xdebug_get_function_stack</KEYWORD2>
- <KEYWORD2>xdebug_get_function_trace</KEYWORD2><!-- version 1 only -->
- <KEYWORD2>xdebug_get_stack_depth</KEYWORD2>
- <KEYWORD2>xdebug_is_enabled</KEYWORD2>
- <KEYWORD2>xdebug_memory_usage</KEYWORD2>
- <KEYWORD2>xdebug_peak_memory_usage</KEYWORD2>
- <KEYWORD2>xdebug_print_function_stack</KEYWORD2>
- <KEYWORD2>xdebug_start_code_coverage</KEYWORD2>
- <KEYWORD2>xdebug_start_profiling</KEYWORD2><!-- version 1 only -->
- <KEYWORD2>xdebug_start_trace</KEYWORD2><!-- version 1 only -->
- <KEYWORD2>xdebug_stop_code_coverage</KEYWORD2>
- <KEYWORD2>xdebug_stop_profiling</KEYWORD2><!-- version 1 only -->
- <KEYWORD2>xdebug_stop_trace</KEYWORD2><!-- version 1 only -->
- <KEYWORD2>xdebug_time_index</KEYWORD2>
- <KEYWORD2>xdebug_var_dump</KEYWORD2>
- <!-- }}} -->
-
- <!-- Basic SimpleTest methods -->
- <!-- {{{ -->
- <KEYWORD2>assertCopy</KEYWORD2>
- <KEYWORD2>assertEqual</KEYWORD2>
- <KEYWORD2>assertError</KEYWORD2>
- <KEYWORD2>assertErrorPattern</KEYWORD2>
- <KEYWORD2>assertFalse</KEYWORD2>
- <KEYWORD2>assertIdentical</KEYWORD2>
- <KEYWORD2>assertIsA</KEYWORD2>
- <KEYWORD2>assertNoErrors</KEYWORD2>
- <KEYWORD2>assertNoUnwantedPattern</KEYWORD2>
- <KEYWORD2>assertNotA</KEYWORD2>
- <KEYWORD2>assertNotEqual</KEYWORD2>
- <KEYWORD2>assertNotIdentical</KEYWORD2>
- <KEYWORD2>assertNotNull</KEYWORD2>
- <KEYWORD2>assertNull</KEYWORD2>
- <KEYWORD2>assertReference</KEYWORD2>
- <KEYWORD2>assertTrue</KEYWORD2>
- <KEYWORD2>assertWantedPattern</KEYWORD2>
-
- <KEYWORD2>setReturnValue</KEYWORD2>
- <KEYWORD2>setReturnValueAt</KEYWORD2>
- <KEYWORD2>setReturnReference</KEYWORD2>
- <KEYWORD2>setReturnReferenceAt</KEYWORD2>
- <KEYWORD2>expectArguments</KEYWORD2>
- <KEYWORD2>expectArgumentsAt</KEYWORD2>
- <KEYWORD2>expectCallCount</KEYWORD2>
- <KEYWORD2>expectMaximumCallCount</KEYWORD2>
- <KEYWORD2>expectMinimumCallCount</KEYWORD2>
- <KEYWORD2>expectNever</KEYWORD2>
- <KEYWORD2>expectOnce</KEYWORD2>
- <KEYWORD2>expectAtLeastOnce</KEYWORD2>
- <KEYWORD2>tally</KEYWORD2>
-
- <KEYWORD2>dump</KEYWORD2>
- <KEYWORD2>error</KEYWORD2>
- <KEYWORD2>fail</KEYWORD2>
- <KEYWORD2>pass</KEYWORD2>
- <KEYWORD2>sendMessage</KEYWORD2>
- <KEYWORD2>setUp</KEYWORD2>
- <KEYWORD2>signal</KEYWORD2>
- <KEYWORD2>swallowErrors</KEYWORD2>
- <KEYWORD2>tearDown</KEYWORD2>
- <!-- }}} -->
-
- <!-- more magical functions -->
- <KEYWORD2>__autoload</KEYWORD2>
- <KEYWORD2>__destruct</KEYWORD2>
- <KEYWORD2>__get</KEYWORD2>
- <KEYWORD2>__set</KEYWORD2>
- <KEYWORD2>__sleep</KEYWORD2>
- <KEYWORD2>__wakeup</KEYWORD2>
-
- <!-- more constructs -->
- <KEYWORD4>parent</KEYWORD4>
- <KEYWORD4>self</KEYWORD4>
- <KEYWORD4>stdClass</KEYWORD4>
- </KEYWORDS>
- </RULES>
-
-
- <RULES SET="KEYWORDS_VISIBILITY">
- <KEYWORDS>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- </KEYWORDS>
- </RULES>
-
-
- <!-- Javascript -->
- <RULES SET="JAVASCRIPT_OPENTAG" DEFAULT="MARKUP">
- <SEQ TYPE="MARKUP" DELEGATE="JAVASCRIPT">></SEQ>
- <IMPORT DELEGATE="TO_LITERAL+PHP"/> <!-- handle PHP in <script> tag -->
- <IMPORT DELEGATE="html::TAGS" /> <!-- handle e.g. 'style="width:1px"' -->
- </RULES>
-
-
- <!-- Handle literals, but allow switching to PHP therein, e.g. from html TAGS -->
- <RULES SET="TO_LITERAL+PHP">
- <SPAN TYPE="LITERAL1" DELEGATE="LITERAL1+PHP">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL2" DELEGATE="LITERAL2+PHP">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <IMPORT DELEGATE="TO_PHP"/>
- </RULES>
-
-
- <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" ESCAPE="\">
- <IMPORT DELEGATE="TO_LITERAL+PHP"/>
- <IMPORT DELEGATE="TO_PHP"/>
- <IMPORT DELEGATE="javascript::MAIN"/>
- </RULES>
-
-
- <!-- Handle PHP tags in LITERAL1, e.g. in the "type" attribute of a <SCRIPT> tag -->
- <RULES SET="LITERAL1+PHP" DEFAULT="LITERAL1" ESCAPE="\">
- <IMPORT DELEGATE="TO_PHP"/>
- </RULES>
-
-
- <!-- Handle PHP tags in LITERAL2, e.g. in the "type" attribute of a <SCRIPT> tag -->
- <RULES SET="LITERAL2+PHP" DEFAULT="LITERAL2" ESCAPE="\">
- <IMPORT DELEGATE="TO_PHP"/>
- </RULES>
-
-
- <!-- Handle PHP tags in comments -->
- <RULES SET="COMMENT1+PHP" DEFAULT="COMMENT1">
- <IMPORT DELEGATE="TO_PHP"/>
- </RULES>
-
-
- <!-- Go to PHP mode again -->
- <RULES SET="TO_PHP" DEFAULT="MARKUP">
- <SPAN TYPE="MARKUP" DELEGATE="PHP">
- <BEGIN><?php</BEGIN>
- <END>?></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="PHP">
- <BEGIN><?</BEGIN>
- <END>?></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="PHP">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
-
-
- <!-- Extended label block, also uses "|" as seperator -->
- <RULES SET="PHPDOC_LABEL_BLOCK_EXTENDED" DEFAULT="COMMENT3"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
- <SEQ TYPE="OPERATOR">|</SEQ>
-
- <!-- Delegate back (gets not caught from PHPDOC_LABEL_BLOCK): -->
- <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS" />
- <IMPORT DELEGATE="PHPDOC_LABEL_BLOCK" />
-
- <IMPORT DELEGATE="PHPDOC_LABEL_KEYWORDS" />
- <IMPORT DELEGATE="PHPDOC" />
- <IMPORT DELEGATE="PHPDOC_VAR" />
- <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
- </RULES>
-
- <!-- A block after a label tag like "@see" -->
- <RULES SET="PHPDOC_LABEL_BLOCK" DEFAULT="COMMENT3"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
-
- <!-- Delegate back -->
- <!-- <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS" /> -->
-
- <SEQ TYPE="COMMENT3" DELEGATE="PHPDOC">*/</SEQ>
-
- <MARK_PREVIOUS TYPE="FUNCTION">()</MARK_PREVIOUS>
-
- <IMPORT DELEGATE="PHPDOC_LABEL_KEYWORDS" />
- <IMPORT DELEGATE="PHPDOC" />
- <IMPORT DELEGATE="PHPDOC_VAR" />
- <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
- <IMPORT DELEGATE="PHP_TYPES" />
- </RULES>
-
-
- <!-- A block after @access -->
- <RULES SET="PHPDOC_LABEL_BLOCK_ACCESS" DEFAULT="COMMENT3"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
- <IMPORT DELEGATE="KEYWORDS_VISIBILITY" />
-
- <!-- Delegate back: -->
- <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS"/>
- </RULES>
-
-
- <RULES SET="PHPDOC_BLOCK" DEFAULT="COMMENT3"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
- <!-- highlight function/method name as token type FUNCTION -->
- <MARK_PREVIOUS TYPE="FUNCTION">()</MARK_PREVIOUS>
-
- <!-- Delegate back: -->
- <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS"/>
- <IMPORT DELEGATE="PHPDOC"/>
- <IMPORT DELEGATE="PHPDOC_VAR"/>
- </RULES>
-
-
- <!-- Helper for class references in rule PHPDOC -->
- <RULES SET="OBJECT_PHPDOC">
- <SPAN TYPE="OPERATOR" DELEGATE="PHP">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
- <SEQ_REGEXP TYPE="FUNCTION" HASH_CHAR="->" DELEGATE="PHPDOC">->\w+\s*(?=\()</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHPDOC">->\w+(?=(\[[\s\w'"]+\])?->)</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="PHPDOC">->\w*</SEQ_REGEXP>
-
- <IMPORT DELEGATE="PHP_KEYWORDS" />
- </RULES>
-
-
- <!-- Almost like PHP_VAR - but with another delegate -->
- <RULES SET="PHPDOC_VAR">
- <!-- (Class-)Variables -->
- <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHPDOC">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[[\s\w'"]+\])?->)</SEQ_REGEXP>
-
- <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
-
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD4">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=\s*=\s*(&\s*)?new)</SEQ_REGEXP>
-
- <!-- Normal variables -->
- <IMPORT DELEGATE="PHP_VAR" />
- </RULES>
-
-
- <!-- phpdoc / phpDocumentor label tags -->
- <RULES SET="PHPDOC_LABEL_KEYWORDS">
- <!-- {{{
- Some (@global, @param, ..) are here just for complete-word -->
- <KEYWORDS>
- <LABEL>@abstract</LABEL>
- <LABEL>@access</LABEL>
- <LABEL>@author</LABEL>
- <LABEL>@category</LABEL>
- <LABEL>@const</LABEL>
- <LABEL>@constant</LABEL>
- <LABEL>@copyright</LABEL>
- <LABEL>@deprecated</LABEL>
- <LABEL>@example</LABEL>
- <LABEL>@filesource</LABEL>
- <LABEL>@final</LABEL>
- <LABEL>@global</LABEL>
- <LABEL>@ignore</LABEL>
- <LABEL>@internal</LABEL>
- <LABEL>@license</LABEL>
- <LABEL>@link</LABEL>
- <LABEL>@name</LABEL>
- <LABEL>@package</LABEL>
- <LABEL>@param</LABEL>
- <LABEL>@return</LABEL>
- <LABEL>@see</LABEL>
- <LABEL>@since</LABEL>
- <LABEL>@static</LABEL>
- <LABEL>@staticvar</LABEL>
- <LABEL>@subpackage</LABEL>
- <LABEL>@throws</LABEL>
- <LABEL>@todo</LABEL>
- <LABEL>@tutorial</LABEL>
- <LABEL>@uses</LABEL>
- <LABEL>@var</LABEL>
- <LABEL>@version</LABEL>
- </KEYWORDS>
- <!-- }}} -->
- </RULES>
-
-
- <!-- Delegate to PHPDOC_LABEL_BLOCK[_EXTENDED|_ACCESS] or back to PHPDOC -->
- <RULES SET="PHPDOC_DELEGATE_LABEL_BLOCKS" DEFAULT="COMMENT3">
- <!-- Delegate empty line (just an asterisk) back to PHPDOC -->
- <SEQ_REGEXP TYPE="COMMENT3" AT_WHITESPACE_END="TRUE" DELEGATE="PHPDOC" HASH_CHAR="*">\*\s*$</SEQ_REGEXP>
-
- <SEQ_REGEXP TYPE="LABEL" HASH_CHAR="@"
- DELEGATE="PHPDOC_LABEL_BLOCK_EXTENDED">@(global|param|return|staticvar|var|throws)</SEQ_REGEXP>
-
- <SEQ_REGEXP TYPE="LABEL" HASH_CHAR="@"
- DELEGATE="PHPDOC_LABEL_BLOCK">@(deprecated|see|uses)</SEQ_REGEXP>
-
- <SEQ TYPE="LABEL" DELEGATE="PHPDOC_LABEL_BLOCK_ACCESS">@access</SEQ>
-
- <!-- Delegate the remaining phpdoc tags back to PHPDOC_BLOCK: -->
- <SEQ_REGEXP TYPE="LABEL" HASH_CHAR="@"
- DELEGATE="PHPDOC_BLOCK">@(abstract|author|category|const|constant|copyright|example|filesource|final|ignore|internal|license|link|name|package|since|static|subpackage|todo|tutorial|version)</SEQ_REGEXP>
- </RULES>
-
-
- <!-- The main phpdoc rules -->
- <RULES SET="PHPDOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
- <!-- HTML comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="PHPDOC_BLOCK">
- <BEGIN>{@internal</BEGIN>
- <END>}}</END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="PHPDOC_BLOCK">
- <BEGIN>{@link</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- PHPdoc allows this -->
- <SEQ TYPE="COMMENT3"><<</SEQ>
- <SEQ TYPE="COMMENT3"><=</SEQ>
- <SEQ TYPE="COMMENT3">< </SEQ>
-
- <SPAN DELEGATE="PHP" TYPE="MARKUP">
- <BEGIN><code></BEGIN>
- <END></code></END>
- </SPAN>
-
- <!-- Imports: -->
- <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS" />
- <IMPORT DELEGATE="PHPDOC_LABEL_KEYWORDS" />
- <IMPORT DELEGATE="PHPDOC_VAR" />
- <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
- </RULES>
-
-
- <RULES SET="INVALID_LT" DEFAULT="INVALID">
- <SEQ TYPE="INVALID"><</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Catalog entry:
+<MODE NAME="php" FILE="php.xml"
+ FILE_NAME_GLOB="*.{php3,php4,php5,php,phtml}"
+ FIRST_LINE_GLOB="<?php*" />
+-->
+
+
+<!--
+Usage of keywords:
+ - COMMENT1: range comments (/* ... */)
+ - COMMENT2: line comments (using //)
+ - COMMENT3: phpdoc comments (/** .. */)
+ - COMMENT4: line comments (using #)
+ - DIGIT: numbers
+ - FUNCTION: custom functions and class/object methods, e.g. foo(), $foo->bar() and foo::bar()
+ - KEYWORD1: basic PHP keywords, e.g. true, false, extends, implements
+ language constructs, e.g. if .. then .. else
+ - KEYWORD2: internal PHP functions,
+ - KEYWORD3: variables, e.g. $foo
+ - KEYWORD4: class definitions, object members, internal PHP objects
+ - LABEL: phpdoc labels, like @see
+ CDATA blocks
+ - LITERAL1: Strings in single quotes, e.g. 'foo'
+ - LITERAL2: Strings in double quotes, e.g. "foo"
+ - LITERAL3: Strings in backtick quotes, e.g. `foo`
+ - LITERAL4: heredocs, e.g. "<<< FOO .... FOO
+ - MARKUP: tags, e.g. <?php .. ?>
+ - OPERATOR: normal operators, e.g. + - ( ) { } [ ]
+ PHP language types in phpdoc block (TODO: sane?!)
+-->
+
+<!--
+TODO:
+ - cleanup/factorize PHPDOC section
+-->
+
+
+<MODE>
+ <PROPS>
+ <!-- Default comment props (used when a ruleset has no other props) -->
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while|else\s*(if)?|for(each)?|switch|declare)\s*\(.*\)[^{:;]*)|(do\s*[^\({:;]*))" />
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true" /><!-- @deprecated since 4.3pre2 -->
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^.*(default:\s*|case.*:.*)$" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ </PROPS>
+
+
+ <RULES IGNORE_CASE="TRUE">
+ <PROPS>
+ <!-- comment props for "HTML"/not-PHP: -->
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <PROPERTY NAME="lineComment" VALUE="" />
+ </PROPS>
+
+ <!-- regular PHP tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="PHP">
+ <BEGIN><?php</BEGIN>
+ <END>?></END>
+ </SPAN>
+
+ <!-- short tags: -->
+ <SPAN TYPE="MARKUP" DELEGATE="PHP">
+ <BEGIN><?</BEGIN>
+ <END>?></END>
+ </SPAN>
+ <SPAN TYPE="MARKUP" DELEGATE="PHP">
+ <BEGIN><?=</BEGIN>
+ <END>?></END>
+ </SPAN>
+
+ <!-- ASP style tags: -->
+ <SPAN TYPE="MARKUP" DELEGATE="PHP">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ <SPAN TYPE="MARKUP" DELEGATE="PHP">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- SSI? -->
+ <SPAN_REGEXP HASH_CHAR="<SCRIPT" TYPE="MARKUP" DELEGATE="PHP">
+ <BEGIN><SCRIPT\s+LANGUAGE="?PHP"?></BEGIN>
+ <END></SCRIPT></END>
+ </SPAN_REGEXP>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1" DELEGATE="COMMENT1+PHP">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT_OPENTAG">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- CSS -->
+ <SPAN TYPE="MARKUP" DELEGATE="CSS_OPENTAG">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- CDATA -->
+ <SPAN TYPE="LABEL" DELEGATE="MAIN">
+ <BEGIN><![CDATA[</BEGIN>
+ <END>]]></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="MARKUP" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SEQ_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="TAGS"></?\w+</SEQ_REGEXP>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+
+ <!-- HTML tags (from MAIN rule) -->
+ <RULES SET="TAGS" DEFAULT="MARKUP" ESCAPE="\">
+ <PROPS>
+ <!-- comment props for "HTML"/not-PHP: -->
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <PROPERTY NAME="lineComment" VALUE="" />
+ </PROPS>
+
+ <SEQ TYPE="MARKUP" DELEGATE="MAIN">></SEQ><!-- from SEQ_REGEXP delegate -->
+
+ <IMPORT DELEGATE="TO_LITERAL+PHP" />
+ <IMPORT DELEGATE="TO_PHP" />
+ <IMPORT DELEGATE="INVALID_LT" />
+ <IMPORT DELEGATE="html::TAGS" />
+ </RULES>
+
+
+ <!-- CSS where PHP code may be injected -->
+ <RULES SET="CSS_OPENTAG" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="CSS">></SEQ>
+
+ <IMPORT DELEGATE="TO_LITERAL+PHP"/>
+ </RULES>
+
+ <RULES SET="CSS" DEFAULT="MARKUP">
+ <!-- CSS has no line comment: -->
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="" />
+ </PROPS>
+
+ <SPAN DELEGATE="CSS"><!-- give priority to PHP -->
+ <BEGIN>(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <IMPORT DELEGATE="TO_PHP"/>
+ <IMPORT DELEGATE="css::MAIN"/>
+ </RULES>
+
+
+ <!-- Helper for class references in rule PHP -->
+ <RULES SET="OBJECT_PHP" DEFAULT="KEYWORD4" ESCAPE="\"> <!-- TODO: ESCAPE should not be needed, see http://sourceforge.net/tracker/index.php?func=detail&aid=1600458&group_id=588&atid=100588 -->
+ <SPAN TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Keep brackets together and handle the expression therein with "PHP_EXPRESSION" -->
+ <SPAN TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">
+ <BEGIN>(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- Delegate expressions methods/members, e.g. $a->{'bar-'.substr($b,1)}: -->
+ <SPAN_REGEXP HASH_CHAR="->" TYPE="KEYWORD4" DELEGATE="PHP_EXPRESSION">
+ <BEGIN>->\s*\{</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+
+ <!-- Recurse methods: -->
+ <SEQ_REGEXP HASH_CHAR="->" TYPE="FUNCTION" DELEGATE="OBJECT_PHP">->\s*\w+\s*(?=\()</SEQ_REGEXP>
+
+ <!-- Recurse members: -->
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHP">->\w*</SEQ_REGEXP>
+
+ <!-- Handle comments (without phpdoc, which makes no sense here) -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT4">#</EOL_SPAN>
+
+ <!-- Operators delegate back to PHP_EXPRESSION {{{ -->
+ <SEQ_REGEXP DELEGATE="PHP_EXPRESSION">\s</SEQ_REGEXP>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">!</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">%</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">&</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">></SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION"><</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">*</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">/</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">+</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">,</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">-</SEQ><!-- "->" gets handled before -->
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">.</SEQ>
+ <SEQ_REGEXP HASH_CHAR="/" TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">/(?!/)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=":" TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">:(?!:)</SEQ_REGEXP><!-- not "::" -->
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP">;</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">=</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">?</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">@</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">[</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">]</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">^</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">`</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">{</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">|</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">}</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">~</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">\</SEQ>
+ <!-- }}} -->
+
+ <IMPORT DELEGATE="PHP_EXPRESSION" />
+ <IMPORT DELEGATE="PHP_VAR" />
+ <IMPORT DELEGATE="PHP_KEYWORDS" />
+ </RULES>
+
+
+ <!-- PHP literal where variables get parsed -->
+ <RULES SET="PHP_LITERAL2" DEFAULT="LITERAL2" ESCAPE="\">
+ <!-- expressions in curly braces ("{$foo}") -->
+ <SPAN_REGEXP HASH_CHAR="{" TYPE="LITERAL2" DELEGATE="OBJECT_PHP">
+ <BEGIN>\{(?=\$)</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHP_LITERAL2">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[\$?[\s\w'"]+\])?->)</SEQ_REGEXP>
+ <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
+
+ <!-- Vars like "${foo}" (does not work for objects/methods) -->
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3">[\$]+\{[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\}</SEQ_REGEXP>
+
+ <IMPORT DELEGATE="PHP_VAR" />
+ </RULES>
+
+ <!-- Helper for class references in rule PHP_LITERAL2 ("foo") -->
+ <RULES SET="OBJECT_PHP_LITERAL2" DEFAULT="KEYWORD4" ESCAPE="\"> <!-- TODO: ESCAPE should not be needed, see http://sourceforge.net/tracker/index.php?func=detail&aid=1600458&group_id=588&atid=100588 -->
+ <SPAN TYPE="OPERATOR" DELEGATE="PHP">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Recurse members: -->
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHP_LITERAL2">->\w*</SEQ_REGEXP>
+
+ <!-- Operators delegate back to PHP_LITERAL2 {{{ -->
+ <SEQ_REGEXP DELEGATE="PHP_LITERAL2">\s</SEQ_REGEXP>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">'</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">`</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">!</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">%</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">&</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">></SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2"><</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">*</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">/</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">+</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">,</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">-</SEQ><!-- "->" gets handled before -->
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">.</SEQ>
+ <SEQ_REGEXP HASH_CHAR="/" TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">/(?!/)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=":" TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">:(?!:)</SEQ_REGEXP><!-- not "::" -->
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">;</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">=</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">?</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">@</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">[</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">]</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">^</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">`</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">{</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">|</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">}</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">~</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">(</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">)</SEQ>
+ <SEQ TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">\</SEQ>
+ <!-- }}} -->
+ </RULES>
+
+
+ <!-- PHP literal in backticks, where variables get parsed; based on PHP_LITERAL2 -->
+ <RULES SET="PHP_LITERAL3" DEFAULT="LITERAL3" ESCAPE="\">
+ <!-- expressions in curly braces ("{$foo}") -->
+ <SPAN_REGEXP HASH_CHAR="{" TYPE="LITERAL3" DELEGATE="OBJECT_PHP">
+ <BEGIN>\{(?=\$)</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHP_LITERAL3">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[\$?[\s\w'"]+\])?->)</SEQ_REGEXP>
+ <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
+
+ <!-- Vars like "${foo}" (does not work for objects/methods) -->
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3">[\$]+\{[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\}</SEQ_REGEXP>
+
+ <IMPORT DELEGATE="PHP_VAR" />
+ </RULES>
+
+ <!-- Helper for class references in rule PHP_LITERAL3 (`foo`) -->
+ <RULES SET="OBJECT_PHP_LITERAL3" DEFAULT="KEYWORD4" ESCAPE="\"> <!-- TODO: ESCAPE should not be needed, see http://sourceforge.net/tracker/index.php?func=detail&aid=1600458&group_id=588&atid=100588 -->
+ <SPAN TYPE="OPERATOR" DELEGATE="PHP">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Recurse members: -->
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHP_LITERAL3">->\w*</SEQ_REGEXP>
+
+ <!-- Operators delegate back to PHP_LITERAL3 {{{ -->
+ <SEQ_REGEXP DELEGATE="PHP_LITERAL3">\s</SEQ_REGEXP>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">"</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">'</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">!</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">%</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">&</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">></SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3"><</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">*</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">/</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">+</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">,</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">-</SEQ><!-- "->" gets handled before -->
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">.</SEQ>
+ <SEQ_REGEXP HASH_CHAR="/" TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">/(?!/)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=":" TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">:(?!:)</SEQ_REGEXP><!-- not "::" -->
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">;</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">=</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">?</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">@</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">[</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">]</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">^</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">`</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">{</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">|</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">}</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">~</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">(</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">)</SEQ>
+ <SEQ TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">\</SEQ>
+ <!-- }}} -->
+ </RULES>
+
+
+ <!-- PHP heredoc blocks, where variables get parsed; see PHP_LITERAL2 -->
+ <RULES SET="PHP_LITERAL4" DEFAULT="LITERAL4" ESCAPE="\">
+ <!-- expressions in curly braces ("{$foo}") -->
+ <SPAN_REGEXP HASH_CHAR="{" TYPE="LITERAL4" DELEGATE="OBJECT_PHP">
+ <BEGIN>\{(?=\$)</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHP_LITERAL4">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[\$?[\s\w'"]+\])?->)</SEQ_REGEXP>
+ <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
+
+ <!-- Vars like "${foo}" (does not work for objects/methods) -->
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3">[\$]+\{[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\}</SEQ_REGEXP>
+
+ <IMPORT DELEGATE="PHP_VAR" />
+ </RULES>
+
+ <!-- Helper for class references in rule PHP_LITERAL4 ("<<< FOO .. FOO") -->
+ <RULES SET="OBJECT_PHP_LITERAL4" DEFAULT="KEYWORD4" ESCAPE="\"> <!-- TODO: ESCAPE should not be needed, see http://sourceforge.net/tracker/index.php?func=detail&aid=1600458&group_id=588&atid=100588 -->
+ <SPAN TYPE="OPERATOR" DELEGATE="PHP">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Recurse members: -->
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHP_LITERAL4">->\w*</SEQ_REGEXP>
+
+ <!-- Operators delegate back to PHP_LITERAL4 {{{ -->
+ <SEQ_REGEXP DELEGATE="PHP_LITERAL4">\s</SEQ_REGEXP>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">'</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">"</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">`</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">!</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">%</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">&</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">></SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4"><</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">*</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">/</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">+</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">,</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">-</SEQ><!-- "->" gets handled before -->
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">.</SEQ>
+ <SEQ_REGEXP HASH_CHAR="/" TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">/(?!/)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR=":" TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">:(?!:)</SEQ_REGEXP><!-- not "::" -->
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">;</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">=</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">?</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">@</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">[</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">]</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">^</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">`</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">{</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">|</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">}</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">~</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">(</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">)</SEQ>
+ <SEQ TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">\</SEQ>
+ <!-- }}} -->
+ </RULES>
+
+
+ <!-- Helper for class / interface definition -->
+ <RULES SET="DEF_CLASS" DEFAULT="KEYWORD4">
+ <!-- back to "PHP" for curly brace, the closing one gets handled there -->
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP">{</SEQ>
+ <!-- Invalid, go back: -->
+ <SEQ TYPE="INVALID" DELEGATE="PHP">;</SEQ>
+ <SEQ TYPE="INVALID" DELEGATE="PHP">=</SEQ>
+
+ <IMPORT DELEGATE="PHP_COMMENTS" />
+
+ <KEYWORDS>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+
+
+ <!-- Function definition -->
+ <RULES SET="DEF_FUNCTION" DEFAULT="FUNCTION">
+ <!-- Invalid, go back: -->
+ <SEQ TYPE="INVALID" DELEGATE="PHP">;</SEQ>
+
+ <SEQ TYPE="OPERATOR">&</SEQ><!-- return by reference -->
+ <SEQ TYPE="OPERATOR" DELEGATE="DEF_FUNCTION_ARGS">(</SEQ>
+
+ <IMPORT DELEGATE="PHP_COMMENTS" />
+ </RULES>
+
+ <!-- Arguments of a function definition -->
+ <RULES SET="DEF_FUNCTION_ARGS" DEFAULT="KEYWORD4">
+ <!-- back to "PHP" for closing bracket: -->
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP">)</SEQ>
+
+ <SEQ TYPE="OPERATOR" DELEGATE="DEF_FUNCTION_ARGS_VALUE">=</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <IMPORT DELEGATE="PHP_VAR" />
+ <IMPORT DELEGATE="PHP_COMMENTS" />
+ <IMPORT DELEGATE="PHP_TYPES" />
+ </RULES>
+
+ <!-- Default values of a function argument -->
+ <RULES SET="DEF_FUNCTION_ARGS_VALUE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
+ <!-- Literals, without var substitution: -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN_REGEXP HASH_CHAR="array" TYPE="KEYWORD4" DELEGATE="DEF_FUNCTION_ARGS_VALUE_ARRAY">
+ <BEGIN>array\s*\(</BEGIN>
+ <END>)</END>
+ </SPAN_REGEXP>
+ <SEQ TYPE="KEYWORD4">null</SEQ>
+
+ <SEQ TYPE="OPERATOR" DELEGATE="DEF_FUNCTION_ARGS">,</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP">)</SEQ>
+
+ <IMPORT DELEGATE="PHP_COMMENTS" />
+ <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
+ </RULES>
+
+ <!-- Body of "array(...)" in function argument default values -->
+ <RULES SET="DEF_FUNCTION_ARGS_VALUE_ARRAY" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
+ <!-- Literals, without var substitution: -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ </RULES>
+
+
+ <!-- Comments in PHP -->
+ <RULES SET="PHP_COMMENTS">
+ <!-- special case -->
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+
+ <!-- PHPdoc comment -->
+ <SPAN TYPE="COMMENT3" DELEGATE="PHPDOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- range comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- line comments -->
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT4">#</EOL_SPAN>
+ </RULES>
+
+
+ <!-- PHP variables (PHPDOC_VAR for phpdoc blocks) -->
+ <RULES SET="PHP_VAR">
+ <!-- (Class-)Variables -->
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD4">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=\s*=\s*(&\s*)?new)</SEQ_REGEXP>
+
+ <!-- Normal variables -->
+ <!-- Not using MARK_FOLLOWING, which would match $foo\" completely (in PHP_LITERAL2) -->
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*</SEQ_REGEXP>
+ </RULES>
+
+
+ <RULES SET="PHP" ESCAPE="\" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
+ <!-- Class definitions.
+ This uses SEQ_REGEXP (instead of SPAN_*) for the keywords only,
+ so that the curly braces can be highlighted as operator. -->
+ <SEQ_REGEXP HASH_CHARS="ci" AT_WORD_START="TRUE" DELEGATE="DEF_CLASS" TYPE="KEYWORD1">(class|interface)(\s+|$)</SEQ_REGEXP>
+
+ <SEQ_REGEXP HASH_CHAR="function" AT_WORD_START="TRUE" DELEGATE="DEF_FUNCTION" TYPE="KEYWORD1">(function)(\s+|$)</SEQ_REGEXP>
+
+ <!-- Imports: -->
+ <IMPORT DELEGATE="PHP_EXPRESSION" />
+ </RULES>
+
+
+ <!-- A basic PHP expression, as it can be used in $a->{EXPR} -->
+ <RULES SET="PHP_EXPRESSION" ESCAPE="\" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
+ <!-- Comments: -->
+ <!-- special case -->
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+ <!-- PHPdoc comment -->
+ <SPAN TYPE="COMMENT3" DELEGATE="PHPDOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <!-- range comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <!-- line comments: -->
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT4">#</EOL_SPAN>
+
+ <!-- back to MAIN for "?>" -->
+ <SEQ TYPE="MARKUP" DELEGATE="MAIN">?></SEQ>
+
+ <!-- Literals: -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="PHP_LITERAL2">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3" DELEGATE="PHP_LITERAL3">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <!--
+ TODO: these should not highlight e.g. "(int)$bar"
+ -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR"> (</MARK_PREVIOUS>
+
+ <!-- Variable functions, e.g. $foo() -->
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="FUNCTION">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\s*(?=\()</SEQ_REGEXP>
+
+ <!-- Readins/Heredoc -->
+ <SPAN_REGEXP HASH_CHAR="<<<" TYPE="LITERAL4" DELEGATE="PHP_LITERAL4">
+ <BEGIN><![CDATA[<<<[\p{Space}]*("?)([\p{Alnum}_]+)\1[\p{Space}]*$]]></BEGIN>
+ <END AT_LINE_START="TRUE">$2</END>
+ </SPAN_REGEXP>
+
+ <!-- Nowdoc (http://php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc) -->
+ <SPAN_REGEXP HASH_CHAR="<<<" TYPE="LITERAL1">
+ <BEGIN><![CDATA[<<<[\p{Space}]*'([\p{Alnum}_]+)'[\p{Space}]*$]]></BEGIN>
+ <END AT_LINE_START="TRUE">$1</END>
+ </SPAN_REGEXP>
+
+
+ <!-- Keep blocks of curly braces (scopes) together.
+ This is required e.g. for handling $a->{if(1){ echo 1; }}. -->
+ <!--
+ TODO: this does not work with the following and therefore is commented out (should match brackets in PHP blocks only!):
+ <?php { ?>
+ }
+ <?php } ?>
+ <SPAN TYPE="OPERATOR" DELEGATE="PHP">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ -->
+
+ <!-- operators -->
+ <!-- {{{ -->
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+
+ <!-- TODO: does not get used, because of MARK_PREVIOUS for FUNCTION below -->
+ <SEQ TYPE="OPERATOR">(array)</SEQ>
+ <SEQ TYPE="OPERATOR">(bool)</SEQ>
+ <SEQ TYPE="OPERATOR">(boolean)</SEQ>
+ <SEQ TYPE="OPERATOR">(double)</SEQ>
+ <SEQ TYPE="OPERATOR">(float)</SEQ>
+ <SEQ TYPE="OPERATOR">(int)</SEQ>
+ <SEQ TYPE="OPERATOR">(integer)</SEQ>
+ <SEQ TYPE="OPERATOR">(object)</SEQ>
+ <SEQ TYPE="OPERATOR">(real)</SEQ>
+ <SEQ TYPE="OPERATOR">(string)</SEQ>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ_REGEXP HASH_CHAR=":" TYPE="OPERATOR">:(?!:)</SEQ_REGEXP><!-- not "::" -->
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP">;</SEQ><!-- expression end => PHP -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">`</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <!-- }}} -->
+
+ <!-- to OBJECT_PHP: (Class-)Variables/Methods -->
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHP">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[\$?[\s\w'"]+\])?->)</SEQ_REGEXP>
+ <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
+
+ <!-- handle "new" keyword: -->
+ <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="new" AT_WORD_START="TRUE" DELEGATE="PHP_VAR_NEW_KW">new\s+</SEQ_REGEXP>
+
+ <!-- Imports: -->
+ <IMPORT DELEGATE="PHP_VAR" />
+ <!-- TODO: split this, so e.g. "new", "class" etc don't show up here, but only in "PHP" -->
+ <IMPORT DELEGATE="PHP_KEYWORDS" />
+ </RULES>
+
+ <RULES SET="PHP_VAR_NEW_KW" DEFAULT="KEYWORD4">
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP_EXPRESSION">(</SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="PHP">;</SEQ>
+ </RULES>
+
+ <RULES SET="PHP_BASIC_KEYWORD1">
+ <KEYWORDS>
+ <KEYWORD1>true</KEYWORD1>
+ <KEYWORD1>false</KEYWORD1>
+ <KEYWORD1>null</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+
+
+ <RULES SET="PHP_TYPES">
+ <!-- Taken from: http://php.net/manual/en/language.types.php -->
+ <KEYWORDS>
+ <OPERATOR>array</OPERATOR>
+ <OPERATOR>bool</OPERATOR>
+ <OPERATOR>boolean</OPERATOR>
+ <OPERATOR>callback</OPERATOR>
+ <OPERATOR>double</OPERATOR>
+ <OPERATOR>float</OPERATOR>
+ <OPERATOR>int</OPERATOR>
+ <OPERATOR>integer</OPERATOR>
+ <OPERATOR>mixed</OPERATOR>
+ <OPERATOR>number</OPERATOR>
+ <OPERATOR>NULL</OPERATOR>
+ <OPERATOR>object</OPERATOR>
+ <OPERATOR>real</OPERATOR><!-- not listed, but valid in a typecast -->
+ <OPERATOR>resource</OPERATOR>
+ <OPERATOR>string</OPERATOR>
+ </KEYWORDS>
+ </RULES>
+
+
+ <RULES SET="PHP_KEYWORDS">
+ <IMPORT DELEGATE="KEYWORDS_VISIBILITY" />
+ <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
+
+ <KEYWORDS>
+ <!-- start: generated by buildfunctionlist.php -->
+ <!-- {{{ -->
+ <!-- Internal classes (61) -->
+ <KEYWORD4>arrayiterator</KEYWORD4>
+ <KEYWORD4>arrayobject</KEYWORD4>
+ <KEYWORD4>cachingiterator</KEYWORD4>
+ <KEYWORD4>cachingrecursiveiterator</KEYWORD4>
+ <KEYWORD4>collection</KEYWORD4>
+ <KEYWORD4>descriptor</KEYWORD4>
+ <KEYWORD4>directoryiterator</KEYWORD4>
+ <KEYWORD4>domattr</KEYWORD4>
+ <KEYWORD4>domattribute</KEYWORD4>
+ <KEYWORD4>domcharacterdata</KEYWORD4>
+ <KEYWORD4>domdocument</KEYWORD4>
+ <KEYWORD4>domdocumenttype</KEYWORD4>
+ <KEYWORD4>domelement</KEYWORD4>
+ <KEYWORD4>domimplementation</KEYWORD4>
+ <KEYWORD4>domnamednodemap</KEYWORD4>
+ <KEYWORD4>domnode</KEYWORD4>
+ <KEYWORD4>domnodelist</KEYWORD4>
+ <KEYWORD4>domprocessinginstruction</KEYWORD4>
+ <KEYWORD4>domtext</KEYWORD4>
+ <KEYWORD4>domxpath</KEYWORD4>
+ <KEYWORD4>domxsltstylesheet</KEYWORD4>
+ <KEYWORD4>filteriterator</KEYWORD4>
+ <KEYWORD4>hw_api</KEYWORD4>
+ <KEYWORD4>hw_api_attribute</KEYWORD4>
+ <KEYWORD4>hw_api_content</KEYWORD4>
+ <KEYWORD4>hw_api_error</KEYWORD4>
+ <KEYWORD4>hw_api_object</KEYWORD4>
+ <KEYWORD4>hw_api_reason</KEYWORD4>
+ <KEYWORD4>limititerator</KEYWORD4>
+ <KEYWORD4>lob</KEYWORD4>
+ <KEYWORD4>memcache</KEYWORD4>
+ <KEYWORD4>parentiterator</KEYWORD4>
+ <KEYWORD4>pdo</KEYWORD4>
+ <KEYWORD4>pdostatement</KEYWORD4>
+ <KEYWORD4>rar</KEYWORD4>
+ <KEYWORD4>recursivedirectoryiterator</KEYWORD4>
+ <KEYWORD4>recursiveiteratoriterator</KEYWORD4>
+ <KEYWORD4>simplexmlelement</KEYWORD4>
+ <KEYWORD4>simplexmliterator</KEYWORD4>
+ <KEYWORD4>soapclient</KEYWORD4>
+ <KEYWORD4>soapfault</KEYWORD4>
+ <KEYWORD4>soapheader</KEYWORD4>
+ <KEYWORD4>soapparam</KEYWORD4>
+ <KEYWORD4>soapserver</KEYWORD4>
+ <KEYWORD4>soapvar</KEYWORD4>
+ <KEYWORD4>swfaction</KEYWORD4>
+ <KEYWORD4>swfbitmap</KEYWORD4>
+ <KEYWORD4>swfbutton</KEYWORD4>
+ <KEYWORD4>swfdisplayitem</KEYWORD4>
+ <KEYWORD4>swffill</KEYWORD4>
+ <KEYWORD4>swffont</KEYWORD4>
+ <KEYWORD4>swfgradient</KEYWORD4>
+ <KEYWORD4>swfmorph</KEYWORD4>
+ <KEYWORD4>swfmovie</KEYWORD4>
+ <KEYWORD4>swfshape</KEYWORD4>
+ <KEYWORD4>swfsprite</KEYWORD4>
+ <KEYWORD4>swftext</KEYWORD4>
+ <KEYWORD4>swftextfield</KEYWORD4>
+ <KEYWORD4>tidy</KEYWORD4>
+ <KEYWORD4>tidy_node</KEYWORD4>
+ <KEYWORD4>variant</KEYWORD4>
+
+
+ <!-- Internal functions (3549) -->
+ <KEYWORD2>__call</KEYWORD2> <!-- soapclient -->
+ <KEYWORD2>__construct</KEYWORD2> <!-- arrayobject, directoryiterator, pdo, tidy -->
+ <KEYWORD2>__getfunctions</KEYWORD2> <!-- soapclient -->
+ <KEYWORD2>__getlastrequest</KEYWORD2> <!-- soapclient -->
+ <KEYWORD2>__getlastresponse</KEYWORD2> <!-- soapclient -->
+ <KEYWORD2>__gettypes</KEYWORD2> <!-- soapclient -->
+ <KEYWORD2>__tostring</KEYWORD2> <!-- cachingiterator -->
+ <KEYWORD2>abs</KEYWORD2>
+ <KEYWORD2>acos</KEYWORD2>
+ <KEYWORD2>acosh</KEYWORD2>
+ <KEYWORD2>add</KEYWORD2> <!-- memcache, swfmovie, swfsprite -->
+ <KEYWORD2>add_namespace</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>add_root</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>addaction</KEYWORD2> <!-- swfbutton -->
+ <KEYWORD2>addcolor</KEYWORD2> <!-- swfdisplayitem -->
+ <KEYWORD2>addcslashes</KEYWORD2>
+ <KEYWORD2>addentry</KEYWORD2> <!-- swfgradient -->
+ <KEYWORD2>addfill</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>addfunction</KEYWORD2> <!-- soapserver -->
+ <KEYWORD2>addshape</KEYWORD2> <!-- swfbutton -->
+ <KEYWORD2>addslashes</KEYWORD2>
+ <KEYWORD2>addstring</KEYWORD2> <!-- swftext, swftextfield -->
+ <KEYWORD2>aggregate</KEYWORD2>
+ <KEYWORD2>aggregate_info</KEYWORD2>
+ <KEYWORD2>aggregate_methods</KEYWORD2>
+ <KEYWORD2>aggregate_methods_by_list</KEYWORD2>
+ <KEYWORD2>aggregate_methods_by_regexp</KEYWORD2>
+ <KEYWORD2>aggregate_properties</KEYWORD2>
+ <KEYWORD2>aggregate_properties_by_list</KEYWORD2>
+ <KEYWORD2>aggregate_properties_by_regexp</KEYWORD2>
+ <KEYWORD2>aggregation_info</KEYWORD2>
+ <KEYWORD2>align</KEYWORD2> <!-- swftextfield -->
+ <KEYWORD2>apache_child_terminate</KEYWORD2>
+ <KEYWORD2>apache_get_modules</KEYWORD2>
+ <KEYWORD2>apache_get_version</KEYWORD2>
+ <KEYWORD2>apache_getenv</KEYWORD2>
+ <KEYWORD2>apache_lookup_uri</KEYWORD2>
+ <KEYWORD2>apache_note</KEYWORD2>
+ <KEYWORD2>apache_request_headers</KEYWORD2>
+ <KEYWORD2>apache_response_headers</KEYWORD2>
+ <KEYWORD2>apache_setenv</KEYWORD2>
+ <KEYWORD2>apd_breakpoint</KEYWORD2>
+ <KEYWORD2>apd_callstack</KEYWORD2>
+ <KEYWORD2>apd_clunk</KEYWORD2>
+ <KEYWORD2>apd_continue</KEYWORD2>
+ <KEYWORD2>apd_croak</KEYWORD2>
+ <KEYWORD2>apd_dump_function_table</KEYWORD2>
+ <KEYWORD2>apd_dump_persistent_resources</KEYWORD2>
+ <KEYWORD2>apd_dump_regular_resources</KEYWORD2>
+ <KEYWORD2>apd_echo</KEYWORD2>
+ <KEYWORD2>apd_get_active_symbols</KEYWORD2>
+ <KEYWORD2>apd_set_pprof_trace</KEYWORD2>
+ <KEYWORD2>apd_set_session</KEYWORD2>
+ <KEYWORD2>apd_set_session_trace</KEYWORD2>
+ <KEYWORD2>apd_set_socket_session_trace</KEYWORD2>
+ <KEYWORD2>append</KEYWORD2> <!-- arrayobject, collection, lob -->
+ <KEYWORD2>append_child</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>append_sibling</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>appendchild</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>appenddata</KEYWORD2> <!-- domcharacterdata -->
+ <KEYWORD2>array_change_key_case</KEYWORD2>
+ <KEYWORD2>array_chunk</KEYWORD2>
+ <KEYWORD2>array_combine</KEYWORD2>
+ <KEYWORD2>array_count_values</KEYWORD2>
+ <KEYWORD2>array_diff</KEYWORD2>
+ <KEYWORD2>array_diff_assoc</KEYWORD2>
+ <KEYWORD2>array_diff_key</KEYWORD2>
+ <KEYWORD2>array_diff_uassoc</KEYWORD2>
+ <KEYWORD2>array_diff_ukey</KEYWORD2>
+ <KEYWORD2>array_fill</KEYWORD2>
+ <KEYWORD2>array_filter</KEYWORD2>
+ <KEYWORD2>array_flip</KEYWORD2>
+ <KEYWORD2>array_intersect</KEYWORD2>
+ <KEYWORD2>array_intersect_assoc</KEYWORD2>
+ <KEYWORD2>array_intersect_key</KEYWORD2>
+ <KEYWORD2>array_intersect_uassoc</KEYWORD2>
+ <KEYWORD2>array_intersect_ukey</KEYWORD2>
+ <KEYWORD2>array_key_exists</KEYWORD2>
+ <KEYWORD2>array_keys</KEYWORD2>
+ <KEYWORD2>array_map</KEYWORD2>
+ <KEYWORD2>array_merge</KEYWORD2>
+ <KEYWORD2>array_merge_recursive</KEYWORD2>
+ <KEYWORD2>array_multisort</KEYWORD2>
+ <KEYWORD2>array_pad</KEYWORD2>
+ <KEYWORD2>array_pop</KEYWORD2>
+ <KEYWORD2>array_push</KEYWORD2>
+ <KEYWORD2>array_rand</KEYWORD2>
+ <KEYWORD2>array_reduce</KEYWORD2>
+ <KEYWORD2>array_reverse</KEYWORD2>
+ <KEYWORD2>array_search</KEYWORD2>
+ <KEYWORD2>array_shift</KEYWORD2>
+ <KEYWORD2>array_slice</KEYWORD2>
+ <KEYWORD2>array_splice</KEYWORD2>
+ <KEYWORD2>array_sum</KEYWORD2>
+ <KEYWORD2>array_udiff</KEYWORD2>
+ <KEYWORD2>array_udiff_assoc</KEYWORD2>
+ <KEYWORD2>array_udiff_uassoc</KEYWORD2>
+ <KEYWORD2>array_uintersect</KEYWORD2>
+ <KEYWORD2>array_uintersect_assoc</KEYWORD2>
+ <KEYWORD2>array_uintersect_uassoc</KEYWORD2>
+ <KEYWORD2>array_unique</KEYWORD2>
+ <KEYWORD2>array_unshift</KEYWORD2>
+ <KEYWORD2>array_values</KEYWORD2>
+ <KEYWORD2>array_walk</KEYWORD2>
+ <KEYWORD2>array_walk_recursive</KEYWORD2>
+ <KEYWORD2>arsort</KEYWORD2>
+ <KEYWORD2>ascii2ebcdic</KEYWORD2>
+ <KEYWORD2>asin</KEYWORD2>
+ <KEYWORD2>asinh</KEYWORD2>
+ <KEYWORD2>asort</KEYWORD2>
+ <KEYWORD2>aspell_check</KEYWORD2>
+ <KEYWORD2>aspell_check_raw</KEYWORD2>
+ <KEYWORD2>aspell_new</KEYWORD2>
+ <KEYWORD2>aspell_suggest</KEYWORD2>
+ <KEYWORD2>assert</KEYWORD2>
+ <KEYWORD2>assert_options</KEYWORD2>
+ <KEYWORD2>assign</KEYWORD2> <!-- collection, hw_api_object -->
+ <KEYWORD2>assignelem</KEYWORD2> <!-- collection -->
+ <KEYWORD2>asxml</KEYWORD2> <!-- simplexmlelement -->
+ <KEYWORD2>atan</KEYWORD2>
+ <KEYWORD2>atan2</KEYWORD2>
+ <KEYWORD2>atanh</KEYWORD2>
+ <KEYWORD2>attreditable</KEYWORD2> <!-- hw_api_object -->
+ <KEYWORD2>attributes</KEYWORD2> <!-- domnode, simplexmlelement, tidy_node -->
+ <KEYWORD2>base64_decode</KEYWORD2>
+ <KEYWORD2>base64_encode</KEYWORD2>
+ <KEYWORD2>base_convert</KEYWORD2>
+ <KEYWORD2>basename</KEYWORD2>
+ <KEYWORD2>bcadd</KEYWORD2>
+ <KEYWORD2>bccomp</KEYWORD2>
+ <KEYWORD2>bcdiv</KEYWORD2>
+ <KEYWORD2>bcmod</KEYWORD2>
+ <KEYWORD2>bcmul</KEYWORD2>
+ <KEYWORD2>bcpow</KEYWORD2>
+ <KEYWORD2>bcpowmod</KEYWORD2>
+ <KEYWORD2>bcscale</KEYWORD2>
+ <KEYWORD2>bcsqrt</KEYWORD2>
+ <KEYWORD2>bcsub</KEYWORD2>
+ <KEYWORD2>begintransaction</KEYWORD2> <!-- pdo -->
+ <KEYWORD2>bin2hex</KEYWORD2>
+ <KEYWORD2>bind_textdomain_codeset</KEYWORD2>
+ <KEYWORD2>bindcolumn</KEYWORD2> <!-- pdostatement -->
+ <KEYWORD2>bindec</KEYWORD2>
+ <KEYWORD2>bindparam</KEYWORD2> <!-- pdostatement -->
+ <KEYWORD2>bindtextdomain</KEYWORD2>
+ <KEYWORD2>bzclose</KEYWORD2>
+ <KEYWORD2>bzcompress</KEYWORD2>
+ <KEYWORD2>bzdecompress</KEYWORD2>
+ <KEYWORD2>bzerrno</KEYWORD2>
+ <KEYWORD2>bzerror</KEYWORD2>
+ <KEYWORD2>bzerrstr</KEYWORD2>
+ <KEYWORD2>bzflush</KEYWORD2>
+ <KEYWORD2>bzopen</KEYWORD2>
+ <KEYWORD2>bzread</KEYWORD2>
+ <KEYWORD2>bzwrite</KEYWORD2>
+ <KEYWORD2>cal_days_in_month</KEYWORD2>
+ <KEYWORD2>cal_from_jd</KEYWORD2>
+ <KEYWORD2>cal_info</KEYWORD2>
+ <KEYWORD2>cal_to_jd</KEYWORD2>
+ <KEYWORD2>call_user_func</KEYWORD2>
+ <KEYWORD2>call_user_func_array</KEYWORD2>
+ <KEYWORD2>call_user_method</KEYWORD2>
+ <KEYWORD2>call_user_method_array</KEYWORD2>
+ <KEYWORD2>ccvs_add</KEYWORD2>
+ <KEYWORD2>ccvs_auth</KEYWORD2>
+ <KEYWORD2>ccvs_command</KEYWORD2>
+ <KEYWORD2>ccvs_count</KEYWORD2>
+ <KEYWORD2>ccvs_delete</KEYWORD2>
+ <KEYWORD2>ccvs_done</KEYWORD2>
+ <KEYWORD2>ccvs_init</KEYWORD2>
+ <KEYWORD2>ccvs_lookup</KEYWORD2>
+ <KEYWORD2>ccvs_new</KEYWORD2>
+ <KEYWORD2>ccvs_report</KEYWORD2>
+ <KEYWORD2>ccvs_return</KEYWORD2>
+ <KEYWORD2>ccvs_reverse</KEYWORD2>
+ <KEYWORD2>ccvs_sale</KEYWORD2>
+ <KEYWORD2>ccvs_status</KEYWORD2>
+ <KEYWORD2>ccvs_textvalue</KEYWORD2>
+ <KEYWORD2>ccvs_void</KEYWORD2>
+ <KEYWORD2>ceil</KEYWORD2>
+ <KEYWORD2>chdir</KEYWORD2>
+ <KEYWORD2>checkdate</KEYWORD2>
+ <KEYWORD2>checkdnsrr</KEYWORD2>
+ <KEYWORD2>checkin</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>checkout</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>chgrp</KEYWORD2>
+ <KEYWORD2>child_nodes</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>children</KEYWORD2> <!-- hw_api, simplexmlelement, tidy_node -->
+ <KEYWORD2>chmod</KEYWORD2>
+ <KEYWORD2>chop</KEYWORD2>
+ <KEYWORD2>chown</KEYWORD2>
+ <KEYWORD2>chr</KEYWORD2>
+ <KEYWORD2>chroot</KEYWORD2>
+ <KEYWORD2>chunk_split</KEYWORD2>
+ <KEYWORD2>class_exists</KEYWORD2>
+ <KEYWORD2>class_implements</KEYWORD2>
+ <KEYWORD2>class_parents</KEYWORD2>
+ <KEYWORD2>classkit_import</KEYWORD2>
+ <KEYWORD2>classkit_method_add</KEYWORD2>
+ <KEYWORD2>classkit_method_copy</KEYWORD2>
+ <KEYWORD2>classkit_method_redefine</KEYWORD2>
+ <KEYWORD2>classkit_method_remove</KEYWORD2>
+ <KEYWORD2>classkit_method_rename</KEYWORD2>
+ <KEYWORD2>clearstatcache</KEYWORD2>
+ <KEYWORD2>clone_node</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>clonenode</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>close</KEYWORD2> <!-- lob, memcache -->
+ <KEYWORD2>closedir</KEYWORD2>
+ <KEYWORD2>closelog</KEYWORD2>
+ <KEYWORD2>com</KEYWORD2>
+ <KEYWORD2>com_addref</KEYWORD2>
+ <KEYWORD2>com_create_guid</KEYWORD2>
+ <KEYWORD2>com_event_sink</KEYWORD2>
+ <KEYWORD2>com_get</KEYWORD2>
+ <KEYWORD2>com_get_active_object</KEYWORD2>
+ <KEYWORD2>com_invoke</KEYWORD2>
+ <KEYWORD2>com_isenum</KEYWORD2>
+ <KEYWORD2>com_load</KEYWORD2>
+ <KEYWORD2>com_load_typelib</KEYWORD2>
+ <KEYWORD2>com_message_pump</KEYWORD2>
+ <KEYWORD2>com_print_typeinfo</KEYWORD2>
+ <KEYWORD2>com_propget</KEYWORD2>
+ <KEYWORD2>com_propput</KEYWORD2>
+ <KEYWORD2>com_propset</KEYWORD2>
+ <KEYWORD2>com_release</KEYWORD2>
+ <KEYWORD2>com_set</KEYWORD2>
+ <KEYWORD2>commit</KEYWORD2> <!-- pdo -->
+ <KEYWORD2>compact</KEYWORD2>
+ <KEYWORD2>connect</KEYWORD2> <!-- memcache -->
+ <KEYWORD2>connection_aborted</KEYWORD2>
+ <KEYWORD2>connection_status</KEYWORD2>
+ <KEYWORD2>connection_timeout</KEYWORD2>
+ <KEYWORD2>constant</KEYWORD2>
+ <KEYWORD2>content</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>convert_cyr_string</KEYWORD2>
+ <KEYWORD2>convert_uudecode</KEYWORD2>
+ <KEYWORD2>convert_uuencode</KEYWORD2>
+ <KEYWORD2>copy</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>cos</KEYWORD2>
+ <KEYWORD2>cosh</KEYWORD2>
+ <KEYWORD2>count</KEYWORD2> <!-- arrayobject, hw_api_error, hw_api_object -->
+ <KEYWORD2>count_chars</KEYWORD2>
+ <KEYWORD2>cpdf_add_annotation</KEYWORD2>
+ <KEYWORD2>cpdf_add_outline</KEYWORD2>
+ <KEYWORD2>cpdf_arc</KEYWORD2>
+ <KEYWORD2>cpdf_begin_text</KEYWORD2>
+ <KEYWORD2>cpdf_circle</KEYWORD2>
+ <KEYWORD2>cpdf_clip</KEYWORD2>
+ <KEYWORD2>cpdf_close</KEYWORD2>
+ <KEYWORD2>cpdf_closepath</KEYWORD2>
+ <KEYWORD2>cpdf_closepath_fill_stroke</KEYWORD2>
+ <KEYWORD2>cpdf_closepath_stroke</KEYWORD2>
+ <KEYWORD2>cpdf_continue_text</KEYWORD2>
+ <KEYWORD2>cpdf_curveto</KEYWORD2>
+ <KEYWORD2>cpdf_end_text</KEYWORD2>
+ <KEYWORD2>cpdf_fill</KEYWORD2>
+ <KEYWORD2>cpdf_fill_stroke</KEYWORD2>
+ <KEYWORD2>cpdf_finalize</KEYWORD2>
+ <KEYWORD2>cpdf_finalize_page</KEYWORD2>
+ <KEYWORD2>cpdf_global_set_document_limits</KEYWORD2>
+ <KEYWORD2>cpdf_import_jpeg</KEYWORD2>
+ <KEYWORD2>cpdf_lineto</KEYWORD2>
+ <KEYWORD2>cpdf_moveto</KEYWORD2>
+ <KEYWORD2>cpdf_newpath</KEYWORD2>
+ <KEYWORD2>cpdf_open</KEYWORD2>
+ <KEYWORD2>cpdf_output_buffer</KEYWORD2>
+ <KEYWORD2>cpdf_page_init</KEYWORD2>
+ <KEYWORD2>cpdf_place_inline_image</KEYWORD2>
+ <KEYWORD2>cpdf_rect</KEYWORD2>
+ <KEYWORD2>cpdf_restore</KEYWORD2>
+ <KEYWORD2>cpdf_rlineto</KEYWORD2>
+ <KEYWORD2>cpdf_rmoveto</KEYWORD2>
+ <KEYWORD2>cpdf_rotate</KEYWORD2>
+ <KEYWORD2>cpdf_rotate_text</KEYWORD2>
+ <KEYWORD2>cpdf_save</KEYWORD2>
+ <KEYWORD2>cpdf_save_to_file</KEYWORD2>
+ <KEYWORD2>cpdf_scale</KEYWORD2>
+ <KEYWORD2>cpdf_set_action_url</KEYWORD2>
+ <KEYWORD2>cpdf_set_char_spacing</KEYWORD2>
+ <KEYWORD2>cpdf_set_creator</KEYWORD2>
+ <KEYWORD2>cpdf_set_current_page</KEYWORD2>
+ <KEYWORD2>cpdf_set_font</KEYWORD2>
+ <KEYWORD2>cpdf_set_font_directories</KEYWORD2>
+ <KEYWORD2>cpdf_set_font_map_file</KEYWORD2>
+ <KEYWORD2>cpdf_set_horiz_scaling</KEYWORD2>
+ <KEYWORD2>cpdf_set_keywords</KEYWORD2>
+ <KEYWORD2>cpdf_set_leading</KEYWORD2>
+ <KEYWORD2>cpdf_set_page_animation</KEYWORD2>
+ <KEYWORD2>cpdf_set_subject</KEYWORD2>
+ <KEYWORD2>cpdf_set_text_matrix</KEYWORD2>
+ <KEYWORD2>cpdf_set_text_pos</KEYWORD2>
+ <KEYWORD2>cpdf_set_text_rendering</KEYWORD2>
+ <KEYWORD2>cpdf_set_text_rise</KEYWORD2>
+ <KEYWORD2>cpdf_set_title</KEYWORD2>
+ <KEYWORD2>cpdf_set_viewer_preferences</KEYWORD2>
+ <KEYWORD2>cpdf_set_word_spacing</KEYWORD2>
+ <KEYWORD2>cpdf_setdash</KEYWORD2>
+ <KEYWORD2>cpdf_setflat</KEYWORD2>
+ <KEYWORD2>cpdf_setgray</KEYWORD2>
+ <KEYWORD2>cpdf_setgray_fill</KEYWORD2>
+ <KEYWORD2>cpdf_setgray_stroke</KEYWORD2>
+ <KEYWORD2>cpdf_setlinecap</KEYWORD2>
+ <KEYWORD2>cpdf_setlinejoin</KEYWORD2>
+ <KEYWORD2>cpdf_setlinewidth</KEYWORD2>
+ <KEYWORD2>cpdf_setmiterlimit</KEYWORD2>
+ <KEYWORD2>cpdf_setrgbcolor</KEYWORD2>
+ <KEYWORD2>cpdf_setrgbcolor_fill</KEYWORD2>
+ <KEYWORD2>cpdf_setrgbcolor_stroke</KEYWORD2>
+ <KEYWORD2>cpdf_show</KEYWORD2>
+ <KEYWORD2>cpdf_show_xy</KEYWORD2>
+ <KEYWORD2>cpdf_stringwidth</KEYWORD2>
+ <KEYWORD2>cpdf_stroke</KEYWORD2>
+ <KEYWORD2>cpdf_text</KEYWORD2>
+ <KEYWORD2>cpdf_translate</KEYWORD2>
+ <KEYWORD2>crack_check</KEYWORD2>
+ <KEYWORD2>crack_closedict</KEYWORD2>
+ <KEYWORD2>crack_getlastmessage</KEYWORD2>
+ <KEYWORD2>crack_opendict</KEYWORD2>
+ <KEYWORD2>crc32</KEYWORD2>
+ <KEYWORD2>create_attribute</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>create_cdata_section</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>create_comment</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>create_element</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>create_element_ns</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>create_entity_reference</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>create_function</KEYWORD2>
+ <KEYWORD2>create_processing_instruction</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>create_text_node</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createattribute</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createattributens</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createcdatasection</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createcomment</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createdocument</KEYWORD2> <!-- domimplementation -->
+ <KEYWORD2>createdocumentfragment</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createdocumenttype</KEYWORD2> <!-- domimplementation -->
+ <KEYWORD2>createelement</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createelementns</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createentityreference</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createprocessinginstruction</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>createtextnode</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>crypt</KEYWORD2>
+ <KEYWORD2>ctype_alnum</KEYWORD2>
+ <KEYWORD2>ctype_alpha</KEYWORD2>
+ <KEYWORD2>ctype_cntrl</KEYWORD2>
+ <KEYWORD2>ctype_digit</KEYWORD2>
+ <KEYWORD2>ctype_graph</KEYWORD2>
+ <KEYWORD2>ctype_lower</KEYWORD2>
+ <KEYWORD2>ctype_print</KEYWORD2>
+ <KEYWORD2>ctype_punct</KEYWORD2>
+ <KEYWORD2>ctype_space</KEYWORD2>
+ <KEYWORD2>ctype_upper</KEYWORD2>
+ <KEYWORD2>ctype_xdigit</KEYWORD2>
+ <KEYWORD2>curl_close</KEYWORD2>
+ <KEYWORD2>curl_copy_handle</KEYWORD2>
+ <KEYWORD2>curl_errno</KEYWORD2>
+ <KEYWORD2>curl_error</KEYWORD2>
+ <KEYWORD2>curl_exec</KEYWORD2>
+ <KEYWORD2>curl_getinfo</KEYWORD2>
+ <KEYWORD2>curl_init</KEYWORD2>
+ <KEYWORD2>curl_multi_add_handle</KEYWORD2>
+ <KEYWORD2>curl_multi_close</KEYWORD2>
+ <KEYWORD2>curl_multi_exec</KEYWORD2>
+ <KEYWORD2>curl_multi_getcontent</KEYWORD2>
+ <KEYWORD2>curl_multi_info_read</KEYWORD2>
+ <KEYWORD2>curl_multi_init</KEYWORD2>
+ <KEYWORD2>curl_multi_remove_handle</KEYWORD2>
+ <KEYWORD2>curl_multi_select</KEYWORD2>
+ <KEYWORD2>curl_setopt</KEYWORD2>
+ <KEYWORD2>curl_version</KEYWORD2>
+ <KEYWORD2>current</KEYWORD2> <!-- arrayiterator, directoryiterator, filteriterator, recursiveiteratoriterator, simplexmliterator -->
+ <KEYWORD2>cybercash_base64_decode</KEYWORD2>
+ <KEYWORD2>cybercash_base64_encode</KEYWORD2>
+ <KEYWORD2>cybercash_decr</KEYWORD2>
+ <KEYWORD2>cybercash_encr</KEYWORD2>
+ <KEYWORD2>cyrus_authenticate</KEYWORD2>
+ <KEYWORD2>cyrus_bind</KEYWORD2>
+ <KEYWORD2>cyrus_close</KEYWORD2>
+ <KEYWORD2>cyrus_connect</KEYWORD2>
+ <KEYWORD2>cyrus_query</KEYWORD2>
+ <KEYWORD2>cyrus_unbind</KEYWORD2>
+ <KEYWORD2>data</KEYWORD2> <!-- domprocessinginstruction -->
+ <KEYWORD2>date</KEYWORD2>
+ <KEYWORD2>date_sunrise</KEYWORD2>
+ <KEYWORD2>date_sunset</KEYWORD2>
+ <KEYWORD2>dba_close</KEYWORD2>
+ <KEYWORD2>dba_delete</KEYWORD2>
+ <KEYWORD2>dba_exists</KEYWORD2>
+ <KEYWORD2>dba_fetch</KEYWORD2>
+ <KEYWORD2>dba_firstkey</KEYWORD2>
+ <KEYWORD2>dba_handlers</KEYWORD2>
+ <KEYWORD2>dba_insert</KEYWORD2>
+ <KEYWORD2>dba_key_split</KEYWORD2>
+ <KEYWORD2>dba_list</KEYWORD2>
+ <KEYWORD2>dba_nextkey</KEYWORD2>
+ <KEYWORD2>dba_open</KEYWORD2>
+ <KEYWORD2>dba_optimize</KEYWORD2>
+ <KEYWORD2>dba_popen</KEYWORD2>
+ <KEYWORD2>dba_replace</KEYWORD2>
+ <KEYWORD2>dba_sync</KEYWORD2>
+ <KEYWORD2>dbase_add_record</KEYWORD2>
+ <KEYWORD2>dbase_close</KEYWORD2>
+ <KEYWORD2>dbase_create</KEYWORD2>
+ <KEYWORD2>dbase_delete_record</KEYWORD2>
+ <KEYWORD2>dbase_get_header_info</KEYWORD2>
+ <KEYWORD2>dbase_get_record</KEYWORD2>
+ <KEYWORD2>dbase_get_record_with_names</KEYWORD2>
+ <KEYWORD2>dbase_numfields</KEYWORD2>
+ <KEYWORD2>dbase_numrecords</KEYWORD2>
+ <KEYWORD2>dbase_open</KEYWORD2>
+ <KEYWORD2>dbase_pack</KEYWORD2>
+ <KEYWORD2>dbase_replace_record</KEYWORD2>
+ <KEYWORD2>dblist</KEYWORD2>
+ <KEYWORD2>dbmclose</KEYWORD2>
+ <KEYWORD2>dbmdelete</KEYWORD2>
+ <KEYWORD2>dbmexists</KEYWORD2>
+ <KEYWORD2>dbmfetch</KEYWORD2>
+ <KEYWORD2>dbmfirstkey</KEYWORD2>
+ <KEYWORD2>dbminsert</KEYWORD2>
+ <KEYWORD2>dbmnextkey</KEYWORD2>
+ <KEYWORD2>dbmopen</KEYWORD2>
+ <KEYWORD2>dbmreplace</KEYWORD2>
+ <KEYWORD2>dbplus_add</KEYWORD2>
+ <KEYWORD2>dbplus_aql</KEYWORD2>
+ <KEYWORD2>dbplus_chdir</KEYWORD2>
+ <KEYWORD2>dbplus_close</KEYWORD2>
+ <KEYWORD2>dbplus_curr</KEYWORD2>
+ <KEYWORD2>dbplus_errcode</KEYWORD2>
+ <KEYWORD2>dbplus_errno</KEYWORD2>
+ <KEYWORD2>dbplus_find</KEYWORD2>
+ <KEYWORD2>dbplus_first</KEYWORD2>
+ <KEYWORD2>dbplus_flush</KEYWORD2>
+ <KEYWORD2>dbplus_freealllocks</KEYWORD2>
+ <KEYWORD2>dbplus_freelock</KEYWORD2>
+ <KEYWORD2>dbplus_freerlocks</KEYWORD2>
+ <KEYWORD2>dbplus_getlock</KEYWORD2>
+ <KEYWORD2>dbplus_getunique</KEYWORD2>
+ <KEYWORD2>dbplus_info</KEYWORD2>
+ <KEYWORD2>dbplus_last</KEYWORD2>
+ <KEYWORD2>dbplus_lockrel</KEYWORD2>
+ <KEYWORD2>dbplus_next</KEYWORD2>
+ <KEYWORD2>dbplus_open</KEYWORD2>
+ <KEYWORD2>dbplus_prev</KEYWORD2>
+ <KEYWORD2>dbplus_rchperm</KEYWORD2>
+ <KEYWORD2>dbplus_rcreate</KEYWORD2>
+ <KEYWORD2>dbplus_rcrtexact</KEYWORD2>
+ <KEYWORD2>dbplus_rcrtlike</KEYWORD2>
+ <KEYWORD2>dbplus_resolve</KEYWORD2>
+ <KEYWORD2>dbplus_restorepos</KEYWORD2>
+ <KEYWORD2>dbplus_rkeys</KEYWORD2>
+ <KEYWORD2>dbplus_ropen</KEYWORD2>
+ <KEYWORD2>dbplus_rquery</KEYWORD2>
+ <KEYWORD2>dbplus_rrename</KEYWORD2>
+ <KEYWORD2>dbplus_rsecindex</KEYWORD2>
+ <KEYWORD2>dbplus_runlink</KEYWORD2>
+ <KEYWORD2>dbplus_rzap</KEYWORD2>
+ <KEYWORD2>dbplus_savepos</KEYWORD2>
+ <KEYWORD2>dbplus_setindex</KEYWORD2>
+ <KEYWORD2>dbplus_setindexbynumber</KEYWORD2>
+ <KEYWORD2>dbplus_sql</KEYWORD2>
+ <KEYWORD2>dbplus_tcl</KEYWORD2>
+ <KEYWORD2>dbplus_tremove</KEYWORD2>
+ <KEYWORD2>dbplus_undo</KEYWORD2>
+ <KEYWORD2>dbplus_undoprepare</KEYWORD2>
+ <KEYWORD2>dbplus_unlockrel</KEYWORD2>
+ <KEYWORD2>dbplus_unselect</KEYWORD2>
+ <KEYWORD2>dbplus_update</KEYWORD2>
+ <KEYWORD2>dbplus_xlockrel</KEYWORD2>
+ <KEYWORD2>dbplus_xunlockrel</KEYWORD2>
+ <KEYWORD2>dbstat</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>dbx_close</KEYWORD2>
+ <KEYWORD2>dbx_compare</KEYWORD2>
+ <KEYWORD2>dbx_connect</KEYWORD2>
+ <KEYWORD2>dbx_error</KEYWORD2>
+ <KEYWORD2>dbx_escape_string</KEYWORD2>
+ <KEYWORD2>dbx_fetch_row</KEYWORD2>
+ <KEYWORD2>dbx_query</KEYWORD2>
+ <KEYWORD2>dbx_sort</KEYWORD2>
+ <KEYWORD2>dcgettext</KEYWORD2>
+ <KEYWORD2>dcngettext</KEYWORD2>
+ <KEYWORD2>dcstat</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>deaggregate</KEYWORD2>
+ <KEYWORD2>debug_backtrace</KEYWORD2>
+ <KEYWORD2>debug_print_backtrace</KEYWORD2>
+ <KEYWORD2>debug_zval_dump</KEYWORD2>
+ <KEYWORD2>debugger_off</KEYWORD2>
+ <KEYWORD2>debugger_on</KEYWORD2>
+ <KEYWORD2>decbin</KEYWORD2>
+ <KEYWORD2>dechex</KEYWORD2>
+ <KEYWORD2>decoct</KEYWORD2>
+ <KEYWORD2>decrement</KEYWORD2> <!-- memcache -->
+ <KEYWORD2>define</KEYWORD2>
+ <KEYWORD2>define_syslog_variables</KEYWORD2>
+ <KEYWORD2>defined</KEYWORD2>
+ <KEYWORD2>deg2rad</KEYWORD2>
+ <KEYWORD2>delete</KEYWORD2> <!-- memcache -->
+ <KEYWORD2>deletedata</KEYWORD2> <!-- domcharacterdata -->
+ <KEYWORD2>description</KEYWORD2> <!-- hw_api_reason -->
+ <KEYWORD2>dgettext</KEYWORD2>
+ <KEYWORD2>dio_close</KEYWORD2>
+ <KEYWORD2>dio_fcntl</KEYWORD2>
+ <KEYWORD2>dio_open</KEYWORD2>
+ <KEYWORD2>dio_read</KEYWORD2>
+ <KEYWORD2>dio_seek</KEYWORD2>
+ <KEYWORD2>dio_stat</KEYWORD2>
+ <KEYWORD2>dio_tcsetattr</KEYWORD2>
+ <KEYWORD2>dio_truncate</KEYWORD2>
+ <KEYWORD2>dio_write</KEYWORD2>
+ <KEYWORD2>dir</KEYWORD2>
+ <KEYWORD2>dirname</KEYWORD2>
+ <KEYWORD2>disk_free_space</KEYWORD2>
+ <KEYWORD2>disk_total_space</KEYWORD2>
+ <KEYWORD2>diskfreespace</KEYWORD2>
+ <KEYWORD2>dl</KEYWORD2>
+ <KEYWORD2>dngettext</KEYWORD2>
+ <KEYWORD2>dns_check_record</KEYWORD2>
+ <KEYWORD2>dns_get_mx</KEYWORD2>
+ <KEYWORD2>dns_get_record</KEYWORD2>
+ <KEYWORD2>doctype</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>document_element</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>dom_import_simplexml</KEYWORD2>
+ <KEYWORD2>domxml_new_doc</KEYWORD2>
+ <KEYWORD2>domxml_open_file</KEYWORD2>
+ <KEYWORD2>domxml_open_mem</KEYWORD2>
+ <KEYWORD2>domxml_version</KEYWORD2>
+ <KEYWORD2>domxml_xmltree</KEYWORD2>
+ <KEYWORD2>domxml_xslt_stylesheet</KEYWORD2>
+ <KEYWORD2>domxml_xslt_stylesheet_doc</KEYWORD2>
+ <KEYWORD2>domxml_xslt_stylesheet_file</KEYWORD2>
+ <KEYWORD2>dotnet</KEYWORD2>
+ <KEYWORD2>dotnet_load</KEYWORD2>
+ <KEYWORD2>doubleval</KEYWORD2>
+ <KEYWORD2>drawcurve</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>drawcurveto</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>drawline</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>drawlineto</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>dstanchors</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>dstofsrcanchors</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>dump_file</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>dump_mem</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>dump_node</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>each</KEYWORD2>
+ <KEYWORD2>easter_date</KEYWORD2>
+ <KEYWORD2>easter_days</KEYWORD2>
+ <KEYWORD2>ebcdic2ascii</KEYWORD2>
+ <KEYWORD2>end</KEYWORD2>
+ <KEYWORD2>entities</KEYWORD2> <!-- domdocumenttype -->
+ <KEYWORD2>eof</KEYWORD2> <!-- lob -->
+ <KEYWORD2>erase</KEYWORD2> <!-- lob -->
+ <KEYWORD2>ereg</KEYWORD2>
+ <KEYWORD2>ereg_replace</KEYWORD2>
+ <KEYWORD2>eregi</KEYWORD2>
+ <KEYWORD2>eregi_replace</KEYWORD2>
+ <KEYWORD2>error_log</KEYWORD2>
+ <KEYWORD2>error_reporting</KEYWORD2>
+ <KEYWORD2>errorcode</KEYWORD2> <!-- pdo, pdostatement -->
+ <KEYWORD2>errorinfo</KEYWORD2> <!-- pdo, pdostatement -->
+ <KEYWORD2>escapeshellarg</KEYWORD2>
+ <KEYWORD2>escapeshellcmd</KEYWORD2>
+ <KEYWORD2>exec</KEYWORD2> <!-- pdo -->
+ <KEYWORD2>execute</KEYWORD2> <!-- pdostatement -->
+ <KEYWORD2>exif_imagetype</KEYWORD2>
+ <KEYWORD2>exif_read_data</KEYWORD2>
+ <KEYWORD2>exif_tagname</KEYWORD2>
+ <KEYWORD2>exif_thumbnail</KEYWORD2>
+ <KEYWORD2>exp</KEYWORD2>
+ <KEYWORD2>explode</KEYWORD2>
+ <KEYWORD2>expm1</KEYWORD2>
+ <KEYWORD2>export</KEYWORD2> <!-- lob -->
+ <KEYWORD2>extension_loaded</KEYWORD2>
+ <KEYWORD2>extract</KEYWORD2> <!-- rar -->
+ <KEYWORD2>ezmlm_hash</KEYWORD2>
+ <KEYWORD2>fam_cancel_monitor</KEYWORD2>
+ <KEYWORD2>fam_close</KEYWORD2>
+ <KEYWORD2>fam_monitor_collection</KEYWORD2>
+ <KEYWORD2>fam_monitor_directory</KEYWORD2>
+ <KEYWORD2>fam_monitor_file</KEYWORD2>
+ <KEYWORD2>fam_next_event</KEYWORD2>
+ <KEYWORD2>fam_open</KEYWORD2>
+ <KEYWORD2>fam_pending</KEYWORD2>
+ <KEYWORD2>fam_resume_monitor</KEYWORD2>
+ <KEYWORD2>fam_suspend_monitor</KEYWORD2>
+ <KEYWORD2>fbsql_affected_rows</KEYWORD2>
+ <KEYWORD2>fbsql_autocommit</KEYWORD2>
+ <KEYWORD2>fbsql_blob_size</KEYWORD2>
+ <KEYWORD2>fbsql_change_user</KEYWORD2>
+ <KEYWORD2>fbsql_clob_size</KEYWORD2>
+ <KEYWORD2>fbsql_close</KEYWORD2>
+ <KEYWORD2>fbsql_commit</KEYWORD2>
+ <KEYWORD2>fbsql_connect</KEYWORD2>
+ <KEYWORD2>fbsql_create_blob</KEYWORD2>
+ <KEYWORD2>fbsql_create_clob</KEYWORD2>
+ <KEYWORD2>fbsql_create_db</KEYWORD2>
+ <KEYWORD2>fbsql_data_seek</KEYWORD2>
+ <KEYWORD2>fbsql_database</KEYWORD2>
+ <KEYWORD2>fbsql_database_password</KEYWORD2>
+ <KEYWORD2>fbsql_db_query</KEYWORD2>
+ <KEYWORD2>fbsql_db_status</KEYWORD2>
+ <KEYWORD2>fbsql_drop_db</KEYWORD2>
+ <KEYWORD2>fbsql_errno</KEYWORD2>
+ <KEYWORD2>fbsql_error</KEYWORD2>
+ <KEYWORD2>fbsql_fetch_array</KEYWORD2>
+ <KEYWORD2>fbsql_fetch_assoc</KEYWORD2>
+ <KEYWORD2>fbsql_fetch_field</KEYWORD2>
+ <KEYWORD2>fbsql_fetch_lengths</KEYWORD2>
+ <KEYWORD2>fbsql_fetch_object</KEYWORD2>
+ <KEYWORD2>fbsql_fetch_row</KEYWORD2>
+ <KEYWORD2>fbsql_field_flags</KEYWORD2>
+ <KEYWORD2>fbsql_field_len</KEYWORD2>
+ <KEYWORD2>fbsql_field_name</KEYWORD2>
+ <KEYWORD2>fbsql_field_seek</KEYWORD2>
+ <KEYWORD2>fbsql_field_table</KEYWORD2>
+ <KEYWORD2>fbsql_field_type</KEYWORD2>
+ <KEYWORD2>fbsql_free_result</KEYWORD2>
+ <KEYWORD2>fbsql_get_autostart_info</KEYWORD2>
+ <KEYWORD2>fbsql_hostname</KEYWORD2>
+ <KEYWORD2>fbsql_insert_id</KEYWORD2>
+ <KEYWORD2>fbsql_list_dbs</KEYWORD2>
+ <KEYWORD2>fbsql_list_fields</KEYWORD2>
+ <KEYWORD2>fbsql_list_tables</KEYWORD2>
+ <KEYWORD2>fbsql_next_result</KEYWORD2>
+ <KEYWORD2>fbsql_num_fields</KEYWORD2>
+ <KEYWORD2>fbsql_num_rows</KEYWORD2>
+ <KEYWORD2>fbsql_password</KEYWORD2>
+ <KEYWORD2>fbsql_pconnect</KEYWORD2>
+ <KEYWORD2>fbsql_query</KEYWORD2>
+ <KEYWORD2>fbsql_read_blob</KEYWORD2>
+ <KEYWORD2>fbsql_read_clob</KEYWORD2>
+ <KEYWORD2>fbsql_result</KEYWORD2>
+ <KEYWORD2>fbsql_rollback</KEYWORD2>
+ <KEYWORD2>fbsql_select_db</KEYWORD2>
+ <KEYWORD2>fbsql_set_lob_mode</KEYWORD2>
+ <KEYWORD2>fbsql_set_password</KEYWORD2>
+ <KEYWORD2>fbsql_set_transaction</KEYWORD2>
+ <KEYWORD2>fbsql_start_db</KEYWORD2>
+ <KEYWORD2>fbsql_stop_db</KEYWORD2>
+ <KEYWORD2>fbsql_tablename</KEYWORD2>
+ <KEYWORD2>fbsql_username</KEYWORD2>
+ <KEYWORD2>fbsql_warnings</KEYWORD2>
+ <KEYWORD2>fclose</KEYWORD2>
+ <KEYWORD2>fdf_add_doc_javascript</KEYWORD2>
+ <KEYWORD2>fdf_add_template</KEYWORD2>
+ <KEYWORD2>fdf_close</KEYWORD2>
+ <KEYWORD2>fdf_create</KEYWORD2>
+ <KEYWORD2>fdf_enum_values</KEYWORD2>
+ <KEYWORD2>fdf_errno</KEYWORD2>
+ <KEYWORD2>fdf_error</KEYWORD2>
+ <KEYWORD2>fdf_get_ap</KEYWORD2>
+ <KEYWORD2>fdf_get_attachment</KEYWORD2>
+ <KEYWORD2>fdf_get_encoding</KEYWORD2>
+ <KEYWORD2>fdf_get_file</KEYWORD2>
+ <KEYWORD2>fdf_get_flags</KEYWORD2>
+ <KEYWORD2>fdf_get_opt</KEYWORD2>
+ <KEYWORD2>fdf_get_status</KEYWORD2>
+ <KEYWORD2>fdf_get_value</KEYWORD2>
+ <KEYWORD2>fdf_get_version</KEYWORD2>
+ <KEYWORD2>fdf_header</KEYWORD2>
+ <KEYWORD2>fdf_next_field_name</KEYWORD2>
+ <KEYWORD2>fdf_open</KEYWORD2>
+ <KEYWORD2>fdf_open_string</KEYWORD2>
+ <KEYWORD2>fdf_remove_item</KEYWORD2>
+ <KEYWORD2>fdf_save</KEYWORD2>
+ <KEYWORD2>fdf_save_string</KEYWORD2>
+ <KEYWORD2>fdf_set_ap</KEYWORD2>
+ <KEYWORD2>fdf_set_encoding</KEYWORD2>
+ <KEYWORD2>fdf_set_file</KEYWORD2>
+ <KEYWORD2>fdf_set_flags</KEYWORD2>
+ <KEYWORD2>fdf_set_javascript_action</KEYWORD2>
+ <KEYWORD2>fdf_set_on_import_javascript</KEYWORD2>
+ <KEYWORD2>fdf_set_opt</KEYWORD2>
+ <KEYWORD2>fdf_set_status</KEYWORD2>
+ <KEYWORD2>fdf_set_submit_form_action</KEYWORD2>
+ <KEYWORD2>fdf_set_target_frame</KEYWORD2>
+ <KEYWORD2>fdf_set_value</KEYWORD2>
+ <KEYWORD2>fdf_set_version</KEYWORD2>
+ <KEYWORD2>feof</KEYWORD2>
+ <KEYWORD2>fetch</KEYWORD2> <!-- pdostatement -->
+ <KEYWORD2>fetchall</KEYWORD2> <!-- pdostatement -->
+ <KEYWORD2>fetchsingle</KEYWORD2> <!-- pdostatement -->
+ <KEYWORD2>fflush</KEYWORD2>
+ <KEYWORD2>fgetc</KEYWORD2>
+ <KEYWORD2>fgetcsv</KEYWORD2>
+ <KEYWORD2>fgets</KEYWORD2>
+ <KEYWORD2>fgetss</KEYWORD2>
+ <KEYWORD2>file</KEYWORD2>
+ <KEYWORD2>file_exists</KEYWORD2>
+ <KEYWORD2>file_get_contents</KEYWORD2>
+ <KEYWORD2>file_put_contents</KEYWORD2>
+ <KEYWORD2>fileatime</KEYWORD2>
+ <KEYWORD2>filectime</KEYWORD2>
+ <KEYWORD2>filegroup</KEYWORD2>
+ <KEYWORD2>fileinode</KEYWORD2>
+ <KEYWORD2>filemtime</KEYWORD2>
+ <KEYWORD2>fileowner</KEYWORD2>
+ <KEYWORD2>fileperms</KEYWORD2>
+ <KEYWORD2>filepro</KEYWORD2>
+ <KEYWORD2>filepro_fieldcount</KEYWORD2>
+ <KEYWORD2>filepro_fieldname</KEYWORD2>
+ <KEYWORD2>filepro_fieldtype</KEYWORD2>
+ <KEYWORD2>filepro_fieldwidth</KEYWORD2>
+ <KEYWORD2>filepro_retrieve</KEYWORD2>
+ <KEYWORD2>filepro_rowcount</KEYWORD2>
+ <KEYWORD2>filesize</KEYWORD2>
+ <KEYWORD2>filetype</KEYWORD2>
+ <KEYWORD2>find</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>first_child</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>floatval</KEYWORD2>
+ <KEYWORD2>flock</KEYWORD2>
+ <KEYWORD2>floor</KEYWORD2>
+ <KEYWORD2>flush</KEYWORD2> <!-- lob, memcache -->
+ <KEYWORD2>fmod</KEYWORD2>
+ <KEYWORD2>fnmatch</KEYWORD2>
+ <KEYWORD2>fopen</KEYWORD2>
+ <KEYWORD2>fpassthru</KEYWORD2>
+ <KEYWORD2>fprintf</KEYWORD2>
+ <KEYWORD2>fputcsv</KEYWORD2>
+ <KEYWORD2>fputs</KEYWORD2>
+ <KEYWORD2>fread</KEYWORD2>
+ <KEYWORD2>free</KEYWORD2> <!-- collection, descriptor -->
+ <KEYWORD2>frenchtojd</KEYWORD2>
+ <KEYWORD2>fribidi_log2vis</KEYWORD2>
+ <KEYWORD2>fscanf</KEYWORD2>
+ <KEYWORD2>fseek</KEYWORD2>
+ <KEYWORD2>fsockopen</KEYWORD2>
+ <KEYWORD2>fstat</KEYWORD2>
+ <KEYWORD2>ftell</KEYWORD2>
+ <KEYWORD2>ftok</KEYWORD2>
+ <KEYWORD2>ftp_alloc</KEYWORD2>
+ <KEYWORD2>ftp_cdup</KEYWORD2>
+ <KEYWORD2>ftp_chdir</KEYWORD2>
+ <KEYWORD2>ftp_chmod</KEYWORD2>
+ <KEYWORD2>ftp_close</KEYWORD2>
+ <KEYWORD2>ftp_connect</KEYWORD2>
+ <KEYWORD2>ftp_delete</KEYWORD2>
+ <KEYWORD2>ftp_exec</KEYWORD2>
+ <KEYWORD2>ftp_fget</KEYWORD2>
+ <KEYWORD2>ftp_fput</KEYWORD2>
+ <KEYWORD2>ftp_get</KEYWORD2>
+ <KEYWORD2>ftp_get_option</KEYWORD2>
+ <KEYWORD2>ftp_login</KEYWORD2>
+ <KEYWORD2>ftp_mdtm</KEYWORD2>
+ <KEYWORD2>ftp_mkdir</KEYWORD2>
+ <KEYWORD2>ftp_nb_continue</KEYWORD2>
+ <KEYWORD2>ftp_nb_fget</KEYWORD2>
+ <KEYWORD2>ftp_nb_fput</KEYWORD2>
+ <KEYWORD2>ftp_nb_get</KEYWORD2>
+ <KEYWORD2>ftp_nb_put</KEYWORD2>
+ <KEYWORD2>ftp_nlist</KEYWORD2>
+ <KEYWORD2>ftp_pasv</KEYWORD2>
+ <KEYWORD2>ftp_put</KEYWORD2>
+ <KEYWORD2>ftp_pwd</KEYWORD2>
+ <KEYWORD2>ftp_quit</KEYWORD2>
+ <KEYWORD2>ftp_raw</KEYWORD2>
+ <KEYWORD2>ftp_rawlist</KEYWORD2>
+ <KEYWORD2>ftp_rename</KEYWORD2>
+ <KEYWORD2>ftp_rmdir</KEYWORD2>
+ <KEYWORD2>ftp_set_option</KEYWORD2>
+ <KEYWORD2>ftp_site</KEYWORD2>
+ <KEYWORD2>ftp_size</KEYWORD2>
+ <KEYWORD2>ftp_ssl_connect</KEYWORD2>
+ <KEYWORD2>ftp_systype</KEYWORD2>
+ <KEYWORD2>ftruncate</KEYWORD2>
+ <KEYWORD2>ftstat</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>func_get_arg</KEYWORD2>
+ <KEYWORD2>func_get_args</KEYWORD2>
+ <KEYWORD2>func_num_args</KEYWORD2>
+ <KEYWORD2>function_exists</KEYWORD2>
+ <KEYWORD2>fwrite</KEYWORD2>
+ <KEYWORD2>gd_info</KEYWORD2>
+ <KEYWORD2>get</KEYWORD2> <!-- memcache -->
+ <KEYWORD2>get_attr</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>get_attribute</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>get_attribute_node</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>get_browser</KEYWORD2>
+ <KEYWORD2>get_cfg_var</KEYWORD2>
+ <KEYWORD2>get_class</KEYWORD2>
+ <KEYWORD2>get_class_methods</KEYWORD2>
+ <KEYWORD2>get_class_vars</KEYWORD2>
+ <KEYWORD2>get_content</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>get_current_user</KEYWORD2>
+ <KEYWORD2>get_declared_classes</KEYWORD2>
+ <KEYWORD2>get_declared_interfaces</KEYWORD2>
+ <KEYWORD2>get_defined_constants</KEYWORD2>
+ <KEYWORD2>get_defined_functions</KEYWORD2>
+ <KEYWORD2>get_defined_vars</KEYWORD2>
+ <KEYWORD2>get_element_by_id</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>get_elements_by_tagname</KEYWORD2> <!-- domdocument, domelement -->
+ <KEYWORD2>get_extension_funcs</KEYWORD2>
+ <KEYWORD2>get_headers</KEYWORD2>
+ <KEYWORD2>get_html_translation_table</KEYWORD2>
+ <KEYWORD2>get_include_path</KEYWORD2>
+ <KEYWORD2>get_included_files</KEYWORD2>
+ <KEYWORD2>get_loaded_extensions</KEYWORD2>
+ <KEYWORD2>get_magic_quotes_gpc</KEYWORD2>
+ <KEYWORD2>get_magic_quotes_runtime</KEYWORD2>
+ <KEYWORD2>get_meta_tags</KEYWORD2>
+ <KEYWORD2>get_nodes</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>get_object_vars</KEYWORD2>
+ <KEYWORD2>get_parent_class</KEYWORD2>
+ <KEYWORD2>get_required_files</KEYWORD2>
+ <KEYWORD2>get_resource_type</KEYWORD2>
+ <KEYWORD2>getallheaders</KEYWORD2>
+ <KEYWORD2>getatime</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getattr</KEYWORD2> <!-- rar -->
+ <KEYWORD2>getattribute</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>getattributenode</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>getattributenodens</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>getattributens</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>getbuffering</KEYWORD2> <!-- lob -->
+ <KEYWORD2>getchildren</KEYWORD2> <!-- cachingrecursiveiterator, directoryiterator, parentiterator, recursivedirectoryiterator, simplexmliterator -->
+ <KEYWORD2>getcrc</KEYWORD2> <!-- rar -->
+ <KEYWORD2>getctime</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getcwd</KEYWORD2>
+ <KEYWORD2>getdate</KEYWORD2>
+ <KEYWORD2>getdepth</KEYWORD2> <!-- recursiveiteratoriterator -->
+ <KEYWORD2>getelem</KEYWORD2> <!-- collection -->
+ <KEYWORD2>getelementbyid</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>getelementsbytagname</KEYWORD2> <!-- domdocument, domelement -->
+ <KEYWORD2>getelementsbytagnamens</KEYWORD2> <!-- domdocument, domelement -->
+ <KEYWORD2>getenv</KEYWORD2>
+ <KEYWORD2>getfilename</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getfiletime</KEYWORD2> <!-- rar -->
+ <KEYWORD2>getfunctions</KEYWORD2> <!-- soapserver -->
+ <KEYWORD2>getgroup</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getheight</KEYWORD2> <!-- swfbitmap -->
+ <KEYWORD2>gethostbyaddr</KEYWORD2>
+ <KEYWORD2>gethostbyname</KEYWORD2>
+ <KEYWORD2>gethostbynamel</KEYWORD2>
+ <KEYWORD2>gethostos</KEYWORD2> <!-- rar -->
+ <KEYWORD2>getimagesize</KEYWORD2>
+ <KEYWORD2>getinneriterator</KEYWORD2> <!-- filteriterator -->
+ <KEYWORD2>getinode</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getiterator</KEYWORD2> <!-- arrayobject -->
+ <KEYWORD2>getlastmod</KEYWORD2>
+ <KEYWORD2>getmethod</KEYWORD2> <!-- rar -->
+ <KEYWORD2>getmtime</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getmxrr</KEYWORD2>
+ <KEYWORD2>getmygid</KEYWORD2>
+ <KEYWORD2>getmyinode</KEYWORD2>
+ <KEYWORD2>getmypid</KEYWORD2>
+ <KEYWORD2>getmyuid</KEYWORD2>
+ <KEYWORD2>getname</KEYWORD2> <!-- rar -->
+ <KEYWORD2>getnameditem</KEYWORD2> <!-- domnamednodemap -->
+ <KEYWORD2>getnameditemns</KEYWORD2> <!-- domnamednodemap -->
+ <KEYWORD2>getopt</KEYWORD2>
+ <KEYWORD2>getowner</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getpackedsize</KEYWORD2> <!-- rar -->
+ <KEYWORD2>getpath</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getpathname</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getperms</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getposition</KEYWORD2> <!-- limititerator -->
+ <KEYWORD2>getprotobyname</KEYWORD2>
+ <KEYWORD2>getprotobynumber</KEYWORD2>
+ <KEYWORD2>getrandmax</KEYWORD2>
+ <KEYWORD2>getrusage</KEYWORD2>
+ <KEYWORD2>getservbyname</KEYWORD2>
+ <KEYWORD2>getservbyport</KEYWORD2>
+ <KEYWORD2>getshape1</KEYWORD2> <!-- swfmorph -->
+ <KEYWORD2>getshape2</KEYWORD2> <!-- swfmorph -->
+ <KEYWORD2>getsize</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getstats</KEYWORD2> <!-- memcache -->
+ <KEYWORD2>getsubiterator</KEYWORD2> <!-- recursiveiteratoriterator -->
+ <KEYWORD2>gettext</KEYWORD2>
+ <KEYWORD2>gettimeofday</KEYWORD2>
+ <KEYWORD2>gettype</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>getunpackedsize</KEYWORD2> <!-- rar -->
+ <KEYWORD2>getversion</KEYWORD2> <!-- memcache, rar -->
+ <KEYWORD2>getwidth</KEYWORD2> <!-- swfbitmap, swffont, swftext -->
+ <KEYWORD2>glob</KEYWORD2>
+ <KEYWORD2>gmdate</KEYWORD2>
+ <KEYWORD2>gmmktime</KEYWORD2>
+ <KEYWORD2>gmp_abs</KEYWORD2>
+ <KEYWORD2>gmp_add</KEYWORD2>
+ <KEYWORD2>gmp_and</KEYWORD2>
+ <KEYWORD2>gmp_clrbit</KEYWORD2>
+ <KEYWORD2>gmp_cmp</KEYWORD2>
+ <KEYWORD2>gmp_com</KEYWORD2>
+ <KEYWORD2>gmp_div</KEYWORD2>
+ <KEYWORD2>gmp_div_q</KEYWORD2>
+ <KEYWORD2>gmp_div_qr</KEYWORD2>
+ <KEYWORD2>gmp_div_r</KEYWORD2>
+ <KEYWORD2>gmp_divexact</KEYWORD2>
+ <KEYWORD2>gmp_fact</KEYWORD2>
+ <KEYWORD2>gmp_gcd</KEYWORD2>
+ <KEYWORD2>gmp_gcdext</KEYWORD2>
+ <KEYWORD2>gmp_hamdist</KEYWORD2>
+ <KEYWORD2>gmp_init</KEYWORD2>
+ <KEYWORD2>gmp_intval</KEYWORD2>
+ <KEYWORD2>gmp_invert</KEYWORD2>
+ <KEYWORD2>gmp_jacobi</KEYWORD2>
+ <KEYWORD2>gmp_legendre</KEYWORD2>
+ <KEYWORD2>gmp_mod</KEYWORD2>
+ <KEYWORD2>gmp_mul</KEYWORD2>
+ <KEYWORD2>gmp_neg</KEYWORD2>
+ <KEYWORD2>gmp_or</KEYWORD2>
+ <KEYWORD2>gmp_perfect_square</KEYWORD2>
+ <KEYWORD2>gmp_popcount</KEYWORD2>
+ <KEYWORD2>gmp_pow</KEYWORD2>
+ <KEYWORD2>gmp_powm</KEYWORD2>
+ <KEYWORD2>gmp_prob_prime</KEYWORD2>
+ <KEYWORD2>gmp_random</KEYWORD2>
+ <KEYWORD2>gmp_scan0</KEYWORD2>
+ <KEYWORD2>gmp_scan1</KEYWORD2>
+ <KEYWORD2>gmp_setbit</KEYWORD2>
+ <KEYWORD2>gmp_sign</KEYWORD2>
+ <KEYWORD2>gmp_sqrt</KEYWORD2>
+ <KEYWORD2>gmp_sqrtrem</KEYWORD2>
+ <KEYWORD2>gmp_strval</KEYWORD2>
+ <KEYWORD2>gmp_sub</KEYWORD2>
+ <KEYWORD2>gmp_xor</KEYWORD2>
+ <KEYWORD2>gmstrftime</KEYWORD2>
+ <KEYWORD2>gregoriantojd</KEYWORD2>
+ <KEYWORD2>gzclose</KEYWORD2>
+ <KEYWORD2>gzcompress</KEYWORD2>
+ <KEYWORD2>gzdeflate</KEYWORD2>
+ <KEYWORD2>gzencode</KEYWORD2>
+ <KEYWORD2>gzeof</KEYWORD2>
+ <KEYWORD2>gzfile</KEYWORD2>
+ <KEYWORD2>gzgetc</KEYWORD2>
+ <KEYWORD2>gzgets</KEYWORD2>
+ <KEYWORD2>gzgetss</KEYWORD2>
+ <KEYWORD2>gzinflate</KEYWORD2>
+ <KEYWORD2>gzopen</KEYWORD2>
+ <KEYWORD2>gzpassthru</KEYWORD2>
+ <KEYWORD2>gzputs</KEYWORD2>
+ <KEYWORD2>gzread</KEYWORD2>
+ <KEYWORD2>gzrewind</KEYWORD2>
+ <KEYWORD2>gzseek</KEYWORD2>
+ <KEYWORD2>gztell</KEYWORD2>
+ <KEYWORD2>gzuncompress</KEYWORD2>
+ <KEYWORD2>gzwrite</KEYWORD2>
+ <KEYWORD2>handle</KEYWORD2> <!-- soapserver -->
+ <KEYWORD2>has_attribute</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>has_attributes</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>has_child_nodes</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>hasattribute</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>hasattributens</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>hasattributes</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>haschildnodes</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>haschildren</KEYWORD2> <!-- cachingrecursiveiterator, parentiterator, recursivedirectoryiterator, simplexmliterator, tidy_node -->
+ <KEYWORD2>hasfeature</KEYWORD2> <!-- domimplementation -->
+ <KEYWORD2>hasnext</KEYWORD2> <!-- cachingiterator -->
+ <KEYWORD2>hassiblings</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>header</KEYWORD2>
+ <KEYWORD2>headers_list</KEYWORD2>
+ <KEYWORD2>headers_sent</KEYWORD2>
+ <KEYWORD2>hebrev</KEYWORD2>
+ <KEYWORD2>hebrevc</KEYWORD2>
+ <KEYWORD2>hexdec</KEYWORD2>
+ <KEYWORD2>highlight_file</KEYWORD2>
+ <KEYWORD2>highlight_string</KEYWORD2>
+ <KEYWORD2>html_dump_mem</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>html_entity_decode</KEYWORD2>
+ <KEYWORD2>htmlentities</KEYWORD2>
+ <KEYWORD2>htmlspecialchars</KEYWORD2>
+ <KEYWORD2>http_build_query</KEYWORD2>
+ <KEYWORD2>hw_array2objrec</KEYWORD2>
+ <KEYWORD2>hw_changeobject</KEYWORD2>
+ <KEYWORD2>hw_children</KEYWORD2>
+ <KEYWORD2>hw_childrenobj</KEYWORD2>
+ <KEYWORD2>hw_close</KEYWORD2>
+ <KEYWORD2>hw_connect</KEYWORD2>
+ <KEYWORD2>hw_connection_info</KEYWORD2>
+ <KEYWORD2>hw_cp</KEYWORD2>
+ <KEYWORD2>hw_deleteobject</KEYWORD2>
+ <KEYWORD2>hw_docbyanchor</KEYWORD2>
+ <KEYWORD2>hw_docbyanchorobj</KEYWORD2>
+ <KEYWORD2>hw_document_attributes</KEYWORD2>
+ <KEYWORD2>hw_document_bodytag</KEYWORD2>
+ <KEYWORD2>hw_document_content</KEYWORD2>
+ <KEYWORD2>hw_document_setcontent</KEYWORD2>
+ <KEYWORD2>hw_document_size</KEYWORD2>
+ <KEYWORD2>hw_dummy</KEYWORD2>
+ <KEYWORD2>hw_edittext</KEYWORD2>
+ <KEYWORD2>hw_error</KEYWORD2>
+ <KEYWORD2>hw_errormsg</KEYWORD2>
+ <KEYWORD2>hw_free_document</KEYWORD2>
+ <KEYWORD2>hw_getanchors</KEYWORD2>
+ <KEYWORD2>hw_getanchorsobj</KEYWORD2>
+ <KEYWORD2>hw_getandlock</KEYWORD2>
+ <KEYWORD2>hw_getchildcoll</KEYWORD2>
+ <KEYWORD2>hw_getchildcollobj</KEYWORD2>
+ <KEYWORD2>hw_getchilddoccoll</KEYWORD2>
+ <KEYWORD2>hw_getchilddoccollobj</KEYWORD2>
+ <KEYWORD2>hw_getobject</KEYWORD2>
+ <KEYWORD2>hw_getobjectbyquery</KEYWORD2>
+ <KEYWORD2>hw_getobjectbyquerycoll</KEYWORD2>
+ <KEYWORD2>hw_getobjectbyquerycollobj</KEYWORD2>
+ <KEYWORD2>hw_getobjectbyqueryobj</KEYWORD2>
+ <KEYWORD2>hw_getparents</KEYWORD2>
+ <KEYWORD2>hw_getparentsobj</KEYWORD2>
+ <KEYWORD2>hw_getrellink</KEYWORD2>
+ <KEYWORD2>hw_getremote</KEYWORD2>
+ <KEYWORD2>hw_getremotechildren</KEYWORD2>
+ <KEYWORD2>hw_getsrcbydestobj</KEYWORD2>
+ <KEYWORD2>hw_gettext</KEYWORD2>
+ <KEYWORD2>hw_getusername</KEYWORD2>
+ <KEYWORD2>hw_identify</KEYWORD2>
+ <KEYWORD2>hw_incollections</KEYWORD2>
+ <KEYWORD2>hw_info</KEYWORD2>
+ <KEYWORD2>hw_inscoll</KEYWORD2>
+ <KEYWORD2>hw_insdoc</KEYWORD2>
+ <KEYWORD2>hw_insertanchors</KEYWORD2>
+ <KEYWORD2>hw_insertdocument</KEYWORD2>
+ <KEYWORD2>hw_insertobject</KEYWORD2>
+ <KEYWORD2>hw_mapid</KEYWORD2>
+ <KEYWORD2>hw_modifyobject</KEYWORD2>
+ <KEYWORD2>hw_mv</KEYWORD2>
+ <KEYWORD2>hw_new_document</KEYWORD2>
+ <KEYWORD2>hw_objrec2array</KEYWORD2>
+ <KEYWORD2>hw_output_document</KEYWORD2>
+ <KEYWORD2>hw_pconnect</KEYWORD2>
+ <KEYWORD2>hw_pipedocument</KEYWORD2>
+ <KEYWORD2>hw_root</KEYWORD2>
+ <KEYWORD2>hw_setlinkroot</KEYWORD2>
+ <KEYWORD2>hw_stat</KEYWORD2>
+ <KEYWORD2>hw_unlock</KEYWORD2>
+ <KEYWORD2>hw_who</KEYWORD2>
+ <KEYWORD2>hwapi_hgcsp</KEYWORD2>
+ <KEYWORD2>hwstat</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>hypot</KEYWORD2>
+ <KEYWORD2>ibase_add_user</KEYWORD2>
+ <KEYWORD2>ibase_affected_rows</KEYWORD2>
+ <KEYWORD2>ibase_backup</KEYWORD2>
+ <KEYWORD2>ibase_blob_add</KEYWORD2>
+ <KEYWORD2>ibase_blob_cancel</KEYWORD2>
+ <KEYWORD2>ibase_blob_close</KEYWORD2>
+ <KEYWORD2>ibase_blob_create</KEYWORD2>
+ <KEYWORD2>ibase_blob_echo</KEYWORD2>
+ <KEYWORD2>ibase_blob_get</KEYWORD2>
+ <KEYWORD2>ibase_blob_import</KEYWORD2>
+ <KEYWORD2>ibase_blob_info</KEYWORD2>
+ <KEYWORD2>ibase_blob_open</KEYWORD2>
+ <KEYWORD2>ibase_close</KEYWORD2>
+ <KEYWORD2>ibase_commit</KEYWORD2>
+ <KEYWORD2>ibase_commit_ret</KEYWORD2>
+ <KEYWORD2>ibase_connect</KEYWORD2>
+ <KEYWORD2>ibase_db_info</KEYWORD2>
+ <KEYWORD2>ibase_delete_user</KEYWORD2>
+ <KEYWORD2>ibase_drop_db</KEYWORD2>
+ <KEYWORD2>ibase_errcode</KEYWORD2>
+ <KEYWORD2>ibase_errmsg</KEYWORD2>
+ <KEYWORD2>ibase_execute</KEYWORD2>
+ <KEYWORD2>ibase_fetch_assoc</KEYWORD2>
+ <KEYWORD2>ibase_fetch_object</KEYWORD2>
+ <KEYWORD2>ibase_fetch_row</KEYWORD2>
+ <KEYWORD2>ibase_field_info</KEYWORD2>
+ <KEYWORD2>ibase_free_event_handler</KEYWORD2>
+ <KEYWORD2>ibase_free_query</KEYWORD2>
+ <KEYWORD2>ibase_free_result</KEYWORD2>
+ <KEYWORD2>ibase_gen_id</KEYWORD2>
+ <KEYWORD2>ibase_maintain_db</KEYWORD2>
+ <KEYWORD2>ibase_modify_user</KEYWORD2>
+ <KEYWORD2>ibase_name_result</KEYWORD2>
+ <KEYWORD2>ibase_num_fields</KEYWORD2>
+ <KEYWORD2>ibase_num_params</KEYWORD2>
+ <KEYWORD2>ibase_param_info</KEYWORD2>
+ <KEYWORD2>ibase_pconnect</KEYWORD2>
+ <KEYWORD2>ibase_prepare</KEYWORD2>
+ <KEYWORD2>ibase_query</KEYWORD2>
+ <KEYWORD2>ibase_restore</KEYWORD2>
+ <KEYWORD2>ibase_rollback</KEYWORD2>
+ <KEYWORD2>ibase_rollback_ret</KEYWORD2>
+ <KEYWORD2>ibase_server_info</KEYWORD2>
+ <KEYWORD2>ibase_service_attach</KEYWORD2>
+ <KEYWORD2>ibase_service_detach</KEYWORD2>
+ <KEYWORD2>ibase_set_event_handler</KEYWORD2>
+ <KEYWORD2>ibase_timefmt</KEYWORD2>
+ <KEYWORD2>ibase_trans</KEYWORD2>
+ <KEYWORD2>ibase_wait_event</KEYWORD2>
+ <KEYWORD2>iconv</KEYWORD2>
+ <KEYWORD2>iconv_get_encoding</KEYWORD2>
+ <KEYWORD2>iconv_mime_decode</KEYWORD2>
+ <KEYWORD2>iconv_mime_decode_headers</KEYWORD2>
+ <KEYWORD2>iconv_mime_encode</KEYWORD2>
+ <KEYWORD2>iconv_set_encoding</KEYWORD2>
+ <KEYWORD2>iconv_strlen</KEYWORD2>
+ <KEYWORD2>iconv_strpos</KEYWORD2>
+ <KEYWORD2>iconv_strrpos</KEYWORD2>
+ <KEYWORD2>iconv_substr</KEYWORD2>
+ <KEYWORD2>id3_get_genre_id</KEYWORD2>
+ <KEYWORD2>id3_get_genre_list</KEYWORD2>
+ <KEYWORD2>id3_get_genre_name</KEYWORD2>
+ <KEYWORD2>id3_get_tag</KEYWORD2>
+ <KEYWORD2>id3_get_version</KEYWORD2>
+ <KEYWORD2>id3_remove_tag</KEYWORD2>
+ <KEYWORD2>id3_set_tag</KEYWORD2>
+ <KEYWORD2>idate</KEYWORD2>
+ <KEYWORD2>identify</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>ifx_affected_rows</KEYWORD2>
+ <KEYWORD2>ifx_blobinfile_mode</KEYWORD2>
+ <KEYWORD2>ifx_byteasvarchar</KEYWORD2>
+ <KEYWORD2>ifx_close</KEYWORD2>
+ <KEYWORD2>ifx_connect</KEYWORD2>
+ <KEYWORD2>ifx_copy_blob</KEYWORD2>
+ <KEYWORD2>ifx_create_blob</KEYWORD2>
+ <KEYWORD2>ifx_create_char</KEYWORD2>
+ <KEYWORD2>ifx_do</KEYWORD2>
+ <KEYWORD2>ifx_error</KEYWORD2>
+ <KEYWORD2>ifx_errormsg</KEYWORD2>
+ <KEYWORD2>ifx_fetch_row</KEYWORD2>
+ <KEYWORD2>ifx_fieldproperties</KEYWORD2>
+ <KEYWORD2>ifx_fieldtypes</KEYWORD2>
+ <KEYWORD2>ifx_free_blob</KEYWORD2>
+ <KEYWORD2>ifx_free_char</KEYWORD2>
+ <KEYWORD2>ifx_free_result</KEYWORD2>
+ <KEYWORD2>ifx_get_blob</KEYWORD2>
+ <KEYWORD2>ifx_get_char</KEYWORD2>
+ <KEYWORD2>ifx_getsqlca</KEYWORD2>
+ <KEYWORD2>ifx_htmltbl_result</KEYWORD2>
+ <KEYWORD2>ifx_nullformat</KEYWORD2>
+ <KEYWORD2>ifx_num_fields</KEYWORD2>
+ <KEYWORD2>ifx_num_rows</KEYWORD2>
+ <KEYWORD2>ifx_pconnect</KEYWORD2>
+ <KEYWORD2>ifx_prepare</KEYWORD2>
+ <KEYWORD2>ifx_query</KEYWORD2>
+ <KEYWORD2>ifx_textasvarchar</KEYWORD2>
+ <KEYWORD2>ifx_update_blob</KEYWORD2>
+ <KEYWORD2>ifx_update_char</KEYWORD2>
+ <KEYWORD2>ifxus_close_slob</KEYWORD2>
+ <KEYWORD2>ifxus_create_slob</KEYWORD2>
+ <KEYWORD2>ifxus_free_slob</KEYWORD2>
+ <KEYWORD2>ifxus_open_slob</KEYWORD2>
+ <KEYWORD2>ifxus_read_slob</KEYWORD2>
+ <KEYWORD2>ifxus_seek_slob</KEYWORD2>
+ <KEYWORD2>ifxus_tell_slob</KEYWORD2>
+ <KEYWORD2>ifxus_write_slob</KEYWORD2>
+ <KEYWORD2>ignore_user_abort</KEYWORD2>
+ <KEYWORD2>image2wbmp</KEYWORD2>
+ <KEYWORD2>image_type_to_extension</KEYWORD2>
+ <KEYWORD2>image_type_to_mime_type</KEYWORD2>
+ <KEYWORD2>imagealphablending</KEYWORD2>
+ <KEYWORD2>imageantialias</KEYWORD2>
+ <KEYWORD2>imagearc</KEYWORD2>
+ <KEYWORD2>imagechar</KEYWORD2>
+ <KEYWORD2>imagecharup</KEYWORD2>
+ <KEYWORD2>imagecolorallocate</KEYWORD2>
+ <KEYWORD2>imagecolorallocatealpha</KEYWORD2>
+ <KEYWORD2>imagecolorat</KEYWORD2>
+ <KEYWORD2>imagecolorclosest</KEYWORD2>
+ <KEYWORD2>imagecolorclosestalpha</KEYWORD2>
+ <KEYWORD2>imagecolorclosesthwb</KEYWORD2>
+ <KEYWORD2>imagecolordeallocate</KEYWORD2>
+ <KEYWORD2>imagecolorexact</KEYWORD2>
+ <KEYWORD2>imagecolorexactalpha</KEYWORD2>
+ <KEYWORD2>imagecolormatch</KEYWORD2>
+ <KEYWORD2>imagecolorresolve</KEYWORD2>
+ <KEYWORD2>imagecolorresolvealpha</KEYWORD2>
+ <KEYWORD2>imagecolorset</KEYWORD2>
+ <KEYWORD2>imagecolorsforindex</KEYWORD2>
+ <KEYWORD2>imagecolorstotal</KEYWORD2>
+ <KEYWORD2>imagecolortransparent</KEYWORD2>
+ <KEYWORD2>imagecopy</KEYWORD2>
+ <KEYWORD2>imagecopymerge</KEYWORD2>
+ <KEYWORD2>imagecopymergegray</KEYWORD2>
+ <KEYWORD2>imagecopyresampled</KEYWORD2>
+ <KEYWORD2>imagecopyresized</KEYWORD2>
+ <KEYWORD2>imagecreate</KEYWORD2>
+ <KEYWORD2>imagecreatefromgd</KEYWORD2>
+ <KEYWORD2>imagecreatefromgd2</KEYWORD2>
+ <KEYWORD2>imagecreatefromgd2part</KEYWORD2>
+ <KEYWORD2>imagecreatefromgif</KEYWORD2>
+ <KEYWORD2>imagecreatefromjpeg</KEYWORD2>
+ <KEYWORD2>imagecreatefrompng</KEYWORD2>
+ <KEYWORD2>imagecreatefromstring</KEYWORD2>
+ <KEYWORD2>imagecreatefromwbmp</KEYWORD2>
+ <KEYWORD2>imagecreatefromxbm</KEYWORD2>
+ <KEYWORD2>imagecreatefromxpm</KEYWORD2>
+ <KEYWORD2>imagecreatetruecolor</KEYWORD2>
+ <KEYWORD2>imagedashedline</KEYWORD2>
+ <KEYWORD2>imagedestroy</KEYWORD2>
+ <KEYWORD2>imageellipse</KEYWORD2>
+ <KEYWORD2>imagefill</KEYWORD2>
+ <KEYWORD2>imagefilledarc</KEYWORD2>
+ <KEYWORD2>imagefilledellipse</KEYWORD2>
+ <KEYWORD2>imagefilledpolygon</KEYWORD2>
+ <KEYWORD2>imagefilledrectangle</KEYWORD2>
+ <KEYWORD2>imagefilltoborder</KEYWORD2>
+ <KEYWORD2>imagefilter</KEYWORD2>
+ <KEYWORD2>imagefontheight</KEYWORD2>
+ <KEYWORD2>imagefontwidth</KEYWORD2>
+ <KEYWORD2>imageftbbox</KEYWORD2>
+ <KEYWORD2>imagefttext</KEYWORD2>
+ <KEYWORD2>imagegammacorrect</KEYWORD2>
+ <KEYWORD2>imagegd</KEYWORD2>
+ <KEYWORD2>imagegd2</KEYWORD2>
+ <KEYWORD2>imagegif</KEYWORD2>
+ <KEYWORD2>imageinterlace</KEYWORD2>
+ <KEYWORD2>imageistruecolor</KEYWORD2>
+ <KEYWORD2>imagejpeg</KEYWORD2>
+ <KEYWORD2>imagelayereffect</KEYWORD2>
+ <KEYWORD2>imageline</KEYWORD2>
+ <KEYWORD2>imageloadfont</KEYWORD2>
+ <KEYWORD2>imagepalettecopy</KEYWORD2>
+ <KEYWORD2>imagepng</KEYWORD2>
+ <KEYWORD2>imagepolygon</KEYWORD2>
+ <KEYWORD2>imagepsbbox</KEYWORD2>
+ <KEYWORD2>imagepscopyfont</KEYWORD2>
+ <KEYWORD2>imagepsencodefont</KEYWORD2>
+ <KEYWORD2>imagepsextendfont</KEYWORD2>
+ <KEYWORD2>imagepsfreefont</KEYWORD2>
+ <KEYWORD2>imagepsloadfont</KEYWORD2>
+ <KEYWORD2>imagepsslantfont</KEYWORD2>
+ <KEYWORD2>imagepstext</KEYWORD2>
+ <KEYWORD2>imagerectangle</KEYWORD2>
+ <KEYWORD2>imagerotate</KEYWORD2>
+ <KEYWORD2>imagesavealpha</KEYWORD2>
+ <KEYWORD2>imagesetbrush</KEYWORD2>
+ <KEYWORD2>imagesetpixel</KEYWORD2>
+ <KEYWORD2>imagesetstyle</KEYWORD2>
+ <KEYWORD2>imagesetthickness</KEYWORD2>
+ <KEYWORD2>imagesettile</KEYWORD2>
+ <KEYWORD2>imagestring</KEYWORD2>
+ <KEYWORD2>imagestringup</KEYWORD2>
+ <KEYWORD2>imagesx</KEYWORD2>
+ <KEYWORD2>imagesy</KEYWORD2>
+ <KEYWORD2>imagetruecolortopalette</KEYWORD2>
+ <KEYWORD2>imagettfbbox</KEYWORD2>
+ <KEYWORD2>imagettftext</KEYWORD2>
+ <KEYWORD2>imagetypes</KEYWORD2>
+ <KEYWORD2>imagewbmp</KEYWORD2>
+ <KEYWORD2>imagexbm</KEYWORD2>
+ <KEYWORD2>imap_8bit</KEYWORD2>
+ <KEYWORD2>imap_alerts</KEYWORD2>
+ <KEYWORD2>imap_append</KEYWORD2>
+ <KEYWORD2>imap_base64</KEYWORD2>
+ <KEYWORD2>imap_binary</KEYWORD2>
+ <KEYWORD2>imap_body</KEYWORD2>
+ <KEYWORD2>imap_bodystruct</KEYWORD2>
+ <KEYWORD2>imap_check</KEYWORD2>
+ <KEYWORD2>imap_clearflag_full</KEYWORD2>
+ <KEYWORD2>imap_close</KEYWORD2>
+ <KEYWORD2>imap_createmailbox</KEYWORD2>
+ <KEYWORD2>imap_delete</KEYWORD2>
+ <KEYWORD2>imap_deletemailbox</KEYWORD2>
+ <KEYWORD2>imap_errors</KEYWORD2>
+ <KEYWORD2>imap_expunge</KEYWORD2>
+ <KEYWORD2>imap_fetch_overview</KEYWORD2>
+ <KEYWORD2>imap_fetchbody</KEYWORD2>
+ <KEYWORD2>imap_fetchheader</KEYWORD2>
+ <KEYWORD2>imap_fetchstructure</KEYWORD2>
+ <KEYWORD2>imap_get_quota</KEYWORD2>
+ <KEYWORD2>imap_get_quotaroot</KEYWORD2>
+ <KEYWORD2>imap_getacl</KEYWORD2>
+ <KEYWORD2>imap_getmailboxes</KEYWORD2>
+ <KEYWORD2>imap_getsubscribed</KEYWORD2>
+ <KEYWORD2>imap_header</KEYWORD2>
+ <KEYWORD2>imap_headerinfo</KEYWORD2>
+ <KEYWORD2>imap_headers</KEYWORD2>
+ <KEYWORD2>imap_last_error</KEYWORD2>
+ <KEYWORD2>imap_list</KEYWORD2>
+ <KEYWORD2>imap_listmailbox</KEYWORD2>
+ <KEYWORD2>imap_listscan</KEYWORD2>
+ <KEYWORD2>imap_listsubscribed</KEYWORD2>
+ <KEYWORD2>imap_lsub</KEYWORD2>
+ <KEYWORD2>imap_mail</KEYWORD2>
+ <KEYWORD2>imap_mail_compose</KEYWORD2>
+ <KEYWORD2>imap_mail_copy</KEYWORD2>
+ <KEYWORD2>imap_mail_move</KEYWORD2>
+ <KEYWORD2>imap_mailboxmsginfo</KEYWORD2>
+ <KEYWORD2>imap_mime_header_decode</KEYWORD2>
+ <KEYWORD2>imap_msgno</KEYWORD2>
+ <KEYWORD2>imap_num_msg</KEYWORD2>
+ <KEYWORD2>imap_num_recent</KEYWORD2>
+ <KEYWORD2>imap_open</KEYWORD2>
+ <KEYWORD2>imap_ping</KEYWORD2>
+ <KEYWORD2>imap_qprint</KEYWORD2>
+ <KEYWORD2>imap_renamemailbox</KEYWORD2>
+ <KEYWORD2>imap_reopen</KEYWORD2>
+ <KEYWORD2>imap_rfc822_parse_adrlist</KEYWORD2>
+ <KEYWORD2>imap_rfc822_parse_headers</KEYWORD2>
+ <KEYWORD2>imap_rfc822_write_address</KEYWORD2>
+ <KEYWORD2>imap_scanmailbox</KEYWORD2>
+ <KEYWORD2>imap_search</KEYWORD2>
+ <KEYWORD2>imap_set_quota</KEYWORD2>
+ <KEYWORD2>imap_setacl</KEYWORD2>
+ <KEYWORD2>imap_setflag_full</KEYWORD2>
+ <KEYWORD2>imap_sort</KEYWORD2>
+ <KEYWORD2>imap_status</KEYWORD2>
+ <KEYWORD2>imap_subscribe</KEYWORD2>
+ <KEYWORD2>imap_thread</KEYWORD2>
+ <KEYWORD2>imap_timeout</KEYWORD2>
+ <KEYWORD2>imap_uid</KEYWORD2>
+ <KEYWORD2>imap_undelete</KEYWORD2>
+ <KEYWORD2>imap_unsubscribe</KEYWORD2>
+ <KEYWORD2>imap_utf7_decode</KEYWORD2>
+ <KEYWORD2>imap_utf7_encode</KEYWORD2>
+ <KEYWORD2>imap_utf8</KEYWORD2>
+ <KEYWORD2>implode</KEYWORD2>
+ <KEYWORD2>import</KEYWORD2> <!-- lob -->
+ <KEYWORD2>import_request_variables</KEYWORD2>
+ <KEYWORD2>importnode</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>in_array</KEYWORD2>
+ <KEYWORD2>increment</KEYWORD2> <!-- memcache -->
+ <KEYWORD2>inet_ntop</KEYWORD2>
+ <KEYWORD2>inet_pton</KEYWORD2>
+ <KEYWORD2>info</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>ingres_autocommit</KEYWORD2>
+ <KEYWORD2>ingres_close</KEYWORD2>
+ <KEYWORD2>ingres_commit</KEYWORD2>
+ <KEYWORD2>ingres_connect</KEYWORD2>
+ <KEYWORD2>ingres_fetch_array</KEYWORD2>
+ <KEYWORD2>ingres_fetch_object</KEYWORD2>
+ <KEYWORD2>ingres_fetch_row</KEYWORD2>
+ <KEYWORD2>ingres_field_length</KEYWORD2>
+ <KEYWORD2>ingres_field_name</KEYWORD2>
+ <KEYWORD2>ingres_field_nullable</KEYWORD2>
+ <KEYWORD2>ingres_field_precision</KEYWORD2>
+ <KEYWORD2>ingres_field_scale</KEYWORD2>
+ <KEYWORD2>ingres_field_type</KEYWORD2>
+ <KEYWORD2>ingres_num_fields</KEYWORD2>
+ <KEYWORD2>ingres_num_rows</KEYWORD2>
+ <KEYWORD2>ingres_pconnect</KEYWORD2>
+ <KEYWORD2>ingres_query</KEYWORD2>
+ <KEYWORD2>ingres_rollback</KEYWORD2>
+ <KEYWORD2>ini_alter</KEYWORD2>
+ <KEYWORD2>ini_get</KEYWORD2>
+ <KEYWORD2>ini_get_all</KEYWORD2>
+ <KEYWORD2>ini_restore</KEYWORD2>
+ <KEYWORD2>ini_set</KEYWORD2>
+ <KEYWORD2>insert</KEYWORD2> <!-- hw_api, hw_api_object -->
+ <KEYWORD2>insert_before</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>insertanchor</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>insertbefore</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>insertcollection</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>insertdata</KEYWORD2> <!-- domcharacterdata -->
+ <KEYWORD2>insertdocument</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>interface_exists</KEYWORD2>
+ <KEYWORD2>internal_subset</KEYWORD2> <!-- domdocumenttype -->
+ <KEYWORD2>intval</KEYWORD2>
+ <KEYWORD2>ip2long</KEYWORD2>
+ <KEYWORD2>iptcembed</KEYWORD2>
+ <KEYWORD2>iptcparse</KEYWORD2>
+ <KEYWORD2>ircg_channel_mode</KEYWORD2>
+ <KEYWORD2>ircg_disconnect</KEYWORD2>
+ <KEYWORD2>ircg_eval_ecmascript_params</KEYWORD2>
+ <KEYWORD2>ircg_fetch_error_msg</KEYWORD2>
+ <KEYWORD2>ircg_get_username</KEYWORD2>
+ <KEYWORD2>ircg_html_encode</KEYWORD2>
+ <KEYWORD2>ircg_ignore_add</KEYWORD2>
+ <KEYWORD2>ircg_ignore_del</KEYWORD2>
+ <KEYWORD2>ircg_invite</KEYWORD2>
+ <KEYWORD2>ircg_is_conn_alive</KEYWORD2>
+ <KEYWORD2>ircg_join</KEYWORD2>
+ <KEYWORD2>ircg_kick</KEYWORD2>
+ <KEYWORD2>ircg_list</KEYWORD2>
+ <KEYWORD2>ircg_lookup_format_messages</KEYWORD2>
+ <KEYWORD2>ircg_lusers</KEYWORD2>
+ <KEYWORD2>ircg_msg</KEYWORD2>
+ <KEYWORD2>ircg_names</KEYWORD2>
+ <KEYWORD2>ircg_nick</KEYWORD2>
+ <KEYWORD2>ircg_nickname_escape</KEYWORD2>
+ <KEYWORD2>ircg_nickname_unescape</KEYWORD2>
+ <KEYWORD2>ircg_notice</KEYWORD2>
+ <KEYWORD2>ircg_oper</KEYWORD2>
+ <KEYWORD2>ircg_part</KEYWORD2>
+ <KEYWORD2>ircg_pconnect</KEYWORD2>
+ <KEYWORD2>ircg_register_format_messages</KEYWORD2>
+ <KEYWORD2>ircg_set_current</KEYWORD2>
+ <KEYWORD2>ircg_set_file</KEYWORD2>
+ <KEYWORD2>ircg_set_on_die</KEYWORD2>
+ <KEYWORD2>ircg_topic</KEYWORD2>
+ <KEYWORD2>ircg_who</KEYWORD2>
+ <KEYWORD2>ircg_whois</KEYWORD2>
+ <KEYWORD2>is_a</KEYWORD2>
+ <KEYWORD2>is_array</KEYWORD2>
+ <KEYWORD2>is_blank_node</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>is_bool</KEYWORD2>
+ <KEYWORD2>is_callable</KEYWORD2>
+ <KEYWORD2>is_dir</KEYWORD2>
+ <KEYWORD2>is_double</KEYWORD2>
+ <KEYWORD2>is_executable</KEYWORD2>
+ <KEYWORD2>is_file</KEYWORD2>
+ <KEYWORD2>is_finite</KEYWORD2>
+ <KEYWORD2>is_float</KEYWORD2>
+ <KEYWORD2>is_infinite</KEYWORD2>
+ <KEYWORD2>is_int</KEYWORD2>
+ <KEYWORD2>is_integer</KEYWORD2>
+ <KEYWORD2>is_link</KEYWORD2>
+ <KEYWORD2>is_long</KEYWORD2>
+ <KEYWORD2>is_nan</KEYWORD2>
+ <KEYWORD2>is_null</KEYWORD2>
+ <KEYWORD2>is_numeric</KEYWORD2>
+ <KEYWORD2>is_object</KEYWORD2>
+ <KEYWORD2>is_readable</KEYWORD2>
+ <KEYWORD2>is_real</KEYWORD2>
+ <KEYWORD2>is_resource</KEYWORD2>
+ <KEYWORD2>is_scalar</KEYWORD2>
+ <KEYWORD2>is_soap_fault</KEYWORD2>
+ <KEYWORD2>is_string</KEYWORD2>
+ <KEYWORD2>is_subclass_of</KEYWORD2>
+ <KEYWORD2>is_uploaded_file</KEYWORD2>
+ <KEYWORD2>is_writable</KEYWORD2>
+ <KEYWORD2>is_writeable</KEYWORD2>
+ <KEYWORD2>isasp</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>iscomment</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>isdir</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>isdot</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>isexecutable</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>isfile</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>ishtml</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>isid</KEYWORD2> <!-- domattr -->
+ <KEYWORD2>isjste</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>islink</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>isphp</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>isreadable</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>issamenode</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>issupported</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>istext</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>iswhitespaceinelementcontent</KEYWORD2> <!-- domtext -->
+ <KEYWORD2>iswritable</KEYWORD2> <!-- directoryiterator -->
+ <KEYWORD2>isxhtml</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>isxml</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>item</KEYWORD2> <!-- domnamednodemap, domnodelist -->
+ <KEYWORD2>iterator_count</KEYWORD2>
+ <KEYWORD2>iterator_to_array</KEYWORD2>
+ <KEYWORD2>java_last_exception_clear</KEYWORD2>
+ <KEYWORD2>java_last_exception_get</KEYWORD2>
+ <KEYWORD2>jddayofweek</KEYWORD2>
+ <KEYWORD2>jdmonthname</KEYWORD2>
+ <KEYWORD2>jdtofrench</KEYWORD2>
+ <KEYWORD2>jdtogregorian</KEYWORD2>
+ <KEYWORD2>jdtojewish</KEYWORD2>
+ <KEYWORD2>jdtojulian</KEYWORD2>
+ <KEYWORD2>jdtounix</KEYWORD2>
+ <KEYWORD2>jewishtojd</KEYWORD2>
+ <KEYWORD2>join</KEYWORD2>
+ <KEYWORD2>jpeg2wbmp</KEYWORD2>
+ <KEYWORD2>json_decode</KEYWORD2>
+ <KEYWORD2>json_encode</KEYWORD2>
+ <KEYWORD2>juliantojd</KEYWORD2>
+ <KEYWORD2>key</KEYWORD2> <!-- arrayiterator, directoryiterator, filteriterator, hw_api_attribute, recursivedirectoryiterator, recursiveiteratoriterator, simplexmliterator -->
+ <KEYWORD2>krsort</KEYWORD2>
+ <KEYWORD2>ksort</KEYWORD2>
+ <KEYWORD2>langdepvalue</KEYWORD2> <!-- hw_api_attribute -->
+ <KEYWORD2>last_child</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>lastinsertid</KEYWORD2> <!-- pdo -->
+ <KEYWORD2>lcg_value</KEYWORD2>
+ <KEYWORD2>ldap_8859_to_t61</KEYWORD2>
+ <KEYWORD2>ldap_add</KEYWORD2>
+ <KEYWORD2>ldap_bind</KEYWORD2>
+ <KEYWORD2>ldap_close</KEYWORD2>
+ <KEYWORD2>ldap_compare</KEYWORD2>
+ <KEYWORD2>ldap_connect</KEYWORD2>
+ <KEYWORD2>ldap_count_entries</KEYWORD2>
+ <KEYWORD2>ldap_delete</KEYWORD2>
+ <KEYWORD2>ldap_dn2ufn</KEYWORD2>
+ <KEYWORD2>ldap_err2str</KEYWORD2>
+ <KEYWORD2>ldap_errno</KEYWORD2>
+ <KEYWORD2>ldap_error</KEYWORD2>
+ <KEYWORD2>ldap_explode_dn</KEYWORD2>
+ <KEYWORD2>ldap_first_attribute</KEYWORD2>
+ <KEYWORD2>ldap_first_entry</KEYWORD2>
+ <KEYWORD2>ldap_first_reference</KEYWORD2>
+ <KEYWORD2>ldap_free_result</KEYWORD2>
+ <KEYWORD2>ldap_get_attributes</KEYWORD2>
+ <KEYWORD2>ldap_get_dn</KEYWORD2>
+ <KEYWORD2>ldap_get_entries</KEYWORD2>
+ <KEYWORD2>ldap_get_option</KEYWORD2>
+ <KEYWORD2>ldap_get_values</KEYWORD2>
+ <KEYWORD2>ldap_get_values_len</KEYWORD2>
+ <KEYWORD2>ldap_list</KEYWORD2>
+ <KEYWORD2>ldap_mod_add</KEYWORD2>
+ <KEYWORD2>ldap_mod_del</KEYWORD2>
+ <KEYWORD2>ldap_mod_replace</KEYWORD2>
+ <KEYWORD2>ldap_modify</KEYWORD2>
+ <KEYWORD2>ldap_next_attribute</KEYWORD2>
+ <KEYWORD2>ldap_next_entry</KEYWORD2>
+ <KEYWORD2>ldap_next_reference</KEYWORD2>
+ <KEYWORD2>ldap_parse_reference</KEYWORD2>
+ <KEYWORD2>ldap_parse_result</KEYWORD2>
+ <KEYWORD2>ldap_read</KEYWORD2>
+ <KEYWORD2>ldap_rename</KEYWORD2>
+ <KEYWORD2>ldap_sasl_bind</KEYWORD2>
+ <KEYWORD2>ldap_search</KEYWORD2>
+ <KEYWORD2>ldap_set_option</KEYWORD2>
+ <KEYWORD2>ldap_set_rebind_proc</KEYWORD2>
+ <KEYWORD2>ldap_sort</KEYWORD2>
+ <KEYWORD2>ldap_start_tls</KEYWORD2>
+ <KEYWORD2>ldap_t61_to_8859</KEYWORD2>
+ <KEYWORD2>ldap_unbind</KEYWORD2>
+ <KEYWORD2>levenshtein</KEYWORD2>
+ <KEYWORD2>link</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>linkinfo</KEYWORD2>
+ <KEYWORD2>load</KEYWORD2> <!-- domdocument, lob -->
+ <KEYWORD2>loadhtml</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>loadhtmlfile</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>loadxml</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>localeconv</KEYWORD2>
+ <KEYWORD2>localtime</KEYWORD2>
+ <KEYWORD2>lock</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>log</KEYWORD2>
+ <KEYWORD2>log10</KEYWORD2>
+ <KEYWORD2>log1p</KEYWORD2>
+ <KEYWORD2>long2ip</KEYWORD2>
+ <KEYWORD2>lookupnamespaceuri</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>lookupprefix</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>lstat</KEYWORD2>
+ <KEYWORD2>ltrim</KEYWORD2>
+ <KEYWORD2>lzf_compress</KEYWORD2>
+ <KEYWORD2>lzf_decompress</KEYWORD2>
+ <KEYWORD2>lzf_optimized_for</KEYWORD2>
+ <KEYWORD2>mail</KEYWORD2>
+ <KEYWORD2>mailparse_determine_best_xfer_encoding</KEYWORD2>
+ <KEYWORD2>mailparse_msg_create</KEYWORD2>
+ <KEYWORD2>mailparse_msg_extract_part</KEYWORD2>
+ <KEYWORD2>mailparse_msg_extract_part_file</KEYWORD2>
+ <KEYWORD2>mailparse_msg_free</KEYWORD2>
+ <KEYWORD2>mailparse_msg_get_part</KEYWORD2>
+ <KEYWORD2>mailparse_msg_get_part_data</KEYWORD2>
+ <KEYWORD2>mailparse_msg_get_structure</KEYWORD2>
+ <KEYWORD2>mailparse_msg_parse</KEYWORD2>
+ <KEYWORD2>mailparse_msg_parse_file</KEYWORD2>
+ <KEYWORD2>mailparse_rfc822_parse_addresses</KEYWORD2>
+ <KEYWORD2>mailparse_stream_encode</KEYWORD2>
+ <KEYWORD2>mailparse_uudecode_all</KEYWORD2>
+ <KEYWORD2>main</KEYWORD2>
+ <KEYWORD2>max</KEYWORD2> <!-- collection -->
+ <KEYWORD2>mb_convert_case</KEYWORD2>
+ <KEYWORD2>mb_convert_encoding</KEYWORD2>
+ <KEYWORD2>mb_convert_kana</KEYWORD2>
+ <KEYWORD2>mb_convert_variables</KEYWORD2>
+ <KEYWORD2>mb_decode_mimeheader</KEYWORD2>
+ <KEYWORD2>mb_decode_numericentity</KEYWORD2>
+ <KEYWORD2>mb_detect_encoding</KEYWORD2>
+ <KEYWORD2>mb_detect_order</KEYWORD2>
+ <KEYWORD2>mb_encode_mimeheader</KEYWORD2>
+ <KEYWORD2>mb_encode_numericentity</KEYWORD2>
+ <KEYWORD2>mb_ereg</KEYWORD2>
+ <KEYWORD2>mb_ereg_match</KEYWORD2>
+ <KEYWORD2>mb_ereg_replace</KEYWORD2>
+ <KEYWORD2>mb_ereg_search</KEYWORD2>
+ <KEYWORD2>mb_ereg_search_getpos</KEYWORD2>
+ <KEYWORD2>mb_ereg_search_getregs</KEYWORD2>
+ <KEYWORD2>mb_ereg_search_init</KEYWORD2>
+ <KEYWORD2>mb_ereg_search_pos</KEYWORD2>
+ <KEYWORD2>mb_ereg_search_regs</KEYWORD2>
+ <KEYWORD2>mb_ereg_search_setpos</KEYWORD2>
+ <KEYWORD2>mb_eregi</KEYWORD2>
+ <KEYWORD2>mb_eregi_replace</KEYWORD2>
+ <KEYWORD2>mb_get_info</KEYWORD2>
+ <KEYWORD2>mb_http_input</KEYWORD2>
+ <KEYWORD2>mb_http_output</KEYWORD2>
+ <KEYWORD2>mb_internal_encoding</KEYWORD2>
+ <KEYWORD2>mb_language</KEYWORD2>
+ <KEYWORD2>mb_list_encodings</KEYWORD2>
+ <KEYWORD2>mb_output_handler</KEYWORD2>
+ <KEYWORD2>mb_parse_str</KEYWORD2>
+ <KEYWORD2>mb_preferred_mime_name</KEYWORD2>
+ <KEYWORD2>mb_regex_encoding</KEYWORD2>
+ <KEYWORD2>mb_regex_set_options</KEYWORD2>
+ <KEYWORD2>mb_send_mail</KEYWORD2>
+ <KEYWORD2>mb_split</KEYWORD2>
+ <KEYWORD2>mb_strcut</KEYWORD2>
+ <KEYWORD2>mb_strimwidth</KEYWORD2>
+ <KEYWORD2>mb_strlen</KEYWORD2>
+ <KEYWORD2>mb_strpos</KEYWORD2>
+ <KEYWORD2>mb_strrpos</KEYWORD2>
+ <KEYWORD2>mb_strtolower</KEYWORD2>
+ <KEYWORD2>mb_strtoupper</KEYWORD2>
+ <KEYWORD2>mb_strwidth</KEYWORD2>
+ <KEYWORD2>mb_substitute_character</KEYWORD2>
+ <KEYWORD2>mb_substr</KEYWORD2>
+ <KEYWORD2>mb_substr_count</KEYWORD2>
+ <KEYWORD2>mcal_append_event</KEYWORD2>
+ <KEYWORD2>mcal_close</KEYWORD2>
+ <KEYWORD2>mcal_create_calendar</KEYWORD2>
+ <KEYWORD2>mcal_date_compare</KEYWORD2>
+ <KEYWORD2>mcal_date_valid</KEYWORD2>
+ <KEYWORD2>mcal_day_of_week</KEYWORD2>
+ <KEYWORD2>mcal_day_of_year</KEYWORD2>
+ <KEYWORD2>mcal_days_in_month</KEYWORD2>
+ <KEYWORD2>mcal_delete_calendar</KEYWORD2>
+ <KEYWORD2>mcal_delete_event</KEYWORD2>
+ <KEYWORD2>mcal_event_add_attribute</KEYWORD2>
+ <KEYWORD2>mcal_event_init</KEYWORD2>
+ <KEYWORD2>mcal_event_set_alarm</KEYWORD2>
+ <KEYWORD2>mcal_event_set_category</KEYWORD2>
+ <KEYWORD2>mcal_event_set_class</KEYWORD2>
+ <KEYWORD2>mcal_event_set_description</KEYWORD2>
+ <KEYWORD2>mcal_event_set_end</KEYWORD2>
+ <KEYWORD2>mcal_event_set_recur_daily</KEYWORD2>
+ <KEYWORD2>mcal_event_set_recur_monthly_mday</KEYWORD2>
+ <KEYWORD2>mcal_event_set_recur_monthly_wday</KEYWORD2>
+ <KEYWORD2>mcal_event_set_recur_none</KEYWORD2>
+ <KEYWORD2>mcal_event_set_recur_weekly</KEYWORD2>
+ <KEYWORD2>mcal_event_set_recur_yearly</KEYWORD2>
+ <KEYWORD2>mcal_event_set_start</KEYWORD2>
+ <KEYWORD2>mcal_event_set_title</KEYWORD2>
+ <KEYWORD2>mcal_expunge</KEYWORD2>
+ <KEYWORD2>mcal_fetch_current_stream_event</KEYWORD2>
+ <KEYWORD2>mcal_fetch_event</KEYWORD2>
+ <KEYWORD2>mcal_is_leap_year</KEYWORD2>
+ <KEYWORD2>mcal_list_alarms</KEYWORD2>
+ <KEYWORD2>mcal_list_events</KEYWORD2>
+ <KEYWORD2>mcal_next_recurrence</KEYWORD2>
+ <KEYWORD2>mcal_open</KEYWORD2>
+ <KEYWORD2>mcal_popen</KEYWORD2>
+ <KEYWORD2>mcal_rename_calendar</KEYWORD2>
+ <KEYWORD2>mcal_reopen</KEYWORD2>
+ <KEYWORD2>mcal_snooze</KEYWORD2>
+ <KEYWORD2>mcal_store_event</KEYWORD2>
+ <KEYWORD2>mcal_time_valid</KEYWORD2>
+ <KEYWORD2>mcal_week_of_year</KEYWORD2>
+ <KEYWORD2>mcrypt_cbc</KEYWORD2>
+ <KEYWORD2>mcrypt_cfb</KEYWORD2>
+ <KEYWORD2>mcrypt_create_iv</KEYWORD2>
+ <KEYWORD2>mcrypt_decrypt</KEYWORD2>
+ <KEYWORD2>mcrypt_ecb</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_get_algorithms_name</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_get_block_size</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_get_iv_size</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_get_key_size</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_get_modes_name</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_get_supported_key_sizes</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_is_block_algorithm</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_is_block_algorithm_mode</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_is_block_mode</KEYWORD2>
+ <KEYWORD2>mcrypt_enc_self_test</KEYWORD2>
+ <KEYWORD2>mcrypt_encrypt</KEYWORD2>
+ <KEYWORD2>mcrypt_generic</KEYWORD2>
+ <KEYWORD2>mcrypt_generic_deinit</KEYWORD2>
+ <KEYWORD2>mcrypt_generic_end</KEYWORD2>
+ <KEYWORD2>mcrypt_generic_init</KEYWORD2>
+ <KEYWORD2>mcrypt_get_block_size</KEYWORD2>
+ <KEYWORD2>mcrypt_get_cipher_name</KEYWORD2>
+ <KEYWORD2>mcrypt_get_iv_size</KEYWORD2>
+ <KEYWORD2>mcrypt_get_key_size</KEYWORD2>
+ <KEYWORD2>mcrypt_list_algorithms</KEYWORD2>
+ <KEYWORD2>mcrypt_list_modes</KEYWORD2>
+ <KEYWORD2>mcrypt_module_close</KEYWORD2>
+ <KEYWORD2>mcrypt_module_get_algo_block_size</KEYWORD2>
+ <KEYWORD2>mcrypt_module_get_algo_key_size</KEYWORD2>
+ <KEYWORD2>mcrypt_module_get_supported_key_sizes</KEYWORD2>
+ <KEYWORD2>mcrypt_module_is_block_algorithm</KEYWORD2>
+ <KEYWORD2>mcrypt_module_is_block_algorithm_mode</KEYWORD2>
+ <KEYWORD2>mcrypt_module_is_block_mode</KEYWORD2>
+ <KEYWORD2>mcrypt_module_open</KEYWORD2>
+ <KEYWORD2>mcrypt_module_self_test</KEYWORD2>
+ <KEYWORD2>mcrypt_ofb</KEYWORD2>
+ <KEYWORD2>mcve_adduser</KEYWORD2>
+ <KEYWORD2>mcve_adduserarg</KEYWORD2>
+ <KEYWORD2>mcve_bt</KEYWORD2>
+ <KEYWORD2>mcve_checkstatus</KEYWORD2>
+ <KEYWORD2>mcve_chkpwd</KEYWORD2>
+ <KEYWORD2>mcve_chngpwd</KEYWORD2>
+ <KEYWORD2>mcve_completeauthorizations</KEYWORD2>
+ <KEYWORD2>mcve_connect</KEYWORD2>
+ <KEYWORD2>mcve_connectionerror</KEYWORD2>
+ <KEYWORD2>mcve_deleteresponse</KEYWORD2>
+ <KEYWORD2>mcve_deletetrans</KEYWORD2>
+ <KEYWORD2>mcve_deleteusersetup</KEYWORD2>
+ <KEYWORD2>mcve_deluser</KEYWORD2>
+ <KEYWORD2>mcve_destroyconn</KEYWORD2>
+ <KEYWORD2>mcve_destroyengine</KEYWORD2>
+ <KEYWORD2>mcve_disableuser</KEYWORD2>
+ <KEYWORD2>mcve_edituser</KEYWORD2>
+ <KEYWORD2>mcve_enableuser</KEYWORD2>
+ <KEYWORD2>mcve_force</KEYWORD2>
+ <KEYWORD2>mcve_getcell</KEYWORD2>
+ <KEYWORD2>mcve_getcellbynum</KEYWORD2>
+ <KEYWORD2>mcve_getcommadelimited</KEYWORD2>
+ <KEYWORD2>mcve_getheader</KEYWORD2>
+ <KEYWORD2>mcve_getuserarg</KEYWORD2>
+ <KEYWORD2>mcve_getuserparam</KEYWORD2>
+ <KEYWORD2>mcve_gft</KEYWORD2>
+ <KEYWORD2>mcve_gl</KEYWORD2>
+ <KEYWORD2>mcve_gut</KEYWORD2>
+ <KEYWORD2>mcve_initconn</KEYWORD2>
+ <KEYWORD2>mcve_initengine</KEYWORD2>
+ <KEYWORD2>mcve_initusersetup</KEYWORD2>
+ <KEYWORD2>mcve_iscommadelimited</KEYWORD2>
+ <KEYWORD2>mcve_liststats</KEYWORD2>
+ <KEYWORD2>mcve_listusers</KEYWORD2>
+ <KEYWORD2>mcve_maxconntimeout</KEYWORD2>
+ <KEYWORD2>mcve_monitor</KEYWORD2>
+ <KEYWORD2>mcve_numcolumns</KEYWORD2>
+ <KEYWORD2>mcve_numrows</KEYWORD2>
+ <KEYWORD2>mcve_override</KEYWORD2>
+ <KEYWORD2>mcve_parsecommadelimited</KEYWORD2>
+ <KEYWORD2>mcve_ping</KEYWORD2>
+ <KEYWORD2>mcve_preauth</KEYWORD2>
+ <KEYWORD2>mcve_preauthcompletion</KEYWORD2>
+ <KEYWORD2>mcve_qc</KEYWORD2>
+ <KEYWORD2>mcve_responseparam</KEYWORD2>
+ <KEYWORD2>mcve_return</KEYWORD2>
+ <KEYWORD2>mcve_returncode</KEYWORD2>
+ <KEYWORD2>mcve_returnstatus</KEYWORD2>
+ <KEYWORD2>mcve_sale</KEYWORD2>
+ <KEYWORD2>mcve_setblocking</KEYWORD2>
+ <KEYWORD2>mcve_setdropfile</KEYWORD2>
+ <KEYWORD2>mcve_setip</KEYWORD2>
+ <KEYWORD2>mcve_setssl</KEYWORD2>
+ <KEYWORD2>mcve_setssl_files</KEYWORD2>
+ <KEYWORD2>mcve_settimeout</KEYWORD2>
+ <KEYWORD2>mcve_settle</KEYWORD2>
+ <KEYWORD2>mcve_text_avs</KEYWORD2>
+ <KEYWORD2>mcve_text_code</KEYWORD2>
+ <KEYWORD2>mcve_text_cv</KEYWORD2>
+ <KEYWORD2>mcve_transactionauth</KEYWORD2>
+ <KEYWORD2>mcve_transactionavs</KEYWORD2>
+ <KEYWORD2>mcve_transactionbatch</KEYWORD2>
+ <KEYWORD2>mcve_transactioncv</KEYWORD2>
+ <KEYWORD2>mcve_transactionid</KEYWORD2>
+ <KEYWORD2>mcve_transactionitem</KEYWORD2>
+ <KEYWORD2>mcve_transactionssent</KEYWORD2>
+ <KEYWORD2>mcve_transactiontext</KEYWORD2>
+ <KEYWORD2>mcve_transinqueue</KEYWORD2>
+ <KEYWORD2>mcve_transnew</KEYWORD2>
+ <KEYWORD2>mcve_transparam</KEYWORD2>
+ <KEYWORD2>mcve_transsend</KEYWORD2>
+ <KEYWORD2>mcve_ub</KEYWORD2>
+ <KEYWORD2>mcve_uwait</KEYWORD2>
+ <KEYWORD2>mcve_verifyconnection</KEYWORD2>
+ <KEYWORD2>mcve_verifysslcert</KEYWORD2>
+ <KEYWORD2>mcve_void</KEYWORD2>
+ <KEYWORD2>md5</KEYWORD2>
+ <KEYWORD2>md5_file</KEYWORD2>
+ <KEYWORD2>mdecrypt_generic</KEYWORD2>
+ <KEYWORD2>memcache_debug</KEYWORD2>
+ <KEYWORD2>memory_get_usage</KEYWORD2>
+ <KEYWORD2>memory_get_peak_usage</KEYWORD2>
+ <KEYWORD2>metaphone</KEYWORD2>
+ <KEYWORD2>method_exists</KEYWORD2>
+ <KEYWORD2>mhash</KEYWORD2>
+ <KEYWORD2>mhash_count</KEYWORD2>
+ <KEYWORD2>mhash_get_block_size</KEYWORD2>
+ <KEYWORD2>mhash_get_hash_name</KEYWORD2>
+ <KEYWORD2>mhash_keygen_s2k</KEYWORD2>
+ <KEYWORD2>microtime</KEYWORD2>
+ <KEYWORD2>mime_content_type</KEYWORD2>
+ <KEYWORD2>mimetype</KEYWORD2> <!-- hw_api_content -->
+ <KEYWORD2>min</KEYWORD2>
+ <KEYWORD2>ming_setcubicthreshold</KEYWORD2>
+ <KEYWORD2>ming_setscale</KEYWORD2>
+ <KEYWORD2>ming_useswfversion</KEYWORD2>
+ <KEYWORD2>mkdir</KEYWORD2>
+ <KEYWORD2>mktime</KEYWORD2>
+ <KEYWORD2>money_format</KEYWORD2>
+ <KEYWORD2>move</KEYWORD2> <!-- hw_api, swfdisplayitem -->
+ <KEYWORD2>move_uploaded_file</KEYWORD2>
+ <KEYWORD2>movepen</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>movepento</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>moveto</KEYWORD2> <!-- swfdisplayitem, swffill, swftext -->
+ <KEYWORD2>msession_connect</KEYWORD2>
+ <KEYWORD2>msession_count</KEYWORD2>
+ <KEYWORD2>msession_create</KEYWORD2>
+ <KEYWORD2>msession_destroy</KEYWORD2>
+ <KEYWORD2>msession_disconnect</KEYWORD2>
+ <KEYWORD2>msession_find</KEYWORD2>
+ <KEYWORD2>msession_get</KEYWORD2>
+ <KEYWORD2>msession_get_array</KEYWORD2>
+ <KEYWORD2>msession_get_data</KEYWORD2>
+ <KEYWORD2>msession_inc</KEYWORD2>
+ <KEYWORD2>msession_list</KEYWORD2>
+ <KEYWORD2>msession_listvar</KEYWORD2>
+ <KEYWORD2>msession_lock</KEYWORD2>
+ <KEYWORD2>msession_plugin</KEYWORD2>
+ <KEYWORD2>msession_randstr</KEYWORD2>
+ <KEYWORD2>msession_set</KEYWORD2>
+ <KEYWORD2>msession_set_array</KEYWORD2>
+ <KEYWORD2>msession_set_data</KEYWORD2>
+ <KEYWORD2>msession_timeout</KEYWORD2>
+ <KEYWORD2>msession_uniq</KEYWORD2>
+ <KEYWORD2>msession_unlock</KEYWORD2>
+ <KEYWORD2>msg_get_queue</KEYWORD2>
+ <KEYWORD2>msg_receive</KEYWORD2>
+ <KEYWORD2>msg_remove_queue</KEYWORD2>
+ <KEYWORD2>msg_send</KEYWORD2>
+ <KEYWORD2>msg_set_queue</KEYWORD2>
+ <KEYWORD2>msg_stat_queue</KEYWORD2>
+ <KEYWORD2>msql</KEYWORD2>
+ <KEYWORD2>msql_affected_rows</KEYWORD2>
+ <KEYWORD2>msql_close</KEYWORD2>
+ <KEYWORD2>msql_connect</KEYWORD2>
+ <KEYWORD2>msql_create_db</KEYWORD2>
+ <KEYWORD2>msql_createdb</KEYWORD2>
+ <KEYWORD2>msql_data_seek</KEYWORD2>
+ <KEYWORD2>msql_db_query</KEYWORD2>
+ <KEYWORD2>msql_dbname</KEYWORD2>
+ <KEYWORD2>msql_drop_db</KEYWORD2>
+ <KEYWORD2>msql_error</KEYWORD2>
+ <KEYWORD2>msql_fetch_array</KEYWORD2>
+ <KEYWORD2>msql_fetch_field</KEYWORD2>
+ <KEYWORD2>msql_fetch_object</KEYWORD2>
+ <KEYWORD2>msql_fetch_row</KEYWORD2>
+ <KEYWORD2>msql_field_flags</KEYWORD2>
+ <KEYWORD2>msql_field_len</KEYWORD2>
+ <KEYWORD2>msql_field_name</KEYWORD2>
+ <KEYWORD2>msql_field_seek</KEYWORD2>
+ <KEYWORD2>msql_field_table</KEYWORD2>
+ <KEYWORD2>msql_field_type</KEYWORD2>
+ <KEYWORD2>msql_fieldflags</KEYWORD2>
+ <KEYWORD2>msql_fieldlen</KEYWORD2>
+ <KEYWORD2>msql_fieldname</KEYWORD2>
+ <KEYWORD2>msql_fieldtable</KEYWORD2>
+ <KEYWORD2>msql_fieldtype</KEYWORD2>
+ <KEYWORD2>msql_free_result</KEYWORD2>
+ <KEYWORD2>msql_list_dbs</KEYWORD2>
+ <KEYWORD2>msql_list_fields</KEYWORD2>
+ <KEYWORD2>msql_list_tables</KEYWORD2>
+ <KEYWORD2>msql_num_fields</KEYWORD2>
+ <KEYWORD2>msql_num_rows</KEYWORD2>
+ <KEYWORD2>msql_numfields</KEYWORD2>
+ <KEYWORD2>msql_numrows</KEYWORD2>
+ <KEYWORD2>msql_pconnect</KEYWORD2>
+ <KEYWORD2>msql_query</KEYWORD2>
+ <KEYWORD2>msql_regcase</KEYWORD2>
+ <KEYWORD2>msql_result</KEYWORD2>
+ <KEYWORD2>msql_select_db</KEYWORD2>
+ <KEYWORD2>msql_tablename</KEYWORD2>
+ <KEYWORD2>mssql_bind</KEYWORD2>
+ <KEYWORD2>mssql_close</KEYWORD2>
+ <KEYWORD2>mssql_connect</KEYWORD2>
+ <KEYWORD2>mssql_data_seek</KEYWORD2>
+ <KEYWORD2>mssql_execute</KEYWORD2>
+ <KEYWORD2>mssql_fetch_array</KEYWORD2>
+ <KEYWORD2>mssql_fetch_assoc</KEYWORD2>
+ <KEYWORD2>mssql_fetch_batch</KEYWORD2>
+ <KEYWORD2>mssql_fetch_field</KEYWORD2>
+ <KEYWORD2>mssql_fetch_object</KEYWORD2>
+ <KEYWORD2>mssql_fetch_row</KEYWORD2>
+ <KEYWORD2>mssql_field_length</KEYWORD2>
+ <KEYWORD2>mssql_field_name</KEYWORD2>
+ <KEYWORD2>mssql_field_seek</KEYWORD2>
+ <KEYWORD2>mssql_field_type</KEYWORD2>
+ <KEYWORD2>mssql_free_result</KEYWORD2>
+ <KEYWORD2>mssql_free_statement</KEYWORD2>
+ <KEYWORD2>mssql_get_last_message</KEYWORD2>
+ <KEYWORD2>mssql_guid_string</KEYWORD2>
+ <KEYWORD2>mssql_init</KEYWORD2>
+ <KEYWORD2>mssql_min_error_severity</KEYWORD2>
+ <KEYWORD2>mssql_min_message_severity</KEYWORD2>
+ <KEYWORD2>mssql_next_result</KEYWORD2>
+ <KEYWORD2>mssql_num_fields</KEYWORD2>
+ <KEYWORD2>mssql_num_rows</KEYWORD2>
+ <KEYWORD2>mssql_pconnect</KEYWORD2>
+ <KEYWORD2>mssql_query</KEYWORD2>
+ <KEYWORD2>mssql_result</KEYWORD2>
+ <KEYWORD2>mssql_rows_affected</KEYWORD2>
+ <KEYWORD2>mssql_select_db</KEYWORD2>
+ <KEYWORD2>mt_getrandmax</KEYWORD2>
+ <KEYWORD2>mt_rand</KEYWORD2>
+ <KEYWORD2>mt_srand</KEYWORD2>
+ <KEYWORD2>multcolor</KEYWORD2> <!-- swfdisplayitem -->
+ <KEYWORD2>muscat_close</KEYWORD2>
+ <KEYWORD2>muscat_get</KEYWORD2>
+ <KEYWORD2>muscat_give</KEYWORD2>
+ <KEYWORD2>muscat_setup</KEYWORD2>
+ <KEYWORD2>muscat_setup_net</KEYWORD2>
+ <KEYWORD2>mysql_affected_rows</KEYWORD2>
+ <KEYWORD2>mysql_change_user</KEYWORD2>
+ <KEYWORD2>mysql_client_encoding</KEYWORD2>
+ <KEYWORD2>mysql_close</KEYWORD2>
+ <KEYWORD2>mysql_connect</KEYWORD2>
+ <KEYWORD2>mysql_create_db</KEYWORD2>
+ <KEYWORD2>mysql_data_seek</KEYWORD2>
+ <KEYWORD2>mysql_db_name</KEYWORD2>
+ <KEYWORD2>mysql_db_query</KEYWORD2>
+ <KEYWORD2>mysql_drop_db</KEYWORD2>
+ <KEYWORD2>mysql_errno</KEYWORD2>
+ <KEYWORD2>mysql_error</KEYWORD2>
+ <KEYWORD2>mysql_escape_string</KEYWORD2>
+ <KEYWORD2>mysql_fetch_array</KEYWORD2>
+ <KEYWORD2>mysql_fetch_assoc</KEYWORD2>
+ <KEYWORD2>mysql_fetch_field</KEYWORD2>
+ <KEYWORD2>mysql_fetch_lengths</KEYWORD2>
+ <KEYWORD2>mysql_fetch_object</KEYWORD2>
+ <KEYWORD2>mysql_fetch_row</KEYWORD2>
+ <KEYWORD2>mysql_field_flags</KEYWORD2>
+ <KEYWORD2>mysql_field_len</KEYWORD2>
+ <KEYWORD2>mysql_field_name</KEYWORD2>
+ <KEYWORD2>mysql_field_seek</KEYWORD2>
+ <KEYWORD2>mysql_field_table</KEYWORD2>
+ <KEYWORD2>mysql_field_type</KEYWORD2>
+ <KEYWORD2>mysql_free_result</KEYWORD2>
+ <KEYWORD2>mysql_get_client_info</KEYWORD2>
+ <KEYWORD2>mysql_get_host_info</KEYWORD2>
+ <KEYWORD2>mysql_get_proto_info</KEYWORD2>
+ <KEYWORD2>mysql_get_server_info</KEYWORD2>
+ <KEYWORD2>mysql_info</KEYWORD2>
+ <KEYWORD2>mysql_insert_id</KEYWORD2>
+ <KEYWORD2>mysql_list_dbs</KEYWORD2>
+ <KEYWORD2>mysql_list_fields</KEYWORD2>
+ <KEYWORD2>mysql_list_processes</KEYWORD2>
+ <KEYWORD2>mysql_list_tables</KEYWORD2>
+ <KEYWORD2>mysql_num_fields</KEYWORD2>
+ <KEYWORD2>mysql_num_rows</KEYWORD2>
+ <KEYWORD2>mysql_pconnect</KEYWORD2>
+ <KEYWORD2>mysql_ping</KEYWORD2>
+ <KEYWORD2>mysql_query</KEYWORD2>
+ <KEYWORD2>mysql_real_escape_string</KEYWORD2>
+ <KEYWORD2>mysql_result</KEYWORD2>
+ <KEYWORD2>mysql_select_db</KEYWORD2>
+ <KEYWORD2>mysql_stat</KEYWORD2>
+ <KEYWORD2>mysql_tablename</KEYWORD2>
+ <KEYWORD2>mysql_thread_id</KEYWORD2>
+ <KEYWORD2>mysql_unbuffered_query</KEYWORD2>
+ <KEYWORD2>mysqli_affected_rows</KEYWORD2>
+ <KEYWORD2>mysqli_autocommit</KEYWORD2>
+ <KEYWORD2>mysqli_bind_param</KEYWORD2>
+ <KEYWORD2>mysqli_bind_result</KEYWORD2>
+ <KEYWORD2>mysqli_change_user</KEYWORD2>
+ <KEYWORD2>mysqli_character_set_name</KEYWORD2>
+ <KEYWORD2>mysqli_client_encoding</KEYWORD2>
+ <KEYWORD2>mysqli_close</KEYWORD2>
+ <KEYWORD2>mysqli_commit</KEYWORD2>
+ <KEYWORD2>mysqli_connect</KEYWORD2>
+ <KEYWORD2>mysqli_connect_errno</KEYWORD2>
+ <KEYWORD2>mysqli_connect_error</KEYWORD2>
+ <KEYWORD2>mysqli_data_seek</KEYWORD2>
+ <KEYWORD2>mysqli_debug</KEYWORD2>
+ <KEYWORD2>mysqli_disable_reads_from_master</KEYWORD2>
+ <KEYWORD2>mysqli_disable_rpl_parse</KEYWORD2>
+ <KEYWORD2>mysqli_dump_debug_info</KEYWORD2>
+ <KEYWORD2>mysqli_embedded_connect</KEYWORD2>
+ <KEYWORD2>mysqli_enable_reads_from_master</KEYWORD2>
+ <KEYWORD2>mysqli_enable_rpl_parse</KEYWORD2>
+ <KEYWORD2>mysqli_errno</KEYWORD2>
+ <KEYWORD2>mysqli_error</KEYWORD2>
+ <KEYWORD2>mysqli_escape_string</KEYWORD2>
+ <KEYWORD2>mysqli_execute</KEYWORD2>
+ <KEYWORD2>mysqli_fetch</KEYWORD2>
+ <KEYWORD2>mysqli_fetch_array</KEYWORD2>
+ <KEYWORD2>mysqli_fetch_assoc</KEYWORD2>
+ <KEYWORD2>mysqli_fetch_field</KEYWORD2>
+ <KEYWORD2>mysqli_fetch_field_direct</KEYWORD2>
+ <KEYWORD2>mysqli_fetch_fields</KEYWORD2>
+ <KEYWORD2>mysqli_fetch_lengths</KEYWORD2>
+ <KEYWORD2>mysqli_fetch_object</KEYWORD2>
+ <KEYWORD2>mysqli_fetch_row</KEYWORD2>
+ <KEYWORD2>mysqli_field_count</KEYWORD2>
+ <KEYWORD2>mysqli_field_seek</KEYWORD2>
+ <KEYWORD2>mysqli_field_tell</KEYWORD2>
+ <KEYWORD2>mysqli_free_result</KEYWORD2>
+ <KEYWORD2>mysqli_get_client_info</KEYWORD2>
+ <KEYWORD2>mysqli_get_client_version</KEYWORD2>
+ <KEYWORD2>mysqli_get_host_info</KEYWORD2>
+ <KEYWORD2>mysqli_get_metadata</KEYWORD2>
+ <KEYWORD2>mysqli_get_proto_info</KEYWORD2>
+ <KEYWORD2>mysqli_get_server_info</KEYWORD2>
+ <KEYWORD2>mysqli_get_server_version</KEYWORD2>
+ <KEYWORD2>mysqli_info</KEYWORD2>
+ <KEYWORD2>mysqli_init</KEYWORD2>
+ <KEYWORD2>mysqli_insert_id</KEYWORD2>
+ <KEYWORD2>mysqli_kill</KEYWORD2>
+ <KEYWORD2>mysqli_master_query</KEYWORD2>
+ <KEYWORD2>mysqli_more_results</KEYWORD2>
+ <KEYWORD2>mysqli_multi_query</KEYWORD2>
+ <KEYWORD2>mysqli_next_result</KEYWORD2>
+ <KEYWORD2>mysqli_num_fields</KEYWORD2>
+ <KEYWORD2>mysqli_num_rows</KEYWORD2>
+ <KEYWORD2>mysqli_options</KEYWORD2>
+ <KEYWORD2>mysqli_param_count</KEYWORD2>
+ <KEYWORD2>mysqli_ping</KEYWORD2>
+ <KEYWORD2>mysqli_prepare</KEYWORD2>
+ <KEYWORD2>mysqli_query</KEYWORD2>
+ <KEYWORD2>mysqli_real_connect</KEYWORD2>
+ <KEYWORD2>mysqli_real_escape_string</KEYWORD2>
+ <KEYWORD2>mysqli_real_query</KEYWORD2>
+ <KEYWORD2>mysqli_report</KEYWORD2>
+ <KEYWORD2>mysqli_rollback</KEYWORD2>
+ <KEYWORD2>mysqli_rpl_parse_enabled</KEYWORD2>
+ <KEYWORD2>mysqli_rpl_probe</KEYWORD2>
+ <KEYWORD2>mysqli_rpl_query_type</KEYWORD2>
+ <KEYWORD2>mysqli_select_db</KEYWORD2>
+ <KEYWORD2>mysqli_send_long_data</KEYWORD2>
+ <KEYWORD2>mysqli_send_query</KEYWORD2>
+ <KEYWORD2>mysqli_server_end</KEYWORD2>
+ <KEYWORD2>mysqli_server_init</KEYWORD2>
+ <KEYWORD2>mysqli_set_opt</KEYWORD2>
+ <KEYWORD2>mysqli_sqlstate</KEYWORD2>
+ <KEYWORD2>mysqli_ssl_set</KEYWORD2>
+ <KEYWORD2>mysqli_stat</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_affected_rows</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_bind_param</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_bind_result</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_close</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_data_seek</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_errno</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_error</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_execute</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_fetch</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_free_result</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_init</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_num_rows</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_param_count</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_prepare</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_reset</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_result_metadata</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_send_long_data</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_sqlstate</KEYWORD2>
+ <KEYWORD2>mysqli_stmt_store_result</KEYWORD2>
+ <KEYWORD2>mysqli_store_result</KEYWORD2>
+ <KEYWORD2>mysqli_thread_id</KEYWORD2>
+ <KEYWORD2>mysqli_thread_safe</KEYWORD2>
+ <KEYWORD2>mysqli_use_result</KEYWORD2>
+ <KEYWORD2>mysqli_warning_count</KEYWORD2>
+ <KEYWORD2>name</KEYWORD2> <!-- domattribute, domdocumenttype -->
+ <KEYWORD2>natcasesort</KEYWORD2>
+ <KEYWORD2>natsort</KEYWORD2>
+ <KEYWORD2>ncurses_addch</KEYWORD2>
+ <KEYWORD2>ncurses_addchnstr</KEYWORD2>
+ <KEYWORD2>ncurses_addchstr</KEYWORD2>
+ <KEYWORD2>ncurses_addnstr</KEYWORD2>
+ <KEYWORD2>ncurses_addstr</KEYWORD2>
+ <KEYWORD2>ncurses_assume_default_colors</KEYWORD2>
+ <KEYWORD2>ncurses_attroff</KEYWORD2>
+ <KEYWORD2>ncurses_attron</KEYWORD2>
+ <KEYWORD2>ncurses_attrset</KEYWORD2>
+ <KEYWORD2>ncurses_baudrate</KEYWORD2>
+ <KEYWORD2>ncurses_beep</KEYWORD2>
+ <KEYWORD2>ncurses_bkgd</KEYWORD2>
+ <KEYWORD2>ncurses_bkgdset</KEYWORD2>
+ <KEYWORD2>ncurses_border</KEYWORD2>
+ <KEYWORD2>ncurses_bottom_panel</KEYWORD2>
+ <KEYWORD2>ncurses_can_change_color</KEYWORD2>
+ <KEYWORD2>ncurses_cbreak</KEYWORD2>
+ <KEYWORD2>ncurses_clear</KEYWORD2>
+ <KEYWORD2>ncurses_clrtobot</KEYWORD2>
+ <KEYWORD2>ncurses_clrtoeol</KEYWORD2>
+ <KEYWORD2>ncurses_color_content</KEYWORD2>
+ <KEYWORD2>ncurses_color_set</KEYWORD2>
+ <KEYWORD2>ncurses_curs_set</KEYWORD2>
+ <KEYWORD2>ncurses_def_prog_mode</KEYWORD2>
+ <KEYWORD2>ncurses_def_shell_mode</KEYWORD2>
+ <KEYWORD2>ncurses_define_key</KEYWORD2>
+ <KEYWORD2>ncurses_del_panel</KEYWORD2>
+ <KEYWORD2>ncurses_delay_output</KEYWORD2>
+ <KEYWORD2>ncurses_delch</KEYWORD2>
+ <KEYWORD2>ncurses_deleteln</KEYWORD2>
+ <KEYWORD2>ncurses_delwin</KEYWORD2>
+ <KEYWORD2>ncurses_doupdate</KEYWORD2>
+ <KEYWORD2>ncurses_echo</KEYWORD2>
+ <KEYWORD2>ncurses_echochar</KEYWORD2>
+ <KEYWORD2>ncurses_end</KEYWORD2>
+ <KEYWORD2>ncurses_erase</KEYWORD2>
+ <KEYWORD2>ncurses_erasechar</KEYWORD2>
+ <KEYWORD2>ncurses_filter</KEYWORD2>
+ <KEYWORD2>ncurses_flash</KEYWORD2>
+ <KEYWORD2>ncurses_flushinp</KEYWORD2>
+ <KEYWORD2>ncurses_getch</KEYWORD2>
+ <KEYWORD2>ncurses_getmaxyx</KEYWORD2>
+ <KEYWORD2>ncurses_getmouse</KEYWORD2>
+ <KEYWORD2>ncurses_getyx</KEYWORD2>
+ <KEYWORD2>ncurses_halfdelay</KEYWORD2>
+ <KEYWORD2>ncurses_has_colors</KEYWORD2>
+ <KEYWORD2>ncurses_has_ic</KEYWORD2>
+ <KEYWORD2>ncurses_has_il</KEYWORD2>
+ <KEYWORD2>ncurses_has_key</KEYWORD2>
+ <KEYWORD2>ncurses_hide_panel</KEYWORD2>
+ <KEYWORD2>ncurses_hline</KEYWORD2>
+ <KEYWORD2>ncurses_inch</KEYWORD2>
+ <KEYWORD2>ncurses_init</KEYWORD2>
+ <KEYWORD2>ncurses_init_color</KEYWORD2>
+ <KEYWORD2>ncurses_init_pair</KEYWORD2>
+ <KEYWORD2>ncurses_insch</KEYWORD2>
+ <KEYWORD2>ncurses_insdelln</KEYWORD2>
+ <KEYWORD2>ncurses_insertln</KEYWORD2>
+ <KEYWORD2>ncurses_insstr</KEYWORD2>
+ <KEYWORD2>ncurses_instr</KEYWORD2>
+ <KEYWORD2>ncurses_isendwin</KEYWORD2>
+ <KEYWORD2>ncurses_keyok</KEYWORD2>
+ <KEYWORD2>ncurses_keypad</KEYWORD2>
+ <KEYWORD2>ncurses_killchar</KEYWORD2>
+ <KEYWORD2>ncurses_longname</KEYWORD2>
+ <KEYWORD2>ncurses_meta</KEYWORD2>
+ <KEYWORD2>ncurses_mouse_trafo</KEYWORD2>
+ <KEYWORD2>ncurses_mouseinterval</KEYWORD2>
+ <KEYWORD2>ncurses_mousemask</KEYWORD2>
+ <KEYWORD2>ncurses_move</KEYWORD2>
+ <KEYWORD2>ncurses_move_panel</KEYWORD2>
+ <KEYWORD2>ncurses_mvaddch</KEYWORD2>
+ <KEYWORD2>ncurses_mvaddchnstr</KEYWORD2>
+ <KEYWORD2>ncurses_mvaddchstr</KEYWORD2>
+ <KEYWORD2>ncurses_mvaddnstr</KEYWORD2>
+ <KEYWORD2>ncurses_mvaddstr</KEYWORD2>
+ <KEYWORD2>ncurses_mvcur</KEYWORD2>
+ <KEYWORD2>ncurses_mvdelch</KEYWORD2>
+ <KEYWORD2>ncurses_mvgetch</KEYWORD2>
+ <KEYWORD2>ncurses_mvhline</KEYWORD2>
+ <KEYWORD2>ncurses_mvinch</KEYWORD2>
+ <KEYWORD2>ncurses_mvvline</KEYWORD2>
+ <KEYWORD2>ncurses_mvwaddstr</KEYWORD2>
+ <KEYWORD2>ncurses_napms</KEYWORD2>
+ <KEYWORD2>ncurses_new_panel</KEYWORD2>
+ <KEYWORD2>ncurses_newpad</KEYWORD2>
+ <KEYWORD2>ncurses_newwin</KEYWORD2>
+ <KEYWORD2>ncurses_nl</KEYWORD2>
+ <KEYWORD2>ncurses_nocbreak</KEYWORD2>
+ <KEYWORD2>ncurses_noecho</KEYWORD2>
+ <KEYWORD2>ncurses_nonl</KEYWORD2>
+ <KEYWORD2>ncurses_noqiflush</KEYWORD2>
+ <KEYWORD2>ncurses_noraw</KEYWORD2>
+ <KEYWORD2>ncurses_pair_content</KEYWORD2>
+ <KEYWORD2>ncurses_panel_above</KEYWORD2>
+ <KEYWORD2>ncurses_panel_below</KEYWORD2>
+ <KEYWORD2>ncurses_panel_window</KEYWORD2>
+ <KEYWORD2>ncurses_pnoutrefresh</KEYWORD2>
+ <KEYWORD2>ncurses_prefresh</KEYWORD2>
+ <KEYWORD2>ncurses_putp</KEYWORD2>
+ <KEYWORD2>ncurses_qiflush</KEYWORD2>
+ <KEYWORD2>ncurses_raw</KEYWORD2>
+ <KEYWORD2>ncurses_refresh</KEYWORD2>
+ <KEYWORD2>ncurses_replace_panel</KEYWORD2>
+ <KEYWORD2>ncurses_reset_prog_mode</KEYWORD2>
+ <KEYWORD2>ncurses_reset_shell_mode</KEYWORD2>
+ <KEYWORD2>ncurses_resetty</KEYWORD2>
+ <KEYWORD2>ncurses_savetty</KEYWORD2>
+ <KEYWORD2>ncurses_scr_dump</KEYWORD2>
+ <KEYWORD2>ncurses_scr_init</KEYWORD2>
+ <KEYWORD2>ncurses_scr_restore</KEYWORD2>
+ <KEYWORD2>ncurses_scr_set</KEYWORD2>
+ <KEYWORD2>ncurses_scrl</KEYWORD2>
+ <KEYWORD2>ncurses_show_panel</KEYWORD2>
+ <KEYWORD2>ncurses_slk_attr</KEYWORD2>
+ <KEYWORD2>ncurses_slk_attroff</KEYWORD2>
+ <KEYWORD2>ncurses_slk_attron</KEYWORD2>
+ <KEYWORD2>ncurses_slk_attrset</KEYWORD2>
+ <KEYWORD2>ncurses_slk_clear</KEYWORD2>
+ <KEYWORD2>ncurses_slk_color</KEYWORD2>
+ <KEYWORD2>ncurses_slk_init</KEYWORD2>
+ <KEYWORD2>ncurses_slk_noutrefresh</KEYWORD2>
+ <KEYWORD2>ncurses_slk_refresh</KEYWORD2>
+ <KEYWORD2>ncurses_slk_restore</KEYWORD2>
+ <KEYWORD2>ncurses_slk_set</KEYWORD2>
+ <KEYWORD2>ncurses_slk_touch</KEYWORD2>
+ <KEYWORD2>ncurses_standend</KEYWORD2>
+ <KEYWORD2>ncurses_standout</KEYWORD2>
+ <KEYWORD2>ncurses_start_color</KEYWORD2>
+ <KEYWORD2>ncurses_termattrs</KEYWORD2>
+ <KEYWORD2>ncurses_termname</KEYWORD2>
+ <KEYWORD2>ncurses_timeout</KEYWORD2>
+ <KEYWORD2>ncurses_top_panel</KEYWORD2>
+ <KEYWORD2>ncurses_typeahead</KEYWORD2>
+ <KEYWORD2>ncurses_ungetch</KEYWORD2>
+ <KEYWORD2>ncurses_ungetmouse</KEYWORD2>
+ <KEYWORD2>ncurses_update_panels</KEYWORD2>
+ <KEYWORD2>ncurses_use_default_colors</KEYWORD2>
+ <KEYWORD2>ncurses_use_env</KEYWORD2>
+ <KEYWORD2>ncurses_use_extended_names</KEYWORD2>
+ <KEYWORD2>ncurses_vidattr</KEYWORD2>
+ <KEYWORD2>ncurses_vline</KEYWORD2>
+ <KEYWORD2>ncurses_waddch</KEYWORD2>
+ <KEYWORD2>ncurses_waddstr</KEYWORD2>
+ <KEYWORD2>ncurses_wattroff</KEYWORD2>
+ <KEYWORD2>ncurses_wattron</KEYWORD2>
+ <KEYWORD2>ncurses_wattrset</KEYWORD2>
+ <KEYWORD2>ncurses_wborder</KEYWORD2>
+ <KEYWORD2>ncurses_wclear</KEYWORD2>
+ <KEYWORD2>ncurses_wcolor_set</KEYWORD2>
+ <KEYWORD2>ncurses_werase</KEYWORD2>
+ <KEYWORD2>ncurses_wgetch</KEYWORD2>
+ <KEYWORD2>ncurses_whline</KEYWORD2>
+ <KEYWORD2>ncurses_wmouse_trafo</KEYWORD2>
+ <KEYWORD2>ncurses_wmove</KEYWORD2>
+ <KEYWORD2>ncurses_wnoutrefresh</KEYWORD2>
+ <KEYWORD2>ncurses_wrefresh</KEYWORD2>
+ <KEYWORD2>ncurses_wstandend</KEYWORD2>
+ <KEYWORD2>ncurses_wstandout</KEYWORD2>
+ <KEYWORD2>ncurses_wvline</KEYWORD2>
+ <KEYWORD2>next</KEYWORD2> <!-- arrayiterator, cachingiterator, directoryiterator, filteriterator, limititerator, parentiterator, recursivedirectoryiterator, recursiveiteratoriterator, simplexmliterator, tidy_node -->
+ <KEYWORD2>next_sibling</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>nextframe</KEYWORD2> <!-- swfmovie, swfsprite -->
+ <KEYWORD2>ngettext</KEYWORD2>
+ <KEYWORD2>nl2br</KEYWORD2>
+ <KEYWORD2>nl_langinfo</KEYWORD2>
+ <KEYWORD2>node_name</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>node_type</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>node_value</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>normalize</KEYWORD2> <!-- domdocument, domnode -->
+ <KEYWORD2>notations</KEYWORD2> <!-- domdocumenttype -->
+ <KEYWORD2>notes_body</KEYWORD2>
+ <KEYWORD2>notes_copy_db</KEYWORD2>
+ <KEYWORD2>notes_create_db</KEYWORD2>
+ <KEYWORD2>notes_create_note</KEYWORD2>
+ <KEYWORD2>notes_drop_db</KEYWORD2>
+ <KEYWORD2>notes_find_note</KEYWORD2>
+ <KEYWORD2>notes_header_info</KEYWORD2>
+ <KEYWORD2>notes_list_msgs</KEYWORD2>
+ <KEYWORD2>notes_mark_read</KEYWORD2>
+ <KEYWORD2>notes_mark_unread</KEYWORD2>
+ <KEYWORD2>notes_nav_create</KEYWORD2>
+ <KEYWORD2>notes_search</KEYWORD2>
+ <KEYWORD2>notes_unread</KEYWORD2>
+ <KEYWORD2>notes_version</KEYWORD2>
+ <KEYWORD2>nsapi_request_headers</KEYWORD2>
+ <KEYWORD2>nsapi_response_headers</KEYWORD2>
+ <KEYWORD2>nsapi_virtual</KEYWORD2>
+ <KEYWORD2>number_format</KEYWORD2>
+ <KEYWORD2>ob_clean</KEYWORD2>
+ <KEYWORD2>ob_end_clean</KEYWORD2>
+ <KEYWORD2>ob_end_flush</KEYWORD2>
+ <KEYWORD2>ob_flush</KEYWORD2>
+ <KEYWORD2>ob_get_clean</KEYWORD2>
+ <KEYWORD2>ob_get_contents</KEYWORD2>
+ <KEYWORD2>ob_get_flush</KEYWORD2>
+ <KEYWORD2>ob_get_length</KEYWORD2>
+ <KEYWORD2>ob_get_level</KEYWORD2>
+ <KEYWORD2>ob_get_status</KEYWORD2>
+ <KEYWORD2>ob_gzhandler</KEYWORD2>
+ <KEYWORD2>ob_iconv_handler</KEYWORD2>
+ <KEYWORD2>ob_implicit_flush</KEYWORD2>
+ <KEYWORD2>ob_list_handlers</KEYWORD2>
+ <KEYWORD2>ob_start</KEYWORD2>
+ <KEYWORD2>ob_tidyhandler</KEYWORD2>
+ <KEYWORD2>object</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>objectbyanchor</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>oci_bind_by_name</KEYWORD2>
+ <KEYWORD2>oci_cancel</KEYWORD2>
+ <KEYWORD2>oci_close</KEYWORD2>
+ <KEYWORD2>oci_commit</KEYWORD2>
+ <KEYWORD2>oci_connect</KEYWORD2>
+ <KEYWORD2>oci_define_by_name</KEYWORD2>
+ <KEYWORD2>oci_error</KEYWORD2>
+ <KEYWORD2>oci_execute</KEYWORD2>
+ <KEYWORD2>oci_fetch</KEYWORD2>
+ <KEYWORD2>oci_fetch_all</KEYWORD2>
+ <KEYWORD2>oci_fetch_array</KEYWORD2>
+ <KEYWORD2>oci_fetch_assoc</KEYWORD2>
+ <KEYWORD2>oci_fetch_object</KEYWORD2>
+ <KEYWORD2>oci_fetch_row</KEYWORD2>
+ <KEYWORD2>oci_field_is_null</KEYWORD2>
+ <KEYWORD2>oci_field_name</KEYWORD2>
+ <KEYWORD2>oci_field_precision</KEYWORD2>
+ <KEYWORD2>oci_field_scale</KEYWORD2>
+ <KEYWORD2>oci_field_size</KEYWORD2>
+ <KEYWORD2>oci_field_type</KEYWORD2>
+ <KEYWORD2>oci_field_type_raw</KEYWORD2>
+ <KEYWORD2>oci_free_statement</KEYWORD2>
+ <KEYWORD2>oci_internal_debug</KEYWORD2>
+ <KEYWORD2>oci_lob_copy</KEYWORD2>
+ <KEYWORD2>oci_lob_is_equal</KEYWORD2>
+ <KEYWORD2>oci_new_collection</KEYWORD2>
+ <KEYWORD2>oci_new_connect</KEYWORD2>
+ <KEYWORD2>oci_new_cursor</KEYWORD2>
+ <KEYWORD2>oci_new_descriptor</KEYWORD2>
+ <KEYWORD2>oci_num_fields</KEYWORD2>
+ <KEYWORD2>oci_num_rows</KEYWORD2>
+ <KEYWORD2>oci_parse</KEYWORD2>
+ <KEYWORD2>oci_password_change</KEYWORD2>
+ <KEYWORD2>oci_pconnect</KEYWORD2>
+ <KEYWORD2>oci_result</KEYWORD2>
+ <KEYWORD2>oci_rollback</KEYWORD2>
+ <KEYWORD2>oci_server_version</KEYWORD2>
+ <KEYWORD2>oci_set_prefetch</KEYWORD2>
+ <KEYWORD2>oci_statement_type</KEYWORD2>
+ <KEYWORD2>ocibindbyname</KEYWORD2>
+ <KEYWORD2>ocicancel</KEYWORD2>
+ <KEYWORD2>ocicloselob</KEYWORD2>
+ <KEYWORD2>ocicollappend</KEYWORD2>
+ <KEYWORD2>ocicollassign</KEYWORD2>
+ <KEYWORD2>ocicollassignelem</KEYWORD2>
+ <KEYWORD2>ocicollgetelem</KEYWORD2>
+ <KEYWORD2>ocicollmax</KEYWORD2>
+ <KEYWORD2>ocicollsize</KEYWORD2>
+ <KEYWORD2>ocicolltrim</KEYWORD2>
+ <KEYWORD2>ocicolumnisnull</KEYWORD2>
+ <KEYWORD2>ocicolumnname</KEYWORD2>
+ <KEYWORD2>ocicolumnprecision</KEYWORD2>
+ <KEYWORD2>ocicolumnscale</KEYWORD2>
+ <KEYWORD2>ocicolumnsize</KEYWORD2>
+ <KEYWORD2>ocicolumntype</KEYWORD2>
+ <KEYWORD2>ocicolumntyperaw</KEYWORD2>
+ <KEYWORD2>ocicommit</KEYWORD2>
+ <KEYWORD2>ocidefinebyname</KEYWORD2>
+ <KEYWORD2>ocierror</KEYWORD2>
+ <KEYWORD2>ociexecute</KEYWORD2>
+ <KEYWORD2>ocifetch</KEYWORD2>
+ <KEYWORD2>ocifetchinto</KEYWORD2>
+ <KEYWORD2>ocifetchstatement</KEYWORD2>
+ <KEYWORD2>ocifreecollection</KEYWORD2>
+ <KEYWORD2>ocifreecursor</KEYWORD2>
+ <KEYWORD2>ocifreedesc</KEYWORD2>
+ <KEYWORD2>ocifreestatement</KEYWORD2>
+ <KEYWORD2>ociinternaldebug</KEYWORD2>
+ <KEYWORD2>ociloadlob</KEYWORD2>
+ <KEYWORD2>ocilogoff</KEYWORD2>
+ <KEYWORD2>ocilogon</KEYWORD2>
+ <KEYWORD2>ocinewcollection</KEYWORD2>
+ <KEYWORD2>ocinewcursor</KEYWORD2>
+ <KEYWORD2>ocinewdescriptor</KEYWORD2>
+ <KEYWORD2>ocinlogon</KEYWORD2>
+ <KEYWORD2>ocinumcols</KEYWORD2>
+ <KEYWORD2>ociparse</KEYWORD2>
+ <KEYWORD2>ociplogon</KEYWORD2>
+ <KEYWORD2>ociresult</KEYWORD2>
+ <KEYWORD2>ocirollback</KEYWORD2>
+ <KEYWORD2>ocirowcount</KEYWORD2>
+ <KEYWORD2>ocisavelob</KEYWORD2>
+ <KEYWORD2>ocisavelobfile</KEYWORD2>
+ <KEYWORD2>ociserverversion</KEYWORD2>
+ <KEYWORD2>ocisetprefetch</KEYWORD2>
+ <KEYWORD2>ocistatementtype</KEYWORD2>
+ <KEYWORD2>ociwritelobtofile</KEYWORD2>
+ <KEYWORD2>ociwritetemporarylob</KEYWORD2>
+ <KEYWORD2>octdec</KEYWORD2>
+ <KEYWORD2>odbc_autocommit</KEYWORD2>
+ <KEYWORD2>odbc_binmode</KEYWORD2>
+ <KEYWORD2>odbc_close</KEYWORD2>
+ <KEYWORD2>odbc_close_all</KEYWORD2>
+ <KEYWORD2>odbc_columnprivileges</KEYWORD2>
+ <KEYWORD2>odbc_columns</KEYWORD2>
+ <KEYWORD2>odbc_commit</KEYWORD2>
+ <KEYWORD2>odbc_connect</KEYWORD2>
+ <KEYWORD2>odbc_cursor</KEYWORD2>
+ <KEYWORD2>odbc_data_source</KEYWORD2>
+ <KEYWORD2>odbc_do</KEYWORD2>
+ <KEYWORD2>odbc_error</KEYWORD2>
+ <KEYWORD2>odbc_errormsg</KEYWORD2>
+ <KEYWORD2>odbc_exec</KEYWORD2>
+ <KEYWORD2>odbc_execute</KEYWORD2>
+ <KEYWORD2>odbc_fetch_array</KEYWORD2>
+ <KEYWORD2>odbc_fetch_into</KEYWORD2>
+ <KEYWORD2>odbc_fetch_object</KEYWORD2>
+ <KEYWORD2>odbc_fetch_row</KEYWORD2>
+ <KEYWORD2>odbc_field_len</KEYWORD2>
+ <KEYWORD2>odbc_field_name</KEYWORD2>
+ <KEYWORD2>odbc_field_num</KEYWORD2>
+ <KEYWORD2>odbc_field_precision</KEYWORD2>
+ <KEYWORD2>odbc_field_scale</KEYWORD2>
+ <KEYWORD2>odbc_field_type</KEYWORD2>
+ <KEYWORD2>odbc_foreignkeys</KEYWORD2>
+ <KEYWORD2>odbc_free_result</KEYWORD2>
+ <KEYWORD2>odbc_gettypeinfo</KEYWORD2>
+ <KEYWORD2>odbc_longreadlen</KEYWORD2>
+ <KEYWORD2>odbc_next_result</KEYWORD2>
+ <KEYWORD2>odbc_num_fields</KEYWORD2>
+ <KEYWORD2>odbc_num_rows</KEYWORD2>
+ <KEYWORD2>odbc_pconnect</KEYWORD2>
+ <KEYWORD2>odbc_prepare</KEYWORD2>
+ <KEYWORD2>odbc_primarykeys</KEYWORD2>
+ <KEYWORD2>odbc_procedurecolumns</KEYWORD2>
+ <KEYWORD2>odbc_procedures</KEYWORD2>
+ <KEYWORD2>odbc_result</KEYWORD2>
+ <KEYWORD2>odbc_result_all</KEYWORD2>
+ <KEYWORD2>odbc_rollback</KEYWORD2>
+ <KEYWORD2>odbc_setoption</KEYWORD2>
+ <KEYWORD2>odbc_specialcolumns</KEYWORD2>
+ <KEYWORD2>odbc_statistics</KEYWORD2>
+ <KEYWORD2>odbc_tableprivileges</KEYWORD2>
+ <KEYWORD2>odbc_tables</KEYWORD2>
+ <KEYWORD2>offsetexists</KEYWORD2> <!-- arrayobject -->
+ <KEYWORD2>offsetget</KEYWORD2> <!-- arrayobject -->
+ <KEYWORD2>offsetset</KEYWORD2> <!-- arrayobject -->
+ <KEYWORD2>offsetunset</KEYWORD2> <!-- arrayobject -->
+ <KEYWORD2>openal_buffer_create</KEYWORD2>
+ <KEYWORD2>openal_buffer_data</KEYWORD2>
+ <KEYWORD2>openal_buffer_destroy</KEYWORD2>
+ <KEYWORD2>openal_buffer_get</KEYWORD2>
+ <KEYWORD2>openal_buffer_loadwav</KEYWORD2>
+ <KEYWORD2>openal_context_create</KEYWORD2>
+ <KEYWORD2>openal_context_current</KEYWORD2>
+ <KEYWORD2>openal_context_destroy</KEYWORD2>
+ <KEYWORD2>openal_context_process</KEYWORD2>
+ <KEYWORD2>openal_context_suspend</KEYWORD2>
+ <KEYWORD2>openal_device_close</KEYWORD2>
+ <KEYWORD2>openal_device_open</KEYWORD2>
+ <KEYWORD2>openal_listener_get</KEYWORD2>
+ <KEYWORD2>openal_listener_set</KEYWORD2>
+ <KEYWORD2>openal_source_create</KEYWORD2>
+ <KEYWORD2>openal_source_destroy</KEYWORD2>
+ <KEYWORD2>openal_source_get</KEYWORD2>
+ <KEYWORD2>openal_source_pause</KEYWORD2>
+ <KEYWORD2>openal_source_play</KEYWORD2>
+ <KEYWORD2>openal_source_rewind</KEYWORD2>
+ <KEYWORD2>openal_source_set</KEYWORD2>
+ <KEYWORD2>openal_source_stop</KEYWORD2>
+ <KEYWORD2>openal_stream</KEYWORD2>
+ <KEYWORD2>opendir</KEYWORD2>
+ <KEYWORD2>openlog</KEYWORD2>
+ <KEYWORD2>openssl_csr_export</KEYWORD2>
+ <KEYWORD2>openssl_csr_export_to_file</KEYWORD2>
+ <KEYWORD2>openssl_csr_new</KEYWORD2>
+ <KEYWORD2>openssl_csr_sign</KEYWORD2>
+ <KEYWORD2>openssl_error_string</KEYWORD2>
+ <KEYWORD2>openssl_free_key</KEYWORD2>
+ <KEYWORD2>openssl_get_privatekey</KEYWORD2>
+ <KEYWORD2>openssl_get_publickey</KEYWORD2>
+ <KEYWORD2>openssl_open</KEYWORD2>
+ <KEYWORD2>openssl_pkcs7_decrypt</KEYWORD2>
+ <KEYWORD2>openssl_pkcs7_encrypt</KEYWORD2>
+ <KEYWORD2>openssl_pkcs7_sign</KEYWORD2>
+ <KEYWORD2>openssl_pkcs7_verify</KEYWORD2>
+ <KEYWORD2>openssl_pkey_export</KEYWORD2>
+ <KEYWORD2>openssl_pkey_export_to_file</KEYWORD2>
+ <KEYWORD2>openssl_pkey_get_private</KEYWORD2>
+ <KEYWORD2>openssl_pkey_get_public</KEYWORD2>
+ <KEYWORD2>openssl_pkey_new</KEYWORD2>
+ <KEYWORD2>openssl_private_decrypt</KEYWORD2>
+ <KEYWORD2>openssl_private_encrypt</KEYWORD2>
+ <KEYWORD2>openssl_public_decrypt</KEYWORD2>
+ <KEYWORD2>openssl_public_encrypt</KEYWORD2>
+ <KEYWORD2>openssl_seal</KEYWORD2>
+ <KEYWORD2>openssl_sign</KEYWORD2>
+ <KEYWORD2>openssl_verify</KEYWORD2>
+ <KEYWORD2>openssl_x509_check_private_key</KEYWORD2>
+ <KEYWORD2>openssl_x509_checkpurpose</KEYWORD2>
+ <KEYWORD2>openssl_x509_export</KEYWORD2>
+ <KEYWORD2>openssl_x509_export_to_file</KEYWORD2>
+ <KEYWORD2>openssl_x509_free</KEYWORD2>
+ <KEYWORD2>openssl_x509_parse</KEYWORD2>
+ <KEYWORD2>openssl_x509_read</KEYWORD2>
+ <KEYWORD2>ora_bind</KEYWORD2>
+ <KEYWORD2>ora_close</KEYWORD2>
+ <KEYWORD2>ora_columnname</KEYWORD2>
+ <KEYWORD2>ora_columnsize</KEYWORD2>
+ <KEYWORD2>ora_columntype</KEYWORD2>
+ <KEYWORD2>ora_commit</KEYWORD2>
+ <KEYWORD2>ora_commitoff</KEYWORD2>
+ <KEYWORD2>ora_commiton</KEYWORD2>
+ <KEYWORD2>ora_do</KEYWORD2>
+ <KEYWORD2>ora_error</KEYWORD2>
+ <KEYWORD2>ora_errorcode</KEYWORD2>
+ <KEYWORD2>ora_exec</KEYWORD2>
+ <KEYWORD2>ora_fetch</KEYWORD2>
+ <KEYWORD2>ora_fetch_into</KEYWORD2>
+ <KEYWORD2>ora_getcolumn</KEYWORD2>
+ <KEYWORD2>ora_logoff</KEYWORD2>
+ <KEYWORD2>ora_logon</KEYWORD2>
+ <KEYWORD2>ora_numcols</KEYWORD2>
+ <KEYWORD2>ora_numrows</KEYWORD2>
+ <KEYWORD2>ora_open</KEYWORD2>
+ <KEYWORD2>ora_parse</KEYWORD2>
+ <KEYWORD2>ora_plogon</KEYWORD2>
+ <KEYWORD2>ora_rollback</KEYWORD2>
+ <KEYWORD2>ord</KEYWORD2>
+ <KEYWORD2>output</KEYWORD2> <!-- swfmovie -->
+ <KEYWORD2>output_add_rewrite_var</KEYWORD2>
+ <KEYWORD2>output_reset_rewrite_vars</KEYWORD2>
+ <KEYWORD2>overload</KEYWORD2>
+ <KEYWORD2>override_function</KEYWORD2>
+ <KEYWORD2>ovrimos_close</KEYWORD2>
+ <KEYWORD2>ovrimos_commit</KEYWORD2>
+ <KEYWORD2>ovrimos_connect</KEYWORD2>
+ <KEYWORD2>ovrimos_cursor</KEYWORD2>
+ <KEYWORD2>ovrimos_exec</KEYWORD2>
+ <KEYWORD2>ovrimos_execute</KEYWORD2>
+ <KEYWORD2>ovrimos_fetch_into</KEYWORD2>
+ <KEYWORD2>ovrimos_fetch_row</KEYWORD2>
+ <KEYWORD2>ovrimos_field_len</KEYWORD2>
+ <KEYWORD2>ovrimos_field_name</KEYWORD2>
+ <KEYWORD2>ovrimos_field_num</KEYWORD2>
+ <KEYWORD2>ovrimos_field_type</KEYWORD2>
+ <KEYWORD2>ovrimos_free_result</KEYWORD2>
+ <KEYWORD2>ovrimos_longreadlen</KEYWORD2>
+ <KEYWORD2>ovrimos_num_fields</KEYWORD2>
+ <KEYWORD2>ovrimos_num_rows</KEYWORD2>
+ <KEYWORD2>ovrimos_prepare</KEYWORD2>
+ <KEYWORD2>ovrimos_result</KEYWORD2>
+ <KEYWORD2>ovrimos_result_all</KEYWORD2>
+ <KEYWORD2>ovrimos_rollback</KEYWORD2>
+ <KEYWORD2>owner_document</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>pack</KEYWORD2>
+ <KEYWORD2>parent_node</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>parents</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>parse_ini_file</KEYWORD2>
+ <KEYWORD2>parse_str</KEYWORD2>
+ <KEYWORD2>parse_url</KEYWORD2>
+ <KEYWORD2>parsekit_compile_file</KEYWORD2>
+ <KEYWORD2>parsekit_compile_string</KEYWORD2>
+ <KEYWORD2>parsekit_func_arginfo</KEYWORD2>
+ <KEYWORD2>passthru</KEYWORD2>
+ <KEYWORD2>pathinfo</KEYWORD2>
+ <KEYWORD2>pclose</KEYWORD2>
+ <KEYWORD2>pcntl_alarm</KEYWORD2>
+ <KEYWORD2>pcntl_exec</KEYWORD2>
+ <KEYWORD2>pcntl_fork</KEYWORD2>
+ <KEYWORD2>pcntl_getpriority</KEYWORD2>
+ <KEYWORD2>pcntl_setpriority</KEYWORD2>
+ <KEYWORD2>pcntl_signal</KEYWORD2>
+ <KEYWORD2>pcntl_wait</KEYWORD2>
+ <KEYWORD2>pcntl_waitpid</KEYWORD2>
+ <KEYWORD2>pcntl_wexitstatus</KEYWORD2>
+ <KEYWORD2>pcntl_wifexited</KEYWORD2>
+ <KEYWORD2>pcntl_wifsignaled</KEYWORD2>
+ <KEYWORD2>pcntl_wifstopped</KEYWORD2>
+ <KEYWORD2>pcntl_wstopsig</KEYWORD2>
+ <KEYWORD2>pcntl_wtermsig</KEYWORD2>
+ <KEYWORD2>pconnect</KEYWORD2> <!-- memcache -->
+ <KEYWORD2>pdf_add_annotation</KEYWORD2>
+ <KEYWORD2>pdf_add_bookmark</KEYWORD2>
+ <KEYWORD2>pdf_add_launchlink</KEYWORD2>
+ <KEYWORD2>pdf_add_locallink</KEYWORD2>
+ <KEYWORD2>pdf_add_note</KEYWORD2>
+ <KEYWORD2>pdf_add_outline</KEYWORD2>
+ <KEYWORD2>pdf_add_pdflink</KEYWORD2>
+ <KEYWORD2>pdf_add_thumbnail</KEYWORD2>
+ <KEYWORD2>pdf_add_weblink</KEYWORD2>
+ <KEYWORD2>pdf_arc</KEYWORD2>
+ <KEYWORD2>pdf_arcn</KEYWORD2>
+ <KEYWORD2>pdf_attach_file</KEYWORD2>
+ <KEYWORD2>pdf_begin_page</KEYWORD2>
+ <KEYWORD2>pdf_begin_pattern</KEYWORD2>
+ <KEYWORD2>pdf_begin_template</KEYWORD2>
+ <KEYWORD2>pdf_circle</KEYWORD2>
+ <KEYWORD2>pdf_clip</KEYWORD2>
+ <KEYWORD2>pdf_close</KEYWORD2>
+ <KEYWORD2>pdf_close_image</KEYWORD2>
+ <KEYWORD2>pdf_close_pdi</KEYWORD2>
+ <KEYWORD2>pdf_close_pdi_page</KEYWORD2>
+ <KEYWORD2>pdf_closepath</KEYWORD2>
+ <KEYWORD2>pdf_closepath_fill_stroke</KEYWORD2>
+ <KEYWORD2>pdf_closepath_stroke</KEYWORD2>
+ <KEYWORD2>pdf_concat</KEYWORD2>
+ <KEYWORD2>pdf_continue_text</KEYWORD2>
+ <KEYWORD2>pdf_curveto</KEYWORD2>
+ <KEYWORD2>pdf_delete</KEYWORD2>
+ <KEYWORD2>pdf_end_page</KEYWORD2>
+ <KEYWORD2>pdf_end_pattern</KEYWORD2>
+ <KEYWORD2>pdf_end_template</KEYWORD2>
+ <KEYWORD2>pdf_endpath</KEYWORD2>
+ <KEYWORD2>pdf_fill</KEYWORD2>
+ <KEYWORD2>pdf_fill_stroke</KEYWORD2>
+ <KEYWORD2>pdf_findfont</KEYWORD2>
+ <KEYWORD2>pdf_fit_pdi_page</KEYWORD2>
+ <KEYWORD2>pdf_get_buffer</KEYWORD2>
+ <KEYWORD2>pdf_get_font</KEYWORD2>
+ <KEYWORD2>pdf_get_fontname</KEYWORD2>
+ <KEYWORD2>pdf_get_fontsize</KEYWORD2>
+ <KEYWORD2>pdf_get_image_height</KEYWORD2>
+ <KEYWORD2>pdf_get_image_width</KEYWORD2>
+ <KEYWORD2>pdf_get_majorversion</KEYWORD2>
+ <KEYWORD2>pdf_get_minorversion</KEYWORD2>
+ <KEYWORD2>pdf_get_parameter</KEYWORD2>
+ <KEYWORD2>pdf_get_pdi_parameter</KEYWORD2>
+ <KEYWORD2>pdf_get_pdi_value</KEYWORD2>
+ <KEYWORD2>pdf_get_value</KEYWORD2>
+ <KEYWORD2>pdf_initgraphics</KEYWORD2>
+ <KEYWORD2>pdf_lineto</KEYWORD2>
+ <KEYWORD2>pdf_load_font</KEYWORD2>
+ <KEYWORD2>pdf_makespotcolor</KEYWORD2>
+ <KEYWORD2>pdf_moveto</KEYWORD2>
+ <KEYWORD2>pdf_new</KEYWORD2>
+ <KEYWORD2>pdf_open</KEYWORD2>
+ <KEYWORD2>pdf_open_ccitt</KEYWORD2>
+ <KEYWORD2>pdf_open_file</KEYWORD2>
+ <KEYWORD2>pdf_open_gif</KEYWORD2>
+ <KEYWORD2>pdf_open_image</KEYWORD2>
+ <KEYWORD2>pdf_open_image_file</KEYWORD2>
+ <KEYWORD2>pdf_open_jpeg</KEYWORD2>
+ <KEYWORD2>pdf_open_memory_image</KEYWORD2>
+ <KEYWORD2>pdf_open_pdi</KEYWORD2>
+ <KEYWORD2>pdf_open_pdi_page</KEYWORD2>
+ <KEYWORD2>pdf_open_png</KEYWORD2>
+ <KEYWORD2>pdf_open_tiff</KEYWORD2>
+ <KEYWORD2>pdf_place_image</KEYWORD2>
+ <KEYWORD2>pdf_place_pdi_page</KEYWORD2>
+ <KEYWORD2>pdf_rect</KEYWORD2>
+ <KEYWORD2>pdf_restore</KEYWORD2>
+ <KEYWORD2>pdf_rotate</KEYWORD2>
+ <KEYWORD2>pdf_save</KEYWORD2>
+ <KEYWORD2>pdf_scale</KEYWORD2>
+ <KEYWORD2>pdf_set_border_color</KEYWORD2>
+ <KEYWORD2>pdf_set_border_dash</KEYWORD2>
+ <KEYWORD2>pdf_set_border_style</KEYWORD2>
+ <KEYWORD2>pdf_set_char_spacing</KEYWORD2>
+ <KEYWORD2>pdf_set_duration</KEYWORD2>
+ <KEYWORD2>pdf_set_font</KEYWORD2>
+ <KEYWORD2>pdf_set_horiz_scaling</KEYWORD2>
+ <KEYWORD2>pdf_set_info</KEYWORD2>
+ <KEYWORD2>pdf_set_info_author</KEYWORD2>
+ <KEYWORD2>pdf_set_info_creator</KEYWORD2>
+ <KEYWORD2>pdf_set_info_keywords</KEYWORD2>
+ <KEYWORD2>pdf_set_info_subject</KEYWORD2>
+ <KEYWORD2>pdf_set_info_title</KEYWORD2>
+ <KEYWORD2>pdf_set_leading</KEYWORD2>
+ <KEYWORD2>pdf_set_parameter</KEYWORD2>
+ <KEYWORD2>pdf_set_text_matrix</KEYWORD2>
+ <KEYWORD2>pdf_set_text_pos</KEYWORD2>
+ <KEYWORD2>pdf_set_text_rendering</KEYWORD2>
+ <KEYWORD2>pdf_set_text_rise</KEYWORD2>
+ <KEYWORD2>pdf_set_value</KEYWORD2>
+ <KEYWORD2>pdf_set_word_spacing</KEYWORD2>
+ <KEYWORD2>pdf_setcolor</KEYWORD2>
+ <KEYWORD2>pdf_setdash</KEYWORD2>
+ <KEYWORD2>pdf_setflat</KEYWORD2>
+ <KEYWORD2>pdf_setfont</KEYWORD2>
+ <KEYWORD2>pdf_setgray</KEYWORD2>
+ <KEYWORD2>pdf_setgray_fill</KEYWORD2>
+ <KEYWORD2>pdf_setgray_stroke</KEYWORD2>
+ <KEYWORD2>pdf_setlinecap</KEYWORD2>
+ <KEYWORD2>pdf_setlinejoin</KEYWORD2>
+ <KEYWORD2>pdf_setlinewidth</KEYWORD2>
+ <KEYWORD2>pdf_setmatrix</KEYWORD2>
+ <KEYWORD2>pdf_setmiterlimit</KEYWORD2>
+ <KEYWORD2>pdf_setpolydash</KEYWORD2>
+ <KEYWORD2>pdf_setrgbcolor</KEYWORD2>
+ <KEYWORD2>pdf_setrgbcolor_fill</KEYWORD2>
+ <KEYWORD2>pdf_setrgbcolor_stroke</KEYWORD2>
+ <KEYWORD2>pdf_show</KEYWORD2>
+ <KEYWORD2>pdf_show_boxed</KEYWORD2>
+ <KEYWORD2>pdf_show_xy</KEYWORD2>
+ <KEYWORD2>pdf_skew</KEYWORD2>
+ <KEYWORD2>pdf_stringwidth</KEYWORD2>
+ <KEYWORD2>pdf_stroke</KEYWORD2>
+ <KEYWORD2>pdf_translate</KEYWORD2>
+ <KEYWORD2>pfpro_cleanup</KEYWORD2>
+ <KEYWORD2>pfpro_init</KEYWORD2>
+ <KEYWORD2>pfpro_process</KEYWORD2>
+ <KEYWORD2>pfpro_process_raw</KEYWORD2>
+ <KEYWORD2>pfpro_version</KEYWORD2>
+ <KEYWORD2>pfsockopen</KEYWORD2>
+ <KEYWORD2>pg_affected_rows</KEYWORD2>
+ <KEYWORD2>pg_cancel_query</KEYWORD2>
+ <KEYWORD2>pg_client_encoding</KEYWORD2>
+ <KEYWORD2>pg_close</KEYWORD2>
+ <KEYWORD2>pg_connect</KEYWORD2>
+ <KEYWORD2>pg_connection_busy</KEYWORD2>
+ <KEYWORD2>pg_connection_reset</KEYWORD2>
+ <KEYWORD2>pg_connection_status</KEYWORD2>
+ <KEYWORD2>pg_convert</KEYWORD2>
+ <KEYWORD2>pg_copy_from</KEYWORD2>
+ <KEYWORD2>pg_copy_to</KEYWORD2>
+ <KEYWORD2>pg_dbname</KEYWORD2>
+ <KEYWORD2>pg_delete</KEYWORD2>
+ <KEYWORD2>pg_end_copy</KEYWORD2>
+ <KEYWORD2>pg_escape_bytea</KEYWORD2>
+ <KEYWORD2>pg_escape_string</KEYWORD2>
+ <KEYWORD2>pg_fetch_all</KEYWORD2>
+ <KEYWORD2>pg_fetch_array</KEYWORD2>
+ <KEYWORD2>pg_fetch_assoc</KEYWORD2>
+ <KEYWORD2>pg_fetch_object</KEYWORD2>
+ <KEYWORD2>pg_fetch_result</KEYWORD2>
+ <KEYWORD2>pg_fetch_row</KEYWORD2>
+ <KEYWORD2>pg_field_is_null</KEYWORD2>
+ <KEYWORD2>pg_field_name</KEYWORD2>
+ <KEYWORD2>pg_field_num</KEYWORD2>
+ <KEYWORD2>pg_field_prtlen</KEYWORD2>
+ <KEYWORD2>pg_field_size</KEYWORD2>
+ <KEYWORD2>pg_field_type</KEYWORD2>
+ <KEYWORD2>pg_free_result</KEYWORD2>
+ <KEYWORD2>pg_get_notify</KEYWORD2>
+ <KEYWORD2>pg_get_pid</KEYWORD2>
+ <KEYWORD2>pg_get_result</KEYWORD2>
+ <KEYWORD2>pg_host</KEYWORD2>
+ <KEYWORD2>pg_insert</KEYWORD2>
+ <KEYWORD2>pg_last_error</KEYWORD2>
+ <KEYWORD2>pg_last_notice</KEYWORD2>
+ <KEYWORD2>pg_last_oid</KEYWORD2>
+ <KEYWORD2>pg_lo_close</KEYWORD2>
+ <KEYWORD2>pg_lo_create</KEYWORD2>
+ <KEYWORD2>pg_lo_export</KEYWORD2>
+ <KEYWORD2>pg_lo_import</KEYWORD2>
+ <KEYWORD2>pg_lo_open</KEYWORD2>
+ <KEYWORD2>pg_lo_read</KEYWORD2>
+ <KEYWORD2>pg_lo_read_all</KEYWORD2>
+ <KEYWORD2>pg_lo_seek</KEYWORD2>
+ <KEYWORD2>pg_lo_tell</KEYWORD2>
+ <KEYWORD2>pg_lo_unlink</KEYWORD2>
+ <KEYWORD2>pg_lo_write</KEYWORD2>
+ <KEYWORD2>pg_meta_data</KEYWORD2>
+ <KEYWORD2>pg_num_fields</KEYWORD2>
+ <KEYWORD2>pg_num_rows</KEYWORD2>
+ <KEYWORD2>pg_options</KEYWORD2>
+ <KEYWORD2>pg_parameter_status</KEYWORD2>
+ <KEYWORD2>pg_pconnect</KEYWORD2>
+ <KEYWORD2>pg_ping</KEYWORD2>
+ <KEYWORD2>pg_port</KEYWORD2>
+ <KEYWORD2>pg_put_line</KEYWORD2>
+ <KEYWORD2>pg_query</KEYWORD2>
+ <KEYWORD2>pg_result_error</KEYWORD2>
+ <KEYWORD2>pg_result_seek</KEYWORD2>
+ <KEYWORD2>pg_result_status</KEYWORD2>
+ <KEYWORD2>pg_select</KEYWORD2>
+ <KEYWORD2>pg_send_query</KEYWORD2>
+ <KEYWORD2>pg_set_client_encoding</KEYWORD2>
+ <KEYWORD2>pg_trace</KEYWORD2>
+ <KEYWORD2>pg_tty</KEYWORD2>
+ <KEYWORD2>pg_unescape_bytea</KEYWORD2>
+ <KEYWORD2>pg_untrace</KEYWORD2>
+ <KEYWORD2>pg_update</KEYWORD2>
+ <KEYWORD2>pg_version</KEYWORD2>
+ <KEYWORD2>php_check_syntax</KEYWORD2>
+ <KEYWORD2>php_ini_scanned_files</KEYWORD2>
+ <KEYWORD2>php_logo_guid</KEYWORD2>
+ <KEYWORD2>php_sapi_name</KEYWORD2>
+ <KEYWORD2>php_strip_whitespace</KEYWORD2>
+ <KEYWORD2>php_uname</KEYWORD2>
+ <KEYWORD2>phpcredits</KEYWORD2>
+ <KEYWORD2>phpinfo</KEYWORD2>
+ <KEYWORD2>phpversion</KEYWORD2>
+ <KEYWORD2>pi</KEYWORD2>
+ <KEYWORD2>png2wbmp</KEYWORD2>
+ <KEYWORD2>popen</KEYWORD2>
+ <KEYWORD2>pos</KEYWORD2>
+ <KEYWORD2>posix_ctermid</KEYWORD2>
+ <KEYWORD2>posix_get_last_error</KEYWORD2>
+ <KEYWORD2>posix_getcwd</KEYWORD2>
+ <KEYWORD2>posix_getegid</KEYWORD2>
+ <KEYWORD2>posix_geteuid</KEYWORD2>
+ <KEYWORD2>posix_getgid</KEYWORD2>
+ <KEYWORD2>posix_getgrgid</KEYWORD2>
+ <KEYWORD2>posix_getgrnam</KEYWORD2>
+ <KEYWORD2>posix_getgroups</KEYWORD2>
+ <KEYWORD2>posix_getlogin</KEYWORD2>
+ <KEYWORD2>posix_getpgid</KEYWORD2>
+ <KEYWORD2>posix_getpgrp</KEYWORD2>
+ <KEYWORD2>posix_getpid</KEYWORD2>
+ <KEYWORD2>posix_getppid</KEYWORD2>
+ <KEYWORD2>posix_getpwnam</KEYWORD2>
+ <KEYWORD2>posix_getpwuid</KEYWORD2>
+ <KEYWORD2>posix_getrlimit</KEYWORD2>
+ <KEYWORD2>posix_getsid</KEYWORD2>
+ <KEYWORD2>posix_getuid</KEYWORD2>
+ <KEYWORD2>posix_isatty</KEYWORD2>
+ <KEYWORD2>posix_kill</KEYWORD2>
+ <KEYWORD2>posix_mkfifo</KEYWORD2>
+ <KEYWORD2>posix_setegid</KEYWORD2>
+ <KEYWORD2>posix_seteuid</KEYWORD2>
+ <KEYWORD2>posix_setgid</KEYWORD2>
+ <KEYWORD2>posix_setpgid</KEYWORD2>
+ <KEYWORD2>posix_setsid</KEYWORD2>
+ <KEYWORD2>posix_setuid</KEYWORD2>
+ <KEYWORD2>posix_strerror</KEYWORD2>
+ <KEYWORD2>posix_times</KEYWORD2>
+ <KEYWORD2>posix_ttyname</KEYWORD2>
+ <KEYWORD2>posix_uname</KEYWORD2>
+ <KEYWORD2>pow</KEYWORD2>
+ <KEYWORD2>prefix</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>preg_grep</KEYWORD2>
+ <KEYWORD2>preg_match</KEYWORD2>
+ <KEYWORD2>preg_match_all</KEYWORD2>
+ <KEYWORD2>preg_quote</KEYWORD2>
+ <KEYWORD2>preg_replace</KEYWORD2>
+ <KEYWORD2>preg_replace_callback</KEYWORD2>
+ <KEYWORD2>preg_split</KEYWORD2>
+ <KEYWORD2>prepare</KEYWORD2> <!-- pdo -->
+ <KEYWORD2>prev</KEYWORD2> <!-- tidy_node -->
+ <KEYWORD2>previous_sibling</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>print_r</KEYWORD2>
+ <KEYWORD2>printer_abort</KEYWORD2>
+ <KEYWORD2>printer_close</KEYWORD2>
+ <KEYWORD2>printer_create_brush</KEYWORD2>
+ <KEYWORD2>printer_create_dc</KEYWORD2>
+ <KEYWORD2>printer_create_font</KEYWORD2>
+ <KEYWORD2>printer_create_pen</KEYWORD2>
+ <KEYWORD2>printer_delete_brush</KEYWORD2>
+ <KEYWORD2>printer_delete_dc</KEYWORD2>
+ <KEYWORD2>printer_delete_font</KEYWORD2>
+ <KEYWORD2>printer_delete_pen</KEYWORD2>
+ <KEYWORD2>printer_draw_bmp</KEYWORD2>
+ <KEYWORD2>printer_draw_chord</KEYWORD2>
+ <KEYWORD2>printer_draw_elipse</KEYWORD2>
+ <KEYWORD2>printer_draw_line</KEYWORD2>
+ <KEYWORD2>printer_draw_pie</KEYWORD2>
+ <KEYWORD2>printer_draw_rectangle</KEYWORD2>
+ <KEYWORD2>printer_draw_roundrect</KEYWORD2>
+ <KEYWORD2>printer_draw_text</KEYWORD2>
+ <KEYWORD2>printer_end_doc</KEYWORD2>
+ <KEYWORD2>printer_end_page</KEYWORD2>
+ <KEYWORD2>printer_get_option</KEYWORD2>
+ <KEYWORD2>printer_list</KEYWORD2>
+ <KEYWORD2>printer_logical_fontheight</KEYWORD2>
+ <KEYWORD2>printer_open</KEYWORD2>
+ <KEYWORD2>printer_select_brush</KEYWORD2>
+ <KEYWORD2>printer_select_font</KEYWORD2>
+ <KEYWORD2>printer_select_pen</KEYWORD2>
+ <KEYWORD2>printer_set_option</KEYWORD2>
+ <KEYWORD2>printer_start_doc</KEYWORD2>
+ <KEYWORD2>printer_start_page</KEYWORD2>
+ <KEYWORD2>printer_write</KEYWORD2>
+ <KEYWORD2>printf</KEYWORD2>
+ <KEYWORD2>proc_close</KEYWORD2>
+ <KEYWORD2>proc_get_status</KEYWORD2>
+ <KEYWORD2>proc_nice</KEYWORD2>
+ <KEYWORD2>proc_open</KEYWORD2>
+ <KEYWORD2>proc_terminate</KEYWORD2>
+ <KEYWORD2>process</KEYWORD2> <!-- domxsltstylesheet -->
+ <KEYWORD2>property_exists</KEYWORD2>
+ <KEYWORD2>pspell_add_to_personal</KEYWORD2>
+ <KEYWORD2>pspell_add_to_session</KEYWORD2>
+ <KEYWORD2>pspell_check</KEYWORD2>
+ <KEYWORD2>pspell_clear_session</KEYWORD2>
+ <KEYWORD2>pspell_config_create</KEYWORD2>
+ <KEYWORD2>pspell_config_data_dir</KEYWORD2>
+ <KEYWORD2>pspell_config_dict_dir</KEYWORD2>
+ <KEYWORD2>pspell_config_ignore</KEYWORD2>
+ <KEYWORD2>pspell_config_mode</KEYWORD2>
+ <KEYWORD2>pspell_config_personal</KEYWORD2>
+ <KEYWORD2>pspell_config_repl</KEYWORD2>
+ <KEYWORD2>pspell_config_runtogether</KEYWORD2>
+ <KEYWORD2>pspell_config_save_repl</KEYWORD2>
+ <KEYWORD2>pspell_new</KEYWORD2>
+ <KEYWORD2>pspell_new_config</KEYWORD2>
+ <KEYWORD2>pspell_new_personal</KEYWORD2>
+ <KEYWORD2>pspell_save_wordlist</KEYWORD2>
+ <KEYWORD2>pspell_store_replacement</KEYWORD2>
+ <KEYWORD2>pspell_suggest</KEYWORD2>
+ <KEYWORD2>public_id</KEYWORD2> <!-- domdocumenttype -->
+ <KEYWORD2>putenv</KEYWORD2>
+ <KEYWORD2>qdom_error</KEYWORD2>
+ <KEYWORD2>qdom_tree</KEYWORD2>
+ <KEYWORD2>query</KEYWORD2> <!-- domxpath -->
+ <KEYWORD2>quoted_printable_decode</KEYWORD2>
+ <KEYWORD2>quotemeta</KEYWORD2>
+ <KEYWORD2>rad2deg</KEYWORD2>
+ <KEYWORD2>rand</KEYWORD2>
+ <KEYWORD2>range</KEYWORD2>
+ <KEYWORD2>rar_close</KEYWORD2>
+ <KEYWORD2>rar_entry_get</KEYWORD2>
+ <KEYWORD2>rar_list</KEYWORD2>
+ <KEYWORD2>rar_open</KEYWORD2>
+ <KEYWORD2>rawurldecode</KEYWORD2>
+ <KEYWORD2>rawurlencode</KEYWORD2>
+ <KEYWORD2>read</KEYWORD2> <!-- hw_api_content, lob -->
+ <KEYWORD2>read_exif_data</KEYWORD2>
+ <KEYWORD2>readdir</KEYWORD2>
+ <KEYWORD2>readfile</KEYWORD2>
+ <KEYWORD2>readgzfile</KEYWORD2>
+ <KEYWORD2>readline</KEYWORD2>
+ <KEYWORD2>readline_add_history</KEYWORD2>
+ <KEYWORD2>readline_callback_handler_install</KEYWORD2>
+ <KEYWORD2>readline_callback_handler_remove</KEYWORD2>
+ <KEYWORD2>readline_callback_read_char</KEYWORD2>
+ <KEYWORD2>readline_clear_history</KEYWORD2>
+ <KEYWORD2>readline_completion_function</KEYWORD2>
+ <KEYWORD2>readline_info</KEYWORD2>
+ <KEYWORD2>readline_list_history</KEYWORD2>
+ <KEYWORD2>readline_on_new_line</KEYWORD2>
+ <KEYWORD2>readline_read_history</KEYWORD2>
+ <KEYWORD2>readline_redisplay</KEYWORD2>
+ <KEYWORD2>readline_write_history</KEYWORD2>
+ <KEYWORD2>readlink</KEYWORD2>
+ <KEYWORD2>realpath</KEYWORD2>
+ <KEYWORD2>reason</KEYWORD2> <!-- hw_api_error -->
+ <KEYWORD2>recode</KEYWORD2>
+ <KEYWORD2>recode_file</KEYWORD2>
+ <KEYWORD2>recode_string</KEYWORD2>
+ <KEYWORD2>register_shutdown_function</KEYWORD2>
+ <KEYWORD2>register_tick_function</KEYWORD2>
+ <KEYWORD2>registernamespace</KEYWORD2> <!-- domxpath -->
+ <KEYWORD2>relaxngvalidate</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>relaxngvalidatesource</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>remove</KEYWORD2> <!-- hw_api, hw_api_object, swfdisplayitem, swfmovie, swfsprite -->
+ <KEYWORD2>remove_attribute</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>remove_child</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>removeattribute</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>removeattributenode</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>removeattributens</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>removechild</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>rename</KEYWORD2>
+ <KEYWORD2>rename_function</KEYWORD2>
+ <KEYWORD2>replace</KEYWORD2> <!-- hw_api, memcache -->
+ <KEYWORD2>replace_child</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>replace_node</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>replacechild</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>replacedata</KEYWORD2> <!-- domcharacterdata -->
+ <KEYWORD2>reset</KEYWORD2>
+ <KEYWORD2>restore_error_handler</KEYWORD2>
+ <KEYWORD2>restore_exception_handler</KEYWORD2>
+ <KEYWORD2>restore_include_path</KEYWORD2>
+ <KEYWORD2>result_dump_file</KEYWORD2> <!-- domxsltstylesheet -->
+ <KEYWORD2>result_dump_mem</KEYWORD2> <!-- domxsltstylesheet -->
+ <KEYWORD2>rewind</KEYWORD2> <!-- arrayiterator, cachingiterator, directoryiterator, filteriterator, limititerator, lob, parentiterator, recursivedirectoryiterator, recursiveiteratoriterator, simplexmliterator -->
+ <KEYWORD2>rewinddir</KEYWORD2>
+ <KEYWORD2>rmdir</KEYWORD2>
+ <KEYWORD2>rollback</KEYWORD2> <!-- pdo -->
+ <KEYWORD2>rotate</KEYWORD2> <!-- swfdisplayitem -->
+ <KEYWORD2>rotateto</KEYWORD2> <!-- swfdisplayitem, swffill -->
+ <KEYWORD2>round</KEYWORD2>
+ <KEYWORD2>rowcount</KEYWORD2> <!-- pdostatement -->
+ <KEYWORD2>rsort</KEYWORD2>
+ <KEYWORD2>rtrim</KEYWORD2>
+ <KEYWORD2>save</KEYWORD2> <!-- domdocument, lob, swfmovie -->
+ <KEYWORD2>savehtml</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>savehtmlfile</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>savexml</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>scale</KEYWORD2> <!-- swfdisplayitem -->
+ <KEYWORD2>scaleto</KEYWORD2> <!-- swfdisplayitem, swffill -->
+ <KEYWORD2>scandir</KEYWORD2>
+ <KEYWORD2>schemavalidate</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>schemavalidatesource</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>seek</KEYWORD2> <!-- arrayiterator, limititerator, lob -->
+ <KEYWORD2>sem_acquire</KEYWORD2>
+ <KEYWORD2>sem_get</KEYWORD2>
+ <KEYWORD2>sem_release</KEYWORD2>
+ <KEYWORD2>sem_remove</KEYWORD2>
+ <KEYWORD2>serialize</KEYWORD2>
+ <KEYWORD2>sesam_affected_rows</KEYWORD2>
+ <KEYWORD2>sesam_commit</KEYWORD2>
+ <KEYWORD2>sesam_connect</KEYWORD2>
+ <KEYWORD2>sesam_diagnostic</KEYWORD2>
+ <KEYWORD2>sesam_disconnect</KEYWORD2>
+ <KEYWORD2>sesam_errormsg</KEYWORD2>
+ <KEYWORD2>sesam_execimm</KEYWORD2>
+ <KEYWORD2>sesam_fetch_array</KEYWORD2>
+ <KEYWORD2>sesam_fetch_result</KEYWORD2>
+ <KEYWORD2>sesam_fetch_row</KEYWORD2>
+ <KEYWORD2>sesam_field_array</KEYWORD2>
+ <KEYWORD2>sesam_field_name</KEYWORD2>
+ <KEYWORD2>sesam_free_result</KEYWORD2>
+ <KEYWORD2>sesam_num_fields</KEYWORD2>
+ <KEYWORD2>sesam_query</KEYWORD2>
+ <KEYWORD2>sesam_rollback</KEYWORD2>
+ <KEYWORD2>sesam_seek_row</KEYWORD2>
+ <KEYWORD2>sesam_settransaction</KEYWORD2>
+ <KEYWORD2>session_cache_expire</KEYWORD2>
+ <KEYWORD2>session_cache_limiter</KEYWORD2>
+ <KEYWORD2>session_commit</KEYWORD2>
+ <KEYWORD2>session_decode</KEYWORD2>
+ <KEYWORD2>session_destroy</KEYWORD2>
+ <KEYWORD2>session_encode</KEYWORD2>
+ <KEYWORD2>session_get_cookie_params</KEYWORD2>
+ <KEYWORD2>session_id</KEYWORD2>
+ <KEYWORD2>session_is_registered</KEYWORD2>
+ <KEYWORD2>session_module_name</KEYWORD2>
+ <KEYWORD2>session_name</KEYWORD2>
+ <KEYWORD2>session_regenerate_id</KEYWORD2>
+ <KEYWORD2>session_register</KEYWORD2>
+ <KEYWORD2>session_save_path</KEYWORD2>
+ <KEYWORD2>session_set_cookie_params</KEYWORD2>
+ <KEYWORD2>session_set_save_handler</KEYWORD2>
+ <KEYWORD2>session_start</KEYWORD2>
+ <KEYWORD2>session_unregister</KEYWORD2>
+ <KEYWORD2>session_unset</KEYWORD2>
+ <KEYWORD2>session_write_close</KEYWORD2>
+ <KEYWORD2>set</KEYWORD2> <!-- memcache -->
+ <KEYWORD2>set_attribute</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>set_content</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>set_error_handler</KEYWORD2>
+ <KEYWORD2>set_exception_handler</KEYWORD2>
+ <KEYWORD2>set_file_buffer</KEYWORD2>
+ <KEYWORD2>set_include_path</KEYWORD2>
+ <KEYWORD2>set_magic_quotes_runtime</KEYWORD2>
+ <KEYWORD2>set_name</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>set_namespace</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>set_time_limit</KEYWORD2>
+ <KEYWORD2>setaction</KEYWORD2> <!-- swfbutton -->
+ <KEYWORD2>setattribute</KEYWORD2> <!-- domelement, pdo -->
+ <KEYWORD2>setattributenode</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>setattributenodens</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>setattributens</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>setbackground</KEYWORD2> <!-- swfmovie -->
+ <KEYWORD2>setbounds</KEYWORD2> <!-- swftextfield -->
+ <KEYWORD2>setbuffering</KEYWORD2> <!-- lob -->
+ <KEYWORD2>setclass</KEYWORD2> <!-- soapserver -->
+ <KEYWORD2>setcolor</KEYWORD2> <!-- swftext, swftextfield -->
+ <KEYWORD2>setcommitedversion</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>setcookie</KEYWORD2>
+ <KEYWORD2>setdepth</KEYWORD2> <!-- swfdisplayitem -->
+ <KEYWORD2>setdimension</KEYWORD2> <!-- swfmovie -->
+ <KEYWORD2>setdown</KEYWORD2> <!-- swfbutton -->
+ <KEYWORD2>setfont</KEYWORD2> <!-- swftext, swftextfield -->
+ <KEYWORD2>setframes</KEYWORD2> <!-- swfmovie, swfsprite -->
+ <KEYWORD2>setheight</KEYWORD2> <!-- swftext, swftextfield -->
+ <KEYWORD2>sethit</KEYWORD2> <!-- swfbutton -->
+ <KEYWORD2>setindentation</KEYWORD2> <!-- swftextfield -->
+ <KEYWORD2>setleftfill</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>setleftmargin</KEYWORD2> <!-- swftextfield -->
+ <KEYWORD2>setline</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>setlinespacing</KEYWORD2> <!-- swftextfield -->
+ <KEYWORD2>setlocale</KEYWORD2>
+ <KEYWORD2>setmargins</KEYWORD2> <!-- swftextfield -->
+ <KEYWORD2>setname</KEYWORD2> <!-- swfdisplayitem, swftextfield -->
+ <KEYWORD2>setover</KEYWORD2> <!-- swfbutton -->
+ <KEYWORD2>setpersistence</KEYWORD2> <!-- soapserver -->
+ <KEYWORD2>setrate</KEYWORD2> <!-- swfmovie -->
+ <KEYWORD2>setratio</KEYWORD2> <!-- swfdisplayitem -->
+ <KEYWORD2>setrawcookie</KEYWORD2>
+ <KEYWORD2>setrightfill</KEYWORD2> <!-- swfshape -->
+ <KEYWORD2>setrightmargin</KEYWORD2> <!-- swftextfield -->
+ <KEYWORD2>setspacing</KEYWORD2> <!-- swftext -->
+ <KEYWORD2>settype</KEYWORD2>
+ <KEYWORD2>setup</KEYWORD2> <!-- swfbutton -->
+ <KEYWORD2>sha1</KEYWORD2>
+ <KEYWORD2>sha1_file</KEYWORD2>
+ <KEYWORD2>shell_exec</KEYWORD2>
+ <KEYWORD2>shm_attach</KEYWORD2>
+ <KEYWORD2>shm_detach</KEYWORD2>
+ <KEYWORD2>shm_get_var</KEYWORD2>
+ <KEYWORD2>shm_put_var</KEYWORD2>
+ <KEYWORD2>shm_remove</KEYWORD2>
+ <KEYWORD2>shm_remove_var</KEYWORD2>
+ <KEYWORD2>shmop_close</KEYWORD2>
+ <KEYWORD2>shmop_delete</KEYWORD2>
+ <KEYWORD2>shmop_open</KEYWORD2>
+ <KEYWORD2>shmop_read</KEYWORD2>
+ <KEYWORD2>shmop_size</KEYWORD2>
+ <KEYWORD2>shmop_write</KEYWORD2>
+ <KEYWORD2>show_source</KEYWORD2>
+ <KEYWORD2>shuffle</KEYWORD2>
+ <KEYWORD2>similar_text</KEYWORD2>
+ <KEYWORD2>simplexml_import_dom</KEYWORD2>
+ <KEYWORD2>simplexml_load_file</KEYWORD2>
+ <KEYWORD2>simplexml_load_string</KEYWORD2>
+ <KEYWORD2>sin</KEYWORD2>
+ <KEYWORD2>sinh</KEYWORD2>
+ <KEYWORD2>size</KEYWORD2> <!-- collection, lob -->
+ <KEYWORD2>sizeof</KEYWORD2>
+ <KEYWORD2>skewx</KEYWORD2> <!-- swfdisplayitem -->
+ <KEYWORD2>skewxto</KEYWORD2> <!-- swfdisplayitem, swffill -->
+ <KEYWORD2>skewy</KEYWORD2> <!-- swfdisplayitem -->
+ <KEYWORD2>skewyto</KEYWORD2> <!-- swfdisplayitem, swffill -->
+ <KEYWORD2>sleep</KEYWORD2>
+ <KEYWORD2>snmp_get_quick_print</KEYWORD2>
+ <KEYWORD2>snmp_get_valueretrieval</KEYWORD2>
+ <KEYWORD2>snmp_read_mib</KEYWORD2>
+ <KEYWORD2>snmp_set_enum_print</KEYWORD2>
+ <KEYWORD2>snmp_set_oid_numeric_print</KEYWORD2>
+ <KEYWORD2>snmp_set_quick_print</KEYWORD2>
+ <KEYWORD2>snmp_set_valueretrieval</KEYWORD2>
+ <KEYWORD2>snmpget</KEYWORD2>
+ <KEYWORD2>snmpgetnext</KEYWORD2>
+ <KEYWORD2>snmprealwalk</KEYWORD2>
+ <KEYWORD2>snmpset</KEYWORD2>
+ <KEYWORD2>snmpwalk</KEYWORD2>
+ <KEYWORD2>snmpwalkoid</KEYWORD2>
+ <KEYWORD2>socket_accept</KEYWORD2>
+ <KEYWORD2>socket_bind</KEYWORD2>
+ <KEYWORD2>socket_clear_error</KEYWORD2>
+ <KEYWORD2>socket_close</KEYWORD2>
+ <KEYWORD2>socket_connect</KEYWORD2>
+ <KEYWORD2>socket_create</KEYWORD2>
+ <KEYWORD2>socket_create_listen</KEYWORD2>
+ <KEYWORD2>socket_create_pair</KEYWORD2>
+ <KEYWORD2>socket_get_option</KEYWORD2>
+ <KEYWORD2>socket_get_status</KEYWORD2>
+ <KEYWORD2>socket_getpeername</KEYWORD2>
+ <KEYWORD2>socket_getsockname</KEYWORD2>
+ <KEYWORD2>socket_last_error</KEYWORD2>
+ <KEYWORD2>socket_listen</KEYWORD2>
+ <KEYWORD2>socket_read</KEYWORD2>
+ <KEYWORD2>socket_recv</KEYWORD2>
+ <KEYWORD2>socket_recvfrom</KEYWORD2>
+ <KEYWORD2>socket_select</KEYWORD2>
+ <KEYWORD2>socket_send</KEYWORD2>
+ <KEYWORD2>socket_sendto</KEYWORD2>
+ <KEYWORD2>socket_set_block</KEYWORD2>
+ <KEYWORD2>socket_set_blocking</KEYWORD2>
+ <KEYWORD2>socket_set_nonblock</KEYWORD2>
+ <KEYWORD2>socket_set_option</KEYWORD2>
+ <KEYWORD2>socket_set_timeout</KEYWORD2>
+ <KEYWORD2>socket_shutdown</KEYWORD2>
+ <KEYWORD2>socket_strerror</KEYWORD2>
+ <KEYWORD2>socket_write</KEYWORD2>
+ <KEYWORD2>sort</KEYWORD2>
+ <KEYWORD2>soundex</KEYWORD2>
+ <KEYWORD2>specified</KEYWORD2> <!-- domattribute -->
+ <KEYWORD2>spl_classes</KEYWORD2>
+ <KEYWORD2>split</KEYWORD2>
+ <KEYWORD2>spliti</KEYWORD2>
+ <KEYWORD2>splittext</KEYWORD2> <!-- domtext -->
+ <KEYWORD2>sprintf</KEYWORD2>
+ <KEYWORD2>sql_regcase</KEYWORD2>
+ <KEYWORD2>sqlite_array_query</KEYWORD2>
+ <KEYWORD2>sqlite_busy_timeout</KEYWORD2>
+ <KEYWORD2>sqlite_changes</KEYWORD2>
+ <KEYWORD2>sqlite_close</KEYWORD2>
+ <KEYWORD2>sqlite_column</KEYWORD2>
+ <KEYWORD2>sqlite_create_aggregate</KEYWORD2>
+ <KEYWORD2>sqlite_create_function</KEYWORD2>
+ <KEYWORD2>sqlite_current</KEYWORD2>
+ <KEYWORD2>sqlite_error_string</KEYWORD2>
+ <KEYWORD2>sqlite_escape_string</KEYWORD2>
+ <KEYWORD2>sqlite_exec</KEYWORD2>
+ <KEYWORD2>sqlite_factory</KEYWORD2>
+ <KEYWORD2>sqlite_fetch_all</KEYWORD2>
+ <KEYWORD2>sqlite_fetch_array</KEYWORD2>
+ <KEYWORD2>sqlite_fetch_column_types</KEYWORD2>
+ <KEYWORD2>sqlite_fetch_object</KEYWORD2>
+ <KEYWORD2>sqlite_fetch_single</KEYWORD2>
+ <KEYWORD2>sqlite_fetch_string</KEYWORD2>
+ <KEYWORD2>sqlite_field_name</KEYWORD2>
+ <KEYWORD2>sqlite_has_more</KEYWORD2>
+ <KEYWORD2>sqlite_has_prev</KEYWORD2>
+ <KEYWORD2>sqlite_last_error</KEYWORD2>
+ <KEYWORD2>sqlite_last_insert_rowid</KEYWORD2>
+ <KEYWORD2>sqlite_libencoding</KEYWORD2>
+ <KEYWORD2>sqlite_libversion</KEYWORD2>
+ <KEYWORD2>sqlite_next</KEYWORD2>
+ <KEYWORD2>sqlite_num_fields</KEYWORD2>
+ <KEYWORD2>sqlite_num_rows</KEYWORD2>
+ <KEYWORD2>sqlite_open</KEYWORD2>
+ <KEYWORD2>sqlite_popen</KEYWORD2>
+ <KEYWORD2>sqlite_prev</KEYWORD2>
+ <KEYWORD2>sqlite_query</KEYWORD2>
+ <KEYWORD2>sqlite_rewind</KEYWORD2>
+ <KEYWORD2>sqlite_seek</KEYWORD2>
+ <KEYWORD2>sqlite_single_query</KEYWORD2>
+ <KEYWORD2>sqlite_udf_decode_binary</KEYWORD2>
+ <KEYWORD2>sqlite_udf_encode_binary</KEYWORD2>
+ <KEYWORD2>sqlite_unbuffered_query</KEYWORD2>
+ <KEYWORD2>sqrt</KEYWORD2>
+ <KEYWORD2>srand</KEYWORD2>
+ <KEYWORD2>srcanchors</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>srcsofdst</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>sscanf</KEYWORD2>
+ <KEYWORD2>stat</KEYWORD2>
+ <KEYWORD2>str_ireplace</KEYWORD2>
+ <KEYWORD2>str_pad</KEYWORD2>
+ <KEYWORD2>str_repeat</KEYWORD2>
+ <KEYWORD2>str_replace</KEYWORD2>
+ <KEYWORD2>str_rot13</KEYWORD2>
+ <KEYWORD2>str_shuffle</KEYWORD2>
+ <KEYWORD2>str_split</KEYWORD2>
+ <KEYWORD2>str_word_count</KEYWORD2>
+ <KEYWORD2>strcasecmp</KEYWORD2>
+ <KEYWORD2>strchr</KEYWORD2>
+ <KEYWORD2>strcmp</KEYWORD2>
+ <KEYWORD2>strcoll</KEYWORD2>
+ <KEYWORD2>strcspn</KEYWORD2>
+ <KEYWORD2>stream_context_create</KEYWORD2>
+ <KEYWORD2>stream_context_get_default</KEYWORD2>
+ <KEYWORD2>stream_context_get_options</KEYWORD2>
+ <KEYWORD2>stream_context_set_option</KEYWORD2>
+ <KEYWORD2>stream_context_set_params</KEYWORD2>
+ <KEYWORD2>stream_copy_to_stream</KEYWORD2>
+ <KEYWORD2>stream_filter_append</KEYWORD2>
+ <KEYWORD2>stream_filter_prepend</KEYWORD2>
+ <KEYWORD2>stream_filter_register</KEYWORD2>
+ <KEYWORD2>stream_filter_remove</KEYWORD2>
+ <KEYWORD2>stream_get_contents</KEYWORD2>
+ <KEYWORD2>stream_get_filters</KEYWORD2>
+ <KEYWORD2>stream_get_line</KEYWORD2>
+ <KEYWORD2>stream_get_meta_data</KEYWORD2>
+ <KEYWORD2>stream_get_transports</KEYWORD2>
+ <KEYWORD2>stream_get_wrappers</KEYWORD2>
+ <KEYWORD2>stream_register_wrapper</KEYWORD2>
+ <KEYWORD2>stream_select</KEYWORD2>
+ <KEYWORD2>stream_set_blocking</KEYWORD2>
+ <KEYWORD2>stream_set_timeout</KEYWORD2>
+ <KEYWORD2>stream_set_write_buffer</KEYWORD2>
+ <KEYWORD2>stream_socket_accept</KEYWORD2>
+ <KEYWORD2>stream_socket_client</KEYWORD2>
+ <KEYWORD2>stream_socket_enable_crypto</KEYWORD2>
+ <KEYWORD2>stream_socket_get_name</KEYWORD2>
+ <KEYWORD2>stream_socket_recvfrom</KEYWORD2>
+ <KEYWORD2>stream_socket_sendto</KEYWORD2>
+ <KEYWORD2>stream_socket_server</KEYWORD2>
+ <KEYWORD2>stream_wrapper_register</KEYWORD2>
+ <KEYWORD2>stream_wrapper_restore</KEYWORD2>
+ <KEYWORD2>stream_wrapper_unregister</KEYWORD2>
+ <KEYWORD2>streammp3</KEYWORD2> <!-- swfmovie -->
+ <KEYWORD2>strftime</KEYWORD2>
+ <KEYWORD2>strip_tags</KEYWORD2>
+ <KEYWORD2>stripcslashes</KEYWORD2>
+ <KEYWORD2>stripos</KEYWORD2>
+ <KEYWORD2>stripslashes</KEYWORD2>
+ <KEYWORD2>stristr</KEYWORD2>
+ <KEYWORD2>strlen</KEYWORD2>
+ <KEYWORD2>strnatcasecmp</KEYWORD2>
+ <KEYWORD2>strnatcmp</KEYWORD2>
+ <KEYWORD2>strncasecmp</KEYWORD2>
+ <KEYWORD2>strncmp</KEYWORD2>
+ <KEYWORD2>strpbrk</KEYWORD2>
+ <KEYWORD2>strpos</KEYWORD2>
+ <KEYWORD2>strptime</KEYWORD2>
+ <KEYWORD2>strrchr</KEYWORD2>
+ <KEYWORD2>strrev</KEYWORD2>
+ <KEYWORD2>strripos</KEYWORD2>
+ <KEYWORD2>strrpos</KEYWORD2>
+ <KEYWORD2>strspn</KEYWORD2>
+ <KEYWORD2>strstr</KEYWORD2>
+ <KEYWORD2>strtok</KEYWORD2>
+ <KEYWORD2>strtolower</KEYWORD2>
+ <KEYWORD2>strtotime</KEYWORD2>
+ <KEYWORD2>strtoupper</KEYWORD2>
+ <KEYWORD2>strtr</KEYWORD2>
+ <KEYWORD2>strval</KEYWORD2>
+ <KEYWORD2>substr</KEYWORD2>
+ <KEYWORD2>substr_compare</KEYWORD2>
+ <KEYWORD2>substr_count</KEYWORD2>
+ <KEYWORD2>substr_replace</KEYWORD2>
+ <KEYWORD2>substringdata</KEYWORD2> <!-- domcharacterdata -->
+ <KEYWORD2>swf_actiongeturl</KEYWORD2>
+ <KEYWORD2>swf_actiongotoframe</KEYWORD2>
+ <KEYWORD2>swf_actiongotolabel</KEYWORD2>
+ <KEYWORD2>swf_actionnextframe</KEYWORD2>
+ <KEYWORD2>swf_actionplay</KEYWORD2>
+ <KEYWORD2>swf_actionprevframe</KEYWORD2>
+ <KEYWORD2>swf_actionsettarget</KEYWORD2>
+ <KEYWORD2>swf_actionstop</KEYWORD2>
+ <KEYWORD2>swf_actiontogglequality</KEYWORD2>
+ <KEYWORD2>swf_actionwaitforframe</KEYWORD2>
+ <KEYWORD2>swf_addbuttonrecord</KEYWORD2>
+ <KEYWORD2>swf_addcolor</KEYWORD2>
+ <KEYWORD2>swf_closefile</KEYWORD2>
+ <KEYWORD2>swf_definebitmap</KEYWORD2>
+ <KEYWORD2>swf_definefont</KEYWORD2>
+ <KEYWORD2>swf_defineline</KEYWORD2>
+ <KEYWORD2>swf_definepoly</KEYWORD2>
+ <KEYWORD2>swf_definerect</KEYWORD2>
+ <KEYWORD2>swf_definetext</KEYWORD2>
+ <KEYWORD2>swf_endbutton</KEYWORD2>
+ <KEYWORD2>swf_enddoaction</KEYWORD2>
+ <KEYWORD2>swf_endshape</KEYWORD2>
+ <KEYWORD2>swf_endsymbol</KEYWORD2>
+ <KEYWORD2>swf_fontsize</KEYWORD2>
+ <KEYWORD2>swf_fontslant</KEYWORD2>
+ <KEYWORD2>swf_fonttracking</KEYWORD2>
+ <KEYWORD2>swf_getbitmapinfo</KEYWORD2>
+ <KEYWORD2>swf_getfontinfo</KEYWORD2>
+ <KEYWORD2>swf_getframe</KEYWORD2>
+ <KEYWORD2>swf_labelframe</KEYWORD2>
+ <KEYWORD2>swf_lookat</KEYWORD2>
+ <KEYWORD2>swf_modifyobject</KEYWORD2>
+ <KEYWORD2>swf_mulcolor</KEYWORD2>
+ <KEYWORD2>swf_nextid</KEYWORD2>
+ <KEYWORD2>swf_oncondition</KEYWORD2>
+ <KEYWORD2>swf_openfile</KEYWORD2>
+ <KEYWORD2>swf_ortho</KEYWORD2>
+ <KEYWORD2>swf_ortho2</KEYWORD2>
+ <KEYWORD2>swf_perspective</KEYWORD2>
+ <KEYWORD2>swf_placeobject</KEYWORD2>
+ <KEYWORD2>swf_polarview</KEYWORD2>
+ <KEYWORD2>swf_popmatrix</KEYWORD2>
+ <KEYWORD2>swf_posround</KEYWORD2>
+ <KEYWORD2>swf_pushmatrix</KEYWORD2>
+ <KEYWORD2>swf_removeobject</KEYWORD2>
+ <KEYWORD2>swf_rotate</KEYWORD2>
+ <KEYWORD2>swf_scale</KEYWORD2>
+ <KEYWORD2>swf_setfont</KEYWORD2>
+ <KEYWORD2>swf_setframe</KEYWORD2>
+ <KEYWORD2>swf_shapearc</KEYWORD2>
+ <KEYWORD2>swf_shapecurveto</KEYWORD2>
+ <KEYWORD2>swf_shapecurveto3</KEYWORD2>
+ <KEYWORD2>swf_shapefillbitmapclip</KEYWORD2>
+ <KEYWORD2>swf_shapefillbitmaptile</KEYWORD2>
+ <KEYWORD2>swf_shapefilloff</KEYWORD2>
+ <KEYWORD2>swf_shapefillsolid</KEYWORD2>
+ <KEYWORD2>swf_shapelinesolid</KEYWORD2>
+ <KEYWORD2>swf_shapelineto</KEYWORD2>
+ <KEYWORD2>swf_shapemoveto</KEYWORD2>
+ <KEYWORD2>swf_showframe</KEYWORD2>
+ <KEYWORD2>swf_startbutton</KEYWORD2>
+ <KEYWORD2>swf_startdoaction</KEYWORD2>
+ <KEYWORD2>swf_startshape</KEYWORD2>
+ <KEYWORD2>swf_startsymbol</KEYWORD2>
+ <KEYWORD2>swf_textwidth</KEYWORD2>
+ <KEYWORD2>swf_translate</KEYWORD2>
+ <KEYWORD2>swf_viewport</KEYWORD2>
+ <KEYWORD2>swfbutton_keypress</KEYWORD2>
+ <KEYWORD2>sybase_affected_rows</KEYWORD2>
+ <KEYWORD2>sybase_close</KEYWORD2>
+ <KEYWORD2>sybase_connect</KEYWORD2>
+ <KEYWORD2>sybase_data_seek</KEYWORD2>
+ <KEYWORD2>sybase_deadlock_retry_count</KEYWORD2>
+ <KEYWORD2>sybase_fetch_array</KEYWORD2>
+ <KEYWORD2>sybase_fetch_assoc</KEYWORD2>
+ <KEYWORD2>sybase_fetch_field</KEYWORD2>
+ <KEYWORD2>sybase_fetch_object</KEYWORD2>
+ <KEYWORD2>sybase_fetch_row</KEYWORD2>
+ <KEYWORD2>sybase_field_seek</KEYWORD2>
+ <KEYWORD2>sybase_free_result</KEYWORD2>
+ <KEYWORD2>sybase_get_last_message</KEYWORD2>
+ <KEYWORD2>sybase_min_client_severity</KEYWORD2>
+ <KEYWORD2>sybase_min_error_severity</KEYWORD2>
+ <KEYWORD2>sybase_min_message_severity</KEYWORD2>
+ <KEYWORD2>sybase_min_server_severity</KEYWORD2>
+ <KEYWORD2>sybase_num_fields</KEYWORD2>
+ <KEYWORD2>sybase_num_rows</KEYWORD2>
+ <KEYWORD2>sybase_pconnect</KEYWORD2>
+ <KEYWORD2>sybase_query</KEYWORD2>
+ <KEYWORD2>sybase_result</KEYWORD2>
+ <KEYWORD2>sybase_select_db</KEYWORD2>
+ <KEYWORD2>sybase_set_message_handler</KEYWORD2>
+ <KEYWORD2>sybase_unbuffered_query</KEYWORD2>
+ <KEYWORD2>symlink</KEYWORD2>
+ <KEYWORD2>syslog</KEYWORD2>
+ <KEYWORD2>system</KEYWORD2>
+ <KEYWORD2>system_id</KEYWORD2> <!-- domdocumenttype -->
+ <KEYWORD2>tagname</KEYWORD2> <!-- domelement -->
+ <KEYWORD2>tan</KEYWORD2>
+ <KEYWORD2>tanh</KEYWORD2>
+ <KEYWORD2>target</KEYWORD2> <!-- domprocessinginstruction -->
+ <KEYWORD2>tcpwrap_check</KEYWORD2>
+ <KEYWORD2>tell</KEYWORD2> <!-- lob -->
+ <KEYWORD2>tempnam</KEYWORD2>
+ <KEYWORD2>textdomain</KEYWORD2>
+ <KEYWORD2>tidy_access_count</KEYWORD2>
+ <KEYWORD2>tidy_clean_repair</KEYWORD2>
+ <KEYWORD2>tidy_config_count</KEYWORD2>
+ <KEYWORD2>tidy_diagnose</KEYWORD2>
+ <KEYWORD2>tidy_error_count</KEYWORD2>
+ <KEYWORD2>tidy_get_body</KEYWORD2>
+ <KEYWORD2>tidy_get_config</KEYWORD2>
+ <KEYWORD2>tidy_get_error_buffer</KEYWORD2>
+ <KEYWORD2>tidy_get_head</KEYWORD2>
+ <KEYWORD2>tidy_get_html</KEYWORD2>
+ <KEYWORD2>tidy_get_html_ver</KEYWORD2>
+ <KEYWORD2>tidy_get_output</KEYWORD2>
+ <KEYWORD2>tidy_get_release</KEYWORD2>
+ <KEYWORD2>tidy_get_root</KEYWORD2>
+ <KEYWORD2>tidy_get_status</KEYWORD2>
+ <KEYWORD2>tidy_getopt</KEYWORD2>
+ <KEYWORD2>tidy_is_xhtml</KEYWORD2>
+ <KEYWORD2>tidy_is_xml</KEYWORD2>
+ <KEYWORD2>tidy_load_config</KEYWORD2>
+ <KEYWORD2>tidy_parse_file</KEYWORD2>
+ <KEYWORD2>tidy_parse_string</KEYWORD2>
+ <KEYWORD2>tidy_repair_file</KEYWORD2>
+ <KEYWORD2>tidy_repair_string</KEYWORD2>
+ <KEYWORD2>tidy_reset_config</KEYWORD2>
+ <KEYWORD2>tidy_save_config</KEYWORD2>
+ <KEYWORD2>tidy_set_encoding</KEYWORD2>
+ <KEYWORD2>tidy_setopt</KEYWORD2>
+ <KEYWORD2>tidy_warning_count</KEYWORD2>
+ <KEYWORD2>time</KEYWORD2>
+ <KEYWORD2>time_nanosleep</KEYWORD2>
+ <KEYWORD2>title</KEYWORD2> <!-- hw_api_object -->
+ <KEYWORD2>tmpfile</KEYWORD2>
+ <KEYWORD2>token_get_all</KEYWORD2>
+ <KEYWORD2>token_name</KEYWORD2>
+ <KEYWORD2>touch</KEYWORD2>
+ <KEYWORD2>trigger_error</KEYWORD2>
+ <KEYWORD2>trim</KEYWORD2> <!-- collection -->
+ <KEYWORD2>truncate</KEYWORD2> <!-- lob -->
+ <KEYWORD2>type</KEYWORD2> <!-- hw_api_reason -->
+ <KEYWORD2>uasort</KEYWORD2>
+ <KEYWORD2>ucfirst</KEYWORD2>
+ <KEYWORD2>ucwords</KEYWORD2>
+ <KEYWORD2>udm_add_search_limit</KEYWORD2>
+ <KEYWORD2>udm_alloc_agent</KEYWORD2>
+ <KEYWORD2>udm_alloc_agent_array</KEYWORD2>
+ <KEYWORD2>udm_api_version</KEYWORD2>
+ <KEYWORD2>udm_cat_list</KEYWORD2>
+ <KEYWORD2>udm_cat_path</KEYWORD2>
+ <KEYWORD2>udm_check_charset</KEYWORD2>
+ <KEYWORD2>udm_check_stored</KEYWORD2>
+ <KEYWORD2>udm_clear_search_limits</KEYWORD2>
+ <KEYWORD2>udm_close_stored</KEYWORD2>
+ <KEYWORD2>udm_crc32</KEYWORD2>
+ <KEYWORD2>udm_errno</KEYWORD2>
+ <KEYWORD2>udm_error</KEYWORD2>
+ <KEYWORD2>udm_find</KEYWORD2>
+ <KEYWORD2>udm_free_agent</KEYWORD2>
+ <KEYWORD2>udm_free_ispell_data</KEYWORD2>
+ <KEYWORD2>udm_free_res</KEYWORD2>
+ <KEYWORD2>udm_get_doc_count</KEYWORD2>
+ <KEYWORD2>udm_get_res_field</KEYWORD2>
+ <KEYWORD2>udm_get_res_param</KEYWORD2>
+ <KEYWORD2>udm_hash32</KEYWORD2>
+ <KEYWORD2>udm_load_ispell_data</KEYWORD2>
+ <KEYWORD2>udm_open_stored</KEYWORD2>
+ <KEYWORD2>udm_set_agent_param</KEYWORD2>
+ <KEYWORD2>uksort</KEYWORD2>
+ <KEYWORD2>umask</KEYWORD2>
+ <KEYWORD2>uniqid</KEYWORD2>
+ <KEYWORD2>unixtojd</KEYWORD2>
+ <KEYWORD2>unlink</KEYWORD2>
+ <KEYWORD2>unlink_node</KEYWORD2> <!-- domnode -->
+ <KEYWORD2>unlock</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>unpack</KEYWORD2>
+ <KEYWORD2>unregister_tick_function</KEYWORD2>
+ <KEYWORD2>unserialize</KEYWORD2>
+ <KEYWORD2>urldecode</KEYWORD2>
+ <KEYWORD2>urlencode</KEYWORD2>
+ <KEYWORD2>user</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>user_error</KEYWORD2>
+ <KEYWORD2>userlist</KEYWORD2> <!-- hw_api -->
+ <KEYWORD2>usleep</KEYWORD2>
+ <KEYWORD2>usort</KEYWORD2>
+ <KEYWORD2>utf8_decode</KEYWORD2>
+ <KEYWORD2>utf8_encode</KEYWORD2>
+ <KEYWORD2>valid</KEYWORD2> <!-- arrayiterator, cachingiterator, directoryiterator, filteriterator, limititerator, recursiveiteratoriterator, simplexmliterator -->
+ <KEYWORD2>validate</KEYWORD2> <!-- domdocument -->
+ <KEYWORD2>value</KEYWORD2> <!-- domattribute, hw_api_attribute, hw_api_object -->
+ <KEYWORD2>values</KEYWORD2> <!-- hw_api_attribute -->
+ <KEYWORD2>var_dump</KEYWORD2>
+ <KEYWORD2>var_export</KEYWORD2>
+ <KEYWORD2>variant_abs</KEYWORD2>
+ <KEYWORD2>variant_add</KEYWORD2>
+ <KEYWORD2>variant_and</KEYWORD2>
+ <KEYWORD2>variant_cast</KEYWORD2>
+ <KEYWORD2>variant_cat</KEYWORD2>
+ <KEYWORD2>variant_cmp</KEYWORD2>
+ <KEYWORD2>variant_date_from_timestamp</KEYWORD2>
+ <KEYWORD2>variant_date_to_timestamp</KEYWORD2>
+ <KEYWORD2>variant_div</KEYWORD2>
+ <KEYWORD2>variant_eqv</KEYWORD2>
+ <KEYWORD2>variant_fix</KEYWORD2>
+ <KEYWORD2>variant_get_type</KEYWORD2>
+ <KEYWORD2>variant_idiv</KEYWORD2>
+ <KEYWORD2>variant_imp</KEYWORD2>
+ <KEYWORD2>variant_int</KEYWORD2>
+ <KEYWORD2>variant_mod</KEYWORD2>
+ <KEYWORD2>variant_mul</KEYWORD2>
+ <KEYWORD2>variant_neg</KEYWORD2>
+ <KEYWORD2>variant_not</KEYWORD2>
+ <KEYWORD2>variant_or</KEYWORD2>
+ <KEYWORD2>variant_pow</KEYWORD2>
+ <KEYWORD2>variant_round</KEYWORD2>
+ <KEYWORD2>variant_set</KEYWORD2>
+ <KEYWORD2>variant_set_type</KEYWORD2>
+ <KEYWORD2>variant_sub</KEYWORD2>
+ <KEYWORD2>variant_xor</KEYWORD2>
+ <KEYWORD2>version_compare</KEYWORD2>
+ <KEYWORD2>vfprintf</KEYWORD2>
+ <KEYWORD2>virtual</KEYWORD2>
+ <KEYWORD2>vpopmail_add_alias_domain</KEYWORD2>
+ <KEYWORD2>vpopmail_add_alias_domain_ex</KEYWORD2>
+ <KEYWORD2>vpopmail_add_domain</KEYWORD2>
+ <KEYWORD2>vpopmail_add_domain_ex</KEYWORD2>
+ <KEYWORD2>vpopmail_add_user</KEYWORD2>
+ <KEYWORD2>vpopmail_alias_add</KEYWORD2>
+ <KEYWORD2>vpopmail_alias_del</KEYWORD2>
+ <KEYWORD2>vpopmail_alias_del_domain</KEYWORD2>
+ <KEYWORD2>vpopmail_alias_get</KEYWORD2>
+ <KEYWORD2>vpopmail_alias_get_all</KEYWORD2>
+ <KEYWORD2>vpopmail_auth_user</KEYWORD2>
+ <KEYWORD2>vpopmail_del_domain</KEYWORD2>
+ <KEYWORD2>vpopmail_del_domain_ex</KEYWORD2>
+ <KEYWORD2>vpopmail_del_user</KEYWORD2>
+ <KEYWORD2>vpopmail_error</KEYWORD2>
+ <KEYWORD2>vpopmail_passwd</KEYWORD2>
+ <KEYWORD2>vpopmail_set_user_quota</KEYWORD2>
+ <KEYWORD2>vprintf</KEYWORD2>
+ <KEYWORD2>vsprintf</KEYWORD2>
+ <KEYWORD2>w32api_deftype</KEYWORD2>
+ <KEYWORD2>w32api_init_dtype</KEYWORD2>
+ <KEYWORD2>w32api_invoke_function</KEYWORD2>
+ <KEYWORD2>w32api_register_function</KEYWORD2>
+ <KEYWORD2>w32api_set_call_method</KEYWORD2>
+ <KEYWORD2>wddx_add_vars</KEYWORD2>
+ <KEYWORD2>wddx_deserialize</KEYWORD2>
+ <KEYWORD2>wddx_packet_end</KEYWORD2>
+ <KEYWORD2>wddx_packet_start</KEYWORD2>
+ <KEYWORD2>wddx_serialize_value</KEYWORD2>
+ <KEYWORD2>wddx_serialize_vars</KEYWORD2>
+ <KEYWORD2>wordwrap</KEYWORD2>
+ <KEYWORD2>write</KEYWORD2> <!-- lob -->
+ <KEYWORD2>writetemporary</KEYWORD2> <!-- lob -->
+ <KEYWORD2>xattr_get</KEYWORD2>
+ <KEYWORD2>xattr_list</KEYWORD2>
+ <KEYWORD2>xattr_remove</KEYWORD2>
+ <KEYWORD2>xattr_set</KEYWORD2>
+ <KEYWORD2>xattr_supported</KEYWORD2>
+ <KEYWORD2>xdiff_file_diff</KEYWORD2>
+ <KEYWORD2>xdiff_file_diff_binary</KEYWORD2>
+ <KEYWORD2>xdiff_file_merge3</KEYWORD2>
+ <KEYWORD2>xdiff_file_patch</KEYWORD2>
+ <KEYWORD2>xdiff_file_patch_binary</KEYWORD2>
+ <KEYWORD2>xdiff_string_diff</KEYWORD2>
+ <KEYWORD2>xdiff_string_diff_binary</KEYWORD2>
+ <KEYWORD2>xdiff_string_merge3</KEYWORD2>
+ <KEYWORD2>xdiff_string_patch</KEYWORD2>
+ <KEYWORD2>xdiff_string_patch_binary</KEYWORD2>
+ <KEYWORD2>xinclude</KEYWORD2> <!-- domdocument, domdocument -->
+ <KEYWORD2>xml_error_string</KEYWORD2>
+ <KEYWORD2>xml_get_current_byte_index</KEYWORD2>
+ <KEYWORD2>xml_get_current_column_number</KEYWORD2>
+ <KEYWORD2>xml_get_current_line_number</KEYWORD2>
+ <KEYWORD2>xml_get_error_code</KEYWORD2>
+ <KEYWORD2>xml_parse</KEYWORD2>
+ <KEYWORD2>xml_parse_into_struct</KEYWORD2>
+ <KEYWORD2>xml_parser_create</KEYWORD2>
+ <KEYWORD2>xml_parser_create_ns</KEYWORD2>
+ <KEYWORD2>xml_parser_free</KEYWORD2>
+ <KEYWORD2>xml_parser_get_option</KEYWORD2>
+ <KEYWORD2>xml_parser_set_option</KEYWORD2>
+ <KEYWORD2>xml_set_character_data_handler</KEYWORD2>
+ <KEYWORD2>xml_set_default_handler</KEYWORD2>
+ <KEYWORD2>xml_set_element_handler</KEYWORD2>
+ <KEYWORD2>xml_set_end_namespace_decl_handler</KEYWORD2>
+ <KEYWORD2>xml_set_external_entity_ref_handler</KEYWORD2>
+ <KEYWORD2>xml_set_notation_decl_handler</KEYWORD2>
+ <KEYWORD2>xml_set_object</KEYWORD2>
+ <KEYWORD2>xml_set_processing_instruction_handler</KEYWORD2>
+ <KEYWORD2>xml_set_start_namespace_decl_handler</KEYWORD2>
+ <KEYWORD2>xml_set_unparsed_entity_decl_handler</KEYWORD2>
+ <KEYWORD2>xmlrpc_decode</KEYWORD2>
+ <KEYWORD2>xmlrpc_decode_request</KEYWORD2>
+ <KEYWORD2>xmlrpc_encode</KEYWORD2>
+ <KEYWORD2>xmlrpc_encode_request</KEYWORD2>
+ <KEYWORD2>xmlrpc_get_type</KEYWORD2>
+ <KEYWORD2>xmlrpc_is_fault</KEYWORD2>
+ <KEYWORD2>xmlrpc_parse_method_descriptions</KEYWORD2>
+ <KEYWORD2>xmlrpc_server_add_introspection_data</KEYWORD2>
+ <KEYWORD2>xmlrpc_server_call_method</KEYWORD2>
+ <KEYWORD2>xmlrpc_server_create</KEYWORD2>
+ <KEYWORD2>xmlrpc_server_destroy</KEYWORD2>
+ <KEYWORD2>xmlrpc_server_register_introspection_callback</KEYWORD2>
+ <KEYWORD2>xmlrpc_server_register_method</KEYWORD2>
+ <KEYWORD2>xmlrpc_set_type</KEYWORD2>
+ <KEYWORD2>xpath</KEYWORD2> <!-- simplexmlelement -->
+ <KEYWORD2>xpath_eval</KEYWORD2>
+ <KEYWORD2>xpath_eval_expression</KEYWORD2>
+ <KEYWORD2>xpath_new_context</KEYWORD2>
+ <KEYWORD2>xptr_eval</KEYWORD2>
+ <KEYWORD2>xptr_new_context</KEYWORD2>
+ <KEYWORD2>xsl_xsltprocessor_get_parameter</KEYWORD2>
+ <KEYWORD2>xsl_xsltprocessor_has_exslt_support</KEYWORD2>
+ <KEYWORD2>xsl_xsltprocessor_import_stylesheet</KEYWORD2>
+ <KEYWORD2>xsl_xsltprocessor_register_php_functions</KEYWORD2>
+ <KEYWORD2>xsl_xsltprocessor_remove_parameter</KEYWORD2>
+ <KEYWORD2>xsl_xsltprocessor_set_parameter</KEYWORD2>
+ <KEYWORD2>xsl_xsltprocessor_transform_to_doc</KEYWORD2>
+ <KEYWORD2>xsl_xsltprocessor_transform_to_uri</KEYWORD2>
+ <KEYWORD2>xsl_xsltprocessor_transform_to_xml</KEYWORD2>
+ <KEYWORD2>xslt_backend_info</KEYWORD2>
+ <KEYWORD2>xslt_backend_name</KEYWORD2>
+ <KEYWORD2>xslt_backend_version</KEYWORD2>
+ <KEYWORD2>xslt_create</KEYWORD2>
+ <KEYWORD2>xslt_errno</KEYWORD2>
+ <KEYWORD2>xslt_error</KEYWORD2>
+ <KEYWORD2>xslt_free</KEYWORD2>
+ <KEYWORD2>xslt_getopt</KEYWORD2>
+ <KEYWORD2>xslt_process</KEYWORD2>
+ <KEYWORD2>xslt_set_base</KEYWORD2>
+ <KEYWORD2>xslt_set_encoding</KEYWORD2>
+ <KEYWORD2>xslt_set_error_handler</KEYWORD2>
+ <KEYWORD2>xslt_set_log</KEYWORD2>
+ <KEYWORD2>xslt_set_object</KEYWORD2>
+ <KEYWORD2>xslt_set_sax_handler</KEYWORD2>
+ <KEYWORD2>xslt_set_sax_handlers</KEYWORD2>
+ <KEYWORD2>xslt_set_scheme_handler</KEYWORD2>
+ <KEYWORD2>xslt_set_scheme_handlers</KEYWORD2>
+ <KEYWORD2>xslt_setopt</KEYWORD2>
+ <KEYWORD2>yaz_addinfo</KEYWORD2>
+ <KEYWORD2>yaz_ccl_conf</KEYWORD2>
+ <KEYWORD2>yaz_ccl_parse</KEYWORD2>
+ <KEYWORD2>yaz_close</KEYWORD2>
+ <KEYWORD2>yaz_connect</KEYWORD2>
+ <KEYWORD2>yaz_database</KEYWORD2>
+ <KEYWORD2>yaz_element</KEYWORD2>
+ <KEYWORD2>yaz_errno</KEYWORD2>
+ <KEYWORD2>yaz_error</KEYWORD2>
+ <KEYWORD2>yaz_es_result</KEYWORD2>
+ <KEYWORD2>yaz_get_option</KEYWORD2>
+ <KEYWORD2>yaz_hits</KEYWORD2>
+ <KEYWORD2>yaz_itemorder</KEYWORD2>
+ <KEYWORD2>yaz_present</KEYWORD2>
+ <KEYWORD2>yaz_range</KEYWORD2>
+ <KEYWORD2>yaz_record</KEYWORD2>
+ <KEYWORD2>yaz_scan</KEYWORD2>
+ <KEYWORD2>yaz_scan_result</KEYWORD2>
+ <KEYWORD2>yaz_schema</KEYWORD2>
+ <KEYWORD2>yaz_search</KEYWORD2>
+ <KEYWORD2>yaz_set_option</KEYWORD2>
+ <KEYWORD2>yaz_sort</KEYWORD2>
+ <KEYWORD2>yaz_syntax</KEYWORD2>
+ <KEYWORD2>yaz_wait</KEYWORD2>
+ <KEYWORD2>yp_all</KEYWORD2>
+ <KEYWORD2>yp_cat</KEYWORD2>
+ <KEYWORD2>yp_err_string</KEYWORD2>
+ <KEYWORD2>yp_errno</KEYWORD2>
+ <KEYWORD2>yp_first</KEYWORD2>
+ <KEYWORD2>yp_get_default_domain</KEYWORD2>
+ <KEYWORD2>yp_master</KEYWORD2>
+ <KEYWORD2>yp_match</KEYWORD2>
+ <KEYWORD2>yp_next</KEYWORD2>
+ <KEYWORD2>yp_order</KEYWORD2>
+ <KEYWORD2>zend_logo_guid</KEYWORD2>
+ <KEYWORD2>zend_version</KEYWORD2>
+ <KEYWORD2>zip_close</KEYWORD2>
+ <KEYWORD2>zip_entry_close</KEYWORD2>
+ <KEYWORD2>zip_entry_compressedsize</KEYWORD2>
+ <KEYWORD2>zip_entry_compressionmethod</KEYWORD2>
+ <KEYWORD2>zip_entry_filesize</KEYWORD2>
+ <KEYWORD2>zip_entry_name</KEYWORD2>
+ <KEYWORD2>zip_entry_open</KEYWORD2>
+ <KEYWORD2>zip_entry_read</KEYWORD2>
+ <KEYWORD2>zip_open</KEYWORD2>
+ <KEYWORD2>zip_read</KEYWORD2>
+ <KEYWORD2>zlib_get_coding_type</KEYWORD2>
+
+
+ <!-- Alias functions (343)
+ http://zend.com/phpfunc/all_aliases.php -->
+ <KEYWORD2>apache_request_headers</KEYWORD2>
+ <KEYWORD2>apache_response_headers</KEYWORD2>
+ <KEYWORD2>attr_get</KEYWORD2>
+ <KEYWORD2>attr_set</KEYWORD2>
+ <KEYWORD2>autocommit</KEYWORD2>
+ <KEYWORD2>bind_param</KEYWORD2>
+ <KEYWORD2>bind_result</KEYWORD2>
+ <KEYWORD2>bzclose</KEYWORD2>
+ <KEYWORD2>bzflush</KEYWORD2>
+ <KEYWORD2>bzwrite</KEYWORD2>
+ <KEYWORD2>change_user</KEYWORD2>
+ <KEYWORD2>character_set_name</KEYWORD2>
+ <KEYWORD2>checkdnsrr</KEYWORD2>
+ <KEYWORD2>chop</KEYWORD2>
+ <KEYWORD2>client_encoding</KEYWORD2>
+ <KEYWORD2>close</KEYWORD2>
+ <KEYWORD2>commit</KEYWORD2>
+ <KEYWORD2>connect</KEYWORD2>
+ <KEYWORD2>data_seek</KEYWORD2>
+ <KEYWORD2>debug</KEYWORD2>
+ <KEYWORD2>disable_reads_from_master</KEYWORD2>
+ <KEYWORD2>disable_rpl_parse</KEYWORD2>
+ <KEYWORD2>diskfreespace</KEYWORD2>
+ <KEYWORD2>doubleval</KEYWORD2>
+ <KEYWORD2>dump_debug_info</KEYWORD2>
+ <KEYWORD2>enable_reads_from_master</KEYWORD2>
+ <KEYWORD2>enable_rpl_parse</KEYWORD2>
+ <KEYWORD2>escape_string</KEYWORD2>
+ <KEYWORD2>execute</KEYWORD2>
+ <KEYWORD2>fbird_add_user</KEYWORD2>
+ <KEYWORD2>fbird_affected_rows</KEYWORD2>
+ <KEYWORD2>fbird_backup</KEYWORD2>
+ <KEYWORD2>fbird_blob_add</KEYWORD2>
+ <KEYWORD2>fbird_blob_cancel</KEYWORD2>
+ <KEYWORD2>fbird_blob_close</KEYWORD2>
+ <KEYWORD2>fbird_blob_create</KEYWORD2>
+ <KEYWORD2>fbird_blob_echo</KEYWORD2>
+ <KEYWORD2>fbird_blob_get</KEYWORD2>
+ <KEYWORD2>fbird_blob_import</KEYWORD2>
+ <KEYWORD2>fbird_blob_info</KEYWORD2>
+ <KEYWORD2>fbird_blob_open</KEYWORD2>
+ <KEYWORD2>fbird_close</KEYWORD2>
+ <KEYWORD2>fbird_commit</KEYWORD2>
+ <KEYWORD2>fbird_commit_ret</KEYWORD2>
+ <KEYWORD2>fbird_connect</KEYWORD2>
+ <KEYWORD2>fbird_db_info</KEYWORD2>
+ <KEYWORD2>fbird_delete_user</KEYWORD2>
+ <KEYWORD2>fbird_drop_db</KEYWORD2>
+ <KEYWORD2>fbird_errcode</KEYWORD2>
+ <KEYWORD2>fbird_errmsg</KEYWORD2>
+ <KEYWORD2>fbird_execute</KEYWORD2>
+ <KEYWORD2>fbird_fetch_assoc</KEYWORD2>
+ <KEYWORD2>fbird_fetch_object</KEYWORD2>
+ <KEYWORD2>fbird_fetch_row</KEYWORD2>
+ <KEYWORD2>fbird_field_info</KEYWORD2>
+ <KEYWORD2>fbird_free_event_handler</KEYWORD2>
+ <KEYWORD2>fbird_free_query</KEYWORD2>
+ <KEYWORD2>fbird_free_result</KEYWORD2>
+ <KEYWORD2>fbird_gen_id</KEYWORD2>
+ <KEYWORD2>fbird_maintain_db</KEYWORD2>
+ <KEYWORD2>fbird_modify_user</KEYWORD2>
+ <KEYWORD2>fbird_name_result</KEYWORD2>
+ <KEYWORD2>fbird_num_fields</KEYWORD2>
+ <KEYWORD2>fbird_num_params</KEYWORD2>
+ <KEYWORD2>fbird_num_rows</KEYWORD2>
+ <KEYWORD2>fbird_param_info</KEYWORD2>
+ <KEYWORD2>fbird_pconnect</KEYWORD2>
+ <KEYWORD2>fbird_prepare</KEYWORD2>
+ <KEYWORD2>fbird_query</KEYWORD2>
+ <KEYWORD2>fbird_restore</KEYWORD2>
+ <KEYWORD2>fbird_rollback</KEYWORD2>
+ <KEYWORD2>fbird_rollback_ret</KEYWORD2>
+ <KEYWORD2>fbird_server_info</KEYWORD2>
+ <KEYWORD2>fbird_service_attach</KEYWORD2>
+ <KEYWORD2>fbird_service_detach</KEYWORD2>
+ <KEYWORD2>fbird_set_event_handler</KEYWORD2>
+ <KEYWORD2>fbird_trans</KEYWORD2>
+ <KEYWORD2>fbird_wait_event</KEYWORD2>
+ <KEYWORD2>fbsql</KEYWORD2>
+ <KEYWORD2>fbsql_tablename</KEYWORD2>
+ <KEYWORD2>fetch</KEYWORD2>
+ <KEYWORD2>fetch_array</KEYWORD2>
+ <KEYWORD2>fetch_assoc</KEYWORD2>
+ <KEYWORD2>fetch_field</KEYWORD2>
+ <KEYWORD2>fetch_field_direct</KEYWORD2>
+ <KEYWORD2>fetch_fields</KEYWORD2>
+ <KEYWORD2>fetch_object</KEYWORD2>
+ <KEYWORD2>fetch_row</KEYWORD2>
+ <KEYWORD2>field_count</KEYWORD2>
+ <KEYWORD2>field_seek</KEYWORD2>
+ <KEYWORD2>fputs</KEYWORD2>
+ <KEYWORD2>free</KEYWORD2>
+ <KEYWORD2>free_result</KEYWORD2>
+ <KEYWORD2>ftp_quit</KEYWORD2>
+ <KEYWORD2>get_client_info</KEYWORD2>
+ <KEYWORD2>get_required_files</KEYWORD2>
+ <KEYWORD2>get_server_info</KEYWORD2>
+ <KEYWORD2>getallheaders</KEYWORD2>
+ <KEYWORD2>getmxrr</KEYWORD2>
+ <KEYWORD2>gmp_div</KEYWORD2>
+ <KEYWORD2>gzclose</KEYWORD2>
+ <KEYWORD2>gzeof</KEYWORD2>
+ <KEYWORD2>gzgetc</KEYWORD2>
+ <KEYWORD2>gzgets</KEYWORD2>
+ <KEYWORD2>gzgetss</KEYWORD2>
+ <KEYWORD2>gzpassthru</KEYWORD2>
+ <KEYWORD2>gzputs</KEYWORD2>
+ <KEYWORD2>gzread</KEYWORD2>
+ <KEYWORD2>gzrewind</KEYWORD2>
+ <KEYWORD2>gzseek</KEYWORD2>
+ <KEYWORD2>gztell</KEYWORD2>
+ <KEYWORD2>gzwrite</KEYWORD2>
+ <KEYWORD2>imap_create</KEYWORD2>
+ <KEYWORD2>imap_fetchtext</KEYWORD2>
+ <KEYWORD2>imap_header</KEYWORD2>
+ <KEYWORD2>imap_listmailbox</KEYWORD2>
+ <KEYWORD2>imap_listsubscribed</KEYWORD2>
+ <KEYWORD2>imap_rename</KEYWORD2>
+ <KEYWORD2>ini_alter</KEYWORD2>
+ <KEYWORD2>init</KEYWORD2>
+ <KEYWORD2>is_double</KEYWORD2>
+ <KEYWORD2>is_int</KEYWORD2>
+ <KEYWORD2>is_integer</KEYWORD2>
+ <KEYWORD2>is_real</KEYWORD2>
+ <KEYWORD2>is_writeable</KEYWORD2>
+ <KEYWORD2>join</KEYWORD2>
+ <KEYWORD2>key_exists</KEYWORD2>
+ <KEYWORD2>kill</KEYWORD2>
+ <KEYWORD2>ldap_close</KEYWORD2>
+ <KEYWORD2>ldap_modify</KEYWORD2>
+ <KEYWORD2>magic_quotes_runtime</KEYWORD2>
+ <KEYWORD2>master_query</KEYWORD2>
+ <KEYWORD2>ming_keypress</KEYWORD2>
+ <KEYWORD2>ming_setcubicthreshold</KEYWORD2>
+ <KEYWORD2>ming_setscale</KEYWORD2>
+ <KEYWORD2>ming_useconstants</KEYWORD2>
+ <KEYWORD2>ming_useswfversion</KEYWORD2>
+ <KEYWORD2>more_results</KEYWORD2>
+ <KEYWORD2>msql</KEYWORD2>
+ <KEYWORD2>msql_affected_rows</KEYWORD2>
+ <KEYWORD2>msql_createdb</KEYWORD2>
+ <KEYWORD2>msql_dbname</KEYWORD2>
+ <KEYWORD2>msql_dropdb</KEYWORD2>
+ <KEYWORD2>msql_fieldflags</KEYWORD2>
+ <KEYWORD2>msql_fieldlen</KEYWORD2>
+ <KEYWORD2>msql_fieldname</KEYWORD2>
+ <KEYWORD2>msql_fieldtable</KEYWORD2>
+ <KEYWORD2>msql_fieldtype</KEYWORD2>
+ <KEYWORD2>msql_freeresult</KEYWORD2>
+ <KEYWORD2>msql_listdbs</KEYWORD2>
+ <KEYWORD2>msql_listfields</KEYWORD2>
+ <KEYWORD2>msql_listtables</KEYWORD2>
+ <KEYWORD2>msql_numfields</KEYWORD2>
+ <KEYWORD2>msql_numrows</KEYWORD2>
+ <KEYWORD2>msql_regcase</KEYWORD2>
+ <KEYWORD2>msql_selectdb</KEYWORD2>
+ <KEYWORD2>msql_tablename</KEYWORD2>
+ <KEYWORD2>mssql_affected_rows</KEYWORD2>
+ <KEYWORD2>mssql_close</KEYWORD2>
+ <KEYWORD2>mssql_connect</KEYWORD2>
+ <KEYWORD2>mssql_data_seek</KEYWORD2>
+ <KEYWORD2>mssql_deadlock_retry_count</KEYWORD2>
+ <KEYWORD2>mssql_fetch_array</KEYWORD2>
+ <KEYWORD2>mssql_fetch_assoc</KEYWORD2>
+ <KEYWORD2>mssql_fetch_field</KEYWORD2>
+ <KEYWORD2>mssql_fetch_object</KEYWORD2>
+ <KEYWORD2>mssql_fetch_row</KEYWORD2>
+ <KEYWORD2>mssql_field_seek</KEYWORD2>
+ <KEYWORD2>mssql_free_result</KEYWORD2>
+ <KEYWORD2>mssql_get_last_message</KEYWORD2>
+ <KEYWORD2>mssql_min_client_severity</KEYWORD2>
+ <KEYWORD2>mssql_min_error_severity</KEYWORD2>
+ <KEYWORD2>mssql_min_message_severity</KEYWORD2>
+ <KEYWORD2>mssql_min_server_severity</KEYWORD2>
+ <KEYWORD2>mssql_num_fields</KEYWORD2>
+ <KEYWORD2>mssql_num_rows</KEYWORD2>
+ <KEYWORD2>mssql_pconnect</KEYWORD2>
+ <KEYWORD2>mssql_query</KEYWORD2>
+ <KEYWORD2>mssql_result</KEYWORD2>
+ <KEYWORD2>mssql_select_db</KEYWORD2>
+ <KEYWORD2>mssql_set_message_handler</KEYWORD2>
+ <KEYWORD2>mssql_unbuffered_query</KEYWORD2>
+ <KEYWORD2>multi_query</KEYWORD2>
+ <KEYWORD2>mysql</KEYWORD2>
+ <KEYWORD2>mysql_createdb</KEYWORD2>
+ <KEYWORD2>mysql_db_name</KEYWORD2>
+ <KEYWORD2>mysql_dbname</KEYWORD2>
+ <KEYWORD2>mysql_dropdb</KEYWORD2>
+ <KEYWORD2>mysql_fieldflags</KEYWORD2>
+ <KEYWORD2>mysql_fieldlen</KEYWORD2>
+ <KEYWORD2>mysql_fieldname</KEYWORD2>
+ <KEYWORD2>mysql_fieldtable</KEYWORD2>
+ <KEYWORD2>mysql_fieldtype</KEYWORD2>
+ <KEYWORD2>mysql_freeresult</KEYWORD2>
+ <KEYWORD2>mysql_listdbs</KEYWORD2>
+ <KEYWORD2>mysql_listfields</KEYWORD2>
+ <KEYWORD2>mysql_listtables</KEYWORD2>
+ <KEYWORD2>mysql_numfields</KEYWORD2>
+ <KEYWORD2>mysql_numrows</KEYWORD2>
+ <KEYWORD2>mysql_selectdb</KEYWORD2>
+ <KEYWORD2>mysql_table_name</KEYWORD2>
+ <KEYWORD2>mysql_tablename</KEYWORD2>
+ <KEYWORD2>mysqli</KEYWORD2>
+ <KEYWORD2>mysqli_execute</KEYWORD2>
+ <KEYWORD2>mysqli_fetch</KEYWORD2>
+ <KEYWORD2>mysqli_set_opt</KEYWORD2>
+ <KEYWORD2>next_result</KEYWORD2>
+ <KEYWORD2>num_rows</KEYWORD2>
+ <KEYWORD2>oci_free_cursor</KEYWORD2>
+ <KEYWORD2>ocibindbyname</KEYWORD2>
+ <KEYWORD2>ocicancel</KEYWORD2>
+ <KEYWORD2>ocicollappend</KEYWORD2>
+ <KEYWORD2>ocicollassignelem</KEYWORD2>
+ <KEYWORD2>ocicollgetelem</KEYWORD2>
+ <KEYWORD2>ocicollmax</KEYWORD2>
+ <KEYWORD2>ocicollsize</KEYWORD2>
+ <KEYWORD2>ocicolltrim</KEYWORD2>
+ <KEYWORD2>ocicolumnisnull</KEYWORD2>
+ <KEYWORD2>ocicolumnname</KEYWORD2>
+ <KEYWORD2>ocicolumnprecision</KEYWORD2>
+ <KEYWORD2>ocicolumnscale</KEYWORD2>
+ <KEYWORD2>ocicolumnsize</KEYWORD2>
+ <KEYWORD2>ocicolumntype</KEYWORD2>
+ <KEYWORD2>ocicolumntyperaw</KEYWORD2>
+ <KEYWORD2>ocicommit</KEYWORD2>
+ <KEYWORD2>ocidefinebyname</KEYWORD2>
+ <KEYWORD2>ocierror</KEYWORD2>
+ <KEYWORD2>ociexecute</KEYWORD2>
+ <KEYWORD2>ocifetch</KEYWORD2>
+ <KEYWORD2>ocifetchstatement</KEYWORD2>
+ <KEYWORD2>ocifreecollection</KEYWORD2>
+ <KEYWORD2>ocifreecursor</KEYWORD2>
+ <KEYWORD2>ocifreedesc</KEYWORD2>
+ <KEYWORD2>ocifreestatement</KEYWORD2>
+ <KEYWORD2>ociinternaldebug</KEYWORD2>
+ <KEYWORD2>ociloadlob</KEYWORD2>
+ <KEYWORD2>ocilogoff</KEYWORD2>
+ <KEYWORD2>ocilogon</KEYWORD2>
+ <KEYWORD2>ocinewcollection</KEYWORD2>
+ <KEYWORD2>ocinewcursor</KEYWORD2>
+ <KEYWORD2>ocinewdescriptor</KEYWORD2>
+ <KEYWORD2>ocinlogon</KEYWORD2>
+ <KEYWORD2>ocinumcols</KEYWORD2>
+ <KEYWORD2>ociparse</KEYWORD2>
+ <KEYWORD2>ocipasswordchange</KEYWORD2>
+ <KEYWORD2>ociplogon</KEYWORD2>
+ <KEYWORD2>ociresult</KEYWORD2>
+ <KEYWORD2>ocirollback</KEYWORD2>
+ <KEYWORD2>ocirowcount</KEYWORD2>
+ <KEYWORD2>ocisavelob</KEYWORD2>
+ <KEYWORD2>ocisavelobfile</KEYWORD2>
+ <KEYWORD2>ociserverversion</KEYWORD2>
+ <KEYWORD2>ocisetprefetch</KEYWORD2>
+ <KEYWORD2>ocistatementtype</KEYWORD2>
+ <KEYWORD2>ociwritelobtofile</KEYWORD2>
+ <KEYWORD2>odbc_do</KEYWORD2>
+ <KEYWORD2>odbc_field_precision</KEYWORD2>
+ <KEYWORD2>openssl_free_key</KEYWORD2>
+ <KEYWORD2>openssl_get_privatekey</KEYWORD2>
+ <KEYWORD2>openssl_get_publickey</KEYWORD2>
+ <KEYWORD2>options</KEYWORD2>
+ <KEYWORD2>pg_clientencoding</KEYWORD2>
+ <KEYWORD2>pg_cmdtuples</KEYWORD2>
+ <KEYWORD2>pg_errormessage</KEYWORD2>
+ <KEYWORD2>pg_exec</KEYWORD2>
+ <KEYWORD2>pg_fieldisnull</KEYWORD2>
+ <KEYWORD2>pg_fieldname</KEYWORD2>
+ <KEYWORD2>pg_fieldnum</KEYWORD2>
+ <KEYWORD2>pg_fieldprtlen</KEYWORD2>
+ <KEYWORD2>pg_fieldsize</KEYWORD2>
+ <KEYWORD2>pg_fieldtype</KEYWORD2>
+ <KEYWORD2>pg_freeresult</KEYWORD2>
+ <KEYWORD2>pg_getlastoid</KEYWORD2>
+ <KEYWORD2>pg_loclose</KEYWORD2>
+ <KEYWORD2>pg_locreate</KEYWORD2>
+ <KEYWORD2>pg_loexport</KEYWORD2>
+ <KEYWORD2>pg_loimport</KEYWORD2>
+ <KEYWORD2>pg_loopen</KEYWORD2>
+ <KEYWORD2>pg_loread</KEYWORD2>
+ <KEYWORD2>pg_loreadall</KEYWORD2>
+ <KEYWORD2>pg_lounlink</KEYWORD2>
+ <KEYWORD2>pg_lowrite</KEYWORD2>
+ <KEYWORD2>pg_numfields</KEYWORD2>
+ <KEYWORD2>pg_numrows</KEYWORD2>
+ <KEYWORD2>pg_result</KEYWORD2>
+ <KEYWORD2>pg_setclientencoding</KEYWORD2>
+ <KEYWORD2>ping</KEYWORD2>
+ <KEYWORD2>pos</KEYWORD2>
+ <KEYWORD2>posix_errno</KEYWORD2>
+ <KEYWORD2>prepare</KEYWORD2>
+ <KEYWORD2>query</KEYWORD2>
+ <KEYWORD2>read_exif_data</KEYWORD2>
+ <KEYWORD2>real_connect</KEYWORD2>
+ <KEYWORD2>real_escape_string</KEYWORD2>
+ <KEYWORD2>real_query</KEYWORD2>
+ <KEYWORD2>recode</KEYWORD2>
+ <KEYWORD2>reset</KEYWORD2>
+ <KEYWORD2>result_metadata</KEYWORD2>
+ <KEYWORD2>rollback</KEYWORD2>
+ <KEYWORD2>rpl_parse_enabled</KEYWORD2>
+ <KEYWORD2>rpl_probe</KEYWORD2>
+ <KEYWORD2>rpl_query_type</KEYWORD2>
+ <KEYWORD2>select_db</KEYWORD2>
+ <KEYWORD2>send_long_data</KEYWORD2>
+ <KEYWORD2>session_commit</KEYWORD2>
+ <KEYWORD2>set_file_buffer</KEYWORD2>
+ <KEYWORD2>set_local_infile_default</KEYWORD2>
+ <KEYWORD2>set_local_infile_handler</KEYWORD2>
+ <KEYWORD2>set_opt</KEYWORD2>
+ <KEYWORD2>show_source</KEYWORD2>
+ <KEYWORD2>sizeof</KEYWORD2>
+ <KEYWORD2>slave_query</KEYWORD2>
+ <KEYWORD2>snmpwalkoid</KEYWORD2>
+ <KEYWORD2>socket_get_status</KEYWORD2>
+ <KEYWORD2>socket_getopt</KEYWORD2>
+ <KEYWORD2>socket_set_blocking</KEYWORD2>
+ <KEYWORD2>socket_set_timeout</KEYWORD2>
+ <KEYWORD2>socket_setopt</KEYWORD2>
+ <KEYWORD2>sqlite_fetch_string</KEYWORD2>
+ <KEYWORD2>sqlite_has_more</KEYWORD2>
+ <KEYWORD2>ssl_set</KEYWORD2>
+ <KEYWORD2>stat</KEYWORD2>
+ <KEYWORD2>stmt</KEYWORD2>
+ <KEYWORD2>stmt_init</KEYWORD2>
+ <KEYWORD2>store_result</KEYWORD2>
+ <KEYWORD2>strchr</KEYWORD2>
+ <KEYWORD2>stream_register_wrapper</KEYWORD2>
+ <KEYWORD2>thread_safe</KEYWORD2>
+ <KEYWORD2>use_result</KEYWORD2>
+ <KEYWORD2>user_error</KEYWORD2>
+ <KEYWORD2>velocis_autocommit</KEYWORD2>
+ <KEYWORD2>velocis_close</KEYWORD2>
+ <KEYWORD2>velocis_commit</KEYWORD2>
+ <KEYWORD2>velocis_connect</KEYWORD2>
+ <KEYWORD2>velocis_exec</KEYWORD2>
+ <KEYWORD2>velocis_fetch</KEYWORD2>
+ <KEYWORD2>velocis_fieldname</KEYWORD2>
+ <KEYWORD2>velocis_fieldnum</KEYWORD2>
+ <KEYWORD2>velocis_freeresult</KEYWORD2>
+ <KEYWORD2>velocis_off_autocommit</KEYWORD2>
+ <KEYWORD2>velocis_result</KEYWORD2>
+ <KEYWORD2>velocis_rollback</KEYWORD2>
+ <KEYWORD2>virtual</KEYWORD2>
+
+
+ <!-- Language constructs (69)
+ http://www.php.net/manual/en/reserved.php -->
+ <KEYWORD1>__CLASS__</KEYWORD1>
+ <KEYWORD1>__DIR__</KEYWORD1>
+ <KEYWORD1>__FILE__</KEYWORD1>
+ <KEYWORD1>__FUNCTION__</KEYWORD1>
+ <KEYWORD1>__LINE__</KEYWORD1>
+ <KEYWORD1>__METHOD__</KEYWORD1>
+ <KEYWORD1>__NAMESPACE__</KEYWORD1>
+ <KEYWORD1>abstract</KEYWORD1>
+ <OPERATOR>and</OPERATOR>
+ <KEYWORD1>array</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>cfunction</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>clone</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>declare</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>die</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>echo</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>elseif</KEYWORD1>
+ <KEYWORD1>empty</KEYWORD1>
+ <KEYWORD1>enddeclare</KEYWORD1>
+ <KEYWORD1>endfor</KEYWORD1>
+ <KEYWORD1>endforeach</KEYWORD1>
+ <KEYWORD1>endif</KEYWORD1>
+ <KEYWORD1>endswitch</KEYWORD1>
+ <KEYWORD1>endwhile</KEYWORD1>
+ <KEYWORD1>eval</KEYWORD1>
+ <KEYWORD1>exception</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>false</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>foreach</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>global</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+ <KEYWORD1>include</KEYWORD1>
+ <KEYWORD1>include_once</KEYWORD1>
+ <KEYWORD1>instanceof</KEYWORD1>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD1>isset</KEYWORD1>
+ <KEYWORD1>list</KEYWORD1>
+ <KEYWORD1>namespace</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>null</KEYWORD1>
+ <KEYWORD1>old_function</KEYWORD1>
+ <OPERATOR>or</OPERATOR>
+ <KEYWORD1>php_user_filter</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>require</KEYWORD1>
+ <KEYWORD1>require_once</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>true</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>unset</KEYWORD1>
+ <KEYWORD1>use</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <OPERATOR>xor</OPERATOR>
+ <!-- end: generated by buildfunctionlist.php -->
+ <!-- }}} -->
+
+ <!-- xdebug functions -->
+ <!-- {{{ -->
+ <KEYWORD2>xdebug_break</KEYWORD2>
+ <KEYWORD2>xdebug_call_class</KEYWORD2>
+ <KEYWORD2>xdebug_call_file</KEYWORD2>
+ <KEYWORD2>xdebug_call_function</KEYWORD2>
+ <KEYWORD2>xdebug_call_line</KEYWORD2>
+ <KEYWORD2>xdebug_disable</KEYWORD2>
+ <KEYWORD2>xdebug_dump_function_profile</KEYWORD2><!-- version 1 only -->
+ <KEYWORD2>xdebug_dump_function_trace</KEYWORD2><!-- version 1 only -->
+ <KEYWORD2>xdebug_dump_superglobals</KEYWORD2>
+ <KEYWORD2>xdebug_enable</KEYWORD2>
+ <KEYWORD2>xdebug_get_code_coverage</KEYWORD2>
+ <KEYWORD2>xdebug_get_function_count</KEYWORD2>
+ <KEYWORD2>xdebug_get_function_profile</KEYWORD2><!-- version 1 only -->
+ <KEYWORD2>xdebug_get_function_stack</KEYWORD2>
+ <KEYWORD2>xdebug_get_function_trace</KEYWORD2><!-- version 1 only -->
+ <KEYWORD2>xdebug_get_stack_depth</KEYWORD2>
+ <KEYWORD2>xdebug_is_enabled</KEYWORD2>
+ <KEYWORD2>xdebug_memory_usage</KEYWORD2>
+ <KEYWORD2>xdebug_peak_memory_usage</KEYWORD2>
+ <KEYWORD2>xdebug_print_function_stack</KEYWORD2>
+ <KEYWORD2>xdebug_start_code_coverage</KEYWORD2>
+ <KEYWORD2>xdebug_start_profiling</KEYWORD2><!-- version 1 only -->
+ <KEYWORD2>xdebug_start_trace</KEYWORD2><!-- version 1 only -->
+ <KEYWORD2>xdebug_stop_code_coverage</KEYWORD2>
+ <KEYWORD2>xdebug_stop_profiling</KEYWORD2><!-- version 1 only -->
+ <KEYWORD2>xdebug_stop_trace</KEYWORD2><!-- version 1 only -->
+ <KEYWORD2>xdebug_time_index</KEYWORD2>
+ <KEYWORD2>xdebug_var_dump</KEYWORD2>
+ <!-- }}} -->
+
+ <!-- Basic SimpleTest methods -->
+ <!-- {{{ -->
+ <KEYWORD2>assertCopy</KEYWORD2>
+ <KEYWORD2>assertEqual</KEYWORD2>
+ <KEYWORD2>assertError</KEYWORD2>
+ <KEYWORD2>assertErrorPattern</KEYWORD2>
+ <KEYWORD2>assertFalse</KEYWORD2>
+ <KEYWORD2>assertIdentical</KEYWORD2>
+ <KEYWORD2>assertIsA</KEYWORD2>
+ <KEYWORD2>assertNoErrors</KEYWORD2>
+ <KEYWORD2>assertNoUnwantedPattern</KEYWORD2>
+ <KEYWORD2>assertNotA</KEYWORD2>
+ <KEYWORD2>assertNotEqual</KEYWORD2>
+ <KEYWORD2>assertNotIdentical</KEYWORD2>
+ <KEYWORD2>assertNotNull</KEYWORD2>
+ <KEYWORD2>assertNull</KEYWORD2>
+ <KEYWORD2>assertReference</KEYWORD2>
+ <KEYWORD2>assertTrue</KEYWORD2>
+ <KEYWORD2>assertWantedPattern</KEYWORD2>
+
+ <KEYWORD2>setReturnValue</KEYWORD2>
+ <KEYWORD2>setReturnValueAt</KEYWORD2>
+ <KEYWORD2>setReturnReference</KEYWORD2>
+ <KEYWORD2>setReturnReferenceAt</KEYWORD2>
+ <KEYWORD2>expectArguments</KEYWORD2>
+ <KEYWORD2>expectArgumentsAt</KEYWORD2>
+ <KEYWORD2>expectCallCount</KEYWORD2>
+ <KEYWORD2>expectMaximumCallCount</KEYWORD2>
+ <KEYWORD2>expectMinimumCallCount</KEYWORD2>
+ <KEYWORD2>expectNever</KEYWORD2>
+ <KEYWORD2>expectOnce</KEYWORD2>
+ <KEYWORD2>expectAtLeastOnce</KEYWORD2>
+ <KEYWORD2>tally</KEYWORD2>
+
+ <KEYWORD2>dump</KEYWORD2>
+ <KEYWORD2>error</KEYWORD2>
+ <KEYWORD2>fail</KEYWORD2>
+ <KEYWORD2>pass</KEYWORD2>
+ <KEYWORD2>sendMessage</KEYWORD2>
+ <KEYWORD2>setUp</KEYWORD2>
+ <KEYWORD2>signal</KEYWORD2>
+ <KEYWORD2>swallowErrors</KEYWORD2>
+ <KEYWORD2>tearDown</KEYWORD2>
+ <!-- }}} -->
+
+ <!-- more magical functions -->
+ <KEYWORD2>__autoload</KEYWORD2>
+ <KEYWORD2>__destruct</KEYWORD2>
+ <KEYWORD2>__get</KEYWORD2>
+ <KEYWORD2>__set</KEYWORD2>
+ <KEYWORD2>__sleep</KEYWORD2>
+ <KEYWORD2>__wakeup</KEYWORD2>
+
+ <!-- more constructs -->
+ <KEYWORD4>parent</KEYWORD4>
+ <KEYWORD4>self</KEYWORD4>
+ <KEYWORD4>stdClass</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+
+
+ <RULES SET="KEYWORDS_VISIBILITY">
+ <KEYWORDS>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+
+
+ <!-- Javascript -->
+ <RULES SET="JAVASCRIPT_OPENTAG" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="JAVASCRIPT">></SEQ>
+ <IMPORT DELEGATE="TO_LITERAL+PHP"/> <!-- handle PHP in <script> tag -->
+ <IMPORT DELEGATE="html::TAGS" /> <!-- handle e.g. 'style="width:1px"' -->
+ </RULES>
+
+
+ <!-- Handle literals, but allow switching to PHP therein, e.g. from html TAGS -->
+ <RULES SET="TO_LITERAL+PHP">
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL1+PHP">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="LITERAL2+PHP">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <IMPORT DELEGATE="TO_PHP"/>
+ </RULES>
+
+
+ <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" ESCAPE="\">
+ <IMPORT DELEGATE="TO_LITERAL+PHP"/>
+ <IMPORT DELEGATE="TO_PHP"/>
+ <IMPORT DELEGATE="javascript::MAIN"/>
+ </RULES>
+
+
+ <!-- Handle PHP tags in LITERAL1, e.g. in the "type" attribute of a <SCRIPT> tag -->
+ <RULES SET="LITERAL1+PHP" DEFAULT="LITERAL1" ESCAPE="\">
+ <IMPORT DELEGATE="TO_PHP"/>
+ </RULES>
+
+
+ <!-- Handle PHP tags in LITERAL2, e.g. in the "type" attribute of a <SCRIPT> tag -->
+ <RULES SET="LITERAL2+PHP" DEFAULT="LITERAL2" ESCAPE="\">
+ <IMPORT DELEGATE="TO_PHP"/>
+ </RULES>
+
+
+ <!-- Handle PHP tags in comments -->
+ <RULES SET="COMMENT1+PHP" DEFAULT="COMMENT1">
+ <IMPORT DELEGATE="TO_PHP"/>
+ </RULES>
+
+
+ <!-- Go to PHP mode again -->
+ <RULES SET="TO_PHP" DEFAULT="MARKUP">
+ <SPAN TYPE="MARKUP" DELEGATE="PHP">
+ <BEGIN><?php</BEGIN>
+ <END>?></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="PHP">
+ <BEGIN><?</BEGIN>
+ <END>?></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="PHP">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+
+
+ <!-- Extended label block, also uses "|" as seperator -->
+ <RULES SET="PHPDOC_LABEL_BLOCK_EXTENDED" DEFAULT="COMMENT3"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
+ <SEQ TYPE="OPERATOR">|</SEQ>
+
+ <!-- Delegate back (gets not caught from PHPDOC_LABEL_BLOCK): -->
+ <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS" />
+ <IMPORT DELEGATE="PHPDOC_LABEL_BLOCK" />
+
+ <IMPORT DELEGATE="PHPDOC_LABEL_KEYWORDS" />
+ <IMPORT DELEGATE="PHPDOC" />
+ <IMPORT DELEGATE="PHPDOC_VAR" />
+ <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
+ </RULES>
+
+ <!-- A block after a label tag like "@see" -->
+ <RULES SET="PHPDOC_LABEL_BLOCK" DEFAULT="COMMENT3"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
+
+ <!-- Delegate back -->
+ <!-- <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS" /> -->
+
+ <SEQ TYPE="COMMENT3" DELEGATE="PHPDOC">*/</SEQ>
+
+ <MARK_PREVIOUS TYPE="FUNCTION">()</MARK_PREVIOUS>
+
+ <IMPORT DELEGATE="PHPDOC_LABEL_KEYWORDS" />
+ <IMPORT DELEGATE="PHPDOC" />
+ <IMPORT DELEGATE="PHPDOC_VAR" />
+ <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
+ <IMPORT DELEGATE="PHP_TYPES" />
+ </RULES>
+
+
+ <!-- A block after @access -->
+ <RULES SET="PHPDOC_LABEL_BLOCK_ACCESS" DEFAULT="COMMENT3"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
+ <IMPORT DELEGATE="KEYWORDS_VISIBILITY" />
+
+ <!-- Delegate back: -->
+ <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS"/>
+ </RULES>
+
+
+ <RULES SET="PHPDOC_BLOCK" DEFAULT="COMMENT3"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
+ <!-- highlight function/method name as token type FUNCTION -->
+ <MARK_PREVIOUS TYPE="FUNCTION">()</MARK_PREVIOUS>
+
+ <!-- Delegate back: -->
+ <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS"/>
+ <IMPORT DELEGATE="PHPDOC"/>
+ <IMPORT DELEGATE="PHPDOC_VAR"/>
+ </RULES>
+
+
+ <!-- Helper for class references in rule PHPDOC -->
+ <RULES SET="OBJECT_PHPDOC">
+ <SPAN TYPE="OPERATOR" DELEGATE="PHP">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ <SEQ_REGEXP TYPE="FUNCTION" HASH_CHAR="->" DELEGATE="PHPDOC">->\w+\s*(?=\()</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="OBJECT_PHPDOC">->\w+(?=(\[[\s\w'"]+\])?->)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="->" DELEGATE="PHPDOC">->\w*</SEQ_REGEXP>
+
+ <IMPORT DELEGATE="PHP_KEYWORDS" />
+ </RULES>
+
+
+ <!-- Almost like PHP_VAR - but with another delegate -->
+ <RULES SET="PHPDOC_VAR">
+ <!-- (Class-)Variables -->
+ <SEQ_REGEXP TYPE="KEYWORD4" HASH_CHAR="$" DELEGATE="OBJECT_PHPDOC">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=(\[[\s\w'"]+\])?->)</SEQ_REGEXP>
+
+ <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
+
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD4">[\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?=\s*=\s*(&\s*)?new)</SEQ_REGEXP>
+
+ <!-- Normal variables -->
+ <IMPORT DELEGATE="PHP_VAR" />
+ </RULES>
+
+
+ <!-- phpdoc / phpDocumentor label tags -->
+ <RULES SET="PHPDOC_LABEL_KEYWORDS">
+ <!-- {{{
+ Some (@global, @param, ..) are here just for complete-word -->
+ <KEYWORDS>
+ <LABEL>@abstract</LABEL>
+ <LABEL>@access</LABEL>
+ <LABEL>@author</LABEL>
+ <LABEL>@category</LABEL>
+ <LABEL>@const</LABEL>
+ <LABEL>@constant</LABEL>
+ <LABEL>@copyright</LABEL>
+ <LABEL>@deprecated</LABEL>
+ <LABEL>@example</LABEL>
+ <LABEL>@filesource</LABEL>
+ <LABEL>@final</LABEL>
+ <LABEL>@global</LABEL>
+ <LABEL>@ignore</LABEL>
+ <LABEL>@internal</LABEL>
+ <LABEL>@license</LABEL>
+ <LABEL>@link</LABEL>
+ <LABEL>@name</LABEL>
+ <LABEL>@package</LABEL>
+ <LABEL>@param</LABEL>
+ <LABEL>@return</LABEL>
+ <LABEL>@see</LABEL>
+ <LABEL>@since</LABEL>
+ <LABEL>@static</LABEL>
+ <LABEL>@staticvar</LABEL>
+ <LABEL>@subpackage</LABEL>
+ <LABEL>@throws</LABEL>
+ <LABEL>@todo</LABEL>
+ <LABEL>@tutorial</LABEL>
+ <LABEL>@uses</LABEL>
+ <LABEL>@var</LABEL>
+ <LABEL>@version</LABEL>
+ </KEYWORDS>
+ <!-- }}} -->
+ </RULES>
+
+
+ <!-- Delegate to PHPDOC_LABEL_BLOCK[_EXTENDED|_ACCESS] or back to PHPDOC -->
+ <RULES SET="PHPDOC_DELEGATE_LABEL_BLOCKS" DEFAULT="COMMENT3">
+ <!-- Delegate empty line (just an asterisk) back to PHPDOC -->
+ <SEQ_REGEXP TYPE="COMMENT3" AT_WHITESPACE_END="TRUE" DELEGATE="PHPDOC" HASH_CHAR="*">\*\s*$</SEQ_REGEXP>
+
+ <SEQ_REGEXP TYPE="LABEL" HASH_CHAR="@"
+ DELEGATE="PHPDOC_LABEL_BLOCK_EXTENDED">@(global|param|return|staticvar|var|throws)</SEQ_REGEXP>
+
+ <SEQ_REGEXP TYPE="LABEL" HASH_CHAR="@"
+ DELEGATE="PHPDOC_LABEL_BLOCK">@(deprecated|see|uses)</SEQ_REGEXP>
+
+ <SEQ TYPE="LABEL" DELEGATE="PHPDOC_LABEL_BLOCK_ACCESS">@access</SEQ>
+
+ <!-- Delegate the remaining phpdoc tags back to PHPDOC_BLOCK: -->
+ <SEQ_REGEXP TYPE="LABEL" HASH_CHAR="@"
+ DELEGATE="PHPDOC_BLOCK">@(abstract|author|category|const|constant|copyright|example|filesource|final|ignore|internal|license|link|name|package|since|static|subpackage|todo|tutorial|version)</SEQ_REGEXP>
+ </RULES>
+
+
+ <!-- The main phpdoc rules -->
+ <RULES SET="PHPDOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[0-9a-f]+|([0-9]*\.)?[0-9]+(e[+-]?[0-9]+)?)">
+ <!-- HTML comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="PHPDOC_BLOCK">
+ <BEGIN>{@internal</BEGIN>
+ <END>}}</END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="PHPDOC_BLOCK">
+ <BEGIN>{@link</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- PHPdoc allows this -->
+ <SEQ TYPE="COMMENT3"><<</SEQ>
+ <SEQ TYPE="COMMENT3"><=</SEQ>
+ <SEQ TYPE="COMMENT3">< </SEQ>
+
+ <SPAN DELEGATE="PHP" TYPE="MARKUP">
+ <BEGIN><code></BEGIN>
+ <END></code></END>
+ </SPAN>
+
+ <!-- Imports: -->
+ <IMPORT DELEGATE="PHPDOC_DELEGATE_LABEL_BLOCKS" />
+ <IMPORT DELEGATE="PHPDOC_LABEL_KEYWORDS" />
+ <IMPORT DELEGATE="PHPDOC_VAR" />
+ <IMPORT DELEGATE="PHP_BASIC_KEYWORD1" />
+ </RULES>
+
+
+ <RULES SET="INVALID_LT" DEFAULT="INVALID">
+ <SEQ TYPE="INVALID"><</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/pike.xml b/jEdit/modes/pike.xml
index fa50f3e..9147bad 100644
--- a/jEdit/modes/pike.xml
+++ b/jEdit/modes/pike.xml
@@ -1,242 +1,242 @@
-<?xml version="1.0"?>
-
-<!-- Pike mode, contributed by
- Marco G?tze, <gomar at gmx.net> -->
-<!-- Small fixes and autodoc support contributed by
- Peter Lundqvist <peterl at update.uu.se> -->
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*"/>
- <PROPERTY NAME="commentEnd" VALUE="*/"/>
- <PROPERTY NAME="lineComment" VALUE="//"/>
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*`"/>
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{"/>
- <PROPERTY NAME="indentCloseBrackets" VALUE="}"/>
- <PROPERTY NAME="indentNextLine" VALUE="\s*(((if|(for(each)?)|while|catch|gauge)\s*\(|(do|else)\s*|else\s+if\s*\()[^{;]*)"/>
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false"/>
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[\p{XDigit}]+|[\p{Digit}]+|0[bB][01]+)[lLdDfF]?">
-
- <!-- comments -->
- <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <SEQ TYPE="INVALID">*/</SEQ>
-
- <!-- Autodoc comment -->
- <EOL_SPAN TYPE="COMMENT1" DELEGATE="AUTODOC">//!</EOL_SPAN>
- <!-- C++ line comment -->
- <EOL_SPAN TYPE="COMMENT1" DELEGATE="COMMENT">//</EOL_SPAN>
-
- <!-- string, char literals -->
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING_LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" DELEGATE="STRING_LITERAL">
- <BEGIN>#"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- preprocessor statements -->
- <SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="#" AT_LINE_START="TRUE">#.*?(?=($|/\*|//))</SEQ_REGEXP>
-
- <!-- operators -->
- <SEQ TYPE="OPERATOR">({</SEQ>
- <SEQ TYPE="OPERATOR">})</SEQ>
- <SEQ TYPE="OPERATOR">([</SEQ>
- <SEQ TYPE="OPERATOR">])</SEQ>
- <SEQ TYPE="OPERATOR">(<</SEQ>
- <SEQ TYPE="OPERATOR">>)</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">`</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
-
- <!-- function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <!-- type modifiers -->
- <KEYWORD1>constant</KEYWORD1>
- <KEYWORD1>extern</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>inline</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>nomask</KEYWORD1>
- <KEYWORD1>optional</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>variant</KEYWORD1>
-
- <!-- types -->
- <KEYWORD3>array</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>function</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>mapping</KEYWORD3>
- <KEYWORD3>mixed</KEYWORD3>
- <KEYWORD3>multiset</KEYWORD3>
- <KEYWORD3>object</KEYWORD3>
- <KEYWORD3>program</KEYWORD3>
- <KEYWORD3>string</KEYWORD3>
- <KEYWORD3>void</KEYWORD3>
-
- <!-- flow control and block-introducing keywords -->
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>foreach</KEYWORD1>
- <KEYWORD1>gauge</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>lambda</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>sscanf</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <!-- special instructions -->
- <KEYWORD2>import</KEYWORD2>
- <KEYWORD2>inherit</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="COMMENT" IGNORE_CASE="FALSE" DEFAULT="COMMENT1">
- <KEYWORDS>
- <COMMENT2>FIXME</COMMENT2>
- <COMMENT2>XXX</COMMENT2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="AUTODOC" IGNORE_CASE="TRUE" DEFAULT="COMMENT1">
-
- <EOL_SPAN TYPE="NULL" DELEGATE="MAIN" MATCH_TYPE="CONTEXT">@decl</EOL_SPAN>
-
- <!-- XML tags -->
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
- <BEGIN>@xml{</BEGIN>
- <END>@}</END>
- </SPAN>
- <!-- Cross references -->
- <SPAN TYPE="FUNCTION" NO_LINE_BREAK="TRUE">
- <BEGIN>@[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Brace keywords -->
- <SEQ_REGEXP TYPE="FUNCTION" HASH_CHAR="@">@(b|i|u|tt|url|pre|ref|code|expr|image)?(\{.*@\})</SEQ_REGEXP>
-
- <!-- Attempt to get syntax highlighting of @decl-ed functions
- inside of the autodoc-rule.
-
- It works - but jEdit 4.1 has problems keeping it highlighted
- (the syntax highlighting works depending on how you travel
- past the @decl-ed region).
- Can't figure aout how to to proper coloring of the @decl
- keyword either.
-
- If there are problems with what regions are highlighted -
- try to uncomment this first.
- -->
- <EOL_SPAN TYPE="NULL" DELEGATE="MAIN">@decl</EOL_SPAN>
-
- <KEYWORDS>
- <!-- Meta keywords -->
- <LABEL>@appears</LABEL>
- <LABEL>@belongs</LABEL>
- <LABEL>@class</LABEL>
- <LABEL>@endclass</LABEL>
- <LABEL>@example</LABEL>
- <LABEL>@module</LABEL>
- <LABEL>@endmodule</LABEL>
- <LABEL>@namespace</LABEL>
- <LABEL>@endnamespace</LABEL>
- <!-- <LABEL>@decl</LABEL>
- -->
-
- <!-- Single keywords -->
- <LABEL>@deprecated</LABEL>
-
- <!-- Delimiter keywords -->
- <LABEL>@note</LABEL>
- <LABEL>@example</LABEL>
- <LABEL>@bugs</LABEL>
- <LABEL>@returns</LABEL>
- <LABEL>@throws</LABEL>
- <LABEL>@param</LABEL>
- <LABEL>@seealso</LABEL>
- <LABEL>@fixme</LABEL>
- <LABEL>@constant</LABEL>
- <LABEL>@member</LABEL>
- <LABEL>@index</LABEL>
- <LABEL>@elem</LABEL>
- <LABEL>@value</LABEL>
- <LABEL>@type</LABEL>
- <LABEL>@item</LABEL>
-
- <!-- Container keywords -->
- <LABEL>@section</LABEL>
- <LABEL>@mapping</LABEL>
- <LABEL>@endmapping</LABEL>
- <LABEL>@multiset</LABEL>
- <LABEL>@endmultiset</LABEL>
- <LABEL>@array</LABEL>
- <LABEL>@endarray</LABEL>
- <LABEL>@int</LABEL>
- <LABEL>@endint</LABEL>
- <LABEL>@string</LABEL>
- <LABEL>@endstring</LABEL>
- <LABEL>@mixed</LABEL>
- <LABEL>@endmixed</LABEL>
- <LABEL>@dl</LABEL>
- <LABEL>@enddl</LABEL>
- <LABEL>@ol</LABEL>
- <LABEL>@endol</LABEL>
- <LABEL>@ul</LABEL>
- <LABEL>@endol</LABEL>
-
- <!-- Special keywords -->
- <LABEL>@ignore</LABEL>
- <LABEL>@endignore</LABEL>
-
- </KEYWORDS>
-
- </RULES>
-
- <RULES SET="STRING_LITERAL" ESCAPE="\" IGNORE_CASE="TRUE" DEFAULT="LITERAL1">
- <SEQ_REGEXP TYPE="LITERAL2" HASH_CHAR="%">%([^ a-z]*[a-z]|\[[^\]]*\])</SEQ_REGEXP>
- <SEQ TYPE="COMMENT2">DEBUG:</SEQ>
- </RULES>
+<?xml version="1.0"?>
+
+<!-- Pike mode, contributed by
+ Marco G?tze, <gomar at gmx.net> -->
+<!-- Small fixes and autodoc support contributed by
+ Peter Lundqvist <peterl at update.uu.se> -->
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*"/>
+ <PROPERTY NAME="commentEnd" VALUE="*/"/>
+ <PROPERTY NAME="lineComment" VALUE="//"/>
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*`"/>
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{"/>
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}"/>
+ <PROPERTY NAME="indentNextLine" VALUE="\s*(((if|(for(each)?)|while|catch|gauge)\s*\(|(do|else)\s*|else\s+if\s*\()[^{;]*)"/>
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false"/>
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[\p{XDigit}]+|[\p{Digit}]+|0[bB][01]+)[lLdDfF]?">
+
+ <!-- comments -->
+ <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <SEQ TYPE="INVALID">*/</SEQ>
+
+ <!-- Autodoc comment -->
+ <EOL_SPAN TYPE="COMMENT1" DELEGATE="AUTODOC">//!</EOL_SPAN>
+ <!-- C++ line comment -->
+ <EOL_SPAN TYPE="COMMENT1" DELEGATE="COMMENT">//</EOL_SPAN>
+
+ <!-- string, char literals -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING_LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="STRING_LITERAL">
+ <BEGIN>#"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- preprocessor statements -->
+ <SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="#" AT_LINE_START="TRUE">#.*?(?=($|/\*|//))</SEQ_REGEXP>
+
+ <!-- operators -->
+ <SEQ TYPE="OPERATOR">({</SEQ>
+ <SEQ TYPE="OPERATOR">})</SEQ>
+ <SEQ TYPE="OPERATOR">([</SEQ>
+ <SEQ TYPE="OPERATOR">])</SEQ>
+ <SEQ TYPE="OPERATOR">(<</SEQ>
+ <SEQ TYPE="OPERATOR">>)</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">`</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+
+ <!-- function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <!-- type modifiers -->
+ <KEYWORD1>constant</KEYWORD1>
+ <KEYWORD1>extern</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>inline</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>nomask</KEYWORD1>
+ <KEYWORD1>optional</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>variant</KEYWORD1>
+
+ <!-- types -->
+ <KEYWORD3>array</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>function</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>mapping</KEYWORD3>
+ <KEYWORD3>mixed</KEYWORD3>
+ <KEYWORD3>multiset</KEYWORD3>
+ <KEYWORD3>object</KEYWORD3>
+ <KEYWORD3>program</KEYWORD3>
+ <KEYWORD3>string</KEYWORD3>
+ <KEYWORD3>void</KEYWORD3>
+
+ <!-- flow control and block-introducing keywords -->
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>foreach</KEYWORD1>
+ <KEYWORD1>gauge</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>lambda</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>sscanf</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <!-- special instructions -->
+ <KEYWORD2>import</KEYWORD2>
+ <KEYWORD2>inherit</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="COMMENT" IGNORE_CASE="FALSE" DEFAULT="COMMENT1">
+ <KEYWORDS>
+ <COMMENT2>FIXME</COMMENT2>
+ <COMMENT2>XXX</COMMENT2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="AUTODOC" IGNORE_CASE="TRUE" DEFAULT="COMMENT1">
+
+ <EOL_SPAN TYPE="NULL" DELEGATE="MAIN" MATCH_TYPE="CONTEXT">@decl</EOL_SPAN>
+
+ <!-- XML tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
+ <BEGIN>@xml{</BEGIN>
+ <END>@}</END>
+ </SPAN>
+ <!-- Cross references -->
+ <SPAN TYPE="FUNCTION" NO_LINE_BREAK="TRUE">
+ <BEGIN>@[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Brace keywords -->
+ <SEQ_REGEXP TYPE="FUNCTION" HASH_CHAR="@">@(b|i|u|tt|url|pre|ref|code|expr|image)?(\{.*@\})</SEQ_REGEXP>
+
+ <!-- Attempt to get syntax highlighting of @decl-ed functions
+ inside of the autodoc-rule.
+
+ It works - but jEdit 4.1 has problems keeping it highlighted
+ (the syntax highlighting works depending on how you travel
+ past the @decl-ed region).
+ Can't figure aout how to to proper coloring of the @decl
+ keyword either.
+
+ If there are problems with what regions are highlighted -
+ try to uncomment this first.
+ -->
+ <EOL_SPAN TYPE="NULL" DELEGATE="MAIN">@decl</EOL_SPAN>
+
+ <KEYWORDS>
+ <!-- Meta keywords -->
+ <LABEL>@appears</LABEL>
+ <LABEL>@belongs</LABEL>
+ <LABEL>@class</LABEL>
+ <LABEL>@endclass</LABEL>
+ <LABEL>@example</LABEL>
+ <LABEL>@module</LABEL>
+ <LABEL>@endmodule</LABEL>
+ <LABEL>@namespace</LABEL>
+ <LABEL>@endnamespace</LABEL>
+ <!-- <LABEL>@decl</LABEL>
+ -->
+
+ <!-- Single keywords -->
+ <LABEL>@deprecated</LABEL>
+
+ <!-- Delimiter keywords -->
+ <LABEL>@note</LABEL>
+ <LABEL>@example</LABEL>
+ <LABEL>@bugs</LABEL>
+ <LABEL>@returns</LABEL>
+ <LABEL>@throws</LABEL>
+ <LABEL>@param</LABEL>
+ <LABEL>@seealso</LABEL>
+ <LABEL>@fixme</LABEL>
+ <LABEL>@constant</LABEL>
+ <LABEL>@member</LABEL>
+ <LABEL>@index</LABEL>
+ <LABEL>@elem</LABEL>
+ <LABEL>@value</LABEL>
+ <LABEL>@type</LABEL>
+ <LABEL>@item</LABEL>
+
+ <!-- Container keywords -->
+ <LABEL>@section</LABEL>
+ <LABEL>@mapping</LABEL>
+ <LABEL>@endmapping</LABEL>
+ <LABEL>@multiset</LABEL>
+ <LABEL>@endmultiset</LABEL>
+ <LABEL>@array</LABEL>
+ <LABEL>@endarray</LABEL>
+ <LABEL>@int</LABEL>
+ <LABEL>@endint</LABEL>
+ <LABEL>@string</LABEL>
+ <LABEL>@endstring</LABEL>
+ <LABEL>@mixed</LABEL>
+ <LABEL>@endmixed</LABEL>
+ <LABEL>@dl</LABEL>
+ <LABEL>@enddl</LABEL>
+ <LABEL>@ol</LABEL>
+ <LABEL>@endol</LABEL>
+ <LABEL>@ul</LABEL>
+ <LABEL>@endol</LABEL>
+
+ <!-- Special keywords -->
+ <LABEL>@ignore</LABEL>
+ <LABEL>@endignore</LABEL>
+
+ </KEYWORDS>
+
+ </RULES>
+
+ <RULES SET="STRING_LITERAL" ESCAPE="\" IGNORE_CASE="TRUE" DEFAULT="LITERAL1">
+ <SEQ_REGEXP TYPE="LITERAL2" HASH_CHAR="%">%([^ a-z]*[a-z]|\[[^\]]*\])</SEQ_REGEXP>
+ <SEQ TYPE="COMMENT2">DEBUG:</SEQ>
+ </RULES>
</MODE>
\ No newline at end of file
diff --git a/jEdit/modes/pl-sql.xml b/jEdit/modes/pl-sql.xml
index b3e084d..481a8d3 100644
--- a/jEdit/modes/pl-sql.xml
+++ b/jEdit/modes/pl-sql.xml
@@ -1,502 +1,502 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- <PROPERTY NAME="indentNextLines" VALUE="\s*(.*THEN|ELSE|LOOP).*" />
- <PROPERTY NAME="unindentNextLines" VALUE="^\s*(ELSE|ELSIF|END IF|END LOOP).*" />
- <PROPERTY NAME="unindentThisLine" VALUE="^\s*(ELSE|ELSIF|END IF|END LOOP).*" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LABEL">
- <BEGIN>/*+</BEGIN>
- <END>*/</END>
- </SPAN>
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
- <EOL_SPAN TYPE="LABEL">--+</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">REM </EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">REMARK</EOL_SPAN>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR">!></SEQ>
- <SEQ TYPE="OPERATOR">!<</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <MARK_FOLLOWING AT_LINE_START="TRUE" AT_WHITESPACE_END="TRUE"
- TYPE="LABEL">@@</MARK_FOLLOWING>
- <MARK_FOLLOWING AT_LINE_START="TRUE"
- AT_WHITESPACE_END="TRUE" TYPE="LABEL">@</MARK_FOLLOWING>
- <EOL_SPAN AT_LINE_START="TRUE" DELEGATE="shellscript::MAIN">!</EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE"
- DELEGATE="shellscript::MAIN">host</EOL_SPAN>
- <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <KEYWORDS>
- <!-- reserved words -->
- <KEYWORD1>ABORT</KEYWORD1>
- <KEYWORD1>ACCESS</KEYWORD1>
- <KEYWORD1>ACCEPT</KEYWORD1>
- <KEYWORD1>ADD</KEYWORD1>
- <KEYWORD1>ALTER</KEYWORD1>
- <KEYWORD1>ARRAY</KEYWORD1>
- <KEYWORD1>ARRAY_LEN</KEYWORD1>
- <KEYWORD1>AS</KEYWORD1>
- <KEYWORD1>ASC</KEYWORD1>
- <KEYWORD1>ASSERT</KEYWORD1>
- <KEYWORD1>ASSIGN</KEYWORD1>
- <KEYWORD1>AT</KEYWORD1>
- <KEYWORD1>AUDIT</KEYWORD1>
- <KEYWORD1>AUTHORIZATION</KEYWORD1>
- <KEYWORD1>AVG</KEYWORD1>
- <KEYWORD1>BASE_TABLE</KEYWORD1>
- <KEYWORD1>BEGIN</KEYWORD1>
- <KEYWORD1>BINARY_INTEGER</KEYWORD1>
- <KEYWORD1>BODY</KEYWORD1>
- <KEYWORD1>BREAK</KEYWORD1>
- <KEYWORD1>BREAKS</KEYWORD1>
- <KEYWORD1>BTITLE</KEYWORD1>
- <KEYWORD1>CASE</KEYWORD1>
- <KEYWORD1>CALL</KEYWORD1>
- <KEYWORD1>CENTER</KEYWORD1>
- <KEYWORD1>CHAR</KEYWORD1>
- <KEYWORD1>CHAR_BASE</KEYWORD1>
- <KEYWORD1>CHECK</KEYWORD1>
- <KEYWORD1>CLEAR</KEYWORD1>
- <KEYWORD1>CLOSE</KEYWORD1>
- <KEYWORD1>CLUSTER</KEYWORD1>
- <KEYWORD1>CLUSTERS</KEYWORD1>
- <KEYWORD1>CMPVAR</KEYWORD1>
- <KEYWORD1>COL</KEYWORD1>
- <KEYWORD1>COLAUTH</KEYWORD1>
- <KEYWORD1>COLUMN</KEYWORD1>
- <KEYWORD1>COLUMNS</KEYWORD1>
- <KEYWORD1>COMMENT</KEYWORD1>
- <KEYWORD1>COMMIT</KEYWORD1>
- <KEYWORD1>COMPRESS</KEYWORD1>
- <KEYWORD1>COMPUTE</KEYWORD1>
- <KEYWORD1>CONSTANT</KEYWORD1>
- <KEYWORD1>CONSTRAINT</KEYWORD1>
- <KEYWORD1>CONTINUE</KEYWORD1>
- <KEYWORD1>COUNT</KEYWORD1>
- <KEYWORD1>CREATE</KEYWORD1>
- <KEYWORD1>CURRENT</KEYWORD1>
- <KEYWORD1>CURRVAL</KEYWORD1>
- <KEYWORD1>CURSOR</KEYWORD1>
- <KEYWORD1>DATABASE</KEYWORD1>
- <KEYWORD1>DATA_BASE</KEYWORD1>
- <KEYWORD1>DATE</KEYWORD1>
- <KEYWORD1>DBA</KEYWORD1>
- <KEYWORD1>DEBUGOFF</KEYWORD1>
- <KEYWORD1>DEBUGON</KEYWORD1>
- <KEYWORD1>DECLARE</KEYWORD1>
- <KEYWORD1>DEFAULT</KEYWORD1>
- <KEYWORD1>DEFINITION</KEYWORD1>
- <KEYWORD1>DELAY</KEYWORD1>
- <KEYWORD1>DELETE</KEYWORD1>
- <KEYWORD1>DESC</KEYWORD1>
- <KEYWORD1>EXPLAIN</KEYWORD1>
- <KEYWORD1>DIGITS</KEYWORD1>
- <KEYWORD1>DISPOSE</KEYWORD1>
- <KEYWORD1>DISTINCT</KEYWORD1>
- <KEYWORD1>DO</KEYWORD1>
- <KEYWORD1>DROP</KEYWORD1>
- <KEYWORD1>DUMP</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>ELSIF</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>ENTRY</KEYWORD1>>
- <KEYWORD1>ERRORS</KEYWORD1>
- <KEYWORD1>EXCEPTION</KEYWORD1>
- <KEYWORD1>EXCEPTION_INIT</KEYWORD1>
- <KEYWORD1>EXCLUSIVE</KEYWORD1>
- <KEYWORD1>EXECUTE</KEYWORD1>
- <KEYWORD1>EXIT</KEYWORD1>
- <KEYWORD1>EXTERNAL</KEYWORD1>
- <KEYWORD1>FALSE</KEYWORD1>
- <KEYWORD1>FETCH</KEYWORD1>
- <KEYWORD1>FILE</KEYWORD1>
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>FOREIGN</KEYWORD1>
- <KEYWORD1>FORM</KEYWORD1>
- <KEYWORD1>FORMAT</KEYWORD1>
- <KEYWORD1>FROM</KEYWORD1>
- <KEYWORD1>FUNCTION</KEYWORD1>
- <KEYWORD1>GENERIC</KEYWORD1>
- <KEYWORD1>GOTO</KEYWORD1>
- <KEYWORD1>GRANT</KEYWORD1>
- <KEYWORD1>GREATEST</KEYWORD1>
- <KEYWORD1>GROUP</KEYWORD1>
- <KEYWORD1>HAVING</KEYWORD1>
- <KEYWORD1>HEADING</KEYWORD1>
- <KEYWORD1>IDENTIFIED</KEYWORD1>
- <KEYWORD1>IDENTITYCOL</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>IMMEDIATE</KEYWORD1>
- <KEYWORD1>INCREMENT</KEYWORD1>
- <KEYWORD1>INDEX</KEYWORD1>
- <KEYWORD1>INDEXES</KEYWORD1>
- <KEYWORD1>INDICATOR</KEYWORD1>
- <KEYWORD1>INITIAL</KEYWORD1>
- <KEYWORD1>INSERT</KEYWORD1>
- <KEYWORD1>INTERFACE</KEYWORD1>
- <KEYWORD1>INTO</KEYWORD1>
- <KEYWORD1>IS</KEYWORD1>
- <KEYWORD1>KEY</KEYWORD1>
- <KEYWORD1>LEAST</KEYWORD1>
- <KEYWORD1>LEVEL</KEYWORD1>
- <KEYWORD1>LIMITED</KEYWORD1>
- <KEYWORD1>LOCK</KEYWORD1>
- <KEYWORD1>LONG</KEYWORD1>
- <KEYWORD1>LOOP</KEYWORD1>
- <KEYWORD1>MATCHED</KEYWORD1>
- <KEYWORD1>MAX</KEYWORD1>
- <KEYWORD1>MAXEXTENTS</KEYWORD1>
- <KEYWORD1>MERGE</KEYWORD1>
- <KEYWORD1>MEMBER</KEYWORD1>
- <KEYWORD1>MIN</KEYWORD1>
- <KEYWORD1>MINUS</KEYWORD1>
- <KEYWORD1>MLSLABEL</KEYWORD1>
- <KEYWORD1>MOD</KEYWORD1>
- <KEYWORD1>MODIFY</KEYWORD1>
- <KEYWORD1>MORE</KEYWORD1>
- <KEYWORD1>NATURAL</KEYWORD1>
- <KEYWORD1>NATURALN</KEYWORD1>
- <KEYWORD1>NEW</KEYWORD1>
- <KEYWORD1>NEW_VALUE</KEYWORD1>
- <KEYWORD1>NEXT</KEYWORD1>
- <KEYWORD1>NEXTVAL</KEYWORD1>
- <KEYWORD1>NOAUDIT</KEYWORD1>
- <KEYWORD1>NOCOMPRESS</KEYWORD1>
- <KEYWORD1>NOPRINT</KEYWORD1>
- <KEYWORD1>NOWAIT</KEYWORD1>
- <KEYWORD1>NULL</KEYWORD1>
- <KEYWORD1>NUMBER</KEYWORD1>
- <KEYWORD1>NUMBER_BASE</KEYWORD1>
- <KEYWORD1>OF</KEYWORD1>
- <KEYWORD1>OFFLINE</KEYWORD1>
- <KEYWORD1>ON</KEYWORD1>
- <KEYWORD1>OFF</KEYWORD1>
- <KEYWORD1>ONLINE</KEYWORD1>
- <KEYWORD1>OPEN</KEYWORD1>
- <KEYWORD1>OPTION</KEYWORD1>
- <KEYWORD1>ORDER</KEYWORD1>
- <KEYWORD1>ORGANIZATION</KEYWORD1>
- <KEYWORD1>OTHERS</KEYWORD1>
- <KEYWORD1>OUT</KEYWORD1>
- <KEYWORD1>PACKAGE</KEYWORD1>
- <KEYWORD1>PAGE</KEYWORD1>
- <KEYWORD1>PARTITION</KEYWORD1>
- <KEYWORD1>PCTFREE</KEYWORD1>
- <KEYWORD1>PCTINCREASE</KEYWORD1>
- <KEYWORD1>PLAN</KEYWORD1>
- <KEYWORD1>POSITIVE</KEYWORD1>
- <KEYWORD1>POSITIVEN</KEYWORD1>
- <KEYWORD1>PRAGMA</KEYWORD1>
- <KEYWORD1>PRINT</KEYWORD1>
- <KEYWORD1>PRIMARY</KEYWORD1>
- <KEYWORD1>PRIOR</KEYWORD1>
- <KEYWORD1>PRIVATE</KEYWORD1>
- <KEYWORD1>PRIVILEGES</KEYWORD1>
- <KEYWORD1>PROCEDURE</KEYWORD1>
- <KEYWORD1>PROMPT</KEYWORD1>
- <KEYWORD1>PUBLIC</KEYWORD1>
- <KEYWORD1>QUOTED_IDENTIFIER</KEYWORD1>
- <KEYWORD1>RAISE</KEYWORD1>
- <KEYWORD1>RANGE</KEYWORD1>
- <KEYWORD1>RAW</KEYWORD1>
- <KEYWORD1>RECORD</KEYWORD1>
- <KEYWORD1>REF</KEYWORD1>
- <KEYWORD1>REFERENCES</KEYWORD1>
- <KEYWORD1>RELEASE</KEYWORD1>
- <KEYWORD1>REMR</KEYWORD1>
- <KEYWORD1>RENAME</KEYWORD1>
- <KEYWORD1>RESOURCE</KEYWORD1>
- <KEYWORD1>RETURN</KEYWORD1>
- <KEYWORD1>REVERSE</KEYWORD1>
- <KEYWORD1>REVOKE</KEYWORD1>
- <KEYWORD1>ROLLBACK</KEYWORD1>
- <KEYWORD1>ROW</KEYWORD1>
- <KEYWORD1>ROWID</KEYWORD1>
- <KEYWORD1>ROWLABEL</KEYWORD1>
- <KEYWORD1>ROWNUM</KEYWORD1>
- <KEYWORD1>ROWS</KEYWORD1>
- <KEYWORD1>ROWTYPE</KEYWORD1>
- <KEYWORD1>RUN</KEYWORD1>
- <KEYWORD1>SAVEPOINT</KEYWORD1>
- <KEYWORD1>SCHEMA</KEYWORD1>
- <KEYWORD1>SELECT</KEYWORD1>
- <KEYWORD1>SEPERATE</KEYWORD1>
- <KEYWORD1>SEQUENCE</KEYWORD1>
- <KEYWORD1>SESSION</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>SHARE</KEYWORD1>
- <KEYWORD1>SHOW</KEYWORD1>
- <KEYWORD1>SIGNTYPE</KEYWORD1>
- <KEYWORD1>SKIP</KEYWORD1>
- <KEYWORD1>SPACE</KEYWORD1>
- <KEYWORD1>SPOOL</KEYWORD1>
- <NULL>.SQL</NULL> <!-- for 'SPOOL some.sql;' stuff -->
- <KEYWORD1>SQL</KEYWORD1>
- <KEYWORD1>SQLCODE</KEYWORD1>
- <KEYWORD1>SQLERRM</KEYWORD1>
- <KEYWORD1>SQLERROR</KEYWORD1>
- <KEYWORD1>STATEMENT</KEYWORD1>
- <KEYWORD1>STDDEV</KEYWORD1>
- <KEYWORD1>STORAGE</KEYWORD1>
- <KEYWORD1>SUBTYPE</KEYWORD1>
- <KEYWORD1>SUCCESSFULL</KEYWORD1>
- <KEYWORD1>SUM</KEYWORD1>
- <KEYWORD1>SYNONYM</KEYWORD1>
- <KEYWORD1>SYSDATE</KEYWORD1>
- <KEYWORD1>TABAUTH</KEYWORD1>
- <KEYWORD1>TABLE</KEYWORD1>
- <KEYWORD1>TABLES</KEYWORD1>
- <KEYWORD1>TABLESPACE</KEYWORD1>
- <KEYWORD1>TASK</KEYWORD1>
- <KEYWORD1>TERMINATE</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>TO</KEYWORD1>
- <KEYWORD1>TRIGGER</KEYWORD1>
- <KEYWORD1>TRUE</KEYWORD1>
- <KEYWORD1>TRUNCATE</KEYWORD1>
- <KEYWORD1>TTITLE</KEYWORD1>
- <KEYWORD1>TYPE</KEYWORD1>
- <KEYWORD1>UID</KEYWORD1>
- <KEYWORD1>UNION</KEYWORD1>
- <KEYWORD1>UNIQUE</KEYWORD1>
- <KEYWORD1>UNDEFINE</KEYWORD1>
- <KEYWORD1>UPDATE</KEYWORD1>
- <KEYWORD1>UPDATETEXT</KEYWORD1>
- <KEYWORD1>USE</KEYWORD1>
- <KEYWORD1>USER</KEYWORD1>
- <KEYWORD1>USING</KEYWORD1>
- <KEYWORD1>VALIDATE</KEYWORD1>
- <KEYWORD1>VALUES</KEYWORD1>
- <KEYWORD1>VARIANCE</KEYWORD1>
- <KEYWORD1>VIEW</KEYWORD1>
- <KEYWORD1>VIEWS</KEYWORD1>
- <KEYWORD1>WHEN</KEYWORD1>
- <KEYWORD1>WHENEVER</KEYWORD1>
- <KEYWORD1>WHERE</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>WORK</KEYWORD1>
- <KEYWORD1>WRITE</KEYWORD1>
- <KEYWORD1>XOR</KEYWORD1>
-
- <!-- data types -->
- <KEYWORD1>binary</KEYWORD1>
- <KEYWORD1>bit</KEYWORD1>
- <KEYWORD1>blob</KEYWORD1>
- <KEYWORD1>boolean</KEYWORD1>
- <KEYWORD1>char</KEYWORD1>
- <KEYWORD1>character</KEYWORD1>
- <KEYWORD1>datetime</KEYWORD1>
- <KEYWORD1>decimal</KEYWORD1>
- <KEYWORD1>float</KEYWORD1>
- <KEYWORD1>image</KEYWORD1>
- <KEYWORD1>int</KEYWORD1>
- <KEYWORD1>integer</KEYWORD1>
- <KEYWORD1>money</KEYWORD1>
- <KEYWORD1>numeric</KEYWORD1>
- <KEYWORD1>nchar</KEYWORD1>
- <KEYWORD1>nvarchar</KEYWORD1>
- <KEYWORD1>ntext</KEYWORD1>
- <KEYWORD1>object</KEYWORD1>
- <KEYWORD1>pls_integer</KEYWORD1>
- <KEYWORD1>real</KEYWORD1>
- <KEYWORD1>smalldatetime</KEYWORD1>
- <KEYWORD1>smallint</KEYWORD1>
- <KEYWORD1>smallmoney</KEYWORD1>
- <KEYWORD1>text</KEYWORD1>
- <KEYWORD1>timestamp</KEYWORD1>
- <KEYWORD1>tinyint</KEYWORD1>
- <KEYWORD1>uniqueidentifier</KEYWORD1>
- <KEYWORD1>varbinary</KEYWORD1>
- <KEYWORD1>varchar</KEYWORD1>
- <KEYWORD1>varchar2</KEYWORD1>
- <KEYWORD1>varray</KEYWORD1>
-
- <!-- system functions -->
- <KEYWORD2>ABS</KEYWORD2>
- <KEYWORD2>ACOS</KEYWORD2>
- <KEYWORD2>ADD_MONTHS</KEYWORD2>
- <KEYWORD2>ASCII</KEYWORD2>
- <KEYWORD2>ASIN</KEYWORD2>
- <KEYWORD2>ATAN</KEYWORD2>
- <KEYWORD2>ATAN2</KEYWORD2>
- <KEYWORD2>BITAND</KEYWORD2>
- <KEYWORD2>CEIL</KEYWORD2>
- <KEYWORD2>CHARTOROWID</KEYWORD2>
- <KEYWORD2>CHR</KEYWORD2>
- <KEYWORD2>CONCAT</KEYWORD2>
- <KEYWORD2>CONVERT</KEYWORD2>
- <KEYWORD2>COS</KEYWORD2>
- <KEYWORD2>COSH</KEYWORD2>
- <KEYWORD2>DECODE</KEYWORD2>
- <KEYWORD2>DEFINE</KEYWORD2>
- <KEYWORD2>DUAL</KEYWORD2>
- <KEYWORD2>FLOOR</KEYWORD2>
- <KEYWORD2>HEXTORAW</KEYWORD2>
- <KEYWORD2>INITCAP</KEYWORD2>
- <KEYWORD2>INSTR</KEYWORD2>
- <KEYWORD2>INSTRB</KEYWORD2>
- <KEYWORD2>LAST_DAY</KEYWORD2>
- <KEYWORD2>LENGTH</KEYWORD2>
- <KEYWORD2>LENGTHB</KEYWORD2>
- <KEYWORD2>LN</KEYWORD2>
- <KEYWORD2>LOG</KEYWORD2>
- <KEYWORD2>LOWER</KEYWORD2>
- <KEYWORD2>LPAD</KEYWORD2>
- <KEYWORD2>LTRIM</KEYWORD2>
- <KEYWORD2>MOD</KEYWORD2>
- <KEYWORD2>MONTHS_BETWEEN</KEYWORD2>
- <KEYWORD2>NEW_TIME</KEYWORD2>
- <KEYWORD2>NEXT_DAY</KEYWORD2>
- <KEYWORD2>NLSSORT</KEYWORD2>
- <KEYWORD2>NSL_INITCAP</KEYWORD2>
- <KEYWORD2>NLS_LOWER</KEYWORD2>
- <KEYWORD2>NLS_UPPER</KEYWORD2>
- <KEYWORD2>NVL</KEYWORD2>
- <KEYWORD2>POWER</KEYWORD2>
- <KEYWORD2>RAWTOHEX</KEYWORD2>
- <KEYWORD2>REPLACE</KEYWORD2>
- <KEYWORD2>ROUND</KEYWORD2>
- <KEYWORD2>ROWIDTOCHAR</KEYWORD2>
- <KEYWORD2>RPAD</KEYWORD2>
- <KEYWORD2>RTRIM</KEYWORD2>
- <KEYWORD2>SIGN</KEYWORD2>
- <KEYWORD2>SOUNDEX</KEYWORD2>
- <KEYWORD2>SIN</KEYWORD2>
- <KEYWORD2>SINH</KEYWORD2>
- <KEYWORD2>SQRT</KEYWORD2>
- <KEYWORD2>SUBSTR</KEYWORD2>
- <KEYWORD2>SUBSTRB</KEYWORD2>
- <KEYWORD2>TAN</KEYWORD2>
- <KEYWORD2>TANH</KEYWORD2>
- <KEYWORD2>TO_CHAR</KEYWORD2>
- <KEYWORD2>TO_DATE</KEYWORD2>
- <KEYWORD2>TO_MULTIBYTE</KEYWORD2>
- <KEYWORD2>TO_NUMBER</KEYWORD2>
- <KEYWORD2>TO_SINGLE_BYTE</KEYWORD2>
- <KEYWORD2>TRANSLATE</KEYWORD2>
- <KEYWORD2>TRUNC</KEYWORD2>
- <KEYWORD2>UPPER</KEYWORD2>
-
- <!-- operators -->
- <KEYWORD1>ALL</KEYWORD1>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>ANY</KEYWORD1>
- <KEYWORD1>BETWEEN</KEYWORD1>
- <KEYWORD1>BY</KEYWORD1>
- <KEYWORD1>CONNECT</KEYWORD1>
- <KEYWORD1>EXISTS</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>INTERSECT</KEYWORD1>
- <KEYWORD1>LIKE</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>NULL</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>START</KEYWORD1>
- <KEYWORD1>UNION</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>NOTFOUND</KEYWORD1>
- <KEYWORD1>ISOPEN</KEYWORD1>
- <KEYWORD1>JOIN</KEYWORD1>
- <KEYWORD1>LEFT</KEYWORD1>
- <KEYWORD1>RIGHT</KEYWORD1>
- <KEYWORD1>FULL</KEYWORD1>
- <KEYWORD1>OUTER</KEYWORD1>
- <KEYWORD1>CROSS</KEYWORD1>
-
- <!-- Some common packages -->
- <KEYWORD3>DBMS_SQL</KEYWORD3>
- <FUNCTION>OPEN_CURSOR</FUNCTION>
- <FUNCTION>PARSE</FUNCTION>
- <FUNCTION>BIND_VARIABLE</FUNCTION>
- <FUNCTION>BIND_ARRAY</FUNCTION>
- <FUNCTION>DEFINE_COLUMN</FUNCTION>
- <FUNCTION>DEFINE_COLUMN_LONG</FUNCTION>
- <FUNCTION>DEFINE_ARRAY</FUNCTION>
- <FUNCTION>EXECUTE</FUNCTION>
- <FUNCTION>FETCH_ROWS</FUNCTION>
- <FUNCTION>EXECUTE_AND_FETCH</FUNCTION>
- <FUNCTION>VARIABLE_VALUE</FUNCTION>
- <FUNCTION>COLUMN_VALUE</FUNCTION>
- <FUNCTION>COLUMN_VALUE_LONG</FUNCTION>
- <FUNCTION>CLOSE_CURSOR</FUNCTION>
- <FUNCTION>DEFINE_COLUMN_CHAR</FUNCTION>
- <FUNCTION>COLUMN_VALUE_CHAR</FUNCTION>
-
- <KEYWORD3>DBMS_PROFILER</KEYWORD3>
- <FUNCTION>START_PROFILER</FUNCTION>
- <FUNCTION>STOP_PROFILER</FUNCTION>
- <FUNCTION>ROLLUP_RUN</FUNCTION>
-
- <!-- other keywords (output-related) -->
- <KEYWORD3>_EDITOR</KEYWORD3>
- <KEYWORD3>ARRAYSIZE</KEYWORD3>
- <KEYWORD3>AUTOTRACE</KEYWORD3>
- <KEYWORD3>DBMS_OUTPUT</KEYWORD3>
- <KEYWORD3>ECHO</KEYWORD3>
- <KEYWORD3>ENABLE</KEYWORD3>
- <KEYWORD3>FCLOSE</KEYWORD3>
- <KEYWORD3>FCLOSE_ALL</KEYWORD3>
- <KEYWORD3>FEED</KEYWORD3>
- <KEYWORD3>FEEDBACK</KEYWORD3>
- <KEYWORD3>FILE_TYPE</KEYWORD3>
- <KEYWORD3>FOPEN</KEYWORD3>
- <KEYWORD3>HEAD</KEYWORD3>
- <KEYWORD3>INVALID_OPERATION</KEYWORD3>
- <KEYWORD3>INVALID_PATH</KEYWORD3>
- <KEYWORD3>LINESIZE</KEYWORD3>
- <KEYWORD3>PAGESIZE</KEYWORD3>
- <KEYWORD3>PAGES</KEYWORD3>
- <KEYWORD3>PAUSE</KEYWORD3>
- <KEYWORD3>DOC</KEYWORD3>
- <KEYWORD3>PUTF</KEYWORD3>
- <KEYWORD3>PUT_LINE</KEYWORD3>
- <KEYWORD3>SERVEROUTPUT</KEYWORD3>
- <KEYWORD3>SQL.PNO</KEYWORD3>
- <KEYWORD3>UTL_FILE</KEYWORD3>
- <KEYWORD3>VER</KEYWORD3>
- <KEYWORD3>VERIFY</KEYWORD3>
- <KEYWORD3>WRITE_ERROR</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
-
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ <PROPERTY NAME="indentNextLines" VALUE="\s*(.*THEN|ELSE|LOOP).*" />
+ <PROPERTY NAME="unindentNextLines" VALUE="^\s*(ELSE|ELSIF|END IF|END LOOP).*" />
+ <PROPERTY NAME="unindentThisLine" VALUE="^\s*(ELSE|ELSIF|END IF|END LOOP).*" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LABEL">
+ <BEGIN>/*+</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ <EOL_SPAN TYPE="LABEL">--+</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">REM </EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">REMARK</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">!></SEQ>
+ <SEQ TYPE="OPERATOR">!<</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <MARK_FOLLOWING AT_LINE_START="TRUE" AT_WHITESPACE_END="TRUE"
+ TYPE="LABEL">@@</MARK_FOLLOWING>
+ <MARK_FOLLOWING AT_LINE_START="TRUE"
+ AT_WHITESPACE_END="TRUE" TYPE="LABEL">@</MARK_FOLLOWING>
+ <EOL_SPAN AT_LINE_START="TRUE" DELEGATE="shellscript::MAIN">!</EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE"
+ DELEGATE="shellscript::MAIN">host</EOL_SPAN>
+ <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <KEYWORDS>
+ <!-- reserved words -->
+ <KEYWORD1>ABORT</KEYWORD1>
+ <KEYWORD1>ACCESS</KEYWORD1>
+ <KEYWORD1>ACCEPT</KEYWORD1>
+ <KEYWORD1>ADD</KEYWORD1>
+ <KEYWORD1>ALTER</KEYWORD1>
+ <KEYWORD1>ARRAY</KEYWORD1>
+ <KEYWORD1>ARRAY_LEN</KEYWORD1>
+ <KEYWORD1>AS</KEYWORD1>
+ <KEYWORD1>ASC</KEYWORD1>
+ <KEYWORD1>ASSERT</KEYWORD1>
+ <KEYWORD1>ASSIGN</KEYWORD1>
+ <KEYWORD1>AT</KEYWORD1>
+ <KEYWORD1>AUDIT</KEYWORD1>
+ <KEYWORD1>AUTHORIZATION</KEYWORD1>
+ <KEYWORD1>AVG</KEYWORD1>
+ <KEYWORD1>BASE_TABLE</KEYWORD1>
+ <KEYWORD1>BEGIN</KEYWORD1>
+ <KEYWORD1>BINARY_INTEGER</KEYWORD1>
+ <KEYWORD1>BODY</KEYWORD1>
+ <KEYWORD1>BREAK</KEYWORD1>
+ <KEYWORD1>BREAKS</KEYWORD1>
+ <KEYWORD1>BTITLE</KEYWORD1>
+ <KEYWORD1>CASE</KEYWORD1>
+ <KEYWORD1>CALL</KEYWORD1>
+ <KEYWORD1>CENTER</KEYWORD1>
+ <KEYWORD1>CHAR</KEYWORD1>
+ <KEYWORD1>CHAR_BASE</KEYWORD1>
+ <KEYWORD1>CHECK</KEYWORD1>
+ <KEYWORD1>CLEAR</KEYWORD1>
+ <KEYWORD1>CLOSE</KEYWORD1>
+ <KEYWORD1>CLUSTER</KEYWORD1>
+ <KEYWORD1>CLUSTERS</KEYWORD1>
+ <KEYWORD1>CMPVAR</KEYWORD1>
+ <KEYWORD1>COL</KEYWORD1>
+ <KEYWORD1>COLAUTH</KEYWORD1>
+ <KEYWORD1>COLUMN</KEYWORD1>
+ <KEYWORD1>COLUMNS</KEYWORD1>
+ <KEYWORD1>COMMENT</KEYWORD1>
+ <KEYWORD1>COMMIT</KEYWORD1>
+ <KEYWORD1>COMPRESS</KEYWORD1>
+ <KEYWORD1>COMPUTE</KEYWORD1>
+ <KEYWORD1>CONSTANT</KEYWORD1>
+ <KEYWORD1>CONSTRAINT</KEYWORD1>
+ <KEYWORD1>CONTINUE</KEYWORD1>
+ <KEYWORD1>COUNT</KEYWORD1>
+ <KEYWORD1>CREATE</KEYWORD1>
+ <KEYWORD1>CURRENT</KEYWORD1>
+ <KEYWORD1>CURRVAL</KEYWORD1>
+ <KEYWORD1>CURSOR</KEYWORD1>
+ <KEYWORD1>DATABASE</KEYWORD1>
+ <KEYWORD1>DATA_BASE</KEYWORD1>
+ <KEYWORD1>DATE</KEYWORD1>
+ <KEYWORD1>DBA</KEYWORD1>
+ <KEYWORD1>DEBUGOFF</KEYWORD1>
+ <KEYWORD1>DEBUGON</KEYWORD1>
+ <KEYWORD1>DECLARE</KEYWORD1>
+ <KEYWORD1>DEFAULT</KEYWORD1>
+ <KEYWORD1>DEFINITION</KEYWORD1>
+ <KEYWORD1>DELAY</KEYWORD1>
+ <KEYWORD1>DELETE</KEYWORD1>
+ <KEYWORD1>DESC</KEYWORD1>
+ <KEYWORD1>EXPLAIN</KEYWORD1>
+ <KEYWORD1>DIGITS</KEYWORD1>
+ <KEYWORD1>DISPOSE</KEYWORD1>
+ <KEYWORD1>DISTINCT</KEYWORD1>
+ <KEYWORD1>DO</KEYWORD1>
+ <KEYWORD1>DROP</KEYWORD1>
+ <KEYWORD1>DUMP</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>ELSIF</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>ENTRY</KEYWORD1>>
+ <KEYWORD1>ERRORS</KEYWORD1>
+ <KEYWORD1>EXCEPTION</KEYWORD1>
+ <KEYWORD1>EXCEPTION_INIT</KEYWORD1>
+ <KEYWORD1>EXCLUSIVE</KEYWORD1>
+ <KEYWORD1>EXECUTE</KEYWORD1>
+ <KEYWORD1>EXIT</KEYWORD1>
+ <KEYWORD1>EXTERNAL</KEYWORD1>
+ <KEYWORD1>FALSE</KEYWORD1>
+ <KEYWORD1>FETCH</KEYWORD1>
+ <KEYWORD1>FILE</KEYWORD1>
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>FOREIGN</KEYWORD1>
+ <KEYWORD1>FORM</KEYWORD1>
+ <KEYWORD1>FORMAT</KEYWORD1>
+ <KEYWORD1>FROM</KEYWORD1>
+ <KEYWORD1>FUNCTION</KEYWORD1>
+ <KEYWORD1>GENERIC</KEYWORD1>
+ <KEYWORD1>GOTO</KEYWORD1>
+ <KEYWORD1>GRANT</KEYWORD1>
+ <KEYWORD1>GREATEST</KEYWORD1>
+ <KEYWORD1>GROUP</KEYWORD1>
+ <KEYWORD1>HAVING</KEYWORD1>
+ <KEYWORD1>HEADING</KEYWORD1>
+ <KEYWORD1>IDENTIFIED</KEYWORD1>
+ <KEYWORD1>IDENTITYCOL</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>IMMEDIATE</KEYWORD1>
+ <KEYWORD1>INCREMENT</KEYWORD1>
+ <KEYWORD1>INDEX</KEYWORD1>
+ <KEYWORD1>INDEXES</KEYWORD1>
+ <KEYWORD1>INDICATOR</KEYWORD1>
+ <KEYWORD1>INITIAL</KEYWORD1>
+ <KEYWORD1>INSERT</KEYWORD1>
+ <KEYWORD1>INTERFACE</KEYWORD1>
+ <KEYWORD1>INTO</KEYWORD1>
+ <KEYWORD1>IS</KEYWORD1>
+ <KEYWORD1>KEY</KEYWORD1>
+ <KEYWORD1>LEAST</KEYWORD1>
+ <KEYWORD1>LEVEL</KEYWORD1>
+ <KEYWORD1>LIMITED</KEYWORD1>
+ <KEYWORD1>LOCK</KEYWORD1>
+ <KEYWORD1>LONG</KEYWORD1>
+ <KEYWORD1>LOOP</KEYWORD1>
+ <KEYWORD1>MATCHED</KEYWORD1>
+ <KEYWORD1>MAX</KEYWORD1>
+ <KEYWORD1>MAXEXTENTS</KEYWORD1>
+ <KEYWORD1>MERGE</KEYWORD1>
+ <KEYWORD1>MEMBER</KEYWORD1>
+ <KEYWORD1>MIN</KEYWORD1>
+ <KEYWORD1>MINUS</KEYWORD1>
+ <KEYWORD1>MLSLABEL</KEYWORD1>
+ <KEYWORD1>MOD</KEYWORD1>
+ <KEYWORD1>MODIFY</KEYWORD1>
+ <KEYWORD1>MORE</KEYWORD1>
+ <KEYWORD1>NATURAL</KEYWORD1>
+ <KEYWORD1>NATURALN</KEYWORD1>
+ <KEYWORD1>NEW</KEYWORD1>
+ <KEYWORD1>NEW_VALUE</KEYWORD1>
+ <KEYWORD1>NEXT</KEYWORD1>
+ <KEYWORD1>NEXTVAL</KEYWORD1>
+ <KEYWORD1>NOAUDIT</KEYWORD1>
+ <KEYWORD1>NOCOMPRESS</KEYWORD1>
+ <KEYWORD1>NOPRINT</KEYWORD1>
+ <KEYWORD1>NOWAIT</KEYWORD1>
+ <KEYWORD1>NULL</KEYWORD1>
+ <KEYWORD1>NUMBER</KEYWORD1>
+ <KEYWORD1>NUMBER_BASE</KEYWORD1>
+ <KEYWORD1>OF</KEYWORD1>
+ <KEYWORD1>OFFLINE</KEYWORD1>
+ <KEYWORD1>ON</KEYWORD1>
+ <KEYWORD1>OFF</KEYWORD1>
+ <KEYWORD1>ONLINE</KEYWORD1>
+ <KEYWORD1>OPEN</KEYWORD1>
+ <KEYWORD1>OPTION</KEYWORD1>
+ <KEYWORD1>ORDER</KEYWORD1>
+ <KEYWORD1>ORGANIZATION</KEYWORD1>
+ <KEYWORD1>OTHERS</KEYWORD1>
+ <KEYWORD1>OUT</KEYWORD1>
+ <KEYWORD1>PACKAGE</KEYWORD1>
+ <KEYWORD1>PAGE</KEYWORD1>
+ <KEYWORD1>PARTITION</KEYWORD1>
+ <KEYWORD1>PCTFREE</KEYWORD1>
+ <KEYWORD1>PCTINCREASE</KEYWORD1>
+ <KEYWORD1>PLAN</KEYWORD1>
+ <KEYWORD1>POSITIVE</KEYWORD1>
+ <KEYWORD1>POSITIVEN</KEYWORD1>
+ <KEYWORD1>PRAGMA</KEYWORD1>
+ <KEYWORD1>PRINT</KEYWORD1>
+ <KEYWORD1>PRIMARY</KEYWORD1>
+ <KEYWORD1>PRIOR</KEYWORD1>
+ <KEYWORD1>PRIVATE</KEYWORD1>
+ <KEYWORD1>PRIVILEGES</KEYWORD1>
+ <KEYWORD1>PROCEDURE</KEYWORD1>
+ <KEYWORD1>PROMPT</KEYWORD1>
+ <KEYWORD1>PUBLIC</KEYWORD1>
+ <KEYWORD1>QUOTED_IDENTIFIER</KEYWORD1>
+ <KEYWORD1>RAISE</KEYWORD1>
+ <KEYWORD1>RANGE</KEYWORD1>
+ <KEYWORD1>RAW</KEYWORD1>
+ <KEYWORD1>RECORD</KEYWORD1>
+ <KEYWORD1>REF</KEYWORD1>
+ <KEYWORD1>REFERENCES</KEYWORD1>
+ <KEYWORD1>RELEASE</KEYWORD1>
+ <KEYWORD1>REMR</KEYWORD1>
+ <KEYWORD1>RENAME</KEYWORD1>
+ <KEYWORD1>RESOURCE</KEYWORD1>
+ <KEYWORD1>RETURN</KEYWORD1>
+ <KEYWORD1>REVERSE</KEYWORD1>
+ <KEYWORD1>REVOKE</KEYWORD1>
+ <KEYWORD1>ROLLBACK</KEYWORD1>
+ <KEYWORD1>ROW</KEYWORD1>
+ <KEYWORD1>ROWID</KEYWORD1>
+ <KEYWORD1>ROWLABEL</KEYWORD1>
+ <KEYWORD1>ROWNUM</KEYWORD1>
+ <KEYWORD1>ROWS</KEYWORD1>
+ <KEYWORD1>ROWTYPE</KEYWORD1>
+ <KEYWORD1>RUN</KEYWORD1>
+ <KEYWORD1>SAVEPOINT</KEYWORD1>
+ <KEYWORD1>SCHEMA</KEYWORD1>
+ <KEYWORD1>SELECT</KEYWORD1>
+ <KEYWORD1>SEPERATE</KEYWORD1>
+ <KEYWORD1>SEQUENCE</KEYWORD1>
+ <KEYWORD1>SESSION</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>SHARE</KEYWORD1>
+ <KEYWORD1>SHOW</KEYWORD1>
+ <KEYWORD1>SIGNTYPE</KEYWORD1>
+ <KEYWORD1>SKIP</KEYWORD1>
+ <KEYWORD1>SPACE</KEYWORD1>
+ <KEYWORD1>SPOOL</KEYWORD1>
+ <NULL>.SQL</NULL> <!-- for 'SPOOL some.sql;' stuff -->
+ <KEYWORD1>SQL</KEYWORD1>
+ <KEYWORD1>SQLCODE</KEYWORD1>
+ <KEYWORD1>SQLERRM</KEYWORD1>
+ <KEYWORD1>SQLERROR</KEYWORD1>
+ <KEYWORD1>STATEMENT</KEYWORD1>
+ <KEYWORD1>STDDEV</KEYWORD1>
+ <KEYWORD1>STORAGE</KEYWORD1>
+ <KEYWORD1>SUBTYPE</KEYWORD1>
+ <KEYWORD1>SUCCESSFULL</KEYWORD1>
+ <KEYWORD1>SUM</KEYWORD1>
+ <KEYWORD1>SYNONYM</KEYWORD1>
+ <KEYWORD1>SYSDATE</KEYWORD1>
+ <KEYWORD1>TABAUTH</KEYWORD1>
+ <KEYWORD1>TABLE</KEYWORD1>
+ <KEYWORD1>TABLES</KEYWORD1>
+ <KEYWORD1>TABLESPACE</KEYWORD1>
+ <KEYWORD1>TASK</KEYWORD1>
+ <KEYWORD1>TERMINATE</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>TO</KEYWORD1>
+ <KEYWORD1>TRIGGER</KEYWORD1>
+ <KEYWORD1>TRUE</KEYWORD1>
+ <KEYWORD1>TRUNCATE</KEYWORD1>
+ <KEYWORD1>TTITLE</KEYWORD1>
+ <KEYWORD1>TYPE</KEYWORD1>
+ <KEYWORD1>UID</KEYWORD1>
+ <KEYWORD1>UNION</KEYWORD1>
+ <KEYWORD1>UNIQUE</KEYWORD1>
+ <KEYWORD1>UNDEFINE</KEYWORD1>
+ <KEYWORD1>UPDATE</KEYWORD1>
+ <KEYWORD1>UPDATETEXT</KEYWORD1>
+ <KEYWORD1>USE</KEYWORD1>
+ <KEYWORD1>USER</KEYWORD1>
+ <KEYWORD1>USING</KEYWORD1>
+ <KEYWORD1>VALIDATE</KEYWORD1>
+ <KEYWORD1>VALUES</KEYWORD1>
+ <KEYWORD1>VARIANCE</KEYWORD1>
+ <KEYWORD1>VIEW</KEYWORD1>
+ <KEYWORD1>VIEWS</KEYWORD1>
+ <KEYWORD1>WHEN</KEYWORD1>
+ <KEYWORD1>WHENEVER</KEYWORD1>
+ <KEYWORD1>WHERE</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>WORK</KEYWORD1>
+ <KEYWORD1>WRITE</KEYWORD1>
+ <KEYWORD1>XOR</KEYWORD1>
+
+ <!-- data types -->
+ <KEYWORD1>binary</KEYWORD1>
+ <KEYWORD1>bit</KEYWORD1>
+ <KEYWORD1>blob</KEYWORD1>
+ <KEYWORD1>boolean</KEYWORD1>
+ <KEYWORD1>char</KEYWORD1>
+ <KEYWORD1>character</KEYWORD1>
+ <KEYWORD1>datetime</KEYWORD1>
+ <KEYWORD1>decimal</KEYWORD1>
+ <KEYWORD1>float</KEYWORD1>
+ <KEYWORD1>image</KEYWORD1>
+ <KEYWORD1>int</KEYWORD1>
+ <KEYWORD1>integer</KEYWORD1>
+ <KEYWORD1>money</KEYWORD1>
+ <KEYWORD1>numeric</KEYWORD1>
+ <KEYWORD1>nchar</KEYWORD1>
+ <KEYWORD1>nvarchar</KEYWORD1>
+ <KEYWORD1>ntext</KEYWORD1>
+ <KEYWORD1>object</KEYWORD1>
+ <KEYWORD1>pls_integer</KEYWORD1>
+ <KEYWORD1>real</KEYWORD1>
+ <KEYWORD1>smalldatetime</KEYWORD1>
+ <KEYWORD1>smallint</KEYWORD1>
+ <KEYWORD1>smallmoney</KEYWORD1>
+ <KEYWORD1>text</KEYWORD1>
+ <KEYWORD1>timestamp</KEYWORD1>
+ <KEYWORD1>tinyint</KEYWORD1>
+ <KEYWORD1>uniqueidentifier</KEYWORD1>
+ <KEYWORD1>varbinary</KEYWORD1>
+ <KEYWORD1>varchar</KEYWORD1>
+ <KEYWORD1>varchar2</KEYWORD1>
+ <KEYWORD1>varray</KEYWORD1>
+
+ <!-- system functions -->
+ <KEYWORD2>ABS</KEYWORD2>
+ <KEYWORD2>ACOS</KEYWORD2>
+ <KEYWORD2>ADD_MONTHS</KEYWORD2>
+ <KEYWORD2>ASCII</KEYWORD2>
+ <KEYWORD2>ASIN</KEYWORD2>
+ <KEYWORD2>ATAN</KEYWORD2>
+ <KEYWORD2>ATAN2</KEYWORD2>
+ <KEYWORD2>BITAND</KEYWORD2>
+ <KEYWORD2>CEIL</KEYWORD2>
+ <KEYWORD2>CHARTOROWID</KEYWORD2>
+ <KEYWORD2>CHR</KEYWORD2>
+ <KEYWORD2>CONCAT</KEYWORD2>
+ <KEYWORD2>CONVERT</KEYWORD2>
+ <KEYWORD2>COS</KEYWORD2>
+ <KEYWORD2>COSH</KEYWORD2>
+ <KEYWORD2>DECODE</KEYWORD2>
+ <KEYWORD2>DEFINE</KEYWORD2>
+ <KEYWORD2>DUAL</KEYWORD2>
+ <KEYWORD2>FLOOR</KEYWORD2>
+ <KEYWORD2>HEXTORAW</KEYWORD2>
+ <KEYWORD2>INITCAP</KEYWORD2>
+ <KEYWORD2>INSTR</KEYWORD2>
+ <KEYWORD2>INSTRB</KEYWORD2>
+ <KEYWORD2>LAST_DAY</KEYWORD2>
+ <KEYWORD2>LENGTH</KEYWORD2>
+ <KEYWORD2>LENGTHB</KEYWORD2>
+ <KEYWORD2>LN</KEYWORD2>
+ <KEYWORD2>LOG</KEYWORD2>
+ <KEYWORD2>LOWER</KEYWORD2>
+ <KEYWORD2>LPAD</KEYWORD2>
+ <KEYWORD2>LTRIM</KEYWORD2>
+ <KEYWORD2>MOD</KEYWORD2>
+ <KEYWORD2>MONTHS_BETWEEN</KEYWORD2>
+ <KEYWORD2>NEW_TIME</KEYWORD2>
+ <KEYWORD2>NEXT_DAY</KEYWORD2>
+ <KEYWORD2>NLSSORT</KEYWORD2>
+ <KEYWORD2>NSL_INITCAP</KEYWORD2>
+ <KEYWORD2>NLS_LOWER</KEYWORD2>
+ <KEYWORD2>NLS_UPPER</KEYWORD2>
+ <KEYWORD2>NVL</KEYWORD2>
+ <KEYWORD2>POWER</KEYWORD2>
+ <KEYWORD2>RAWTOHEX</KEYWORD2>
+ <KEYWORD2>REPLACE</KEYWORD2>
+ <KEYWORD2>ROUND</KEYWORD2>
+ <KEYWORD2>ROWIDTOCHAR</KEYWORD2>
+ <KEYWORD2>RPAD</KEYWORD2>
+ <KEYWORD2>RTRIM</KEYWORD2>
+ <KEYWORD2>SIGN</KEYWORD2>
+ <KEYWORD2>SOUNDEX</KEYWORD2>
+ <KEYWORD2>SIN</KEYWORD2>
+ <KEYWORD2>SINH</KEYWORD2>
+ <KEYWORD2>SQRT</KEYWORD2>
+ <KEYWORD2>SUBSTR</KEYWORD2>
+ <KEYWORD2>SUBSTRB</KEYWORD2>
+ <KEYWORD2>TAN</KEYWORD2>
+ <KEYWORD2>TANH</KEYWORD2>
+ <KEYWORD2>TO_CHAR</KEYWORD2>
+ <KEYWORD2>TO_DATE</KEYWORD2>
+ <KEYWORD2>TO_MULTIBYTE</KEYWORD2>
+ <KEYWORD2>TO_NUMBER</KEYWORD2>
+ <KEYWORD2>TO_SINGLE_BYTE</KEYWORD2>
+ <KEYWORD2>TRANSLATE</KEYWORD2>
+ <KEYWORD2>TRUNC</KEYWORD2>
+ <KEYWORD2>UPPER</KEYWORD2>
+
+ <!-- operators -->
+ <KEYWORD1>ALL</KEYWORD1>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>ANY</KEYWORD1>
+ <KEYWORD1>BETWEEN</KEYWORD1>
+ <KEYWORD1>BY</KEYWORD1>
+ <KEYWORD1>CONNECT</KEYWORD1>
+ <KEYWORD1>EXISTS</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>INTERSECT</KEYWORD1>
+ <KEYWORD1>LIKE</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>NULL</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>START</KEYWORD1>
+ <KEYWORD1>UNION</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>NOTFOUND</KEYWORD1>
+ <KEYWORD1>ISOPEN</KEYWORD1>
+ <KEYWORD1>JOIN</KEYWORD1>
+ <KEYWORD1>LEFT</KEYWORD1>
+ <KEYWORD1>RIGHT</KEYWORD1>
+ <KEYWORD1>FULL</KEYWORD1>
+ <KEYWORD1>OUTER</KEYWORD1>
+ <KEYWORD1>CROSS</KEYWORD1>
+
+ <!-- Some common packages -->
+ <KEYWORD3>DBMS_SQL</KEYWORD3>
+ <FUNCTION>OPEN_CURSOR</FUNCTION>
+ <FUNCTION>PARSE</FUNCTION>
+ <FUNCTION>BIND_VARIABLE</FUNCTION>
+ <FUNCTION>BIND_ARRAY</FUNCTION>
+ <FUNCTION>DEFINE_COLUMN</FUNCTION>
+ <FUNCTION>DEFINE_COLUMN_LONG</FUNCTION>
+ <FUNCTION>DEFINE_ARRAY</FUNCTION>
+ <FUNCTION>EXECUTE</FUNCTION>
+ <FUNCTION>FETCH_ROWS</FUNCTION>
+ <FUNCTION>EXECUTE_AND_FETCH</FUNCTION>
+ <FUNCTION>VARIABLE_VALUE</FUNCTION>
+ <FUNCTION>COLUMN_VALUE</FUNCTION>
+ <FUNCTION>COLUMN_VALUE_LONG</FUNCTION>
+ <FUNCTION>CLOSE_CURSOR</FUNCTION>
+ <FUNCTION>DEFINE_COLUMN_CHAR</FUNCTION>
+ <FUNCTION>COLUMN_VALUE_CHAR</FUNCTION>
+
+ <KEYWORD3>DBMS_PROFILER</KEYWORD3>
+ <FUNCTION>START_PROFILER</FUNCTION>
+ <FUNCTION>STOP_PROFILER</FUNCTION>
+ <FUNCTION>ROLLUP_RUN</FUNCTION>
+
+ <!-- other keywords (output-related) -->
+ <KEYWORD3>_EDITOR</KEYWORD3>
+ <KEYWORD3>ARRAYSIZE</KEYWORD3>
+ <KEYWORD3>AUTOTRACE</KEYWORD3>
+ <KEYWORD3>DBMS_OUTPUT</KEYWORD3>
+ <KEYWORD3>ECHO</KEYWORD3>
+ <KEYWORD3>ENABLE</KEYWORD3>
+ <KEYWORD3>FCLOSE</KEYWORD3>
+ <KEYWORD3>FCLOSE_ALL</KEYWORD3>
+ <KEYWORD3>FEED</KEYWORD3>
+ <KEYWORD3>FEEDBACK</KEYWORD3>
+ <KEYWORD3>FILE_TYPE</KEYWORD3>
+ <KEYWORD3>FOPEN</KEYWORD3>
+ <KEYWORD3>HEAD</KEYWORD3>
+ <KEYWORD3>INVALID_OPERATION</KEYWORD3>
+ <KEYWORD3>INVALID_PATH</KEYWORD3>
+ <KEYWORD3>LINESIZE</KEYWORD3>
+ <KEYWORD3>PAGESIZE</KEYWORD3>
+ <KEYWORD3>PAGES</KEYWORD3>
+ <KEYWORD3>PAUSE</KEYWORD3>
+ <KEYWORD3>DOC</KEYWORD3>
+ <KEYWORD3>PUTF</KEYWORD3>
+ <KEYWORD3>PUT_LINE</KEYWORD3>
+ <KEYWORD3>SERVEROUTPUT</KEYWORD3>
+ <KEYWORD3>SQL.PNO</KEYWORD3>
+ <KEYWORD3>UTL_FILE</KEYWORD3>
+ <KEYWORD3>VER</KEYWORD3>
+ <KEYWORD3>VERIFY</KEYWORD3>
+ <KEYWORD3>WRITE_ERROR</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
+
diff --git a/jEdit/modes/pl1.xml b/jEdit/modes/pl1.xml
index 481b7fc..e752ff8 100644
--- a/jEdit/modes/pl1.xml
+++ b/jEdit/modes/pl1.xml
@@ -1,596 +1,596 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <!-- set this to 'true' if you want to use GNU coding style -->
- </PROPS>
- <RULES IGNORE_CASE="TRUE"
- HIGHLIGHT_DIGITS="FALSE">
-
- <!-- C style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- preprocessor statements -->
- <EOL_SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="*" AT_LINE_START="TRUE">\* *process</EOL_SPAN_REGEXP>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">¬</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
- MATCH_TYPE="OPERATOR"
- TYPE="LABEL">:</MARK_PREVIOUS>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <!-- Statements, keywords and directives -->
- <KEYWORD1>alias</KEYWORD1>
- <KEYWORD1>alloc</KEYWORD1>
- <KEYWORD1>allocate</KEYWORD1>
- <KEYWORD1>attach</KEYWORD1>
- <KEYWORD1>begin</KEYWORD1>
- <KEYWORD1>by</KEYWORD1>
- <KEYWORD1>byname</KEYWORD1>
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>dcl</KEYWORD1>
- <KEYWORD1>declare</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>define</KEYWORD1>
- <KEYWORD1>delay</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD1>detach</KEYWORD1>
- <KEYWORD1>dft</KEYWORD1>
- <KEYWORD1>display</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>downthru</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>entry</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>fetch</KEYWORD1>
- <KEYWORD1>flush</KEYWORD1>
- <KEYWORD1>format</KEYWORD1>
- <KEYWORD1>free</KEYWORD1>
- <KEYWORD1>from</KEYWORD1>
- <KEYWORD1>get</KEYWORD1>
- <KEYWORD1>go</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>ignore</KEYWORD1>
- <KEYWORD1>%include</KEYWORD1>
- <KEYWORD1>into</KEYWORD1>
- <KEYWORD1>iterate</KEYWORD1>
- <KEYWORD1>key</KEYWORD1>
- <KEYWORD1>keyfrom</KEYWORD1>
- <KEYWORD1>keyto</KEYWORD1>
- <KEYWORD1>leave</KEYWORD1>
- <KEYWORD1>line</KEYWORD1>
- <KEYWORD1>locate</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
- <KEYWORD1>name</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>open</KEYWORD1>
- <KEYWORD1>ordinal</KEYWORD1>
- <KEYWORD1>other</KEYWORD1>
- <KEYWORD1>otherwise</KEYWORD1>
- <KEYWORD1>package</KEYWORD1>
- <KEYWORD1>page</KEYWORD1>
- <KEYWORD1>proc</KEYWORD1>
- <KEYWORD1>procedure</KEYWORD1>
- <KEYWORD1>put</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>release</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>reply</KEYWORD1>
- <KEYWORD1>resignal</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>revert</KEYWORD1>
- <KEYWORD1>rewrite</KEYWORD1>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>signal</KEYWORD1>
- <KEYWORD1>skip</KEYWORD1>
- <KEYWORD1>snap</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>string</KEYWORD1>
- <KEYWORD1>structure</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>thread</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>tstack</KEYWORD1>
- <KEYWORD1>unlock</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>upthru</KEYWORD1>
- <KEYWORD1>wait</KEYWORD1>
- <KEYWORD1>when</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>write</KEYWORD1>
-
- <!-- Options & attributes -->
- <KEYWORD2>A</KEYWORD2>
- <KEYWORD2>abnormal</KEYWORD2>
- <KEYWORD2>aligned</KEYWORD2>
- <KEYWORD2>anycond</KEYWORD2>
- <KEYWORD2>anycondition</KEYWORD2>
- <KEYWORD2>area</KEYWORD2>
- <KEYWORD2>asgn</KEYWORD2>
- <KEYWORD2>asm</KEYWORD2>
- <KEYWORD2>assembler</KEYWORD2>
- <KEYWORD2>assignable</KEYWORD2>
- <KEYWORD2>attn</KEYWORD2>
- <KEYWORD2>attention</KEYWORD2>
- <KEYWORD2>auto</KEYWORD2>
- <KEYWORD2>automatic</KEYWORD2>
- <KEYWORD2>b</KEYWORD2>
- <KEYWORD2>b3</KEYWORD2>
- <KEYWORD2>b4</KEYWORD2>
- <KEYWORD2>based</KEYWORD2>
- <KEYWORD2>bigendian</KEYWORD2>
- <KEYWORD2>bin</KEYWORD2>
- <KEYWORD2>binary</KEYWORD2>
- <KEYWORD2>bit</KEYWORD2>
- <KEYWORD2>buf</KEYWORD2>
- <KEYWORD2>buffered</KEYWORD2>
- <KEYWORD2>builtin</KEYWORD2>
- <KEYWORD2>bx</KEYWORD2>
- <KEYWORD2>byaddr</KEYWORD2>
- <KEYWORD2>byvalue</KEYWORD2>
- <KEYWORD2>C</KEYWORD2>
- <KEYWORD2>cdecl</KEYWORD2>
- <KEYWORD2>cell</KEYWORD2>
- <KEYWORD2>char</KEYWORD2>
- <KEYWORD2>character</KEYWORD2>
- <KEYWORD2>charg</KEYWORD2>
- <KEYWORD2>chargraphic</KEYWORD2>
- <KEYWORD2>cobol</KEYWORD2>
- <KEYWORD2>column</KEYWORD2>
- <KEYWORD2>complex</KEYWORD2>
- <KEYWORD2>cond</KEYWORD2>
- <KEYWORD2>condition</KEYWORD2>
- <KEYWORD2>conn</KEYWORD2>
- <KEYWORD2>connected</KEYWORD2>
- <KEYWORD2>controlled</KEYWORD2>
- <KEYWORD2>conv</KEYWORD2>
- <KEYWORD2>conversion</KEYWORD2>
- <KEYWORD2>cplx</KEYWORD2>
- <KEYWORD2>ctl</KEYWORD2>
- <KEYWORD2>data</KEYWORD2>
- <KEYWORD2>date</KEYWORD2>
- <KEYWORD2>dec</KEYWORD2>
- <KEYWORD2>decimal</KEYWORD2>
- <KEYWORD2>def</KEYWORD2>
- <KEYWORD2>defined</KEYWORD2>
- <KEYWORD2>descriptor</KEYWORD2>
- <KEYWORD2>descriptors</KEYWORD2>
- <KEYWORD2>dim</KEYWORD2>
- <KEYWORD2>dimension</KEYWORD2>
- <KEYWORD2>direct</KEYWORD2>
- <KEYWORD2>E</KEYWORD2>
- <KEYWORD2>edit</KEYWORD2>
- <KEYWORD2>endfile</KEYWORD2>
- <KEYWORD2>endpage</KEYWORD2>
- <KEYWORD2>env</KEYWORD2>
- <KEYWORD2>environment</KEYWORD2>
- <KEYWORD2>error</KEYWORD2>
- <KEYWORD2>exclusive</KEYWORD2>
- <KEYWORD2>exports</KEYWORD2>
- <KEYWORD2>ext</KEYWORD2>
- <KEYWORD2>external</KEYWORD2>
- <KEYWORD2>F</KEYWORD2>
- <KEYWORD2>fetchable</KEYWORD2>
- <KEYWORD2>file</KEYWORD2>
- <KEYWORD2>finish</KEYWORD2>
- <KEYWORD2>fixed</KEYWORD2>
- <KEYWORD2>fixedoverflow</KEYWORD2>
- <KEYWORD2>float</KEYWORD2>
- <KEYWORD2>fofl</KEYWORD2>
- <KEYWORD2>format</KEYWORD2>
- <KEYWORD2>fortran</KEYWORD2>
- <KEYWORD2>fromalien</KEYWORD2>
- <KEYWORD2>g</KEYWORD2>
- <KEYWORD2>generic</KEYWORD2>
- <KEYWORD2>graphic</KEYWORD2>
- <KEYWORD2>gx</KEYWORD2>
- <KEYWORD2>handle</KEYWORD2>
- <KEYWORD2>hexadec</KEYWORD2>
- <KEYWORD2>ieee</KEYWORD2>
- <KEYWORD2>imported</KEYWORD2>
- <KEYWORD2>init</KEYWORD2>
- <KEYWORD2>initial</KEYWORD2>
- <KEYWORD2>inline</KEYWORD2>
- <KEYWORD2>input</KEYWORD2>
- <KEYWORD2>inter</KEYWORD2>
- <KEYWORD2>internal</KEYWORD2>
- <KEYWORD2>invalidop</KEYWORD2>
- <KEYWORD2>irred</KEYWORD2>
- <KEYWORD2>irreducible</KEYWORD2>
- <KEYWORD2>keyed</KEYWORD2>
- <KEYWORD2>L</KEYWORD2>
- <KEYWORD2>label</KEYWORD2>
- <KEYWORD2>like</KEYWORD2>
- <KEYWORD2>limited</KEYWORD2>
- <KEYWORD2>linesize</KEYWORD2>
- <KEYWORD2>linkage</KEYWORD2>
- <KEYWORD2>list</KEYWORD2>
- <KEYWORD2>littleendian</KEYWORD2>
- <KEYWORD2>m</KEYWORD2>
- <KEYWORD2>main</KEYWORD2>
- <KEYWORD2>native</KEYWORD2>
- <KEYWORD2>nonasgn</KEYWORD2>
- <KEYWORD2>nocharg</KEYWORD2>
- <KEYWORD2>nochargraphic</KEYWORD2>
- <KEYWORD2>nodescriptor</KEYWORD2>
- <KEYWORD2>noexecops</KEYWORD2>
- <KEYWORD2>nomap</KEYWORD2>
- <KEYWORD2>nomapin</KEYWORD2>
- <KEYWORD2>nomapout</KEYWORD2>
- <KEYWORD2>nonasgn</KEYWORD2>
- <KEYWORD2>nonassignable</KEYWORD2>
- <KEYWORD2>nonconn</KEYWORD2>
- <KEYWORD2>nonconnected</KEYWORD2>
- <KEYWORD2>nonnative</KEYWORD2>
- <KEYWORD2>nonvar</KEYWORD2>
- <KEYWORD2>nonvarying</KEYWORD2>
- <KEYWORD2>normal</KEYWORD2>
- <KEYWORD2>offset</KEYWORD2>
- <KEYWORD2>ofl</KEYWORD2>
- <KEYWORD2>optional</KEYWORD2>
- <KEYWORD2>options</KEYWORD2>
- <KEYWORD2>optlink</KEYWORD2>
- <KEYWORD2>order</KEYWORD2>
- <KEYWORD2>output</KEYWORD2>
- <KEYWORD2>overflow</KEYWORD2>
- <KEYWORD2>P</KEYWORD2>
- <KEYWORD2>pagesize</KEYWORD2>
- <KEYWORD2>parameter</KEYWORD2>
- <KEYWORD2>pic</KEYWORD2>
- <KEYWORD2>picture</KEYWORD2>
- <KEYWORD2>pointer</KEYWORD2>
- <KEYWORD2>pos</KEYWORD2>
- <KEYWORD2>position</KEYWORD2>
- <KEYWORD2>prec</KEYWORD2>
- <KEYWORD2>precision</KEYWORD2>
- <KEYWORD2>print</KEYWORD2>
- <KEYWORD2>ptr</KEYWORD2>
- <KEYWORD2>R</KEYWORD2>
- <KEYWORD2>range</KEYWORD2>
- <KEYWORD2>real</KEYWORD2>
- <KEYWORD2>record</KEYWORD2>
- <KEYWORD2>recursive</KEYWORD2>
- <KEYWORD2>red</KEYWORD2>
- <KEYWORD2>reducible</KEYWORD2>
- <KEYWORD2>reentrant</KEYWORD2>
- <KEYWORD2>refer</KEYWORD2>
- <KEYWORD2>reorder</KEYWORD2>
- <KEYWORD2>reserved</KEYWORD2>
- <KEYWORD2>reserves</KEYWORD2>
- <KEYWORD2>retcode</KEYWORD2>
- <KEYWORD2>returns</KEYWORD2>
- <KEYWORD2>seql</KEYWORD2>
- <KEYWORD2>sequential</KEYWORD2>
- <KEYWORD2>signed</KEYWORD2>
- <KEYWORD2>size</KEYWORD2>
- <KEYWORD2>static</KEYWORD2>
- <KEYWORD2>stdcall</KEYWORD2>
- <KEYWORD2>storage</KEYWORD2>
- <KEYWORD2>stream</KEYWORD2>
- <KEYWORD2>strg</KEYWORD2>
- <KEYWORD2>stringrange</KEYWORD2>
- <KEYWORD2>strz</KEYWORD2>
- <KEYWORD2>stringsize</KEYWORD2>
- <KEYWORD2>subrg</KEYWORD2>
- <KEYWORD2>subscriptrange</KEYWORD2>
- <KEYWORD2>system</KEYWORD2>
- <KEYWORD2>task</KEYWORD2>
- <KEYWORD2>title</KEYWORD2>
- <KEYWORD2>transmit</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <KEYWORD2>ufl</KEYWORD2>
- <KEYWORD2>unal</KEYWORD2>
- <KEYWORD2>unaligned</KEYWORD2>
- <KEYWORD2>unbuf</KEYWORD2>
- <KEYWORD2>unbuffered</KEYWORD2>
- <KEYWORD2>undefinedfile</KEYWORD2>
- <KEYWORD2>underflow</KEYWORD2>
- <KEYWORD2>undf</KEYWORD2>
- <KEYWORD2>union</KEYWORD2>
- <KEYWORD2>unsigned</KEYWORD2>
- <KEYWORD2>update</KEYWORD2>
- <KEYWORD2>value</KEYWORD2>
- <KEYWORD2>var</KEYWORD2>
- <KEYWORD2>variable</KEYWORD2>
- <KEYWORD2>varying</KEYWORD2>
- <KEYWORD2>varyingz</KEYWORD2>
- <KEYWORD2>varz</KEYWORD2>
- <KEYWORD2>wchar</KEYWORD2>
- <KEYWORD2>widechar</KEYWORD2>
- <KEYWORD2>winmain</KEYWORD2>
- <KEYWORD2>wx</KEYWORD2>
- <KEYWORD2>x</KEYWORD2>
- <KEYWORD2>xn</KEYWORD2>
- <KEYWORD2>xu</KEYWORD2>
- <KEYWORD2>zdiv</KEYWORD2>
- <KEYWORD2>zerodivide</KEYWORD2>
-
- <!-- Builtins -->
- <KEYWORD3>abs</KEYWORD3>
- <KEYWORD3>acos</KEYWORD3>
- <KEYWORD3>acosf</KEYWORD3>
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>addr</KEYWORD3>
- <KEYWORD3>address</KEYWORD3>
- <KEYWORD3>addrdata</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>allocation</KEYWORD3>
- <KEYWORD3>allocn</KEYWORD3>
- <KEYWORD3>allocsize</KEYWORD3>
- <KEYWORD3>any</KEYWORD3>
- <KEYWORD3>asin</KEYWORD3>
- <KEYWORD3>asinf</KEYWORD3>
- <KEYWORD3>atan</KEYWORD3>
- <KEYWORD3>atand</KEYWORD3>
- <KEYWORD3>atanf</KEYWORD3>
- <KEYWORD3>atanh</KEYWORD3>
- <KEYWORD3>availablearea</KEYWORD3>
- <KEYWORD3>binaryvalue</KEYWORD3>
- <KEYWORD3>bind</KEYWORD3>
- <KEYWORD3>binvalue</KEYWORD3>
- <KEYWORD3>bitlocation</KEYWORD3>
- <KEYWORD3>bitloc</KEYWORD3>
- <KEYWORD3>bool</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>cast</KEYWORD3>
- <KEYWORD3>cds</KEYWORD3>
- <KEYWORD3>ceil</KEYWORD3>
- <KEYWORD3>center</KEYWORD3>
- <KEYWORD3>centre</KEYWORD3>
- <KEYWORD3>centreleft</KEYWORD3>
- <KEYWORD3>centreleft</KEYWORD3>
- <KEYWORD3>centreright</KEYWORD3>
- <KEYWORD3>centerright</KEYWORD3>
- <KEYWORD3>charg</KEYWORD3>
- <KEYWORD3>chargraphic</KEYWORD3>
- <KEYWORD3>chargval</KEYWORD3>
- <KEYWORD3>checkstg</KEYWORD3>
- <KEYWORD3>collate</KEYWORD3>
- <KEYWORD3>compare</KEYWORD3>
- <KEYWORD3>conjg</KEYWORD3>
- <KEYWORD3>cos</KEYWORD3>
- <KEYWORD3>cosd</KEYWORD3>
- <KEYWORD3>cosf</KEYWORD3>
- <KEYWORD3>cosh</KEYWORD3>
- <KEYWORD3>count</KEYWORD3>
- <KEYWORD3>cs</KEYWORD3>
- <KEYWORD3>cstg</KEYWORD3>
- <KEYWORD3>currentsize</KEYWORD3>
- <KEYWORD3>currentstorage</KEYWORD3>
- <KEYWORD3>datafield</KEYWORD3>
- <KEYWORD3>date</KEYWORD3>
- <KEYWORD3>datetime</KEYWORD3>
- <KEYWORD3>days</KEYWORD3>
- <KEYWORD3>daystodate</KEYWORD3>
- <KEYWORD3>daystosecs</KEYWORD3>
- <KEYWORD3>divide</KEYWORD3>
- <KEYWORD3>empty</KEYWORD3>
- <KEYWORD3>entryaddr</KEYWORD3>
- <KEYWORD3>epsilon</KEYWORD3>
- <KEYWORD3>erfc</KEYWORD3>
- <KEYWORD3>exp</KEYWORD3>
- <KEYWORD3>expf</KEYWORD3>
- <KEYWORD3>exponent</KEYWORD3>
- <KEYWORD3>fileddint</KEYWORD3>
- <KEYWORD3>fileddtest</KEYWORD3>
- <KEYWORD3>fileddword</KEYWORD3>
- <KEYWORD3>fileid</KEYWORD3>
- <KEYWORD3>fileopen</KEYWORD3>
- <KEYWORD3>fileread</KEYWORD3>
- <KEYWORD3>fileseek</KEYWORD3>
- <KEYWORD3>filetell</KEYWORD3>
- <KEYWORD3>filewrite</KEYWORD3>
- <KEYWORD3>first</KEYWORD3>
- <KEYWORD3>floor</KEYWORD3>
- <KEYWORD3>gamma</KEYWORD3>
- <KEYWORD3>getenv</KEYWORD3>
- <KEYWORD3>hbound</KEYWORD3>
- <KEYWORD3>hex</KEYWORD3>
- <KEYWORD3>heximage</KEYWORD3>
- <KEYWORD3>high</KEYWORD3>
- <KEYWORD3>huge</KEYWORD3>
- <KEYWORD3>iand</KEYWORD3>
- <KEYWORD3>ieor</KEYWORD3>
- <KEYWORD3>imag</KEYWORD3>
- <KEYWORD3>index</KEYWORD3>
- <KEYWORD3>inot</KEYWORD3>
- <KEYWORD3>ior</KEYWORD3>
- <KEYWORD3>isigned</KEYWORD3>
- <KEYWORD3>isll</KEYWORD3>
- <KEYWORD3>ismain</KEYWORD3>
- <KEYWORD3>isrl</KEYWORD3>
- <KEYWORD3>iunsigned</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>lbound</KEYWORD3>
- <KEYWORD3>left</KEYWORD3>
- <KEYWORD3>length</KEYWORD3>
- <KEYWORD3>lineno</KEYWORD3>
- <KEYWORD3>loc</KEYWORD3>
- <KEYWORD3>location</KEYWORD3>
- <KEYWORD3>log</KEYWORD3>
- <KEYWORD3>logf</KEYWORD3>
- <KEYWORD3>loggamma</KEYWORD3>
- <KEYWORD3>log2</KEYWORD3>
- <KEYWORD3>log10</KEYWORD3>
- <KEYWORD3>log10f</KEYWORD3>
- <KEYWORD3>low</KEYWORD3>
- <KEYWORD3>lowercase</KEYWORD3>
- <KEYWORD3>lower2</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>maxexp</KEYWORD3>
- <KEYWORD3>maxlength</KEYWORD3>
- <KEYWORD3>min</KEYWORD3>
- <KEYWORD3>minexp</KEYWORD3>
- <KEYWORD3>mod</KEYWORD3>
- <KEYWORD3>mpstr</KEYWORD3>
- <KEYWORD3>multiply</KEYWORD3>
- <KEYWORD3>new</KEYWORD3>
- <KEYWORD3>null</KEYWORD3>
- <KEYWORD3>offestadd</KEYWORD3>
- <KEYWORD3>offestdiff</KEYWORD3>
- <KEYWORD3>offestsubtract</KEYWORD3>
- <KEYWORD3>offestvalue</KEYWORD3>
- <KEYWORD3>omitted</KEYWORD3>
- <KEYWORD3>onchar</KEYWORD3>
- <KEYWORD3>oncode</KEYWORD3>
- <KEYWORD3>oncondond</KEYWORD3>
- <KEYWORD3>oncondid</KEYWORD3>
- <KEYWORD3>oncount</KEYWORD3>
- <KEYWORD3>onfile</KEYWORD3>
- <KEYWORD3>ongsource</KEYWORD3>
- <KEYWORD3>onkey</KEYWORD3>
- <KEYWORD3>onloc</KEYWORD3>
- <KEYWORD3>onsource</KEYWORD3>
- <KEYWORD3>onsubcode</KEYWORD3>
- <KEYWORD3>onwchar</KEYWORD3>
- <KEYWORD3>onwsource</KEYWORD3>
- <KEYWORD3>ordinalname</KEYWORD3>
- <KEYWORD3>ordinalpred</KEYWORD3>
- <KEYWORD3>ordinalsucc</KEYWORD3>
- <KEYWORD3>packagename</KEYWORD3>
- <KEYWORD3>pageno</KEYWORD3>
- <KEYWORD3>places</KEYWORD3>
- <KEYWORD3>pliascii</KEYWORD3>
- <KEYWORD3>plianc</KEYWORD3>
- <KEYWORD3>plickpt</KEYWORD3>
- <KEYWORD3>plidelete</KEYWORD3>
- <KEYWORD3>plidump</KEYWORD3>
- <KEYWORD3>pliebcdic</KEYWORD3>
- <KEYWORD3>plifill</KEYWORD3>
- <KEYWORD3>plifree</KEYWORD3>
- <KEYWORD3>plimove</KEYWORD3>
- <KEYWORD3>pliover</KEYWORD3>
- <KEYWORD3>plirest</KEYWORD3>
- <KEYWORD3>pliretc</KEYWORD3>
- <KEYWORD3>pliretv</KEYWORD3>
- <KEYWORD3>plisaxa</KEYWORD3>
- <KEYWORD3>plisaxb</KEYWORD3>
- <KEYWORD3>plisrta</KEYWORD3>
- <KEYWORD3>plisrtb</KEYWORD3>
- <KEYWORD3>plisrtc</KEYWORD3>
- <KEYWORD3>plisrtd</KEYWORD3>
- <KEYWORD3>pointeradd</KEYWORD3>
- <KEYWORD3>ptradd</KEYWORD3>
- <KEYWORD3>pointerdiff</KEYWORD3>
- <KEYWORD3>ptrdiff</KEYWORD3>
- <KEYWORD3>pointersubtract</KEYWORD3>
- <KEYWORD3>ptrsubtract</KEYWORD3>
- <KEYWORD3>pointervalue</KEYWORD3>
- <KEYWORD3>ptrvalue</KEYWORD3>
- <KEYWORD3>poly</KEYWORD3>
- <KEYWORD3>pred</KEYWORD3>
- <KEYWORD3>present</KEYWORD3>
- <KEYWORD3>procname</KEYWORD3>
- <KEYWORD3>procedurename</KEYWORD3>
- <KEYWORD3>prod</KEYWORD3>
- <KEYWORD3>putenv</KEYWORD3>
- <KEYWORD3>radix</KEYWORD3>
- <KEYWORD3>raise</KEYWORD3>
- <KEYWORD3>random</KEYWORD3>
- <KEYWORD3>rank</KEYWORD3>
- <KEYWORD3>rem</KEYWORD3>
- <KEYWORD3>repattern</KEYWORD3>
- <KEYWORD3>respec</KEYWORD3>
- <KEYWORD3>reverse</KEYWORD3>
- <KEYWORD3>right</KEYWORD3>
- <KEYWORD3>round</KEYWORD3>
- <KEYWORD3>samekey</KEYWORD3>
- <KEYWORD3>scale</KEYWORD3>
- <KEYWORD3>search</KEYWORD3>
- <KEYWORD3>searchr</KEYWORD3>
- <KEYWORD3>secs</KEYWORD3>
- <KEYWORD3>secstodate</KEYWORD3>
- <KEYWORD3>secstodays</KEYWORD3>
- <KEYWORD3>sign</KEYWORD3>
- <KEYWORD3>signed</KEYWORD3>
- <KEYWORD3>sin</KEYWORD3>
- <KEYWORD3>sind</KEYWORD3>
- <KEYWORD3>sinf</KEYWORD3>
- <KEYWORD3>sinh</KEYWORD3>
- <KEYWORD3>size</KEYWORD3>
- <KEYWORD3>sourcefile</KEYWORD3>
- <KEYWORD3>sourceline</KEYWORD3>
- <KEYWORD3>sqrt</KEYWORD3>
- <KEYWORD3>sqrtf</KEYWORD3>
- <KEYWORD3>stg</KEYWORD3>
- <KEYWORD3>storage</KEYWORD3>
- <KEYWORD3>string</KEYWORD3>
- <KEYWORD3>substr</KEYWORD3>
- <KEYWORD3>subtract</KEYWORD3>
- <KEYWORD3>succ</KEYWORD3>
- <KEYWORD3>sum</KEYWORD3>
- <KEYWORD3>sysnull</KEYWORD3>
- <KEYWORD3>tally</KEYWORD3>
- <KEYWORD3>tan</KEYWORD3>
- <KEYWORD3>tand</KEYWORD3>
- <KEYWORD3>tanf</KEYWORD3>
- <KEYWORD3>tanh</KEYWORD3>
- <KEYWORD3>threadid</KEYWORD3>
- <KEYWORD3>time</KEYWORD3>
- <KEYWORD3>tiny</KEYWORD3>
- <KEYWORD3>translate</KEYWORD3>
- <KEYWORD3>trim</KEYWORD3>
- <KEYWORD3>trunc</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>unallocated</KEYWORD3>
- <KEYWORD3>unspec</KEYWORD3>
- <KEYWORD3>uppercase</KEYWORD3>
- <KEYWORD3>valid</KEYWORD3>
- <KEYWORD3>validdate</KEYWORD3>
- <KEYWORD3>varglist</KEYWORD3>
- <KEYWORD3>vargsizer</KEYWORD3>
- <KEYWORD3>verify</KEYWORD3>
- <KEYWORD3>verifyr</KEYWORD3>
- <KEYWORD3>wcharval</KEYWORD3>
- <KEYWORD3>weekday</KEYWORD3>
- <KEYWORD3>whigh</KEYWORD3>
- <KEYWORD3>wlow</KEYWORD3>
- <KEYWORD3>y4date</KEYWORD3>
- <KEYWORD3>y4julian</KEYWORD3>
- <KEYWORD3>y4year</KEYWORD3>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE"
+ HIGHLIGHT_DIGITS="FALSE">
+
+ <!-- C style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- preprocessor statements -->
+ <EOL_SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="*" AT_LINE_START="TRUE">\* *process</EOL_SPAN_REGEXP>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">¬</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
+ MATCH_TYPE="OPERATOR"
+ TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <!-- Statements, keywords and directives -->
+ <KEYWORD1>alias</KEYWORD1>
+ <KEYWORD1>alloc</KEYWORD1>
+ <KEYWORD1>allocate</KEYWORD1>
+ <KEYWORD1>attach</KEYWORD1>
+ <KEYWORD1>begin</KEYWORD1>
+ <KEYWORD1>by</KEYWORD1>
+ <KEYWORD1>byname</KEYWORD1>
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>dcl</KEYWORD1>
+ <KEYWORD1>declare</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>define</KEYWORD1>
+ <KEYWORD1>delay</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>detach</KEYWORD1>
+ <KEYWORD1>dft</KEYWORD1>
+ <KEYWORD1>display</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>downthru</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>entry</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>fetch</KEYWORD1>
+ <KEYWORD1>flush</KEYWORD1>
+ <KEYWORD1>format</KEYWORD1>
+ <KEYWORD1>free</KEYWORD1>
+ <KEYWORD1>from</KEYWORD1>
+ <KEYWORD1>get</KEYWORD1>
+ <KEYWORD1>go</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>ignore</KEYWORD1>
+ <KEYWORD1>%include</KEYWORD1>
+ <KEYWORD1>into</KEYWORD1>
+ <KEYWORD1>iterate</KEYWORD1>
+ <KEYWORD1>key</KEYWORD1>
+ <KEYWORD1>keyfrom</KEYWORD1>
+ <KEYWORD1>keyto</KEYWORD1>
+ <KEYWORD1>leave</KEYWORD1>
+ <KEYWORD1>line</KEYWORD1>
+ <KEYWORD1>locate</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+ <KEYWORD1>name</KEYWORD1>
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>open</KEYWORD1>
+ <KEYWORD1>ordinal</KEYWORD1>
+ <KEYWORD1>other</KEYWORD1>
+ <KEYWORD1>otherwise</KEYWORD1>
+ <KEYWORD1>package</KEYWORD1>
+ <KEYWORD1>page</KEYWORD1>
+ <KEYWORD1>proc</KEYWORD1>
+ <KEYWORD1>procedure</KEYWORD1>
+ <KEYWORD1>put</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>release</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>reply</KEYWORD1>
+ <KEYWORD1>resignal</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>revert</KEYWORD1>
+ <KEYWORD1>rewrite</KEYWORD1>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>signal</KEYWORD1>
+ <KEYWORD1>skip</KEYWORD1>
+ <KEYWORD1>snap</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>structure</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>thread</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>tstack</KEYWORD1>
+ <KEYWORD1>unlock</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>upthru</KEYWORD1>
+ <KEYWORD1>wait</KEYWORD1>
+ <KEYWORD1>when</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>write</KEYWORD1>
+
+ <!-- Options & attributes -->
+ <KEYWORD2>A</KEYWORD2>
+ <KEYWORD2>abnormal</KEYWORD2>
+ <KEYWORD2>aligned</KEYWORD2>
+ <KEYWORD2>anycond</KEYWORD2>
+ <KEYWORD2>anycondition</KEYWORD2>
+ <KEYWORD2>area</KEYWORD2>
+ <KEYWORD2>asgn</KEYWORD2>
+ <KEYWORD2>asm</KEYWORD2>
+ <KEYWORD2>assembler</KEYWORD2>
+ <KEYWORD2>assignable</KEYWORD2>
+ <KEYWORD2>attn</KEYWORD2>
+ <KEYWORD2>attention</KEYWORD2>
+ <KEYWORD2>auto</KEYWORD2>
+ <KEYWORD2>automatic</KEYWORD2>
+ <KEYWORD2>b</KEYWORD2>
+ <KEYWORD2>b3</KEYWORD2>
+ <KEYWORD2>b4</KEYWORD2>
+ <KEYWORD2>based</KEYWORD2>
+ <KEYWORD2>bigendian</KEYWORD2>
+ <KEYWORD2>bin</KEYWORD2>
+ <KEYWORD2>binary</KEYWORD2>
+ <KEYWORD2>bit</KEYWORD2>
+ <KEYWORD2>buf</KEYWORD2>
+ <KEYWORD2>buffered</KEYWORD2>
+ <KEYWORD2>builtin</KEYWORD2>
+ <KEYWORD2>bx</KEYWORD2>
+ <KEYWORD2>byaddr</KEYWORD2>
+ <KEYWORD2>byvalue</KEYWORD2>
+ <KEYWORD2>C</KEYWORD2>
+ <KEYWORD2>cdecl</KEYWORD2>
+ <KEYWORD2>cell</KEYWORD2>
+ <KEYWORD2>char</KEYWORD2>
+ <KEYWORD2>character</KEYWORD2>
+ <KEYWORD2>charg</KEYWORD2>
+ <KEYWORD2>chargraphic</KEYWORD2>
+ <KEYWORD2>cobol</KEYWORD2>
+ <KEYWORD2>column</KEYWORD2>
+ <KEYWORD2>complex</KEYWORD2>
+ <KEYWORD2>cond</KEYWORD2>
+ <KEYWORD2>condition</KEYWORD2>
+ <KEYWORD2>conn</KEYWORD2>
+ <KEYWORD2>connected</KEYWORD2>
+ <KEYWORD2>controlled</KEYWORD2>
+ <KEYWORD2>conv</KEYWORD2>
+ <KEYWORD2>conversion</KEYWORD2>
+ <KEYWORD2>cplx</KEYWORD2>
+ <KEYWORD2>ctl</KEYWORD2>
+ <KEYWORD2>data</KEYWORD2>
+ <KEYWORD2>date</KEYWORD2>
+ <KEYWORD2>dec</KEYWORD2>
+ <KEYWORD2>decimal</KEYWORD2>
+ <KEYWORD2>def</KEYWORD2>
+ <KEYWORD2>defined</KEYWORD2>
+ <KEYWORD2>descriptor</KEYWORD2>
+ <KEYWORD2>descriptors</KEYWORD2>
+ <KEYWORD2>dim</KEYWORD2>
+ <KEYWORD2>dimension</KEYWORD2>
+ <KEYWORD2>direct</KEYWORD2>
+ <KEYWORD2>E</KEYWORD2>
+ <KEYWORD2>edit</KEYWORD2>
+ <KEYWORD2>endfile</KEYWORD2>
+ <KEYWORD2>endpage</KEYWORD2>
+ <KEYWORD2>env</KEYWORD2>
+ <KEYWORD2>environment</KEYWORD2>
+ <KEYWORD2>error</KEYWORD2>
+ <KEYWORD2>exclusive</KEYWORD2>
+ <KEYWORD2>exports</KEYWORD2>
+ <KEYWORD2>ext</KEYWORD2>
+ <KEYWORD2>external</KEYWORD2>
+ <KEYWORD2>F</KEYWORD2>
+ <KEYWORD2>fetchable</KEYWORD2>
+ <KEYWORD2>file</KEYWORD2>
+ <KEYWORD2>finish</KEYWORD2>
+ <KEYWORD2>fixed</KEYWORD2>
+ <KEYWORD2>fixedoverflow</KEYWORD2>
+ <KEYWORD2>float</KEYWORD2>
+ <KEYWORD2>fofl</KEYWORD2>
+ <KEYWORD2>format</KEYWORD2>
+ <KEYWORD2>fortran</KEYWORD2>
+ <KEYWORD2>fromalien</KEYWORD2>
+ <KEYWORD2>g</KEYWORD2>
+ <KEYWORD2>generic</KEYWORD2>
+ <KEYWORD2>graphic</KEYWORD2>
+ <KEYWORD2>gx</KEYWORD2>
+ <KEYWORD2>handle</KEYWORD2>
+ <KEYWORD2>hexadec</KEYWORD2>
+ <KEYWORD2>ieee</KEYWORD2>
+ <KEYWORD2>imported</KEYWORD2>
+ <KEYWORD2>init</KEYWORD2>
+ <KEYWORD2>initial</KEYWORD2>
+ <KEYWORD2>inline</KEYWORD2>
+ <KEYWORD2>input</KEYWORD2>
+ <KEYWORD2>inter</KEYWORD2>
+ <KEYWORD2>internal</KEYWORD2>
+ <KEYWORD2>invalidop</KEYWORD2>
+ <KEYWORD2>irred</KEYWORD2>
+ <KEYWORD2>irreducible</KEYWORD2>
+ <KEYWORD2>keyed</KEYWORD2>
+ <KEYWORD2>L</KEYWORD2>
+ <KEYWORD2>label</KEYWORD2>
+ <KEYWORD2>like</KEYWORD2>
+ <KEYWORD2>limited</KEYWORD2>
+ <KEYWORD2>linesize</KEYWORD2>
+ <KEYWORD2>linkage</KEYWORD2>
+ <KEYWORD2>list</KEYWORD2>
+ <KEYWORD2>littleendian</KEYWORD2>
+ <KEYWORD2>m</KEYWORD2>
+ <KEYWORD2>main</KEYWORD2>
+ <KEYWORD2>native</KEYWORD2>
+ <KEYWORD2>nonasgn</KEYWORD2>
+ <KEYWORD2>nocharg</KEYWORD2>
+ <KEYWORD2>nochargraphic</KEYWORD2>
+ <KEYWORD2>nodescriptor</KEYWORD2>
+ <KEYWORD2>noexecops</KEYWORD2>
+ <KEYWORD2>nomap</KEYWORD2>
+ <KEYWORD2>nomapin</KEYWORD2>
+ <KEYWORD2>nomapout</KEYWORD2>
+ <KEYWORD2>nonasgn</KEYWORD2>
+ <KEYWORD2>nonassignable</KEYWORD2>
+ <KEYWORD2>nonconn</KEYWORD2>
+ <KEYWORD2>nonconnected</KEYWORD2>
+ <KEYWORD2>nonnative</KEYWORD2>
+ <KEYWORD2>nonvar</KEYWORD2>
+ <KEYWORD2>nonvarying</KEYWORD2>
+ <KEYWORD2>normal</KEYWORD2>
+ <KEYWORD2>offset</KEYWORD2>
+ <KEYWORD2>ofl</KEYWORD2>
+ <KEYWORD2>optional</KEYWORD2>
+ <KEYWORD2>options</KEYWORD2>
+ <KEYWORD2>optlink</KEYWORD2>
+ <KEYWORD2>order</KEYWORD2>
+ <KEYWORD2>output</KEYWORD2>
+ <KEYWORD2>overflow</KEYWORD2>
+ <KEYWORD2>P</KEYWORD2>
+ <KEYWORD2>pagesize</KEYWORD2>
+ <KEYWORD2>parameter</KEYWORD2>
+ <KEYWORD2>pic</KEYWORD2>
+ <KEYWORD2>picture</KEYWORD2>
+ <KEYWORD2>pointer</KEYWORD2>
+ <KEYWORD2>pos</KEYWORD2>
+ <KEYWORD2>position</KEYWORD2>
+ <KEYWORD2>prec</KEYWORD2>
+ <KEYWORD2>precision</KEYWORD2>
+ <KEYWORD2>print</KEYWORD2>
+ <KEYWORD2>ptr</KEYWORD2>
+ <KEYWORD2>R</KEYWORD2>
+ <KEYWORD2>range</KEYWORD2>
+ <KEYWORD2>real</KEYWORD2>
+ <KEYWORD2>record</KEYWORD2>
+ <KEYWORD2>recursive</KEYWORD2>
+ <KEYWORD2>red</KEYWORD2>
+ <KEYWORD2>reducible</KEYWORD2>
+ <KEYWORD2>reentrant</KEYWORD2>
+ <KEYWORD2>refer</KEYWORD2>
+ <KEYWORD2>reorder</KEYWORD2>
+ <KEYWORD2>reserved</KEYWORD2>
+ <KEYWORD2>reserves</KEYWORD2>
+ <KEYWORD2>retcode</KEYWORD2>
+ <KEYWORD2>returns</KEYWORD2>
+ <KEYWORD2>seql</KEYWORD2>
+ <KEYWORD2>sequential</KEYWORD2>
+ <KEYWORD2>signed</KEYWORD2>
+ <KEYWORD2>size</KEYWORD2>
+ <KEYWORD2>static</KEYWORD2>
+ <KEYWORD2>stdcall</KEYWORD2>
+ <KEYWORD2>storage</KEYWORD2>
+ <KEYWORD2>stream</KEYWORD2>
+ <KEYWORD2>strg</KEYWORD2>
+ <KEYWORD2>stringrange</KEYWORD2>
+ <KEYWORD2>strz</KEYWORD2>
+ <KEYWORD2>stringsize</KEYWORD2>
+ <KEYWORD2>subrg</KEYWORD2>
+ <KEYWORD2>subscriptrange</KEYWORD2>
+ <KEYWORD2>system</KEYWORD2>
+ <KEYWORD2>task</KEYWORD2>
+ <KEYWORD2>title</KEYWORD2>
+ <KEYWORD2>transmit</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>ufl</KEYWORD2>
+ <KEYWORD2>unal</KEYWORD2>
+ <KEYWORD2>unaligned</KEYWORD2>
+ <KEYWORD2>unbuf</KEYWORD2>
+ <KEYWORD2>unbuffered</KEYWORD2>
+ <KEYWORD2>undefinedfile</KEYWORD2>
+ <KEYWORD2>underflow</KEYWORD2>
+ <KEYWORD2>undf</KEYWORD2>
+ <KEYWORD2>union</KEYWORD2>
+ <KEYWORD2>unsigned</KEYWORD2>
+ <KEYWORD2>update</KEYWORD2>
+ <KEYWORD2>value</KEYWORD2>
+ <KEYWORD2>var</KEYWORD2>
+ <KEYWORD2>variable</KEYWORD2>
+ <KEYWORD2>varying</KEYWORD2>
+ <KEYWORD2>varyingz</KEYWORD2>
+ <KEYWORD2>varz</KEYWORD2>
+ <KEYWORD2>wchar</KEYWORD2>
+ <KEYWORD2>widechar</KEYWORD2>
+ <KEYWORD2>winmain</KEYWORD2>
+ <KEYWORD2>wx</KEYWORD2>
+ <KEYWORD2>x</KEYWORD2>
+ <KEYWORD2>xn</KEYWORD2>
+ <KEYWORD2>xu</KEYWORD2>
+ <KEYWORD2>zdiv</KEYWORD2>
+ <KEYWORD2>zerodivide</KEYWORD2>
+
+ <!-- Builtins -->
+ <KEYWORD3>abs</KEYWORD3>
+ <KEYWORD3>acos</KEYWORD3>
+ <KEYWORD3>acosf</KEYWORD3>
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>addr</KEYWORD3>
+ <KEYWORD3>address</KEYWORD3>
+ <KEYWORD3>addrdata</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>allocation</KEYWORD3>
+ <KEYWORD3>allocn</KEYWORD3>
+ <KEYWORD3>allocsize</KEYWORD3>
+ <KEYWORD3>any</KEYWORD3>
+ <KEYWORD3>asin</KEYWORD3>
+ <KEYWORD3>asinf</KEYWORD3>
+ <KEYWORD3>atan</KEYWORD3>
+ <KEYWORD3>atand</KEYWORD3>
+ <KEYWORD3>atanf</KEYWORD3>
+ <KEYWORD3>atanh</KEYWORD3>
+ <KEYWORD3>availablearea</KEYWORD3>
+ <KEYWORD3>binaryvalue</KEYWORD3>
+ <KEYWORD3>bind</KEYWORD3>
+ <KEYWORD3>binvalue</KEYWORD3>
+ <KEYWORD3>bitlocation</KEYWORD3>
+ <KEYWORD3>bitloc</KEYWORD3>
+ <KEYWORD3>bool</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>cast</KEYWORD3>
+ <KEYWORD3>cds</KEYWORD3>
+ <KEYWORD3>ceil</KEYWORD3>
+ <KEYWORD3>center</KEYWORD3>
+ <KEYWORD3>centre</KEYWORD3>
+ <KEYWORD3>centreleft</KEYWORD3>
+ <KEYWORD3>centreleft</KEYWORD3>
+ <KEYWORD3>centreright</KEYWORD3>
+ <KEYWORD3>centerright</KEYWORD3>
+ <KEYWORD3>charg</KEYWORD3>
+ <KEYWORD3>chargraphic</KEYWORD3>
+ <KEYWORD3>chargval</KEYWORD3>
+ <KEYWORD3>checkstg</KEYWORD3>
+ <KEYWORD3>collate</KEYWORD3>
+ <KEYWORD3>compare</KEYWORD3>
+ <KEYWORD3>conjg</KEYWORD3>
+ <KEYWORD3>cos</KEYWORD3>
+ <KEYWORD3>cosd</KEYWORD3>
+ <KEYWORD3>cosf</KEYWORD3>
+ <KEYWORD3>cosh</KEYWORD3>
+ <KEYWORD3>count</KEYWORD3>
+ <KEYWORD3>cs</KEYWORD3>
+ <KEYWORD3>cstg</KEYWORD3>
+ <KEYWORD3>currentsize</KEYWORD3>
+ <KEYWORD3>currentstorage</KEYWORD3>
+ <KEYWORD3>datafield</KEYWORD3>
+ <KEYWORD3>date</KEYWORD3>
+ <KEYWORD3>datetime</KEYWORD3>
+ <KEYWORD3>days</KEYWORD3>
+ <KEYWORD3>daystodate</KEYWORD3>
+ <KEYWORD3>daystosecs</KEYWORD3>
+ <KEYWORD3>divide</KEYWORD3>
+ <KEYWORD3>empty</KEYWORD3>
+ <KEYWORD3>entryaddr</KEYWORD3>
+ <KEYWORD3>epsilon</KEYWORD3>
+ <KEYWORD3>erfc</KEYWORD3>
+ <KEYWORD3>exp</KEYWORD3>
+ <KEYWORD3>expf</KEYWORD3>
+ <KEYWORD3>exponent</KEYWORD3>
+ <KEYWORD3>fileddint</KEYWORD3>
+ <KEYWORD3>fileddtest</KEYWORD3>
+ <KEYWORD3>fileddword</KEYWORD3>
+ <KEYWORD3>fileid</KEYWORD3>
+ <KEYWORD3>fileopen</KEYWORD3>
+ <KEYWORD3>fileread</KEYWORD3>
+ <KEYWORD3>fileseek</KEYWORD3>
+ <KEYWORD3>filetell</KEYWORD3>
+ <KEYWORD3>filewrite</KEYWORD3>
+ <KEYWORD3>first</KEYWORD3>
+ <KEYWORD3>floor</KEYWORD3>
+ <KEYWORD3>gamma</KEYWORD3>
+ <KEYWORD3>getenv</KEYWORD3>
+ <KEYWORD3>hbound</KEYWORD3>
+ <KEYWORD3>hex</KEYWORD3>
+ <KEYWORD3>heximage</KEYWORD3>
+ <KEYWORD3>high</KEYWORD3>
+ <KEYWORD3>huge</KEYWORD3>
+ <KEYWORD3>iand</KEYWORD3>
+ <KEYWORD3>ieor</KEYWORD3>
+ <KEYWORD3>imag</KEYWORD3>
+ <KEYWORD3>index</KEYWORD3>
+ <KEYWORD3>inot</KEYWORD3>
+ <KEYWORD3>ior</KEYWORD3>
+ <KEYWORD3>isigned</KEYWORD3>
+ <KEYWORD3>isll</KEYWORD3>
+ <KEYWORD3>ismain</KEYWORD3>
+ <KEYWORD3>isrl</KEYWORD3>
+ <KEYWORD3>iunsigned</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>lbound</KEYWORD3>
+ <KEYWORD3>left</KEYWORD3>
+ <KEYWORD3>length</KEYWORD3>
+ <KEYWORD3>lineno</KEYWORD3>
+ <KEYWORD3>loc</KEYWORD3>
+ <KEYWORD3>location</KEYWORD3>
+ <KEYWORD3>log</KEYWORD3>
+ <KEYWORD3>logf</KEYWORD3>
+ <KEYWORD3>loggamma</KEYWORD3>
+ <KEYWORD3>log2</KEYWORD3>
+ <KEYWORD3>log10</KEYWORD3>
+ <KEYWORD3>log10f</KEYWORD3>
+ <KEYWORD3>low</KEYWORD3>
+ <KEYWORD3>lowercase</KEYWORD3>
+ <KEYWORD3>lower2</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>maxexp</KEYWORD3>
+ <KEYWORD3>maxlength</KEYWORD3>
+ <KEYWORD3>min</KEYWORD3>
+ <KEYWORD3>minexp</KEYWORD3>
+ <KEYWORD3>mod</KEYWORD3>
+ <KEYWORD3>mpstr</KEYWORD3>
+ <KEYWORD3>multiply</KEYWORD3>
+ <KEYWORD3>new</KEYWORD3>
+ <KEYWORD3>null</KEYWORD3>
+ <KEYWORD3>offestadd</KEYWORD3>
+ <KEYWORD3>offestdiff</KEYWORD3>
+ <KEYWORD3>offestsubtract</KEYWORD3>
+ <KEYWORD3>offestvalue</KEYWORD3>
+ <KEYWORD3>omitted</KEYWORD3>
+ <KEYWORD3>onchar</KEYWORD3>
+ <KEYWORD3>oncode</KEYWORD3>
+ <KEYWORD3>oncondond</KEYWORD3>
+ <KEYWORD3>oncondid</KEYWORD3>
+ <KEYWORD3>oncount</KEYWORD3>
+ <KEYWORD3>onfile</KEYWORD3>
+ <KEYWORD3>ongsource</KEYWORD3>
+ <KEYWORD3>onkey</KEYWORD3>
+ <KEYWORD3>onloc</KEYWORD3>
+ <KEYWORD3>onsource</KEYWORD3>
+ <KEYWORD3>onsubcode</KEYWORD3>
+ <KEYWORD3>onwchar</KEYWORD3>
+ <KEYWORD3>onwsource</KEYWORD3>
+ <KEYWORD3>ordinalname</KEYWORD3>
+ <KEYWORD3>ordinalpred</KEYWORD3>
+ <KEYWORD3>ordinalsucc</KEYWORD3>
+ <KEYWORD3>packagename</KEYWORD3>
+ <KEYWORD3>pageno</KEYWORD3>
+ <KEYWORD3>places</KEYWORD3>
+ <KEYWORD3>pliascii</KEYWORD3>
+ <KEYWORD3>plianc</KEYWORD3>
+ <KEYWORD3>plickpt</KEYWORD3>
+ <KEYWORD3>plidelete</KEYWORD3>
+ <KEYWORD3>plidump</KEYWORD3>
+ <KEYWORD3>pliebcdic</KEYWORD3>
+ <KEYWORD3>plifill</KEYWORD3>
+ <KEYWORD3>plifree</KEYWORD3>
+ <KEYWORD3>plimove</KEYWORD3>
+ <KEYWORD3>pliover</KEYWORD3>
+ <KEYWORD3>plirest</KEYWORD3>
+ <KEYWORD3>pliretc</KEYWORD3>
+ <KEYWORD3>pliretv</KEYWORD3>
+ <KEYWORD3>plisaxa</KEYWORD3>
+ <KEYWORD3>plisaxb</KEYWORD3>
+ <KEYWORD3>plisrta</KEYWORD3>
+ <KEYWORD3>plisrtb</KEYWORD3>
+ <KEYWORD3>plisrtc</KEYWORD3>
+ <KEYWORD3>plisrtd</KEYWORD3>
+ <KEYWORD3>pointeradd</KEYWORD3>
+ <KEYWORD3>ptradd</KEYWORD3>
+ <KEYWORD3>pointerdiff</KEYWORD3>
+ <KEYWORD3>ptrdiff</KEYWORD3>
+ <KEYWORD3>pointersubtract</KEYWORD3>
+ <KEYWORD3>ptrsubtract</KEYWORD3>
+ <KEYWORD3>pointervalue</KEYWORD3>
+ <KEYWORD3>ptrvalue</KEYWORD3>
+ <KEYWORD3>poly</KEYWORD3>
+ <KEYWORD3>pred</KEYWORD3>
+ <KEYWORD3>present</KEYWORD3>
+ <KEYWORD3>procname</KEYWORD3>
+ <KEYWORD3>procedurename</KEYWORD3>
+ <KEYWORD3>prod</KEYWORD3>
+ <KEYWORD3>putenv</KEYWORD3>
+ <KEYWORD3>radix</KEYWORD3>
+ <KEYWORD3>raise</KEYWORD3>
+ <KEYWORD3>random</KEYWORD3>
+ <KEYWORD3>rank</KEYWORD3>
+ <KEYWORD3>rem</KEYWORD3>
+ <KEYWORD3>repattern</KEYWORD3>
+ <KEYWORD3>respec</KEYWORD3>
+ <KEYWORD3>reverse</KEYWORD3>
+ <KEYWORD3>right</KEYWORD3>
+ <KEYWORD3>round</KEYWORD3>
+ <KEYWORD3>samekey</KEYWORD3>
+ <KEYWORD3>scale</KEYWORD3>
+ <KEYWORD3>search</KEYWORD3>
+ <KEYWORD3>searchr</KEYWORD3>
+ <KEYWORD3>secs</KEYWORD3>
+ <KEYWORD3>secstodate</KEYWORD3>
+ <KEYWORD3>secstodays</KEYWORD3>
+ <KEYWORD3>sign</KEYWORD3>
+ <KEYWORD3>signed</KEYWORD3>
+ <KEYWORD3>sin</KEYWORD3>
+ <KEYWORD3>sind</KEYWORD3>
+ <KEYWORD3>sinf</KEYWORD3>
+ <KEYWORD3>sinh</KEYWORD3>
+ <KEYWORD3>size</KEYWORD3>
+ <KEYWORD3>sourcefile</KEYWORD3>
+ <KEYWORD3>sourceline</KEYWORD3>
+ <KEYWORD3>sqrt</KEYWORD3>
+ <KEYWORD3>sqrtf</KEYWORD3>
+ <KEYWORD3>stg</KEYWORD3>
+ <KEYWORD3>storage</KEYWORD3>
+ <KEYWORD3>string</KEYWORD3>
+ <KEYWORD3>substr</KEYWORD3>
+ <KEYWORD3>subtract</KEYWORD3>
+ <KEYWORD3>succ</KEYWORD3>
+ <KEYWORD3>sum</KEYWORD3>
+ <KEYWORD3>sysnull</KEYWORD3>
+ <KEYWORD3>tally</KEYWORD3>
+ <KEYWORD3>tan</KEYWORD3>
+ <KEYWORD3>tand</KEYWORD3>
+ <KEYWORD3>tanf</KEYWORD3>
+ <KEYWORD3>tanh</KEYWORD3>
+ <KEYWORD3>threadid</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>tiny</KEYWORD3>
+ <KEYWORD3>translate</KEYWORD3>
+ <KEYWORD3>trim</KEYWORD3>
+ <KEYWORD3>trunc</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>unallocated</KEYWORD3>
+ <KEYWORD3>unspec</KEYWORD3>
+ <KEYWORD3>uppercase</KEYWORD3>
+ <KEYWORD3>valid</KEYWORD3>
+ <KEYWORD3>validdate</KEYWORD3>
+ <KEYWORD3>varglist</KEYWORD3>
+ <KEYWORD3>vargsizer</KEYWORD3>
+ <KEYWORD3>verify</KEYWORD3>
+ <KEYWORD3>verifyr</KEYWORD3>
+ <KEYWORD3>wcharval</KEYWORD3>
+ <KEYWORD3>weekday</KEYWORD3>
+ <KEYWORD3>whigh</KEYWORD3>
+ <KEYWORD3>wlow</KEYWORD3>
+ <KEYWORD3>y4date</KEYWORD3>
+ <KEYWORD3>y4julian</KEYWORD3>
+ <KEYWORD3>y4year</KEYWORD3>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/plaintex.xml b/jEdit/modes/plaintex.xml
new file mode 100644
index 0000000..4b7c752
--- /dev/null
+++ b/jEdit/modes/plaintex.xml
@@ -0,0 +1,2886 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--____________________________________________________________________
+ Plain TeX Syntax Highlighting for jEdit
+
+ by James Nicholl
+
+ jnicholl17 at yahoo.com
+________________________________________________________________________
+ - Forward -
+________________________________________________________________________
+
+ This syntax highlighting package is primarily based on a list of well organized and easily processed control sequence names that can be obtained at:
+
+ http://www.math.upenn.edu/tex_docs/help/csname.txt
+
+ Control sequences contained in the aforementioned document are included here with some exceptions. I removed from this list any control sequence not supported by plain TeX. It is currently my belief that this document details the control sequences in some form of AMS TeX. There were some control sequences that contained the character '@'. It is my understanding that the intention behind using a '@' character in a control sequence is to signify that the control sequence is private. I have therefore removed all control sequences that include '@'.
+
+ Continuing along this line of reason, I chose not to extend this naming restriction to user defined control sequences. They are recognized as being of the form \[a-zA-Z@][a-zA-Z@]* In other words, a user defined control sequence is prefixed by a backslash '\' and contains one or more characters from the set of letter characters union '@'. If you were silly enough to reassign your escape character then this package isn't for you, and I'm sure you've realized by now that there really aren't any syntax highlighting packages available for your exotic dialect of TeX.
+________________________________________________________________________
+ - Description -
+________________________________________________________________________
+
+ Take some time and assign a color scheme that makes sense for you. Syntax highlighting can illuminate some simple typing errors and improve your programming by allowing you to quickly and effortlessly identify key structures in your code.
+
+ This is a work in progress. Eventually, with enough experience programming TeX, I should have a better idea of how to categorize everything, and a better idea of what there is to categorize. It's just a matter of working with this xml document always open and making adjustments when the opportunity arises.
+
+ Any unrecognized control sequences of the form "\[a-zA-Z@]" are considered to be user defined.
+
+________________________________________________________________________
+ - Description -
+________________________________________________________________________
+
+
+COMMENT1 - Comments
+
+COMMENT2 - Allocations
+
+COMMENT3 - Assignments
+
+COMMENT4 - Registers
+
+DIGIT - Macro (definition) arguments of the form #[1-9]
+
+FUNCTION - Definitions
+
+INVALID - UNUSED
+
+KEYWORD1 - Plain TeX control sequences of the form \[a-zA-Z]*
+
+KEYWORD2 - Character Control Sequences
+
+KEYWORD3 - Conditional Control Sequences
+
+KEYWORD4 - Parameters: integer, dimension, glue, muglue and token
+
+LABEL - Unrecognized control sequences of the form \[a-zA-Z@]*
+
+LITERAL1 - Other reserved characters. & ~ ^ _
+
+LITERAL2 - TeX dimensions of the form [0-9]*.[0-9]*[pt pc bp in cm mm cc dd]
+
+LITERAL3 - Punctuation , . ; : ' " ` ! ? \ \par
+
+LITERAL4 - Other Characters ( ) + - lessthan greaterthan = / * |
+
+MARKUP - Extends over math mode. It is highly recommended that this type be
+ assigned a background color markedly different than the default
+ background color. You don't want to lose track of your dollar
+ signs!
+
+OPERATOR - TeX grouping brackets {...} , square argument brackets [...] , in
+ line math mode dollar signs $...$ and paragraph math mode double
+ dollar signs $$...$$ Assign these symbols bright colors so they
+ stand out!
+
+_______________________________________________________________________________
+ - References -
+_______________________________________________________________________________
+
+ In the course of preparing this package I have consulted the famous TeXbook many times. I'm sure I can't say anything positive about this book that hasn't already been said. It's the first book an ambitious student of plain TeX should read, and if it's the only book you read on TeX it's probably enough.
+
+Knuth, Donald. The TeXbook. Twentieth Printing. Addison-Wesley:
+ Reading, MA, USA, 1991.
+
+ After absorbing the material in the TeXbook I found an excellent electronic reference manual through the ubiquitous internet. For someone that appreciates explicit, rigorous and thorough language definition this is an ideal programmer's companion. A printed copy can be purchased and the PDF version can be downloaded free of charge through the author's website.
+
+ http://eijkhout.net/texbytopic/texbytopic.html
+
+Eijkhout, Victor. TeX by Topic. Reprinted 1993. Addison-Wesley:
+ UK, 1991.
+
+ As I am a prolific Googler, many random and forgettable forums, blogs, wikis, and all manner of dubiously monickered digital media were consulted while preparing this package. I think I can safely say that if I had confined myself to the following few websites I would have found everything I needed.
+
+The American Mathematical Society
+ http://www.ams.org/cmlhtml/texcodes.html
+
+CTAN
+
+TUG
+
+
+ It may not be standard to include bibliographical information for such a small computer program, but if you don't recognize any of these sources then I have provided you with a great service. Contained in these references are answeres to all you'll ever want to know about TeX and probably more. I wish I had read comments just like these several months ago!
+________________________________________________________________________
+ - The Big List -
+________________________________________________________________________
+
+ Starting with the documentation noted, I have extracted and categorized the following control sequences and syntactic entities. There are many more entities in the body of code than are not listed here. These are just the ones that I have taken special care to highlight.
+________________________________________________________________________
+ - Allocations -
+
+ Highlight as COMMENT2
+
+ \newlinechar
+ \newmuskip
+ \newinsert
+ \newwrite
+ \newdimen
+ \newcount
+ \newtoks
+ \newskip
+ \newread
+ \newhelp
+ \newfam
+ \newbox
+ \newif
+
+ (\\newlinechar<|\\newmuskip\\newinsert<|\\newwrite<|\\newdimen<|\\newcount<|\\newtoks<|\\newskip<|\\newread<|\\newhelp<|\\newfam<|\\newbox<|\\newif<)
+_______________________________________________________________________________
+ - Assignments -
+
+ Highlight as COMMENT3
+
+ \futurelet
+ \let
+
+ (\\futurelet<|\\let<)
+_______________________________________________________________________________
+ - Registers -
+
+ Highlight as COMMENT4
+
+ \muskip([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))
+ \muskip[0-9][0-9]
+ \muskip[0-9]
+ \muskip
+ \dimen([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))
+ \dimen[0-9][0-9]
+ \dimen[0-9]
+ \dimen
+ \count([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))
+ \count[0-9][0-9]
+ \count[0-9]
+ \count
+ \toks([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))
+ \toks[0-9][0-9]
+ \toks[0-9]
+ \toks
+ \skip([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))
+ \skip[0-9][0-9]
+ \skip[0-9]
+ \skip
+ \box([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))
+ \box[0-9][0-9]
+ \box[0-9]
+ \box
+_______________________________________________________________________________
+ - Definitions -
+
+ Highlight as FUNCTION
+
+ \mathchardef
+ \muskipdef
+ \endcsname
+ \dimendef
+ \countdef
+ \toksdef
+ \skipdef
+ \chardef
+ \csname
+ \global
+ \outer
+ \xdef
+ \gdef
+ \long
+ \edef
+ \def
+
+ (\\mathchardef<|\\muskipdef<|\\endcsname<|\\dimendef<|\\countdef<|\\toksdef<|\\skipdef<|\\chardef<|\\csname<|\\global<|\\outer<|\\xdef<|\\gdef<|\\long<|\\edef<|\\def<)
+_______________________________________________________________________________
+ - Control Sequences Representing Characters -
+
+ Highlight as KEYWORD2
+
+ http://www.ams.org/cmlhtml/texcodes.html
+ and Knuth: Chapter 8
+
+ The Escaped Versions of TeX's Reserved Characters
+ \#
+ \$
+ \%
+ \&
+ \{
+ \}
+ \_
+ \backslash
+
+ Characters Described by Number
+ \char<0-255>
+ \char'<octal number 0-377>
+ \char"<hex number 0-FF>
+ ^^[ASCII char 0-127]
+ ^^[lowercase hex 00-ff]
+
+ The Token for Obtaining an ASCII Character Index
+ `[character or control sequence]
+
+ Control Sequences for Accents
+ \utilde
+ \lfhook
+ \cfudot
+ \candra
+ \acudot
+ \uarc
+ \cfac
+ \`
+ \'
+ \^
+ \"
+ \H
+ \~
+ \c
+ \=
+ \b
+ \.
+ \d
+ \r
+ \k
+ \u
+ \v
+ \t
+
+ Accented Characters and Ligatures
+ \cdprime
+ \cprime
+ \Dbar
+ \dbar
+ \eth
+ \ss
+ \OE
+ \oe
+ \aa
+ \AA
+ \ae
+ \AE
+ \o
+ \O
+ \l
+ \L
+ \j
+ \i
+_______________________________________________________________________________
+ - Conditional Control Sequences -
+
+ Highlight as KEYWORD3
+
+ See Eijkhout: pg 140 for details.
+
+ \ifvmode
+ \ifmmode
+ \ifinner
+ \ifhmode
+ \iffalse
+ \ifvoid
+ \ifvbox
+ \iftrue
+ \ifhbox
+ \ifcase
+ \ifodd
+ \ifnum
+ \ifeof
+ \ifdim
+ \ifcat
+ \else
+ \or
+ \ifx
+ \if
+ \fi
+
+ (\\ifvmode<|\\ifmmode<|\\ifinner<|\\ifhmode<|\\iffalse<|\\ifvoid<|\\ifvbox<|\\iftrue<|\\ifhbox<|\\ifcase<|\\ifodd<|\\ifnum<|\\ifeof<|\\ifdim<|\\ifcat<|\\else<|\\or<|\\ifx<|\\if<|\\fi<)
+
+_______________________________________________________________________________
+ - Parameters -
+
+ Highlight as KEYWORD4
+
+ See Knuth: pg 272-275 for details.
+
+ Integer Parameters
+ \doublehyphendemerits
+ \finalhyphendemerits
+ \displaywidowpenalty
+ \postdisplaypenalty
+ \tracingparagraphs
+ \errorcontextlines
+ \defaulthyphenchar
+ \tracinglostchars
+ \predisplaypenaty
+ \interlinepenalty
+ \tracingrestores
+ \tracingcommands
+ \floatingpenalty
+ \exhyphenpenalty
+ \delimiterfactor
+ \defaultskewchar
+ \showboxbreadth
+ \righthyphenmin
+ \holdinginserts
+ \tracingoutput
+ \tracingonline
+ \tracingmacros
+ \outputpenalty
+ \maxdeadcycles
+ \lefthyphenmin
+ \hyphenpenalty
+ \brokenpenalty
+ \widowpenalty
+ \tracingstats
+ \tracingpages
+ \showboxdepth
+ \pretolerance
+ \binoppenalty
+ \linepenalty
+ \endlinechar
+ \clubpenalty
+ \adjdemerits
+ \relpenalty
+ \globaldefs
+ \escapechar
+ \tolerance
+ \looseness
+ \hangafter
+ \vbadness
+ \language
+ \hbadness
+ \pausing
+ \uchyph
+ \month
+ \year
+ \time
+ \mag
+ \fam
+ \day
+
+ (\\doublehyphendemerits<|\\finalhyphendemerits<|\\displaywidowpenalty<|\\postdisplaypenalty<|\\tracingparagraphs<|\\errorcontextlines<|\\defaulthyphenchar<|\\tracinglostchars<|\\predisplaypenaty<|\\interlinepenalty<|\\tracingrestores<|\\tracingcommands<|\\floatingpenalty<|\\exhyphenpenalty<|\\delimiterfactor<|\\defaultskewchar<|\\showboxbreadth<|\\righthyphenmin<|\\holdinginserts<|\\tracingoutput<|\\tracingonline<|\\tracingmacros<|\\outputpenalty<|\\maxdeadcycles<|\\lefthyphenmin<|\\hyphenpenalty<|\\brokenpenalty<|\\widowpenalty<|\\tracingstats<|\\tracingpages<|\\showboxdepth<|\\pretolerance<|\\binoppenalty<|\\linepenalty<|\\endlinechar<|\\clubpenalty<|\\adjdemerits<|\\relpenalty<|\\globaldefs<|\\escapechar<|\\tolerance<|\\looseness<|\\hangafter<|\\vbadness<|\\language<|\\hbadness<|\\pausing<|\\uchyph<|\\month<|\\year<|\\time<|\\mag<|\\fam<|\\day<)
+
+ Dimension Parameters
+ \nulldelimiterspace
+ \delimitershortfall
+ \emergencystretch
+ \predisplaysize
+ \splitmaxdepth
+ \lineskiplimit
+ \displayindent
+ \overfullrule
+ \mathsurround
+ \displaywidth
+ \scriptspace
+ \boxmaxdepth
+ \hangindent
+ \parindent
+ \maxdepth
+ \voffset
+ \hoffset
+ \vsize
+ \vfuzz
+ \hsize
+ \hfuzz
+
+ (\\nulldelimiterspace<|\\delimitershortfall<|\\emergencystretch<|\\predisplaysize<|\\splitmaxdepth<|\\lineskiplimit<|\\displayindent<|\\overfullrule<|\\mathsurround<|\\displaywidth<|\\scriptspace<|\\boxmaxdepth<|\\hangindent<|\\parindent<|\\maxdepth<|\\voffset<|\\hoffset<|\\vsize<|\\vfuzz<|\\hsize<|\\hfuzz<)
+
+ Glue Parameters
+ \belowdisplayshortskip
+ \abovedisplayshortskip
+ \belowdisplayskip
+ \abovedisplayskip
+ \splittopskip
+ \baselineskip
+ \parfillskip
+ \xspaceskip
+ \spaceskip
+ \rightskip
+ \lineskip
+ \leftskip
+ \topskip
+ \tabskip
+ \parskip
+
+ (\\belowdisplayshortskip<|\\abovedisplayshortskip<|\\belowdisplayskip<|\\abovedisplayskip<|\\splittopskip<|\\baselineskip<|\\parfillskip<|\\xspaceskip<|\\spaceskip<|\\rightskip<|\\lineskip<|\\leftskip<|\\topskip<|\\tabskip<|\\parskip<)
+
+ Muglue Parameters
+ \thickmuskip
+ \thinmuskip
+ \medmuskip
+
+ (\\thickmuskip<|\\thinmuskip<|\\medmuskip<)
+
+ Token List Parameters
+ \everydisplay
+ \everyvbox
+ \everymath
+ \everyhbox
+ \everypar
+ \everyjob
+ \everycr
+ \errhelp
+ \output
+
+ (\\everydisplay<|\\everyvbox<|\\everymath<|\\everyhbox<|\\everypar<|\\everyjob<|\\everycr<|\\errhelp<|\\output<)
+____________________________________________________________________________-->
+
+<!-- START -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="%" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" >
+
+ <!-- Comments -->
+
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+
+ <!-- Math Modes -->
+
+ <!-- $$ ... $$ -->
+ <SPAN TYPE="OPERATOR" DELEGATE="MATH">
+ <BEGIN>$$</BEGIN>
+ <END>$$</END>
+ </SPAN>
+
+ <!-- $ ... $ -->
+ <SPAN TYPE="OPERATOR" DELEGATE="MATH">
+ <BEGIN>$</BEGIN>
+ <END>$</END>
+ </SPAN>
+
+ <!-- At Least Twenty Five letter control sequences -->
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL"
+ >\\[a-zA-Z@]{25}[a-zA-Z@]*</SEQ_REGEXP>
+
+ <!-- Twenty Four letter control sequences -->
+ <SEQ TYPE="KEYWORD1">\interfootnotelinepenalty</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{24}</SEQ_REGEXP>
+
+ <!-- Twenty Three letter control sequences -->
+ <SEQ TYPE="KEYWORD1">\interdisplaylinepenalty</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{23}</SEQ_REGEXP>
+
+ <!-- Twenty Two letter control sequences -->
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{22}</SEQ_REGEXP>
+
+ <!-- Twenty One letter control sequences -->
+ <SEQ TYPE="KEYWORD4">\belowdisplayshortskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\abovedisplayshortskip</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{21}</SEQ_REGEXP>
+
+ <!-- Twenty letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\doublehyphendemerits</SEQ>
+ <SEQ TYPE="KEYWORD1">\abovedisplayshortskip</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{20}</SEQ_REGEXP>
+
+ <!-- Nineteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\normallineskiplimit</SEQ>
+ <SEQ TYPE="KEYWORD4">\finalhyphendemerits</SEQ>
+ <SEQ TYPE="KEYWORD4">\displaywidowpenalty</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{19}</SEQ_REGEXP>
+
+ <!-- Eighteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\postdisplaypenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\nulldelimiterspace</SEQ>
+ <SEQ TYPE="KEYWORD1">\normalbaselineskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\Longleftrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\longleftrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\delimitershortfall</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{18}</SEQ_REGEXP>
+
+ <!-- Seventeen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\tracingparagraphs</SEQ>
+ <SEQ TYPE="KEYWORD1">\scriptscriptstyle</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightleftharpoons</SEQ>
+ <SEQ TYPE="KEYWORD1">\predisplaypenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\errorcontextlines</SEQ>
+ <SEQ TYPE="KEYWORD4">\defaulthyphenchar</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{17}</SEQ_REGEXP>
+
+ <!-- Sixteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\tracinglostchars</SEQ>
+ <SEQ TYPE="KEYWORD1">\scriptscriptfont</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightharpoondown</SEQ>
+ <SEQ TYPE="KEYWORD4">\predisplaypenaty</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagefilllstretch</SEQ>
+ <SEQ TYPE="KEYWORD1">\offinterlineskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\nonfrenchspacing</SEQ>
+ <SEQ TYPE="KEYWORD4">\interlinepenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\emergencystretch</SEQ>
+ <SEQ TYPE="KEYWORD4">\belowdisplayskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\allocationnumber</SEQ>
+ <SEQ TYPE="KEYWORD4">\abovedisplayskip</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{16}</SEQ_REGEXP>
+
+ <!-- Fifteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\tracingrestores</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingcommands</SEQ>
+ <SEQ TYPE="KEYWORD1">\smallskipamount</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagefillstretch</SEQ>
+ <SEQ TYPE="KEYWORD1">\normalbaselines</SEQ>
+ <SEQ TYPE="KEYWORD1">\nointerlineskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\leftharpoondown</SEQ>
+ <SEQ TYPE="KEYWORD1">\insertpenalties</SEQ>
+ <SEQ TYPE="KEYWORD4">\floatingpenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\exhyphenpenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\delimiterfactor</SEQ>
+ <SEQ TYPE="KEYWORD4">\defaultskewchar</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigtriangledown</SEQ>
+ <SEQ TYPE="KEYWORD1">\afterassignment</SEQ>
+ <SEQ TYPE="KEYWORD1">\abovewithdelims</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{15}</SEQ_REGEXP>
+
+ <!-- Fourteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\splitfirstmark</SEQ>
+ <SEQ TYPE="KEYWORD4">\showboxbreadth</SEQ>
+ <SEQ TYPE="KEYWORD4">\righthyphenmin</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightharpoonup</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightarrowfill</SEQ>
+ <SEQ TYPE="KEYWORD1">\removelastskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\predisplaysize</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagefilstretch</SEQ>
+ <SEQ TYPE="KEYWORD1">\overwithdelims</SEQ>
+ <SEQ TYPE="KEYWORD1">\overrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\normallineskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\longrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\Longrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\Leftrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\leftrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\hookrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\holdinginserts</SEQ>
+ <SEQ TYPE="KEYWORD1">\atopwithdelims</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{14}</SEQ_REGEXP>
+
+ <!-- Thirteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\ttraggedright</SEQ>
+ <SEQ TYPE="KEYWORD1">\triangleright</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingoutput</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingonline</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingmacros</SEQ>
+ <SEQ TYPE="KEYWORD4">\splitmaxdepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\overleftarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\outputpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\nopagenumbers</SEQ>
+ <SEQ TYPE="KEYWORD1">\medskipamount</SEQ>
+ <SEQ TYPE="KEYWORD4">\maxdeadcycles</SEQ>
+ <SEQ TYPE="KEYWORD1">\magnification</SEQ>
+ <SEQ TYPE="KEYWORD1">\Longleftarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\longleftarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\lineskiplimit</SEQ>
+ <SEQ TYPE="KEYWORD4">\lefthyphenmin </SEQ>
+ <SEQ TYPE="KEYWORD1">\leftharpoonup</SEQ>
+ <SEQ TYPE="KEYWORD1">\leftarrowfill</SEQ>
+ <SEQ TYPE="KEYWORD4">\hyphenpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\hookleftarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\frenchspacing</SEQ>
+ <SEQ TYPE="KEYWORD1">\errorstopmode</SEQ>
+ <SEQ TYPE="KEYWORD1">\downbracefill</SEQ>
+ <SEQ TYPE="KEYWORD1">\displaylimits</SEQ>
+ <SEQ TYPE="KEYWORD4">\displayindent</SEQ>
+ <SEQ TYPE="KEYWORD1">\discretionary</SEQ>
+ <SEQ TYPE="KEYWORD4">\brokenpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigtriangleup</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigskipamount</SEQ>
+ <SEQ TYPE="KEYWORD1">\advancepageno</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{13}</SEQ_REGEXP>
+
+ <!-- Twelve letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\widowpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\triangleleft</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingstats</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingpages</SEQ>
+ <SEQ TYPE="KEYWORD4">\splittopskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\splitbotmark</SEQ>
+ <SEQ TYPE="KEYWORD4">\showboxdepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\romannumeral</SEQ>
+ <SEQ TYPE="KEYWORD1">\raggedbottom</SEQ>
+ <SEQ TYPE="KEYWORD4">\pretolerance</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagecontents</SEQ>
+ <SEQ TYPE="KEYWORD4">\overfullrule</SEQ>
+ <SEQ TYPE="KEYWORD1">\normalbottom</SEQ>
+ <SEQ TYPE="KEYWORD1">\negthinspace</SEQ>
+ <SEQ TYPE="KEYWORD4">\mathsurround</SEQ>
+ <SEQ TYPE="KEYWORD1">\makeheadline</SEQ>
+ <SEQ TYPE="KEYWORD1">\makefootline</SEQ>
+ <SEQ TYPE="KEYWORD1">\ignorespaces</SEQ>
+ <SEQ TYPE="KEYWORD1">\footnoterule</SEQ>
+ <SEQ TYPE="KEYWORD4">\everydisplay</SEQ>
+ <SEQ TYPE="KEYWORD1">\dosupereject</SEQ>
+ <SEQ TYPE="KEYWORD4">\displaywidth</SEQ>
+ <SEQ TYPE="KEYWORD1">\displaystyle</SEQ>
+ <SEQ TYPE="KEYWORD1">\displaylines</SEQ>
+ <SEQ TYPE="KEYWORD1">\bordermatrix</SEQ>
+ <SEQ TYPE="KEYWORD4">\binoppenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\beginsection</SEQ>
+ <SEQ TYPE="KEYWORD1">\baselineskip</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{12}</SEQ_REGEXP>
+
+ <!-- Eleven letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\Updownarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\updownarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\upbracefill</SEQ>
+ <SEQ TYPE="KEYWORD4">\thickmuskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\spacefactor</SEQ>
+ <SEQ TYPE="KEYWORD1">\showhyphens</SEQ>
+ <SEQ TYPE="KEYWORD1">\scriptstyle</SEQ>
+ <SEQ TYPE="KEYWORD4">\scriptspace</SEQ>
+ <SEQ TYPE="KEYWORD1">\raggedright</SEQ>
+ <SEQ TYPE="KEYWORD1">\plainoutput</SEQ>
+ <SEQ TYPE="KEYWORD4">\parfillskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagestretch</SEQ>
+ <SEQ TYPE="KEYWORD1">\nonstopmode</SEQ>
+ <SEQ TYPE="COMMENT2">\newlinechar</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathpalette</SEQ>
+ <SEQ TYPE="FUNCTION">\mathchardef</SEQ>
+ <SEQ TYPE="KEYWORD1">\magstephalf</SEQ>
+ <SEQ TYPE="KEYWORD4">\linepenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\lastpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\hyphenation</SEQ>
+ <SEQ TYPE="KEYWORD1">\expandafter</SEQ>
+ <SEQ TYPE="KEYWORD4">\endlinechar</SEQ>
+ <SEQ TYPE="KEYWORD1">\diamondsuit</SEQ>
+ <SEQ TYPE="KEYWORD4">\clubpenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\boxmaxdepth</SEQ>
+ <SEQ TYPE="KEYWORD4">\adjdemerits</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{11}</SEQ_REGEXP>
+
+ <!-- Ten letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\xspaceskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\varepsilon</SEQ>
+ <SEQ TYPE="KEYWORD1">\underbrace</SEQ>
+ <SEQ TYPE="KEYWORD1">\tracingall</SEQ>
+ <SEQ TYPE="KEYWORD4">\thinmuskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\textindent</SEQ>
+ <SEQ TYPE="KEYWORD1">\supereject</SEQ>
+ <SEQ TYPE="KEYWORD1">\sqsupseteq</SEQ>
+ <SEQ TYPE="KEYWORD1">\smallbreak</SEQ>
+ <SEQ TYPE="KEYWORD1">\scrollmode</SEQ>
+ <SEQ TYPE="KEYWORD1">\scriptfont</SEQ>
+ <SEQ TYPE="KEYWORD1">\rmoustache</SEQ>
+ <SEQ TYPE="KEYWORD1">\Rightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\relpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\pageshrink</SEQ>
+ <SEQ TYPE="KEYWORD1">\pageinsert</SEQ>
+ <SEQ TYPE="KEYWORD1">\obeyspaces</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathhexbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathchoice</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathaccent</SEQ>
+ <SEQ TYPE="KEYWORD1">\mapstochar</SEQ>
+ <SEQ TYPE="KEYWORD1">\longmapsto</SEQ>
+ <SEQ TYPE="KEYWORD1">\lmoustache</SEQ>
+ <SEQ TYPE="KEYWORD1">\leqalignno</SEQ>
+ <SEQ TYPE="KEYWORD1">\leavevmode</SEQ>
+ <SEQ TYPE="KEYWORD1">\hyphenchar</SEQ>
+ <SEQ TYPE="KEYWORD4">\hangindent</SEQ>
+ <SEQ TYPE="KEYWORD4">\globaldefs</SEQ>
+ <SEQ TYPE="KEYWORD1">\fmtversion</SEQ>
+ <SEQ TYPE="KEYWORD4">\escapechar</SEQ>
+ <SEQ TYPE="KEYWORD1">\errmessage</SEQ>
+ <SEQ TYPE="KEYWORD1">\dospecials</SEQ>
+ <SEQ TYPE="KEYWORD1">\deadcycles</SEQ>
+ <SEQ TYPE="KEYWORD1">\centerline</SEQ>
+ <SEQ TYPE="KEYWORD1">\begingroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\allowbreak</SEQ>
+ <SEQ TYPE="KEYWORD1">\aftergroup</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{10}</SEQ_REGEXP>
+
+ <!-- Nine letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\widetilde</SEQ>
+ <SEQ TYPE="KEYWORD1">\vfootnote</SEQ>
+ <SEQ TYPE="KEYWORD1">\uppercase</SEQ>
+ <SEQ TYPE="KEYWORD1">\unpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\underline</SEQ>
+ <SEQ TYPE="KEYWORD1">\undefined</SEQ>
+ <SEQ TYPE="KEYWORD1">\topinsert</SEQ>
+ <SEQ TYPE="KEYWORD4">\tolerance</SEQ>
+ <SEQ TYPE="KEYWORD1">\thinspace</SEQ>
+ <SEQ TYPE="KEYWORD1">\textstyle</SEQ>
+ <SEQ TYPE="KEYWORD1">\spadesuit</SEQ>
+ <SEQ TYPE="KEYWORD4">\spaceskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\smallskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\showlists</SEQ>
+ <SEQ TYPE="KEYWORD4">\rightskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightline</SEQ>
+ <SEQ TYPE="KEYWORD1">\prevdepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\preloaded</SEQ>
+ <SEQ TYPE="KEYWORD4">\parindent</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagetotal</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagedepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\overbrace</SEQ>
+ <SEQ TYPE="KEYWORD1">\obeylines</SEQ>
+ <SEQ TYPE="KEYWORD1">\nonscript</SEQ>
+ <SEQ TYPE="FUNCTION">\newmuskip</SEQ>
+ <SEQ TYPE="FUNCTION">\newinsert</SEQ>
+ <SEQ TYPE="FUNCTION">\muskipdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\multispan</SEQ>
+ <SEQ TYPE="KEYWORD1">\moveright</SEQ>
+ <SEQ TYPE="KEYWORD1">\midinsert</SEQ>
+ <SEQ TYPE="KEYWORD4">\medmuskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathstrut</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathpunct</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathinner</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathclose</SEQ>
+ <SEQ TYPE="KEYWORD1">\lowercase</SEQ>
+ <SEQ TYPE="KEYWORD4">\looseness</SEQ>
+ <SEQ TYPE="KEYWORD1">\Leftarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\leftarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\immediate</SEQ>
+ <SEQ TYPE="KEYWORD1">\hrulefill</SEQ>
+ <SEQ TYPE="KEYWORD1">\hidewidth</SEQ>
+ <SEQ TYPE="KEYWORD1">\heartsuit</SEQ>
+ <SEQ TYPE="KEYWORD4">\hangafter</SEQ>
+ <SEQ TYPE="KEYWORD1">\goodbreak</SEQ>
+ <SEQ TYPE="COMMENT3">\futurelet</SEQ>
+ <SEQ TYPE="KEYWORD1">\footstrut</SEQ>
+ <SEQ TYPE="KEYWORD1">\fontdimen</SEQ>
+ <SEQ TYPE="KEYWORD1">\firstmark</SEQ>
+ <SEQ TYPE="KEYWORD4">\everyvbox</SEQ>
+ <SEQ TYPE="KEYWORD4">\everymath</SEQ>
+ <SEQ TYPE="KEYWORD4">\everyhbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\eqalignno</SEQ>
+ <SEQ TYPE="KEYWORD1">\endinsert</SEQ>
+ <SEQ TYPE="FUNCTION">\endcsname</SEQ>
+ <SEQ TYPE="KEYWORD1">\Downarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\downarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\delimiter</SEQ>
+ <SEQ TYPE="KEYWORD1">\copyright</SEQ>
+ <SEQ TYPE="KEYWORD1">\cleartabs</SEQ>
+ <SEQ TYPE="KEYWORD1">\centering</SEQ>
+ <SEQ TYPE="KEYWORD1">\bracevert</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigotimes</SEQ>
+ <SEQ TYPE="KEYWORD1">\batchmode</SEQ>
+ <SEQ TYPE="KEYWORD2">\backslash</SEQ>
+ <SEQ TYPE="KEYWORD1">\Arrowvert</SEQ>
+ <SEQ TYPE="KEYWORD1">\arrowvert</SEQ>
+
+ <!-- Length Nine Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\muskip([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{9}</SEQ_REGEXP>
+
+ <!-- Eight letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\xleaders</SEQ>
+ <SEQ TYPE="KEYWORD1">\vphantom</SEQ>
+ <SEQ TYPE="KEYWORD4">\vbadness</SEQ>
+ <SEQ TYPE="KEYWORD1">\vartheta</SEQ>
+ <SEQ TYPE="KEYWORD1">\varsigma</SEQ>
+ <SEQ TYPE="KEYWORD1">\underbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\triangle</SEQ>
+ <SEQ TYPE="KEYWORD1">\textfont</SEQ>
+ <SEQ TYPE="KEYWORD1">\tabsdone</SEQ>
+ <SEQ TYPE="KEYWORD1">\tabalign</SEQ>
+ <SEQ TYPE="KEYWORD1">\supseteq</SEQ>
+ <SEQ TYPE="KEYWORD1">\subseteq</SEQ>
+ <SEQ TYPE="KEYWORD1">\strutbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\smallint</SEQ>
+ <SEQ TYPE="KEYWORD1">\skewchar</SEQ>
+ <SEQ TYPE="KEYWORD1">\setminus</SEQ>
+ <SEQ TYPE="KEYWORD1">\proclaim</SEQ>
+ <SEQ TYPE="KEYWORD1">\prevgraf</SEQ>
+ <SEQ TYPE="KEYWORD1">\patterns</SEQ>
+ <SEQ TYPE="KEYWORD1">\parshape</SEQ>
+ <SEQ TYPE="KEYWORD1">\parallel</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagegoal</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagebody</SEQ>
+ <SEQ TYPE="KEYWORD1">\overline</SEQ>
+ <SEQ TYPE="KEYWORD1">\oldstyle</SEQ>
+ <SEQ TYPE="KEYWORD1">\nolimits</SEQ>
+ <SEQ TYPE="KEYWORD1">\noindent</SEQ>
+ <SEQ TYPE="KEYWORD1">\noexpand</SEQ>
+ <SEQ TYPE="COMMENT2">\newwrite</SEQ>
+ <SEQ TYPE="COMMENT2">\newdimen</SEQ>
+ <SEQ TYPE="COMMENT2">\newcount</SEQ>
+ <SEQ TYPE="KEYWORD1">\narrower</SEQ>
+ <SEQ TYPE="KEYWORD1">\moveleft</SEQ>
+ <SEQ TYPE="KEYWORD1">\medbreak</SEQ>
+ <SEQ TYPE="KEYWORD1">\maxdimen</SEQ>
+ <SEQ TYPE="KEYWORD4">\maxdepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathopen</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathcode</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathchar</SEQ>
+ <SEQ TYPE="KEYWORD1">\lineskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\leftskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\leftline</SEQ>
+ <SEQ TYPE="KEYWORD1">\lastskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\lastkern</SEQ>
+ <SEQ TYPE="KEYWORD4">\language</SEQ>
+ <SEQ TYPE="KEYWORD1">\itemitem</SEQ>
+ <SEQ TYPE="KEYWORD1">\hphantom</SEQ>
+ <SEQ TYPE="KEYWORD1">\hideskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\headline</SEQ>
+ <SEQ TYPE="KEYWORD4">\hbadness</SEQ>
+ <SEQ TYPE="KEYWORD1">\footnote</SEQ>
+ <SEQ TYPE="KEYWORD1">\footline</SEQ>
+ <SEQ TYPE="KEYWORD1">\multiply</SEQ>
+ <SEQ TYPE="KEYWORD1">\fontname</SEQ>
+ <SEQ TYPE="KEYWORD1">\filbreak</SEQ>
+ <SEQ TYPE="KEYWORD4">\everypar</SEQ>
+ <SEQ TYPE="KEYWORD4">\everyjob</SEQ>
+ <SEQ TYPE="KEYWORD1">\endinput</SEQ>
+ <SEQ TYPE="KEYWORD1">\endgroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\emptyset</SEQ>
+ <SEQ TYPE="FUNCTION">\dimendef</SEQ>
+ <SEQ TYPE="FUNCTION">\countdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\clubsuit</SEQ>
+ <SEQ TYPE="KEYWORD1">\closeout</SEQ>
+ <SEQ TYPE="KEYWORD1">\cleaders</SEQ>
+ <SEQ TYPE="KEYWORD1">\buildrel</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigwedge</SEQ>
+ <SEQ TYPE="KEYWORD1">\biguplus</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigsqcup</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigoplus</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigbreak</SEQ>
+
+ <!-- Length Eight Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\muskip[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Eight Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\dimen([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Eight Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\count([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{8}</SEQ_REGEXP>
+
+ <!-- Seven letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\widehat</SEQ>
+ <SEQ TYPE="KEYWORD4">\voffset</SEQ>
+ <SEQ TYPE="KEYWORD1">\vfilneg</SEQ>
+ <SEQ TYPE="KEYWORD1">\vcenter</SEQ>
+ <SEQ TYPE="KEYWORD1">\vadjust</SEQ>
+ <SEQ TYPE="KEYWORD1">\Upsilon</SEQ>
+ <SEQ TYPE="KEYWORD1">\upsilon</SEQ>
+ <SEQ TYPE="KEYWORD1">\Uparrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\uparrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\unvcopy</SEQ>
+ <SEQ TYPE="KEYWORD1">\unhcopy</SEQ>
+ <SEQ TYPE="KEYWORD4">\topskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\topmark</SEQ>
+ <SEQ TYPE="FUNCTION">\toksdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\tabsyet</SEQ>
+ <SEQ TYPE="KEYWORD4">\tabskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\swarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\special</SEQ>
+ <SEQ TYPE="FUNCTION">\skipdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\showthe</SEQ>
+ <SEQ TYPE="KEYWORD1">\showbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\shipout</SEQ>
+ <SEQ TYPE="KEYWORD1">\sevensy</SEQ>
+ <SEQ TYPE="KEYWORD1">\sevenrm</SEQ>
+ <SEQ TYPE="KEYWORD1">\sevenbf</SEQ>
+ <SEQ TYPE="KEYWORD1">\settabs</SEQ>
+ <SEQ TYPE="KEYWORD1">\searrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\rootbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\radical</SEQ>
+ <SEQ TYPE="KEYWORD1">\pmatrix</SEQ>
+ <SEQ TYPE="KEYWORD1">\phantom</SEQ>
+ <SEQ TYPE="KEYWORD1">\penalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\pausing</SEQ>
+ <SEQ TYPE="KEYWORD1">\partial</SEQ>
+ <SEQ TYPE="KEYWORD4">\parskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\openout</SEQ>
+ <SEQ TYPE="KEYWORD1">\ooalign</SEQ>
+ <SEQ TYPE="KEYWORD1">\nwarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\nobreak</SEQ>
+ <SEQ TYPE="KEYWORD1">\noalign</SEQ>
+ <SEQ TYPE="COMMENT2">\newtoks</SEQ>
+ <SEQ TYPE="COMMENT2">\newskip</SEQ>
+ <SEQ TYPE="COMMENT2">\newread</SEQ>
+ <SEQ TYPE="COMMENT2">\newhelp</SEQ>
+ <SEQ TYPE="KEYWORD1">\nearrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\natural</SEQ>
+ <SEQ TYPE="KEYWORD1">\mscount</SEQ>
+ <SEQ TYPE="KEYWORD1">\message</SEQ>
+ <SEQ TYPE="KEYWORD1">\medskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\meaning</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathrel</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathord</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathbin</SEQ>
+ <SEQ TYPE="KEYWORD1">\magstep</SEQ>
+ <SEQ TYPE="KEYWORD1">\leaders</SEQ>
+ <SEQ TYPE="KEYWORD1">\lastbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\joinrel</SEQ>
+ <SEQ TYPE="KEYWORD1">\jobname</SEQ>
+ <SEQ TYPE="KEYWORD1">\iterate</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifvmode</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifmmode</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifinner</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifhmode</SEQ>
+ <SEQ TYPE="KEYWORD3">\iffalse</SEQ>
+ <SEQ TYPE="KEYWORD4">\hoffset</SEQ>
+ <SEQ TYPE="KEYWORD1">\hfilneg</SEQ>
+ <SEQ TYPE="KEYWORD1">\footins</SEQ>
+ <SEQ TYPE="KEYWORD1">\fmtname</SEQ>
+ <SEQ TYPE="KEYWORD4">\everycr</SEQ>
+ <SEQ TYPE="KEYWORD4">\errhelp</SEQ>
+ <SEQ TYPE="KEYWORD1">\eqalign</SEQ>
+ <SEQ TYPE="KEYWORD1">\epsilon</SEQ>
+ <SEQ TYPE="KEYWORD1">\enspace</SEQ>
+ <SEQ TYPE="KEYWORD1">\endline</SEQ>
+ <SEQ TYPE="KEYWORD1">\endgraf</SEQ>
+ <SEQ TYPE="KEYWORD1">\dotfill</SEQ>
+ <SEQ TYPE="KEYWORD1">\diamond</SEQ>
+ <SEQ TYPE="KEYWORD1">\delcode</SEQ>
+ <SEQ TYPE="KEYWORD1">\ddagger</SEQ>
+ <SEQ TYPE="KEYWORD1">\columns</SEQ>
+ <SEQ TYPE="KEYWORD1">\closein</SEQ>
+ <SEQ TYPE="FUNCTION">\chardef</SEQ>
+ <SEQ TYPE="KEYWORD2">\cdprime</SEQ>
+ <SEQ TYPE="KEYWORD1">\catcode</SEQ>
+ <SEQ TYPE="KEYWORD1">\braceru</SEQ>
+ <SEQ TYPE="KEYWORD1">\bracerd</SEQ>
+ <SEQ TYPE="KEYWORD1">\bracelu</SEQ>
+ <SEQ TYPE="KEYWORD1">\braceld</SEQ>
+ <SEQ TYPE="KEYWORD1">\botmark</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigodot</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigcirc</SEQ>
+ <SEQ TYPE="KEYWORD1">\advance</SEQ>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4">\\muskip[0-9]</SEQ_REGEXP>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\dimen[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\count[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\toks([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\skip([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Seven Decimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Seven Octal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char'[0-7][0-7]</SEQ_REGEXP>
+
+ <!-- Length Seven Hexadecimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char"[0-9A-Fa-f][0-9A-Fa-f]</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{7}</SEQ_REGEXP>
+
+ <!-- Six letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\vsplit</SEQ>
+ <SEQ TYPE="KEYWORD1">\varrho</SEQ>
+ <SEQ TYPE="KEYWORD1">\varphi</SEQ>
+ <SEQ TYPE="KEYWORD1">\valign</SEQ>
+ <SEQ TYPE="KEYWORD2">\utilde</SEQ>
+ <SEQ TYPE="KEYWORD1">\unvbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\unskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\unkern</SEQ>
+ <SEQ TYPE="KEYWORD1">\unhbox</SEQ>
+ <SEQ TYPE="KEYWORD4">\uchyph</SEQ>
+ <SEQ TYPE="KEYWORD1">\uccode</SEQ>
+ <SEQ TYPE="KEYWORD1">\topins</SEQ>
+ <SEQ TYPE="KEYWORD1">\supset</SEQ>
+ <SEQ TYPE="KEYWORD1">\succeq</SEQ>
+ <SEQ TYPE="KEYWORD1">\subset</SEQ>
+ <SEQ TYPE="KEYWORD1">\string</SEQ>
+ <SEQ TYPE="KEYWORD1">\sfcode</SEQ>
+ <SEQ TYPE="KEYWORD1">\seveni</SEQ>
+ <SEQ TYPE="KEYWORD1">\setbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\rgroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\rfloor</SEQ>
+ <SEQ TYPE="KEYWORD1">\repeat</SEQ>
+ <SEQ TYPE="KEYWORD1">\Relbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\relbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\rbrack</SEQ>
+ <SEQ TYPE="KEYWORD1">\rbrace</SEQ>
+ <SEQ TYPE="KEYWORD1">\rangle</SEQ>
+ <SEQ TYPE="KEYWORD1">\propto</SEQ>
+ <SEQ TYPE="KEYWORD1">\preceq</SEQ>
+ <SEQ TYPE="KEYWORD1">\pageno</SEQ>
+ <SEQ TYPE="KEYWORD4">\output</SEQ>
+ <SEQ TYPE="KEYWORD1">\otimes</SEQ>
+ <SEQ TYPE="KEYWORD1">\oslash</SEQ>
+ <SEQ TYPE="KEYWORD1">\openup</SEQ>
+ <SEQ TYPE="KEYWORD1">\openin</SEQ>
+ <SEQ TYPE="KEYWORD1">\ominus</SEQ>
+ <SEQ TYPE="KEYWORD1">\ointop</SEQ>
+ <SEQ TYPE="KEYWORD1">\oalign</SEQ>
+ <SEQ TYPE="KEYWORD1">\number</SEQ>
+ <SEQ TYPE="COMMENT2">\newfam</SEQ>
+ <SEQ TYPE="COMMENT2">\newbox</SEQ>
+ <SEQ TYPE="COMMENT4">\muskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\models</SEQ>
+ <SEQ TYPE="KEYWORD1">\matrix</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathop</SEQ>
+ <SEQ TYPE="KEYWORD1">\mapsto</SEQ>
+ <SEQ TYPE="KEYWORD1">\limsup</SEQ>
+ <SEQ TYPE="KEYWORD1">\limits</SEQ>
+ <SEQ TYPE="KEYWORD1">\liminf</SEQ>
+ <SEQ TYPE="KEYWORD1">\lgroup</SEQ>
+ <SEQ TYPE="KEYWORD2">\lfhook</SEQ>
+ <SEQ TYPE="KEYWORD1">\lfloor</SEQ>
+ <SEQ TYPE="KEYWORD1">\lccode</SEQ>
+ <SEQ TYPE="KEYWORD1">\lbrack</SEQ>
+ <SEQ TYPE="KEYWORD1">\lbrace</SEQ>
+ <SEQ TYPE="KEYWORD1">\langle</SEQ>
+ <SEQ TYPE="KEYWORD1">\Lambda</SEQ>
+ <SEQ TYPE="KEYWORD1">\lambda</SEQ>
+ <SEQ TYPE="KEYWORD1">\insert</SEQ>
+ <SEQ TYPE="KEYWORD1">\indent</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifvoid</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifvbox</SEQ>
+ <SEQ TYPE="KEYWORD3">\iftrue</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifhbox</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifcase</SEQ>
+ <SEQ TYPE="KEYWORD1">\ialign</SEQ>
+ <SEQ TYPE="KEYWORD1">\halign</SEQ>
+ <SEQ TYPE="FUNCTION">\global</SEQ>
+ <SEQ TYPE="KEYWORD1">\forall</SEQ>
+ <SEQ TYPE="KEYWORD1">\fivesy</SEQ>
+ <SEQ TYPE="KEYWORD1">\fiverm</SEQ>
+ <SEQ TYPE="KEYWORD1">\fivebf</SEQ>
+ <SEQ TYPE="KEYWORD1">\exists</SEQ>
+ <SEQ TYPE="KEYWORD1">\enskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\egroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\divide</SEQ>
+ <SEQ TYPE="KEYWORD1">\dagger</SEQ>
+ <SEQ TYPE="FUNCTION">\csname</SEQ>
+ <SEQ TYPE="KEYWORD2">\cprime</SEQ>
+ <SEQ TYPE="KEYWORD1">\coprod</SEQ>
+ <SEQ TYPE="KEYWORD1">\choose</SEQ>
+ <SEQ TYPE="KEYWORD2">\cfudot</SEQ>
+ <SEQ TYPE="KEYWORD2">\candra</SEQ>
+ <SEQ TYPE="KEYWORD1">\bullet</SEQ>
+ <SEQ TYPE="KEYWORD1">\bowtie</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigvee</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigcup</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigcap</SEQ>
+ <SEQ TYPE="KEYWORD1">\bgroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\arctan</SEQ>
+ <SEQ TYPE="KEYWORD1">\arcsin</SEQ>
+ <SEQ TYPE="KEYWORD1">\arccos</SEQ>
+ <SEQ TYPE="KEYWORD1">\approx</SEQ>
+ <SEQ TYPE="KEYWORD2">\acudot</SEQ>
+ <SEQ TYPE="KEYWORD1">\active</SEQ>
+ <SEQ TYPE="KEYWORD1">\accent</SEQ>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\dimen[0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\count[0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\toks[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\skip[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\box([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Six Decimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Octal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2">\\char'[0-7]</SEQ_REGEXP>
+
+ <!-- Length Six Hexadecimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char"[0-9A-Fa-f]</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{6}</SEQ_REGEXP>
+
+ <!-- Five letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\write</SEQ>
+ <SEQ TYPE="KEYWORD1">\wedge</SEQ>
+ <SEQ TYPE="KEYWORD1">\vskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\vsize</SEQ>
+ <SEQ TYPE="KEYWORD1">\vrule</SEQ>
+ <SEQ TYPE="KEYWORD1">\vglue</SEQ>
+ <SEQ TYPE="KEYWORD4">\vfuzz</SEQ>
+ <SEQ TYPE="KEYWORD1">\vfill</SEQ>
+ <SEQ TYPE="KEYWORD1">\vdots</SEQ>
+ <SEQ TYPE="KEYWORD1">\vdash</SEQ>
+ <SEQ TYPE="KEYWORD1">\varpi</SEQ>
+ <SEQ TYPE="KEYWORD1">\uplus</SEQ>
+ <SEQ TYPE="KEYWORD1">\ttfam</SEQ>
+ <SEQ TYPE="KEYWORD1">\times</SEQ>
+ <SEQ TYPE="KEYWORD1">\tilde</SEQ>
+ <SEQ TYPE="KEYWORD1">\Theta</SEQ>
+ <SEQ TYPE="KEYWORD1">\theta</SEQ>
+ <SEQ TYPE="KEYWORD1">\tentt</SEQ>
+ <SEQ TYPE="KEYWORD1">\tensy</SEQ>
+ <SEQ TYPE="KEYWORD1">\tensl</SEQ>
+ <SEQ TYPE="KEYWORD1">\tenrm</SEQ>
+ <SEQ TYPE="KEYWORD1">\tenit</SEQ>
+ <SEQ TYPE="KEYWORD1">\tenex</SEQ>
+ <SEQ TYPE="KEYWORD1">\tenbf</SEQ>
+ <SEQ TYPE="KEYWORD1">\strut</SEQ>
+ <SEQ TYPE="KEYWORD1">\sqcup</SEQ>
+ <SEQ TYPE="KEYWORD1">\sqcap</SEQ>
+ <SEQ TYPE="KEYWORD1">\space</SEQ>
+ <SEQ TYPE="KEYWORD1">\smile</SEQ>
+ <SEQ TYPE="KEYWORD1">\smash</SEQ>
+ <SEQ TYPE="KEYWORD1">\slfam</SEQ>
+ <SEQ TYPE="KEYWORD1">\slash</SEQ>
+ <SEQ TYPE="KEYWORD1">\simeq</SEQ>
+ <SEQ TYPE="KEYWORD1">\Sigma</SEQ>
+ <SEQ TYPE="KEYWORD1">\sigma</SEQ>
+ <SEQ TYPE="KEYWORD1">\sharp</SEQ>
+ <SEQ TYPE="KEYWORD1">\right</SEQ>
+ <SEQ TYPE="KEYWORD1">\rhook</SEQ>
+ <SEQ TYPE="KEYWORD1">\relax</SEQ>
+ <SEQ TYPE="KEYWORD1">\rceil</SEQ>
+ <SEQ TYPE="KEYWORD1">\raise</SEQ>
+ <SEQ TYPE="KEYWORD1">\qquad</SEQ>
+ <SEQ TYPE="KEYWORD1">\prime</SEQ>
+ <SEQ TYPE="FUNCTION">\outer</SEQ>
+ <SEQ TYPE="KEYWORD1">\oplus</SEQ>
+ <SEQ TYPE="KEYWORD1">\Omega</SEQ>
+ <SEQ TYPE="KEYWORD1">\omega</SEQ>
+ <SEQ TYPE="KEYWORD1">\notin</SEQ>
+ <SEQ TYPE="COMMENT2">\newif</SEQ>
+ <SEQ TYPE="KEYWORD1">\nabla</SEQ>
+ <SEQ TYPE="KEYWORD1">\mskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\month</SEQ>
+ <SEQ TYPE="KEYWORD1">\mkern</SEQ>
+ <SEQ TYPE="KEYWORD1">\lower</SEQ>
+ <SEQ TYPE="KEYWORD1">\lhook</SEQ>
+ <SEQ TYPE="KEYWORD1">\leqno</SEQ>
+ <SEQ TYPE="KEYWORD1">\ldots</SEQ>
+ <SEQ TYPE="KEYWORD1">\ldotp</SEQ>
+ <SEQ TYPE="KEYWORD1">\lceil</SEQ>
+ <SEQ TYPE="KEYWORD1">\kappa</SEQ>
+ <SEQ TYPE="KEYWORD1">\jmath</SEQ>
+ <SEQ TYPE="KEYWORD1">\itfam</SEQ>
+ <SEQ TYPE="KEYWORD1">\intop</SEQ>
+ <SEQ TYPE="KEYWORD1">\input</SEQ>
+ <SEQ TYPE="KEYWORD1">\infty</SEQ>
+ <SEQ TYPE="KEYWORD1">\imath</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifodd</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifnum</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifeof</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifdim</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifcat</SEQ>
+ <SEQ TYPE="KEYWORD1">\hskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\hsize</SEQ>
+ <SEQ TYPE="KEYWORD1">\hrule</SEQ>
+ <SEQ TYPE="KEYWORD1">\hglue</SEQ>
+ <SEQ TYPE="KEYWORD4">\hfuzz</SEQ>
+ <SEQ TYPE="KEYWORD1">\hfill</SEQ>
+ <SEQ TYPE="KEYWORD1">\grave</SEQ>
+ <SEQ TYPE="KEYWORD1">\Gamma</SEQ>
+ <SEQ TYPE="KEYWORD1">\gamma</SEQ>
+ <SEQ TYPE="KEYWORD1">\frown</SEQ>
+ <SEQ TYPE="KEYWORD1">\folio</SEQ>
+ <SEQ TYPE="KEYWORD1">\fivei</SEQ>
+ <SEQ TYPE="KEYWORD1">\equiv</SEQ>
+ <SEQ TYPE="KEYWORD1">\empty</SEQ>
+ <SEQ TYPE="KEYWORD1">\eject</SEQ>
+ <SEQ TYPE="KEYWORD1">\doteq</SEQ>
+ <SEQ TYPE="COMMENT4">\dimen</SEQ>
+ <SEQ TYPE="KEYWORD1">\Delta</SEQ>
+ <SEQ TYPE="KEYWORD1">\delta</SEQ>
+ <SEQ TYPE="KEYWORD1">\ddots</SEQ>
+ <SEQ TYPE="KEYWORD1">\dashv</SEQ>
+ <SEQ TYPE="COMMENT4">\count</SEQ>
+ <SEQ TYPE="KEYWORD1">\colon</SEQ>
+ <SEQ TYPE="KEYWORD1">\check</SEQ>
+ <SEQ TYPE="KEYWORD1">\cdots</SEQ>
+ <SEQ TYPE="KEYWORD1">\cdotp</SEQ>
+ <SEQ TYPE="KEYWORD1">\cases</SEQ>
+ <SEQ TYPE="KEYWORD1">\breve</SEQ>
+ <SEQ TYPE="KEYWORD1">\break</SEQ>
+ <SEQ TYPE="KEYWORD1">\brack</SEQ>
+ <SEQ TYPE="KEYWORD1">\brace</SEQ>
+ <SEQ TYPE="KEYWORD1">\Biggr</SEQ>
+ <SEQ TYPE="KEYWORD1">\biggr</SEQ>
+ <SEQ TYPE="KEYWORD1">\Biggm</SEQ>
+ <SEQ TYPE="KEYWORD1">\biggm</SEQ>
+ <SEQ TYPE="KEYWORD1">\Biggl</SEQ>
+ <SEQ TYPE="KEYWORD1">\biggl</SEQ>
+ <SEQ TYPE="KEYWORD1">\bffam</SEQ>
+ <SEQ TYPE="KEYWORD1">\asymp</SEQ>
+ <SEQ TYPE="KEYWORD1">\angle</SEQ>
+ <SEQ TYPE="KEYWORD1">\amalg</SEQ>
+ <SEQ TYPE="KEYWORD1">\alpha</SEQ>
+ <SEQ TYPE="KEYWORD1">\aleph</SEQ>
+ <SEQ TYPE="KEYWORD1">\acute</SEQ>
+ <SEQ TYPE="KEYWORD1">\above</SEQ>
+
+ <!-- Length Five Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4">\\toks[0-9]</SEQ_REGEXP>
+
+ <!-- Length Five Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4">\\skip[0-9]</SEQ_REGEXP>
+
+ <!-- Length Five Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\box[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Five Decimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2">\\char[0-9]</SEQ_REGEXP>
+
+ <!-- Length Five Octal Character Reference -->
+ <SEQ TYPE="KEYWORD2">\char'</SEQ>
+
+ <!-- Length Five Hexadecimal Character Reference -->
+ <SEQ TYPE="KEYWORD2">\char"</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{5}</SEQ_REGEXP>
+
+ <!-- Four letter control sequences -->
+ <SEQ TYPE="KEYWORD1">\zeta</SEQ>
+ <SEQ TYPE="KEYWORD4">\year</SEQ>
+ <SEQ TYPE="FUNCTION">\xdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\wlog</SEQ>
+ <SEQ TYPE="KEYWORD1">\vtop</SEQ>
+ <SEQ TYPE="KEYWORD1">\vfil</SEQ>
+ <SEQ TYPE="KEYWORD1">\vert</SEQ>
+ <SEQ TYPE="KEYWORD1">\Vert</SEQ>
+ <SEQ TYPE="KEYWORD1">\vbox</SEQ>
+ <SEQ TYPE="KEYWORD2">\uarc</SEQ>
+ <SEQ TYPE="KEYWORD4">\toks</SEQ>
+ <SEQ TYPE="KEYWORD4">\time</SEQ>
+ <SEQ TYPE="KEYWORD1">\teni</SEQ>
+ <SEQ TYPE="KEYWORD1">\tanh</SEQ>
+ <SEQ TYPE="KEYWORD1">\tabs</SEQ>
+ <SEQ TYPE="KEYWORD1">\surd</SEQ>
+ <SEQ TYPE="KEYWORD1">\succ</SEQ>
+ <SEQ TYPE="KEYWORD1">\star</SEQ>
+ <SEQ TYPE="KEYWORD1">\sqrt</SEQ>
+ <SEQ TYPE="KEYWORD1">\span</SEQ>
+ <SEQ TYPE="KEYWORD4">\skip</SEQ>
+ <SEQ TYPE="KEYWORD1">\skew</SEQ>
+ <SEQ TYPE="KEYWORD1">\sinh</SEQ>
+ <SEQ TYPE="KEYWORD1">\show</SEQ>
+ <SEQ TYPE="KEYWORD1">\root</SEQ>
+ <SEQ TYPE="KEYWORD1">\rlap</SEQ>
+ <SEQ TYPE="KEYWORD1">\read</SEQ>
+ <SEQ TYPE="KEYWORD1">\quad</SEQ>
+ <SEQ TYPE="KEYWORD1">\prod</SEQ>
+ <SEQ TYPE="KEYWORD1">\prec</SEQ>
+ <SEQ TYPE="KEYWORD1">\pmod</SEQ>
+ <SEQ TYPE="KEYWORD1">\perp</SEQ>
+ <SEQ TYPE="KEYWORD1">\owns</SEQ>
+ <SEQ TYPE="KEYWORD1">\over</SEQ>
+ <SEQ TYPE="KEYWORD1">\omit</SEQ>
+ <SEQ TYPE="KEYWORD1">\oint</SEQ>
+ <SEQ TYPE="KEYWORD1">\odot</SEQ>
+ <SEQ TYPE="KEYWORD1">\null</SEQ>
+ <SEQ TYPE="KEYWORD1">\next</SEQ>
+ <SEQ TYPE="KEYWORD1">\mark</SEQ>
+ <SEQ TYPE="KEYWORD1">\loop</SEQ>
+ <SEQ TYPE="FUNCTION">\long</SEQ>
+ <SEQ TYPE="KEYWORD1">\lnot</SEQ>
+ <SEQ TYPE="KEYWORD1">\llap</SEQ>
+ <SEQ TYPE="KEYWORD1">\line</SEQ>
+ <SEQ TYPE="KEYWORD1">\left</SEQ>
+ <SEQ TYPE="KEYWORD1">\land</SEQ>
+ <SEQ TYPE="KEYWORD1">\kern</SEQ>
+ <SEQ TYPE="KEYWORD1">\item</SEQ>
+ <SEQ TYPE="KEYWORD1">\iota</SEQ>
+ <SEQ TYPE="KEYWORD1">\hfil</SEQ>
+ <SEQ TYPE="KEYWORD1">\hbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\hbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\hang</SEQ>
+ <SEQ TYPE="KEYWORD1">\gets</SEQ>
+ <SEQ TYPE="FUNCTION">\gdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\font</SEQ>
+ <SEQ TYPE="KEYWORD1">\flat</SEQ>
+ <SEQ TYPE="KEYWORD1">\eqno</SEQ>
+ <SEQ TYPE="KEYWORD3">\else</SEQ>
+ <SEQ TYPE="FUNCTION">\edef</SEQ>
+ <SEQ TYPE="KEYWORD1">\dump</SEQ>
+ <SEQ TYPE="KEYWORD1">\dots</SEQ>
+ <SEQ TYPE="KEYWORD1">\ddot</SEQ>
+ <SEQ TYPE="KEYWORD1">\ddag</SEQ>
+ <SEQ TYPE="KEYWORD2">\dbar</SEQ>
+ <SEQ TYPE="KEYWORD2">\Dbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\crcr</SEQ>
+ <SEQ TYPE="KEYWORD1">\coth</SEQ>
+ <SEQ TYPE="KEYWORD1">\cosh</SEQ>
+ <SEQ TYPE="KEYWORD1">\copy</SEQ>
+ <SEQ TYPE="KEYWORD1">\cong</SEQ>
+ <SEQ TYPE="KEYWORD1">\circ</SEQ>
+ <SEQ TYPE="KEYWORD2">\char</SEQ>
+ <SEQ TYPE="KEYWORD2">\cfac</SEQ>
+ <SEQ TYPE="KEYWORD1">\cdot</SEQ>
+ <SEQ TYPE="KEYWORD1">\body</SEQ>
+ <SEQ TYPE="KEYWORD1">\bmod</SEQ>
+ <SEQ TYPE="KEYWORD1">\Bigr</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigr</SEQ>
+ <SEQ TYPE="KEYWORD1">\Bigm</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigm</SEQ>
+ <SEQ TYPE="KEYWORD1">\Bigl</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigl</SEQ>
+ <SEQ TYPE="KEYWORD1">\Bigg</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigg</SEQ>
+ <SEQ TYPE="KEYWORD1">\beta</SEQ>
+ <SEQ TYPE="KEYWORD1">\atop</SEQ>
+
+ <!-- Length Four Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4">\\box[0-9]</SEQ_REGEXP>
+
+ <!-- Length Four Character Reference -->
+ <SEQ TYPE="KEYWORD2">\char</SEQ>
+
+ <!-- Length Four Hexadecimal Invisible Reference -->
+ <SEQ_REGEXP HASH_CHARS="^" TYPE="KEYWORD2"
+ >(\u005E|\x5E)(\u005E|\x5E)([0-9a-f])([0-9a-f])</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{4}</SEQ_REGEXP>
+
+ <!-- Three letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\vss</SEQ>
+ <SEQ TYPE="KEYWORD1">\vee</SEQ>
+ <SEQ TYPE="KEYWORD1">\vec</SEQ>
+ <SEQ TYPE="KEYWORD1">\top</SEQ>
+ <SEQ TYPE="KEYWORD1">\the</SEQ>
+ <SEQ TYPE="KEYWORD1">\TeX</SEQ>
+ <SEQ TYPE="KEYWORD1">\tau</SEQ>
+ <SEQ TYPE="KEYWORD1">\tan</SEQ>
+ <SEQ TYPE="KEYWORD1">\sup</SEQ>
+ <SEQ TYPE="KEYWORD1">\sum</SEQ>
+ <SEQ TYPE="KEYWORD1">\sin</SEQ>
+ <SEQ TYPE="KEYWORD1">\sim</SEQ>
+ <SEQ TYPE="KEYWORD1">\sec</SEQ>
+ <SEQ TYPE="KEYWORD1">\rho</SEQ>
+ <SEQ TYPE="KEYWORD1">\Psi</SEQ>
+ <SEQ TYPE="KEYWORD1">\psi</SEQ>
+ <SEQ TYPE="KEYWORD1">\Phi</SEQ>
+ <SEQ TYPE="KEYWORD1">\phi</SEQ>
+ <SEQ TYPE="LITERAL3">\par</SEQ>
+ <SEQ TYPE="KEYWORD1">\not</SEQ>
+ <SEQ TYPE="KEYWORD1">\neq</SEQ>
+ <SEQ TYPE="KEYWORD1">\neg</SEQ>
+ <SEQ TYPE="KEYWORD1">\mit</SEQ>
+ <SEQ TYPE="KEYWORD1">\min</SEQ>
+ <SEQ TYPE="KEYWORD1">\mid</SEQ>
+ <SEQ TYPE="KEYWORD1">\max</SEQ>
+ <SEQ TYPE="KEYWORD4">\mag</SEQ>
+ <SEQ TYPE="KEYWORD1">\lor</SEQ>
+ <SEQ TYPE="KEYWORD1">\log</SEQ>
+ <SEQ TYPE="KEYWORD1">\lim</SEQ>
+ <SEQ TYPE="COMMENT3">\let</SEQ>
+ <SEQ TYPE="KEYWORD1">\leq</SEQ>
+ <SEQ TYPE="KEYWORD1">\ker</SEQ>
+ <SEQ TYPE="KEYWORD1">\jot</SEQ>
+ <SEQ TYPE="KEYWORD1">\int</SEQ>
+ <SEQ TYPE="KEYWORD1">\inf</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifx</SEQ>
+ <SEQ TYPE="KEYWORD3">\iff</SEQ>
+ <SEQ TYPE="KEYWORD1">\hss</SEQ>
+ <SEQ TYPE="KEYWORD1">\hom</SEQ>
+ <SEQ TYPE="KEYWORD1">\hat</SEQ>
+ <SEQ TYPE="KEYWORD1">\geq</SEQ>
+ <SEQ TYPE="KEYWORD1">\gcd</SEQ>
+ <SEQ TYPE="KEYWORD4">\fam</SEQ>
+ <SEQ TYPE="KEYWORD1">\exp</SEQ>
+ <SEQ TYPE="KEYWORD2">\eth</SEQ>
+ <SEQ TYPE="KEYWORD1">\eta</SEQ>
+ <SEQ TYPE="KEYWORD1">\end</SEQ>
+ <SEQ TYPE="KEYWORD1">\ell</SEQ>
+ <SEQ TYPE="KEYWORD1">\dot</SEQ>
+ <SEQ TYPE="KEYWORD1">\div</SEQ>
+ <SEQ TYPE="KEYWORD1">\dim</SEQ>
+ <SEQ TYPE="KEYWORD1">\det</SEQ>
+ <SEQ TYPE="KEYWORD1">\deg</SEQ>
+ <SEQ TYPE="FUNCTION">\def</SEQ>
+ <SEQ TYPE="KEYWORD4">\day</SEQ>
+ <SEQ TYPE="KEYWORD1">\dag</SEQ>
+ <SEQ TYPE="KEYWORD1">\cup</SEQ>
+ <SEQ TYPE="KEYWORD1">\csc</SEQ>
+ <SEQ TYPE="KEYWORD1">\cot</SEQ>
+ <SEQ TYPE="KEYWORD1">\cos</SEQ>
+ <SEQ TYPE="KEYWORD1">\chi</SEQ>
+ <SEQ TYPE="KEYWORD1">\cap</SEQ>
+ <SEQ TYPE="KEYWORD1">\cal</SEQ>
+ <SEQ TYPE="KEYWORD1">\bye</SEQ>
+ <SEQ TYPE="COMMENT4">\box</SEQ>
+ <SEQ TYPE="KEYWORD1">\bot</SEQ>
+ <SEQ TYPE="KEYWORD1">\Big</SEQ>
+ <SEQ TYPE="KEYWORD1">\big</SEQ>
+ <SEQ TYPE="KEYWORD1">\bar</SEQ>
+ <SEQ TYPE="KEYWORD1">\ast</SEQ>
+ <SEQ TYPE="KEYWORD1">\arg</SEQ>
+
+ <!-- Length Three Invisible Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="^" TYPE="KEYWORD2"
+ >(\u005E|\x5E)(\u005E|\x5E)(\p{ASCII}|\u0000-\u007F)</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{3}</SEQ_REGEXP>
+
+ <!-- Two letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\Xi</SEQ>
+ <SEQ TYPE="KEYWORD1">\xi</SEQ>
+ <SEQ TYPE="KEYWORD1">\wr</SEQ>
+ <SEQ TYPE="KEYWORD1">\wp</SEQ>
+ <SEQ TYPE="KEYWORD1">\wd</SEQ>
+ <SEQ TYPE="KEYWORD1">\tt</SEQ>
+ <SEQ TYPE="KEYWORD1">\to</SEQ>
+ <SEQ TYPE="KEYWORD1">\sp</SEQ>
+ <SEQ TYPE="KEYWORD1">\sl</SEQ>
+ <SEQ TYPE="KEYWORD1">\sb</SEQ>
+ <SEQ TYPE="KEYWORD1">\rq</SEQ>
+ <SEQ TYPE="KEYWORD1">\rm</SEQ>
+ <SEQ TYPE="KEYWORD1">\Re</SEQ>
+ <SEQ TYPE="KEYWORD1">\Pr</SEQ>
+ <SEQ TYPE="KEYWORD1">\pm</SEQ>
+ <SEQ TYPE="KEYWORD1">\Pi</SEQ>
+ <SEQ TYPE="KEYWORD1">\pi</SEQ>
+ <SEQ TYPE="KEYWORD3">\or</SEQ>
+ <SEQ TYPE="KEYWORD1">\of</SEQ>
+ <SEQ TYPE="KEYWORD1">\nu</SEQ>
+ <SEQ TYPE="KEYWORD1">\ni</SEQ>
+ <SEQ TYPE="KEYWORD1">\ne</SEQ>
+ <SEQ TYPE="KEYWORD1">\mu</SEQ>
+ <SEQ TYPE="KEYWORD1">\mp</SEQ>
+ <SEQ TYPE="KEYWORD1">\lq</SEQ>
+ <SEQ TYPE="KEYWORD1">\ln</SEQ>
+ <SEQ TYPE="KEYWORD1">\ll</SEQ>
+ <SEQ TYPE="KEYWORD1">\lg</SEQ>
+ <SEQ TYPE="KEYWORD1">\le</SEQ>
+ <SEQ TYPE="KEYWORD1">\it</SEQ>
+ <SEQ TYPE="KEYWORD1">\in</SEQ>
+ <SEQ TYPE="KEYWORD1">\Im</SEQ>
+ <SEQ TYPE="KEYWORD3">\if</SEQ>
+ <SEQ TYPE="KEYWORD1">\ht</SEQ>
+ <SEQ TYPE="KEYWORD1">\gg</SEQ>
+ <SEQ TYPE="KEYWORD1">\ge</SEQ>
+ <SEQ TYPE="KEYWORD3">\fi</SEQ>
+ <SEQ TYPE="KEYWORD1">\dp</SEQ>
+ <SEQ TYPE="KEYWORD1">\do</SEQ>
+ <SEQ TYPE="KEYWORD1">\cr</SEQ>
+ <SEQ TYPE="KEYWORD1">\bf</SEQ>
+
+ <!-- Accents and Special Characters -->
+ <SEQ TYPE="KEYWORD2">\AE</SEQ>
+ <SEQ TYPE="KEYWORD2">\ae</SEQ>
+ <SEQ TYPE="KEYWORD2">\AA</SEQ>
+ <SEQ TYPE="KEYWORD2">\aa</SEQ>
+ <SEQ TYPE="KEYWORD2">\OE</SEQ>
+ <SEQ TYPE="KEYWORD2">\oe</SEQ>
+ <SEQ TYPE="KEYWORD2">\ss</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{2}</SEQ_REGEXP>
+
+ <!-- One letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\S</SEQ>
+ <SEQ TYPE="KEYWORD1">\P</SEQ>
+
+ <!-- Accents and Special Characters -->
+ <SEQ TYPE="KEYWORD2">\=</SEQ>
+ <SEQ TYPE="KEYWORD2">\'</SEQ>
+ <SEQ TYPE="KEYWORD2">\"</SEQ>
+ <SEQ TYPE="KEYWORD2">\~</SEQ>
+ <SEQ TYPE="KEYWORD2">\`</SEQ>
+ <SEQ TYPE="KEYWORD2">\^</SEQ>
+ <SEQ TYPE="KEYWORD2">\.</SEQ>
+ <SEQ TYPE="KEYWORD2">\H</SEQ>
+ <SEQ TYPE="KEYWORD2">\c</SEQ>
+ <SEQ TYPE="KEYWORD2">\d</SEQ>
+ <SEQ TYPE="KEYWORD2">\b</SEQ>
+ <SEQ TYPE="KEYWORD2">\v</SEQ>
+ <SEQ TYPE="KEYWORD2">\u</SEQ>
+ <SEQ TYPE="KEYWORD2">\t</SEQ>
+ <SEQ TYPE="KEYWORD2">\r</SEQ>
+ <SEQ TYPE="KEYWORD2">\k</SEQ>
+ <SEQ TYPE="KEYWORD2">\O</SEQ>
+ <SEQ TYPE="KEYWORD2">\o</SEQ>
+ <SEQ TYPE="KEYWORD2">\L</SEQ>
+ <SEQ TYPE="KEYWORD2">\l</SEQ>
+ <SEQ TYPE="KEYWORD2">\j</SEQ>
+ <SEQ TYPE="KEYWORD2">\i</SEQ>
+ <SEQ TYPE="KEYWORD1">\?</SEQ>
+ <SEQ TYPE="KEYWORD1">\></SEQ>
+ <SEQ TYPE="KEYWORD1">\<</SEQ>
+ <SEQ TYPE="KEYWORD1">\;</SEQ>
+ <SEQ TYPE="KEYWORD1">\:</SEQ>
+ <SEQ TYPE="KEYWORD1">\/</SEQ>
+ <SEQ TYPE="KEYWORD1">\-</SEQ>
+ <SEQ TYPE="KEYWORD1">\,</SEQ>
+ <SEQ TYPE="KEYWORD1">\+</SEQ>
+ <SEQ TYPE="KEYWORD1">\*</SEQ>
+ <SEQ TYPE="KEYWORD1">\)</SEQ>
+ <SEQ TYPE="KEYWORD1">\(</SEQ>
+ <SEQ TYPE="KEYWORD1">\!</SEQ>
+ <SEQ TYPE="KEYWORD1">\|</SEQ>
+ <SEQ TYPE="KEYWORD1">\\</SEQ>
+
+ <!-- Reserved Characters -->
+ <SEQ TYPE="KEYWORD2">\#</SEQ>
+ <SEQ TYPE="KEYWORD2">\$</SEQ>
+ <SEQ TYPE="KEYWORD2">\%</SEQ>
+ <SEQ TYPE="KEYWORD2">\&</SEQ>
+ <SEQ TYPE="KEYWORD2">\{</SEQ>
+ <SEQ TYPE="KEYWORD2">\}</SEQ>
+ <SEQ TYPE="KEYWORD2">\_</SEQ>
+
+ <!-- Length One ASCII Index -->
+ <SEQ_REGEXP HASH_CHARS="`" TYPE="KEYWORD2">`\p{ASCII}</SEQ_REGEXP>
+
+ <!-- Definition Arguments -->
+ <SEQ_REGEXP HASH_CHARS="#" TYPE="DIGIT">#[1-9]</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{1}</SEQ_REGEXP>
+
+ <!-- Zero letter control sequences -->
+
+ <!-- Punctuation -->
+ <SEQ TYPE="LITERAL3">`</SEQ>
+ <SEQ TYPE="LITERAL3">!</SEQ>
+ <SEQ TYPE="LITERAL3">.</SEQ>
+ <SEQ TYPE="LITERAL3">,</SEQ>
+ <SEQ TYPE="LITERAL3">;</SEQ>
+ <SEQ TYPE="LITERAL3">?</SEQ>
+ <SEQ TYPE="LITERAL3">:</SEQ>
+ <SEQ TYPE="LITERAL3">'</SEQ>
+ <SEQ TYPE="LITERAL3">"</SEQ>
+ <SEQ TYPE="LITERAL3">\</SEQ>
+
+ <!-- Simple Math Characters -->
+ <SEQ TYPE="LITERAL4">(</SEQ>
+ <SEQ TYPE="LITERAL4">)</SEQ>
+ <SEQ TYPE="LITERAL4">=</SEQ>
+ <SEQ TYPE="LITERAL4">+</SEQ>
+ <SEQ TYPE="LITERAL4">-</SEQ>
+ <SEQ TYPE="LITERAL4">></SEQ>
+ <SEQ TYPE="LITERAL4"><</SEQ>
+
+ <!-- Grouping Brackets -->
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+
+ <!-- Reserved Characters -->
+ <SEQ TYPE="LITERAL1">&</SEQ>
+ <SEQ TYPE="LITERAL1">^</SEQ>
+ <SEQ TYPE="LITERAL1">_</SEQ>
+ <SEQ TYPE="LITERAL1">~</SEQ>
+
+ <!-- Dimensions -->
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*pt|\d*\.\d+?pt|\d*pt)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*pc|\d*\.\d+?pc|\d*pc)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*in|\d*\.\d+?in|\d*in)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*bp|\d*\.\d+?bp|\d*bp)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*cm|\d*\.\d+?cm|\d*cm)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*mm|\d*\.\d+?mm|\d*mm)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*dd|\d*\.\d+?dd|\d*dd)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*cc|\d*\.\d+?cc|\d*cc)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*sp|\d*\.\d+?sp|\d*sp)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*ex|\d*\.\d+?ex|\d*ex)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*em|\d*\.\d+?em|\d*em)</SEQ_REGEXP>
+
+ </RULES>
+
+ <RULES SET="MATH" DEFAULT="MARKUP">
+
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+
+ <!-- At Least Twenty Five letter control sequences -->
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL"
+ >\\[a-zA-Z@]{25}[a-zA-Z@]*</SEQ_REGEXP>
+
+ <!-- Twenty Four letter control sequences -->
+ <SEQ TYPE="KEYWORD1">\interfootnotelinepenalty</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{24}</SEQ_REGEXP>
+
+ <!-- Twenty Three letter control sequences -->
+ <SEQ TYPE="KEYWORD1">\interdisplaylinepenalty</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{23}</SEQ_REGEXP>
+
+ <!-- Twenty Two letter control sequences -->
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{22}</SEQ_REGEXP>
+
+ <!-- Twenty One letter control sequences -->
+ <SEQ TYPE="KEYWORD4">\belowdisplayshortskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\abovedisplayshortskip</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{21}</SEQ_REGEXP>
+
+ <!-- Twenty letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\doublehyphendemerits</SEQ>
+ <SEQ TYPE="KEYWORD1">\abovedisplayshortskip</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{20}</SEQ_REGEXP>
+
+ <!-- Nineteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\normallineskiplimit</SEQ>
+ <SEQ TYPE="KEYWORD4">\finalhyphendemerits</SEQ>
+ <SEQ TYPE="KEYWORD4">\displaywidowpenalty</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{19}</SEQ_REGEXP>
+
+ <!-- Eighteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\postdisplaypenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\nulldelimiterspace</SEQ>
+ <SEQ TYPE="KEYWORD1">\normalbaselineskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\Longleftrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\longleftrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\delimitershortfall</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{18}</SEQ_REGEXP>
+
+ <!-- Seventeen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\tracingparagraphs</SEQ>
+ <SEQ TYPE="KEYWORD1">\scriptscriptstyle</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightleftharpoons</SEQ>
+ <SEQ TYPE="KEYWORD1">\predisplaypenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\errorcontextlines</SEQ>
+ <SEQ TYPE="KEYWORD4">\defaulthyphenchar</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{17}</SEQ_REGEXP>
+
+ <!-- Sixteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\tracinglostchars</SEQ>
+ <SEQ TYPE="KEYWORD1">\scriptscriptfont</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightharpoondown</SEQ>
+ <SEQ TYPE="KEYWORD4">\predisplaypenaty</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagefilllstretch</SEQ>
+ <SEQ TYPE="KEYWORD1">\offinterlineskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\nonfrenchspacing</SEQ>
+ <SEQ TYPE="KEYWORD4">\interlinepenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\emergencystretch</SEQ>
+ <SEQ TYPE="KEYWORD4">\belowdisplayskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\allocationnumber</SEQ>
+ <SEQ TYPE="KEYWORD4">\abovedisplayskip</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{16}</SEQ_REGEXP>
+
+ <!-- Fifteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\tracingrestores</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingcommands</SEQ>
+ <SEQ TYPE="KEYWORD1">\smallskipamount</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagefillstretch</SEQ>
+ <SEQ TYPE="KEYWORD1">\normalbaselines</SEQ>
+ <SEQ TYPE="KEYWORD1">\nointerlineskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\leftharpoondown</SEQ>
+ <SEQ TYPE="KEYWORD1">\insertpenalties</SEQ>
+ <SEQ TYPE="KEYWORD4">\floatingpenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\exhyphenpenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\delimiterfactor</SEQ>
+ <SEQ TYPE="KEYWORD4">\defaultskewchar</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigtriangledown</SEQ>
+ <SEQ TYPE="KEYWORD1">\afterassignment</SEQ>
+ <SEQ TYPE="KEYWORD1">\abovewithdelims</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{15}</SEQ_REGEXP>
+
+ <!-- Fourteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\splitfirstmark</SEQ>
+ <SEQ TYPE="KEYWORD4">\showboxbreadth</SEQ>
+ <SEQ TYPE="KEYWORD4">\righthyphenmin</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightharpoonup</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightarrowfill</SEQ>
+ <SEQ TYPE="KEYWORD1">\removelastskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\predisplaysize</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagefilstretch</SEQ>
+ <SEQ TYPE="KEYWORD1">\overwithdelims</SEQ>
+ <SEQ TYPE="KEYWORD1">\overrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\normallineskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\longrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\Longrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\Leftrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\leftrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\hookrightarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\holdinginserts</SEQ>
+ <SEQ TYPE="KEYWORD1">\atopwithdelims</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{14}</SEQ_REGEXP>
+
+ <!-- Thirteen letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\ttraggedright</SEQ>
+ <SEQ TYPE="KEYWORD1">\triangleright</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingoutput</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingonline</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingmacros</SEQ>
+ <SEQ TYPE="KEYWORD4">\splitmaxdepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\overleftarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\outputpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\nopagenumbers</SEQ>
+ <SEQ TYPE="KEYWORD1">\medskipamount</SEQ>
+ <SEQ TYPE="KEYWORD4">\maxdeadcycles</SEQ>
+ <SEQ TYPE="KEYWORD1">\magnification</SEQ>
+ <SEQ TYPE="KEYWORD1">\Longleftarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\longleftarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\lineskiplimit</SEQ>
+ <SEQ TYPE="KEYWORD4">\lefthyphenmin </SEQ>
+ <SEQ TYPE="KEYWORD1">\leftharpoonup</SEQ>
+ <SEQ TYPE="KEYWORD1">\leftarrowfill</SEQ>
+ <SEQ TYPE="KEYWORD4">\hyphenpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\hookleftarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\frenchspacing</SEQ>
+ <SEQ TYPE="KEYWORD1">\errorstopmode</SEQ>
+ <SEQ TYPE="KEYWORD1">\downbracefill</SEQ>
+ <SEQ TYPE="KEYWORD1">\displaylimits</SEQ>
+ <SEQ TYPE="KEYWORD4">\displayindent</SEQ>
+ <SEQ TYPE="KEYWORD1">\discretionary</SEQ>
+ <SEQ TYPE="KEYWORD4">\brokenpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigtriangleup</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigskipamount</SEQ>
+ <SEQ TYPE="KEYWORD1">\advancepageno</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{13}</SEQ_REGEXP>
+
+ <!-- Twelve letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\widowpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\triangleleft</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingstats</SEQ>
+ <SEQ TYPE="KEYWORD4">\tracingpages</SEQ>
+ <SEQ TYPE="KEYWORD4">\splittopskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\splitbotmark</SEQ>
+ <SEQ TYPE="KEYWORD4">\showboxdepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\romannumeral</SEQ>
+ <SEQ TYPE="KEYWORD1">\raggedbottom</SEQ>
+ <SEQ TYPE="KEYWORD4">\pretolerance</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagecontents</SEQ>
+ <SEQ TYPE="KEYWORD4">\overfullrule</SEQ>
+ <SEQ TYPE="KEYWORD1">\normalbottom</SEQ>
+ <SEQ TYPE="KEYWORD1">\negthinspace</SEQ>
+ <SEQ TYPE="KEYWORD4">\mathsurround</SEQ>
+ <SEQ TYPE="KEYWORD1">\makeheadline</SEQ>
+ <SEQ TYPE="KEYWORD1">\makefootline</SEQ>
+ <SEQ TYPE="KEYWORD1">\ignorespaces</SEQ>
+ <SEQ TYPE="KEYWORD1">\footnoterule</SEQ>
+ <SEQ TYPE="KEYWORD4">\everydisplay</SEQ>
+ <SEQ TYPE="KEYWORD1">\dosupereject</SEQ>
+ <SEQ TYPE="KEYWORD4">\displaywidth</SEQ>
+ <SEQ TYPE="KEYWORD1">\displaystyle</SEQ>
+ <SEQ TYPE="KEYWORD1">\displaylines</SEQ>
+ <SEQ TYPE="KEYWORD1">\bordermatrix</SEQ>
+ <SEQ TYPE="KEYWORD4">\binoppenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\beginsection</SEQ>
+ <SEQ TYPE="KEYWORD1">\baselineskip</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{12}</SEQ_REGEXP>
+
+ <!-- Eleven letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\Updownarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\updownarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\upbracefill</SEQ>
+ <SEQ TYPE="KEYWORD4">\thickmuskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\spacefactor</SEQ>
+ <SEQ TYPE="KEYWORD1">\showhyphens</SEQ>
+ <SEQ TYPE="KEYWORD1">\scriptstyle</SEQ>
+ <SEQ TYPE="KEYWORD4">\scriptspace</SEQ>
+ <SEQ TYPE="KEYWORD1">\raggedright</SEQ>
+ <SEQ TYPE="KEYWORD1">\plainoutput</SEQ>
+ <SEQ TYPE="KEYWORD4">\parfillskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagestretch</SEQ>
+ <SEQ TYPE="KEYWORD1">\nonstopmode</SEQ>
+ <SEQ TYPE="COMMENT2">\newlinechar</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathpalette</SEQ>
+ <SEQ TYPE="FUNCTION">\mathchardef</SEQ>
+ <SEQ TYPE="KEYWORD1">\magstephalf</SEQ>
+ <SEQ TYPE="KEYWORD4">\linepenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\lastpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\hyphenation</SEQ>
+ <SEQ TYPE="KEYWORD1">\expandafter</SEQ>
+ <SEQ TYPE="KEYWORD4">\endlinechar</SEQ>
+ <SEQ TYPE="KEYWORD1">\diamondsuit</SEQ>
+ <SEQ TYPE="KEYWORD4">\clubpenalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\boxmaxdepth</SEQ>
+ <SEQ TYPE="KEYWORD4">\adjdemerits</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{11}</SEQ_REGEXP>
+
+ <!-- Ten letter control sequences -->
+
+ <SEQ TYPE="KEYWORD4">\xspaceskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\varepsilon</SEQ>
+ <SEQ TYPE="KEYWORD1">\underbrace</SEQ>
+ <SEQ TYPE="KEYWORD1">\tracingall</SEQ>
+ <SEQ TYPE="KEYWORD4">\thinmuskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\textindent</SEQ>
+ <SEQ TYPE="KEYWORD1">\supereject</SEQ>
+ <SEQ TYPE="KEYWORD1">\sqsupseteq</SEQ>
+ <SEQ TYPE="KEYWORD1">\smallbreak</SEQ>
+ <SEQ TYPE="KEYWORD1">\scrollmode</SEQ>
+ <SEQ TYPE="KEYWORD1">\scriptfont</SEQ>
+ <SEQ TYPE="KEYWORD1">\rmoustache</SEQ>
+ <SEQ TYPE="KEYWORD1">\Rightarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightarrow</SEQ>
+ <SEQ TYPE="KEYWORD4">\relpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\pageshrink</SEQ>
+ <SEQ TYPE="KEYWORD1">\pageinsert</SEQ>
+ <SEQ TYPE="KEYWORD1">\obeyspaces</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathhexbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathchoice</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathaccent</SEQ>
+ <SEQ TYPE="KEYWORD1">\mapstochar</SEQ>
+ <SEQ TYPE="KEYWORD1">\longmapsto</SEQ>
+ <SEQ TYPE="KEYWORD1">\lmoustache</SEQ>
+ <SEQ TYPE="KEYWORD1">\leqalignno</SEQ>
+ <SEQ TYPE="KEYWORD1">\leavevmode</SEQ>
+ <SEQ TYPE="KEYWORD1">\hyphenchar</SEQ>
+ <SEQ TYPE="KEYWORD4">\hangindent</SEQ>
+ <SEQ TYPE="KEYWORD4">\globaldefs</SEQ>
+ <SEQ TYPE="KEYWORD1">\fmtversion</SEQ>
+ <SEQ TYPE="KEYWORD4">\escapechar</SEQ>
+ <SEQ TYPE="KEYWORD1">\errmessage</SEQ>
+ <SEQ TYPE="KEYWORD1">\dospecials</SEQ>
+ <SEQ TYPE="KEYWORD1">\deadcycles</SEQ>
+ <SEQ TYPE="KEYWORD1">\centerline</SEQ>
+ <SEQ TYPE="KEYWORD1">\begingroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\allowbreak</SEQ>
+ <SEQ TYPE="KEYWORD1">\aftergroup</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{10}</SEQ_REGEXP>
+
+ <!-- Nine letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\widetilde</SEQ>
+ <SEQ TYPE="KEYWORD1">\vfootnote</SEQ>
+ <SEQ TYPE="KEYWORD1">\uppercase</SEQ>
+ <SEQ TYPE="KEYWORD1">\unpenalty</SEQ>
+ <SEQ TYPE="KEYWORD1">\underline</SEQ>
+ <SEQ TYPE="KEYWORD1">\undefined</SEQ>
+ <SEQ TYPE="KEYWORD1">\topinsert</SEQ>
+ <SEQ TYPE="KEYWORD4">\tolerance</SEQ>
+ <SEQ TYPE="KEYWORD1">\thinspace</SEQ>
+ <SEQ TYPE="KEYWORD1">\textstyle</SEQ>
+ <SEQ TYPE="KEYWORD1">\spadesuit</SEQ>
+ <SEQ TYPE="KEYWORD4">\spaceskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\smallskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\showlists</SEQ>
+ <SEQ TYPE="KEYWORD4">\rightskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\rightline</SEQ>
+ <SEQ TYPE="KEYWORD1">\prevdepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\preloaded</SEQ>
+ <SEQ TYPE="KEYWORD4">\parindent</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagetotal</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagedepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\overbrace</SEQ>
+ <SEQ TYPE="KEYWORD1">\obeylines</SEQ>
+ <SEQ TYPE="KEYWORD1">\nonscript</SEQ>
+ <SEQ TYPE="FUNCTION">\newmuskip</SEQ>
+ <SEQ TYPE="FUNCTION">\newinsert</SEQ>
+ <SEQ TYPE="FUNCTION">\muskipdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\multispan</SEQ>
+ <SEQ TYPE="KEYWORD1">\moveright</SEQ>
+ <SEQ TYPE="KEYWORD1">\midinsert</SEQ>
+ <SEQ TYPE="KEYWORD4">\medmuskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathstrut</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathpunct</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathinner</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathclose</SEQ>
+ <SEQ TYPE="KEYWORD1">\lowercase</SEQ>
+ <SEQ TYPE="KEYWORD4">\looseness</SEQ>
+ <SEQ TYPE="KEYWORD1">\Leftarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\leftarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\immediate</SEQ>
+ <SEQ TYPE="KEYWORD1">\hrulefill</SEQ>
+ <SEQ TYPE="KEYWORD1">\hidewidth</SEQ>
+ <SEQ TYPE="KEYWORD1">\heartsuit</SEQ>
+ <SEQ TYPE="KEYWORD4">\hangafter</SEQ>
+ <SEQ TYPE="KEYWORD1">\goodbreak</SEQ>
+ <SEQ TYPE="COMMENT3">\futurelet</SEQ>
+ <SEQ TYPE="KEYWORD1">\footstrut</SEQ>
+ <SEQ TYPE="KEYWORD1">\fontdimen</SEQ>
+ <SEQ TYPE="KEYWORD1">\firstmark</SEQ>
+ <SEQ TYPE="KEYWORD4">\everyvbox</SEQ>
+ <SEQ TYPE="KEYWORD4">\everymath</SEQ>
+ <SEQ TYPE="KEYWORD4">\everyhbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\eqalignno</SEQ>
+ <SEQ TYPE="KEYWORD1">\endinsert</SEQ>
+ <SEQ TYPE="FUNCTION">\endcsname</SEQ>
+ <SEQ TYPE="KEYWORD1">\Downarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\downarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\delimiter</SEQ>
+ <SEQ TYPE="KEYWORD1">\copyright</SEQ>
+ <SEQ TYPE="KEYWORD1">\cleartabs</SEQ>
+ <SEQ TYPE="KEYWORD1">\centering</SEQ>
+ <SEQ TYPE="KEYWORD1">\bracevert</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigotimes</SEQ>
+ <SEQ TYPE="KEYWORD1">\batchmode</SEQ>
+ <SEQ TYPE="KEYWORD2">\backslash</SEQ>
+ <SEQ TYPE="KEYWORD1">\Arrowvert</SEQ>
+ <SEQ TYPE="KEYWORD1">\arrowvert</SEQ>
+
+ <!-- Length Nine Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\muskip([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{9}</SEQ_REGEXP>
+
+ <!-- Eight letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\xleaders</SEQ>
+ <SEQ TYPE="KEYWORD1">\vphantom</SEQ>
+ <SEQ TYPE="KEYWORD4">\vbadness</SEQ>
+ <SEQ TYPE="KEYWORD1">\vartheta</SEQ>
+ <SEQ TYPE="KEYWORD1">\varsigma</SEQ>
+ <SEQ TYPE="KEYWORD1">\underbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\triangle</SEQ>
+ <SEQ TYPE="KEYWORD1">\textfont</SEQ>
+ <SEQ TYPE="KEYWORD1">\tabsdone</SEQ>
+ <SEQ TYPE="KEYWORD1">\tabalign</SEQ>
+ <SEQ TYPE="KEYWORD1">\supseteq</SEQ>
+ <SEQ TYPE="KEYWORD1">\subseteq</SEQ>
+ <SEQ TYPE="KEYWORD1">\strutbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\smallint</SEQ>
+ <SEQ TYPE="KEYWORD1">\skewchar</SEQ>
+ <SEQ TYPE="KEYWORD1">\setminus</SEQ>
+ <SEQ TYPE="KEYWORD1">\proclaim</SEQ>
+ <SEQ TYPE="KEYWORD1">\prevgraf</SEQ>
+ <SEQ TYPE="KEYWORD1">\patterns</SEQ>
+ <SEQ TYPE="KEYWORD1">\parshape</SEQ>
+ <SEQ TYPE="KEYWORD1">\parallel</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagegoal</SEQ>
+ <SEQ TYPE="KEYWORD1">\pagebody</SEQ>
+ <SEQ TYPE="KEYWORD1">\overline</SEQ>
+ <SEQ TYPE="KEYWORD1">\oldstyle</SEQ>
+ <SEQ TYPE="KEYWORD1">\nolimits</SEQ>
+ <SEQ TYPE="KEYWORD1">\noindent</SEQ>
+ <SEQ TYPE="KEYWORD1">\noexpand</SEQ>
+ <SEQ TYPE="COMMENT2">\newwrite</SEQ>
+ <SEQ TYPE="COMMENT2">\newdimen</SEQ>
+ <SEQ TYPE="COMMENT2">\newcount</SEQ>
+ <SEQ TYPE="KEYWORD1">\narrower</SEQ>
+ <SEQ TYPE="KEYWORD1">\moveleft</SEQ>
+ <SEQ TYPE="KEYWORD1">\medbreak</SEQ>
+ <SEQ TYPE="KEYWORD1">\maxdimen</SEQ>
+ <SEQ TYPE="KEYWORD4">\maxdepth</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathopen</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathcode</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathchar</SEQ>
+ <SEQ TYPE="KEYWORD1">\lineskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\leftskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\leftline</SEQ>
+ <SEQ TYPE="KEYWORD1">\lastskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\lastkern</SEQ>
+ <SEQ TYPE="KEYWORD4">\language</SEQ>
+ <SEQ TYPE="KEYWORD1">\itemitem</SEQ>
+ <SEQ TYPE="KEYWORD1">\hphantom</SEQ>
+ <SEQ TYPE="KEYWORD1">\hideskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\headline</SEQ>
+ <SEQ TYPE="KEYWORD4">\hbadness</SEQ>
+ <SEQ TYPE="KEYWORD1">\footnote</SEQ>
+ <SEQ TYPE="KEYWORD1">\footline</SEQ>
+ <SEQ TYPE="KEYWORD1">\multiply</SEQ>
+ <SEQ TYPE="KEYWORD1">\fontname</SEQ>
+ <SEQ TYPE="KEYWORD1">\filbreak</SEQ>
+ <SEQ TYPE="KEYWORD4">\everypar</SEQ>
+ <SEQ TYPE="KEYWORD4">\everyjob</SEQ>
+ <SEQ TYPE="KEYWORD1">\endinput</SEQ>
+ <SEQ TYPE="KEYWORD1">\endgroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\emptyset</SEQ>
+ <SEQ TYPE="FUNCTION">\dimendef</SEQ>
+ <SEQ TYPE="FUNCTION">\countdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\clubsuit</SEQ>
+ <SEQ TYPE="KEYWORD1">\closeout</SEQ>
+ <SEQ TYPE="KEYWORD1">\cleaders</SEQ>
+ <SEQ TYPE="KEYWORD1">\buildrel</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigwedge</SEQ>
+ <SEQ TYPE="KEYWORD1">\biguplus</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigsqcup</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigoplus</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigbreak</SEQ>
+
+ <!-- Length Eight Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\muskip[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Eight Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\dimen([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Eight Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\count([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{8}</SEQ_REGEXP>
+
+ <!-- Seven letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\widehat</SEQ>
+ <SEQ TYPE="KEYWORD4">\voffset</SEQ>
+ <SEQ TYPE="KEYWORD1">\vfilneg</SEQ>
+ <SEQ TYPE="KEYWORD1">\vcenter</SEQ>
+ <SEQ TYPE="KEYWORD1">\vadjust</SEQ>
+ <SEQ TYPE="KEYWORD1">\Upsilon</SEQ>
+ <SEQ TYPE="KEYWORD1">\upsilon</SEQ>
+ <SEQ TYPE="KEYWORD1">\Uparrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\uparrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\unvcopy</SEQ>
+ <SEQ TYPE="KEYWORD1">\unhcopy</SEQ>
+ <SEQ TYPE="KEYWORD4">\topskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\topmark</SEQ>
+ <SEQ TYPE="FUNCTION">\toksdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\tabsyet</SEQ>
+ <SEQ TYPE="KEYWORD4">\tabskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\swarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\special</SEQ>
+ <SEQ TYPE="FUNCTION">\skipdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\showthe</SEQ>
+ <SEQ TYPE="KEYWORD1">\showbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\shipout</SEQ>
+ <SEQ TYPE="KEYWORD1">\sevensy</SEQ>
+ <SEQ TYPE="KEYWORD1">\sevenrm</SEQ>
+ <SEQ TYPE="KEYWORD1">\sevenbf</SEQ>
+ <SEQ TYPE="KEYWORD1">\settabs</SEQ>
+ <SEQ TYPE="KEYWORD1">\searrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\rootbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\radical</SEQ>
+ <SEQ TYPE="KEYWORD1">\pmatrix</SEQ>
+ <SEQ TYPE="KEYWORD1">\phantom</SEQ>
+ <SEQ TYPE="KEYWORD1">\penalty</SEQ>
+ <SEQ TYPE="KEYWORD4">\pausing</SEQ>
+ <SEQ TYPE="KEYWORD1">\partial</SEQ>
+ <SEQ TYPE="KEYWORD4">\parskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\openout</SEQ>
+ <SEQ TYPE="KEYWORD1">\ooalign</SEQ>
+ <SEQ TYPE="KEYWORD1">\nwarrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\nobreak</SEQ>
+ <SEQ TYPE="KEYWORD1">\noalign</SEQ>
+ <SEQ TYPE="COMMENT2">\newtoks</SEQ>
+ <SEQ TYPE="COMMENT2">\newskip</SEQ>
+ <SEQ TYPE="COMMENT2">\newread</SEQ>
+ <SEQ TYPE="COMMENT2">\newhelp</SEQ>
+ <SEQ TYPE="KEYWORD1">\nearrow</SEQ>
+ <SEQ TYPE="KEYWORD1">\natural</SEQ>
+ <SEQ TYPE="KEYWORD1">\mscount</SEQ>
+ <SEQ TYPE="KEYWORD1">\message</SEQ>
+ <SEQ TYPE="KEYWORD1">\medskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\meaning</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathrel</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathord</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathbin</SEQ>
+ <SEQ TYPE="KEYWORD1">\magstep</SEQ>
+ <SEQ TYPE="KEYWORD1">\leaders</SEQ>
+ <SEQ TYPE="KEYWORD1">\lastbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\joinrel</SEQ>
+ <SEQ TYPE="KEYWORD1">\jobname</SEQ>
+ <SEQ TYPE="KEYWORD1">\iterate</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifvmode</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifmmode</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifinner</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifhmode</SEQ>
+ <SEQ TYPE="KEYWORD3">\iffalse</SEQ>
+ <SEQ TYPE="KEYWORD4">\hoffset</SEQ>
+ <SEQ TYPE="KEYWORD1">\hfilneg</SEQ>
+ <SEQ TYPE="KEYWORD1">\footins</SEQ>
+ <SEQ TYPE="KEYWORD1">\fmtname</SEQ>
+ <SEQ TYPE="KEYWORD4">\everycr</SEQ>
+ <SEQ TYPE="KEYWORD4">\errhelp</SEQ>
+ <SEQ TYPE="KEYWORD1">\eqalign</SEQ>
+ <SEQ TYPE="KEYWORD1">\epsilon</SEQ>
+ <SEQ TYPE="KEYWORD1">\enspace</SEQ>
+ <SEQ TYPE="KEYWORD1">\endline</SEQ>
+ <SEQ TYPE="KEYWORD1">\endgraf</SEQ>
+ <SEQ TYPE="KEYWORD1">\dotfill</SEQ>
+ <SEQ TYPE="KEYWORD1">\diamond</SEQ>
+ <SEQ TYPE="KEYWORD1">\delcode</SEQ>
+ <SEQ TYPE="KEYWORD1">\ddagger</SEQ>
+ <SEQ TYPE="KEYWORD1">\columns</SEQ>
+ <SEQ TYPE="KEYWORD1">\closein</SEQ>
+ <SEQ TYPE="FUNCTION">\chardef</SEQ>
+ <SEQ TYPE="KEYWORD2">\cdprime</SEQ>
+ <SEQ TYPE="KEYWORD1">\catcode</SEQ>
+ <SEQ TYPE="KEYWORD1">\braceru</SEQ>
+ <SEQ TYPE="KEYWORD1">\bracerd</SEQ>
+ <SEQ TYPE="KEYWORD1">\bracelu</SEQ>
+ <SEQ TYPE="KEYWORD1">\braceld</SEQ>
+ <SEQ TYPE="KEYWORD1">\botmark</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigodot</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigcirc</SEQ>
+ <SEQ TYPE="KEYWORD1">\advance</SEQ>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4">\\muskip[0-9]</SEQ_REGEXP>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\dimen[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\count[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\toks([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Seven Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\skip([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Seven Decimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Seven Octal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char'[0-7][0-7]</SEQ_REGEXP>
+
+ <!-- Length Seven Hexadecimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char"[0-9A-Fa-f][0-9A-Fa-f]</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{7}</SEQ_REGEXP>
+
+ <!-- Six letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\vsplit</SEQ>
+ <SEQ TYPE="KEYWORD1">\varrho</SEQ>
+ <SEQ TYPE="KEYWORD1">\varphi</SEQ>
+ <SEQ TYPE="KEYWORD1">\valign</SEQ>
+ <SEQ TYPE="KEYWORD2">\utilde</SEQ>
+ <SEQ TYPE="KEYWORD1">\unvbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\unskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\unkern</SEQ>
+ <SEQ TYPE="KEYWORD1">\unhbox</SEQ>
+ <SEQ TYPE="KEYWORD4">\uchyph</SEQ>
+ <SEQ TYPE="KEYWORD1">\uccode</SEQ>
+ <SEQ TYPE="KEYWORD1">\topins</SEQ>
+ <SEQ TYPE="KEYWORD1">\supset</SEQ>
+ <SEQ TYPE="KEYWORD1">\succeq</SEQ>
+ <SEQ TYPE="KEYWORD1">\subset</SEQ>
+ <SEQ TYPE="KEYWORD1">\string</SEQ>
+ <SEQ TYPE="KEYWORD1">\sfcode</SEQ>
+ <SEQ TYPE="KEYWORD1">\seveni</SEQ>
+ <SEQ TYPE="KEYWORD1">\setbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\rgroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\rfloor</SEQ>
+ <SEQ TYPE="KEYWORD1">\repeat</SEQ>
+ <SEQ TYPE="KEYWORD1">\Relbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\relbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\rbrack</SEQ>
+ <SEQ TYPE="KEYWORD1">\rbrace</SEQ>
+ <SEQ TYPE="KEYWORD1">\rangle</SEQ>
+ <SEQ TYPE="KEYWORD1">\propto</SEQ>
+ <SEQ TYPE="KEYWORD1">\preceq</SEQ>
+ <SEQ TYPE="KEYWORD1">\pageno</SEQ>
+ <SEQ TYPE="KEYWORD4">\output</SEQ>
+ <SEQ TYPE="KEYWORD1">\otimes</SEQ>
+ <SEQ TYPE="KEYWORD1">\oslash</SEQ>
+ <SEQ TYPE="KEYWORD1">\openup</SEQ>
+ <SEQ TYPE="KEYWORD1">\openin</SEQ>
+ <SEQ TYPE="KEYWORD1">\ominus</SEQ>
+ <SEQ TYPE="KEYWORD1">\ointop</SEQ>
+ <SEQ TYPE="KEYWORD1">\oalign</SEQ>
+ <SEQ TYPE="KEYWORD1">\number</SEQ>
+ <SEQ TYPE="COMMENT2">\newfam</SEQ>
+ <SEQ TYPE="COMMENT2">\newbox</SEQ>
+ <SEQ TYPE="COMMENT4">\muskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\models</SEQ>
+ <SEQ TYPE="KEYWORD1">\matrix</SEQ>
+ <SEQ TYPE="KEYWORD1">\mathop</SEQ>
+ <SEQ TYPE="KEYWORD1">\mapsto</SEQ>
+ <SEQ TYPE="KEYWORD1">\limsup</SEQ>
+ <SEQ TYPE="KEYWORD1">\limits</SEQ>
+ <SEQ TYPE="KEYWORD1">\liminf</SEQ>
+ <SEQ TYPE="KEYWORD1">\lgroup</SEQ>
+ <SEQ TYPE="KEYWORD2">\lfhook</SEQ>
+ <SEQ TYPE="KEYWORD1">\lfloor</SEQ>
+ <SEQ TYPE="KEYWORD1">\lccode</SEQ>
+ <SEQ TYPE="KEYWORD1">\lbrack</SEQ>
+ <SEQ TYPE="KEYWORD1">\lbrace</SEQ>
+ <SEQ TYPE="KEYWORD1">\langle</SEQ>
+ <SEQ TYPE="KEYWORD1">\Lambda</SEQ>
+ <SEQ TYPE="KEYWORD1">\lambda</SEQ>
+ <SEQ TYPE="KEYWORD1">\insert</SEQ>
+ <SEQ TYPE="KEYWORD1">\indent</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifvoid</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifvbox</SEQ>
+ <SEQ TYPE="KEYWORD3">\iftrue</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifhbox</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifcase</SEQ>
+ <SEQ TYPE="KEYWORD1">\ialign</SEQ>
+ <SEQ TYPE="KEYWORD1">\halign</SEQ>
+ <SEQ TYPE="FUNCTION">\global</SEQ>
+ <SEQ TYPE="KEYWORD1">\forall</SEQ>
+ <SEQ TYPE="KEYWORD1">\fivesy</SEQ>
+ <SEQ TYPE="KEYWORD1">\fiverm</SEQ>
+ <SEQ TYPE="KEYWORD1">\fivebf</SEQ>
+ <SEQ TYPE="KEYWORD1">\exists</SEQ>
+ <SEQ TYPE="KEYWORD1">\enskip</SEQ>
+ <SEQ TYPE="KEYWORD1">\egroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\divide</SEQ>
+ <SEQ TYPE="KEYWORD1">\dagger</SEQ>
+ <SEQ TYPE="FUNCTION">\csname</SEQ>
+ <SEQ TYPE="KEYWORD2">\cprime</SEQ>
+ <SEQ TYPE="KEYWORD1">\coprod</SEQ>
+ <SEQ TYPE="KEYWORD1">\choose</SEQ>
+ <SEQ TYPE="KEYWORD2">\cfudot</SEQ>
+ <SEQ TYPE="KEYWORD2">\candra</SEQ>
+ <SEQ TYPE="KEYWORD1">\bullet</SEQ>
+ <SEQ TYPE="KEYWORD1">\bowtie</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigvee</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigcup</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigcap</SEQ>
+ <SEQ TYPE="KEYWORD1">\bgroup</SEQ>
+ <SEQ TYPE="KEYWORD1">\arctan</SEQ>
+ <SEQ TYPE="KEYWORD1">\arcsin</SEQ>
+ <SEQ TYPE="KEYWORD1">\arccos</SEQ>
+ <SEQ TYPE="KEYWORD1">\approx</SEQ>
+ <SEQ TYPE="KEYWORD2">\acudot</SEQ>
+ <SEQ TYPE="KEYWORD1">\active</SEQ>
+ <SEQ TYPE="KEYWORD1">\accent</SEQ>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\dimen[0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\count[0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\toks[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\skip[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\box([0-1][0-9][0-9]|2([0-4][0-9]|5[0-5]))</SEQ_REGEXP>
+
+ <!-- Length Six Decimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Six Octal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2">\\char'[0-7]</SEQ_REGEXP>
+
+ <!-- Length Six Hexadecimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2"
+ >\\char"[0-9A-Fa-f]</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{6}</SEQ_REGEXP>
+
+ <!-- Five letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\write</SEQ>
+ <SEQ TYPE="KEYWORD1">\wedge</SEQ>
+ <SEQ TYPE="KEYWORD1">\vskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\vsize</SEQ>
+ <SEQ TYPE="KEYWORD1">\vrule</SEQ>
+ <SEQ TYPE="KEYWORD1">\vglue</SEQ>
+ <SEQ TYPE="KEYWORD4">\vfuzz</SEQ>
+ <SEQ TYPE="KEYWORD1">\vfill</SEQ>
+ <SEQ TYPE="KEYWORD1">\vdots</SEQ>
+ <SEQ TYPE="KEYWORD1">\vdash</SEQ>
+ <SEQ TYPE="KEYWORD1">\varpi</SEQ>
+ <SEQ TYPE="KEYWORD1">\uplus</SEQ>
+ <SEQ TYPE="KEYWORD1">\ttfam</SEQ>
+ <SEQ TYPE="KEYWORD1">\times</SEQ>
+ <SEQ TYPE="KEYWORD1">\tilde</SEQ>
+ <SEQ TYPE="KEYWORD1">\Theta</SEQ>
+ <SEQ TYPE="KEYWORD1">\theta</SEQ>
+ <SEQ TYPE="KEYWORD1">\tentt</SEQ>
+ <SEQ TYPE="KEYWORD1">\tensy</SEQ>
+ <SEQ TYPE="KEYWORD1">\tensl</SEQ>
+ <SEQ TYPE="KEYWORD1">\tenrm</SEQ>
+ <SEQ TYPE="KEYWORD1">\tenit</SEQ>
+ <SEQ TYPE="KEYWORD1">\tenex</SEQ>
+ <SEQ TYPE="KEYWORD1">\tenbf</SEQ>
+ <SEQ TYPE="KEYWORD1">\strut</SEQ>
+ <SEQ TYPE="KEYWORD1">\sqcup</SEQ>
+ <SEQ TYPE="KEYWORD1">\sqcap</SEQ>
+ <SEQ TYPE="KEYWORD1">\space</SEQ>
+ <SEQ TYPE="KEYWORD1">\smile</SEQ>
+ <SEQ TYPE="KEYWORD1">\smash</SEQ>
+ <SEQ TYPE="KEYWORD1">\slfam</SEQ>
+ <SEQ TYPE="KEYWORD1">\slash</SEQ>
+ <SEQ TYPE="KEYWORD1">\simeq</SEQ>
+ <SEQ TYPE="KEYWORD1">\Sigma</SEQ>
+ <SEQ TYPE="KEYWORD1">\sigma</SEQ>
+ <SEQ TYPE="KEYWORD1">\sharp</SEQ>
+ <SEQ TYPE="KEYWORD1">\right</SEQ>
+ <SEQ TYPE="KEYWORD1">\rhook</SEQ>
+ <SEQ TYPE="KEYWORD1">\relax</SEQ>
+ <SEQ TYPE="KEYWORD1">\rceil</SEQ>
+ <SEQ TYPE="KEYWORD1">\raise</SEQ>
+ <SEQ TYPE="KEYWORD1">\qquad</SEQ>
+ <SEQ TYPE="KEYWORD1">\prime</SEQ>
+ <SEQ TYPE="FUNCTION">\outer</SEQ>
+ <SEQ TYPE="KEYWORD1">\oplus</SEQ>
+ <SEQ TYPE="KEYWORD1">\Omega</SEQ>
+ <SEQ TYPE="KEYWORD1">\omega</SEQ>
+ <SEQ TYPE="KEYWORD1">\notin</SEQ>
+ <SEQ TYPE="COMMENT2">\newif</SEQ>
+ <SEQ TYPE="KEYWORD1">\nabla</SEQ>
+ <SEQ TYPE="KEYWORD1">\mskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\month</SEQ>
+ <SEQ TYPE="KEYWORD1">\mkern</SEQ>
+ <SEQ TYPE="KEYWORD1">\lower</SEQ>
+ <SEQ TYPE="KEYWORD1">\lhook</SEQ>
+ <SEQ TYPE="KEYWORD1">\leqno</SEQ>
+ <SEQ TYPE="KEYWORD1">\ldots</SEQ>
+ <SEQ TYPE="KEYWORD1">\ldotp</SEQ>
+ <SEQ TYPE="KEYWORD1">\lceil</SEQ>
+ <SEQ TYPE="KEYWORD1">\kappa</SEQ>
+ <SEQ TYPE="KEYWORD1">\jmath</SEQ>
+ <SEQ TYPE="KEYWORD1">\itfam</SEQ>
+ <SEQ TYPE="KEYWORD1">\intop</SEQ>
+ <SEQ TYPE="KEYWORD1">\input</SEQ>
+ <SEQ TYPE="KEYWORD1">\infty</SEQ>
+ <SEQ TYPE="KEYWORD1">\imath</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifodd</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifnum</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifeof</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifdim</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifcat</SEQ>
+ <SEQ TYPE="KEYWORD1">\hskip</SEQ>
+ <SEQ TYPE="KEYWORD4">\hsize</SEQ>
+ <SEQ TYPE="KEYWORD1">\hrule</SEQ>
+ <SEQ TYPE="KEYWORD1">\hglue</SEQ>
+ <SEQ TYPE="KEYWORD4">\hfuzz</SEQ>
+ <SEQ TYPE="KEYWORD1">\hfill</SEQ>
+ <SEQ TYPE="KEYWORD1">\grave</SEQ>
+ <SEQ TYPE="KEYWORD1">\Gamma</SEQ>
+ <SEQ TYPE="KEYWORD1">\gamma</SEQ>
+ <SEQ TYPE="KEYWORD1">\frown</SEQ>
+ <SEQ TYPE="KEYWORD1">\folio</SEQ>
+ <SEQ TYPE="KEYWORD1">\fivei</SEQ>
+ <SEQ TYPE="KEYWORD1">\equiv</SEQ>
+ <SEQ TYPE="KEYWORD1">\empty</SEQ>
+ <SEQ TYPE="KEYWORD1">\eject</SEQ>
+ <SEQ TYPE="KEYWORD1">\doteq</SEQ>
+ <SEQ TYPE="COMMENT4">\dimen</SEQ>
+ <SEQ TYPE="KEYWORD1">\Delta</SEQ>
+ <SEQ TYPE="KEYWORD1">\delta</SEQ>
+ <SEQ TYPE="KEYWORD1">\ddots</SEQ>
+ <SEQ TYPE="KEYWORD1">\dashv</SEQ>
+ <SEQ TYPE="COMMENT4">\count</SEQ>
+ <SEQ TYPE="KEYWORD1">\colon</SEQ>
+ <SEQ TYPE="KEYWORD1">\check</SEQ>
+ <SEQ TYPE="KEYWORD1">\cdots</SEQ>
+ <SEQ TYPE="KEYWORD1">\cdotp</SEQ>
+ <SEQ TYPE="KEYWORD1">\cases</SEQ>
+ <SEQ TYPE="KEYWORD1">\breve</SEQ>
+ <SEQ TYPE="KEYWORD1">\break</SEQ>
+ <SEQ TYPE="KEYWORD1">\brack</SEQ>
+ <SEQ TYPE="KEYWORD1">\brace</SEQ>
+ <SEQ TYPE="KEYWORD1">\Biggr</SEQ>
+ <SEQ TYPE="KEYWORD1">\biggr</SEQ>
+ <SEQ TYPE="KEYWORD1">\Biggm</SEQ>
+ <SEQ TYPE="KEYWORD1">\biggm</SEQ>
+ <SEQ TYPE="KEYWORD1">\Biggl</SEQ>
+ <SEQ TYPE="KEYWORD1">\biggl</SEQ>
+ <SEQ TYPE="KEYWORD1">\bffam</SEQ>
+ <SEQ TYPE="KEYWORD1">\asymp</SEQ>
+ <SEQ TYPE="KEYWORD1">\angle</SEQ>
+ <SEQ TYPE="KEYWORD1">\amalg</SEQ>
+ <SEQ TYPE="KEYWORD1">\alpha</SEQ>
+ <SEQ TYPE="KEYWORD1">\aleph</SEQ>
+ <SEQ TYPE="KEYWORD1">\acute</SEQ>
+ <SEQ TYPE="KEYWORD1">\above</SEQ>
+
+ <!-- Length Five Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4">\\toks[0-9]</SEQ_REGEXP>
+
+ <!-- Length Five Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4">\\skip[0-9]</SEQ_REGEXP>
+
+ <!-- Length Five Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4"
+ >\\box[0-9][0-9]</SEQ_REGEXP>
+
+ <!-- Length Five Decimal Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="KEYWORD2">\\char[0-9]</SEQ_REGEXP>
+
+ <!-- Length Five Octal Character Reference -->
+ <SEQ TYPE="KEYWORD2">\char'</SEQ>
+
+ <!-- Length Five Hexadecimal Character Reference -->
+ <SEQ TYPE="KEYWORD2">\char"</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{5}</SEQ_REGEXP>
+
+ <!-- Four letter control sequences -->
+ <SEQ TYPE="KEYWORD1">\zeta</SEQ>
+ <SEQ TYPE="KEYWORD4">\year</SEQ>
+ <SEQ TYPE="FUNCTION">\xdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\wlog</SEQ>
+ <SEQ TYPE="KEYWORD1">\vtop</SEQ>
+ <SEQ TYPE="KEYWORD1">\vfil</SEQ>
+ <SEQ TYPE="KEYWORD1">\vert</SEQ>
+ <SEQ TYPE="KEYWORD1">\Vert</SEQ>
+ <SEQ TYPE="KEYWORD1">\vbox</SEQ>
+ <SEQ TYPE="KEYWORD2">\uarc</SEQ>
+ <SEQ TYPE="KEYWORD4">\toks</SEQ>
+ <SEQ TYPE="KEYWORD4">\time</SEQ>
+ <SEQ TYPE="KEYWORD1">\teni</SEQ>
+ <SEQ TYPE="KEYWORD1">\tanh</SEQ>
+ <SEQ TYPE="KEYWORD1">\tabs</SEQ>
+ <SEQ TYPE="KEYWORD1">\surd</SEQ>
+ <SEQ TYPE="KEYWORD1">\succ</SEQ>
+ <SEQ TYPE="KEYWORD1">\star</SEQ>
+ <SEQ TYPE="KEYWORD1">\sqrt</SEQ>
+ <SEQ TYPE="KEYWORD1">\span</SEQ>
+ <SEQ TYPE="KEYWORD4">\skip</SEQ>
+ <SEQ TYPE="KEYWORD1">\skew</SEQ>
+ <SEQ TYPE="KEYWORD1">\sinh</SEQ>
+ <SEQ TYPE="KEYWORD1">\show</SEQ>
+ <SEQ TYPE="KEYWORD1">\root</SEQ>
+ <SEQ TYPE="KEYWORD1">\rlap</SEQ>
+ <SEQ TYPE="KEYWORD1">\read</SEQ>
+ <SEQ TYPE="KEYWORD1">\quad</SEQ>
+ <SEQ TYPE="KEYWORD1">\prod</SEQ>
+ <SEQ TYPE="KEYWORD1">\prec</SEQ>
+ <SEQ TYPE="KEYWORD1">\pmod</SEQ>
+ <SEQ TYPE="KEYWORD1">\perp</SEQ>
+ <SEQ TYPE="KEYWORD1">\owns</SEQ>
+ <SEQ TYPE="KEYWORD1">\over</SEQ>
+ <SEQ TYPE="KEYWORD1">\omit</SEQ>
+ <SEQ TYPE="KEYWORD1">\oint</SEQ>
+ <SEQ TYPE="KEYWORD1">\odot</SEQ>
+ <SEQ TYPE="KEYWORD1">\null</SEQ>
+ <SEQ TYPE="KEYWORD1">\next</SEQ>
+ <SEQ TYPE="KEYWORD1">\mark</SEQ>
+ <SEQ TYPE="KEYWORD1">\loop</SEQ>
+ <SEQ TYPE="FUNCTION">\long</SEQ>
+ <SEQ TYPE="KEYWORD1">\lnot</SEQ>
+ <SEQ TYPE="KEYWORD1">\llap</SEQ>
+ <SEQ TYPE="KEYWORD1">\line</SEQ>
+ <SEQ TYPE="KEYWORD1">\left</SEQ>
+ <SEQ TYPE="KEYWORD1">\land</SEQ>
+ <SEQ TYPE="KEYWORD1">\kern</SEQ>
+ <SEQ TYPE="KEYWORD1">\item</SEQ>
+ <SEQ TYPE="KEYWORD1">\iota</SEQ>
+ <SEQ TYPE="KEYWORD1">\hfil</SEQ>
+ <SEQ TYPE="KEYWORD1">\hbox</SEQ>
+ <SEQ TYPE="KEYWORD1">\hbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\hang</SEQ>
+ <SEQ TYPE="KEYWORD1">\gets</SEQ>
+ <SEQ TYPE="FUNCTION">\gdef</SEQ>
+ <SEQ TYPE="KEYWORD1">\font</SEQ>
+ <SEQ TYPE="KEYWORD1">\flat</SEQ>
+ <SEQ TYPE="KEYWORD1">\eqno</SEQ>
+ <SEQ TYPE="KEYWORD3">\else</SEQ>
+ <SEQ TYPE="FUNCTION">\edef</SEQ>
+ <SEQ TYPE="KEYWORD1">\dump</SEQ>
+ <SEQ TYPE="KEYWORD1">\dots</SEQ>
+ <SEQ TYPE="KEYWORD1">\ddot</SEQ>
+ <SEQ TYPE="KEYWORD1">\ddag</SEQ>
+ <SEQ TYPE="KEYWORD2">\dbar</SEQ>
+ <SEQ TYPE="KEYWORD2">\Dbar</SEQ>
+ <SEQ TYPE="KEYWORD1">\crcr</SEQ>
+ <SEQ TYPE="KEYWORD1">\coth</SEQ>
+ <SEQ TYPE="KEYWORD1">\cosh</SEQ>
+ <SEQ TYPE="KEYWORD1">\copy</SEQ>
+ <SEQ TYPE="KEYWORD1">\cong</SEQ>
+ <SEQ TYPE="KEYWORD1">\circ</SEQ>
+ <SEQ TYPE="KEYWORD2">\char</SEQ>
+ <SEQ TYPE="KEYWORD2">\cfac</SEQ>
+ <SEQ TYPE="KEYWORD1">\cdot</SEQ>
+ <SEQ TYPE="KEYWORD1">\body</SEQ>
+ <SEQ TYPE="KEYWORD1">\bmod</SEQ>
+ <SEQ TYPE="KEYWORD1">\Bigr</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigr</SEQ>
+ <SEQ TYPE="KEYWORD1">\Bigm</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigm</SEQ>
+ <SEQ TYPE="KEYWORD1">\Bigl</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigl</SEQ>
+ <SEQ TYPE="KEYWORD1">\Bigg</SEQ>
+ <SEQ TYPE="KEYWORD1">\bigg</SEQ>
+ <SEQ TYPE="KEYWORD1">\beta</SEQ>
+ <SEQ TYPE="KEYWORD1">\atop</SEQ>
+
+ <!-- Length Four Register Reference -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="COMMENT4">\\box[0-9]</SEQ_REGEXP>
+
+ <!-- Length Four Character Reference -->
+ <SEQ TYPE="KEYWORD2">\char</SEQ>
+
+ <!-- Length Four Hexadecimal Invisible Reference -->
+ <SEQ_REGEXP HASH_CHARS="^" TYPE="KEYWORD2"
+ >(\u005E|\x5E)(\u005E|\x5E)([0-9a-f])([0-9a-f])</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{4}</SEQ_REGEXP>
+
+ <!-- Three letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\vss</SEQ>
+ <SEQ TYPE="KEYWORD1">\vee</SEQ>
+ <SEQ TYPE="KEYWORD1">\vec</SEQ>
+ <SEQ TYPE="KEYWORD1">\top</SEQ>
+ <SEQ TYPE="KEYWORD1">\the</SEQ>
+ <SEQ TYPE="KEYWORD1">\TeX</SEQ>
+ <SEQ TYPE="KEYWORD1">\tau</SEQ>
+ <SEQ TYPE="KEYWORD1">\tan</SEQ>
+ <SEQ TYPE="KEYWORD1">\sup</SEQ>
+ <SEQ TYPE="KEYWORD1">\sum</SEQ>
+ <SEQ TYPE="KEYWORD1">\sin</SEQ>
+ <SEQ TYPE="KEYWORD1">\sim</SEQ>
+ <SEQ TYPE="KEYWORD1">\sec</SEQ>
+ <SEQ TYPE="KEYWORD1">\rho</SEQ>
+ <SEQ TYPE="KEYWORD1">\Psi</SEQ>
+ <SEQ TYPE="KEYWORD1">\psi</SEQ>
+ <SEQ TYPE="KEYWORD1">\Phi</SEQ>
+ <SEQ TYPE="KEYWORD1">\phi</SEQ>
+ <SEQ TYPE="LITERAL3">\par</SEQ>
+ <SEQ TYPE="KEYWORD1">\not</SEQ>
+ <SEQ TYPE="KEYWORD1">\neq</SEQ>
+ <SEQ TYPE="KEYWORD1">\neg</SEQ>
+ <SEQ TYPE="KEYWORD1">\mit</SEQ>
+ <SEQ TYPE="KEYWORD1">\min</SEQ>
+ <SEQ TYPE="KEYWORD1">\mid</SEQ>
+ <SEQ TYPE="KEYWORD1">\max</SEQ>
+ <SEQ TYPE="KEYWORD4">\mag</SEQ>
+ <SEQ TYPE="KEYWORD1">\lor</SEQ>
+ <SEQ TYPE="KEYWORD1">\log</SEQ>
+ <SEQ TYPE="KEYWORD1">\lim</SEQ>
+ <SEQ TYPE="COMMENT3">\let</SEQ>
+ <SEQ TYPE="KEYWORD1">\leq</SEQ>
+ <SEQ TYPE="KEYWORD1">\ker</SEQ>
+ <SEQ TYPE="KEYWORD1">\jot</SEQ>
+ <SEQ TYPE="KEYWORD1">\int</SEQ>
+ <SEQ TYPE="KEYWORD1">\inf</SEQ>
+ <SEQ TYPE="KEYWORD3">\ifx</SEQ>
+ <SEQ TYPE="KEYWORD3">\iff</SEQ>
+ <SEQ TYPE="KEYWORD1">\hss</SEQ>
+ <SEQ TYPE="KEYWORD1">\hom</SEQ>
+ <SEQ TYPE="KEYWORD1">\hat</SEQ>
+ <SEQ TYPE="KEYWORD1">\geq</SEQ>
+ <SEQ TYPE="KEYWORD1">\gcd</SEQ>
+ <SEQ TYPE="KEYWORD4">\fam</SEQ>
+ <SEQ TYPE="KEYWORD1">\exp</SEQ>
+ <SEQ TYPE="KEYWORD2">\eth</SEQ>
+ <SEQ TYPE="KEYWORD1">\eta</SEQ>
+ <SEQ TYPE="KEYWORD1">\end</SEQ>
+ <SEQ TYPE="KEYWORD1">\ell</SEQ>
+ <SEQ TYPE="KEYWORD1">\dot</SEQ>
+ <SEQ TYPE="KEYWORD1">\div</SEQ>
+ <SEQ TYPE="KEYWORD1">\dim</SEQ>
+ <SEQ TYPE="KEYWORD1">\det</SEQ>
+ <SEQ TYPE="KEYWORD1">\deg</SEQ>
+ <SEQ TYPE="FUNCTION">\def</SEQ>
+ <SEQ TYPE="KEYWORD4">\day</SEQ>
+ <SEQ TYPE="KEYWORD1">\dag</SEQ>
+ <SEQ TYPE="KEYWORD1">\cup</SEQ>
+ <SEQ TYPE="KEYWORD1">\csc</SEQ>
+ <SEQ TYPE="KEYWORD1">\cot</SEQ>
+ <SEQ TYPE="KEYWORD1">\cos</SEQ>
+ <SEQ TYPE="KEYWORD1">\chi</SEQ>
+ <SEQ TYPE="KEYWORD1">\cap</SEQ>
+ <SEQ TYPE="KEYWORD1">\cal</SEQ>
+ <SEQ TYPE="KEYWORD1">\bye</SEQ>
+ <SEQ TYPE="COMMENT4">\box</SEQ>
+ <SEQ TYPE="KEYWORD1">\bot</SEQ>
+ <SEQ TYPE="KEYWORD1">\Big</SEQ>
+ <SEQ TYPE="KEYWORD1">\big</SEQ>
+ <SEQ TYPE="KEYWORD1">\bar</SEQ>
+ <SEQ TYPE="KEYWORD1">\ast</SEQ>
+ <SEQ TYPE="KEYWORD1">\arg</SEQ>
+
+ <!-- Length Three Invisible Character Reference -->
+ <SEQ_REGEXP HASH_CHARS="^" TYPE="KEYWORD2"
+ >(\u005E|\x5E)(\u005E|\x5E)(\p{ASCII}|\u0000-\u007F)</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{3}</SEQ_REGEXP>
+
+ <!-- Two letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\Xi</SEQ>
+ <SEQ TYPE="KEYWORD1">\xi</SEQ>
+ <SEQ TYPE="KEYWORD1">\wr</SEQ>
+ <SEQ TYPE="KEYWORD1">\wp</SEQ>
+ <SEQ TYPE="KEYWORD1">\wd</SEQ>
+ <SEQ TYPE="KEYWORD1">\tt</SEQ>
+ <SEQ TYPE="KEYWORD1">\to</SEQ>
+ <SEQ TYPE="KEYWORD1">\sp</SEQ>
+ <SEQ TYPE="KEYWORD1">\sl</SEQ>
+ <SEQ TYPE="KEYWORD1">\sb</SEQ>
+ <SEQ TYPE="KEYWORD1">\rq</SEQ>
+ <SEQ TYPE="KEYWORD1">\rm</SEQ>
+ <SEQ TYPE="KEYWORD1">\Re</SEQ>
+ <SEQ TYPE="KEYWORD1">\Pr</SEQ>
+ <SEQ TYPE="KEYWORD1">\pm</SEQ>
+ <SEQ TYPE="KEYWORD1">\Pi</SEQ>
+ <SEQ TYPE="KEYWORD1">\pi</SEQ>
+ <SEQ TYPE="KEYWORD3">\or</SEQ>
+ <SEQ TYPE="KEYWORD1">\of</SEQ>
+ <SEQ TYPE="KEYWORD1">\nu</SEQ>
+ <SEQ TYPE="KEYWORD1">\ni</SEQ>
+ <SEQ TYPE="KEYWORD1">\ne</SEQ>
+ <SEQ TYPE="KEYWORD1">\mu</SEQ>
+ <SEQ TYPE="KEYWORD1">\mp</SEQ>
+ <SEQ TYPE="KEYWORD1">\lq</SEQ>
+ <SEQ TYPE="KEYWORD1">\ln</SEQ>
+ <SEQ TYPE="KEYWORD1">\ll</SEQ>
+ <SEQ TYPE="KEYWORD1">\lg</SEQ>
+ <SEQ TYPE="KEYWORD1">\le</SEQ>
+ <SEQ TYPE="KEYWORD1">\it</SEQ>
+ <SEQ TYPE="KEYWORD1">\in</SEQ>
+ <SEQ TYPE="KEYWORD1">\Im</SEQ>
+ <SEQ TYPE="KEYWORD3">\if</SEQ>
+ <SEQ TYPE="KEYWORD1">\ht</SEQ>
+ <SEQ TYPE="KEYWORD1">\gg</SEQ>
+ <SEQ TYPE="KEYWORD1">\ge</SEQ>
+ <SEQ TYPE="KEYWORD3">\fi</SEQ>
+ <SEQ TYPE="KEYWORD1">\dp</SEQ>
+ <SEQ TYPE="KEYWORD1">\do</SEQ>
+ <SEQ TYPE="KEYWORD1">\cr</SEQ>
+ <SEQ TYPE="KEYWORD1">\bf</SEQ>
+
+ <!-- Accents and Special Characters -->
+ <SEQ TYPE="KEYWORD2">\AE</SEQ>
+ <SEQ TYPE="KEYWORD2">\ae</SEQ>
+ <SEQ TYPE="KEYWORD2">\AA</SEQ>
+ <SEQ TYPE="KEYWORD2">\aa</SEQ>
+ <SEQ TYPE="KEYWORD2">\OE</SEQ>
+ <SEQ TYPE="KEYWORD2">\oe</SEQ>
+ <SEQ TYPE="KEYWORD2">\ss</SEQ>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{2}</SEQ_REGEXP>
+
+ <!-- One letter control sequences -->
+
+ <SEQ TYPE="KEYWORD1">\S</SEQ>
+ <SEQ TYPE="KEYWORD1">\P</SEQ>
+
+ <!-- Accents and Special Characters -->
+ <SEQ TYPE="KEYWORD2">\=</SEQ>
+ <SEQ TYPE="KEYWORD2">\'</SEQ>
+ <SEQ TYPE="KEYWORD2">\"</SEQ>
+ <SEQ TYPE="KEYWORD2">\~</SEQ>
+ <SEQ TYPE="KEYWORD2">\`</SEQ>
+ <SEQ TYPE="KEYWORD2">\^</SEQ>
+ <SEQ TYPE="KEYWORD2">\.</SEQ>
+ <SEQ TYPE="KEYWORD2">\H</SEQ>
+ <SEQ TYPE="KEYWORD2">\c</SEQ>
+ <SEQ TYPE="KEYWORD2">\d</SEQ>
+ <SEQ TYPE="KEYWORD2">\b</SEQ>
+ <SEQ TYPE="KEYWORD2">\v</SEQ>
+ <SEQ TYPE="KEYWORD2">\u</SEQ>
+ <SEQ TYPE="KEYWORD2">\t</SEQ>
+ <SEQ TYPE="KEYWORD2">\r</SEQ>
+ <SEQ TYPE="KEYWORD2">\k</SEQ>
+ <SEQ TYPE="KEYWORD2">\O</SEQ>
+ <SEQ TYPE="KEYWORD2">\o</SEQ>
+ <SEQ TYPE="KEYWORD2">\L</SEQ>
+ <SEQ TYPE="KEYWORD2">\l</SEQ>
+ <SEQ TYPE="KEYWORD2">\j</SEQ>
+ <SEQ TYPE="KEYWORD2">\i</SEQ>
+ <SEQ TYPE="KEYWORD1">\?</SEQ>
+ <SEQ TYPE="KEYWORD1">\></SEQ>
+ <SEQ TYPE="KEYWORD1">\<</SEQ>
+ <SEQ TYPE="KEYWORD1">\;</SEQ>
+ <SEQ TYPE="KEYWORD1">\:</SEQ>
+ <SEQ TYPE="KEYWORD1">\/</SEQ>
+ <SEQ TYPE="KEYWORD1">\-</SEQ>
+ <SEQ TYPE="KEYWORD1">\,</SEQ>
+ <SEQ TYPE="KEYWORD1">\+</SEQ>
+ <SEQ TYPE="KEYWORD1">\*</SEQ>
+ <SEQ TYPE="KEYWORD1">\)</SEQ>
+ <SEQ TYPE="KEYWORD1">\(</SEQ>
+ <SEQ TYPE="KEYWORD1">\!</SEQ>
+ <SEQ TYPE="KEYWORD1">\|</SEQ>
+ <SEQ TYPE="KEYWORD1">\\</SEQ>
+
+ <!-- Reserved Characters -->
+ <SEQ TYPE="KEYWORD2">\#</SEQ>
+ <SEQ TYPE="KEYWORD2">\$</SEQ>
+ <SEQ TYPE="KEYWORD2">\%</SEQ>
+ <SEQ TYPE="KEYWORD2">\&</SEQ>
+ <SEQ TYPE="KEYWORD2">\{</SEQ>
+ <SEQ TYPE="KEYWORD2">\}</SEQ>
+ <SEQ TYPE="KEYWORD2">\_</SEQ>
+
+ <!-- Length One ASCII Index -->
+ <SEQ_REGEXP HASH_CHARS="`" TYPE="KEYWORD2">`\p{ASCII}</SEQ_REGEXP>
+
+ <!-- Definition Arguments -->
+ <SEQ_REGEXP HASH_CHARS="#" TYPE="DIGIT">#[1-9]</SEQ_REGEXP>
+
+ <!-- Arbitrary control sequence of the specified length -->
+ <SEQ_REGEXP HASH_CHARS="\" TYPE="LABEL">\\[a-zA-Z@]{1}</SEQ_REGEXP>
+
+ <!-- Zero letter control sequences -->
+
+ <!-- Punctuation -->
+ <SEQ TYPE="LITERAL3">`</SEQ>
+ <SEQ TYPE="LITERAL3">!</SEQ>
+ <SEQ TYPE="LITERAL3">.</SEQ>
+ <SEQ TYPE="LITERAL3">,</SEQ>
+ <SEQ TYPE="LITERAL3">;</SEQ>
+ <SEQ TYPE="LITERAL3">?</SEQ>
+ <SEQ TYPE="LITERAL3">:</SEQ>
+ <SEQ TYPE="LITERAL3">'</SEQ>
+ <SEQ TYPE="LITERAL3">"</SEQ>
+ <SEQ TYPE="LITERAL3">\</SEQ>
+
+ <!-- Simple Math Characters -->
+ <SEQ TYPE="LITERAL4">(</SEQ>
+ <SEQ TYPE="LITERAL4">)</SEQ>
+ <SEQ TYPE="LITERAL4">=</SEQ>
+ <SEQ TYPE="LITERAL4">+</SEQ>
+ <SEQ TYPE="LITERAL4">-</SEQ>
+ <SEQ TYPE="LITERAL4">></SEQ>
+ <SEQ TYPE="LITERAL4"><</SEQ>
+
+ <!-- Grouping Brackets -->
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+
+ <!-- Reserved Characters -->
+ <SEQ TYPE="LITERAL1">&</SEQ>
+ <SEQ TYPE="LITERAL1">^</SEQ>
+ <SEQ TYPE="LITERAL1">_</SEQ>
+ <SEQ TYPE="LITERAL1">~</SEQ>
+
+ <!-- Dimensions -->
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*pt|\d*\.\d+?pt|\d*pt)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*pc|\d*\.\d+?pc|\d*pc)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*in|\d*\.\d+?in|\d*in)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*bp|\d*\.\d+?bp|\d*bp)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*cm|\d*\.\d+?cm|\d*cm)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*mm|\d*\.\d+?mm|\d*mm)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*dd|\d*\.\d+?dd|\d*dd)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*cc|\d*\.\d+?cc|\d*cc)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*sp|\d*\.\d+?sp|\d*sp)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*ex|\d*\.\d+?ex|\d*ex)</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHARS="0123456789." TYPE="LITERAL2"
+ >(\d+?\.\d*em|\d*\.\d+?em|\d*em)</SEQ_REGEXP>
+
+ </RULES>
+
+</MODE>
+
+
+
diff --git a/jEdit/modes/pop11.xml b/jEdit/modes/pop11.xml
index 8864473..3a2dd0a 100644
--- a/jEdit/modes/pop11.xml
+++ b/jEdit/modes/pop11.xml
@@ -1,262 +1,262 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- pop11 mode by David S. Moss -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE=";;;" />
- </PROPS>
-
- <RULES SET="MAIN" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Normal comments. -->
- <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">;;;</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="LIST">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="LIST">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="LIST">
- <BEGIN>![</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Functions -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <MARK_PREVIOUS AT_LINE_START="TRUE" TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
-
- <!-- Needs to be before conditional compilation or won't work -->
- <SEQ TYPE="NULL">#_<</SEQ>
- <SEQ TYPE="NULL">>_#</SEQ>
-
- <!-- Conditional compilation -->
- <MARK_FOLLOWING AT_LINE_START="TRUE" TYPE="LABEL">#_</MARK_FOLLOWING>
-
- <SEQ TYPE="NULL">)</SEQ>
- <SEQ TYPE="NULL">(</SEQ>
- <SEQ TYPE="NULL">.</SEQ>
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SEQ TYPE="NULL">^</SEQ>
- <SEQ TYPE="NULL">@</SEQ>
- <SEQ TYPE="NULL">:</SEQ>
- <SEQ TYPE="NULL">|</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <KEYWORDS>
- <LITERAL2>false</LITERAL2>
- <LITERAL2>true</LITERAL2>
- <LITERAL2>database</LITERAL2>
- <LITERAL2>it</LITERAL2>
- <LITERAL2>undef</LITERAL2>
-
- <!-- keywords -->
- <KEYWORD1>define</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>enddefine</KEYWORD1>
- <KEYWORD1>dlocal</KEYWORD1>
- <KEYWORD1>lvars</KEYWORD1>
- <KEYWORD1>vars</KEYWORD1>
- <KEYWORD1>slot</KEYWORD1>
- <KEYWORD1>instance</KEYWORD1>
- <KEYWORD1>endinstance</KEYWORD1>
- <KEYWORD1>method</KEYWORD1>
- <KEYWORD1>syntax</KEYWORD1>
- <KEYWORD1>biginteger</KEYWORD1>
- <KEYWORD1>boolean</KEYWORD1>
- <KEYWORD1>complex</KEYWORD1>
- <KEYWORD1>ddecimal</KEYWORD1>
- <KEYWORD1>decimal</KEYWORD1>
- <KEYWORD1>device</KEYWORD1>
- <KEYWORD1>ident</KEYWORD1>
- <KEYWORD1>integer</KEYWORD1>
- <KEYWORD1>intvec</KEYWORD1>
- <KEYWORD1>key</KEYWORD1>
- <KEYWORD1>nil</KEYWORD1>
- <KEYWORD1>pair</KEYWORD1>
- <KEYWORD1>procedure</KEYWORD1>
- <KEYWORD1>process</KEYWORD1>
- <KEYWORD1>prologterm</KEYWORD1>
- <KEYWORD1>prologvar</KEYWORD1>
- <KEYWORD1>ratio</KEYWORD1>
- <KEYWORD1>ref</KEYWORD1>
- <KEYWORD1>section</KEYWORD1>
- <KEYWORD1>string</KEYWORD1>
- <KEYWORD1>termin</KEYWORD1>
- <KEYWORD1>vector</KEYWORD1>
- <KEYWORD1>word</KEYWORD1>
-
- <!-- flow control -->
- <KEYWORD3>if</KEYWORD3>
- <KEYWORD3>forevery</KEYWORD3>
- <KEYWORD3>endforevery</KEYWORD3>
- <KEYWORD3>then</KEYWORD3>
- <KEYWORD3>switchon</KEYWORD3>
- <KEYWORD3>endswitchon</KEYWORD3>
- <KEYWORD3>case</KEYWORD3>
- <KEYWORD3>elseif</KEYWORD3>
- <KEYWORD3>else</KEYWORD3>
- <KEYWORD3>endif</KEYWORD3>
- <KEYWORD3>for</KEYWORD3>
- <KEYWORD3>repeat</KEYWORD3>
- <KEYWORD3>from</KEYWORD3>
- <KEYWORD3>till</KEYWORD3>
- <KEYWORD3>step</KEYWORD3>
- <KEYWORD3>while</KEYWORD3>
- <KEYWORD3>endfor</KEYWORD3>
- <KEYWORD3>endrepeat</KEYWORD3>
- <KEYWORD3>endwhile</KEYWORD3>
- <KEYWORD3>times</KEYWORD3>
- <KEYWORD3>to</KEYWORD3>
- <KEYWORD3>do</KEYWORD3>
- <KEYWORD3>by</KEYWORD3>
- <KEYWORD3>in</KEYWORD3>
- <KEYWORD3>return</KEYWORD3>
-
- <!-- other statements -->
- <KEYWORD2>and</KEYWORD2>
- <KEYWORD2>or</KEYWORD2>
- <KEYWORD2>matches</KEYWORD2>
- <KEYWORD2>quitloop</KEYWORD2>
- <KEYWORD2>goto</KEYWORD2>
- <KEYWORD2>uses</KEYWORD2>
- <KEYWORD2>trace</KEYWORD2>
- <KEYWORD2>cons_with</KEYWORD2>
- <KEYWORD2>consstring</KEYWORD2>
-
- <!-- Built in functions -->
- <LITERAL2>interrupt</LITERAL2>
- <LITERAL2>partapply</LITERAL2>
- <LITERAL2>consclosure</LITERAL2>
- <LITERAL2>max</LITERAL2>
- <LITERAL2>add</LITERAL2>
- <LITERAL2>remove</LITERAL2>
- <LITERAL2>alladd</LITERAL2>
- <LITERAL2>quitif</LITERAL2>
- <LITERAL2>copydata</LITERAL2>
- <LITERAL2>copytree</LITERAL2>
- <LITERAL2>copylist</LITERAL2>
- <LITERAL2>length</LITERAL2>
- <LITERAL2>hd</LITERAL2>
- <LITERAL2>tl</LITERAL2>
- <LITERAL2>rev</LITERAL2>
- <LITERAL2>shuffle</LITERAL2>
- <LITERAL2>oneof</LITERAL2>
- <LITERAL2>sort</LITERAL2>
- <LITERAL2>syssort</LITERAL2>
- <LITERAL2>random</LITERAL2>
- <LITERAL2>readline</LITERAL2>
- <LITERAL2>not</LITERAL2>
- <LITERAL2>pr</LITERAL2>
- <LITERAL2>nl</LITERAL2>
- <LITERAL2>present</LITERAL2>
- <LITERAL2>subword</LITERAL2>
- <LITERAL2>member</LITERAL2>
- <LITERAL2>length</LITERAL2>
- <LITERAL2>listlength</LITERAL2>
- <LITERAL2>datalength</LITERAL2>
- <LITERAL2>mishap</LITERAL2>
- <LITERAL2>last</LITERAL2>
- <LITERAL2>delete</LITERAL2>
- <LITERAL2>valof</LITERAL2>
- <LITERAL2>dataword</LITERAL2>
-
- <!-- input validation functions -->
- <LITERAL2>isnumber</LITERAL2>
- <LITERAL2>isinteger</LITERAL2>
- <LITERAL2>islist</LITERAL2>
- <LITERAL2>isboolean</LITERAL2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="LIST" DEFAULT="LITERAL1" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LITERAL1" DELEGATE="LIST">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="LIST">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="LIST">
- <BEGIN>![</BEGIN>
- <END>]</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN DELEGATE="MAIN" TYPE="NULL">
- <BEGIN>%</BEGIN>
- <END>%</END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">;;;</EOL_SPAN>
- <SEQ TYPE="LITERAL2">=</SEQ>
- <SEQ TYPE="LITERAL2">==</SEQ>
-
- <MARK_FOLLOWING TYPE="LITERAL2">^</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL2">?</MARK_FOLLOWING>
- </RULES>
-
- <RULES SET="STRING" ESCAPE="\" DEFAULT="LITERAL1" HIGHLIGHT_DIGITS="FALSE">
- </RULES>
-
- <RULES NO_WORD_SEP="." SET="COMMENT" DEFAULT="COMMENT1" HIGHLIGHT_DIGITS="FALSE">
- <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
- <SEQ TYPE="COMMENT1">*</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- pop11 mode by David S. Moss -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE=";;;" />
+ </PROPS>
+
+ <RULES SET="MAIN" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Normal comments. -->
+ <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">;;;</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="LIST">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="LIST">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="LIST">
+ <BEGIN>![</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Functions -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <MARK_PREVIOUS AT_LINE_START="TRUE" TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+
+ <!-- Needs to be before conditional compilation or won't work -->
+ <SEQ TYPE="NULL">#_<</SEQ>
+ <SEQ TYPE="NULL">>_#</SEQ>
+
+ <!-- Conditional compilation -->
+ <MARK_FOLLOWING AT_LINE_START="TRUE" TYPE="LABEL">#_</MARK_FOLLOWING>
+
+ <SEQ TYPE="NULL">)</SEQ>
+ <SEQ TYPE="NULL">(</SEQ>
+ <SEQ TYPE="NULL">.</SEQ>
+ <SEQ TYPE="NULL">,</SEQ>
+ <SEQ TYPE="NULL">;</SEQ>
+ <SEQ TYPE="NULL">^</SEQ>
+ <SEQ TYPE="NULL">@</SEQ>
+ <SEQ TYPE="NULL">:</SEQ>
+ <SEQ TYPE="NULL">|</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <KEYWORDS>
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>database</LITERAL2>
+ <LITERAL2>it</LITERAL2>
+ <LITERAL2>undef</LITERAL2>
+
+ <!-- keywords -->
+ <KEYWORD1>define</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>enddefine</KEYWORD1>
+ <KEYWORD1>dlocal</KEYWORD1>
+ <KEYWORD1>lvars</KEYWORD1>
+ <KEYWORD1>vars</KEYWORD1>
+ <KEYWORD1>slot</KEYWORD1>
+ <KEYWORD1>instance</KEYWORD1>
+ <KEYWORD1>endinstance</KEYWORD1>
+ <KEYWORD1>method</KEYWORD1>
+ <KEYWORD1>syntax</KEYWORD1>
+ <KEYWORD1>biginteger</KEYWORD1>
+ <KEYWORD1>boolean</KEYWORD1>
+ <KEYWORD1>complex</KEYWORD1>
+ <KEYWORD1>ddecimal</KEYWORD1>
+ <KEYWORD1>decimal</KEYWORD1>
+ <KEYWORD1>device</KEYWORD1>
+ <KEYWORD1>ident</KEYWORD1>
+ <KEYWORD1>integer</KEYWORD1>
+ <KEYWORD1>intvec</KEYWORD1>
+ <KEYWORD1>key</KEYWORD1>
+ <KEYWORD1>nil</KEYWORD1>
+ <KEYWORD1>pair</KEYWORD1>
+ <KEYWORD1>procedure</KEYWORD1>
+ <KEYWORD1>process</KEYWORD1>
+ <KEYWORD1>prologterm</KEYWORD1>
+ <KEYWORD1>prologvar</KEYWORD1>
+ <KEYWORD1>ratio</KEYWORD1>
+ <KEYWORD1>ref</KEYWORD1>
+ <KEYWORD1>section</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>termin</KEYWORD1>
+ <KEYWORD1>vector</KEYWORD1>
+ <KEYWORD1>word</KEYWORD1>
+
+ <!-- flow control -->
+ <KEYWORD3>if</KEYWORD3>
+ <KEYWORD3>forevery</KEYWORD3>
+ <KEYWORD3>endforevery</KEYWORD3>
+ <KEYWORD3>then</KEYWORD3>
+ <KEYWORD3>switchon</KEYWORD3>
+ <KEYWORD3>endswitchon</KEYWORD3>
+ <KEYWORD3>case</KEYWORD3>
+ <KEYWORD3>elseif</KEYWORD3>
+ <KEYWORD3>else</KEYWORD3>
+ <KEYWORD3>endif</KEYWORD3>
+ <KEYWORD3>for</KEYWORD3>
+ <KEYWORD3>repeat</KEYWORD3>
+ <KEYWORD3>from</KEYWORD3>
+ <KEYWORD3>till</KEYWORD3>
+ <KEYWORD3>step</KEYWORD3>
+ <KEYWORD3>while</KEYWORD3>
+ <KEYWORD3>endfor</KEYWORD3>
+ <KEYWORD3>endrepeat</KEYWORD3>
+ <KEYWORD3>endwhile</KEYWORD3>
+ <KEYWORD3>times</KEYWORD3>
+ <KEYWORD3>to</KEYWORD3>
+ <KEYWORD3>do</KEYWORD3>
+ <KEYWORD3>by</KEYWORD3>
+ <KEYWORD3>in</KEYWORD3>
+ <KEYWORD3>return</KEYWORD3>
+
+ <!-- other statements -->
+ <KEYWORD2>and</KEYWORD2>
+ <KEYWORD2>or</KEYWORD2>
+ <KEYWORD2>matches</KEYWORD2>
+ <KEYWORD2>quitloop</KEYWORD2>
+ <KEYWORD2>goto</KEYWORD2>
+ <KEYWORD2>uses</KEYWORD2>
+ <KEYWORD2>trace</KEYWORD2>
+ <KEYWORD2>cons_with</KEYWORD2>
+ <KEYWORD2>consstring</KEYWORD2>
+
+ <!-- Built in functions -->
+ <LITERAL2>interrupt</LITERAL2>
+ <LITERAL2>partapply</LITERAL2>
+ <LITERAL2>consclosure</LITERAL2>
+ <LITERAL2>max</LITERAL2>
+ <LITERAL2>add</LITERAL2>
+ <LITERAL2>remove</LITERAL2>
+ <LITERAL2>alladd</LITERAL2>
+ <LITERAL2>quitif</LITERAL2>
+ <LITERAL2>copydata</LITERAL2>
+ <LITERAL2>copytree</LITERAL2>
+ <LITERAL2>copylist</LITERAL2>
+ <LITERAL2>length</LITERAL2>
+ <LITERAL2>hd</LITERAL2>
+ <LITERAL2>tl</LITERAL2>
+ <LITERAL2>rev</LITERAL2>
+ <LITERAL2>shuffle</LITERAL2>
+ <LITERAL2>oneof</LITERAL2>
+ <LITERAL2>sort</LITERAL2>
+ <LITERAL2>syssort</LITERAL2>
+ <LITERAL2>random</LITERAL2>
+ <LITERAL2>readline</LITERAL2>
+ <LITERAL2>not</LITERAL2>
+ <LITERAL2>pr</LITERAL2>
+ <LITERAL2>nl</LITERAL2>
+ <LITERAL2>present</LITERAL2>
+ <LITERAL2>subword</LITERAL2>
+ <LITERAL2>member</LITERAL2>
+ <LITERAL2>length</LITERAL2>
+ <LITERAL2>listlength</LITERAL2>
+ <LITERAL2>datalength</LITERAL2>
+ <LITERAL2>mishap</LITERAL2>
+ <LITERAL2>last</LITERAL2>
+ <LITERAL2>delete</LITERAL2>
+ <LITERAL2>valof</LITERAL2>
+ <LITERAL2>dataword</LITERAL2>
+
+ <!-- input validation functions -->
+ <LITERAL2>isnumber</LITERAL2>
+ <LITERAL2>isinteger</LITERAL2>
+ <LITERAL2>islist</LITERAL2>
+ <LITERAL2>isboolean</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="LIST" DEFAULT="LITERAL1" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LITERAL1" DELEGATE="LIST">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="LIST">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="LIST">
+ <BEGIN>![</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN DELEGATE="MAIN" TYPE="NULL">
+ <BEGIN>%</BEGIN>
+ <END>%</END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">;;;</EOL_SPAN>
+ <SEQ TYPE="LITERAL2">=</SEQ>
+ <SEQ TYPE="LITERAL2">==</SEQ>
+
+ <MARK_FOLLOWING TYPE="LITERAL2">^</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL2">?</MARK_FOLLOWING>
+ </RULES>
+
+ <RULES SET="STRING" ESCAPE="\" DEFAULT="LITERAL1" HIGHLIGHT_DIGITS="FALSE">
+ </RULES>
+
+ <RULES NO_WORD_SEP="." SET="COMMENT" DEFAULT="COMMENT1" HIGHLIGHT_DIGITS="FALSE">
+ <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
+ <SEQ TYPE="COMMENT1">*</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/postscript.xml b/jEdit/modes/postscript.xml
index ff57dfa..6e21d88 100644
--- a/jEdit/modes/postscript.xml
+++ b/jEdit/modes/postscript.xml
@@ -1,97 +1,97 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- PostScript mode, by Slava Pestov. Based on PostScriptTokenMarker by
- Ralf Engels -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="%" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT2">%!</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">%?</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">%%</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
-
- <!-- Literals -->
- <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
- <BEGIN>(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="LABEL">/</MARK_FOLLOWING>
-
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>pop</KEYWORD1>
- <KEYWORD1>exch</KEYWORD1>
- <KEYWORD1>dup</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>roll</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>count</KEYWORD1>
- <KEYWORD1>mark</KEYWORD1>
- <KEYWORD1>cleartomark</KEYWORD1>
- <KEYWORD1>counttomark</KEYWORD1>
-
- <KEYWORD1>exec</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>ifelse</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>stopped</KEYWORD1>
- <KEYWORD1>countexecstack</KEYWORD1>
- <KEYWORD1>execstack</KEYWORD1>
- <KEYWORD1>quit</KEYWORD1>
- <KEYWORD1>start</KEYWORD1>
-
- <OPERATOR>add</OPERATOR>
- <OPERATOR>div</OPERATOR>
- <OPERATOR>idiv</OPERATOR>
- <OPERATOR>mod</OPERATOR>
- <OPERATOR>mul</OPERATOR>
- <OPERATOR>sub</OPERATOR>
- <OPERATOR>abs</OPERATOR>
- <OPERATOR>ned</OPERATOR>
- <OPERATOR>ceiling</OPERATOR>
- <OPERATOR>floor</OPERATOR>
- <OPERATOR>round</OPERATOR>
- <OPERATOR>truncate</OPERATOR>
- <OPERATOR>sqrt</OPERATOR>
- <OPERATOR>atan</OPERATOR>
- <OPERATOR>cos</OPERATOR>
- <OPERATOR>sin</OPERATOR>
- <OPERATOR>exp</OPERATOR>
- <OPERATOR>ln</OPERATOR>
- <OPERATOR>log</OPERATOR>
- <OPERATOR>rand</OPERATOR>
- <OPERATOR>srand</OPERATOR>
- <OPERATOR>rrand</OPERATOR>
-
- <LITERAL2>true</LITERAL2>
- <LITERAL2>false</LITERAL2>
- <LITERAL2>NULL</LITERAL2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
- <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
- <BEGIN>(</BEGIN>
- <END>)</END>
- </SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- PostScript mode, by Slava Pestov. Based on PostScriptTokenMarker by
+ Ralf Engels -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="%" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT2">%!</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">%?</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">%%</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+
+ <!-- Literals -->
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
+ <BEGIN>(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="LABEL">/</MARK_FOLLOWING>
+
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>pop</KEYWORD1>
+ <KEYWORD1>exch</KEYWORD1>
+ <KEYWORD1>dup</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>roll</KEYWORD1>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>count</KEYWORD1>
+ <KEYWORD1>mark</KEYWORD1>
+ <KEYWORD1>cleartomark</KEYWORD1>
+ <KEYWORD1>counttomark</KEYWORD1>
+
+ <KEYWORD1>exec</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>ifelse</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>stopped</KEYWORD1>
+ <KEYWORD1>countexecstack</KEYWORD1>
+ <KEYWORD1>execstack</KEYWORD1>
+ <KEYWORD1>quit</KEYWORD1>
+ <KEYWORD1>start</KEYWORD1>
+
+ <OPERATOR>add</OPERATOR>
+ <OPERATOR>div</OPERATOR>
+ <OPERATOR>idiv</OPERATOR>
+ <OPERATOR>mod</OPERATOR>
+ <OPERATOR>mul</OPERATOR>
+ <OPERATOR>sub</OPERATOR>
+ <OPERATOR>abs</OPERATOR>
+ <OPERATOR>ned</OPERATOR>
+ <OPERATOR>ceiling</OPERATOR>
+ <OPERATOR>floor</OPERATOR>
+ <OPERATOR>round</OPERATOR>
+ <OPERATOR>truncate</OPERATOR>
+ <OPERATOR>sqrt</OPERATOR>
+ <OPERATOR>atan</OPERATOR>
+ <OPERATOR>cos</OPERATOR>
+ <OPERATOR>sin</OPERATOR>
+ <OPERATOR>exp</OPERATOR>
+ <OPERATOR>ln</OPERATOR>
+ <OPERATOR>log</OPERATOR>
+ <OPERATOR>rand</OPERATOR>
+ <OPERATOR>srand</OPERATOR>
+ <OPERATOR>rrand</OPERATOR>
+
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>NULL</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
+ <BEGIN>(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/povray.xml b/jEdit/modes/povray.xml
index c896b29..f39ae78 100644
--- a/jEdit/modes/povray.xml
+++ b/jEdit/modes/povray.xml
@@ -1,518 +1,518 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Povray mode, by Jan Schaefer
- based on original Povray mode by Slava Pestov
- based on PovrayTokenMarker, by Romain Guy -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- C style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD2>aa_level</KEYWORD2>
- <KEYWORD2>aa_threshold</KEYWORD2>
- <FUNCTION>abs</FUNCTION>
- <KEYWORD2>absorption</KEYWORD2>
- <KEYWORD2>accuracy</KEYWORD2>
- <FUNCTION>acos</FUNCTION>
- <FUNCTION>acosh</FUNCTION>
- <KEYWORD2>adaptive</KEYWORD2>
- <KEYWORD2>adc_bailout</KEYWORD2>
- <KEYWORD2>agate</KEYWORD2>
- <KEYWORD2>agate_turb</KEYWORD2>
- <KEYWORD2>all</KEYWORD2>
- <KEYWORD2>all_intersections</KEYWORD2>
- <KEYWORD2>alpha</KEYWORD2>
- <KEYWORD2>altitude</KEYWORD2>
- <KEYWORD2>always_sample</KEYWORD2>
- <KEYWORD2>ambient</KEYWORD2>
- <KEYWORD2>ambient_light</KEYWORD2>
- <KEYWORD2>angle</KEYWORD2>
- <KEYWORD2>aperture</KEYWORD2>
- <KEYWORD2>append</KEYWORD2>
- <KEYWORD2>arc_angle</KEYWORD2>
- <KEYWORD2>area_light</KEYWORD2>
- <KEYWORD2>array</KEYWORD2>
- <FUNCTION>asc</FUNCTION>
- <KEYWORD2>ascii</KEYWORD2>
- <FUNCTION>asin</FUNCTION>
- <FUNCTION>asinh</FUNCTION>
- <KEYWORD2>assumed_gamma</KEYWORD2>
- <FUNCTION>atan</FUNCTION>
- <FUNCTION>atan2</FUNCTION>
- <FUNCTION>atanh</FUNCTION>
- <KEYWORD2>autostop</KEYWORD2>
- <KEYWORD2>average</KEYWORD2>
- <KEYWORD2>b_spline</KEYWORD2>
- <KEYWORD1>background</KEYWORD1>
- <KEYWORD2>bezier_spline</KEYWORD2>
- <KEYWORD1>bicubic_patch</KEYWORD1>
- <KEYWORD2>black_hole</KEYWORD2>
- <KEYWORD1>blob</KEYWORD1>
- <LITERAL1>blue</LITERAL1>
- <KEYWORD2>blur_samples</KEYWORD2>
- <KEYWORD1>bounded_by</KEYWORD1>
- <KEYWORD1>box</KEYWORD1>
- <KEYWORD2>boxed</KEYWORD2>
- <KEYWORD2>bozo</KEYWORD2>
- <KEYWORD1>#break</KEYWORD1>
- <KEYWORD2>brick</KEYWORD2>
- <KEYWORD2>brick_size</KEYWORD2>
- <KEYWORD2>brightness</KEYWORD2>
- <KEYWORD2>brilliance</KEYWORD2>
- <KEYWORD1>bump_map</KEYWORD1>
- <KEYWORD2>bump_size</KEYWORD2>
- <KEYWORD2>bumps</KEYWORD2>
- <KEYWORD1>camera</KEYWORD1>
- <KEYWORD1>#case</KEYWORD1>
- <KEYWORD2>caustics</KEYWORD2>
- <FUNCTION>ceil</FUNCTION>
- <KEYWORD2>cells</KEYWORD2>
- <KEYWORD2>charset</KEYWORD2>
- <KEYWORD2>checker</KEYWORD2>
- <FUNCTION>chr</FUNCTION>
- <KEYWORD2>circular</KEYWORD2>
- <KEYWORD1>clipped_by</KEYWORD1>
- <LITERAL1>clock</LITERAL1>
- <LITERAL1>clock_delta</LITERAL1>
- <LITERAL1>clock_on</LITERAL1>
- <KEYWORD2>collect</KEYWORD2>
- <KEYWORD2>color</KEYWORD2>
- <KEYWORD2>color_map</KEYWORD2>
- <KEYWORD2>colour</KEYWORD2>
- <KEYWORD2>colour_map</KEYWORD2>
- <KEYWORD2>component</KEYWORD2>
- <KEYWORD2>composite</KEYWORD2>
- <FUNCTION>concat</FUNCTION>
- <KEYWORD1>cone</KEYWORD1>
- <KEYWORD2>confidence</KEYWORD2>
- <KEYWORD2>conic_sweep</KEYWORD2>
- <KEYWORD2>conserve_energy</KEYWORD2>
- <KEYWORD1>contained_by</KEYWORD1>
- <KEYWORD2>control0</KEYWORD2>
- <KEYWORD2>control1</KEYWORD2>
- <KEYWORD2>coords</KEYWORD2>
- <FUNCTION>cos</FUNCTION>
- <FUNCTION>cosh</FUNCTION>
- <KEYWORD2>count</KEYWORD2>
- <KEYWORD2>crackle</KEYWORD2>
- <KEYWORD2>crand</KEYWORD2>
- <KEYWORD1>cube</KEYWORD1>
- <KEYWORD1>cubic</KEYWORD1>
- <KEYWORD2>cubic_spline</KEYWORD2>
- <KEYWORD2>cubic_wave</KEYWORD2>
- <KEYWORD2>cutaway_textures</KEYWORD2>
- <KEYWORD1>cylinder</KEYWORD1>
- <KEYWORD2>cylindrical</KEYWORD2>
- <KEYWORD1>#debug</KEYWORD1>
- <KEYWORD1>#declare</KEYWORD1>
- <KEYWORD1>#default</KEYWORD1>
- <FUNCTION>defined</FUNCTION>
- <FUNCTION>degrees</FUNCTION>
- <KEYWORD2>density</KEYWORD2>
- <KEYWORD2>density_file</KEYWORD2>
- <KEYWORD1>density_map</KEYWORD1>
- <KEYWORD2>dents</KEYWORD2>
- <KEYWORD2>df3</KEYWORD2>
- <KEYWORD1>difference</KEYWORD1>
- <KEYWORD2>diffuse</KEYWORD2>
- <FUNCTION>dimension_size</FUNCTION>
- <FUNCTION>dimensions</FUNCTION>
- <KEYWORD2>direction</KEYWORD2>
- <KEYWORD1>disc</KEYWORD1>
- <KEYWORD2>dispersion</KEYWORD2>
- <KEYWORD2>dispersion_samples</KEYWORD2>
- <KEYWORD2>dist_exp</KEYWORD2>
- <KEYWORD2>distance</KEYWORD2>
- <FUNCTION>div</FUNCTION>
- <KEYWORD2>double_illuminate</KEYWORD2>
- <KEYWORD2>eccentricity</KEYWORD2>
- <KEYWORD1>#else</KEYWORD1>
- <KEYWORD2>emission</KEYWORD2>
- <KEYWORD1>#end</KEYWORD1>
- <KEYWORD1>#error</KEYWORD1>
- <KEYWORD2>error_bound</KEYWORD2>
- <KEYWORD2>evaluate</KEYWORD2>
- <FUNCTION>exp</FUNCTION>
- <KEYWORD2>expand_thresholds</KEYWORD2>
- <KEYWORD2>exponent</KEYWORD2>
- <KEYWORD2>exterior</KEYWORD2>
- <KEYWORD2>extinction</KEYWORD2>
- <KEYWORD1>face_indices</KEYWORD1>
- <KEYWORD2>facets</KEYWORD2>
- <KEYWORD2>fade_color</KEYWORD2>
- <KEYWORD2>fade_colour</KEYWORD2>
- <KEYWORD2>fade_distance</KEYWORD2>
- <KEYWORD2>fade_power</KEYWORD2>
- <KEYWORD2>falloff</KEYWORD2>
- <KEYWORD2>falloff_angle</KEYWORD2>
- <LITERAL1>false</LITERAL1>
- <KEYWORD1>#fclose</KEYWORD1>
- <FUNCTION>file_exists</FUNCTION>
- <KEYWORD2>filter</KEYWORD2>
- <LITERAL1>final_clock</LITERAL1>
- <LITERAL1>final_frame</LITERAL1>
- <KEYWORD1>finish</KEYWORD1>
- <KEYWORD2>fisheye</KEYWORD2>
- <KEYWORD2>flatness</KEYWORD2>
- <KEYWORD2>flip</KEYWORD2>
- <FUNCTION>floor</FUNCTION>
- <KEYWORD2>focal_point</KEYWORD2>
- <KEYWORD1>fog</KEYWORD1>
- <KEYWORD2>fog_alt</KEYWORD2>
- <KEYWORD2>fog_offset</KEYWORD2>
- <KEYWORD2>fog_type</KEYWORD2>
- <KEYWORD1>#fopen</KEYWORD1>
- <KEYWORD2>form</KEYWORD2>
- <LITERAL1>frame_number</LITERAL1>
- <KEYWORD2>frequency</KEYWORD2>
- <KEYWORD2>fresnel</KEYWORD2>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD2>gather</KEYWORD2>
- <KEYWORD2>gif</KEYWORD2>
- <KEYWORD2>global_lights</KEYWORD2>
- <KEYWORD1>global_settings</KEYWORD1>
- <KEYWORD2>gradient</KEYWORD2>
- <KEYWORD2>granite</KEYWORD2>
- <LITERAL1>gray</LITERAL1>
- <KEYWORD2>gray_threshold</KEYWORD2>
- <LITERAL1>green</LITERAL1>
- <KEYWORD2>h_angle</KEYWORD2>
- <KEYWORD1>height_field</KEYWORD1>
- <KEYWORD2>hexagon</KEYWORD2>
- <KEYWORD2>hf_gray_16</KEYWORD2>
- <KEYWORD2>hierarchy</KEYWORD2>
- <KEYWORD2>hollow</KEYWORD2>
- <KEYWORD2>hypercomplex</KEYWORD2>
- <KEYWORD1>#if</KEYWORD1>
- <KEYWORD1>#ifdef</KEYWORD1>
- <KEYWORD2>iff</KEYWORD2>
- <KEYWORD1>#ifndef</KEYWORD1>
- <LITERAL1>image_height</LITERAL1>
- <KEYWORD1>image_map</KEYWORD1>
- <KEYWORD2>image_pattern</KEYWORD2>
- <LITERAL1>image_width</LITERAL1>
- <KEYWORD1>#include</KEYWORD1>
- <LITERAL1>initial_clock</LITERAL1>
- <LITERAL1>initial_frame</LITERAL1>
- <FUNCTION>inside</FUNCTION>
- <FUNCTION>int</FUNCTION>
- <KEYWORD1>interior</KEYWORD1>
- <KEYWORD1>interior_texture</KEYWORD1>
- <FUNCTION>internal</FUNCTION>
- <KEYWORD2>interpolate</KEYWORD2>
- <KEYWORD1>intersection</KEYWORD1>
- <KEYWORD2>intervals</KEYWORD2>
- <KEYWORD2>inverse</KEYWORD2>
- <KEYWORD1>ior</KEYWORD1>
- <KEYWORD1>irid</KEYWORD1>
- <KEYWORD2>irid_wavelength</KEYWORD2>
- <KEYWORD1>isosurface</KEYWORD1>
- <KEYWORD2>jitter</KEYWORD2>
- <KEYWORD2>jpeg</KEYWORD2>
- <KEYWORD2>julia</KEYWORD2>
- <KEYWORD1>julia_fractal</KEYWORD1>
- <KEYWORD1>lathe</KEYWORD1>
- <KEYWORD2>lambda</KEYWORD2>
- <KEYWORD2>leopard</KEYWORD2>
- <KEYWORD1>light_group</KEYWORD1>
- <KEYWORD1>light_source</KEYWORD1>
- <KEYWORD2>linear_spline</KEYWORD2>
- <KEYWORD2>linear_sweep</KEYWORD2>
- <FUNCTION>ln</FUNCTION>
- <KEYWORD2>load_file</KEYWORD2>
- <KEYWORD1>#local</KEYWORD1>
- <KEYWORD2>location</KEYWORD2>
- <FUNCTION>log</FUNCTION>
- <KEYWORD2>look_at</KEYWORD2>
- <KEYWORD1>looks_like</KEYWORD1>
- <KEYWORD2>low_error_factor</KEYWORD2>
- <KEYWORD1>#macro</KEYWORD1>
- <KEYWORD2>magnet</KEYWORD2>
- <KEYWORD2>major_radius</KEYWORD2>
- <KEYWORD2>mandel</KEYWORD2>
- <KEYWORD2>map_type</KEYWORD2>
- <KEYWORD2>marble</KEYWORD2>
- <KEYWORD1>material</KEYWORD1>
- <KEYWORD1>material_map</KEYWORD1>
- <KEYWORD2>matrix</KEYWORD2>
- <FUNCTION>max</FUNCTION>
- <KEYWORD2>max_extent</KEYWORD2>
- <KEYWORD2>max_gradient</KEYWORD2>
- <KEYWORD2>max_intersections</KEYWORD2>
- <KEYWORD2>max_iteration</KEYWORD2>
- <KEYWORD2>max_sample</KEYWORD2>
- <KEYWORD2>max_trace</KEYWORD2>
- <KEYWORD2>max_trace_level</KEYWORD2>
- <KEYWORD1>media</KEYWORD1>
- <KEYWORD2>media_attenuation</KEYWORD2>
- <KEYWORD2>media_interaction</KEYWORD2>
- <KEYWORD1>merge</KEYWORD1>
- <KEYWORD1>mesh</KEYWORD1>
- <KEYWORD1>mesh2</KEYWORD1>
- <KEYWORD2>metallic</KEYWORD2>
- <KEYWORD2>method</KEYWORD2>
- <KEYWORD2>metric</KEYWORD2>
- <FUNCTION>min</FUNCTION>
- <KEYWORD2>min_extent</KEYWORD2>
- <KEYWORD2>minimum_reuse</KEYWORD2>
- <FUNCTION>mod</FUNCTION>
- <KEYWORD2>mortar</KEYWORD2>
- <KEYWORD2>natural_spline</KEYWORD2>
- <KEYWORD2>nearest_count</KEYWORD2>
- <LITERAL1>no</LITERAL1>
- <KEYWORD2>no_bump_scale</KEYWORD2>
- <KEYWORD2>no_image</KEYWORD2>
- <KEYWORD2>no_reflection</KEYWORD2>
- <KEYWORD2>no_shadow</KEYWORD2>
- <KEYWORD2>noise_generator</KEYWORD2>
- <KEYWORD1>normal</KEYWORD1>
- <KEYWORD1>normal_indices</KEYWORD1>
- <KEYWORD1>normal_map</KEYWORD1>
- <KEYWORD1>normal_vectors</KEYWORD1>
- <KEYWORD2>number_of_waves</KEYWORD2>
- <KEYWORD1>object</KEYWORD1>
- <KEYWORD2>octaves</KEYWORD2>
- <LITERAL1>off</LITERAL1>
- <KEYWORD2>offset</KEYWORD2>
- <KEYWORD2>omega</KEYWORD2>
- <KEYWORD2>omnimax</KEYWORD2>
- <LITERAL1>on</LITERAL1>
- <KEYWORD2>once</KEYWORD2>
- <KEYWORD2>onion</KEYWORD2>
- <KEYWORD2>open</KEYWORD2>
- <KEYWORD2>orient</KEYWORD2>
- <KEYWORD2>orientation</KEYWORD2>
- <KEYWORD2>orthographic</KEYWORD2>
- <KEYWORD2>panoramic</KEYWORD2>
- <KEYWORD2>parallel</KEYWORD2>
- <KEYWORD2>parametric</KEYWORD2>
- <KEYWORD2>pass_through</KEYWORD2>
- <KEYWORD1>pattern</KEYWORD1>
- <KEYWORD2>perspective</KEYWORD2>
- <KEYWORD2>pgm</KEYWORD2>
- <KEYWORD2>phase</KEYWORD2>
- <KEYWORD2>phong</KEYWORD2>
- <KEYWORD2>phong_size</KEYWORD2>
- <KEYWORD1>photons</KEYWORD1>
- <LITERAL1>pi</LITERAL1>
- <KEYWORD1>pigment</KEYWORD1>
- <KEYWORD1>pigment_map</KEYWORD1>
- <KEYWORD1>pigment_pattern</KEYWORD1>
- <KEYWORD2>planar</KEYWORD2>
- <KEYWORD1>plane</KEYWORD1>
- <KEYWORD1>png</KEYWORD1>
- <KEYWORD2>point_at</KEYWORD2>
- <KEYWORD1>poly</KEYWORD1>
- <KEYWORD2>poly_wave</KEYWORD2>
- <KEYWORD1>polygon</KEYWORD1>
- <KEYWORD2>pot</KEYWORD2>
- <FUNCTION>pow</FUNCTION>
- <KEYWORD2>ppm</KEYWORD2>
- <KEYWORD2>precision</KEYWORD2>
- <KEYWORD2>precompute</KEYWORD2>
- <KEYWORD2>pretrace_end</KEYWORD2>
- <KEYWORD2>pretrace_start</KEYWORD2>
- <KEYWORD1>prism</KEYWORD1>
- <KEYWORD2>projected_through</KEYWORD2>
- <KEYWORD2>pwr</KEYWORD2>
- <KEYWORD2>quadratic_spline</KEYWORD2>
- <KEYWORD2>quadric</KEYWORD2>
- <KEYWORD2>quartic</KEYWORD2>
- <KEYWORD2>quaternion</KEYWORD2>
- <KEYWORD2>quick_color</KEYWORD2>
- <KEYWORD2>quick_colour</KEYWORD2>
- <KEYWORD2>quilted</KEYWORD2>
- <KEYWORD2>radial</KEYWORD2>
- <FUNCTION>radians</FUNCTION>
- <KEYWORD1>radiosity</KEYWORD1>
- <KEYWORD2>radius</KEYWORD2>
- <KEYWORD1>rainbow</KEYWORD1>
- <KEYWORD2>ramp_wave</KEYWORD2>
- <FUNCTION>rand</FUNCTION>
- <KEYWORD1>#range</KEYWORD1>
- <KEYWORD2>range_divider</KEYWORD2>
- <KEYWORD2>ratio</KEYWORD2>
- <KEYWORD1>#read</KEYWORD1>
- <KEYWORD2>reciprocal</KEYWORD2>
- <KEYWORD2>recursion_limit</KEYWORD2>
- <LITERAL1>red</LITERAL1>
- <KEYWORD1>reflection</KEYWORD1>
- <KEYWORD2>reflection_exponent</KEYWORD2>
- <KEYWORD2>refraction</KEYWORD2>
- <KEYWORD1>#render</KEYWORD1>
- <KEYWORD2>repeat</KEYWORD2>
- <KEYWORD2>rgb</KEYWORD2>
- <KEYWORD2>rgbf</KEYWORD2>
- <KEYWORD2>rgbft</KEYWORD2>
- <KEYWORD2>rgbt</KEYWORD2>
- <KEYWORD2>right</KEYWORD2>
- <KEYWORD2>ripples</KEYWORD2>
- <KEYWORD2>rotate</KEYWORD2>
- <KEYWORD2>roughness</KEYWORD2>
- <KEYWORD2>samples</KEYWORD2>
- <KEYWORD2>save_file</KEYWORD2>
- <KEYWORD2>scale</KEYWORD2>
- <KEYWORD2>scallop_wave</KEYWORD2>
- <KEYWORD2>scattering</KEYWORD2>
- <FUNCTION>seed</FUNCTION>
- <KEYWORD2>select</KEYWORD2>
- <KEYWORD2>shadowless</KEYWORD2>
- <FUNCTION>sin</FUNCTION>
- <KEYWORD2>sine_wave</KEYWORD2>
- <FUNCTION>sinh</FUNCTION>
- <KEYWORD2>size</KEYWORD2>
- <KEYWORD2>sky</KEYWORD2>
- <KEYWORD1>sky_sphere</KEYWORD1>
- <KEYWORD2>slice</KEYWORD2>
- <KEYWORD1>slope</KEYWORD1>
- <KEYWORD1>slope_map</KEYWORD1>
- <KEYWORD2>smooth</KEYWORD2>
- <KEYWORD1>smooth_triangle</KEYWORD1>
- <KEYWORD1>solid</KEYWORD1>
- <KEYWORD1>sor</KEYWORD1>
- <KEYWORD2>spacing</KEYWORD2>
- <KEYWORD2>specular</KEYWORD2>
- <KEYWORD1>sphere</KEYWORD1>
- <KEYWORD1>sphere_sweep</KEYWORD1>
- <KEYWORD2>spherical</KEYWORD2>
- <KEYWORD2>spiral1</KEYWORD2>
- <KEYWORD2>spiral2</KEYWORD2>
- <KEYWORD1>spline</KEYWORD1>
- <KEYWORD2>split_union</KEYWORD2>
- <KEYWORD2>spotlight</KEYWORD2>
- <KEYWORD2>spotted</KEYWORD2>
- <KEYWORD2>sqr</KEYWORD2>
- <FUNCTION>sqrt</FUNCTION>
- <KEYWORD1>#statistics</KEYWORD1>
- <FUNCTION>str</FUNCTION>
- <FUNCTION>strcmp</FUNCTION>
- <KEYWORD2>strength</KEYWORD2>
- <FUNCTION>strlen</FUNCTION>
- <FUNCTION>strlwr</FUNCTION>
- <FUNCTION>strupr</FUNCTION>
- <KEYWORD2>sturm</KEYWORD2>
- <FUNCTION>substr</FUNCTION>
- <KEYWORD1>superellipsoid</KEYWORD1>
- <KEYWORD1>#switch</KEYWORD1>
- <KEYWORD2>sys</KEYWORD2>
- <LITERAL1>t</LITERAL1>
- <FUNCTION>tan</FUNCTION>
- <FUNCTION>tanh</FUNCTION>
- <KEYWORD2>target</KEYWORD2>
- <KEYWORD1>text</KEYWORD1>
- <KEYWORD1>texture</KEYWORD1>
- <KEYWORD1>texture_list</KEYWORD1>
- <KEYWORD1>texture_map</KEYWORD1>
- <KEYWORD2>tga</KEYWORD2>
- <KEYWORD2>thickness</KEYWORD2>
- <KEYWORD2>threshold</KEYWORD2>
- <KEYWORD2>tiff</KEYWORD2>
- <KEYWORD2>tightness</KEYWORD2>
- <KEYWORD2>tile2</KEYWORD2>
- <KEYWORD2>tiles</KEYWORD2>
- <KEYWORD2>tolerance</KEYWORD2>
- <KEYWORD2>toroidal</KEYWORD2>
- <KEYWORD1>torus</KEYWORD1>
- <FUNCTION>trace</FUNCTION>
- <KEYWORD2>transform</KEYWORD2>
- <KEYWORD2>translate</KEYWORD2>
- <KEYWORD2>transmit</KEYWORD2>
- <KEYWORD1>triangle</KEYWORD1>
- <KEYWORD2>triangle_wave</KEYWORD2>
- <LITERAL1>true</LITERAL1>
- <KEYWORD2>ttf</KEYWORD2>
- <KEYWORD2>turb_depth</KEYWORD2>
- <KEYWORD2>turbulence</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <LITERAL1>u</LITERAL1>
- <KEYWORD2>u_steps</KEYWORD2>
- <KEYWORD2>ultra_wide_angle</KEYWORD2>
- <KEYWORD1>#undef</KEYWORD1>
- <KEYWORD1>union</KEYWORD1>
- <KEYWORD2>up</KEYWORD2>
- <KEYWORD2>use_alpha</KEYWORD2>
- <KEYWORD2>use_color</KEYWORD2>
- <KEYWORD2>use_colour</KEYWORD2>
- <KEYWORD2>use_index</KEYWORD2>
- <KEYWORD2>utf8</KEYWORD2>
- <KEYWORD1>uv_indices</KEYWORD1>
- <KEYWORD1>uv_mapping</KEYWORD1>
- <KEYWORD1>uv_vectors</KEYWORD1>
- <LITERAL1>v</LITERAL1>
- <KEYWORD2>v_angle</KEYWORD2>
- <KEYWORD2>v_steps</KEYWORD2>
- <FUNCTION>val</FUNCTION>
- <KEYWORD2>variance</KEYWORD2>
- <FUNCTION>vaxis_rotate</FUNCTION>
- <FUNCTION>vcross</FUNCTION>
- <FUNCTION>vdot</FUNCTION>
- <KEYWORD1>#version</KEYWORD1>
- <KEYWORD1>vertex_vectors</KEYWORD1>
- <FUNCTION>vlength</FUNCTION>
- <FUNCTION>vnormalize</FUNCTION>
- <FUNCTION>vrotate</FUNCTION>
- <FUNCTION>vstr</FUNCTION>
- <FUNCTION>vturbulence</FUNCTION>
- <KEYWORD1>#warning</KEYWORD1>
- <KEYWORD1>warp</KEYWORD1>
- <KEYWORD2>water_level</KEYWORD2>
- <KEYWORD2>waves</KEYWORD2>
- <KEYWORD1>#while</KEYWORD1>
- <KEYWORD2>width</KEYWORD2>
- <KEYWORD2>wood</KEYWORD2>
- <KEYWORD2>wrinkles</KEYWORD2>
- <KEYWORD1>#write</KEYWORD1>
- <LITERAL1>x</LITERAL1>
- <LITERAL1>y</LITERAL1>
- <LITERAL1>yes</LITERAL1>
- <LITERAL1>z</LITERAL1>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Povray mode, by Jan Schaefer
+ based on original Povray mode by Slava Pestov
+ based on PovrayTokenMarker, by Romain Guy -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- C style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD2>aa_level</KEYWORD2>
+ <KEYWORD2>aa_threshold</KEYWORD2>
+ <FUNCTION>abs</FUNCTION>
+ <KEYWORD2>absorption</KEYWORD2>
+ <KEYWORD2>accuracy</KEYWORD2>
+ <FUNCTION>acos</FUNCTION>
+ <FUNCTION>acosh</FUNCTION>
+ <KEYWORD2>adaptive</KEYWORD2>
+ <KEYWORD2>adc_bailout</KEYWORD2>
+ <KEYWORD2>agate</KEYWORD2>
+ <KEYWORD2>agate_turb</KEYWORD2>
+ <KEYWORD2>all</KEYWORD2>
+ <KEYWORD2>all_intersections</KEYWORD2>
+ <KEYWORD2>alpha</KEYWORD2>
+ <KEYWORD2>altitude</KEYWORD2>
+ <KEYWORD2>always_sample</KEYWORD2>
+ <KEYWORD2>ambient</KEYWORD2>
+ <KEYWORD2>ambient_light</KEYWORD2>
+ <KEYWORD2>angle</KEYWORD2>
+ <KEYWORD2>aperture</KEYWORD2>
+ <KEYWORD2>append</KEYWORD2>
+ <KEYWORD2>arc_angle</KEYWORD2>
+ <KEYWORD2>area_light</KEYWORD2>
+ <KEYWORD2>array</KEYWORD2>
+ <FUNCTION>asc</FUNCTION>
+ <KEYWORD2>ascii</KEYWORD2>
+ <FUNCTION>asin</FUNCTION>
+ <FUNCTION>asinh</FUNCTION>
+ <KEYWORD2>assumed_gamma</KEYWORD2>
+ <FUNCTION>atan</FUNCTION>
+ <FUNCTION>atan2</FUNCTION>
+ <FUNCTION>atanh</FUNCTION>
+ <KEYWORD2>autostop</KEYWORD2>
+ <KEYWORD2>average</KEYWORD2>
+ <KEYWORD2>b_spline</KEYWORD2>
+ <KEYWORD1>background</KEYWORD1>
+ <KEYWORD2>bezier_spline</KEYWORD2>
+ <KEYWORD1>bicubic_patch</KEYWORD1>
+ <KEYWORD2>black_hole</KEYWORD2>
+ <KEYWORD1>blob</KEYWORD1>
+ <LITERAL1>blue</LITERAL1>
+ <KEYWORD2>blur_samples</KEYWORD2>
+ <KEYWORD1>bounded_by</KEYWORD1>
+ <KEYWORD1>box</KEYWORD1>
+ <KEYWORD2>boxed</KEYWORD2>
+ <KEYWORD2>bozo</KEYWORD2>
+ <KEYWORD1>#break</KEYWORD1>
+ <KEYWORD2>brick</KEYWORD2>
+ <KEYWORD2>brick_size</KEYWORD2>
+ <KEYWORD2>brightness</KEYWORD2>
+ <KEYWORD2>brilliance</KEYWORD2>
+ <KEYWORD1>bump_map</KEYWORD1>
+ <KEYWORD2>bump_size</KEYWORD2>
+ <KEYWORD2>bumps</KEYWORD2>
+ <KEYWORD1>camera</KEYWORD1>
+ <KEYWORD1>#case</KEYWORD1>
+ <KEYWORD2>caustics</KEYWORD2>
+ <FUNCTION>ceil</FUNCTION>
+ <KEYWORD2>cells</KEYWORD2>
+ <KEYWORD2>charset</KEYWORD2>
+ <KEYWORD2>checker</KEYWORD2>
+ <FUNCTION>chr</FUNCTION>
+ <KEYWORD2>circular</KEYWORD2>
+ <KEYWORD1>clipped_by</KEYWORD1>
+ <LITERAL1>clock</LITERAL1>
+ <LITERAL1>clock_delta</LITERAL1>
+ <LITERAL1>clock_on</LITERAL1>
+ <KEYWORD2>collect</KEYWORD2>
+ <KEYWORD2>color</KEYWORD2>
+ <KEYWORD2>color_map</KEYWORD2>
+ <KEYWORD2>colour</KEYWORD2>
+ <KEYWORD2>colour_map</KEYWORD2>
+ <KEYWORD2>component</KEYWORD2>
+ <KEYWORD2>composite</KEYWORD2>
+ <FUNCTION>concat</FUNCTION>
+ <KEYWORD1>cone</KEYWORD1>
+ <KEYWORD2>confidence</KEYWORD2>
+ <KEYWORD2>conic_sweep</KEYWORD2>
+ <KEYWORD2>conserve_energy</KEYWORD2>
+ <KEYWORD1>contained_by</KEYWORD1>
+ <KEYWORD2>control0</KEYWORD2>
+ <KEYWORD2>control1</KEYWORD2>
+ <KEYWORD2>coords</KEYWORD2>
+ <FUNCTION>cos</FUNCTION>
+ <FUNCTION>cosh</FUNCTION>
+ <KEYWORD2>count</KEYWORD2>
+ <KEYWORD2>crackle</KEYWORD2>
+ <KEYWORD2>crand</KEYWORD2>
+ <KEYWORD1>cube</KEYWORD1>
+ <KEYWORD1>cubic</KEYWORD1>
+ <KEYWORD2>cubic_spline</KEYWORD2>
+ <KEYWORD2>cubic_wave</KEYWORD2>
+ <KEYWORD2>cutaway_textures</KEYWORD2>
+ <KEYWORD1>cylinder</KEYWORD1>
+ <KEYWORD2>cylindrical</KEYWORD2>
+ <KEYWORD1>#debug</KEYWORD1>
+ <KEYWORD1>#declare</KEYWORD1>
+ <KEYWORD1>#default</KEYWORD1>
+ <FUNCTION>defined</FUNCTION>
+ <FUNCTION>degrees</FUNCTION>
+ <KEYWORD2>density</KEYWORD2>
+ <KEYWORD2>density_file</KEYWORD2>
+ <KEYWORD1>density_map</KEYWORD1>
+ <KEYWORD2>dents</KEYWORD2>
+ <KEYWORD2>df3</KEYWORD2>
+ <KEYWORD1>difference</KEYWORD1>
+ <KEYWORD2>diffuse</KEYWORD2>
+ <FUNCTION>dimension_size</FUNCTION>
+ <FUNCTION>dimensions</FUNCTION>
+ <KEYWORD2>direction</KEYWORD2>
+ <KEYWORD1>disc</KEYWORD1>
+ <KEYWORD2>dispersion</KEYWORD2>
+ <KEYWORD2>dispersion_samples</KEYWORD2>
+ <KEYWORD2>dist_exp</KEYWORD2>
+ <KEYWORD2>distance</KEYWORD2>
+ <FUNCTION>div</FUNCTION>
+ <KEYWORD2>double_illuminate</KEYWORD2>
+ <KEYWORD2>eccentricity</KEYWORD2>
+ <KEYWORD1>#else</KEYWORD1>
+ <KEYWORD2>emission</KEYWORD2>
+ <KEYWORD1>#end</KEYWORD1>
+ <KEYWORD1>#error</KEYWORD1>
+ <KEYWORD2>error_bound</KEYWORD2>
+ <KEYWORD2>evaluate</KEYWORD2>
+ <FUNCTION>exp</FUNCTION>
+ <KEYWORD2>expand_thresholds</KEYWORD2>
+ <KEYWORD2>exponent</KEYWORD2>
+ <KEYWORD2>exterior</KEYWORD2>
+ <KEYWORD2>extinction</KEYWORD2>
+ <KEYWORD1>face_indices</KEYWORD1>
+ <KEYWORD2>facets</KEYWORD2>
+ <KEYWORD2>fade_color</KEYWORD2>
+ <KEYWORD2>fade_colour</KEYWORD2>
+ <KEYWORD2>fade_distance</KEYWORD2>
+ <KEYWORD2>fade_power</KEYWORD2>
+ <KEYWORD2>falloff</KEYWORD2>
+ <KEYWORD2>falloff_angle</KEYWORD2>
+ <LITERAL1>false</LITERAL1>
+ <KEYWORD1>#fclose</KEYWORD1>
+ <FUNCTION>file_exists</FUNCTION>
+ <KEYWORD2>filter</KEYWORD2>
+ <LITERAL1>final_clock</LITERAL1>
+ <LITERAL1>final_frame</LITERAL1>
+ <KEYWORD1>finish</KEYWORD1>
+ <KEYWORD2>fisheye</KEYWORD2>
+ <KEYWORD2>flatness</KEYWORD2>
+ <KEYWORD2>flip</KEYWORD2>
+ <FUNCTION>floor</FUNCTION>
+ <KEYWORD2>focal_point</KEYWORD2>
+ <KEYWORD1>fog</KEYWORD1>
+ <KEYWORD2>fog_alt</KEYWORD2>
+ <KEYWORD2>fog_offset</KEYWORD2>
+ <KEYWORD2>fog_type</KEYWORD2>
+ <KEYWORD1>#fopen</KEYWORD1>
+ <KEYWORD2>form</KEYWORD2>
+ <LITERAL1>frame_number</LITERAL1>
+ <KEYWORD2>frequency</KEYWORD2>
+ <KEYWORD2>fresnel</KEYWORD2>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD2>gather</KEYWORD2>
+ <KEYWORD2>gif</KEYWORD2>
+ <KEYWORD2>global_lights</KEYWORD2>
+ <KEYWORD1>global_settings</KEYWORD1>
+ <KEYWORD2>gradient</KEYWORD2>
+ <KEYWORD2>granite</KEYWORD2>
+ <LITERAL1>gray</LITERAL1>
+ <KEYWORD2>gray_threshold</KEYWORD2>
+ <LITERAL1>green</LITERAL1>
+ <KEYWORD2>h_angle</KEYWORD2>
+ <KEYWORD1>height_field</KEYWORD1>
+ <KEYWORD2>hexagon</KEYWORD2>
+ <KEYWORD2>hf_gray_16</KEYWORD2>
+ <KEYWORD2>hierarchy</KEYWORD2>
+ <KEYWORD2>hollow</KEYWORD2>
+ <KEYWORD2>hypercomplex</KEYWORD2>
+ <KEYWORD1>#if</KEYWORD1>
+ <KEYWORD1>#ifdef</KEYWORD1>
+ <KEYWORD2>iff</KEYWORD2>
+ <KEYWORD1>#ifndef</KEYWORD1>
+ <LITERAL1>image_height</LITERAL1>
+ <KEYWORD1>image_map</KEYWORD1>
+ <KEYWORD2>image_pattern</KEYWORD2>
+ <LITERAL1>image_width</LITERAL1>
+ <KEYWORD1>#include</KEYWORD1>
+ <LITERAL1>initial_clock</LITERAL1>
+ <LITERAL1>initial_frame</LITERAL1>
+ <FUNCTION>inside</FUNCTION>
+ <FUNCTION>int</FUNCTION>
+ <KEYWORD1>interior</KEYWORD1>
+ <KEYWORD1>interior_texture</KEYWORD1>
+ <FUNCTION>internal</FUNCTION>
+ <KEYWORD2>interpolate</KEYWORD2>
+ <KEYWORD1>intersection</KEYWORD1>
+ <KEYWORD2>intervals</KEYWORD2>
+ <KEYWORD2>inverse</KEYWORD2>
+ <KEYWORD1>ior</KEYWORD1>
+ <KEYWORD1>irid</KEYWORD1>
+ <KEYWORD2>irid_wavelength</KEYWORD2>
+ <KEYWORD1>isosurface</KEYWORD1>
+ <KEYWORD2>jitter</KEYWORD2>
+ <KEYWORD2>jpeg</KEYWORD2>
+ <KEYWORD2>julia</KEYWORD2>
+ <KEYWORD1>julia_fractal</KEYWORD1>
+ <KEYWORD1>lathe</KEYWORD1>
+ <KEYWORD2>lambda</KEYWORD2>
+ <KEYWORD2>leopard</KEYWORD2>
+ <KEYWORD1>light_group</KEYWORD1>
+ <KEYWORD1>light_source</KEYWORD1>
+ <KEYWORD2>linear_spline</KEYWORD2>
+ <KEYWORD2>linear_sweep</KEYWORD2>
+ <FUNCTION>ln</FUNCTION>
+ <KEYWORD2>load_file</KEYWORD2>
+ <KEYWORD1>#local</KEYWORD1>
+ <KEYWORD2>location</KEYWORD2>
+ <FUNCTION>log</FUNCTION>
+ <KEYWORD2>look_at</KEYWORD2>
+ <KEYWORD1>looks_like</KEYWORD1>
+ <KEYWORD2>low_error_factor</KEYWORD2>
+ <KEYWORD1>#macro</KEYWORD1>
+ <KEYWORD2>magnet</KEYWORD2>
+ <KEYWORD2>major_radius</KEYWORD2>
+ <KEYWORD2>mandel</KEYWORD2>
+ <KEYWORD2>map_type</KEYWORD2>
+ <KEYWORD2>marble</KEYWORD2>
+ <KEYWORD1>material</KEYWORD1>
+ <KEYWORD1>material_map</KEYWORD1>
+ <KEYWORD2>matrix</KEYWORD2>
+ <FUNCTION>max</FUNCTION>
+ <KEYWORD2>max_extent</KEYWORD2>
+ <KEYWORD2>max_gradient</KEYWORD2>
+ <KEYWORD2>max_intersections</KEYWORD2>
+ <KEYWORD2>max_iteration</KEYWORD2>
+ <KEYWORD2>max_sample</KEYWORD2>
+ <KEYWORD2>max_trace</KEYWORD2>
+ <KEYWORD2>max_trace_level</KEYWORD2>
+ <KEYWORD1>media</KEYWORD1>
+ <KEYWORD2>media_attenuation</KEYWORD2>
+ <KEYWORD2>media_interaction</KEYWORD2>
+ <KEYWORD1>merge</KEYWORD1>
+ <KEYWORD1>mesh</KEYWORD1>
+ <KEYWORD1>mesh2</KEYWORD1>
+ <KEYWORD2>metallic</KEYWORD2>
+ <KEYWORD2>method</KEYWORD2>
+ <KEYWORD2>metric</KEYWORD2>
+ <FUNCTION>min</FUNCTION>
+ <KEYWORD2>min_extent</KEYWORD2>
+ <KEYWORD2>minimum_reuse</KEYWORD2>
+ <FUNCTION>mod</FUNCTION>
+ <KEYWORD2>mortar</KEYWORD2>
+ <KEYWORD2>natural_spline</KEYWORD2>
+ <KEYWORD2>nearest_count</KEYWORD2>
+ <LITERAL1>no</LITERAL1>
+ <KEYWORD2>no_bump_scale</KEYWORD2>
+ <KEYWORD2>no_image</KEYWORD2>
+ <KEYWORD2>no_reflection</KEYWORD2>
+ <KEYWORD2>no_shadow</KEYWORD2>
+ <KEYWORD2>noise_generator</KEYWORD2>
+ <KEYWORD1>normal</KEYWORD1>
+ <KEYWORD1>normal_indices</KEYWORD1>
+ <KEYWORD1>normal_map</KEYWORD1>
+ <KEYWORD1>normal_vectors</KEYWORD1>
+ <KEYWORD2>number_of_waves</KEYWORD2>
+ <KEYWORD1>object</KEYWORD1>
+ <KEYWORD2>octaves</KEYWORD2>
+ <LITERAL1>off</LITERAL1>
+ <KEYWORD2>offset</KEYWORD2>
+ <KEYWORD2>omega</KEYWORD2>
+ <KEYWORD2>omnimax</KEYWORD2>
+ <LITERAL1>on</LITERAL1>
+ <KEYWORD2>once</KEYWORD2>
+ <KEYWORD2>onion</KEYWORD2>
+ <KEYWORD2>open</KEYWORD2>
+ <KEYWORD2>orient</KEYWORD2>
+ <KEYWORD2>orientation</KEYWORD2>
+ <KEYWORD2>orthographic</KEYWORD2>
+ <KEYWORD2>panoramic</KEYWORD2>
+ <KEYWORD2>parallel</KEYWORD2>
+ <KEYWORD2>parametric</KEYWORD2>
+ <KEYWORD2>pass_through</KEYWORD2>
+ <KEYWORD1>pattern</KEYWORD1>
+ <KEYWORD2>perspective</KEYWORD2>
+ <KEYWORD2>pgm</KEYWORD2>
+ <KEYWORD2>phase</KEYWORD2>
+ <KEYWORD2>phong</KEYWORD2>
+ <KEYWORD2>phong_size</KEYWORD2>
+ <KEYWORD1>photons</KEYWORD1>
+ <LITERAL1>pi</LITERAL1>
+ <KEYWORD1>pigment</KEYWORD1>
+ <KEYWORD1>pigment_map</KEYWORD1>
+ <KEYWORD1>pigment_pattern</KEYWORD1>
+ <KEYWORD2>planar</KEYWORD2>
+ <KEYWORD1>plane</KEYWORD1>
+ <KEYWORD1>png</KEYWORD1>
+ <KEYWORD2>point_at</KEYWORD2>
+ <KEYWORD1>poly</KEYWORD1>
+ <KEYWORD2>poly_wave</KEYWORD2>
+ <KEYWORD1>polygon</KEYWORD1>
+ <KEYWORD2>pot</KEYWORD2>
+ <FUNCTION>pow</FUNCTION>
+ <KEYWORD2>ppm</KEYWORD2>
+ <KEYWORD2>precision</KEYWORD2>
+ <KEYWORD2>precompute</KEYWORD2>
+ <KEYWORD2>pretrace_end</KEYWORD2>
+ <KEYWORD2>pretrace_start</KEYWORD2>
+ <KEYWORD1>prism</KEYWORD1>
+ <KEYWORD2>projected_through</KEYWORD2>
+ <KEYWORD2>pwr</KEYWORD2>
+ <KEYWORD2>quadratic_spline</KEYWORD2>
+ <KEYWORD2>quadric</KEYWORD2>
+ <KEYWORD2>quartic</KEYWORD2>
+ <KEYWORD2>quaternion</KEYWORD2>
+ <KEYWORD2>quick_color</KEYWORD2>
+ <KEYWORD2>quick_colour</KEYWORD2>
+ <KEYWORD2>quilted</KEYWORD2>
+ <KEYWORD2>radial</KEYWORD2>
+ <FUNCTION>radians</FUNCTION>
+ <KEYWORD1>radiosity</KEYWORD1>
+ <KEYWORD2>radius</KEYWORD2>
+ <KEYWORD1>rainbow</KEYWORD1>
+ <KEYWORD2>ramp_wave</KEYWORD2>
+ <FUNCTION>rand</FUNCTION>
+ <KEYWORD1>#range</KEYWORD1>
+ <KEYWORD2>range_divider</KEYWORD2>
+ <KEYWORD2>ratio</KEYWORD2>
+ <KEYWORD1>#read</KEYWORD1>
+ <KEYWORD2>reciprocal</KEYWORD2>
+ <KEYWORD2>recursion_limit</KEYWORD2>
+ <LITERAL1>red</LITERAL1>
+ <KEYWORD1>reflection</KEYWORD1>
+ <KEYWORD2>reflection_exponent</KEYWORD2>
+ <KEYWORD2>refraction</KEYWORD2>
+ <KEYWORD1>#render</KEYWORD1>
+ <KEYWORD2>repeat</KEYWORD2>
+ <KEYWORD2>rgb</KEYWORD2>
+ <KEYWORD2>rgbf</KEYWORD2>
+ <KEYWORD2>rgbft</KEYWORD2>
+ <KEYWORD2>rgbt</KEYWORD2>
+ <KEYWORD2>right</KEYWORD2>
+ <KEYWORD2>ripples</KEYWORD2>
+ <KEYWORD2>rotate</KEYWORD2>
+ <KEYWORD2>roughness</KEYWORD2>
+ <KEYWORD2>samples</KEYWORD2>
+ <KEYWORD2>save_file</KEYWORD2>
+ <KEYWORD2>scale</KEYWORD2>
+ <KEYWORD2>scallop_wave</KEYWORD2>
+ <KEYWORD2>scattering</KEYWORD2>
+ <FUNCTION>seed</FUNCTION>
+ <KEYWORD2>select</KEYWORD2>
+ <KEYWORD2>shadowless</KEYWORD2>
+ <FUNCTION>sin</FUNCTION>
+ <KEYWORD2>sine_wave</KEYWORD2>
+ <FUNCTION>sinh</FUNCTION>
+ <KEYWORD2>size</KEYWORD2>
+ <KEYWORD2>sky</KEYWORD2>
+ <KEYWORD1>sky_sphere</KEYWORD1>
+ <KEYWORD2>slice</KEYWORD2>
+ <KEYWORD1>slope</KEYWORD1>
+ <KEYWORD1>slope_map</KEYWORD1>
+ <KEYWORD2>smooth</KEYWORD2>
+ <KEYWORD1>smooth_triangle</KEYWORD1>
+ <KEYWORD1>solid</KEYWORD1>
+ <KEYWORD1>sor</KEYWORD1>
+ <KEYWORD2>spacing</KEYWORD2>
+ <KEYWORD2>specular</KEYWORD2>
+ <KEYWORD1>sphere</KEYWORD1>
+ <KEYWORD1>sphere_sweep</KEYWORD1>
+ <KEYWORD2>spherical</KEYWORD2>
+ <KEYWORD2>spiral1</KEYWORD2>
+ <KEYWORD2>spiral2</KEYWORD2>
+ <KEYWORD1>spline</KEYWORD1>
+ <KEYWORD2>split_union</KEYWORD2>
+ <KEYWORD2>spotlight</KEYWORD2>
+ <KEYWORD2>spotted</KEYWORD2>
+ <KEYWORD2>sqr</KEYWORD2>
+ <FUNCTION>sqrt</FUNCTION>
+ <KEYWORD1>#statistics</KEYWORD1>
+ <FUNCTION>str</FUNCTION>
+ <FUNCTION>strcmp</FUNCTION>
+ <KEYWORD2>strength</KEYWORD2>
+ <FUNCTION>strlen</FUNCTION>
+ <FUNCTION>strlwr</FUNCTION>
+ <FUNCTION>strupr</FUNCTION>
+ <KEYWORD2>sturm</KEYWORD2>
+ <FUNCTION>substr</FUNCTION>
+ <KEYWORD1>superellipsoid</KEYWORD1>
+ <KEYWORD1>#switch</KEYWORD1>
+ <KEYWORD2>sys</KEYWORD2>
+ <LITERAL1>t</LITERAL1>
+ <FUNCTION>tan</FUNCTION>
+ <FUNCTION>tanh</FUNCTION>
+ <KEYWORD2>target</KEYWORD2>
+ <KEYWORD1>text</KEYWORD1>
+ <KEYWORD1>texture</KEYWORD1>
+ <KEYWORD1>texture_list</KEYWORD1>
+ <KEYWORD1>texture_map</KEYWORD1>
+ <KEYWORD2>tga</KEYWORD2>
+ <KEYWORD2>thickness</KEYWORD2>
+ <KEYWORD2>threshold</KEYWORD2>
+ <KEYWORD2>tiff</KEYWORD2>
+ <KEYWORD2>tightness</KEYWORD2>
+ <KEYWORD2>tile2</KEYWORD2>
+ <KEYWORD2>tiles</KEYWORD2>
+ <KEYWORD2>tolerance</KEYWORD2>
+ <KEYWORD2>toroidal</KEYWORD2>
+ <KEYWORD1>torus</KEYWORD1>
+ <FUNCTION>trace</FUNCTION>
+ <KEYWORD2>transform</KEYWORD2>
+ <KEYWORD2>translate</KEYWORD2>
+ <KEYWORD2>transmit</KEYWORD2>
+ <KEYWORD1>triangle</KEYWORD1>
+ <KEYWORD2>triangle_wave</KEYWORD2>
+ <LITERAL1>true</LITERAL1>
+ <KEYWORD2>ttf</KEYWORD2>
+ <KEYWORD2>turb_depth</KEYWORD2>
+ <KEYWORD2>turbulence</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <LITERAL1>u</LITERAL1>
+ <KEYWORD2>u_steps</KEYWORD2>
+ <KEYWORD2>ultra_wide_angle</KEYWORD2>
+ <KEYWORD1>#undef</KEYWORD1>
+ <KEYWORD1>union</KEYWORD1>
+ <KEYWORD2>up</KEYWORD2>
+ <KEYWORD2>use_alpha</KEYWORD2>
+ <KEYWORD2>use_color</KEYWORD2>
+ <KEYWORD2>use_colour</KEYWORD2>
+ <KEYWORD2>use_index</KEYWORD2>
+ <KEYWORD2>utf8</KEYWORD2>
+ <KEYWORD1>uv_indices</KEYWORD1>
+ <KEYWORD1>uv_mapping</KEYWORD1>
+ <KEYWORD1>uv_vectors</KEYWORD1>
+ <LITERAL1>v</LITERAL1>
+ <KEYWORD2>v_angle</KEYWORD2>
+ <KEYWORD2>v_steps</KEYWORD2>
+ <FUNCTION>val</FUNCTION>
+ <KEYWORD2>variance</KEYWORD2>
+ <FUNCTION>vaxis_rotate</FUNCTION>
+ <FUNCTION>vcross</FUNCTION>
+ <FUNCTION>vdot</FUNCTION>
+ <KEYWORD1>#version</KEYWORD1>
+ <KEYWORD1>vertex_vectors</KEYWORD1>
+ <FUNCTION>vlength</FUNCTION>
+ <FUNCTION>vnormalize</FUNCTION>
+ <FUNCTION>vrotate</FUNCTION>
+ <FUNCTION>vstr</FUNCTION>
+ <FUNCTION>vturbulence</FUNCTION>
+ <KEYWORD1>#warning</KEYWORD1>
+ <KEYWORD1>warp</KEYWORD1>
+ <KEYWORD2>water_level</KEYWORD2>
+ <KEYWORD2>waves</KEYWORD2>
+ <KEYWORD1>#while</KEYWORD1>
+ <KEYWORD2>width</KEYWORD2>
+ <KEYWORD2>wood</KEYWORD2>
+ <KEYWORD2>wrinkles</KEYWORD2>
+ <KEYWORD1>#write</KEYWORD1>
+ <LITERAL1>x</LITERAL1>
+ <LITERAL1>y</LITERAL1>
+ <LITERAL1>yes</LITERAL1>
+ <LITERAL1>z</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/powerdynamo.xml b/jEdit/modes/powerdynamo.xml
index bcb5425..ee5c1e4 100644
--- a/jEdit/modes/powerdynamo.xml
+++ b/jEdit/modes/powerdynamo.xml
@@ -1,464 +1,464 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!--
-Sybase PowerDynamo mode file for jEdit - v 1.0
-(For the 5 people in the world who still have to program in dynamo.)
-
-By Ben Williams (benw at webmedia.com.au)
-
-1.0 2003-11-13
-Initial release - supports dynamo script, SQL tags, and mostly complete support
-for the other tags (data, document, etc). more support planned for future.
-
--->
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="wordBreakChars" VALUE=" @ %^*()+=|\{}[]:;,.?$&" />
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
- <BEGIN><!--script</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- these are the other dynamo tag types. for the meoment, we'll just hand them over to powerdynamo-script,
- but in future versions we can easily add individual processing for each of them, as they should have.
- -->
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-data">
- <BEGIN><!--data</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-document">
- <BEGIN><!--document</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
- <BEGIN><!--evaluate</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
- <BEGIN><!--execute</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--formatting</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--/formatting</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--include</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--label</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="transact-sql::MAIN">
- <BEGIN><!--sql</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--sql_error_code</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--sql_error_info</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--sql_state</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--sql_on_no_error</BEGIN>
- <END>--></END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--/sql_on_no_error</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--sql_on_error</BEGIN>
- <END>--></END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--/sql_on_error</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--sql_on_no_rows</BEGIN>
- <END>--></END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--/sql_on_no_rows</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--sql_on_rows</BEGIN>
- <END>--></END>
- </SPAN>
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
- <BEGIN><!--/sql_on_rows</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <RULES SET="TAGS" DEFAULT="MARKUP">
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
- <BEGIN><!--script</BEGIN>
- <END>--?></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="TAGS_LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="TAGS_LITERAL">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- </RULES>
-
- <RULES SET="TAGS_LITERAL" DEFAULT="LITERAL1">
- <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
- <BEGIN><!--script</BEGIN>
- <END>?--></END>
- </SPAN>
- </RULES>
-
- <RULES SET="powerdynamo-script" HIGHLIGHT_DIGITS="TRUE">
- <!--PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS-->
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
-
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <!-- Language constructs (24) -->
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>byte</KEYWORD1>
- <KEYWORD1>boolean</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>char</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>double</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>exists</KEYWORD1>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>false</KEYWORD1>
- <KEYWORD1>file</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>float</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
- <KEYWORD1>implements</KEYWORD1>
- <KEYWORD1>int</KEYWORD1>
- <KEYWORD1>interface</KEYWORD1>
- <KEYWORD1>instanceof</KEYWORD1>
- <KEYWORD1>long</KEYWORD1>
- <KEYWORD1>length</KEYWORD1>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>null</KEYWORD1>
- <KEYWORD1>package</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>synchronized</KEYWORD1>
- <KEYWORD1>short</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>super</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>true</KEYWORD1>
- <KEYWORD1>this</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>throws</KEYWORD1>
- <KEYWORD1>threadsafe</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
- <KEYWORD1>void</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <!-- objects -->
- <KEYWORD2></KEYWORD2>
- <KEYWORD2>document</KEYWORD2>
- <KEYWORD2>connection</KEYWORD2>
- <KEYWORD2>file</KEYWORD2>
- <KEYWORD2>query</KEYWORD2>
- <KEYWORD2>session</KEYWORD2>
- <KEYWORD2>site</KEYWORD2>
- <KEYWORD2>system</KEYWORD2>
- <KEYWORD2>typeof</KEYWORD2>
-
- <!-- methods & attributes -->
- <KEYWORD3>AskQuestion</KEYWORD3>
- <KEYWORD3>autoCommit</KEYWORD3>
- <KEYWORD3>Close</KEYWORD3>
- <KEYWORD3>Commit</KEYWORD3>
- <KEYWORD3>Connect</KEYWORD3>
- <KEYWORD3>CreateConnection</KEYWORD3>
- <KEYWORD3>CreateDocument</KEYWORD3>
- <KEYWORD3>CreatePropertySheet</KEYWORD3>
- <KEYWORD3>CreateQuery</KEYWORD3>
- <KEYWORD3>CreateWizard</KEYWORD3>
- <KEYWORD3>cachedOutputTimeOut</KEYWORD3>
- <KEYWORD3>charAt</KEYWORD3>
- <KEYWORD3>connected</KEYWORD3>
- <KEYWORD3>connection</KEYWORD3>
- <KEYWORD3>connectionId</KEYWORD3>
- <KEYWORD3>connectionName</KEYWORD3>
- <KEYWORD3>connectionType</KEYWORD3>
- <KEYWORD3>connectParameters</KEYWORD3>
- <KEYWORD3>contentType</KEYWORD3>
- <KEYWORD3>DeleteConnection</KEYWORD3>
- <KEYWORD3>DeleteDocument</KEYWORD3>
- <KEYWORD3>Disconnect</KEYWORD3>
- <KEYWORD3>database</KEYWORD3>
- <KEYWORD3>dataSource</KEYWORD3>
- <KEYWORD3>dataSourceList</KEYWORD3>
- <KEYWORD3>description</KEYWORD3>
- <KEYWORD3>Exec</KEYWORD3>
- <KEYWORD3>Execute</KEYWORD3>
- <KEYWORD3>ExportTo</KEYWORD3>
- <KEYWORD3>eof</KEYWORD3>
- <KEYWORD3>errorNumber</KEYWORD3>
- <KEYWORD3>errorString</KEYWORD3>
- <KEYWORD3>GetColumnCount</KEYWORD3>
- <KEYWORD3>GetColumnIndex</KEYWORD3>
- <KEYWORD3>GetColumnLabel</KEYWORD3>
- <KEYWORD3>GetConnection</KEYWORD3>
- <KEYWORD3>GetConnectionIdList</KEYWORD3>
- <KEYWORD3>GetConnectionNameList</KEYWORD3>
- <KEYWORD3>GetCWD</KEYWORD3>
- <KEYWORD3>GetDirectory</KEYWORD3>
- <KEYWORD3>GetDocument</KEYWORD3>
- <KEYWORD3>GetEmpty</KEYWORD3>
- <KEYWORD3>GetEnv</KEYWORD3>
- <KEYWORD3>GetErrorCode</KEYWORD3>
- <KEYWORD3>GetErrorInfo</KEYWORD3>
- <KEYWORD3>GetEventList</KEYWORD3>
- <KEYWORD3>GetFilePtr</KEYWORD3>
- <KEYWORD3>GetGenerated</KEYWORD3>
- <KEYWORD3>GetRootDocument</KEYWORD3>
- <KEYWORD3>GetRowCount</KEYWORD3>
- <KEYWORD3>GetServerVariable</KEYWORD3>
- <KEYWORD3>GetState</KEYWORD3>
- <KEYWORD3>GetSupportedMoves</KEYWORD3>
- <KEYWORD3>GetValue</KEYWORD3>
- <KEYWORD3>ImportFrom</KEYWORD3>
- <KEYWORD3>Include</KEYWORD3>
- <KEYWORD3>id</KEYWORD3>
- <KEYWORD3>indexOf</KEYWORD3>
- <KEYWORD3>lastIndexOf</KEYWORD3>
- <KEYWORD3>lastModified</KEYWORD3>
- <KEYWORD3>length</KEYWORD3>
- <KEYWORD3>location</KEYWORD3>
- <KEYWORD3>Move</KEYWORD3>
- <KEYWORD3>MoveFirst</KEYWORD3>
- <KEYWORD3>MoveLast</KEYWORD3>
- <KEYWORD3>MoveNext</KEYWORD3>
- <KEYWORD3>MovePrevious</KEYWORD3>
- <KEYWORD3>MoveRelative</KEYWORD3>
- <KEYWORD3>mode</KEYWORD3>
- <KEYWORD3>name</KEYWORD3>
- <KEYWORD3>OnEvent</KEYWORD3>
- <KEYWORD3>Open</KEYWORD3>
- <KEYWORD3>Opened</KEYWORD3>
- <KEYWORD3>parent</KEYWORD3>
- <KEYWORD3>password</KEYWORD3>
- <KEYWORD3>ReadChar</KEYWORD3>
- <KEYWORD3>ReadLine</KEYWORD3>
- <KEYWORD3>Refresh</KEYWORD3>
- <KEYWORD3>Rollback</KEYWORD3>
- <KEYWORD3>redirect</KEYWORD3>
- <KEYWORD3>Seek</KEYWORD3>
- <KEYWORD3>SetEnv</KEYWORD3>
- <KEYWORD3>SetSQL</KEYWORD3>
- <KEYWORD3>ShowMessage</KEYWORD3>
- <KEYWORD3>substring</KEYWORD3>
- <KEYWORD3>server</KEYWORD3>
- <KEYWORD3>simulateCursors</KEYWORD3>
- <KEYWORD3>size</KEYWORD3>
- <KEYWORD3>source</KEYWORD3>
- <KEYWORD3>status</KEYWORD3>
- <KEYWORD3>timeOut</KEYWORD3>
- <KEYWORD3>toLowerCase</KEYWORD3>
- <KEYWORD3>toUpperCase</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>userId</KEYWORD3>
- <KEYWORD3>value</KEYWORD3>
- <KEYWORD3>WriteLine</KEYWORD3>
- <KEYWORD3>Write</KEYWORD3>
- <KEYWORD3>write</KEYWORD3>
- <KEYWORD3>writeln</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <RULES IGNORE_CASE="TRUE" SET="powerdynamo-tag-general">
- <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <KEYWORDS>
- <KEYWORD2>NAME</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
- <RULES IGNORE_CASE="TRUE" SET="powerdynamo-tag-data">
- <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <KEYWORDS>
- <KEYWORD2>NAME</KEYWORD2>
- <KEYWORD2>QUERY</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
- <RULES IGNORE_CASE="TRUE" SET="powerdynamo-tag-document">
- <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <KEYWORDS>
- <KEYWORD2>CONTENT_TYPE</KEYWORD2>
- <KEYWORD2>REDIRECT</KEYWORD2>
- <KEYWORD2>STATUS</KEYWORD2>
- <KEYWORD2>CACHED_OUTPUT_TIMEOUT</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!--
+Sybase PowerDynamo mode file for jEdit - v 1.0
+(For the 5 people in the world who still have to program in dynamo.)
+
+By Ben Williams (benw at webmedia.com.au)
+
+1.0 2003-11-13
+Initial release - supports dynamo script, SQL tags, and mostly complete support
+for the other tags (data, document, etc). more support planned for future.
+
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="wordBreakChars" VALUE=" @ %^*()+=|\{}[]:;,.?$&" />
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
+ <BEGIN><!--script</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- these are the other dynamo tag types. for the meoment, we'll just hand them over to powerdynamo-script,
+ but in future versions we can easily add individual processing for each of them, as they should have.
+ -->
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-data">
+ <BEGIN><!--data</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-document">
+ <BEGIN><!--document</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
+ <BEGIN><!--evaluate</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
+ <BEGIN><!--execute</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--formatting</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--/formatting</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--include</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--label</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="transact-sql::MAIN">
+ <BEGIN><!--sql</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--sql_error_code</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--sql_error_info</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--sql_state</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--sql_on_no_error</BEGIN>
+ <END>--></END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--/sql_on_no_error</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--sql_on_error</BEGIN>
+ <END>--></END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--/sql_on_error</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--sql_on_no_rows</BEGIN>
+ <END>--></END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--/sql_on_no_rows</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--sql_on_rows</BEGIN>
+ <END>--></END>
+ </SPAN>
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-tag-general">
+ <BEGIN><!--/sql_on_rows</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
+ <BEGIN><!--script</BEGIN>
+ <END>--?></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="TAGS_LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="TAGS_LITERAL">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ </RULES>
+
+ <RULES SET="TAGS_LITERAL" DEFAULT="LITERAL1">
+ <SPAN TYPE="LABEL" DELEGATE="powerdynamo-script">
+ <BEGIN><!--script</BEGIN>
+ <END>?--></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="powerdynamo-script" HIGHLIGHT_DIGITS="TRUE">
+ <!--PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS-->
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <!-- Language constructs (24) -->
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>byte</KEYWORD1>
+ <KEYWORD1>boolean</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>char</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>double</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>exists</KEYWORD1>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>false</KEYWORD1>
+ <KEYWORD1>file</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>float</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>implements</KEYWORD1>
+ <KEYWORD1>int</KEYWORD1>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD1>instanceof</KEYWORD1>
+ <KEYWORD1>long</KEYWORD1>
+ <KEYWORD1>length</KEYWORD1>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>null</KEYWORD1>
+ <KEYWORD1>package</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>synchronized</KEYWORD1>
+ <KEYWORD1>short</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>super</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>true</KEYWORD1>
+ <KEYWORD1>this</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>throws</KEYWORD1>
+ <KEYWORD1>threadsafe</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD1>void</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <!-- objects -->
+ <KEYWORD2></KEYWORD2>
+ <KEYWORD2>document</KEYWORD2>
+ <KEYWORD2>connection</KEYWORD2>
+ <KEYWORD2>file</KEYWORD2>
+ <KEYWORD2>query</KEYWORD2>
+ <KEYWORD2>session</KEYWORD2>
+ <KEYWORD2>site</KEYWORD2>
+ <KEYWORD2>system</KEYWORD2>
+ <KEYWORD2>typeof</KEYWORD2>
+
+ <!-- methods & attributes -->
+ <KEYWORD3>AskQuestion</KEYWORD3>
+ <KEYWORD3>autoCommit</KEYWORD3>
+ <KEYWORD3>Close</KEYWORD3>
+ <KEYWORD3>Commit</KEYWORD3>
+ <KEYWORD3>Connect</KEYWORD3>
+ <KEYWORD3>CreateConnection</KEYWORD3>
+ <KEYWORD3>CreateDocument</KEYWORD3>
+ <KEYWORD3>CreatePropertySheet</KEYWORD3>
+ <KEYWORD3>CreateQuery</KEYWORD3>
+ <KEYWORD3>CreateWizard</KEYWORD3>
+ <KEYWORD3>cachedOutputTimeOut</KEYWORD3>
+ <KEYWORD3>charAt</KEYWORD3>
+ <KEYWORD3>connected</KEYWORD3>
+ <KEYWORD3>connection</KEYWORD3>
+ <KEYWORD3>connectionId</KEYWORD3>
+ <KEYWORD3>connectionName</KEYWORD3>
+ <KEYWORD3>connectionType</KEYWORD3>
+ <KEYWORD3>connectParameters</KEYWORD3>
+ <KEYWORD3>contentType</KEYWORD3>
+ <KEYWORD3>DeleteConnection</KEYWORD3>
+ <KEYWORD3>DeleteDocument</KEYWORD3>
+ <KEYWORD3>Disconnect</KEYWORD3>
+ <KEYWORD3>database</KEYWORD3>
+ <KEYWORD3>dataSource</KEYWORD3>
+ <KEYWORD3>dataSourceList</KEYWORD3>
+ <KEYWORD3>description</KEYWORD3>
+ <KEYWORD3>Exec</KEYWORD3>
+ <KEYWORD3>Execute</KEYWORD3>
+ <KEYWORD3>ExportTo</KEYWORD3>
+ <KEYWORD3>eof</KEYWORD3>
+ <KEYWORD3>errorNumber</KEYWORD3>
+ <KEYWORD3>errorString</KEYWORD3>
+ <KEYWORD3>GetColumnCount</KEYWORD3>
+ <KEYWORD3>GetColumnIndex</KEYWORD3>
+ <KEYWORD3>GetColumnLabel</KEYWORD3>
+ <KEYWORD3>GetConnection</KEYWORD3>
+ <KEYWORD3>GetConnectionIdList</KEYWORD3>
+ <KEYWORD3>GetConnectionNameList</KEYWORD3>
+ <KEYWORD3>GetCWD</KEYWORD3>
+ <KEYWORD3>GetDirectory</KEYWORD3>
+ <KEYWORD3>GetDocument</KEYWORD3>
+ <KEYWORD3>GetEmpty</KEYWORD3>
+ <KEYWORD3>GetEnv</KEYWORD3>
+ <KEYWORD3>GetErrorCode</KEYWORD3>
+ <KEYWORD3>GetErrorInfo</KEYWORD3>
+ <KEYWORD3>GetEventList</KEYWORD3>
+ <KEYWORD3>GetFilePtr</KEYWORD3>
+ <KEYWORD3>GetGenerated</KEYWORD3>
+ <KEYWORD3>GetRootDocument</KEYWORD3>
+ <KEYWORD3>GetRowCount</KEYWORD3>
+ <KEYWORD3>GetServerVariable</KEYWORD3>
+ <KEYWORD3>GetState</KEYWORD3>
+ <KEYWORD3>GetSupportedMoves</KEYWORD3>
+ <KEYWORD3>GetValue</KEYWORD3>
+ <KEYWORD3>ImportFrom</KEYWORD3>
+ <KEYWORD3>Include</KEYWORD3>
+ <KEYWORD3>id</KEYWORD3>
+ <KEYWORD3>indexOf</KEYWORD3>
+ <KEYWORD3>lastIndexOf</KEYWORD3>
+ <KEYWORD3>lastModified</KEYWORD3>
+ <KEYWORD3>length</KEYWORD3>
+ <KEYWORD3>location</KEYWORD3>
+ <KEYWORD3>Move</KEYWORD3>
+ <KEYWORD3>MoveFirst</KEYWORD3>
+ <KEYWORD3>MoveLast</KEYWORD3>
+ <KEYWORD3>MoveNext</KEYWORD3>
+ <KEYWORD3>MovePrevious</KEYWORD3>
+ <KEYWORD3>MoveRelative</KEYWORD3>
+ <KEYWORD3>mode</KEYWORD3>
+ <KEYWORD3>name</KEYWORD3>
+ <KEYWORD3>OnEvent</KEYWORD3>
+ <KEYWORD3>Open</KEYWORD3>
+ <KEYWORD3>Opened</KEYWORD3>
+ <KEYWORD3>parent</KEYWORD3>
+ <KEYWORD3>password</KEYWORD3>
+ <KEYWORD3>ReadChar</KEYWORD3>
+ <KEYWORD3>ReadLine</KEYWORD3>
+ <KEYWORD3>Refresh</KEYWORD3>
+ <KEYWORD3>Rollback</KEYWORD3>
+ <KEYWORD3>redirect</KEYWORD3>
+ <KEYWORD3>Seek</KEYWORD3>
+ <KEYWORD3>SetEnv</KEYWORD3>
+ <KEYWORD3>SetSQL</KEYWORD3>
+ <KEYWORD3>ShowMessage</KEYWORD3>
+ <KEYWORD3>substring</KEYWORD3>
+ <KEYWORD3>server</KEYWORD3>
+ <KEYWORD3>simulateCursors</KEYWORD3>
+ <KEYWORD3>size</KEYWORD3>
+ <KEYWORD3>source</KEYWORD3>
+ <KEYWORD3>status</KEYWORD3>
+ <KEYWORD3>timeOut</KEYWORD3>
+ <KEYWORD3>toLowerCase</KEYWORD3>
+ <KEYWORD3>toUpperCase</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>userId</KEYWORD3>
+ <KEYWORD3>value</KEYWORD3>
+ <KEYWORD3>WriteLine</KEYWORD3>
+ <KEYWORD3>Write</KEYWORD3>
+ <KEYWORD3>write</KEYWORD3>
+ <KEYWORD3>writeln</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES IGNORE_CASE="TRUE" SET="powerdynamo-tag-general">
+ <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <KEYWORD2>NAME</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES IGNORE_CASE="TRUE" SET="powerdynamo-tag-data">
+ <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <KEYWORD2>NAME</KEYWORD2>
+ <KEYWORD2>QUERY</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES IGNORE_CASE="TRUE" SET="powerdynamo-tag-document">
+ <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="powerdynamo_LITERAL">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <KEYWORD2>CONTENT_TYPE</KEYWORD2>
+ <KEYWORD2>REDIRECT</KEYWORD2>
+ <KEYWORD2>STATUS</KEYWORD2>
+ <KEYWORD2>CACHED_OUTPUT_TIMEOUT</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/progress.xml b/jEdit/modes/progress.xml
index a05bd1d..71256eb 100644
--- a/jEdit/modes/progress.xml
+++ b/jEdit/modes/progress.xml
@@ -1,3748 +1,3748 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- ====================================================================== -->
-<!-- Progress mode for jEdit 4.2+ -->
-<!-- -->
-<!-- This is a jEdit syntax file for Progress Open Edge 10.0A -->
-<!-- -->
-<!-- For comments / suggestions / contributions, please contact me at -->
-<!-- p.tingen at vcd.nl -->
-<!-- -->
-<!-- ====================================================================== -->
-<!-- -->
-<!-- Contributors: PT Patrick Tingen -->
-<!-- GW Gerben Wieringa -->
-<!-- SH Stephen Hawkins -->
-<!-- -->
-<!-- ====================================================================== -->
-<!-- 2001-07-17 PT Initial version for Progress 8.2 -->
-<!-- 2002-10-08 GW Added some keywords -->
-<!-- 2003-02-18 PT Added some keywords -->
-<!-- 2003-05-21 PT Rewritten. Thanks to GW & SH ! -->
-<!-- 2004-01-26 PT Generated using Progress program for Progress 9.1D -->
-<!-- 2004-02-04 PT Generated using Progress program for Open Edge 10.0A -->
-<!-- 2004-02-06 PT Corrected due to validating errors against xmode.dtd -->
-<!-- 2004-02-16 PT Fixed 'or choose of' being reported as invalid. -->
-<!-- 2004-04-29 PT Added some appbuilder constants -->
-<!-- ====================================================================== -->
-<!-- Special thanks to Gerben and Stephen for their support. -->
-<!-- ====================================================================== -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="boxComment" VALUE="**" />
- <PROPERTY NAME="lineComment" VALUE="&scop cmt " />
- <PROPERTY NAME="indentNextLine" VALUE="\s*(if|do|for|else|case|repeat|procedure|function)(\s+.*|\s*)" />
- <PROPERTY NAME="wordBreakChars" VALUE=",.;:/?^[]@" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- </PROPS>
-
- <RULES SET="COMMENT" DEFAULT="COMMENT1" IGNORE_CASE="TRUE">
- <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
- <BEGIN>/*</BEGIN> <END>*/</END>
- </SPAN>
- </RULES>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- COMMENT1 : Normal Progress comments -->
- <!-- LITERAL1 : text between ' or " -->
- <!-- LITERAL2 : -->
- <!-- MARKUP : -->
- <!-- LABEL : Progress block labels -->
- <!-- FUNCTION : attributes and methods -->
- <!-- OPERATOR : All operators -->
- <!-- INVALID : Deprecated keywords -->
- <!-- NON INVALID: Correction for non-invalid keywords -->
-
- <!-- COMMENT1 : Normal Progress comments -->
- <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <!-- LITERAL1 : text between ' or " -->
- <SPAN TYPE="LITERAL1" ESCAPE="~">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="~">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- LABEL : Progress block labels -->
- <MARK_FOLLOWING TYPE="LABEL">{&</MARK_FOLLOWING>
-
- <!-- OPERATOR : All operators -->
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <!-- GT, EQ etc -->
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
-
- <!-- LABEL : Progress block labels -->
- <!-- Better would be to search for regexp ^[[:blank:]]*[[:graph:]]+:$ -->
- <!-- but this is not (yet) implemented since regexps cannot match -->
- <!-- anything that does not have a fixed starting character. -->
- <MARK_PREVIOUS TYPE="LABEL" AT_WHITESPACE_END="TRUE" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
-
- <!-- FUNCTION : attributes and methods -->
- <MARK_FOLLOWING TYPE="FUNCTION">:accelerator</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:accept-changes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:accept-row-changes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-buffer</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-calc-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-columns-from</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-events-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-fields-from</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-first</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-index-field</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-last</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-like-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-like-field</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-like-index</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-new-field</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-new-index</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:add-super-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:adm-data</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:after-buffer</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:after-rowid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:after-table</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:allow-column-searching</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:always-on-top</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:ambiguous</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:append-child</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:appl-alert-boxes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:apply-callback</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:appserver-info</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:appserver-password</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:appserver-userid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:async-request-count</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:async-request-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:asynchronous</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:attach-data-source</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:attr-space</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:attribute-names</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-completion</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-delete</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-delete-xml</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-end-key</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-go</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-indent</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-resize</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-return</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-validate</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:auto-zap</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:available</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:available-formats</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:background</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:base-ade</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:basic-logging</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:batch-mode</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:before-buffer</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:before-rowid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:before-table</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:bgcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:blank</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:block-iteration-display</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:border-bottom-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:border-bottom-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:border-left-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:border-left-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:border-right-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:border-right-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:border-top-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:border-top-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:box</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:box-selectable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:browse-column-data-types</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:browse-column-formats</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:browse-column-labels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-compare</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-copy</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-create</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-delete</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-field</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-lines</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-release</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-validate</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:buffer-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:bytes-read</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:bytes-written</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cache</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:call-name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:call-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:can-create</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:can-delete</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:can-read</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:can-write</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cancel-break</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cancel-button</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cancel-requests</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cancelled</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:careful-paint</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:case-sensitive</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:centered</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:character_length</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:charset</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:checked</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:child-num</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:clear</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:clear-selection</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:client-connection-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:client-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:clone-node</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:code</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:codepage</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-bgcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-dcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-fgcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-font</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-label</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-movable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-pfcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-read-only</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-resizable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:column-scrolling</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:columns</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:com-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:complete</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:config-name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:connect</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:connected</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:context-help</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:context-help-file</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:context-help-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:control-box</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:convert-3d-colors</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:convert-to-offset</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:coverage</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cpcase</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cpcoll</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cplog</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cpprint</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cprcodein</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cprcodeout</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cpstream</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cpterm</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:crc-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:create-like</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:create-node</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:create-node-namespace</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:create-on-add</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:create-result-list-entry</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:current-changed</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:current-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:current-environment</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:current-iteration</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:current-result-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:current-row-modified</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:current-window</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cursor-char</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cursor-line</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:cursor-offset</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:data-entry-return</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:data-source</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:data-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dataset</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:date-format</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:db-references</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dbname</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dde-error</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dde-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dde-item</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dde-name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dde-topic</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:deblank</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:debug</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:debug-alert</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:decimals</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:default</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:default-buffer-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:default-button</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:default-commit</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:default-string</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:delete</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:delete-current-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:delete-line</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:delete-node</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:delete-result-list-entry</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:delete-selected-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:delete-selected-rows</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:delimiter</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:description</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:deselect-focused-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:deselect-rows</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:deselect-selected-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:detach-data-source</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:directory</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:disable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:disable-auto-zap</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:disable-connections</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:disable-dump-triggers</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:disable-load-triggers</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:disconnect</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:display-message</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:display-timezone</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:display-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:down</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:drag-enabled</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:drop-target</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dump-logging-now</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:dynamic</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:edge-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:edge-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:edit-can-paste</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:edit-can-undo</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:edit-clear</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:edit-copy</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:edit-cut</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:edit-paste</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:edit-undo</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:empty</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:empty-temp-table</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:enable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:enable-connections</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:enabled</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:encoding</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:end-file-drop</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:end-user-prompt</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:error-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:error-object-detail</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:error-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:error-string</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:event-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:event-procedure-context</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:event-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:exclusive-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:execution-log</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:expand</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:expandable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:export</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:extent</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:fetch-selected-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:fgcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:file-create-date</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:file-create-time</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:file-mod-date</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:file-mod-time</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:file-name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:file-offset</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:file-size</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:file-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:fill</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:fill-mode</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:filled</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:find-by-rowid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:find-current</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:find-first</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:find-last</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:find-unique</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-async-request</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-buffer</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-child</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-data-source</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-dataset</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-query</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-server</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-server-socket</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-socket</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:first-tab-item</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:fit-last-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:flat-button</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:focused-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:focused-row-selected</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:font</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:font-based-layout</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:foreground</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:form-input</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:format</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:forward-only</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:frame</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:frame-col</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:frame-name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:frame-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:frame-spacing</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:frame-x</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:frame-y</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:frequency</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:full-height-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:full-height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:full-pathname</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:full-width-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:full-width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:function</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-attribute</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-attribute-node</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-blue-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-browse-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-buffer-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-bytes-available</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-cgi-list</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-cgi-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-changes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-child</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-child-relation</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-config-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-current</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-document-element</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-dropped-file</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-dynamic</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-first</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-green-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-iteration</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-last</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-message</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-next</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-number</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-parent</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-prev</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-printers</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-red-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-repositioned-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-rgb-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-selected-widget</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-signature</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-socket-option</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-tab-item</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-text-height-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-text-height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-text-width-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-text-width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:get-wait-state</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:graphic-edge</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:grid-factor-horizontal</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:grid-factor-vertical</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:grid-snap</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:grid-unit-height-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:grid-unit-height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:grid-unit-width-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:grid-unit-width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:grid-visible</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:handler</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:has-lobs</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:has-records</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:height-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:hidden</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:horizontal</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:html-charset</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:html-end-of-line</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:html-end-of-page</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:html-frame-begin</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:html-frame-end</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:html-header-begin</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:html-header-end</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:html-title-begin</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:html-title-end</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:hwnd</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:icfparameter</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:icon</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:image</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:image-down</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:image-insensitive</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:image-up</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:immediate-display</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:import-node</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:in-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:increment-exclusive-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:index</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:index-information</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:initial</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:initialize-document-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:initiate</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:inner-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:inner-lines</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:input-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:insert</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:insert-backtab</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:insert-before</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:insert-file</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:insert-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:insert-string</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:insert-tab</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:instantiating-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:internal-entries</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:invoke</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:is-open</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:is-parameter-set</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:is-row-selected</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:is-selected</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:is-xml</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:items-per-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:keep-connection-open</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:keep-frame-z-order</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:keep-security-cache</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:key</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:label</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:label-bgcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:label-dcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:label-fgcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:label-font</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:labels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:languages</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:large</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:large-to-small</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:last-async-request</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:last-child</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:last-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:last-server</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:last-server-socket</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:last-socket</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:last-tab-item</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:line</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:list-item-pairs</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:list-items</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:listings</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:literal-question</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:load</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:load-icon</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:load-image</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:load-image-down</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:load-image-insensitive</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:load-image-up</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:load-mouse-pointer</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:load-small-icon</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:local-host</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:local-name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:local-port</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:locator-column-number</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:locator-line-number</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:locator-public-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:locator-system-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:locator-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:locked</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:log-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:longchar-to-node-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:lookup</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:mandatory</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:manual-highlight</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:margin-height-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:margin-height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:margin-width-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:margin-width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:max-button</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:max-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:max-data-guess</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:max-height-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:max-height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:max-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:max-width-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:max-width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:md5-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:memptr-to-node-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:menu-bar</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:menu-key</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:menu-mouse</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:merge-changes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:merge-row-changes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:message-area</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:message-area-font</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:min-button</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:min-column-width-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:min-column-width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:min-height-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:min-height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:min-schema-marshall</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:min-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:min-width-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:min-width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:modified</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:mouse-pointer</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:movable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:move-after-tab-item</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:move-before-tab-item</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:move-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:move-to-bottom</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:move-to-eof</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:move-to-top</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:multiple</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:multitasking-interval</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:namespace-prefix</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:namespace-uri</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:needs-appserver-prompt</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:needs-prompt</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:new</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:new-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:next-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:next-sibling</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:next-tab-item</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:no-current-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:no-empty-space</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:no-focus</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:no-schema-marshall</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:no-validate</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:node-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:node-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:node-value-to-longchar</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:node-value-to-memptr</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:normalize</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-buffers</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-buttons</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-child-relations</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-children</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-columns</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-dropped-files</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-entries</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-fields</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-formats</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-items</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-iterations</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-lines</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-locked-columns</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-messages</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-parameters</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-replaced</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-results</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-selected-rows</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-selected-widgets</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-tabs</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-to-retain</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:num-visible-columns</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:numeric-decimal-point</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:numeric-format</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:numeric-separator</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:ole-invoke-locale</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:ole-names-locale</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:on-frame-border</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:origin-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:origin-rowid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:overlay</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:owner</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:owner-document</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:page-bottom</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:page-top</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:parameter</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:parent</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:parent-relation</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:parse-status</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:password-field</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:pathname</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:persistent</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:persistent-cache-disabled</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:persistent-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:pfcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:pixels-per-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:pixels-per-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:popup-menu</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:popup-only</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:position</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:prepare-string</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:prepared</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:prev-column</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:prev-sibling</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:prev-tab-item</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:primary</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:printer-control-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:printer-hdc</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:printer-name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:printer-port</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:private-data</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:procedure-name</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:profiling</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:progress-source</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:proxy</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:proxy-password</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:proxy-userid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:public-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:published-events</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:query</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:query-close</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:query-off-end</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:query-open</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:query-prepare</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:quit</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:radio-buttons</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:raw-transfer</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:read</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:read-file</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:read-only</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:recid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:record-length</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:refresh</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:refreshable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:reject-changes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:reject-row-changes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:rejected</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:remote</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:remote-host</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:remote-port</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:remove-attribute</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:remove-child</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:remove-events-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:remove-super-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:replace</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:replace-child</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:replace-selection-text</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:reposition-backwards</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:reposition-forwards</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:reposition-parent-relation</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:reposition-to-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:reposition-to-rowid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:resizable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:resize</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:retain-shape</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:return-inserted</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:return-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:return-value-data-type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:row-height-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:row-height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:row-markers</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:row-resizable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:row-state</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:rowid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:rule-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:rule-y</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:save</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:save-file</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:save-row-changes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:sax-parse</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:sax-parse-first</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:sax-parse-next</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:sax-xml</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:schema-change</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:schema-path</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:screen-lines</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:screen-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:scroll-bars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:scroll-delta</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:scroll-offset</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:scroll-to-current-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:scroll-to-item</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:scroll-to-selected-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:scrollable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:scrollbar-horizontal</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:scrollbar-vertical</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:search</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:select-all</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:select-focused-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:select-next-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:select-prev-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:select-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:selectable</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:selected</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:selection-end</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:selection-start</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:selection-text</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:sensitive</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:separator-fgcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:separators</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:server</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:server-connection-bound</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:server-connection-bound-request</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:server-connection-context</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:server-connection-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:server-operating-mode</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:session-end</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-attribute</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-attribute-node</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-blue-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-break</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-buffers</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-callback-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-commit</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-connect-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-dynamic</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-green-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-input-source</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-numeric-format</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-parameter</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-read-response-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-red-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-repositioned-row</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-rgb-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-rollback</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-selection</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-socket-option</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:set-wait-state</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:show-in-taskbar</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:side-label-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:side-labels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:skip-deleted-record</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:small-icon</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:small-title</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:sort</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:startup-parameters</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:status-area</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:status-area-font</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:stop</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:stop-parsing</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:stopped</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:stretch-to-fit</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:string-value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:sub-menu-help</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:subtype</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:super-procedures</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:suppress-namespace-processing</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:suppress-warnings</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:synchronize</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:system-alert-boxes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:system-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:tab-position</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:tab-stop</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:table</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:table-crc-list</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:table-handle</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:table-list</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:table-number</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:temp-directory</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:temp-table-prepare</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:text-selected</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:three-d</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:tic-marks</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:time-source</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:title</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:title-bgcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:title-dcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:title-fgcolor</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:title-font</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:toggle-box</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:tooltip</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:tooltips</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:top-only</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:trace-filter</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:tracing</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:tracking-changes</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:trans-init-procedure</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:transaction</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:transparent</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:type</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:undo</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:unique-id</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:unique-match</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:url</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:url-decode</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:url-encode</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:url-password</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:url-userid</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:user-data</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:v6display</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:validate</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:validate-expression</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:validate-message</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:validate-xml</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:validation-enabled</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:value</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:view-first-column-on-reopen</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:virtual-height-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:virtual-height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:virtual-width-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:virtual-width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:visible</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:warning</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:widget-enter</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:widget-leave</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:width-chars</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:window</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:window-state</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:window-system</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:word-wrap</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:work-area-height-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:work-area-width-pixels</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:work-area-x</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:work-area-y</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:write</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:write-data</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:x</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:x-document</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:xml-schema-path</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:xml-suppress-namespace-processing</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:y</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:year-offset</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION">:_dcm</MARK_FOLLOWING>
-
- <!-- INVALID : Deprecated keywords -->
- <SEQ_REGEXP TYPE="INVALID" HASH_CHAR="put" AT_WORD_START="TRUE">put\s+screen</SEQ_REGEXP>
- <MARK_FOLLOWING TYPE="INVALID">:WHERE-STRING</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="INVALID">:REPOSITION-PARENT-RELATION</MARK_FOLLOWING>
-
- <!-- NON INVALID: Correction for non-invalid keywords -->
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="choose" AT_WORD_START="TRUE">choose\s+of</SEQ_REGEXP>
-
- <KEYWORDS>
- <!-- Keep the following sections in the specified order since -->
- <!-- some keywords occur in more than 1 section. The last one -->
- <!-- determines the appearance of a certain keyword. -->
-
- <!-- KEYWORD3 : events -->
- <!-- KEYWORD1 : Statements, functions, attributes, methods -->
- <!-- KEYWORD2 : VST & metaschema files and fields -->
- <!-- INVALID : Deprecated keywords -->
- <!-- COMMENT2 : Preprocessor statements -->
-
- <!-- KEYWORD3 : events -->
- <KEYWORD3>any-key</KEYWORD3>
- <KEYWORD3>any-printable</KEYWORD3>
- <KEYWORD3>back-tab</KEYWORD3>
- <KEYWORD3>backspace</KEYWORD3>
- <KEYWORD3>bell</KEYWORD3>
- <KEYWORD3>choose</KEYWORD3>
- <KEYWORD3>container-event</KEYWORD3>
- <KEYWORD3>dde-notify</KEYWORD3>
- <KEYWORD3>default-action</KEYWORD3>
- <KEYWORD3>del</KEYWORD3>
- <KEYWORD3>delete-char</KEYWORD3>
- <KEYWORD3>delete-character</KEYWORD3>
- <KEYWORD3>deselect</KEYWORD3>
- <KEYWORD3>deselection</KEYWORD3>
- <KEYWORD3>drop-file-notify</KEYWORD3>
- <KEYWORD3>empty-selection</KEYWORD3>
- <KEYWORD3>end</KEYWORD3>
- <KEYWORD3>end-box-selection</KEYWORD3>
- <KEYWORD3>end-error</KEYWORD3>
- <KEYWORD3>end-move</KEYWORD3>
- <KEYWORD3>end-resize</KEYWORD3>
- <KEYWORD3>end-search</KEYWORD3>
- <KEYWORD3>endkey</KEYWORD3>
- <KEYWORD3>entry</KEYWORD3>
- <KEYWORD3>error</KEYWORD3>
- <KEYWORD3>go</KEYWORD3>
- <KEYWORD3>help</KEYWORD3>
- <KEYWORD3>home</KEYWORD3>
- <KEYWORD3>leave</KEYWORD3>
- <KEYWORD3>menu-drop</KEYWORD3>
- <KEYWORD3>off-end</KEYWORD3>
- <KEYWORD3>off-home</KEYWORD3>
- <KEYWORD3>parent-window-close</KEYWORD3>
- <KEYWORD3>procedure-complete</KEYWORD3>
- <KEYWORD3>read-response</KEYWORD3>
- <KEYWORD3>recall</KEYWORD3>
- <KEYWORD3>return</KEYWORD3>
- <KEYWORD3>row-display</KEYWORD3>
- <KEYWORD3>row-entry</KEYWORD3>
- <KEYWORD3>row-leave</KEYWORD3>
- <KEYWORD3>scroll-notify</KEYWORD3>
- <KEYWORD3>select</KEYWORD3>
- <KEYWORD3>selection</KEYWORD3>
- <KEYWORD3>start-box-selection</KEYWORD3>
- <KEYWORD3>start-move</KEYWORD3>
- <KEYWORD3>start-resize</KEYWORD3>
- <KEYWORD3>start-search</KEYWORD3>
- <KEYWORD3>tab</KEYWORD3>
- <KEYWORD3>value-changed</KEYWORD3>
- <KEYWORD3>window-close</KEYWORD3>
- <KEYWORD3>window-maximized</KEYWORD3>
- <KEYWORD3>window-minimized</KEYWORD3>
- <KEYWORD3>window-resized</KEYWORD3>
- <KEYWORD3>window-restored</KEYWORD3>
-
-
- <!-- KEYWORD1 : Statements, functions -->
- <KEYWORD1>abort</KEYWORD1>
- <KEYWORD1>absolute</KEYWORD1>
- <KEYWORD1>accelerator</KEYWORD1>
- <KEYWORD1>accept-changes</KEYWORD1>
- <KEYWORD1>accept-row-changes</KEYWORD1>
- <KEYWORD1>accumulate</KEYWORD1>
- <KEYWORD1>across</KEYWORD1>
- <KEYWORD1>active</KEYWORD1>
- <KEYWORD1>active-window</KEYWORD1>
- <KEYWORD1>actor</KEYWORD1>
- <KEYWORD1>add</KEYWORD1>
- <KEYWORD1>add-buffer</KEYWORD1>
- <KEYWORD1>add-calc-column</KEYWORD1>
- <KEYWORD1>add-columns-from</KEYWORD1>
- <KEYWORD1>add-events-procedure</KEYWORD1>
- <KEYWORD1>add-fields-from</KEYWORD1>
- <KEYWORD1>add-first</KEYWORD1>
- <KEYWORD1>add-header-entry</KEYWORD1>
- <KEYWORD1>add-index-field</KEYWORD1>
- <KEYWORD1>add-interval</KEYWORD1>
- <KEYWORD1>add-last</KEYWORD1>
- <KEYWORD1>add-like-column</KEYWORD1>
- <KEYWORD1>add-like-field</KEYWORD1>
- <KEYWORD1>add-like-index</KEYWORD1>
- <KEYWORD1>add-new-field</KEYWORD1>
- <KEYWORD1>add-new-index</KEYWORD1>
- <KEYWORD1>add-relation</KEYWORD1>
- <KEYWORD1>add-source-buffer</KEYWORD1>
- <KEYWORD1>add-super-procedure</KEYWORD1>
- <KEYWORD1>adm-data</KEYWORD1>
- <KEYWORD1>advise</KEYWORD1>
- <KEYWORD1>after-buffer</KEYWORD1>
- <KEYWORD1>after-rowid</KEYWORD1>
- <KEYWORD1>after-table</KEYWORD1>
- <KEYWORD1>alert-box</KEYWORD1>
- <KEYWORD1>alias</KEYWORD1>
- <KEYWORD1>all</KEYWORD1>
- <KEYWORD1>allow-column-searching</KEYWORD1>
- <KEYWORD1>allow-replication</KEYWORD1>
- <KEYWORD1>alter</KEYWORD1>
- <KEYWORD1>alternate-key</KEYWORD1>
- <KEYWORD1>always-on-top</KEYWORD1>
- <KEYWORD1>ambiguous</KEYWORD1>
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>ansi-only</KEYWORD1>
- <KEYWORD1>any</KEYWORD1>
- <KEYWORD1>anywhere</KEYWORD1>
- <KEYWORD1>append</KEYWORD1>
- <KEYWORD1>append-child</KEYWORD1>
- <KEYWORD1>append-line</KEYWORD1>
- <KEYWORD1>appl-alert-boxes</KEYWORD1>
- <KEYWORD1>application</KEYWORD1>
- <KEYWORD1>apply</KEYWORD1>
- <KEYWORD1>apply-callback</KEYWORD1>
- <KEYWORD1>appserver-info</KEYWORD1>
- <KEYWORD1>appserver-password</KEYWORD1>
- <KEYWORD1>appserver-userid</KEYWORD1>
- <KEYWORD1>array-message</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>as-cursor</KEYWORD1>
- <KEYWORD1>ascending</KEYWORD1>
- <KEYWORD1>ask-overwrite</KEYWORD1>
- <KEYWORD1>assign</KEYWORD1>
- <KEYWORD1>async-request-count</KEYWORD1>
- <KEYWORD1>async-request-handle</KEYWORD1>
- <KEYWORD1>asynchronous</KEYWORD1>
- <KEYWORD1>at</KEYWORD1>
- <KEYWORD1>attach</KEYWORD1>
- <KEYWORD1>attach-data-source</KEYWORD1>
- <KEYWORD1>attachment</KEYWORD1>
- <KEYWORD1>attr-space</KEYWORD1>
- <KEYWORD1>attribute-names</KEYWORD1>
- <KEYWORD1>attribute-type</KEYWORD1>
- <KEYWORD1>authorization</KEYWORD1>
- <KEYWORD1>auto-completion</KEYWORD1>
- <KEYWORD1>auto-delete</KEYWORD1>
- <KEYWORD1>auto-delete-xml</KEYWORD1>
- <KEYWORD1>auto-end-key</KEYWORD1>
- <KEYWORD1>auto-endkey</KEYWORD1>
- <KEYWORD1>auto-go</KEYWORD1>
- <KEYWORD1>auto-indent</KEYWORD1>
- <KEYWORD1>auto-resize</KEYWORD1>
- <KEYWORD1>auto-return</KEYWORD1>
- <KEYWORD1>auto-validate</KEYWORD1>
- <KEYWORD1>auto-zap</KEYWORD1>
- <KEYWORD1>automatic</KEYWORD1>
- <KEYWORD1>available</KEYWORD1>
- <KEYWORD1>available-formats</KEYWORD1>
- <KEYWORD1>average</KEYWORD1>
- <KEYWORD1>avg</KEYWORD1>
- <KEYWORD1>background</KEYWORD1>
- <KEYWORD1>backwards</KEYWORD1>
- <KEYWORD1>base-ade</KEYWORD1>
- <KEYWORD1>base-key</KEYWORD1>
- <KEYWORD1>base64</KEYWORD1>
- <KEYWORD1>basic-logging</KEYWORD1>
- <KEYWORD1>batch-mode</KEYWORD1>
- <KEYWORD1>before-buffer</KEYWORD1>
- <KEYWORD1>before-hide</KEYWORD1>
- <KEYWORD1>before-rowid</KEYWORD1>
- <KEYWORD1>before-table</KEYWORD1>
- <KEYWORD1>begins</KEYWORD1>
- <KEYWORD1>between</KEYWORD1>
- <KEYWORD1>bgcolor</KEYWORD1>
- <KEYWORD1>big-endian</KEYWORD1>
- <KEYWORD1>binary</KEYWORD1>
- <KEYWORD1>bind-where</KEYWORD1>
- <KEYWORD1>blank</KEYWORD1>
- <KEYWORD1>blob</KEYWORD1>
- <KEYWORD1>block</KEYWORD1>
- <KEYWORD1>block-iteration-display</KEYWORD1>
- <KEYWORD1>border-bottom</KEYWORD1>
- <KEYWORD1>border-bottom-chars</KEYWORD1>
- <KEYWORD1>border-bottom-pixels</KEYWORD1>
- <KEYWORD1>border-left</KEYWORD1>
- <KEYWORD1>border-left-chars</KEYWORD1>
- <KEYWORD1>border-left-pixels</KEYWORD1>
- <KEYWORD1>border-right</KEYWORD1>
- <KEYWORD1>border-right-chars</KEYWORD1>
- <KEYWORD1>border-right-pixels</KEYWORD1>
- <KEYWORD1>border-top</KEYWORD1>
- <KEYWORD1>border-top-chars</KEYWORD1>
- <KEYWORD1>border-top-pixels</KEYWORD1>
- <KEYWORD1>both</KEYWORD1>
- <KEYWORD1>bottom</KEYWORD1>
- <KEYWORD1>bottom-column</KEYWORD1>
- <KEYWORD1>box</KEYWORD1>
- <KEYWORD1>box-selectable</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>break-line</KEYWORD1>
- <KEYWORD1>browse</KEYWORD1>
- <KEYWORD1>browse-column-data-types</KEYWORD1>
- <KEYWORD1>browse-column-formats</KEYWORD1>
- <KEYWORD1>browse-column-labels</KEYWORD1>
- <KEYWORD1>browse-header</KEYWORD1>
- <KEYWORD1>btos</KEYWORD1>
- <KEYWORD1>buffer</KEYWORD1>
- <KEYWORD1>buffer-chars</KEYWORD1>
- <KEYWORD1>buffer-compare</KEYWORD1>
- <KEYWORD1>buffer-copy</KEYWORD1>
- <KEYWORD1>buffer-create</KEYWORD1>
- <KEYWORD1>buffer-delete</KEYWORD1>
- <KEYWORD1>buffer-field</KEYWORD1>
- <KEYWORD1>buffer-handle</KEYWORD1>
- <KEYWORD1>buffer-lines</KEYWORD1>
- <KEYWORD1>buffer-name</KEYWORD1>
- <KEYWORD1>buffer-release</KEYWORD1>
- <KEYWORD1>buffer-validate</KEYWORD1>
- <KEYWORD1>buffer-value</KEYWORD1>
- <KEYWORD1>buttons</KEYWORD1>
- <KEYWORD1>by</KEYWORD1>
- <KEYWORD1>by-pointer</KEYWORD1>
- <KEYWORD1>by-reference</KEYWORD1>
- <KEYWORD1>by-value</KEYWORD1>
- <KEYWORD1>by-variant-pointer</KEYWORD1>
- <KEYWORD1>byte</KEYWORD1>
- <KEYWORD1>bytes-read</KEYWORD1>
- <KEYWORD1>bytes-written</KEYWORD1>
- <KEYWORD1>cache</KEYWORD1>
- <KEYWORD1>cache-size</KEYWORD1>
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>call-name</KEYWORD1>
- <KEYWORD1>call-type</KEYWORD1>
- <KEYWORD1>can-create</KEYWORD1>
- <KEYWORD1>can-delete</KEYWORD1>
- <KEYWORD1>can-do</KEYWORD1>
- <KEYWORD1>can-find</KEYWORD1>
- <KEYWORD1>can-query</KEYWORD1>
- <KEYWORD1>can-read</KEYWORD1>
- <KEYWORD1>can-set</KEYWORD1>
- <KEYWORD1>can-write</KEYWORD1>
- <KEYWORD1>cancel-break</KEYWORD1>
- <KEYWORD1>cancel-button</KEYWORD1>
- <KEYWORD1>cancel-pick</KEYWORD1>
- <KEYWORD1>cancel-requests</KEYWORD1>
- <KEYWORD1>cancelled</KEYWORD1>
- <KEYWORD1>caps</KEYWORD1>
- <KEYWORD1>careful-paint</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>case-sensitive</KEYWORD1>
- <KEYWORD1>cdecl</KEYWORD1>
- <KEYWORD1>centered</KEYWORD1>
- <KEYWORD1>chained</KEYWORD1>
- <KEYWORD1>character</KEYWORD1>
- <KEYWORD1>character_length</KEYWORD1>
- <KEYWORD1>charset</KEYWORD1>
- <KEYWORD1>check</KEYWORD1>
- <KEYWORD1>checked</KEYWORD1>
- <KEYWORD1>child-buffer</KEYWORD1>
- <KEYWORD1>child-num</KEYWORD1>
- <KEYWORD1>choices</KEYWORD1>
- <KEYWORD1>chr</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>clear-selection</KEYWORD1>
- <KEYWORD1>client-connection-id</KEYWORD1>
- <KEYWORD1>client-type</KEYWORD1>
- <KEYWORD1>clipboard</KEYWORD1>
- <KEYWORD1>clob</KEYWORD1>
- <KEYWORD1>clone-node</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>code</KEYWORD1>
- <KEYWORD1>codebase-locator</KEYWORD1>
- <KEYWORD1>codepage</KEYWORD1>
- <KEYWORD1>codepage-convert</KEYWORD1>
- <KEYWORD1>col</KEYWORD1>
- <KEYWORD1>col-of</KEYWORD1>
- <KEYWORD1>collate</KEYWORD1>
- <KEYWORD1>colon</KEYWORD1>
- <KEYWORD1>colon-aligned</KEYWORD1>
- <KEYWORD1>color</KEYWORD1>
- <KEYWORD1>color-table</KEYWORD1>
- <KEYWORD1>column-bgcolor</KEYWORD1>
- <KEYWORD1>column-codepage</KEYWORD1>
- <KEYWORD1>column-dcolor</KEYWORD1>
- <KEYWORD1>column-fgcolor</KEYWORD1>
- <KEYWORD1>column-font</KEYWORD1>
- <KEYWORD1>column-label</KEYWORD1>
- <KEYWORD1>column-label-bgcolor</KEYWORD1>
- <KEYWORD1>column-label-dcolor</KEYWORD1>
- <KEYWORD1>column-label-fgcolor</KEYWORD1>
- <KEYWORD1>column-label-font</KEYWORD1>
- <KEYWORD1>column-label-height-chars</KEYWORD1>
- <KEYWORD1>column-label-height-pixels</KEYWORD1>
- <KEYWORD1>column-movable</KEYWORD1>
- <KEYWORD1>column-of</KEYWORD1>
- <KEYWORD1>column-pfcolor</KEYWORD1>
- <KEYWORD1>column-read-only</KEYWORD1>
- <KEYWORD1>column-resizable</KEYWORD1>
- <KEYWORD1>column-scrolling</KEYWORD1>
- <KEYWORD1>columns</KEYWORD1>
- <KEYWORD1>com-handle</KEYWORD1>
- <KEYWORD1>com-self</KEYWORD1>
- <KEYWORD1>combo-box</KEYWORD1>
- <KEYWORD1>command</KEYWORD1>
- <KEYWORD1>compares</KEYWORD1>
- <KEYWORD1>compile</KEYWORD1>
- <KEYWORD1>compiler</KEYWORD1>
- <KEYWORD1>complete</KEYWORD1>
- <KEYWORD1>component-handle</KEYWORD1>
- <KEYWORD1>component-self</KEYWORD1>
- <KEYWORD1>config-name</KEYWORD1>
- <KEYWORD1>connect</KEYWORD1>
- <KEYWORD1>connected</KEYWORD1>
- <KEYWORD1>constrained</KEYWORD1>
- <KEYWORD1>contains</KEYWORD1>
- <KEYWORD1>contents</KEYWORD1>
- <KEYWORD1>context</KEYWORD1>
- <KEYWORD1>context-help</KEYWORD1>
- <KEYWORD1>context-help-file</KEYWORD1>
- <KEYWORD1>context-help-id</KEYWORD1>
- <KEYWORD1>context-popup</KEYWORD1>
- <KEYWORD1>control</KEYWORD1>
- <KEYWORD1>control-box</KEYWORD1>
- <KEYWORD1>control-container</KEYWORD1>
- <KEYWORD1>control-frame</KEYWORD1>
- <KEYWORD1>convert</KEYWORD1>
- <KEYWORD1>convert-3d-colors</KEYWORD1>
- <KEYWORD1>convert-to-offset</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>copy-lob</KEYWORD1>
- <KEYWORD1>count</KEYWORD1>
- <KEYWORD1>count-of</KEYWORD1>
- <KEYWORD1>coverage</KEYWORD1>
- <KEYWORD1>cpcase</KEYWORD1>
- <KEYWORD1>cpcoll</KEYWORD1>
- <KEYWORD1>cpinternal</KEYWORD1>
- <KEYWORD1>cplog</KEYWORD1>
- <KEYWORD1>cpprint</KEYWORD1>
- <KEYWORD1>cprcodein</KEYWORD1>
- <KEYWORD1>cprcodeout</KEYWORD1>
- <KEYWORD1>cpstream</KEYWORD1>
- <KEYWORD1>cpterm</KEYWORD1>
- <KEYWORD1>crc-value</KEYWORD1>
- <KEYWORD1>create</KEYWORD1>
- <KEYWORD1>create-like</KEYWORD1>
- <KEYWORD1>create-node</KEYWORD1>
- <KEYWORD1>create-node-namespace</KEYWORD1>
- <KEYWORD1>create-on-add</KEYWORD1>
- <KEYWORD1>create-result-list-entry</KEYWORD1>
- <KEYWORD1>create-test-file</KEYWORD1>
- <KEYWORD1>ctos</KEYWORD1>
- <KEYWORD1>current</KEYWORD1>
- <KEYWORD1>current-changed</KEYWORD1>
- <KEYWORD1>current-column</KEYWORD1>
- <KEYWORD1>current-environment</KEYWORD1>
- <KEYWORD1>current-iteration</KEYWORD1>
- <KEYWORD1>current-language</KEYWORD1>
- <KEYWORD1>current-result-row</KEYWORD1>
- <KEYWORD1>current-row-modified</KEYWORD1>
- <KEYWORD1>current-value</KEYWORD1>
- <KEYWORD1>current-window</KEYWORD1>
- <KEYWORD1>current_date</KEYWORD1>
- <KEYWORD1>cursor</KEYWORD1>
- <KEYWORD1>cursor-char</KEYWORD1>
- <KEYWORD1>cursor-down</KEYWORD1>
- <KEYWORD1>cursor-left</KEYWORD1>
- <KEYWORD1>cursor-line</KEYWORD1>
- <KEYWORD1>cursor-offset</KEYWORD1>
- <KEYWORD1>cursor-right</KEYWORD1>
- <KEYWORD1>cursor-up</KEYWORD1>
- <KEYWORD1>cut</KEYWORD1>
- <KEYWORD1>data-bind</KEYWORD1>
- <KEYWORD1>data-entry-return</KEYWORD1>
- <KEYWORD1>data-refresh-line</KEYWORD1>
- <KEYWORD1>data-refresh-page</KEYWORD1>
- <KEYWORD1>data-relation</KEYWORD1>
- <KEYWORD1>data-source</KEYWORD1>
- <KEYWORD1>data-type</KEYWORD1>
- <KEYWORD1>database</KEYWORD1>
- <KEYWORD1>dataservers</KEYWORD1>
- <KEYWORD1>dataset</KEYWORD1>
- <KEYWORD1>dataset-handle</KEYWORD1>
- <KEYWORD1>date</KEYWORD1>
- <KEYWORD1>date-format</KEYWORD1>
- <KEYWORD1>datetime</KEYWORD1>
- <KEYWORD1>datetime-tz</KEYWORD1>
- <KEYWORD1>day</KEYWORD1>
- <KEYWORD1>db-references</KEYWORD1>
- <KEYWORD1>dbcodepage</KEYWORD1>
- <KEYWORD1>dbcollation</KEYWORD1>
- <KEYWORD1>dbname</KEYWORD1>
- <KEYWORD1>dbparam</KEYWORD1>
- <KEYWORD1>dbrestrictions</KEYWORD1>
- <KEYWORD1>dbtaskid</KEYWORD1>
- <KEYWORD1>dbtype</KEYWORD1>
- <KEYWORD1>dbversion</KEYWORD1>
- <KEYWORD1>dcolor</KEYWORD1>
- <KEYWORD1>dde</KEYWORD1>
- <KEYWORD1>dde-error</KEYWORD1>
- <KEYWORD1>dde-id</KEYWORD1>
- <KEYWORD1>dde-item</KEYWORD1>
- <KEYWORD1>dde-name</KEYWORD1>
- <KEYWORD1>dde-topic</KEYWORD1>
- <KEYWORD1>deblank</KEYWORD1>
- <KEYWORD1>debug</KEYWORD1>
- <KEYWORD1>debug-alert</KEYWORD1>
- <KEYWORD1>debug-list</KEYWORD1>
- <KEYWORD1>debugger</KEYWORD1>
- <KEYWORD1>decimal</KEYWORD1>
- <KEYWORD1>decimals</KEYWORD1>
- <KEYWORD1>declare</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>default-buffer-handle</KEYWORD1>
- <KEYWORD1>default-button</KEYWORD1>
- <KEYWORD1>default-commit</KEYWORD1>
- <KEYWORD1>default-extension</KEYWORD1>
- <KEYWORD1>default-noxlate</KEYWORD1>
- <KEYWORD1>default-pop-up</KEYWORD1>
- <KEYWORD1>default-string</KEYWORD1>
- <KEYWORD1>default-window</KEYWORD1>
- <KEYWORD1>defer-lob-fetch</KEYWORD1>
- <KEYWORD1>define</KEYWORD1>
- <KEYWORD1>defined</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD1>delete-column</KEYWORD1>
- <KEYWORD1>delete-current-row</KEYWORD1>
- <KEYWORD1>delete-end-line</KEYWORD1>
- <KEYWORD1>delete-field</KEYWORD1>
- <KEYWORD1>delete-header-entry</KEYWORD1>
- <KEYWORD1>delete-line</KEYWORD1>
- <KEYWORD1>delete-node</KEYWORD1>
- <KEYWORD1>delete-result-list-entry</KEYWORD1>
- <KEYWORD1>delete-selected-row</KEYWORD1>
- <KEYWORD1>delete-selected-rows</KEYWORD1>
- <KEYWORD1>delete-word</KEYWORD1>
- <KEYWORD1>delimiter</KEYWORD1>
- <KEYWORD1>descending</KEYWORD1>
- <KEYWORD1>description</KEYWORD1>
- <KEYWORD1>deselect-extend</KEYWORD1>
- <KEYWORD1>deselect-focused-row</KEYWORD1>
- <KEYWORD1>deselect-rows</KEYWORD1>
- <KEYWORD1>deselect-selected-row</KEYWORD1>
- <KEYWORD1>deselection-extend</KEYWORD1>
- <KEYWORD1>detach</KEYWORD1>
- <KEYWORD1>detach-data-source</KEYWORD1>
- <KEYWORD1>dialog-box</KEYWORD1>
- <KEYWORD1>dialog-help</KEYWORD1>
- <KEYWORD1>dictionary</KEYWORD1>
- <KEYWORD1>dir</KEYWORD1>
- <KEYWORD1>directory</KEYWORD1>
- <KEYWORD1>disable</KEYWORD1>
- <KEYWORD1>disable-auto-zap</KEYWORD1>
- <KEYWORD1>disable-connections</KEYWORD1>
- <KEYWORD1>disable-dump-triggers</KEYWORD1>
- <KEYWORD1>disable-load-triggers</KEYWORD1>
- <KEYWORD1>disabled</KEYWORD1>
- <KEYWORD1>disconnect</KEYWORD1>
- <KEYWORD1>dismiss-menu</KEYWORD1>
- <KEYWORD1>display</KEYWORD1>
- <KEYWORD1>display-message</KEYWORD1>
- <KEYWORD1>display-timezone</KEYWORD1>
- <KEYWORD1>display-type</KEYWORD1>
- <KEYWORD1>distinct</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>dos</KEYWORD1>
- <KEYWORD1>dos-end</KEYWORD1>
- <KEYWORD1>double</KEYWORD1>
- <KEYWORD1>down</KEYWORD1>
- <KEYWORD1>drag-enabled</KEYWORD1>
- <KEYWORD1>drop</KEYWORD1>
- <KEYWORD1>drop-down</KEYWORD1>
- <KEYWORD1>drop-down-list</KEYWORD1>
- <KEYWORD1>drop-target</KEYWORD1>
- <KEYWORD1>dump</KEYWORD1>
- <KEYWORD1>dump-logging-now</KEYWORD1>
- <KEYWORD1>dynamic</KEYWORD1>
- <KEYWORD1>dynamic-current-value</KEYWORD1>
- <KEYWORD1>dynamic-function</KEYWORD1>
- <KEYWORD1>dynamic-next-value</KEYWORD1>
- <KEYWORD1>each</KEYWORD1>
- <KEYWORD1>echo</KEYWORD1>
- <KEYWORD1>edge</KEYWORD1>
- <KEYWORD1>edge-chars</KEYWORD1>
- <KEYWORD1>edge-pixels</KEYWORD1>
- <KEYWORD1>edit-can-paste</KEYWORD1>
- <KEYWORD1>edit-can-undo</KEYWORD1>
- <KEYWORD1>edit-clear</KEYWORD1>
- <KEYWORD1>edit-copy</KEYWORD1>
- <KEYWORD1>edit-cut</KEYWORD1>
- <KEYWORD1>edit-paste</KEYWORD1>
- <KEYWORD1>edit-undo</KEYWORD1>
- <KEYWORD1>editing</KEYWORD1>
- <KEYWORD1>editor</KEYWORD1>
- <KEYWORD1>editor-backtab</KEYWORD1>
- <KEYWORD1>editor-tab</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>empty</KEYWORD1>
- <KEYWORD1>empty-dataset</KEYWORD1>
- <KEYWORD1>empty-temp-table</KEYWORD1>
- <KEYWORD1>enable</KEYWORD1>
- <KEYWORD1>enable-connections</KEYWORD1>
- <KEYWORD1>enabled</KEYWORD1>
- <KEYWORD1>encode</KEYWORD1>
- <KEYWORD1>encoding</KEYWORD1>
- <KEYWORD1>end-file-drop</KEYWORD1>
- <KEYWORD1>end-key</KEYWORD1>
- <KEYWORD1>end-row-resize</KEYWORD1>
- <KEYWORD1>end-user-prompt</KEYWORD1>
- <KEYWORD1>enter-menubar</KEYWORD1>
- <KEYWORD1>entered</KEYWORD1>
- <KEYWORD1>entry-types-list</KEYWORD1>
- <KEYWORD1>eq</KEYWORD1>
- <KEYWORD1>error-column</KEYWORD1>
- <KEYWORD1>error-object-detail</KEYWORD1>
- <KEYWORD1>error-row</KEYWORD1>
- <KEYWORD1>error-status</KEYWORD1>
- <KEYWORD1>error-string</KEYWORD1>
- <KEYWORD1>escape</KEYWORD1>
- <KEYWORD1>etime</KEYWORD1>
- <KEYWORD1>event-procedure</KEYWORD1>
- <KEYWORD1>event-procedure-context</KEYWORD1>
- <KEYWORD1>event-type</KEYWORD1>
- <KEYWORD1>events</KEYWORD1>
- <KEYWORD1>except</KEYWORD1>
- <KEYWORD1>exclusive</KEYWORD1>
- <KEYWORD1>exclusive-id</KEYWORD1>
- <KEYWORD1>exclusive-lock</KEYWORD1>
- <KEYWORD1>exclusive-web-user</KEYWORD1>
- <KEYWORD1>execute</KEYWORD1>
- <KEYWORD1>execution-log</KEYWORD1>
- <KEYWORD1>exists</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>exp</KEYWORD1>
- <KEYWORD1>expand</KEYWORD1>
- <KEYWORD1>expandable</KEYWORD1>
- <KEYWORD1>explicit</KEYWORD1>
- <KEYWORD1>export</KEYWORD1>
- <KEYWORD1>extended</KEYWORD1>
- <KEYWORD1>extent</KEYWORD1>
- <KEYWORD1>external</KEYWORD1>
- <KEYWORD1>extract</KEYWORD1>
- <KEYWORD1>false</KEYWORD1>
- <KEYWORD1>fetch</KEYWORD1>
- <KEYWORD1>fetch-selected-row</KEYWORD1>
- <KEYWORD1>fgcolor</KEYWORD1>
- <KEYWORD1>fields</KEYWORD1>
- <KEYWORD1>file</KEYWORD1>
- <KEYWORD1>file-access-date</KEYWORD1>
- <KEYWORD1>file-access-time</KEYWORD1>
- <KEYWORD1>file-create-date</KEYWORD1>
- <KEYWORD1>file-create-time</KEYWORD1>
- <KEYWORD1>file-information</KEYWORD1>
- <KEYWORD1>file-mod-date</KEYWORD1>
- <KEYWORD1>file-mod-time</KEYWORD1>
- <KEYWORD1>file-name</KEYWORD1>
- <KEYWORD1>file-offset</KEYWORD1>
- <KEYWORD1>file-size</KEYWORD1>
- <KEYWORD1>file-type</KEYWORD1>
- <KEYWORD1>filename</KEYWORD1>
- <KEYWORD1>fill</KEYWORD1>
- <KEYWORD1>fill-in</KEYWORD1>
- <KEYWORD1>fill-mode</KEYWORD1>
- <KEYWORD1>fill-where-string</KEYWORD1>
- <KEYWORD1>filled</KEYWORD1>
- <KEYWORD1>filters</KEYWORD1>
- <KEYWORD1>find</KEYWORD1>
- <KEYWORD1>find-by-rowid</KEYWORD1>
- <KEYWORD1>find-case-sensitive</KEYWORD1>
- <KEYWORD1>find-current</KEYWORD1>
- <KEYWORD1>find-first</KEYWORD1>
- <KEYWORD1>find-global</KEYWORD1>
- <KEYWORD1>find-last</KEYWORD1>
- <KEYWORD1>find-next</KEYWORD1>
- <KEYWORD1>find-next-occurrence</KEYWORD1>
- <KEYWORD1>find-prev-occurrence</KEYWORD1>
- <KEYWORD1>find-previous</KEYWORD1>
- <KEYWORD1>find-select</KEYWORD1>
- <KEYWORD1>find-unique</KEYWORD1>
- <KEYWORD1>find-wrap-around</KEYWORD1>
- <KEYWORD1>finder</KEYWORD1>
- <KEYWORD1>first</KEYWORD1>
- <KEYWORD1>first-async-request</KEYWORD1>
- <KEYWORD1>first-buffer</KEYWORD1>
- <KEYWORD1>first-child</KEYWORD1>
- <KEYWORD1>first-column</KEYWORD1>
- <KEYWORD1>first-data-source</KEYWORD1>
- <KEYWORD1>first-dataset</KEYWORD1>
- <KEYWORD1>first-of</KEYWORD1>
- <KEYWORD1>first-procedure</KEYWORD1>
- <KEYWORD1>first-query</KEYWORD1>
- <KEYWORD1>first-server</KEYWORD1>
- <KEYWORD1>first-server-socket</KEYWORD1>
- <KEYWORD1>first-socket</KEYWORD1>
- <KEYWORD1>first-tab-item</KEYWORD1>
- <KEYWORD1>fit-last-column</KEYWORD1>
- <KEYWORD1>fix-codepage</KEYWORD1>
- <KEYWORD1>fixed-only</KEYWORD1>
- <KEYWORD1>flat-button</KEYWORD1>
- <KEYWORD1>float</KEYWORD1>
- <KEYWORD1>focus</KEYWORD1>
- <KEYWORD1>focus-in</KEYWORD1>
- <KEYWORD1>focused-row</KEYWORD1>
- <KEYWORD1>focused-row-selected</KEYWORD1>
- <KEYWORD1>font</KEYWORD1>
- <KEYWORD1>font-based-layout</KEYWORD1>
- <KEYWORD1>font-table</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>force-file</KEYWORD1>
- <KEYWORD1>foreground</KEYWORD1>
- <KEYWORD1>form-input</KEYWORD1>
- <KEYWORD1>format</KEYWORD1>
- <KEYWORD1>forward-only</KEYWORD1>
- <KEYWORD1>forwards</KEYWORD1>
- <KEYWORD1>frame</KEYWORD1>
- <KEYWORD1>frame-col</KEYWORD1>
- <KEYWORD1>frame-db</KEYWORD1>
- <KEYWORD1>frame-down</KEYWORD1>
- <KEYWORD1>frame-field</KEYWORD1>
- <KEYWORD1>frame-file</KEYWORD1>
- <KEYWORD1>frame-index</KEYWORD1>
- <KEYWORD1>frame-line</KEYWORD1>
- <KEYWORD1>frame-name</KEYWORD1>
- <KEYWORD1>frame-row</KEYWORD1>
- <KEYWORD1>frame-spacing</KEYWORD1>
- <KEYWORD1>frame-value</KEYWORD1>
- <KEYWORD1>frame-x</KEYWORD1>
- <KEYWORD1>frame-y</KEYWORD1>
- <KEYWORD1>frequency</KEYWORD1>
- <KEYWORD1>from</KEYWORD1>
- <KEYWORD1>from-chars</KEYWORD1>
- <KEYWORD1>from-current</KEYWORD1>
- <KEYWORD1>from-pixels</KEYWORD1>
- <KEYWORD1>fromnoreorder</KEYWORD1>
- <KEYWORD1>full-height</KEYWORD1>
- <KEYWORD1>full-height-chars</KEYWORD1>
- <KEYWORD1>full-height-pixels</KEYWORD1>
- <KEYWORD1>full-pathname</KEYWORD1>
- <KEYWORD1>full-width-chars</KEYWORD1>
- <KEYWORD1>full-width-pixels</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>function-call-type</KEYWORD1>
- <KEYWORD1>gateways</KEYWORD1>
- <KEYWORD1>ge</KEYWORD1>
- <KEYWORD1>generate-md5</KEYWORD1>
- <KEYWORD1>get</KEYWORD1>
- <KEYWORD1>get-attr-call-type</KEYWORD1>
- <KEYWORD1>get-attribute</KEYWORD1>
- <KEYWORD1>get-attribute-node</KEYWORD1>
- <KEYWORD1>get-bits</KEYWORD1>
- <KEYWORD1>get-blue-value</KEYWORD1>
- <KEYWORD1>get-browse-column</KEYWORD1>
- <KEYWORD1>get-buffer-handle</KEYWORD1>
- <KEYWORD1>get-byte</KEYWORD1>
- <KEYWORD1>get-byte-order</KEYWORD1>
- <KEYWORD1>get-bytes</KEYWORD1>
- <KEYWORD1>get-bytes-available</KEYWORD1>
- <KEYWORD1>get-cgi-list</KEYWORD1>
- <KEYWORD1>get-cgi-value</KEYWORD1>
- <KEYWORD1>get-changes</KEYWORD1>
- <KEYWORD1>get-child</KEYWORD1>
- <KEYWORD1>get-child-relation</KEYWORD1>
- <KEYWORD1>get-codepages</KEYWORD1>
- <KEYWORD1>get-collations</KEYWORD1>
- <KEYWORD1>get-config-value</KEYWORD1>
- <KEYWORD1>get-current</KEYWORD1>
- <KEYWORD1>get-dataset-buffer</KEYWORD1>
- <KEYWORD1>get-dir</KEYWORD1>
- <KEYWORD1>get-document-element</KEYWORD1>
- <KEYWORD1>get-double</KEYWORD1>
- <KEYWORD1>get-dropped-file</KEYWORD1>
- <KEYWORD1>get-dynamic</KEYWORD1>
- <KEYWORD1>get-file</KEYWORD1>
- <KEYWORD1>get-first</KEYWORD1>
- <KEYWORD1>get-float</KEYWORD1>
- <KEYWORD1>get-green-value</KEYWORD1>
- <KEYWORD1>get-header-entry</KEYWORD1>
- <KEYWORD1>get-index-by-namespace-name</KEYWORD1>
- <KEYWORD1>get-index-by-qname</KEYWORD1>
- <KEYWORD1>get-iteration</KEYWORD1>
- <KEYWORD1>get-key-value</KEYWORD1>
- <KEYWORD1>get-last</KEYWORD1>
- <KEYWORD1>get-localname-by-index</KEYWORD1>
- <KEYWORD1>get-long</KEYWORD1>
- <KEYWORD1>get-message</KEYWORD1>
- <KEYWORD1>get-next</KEYWORD1>
- <KEYWORD1>get-node</KEYWORD1>
- <KEYWORD1>get-number</KEYWORD1>
- <KEYWORD1>get-parent</KEYWORD1>
- <KEYWORD1>get-pointer-value</KEYWORD1>
- <KEYWORD1>get-prev</KEYWORD1>
- <KEYWORD1>get-printers</KEYWORD1>
- <KEYWORD1>get-qname-by-index</KEYWORD1>
- <KEYWORD1>get-red-value</KEYWORD1>
- <KEYWORD1>get-relation</KEYWORD1>
- <KEYWORD1>get-repositioned-row</KEYWORD1>
- <KEYWORD1>get-rgb-value</KEYWORD1>
- <KEYWORD1>get-selected-widget</KEYWORD1>
- <KEYWORD1>get-serialized</KEYWORD1>
- <KEYWORD1>get-short</KEYWORD1>
- <KEYWORD1>get-signature</KEYWORD1>
- <KEYWORD1>get-size</KEYWORD1>
- <KEYWORD1>get-socket-option</KEYWORD1>
- <KEYWORD1>get-source-buffer</KEYWORD1>
- <KEYWORD1>get-string</KEYWORD1>
- <KEYWORD1>get-tab-item</KEYWORD1>
- <KEYWORD1>get-text-height</KEYWORD1>
- <KEYWORD1>get-text-height-chars</KEYWORD1>
- <KEYWORD1>get-text-height-pixels</KEYWORD1>
- <KEYWORD1>get-text-width</KEYWORD1>
- <KEYWORD1>get-text-width-chars</KEYWORD1>
- <KEYWORD1>get-text-width-pixels</KEYWORD1>
- <KEYWORD1>get-top-buffer</KEYWORD1>
- <KEYWORD1>get-type-by-index</KEYWORD1>
- <KEYWORD1>get-type-by-namespace-name</KEYWORD1>
- <KEYWORD1>get-type-by-qname</KEYWORD1>
- <KEYWORD1>get-unsigned-short</KEYWORD1>
- <KEYWORD1>get-uri-by-index</KEYWORD1>
- <KEYWORD1>get-value-by-index</KEYWORD1>
- <KEYWORD1>get-value-by-namespace-name</KEYWORD1>
- <KEYWORD1>get-value-by-qname</KEYWORD1>
- <KEYWORD1>get-wait-state</KEYWORD1>
- <KEYWORD1>getbyte</KEYWORD1>
- <KEYWORD1>global</KEYWORD1>
- <KEYWORD1>go-on</KEYWORD1>
- <KEYWORD1>go-pending</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>grant</KEYWORD1>
- <KEYWORD1>graphic-edge</KEYWORD1>
- <KEYWORD1>grayed</KEYWORD1>
- <KEYWORD1>grid-factor-horizontal</KEYWORD1>
- <KEYWORD1>grid-factor-vertical</KEYWORD1>
- <KEYWORD1>grid-set</KEYWORD1>
- <KEYWORD1>grid-snap</KEYWORD1>
- <KEYWORD1>grid-unit-height</KEYWORD1>
- <KEYWORD1>grid-unit-height-chars</KEYWORD1>
- <KEYWORD1>grid-unit-height-pixels</KEYWORD1>
- <KEYWORD1>grid-unit-width</KEYWORD1>
- <KEYWORD1>grid-unit-width-chars</KEYWORD1>
- <KEYWORD1>grid-unit-width-pixels</KEYWORD1>
- <KEYWORD1>grid-visible</KEYWORD1>
- <KEYWORD1>group</KEYWORD1>
- <KEYWORD1>gt</KEYWORD1>
- <KEYWORD1>handle</KEYWORD1>
- <KEYWORD1>handler</KEYWORD1>
- <KEYWORD1>has-lobs</KEYWORD1>
- <KEYWORD1>has-records</KEYWORD1>
- <KEYWORD1>having</KEYWORD1>
- <KEYWORD1>header</KEYWORD1>
- <KEYWORD1>height</KEYWORD1>
- <KEYWORD1>height-chars</KEYWORD1>
- <KEYWORD1>height-pixels</KEYWORD1>
- <KEYWORD1>help-context</KEYWORD1>
- <KEYWORD1>help-topic</KEYWORD1>
- <KEYWORD1>helpfile-name</KEYWORD1>
- <KEYWORD1>hidden</KEYWORD1>
- <KEYWORD1>hide</KEYWORD1>
- <KEYWORD1>hint</KEYWORD1>
- <KEYWORD1>horiz-end</KEYWORD1>
- <KEYWORD1>horiz-home</KEYWORD1>
- <KEYWORD1>horiz-scroll-drag</KEYWORD1>
- <KEYWORD1>horizontal</KEYWORD1>
- <KEYWORD1>host-byte-order</KEYWORD1>
- <KEYWORD1>html-charset</KEYWORD1>
- <KEYWORD1>html-end-of-line</KEYWORD1>
- <KEYWORD1>html-end-of-page</KEYWORD1>
- <KEYWORD1>html-frame-begin</KEYWORD1>
- <KEYWORD1>html-frame-end</KEYWORD1>
- <KEYWORD1>html-header-begin</KEYWORD1>
- <KEYWORD1>html-header-end</KEYWORD1>
- <KEYWORD1>html-title-begin</KEYWORD1>
- <KEYWORD1>html-title-end</KEYWORD1>
- <KEYWORD1>hwnd</KEYWORD1>
- <KEYWORD1>icfparameter</KEYWORD1>
- <KEYWORD1>icon</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>ignore-current-modified</KEYWORD1>
- <KEYWORD1>image</KEYWORD1>
- <KEYWORD1>image-down</KEYWORD1>
- <KEYWORD1>image-insensitive</KEYWORD1>
- <KEYWORD1>image-size</KEYWORD1>
- <KEYWORD1>image-size-chars</KEYWORD1>
- <KEYWORD1>image-size-pixels</KEYWORD1>
- <KEYWORD1>image-up</KEYWORD1>
- <KEYWORD1>immediate-display</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
- <KEYWORD1>import-node</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>in-handle</KEYWORD1>
- <KEYWORD1>increment-exclusive-id</KEYWORD1>
- <KEYWORD1>index</KEYWORD1>
- <KEYWORD1>index-hint</KEYWORD1>
- <KEYWORD1>index-information</KEYWORD1>
- <KEYWORD1>indexed-reposition</KEYWORD1>
- <KEYWORD1>indicator</KEYWORD1>
- <KEYWORD1>information</KEYWORD1>
- <KEYWORD1>init</KEYWORD1>
- <KEYWORD1>initial</KEYWORD1>
- <KEYWORD1>initial-dir</KEYWORD1>
- <KEYWORD1>initial-filter</KEYWORD1>
- <KEYWORD1>initialize-document-type</KEYWORD1>
- <KEYWORD1>initiate</KEYWORD1>
- <KEYWORD1>inner</KEYWORD1>
- <KEYWORD1>inner-chars</KEYWORD1>
- <KEYWORD1>inner-lines</KEYWORD1>
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD1>input-output</KEYWORD1>
- <KEYWORD1>input-value</KEYWORD1>
- <KEYWORD1>insert</KEYWORD1>
- <KEYWORD1>insert-backtab</KEYWORD1>
- <KEYWORD1>insert-before</KEYWORD1>
- <KEYWORD1>insert-column</KEYWORD1>
- <KEYWORD1>insert-field</KEYWORD1>
- <KEYWORD1>insert-field-data</KEYWORD1>
- <KEYWORD1>insert-field-label</KEYWORD1>
- <KEYWORD1>insert-file</KEYWORD1>
- <KEYWORD1>insert-mode</KEYWORD1>
- <KEYWORD1>insert-row</KEYWORD1>
- <KEYWORD1>insert-string</KEYWORD1>
- <KEYWORD1>insert-tab</KEYWORD1>
- <KEYWORD1>instantiating-procedure</KEYWORD1>
- <KEYWORD1>integer</KEYWORD1>
- <KEYWORD1>internal-entries</KEYWORD1>
- <KEYWORD1>interval</KEYWORD1>
- <KEYWORD1>into</KEYWORD1>
- <KEYWORD1>invoke</KEYWORD1>
- <KEYWORD1>is</KEYWORD1>
- <KEYWORD1>is-attr-space</KEYWORD1>
- <KEYWORD1>is-codepage-fixed</KEYWORD1>
- <KEYWORD1>is-column-codepage</KEYWORD1>
- <KEYWORD1>is-lead-byte</KEYWORD1>
- <KEYWORD1>is-open</KEYWORD1>
- <KEYWORD1>is-parameter-set</KEYWORD1>
- <KEYWORD1>is-row-selected</KEYWORD1>
- <KEYWORD1>is-selected</KEYWORD1>
- <KEYWORD1>is-xml</KEYWORD1>
- <KEYWORD1>iso-date</KEYWORD1>
- <KEYWORD1>item</KEYWORD1>
- <KEYWORD1>items-per-row</KEYWORD1>
- <KEYWORD1>iteration-changed</KEYWORD1>
- <KEYWORD1>join</KEYWORD1>
- <KEYWORD1>join-by-sqldb</KEYWORD1>
- <KEYWORD1>kblabel</KEYWORD1>
- <KEYWORD1>keep-connection-open</KEYWORD1>
- <KEYWORD1>keep-frame-z-order</KEYWORD1>
- <KEYWORD1>keep-messages</KEYWORD1>
- <KEYWORD1>keep-security-cache</KEYWORD1>
- <KEYWORD1>keep-tab-order</KEYWORD1>
- <KEYWORD1>key</KEYWORD1>
- <KEYWORD1>key-code</KEYWORD1>
- <KEYWORD1>key-function</KEYWORD1>
- <KEYWORD1>key-label</KEYWORD1>
- <KEYWORD1>keycode</KEYWORD1>
- <KEYWORD1>keyfunction</KEYWORD1>
- <KEYWORD1>keylabel</KEYWORD1>
- <KEYWORD1>keys</KEYWORD1>
- <KEYWORD1>keyword</KEYWORD1>
- <KEYWORD1>keyword-all</KEYWORD1>
- <KEYWORD1>label</KEYWORD1>
- <KEYWORD1>label-bgcolor</KEYWORD1>
- <KEYWORD1>label-dcolor</KEYWORD1>
- <KEYWORD1>label-fgcolor</KEYWORD1>
- <KEYWORD1>label-font</KEYWORD1>
- <KEYWORD1>label-pfcolor</KEYWORD1>
- <KEYWORD1>labels</KEYWORD1>
- <KEYWORD1>landscape</KEYWORD1>
- <KEYWORD1>languages</KEYWORD1>
- <KEYWORD1>large</KEYWORD1>
- <KEYWORD1>large-to-small</KEYWORD1>
- <KEYWORD1>last</KEYWORD1>
- <KEYWORD1>last-async-request</KEYWORD1>
- <KEYWORD1>last-child</KEYWORD1>
- <KEYWORD1>last-event</KEYWORD1>
- <KEYWORD1>last-key</KEYWORD1>
- <KEYWORD1>last-of</KEYWORD1>
- <KEYWORD1>last-procedure</KEYWORD1>
- <KEYWORD1>last-server</KEYWORD1>
- <KEYWORD1>last-server-socket</KEYWORD1>
- <KEYWORD1>last-socket</KEYWORD1>
- <KEYWORD1>last-tab-item</KEYWORD1>
- <KEYWORD1>lastkey</KEYWORD1>
- <KEYWORD1>lc</KEYWORD1>
- <KEYWORD1>ldbname</KEYWORD1>
- <KEYWORD1>le</KEYWORD1>
- <KEYWORD1>leading</KEYWORD1>
- <KEYWORD1>left</KEYWORD1>
- <KEYWORD1>left-aligned</KEYWORD1>
- <KEYWORD1>left-end</KEYWORD1>
- <KEYWORD1>left-trim</KEYWORD1>
- <KEYWORD1>length</KEYWORD1>
- <KEYWORD1>library</KEYWORD1>
- <KEYWORD1>like</KEYWORD1>
- <KEYWORD1>line</KEYWORD1>
- <KEYWORD1>line-counter</KEYWORD1>
- <KEYWORD1>line-down</KEYWORD1>
- <KEYWORD1>line-left</KEYWORD1>
- <KEYWORD1>line-right</KEYWORD1>
- <KEYWORD1>line-up</KEYWORD1>
- <KEYWORD1>list-events</KEYWORD1>
- <KEYWORD1>list-item-pairs</KEYWORD1>
- <KEYWORD1>list-items</KEYWORD1>
- <KEYWORD1>list-query-attrs</KEYWORD1>
- <KEYWORD1>list-set-attrs</KEYWORD1>
- <KEYWORD1>list-widgets</KEYWORD1>
- <KEYWORD1>listing</KEYWORD1>
- <KEYWORD1>listings</KEYWORD1>
- <KEYWORD1>literal-question</KEYWORD1>
- <KEYWORD1>little-endian</KEYWORD1>
- <KEYWORD1>load</KEYWORD1>
- <KEYWORD1>load-from</KEYWORD1>
- <KEYWORD1>load-icon</KEYWORD1>
- <KEYWORD1>load-image</KEYWORD1>
- <KEYWORD1>load-image-down</KEYWORD1>
- <KEYWORD1>load-image-insensitive</KEYWORD1>
- <KEYWORD1>load-image-up</KEYWORD1>
- <KEYWORD1>load-mouse-pointer</KEYWORD1>
- <KEYWORD1>load-picture</KEYWORD1>
- <KEYWORD1>load-small-icon</KEYWORD1>
- <KEYWORD1>lob-dir</KEYWORD1>
- <KEYWORD1>local-host</KEYWORD1>
- <KEYWORD1>local-name</KEYWORD1>
- <KEYWORD1>local-port</KEYWORD1>
- <KEYWORD1>locator-column-number</KEYWORD1>
- <KEYWORD1>locator-line-number</KEYWORD1>
- <KEYWORD1>locator-public-id</KEYWORD1>
- <KEYWORD1>locator-system-id</KEYWORD1>
- <KEYWORD1>locator-type</KEYWORD1>
- <KEYWORD1>locked</KEYWORD1>
- <KEYWORD1>log</KEYWORD1>
- <KEYWORD1>log-entry-types</KEYWORD1>
- <KEYWORD1>log-id</KEYWORD1>
- <KEYWORD1>log-manager</KEYWORD1>
- <KEYWORD1>log-threshold</KEYWORD1>
- <KEYWORD1>logfile-name</KEYWORD1>
- <KEYWORD1>logging-level</KEYWORD1>
- <KEYWORD1>logical</KEYWORD1>
- <KEYWORD1>long</KEYWORD1>
- <KEYWORD1>longchar</KEYWORD1>
- <KEYWORD1>longchar-to-node-value</KEYWORD1>
- <KEYWORD1>lookahead</KEYWORD1>
- <KEYWORD1>lookup</KEYWORD1>
- <KEYWORD1>lower</KEYWORD1>
- <KEYWORD1>lt</KEYWORD1>
- <KEYWORD1>machine-class</KEYWORD1>
- <KEYWORD1>main-menu</KEYWORD1>
- <KEYWORD1>mandatory</KEYWORD1>
- <KEYWORD1>manual-highlight</KEYWORD1>
- <KEYWORD1>map</KEYWORD1>
- <KEYWORD1>margin-extra</KEYWORD1>
- <KEYWORD1>margin-height</KEYWORD1>
- <KEYWORD1>margin-height-chars</KEYWORD1>
- <KEYWORD1>margin-height-pixels</KEYWORD1>
- <KEYWORD1>margin-width</KEYWORD1>
- <KEYWORD1>margin-width-chars</KEYWORD1>
- <KEYWORD1>margin-width-pixels</KEYWORD1>
- <KEYWORD1>matches</KEYWORD1>
- <KEYWORD1>max</KEYWORD1>
- <KEYWORD1>max-button</KEYWORD1>
- <KEYWORD1>max-chars</KEYWORD1>
- <KEYWORD1>max-data-guess</KEYWORD1>
- <KEYWORD1>max-height</KEYWORD1>
- <KEYWORD1>max-height-chars</KEYWORD1>
- <KEYWORD1>max-height-pixels</KEYWORD1>
- <KEYWORD1>max-rows</KEYWORD1>
- <KEYWORD1>max-size</KEYWORD1>
- <KEYWORD1>max-value</KEYWORD1>
- <KEYWORD1>max-width</KEYWORD1>
- <KEYWORD1>max-width-chars</KEYWORD1>
- <KEYWORD1>max-width-pixels</KEYWORD1>
- <KEYWORD1>maximize</KEYWORD1>
- <KEYWORD1>maximum</KEYWORD1>
- <KEYWORD1>md5-value</KEYWORD1>
- <KEYWORD1>member</KEYWORD1>
- <KEYWORD1>memptr</KEYWORD1>
- <KEYWORD1>memptr-to-node-value</KEYWORD1>
- <KEYWORD1>menu</KEYWORD1>
- <KEYWORD1>menu-bar</KEYWORD1>
- <KEYWORD1>menu-item</KEYWORD1>
- <KEYWORD1>menu-key</KEYWORD1>
- <KEYWORD1>menu-mouse</KEYWORD1>
- <KEYWORD1>menubar</KEYWORD1>
- <KEYWORD1>merge-changes</KEYWORD1>
- <KEYWORD1>merge-row-changes</KEYWORD1>
- <KEYWORD1>message</KEYWORD1>
- <KEYWORD1>message-area</KEYWORD1>
- <KEYWORD1>message-area-font</KEYWORD1>
- <KEYWORD1>message-line</KEYWORD1>
- <KEYWORD1>message-lines</KEYWORD1>
- <KEYWORD1>min-button</KEYWORD1>
- <KEYWORD1>min-column-width-chars</KEYWORD1>
- <KEYWORD1>min-column-width-pixels</KEYWORD1>
- <KEYWORD1>min-height</KEYWORD1>
- <KEYWORD1>min-height-chars</KEYWORD1>
- <KEYWORD1>min-height-pixels</KEYWORD1>
- <KEYWORD1>min-row-height</KEYWORD1>
- <KEYWORD1>min-row-height-chars</KEYWORD1>
- <KEYWORD1>min-row-height-pixels</KEYWORD1>
- <KEYWORD1>min-schema-marshall</KEYWORD1>
- <KEYWORD1>min-size</KEYWORD1>
- <KEYWORD1>min-value</KEYWORD1>
- <KEYWORD1>min-width</KEYWORD1>
- <KEYWORD1>min-width-chars</KEYWORD1>
- <KEYWORD1>min-width-pixels</KEYWORD1>
- <KEYWORD1>minimum</KEYWORD1>
- <KEYWORD1>mod</KEYWORD1>
- <KEYWORD1>modified</KEYWORD1>
- <KEYWORD1>modulo</KEYWORD1>
- <KEYWORD1>month</KEYWORD1>
- <KEYWORD1>mouse</KEYWORD1>
- <KEYWORD1>mouse-pointer</KEYWORD1>
- <KEYWORD1>movable</KEYWORD1>
- <KEYWORD1>move</KEYWORD1>
- <KEYWORD1>move-after-tab-item</KEYWORD1>
- <KEYWORD1>move-before-tab-item</KEYWORD1>
- <KEYWORD1>move-column</KEYWORD1>
- <KEYWORD1>move-to-bottom</KEYWORD1>
- <KEYWORD1>move-to-eof</KEYWORD1>
- <KEYWORD1>move-to-top</KEYWORD1>
- <KEYWORD1>mpe</KEYWORD1>
- <KEYWORD1>mtime</KEYWORD1>
- <KEYWORD1>multiple</KEYWORD1>
- <KEYWORD1>multiple-key</KEYWORD1>
- <KEYWORD1>multitasking-interval</KEYWORD1>
- <KEYWORD1>must-exist</KEYWORD1>
- <KEYWORD1>must-understand</KEYWORD1>
- <KEYWORD1>name</KEYWORD1>
- <KEYWORD1>namespace-prefix</KEYWORD1>
- <KEYWORD1>namespace-uri</KEYWORD1>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD1>ne</KEYWORD1>
- <KEYWORD1>needs-appserver-prompt</KEYWORD1>
- <KEYWORD1>needs-prompt</KEYWORD1>
- <KEYWORD1>nested</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>new-line</KEYWORD1>
- <KEYWORD1>new-row</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>next-column</KEYWORD1>
- <KEYWORD1>next-error</KEYWORD1>
- <KEYWORD1>next-frame</KEYWORD1>
- <KEYWORD1>next-prompt</KEYWORD1>
- <KEYWORD1>next-sibling</KEYWORD1>
- <KEYWORD1>next-tab-item</KEYWORD1>
- <KEYWORD1>next-value</KEYWORD1>
- <KEYWORD1>next-word</KEYWORD1>
- <KEYWORD1>no</KEYWORD1>
- <KEYWORD1>no-apply</KEYWORD1>
- <KEYWORD1>no-array-message</KEYWORD1>
- <KEYWORD1>no-assign</KEYWORD1>
- <KEYWORD1>no-attr</KEYWORD1>
- <KEYWORD1>no-attr-list</KEYWORD1>
- <KEYWORD1>no-attr-space</KEYWORD1>
- <KEYWORD1>no-auto-validate</KEYWORD1>
- <KEYWORD1>no-bind-where</KEYWORD1>
- <KEYWORD1>no-box</KEYWORD1>
- <KEYWORD1>no-column-scrolling</KEYWORD1>
- <KEYWORD1>no-console</KEYWORD1>
- <KEYWORD1>no-convert</KEYWORD1>
- <KEYWORD1>no-convert-3d-colors</KEYWORD1>
- <KEYWORD1>no-current-value</KEYWORD1>
- <KEYWORD1>no-debug</KEYWORD1>
- <KEYWORD1>no-drag</KEYWORD1>
- <KEYWORD1>no-echo</KEYWORD1>
- <KEYWORD1>no-empty-space</KEYWORD1>
- <KEYWORD1>no-error</KEYWORD1>
- <KEYWORD1>no-fill</KEYWORD1>
- <KEYWORD1>no-focus</KEYWORD1>
- <KEYWORD1>no-help</KEYWORD1>
- <KEYWORD1>no-hide</KEYWORD1>
- <KEYWORD1>no-index-hint</KEYWORD1>
- <KEYWORD1>no-join-by-sqldb</KEYWORD1>
- <KEYWORD1>no-labels</KEYWORD1>
- <KEYWORD1>no-lobs</KEYWORD1>
- <KEYWORD1>no-lock</KEYWORD1>
- <KEYWORD1>no-lookahead</KEYWORD1>
- <KEYWORD1>no-map</KEYWORD1>
- <KEYWORD1>no-message</KEYWORD1>
- <KEYWORD1>no-pause</KEYWORD1>
- <KEYWORD1>no-prefetch</KEYWORD1>
- <KEYWORD1>no-return-value</KEYWORD1>
- <KEYWORD1>no-row-markers</KEYWORD1>
- <KEYWORD1>no-schema-marshall</KEYWORD1>
- <KEYWORD1>no-scrollbar-vertical</KEYWORD1>
- <KEYWORD1>no-scrolling</KEYWORD1>
- <KEYWORD1>no-separate-connection</KEYWORD1>
- <KEYWORD1>no-separators</KEYWORD1>
- <KEYWORD1>no-tab-stop</KEYWORD1>
- <KEYWORD1>no-underline</KEYWORD1>
- <KEYWORD1>no-undo</KEYWORD1>
- <KEYWORD1>no-validate</KEYWORD1>
- <KEYWORD1>no-wait</KEYWORD1>
- <KEYWORD1>no-word-wrap</KEYWORD1>
- <KEYWORD1>node-type</KEYWORD1>
- <KEYWORD1>node-value</KEYWORD1>
- <KEYWORD1>node-value-to-longchar</KEYWORD1>
- <KEYWORD1>node-value-to-memptr</KEYWORD1>
- <KEYWORD1>none</KEYWORD1>
- <KEYWORD1>normalize</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>now</KEYWORD1>
- <KEYWORD1>null</KEYWORD1>
- <KEYWORD1>num-aliases</KEYWORD1>
- <KEYWORD1>num-buffers</KEYWORD1>
- <KEYWORD1>num-buttons</KEYWORD1>
- <KEYWORD1>num-child-relations</KEYWORD1>
- <KEYWORD1>num-children</KEYWORD1>
- <KEYWORD1>num-columns</KEYWORD1>
- <KEYWORD1>num-copies</KEYWORD1>
- <KEYWORD1>num-dbs</KEYWORD1>
- <KEYWORD1>num-dropped-files</KEYWORD1>
- <KEYWORD1>num-entries</KEYWORD1>
- <KEYWORD1>num-fields</KEYWORD1>
- <KEYWORD1>num-formats</KEYWORD1>
- <KEYWORD1>num-header-entries</KEYWORD1>
- <KEYWORD1>num-items</KEYWORD1>
- <KEYWORD1>num-iterations</KEYWORD1>
- <KEYWORD1>num-lines</KEYWORD1>
- <KEYWORD1>num-locked-columns</KEYWORD1>
- <KEYWORD1>num-log-files</KEYWORD1>
- <KEYWORD1>num-messages</KEYWORD1>
- <KEYWORD1>num-parameters</KEYWORD1>
- <KEYWORD1>num-relations</KEYWORD1>
- <KEYWORD1>num-replaced</KEYWORD1>
- <KEYWORD1>num-results</KEYWORD1>
- <KEYWORD1>num-selected</KEYWORD1>
- <KEYWORD1>num-selected-rows</KEYWORD1>
- <KEYWORD1>num-selected-widgets</KEYWORD1>
- <KEYWORD1>num-source-buffers</KEYWORD1>
- <KEYWORD1>num-tabs</KEYWORD1>
- <KEYWORD1>num-to-retain</KEYWORD1>
- <KEYWORD1>num-top-buffers</KEYWORD1>
- <KEYWORD1>num-visible-columns</KEYWORD1>
- <KEYWORD1>numeric</KEYWORD1>
- <KEYWORD1>numeric-decimal-point</KEYWORD1>
- <KEYWORD1>numeric-format</KEYWORD1>
- <KEYWORD1>numeric-separator</KEYWORD1>
- <KEYWORD1>object</KEYWORD1>
- <KEYWORD1>octet_length</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>off</KEYWORD1>
- <KEYWORD1>ok</KEYWORD1>
- <KEYWORD1>ok-cancel</KEYWORD1>
- <KEYWORD1>old</KEYWORD1>
- <KEYWORD1>ole-invoke-locale</KEYWORD1>
- <KEYWORD1>ole-names-locale</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>on-frame-border</KEYWORD1>
- <KEYWORD1>open</KEYWORD1>
- <KEYWORD1>open-line-above</KEYWORD1>
- <KEYWORD1>opsys</KEYWORD1>
- <KEYWORD1>option</KEYWORD1>
- <KEYWORD1>options</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>ordered-join</KEYWORD1>
- <KEYWORD1>ordinal</KEYWORD1>
- <KEYWORD1>orientation</KEYWORD1>
- <KEYWORD1>origin-handle</KEYWORD1>
- <KEYWORD1>origin-rowid</KEYWORD1>
- <KEYWORD1>os-append</KEYWORD1>
- <KEYWORD1>os-command</KEYWORD1>
- <KEYWORD1>os-copy</KEYWORD1>
- <KEYWORD1>os-create-dir</KEYWORD1>
- <KEYWORD1>os-delete</KEYWORD1>
- <KEYWORD1>os-dir</KEYWORD1>
- <KEYWORD1>os-drives</KEYWORD1>
- <KEYWORD1>os-error</KEYWORD1>
- <KEYWORD1>os-getenv</KEYWORD1>
- <KEYWORD1>os-rename</KEYWORD1>
- <KEYWORD1>os2</KEYWORD1>
- <KEYWORD1>os400</KEYWORD1>
- <KEYWORD1>otherwise</KEYWORD1>
- <KEYWORD1>out-of-data</KEYWORD1>
- <KEYWORD1>outer</KEYWORD1>
- <KEYWORD1>outer-join</KEYWORD1>
- <KEYWORD1>output</KEYWORD1>
- <KEYWORD1>overlay</KEYWORD1>
- <KEYWORD1>override</KEYWORD1>
- <KEYWORD1>owner</KEYWORD1>
- <KEYWORD1>owner-document</KEYWORD1>
- <KEYWORD1>page</KEYWORD1>
- <KEYWORD1>page-bottom</KEYWORD1>
- <KEYWORD1>page-down</KEYWORD1>
- <KEYWORD1>page-left</KEYWORD1>
- <KEYWORD1>page-number</KEYWORD1>
- <KEYWORD1>page-right</KEYWORD1>
- <KEYWORD1>page-right-text</KEYWORD1>
- <KEYWORD1>page-size</KEYWORD1>
- <KEYWORD1>page-top</KEYWORD1>
- <KEYWORD1>page-up</KEYWORD1>
- <KEYWORD1>page-width</KEYWORD1>
- <KEYWORD1>paged</KEYWORD1>
- <KEYWORD1>parameter</KEYWORD1>
- <KEYWORD1>parent</KEYWORD1>
- <KEYWORD1>parent-buffer</KEYWORD1>
- <KEYWORD1>parent-relation</KEYWORD1>
- <KEYWORD1>parse-status</KEYWORD1>
- <KEYWORD1>partial-key</KEYWORD1>
- <KEYWORD1>pascal</KEYWORD1>
- <KEYWORD1>password-field</KEYWORD1>
- <KEYWORD1>paste</KEYWORD1>
- <KEYWORD1>pathname</KEYWORD1>
- <KEYWORD1>pause</KEYWORD1>
- <KEYWORD1>pdbname</KEYWORD1>
- <KEYWORD1>performance</KEYWORD1>
- <KEYWORD1>persistent</KEYWORD1>
- <KEYWORD1>persistent-cache-disabled</KEYWORD1>
- <KEYWORD1>persistent-procedure</KEYWORD1>
- <KEYWORD1>pfcolor</KEYWORD1>
- <KEYWORD1>pick</KEYWORD1>
- <KEYWORD1>pick-area</KEYWORD1>
- <KEYWORD1>pick-both</KEYWORD1>
- <KEYWORD1>pixels</KEYWORD1>
- <KEYWORD1>pixels-per-column</KEYWORD1>
- <KEYWORD1>pixels-per-row</KEYWORD1>
- <KEYWORD1>popup-menu</KEYWORD1>
- <KEYWORD1>popup-only</KEYWORD1>
- <KEYWORD1>portrait</KEYWORD1>
- <KEYWORD1>position</KEYWORD1>
- <KEYWORD1>precision</KEYWORD1>
- <KEYWORD1>prepare-string</KEYWORD1>
- <KEYWORD1>prepared</KEYWORD1>
- <KEYWORD1>preprocess</KEYWORD1>
- <KEYWORD1>preselect</KEYWORD1>
- <KEYWORD1>prev</KEYWORD1>
- <KEYWORD1>prev-column</KEYWORD1>
- <KEYWORD1>prev-frame</KEYWORD1>
- <KEYWORD1>prev-sibling</KEYWORD1>
- <KEYWORD1>prev-tab-item</KEYWORD1>
- <KEYWORD1>prev-word</KEYWORD1>
- <KEYWORD1>primary</KEYWORD1>
- <KEYWORD1>printer</KEYWORD1>
- <KEYWORD1>printer-control-handle</KEYWORD1>
- <KEYWORD1>printer-hdc</KEYWORD1>
- <KEYWORD1>printer-name</KEYWORD1>
- <KEYWORD1>printer-port</KEYWORD1>
- <KEYWORD1>printer-setup</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>private-data</KEYWORD1>
- <KEYWORD1>privileges</KEYWORD1>
- <KEYWORD1>proc-handle</KEYWORD1>
- <KEYWORD1>proc-status</KEYWORD1>
- <KEYWORD1>procedure</KEYWORD1>
- <KEYWORD1>procedure-call-type</KEYWORD1>
- <KEYWORD1>procedure-name</KEYWORD1>
- <KEYWORD1>process</KEYWORD1>
- <KEYWORD1>profile-file</KEYWORD1>
- <KEYWORD1>profiler</KEYWORD1>
- <KEYWORD1>profiling</KEYWORD1>
- <KEYWORD1>program-name</KEYWORD1>
- <KEYWORD1>progress</KEYWORD1>
- <KEYWORD1>progress-source</KEYWORD1>
- <KEYWORD1>prompt</KEYWORD1>
- <KEYWORD1>prompt-for</KEYWORD1>
- <KEYWORD1>promsgs</KEYWORD1>
- <KEYWORD1>propath</KEYWORD1>
- <KEYWORD1>proversion</KEYWORD1>
- <KEYWORD1>proxy</KEYWORD1>
- <KEYWORD1>proxy-password</KEYWORD1>
- <KEYWORD1>proxy-userid</KEYWORD1>
- <KEYWORD1>public-id</KEYWORD1>
- <KEYWORD1>publish</KEYWORD1>
- <KEYWORD1>published-events</KEYWORD1>
- <KEYWORD1>put</KEYWORD1>
- <KEYWORD1>put-bits</KEYWORD1>
- <KEYWORD1>put-byte</KEYWORD1>
- <KEYWORD1>put-bytes</KEYWORD1>
- <KEYWORD1>put-double</KEYWORD1>
- <KEYWORD1>put-float</KEYWORD1>
- <KEYWORD1>put-key-value</KEYWORD1>
- <KEYWORD1>put-long</KEYWORD1>
- <KEYWORD1>put-short</KEYWORD1>
- <KEYWORD1>put-string</KEYWORD1>
- <KEYWORD1>put-unsigned-short</KEYWORD1>
- <KEYWORD1>putbyte</KEYWORD1>
- <KEYWORD1>query</KEYWORD1>
- <KEYWORD1>query-close</KEYWORD1>
- <KEYWORD1>query-off-end</KEYWORD1>
- <KEYWORD1>query-open</KEYWORD1>
- <KEYWORD1>query-prepare</KEYWORD1>
- <KEYWORD1>query-tuning</KEYWORD1>
- <KEYWORD1>question</KEYWORD1>
- <KEYWORD1>quit</KEYWORD1>
- <KEYWORD1>quoter</KEYWORD1>
- <KEYWORD1>r-index</KEYWORD1>
- <KEYWORD1>radio-buttons</KEYWORD1>
- <KEYWORD1>radio-set</KEYWORD1>
- <KEYWORD1>random</KEYWORD1>
- <KEYWORD1>raw</KEYWORD1>
- <KEYWORD1>raw-transfer</KEYWORD1>
- <KEYWORD1>rcode-information</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>read-available</KEYWORD1>
- <KEYWORD1>read-exact-num</KEYWORD1>
- <KEYWORD1>read-file</KEYWORD1>
- <KEYWORD1>read-only</KEYWORD1>
- <KEYWORD1>readkey</KEYWORD1>
- <KEYWORD1>real</KEYWORD1>
- <KEYWORD1>recid</KEYWORD1>
- <KEYWORD1>record-length</KEYWORD1>
- <KEYWORD1>rectangle</KEYWORD1>
- <KEYWORD1>recursive</KEYWORD1>
- <KEYWORD1>refresh</KEYWORD1>
- <KEYWORD1>refreshable</KEYWORD1>
- <KEYWORD1>reject-changes</KEYWORD1>
- <KEYWORD1>reject-row-changes</KEYWORD1>
- <KEYWORD1>rejected</KEYWORD1>
- <KEYWORD1>relation-fields</KEYWORD1>
- <KEYWORD1>relations-active</KEYWORD1>
- <KEYWORD1>release</KEYWORD1>
- <KEYWORD1>remote</KEYWORD1>
- <KEYWORD1>remote-host</KEYWORD1>
- <KEYWORD1>remote-port</KEYWORD1>
- <KEYWORD1>remove-attribute</KEYWORD1>
- <KEYWORD1>remove-child</KEYWORD1>
- <KEYWORD1>remove-events-procedure</KEYWORD1>
- <KEYWORD1>remove-super-procedure</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>replace</KEYWORD1>
- <KEYWORD1>replace-child</KEYWORD1>
- <KEYWORD1>replace-selection-text</KEYWORD1>
- <KEYWORD1>replication-create</KEYWORD1>
- <KEYWORD1>replication-delete</KEYWORD1>
- <KEYWORD1>replication-write</KEYWORD1>
- <KEYWORD1>reports</KEYWORD1>
- <KEYWORD1>reposition</KEYWORD1>
- <KEYWORD1>reposition-backwards</KEYWORD1>
- <KEYWORD1>reposition-forwards</KEYWORD1>
- <KEYWORD1>reposition-mode</KEYWORD1>
- <KEYWORD1>reposition-parent-relation</KEYWORD1>
- <KEYWORD1>reposition-to-row</KEYWORD1>
- <KEYWORD1>reposition-to-rowid</KEYWORD1>
- <KEYWORD1>request</KEYWORD1>
- <KEYWORD1>resizable</KEYWORD1>
- <KEYWORD1>resize</KEYWORD1>
- <KEYWORD1>result</KEYWORD1>
- <KEYWORD1>resume-display</KEYWORD1>
- <KEYWORD1>retain</KEYWORD1>
- <KEYWORD1>retain-shape</KEYWORD1>
- <KEYWORD1>retry</KEYWORD1>
- <KEYWORD1>retry-cancel</KEYWORD1>
- <KEYWORD1>return-inserted</KEYWORD1>
- <KEYWORD1>return-to-start-dir</KEYWORD1>
- <KEYWORD1>return-value</KEYWORD1>
- <KEYWORD1>return-value-data-type</KEYWORD1>
- <KEYWORD1>returns</KEYWORD1>
- <KEYWORD1>reverse-from</KEYWORD1>
- <KEYWORD1>revert</KEYWORD1>
- <KEYWORD1>revoke</KEYWORD1>
- <KEYWORD1>rgb-value</KEYWORD1>
- <KEYWORD1>right</KEYWORD1>
- <KEYWORD1>right-aligned</KEYWORD1>
- <KEYWORD1>right-end</KEYWORD1>
- <KEYWORD1>right-trim</KEYWORD1>
- <KEYWORD1>round</KEYWORD1>
- <KEYWORD1>row</KEYWORD1>
- <KEYWORD1>row-created</KEYWORD1>
- <KEYWORD1>row-deleted</KEYWORD1>
- <KEYWORD1>row-height</KEYWORD1>
- <KEYWORD1>row-height-chars</KEYWORD1>
- <KEYWORD1>row-height-pixels</KEYWORD1>
- <KEYWORD1>row-markers</KEYWORD1>
- <KEYWORD1>row-modified</KEYWORD1>
- <KEYWORD1>row-of</KEYWORD1>
- <KEYWORD1>row-resizable</KEYWORD1>
- <KEYWORD1>row-state</KEYWORD1>
- <KEYWORD1>row-unmodified</KEYWORD1>
- <KEYWORD1>rowid</KEYWORD1>
- <KEYWORD1>rule</KEYWORD1>
- <KEYWORD1>rule-row</KEYWORD1>
- <KEYWORD1>rule-y</KEYWORD1>
- <KEYWORD1>run</KEYWORD1>
- <KEYWORD1>run-procedure</KEYWORD1>
- <KEYWORD1>save</KEYWORD1>
- <KEYWORD1>save-as</KEYWORD1>
- <KEYWORD1>save-file</KEYWORD1>
- <KEYWORD1>save-row-changes</KEYWORD1>
- <KEYWORD1>save-where-string</KEYWORD1>
- <KEYWORD1>sax-attributes</KEYWORD1>
- <KEYWORD1>sax-complete</KEYWORD1>
- <KEYWORD1>sax-parse</KEYWORD1>
- <KEYWORD1>sax-parse-first</KEYWORD1>
- <KEYWORD1>sax-parse-next</KEYWORD1>
- <KEYWORD1>sax-parser-error</KEYWORD1>
- <KEYWORD1>sax-reader</KEYWORD1>
- <KEYWORD1>sax-running</KEYWORD1>
- <KEYWORD1>sax-uninitialized</KEYWORD1>
- <KEYWORD1>sax-xml</KEYWORD1>
- <KEYWORD1>schema</KEYWORD1>
- <KEYWORD1>schema-change</KEYWORD1>
- <KEYWORD1>schema-path</KEYWORD1>
- <KEYWORD1>screen</KEYWORD1>
- <KEYWORD1>screen-io</KEYWORD1>
- <KEYWORD1>screen-lines</KEYWORD1>
- <KEYWORD1>screen-value</KEYWORD1>
- <KEYWORD1>scroll</KEYWORD1>
- <KEYWORD1>scroll-bars</KEYWORD1>
- <KEYWORD1>scroll-delta</KEYWORD1>
- <KEYWORD1>scroll-left</KEYWORD1>
- <KEYWORD1>scroll-mode</KEYWORD1>
- <KEYWORD1>scroll-offset</KEYWORD1>
- <KEYWORD1>scroll-right</KEYWORD1>
- <KEYWORD1>scroll-to-current-row</KEYWORD1>
- <KEYWORD1>scroll-to-item</KEYWORD1>
- <KEYWORD1>scroll-to-selected-row</KEYWORD1>
- <KEYWORD1>scrollable</KEYWORD1>
- <KEYWORD1>scrollbar-drag</KEYWORD1>
- <KEYWORD1>scrollbar-horizontal</KEYWORD1>
- <KEYWORD1>scrollbar-vertical</KEYWORD1>
- <KEYWORD1>scrolled-row-position</KEYWORD1>
- <KEYWORD1>scrolling</KEYWORD1>
- <KEYWORD1>sdbname</KEYWORD1>
- <KEYWORD1>search</KEYWORD1>
- <KEYWORD1>search-self</KEYWORD1>
- <KEYWORD1>search-target</KEYWORD1>
- <KEYWORD1>section</KEYWORD1>
- <KEYWORD1>seek</KEYWORD1>
- <KEYWORD1>select-all</KEYWORD1>
- <KEYWORD1>select-extend</KEYWORD1>
- <KEYWORD1>select-focused-row</KEYWORD1>
- <KEYWORD1>select-next-row</KEYWORD1>
- <KEYWORD1>select-prev-row</KEYWORD1>
- <KEYWORD1>select-repositioned-row</KEYWORD1>
- <KEYWORD1>select-row</KEYWORD1>
- <KEYWORD1>selectable</KEYWORD1>
- <KEYWORD1>selected</KEYWORD1>
- <KEYWORD1>selected-items</KEYWORD1>
- <KEYWORD1>selection-end</KEYWORD1>
- <KEYWORD1>selection-extend</KEYWORD1>
- <KEYWORD1>selection-list</KEYWORD1>
- <KEYWORD1>selection-start</KEYWORD1>
- <KEYWORD1>selection-text</KEYWORD1>
- <KEYWORD1>self</KEYWORD1>
- <KEYWORD1>send</KEYWORD1>
- <KEYWORD1>sensitive</KEYWORD1>
- <KEYWORD1>separate-connection</KEYWORD1>
- <KEYWORD1>separator-fgcolor</KEYWORD1>
- <KEYWORD1>separators</KEYWORD1>
- <KEYWORD1>server</KEYWORD1>
- <KEYWORD1>server-connection-bound</KEYWORD1>
- <KEYWORD1>server-connection-bound-request</KEYWORD1>
- <KEYWORD1>server-connection-context</KEYWORD1>
- <KEYWORD1>server-connection-id</KEYWORD1>
- <KEYWORD1>server-operating-mode</KEYWORD1>
- <KEYWORD1>server-socket</KEYWORD1>
- <KEYWORD1>session</KEYWORD1>
- <KEYWORD1>session-end</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>set-actor</KEYWORD1>
- <KEYWORD1>set-attr-call-type</KEYWORD1>
- <KEYWORD1>set-attribute</KEYWORD1>
- <KEYWORD1>set-attribute-node</KEYWORD1>
- <KEYWORD1>set-blue-value</KEYWORD1>
- <KEYWORD1>set-break</KEYWORD1>
- <KEYWORD1>set-buffers</KEYWORD1>
- <KEYWORD1>set-byte-order</KEYWORD1>
- <KEYWORD1>set-callback-procedure</KEYWORD1>
- <KEYWORD1>set-cell-focus</KEYWORD1>
- <KEYWORD1>set-commit</KEYWORD1>
- <KEYWORD1>set-connect-procedure</KEYWORD1>
- <KEYWORD1>set-contents</KEYWORD1>
- <KEYWORD1>set-dynamic</KEYWORD1>
- <KEYWORD1>set-green-value</KEYWORD1>
- <KEYWORD1>set-input-source</KEYWORD1>
- <KEYWORD1>set-must-understand</KEYWORD1>
- <KEYWORD1>set-node</KEYWORD1>
- <KEYWORD1>set-numeric-format</KEYWORD1>
- <KEYWORD1>set-parameter</KEYWORD1>
- <KEYWORD1>set-pointer-value</KEYWORD1>
- <KEYWORD1>set-read-response-procedure</KEYWORD1>
- <KEYWORD1>set-red-value</KEYWORD1>
- <KEYWORD1>set-repositioned-row</KEYWORD1>
- <KEYWORD1>set-rgb-value</KEYWORD1>
- <KEYWORD1>set-rollback</KEYWORD1>
- <KEYWORD1>set-selection</KEYWORD1>
- <KEYWORD1>set-serialized</KEYWORD1>
- <KEYWORD1>set-size</KEYWORD1>
- <KEYWORD1>set-socket-option</KEYWORD1>
- <KEYWORD1>set-wait-state</KEYWORD1>
- <KEYWORD1>settings</KEYWORD1>
- <KEYWORD1>setuserid</KEYWORD1>
- <KEYWORD1>share-lock</KEYWORD1>
- <KEYWORD1>shared</KEYWORD1>
- <KEYWORD1>short</KEYWORD1>
- <KEYWORD1>show-in-taskbar</KEYWORD1>
- <KEYWORD1>show-stats</KEYWORD1>
- <KEYWORD1>side-label</KEYWORD1>
- <KEYWORD1>side-label-handle</KEYWORD1>
- <KEYWORD1>side-labels</KEYWORD1>
- <KEYWORD1>silent</KEYWORD1>
- <KEYWORD1>simple</KEYWORD1>
- <KEYWORD1>single</KEYWORD1>
- <KEYWORD1>size</KEYWORD1>
- <KEYWORD1>size-chars</KEYWORD1>
- <KEYWORD1>size-pixels</KEYWORD1>
- <KEYWORD1>skip</KEYWORD1>
- <KEYWORD1>skip-deleted-record</KEYWORD1>
- <KEYWORD1>skip-schema-check</KEYWORD1>
- <KEYWORD1>slider</KEYWORD1>
- <KEYWORD1>small-icon</KEYWORD1>
- <KEYWORD1>small-title</KEYWORD1>
- <KEYWORD1>smallint</KEYWORD1>
- <KEYWORD1>soap-fault</KEYWORD1>
- <KEYWORD1>soap-fault-actor</KEYWORD1>
- <KEYWORD1>soap-fault-code</KEYWORD1>
- <KEYWORD1>soap-fault-detail</KEYWORD1>
- <KEYWORD1>soap-fault-string</KEYWORD1>
- <KEYWORD1>soap-header</KEYWORD1>
- <KEYWORD1>soap-header-entryref</KEYWORD1>
- <KEYWORD1>socket</KEYWORD1>
- <KEYWORD1>some</KEYWORD1>
- <KEYWORD1>sort</KEYWORD1>
- <KEYWORD1>source</KEYWORD1>
- <KEYWORD1>source-procedure</KEYWORD1>
- <KEYWORD1>space</KEYWORD1>
- <KEYWORD1>sql</KEYWORD1>
- <KEYWORD1>sqrt</KEYWORD1>
- <KEYWORD1>start</KEYWORD1>
- <KEYWORD1>start-extend-box-selection</KEYWORD1>
- <KEYWORD1>start-row-resize</KEYWORD1>
- <KEYWORD1>starting</KEYWORD1>
- <KEYWORD1>startup-parameters</KEYWORD1>
- <KEYWORD1>status</KEYWORD1>
- <KEYWORD1>status-area</KEYWORD1>
- <KEYWORD1>status-area-font</KEYWORD1>
- <KEYWORD1>stdcall</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>stop-display</KEYWORD1>
- <KEYWORD1>stop-parsing</KEYWORD1>
- <KEYWORD1>stopped</KEYWORD1>
- <KEYWORD1>stored-procedure</KEYWORD1>
- <KEYWORD1>stream</KEYWORD1>
- <KEYWORD1>stream-io</KEYWORD1>
- <KEYWORD1>stretch-to-fit</KEYWORD1>
- <KEYWORD1>string</KEYWORD1>
- <KEYWORD1>string-value</KEYWORD1>
- <KEYWORD1>string-xref</KEYWORD1>
- <KEYWORD1>sub-average</KEYWORD1>
- <KEYWORD1>sub-count</KEYWORD1>
- <KEYWORD1>sub-maximum</KEYWORD1>
- <KEYWORD1>sub-menu</KEYWORD1>
- <KEYWORD1>sub-menu-help</KEYWORD1>
- <KEYWORD1>sub-minimum</KEYWORD1>
- <KEYWORD1>sub-total</KEYWORD1>
- <KEYWORD1>subscribe</KEYWORD1>
- <KEYWORD1>substitute</KEYWORD1>
- <KEYWORD1>substring</KEYWORD1>
- <KEYWORD1>subtype</KEYWORD1>
- <KEYWORD1>sum</KEYWORD1>
- <KEYWORD1>summary</KEYWORD1>
- <KEYWORD1>super</KEYWORD1>
- <KEYWORD1>super-procedures</KEYWORD1>
- <KEYWORD1>suppress-namespace-processing</KEYWORD1>
- <KEYWORD1>suppress-warnings</KEYWORD1>
- <KEYWORD1>synchronize</KEYWORD1>
- <KEYWORD1>system-alert-boxes</KEYWORD1>
- <KEYWORD1>system-dialog</KEYWORD1>
- <KEYWORD1>system-help</KEYWORD1>
- <KEYWORD1>system-id</KEYWORD1>
- <KEYWORD1>tab-position</KEYWORD1>
- <KEYWORD1>tab-stop</KEYWORD1>
- <KEYWORD1>table</KEYWORD1>
- <KEYWORD1>table-crc-list</KEYWORD1>
- <KEYWORD1>table-handle</KEYWORD1>
- <KEYWORD1>table-list</KEYWORD1>
- <KEYWORD1>table-number</KEYWORD1>
- <KEYWORD1>target</KEYWORD1>
- <KEYWORD1>target-procedure</KEYWORD1>
- <KEYWORD1>temp-directory</KEYWORD1>
- <KEYWORD1>temp-table</KEYWORD1>
- <KEYWORD1>temp-table-prepare</KEYWORD1>
- <KEYWORD1>term</KEYWORD1>
- <KEYWORD1>terminal</KEYWORD1>
- <KEYWORD1>terminate</KEYWORD1>
- <KEYWORD1>text</KEYWORD1>
- <KEYWORD1>text-cursor</KEYWORD1>
- <KEYWORD1>text-seg-growth</KEYWORD1>
- <KEYWORD1>text-selected</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>this-procedure</KEYWORD1>
- <KEYWORD1>three-d</KEYWORD1>
- <KEYWORD1>through</KEYWORD1>
- <KEYWORD1>thru</KEYWORD1>
- <KEYWORD1>tic-marks</KEYWORD1>
- <KEYWORD1>time</KEYWORD1>
- <KEYWORD1>time-source</KEYWORD1>
- <KEYWORD1>timezone</KEYWORD1>
- <KEYWORD1>title</KEYWORD1>
- <KEYWORD1>title-bgcolor</KEYWORD1>
- <KEYWORD1>title-dcolor</KEYWORD1>
- <KEYWORD1>title-fgcolor</KEYWORD1>
- <KEYWORD1>title-font</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>to-rowid</KEYWORD1>
- <KEYWORD1>today</KEYWORD1>
- <KEYWORD1>toggle-box</KEYWORD1>
- <KEYWORD1>tooltip</KEYWORD1>
- <KEYWORD1>tooltips</KEYWORD1>
- <KEYWORD1>top</KEYWORD1>
- <KEYWORD1>top-column</KEYWORD1>
- <KEYWORD1>top-only</KEYWORD1>
- <KEYWORD1>topic</KEYWORD1>
- <KEYWORD1>total</KEYWORD1>
- <KEYWORD1>trace-filter</KEYWORD1>
- <KEYWORD1>tracing</KEYWORD1>
- <KEYWORD1>tracking-changes</KEYWORD1>
- <KEYWORD1>trailing</KEYWORD1>
- <KEYWORD1>trans</KEYWORD1>
- <KEYWORD1>trans-init-procedure</KEYWORD1>
- <KEYWORD1>transaction</KEYWORD1>
- <KEYWORD1>transaction-mode</KEYWORD1>
- <KEYWORD1>transparent</KEYWORD1>
- <KEYWORD1>trigger</KEYWORD1>
- <KEYWORD1>triggers</KEYWORD1>
- <KEYWORD1>trim</KEYWORD1>
- <KEYWORD1>true</KEYWORD1>
- <KEYWORD1>truncate</KEYWORD1>
- <KEYWORD1>ttcodepage</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
- <KEYWORD1>unbuffered</KEYWORD1>
- <KEYWORD1>underline</KEYWORD1>
- <KEYWORD1>undo</KEYWORD1>
- <KEYWORD1>unformatted</KEYWORD1>
- <KEYWORD1>union</KEYWORD1>
- <KEYWORD1>unique</KEYWORD1>
- <KEYWORD1>unique-id</KEYWORD1>
- <KEYWORD1>unique-match</KEYWORD1>
- <KEYWORD1>unix</KEYWORD1>
- <KEYWORD1>unix-end</KEYWORD1>
- <KEYWORD1>unless-hidden</KEYWORD1>
- <KEYWORD1>unload</KEYWORD1>
- <KEYWORD1>unsigned-short</KEYWORD1>
- <KEYWORD1>unsubscribe</KEYWORD1>
- <KEYWORD1>up</KEYWORD1>
- <KEYWORD1>update</KEYWORD1>
- <KEYWORD1>upper</KEYWORD1>
- <KEYWORD1>url</KEYWORD1>
- <KEYWORD1>url-decode</KEYWORD1>
- <KEYWORD1>url-encode</KEYWORD1>
- <KEYWORD1>url-password</KEYWORD1>
- <KEYWORD1>url-userid</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
- <KEYWORD1>use-dict-exps</KEYWORD1>
- <KEYWORD1>use-filename</KEYWORD1>
- <KEYWORD1>use-index</KEYWORD1>
- <KEYWORD1>use-revvideo</KEYWORD1>
- <KEYWORD1>use-text</KEYWORD1>
- <KEYWORD1>use-underline</KEYWORD1>
- <KEYWORD1>user</KEYWORD1>
- <KEYWORD1>user-data</KEYWORD1>
- <KEYWORD1>userid</KEYWORD1>
- <KEYWORD1>using</KEYWORD1>
- <KEYWORD1>utc-offset</KEYWORD1>
- <KEYWORD1>v6display</KEYWORD1>
- <KEYWORD1>v6frame</KEYWORD1>
- <KEYWORD1>valid-event</KEYWORD1>
- <KEYWORD1>valid-handle</KEYWORD1>
- <KEYWORD1>validate</KEYWORD1>
- <KEYWORD1>validate-expression</KEYWORD1>
- <KEYWORD1>validate-message</KEYWORD1>
- <KEYWORD1>validate-xml</KEYWORD1>
- <KEYWORD1>validation-enabled</KEYWORD1>
- <KEYWORD1>value</KEYWORD1>
- <KEYWORD1>values</KEYWORD1>
- <KEYWORD1>variable</KEYWORD1>
- <KEYWORD1>verbose</KEYWORD1>
- <KEYWORD1>vertical</KEYWORD1>
- <KEYWORD1>view</KEYWORD1>
- <KEYWORD1>view-as</KEYWORD1>
- <KEYWORD1>view-first-column-on-reopen</KEYWORD1>
- <KEYWORD1>virtual-height</KEYWORD1>
- <KEYWORD1>virtual-height-chars</KEYWORD1>
- <KEYWORD1>virtual-height-pixels</KEYWORD1>
- <KEYWORD1>virtual-width</KEYWORD1>
- <KEYWORD1>virtual-width-chars</KEYWORD1>
- <KEYWORD1>virtual-width-pixels</KEYWORD1>
- <KEYWORD1>visible</KEYWORD1>
- <KEYWORD1>vms</KEYWORD1>
- <KEYWORD1>wait</KEYWORD1>
- <KEYWORD1>wait-for</KEYWORD1>
- <KEYWORD1>warning</KEYWORD1>
- <KEYWORD1>web-context</KEYWORD1>
- <KEYWORD1>web-notify</KEYWORD1>
- <KEYWORD1>weekday</KEYWORD1>
- <KEYWORD1>when</KEYWORD1>
- <KEYWORD1>where</KEYWORD1>
- <KEYWORD1>where-string</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>widget</KEYWORD1>
- <KEYWORD1>widget-enter</KEYWORD1>
- <KEYWORD1>widget-handle</KEYWORD1>
- <KEYWORD1>widget-leave</KEYWORD1>
- <KEYWORD1>widget-pool</KEYWORD1>
- <KEYWORD1>width</KEYWORD1>
- <KEYWORD1>width-chars</KEYWORD1>
- <KEYWORD1>width-pixels</KEYWORD1>
- <KEYWORD1>window</KEYWORD1>
- <KEYWORD1>window-delayed-minimize</KEYWORD1>
- <KEYWORD1>window-name</KEYWORD1>
- <KEYWORD1>window-normal</KEYWORD1>
- <KEYWORD1>window-state</KEYWORD1>
- <KEYWORD1>window-system</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
- <KEYWORD1>word-index</KEYWORD1>
- <KEYWORD1>word-wrap</KEYWORD1>
- <KEYWORD1>work-area-height-pixels</KEYWORD1>
- <KEYWORD1>work-area-width-pixels</KEYWORD1>
- <KEYWORD1>work-area-x</KEYWORD1>
- <KEYWORD1>work-area-y</KEYWORD1>
- <KEYWORD1>work-table</KEYWORD1>
- <KEYWORD1>workfile</KEYWORD1>
- <KEYWORD1>write</KEYWORD1>
- <KEYWORD1>write-data</KEYWORD1>
- <KEYWORD1>x</KEYWORD1>
- <KEYWORD1>x-document</KEYWORD1>
- <KEYWORD1>x-noderef</KEYWORD1>
- <KEYWORD1>x-of</KEYWORD1>
- <KEYWORD1>xcode</KEYWORD1>
- <KEYWORD1>xml-schema-path</KEYWORD1>
- <KEYWORD1>xml-suppress-namespace-processing</KEYWORD1>
- <KEYWORD1>xref</KEYWORD1>
- <KEYWORD1>y</KEYWORD1>
- <KEYWORD1>y-of</KEYWORD1>
- <KEYWORD1>year</KEYWORD1>
- <KEYWORD1>year-offset</KEYWORD1>
- <KEYWORD1>yes</KEYWORD1>
- <KEYWORD1>yes-no</KEYWORD1>
- <KEYWORD1>yes-no-cancel</KEYWORD1>
- <KEYWORD1>_dcm</KEYWORD1>
-
- <!-- Some commonly used abbreviations -->
- <!-- And words missing from -zgenkwlist option -->
- <KEYWORD1>accum</KEYWORD1>
- <KEYWORD1>asc</KEYWORD1>
- <KEYWORD1>avail</KEYWORD1>
- <KEYWORD1>button</KEYWORD1>
- <KEYWORD1>char</KEYWORD1>
- <KEYWORD1>column</KEYWORD1>
- <KEYWORD1>dec</KEYWORD1>
- <KEYWORD1>def</KEYWORD1>
- <KEYWORD1>disp</KEYWORD1>
- <KEYWORD1>dict</KEYWORD1>
- <KEYWORD1>dyn-function</KEYWORD1>
- <KEYWORD1>excl</KEYWORD1>
- <KEYWORD1>field</KEYWORD1>
- <KEYWORD1>field-group</KEYWORD1>
- <KEYWORD1>file-info</KEYWORD1>
- <KEYWORD1>form</KEYWORD1>
- <KEYWORD1>forward</KEYWORD1>
- <KEYWORD1>funct</KEYWORD1>
- <KEYWORD1>int</KEYWORD1>
- <KEYWORD1>info</KEYWORD1>
- <KEYWORD1>index-field</KEYWORD1>
- <KEYWORD1>log</KEYWORD1>
- <KEYWORD1>literal</KEYWORD1>
- <KEYWORD1>load-control</KEYWORD1>
- <KEYWORD1>no-label</KEYWORD1>
- <KEYWORD1>prim</KEYWORD1>
- <KEYWORD1>rcode-info</KEYWORD1>
- <KEYWORD1>share</KEYWORD1>
- <KEYWORD1>substr</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
-
-
- <!-- KEYWORD2 : VST & metaschema files and fields -->
- <KEYWORD2>_abbreviate</KEYWORD2>
- <KEYWORD2>_account_expires</KEYWORD2>
- <KEYWORD2>_actailog</KEYWORD2>
- <KEYWORD2>_actbilog</KEYWORD2>
- <KEYWORD2>_actbuffer</KEYWORD2>
- <KEYWORD2>_actindex</KEYWORD2>
- <KEYWORD2>_actiofile</KEYWORD2>
- <KEYWORD2>_actiotype</KEYWORD2>
- <KEYWORD2>_active</KEYWORD2>
- <KEYWORD2>_actlock</KEYWORD2>
- <KEYWORD2>_actother</KEYWORD2>
- <KEYWORD2>_actpws</KEYWORD2>
- <KEYWORD2>_actrecord</KEYWORD2>
- <KEYWORD2>_actserver</KEYWORD2>
- <KEYWORD2>_actspace</KEYWORD2>
- <KEYWORD2>_actsummary</KEYWORD2>
- <KEYWORD2>_admin</KEYWORD2>
- <KEYWORD2>_ailog-aiwwrites</KEYWORD2>
- <KEYWORD2>_ailog-bbuffwaits</KEYWORD2>
- <KEYWORD2>_ailog-byteswritn</KEYWORD2>
- <KEYWORD2>_ailog-forcewaits</KEYWORD2>
- <KEYWORD2>_ailog-id</KEYWORD2>
- <KEYWORD2>_ailog-misc</KEYWORD2>
- <KEYWORD2>_ailog-nobufavail</KEYWORD2>
- <KEYWORD2>_ailog-partialwrt</KEYWORD2>
- <KEYWORD2>_ailog-recwriten</KEYWORD2>
- <KEYWORD2>_ailog-totwrites</KEYWORD2>
- <KEYWORD2>_ailog-trans</KEYWORD2>
- <KEYWORD2>_ailog-uptime</KEYWORD2>
- <KEYWORD2>_alt</KEYWORD2>
- <KEYWORD2>_area</KEYWORD2>
- <KEYWORD2>_area-attrib</KEYWORD2>
- <KEYWORD2>_area-block</KEYWORD2>
- <KEYWORD2>_area-blocksize</KEYWORD2>
- <KEYWORD2>_area-clustersize</KEYWORD2>
- <KEYWORD2>_area-extents</KEYWORD2>
- <KEYWORD2>_area-misc</KEYWORD2>
- <KEYWORD2>_area-name</KEYWORD2>
- <KEYWORD2>_area-number</KEYWORD2>
- <KEYWORD2>_area-recbits</KEYWORD2>
- <KEYWORD2>_area-recid</KEYWORD2>
- <KEYWORD2>_area-type</KEYWORD2>
- <KEYWORD2>_area-version</KEYWORD2>
- <KEYWORD2>_areaextent</KEYWORD2>
- <KEYWORD2>_areastatus</KEYWORD2>
- <KEYWORD2>_areastatus-areaname</KEYWORD2>
- <KEYWORD2>_areastatus-areanum</KEYWORD2>
- <KEYWORD2>_areastatus-extents</KEYWORD2>
- <KEYWORD2>_areastatus-freenum</KEYWORD2>
- <KEYWORD2>_areastatus-hiwater</KEYWORD2>
- <KEYWORD2>_areastatus-id</KEYWORD2>
- <KEYWORD2>_areastatus-lastextent</KEYWORD2>
- <KEYWORD2>_areastatus-rmnum</KEYWORD2>
- <KEYWORD2>_areastatus-totblocks</KEYWORD2>
- <KEYWORD2>_argtype</KEYWORD2>
- <KEYWORD2>_ascending</KEYWORD2>
- <KEYWORD2>_attribute</KEYWORD2>
- <KEYWORD2>_attributes1</KEYWORD2>
- <KEYWORD2>_auth-id</KEYWORD2>
- <KEYWORD2>_autoincr</KEYWORD2>
- <KEYWORD2>_base-col</KEYWORD2>
- <KEYWORD2>_base-tables</KEYWORD2>
- <KEYWORD2>_bfstatus-apwq</KEYWORD2>
- <KEYWORD2>_bfstatus-ckpmarked</KEYWORD2>
- <KEYWORD2>_bfstatus-ckpq</KEYWORD2>
- <KEYWORD2>_bfstatus-hashsize</KEYWORD2>
- <KEYWORD2>_bfstatus-id</KEYWORD2>
- <KEYWORD2>_bfstatus-lastckpnum</KEYWORD2>
- <KEYWORD2>_bfstatus-lru</KEYWORD2>
- <KEYWORD2>_bfstatus-misc</KEYWORD2>
- <KEYWORD2>_bfstatus-modbuffs</KEYWORD2>
- <KEYWORD2>_bfstatus-totbufs</KEYWORD2>
- <KEYWORD2>_bfstatus-usedbuffs</KEYWORD2>
- <KEYWORD2>_bilog-bbuffwaits</KEYWORD2>
- <KEYWORD2>_bilog-biwwrites</KEYWORD2>
- <KEYWORD2>_bilog-bytesread</KEYWORD2>
- <KEYWORD2>_bilog-byteswrtn</KEYWORD2>
- <KEYWORD2>_bilog-clstrclose</KEYWORD2>
- <KEYWORD2>_bilog-ebuffwaits</KEYWORD2>
- <KEYWORD2>_bilog-forcewaits</KEYWORD2>
- <KEYWORD2>_bilog-forcewrts</KEYWORD2>
- <KEYWORD2>_bilog-id</KEYWORD2>
- <KEYWORD2>_bilog-misc</KEYWORD2>
- <KEYWORD2>_bilog-partialwrts</KEYWORD2>
- <KEYWORD2>_bilog-recread</KEYWORD2>
- <KEYWORD2>_bilog-recwriten</KEYWORD2>
- <KEYWORD2>_bilog-totalwrts</KEYWORD2>
- <KEYWORD2>_bilog-totreads</KEYWORD2>
- <KEYWORD2>_bilog-trans</KEYWORD2>
- <KEYWORD2>_bilog-uptime</KEYWORD2>
- <KEYWORD2>_block</KEYWORD2>
- <KEYWORD2>_block-area</KEYWORD2>
- <KEYWORD2>_block-bkupctr</KEYWORD2>
- <KEYWORD2>_block-block</KEYWORD2>
- <KEYWORD2>_block-chaintype</KEYWORD2>
- <KEYWORD2>_block-dbkey</KEYWORD2>
- <KEYWORD2>_block-id</KEYWORD2>
- <KEYWORD2>_block-misc</KEYWORD2>
- <KEYWORD2>_block-nextdbkey</KEYWORD2>
- <KEYWORD2>_block-type</KEYWORD2>
- <KEYWORD2>_block-update</KEYWORD2>
- <KEYWORD2>_buffer-apwenq</KEYWORD2>
- <KEYWORD2>_buffer-chkpts</KEYWORD2>
- <KEYWORD2>_buffer-deferred</KEYWORD2>
- <KEYWORD2>_buffer-flushed</KEYWORD2>
- <KEYWORD2>_buffer-id</KEYWORD2>
- <KEYWORD2>_buffer-logicrds</KEYWORD2>
- <KEYWORD2>_buffer-logicwrts</KEYWORD2>
- <KEYWORD2>_buffer-lruskips</KEYWORD2>
- <KEYWORD2>_buffer-lruwrts</KEYWORD2>
- <KEYWORD2>_buffer-marked</KEYWORD2>
- <KEYWORD2>_buffer-misc</KEYWORD2>
- <KEYWORD2>_buffer-osrds</KEYWORD2>
- <KEYWORD2>_buffer-oswrts</KEYWORD2>
- <KEYWORD2>_buffer-trans</KEYWORD2>
- <KEYWORD2>_buffer-uptime</KEYWORD2>
- <KEYWORD2>_buffstatus</KEYWORD2>
- <KEYWORD2>_cache</KEYWORD2>
- <KEYWORD2>_can-create</KEYWORD2>
- <KEYWORD2>_can-delete</KEYWORD2>
- <KEYWORD2>_can-dump</KEYWORD2>
- <KEYWORD2>_can-load</KEYWORD2>
- <KEYWORD2>_can-read</KEYWORD2>
- <KEYWORD2>_can-write</KEYWORD2>
- <KEYWORD2>_casesensitive</KEYWORD2>
- <KEYWORD2>_charset</KEYWORD2>
- <KEYWORD2>_checkpoint</KEYWORD2>
- <KEYWORD2>_checkpoint-apwq</KEYWORD2>
- <KEYWORD2>_checkpoint-cptq</KEYWORD2>
- <KEYWORD2>_checkpoint-dirty</KEYWORD2>
- <KEYWORD2>_checkpoint-flush</KEYWORD2>
- <KEYWORD2>_checkpoint-id</KEYWORD2>
- <KEYWORD2>_checkpoint-len</KEYWORD2>
- <KEYWORD2>_checkpoint-misc</KEYWORD2>
- <KEYWORD2>_checkpoint-scan</KEYWORD2>
- <KEYWORD2>_checkpoint-time</KEYWORD2>
- <KEYWORD2>_chkclause</KEYWORD2>
- <KEYWORD2>_chkseq</KEYWORD2>
- <KEYWORD2>_cnstrname</KEYWORD2>
- <KEYWORD2>_cnstrtype</KEYWORD2>
- <KEYWORD2>_code-feature</KEYWORD2>
- <KEYWORD2>_codefeature-id</KEYWORD2>
- <KEYWORD2>_codefeature-res01</KEYWORD2>
- <KEYWORD2>_codefeature-res02</KEYWORD2>
- <KEYWORD2>_codefeature_name</KEYWORD2>
- <KEYWORD2>_codefeature_required</KEYWORD2>
- <KEYWORD2>_codefeature_supported</KEYWORD2>
- <KEYWORD2>_codepage</KEYWORD2>
- <KEYWORD2>_col</KEYWORD2>
- <KEYWORD2>_col-label</KEYWORD2>
- <KEYWORD2>_col-label-sa</KEYWORD2>
- <KEYWORD2>_col-name</KEYWORD2>
- <KEYWORD2>_colid</KEYWORD2>
- <KEYWORD2>_coll-cp</KEYWORD2>
- <KEYWORD2>_coll-data</KEYWORD2>
- <KEYWORD2>_coll-name</KEYWORD2>
- <KEYWORD2>_coll-segment</KEYWORD2>
- <KEYWORD2>_coll-sequence</KEYWORD2>
- <KEYWORD2>_coll-strength</KEYWORD2>
- <KEYWORD2>_coll-tran-subtype</KEYWORD2>
- <KEYWORD2>_coll-tran-version</KEYWORD2>
- <KEYWORD2>_collation</KEYWORD2>
- <KEYWORD2>_colname</KEYWORD2>
- <KEYWORD2>_colposition</KEYWORD2>
- <KEYWORD2>_connect</KEYWORD2>
- <KEYWORD2>_connect-2phase</KEYWORD2>
- <KEYWORD2>_connect-batch</KEYWORD2>
- <KEYWORD2>_connect-device</KEYWORD2>
- <KEYWORD2>_connect-disconnect</KEYWORD2>
- <KEYWORD2>_connect-id</KEYWORD2>
- <KEYWORD2>_connect-interrupt</KEYWORD2>
- <KEYWORD2>_connect-misc</KEYWORD2>
- <KEYWORD2>_connect-name</KEYWORD2>
- <KEYWORD2>_connect-pid</KEYWORD2>
- <KEYWORD2>_connect-resync</KEYWORD2>
- <KEYWORD2>_connect-semid</KEYWORD2>
- <KEYWORD2>_connect-semnum</KEYWORD2>
- <KEYWORD2>_connect-server</KEYWORD2>
- <KEYWORD2>_connect-time</KEYWORD2>
- <KEYWORD2>_connect-transid</KEYWORD2>
- <KEYWORD2>_connect-type</KEYWORD2>
- <KEYWORD2>_connect-usr</KEYWORD2>
- <KEYWORD2>_connect-wait</KEYWORD2>
- <KEYWORD2>_connect-wait1</KEYWORD2>
- <KEYWORD2>_cp-attr</KEYWORD2>
- <KEYWORD2>_cp-dbrecid</KEYWORD2>
- <KEYWORD2>_cp-name</KEYWORD2>
- <KEYWORD2>_cp-sequence</KEYWORD2>
- <KEYWORD2>_crc</KEYWORD2>
- <KEYWORD2>_create-limit</KEYWORD2>
- <KEYWORD2>_createparams</KEYWORD2>
- <KEYWORD2>_create_date</KEYWORD2>
- <KEYWORD2>_creator</KEYWORD2>
- <KEYWORD2>_cycle-ok</KEYWORD2>
- <KEYWORD2>_data-type</KEYWORD2>
- <KEYWORD2>_database-feature</KEYWORD2>
- <KEYWORD2>_datatype</KEYWORD2>
- <KEYWORD2>_db</KEYWORD2>
- <KEYWORD2>_db-addr</KEYWORD2>
- <KEYWORD2>_db-coll-name</KEYWORD2>
- <KEYWORD2>_db-collate</KEYWORD2>
- <KEYWORD2>_db-comm</KEYWORD2>
- <KEYWORD2>_db-lang</KEYWORD2>
- <KEYWORD2>_db-local</KEYWORD2>
- <KEYWORD2>_db-misc1</KEYWORD2>
- <KEYWORD2>_db-misc2</KEYWORD2>
- <KEYWORD2>_db-name</KEYWORD2>
- <KEYWORD2>_db-recid</KEYWORD2>
- <KEYWORD2>_db-res1</KEYWORD2>
- <KEYWORD2>_db-res2</KEYWORD2>
- <KEYWORD2>_db-revision</KEYWORD2>
- <KEYWORD2>_db-slave</KEYWORD2>
- <KEYWORD2>_db-type</KEYWORD2>
- <KEYWORD2>_db-xl-name</KEYWORD2>
- <KEYWORD2>_db-xlate</KEYWORD2>
- <KEYWORD2>_dbaacc</KEYWORD2>
- <KEYWORD2>_dbfeature-id</KEYWORD2>
- <KEYWORD2>_dbfeature-res01</KEYWORD2>
- <KEYWORD2>_dbfeature-res02</KEYWORD2>
- <KEYWORD2>_dbfeature_active</KEYWORD2>
- <KEYWORD2>_dbfeature_enabled</KEYWORD2>
- <KEYWORD2>_dbfeature_name</KEYWORD2>
- <KEYWORD2>_dblink</KEYWORD2>
- <KEYWORD2>_dbstatus</KEYWORD2>
- <KEYWORD2>_dbstatus-aiblksize</KEYWORD2>
- <KEYWORD2>_dbstatus-biblksize</KEYWORD2>
- <KEYWORD2>_dbstatus-biclsize</KEYWORD2>
- <KEYWORD2>_dbstatus-biopen</KEYWORD2>
- <KEYWORD2>_dbstatus-bisize</KEYWORD2>
- <KEYWORD2>_dbstatus-bitrunc</KEYWORD2>
- <KEYWORD2>_dbstatus-cachestamp</KEYWORD2>
- <KEYWORD2>_dbstatus-changed</KEYWORD2>
- <KEYWORD2>_dbstatus-clversminor</KEYWORD2>
- <KEYWORD2>_dbstatus-codepage</KEYWORD2>
- <KEYWORD2>_dbstatus-collation</KEYWORD2>
- <KEYWORD2>_dbstatus-createdate</KEYWORD2>
- <KEYWORD2>_dbstatus-dbblksize</KEYWORD2>
- <KEYWORD2>_dbstatus-dbvers</KEYWORD2>
- <KEYWORD2>_dbstatus-dbversminor</KEYWORD2>
- <KEYWORD2>_dbstatus-emptyblks</KEYWORD2>
- <KEYWORD2>_dbstatus-fbdate</KEYWORD2>
- <KEYWORD2>_dbstatus-freeblks</KEYWORD2>
- <KEYWORD2>_dbstatus-hiwater</KEYWORD2>
- <KEYWORD2>_dbstatus-ibdate</KEYWORD2>
- <KEYWORD2>_dbstatus-ibseq</KEYWORD2>
- <KEYWORD2>_dbstatus-id</KEYWORD2>
- <KEYWORD2>_dbstatus-integrity</KEYWORD2>
- <KEYWORD2>_dbstatus-intflags</KEYWORD2>
- <KEYWORD2>_dbstatus-lastopen</KEYWORD2>
- <KEYWORD2>_dbstatus-lasttable</KEYWORD2>
- <KEYWORD2>_dbstatus-lasttran</KEYWORD2>
- <KEYWORD2>_dbstatus-misc</KEYWORD2>
- <KEYWORD2>_dbstatus-mostlocks</KEYWORD2>
- <KEYWORD2>_dbstatus-numareas</KEYWORD2>
- <KEYWORD2>_dbstatus-numlocks</KEYWORD2>
- <KEYWORD2>_dbstatus-numsems</KEYWORD2>
- <KEYWORD2>_dbstatus-prevopen</KEYWORD2>
- <KEYWORD2>_dbstatus-rmfreeblks</KEYWORD2>
- <KEYWORD2>_dbstatus-sharedmemver</KEYWORD2>
- <KEYWORD2>_dbstatus-shmvers</KEYWORD2>
- <KEYWORD2>_dbstatus-starttime</KEYWORD2>
- <KEYWORD2>_dbstatus-state</KEYWORD2>
- <KEYWORD2>_dbstatus-tainted</KEYWORD2>
- <KEYWORD2>_dbstatus-totalblks</KEYWORD2>
- <KEYWORD2>_decimals</KEYWORD2>
- <KEYWORD2>_del</KEYWORD2>
- <KEYWORD2>_deleterule</KEYWORD2>
- <KEYWORD2>_desc</KEYWORD2>
- <KEYWORD2>_description</KEYWORD2>
- <KEYWORD2>_dfltvalue</KEYWORD2>
- <KEYWORD2>_dft-pk</KEYWORD2>
- <KEYWORD2>_dhtypename</KEYWORD2>
- <KEYWORD2>_disabled</KEYWORD2>
- <KEYWORD2>_dtype</KEYWORD2>
- <KEYWORD2>_dump-name</KEYWORD2>
- <KEYWORD2>_email</KEYWORD2>
- <KEYWORD2>_event</KEYWORD2>
- <KEYWORD2>_exe</KEYWORD2>
- <KEYWORD2>_extent</KEYWORD2>
- <KEYWORD2>_extent-attrib</KEYWORD2>
- <KEYWORD2>_extent-misc</KEYWORD2>
- <KEYWORD2>_extent-number</KEYWORD2>
- <KEYWORD2>_extent-path</KEYWORD2>
- <KEYWORD2>_extent-size</KEYWORD2>
- <KEYWORD2>_extent-system</KEYWORD2>
- <KEYWORD2>_extent-type</KEYWORD2>
- <KEYWORD2>_extent-version</KEYWORD2>
- <KEYWORD2>_fetch-type</KEYWORD2>
- <KEYWORD2>_field</KEYWORD2>
- <KEYWORD2>_field-map</KEYWORD2>
- <KEYWORD2>_field-name</KEYWORD2>
- <KEYWORD2>_field-physpos</KEYWORD2>
- <KEYWORD2>_field-recid</KEYWORD2>
- <KEYWORD2>_field-rpos</KEYWORD2>
- <KEYWORD2>_field-trig</KEYWORD2>
- <KEYWORD2>_fil-misc1</KEYWORD2>
- <KEYWORD2>_fil-misc2</KEYWORD2>
- <KEYWORD2>_fil-res1</KEYWORD2>
- <KEYWORD2>_fil-res2</KEYWORD2>
- <KEYWORD2>_file</KEYWORD2>
- <KEYWORD2>_file-label</KEYWORD2>
- <KEYWORD2>_file-label-sa</KEYWORD2>
- <KEYWORD2>_file-name</KEYWORD2>
- <KEYWORD2>_file-number</KEYWORD2>
- <KEYWORD2>_file-recid</KEYWORD2>
- <KEYWORD2>_file-trig</KEYWORD2>
- <KEYWORD2>_filelist</KEYWORD2>
- <KEYWORD2>_filelist-blksize</KEYWORD2>
- <KEYWORD2>_filelist-extend</KEYWORD2>
- <KEYWORD2>_filelist-id</KEYWORD2>
- <KEYWORD2>_filelist-logicalsz</KEYWORD2>
- <KEYWORD2>_filelist-misc</KEYWORD2>
- <KEYWORD2>_filelist-name</KEYWORD2>
- <KEYWORD2>_filelist-openmode</KEYWORD2>
- <KEYWORD2>_filelist-size</KEYWORD2>
- <KEYWORD2>_fire_4gl</KEYWORD2>
- <KEYWORD2>_fld</KEYWORD2>
- <KEYWORD2>_fld-case</KEYWORD2>
- <KEYWORD2>_fld-misc1</KEYWORD2>
- <KEYWORD2>_fld-misc2</KEYWORD2>
- <KEYWORD2>_fld-res1</KEYWORD2>
- <KEYWORD2>_fld-res2</KEYWORD2>
- <KEYWORD2>_fld-stdtype</KEYWORD2>
- <KEYWORD2>_fld-stlen</KEYWORD2>
- <KEYWORD2>_fld-stoff</KEYWORD2>
- <KEYWORD2>_for-allocated</KEYWORD2>
- <KEYWORD2>_for-cnt1</KEYWORD2>
- <KEYWORD2>_for-cnt2</KEYWORD2>
- <KEYWORD2>_for-flag</KEYWORD2>
- <KEYWORD2>_for-format</KEYWORD2>
- <KEYWORD2>_for-id</KEYWORD2>
- <KEYWORD2>_for-info</KEYWORD2>
- <KEYWORD2>_for-itype</KEYWORD2>
- <KEYWORD2>_for-maxsize</KEYWORD2>
- <KEYWORD2>_for-name</KEYWORD2>
- <KEYWORD2>_for-number</KEYWORD2>
- <KEYWORD2>_for-owner</KEYWORD2>
- <KEYWORD2>_for-primary</KEYWORD2>
- <KEYWORD2>_for-retrieve</KEYWORD2>
- <KEYWORD2>_for-scale</KEYWORD2>
- <KEYWORD2>_for-separator</KEYWORD2>
- <KEYWORD2>_for-size</KEYWORD2>
- <KEYWORD2>_for-spacing</KEYWORD2>
- <KEYWORD2>_for-type</KEYWORD2>
- <KEYWORD2>_for-xpos</KEYWORD2>
- <KEYWORD2>_format</KEYWORD2>
- <KEYWORD2>_format-sa</KEYWORD2>
- <KEYWORD2>_frozen</KEYWORD2>
- <KEYWORD2>_given_name</KEYWORD2>
- <KEYWORD2>_grantee</KEYWORD2>
- <KEYWORD2>_grantor</KEYWORD2>
- <KEYWORD2>_group-by</KEYWORD2>
- <KEYWORD2>_group_number</KEYWORD2>
- <KEYWORD2>_has-ccnstrs</KEYWORD2>
- <KEYWORD2>_has-fcnstrs</KEYWORD2>
- <KEYWORD2>_has-pcnstrs</KEYWORD2>
- <KEYWORD2>_has-ucnstrs</KEYWORD2>
- <KEYWORD2>_hasresultset</KEYWORD2>
- <KEYWORD2>_hasreturnval</KEYWORD2>
- <KEYWORD2>_help</KEYWORD2>
- <KEYWORD2>_help-sa</KEYWORD2>
- <KEYWORD2>_hidden</KEYWORD2>
- <KEYWORD2>_host</KEYWORD2>
- <KEYWORD2>_i-misc1</KEYWORD2>
- <KEYWORD2>_i-misc2</KEYWORD2>
- <KEYWORD2>_i-res1</KEYWORD2>
- <KEYWORD2>_i-res2</KEYWORD2>
- <KEYWORD2>_ianum</KEYWORD2>
- <KEYWORD2>_id</KEYWORD2>
- <KEYWORD2>_idx-crc</KEYWORD2>
- <KEYWORD2>_idx-num</KEYWORD2>
- <KEYWORD2>_idxid</KEYWORD2>
- <KEYWORD2>_idxmethod</KEYWORD2>
- <KEYWORD2>_idxname</KEYWORD2>
- <KEYWORD2>_idxowner</KEYWORD2>
- <KEYWORD2>_if-misc1</KEYWORD2>
- <KEYWORD2>_if-misc2</KEYWORD2>
- <KEYWORD2>_if-res1</KEYWORD2>
- <KEYWORD2>_if-res2</KEYWORD2>
- <KEYWORD2>_index</KEYWORD2>
- <KEYWORD2>_index-create</KEYWORD2>
- <KEYWORD2>_index-delete</KEYWORD2>
- <KEYWORD2>_index-field</KEYWORD2>
- <KEYWORD2>_index-find</KEYWORD2>
- <KEYWORD2>_index-free</KEYWORD2>
- <KEYWORD2>_index-id</KEYWORD2>
- <KEYWORD2>_index-misc</KEYWORD2>
- <KEYWORD2>_index-name</KEYWORD2>
- <KEYWORD2>_index-recid</KEYWORD2>
- <KEYWORD2>_index-remove</KEYWORD2>
- <KEYWORD2>_index-seq</KEYWORD2>
- <KEYWORD2>_index-splits</KEYWORD2>
- <KEYWORD2>_index-trans</KEYWORD2>
- <KEYWORD2>_index-uptime</KEYWORD2>
- <KEYWORD2>_indexbase</KEYWORD2>
- <KEYWORD2>_indexstat</KEYWORD2>
- <KEYWORD2>_indexstat-blockdelete</KEYWORD2>
- <KEYWORD2>_indexstat-create</KEYWORD2>
- <KEYWORD2>_indexstat-delete</KEYWORD2>
- <KEYWORD2>_indexstat-id</KEYWORD2>
- <KEYWORD2>_indexstat-read</KEYWORD2>
- <KEYWORD2>_indexstat-split</KEYWORD2>
- <KEYWORD2>_initial</KEYWORD2>
- <KEYWORD2>_initial-sa</KEYWORD2>
- <KEYWORD2>_ins</KEYWORD2>
- <KEYWORD2>_iofile-bufreads</KEYWORD2>
- <KEYWORD2>_iofile-bufwrites</KEYWORD2>
- <KEYWORD2>_iofile-extends</KEYWORD2>
- <KEYWORD2>_iofile-filename</KEYWORD2>
- <KEYWORD2>_iofile-id</KEYWORD2>
- <KEYWORD2>_iofile-misc</KEYWORD2>
- <KEYWORD2>_iofile-reads</KEYWORD2>
- <KEYWORD2>_iofile-trans</KEYWORD2>
- <KEYWORD2>_iofile-ubufreads</KEYWORD2>
- <KEYWORD2>_iofile-ubufwrites</KEYWORD2>
- <KEYWORD2>_iofile-uptime</KEYWORD2>
- <KEYWORD2>_iofile-writes</KEYWORD2>
- <KEYWORD2>_iotype-airds</KEYWORD2>
- <KEYWORD2>_iotype-aiwrts</KEYWORD2>
- <KEYWORD2>_iotype-birds</KEYWORD2>
- <KEYWORD2>_iotype-biwrts</KEYWORD2>
- <KEYWORD2>_iotype-datareads</KEYWORD2>
- <KEYWORD2>_iotype-datawrts</KEYWORD2>
- <KEYWORD2>_iotype-id</KEYWORD2>
- <KEYWORD2>_iotype-idxrds</KEYWORD2>
- <KEYWORD2>_iotype-idxwrts</KEYWORD2>
- <KEYWORD2>_iotype-misc</KEYWORD2>
- <KEYWORD2>_iotype-trans</KEYWORD2>
- <KEYWORD2>_iotype-uptime</KEYWORD2>
- <KEYWORD2>_ispublic</KEYWORD2>
- <KEYWORD2>_keyvalue-expr</KEYWORD2>
- <KEYWORD2>_label</KEYWORD2>
- <KEYWORD2>_label-sa</KEYWORD2>
- <KEYWORD2>_lang</KEYWORD2>
- <KEYWORD2>_last-change</KEYWORD2>
- <KEYWORD2>_last-modified</KEYWORD2>
- <KEYWORD2>_last_login</KEYWORD2>
- <KEYWORD2>_latch</KEYWORD2>
- <KEYWORD2>_latch-busy</KEYWORD2>
- <KEYWORD2>_latch-hold</KEYWORD2>
- <KEYWORD2>_latch-id</KEYWORD2>
- <KEYWORD2>_latch-lock</KEYWORD2>
- <KEYWORD2>_latch-lockedt</KEYWORD2>
- <KEYWORD2>_latch-lockt</KEYWORD2>
- <KEYWORD2>_latch-name</KEYWORD2>
- <KEYWORD2>_latch-qhold</KEYWORD2>
- <KEYWORD2>_latch-spin</KEYWORD2>
- <KEYWORD2>_latch-type</KEYWORD2>
- <KEYWORD2>_latch-wait</KEYWORD2>
- <KEYWORD2>_latch-waitt</KEYWORD2>
- <KEYWORD2>_lic-activeconns</KEYWORD2>
- <KEYWORD2>_lic-batchconns</KEYWORD2>
- <KEYWORD2>_lic-currconns</KEYWORD2>
- <KEYWORD2>_lic-id</KEYWORD2>
- <KEYWORD2>_lic-maxactive</KEYWORD2>
- <KEYWORD2>_lic-maxbatch</KEYWORD2>
- <KEYWORD2>_lic-maxcurrent</KEYWORD2>
- <KEYWORD2>_lic-minactive</KEYWORD2>
- <KEYWORD2>_lic-minbatch</KEYWORD2>
- <KEYWORD2>_lic-mincurrent</KEYWORD2>
- <KEYWORD2>_lic-validusers</KEYWORD2>
- <KEYWORD2>_license</KEYWORD2>
- <KEYWORD2>_linkowner</KEYWORD2>
- <KEYWORD2>_literalprefix</KEYWORD2>
- <KEYWORD2>_literalsuffix</KEYWORD2>
- <KEYWORD2>_localtypename</KEYWORD2>
- <KEYWORD2>_lock</KEYWORD2>
- <KEYWORD2>_lock-canclreq</KEYWORD2>
- <KEYWORD2>_lock-chain</KEYWORD2>
- <KEYWORD2>_lock-downgrade</KEYWORD2>
- <KEYWORD2>_lock-exclfind</KEYWORD2>
- <KEYWORD2>_lock-excllock</KEYWORD2>
- <KEYWORD2>_lock-exclreq</KEYWORD2>
- <KEYWORD2>_lock-exclwait</KEYWORD2>
- <KEYWORD2>_lock-flags</KEYWORD2>
- <KEYWORD2>_lock-id</KEYWORD2>
- <KEYWORD2>_lock-misc</KEYWORD2>
- <KEYWORD2>_lock-name</KEYWORD2>
- <KEYWORD2>_lock-recgetlock</KEYWORD2>
- <KEYWORD2>_lock-recgetreq</KEYWORD2>
- <KEYWORD2>_lock-recgetwait</KEYWORD2>
- <KEYWORD2>_lock-recid</KEYWORD2>
- <KEYWORD2>_lock-redreq</KEYWORD2>
- <KEYWORD2>_lock-shrfind</KEYWORD2>
- <KEYWORD2>_lock-shrlock</KEYWORD2>
- <KEYWORD2>_lock-shrreq</KEYWORD2>
- <KEYWORD2>_lock-shrwait</KEYWORD2>
- <KEYWORD2>_lock-table</KEYWORD2>
- <KEYWORD2>_lock-trans</KEYWORD2>
- <KEYWORD2>_lock-type</KEYWORD2>
- <KEYWORD2>_lock-upglock</KEYWORD2>
- <KEYWORD2>_lock-upgreq</KEYWORD2>
- <KEYWORD2>_lock-upgwait</KEYWORD2>
- <KEYWORD2>_lock-uptime</KEYWORD2>
- <KEYWORD2>_lock-usr</KEYWORD2>
- <KEYWORD2>_lockreq</KEYWORD2>
- <KEYWORD2>_lockreq-exclfind</KEYWORD2>
- <KEYWORD2>_lockreq-id</KEYWORD2>
- <KEYWORD2>_lockreq-misc</KEYWORD2>
- <KEYWORD2>_lockreq-name</KEYWORD2>
- <KEYWORD2>_lockreq-num</KEYWORD2>
- <KEYWORD2>_lockreq-reclock</KEYWORD2>
- <KEYWORD2>_lockreq-recwait</KEYWORD2>
- <KEYWORD2>_lockreq-schlock</KEYWORD2>
- <KEYWORD2>_lockreq-schwait</KEYWORD2>
- <KEYWORD2>_lockreq-shrfind</KEYWORD2>
- <KEYWORD2>_lockreq-trnlock</KEYWORD2>
- <KEYWORD2>_lockreq-trnwait</KEYWORD2>
- <KEYWORD2>_logging</KEYWORD2>
- <KEYWORD2>_logging-2pc</KEYWORD2>
- <KEYWORD2>_logging-2pcnickname</KEYWORD2>
- <KEYWORD2>_logging-2pcpriority</KEYWORD2>
- <KEYWORD2>_logging-aibegin</KEYWORD2>
- <KEYWORD2>_logging-aiblksize</KEYWORD2>
- <KEYWORD2>_logging-aibuffs</KEYWORD2>
- <KEYWORD2>_logging-aicurrext</KEYWORD2>
- <KEYWORD2>_logging-aiextents</KEYWORD2>
- <KEYWORD2>_logging-aigennum</KEYWORD2>
- <KEYWORD2>_logging-aiio</KEYWORD2>
- <KEYWORD2>_logging-aijournal</KEYWORD2>
- <KEYWORD2>_logging-ailogsize</KEYWORD2>
- <KEYWORD2>_logging-ainew</KEYWORD2>
- <KEYWORD2>_logging-aiopen</KEYWORD2>
- <KEYWORD2>_logging-biblksize</KEYWORD2>
- <KEYWORD2>_logging-bibuffs</KEYWORD2>
- <KEYWORD2>_logging-bibytesfree</KEYWORD2>
- <KEYWORD2>_logging-biclage</KEYWORD2>
- <KEYWORD2>_logging-biclsize</KEYWORD2>
- <KEYWORD2>_logging-biextents</KEYWORD2>
- <KEYWORD2>_logging-bifullbuffs</KEYWORD2>
- <KEYWORD2>_logging-biio</KEYWORD2>
- <KEYWORD2>_logging-bilogsize</KEYWORD2>
- <KEYWORD2>_logging-commitdelay</KEYWORD2>
- <KEYWORD2>_logging-crashprot</KEYWORD2>
- <KEYWORD2>_logging-id</KEYWORD2>
- <KEYWORD2>_logging-lastckp</KEYWORD2>
- <KEYWORD2>_logging-misc</KEYWORD2>
- <KEYWORD2>_logins</KEYWORD2>
- <KEYWORD2>_login_failures</KEYWORD2>
- <KEYWORD2>_mandatory</KEYWORD2>
- <KEYWORD2>_max_logins</KEYWORD2>
- <KEYWORD2>_max_tries</KEYWORD2>
- <KEYWORD2>_middle_initial</KEYWORD2>
- <KEYWORD2>_mod-sequence</KEYWORD2>
- <KEYWORD2>_mode</KEYWORD2>
- <KEYWORD2>_mstrblk</KEYWORD2>
- <KEYWORD2>_mstrblk-aiblksize</KEYWORD2>
- <KEYWORD2>_mstrblk-biblksize</KEYWORD2>
- <KEYWORD2>_mstrblk-biopen</KEYWORD2>
- <KEYWORD2>_mstrblk-biprev</KEYWORD2>
- <KEYWORD2>_mstrblk-bistate</KEYWORD2>
- <KEYWORD2>_mstrblk-cfilnum</KEYWORD2>
- <KEYWORD2>_mstrblk-crdate</KEYWORD2>
- <KEYWORD2>_mstrblk-dbstate</KEYWORD2>
- <KEYWORD2>_mstrblk-dbvers</KEYWORD2>
- <KEYWORD2>_mstrblk-fbdate</KEYWORD2>
- <KEYWORD2>_mstrblk-hiwater</KEYWORD2>
- <KEYWORD2>_mstrblk-ibdate</KEYWORD2>
- <KEYWORD2>_mstrblk-ibseq</KEYWORD2>
- <KEYWORD2>_mstrblk-id</KEYWORD2>
- <KEYWORD2>_mstrblk-integrity</KEYWORD2>
- <KEYWORD2>_mstrblk-lasttask</KEYWORD2>
- <KEYWORD2>_mstrblk-misc</KEYWORD2>
- <KEYWORD2>_mstrblk-oppdate</KEYWORD2>
- <KEYWORD2>_mstrblk-oprdate</KEYWORD2>
- <KEYWORD2>_mstrblk-rlclsize</KEYWORD2>
- <KEYWORD2>_mstrblk-rltime</KEYWORD2>
- <KEYWORD2>_mstrblk-tainted</KEYWORD2>
- <KEYWORD2>_mstrblk-timestamp</KEYWORD2>
- <KEYWORD2>_mstrblk-totblks</KEYWORD2>
- <KEYWORD2>_myconn-id</KEYWORD2>
- <KEYWORD2>_myconn-numseqbuffers</KEYWORD2>
- <KEYWORD2>_myconn-pid</KEYWORD2>
- <KEYWORD2>_myconn-usedseqbuffers</KEYWORD2>
- <KEYWORD2>_myconn-userid</KEYWORD2>
- <KEYWORD2>_myconnection</KEYWORD2>
- <KEYWORD2>_name_loc</KEYWORD2>
- <KEYWORD2>_ndx</KEYWORD2>
- <KEYWORD2>_nullable</KEYWORD2>
- <KEYWORD2>_nullflag</KEYWORD2>
- <KEYWORD2>_num-comp</KEYWORD2>
- <KEYWORD2>_numfld</KEYWORD2>
- <KEYWORD2>_numkcomp</KEYWORD2>
- <KEYWORD2>_numkey</KEYWORD2>
- <KEYWORD2>_numkfld</KEYWORD2>
- <KEYWORD2>_object-associate</KEYWORD2>
- <KEYWORD2>_object-associate-type</KEYWORD2>
- <KEYWORD2>_object-attrib</KEYWORD2>
- <KEYWORD2>_object-block</KEYWORD2>
- <KEYWORD2>_object-misc</KEYWORD2>
- <KEYWORD2>_object-number</KEYWORD2>
- <KEYWORD2>_object-root</KEYWORD2>
- <KEYWORD2>_object-system</KEYWORD2>
- <KEYWORD2>_object-type</KEYWORD2>
- <KEYWORD2>_odbcmoney</KEYWORD2>
- <KEYWORD2>_order</KEYWORD2>
- <KEYWORD2>_other-commit</KEYWORD2>
- <KEYWORD2>_other-flushmblk</KEYWORD2>
- <KEYWORD2>_other-id</KEYWORD2>
- <KEYWORD2>_other-misc</KEYWORD2>
- <KEYWORD2>_other-trans</KEYWORD2>
- <KEYWORD2>_other-undo</KEYWORD2>
- <KEYWORD2>_other-uptime</KEYWORD2>
- <KEYWORD2>_other-wait</KEYWORD2>
- <KEYWORD2>_override</KEYWORD2>
- <KEYWORD2>_owner</KEYWORD2>
- <KEYWORD2>_password</KEYWORD2>
- <KEYWORD2>_prime-index</KEYWORD2>
- <KEYWORD2>_proc-name</KEYWORD2>
- <KEYWORD2>_procbin</KEYWORD2>
- <KEYWORD2>_procid</KEYWORD2>
- <KEYWORD2>_procname</KEYWORD2>
- <KEYWORD2>_proctext</KEYWORD2>
- <KEYWORD2>_proctype</KEYWORD2>
- <KEYWORD2>_property</KEYWORD2>
- <KEYWORD2>_pw-apwqwrites</KEYWORD2>
- <KEYWORD2>_pw-buffsscaned</KEYWORD2>
- <KEYWORD2>_pw-bufsckp</KEYWORD2>
- <KEYWORD2>_pw-checkpoints</KEYWORD2>
- <KEYWORD2>_pw-ckpqwrites</KEYWORD2>
- <KEYWORD2>_pw-dbwrites</KEYWORD2>
- <KEYWORD2>_pw-flushed</KEYWORD2>
- <KEYWORD2>_pw-id</KEYWORD2>
- <KEYWORD2>_pw-marked</KEYWORD2>
- <KEYWORD2>_pw-misc</KEYWORD2>
- <KEYWORD2>_pw-scancycles</KEYWORD2>
- <KEYWORD2>_pw-scanwrites</KEYWORD2>
- <KEYWORD2>_pw-totdbwrites</KEYWORD2>
- <KEYWORD2>_pw-trans</KEYWORD2>
- <KEYWORD2>_pw-uptime</KEYWORD2>
- <KEYWORD2>_pwd</KEYWORD2>
- <KEYWORD2>_pwd_duration</KEYWORD2>
- <KEYWORD2>_pwd_expires</KEYWORD2>
- <KEYWORD2>_record-bytescreat</KEYWORD2>
- <KEYWORD2>_record-bytesdel</KEYWORD2>
- <KEYWORD2>_record-bytesread</KEYWORD2>
- <KEYWORD2>_record-bytesupd</KEYWORD2>
- <KEYWORD2>_record-fragcreat</KEYWORD2>
- <KEYWORD2>_record-fragdel</KEYWORD2>
- <KEYWORD2>_record-fragread</KEYWORD2>
- <KEYWORD2>_record-fragupd</KEYWORD2>
- <KEYWORD2>_record-id</KEYWORD2>
- <KEYWORD2>_record-misc</KEYWORD2>
- <KEYWORD2>_record-reccreat</KEYWORD2>
- <KEYWORD2>_record-recdel</KEYWORD2>
- <KEYWORD2>_record-recread</KEYWORD2>
- <KEYWORD2>_record-recupd</KEYWORD2>
- <KEYWORD2>_record-trans</KEYWORD2>
- <KEYWORD2>_record-uptime</KEYWORD2>
- <KEYWORD2>_ref</KEYWORD2>
- <KEYWORD2>_ref-table</KEYWORD2>
- <KEYWORD2>_refcnstrname</KEYWORD2>
- <KEYWORD2>_referstonew</KEYWORD2>
- <KEYWORD2>_referstoold</KEYWORD2>
- <KEYWORD2>_refowner</KEYWORD2>
- <KEYWORD2>_reftblname</KEYWORD2>
- <KEYWORD2>_remowner</KEYWORD2>
- <KEYWORD2>_remtbl</KEYWORD2>
- <KEYWORD2>_repl-agent</KEYWORD2>
- <KEYWORD2>_repl-agentcontrol</KEYWORD2>
- <KEYWORD2>_repl-server</KEYWORD2>
- <KEYWORD2>_replagt-agentid</KEYWORD2>
- <KEYWORD2>_replagt-agentname</KEYWORD2>
- <KEYWORD2>_replagt-blocksack</KEYWORD2>
- <KEYWORD2>_replagt-blocksprocessed</KEYWORD2>
- <KEYWORD2>_replagt-blocksreceived</KEYWORD2>
- <KEYWORD2>_replagt-commstatus</KEYWORD2>
- <KEYWORD2>_replagt-connecttime</KEYWORD2>
- <KEYWORD2>_replagt-dbname</KEYWORD2>
- <KEYWORD2>_replagt-lasttrid</KEYWORD2>
- <KEYWORD2>_replagt-method</KEYWORD2>
- <KEYWORD2>_replagt-notesprocessed</KEYWORD2>
- <KEYWORD2>_replagt-port</KEYWORD2>
- <KEYWORD2>_replagt-reservedchar</KEYWORD2>
- <KEYWORD2>_replagt-reservedint</KEYWORD2>
- <KEYWORD2>_replagt-serverhost</KEYWORD2>
- <KEYWORD2>_replagt-status</KEYWORD2>
- <KEYWORD2>_replagtctl-agentid</KEYWORD2>
- <KEYWORD2>_replagtctl-agentname</KEYWORD2>
- <KEYWORD2>_replagtctl-blocksack</KEYWORD2>
- <KEYWORD2>_replagtctl-blockssent</KEYWORD2>
- <KEYWORD2>_replagtctl-commstatus</KEYWORD2>
- <KEYWORD2>_replagtctl-connecttime</KEYWORD2>
- <KEYWORD2>_replagtctl-lastblocksentat</KEYWORD2>
- <KEYWORD2>_replagtctl-method</KEYWORD2>
- <KEYWORD2>_replagtctl-port</KEYWORD2>
- <KEYWORD2>_replagtctl-remotedbname</KEYWORD2>
- <KEYWORD2>_replagtctl-remotehost</KEYWORD2>
- <KEYWORD2>_replagtctl-reservedchar</KEYWORD2>
- <KEYWORD2>_replagtctl-reservedint</KEYWORD2>
- <KEYWORD2>_replagtctl-status</KEYWORD2>
- <KEYWORD2>_replsrv-agentcount</KEYWORD2>
- <KEYWORD2>_replsrv-blockssent</KEYWORD2>
- <KEYWORD2>_replsrv-id</KEYWORD2>
- <KEYWORD2>_replsrv-lastblocksentat</KEYWORD2>
- <KEYWORD2>_replsrv-reservedchar</KEYWORD2>
- <KEYWORD2>_replsrv-reservedint</KEYWORD2>
- <KEYWORD2>_replsrv-starttime</KEYWORD2>
- <KEYWORD2>_resacc</KEYWORD2>
- <KEYWORD2>_resrc</KEYWORD2>
- <KEYWORD2>_resrc-id</KEYWORD2>
- <KEYWORD2>_resrc-lock</KEYWORD2>
- <KEYWORD2>_resrc-name</KEYWORD2>
- <KEYWORD2>_resrc-time</KEYWORD2>
- <KEYWORD2>_resrc-wait</KEYWORD2>
- <KEYWORD2>_rolename</KEYWORD2>
- <KEYWORD2>_rssid</KEYWORD2>
- <KEYWORD2>_scale</KEYWORD2>
- <KEYWORD2>_schemaname</KEYWORD2>
- <KEYWORD2>_screator</KEYWORD2>
- <KEYWORD2>_searchable</KEYWORD2>
- <KEYWORD2>_segment-bytefree</KEYWORD2>
- <KEYWORD2>_segment-bytesused</KEYWORD2>
- <KEYWORD2>_segment-id</KEYWORD2>
- <KEYWORD2>_segment-misc</KEYWORD2>
- <KEYWORD2>_segment-segid</KEYWORD2>
- <KEYWORD2>_segment-segsize</KEYWORD2>
- <KEYWORD2>_segments</KEYWORD2>
- <KEYWORD2>_sel</KEYWORD2>
- <KEYWORD2>_seq</KEYWORD2>
- <KEYWORD2>_seq-incr</KEYWORD2>
- <KEYWORD2>_seq-init</KEYWORD2>
- <KEYWORD2>_seq-max</KEYWORD2>
- <KEYWORD2>_seq-min</KEYWORD2>
- <KEYWORD2>_seq-misc</KEYWORD2>
- <KEYWORD2>_seq-name</KEYWORD2>
- <KEYWORD2>_seq-num</KEYWORD2>
- <KEYWORD2>_seq-owner</KEYWORD2>
- <KEYWORD2>_sequence</KEYWORD2>
- <KEYWORD2>_server-byterec</KEYWORD2>
- <KEYWORD2>_server-bytesent</KEYWORD2>
- <KEYWORD2>_server-currusers</KEYWORD2>
- <KEYWORD2>_server-id</KEYWORD2>
- <KEYWORD2>_server-logins</KEYWORD2>
- <KEYWORD2>_server-maxusers</KEYWORD2>
- <KEYWORD2>_server-misc</KEYWORD2>
- <KEYWORD2>_server-msgrec</KEYWORD2>
- <KEYWORD2>_server-msgsent</KEYWORD2>
- <KEYWORD2>_server-num</KEYWORD2>
- <KEYWORD2>_server-pendconn</KEYWORD2>
- <KEYWORD2>_server-pid</KEYWORD2>
- <KEYWORD2>_server-portnum</KEYWORD2>
- <KEYWORD2>_server-protocol</KEYWORD2>
- <KEYWORD2>_server-qryrec</KEYWORD2>
- <KEYWORD2>_server-recrec</KEYWORD2>
- <KEYWORD2>_server-recsent</KEYWORD2>
- <KEYWORD2>_server-timeslice</KEYWORD2>
- <KEYWORD2>_server-trans</KEYWORD2>
- <KEYWORD2>_server-type</KEYWORD2>
- <KEYWORD2>_server-uptime</KEYWORD2>
- <KEYWORD2>_servers</KEYWORD2>
- <KEYWORD2>_sname</KEYWORD2>
- <KEYWORD2>_sowner</KEYWORD2>
- <KEYWORD2>_space-allocnewrm</KEYWORD2>
- <KEYWORD2>_space-backadd</KEYWORD2>
- <KEYWORD2>_space-bytesalloc</KEYWORD2>
- <KEYWORD2>_space-dbexd</KEYWORD2>
- <KEYWORD2>_space-examined</KEYWORD2>
- <KEYWORD2>_space-fromfree</KEYWORD2>
- <KEYWORD2>_space-fromrm</KEYWORD2>
- <KEYWORD2>_space-front2back</KEYWORD2>
- <KEYWORD2>_space-frontadd</KEYWORD2>
- <KEYWORD2>_space-id</KEYWORD2>
- <KEYWORD2>_space-locked</KEYWORD2>
- <KEYWORD2>_space-misc</KEYWORD2>
- <KEYWORD2>_space-removed</KEYWORD2>
- <KEYWORD2>_space-retfree</KEYWORD2>
- <KEYWORD2>_space-takefree</KEYWORD2>
- <KEYWORD2>_space-trans</KEYWORD2>
- <KEYWORD2>_space-uptime</KEYWORD2>
- <KEYWORD2>_spare1</KEYWORD2>
- <KEYWORD2>_spare2</KEYWORD2>
- <KEYWORD2>_spare3</KEYWORD2>
- <KEYWORD2>_spare4</KEYWORD2>
- <KEYWORD2>_sql_properties</KEYWORD2>
- <KEYWORD2>_sremdb</KEYWORD2>
- <KEYWORD2>_startup</KEYWORD2>
- <KEYWORD2>_startup-aibuffs</KEYWORD2>
- <KEYWORD2>_startup-ainame</KEYWORD2>
- <KEYWORD2>_startup-apwbuffs</KEYWORD2>
- <KEYWORD2>_startup-apwmaxwrites</KEYWORD2>
- <KEYWORD2>_startup-apwqtime</KEYWORD2>
- <KEYWORD2>_startup-apwstime</KEYWORD2>
- <KEYWORD2>_startup-bibuffs</KEYWORD2>
- <KEYWORD2>_startup-bidelay</KEYWORD2>
- <KEYWORD2>_startup-biio</KEYWORD2>
- <KEYWORD2>_startup-biname</KEYWORD2>
- <KEYWORD2>_startup-bitrunc</KEYWORD2>
- <KEYWORD2>_startup-buffs</KEYWORD2>
- <KEYWORD2>_startup-crashprot</KEYWORD2>
- <KEYWORD2>_startup-directio</KEYWORD2>
- <KEYWORD2>_startup-id</KEYWORD2>
- <KEYWORD2>_startup-locktable</KEYWORD2>
- <KEYWORD2>_startup-maxclients</KEYWORD2>
- <KEYWORD2>_startup-maxservers</KEYWORD2>
- <KEYWORD2>_startup-maxusers</KEYWORD2>
- <KEYWORD2>_startup-misc</KEYWORD2>
- <KEYWORD2>_startup-spin</KEYWORD2>
- <KEYWORD2>_statbase</KEYWORD2>
- <KEYWORD2>_statbase-id</KEYWORD2>
- <KEYWORD2>_statementorrow</KEYWORD2>
- <KEYWORD2>_stbl</KEYWORD2>
- <KEYWORD2>_stblowner</KEYWORD2>
- <KEYWORD2>_storageobject</KEYWORD2>
- <KEYWORD2>_summary-aiwrites</KEYWORD2>
- <KEYWORD2>_summary-bireads</KEYWORD2>
- <KEYWORD2>_summary-biwrites</KEYWORD2>
- <KEYWORD2>_summary-chkpts</KEYWORD2>
- <KEYWORD2>_summary-commits</KEYWORD2>
- <KEYWORD2>_summary-dbaccesses</KEYWORD2>
- <KEYWORD2>_summary-dbreads</KEYWORD2>
- <KEYWORD2>_summary-dbwrites</KEYWORD2>
- <KEYWORD2>_summary-flushed</KEYWORD2>
- <KEYWORD2>_summary-id</KEYWORD2>
- <KEYWORD2>_summary-misc</KEYWORD2>
- <KEYWORD2>_summary-reccreat</KEYWORD2>
- <KEYWORD2>_summary-recdel</KEYWORD2>
- <KEYWORD2>_summary-reclock</KEYWORD2>
- <KEYWORD2>_summary-recreads</KEYWORD2>
- <KEYWORD2>_summary-recupd</KEYWORD2>
- <KEYWORD2>_summary-recwait</KEYWORD2>
- <KEYWORD2>_summary-transcomm</KEYWORD2>
- <KEYWORD2>_summary-undos</KEYWORD2>
- <KEYWORD2>_summary-uptime</KEYWORD2>
- <KEYWORD2>_surname</KEYWORD2>
- <KEYWORD2>_sys-field</KEYWORD2>
- <KEYWORD2>_sysattachtbls</KEYWORD2>
- <KEYWORD2>_sysbigintstat</KEYWORD2>
- <KEYWORD2>_syscalctable</KEYWORD2>
- <KEYWORD2>_syscharstat</KEYWORD2>
- <KEYWORD2>_syschkcolusage</KEYWORD2>
- <KEYWORD2>_syschkconstrs</KEYWORD2>
- <KEYWORD2>_syschkconstr_name_map</KEYWORD2>
- <KEYWORD2>_syscolauth</KEYWORD2>
- <KEYWORD2>_syscolstat</KEYWORD2>
- <KEYWORD2>_sysdatatypes</KEYWORD2>
- <KEYWORD2>_sysdatestat</KEYWORD2>
- <KEYWORD2>_sysdbauth</KEYWORD2>
- <KEYWORD2>_sysdblinks</KEYWORD2>
- <KEYWORD2>_sysfloatstat</KEYWORD2>
- <KEYWORD2>_sysidxstat</KEYWORD2>
- <KEYWORD2>_sysintstat</KEYWORD2>
- <KEYWORD2>_syskeycolusage</KEYWORD2>
- <KEYWORD2>_sysncharstat</KEYWORD2>
- <KEYWORD2>_sysnumstat</KEYWORD2>
- <KEYWORD2>_sysnvarcharstat</KEYWORD2>
- <KEYWORD2>_sysprocbin</KEYWORD2>
- <KEYWORD2>_sysproccolumns</KEYWORD2>
- <KEYWORD2>_sysprocedures</KEYWORD2>
- <KEYWORD2>_sysproctext</KEYWORD2>
- <KEYWORD2>_sysrealstat</KEYWORD2>
- <KEYWORD2>_sysrefconstrs</KEYWORD2>
- <KEYWORD2>_sysroles</KEYWORD2>
- <KEYWORD2>_sysschemas</KEYWORD2>
- <KEYWORD2>_sysseqauth</KEYWORD2>
- <KEYWORD2>_syssmintstat</KEYWORD2>
- <KEYWORD2>_syssynonyms</KEYWORD2>
- <KEYWORD2>_systabauth</KEYWORD2>
- <KEYWORD2>_systblconstrs</KEYWORD2>
- <KEYWORD2>_systblstat</KEYWORD2>
- <KEYWORD2>_systimestat</KEYWORD2>
- <KEYWORD2>_systinyintstat</KEYWORD2>
- <KEYWORD2>_systrigcols</KEYWORD2>
- <KEYWORD2>_systrigger</KEYWORD2>
- <KEYWORD2>_systsstat</KEYWORD2>
- <KEYWORD2>_syststzstat</KEYWORD2>
- <KEYWORD2>_sysvarcharstat</KEYWORD2>
- <KEYWORD2>_sysviews</KEYWORD2>
- <KEYWORD2>_sysviews_name_map</KEYWORD2>
- <KEYWORD2>_tablebase</KEYWORD2>
- <KEYWORD2>_tablestat</KEYWORD2>
- <KEYWORD2>_tablestat-create</KEYWORD2>
- <KEYWORD2>_tablestat-delete</KEYWORD2>
- <KEYWORD2>_tablestat-id</KEYWORD2>
- <KEYWORD2>_tablestat-read</KEYWORD2>
- <KEYWORD2>_tablestat-update</KEYWORD2>
- <KEYWORD2>_tbl</KEYWORD2>
- <KEYWORD2>_tbl-status</KEYWORD2>
- <KEYWORD2>_tbl-type</KEYWORD2>
- <KEYWORD2>_tblid</KEYWORD2>
- <KEYWORD2>_tblname</KEYWORD2>
- <KEYWORD2>_tblowner</KEYWORD2>
- <KEYWORD2>_telephone</KEYWORD2>
- <KEYWORD2>_template</KEYWORD2>
- <KEYWORD2>_toss-limit</KEYWORD2>
- <KEYWORD2>_trans</KEYWORD2>
- <KEYWORD2>_trans-coord</KEYWORD2>
- <KEYWORD2>_trans-coordtx</KEYWORD2>
- <KEYWORD2>_trans-counter</KEYWORD2>
- <KEYWORD2>_trans-duration</KEYWORD2>
- <KEYWORD2>_trans-flags</KEYWORD2>
- <KEYWORD2>_trans-id</KEYWORD2>
- <KEYWORD2>_trans-misc</KEYWORD2>
- <KEYWORD2>_trans-num</KEYWORD2>
- <KEYWORD2>_trans-state</KEYWORD2>
- <KEYWORD2>_trans-txtime</KEYWORD2>
- <KEYWORD2>_trans-usrnum</KEYWORD2>
- <KEYWORD2>_trig-crc</KEYWORD2>
- <KEYWORD2>_triggerevent</KEYWORD2>
- <KEYWORD2>_triggerid</KEYWORD2>
- <KEYWORD2>_triggername</KEYWORD2>
- <KEYWORD2>_triggertime</KEYWORD2>
- <KEYWORD2>_txe-id</KEYWORD2>
- <KEYWORD2>_txe-locks</KEYWORD2>
- <KEYWORD2>_txe-lockss</KEYWORD2>
- <KEYWORD2>_txe-time</KEYWORD2>
- <KEYWORD2>_txe-type</KEYWORD2>
- <KEYWORD2>_txe-wait-time</KEYWORD2>
- <KEYWORD2>_txe-waits</KEYWORD2>
- <KEYWORD2>_txe-waitss</KEYWORD2>
- <KEYWORD2>_txelock</KEYWORD2>
- <KEYWORD2>_typeprecision</KEYWORD2>
- <KEYWORD2>_u-misc1</KEYWORD2>
- <KEYWORD2>_u-misc2</KEYWORD2>
- <KEYWORD2>_unique</KEYWORD2>
- <KEYWORD2>_unsignedattr</KEYWORD2>
- <KEYWORD2>_unsorted</KEYWORD2>
- <KEYWORD2>_upd</KEYWORD2>
- <KEYWORD2>_updatable</KEYWORD2>
- <KEYWORD2>_user</KEYWORD2>
- <KEYWORD2>_user-misc</KEYWORD2>
- <KEYWORD2>_user-name</KEYWORD2>
- <KEYWORD2>_userid</KEYWORD2>
- <KEYWORD2>_userio</KEYWORD2>
- <KEYWORD2>_userio-airead</KEYWORD2>
- <KEYWORD2>_userio-aiwrite</KEYWORD2>
- <KEYWORD2>_userio-biread</KEYWORD2>
- <KEYWORD2>_userio-biwrite</KEYWORD2>
- <KEYWORD2>_userio-dbaccess</KEYWORD2>
- <KEYWORD2>_userio-dbread</KEYWORD2>
- <KEYWORD2>_userio-dbwrite</KEYWORD2>
- <KEYWORD2>_userio-id</KEYWORD2>
- <KEYWORD2>_userio-misc</KEYWORD2>
- <KEYWORD2>_userio-name</KEYWORD2>
- <KEYWORD2>_userio-usr</KEYWORD2>
- <KEYWORD2>_userlock</KEYWORD2>
- <KEYWORD2>_userlock-chain</KEYWORD2>
- <KEYWORD2>_userlock-flags</KEYWORD2>
- <KEYWORD2>_userlock-id</KEYWORD2>
- <KEYWORD2>_userlock-misc</KEYWORD2>
- <KEYWORD2>_userlock-name</KEYWORD2>
- <KEYWORD2>_userlock-recid</KEYWORD2>
- <KEYWORD2>_userlock-type</KEYWORD2>
- <KEYWORD2>_userlock-usr</KEYWORD2>
- <KEYWORD2>_username</KEYWORD2>
- <KEYWORD2>_userstatus</KEYWORD2>
- <KEYWORD2>_userstatus-counter</KEYWORD2>
- <KEYWORD2>_userstatus-objectid</KEYWORD2>
- <KEYWORD2>_userstatus-objecttype</KEYWORD2>
- <KEYWORD2>_userstatus-operation</KEYWORD2>
- <KEYWORD2>_userstatus-state</KEYWORD2>
- <KEYWORD2>_userstatus-target</KEYWORD2>
- <KEYWORD2>_userstatus-userid</KEYWORD2>
- <KEYWORD2>_user_number</KEYWORD2>
- <KEYWORD2>_valexp</KEYWORD2>
- <KEYWORD2>_valmsg</KEYWORD2>
- <KEYWORD2>_valmsg-sa</KEYWORD2>
- <KEYWORD2>_value</KEYWORD2>
- <KEYWORD2>_value_ch</KEYWORD2>
- <KEYWORD2>_value_n</KEYWORD2>
- <KEYWORD2>_val_ts</KEYWORD2>
- <KEYWORD2>_vcol-order</KEYWORD2>
- <KEYWORD2>_version</KEYWORD2>
- <KEYWORD2>_view</KEYWORD2>
- <KEYWORD2>_view-as</KEYWORD2>
- <KEYWORD2>_view-col</KEYWORD2>
- <KEYWORD2>_view-def</KEYWORD2>
- <KEYWORD2>_view-name</KEYWORD2>
- <KEYWORD2>_view-ref</KEYWORD2>
- <KEYWORD2>_viewname</KEYWORD2>
- <KEYWORD2>_viewtext</KEYWORD2>
- <KEYWORD2>_where-cls</KEYWORD2>
- <KEYWORD2>_width</KEYWORD2>
- <KEYWORD2>_word-rule</KEYWORD2>
- <KEYWORD2>_word-rules</KEYWORD2>
- <KEYWORD2>_wordidx</KEYWORD2>
- <KEYWORD2>_wr-attr</KEYWORD2>
- <KEYWORD2>_wr-cp</KEYWORD2>
- <KEYWORD2>_wr-name</KEYWORD2>
- <KEYWORD2>_wr-number</KEYWORD2>
- <KEYWORD2>_wr-segment</KEYWORD2>
- <KEYWORD2>_wr-type</KEYWORD2>
- <KEYWORD2>_wr-version</KEYWORD2>
-
-
-
-
-
-
- <!-- INVALID : Deprecated keywords -->
- <INVALID>USE-INDEX</INVALID>
- <INVALID>UNIX</INVALID>
- <INVALID>DOS</INVALID>
- <INVALID>VMS</INVALID>
- <INVALID>BTOS</INVALID>
- <INVALID>CTOS</INVALID>
- <INVALID>OS2</INVALID>
- <INVALID>OS400</INVALID>
- <INVALID>EDITING</INVALID>
- <INVALID>CHOOSE</INVALID>
- <INVALID>PROMPT-FOR</INVALID>
- <INVALID>SHARE-LOCK</INVALID>
- <INVALID>READKEY</INVALID>
- <INVALID>GO-PENDING</INVALID>
- <INVALID>VALIDATE</INVALID>
- <INVALID>IS-ATTR-SPACE</INVALID>
- <INVALID>GATEWAYS</INVALID>
- <INVALID>SCROLL</INVALID>
-
- <!-- Removed or renamed keywords -->
- <INVALID>ITERATION-CHANGED</INVALID>
- <INVALID>BEFORE-RECORD-FILL</INVALID>
- <INVALID>AFTER-RECORD-FILL</INVALID>
- <INVALID>REPOSITION-MODE</INVALID>
-
-
-
- <!-- COMMENT2 : Preprocessor statements -->
- <COMMENT2>&ADM-CONTAINER</COMMENT2>
- <COMMENT2>&ADM-SUPPORTED-LINKS</COMMENT2>
- <COMMENT2>&ANALYZE-RESUME</COMMENT2>
- <COMMENT2>&ANALYZE-SUSPEND</COMMENT2>
- <COMMENT2>&BATCH-MODE</COMMENT2>
- <COMMENT2>&BROWSE-NAME</COMMENT2>
- <COMMENT2>&DEFINED</COMMENT2>
- <COMMENT2>&DISPLAYED-FIELDS</COMMENT2>
- <COMMENT2>&DISPLAYED-OBJECTS</COMMENT2>
- <COMMENT2>&ELSE</COMMENT2>
- <COMMENT2>&ELSEIF</COMMENT2>
- <COMMENT2>&ENABLED-FIELDS-IN-QUERY</COMMENT2>
- <COMMENT2>&ENABLED-FIELDS</COMMENT2>
- <COMMENT2>&ENABLED-OBJECTS</COMMENT2>
- <COMMENT2>&ENABLED-TABLES-IN-QUERY</COMMENT2>
- <COMMENT2>&ENABLED-TABLES</COMMENT2>
- <COMMENT2>&ENDIF</COMMENT2>
- <COMMENT2>&EXTERNAL-TABLES</COMMENT2>
- <COMMENT2>&FIELD-PAIRS-IN-QUERY</COMMENT2>
- <COMMENT2>&FIELD-PAIRS</COMMENT2>
- <COMMENT2>&FIELDS-IN-QUERY</COMMENT2>
- <COMMENT2>&FILE-NAME</COMMENT2>
- <COMMENT2>&FIRST-EXTERNAL-TABLE</COMMENT2>
- <COMMENT2>&FIRST-TABLE-IN-QUERY</COMMENT2>
- <COMMENT2>&FRAME-NAME</COMMENT2>
- <COMMENT2>&GLOB</COMMENT2>
- <COMMENT2>&GLOBAL-DEFINE</COMMENT2>
- <COMMENT2>&IF</COMMENT2>
- <COMMENT2>&INCLUDE</COMMENT2>
- <COMMENT2>&INTERNAL-TABLES</COMMENT2>
- <COMMENT2>&LAYOUT-VARIABLE</COMMENT2>
- <COMMENT2>&LINE-NUMBER</COMMENT2>
- <COMMENT2>&LIST-1</COMMENT2>
- <COMMENT2>&LIST-2</COMMENT2>
- <COMMENT2>&LIST-3</COMMENT2>
- <COMMENT2>&LIST-4</COMMENT2>
- <COMMENT2>&LIST-5</COMMENT2>
- <COMMENT2>&LIST-6</COMMENT2>
- <COMMENT2>&MESSAGE</COMMENT2>
- <COMMENT2>&NEW</COMMENT2>
- <COMMENT2>&OPEN-BROWSERS-IN-QUERY</COMMENT2>
- <COMMENT2>&OPEN-QUERY</COMMENT2>
- <COMMENT2>&OPSYS</COMMENT2>
- <COMMENT2>&PROCEDURE-TYPE</COMMENT2>
- <COMMENT2>&QUERY-NAME</COMMENT2>
- <COMMENT2>&SCOP</COMMENT2>
- <COMMENT2>&SCOPED-DEFINE</COMMENT2>
- <COMMENT2>&SELF-NAME</COMMENT2>
- <COMMENT2>&SEQUENCE</COMMENT2>
- <COMMENT2>&TABLES-IN-QUERY</COMMENT2>
- <COMMENT2>&THEN</COMMENT2>
- <COMMENT2>&UIB_is_Running</COMMENT2>
- <COMMENT2>&UNDEFINE</COMMENT2>
- <COMMENT2>&WINDOW-NAME</COMMENT2>
- <COMMENT2>&WINDOW-SYSTEM</COMMENT2>
- <COMMENT2>DEFINED</COMMENT2>
- <COMMENT2>PROCEDURE-TYPE</COMMENT2>
- <COMMENT2>_CREATE-WINDOW</COMMENT2>
- <COMMENT2>_CUSTOM _DEFINITIONS</COMMENT2>
- <COMMENT2>_CUSTOM _MAIN-BLOCK</COMMENT2>
- <COMMENT2>_CUSTOM</COMMENT2>
- <COMMENT2>_DEFINITIONS</COMMENT2>
- <COMMENT2>_END-PROCEDURE-SETTINGS</COMMENT2>
- <COMMENT2>_FUNCTION-FORWARD</COMMENT2>
- <COMMENT2>_FUNCTION</COMMENT2>
- <COMMENT2>_INCLUDED-LIB</COMMENT2>
- <COMMENT2>_INLINE</COMMENT2>
- <COMMENT2>_MAIN-BLOCK</COMMENT2>
- <COMMENT2>_PROCEDURE-SETTINGS</COMMENT2>
- <COMMENT2>_PROCEDURE</COMMENT2>
- <COMMENT2>_UIB-CODE-BLOCK</COMMENT2>
- <COMMENT2>_UIB-PREPROCESSOR-BLOCK</COMMENT2>
- <COMMENT2>_VERSION-NUMBER</COMMENT2>
- <COMMENT2>_XFTR</COMMENT2>
-
- </KEYWORDS>
- </RULES>
-
-
-</MODE>
-
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- ====================================================================== -->
+<!-- Progress mode for jEdit 4.2+ -->
+<!-- -->
+<!-- This is a jEdit syntax file for Progress Open Edge 10.0A -->
+<!-- -->
+<!-- For comments / suggestions / contributions, please contact me at -->
+<!-- p.tingen at vcd.nl -->
+<!-- -->
+<!-- ====================================================================== -->
+<!-- -->
+<!-- Contributors: PT Patrick Tingen -->
+<!-- GW Gerben Wieringa -->
+<!-- SH Stephen Hawkins -->
+<!-- -->
+<!-- ====================================================================== -->
+<!-- 2001-07-17 PT Initial version for Progress 8.2 -->
+<!-- 2002-10-08 GW Added some keywords -->
+<!-- 2003-02-18 PT Added some keywords -->
+<!-- 2003-05-21 PT Rewritten. Thanks to GW & SH ! -->
+<!-- 2004-01-26 PT Generated using Progress program for Progress 9.1D -->
+<!-- 2004-02-04 PT Generated using Progress program for Open Edge 10.0A -->
+<!-- 2004-02-06 PT Corrected due to validating errors against xmode.dtd -->
+<!-- 2004-02-16 PT Fixed 'or choose of' being reported as invalid. -->
+<!-- 2004-04-29 PT Added some appbuilder constants -->
+<!-- ====================================================================== -->
+<!-- Special thanks to Gerben and Stephen for their support. -->
+<!-- ====================================================================== -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="boxComment" VALUE="**" />
+ <PROPERTY NAME="lineComment" VALUE="&scop cmt " />
+ <PROPERTY NAME="indentNextLine" VALUE="\s*(if|do|for|else|case|repeat|procedure|function)(\s+.*|\s*)" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",.;:/?^[]@" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ </PROPS>
+
+ <RULES SET="COMMENT" DEFAULT="COMMENT1" IGNORE_CASE="TRUE">
+ <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
+ <BEGIN>/*</BEGIN> <END>*/</END>
+ </SPAN>
+ </RULES>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- COMMENT1 : Normal Progress comments -->
+ <!-- LITERAL1 : text between ' or " -->
+ <!-- LITERAL2 : -->
+ <!-- MARKUP : -->
+ <!-- LABEL : Progress block labels -->
+ <!-- FUNCTION : attributes and methods -->
+ <!-- OPERATOR : All operators -->
+ <!-- INVALID : Deprecated keywords -->
+ <!-- NON INVALID: Correction for non-invalid keywords -->
+
+ <!-- COMMENT1 : Normal Progress comments -->
+ <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <!-- LITERAL1 : text between ' or " -->
+ <SPAN TYPE="LITERAL1" ESCAPE="~">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="~">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- LABEL : Progress block labels -->
+ <MARK_FOLLOWING TYPE="LABEL">{&</MARK_FOLLOWING>
+
+ <!-- OPERATOR : All operators -->
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <!-- GT, EQ etc -->
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+
+ <!-- LABEL : Progress block labels -->
+ <!-- Better would be to search for regexp ^[[:blank:]]*[[:graph:]]+:$ -->
+ <!-- but this is not (yet) implemented since regexps cannot match -->
+ <!-- anything that does not have a fixed starting character. -->
+ <MARK_PREVIOUS TYPE="LABEL" AT_WHITESPACE_END="TRUE" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+
+ <!-- FUNCTION : attributes and methods -->
+ <MARK_FOLLOWING TYPE="FUNCTION">:accelerator</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:accept-changes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:accept-row-changes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-buffer</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-calc-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-columns-from</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-events-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-fields-from</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-first</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-index-field</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-last</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-like-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-like-field</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-like-index</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-new-field</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-new-index</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:add-super-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:adm-data</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:after-buffer</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:after-rowid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:after-table</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:allow-column-searching</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:always-on-top</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:ambiguous</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:append-child</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:appl-alert-boxes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:apply-callback</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:appserver-info</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:appserver-password</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:appserver-userid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:async-request-count</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:async-request-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:asynchronous</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:attach-data-source</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:attr-space</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:attribute-names</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-completion</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-delete</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-delete-xml</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-end-key</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-go</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-indent</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-resize</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-return</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-validate</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:auto-zap</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:available</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:available-formats</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:background</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:base-ade</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:basic-logging</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:batch-mode</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:before-buffer</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:before-rowid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:before-table</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:bgcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:blank</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:block-iteration-display</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:border-bottom-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:border-bottom-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:border-left-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:border-left-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:border-right-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:border-right-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:border-top-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:border-top-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:box</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:box-selectable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:browse-column-data-types</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:browse-column-formats</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:browse-column-labels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-compare</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-copy</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-create</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-delete</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-field</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-lines</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-release</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-validate</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:buffer-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:bytes-read</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:bytes-written</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cache</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:call-name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:call-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:can-create</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:can-delete</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:can-read</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:can-write</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cancel-break</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cancel-button</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cancel-requests</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cancelled</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:careful-paint</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:case-sensitive</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:centered</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:character_length</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:charset</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:checked</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:child-num</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:clear</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:clear-selection</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:client-connection-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:client-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:clone-node</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:code</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:codepage</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-bgcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-dcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-fgcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-font</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-label</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-movable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-pfcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-read-only</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-resizable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:column-scrolling</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:columns</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:com-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:complete</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:config-name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:connect</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:connected</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:context-help</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:context-help-file</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:context-help-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:control-box</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:convert-3d-colors</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:convert-to-offset</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:coverage</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cpcase</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cpcoll</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cplog</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cpprint</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cprcodein</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cprcodeout</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cpstream</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cpterm</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:crc-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:create-like</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:create-node</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:create-node-namespace</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:create-on-add</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:create-result-list-entry</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:current-changed</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:current-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:current-environment</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:current-iteration</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:current-result-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:current-row-modified</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:current-window</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cursor-char</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cursor-line</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:cursor-offset</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:data-entry-return</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:data-source</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:data-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dataset</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:date-format</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:db-references</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dbname</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dde-error</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dde-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dde-item</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dde-name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dde-topic</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:deblank</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:debug</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:debug-alert</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:decimals</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:default</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:default-buffer-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:default-button</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:default-commit</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:default-string</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:delete</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:delete-current-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:delete-line</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:delete-node</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:delete-result-list-entry</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:delete-selected-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:delete-selected-rows</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:delimiter</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:description</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:deselect-focused-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:deselect-rows</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:deselect-selected-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:detach-data-source</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:directory</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:disable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:disable-auto-zap</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:disable-connections</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:disable-dump-triggers</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:disable-load-triggers</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:disconnect</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:display-message</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:display-timezone</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:display-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:down</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:drag-enabled</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:drop-target</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dump-logging-now</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:dynamic</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:edge-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:edge-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:edit-can-paste</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:edit-can-undo</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:edit-clear</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:edit-copy</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:edit-cut</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:edit-paste</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:edit-undo</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:empty</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:empty-temp-table</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:enable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:enable-connections</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:enabled</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:encoding</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:end-file-drop</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:end-user-prompt</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:error-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:error-object-detail</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:error-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:error-string</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:event-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:event-procedure-context</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:event-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:exclusive-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:execution-log</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:expand</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:expandable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:export</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:extent</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:fetch-selected-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:fgcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:file-create-date</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:file-create-time</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:file-mod-date</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:file-mod-time</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:file-name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:file-offset</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:file-size</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:file-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:fill</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:fill-mode</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:filled</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:find-by-rowid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:find-current</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:find-first</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:find-last</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:find-unique</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-async-request</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-buffer</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-child</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-data-source</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-dataset</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-query</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-server</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-server-socket</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-socket</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:first-tab-item</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:fit-last-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:flat-button</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:focused-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:focused-row-selected</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:font</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:font-based-layout</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:foreground</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:form-input</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:format</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:forward-only</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:frame</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:frame-col</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:frame-name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:frame-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:frame-spacing</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:frame-x</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:frame-y</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:frequency</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:full-height-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:full-height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:full-pathname</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:full-width-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:full-width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:function</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-attribute</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-attribute-node</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-blue-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-browse-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-buffer-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-bytes-available</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-cgi-list</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-cgi-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-changes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-child</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-child-relation</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-config-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-current</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-document-element</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-dropped-file</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-dynamic</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-first</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-green-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-iteration</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-last</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-message</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-next</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-number</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-parent</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-prev</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-printers</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-red-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-repositioned-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-rgb-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-selected-widget</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-signature</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-socket-option</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-tab-item</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-text-height-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-text-height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-text-width-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-text-width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:get-wait-state</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:graphic-edge</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:grid-factor-horizontal</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:grid-factor-vertical</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:grid-snap</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:grid-unit-height-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:grid-unit-height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:grid-unit-width-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:grid-unit-width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:grid-visible</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:handler</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:has-lobs</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:has-records</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:height-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:hidden</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:horizontal</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:html-charset</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:html-end-of-line</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:html-end-of-page</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:html-frame-begin</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:html-frame-end</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:html-header-begin</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:html-header-end</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:html-title-begin</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:html-title-end</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:hwnd</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:icfparameter</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:icon</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:image</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:image-down</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:image-insensitive</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:image-up</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:immediate-display</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:import-node</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:in-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:increment-exclusive-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:index</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:index-information</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:initial</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:initialize-document-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:initiate</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:inner-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:inner-lines</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:input-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:insert</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:insert-backtab</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:insert-before</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:insert-file</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:insert-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:insert-string</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:insert-tab</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:instantiating-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:internal-entries</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:invoke</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:is-open</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:is-parameter-set</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:is-row-selected</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:is-selected</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:is-xml</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:items-per-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:keep-connection-open</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:keep-frame-z-order</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:keep-security-cache</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:key</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:label</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:label-bgcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:label-dcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:label-fgcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:label-font</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:labels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:languages</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:large</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:large-to-small</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:last-async-request</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:last-child</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:last-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:last-server</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:last-server-socket</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:last-socket</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:last-tab-item</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:line</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:list-item-pairs</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:list-items</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:listings</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:literal-question</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:load</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:load-icon</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:load-image</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:load-image-down</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:load-image-insensitive</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:load-image-up</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:load-mouse-pointer</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:load-small-icon</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:local-host</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:local-name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:local-port</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:locator-column-number</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:locator-line-number</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:locator-public-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:locator-system-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:locator-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:locked</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:log-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:longchar-to-node-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:lookup</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:mandatory</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:manual-highlight</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:margin-height-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:margin-height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:margin-width-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:margin-width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:max-button</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:max-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:max-data-guess</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:max-height-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:max-height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:max-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:max-width-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:max-width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:md5-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:memptr-to-node-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:menu-bar</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:menu-key</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:menu-mouse</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:merge-changes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:merge-row-changes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:message-area</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:message-area-font</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:min-button</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:min-column-width-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:min-column-width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:min-height-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:min-height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:min-schema-marshall</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:min-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:min-width-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:min-width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:modified</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:mouse-pointer</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:movable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:move-after-tab-item</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:move-before-tab-item</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:move-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:move-to-bottom</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:move-to-eof</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:move-to-top</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:multiple</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:multitasking-interval</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:namespace-prefix</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:namespace-uri</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:needs-appserver-prompt</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:needs-prompt</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:new</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:new-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:next-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:next-sibling</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:next-tab-item</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:no-current-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:no-empty-space</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:no-focus</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:no-schema-marshall</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:no-validate</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:node-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:node-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:node-value-to-longchar</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:node-value-to-memptr</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:normalize</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-buffers</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-buttons</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-child-relations</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-children</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-columns</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-dropped-files</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-entries</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-fields</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-formats</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-items</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-iterations</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-lines</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-locked-columns</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-messages</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-parameters</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-replaced</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-results</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-selected-rows</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-selected-widgets</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-tabs</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-to-retain</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:num-visible-columns</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:numeric-decimal-point</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:numeric-format</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:numeric-separator</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:ole-invoke-locale</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:ole-names-locale</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:on-frame-border</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:origin-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:origin-rowid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:overlay</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:owner</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:owner-document</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:page-bottom</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:page-top</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:parameter</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:parent</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:parent-relation</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:parse-status</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:password-field</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:pathname</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:persistent</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:persistent-cache-disabled</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:persistent-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:pfcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:pixels-per-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:pixels-per-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:popup-menu</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:popup-only</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:position</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:prepare-string</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:prepared</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:prev-column</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:prev-sibling</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:prev-tab-item</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:primary</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:printer-control-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:printer-hdc</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:printer-name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:printer-port</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:private-data</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:procedure-name</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:profiling</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:progress-source</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:proxy</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:proxy-password</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:proxy-userid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:public-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:published-events</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:query</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:query-close</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:query-off-end</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:query-open</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:query-prepare</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:quit</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:radio-buttons</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:raw-transfer</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:read</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:read-file</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:read-only</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:recid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:record-length</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:refresh</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:refreshable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:reject-changes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:reject-row-changes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:rejected</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:remote</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:remote-host</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:remote-port</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:remove-attribute</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:remove-child</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:remove-events-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:remove-super-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:replace</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:replace-child</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:replace-selection-text</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:reposition-backwards</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:reposition-forwards</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:reposition-parent-relation</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:reposition-to-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:reposition-to-rowid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:resizable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:resize</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:retain-shape</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:return-inserted</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:return-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:return-value-data-type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:row-height-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:row-height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:row-markers</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:row-resizable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:row-state</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:rowid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:rule-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:rule-y</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:save</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:save-file</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:save-row-changes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:sax-parse</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:sax-parse-first</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:sax-parse-next</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:sax-xml</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:schema-change</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:schema-path</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:screen-lines</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:screen-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:scroll-bars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:scroll-delta</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:scroll-offset</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:scroll-to-current-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:scroll-to-item</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:scroll-to-selected-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:scrollable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:scrollbar-horizontal</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:scrollbar-vertical</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:search</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:select-all</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:select-focused-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:select-next-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:select-prev-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:select-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:selectable</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:selected</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:selection-end</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:selection-start</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:selection-text</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:sensitive</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:separator-fgcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:separators</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:server</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:server-connection-bound</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:server-connection-bound-request</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:server-connection-context</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:server-connection-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:server-operating-mode</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:session-end</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-attribute</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-attribute-node</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-blue-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-break</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-buffers</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-callback-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-commit</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-connect-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-dynamic</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-green-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-input-source</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-numeric-format</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-parameter</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-read-response-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-red-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-repositioned-row</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-rgb-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-rollback</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-selection</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-socket-option</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:set-wait-state</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:show-in-taskbar</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:side-label-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:side-labels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:skip-deleted-record</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:small-icon</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:small-title</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:sort</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:startup-parameters</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:status-area</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:status-area-font</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:stop</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:stop-parsing</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:stopped</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:stretch-to-fit</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:string-value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:sub-menu-help</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:subtype</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:super-procedures</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:suppress-namespace-processing</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:suppress-warnings</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:synchronize</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:system-alert-boxes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:system-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:tab-position</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:tab-stop</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:table</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:table-crc-list</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:table-handle</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:table-list</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:table-number</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:temp-directory</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:temp-table-prepare</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:text-selected</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:three-d</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:tic-marks</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:time-source</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:title</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:title-bgcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:title-dcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:title-fgcolor</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:title-font</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:toggle-box</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:tooltip</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:tooltips</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:top-only</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:trace-filter</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:tracing</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:tracking-changes</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:trans-init-procedure</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:transaction</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:transparent</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:type</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:undo</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:unique-id</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:unique-match</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:url</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:url-decode</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:url-encode</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:url-password</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:url-userid</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:user-data</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:v6display</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:validate</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:validate-expression</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:validate-message</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:validate-xml</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:validation-enabled</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:value</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:view-first-column-on-reopen</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:virtual-height-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:virtual-height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:virtual-width-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:virtual-width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:visible</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:warning</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:widget-enter</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:widget-leave</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:width-chars</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:window</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:window-state</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:window-system</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:word-wrap</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:work-area-height-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:work-area-width-pixels</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:work-area-x</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:work-area-y</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:write</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:write-data</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:x</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:x-document</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:xml-schema-path</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:xml-suppress-namespace-processing</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:y</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:year-offset</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION">:_dcm</MARK_FOLLOWING>
+
+ <!-- INVALID : Deprecated keywords -->
+ <SEQ_REGEXP TYPE="INVALID" HASH_CHAR="put" AT_WORD_START="TRUE">put\s+screen</SEQ_REGEXP>
+ <MARK_FOLLOWING TYPE="INVALID">:WHERE-STRING</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="INVALID">:REPOSITION-PARENT-RELATION</MARK_FOLLOWING>
+
+ <!-- NON INVALID: Correction for non-invalid keywords -->
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="choose" AT_WORD_START="TRUE">choose\s+of</SEQ_REGEXP>
+
+ <KEYWORDS>
+ <!-- Keep the following sections in the specified order since -->
+ <!-- some keywords occur in more than 1 section. The last one -->
+ <!-- determines the appearance of a certain keyword. -->
+
+ <!-- KEYWORD3 : events -->
+ <!-- KEYWORD1 : Statements, functions, attributes, methods -->
+ <!-- KEYWORD2 : VST & metaschema files and fields -->
+ <!-- INVALID : Deprecated keywords -->
+ <!-- COMMENT2 : Preprocessor statements -->
+
+ <!-- KEYWORD3 : events -->
+ <KEYWORD3>any-key</KEYWORD3>
+ <KEYWORD3>any-printable</KEYWORD3>
+ <KEYWORD3>back-tab</KEYWORD3>
+ <KEYWORD3>backspace</KEYWORD3>
+ <KEYWORD3>bell</KEYWORD3>
+ <KEYWORD3>choose</KEYWORD3>
+ <KEYWORD3>container-event</KEYWORD3>
+ <KEYWORD3>dde-notify</KEYWORD3>
+ <KEYWORD3>default-action</KEYWORD3>
+ <KEYWORD3>del</KEYWORD3>
+ <KEYWORD3>delete-char</KEYWORD3>
+ <KEYWORD3>delete-character</KEYWORD3>
+ <KEYWORD3>deselect</KEYWORD3>
+ <KEYWORD3>deselection</KEYWORD3>
+ <KEYWORD3>drop-file-notify</KEYWORD3>
+ <KEYWORD3>empty-selection</KEYWORD3>
+ <KEYWORD3>end</KEYWORD3>
+ <KEYWORD3>end-box-selection</KEYWORD3>
+ <KEYWORD3>end-error</KEYWORD3>
+ <KEYWORD3>end-move</KEYWORD3>
+ <KEYWORD3>end-resize</KEYWORD3>
+ <KEYWORD3>end-search</KEYWORD3>
+ <KEYWORD3>endkey</KEYWORD3>
+ <KEYWORD3>entry</KEYWORD3>
+ <KEYWORD3>error</KEYWORD3>
+ <KEYWORD3>go</KEYWORD3>
+ <KEYWORD3>help</KEYWORD3>
+ <KEYWORD3>home</KEYWORD3>
+ <KEYWORD3>leave</KEYWORD3>
+ <KEYWORD3>menu-drop</KEYWORD3>
+ <KEYWORD3>off-end</KEYWORD3>
+ <KEYWORD3>off-home</KEYWORD3>
+ <KEYWORD3>parent-window-close</KEYWORD3>
+ <KEYWORD3>procedure-complete</KEYWORD3>
+ <KEYWORD3>read-response</KEYWORD3>
+ <KEYWORD3>recall</KEYWORD3>
+ <KEYWORD3>return</KEYWORD3>
+ <KEYWORD3>row-display</KEYWORD3>
+ <KEYWORD3>row-entry</KEYWORD3>
+ <KEYWORD3>row-leave</KEYWORD3>
+ <KEYWORD3>scroll-notify</KEYWORD3>
+ <KEYWORD3>select</KEYWORD3>
+ <KEYWORD3>selection</KEYWORD3>
+ <KEYWORD3>start-box-selection</KEYWORD3>
+ <KEYWORD3>start-move</KEYWORD3>
+ <KEYWORD3>start-resize</KEYWORD3>
+ <KEYWORD3>start-search</KEYWORD3>
+ <KEYWORD3>tab</KEYWORD3>
+ <KEYWORD3>value-changed</KEYWORD3>
+ <KEYWORD3>window-close</KEYWORD3>
+ <KEYWORD3>window-maximized</KEYWORD3>
+ <KEYWORD3>window-minimized</KEYWORD3>
+ <KEYWORD3>window-resized</KEYWORD3>
+ <KEYWORD3>window-restored</KEYWORD3>
+
+
+ <!-- KEYWORD1 : Statements, functions -->
+ <KEYWORD1>abort</KEYWORD1>
+ <KEYWORD1>absolute</KEYWORD1>
+ <KEYWORD1>accelerator</KEYWORD1>
+ <KEYWORD1>accept-changes</KEYWORD1>
+ <KEYWORD1>accept-row-changes</KEYWORD1>
+ <KEYWORD1>accumulate</KEYWORD1>
+ <KEYWORD1>across</KEYWORD1>
+ <KEYWORD1>active</KEYWORD1>
+ <KEYWORD1>active-window</KEYWORD1>
+ <KEYWORD1>actor</KEYWORD1>
+ <KEYWORD1>add</KEYWORD1>
+ <KEYWORD1>add-buffer</KEYWORD1>
+ <KEYWORD1>add-calc-column</KEYWORD1>
+ <KEYWORD1>add-columns-from</KEYWORD1>
+ <KEYWORD1>add-events-procedure</KEYWORD1>
+ <KEYWORD1>add-fields-from</KEYWORD1>
+ <KEYWORD1>add-first</KEYWORD1>
+ <KEYWORD1>add-header-entry</KEYWORD1>
+ <KEYWORD1>add-index-field</KEYWORD1>
+ <KEYWORD1>add-interval</KEYWORD1>
+ <KEYWORD1>add-last</KEYWORD1>
+ <KEYWORD1>add-like-column</KEYWORD1>
+ <KEYWORD1>add-like-field</KEYWORD1>
+ <KEYWORD1>add-like-index</KEYWORD1>
+ <KEYWORD1>add-new-field</KEYWORD1>
+ <KEYWORD1>add-new-index</KEYWORD1>
+ <KEYWORD1>add-relation</KEYWORD1>
+ <KEYWORD1>add-source-buffer</KEYWORD1>
+ <KEYWORD1>add-super-procedure</KEYWORD1>
+ <KEYWORD1>adm-data</KEYWORD1>
+ <KEYWORD1>advise</KEYWORD1>
+ <KEYWORD1>after-buffer</KEYWORD1>
+ <KEYWORD1>after-rowid</KEYWORD1>
+ <KEYWORD1>after-table</KEYWORD1>
+ <KEYWORD1>alert-box</KEYWORD1>
+ <KEYWORD1>alias</KEYWORD1>
+ <KEYWORD1>all</KEYWORD1>
+ <KEYWORD1>allow-column-searching</KEYWORD1>
+ <KEYWORD1>allow-replication</KEYWORD1>
+ <KEYWORD1>alter</KEYWORD1>
+ <KEYWORD1>alternate-key</KEYWORD1>
+ <KEYWORD1>always-on-top</KEYWORD1>
+ <KEYWORD1>ambiguous</KEYWORD1>
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>ansi-only</KEYWORD1>
+ <KEYWORD1>any</KEYWORD1>
+ <KEYWORD1>anywhere</KEYWORD1>
+ <KEYWORD1>append</KEYWORD1>
+ <KEYWORD1>append-child</KEYWORD1>
+ <KEYWORD1>append-line</KEYWORD1>
+ <KEYWORD1>appl-alert-boxes</KEYWORD1>
+ <KEYWORD1>application</KEYWORD1>
+ <KEYWORD1>apply</KEYWORD1>
+ <KEYWORD1>apply-callback</KEYWORD1>
+ <KEYWORD1>appserver-info</KEYWORD1>
+ <KEYWORD1>appserver-password</KEYWORD1>
+ <KEYWORD1>appserver-userid</KEYWORD1>
+ <KEYWORD1>array-message</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>as-cursor</KEYWORD1>
+ <KEYWORD1>ascending</KEYWORD1>
+ <KEYWORD1>ask-overwrite</KEYWORD1>
+ <KEYWORD1>assign</KEYWORD1>
+ <KEYWORD1>async-request-count</KEYWORD1>
+ <KEYWORD1>async-request-handle</KEYWORD1>
+ <KEYWORD1>asynchronous</KEYWORD1>
+ <KEYWORD1>at</KEYWORD1>
+ <KEYWORD1>attach</KEYWORD1>
+ <KEYWORD1>attach-data-source</KEYWORD1>
+ <KEYWORD1>attachment</KEYWORD1>
+ <KEYWORD1>attr-space</KEYWORD1>
+ <KEYWORD1>attribute-names</KEYWORD1>
+ <KEYWORD1>attribute-type</KEYWORD1>
+ <KEYWORD1>authorization</KEYWORD1>
+ <KEYWORD1>auto-completion</KEYWORD1>
+ <KEYWORD1>auto-delete</KEYWORD1>
+ <KEYWORD1>auto-delete-xml</KEYWORD1>
+ <KEYWORD1>auto-end-key</KEYWORD1>
+ <KEYWORD1>auto-endkey</KEYWORD1>
+ <KEYWORD1>auto-go</KEYWORD1>
+ <KEYWORD1>auto-indent</KEYWORD1>
+ <KEYWORD1>auto-resize</KEYWORD1>
+ <KEYWORD1>auto-return</KEYWORD1>
+ <KEYWORD1>auto-validate</KEYWORD1>
+ <KEYWORD1>auto-zap</KEYWORD1>
+ <KEYWORD1>automatic</KEYWORD1>
+ <KEYWORD1>available</KEYWORD1>
+ <KEYWORD1>available-formats</KEYWORD1>
+ <KEYWORD1>average</KEYWORD1>
+ <KEYWORD1>avg</KEYWORD1>
+ <KEYWORD1>background</KEYWORD1>
+ <KEYWORD1>backwards</KEYWORD1>
+ <KEYWORD1>base-ade</KEYWORD1>
+ <KEYWORD1>base-key</KEYWORD1>
+ <KEYWORD1>base64</KEYWORD1>
+ <KEYWORD1>basic-logging</KEYWORD1>
+ <KEYWORD1>batch-mode</KEYWORD1>
+ <KEYWORD1>before-buffer</KEYWORD1>
+ <KEYWORD1>before-hide</KEYWORD1>
+ <KEYWORD1>before-rowid</KEYWORD1>
+ <KEYWORD1>before-table</KEYWORD1>
+ <KEYWORD1>begins</KEYWORD1>
+ <KEYWORD1>between</KEYWORD1>
+ <KEYWORD1>bgcolor</KEYWORD1>
+ <KEYWORD1>big-endian</KEYWORD1>
+ <KEYWORD1>binary</KEYWORD1>
+ <KEYWORD1>bind-where</KEYWORD1>
+ <KEYWORD1>blank</KEYWORD1>
+ <KEYWORD1>blob</KEYWORD1>
+ <KEYWORD1>block</KEYWORD1>
+ <KEYWORD1>block-iteration-display</KEYWORD1>
+ <KEYWORD1>border-bottom</KEYWORD1>
+ <KEYWORD1>border-bottom-chars</KEYWORD1>
+ <KEYWORD1>border-bottom-pixels</KEYWORD1>
+ <KEYWORD1>border-left</KEYWORD1>
+ <KEYWORD1>border-left-chars</KEYWORD1>
+ <KEYWORD1>border-left-pixels</KEYWORD1>
+ <KEYWORD1>border-right</KEYWORD1>
+ <KEYWORD1>border-right-chars</KEYWORD1>
+ <KEYWORD1>border-right-pixels</KEYWORD1>
+ <KEYWORD1>border-top</KEYWORD1>
+ <KEYWORD1>border-top-chars</KEYWORD1>
+ <KEYWORD1>border-top-pixels</KEYWORD1>
+ <KEYWORD1>both</KEYWORD1>
+ <KEYWORD1>bottom</KEYWORD1>
+ <KEYWORD1>bottom-column</KEYWORD1>
+ <KEYWORD1>box</KEYWORD1>
+ <KEYWORD1>box-selectable</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>break-line</KEYWORD1>
+ <KEYWORD1>browse</KEYWORD1>
+ <KEYWORD1>browse-column-data-types</KEYWORD1>
+ <KEYWORD1>browse-column-formats</KEYWORD1>
+ <KEYWORD1>browse-column-labels</KEYWORD1>
+ <KEYWORD1>browse-header</KEYWORD1>
+ <KEYWORD1>btos</KEYWORD1>
+ <KEYWORD1>buffer</KEYWORD1>
+ <KEYWORD1>buffer-chars</KEYWORD1>
+ <KEYWORD1>buffer-compare</KEYWORD1>
+ <KEYWORD1>buffer-copy</KEYWORD1>
+ <KEYWORD1>buffer-create</KEYWORD1>
+ <KEYWORD1>buffer-delete</KEYWORD1>
+ <KEYWORD1>buffer-field</KEYWORD1>
+ <KEYWORD1>buffer-handle</KEYWORD1>
+ <KEYWORD1>buffer-lines</KEYWORD1>
+ <KEYWORD1>buffer-name</KEYWORD1>
+ <KEYWORD1>buffer-release</KEYWORD1>
+ <KEYWORD1>buffer-validate</KEYWORD1>
+ <KEYWORD1>buffer-value</KEYWORD1>
+ <KEYWORD1>buttons</KEYWORD1>
+ <KEYWORD1>by</KEYWORD1>
+ <KEYWORD1>by-pointer</KEYWORD1>
+ <KEYWORD1>by-reference</KEYWORD1>
+ <KEYWORD1>by-value</KEYWORD1>
+ <KEYWORD1>by-variant-pointer</KEYWORD1>
+ <KEYWORD1>byte</KEYWORD1>
+ <KEYWORD1>bytes-read</KEYWORD1>
+ <KEYWORD1>bytes-written</KEYWORD1>
+ <KEYWORD1>cache</KEYWORD1>
+ <KEYWORD1>cache-size</KEYWORD1>
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>call-name</KEYWORD1>
+ <KEYWORD1>call-type</KEYWORD1>
+ <KEYWORD1>can-create</KEYWORD1>
+ <KEYWORD1>can-delete</KEYWORD1>
+ <KEYWORD1>can-do</KEYWORD1>
+ <KEYWORD1>can-find</KEYWORD1>
+ <KEYWORD1>can-query</KEYWORD1>
+ <KEYWORD1>can-read</KEYWORD1>
+ <KEYWORD1>can-set</KEYWORD1>
+ <KEYWORD1>can-write</KEYWORD1>
+ <KEYWORD1>cancel-break</KEYWORD1>
+ <KEYWORD1>cancel-button</KEYWORD1>
+ <KEYWORD1>cancel-pick</KEYWORD1>
+ <KEYWORD1>cancel-requests</KEYWORD1>
+ <KEYWORD1>cancelled</KEYWORD1>
+ <KEYWORD1>caps</KEYWORD1>
+ <KEYWORD1>careful-paint</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>case-sensitive</KEYWORD1>
+ <KEYWORD1>cdecl</KEYWORD1>
+ <KEYWORD1>centered</KEYWORD1>
+ <KEYWORD1>chained</KEYWORD1>
+ <KEYWORD1>character</KEYWORD1>
+ <KEYWORD1>character_length</KEYWORD1>
+ <KEYWORD1>charset</KEYWORD1>
+ <KEYWORD1>check</KEYWORD1>
+ <KEYWORD1>checked</KEYWORD1>
+ <KEYWORD1>child-buffer</KEYWORD1>
+ <KEYWORD1>child-num</KEYWORD1>
+ <KEYWORD1>choices</KEYWORD1>
+ <KEYWORD1>chr</KEYWORD1>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>clear-selection</KEYWORD1>
+ <KEYWORD1>client-connection-id</KEYWORD1>
+ <KEYWORD1>client-type</KEYWORD1>
+ <KEYWORD1>clipboard</KEYWORD1>
+ <KEYWORD1>clob</KEYWORD1>
+ <KEYWORD1>clone-node</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>code</KEYWORD1>
+ <KEYWORD1>codebase-locator</KEYWORD1>
+ <KEYWORD1>codepage</KEYWORD1>
+ <KEYWORD1>codepage-convert</KEYWORD1>
+ <KEYWORD1>col</KEYWORD1>
+ <KEYWORD1>col-of</KEYWORD1>
+ <KEYWORD1>collate</KEYWORD1>
+ <KEYWORD1>colon</KEYWORD1>
+ <KEYWORD1>colon-aligned</KEYWORD1>
+ <KEYWORD1>color</KEYWORD1>
+ <KEYWORD1>color-table</KEYWORD1>
+ <KEYWORD1>column-bgcolor</KEYWORD1>
+ <KEYWORD1>column-codepage</KEYWORD1>
+ <KEYWORD1>column-dcolor</KEYWORD1>
+ <KEYWORD1>column-fgcolor</KEYWORD1>
+ <KEYWORD1>column-font</KEYWORD1>
+ <KEYWORD1>column-label</KEYWORD1>
+ <KEYWORD1>column-label-bgcolor</KEYWORD1>
+ <KEYWORD1>column-label-dcolor</KEYWORD1>
+ <KEYWORD1>column-label-fgcolor</KEYWORD1>
+ <KEYWORD1>column-label-font</KEYWORD1>
+ <KEYWORD1>column-label-height-chars</KEYWORD1>
+ <KEYWORD1>column-label-height-pixels</KEYWORD1>
+ <KEYWORD1>column-movable</KEYWORD1>
+ <KEYWORD1>column-of</KEYWORD1>
+ <KEYWORD1>column-pfcolor</KEYWORD1>
+ <KEYWORD1>column-read-only</KEYWORD1>
+ <KEYWORD1>column-resizable</KEYWORD1>
+ <KEYWORD1>column-scrolling</KEYWORD1>
+ <KEYWORD1>columns</KEYWORD1>
+ <KEYWORD1>com-handle</KEYWORD1>
+ <KEYWORD1>com-self</KEYWORD1>
+ <KEYWORD1>combo-box</KEYWORD1>
+ <KEYWORD1>command</KEYWORD1>
+ <KEYWORD1>compares</KEYWORD1>
+ <KEYWORD1>compile</KEYWORD1>
+ <KEYWORD1>compiler</KEYWORD1>
+ <KEYWORD1>complete</KEYWORD1>
+ <KEYWORD1>component-handle</KEYWORD1>
+ <KEYWORD1>component-self</KEYWORD1>
+ <KEYWORD1>config-name</KEYWORD1>
+ <KEYWORD1>connect</KEYWORD1>
+ <KEYWORD1>connected</KEYWORD1>
+ <KEYWORD1>constrained</KEYWORD1>
+ <KEYWORD1>contains</KEYWORD1>
+ <KEYWORD1>contents</KEYWORD1>
+ <KEYWORD1>context</KEYWORD1>
+ <KEYWORD1>context-help</KEYWORD1>
+ <KEYWORD1>context-help-file</KEYWORD1>
+ <KEYWORD1>context-help-id</KEYWORD1>
+ <KEYWORD1>context-popup</KEYWORD1>
+ <KEYWORD1>control</KEYWORD1>
+ <KEYWORD1>control-box</KEYWORD1>
+ <KEYWORD1>control-container</KEYWORD1>
+ <KEYWORD1>control-frame</KEYWORD1>
+ <KEYWORD1>convert</KEYWORD1>
+ <KEYWORD1>convert-3d-colors</KEYWORD1>
+ <KEYWORD1>convert-to-offset</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>copy-lob</KEYWORD1>
+ <KEYWORD1>count</KEYWORD1>
+ <KEYWORD1>count-of</KEYWORD1>
+ <KEYWORD1>coverage</KEYWORD1>
+ <KEYWORD1>cpcase</KEYWORD1>
+ <KEYWORD1>cpcoll</KEYWORD1>
+ <KEYWORD1>cpinternal</KEYWORD1>
+ <KEYWORD1>cplog</KEYWORD1>
+ <KEYWORD1>cpprint</KEYWORD1>
+ <KEYWORD1>cprcodein</KEYWORD1>
+ <KEYWORD1>cprcodeout</KEYWORD1>
+ <KEYWORD1>cpstream</KEYWORD1>
+ <KEYWORD1>cpterm</KEYWORD1>
+ <KEYWORD1>crc-value</KEYWORD1>
+ <KEYWORD1>create</KEYWORD1>
+ <KEYWORD1>create-like</KEYWORD1>
+ <KEYWORD1>create-node</KEYWORD1>
+ <KEYWORD1>create-node-namespace</KEYWORD1>
+ <KEYWORD1>create-on-add</KEYWORD1>
+ <KEYWORD1>create-result-list-entry</KEYWORD1>
+ <KEYWORD1>create-test-file</KEYWORD1>
+ <KEYWORD1>ctos</KEYWORD1>
+ <KEYWORD1>current</KEYWORD1>
+ <KEYWORD1>current-changed</KEYWORD1>
+ <KEYWORD1>current-column</KEYWORD1>
+ <KEYWORD1>current-environment</KEYWORD1>
+ <KEYWORD1>current-iteration</KEYWORD1>
+ <KEYWORD1>current-language</KEYWORD1>
+ <KEYWORD1>current-result-row</KEYWORD1>
+ <KEYWORD1>current-row-modified</KEYWORD1>
+ <KEYWORD1>current-value</KEYWORD1>
+ <KEYWORD1>current-window</KEYWORD1>
+ <KEYWORD1>current_date</KEYWORD1>
+ <KEYWORD1>cursor</KEYWORD1>
+ <KEYWORD1>cursor-char</KEYWORD1>
+ <KEYWORD1>cursor-down</KEYWORD1>
+ <KEYWORD1>cursor-left</KEYWORD1>
+ <KEYWORD1>cursor-line</KEYWORD1>
+ <KEYWORD1>cursor-offset</KEYWORD1>
+ <KEYWORD1>cursor-right</KEYWORD1>
+ <KEYWORD1>cursor-up</KEYWORD1>
+ <KEYWORD1>cut</KEYWORD1>
+ <KEYWORD1>data-bind</KEYWORD1>
+ <KEYWORD1>data-entry-return</KEYWORD1>
+ <KEYWORD1>data-refresh-line</KEYWORD1>
+ <KEYWORD1>data-refresh-page</KEYWORD1>
+ <KEYWORD1>data-relation</KEYWORD1>
+ <KEYWORD1>data-source</KEYWORD1>
+ <KEYWORD1>data-type</KEYWORD1>
+ <KEYWORD1>database</KEYWORD1>
+ <KEYWORD1>dataservers</KEYWORD1>
+ <KEYWORD1>dataset</KEYWORD1>
+ <KEYWORD1>dataset-handle</KEYWORD1>
+ <KEYWORD1>date</KEYWORD1>
+ <KEYWORD1>date-format</KEYWORD1>
+ <KEYWORD1>datetime</KEYWORD1>
+ <KEYWORD1>datetime-tz</KEYWORD1>
+ <KEYWORD1>day</KEYWORD1>
+ <KEYWORD1>db-references</KEYWORD1>
+ <KEYWORD1>dbcodepage</KEYWORD1>
+ <KEYWORD1>dbcollation</KEYWORD1>
+ <KEYWORD1>dbname</KEYWORD1>
+ <KEYWORD1>dbparam</KEYWORD1>
+ <KEYWORD1>dbrestrictions</KEYWORD1>
+ <KEYWORD1>dbtaskid</KEYWORD1>
+ <KEYWORD1>dbtype</KEYWORD1>
+ <KEYWORD1>dbversion</KEYWORD1>
+ <KEYWORD1>dcolor</KEYWORD1>
+ <KEYWORD1>dde</KEYWORD1>
+ <KEYWORD1>dde-error</KEYWORD1>
+ <KEYWORD1>dde-id</KEYWORD1>
+ <KEYWORD1>dde-item</KEYWORD1>
+ <KEYWORD1>dde-name</KEYWORD1>
+ <KEYWORD1>dde-topic</KEYWORD1>
+ <KEYWORD1>deblank</KEYWORD1>
+ <KEYWORD1>debug</KEYWORD1>
+ <KEYWORD1>debug-alert</KEYWORD1>
+ <KEYWORD1>debug-list</KEYWORD1>
+ <KEYWORD1>debugger</KEYWORD1>
+ <KEYWORD1>decimal</KEYWORD1>
+ <KEYWORD1>decimals</KEYWORD1>
+ <KEYWORD1>declare</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>default-buffer-handle</KEYWORD1>
+ <KEYWORD1>default-button</KEYWORD1>
+ <KEYWORD1>default-commit</KEYWORD1>
+ <KEYWORD1>default-extension</KEYWORD1>
+ <KEYWORD1>default-noxlate</KEYWORD1>
+ <KEYWORD1>default-pop-up</KEYWORD1>
+ <KEYWORD1>default-string</KEYWORD1>
+ <KEYWORD1>default-window</KEYWORD1>
+ <KEYWORD1>defer-lob-fetch</KEYWORD1>
+ <KEYWORD1>define</KEYWORD1>
+ <KEYWORD1>defined</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>delete-column</KEYWORD1>
+ <KEYWORD1>delete-current-row</KEYWORD1>
+ <KEYWORD1>delete-end-line</KEYWORD1>
+ <KEYWORD1>delete-field</KEYWORD1>
+ <KEYWORD1>delete-header-entry</KEYWORD1>
+ <KEYWORD1>delete-line</KEYWORD1>
+ <KEYWORD1>delete-node</KEYWORD1>
+ <KEYWORD1>delete-result-list-entry</KEYWORD1>
+ <KEYWORD1>delete-selected-row</KEYWORD1>
+ <KEYWORD1>delete-selected-rows</KEYWORD1>
+ <KEYWORD1>delete-word</KEYWORD1>
+ <KEYWORD1>delimiter</KEYWORD1>
+ <KEYWORD1>descending</KEYWORD1>
+ <KEYWORD1>description</KEYWORD1>
+ <KEYWORD1>deselect-extend</KEYWORD1>
+ <KEYWORD1>deselect-focused-row</KEYWORD1>
+ <KEYWORD1>deselect-rows</KEYWORD1>
+ <KEYWORD1>deselect-selected-row</KEYWORD1>
+ <KEYWORD1>deselection-extend</KEYWORD1>
+ <KEYWORD1>detach</KEYWORD1>
+ <KEYWORD1>detach-data-source</KEYWORD1>
+ <KEYWORD1>dialog-box</KEYWORD1>
+ <KEYWORD1>dialog-help</KEYWORD1>
+ <KEYWORD1>dictionary</KEYWORD1>
+ <KEYWORD1>dir</KEYWORD1>
+ <KEYWORD1>directory</KEYWORD1>
+ <KEYWORD1>disable</KEYWORD1>
+ <KEYWORD1>disable-auto-zap</KEYWORD1>
+ <KEYWORD1>disable-connections</KEYWORD1>
+ <KEYWORD1>disable-dump-triggers</KEYWORD1>
+ <KEYWORD1>disable-load-triggers</KEYWORD1>
+ <KEYWORD1>disabled</KEYWORD1>
+ <KEYWORD1>disconnect</KEYWORD1>
+ <KEYWORD1>dismiss-menu</KEYWORD1>
+ <KEYWORD1>display</KEYWORD1>
+ <KEYWORD1>display-message</KEYWORD1>
+ <KEYWORD1>display-timezone</KEYWORD1>
+ <KEYWORD1>display-type</KEYWORD1>
+ <KEYWORD1>distinct</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>dos</KEYWORD1>
+ <KEYWORD1>dos-end</KEYWORD1>
+ <KEYWORD1>double</KEYWORD1>
+ <KEYWORD1>down</KEYWORD1>
+ <KEYWORD1>drag-enabled</KEYWORD1>
+ <KEYWORD1>drop</KEYWORD1>
+ <KEYWORD1>drop-down</KEYWORD1>
+ <KEYWORD1>drop-down-list</KEYWORD1>
+ <KEYWORD1>drop-target</KEYWORD1>
+ <KEYWORD1>dump</KEYWORD1>
+ <KEYWORD1>dump-logging-now</KEYWORD1>
+ <KEYWORD1>dynamic</KEYWORD1>
+ <KEYWORD1>dynamic-current-value</KEYWORD1>
+ <KEYWORD1>dynamic-function</KEYWORD1>
+ <KEYWORD1>dynamic-next-value</KEYWORD1>
+ <KEYWORD1>each</KEYWORD1>
+ <KEYWORD1>echo</KEYWORD1>
+ <KEYWORD1>edge</KEYWORD1>
+ <KEYWORD1>edge-chars</KEYWORD1>
+ <KEYWORD1>edge-pixels</KEYWORD1>
+ <KEYWORD1>edit-can-paste</KEYWORD1>
+ <KEYWORD1>edit-can-undo</KEYWORD1>
+ <KEYWORD1>edit-clear</KEYWORD1>
+ <KEYWORD1>edit-copy</KEYWORD1>
+ <KEYWORD1>edit-cut</KEYWORD1>
+ <KEYWORD1>edit-paste</KEYWORD1>
+ <KEYWORD1>edit-undo</KEYWORD1>
+ <KEYWORD1>editing</KEYWORD1>
+ <KEYWORD1>editor</KEYWORD1>
+ <KEYWORD1>editor-backtab</KEYWORD1>
+ <KEYWORD1>editor-tab</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>empty</KEYWORD1>
+ <KEYWORD1>empty-dataset</KEYWORD1>
+ <KEYWORD1>empty-temp-table</KEYWORD1>
+ <KEYWORD1>enable</KEYWORD1>
+ <KEYWORD1>enable-connections</KEYWORD1>
+ <KEYWORD1>enabled</KEYWORD1>
+ <KEYWORD1>encode</KEYWORD1>
+ <KEYWORD1>encoding</KEYWORD1>
+ <KEYWORD1>end-file-drop</KEYWORD1>
+ <KEYWORD1>end-key</KEYWORD1>
+ <KEYWORD1>end-row-resize</KEYWORD1>
+ <KEYWORD1>end-user-prompt</KEYWORD1>
+ <KEYWORD1>enter-menubar</KEYWORD1>
+ <KEYWORD1>entered</KEYWORD1>
+ <KEYWORD1>entry-types-list</KEYWORD1>
+ <KEYWORD1>eq</KEYWORD1>
+ <KEYWORD1>error-column</KEYWORD1>
+ <KEYWORD1>error-object-detail</KEYWORD1>
+ <KEYWORD1>error-row</KEYWORD1>
+ <KEYWORD1>error-status</KEYWORD1>
+ <KEYWORD1>error-string</KEYWORD1>
+ <KEYWORD1>escape</KEYWORD1>
+ <KEYWORD1>etime</KEYWORD1>
+ <KEYWORD1>event-procedure</KEYWORD1>
+ <KEYWORD1>event-procedure-context</KEYWORD1>
+ <KEYWORD1>event-type</KEYWORD1>
+ <KEYWORD1>events</KEYWORD1>
+ <KEYWORD1>except</KEYWORD1>
+ <KEYWORD1>exclusive</KEYWORD1>
+ <KEYWORD1>exclusive-id</KEYWORD1>
+ <KEYWORD1>exclusive-lock</KEYWORD1>
+ <KEYWORD1>exclusive-web-user</KEYWORD1>
+ <KEYWORD1>execute</KEYWORD1>
+ <KEYWORD1>execution-log</KEYWORD1>
+ <KEYWORD1>exists</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>exp</KEYWORD1>
+ <KEYWORD1>expand</KEYWORD1>
+ <KEYWORD1>expandable</KEYWORD1>
+ <KEYWORD1>explicit</KEYWORD1>
+ <KEYWORD1>export</KEYWORD1>
+ <KEYWORD1>extended</KEYWORD1>
+ <KEYWORD1>extent</KEYWORD1>
+ <KEYWORD1>external</KEYWORD1>
+ <KEYWORD1>extract</KEYWORD1>
+ <KEYWORD1>false</KEYWORD1>
+ <KEYWORD1>fetch</KEYWORD1>
+ <KEYWORD1>fetch-selected-row</KEYWORD1>
+ <KEYWORD1>fgcolor</KEYWORD1>
+ <KEYWORD1>fields</KEYWORD1>
+ <KEYWORD1>file</KEYWORD1>
+ <KEYWORD1>file-access-date</KEYWORD1>
+ <KEYWORD1>file-access-time</KEYWORD1>
+ <KEYWORD1>file-create-date</KEYWORD1>
+ <KEYWORD1>file-create-time</KEYWORD1>
+ <KEYWORD1>file-information</KEYWORD1>
+ <KEYWORD1>file-mod-date</KEYWORD1>
+ <KEYWORD1>file-mod-time</KEYWORD1>
+ <KEYWORD1>file-name</KEYWORD1>
+ <KEYWORD1>file-offset</KEYWORD1>
+ <KEYWORD1>file-size</KEYWORD1>
+ <KEYWORD1>file-type</KEYWORD1>
+ <KEYWORD1>filename</KEYWORD1>
+ <KEYWORD1>fill</KEYWORD1>
+ <KEYWORD1>fill-in</KEYWORD1>
+ <KEYWORD1>fill-mode</KEYWORD1>
+ <KEYWORD1>fill-where-string</KEYWORD1>
+ <KEYWORD1>filled</KEYWORD1>
+ <KEYWORD1>filters</KEYWORD1>
+ <KEYWORD1>find</KEYWORD1>
+ <KEYWORD1>find-by-rowid</KEYWORD1>
+ <KEYWORD1>find-case-sensitive</KEYWORD1>
+ <KEYWORD1>find-current</KEYWORD1>
+ <KEYWORD1>find-first</KEYWORD1>
+ <KEYWORD1>find-global</KEYWORD1>
+ <KEYWORD1>find-last</KEYWORD1>
+ <KEYWORD1>find-next</KEYWORD1>
+ <KEYWORD1>find-next-occurrence</KEYWORD1>
+ <KEYWORD1>find-prev-occurrence</KEYWORD1>
+ <KEYWORD1>find-previous</KEYWORD1>
+ <KEYWORD1>find-select</KEYWORD1>
+ <KEYWORD1>find-unique</KEYWORD1>
+ <KEYWORD1>find-wrap-around</KEYWORD1>
+ <KEYWORD1>finder</KEYWORD1>
+ <KEYWORD1>first</KEYWORD1>
+ <KEYWORD1>first-async-request</KEYWORD1>
+ <KEYWORD1>first-buffer</KEYWORD1>
+ <KEYWORD1>first-child</KEYWORD1>
+ <KEYWORD1>first-column</KEYWORD1>
+ <KEYWORD1>first-data-source</KEYWORD1>
+ <KEYWORD1>first-dataset</KEYWORD1>
+ <KEYWORD1>first-of</KEYWORD1>
+ <KEYWORD1>first-procedure</KEYWORD1>
+ <KEYWORD1>first-query</KEYWORD1>
+ <KEYWORD1>first-server</KEYWORD1>
+ <KEYWORD1>first-server-socket</KEYWORD1>
+ <KEYWORD1>first-socket</KEYWORD1>
+ <KEYWORD1>first-tab-item</KEYWORD1>
+ <KEYWORD1>fit-last-column</KEYWORD1>
+ <KEYWORD1>fix-codepage</KEYWORD1>
+ <KEYWORD1>fixed-only</KEYWORD1>
+ <KEYWORD1>flat-button</KEYWORD1>
+ <KEYWORD1>float</KEYWORD1>
+ <KEYWORD1>focus</KEYWORD1>
+ <KEYWORD1>focus-in</KEYWORD1>
+ <KEYWORD1>focused-row</KEYWORD1>
+ <KEYWORD1>focused-row-selected</KEYWORD1>
+ <KEYWORD1>font</KEYWORD1>
+ <KEYWORD1>font-based-layout</KEYWORD1>
+ <KEYWORD1>font-table</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>force-file</KEYWORD1>
+ <KEYWORD1>foreground</KEYWORD1>
+ <KEYWORD1>form-input</KEYWORD1>
+ <KEYWORD1>format</KEYWORD1>
+ <KEYWORD1>forward-only</KEYWORD1>
+ <KEYWORD1>forwards</KEYWORD1>
+ <KEYWORD1>frame</KEYWORD1>
+ <KEYWORD1>frame-col</KEYWORD1>
+ <KEYWORD1>frame-db</KEYWORD1>
+ <KEYWORD1>frame-down</KEYWORD1>
+ <KEYWORD1>frame-field</KEYWORD1>
+ <KEYWORD1>frame-file</KEYWORD1>
+ <KEYWORD1>frame-index</KEYWORD1>
+ <KEYWORD1>frame-line</KEYWORD1>
+ <KEYWORD1>frame-name</KEYWORD1>
+ <KEYWORD1>frame-row</KEYWORD1>
+ <KEYWORD1>frame-spacing</KEYWORD1>
+ <KEYWORD1>frame-value</KEYWORD1>
+ <KEYWORD1>frame-x</KEYWORD1>
+ <KEYWORD1>frame-y</KEYWORD1>
+ <KEYWORD1>frequency</KEYWORD1>
+ <KEYWORD1>from</KEYWORD1>
+ <KEYWORD1>from-chars</KEYWORD1>
+ <KEYWORD1>from-current</KEYWORD1>
+ <KEYWORD1>from-pixels</KEYWORD1>
+ <KEYWORD1>fromnoreorder</KEYWORD1>
+ <KEYWORD1>full-height</KEYWORD1>
+ <KEYWORD1>full-height-chars</KEYWORD1>
+ <KEYWORD1>full-height-pixels</KEYWORD1>
+ <KEYWORD1>full-pathname</KEYWORD1>
+ <KEYWORD1>full-width-chars</KEYWORD1>
+ <KEYWORD1>full-width-pixels</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>function-call-type</KEYWORD1>
+ <KEYWORD1>gateways</KEYWORD1>
+ <KEYWORD1>ge</KEYWORD1>
+ <KEYWORD1>generate-md5</KEYWORD1>
+ <KEYWORD1>get</KEYWORD1>
+ <KEYWORD1>get-attr-call-type</KEYWORD1>
+ <KEYWORD1>get-attribute</KEYWORD1>
+ <KEYWORD1>get-attribute-node</KEYWORD1>
+ <KEYWORD1>get-bits</KEYWORD1>
+ <KEYWORD1>get-blue-value</KEYWORD1>
+ <KEYWORD1>get-browse-column</KEYWORD1>
+ <KEYWORD1>get-buffer-handle</KEYWORD1>
+ <KEYWORD1>get-byte</KEYWORD1>
+ <KEYWORD1>get-byte-order</KEYWORD1>
+ <KEYWORD1>get-bytes</KEYWORD1>
+ <KEYWORD1>get-bytes-available</KEYWORD1>
+ <KEYWORD1>get-cgi-list</KEYWORD1>
+ <KEYWORD1>get-cgi-value</KEYWORD1>
+ <KEYWORD1>get-changes</KEYWORD1>
+ <KEYWORD1>get-child</KEYWORD1>
+ <KEYWORD1>get-child-relation</KEYWORD1>
+ <KEYWORD1>get-codepages</KEYWORD1>
+ <KEYWORD1>get-collations</KEYWORD1>
+ <KEYWORD1>get-config-value</KEYWORD1>
+ <KEYWORD1>get-current</KEYWORD1>
+ <KEYWORD1>get-dataset-buffer</KEYWORD1>
+ <KEYWORD1>get-dir</KEYWORD1>
+ <KEYWORD1>get-document-element</KEYWORD1>
+ <KEYWORD1>get-double</KEYWORD1>
+ <KEYWORD1>get-dropped-file</KEYWORD1>
+ <KEYWORD1>get-dynamic</KEYWORD1>
+ <KEYWORD1>get-file</KEYWORD1>
+ <KEYWORD1>get-first</KEYWORD1>
+ <KEYWORD1>get-float</KEYWORD1>
+ <KEYWORD1>get-green-value</KEYWORD1>
+ <KEYWORD1>get-header-entry</KEYWORD1>
+ <KEYWORD1>get-index-by-namespace-name</KEYWORD1>
+ <KEYWORD1>get-index-by-qname</KEYWORD1>
+ <KEYWORD1>get-iteration</KEYWORD1>
+ <KEYWORD1>get-key-value</KEYWORD1>
+ <KEYWORD1>get-last</KEYWORD1>
+ <KEYWORD1>get-localname-by-index</KEYWORD1>
+ <KEYWORD1>get-long</KEYWORD1>
+ <KEYWORD1>get-message</KEYWORD1>
+ <KEYWORD1>get-next</KEYWORD1>
+ <KEYWORD1>get-node</KEYWORD1>
+ <KEYWORD1>get-number</KEYWORD1>
+ <KEYWORD1>get-parent</KEYWORD1>
+ <KEYWORD1>get-pointer-value</KEYWORD1>
+ <KEYWORD1>get-prev</KEYWORD1>
+ <KEYWORD1>get-printers</KEYWORD1>
+ <KEYWORD1>get-qname-by-index</KEYWORD1>
+ <KEYWORD1>get-red-value</KEYWORD1>
+ <KEYWORD1>get-relation</KEYWORD1>
+ <KEYWORD1>get-repositioned-row</KEYWORD1>
+ <KEYWORD1>get-rgb-value</KEYWORD1>
+ <KEYWORD1>get-selected-widget</KEYWORD1>
+ <KEYWORD1>get-serialized</KEYWORD1>
+ <KEYWORD1>get-short</KEYWORD1>
+ <KEYWORD1>get-signature</KEYWORD1>
+ <KEYWORD1>get-size</KEYWORD1>
+ <KEYWORD1>get-socket-option</KEYWORD1>
+ <KEYWORD1>get-source-buffer</KEYWORD1>
+ <KEYWORD1>get-string</KEYWORD1>
+ <KEYWORD1>get-tab-item</KEYWORD1>
+ <KEYWORD1>get-text-height</KEYWORD1>
+ <KEYWORD1>get-text-height-chars</KEYWORD1>
+ <KEYWORD1>get-text-height-pixels</KEYWORD1>
+ <KEYWORD1>get-text-width</KEYWORD1>
+ <KEYWORD1>get-text-width-chars</KEYWORD1>
+ <KEYWORD1>get-text-width-pixels</KEYWORD1>
+ <KEYWORD1>get-top-buffer</KEYWORD1>
+ <KEYWORD1>get-type-by-index</KEYWORD1>
+ <KEYWORD1>get-type-by-namespace-name</KEYWORD1>
+ <KEYWORD1>get-type-by-qname</KEYWORD1>
+ <KEYWORD1>get-unsigned-short</KEYWORD1>
+ <KEYWORD1>get-uri-by-index</KEYWORD1>
+ <KEYWORD1>get-value-by-index</KEYWORD1>
+ <KEYWORD1>get-value-by-namespace-name</KEYWORD1>
+ <KEYWORD1>get-value-by-qname</KEYWORD1>
+ <KEYWORD1>get-wait-state</KEYWORD1>
+ <KEYWORD1>getbyte</KEYWORD1>
+ <KEYWORD1>global</KEYWORD1>
+ <KEYWORD1>go-on</KEYWORD1>
+ <KEYWORD1>go-pending</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>grant</KEYWORD1>
+ <KEYWORD1>graphic-edge</KEYWORD1>
+ <KEYWORD1>grayed</KEYWORD1>
+ <KEYWORD1>grid-factor-horizontal</KEYWORD1>
+ <KEYWORD1>grid-factor-vertical</KEYWORD1>
+ <KEYWORD1>grid-set</KEYWORD1>
+ <KEYWORD1>grid-snap</KEYWORD1>
+ <KEYWORD1>grid-unit-height</KEYWORD1>
+ <KEYWORD1>grid-unit-height-chars</KEYWORD1>
+ <KEYWORD1>grid-unit-height-pixels</KEYWORD1>
+ <KEYWORD1>grid-unit-width</KEYWORD1>
+ <KEYWORD1>grid-unit-width-chars</KEYWORD1>
+ <KEYWORD1>grid-unit-width-pixels</KEYWORD1>
+ <KEYWORD1>grid-visible</KEYWORD1>
+ <KEYWORD1>group</KEYWORD1>
+ <KEYWORD1>gt</KEYWORD1>
+ <KEYWORD1>handle</KEYWORD1>
+ <KEYWORD1>handler</KEYWORD1>
+ <KEYWORD1>has-lobs</KEYWORD1>
+ <KEYWORD1>has-records</KEYWORD1>
+ <KEYWORD1>having</KEYWORD1>
+ <KEYWORD1>header</KEYWORD1>
+ <KEYWORD1>height</KEYWORD1>
+ <KEYWORD1>height-chars</KEYWORD1>
+ <KEYWORD1>height-pixels</KEYWORD1>
+ <KEYWORD1>help-context</KEYWORD1>
+ <KEYWORD1>help-topic</KEYWORD1>
+ <KEYWORD1>helpfile-name</KEYWORD1>
+ <KEYWORD1>hidden</KEYWORD1>
+ <KEYWORD1>hide</KEYWORD1>
+ <KEYWORD1>hint</KEYWORD1>
+ <KEYWORD1>horiz-end</KEYWORD1>
+ <KEYWORD1>horiz-home</KEYWORD1>
+ <KEYWORD1>horiz-scroll-drag</KEYWORD1>
+ <KEYWORD1>horizontal</KEYWORD1>
+ <KEYWORD1>host-byte-order</KEYWORD1>
+ <KEYWORD1>html-charset</KEYWORD1>
+ <KEYWORD1>html-end-of-line</KEYWORD1>
+ <KEYWORD1>html-end-of-page</KEYWORD1>
+ <KEYWORD1>html-frame-begin</KEYWORD1>
+ <KEYWORD1>html-frame-end</KEYWORD1>
+ <KEYWORD1>html-header-begin</KEYWORD1>
+ <KEYWORD1>html-header-end</KEYWORD1>
+ <KEYWORD1>html-title-begin</KEYWORD1>
+ <KEYWORD1>html-title-end</KEYWORD1>
+ <KEYWORD1>hwnd</KEYWORD1>
+ <KEYWORD1>icfparameter</KEYWORD1>
+ <KEYWORD1>icon</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>ignore-current-modified</KEYWORD1>
+ <KEYWORD1>image</KEYWORD1>
+ <KEYWORD1>image-down</KEYWORD1>
+ <KEYWORD1>image-insensitive</KEYWORD1>
+ <KEYWORD1>image-size</KEYWORD1>
+ <KEYWORD1>image-size-chars</KEYWORD1>
+ <KEYWORD1>image-size-pixels</KEYWORD1>
+ <KEYWORD1>image-up</KEYWORD1>
+ <KEYWORD1>immediate-display</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>import-node</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>in-handle</KEYWORD1>
+ <KEYWORD1>increment-exclusive-id</KEYWORD1>
+ <KEYWORD1>index</KEYWORD1>
+ <KEYWORD1>index-hint</KEYWORD1>
+ <KEYWORD1>index-information</KEYWORD1>
+ <KEYWORD1>indexed-reposition</KEYWORD1>
+ <KEYWORD1>indicator</KEYWORD1>
+ <KEYWORD1>information</KEYWORD1>
+ <KEYWORD1>init</KEYWORD1>
+ <KEYWORD1>initial</KEYWORD1>
+ <KEYWORD1>initial-dir</KEYWORD1>
+ <KEYWORD1>initial-filter</KEYWORD1>
+ <KEYWORD1>initialize-document-type</KEYWORD1>
+ <KEYWORD1>initiate</KEYWORD1>
+ <KEYWORD1>inner</KEYWORD1>
+ <KEYWORD1>inner-chars</KEYWORD1>
+ <KEYWORD1>inner-lines</KEYWORD1>
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD1>input-output</KEYWORD1>
+ <KEYWORD1>input-value</KEYWORD1>
+ <KEYWORD1>insert</KEYWORD1>
+ <KEYWORD1>insert-backtab</KEYWORD1>
+ <KEYWORD1>insert-before</KEYWORD1>
+ <KEYWORD1>insert-column</KEYWORD1>
+ <KEYWORD1>insert-field</KEYWORD1>
+ <KEYWORD1>insert-field-data</KEYWORD1>
+ <KEYWORD1>insert-field-label</KEYWORD1>
+ <KEYWORD1>insert-file</KEYWORD1>
+ <KEYWORD1>insert-mode</KEYWORD1>
+ <KEYWORD1>insert-row</KEYWORD1>
+ <KEYWORD1>insert-string</KEYWORD1>
+ <KEYWORD1>insert-tab</KEYWORD1>
+ <KEYWORD1>instantiating-procedure</KEYWORD1>
+ <KEYWORD1>integer</KEYWORD1>
+ <KEYWORD1>internal-entries</KEYWORD1>
+ <KEYWORD1>interval</KEYWORD1>
+ <KEYWORD1>into</KEYWORD1>
+ <KEYWORD1>invoke</KEYWORD1>
+ <KEYWORD1>is</KEYWORD1>
+ <KEYWORD1>is-attr-space</KEYWORD1>
+ <KEYWORD1>is-codepage-fixed</KEYWORD1>
+ <KEYWORD1>is-column-codepage</KEYWORD1>
+ <KEYWORD1>is-lead-byte</KEYWORD1>
+ <KEYWORD1>is-open</KEYWORD1>
+ <KEYWORD1>is-parameter-set</KEYWORD1>
+ <KEYWORD1>is-row-selected</KEYWORD1>
+ <KEYWORD1>is-selected</KEYWORD1>
+ <KEYWORD1>is-xml</KEYWORD1>
+ <KEYWORD1>iso-date</KEYWORD1>
+ <KEYWORD1>item</KEYWORD1>
+ <KEYWORD1>items-per-row</KEYWORD1>
+ <KEYWORD1>iteration-changed</KEYWORD1>
+ <KEYWORD1>join</KEYWORD1>
+ <KEYWORD1>join-by-sqldb</KEYWORD1>
+ <KEYWORD1>kblabel</KEYWORD1>
+ <KEYWORD1>keep-connection-open</KEYWORD1>
+ <KEYWORD1>keep-frame-z-order</KEYWORD1>
+ <KEYWORD1>keep-messages</KEYWORD1>
+ <KEYWORD1>keep-security-cache</KEYWORD1>
+ <KEYWORD1>keep-tab-order</KEYWORD1>
+ <KEYWORD1>key</KEYWORD1>
+ <KEYWORD1>key-code</KEYWORD1>
+ <KEYWORD1>key-function</KEYWORD1>
+ <KEYWORD1>key-label</KEYWORD1>
+ <KEYWORD1>keycode</KEYWORD1>
+ <KEYWORD1>keyfunction</KEYWORD1>
+ <KEYWORD1>keylabel</KEYWORD1>
+ <KEYWORD1>keys</KEYWORD1>
+ <KEYWORD1>keyword</KEYWORD1>
+ <KEYWORD1>keyword-all</KEYWORD1>
+ <KEYWORD1>label</KEYWORD1>
+ <KEYWORD1>label-bgcolor</KEYWORD1>
+ <KEYWORD1>label-dcolor</KEYWORD1>
+ <KEYWORD1>label-fgcolor</KEYWORD1>
+ <KEYWORD1>label-font</KEYWORD1>
+ <KEYWORD1>label-pfcolor</KEYWORD1>
+ <KEYWORD1>labels</KEYWORD1>
+ <KEYWORD1>landscape</KEYWORD1>
+ <KEYWORD1>languages</KEYWORD1>
+ <KEYWORD1>large</KEYWORD1>
+ <KEYWORD1>large-to-small</KEYWORD1>
+ <KEYWORD1>last</KEYWORD1>
+ <KEYWORD1>last-async-request</KEYWORD1>
+ <KEYWORD1>last-child</KEYWORD1>
+ <KEYWORD1>last-event</KEYWORD1>
+ <KEYWORD1>last-key</KEYWORD1>
+ <KEYWORD1>last-of</KEYWORD1>
+ <KEYWORD1>last-procedure</KEYWORD1>
+ <KEYWORD1>last-server</KEYWORD1>
+ <KEYWORD1>last-server-socket</KEYWORD1>
+ <KEYWORD1>last-socket</KEYWORD1>
+ <KEYWORD1>last-tab-item</KEYWORD1>
+ <KEYWORD1>lastkey</KEYWORD1>
+ <KEYWORD1>lc</KEYWORD1>
+ <KEYWORD1>ldbname</KEYWORD1>
+ <KEYWORD1>le</KEYWORD1>
+ <KEYWORD1>leading</KEYWORD1>
+ <KEYWORD1>left</KEYWORD1>
+ <KEYWORD1>left-aligned</KEYWORD1>
+ <KEYWORD1>left-end</KEYWORD1>
+ <KEYWORD1>left-trim</KEYWORD1>
+ <KEYWORD1>length</KEYWORD1>
+ <KEYWORD1>library</KEYWORD1>
+ <KEYWORD1>like</KEYWORD1>
+ <KEYWORD1>line</KEYWORD1>
+ <KEYWORD1>line-counter</KEYWORD1>
+ <KEYWORD1>line-down</KEYWORD1>
+ <KEYWORD1>line-left</KEYWORD1>
+ <KEYWORD1>line-right</KEYWORD1>
+ <KEYWORD1>line-up</KEYWORD1>
+ <KEYWORD1>list-events</KEYWORD1>
+ <KEYWORD1>list-item-pairs</KEYWORD1>
+ <KEYWORD1>list-items</KEYWORD1>
+ <KEYWORD1>list-query-attrs</KEYWORD1>
+ <KEYWORD1>list-set-attrs</KEYWORD1>
+ <KEYWORD1>list-widgets</KEYWORD1>
+ <KEYWORD1>listing</KEYWORD1>
+ <KEYWORD1>listings</KEYWORD1>
+ <KEYWORD1>literal-question</KEYWORD1>
+ <KEYWORD1>little-endian</KEYWORD1>
+ <KEYWORD1>load</KEYWORD1>
+ <KEYWORD1>load-from</KEYWORD1>
+ <KEYWORD1>load-icon</KEYWORD1>
+ <KEYWORD1>load-image</KEYWORD1>
+ <KEYWORD1>load-image-down</KEYWORD1>
+ <KEYWORD1>load-image-insensitive</KEYWORD1>
+ <KEYWORD1>load-image-up</KEYWORD1>
+ <KEYWORD1>load-mouse-pointer</KEYWORD1>
+ <KEYWORD1>load-picture</KEYWORD1>
+ <KEYWORD1>load-small-icon</KEYWORD1>
+ <KEYWORD1>lob-dir</KEYWORD1>
+ <KEYWORD1>local-host</KEYWORD1>
+ <KEYWORD1>local-name</KEYWORD1>
+ <KEYWORD1>local-port</KEYWORD1>
+ <KEYWORD1>locator-column-number</KEYWORD1>
+ <KEYWORD1>locator-line-number</KEYWORD1>
+ <KEYWORD1>locator-public-id</KEYWORD1>
+ <KEYWORD1>locator-system-id</KEYWORD1>
+ <KEYWORD1>locator-type</KEYWORD1>
+ <KEYWORD1>locked</KEYWORD1>
+ <KEYWORD1>log</KEYWORD1>
+ <KEYWORD1>log-entry-types</KEYWORD1>
+ <KEYWORD1>log-id</KEYWORD1>
+ <KEYWORD1>log-manager</KEYWORD1>
+ <KEYWORD1>log-threshold</KEYWORD1>
+ <KEYWORD1>logfile-name</KEYWORD1>
+ <KEYWORD1>logging-level</KEYWORD1>
+ <KEYWORD1>logical</KEYWORD1>
+ <KEYWORD1>long</KEYWORD1>
+ <KEYWORD1>longchar</KEYWORD1>
+ <KEYWORD1>longchar-to-node-value</KEYWORD1>
+ <KEYWORD1>lookahead</KEYWORD1>
+ <KEYWORD1>lookup</KEYWORD1>
+ <KEYWORD1>lower</KEYWORD1>
+ <KEYWORD1>lt</KEYWORD1>
+ <KEYWORD1>machine-class</KEYWORD1>
+ <KEYWORD1>main-menu</KEYWORD1>
+ <KEYWORD1>mandatory</KEYWORD1>
+ <KEYWORD1>manual-highlight</KEYWORD1>
+ <KEYWORD1>map</KEYWORD1>
+ <KEYWORD1>margin-extra</KEYWORD1>
+ <KEYWORD1>margin-height</KEYWORD1>
+ <KEYWORD1>margin-height-chars</KEYWORD1>
+ <KEYWORD1>margin-height-pixels</KEYWORD1>
+ <KEYWORD1>margin-width</KEYWORD1>
+ <KEYWORD1>margin-width-chars</KEYWORD1>
+ <KEYWORD1>margin-width-pixels</KEYWORD1>
+ <KEYWORD1>matches</KEYWORD1>
+ <KEYWORD1>max</KEYWORD1>
+ <KEYWORD1>max-button</KEYWORD1>
+ <KEYWORD1>max-chars</KEYWORD1>
+ <KEYWORD1>max-data-guess</KEYWORD1>
+ <KEYWORD1>max-height</KEYWORD1>
+ <KEYWORD1>max-height-chars</KEYWORD1>
+ <KEYWORD1>max-height-pixels</KEYWORD1>
+ <KEYWORD1>max-rows</KEYWORD1>
+ <KEYWORD1>max-size</KEYWORD1>
+ <KEYWORD1>max-value</KEYWORD1>
+ <KEYWORD1>max-width</KEYWORD1>
+ <KEYWORD1>max-width-chars</KEYWORD1>
+ <KEYWORD1>max-width-pixels</KEYWORD1>
+ <KEYWORD1>maximize</KEYWORD1>
+ <KEYWORD1>maximum</KEYWORD1>
+ <KEYWORD1>md5-value</KEYWORD1>
+ <KEYWORD1>member</KEYWORD1>
+ <KEYWORD1>memptr</KEYWORD1>
+ <KEYWORD1>memptr-to-node-value</KEYWORD1>
+ <KEYWORD1>menu</KEYWORD1>
+ <KEYWORD1>menu-bar</KEYWORD1>
+ <KEYWORD1>menu-item</KEYWORD1>
+ <KEYWORD1>menu-key</KEYWORD1>
+ <KEYWORD1>menu-mouse</KEYWORD1>
+ <KEYWORD1>menubar</KEYWORD1>
+ <KEYWORD1>merge-changes</KEYWORD1>
+ <KEYWORD1>merge-row-changes</KEYWORD1>
+ <KEYWORD1>message</KEYWORD1>
+ <KEYWORD1>message-area</KEYWORD1>
+ <KEYWORD1>message-area-font</KEYWORD1>
+ <KEYWORD1>message-line</KEYWORD1>
+ <KEYWORD1>message-lines</KEYWORD1>
+ <KEYWORD1>min-button</KEYWORD1>
+ <KEYWORD1>min-column-width-chars</KEYWORD1>
+ <KEYWORD1>min-column-width-pixels</KEYWORD1>
+ <KEYWORD1>min-height</KEYWORD1>
+ <KEYWORD1>min-height-chars</KEYWORD1>
+ <KEYWORD1>min-height-pixels</KEYWORD1>
+ <KEYWORD1>min-row-height</KEYWORD1>
+ <KEYWORD1>min-row-height-chars</KEYWORD1>
+ <KEYWORD1>min-row-height-pixels</KEYWORD1>
+ <KEYWORD1>min-schema-marshall</KEYWORD1>
+ <KEYWORD1>min-size</KEYWORD1>
+ <KEYWORD1>min-value</KEYWORD1>
+ <KEYWORD1>min-width</KEYWORD1>
+ <KEYWORD1>min-width-chars</KEYWORD1>
+ <KEYWORD1>min-width-pixels</KEYWORD1>
+ <KEYWORD1>minimum</KEYWORD1>
+ <KEYWORD1>mod</KEYWORD1>
+ <KEYWORD1>modified</KEYWORD1>
+ <KEYWORD1>modulo</KEYWORD1>
+ <KEYWORD1>month</KEYWORD1>
+ <KEYWORD1>mouse</KEYWORD1>
+ <KEYWORD1>mouse-pointer</KEYWORD1>
+ <KEYWORD1>movable</KEYWORD1>
+ <KEYWORD1>move</KEYWORD1>
+ <KEYWORD1>move-after-tab-item</KEYWORD1>
+ <KEYWORD1>move-before-tab-item</KEYWORD1>
+ <KEYWORD1>move-column</KEYWORD1>
+ <KEYWORD1>move-to-bottom</KEYWORD1>
+ <KEYWORD1>move-to-eof</KEYWORD1>
+ <KEYWORD1>move-to-top</KEYWORD1>
+ <KEYWORD1>mpe</KEYWORD1>
+ <KEYWORD1>mtime</KEYWORD1>
+ <KEYWORD1>multiple</KEYWORD1>
+ <KEYWORD1>multiple-key</KEYWORD1>
+ <KEYWORD1>multitasking-interval</KEYWORD1>
+ <KEYWORD1>must-exist</KEYWORD1>
+ <KEYWORD1>must-understand</KEYWORD1>
+ <KEYWORD1>name</KEYWORD1>
+ <KEYWORD1>namespace-prefix</KEYWORD1>
+ <KEYWORD1>namespace-uri</KEYWORD1>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD1>ne</KEYWORD1>
+ <KEYWORD1>needs-appserver-prompt</KEYWORD1>
+ <KEYWORD1>needs-prompt</KEYWORD1>
+ <KEYWORD1>nested</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>new-line</KEYWORD1>
+ <KEYWORD1>new-row</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>next-column</KEYWORD1>
+ <KEYWORD1>next-error</KEYWORD1>
+ <KEYWORD1>next-frame</KEYWORD1>
+ <KEYWORD1>next-prompt</KEYWORD1>
+ <KEYWORD1>next-sibling</KEYWORD1>
+ <KEYWORD1>next-tab-item</KEYWORD1>
+ <KEYWORD1>next-value</KEYWORD1>
+ <KEYWORD1>next-word</KEYWORD1>
+ <KEYWORD1>no</KEYWORD1>
+ <KEYWORD1>no-apply</KEYWORD1>
+ <KEYWORD1>no-array-message</KEYWORD1>
+ <KEYWORD1>no-assign</KEYWORD1>
+ <KEYWORD1>no-attr</KEYWORD1>
+ <KEYWORD1>no-attr-list</KEYWORD1>
+ <KEYWORD1>no-attr-space</KEYWORD1>
+ <KEYWORD1>no-auto-validate</KEYWORD1>
+ <KEYWORD1>no-bind-where</KEYWORD1>
+ <KEYWORD1>no-box</KEYWORD1>
+ <KEYWORD1>no-column-scrolling</KEYWORD1>
+ <KEYWORD1>no-console</KEYWORD1>
+ <KEYWORD1>no-convert</KEYWORD1>
+ <KEYWORD1>no-convert-3d-colors</KEYWORD1>
+ <KEYWORD1>no-current-value</KEYWORD1>
+ <KEYWORD1>no-debug</KEYWORD1>
+ <KEYWORD1>no-drag</KEYWORD1>
+ <KEYWORD1>no-echo</KEYWORD1>
+ <KEYWORD1>no-empty-space</KEYWORD1>
+ <KEYWORD1>no-error</KEYWORD1>
+ <KEYWORD1>no-fill</KEYWORD1>
+ <KEYWORD1>no-focus</KEYWORD1>
+ <KEYWORD1>no-help</KEYWORD1>
+ <KEYWORD1>no-hide</KEYWORD1>
+ <KEYWORD1>no-index-hint</KEYWORD1>
+ <KEYWORD1>no-join-by-sqldb</KEYWORD1>
+ <KEYWORD1>no-labels</KEYWORD1>
+ <KEYWORD1>no-lobs</KEYWORD1>
+ <KEYWORD1>no-lock</KEYWORD1>
+ <KEYWORD1>no-lookahead</KEYWORD1>
+ <KEYWORD1>no-map</KEYWORD1>
+ <KEYWORD1>no-message</KEYWORD1>
+ <KEYWORD1>no-pause</KEYWORD1>
+ <KEYWORD1>no-prefetch</KEYWORD1>
+ <KEYWORD1>no-return-value</KEYWORD1>
+ <KEYWORD1>no-row-markers</KEYWORD1>
+ <KEYWORD1>no-schema-marshall</KEYWORD1>
+ <KEYWORD1>no-scrollbar-vertical</KEYWORD1>
+ <KEYWORD1>no-scrolling</KEYWORD1>
+ <KEYWORD1>no-separate-connection</KEYWORD1>
+ <KEYWORD1>no-separators</KEYWORD1>
+ <KEYWORD1>no-tab-stop</KEYWORD1>
+ <KEYWORD1>no-underline</KEYWORD1>
+ <KEYWORD1>no-undo</KEYWORD1>
+ <KEYWORD1>no-validate</KEYWORD1>
+ <KEYWORD1>no-wait</KEYWORD1>
+ <KEYWORD1>no-word-wrap</KEYWORD1>
+ <KEYWORD1>node-type</KEYWORD1>
+ <KEYWORD1>node-value</KEYWORD1>
+ <KEYWORD1>node-value-to-longchar</KEYWORD1>
+ <KEYWORD1>node-value-to-memptr</KEYWORD1>
+ <KEYWORD1>none</KEYWORD1>
+ <KEYWORD1>normalize</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>now</KEYWORD1>
+ <KEYWORD1>null</KEYWORD1>
+ <KEYWORD1>num-aliases</KEYWORD1>
+ <KEYWORD1>num-buffers</KEYWORD1>
+ <KEYWORD1>num-buttons</KEYWORD1>
+ <KEYWORD1>num-child-relations</KEYWORD1>
+ <KEYWORD1>num-children</KEYWORD1>
+ <KEYWORD1>num-columns</KEYWORD1>
+ <KEYWORD1>num-copies</KEYWORD1>
+ <KEYWORD1>num-dbs</KEYWORD1>
+ <KEYWORD1>num-dropped-files</KEYWORD1>
+ <KEYWORD1>num-entries</KEYWORD1>
+ <KEYWORD1>num-fields</KEYWORD1>
+ <KEYWORD1>num-formats</KEYWORD1>
+ <KEYWORD1>num-header-entries</KEYWORD1>
+ <KEYWORD1>num-items</KEYWORD1>
+ <KEYWORD1>num-iterations</KEYWORD1>
+ <KEYWORD1>num-lines</KEYWORD1>
+ <KEYWORD1>num-locked-columns</KEYWORD1>
+ <KEYWORD1>num-log-files</KEYWORD1>
+ <KEYWORD1>num-messages</KEYWORD1>
+ <KEYWORD1>num-parameters</KEYWORD1>
+ <KEYWORD1>num-relations</KEYWORD1>
+ <KEYWORD1>num-replaced</KEYWORD1>
+ <KEYWORD1>num-results</KEYWORD1>
+ <KEYWORD1>num-selected</KEYWORD1>
+ <KEYWORD1>num-selected-rows</KEYWORD1>
+ <KEYWORD1>num-selected-widgets</KEYWORD1>
+ <KEYWORD1>num-source-buffers</KEYWORD1>
+ <KEYWORD1>num-tabs</KEYWORD1>
+ <KEYWORD1>num-to-retain</KEYWORD1>
+ <KEYWORD1>num-top-buffers</KEYWORD1>
+ <KEYWORD1>num-visible-columns</KEYWORD1>
+ <KEYWORD1>numeric</KEYWORD1>
+ <KEYWORD1>numeric-decimal-point</KEYWORD1>
+ <KEYWORD1>numeric-format</KEYWORD1>
+ <KEYWORD1>numeric-separator</KEYWORD1>
+ <KEYWORD1>object</KEYWORD1>
+ <KEYWORD1>octet_length</KEYWORD1>
+ <KEYWORD1>of</KEYWORD1>
+ <KEYWORD1>off</KEYWORD1>
+ <KEYWORD1>ok</KEYWORD1>
+ <KEYWORD1>ok-cancel</KEYWORD1>
+ <KEYWORD1>old</KEYWORD1>
+ <KEYWORD1>ole-invoke-locale</KEYWORD1>
+ <KEYWORD1>ole-names-locale</KEYWORD1>
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>on-frame-border</KEYWORD1>
+ <KEYWORD1>open</KEYWORD1>
+ <KEYWORD1>open-line-above</KEYWORD1>
+ <KEYWORD1>opsys</KEYWORD1>
+ <KEYWORD1>option</KEYWORD1>
+ <KEYWORD1>options</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>ordered-join</KEYWORD1>
+ <KEYWORD1>ordinal</KEYWORD1>
+ <KEYWORD1>orientation</KEYWORD1>
+ <KEYWORD1>origin-handle</KEYWORD1>
+ <KEYWORD1>origin-rowid</KEYWORD1>
+ <KEYWORD1>os-append</KEYWORD1>
+ <KEYWORD1>os-command</KEYWORD1>
+ <KEYWORD1>os-copy</KEYWORD1>
+ <KEYWORD1>os-create-dir</KEYWORD1>
+ <KEYWORD1>os-delete</KEYWORD1>
+ <KEYWORD1>os-dir</KEYWORD1>
+ <KEYWORD1>os-drives</KEYWORD1>
+ <KEYWORD1>os-error</KEYWORD1>
+ <KEYWORD1>os-getenv</KEYWORD1>
+ <KEYWORD1>os-rename</KEYWORD1>
+ <KEYWORD1>os2</KEYWORD1>
+ <KEYWORD1>os400</KEYWORD1>
+ <KEYWORD1>otherwise</KEYWORD1>
+ <KEYWORD1>out-of-data</KEYWORD1>
+ <KEYWORD1>outer</KEYWORD1>
+ <KEYWORD1>outer-join</KEYWORD1>
+ <KEYWORD1>output</KEYWORD1>
+ <KEYWORD1>overlay</KEYWORD1>
+ <KEYWORD1>override</KEYWORD1>
+ <KEYWORD1>owner</KEYWORD1>
+ <KEYWORD1>owner-document</KEYWORD1>
+ <KEYWORD1>page</KEYWORD1>
+ <KEYWORD1>page-bottom</KEYWORD1>
+ <KEYWORD1>page-down</KEYWORD1>
+ <KEYWORD1>page-left</KEYWORD1>
+ <KEYWORD1>page-number</KEYWORD1>
+ <KEYWORD1>page-right</KEYWORD1>
+ <KEYWORD1>page-right-text</KEYWORD1>
+ <KEYWORD1>page-size</KEYWORD1>
+ <KEYWORD1>page-top</KEYWORD1>
+ <KEYWORD1>page-up</KEYWORD1>
+ <KEYWORD1>page-width</KEYWORD1>
+ <KEYWORD1>paged</KEYWORD1>
+ <KEYWORD1>parameter</KEYWORD1>
+ <KEYWORD1>parent</KEYWORD1>
+ <KEYWORD1>parent-buffer</KEYWORD1>
+ <KEYWORD1>parent-relation</KEYWORD1>
+ <KEYWORD1>parse-status</KEYWORD1>
+ <KEYWORD1>partial-key</KEYWORD1>
+ <KEYWORD1>pascal</KEYWORD1>
+ <KEYWORD1>password-field</KEYWORD1>
+ <KEYWORD1>paste</KEYWORD1>
+ <KEYWORD1>pathname</KEYWORD1>
+ <KEYWORD1>pause</KEYWORD1>
+ <KEYWORD1>pdbname</KEYWORD1>
+ <KEYWORD1>performance</KEYWORD1>
+ <KEYWORD1>persistent</KEYWORD1>
+ <KEYWORD1>persistent-cache-disabled</KEYWORD1>
+ <KEYWORD1>persistent-procedure</KEYWORD1>
+ <KEYWORD1>pfcolor</KEYWORD1>
+ <KEYWORD1>pick</KEYWORD1>
+ <KEYWORD1>pick-area</KEYWORD1>
+ <KEYWORD1>pick-both</KEYWORD1>
+ <KEYWORD1>pixels</KEYWORD1>
+ <KEYWORD1>pixels-per-column</KEYWORD1>
+ <KEYWORD1>pixels-per-row</KEYWORD1>
+ <KEYWORD1>popup-menu</KEYWORD1>
+ <KEYWORD1>popup-only</KEYWORD1>
+ <KEYWORD1>portrait</KEYWORD1>
+ <KEYWORD1>position</KEYWORD1>
+ <KEYWORD1>precision</KEYWORD1>
+ <KEYWORD1>prepare-string</KEYWORD1>
+ <KEYWORD1>prepared</KEYWORD1>
+ <KEYWORD1>preprocess</KEYWORD1>
+ <KEYWORD1>preselect</KEYWORD1>
+ <KEYWORD1>prev</KEYWORD1>
+ <KEYWORD1>prev-column</KEYWORD1>
+ <KEYWORD1>prev-frame</KEYWORD1>
+ <KEYWORD1>prev-sibling</KEYWORD1>
+ <KEYWORD1>prev-tab-item</KEYWORD1>
+ <KEYWORD1>prev-word</KEYWORD1>
+ <KEYWORD1>primary</KEYWORD1>
+ <KEYWORD1>printer</KEYWORD1>
+ <KEYWORD1>printer-control-handle</KEYWORD1>
+ <KEYWORD1>printer-hdc</KEYWORD1>
+ <KEYWORD1>printer-name</KEYWORD1>
+ <KEYWORD1>printer-port</KEYWORD1>
+ <KEYWORD1>printer-setup</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>private-data</KEYWORD1>
+ <KEYWORD1>privileges</KEYWORD1>
+ <KEYWORD1>proc-handle</KEYWORD1>
+ <KEYWORD1>proc-status</KEYWORD1>
+ <KEYWORD1>procedure</KEYWORD1>
+ <KEYWORD1>procedure-call-type</KEYWORD1>
+ <KEYWORD1>procedure-name</KEYWORD1>
+ <KEYWORD1>process</KEYWORD1>
+ <KEYWORD1>profile-file</KEYWORD1>
+ <KEYWORD1>profiler</KEYWORD1>
+ <KEYWORD1>profiling</KEYWORD1>
+ <KEYWORD1>program-name</KEYWORD1>
+ <KEYWORD1>progress</KEYWORD1>
+ <KEYWORD1>progress-source</KEYWORD1>
+ <KEYWORD1>prompt</KEYWORD1>
+ <KEYWORD1>prompt-for</KEYWORD1>
+ <KEYWORD1>promsgs</KEYWORD1>
+ <KEYWORD1>propath</KEYWORD1>
+ <KEYWORD1>proversion</KEYWORD1>
+ <KEYWORD1>proxy</KEYWORD1>
+ <KEYWORD1>proxy-password</KEYWORD1>
+ <KEYWORD1>proxy-userid</KEYWORD1>
+ <KEYWORD1>public-id</KEYWORD1>
+ <KEYWORD1>publish</KEYWORD1>
+ <KEYWORD1>published-events</KEYWORD1>
+ <KEYWORD1>put</KEYWORD1>
+ <KEYWORD1>put-bits</KEYWORD1>
+ <KEYWORD1>put-byte</KEYWORD1>
+ <KEYWORD1>put-bytes</KEYWORD1>
+ <KEYWORD1>put-double</KEYWORD1>
+ <KEYWORD1>put-float</KEYWORD1>
+ <KEYWORD1>put-key-value</KEYWORD1>
+ <KEYWORD1>put-long</KEYWORD1>
+ <KEYWORD1>put-short</KEYWORD1>
+ <KEYWORD1>put-string</KEYWORD1>
+ <KEYWORD1>put-unsigned-short</KEYWORD1>
+ <KEYWORD1>putbyte</KEYWORD1>
+ <KEYWORD1>query</KEYWORD1>
+ <KEYWORD1>query-close</KEYWORD1>
+ <KEYWORD1>query-off-end</KEYWORD1>
+ <KEYWORD1>query-open</KEYWORD1>
+ <KEYWORD1>query-prepare</KEYWORD1>
+ <KEYWORD1>query-tuning</KEYWORD1>
+ <KEYWORD1>question</KEYWORD1>
+ <KEYWORD1>quit</KEYWORD1>
+ <KEYWORD1>quoter</KEYWORD1>
+ <KEYWORD1>r-index</KEYWORD1>
+ <KEYWORD1>radio-buttons</KEYWORD1>
+ <KEYWORD1>radio-set</KEYWORD1>
+ <KEYWORD1>random</KEYWORD1>
+ <KEYWORD1>raw</KEYWORD1>
+ <KEYWORD1>raw-transfer</KEYWORD1>
+ <KEYWORD1>rcode-information</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>read-available</KEYWORD1>
+ <KEYWORD1>read-exact-num</KEYWORD1>
+ <KEYWORD1>read-file</KEYWORD1>
+ <KEYWORD1>read-only</KEYWORD1>
+ <KEYWORD1>readkey</KEYWORD1>
+ <KEYWORD1>real</KEYWORD1>
+ <KEYWORD1>recid</KEYWORD1>
+ <KEYWORD1>record-length</KEYWORD1>
+ <KEYWORD1>rectangle</KEYWORD1>
+ <KEYWORD1>recursive</KEYWORD1>
+ <KEYWORD1>refresh</KEYWORD1>
+ <KEYWORD1>refreshable</KEYWORD1>
+ <KEYWORD1>reject-changes</KEYWORD1>
+ <KEYWORD1>reject-row-changes</KEYWORD1>
+ <KEYWORD1>rejected</KEYWORD1>
+ <KEYWORD1>relation-fields</KEYWORD1>
+ <KEYWORD1>relations-active</KEYWORD1>
+ <KEYWORD1>release</KEYWORD1>
+ <KEYWORD1>remote</KEYWORD1>
+ <KEYWORD1>remote-host</KEYWORD1>
+ <KEYWORD1>remote-port</KEYWORD1>
+ <KEYWORD1>remove-attribute</KEYWORD1>
+ <KEYWORD1>remove-child</KEYWORD1>
+ <KEYWORD1>remove-events-procedure</KEYWORD1>
+ <KEYWORD1>remove-super-procedure</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>replace</KEYWORD1>
+ <KEYWORD1>replace-child</KEYWORD1>
+ <KEYWORD1>replace-selection-text</KEYWORD1>
+ <KEYWORD1>replication-create</KEYWORD1>
+ <KEYWORD1>replication-delete</KEYWORD1>
+ <KEYWORD1>replication-write</KEYWORD1>
+ <KEYWORD1>reports</KEYWORD1>
+ <KEYWORD1>reposition</KEYWORD1>
+ <KEYWORD1>reposition-backwards</KEYWORD1>
+ <KEYWORD1>reposition-forwards</KEYWORD1>
+ <KEYWORD1>reposition-mode</KEYWORD1>
+ <KEYWORD1>reposition-parent-relation</KEYWORD1>
+ <KEYWORD1>reposition-to-row</KEYWORD1>
+ <KEYWORD1>reposition-to-rowid</KEYWORD1>
+ <KEYWORD1>request</KEYWORD1>
+ <KEYWORD1>resizable</KEYWORD1>
+ <KEYWORD1>resize</KEYWORD1>
+ <KEYWORD1>result</KEYWORD1>
+ <KEYWORD1>resume-display</KEYWORD1>
+ <KEYWORD1>retain</KEYWORD1>
+ <KEYWORD1>retain-shape</KEYWORD1>
+ <KEYWORD1>retry</KEYWORD1>
+ <KEYWORD1>retry-cancel</KEYWORD1>
+ <KEYWORD1>return-inserted</KEYWORD1>
+ <KEYWORD1>return-to-start-dir</KEYWORD1>
+ <KEYWORD1>return-value</KEYWORD1>
+ <KEYWORD1>return-value-data-type</KEYWORD1>
+ <KEYWORD1>returns</KEYWORD1>
+ <KEYWORD1>reverse-from</KEYWORD1>
+ <KEYWORD1>revert</KEYWORD1>
+ <KEYWORD1>revoke</KEYWORD1>
+ <KEYWORD1>rgb-value</KEYWORD1>
+ <KEYWORD1>right</KEYWORD1>
+ <KEYWORD1>right-aligned</KEYWORD1>
+ <KEYWORD1>right-end</KEYWORD1>
+ <KEYWORD1>right-trim</KEYWORD1>
+ <KEYWORD1>round</KEYWORD1>
+ <KEYWORD1>row</KEYWORD1>
+ <KEYWORD1>row-created</KEYWORD1>
+ <KEYWORD1>row-deleted</KEYWORD1>
+ <KEYWORD1>row-height</KEYWORD1>
+ <KEYWORD1>row-height-chars</KEYWORD1>
+ <KEYWORD1>row-height-pixels</KEYWORD1>
+ <KEYWORD1>row-markers</KEYWORD1>
+ <KEYWORD1>row-modified</KEYWORD1>
+ <KEYWORD1>row-of</KEYWORD1>
+ <KEYWORD1>row-resizable</KEYWORD1>
+ <KEYWORD1>row-state</KEYWORD1>
+ <KEYWORD1>row-unmodified</KEYWORD1>
+ <KEYWORD1>rowid</KEYWORD1>
+ <KEYWORD1>rule</KEYWORD1>
+ <KEYWORD1>rule-row</KEYWORD1>
+ <KEYWORD1>rule-y</KEYWORD1>
+ <KEYWORD1>run</KEYWORD1>
+ <KEYWORD1>run-procedure</KEYWORD1>
+ <KEYWORD1>save</KEYWORD1>
+ <KEYWORD1>save-as</KEYWORD1>
+ <KEYWORD1>save-file</KEYWORD1>
+ <KEYWORD1>save-row-changes</KEYWORD1>
+ <KEYWORD1>save-where-string</KEYWORD1>
+ <KEYWORD1>sax-attributes</KEYWORD1>
+ <KEYWORD1>sax-complete</KEYWORD1>
+ <KEYWORD1>sax-parse</KEYWORD1>
+ <KEYWORD1>sax-parse-first</KEYWORD1>
+ <KEYWORD1>sax-parse-next</KEYWORD1>
+ <KEYWORD1>sax-parser-error</KEYWORD1>
+ <KEYWORD1>sax-reader</KEYWORD1>
+ <KEYWORD1>sax-running</KEYWORD1>
+ <KEYWORD1>sax-uninitialized</KEYWORD1>
+ <KEYWORD1>sax-xml</KEYWORD1>
+ <KEYWORD1>schema</KEYWORD1>
+ <KEYWORD1>schema-change</KEYWORD1>
+ <KEYWORD1>schema-path</KEYWORD1>
+ <KEYWORD1>screen</KEYWORD1>
+ <KEYWORD1>screen-io</KEYWORD1>
+ <KEYWORD1>screen-lines</KEYWORD1>
+ <KEYWORD1>screen-value</KEYWORD1>
+ <KEYWORD1>scroll</KEYWORD1>
+ <KEYWORD1>scroll-bars</KEYWORD1>
+ <KEYWORD1>scroll-delta</KEYWORD1>
+ <KEYWORD1>scroll-left</KEYWORD1>
+ <KEYWORD1>scroll-mode</KEYWORD1>
+ <KEYWORD1>scroll-offset</KEYWORD1>
+ <KEYWORD1>scroll-right</KEYWORD1>
+ <KEYWORD1>scroll-to-current-row</KEYWORD1>
+ <KEYWORD1>scroll-to-item</KEYWORD1>
+ <KEYWORD1>scroll-to-selected-row</KEYWORD1>
+ <KEYWORD1>scrollable</KEYWORD1>
+ <KEYWORD1>scrollbar-drag</KEYWORD1>
+ <KEYWORD1>scrollbar-horizontal</KEYWORD1>
+ <KEYWORD1>scrollbar-vertical</KEYWORD1>
+ <KEYWORD1>scrolled-row-position</KEYWORD1>
+ <KEYWORD1>scrolling</KEYWORD1>
+ <KEYWORD1>sdbname</KEYWORD1>
+ <KEYWORD1>search</KEYWORD1>
+ <KEYWORD1>search-self</KEYWORD1>
+ <KEYWORD1>search-target</KEYWORD1>
+ <KEYWORD1>section</KEYWORD1>
+ <KEYWORD1>seek</KEYWORD1>
+ <KEYWORD1>select-all</KEYWORD1>
+ <KEYWORD1>select-extend</KEYWORD1>
+ <KEYWORD1>select-focused-row</KEYWORD1>
+ <KEYWORD1>select-next-row</KEYWORD1>
+ <KEYWORD1>select-prev-row</KEYWORD1>
+ <KEYWORD1>select-repositioned-row</KEYWORD1>
+ <KEYWORD1>select-row</KEYWORD1>
+ <KEYWORD1>selectable</KEYWORD1>
+ <KEYWORD1>selected</KEYWORD1>
+ <KEYWORD1>selected-items</KEYWORD1>
+ <KEYWORD1>selection-end</KEYWORD1>
+ <KEYWORD1>selection-extend</KEYWORD1>
+ <KEYWORD1>selection-list</KEYWORD1>
+ <KEYWORD1>selection-start</KEYWORD1>
+ <KEYWORD1>selection-text</KEYWORD1>
+ <KEYWORD1>self</KEYWORD1>
+ <KEYWORD1>send</KEYWORD1>
+ <KEYWORD1>sensitive</KEYWORD1>
+ <KEYWORD1>separate-connection</KEYWORD1>
+ <KEYWORD1>separator-fgcolor</KEYWORD1>
+ <KEYWORD1>separators</KEYWORD1>
+ <KEYWORD1>server</KEYWORD1>
+ <KEYWORD1>server-connection-bound</KEYWORD1>
+ <KEYWORD1>server-connection-bound-request</KEYWORD1>
+ <KEYWORD1>server-connection-context</KEYWORD1>
+ <KEYWORD1>server-connection-id</KEYWORD1>
+ <KEYWORD1>server-operating-mode</KEYWORD1>
+ <KEYWORD1>server-socket</KEYWORD1>
+ <KEYWORD1>session</KEYWORD1>
+ <KEYWORD1>session-end</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>set-actor</KEYWORD1>
+ <KEYWORD1>set-attr-call-type</KEYWORD1>
+ <KEYWORD1>set-attribute</KEYWORD1>
+ <KEYWORD1>set-attribute-node</KEYWORD1>
+ <KEYWORD1>set-blue-value</KEYWORD1>
+ <KEYWORD1>set-break</KEYWORD1>
+ <KEYWORD1>set-buffers</KEYWORD1>
+ <KEYWORD1>set-byte-order</KEYWORD1>
+ <KEYWORD1>set-callback-procedure</KEYWORD1>
+ <KEYWORD1>set-cell-focus</KEYWORD1>
+ <KEYWORD1>set-commit</KEYWORD1>
+ <KEYWORD1>set-connect-procedure</KEYWORD1>
+ <KEYWORD1>set-contents</KEYWORD1>
+ <KEYWORD1>set-dynamic</KEYWORD1>
+ <KEYWORD1>set-green-value</KEYWORD1>
+ <KEYWORD1>set-input-source</KEYWORD1>
+ <KEYWORD1>set-must-understand</KEYWORD1>
+ <KEYWORD1>set-node</KEYWORD1>
+ <KEYWORD1>set-numeric-format</KEYWORD1>
+ <KEYWORD1>set-parameter</KEYWORD1>
+ <KEYWORD1>set-pointer-value</KEYWORD1>
+ <KEYWORD1>set-read-response-procedure</KEYWORD1>
+ <KEYWORD1>set-red-value</KEYWORD1>
+ <KEYWORD1>set-repositioned-row</KEYWORD1>
+ <KEYWORD1>set-rgb-value</KEYWORD1>
+ <KEYWORD1>set-rollback</KEYWORD1>
+ <KEYWORD1>set-selection</KEYWORD1>
+ <KEYWORD1>set-serialized</KEYWORD1>
+ <KEYWORD1>set-size</KEYWORD1>
+ <KEYWORD1>set-socket-option</KEYWORD1>
+ <KEYWORD1>set-wait-state</KEYWORD1>
+ <KEYWORD1>settings</KEYWORD1>
+ <KEYWORD1>setuserid</KEYWORD1>
+ <KEYWORD1>share-lock</KEYWORD1>
+ <KEYWORD1>shared</KEYWORD1>
+ <KEYWORD1>short</KEYWORD1>
+ <KEYWORD1>show-in-taskbar</KEYWORD1>
+ <KEYWORD1>show-stats</KEYWORD1>
+ <KEYWORD1>side-label</KEYWORD1>
+ <KEYWORD1>side-label-handle</KEYWORD1>
+ <KEYWORD1>side-labels</KEYWORD1>
+ <KEYWORD1>silent</KEYWORD1>
+ <KEYWORD1>simple</KEYWORD1>
+ <KEYWORD1>single</KEYWORD1>
+ <KEYWORD1>size</KEYWORD1>
+ <KEYWORD1>size-chars</KEYWORD1>
+ <KEYWORD1>size-pixels</KEYWORD1>
+ <KEYWORD1>skip</KEYWORD1>
+ <KEYWORD1>skip-deleted-record</KEYWORD1>
+ <KEYWORD1>skip-schema-check</KEYWORD1>
+ <KEYWORD1>slider</KEYWORD1>
+ <KEYWORD1>small-icon</KEYWORD1>
+ <KEYWORD1>small-title</KEYWORD1>
+ <KEYWORD1>smallint</KEYWORD1>
+ <KEYWORD1>soap-fault</KEYWORD1>
+ <KEYWORD1>soap-fault-actor</KEYWORD1>
+ <KEYWORD1>soap-fault-code</KEYWORD1>
+ <KEYWORD1>soap-fault-detail</KEYWORD1>
+ <KEYWORD1>soap-fault-string</KEYWORD1>
+ <KEYWORD1>soap-header</KEYWORD1>
+ <KEYWORD1>soap-header-entryref</KEYWORD1>
+ <KEYWORD1>socket</KEYWORD1>
+ <KEYWORD1>some</KEYWORD1>
+ <KEYWORD1>sort</KEYWORD1>
+ <KEYWORD1>source</KEYWORD1>
+ <KEYWORD1>source-procedure</KEYWORD1>
+ <KEYWORD1>space</KEYWORD1>
+ <KEYWORD1>sql</KEYWORD1>
+ <KEYWORD1>sqrt</KEYWORD1>
+ <KEYWORD1>start</KEYWORD1>
+ <KEYWORD1>start-extend-box-selection</KEYWORD1>
+ <KEYWORD1>start-row-resize</KEYWORD1>
+ <KEYWORD1>starting</KEYWORD1>
+ <KEYWORD1>startup-parameters</KEYWORD1>
+ <KEYWORD1>status</KEYWORD1>
+ <KEYWORD1>status-area</KEYWORD1>
+ <KEYWORD1>status-area-font</KEYWORD1>
+ <KEYWORD1>stdcall</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>stop-display</KEYWORD1>
+ <KEYWORD1>stop-parsing</KEYWORD1>
+ <KEYWORD1>stopped</KEYWORD1>
+ <KEYWORD1>stored-procedure</KEYWORD1>
+ <KEYWORD1>stream</KEYWORD1>
+ <KEYWORD1>stream-io</KEYWORD1>
+ <KEYWORD1>stretch-to-fit</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>string-value</KEYWORD1>
+ <KEYWORD1>string-xref</KEYWORD1>
+ <KEYWORD1>sub-average</KEYWORD1>
+ <KEYWORD1>sub-count</KEYWORD1>
+ <KEYWORD1>sub-maximum</KEYWORD1>
+ <KEYWORD1>sub-menu</KEYWORD1>
+ <KEYWORD1>sub-menu-help</KEYWORD1>
+ <KEYWORD1>sub-minimum</KEYWORD1>
+ <KEYWORD1>sub-total</KEYWORD1>
+ <KEYWORD1>subscribe</KEYWORD1>
+ <KEYWORD1>substitute</KEYWORD1>
+ <KEYWORD1>substring</KEYWORD1>
+ <KEYWORD1>subtype</KEYWORD1>
+ <KEYWORD1>sum</KEYWORD1>
+ <KEYWORD1>summary</KEYWORD1>
+ <KEYWORD1>super</KEYWORD1>
+ <KEYWORD1>super-procedures</KEYWORD1>
+ <KEYWORD1>suppress-namespace-processing</KEYWORD1>
+ <KEYWORD1>suppress-warnings</KEYWORD1>
+ <KEYWORD1>synchronize</KEYWORD1>
+ <KEYWORD1>system-alert-boxes</KEYWORD1>
+ <KEYWORD1>system-dialog</KEYWORD1>
+ <KEYWORD1>system-help</KEYWORD1>
+ <KEYWORD1>system-id</KEYWORD1>
+ <KEYWORD1>tab-position</KEYWORD1>
+ <KEYWORD1>tab-stop</KEYWORD1>
+ <KEYWORD1>table</KEYWORD1>
+ <KEYWORD1>table-crc-list</KEYWORD1>
+ <KEYWORD1>table-handle</KEYWORD1>
+ <KEYWORD1>table-list</KEYWORD1>
+ <KEYWORD1>table-number</KEYWORD1>
+ <KEYWORD1>target</KEYWORD1>
+ <KEYWORD1>target-procedure</KEYWORD1>
+ <KEYWORD1>temp-directory</KEYWORD1>
+ <KEYWORD1>temp-table</KEYWORD1>
+ <KEYWORD1>temp-table-prepare</KEYWORD1>
+ <KEYWORD1>term</KEYWORD1>
+ <KEYWORD1>terminal</KEYWORD1>
+ <KEYWORD1>terminate</KEYWORD1>
+ <KEYWORD1>text</KEYWORD1>
+ <KEYWORD1>text-cursor</KEYWORD1>
+ <KEYWORD1>text-seg-growth</KEYWORD1>
+ <KEYWORD1>text-selected</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>this-procedure</KEYWORD1>
+ <KEYWORD1>three-d</KEYWORD1>
+ <KEYWORD1>through</KEYWORD1>
+ <KEYWORD1>thru</KEYWORD1>
+ <KEYWORD1>tic-marks</KEYWORD1>
+ <KEYWORD1>time</KEYWORD1>
+ <KEYWORD1>time-source</KEYWORD1>
+ <KEYWORD1>timezone</KEYWORD1>
+ <KEYWORD1>title</KEYWORD1>
+ <KEYWORD1>title-bgcolor</KEYWORD1>
+ <KEYWORD1>title-dcolor</KEYWORD1>
+ <KEYWORD1>title-fgcolor</KEYWORD1>
+ <KEYWORD1>title-font</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>to-rowid</KEYWORD1>
+ <KEYWORD1>today</KEYWORD1>
+ <KEYWORD1>toggle-box</KEYWORD1>
+ <KEYWORD1>tooltip</KEYWORD1>
+ <KEYWORD1>tooltips</KEYWORD1>
+ <KEYWORD1>top</KEYWORD1>
+ <KEYWORD1>top-column</KEYWORD1>
+ <KEYWORD1>top-only</KEYWORD1>
+ <KEYWORD1>topic</KEYWORD1>
+ <KEYWORD1>total</KEYWORD1>
+ <KEYWORD1>trace-filter</KEYWORD1>
+ <KEYWORD1>tracing</KEYWORD1>
+ <KEYWORD1>tracking-changes</KEYWORD1>
+ <KEYWORD1>trailing</KEYWORD1>
+ <KEYWORD1>trans</KEYWORD1>
+ <KEYWORD1>trans-init-procedure</KEYWORD1>
+ <KEYWORD1>transaction</KEYWORD1>
+ <KEYWORD1>transaction-mode</KEYWORD1>
+ <KEYWORD1>transparent</KEYWORD1>
+ <KEYWORD1>trigger</KEYWORD1>
+ <KEYWORD1>triggers</KEYWORD1>
+ <KEYWORD1>trim</KEYWORD1>
+ <KEYWORD1>true</KEYWORD1>
+ <KEYWORD1>truncate</KEYWORD1>
+ <KEYWORD1>ttcodepage</KEYWORD1>
+ <KEYWORD1>type</KEYWORD1>
+ <KEYWORD1>unbuffered</KEYWORD1>
+ <KEYWORD1>underline</KEYWORD1>
+ <KEYWORD1>undo</KEYWORD1>
+ <KEYWORD1>unformatted</KEYWORD1>
+ <KEYWORD1>union</KEYWORD1>
+ <KEYWORD1>unique</KEYWORD1>
+ <KEYWORD1>unique-id</KEYWORD1>
+ <KEYWORD1>unique-match</KEYWORD1>
+ <KEYWORD1>unix</KEYWORD1>
+ <KEYWORD1>unix-end</KEYWORD1>
+ <KEYWORD1>unless-hidden</KEYWORD1>
+ <KEYWORD1>unload</KEYWORD1>
+ <KEYWORD1>unsigned-short</KEYWORD1>
+ <KEYWORD1>unsubscribe</KEYWORD1>
+ <KEYWORD1>up</KEYWORD1>
+ <KEYWORD1>update</KEYWORD1>
+ <KEYWORD1>upper</KEYWORD1>
+ <KEYWORD1>url</KEYWORD1>
+ <KEYWORD1>url-decode</KEYWORD1>
+ <KEYWORD1>url-encode</KEYWORD1>
+ <KEYWORD1>url-password</KEYWORD1>
+ <KEYWORD1>url-userid</KEYWORD1>
+ <KEYWORD1>use</KEYWORD1>
+ <KEYWORD1>use-dict-exps</KEYWORD1>
+ <KEYWORD1>use-filename</KEYWORD1>
+ <KEYWORD1>use-index</KEYWORD1>
+ <KEYWORD1>use-revvideo</KEYWORD1>
+ <KEYWORD1>use-text</KEYWORD1>
+ <KEYWORD1>use-underline</KEYWORD1>
+ <KEYWORD1>user</KEYWORD1>
+ <KEYWORD1>user-data</KEYWORD1>
+ <KEYWORD1>userid</KEYWORD1>
+ <KEYWORD1>using</KEYWORD1>
+ <KEYWORD1>utc-offset</KEYWORD1>
+ <KEYWORD1>v6display</KEYWORD1>
+ <KEYWORD1>v6frame</KEYWORD1>
+ <KEYWORD1>valid-event</KEYWORD1>
+ <KEYWORD1>valid-handle</KEYWORD1>
+ <KEYWORD1>validate</KEYWORD1>
+ <KEYWORD1>validate-expression</KEYWORD1>
+ <KEYWORD1>validate-message</KEYWORD1>
+ <KEYWORD1>validate-xml</KEYWORD1>
+ <KEYWORD1>validation-enabled</KEYWORD1>
+ <KEYWORD1>value</KEYWORD1>
+ <KEYWORD1>values</KEYWORD1>
+ <KEYWORD1>variable</KEYWORD1>
+ <KEYWORD1>verbose</KEYWORD1>
+ <KEYWORD1>vertical</KEYWORD1>
+ <KEYWORD1>view</KEYWORD1>
+ <KEYWORD1>view-as</KEYWORD1>
+ <KEYWORD1>view-first-column-on-reopen</KEYWORD1>
+ <KEYWORD1>virtual-height</KEYWORD1>
+ <KEYWORD1>virtual-height-chars</KEYWORD1>
+ <KEYWORD1>virtual-height-pixels</KEYWORD1>
+ <KEYWORD1>virtual-width</KEYWORD1>
+ <KEYWORD1>virtual-width-chars</KEYWORD1>
+ <KEYWORD1>virtual-width-pixels</KEYWORD1>
+ <KEYWORD1>visible</KEYWORD1>
+ <KEYWORD1>vms</KEYWORD1>
+ <KEYWORD1>wait</KEYWORD1>
+ <KEYWORD1>wait-for</KEYWORD1>
+ <KEYWORD1>warning</KEYWORD1>
+ <KEYWORD1>web-context</KEYWORD1>
+ <KEYWORD1>web-notify</KEYWORD1>
+ <KEYWORD1>weekday</KEYWORD1>
+ <KEYWORD1>when</KEYWORD1>
+ <KEYWORD1>where</KEYWORD1>
+ <KEYWORD1>where-string</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>widget</KEYWORD1>
+ <KEYWORD1>widget-enter</KEYWORD1>
+ <KEYWORD1>widget-handle</KEYWORD1>
+ <KEYWORD1>widget-leave</KEYWORD1>
+ <KEYWORD1>widget-pool</KEYWORD1>
+ <KEYWORD1>width</KEYWORD1>
+ <KEYWORD1>width-chars</KEYWORD1>
+ <KEYWORD1>width-pixels</KEYWORD1>
+ <KEYWORD1>window</KEYWORD1>
+ <KEYWORD1>window-delayed-minimize</KEYWORD1>
+ <KEYWORD1>window-name</KEYWORD1>
+ <KEYWORD1>window-normal</KEYWORD1>
+ <KEYWORD1>window-state</KEYWORD1>
+ <KEYWORD1>window-system</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+ <KEYWORD1>word-index</KEYWORD1>
+ <KEYWORD1>word-wrap</KEYWORD1>
+ <KEYWORD1>work-area-height-pixels</KEYWORD1>
+ <KEYWORD1>work-area-width-pixels</KEYWORD1>
+ <KEYWORD1>work-area-x</KEYWORD1>
+ <KEYWORD1>work-area-y</KEYWORD1>
+ <KEYWORD1>work-table</KEYWORD1>
+ <KEYWORD1>workfile</KEYWORD1>
+ <KEYWORD1>write</KEYWORD1>
+ <KEYWORD1>write-data</KEYWORD1>
+ <KEYWORD1>x</KEYWORD1>
+ <KEYWORD1>x-document</KEYWORD1>
+ <KEYWORD1>x-noderef</KEYWORD1>
+ <KEYWORD1>x-of</KEYWORD1>
+ <KEYWORD1>xcode</KEYWORD1>
+ <KEYWORD1>xml-schema-path</KEYWORD1>
+ <KEYWORD1>xml-suppress-namespace-processing</KEYWORD1>
+ <KEYWORD1>xref</KEYWORD1>
+ <KEYWORD1>y</KEYWORD1>
+ <KEYWORD1>y-of</KEYWORD1>
+ <KEYWORD1>year</KEYWORD1>
+ <KEYWORD1>year-offset</KEYWORD1>
+ <KEYWORD1>yes</KEYWORD1>
+ <KEYWORD1>yes-no</KEYWORD1>
+ <KEYWORD1>yes-no-cancel</KEYWORD1>
+ <KEYWORD1>_dcm</KEYWORD1>
+
+ <!-- Some commonly used abbreviations -->
+ <!-- And words missing from -zgenkwlist option -->
+ <KEYWORD1>accum</KEYWORD1>
+ <KEYWORD1>asc</KEYWORD1>
+ <KEYWORD1>avail</KEYWORD1>
+ <KEYWORD1>button</KEYWORD1>
+ <KEYWORD1>char</KEYWORD1>
+ <KEYWORD1>column</KEYWORD1>
+ <KEYWORD1>dec</KEYWORD1>
+ <KEYWORD1>def</KEYWORD1>
+ <KEYWORD1>disp</KEYWORD1>
+ <KEYWORD1>dict</KEYWORD1>
+ <KEYWORD1>dyn-function</KEYWORD1>
+ <KEYWORD1>excl</KEYWORD1>
+ <KEYWORD1>field</KEYWORD1>
+ <KEYWORD1>field-group</KEYWORD1>
+ <KEYWORD1>file-info</KEYWORD1>
+ <KEYWORD1>form</KEYWORD1>
+ <KEYWORD1>forward</KEYWORD1>
+ <KEYWORD1>funct</KEYWORD1>
+ <KEYWORD1>int</KEYWORD1>
+ <KEYWORD1>info</KEYWORD1>
+ <KEYWORD1>index-field</KEYWORD1>
+ <KEYWORD1>log</KEYWORD1>
+ <KEYWORD1>literal</KEYWORD1>
+ <KEYWORD1>load-control</KEYWORD1>
+ <KEYWORD1>no-label</KEYWORD1>
+ <KEYWORD1>prim</KEYWORD1>
+ <KEYWORD1>rcode-info</KEYWORD1>
+ <KEYWORD1>share</KEYWORD1>
+ <KEYWORD1>substr</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+
+
+ <!-- KEYWORD2 : VST & metaschema files and fields -->
+ <KEYWORD2>_abbreviate</KEYWORD2>
+ <KEYWORD2>_account_expires</KEYWORD2>
+ <KEYWORD2>_actailog</KEYWORD2>
+ <KEYWORD2>_actbilog</KEYWORD2>
+ <KEYWORD2>_actbuffer</KEYWORD2>
+ <KEYWORD2>_actindex</KEYWORD2>
+ <KEYWORD2>_actiofile</KEYWORD2>
+ <KEYWORD2>_actiotype</KEYWORD2>
+ <KEYWORD2>_active</KEYWORD2>
+ <KEYWORD2>_actlock</KEYWORD2>
+ <KEYWORD2>_actother</KEYWORD2>
+ <KEYWORD2>_actpws</KEYWORD2>
+ <KEYWORD2>_actrecord</KEYWORD2>
+ <KEYWORD2>_actserver</KEYWORD2>
+ <KEYWORD2>_actspace</KEYWORD2>
+ <KEYWORD2>_actsummary</KEYWORD2>
+ <KEYWORD2>_admin</KEYWORD2>
+ <KEYWORD2>_ailog-aiwwrites</KEYWORD2>
+ <KEYWORD2>_ailog-bbuffwaits</KEYWORD2>
+ <KEYWORD2>_ailog-byteswritn</KEYWORD2>
+ <KEYWORD2>_ailog-forcewaits</KEYWORD2>
+ <KEYWORD2>_ailog-id</KEYWORD2>
+ <KEYWORD2>_ailog-misc</KEYWORD2>
+ <KEYWORD2>_ailog-nobufavail</KEYWORD2>
+ <KEYWORD2>_ailog-partialwrt</KEYWORD2>
+ <KEYWORD2>_ailog-recwriten</KEYWORD2>
+ <KEYWORD2>_ailog-totwrites</KEYWORD2>
+ <KEYWORD2>_ailog-trans</KEYWORD2>
+ <KEYWORD2>_ailog-uptime</KEYWORD2>
+ <KEYWORD2>_alt</KEYWORD2>
+ <KEYWORD2>_area</KEYWORD2>
+ <KEYWORD2>_area-attrib</KEYWORD2>
+ <KEYWORD2>_area-block</KEYWORD2>
+ <KEYWORD2>_area-blocksize</KEYWORD2>
+ <KEYWORD2>_area-clustersize</KEYWORD2>
+ <KEYWORD2>_area-extents</KEYWORD2>
+ <KEYWORD2>_area-misc</KEYWORD2>
+ <KEYWORD2>_area-name</KEYWORD2>
+ <KEYWORD2>_area-number</KEYWORD2>
+ <KEYWORD2>_area-recbits</KEYWORD2>
+ <KEYWORD2>_area-recid</KEYWORD2>
+ <KEYWORD2>_area-type</KEYWORD2>
+ <KEYWORD2>_area-version</KEYWORD2>
+ <KEYWORD2>_areaextent</KEYWORD2>
+ <KEYWORD2>_areastatus</KEYWORD2>
+ <KEYWORD2>_areastatus-areaname</KEYWORD2>
+ <KEYWORD2>_areastatus-areanum</KEYWORD2>
+ <KEYWORD2>_areastatus-extents</KEYWORD2>
+ <KEYWORD2>_areastatus-freenum</KEYWORD2>
+ <KEYWORD2>_areastatus-hiwater</KEYWORD2>
+ <KEYWORD2>_areastatus-id</KEYWORD2>
+ <KEYWORD2>_areastatus-lastextent</KEYWORD2>
+ <KEYWORD2>_areastatus-rmnum</KEYWORD2>
+ <KEYWORD2>_areastatus-totblocks</KEYWORD2>
+ <KEYWORD2>_argtype</KEYWORD2>
+ <KEYWORD2>_ascending</KEYWORD2>
+ <KEYWORD2>_attribute</KEYWORD2>
+ <KEYWORD2>_attributes1</KEYWORD2>
+ <KEYWORD2>_auth-id</KEYWORD2>
+ <KEYWORD2>_autoincr</KEYWORD2>
+ <KEYWORD2>_base-col</KEYWORD2>
+ <KEYWORD2>_base-tables</KEYWORD2>
+ <KEYWORD2>_bfstatus-apwq</KEYWORD2>
+ <KEYWORD2>_bfstatus-ckpmarked</KEYWORD2>
+ <KEYWORD2>_bfstatus-ckpq</KEYWORD2>
+ <KEYWORD2>_bfstatus-hashsize</KEYWORD2>
+ <KEYWORD2>_bfstatus-id</KEYWORD2>
+ <KEYWORD2>_bfstatus-lastckpnum</KEYWORD2>
+ <KEYWORD2>_bfstatus-lru</KEYWORD2>
+ <KEYWORD2>_bfstatus-misc</KEYWORD2>
+ <KEYWORD2>_bfstatus-modbuffs</KEYWORD2>
+ <KEYWORD2>_bfstatus-totbufs</KEYWORD2>
+ <KEYWORD2>_bfstatus-usedbuffs</KEYWORD2>
+ <KEYWORD2>_bilog-bbuffwaits</KEYWORD2>
+ <KEYWORD2>_bilog-biwwrites</KEYWORD2>
+ <KEYWORD2>_bilog-bytesread</KEYWORD2>
+ <KEYWORD2>_bilog-byteswrtn</KEYWORD2>
+ <KEYWORD2>_bilog-clstrclose</KEYWORD2>
+ <KEYWORD2>_bilog-ebuffwaits</KEYWORD2>
+ <KEYWORD2>_bilog-forcewaits</KEYWORD2>
+ <KEYWORD2>_bilog-forcewrts</KEYWORD2>
+ <KEYWORD2>_bilog-id</KEYWORD2>
+ <KEYWORD2>_bilog-misc</KEYWORD2>
+ <KEYWORD2>_bilog-partialwrts</KEYWORD2>
+ <KEYWORD2>_bilog-recread</KEYWORD2>
+ <KEYWORD2>_bilog-recwriten</KEYWORD2>
+ <KEYWORD2>_bilog-totalwrts</KEYWORD2>
+ <KEYWORD2>_bilog-totreads</KEYWORD2>
+ <KEYWORD2>_bilog-trans</KEYWORD2>
+ <KEYWORD2>_bilog-uptime</KEYWORD2>
+ <KEYWORD2>_block</KEYWORD2>
+ <KEYWORD2>_block-area</KEYWORD2>
+ <KEYWORD2>_block-bkupctr</KEYWORD2>
+ <KEYWORD2>_block-block</KEYWORD2>
+ <KEYWORD2>_block-chaintype</KEYWORD2>
+ <KEYWORD2>_block-dbkey</KEYWORD2>
+ <KEYWORD2>_block-id</KEYWORD2>
+ <KEYWORD2>_block-misc</KEYWORD2>
+ <KEYWORD2>_block-nextdbkey</KEYWORD2>
+ <KEYWORD2>_block-type</KEYWORD2>
+ <KEYWORD2>_block-update</KEYWORD2>
+ <KEYWORD2>_buffer-apwenq</KEYWORD2>
+ <KEYWORD2>_buffer-chkpts</KEYWORD2>
+ <KEYWORD2>_buffer-deferred</KEYWORD2>
+ <KEYWORD2>_buffer-flushed</KEYWORD2>
+ <KEYWORD2>_buffer-id</KEYWORD2>
+ <KEYWORD2>_buffer-logicrds</KEYWORD2>
+ <KEYWORD2>_buffer-logicwrts</KEYWORD2>
+ <KEYWORD2>_buffer-lruskips</KEYWORD2>
+ <KEYWORD2>_buffer-lruwrts</KEYWORD2>
+ <KEYWORD2>_buffer-marked</KEYWORD2>
+ <KEYWORD2>_buffer-misc</KEYWORD2>
+ <KEYWORD2>_buffer-osrds</KEYWORD2>
+ <KEYWORD2>_buffer-oswrts</KEYWORD2>
+ <KEYWORD2>_buffer-trans</KEYWORD2>
+ <KEYWORD2>_buffer-uptime</KEYWORD2>
+ <KEYWORD2>_buffstatus</KEYWORD2>
+ <KEYWORD2>_cache</KEYWORD2>
+ <KEYWORD2>_can-create</KEYWORD2>
+ <KEYWORD2>_can-delete</KEYWORD2>
+ <KEYWORD2>_can-dump</KEYWORD2>
+ <KEYWORD2>_can-load</KEYWORD2>
+ <KEYWORD2>_can-read</KEYWORD2>
+ <KEYWORD2>_can-write</KEYWORD2>
+ <KEYWORD2>_casesensitive</KEYWORD2>
+ <KEYWORD2>_charset</KEYWORD2>
+ <KEYWORD2>_checkpoint</KEYWORD2>
+ <KEYWORD2>_checkpoint-apwq</KEYWORD2>
+ <KEYWORD2>_checkpoint-cptq</KEYWORD2>
+ <KEYWORD2>_checkpoint-dirty</KEYWORD2>
+ <KEYWORD2>_checkpoint-flush</KEYWORD2>
+ <KEYWORD2>_checkpoint-id</KEYWORD2>
+ <KEYWORD2>_checkpoint-len</KEYWORD2>
+ <KEYWORD2>_checkpoint-misc</KEYWORD2>
+ <KEYWORD2>_checkpoint-scan</KEYWORD2>
+ <KEYWORD2>_checkpoint-time</KEYWORD2>
+ <KEYWORD2>_chkclause</KEYWORD2>
+ <KEYWORD2>_chkseq</KEYWORD2>
+ <KEYWORD2>_cnstrname</KEYWORD2>
+ <KEYWORD2>_cnstrtype</KEYWORD2>
+ <KEYWORD2>_code-feature</KEYWORD2>
+ <KEYWORD2>_codefeature-id</KEYWORD2>
+ <KEYWORD2>_codefeature-res01</KEYWORD2>
+ <KEYWORD2>_codefeature-res02</KEYWORD2>
+ <KEYWORD2>_codefeature_name</KEYWORD2>
+ <KEYWORD2>_codefeature_required</KEYWORD2>
+ <KEYWORD2>_codefeature_supported</KEYWORD2>
+ <KEYWORD2>_codepage</KEYWORD2>
+ <KEYWORD2>_col</KEYWORD2>
+ <KEYWORD2>_col-label</KEYWORD2>
+ <KEYWORD2>_col-label-sa</KEYWORD2>
+ <KEYWORD2>_col-name</KEYWORD2>
+ <KEYWORD2>_colid</KEYWORD2>
+ <KEYWORD2>_coll-cp</KEYWORD2>
+ <KEYWORD2>_coll-data</KEYWORD2>
+ <KEYWORD2>_coll-name</KEYWORD2>
+ <KEYWORD2>_coll-segment</KEYWORD2>
+ <KEYWORD2>_coll-sequence</KEYWORD2>
+ <KEYWORD2>_coll-strength</KEYWORD2>
+ <KEYWORD2>_coll-tran-subtype</KEYWORD2>
+ <KEYWORD2>_coll-tran-version</KEYWORD2>
+ <KEYWORD2>_collation</KEYWORD2>
+ <KEYWORD2>_colname</KEYWORD2>
+ <KEYWORD2>_colposition</KEYWORD2>
+ <KEYWORD2>_connect</KEYWORD2>
+ <KEYWORD2>_connect-2phase</KEYWORD2>
+ <KEYWORD2>_connect-batch</KEYWORD2>
+ <KEYWORD2>_connect-device</KEYWORD2>
+ <KEYWORD2>_connect-disconnect</KEYWORD2>
+ <KEYWORD2>_connect-id</KEYWORD2>
+ <KEYWORD2>_connect-interrupt</KEYWORD2>
+ <KEYWORD2>_connect-misc</KEYWORD2>
+ <KEYWORD2>_connect-name</KEYWORD2>
+ <KEYWORD2>_connect-pid</KEYWORD2>
+ <KEYWORD2>_connect-resync</KEYWORD2>
+ <KEYWORD2>_connect-semid</KEYWORD2>
+ <KEYWORD2>_connect-semnum</KEYWORD2>
+ <KEYWORD2>_connect-server</KEYWORD2>
+ <KEYWORD2>_connect-time</KEYWORD2>
+ <KEYWORD2>_connect-transid</KEYWORD2>
+ <KEYWORD2>_connect-type</KEYWORD2>
+ <KEYWORD2>_connect-usr</KEYWORD2>
+ <KEYWORD2>_connect-wait</KEYWORD2>
+ <KEYWORD2>_connect-wait1</KEYWORD2>
+ <KEYWORD2>_cp-attr</KEYWORD2>
+ <KEYWORD2>_cp-dbrecid</KEYWORD2>
+ <KEYWORD2>_cp-name</KEYWORD2>
+ <KEYWORD2>_cp-sequence</KEYWORD2>
+ <KEYWORD2>_crc</KEYWORD2>
+ <KEYWORD2>_create-limit</KEYWORD2>
+ <KEYWORD2>_createparams</KEYWORD2>
+ <KEYWORD2>_create_date</KEYWORD2>
+ <KEYWORD2>_creator</KEYWORD2>
+ <KEYWORD2>_cycle-ok</KEYWORD2>
+ <KEYWORD2>_data-type</KEYWORD2>
+ <KEYWORD2>_database-feature</KEYWORD2>
+ <KEYWORD2>_datatype</KEYWORD2>
+ <KEYWORD2>_db</KEYWORD2>
+ <KEYWORD2>_db-addr</KEYWORD2>
+ <KEYWORD2>_db-coll-name</KEYWORD2>
+ <KEYWORD2>_db-collate</KEYWORD2>
+ <KEYWORD2>_db-comm</KEYWORD2>
+ <KEYWORD2>_db-lang</KEYWORD2>
+ <KEYWORD2>_db-local</KEYWORD2>
+ <KEYWORD2>_db-misc1</KEYWORD2>
+ <KEYWORD2>_db-misc2</KEYWORD2>
+ <KEYWORD2>_db-name</KEYWORD2>
+ <KEYWORD2>_db-recid</KEYWORD2>
+ <KEYWORD2>_db-res1</KEYWORD2>
+ <KEYWORD2>_db-res2</KEYWORD2>
+ <KEYWORD2>_db-revision</KEYWORD2>
+ <KEYWORD2>_db-slave</KEYWORD2>
+ <KEYWORD2>_db-type</KEYWORD2>
+ <KEYWORD2>_db-xl-name</KEYWORD2>
+ <KEYWORD2>_db-xlate</KEYWORD2>
+ <KEYWORD2>_dbaacc</KEYWORD2>
+ <KEYWORD2>_dbfeature-id</KEYWORD2>
+ <KEYWORD2>_dbfeature-res01</KEYWORD2>
+ <KEYWORD2>_dbfeature-res02</KEYWORD2>
+ <KEYWORD2>_dbfeature_active</KEYWORD2>
+ <KEYWORD2>_dbfeature_enabled</KEYWORD2>
+ <KEYWORD2>_dbfeature_name</KEYWORD2>
+ <KEYWORD2>_dblink</KEYWORD2>
+ <KEYWORD2>_dbstatus</KEYWORD2>
+ <KEYWORD2>_dbstatus-aiblksize</KEYWORD2>
+ <KEYWORD2>_dbstatus-biblksize</KEYWORD2>
+ <KEYWORD2>_dbstatus-biclsize</KEYWORD2>
+ <KEYWORD2>_dbstatus-biopen</KEYWORD2>
+ <KEYWORD2>_dbstatus-bisize</KEYWORD2>
+ <KEYWORD2>_dbstatus-bitrunc</KEYWORD2>
+ <KEYWORD2>_dbstatus-cachestamp</KEYWORD2>
+ <KEYWORD2>_dbstatus-changed</KEYWORD2>
+ <KEYWORD2>_dbstatus-clversminor</KEYWORD2>
+ <KEYWORD2>_dbstatus-codepage</KEYWORD2>
+ <KEYWORD2>_dbstatus-collation</KEYWORD2>
+ <KEYWORD2>_dbstatus-createdate</KEYWORD2>
+ <KEYWORD2>_dbstatus-dbblksize</KEYWORD2>
+ <KEYWORD2>_dbstatus-dbvers</KEYWORD2>
+ <KEYWORD2>_dbstatus-dbversminor</KEYWORD2>
+ <KEYWORD2>_dbstatus-emptyblks</KEYWORD2>
+ <KEYWORD2>_dbstatus-fbdate</KEYWORD2>
+ <KEYWORD2>_dbstatus-freeblks</KEYWORD2>
+ <KEYWORD2>_dbstatus-hiwater</KEYWORD2>
+ <KEYWORD2>_dbstatus-ibdate</KEYWORD2>
+ <KEYWORD2>_dbstatus-ibseq</KEYWORD2>
+ <KEYWORD2>_dbstatus-id</KEYWORD2>
+ <KEYWORD2>_dbstatus-integrity</KEYWORD2>
+ <KEYWORD2>_dbstatus-intflags</KEYWORD2>
+ <KEYWORD2>_dbstatus-lastopen</KEYWORD2>
+ <KEYWORD2>_dbstatus-lasttable</KEYWORD2>
+ <KEYWORD2>_dbstatus-lasttran</KEYWORD2>
+ <KEYWORD2>_dbstatus-misc</KEYWORD2>
+ <KEYWORD2>_dbstatus-mostlocks</KEYWORD2>
+ <KEYWORD2>_dbstatus-numareas</KEYWORD2>
+ <KEYWORD2>_dbstatus-numlocks</KEYWORD2>
+ <KEYWORD2>_dbstatus-numsems</KEYWORD2>
+ <KEYWORD2>_dbstatus-prevopen</KEYWORD2>
+ <KEYWORD2>_dbstatus-rmfreeblks</KEYWORD2>
+ <KEYWORD2>_dbstatus-sharedmemver</KEYWORD2>
+ <KEYWORD2>_dbstatus-shmvers</KEYWORD2>
+ <KEYWORD2>_dbstatus-starttime</KEYWORD2>
+ <KEYWORD2>_dbstatus-state</KEYWORD2>
+ <KEYWORD2>_dbstatus-tainted</KEYWORD2>
+ <KEYWORD2>_dbstatus-totalblks</KEYWORD2>
+ <KEYWORD2>_decimals</KEYWORD2>
+ <KEYWORD2>_del</KEYWORD2>
+ <KEYWORD2>_deleterule</KEYWORD2>
+ <KEYWORD2>_desc</KEYWORD2>
+ <KEYWORD2>_description</KEYWORD2>
+ <KEYWORD2>_dfltvalue</KEYWORD2>
+ <KEYWORD2>_dft-pk</KEYWORD2>
+ <KEYWORD2>_dhtypename</KEYWORD2>
+ <KEYWORD2>_disabled</KEYWORD2>
+ <KEYWORD2>_dtype</KEYWORD2>
+ <KEYWORD2>_dump-name</KEYWORD2>
+ <KEYWORD2>_email</KEYWORD2>
+ <KEYWORD2>_event</KEYWORD2>
+ <KEYWORD2>_exe</KEYWORD2>
+ <KEYWORD2>_extent</KEYWORD2>
+ <KEYWORD2>_extent-attrib</KEYWORD2>
+ <KEYWORD2>_extent-misc</KEYWORD2>
+ <KEYWORD2>_extent-number</KEYWORD2>
+ <KEYWORD2>_extent-path</KEYWORD2>
+ <KEYWORD2>_extent-size</KEYWORD2>
+ <KEYWORD2>_extent-system</KEYWORD2>
+ <KEYWORD2>_extent-type</KEYWORD2>
+ <KEYWORD2>_extent-version</KEYWORD2>
+ <KEYWORD2>_fetch-type</KEYWORD2>
+ <KEYWORD2>_field</KEYWORD2>
+ <KEYWORD2>_field-map</KEYWORD2>
+ <KEYWORD2>_field-name</KEYWORD2>
+ <KEYWORD2>_field-physpos</KEYWORD2>
+ <KEYWORD2>_field-recid</KEYWORD2>
+ <KEYWORD2>_field-rpos</KEYWORD2>
+ <KEYWORD2>_field-trig</KEYWORD2>
+ <KEYWORD2>_fil-misc1</KEYWORD2>
+ <KEYWORD2>_fil-misc2</KEYWORD2>
+ <KEYWORD2>_fil-res1</KEYWORD2>
+ <KEYWORD2>_fil-res2</KEYWORD2>
+ <KEYWORD2>_file</KEYWORD2>
+ <KEYWORD2>_file-label</KEYWORD2>
+ <KEYWORD2>_file-label-sa</KEYWORD2>
+ <KEYWORD2>_file-name</KEYWORD2>
+ <KEYWORD2>_file-number</KEYWORD2>
+ <KEYWORD2>_file-recid</KEYWORD2>
+ <KEYWORD2>_file-trig</KEYWORD2>
+ <KEYWORD2>_filelist</KEYWORD2>
+ <KEYWORD2>_filelist-blksize</KEYWORD2>
+ <KEYWORD2>_filelist-extend</KEYWORD2>
+ <KEYWORD2>_filelist-id</KEYWORD2>
+ <KEYWORD2>_filelist-logicalsz</KEYWORD2>
+ <KEYWORD2>_filelist-misc</KEYWORD2>
+ <KEYWORD2>_filelist-name</KEYWORD2>
+ <KEYWORD2>_filelist-openmode</KEYWORD2>
+ <KEYWORD2>_filelist-size</KEYWORD2>
+ <KEYWORD2>_fire_4gl</KEYWORD2>
+ <KEYWORD2>_fld</KEYWORD2>
+ <KEYWORD2>_fld-case</KEYWORD2>
+ <KEYWORD2>_fld-misc1</KEYWORD2>
+ <KEYWORD2>_fld-misc2</KEYWORD2>
+ <KEYWORD2>_fld-res1</KEYWORD2>
+ <KEYWORD2>_fld-res2</KEYWORD2>
+ <KEYWORD2>_fld-stdtype</KEYWORD2>
+ <KEYWORD2>_fld-stlen</KEYWORD2>
+ <KEYWORD2>_fld-stoff</KEYWORD2>
+ <KEYWORD2>_for-allocated</KEYWORD2>
+ <KEYWORD2>_for-cnt1</KEYWORD2>
+ <KEYWORD2>_for-cnt2</KEYWORD2>
+ <KEYWORD2>_for-flag</KEYWORD2>
+ <KEYWORD2>_for-format</KEYWORD2>
+ <KEYWORD2>_for-id</KEYWORD2>
+ <KEYWORD2>_for-info</KEYWORD2>
+ <KEYWORD2>_for-itype</KEYWORD2>
+ <KEYWORD2>_for-maxsize</KEYWORD2>
+ <KEYWORD2>_for-name</KEYWORD2>
+ <KEYWORD2>_for-number</KEYWORD2>
+ <KEYWORD2>_for-owner</KEYWORD2>
+ <KEYWORD2>_for-primary</KEYWORD2>
+ <KEYWORD2>_for-retrieve</KEYWORD2>
+ <KEYWORD2>_for-scale</KEYWORD2>
+ <KEYWORD2>_for-separator</KEYWORD2>
+ <KEYWORD2>_for-size</KEYWORD2>
+ <KEYWORD2>_for-spacing</KEYWORD2>
+ <KEYWORD2>_for-type</KEYWORD2>
+ <KEYWORD2>_for-xpos</KEYWORD2>
+ <KEYWORD2>_format</KEYWORD2>
+ <KEYWORD2>_format-sa</KEYWORD2>
+ <KEYWORD2>_frozen</KEYWORD2>
+ <KEYWORD2>_given_name</KEYWORD2>
+ <KEYWORD2>_grantee</KEYWORD2>
+ <KEYWORD2>_grantor</KEYWORD2>
+ <KEYWORD2>_group-by</KEYWORD2>
+ <KEYWORD2>_group_number</KEYWORD2>
+ <KEYWORD2>_has-ccnstrs</KEYWORD2>
+ <KEYWORD2>_has-fcnstrs</KEYWORD2>
+ <KEYWORD2>_has-pcnstrs</KEYWORD2>
+ <KEYWORD2>_has-ucnstrs</KEYWORD2>
+ <KEYWORD2>_hasresultset</KEYWORD2>
+ <KEYWORD2>_hasreturnval</KEYWORD2>
+ <KEYWORD2>_help</KEYWORD2>
+ <KEYWORD2>_help-sa</KEYWORD2>
+ <KEYWORD2>_hidden</KEYWORD2>
+ <KEYWORD2>_host</KEYWORD2>
+ <KEYWORD2>_i-misc1</KEYWORD2>
+ <KEYWORD2>_i-misc2</KEYWORD2>
+ <KEYWORD2>_i-res1</KEYWORD2>
+ <KEYWORD2>_i-res2</KEYWORD2>
+ <KEYWORD2>_ianum</KEYWORD2>
+ <KEYWORD2>_id</KEYWORD2>
+ <KEYWORD2>_idx-crc</KEYWORD2>
+ <KEYWORD2>_idx-num</KEYWORD2>
+ <KEYWORD2>_idxid</KEYWORD2>
+ <KEYWORD2>_idxmethod</KEYWORD2>
+ <KEYWORD2>_idxname</KEYWORD2>
+ <KEYWORD2>_idxowner</KEYWORD2>
+ <KEYWORD2>_if-misc1</KEYWORD2>
+ <KEYWORD2>_if-misc2</KEYWORD2>
+ <KEYWORD2>_if-res1</KEYWORD2>
+ <KEYWORD2>_if-res2</KEYWORD2>
+ <KEYWORD2>_index</KEYWORD2>
+ <KEYWORD2>_index-create</KEYWORD2>
+ <KEYWORD2>_index-delete</KEYWORD2>
+ <KEYWORD2>_index-field</KEYWORD2>
+ <KEYWORD2>_index-find</KEYWORD2>
+ <KEYWORD2>_index-free</KEYWORD2>
+ <KEYWORD2>_index-id</KEYWORD2>
+ <KEYWORD2>_index-misc</KEYWORD2>
+ <KEYWORD2>_index-name</KEYWORD2>
+ <KEYWORD2>_index-recid</KEYWORD2>
+ <KEYWORD2>_index-remove</KEYWORD2>
+ <KEYWORD2>_index-seq</KEYWORD2>
+ <KEYWORD2>_index-splits</KEYWORD2>
+ <KEYWORD2>_index-trans</KEYWORD2>
+ <KEYWORD2>_index-uptime</KEYWORD2>
+ <KEYWORD2>_indexbase</KEYWORD2>
+ <KEYWORD2>_indexstat</KEYWORD2>
+ <KEYWORD2>_indexstat-blockdelete</KEYWORD2>
+ <KEYWORD2>_indexstat-create</KEYWORD2>
+ <KEYWORD2>_indexstat-delete</KEYWORD2>
+ <KEYWORD2>_indexstat-id</KEYWORD2>
+ <KEYWORD2>_indexstat-read</KEYWORD2>
+ <KEYWORD2>_indexstat-split</KEYWORD2>
+ <KEYWORD2>_initial</KEYWORD2>
+ <KEYWORD2>_initial-sa</KEYWORD2>
+ <KEYWORD2>_ins</KEYWORD2>
+ <KEYWORD2>_iofile-bufreads</KEYWORD2>
+ <KEYWORD2>_iofile-bufwrites</KEYWORD2>
+ <KEYWORD2>_iofile-extends</KEYWORD2>
+ <KEYWORD2>_iofile-filename</KEYWORD2>
+ <KEYWORD2>_iofile-id</KEYWORD2>
+ <KEYWORD2>_iofile-misc</KEYWORD2>
+ <KEYWORD2>_iofile-reads</KEYWORD2>
+ <KEYWORD2>_iofile-trans</KEYWORD2>
+ <KEYWORD2>_iofile-ubufreads</KEYWORD2>
+ <KEYWORD2>_iofile-ubufwrites</KEYWORD2>
+ <KEYWORD2>_iofile-uptime</KEYWORD2>
+ <KEYWORD2>_iofile-writes</KEYWORD2>
+ <KEYWORD2>_iotype-airds</KEYWORD2>
+ <KEYWORD2>_iotype-aiwrts</KEYWORD2>
+ <KEYWORD2>_iotype-birds</KEYWORD2>
+ <KEYWORD2>_iotype-biwrts</KEYWORD2>
+ <KEYWORD2>_iotype-datareads</KEYWORD2>
+ <KEYWORD2>_iotype-datawrts</KEYWORD2>
+ <KEYWORD2>_iotype-id</KEYWORD2>
+ <KEYWORD2>_iotype-idxrds</KEYWORD2>
+ <KEYWORD2>_iotype-idxwrts</KEYWORD2>
+ <KEYWORD2>_iotype-misc</KEYWORD2>
+ <KEYWORD2>_iotype-trans</KEYWORD2>
+ <KEYWORD2>_iotype-uptime</KEYWORD2>
+ <KEYWORD2>_ispublic</KEYWORD2>
+ <KEYWORD2>_keyvalue-expr</KEYWORD2>
+ <KEYWORD2>_label</KEYWORD2>
+ <KEYWORD2>_label-sa</KEYWORD2>
+ <KEYWORD2>_lang</KEYWORD2>
+ <KEYWORD2>_last-change</KEYWORD2>
+ <KEYWORD2>_last-modified</KEYWORD2>
+ <KEYWORD2>_last_login</KEYWORD2>
+ <KEYWORD2>_latch</KEYWORD2>
+ <KEYWORD2>_latch-busy</KEYWORD2>
+ <KEYWORD2>_latch-hold</KEYWORD2>
+ <KEYWORD2>_latch-id</KEYWORD2>
+ <KEYWORD2>_latch-lock</KEYWORD2>
+ <KEYWORD2>_latch-lockedt</KEYWORD2>
+ <KEYWORD2>_latch-lockt</KEYWORD2>
+ <KEYWORD2>_latch-name</KEYWORD2>
+ <KEYWORD2>_latch-qhold</KEYWORD2>
+ <KEYWORD2>_latch-spin</KEYWORD2>
+ <KEYWORD2>_latch-type</KEYWORD2>
+ <KEYWORD2>_latch-wait</KEYWORD2>
+ <KEYWORD2>_latch-waitt</KEYWORD2>
+ <KEYWORD2>_lic-activeconns</KEYWORD2>
+ <KEYWORD2>_lic-batchconns</KEYWORD2>
+ <KEYWORD2>_lic-currconns</KEYWORD2>
+ <KEYWORD2>_lic-id</KEYWORD2>
+ <KEYWORD2>_lic-maxactive</KEYWORD2>
+ <KEYWORD2>_lic-maxbatch</KEYWORD2>
+ <KEYWORD2>_lic-maxcurrent</KEYWORD2>
+ <KEYWORD2>_lic-minactive</KEYWORD2>
+ <KEYWORD2>_lic-minbatch</KEYWORD2>
+ <KEYWORD2>_lic-mincurrent</KEYWORD2>
+ <KEYWORD2>_lic-validusers</KEYWORD2>
+ <KEYWORD2>_license</KEYWORD2>
+ <KEYWORD2>_linkowner</KEYWORD2>
+ <KEYWORD2>_literalprefix</KEYWORD2>
+ <KEYWORD2>_literalsuffix</KEYWORD2>
+ <KEYWORD2>_localtypename</KEYWORD2>
+ <KEYWORD2>_lock</KEYWORD2>
+ <KEYWORD2>_lock-canclreq</KEYWORD2>
+ <KEYWORD2>_lock-chain</KEYWORD2>
+ <KEYWORD2>_lock-downgrade</KEYWORD2>
+ <KEYWORD2>_lock-exclfind</KEYWORD2>
+ <KEYWORD2>_lock-excllock</KEYWORD2>
+ <KEYWORD2>_lock-exclreq</KEYWORD2>
+ <KEYWORD2>_lock-exclwait</KEYWORD2>
+ <KEYWORD2>_lock-flags</KEYWORD2>
+ <KEYWORD2>_lock-id</KEYWORD2>
+ <KEYWORD2>_lock-misc</KEYWORD2>
+ <KEYWORD2>_lock-name</KEYWORD2>
+ <KEYWORD2>_lock-recgetlock</KEYWORD2>
+ <KEYWORD2>_lock-recgetreq</KEYWORD2>
+ <KEYWORD2>_lock-recgetwait</KEYWORD2>
+ <KEYWORD2>_lock-recid</KEYWORD2>
+ <KEYWORD2>_lock-redreq</KEYWORD2>
+ <KEYWORD2>_lock-shrfind</KEYWORD2>
+ <KEYWORD2>_lock-shrlock</KEYWORD2>
+ <KEYWORD2>_lock-shrreq</KEYWORD2>
+ <KEYWORD2>_lock-shrwait</KEYWORD2>
+ <KEYWORD2>_lock-table</KEYWORD2>
+ <KEYWORD2>_lock-trans</KEYWORD2>
+ <KEYWORD2>_lock-type</KEYWORD2>
+ <KEYWORD2>_lock-upglock</KEYWORD2>
+ <KEYWORD2>_lock-upgreq</KEYWORD2>
+ <KEYWORD2>_lock-upgwait</KEYWORD2>
+ <KEYWORD2>_lock-uptime</KEYWORD2>
+ <KEYWORD2>_lock-usr</KEYWORD2>
+ <KEYWORD2>_lockreq</KEYWORD2>
+ <KEYWORD2>_lockreq-exclfind</KEYWORD2>
+ <KEYWORD2>_lockreq-id</KEYWORD2>
+ <KEYWORD2>_lockreq-misc</KEYWORD2>
+ <KEYWORD2>_lockreq-name</KEYWORD2>
+ <KEYWORD2>_lockreq-num</KEYWORD2>
+ <KEYWORD2>_lockreq-reclock</KEYWORD2>
+ <KEYWORD2>_lockreq-recwait</KEYWORD2>
+ <KEYWORD2>_lockreq-schlock</KEYWORD2>
+ <KEYWORD2>_lockreq-schwait</KEYWORD2>
+ <KEYWORD2>_lockreq-shrfind</KEYWORD2>
+ <KEYWORD2>_lockreq-trnlock</KEYWORD2>
+ <KEYWORD2>_lockreq-trnwait</KEYWORD2>
+ <KEYWORD2>_logging</KEYWORD2>
+ <KEYWORD2>_logging-2pc</KEYWORD2>
+ <KEYWORD2>_logging-2pcnickname</KEYWORD2>
+ <KEYWORD2>_logging-2pcpriority</KEYWORD2>
+ <KEYWORD2>_logging-aibegin</KEYWORD2>
+ <KEYWORD2>_logging-aiblksize</KEYWORD2>
+ <KEYWORD2>_logging-aibuffs</KEYWORD2>
+ <KEYWORD2>_logging-aicurrext</KEYWORD2>
+ <KEYWORD2>_logging-aiextents</KEYWORD2>
+ <KEYWORD2>_logging-aigennum</KEYWORD2>
+ <KEYWORD2>_logging-aiio</KEYWORD2>
+ <KEYWORD2>_logging-aijournal</KEYWORD2>
+ <KEYWORD2>_logging-ailogsize</KEYWORD2>
+ <KEYWORD2>_logging-ainew</KEYWORD2>
+ <KEYWORD2>_logging-aiopen</KEYWORD2>
+ <KEYWORD2>_logging-biblksize</KEYWORD2>
+ <KEYWORD2>_logging-bibuffs</KEYWORD2>
+ <KEYWORD2>_logging-bibytesfree</KEYWORD2>
+ <KEYWORD2>_logging-biclage</KEYWORD2>
+ <KEYWORD2>_logging-biclsize</KEYWORD2>
+ <KEYWORD2>_logging-biextents</KEYWORD2>
+ <KEYWORD2>_logging-bifullbuffs</KEYWORD2>
+ <KEYWORD2>_logging-biio</KEYWORD2>
+ <KEYWORD2>_logging-bilogsize</KEYWORD2>
+ <KEYWORD2>_logging-commitdelay</KEYWORD2>
+ <KEYWORD2>_logging-crashprot</KEYWORD2>
+ <KEYWORD2>_logging-id</KEYWORD2>
+ <KEYWORD2>_logging-lastckp</KEYWORD2>
+ <KEYWORD2>_logging-misc</KEYWORD2>
+ <KEYWORD2>_logins</KEYWORD2>
+ <KEYWORD2>_login_failures</KEYWORD2>
+ <KEYWORD2>_mandatory</KEYWORD2>
+ <KEYWORD2>_max_logins</KEYWORD2>
+ <KEYWORD2>_max_tries</KEYWORD2>
+ <KEYWORD2>_middle_initial</KEYWORD2>
+ <KEYWORD2>_mod-sequence</KEYWORD2>
+ <KEYWORD2>_mode</KEYWORD2>
+ <KEYWORD2>_mstrblk</KEYWORD2>
+ <KEYWORD2>_mstrblk-aiblksize</KEYWORD2>
+ <KEYWORD2>_mstrblk-biblksize</KEYWORD2>
+ <KEYWORD2>_mstrblk-biopen</KEYWORD2>
+ <KEYWORD2>_mstrblk-biprev</KEYWORD2>
+ <KEYWORD2>_mstrblk-bistate</KEYWORD2>
+ <KEYWORD2>_mstrblk-cfilnum</KEYWORD2>
+ <KEYWORD2>_mstrblk-crdate</KEYWORD2>
+ <KEYWORD2>_mstrblk-dbstate</KEYWORD2>
+ <KEYWORD2>_mstrblk-dbvers</KEYWORD2>
+ <KEYWORD2>_mstrblk-fbdate</KEYWORD2>
+ <KEYWORD2>_mstrblk-hiwater</KEYWORD2>
+ <KEYWORD2>_mstrblk-ibdate</KEYWORD2>
+ <KEYWORD2>_mstrblk-ibseq</KEYWORD2>
+ <KEYWORD2>_mstrblk-id</KEYWORD2>
+ <KEYWORD2>_mstrblk-integrity</KEYWORD2>
+ <KEYWORD2>_mstrblk-lasttask</KEYWORD2>
+ <KEYWORD2>_mstrblk-misc</KEYWORD2>
+ <KEYWORD2>_mstrblk-oppdate</KEYWORD2>
+ <KEYWORD2>_mstrblk-oprdate</KEYWORD2>
+ <KEYWORD2>_mstrblk-rlclsize</KEYWORD2>
+ <KEYWORD2>_mstrblk-rltime</KEYWORD2>
+ <KEYWORD2>_mstrblk-tainted</KEYWORD2>
+ <KEYWORD2>_mstrblk-timestamp</KEYWORD2>
+ <KEYWORD2>_mstrblk-totblks</KEYWORD2>
+ <KEYWORD2>_myconn-id</KEYWORD2>
+ <KEYWORD2>_myconn-numseqbuffers</KEYWORD2>
+ <KEYWORD2>_myconn-pid</KEYWORD2>
+ <KEYWORD2>_myconn-usedseqbuffers</KEYWORD2>
+ <KEYWORD2>_myconn-userid</KEYWORD2>
+ <KEYWORD2>_myconnection</KEYWORD2>
+ <KEYWORD2>_name_loc</KEYWORD2>
+ <KEYWORD2>_ndx</KEYWORD2>
+ <KEYWORD2>_nullable</KEYWORD2>
+ <KEYWORD2>_nullflag</KEYWORD2>
+ <KEYWORD2>_num-comp</KEYWORD2>
+ <KEYWORD2>_numfld</KEYWORD2>
+ <KEYWORD2>_numkcomp</KEYWORD2>
+ <KEYWORD2>_numkey</KEYWORD2>
+ <KEYWORD2>_numkfld</KEYWORD2>
+ <KEYWORD2>_object-associate</KEYWORD2>
+ <KEYWORD2>_object-associate-type</KEYWORD2>
+ <KEYWORD2>_object-attrib</KEYWORD2>
+ <KEYWORD2>_object-block</KEYWORD2>
+ <KEYWORD2>_object-misc</KEYWORD2>
+ <KEYWORD2>_object-number</KEYWORD2>
+ <KEYWORD2>_object-root</KEYWORD2>
+ <KEYWORD2>_object-system</KEYWORD2>
+ <KEYWORD2>_object-type</KEYWORD2>
+ <KEYWORD2>_odbcmoney</KEYWORD2>
+ <KEYWORD2>_order</KEYWORD2>
+ <KEYWORD2>_other-commit</KEYWORD2>
+ <KEYWORD2>_other-flushmblk</KEYWORD2>
+ <KEYWORD2>_other-id</KEYWORD2>
+ <KEYWORD2>_other-misc</KEYWORD2>
+ <KEYWORD2>_other-trans</KEYWORD2>
+ <KEYWORD2>_other-undo</KEYWORD2>
+ <KEYWORD2>_other-uptime</KEYWORD2>
+ <KEYWORD2>_other-wait</KEYWORD2>
+ <KEYWORD2>_override</KEYWORD2>
+ <KEYWORD2>_owner</KEYWORD2>
+ <KEYWORD2>_password</KEYWORD2>
+ <KEYWORD2>_prime-index</KEYWORD2>
+ <KEYWORD2>_proc-name</KEYWORD2>
+ <KEYWORD2>_procbin</KEYWORD2>
+ <KEYWORD2>_procid</KEYWORD2>
+ <KEYWORD2>_procname</KEYWORD2>
+ <KEYWORD2>_proctext</KEYWORD2>
+ <KEYWORD2>_proctype</KEYWORD2>
+ <KEYWORD2>_property</KEYWORD2>
+ <KEYWORD2>_pw-apwqwrites</KEYWORD2>
+ <KEYWORD2>_pw-buffsscaned</KEYWORD2>
+ <KEYWORD2>_pw-bufsckp</KEYWORD2>
+ <KEYWORD2>_pw-checkpoints</KEYWORD2>
+ <KEYWORD2>_pw-ckpqwrites</KEYWORD2>
+ <KEYWORD2>_pw-dbwrites</KEYWORD2>
+ <KEYWORD2>_pw-flushed</KEYWORD2>
+ <KEYWORD2>_pw-id</KEYWORD2>
+ <KEYWORD2>_pw-marked</KEYWORD2>
+ <KEYWORD2>_pw-misc</KEYWORD2>
+ <KEYWORD2>_pw-scancycles</KEYWORD2>
+ <KEYWORD2>_pw-scanwrites</KEYWORD2>
+ <KEYWORD2>_pw-totdbwrites</KEYWORD2>
+ <KEYWORD2>_pw-trans</KEYWORD2>
+ <KEYWORD2>_pw-uptime</KEYWORD2>
+ <KEYWORD2>_pwd</KEYWORD2>
+ <KEYWORD2>_pwd_duration</KEYWORD2>
+ <KEYWORD2>_pwd_expires</KEYWORD2>
+ <KEYWORD2>_record-bytescreat</KEYWORD2>
+ <KEYWORD2>_record-bytesdel</KEYWORD2>
+ <KEYWORD2>_record-bytesread</KEYWORD2>
+ <KEYWORD2>_record-bytesupd</KEYWORD2>
+ <KEYWORD2>_record-fragcreat</KEYWORD2>
+ <KEYWORD2>_record-fragdel</KEYWORD2>
+ <KEYWORD2>_record-fragread</KEYWORD2>
+ <KEYWORD2>_record-fragupd</KEYWORD2>
+ <KEYWORD2>_record-id</KEYWORD2>
+ <KEYWORD2>_record-misc</KEYWORD2>
+ <KEYWORD2>_record-reccreat</KEYWORD2>
+ <KEYWORD2>_record-recdel</KEYWORD2>
+ <KEYWORD2>_record-recread</KEYWORD2>
+ <KEYWORD2>_record-recupd</KEYWORD2>
+ <KEYWORD2>_record-trans</KEYWORD2>
+ <KEYWORD2>_record-uptime</KEYWORD2>
+ <KEYWORD2>_ref</KEYWORD2>
+ <KEYWORD2>_ref-table</KEYWORD2>
+ <KEYWORD2>_refcnstrname</KEYWORD2>
+ <KEYWORD2>_referstonew</KEYWORD2>
+ <KEYWORD2>_referstoold</KEYWORD2>
+ <KEYWORD2>_refowner</KEYWORD2>
+ <KEYWORD2>_reftblname</KEYWORD2>
+ <KEYWORD2>_remowner</KEYWORD2>
+ <KEYWORD2>_remtbl</KEYWORD2>
+ <KEYWORD2>_repl-agent</KEYWORD2>
+ <KEYWORD2>_repl-agentcontrol</KEYWORD2>
+ <KEYWORD2>_repl-server</KEYWORD2>
+ <KEYWORD2>_replagt-agentid</KEYWORD2>
+ <KEYWORD2>_replagt-agentname</KEYWORD2>
+ <KEYWORD2>_replagt-blocksack</KEYWORD2>
+ <KEYWORD2>_replagt-blocksprocessed</KEYWORD2>
+ <KEYWORD2>_replagt-blocksreceived</KEYWORD2>
+ <KEYWORD2>_replagt-commstatus</KEYWORD2>
+ <KEYWORD2>_replagt-connecttime</KEYWORD2>
+ <KEYWORD2>_replagt-dbname</KEYWORD2>
+ <KEYWORD2>_replagt-lasttrid</KEYWORD2>
+ <KEYWORD2>_replagt-method</KEYWORD2>
+ <KEYWORD2>_replagt-notesprocessed</KEYWORD2>
+ <KEYWORD2>_replagt-port</KEYWORD2>
+ <KEYWORD2>_replagt-reservedchar</KEYWORD2>
+ <KEYWORD2>_replagt-reservedint</KEYWORD2>
+ <KEYWORD2>_replagt-serverhost</KEYWORD2>
+ <KEYWORD2>_replagt-status</KEYWORD2>
+ <KEYWORD2>_replagtctl-agentid</KEYWORD2>
+ <KEYWORD2>_replagtctl-agentname</KEYWORD2>
+ <KEYWORD2>_replagtctl-blocksack</KEYWORD2>
+ <KEYWORD2>_replagtctl-blockssent</KEYWORD2>
+ <KEYWORD2>_replagtctl-commstatus</KEYWORD2>
+ <KEYWORD2>_replagtctl-connecttime</KEYWORD2>
+ <KEYWORD2>_replagtctl-lastblocksentat</KEYWORD2>
+ <KEYWORD2>_replagtctl-method</KEYWORD2>
+ <KEYWORD2>_replagtctl-port</KEYWORD2>
+ <KEYWORD2>_replagtctl-remotedbname</KEYWORD2>
+ <KEYWORD2>_replagtctl-remotehost</KEYWORD2>
+ <KEYWORD2>_replagtctl-reservedchar</KEYWORD2>
+ <KEYWORD2>_replagtctl-reservedint</KEYWORD2>
+ <KEYWORD2>_replagtctl-status</KEYWORD2>
+ <KEYWORD2>_replsrv-agentcount</KEYWORD2>
+ <KEYWORD2>_replsrv-blockssent</KEYWORD2>
+ <KEYWORD2>_replsrv-id</KEYWORD2>
+ <KEYWORD2>_replsrv-lastblocksentat</KEYWORD2>
+ <KEYWORD2>_replsrv-reservedchar</KEYWORD2>
+ <KEYWORD2>_replsrv-reservedint</KEYWORD2>
+ <KEYWORD2>_replsrv-starttime</KEYWORD2>
+ <KEYWORD2>_resacc</KEYWORD2>
+ <KEYWORD2>_resrc</KEYWORD2>
+ <KEYWORD2>_resrc-id</KEYWORD2>
+ <KEYWORD2>_resrc-lock</KEYWORD2>
+ <KEYWORD2>_resrc-name</KEYWORD2>
+ <KEYWORD2>_resrc-time</KEYWORD2>
+ <KEYWORD2>_resrc-wait</KEYWORD2>
+ <KEYWORD2>_rolename</KEYWORD2>
+ <KEYWORD2>_rssid</KEYWORD2>
+ <KEYWORD2>_scale</KEYWORD2>
+ <KEYWORD2>_schemaname</KEYWORD2>
+ <KEYWORD2>_screator</KEYWORD2>
+ <KEYWORD2>_searchable</KEYWORD2>
+ <KEYWORD2>_segment-bytefree</KEYWORD2>
+ <KEYWORD2>_segment-bytesused</KEYWORD2>
+ <KEYWORD2>_segment-id</KEYWORD2>
+ <KEYWORD2>_segment-misc</KEYWORD2>
+ <KEYWORD2>_segment-segid</KEYWORD2>
+ <KEYWORD2>_segment-segsize</KEYWORD2>
+ <KEYWORD2>_segments</KEYWORD2>
+ <KEYWORD2>_sel</KEYWORD2>
+ <KEYWORD2>_seq</KEYWORD2>
+ <KEYWORD2>_seq-incr</KEYWORD2>
+ <KEYWORD2>_seq-init</KEYWORD2>
+ <KEYWORD2>_seq-max</KEYWORD2>
+ <KEYWORD2>_seq-min</KEYWORD2>
+ <KEYWORD2>_seq-misc</KEYWORD2>
+ <KEYWORD2>_seq-name</KEYWORD2>
+ <KEYWORD2>_seq-num</KEYWORD2>
+ <KEYWORD2>_seq-owner</KEYWORD2>
+ <KEYWORD2>_sequence</KEYWORD2>
+ <KEYWORD2>_server-byterec</KEYWORD2>
+ <KEYWORD2>_server-bytesent</KEYWORD2>
+ <KEYWORD2>_server-currusers</KEYWORD2>
+ <KEYWORD2>_server-id</KEYWORD2>
+ <KEYWORD2>_server-logins</KEYWORD2>
+ <KEYWORD2>_server-maxusers</KEYWORD2>
+ <KEYWORD2>_server-misc</KEYWORD2>
+ <KEYWORD2>_server-msgrec</KEYWORD2>
+ <KEYWORD2>_server-msgsent</KEYWORD2>
+ <KEYWORD2>_server-num</KEYWORD2>
+ <KEYWORD2>_server-pendconn</KEYWORD2>
+ <KEYWORD2>_server-pid</KEYWORD2>
+ <KEYWORD2>_server-portnum</KEYWORD2>
+ <KEYWORD2>_server-protocol</KEYWORD2>
+ <KEYWORD2>_server-qryrec</KEYWORD2>
+ <KEYWORD2>_server-recrec</KEYWORD2>
+ <KEYWORD2>_server-recsent</KEYWORD2>
+ <KEYWORD2>_server-timeslice</KEYWORD2>
+ <KEYWORD2>_server-trans</KEYWORD2>
+ <KEYWORD2>_server-type</KEYWORD2>
+ <KEYWORD2>_server-uptime</KEYWORD2>
+ <KEYWORD2>_servers</KEYWORD2>
+ <KEYWORD2>_sname</KEYWORD2>
+ <KEYWORD2>_sowner</KEYWORD2>
+ <KEYWORD2>_space-allocnewrm</KEYWORD2>
+ <KEYWORD2>_space-backadd</KEYWORD2>
+ <KEYWORD2>_space-bytesalloc</KEYWORD2>
+ <KEYWORD2>_space-dbexd</KEYWORD2>
+ <KEYWORD2>_space-examined</KEYWORD2>
+ <KEYWORD2>_space-fromfree</KEYWORD2>
+ <KEYWORD2>_space-fromrm</KEYWORD2>
+ <KEYWORD2>_space-front2back</KEYWORD2>
+ <KEYWORD2>_space-frontadd</KEYWORD2>
+ <KEYWORD2>_space-id</KEYWORD2>
+ <KEYWORD2>_space-locked</KEYWORD2>
+ <KEYWORD2>_space-misc</KEYWORD2>
+ <KEYWORD2>_space-removed</KEYWORD2>
+ <KEYWORD2>_space-retfree</KEYWORD2>
+ <KEYWORD2>_space-takefree</KEYWORD2>
+ <KEYWORD2>_space-trans</KEYWORD2>
+ <KEYWORD2>_space-uptime</KEYWORD2>
+ <KEYWORD2>_spare1</KEYWORD2>
+ <KEYWORD2>_spare2</KEYWORD2>
+ <KEYWORD2>_spare3</KEYWORD2>
+ <KEYWORD2>_spare4</KEYWORD2>
+ <KEYWORD2>_sql_properties</KEYWORD2>
+ <KEYWORD2>_sremdb</KEYWORD2>
+ <KEYWORD2>_startup</KEYWORD2>
+ <KEYWORD2>_startup-aibuffs</KEYWORD2>
+ <KEYWORD2>_startup-ainame</KEYWORD2>
+ <KEYWORD2>_startup-apwbuffs</KEYWORD2>
+ <KEYWORD2>_startup-apwmaxwrites</KEYWORD2>
+ <KEYWORD2>_startup-apwqtime</KEYWORD2>
+ <KEYWORD2>_startup-apwstime</KEYWORD2>
+ <KEYWORD2>_startup-bibuffs</KEYWORD2>
+ <KEYWORD2>_startup-bidelay</KEYWORD2>
+ <KEYWORD2>_startup-biio</KEYWORD2>
+ <KEYWORD2>_startup-biname</KEYWORD2>
+ <KEYWORD2>_startup-bitrunc</KEYWORD2>
+ <KEYWORD2>_startup-buffs</KEYWORD2>
+ <KEYWORD2>_startup-crashprot</KEYWORD2>
+ <KEYWORD2>_startup-directio</KEYWORD2>
+ <KEYWORD2>_startup-id</KEYWORD2>
+ <KEYWORD2>_startup-locktable</KEYWORD2>
+ <KEYWORD2>_startup-maxclients</KEYWORD2>
+ <KEYWORD2>_startup-maxservers</KEYWORD2>
+ <KEYWORD2>_startup-maxusers</KEYWORD2>
+ <KEYWORD2>_startup-misc</KEYWORD2>
+ <KEYWORD2>_startup-spin</KEYWORD2>
+ <KEYWORD2>_statbase</KEYWORD2>
+ <KEYWORD2>_statbase-id</KEYWORD2>
+ <KEYWORD2>_statementorrow</KEYWORD2>
+ <KEYWORD2>_stbl</KEYWORD2>
+ <KEYWORD2>_stblowner</KEYWORD2>
+ <KEYWORD2>_storageobject</KEYWORD2>
+ <KEYWORD2>_summary-aiwrites</KEYWORD2>
+ <KEYWORD2>_summary-bireads</KEYWORD2>
+ <KEYWORD2>_summary-biwrites</KEYWORD2>
+ <KEYWORD2>_summary-chkpts</KEYWORD2>
+ <KEYWORD2>_summary-commits</KEYWORD2>
+ <KEYWORD2>_summary-dbaccesses</KEYWORD2>
+ <KEYWORD2>_summary-dbreads</KEYWORD2>
+ <KEYWORD2>_summary-dbwrites</KEYWORD2>
+ <KEYWORD2>_summary-flushed</KEYWORD2>
+ <KEYWORD2>_summary-id</KEYWORD2>
+ <KEYWORD2>_summary-misc</KEYWORD2>
+ <KEYWORD2>_summary-reccreat</KEYWORD2>
+ <KEYWORD2>_summary-recdel</KEYWORD2>
+ <KEYWORD2>_summary-reclock</KEYWORD2>
+ <KEYWORD2>_summary-recreads</KEYWORD2>
+ <KEYWORD2>_summary-recupd</KEYWORD2>
+ <KEYWORD2>_summary-recwait</KEYWORD2>
+ <KEYWORD2>_summary-transcomm</KEYWORD2>
+ <KEYWORD2>_summary-undos</KEYWORD2>
+ <KEYWORD2>_summary-uptime</KEYWORD2>
+ <KEYWORD2>_surname</KEYWORD2>
+ <KEYWORD2>_sys-field</KEYWORD2>
+ <KEYWORD2>_sysattachtbls</KEYWORD2>
+ <KEYWORD2>_sysbigintstat</KEYWORD2>
+ <KEYWORD2>_syscalctable</KEYWORD2>
+ <KEYWORD2>_syscharstat</KEYWORD2>
+ <KEYWORD2>_syschkcolusage</KEYWORD2>
+ <KEYWORD2>_syschkconstrs</KEYWORD2>
+ <KEYWORD2>_syschkconstr_name_map</KEYWORD2>
+ <KEYWORD2>_syscolauth</KEYWORD2>
+ <KEYWORD2>_syscolstat</KEYWORD2>
+ <KEYWORD2>_sysdatatypes</KEYWORD2>
+ <KEYWORD2>_sysdatestat</KEYWORD2>
+ <KEYWORD2>_sysdbauth</KEYWORD2>
+ <KEYWORD2>_sysdblinks</KEYWORD2>
+ <KEYWORD2>_sysfloatstat</KEYWORD2>
+ <KEYWORD2>_sysidxstat</KEYWORD2>
+ <KEYWORD2>_sysintstat</KEYWORD2>
+ <KEYWORD2>_syskeycolusage</KEYWORD2>
+ <KEYWORD2>_sysncharstat</KEYWORD2>
+ <KEYWORD2>_sysnumstat</KEYWORD2>
+ <KEYWORD2>_sysnvarcharstat</KEYWORD2>
+ <KEYWORD2>_sysprocbin</KEYWORD2>
+ <KEYWORD2>_sysproccolumns</KEYWORD2>
+ <KEYWORD2>_sysprocedures</KEYWORD2>
+ <KEYWORD2>_sysproctext</KEYWORD2>
+ <KEYWORD2>_sysrealstat</KEYWORD2>
+ <KEYWORD2>_sysrefconstrs</KEYWORD2>
+ <KEYWORD2>_sysroles</KEYWORD2>
+ <KEYWORD2>_sysschemas</KEYWORD2>
+ <KEYWORD2>_sysseqauth</KEYWORD2>
+ <KEYWORD2>_syssmintstat</KEYWORD2>
+ <KEYWORD2>_syssynonyms</KEYWORD2>
+ <KEYWORD2>_systabauth</KEYWORD2>
+ <KEYWORD2>_systblconstrs</KEYWORD2>
+ <KEYWORD2>_systblstat</KEYWORD2>
+ <KEYWORD2>_systimestat</KEYWORD2>
+ <KEYWORD2>_systinyintstat</KEYWORD2>
+ <KEYWORD2>_systrigcols</KEYWORD2>
+ <KEYWORD2>_systrigger</KEYWORD2>
+ <KEYWORD2>_systsstat</KEYWORD2>
+ <KEYWORD2>_syststzstat</KEYWORD2>
+ <KEYWORD2>_sysvarcharstat</KEYWORD2>
+ <KEYWORD2>_sysviews</KEYWORD2>
+ <KEYWORD2>_sysviews_name_map</KEYWORD2>
+ <KEYWORD2>_tablebase</KEYWORD2>
+ <KEYWORD2>_tablestat</KEYWORD2>
+ <KEYWORD2>_tablestat-create</KEYWORD2>
+ <KEYWORD2>_tablestat-delete</KEYWORD2>
+ <KEYWORD2>_tablestat-id</KEYWORD2>
+ <KEYWORD2>_tablestat-read</KEYWORD2>
+ <KEYWORD2>_tablestat-update</KEYWORD2>
+ <KEYWORD2>_tbl</KEYWORD2>
+ <KEYWORD2>_tbl-status</KEYWORD2>
+ <KEYWORD2>_tbl-type</KEYWORD2>
+ <KEYWORD2>_tblid</KEYWORD2>
+ <KEYWORD2>_tblname</KEYWORD2>
+ <KEYWORD2>_tblowner</KEYWORD2>
+ <KEYWORD2>_telephone</KEYWORD2>
+ <KEYWORD2>_template</KEYWORD2>
+ <KEYWORD2>_toss-limit</KEYWORD2>
+ <KEYWORD2>_trans</KEYWORD2>
+ <KEYWORD2>_trans-coord</KEYWORD2>
+ <KEYWORD2>_trans-coordtx</KEYWORD2>
+ <KEYWORD2>_trans-counter</KEYWORD2>
+ <KEYWORD2>_trans-duration</KEYWORD2>
+ <KEYWORD2>_trans-flags</KEYWORD2>
+ <KEYWORD2>_trans-id</KEYWORD2>
+ <KEYWORD2>_trans-misc</KEYWORD2>
+ <KEYWORD2>_trans-num</KEYWORD2>
+ <KEYWORD2>_trans-state</KEYWORD2>
+ <KEYWORD2>_trans-txtime</KEYWORD2>
+ <KEYWORD2>_trans-usrnum</KEYWORD2>
+ <KEYWORD2>_trig-crc</KEYWORD2>
+ <KEYWORD2>_triggerevent</KEYWORD2>
+ <KEYWORD2>_triggerid</KEYWORD2>
+ <KEYWORD2>_triggername</KEYWORD2>
+ <KEYWORD2>_triggertime</KEYWORD2>
+ <KEYWORD2>_txe-id</KEYWORD2>
+ <KEYWORD2>_txe-locks</KEYWORD2>
+ <KEYWORD2>_txe-lockss</KEYWORD2>
+ <KEYWORD2>_txe-time</KEYWORD2>
+ <KEYWORD2>_txe-type</KEYWORD2>
+ <KEYWORD2>_txe-wait-time</KEYWORD2>
+ <KEYWORD2>_txe-waits</KEYWORD2>
+ <KEYWORD2>_txe-waitss</KEYWORD2>
+ <KEYWORD2>_txelock</KEYWORD2>
+ <KEYWORD2>_typeprecision</KEYWORD2>
+ <KEYWORD2>_u-misc1</KEYWORD2>
+ <KEYWORD2>_u-misc2</KEYWORD2>
+ <KEYWORD2>_unique</KEYWORD2>
+ <KEYWORD2>_unsignedattr</KEYWORD2>
+ <KEYWORD2>_unsorted</KEYWORD2>
+ <KEYWORD2>_upd</KEYWORD2>
+ <KEYWORD2>_updatable</KEYWORD2>
+ <KEYWORD2>_user</KEYWORD2>
+ <KEYWORD2>_user-misc</KEYWORD2>
+ <KEYWORD2>_user-name</KEYWORD2>
+ <KEYWORD2>_userid</KEYWORD2>
+ <KEYWORD2>_userio</KEYWORD2>
+ <KEYWORD2>_userio-airead</KEYWORD2>
+ <KEYWORD2>_userio-aiwrite</KEYWORD2>
+ <KEYWORD2>_userio-biread</KEYWORD2>
+ <KEYWORD2>_userio-biwrite</KEYWORD2>
+ <KEYWORD2>_userio-dbaccess</KEYWORD2>
+ <KEYWORD2>_userio-dbread</KEYWORD2>
+ <KEYWORD2>_userio-dbwrite</KEYWORD2>
+ <KEYWORD2>_userio-id</KEYWORD2>
+ <KEYWORD2>_userio-misc</KEYWORD2>
+ <KEYWORD2>_userio-name</KEYWORD2>
+ <KEYWORD2>_userio-usr</KEYWORD2>
+ <KEYWORD2>_userlock</KEYWORD2>
+ <KEYWORD2>_userlock-chain</KEYWORD2>
+ <KEYWORD2>_userlock-flags</KEYWORD2>
+ <KEYWORD2>_userlock-id</KEYWORD2>
+ <KEYWORD2>_userlock-misc</KEYWORD2>
+ <KEYWORD2>_userlock-name</KEYWORD2>
+ <KEYWORD2>_userlock-recid</KEYWORD2>
+ <KEYWORD2>_userlock-type</KEYWORD2>
+ <KEYWORD2>_userlock-usr</KEYWORD2>
+ <KEYWORD2>_username</KEYWORD2>
+ <KEYWORD2>_userstatus</KEYWORD2>
+ <KEYWORD2>_userstatus-counter</KEYWORD2>
+ <KEYWORD2>_userstatus-objectid</KEYWORD2>
+ <KEYWORD2>_userstatus-objecttype</KEYWORD2>
+ <KEYWORD2>_userstatus-operation</KEYWORD2>
+ <KEYWORD2>_userstatus-state</KEYWORD2>
+ <KEYWORD2>_userstatus-target</KEYWORD2>
+ <KEYWORD2>_userstatus-userid</KEYWORD2>
+ <KEYWORD2>_user_number</KEYWORD2>
+ <KEYWORD2>_valexp</KEYWORD2>
+ <KEYWORD2>_valmsg</KEYWORD2>
+ <KEYWORD2>_valmsg-sa</KEYWORD2>
+ <KEYWORD2>_value</KEYWORD2>
+ <KEYWORD2>_value_ch</KEYWORD2>
+ <KEYWORD2>_value_n</KEYWORD2>
+ <KEYWORD2>_val_ts</KEYWORD2>
+ <KEYWORD2>_vcol-order</KEYWORD2>
+ <KEYWORD2>_version</KEYWORD2>
+ <KEYWORD2>_view</KEYWORD2>
+ <KEYWORD2>_view-as</KEYWORD2>
+ <KEYWORD2>_view-col</KEYWORD2>
+ <KEYWORD2>_view-def</KEYWORD2>
+ <KEYWORD2>_view-name</KEYWORD2>
+ <KEYWORD2>_view-ref</KEYWORD2>
+ <KEYWORD2>_viewname</KEYWORD2>
+ <KEYWORD2>_viewtext</KEYWORD2>
+ <KEYWORD2>_where-cls</KEYWORD2>
+ <KEYWORD2>_width</KEYWORD2>
+ <KEYWORD2>_word-rule</KEYWORD2>
+ <KEYWORD2>_word-rules</KEYWORD2>
+ <KEYWORD2>_wordidx</KEYWORD2>
+ <KEYWORD2>_wr-attr</KEYWORD2>
+ <KEYWORD2>_wr-cp</KEYWORD2>
+ <KEYWORD2>_wr-name</KEYWORD2>
+ <KEYWORD2>_wr-number</KEYWORD2>
+ <KEYWORD2>_wr-segment</KEYWORD2>
+ <KEYWORD2>_wr-type</KEYWORD2>
+ <KEYWORD2>_wr-version</KEYWORD2>
+
+
+
+
+
+
+ <!-- INVALID : Deprecated keywords -->
+ <INVALID>USE-INDEX</INVALID>
+ <INVALID>UNIX</INVALID>
+ <INVALID>DOS</INVALID>
+ <INVALID>VMS</INVALID>
+ <INVALID>BTOS</INVALID>
+ <INVALID>CTOS</INVALID>
+ <INVALID>OS2</INVALID>
+ <INVALID>OS400</INVALID>
+ <INVALID>EDITING</INVALID>
+ <INVALID>CHOOSE</INVALID>
+ <INVALID>PROMPT-FOR</INVALID>
+ <INVALID>SHARE-LOCK</INVALID>
+ <INVALID>READKEY</INVALID>
+ <INVALID>GO-PENDING</INVALID>
+ <INVALID>VALIDATE</INVALID>
+ <INVALID>IS-ATTR-SPACE</INVALID>
+ <INVALID>GATEWAYS</INVALID>
+ <INVALID>SCROLL</INVALID>
+
+ <!-- Removed or renamed keywords -->
+ <INVALID>ITERATION-CHANGED</INVALID>
+ <INVALID>BEFORE-RECORD-FILL</INVALID>
+ <INVALID>AFTER-RECORD-FILL</INVALID>
+ <INVALID>REPOSITION-MODE</INVALID>
+
+
+
+ <!-- COMMENT2 : Preprocessor statements -->
+ <COMMENT2>&ADM-CONTAINER</COMMENT2>
+ <COMMENT2>&ADM-SUPPORTED-LINKS</COMMENT2>
+ <COMMENT2>&ANALYZE-RESUME</COMMENT2>
+ <COMMENT2>&ANALYZE-SUSPEND</COMMENT2>
+ <COMMENT2>&BATCH-MODE</COMMENT2>
+ <COMMENT2>&BROWSE-NAME</COMMENT2>
+ <COMMENT2>&DEFINED</COMMENT2>
+ <COMMENT2>&DISPLAYED-FIELDS</COMMENT2>
+ <COMMENT2>&DISPLAYED-OBJECTS</COMMENT2>
+ <COMMENT2>&ELSE</COMMENT2>
+ <COMMENT2>&ELSEIF</COMMENT2>
+ <COMMENT2>&ENABLED-FIELDS-IN-QUERY</COMMENT2>
+ <COMMENT2>&ENABLED-FIELDS</COMMENT2>
+ <COMMENT2>&ENABLED-OBJECTS</COMMENT2>
+ <COMMENT2>&ENABLED-TABLES-IN-QUERY</COMMENT2>
+ <COMMENT2>&ENABLED-TABLES</COMMENT2>
+ <COMMENT2>&ENDIF</COMMENT2>
+ <COMMENT2>&EXTERNAL-TABLES</COMMENT2>
+ <COMMENT2>&FIELD-PAIRS-IN-QUERY</COMMENT2>
+ <COMMENT2>&FIELD-PAIRS</COMMENT2>
+ <COMMENT2>&FIELDS-IN-QUERY</COMMENT2>
+ <COMMENT2>&FILE-NAME</COMMENT2>
+ <COMMENT2>&FIRST-EXTERNAL-TABLE</COMMENT2>
+ <COMMENT2>&FIRST-TABLE-IN-QUERY</COMMENT2>
+ <COMMENT2>&FRAME-NAME</COMMENT2>
+ <COMMENT2>&GLOB</COMMENT2>
+ <COMMENT2>&GLOBAL-DEFINE</COMMENT2>
+ <COMMENT2>&IF</COMMENT2>
+ <COMMENT2>&INCLUDE</COMMENT2>
+ <COMMENT2>&INTERNAL-TABLES</COMMENT2>
+ <COMMENT2>&LAYOUT-VARIABLE</COMMENT2>
+ <COMMENT2>&LINE-NUMBER</COMMENT2>
+ <COMMENT2>&LIST-1</COMMENT2>
+ <COMMENT2>&LIST-2</COMMENT2>
+ <COMMENT2>&LIST-3</COMMENT2>
+ <COMMENT2>&LIST-4</COMMENT2>
+ <COMMENT2>&LIST-5</COMMENT2>
+ <COMMENT2>&LIST-6</COMMENT2>
+ <COMMENT2>&MESSAGE</COMMENT2>
+ <COMMENT2>&NEW</COMMENT2>
+ <COMMENT2>&OPEN-BROWSERS-IN-QUERY</COMMENT2>
+ <COMMENT2>&OPEN-QUERY</COMMENT2>
+ <COMMENT2>&OPSYS</COMMENT2>
+ <COMMENT2>&PROCEDURE-TYPE</COMMENT2>
+ <COMMENT2>&QUERY-NAME</COMMENT2>
+ <COMMENT2>&SCOP</COMMENT2>
+ <COMMENT2>&SCOPED-DEFINE</COMMENT2>
+ <COMMENT2>&SELF-NAME</COMMENT2>
+ <COMMENT2>&SEQUENCE</COMMENT2>
+ <COMMENT2>&TABLES-IN-QUERY</COMMENT2>
+ <COMMENT2>&THEN</COMMENT2>
+ <COMMENT2>&UIB_is_Running</COMMENT2>
+ <COMMENT2>&UNDEFINE</COMMENT2>
+ <COMMENT2>&WINDOW-NAME</COMMENT2>
+ <COMMENT2>&WINDOW-SYSTEM</COMMENT2>
+ <COMMENT2>DEFINED</COMMENT2>
+ <COMMENT2>PROCEDURE-TYPE</COMMENT2>
+ <COMMENT2>_CREATE-WINDOW</COMMENT2>
+ <COMMENT2>_CUSTOM _DEFINITIONS</COMMENT2>
+ <COMMENT2>_CUSTOM _MAIN-BLOCK</COMMENT2>
+ <COMMENT2>_CUSTOM</COMMENT2>
+ <COMMENT2>_DEFINITIONS</COMMENT2>
+ <COMMENT2>_END-PROCEDURE-SETTINGS</COMMENT2>
+ <COMMENT2>_FUNCTION-FORWARD</COMMENT2>
+ <COMMENT2>_FUNCTION</COMMENT2>
+ <COMMENT2>_INCLUDED-LIB</COMMENT2>
+ <COMMENT2>_INLINE</COMMENT2>
+ <COMMENT2>_MAIN-BLOCK</COMMENT2>
+ <COMMENT2>_PROCEDURE-SETTINGS</COMMENT2>
+ <COMMENT2>_PROCEDURE</COMMENT2>
+ <COMMENT2>_UIB-CODE-BLOCK</COMMENT2>
+ <COMMENT2>_UIB-PREPROCESSOR-BLOCK</COMMENT2>
+ <COMMENT2>_VERSION-NUMBER</COMMENT2>
+ <COMMENT2>_XFTR</COMMENT2>
+
+ </KEYWORDS>
+ </RULES>
+
+
+</MODE>
+
diff --git a/jEdit/modes/prolog.xml b/jEdit/modes/prolog.xml
index 6eda929..90a314d 100644
--- a/jEdit/modes/prolog.xml
+++ b/jEdit/modes/prolog.xml
@@ -1,195 +1,195 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- jEdit Prolog syntax file
- based on the INRIA ISO Prolog web page @ http://pauillac.inria.fr/~hodgson/prolog
-
- written by Giulio Piancastelli
- version 1.0
- created on 31st December 2001
- last revised 19th November 2002
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="%" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
-
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
- <!--- ISO compliant C-style comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- String literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- List literals -->
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE" DELEGATE="LIST">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Operators -->
- <SEQ TYPE="OPERATOR">--></SEQ>
- <SEQ TYPE="OPERATOR">:-</SEQ>
- <SEQ TYPE="OPERATOR">?-</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">-></SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">\+</SEQ> <!-- ISO Prolog uses it instead of 'not' -->
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">\==</SEQ>
- <SEQ TYPE="OPERATOR">\=</SEQ>
- <SEQ TYPE="OPERATOR">@<</SEQ>
- <SEQ TYPE="OPERATOR">@=<</SEQ>
- <SEQ TYPE="OPERATOR">@>=</SEQ>
- <SEQ TYPE="OPERATOR">@></SEQ>
- <SEQ TYPE="OPERATOR">=..</SEQ>
- <SEQ TYPE="OPERATOR">=:=</SEQ>
- <SEQ TYPE="OPERATOR">=\=</SEQ>
- <SEQ TYPE="OPERATOR">=<</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/\</SEQ>
- <SEQ TYPE="OPERATOR">\/</SEQ>
- <SEQ TYPE="OPERATOR">//</SEQ>
- <SEQ TYPE="OPERATOR"><<</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>></SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">**</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <!-- The '.' at the end of each clause -->
- <SEQ TYPE="OPERATOR">.</SEQ>
-
- <!-- Parentheses -->
- <SEQ TYPE="MARKUP">(</SEQ>
- <SEQ TYPE="MARKUP">)</SEQ>
- <SEQ TYPE="NULL">{</SEQ>
- <SEQ TYPE="NULL">}</SEQ>
-
- <KEYWORDS>
-
- <!-- Keywords that are 0 arity built-in predicates -->
- <KEYWORD1>true</KEYWORD1>
- <KEYWORD1>fail</KEYWORD1>
- <KEYWORD1>!</KEYWORD1> <!-- cut -->
- <KEYWORD1>at_end_of_stream</KEYWORD1>
- <KEYWORD1>nl</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>halt</KEYWORD1>
-
- <!-- Keywords that are built-in predicates with arity greater than or equal to 1 -->
- <FUNCTION>call</FUNCTION>
- <FUNCTION>catch</FUNCTION>
- <FUNCTION>throw</FUNCTION>
- <FUNCTION>unify_with_occurs_check</FUNCTION>
- <FUNCTION>var</FUNCTION>
- <FUNCTION>atom</FUNCTION>
- <FUNCTION>integer</FUNCTION>
- <FUNCTION>float</FUNCTION>
- <FUNCTION>atomic</FUNCTION>
- <FUNCTION>compound</FUNCTION>
- <FUNCTION>nonvar</FUNCTION>
- <FUNCTION>number</FUNCTION>
- <FUNCTION>functor</FUNCTION>
- <FUNCTION>arg</FUNCTION>
- <FUNCTION>copy_term</FUNCTION>
- <FUNCTION>clause</FUNCTION>
- <FUNCTION>current_predicate</FUNCTION>
- <FUNCTION>asserta</FUNCTION>
- <FUNCTION>assertz</FUNCTION>
- <FUNCTION>retract</FUNCTION>
- <FUNCTION>abolish</FUNCTION>
- <FUNCTION>findall</FUNCTION>
- <FUNCTION>bagof</FUNCTION>
- <FUNCTION>setof</FUNCTION>
- <FUNCTION>current_input</FUNCTION>
- <FUNCTION>current_output</FUNCTION>
- <FUNCTION>set_input</FUNCTION>
- <FUNCTION>set_output</FUNCTION>
- <FUNCTION>open</FUNCTION>
- <FUNCTION>close</FUNCTION>
- <FUNCTION>stream_property</FUNCTION>
- <FUNCTION>at_end_of_stream</FUNCTION> <!-- arity 1 -->
- <FUNCTION>set_stream_position</FUNCTION>
- <FUNCTION>get_char</FUNCTION>
- <FUNCTION>get_code</FUNCTION>
- <FUNCTION>peek_char</FUNCTION>
- <FUNCTION>peek_code</FUNCTION>
- <FUNCTION>put_char</FUNCTION>
- <FUNCTION>put_code</FUNCTION>
- <FUNCTION>nl</FUNCTION> <!-- arity 1 -->
- <FUNCTION>get_byte</FUNCTION>
- <FUNCTION>peek_byte</FUNCTION>
- <FUNCTION>put_byte</FUNCTION>
- <FUNCTION>read_term</FUNCTION>
- <FUNCTION>read</FUNCTION>
- <FUNCTION>write_term</FUNCTION>
- <FUNCTION>write</FUNCTION>
- <FUNCTION>writeq</FUNCTION>
- <FUNCTION>write_canonical</FUNCTION>
- <FUNCTION>op</FUNCTION>
- <FUNCTION>current_op</FUNCTION>
- <FUNCTION>char_conversion</FUNCTION>
- <FUNCTION>current_char_conversion</FUNCTION>
- <FUNCTION>once</FUNCTION>
- <FUNCTION>atom_length</FUNCTION>
- <FUNCTION>atom_concat</FUNCTION>
- <FUNCTION>sub_atom</FUNCTION>
- <FUNCTION>atom_chars</FUNCTION>
- <FUNCTION>atom_codes</FUNCTION>
- <FUNCTION>char_code</FUNCTION>
- <FUNCTION>number_chars</FUNCTION>
- <FUNCTION>number_codes</FUNCTION>
- <FUNCTION>set_prolog_flag</FUNCTION>
- <FUNCTION>current_prolog_flag</FUNCTION>
- <FUNCTION>halt</FUNCTION> <!-- arity 1 -->
-
- <!-- Mathematical functions -->
- <FUNCTION>sin</FUNCTION>
- <FUNCTION>cos</FUNCTION>
- <FUNCTION>atan</FUNCTION>
- <FUNCTION>exp</FUNCTION>
- <FUNCTION>log</FUNCTION>
- <FUNCTION>sqrt</FUNCTION>
-
- <!-- Keywords that should be operators -->
- <KEYWORD2>is</KEYWORD2>
- <KEYWORD2>rem</KEYWORD2>
- <KEYWORD2>mod</KEYWORD2>
-
- <!-- Singleton variable -->
- <KEYWORD3>_</KEYWORD3>
-
- </KEYWORDS>
-
- </RULES>
-
- <RULES SET="LIST" DEFAULT="LITERAL2" ESCAPE="\">
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE" DELEGATE="LIST">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- jEdit Prolog syntax file
+ based on the INRIA ISO Prolog web page @ http://pauillac.inria.fr/~hodgson/prolog
+
+ written by Giulio Piancastelli
+ version 1.0
+ created on 31st December 2001
+ last revised 19th November 2002
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="%" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+ <!--- ISO compliant C-style comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- String literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- List literals -->
+ <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE" DELEGATE="LIST">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Operators -->
+ <SEQ TYPE="OPERATOR">--></SEQ>
+ <SEQ TYPE="OPERATOR">:-</SEQ>
+ <SEQ TYPE="OPERATOR">?-</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">-></SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">\+</SEQ> <!-- ISO Prolog uses it instead of 'not' -->
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">\==</SEQ>
+ <SEQ TYPE="OPERATOR">\=</SEQ>
+ <SEQ TYPE="OPERATOR">@<</SEQ>
+ <SEQ TYPE="OPERATOR">@=<</SEQ>
+ <SEQ TYPE="OPERATOR">@>=</SEQ>
+ <SEQ TYPE="OPERATOR">@></SEQ>
+ <SEQ TYPE="OPERATOR">=..</SEQ>
+ <SEQ TYPE="OPERATOR">=:=</SEQ>
+ <SEQ TYPE="OPERATOR">=\=</SEQ>
+ <SEQ TYPE="OPERATOR">=<</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/\</SEQ>
+ <SEQ TYPE="OPERATOR">\/</SEQ>
+ <SEQ TYPE="OPERATOR">//</SEQ>
+ <SEQ TYPE="OPERATOR"><<</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>></SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">**</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <!-- The '.' at the end of each clause -->
+ <SEQ TYPE="OPERATOR">.</SEQ>
+
+ <!-- Parentheses -->
+ <SEQ TYPE="MARKUP">(</SEQ>
+ <SEQ TYPE="MARKUP">)</SEQ>
+ <SEQ TYPE="NULL">{</SEQ>
+ <SEQ TYPE="NULL">}</SEQ>
+
+ <KEYWORDS>
+
+ <!-- Keywords that are 0 arity built-in predicates -->
+ <KEYWORD1>true</KEYWORD1>
+ <KEYWORD1>fail</KEYWORD1>
+ <KEYWORD1>!</KEYWORD1> <!-- cut -->
+ <KEYWORD1>at_end_of_stream</KEYWORD1>
+ <KEYWORD1>nl</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>halt</KEYWORD1>
+
+ <!-- Keywords that are built-in predicates with arity greater than or equal to 1 -->
+ <FUNCTION>call</FUNCTION>
+ <FUNCTION>catch</FUNCTION>
+ <FUNCTION>throw</FUNCTION>
+ <FUNCTION>unify_with_occurs_check</FUNCTION>
+ <FUNCTION>var</FUNCTION>
+ <FUNCTION>atom</FUNCTION>
+ <FUNCTION>integer</FUNCTION>
+ <FUNCTION>float</FUNCTION>
+ <FUNCTION>atomic</FUNCTION>
+ <FUNCTION>compound</FUNCTION>
+ <FUNCTION>nonvar</FUNCTION>
+ <FUNCTION>number</FUNCTION>
+ <FUNCTION>functor</FUNCTION>
+ <FUNCTION>arg</FUNCTION>
+ <FUNCTION>copy_term</FUNCTION>
+ <FUNCTION>clause</FUNCTION>
+ <FUNCTION>current_predicate</FUNCTION>
+ <FUNCTION>asserta</FUNCTION>
+ <FUNCTION>assertz</FUNCTION>
+ <FUNCTION>retract</FUNCTION>
+ <FUNCTION>abolish</FUNCTION>
+ <FUNCTION>findall</FUNCTION>
+ <FUNCTION>bagof</FUNCTION>
+ <FUNCTION>setof</FUNCTION>
+ <FUNCTION>current_input</FUNCTION>
+ <FUNCTION>current_output</FUNCTION>
+ <FUNCTION>set_input</FUNCTION>
+ <FUNCTION>set_output</FUNCTION>
+ <FUNCTION>open</FUNCTION>
+ <FUNCTION>close</FUNCTION>
+ <FUNCTION>stream_property</FUNCTION>
+ <FUNCTION>at_end_of_stream</FUNCTION> <!-- arity 1 -->
+ <FUNCTION>set_stream_position</FUNCTION>
+ <FUNCTION>get_char</FUNCTION>
+ <FUNCTION>get_code</FUNCTION>
+ <FUNCTION>peek_char</FUNCTION>
+ <FUNCTION>peek_code</FUNCTION>
+ <FUNCTION>put_char</FUNCTION>
+ <FUNCTION>put_code</FUNCTION>
+ <FUNCTION>nl</FUNCTION> <!-- arity 1 -->
+ <FUNCTION>get_byte</FUNCTION>
+ <FUNCTION>peek_byte</FUNCTION>
+ <FUNCTION>put_byte</FUNCTION>
+ <FUNCTION>read_term</FUNCTION>
+ <FUNCTION>read</FUNCTION>
+ <FUNCTION>write_term</FUNCTION>
+ <FUNCTION>write</FUNCTION>
+ <FUNCTION>writeq</FUNCTION>
+ <FUNCTION>write_canonical</FUNCTION>
+ <FUNCTION>op</FUNCTION>
+ <FUNCTION>current_op</FUNCTION>
+ <FUNCTION>char_conversion</FUNCTION>
+ <FUNCTION>current_char_conversion</FUNCTION>
+ <FUNCTION>once</FUNCTION>
+ <FUNCTION>atom_length</FUNCTION>
+ <FUNCTION>atom_concat</FUNCTION>
+ <FUNCTION>sub_atom</FUNCTION>
+ <FUNCTION>atom_chars</FUNCTION>
+ <FUNCTION>atom_codes</FUNCTION>
+ <FUNCTION>char_code</FUNCTION>
+ <FUNCTION>number_chars</FUNCTION>
+ <FUNCTION>number_codes</FUNCTION>
+ <FUNCTION>set_prolog_flag</FUNCTION>
+ <FUNCTION>current_prolog_flag</FUNCTION>
+ <FUNCTION>halt</FUNCTION> <!-- arity 1 -->
+
+ <!-- Mathematical functions -->
+ <FUNCTION>sin</FUNCTION>
+ <FUNCTION>cos</FUNCTION>
+ <FUNCTION>atan</FUNCTION>
+ <FUNCTION>exp</FUNCTION>
+ <FUNCTION>log</FUNCTION>
+ <FUNCTION>sqrt</FUNCTION>
+
+ <!-- Keywords that should be operators -->
+ <KEYWORD2>is</KEYWORD2>
+ <KEYWORD2>rem</KEYWORD2>
+ <KEYWORD2>mod</KEYWORD2>
+
+ <!-- Singleton variable -->
+ <KEYWORD3>_</KEYWORD3>
+
+ </KEYWORDS>
+
+ </RULES>
+
+ <RULES SET="LIST" DEFAULT="LITERAL2" ESCAPE="\">
+ <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE" DELEGATE="LIST">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/props.xml b/jEdit/modes/props.xml
index f3d0511..a905b6b 100644
--- a/jEdit/modes/props.xml
+++ b/jEdit/modes/props.xml
@@ -1,27 +1,27 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
- <RULES DEFAULT="KEYWORD1">
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">#</EOL_SPAN>
- <EOL_SPAN TYPE="NULL" DELEGATE="PROP_VALUE">=</EOL_SPAN>
- <EOL_SPAN TYPE="NULL" DELEGATE="PROP_VALUE">:</EOL_SPAN>
- <EOL_SPAN TYPE="NULL" DELEGATE="PROP_VALUE"> </EOL_SPAN>
- <EOL_SPAN TYPE="NULL" DELEGATE="PROP_VALUE"> </EOL_SPAN>
- </RULES>
- <RULES SET="PROP_VALUE" HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="([\p{Digit}]+|#[\p{XDigit}]+)"
- NO_WORD_SEP="#">
- <!-- MessageFormat { ... } stuff -->
- <SPAN TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
- <!-- Sillyness -->
- <MARK_FOLLOWING TYPE="DIGIT">#</MARK_FOLLOWING>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+ <RULES DEFAULT="KEYWORD1">
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">#</EOL_SPAN>
+ <EOL_SPAN TYPE="NULL" DELEGATE="PROP_VALUE">=</EOL_SPAN>
+ <EOL_SPAN TYPE="NULL" DELEGATE="PROP_VALUE">:</EOL_SPAN>
+ <EOL_SPAN TYPE="NULL" DELEGATE="PROP_VALUE"> </EOL_SPAN>
+ <EOL_SPAN TYPE="NULL" DELEGATE="PROP_VALUE"> </EOL_SPAN>
+ </RULES>
+ <RULES SET="PROP_VALUE" HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="([\p{Digit}]+|#[\p{XDigit}]+)"
+ NO_WORD_SEP="#">
+ <!-- MessageFormat { ... } stuff -->
+ <SPAN TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <!-- Sillyness -->
+ <MARK_FOLLOWING TYPE="DIGIT">#</MARK_FOLLOWING>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/psp.xml b/jEdit/modes/psp.xml
index 1896e91..56445e0 100644
--- a/jEdit/modes/psp.xml
+++ b/jEdit/modes/psp.xml
@@ -1,126 +1,126 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <PROPERTY NAME="indentNextLines" VALUE="\s*[^#]{3,}:\s*(#.*)?" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE">
-
- <SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">
- <BEGIN><%@</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- PSP comment -->
- <SPAN TYPE="COMMENT2">
- <BEGIN><%--</BEGIN>
- <END>--%></END>
- </SPAN>
-
- <!-- inline Python code -->
- <SPAN TYPE="LITERAL3" DELEGATE="python::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- Client-side javascript -->
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="jscript"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script language="javascript"></BEGIN>
- <END></script></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
- <BEGIN><script></BEGIN>
- <END></script></END>
- </SPAN>
-
- <!-- Server-Side include -->
- <SPAN TYPE="MARKUP">
- <BEGIN><!--#</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="css::MAIN">
- <BEGIN><STYLE></BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
-
- </RULES>
-
- <!-- ESCAPE is not exactly right but it is needed to correctly
- handle JavaScript in on* parameters -->
- <RULES SET="TAGS" DEFAULT="MARKUP">
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <!-- PSP comment -->
- <SPAN TYPE="COMMENT2">
- <BEGIN><%--</BEGIN>
- <END>--%></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL3" DELEGATE="python::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
-
- <RULES SET="DIRECTIVE" DEFAULT="LITERAL4">
-
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <KEYWORDS>
- <KEYWORD4>include</KEYWORD4>
-
- <KEYWORD4>file</KEYWORD4>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <PROPERTY NAME="indentNextLines" VALUE="\s*[^#]{3,}:\s*(#.*)?" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE">
+
+ <SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">
+ <BEGIN><%@</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- PSP comment -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN><%--</BEGIN>
+ <END>--%></END>
+ </SPAN>
+
+ <!-- inline Python code -->
+ <SPAN TYPE="LITERAL3" DELEGATE="python::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- Client-side javascript -->
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="jscript"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script language="javascript"></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><script></BEGIN>
+ <END></script></END>
+ </SPAN>
+
+ <!-- Server-Side include -->
+ <SPAN TYPE="MARKUP">
+ <BEGIN><!--#</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="css::MAIN">
+ <BEGIN><STYLE></BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ </RULES>
+
+ <!-- ESCAPE is not exactly right but it is needed to correctly
+ handle JavaScript in on* parameters -->
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <!-- PSP comment -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN><%--</BEGIN>
+ <END>--%></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL3" DELEGATE="python::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="DIRECTIVE" DEFAULT="LITERAL4">
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD4>include</KEYWORD4>
+
+ <KEYWORD4>file</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/ptl.xml b/jEdit/modes/ptl.xml
index d7e2d50..9e7052c 100644
--- a/jEdit/modes/ptl.xml
+++ b/jEdit/modes/ptl.xml
@@ -1,32 +1,32 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-<MODE NAME="ptl" FILE="ptl.xml"
- FILE_NAME_GLOB="*.ptl"/>
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentNextLines" VALUE="\s*[^#]{3,}:\s*(#.*)?" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
-
- <IMPORT DELEGATE="python::MAIN"/>
-
- <SEQ TYPE="KEYWORD4">[html]</SEQ>
- <SEQ TYPE="KEYWORD4">[plain]</SEQ>
-
- <KEYWORDS>
- <LITERAL4>_q_access</LITERAL4>
- <LITERAL4>_q_exports</LITERAL4>
- <LITERAL4>_q_index</LITERAL4>
- <LITERAL4>_q_lookup</LITERAL4>
- <LITERAL4>_q_resolve</LITERAL4>
- <LITERAL4>_q_exception_handler</LITERAL4>
- </KEYWORDS>
-
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+<MODE NAME="ptl" FILE="ptl.xml"
+ FILE_NAME_GLOB="*.ptl"/>
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentNextLines" VALUE="\s*[^#]{3,}:\s*(#.*)?" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+
+ <IMPORT DELEGATE="python::MAIN"/>
+
+ <SEQ TYPE="KEYWORD4">[html]</SEQ>
+ <SEQ TYPE="KEYWORD4">[plain]</SEQ>
+
+ <KEYWORDS>
+ <LITERAL4>_q_access</LITERAL4>
+ <LITERAL4>_q_exports</LITERAL4>
+ <LITERAL4>_q_index</LITERAL4>
+ <LITERAL4>_q_lookup</LITERAL4>
+ <LITERAL4>_q_resolve</LITERAL4>
+ <LITERAL4>_q_exception_handler</LITERAL4>
+ </KEYWORDS>
+
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/pure.xml b/jEdit/modes/pure.xml
index 7c95d42..e056c3c 100644
--- a/jEdit/modes/pure.xml
+++ b/jEdit/modes/pure.xml
@@ -1,107 +1,108 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="lineComment" VALUE="#!" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">#!</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">..</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">`</SEQ>
- <SEQ TYPE="OPERATOR">'</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
-
- <KEYWORDS>
- <OPERATOR>or</OPERATOR>
- <OPERATOR>and</OPERATOR>
- <OPERATOR>div</OPERATOR>
- <OPERATOR>mod</OPERATOR>
- <OPERATOR>not</OPERATOR>
-
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>def</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>extern</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>infix</KEYWORD1>
- <KEYWORD1>infixl</KEYWORD1>
- <KEYWORD1>infixr</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>namespace</KEYWORD1>
- <KEYWORD1>nullary</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>otherwise</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>prefix</KEYWORD1>
- <KEYWORD1>postfix</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>using</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
-
- <KEYWORD2>bigint</KEYWORD2>
- <KEYWORD2>bool</KEYWORD2>
- <KEYWORD2>char</KEYWORD2>
- <KEYWORD2>double </KEYWORD2>
- <KEYWORD2>expr</KEYWORD2>
- <KEYWORD2>short</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>long</KEYWORD2>
- <KEYWORD2>string</KEYWORD2>
- <KEYWORD2>pointer</KEYWORD2>
- <KEYWORD2>void</KEYWORD2>
- <KEYWORD2>matrix</KEYWORD2>
- <KEYWORD2>dmatrix</KEYWORD2>
- <KEYWORD2>cmatrix</KEYWORD2>
- <KEYWORD2>imatrix</KEYWORD2>
-
- <KEYWORD3>case</KEYWORD3>
- <KEYWORD3>when</KEYWORD3>
- <KEYWORD3>with</KEYWORD3>
- <KEYWORD3>end</KEYWORD3>
-
- <LITERAL2>true</LITERAL2>
- <LITERAL2>false</LITERAL2>
- </KEYWORDS>
- </RULES>
-
-</MODE>
-
-
-
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*"/>
+ <PROPERTY NAME="commentEnd" VALUE="*/"/>
+ <PROPERTY NAME="lineComment" VALUE="//"/>
+ <PROPERTY NAME="lineComment" VALUE="#!"/>
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+
+ <EOL_SPAN TYPE="COMMENT3">#!</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">`</SEQ>
+ <SEQ TYPE="OPERATOR">'</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">$</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <KEYWORDS>
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>div</OPERATOR>
+ <OPERATOR>mod</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>of</KEYWORD1>
+ <KEYWORD1>when</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>otherwise</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>quote</KEYWORD1>
+
+ <KEYWORD2>bigint</KEYWORD2>
+ <KEYWORD2>bool</KEYWORD2>
+ <KEYWORD2>char</KEYWORD2>
+ <KEYWORD2>double</KEYWORD2>
+ <KEYWORD2>expr</KEYWORD2>
+ <KEYWORD2>short</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>long</KEYWORD2>
+ <KEYWORD2>string</KEYWORD2>
+ <KEYWORD2>pointer</KEYWORD2>
+ <KEYWORD2>matrix</KEYWORD2>
+ <KEYWORD2>dmatrix</KEYWORD2>
+ <KEYWORD2>cmatrix</KEYWORD2>
+ <KEYWORD2>imatrix</KEYWORD2>
+
+ <KEYWORD3>const</KEYWORD3>
+ <KEYWORD3>def</KEYWORD3>
+ <KEYWORD3>extern</KEYWORD3>
+ <KEYWORD3>infix</KEYWORD3>
+ <KEYWORD3>infixl</KEYWORD3>
+ <KEYWORD3>infixr</KEYWORD3>
+ <KEYWORD3>let</KEYWORD3>
+ <KEYWORD3>namespace</KEYWORD3>
+ <KEYWORD3>nonfix</KEYWORD3>
+ <KEYWORD3>outfix</KEYWORD3>
+ <KEYWORD3>private</KEYWORD3>
+ <KEYWORD3>public</KEYWORD3>
+ <KEYWORD3>prefix</KEYWORD3>
+ <KEYWORD3>postfix</KEYWORD3>
+ <KEYWORD3>using</KEYWORD3>
+
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
+
+
diff --git a/jEdit/modes/pvwave.xml b/jEdit/modes/pvwave.xml
index 8a74b4a..9f973e7 100644
--- a/jEdit/modes/pvwave.xml
+++ b/jEdit/modes/pvwave.xml
@@ -1,722 +1,722 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- PV-WAVE mode, by Ed Stewart
- based on Java mode by Mike Dillon and IDLTokenMarker by Juha Lindfors -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- </PROPS>
- <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="LABEL">$</SEQ>
- <SEQ TYPE="LABEL">&</SEQ>
- <SEQ TYPE="LABEL">@</SEQ>
- <SEQ TYPE="LABEL">!</SEQ>
-
- <KEYWORDS>
- <!--KEYWORD1s are standard functions and procedures -->
- <KEYWORD1>abs</KEYWORD1>
- <KEYWORD1>acos</KEYWORD1>
- <KEYWORD1>add_exec_on_select</KEYWORD1>
- <KEYWORD1>addsysvar</KEYWORD1>
- <KEYWORD1>addvar</KEYWORD1>
- <KEYWORD1>affine</KEYWORD1>
- <KEYWORD1>alog</KEYWORD1>
- <KEYWORD1>alog10</KEYWORD1>
- <KEYWORD1>asarr</KEYWORD1>
- <KEYWORD1>asin</KEYWORD1>
- <KEYWORD1>askeys</KEYWORD1>
- <KEYWORD1>assoc</KEYWORD1>
- <KEYWORD1>atan</KEYWORD1>
- <KEYWORD1>avg</KEYWORD1>
- <KEYWORD1>axis</KEYWORD1>
- <KEYWORD1>bar</KEYWORD1>
- <KEYWORD1>bar2d</KEYWORD1>
- <KEYWORD1>bar3d</KEYWORD1>
- <KEYWORD1>beseli</KEYWORD1>
- <KEYWORD1>beselj</KEYWORD1>
- <KEYWORD1>besely</KEYWORD1>
- <KEYWORD1>bilinear</KEYWORD1>
- <KEYWORD1>bindgen</KEYWORD1>
- <KEYWORD1>blob</KEYWORD1>
- <KEYWORD1>blobcount</KEYWORD1>
- <KEYWORD1>boundary</KEYWORD1>
- <KEYWORD1>build_table</KEYWORD1>
- <KEYWORD1>buildresourcefilename</KEYWORD1>
- <KEYWORD1>bytarr</KEYWORD1>
- <KEYWORD1>byte</KEYWORD1>
- <KEYWORD1>byteorder</KEYWORD1>
- <KEYWORD1>bytscl</KEYWORD1>
- <KEYWORD1>c_edit</KEYWORD1>
- <KEYWORD1>call_unix</KEYWORD1>
- <KEYWORD1>cd</KEYWORD1>
- <KEYWORD1>center_view</KEYWORD1>
- <KEYWORD1>chebyshev</KEYWORD1>
- <KEYWORD1>check_math</KEYWORD1>
- <KEYWORD1>checkfile</KEYWORD1>
- <KEYWORD1>cindgen</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>color_convert</KEYWORD1>
- <KEYWORD1>color_edit</KEYWORD1>
- <KEYWORD1>color_palette</KEYWORD1>
- <KEYWORD1>complex</KEYWORD1>
- <KEYWORD1>complexarr</KEYWORD1>
- <KEYWORD1>cone</KEYWORD1>
- <KEYWORD1>congrid</KEYWORD1>
- <KEYWORD1>conj</KEYWORD1>
- <KEYWORD1>contour</KEYWORD1>
- <KEYWORD1>contour2</KEYWORD1>
- <KEYWORD1>contourfill</KEYWORD1>
- <KEYWORD1>conv_from_rect</KEYWORD1>
- <KEYWORD1>conv_to_rect</KEYWORD1>
- <KEYWORD1>convert_coord</KEYWORD1>
- <KEYWORD1>convol</KEYWORD1>
- <KEYWORD1>correlate</KEYWORD1>
- <KEYWORD1>cos</KEYWORD1>
- <KEYWORD1>cosh</KEYWORD1>
- <KEYWORD1>cosines</KEYWORD1>
- <KEYWORD1>cprod</KEYWORD1>
- <KEYWORD1>create_holidays</KEYWORD1>
- <KEYWORD1>create_weekdends</KEYWORD1>
- <KEYWORD1>crossp</KEYWORD1>
- <KEYWORD1>cursor</KEYWORD1>
- <KEYWORD1>curvatures</KEYWORD1>
- <KEYWORD1>curvefit</KEYWORD1>
- <KEYWORD1>cylinder</KEYWORD1>
- <KEYWORD1>day_name</KEYWORD1>
- <KEYWORD1>day_of_week</KEYWORD1>
- <KEYWORD1>day_of_year</KEYWORD1>
- <KEYWORD1>dblarr</KEYWORD1>
- <KEYWORD1>dc_error_msg</KEYWORD1>
- <KEYWORD1>dc_options</KEYWORD1>
- <KEYWORD1>dc_read_24_bit</KEYWORD1>
- <KEYWORD1>dc_read_8_bit</KEYWORD1>
- <KEYWORD1>dc_read_container</KEYWORD1>
- <KEYWORD1>dc_read_dib</KEYWORD1>
- <KEYWORD1>dc_read_fixed</KEYWORD1>
- <KEYWORD1>dc_read_free</KEYWORD1>
- <KEYWORD1>dc_read_tiff</KEYWORD1>
- <KEYWORD1>dc_scan_container</KEYWORD1>
- <KEYWORD1>dc_write_24_bit</KEYWORD1>
- <KEYWORD1>dc_write_8_bit</KEYWORD1>
- <KEYWORD1>dc_write_dib</KEYWORD1>
- <KEYWORD1>dc_write_fixed</KEYWORD1>
- <KEYWORD1>dc_write_free</KEYWORD1>
- <KEYWORD1>dc_write_tiff</KEYWORD1>
- <KEYWORD1>dcindgen</KEYWORD1>
- <KEYWORD1>dcomplex</KEYWORD1>
- <KEYWORD1>dcomplexarr</KEYWORD1>
- <KEYWORD1>declare func</KEYWORD1>
- <KEYWORD1>declare function</KEYWORD1>
- <KEYWORD1>define_key</KEYWORD1>
- <KEYWORD1>defroi</KEYWORD1>
- <KEYWORD1>defsysv</KEYWORD1>
- <KEYWORD1>del_file</KEYWORD1>
- <KEYWORD1>delfunc</KEYWORD1>
- <KEYWORD1>dellog</KEYWORD1>
- <KEYWORD1>delproc</KEYWORD1>
- <KEYWORD1>delstruct</KEYWORD1>
- <KEYWORD1>delvar</KEYWORD1>
- <KEYWORD1>demo</KEYWORD1>
- <KEYWORD1>deriv</KEYWORD1>
- <KEYWORD1>derivn</KEYWORD1>
- <KEYWORD1>determ</KEYWORD1>
- <KEYWORD1>device</KEYWORD1>
- <KEYWORD1>diag</KEYWORD1>
- <KEYWORD1>dicm_tag_info</KEYWORD1>
- <KEYWORD1>digital_filter</KEYWORD1>
- <KEYWORD1>dilate</KEYWORD1>
- <KEYWORD1>dindgen</KEYWORD1>
- <KEYWORD1>dist</KEYWORD1>
- <KEYWORD1>dminit</KEYWORD1>
- <KEYWORD1>doc_lib_unix</KEYWORD1>
- <KEYWORD1>doc_library</KEYWORD1>
- <KEYWORD1>double</KEYWORD1>
- <KEYWORD1>drop_exec_on_select</KEYWORD1>
- <KEYWORD1>dt_add</KEYWORD1>
- <KEYWORD1>dt_addly</KEYWORD1>
- <KEYWORD1>dt_compress</KEYWORD1>
- <KEYWORD1>dt_duration</KEYWORD1>
- <KEYWORD1>dt_print</KEYWORD1>
- <KEYWORD1>dt_subly</KEYWORD1>
- <KEYWORD1>dt_subtract</KEYWORD1>
- <KEYWORD1>dt_to_sec</KEYWORD1>
- <KEYWORD1>dt_to_str</KEYWORD1>
- <KEYWORD1>dt_to_var</KEYWORD1>
- <KEYWORD1>dtegn</KEYWORD1>
- <KEYWORD1>empty</KEYWORD1>
- <KEYWORD1>environment</KEYWORD1>
- <KEYWORD1>eof</KEYWORD1>
- <KEYWORD1>erase</KEYWORD1>
- <KEYWORD1>erode</KEYWORD1>
- <KEYWORD1>errorf</KEYWORD1>
- <KEYWORD1>errplot</KEYWORD1>
- <KEYWORD1>euclidean</KEYWORD1>
- <KEYWORD1>exec_on_select</KEYWORD1>
- <KEYWORD1>execute</KEYWORD1>
- <KEYWORD1>exp</KEYWORD1>
- <KEYWORD1>expand</KEYWORD1>
- <KEYWORD1>expon</KEYWORD1>
- <KEYWORD1>extrema</KEYWORD1>
- <KEYWORD1>factor</KEYWORD1>
- <KEYWORD1>fast_grid2</KEYWORD1>
- <KEYWORD1>fast_grid3</KEYWORD1>
- <KEYWORD1>fast_grid4</KEYWORD1>
- <KEYWORD1>fft</KEYWORD1>
- <KEYWORD1>filepath</KEYWORD1>
- <KEYWORD1>findfile</KEYWORD1>
- <KEYWORD1>findgen</KEYWORD1>
- <KEYWORD1>finite</KEYWORD1>
- <KEYWORD1>fix</KEYWORD1>
- <KEYWORD1>float</KEYWORD1>
- <KEYWORD1>fltarr</KEYWORD1>
- <KEYWORD1>flush</KEYWORD1>
- <KEYWORD1>free_lun</KEYWORD1>
- <KEYWORD1>fstat</KEYWORD1>
- <KEYWORD1>funct</KEYWORD1>
- <KEYWORD1>gamma</KEYWORD1>
- <KEYWORD1>gaussfit</KEYWORD1>
- <KEYWORD1>gaussint</KEYWORD1>
- <KEYWORD1>gcd</KEYWORD1>
- <KEYWORD1>get_kbrd</KEYWORD1>
- <KEYWORD1>get_lun</KEYWORD1>
- <KEYWORD1>getenv</KEYWORD1>
- <KEYWORD1>get_named_color</KEYWORD1>
- <KEYWORD1>getncerr</KEYWORD1>
- <KEYWORD1>getncopts</KEYWORD1>
- <KEYWORD1>getparam</KEYWORD1>
- <KEYWORD1>great_int</KEYWORD1>
- <KEYWORD1>grid</KEYWORD1>
- <KEYWORD1>grid_2d</KEYWORD1>
- <KEYWORD1>grid_3d</KEYWORD1>
- <KEYWORD1>grid_4d</KEYWORD1>
- <KEYWORD1>grid_sphere</KEYWORD1>
- <KEYWORD1>gridn</KEYWORD1>
- <KEYWORD1>group_by</KEYWORD1>
- <KEYWORD1>hak</KEYWORD1>
- <KEYWORD1>hanning</KEYWORD1>
- <KEYWORD1>hdf_test</KEYWORD1>
- <KEYWORD1>hdfgetsds</KEYWORD1>
- <KEYWORD1>help</KEYWORD1>
- <KEYWORD1>hilbert</KEYWORD1>
- <KEYWORD1>hist_equal</KEYWORD1>
- <KEYWORD1>hist_equal_ct</KEYWORD1>
- <KEYWORD1>histn</KEYWORD1>
- <KEYWORD1>histogram</KEYWORD1>
- <KEYWORD1>hls</KEYWORD1>
- <KEYWORD1>hsv</KEYWORD1>
- <KEYWORD1>hsv_to_rgd</KEYWORD1>
- <KEYWORD1>image_check</KEYWORD1>
- <KEYWORD1>image_color_quant</KEYWORD1>
- <KEYWORD1>image_cont</KEYWORD1>
- <KEYWORD1>image_create</KEYWORD1>
- <KEYWORD1>image_display</KEYWORD1>
- <KEYWORD1>image_filetypes</KEYWORD1>
- <KEYWORD1>image_query_file</KEYWORD1>
- <KEYWORD1>image_read</KEYWORD1>
- <KEYWORD1>image_write</KEYWORD1>
- <KEYWORD1>imaginary</KEYWORD1>
- <KEYWORD1>img_true8</KEYWORD1>
- <KEYWORD1>index_and</KEYWORD1>
- <KEYWORD1>index_conv</KEYWORD1>
- <KEYWORD1>index_or</KEYWORD1>
- <KEYWORD1>indgen</KEYWORD1>
- <KEYWORD1>intarr</KEYWORD1>
- <KEYWORD1>interpol</KEYWORD1>
- <KEYWORD1>interpolate</KEYWORD1>
- <KEYWORD1>intrp</KEYWORD1>
- <KEYWORD1>invert</KEYWORD1>
- <KEYWORD1>isaskey</KEYWORD1>
- <KEYWORD1>ishft</KEYWORD1>
- <KEYWORD1>jacobian</KEYWORD1>
- <KEYWORD1>jul_to_dt</KEYWORD1>
- <KEYWORD1>keyword_set</KEYWORD1>
- <KEYWORD1>lcm</KEYWORD1>
- <KEYWORD1>leefilt</KEYWORD1>
- <KEYWORD1>legend</KEYWORD1>
- <KEYWORD1>lindgen</KEYWORD1>
- <KEYWORD1>linknload</KEYWORD1>
- <KEYWORD1>list</KEYWORD1>
- <KEYWORD1>listarr</KEYWORD1>
- <KEYWORD1>load_holidays</KEYWORD1>
- <KEYWORD1>load_option</KEYWORD1>
- <KEYWORD1>load_weekends</KEYWORD1>
- <KEYWORD1>loadct</KEYWORD1>
- <KEYWORD1>loadct_custom</KEYWORD1>
- <KEYWORD1>loadresources</KEYWORD1>
- <KEYWORD1>loadstrings</KEYWORD1>
- <KEYWORD1>lonarr</KEYWORD1>
- <KEYWORD1>long</KEYWORD1>
- <KEYWORD1>lubksb</KEYWORD1>
- <KEYWORD1>ludcmp</KEYWORD1>
- <KEYWORD1>make_array</KEYWORD1>
- <KEYWORD1>map</KEYWORD1>
- <KEYWORD1>map_axes</KEYWORD1>
- <KEYWORD1>map_contour</KEYWORD1>
- <KEYWORD1>map_grid</KEYWORD1>
- <KEYWORD1>map_plots</KEYWORD1>
- <KEYWORD1>map_polyfill</KEYWORD1>
- <KEYWORD1>map_proj</KEYWORD1>
- <KEYWORD1>map_reverse</KEYWORD1>
- <KEYWORD1>map_velovect</KEYWORD1>
- <KEYWORD1>map_version</KEYWORD1>
- <KEYWORD1>map_xyouts</KEYWORD1>
- <KEYWORD1>max</KEYWORD1>
- <KEYWORD1>median</KEYWORD1>
- <KEYWORD1>mesh</KEYWORD1>
- <KEYWORD1>message</KEYWORD1>
- <KEYWORD1>min</KEYWORD1>
- <KEYWORD1>modifyct</KEYWORD1>
- <KEYWORD1>molec</KEYWORD1>
- <KEYWORD1>moment</KEYWORD1>
- <KEYWORD1>month_name</KEYWORD1>
- <KEYWORD1>movie</KEYWORD1>
- <KEYWORD1>mprove</KEYWORD1>
- <KEYWORD1>msword_cgm_setup</KEYWORD1>
- <KEYWORD1>n_elements</KEYWORD1>
- <KEYWORD1>n_params</KEYWORD1>
- <KEYWORD1>n_tags</KEYWORD1>
- <KEYWORD1>nint</KEYWORD1>
- <KEYWORD1>normals</KEYWORD1>
- <KEYWORD1>null_processor</KEYWORD1>
- <KEYWORD1>openr</KEYWORD1>
- <KEYWORD1>openu</KEYWORD1>
- <KEYWORD1>openw</KEYWORD1>
- <KEYWORD1>oplot</KEYWORD1>
- <KEYWORD1>oploterr</KEYWORD1>
- <KEYWORD1>option_is_loaded</KEYWORD1>
- <KEYWORD1>order_by</KEYWORD1>
- <KEYWORD1>padit</KEYWORD1>
- <KEYWORD1>packimage</KEYWORD1>
- <KEYWORD1>packtable</KEYWORD1>
- <KEYWORD1>palette</KEYWORD1>
- <KEYWORD1>param_present</KEYWORD1>
- <KEYWORD1>parsefilename</KEYWORD1>
- <KEYWORD1>pie</KEYWORD1>
- <KEYWORD1>pie_chart</KEYWORD1>
- <KEYWORD1>plot</KEYWORD1>
- <KEYWORD1>plot_field</KEYWORD1>
- <KEYWORD1>plot_histogram</KEYWORD1>
- <KEYWORD1>plot_io</KEYWORD1>
- <KEYWORD1>plot_oi</KEYWORD1>
- <KEYWORD1>plot_oo</KEYWORD1>
- <KEYWORD1>plot_windrose</KEYWORD1>
- <KEYWORD1>ploterr</KEYWORD1>
- <KEYWORD1>plots</KEYWORD1>
- <KEYWORD1>pm</KEYWORD1>
- <KEYWORD1>pmf</KEYWORD1>
- <KEYWORD1>point_lun</KEYWORD1>
- <KEYWORD1>poly</KEYWORD1>
- <KEYWORD1>poly_2d</KEYWORD1>
- <KEYWORD1>poly_area</KEYWORD1>
- <KEYWORD1>poly_c_conv</KEYWORD1>
- <KEYWORD1>poly_count</KEYWORD1>
- <KEYWORD1>poly_dev</KEYWORD1>
- <KEYWORD1>poly_fit</KEYWORD1>
- <KEYWORD1>poly_merge</KEYWORD1>
- <KEYWORD1>poly_norm</KEYWORD1>
- <KEYWORD1>poly_plot</KEYWORD1>
- <KEYWORD1>poly_sphere</KEYWORD1>
- <KEYWORD1>poly_surf</KEYWORD1>
- <KEYWORD1>poly_trans</KEYWORD1>
- <KEYWORD1>polyfill</KEYWORD1>
- <KEYWORD1>polyfillv</KEYWORD1>
- <KEYWORD1>polyfitw</KEYWORD1>
- <KEYWORD1>polyshade</KEYWORD1>
- <KEYWORD1>polywarp</KEYWORD1>
- <KEYWORD1>popd</KEYWORD1>
- <KEYWORD1>prime</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>printd</KEYWORD1>
- <KEYWORD1>printf</KEYWORD1>
- <KEYWORD1>profile</KEYWORD1>
- <KEYWORD1>profiles</KEYWORD1>
- <KEYWORD1>prompt</KEYWORD1>
- <KEYWORD1>pseudo</KEYWORD1>
- <KEYWORD1>pushd</KEYWORD1>
- <KEYWORD1>query_table</KEYWORD1>
- <KEYWORD1>randomn</KEYWORD1>
- <KEYWORD1>randomu</KEYWORD1>
- <KEYWORD1>rdpix</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>read_airs</KEYWORD1>
- <KEYWORD1>read_xbm</KEYWORD1>
- <KEYWORD1>readf</KEYWORD1>
- <KEYWORD1>readu</KEYWORD1>
- <KEYWORD1>rebin</KEYWORD1>
- <KEYWORD1>reform</KEYWORD1>
- <KEYWORD1>regress</KEYWORD1>
- <KEYWORD1>rename</KEYWORD1>
- <KEYWORD1>render</KEYWORD1>
- <KEYWORD1>render24</KEYWORD1>
- <KEYWORD1>replicate</KEYWORD1>
- <KEYWORD1>replv</KEYWORD1>
- <KEYWORD1>resamp</KEYWORD1>
- <KEYWORD1>reverse</KEYWORD1>
- <KEYWORD1>rgb_to_hsv</KEYWORD1>
- <KEYWORD1>rm</KEYWORD1>
- <KEYWORD1>rmf</KEYWORD1>
- <KEYWORD1>roberts</KEYWORD1>
- <KEYWORD1>rot</KEYWORD1>
- <KEYWORD1>rot_int</KEYWORD1>
- <KEYWORD1>rotate</KEYWORD1>
- <KEYWORD1>same</KEYWORD1>
- <KEYWORD1>scale3d</KEYWORD1>
- <KEYWORD1>sec_to_dt</KEYWORD1>
- <KEYWORD1>select_read_lun</KEYWORD1>
- <KEYWORD1>set_plot</KEYWORD1>
- <KEYWORD1>set_screen</KEYWORD1>
- <KEYWORD1>set_shading</KEYWORD1>
- <KEYWORD1>set_symbol</KEYWORD1>
- <KEYWORD1>set_view3d</KEYWORD1>
- <KEYWORD1>set_viewport</KEYWORD1>
- <KEYWORD1>set_xy</KEYWORD1>
- <KEYWORD1>setdemo</KEYWORD1>
- <KEYWORD1>setenv</KEYWORD1>
- <KEYWORD1>setimagesize</KEYWORD1>
- <KEYWORD1>setlog</KEYWORD1>
- <KEYWORD1>setncopts</KEYWORD1>
- <KEYWORD1>setup_keys</KEYWORD1>
- <KEYWORD1>sgn</KEYWORD1>
- <KEYWORD1>shade_surf</KEYWORD1>
- <KEYWORD1>shade_surf_irr</KEYWORD1>
- <KEYWORD1>shade_volume</KEYWORD1>
- <KEYWORD1>shif</KEYWORD1>
- <KEYWORD1>shift</KEYWORD1>
- <KEYWORD1>show_options</KEYWORD1>
- <KEYWORD1>show3</KEYWORD1>
- <KEYWORD1>sigma</KEYWORD1>
- <KEYWORD1>sin</KEYWORD1>
- <KEYWORD1>sindgen</KEYWORD1>
- <KEYWORD1>sinh</KEYWORD1>
- <KEYWORD1>size</KEYWORD1>
- <KEYWORD1>skipf</KEYWORD1>
- <KEYWORD1>slice</KEYWORD1>
- <KEYWORD1>slice_vol</KEYWORD1>
- <KEYWORD1>small_int</KEYWORD1>
- <KEYWORD1>smooth</KEYWORD1>
- <KEYWORD1>sobel</KEYWORD1>
- <KEYWORD1>socket_accept</KEYWORD1>
- <KEYWORD1>socket_close</KEYWORD1>
- <KEYWORD1>socket_connect</KEYWORD1>
- <KEYWORD1>socket_getport</KEYWORD1>
- <KEYWORD1>socket_init</KEYWORD1>
- <KEYWORD1>socket_read</KEYWORD1>
- <KEYWORD1>socket_write</KEYWORD1>
- <KEYWORD1>sort</KEYWORD1>
- <KEYWORD1>sortn</KEYWORD1>
- <KEYWORD1>spawn</KEYWORD1>
- <KEYWORD1>sphere</KEYWORD1>
- <KEYWORD1>spline</KEYWORD1>
- <KEYWORD1>sqrt</KEYWORD1>
- <KEYWORD1>stdev</KEYWORD1>
- <KEYWORD1>str_to_dt</KEYWORD1>
- <KEYWORD1>strarr</KEYWORD1>
- <KEYWORD1>strcompress</KEYWORD1>
- <KEYWORD1>stretch</KEYWORD1>
- <KEYWORD1>string</KEYWORD1>
- <KEYWORD1>strjoin</KEYWORD1>
- <KEYWORD1>strlen</KEYWORD1>
- <KEYWORD1>strlookup</KEYWORD1>
- <KEYWORD1>strlowcase</KEYWORD1>
- <KEYWORD1>strmatch</KEYWORD1>
- <KEYWORD1>strmessage</KEYWORD1>
- <KEYWORD1>strmid</KEYWORD1>
- <KEYWORD1>strpos</KEYWORD1>
- <KEYWORD1>strput</KEYWORD1>
- <KEYWORD1>strsplit</KEYWORD1>
- <KEYWORD1>strsubst</KEYWORD1>
- <KEYWORD1>strtrim</KEYWORD1>
- <KEYWORD1>structref</KEYWORD1>
- <KEYWORD1>strupcase</KEYWORD1>
- <KEYWORD1>sum</KEYWORD1>
- <KEYWORD1>surface</KEYWORD1>
- <KEYWORD1>surface_fit</KEYWORD1>
- <KEYWORD1>surfr</KEYWORD1>
- <KEYWORD1>svbksb</KEYWORD1>
- <KEYWORD1>svd</KEYWORD1>
- <KEYWORD1>svdfit</KEYWORD1>
- <KEYWORD1>systime</KEYWORD1>
- <KEYWORD1>t3d</KEYWORD1>
- <KEYWORD1>tag_names</KEYWORD1>
- <KEYWORD1>tan</KEYWORD1>
- <KEYWORD1>tanh</KEYWORD1>
- <KEYWORD1>tek_color</KEYWORD1>
- <KEYWORD1>tensor_add</KEYWORD1>
- <KEYWORD1>tensor_div</KEYWORD1>
- <KEYWORD1>tensor_eq</KEYWORD1>
- <KEYWORD1>tensor_exp</KEYWORD1>
- <KEYWORD1>tensor_ge</KEYWORD1>
- <KEYWORD1>tensor_gt</KEYWORD1>
- <KEYWORD1>tensor_le</KEYWORD1>
- <KEYWORD1>tensor_lt</KEYWORD1>
- <KEYWORD1>tensor_max</KEYWORD1>
- <KEYWORD1>tensor_min</KEYWORD1>
- <KEYWORD1>tensor_mod</KEYWORD1>
- <KEYWORD1>tensor_mul</KEYWORD1>
- <KEYWORD1>tensor_ne</KEYWORD1>
- <KEYWORD1>tensor_sub</KEYWORD1>
- <KEYWORD1>threed</KEYWORD1>
- <KEYWORD1>today</KEYWORD1>
- <KEYWORD1>total</KEYWORD1>
- <KEYWORD1>tqli</KEYWORD1>
- <KEYWORD1>transpose</KEYWORD1>
- <KEYWORD1>tred2</KEYWORD1>
- <KEYWORD1>tridag</KEYWORD1>
- <KEYWORD1>tv</KEYWORD1>
- <KEYWORD1>tvcrs</KEYWORD1>
- <KEYWORD1>tvlct</KEYWORD1>
- <KEYWORD1>tvrd</KEYWORD1>
- <KEYWORD1>tvscl</KEYWORD1>
- <KEYWORD1>tvsize</KEYWORD1>
- <KEYWORD1>uniqn</KEYWORD1>
- <KEYWORD1>unique</KEYWORD1>
- <KEYWORD1>unix_listen</KEYWORD1>
- <KEYWORD1>unix_reply</KEYWORD1>
- <KEYWORD1>unload_option</KEYWORD1>
- <KEYWORD1>upvar</KEYWORD1>
- <KEYWORD1>usersym</KEYWORD1>
- <KEYWORD1>usgs_names</KEYWORD1>
- <KEYWORD1>value_length</KEYWORD1>
- <KEYWORD1>var_match</KEYWORD1>
- <KEYWORD1>var_to_dt</KEYWORD1>
- <KEYWORD1>vector_field3</KEYWORD1>
- <KEYWORD1>vel</KEYWORD1>
- <KEYWORD1>velovect</KEYWORD1>
- <KEYWORD1>viewer</KEYWORD1>
- <KEYWORD1>vol_marker</KEYWORD1>
- <KEYWORD1>vol_pad</KEYWORD1>
- <KEYWORD1>vol_red</KEYWORD1>
- <KEYWORD1>vol_trans</KEYWORD1>
- <KEYWORD1>volume</KEYWORD1>
- <KEYWORD1>vtkaddattribute</KEYWORD1>
- <KEYWORD1>vtkaxes</KEYWORD1>
- <KEYWORD1>vtkcamera</KEYWORD1>
- <KEYWORD1>vtkclose</KEYWORD1>
- <KEYWORD1>vtkcolorbar</KEYWORD1>
- <KEYWORD1>vtkcolornames</KEYWORD1>
- <KEYWORD1>vtkcommand</KEYWORD1>
- <KEYWORD1>vtkerase</KEYWORD1>
- <KEYWORD1>vtkformat</KEYWORD1>
- <KEYWORD1>vtkgrid</KEYWORD1>
- <KEYWORD1>vtkhedgehog</KEYWORD1>
- <KEYWORD1>vtkinit</KEYWORD1>
- <KEYWORD1>vtklight</KEYWORD1>
- <KEYWORD1>vtkplots</KEYWORD1>
- <KEYWORD1>vtkpolydata</KEYWORD1>
- <KEYWORD1>vtkpolyformat</KEYWORD1>
- <KEYWORD1>vtkpolyshade</KEYWORD1>
- <KEYWORD1>vtkppmread</KEYWORD1>
- <KEYWORD1>vtkppmwrite</KEYWORD1>
- <KEYWORD1>vtkreadvtk</KEYWORD1>
- <KEYWORD1>vtkrectilineargrid</KEYWORD1>
- <KEYWORD1>vtkrenderwindow</KEYWORD1>
- <KEYWORD1>vtkscatter</KEYWORD1>
- <KEYWORD1>vtkslicevol</KEYWORD1>
- <KEYWORD1>vtkstructuredpoints</KEYWORD1>
- <KEYWORD1>vtkstructuredgrid</KEYWORD1>
- <KEYWORD1>vtksurface</KEYWORD1>
- <KEYWORD1>vtksurfgen</KEYWORD1>
- <KEYWORD1>vtktext</KEYWORD1>
- <KEYWORD1>vtktvrd</KEYWORD1>
- <KEYWORD1>vtkunstructuredgrid</KEYWORD1>
- <KEYWORD1>vtkwdelete</KEYWORD1>
- <KEYWORD1>vtkwindow</KEYWORD1>
- <KEYWORD1>vtkwritevrml</KEYWORD1>
- <KEYWORD1>vtkwset</KEYWORD1>
- <KEYWORD1>wait</KEYWORD1>
- <KEYWORD1>wavedatamanager</KEYWORD1>
- <KEYWORD1>waveserver</KEYWORD1>
- <KEYWORD1>wcopy</KEYWORD1>
- <KEYWORD1>wdelete</KEYWORD1>
- <KEYWORD1>where</KEYWORD1>
- <KEYWORD1>wherein</KEYWORD1>
- <KEYWORD1>window</KEYWORD1>
- <KEYWORD1>wmenu</KEYWORD1>
- <KEYWORD1>wpaste</KEYWORD1>
- <KEYWORD1>wprint</KEYWORD1>
- <KEYWORD1>wread_dib</KEYWORD1>
- <KEYWORD1>wread_meta</KEYWORD1>
- <KEYWORD1>write_xbm</KEYWORD1>
- <KEYWORD1>writeu</KEYWORD1>
- <KEYWORD1>wset</KEYWORD1>
- <KEYWORD1>whow</KEYWORD1>
- <KEYWORD1>wwrite_dib</KEYWORD1>
- <KEYWORD1>wwrite_meta</KEYWORD1>
- <KEYWORD1>xyouts</KEYWORD1>
- <KEYWORD1>zoom</KEYWORD1>
- <KEYWORD1>zroots</KEYWORD1>
- <!--KEYWORD2s are PV-WAVE keywords -->
- <KEYWORD2>begin</KEYWORD2>
- <KEYWORD2>breakpoint</KEYWORD2>
- <KEYWORD2>case</KEYWORD2>
- <KEYWORD2>common</KEYWORD2>
- <KEYWORD2>compile</KEYWORD2>
- <KEYWORD2>declare</KEYWORD2>
- <KEYWORD2>do</KEYWORD2>
- <KEYWORD2>else</KEYWORD2>
- <KEYWORD2>end</KEYWORD2>
- <KEYWORD2>endcase</KEYWORD2>
- <KEYWORD2>endelse</KEYWORD2>
- <KEYWORD2>endfor</KEYWORD2>
- <KEYWORD2>endif</KEYWORD2>
- <KEYWORD2>endrepeat</KEYWORD2>
- <KEYWORD2>endwhile</KEYWORD2>
- <KEYWORD2>exit</KEYWORD2>
- <KEYWORD2>for</KEYWORD2>
- <KEYWORD2>func</KEYWORD2>
- <KEYWORD2>function</KEYWORD2>
- <KEYWORD2>goto</KEYWORD2>
- <KEYWORD2>help</KEYWORD2>
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD2>info</KEYWORD2>
- <KEYWORD2>journal</KEYWORD2>
- <KEYWORD2>locals</KEYWORD2>
- <KEYWORD2>of</KEYWORD2>
- <KEYWORD2>on_error</KEYWORD2>
- <KEYWORD2>on_error_goto</KEYWORD2>
- <KEYWORD2>on_ioerror</KEYWORD2>
- <KEYWORD2>pro</KEYWORD2>
- <KEYWORD2>quit</KEYWORD2>
- <KEYWORD2>repeat</KEYWORD2>
- <KEYWORD2>restore</KEYWORD2>
- <KEYWORD2>retall</KEYWORD2>
- <KEYWORD2>return</KEYWORD2>
- <KEYWORD2>save</KEYWORD2>
- <KEYWORD2>stop</KEYWORD2>
- <KEYWORD2>then</KEYWORD2>
- <KEYWORD2>while</KEYWORD2>
- <!-- KEYWORD3s are binary ops and Widget stuff -->
- <KEYWORD3>and</KEYWORD3>
- <KEYWORD3>not</KEYWORD3>
- <KEYWORD3>or</KEYWORD3>
- <KEYWORD3>xor</KEYWORD3>
- <KEYWORD3>eq</KEYWORD3>
- <KEYWORD3>ne</KEYWORD3>
- <KEYWORD3>gt</KEYWORD3>
- <KEYWORD3>lt</KEYWORD3>
- <KEYWORD3>ge</KEYWORD3>
- <KEYWORD3>le</KEYWORD3>
- <KEYWORD3>mod</KEYWORD3>
- <KEYWORD3>WgAnimateTool</KEYWORD3>
- <KEYWORD3>WgCbarTool</KEYWORD3>
- <KEYWORD3>WgCtTool</KEYWORD3>
- <KEYWORD3>WgIsoSurfTool</KEYWORD3>
- <KEYWORD3>WgMovieTool</KEYWORD3>
- <KEYWORD3>WgSimageTool</KEYWORD3>
- <KEYWORD3>WgSliceTool</KEYWORD3>
- <KEYWORD3>WgSurfaceTool</KEYWORD3>
- <KEYWORD3>WgTextTool</KEYWORD3>
- <KEYWORD3>WoAddButtons</KEYWORD3>
- <KEYWORD3>WoAddMessage</KEYWORD3>
- <KEYWORD3>WoAddStatus</KEYWORD3>
- <KEYWORD3>WoButtonBar</KEYWORD3>
- <KEYWORD3>WoCheckFile</KEYWORD3>
- <KEYWORD3>WoColorButton</KEYWORD3>
- <KEYWORD3>WoColorConvert</KEYWORD3>
- <KEYWORD3>WoColorGrid</KEYWORD3>
- <KEYWORD3>WoColorWheel</KEYWORD3>
- <KEYWORD3>WoConfirmClose</KEYWORD3>
- <KEYWORD3>WoDialogStatus</KEYWORD3>
- <KEYWORD3>WoFontOptionMenu</KEYWORD3>
- <KEYWORD3>WoGenericDialog</KEYWORD3>
- <KEYWORD3>WoLabeledText</KEYWORD3>
- <KEYWORD3>WoMenuBar</KEYWORD3>
- <KEYWORD3>WoMessage</KEYWORD3>
- <KEYWORD3>WoSaveAsPixmap</KEYWORD3>
- <KEYWORD3>WoSetCursor</KEYWORD3>
- <KEYWORD3>WoSetWindowTitle</KEYWORD3>
- <KEYWORD3>WoStatus</KEYWORD3>
- <KEYWORD3>WoVariableOptionMenu</KEYWORD3>
- <KEYWORD3>WtAddCallback</KEYWORD3>
- <KEYWORD3>WtAddHandler</KEYWORD3>
- <KEYWORD3>WtCursor</KEYWORD3>
- <KEYWORD3>WtGet</KEYWORD3>
- <KEYWORD3>WtPointer</KEYWORD3>
- <KEYWORD3>WtSet</KEYWORD3>
- <KEYWORD3>WtTimer</KEYWORD3>
- <KEYWORD3>WwAlert</KEYWORD3>
- <KEYWORD3>WwAlertPopdown</KEYWORD3>
- <KEYWORD3>WwButtonBox</KEYWORD3>
- <KEYWORD3>WwCallback</KEYWORD3>
- <KEYWORD3>WwControlsBox</KEYWORD3>
- <KEYWORD3>WwDialog</KEYWORD3>
- <KEYWORD3>WwDrawing</KEYWORD3>
- <KEYWORD3>WwFileSelection</KEYWORD3>
- <KEYWORD3>WwGenericDialog</KEYWORD3>
- <KEYWORD3>WwGetButton</KEYWORD3>
- <KEYWORD3>WwGetKey</KEYWORD3>
- <KEYWORD3>WwGetPosition</KEYWORD3>
- <KEYWORD3>WwGetValue</KEYWORD3>
- <KEYWORD3>WwHandler</KEYWORD3>
- <KEYWORD3>WwInit</KEYWORD3>
- <KEYWORD3>WwLayout</KEYWORD3>
- <KEYWORD3>WwList</KEYWORD3>
- <KEYWORD3>WwListUtils</KEYWORD3>
- <KEYWORD3>WwLoop</KEYWORD3>
- <KEYWORD3>WwMainWindow</KEYWORD3>
- <KEYWORD3>WwMenuBar</KEYWORD3>
- <KEYWORD3>WwMenuItem</KEYWORD3>
- <KEYWORD3>WwMessage</KEYWORD3>
- <KEYWORD3>WwMultiClickHandler</KEYWORD3>
- <KEYWORD3>WwOptionMenu</KEYWORD3>
- <KEYWORD3>WwPickFile</KEYWORD3>
- <KEYWORD3>WwPopupMenu</KEYWORD3>
- <KEYWORD3>WwPreview</KEYWORD3>
- <KEYWORD3>WwPreviewUtils</KEYWORD3>
- <KEYWORD3>WwRadioBox</KEYWORD3>
- <KEYWORD3>WwResource</KEYWORD3>
- <KEYWORD3>WwSeparator</KEYWORD3>
- <KEYWORD3>WwSetCursor</KEYWORD3>
- <KEYWORD3>WwSetValue</KEYWORD3>
- <KEYWORD3>WwTable</KEYWORD3>
- <KEYWORD3>WwTableUtils</KEYWORD3>
- <KEYWORD3>WwText</KEYWORD3>
- <KEYWORD3>WwTimer</KEYWORD3>
- <KEYWORD3>WwToolBox</KEYWORD3>
- <KEYWORD3>WzAnimate</KEYWORD3>
- <KEYWORD3>WzColorEdit</KEYWORD3>
- <KEYWORD3>WzContour</KEYWORD3>
- <KEYWORD3>WzExport</KEYWORD3>
- <KEYWORD3>WzHistogram</KEYWORD3>
- <KEYWORD3>WzImage</KEYWORD3>
- <KEYWORD3>WzImport</KEYWORD3>
- <KEYWORD3>WzMultiView</KEYWORD3>
- <KEYWORD3>WzPlot</KEYWORD3>
- <KEYWORD3>WzPreview</KEYWORD3>
- <KEYWORD3>WzSurface</KEYWORD3>
- <KEYWORD3>WzTable</KEYWORD3>
- <KEYWORD3>WzVariable</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- PV-WAVE mode, by Ed Stewart
+ based on Java mode by Mike Dillon and IDLTokenMarker by Juha Lindfors -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ </PROPS>
+ <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="LABEL">$</SEQ>
+ <SEQ TYPE="LABEL">&</SEQ>
+ <SEQ TYPE="LABEL">@</SEQ>
+ <SEQ TYPE="LABEL">!</SEQ>
+
+ <KEYWORDS>
+ <!--KEYWORD1s are standard functions and procedures -->
+ <KEYWORD1>abs</KEYWORD1>
+ <KEYWORD1>acos</KEYWORD1>
+ <KEYWORD1>add_exec_on_select</KEYWORD1>
+ <KEYWORD1>addsysvar</KEYWORD1>
+ <KEYWORD1>addvar</KEYWORD1>
+ <KEYWORD1>affine</KEYWORD1>
+ <KEYWORD1>alog</KEYWORD1>
+ <KEYWORD1>alog10</KEYWORD1>
+ <KEYWORD1>asarr</KEYWORD1>
+ <KEYWORD1>asin</KEYWORD1>
+ <KEYWORD1>askeys</KEYWORD1>
+ <KEYWORD1>assoc</KEYWORD1>
+ <KEYWORD1>atan</KEYWORD1>
+ <KEYWORD1>avg</KEYWORD1>
+ <KEYWORD1>axis</KEYWORD1>
+ <KEYWORD1>bar</KEYWORD1>
+ <KEYWORD1>bar2d</KEYWORD1>
+ <KEYWORD1>bar3d</KEYWORD1>
+ <KEYWORD1>beseli</KEYWORD1>
+ <KEYWORD1>beselj</KEYWORD1>
+ <KEYWORD1>besely</KEYWORD1>
+ <KEYWORD1>bilinear</KEYWORD1>
+ <KEYWORD1>bindgen</KEYWORD1>
+ <KEYWORD1>blob</KEYWORD1>
+ <KEYWORD1>blobcount</KEYWORD1>
+ <KEYWORD1>boundary</KEYWORD1>
+ <KEYWORD1>build_table</KEYWORD1>
+ <KEYWORD1>buildresourcefilename</KEYWORD1>
+ <KEYWORD1>bytarr</KEYWORD1>
+ <KEYWORD1>byte</KEYWORD1>
+ <KEYWORD1>byteorder</KEYWORD1>
+ <KEYWORD1>bytscl</KEYWORD1>
+ <KEYWORD1>c_edit</KEYWORD1>
+ <KEYWORD1>call_unix</KEYWORD1>
+ <KEYWORD1>cd</KEYWORD1>
+ <KEYWORD1>center_view</KEYWORD1>
+ <KEYWORD1>chebyshev</KEYWORD1>
+ <KEYWORD1>check_math</KEYWORD1>
+ <KEYWORD1>checkfile</KEYWORD1>
+ <KEYWORD1>cindgen</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>color_convert</KEYWORD1>
+ <KEYWORD1>color_edit</KEYWORD1>
+ <KEYWORD1>color_palette</KEYWORD1>
+ <KEYWORD1>complex</KEYWORD1>
+ <KEYWORD1>complexarr</KEYWORD1>
+ <KEYWORD1>cone</KEYWORD1>
+ <KEYWORD1>congrid</KEYWORD1>
+ <KEYWORD1>conj</KEYWORD1>
+ <KEYWORD1>contour</KEYWORD1>
+ <KEYWORD1>contour2</KEYWORD1>
+ <KEYWORD1>contourfill</KEYWORD1>
+ <KEYWORD1>conv_from_rect</KEYWORD1>
+ <KEYWORD1>conv_to_rect</KEYWORD1>
+ <KEYWORD1>convert_coord</KEYWORD1>
+ <KEYWORD1>convol</KEYWORD1>
+ <KEYWORD1>correlate</KEYWORD1>
+ <KEYWORD1>cos</KEYWORD1>
+ <KEYWORD1>cosh</KEYWORD1>
+ <KEYWORD1>cosines</KEYWORD1>
+ <KEYWORD1>cprod</KEYWORD1>
+ <KEYWORD1>create_holidays</KEYWORD1>
+ <KEYWORD1>create_weekdends</KEYWORD1>
+ <KEYWORD1>crossp</KEYWORD1>
+ <KEYWORD1>cursor</KEYWORD1>
+ <KEYWORD1>curvatures</KEYWORD1>
+ <KEYWORD1>curvefit</KEYWORD1>
+ <KEYWORD1>cylinder</KEYWORD1>
+ <KEYWORD1>day_name</KEYWORD1>
+ <KEYWORD1>day_of_week</KEYWORD1>
+ <KEYWORD1>day_of_year</KEYWORD1>
+ <KEYWORD1>dblarr</KEYWORD1>
+ <KEYWORD1>dc_error_msg</KEYWORD1>
+ <KEYWORD1>dc_options</KEYWORD1>
+ <KEYWORD1>dc_read_24_bit</KEYWORD1>
+ <KEYWORD1>dc_read_8_bit</KEYWORD1>
+ <KEYWORD1>dc_read_container</KEYWORD1>
+ <KEYWORD1>dc_read_dib</KEYWORD1>
+ <KEYWORD1>dc_read_fixed</KEYWORD1>
+ <KEYWORD1>dc_read_free</KEYWORD1>
+ <KEYWORD1>dc_read_tiff</KEYWORD1>
+ <KEYWORD1>dc_scan_container</KEYWORD1>
+ <KEYWORD1>dc_write_24_bit</KEYWORD1>
+ <KEYWORD1>dc_write_8_bit</KEYWORD1>
+ <KEYWORD1>dc_write_dib</KEYWORD1>
+ <KEYWORD1>dc_write_fixed</KEYWORD1>
+ <KEYWORD1>dc_write_free</KEYWORD1>
+ <KEYWORD1>dc_write_tiff</KEYWORD1>
+ <KEYWORD1>dcindgen</KEYWORD1>
+ <KEYWORD1>dcomplex</KEYWORD1>
+ <KEYWORD1>dcomplexarr</KEYWORD1>
+ <KEYWORD1>declare func</KEYWORD1>
+ <KEYWORD1>declare function</KEYWORD1>
+ <KEYWORD1>define_key</KEYWORD1>
+ <KEYWORD1>defroi</KEYWORD1>
+ <KEYWORD1>defsysv</KEYWORD1>
+ <KEYWORD1>del_file</KEYWORD1>
+ <KEYWORD1>delfunc</KEYWORD1>
+ <KEYWORD1>dellog</KEYWORD1>
+ <KEYWORD1>delproc</KEYWORD1>
+ <KEYWORD1>delstruct</KEYWORD1>
+ <KEYWORD1>delvar</KEYWORD1>
+ <KEYWORD1>demo</KEYWORD1>
+ <KEYWORD1>deriv</KEYWORD1>
+ <KEYWORD1>derivn</KEYWORD1>
+ <KEYWORD1>determ</KEYWORD1>
+ <KEYWORD1>device</KEYWORD1>
+ <KEYWORD1>diag</KEYWORD1>
+ <KEYWORD1>dicm_tag_info</KEYWORD1>
+ <KEYWORD1>digital_filter</KEYWORD1>
+ <KEYWORD1>dilate</KEYWORD1>
+ <KEYWORD1>dindgen</KEYWORD1>
+ <KEYWORD1>dist</KEYWORD1>
+ <KEYWORD1>dminit</KEYWORD1>
+ <KEYWORD1>doc_lib_unix</KEYWORD1>
+ <KEYWORD1>doc_library</KEYWORD1>
+ <KEYWORD1>double</KEYWORD1>
+ <KEYWORD1>drop_exec_on_select</KEYWORD1>
+ <KEYWORD1>dt_add</KEYWORD1>
+ <KEYWORD1>dt_addly</KEYWORD1>
+ <KEYWORD1>dt_compress</KEYWORD1>
+ <KEYWORD1>dt_duration</KEYWORD1>
+ <KEYWORD1>dt_print</KEYWORD1>
+ <KEYWORD1>dt_subly</KEYWORD1>
+ <KEYWORD1>dt_subtract</KEYWORD1>
+ <KEYWORD1>dt_to_sec</KEYWORD1>
+ <KEYWORD1>dt_to_str</KEYWORD1>
+ <KEYWORD1>dt_to_var</KEYWORD1>
+ <KEYWORD1>dtegn</KEYWORD1>
+ <KEYWORD1>empty</KEYWORD1>
+ <KEYWORD1>environment</KEYWORD1>
+ <KEYWORD1>eof</KEYWORD1>
+ <KEYWORD1>erase</KEYWORD1>
+ <KEYWORD1>erode</KEYWORD1>
+ <KEYWORD1>errorf</KEYWORD1>
+ <KEYWORD1>errplot</KEYWORD1>
+ <KEYWORD1>euclidean</KEYWORD1>
+ <KEYWORD1>exec_on_select</KEYWORD1>
+ <KEYWORD1>execute</KEYWORD1>
+ <KEYWORD1>exp</KEYWORD1>
+ <KEYWORD1>expand</KEYWORD1>
+ <KEYWORD1>expon</KEYWORD1>
+ <KEYWORD1>extrema</KEYWORD1>
+ <KEYWORD1>factor</KEYWORD1>
+ <KEYWORD1>fast_grid2</KEYWORD1>
+ <KEYWORD1>fast_grid3</KEYWORD1>
+ <KEYWORD1>fast_grid4</KEYWORD1>
+ <KEYWORD1>fft</KEYWORD1>
+ <KEYWORD1>filepath</KEYWORD1>
+ <KEYWORD1>findfile</KEYWORD1>
+ <KEYWORD1>findgen</KEYWORD1>
+ <KEYWORD1>finite</KEYWORD1>
+ <KEYWORD1>fix</KEYWORD1>
+ <KEYWORD1>float</KEYWORD1>
+ <KEYWORD1>fltarr</KEYWORD1>
+ <KEYWORD1>flush</KEYWORD1>
+ <KEYWORD1>free_lun</KEYWORD1>
+ <KEYWORD1>fstat</KEYWORD1>
+ <KEYWORD1>funct</KEYWORD1>
+ <KEYWORD1>gamma</KEYWORD1>
+ <KEYWORD1>gaussfit</KEYWORD1>
+ <KEYWORD1>gaussint</KEYWORD1>
+ <KEYWORD1>gcd</KEYWORD1>
+ <KEYWORD1>get_kbrd</KEYWORD1>
+ <KEYWORD1>get_lun</KEYWORD1>
+ <KEYWORD1>getenv</KEYWORD1>
+ <KEYWORD1>get_named_color</KEYWORD1>
+ <KEYWORD1>getncerr</KEYWORD1>
+ <KEYWORD1>getncopts</KEYWORD1>
+ <KEYWORD1>getparam</KEYWORD1>
+ <KEYWORD1>great_int</KEYWORD1>
+ <KEYWORD1>grid</KEYWORD1>
+ <KEYWORD1>grid_2d</KEYWORD1>
+ <KEYWORD1>grid_3d</KEYWORD1>
+ <KEYWORD1>grid_4d</KEYWORD1>
+ <KEYWORD1>grid_sphere</KEYWORD1>
+ <KEYWORD1>gridn</KEYWORD1>
+ <KEYWORD1>group_by</KEYWORD1>
+ <KEYWORD1>hak</KEYWORD1>
+ <KEYWORD1>hanning</KEYWORD1>
+ <KEYWORD1>hdf_test</KEYWORD1>
+ <KEYWORD1>hdfgetsds</KEYWORD1>
+ <KEYWORD1>help</KEYWORD1>
+ <KEYWORD1>hilbert</KEYWORD1>
+ <KEYWORD1>hist_equal</KEYWORD1>
+ <KEYWORD1>hist_equal_ct</KEYWORD1>
+ <KEYWORD1>histn</KEYWORD1>
+ <KEYWORD1>histogram</KEYWORD1>
+ <KEYWORD1>hls</KEYWORD1>
+ <KEYWORD1>hsv</KEYWORD1>
+ <KEYWORD1>hsv_to_rgd</KEYWORD1>
+ <KEYWORD1>image_check</KEYWORD1>
+ <KEYWORD1>image_color_quant</KEYWORD1>
+ <KEYWORD1>image_cont</KEYWORD1>
+ <KEYWORD1>image_create</KEYWORD1>
+ <KEYWORD1>image_display</KEYWORD1>
+ <KEYWORD1>image_filetypes</KEYWORD1>
+ <KEYWORD1>image_query_file</KEYWORD1>
+ <KEYWORD1>image_read</KEYWORD1>
+ <KEYWORD1>image_write</KEYWORD1>
+ <KEYWORD1>imaginary</KEYWORD1>
+ <KEYWORD1>img_true8</KEYWORD1>
+ <KEYWORD1>index_and</KEYWORD1>
+ <KEYWORD1>index_conv</KEYWORD1>
+ <KEYWORD1>index_or</KEYWORD1>
+ <KEYWORD1>indgen</KEYWORD1>
+ <KEYWORD1>intarr</KEYWORD1>
+ <KEYWORD1>interpol</KEYWORD1>
+ <KEYWORD1>interpolate</KEYWORD1>
+ <KEYWORD1>intrp</KEYWORD1>
+ <KEYWORD1>invert</KEYWORD1>
+ <KEYWORD1>isaskey</KEYWORD1>
+ <KEYWORD1>ishft</KEYWORD1>
+ <KEYWORD1>jacobian</KEYWORD1>
+ <KEYWORD1>jul_to_dt</KEYWORD1>
+ <KEYWORD1>keyword_set</KEYWORD1>
+ <KEYWORD1>lcm</KEYWORD1>
+ <KEYWORD1>leefilt</KEYWORD1>
+ <KEYWORD1>legend</KEYWORD1>
+ <KEYWORD1>lindgen</KEYWORD1>
+ <KEYWORD1>linknload</KEYWORD1>
+ <KEYWORD1>list</KEYWORD1>
+ <KEYWORD1>listarr</KEYWORD1>
+ <KEYWORD1>load_holidays</KEYWORD1>
+ <KEYWORD1>load_option</KEYWORD1>
+ <KEYWORD1>load_weekends</KEYWORD1>
+ <KEYWORD1>loadct</KEYWORD1>
+ <KEYWORD1>loadct_custom</KEYWORD1>
+ <KEYWORD1>loadresources</KEYWORD1>
+ <KEYWORD1>loadstrings</KEYWORD1>
+ <KEYWORD1>lonarr</KEYWORD1>
+ <KEYWORD1>long</KEYWORD1>
+ <KEYWORD1>lubksb</KEYWORD1>
+ <KEYWORD1>ludcmp</KEYWORD1>
+ <KEYWORD1>make_array</KEYWORD1>
+ <KEYWORD1>map</KEYWORD1>
+ <KEYWORD1>map_axes</KEYWORD1>
+ <KEYWORD1>map_contour</KEYWORD1>
+ <KEYWORD1>map_grid</KEYWORD1>
+ <KEYWORD1>map_plots</KEYWORD1>
+ <KEYWORD1>map_polyfill</KEYWORD1>
+ <KEYWORD1>map_proj</KEYWORD1>
+ <KEYWORD1>map_reverse</KEYWORD1>
+ <KEYWORD1>map_velovect</KEYWORD1>
+ <KEYWORD1>map_version</KEYWORD1>
+ <KEYWORD1>map_xyouts</KEYWORD1>
+ <KEYWORD1>max</KEYWORD1>
+ <KEYWORD1>median</KEYWORD1>
+ <KEYWORD1>mesh</KEYWORD1>
+ <KEYWORD1>message</KEYWORD1>
+ <KEYWORD1>min</KEYWORD1>
+ <KEYWORD1>modifyct</KEYWORD1>
+ <KEYWORD1>molec</KEYWORD1>
+ <KEYWORD1>moment</KEYWORD1>
+ <KEYWORD1>month_name</KEYWORD1>
+ <KEYWORD1>movie</KEYWORD1>
+ <KEYWORD1>mprove</KEYWORD1>
+ <KEYWORD1>msword_cgm_setup</KEYWORD1>
+ <KEYWORD1>n_elements</KEYWORD1>
+ <KEYWORD1>n_params</KEYWORD1>
+ <KEYWORD1>n_tags</KEYWORD1>
+ <KEYWORD1>nint</KEYWORD1>
+ <KEYWORD1>normals</KEYWORD1>
+ <KEYWORD1>null_processor</KEYWORD1>
+ <KEYWORD1>openr</KEYWORD1>
+ <KEYWORD1>openu</KEYWORD1>
+ <KEYWORD1>openw</KEYWORD1>
+ <KEYWORD1>oplot</KEYWORD1>
+ <KEYWORD1>oploterr</KEYWORD1>
+ <KEYWORD1>option_is_loaded</KEYWORD1>
+ <KEYWORD1>order_by</KEYWORD1>
+ <KEYWORD1>padit</KEYWORD1>
+ <KEYWORD1>packimage</KEYWORD1>
+ <KEYWORD1>packtable</KEYWORD1>
+ <KEYWORD1>palette</KEYWORD1>
+ <KEYWORD1>param_present</KEYWORD1>
+ <KEYWORD1>parsefilename</KEYWORD1>
+ <KEYWORD1>pie</KEYWORD1>
+ <KEYWORD1>pie_chart</KEYWORD1>
+ <KEYWORD1>plot</KEYWORD1>
+ <KEYWORD1>plot_field</KEYWORD1>
+ <KEYWORD1>plot_histogram</KEYWORD1>
+ <KEYWORD1>plot_io</KEYWORD1>
+ <KEYWORD1>plot_oi</KEYWORD1>
+ <KEYWORD1>plot_oo</KEYWORD1>
+ <KEYWORD1>plot_windrose</KEYWORD1>
+ <KEYWORD1>ploterr</KEYWORD1>
+ <KEYWORD1>plots</KEYWORD1>
+ <KEYWORD1>pm</KEYWORD1>
+ <KEYWORD1>pmf</KEYWORD1>
+ <KEYWORD1>point_lun</KEYWORD1>
+ <KEYWORD1>poly</KEYWORD1>
+ <KEYWORD1>poly_2d</KEYWORD1>
+ <KEYWORD1>poly_area</KEYWORD1>
+ <KEYWORD1>poly_c_conv</KEYWORD1>
+ <KEYWORD1>poly_count</KEYWORD1>
+ <KEYWORD1>poly_dev</KEYWORD1>
+ <KEYWORD1>poly_fit</KEYWORD1>
+ <KEYWORD1>poly_merge</KEYWORD1>
+ <KEYWORD1>poly_norm</KEYWORD1>
+ <KEYWORD1>poly_plot</KEYWORD1>
+ <KEYWORD1>poly_sphere</KEYWORD1>
+ <KEYWORD1>poly_surf</KEYWORD1>
+ <KEYWORD1>poly_trans</KEYWORD1>
+ <KEYWORD1>polyfill</KEYWORD1>
+ <KEYWORD1>polyfillv</KEYWORD1>
+ <KEYWORD1>polyfitw</KEYWORD1>
+ <KEYWORD1>polyshade</KEYWORD1>
+ <KEYWORD1>polywarp</KEYWORD1>
+ <KEYWORD1>popd</KEYWORD1>
+ <KEYWORD1>prime</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>printd</KEYWORD1>
+ <KEYWORD1>printf</KEYWORD1>
+ <KEYWORD1>profile</KEYWORD1>
+ <KEYWORD1>profiles</KEYWORD1>
+ <KEYWORD1>prompt</KEYWORD1>
+ <KEYWORD1>pseudo</KEYWORD1>
+ <KEYWORD1>pushd</KEYWORD1>
+ <KEYWORD1>query_table</KEYWORD1>
+ <KEYWORD1>randomn</KEYWORD1>
+ <KEYWORD1>randomu</KEYWORD1>
+ <KEYWORD1>rdpix</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>read_airs</KEYWORD1>
+ <KEYWORD1>read_xbm</KEYWORD1>
+ <KEYWORD1>readf</KEYWORD1>
+ <KEYWORD1>readu</KEYWORD1>
+ <KEYWORD1>rebin</KEYWORD1>
+ <KEYWORD1>reform</KEYWORD1>
+ <KEYWORD1>regress</KEYWORD1>
+ <KEYWORD1>rename</KEYWORD1>
+ <KEYWORD1>render</KEYWORD1>
+ <KEYWORD1>render24</KEYWORD1>
+ <KEYWORD1>replicate</KEYWORD1>
+ <KEYWORD1>replv</KEYWORD1>
+ <KEYWORD1>resamp</KEYWORD1>
+ <KEYWORD1>reverse</KEYWORD1>
+ <KEYWORD1>rgb_to_hsv</KEYWORD1>
+ <KEYWORD1>rm</KEYWORD1>
+ <KEYWORD1>rmf</KEYWORD1>
+ <KEYWORD1>roberts</KEYWORD1>
+ <KEYWORD1>rot</KEYWORD1>
+ <KEYWORD1>rot_int</KEYWORD1>
+ <KEYWORD1>rotate</KEYWORD1>
+ <KEYWORD1>same</KEYWORD1>
+ <KEYWORD1>scale3d</KEYWORD1>
+ <KEYWORD1>sec_to_dt</KEYWORD1>
+ <KEYWORD1>select_read_lun</KEYWORD1>
+ <KEYWORD1>set_plot</KEYWORD1>
+ <KEYWORD1>set_screen</KEYWORD1>
+ <KEYWORD1>set_shading</KEYWORD1>
+ <KEYWORD1>set_symbol</KEYWORD1>
+ <KEYWORD1>set_view3d</KEYWORD1>
+ <KEYWORD1>set_viewport</KEYWORD1>
+ <KEYWORD1>set_xy</KEYWORD1>
+ <KEYWORD1>setdemo</KEYWORD1>
+ <KEYWORD1>setenv</KEYWORD1>
+ <KEYWORD1>setimagesize</KEYWORD1>
+ <KEYWORD1>setlog</KEYWORD1>
+ <KEYWORD1>setncopts</KEYWORD1>
+ <KEYWORD1>setup_keys</KEYWORD1>
+ <KEYWORD1>sgn</KEYWORD1>
+ <KEYWORD1>shade_surf</KEYWORD1>
+ <KEYWORD1>shade_surf_irr</KEYWORD1>
+ <KEYWORD1>shade_volume</KEYWORD1>
+ <KEYWORD1>shif</KEYWORD1>
+ <KEYWORD1>shift</KEYWORD1>
+ <KEYWORD1>show_options</KEYWORD1>
+ <KEYWORD1>show3</KEYWORD1>
+ <KEYWORD1>sigma</KEYWORD1>
+ <KEYWORD1>sin</KEYWORD1>
+ <KEYWORD1>sindgen</KEYWORD1>
+ <KEYWORD1>sinh</KEYWORD1>
+ <KEYWORD1>size</KEYWORD1>
+ <KEYWORD1>skipf</KEYWORD1>
+ <KEYWORD1>slice</KEYWORD1>
+ <KEYWORD1>slice_vol</KEYWORD1>
+ <KEYWORD1>small_int</KEYWORD1>
+ <KEYWORD1>smooth</KEYWORD1>
+ <KEYWORD1>sobel</KEYWORD1>
+ <KEYWORD1>socket_accept</KEYWORD1>
+ <KEYWORD1>socket_close</KEYWORD1>
+ <KEYWORD1>socket_connect</KEYWORD1>
+ <KEYWORD1>socket_getport</KEYWORD1>
+ <KEYWORD1>socket_init</KEYWORD1>
+ <KEYWORD1>socket_read</KEYWORD1>
+ <KEYWORD1>socket_write</KEYWORD1>
+ <KEYWORD1>sort</KEYWORD1>
+ <KEYWORD1>sortn</KEYWORD1>
+ <KEYWORD1>spawn</KEYWORD1>
+ <KEYWORD1>sphere</KEYWORD1>
+ <KEYWORD1>spline</KEYWORD1>
+ <KEYWORD1>sqrt</KEYWORD1>
+ <KEYWORD1>stdev</KEYWORD1>
+ <KEYWORD1>str_to_dt</KEYWORD1>
+ <KEYWORD1>strarr</KEYWORD1>
+ <KEYWORD1>strcompress</KEYWORD1>
+ <KEYWORD1>stretch</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>strjoin</KEYWORD1>
+ <KEYWORD1>strlen</KEYWORD1>
+ <KEYWORD1>strlookup</KEYWORD1>
+ <KEYWORD1>strlowcase</KEYWORD1>
+ <KEYWORD1>strmatch</KEYWORD1>
+ <KEYWORD1>strmessage</KEYWORD1>
+ <KEYWORD1>strmid</KEYWORD1>
+ <KEYWORD1>strpos</KEYWORD1>
+ <KEYWORD1>strput</KEYWORD1>
+ <KEYWORD1>strsplit</KEYWORD1>
+ <KEYWORD1>strsubst</KEYWORD1>
+ <KEYWORD1>strtrim</KEYWORD1>
+ <KEYWORD1>structref</KEYWORD1>
+ <KEYWORD1>strupcase</KEYWORD1>
+ <KEYWORD1>sum</KEYWORD1>
+ <KEYWORD1>surface</KEYWORD1>
+ <KEYWORD1>surface_fit</KEYWORD1>
+ <KEYWORD1>surfr</KEYWORD1>
+ <KEYWORD1>svbksb</KEYWORD1>
+ <KEYWORD1>svd</KEYWORD1>
+ <KEYWORD1>svdfit</KEYWORD1>
+ <KEYWORD1>systime</KEYWORD1>
+ <KEYWORD1>t3d</KEYWORD1>
+ <KEYWORD1>tag_names</KEYWORD1>
+ <KEYWORD1>tan</KEYWORD1>
+ <KEYWORD1>tanh</KEYWORD1>
+ <KEYWORD1>tek_color</KEYWORD1>
+ <KEYWORD1>tensor_add</KEYWORD1>
+ <KEYWORD1>tensor_div</KEYWORD1>
+ <KEYWORD1>tensor_eq</KEYWORD1>
+ <KEYWORD1>tensor_exp</KEYWORD1>
+ <KEYWORD1>tensor_ge</KEYWORD1>
+ <KEYWORD1>tensor_gt</KEYWORD1>
+ <KEYWORD1>tensor_le</KEYWORD1>
+ <KEYWORD1>tensor_lt</KEYWORD1>
+ <KEYWORD1>tensor_max</KEYWORD1>
+ <KEYWORD1>tensor_min</KEYWORD1>
+ <KEYWORD1>tensor_mod</KEYWORD1>
+ <KEYWORD1>tensor_mul</KEYWORD1>
+ <KEYWORD1>tensor_ne</KEYWORD1>
+ <KEYWORD1>tensor_sub</KEYWORD1>
+ <KEYWORD1>threed</KEYWORD1>
+ <KEYWORD1>today</KEYWORD1>
+ <KEYWORD1>total</KEYWORD1>
+ <KEYWORD1>tqli</KEYWORD1>
+ <KEYWORD1>transpose</KEYWORD1>
+ <KEYWORD1>tred2</KEYWORD1>
+ <KEYWORD1>tridag</KEYWORD1>
+ <KEYWORD1>tv</KEYWORD1>
+ <KEYWORD1>tvcrs</KEYWORD1>
+ <KEYWORD1>tvlct</KEYWORD1>
+ <KEYWORD1>tvrd</KEYWORD1>
+ <KEYWORD1>tvscl</KEYWORD1>
+ <KEYWORD1>tvsize</KEYWORD1>
+ <KEYWORD1>uniqn</KEYWORD1>
+ <KEYWORD1>unique</KEYWORD1>
+ <KEYWORD1>unix_listen</KEYWORD1>
+ <KEYWORD1>unix_reply</KEYWORD1>
+ <KEYWORD1>unload_option</KEYWORD1>
+ <KEYWORD1>upvar</KEYWORD1>
+ <KEYWORD1>usersym</KEYWORD1>
+ <KEYWORD1>usgs_names</KEYWORD1>
+ <KEYWORD1>value_length</KEYWORD1>
+ <KEYWORD1>var_match</KEYWORD1>
+ <KEYWORD1>var_to_dt</KEYWORD1>
+ <KEYWORD1>vector_field3</KEYWORD1>
+ <KEYWORD1>vel</KEYWORD1>
+ <KEYWORD1>velovect</KEYWORD1>
+ <KEYWORD1>viewer</KEYWORD1>
+ <KEYWORD1>vol_marker</KEYWORD1>
+ <KEYWORD1>vol_pad</KEYWORD1>
+ <KEYWORD1>vol_red</KEYWORD1>
+ <KEYWORD1>vol_trans</KEYWORD1>
+ <KEYWORD1>volume</KEYWORD1>
+ <KEYWORD1>vtkaddattribute</KEYWORD1>
+ <KEYWORD1>vtkaxes</KEYWORD1>
+ <KEYWORD1>vtkcamera</KEYWORD1>
+ <KEYWORD1>vtkclose</KEYWORD1>
+ <KEYWORD1>vtkcolorbar</KEYWORD1>
+ <KEYWORD1>vtkcolornames</KEYWORD1>
+ <KEYWORD1>vtkcommand</KEYWORD1>
+ <KEYWORD1>vtkerase</KEYWORD1>
+ <KEYWORD1>vtkformat</KEYWORD1>
+ <KEYWORD1>vtkgrid</KEYWORD1>
+ <KEYWORD1>vtkhedgehog</KEYWORD1>
+ <KEYWORD1>vtkinit</KEYWORD1>
+ <KEYWORD1>vtklight</KEYWORD1>
+ <KEYWORD1>vtkplots</KEYWORD1>
+ <KEYWORD1>vtkpolydata</KEYWORD1>
+ <KEYWORD1>vtkpolyformat</KEYWORD1>
+ <KEYWORD1>vtkpolyshade</KEYWORD1>
+ <KEYWORD1>vtkppmread</KEYWORD1>
+ <KEYWORD1>vtkppmwrite</KEYWORD1>
+ <KEYWORD1>vtkreadvtk</KEYWORD1>
+ <KEYWORD1>vtkrectilineargrid</KEYWORD1>
+ <KEYWORD1>vtkrenderwindow</KEYWORD1>
+ <KEYWORD1>vtkscatter</KEYWORD1>
+ <KEYWORD1>vtkslicevol</KEYWORD1>
+ <KEYWORD1>vtkstructuredpoints</KEYWORD1>
+ <KEYWORD1>vtkstructuredgrid</KEYWORD1>
+ <KEYWORD1>vtksurface</KEYWORD1>
+ <KEYWORD1>vtksurfgen</KEYWORD1>
+ <KEYWORD1>vtktext</KEYWORD1>
+ <KEYWORD1>vtktvrd</KEYWORD1>
+ <KEYWORD1>vtkunstructuredgrid</KEYWORD1>
+ <KEYWORD1>vtkwdelete</KEYWORD1>
+ <KEYWORD1>vtkwindow</KEYWORD1>
+ <KEYWORD1>vtkwritevrml</KEYWORD1>
+ <KEYWORD1>vtkwset</KEYWORD1>
+ <KEYWORD1>wait</KEYWORD1>
+ <KEYWORD1>wavedatamanager</KEYWORD1>
+ <KEYWORD1>waveserver</KEYWORD1>
+ <KEYWORD1>wcopy</KEYWORD1>
+ <KEYWORD1>wdelete</KEYWORD1>
+ <KEYWORD1>where</KEYWORD1>
+ <KEYWORD1>wherein</KEYWORD1>
+ <KEYWORD1>window</KEYWORD1>
+ <KEYWORD1>wmenu</KEYWORD1>
+ <KEYWORD1>wpaste</KEYWORD1>
+ <KEYWORD1>wprint</KEYWORD1>
+ <KEYWORD1>wread_dib</KEYWORD1>
+ <KEYWORD1>wread_meta</KEYWORD1>
+ <KEYWORD1>write_xbm</KEYWORD1>
+ <KEYWORD1>writeu</KEYWORD1>
+ <KEYWORD1>wset</KEYWORD1>
+ <KEYWORD1>whow</KEYWORD1>
+ <KEYWORD1>wwrite_dib</KEYWORD1>
+ <KEYWORD1>wwrite_meta</KEYWORD1>
+ <KEYWORD1>xyouts</KEYWORD1>
+ <KEYWORD1>zoom</KEYWORD1>
+ <KEYWORD1>zroots</KEYWORD1>
+ <!--KEYWORD2s are PV-WAVE keywords -->
+ <KEYWORD2>begin</KEYWORD2>
+ <KEYWORD2>breakpoint</KEYWORD2>
+ <KEYWORD2>case</KEYWORD2>
+ <KEYWORD2>common</KEYWORD2>
+ <KEYWORD2>compile</KEYWORD2>
+ <KEYWORD2>declare</KEYWORD2>
+ <KEYWORD2>do</KEYWORD2>
+ <KEYWORD2>else</KEYWORD2>
+ <KEYWORD2>end</KEYWORD2>
+ <KEYWORD2>endcase</KEYWORD2>
+ <KEYWORD2>endelse</KEYWORD2>
+ <KEYWORD2>endfor</KEYWORD2>
+ <KEYWORD2>endif</KEYWORD2>
+ <KEYWORD2>endrepeat</KEYWORD2>
+ <KEYWORD2>endwhile</KEYWORD2>
+ <KEYWORD2>exit</KEYWORD2>
+ <KEYWORD2>for</KEYWORD2>
+ <KEYWORD2>func</KEYWORD2>
+ <KEYWORD2>function</KEYWORD2>
+ <KEYWORD2>goto</KEYWORD2>
+ <KEYWORD2>help</KEYWORD2>
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>info</KEYWORD2>
+ <KEYWORD2>journal</KEYWORD2>
+ <KEYWORD2>locals</KEYWORD2>
+ <KEYWORD2>of</KEYWORD2>
+ <KEYWORD2>on_error</KEYWORD2>
+ <KEYWORD2>on_error_goto</KEYWORD2>
+ <KEYWORD2>on_ioerror</KEYWORD2>
+ <KEYWORD2>pro</KEYWORD2>
+ <KEYWORD2>quit</KEYWORD2>
+ <KEYWORD2>repeat</KEYWORD2>
+ <KEYWORD2>restore</KEYWORD2>
+ <KEYWORD2>retall</KEYWORD2>
+ <KEYWORD2>return</KEYWORD2>
+ <KEYWORD2>save</KEYWORD2>
+ <KEYWORD2>stop</KEYWORD2>
+ <KEYWORD2>then</KEYWORD2>
+ <KEYWORD2>while</KEYWORD2>
+ <!-- KEYWORD3s are binary ops and Widget stuff -->
+ <KEYWORD3>and</KEYWORD3>
+ <KEYWORD3>not</KEYWORD3>
+ <KEYWORD3>or</KEYWORD3>
+ <KEYWORD3>xor</KEYWORD3>
+ <KEYWORD3>eq</KEYWORD3>
+ <KEYWORD3>ne</KEYWORD3>
+ <KEYWORD3>gt</KEYWORD3>
+ <KEYWORD3>lt</KEYWORD3>
+ <KEYWORD3>ge</KEYWORD3>
+ <KEYWORD3>le</KEYWORD3>
+ <KEYWORD3>mod</KEYWORD3>
+ <KEYWORD3>WgAnimateTool</KEYWORD3>
+ <KEYWORD3>WgCbarTool</KEYWORD3>
+ <KEYWORD3>WgCtTool</KEYWORD3>
+ <KEYWORD3>WgIsoSurfTool</KEYWORD3>
+ <KEYWORD3>WgMovieTool</KEYWORD3>
+ <KEYWORD3>WgSimageTool</KEYWORD3>
+ <KEYWORD3>WgSliceTool</KEYWORD3>
+ <KEYWORD3>WgSurfaceTool</KEYWORD3>
+ <KEYWORD3>WgTextTool</KEYWORD3>
+ <KEYWORD3>WoAddButtons</KEYWORD3>
+ <KEYWORD3>WoAddMessage</KEYWORD3>
+ <KEYWORD3>WoAddStatus</KEYWORD3>
+ <KEYWORD3>WoButtonBar</KEYWORD3>
+ <KEYWORD3>WoCheckFile</KEYWORD3>
+ <KEYWORD3>WoColorButton</KEYWORD3>
+ <KEYWORD3>WoColorConvert</KEYWORD3>
+ <KEYWORD3>WoColorGrid</KEYWORD3>
+ <KEYWORD3>WoColorWheel</KEYWORD3>
+ <KEYWORD3>WoConfirmClose</KEYWORD3>
+ <KEYWORD3>WoDialogStatus</KEYWORD3>
+ <KEYWORD3>WoFontOptionMenu</KEYWORD3>
+ <KEYWORD3>WoGenericDialog</KEYWORD3>
+ <KEYWORD3>WoLabeledText</KEYWORD3>
+ <KEYWORD3>WoMenuBar</KEYWORD3>
+ <KEYWORD3>WoMessage</KEYWORD3>
+ <KEYWORD3>WoSaveAsPixmap</KEYWORD3>
+ <KEYWORD3>WoSetCursor</KEYWORD3>
+ <KEYWORD3>WoSetWindowTitle</KEYWORD3>
+ <KEYWORD3>WoStatus</KEYWORD3>
+ <KEYWORD3>WoVariableOptionMenu</KEYWORD3>
+ <KEYWORD3>WtAddCallback</KEYWORD3>
+ <KEYWORD3>WtAddHandler</KEYWORD3>
+ <KEYWORD3>WtCursor</KEYWORD3>
+ <KEYWORD3>WtGet</KEYWORD3>
+ <KEYWORD3>WtPointer</KEYWORD3>
+ <KEYWORD3>WtSet</KEYWORD3>
+ <KEYWORD3>WtTimer</KEYWORD3>
+ <KEYWORD3>WwAlert</KEYWORD3>
+ <KEYWORD3>WwAlertPopdown</KEYWORD3>
+ <KEYWORD3>WwButtonBox</KEYWORD3>
+ <KEYWORD3>WwCallback</KEYWORD3>
+ <KEYWORD3>WwControlsBox</KEYWORD3>
+ <KEYWORD3>WwDialog</KEYWORD3>
+ <KEYWORD3>WwDrawing</KEYWORD3>
+ <KEYWORD3>WwFileSelection</KEYWORD3>
+ <KEYWORD3>WwGenericDialog</KEYWORD3>
+ <KEYWORD3>WwGetButton</KEYWORD3>
+ <KEYWORD3>WwGetKey</KEYWORD3>
+ <KEYWORD3>WwGetPosition</KEYWORD3>
+ <KEYWORD3>WwGetValue</KEYWORD3>
+ <KEYWORD3>WwHandler</KEYWORD3>
+ <KEYWORD3>WwInit</KEYWORD3>
+ <KEYWORD3>WwLayout</KEYWORD3>
+ <KEYWORD3>WwList</KEYWORD3>
+ <KEYWORD3>WwListUtils</KEYWORD3>
+ <KEYWORD3>WwLoop</KEYWORD3>
+ <KEYWORD3>WwMainWindow</KEYWORD3>
+ <KEYWORD3>WwMenuBar</KEYWORD3>
+ <KEYWORD3>WwMenuItem</KEYWORD3>
+ <KEYWORD3>WwMessage</KEYWORD3>
+ <KEYWORD3>WwMultiClickHandler</KEYWORD3>
+ <KEYWORD3>WwOptionMenu</KEYWORD3>
+ <KEYWORD3>WwPickFile</KEYWORD3>
+ <KEYWORD3>WwPopupMenu</KEYWORD3>
+ <KEYWORD3>WwPreview</KEYWORD3>
+ <KEYWORD3>WwPreviewUtils</KEYWORD3>
+ <KEYWORD3>WwRadioBox</KEYWORD3>
+ <KEYWORD3>WwResource</KEYWORD3>
+ <KEYWORD3>WwSeparator</KEYWORD3>
+ <KEYWORD3>WwSetCursor</KEYWORD3>
+ <KEYWORD3>WwSetValue</KEYWORD3>
+ <KEYWORD3>WwTable</KEYWORD3>
+ <KEYWORD3>WwTableUtils</KEYWORD3>
+ <KEYWORD3>WwText</KEYWORD3>
+ <KEYWORD3>WwTimer</KEYWORD3>
+ <KEYWORD3>WwToolBox</KEYWORD3>
+ <KEYWORD3>WzAnimate</KEYWORD3>
+ <KEYWORD3>WzColorEdit</KEYWORD3>
+ <KEYWORD3>WzContour</KEYWORD3>
+ <KEYWORD3>WzExport</KEYWORD3>
+ <KEYWORD3>WzHistogram</KEYWORD3>
+ <KEYWORD3>WzImage</KEYWORD3>
+ <KEYWORD3>WzImport</KEYWORD3>
+ <KEYWORD3>WzMultiView</KEYWORD3>
+ <KEYWORD3>WzPlot</KEYWORD3>
+ <KEYWORD3>WzPreview</KEYWORD3>
+ <KEYWORD3>WzSurface</KEYWORD3>
+ <KEYWORD3>WzTable</KEYWORD3>
+ <KEYWORD3>WzVariable</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/pyrex.xml b/jEdit/modes/pyrex.xml
index 4f47e31..3e32ff2 100644
--- a/jEdit/modes/pyrex.xml
+++ b/jEdit/modes/pyrex.xml
@@ -1,38 +1,38 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentNextLines" VALUE="\s*[^#]{3,}:\s*(#.*)?" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
-
- <IMPORT DELEGATE="python::MAIN"/>
-
- <KEYWORDS>
- <KEYWORD4>cdef</KEYWORD4>
- <KEYWORD4>char</KEYWORD4>
- <KEYWORD4>cinclude</KEYWORD4>
- <KEYWORD4>ctypedef</KEYWORD4>
- <KEYWORD4>double</KEYWORD4>
- <KEYWORD4>enum</KEYWORD4>
- <KEYWORD4>extern</KEYWORD4>
- <KEYWORD4>float</KEYWORD4>
- <KEYWORD4>include</KEYWORD4>
- <KEYWORD4>private</KEYWORD4>
- <KEYWORD4>public</KEYWORD4>
- <KEYWORD4>short</KEYWORD4>
- <KEYWORD4>signed</KEYWORD4>
- <KEYWORD4>sizeof</KEYWORD4>
- <KEYWORD4>struct</KEYWORD4>
- <KEYWORD4>union</KEYWORD4>
- <KEYWORD4>unsigned</KEYWORD4>
- <KEYWORD4>void</KEYWORD4>
-
- <LITERAL3>NULL</LITERAL3>
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentNextLines" VALUE="\s*[^#]{3,}:\s*(#.*)?" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+
+ <IMPORT DELEGATE="python::MAIN"/>
+
+ <KEYWORDS>
+ <KEYWORD4>cdef</KEYWORD4>
+ <KEYWORD4>char</KEYWORD4>
+ <KEYWORD4>cinclude</KEYWORD4>
+ <KEYWORD4>ctypedef</KEYWORD4>
+ <KEYWORD4>double</KEYWORD4>
+ <KEYWORD4>enum</KEYWORD4>
+ <KEYWORD4>extern</KEYWORD4>
+ <KEYWORD4>float</KEYWORD4>
+ <KEYWORD4>include</KEYWORD4>
+ <KEYWORD4>private</KEYWORD4>
+ <KEYWORD4>public</KEYWORD4>
+ <KEYWORD4>short</KEYWORD4>
+ <KEYWORD4>signed</KEYWORD4>
+ <KEYWORD4>sizeof</KEYWORD4>
+ <KEYWORD4>struct</KEYWORD4>
+ <KEYWORD4>union</KEYWORD4>
+ <KEYWORD4>unsigned</KEYWORD4>
+ <KEYWORD4>void</KEYWORD4>
+
+ <LITERAL3>NULL</LITERAL3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/python.xml b/jEdit/modes/python.xml
index 3397dad..08884d2 100644
--- a/jEdit/modes/python.xml
+++ b/jEdit/modes/python.xml
@@ -1,398 +1,398 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Python mode, by Slava Pestov. Based on PythonTokenMarker by -->
-<!-- Jonathan Revusky -->
-
-<!-- Modified 19-Jul-00 by Ivan Frohne to: -->
-<!-- (a) implement 'indentOnEnter'; -->
-<!-- (b) indent next line automatically after control structures followed -->
-<!-- by ':'; -->
-<!-- (c) make """ or ''' multiline quotes TYPE LITERAL2; -->
-<!-- (d) add TYPE FUNCTION identified by a following '(' -->
-<!-- (e) eliminate the '?' SEQ TYPE ('?' has no meaning in Python); -->
-<!-- (f) change the TYPE of 'and', 'or', and 'not' to KEYWORD1; and -->
-<!-- (g) add all builtin functions, builtin exceptions, -->
-<!-- builtin type methods, File object methods, and special type -->
-<!-- attributes as TYPE KEYWORD3. -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentNextLines" VALUE="\s*[^#]{3,}:\s*(#.*)?" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="{[" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}]" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="unindentNextLines" VALUE="^\s*(pass|else\s*:|elif\s.*:|except(\s.*)?:|finally\s*:)\s*(#.*)?$" />
- <PROPERTY NAME="unindentThisLine" VALUE="^\s*(else|elif\s.*|except(\s.*)?|finally)\s*:\s*(#.*)?" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="electricKeys" VALUE=":" />
- <PROPERTY NAME="ignoreWhitespace" VALUE="false" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comment -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- decorator -->
- <EOL_SPAN_REGEXP HASH_CHAR="@" AT_WORD_START="TRUE" TYPE="KEYWORD4">@\w</EOL_SPAN_REGEXP>
-
- <!-- Triple-quotes -->
- <SPAN TYPE="LITERAL2" DELEGATE="LITERAL_TWO">
- <BEGIN>"""</BEGIN>
- <END>"""</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL2" DELEGATE="LITERAL_TWO">
- <BEGIN>'''</BEGIN>
- <END>'''</END>
- </SPAN>
-
- <!-- Standard literals -->
- <SPAN TYPE="LITERAL1" DELEGATE="LITERAL_ONE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" DELEGATE="LITERAL_ONE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="KEYWORD1">:</SEQ>
-
- <MARK_PREVIOUS TYPE="FUNCTION"
- MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <!-- Reserved Words -->
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>assert</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>def</KEYWORD1>
- <KEYWORD1>del</KEYWORD1>
- <KEYWORD1>elif</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>except</KEYWORD1>
- <KEYWORD1>exec</KEYWORD1>
- <KEYWORD1>finally</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>from</KEYWORD1>
- <KEYWORD1>global</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>is</KEYWORD1>
- <KEYWORD1>lambda</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>pass</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>raise</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>reversed</KEYWORD1>
- <KEYWORD1>sorted</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
- <KEYWORD1>yield</KEYWORD1>
- <KEYWORD1>self</KEYWORD1>
-
- <!-- builtins -->
- <KEYWORD2>abs</KEYWORD2>
- <KEYWORD2>all</KEYWORD2>
- <KEYWORD2>any</KEYWORD2>
- <KEYWORD2>apply</KEYWORD2>
- <KEYWORD2>bool</KEYWORD2>
- <KEYWORD2>buffer</KEYWORD2>
- <KEYWORD2>callable</KEYWORD2>
- <KEYWORD2>chr</KEYWORD2>
- <KEYWORD2>classmethod</KEYWORD2>
- <KEYWORD2>cmp</KEYWORD2>
- <KEYWORD2>coerce</KEYWORD2>
- <KEYWORD2>compile</KEYWORD2>
- <KEYWORD2>complex</KEYWORD2>
- <KEYWORD2>delattr</KEYWORD2>
- <KEYWORD2>dict</KEYWORD2>
- <KEYWORD2>dir</KEYWORD2>
- <KEYWORD2>divmod</KEYWORD2>
- <KEYWORD2>enumerate</KEYWORD2>
- <KEYWORD2>eval</KEYWORD2>
- <KEYWORD2>execfile</KEYWORD2>
- <KEYWORD2>file</KEYWORD2>
- <KEYWORD2>filter</KEYWORD2>
- <KEYWORD2>float</KEYWORD2>
- <KEYWORD2>frozenset</KEYWORD2>
- <KEYWORD2>getattr</KEYWORD2>
- <KEYWORD2>globals</KEYWORD2>
- <KEYWORD2>hasattr</KEYWORD2>
- <KEYWORD2>hash</KEYWORD2>
- <KEYWORD2>hex</KEYWORD2>
- <KEYWORD2>id</KEYWORD2>
- <KEYWORD2>input</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>intern</KEYWORD2>
- <KEYWORD2>isinstance</KEYWORD2>
- <KEYWORD2>issubclass</KEYWORD2>
- <KEYWORD2>iter</KEYWORD2>
- <KEYWORD2>len</KEYWORD2>
- <KEYWORD2>list</KEYWORD2>
- <KEYWORD2>locals</KEYWORD2>
- <KEYWORD2>long</KEYWORD2>
- <KEYWORD2>map</KEYWORD2>
- <KEYWORD2>max</KEYWORD2>
- <KEYWORD2>min</KEYWORD2>
- <KEYWORD2>object</KEYWORD2>
- <KEYWORD2>oct</KEYWORD2>
- <KEYWORD2>open</KEYWORD2>
- <KEYWORD2>ord</KEYWORD2>
- <KEYWORD2>pow</KEYWORD2>
- <KEYWORD2>property</KEYWORD2>
- <KEYWORD2>range</KEYWORD2>
- <KEYWORD2>raw_input</KEYWORD2>
- <KEYWORD2>reduce</KEYWORD2>
- <KEYWORD2>reload</KEYWORD2>
- <KEYWORD2>repr</KEYWORD2>
- <KEYWORD2>round</KEYWORD2>
- <KEYWORD2>set</KEYWORD2>
- <KEYWORD2>setattr</KEYWORD2>
- <KEYWORD2>slice</KEYWORD2>
- <KEYWORD2>staticmethod</KEYWORD2>
- <KEYWORD2>str</KEYWORD2>
- <KEYWORD2>sum</KEYWORD2>
- <KEYWORD2>super</KEYWORD2>
- <KEYWORD2>tuple</KEYWORD2>
- <KEYWORD2>type</KEYWORD2>
- <KEYWORD2>unichr</KEYWORD2>
- <KEYWORD2>unicode</KEYWORD2>
- <KEYWORD2>vars</KEYWORD2>
- <KEYWORD2>xrange</KEYWORD2>
- <KEYWORD2>zip</KEYWORD2>
-
- <!-- exceptions -->
- <KEYWORD3>ArithmeticError</KEYWORD3>
- <KEYWORD3>AssertionError</KEYWORD3>
- <KEYWORD3>AttributeError</KEYWORD3>
- <KEYWORD3>DeprecationWarning</KEYWORD3>
- <KEYWORD3>EOFError</KEYWORD3>
- <KEYWORD3>EnvironmentError</KEYWORD3>
- <KEYWORD3>Exception</KEYWORD3>
- <KEYWORD3>FloatingPointError</KEYWORD3>
- <KEYWORD3>IOError</KEYWORD3>
- <KEYWORD3>ImportError</KEYWORD3>
- <KEYWORD3>IndentationError</KEYWORD3>
- <KEYWORD3>IndexError</KEYWORD3>
- <KEYWORD3>KeyError</KEYWORD3>
- <KEYWORD3>KeyboardInterrupt</KEYWORD3>
- <KEYWORD3>LookupError</KEYWORD3>
- <KEYWORD3>MemoryError</KEYWORD3>
- <KEYWORD3>NameError</KEYWORD3>
- <KEYWORD3>NotImplemented</KEYWORD3>
- <KEYWORD3>NotImplementedError</KEYWORD3>
- <KEYWORD3>OSError</KEYWORD3>
- <KEYWORD3>OverflowError</KEYWORD3>
- <KEYWORD3>OverflowWarning</KEYWORD3>
- <KEYWORD3>ReferenceError</KEYWORD3>
- <KEYWORD3>RuntimeError</KEYWORD3>
- <KEYWORD3>RuntimeWarning</KEYWORD3>
- <KEYWORD3>StandardError</KEYWORD3>
- <KEYWORD3>StopIteration</KEYWORD3>
- <KEYWORD3>SyntaxError</KEYWORD3>
- <KEYWORD3>SyntaxWarning</KEYWORD3>
- <KEYWORD3>SystemError</KEYWORD3>
- <KEYWORD3>SystemExit</KEYWORD3>
- <KEYWORD3>TabError</KEYWORD3>
- <KEYWORD3>TypeError</KEYWORD3>
- <KEYWORD3>UnboundLocalError</KEYWORD3>
- <KEYWORD3>UnicodeError</KEYWORD3>
- <KEYWORD3>UserWarning</KEYWORD3>
- <KEYWORD3>ValueError</KEYWORD3>
- <KEYWORD3>Warning</KEYWORD3>
- <KEYWORD3>WindowsError</KEYWORD3>
- <KEYWORD3>ZeroDivisionError</KEYWORD3>
-
- <!-- types (from types module) -->
- <KEYWORD3>BufferType</KEYWORD3>
- <KEYWORD3>BuiltinFunctionType</KEYWORD3>
- <KEYWORD3>BuiltinMethodType</KEYWORD3>
- <KEYWORD3>ClassType</KEYWORD3>
- <KEYWORD3>CodeType</KEYWORD3>
- <KEYWORD3>ComplexType</KEYWORD3>
- <KEYWORD3>DictProxyType</KEYWORD3>
- <KEYWORD3>DictType</KEYWORD3>
- <KEYWORD3>DictionaryType</KEYWORD3>
- <KEYWORD3>EllipsisType</KEYWORD3>
- <KEYWORD3>FileType</KEYWORD3>
- <KEYWORD3>FloatType</KEYWORD3>
- <KEYWORD3>FrameType</KEYWORD3>
- <KEYWORD3>FunctionType</KEYWORD3>
- <KEYWORD3>GeneratorType</KEYWORD3>
- <KEYWORD3>InstanceType</KEYWORD3>
- <KEYWORD3>IntType</KEYWORD3>
- <KEYWORD3>LambdaType</KEYWORD3>
- <KEYWORD3>ListType</KEYWORD3>
- <KEYWORD3>LongType</KEYWORD3>
- <KEYWORD3>MethodType</KEYWORD3>
- <KEYWORD3>ModuleType</KEYWORD3>
- <KEYWORD3>NoneType</KEYWORD3>
- <KEYWORD3>ObjectType</KEYWORD3>
- <KEYWORD3>SliceType</KEYWORD3>
- <KEYWORD3>StringType</KEYWORD3>
- <KEYWORD3>StringTypes</KEYWORD3>
- <KEYWORD3>TracebackType</KEYWORD3>
- <KEYWORD3>TupleType</KEYWORD3>
- <KEYWORD3>TypeType</KEYWORD3>
- <KEYWORD3>UnboundMethodType</KEYWORD3>
- <KEYWORD3>UnicodeType</KEYWORD3>
- <KEYWORD3>XRangeType</KEYWORD3>
-
- <KEYWORD3>False</KEYWORD3>
- <KEYWORD3>None</KEYWORD3>
- <KEYWORD3>True</KEYWORD3>
-
- <KEYWORD3>__abs__</KEYWORD3>
- <KEYWORD3>__add__</KEYWORD3>
- <KEYWORD3>__all__</KEYWORD3>
- <KEYWORD3>__author__</KEYWORD3>
- <KEYWORD3>__bases__</KEYWORD3>
- <KEYWORD3>__builtins__</KEYWORD3>
- <KEYWORD3>__call__</KEYWORD3>
- <KEYWORD3>__class__</KEYWORD3>
- <KEYWORD3>__cmp__</KEYWORD3>
- <KEYWORD3>__coerce__</KEYWORD3>
- <KEYWORD3>__contains__</KEYWORD3>
- <KEYWORD3>__debug__</KEYWORD3>
- <KEYWORD3>__del__</KEYWORD3>
- <KEYWORD3>__delattr__</KEYWORD3>
- <KEYWORD3>__delitem__</KEYWORD3>
- <KEYWORD3>__delslice__</KEYWORD3>
- <KEYWORD3>__dict__</KEYWORD3>
- <KEYWORD3>__div__</KEYWORD3>
- <KEYWORD3>__divmod__</KEYWORD3>
- <KEYWORD3>__doc__</KEYWORD3>
- <KEYWORD3>__docformat__</KEYWORD3>
- <KEYWORD3>__eq__</KEYWORD3>
- <KEYWORD3>__file__</KEYWORD3>
- <KEYWORD3>__float__</KEYWORD3>
- <KEYWORD3>__floordiv__</KEYWORD3>
- <KEYWORD3>__future__</KEYWORD3>
- <KEYWORD3>__ge__</KEYWORD3>
- <KEYWORD3>__getattr__</KEYWORD3>
- <KEYWORD3>__getattribute__</KEYWORD3>
- <KEYWORD3>__getitem__</KEYWORD3>
- <KEYWORD3>__getslice__</KEYWORD3>
- <KEYWORD3>__gt__</KEYWORD3>
- <KEYWORD3>__hash__</KEYWORD3>
- <KEYWORD3>__hex__</KEYWORD3>
- <KEYWORD3>__iadd__</KEYWORD3>
- <KEYWORD3>__import__</KEYWORD3>
- <KEYWORD3>__imul__</KEYWORD3>
- <KEYWORD3>__init__</KEYWORD3>
- <KEYWORD3>__int__</KEYWORD3>
- <KEYWORD3>__invert__</KEYWORD3>
- <KEYWORD3>__iter__</KEYWORD3>
- <KEYWORD3>__le__</KEYWORD3>
- <KEYWORD3>__len__</KEYWORD3>
- <KEYWORD3>__long__</KEYWORD3>
- <KEYWORD3>__lshift__</KEYWORD3>
- <KEYWORD3>__lt__</KEYWORD3>
- <KEYWORD3>__members__</KEYWORD3>
- <KEYWORD3>__metaclass__</KEYWORD3>
- <KEYWORD3>__mod__</KEYWORD3>
- <KEYWORD3>__mro__</KEYWORD3>
- <KEYWORD3>__mul__</KEYWORD3>
- <KEYWORD3>__name__</KEYWORD3>
- <KEYWORD3>__ne__</KEYWORD3>
- <KEYWORD3>__neg__</KEYWORD3>
- <KEYWORD3>__new__</KEYWORD3>
- <KEYWORD3>__nonzero__</KEYWORD3>
- <KEYWORD3>__oct__</KEYWORD3>
- <KEYWORD3>__or__</KEYWORD3>
- <KEYWORD3>__path__</KEYWORD3>
- <KEYWORD3>__pos__</KEYWORD3>
- <KEYWORD3>__pow__</KEYWORD3>
- <KEYWORD3>__radd__</KEYWORD3>
- <KEYWORD3>__rdiv__</KEYWORD3>
- <KEYWORD3>__rdivmod__</KEYWORD3>
- <KEYWORD3>__reduce__</KEYWORD3>
- <KEYWORD3>__repr__</KEYWORD3>
- <KEYWORD3>__rfloordiv__</KEYWORD3>
- <KEYWORD3>__rlshift__</KEYWORD3>
- <KEYWORD3>__rmod__</KEYWORD3>
- <KEYWORD3>__rmul__</KEYWORD3>
- <KEYWORD3>__ror__</KEYWORD3>
- <KEYWORD3>__rpow__</KEYWORD3>
- <KEYWORD3>__rrshift__</KEYWORD3>
- <KEYWORD3>__rsub__</KEYWORD3>
- <KEYWORD3>__rtruediv__</KEYWORD3>
- <KEYWORD3>__rxor__</KEYWORD3>
- <KEYWORD3>__setattr__</KEYWORD3>
- <KEYWORD3>__setitem__</KEYWORD3>
- <KEYWORD3>__setslice__</KEYWORD3>
- <KEYWORD3>__self__</KEYWORD3>
- <KEYWORD3>__slots__</KEYWORD3>
- <KEYWORD3>__str__</KEYWORD3>
- <KEYWORD3>__sub__</KEYWORD3>
- <KEYWORD3>__truediv__</KEYWORD3>
- <KEYWORD3>__version__</KEYWORD3>
- <KEYWORD3>__xor__</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <!-- rulesets to syntax highlight string interpolation sequences -->
- <RULES SET="LITERAL_ONE" DEFAULT="LITERAL1" ESCAPE="\">
- <SEQ_REGEXP HASH_CHAR="%" TYPE="LITERAL4">%[.]?\d*[diouxXeEfFgGcrs]</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="%(" TYPE="LITERAL4">%\([^)]+\)[+ -]?\d*[diouxXeEfFgGcrs]</SEQ_REGEXP>
- </RULES>
- <!-- triple-quoted strings has its own, since it's LITERAL2 by default -->
- <RULES SET="LITERAL_TWO" DEFAULT="LITERAL2" ESCAPE="\">
- <SEQ_REGEXP HASH_CHAR="%" TYPE="LITERAL4">%\d*[diouxXeEfFgGcrs]</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="%(" TYPE="LITERAL4">%\([^)]+\)[+ -]?\d*[diouxXeEfFgGcrs]</SEQ_REGEXP>
- <SPAN TYPE="LITERAL3">
- <BEGIN>B{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3">
- <BEGIN>C{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3">
- <BEGIN>E{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3">
- <BEGIN>I{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN TYPE="LITERAL3">
- <BEGIN>L{</BEGIN>
- <END>}</END>
- </SPAN>
- <!--
- <EOL_SPAN AT_WHITESPACE_END="TRUE" DELEGATE="python::MAIN" TYPE="LITERAL3">>>></EOL_SPAN>
- <EOL_SPAN AT_WHITESPACE_END="TRUE" DELEGATE="python::MAIN" TYPE="LITERAL3">...</EOL_SPAN>
- -->
- <EOL_SPAN AT_WHITESPACE_END="TRUE" TYPE="LITERAL3">>>></EOL_SPAN>
- <EOL_SPAN AT_WHITESPACE_END="TRUE" TYPE="LITERAL3">...</EOL_SPAN>
- <MARK_FOLLOWING TYPE="LITERAL3" AT_WHITESPACE_END="TRUE">@</MARK_FOLLOWING>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Python mode, by Slava Pestov. Based on PythonTokenMarker by -->
+<!-- Jonathan Revusky -->
+
+<!-- Modified 19-Jul-00 by Ivan Frohne to: -->
+<!-- (a) implement 'indentOnEnter'; -->
+<!-- (b) indent next line automatically after control structures followed -->
+<!-- by ':'; -->
+<!-- (c) make """ or ''' multiline quotes TYPE LITERAL2; -->
+<!-- (d) add TYPE FUNCTION identified by a following '(' -->
+<!-- (e) eliminate the '?' SEQ TYPE ('?' has no meaning in Python); -->
+<!-- (f) change the TYPE of 'and', 'or', and 'not' to KEYWORD1; and -->
+<!-- (g) add all builtin functions, builtin exceptions, -->
+<!-- builtin type methods, File object methods, and special type -->
+<!-- attributes as TYPE KEYWORD3. -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentNextLines" VALUE="\s*[^#]{3,}:\s*(#.*)?" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{[" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}]" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="unindentNextLines" VALUE="^\s*(pass|else\s*:|elif\s.*:|except(\s.*)?:|finally\s*:)\s*(#.*)?$" />
+ <PROPERTY NAME="unindentThisLine" VALUE="^\s*(else|elif\s.*|except(\s.*)?|finally)\s*:\s*(#.*)?" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="electricKeys" VALUE=":" />
+ <PROPERTY NAME="ignoreWhitespace" VALUE="false" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comment -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- decorator -->
+ <EOL_SPAN_REGEXP HASH_CHAR="@" AT_WORD_START="TRUE" TYPE="KEYWORD4">@\w</EOL_SPAN_REGEXP>
+
+ <!-- Triple-quotes -->
+ <SPAN TYPE="LITERAL2" DELEGATE="LITERAL_TWO">
+ <BEGIN>"""</BEGIN>
+ <END>"""</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL2" DELEGATE="LITERAL_TWO">
+ <BEGIN>'''</BEGIN>
+ <END>'''</END>
+ </SPAN>
+
+ <!-- Standard literals -->
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL_ONE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL_ONE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="KEYWORD1">:</SEQ>
+
+ <MARK_PREVIOUS TYPE="FUNCTION"
+ MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <!-- Reserved Words -->
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>assert</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>def</KEYWORD1>
+ <KEYWORD1>del</KEYWORD1>
+ <KEYWORD1>elif</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>except</KEYWORD1>
+ <KEYWORD1>exec</KEYWORD1>
+ <KEYWORD1>finally</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>from</KEYWORD1>
+ <KEYWORD1>global</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>is</KEYWORD1>
+ <KEYWORD1>lambda</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>pass</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>raise</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>reversed</KEYWORD1>
+ <KEYWORD1>sorted</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+ <KEYWORD1>yield</KEYWORD1>
+ <KEYWORD1>self</KEYWORD1>
+
+ <!-- builtins -->
+ <KEYWORD2>abs</KEYWORD2>
+ <KEYWORD2>all</KEYWORD2>
+ <KEYWORD2>any</KEYWORD2>
+ <KEYWORD2>apply</KEYWORD2>
+ <KEYWORD2>bool</KEYWORD2>
+ <KEYWORD2>buffer</KEYWORD2>
+ <KEYWORD2>callable</KEYWORD2>
+ <KEYWORD2>chr</KEYWORD2>
+ <KEYWORD2>classmethod</KEYWORD2>
+ <KEYWORD2>cmp</KEYWORD2>
+ <KEYWORD2>coerce</KEYWORD2>
+ <KEYWORD2>compile</KEYWORD2>
+ <KEYWORD2>complex</KEYWORD2>
+ <KEYWORD2>delattr</KEYWORD2>
+ <KEYWORD2>dict</KEYWORD2>
+ <KEYWORD2>dir</KEYWORD2>
+ <KEYWORD2>divmod</KEYWORD2>
+ <KEYWORD2>enumerate</KEYWORD2>
+ <KEYWORD2>eval</KEYWORD2>
+ <KEYWORD2>execfile</KEYWORD2>
+ <KEYWORD2>file</KEYWORD2>
+ <KEYWORD2>filter</KEYWORD2>
+ <KEYWORD2>float</KEYWORD2>
+ <KEYWORD2>frozenset</KEYWORD2>
+ <KEYWORD2>getattr</KEYWORD2>
+ <KEYWORD2>globals</KEYWORD2>
+ <KEYWORD2>hasattr</KEYWORD2>
+ <KEYWORD2>hash</KEYWORD2>
+ <KEYWORD2>hex</KEYWORD2>
+ <KEYWORD2>id</KEYWORD2>
+ <KEYWORD2>input</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>intern</KEYWORD2>
+ <KEYWORD2>isinstance</KEYWORD2>
+ <KEYWORD2>issubclass</KEYWORD2>
+ <KEYWORD2>iter</KEYWORD2>
+ <KEYWORD2>len</KEYWORD2>
+ <KEYWORD2>list</KEYWORD2>
+ <KEYWORD2>locals</KEYWORD2>
+ <KEYWORD2>long</KEYWORD2>
+ <KEYWORD2>map</KEYWORD2>
+ <KEYWORD2>max</KEYWORD2>
+ <KEYWORD2>min</KEYWORD2>
+ <KEYWORD2>object</KEYWORD2>
+ <KEYWORD2>oct</KEYWORD2>
+ <KEYWORD2>open</KEYWORD2>
+ <KEYWORD2>ord</KEYWORD2>
+ <KEYWORD2>pow</KEYWORD2>
+ <KEYWORD2>property</KEYWORD2>
+ <KEYWORD2>range</KEYWORD2>
+ <KEYWORD2>raw_input</KEYWORD2>
+ <KEYWORD2>reduce</KEYWORD2>
+ <KEYWORD2>reload</KEYWORD2>
+ <KEYWORD2>repr</KEYWORD2>
+ <KEYWORD2>round</KEYWORD2>
+ <KEYWORD2>set</KEYWORD2>
+ <KEYWORD2>setattr</KEYWORD2>
+ <KEYWORD2>slice</KEYWORD2>
+ <KEYWORD2>staticmethod</KEYWORD2>
+ <KEYWORD2>str</KEYWORD2>
+ <KEYWORD2>sum</KEYWORD2>
+ <KEYWORD2>super</KEYWORD2>
+ <KEYWORD2>tuple</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>unichr</KEYWORD2>
+ <KEYWORD2>unicode</KEYWORD2>
+ <KEYWORD2>vars</KEYWORD2>
+ <KEYWORD2>xrange</KEYWORD2>
+ <KEYWORD2>zip</KEYWORD2>
+
+ <!-- exceptions -->
+ <KEYWORD3>ArithmeticError</KEYWORD3>
+ <KEYWORD3>AssertionError</KEYWORD3>
+ <KEYWORD3>AttributeError</KEYWORD3>
+ <KEYWORD3>DeprecationWarning</KEYWORD3>
+ <KEYWORD3>EOFError</KEYWORD3>
+ <KEYWORD3>EnvironmentError</KEYWORD3>
+ <KEYWORD3>Exception</KEYWORD3>
+ <KEYWORD3>FloatingPointError</KEYWORD3>
+ <KEYWORD3>IOError</KEYWORD3>
+ <KEYWORD3>ImportError</KEYWORD3>
+ <KEYWORD3>IndentationError</KEYWORD3>
+ <KEYWORD3>IndexError</KEYWORD3>
+ <KEYWORD3>KeyError</KEYWORD3>
+ <KEYWORD3>KeyboardInterrupt</KEYWORD3>
+ <KEYWORD3>LookupError</KEYWORD3>
+ <KEYWORD3>MemoryError</KEYWORD3>
+ <KEYWORD3>NameError</KEYWORD3>
+ <KEYWORD3>NotImplemented</KEYWORD3>
+ <KEYWORD3>NotImplementedError</KEYWORD3>
+ <KEYWORD3>OSError</KEYWORD3>
+ <KEYWORD3>OverflowError</KEYWORD3>
+ <KEYWORD3>OverflowWarning</KEYWORD3>
+ <KEYWORD3>ReferenceError</KEYWORD3>
+ <KEYWORD3>RuntimeError</KEYWORD3>
+ <KEYWORD3>RuntimeWarning</KEYWORD3>
+ <KEYWORD3>StandardError</KEYWORD3>
+ <KEYWORD3>StopIteration</KEYWORD3>
+ <KEYWORD3>SyntaxError</KEYWORD3>
+ <KEYWORD3>SyntaxWarning</KEYWORD3>
+ <KEYWORD3>SystemError</KEYWORD3>
+ <KEYWORD3>SystemExit</KEYWORD3>
+ <KEYWORD3>TabError</KEYWORD3>
+ <KEYWORD3>TypeError</KEYWORD3>
+ <KEYWORD3>UnboundLocalError</KEYWORD3>
+ <KEYWORD3>UnicodeError</KEYWORD3>
+ <KEYWORD3>UserWarning</KEYWORD3>
+ <KEYWORD3>ValueError</KEYWORD3>
+ <KEYWORD3>Warning</KEYWORD3>
+ <KEYWORD3>WindowsError</KEYWORD3>
+ <KEYWORD3>ZeroDivisionError</KEYWORD3>
+
+ <!-- types (from types module) -->
+ <KEYWORD3>BufferType</KEYWORD3>
+ <KEYWORD3>BuiltinFunctionType</KEYWORD3>
+ <KEYWORD3>BuiltinMethodType</KEYWORD3>
+ <KEYWORD3>ClassType</KEYWORD3>
+ <KEYWORD3>CodeType</KEYWORD3>
+ <KEYWORD3>ComplexType</KEYWORD3>
+ <KEYWORD3>DictProxyType</KEYWORD3>
+ <KEYWORD3>DictType</KEYWORD3>
+ <KEYWORD3>DictionaryType</KEYWORD3>
+ <KEYWORD3>EllipsisType</KEYWORD3>
+ <KEYWORD3>FileType</KEYWORD3>
+ <KEYWORD3>FloatType</KEYWORD3>
+ <KEYWORD3>FrameType</KEYWORD3>
+ <KEYWORD3>FunctionType</KEYWORD3>
+ <KEYWORD3>GeneratorType</KEYWORD3>
+ <KEYWORD3>InstanceType</KEYWORD3>
+ <KEYWORD3>IntType</KEYWORD3>
+ <KEYWORD3>LambdaType</KEYWORD3>
+ <KEYWORD3>ListType</KEYWORD3>
+ <KEYWORD3>LongType</KEYWORD3>
+ <KEYWORD3>MethodType</KEYWORD3>
+ <KEYWORD3>ModuleType</KEYWORD3>
+ <KEYWORD3>NoneType</KEYWORD3>
+ <KEYWORD3>ObjectType</KEYWORD3>
+ <KEYWORD3>SliceType</KEYWORD3>
+ <KEYWORD3>StringType</KEYWORD3>
+ <KEYWORD3>StringTypes</KEYWORD3>
+ <KEYWORD3>TracebackType</KEYWORD3>
+ <KEYWORD3>TupleType</KEYWORD3>
+ <KEYWORD3>TypeType</KEYWORD3>
+ <KEYWORD3>UnboundMethodType</KEYWORD3>
+ <KEYWORD3>UnicodeType</KEYWORD3>
+ <KEYWORD3>XRangeType</KEYWORD3>
+
+ <KEYWORD3>False</KEYWORD3>
+ <KEYWORD3>None</KEYWORD3>
+ <KEYWORD3>True</KEYWORD3>
+
+ <KEYWORD3>__abs__</KEYWORD3>
+ <KEYWORD3>__add__</KEYWORD3>
+ <KEYWORD3>__all__</KEYWORD3>
+ <KEYWORD3>__author__</KEYWORD3>
+ <KEYWORD3>__bases__</KEYWORD3>
+ <KEYWORD3>__builtins__</KEYWORD3>
+ <KEYWORD3>__call__</KEYWORD3>
+ <KEYWORD3>__class__</KEYWORD3>
+ <KEYWORD3>__cmp__</KEYWORD3>
+ <KEYWORD3>__coerce__</KEYWORD3>
+ <KEYWORD3>__contains__</KEYWORD3>
+ <KEYWORD3>__debug__</KEYWORD3>
+ <KEYWORD3>__del__</KEYWORD3>
+ <KEYWORD3>__delattr__</KEYWORD3>
+ <KEYWORD3>__delitem__</KEYWORD3>
+ <KEYWORD3>__delslice__</KEYWORD3>
+ <KEYWORD3>__dict__</KEYWORD3>
+ <KEYWORD3>__div__</KEYWORD3>
+ <KEYWORD3>__divmod__</KEYWORD3>
+ <KEYWORD3>__doc__</KEYWORD3>
+ <KEYWORD3>__docformat__</KEYWORD3>
+ <KEYWORD3>__eq__</KEYWORD3>
+ <KEYWORD3>__file__</KEYWORD3>
+ <KEYWORD3>__float__</KEYWORD3>
+ <KEYWORD3>__floordiv__</KEYWORD3>
+ <KEYWORD3>__future__</KEYWORD3>
+ <KEYWORD3>__ge__</KEYWORD3>
+ <KEYWORD3>__getattr__</KEYWORD3>
+ <KEYWORD3>__getattribute__</KEYWORD3>
+ <KEYWORD3>__getitem__</KEYWORD3>
+ <KEYWORD3>__getslice__</KEYWORD3>
+ <KEYWORD3>__gt__</KEYWORD3>
+ <KEYWORD3>__hash__</KEYWORD3>
+ <KEYWORD3>__hex__</KEYWORD3>
+ <KEYWORD3>__iadd__</KEYWORD3>
+ <KEYWORD3>__import__</KEYWORD3>
+ <KEYWORD3>__imul__</KEYWORD3>
+ <KEYWORD3>__init__</KEYWORD3>
+ <KEYWORD3>__int__</KEYWORD3>
+ <KEYWORD3>__invert__</KEYWORD3>
+ <KEYWORD3>__iter__</KEYWORD3>
+ <KEYWORD3>__le__</KEYWORD3>
+ <KEYWORD3>__len__</KEYWORD3>
+ <KEYWORD3>__long__</KEYWORD3>
+ <KEYWORD3>__lshift__</KEYWORD3>
+ <KEYWORD3>__lt__</KEYWORD3>
+ <KEYWORD3>__members__</KEYWORD3>
+ <KEYWORD3>__metaclass__</KEYWORD3>
+ <KEYWORD3>__mod__</KEYWORD3>
+ <KEYWORD3>__mro__</KEYWORD3>
+ <KEYWORD3>__mul__</KEYWORD3>
+ <KEYWORD3>__name__</KEYWORD3>
+ <KEYWORD3>__ne__</KEYWORD3>
+ <KEYWORD3>__neg__</KEYWORD3>
+ <KEYWORD3>__new__</KEYWORD3>
+ <KEYWORD3>__nonzero__</KEYWORD3>
+ <KEYWORD3>__oct__</KEYWORD3>
+ <KEYWORD3>__or__</KEYWORD3>
+ <KEYWORD3>__path__</KEYWORD3>
+ <KEYWORD3>__pos__</KEYWORD3>
+ <KEYWORD3>__pow__</KEYWORD3>
+ <KEYWORD3>__radd__</KEYWORD3>
+ <KEYWORD3>__rdiv__</KEYWORD3>
+ <KEYWORD3>__rdivmod__</KEYWORD3>
+ <KEYWORD3>__reduce__</KEYWORD3>
+ <KEYWORD3>__repr__</KEYWORD3>
+ <KEYWORD3>__rfloordiv__</KEYWORD3>
+ <KEYWORD3>__rlshift__</KEYWORD3>
+ <KEYWORD3>__rmod__</KEYWORD3>
+ <KEYWORD3>__rmul__</KEYWORD3>
+ <KEYWORD3>__ror__</KEYWORD3>
+ <KEYWORD3>__rpow__</KEYWORD3>
+ <KEYWORD3>__rrshift__</KEYWORD3>
+ <KEYWORD3>__rsub__</KEYWORD3>
+ <KEYWORD3>__rtruediv__</KEYWORD3>
+ <KEYWORD3>__rxor__</KEYWORD3>
+ <KEYWORD3>__setattr__</KEYWORD3>
+ <KEYWORD3>__setitem__</KEYWORD3>
+ <KEYWORD3>__setslice__</KEYWORD3>
+ <KEYWORD3>__self__</KEYWORD3>
+ <KEYWORD3>__slots__</KEYWORD3>
+ <KEYWORD3>__str__</KEYWORD3>
+ <KEYWORD3>__sub__</KEYWORD3>
+ <KEYWORD3>__truediv__</KEYWORD3>
+ <KEYWORD3>__version__</KEYWORD3>
+ <KEYWORD3>__xor__</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- rulesets to syntax highlight string interpolation sequences -->
+ <RULES SET="LITERAL_ONE" DEFAULT="LITERAL1" ESCAPE="\">
+ <SEQ_REGEXP HASH_CHAR="%" TYPE="LITERAL4">%[.]?\d*[diouxXeEfFgGcrs]</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="%(" TYPE="LITERAL4">%\([^)]+\)[+ -]?\d*[diouxXeEfFgGcrs]</SEQ_REGEXP>
+ </RULES>
+ <!-- triple-quoted strings has its own, since it's LITERAL2 by default -->
+ <RULES SET="LITERAL_TWO" DEFAULT="LITERAL2" ESCAPE="\">
+ <SEQ_REGEXP HASH_CHAR="%" TYPE="LITERAL4">%\d*[diouxXeEfFgGcrs]</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="%(" TYPE="LITERAL4">%\([^)]+\)[+ -]?\d*[diouxXeEfFgGcrs]</SEQ_REGEXP>
+ <SPAN TYPE="LITERAL3">
+ <BEGIN>B{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3">
+ <BEGIN>C{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3">
+ <BEGIN>E{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3">
+ <BEGIN>I{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL3">
+ <BEGIN>L{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <!--
+ <EOL_SPAN AT_WHITESPACE_END="TRUE" DELEGATE="python::MAIN" TYPE="LITERAL3">>>></EOL_SPAN>
+ <EOL_SPAN AT_WHITESPACE_END="TRUE" DELEGATE="python::MAIN" TYPE="LITERAL3">...</EOL_SPAN>
+ -->
+ <EOL_SPAN AT_WHITESPACE_END="TRUE" TYPE="LITERAL3">>>></EOL_SPAN>
+ <EOL_SPAN AT_WHITESPACE_END="TRUE" TYPE="LITERAL3">...</EOL_SPAN>
+ <MARK_FOLLOWING TYPE="LITERAL3" AT_WHITESPACE_END="TRUE">@</MARK_FOLLOWING>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/quake.xml b/jEdit/modes/quake.xml
index 08af289..1d516f3 100644
--- a/jEdit/modes/quake.xml
+++ b/jEdit/modes/quake.xml
@@ -1,485 +1,485 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- Quake mode by Marcus Augustine <mail [at] ma [dash] online [dot] net>
--->
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE">
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <KEYWORDS>
- <KEYWORD2>+attack</KEYWORD2>
- <KEYWORD2>+back</KEYWORD2>
- <KEYWORD2>+forward</KEYWORD2>
- <KEYWORD2>+klook</KEYWORD2>
- <KEYWORD2>+left</KEYWORD2>
- <KEYWORD2>+lookdown</KEYWORD2>
- <KEYWORD2>+lookup</KEYWORD2>
- <KEYWORD2>+mlook</KEYWORD2>
- <KEYWORD2>+movedown</KEYWORD2>
- <KEYWORD2>+moveleft</KEYWORD2>
- <KEYWORD2>+moveright</KEYWORD2>
- <KEYWORD2>+moveup</KEYWORD2>
- <KEYWORD2>+right</KEYWORD2>
- <KEYWORD2>+speed</KEYWORD2>
- <KEYWORD2>+strafe</KEYWORD2>
- <KEYWORD2>+use</KEYWORD2>
- <KEYWORD2>-attack</KEYWORD2>
- <KEYWORD2>-back</KEYWORD2>
- <KEYWORD2>-forward</KEYWORD2>
- <KEYWORD2>-klook</KEYWORD2>
- <KEYWORD2>-left</KEYWORD2>
- <KEYWORD2>-lookdown</KEYWORD2>
- <KEYWORD2>-lookup</KEYWORD2>
- <KEYWORD2>-mlook</KEYWORD2>
- <KEYWORD2>-movedown</KEYWORD2>
- <KEYWORD2>-moveleft</KEYWORD2>
- <KEYWORD2>-moveright</KEYWORD2>
- <KEYWORD2>-moveup</KEYWORD2>
- <KEYWORD2>-right</KEYWORD2>
- <KEYWORD2>-speed</KEYWORD2>
- <KEYWORD2>-strafe</KEYWORD2>
- <KEYWORD2>-use</KEYWORD2>
- <KEYWORD3>adr0</KEYWORD3>
- <KEYWORD3>adr1</KEYWORD3>
- <KEYWORD3>adr2</KEYWORD3>
- <KEYWORD3>adr3</KEYWORD3>
- <KEYWORD3>adr4</KEYWORD3>
- <KEYWORD3>adr5</KEYWORD3>
- <KEYWORD3>adr6</KEYWORD3>
- <KEYWORD3>adr7</KEYWORD3>
- <KEYWORD3>adr8</KEYWORD3>
- <KEYWORD3>alias</KEYWORD3>
- <KEYWORD3>allow_download</KEYWORD3>
- <KEYWORD3>allow_download_maps</KEYWORD3>
- <KEYWORD3>allow_download_models</KEYWORD3>
- <KEYWORD3>allow_download_players</KEYWORD3>
- <KEYWORD3>allow_download_sounds</KEYWORD3>
- <KEYWORD3>basedir</KEYWORD3>
- <KEYWORD1>bind</KEYWORD1>
- <KEYWORD3>bindlist</KEYWORD3>
- <KEYWORD3>bob_pitch</KEYWORD3>
- <KEYWORD3>bob_roll</KEYWORD3>
- <KEYWORD3>bob_up</KEYWORD3>
- <KEYWORD3>cd</KEYWORD3>
- <KEYWORD3>cd_loopcount</KEYWORD3>
- <KEYWORD3>cd_looptrack</KEYWORD3>
- <KEYWORD3>cd_nocd</KEYWORD3>
- <KEYWORD3>cddir</KEYWORD3>
- <KEYWORD3>centerview</KEYWORD3>
- <KEYWORD3>changing</KEYWORD3>
- <KEYWORD3>cheats</KEYWORD3>
- <KEYWORD3>cl_anglespeedkey</KEYWORD3>
- <KEYWORD3>cl_autoskins</KEYWORD3>
- <KEYWORD3>cl_blend</KEYWORD3>
- <KEYWORD3>cl_entities</KEYWORD3>
- <KEYWORD3>cl_footsteps</KEYWORD3>
- <KEYWORD3>cl_forwardspeed</KEYWORD3>
- <KEYWORD3>cl_gun</KEYWORD3>
- <KEYWORD3>cl_lights</KEYWORD3>
- <KEYWORD3>cl_maxfps</KEYWORD3>
- <KEYWORD3>cl_nodelta</KEYWORD3>
- <KEYWORD3>cl_noskins</KEYWORD3>
- <KEYWORD3>cl_particles</KEYWORD3>
- <KEYWORD3>cl_pitchspeed</KEYWORD3>
- <KEYWORD3>cl_predict</KEYWORD3>
- <KEYWORD3>cl_run</KEYWORD3>
- <KEYWORD3>cl_showmiss</KEYWORD3>
- <KEYWORD3>cl_shownet</KEYWORD3>
- <KEYWORD3>cl_sidespeed</KEYWORD3>
- <KEYWORD3>cl_stats</KEYWORD3>
- <KEYWORD3>cl_stereo</KEYWORD3>
- <KEYWORD3>cl_stereo_separation</KEYWORD3>
- <KEYWORD3>cl_testblend</KEYWORD3>
- <KEYWORD3>cl_testentities</KEYWORD3>
- <KEYWORD3>cl_testlights</KEYWORD3>
- <KEYWORD3>cl_testparticles</KEYWORD3>
- <KEYWORD3>cl_timeout</KEYWORD3>
- <KEYWORD3>cl_upspeed</KEYWORD3>
- <KEYWORD3>cl_vwep</KEYWORD3>
- <KEYWORD3>cl_yawspeed</KEYWORD3>
- <KEYWORD3>clear</KEYWORD3>
- <KEYWORD3>clientport</KEYWORD3>
- <KEYWORD3>cmd</KEYWORD3>
- <KEYWORD3>cmdlist</KEYWORD3>
- <KEYWORD3>con_notifytime</KEYWORD3>
- <KEYWORD3>condump</KEYWORD3>
- <KEYWORD3>connect</KEYWORD3>
- <KEYWORD3>coop</KEYWORD3>
- <KEYWORD3>crosshair</KEYWORD3>
- <KEYWORD3>cvarlist</KEYWORD3>
- <KEYWORD3>deathmatch</KEYWORD3>
- <KEYWORD3>debuggraph</KEYWORD3>
- <KEYWORD3>dedicated</KEYWORD3>
- <KEYWORD3>demomap</KEYWORD3>
- <KEYWORD3>developer</KEYWORD3>
- <KEYWORD3>dir</KEYWORD3>
- <KEYWORD3>disconnect</KEYWORD3>
- <KEYWORD3>dmflags</KEYWORD3>
- <KEYWORD3>download</KEYWORD3>
- <KEYWORD3>drop</KEYWORD3>
- <KEYWORD3>dumpuser</KEYWORD3>
- <KEYWORD3>echo</KEYWORD3>
- <KEYWORD3>error</KEYWORD3>
- <KEYWORD3>exec</KEYWORD3>
- <KEYWORD3>filterban</KEYWORD3>
- <KEYWORD3>fixedtime</KEYWORD3>
- <KEYWORD3>flood_msgs</KEYWORD3>
- <KEYWORD3>flood_persecond</KEYWORD3>
- <KEYWORD3>flood_waitdelay</KEYWORD3>
- <KEYWORD3>flushmap</KEYWORD3>
- <KEYWORD3>fov</KEYWORD3>
- <KEYWORD3>fraglimit</KEYWORD3>
- <KEYWORD3>freelook</KEYWORD3>
- <KEYWORD3>g_select_empty</KEYWORD3>
- <KEYWORD3>game</KEYWORD3>
- <KEYWORD3>gamedate</KEYWORD3>
- <KEYWORD3>gamedir</KEYWORD3>
- <KEYWORD3>gamemap</KEYWORD3>
- <KEYWORD3>gamename</KEYWORD3>
- <KEYWORD3>gameversion</KEYWORD3>
- <KEYWORD3>gender</KEYWORD3>
- <KEYWORD3>gender_auto</KEYWORD3>
- <KEYWORD3>give</KEYWORD3>
- <KEYWORD3>gl_3dlabs_broken</KEYWORD3>
- <KEYWORD3>gl_allow_software</KEYWORD3>
- <KEYWORD3>gl_bitdepth</KEYWORD3>
- <KEYWORD3>gl_clear</KEYWORD3>
- <KEYWORD3>gl_cull</KEYWORD3>
- <KEYWORD3>gl_drawbuffer</KEYWORD3>
- <KEYWORD3>gl_driver</KEYWORD3>
- <KEYWORD3>gl_dynamic</KEYWORD3>
- <KEYWORD3>gl_ext_compiled_vertex_array</KEYWORD3>
- <KEYWORD3>gl_ext_multitexture</KEYWORD3>
- <KEYWORD3>gl_ext_palettedtexture</KEYWORD3>
- <KEYWORD3>gl_ext_pointparameters</KEYWORD3>
- <KEYWORD3>gl_ext_swapinterval</KEYWORD3>
- <KEYWORD3>gl_finish</KEYWORD3>
- <KEYWORD3>gl_flashblend</KEYWORD3>
- <KEYWORD3>gl_lightmap</KEYWORD3>
- <KEYWORD3>gl_lockpvs</KEYWORD3>
- <KEYWORD3>gl_log</KEYWORD3>
- <KEYWORD3>gl_mode</KEYWORD3>
- <KEYWORD3>gl_modulate</KEYWORD3>
- <KEYWORD3>gl_monolightmap</KEYWORD3>
- <KEYWORD3>gl_nobind</KEYWORD3>
- <KEYWORD3>gl_nosubimage</KEYWORD3>
- <KEYWORD3>gl_particle_att_a</KEYWORD3>
- <KEYWORD3>gl_particle_att_b</KEYWORD3>
- <KEYWORD3>gl_particle_att_c</KEYWORD3>
- <KEYWORD3>gl_particle_max_size</KEYWORD3>
- <KEYWORD3>gl_particle_min_size</KEYWORD3>
- <KEYWORD3>gl_particle_size</KEYWORD3>
- <KEYWORD3>gl_picmip</KEYWORD3>
- <KEYWORD3>gl_playermip</KEYWORD3>
- <KEYWORD3>gl_polyblend</KEYWORD3>
- <KEYWORD3>gl_round_down</KEYWORD3>
- <KEYWORD3>gl_saturatelighting</KEYWORD3>
- <KEYWORD3>gl_shadows</KEYWORD3>
- <KEYWORD3>gl_showtris</KEYWORD3>
- <KEYWORD3>gl_skymip</KEYWORD3>
- <KEYWORD3>gl_swapinterval</KEYWORD3>
- <KEYWORD3>gl_texturealphamode</KEYWORD3>
- <KEYWORD3>gl_texturemode</KEYWORD3>
- <KEYWORD3>gl_texturesolidmode</KEYWORD3>
- <KEYWORD3>gl_triplebuffer</KEYWORD3>
- <KEYWORD3>gl_vertex_arrays</KEYWORD3>
- <KEYWORD3>gl_ztrick</KEYWORD3>
- <KEYWORD3>god</KEYWORD3>
- <KEYWORD3>graphheight</KEYWORD3>
- <KEYWORD3>graphscale</KEYWORD3>
- <KEYWORD3>graphshift</KEYWORD3>
- <KEYWORD3>gun_model</KEYWORD3>
- <KEYWORD3>gun_next</KEYWORD3>
- <KEYWORD3>gun_prev</KEYWORD3>
- <KEYWORD3>gun_x</KEYWORD3>
- <KEYWORD3>gun_y</KEYWORD3>
- <KEYWORD3>gun_z</KEYWORD3>
- <KEYWORD3>hand</KEYWORD3>
- <KEYWORD3>heartbeat</KEYWORD3>
- <KEYWORD3>host_speeds</KEYWORD3>
- <KEYWORD3>hostname</KEYWORD3>
- <KEYWORD3>hostport</KEYWORD3>
- <KEYWORD3>imagelist</KEYWORD3>
- <KEYWORD3>impulse</KEYWORD3>
- <KEYWORD3>in_initjoy</KEYWORD3>
- <KEYWORD3>in_initmouse</KEYWORD3>
- <KEYWORD3>in_joystick</KEYWORD3>
- <KEYWORD3>in_mouse</KEYWORD3>
- <KEYWORD3>info</KEYWORD3>
- <KEYWORD3>intensity</KEYWORD3>
- <KEYWORD3>invdrop</KEYWORD3>
- <KEYWORD3>inven</KEYWORD3>
- <KEYWORD3>invnext</KEYWORD3>
- <KEYWORD3>invnextp</KEYWORD3>
- <KEYWORD3>invnextw</KEYWORD3>
- <KEYWORD3>invprev</KEYWORD3>
- <KEYWORD3>invprevp</KEYWORD3>
- <KEYWORD3>invprevw</KEYWORD3>
- <KEYWORD3>invuse</KEYWORD3>
- <KEYWORD3>ip</KEYWORD3>
- <KEYWORD3>ip_clientport</KEYWORD3>
- <KEYWORD3>ip_hostport</KEYWORD3>
- <KEYWORD3>ipx_clientport</KEYWORD3>
- <KEYWORD3>ipx_hostport</KEYWORD3>
- <KEYWORD3>joy_advanced</KEYWORD3>
- <KEYWORD3>joy_advancedupdate</KEYWORD3>
- <KEYWORD3>joy_advaxisr</KEYWORD3>
- <KEYWORD3>joy_advaxisu</KEYWORD3>
- <KEYWORD3>joy_advaxisv</KEYWORD3>
- <KEYWORD3>joy_advaxisx</KEYWORD3>
- <KEYWORD3>joy_advaxisy</KEYWORD3>
- <KEYWORD3>joy_advaxisz</KEYWORD3>
- <KEYWORD3>joy_forwardsensitivity</KEYWORD3>
- <KEYWORD3>joy_forwardthreshold</KEYWORD3>
- <KEYWORD3>joy_name</KEYWORD3>
- <KEYWORD3>joy_pitchsensitivity</KEYWORD3>
- <KEYWORD3>joy_pitchthreshold</KEYWORD3>
- <KEYWORD3>joy_sidesensitivity</KEYWORD3>
- <KEYWORD3>joy_sidethreshold</KEYWORD3>
- <KEYWORD3>joy_upsensitivity</KEYWORD3>
- <KEYWORD3>joy_upthreshold</KEYWORD3>
- <KEYWORD3>joy_yawsensitivity</KEYWORD3>
- <KEYWORD3>joy_yawthreshold</KEYWORD3>
- <KEYWORD3>kick</KEYWORD3>
- <KEYWORD3>kill</KEYWORD3>
- <KEYWORD3>killserver</KEYWORD3>
- <KEYWORD3>link</KEYWORD3>
- <KEYWORD3>load</KEYWORD3>
- <KEYWORD3>loading</KEYWORD3>
- <KEYWORD3>log_stats</KEYWORD3>
- <KEYWORD3>logfile</KEYWORD3>
- <KEYWORD3>lookspring</KEYWORD3>
- <KEYWORD3>lookstrafe</KEYWORD3>
- <KEYWORD3>m_filter</KEYWORD3>
- <KEYWORD3>m_forward</KEYWORD3>
- <KEYWORD3>m_pitch</KEYWORD3>
- <KEYWORD3>m_side</KEYWORD3>
- <KEYWORD3>m_yaw</KEYWORD3>
- <KEYWORD3>map</KEYWORD3>
- <KEYWORD3>map_noareas</KEYWORD3>
- <KEYWORD3>mapname</KEYWORD3>
- <KEYWORD3>maxclients</KEYWORD3>
- <KEYWORD3>maxentities</KEYWORD3>
- <KEYWORD3>maxspectators</KEYWORD3>
- <KEYWORD3>menu_addressbook</KEYWORD3>
- <KEYWORD3>menu_credits</KEYWORD3>
- <KEYWORD3>menu_dmoptions</KEYWORD3>
- <KEYWORD3>menu_game</KEYWORD3>
- <KEYWORD3>menu_joinserver</KEYWORD3>
- <KEYWORD3>menu_keys</KEYWORD3>
- <KEYWORD3>menu_loadgame</KEYWORD3>
- <KEYWORD3>menu_main</KEYWORD3>
- <KEYWORD3>menu_multiplayer</KEYWORD3>
- <KEYWORD3>menu_options</KEYWORD3>
- <KEYWORD3>menu_playerconfig</KEYWORD3>
- <KEYWORD3>menu_quit</KEYWORD3>
- <KEYWORD3>menu_savegame</KEYWORD3>
- <KEYWORD3>menu_startserver</KEYWORD3>
- <KEYWORD3>menu_video</KEYWORD3>
- <KEYWORD3>messagemode</KEYWORD3>
- <KEYWORD3>messagemode3</KEYWORD3>
- <KEYWORD3>modellist</KEYWORD3>
- <KEYWORD3>msg</KEYWORD3>
- <KEYWORD3>name</KEYWORD3>
- <KEYWORD3>needpass</KEYWORD3>
- <KEYWORD3>net_shownet</KEYWORD3>
- <KEYWORD3>netgraph</KEYWORD3>
- <KEYWORD3>nextserver</KEYWORD3>
- <KEYWORD3>noclip</KEYWORD3>
- <KEYWORD3>noipx</KEYWORD3>
- <KEYWORD3>notarget</KEYWORD3>
- <KEYWORD3>noudp</KEYWORD3>
- <KEYWORD3>password</KEYWORD3>
- <KEYWORD3>path</KEYWORD3>
- <KEYWORD3>pause</KEYWORD3>
- <KEYWORD3>paused</KEYWORD3>
- <KEYWORD3>pingservers</KEYWORD3>
- <KEYWORD3>play</KEYWORD3>
- <KEYWORD3>playerlist</KEYWORD3>
- <KEYWORD3>players</KEYWORD3>
- <KEYWORD3>port</KEYWORD3>
- <KEYWORD3>precache</KEYWORD3>
- <KEYWORD3>prog</KEYWORD3>
- <KEYWORD3>protocol</KEYWORD3>
- <KEYWORD3>public</KEYWORD3>
- <KEYWORD3>qport</KEYWORD3>
- <KEYWORD3>quit</KEYWORD3>
- <KEYWORD3>r_drawentities</KEYWORD3>
- <KEYWORD3>r_drawworld</KEYWORD3>
- <KEYWORD3>r_dspeeds</KEYWORD3>
- <KEYWORD3>r_fullbright</KEYWORD3>
- <KEYWORD3>r_lerpmodels</KEYWORD3>
- <KEYWORD3>r_lightlevel</KEYWORD3>
- <KEYWORD3>r_nocull</KEYWORD3>
- <KEYWORD3>r_norefresh</KEYWORD3>
- <KEYWORD3>r_novis</KEYWORD3>
- <KEYWORD3>r_speeds</KEYWORD3>
- <KEYWORD3>rate</KEYWORD3>
- <KEYWORD3>rcon</KEYWORD3>
- <KEYWORD3>rcon_address</KEYWORD3>
- <KEYWORD3>rcon_password</KEYWORD3>
- <KEYWORD3>reconnect</KEYWORD3>
- <KEYWORD3>record</KEYWORD3>
- <KEYWORD3>run_pitch</KEYWORD3>
- <KEYWORD3>run_roll</KEYWORD3>
- <KEYWORD3>s_initsound</KEYWORD3>
- <KEYWORD3>s_khz</KEYWORD3>
- <KEYWORD3>s_loadas8bit</KEYWORD3>
- <KEYWORD3>s_mixahead</KEYWORD3>
- <KEYWORD3>s_primary</KEYWORD3>
- <KEYWORD3>s_show</KEYWORD3>
- <KEYWORD3>s_testsound</KEYWORD3>
- <KEYWORD3>s_volume</KEYWORD3>
- <KEYWORD3>s_wavonly</KEYWORD3>
- <KEYWORD3>save</KEYWORD3>
- <KEYWORD3>say</KEYWORD3>
- <KEYWORD3>say_team</KEYWORD3>
- <KEYWORD3>score</KEYWORD3>
- <KEYWORD3>scr_centertime</KEYWORD3>
- <KEYWORD3>scr_conspeed</KEYWORD3>
- <KEYWORD3>scr_drawall</KEYWORD3>
- <KEYWORD3>scr_printspeed</KEYWORD3>
- <KEYWORD3>scr_showpause</KEYWORD3>
- <KEYWORD3>scr_showturtle</KEYWORD3>
- <KEYWORD3>screenshot</KEYWORD3>
- <KEYWORD3>sensitivity</KEYWORD3>
- <KEYWORD3>serverinfo</KEYWORD3>
- <KEYWORD3>serverrecord</KEYWORD3>
- <KEYWORD3>serverstop</KEYWORD3>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD3>setenv</KEYWORD3>
- <KEYWORD3>setmaster</KEYWORD3>
- <KEYWORD3>showclamp</KEYWORD3>
- <KEYWORD3>showdrop</KEYWORD3>
- <KEYWORD3>showpackets</KEYWORD3>
- <KEYWORD3>showtrace</KEYWORD3>
- <KEYWORD3>sizedown</KEYWORD3>
- <KEYWORD3>sizeup</KEYWORD3>
- <KEYWORD3>skill</KEYWORD3>
- <KEYWORD3>skin</KEYWORD3>
- <KEYWORD3>skins</KEYWORD3>
- <KEYWORD3>sky</KEYWORD3>
- <KEYWORD3>snd_restart</KEYWORD3>
- <KEYWORD3>soundinfo</KEYWORD3>
- <KEYWORD3>soundlist</KEYWORD3>
- <KEYWORD3>spectator</KEYWORD3>
- <KEYWORD3>spectator_password</KEYWORD3>
- <KEYWORD3>status</KEYWORD3>
- <KEYWORD3>stop</KEYWORD3>
- <KEYWORD3>stopsound</KEYWORD3>
- <KEYWORD3>sv</KEYWORD3>
- <KEYWORD3>sv_airaccelerate</KEYWORD3>
- <KEYWORD3>sv_enforcetime</KEYWORD3>
- <KEYWORD3>sv_gravity</KEYWORD3>
- <KEYWORD3>sv_maplist</KEYWORD3>
- <KEYWORD3>sv_maxvelocity</KEYWORD3>
- <KEYWORD3>sv_noreload</KEYWORD3>
- <KEYWORD3>sv_reconnect_limit</KEYWORD3>
- <KEYWORD3>sv_rollangle</KEYWORD3>
- <KEYWORD3>sv_rollspeed</KEYWORD3>
- <KEYWORD3>sw_allow_modex</KEYWORD3>
- <KEYWORD3>sw_clearcolor</KEYWORD3>
- <KEYWORD3>sw_drawflat</KEYWORD3>
- <KEYWORD3>sw_draworder</KEYWORD3>
- <KEYWORD3>sw_maxedges</KEYWORD3>
- <KEYWORD3>sw_maxsurfs</KEYWORD3>
- <KEYWORD3>sw_mipcap</KEYWORD3>
- <KEYWORD3>sw_mipscale</KEYWORD3>
- <KEYWORD3>sw_mode</KEYWORD3>
- <KEYWORD3>sw_polymodelstats</KEYWORD3>
- <KEYWORD3>sw_reportedgeout</KEYWORD3>
- <KEYWORD3>sw_reportsurfout</KEYWORD3>
- <KEYWORD3>sw_stipplealpha</KEYWORD3>
- <KEYWORD3>sw_surfcacheoverride</KEYWORD3>
- <KEYWORD3>sw_waterwarp</KEYWORD3>
- <KEYWORD3>timedemo</KEYWORD3>
- <KEYWORD3>timegraph</KEYWORD3>
- <KEYWORD3>timelimit</KEYWORD3>
- <KEYWORD3>timeout</KEYWORD3>
- <KEYWORD3>timerefresh</KEYWORD3>
- <KEYWORD3>timescale</KEYWORD3>
- <KEYWORD3>togglechat</KEYWORD3>
- <KEYWORD3>toggleconsole</KEYWORD3>
- <KEYWORD3>unbind</KEYWORD3>
- <KEYWORD3>unbindall</KEYWORD3>
- <KEYWORD3>use</KEYWORD3>
- <KEYWORD3>userinfo</KEYWORD3>
- <KEYWORD3>v_centermove</KEYWORD3>
- <KEYWORD3>v_centerspeed</KEYWORD3>
- <KEYWORD3>version</KEYWORD3>
- <KEYWORD3>vid_front</KEYWORD3>
- <KEYWORD3>vid_fullscreen</KEYWORD3>
- <KEYWORD3>vid_gamma</KEYWORD3>
- <KEYWORD3>vid_ref</KEYWORD3>
- <KEYWORD3>vid_restart</KEYWORD3>
- <KEYWORD3>vid_xpos</KEYWORD3>
- <KEYWORD3>vid_ypos</KEYWORD3>
- <KEYWORD3>viewpos</KEYWORD3>
- <KEYWORD3>viewsize</KEYWORD3>
- <KEYWORD3>wait</KEYWORD3>
- <KEYWORD3>wave</KEYWORD3>
- <KEYWORD3>weaplast</KEYWORD3>
- <KEYWORD3>weapnext</KEYWORD3>
- <KEYWORD3>weapprev</KEYWORD3>
- <KEYWORD3>win_noalttab</KEYWORD3>
- <KEYWORD3>z_stats</KEYWORD3>
- <KEYWORD1>zombietime</KEYWORD1>
- <KEYWORD4>shift</KEYWORD4>
- <KEYWORD4>ctrl</KEYWORD4>
- <KEYWORD4>space</KEYWORD4>
- <KEYWORD4>tab</KEYWORD4>
- <KEYWORD4>enter</KEYWORD4>
- <KEYWORD4>escape</KEYWORD4>
- <KEYWORD4>F1</KEYWORD4>
- <KEYWORD4>F2</KEYWORD4>
- <KEYWORD4>F3</KEYWORD4>
- <KEYWORD4>F4</KEYWORD4>
- <KEYWORD4>F5</KEYWORD4>
- <KEYWORD4>F6</KEYWORD4>
- <KEYWORD4>F7</KEYWORD4>
- <KEYWORD4>F8</KEYWORD4>
- <KEYWORD4>F9</KEYWORD4>
- <KEYWORD4>F10</KEYWORD4>
- <KEYWORD4>F11</KEYWORD4>
- <KEYWORD4>F12</KEYWORD4>
- <KEYWORD4>INS</KEYWORD4>
- <KEYWORD4>DEL</KEYWORD4>
- <KEYWORD4>PGUP</KEYWORD4>
- <KEYWORD4>PGDN</KEYWORD4>
- <KEYWORD4>HOME</KEYWORD4>
- <KEYWORD4>END</KEYWORD4>
- <KEYWORD4>MOUSE1</KEYWORD4>
- <KEYWORD4>MOUSE2</KEYWORD4>
- <KEYWORD4>uparrow</KEYWORD4>
- <KEYWORD4>downarrow</KEYWORD4>
- <KEYWORD4>leftarrow</KEYWORD4>
- <KEYWORD4>rightarrow</KEYWORD4>
- <KEYWORD4>mwheelup</KEYWORD4>
- <KEYWORD4>mwheeldown</KEYWORD4>
- <KEYWORD4>backspace</KEYWORD4>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ Quake mode by Marcus Augustine <mail [at] ma [dash] online [dot] net>
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE">
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <KEYWORDS>
+ <KEYWORD2>+attack</KEYWORD2>
+ <KEYWORD2>+back</KEYWORD2>
+ <KEYWORD2>+forward</KEYWORD2>
+ <KEYWORD2>+klook</KEYWORD2>
+ <KEYWORD2>+left</KEYWORD2>
+ <KEYWORD2>+lookdown</KEYWORD2>
+ <KEYWORD2>+lookup</KEYWORD2>
+ <KEYWORD2>+mlook</KEYWORD2>
+ <KEYWORD2>+movedown</KEYWORD2>
+ <KEYWORD2>+moveleft</KEYWORD2>
+ <KEYWORD2>+moveright</KEYWORD2>
+ <KEYWORD2>+moveup</KEYWORD2>
+ <KEYWORD2>+right</KEYWORD2>
+ <KEYWORD2>+speed</KEYWORD2>
+ <KEYWORD2>+strafe</KEYWORD2>
+ <KEYWORD2>+use</KEYWORD2>
+ <KEYWORD2>-attack</KEYWORD2>
+ <KEYWORD2>-back</KEYWORD2>
+ <KEYWORD2>-forward</KEYWORD2>
+ <KEYWORD2>-klook</KEYWORD2>
+ <KEYWORD2>-left</KEYWORD2>
+ <KEYWORD2>-lookdown</KEYWORD2>
+ <KEYWORD2>-lookup</KEYWORD2>
+ <KEYWORD2>-mlook</KEYWORD2>
+ <KEYWORD2>-movedown</KEYWORD2>
+ <KEYWORD2>-moveleft</KEYWORD2>
+ <KEYWORD2>-moveright</KEYWORD2>
+ <KEYWORD2>-moveup</KEYWORD2>
+ <KEYWORD2>-right</KEYWORD2>
+ <KEYWORD2>-speed</KEYWORD2>
+ <KEYWORD2>-strafe</KEYWORD2>
+ <KEYWORD2>-use</KEYWORD2>
+ <KEYWORD3>adr0</KEYWORD3>
+ <KEYWORD3>adr1</KEYWORD3>
+ <KEYWORD3>adr2</KEYWORD3>
+ <KEYWORD3>adr3</KEYWORD3>
+ <KEYWORD3>adr4</KEYWORD3>
+ <KEYWORD3>adr5</KEYWORD3>
+ <KEYWORD3>adr6</KEYWORD3>
+ <KEYWORD3>adr7</KEYWORD3>
+ <KEYWORD3>adr8</KEYWORD3>
+ <KEYWORD3>alias</KEYWORD3>
+ <KEYWORD3>allow_download</KEYWORD3>
+ <KEYWORD3>allow_download_maps</KEYWORD3>
+ <KEYWORD3>allow_download_models</KEYWORD3>
+ <KEYWORD3>allow_download_players</KEYWORD3>
+ <KEYWORD3>allow_download_sounds</KEYWORD3>
+ <KEYWORD3>basedir</KEYWORD3>
+ <KEYWORD1>bind</KEYWORD1>
+ <KEYWORD3>bindlist</KEYWORD3>
+ <KEYWORD3>bob_pitch</KEYWORD3>
+ <KEYWORD3>bob_roll</KEYWORD3>
+ <KEYWORD3>bob_up</KEYWORD3>
+ <KEYWORD3>cd</KEYWORD3>
+ <KEYWORD3>cd_loopcount</KEYWORD3>
+ <KEYWORD3>cd_looptrack</KEYWORD3>
+ <KEYWORD3>cd_nocd</KEYWORD3>
+ <KEYWORD3>cddir</KEYWORD3>
+ <KEYWORD3>centerview</KEYWORD3>
+ <KEYWORD3>changing</KEYWORD3>
+ <KEYWORD3>cheats</KEYWORD3>
+ <KEYWORD3>cl_anglespeedkey</KEYWORD3>
+ <KEYWORD3>cl_autoskins</KEYWORD3>
+ <KEYWORD3>cl_blend</KEYWORD3>
+ <KEYWORD3>cl_entities</KEYWORD3>
+ <KEYWORD3>cl_footsteps</KEYWORD3>
+ <KEYWORD3>cl_forwardspeed</KEYWORD3>
+ <KEYWORD3>cl_gun</KEYWORD3>
+ <KEYWORD3>cl_lights</KEYWORD3>
+ <KEYWORD3>cl_maxfps</KEYWORD3>
+ <KEYWORD3>cl_nodelta</KEYWORD3>
+ <KEYWORD3>cl_noskins</KEYWORD3>
+ <KEYWORD3>cl_particles</KEYWORD3>
+ <KEYWORD3>cl_pitchspeed</KEYWORD3>
+ <KEYWORD3>cl_predict</KEYWORD3>
+ <KEYWORD3>cl_run</KEYWORD3>
+ <KEYWORD3>cl_showmiss</KEYWORD3>
+ <KEYWORD3>cl_shownet</KEYWORD3>
+ <KEYWORD3>cl_sidespeed</KEYWORD3>
+ <KEYWORD3>cl_stats</KEYWORD3>
+ <KEYWORD3>cl_stereo</KEYWORD3>
+ <KEYWORD3>cl_stereo_separation</KEYWORD3>
+ <KEYWORD3>cl_testblend</KEYWORD3>
+ <KEYWORD3>cl_testentities</KEYWORD3>
+ <KEYWORD3>cl_testlights</KEYWORD3>
+ <KEYWORD3>cl_testparticles</KEYWORD3>
+ <KEYWORD3>cl_timeout</KEYWORD3>
+ <KEYWORD3>cl_upspeed</KEYWORD3>
+ <KEYWORD3>cl_vwep</KEYWORD3>
+ <KEYWORD3>cl_yawspeed</KEYWORD3>
+ <KEYWORD3>clear</KEYWORD3>
+ <KEYWORD3>clientport</KEYWORD3>
+ <KEYWORD3>cmd</KEYWORD3>
+ <KEYWORD3>cmdlist</KEYWORD3>
+ <KEYWORD3>con_notifytime</KEYWORD3>
+ <KEYWORD3>condump</KEYWORD3>
+ <KEYWORD3>connect</KEYWORD3>
+ <KEYWORD3>coop</KEYWORD3>
+ <KEYWORD3>crosshair</KEYWORD3>
+ <KEYWORD3>cvarlist</KEYWORD3>
+ <KEYWORD3>deathmatch</KEYWORD3>
+ <KEYWORD3>debuggraph</KEYWORD3>
+ <KEYWORD3>dedicated</KEYWORD3>
+ <KEYWORD3>demomap</KEYWORD3>
+ <KEYWORD3>developer</KEYWORD3>
+ <KEYWORD3>dir</KEYWORD3>
+ <KEYWORD3>disconnect</KEYWORD3>
+ <KEYWORD3>dmflags</KEYWORD3>
+ <KEYWORD3>download</KEYWORD3>
+ <KEYWORD3>drop</KEYWORD3>
+ <KEYWORD3>dumpuser</KEYWORD3>
+ <KEYWORD3>echo</KEYWORD3>
+ <KEYWORD3>error</KEYWORD3>
+ <KEYWORD3>exec</KEYWORD3>
+ <KEYWORD3>filterban</KEYWORD3>
+ <KEYWORD3>fixedtime</KEYWORD3>
+ <KEYWORD3>flood_msgs</KEYWORD3>
+ <KEYWORD3>flood_persecond</KEYWORD3>
+ <KEYWORD3>flood_waitdelay</KEYWORD3>
+ <KEYWORD3>flushmap</KEYWORD3>
+ <KEYWORD3>fov</KEYWORD3>
+ <KEYWORD3>fraglimit</KEYWORD3>
+ <KEYWORD3>freelook</KEYWORD3>
+ <KEYWORD3>g_select_empty</KEYWORD3>
+ <KEYWORD3>game</KEYWORD3>
+ <KEYWORD3>gamedate</KEYWORD3>
+ <KEYWORD3>gamedir</KEYWORD3>
+ <KEYWORD3>gamemap</KEYWORD3>
+ <KEYWORD3>gamename</KEYWORD3>
+ <KEYWORD3>gameversion</KEYWORD3>
+ <KEYWORD3>gender</KEYWORD3>
+ <KEYWORD3>gender_auto</KEYWORD3>
+ <KEYWORD3>give</KEYWORD3>
+ <KEYWORD3>gl_3dlabs_broken</KEYWORD3>
+ <KEYWORD3>gl_allow_software</KEYWORD3>
+ <KEYWORD3>gl_bitdepth</KEYWORD3>
+ <KEYWORD3>gl_clear</KEYWORD3>
+ <KEYWORD3>gl_cull</KEYWORD3>
+ <KEYWORD3>gl_drawbuffer</KEYWORD3>
+ <KEYWORD3>gl_driver</KEYWORD3>
+ <KEYWORD3>gl_dynamic</KEYWORD3>
+ <KEYWORD3>gl_ext_compiled_vertex_array</KEYWORD3>
+ <KEYWORD3>gl_ext_multitexture</KEYWORD3>
+ <KEYWORD3>gl_ext_palettedtexture</KEYWORD3>
+ <KEYWORD3>gl_ext_pointparameters</KEYWORD3>
+ <KEYWORD3>gl_ext_swapinterval</KEYWORD3>
+ <KEYWORD3>gl_finish</KEYWORD3>
+ <KEYWORD3>gl_flashblend</KEYWORD3>
+ <KEYWORD3>gl_lightmap</KEYWORD3>
+ <KEYWORD3>gl_lockpvs</KEYWORD3>
+ <KEYWORD3>gl_log</KEYWORD3>
+ <KEYWORD3>gl_mode</KEYWORD3>
+ <KEYWORD3>gl_modulate</KEYWORD3>
+ <KEYWORD3>gl_monolightmap</KEYWORD3>
+ <KEYWORD3>gl_nobind</KEYWORD3>
+ <KEYWORD3>gl_nosubimage</KEYWORD3>
+ <KEYWORD3>gl_particle_att_a</KEYWORD3>
+ <KEYWORD3>gl_particle_att_b</KEYWORD3>
+ <KEYWORD3>gl_particle_att_c</KEYWORD3>
+ <KEYWORD3>gl_particle_max_size</KEYWORD3>
+ <KEYWORD3>gl_particle_min_size</KEYWORD3>
+ <KEYWORD3>gl_particle_size</KEYWORD3>
+ <KEYWORD3>gl_picmip</KEYWORD3>
+ <KEYWORD3>gl_playermip</KEYWORD3>
+ <KEYWORD3>gl_polyblend</KEYWORD3>
+ <KEYWORD3>gl_round_down</KEYWORD3>
+ <KEYWORD3>gl_saturatelighting</KEYWORD3>
+ <KEYWORD3>gl_shadows</KEYWORD3>
+ <KEYWORD3>gl_showtris</KEYWORD3>
+ <KEYWORD3>gl_skymip</KEYWORD3>
+ <KEYWORD3>gl_swapinterval</KEYWORD3>
+ <KEYWORD3>gl_texturealphamode</KEYWORD3>
+ <KEYWORD3>gl_texturemode</KEYWORD3>
+ <KEYWORD3>gl_texturesolidmode</KEYWORD3>
+ <KEYWORD3>gl_triplebuffer</KEYWORD3>
+ <KEYWORD3>gl_vertex_arrays</KEYWORD3>
+ <KEYWORD3>gl_ztrick</KEYWORD3>
+ <KEYWORD3>god</KEYWORD3>
+ <KEYWORD3>graphheight</KEYWORD3>
+ <KEYWORD3>graphscale</KEYWORD3>
+ <KEYWORD3>graphshift</KEYWORD3>
+ <KEYWORD3>gun_model</KEYWORD3>
+ <KEYWORD3>gun_next</KEYWORD3>
+ <KEYWORD3>gun_prev</KEYWORD3>
+ <KEYWORD3>gun_x</KEYWORD3>
+ <KEYWORD3>gun_y</KEYWORD3>
+ <KEYWORD3>gun_z</KEYWORD3>
+ <KEYWORD3>hand</KEYWORD3>
+ <KEYWORD3>heartbeat</KEYWORD3>
+ <KEYWORD3>host_speeds</KEYWORD3>
+ <KEYWORD3>hostname</KEYWORD3>
+ <KEYWORD3>hostport</KEYWORD3>
+ <KEYWORD3>imagelist</KEYWORD3>
+ <KEYWORD3>impulse</KEYWORD3>
+ <KEYWORD3>in_initjoy</KEYWORD3>
+ <KEYWORD3>in_initmouse</KEYWORD3>
+ <KEYWORD3>in_joystick</KEYWORD3>
+ <KEYWORD3>in_mouse</KEYWORD3>
+ <KEYWORD3>info</KEYWORD3>
+ <KEYWORD3>intensity</KEYWORD3>
+ <KEYWORD3>invdrop</KEYWORD3>
+ <KEYWORD3>inven</KEYWORD3>
+ <KEYWORD3>invnext</KEYWORD3>
+ <KEYWORD3>invnextp</KEYWORD3>
+ <KEYWORD3>invnextw</KEYWORD3>
+ <KEYWORD3>invprev</KEYWORD3>
+ <KEYWORD3>invprevp</KEYWORD3>
+ <KEYWORD3>invprevw</KEYWORD3>
+ <KEYWORD3>invuse</KEYWORD3>
+ <KEYWORD3>ip</KEYWORD3>
+ <KEYWORD3>ip_clientport</KEYWORD3>
+ <KEYWORD3>ip_hostport</KEYWORD3>
+ <KEYWORD3>ipx_clientport</KEYWORD3>
+ <KEYWORD3>ipx_hostport</KEYWORD3>
+ <KEYWORD3>joy_advanced</KEYWORD3>
+ <KEYWORD3>joy_advancedupdate</KEYWORD3>
+ <KEYWORD3>joy_advaxisr</KEYWORD3>
+ <KEYWORD3>joy_advaxisu</KEYWORD3>
+ <KEYWORD3>joy_advaxisv</KEYWORD3>
+ <KEYWORD3>joy_advaxisx</KEYWORD3>
+ <KEYWORD3>joy_advaxisy</KEYWORD3>
+ <KEYWORD3>joy_advaxisz</KEYWORD3>
+ <KEYWORD3>joy_forwardsensitivity</KEYWORD3>
+ <KEYWORD3>joy_forwardthreshold</KEYWORD3>
+ <KEYWORD3>joy_name</KEYWORD3>
+ <KEYWORD3>joy_pitchsensitivity</KEYWORD3>
+ <KEYWORD3>joy_pitchthreshold</KEYWORD3>
+ <KEYWORD3>joy_sidesensitivity</KEYWORD3>
+ <KEYWORD3>joy_sidethreshold</KEYWORD3>
+ <KEYWORD3>joy_upsensitivity</KEYWORD3>
+ <KEYWORD3>joy_upthreshold</KEYWORD3>
+ <KEYWORD3>joy_yawsensitivity</KEYWORD3>
+ <KEYWORD3>joy_yawthreshold</KEYWORD3>
+ <KEYWORD3>kick</KEYWORD3>
+ <KEYWORD3>kill</KEYWORD3>
+ <KEYWORD3>killserver</KEYWORD3>
+ <KEYWORD3>link</KEYWORD3>
+ <KEYWORD3>load</KEYWORD3>
+ <KEYWORD3>loading</KEYWORD3>
+ <KEYWORD3>log_stats</KEYWORD3>
+ <KEYWORD3>logfile</KEYWORD3>
+ <KEYWORD3>lookspring</KEYWORD3>
+ <KEYWORD3>lookstrafe</KEYWORD3>
+ <KEYWORD3>m_filter</KEYWORD3>
+ <KEYWORD3>m_forward</KEYWORD3>
+ <KEYWORD3>m_pitch</KEYWORD3>
+ <KEYWORD3>m_side</KEYWORD3>
+ <KEYWORD3>m_yaw</KEYWORD3>
+ <KEYWORD3>map</KEYWORD3>
+ <KEYWORD3>map_noareas</KEYWORD3>
+ <KEYWORD3>mapname</KEYWORD3>
+ <KEYWORD3>maxclients</KEYWORD3>
+ <KEYWORD3>maxentities</KEYWORD3>
+ <KEYWORD3>maxspectators</KEYWORD3>
+ <KEYWORD3>menu_addressbook</KEYWORD3>
+ <KEYWORD3>menu_credits</KEYWORD3>
+ <KEYWORD3>menu_dmoptions</KEYWORD3>
+ <KEYWORD3>menu_game</KEYWORD3>
+ <KEYWORD3>menu_joinserver</KEYWORD3>
+ <KEYWORD3>menu_keys</KEYWORD3>
+ <KEYWORD3>menu_loadgame</KEYWORD3>
+ <KEYWORD3>menu_main</KEYWORD3>
+ <KEYWORD3>menu_multiplayer</KEYWORD3>
+ <KEYWORD3>menu_options</KEYWORD3>
+ <KEYWORD3>menu_playerconfig</KEYWORD3>
+ <KEYWORD3>menu_quit</KEYWORD3>
+ <KEYWORD3>menu_savegame</KEYWORD3>
+ <KEYWORD3>menu_startserver</KEYWORD3>
+ <KEYWORD3>menu_video</KEYWORD3>
+ <KEYWORD3>messagemode</KEYWORD3>
+ <KEYWORD3>messagemode3</KEYWORD3>
+ <KEYWORD3>modellist</KEYWORD3>
+ <KEYWORD3>msg</KEYWORD3>
+ <KEYWORD3>name</KEYWORD3>
+ <KEYWORD3>needpass</KEYWORD3>
+ <KEYWORD3>net_shownet</KEYWORD3>
+ <KEYWORD3>netgraph</KEYWORD3>
+ <KEYWORD3>nextserver</KEYWORD3>
+ <KEYWORD3>noclip</KEYWORD3>
+ <KEYWORD3>noipx</KEYWORD3>
+ <KEYWORD3>notarget</KEYWORD3>
+ <KEYWORD3>noudp</KEYWORD3>
+ <KEYWORD3>password</KEYWORD3>
+ <KEYWORD3>path</KEYWORD3>
+ <KEYWORD3>pause</KEYWORD3>
+ <KEYWORD3>paused</KEYWORD3>
+ <KEYWORD3>pingservers</KEYWORD3>
+ <KEYWORD3>play</KEYWORD3>
+ <KEYWORD3>playerlist</KEYWORD3>
+ <KEYWORD3>players</KEYWORD3>
+ <KEYWORD3>port</KEYWORD3>
+ <KEYWORD3>precache</KEYWORD3>
+ <KEYWORD3>prog</KEYWORD3>
+ <KEYWORD3>protocol</KEYWORD3>
+ <KEYWORD3>public</KEYWORD3>
+ <KEYWORD3>qport</KEYWORD3>
+ <KEYWORD3>quit</KEYWORD3>
+ <KEYWORD3>r_drawentities</KEYWORD3>
+ <KEYWORD3>r_drawworld</KEYWORD3>
+ <KEYWORD3>r_dspeeds</KEYWORD3>
+ <KEYWORD3>r_fullbright</KEYWORD3>
+ <KEYWORD3>r_lerpmodels</KEYWORD3>
+ <KEYWORD3>r_lightlevel</KEYWORD3>
+ <KEYWORD3>r_nocull</KEYWORD3>
+ <KEYWORD3>r_norefresh</KEYWORD3>
+ <KEYWORD3>r_novis</KEYWORD3>
+ <KEYWORD3>r_speeds</KEYWORD3>
+ <KEYWORD3>rate</KEYWORD3>
+ <KEYWORD3>rcon</KEYWORD3>
+ <KEYWORD3>rcon_address</KEYWORD3>
+ <KEYWORD3>rcon_password</KEYWORD3>
+ <KEYWORD3>reconnect</KEYWORD3>
+ <KEYWORD3>record</KEYWORD3>
+ <KEYWORD3>run_pitch</KEYWORD3>
+ <KEYWORD3>run_roll</KEYWORD3>
+ <KEYWORD3>s_initsound</KEYWORD3>
+ <KEYWORD3>s_khz</KEYWORD3>
+ <KEYWORD3>s_loadas8bit</KEYWORD3>
+ <KEYWORD3>s_mixahead</KEYWORD3>
+ <KEYWORD3>s_primary</KEYWORD3>
+ <KEYWORD3>s_show</KEYWORD3>
+ <KEYWORD3>s_testsound</KEYWORD3>
+ <KEYWORD3>s_volume</KEYWORD3>
+ <KEYWORD3>s_wavonly</KEYWORD3>
+ <KEYWORD3>save</KEYWORD3>
+ <KEYWORD3>say</KEYWORD3>
+ <KEYWORD3>say_team</KEYWORD3>
+ <KEYWORD3>score</KEYWORD3>
+ <KEYWORD3>scr_centertime</KEYWORD3>
+ <KEYWORD3>scr_conspeed</KEYWORD3>
+ <KEYWORD3>scr_drawall</KEYWORD3>
+ <KEYWORD3>scr_printspeed</KEYWORD3>
+ <KEYWORD3>scr_showpause</KEYWORD3>
+ <KEYWORD3>scr_showturtle</KEYWORD3>
+ <KEYWORD3>screenshot</KEYWORD3>
+ <KEYWORD3>sensitivity</KEYWORD3>
+ <KEYWORD3>serverinfo</KEYWORD3>
+ <KEYWORD3>serverrecord</KEYWORD3>
+ <KEYWORD3>serverstop</KEYWORD3>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD3>setenv</KEYWORD3>
+ <KEYWORD3>setmaster</KEYWORD3>
+ <KEYWORD3>showclamp</KEYWORD3>
+ <KEYWORD3>showdrop</KEYWORD3>
+ <KEYWORD3>showpackets</KEYWORD3>
+ <KEYWORD3>showtrace</KEYWORD3>
+ <KEYWORD3>sizedown</KEYWORD3>
+ <KEYWORD3>sizeup</KEYWORD3>
+ <KEYWORD3>skill</KEYWORD3>
+ <KEYWORD3>skin</KEYWORD3>
+ <KEYWORD3>skins</KEYWORD3>
+ <KEYWORD3>sky</KEYWORD3>
+ <KEYWORD3>snd_restart</KEYWORD3>
+ <KEYWORD3>soundinfo</KEYWORD3>
+ <KEYWORD3>soundlist</KEYWORD3>
+ <KEYWORD3>spectator</KEYWORD3>
+ <KEYWORD3>spectator_password</KEYWORD3>
+ <KEYWORD3>status</KEYWORD3>
+ <KEYWORD3>stop</KEYWORD3>
+ <KEYWORD3>stopsound</KEYWORD3>
+ <KEYWORD3>sv</KEYWORD3>
+ <KEYWORD3>sv_airaccelerate</KEYWORD3>
+ <KEYWORD3>sv_enforcetime</KEYWORD3>
+ <KEYWORD3>sv_gravity</KEYWORD3>
+ <KEYWORD3>sv_maplist</KEYWORD3>
+ <KEYWORD3>sv_maxvelocity</KEYWORD3>
+ <KEYWORD3>sv_noreload</KEYWORD3>
+ <KEYWORD3>sv_reconnect_limit</KEYWORD3>
+ <KEYWORD3>sv_rollangle</KEYWORD3>
+ <KEYWORD3>sv_rollspeed</KEYWORD3>
+ <KEYWORD3>sw_allow_modex</KEYWORD3>
+ <KEYWORD3>sw_clearcolor</KEYWORD3>
+ <KEYWORD3>sw_drawflat</KEYWORD3>
+ <KEYWORD3>sw_draworder</KEYWORD3>
+ <KEYWORD3>sw_maxedges</KEYWORD3>
+ <KEYWORD3>sw_maxsurfs</KEYWORD3>
+ <KEYWORD3>sw_mipcap</KEYWORD3>
+ <KEYWORD3>sw_mipscale</KEYWORD3>
+ <KEYWORD3>sw_mode</KEYWORD3>
+ <KEYWORD3>sw_polymodelstats</KEYWORD3>
+ <KEYWORD3>sw_reportedgeout</KEYWORD3>
+ <KEYWORD3>sw_reportsurfout</KEYWORD3>
+ <KEYWORD3>sw_stipplealpha</KEYWORD3>
+ <KEYWORD3>sw_surfcacheoverride</KEYWORD3>
+ <KEYWORD3>sw_waterwarp</KEYWORD3>
+ <KEYWORD3>timedemo</KEYWORD3>
+ <KEYWORD3>timegraph</KEYWORD3>
+ <KEYWORD3>timelimit</KEYWORD3>
+ <KEYWORD3>timeout</KEYWORD3>
+ <KEYWORD3>timerefresh</KEYWORD3>
+ <KEYWORD3>timescale</KEYWORD3>
+ <KEYWORD3>togglechat</KEYWORD3>
+ <KEYWORD3>toggleconsole</KEYWORD3>
+ <KEYWORD3>unbind</KEYWORD3>
+ <KEYWORD3>unbindall</KEYWORD3>
+ <KEYWORD3>use</KEYWORD3>
+ <KEYWORD3>userinfo</KEYWORD3>
+ <KEYWORD3>v_centermove</KEYWORD3>
+ <KEYWORD3>v_centerspeed</KEYWORD3>
+ <KEYWORD3>version</KEYWORD3>
+ <KEYWORD3>vid_front</KEYWORD3>
+ <KEYWORD3>vid_fullscreen</KEYWORD3>
+ <KEYWORD3>vid_gamma</KEYWORD3>
+ <KEYWORD3>vid_ref</KEYWORD3>
+ <KEYWORD3>vid_restart</KEYWORD3>
+ <KEYWORD3>vid_xpos</KEYWORD3>
+ <KEYWORD3>vid_ypos</KEYWORD3>
+ <KEYWORD3>viewpos</KEYWORD3>
+ <KEYWORD3>viewsize</KEYWORD3>
+ <KEYWORD3>wait</KEYWORD3>
+ <KEYWORD3>wave</KEYWORD3>
+ <KEYWORD3>weaplast</KEYWORD3>
+ <KEYWORD3>weapnext</KEYWORD3>
+ <KEYWORD3>weapprev</KEYWORD3>
+ <KEYWORD3>win_noalttab</KEYWORD3>
+ <KEYWORD3>z_stats</KEYWORD3>
+ <KEYWORD1>zombietime</KEYWORD1>
+ <KEYWORD4>shift</KEYWORD4>
+ <KEYWORD4>ctrl</KEYWORD4>
+ <KEYWORD4>space</KEYWORD4>
+ <KEYWORD4>tab</KEYWORD4>
+ <KEYWORD4>enter</KEYWORD4>
+ <KEYWORD4>escape</KEYWORD4>
+ <KEYWORD4>F1</KEYWORD4>
+ <KEYWORD4>F2</KEYWORD4>
+ <KEYWORD4>F3</KEYWORD4>
+ <KEYWORD4>F4</KEYWORD4>
+ <KEYWORD4>F5</KEYWORD4>
+ <KEYWORD4>F6</KEYWORD4>
+ <KEYWORD4>F7</KEYWORD4>
+ <KEYWORD4>F8</KEYWORD4>
+ <KEYWORD4>F9</KEYWORD4>
+ <KEYWORD4>F10</KEYWORD4>
+ <KEYWORD4>F11</KEYWORD4>
+ <KEYWORD4>F12</KEYWORD4>
+ <KEYWORD4>INS</KEYWORD4>
+ <KEYWORD4>DEL</KEYWORD4>
+ <KEYWORD4>PGUP</KEYWORD4>
+ <KEYWORD4>PGDN</KEYWORD4>
+ <KEYWORD4>HOME</KEYWORD4>
+ <KEYWORD4>END</KEYWORD4>
+ <KEYWORD4>MOUSE1</KEYWORD4>
+ <KEYWORD4>MOUSE2</KEYWORD4>
+ <KEYWORD4>uparrow</KEYWORD4>
+ <KEYWORD4>downarrow</KEYWORD4>
+ <KEYWORD4>leftarrow</KEYWORD4>
+ <KEYWORD4>rightarrow</KEYWORD4>
+ <KEYWORD4>mwheelup</KEYWORD4>
+ <KEYWORD4>mwheeldown</KEYWORD4>
+ <KEYWORD4>backspace</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/rcp.xml b/jEdit/modes/rcp.xml
index 177bb12..9345424 100644
--- a/jEdit/modes/rcp.xml
+++ b/jEdit/modes/rcp.xml
@@ -1,318 +1,318 @@
-<?xml version="1.0"?>
-
-<!--
- **
- ** Pilrc *.prc highlight rules for jEdit
- **
- ** Marcin Orlowski - carlos at wfmh.org.pl
- **
- ** v1.0 (2006.04.25)
- **
--->
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <!--
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- -->
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE">
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- </RULES>
-
-
- <RULES>
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- </RULES>
-
-
- <RULES HIGHLIGHT_DIGITS="TRUE">
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="RCP_LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
-
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
-
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <FUNCTION>ALERT</FUNCTION>
- <FUNCTION>APPLICATION</FUNCTION>
- <FUNCTION>APPLICATIONICONNAME</FUNCTION>
- <FUNCTION>AREA</FUNCTION>
- <FUNCTION>BITMAP</FUNCTION>
- <FUNCTION>BITMAPCOLOR</FUNCTION>
- <FUNCTION>BITMAPCOLOR16</FUNCTION>
- <FUNCTION>BITMAPCOLOR16K</FUNCTION>
- <FUNCTION>BITMAPFAMILY</FUNCTION>
- <FUNCTION>BITMAPFAMILYEX</FUNCTION>
- <FUNCTION>BITMAPFAMILYSPECIAL</FUNCTION>
- <FUNCTION>BITMAPGREY</FUNCTION>
- <FUNCTION>BITMAPGREY16</FUNCTION>
- <FUNCTION>BITMAPSCREENFAMILY</FUNCTION>
- <FUNCTION>BOOTSCREENFAMILY</FUNCTION>
- <FUNCTION>BUTTON</FUNCTION>
- <FUNCTION>BUTTONS</FUNCTION>
- <FUNCTION>BYTELIST</FUNCTION>
- <FUNCTION>CATEGORIES</FUNCTION>
- <FUNCTION>CHECKBOX</FUNCTION>
- <FUNCTION>COUNTRYLOCALISATION</FUNCTION>
- <FUNCTION>DATA</FUNCTION>
- <FUNCTION>FEATURE</FUNCTION>
- <FUNCTION>FIELD</FUNCTION>
- <FUNCTION>FONTINDEX</FUNCTION>
- <FUNCTION>FORM</FUNCTION>
- <FUNCTION>FORMBITMAP</FUNCTION>
- <FUNCTION>GADGET</FUNCTION>
- <FUNCTION>GENERATEHEADER</FUNCTION>
- <FUNCTION>GRAFFITIINPUTAREA</FUNCTION>
- <FUNCTION>GRAFFITISTATEINDICATOR</FUNCTION>
- <FUNCTION>HEX</FUNCTION>
- <FUNCTION>ICON</FUNCTION>
- <FUNCTION>ICONFAMILY</FUNCTION>
- <FUNCTION>ICONFAMILYEX</FUNCTION>
- <FUNCTION>INTEGER</FUNCTION>
- <FUNCTION>KEYBOARD</FUNCTION>
- <FUNCTION>LABEL</FUNCTION>
- <FUNCTION>LAUNCHERCATEGORY</FUNCTION>
- <FUNCTION>LIST</FUNCTION>
- <FUNCTION>LONGWORDLIST</FUNCTION>
- <FUNCTION>MENU</FUNCTION>
- <FUNCTION>MENUITEM</FUNCTION>
- <FUNCTION>MESSAGE</FUNCTION>
- <FUNCTION>MIDI</FUNCTION>
- <FUNCTION>NOGRAFFITISTATEINDICATOR</FUNCTION>
- <FUNCTION>PALETTETABLE</FUNCTION>
- <FUNCTION>POPUPLIST</FUNCTION>
- <FUNCTION>POPUPTRIGGER</FUNCTION>
- <FUNCTION>PULLDOWN</FUNCTION>
- <FUNCTION>PUSHBUTTON</FUNCTION>
- <FUNCTION>REPEATBUTTON</FUNCTION>
- <FUNCTION>RESETAUTOID</FUNCTION>
- <FUNCTION>SCROLLBAR</FUNCTION>
- <FUNCTION>SELECTORTRIGGER</FUNCTION>
- <FUNCTION>SLIDER</FUNCTION>
- <FUNCTION>SMALLICON</FUNCTION>
- <FUNCTION>SMALLICONFAMILY</FUNCTION>
- <FUNCTION>SMALLICONFAMILYEX</FUNCTION>
- <FUNCTION>STRING</FUNCTION>
- <FUNCTION>STRINGTABLE</FUNCTION>
- <FUNCTION>TABLE</FUNCTION>
- <FUNCTION>TITLE</FUNCTION>
- <FUNCTION>TRANSLATION</FUNCTION>
- <FUNCTION>TRAP</FUNCTION>
- <FUNCTION>VERSION</FUNCTION>
- <FUNCTION>WORDLIST</FUNCTION>
-
- <KEYWORD1>PREVTOP</KEYWORD1>
- <KEYWORD1>PREVBOTTOM</KEYWORD1>
- <KEYWORD1>PREVLEFT</KEYWORD1>
- <KEYWORD1>PREVRIGHT</KEYWORD1>
- <KEYWORD1>AUTO</KEYWORD1>
- <KEYWORD1>AUTOID</KEYWORD1>
-
- <KEYWORD2>AT</KEYWORD2>
- <KEYWORD2>AUTOSHIFT</KEYWORD2>
- <KEYWORD2>BACKGROUNDID</KEYWORD2>
- <KEYWORD2>BITMAPID</KEYWORD2>
- <KEYWORD2>BOLDFRAME</KEYWORD2>
- <KEYWORD2>BPP</KEYWORD2>
- <KEYWORD2>CHECKED</KEYWORD2>
- <KEYWORD2>COLORTABLE</KEYWORD2>
- <KEYWORD2>COLUMNS</KEYWORD2>
- <KEYWORD2>COLUMNWIDTHS</KEYWORD2>
- <KEYWORD2>COMPRESS</KEYWORD2>
- <KEYWORD2>COMPRESSBEST</KEYWORD2>
- <KEYWORD2>COMPRESSPACKBITS</KEYWORD2>
- <KEYWORD2>COMPRESSRLE</KEYWORD2>
- <KEYWORD2>COMPRESSSCANLINE</KEYWORD2>
- <KEYWORD2>CONFIRMATION</KEYWORD2>
- <KEYWORD2>COUNTRY</KEYWORD2>
- <KEYWORD2>CREATOR</KEYWORD2>
- <KEYWORD2>CURRENCYDECIMALPLACES</KEYWORD2>
- <KEYWORD2>CURRENCYNAME</KEYWORD2>
- <KEYWORD2>CURRENCYSYMBOL</KEYWORD2>
- <KEYWORD2>CURRENCYUNIQUESYMBOL</KEYWORD2>
- <KEYWORD2>DATEFORMAT</KEYWORD2>
- <KEYWORD2>DAYLIGHTSAVINGS</KEYWORD2>
- <KEYWORD2>DEFAULTBTNID</KEYWORD2>
- <KEYWORD2>DEFAULTBUTTON</KEYWORD2>
- <KEYWORD2>DENSITY</KEYWORD2>
- <KEYWORD2>DISABLED</KEYWORD2>
- <KEYWORD2>DYNAMICSIZE</KEYWORD2>
- <KEYWORD2>EDITABLE</KEYWORD2>
- <KEYWORD2>ENTRY</KEYWORD2>
- <KEYWORD2>ERROR</KEYWORD2>
- <KEYWORD2>EXTENDED</KEYWORD2>
- <KEYWORD2>FEEDBACK</KEYWORD2>
- <KEYWORD2>FILE</KEYWORD2>
- <KEYWORD2>FONTID</KEYWORD2>
- <KEYWORD2>FORCECOMPRESS</KEYWORD2>
- <KEYWORD2>FRAME</KEYWORD2>
- <KEYWORD2>GRAFFITI</KEYWORD2>
- <KEYWORD2>GRAPHICAL</KEYWORD2>
- <KEYWORD2>GROUP</KEYWORD2>
- <KEYWORD2>HASSCROLLBAR</KEYWORD2>
- <KEYWORD2>HELPID</KEYWORD2>
- <KEYWORD2>ID</KEYWORD2>
- <KEYWORD2>INDEX</KEYWORD2>
- <KEYWORD2>INFORMATION</KEYWORD2>
- <KEYWORD2>KEYDOWNCHR</KEYWORD2>
- <KEYWORD2>KEYDOWNKEYCODE</KEYWORD2>
- <KEYWORD2>KEYDOWNMODIFIERS</KEYWORD2>
- <KEYWORD2>LANGUAGE</KEYWORD2>
- <KEYWORD2>LEFTALIGN</KEYWORD2>
- <KEYWORD2>LEFTANCHOR</KEYWORD2>
- <KEYWORD2>LONGDATEFORMAT</KEYWORD2>
- <KEYWORD2>MAX</KEYWORD2>
- <KEYWORD2>MAXCHARS</KEYWORD2>
- <KEYWORD2>MEASUREMENTSYSTEM</KEYWORD2>
- <KEYWORD2>MENUID</KEYWORD2>
- <KEYWORD2>MIN</KEYWORD2>
- <KEYWORD2>LOCALE</KEYWORD2>
- <KEYWORD2>MINUTESWESTOFGMT</KEYWORD2>
- <KEYWORD2>MODAL</KEYWORD2>
- <KEYWORD2>MULTIPLELINES</KEYWORD2>
- <KEYWORD2>NAME</KEYWORD2>
- <KEYWORD2>NOCOLORTABLE</KEYWORD2>
- <KEYWORD2>NOCOMPRESS</KEYWORD2>
- <KEYWORD2>NOFRAME</KEYWORD2>
- <KEYWORD2>NONEDITABLE</KEYWORD2>
- <KEYWORD2>NONEXTENDED</KEYWORD2>
- <KEYWORD2>NONUSABLE</KEYWORD2>
- <KEYWORD2>NOSAVEBEHIND</KEYWORD2>
- <KEYWORD2>NUMBER</KEYWORD2>
- <KEYWORD2>NUMBERFORMAT</KEYWORD2>
- <KEYWORD2>NUMERIC</KEYWORD2>
- <KEYWORD2>PAGESIZE</KEYWORD2>
- <KEYWORD2>RECTFRAME</KEYWORD2>
- <KEYWORD2>RIGHTALIGN</KEYWORD2>
- <KEYWORD2>RIGHTANCHOR</KEYWORD2>
- <KEYWORD2>ROWS</KEYWORD2>
- <KEYWORD2>SAVEBEHIND</KEYWORD2>
- <KEYWORD2>SEARCH</KEYWORD2>
- <KEYWORD2>SCREEN</KEYWORD2>
- <KEYWORD2>SELECTEDBITMAPID</KEYWORD2>
- <KEYWORD2>SINGLELINE</KEYWORD2>
- <KEYWORD2>THUMBID</KEYWORD2>
- <KEYWORD2>TRANSPARENTINDEX</KEYWORD2>
- <KEYWORD2>TIMEFORMAT</KEYWORD2>
- <KEYWORD2>UNDERLINED</KEYWORD2>
- <KEYWORD2>USABLE</KEYWORD2>
- <KEYWORD2>VALUE</KEYWORD2>
- <KEYWORD2>VERTICAL</KEYWORD2>
- <KEYWORD2>VISIBLEITEMS</KEYWORD2>
- <KEYWORD2>WARNING</KEYWORD2>
- <KEYWORD2>WEEKSTARTDAY</KEYWORD2>
-
- <KEYWORD2>FONT</KEYWORD2>
- <!-- FONT ID -->
- <KEYWORD2>TRANSPARENT</KEYWORD2>
-
- <KEYWORD3>BEGIN</KEYWORD3>
- <KEYWORD3>END</KEYWORD3>
-
- <!-- Language constructs (24) -->
- <KEYWORD4>#include</KEYWORD4>
- <KEYWORD4>#define</KEYWORD4>
- <KEYWORD4>equ</KEYWORD4>
- <KEYWORD4>#undef</KEYWORD4>
- <KEYWORD4>#ifdef</KEYWORD4>
- <KEYWORD4>#ifndef</KEYWORD4>
- <KEYWORD4>#else</KEYWORD4>
- <KEYWORD4>#endif</KEYWORD4>
-
- <KEYWORD4>package</KEYWORD4>
- <!-- syn region pilrcInclude start="public class" end="}" -->
-
- </KEYWORDS>
- </RULES>
-
- <RULES SET="RCP_LITERAL" ESCAPE="\" DEFAULT="LITERAL1">
- <MARK_FOLLOWING TYPE="KEYWORD3">$</MARK_FOLLOWING>
- <SEQ TYPE="LITERAL1">\</SEQ>
- <SEQ TYPE="LITERAL1">=</SEQ>
- <SEQ TYPE="LITERAL1">!</SEQ>
- <SEQ TYPE="LITERAL1">=</SEQ>
- <SEQ TYPE="LITERAL1">+</SEQ>
- <SEQ TYPE="LITERAL1">-</SEQ>
- <SEQ TYPE="LITERAL1">/</SEQ>
- <SEQ TYPE="LITERAL1">*</SEQ>
- <SEQ TYPE="LITERAL1">%</SEQ>
- <SEQ TYPE="LITERAL1">|</SEQ>
- <SEQ TYPE="LITERAL1">^</SEQ>
- <SEQ TYPE="LITERAL1">~</SEQ>
- <SEQ TYPE="LITERAL1">.</SEQ>
- <SEQ TYPE="LITERAL1">}</SEQ>
- <SEQ TYPE="LITERAL1">{</SEQ>
- <SEQ TYPE="LITERAL1">,</SEQ>
- <SEQ TYPE="LITERAL1">;</SEQ>
- <SEQ TYPE="LITERAL1">]</SEQ>
- <SEQ TYPE="LITERAL1">[</SEQ>
- <SEQ TYPE="LITERAL1">?</SEQ>
- <SEQ TYPE="LITERAL1">@</SEQ>
- <SEQ TYPE="LITERAL1">:</SEQ>
- <SEQ TYPE="LITERAL1">)</SEQ>
- <SEQ TYPE="LITERAL1">'</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!--
+ **
+ ** Pilrc *.prc highlight rules for jEdit
+ **
+ ** Marcin Orlowski - carlos at wfmh.org.pl
+ **
+ ** v1.0 (2006.04.25)
+ **
+-->
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <!--
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ -->
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE">
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ </RULES>
+
+
+ <RULES>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ </RULES>
+
+
+ <RULES HIGHLIGHT_DIGITS="TRUE">
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="RCP_LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <FUNCTION>ALERT</FUNCTION>
+ <FUNCTION>APPLICATION</FUNCTION>
+ <FUNCTION>APPLICATIONICONNAME</FUNCTION>
+ <FUNCTION>AREA</FUNCTION>
+ <FUNCTION>BITMAP</FUNCTION>
+ <FUNCTION>BITMAPCOLOR</FUNCTION>
+ <FUNCTION>BITMAPCOLOR16</FUNCTION>
+ <FUNCTION>BITMAPCOLOR16K</FUNCTION>
+ <FUNCTION>BITMAPFAMILY</FUNCTION>
+ <FUNCTION>BITMAPFAMILYEX</FUNCTION>
+ <FUNCTION>BITMAPFAMILYSPECIAL</FUNCTION>
+ <FUNCTION>BITMAPGREY</FUNCTION>
+ <FUNCTION>BITMAPGREY16</FUNCTION>
+ <FUNCTION>BITMAPSCREENFAMILY</FUNCTION>
+ <FUNCTION>BOOTSCREENFAMILY</FUNCTION>
+ <FUNCTION>BUTTON</FUNCTION>
+ <FUNCTION>BUTTONS</FUNCTION>
+ <FUNCTION>BYTELIST</FUNCTION>
+ <FUNCTION>CATEGORIES</FUNCTION>
+ <FUNCTION>CHECKBOX</FUNCTION>
+ <FUNCTION>COUNTRYLOCALISATION</FUNCTION>
+ <FUNCTION>DATA</FUNCTION>
+ <FUNCTION>FEATURE</FUNCTION>
+ <FUNCTION>FIELD</FUNCTION>
+ <FUNCTION>FONTINDEX</FUNCTION>
+ <FUNCTION>FORM</FUNCTION>
+ <FUNCTION>FORMBITMAP</FUNCTION>
+ <FUNCTION>GADGET</FUNCTION>
+ <FUNCTION>GENERATEHEADER</FUNCTION>
+ <FUNCTION>GRAFFITIINPUTAREA</FUNCTION>
+ <FUNCTION>GRAFFITISTATEINDICATOR</FUNCTION>
+ <FUNCTION>HEX</FUNCTION>
+ <FUNCTION>ICON</FUNCTION>
+ <FUNCTION>ICONFAMILY</FUNCTION>
+ <FUNCTION>ICONFAMILYEX</FUNCTION>
+ <FUNCTION>INTEGER</FUNCTION>
+ <FUNCTION>KEYBOARD</FUNCTION>
+ <FUNCTION>LABEL</FUNCTION>
+ <FUNCTION>LAUNCHERCATEGORY</FUNCTION>
+ <FUNCTION>LIST</FUNCTION>
+ <FUNCTION>LONGWORDLIST</FUNCTION>
+ <FUNCTION>MENU</FUNCTION>
+ <FUNCTION>MENUITEM</FUNCTION>
+ <FUNCTION>MESSAGE</FUNCTION>
+ <FUNCTION>MIDI</FUNCTION>
+ <FUNCTION>NOGRAFFITISTATEINDICATOR</FUNCTION>
+ <FUNCTION>PALETTETABLE</FUNCTION>
+ <FUNCTION>POPUPLIST</FUNCTION>
+ <FUNCTION>POPUPTRIGGER</FUNCTION>
+ <FUNCTION>PULLDOWN</FUNCTION>
+ <FUNCTION>PUSHBUTTON</FUNCTION>
+ <FUNCTION>REPEATBUTTON</FUNCTION>
+ <FUNCTION>RESETAUTOID</FUNCTION>
+ <FUNCTION>SCROLLBAR</FUNCTION>
+ <FUNCTION>SELECTORTRIGGER</FUNCTION>
+ <FUNCTION>SLIDER</FUNCTION>
+ <FUNCTION>SMALLICON</FUNCTION>
+ <FUNCTION>SMALLICONFAMILY</FUNCTION>
+ <FUNCTION>SMALLICONFAMILYEX</FUNCTION>
+ <FUNCTION>STRING</FUNCTION>
+ <FUNCTION>STRINGTABLE</FUNCTION>
+ <FUNCTION>TABLE</FUNCTION>
+ <FUNCTION>TITLE</FUNCTION>
+ <FUNCTION>TRANSLATION</FUNCTION>
+ <FUNCTION>TRAP</FUNCTION>
+ <FUNCTION>VERSION</FUNCTION>
+ <FUNCTION>WORDLIST</FUNCTION>
+
+ <KEYWORD1>PREVTOP</KEYWORD1>
+ <KEYWORD1>PREVBOTTOM</KEYWORD1>
+ <KEYWORD1>PREVLEFT</KEYWORD1>
+ <KEYWORD1>PREVRIGHT</KEYWORD1>
+ <KEYWORD1>AUTO</KEYWORD1>
+ <KEYWORD1>AUTOID</KEYWORD1>
+
+ <KEYWORD2>AT</KEYWORD2>
+ <KEYWORD2>AUTOSHIFT</KEYWORD2>
+ <KEYWORD2>BACKGROUNDID</KEYWORD2>
+ <KEYWORD2>BITMAPID</KEYWORD2>
+ <KEYWORD2>BOLDFRAME</KEYWORD2>
+ <KEYWORD2>BPP</KEYWORD2>
+ <KEYWORD2>CHECKED</KEYWORD2>
+ <KEYWORD2>COLORTABLE</KEYWORD2>
+ <KEYWORD2>COLUMNS</KEYWORD2>
+ <KEYWORD2>COLUMNWIDTHS</KEYWORD2>
+ <KEYWORD2>COMPRESS</KEYWORD2>
+ <KEYWORD2>COMPRESSBEST</KEYWORD2>
+ <KEYWORD2>COMPRESSPACKBITS</KEYWORD2>
+ <KEYWORD2>COMPRESSRLE</KEYWORD2>
+ <KEYWORD2>COMPRESSSCANLINE</KEYWORD2>
+ <KEYWORD2>CONFIRMATION</KEYWORD2>
+ <KEYWORD2>COUNTRY</KEYWORD2>
+ <KEYWORD2>CREATOR</KEYWORD2>
+ <KEYWORD2>CURRENCYDECIMALPLACES</KEYWORD2>
+ <KEYWORD2>CURRENCYNAME</KEYWORD2>
+ <KEYWORD2>CURRENCYSYMBOL</KEYWORD2>
+ <KEYWORD2>CURRENCYUNIQUESYMBOL</KEYWORD2>
+ <KEYWORD2>DATEFORMAT</KEYWORD2>
+ <KEYWORD2>DAYLIGHTSAVINGS</KEYWORD2>
+ <KEYWORD2>DEFAULTBTNID</KEYWORD2>
+ <KEYWORD2>DEFAULTBUTTON</KEYWORD2>
+ <KEYWORD2>DENSITY</KEYWORD2>
+ <KEYWORD2>DISABLED</KEYWORD2>
+ <KEYWORD2>DYNAMICSIZE</KEYWORD2>
+ <KEYWORD2>EDITABLE</KEYWORD2>
+ <KEYWORD2>ENTRY</KEYWORD2>
+ <KEYWORD2>ERROR</KEYWORD2>
+ <KEYWORD2>EXTENDED</KEYWORD2>
+ <KEYWORD2>FEEDBACK</KEYWORD2>
+ <KEYWORD2>FILE</KEYWORD2>
+ <KEYWORD2>FONTID</KEYWORD2>
+ <KEYWORD2>FORCECOMPRESS</KEYWORD2>
+ <KEYWORD2>FRAME</KEYWORD2>
+ <KEYWORD2>GRAFFITI</KEYWORD2>
+ <KEYWORD2>GRAPHICAL</KEYWORD2>
+ <KEYWORD2>GROUP</KEYWORD2>
+ <KEYWORD2>HASSCROLLBAR</KEYWORD2>
+ <KEYWORD2>HELPID</KEYWORD2>
+ <KEYWORD2>ID</KEYWORD2>
+ <KEYWORD2>INDEX</KEYWORD2>
+ <KEYWORD2>INFORMATION</KEYWORD2>
+ <KEYWORD2>KEYDOWNCHR</KEYWORD2>
+ <KEYWORD2>KEYDOWNKEYCODE</KEYWORD2>
+ <KEYWORD2>KEYDOWNMODIFIERS</KEYWORD2>
+ <KEYWORD2>LANGUAGE</KEYWORD2>
+ <KEYWORD2>LEFTALIGN</KEYWORD2>
+ <KEYWORD2>LEFTANCHOR</KEYWORD2>
+ <KEYWORD2>LONGDATEFORMAT</KEYWORD2>
+ <KEYWORD2>MAX</KEYWORD2>
+ <KEYWORD2>MAXCHARS</KEYWORD2>
+ <KEYWORD2>MEASUREMENTSYSTEM</KEYWORD2>
+ <KEYWORD2>MENUID</KEYWORD2>
+ <KEYWORD2>MIN</KEYWORD2>
+ <KEYWORD2>LOCALE</KEYWORD2>
+ <KEYWORD2>MINUTESWESTOFGMT</KEYWORD2>
+ <KEYWORD2>MODAL</KEYWORD2>
+ <KEYWORD2>MULTIPLELINES</KEYWORD2>
+ <KEYWORD2>NAME</KEYWORD2>
+ <KEYWORD2>NOCOLORTABLE</KEYWORD2>
+ <KEYWORD2>NOCOMPRESS</KEYWORD2>
+ <KEYWORD2>NOFRAME</KEYWORD2>
+ <KEYWORD2>NONEDITABLE</KEYWORD2>
+ <KEYWORD2>NONEXTENDED</KEYWORD2>
+ <KEYWORD2>NONUSABLE</KEYWORD2>
+ <KEYWORD2>NOSAVEBEHIND</KEYWORD2>
+ <KEYWORD2>NUMBER</KEYWORD2>
+ <KEYWORD2>NUMBERFORMAT</KEYWORD2>
+ <KEYWORD2>NUMERIC</KEYWORD2>
+ <KEYWORD2>PAGESIZE</KEYWORD2>
+ <KEYWORD2>RECTFRAME</KEYWORD2>
+ <KEYWORD2>RIGHTALIGN</KEYWORD2>
+ <KEYWORD2>RIGHTANCHOR</KEYWORD2>
+ <KEYWORD2>ROWS</KEYWORD2>
+ <KEYWORD2>SAVEBEHIND</KEYWORD2>
+ <KEYWORD2>SEARCH</KEYWORD2>
+ <KEYWORD2>SCREEN</KEYWORD2>
+ <KEYWORD2>SELECTEDBITMAPID</KEYWORD2>
+ <KEYWORD2>SINGLELINE</KEYWORD2>
+ <KEYWORD2>THUMBID</KEYWORD2>
+ <KEYWORD2>TRANSPARENTINDEX</KEYWORD2>
+ <KEYWORD2>TIMEFORMAT</KEYWORD2>
+ <KEYWORD2>UNDERLINED</KEYWORD2>
+ <KEYWORD2>USABLE</KEYWORD2>
+ <KEYWORD2>VALUE</KEYWORD2>
+ <KEYWORD2>VERTICAL</KEYWORD2>
+ <KEYWORD2>VISIBLEITEMS</KEYWORD2>
+ <KEYWORD2>WARNING</KEYWORD2>
+ <KEYWORD2>WEEKSTARTDAY</KEYWORD2>
+
+ <KEYWORD2>FONT</KEYWORD2>
+ <!-- FONT ID -->
+ <KEYWORD2>TRANSPARENT</KEYWORD2>
+
+ <KEYWORD3>BEGIN</KEYWORD3>
+ <KEYWORD3>END</KEYWORD3>
+
+ <!-- Language constructs (24) -->
+ <KEYWORD4>#include</KEYWORD4>
+ <KEYWORD4>#define</KEYWORD4>
+ <KEYWORD4>equ</KEYWORD4>
+ <KEYWORD4>#undef</KEYWORD4>
+ <KEYWORD4>#ifdef</KEYWORD4>
+ <KEYWORD4>#ifndef</KEYWORD4>
+ <KEYWORD4>#else</KEYWORD4>
+ <KEYWORD4>#endif</KEYWORD4>
+
+ <KEYWORD4>package</KEYWORD4>
+ <!-- syn region pilrcInclude start="public class" end="}" -->
+
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="RCP_LITERAL" ESCAPE="\" DEFAULT="LITERAL1">
+ <MARK_FOLLOWING TYPE="KEYWORD3">$</MARK_FOLLOWING>
+ <SEQ TYPE="LITERAL1">\</SEQ>
+ <SEQ TYPE="LITERAL1">=</SEQ>
+ <SEQ TYPE="LITERAL1">!</SEQ>
+ <SEQ TYPE="LITERAL1">=</SEQ>
+ <SEQ TYPE="LITERAL1">+</SEQ>
+ <SEQ TYPE="LITERAL1">-</SEQ>
+ <SEQ TYPE="LITERAL1">/</SEQ>
+ <SEQ TYPE="LITERAL1">*</SEQ>
+ <SEQ TYPE="LITERAL1">%</SEQ>
+ <SEQ TYPE="LITERAL1">|</SEQ>
+ <SEQ TYPE="LITERAL1">^</SEQ>
+ <SEQ TYPE="LITERAL1">~</SEQ>
+ <SEQ TYPE="LITERAL1">.</SEQ>
+ <SEQ TYPE="LITERAL1">}</SEQ>
+ <SEQ TYPE="LITERAL1">{</SEQ>
+ <SEQ TYPE="LITERAL1">,</SEQ>
+ <SEQ TYPE="LITERAL1">;</SEQ>
+ <SEQ TYPE="LITERAL1">]</SEQ>
+ <SEQ TYPE="LITERAL1">[</SEQ>
+ <SEQ TYPE="LITERAL1">?</SEQ>
+ <SEQ TYPE="LITERAL1">@</SEQ>
+ <SEQ TYPE="LITERAL1">:</SEQ>
+ <SEQ TYPE="LITERAL1">)</SEQ>
+ <SEQ TYPE="LITERAL1">'</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/rd.xml b/jEdit/modes/rd.xml
index 2353961..c2bb551 100644
--- a/jEdit/modes/rd.xml
+++ b/jEdit/modes/rd.xml
@@ -1,70 +1,70 @@
-<?xml version="1.0" ?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <KEYWORDS>
- <KEYWORD1>\name</KEYWORD1>
- <KEYWORD1>\alias</KEYWORD1>
- <KEYWORD1>\title</KEYWORD1>
- <KEYWORD1>\description</KEYWORD1>
- <KEYWORD1>\synopsis</KEYWORD1>
- <KEYWORD1>\usage</KEYWORD1>
- <KEYWORD1>\arguments</KEYWORD1>
- <KEYWORD1>\details</KEYWORD1>
- <KEYWORD1>\value</KEYWORD1>
- <KEYWORD1>\references</KEYWORD1>
- <KEYWORD1>\note</KEYWORD1>
- <KEYWORD1>\author</KEYWORD1>
- <KEYWORD1>\seealso</KEYWORD1>
- <KEYWORD1>\examples</KEYWORD1>
- <KEYWORD1>\keyword</KEYWORD1>
- <KEYWORD2>\itemize</KEYWORD2>
- <KEYWORD2>\method</KEYWORD2>
- <KEYWORD2>\docType</KEYWORD2>
- <KEYWORD2>\format</KEYWORD2>
- <KEYWORD2>\source</KEYWORD2>
- <KEYWORD2>\itemize</KEYWORD2>
- <KEYWORD2>\section</KEYWORD2>
- <KEYWORD2>\enumerate</KEYWORD2>
- <KEYWORD2>\describe</KEYWORD2>
- <KEYWORD2>\tabular</KEYWORD2>
- <KEYWORD2>\link</KEYWORD2>
- <KEYWORD2>\item</KEYWORD2>
- <KEYWORD2>\eqn</KEYWORD2>
- <KEYWORD2>\deqn</KEYWORD2>
- <KEYWORD2>\concept</KEYWORD2>
- <KEYWORD3>\emph</KEYWORD3>
- <KEYWORD3>\strong</KEYWORD3>
- <KEYWORD3>\bold</KEYWORD3>
- <KEYWORD3>\sQuote</KEYWORD3>
- <KEYWORD3>\dQuote</KEYWORD3>
- <KEYWORD3>\code</KEYWORD3>
- <KEYWORD3>\preformatted</KEYWORD3>
- <KEYWORD3>\kbd</KEYWORD3>
- <KEYWORD3>\samp</KEYWORD3>
- <KEYWORD3>\pkg</KEYWORD3>
- <KEYWORD3>\file</KEYWORD3>
- <KEYWORD3>\email</KEYWORD3>
- <KEYWORD3>\url</KEYWORD3>
- <KEYWORD3>\var</KEYWORD3>
- <KEYWORD3>\env</KEYWORD3>
- <KEYWORD3>\option</KEYWORD3>
- <KEYWORD3>\command</KEYWORD3>
- <KEYWORD3>\dfn</KEYWORD3>
- <KEYWORD3>\cite</KEYWORD3>
- <KEYWORD3>\acronym</KEYWORD3>
- <KEYWORD3>\tab</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0" ?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <KEYWORDS>
+ <KEYWORD1>\name</KEYWORD1>
+ <KEYWORD1>\alias</KEYWORD1>
+ <KEYWORD1>\title</KEYWORD1>
+ <KEYWORD1>\description</KEYWORD1>
+ <KEYWORD1>\synopsis</KEYWORD1>
+ <KEYWORD1>\usage</KEYWORD1>
+ <KEYWORD1>\arguments</KEYWORD1>
+ <KEYWORD1>\details</KEYWORD1>
+ <KEYWORD1>\value</KEYWORD1>
+ <KEYWORD1>\references</KEYWORD1>
+ <KEYWORD1>\note</KEYWORD1>
+ <KEYWORD1>\author</KEYWORD1>
+ <KEYWORD1>\seealso</KEYWORD1>
+ <KEYWORD1>\examples</KEYWORD1>
+ <KEYWORD1>\keyword</KEYWORD1>
+ <KEYWORD2>\itemize</KEYWORD2>
+ <KEYWORD2>\method</KEYWORD2>
+ <KEYWORD2>\docType</KEYWORD2>
+ <KEYWORD2>\format</KEYWORD2>
+ <KEYWORD2>\source</KEYWORD2>
+ <KEYWORD2>\itemize</KEYWORD2>
+ <KEYWORD2>\section</KEYWORD2>
+ <KEYWORD2>\enumerate</KEYWORD2>
+ <KEYWORD2>\describe</KEYWORD2>
+ <KEYWORD2>\tabular</KEYWORD2>
+ <KEYWORD2>\link</KEYWORD2>
+ <KEYWORD2>\item</KEYWORD2>
+ <KEYWORD2>\eqn</KEYWORD2>
+ <KEYWORD2>\deqn</KEYWORD2>
+ <KEYWORD2>\concept</KEYWORD2>
+ <KEYWORD3>\emph</KEYWORD3>
+ <KEYWORD3>\strong</KEYWORD3>
+ <KEYWORD3>\bold</KEYWORD3>
+ <KEYWORD3>\sQuote</KEYWORD3>
+ <KEYWORD3>\dQuote</KEYWORD3>
+ <KEYWORD3>\code</KEYWORD3>
+ <KEYWORD3>\preformatted</KEYWORD3>
+ <KEYWORD3>\kbd</KEYWORD3>
+ <KEYWORD3>\samp</KEYWORD3>
+ <KEYWORD3>\pkg</KEYWORD3>
+ <KEYWORD3>\file</KEYWORD3>
+ <KEYWORD3>\email</KEYWORD3>
+ <KEYWORD3>\url</KEYWORD3>
+ <KEYWORD3>\var</KEYWORD3>
+ <KEYWORD3>\env</KEYWORD3>
+ <KEYWORD3>\option</KEYWORD3>
+ <KEYWORD3>\command</KEYWORD3>
+ <KEYWORD3>\dfn</KEYWORD3>
+ <KEYWORD3>\cite</KEYWORD3>
+ <KEYWORD3>\acronym</KEYWORD3>
+ <KEYWORD3>\tab</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/rebol.xml b/jEdit/modes/rebol.xml
index 69609d0..f21d463 100644
--- a/jEdit/modes/rebol.xml
+++ b/jEdit/modes/rebol.xml
@@ -1,546 +1,546 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{[(" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}])" />
- <PROPERTY NAME="commentStart" VALUE="comment {" />
- <PROPERTY NAME="commentEnd" VALUE="}" />
- <PROPERTY NAME="lineComment" VALUE=";" />
- <PROPERTY NAME="noWordSep" VALUE="_-" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
- <!-- Javadoc comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>comment {</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>comment{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
-
- <MARK_FOLLOWING TYPE="LITERAL2" MATCH_TYPE="OPERATOR">'</MARK_FOLLOWING>
-
- <KEYWORDS>
- <KEYWORD1>abs</KEYWORD1>
- <KEYWORD1>absolute</KEYWORD1>
- <KEYWORD1>add</KEYWORD1>
- <KEYWORD1>and~</KEYWORD1>
- <KEYWORD1>at</KEYWORD1>
- <KEYWORD1>back</KEYWORD1>
- <KEYWORD1>change</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>complement</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>cp</KEYWORD1>
- <KEYWORD1>divide</KEYWORD1>
- <KEYWORD1>fifth</KEYWORD1>
- <KEYWORD1>find</KEYWORD1>
- <KEYWORD1>first</KEYWORD1>
- <KEYWORD1>fourth</KEYWORD1>
- <KEYWORD1>head</KEYWORD1>
- <KEYWORD1>insert</KEYWORD1>
- <KEYWORD1>last</KEYWORD1>
- <KEYWORD1>make</KEYWORD1>
- <KEYWORD1>max</KEYWORD1>
- <KEYWORD1>maximum</KEYWORD1>
- <KEYWORD1>min</KEYWORD1>
- <KEYWORD1>minimum</KEYWORD1>
- <KEYWORD1>multiply</KEYWORD1>
- <KEYWORD1>negate</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>or~</KEYWORD1>
- <KEYWORD1>pick</KEYWORD1>
- <KEYWORD1>poke</KEYWORD1>
- <KEYWORD1>power</KEYWORD1>
- <KEYWORD1>random</KEYWORD1>
- <KEYWORD1>remainder</KEYWORD1>
- <KEYWORD1>remove</KEYWORD1>
- <KEYWORD1>second</KEYWORD1>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>skip</KEYWORD1>
- <KEYWORD1>sort</KEYWORD1>
- <KEYWORD1>subtract</KEYWORD1>
- <KEYWORD1>tail</KEYWORD1>
- <KEYWORD1>third</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>trim</KEYWORD1>
- <KEYWORD1>xor~</KEYWORD1>
- <KEYWORD1>alias</KEYWORD1>
- <KEYWORD1>all</KEYWORD1>
- <KEYWORD1>any</KEYWORD1>
- <KEYWORD1>arccosine</KEYWORD1>
- <KEYWORD1>arcsine</KEYWORD1>
- <KEYWORD1>arctangent</KEYWORD1>
- <KEYWORD1>bind</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>browse</KEYWORD1>
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>caret-to-offset</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>checksum</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>comment</KEYWORD1>
- <KEYWORD1>compose</KEYWORD1>
- <KEYWORD1>compress</KEYWORD1>
- <KEYWORD1>cosine</KEYWORD1>
- <KEYWORD1>debase</KEYWORD1>
- <KEYWORD1>decompress</KEYWORD1>
- <KEYWORD1>dehex</KEYWORD1>
- <KEYWORD1>detab</KEYWORD1>
- <KEYWORD1>dh-compute-key</KEYWORD1>
- <KEYWORD1>dh-generate-key</KEYWORD1>
- <KEYWORD1>dh-make-key</KEYWORD1>
- <KEYWORD1>difference</KEYWORD1>
- <KEYWORD1>disarm</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>dsa-generate-key</KEYWORD1>
- <KEYWORD1>dsa-make-key</KEYWORD1>
- <KEYWORD1>dsa-make-signature</KEYWORD1>
- <KEYWORD1>dsa-verify-signature</KEYWORD1>
- <KEYWORD1>either</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>enbase</KEYWORD1>
- <KEYWORD1>entab</KEYWORD1>
- <KEYWORD1>exclude</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>exp</KEYWORD1>
- <KEYWORD1>foreach</KEYWORD1>
- <KEYWORD1>form</KEYWORD1>
- <KEYWORD1>free</KEYWORD1>
- <KEYWORD1>get</KEYWORD1>
- <KEYWORD1>get-modes</KEYWORD1>
- <KEYWORD1>halt</KEYWORD1>
- <KEYWORD1>hide</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>intersect</KEYWORD1>
- <KEYWORD1>load</KEYWORD1>
- <KEYWORD1>log-10</KEYWORD1>
- <KEYWORD1>log-2</KEYWORD1>
- <KEYWORD1>log-e</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
- <KEYWORD1>lowercase</KEYWORD1>
- <KEYWORD1>maximum-of</KEYWORD1>
- <KEYWORD1>minimum-of</KEYWORD1>
- <KEYWORD1>mold</KEYWORD1>
- <KEYWORD1>not</KEYWORD1>
- <KEYWORD1>now</KEYWORD1>
- <KEYWORD1>offset-to-caret</KEYWORD1>
- <KEYWORD1>open</KEYWORD1>
- <KEYWORD1>parse</KEYWORD1>
- <KEYWORD1>prin</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>protect</KEYWORD1>
- <KEYWORD1>q</KEYWORD1>
- <KEYWORD1>query</KEYWORD1>
- <KEYWORD1>quit</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>read-io</KEYWORD1>
- <KEYWORD1>recycle</KEYWORD1>
- <KEYWORD1>reduce</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>reverse</KEYWORD1>
- <KEYWORD1>rsa-encrypt</KEYWORD1>
- <KEYWORD1>rsa-generate-key</KEYWORD1>
- <KEYWORD1>rsa-make-key</KEYWORD1>
- <KEYWORD1>save</KEYWORD1>
- <KEYWORD1>secure</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>set-modes</KEYWORD1>
- <KEYWORD1>show</KEYWORD1>
- <KEYWORD1>sine</KEYWORD1>
- <KEYWORD1>size-text</KEYWORD1>
- <KEYWORD1>square-root</KEYWORD1>
- <KEYWORD1>tangent</KEYWORD1>
- <KEYWORD1>textinfo</KEYWORD1>
- <KEYWORD1>throw</KEYWORD1>
- <KEYWORD1>to-hex</KEYWORD1>
- <KEYWORD1>to-local-file</KEYWORD1>
- <KEYWORD1>to-rebol-file</KEYWORD1>
- <KEYWORD1>trace</KEYWORD1>
- <KEYWORD1>try</KEYWORD1>
- <KEYWORD1>union</KEYWORD1>
- <KEYWORD1>unique</KEYWORD1>
- <KEYWORD1>unprotect</KEYWORD1>
- <KEYWORD1>unset</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>update</KEYWORD1>
- <KEYWORD1>uppercase</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
- <KEYWORD1>wait</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>write</KEYWORD1>
- <KEYWORD1>write-io</KEYWORD1>
- <KEYWORD1>basic-syntax-header</KEYWORD1>
- <KEYWORD1>crlf</KEYWORD1>
- <KEYWORD1>font-fixed</KEYWORD1>
- <KEYWORD1>font-sans-serif</KEYWORD1>
- <KEYWORD1>font-serif</KEYWORD1>
- <KEYWORD1>list-words</KEYWORD1>
- <KEYWORD1>outstr</KEYWORD1>
- <KEYWORD1>val</KEYWORD1>
- <KEYWORD1>value</KEYWORD1>
- <KEYWORD1>about</KEYWORD1>
- <KEYWORD1>alert</KEYWORD1>
- <KEYWORD1>alter</KEYWORD1>
- <KEYWORD1>append</KEYWORD1>
- <KEYWORD1>array</KEYWORD1>
- <KEYWORD1>ask</KEYWORD1>
- <KEYWORD1>boot-prefs</KEYWORD1>
- <KEYWORD1>build-tag</KEYWORD1>
- <KEYWORD1>center-face</KEYWORD1>
- <KEYWORD1>change-dir</KEYWORD1>
- <KEYWORD1>charset</KEYWORD1>
- <KEYWORD1>choose</KEYWORD1>
- <KEYWORD1>clean-path</KEYWORD1>
- <KEYWORD1>clear-fields</KEYWORD1>
- <KEYWORD1>confine</KEYWORD1>
- <KEYWORD1>confirm</KEYWORD1>
- <KEYWORD1>context</KEYWORD1>
- <KEYWORD1>cvs-date</KEYWORD1>
- <KEYWORD1>cvs-version</KEYWORD1>
- <KEYWORD1>decode-cgi</KEYWORD1>
- <KEYWORD1>decode-url</KEYWORD1>
- <KEYWORD1>deflag-face</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD1>demo</KEYWORD1>
- <KEYWORD1>desktop</KEYWORD1>
- <KEYWORD1>dirize</KEYWORD1>
- <KEYWORD1>dispatch</KEYWORD1>
- <KEYWORD1>do-boot</KEYWORD1>
- <KEYWORD1>do-events</KEYWORD1>
- <KEYWORD1>do-face</KEYWORD1>
- <KEYWORD1>do-face-alt</KEYWORD1>
- <KEYWORD1>does</KEYWORD1>
- <KEYWORD1>dump-face</KEYWORD1>
- <KEYWORD1>dump-pane</KEYWORD1>
- <KEYWORD1>echo</KEYWORD1>
- <KEYWORD1>editor</KEYWORD1>
- <KEYWORD1>emailer</KEYWORD1>
- <KEYWORD1>emit</KEYWORD1>
- <KEYWORD1>extract</KEYWORD1>
- <KEYWORD1>find-by-type</KEYWORD1>
- <KEYWORD1>find-key-face</KEYWORD1>
- <KEYWORD1>find-window</KEYWORD1>
- <KEYWORD1>flag-face</KEYWORD1>
- <KEYWORD1>flash</KEYWORD1>
- <KEYWORD1>focus</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>forall</KEYWORD1>
- <KEYWORD1>forever</KEYWORD1>
- <KEYWORD1>forskip</KEYWORD1>
- <KEYWORD1>func</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>get-net-info</KEYWORD1>
- <KEYWORD1>get-style</KEYWORD1>
- <KEYWORD1>has</KEYWORD1>
- <KEYWORD1>help</KEYWORD1>
- <KEYWORD1>hide-popup</KEYWORD1>
- <KEYWORD1>import-email</KEYWORD1>
- <KEYWORD1>inform</KEYWORD1>
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD1>insert-event-func</KEYWORD1>
- <KEYWORD1>join</KEYWORD1>
- <KEYWORD1>launch</KEYWORD1>
- <KEYWORD1>launch-thru</KEYWORD1>
- <KEYWORD1>layout</KEYWORD1>
- <KEYWORD1>license</KEYWORD1>
- <KEYWORD1>list-dir</KEYWORD1>
- <KEYWORD1>load-image</KEYWORD1>
- <KEYWORD1>load-prefs</KEYWORD1>
- <KEYWORD1>load-thru</KEYWORD1>
- <KEYWORD1>make-dir</KEYWORD1>
- <KEYWORD1>make-face</KEYWORD1>
- <KEYWORD1>net-error</KEYWORD1>
- <KEYWORD1>open-events</KEYWORD1>
- <KEYWORD1>parse-email-addrs</KEYWORD1>
- <KEYWORD1>parse-header</KEYWORD1>
- <KEYWORD1>parse-header-date</KEYWORD1>
- <KEYWORD1>parse-xml</KEYWORD1>
- <KEYWORD1>path-thru</KEYWORD1>
- <KEYWORD1>probe</KEYWORD1>
- <KEYWORD1>protect-system</KEYWORD1>
- <KEYWORD1>read-net</KEYWORD1>
- <KEYWORD1>read-thru</KEYWORD1>
- <KEYWORD1>reboot</KEYWORD1>
- <KEYWORD1>reform</KEYWORD1>
- <KEYWORD1>rejoin</KEYWORD1>
- <KEYWORD1>remold</KEYWORD1>
- <KEYWORD1>remove-event-func</KEYWORD1>
- <KEYWORD1>rename</KEYWORD1>
- <KEYWORD1>repend</KEYWORD1>
- <KEYWORD1>replace</KEYWORD1>
- <KEYWORD1>request</KEYWORD1>
- <KEYWORD1>request-color</KEYWORD1>
- <KEYWORD1>request-date</KEYWORD1>
- <KEYWORD1>request-download</KEYWORD1>
- <KEYWORD1>request-file</KEYWORD1>
- <KEYWORD1>request-list</KEYWORD1>
- <KEYWORD1>request-pass</KEYWORD1>
- <KEYWORD1>request-text</KEYWORD1>
- <KEYWORD1>resend</KEYWORD1>
- <KEYWORD1>save-prefs</KEYWORD1>
- <KEYWORD1>save-user</KEYWORD1>
- <KEYWORD1>scroll-para</KEYWORD1>
- <KEYWORD1>send</KEYWORD1>
- <KEYWORD1>set-font</KEYWORD1>
- <KEYWORD1>set-net</KEYWORD1>
- <KEYWORD1>set-para</KEYWORD1>
- <KEYWORD1>set-style</KEYWORD1>
- <KEYWORD1>set-user</KEYWORD1>
- <KEYWORD1>set-user-name</KEYWORD1>
- <KEYWORD1>show-popup</KEYWORD1>
- <KEYWORD1>source</KEYWORD1>
- <KEYWORD1>split-path</KEYWORD1>
- <KEYWORD1>stylize</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>throw-on-error</KEYWORD1>
- <KEYWORD1>to-binary</KEYWORD1>
- <KEYWORD1>to-bitset</KEYWORD1>
- <KEYWORD1>to-block</KEYWORD1>
- <KEYWORD1>to-char</KEYWORD1>
- <KEYWORD1>to-date</KEYWORD1>
- <KEYWORD1>to-decimal</KEYWORD1>
- <KEYWORD1>to-email</KEYWORD1>
- <KEYWORD1>to-event</KEYWORD1>
- <KEYWORD1>to-file</KEYWORD1>
- <KEYWORD1>to-get-word</KEYWORD1>
- <KEYWORD1>to-hash</KEYWORD1>
- <KEYWORD1>to-idate</KEYWORD1>
- <KEYWORD1>to-image</KEYWORD1>
- <KEYWORD1>to-integer</KEYWORD1>
- <KEYWORD1>to-issue</KEYWORD1>
- <KEYWORD1>to-list</KEYWORD1>
- <KEYWORD1>to-lit-path</KEYWORD1>
- <KEYWORD1>to-lit-word</KEYWORD1>
- <KEYWORD1>to-logic</KEYWORD1>
- <KEYWORD1>to-money</KEYWORD1>
- <KEYWORD1>to-none</KEYWORD1>
- <KEYWORD1>to-pair</KEYWORD1>
- <KEYWORD1>to-paren</KEYWORD1>
- <KEYWORD1>to-path</KEYWORD1>
- <KEYWORD1>to-refinement</KEYWORD1>
- <KEYWORD1>to-set-path</KEYWORD1>
- <KEYWORD1>to-set-word</KEYWORD1>
- <KEYWORD1>to-string</KEYWORD1>
- <KEYWORD1>to-tag</KEYWORD1>
- <KEYWORD1>to-time</KEYWORD1>
- <KEYWORD1>to-tuple</KEYWORD1>
- <KEYWORD1>to-url</KEYWORD1>
- <KEYWORD1>to-word</KEYWORD1>
- <KEYWORD1>unfocus</KEYWORD1>
- <KEYWORD1>uninstall</KEYWORD1>
- <KEYWORD1>unview</KEYWORD1>
- <KEYWORD1>upgrade</KEYWORD1>
- <KEYWORD1>Usage</KEYWORD1>
- <KEYWORD1>vbug</KEYWORD1>
- <KEYWORD1>view</KEYWORD1>
- <KEYWORD1>view-install</KEYWORD1>
- <KEYWORD1>view-prefs</KEYWORD1>
- <KEYWORD1>what</KEYWORD1>
- <KEYWORD1>what-dir</KEYWORD1>
- <KEYWORD1>write-user</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>at</KEYWORD1>
- <KEYWORD1>space</KEYWORD1>
- <KEYWORD1>pad</KEYWORD1>
- <KEYWORD1>across</KEYWORD1>
- <KEYWORD1>below</KEYWORD1>
- <KEYWORD1>origin</KEYWORD1>
- <KEYWORD1>guide</KEYWORD1>
- <KEYWORD1>tabs</KEYWORD1>
- <KEYWORD1>indent</KEYWORD1>
- <KEYWORD1>style</KEYWORD1>
- <KEYWORD1>styles</KEYWORD1>
- <KEYWORD1>size</KEYWORD1>
- <KEYWORD1>sense</KEYWORD1>
- <KEYWORD1>backcolor</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>none</KEYWORD1>
- <KEYWORD2>action?</KEYWORD2>
- <KEYWORD2>any-block?</KEYWORD2>
- <KEYWORD2>any-function?</KEYWORD2>
- <KEYWORD2>any-string?</KEYWORD2>
- <KEYWORD2>any-type?</KEYWORD2>
- <KEYWORD2>any-word?</KEYWORD2>
- <KEYWORD2>binary?</KEYWORD2>
- <KEYWORD2>bitset?</KEYWORD2>
- <KEYWORD2>block?</KEYWORD2>
- <KEYWORD2>char?</KEYWORD2>
- <KEYWORD2>datatype?</KEYWORD2>
- <KEYWORD2>date?</KEYWORD2>
- <KEYWORD2>decimal?</KEYWORD2>
- <KEYWORD2>email?</KEYWORD2>
- <KEYWORD2>empty?</KEYWORD2>
- <KEYWORD2>equal?</KEYWORD2>
- <KEYWORD2>error?</KEYWORD2>
- <KEYWORD2>even?</KEYWORD2>
- <KEYWORD2>event?</KEYWORD2>
- <KEYWORD2>file?</KEYWORD2>
- <KEYWORD2>function?</KEYWORD2>
- <KEYWORD2>get-word?</KEYWORD2>
- <KEYWORD2>greater-or-equal?</KEYWORD2>
- <KEYWORD2>greater?</KEYWORD2>
- <KEYWORD2>hash?</KEYWORD2>
- <KEYWORD2>head?</KEYWORD2>
- <KEYWORD2>image?</KEYWORD2>
- <KEYWORD2>index?</KEYWORD2>
- <KEYWORD2>integer?</KEYWORD2>
- <KEYWORD2>issue?</KEYWORD2>
- <KEYWORD2>length?</KEYWORD2>
- <KEYWORD2>lesser-or-equal?</KEYWORD2>
- <KEYWORD2>lesser?</KEYWORD2>
- <KEYWORD2>library?</KEYWORD2>
- <KEYWORD2>list?</KEYWORD2>
- <KEYWORD2>lit-path?</KEYWORD2>
- <KEYWORD2>lit-word?</KEYWORD2>
- <KEYWORD2>logic?</KEYWORD2>
- <KEYWORD2>money?</KEYWORD2>
- <KEYWORD2>native?</KEYWORD2>
- <KEYWORD2>negative?</KEYWORD2>
- <KEYWORD2>none?</KEYWORD2>
- <KEYWORD2>not-equal?</KEYWORD2>
- <KEYWORD2>number?</KEYWORD2>
- <KEYWORD2>object?</KEYWORD2>
- <KEYWORD2>odd?</KEYWORD2>
- <KEYWORD2>op?</KEYWORD2>
- <KEYWORD2>pair?</KEYWORD2>
- <KEYWORD2>paren?</KEYWORD2>
- <KEYWORD2>path?</KEYWORD2>
- <KEYWORD2>port?</KEYWORD2>
- <KEYWORD2>positive?</KEYWORD2>
- <KEYWORD2>refinement?</KEYWORD2>
- <KEYWORD2>routine?</KEYWORD2>
- <KEYWORD2>same?</KEYWORD2>
- <KEYWORD2>series?</KEYWORD2>
- <KEYWORD2>set-path?</KEYWORD2>
- <KEYWORD2>set-word?</KEYWORD2>
- <KEYWORD2>strict-equal?</KEYWORD2>
- <KEYWORD2>strict-not-equal?</KEYWORD2>
- <KEYWORD2>string?</KEYWORD2>
- <KEYWORD2>struct?</KEYWORD2>
- <KEYWORD2>tag?</KEYWORD2>
- <KEYWORD2>tail?</KEYWORD2>
- <KEYWORD2>time?</KEYWORD2>
- <KEYWORD2>tuple?</KEYWORD2>
- <KEYWORD2>unset?</KEYWORD2>
- <KEYWORD2>url?</KEYWORD2>
- <KEYWORD2>word?</KEYWORD2>
- <KEYWORD2>zero?</KEYWORD2>
- <KEYWORD2>connected?</KEYWORD2>
- <KEYWORD2>crypt-strength?</KEYWORD2>
- <KEYWORD2>exists-key?</KEYWORD2>
- <KEYWORD2>input?</KEYWORD2>
- <KEYWORD2>script?</KEYWORD2>
- <KEYWORD2>type?</KEYWORD2>
- <KEYWORD2>value?</KEYWORD2>
- <KEYWORD2>?</KEYWORD2>
- <KEYWORD2>??</KEYWORD2>
- <KEYWORD2>dir?</KEYWORD2>
- <KEYWORD2>exists-thru?</KEYWORD2>
- <KEYWORD2>exists?</KEYWORD2>
- <KEYWORD2>flag-face?</KEYWORD2>
- <KEYWORD2>found?</KEYWORD2>
- <KEYWORD2>in-window?</KEYWORD2>
- <KEYWORD2>info?</KEYWORD2>
- <KEYWORD2>inside?</KEYWORD2>
- <KEYWORD2>link-app?</KEYWORD2>
- <KEYWORD2>link?</KEYWORD2>
- <KEYWORD2>modified?</KEYWORD2>
- <KEYWORD2>offset?</KEYWORD2>
- <KEYWORD2>outside?</KEYWORD2>
- <KEYWORD2>screen-offset?</KEYWORD2>
- <KEYWORD2>size?</KEYWORD2>
- <KEYWORD2>span?</KEYWORD2>
- <KEYWORD2>view?</KEYWORD2>
- <KEYWORD2>viewed?</KEYWORD2>
- <KEYWORD2>win-offset?</KEYWORD2>
- <KEYWORD2>within?</KEYWORD2>
- <KEYWORD3>action!</KEYWORD3>
- <KEYWORD3>any-block!</KEYWORD3>
- <KEYWORD3>any-function!</KEYWORD3>
- <KEYWORD3>any-string!</KEYWORD3>
- <KEYWORD3>any-type!</KEYWORD3>
- <KEYWORD3>any-word!</KEYWORD3>
- <KEYWORD3>binary!</KEYWORD3>
- <KEYWORD3>bitset!</KEYWORD3>
- <KEYWORD3>block!</KEYWORD3>
- <KEYWORD3>char!</KEYWORD3>
- <KEYWORD3>datatype!</KEYWORD3>
- <KEYWORD3>date!</KEYWORD3>
- <KEYWORD3>decimal!</KEYWORD3>
- <KEYWORD3>email!</KEYWORD3>
- <KEYWORD3>error!</KEYWORD3>
- <KEYWORD3>event!</KEYWORD3>
- <KEYWORD3>file!</KEYWORD3>
- <KEYWORD3>function!</KEYWORD3>
- <KEYWORD3>get-word!</KEYWORD3>
- <KEYWORD3>hash!</KEYWORD3>
- <KEYWORD3>image!</KEYWORD3>
- <KEYWORD3>integer!</KEYWORD3>
- <KEYWORD3>issue!</KEYWORD3>
- <KEYWORD3>library!</KEYWORD3>
- <KEYWORD3>list!</KEYWORD3>
- <KEYWORD3>lit-path!</KEYWORD3>
- <KEYWORD3>lit-word!</KEYWORD3>
- <KEYWORD3>logic!</KEYWORD3>
- <KEYWORD3>money!</KEYWORD3>
- <KEYWORD3>native!</KEYWORD3>
- <KEYWORD3>none!</KEYWORD3>
- <KEYWORD3>number!</KEYWORD3>
- <KEYWORD3>object!</KEYWORD3>
- <KEYWORD3>op!</KEYWORD3>
- <KEYWORD3>pair!</KEYWORD3>
- <KEYWORD3>paren!</KEYWORD3>
- <KEYWORD3>path!</KEYWORD3>
- <KEYWORD3>port!</KEYWORD3>
- <KEYWORD3>refinement!</KEYWORD3>
- <KEYWORD3>routine!</KEYWORD3>
- <KEYWORD3>series!</KEYWORD3>
- <KEYWORD3>set-path!</KEYWORD3>
- <KEYWORD3>set-word!</KEYWORD3>
- <KEYWORD3>string!</KEYWORD3>
- <KEYWORD3>struct!</KEYWORD3>
- <KEYWORD3>symbol!</KEYWORD3>
- <KEYWORD3>tag!</KEYWORD3>
- <KEYWORD3>time!</KEYWORD3>
- <KEYWORD3>tuple!</KEYWORD3>
- <KEYWORD3>unset!</KEYWORD3>
- <KEYWORD3>url!</KEYWORD3>
- <KEYWORD3>word!</KEYWORD3>
-
- <LITERAL2>true</LITERAL2>
- <LITERAL2>false</LITERAL2>
- <LITERAL2>self</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{[(" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}])" />
+ <PROPERTY NAME="commentStart" VALUE="comment {" />
+ <PROPERTY NAME="commentEnd" VALUE="}" />
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ <PROPERTY NAME="noWordSep" VALUE="_-" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+ <!-- Javadoc comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>comment {</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>comment{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+
+ <MARK_FOLLOWING TYPE="LITERAL2" MATCH_TYPE="OPERATOR">'</MARK_FOLLOWING>
+
+ <KEYWORDS>
+ <KEYWORD1>abs</KEYWORD1>
+ <KEYWORD1>absolute</KEYWORD1>
+ <KEYWORD1>add</KEYWORD1>
+ <KEYWORD1>and~</KEYWORD1>
+ <KEYWORD1>at</KEYWORD1>
+ <KEYWORD1>back</KEYWORD1>
+ <KEYWORD1>change</KEYWORD1>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>complement</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>cp</KEYWORD1>
+ <KEYWORD1>divide</KEYWORD1>
+ <KEYWORD1>fifth</KEYWORD1>
+ <KEYWORD1>find</KEYWORD1>
+ <KEYWORD1>first</KEYWORD1>
+ <KEYWORD1>fourth</KEYWORD1>
+ <KEYWORD1>head</KEYWORD1>
+ <KEYWORD1>insert</KEYWORD1>
+ <KEYWORD1>last</KEYWORD1>
+ <KEYWORD1>make</KEYWORD1>
+ <KEYWORD1>max</KEYWORD1>
+ <KEYWORD1>maximum</KEYWORD1>
+ <KEYWORD1>min</KEYWORD1>
+ <KEYWORD1>minimum</KEYWORD1>
+ <KEYWORD1>multiply</KEYWORD1>
+ <KEYWORD1>negate</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>or~</KEYWORD1>
+ <KEYWORD1>pick</KEYWORD1>
+ <KEYWORD1>poke</KEYWORD1>
+ <KEYWORD1>power</KEYWORD1>
+ <KEYWORD1>random</KEYWORD1>
+ <KEYWORD1>remainder</KEYWORD1>
+ <KEYWORD1>remove</KEYWORD1>
+ <KEYWORD1>second</KEYWORD1>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>skip</KEYWORD1>
+ <KEYWORD1>sort</KEYWORD1>
+ <KEYWORD1>subtract</KEYWORD1>
+ <KEYWORD1>tail</KEYWORD1>
+ <KEYWORD1>third</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>trim</KEYWORD1>
+ <KEYWORD1>xor~</KEYWORD1>
+ <KEYWORD1>alias</KEYWORD1>
+ <KEYWORD1>all</KEYWORD1>
+ <KEYWORD1>any</KEYWORD1>
+ <KEYWORD1>arccosine</KEYWORD1>
+ <KEYWORD1>arcsine</KEYWORD1>
+ <KEYWORD1>arctangent</KEYWORD1>
+ <KEYWORD1>bind</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>browse</KEYWORD1>
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>caret-to-offset</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>checksum</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>comment</KEYWORD1>
+ <KEYWORD1>compose</KEYWORD1>
+ <KEYWORD1>compress</KEYWORD1>
+ <KEYWORD1>cosine</KEYWORD1>
+ <KEYWORD1>debase</KEYWORD1>
+ <KEYWORD1>decompress</KEYWORD1>
+ <KEYWORD1>dehex</KEYWORD1>
+ <KEYWORD1>detab</KEYWORD1>
+ <KEYWORD1>dh-compute-key</KEYWORD1>
+ <KEYWORD1>dh-generate-key</KEYWORD1>
+ <KEYWORD1>dh-make-key</KEYWORD1>
+ <KEYWORD1>difference</KEYWORD1>
+ <KEYWORD1>disarm</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>dsa-generate-key</KEYWORD1>
+ <KEYWORD1>dsa-make-key</KEYWORD1>
+ <KEYWORD1>dsa-make-signature</KEYWORD1>
+ <KEYWORD1>dsa-verify-signature</KEYWORD1>
+ <KEYWORD1>either</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>enbase</KEYWORD1>
+ <KEYWORD1>entab</KEYWORD1>
+ <KEYWORD1>exclude</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>exp</KEYWORD1>
+ <KEYWORD1>foreach</KEYWORD1>
+ <KEYWORD1>form</KEYWORD1>
+ <KEYWORD1>free</KEYWORD1>
+ <KEYWORD1>get</KEYWORD1>
+ <KEYWORD1>get-modes</KEYWORD1>
+ <KEYWORD1>halt</KEYWORD1>
+ <KEYWORD1>hide</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>intersect</KEYWORD1>
+ <KEYWORD1>load</KEYWORD1>
+ <KEYWORD1>log-10</KEYWORD1>
+ <KEYWORD1>log-2</KEYWORD1>
+ <KEYWORD1>log-e</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+ <KEYWORD1>lowercase</KEYWORD1>
+ <KEYWORD1>maximum-of</KEYWORD1>
+ <KEYWORD1>minimum-of</KEYWORD1>
+ <KEYWORD1>mold</KEYWORD1>
+ <KEYWORD1>not</KEYWORD1>
+ <KEYWORD1>now</KEYWORD1>
+ <KEYWORD1>offset-to-caret</KEYWORD1>
+ <KEYWORD1>open</KEYWORD1>
+ <KEYWORD1>parse</KEYWORD1>
+ <KEYWORD1>prin</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>protect</KEYWORD1>
+ <KEYWORD1>q</KEYWORD1>
+ <KEYWORD1>query</KEYWORD1>
+ <KEYWORD1>quit</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>read-io</KEYWORD1>
+ <KEYWORD1>recycle</KEYWORD1>
+ <KEYWORD1>reduce</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>reverse</KEYWORD1>
+ <KEYWORD1>rsa-encrypt</KEYWORD1>
+ <KEYWORD1>rsa-generate-key</KEYWORD1>
+ <KEYWORD1>rsa-make-key</KEYWORD1>
+ <KEYWORD1>save</KEYWORD1>
+ <KEYWORD1>secure</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>set-modes</KEYWORD1>
+ <KEYWORD1>show</KEYWORD1>
+ <KEYWORD1>sine</KEYWORD1>
+ <KEYWORD1>size-text</KEYWORD1>
+ <KEYWORD1>square-root</KEYWORD1>
+ <KEYWORD1>tangent</KEYWORD1>
+ <KEYWORD1>textinfo</KEYWORD1>
+ <KEYWORD1>throw</KEYWORD1>
+ <KEYWORD1>to-hex</KEYWORD1>
+ <KEYWORD1>to-local-file</KEYWORD1>
+ <KEYWORD1>to-rebol-file</KEYWORD1>
+ <KEYWORD1>trace</KEYWORD1>
+ <KEYWORD1>try</KEYWORD1>
+ <KEYWORD1>union</KEYWORD1>
+ <KEYWORD1>unique</KEYWORD1>
+ <KEYWORD1>unprotect</KEYWORD1>
+ <KEYWORD1>unset</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>update</KEYWORD1>
+ <KEYWORD1>uppercase</KEYWORD1>
+ <KEYWORD1>use</KEYWORD1>
+ <KEYWORD1>wait</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>write</KEYWORD1>
+ <KEYWORD1>write-io</KEYWORD1>
+ <KEYWORD1>basic-syntax-header</KEYWORD1>
+ <KEYWORD1>crlf</KEYWORD1>
+ <KEYWORD1>font-fixed</KEYWORD1>
+ <KEYWORD1>font-sans-serif</KEYWORD1>
+ <KEYWORD1>font-serif</KEYWORD1>
+ <KEYWORD1>list-words</KEYWORD1>
+ <KEYWORD1>outstr</KEYWORD1>
+ <KEYWORD1>val</KEYWORD1>
+ <KEYWORD1>value</KEYWORD1>
+ <KEYWORD1>about</KEYWORD1>
+ <KEYWORD1>alert</KEYWORD1>
+ <KEYWORD1>alter</KEYWORD1>
+ <KEYWORD1>append</KEYWORD1>
+ <KEYWORD1>array</KEYWORD1>
+ <KEYWORD1>ask</KEYWORD1>
+ <KEYWORD1>boot-prefs</KEYWORD1>
+ <KEYWORD1>build-tag</KEYWORD1>
+ <KEYWORD1>center-face</KEYWORD1>
+ <KEYWORD1>change-dir</KEYWORD1>
+ <KEYWORD1>charset</KEYWORD1>
+ <KEYWORD1>choose</KEYWORD1>
+ <KEYWORD1>clean-path</KEYWORD1>
+ <KEYWORD1>clear-fields</KEYWORD1>
+ <KEYWORD1>confine</KEYWORD1>
+ <KEYWORD1>confirm</KEYWORD1>
+ <KEYWORD1>context</KEYWORD1>
+ <KEYWORD1>cvs-date</KEYWORD1>
+ <KEYWORD1>cvs-version</KEYWORD1>
+ <KEYWORD1>decode-cgi</KEYWORD1>
+ <KEYWORD1>decode-url</KEYWORD1>
+ <KEYWORD1>deflag-face</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>demo</KEYWORD1>
+ <KEYWORD1>desktop</KEYWORD1>
+ <KEYWORD1>dirize</KEYWORD1>
+ <KEYWORD1>dispatch</KEYWORD1>
+ <KEYWORD1>do-boot</KEYWORD1>
+ <KEYWORD1>do-events</KEYWORD1>
+ <KEYWORD1>do-face</KEYWORD1>
+ <KEYWORD1>do-face-alt</KEYWORD1>
+ <KEYWORD1>does</KEYWORD1>
+ <KEYWORD1>dump-face</KEYWORD1>
+ <KEYWORD1>dump-pane</KEYWORD1>
+ <KEYWORD1>echo</KEYWORD1>
+ <KEYWORD1>editor</KEYWORD1>
+ <KEYWORD1>emailer</KEYWORD1>
+ <KEYWORD1>emit</KEYWORD1>
+ <KEYWORD1>extract</KEYWORD1>
+ <KEYWORD1>find-by-type</KEYWORD1>
+ <KEYWORD1>find-key-face</KEYWORD1>
+ <KEYWORD1>find-window</KEYWORD1>
+ <KEYWORD1>flag-face</KEYWORD1>
+ <KEYWORD1>flash</KEYWORD1>
+ <KEYWORD1>focus</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>forall</KEYWORD1>
+ <KEYWORD1>forever</KEYWORD1>
+ <KEYWORD1>forskip</KEYWORD1>
+ <KEYWORD1>func</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>get-net-info</KEYWORD1>
+ <KEYWORD1>get-style</KEYWORD1>
+ <KEYWORD1>has</KEYWORD1>
+ <KEYWORD1>help</KEYWORD1>
+ <KEYWORD1>hide-popup</KEYWORD1>
+ <KEYWORD1>import-email</KEYWORD1>
+ <KEYWORD1>inform</KEYWORD1>
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD1>insert-event-func</KEYWORD1>
+ <KEYWORD1>join</KEYWORD1>
+ <KEYWORD1>launch</KEYWORD1>
+ <KEYWORD1>launch-thru</KEYWORD1>
+ <KEYWORD1>layout</KEYWORD1>
+ <KEYWORD1>license</KEYWORD1>
+ <KEYWORD1>list-dir</KEYWORD1>
+ <KEYWORD1>load-image</KEYWORD1>
+ <KEYWORD1>load-prefs</KEYWORD1>
+ <KEYWORD1>load-thru</KEYWORD1>
+ <KEYWORD1>make-dir</KEYWORD1>
+ <KEYWORD1>make-face</KEYWORD1>
+ <KEYWORD1>net-error</KEYWORD1>
+ <KEYWORD1>open-events</KEYWORD1>
+ <KEYWORD1>parse-email-addrs</KEYWORD1>
+ <KEYWORD1>parse-header</KEYWORD1>
+ <KEYWORD1>parse-header-date</KEYWORD1>
+ <KEYWORD1>parse-xml</KEYWORD1>
+ <KEYWORD1>path-thru</KEYWORD1>
+ <KEYWORD1>probe</KEYWORD1>
+ <KEYWORD1>protect-system</KEYWORD1>
+ <KEYWORD1>read-net</KEYWORD1>
+ <KEYWORD1>read-thru</KEYWORD1>
+ <KEYWORD1>reboot</KEYWORD1>
+ <KEYWORD1>reform</KEYWORD1>
+ <KEYWORD1>rejoin</KEYWORD1>
+ <KEYWORD1>remold</KEYWORD1>
+ <KEYWORD1>remove-event-func</KEYWORD1>
+ <KEYWORD1>rename</KEYWORD1>
+ <KEYWORD1>repend</KEYWORD1>
+ <KEYWORD1>replace</KEYWORD1>
+ <KEYWORD1>request</KEYWORD1>
+ <KEYWORD1>request-color</KEYWORD1>
+ <KEYWORD1>request-date</KEYWORD1>
+ <KEYWORD1>request-download</KEYWORD1>
+ <KEYWORD1>request-file</KEYWORD1>
+ <KEYWORD1>request-list</KEYWORD1>
+ <KEYWORD1>request-pass</KEYWORD1>
+ <KEYWORD1>request-text</KEYWORD1>
+ <KEYWORD1>resend</KEYWORD1>
+ <KEYWORD1>save-prefs</KEYWORD1>
+ <KEYWORD1>save-user</KEYWORD1>
+ <KEYWORD1>scroll-para</KEYWORD1>
+ <KEYWORD1>send</KEYWORD1>
+ <KEYWORD1>set-font</KEYWORD1>
+ <KEYWORD1>set-net</KEYWORD1>
+ <KEYWORD1>set-para</KEYWORD1>
+ <KEYWORD1>set-style</KEYWORD1>
+ <KEYWORD1>set-user</KEYWORD1>
+ <KEYWORD1>set-user-name</KEYWORD1>
+ <KEYWORD1>show-popup</KEYWORD1>
+ <KEYWORD1>source</KEYWORD1>
+ <KEYWORD1>split-path</KEYWORD1>
+ <KEYWORD1>stylize</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>throw-on-error</KEYWORD1>
+ <KEYWORD1>to-binary</KEYWORD1>
+ <KEYWORD1>to-bitset</KEYWORD1>
+ <KEYWORD1>to-block</KEYWORD1>
+ <KEYWORD1>to-char</KEYWORD1>
+ <KEYWORD1>to-date</KEYWORD1>
+ <KEYWORD1>to-decimal</KEYWORD1>
+ <KEYWORD1>to-email</KEYWORD1>
+ <KEYWORD1>to-event</KEYWORD1>
+ <KEYWORD1>to-file</KEYWORD1>
+ <KEYWORD1>to-get-word</KEYWORD1>
+ <KEYWORD1>to-hash</KEYWORD1>
+ <KEYWORD1>to-idate</KEYWORD1>
+ <KEYWORD1>to-image</KEYWORD1>
+ <KEYWORD1>to-integer</KEYWORD1>
+ <KEYWORD1>to-issue</KEYWORD1>
+ <KEYWORD1>to-list</KEYWORD1>
+ <KEYWORD1>to-lit-path</KEYWORD1>
+ <KEYWORD1>to-lit-word</KEYWORD1>
+ <KEYWORD1>to-logic</KEYWORD1>
+ <KEYWORD1>to-money</KEYWORD1>
+ <KEYWORD1>to-none</KEYWORD1>
+ <KEYWORD1>to-pair</KEYWORD1>
+ <KEYWORD1>to-paren</KEYWORD1>
+ <KEYWORD1>to-path</KEYWORD1>
+ <KEYWORD1>to-refinement</KEYWORD1>
+ <KEYWORD1>to-set-path</KEYWORD1>
+ <KEYWORD1>to-set-word</KEYWORD1>
+ <KEYWORD1>to-string</KEYWORD1>
+ <KEYWORD1>to-tag</KEYWORD1>
+ <KEYWORD1>to-time</KEYWORD1>
+ <KEYWORD1>to-tuple</KEYWORD1>
+ <KEYWORD1>to-url</KEYWORD1>
+ <KEYWORD1>to-word</KEYWORD1>
+ <KEYWORD1>unfocus</KEYWORD1>
+ <KEYWORD1>uninstall</KEYWORD1>
+ <KEYWORD1>unview</KEYWORD1>
+ <KEYWORD1>upgrade</KEYWORD1>
+ <KEYWORD1>Usage</KEYWORD1>
+ <KEYWORD1>vbug</KEYWORD1>
+ <KEYWORD1>view</KEYWORD1>
+ <KEYWORD1>view-install</KEYWORD1>
+ <KEYWORD1>view-prefs</KEYWORD1>
+ <KEYWORD1>what</KEYWORD1>
+ <KEYWORD1>what-dir</KEYWORD1>
+ <KEYWORD1>write-user</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>at</KEYWORD1>
+ <KEYWORD1>space</KEYWORD1>
+ <KEYWORD1>pad</KEYWORD1>
+ <KEYWORD1>across</KEYWORD1>
+ <KEYWORD1>below</KEYWORD1>
+ <KEYWORD1>origin</KEYWORD1>
+ <KEYWORD1>guide</KEYWORD1>
+ <KEYWORD1>tabs</KEYWORD1>
+ <KEYWORD1>indent</KEYWORD1>
+ <KEYWORD1>style</KEYWORD1>
+ <KEYWORD1>styles</KEYWORD1>
+ <KEYWORD1>size</KEYWORD1>
+ <KEYWORD1>sense</KEYWORD1>
+ <KEYWORD1>backcolor</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>none</KEYWORD1>
+ <KEYWORD2>action?</KEYWORD2>
+ <KEYWORD2>any-block?</KEYWORD2>
+ <KEYWORD2>any-function?</KEYWORD2>
+ <KEYWORD2>any-string?</KEYWORD2>
+ <KEYWORD2>any-type?</KEYWORD2>
+ <KEYWORD2>any-word?</KEYWORD2>
+ <KEYWORD2>binary?</KEYWORD2>
+ <KEYWORD2>bitset?</KEYWORD2>
+ <KEYWORD2>block?</KEYWORD2>
+ <KEYWORD2>char?</KEYWORD2>
+ <KEYWORD2>datatype?</KEYWORD2>
+ <KEYWORD2>date?</KEYWORD2>
+ <KEYWORD2>decimal?</KEYWORD2>
+ <KEYWORD2>email?</KEYWORD2>
+ <KEYWORD2>empty?</KEYWORD2>
+ <KEYWORD2>equal?</KEYWORD2>
+ <KEYWORD2>error?</KEYWORD2>
+ <KEYWORD2>even?</KEYWORD2>
+ <KEYWORD2>event?</KEYWORD2>
+ <KEYWORD2>file?</KEYWORD2>
+ <KEYWORD2>function?</KEYWORD2>
+ <KEYWORD2>get-word?</KEYWORD2>
+ <KEYWORD2>greater-or-equal?</KEYWORD2>
+ <KEYWORD2>greater?</KEYWORD2>
+ <KEYWORD2>hash?</KEYWORD2>
+ <KEYWORD2>head?</KEYWORD2>
+ <KEYWORD2>image?</KEYWORD2>
+ <KEYWORD2>index?</KEYWORD2>
+ <KEYWORD2>integer?</KEYWORD2>
+ <KEYWORD2>issue?</KEYWORD2>
+ <KEYWORD2>length?</KEYWORD2>
+ <KEYWORD2>lesser-or-equal?</KEYWORD2>
+ <KEYWORD2>lesser?</KEYWORD2>
+ <KEYWORD2>library?</KEYWORD2>
+ <KEYWORD2>list?</KEYWORD2>
+ <KEYWORD2>lit-path?</KEYWORD2>
+ <KEYWORD2>lit-word?</KEYWORD2>
+ <KEYWORD2>logic?</KEYWORD2>
+ <KEYWORD2>money?</KEYWORD2>
+ <KEYWORD2>native?</KEYWORD2>
+ <KEYWORD2>negative?</KEYWORD2>
+ <KEYWORD2>none?</KEYWORD2>
+ <KEYWORD2>not-equal?</KEYWORD2>
+ <KEYWORD2>number?</KEYWORD2>
+ <KEYWORD2>object?</KEYWORD2>
+ <KEYWORD2>odd?</KEYWORD2>
+ <KEYWORD2>op?</KEYWORD2>
+ <KEYWORD2>pair?</KEYWORD2>
+ <KEYWORD2>paren?</KEYWORD2>
+ <KEYWORD2>path?</KEYWORD2>
+ <KEYWORD2>port?</KEYWORD2>
+ <KEYWORD2>positive?</KEYWORD2>
+ <KEYWORD2>refinement?</KEYWORD2>
+ <KEYWORD2>routine?</KEYWORD2>
+ <KEYWORD2>same?</KEYWORD2>
+ <KEYWORD2>series?</KEYWORD2>
+ <KEYWORD2>set-path?</KEYWORD2>
+ <KEYWORD2>set-word?</KEYWORD2>
+ <KEYWORD2>strict-equal?</KEYWORD2>
+ <KEYWORD2>strict-not-equal?</KEYWORD2>
+ <KEYWORD2>string?</KEYWORD2>
+ <KEYWORD2>struct?</KEYWORD2>
+ <KEYWORD2>tag?</KEYWORD2>
+ <KEYWORD2>tail?</KEYWORD2>
+ <KEYWORD2>time?</KEYWORD2>
+ <KEYWORD2>tuple?</KEYWORD2>
+ <KEYWORD2>unset?</KEYWORD2>
+ <KEYWORD2>url?</KEYWORD2>
+ <KEYWORD2>word?</KEYWORD2>
+ <KEYWORD2>zero?</KEYWORD2>
+ <KEYWORD2>connected?</KEYWORD2>
+ <KEYWORD2>crypt-strength?</KEYWORD2>
+ <KEYWORD2>exists-key?</KEYWORD2>
+ <KEYWORD2>input?</KEYWORD2>
+ <KEYWORD2>script?</KEYWORD2>
+ <KEYWORD2>type?</KEYWORD2>
+ <KEYWORD2>value?</KEYWORD2>
+ <KEYWORD2>?</KEYWORD2>
+ <KEYWORD2>??</KEYWORD2>
+ <KEYWORD2>dir?</KEYWORD2>
+ <KEYWORD2>exists-thru?</KEYWORD2>
+ <KEYWORD2>exists?</KEYWORD2>
+ <KEYWORD2>flag-face?</KEYWORD2>
+ <KEYWORD2>found?</KEYWORD2>
+ <KEYWORD2>in-window?</KEYWORD2>
+ <KEYWORD2>info?</KEYWORD2>
+ <KEYWORD2>inside?</KEYWORD2>
+ <KEYWORD2>link-app?</KEYWORD2>
+ <KEYWORD2>link?</KEYWORD2>
+ <KEYWORD2>modified?</KEYWORD2>
+ <KEYWORD2>offset?</KEYWORD2>
+ <KEYWORD2>outside?</KEYWORD2>
+ <KEYWORD2>screen-offset?</KEYWORD2>
+ <KEYWORD2>size?</KEYWORD2>
+ <KEYWORD2>span?</KEYWORD2>
+ <KEYWORD2>view?</KEYWORD2>
+ <KEYWORD2>viewed?</KEYWORD2>
+ <KEYWORD2>win-offset?</KEYWORD2>
+ <KEYWORD2>within?</KEYWORD2>
+ <KEYWORD3>action!</KEYWORD3>
+ <KEYWORD3>any-block!</KEYWORD3>
+ <KEYWORD3>any-function!</KEYWORD3>
+ <KEYWORD3>any-string!</KEYWORD3>
+ <KEYWORD3>any-type!</KEYWORD3>
+ <KEYWORD3>any-word!</KEYWORD3>
+ <KEYWORD3>binary!</KEYWORD3>
+ <KEYWORD3>bitset!</KEYWORD3>
+ <KEYWORD3>block!</KEYWORD3>
+ <KEYWORD3>char!</KEYWORD3>
+ <KEYWORD3>datatype!</KEYWORD3>
+ <KEYWORD3>date!</KEYWORD3>
+ <KEYWORD3>decimal!</KEYWORD3>
+ <KEYWORD3>email!</KEYWORD3>
+ <KEYWORD3>error!</KEYWORD3>
+ <KEYWORD3>event!</KEYWORD3>
+ <KEYWORD3>file!</KEYWORD3>
+ <KEYWORD3>function!</KEYWORD3>
+ <KEYWORD3>get-word!</KEYWORD3>
+ <KEYWORD3>hash!</KEYWORD3>
+ <KEYWORD3>image!</KEYWORD3>
+ <KEYWORD3>integer!</KEYWORD3>
+ <KEYWORD3>issue!</KEYWORD3>
+ <KEYWORD3>library!</KEYWORD3>
+ <KEYWORD3>list!</KEYWORD3>
+ <KEYWORD3>lit-path!</KEYWORD3>
+ <KEYWORD3>lit-word!</KEYWORD3>
+ <KEYWORD3>logic!</KEYWORD3>
+ <KEYWORD3>money!</KEYWORD3>
+ <KEYWORD3>native!</KEYWORD3>
+ <KEYWORD3>none!</KEYWORD3>
+ <KEYWORD3>number!</KEYWORD3>
+ <KEYWORD3>object!</KEYWORD3>
+ <KEYWORD3>op!</KEYWORD3>
+ <KEYWORD3>pair!</KEYWORD3>
+ <KEYWORD3>paren!</KEYWORD3>
+ <KEYWORD3>path!</KEYWORD3>
+ <KEYWORD3>port!</KEYWORD3>
+ <KEYWORD3>refinement!</KEYWORD3>
+ <KEYWORD3>routine!</KEYWORD3>
+ <KEYWORD3>series!</KEYWORD3>
+ <KEYWORD3>set-path!</KEYWORD3>
+ <KEYWORD3>set-word!</KEYWORD3>
+ <KEYWORD3>string!</KEYWORD3>
+ <KEYWORD3>struct!</KEYWORD3>
+ <KEYWORD3>symbol!</KEYWORD3>
+ <KEYWORD3>tag!</KEYWORD3>
+ <KEYWORD3>time!</KEYWORD3>
+ <KEYWORD3>tuple!</KEYWORD3>
+ <KEYWORD3>unset!</KEYWORD3>
+ <KEYWORD3>url!</KEYWORD3>
+ <KEYWORD3>word!</KEYWORD3>
+
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ <LITERAL2>self</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/redcode.xml b/jEdit/modes/redcode.xml
index 1c64d60..09d056d 100644
--- a/jEdit/modes/redcode.xml
+++ b/jEdit/modes/redcode.xml
@@ -1,126 +1,126 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-
- redcode syntax highlighting file for jedit
-
- Will Varfar, 2002
-
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=";" />
- </PROPS>
-
- <RULES HIGHLIGHT_DIGITS="TRUE" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
-
- <EOL_SPAN TYPE="COMMENT2">;redcode</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">;author</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">;name</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">;strategy</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">;password</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
-
- <SEQ TYPE="KEYWORD3">.AB</SEQ> <!-- Instructions read the A-field of the A-instruction and the B-field of the B-instruction and write to B-fields. -->
- <SEQ TYPE="KEYWORD3">.BA</SEQ> <!-- Instructions read the B-field of the A-instruction and the A-field of the B-instruction and write to A-fields. -->
- <SEQ TYPE="KEYWORD3">.A</SEQ> <!--Instructions read and write A-fields. -->
- <SEQ TYPE="KEYWORD3">.B</SEQ> <!-- Instructions read and write B-fields. -->
- <SEQ TYPE="KEYWORD3">.F</SEQ> <!-- Instructions read both A- and B-fields of the the A- and B-instruction and write to both A- and B-fields (A to A and B to B). -->
- <SEQ TYPE="KEYWORD3">.X</SEQ> <!-- Instructions read both A- and B-fields of the the A- and B-instruction and write to both A- and B-fields exchanging fields (A to B and B to A). -->
- <SEQ TYPE="KEYWORD3">.I</SEQ> <!-- Instructions read and write entire instructions. -->
-
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <!-- Arithmetic: -->
- <SEQ TYPE="OPERATOR">+</SEQ> <!-- addition or unary plus -->
- <SEQ TYPE="OPERATOR">-</SEQ> <!-- subtraction or unary minus -->
- <SEQ TYPE="OPERATOR">/</SEQ> <!-- division -->
- <SEQ TYPE="OPERATOR">%</SEQ> <!-- modulo (remainder of division) -->
-
- <!-- Comparison (*): -->
- <SEQ TYPE="OPERATOR">==</SEQ> <!-- equality -->
- <SEQ TYPE="OPERATOR">!=</SEQ> <!-- inequality -->
- <SEQ TYPE="OPERATOR"><=</SEQ> <!-- less than or equal -->
- <SEQ TYPE="OPERATOR">>=</SEQ> <!-- greater than or equal -->
- <SEQ TYPE="OPERATOR"><</SEQ> <!-- less than -->
- <SEQ TYPE="OPERATOR">></SEQ> <!-- greater than -->
-
- <!-- Logical (*): -->
- <SEQ TYPE="OPERATOR">&&</SEQ> <!-- and -->
- <SEQ TYPE="OPERATOR">||</SEQ> <!-- or -->
- <SEQ TYPE="OPERATOR">!</SEQ> <!-- unary negation -->
-
- <!-- Assignment (*): -->
- <SEQ TYPE="OPERATOR">=</SEQ> <!-- (to register variables a..z) -->
-
-
- <SEQ TYPE="LITERAL1">$</SEQ>
- <SEQ TYPE="LITERAL1">@</SEQ>
- <SEQ TYPE="LITERAL1">#</SEQ>
- <SEQ TYPE="LITERAL1">*</SEQ>
- <SEQ TYPE="LITERAL1">{</SEQ>
- <SEQ TYPE="LITERAL1">}</SEQ>
-
- <KEYWORDS>
-
- <LITERAL2>CORESIZE</LITERAL2> <!-- value of -s parameter (default: 8000) -->
- <LITERAL2>MAXPROCESSES</LITERAL2> <!-- value of -p parameter (default: 8000) -->
- <LITERAL2>MAXCYCLES</LITERAL2> <!-- value of -c parameter (default: 80000) -->
- <LITERAL2>MAXLENGTH</LITERAL2> <!-- value of -l parameter (default: 100) -->
- <LITERAL2>MINDISTANCE</LITERAL2> <!-- value of -d parameter (default: 100) -->
- <LITERAL2>ROUNDS</LITERAL2> <!-- (+) value of -r parameter (default: 1) -->
- <LITERAL2>PSPACESIZE</LITERAL2> <!-- (+) value of -S parameter (default: 1/16th CORESIZE) -->
- <LITERAL2>CURLINE</LITERAL2> <!-- current line in generated assembly (starts with 0) -->
- <LITERAL2>VERSION</LITERAL2> <!-- pMARS version ("60" is v0.6.0) -->
- <LITERAL2>WARRIORS</LITERAL2> <!-- number of warriors specified on command line -->
-
- <KEYWORD1>DAT</KEYWORD1> <!-- terminate process -->
- <KEYWORD1>MOV</KEYWORD1> <!-- move from A to B -->
- <KEYWORD1>ADD</KEYWORD1> <!-- add A to B, store result in B -->
- <KEYWORD1>SUB</KEYWORD1> <!-- subtract A from B, store result in B -->
- <KEYWORD1>MUL</KEYWORD1> <!-- multiply A by B, store result in B -->
- <KEYWORD1>DIV</KEYWORD1> <!-- divide B by A, store result in B if A <> 0, else terminate -->
- <KEYWORD1>MOD</KEYWORD1> <!-- divide B by A, store remainder in B if A <> 0, else terminate -->
- <KEYWORD1>JMP</KEYWORD1> <!-- transfer execution to A -->
- <KEYWORD1>JMZ</KEYWORD1> <!-- transfer execution to A if B is zero -->
- <KEYWORD1>JMN</KEYWORD1> <!-- transfer execution to A if B is non-zero -->
- <KEYWORD1>DJN</KEYWORD1> <!-- decrement B, if B is non-zero, transfer execution to A -->
- <KEYWORD1>SPL</KEYWORD1> <!-- split off process to A -->
- <KEYWORD1>SLT</KEYWORD1> <!-- skip next instruction if A is less than B -->
- <KEYWORD1>CMP</KEYWORD1> <!-- same as SEQ -->
- <KEYWORD1>SEQ</KEYWORD1> <!-- (*) Skip next instruction if A is equal to B -->
- <KEYWORD1>SNE</KEYWORD1> <!-- (*) Skip next instruction if A is not equal to B -->
- <KEYWORD1>NOP</KEYWORD1> <!-- (*) No operation -->
- <KEYWORD1>LDP</KEYWORD1> <!-- (+) Load P-space cell A into core address B -->
- <KEYWORD1>STP</KEYWORD1> <!-- (+) Store A-number into P-space cell B -->
-
- <KEYWORD2>EQU</KEYWORD2>
- <KEYWORD2>ORG</KEYWORD2>
- <KEYWORD2>FOR</KEYWORD2>
- <KEYWORD2>ROF</KEYWORD2>
- <KEYWORD2>END</KEYWORD2>
- <KEYWORD2>PIN</KEYWORD2>
- <KEYWORD2>CORESIZE</KEYWORD2> <!-- value of -s parameter (default: 8000) -->
- <KEYWORD2>MAXPROCESSES</KEYWORD2> <!-- value of -p parameter (default: 8000) -->
- <KEYWORD2>MAXCYCLES</KEYWORD2> <!-- value of -c parameter (default: 80000) -->
- <KEYWORD2>MAXLENGTH</KEYWORD2> <!-- value of -l parameter (default: 100) -->
- <KEYWORD2>MINDISTANCE</KEYWORD2> <!-- value of -d parameter (default: 100) -->
- <KEYWORD2>ROUNDS</KEYWORD2> <!-- (+) value of -r parameter (default: 1) -->
- <KEYWORD2>PSPACESIZE</KEYWORD2> <!-- (+) value of -S parameter (default: 1/16th CORESIZE) -->
- <KEYWORD2>CURLINE</KEYWORD2> <!-- current line in generated assembly (starts with 0) -->
- <KEYWORD2>VERSION</KEYWORD2> <!-- pMARS version ("60" is v0.6.0) -->
- <KEYWORD2>WARRIORS</KEYWORD2> <!-- number of warriors specified on command line -->
-
- </KEYWORDS>
-
- </RULES>
-
-</MODE>
-
-
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+
+ redcode syntax highlighting file for jedit
+
+ Will Varfar, 2002
+
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=";" />
+ </PROPS>
+
+ <RULES HIGHLIGHT_DIGITS="TRUE" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
+
+ <EOL_SPAN TYPE="COMMENT2">;redcode</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">;author</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">;name</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">;strategy</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">;password</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+
+ <SEQ TYPE="KEYWORD3">.AB</SEQ> <!-- Instructions read the A-field of the A-instruction and the B-field of the B-instruction and write to B-fields. -->
+ <SEQ TYPE="KEYWORD3">.BA</SEQ> <!-- Instructions read the B-field of the A-instruction and the A-field of the B-instruction and write to A-fields. -->
+ <SEQ TYPE="KEYWORD3">.A</SEQ> <!--Instructions read and write A-fields. -->
+ <SEQ TYPE="KEYWORD3">.B</SEQ> <!-- Instructions read and write B-fields. -->
+ <SEQ TYPE="KEYWORD3">.F</SEQ> <!-- Instructions read both A- and B-fields of the the A- and B-instruction and write to both A- and B-fields (A to A and B to B). -->
+ <SEQ TYPE="KEYWORD3">.X</SEQ> <!-- Instructions read both A- and B-fields of the the A- and B-instruction and write to both A- and B-fields exchanging fields (A to B and B to A). -->
+ <SEQ TYPE="KEYWORD3">.I</SEQ> <!-- Instructions read and write entire instructions. -->
+
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <!-- Arithmetic: -->
+ <SEQ TYPE="OPERATOR">+</SEQ> <!-- addition or unary plus -->
+ <SEQ TYPE="OPERATOR">-</SEQ> <!-- subtraction or unary minus -->
+ <SEQ TYPE="OPERATOR">/</SEQ> <!-- division -->
+ <SEQ TYPE="OPERATOR">%</SEQ> <!-- modulo (remainder of division) -->
+
+ <!-- Comparison (*): -->
+ <SEQ TYPE="OPERATOR">==</SEQ> <!-- equality -->
+ <SEQ TYPE="OPERATOR">!=</SEQ> <!-- inequality -->
+ <SEQ TYPE="OPERATOR"><=</SEQ> <!-- less than or equal -->
+ <SEQ TYPE="OPERATOR">>=</SEQ> <!-- greater than or equal -->
+ <SEQ TYPE="OPERATOR"><</SEQ> <!-- less than -->
+ <SEQ TYPE="OPERATOR">></SEQ> <!-- greater than -->
+
+ <!-- Logical (*): -->
+ <SEQ TYPE="OPERATOR">&&</SEQ> <!-- and -->
+ <SEQ TYPE="OPERATOR">||</SEQ> <!-- or -->
+ <SEQ TYPE="OPERATOR">!</SEQ> <!-- unary negation -->
+
+ <!-- Assignment (*): -->
+ <SEQ TYPE="OPERATOR">=</SEQ> <!-- (to register variables a..z) -->
+
+
+ <SEQ TYPE="LITERAL1">$</SEQ>
+ <SEQ TYPE="LITERAL1">@</SEQ>
+ <SEQ TYPE="LITERAL1">#</SEQ>
+ <SEQ TYPE="LITERAL1">*</SEQ>
+ <SEQ TYPE="LITERAL1">{</SEQ>
+ <SEQ TYPE="LITERAL1">}</SEQ>
+
+ <KEYWORDS>
+
+ <LITERAL2>CORESIZE</LITERAL2> <!-- value of -s parameter (default: 8000) -->
+ <LITERAL2>MAXPROCESSES</LITERAL2> <!-- value of -p parameter (default: 8000) -->
+ <LITERAL2>MAXCYCLES</LITERAL2> <!-- value of -c parameter (default: 80000) -->
+ <LITERAL2>MAXLENGTH</LITERAL2> <!-- value of -l parameter (default: 100) -->
+ <LITERAL2>MINDISTANCE</LITERAL2> <!-- value of -d parameter (default: 100) -->
+ <LITERAL2>ROUNDS</LITERAL2> <!-- (+) value of -r parameter (default: 1) -->
+ <LITERAL2>PSPACESIZE</LITERAL2> <!-- (+) value of -S parameter (default: 1/16th CORESIZE) -->
+ <LITERAL2>CURLINE</LITERAL2> <!-- current line in generated assembly (starts with 0) -->
+ <LITERAL2>VERSION</LITERAL2> <!-- pMARS version ("60" is v0.6.0) -->
+ <LITERAL2>WARRIORS</LITERAL2> <!-- number of warriors specified on command line -->
+
+ <KEYWORD1>DAT</KEYWORD1> <!-- terminate process -->
+ <KEYWORD1>MOV</KEYWORD1> <!-- move from A to B -->
+ <KEYWORD1>ADD</KEYWORD1> <!-- add A to B, store result in B -->
+ <KEYWORD1>SUB</KEYWORD1> <!-- subtract A from B, store result in B -->
+ <KEYWORD1>MUL</KEYWORD1> <!-- multiply A by B, store result in B -->
+ <KEYWORD1>DIV</KEYWORD1> <!-- divide B by A, store result in B if A <> 0, else terminate -->
+ <KEYWORD1>MOD</KEYWORD1> <!-- divide B by A, store remainder in B if A <> 0, else terminate -->
+ <KEYWORD1>JMP</KEYWORD1> <!-- transfer execution to A -->
+ <KEYWORD1>JMZ</KEYWORD1> <!-- transfer execution to A if B is zero -->
+ <KEYWORD1>JMN</KEYWORD1> <!-- transfer execution to A if B is non-zero -->
+ <KEYWORD1>DJN</KEYWORD1> <!-- decrement B, if B is non-zero, transfer execution to A -->
+ <KEYWORD1>SPL</KEYWORD1> <!-- split off process to A -->
+ <KEYWORD1>SLT</KEYWORD1> <!-- skip next instruction if A is less than B -->
+ <KEYWORD1>CMP</KEYWORD1> <!-- same as SEQ -->
+ <KEYWORD1>SEQ</KEYWORD1> <!-- (*) Skip next instruction if A is equal to B -->
+ <KEYWORD1>SNE</KEYWORD1> <!-- (*) Skip next instruction if A is not equal to B -->
+ <KEYWORD1>NOP</KEYWORD1> <!-- (*) No operation -->
+ <KEYWORD1>LDP</KEYWORD1> <!-- (+) Load P-space cell A into core address B -->
+ <KEYWORD1>STP</KEYWORD1> <!-- (+) Store A-number into P-space cell B -->
+
+ <KEYWORD2>EQU</KEYWORD2>
+ <KEYWORD2>ORG</KEYWORD2>
+ <KEYWORD2>FOR</KEYWORD2>
+ <KEYWORD2>ROF</KEYWORD2>
+ <KEYWORD2>END</KEYWORD2>
+ <KEYWORD2>PIN</KEYWORD2>
+ <KEYWORD2>CORESIZE</KEYWORD2> <!-- value of -s parameter (default: 8000) -->
+ <KEYWORD2>MAXPROCESSES</KEYWORD2> <!-- value of -p parameter (default: 8000) -->
+ <KEYWORD2>MAXCYCLES</KEYWORD2> <!-- value of -c parameter (default: 80000) -->
+ <KEYWORD2>MAXLENGTH</KEYWORD2> <!-- value of -l parameter (default: 100) -->
+ <KEYWORD2>MINDISTANCE</KEYWORD2> <!-- value of -d parameter (default: 100) -->
+ <KEYWORD2>ROUNDS</KEYWORD2> <!-- (+) value of -r parameter (default: 1) -->
+ <KEYWORD2>PSPACESIZE</KEYWORD2> <!-- (+) value of -S parameter (default: 1/16th CORESIZE) -->
+ <KEYWORD2>CURLINE</KEYWORD2> <!-- current line in generated assembly (starts with 0) -->
+ <KEYWORD2>VERSION</KEYWORD2> <!-- pMARS version ("60" is v0.6.0) -->
+ <KEYWORD2>WARRIORS</KEYWORD2> <!-- number of warriors specified on command line -->
+
+ </KEYWORDS>
+
+ </RULES>
+
+</MODE>
+
+
diff --git a/jEdit/modes/regex.xml b/jEdit/modes/regex.xml
new file mode 100644
index 0000000..a455f5b
--- /dev/null
+++ b/jEdit/modes/regex.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM 'xmode.dtd'>
+
+<!-- Regular Expression mode, by Kevin Hunter -->
+
+<!-- Currently implemented artifacts:
+***** Classes
+[...] - user-defined character classes
+\d - Numerical characters (eq. [0-9])
+\D - Non-numerical characters (eq. [^0-9])
+\w - Alphanumeric characters and underscore (eq. [A-Za-z0-9_])
+\W - Opposite of \w (eq. [^A-Za-z0-9_])
+\s - Whitespace characters (ex. space, tab, formfeed, newline)
+\S - Non-whitespace characters
+\b - Word-break character
+. - Any character, generally not including a newline (\n)
+
+***** Operators
+^ - Match at beginning of string
+$ - Match at end of string
+? - optionally match previous item token
+* - Match previous token 0 or more times.
++ - Match previous token 1 or more times.
+| - Logical OR, allowing the previous token or next token to match
+{m} - Match previous token exactly m times.
+{m,} - Match previous token at least m times
+{m,n} - Match previous token between m and n times, inclusive.
+
+***** Functions
+[^...] - negate user-defined character classes
+(...) - Backreference - effectively save the matched part for later use
+(?:...) - Group - Don't save, just mark the section of the pattern as a group
+(?=...) - zero-width positive lookahead assertion
+(?!...) - zero-width negative lookahead assertion
+(?<=...) - zero-width positive lookbehind assertion
+(?<!...) - zero-width negative lookbehind assertion
+
+-->
+<MODE>
+ <RULES IGNORE_CASE='FALSE' HIGHLIGHT_DIGITS='TRUE' SET='FORCED_NUMBER'>
+ <SEQ TYPE='OPERATOR'>,</SEQ>
+ </RULES>
+
+ <RULES IGNORE_CASE='FALSE' HIGHLIGHT_DIGITS='TRUE'>
+ <SEQ TYPE='NULL'>\\</SEQ>
+ <SEQ TYPE='NULL'>\(</SEQ>
+ <SEQ TYPE='NULL'>\)</SEQ>
+ <SEQ TYPE='NULL'>\[</SEQ>
+ <SEQ TYPE='NULL'>\]</SEQ>
+ <SEQ TYPE='NULL'>\{</SEQ>
+ <SEQ TYPE='NULL'>\}</SEQ>
+ <SEQ TYPE='NULL'>\^</SEQ>
+ <SEQ TYPE='NULL'>\$</SEQ>
+ <SEQ TYPE='NULL'>\?</SEQ>
+ <SEQ TYPE='NULL'>\+</SEQ>
+ <SEQ TYPE='NULL'>\*</SEQ>
+ <SEQ TYPE='NULL'>\.</SEQ>
+ <SEQ TYPE='NULL'>\|</SEQ>
+
+ <SEQ TYPE='OPERATOR'>^</SEQ>
+ <SEQ TYPE='OPERATOR'>$</SEQ>
+ <SEQ TYPE='OPERATOR'>?</SEQ>
+ <SEQ TYPE='OPERATOR'>*</SEQ>
+ <SEQ TYPE='OPERATOR'>+</SEQ>
+ <SEQ TYPE='OPERATOR'>|</SEQ>
+
+ <SEQ TYPE='KEYWORD1'>\b</SEQ>
+
+ <SEQ TYPE='DIGIT'>\d</SEQ>
+ <SEQ TYPE='LITERAL2'>\D</SEQ>
+
+ <SEQ TYPE='KEYWORD3'>\w</SEQ>
+ <SEQ TYPE='KEYWORD3'>.</SEQ>
+ <SEQ TYPE='LITERAL3'>\W</SEQ>
+
+ <SEQ TYPE='KEYWORD4'>\s</SEQ>
+ <SEQ TYPE='LITERAL4'>\S</SEQ>
+
+ <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
+ <BEGIN>[^</BEGIN> <!-- user-defined negative character class -->
+ <END>]</END>
+ </SPAN>
+
+ <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
+ <BEGIN>(?=</BEGIN> <!-- zero-width positive lookahead assertion -->
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
+ <BEGIN>(?!</BEGIN> <!-- zero-width negative lookahead assertion -->
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
+ <BEGIN><![CDATA[(?<=]]></BEGIN> <!-- zero-width positive lookbehind assertion -->
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
+ <BEGIN><![CDATA[(?<!]]></BEGIN> <!-- zero-width negative lookbehind assertion -->
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
+ <BEGIN>(?:</BEGIN> <!-- unsaved group -->
+ <END>)</END>
+ </SPAN>
+
+ <SPAN TYPE='OPERATOR' DELEGATE='FORCED_NUMBER'>
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN TYPE='OPERATOR' DELEGATE='MAIN'>
+ <BEGIN>[</BEGIN> <!-- user-defined character class -->
+ <END>]</END>
+ </SPAN>
+ <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
+ <BEGIN>(</BEGIN> <!-- saved group (backreference) -->
+ <END>)</END>
+ </SPAN>
+ </RULES>
+
+</MODE>
+
diff --git a/jEdit/modes/relax-ng-compact.xml b/jEdit/modes/relax-ng-compact.xml
index cdf6706..0006fea 100644
--- a/jEdit/modes/relax-ng-compact.xml
+++ b/jEdit/modes/relax-ng-compact.xml
@@ -1,74 +1,74 @@
-<?xml version='1.0'?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- RELAX NG Compact Syntax mode, by Randy Hudson. -->
-<!-- mode catalog entry:
-
- <MODE NAME="relax-ng-compact" FILE="relax-ng-compact.xml"
- FILE_NAME_GLOB="*.rnc" />
- -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
-
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE='LITERAL2'>
- <BEGIN>"""</BEGIN>
- <END>"""</END>
- </SPAN>
- <SPAN TYPE='LITERAL2'>
- <BEGIN>'''</BEGIN>
- <END>'''</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">&=</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|=</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
-
- <MARK_FOLLOWING TYPE="NULL">\</MARK_FOLLOWING>
-
- <KEYWORDS>
- <KEYWORD1>attribute</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>datatypes</KEYWORD1>
- <KEYWORD1>div</KEYWORD1>
- <KEYWORD1>element</KEYWORD1>
- <KEYWORD1>empty</KEYWORD1>
- <KEYWORD1>external</KEYWORD1>
- <KEYWORD1>grammar</KEYWORD1>
- <KEYWORD1>include</KEYWORD1>
- <KEYWORD1>inherit</KEYWORD1>
- <KEYWORD1>list</KEYWORD1>
- <KEYWORD1>mixed</KEYWORD1>
- <KEYWORD1>namespace</KEYWORD1>
- <KEYWORD1>notAllowed</KEYWORD1>
- <KEYWORD1>parent</KEYWORD1>
- <KEYWORD1>start</KEYWORD1>
- <KEYWORD2>string</KEYWORD2>
- <KEYWORD1>text</KEYWORD1>
- <KEYWORD2>token</KEYWORD2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version='1.0'?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- RELAX NG Compact Syntax mode, by Randy Hudson. -->
+<!-- mode catalog entry:
+
+ <MODE NAME="relax-ng-compact" FILE="relax-ng-compact.xml"
+ FILE_NAME_GLOB="*.rnc" />
+ -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE='LITERAL2'>
+ <BEGIN>"""</BEGIN>
+ <END>"""</END>
+ </SPAN>
+ <SPAN TYPE='LITERAL2'>
+ <BEGIN>'''</BEGIN>
+ <END>'''</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">&=</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|=</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+
+ <MARK_FOLLOWING TYPE="NULL">\</MARK_FOLLOWING>
+
+ <KEYWORDS>
+ <KEYWORD1>attribute</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>datatypes</KEYWORD1>
+ <KEYWORD1>div</KEYWORD1>
+ <KEYWORD1>element</KEYWORD1>
+ <KEYWORD1>empty</KEYWORD1>
+ <KEYWORD1>external</KEYWORD1>
+ <KEYWORD1>grammar</KEYWORD1>
+ <KEYWORD1>include</KEYWORD1>
+ <KEYWORD1>inherit</KEYWORD1>
+ <KEYWORD1>list</KEYWORD1>
+ <KEYWORD1>mixed</KEYWORD1>
+ <KEYWORD1>namespace</KEYWORD1>
+ <KEYWORD1>notAllowed</KEYWORD1>
+ <KEYWORD1>parent</KEYWORD1>
+ <KEYWORD1>start</KEYWORD1>
+ <KEYWORD2>string</KEYWORD2>
+ <KEYWORD1>text</KEYWORD1>
+ <KEYWORD2>token</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/rest.xml b/jEdit/modes/rest.xml
index 07acf24..d820ca1 100644
--- a/jEdit/modes/rest.xml
+++ b/jEdit/modes/rest.xml
@@ -1,135 +1,135 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE=".. "/>
- <!-- indent after literal blocks and directives -->
- <PROPERTY NAME="indentNextLines" VALUE=".*::$"/>
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE">
-
- <!-- targets -->
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD3">__</EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD3">.. _</EOL_SPAN>
-
- <!-- section titles -->
- <SEQ_REGEXP HASH_CHAR="===" TYPE="LABEL">={3,}</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="---" TYPE="LABEL">-{3,}</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="~~~" TYPE="LABEL">~{3,}</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="###" TYPE="LABEL">#{3,}</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR='"""' TYPE="LABEL">"{3,}</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="^^^" TYPE="LABEL">\^{3,}</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="+++" TYPE="LABEL">\+{3,}</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="***" TYPE="LABEL">\*{3,}</SEQ_REGEXP>
-
- <!-- replacement -->
- <SEQ_REGEXP
- HASH_CHAR=".."
- AT_LINE_START="TRUE"
- TYPE="LITERAL3"
- >\.\.\s\|[^|]+\|</SEQ_REGEXP>
-
- <!-- substitution -->
- <SEQ_REGEXP
- HASH_CHAR="|"
- AT_LINE_START="FALSE"
- TYPE="LITERAL4"
- >\|[^|]+\|</SEQ_REGEXP>
-
- <!-- directives: .. name:: -->
- <SEQ_REGEXP
- HASH_CHAR=".."
- AT_LINE_START="TRUE"
- TYPE="LITERAL2"
- >\.\.\s[A-z][A-z0-9-_]+::</SEQ_REGEXP>
-
- <!-- strong emphasis: **...** -->
- <SEQ_REGEXP
- HASH_CHAR="**"
- AT_LINE_START="FALSE"
- TYPE="KEYWORD2"
- >\*\*[^*]+\*\*</SEQ_REGEXP>
-
- <!-- emphasis: *...* -->
- <SEQ_REGEXP
- HASH_CHAR="*"
- AT_LINE_START="FALSE"
- TYPE="KEYWORD4"
- >\*[^\s*][^*]*\*</SEQ_REGEXP>
-
- <!-- comments -->
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">.. </EOL_SPAN>
-
- <!-- links: `...`_ or `...`__ -->
- <SEQ_REGEXP
- HASH_CHAR="`"
- TYPE="LABEL"
- >`[A-z0-9]+[^`]+`_{1,2}</SEQ_REGEXP>
-
- <!-- footnote reference: [0]_ -->
- <SEQ_REGEXP
- HASH_CHAR="["
- TYPE="LABEL"
- >\[[0-9]+\]_</SEQ_REGEXP>
-
- <!-- footnote reference: [#]_ or [#foo]_ -->
- <SEQ_REGEXP
- HASH_CHAR="[#"
- TYPE="LABEL"
- >\[#[A-z0-9_]*\]_</SEQ_REGEXP>
-
- <!-- footnote reference: [*]_ -->
- <SEQ TYPE="LABEL">[*]_</SEQ>
-
- <!-- citation reference: [foo]_ -->
- <SEQ_REGEXP
- HASH_CHAR="["
- TYPE="LABEL"
- >\[[A-z][A-z0-9_-]*\]_</SEQ_REGEXP>
-
- <!-- inline literal: ``...``-->
- <!--<SEQ_REGEXP
- HASH_CHAR="``"
- TYPE="LITERAL1"
- >``[^`]+``</SEQ_REGEXP>-->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>``</BEGIN>
- <END>``</END>
- </SPAN>
-
- <!-- interpreted text: `...` -->
- <!--
- <SEQ_REGEXP
- HASH_CHAR="`"
- TYPE="KEYWORD1"
- >`[^`]+`</SEQ_REGEXP>
- -->
- <SPAN TYPE="KEYWORD1">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <SEQ_REGEXP HASH_CHAR="```" TYPE="LABEL">`{3,}</SEQ_REGEXP>
-
- <!-- :field list: -->
- <SEQ_REGEXP
- HASH_CHAR=":"
- TYPE="KEYWORD1"
- >:[A-z][A-z0-9 =\s\t_]*:</SEQ_REGEXP>
-
- <!-- table -->
- <SEQ_REGEXP
- HASH_CHAR="+-"
- TYPE="LABEL"
- >\+-[+-]+</SEQ_REGEXP>
- <SEQ_REGEXP
- HASH_CHAR="+?"
- TYPE="LABEL"
- >\+=[+=]+</SEQ_REGEXP>
-
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE=".. "/>
+ <!-- indent after literal blocks and directives -->
+ <PROPERTY NAME="indentNextLines" VALUE=".*::$"/>
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE">
+
+ <!-- targets -->
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD3">__</EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD3">.. _</EOL_SPAN>
+
+ <!-- section titles -->
+ <SEQ_REGEXP HASH_CHAR="===" TYPE="LABEL">={3,}</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="---" TYPE="LABEL">-{3,}</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="~~~" TYPE="LABEL">~{3,}</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="###" TYPE="LABEL">#{3,}</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR='"""' TYPE="LABEL">"{3,}</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="^^^" TYPE="LABEL">\^{3,}</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="+++" TYPE="LABEL">\+{3,}</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="***" TYPE="LABEL">\*{3,}</SEQ_REGEXP>
+
+ <!-- replacement -->
+ <SEQ_REGEXP
+ HASH_CHAR=".."
+ AT_LINE_START="TRUE"
+ TYPE="LITERAL3"
+ >\.\.\s\|[^|]+\|</SEQ_REGEXP>
+
+ <!-- substitution -->
+ <SEQ_REGEXP
+ HASH_CHAR="|"
+ AT_LINE_START="FALSE"
+ TYPE="LITERAL4"
+ >\|[^|]+\|</SEQ_REGEXP>
+
+ <!-- directives: .. name:: -->
+ <SEQ_REGEXP
+ HASH_CHAR=".."
+ AT_LINE_START="TRUE"
+ TYPE="LITERAL2"
+ >\.\.\s[A-z][A-z0-9-_]+::</SEQ_REGEXP>
+
+ <!-- strong emphasis: **...** -->
+ <SEQ_REGEXP
+ HASH_CHAR="**"
+ AT_LINE_START="FALSE"
+ TYPE="KEYWORD2"
+ >\*\*[^*]+\*\*</SEQ_REGEXP>
+
+ <!-- emphasis: *...* -->
+ <SEQ_REGEXP
+ HASH_CHAR="*"
+ AT_LINE_START="FALSE"
+ TYPE="KEYWORD4"
+ >\*[^\s*][^*]*\*</SEQ_REGEXP>
+
+ <!-- comments -->
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">.. </EOL_SPAN>
+
+ <!-- links: `...`_ or `...`__ -->
+ <SEQ_REGEXP
+ HASH_CHAR="`"
+ TYPE="LABEL"
+ >`[A-z0-9]+[^`]+`_{1,2}</SEQ_REGEXP>
+
+ <!-- footnote reference: [0]_ -->
+ <SEQ_REGEXP
+ HASH_CHAR="["
+ TYPE="LABEL"
+ >\[[0-9]+\]_</SEQ_REGEXP>
+
+ <!-- footnote reference: [#]_ or [#foo]_ -->
+ <SEQ_REGEXP
+ HASH_CHAR="[#"
+ TYPE="LABEL"
+ >\[#[A-z0-9_]*\]_</SEQ_REGEXP>
+
+ <!-- footnote reference: [*]_ -->
+ <SEQ TYPE="LABEL">[*]_</SEQ>
+
+ <!-- citation reference: [foo]_ -->
+ <SEQ_REGEXP
+ HASH_CHAR="["
+ TYPE="LABEL"
+ >\[[A-z][A-z0-9_-]*\]_</SEQ_REGEXP>
+
+ <!-- inline literal: ``...``-->
+ <!--<SEQ_REGEXP
+ HASH_CHAR="``"
+ TYPE="LITERAL1"
+ >``[^`]+``</SEQ_REGEXP>-->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>``</BEGIN>
+ <END>``</END>
+ </SPAN>
+
+ <!-- interpreted text: `...` -->
+ <!--
+ <SEQ_REGEXP
+ HASH_CHAR="`"
+ TYPE="KEYWORD1"
+ >`[^`]+`</SEQ_REGEXP>
+ -->
+ <SPAN TYPE="KEYWORD1">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <SEQ_REGEXP HASH_CHAR="```" TYPE="LABEL">`{3,}</SEQ_REGEXP>
+
+ <!-- :field list: -->
+ <SEQ_REGEXP
+ HASH_CHAR=":"
+ TYPE="KEYWORD1"
+ >:[A-z][A-z0-9 =\s\t_]*:</SEQ_REGEXP>
+
+ <!-- table -->
+ <SEQ_REGEXP
+ HASH_CHAR="+-"
+ TYPE="LABEL"
+ >\+-[+-]+</SEQ_REGEXP>
+ <SEQ_REGEXP
+ HASH_CHAR="+?"
+ TYPE="LABEL"
+ >\+=[+=]+</SEQ_REGEXP>
+
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/rfc.xml b/jEdit/modes/rfc.xml
index 9d84db8..19d3952 100644
--- a/jEdit/modes/rfc.xml
+++ b/jEdit/modes/rfc.xml
@@ -1,28 +1,28 @@
-<?xml version="1.0"?>
-
-<!-- RFC mode by Matthieu Casanova -->
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<MODE>
- <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="FALSE">
- <SEQ_REGEXP HASH_CHAR="[" TYPE="KEYWORD3">\[Page \d+\]</SEQ_REGEXP>
- <SEQ_REGEXP HASH_CHAR="[" TYPE="KEYWORD2">\[RFC\d+\]</SEQ_REGEXP>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <KEYWORDS>
- <!--{{{ Keyword list from RFC2119 -->
- <KEYWORD1>MUST</KEYWORD1>
- <KEYWORD1>MUST NOT</KEYWORD1>
- <KEYWORD1>REQUIRED</KEYWORD1>
- <KEYWORD1>SHALL</KEYWORD1>
- <KEYWORD1>SHALL NOT</KEYWORD1>
- <KEYWORD1>SHOULD</KEYWORD1>
- <KEYWORD1>SHOULD NOT</KEYWORD1>
- <KEYWORD1>RECOMMENDED</KEYWORD1>
- <KEYWORD1>MAY</KEYWORD1>
- <KEYWORD1>OPTIONAL</KEYWORD1>
- <!--}}}-->
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!-- RFC mode by Matthieu Casanova -->
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <RULES HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="FALSE">
+ <SEQ_REGEXP HASH_CHAR="[" TYPE="KEYWORD3">\[Page \d+\]</SEQ_REGEXP>
+ <SEQ_REGEXP HASH_CHAR="[" TYPE="KEYWORD2">\[RFC\d+\]</SEQ_REGEXP>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <KEYWORDS>
+ <!--{{{ Keyword list from RFC2119 -->
+ <KEYWORD1>MUST</KEYWORD1>
+ <KEYWORD1>MUST NOT</KEYWORD1>
+ <KEYWORD1>REQUIRED</KEYWORD1>
+ <KEYWORD1>SHALL</KEYWORD1>
+ <KEYWORD1>SHALL NOT</KEYWORD1>
+ <KEYWORD1>SHOULD</KEYWORD1>
+ <KEYWORD1>SHOULD NOT</KEYWORD1>
+ <KEYWORD1>RECOMMENDED</KEYWORD1>
+ <KEYWORD1>MAY</KEYWORD1>
+ <KEYWORD1>OPTIONAL</KEYWORD1>
+ <!--}}}-->
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/rhtml.xml b/jEdit/modes/rhtml.xml
index 76e4f91..e2e4951 100644
--- a/jEdit/modes/rhtml.xml
+++ b/jEdit/modes/rhtml.xml
@@ -1,108 +1,108 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- rhtml (ruby+html) mode -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <PROPERTY NAME="commentStart" VALUE="<%#" />
- <PROPERTY NAME="commentEnd" VALUE="%>" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
-
- <!-- eRuby comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><%#</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- eRuby assignment -->
- <SPAN TYPE="MARKUP" DELEGATE="ruby::MAIN">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- eRuby statement -->
- <SPAN TYPE="MARKUP" DELEGATE="ruby::MAIN">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <RULES SET="TAGS" DEFAULT="MARKUP">
-
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN><%#</BEGIN>
- <END>%></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="TAGS_LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="TAGS_LITERAL">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- </RULES>
-
- <RULES SET="TAGS_LITERAL" DEFAULT="LITERAL1">
-
- <SPAN TYPE="MARKUP">
- <BEGIN><%</BEGIN>
- <END>%></END>
- </SPAN>
-
- <SPAN TYPE="MARKUP">
- <BEGIN><%=</BEGIN>
- <END>%></END>
- </SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- rhtml (ruby+html) mode -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <PROPERTY NAME="commentStart" VALUE="<%#" />
+ <PROPERTY NAME="commentEnd" VALUE="%>" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+
+ <!-- eRuby comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><%#</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- eRuby assignment -->
+ <SPAN TYPE="MARKUP" DELEGATE="ruby::MAIN">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- eRuby statement -->
+ <SPAN TYPE="MARKUP" DELEGATE="ruby::MAIN">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><%#</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="TAGS_LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="TAGS_LITERAL">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ </RULES>
+
+ <RULES SET="TAGS_LITERAL" DEFAULT="LITERAL1">
+
+ <SPAN TYPE="MARKUP">
+ <BEGIN><%</BEGIN>
+ <END>%></END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP">
+ <BEGIN><%=</BEGIN>
+ <END>%></END>
+ </SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/rib.xml b/jEdit/modes/rib.xml
index c94f79d..c31ea4c 100644
--- a/jEdit/modes/rib.xml
+++ b/jEdit/modes/rib.xml
@@ -1,219 +1,219 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!--
-jEdit edit mode for Renderman Interface Bytestream (*.rib) files
-version 1.0 - 9 nov 2003
-by Alessandro Falappa (alessandro at falappa.net)
-Initial keyword list taken from a syntax highlighting definition
-for TextPad text editor by Kharitonov Konstantin (aqua at sm.bmstu.ru)
--->
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="indentNextLines" VALUE="Begin|WorldBegin|FrameBegin|TransformBegin|AttributeBegin|SolidBegin|ObjectBegin|MotionBegin" />
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="([\p{Digit}]+(e[\p{Digit}]*)?)">
- <EOL_SPAN AT_WHITESPACE_END="TRUE" TYPE="COMMENT1">#</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="LITERALS">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <KEYWORDS>
- <KEYWORD1>float</KEYWORD1>
- <KEYWORD1>string</KEYWORD1>
- <KEYWORD1>color</KEYWORD1>
- <KEYWORD1>point</KEYWORD1>
- <KEYWORD1>vector</KEYWORD1>
- <KEYWORD1>normal</KEYWORD1>
- <KEYWORD1>matrix</KEYWORD1>
- <KEYWORD1>void</KEYWORD1>
- <KEYWORD1>varying</KEYWORD1>
- <KEYWORD1>uniform</KEYWORD1>
- <KEYWORD1>output</KEYWORD1>
- <KEYWORD1>extern</KEYWORD1>
-
- <KEYWORD2>Begin</KEYWORD2>
- <KEYWORD2>End</KEYWORD2>
- <KEYWORD2>Declare</KEYWORD2>
- <KEYWORD2>RtContextHandle </KEYWORD2>
- <KEYWORD2>ContextHandle </KEYWORD2>
- <KEYWORD2>Context</KEYWORD2>
- <KEYWORD2>FrameBegin</KEYWORD2>
- <KEYWORD2>FrameEnd</KEYWORD2>
- <KEYWORD2>WorldBegin</KEYWORD2>
- <KEYWORD2>WorldEnd</KEYWORD2>
- <KEYWORD2>SolidBegin</KEYWORD2>
- <KEYWORD2>SolidEnd</KEYWORD2>
- <KEYWORD2>MotionBegin</KEYWORD2>
- <KEYWORD2>MotionEnd</KEYWORD2>
- <KEYWORD2>ObjectBegin</KEYWORD2>
- <KEYWORD2>ObjectEnd</KEYWORD2>
- <KEYWORD2>Format</KEYWORD2>
- <KEYWORD2>FrameAspectRatio</KEYWORD2>
- <KEYWORD2>ScreenWindow</KEYWORD2>
- <KEYWORD2>CropWindow</KEYWORD2>
- <KEYWORD2>Projection</KEYWORD2>
- <KEYWORD2>Clipping</KEYWORD2>
- <KEYWORD2>ClippingPlane</KEYWORD2>
- <KEYWORD2>DepthOfField</KEYWORD2>
- <KEYWORD2>Shutter</KEYWORD2>
- <KEYWORD2>PixelVariance</KEYWORD2>
- <KEYWORD2>PixelSamples</KEYWORD2>
- <KEYWORD2>PixelFilter</KEYWORD2>
- <KEYWORD2>Exposure</KEYWORD2>
- <KEYWORD2>Imager</KEYWORD2>
- <KEYWORD2>Quantize</KEYWORD2>
- <KEYWORD2>Display</KEYWORD2>
- <KEYWORD2>Hider</KEYWORD2>
- <KEYWORD2>ColorSamples</KEYWORD2>
- <KEYWORD2>RelativeDetail</KEYWORD2>
- <KEYWORD2>Option</KEYWORD2>
- <KEYWORD2>AttributeBegin</KEYWORD2>
- <KEYWORD2>AttributeEnd</KEYWORD2>
- <KEYWORD2>Color</KEYWORD2>
- <KEYWORD2>Opacity</KEYWORD2>
- <KEYWORD2>TextureCoordinates</KEYWORD2>
- <KEYWORD2>RtLightHandle</KEYWORD2>
- <KEYWORD2>LightSource</KEYWORD2>
- <KEYWORD2>AreaLightSource</KEYWORD2>
- <KEYWORD2>Illuminate</KEYWORD2>
- <KEYWORD2>Surface</KEYWORD2>
- <KEYWORD2>Displacement</KEYWORD2>
- <KEYWORD2>Atmosphere</KEYWORD2>
- <KEYWORD2>Interior</KEYWORD2>
- <KEYWORD2>Exterior</KEYWORD2>
- <KEYWORD2>ShadingRate</KEYWORD2>
- <KEYWORD2>ShadingInterpolation</KEYWORD2>
- <KEYWORD2>Matte</KEYWORD2>
- <KEYWORD2>Bound</KEYWORD2>
- <KEYWORD2>Detail</KEYWORD2>
- <KEYWORD2>DetailRange</KEYWORD2>
- <KEYWORD2>GeometricApproximation</KEYWORD2>
- <KEYWORD2>Orientation</KEYWORD2>
- <KEYWORD2>ReverseOrientation</KEYWORD2>
- <KEYWORD2>Sides</KEYWORD2>
- <KEYWORD2>Identity</KEYWORD2>
- <KEYWORD2>Transform</KEYWORD2>
- <KEYWORD2>ConcatTransform</KEYWORD2>
- <KEYWORD2>Perspective</KEYWORD2>
- <KEYWORD2>Translate</KEYWORD2>
- <KEYWORD2>Rotate</KEYWORD2>
- <KEYWORD2>Scale</KEYWORD2>
- <KEYWORD2>Skew</KEYWORD2>
- <KEYWORD2>CoordinateSystem</KEYWORD2>
- <KEYWORD2>CoordSysTransform</KEYWORD2>
- <KEYWORD2>TransformPoints</KEYWORD2>
- <KEYWORD2>TransformBegin</KEYWORD2>
- <KEYWORD2>TransformEnd</KEYWORD2>
- <KEYWORD2>Attribute</KEYWORD2>
-
- <KEYWORD3>Polygon</KEYWORD3>
- <KEYWORD3>GeneralPolygon</KEYWORD3>
- <KEYWORD3>PointsPolygons</KEYWORD3>
- <KEYWORD3>PointsGeneralPolygons</KEYWORD3>
- <KEYWORD3>Basis</KEYWORD3>
- <KEYWORD3>Patch</KEYWORD3>
- <KEYWORD3>PatchMesh</KEYWORD3>
- <KEYWORD3>NuPatch</KEYWORD3>
- <KEYWORD3>TrimCurve</KEYWORD3>
- <KEYWORD3>SubdivisionMesh</KEYWORD3>
- <KEYWORD3>Sphere</KEYWORD3>
- <KEYWORD3>Cone</KEYWORD3>
- <KEYWORD3>Cylinder</KEYWORD3>
- <KEYWORD3>Hyperboloid</KEYWORD3>
- <KEYWORD3>Paraboloid</KEYWORD3>
- <KEYWORD3>Disk</KEYWORD3>
- <KEYWORD3>Torus</KEYWORD3>
- <KEYWORD3>Points</KEYWORD3>
- <KEYWORD3>Curves</KEYWORD3>
- <KEYWORD3>Blobby</KEYWORD3>
- <KEYWORD3>Procedural</KEYWORD3>
- <KEYWORD3>DelayedReadArchive</KEYWORD3>
- <KEYWORD3>RunProgram</KEYWORD3>
- <KEYWORD3>DynamicLoad</KEYWORD3>
- <KEYWORD3>Geometry</KEYWORD3>
- <KEYWORD3>SolidBegin</KEYWORD3>
- <KEYWORD3>SolidEnd</KEYWORD3>
- <KEYWORD3>RtObjectHandle</KEYWORD3>
- <KEYWORD3>ObjectBegin</KEYWORD3>
- <KEYWORD3>ObjectEnd</KEYWORD3>
- <KEYWORD3>ObjectInstance</KEYWORD3>
-
- <KEYWORD4>MakeTexture</KEYWORD4>
- <KEYWORD4>MakeLatLongEnvironment</KEYWORD4>
- <KEYWORD4>MakeCubeFaceEnvironment</KEYWORD4>
- <KEYWORD4>MakeShadow</KEYWORD4>
- <KEYWORD4>ErrorHandler</KEYWORD4>
- <KEYWORD4>ArchiveRecord</KEYWORD4>
- <KEYWORD4>ReadArchive</KEYWORD4>
- <KEYWORD4>Deformation</KEYWORD4>
- <KEYWORD4>MakeBump</KEYWORD4>
- </KEYWORDS>
- </RULES>
- <RULES SET="LITERALS" ESCAPE="\" IGNORE_CASE="FALSE" DEFAULT="LITERAL1">
- <KEYWORDS>
- <KEYWORD1>float</KEYWORD1>
- <KEYWORD1>string</KEYWORD1>
- <KEYWORD1>color</KEYWORD1>
- <KEYWORD1>point</KEYWORD1>
- <KEYWORD1>vector</KEYWORD1>
- <KEYWORD1>normal</KEYWORD1>
- <KEYWORD1>matrix</KEYWORD1>
- <KEYWORD1>void</KEYWORD1>
- <KEYWORD1>varying</KEYWORD1>
- <KEYWORD1>uniform</KEYWORD1>
- <KEYWORD1>output</KEYWORD1>
- <KEYWORD1>extern</KEYWORD1>
-
- <LITERAL2>P</LITERAL2>
- <LITERAL2>Pw</LITERAL2>
- <LITERAL2>Pz</LITERAL2>
- <LITERAL2>N</LITERAL2>
- <LITERAL2>Cs</LITERAL2>
- <LITERAL2>Os</LITERAL2>
- <LITERAL2>RI_NULL</LITERAL2>
- <LITERAL2>RI_INFINITY</LITERAL2>
- <LITERAL2>orthographic</LITERAL2>
- <LITERAL2>perspective</LITERAL2>
- <LITERAL2>bezier</LITERAL2>
- <LITERAL2>catmull-rom</LITERAL2>
- <LITERAL2>b-spline</LITERAL2>
- <LITERAL2>hermite</LITERAL2>
- <LITERAL2>power</LITERAL2>
- <LITERAL2>catmull-clark</LITERAL2>
- <LITERAL2>hole</LITERAL2>
- <LITERAL2>crease</LITERAL2>
- <LITERAL2>corner</LITERAL2>
- <LITERAL2>interpolateboundary</LITERAL2>
- <LITERAL2>object</LITERAL2>
- <LITERAL2>world</LITERAL2>
- <LITERAL2>camera</LITERAL2>
- <LITERAL2>screen</LITERAL2>
- <LITERAL2>raster</LITERAL2>
- <LITERAL2>NDC</LITERAL2>
- <LITERAL2>box</LITERAL2>
- <LITERAL2>triangle</LITERAL2>
- <LITERAL2>sinc</LITERAL2>
- <LITERAL2>gaussian</LITERAL2>
- <LITERAL2>constant</LITERAL2>
- <LITERAL2>smooth</LITERAL2>
- <LITERAL2>outside</LITERAL2>
- <LITERAL2>inside</LITERAL2>
- <LITERAL2>lh</LITERAL2>
- <LITERAL2>rh</LITERAL2>
- <LITERAL2>bicubic</LITERAL2>
- <LITERAL2>bilinear</LITERAL2>
- <LITERAL2>periodic</LITERAL2>
- <LITERAL2>nonperiodic</LITERAL2>
- <LITERAL2>hidden</LITERAL2>
- <LITERAL2>null</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!--
+jEdit edit mode for Renderman Interface Bytestream (*.rib) files
+version 1.0 - 9 nov 2003
+by Alessandro Falappa (alessandro at falappa.net)
+Initial keyword list taken from a syntax highlighting definition
+for TextPad text editor by Kharitonov Konstantin (aqua at sm.bmstu.ru)
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="indentNextLines" VALUE="Begin|WorldBegin|FrameBegin|TransformBegin|AttributeBegin|SolidBegin|ObjectBegin|MotionBegin" />
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="([\p{Digit}]+(e[\p{Digit}]*)?)">
+ <EOL_SPAN AT_WHITESPACE_END="TRUE" TYPE="COMMENT1">#</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">#</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="LITERALS">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <KEYWORDS>
+ <KEYWORD1>float</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>color</KEYWORD1>
+ <KEYWORD1>point</KEYWORD1>
+ <KEYWORD1>vector</KEYWORD1>
+ <KEYWORD1>normal</KEYWORD1>
+ <KEYWORD1>matrix</KEYWORD1>
+ <KEYWORD1>void</KEYWORD1>
+ <KEYWORD1>varying</KEYWORD1>
+ <KEYWORD1>uniform</KEYWORD1>
+ <KEYWORD1>output</KEYWORD1>
+ <KEYWORD1>extern</KEYWORD1>
+
+ <KEYWORD2>Begin</KEYWORD2>
+ <KEYWORD2>End</KEYWORD2>
+ <KEYWORD2>Declare</KEYWORD2>
+ <KEYWORD2>RtContextHandle </KEYWORD2>
+ <KEYWORD2>ContextHandle </KEYWORD2>
+ <KEYWORD2>Context</KEYWORD2>
+ <KEYWORD2>FrameBegin</KEYWORD2>
+ <KEYWORD2>FrameEnd</KEYWORD2>
+ <KEYWORD2>WorldBegin</KEYWORD2>
+ <KEYWORD2>WorldEnd</KEYWORD2>
+ <KEYWORD2>SolidBegin</KEYWORD2>
+ <KEYWORD2>SolidEnd</KEYWORD2>
+ <KEYWORD2>MotionBegin</KEYWORD2>
+ <KEYWORD2>MotionEnd</KEYWORD2>
+ <KEYWORD2>ObjectBegin</KEYWORD2>
+ <KEYWORD2>ObjectEnd</KEYWORD2>
+ <KEYWORD2>Format</KEYWORD2>
+ <KEYWORD2>FrameAspectRatio</KEYWORD2>
+ <KEYWORD2>ScreenWindow</KEYWORD2>
+ <KEYWORD2>CropWindow</KEYWORD2>
+ <KEYWORD2>Projection</KEYWORD2>
+ <KEYWORD2>Clipping</KEYWORD2>
+ <KEYWORD2>ClippingPlane</KEYWORD2>
+ <KEYWORD2>DepthOfField</KEYWORD2>
+ <KEYWORD2>Shutter</KEYWORD2>
+ <KEYWORD2>PixelVariance</KEYWORD2>
+ <KEYWORD2>PixelSamples</KEYWORD2>
+ <KEYWORD2>PixelFilter</KEYWORD2>
+ <KEYWORD2>Exposure</KEYWORD2>
+ <KEYWORD2>Imager</KEYWORD2>
+ <KEYWORD2>Quantize</KEYWORD2>
+ <KEYWORD2>Display</KEYWORD2>
+ <KEYWORD2>Hider</KEYWORD2>
+ <KEYWORD2>ColorSamples</KEYWORD2>
+ <KEYWORD2>RelativeDetail</KEYWORD2>
+ <KEYWORD2>Option</KEYWORD2>
+ <KEYWORD2>AttributeBegin</KEYWORD2>
+ <KEYWORD2>AttributeEnd</KEYWORD2>
+ <KEYWORD2>Color</KEYWORD2>
+ <KEYWORD2>Opacity</KEYWORD2>
+ <KEYWORD2>TextureCoordinates</KEYWORD2>
+ <KEYWORD2>RtLightHandle</KEYWORD2>
+ <KEYWORD2>LightSource</KEYWORD2>
+ <KEYWORD2>AreaLightSource</KEYWORD2>
+ <KEYWORD2>Illuminate</KEYWORD2>
+ <KEYWORD2>Surface</KEYWORD2>
+ <KEYWORD2>Displacement</KEYWORD2>
+ <KEYWORD2>Atmosphere</KEYWORD2>
+ <KEYWORD2>Interior</KEYWORD2>
+ <KEYWORD2>Exterior</KEYWORD2>
+ <KEYWORD2>ShadingRate</KEYWORD2>
+ <KEYWORD2>ShadingInterpolation</KEYWORD2>
+ <KEYWORD2>Matte</KEYWORD2>
+ <KEYWORD2>Bound</KEYWORD2>
+ <KEYWORD2>Detail</KEYWORD2>
+ <KEYWORD2>DetailRange</KEYWORD2>
+ <KEYWORD2>GeometricApproximation</KEYWORD2>
+ <KEYWORD2>Orientation</KEYWORD2>
+ <KEYWORD2>ReverseOrientation</KEYWORD2>
+ <KEYWORD2>Sides</KEYWORD2>
+ <KEYWORD2>Identity</KEYWORD2>
+ <KEYWORD2>Transform</KEYWORD2>
+ <KEYWORD2>ConcatTransform</KEYWORD2>
+ <KEYWORD2>Perspective</KEYWORD2>
+ <KEYWORD2>Translate</KEYWORD2>
+ <KEYWORD2>Rotate</KEYWORD2>
+ <KEYWORD2>Scale</KEYWORD2>
+ <KEYWORD2>Skew</KEYWORD2>
+ <KEYWORD2>CoordinateSystem</KEYWORD2>
+ <KEYWORD2>CoordSysTransform</KEYWORD2>
+ <KEYWORD2>TransformPoints</KEYWORD2>
+ <KEYWORD2>TransformBegin</KEYWORD2>
+ <KEYWORD2>TransformEnd</KEYWORD2>
+ <KEYWORD2>Attribute</KEYWORD2>
+
+ <KEYWORD3>Polygon</KEYWORD3>
+ <KEYWORD3>GeneralPolygon</KEYWORD3>
+ <KEYWORD3>PointsPolygons</KEYWORD3>
+ <KEYWORD3>PointsGeneralPolygons</KEYWORD3>
+ <KEYWORD3>Basis</KEYWORD3>
+ <KEYWORD3>Patch</KEYWORD3>
+ <KEYWORD3>PatchMesh</KEYWORD3>
+ <KEYWORD3>NuPatch</KEYWORD3>
+ <KEYWORD3>TrimCurve</KEYWORD3>
+ <KEYWORD3>SubdivisionMesh</KEYWORD3>
+ <KEYWORD3>Sphere</KEYWORD3>
+ <KEYWORD3>Cone</KEYWORD3>
+ <KEYWORD3>Cylinder</KEYWORD3>
+ <KEYWORD3>Hyperboloid</KEYWORD3>
+ <KEYWORD3>Paraboloid</KEYWORD3>
+ <KEYWORD3>Disk</KEYWORD3>
+ <KEYWORD3>Torus</KEYWORD3>
+ <KEYWORD3>Points</KEYWORD3>
+ <KEYWORD3>Curves</KEYWORD3>
+ <KEYWORD3>Blobby</KEYWORD3>
+ <KEYWORD3>Procedural</KEYWORD3>
+ <KEYWORD3>DelayedReadArchive</KEYWORD3>
+ <KEYWORD3>RunProgram</KEYWORD3>
+ <KEYWORD3>DynamicLoad</KEYWORD3>
+ <KEYWORD3>Geometry</KEYWORD3>
+ <KEYWORD3>SolidBegin</KEYWORD3>
+ <KEYWORD3>SolidEnd</KEYWORD3>
+ <KEYWORD3>RtObjectHandle</KEYWORD3>
+ <KEYWORD3>ObjectBegin</KEYWORD3>
+ <KEYWORD3>ObjectEnd</KEYWORD3>
+ <KEYWORD3>ObjectInstance</KEYWORD3>
+
+ <KEYWORD4>MakeTexture</KEYWORD4>
+ <KEYWORD4>MakeLatLongEnvironment</KEYWORD4>
+ <KEYWORD4>MakeCubeFaceEnvironment</KEYWORD4>
+ <KEYWORD4>MakeShadow</KEYWORD4>
+ <KEYWORD4>ErrorHandler</KEYWORD4>
+ <KEYWORD4>ArchiveRecord</KEYWORD4>
+ <KEYWORD4>ReadArchive</KEYWORD4>
+ <KEYWORD4>Deformation</KEYWORD4>
+ <KEYWORD4>MakeBump</KEYWORD4>
+ </KEYWORDS>
+ </RULES>
+ <RULES SET="LITERALS" ESCAPE="\" IGNORE_CASE="FALSE" DEFAULT="LITERAL1">
+ <KEYWORDS>
+ <KEYWORD1>float</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>color</KEYWORD1>
+ <KEYWORD1>point</KEYWORD1>
+ <KEYWORD1>vector</KEYWORD1>
+ <KEYWORD1>normal</KEYWORD1>
+ <KEYWORD1>matrix</KEYWORD1>
+ <KEYWORD1>void</KEYWORD1>
+ <KEYWORD1>varying</KEYWORD1>
+ <KEYWORD1>uniform</KEYWORD1>
+ <KEYWORD1>output</KEYWORD1>
+ <KEYWORD1>extern</KEYWORD1>
+
+ <LITERAL2>P</LITERAL2>
+ <LITERAL2>Pw</LITERAL2>
+ <LITERAL2>Pz</LITERAL2>
+ <LITERAL2>N</LITERAL2>
+ <LITERAL2>Cs</LITERAL2>
+ <LITERAL2>Os</LITERAL2>
+ <LITERAL2>RI_NULL</LITERAL2>
+ <LITERAL2>RI_INFINITY</LITERAL2>
+ <LITERAL2>orthographic</LITERAL2>
+ <LITERAL2>perspective</LITERAL2>
+ <LITERAL2>bezier</LITERAL2>
+ <LITERAL2>catmull-rom</LITERAL2>
+ <LITERAL2>b-spline</LITERAL2>
+ <LITERAL2>hermite</LITERAL2>
+ <LITERAL2>power</LITERAL2>
+ <LITERAL2>catmull-clark</LITERAL2>
+ <LITERAL2>hole</LITERAL2>
+ <LITERAL2>crease</LITERAL2>
+ <LITERAL2>corner</LITERAL2>
+ <LITERAL2>interpolateboundary</LITERAL2>
+ <LITERAL2>object</LITERAL2>
+ <LITERAL2>world</LITERAL2>
+ <LITERAL2>camera</LITERAL2>
+ <LITERAL2>screen</LITERAL2>
+ <LITERAL2>raster</LITERAL2>
+ <LITERAL2>NDC</LITERAL2>
+ <LITERAL2>box</LITERAL2>
+ <LITERAL2>triangle</LITERAL2>
+ <LITERAL2>sinc</LITERAL2>
+ <LITERAL2>gaussian</LITERAL2>
+ <LITERAL2>constant</LITERAL2>
+ <LITERAL2>smooth</LITERAL2>
+ <LITERAL2>outside</LITERAL2>
+ <LITERAL2>inside</LITERAL2>
+ <LITERAL2>lh</LITERAL2>
+ <LITERAL2>rh</LITERAL2>
+ <LITERAL2>bicubic</LITERAL2>
+ <LITERAL2>bilinear</LITERAL2>
+ <LITERAL2>periodic</LITERAL2>
+ <LITERAL2>nonperiodic</LITERAL2>
+ <LITERAL2>hidden</LITERAL2>
+ <LITERAL2>null</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/rpmspec.xml b/jEdit/modes/rpmspec.xml
index 9bc3e12..e551e32 100644
--- a/jEdit/modes/rpmspec.xml
+++ b/jEdit/modes/rpmspec.xml
@@ -1,130 +1,130 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
- <RULES>
- <!-- comments -->
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">#</EOL_SPAN>
-
- <!-- Dependency operators -->
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <!-- %attr -->
- <SPAN TYPE="MARKUP" DELEGATE="ATTR" NO_LINE_BREAK="TRUE">
- <BEGIN>%attr(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- %verify -->
- <SPAN TYPE="MARKUP" DELEGATE="VERIFY" NO_LINE_BREAK="TRUE">
- <BEGIN>%verify(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- Source -->
- <MARK_FOLLOWING TYPE="KEYWORD1"
- AT_LINE_START="TRUE">Source</MARK_FOLLOWING>
-
- <!-- Patch -->
- <MARK_FOLLOWING TYPE="KEYWORD1"
- AT_LINE_START="TRUE">Patch</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION"
- AT_LINE_START="TRUE">%patch</MARK_FOLLOWING>
-
- <!-- Variables -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SPAN TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
- <BEGIN>%{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$?</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$*</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$<</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
-
- <KEYWORDS>
- <KEYWORD1>Summary:</KEYWORD1>
- <KEYWORD1>Name:</KEYWORD1>
- <KEYWORD1>Version:</KEYWORD1>
- <KEYWORD1>Release:</KEYWORD1>
- <KEYWORD1>Copyright:</KEYWORD1>
- <KEYWORD1>Group:</KEYWORD1>
- <KEYWORD1>URL:</KEYWORD1>
- <KEYWORD1>Packager:</KEYWORD1>
- <KEYWORD1>Prefix:</KEYWORD1>
- <KEYWORD1>Distribution:</KEYWORD1>
- <KEYWORD1>Vendor:</KEYWORD1>
- <KEYWORD1>Icon:</KEYWORD1>
- <KEYWORD1>Provides:</KEYWORD1>
- <KEYWORD1>Requires:</KEYWORD1>
- <KEYWORD1>Serial:</KEYWORD1>
- <KEYWORD1>Conflicts:</KEYWORD1>
- <KEYWORD1>AutoReqProv:</KEYWORD1>
- <KEYWORD1>BuildArch:</KEYWORD1>
- <KEYWORD1>ExcludeArch:</KEYWORD1>
- <KEYWORD1>ExclusiveArch:</KEYWORD1>
- <KEYWORD1>ExclusiveOS:</KEYWORD1>
- <KEYWORD1>BuildRoot:</KEYWORD1>
- <KEYWORD1>NoSource:</KEYWORD1>
- <KEYWORD1>NoPatch:</KEYWORD1>
-
- <LABEL>%prep</LABEL>
- <LABEL>%install</LABEL>
- <LABEL>%description</LABEL>
- <LABEL>%build</LABEL>
- <LABEL>%files</LABEL>
- <LABEL>%clean</LABEL>
- <LABEL>%pre</LABEL>
- <LABEL>%post</LABEL>
- <LABEL>%preun</LABEL>
- <LABEL>%postun</LABEL>
- <LABEL>%verifyscript</LABEL>
-
- <FUNCTION>%setup</FUNCTION>
- <FUNCTION>%ifarch</FUNCTION>
- <FUNCTION>%ifnarch</FUNCTION>
- <FUNCTION>%ifos</FUNCTION>
- <FUNCTION>%ifnos</FUNCTION>
- <FUNCTION>%else</FUNCTION>
- <FUNCTION>%endif</FUNCTION>
-
- <MARKUP>%doc</MARKUP>
- <MARKUP>%config</MARKUP>
- <MARKUP>%docdir</MARKUP>
- <MARKUP>%dir</MARKUP>
- <MARKUP>%package</MARKUP>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="ATTR" HIGHLIGHT_DIGITS="TRUE">
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- </RULES>
-
- <RULES SET="VERIFY">
- <KEYWORDS>
- <KEYWORD2>owner</KEYWORD2>
- <KEYWORD2>group</KEYWORD2>
- <KEYWORD2>mode</KEYWORD2>
- <KEYWORD2>md5</KEYWORD2>
- <KEYWORD2>size</KEYWORD2>
- <KEYWORD2>maj</KEYWORD2>
- <KEYWORD2>min</KEYWORD2>
- <KEYWORD2>symlink</KEYWORD2>
- <KEYWORD2>mtime</KEYWORD2>
- <OPERATOR>not</OPERATOR>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+ <RULES>
+ <!-- comments -->
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="TRUE">#</EOL_SPAN>
+
+ <!-- Dependency operators -->
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <!-- %attr -->
+ <SPAN TYPE="MARKUP" DELEGATE="ATTR" NO_LINE_BREAK="TRUE">
+ <BEGIN>%attr(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- %verify -->
+ <SPAN TYPE="MARKUP" DELEGATE="VERIFY" NO_LINE_BREAK="TRUE">
+ <BEGIN>%verify(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- Source -->
+ <MARK_FOLLOWING TYPE="KEYWORD1"
+ AT_LINE_START="TRUE">Source</MARK_FOLLOWING>
+
+ <!-- Patch -->
+ <MARK_FOLLOWING TYPE="KEYWORD1"
+ AT_LINE_START="TRUE">Patch</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION"
+ AT_LINE_START="TRUE">%patch</MARK_FOLLOWING>
+
+ <!-- Variables -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SPAN TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
+ <BEGIN>%{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$?</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$*</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$<</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+
+ <KEYWORDS>
+ <KEYWORD1>Summary:</KEYWORD1>
+ <KEYWORD1>Name:</KEYWORD1>
+ <KEYWORD1>Version:</KEYWORD1>
+ <KEYWORD1>Release:</KEYWORD1>
+ <KEYWORD1>Copyright:</KEYWORD1>
+ <KEYWORD1>Group:</KEYWORD1>
+ <KEYWORD1>URL:</KEYWORD1>
+ <KEYWORD1>Packager:</KEYWORD1>
+ <KEYWORD1>Prefix:</KEYWORD1>
+ <KEYWORD1>Distribution:</KEYWORD1>
+ <KEYWORD1>Vendor:</KEYWORD1>
+ <KEYWORD1>Icon:</KEYWORD1>
+ <KEYWORD1>Provides:</KEYWORD1>
+ <KEYWORD1>Requires:</KEYWORD1>
+ <KEYWORD1>Serial:</KEYWORD1>
+ <KEYWORD1>Conflicts:</KEYWORD1>
+ <KEYWORD1>AutoReqProv:</KEYWORD1>
+ <KEYWORD1>BuildArch:</KEYWORD1>
+ <KEYWORD1>ExcludeArch:</KEYWORD1>
+ <KEYWORD1>ExclusiveArch:</KEYWORD1>
+ <KEYWORD1>ExclusiveOS:</KEYWORD1>
+ <KEYWORD1>BuildRoot:</KEYWORD1>
+ <KEYWORD1>NoSource:</KEYWORD1>
+ <KEYWORD1>NoPatch:</KEYWORD1>
+
+ <LABEL>%prep</LABEL>
+ <LABEL>%install</LABEL>
+ <LABEL>%description</LABEL>
+ <LABEL>%build</LABEL>
+ <LABEL>%files</LABEL>
+ <LABEL>%clean</LABEL>
+ <LABEL>%pre</LABEL>
+ <LABEL>%post</LABEL>
+ <LABEL>%preun</LABEL>
+ <LABEL>%postun</LABEL>
+ <LABEL>%verifyscript</LABEL>
+
+ <FUNCTION>%setup</FUNCTION>
+ <FUNCTION>%ifarch</FUNCTION>
+ <FUNCTION>%ifnarch</FUNCTION>
+ <FUNCTION>%ifos</FUNCTION>
+ <FUNCTION>%ifnos</FUNCTION>
+ <FUNCTION>%else</FUNCTION>
+ <FUNCTION>%endif</FUNCTION>
+
+ <MARKUP>%doc</MARKUP>
+ <MARKUP>%config</MARKUP>
+ <MARKUP>%docdir</MARKUP>
+ <MARKUP>%dir</MARKUP>
+ <MARKUP>%package</MARKUP>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="ATTR" HIGHLIGHT_DIGITS="TRUE">
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ </RULES>
+
+ <RULES SET="VERIFY">
+ <KEYWORDS>
+ <KEYWORD2>owner</KEYWORD2>
+ <KEYWORD2>group</KEYWORD2>
+ <KEYWORD2>mode</KEYWORD2>
+ <KEYWORD2>md5</KEYWORD2>
+ <KEYWORD2>size</KEYWORD2>
+ <KEYWORD2>maj</KEYWORD2>
+ <KEYWORD2>min</KEYWORD2>
+ <KEYWORD2>symlink</KEYWORD2>
+ <KEYWORD2>mtime</KEYWORD2>
+ <OPERATOR>not</OPERATOR>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/rtf.xml b/jEdit/modes/rtf.xml
index 820e489..9783cce 100644
--- a/jEdit/modes/rtf.xml
+++ b/jEdit/modes/rtf.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- contributed by Lionel Fiol <lio-sand at ifrance.com> -->
-<!-- 30/MAR/2004: initial contribution -->
-
-<MODE>
- <RULES>
- <!-- groups -->
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <!-- characters as hexadecimal values - eg "\'e9" -->
- <SEQ_REGEXP HASH_CHAR="\'" ESCAPE="\\" TYPE="LITERAL2">\\'\w\d</SEQ_REGEXP>
- <!-- control words added after the RTF Specification published in March 1987 - eg "\*\panose" -->
- <MARK_FOLLOWING TYPE="KEYWORD2">\*\</MARK_FOLLOWING>
- <!-- control words - eg "\par" -->
- <MARK_FOLLOWING TYPE="KEYWORD1">\</MARK_FOLLOWING>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- contributed by Lionel Fiol <lio-sand at ifrance.com> -->
+<!-- 30/MAR/2004: initial contribution -->
+
+<MODE>
+ <RULES>
+ <!-- groups -->
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <!-- characters as hexadecimal values - eg "\'e9" -->
+ <SEQ_REGEXP HASH_CHAR="\'" ESCAPE="\\" TYPE="LITERAL2">\\'\w\d</SEQ_REGEXP>
+ <!-- control words added after the RTF Specification published in March 1987 - eg "\*\panose" -->
+ <MARK_FOLLOWING TYPE="KEYWORD2">\*\</MARK_FOLLOWING>
+ <!-- control words - eg "\par" -->
+ <MARK_FOLLOWING TYPE="KEYWORD1">\</MARK_FOLLOWING>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/ruby.xml b/jEdit/modes/ruby.xml
index 59abee6..05f6daa 100644
--- a/jEdit/modes/ruby.xml
+++ b/jEdit/modes/ruby.xml
@@ -1,469 +1,469 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!-- Ruby mode by Ian Maclean (Ruby edit mode v0.7.4) -->
-<!-- tweakage by Chris Morris - clabs.org -->
-<!-- further tweakage by Christophe Grandsire -->
-<!-- further tweakage by Robert McKinnon 2004 -->
-<!-- Major overhaul by Karl von Laudermann -->
-<!-- More tweakage by Jim Morris (wolfmanjm), adds electric unindent for else, elsif, rescue, end -->
-<!-- More tweakage by Jim Morris (wolfmanjm), fixed when statements for most cases -->
-<!-- recommended mode catalog entry:
- <MODE NAME="ruby" FILE="ruby.xml" FILE_NAME_GLOB="*.{rb,rbw}" FIRST_LINE_GLOB="#!*/*ruby*" /> -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{"/>
- <PROPERTY NAME="indentCloseBrackets" VALUE="}"/>
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="("/>
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")"/>
- <PROPERTY NAME="lineUpClosingBracket" VALUE="true"/>
- <PROPERTY NAME="commentStart" VALUE="=begin"/>
- <PROPERTY NAME="commentEnd" VALUE="=end"/>
- <PROPERTY NAME="lineComment" VALUE="#"/>
- <PROPERTY NAME="indentNextLines"
- VALUE="[^#]*\s+do(\s*|(\s+\|.+\|\s*))|\s*(if\s+.*|elsif.*|else.*|do(\s*|\s+.*)|case\s+.*|when\s+.*|while\s+.*|for\s+.*|until\s+.*|loop\s+.*|def\s+.*|class\s+.*|module\s+.*|begin.*|unless\s+.*|rescue.*|ensure.*)+"/>
- <PROPERTY NAME="unindentThisLine" VALUE="^\s*(else.*|end\s*|elsif.*|rescue.*|when.*|ensure.*)$"/>
- <PROPERTY NAME="unindentNextLines" VALUE="^\s*(end\s*|else.*|rescue.*|elsif.*|when.*|ensure.*)$"/>
- <PROPERTY NAME="indentNextLine"
- VALUE="^[^#]*([^$](:|\+|~|\*|-|%|<|>|&|\^|\.|=)|\s(/|\!|\?|\|)|\b(not|and|or)|\\)\s*$"/>
- <PROPERTY NAME="electricKeys" VALUE="edfn"/>
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0b[01]([01_]*[01])?)|(0x[\p{XDigit}]([\p{XDigit}_]*[\p{XDigit}])?)|(0([0-7_]*[0-7])?)|(0d[0-9]([0-9_]*[0-9])?)|([1-9]([0-9_]*[0-9])?)|([0-9]([0-9_]*[0-9])?[Ee]([0-9]([0-9_]*[0-9])?)?)">
- <!-- ^ Binary literal | ^ Hex literal | ^ Octal literal | ^ "0d" Style Dec lit | ^ Normal Dec literal | ^ Float literal w/out dec point, with exp. -->
-
- <!-- Ruby comment (Inline Documentation ) -->
- <SPAN TYPE="COMMENT2">
- <BEGIN>=begin</BEGIN>
- <END>=end</END>
- </SPAN>
-
- <!-- Class and instance vars -->
- <MARK_FOLLOWING TYPE="KEYWORD4">@</MARK_FOLLOWING>
-
-
- <!-- Method, class and modules names -->
- <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1">def</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1">undef</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1">class</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1">module</MARK_FOLLOWING>
- <!-- String literals -->
- <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- %Q(Hello world) %(Hello world)-->
- <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%Q?\(</BEGIN>
- <END>)</END>
- </SPAN_REGEXP>
-
- <!-- %q(Hello world) -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%q(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- %Q{Hello world} %{Hello world} -->
- <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%Q?\{</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
-
- <!-- %q{Hello world} -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%q{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- %Q[Hello world] %[Hello world] -->
- <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%Q?\[</BEGIN>
- <END>]</END>
- </SPAN_REGEXP>
-
- <!-- %q[Hello world] -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%q[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- %Q<Hello world> %<Hello world> -->
- <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%Q?<</BEGIN>
- <END>></END>
- </SPAN_REGEXP>
-
- <!-- %q<Hello world> -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%q<</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- I made the next three forms as three instead of two, because the
- first two actually support whitespace as a delimiter, and the third
- one doesn't. -->
- <!-- %Q$Hello world$ -->
- <SPAN_REGEXP HASH_CHAR="%Q" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%Q([^\p{Alnum}])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- %q$Hello world$ -->
- <SPAN_REGEXP HASH_CHAR="%q" TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%q([^\p{Alnum}])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- %$Hello world$ -->
- <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%([^\p{Alnum}\p{Space}])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- %W(Array of strings) -->
- <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%W(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- %w(Array of strings) -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%w(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- %W{Array of strings} -->
- <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%W{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- %w{Array of strings} -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%w{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- %W[Array of strings] -->
- <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%W[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- %w[Array of strings] -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%w[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- %W<Array of strings> -->
- <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%W<</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- %w<Array of strings> -->
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%w<</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- %W$Array of strings$ -->
- <SPAN_REGEXP HASH_CHAR="%W" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN>%W([^\p{Alnum}\p{Space}])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- %w at Array of strings@ -->
- <SPAN_REGEXP HASH_CHAR="%w" TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>%w([^\p{Alnum}\p{Space}])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- Here documents <<"FOO" <<-"FOO" -->
- <!-- Unfortunately, in a SPAN_REGEXP element only the <BEGIN> tag takes
- a regex, not the <END> tag. So an instance of FOO anywhere in the here
- document will terminate highlighting; I couldn't make it smarter. -->
- <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN><<-?"([\p{Graph}]+)"</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- Here documents <<'FOO' <<-'FOO' -->
- <!-- Unfortunately, in a SPAN_REGEXP element only the <BEGIN> tag takes
- a regex, not the <END> tag. So an instance of FOO anywhere in the here
- document will terminate highlighting; I couldn't make it smarter. -->
- <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1">
- <BEGIN><<-?'([\p{Graph}]+)'</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- Here documents <<FOO <<-FOO -->
- <!-- Unfortunately, in a SPAN_REGEXP element only the <BEGIN> tag takes
- a regex, not the <END> tag. So an instance of FOO anywhere in the here
- document will terminate highlighting; I couldn't make it smarter. -->
- <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
- <BEGIN><<-?([A-Za-z_]+)</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- Shell command strings -->
-
- <!-- `echo foo` -->
- <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <!-- %x(echo foo) -->
- <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
- <BEGIN>%x(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- %x{echo foo} -->
- <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
- <BEGIN>%x{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- %x[echo foo] -->
- <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
- <BEGIN>%x[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- %x<echo foo> -->
- <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
- <BEGIN>%x<</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- %x$echo foo$ -->
- <SPAN_REGEXP HASH_CHAR="%x" TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
- <BEGIN>%x([^\p{Alnum}\p{Space}])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- Regular expressions -->
-
- <!-- /regexp?/ -->
- <!-- If a regexp begins with a whitespace (including a newline),
- the beginning "/" is wrongly treated as a division operator.
- But such regexp is rare enough and one can use %r notations
- or write like "/\ ..." to force jEdit to treat it as a
- regexp. -->
- <SEQ_REGEXP HASH_CHAR="/" TYPE="OPERATOR">/=?($|\s)</SEQ_REGEXP>
- <!-- AT_WORD_START is TRUE not to handle "a/b/c". -->
- <SPAN AT_WORD_START="TRUE" TYPE="LITERAL3" DELEGATE="RegexpLiteral">
- <BEGIN>/</BEGIN>
- <END>/</END>
- </SPAN>
-
- <!-- %r(regexp?) -->
- <SPAN TYPE="LITERAL3" DELEGATE="RegexpLiteral">
- <BEGIN>%r(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <!-- %r{regexp?} -->
- <SPAN TYPE="LITERAL3" DELEGATE="RegexpLiteral">
- <BEGIN>%r{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- %r[regexp?] -->
- <SPAN TYPE="LITERAL3" DELEGATE="RegexpLiteral">
- <BEGIN>%r[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- %r<regexp?> -->
- <SPAN TYPE="LITERAL3" DELEGATE="RegexpLiteral">
- <BEGIN>%r<</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- %r$regexp?$ -->
- <SPAN_REGEXP HASH_CHAR="%r" TYPE="LITERAL3" DELEGATE="RegexpLiteral">
- <BEGIN>%r([^\p{Alnum}\p{Space}])</BEGIN>
- <END>$1</END>
- </SPAN_REGEXP>
-
- <!-- Std Comment -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- Predefined global variables -->
- <SEQ_REGEXP HASH_CHAR="$-" TYPE="KEYWORD3" AT_WORD_START="TRUE">\$-[0adFiIKlpvw](?![\p{Alnum}_])
- </SEQ_REGEXP>
-
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3" AT_WORD_START="TRUE">\$[0-9!@&\+`'=~/\\,\.;<>_\*"\$\?\:F](?![\p{Alnum}_])</SEQ_REGEXP>
-
- <!-- Because of the ? char, this can't be done as a KEYWORD element -->
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">defined?</SEQ>
-
- <!-- Highlight "include" but not "include?" -->
- <SEQ_REGEXP HASH_CHAR="include" TYPE="KEYWORD2" AT_WORD_START="TRUE">include(?![\p{Alnum}_\?])
- </SEQ_REGEXP>
-
- <!-- Not Operators but like the syntax highlight to match operators -->
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <!-- Arithmetic operators -->
- <SEQ TYPE="OPERATOR">::</SEQ>
- <SEQ TYPE="OPERATOR">===</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">>></SEQ>
- <SEQ TYPE="OPERATOR"><<</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <SEQ TYPE="OPERATOR">**</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <SEQ TYPE="OPERATOR">%</SEQ>
-
- <!-- Logical Operators -->
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
-
- <!-- Range operators -->
- <SEQ TYPE="OPERATOR">...</SEQ>
- <SEQ TYPE="OPERATOR">..</SEQ>
-
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
-
- <!-- Symbols -->
- <SEQ_REGEXP AT_WORD_START="TRUE" HASH_CHAR=":" TYPE="LABEL">:[\p{Alpha}_][\p{Alnum}_]*[?]?</SEQ_REGEXP>
-
- <SEQ TYPE="OPERATOR">:</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>BEGIN</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>alias</KEYWORD1>
- <KEYWORD1>begin</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>def</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>elsif</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>ensure</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>module</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>redo</KEYWORD1>
- <KEYWORD1>rescue</KEYWORD1>
- <KEYWORD1>retry</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>undef</KEYWORD1>
- <KEYWORD1>unless</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>when</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>yield</KEYWORD1>
-
- <KEYWORD2>load</KEYWORD2>
- <KEYWORD2>require</KEYWORD2>
- <KEYWORD2>initialize</KEYWORD2>
-
- <OPERATOR>and</OPERATOR>
- <OPERATOR>not</OPERATOR>
- <OPERATOR>or</OPERATOR>
-
- <KEYWORD3>false</KEYWORD3>
- <KEYWORD3>nil</KEYWORD3>
- <KEYWORD3>self</KEYWORD3>
- <KEYWORD3>super</KEYWORD3>
- <KEYWORD3>true</KEYWORD3>
-
- <KEYWORD3>$defout</KEYWORD3>
- <KEYWORD3>$deferr</KEYWORD3>
- <KEYWORD3>$stderr</KEYWORD3>
- <KEYWORD3>$stdin</KEYWORD3>
- <KEYWORD3>$stdout</KEYWORD3>
- <KEYWORD3>$DEBUG</KEYWORD3>
- <KEYWORD3>$FILENAME</KEYWORD3>
- <KEYWORD3>$LOAD_PATH</KEYWORD3>
- <KEYWORD3>$SAFE</KEYWORD3>
- <KEYWORD3>$VERBOSE</KEYWORD3>
- <KEYWORD3>__FILE__</KEYWORD3>
- <KEYWORD3>__LINE__</KEYWORD3>
- <KEYWORD3>ARGF</KEYWORD3>
- <KEYWORD3>ARGV</KEYWORD3>
- <KEYWORD3>ENV</KEYWORD3>
- <KEYWORD3>DATA</KEYWORD3>
- <KEYWORD3>FALSE</KEYWORD3>
- <KEYWORD3>NIL</KEYWORD3>
- <KEYWORD3>RUBY_PLATFORM</KEYWORD3>
- <KEYWORD3>RUBY_RELEASE_DATE</KEYWORD3>
- <KEYWORD3>RUBY_VERSION</KEYWORD3>
- <KEYWORD3>STDERR</KEYWORD3>
- <KEYWORD3>STDIN</KEYWORD3>
- <KEYWORD3>STDOUT</KEYWORD3>
- <KEYWORD3>SCRIPT_LINES__</KEYWORD3>
- <KEYWORD3>TOPLEVEL_BINDING</KEYWORD3>
- <KEYWORD3>TRUE</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <!-- Delegate contents of #{} expression in double quotes to MAIN so that
- it will be syntax highlighted as well -->
- <RULES DEFAULT="LITERAL1" SET="doubleQuoteLiteral" ESCAPE="\">
- <SPAN DELEGATE="MAIN" TYPE="OPERATOR">
- <BEGIN>#{</BEGIN>
- <END>}</END>
- </SPAN>
- <MARK_FOLLOWING TYPE="KEYWORD4">#@@</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD4">#@</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="NULL">#$</MARK_FOLLOWING>
- </RULES>
-
- <!-- Delegate contents of #{} expression in backquotes to MAIN so that
- it will be syntax highlighted as well -->
- <RULES DEFAULT="LITERAL2" SET="BackquoteLiteral" ESCAPE="\">
- <SPAN DELEGATE="MAIN" TYPE="OPERATOR">
- <BEGIN>#{</BEGIN>
- <END>}</END>
- </SPAN>
- <MARK_FOLLOWING TYPE="KEYWORD4">#@@</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD4">#@</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="NULL">#$</MARK_FOLLOWING>
- </RULES>
-
- <!-- Delegate contents of #{} expression in a regexp to MAIN so that
- it will be syntax highlighted as well -->
- <RULES DEFAULT="LITERAL3" SET="RegexpLiteral" ESCAPE="\">
- <SPAN DELEGATE="MAIN" TYPE="OPERATOR">
- <BEGIN>#{</BEGIN>
- <END>}</END>
- </SPAN>
- <MARK_FOLLOWING TYPE="KEYWORD4">#@@</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD4">#@</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="NULL">#$</MARK_FOLLOWING>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!-- Ruby mode by Ian Maclean (Ruby edit mode v0.7.4) -->
+<!-- tweakage by Chris Morris - clabs.org -->
+<!-- further tweakage by Christophe Grandsire -->
+<!-- further tweakage by Robert McKinnon 2004 -->
+<!-- Major overhaul by Karl von Laudermann -->
+<!-- More tweakage by Jim Morris (wolfmanjm), adds electric unindent for else, elsif, rescue, end -->
+<!-- More tweakage by Jim Morris (wolfmanjm), fixed when statements for most cases -->
+<!-- recommended mode catalog entry:
+ <MODE NAME="ruby" FILE="ruby.xml" FILE_NAME_GLOB="*.{rb,rbw}" FIRST_LINE_GLOB="#!*/*ruby*" /> -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{"/>
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}"/>
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="("/>
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")"/>
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true"/>
+ <PROPERTY NAME="commentStart" VALUE="=begin"/>
+ <PROPERTY NAME="commentEnd" VALUE="=end"/>
+ <PROPERTY NAME="lineComment" VALUE="#"/>
+ <PROPERTY NAME="indentNextLines"
+ VALUE="[^#]*\s+do(\s*|(\s+\|.+\|\s*))|\s*(if\s+.*|elsif.*|else.*|do(\s*|\s+.*)|case\s+.*|when\s+.*|while\s+.*|for\s+.*|until\s+.*|loop\s+.*|def\s+.*|class\s+.*|module\s+.*|begin.*|unless\s+.*|rescue.*|ensure.*)+"/>
+ <PROPERTY NAME="unindentThisLine" VALUE="^\s*(else.*|end\s*|elsif.*|rescue.*|when.*|ensure.*)$"/>
+ <PROPERTY NAME="unindentNextLines" VALUE="^\s*(end\s*|else.*|rescue.*|elsif.*|when.*|ensure.*)$"/>
+ <PROPERTY NAME="indentNextLine"
+ VALUE="^[^#]*([^$](:|\+|~|\*|-|%|<|>|&|\^|\.|=)|\s(/|\!|\?|\|)|\b(not|and|or)|\\)\s*$"/>
+ <PROPERTY NAME="electricKeys" VALUE="edfn"/>
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0b[01]([01_]*[01])?)|(0x[\p{XDigit}]([\p{XDigit}_]*[\p{XDigit}])?)|(0([0-7_]*[0-7])?)|(0d[0-9]([0-9_]*[0-9])?)|([1-9]([0-9_]*[0-9])?)|([0-9]([0-9_]*[0-9])?[Ee]([0-9]([0-9_]*[0-9])?)?)">
+ <!-- ^ Binary literal | ^ Hex literal | ^ Octal literal | ^ "0d" Style Dec lit | ^ Normal Dec literal | ^ Float literal w/out dec point, with exp. -->
+
+ <!-- Ruby comment (Inline Documentation ) -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>=begin</BEGIN>
+ <END>=end</END>
+ </SPAN>
+
+ <!-- Class and instance vars -->
+ <MARK_FOLLOWING TYPE="KEYWORD4">@</MARK_FOLLOWING>
+
+ <!-- Method, class and modules names -->
+ <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1">\bdef\b</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1">\bundef\b</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1">\bclass\b</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1">\bmodule\b</MARK_FOLLOWING>
+
+ <!-- String literals -->
+ <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- %Q(Hello world) %(Hello world)-->
+ <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%Q?\(</BEGIN>
+ <END>)</END>
+ </SPAN_REGEXP>
+
+ <!-- %q(Hello world) -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%q(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- %Q{Hello world} %{Hello world} -->
+ <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%Q?\{</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+
+ <!-- %q{Hello world} -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%q{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- %Q[Hello world] %[Hello world] -->
+ <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%Q?\[</BEGIN>
+ <END>]</END>
+ </SPAN_REGEXP>
+
+ <!-- %q[Hello world] -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%q[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- %Q<Hello world> %<Hello world> -->
+ <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%Q?<</BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+
+ <!-- %q<Hello world> -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%q<</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- I made the next three forms as three instead of two, because the
+ first two actually support whitespace as a delimiter, and the third
+ one doesn't. -->
+ <!-- %Q$Hello world$ -->
+ <SPAN_REGEXP HASH_CHAR="%Q" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%Q([^\p{Alnum}])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- %q$Hello world$ -->
+ <SPAN_REGEXP HASH_CHAR="%q" TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%q([^\p{Alnum}])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- %$Hello world$ -->
+ <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%([^\p{Alnum}\p{Space}])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- %W(Array of strings) -->
+ <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%W(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- %w(Array of strings) -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%w(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- %W{Array of strings} -->
+ <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%W{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- %w{Array of strings} -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%w{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- %W[Array of strings] -->
+ <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%W[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- %w[Array of strings] -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%w[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- %W<Array of strings> -->
+ <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%W<</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- %w<Array of strings> -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%w<</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- %W$Array of strings$ -->
+ <SPAN_REGEXP HASH_CHAR="%W" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN>%W([^\p{Alnum}\p{Space}])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- %w at Array of strings@ -->
+ <SPAN_REGEXP HASH_CHAR="%w" TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>%w([^\p{Alnum}\p{Space}])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- Here documents <<"FOO" <<-"FOO" -->
+ <!-- Unfortunately, in a SPAN_REGEXP element only the <BEGIN> tag takes
+ a regex, not the <END> tag. So an instance of FOO anywhere in the here
+ document will terminate highlighting; I couldn't make it smarter. -->
+ <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN><<-?"([\p{Graph}]+)"</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- Here documents <<'FOO' <<-'FOO' -->
+ <!-- Unfortunately, in a SPAN_REGEXP element only the <BEGIN> tag takes
+ a regex, not the <END> tag. So an instance of FOO anywhere in the here
+ document will terminate highlighting; I couldn't make it smarter. -->
+ <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1">
+ <BEGIN><<-?'([\p{Graph}]+)'</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- Here documents <<FOO <<-FOO -->
+ <!-- Unfortunately, in a SPAN_REGEXP element only the <BEGIN> tag takes
+ a regex, not the <END> tag. So an instance of FOO anywhere in the here
+ document will terminate highlighting; I couldn't make it smarter. -->
+ <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
+ <BEGIN><<-?([A-Za-z_]+)</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- Shell command strings -->
+
+ <!-- `echo foo` -->
+ <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <!-- %x(echo foo) -->
+ <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
+ <BEGIN>%x(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- %x{echo foo} -->
+ <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
+ <BEGIN>%x{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- %x[echo foo] -->
+ <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
+ <BEGIN>%x[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- %x<echo foo> -->
+ <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
+ <BEGIN>%x<</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- %x$echo foo$ -->
+ <SPAN_REGEXP HASH_CHAR="%x" TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
+ <BEGIN>%x([^\p{Alnum}\p{Space}])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- Regular expressions -->
+
+ <!-- /regexp?/ -->
+ <!-- If a regexp begins with a whitespace (including a newline),
+ the beginning "/" is wrongly treated as a division operator.
+ But such regexp is rare enough and one can use %r notations
+ or write like "/\ ..." to force jEdit to treat it as a
+ regexp. -->
+ <SEQ_REGEXP HASH_CHAR="/" TYPE="OPERATOR">/=?($|\s)</SEQ_REGEXP>
+ <!-- AT_WORD_START is TRUE not to handle "a/b/c". -->
+ <SPAN AT_WORD_START="TRUE" TYPE="LITERAL3" DELEGATE="RegexpLiteral">
+ <BEGIN>/</BEGIN>
+ <END>/</END>
+ </SPAN>
+
+ <!-- %r(regexp?) -->
+ <SPAN TYPE="LITERAL3" DELEGATE="RegexpLiteral">
+ <BEGIN>%r(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <!-- %r{regexp?} -->
+ <SPAN TYPE="LITERAL3" DELEGATE="RegexpLiteral">
+ <BEGIN>%r{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- %r[regexp?] -->
+ <SPAN TYPE="LITERAL3" DELEGATE="RegexpLiteral">
+ <BEGIN>%r[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- %r<regexp?> -->
+ <SPAN TYPE="LITERAL3" DELEGATE="RegexpLiteral">
+ <BEGIN>%r<</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- %r$regexp?$ -->
+ <SPAN_REGEXP HASH_CHAR="%r" TYPE="LITERAL3" DELEGATE="RegexpLiteral">
+ <BEGIN>%r([^\p{Alnum}\p{Space}])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <!-- Std Comment -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- Predefined global variables -->
+ <SEQ_REGEXP HASH_CHAR="$-" TYPE="KEYWORD3" AT_WORD_START="TRUE">\$-[0adFiIKlpvw](?![\p{Alnum}_])
+ </SEQ_REGEXP>
+
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3" AT_WORD_START="TRUE">\$[0-9!@&\+`'=~/\\,\.;<>_\*"\$\?\:F](?![\p{Alnum}_])</SEQ_REGEXP>
+
+ <!-- Because of the ? char, this can't be done as a KEYWORD element -->
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">defined?</SEQ>
+
+ <!-- Highlight "include" but not "include?" -->
+ <SEQ_REGEXP HASH_CHAR="include" TYPE="KEYWORD2" AT_WORD_START="TRUE">include(?![\p{Alnum}_\?])
+ </SEQ_REGEXP>
+
+ <!-- Not Operators but like the syntax highlight to match operators -->
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <!-- Arithmetic operators -->
+ <SEQ TYPE="OPERATOR">::</SEQ>
+ <SEQ TYPE="OPERATOR">===</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">>></SEQ>
+ <SEQ TYPE="OPERATOR"><<</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <SEQ TYPE="OPERATOR">**</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <!-- Logical Operators -->
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+
+ <!-- Range operators -->
+ <SEQ TYPE="OPERATOR">...</SEQ>
+ <SEQ TYPE="OPERATOR">..</SEQ>
+
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+
+ <!-- Symbols -->
+ <SEQ_REGEXP AT_WORD_START="TRUE" HASH_CHAR=":" TYPE="LABEL">:[\p{Alpha}_][\p{Alnum}_]*[?]?</SEQ_REGEXP>
+
+ <SEQ TYPE="OPERATOR">:</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>BEGIN</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>alias</KEYWORD1>
+ <KEYWORD1>begin</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>def</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>elsif</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>ensure</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>module</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>redo</KEYWORD1>
+ <KEYWORD1>rescue</KEYWORD1>
+ <KEYWORD1>retry</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>undef</KEYWORD1>
+ <KEYWORD1>unless</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>when</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>yield</KEYWORD1>
+
+ <KEYWORD2>load</KEYWORD2>
+ <KEYWORD2>require</KEYWORD2>
+ <KEYWORD2>initialize</KEYWORD2>
+
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+ <OPERATOR>or</OPERATOR>
+
+ <KEYWORD3>false</KEYWORD3>
+ <KEYWORD3>nil</KEYWORD3>
+ <KEYWORD3>self</KEYWORD3>
+ <KEYWORD3>super</KEYWORD3>
+ <KEYWORD3>true</KEYWORD3>
+
+ <KEYWORD3>$defout</KEYWORD3>
+ <KEYWORD3>$deferr</KEYWORD3>
+ <KEYWORD3>$stderr</KEYWORD3>
+ <KEYWORD3>$stdin</KEYWORD3>
+ <KEYWORD3>$stdout</KEYWORD3>
+ <KEYWORD3>$DEBUG</KEYWORD3>
+ <KEYWORD3>$FILENAME</KEYWORD3>
+ <KEYWORD3>$LOAD_PATH</KEYWORD3>
+ <KEYWORD3>$SAFE</KEYWORD3>
+ <KEYWORD3>$VERBOSE</KEYWORD3>
+ <KEYWORD3>__FILE__</KEYWORD3>
+ <KEYWORD3>__LINE__</KEYWORD3>
+ <KEYWORD3>ARGF</KEYWORD3>
+ <KEYWORD3>ARGV</KEYWORD3>
+ <KEYWORD3>ENV</KEYWORD3>
+ <KEYWORD3>DATA</KEYWORD3>
+ <KEYWORD3>FALSE</KEYWORD3>
+ <KEYWORD3>NIL</KEYWORD3>
+ <KEYWORD3>RUBY_PLATFORM</KEYWORD3>
+ <KEYWORD3>RUBY_RELEASE_DATE</KEYWORD3>
+ <KEYWORD3>RUBY_VERSION</KEYWORD3>
+ <KEYWORD3>STDERR</KEYWORD3>
+ <KEYWORD3>STDIN</KEYWORD3>
+ <KEYWORD3>STDOUT</KEYWORD3>
+ <KEYWORD3>SCRIPT_LINES__</KEYWORD3>
+ <KEYWORD3>TOPLEVEL_BINDING</KEYWORD3>
+ <KEYWORD3>TRUE</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- Delegate contents of #{} expression in double quotes to MAIN so that
+ it will be syntax highlighted as well -->
+ <RULES DEFAULT="LITERAL1" SET="doubleQuoteLiteral" ESCAPE="\">
+ <SPAN DELEGATE="MAIN" TYPE="OPERATOR">
+ <BEGIN>#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <MARK_FOLLOWING TYPE="KEYWORD4">#@@</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD4">#@</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="NULL">#$</MARK_FOLLOWING>
+ </RULES>
+
+ <!-- Delegate contents of #{} expression in backquotes to MAIN so that
+ it will be syntax highlighted as well -->
+ <RULES DEFAULT="LITERAL2" SET="BackquoteLiteral" ESCAPE="\">
+ <SPAN DELEGATE="MAIN" TYPE="OPERATOR">
+ <BEGIN>#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <MARK_FOLLOWING TYPE="KEYWORD4">#@@</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD4">#@</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="NULL">#$</MARK_FOLLOWING>
+ </RULES>
+
+ <!-- Delegate contents of #{} expression in a regexp to MAIN so that
+ it will be syntax highlighted as well -->
+ <RULES DEFAULT="LITERAL3" SET="RegexpLiteral" ESCAPE="\">
+ <SPAN DELEGATE="MAIN" TYPE="OPERATOR">
+ <BEGIN>#{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <MARK_FOLLOWING TYPE="KEYWORD4">#@@</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD4">#@</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="NULL">#$</MARK_FOLLOWING>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/rview.xml b/jEdit/modes/rview.xml
index 39dfe77..0bd55c5 100644
--- a/jEdit/modes/rview.xml
+++ b/jEdit/modes/rview.xml
@@ -1,217 +1,217 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- Relational View (rview) mode by Will Sargent <wsargent at atg.com>
--->
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- </PROPS>
-
- <!--
- Unicode escapes are allowed in identifiers.
- Ignoring case is bad.
- Digits may be returned from functions.
- -->
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <SEQ TYPE="COMMENT1">/**/</SEQ>
-
- <!-- Javadoc comment -->
- <SPAN TYPE="COMMENT2" DELEGATE="JAVADOC">
- <BEGIN>/**</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- Java comment (C style) -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="RVIEWSTMT">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <KEYWORDS>
-
- <!--
- Keywords (WAY more than I thought there were, please
- e-mail me if I've left one out).
- -->
- <KEYWORD1>unique</KEYWORD1>
- <KEYWORD1>relationalview</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
-
- <KEYWORD1>rowmap</KEYWORD1>
- <KEYWORD1>table</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>subview</KEYWORD1>
- <KEYWORD1>query</KEYWORD1>
-
- <KEYWORD1>join</KEYWORD1>
- <KEYWORD1>jointype</KEYWORD1>
- <KEYWORD1>leftouter</KEYWORD1>
- <KEYWORD1>rightouter</KEYWORD1>
-
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
-
- <KEYWORD1>sql</KEYWORD1>
- <KEYWORD1>constraints</KEYWORD1>
- <KEYWORD1>where</KEYWORD1>
- <KEYWORD1>orderby</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>distinct</KEYWORD1>
-
- <!--
- Allow parameters...
- -->
- <KEYWORD1>allow</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <!-- also used in update function -->
- <KEYWORD1>update</KEYWORD1>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>insert</KEYWORD1>
-
- <!-- We're allowed to return primitive types -->
- <KEYWORD3>boolean</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>char</KEYWORD3>
- <KEYWORD3>double</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>long</KEYWORD3>
- <KEYWORD3>short</KEYWORD3>
-
- <KEYWORD1>useCallableStatement</KEYWORD1>
-
- <!--
- JDBC mapping statements (must be UPPERCASE)
- -->
- <KEYWORD3>CHAR</KEYWORD3>
- <KEYWORD3>VARCHAR</KEYWORD3>
- <KEYWORD3>LONGVARCHAR</KEYWORD3>
- <KEYWORD3>NUMERIC</KEYWORD3>
- <KEYWORD3>DECIMAL</KEYWORD3>
- <KEYWORD3>BIT</KEYWORD3>
- <KEYWORD3>TINYINT</KEYWORD3>
- <KEYWORD3>SMALLINT</KEYWORD3>
- <KEYWORD3>INTEGER</KEYWORD3>
- <KEYWORD3>BIGINT</KEYWORD3>
- <KEYWORD3>REAL</KEYWORD3>
- <KEYWORD3>FLOAT</KEYWORD3>
- <KEYWORD3>DOUBLE</KEYWORD3>
- <KEYWORD3>BINARY</KEYWORD3>
- <KEYWORD3>VARBINARY</KEYWORD3>
- <KEYWORD3>LONGVARBINARY</KEYWORD3>
- <KEYWORD3>DATE</KEYWORD3>
- <KEYWORD3>TIME</KEYWORD3>
- <KEYWORD3>TIMESTAMP</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <!--
- Everything that happens in between quotes happens here.
- -->
- <RULES SET="RVIEWSTMT" ESCAPE="\" DEFAULT="LITERAL1"
- HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
- <!-- Allow quoting for characters. -->
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!--
- Standard arithmetic
- -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <!--
- Standard logic
- -->
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
-
- <!--
- For callable statements, { } must be used.
- -->
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
-
- <!--
- Escape colons for full tables
- -->
- <SEQ TYPE="NULL">::</SEQ>
-
- <!-- Mark most colons as a label indicator -->
- <MARK_FOLLOWING TYPE="LABEL">:</MARK_FOLLOWING>
-
- <!-- Function calls (these can happen even inside quotes) -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>SELECT</KEYWORD1>
- <KEYWORD1>FROM</KEYWORD1>
- <KEYWORD1>WHERE</KEYWORD1>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>BETWEEN</KEYWORD1>
- <KEYWORD1>UPDATE</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
-
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>desc</KEYWORD1>
-
- <!--
- It's possible to do casting to a particular SQL
- type, so include the JDBC types here
- -->
- <KEYWORD3>CHAR</KEYWORD3>
- <KEYWORD3>VARCHAR</KEYWORD3>
- <KEYWORD3>LONGVARCHAR</KEYWORD3>
- <KEYWORD3>NUMERIC</KEYWORD3>
- <KEYWORD3>DECIMAL</KEYWORD3>
- <KEYWORD3>BIT</KEYWORD3>
- <KEYWORD3>TINYINT</KEYWORD3>
- <KEYWORD3>SMALLINT</KEYWORD3>
- <KEYWORD3>INTEGER</KEYWORD3>
- <KEYWORD3>BIGINT</KEYWORD3>
- <KEYWORD3>REAL</KEYWORD3>
- <KEYWORD3>FLOAT</KEYWORD3>
- <KEYWORD3>DOUBLE</KEYWORD3>
- <KEYWORD3>BINARY</KEYWORD3>
- <KEYWORD3>VARBINARY</KEYWORD3>
- <KEYWORD3>LONGVARBINARY</KEYWORD3>
- <KEYWORD3>DATE</KEYWORD3>
- <KEYWORD3>TIME</KEYWORD3>
- <KEYWORD3>TIMESTAMP</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ Relational View (rview) mode by Will Sargent <wsargent at atg.com>
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ </PROPS>
+
+ <!--
+ Unicode escapes are allowed in identifiers.
+ Ignoring case is bad.
+ Digits may be returned from functions.
+ -->
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+
+ <!-- Javadoc comment -->
+ <SPAN TYPE="COMMENT2" DELEGATE="JAVADOC">
+ <BEGIN>/**</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Java comment (C style) -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="RVIEWSTMT">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <KEYWORDS>
+
+ <!--
+ Keywords (WAY more than I thought there were, please
+ e-mail me if I've left one out).
+ -->
+ <KEYWORD1>unique</KEYWORD1>
+ <KEYWORD1>relationalview</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+
+ <KEYWORD1>rowmap</KEYWORD1>
+ <KEYWORD1>table</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>subview</KEYWORD1>
+ <KEYWORD1>query</KEYWORD1>
+
+ <KEYWORD1>join</KEYWORD1>
+ <KEYWORD1>jointype</KEYWORD1>
+ <KEYWORD1>leftouter</KEYWORD1>
+ <KEYWORD1>rightouter</KEYWORD1>
+
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+
+ <KEYWORD1>sql</KEYWORD1>
+ <KEYWORD1>constraints</KEYWORD1>
+ <KEYWORD1>where</KEYWORD1>
+ <KEYWORD1>orderby</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>distinct</KEYWORD1>
+
+ <!--
+ Allow parameters...
+ -->
+ <KEYWORD1>allow</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <!-- also used in update function -->
+ <KEYWORD1>update</KEYWORD1>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>insert</KEYWORD1>
+
+ <!-- We're allowed to return primitive types -->
+ <KEYWORD3>boolean</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>char</KEYWORD3>
+ <KEYWORD3>double</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>long</KEYWORD3>
+ <KEYWORD3>short</KEYWORD3>
+
+ <KEYWORD1>useCallableStatement</KEYWORD1>
+
+ <!--
+ JDBC mapping statements (must be UPPERCASE)
+ -->
+ <KEYWORD3>CHAR</KEYWORD3>
+ <KEYWORD3>VARCHAR</KEYWORD3>
+ <KEYWORD3>LONGVARCHAR</KEYWORD3>
+ <KEYWORD3>NUMERIC</KEYWORD3>
+ <KEYWORD3>DECIMAL</KEYWORD3>
+ <KEYWORD3>BIT</KEYWORD3>
+ <KEYWORD3>TINYINT</KEYWORD3>
+ <KEYWORD3>SMALLINT</KEYWORD3>
+ <KEYWORD3>INTEGER</KEYWORD3>
+ <KEYWORD3>BIGINT</KEYWORD3>
+ <KEYWORD3>REAL</KEYWORD3>
+ <KEYWORD3>FLOAT</KEYWORD3>
+ <KEYWORD3>DOUBLE</KEYWORD3>
+ <KEYWORD3>BINARY</KEYWORD3>
+ <KEYWORD3>VARBINARY</KEYWORD3>
+ <KEYWORD3>LONGVARBINARY</KEYWORD3>
+ <KEYWORD3>DATE</KEYWORD3>
+ <KEYWORD3>TIME</KEYWORD3>
+ <KEYWORD3>TIMESTAMP</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <!--
+ Everything that happens in between quotes happens here.
+ -->
+ <RULES SET="RVIEWSTMT" ESCAPE="\" DEFAULT="LITERAL1"
+ HIGHLIGHT_DIGITS="TRUE" IGNORE_CASE="TRUE">
+ <!-- Allow quoting for characters. -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!--
+ Standard arithmetic
+ -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <!--
+ Standard logic
+ -->
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+
+ <!--
+ For callable statements, { } must be used.
+ -->
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+
+ <!--
+ Escape colons for full tables
+ -->
+ <SEQ TYPE="NULL">::</SEQ>
+
+ <!-- Mark most colons as a label indicator -->
+ <MARK_FOLLOWING TYPE="LABEL">:</MARK_FOLLOWING>
+
+ <!-- Function calls (these can happen even inside quotes) -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>SELECT</KEYWORD1>
+ <KEYWORD1>FROM</KEYWORD1>
+ <KEYWORD1>WHERE</KEYWORD1>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>BETWEEN</KEYWORD1>
+ <KEYWORD1>UPDATE</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>desc</KEYWORD1>
+
+ <!--
+ It's possible to do casting to a particular SQL
+ type, so include the JDBC types here
+ -->
+ <KEYWORD3>CHAR</KEYWORD3>
+ <KEYWORD3>VARCHAR</KEYWORD3>
+ <KEYWORD3>LONGVARCHAR</KEYWORD3>
+ <KEYWORD3>NUMERIC</KEYWORD3>
+ <KEYWORD3>DECIMAL</KEYWORD3>
+ <KEYWORD3>BIT</KEYWORD3>
+ <KEYWORD3>TINYINT</KEYWORD3>
+ <KEYWORD3>SMALLINT</KEYWORD3>
+ <KEYWORD3>INTEGER</KEYWORD3>
+ <KEYWORD3>BIGINT</KEYWORD3>
+ <KEYWORD3>REAL</KEYWORD3>
+ <KEYWORD3>FLOAT</KEYWORD3>
+ <KEYWORD3>DOUBLE</KEYWORD3>
+ <KEYWORD3>BINARY</KEYWORD3>
+ <KEYWORD3>VARBINARY</KEYWORD3>
+ <KEYWORD3>LONGVARBINARY</KEYWORD3>
+ <KEYWORD3>DATE</KEYWORD3>
+ <KEYWORD3>TIME</KEYWORD3>
+ <KEYWORD3>TIMESTAMP</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+
+</MODE>
diff --git a/jEdit/modes/sas.xml b/jEdit/modes/sas.xml
index c481834..b0b8033 100644
--- a/jEdit/modes/sas.xml
+++ b/jEdit/modes/sas.xml
@@ -1,441 +1,458 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- SAS edit mode by Bill McMilleon (bill at mcmilleon.com)
- March 19, 2003
- updated by Ian Helgesen 2007-10-02
- updated by goebbe 2009-05-19
-
- Suggested catalog file entry:
-
- <MODE NAME="SAS" FILE="sas.xml" FILE_NAME_GLOB="*.{sas}" />
-
--->
-
-
-<MODE>
-<PROPS>
- <PROPERTY NAME="indentNextLines" VALUE="(.*%?do.*;|\s*proc
-.*;|\s*data .*;|\s*%macro\s?.*;|define event \S+\s*;)"/>
-
- <PROPERTY NAME="unindentThisLine" VALUE="^\s*(else.*|end\s*|elsif.*|rescue.*|when.*)$"/>
- <PROPERTY NAME="unindentNextLines" VALUE="^\s*(end\s*|else.*|rescue.*|elsif.*|when.*)$"/>
-
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="%*" />
-</PROPS>
-
- <RULES IGNORE_CASE="TRUE" NO_WORD_SEP="_" HIGHLIGHT_DIGITS="TRUE">
-
-<!-- In fixed form, column 72 is the last column parsed, unless the
-\extend_source option is invoked -->
- <!-- TERMINATE AT_CHAR="72" / -->
-
-<!-- C style comment -->
-<SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
-</SPAN>
-
-<!-- COMMENT2: range comment in the case when there is nothing OR nothing but space between the last ; and the * -->
-<!-- Currently the ending ; of a comment cannot be used in regexp inside Jedit -->
-<!-- therefore several COMMENT2 range comments in a row requires regexp for each case -->
-
-<!-- Currently only two COMMENT2 range-comments in row (per line) are implemented -->
-<!-- The rational behind the solution is the following: Define the "complete COMMENT2-block -->
-<!-- AND the start of the second COMMENT2 block" as the start of the second COMMENT2 range comment -->
-
-<!-- case1: two COMMENT2 range comments in a row at the start of a line: -->
-<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR="*" AT_WHITESPACE_END="TRUE" EXCLUDE_MATCH="FALSE">
- <BEGIN>[*][^;]*[;][\s]*[*]</BEGIN>
- <END>;</END>
-</SPAN_REGEXP>
-
-<!-- case2: one COMMENT2 at the start of a line: -->
-<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR="*" AT_WHITESPACE_END="TRUE" EXCLUDE_MATCH="FALSE">
- <BEGIN>[*]</BEGIN>
- <END>;</END>
-</SPAN_REGEXP>
-
-<!-- case3: two COMMENT2 range comments in a row after SAS-code: -->
-<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR=";" EXCLUDE_MATCH="FALSE">
- <BEGIN>[;][\s]*[*][^;]*[;][\s]*[*]</BEGIN>
- <END>;</END>
-</SPAN_REGEXP>
-
-<!-- case4: one COMMENT2 range comment after SAS-code: -->
-<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR=";" EXCLUDE_MATCH="FALSE">
- <BEGIN>[;][\s]*[*]</BEGIN>
- <END>;</END>
-</SPAN_REGEXP>
-
-
-<SPAN TYPE="COMMENT2">
- <BEGIN>%*</BEGIN>
- <END>;</END>
-</SPAN>
-
-
-<SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>'</BEGIN>
- <END>'</END>
-</SPAN>
-<SPAN TYPE="LITERAL2" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
-</SPAN>
-
-<!-- PROCS -->
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC ANOVA</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC APPEND</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC BOXPLOT</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC CONTENTS</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC DATASETS</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC DELETE</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC FORMAT</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC FREQ</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC IMPORT</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC MEANS</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC PRINT</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC REPORT</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC SORT</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC SQL</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC UNIVARIATE</SEQ>
-
-<SEQ TYPE="FUNCTION" AT_WHITESPACE_END="TRUE">DATA </SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">%INCLUDE</SEQ>
-
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">PROC</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">RUN;</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">QUIT;</SEQ>
-
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">%macro</SEQ>
-<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">%mend</SEQ>
-
-<!--<SEQ_REGEXP TYPE="FUNCTION" AT_WORD_START="TRUE">\s*%\S+\s?\(</SEQ_REGEXP>-->
-<!--<SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="%">\%\s*\(</SEQ_REGEXP>-->
-
-<SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="%" AT_WHITESPACE_END="TRUE">%\S+\(</SEQ_REGEXP>
-<SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="&" AT_LINE_START="TRUE">&\S+(\.|;|\s)</SEQ_REGEXP>
-
-<!--<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS CSV</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS CSV CLOSE</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS HTML</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS HTML CLOSE</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS LISTING</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS LISTING OFF</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS PDF</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS PDF CLOSE</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS RTF</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS RTF CLOSE</SEQ>
-<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS</SEQ>-->
-
- <!-- Highlighted Operators -->
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <!--<SEQ TYPE="OPERATOR">_</SEQ> -->
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
-
- <KEYWORDS>
- <KEYWORD2>$ASCII</KEYWORD2>
- <KEYWORD2>$BINARY</KEYWORD2>
- <KEYWORD2>$CB</KEYWORD2>
- <KEYWORD2>$CHAR</KEYWORD2>
- <KEYWORD2>$CHARZB</KEYWORD2>
- <KEYWORD2>$EBCDIC</KEYWORD2>
- <KEYWORD2>$HEX</KEYWORD2>
- <KEYWORD2>$OCTAL</KEYWORD2>
- <KEYWORD2>$VARYING</KEYWORD2>
-
- <KEYWORD3>%ABORT</KEYWORD3>
- <KEYWORD3>%BQUOTE</KEYWORD3>
- <KEYWORD3>%DO</KEYWORD3>
- <KEYWORD3>%ELSE</KEYWORD3>
- <KEYWORD3>%END</KEYWORD3>
- <KEYWORD3>%EVAL</KEYWORD3>
- <KEYWORD3>%Global</KEYWORD3>
- <KEYWORD3>%GOTO</KEYWORD3>
- <KEYWORD3>%IF</KEYWORD3>
- <KEYWORD3>%INC</KEYWORD3>
- <KEYWORD3>%INCLUDE</KEYWORD3>
- <KEYWORD3>%INDEX</KEYWORD3>
- <KEYWORD3>%INPUT</KEYWORD3>
- <KEYWORD3>%LENGTH</KEYWORD3>
- <KEYWORD3>%LET</KEYWORD3>
- <KEYWORD3>%LOCAL</KEYWORD3>
- <KEYWORD3>%LOWCASE</KEYWORD3>
- <KEYWORD3>%MACRO</KEYWORD3>
- <KEYWORD3>%MEND</KEYWORD3>
- <KEYWORD3>%NRBQUOTE</KEYWORD3>
- <KEYWORD3>%NRQUOTE</KEYWORD3>
- <KEYWORD3>%NRSTR</KEYWORD3>
- <KEYWORD3>%PUT</KEYWORD3>
- <KEYWORD3>%QSCAN</KEYWORD3>
- <KEYWORD3>%QSUBSTR</KEYWORD3>
- <KEYWORD3>%Quote</KEYWORD3>
- <KEYWORD3>%RUN</KEYWORD3>
- <KEYWORD3>%SCAN</KEYWORD3>
- <KEYWORD3>%STR</KEYWORD3>
- <KEYWORD3>%SUBSTR</KEYWORD3>
- <KEYWORD3>%SYMDEL</KEYWORD3>
- <KEYWORD3>%SYSEXEC</KEYWORD3>
- <KEYWORD3>%SYSFUNC</KEYWORD3>
- <KEYWORD3>%THEN</KEYWORD3>
- <KEYWORD3>%TO</KEYWORD3>
- <KEYWORD3>%UNTIL</KEYWORD3>
- <KEYWORD3>%WHILE</KEYWORD3>
- <KEYWORD3>%WINDOW</KEYWORD3>
- <KEYWORD3>%UPCASE</KEYWORD3>
-
- <KEYWORD2>_ALL_</KEYWORD2>
- <KEYWORD2>_CHARACTER_</KEYWORD2>
- <KEYWORD2>_CMD_</KEYWORD2>
- <KEYWORD2>_ERROR_</KEYWORD2>
- <KEYWORD2>_I_</KEYWORD2>
- <KEYWORD2>_INFILE_</KEYWORD2>
- <KEYWORD2>_LAST_</KEYWORD2>
- <KEYWORD2>_MSG_</KEYWORD2>
- <KEYWORD2>_N_</KEYWORD2>
- <KEYWORD2>_NULL_</KEYWORD2>
- <KEYWORD2>_NUMERIC_</KEYWORD2>
- <KEYWORD2>_TEMPORARY_</KEYWORD2>
- <KEYWORD2>_TYPE_</KEYWORD2>
- <KEYWORD2>=DATA</KEYWORD2>
- <KEYWORD2>ABORT</KEYWORD2>
- <KEYWORD2>ADD</KEYWORD2>
- <KEYWORD2>ADJRSQ</KEYWORD2>
- <KEYWORD2>AND</KEYWORD2>
- <KEYWORD2>ARRAY</KEYWORD2>
- <KEYWORD2>ATTRIB</KEYWORD2>
- <KEYWORD2>BACKWARD</KEYWORD2>
- <KEYWORD2>BINARY</KEYWORD2>
- <KEYWORD2>BLOCKSIZE</KEYWORD2>
- <KEYWORD2>BY</KEYWORD2>
- <KEYWORD2>BZ</KEYWORD2>
- <KEYWORD2>CALL</KEYWORD2>
- <KEYWORD2>CARDS</KEYWORD2>
- <KEYWORD2>CARDS4</KEYWORD2>
- <KEYWORD2>CHAR</KEYWORD2>
- <KEYWORD2>CLASS</KEYWORD2>
- <KEYWORD2>COL</KEYWORD2>
- <KEYWORD2>COLLIN</KEYWORD2>
- <KEYWORD2>COLUMN</KEYWORD2>
- <KEYWORD2>COMMA</KEYWORD2>
- <KEYWORD2>COMMAX</KEYWORD2>
- <KEYWORD2>CREATE</KEYWORD2>
- <KEYWORD2>DATA</KEYWORD2>
- <KEYWORD2>DATA=</KEYWORD2>
- <KEYWORD2>DATE</KEYWORD2>
- <KEYWORD2>DATAFILE</KEYWORD2>
- <KEYWORD2>DATETIME</KEYWORD2>
- <KEYWORD2>DDMMYY</KEYWORD2>
- <KEYWORD2>DECENDING</KEYWORD2>
- <KEYWORD2>DEFINE</KEYWORD2>
- <KEYWORD2>DELETE</KEYWORD2>
- <KEYWORD2>DELIMITER</KEYWORD2>
- <KEYWORD2>DISPLAY</KEYWORD2>
- <KEYWORD2>DLM</KEYWORD2>
- <KEYWORD2>DO</KEYWORD2>
- <KEYWORD2>DROP</KEYWORD2>
- <KEYWORD2>ELSE</KEYWORD2>
- <KEYWORD2>END</KEYWORD2>
- <KEYWORD2>ENDSAS</KEYWORD2>
- <KEYWORD2>EOF</KEYWORD2>
- <KEYWORD2>EOV</KEYWORD2>
- <KEYWORD2>EQ</KEYWORD2>
- <KEYWORD2>ERRORS</KEYWORD2>
- <KEYWORD2>FILE</KEYWORD2>
- <KEYWORD2>FILENAME</KEYWORD2>
- <KEYWORD2>FILEVAR</KEYWORD2>
- <KEYWORD2>FIRST.</KEYWORD2>
- <KEYWORD2>FIRSTOBS</KEYWORD2>
- <KEYWORD2>FOOTNOTE</KEYWORD2>
- <KEYWORD2>FOOTNOTE1</KEYWORD2>
- <KEYWORD2>FOOTNOTE2</KEYWORD2>
- <KEYWORD2>FOOTNOTE3</KEYWORD2>
- <KEYWORD2>FORM</KEYWORD2>
- <KEYWORD2>FORMAT</KEYWORD2>
- <KEYWORD2>FORMCHAR</KEYWORD2>
- <KEYWORD2>FORMDELIM</KEYWORD2>
- <KEYWORD2>FORMDLIM</KEYWORD2>
- <KEYWORD2>FORWARD</KEYWORD2>
- <KEYWORD2>FROM</KEYWORD2>
- <KEYWORD2>GO</KEYWORD2>
- <KEYWORD2>GROUP</KEYWORD2>
- <KEYWORD2>GT</KEYWORD2>
- <KEYWORD2>HBAR</KEYWORD2>
- <KEYWORD2>HEX</KEYWORD2>
- <KEYWORD2>HPCT</KEYWORD2>
- <KEYWORD2>HVAR</KEYWORD2>
- <KEYWORD2>IB</KEYWORD2>
- <KEYWORD2>ID</KEYWORD2>
- <KEYWORD2>IEEE</KEYWORD2>
- <KEYWORD2>IF</KEYWORD2>
- <KEYWORD2>IN</KEYWORD2>
- <KEYWORD2>INFILE</KEYWORD2>
- <KEYWORD2>INFORMAT</KEYWORD2>
- <KEYWORD2>INTO</KEYWORD2>
- <KEYWORD2>INPUT</KEYWORD2>
- <KEYWORD2>INR</KEYWORD2>
- <KEYWORD2>JOIN</KEYWORD2>
- <KEYWORD2>JULIAN</KEYWORD2>
- <KEYWORD2>KEEP</KEYWORD2>
- <KEYWORD2>LABEL</KEYWORD2>
- <KEYWORD2>LAG</KEYWORD2>
- <KEYWORD2>LAST.</KEYWORD2>
- <KEYWORD2>LEFT</KEYWORD2>
- <KEYWORD2>LENGTH</KEYWORD2>
- <KEYWORD2>LIB</KEYWORD2>
- <KEYWORD2>LIBNAME</KEYWORD2>
- <KEYWORD2>LINE</KEYWORD2>
- <KEYWORD2>LINESIZE</KEYWORD2>
- <KEYWORD2>LINK</KEYWORD2>
- <KEYWORD2>LIST</KEYWORD2>
- <KEYWORD2>LOSTCARD</KEYWORD2>
- <KEYWORD2>LRECL</KEYWORD2>
- <KEYWORD2>LS</KEYWORD2>
- <KEYWORD2>MACRO</KEYWORD2>
- <KEYWORD2>MACROGEN</KEYWORD2>
- <KEYWORD2>MAXDEC</KEYWORD2>
- <KEYWORD2>MAXR</KEYWORD2>
- <KEYWORD2>MEDIAN</KEYWORD2>
- <KEYWORD2>MEMTYPE</KEYWORD2>
- <KEYWORD2>MERGE</KEYWORD2>
- <KEYWORD2>MERROR</KEYWORD2>
- <KEYWORD2>MISSOVE</KEYWORD2>
- <KEYWORD2>MLOGIC</KEYWORD2>
- <KEYWORD2>MMDDYY</KEYWORD2>
- <KEYWORD2>MODE</KEYWORD2>
- <KEYWORD2>MODEL</KEYWORD2>
- <KEYWORD2>MONYY</KEYWORD2>
- <KEYWORD2>MPRINT</KEYWORD2>
- <KEYWORD2>MRECALL</KEYWORD2>
- <KEYWORD2 AT_WORD_START="TRUE">NE</KEYWORD2>
- <KEYWORD2>NEW</KEYWORD2>
- <KEYWORD2>NO</KEYWORD2>
- <KEYWORD2>NOBS</KEYWORD2>
- <KEYWORD2>NOCENTER</KEYWORD2>
- <KEYWORD2>NOCUM</KEYWORD2>
- <KEYWORD2>NODATE</KEYWORD2>
- <KEYWORD2>NODUP</KEYWORD2>
- <KEYWORD2>NODUPKEY</KEYWORD2>
- <KEYWORD2>NOINT</KEYWORD2>
- <KEYWORD2>NONUMBER</KEYWORD2>
- <KEYWORD2>NOPAD</KEYWORD2>
- <KEYWORD2>NOPRINT</KEYWORD2>
- <KEYWORD2>NOROW</KEYWORD2>
- <KEYWORD2>NOT</KEYWORD2>
- <KEYWORD2>NOTITLE</KEYWORD2>
- <KEYWORD2>NOTITLES</KEYWORD2>
- <KEYWORD2>NOXSYNC</KEYWORD2>
- <KEYWORD2>NOXWAIT</KEYWORD2>
- <KEYWORD2>NUMBER</KEYWORD2>
- <KEYWORD2>NWAY</KEYWORD2>
- <KEYWORD2>OBS</KEYWORD2>
- <KEYWORD2>OPTION</KEYWORD2>
- <KEYWORD2>OPTIONS</KEYWORD2>
- <KEYWORD2>OR</KEYWORD2>
- <KEYWORD2>ORDER</KEYWORD2>
- <KEYWORD2>OTHERWISE</KEYWORD2>
- <KEYWORD2>OUT</KEYWORD2>
- <KEYWORD2>OUTPUT</KEYWORD2>
- <KEYWORD2>OVER</KEYWORD2>
- <KEYWORD2>PAD</KEYWORD2>
- <KEYWORD2>PAD2</KEYWORD2>
- <KEYWORD2>PAGESIZE</KEYWORD2>
- <KEYWORD2>PD</KEYWORD2>
- <KEYWORD2>PERCENT</KEYWORD2>
- <KEYWORD2>PIB</KEYWORD2>
- <KEYWORD2>PK</KEYWORD2>
- <KEYWORD2>POINT</KEYWORD2>
- <KEYWORD2>POSITION</KEYWORD2>
- <KEYWORD2>PRINTER</KEYWORD2>
- <KEYWORD2>PRXMATCH</KEYWORD2>
- <KEYWORD2>PRXCHANGE</KEYWORD2>
- <KEYWORD2>PS</KEYWORD2>
- <KEYWORD2>PUT</KEYWORD2>
- <KEYWORD2>R</KEYWORD2>
- <KEYWORD2>RB</KEYWORD2>
- <KEYWORD2>RECFM</KEYWORD2>
- <KEYWORD2>REG</KEYWORD2>
- <KEYWORD2>REGR</KEYWORD2>
- <KEYWORD2>RENAME</KEYWORD2>
- <KEYWORD2>REPLACE</KEYWORD2>
- <KEYWORD2>RETAIN</KEYWORD2>
- <KEYWORD2>RETURN</KEYWORD2>
- <KEYWORD2>REUSE</KEYWORD2>
- <KEYWORD2>REVERSE</KEYWORD2>
- <KEYWORD2>RSQUARE</KEYWORD2>
- <KEYWORD2>RUN</KEYWORD2>
- <KEYWORD2>SASAUTOS</KEYWORD2>
- <KEYWORD2>SCAN</KEYWORD2>
- <KEYWORD2>SELECT</KEYWORD2>
- <KEYWORD2>SELECTION</KEYWORD2>
- <KEYWORD2>SERROR</KEYWORD2>
- <KEYWORD2> SET</KEYWORD2>
- <KEYWORD2>SIMPLE</KEYWORD2>
- <KEYWORD2>SLE</KEYWORD2>
- <KEYWORD2>SLS</KEYWORD2>
- <KEYWORD2>START</KEYWORD2>
- <KEYWORD2>STDIN</KEYWORD2>
- <KEYWORD2>STOP</KEYWORD2>
- <KEYWORD2>STOPOVER</KEYWORD2>
- <KEYWORD2>SUBSTR</KEYWORD2>
- <KEYWORD2>SYMBOL</KEYWORD2>
- <KEYWORD2>SYMBOLGEN</KEYWORD2>
- <KEYWORD2>SYMGET</KEYWORD2>
- <KEYWORD2>SYMPUT</KEYWORD2>
- <KEYWORD2>SYMPUTX</KEYWORD2>
- <KEYWORD2>T</KEYWORD2>
- <KEYWORD2>TABLE</KEYWORD2>
- <KEYWORD2>TABLES</KEYWORD2>
- <KEYWORD2>THEN</KEYWORD2>
- <KEYWORD2 AT_WORD_START="TRUE">TITLE</KEYWORD2>
- <KEYWORD2>TITLE1</KEYWORD2>
- <KEYWORD2>TITLE2</KEYWORD2>
- <KEYWORD2>TITLE3</KEYWORD2>
- <KEYWORD2>TITLE4</KEYWORD2>
- <KEYWORD2>TITLE5</KEYWORD2>
- <KEYWORD2>TO</KEYWORD2>
- <KEYWORD2>TOL</KEYWORD2>
- <KEYWORD2>TRIM</KEYWORD2>
- <KEYWORD2>UNFORMATTED</KEYWORD2>
- <KEYWORD2>UNTIL</KEYWORD2>
- <KEYWORD2>UPDATE</KEYWORD2>
- <KEYWORD2>UPCASE</KEYWORD2>
- <KEYWORD2>VALUE</KEYWORD2>
- <KEYWORD2>VAR</KEYWORD2>
- <KEYWORD2>WHEN</KEYWORD2>
- <KEYWORD2 AT_WORD_START="TRUE">WHERE</KEYWORD2>
- <KEYWORD2>WHILE</KEYWORD2>
- <KEYWORD2>WINDOW</KEYWORD2>
- <KEYWORD2>WORK</KEYWORD2>
- <KEYWORD2>X</KEYWORD2>
- <KEYWORD2>XSYNC</KEYWORD2>
- <KEYWORD2>XWAIT</KEYWORD2>
- <KEYWORD2>YES</KEYWORD2>
- <KEYWORD2>YYMMDD</KEYWORD2>
- <KEYWORD2>GOPTIONS</KEYWORD2>
- <KEYWORD2>AXIS1</KEYWORD2>
- <KEYWORD2>AXIS2</KEYWORD2>
- <KEYWORD2>SYMBOL1</KEYWORD2>
- <KEYWORD2>SET</KEYWORD2>
- </KEYWORDS>
-
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ SAS edit mode by Bill McMilleon (bill at mcmilleon.com) March 19, 2003
+ updated by Ian Helgesen 2007-10-02
+ updated by goebbe 2009-05-19
+ updated by goebbe 2010-06-15
+
+ Suggested catalog file entry:
+ <MODE NAME="SAS" FILE="sas.xml" FILE_NAME_GLOB="*.{sas}" />
+-->
+
+<MODE>
+<PROPS>
+ <PROPERTY NAME="indentNextLines" VALUE="(.*%?do.*;|\s*proc
+.*;|\s*data .*;|\s*%macro\s?.*;|define event \S+\s*;)"/>
+
+ <PROPERTY NAME="unindentThisLine" VALUE="^\s*(else.*|end\s*|elsif.*|rescue.*|when.*)$"/>
+ <PROPERTY NAME="unindentNextLines" VALUE="^\s*(end\s*|else.*|rescue.*|elsif.*|when.*)$"/>
+
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="*" />
+</PROPS>
+
+ <RULES IGNORE_CASE="TRUE" NO_WORD_SEP="_" HIGHLIGHT_DIGITS="TRUE">
+
+<!-- In fixed form, column 72 is the last column parsed, unless the
+\extend_source option is invoked -->
+ <!-- TERMINATE AT_CHAR="72" / -->
+
+<!-- type2-range comment in the case when there is nothing OR nothing but space between the last ; and the * -->
+<!-- Currently the ending ; of a comment cannot be used in regexp inside Jedit -->
+<!-- therefore several type2-range comments in a row requires regexp for each case -->
+
+<!-- Currently only two type2-range-comments in row (per line) are implemented -->
+<!-- The rational behind the solution is the following: Define the "complete type2-comment block -->
+<!-- AND the start of the second typ2-comment block" as the start of the type2-range comment -->
+
+<!-- case0: two COMMENT2 range comments in a row at the start of a line: -->
+<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR="*" AT_WHITESPACE_END="TRUE">
+ <BEGIN>[*][^;]*[;][\s]*[*]</BEGIN>
+ <END>;</END>
+</SPAN_REGEXP>
+
+<!-- case1: two comments in a row /*comment*/ *comment; - at the start of a line, : -->
+<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR="/*" AT_WHITESPACE_END="TRUE">
+ <BEGIN>([/][*][*][/][\s]*[*])|([/][*](.)*[*][/][\s]*[*])</BEGIN>
+ <END>;</END>
+</SPAN_REGEXP>
+
+<!-- case2: one COMMENT2 at the start of a line: -->
+<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR="*" AT_WHITESPACE_END="TRUE">
+ <BEGIN>[*]</BEGIN>
+ <END>;</END>
+</SPAN_REGEXP>
+
+<!-- case3: two COMMENT2 range comments in a row - after SAS-code:-->
+<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR=";">
+ <BEGIN>[;][\s]*[*][^;]*[;][\s]*[*]</BEGIN>
+ <END>;</END>
+</SPAN_REGEXP>
+
+<!-- case4: two comments in a row /*comment*/ *comment; - after SAS-code:-->
+<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR=";">
+ <BEGIN>[;][\s]*[/][*](.)*[*][/][\s]*[*]</BEGIN>
+ <END>;</END>
+</SPAN_REGEXP>
+
+<!-- case5: one COMMENT2 range comment after SAS-code: -->
+<SPAN_REGEXP TYPE="COMMENT2" HASH_CHAR=";">
+ <BEGIN>[;][\s]*[*]</BEGIN>
+ <END>;</END>
+</SPAN_REGEXP>
+
+<!-- range-comment "macro"-type -->
+<SPAN TYPE="COMMENT2">
+ <BEGIN>%*</BEGIN>
+ <END>;</END>
+</SPAN>
+
+<!-- C style comment -->
+<SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+</SPAN>
+
+<SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+</SPAN>
+
+<SPAN TYPE="LITERAL2" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+</SPAN>
+
+<!-- PROCS -->
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC ANOVA</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC APPEND</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC BOXPLOT</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC CONTENTS</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC DATASETS</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC DELETE</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC FORMAT</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC FREQ</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC IMPORT</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC MEANS</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC PRINTTO</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC PRINT</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC REPORT</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC SORT</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC SQL</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC UNIVARIATE</SEQ>
+
+<SEQ TYPE="KEYWORD1" AT_WHITESPACE_END="TRUE">DATA </SEQ>
+<SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">%INCLUDE</SEQ>
+
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">PROC</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">RUN;</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">QUIT;</SEQ>
+
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">%macro</SEQ>
+<SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">%mend</SEQ>
+
+<!--<SEQ_REGEXP TYPE="FUNCTION" AT_WORD_START="TRUE">\s*%\S+\s?\(</SEQ_REGEXP>-->
+<!--<SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="%">\%\s*\(</SEQ_REGEXP>-->
+
+<SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="%" AT_WHITESPACE_END="TRUE">%\S+\s*\(</SEQ_REGEXP>
+<SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="&">(&*\w+)+(\.+|,|;|\s|$|\}|\))</SEQ_REGEXP>
+<!--<SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="&" AT_LINE_START="TRUE">&\S+(\.|;|\s)</SEQ_REGEXP>-->
+
+<!--"data"+"=" can also be a keyword that is applied inside a proc or a data step:-->
+<SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="DATA">(DATA)[\s]*[=]</SEQ_REGEXP>
+
+<!--<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS CSV</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS CSV CLOSE</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS HTML</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS HTML CLOSE</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS LISTING</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS LISTING OFF</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS PDF</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS PDF CLOSE</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS RTF</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS RTF CLOSE</SEQ>
+<SEQ TYPE="MARKUP" AT_WORD_START="TRUE">ODS</SEQ>-->
+
+ <!-- Highlighted Operators -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <!--<SEQ TYPE="OPERATOR">_</SEQ> -->
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD2>$ASCII</KEYWORD2>
+ <KEYWORD2>$BINARY</KEYWORD2>
+ <KEYWORD2>$CB</KEYWORD2>
+ <KEYWORD2>$CHAR</KEYWORD2>
+ <KEYWORD2>$CHARZB</KEYWORD2>
+ <KEYWORD2>$EBCDIC</KEYWORD2>
+ <KEYWORD2>$HEX</KEYWORD2>
+ <KEYWORD2>$OCTAL</KEYWORD2>
+ <KEYWORD2>$VARYING</KEYWORD2>
+
+ <KEYWORD3>%ABORT</KEYWORD3>
+ <KEYWORD3>%BQUOTE</KEYWORD3>
+ <KEYWORD3>%DO</KEYWORD3>
+ <KEYWORD3>%ELSE</KEYWORD3>
+ <KEYWORD3>%END</KEYWORD3>
+ <KEYWORD3>%EVAL</KEYWORD3>
+ <KEYWORD3>%Global</KEYWORD3>
+ <KEYWORD3>%GOTO</KEYWORD3>
+ <KEYWORD3>%IF</KEYWORD3>
+ <KEYWORD3>%INC</KEYWORD3>
+ <KEYWORD3>%INCLUDE</KEYWORD3>
+ <KEYWORD3>%INDEX</KEYWORD3>
+ <KEYWORD3>%INPUT</KEYWORD3>
+ <KEYWORD3>%LENGTH</KEYWORD3>
+ <KEYWORD3>%LET</KEYWORD3>
+ <KEYWORD3>%LOCAL</KEYWORD3>
+ <KEYWORD3>%LOWCASE</KEYWORD3>
+ <KEYWORD3>%MACRO</KEYWORD3>
+ <KEYWORD3>%MEND</KEYWORD3>
+ <KEYWORD3>%NRBQUOTE</KEYWORD3>
+ <KEYWORD3>%NRQUOTE</KEYWORD3>
+ <KEYWORD3>%NRSTR</KEYWORD3>
+ <KEYWORD3>%PUT</KEYWORD3>
+ <KEYWORD3>%QSCAN</KEYWORD3>
+ <KEYWORD3>%QSUBSTR</KEYWORD3>
+ <KEYWORD3>%Quote</KEYWORD3>
+ <KEYWORD3>%RUN</KEYWORD3>
+ <KEYWORD3>%SCAN</KEYWORD3>
+ <KEYWORD3>%STR</KEYWORD3>
+ <KEYWORD3>%SUBSTR</KEYWORD3>
+ <KEYWORD3>%SYMDEL</KEYWORD3>
+ <KEYWORD3>%SYSEXEC</KEYWORD3>
+ <KEYWORD3>%SYSFUNC</KEYWORD3>
+ <KEYWORD3>%THEN</KEYWORD3>
+ <KEYWORD3>%TO</KEYWORD3>
+ <KEYWORD3>%UNTIL</KEYWORD3>
+ <KEYWORD3>%WHILE</KEYWORD3>
+ <KEYWORD3>%WINDOW</KEYWORD3>
+ <KEYWORD3>%UPCASE</KEYWORD3>
+
+ <KEYWORD2>_ALL_</KEYWORD2>
+ <KEYWORD2>_CHARACTER_</KEYWORD2>
+ <KEYWORD2>_CMD_</KEYWORD2>
+ <KEYWORD2>_ERROR_</KEYWORD2>
+ <KEYWORD2>_I_</KEYWORD2>
+ <KEYWORD2>_INFILE_</KEYWORD2>
+ <KEYWORD2>_LAST_</KEYWORD2>
+ <KEYWORD2>_MSG_</KEYWORD2>
+ <KEYWORD2>_N_</KEYWORD2>
+ <KEYWORD2>_NULL_</KEYWORD2>
+ <KEYWORD2>_NUMERIC_</KEYWORD2>
+ <KEYWORD2>_TEMPORARY_</KEYWORD2>
+ <KEYWORD2>_TYPE_</KEYWORD2>
+ <KEYWORD2>=DATA</KEYWORD2>
+ <KEYWORD2>ABORT</KEYWORD2>
+ <KEYWORD2>ADD</KEYWORD2>
+ <KEYWORD2>ADJRSQ</KEYWORD2>
+ <KEYWORD2>AND</KEYWORD2>
+ <KEYWORD2>ARRAY</KEYWORD2>
+ <KEYWORD2>ATTRIB</KEYWORD2>
+ <KEYWORD2>BACKWARD</KEYWORD2>
+ <KEYWORD2>BINARY</KEYWORD2>
+ <KEYWORD2>BLOCKSIZE</KEYWORD2>
+ <KEYWORD2>BY</KEYWORD2>
+ <KEYWORD2>BZ</KEYWORD2>
+ <KEYWORD2>CALL</KEYWORD2>
+ <KEYWORD2>CARDS</KEYWORD2>
+ <KEYWORD2>CARDS4</KEYWORD2>
+ <KEYWORD2>CHAR</KEYWORD2>
+ <KEYWORD2>CLASS</KEYWORD2>
+ <KEYWORD2>COL</KEYWORD2>
+ <KEYWORD2>COLLIN</KEYWORD2>
+ <KEYWORD2>COLUMN</KEYWORD2>
+ <KEYWORD2>COMMA</KEYWORD2>
+ <KEYWORD2>COMMAX</KEYWORD2>
+ <KEYWORD2>CREATE</KEYWORD2>
+ <KEYWORD2>DATA</KEYWORD2>
+ <KEYWORD2>DATA=</KEYWORD2>
+ <KEYWORD2>DATE</KEYWORD2>
+ <KEYWORD2>DATAFILE</KEYWORD2>
+ <KEYWORD2>DATETIME</KEYWORD2>
+ <KEYWORD2>DDMMYY</KEYWORD2>
+ <KEYWORD2>DECENDING</KEYWORD2>
+ <KEYWORD2>DEFINE</KEYWORD2>
+ <KEYWORD2>DELETE</KEYWORD2>
+ <KEYWORD2>DELIMITER</KEYWORD2>
+ <KEYWORD2>DISPLAY</KEYWORD2>
+ <KEYWORD2>DLM</KEYWORD2>
+ <KEYWORD2>DO</KEYWORD2>
+ <KEYWORD2>DROP</KEYWORD2>
+ <KEYWORD2>ELSE</KEYWORD2>
+ <KEYWORD2>END</KEYWORD2>
+ <KEYWORD2>ENDSAS</KEYWORD2>
+ <KEYWORD2>EOF</KEYWORD2>
+ <KEYWORD2>EOV</KEYWORD2>
+ <KEYWORD2>EQ</KEYWORD2>
+ <KEYWORD2>ERRORS</KEYWORD2>
+ <KEYWORD2>FILE</KEYWORD2>
+ <KEYWORD2>FILENAME</KEYWORD2>
+ <KEYWORD2>FILEVAR</KEYWORD2>
+ <KEYWORD2>FIRST.</KEYWORD2>
+ <KEYWORD2>FIRSTOBS</KEYWORD2>
+ <KEYWORD2>FOOTNOTE</KEYWORD2>
+ <KEYWORD2>FOOTNOTE1</KEYWORD2>
+ <KEYWORD2>FOOTNOTE2</KEYWORD2>
+ <KEYWORD2>FOOTNOTE3</KEYWORD2>
+ <KEYWORD2>FORM</KEYWORD2>
+ <KEYWORD2>FORMAT</KEYWORD2>
+ <KEYWORD2>FORMCHAR</KEYWORD2>
+ <KEYWORD2>FORMDELIM</KEYWORD2>
+ <KEYWORD2>FORMDLIM</KEYWORD2>
+ <KEYWORD2>FORWARD</KEYWORD2>
+ <KEYWORD2>FROM</KEYWORD2>
+ <KEYWORD2>GO</KEYWORD2>
+ <KEYWORD2>GROUP</KEYWORD2>
+ <KEYWORD2>GT</KEYWORD2>
+ <KEYWORD2>HBAR</KEYWORD2>
+ <KEYWORD2>HEX</KEYWORD2>
+ <KEYWORD2>HPCT</KEYWORD2>
+ <KEYWORD2>HVAR</KEYWORD2>
+ <KEYWORD2>IB</KEYWORD2>
+ <KEYWORD2>ID</KEYWORD2>
+ <KEYWORD2>IEEE</KEYWORD2>
+ <KEYWORD2>IF</KEYWORD2>
+ <KEYWORD2>IN</KEYWORD2>
+ <KEYWORD2>INFILE</KEYWORD2>
+ <KEYWORD2>INFORMAT</KEYWORD2>
+ <KEYWORD2>INTO</KEYWORD2>
+ <KEYWORD2>INPUT</KEYWORD2>
+ <KEYWORD2>INR</KEYWORD2>
+ <KEYWORD2>INVALUE</KEYWORD2>
+ <KEYWORD2>JOIN</KEYWORD2>
+ <KEYWORD2>JULIAN</KEYWORD2>
+ <KEYWORD2>KEEP</KEYWORD2>
+ <KEYWORD2>LABEL</KEYWORD2>
+ <KEYWORD2>LAG</KEYWORD2>
+ <KEYWORD2>LAST.</KEYWORD2>
+ <KEYWORD2>LEFT</KEYWORD2>
+ <KEYWORD2>LENGTH</KEYWORD2>
+ <KEYWORD2>LIB</KEYWORD2>
+ <KEYWORD2>LIBNAME</KEYWORD2>
+ <KEYWORD2>LINE</KEYWORD2>
+ <KEYWORD2>LINESIZE</KEYWORD2>
+ <KEYWORD2>LINK</KEYWORD2>
+ <KEYWORD2>LIST</KEYWORD2>
+ <KEYWORD2>LOSTCARD</KEYWORD2>
+ <KEYWORD2>LRECL</KEYWORD2>
+ <KEYWORD2>LS</KEYWORD2>
+ <KEYWORD2>MACRO</KEYWORD2>
+ <KEYWORD2>MACROGEN</KEYWORD2>
+ <KEYWORD2>MAXDEC</KEYWORD2>
+ <KEYWORD2>MAXR</KEYWORD2>
+ <KEYWORD2>MEDIAN</KEYWORD2>
+ <KEYWORD2>MEMTYPE</KEYWORD2>
+ <KEYWORD2>MERGE</KEYWORD2>
+ <KEYWORD2>MERROR</KEYWORD2>
+ <KEYWORD2>MISSOVE</KEYWORD2>
+ <KEYWORD2>MLOGIC</KEYWORD2>
+ <KEYWORD2>MMDDYY</KEYWORD2>
+ <KEYWORD2>MODE</KEYWORD2>
+ <KEYWORD2>MODEL</KEYWORD2>
+ <KEYWORD2>MONYY</KEYWORD2>
+ <KEYWORD2>MPRINT</KEYWORD2>
+ <KEYWORD2>MRECALL</KEYWORD2>
+ <KEYWORD2>NE</KEYWORD2>
+ <KEYWORD2>NEW</KEYWORD2>
+ <KEYWORD2>NO</KEYWORD2>
+ <KEYWORD2>NOBS</KEYWORD2>
+ <KEYWORD2>NOCENTER</KEYWORD2>
+ <KEYWORD2>NOCUM</KEYWORD2>
+ <KEYWORD2>NODATE</KEYWORD2>
+ <KEYWORD2>NODUP</KEYWORD2>
+ <KEYWORD2>NODUPKEY</KEYWORD2>
+ <KEYWORD2>NOINT</KEYWORD2>
+ <KEYWORD2>NONUMBER</KEYWORD2>
+ <KEYWORD2>NOPAD</KEYWORD2>
+ <KEYWORD2>NOPRINT</KEYWORD2>
+ <KEYWORD2>NOROW</KEYWORD2>
+ <KEYWORD2>NOT</KEYWORD2>
+ <KEYWORD2>NOTITLE</KEYWORD2>
+ <KEYWORD2>NOTITLES</KEYWORD2>
+ <KEYWORD2>NOXSYNC</KEYWORD2>
+ <KEYWORD2>NOXWAIT</KEYWORD2>
+ <KEYWORD2>NUMBER</KEYWORD2>
+ <KEYWORD2>NWAY</KEYWORD2>
+ <KEYWORD2>OBS</KEYWORD2>
+ <KEYWORD2>OPTION</KEYWORD2>
+ <KEYWORD2>OPTIONS</KEYWORD2>
+ <KEYWORD2>OR</KEYWORD2>
+ <KEYWORD2>ORDER</KEYWORD2>
+ <KEYWORD2>OTHERWISE</KEYWORD2>
+ <KEYWORD2>OUT</KEYWORD2>
+ <KEYWORD2>OUTPUT</KEYWORD2>
+ <KEYWORD2>OVER</KEYWORD2>
+ <KEYWORD2>PAD</KEYWORD2>
+ <KEYWORD2>PAD2</KEYWORD2>
+ <KEYWORD2>PAGESIZE</KEYWORD2>
+ <KEYWORD2>PD</KEYWORD2>
+ <KEYWORD2>PERCENT</KEYWORD2>
+ <KEYWORD2>PIB</KEYWORD2>
+ <KEYWORD2>PK</KEYWORD2>
+ <KEYWORD2>POINT</KEYWORD2>
+ <KEYWORD2>POSITION</KEYWORD2>
+ <KEYWORD2>PRINTER</KEYWORD2>
+ <KEYWORD2>PRXMATCH</KEYWORD2>
+ <KEYWORD2>PRXCHANGE</KEYWORD2>
+ <KEYWORD2>PS</KEYWORD2>
+ <KEYWORD2>PUT</KEYWORD2>
+ <KEYWORD2>R</KEYWORD2>
+ <KEYWORD2>RB</KEYWORD2>
+ <KEYWORD2>RECFM</KEYWORD2>
+ <KEYWORD2>REG</KEYWORD2>
+ <KEYWORD2>REGR</KEYWORD2>
+ <KEYWORD2>RENAME</KEYWORD2>
+ <KEYWORD2>REPLACE</KEYWORD2>
+ <KEYWORD2>RETAIN</KEYWORD2>
+ <KEYWORD2>RETURN</KEYWORD2>
+ <KEYWORD2>REUSE</KEYWORD2>
+ <KEYWORD2>REVERSE</KEYWORD2>
+ <KEYWORD2>RSQUARE</KEYWORD2>
+ <KEYWORD2>RUN</KEYWORD2>
+ <KEYWORD2>SASAUTOS</KEYWORD2>
+ <KEYWORD2>SCAN</KEYWORD2>
+ <KEYWORD2>SELECT</KEYWORD2>
+ <KEYWORD2>SELECTION</KEYWORD2>
+ <KEYWORD2>SERROR</KEYWORD2>
+ <KEYWORD2> SET</KEYWORD2>
+ <KEYWORD2>SIMPLE</KEYWORD2>
+ <KEYWORD2>SLE</KEYWORD2>
+ <KEYWORD2>SLS</KEYWORD2>
+ <KEYWORD2>START</KEYWORD2>
+ <KEYWORD2>STDIN</KEYWORD2>
+ <KEYWORD2>STOP</KEYWORD2>
+ <KEYWORD2>STOPOVER</KEYWORD2>
+ <KEYWORD2>SUBSTR</KEYWORD2>
+ <KEYWORD2>SYMBOL</KEYWORD2>
+ <KEYWORD2>SYMBOLGEN</KEYWORD2>
+ <KEYWORD2>SYMGET</KEYWORD2>
+ <KEYWORD2>SYMPUT</KEYWORD2>
+ <KEYWORD2>SYMPUTX</KEYWORD2>
+ <KEYWORD2>T</KEYWORD2>
+ <KEYWORD2>TABLE</KEYWORD2>
+ <KEYWORD2>TABLES</KEYWORD2>
+ <KEYWORD2>THEN</KEYWORD2>
+ <KEYWORD2>TITLE</KEYWORD2>
+ <KEYWORD2>TITLE1</KEYWORD2>
+ <KEYWORD2>TITLE2</KEYWORD2>
+ <KEYWORD2>TITLE3</KEYWORD2>
+ <KEYWORD2>TITLE4</KEYWORD2>
+ <KEYWORD2>TITLE5</KEYWORD2>
+ <KEYWORD2>TO</KEYWORD2>
+ <KEYWORD2>TOL</KEYWORD2>
+ <KEYWORD2>TRIM</KEYWORD2>
+ <KEYWORD2>UNFORMATTED</KEYWORD2>
+ <KEYWORD2>UNTIL</KEYWORD2>
+ <KEYWORD2>UPDATE</KEYWORD2>
+ <KEYWORD2>UPCASE</KEYWORD2>
+ <KEYWORD2>VALUE</KEYWORD2>
+ <KEYWORD2>VAR</KEYWORD2>
+ <KEYWORD2>WHEN</KEYWORD2>
+ <KEYWORD2>WHERE</KEYWORD2>
+ <KEYWORD2>WHILE</KEYWORD2>
+ <KEYWORD2>WINDOW</KEYWORD2>
+ <KEYWORD2>WORK</KEYWORD2>
+ <KEYWORD2>X</KEYWORD2>
+ <KEYWORD2>XSYNC</KEYWORD2>
+ <KEYWORD2>XWAIT</KEYWORD2>
+ <KEYWORD2>YES</KEYWORD2>
+ <KEYWORD2>YYMMDD</KEYWORD2>
+ <KEYWORD2>GOPTIONS</KEYWORD2>
+ <KEYWORD2>AXIS1</KEYWORD2>
+ <KEYWORD2>AXIS2</KEYWORD2>
+ <KEYWORD2>SYMBOL1</KEYWORD2>
+ <KEYWORD2>SET</KEYWORD2>
+ </KEYWORDS>
+
+ </RULES>
+</MODE>
+
+
+
diff --git a/jEdit/modes/scheme.xml b/jEdit/modes/scheme.xml
index 1117eaa..6e75ce9 100644
--- a/jEdit/modes/scheme.xml
+++ b/jEdit/modes/scheme.xml
@@ -1,236 +1,236 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd"><MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="#|"/>
- <PROPERTY NAME="commentEnd" VALUE="|#"/>
- <PROPERTY NAME="lineComment" VALUE=";"/>
- <PROPERTY NAME="noWordSep" VALUE="_-+?:*/!"/>
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="("/>
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")"/>
- <PROPERTY NAME="multipleBracketIndent" VALUE="true" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" NO_WORD_SEP="_-+?:*/!">
- <SPAN TYPE="COMMENT1">
- <BEGIN>#|</BEGIN>
- <END>|#</END>
- </SPAN>
- <SEQ TYPE="NULL">'(</SEQ>
- <MARK_FOLLOWING TYPE="LITERAL1">'</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL1">#\</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL1">#b</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL1">#d</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL1">#o</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL1">#x</MARK_FOLLOWING>
- <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <KEYWORDS>
- <KEYWORD1>and</KEYWORD1>
- <KEYWORD1>begin</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>cond</KEYWORD1>
- <KEYWORD1>cond-expand</KEYWORD1>
- <KEYWORD1>define</KEYWORD1>
- <KEYWORD1>define-macro</KEYWORD1>
- <KEYWORD1>delay</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>fluid-let</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>lambda</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>let*</KEYWORD1>
- <KEYWORD1>letrec</KEYWORD1>
- <KEYWORD1>or</KEYWORD1>
- <KEYWORD1>quasiquote</KEYWORD1>
- <KEYWORD1>quote</KEYWORD1>
- <KEYWORD1>set!</KEYWORD1>
- <KEYWORD2>abs</KEYWORD2>
- <KEYWORD2>acos</KEYWORD2>
- <KEYWORD2>angle</KEYWORD2>
- <KEYWORD2>append</KEYWORD2>
- <KEYWORD2>apply</KEYWORD2>
- <KEYWORD2>asin</KEYWORD2>
- <KEYWORD2>assoc</KEYWORD2>
- <KEYWORD2>assq</KEYWORD2>
- <KEYWORD2>assv</KEYWORD2>
- <KEYWORD2>atan</KEYWORD2>
- <KEYWORD2>car</KEYWORD2>
- <KEYWORD2>cdr</KEYWORD2>
- <KEYWORD2>caar</KEYWORD2>
- <KEYWORD2>cadr</KEYWORD2>
- <KEYWORD2>cdar</KEYWORD2>
- <KEYWORD2>cddr</KEYWORD2>
- <KEYWORD2>caaar</KEYWORD2>
- <KEYWORD2>caadr</KEYWORD2>
- <KEYWORD2>cadar</KEYWORD2>
- <KEYWORD2>caddr</KEYWORD2>
- <KEYWORD2>cdaar</KEYWORD2>
- <KEYWORD2>cdadr</KEYWORD2>
- <KEYWORD2>cddar</KEYWORD2>
- <KEYWORD2>cdddr</KEYWORD2>
- <KEYWORD2>call-with-current-continuation</KEYWORD2>
- <KEYWORD2>call-with-input-file</KEYWORD2>
- <KEYWORD2>call-with-output-file</KEYWORD2>
- <KEYWORD2>call-with-values</KEYWORD2>
- <KEYWORD2>call/cc</KEYWORD2>
- <KEYWORD2>catch</KEYWORD2>
- <KEYWORD2>ceiling</KEYWORD2>
- <KEYWORD2>char->integer</KEYWORD2>
- <KEYWORD2>char-downcase</KEYWORD2>
- <KEYWORD2>char-upcase</KEYWORD2>
- <KEYWORD2>close-input-port</KEYWORD2>
- <KEYWORD2>close-output-port</KEYWORD2>
- <KEYWORD2>cons</KEYWORD2>
- <KEYWORD2>cos</KEYWORD2>
- <KEYWORD2>current-input-port</KEYWORD2>
- <KEYWORD2>current-output-port</KEYWORD2>
- <KEYWORD2>delete-file</KEYWORD2>
- <KEYWORD2>display</KEYWORD2>
- <KEYWORD2>dynamic-wind</KEYWORD2>
- <KEYWORD2>eval</KEYWORD2>
- <KEYWORD2>exit</KEYWORD2>
- <KEYWORD2>exact->inexact</KEYWORD2>
- <KEYWORD2>exp</KEYWORD2>
- <KEYWORD2>expt</KEYWORD2>
- <KEYWORD2>file-or-directory-modify-seconds</KEYWORD2>
- <KEYWORD2>floor</KEYWORD2>
- <KEYWORD2>force</KEYWORD2>
- <KEYWORD2>for-each</KEYWORD2>
- <KEYWORD2>gcd</KEYWORD2>
- <KEYWORD2>gensym</KEYWORD2>
- <KEYWORD2>get-output-string</KEYWORD2>
- <KEYWORD2>getenv</KEYWORD2>
- <KEYWORD2>imag-part</KEYWORD2>
- <KEYWORD2>integer->char</KEYWORD2>
- <KEYWORD2>lcm</KEYWORD2>
- <KEYWORD2>length</KEYWORD2>
- <KEYWORD2>list</KEYWORD2>
- <KEYWORD2>list->string</KEYWORD2>
- <KEYWORD2>list->vector</KEYWORD2>
- <KEYWORD2>list-ref</KEYWORD2>
- <KEYWORD2>list-tail</KEYWORD2>
- <KEYWORD2>load</KEYWORD2>
- <KEYWORD2>log</KEYWORD2>
- <KEYWORD2>magnitude</KEYWORD2>
- <KEYWORD2>make-polar</KEYWORD2>
- <KEYWORD2>make-rectangular</KEYWORD2>
- <KEYWORD2>make-string</KEYWORD2>
- <KEYWORD2>make-vector</KEYWORD2>
- <KEYWORD2>map</KEYWORD2>
- <KEYWORD2>max</KEYWORD2>
- <KEYWORD2>member</KEYWORD2>
- <KEYWORD2>memq</KEYWORD2>
- <KEYWORD2>memv</KEYWORD2>
- <KEYWORD2>min</KEYWORD2>
- <KEYWORD2>modulo</KEYWORD2>
- <KEYWORD2>newline</KEYWORD2>
- <KEYWORD2>nil</KEYWORD2>
- <KEYWORD2>not</KEYWORD2>
- <KEYWORD2>number->string</KEYWORD2>
- <KEYWORD2>open-input-file</KEYWORD2>
- <KEYWORD2>open-input-string</KEYWORD2>
- <KEYWORD2>open-output-file</KEYWORD2>
- <KEYWORD2>open-output-string</KEYWORD2>
- <KEYWORD2>peek-char</KEYWORD2>
- <KEYWORD2>quotient</KEYWORD2>
- <KEYWORD2>read</KEYWORD2>
- <KEYWORD2>read-char</KEYWORD2>
- <KEYWORD2>read-line</KEYWORD2>
- <KEYWORD2>real-part</KEYWORD2>
- <KEYWORD2>remainder</KEYWORD2>
- <KEYWORD2>reverse</KEYWORD2>
- <KEYWORD2>reverse!</KEYWORD2>
- <KEYWORD2>round</KEYWORD2>
- <KEYWORD2>set-car!</KEYWORD2>
- <KEYWORD2>set-cdr!</KEYWORD2>
- <KEYWORD2>sin</KEYWORD2>
- <KEYWORD2>sqrt</KEYWORD2>
- <KEYWORD2>string</KEYWORD2>
- <KEYWORD2>string->list</KEYWORD2>
- <KEYWORD2>string->number</KEYWORD2>
- <KEYWORD2>string->symbol</KEYWORD2>
- <KEYWORD2>string-append</KEYWORD2>
- <KEYWORD2>string-copy</KEYWORD2>
- <KEYWORD2>string-fill!</KEYWORD2>
- <KEYWORD2>string-length</KEYWORD2>
- <KEYWORD2>string-ref</KEYWORD2>
- <KEYWORD2>string-set!</KEYWORD2>
- <KEYWORD2>substring</KEYWORD2>
- <KEYWORD2>symbol->string</KEYWORD2>
- <KEYWORD2>system</KEYWORD2>
- <KEYWORD2>tan</KEYWORD2>
- <KEYWORD2>truncate</KEYWORD2>
- <KEYWORD2>values</KEYWORD2>
- <KEYWORD2>vector</KEYWORD2>
- <KEYWORD2>vector->list</KEYWORD2>
- <KEYWORD2>vector-fill!</KEYWORD2>
- <KEYWORD2>vector-length</KEYWORD2>
- <KEYWORD2>vector-ref</KEYWORD2>
- <KEYWORD2>vector-set!</KEYWORD2>
- <KEYWORD2>with-input-from-file</KEYWORD2>
- <KEYWORD2>with-output-to-file</KEYWORD2>
- <KEYWORD2>write</KEYWORD2>
- <KEYWORD2>write-char</KEYWORD2>
- <KEYWORD3>boolean?</KEYWORD3>
- <KEYWORD3>char-alphabetic?</KEYWORD3>
- <KEYWORD3>char-ci<=?</KEYWORD3>
- <KEYWORD3>char-ci<?</KEYWORD3>
- <KEYWORD3>char-ci=?</KEYWORD3>
- <KEYWORD3>char-ci>=?</KEYWORD3>
- <KEYWORD3>char-ci>?</KEYWORD3>
- <KEYWORD3>char-lower-case?</KEYWORD3>
- <KEYWORD3>char-numeric?</KEYWORD3>
- <KEYWORD3>char-ready?</KEYWORD3>
- <KEYWORD3>char-upper-case?</KEYWORD3>
- <KEYWORD3>char-whitespace?</KEYWORD3>
- <KEYWORD3>char<=?</KEYWORD3>
- <KEYWORD3>char<?</KEYWORD3>
- <KEYWORD3>char=?</KEYWORD3>
- <KEYWORD3>char>=?</KEYWORD3>
- <KEYWORD3>char>?</KEYWORD3>
- <KEYWORD3>char?</KEYWORD3>
- <KEYWORD3>complex?</KEYWORD3>
- <KEYWORD3>eof-object?</KEYWORD3>
- <KEYWORD3>eq?</KEYWORD3>
- <KEYWORD3>equal?</KEYWORD3>
- <KEYWORD3>eqv?</KEYWORD3>
- <KEYWORD3>even?</KEYWORD3>
- <KEYWORD3>exact?</KEYWORD3>
- <KEYWORD3>file-exists?</KEYWORD3>
- <KEYWORD3>inexact?</KEYWORD3>
- <KEYWORD3>input-port?</KEYWORD3>
- <KEYWORD3>integer?</KEYWORD3>
- <KEYWORD3>list?</KEYWORD3>
- <KEYWORD3>negative?</KEYWORD3>
- <KEYWORD3>null?</KEYWORD3>
- <KEYWORD3>number?</KEYWORD3>
- <KEYWORD3>odd?</KEYWORD3>
- <KEYWORD3>output-port?</KEYWORD3>
- <KEYWORD3>pair?</KEYWORD3>
- <KEYWORD3>port?</KEYWORD3>
- <KEYWORD3>positive?</KEYWORD3>
- <KEYWORD3>procedure?</KEYWORD3>
- <KEYWORD3>rational?</KEYWORD3>
- <KEYWORD3>real?</KEYWORD3>
- <KEYWORD3>string-ci<=?</KEYWORD3>
- <KEYWORD3>string-ci<?</KEYWORD3>
- <KEYWORD3>string-ci=?</KEYWORD3>
- <KEYWORD3>string-ci>=?</KEYWORD3>
- <KEYWORD3>string-ci>?</KEYWORD3>
- <KEYWORD3>string<=?</KEYWORD3>
- <KEYWORD3>string<?</KEYWORD3>
- <KEYWORD3>string=?</KEYWORD3>
- <KEYWORD3>string>=?</KEYWORD3>
- <KEYWORD3>string>?</KEYWORD3>
- <KEYWORD3>string?</KEYWORD3>
- <KEYWORD3>symbol?</KEYWORD3>
- <KEYWORD3>vector?</KEYWORD3>
- <KEYWORD3>zero?</KEYWORD3>
- <LITERAL2>#t</LITERAL2>
- <LITERAL2>#f</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd"><MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="#|"/>
+ <PROPERTY NAME="commentEnd" VALUE="|#"/>
+ <PROPERTY NAME="lineComment" VALUE=";"/>
+ <PROPERTY NAME="noWordSep" VALUE="_-+?:*/!"/>
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="("/>
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")"/>
+ <PROPERTY NAME="multipleBracketIndent" VALUE="true" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" NO_WORD_SEP="_-+?:*/!">
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>#|</BEGIN>
+ <END>|#</END>
+ </SPAN>
+ <SEQ TYPE="NULL">'(</SEQ>
+ <MARK_FOLLOWING TYPE="LITERAL1">'</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL1">#\</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL1">#b</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL1">#d</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL1">#o</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL1">#x</MARK_FOLLOWING>
+ <EOL_SPAN TYPE="COMMENT1">;</EOL_SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <KEYWORDS>
+ <KEYWORD1>and</KEYWORD1>
+ <KEYWORD1>begin</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>cond</KEYWORD1>
+ <KEYWORD1>cond-expand</KEYWORD1>
+ <KEYWORD1>define</KEYWORD1>
+ <KEYWORD1>define-macro</KEYWORD1>
+ <KEYWORD1>delay</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>fluid-let</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>lambda</KEYWORD1>
+ <KEYWORD1>let</KEYWORD1>
+ <KEYWORD1>let*</KEYWORD1>
+ <KEYWORD1>letrec</KEYWORD1>
+ <KEYWORD1>or</KEYWORD1>
+ <KEYWORD1>quasiquote</KEYWORD1>
+ <KEYWORD1>quote</KEYWORD1>
+ <KEYWORD1>set!</KEYWORD1>
+ <KEYWORD2>abs</KEYWORD2>
+ <KEYWORD2>acos</KEYWORD2>
+ <KEYWORD2>angle</KEYWORD2>
+ <KEYWORD2>append</KEYWORD2>
+ <KEYWORD2>apply</KEYWORD2>
+ <KEYWORD2>asin</KEYWORD2>
+ <KEYWORD2>assoc</KEYWORD2>
+ <KEYWORD2>assq</KEYWORD2>
+ <KEYWORD2>assv</KEYWORD2>
+ <KEYWORD2>atan</KEYWORD2>
+ <KEYWORD2>car</KEYWORD2>
+ <KEYWORD2>cdr</KEYWORD2>
+ <KEYWORD2>caar</KEYWORD2>
+ <KEYWORD2>cadr</KEYWORD2>
+ <KEYWORD2>cdar</KEYWORD2>
+ <KEYWORD2>cddr</KEYWORD2>
+ <KEYWORD2>caaar</KEYWORD2>
+ <KEYWORD2>caadr</KEYWORD2>
+ <KEYWORD2>cadar</KEYWORD2>
+ <KEYWORD2>caddr</KEYWORD2>
+ <KEYWORD2>cdaar</KEYWORD2>
+ <KEYWORD2>cdadr</KEYWORD2>
+ <KEYWORD2>cddar</KEYWORD2>
+ <KEYWORD2>cdddr</KEYWORD2>
+ <KEYWORD2>call-with-current-continuation</KEYWORD2>
+ <KEYWORD2>call-with-input-file</KEYWORD2>
+ <KEYWORD2>call-with-output-file</KEYWORD2>
+ <KEYWORD2>call-with-values</KEYWORD2>
+ <KEYWORD2>call/cc</KEYWORD2>
+ <KEYWORD2>catch</KEYWORD2>
+ <KEYWORD2>ceiling</KEYWORD2>
+ <KEYWORD2>char->integer</KEYWORD2>
+ <KEYWORD2>char-downcase</KEYWORD2>
+ <KEYWORD2>char-upcase</KEYWORD2>
+ <KEYWORD2>close-input-port</KEYWORD2>
+ <KEYWORD2>close-output-port</KEYWORD2>
+ <KEYWORD2>cons</KEYWORD2>
+ <KEYWORD2>cos</KEYWORD2>
+ <KEYWORD2>current-input-port</KEYWORD2>
+ <KEYWORD2>current-output-port</KEYWORD2>
+ <KEYWORD2>delete-file</KEYWORD2>
+ <KEYWORD2>display</KEYWORD2>
+ <KEYWORD2>dynamic-wind</KEYWORD2>
+ <KEYWORD2>eval</KEYWORD2>
+ <KEYWORD2>exit</KEYWORD2>
+ <KEYWORD2>exact->inexact</KEYWORD2>
+ <KEYWORD2>exp</KEYWORD2>
+ <KEYWORD2>expt</KEYWORD2>
+ <KEYWORD2>file-or-directory-modify-seconds</KEYWORD2>
+ <KEYWORD2>floor</KEYWORD2>
+ <KEYWORD2>force</KEYWORD2>
+ <KEYWORD2>for-each</KEYWORD2>
+ <KEYWORD2>gcd</KEYWORD2>
+ <KEYWORD2>gensym</KEYWORD2>
+ <KEYWORD2>get-output-string</KEYWORD2>
+ <KEYWORD2>getenv</KEYWORD2>
+ <KEYWORD2>imag-part</KEYWORD2>
+ <KEYWORD2>integer->char</KEYWORD2>
+ <KEYWORD2>lcm</KEYWORD2>
+ <KEYWORD2>length</KEYWORD2>
+ <KEYWORD2>list</KEYWORD2>
+ <KEYWORD2>list->string</KEYWORD2>
+ <KEYWORD2>list->vector</KEYWORD2>
+ <KEYWORD2>list-ref</KEYWORD2>
+ <KEYWORD2>list-tail</KEYWORD2>
+ <KEYWORD2>load</KEYWORD2>
+ <KEYWORD2>log</KEYWORD2>
+ <KEYWORD2>magnitude</KEYWORD2>
+ <KEYWORD2>make-polar</KEYWORD2>
+ <KEYWORD2>make-rectangular</KEYWORD2>
+ <KEYWORD2>make-string</KEYWORD2>
+ <KEYWORD2>make-vector</KEYWORD2>
+ <KEYWORD2>map</KEYWORD2>
+ <KEYWORD2>max</KEYWORD2>
+ <KEYWORD2>member</KEYWORD2>
+ <KEYWORD2>memq</KEYWORD2>
+ <KEYWORD2>memv</KEYWORD2>
+ <KEYWORD2>min</KEYWORD2>
+ <KEYWORD2>modulo</KEYWORD2>
+ <KEYWORD2>newline</KEYWORD2>
+ <KEYWORD2>nil</KEYWORD2>
+ <KEYWORD2>not</KEYWORD2>
+ <KEYWORD2>number->string</KEYWORD2>
+ <KEYWORD2>open-input-file</KEYWORD2>
+ <KEYWORD2>open-input-string</KEYWORD2>
+ <KEYWORD2>open-output-file</KEYWORD2>
+ <KEYWORD2>open-output-string</KEYWORD2>
+ <KEYWORD2>peek-char</KEYWORD2>
+ <KEYWORD2>quotient</KEYWORD2>
+ <KEYWORD2>read</KEYWORD2>
+ <KEYWORD2>read-char</KEYWORD2>
+ <KEYWORD2>read-line</KEYWORD2>
+ <KEYWORD2>real-part</KEYWORD2>
+ <KEYWORD2>remainder</KEYWORD2>
+ <KEYWORD2>reverse</KEYWORD2>
+ <KEYWORD2>reverse!</KEYWORD2>
+ <KEYWORD2>round</KEYWORD2>
+ <KEYWORD2>set-car!</KEYWORD2>
+ <KEYWORD2>set-cdr!</KEYWORD2>
+ <KEYWORD2>sin</KEYWORD2>
+ <KEYWORD2>sqrt</KEYWORD2>
+ <KEYWORD2>string</KEYWORD2>
+ <KEYWORD2>string->list</KEYWORD2>
+ <KEYWORD2>string->number</KEYWORD2>
+ <KEYWORD2>string->symbol</KEYWORD2>
+ <KEYWORD2>string-append</KEYWORD2>
+ <KEYWORD2>string-copy</KEYWORD2>
+ <KEYWORD2>string-fill!</KEYWORD2>
+ <KEYWORD2>string-length</KEYWORD2>
+ <KEYWORD2>string-ref</KEYWORD2>
+ <KEYWORD2>string-set!</KEYWORD2>
+ <KEYWORD2>substring</KEYWORD2>
+ <KEYWORD2>symbol->string</KEYWORD2>
+ <KEYWORD2>system</KEYWORD2>
+ <KEYWORD2>tan</KEYWORD2>
+ <KEYWORD2>truncate</KEYWORD2>
+ <KEYWORD2>values</KEYWORD2>
+ <KEYWORD2>vector</KEYWORD2>
+ <KEYWORD2>vector->list</KEYWORD2>
+ <KEYWORD2>vector-fill!</KEYWORD2>
+ <KEYWORD2>vector-length</KEYWORD2>
+ <KEYWORD2>vector-ref</KEYWORD2>
+ <KEYWORD2>vector-set!</KEYWORD2>
+ <KEYWORD2>with-input-from-file</KEYWORD2>
+ <KEYWORD2>with-output-to-file</KEYWORD2>
+ <KEYWORD2>write</KEYWORD2>
+ <KEYWORD2>write-char</KEYWORD2>
+ <KEYWORD3>boolean?</KEYWORD3>
+ <KEYWORD3>char-alphabetic?</KEYWORD3>
+ <KEYWORD3>char-ci<=?</KEYWORD3>
+ <KEYWORD3>char-ci<?</KEYWORD3>
+ <KEYWORD3>char-ci=?</KEYWORD3>
+ <KEYWORD3>char-ci>=?</KEYWORD3>
+ <KEYWORD3>char-ci>?</KEYWORD3>
+ <KEYWORD3>char-lower-case?</KEYWORD3>
+ <KEYWORD3>char-numeric?</KEYWORD3>
+ <KEYWORD3>char-ready?</KEYWORD3>
+ <KEYWORD3>char-upper-case?</KEYWORD3>
+ <KEYWORD3>char-whitespace?</KEYWORD3>
+ <KEYWORD3>char<=?</KEYWORD3>
+ <KEYWORD3>char<?</KEYWORD3>
+ <KEYWORD3>char=?</KEYWORD3>
+ <KEYWORD3>char>=?</KEYWORD3>
+ <KEYWORD3>char>?</KEYWORD3>
+ <KEYWORD3>char?</KEYWORD3>
+ <KEYWORD3>complex?</KEYWORD3>
+ <KEYWORD3>eof-object?</KEYWORD3>
+ <KEYWORD3>eq?</KEYWORD3>
+ <KEYWORD3>equal?</KEYWORD3>
+ <KEYWORD3>eqv?</KEYWORD3>
+ <KEYWORD3>even?</KEYWORD3>
+ <KEYWORD3>exact?</KEYWORD3>
+ <KEYWORD3>file-exists?</KEYWORD3>
+ <KEYWORD3>inexact?</KEYWORD3>
+ <KEYWORD3>input-port?</KEYWORD3>
+ <KEYWORD3>integer?</KEYWORD3>
+ <KEYWORD3>list?</KEYWORD3>
+ <KEYWORD3>negative?</KEYWORD3>
+ <KEYWORD3>null?</KEYWORD3>
+ <KEYWORD3>number?</KEYWORD3>
+ <KEYWORD3>odd?</KEYWORD3>
+ <KEYWORD3>output-port?</KEYWORD3>
+ <KEYWORD3>pair?</KEYWORD3>
+ <KEYWORD3>port?</KEYWORD3>
+ <KEYWORD3>positive?</KEYWORD3>
+ <KEYWORD3>procedure?</KEYWORD3>
+ <KEYWORD3>rational?</KEYWORD3>
+ <KEYWORD3>real?</KEYWORD3>
+ <KEYWORD3>string-ci<=?</KEYWORD3>
+ <KEYWORD3>string-ci<?</KEYWORD3>
+ <KEYWORD3>string-ci=?</KEYWORD3>
+ <KEYWORD3>string-ci>=?</KEYWORD3>
+ <KEYWORD3>string-ci>?</KEYWORD3>
+ <KEYWORD3>string<=?</KEYWORD3>
+ <KEYWORD3>string<?</KEYWORD3>
+ <KEYWORD3>string=?</KEYWORD3>
+ <KEYWORD3>string>=?</KEYWORD3>
+ <KEYWORD3>string>?</KEYWORD3>
+ <KEYWORD3>string?</KEYWORD3>
+ <KEYWORD3>symbol?</KEYWORD3>
+ <KEYWORD3>vector?</KEYWORD3>
+ <KEYWORD3>zero?</KEYWORD3>
+ <LITERAL2>#t</LITERAL2>
+ <LITERAL2>#f</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/sdl_pr.xml b/jEdit/modes/sdl_pr.xml
index 0f67aa8..9340db5 100644
--- a/jEdit/modes/sdl_pr.xml
+++ b/jEdit/modes/sdl_pr.xml
@@ -1,228 +1,228 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- sdl_pr.xml K. J. Turner <kjt at cs.stir.ac.uk> 26th February 2004
-
- SDL (Specification and Description Language) is an ITU standard (Z.100)
- for a formal specification language used in communications and system specification generally.
-
- This mode handles SDL/PR (Phrase Representation), but does not (yet) deal with SDL 2000.
-
- Auto-indentation occurs if the following are at the start of a line (ignoring
- leading white space): "block", "channel", "connection", "decision", "generator", "input", "macro", "newtype", "operator", "package", "procedure", "process", "refinement", "service", "start", "state", "substructure", "syntype", "system".
-
- This also happens if the following appear on their own (i.e. also ignoring
- trailing white space): "signal".
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*"/>
- <PROPERTY NAME="commentEnd" VALUE="*/"/>
- <PROPERTY NAME="indentNextLines"
- VALUE="\s*(block|channel|connection|decision|generator|input|macro|newtype|operator|package|procedure|process|refinement|service|start|state|substructure|syntype|system).*|\s*(signal)\s*"/>
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- SDT/TAU Comments -->
- <SPAN TYPE="COMMENT2">
- <BEGIN>/*#SDTREF</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- Standard Comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <!-- String Literals -->
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- Standard Operators -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">/=</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">//</SEQ>
-
- <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">and</SEQ>
- <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">mod</SEQ>
- <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">not</SEQ>
- <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">or</SEQ>
- <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">rem</SEQ>
- <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">xor</SEQ>
-
- <KEYWORDS>
- <!-- Reserved Words -->
- <KEYWORD1>active</KEYWORD1>
- <KEYWORD1>adding</KEYWORD1>
- <KEYWORD1>all</KEYWORD1>
- <KEYWORD1>alternative</KEYWORD1>
- <KEYWORD1>any</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>atleast</KEYWORD1>
- <KEYWORD1>axioms</KEYWORD1>
- <KEYWORD1>block</KEYWORD1>
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>channel</KEYWORD1>
- <KEYWORD1>comment</KEYWORD1>
- <KEYWORD1>connect</KEYWORD1>
- <KEYWORD1>connection</KEYWORD1>
- <KEYWORD1>constant</KEYWORD1>
- <KEYWORD1>constants</KEYWORD1>
- <KEYWORD1>create</KEYWORD1>
- <KEYWORD1>dcl</KEYWORD1>
- <KEYWORD1>decision</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>endalternative</KEYWORD1>
- <KEYWORD1>endblock</KEYWORD1>
- <KEYWORD1>endchannel</KEYWORD1>
- <KEYWORD1>endconnection</KEYWORD1>
- <KEYWORD1>enddecision</KEYWORD1>
- <KEYWORD1>endgenerator</KEYWORD1>
- <KEYWORD1>endmacro</KEYWORD1>
- <KEYWORD1>endnewtype</KEYWORD1>
- <KEYWORD1>endoperator</KEYWORD1>
- <KEYWORD1>endpackage</KEYWORD1>
- <KEYWORD1>endprocedure</KEYWORD1>
- <KEYWORD1>endprocess</KEYWORD1>
- <KEYWORD1>endrefinement</KEYWORD1>
- <KEYWORD1>endselect</KEYWORD1>
- <KEYWORD1>endservice</KEYWORD1>
- <KEYWORD1>endstate</KEYWORD1>
- <KEYWORD1>endsubstructure</KEYWORD1>
- <KEYWORD1>endsyntype</KEYWORD1>
- <KEYWORD1>endsystem</KEYWORD1>
- <KEYWORD1>env</KEYWORD1>
- <KEYWORD1>error</KEYWORD1>
- <KEYWORD1>export</KEYWORD1>
- <KEYWORD1>exported</KEYWORD1>
- <KEYWORD1>external</KEYWORD1>
- <KEYWORD1>fi</KEYWORD1>
- <KEYWORD1>finalized</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>fpar</KEYWORD1>
- <KEYWORD1>from</KEYWORD1>
- <KEYWORD1>gate</KEYWORD1>
- <KEYWORD1>generator</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
- <KEYWORD1>imported</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>inherits</KEYWORD1>
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD1>interface</KEYWORD1>
- <KEYWORD1>join</KEYWORD1>
- <KEYWORD1>literal</KEYWORD1>
- <KEYWORD1>literals</KEYWORD1>
- <KEYWORD1>macro</KEYWORD1>
- <KEYWORD1>macrodefinition</KEYWORD1>
- <KEYWORD1>macroid</KEYWORD1>
- <KEYWORD1>map</KEYWORD1>
- <KEYWORD1>nameclass</KEYWORD1>
- <KEYWORD1>newtype</KEYWORD1>
- <KEYWORD1>nextstate</KEYWORD1>
- <KEYWORD1>nodelay</KEYWORD1>
- <KEYWORD1>noequality</KEYWORD1>
- <KEYWORD1>none</KEYWORD1>
- <KEYWORD1>now</KEYWORD1>
- <KEYWORD1>offspring</KEYWORD1>
- <KEYWORD1>operator</KEYWORD1>
- <KEYWORD1>operators</KEYWORD1>
- <KEYWORD1>ordering</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>output</KEYWORD1>
- <KEYWORD1>package</KEYWORD1>
- <KEYWORD1>parent</KEYWORD1>
- <KEYWORD1>priority</KEYWORD1>
- <KEYWORD1>procedure</KEYWORD1>
- <KEYWORD1>process</KEYWORD1>
- <KEYWORD1>provided</KEYWORD1>
- <KEYWORD1>redefined</KEYWORD1>
- <KEYWORD1>referenced</KEYWORD1>
- <KEYWORD1>refinement</KEYWORD1>
- <KEYWORD1>remote</KEYWORD1>
- <KEYWORD1>reset</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>returns</KEYWORD1>
- <KEYWORD1>revealed</KEYWORD1>
- <KEYWORD1>reverse</KEYWORD1>
- <KEYWORD1>route</KEYWORD1>
- <KEYWORD1>save</KEYWORD1>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>self</KEYWORD1>
- <KEYWORD1>sender</KEYWORD1>
- <KEYWORD1>service</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>signal</KEYWORD1>
- <KEYWORD1>signallist</KEYWORD1>
- <KEYWORD1>signalroute</KEYWORD1>
- <KEYWORD1>signalset</KEYWORD1>
- <KEYWORD1>spelling</KEYWORD1>
- <KEYWORD1>start</KEYWORD1>
- <KEYWORD1>state</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>struct</KEYWORD1>
- <KEYWORD1>substructure</KEYWORD1>
- <KEYWORD1>synonym</KEYWORD1>
- <KEYWORD1>syntype</KEYWORD1>
- <KEYWORD1>system</KEYWORD1>
- <KEYWORD1>task</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>this</KEYWORD1>
- <KEYWORD1>timer</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
- <KEYWORD1>via</KEYWORD1>
- <KEYWORD1>view</KEYWORD1>
- <KEYWORD1>viewed</KEYWORD1>
- <KEYWORD1>virtual</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
-
- <!-- Standard Library Sorts -->
- <KEYWORD2>Boolean</KEYWORD2>
- <KEYWORD2>Character</KEYWORD2>
- <KEYWORD2>Charstring</KEYWORD2>
- <KEYWORD2>Duration</KEYWORD2>
- <KEYWORD2>Integer</KEYWORD2>
- <KEYWORD2>Natural</KEYWORD2>
- <KEYWORD2>Real</KEYWORD2>
- <KEYWORD2>PId</KEYWORD2>
- <KEYWORD2>Time</KEYWORD2>
-
- <!-- Standard Library Generators -->
- <KEYWORD3>Array</KEYWORD3>
- <KEYWORD3>String</KEYWORD3>
- <KEYWORD3>Powerset</KEYWORD3>
-
- <!-- Standard Library Literals -->
- <LITERAL1>false</LITERAL1>
- <LITERAL1>null</LITERAL1>
- <LITERAL1>true</LITERAL1>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ sdl_pr.xml K. J. Turner <kjt at cs.stir.ac.uk> 26th February 2004
+
+ SDL (Specification and Description Language) is an ITU standard (Z.100)
+ for a formal specification language used in communications and system specification generally.
+
+ This mode handles SDL/PR (Phrase Representation), but does not (yet) deal with SDL 2000.
+
+ Auto-indentation occurs if the following are at the start of a line (ignoring
+ leading white space): "block", "channel", "connection", "decision", "generator", "input", "macro", "newtype", "operator", "package", "procedure", "process", "refinement", "service", "start", "state", "substructure", "syntype", "system".
+
+ This also happens if the following appear on their own (i.e. also ignoring
+ trailing white space): "signal".
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*"/>
+ <PROPERTY NAME="commentEnd" VALUE="*/"/>
+ <PROPERTY NAME="indentNextLines"
+ VALUE="\s*(block|channel|connection|decision|generator|input|macro|newtype|operator|package|procedure|process|refinement|service|start|state|substructure|syntype|system).*|\s*(signal)\s*"/>
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- SDT/TAU Comments -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>/*#SDTREF</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- Standard Comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!-- String Literals -->
+ <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- Standard Operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">/=</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">//</SEQ>
+
+ <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">and</SEQ>
+ <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">mod</SEQ>
+ <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">not</SEQ>
+ <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">or</SEQ>
+ <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">rem</SEQ>
+ <SEQ TYPE="OPERATOR" AT_WORD_START="TRUE">xor</SEQ>
+
+ <KEYWORDS>
+ <!-- Reserved Words -->
+ <KEYWORD1>active</KEYWORD1>
+ <KEYWORD1>adding</KEYWORD1>
+ <KEYWORD1>all</KEYWORD1>
+ <KEYWORD1>alternative</KEYWORD1>
+ <KEYWORD1>any</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>atleast</KEYWORD1>
+ <KEYWORD1>axioms</KEYWORD1>
+ <KEYWORD1>block</KEYWORD1>
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>channel</KEYWORD1>
+ <KEYWORD1>comment</KEYWORD1>
+ <KEYWORD1>connect</KEYWORD1>
+ <KEYWORD1>connection</KEYWORD1>
+ <KEYWORD1>constant</KEYWORD1>
+ <KEYWORD1>constants</KEYWORD1>
+ <KEYWORD1>create</KEYWORD1>
+ <KEYWORD1>dcl</KEYWORD1>
+ <KEYWORD1>decision</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>endalternative</KEYWORD1>
+ <KEYWORD1>endblock</KEYWORD1>
+ <KEYWORD1>endchannel</KEYWORD1>
+ <KEYWORD1>endconnection</KEYWORD1>
+ <KEYWORD1>enddecision</KEYWORD1>
+ <KEYWORD1>endgenerator</KEYWORD1>
+ <KEYWORD1>endmacro</KEYWORD1>
+ <KEYWORD1>endnewtype</KEYWORD1>
+ <KEYWORD1>endoperator</KEYWORD1>
+ <KEYWORD1>endpackage</KEYWORD1>
+ <KEYWORD1>endprocedure</KEYWORD1>
+ <KEYWORD1>endprocess</KEYWORD1>
+ <KEYWORD1>endrefinement</KEYWORD1>
+ <KEYWORD1>endselect</KEYWORD1>
+ <KEYWORD1>endservice</KEYWORD1>
+ <KEYWORD1>endstate</KEYWORD1>
+ <KEYWORD1>endsubstructure</KEYWORD1>
+ <KEYWORD1>endsyntype</KEYWORD1>
+ <KEYWORD1>endsystem</KEYWORD1>
+ <KEYWORD1>env</KEYWORD1>
+ <KEYWORD1>error</KEYWORD1>
+ <KEYWORD1>export</KEYWORD1>
+ <KEYWORD1>exported</KEYWORD1>
+ <KEYWORD1>external</KEYWORD1>
+ <KEYWORD1>fi</KEYWORD1>
+ <KEYWORD1>finalized</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>fpar</KEYWORD1>
+ <KEYWORD1>from</KEYWORD1>
+ <KEYWORD1>gate</KEYWORD1>
+ <KEYWORD1>generator</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>imported</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>inherits</KEYWORD1>
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD1>interface</KEYWORD1>
+ <KEYWORD1>join</KEYWORD1>
+ <KEYWORD1>literal</KEYWORD1>
+ <KEYWORD1>literals</KEYWORD1>
+ <KEYWORD1>macro</KEYWORD1>
+ <KEYWORD1>macrodefinition</KEYWORD1>
+ <KEYWORD1>macroid</KEYWORD1>
+ <KEYWORD1>map</KEYWORD1>
+ <KEYWORD1>nameclass</KEYWORD1>
+ <KEYWORD1>newtype</KEYWORD1>
+ <KEYWORD1>nextstate</KEYWORD1>
+ <KEYWORD1>nodelay</KEYWORD1>
+ <KEYWORD1>noequality</KEYWORD1>
+ <KEYWORD1>none</KEYWORD1>
+ <KEYWORD1>now</KEYWORD1>
+ <KEYWORD1>offspring</KEYWORD1>
+ <KEYWORD1>operator</KEYWORD1>
+ <KEYWORD1>operators</KEYWORD1>
+ <KEYWORD1>ordering</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+ <KEYWORD1>output</KEYWORD1>
+ <KEYWORD1>package</KEYWORD1>
+ <KEYWORD1>parent</KEYWORD1>
+ <KEYWORD1>priority</KEYWORD1>
+ <KEYWORD1>procedure</KEYWORD1>
+ <KEYWORD1>process</KEYWORD1>
+ <KEYWORD1>provided</KEYWORD1>
+ <KEYWORD1>redefined</KEYWORD1>
+ <KEYWORD1>referenced</KEYWORD1>
+ <KEYWORD1>refinement</KEYWORD1>
+ <KEYWORD1>remote</KEYWORD1>
+ <KEYWORD1>reset</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>returns</KEYWORD1>
+ <KEYWORD1>revealed</KEYWORD1>
+ <KEYWORD1>reverse</KEYWORD1>
+ <KEYWORD1>route</KEYWORD1>
+ <KEYWORD1>save</KEYWORD1>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>self</KEYWORD1>
+ <KEYWORD1>sender</KEYWORD1>
+ <KEYWORD1>service</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>signal</KEYWORD1>
+ <KEYWORD1>signallist</KEYWORD1>
+ <KEYWORD1>signalroute</KEYWORD1>
+ <KEYWORD1>signalset</KEYWORD1>
+ <KEYWORD1>spelling</KEYWORD1>
+ <KEYWORD1>start</KEYWORD1>
+ <KEYWORD1>state</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>struct</KEYWORD1>
+ <KEYWORD1>substructure</KEYWORD1>
+ <KEYWORD1>synonym</KEYWORD1>
+ <KEYWORD1>syntype</KEYWORD1>
+ <KEYWORD1>system</KEYWORD1>
+ <KEYWORD1>task</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>this</KEYWORD1>
+ <KEYWORD1>timer</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>type</KEYWORD1>
+ <KEYWORD1>use</KEYWORD1>
+ <KEYWORD1>via</KEYWORD1>
+ <KEYWORD1>view</KEYWORD1>
+ <KEYWORD1>viewed</KEYWORD1>
+ <KEYWORD1>virtual</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+
+ <!-- Standard Library Sorts -->
+ <KEYWORD2>Boolean</KEYWORD2>
+ <KEYWORD2>Character</KEYWORD2>
+ <KEYWORD2>Charstring</KEYWORD2>
+ <KEYWORD2>Duration</KEYWORD2>
+ <KEYWORD2>Integer</KEYWORD2>
+ <KEYWORD2>Natural</KEYWORD2>
+ <KEYWORD2>Real</KEYWORD2>
+ <KEYWORD2>PId</KEYWORD2>
+ <KEYWORD2>Time</KEYWORD2>
+
+ <!-- Standard Library Generators -->
+ <KEYWORD3>Array</KEYWORD3>
+ <KEYWORD3>String</KEYWORD3>
+ <KEYWORD3>Powerset</KEYWORD3>
+
+ <!-- Standard Library Literals -->
+ <LITERAL1>false</LITERAL1>
+ <LITERAL1>null</LITERAL1>
+ <LITERAL1>true</LITERAL1>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/sgml.xml b/jEdit/modes/sgml.xml
index 6f7737d..cf8069c 100644
--- a/jEdit/modes/sgml.xml
+++ b/jEdit/modes/sgml.xml
@@ -1,47 +1,47 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
- <RULES>
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- DTD Entity declarations -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::ENTITY-TAGS">
- <BEGIN><!ENTITY</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- CDATA sections -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::CDATA">
- <BEGIN><![CDATA[</BEGIN>
- <END>]]></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+ <RULES>
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- DTD Entity declarations -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::ENTITY-TAGS">
+ <BEGIN><!ENTITY</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CDATA sections -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::CDATA">
+ <BEGIN><![CDATA[</BEGIN>
+ <END>]]></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/shellscript.xml b/jEdit/modes/shellscript.xml
index 2f4415f..ce8eb09 100644
--- a/jEdit/modes/shellscript.xml
+++ b/jEdit/modes/shellscript.xml
@@ -1,169 +1,170 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="indentNextLines"
- VALUE="^.*(then|else|case.*in)$" />
- <PROPERTY NAME="unindentThisLine"
- VALUE="^\s*(fi|else|esac|.*\))$" />
- <PROPERTY NAME="unindentNextLines"
- VALUE="^\s*(fi|else|esac)$" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" ESCAPE="\">
- <!-- Comments -->
- <EOL_SPAN TYPE="COMMENT2">#!</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <!-- Variables -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$?</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$*</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$@</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$$</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$<</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
- <MARK_PREVIOUS TYPE="KEYWORD2" MATCH_TYPE="OPERATOR">=</MARK_PREVIOUS>
-
- <!-- weird stuff -->
- <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
- <BEGIN>$((</BEGIN>
- <END>))</END>
- </SPAN>
- <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
- <BEGIN>$(</BEGIN>
- <END>)</END>
- </SPAN>
- <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
- <BEGIN>$[</BEGIN>
- <END>]</END>
- </SPAN>
- <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <!-- Literals -->
- <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- Readins -->
- <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1" DELEGATE="LITERAL">
- <BEGIN><![CDATA[<<[\p{Space}'"]*([\p{Alnum}_]+)[\p{Space}'"]*]]></BEGIN>
- <END AT_LINE_START="TRUE">$1</END>
- </SPAN_REGEXP>
-
- <!-- Operators -->
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
-
- <!-- %jobnumber -->
- <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
-
- <!-- functions -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>elif</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>fi</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <OPERATOR>;;</OPERATOR>
- <KEYWORD1>esac</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>done</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
-
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- </KEYWORDS>
-
- <!-- some of these should be marked OPERATOR -->
- <!-- <SEQ TYPE="NULL">)</SEQ>
- <SEQ TYPE="NULL">(</SEQ>
- <SEQ TYPE="NULL">=</SEQ>
- <SEQ TYPE="NULL">!</SEQ>
- <SEQ TYPE="NULL">>=</SEQ>
- <SEQ TYPE="NULL"><=</SEQ>
- <SEQ TYPE="NULL">+</SEQ>
- <SEQ TYPE="NULL">-</SEQ>
- <SEQ TYPE="NULL">/</SEQ>
- <SEQ TYPE="NULL">*</SEQ>
- <SEQ TYPE="NULL">^</SEQ>
- <SEQ TYPE="NULL">~</SEQ>
- <SEQ TYPE="NULL">}</SEQ>
- <SEQ TYPE="NULL">{</SEQ>
- SEQ TYPE="NULL">.</SEQ
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SEQ TYPE="NULL">]</SEQ>
- <SEQ TYPE="NULL">[</SEQ>
- <SEQ TYPE="NULL">?</SEQ>
- <SEQ TYPE="NULL">:</SEQ> -->
- </RULES>
-
- <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
- <!-- Variables -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
- </RULES>
-
- <RULES SET="EXEC" DEFAULT="KEYWORD3" ESCAPE="\">
- <!-- Variables -->
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SPAN TYPE="KEYWORD3">
- <BEGIN>$((</BEGIN>
- <END>))</END>
- </SPAN>
-
- <SPAN TYPE="KEYWORD3">
- <BEGIN>$(</BEGIN>
- <END>)</END>
- </SPAN>
-
- <SPAN TYPE="KEYWORD3">
- <BEGIN>$[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
-
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="indentNextLines"
+ VALUE="^.*(then|do|else|case.*in)\s*(#.*)?$" />
+ <PROPERTY NAME="unindentThisLine"
+ VALUE="^\s*(fi|else|done|esac|[^(]*\).*)\s*(#.*)?$" />
+ <PROPERTY NAME="unindentNextLines"
+ VALUE="^\s*(fi|else|done|esac)\s*(#.*)?$" />
+ <PROPERTY NAME="electricKeys" VALUE=")" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" ESCAPE="\">
+ <!-- Comments -->
+ <EOL_SPAN TYPE="COMMENT2">#!</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <!-- Variables -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$?</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$*</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$@</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$$</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$<</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+ <MARK_PREVIOUS TYPE="KEYWORD2" MATCH_TYPE="OPERATOR">=</MARK_PREVIOUS>
+
+ <!-- weird stuff -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
+ <BEGIN>$((</BEGIN>
+ <END>))</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
+ <BEGIN>$(</BEGIN>
+ <END>)</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
+ <BEGIN>$[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD3" DELEGATE="EXEC">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <!-- Literals -->
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- Readins -->
+ <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1" DELEGATE="LITERAL">
+ <BEGIN><![CDATA[<<[\p{Space}'"]*([\p{Alnum}_]+)[\p{Space}'"]*]]></BEGIN>
+ <END AT_LINE_START="TRUE">$1</END>
+ </SPAN_REGEXP>
+
+ <!-- Operators -->
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+
+ <!-- %jobnumber -->
+ <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
+
+ <!-- functions -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>elif</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>fi</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <OPERATOR>;;</OPERATOR>
+ <KEYWORD1>esac</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>done</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ </KEYWORDS>
+
+ <!-- some of these should be marked OPERATOR -->
+ <!-- <SEQ TYPE="NULL">)</SEQ>
+ <SEQ TYPE="NULL">(</SEQ>
+ <SEQ TYPE="NULL">=</SEQ>
+ <SEQ TYPE="NULL">!</SEQ>
+ <SEQ TYPE="NULL">>=</SEQ>
+ <SEQ TYPE="NULL"><=</SEQ>
+ <SEQ TYPE="NULL">+</SEQ>
+ <SEQ TYPE="NULL">-</SEQ>
+ <SEQ TYPE="NULL">/</SEQ>
+ <SEQ TYPE="NULL">*</SEQ>
+ <SEQ TYPE="NULL">^</SEQ>
+ <SEQ TYPE="NULL">~</SEQ>
+ <SEQ TYPE="NULL">}</SEQ>
+ <SEQ TYPE="NULL">{</SEQ>
+ SEQ TYPE="NULL">.</SEQ
+ <SEQ TYPE="NULL">,</SEQ>
+ <SEQ TYPE="NULL">;</SEQ>
+ <SEQ TYPE="NULL">]</SEQ>
+ <SEQ TYPE="NULL">[</SEQ>
+ <SEQ TYPE="NULL">?</SEQ>
+ <SEQ TYPE="NULL">:</SEQ> -->
+ </RULES>
+
+ <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
+ <!-- Variables -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+ </RULES>
+
+ <RULES SET="EXEC" DEFAULT="KEYWORD3" ESCAPE="\">
+ <!-- Variables -->
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>$((</BEGIN>
+ <END>))</END>
+ </SPAN>
+
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>$(</BEGIN>
+ <END>)</END>
+ </SPAN>
+
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>$[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/shtml.xml b/jEdit/modes/shtml.xml
index b5ee02e..8d35606 100644
--- a/jEdit/modes/shtml.xml
+++ b/jEdit/modes/shtml.xml
@@ -1,117 +1,117 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
- <!-- SSI -->
- <!-- SSI directives should ALWAYS end like this, with a space
- before the tag end, so let's make it colorize poorly otherwise -->
- <!-- ... or really? see bug report 964860 -->
- <SPAN TYPE="KEYWORD3" DELEGATE="SSI">
- <BEGIN><!--#</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <RULES SET="TAGS" DEFAULT="MARKUP">
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- </RULES>
-
- <RULES SET="SSI" DEFAULT="KEYWORD3">
- <SPAN TYPE="LITERAL1" MATCH_TYPE="OPERATOR" DELEGATE="SSI-EXPRESSION">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- MD: i don't think this is valid
- <SPAN TYPE="LITERAL1" MATCH_TYPE="OPERATOR" DELEGATE="SSI-EXPRESSION">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- -->
-
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>config</KEYWORD1>
- <KEYWORD1>echo</KEYWORD1>
- <KEYWORD1>exec</KEYWORD1>
- <KEYWORD1>flastmod</KEYWORD1>
- <KEYWORD1>fsize</KEYWORD1>
- <KEYWORD1>include</KEYWORD1>
-
- <KEYWORD2>cgi</KEYWORD2>
- <KEYWORD2>errmsg</KEYWORD2>
- <KEYWORD2>file</KEYWORD2>
- <KEYWORD2>sizefmt</KEYWORD2>
- <KEYWORD2>timefmt</KEYWORD2>
- <KEYWORD2>var</KEYWORD2>
- <KEYWORD2>cmd</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="SSI-EXPRESSION" DEFAULT="LITERAL1" ESCAPE="\">
-
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">&&</SEQ>
- <SEQ TYPE="OPERATOR">||</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+ <!-- SSI -->
+ <!-- SSI directives should ALWAYS end like this, with a space
+ before the tag end, so let's make it colorize poorly otherwise -->
+ <!-- ... or really? see bug report 964860 -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="SSI">
+ <BEGIN><!--#</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ </RULES>
+
+ <RULES SET="SSI" DEFAULT="KEYWORD3">
+ <SPAN TYPE="LITERAL1" MATCH_TYPE="OPERATOR" DELEGATE="SSI-EXPRESSION">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- MD: i don't think this is valid
+ <SPAN TYPE="LITERAL1" MATCH_TYPE="OPERATOR" DELEGATE="SSI-EXPRESSION">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ -->
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>config</KEYWORD1>
+ <KEYWORD1>echo</KEYWORD1>
+ <KEYWORD1>exec</KEYWORD1>
+ <KEYWORD1>flastmod</KEYWORD1>
+ <KEYWORD1>fsize</KEYWORD1>
+ <KEYWORD1>include</KEYWORD1>
+
+ <KEYWORD2>cgi</KEYWORD2>
+ <KEYWORD2>errmsg</KEYWORD2>
+ <KEYWORD2>file</KEYWORD2>
+ <KEYWORD2>sizefmt</KEYWORD2>
+ <KEYWORD2>timefmt</KEYWORD2>
+ <KEYWORD2>var</KEYWORD2>
+ <KEYWORD2>cmd</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="SSI-EXPRESSION" DEFAULT="LITERAL1" ESCAPE="\">
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">&&</SEQ>
+ <SEQ TYPE="OPERATOR">||</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/sip.xml b/jEdit/modes/sip.xml
new file mode 100644
index 0000000..2361f85
--- /dev/null
+++ b/jEdit/modes/sip.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="\d+">
+ <MARK_PREVIOUS TYPE="KEYWORD3" MATCH_TYPE="OPERATOR">=</MARK_PREVIOUS>
+ <KEYWORDS>
+ <!--{{{ Requests -->
+ <KEYWORD1>REGISTER</KEYWORD1>
+ <KEYWORD1>INVITE</KEYWORD1>
+ <KEYWORD1>ACK</KEYWORD1>
+ <KEYWORD1>CANCEL</KEYWORD1>
+ <KEYWORD1>OPTIONS</KEYWORD1>
+ <KEYWORD1>BYE</KEYWORD1>
+ <KEYWORD1>REFER</KEYWORD1>
+ <KEYWORD1>NOTIFY</KEYWORD1>
+ <KEYWORD1>MESSAGE</KEYWORD1>
+ <KEYWORD1>SUBSCRIBE</KEYWORD1>
+ <KEYWORD1>INFO</KEYWORD1>
+ <KEYWORD1>PRACK</KEYWORD1>
+ <KEYWORD1>UPDATE</KEYWORD1>
+ <KEYWORD1>PUBLISH</KEYWORD1> <!-- RFC3903 -->
+ <!--}}}-->
+
+ <!--{{{ Header fields -->
+ <KEYWORD2>Accept</KEYWORD2>
+ <KEYWORD2>Accept-Contact</KEYWORD2> <!-- RFC3841 -->
+ <KEYWORD2>Accept-Language</KEYWORD2>
+ <KEYWORD2>Alert-Info</KEYWORD2>
+ <KEYWORD2>Allow</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Allow-Events</KEYWORD2> <!-- RFC3265 -->
+ <KEYWORD2>Authentication-Info</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Authorization</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Call-ID</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Call-Info</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Contact</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Content-Disposition</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Content-Encoding</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Content-Language</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Content-Length</KEYWORD2>
+ <KEYWORD2>Content-Type</KEYWORD2>
+ <KEYWORD2>CSeq</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Date</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Encryption</KEYWORD2>
+ <KEYWORD2>Error-Info</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Event</KEYWORD2> <!-- RFC3265 -->
+ <KEYWORD2>Expires</KEYWORD2> <!-- RFC2543 -->
+ <KEYWORD2>From</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Hide</KEYWORD2>
+ <KEYWORD2>In-Reply-To</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Max-Forwards</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Min-Expires</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Min-SE</KEYWORD2> <!-- RFC4028 -->
+ <KEYWORD2>MIME-Version</KEYWORD2>
+ <KEYWORD2>Organization</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>P-Asserted-Identity</KEYWORD2> <!-- RFC3325 -->
+ <KEYWORD2>P-Preferred-Identity</KEYWORD2> <!-- RFC3325 -->
+ <KEYWORD2>Path</KEYWORD2> <!-- RFC3327 -->
+ <KEYWORD2>Priority</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Privacy</KEYWORD2> <!-- RFC3323 -->
+ <KEYWORD2>Proxy-Authenticate</KEYWORD2>
+ <KEYWORD2>Proxy-Authentication-Info</KEYWORD2> <!-- RFC2617 -->
+ <KEYWORD2>Proxy-Authorization</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Proxy-Require</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>RAck</KEYWORD2> <!-- RFC3262 -->
+ <KEYWORD2>Reason</KEYWORD2> <!-- RFC3326 -->
+ <KEYWORD2>Record-Route</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Refer-Sub</KEYWORD2> <!-- RFC4488 -->
+ <KEYWORD2>Refer-To</KEYWORD2> <!-- RFC3515 -->
+ <KEYWORD2>Referred-By</KEYWORD2> <!-- RFC3892 -->
+ <KEYWORD2>Reject-Contact</KEYWORD2> <!-- RFC3841 -->
+ <KEYWORD2>Remote-Party-ID</KEYWORD2> <!-- draft-ietf-sip-privacy-04.txt -->
+ <KEYWORD2>Replaces</KEYWORD2> <!-- RFC3891 -->
+ <KEYWORD2>Reply-To</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Request-Disposition</KEYWORD2> <!-- RFC3841 -->
+ <KEYWORD2>Require</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Retry-After</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Route</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>RSeq</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Security-Client</KEYWORD2> <!-- RFC3329 -->
+ <KEYWORD2>Security-Server</KEYWORD2> <!-- RFC3329 -->
+ <KEYWORD2>Security-Verify</KEYWORD2> <!-- RFC3329 -->
+ <KEYWORD2>Server</KEYWORD2> <!-- RFC2616 RFC3261 -->
+ <KEYWORD2>Service-Route</KEYWORD2> <!-- RFC3608 -->
+ <KEYWORD2>Session-Expires</KEYWORD2> <!-- RFC4028 -->
+ <KEYWORD2>SIP-ETag</KEYWORD2> <!-- RFC3903 -->
+ <KEYWORD2>SIP-If-Match</KEYWORD2> <!-- RFC3903 -->
+ <KEYWORD2>Subject</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Subscription-State</KEYWORD2> <!-- RFC3265 -->
+ <KEYWORD2>Supported</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Suppress-Body-If-Match</KEYWORD2> <!-- draft-niemi-sip-subnot-etags-01 -->
+ <KEYWORD2>Suppress-Notify-If-Match</KEYWORD2> <!-- draft-niemi-sip-subnot-etags-01 -->
+ <KEYWORD2>Timestamp</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>To</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Unsupported</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>User-Agent</KEYWORD2>
+ <KEYWORD2>Via</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>Warning</KEYWORD2> <!-- RFC3261 -->
+ <KEYWORD2>WWW-Authenticate</KEYWORD2> <!-- RFC3261 -->
+ <!--}}}-->
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/slate.xml b/jEdit/modes/slate.xml
index 63353ce..3f396bf 100644
--- a/jEdit/modes/slate.xml
+++ b/jEdit/modes/slate.xml
@@ -1,43 +1,43 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="["/>
- <PROPERTY NAME="unalignedCloseBrackets" VALUE="]"/>
- <PROPERTY NAME="commentStart" VALUE="""/>
- <PROPERTY NAME="commentEnd" VALUE="""/>
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="-?\d+([./]\d+)?">
- <SPAN TYPE="COMMENT1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="LITERAL2">#</MARK_FOLLOWING>
-
- <SEQ TYPE="MARKUP">@</SEQ>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="KEYWORD1">
- <BEGIN>|</BEGIN>
- <END>|</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="LITERAL4">&</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="KEYWORD2">`</MARK_FOLLOWING>
-
- <MARK_FOLLOWING TYPE="LITERAL3">$\</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL3">$</MARK_FOLLOWING>
-
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="["/>
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE="]"/>
+ <PROPERTY NAME="commentStart" VALUE="""/>
+ <PROPERTY NAME="commentEnd" VALUE="""/>
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="-?\d+([./]\d+)?">
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="LITERAL2">#</MARK_FOLLOWING>
+
+ <SEQ TYPE="MARKUP">@</SEQ>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="KEYWORD1">
+ <BEGIN>|</BEGIN>
+ <END>|</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="LITERAL4">&</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="KEYWORD2">`</MARK_FOLLOWING>
+
+ <MARK_FOLLOWING TYPE="LITERAL3">$\</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL3">$</MARK_FOLLOWING>
+
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/slax.xml b/jEdit/modes/slax.xml
new file mode 100644
index 0000000..de9c6fa
--- /dev/null
+++ b/jEdit/modes/slax.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- SLAX Script mode written by Curtis Call
+
+ Types:
+
+ LITERAL1 = " " Strings
+ LITERAL2 = ' ' Strings
+ LITERAL3 = /* */ Comments, Operators, Location Paths, Namespace prefix declarations
+ KEYWORD1 = SLAX statements
+ KEYWORD2 = Variables
+ KEYWORD3 = XML Tags
+ KEYWORD4 = Attributes
+ FUNCTION = Templates
+ DIGIT = Numbers
+
+ Note - LITERAL3 had to highlight different types due to the quirks of the matching
+ possibilities. The main problem is with trying to match comments that follow a line
+ termination. I could determine no possible way to correctly match only correct comments
+ and to also use the correct color for the comment as well as the line termination. The
+ workaround was to combine multiple types of syntax into the LITERAL3 value.
+ This is why operators are not matched. They have to be grouped in along with the rest
+ so it is ok to let them be caught by default. -->
+
+<MODE>
+
+ <PROPS>
+ <!-- SLAX has no line comment, only a /* */ comment -->
+ <PROPERTY NAME="commentStart" VALUE="/*"/>
+ <PROPERTY NAME="commentEnd" VALUE="*/"/>
+
+ <!-- - and _ and : are valid within SLAX words -->
+ <PROPERTY NAME="wordBreakChars" VALUE=",/+=*"/>
+ <PROPERTY NAME="noWordSep" VALUE="-_:."/>
+
+ <!-- { and } always surround SLAX code blocks, but I cannot get auto-indenting
+ to work correctly so I'll just disable the functionality.
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{"/>
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}"/>
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="("/>
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")"/>
+ -->
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" NO_WORD_SEP="-_:."
+ DIGIT_RE="([0-9])*\.?([0-9])+" DEFAULT="LITERAL3">
+
+ <IMPORT DELEGATE="leading-comments"/>
+ <IMPORT DELEGATE="strings"/>
+ <IMPORT DELEGATE="variables"/>
+ <IMPORT DELEGATE="templates"/>
+ <IMPORT DELEGATE="statements"/>
+ <IMPORT DELEGATE="xml-tags"/>
+ <IMPORT DELEGATE="trailing-comments"/>
+ </RULES>
+
+ <!-- These comments start the line so it is obvious that they are not location paths -->
+ <RULES SET="leading-comments">
+ <SPAN TYPE="LITERAL3" AT_WHITESPACE_END="TRUE">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ </RULES>
+
+ <!-- These comments trail at the end of the line - impossible to catch and maintain separate
+ colors with operators -->
+ <RULES SET="trailing-comments">
+ <SPAN_REGEXP TYPE="LITERAL3">
+ <BEGIN>((;)|(\})|(\{)|(\)))(\s)*/\*</BEGIN>
+ <END>*/</END>
+ </SPAN_REGEXP>
+ </RULES>
+
+ <!-- Both " " and ' ' strings are correctly caught -->
+ <RULES SET="strings">
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL2" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ </RULES>
+
+ <!-- The XML start tag is embedded in SLAX scripts -->
+ <RULES SET="xml-tags" DEFAULT="KEYWORD3">
+ <SPAN_REGEXP TYPE="KEYWORD3" DELEGATE="inside-the-tag">
+ <BEGIN><![CDATA[<([a-z]|[A-Z])]]></BEGIN>
+ <END><![CDATA[>]]></END>
+ </SPAN_REGEXP>
+ </RULES>
+
+ <!-- This sets the actual tag < > and tag name to KEYWORD3, the = to LITERAL3
+ and sends the attributes to the attribute RULES and strings to string RULES -->
+ <RULES SET="inside-the-tag" DEFAULT="KEYWORD3">
+ <SPAN_REGEXP TYPE="LITERAL3" DELEGATE="attribute">
+ <BEGIN>(\s)+(?!>)</BEGIN>
+ <END>=</END>
+ </SPAN_REGEXP>
+ <IMPORT DELEGATE="strings"/>
+ </RULES>
+
+ <!-- XML attributes are KEYWORD4 -->
+ <RULES SET="attribute" DEFAULT="KEYWORD4">
+ </RULES>
+
+ <!-- Applies to both variables and parameters, everything that starts with a $ -->
+ <RULES SET="variables">
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+ </RULES>
+
+ <!-- Anything that is immediately prior to a ( will be set to FUNCTION and the ( to
+ LITERAL3 -->
+ <RULES SET="templates">
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="LITERAL3">(</MARK_PREVIOUS>
+ </RULES>
+
+ <!-- This is the SLAX statement set, they use KEYWORD1 -->
+ <RULES SET="statements">
+ <KEYWORDS>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>version</KEYWORD1>
+ <KEYWORD1>ns</KEYWORD1>
+ <KEYWORD1>param</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD1>template</KEYWORD1>
+ <KEYWORD1>match</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>copy-of</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>apply-templates</KEYWORD1>
+ <KEYWORD1>expr</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD1>for-each</KEYWORD1>
+ <KEYWORD1>mode</KEYWORD1>
+ <KEYWORD1>priority</KEYWORD1>
+ <KEYWORD1>extension</KEYWORD1>
+ <KEYWORD1>preserve-space</KEYWORD1>
+ <KEYWORD1>strip-space</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
+
+
diff --git a/jEdit/modes/smalltalk.xml b/jEdit/modes/smalltalk.xml
index a3d6dc4..f6a0fd1 100644
--- a/jEdit/modes/smalltalk.xml
+++ b/jEdit/modes/smalltalk.xml
@@ -1,78 +1,78 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Smalltalk mode, by Marcio Marchini mqm at magma.ca -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE=""" />
- <PROPERTY NAME="commentEnd" VALUE=""" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="[" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="]" />
-
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Standard literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">_</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <MARK_PREVIOUS TYPE="KEYWORD3" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
- <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR">#</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL1" MATCH_TYPE="OPERATOR">$</MARK_FOLLOWING>
-
-
- <KEYWORDS>
- <!-- Constants -->
- <KEYWORD1>true</KEYWORD1>
- <KEYWORD1>false</KEYWORD1>
- <KEYWORD1>nil</KEYWORD1>
-
- <!-- Reserved identifiers -->
- <KEYWORD2>self</KEYWORD2>
- <KEYWORD2>super</KEYWORD2>
-
- <!-- not really keywords, but a different color works well-->
- <KEYWORD3>isNil</KEYWORD3>
- <KEYWORD3>not</KEYWORD3>
-
- <!-- not really -->
- <LITERAL2>Smalltalk</LITERAL2>
- <LITERAL2>Transcript</LITERAL2>
-
- <!-- base classes -->
- <LITERAL2>Date</LITERAL2>
- <LITERAL2>Time</LITERAL2>
- <LITERAL2>Boolean</LITERAL2>
- <LITERAL2>True</LITERAL2>
- <LITERAL2>False</LITERAL2>
- <LITERAL2>Character</LITERAL2>
- <LITERAL2>String</LITERAL2>
- <LITERAL2>Array</LITERAL2>
- <LITERAL2>Symbol</LITERAL2>
- <LITERAL2>Integer</LITERAL2>
- <LITERAL2>Object</LITERAL2>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Smalltalk mode, by Marcio Marchini mqm at magma.ca -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE=""" />
+ <PROPERTY NAME="commentEnd" VALUE=""" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="[" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="]" />
+
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Standard literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">_</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <MARK_PREVIOUS TYPE="KEYWORD3" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+ <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR">#</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL1" MATCH_TYPE="OPERATOR">$</MARK_FOLLOWING>
+
+
+ <KEYWORDS>
+ <!-- Constants -->
+ <KEYWORD1>true</KEYWORD1>
+ <KEYWORD1>false</KEYWORD1>
+ <KEYWORD1>nil</KEYWORD1>
+
+ <!-- Reserved identifiers -->
+ <KEYWORD2>self</KEYWORD2>
+ <KEYWORD2>super</KEYWORD2>
+
+ <!-- not really keywords, but a different color works well-->
+ <KEYWORD3>isNil</KEYWORD3>
+ <KEYWORD3>not</KEYWORD3>
+
+ <!-- not really -->
+ <LITERAL2>Smalltalk</LITERAL2>
+ <LITERAL2>Transcript</LITERAL2>
+
+ <!-- base classes -->
+ <LITERAL2>Date</LITERAL2>
+ <LITERAL2>Time</LITERAL2>
+ <LITERAL2>Boolean</LITERAL2>
+ <LITERAL2>True</LITERAL2>
+ <LITERAL2>False</LITERAL2>
+ <LITERAL2>Character</LITERAL2>
+ <LITERAL2>String</LITERAL2>
+ <LITERAL2>Array</LITERAL2>
+ <LITERAL2>Symbol</LITERAL2>
+ <LITERAL2>Integer</LITERAL2>
+ <LITERAL2>Object</LITERAL2>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/smarty.xml b/jEdit/modes/smarty.xml
new file mode 100644
index 0000000..2a1e7bc
--- /dev/null
+++ b/jEdit/modes/smarty.xml
@@ -0,0 +1,531 @@
+<?xml version="1.0" ?>
+<!--
+/**
+* @version 2.0.1 (2010-02-08)
+* @author Mads Lie Jensen
+* @author Rowan Collins
+* Improved Smarty highlighting mode, based on http://www.palustris.dk/jedit/smarty.xml
+* and the built-in PHP mode from jEdit 4.3
+* @link http://rwec.co.uk/jedit for documentation and updates
+*/
+
+To install, add this to the "catalog" file:
+<MODE NAME="smarty" FILE="smarty.xml" FILE_NAME_GLOB="*.tpl"></MODE>
+
+You might want to execute these lines of BeanShell code (e.g. with the Utilities->BeanShell menu):
+
+jEdit.setProperty("mode.smarty.sidekick.parser","html");
+jEdit.setProperty("mode.smarty.xml.completion-info",
+"jeditresource:/XML.jar!/xml/completion/html-complete.xml");
+
+to get tag-completion/matching on html in the templates-files if you have the XML-plugin installed
+
+-->
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="{*" />
+ <PROPERTY NAME="commentEnd" VALUE="*}" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>{*</BEGIN>
+ <END>*}</END>
+ </SPAN>
+
+ <!-- Highlight markup other than Smarty inside a {literal} block -->
+ <SPAN TYPE="LITERAL3" DELEGATE="NON_SMARTY">
+ <BEGIN>{LITERAL}</BEGIN>
+ <END>{/LITERAL}</END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="php::PHP" MATCH_TYPE="FUNCTION">
+ <BEGIN>{PHP}</BEGIN>
+ <END>{/PHP}</END>
+ </SPAN>
+
+ <SPAN TYPE="MARKUP" DELEGATE="SMARTY">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1" DELEGATE="COMMENT1+SMARTY">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT_OPENTAG">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- CSS -->
+ <SPAN TYPE="MARKUP" DELEGATE="CSS_OPENTAG">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- HTML tags -->
+ <SEQ_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="TAGS"></?\w+</SEQ_REGEXP>
+
+ <IMPORT DELEGATE="NON_SMARTY" />
+ </RULES>
+
+ <RULES SET="NON_SMARTY" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN_REGEXP HASH_CHAR="<SCRIPT" TYPE="MARKUP" DELEGATE="javascript::MAIN">
+ <BEGIN><SCRIPT.*?></BEGIN>
+ <END></SCRIPT></END>
+ </SPAN_REGEXP>
+
+ <!-- CSS -->
+ <SPAN_REGEXP HASH_CHAR="<STYLE" TYPE="MARKUP" DELEGATE="css::MAIN">
+ <BEGIN><STYLE.*?></BEGIN>
+ <END></STYLE></END>
+ </SPAN_REGEXP>
+
+ <!-- HTML tags -->
+ <SEQ_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="html::TAGS"></?\w+</SEQ_REGEXP>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ </RULES>
+
+ <!-- HTML tags (from MAIN rule) -->
+ <RULES SET="TAGS" DEFAULT="MARKUP" ESCAPE="\">
+ <SEQ TYPE="MARKUP" DELEGATE="MAIN">></SEQ><!-- from SEQ_REGEXP delegate -->
+
+ <SPAN_REGEXP AT_WORD_START="TRUE" TYPE="MARKUP" DELEGATE="CSS_PROPERTIES+SMARTY" HASH_CHAR="style">
+ <BEGIN>style\s*=\s*(["'])</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+
+ <IMPORT DELEGATE="TO_LITERAL+SMARTY" />
+ <IMPORT DELEGATE="TO_SMARTY" />
+ <IMPORT DELEGATE="INVALID_LT" />
+ <IMPORT DELEGATE="html::TAGS" />
+ </RULES>
+
+ <!-- Handle literals, but allow switching to SMARTY therein, e.g. from html TAGS -->
+ <RULES SET="TO_LITERAL+SMARTY">
+ <SPAN TYPE="LITERAL1" DELEGATE="LITERAL1+SMARTY">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL2" DELEGATE="LITERAL2+SMARTY">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <IMPORT DELEGATE="TO_SMARTY"/>
+ </RULES>
+
+ <!-- Handle SMARTY tags in LITERAL1, e.g. in the "type" attribute of a <SCRIPT> tag -->
+ <RULES SET="LITERAL1+SMARTY" DEFAULT="LITERAL1" ESCAPE="\">
+ <IMPORT DELEGATE="TO_SMARTY"/>
+ </RULES>
+
+ <!-- Handle SMARTY tags in LITERAL2, e.g. in the "type" attribute of a <SCRIPT> tag -->
+ <RULES SET="LITERAL2+SMARTY" DEFAULT="LITERAL2" ESCAPE="\">
+ <IMPORT DELEGATE="TO_SMARTY"/>
+ </RULES>
+
+ <!-- Handle Smarty tags in HTML comments -->
+ <RULES SET="COMMENT1+SMARTY" DEFAULT="COMMENT1">
+ <IMPORT DELEGATE="TO_SMARTY"/>
+ </RULES>
+
+ <!-- Go to SMARTY mode again -->
+ <RULES SET="TO_SMARTY" DEFAULT="MARKUP">
+ <SPAN TYPE="MARKUP" DELEGATE="SMARTY">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="INVALID_LT" DEFAULT="INVALID">
+ <SEQ TYPE="INVALID"><</SEQ>
+ </RULES>
+
+
+
+ <!-- CSS where SMARTY code may be injected -->
+ <RULES SET="CSS_OPENTAG" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="CSS+SMARTY">></SEQ>
+
+ <IMPORT DELEGATE="TO_LITERAL+SMARTY"/>
+ </RULES>
+
+ <RULES SET="CSS+SMARTY" DEFAULT="MARKUP">
+ <!-- Hacky support for highlighting of CSS not inside a {literal} block -->
+ <SPAN TYPE="FUNCTION" DELEGATE="CSS_PROPERTIES+SMARTY">
+ <BEGIN>{ldelim}</BEGIN>
+ <END>{rdelim}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD3" DELEGATE="CSS_PROPERTIES+SMARTY">
+ <BEGIN>{$smarty.ldelim}</BEGIN>
+ <END>{$smarty.rdelim}</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR" DELEGATE="CSS_PSEUDO">:</SEQ>
+
+ <IMPORT DELEGATE="TO_SMARTY"/>
+ <IMPORT DELEGATE="css::MAIN"/>
+ </RULES>
+ <RULES SET="CSS_PROPERTIES+SMARTY" ESCAPE="\">
+ <SEQ TYPE="OPERATOR" DELEGATE="CSS_PROP_VALUE+SMARTY">:</SEQ>
+
+ <IMPORT DELEGATE="TO_SMARTY"/>
+ <IMPORT DELEGATE="css::PROPERTIES"/>
+ </RULES>
+ <RULES SET="CSS_PROP_VALUE+SMARTY"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="-?\d+(\.\d+)?(pt|pc|in|mm|cm|em|ex|px|ms|s|%|)"
+ NO_WORD_SEP="-_%">
+
+ <SEQ TYPE="OPERATOR" DELEGATE="CSS_PROPERTIES+SMARTY">;</SEQ>
+ <SEQ TYPE="INVALID" DELEGATE="CSS+SMARTY">}</SEQ> <!-- end properties block, but it's invalid -->
+
+ <IMPORT DELEGATE="TO_SMARTY"/>
+ <IMPORT DELEGATE="css::PROP_VALUE"/>
+ </RULES>
+ <!-- Pseudo-classes like ":active" are handled specially in the CSS mode -->
+ <RULES SET="CSS_PSEUDO">
+ <SEQ TYPE="NULL" DELEGATE="CSS+SMARTY"> </SEQ>
+ <SEQ TYPE="OPERATOR" DELEGATE="CSS+SMARTY">,</SEQ>
+
+ <SPAN TYPE="FUNCTION" DELEGATE="CSS_PROPERTIES+SMARTY">
+ <BEGIN>{ldelim}</BEGIN>
+ <END>{rdelim}</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD3" DELEGATE="CSS_PROPERTIES+SMARTY">
+ <BEGIN>{$smarty.ldelim}</BEGIN>
+ <END>{$smarty.rdelim}</END>
+ </SPAN>
+
+ <IMPORT DELEGATE="TO_SMARTY"/>
+ <IMPORT DELEGATE="css::PSEUDO"/>
+ </RULES>
+
+ <!-- Javascript -->
+ <RULES SET="JAVASCRIPT_OPENTAG" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="JAVASCRIPT">></SEQ>
+ <IMPORT DELEGATE="TO_LITERAL+SMARTY"/> <!-- handle SMARTY in <script> tag -->
+ <IMPORT DELEGATE="html::TAGS" /> <!-- handle e.g. 'style="width:1px"' -->
+ </RULES>
+
+ <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" ESCAPE="\">
+ <IMPORT DELEGATE="TO_LITERAL+SMARTY"/>
+ <IMPORT DELEGATE="TO_SMARTY"/>
+ <IMPORT DELEGATE="javascript::MAIN"/>
+ </RULES>
+
+
+
+ <RULES DEFAULT="LITERAL2" SET="DOUBLE_QUOTED" IGNORE_CASE="TRUE">
+ <SPAN TYPE="LITERAL2" DELEGATE="BACK_TICKED">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <IMPORT DELEGATE="VARIABLES" />
+ </RULES>
+
+ <RULES DEFAULT="LITERAL2" SET="BACK_TICKED" IGNORE_CASE="TRUE">
+ <IMPORT DELEGATE="VARIABLES" />
+ <IMPORT DELEGATE="MATH_OPERATORS" />
+ </RULES>
+
+
+ <RULES SET="VARIABLES">
+ <MARK_FOLLOWING TYPE="KEYWORD3">$</MARK_FOLLOWING>
+ </RULES>
+
+ <RULES SET="MATH_OPERATORS" IGNORE_CASE="TRUE">
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">-></SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ </RULES>
+
+ <RULES SET="LOGIC_OPERATORS" IGNORE_CASE="TRUE">
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <KEYWORDS>
+ <OPERATOR>!=</OPERATOR>
+ <OPERATOR>></OPERATOR>
+ <OPERATOR>>=</OPERATOR>
+ <OPERATOR><</OPERATOR>
+ <OPERATOR><=</OPERATOR>
+
+ <OPERATOR>==</OPERATOR>
+
+ <OPERATOR>div by </OPERATOR>
+ <OPERATOR>even by </OPERATOR>
+ <OPERATOR>is even </OPERATOR>
+ <OPERATOR>is not even </OPERATOR>
+ <OPERATOR>is not odd </OPERATOR>
+ <OPERATOR>is odd </OPERATOR>
+ <OPERATOR>odd by </OPERATOR>
+
+ <OPERATOR>eq</OPERATOR>
+ <OPERATOR>ge</OPERATOR>
+ <OPERATOR>gt</OPERATOR>
+ <OPERATOR>gte</OPERATOR>
+ <OPERATOR>le</OPERATOR>
+ <OPERATOR>lt</OPERATOR>
+ <OPERATOR>lte</OPERATOR>
+ <OPERATOR>mod</OPERATOR>
+ <OPERATOR>ne</OPERATOR>
+ <OPERATOR>neq</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+ </KEYWORDS>
+ </RULES>
+
+
+ <RULES SET="SMARTY" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" DEFAULT="LITERAL1">
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL2" DELEGATE="DOUBLE_QUOTED">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- Variables from config-files -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>#</BEGIN>
+ <END>#</END>
+ </SPAN>
+
+ <IMPORT DELEGATE="VARIABLES" />
+ <IMPORT DELEGATE="MATH_OPERATORS" />
+ <IMPORT DELEGATE="LOGIC_OPERATORS" />
+
+ <KEYWORDS>
+
+ <!-- Built-in functions (in order of documentation) -->
+ <FUNCTION>capture</FUNCTION>
+ <FUNCTION>/capture</FUNCTION>
+ <FUNCTION>config_load</FUNCTION>
+ <FUNCTION>foreach</FUNCTION>
+ <FUNCTION>foreachelse</FUNCTION>
+ <FUNCTION>/foreach</FUNCTION>
+ <FUNCTION>if</FUNCTION>
+ <FUNCTION>else</FUNCTION>
+ <FUNCTION>elseif</FUNCTION>
+ <FUNCTION>/if</FUNCTION>
+ <FUNCTION>include</FUNCTION>
+ <FUNCTION>include_php</FUNCTION>
+ <FUNCTION>insert</FUNCTION>
+ <FUNCTION>ldelim</FUNCTION>
+ <FUNCTION>rdelim</FUNCTION>
+ <!-- {literal} is handled specially -->
+ <!-- {php} is handled specially -->
+ <FUNCTION>section</FUNCTION>
+ <FUNCTION>sectionelse</FUNCTION>
+ <FUNCTION>/section</FUNCTION>
+ <FUNCTION>strip</FUNCTION>
+ <FUNCTION>/strip</FUNCTION>
+
+ <!-- Default custom functions -->
+ <FUNCTION>assign</FUNCTION>
+ <FUNCTION>counter</FUNCTION>
+ <FUNCTION>cycle</FUNCTION>
+ <FUNCTION>debug</FUNCTION>
+ <FUNCTION>eval</FUNCTION>
+ <FUNCTION>fetch</FUNCTION>
+ <FUNCTION>html_checkboxes</FUNCTION>
+ <FUNCTION>html_image</FUNCTION>
+ <FUNCTION>html_options</FUNCTION>
+ <FUNCTION>html_radios</FUNCTION>
+ <FUNCTION>html_select_date</FUNCTION>
+ <FUNCTION>html_select_time</FUNCTION>
+ <FUNCTION>html_table</FUNCTION>
+ <FUNCTION>mailto</FUNCTION>
+ <FUNCTION>math</FUNCTION>
+ <FUNCTION>popup</FUNCTION>
+ <FUNCTION>popup_init</FUNCTION>
+ <FUNCTION>textformat</FUNCTION>
+ <FUNCTION>/textformat</FUNCTION>
+
+ <!--
+ Variable modifiers
+ 'strip' is used in Smarty as both a variable modifier and a function.
+ I have them listed as both, but it will only be recognised as one of these possibilities.
+ At time of writing this is the last entry, ie. a KEYWORD1
+ -->
+ <KEYWORD1>capitalize</KEYWORD1>
+ <KEYWORD1>cat</KEYWORD1>
+ <KEYWORD1>count_characters</KEYWORD1>
+ <KEYWORD1>count_paragraphs</KEYWORD1>
+ <KEYWORD1>count_sentences</KEYWORD1>
+ <KEYWORD1>count_words</KEYWORD1>
+ <KEYWORD1>date_format</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>escape</KEYWORD1>
+ <KEYWORD1>indent</KEYWORD1>
+ <KEYWORD1>lower</KEYWORD1>
+ <KEYWORD1>nl2br</KEYWORD1>
+ <KEYWORD1>regex_replace</KEYWORD1>
+ <KEYWORD1>replace</KEYWORD1>
+ <KEYWORD1>spacify</KEYWORD1>
+ <KEYWORD1>string_format</KEYWORD1>
+ <KEYWORD1>strip</KEYWORD1>
+ <KEYWORD1>strip_tags</KEYWORD1>
+ <KEYWORD1>truncate</KEYWORD1>
+ <KEYWORD1>upper</KEYWORD1>
+ <KEYWORD1>wordwrap</KEYWORD1>
+
+ <!-- attributes for Smarty built-in and custom functions -->
+ <KEYWORD3>above</KEYWORD3>
+ <KEYWORD3>advance</KEYWORD3>
+ <KEYWORD3>all_extra</KEYWORD3>
+ <KEYWORD3>assign</KEYWORD3>
+ <KEYWORD3>autostatus</KEYWORD3>
+ <KEYWORD3>autostatuscap</KEYWORD3>
+ <KEYWORD3>background</KEYWORD3>
+ <KEYWORD3>below</KEYWORD3>
+ <KEYWORD3>bgbackground</KEYWORD3>
+ <KEYWORD3>bgcolor</KEYWORD3>
+ <KEYWORD3>border</KEYWORD3>
+ <KEYWORD3>caparray</KEYWORD3>
+ <KEYWORD3>capcolor</KEYWORD3>
+ <KEYWORD3>capicon</KEYWORD3>
+ <KEYWORD3>caption</KEYWORD3>
+ <KEYWORD3>captionfont</KEYWORD3>
+ <KEYWORD3>captionsize</KEYWORD3>
+ <KEYWORD3>center</KEYWORD3>
+ <KEYWORD3>closecolor</KEYWORD3>
+ <KEYWORD3>closefont</KEYWORD3>
+ <KEYWORD3>closesize</KEYWORD3>
+ <KEYWORD3>closetext</KEYWORD3>
+ <KEYWORD3>day_extra</KEYWORD3>
+ <KEYWORD3>day_format</KEYWORD3>
+ <KEYWORD3>day_size</KEYWORD3>
+ <KEYWORD3>delay</KEYWORD3>
+ <KEYWORD3>delimiter</KEYWORD3>
+ <KEYWORD3>direction</KEYWORD3>
+ <KEYWORD3>display_days</KEYWORD3>
+ <KEYWORD3>display_hours</KEYWORD3>
+ <KEYWORD3>display_meridian</KEYWORD3>
+ <KEYWORD3>display_minutes</KEYWORD3>
+ <KEYWORD3>display_months</KEYWORD3>
+ <KEYWORD3>display_seconds</KEYWORD3>
+ <KEYWORD3>display_years</KEYWORD3>
+ <KEYWORD3>end_year</KEYWORD3>
+ <KEYWORD3>equation</KEYWORD3>
+ <KEYWORD3>fgbackground</KEYWORD3>
+ <KEYWORD3>fgcolor</KEYWORD3>
+ <KEYWORD3>field_array</KEYWORD3>
+ <KEYWORD3>field_order</KEYWORD3>
+ <KEYWORD3>field_separator</KEYWORD3>
+ <KEYWORD3>file</KEYWORD3>
+ <KEYWORD3>fixx</KEYWORD3>
+ <KEYWORD3>fixy</KEYWORD3>
+ <KEYWORD3>format</KEYWORD3>
+ <KEYWORD3>frame</KEYWORD3>
+ <KEYWORD3>from</KEYWORD3>
+ <KEYWORD3>fullhtml</KEYWORD3>
+ <KEYWORD3>hauto</KEYWORD3>
+ <KEYWORD3>height</KEYWORD3>
+ <KEYWORD3>hour_extra</KEYWORD3>
+ <KEYWORD3>inarray</KEYWORD3>
+ <KEYWORD3>indent</KEYWORD3>
+ <KEYWORD3>indent_char</KEYWORD3>
+ <KEYWORD3>indent_first</KEYWORD3>
+ <KEYWORD3>item</KEYWORD3>
+ <KEYWORD3>key</KEYWORD3>
+ <KEYWORD3>left</KEYWORD3>
+ <KEYWORD3>loop</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>meridian_extra</KEYWORD3>
+ <KEYWORD3>minute_extra</KEYWORD3>
+ <KEYWORD3>minute_interval</KEYWORD3>
+ <KEYWORD3>month_extra</KEYWORD3>
+ <KEYWORD3>month_format</KEYWORD3>
+ <KEYWORD3>month_size</KEYWORD3>
+ <KEYWORD3>month_value_format</KEYWORD3>
+ <KEYWORD3>name</KEYWORD3>
+ <KEYWORD3>noclose</KEYWORD3>
+ <KEYWORD3>offsetx</KEYWORD3>
+ <KEYWORD3>offsety</KEYWORD3>
+ <KEYWORD3>once</KEYWORD3>
+ <KEYWORD3>options</KEYWORD3>
+ <KEYWORD3>output</KEYWORD3>
+ <KEYWORD3>padx</KEYWORD3>
+ <KEYWORD3>pady</KEYWORD3>
+ <KEYWORD3>prefix</KEYWORD3>
+ <KEYWORD3>print</KEYWORD3>
+ <KEYWORD3>reverse_years</KEYWORD3>
+ <KEYWORD3>right</KEYWORD3>
+ <KEYWORD3>scope</KEYWORD3>
+ <KEYWORD3>script</KEYWORD3>
+ <KEYWORD3>second_extra</KEYWORD3>
+ <KEYWORD3>second_interval</KEYWORD3>
+ <KEYWORD3>section</KEYWORD3>
+ <KEYWORD3>selected</KEYWORD3>
+ <KEYWORD3>show</KEYWORD3>
+ <KEYWORD3>skip</KEYWORD3>
+ <KEYWORD3>snapx</KEYWORD3>
+ <KEYWORD3>snapy</KEYWORD3>
+ <KEYWORD3>start</KEYWORD3>
+ <KEYWORD3>start_year</KEYWORD3>
+ <KEYWORD3>status</KEYWORD3>
+ <KEYWORD3>step</KEYWORD3>
+ <KEYWORD3>sticky</KEYWORD3>
+ <KEYWORD3>stop</KEYWORD3>
+ <KEYWORD3>style</KEYWORD3>
+ <KEYWORD3>text</KEYWORD3>
+ <KEYWORD3>textcolor</KEYWORD3>
+ <KEYWORD3>textfont</KEYWORD3>
+ <KEYWORD3>textsize</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>timeout</KEYWORD3>
+ <KEYWORD3>trigger</KEYWORD3>
+ <KEYWORD3>use_24_hours</KEYWORD3>
+ <KEYWORD3>value</KEYWORD3>
+ <KEYWORD3>values</KEYWORD3>
+ <KEYWORD3>var</KEYWORD3>
+ <KEYWORD3>vauto</KEYWORD3>
+ <KEYWORD3>width</KEYWORD3>
+ <KEYWORD3>wrap</KEYWORD3>
+ <KEYWORD3>wrap_char</KEYWORD3>
+ <KEYWORD3>wrap_cut</KEYWORD3>
+ <KEYWORD3>year_as_text</KEYWORD3>
+ <KEYWORD3>year_extra</KEYWORD3>
+ <KEYWORD3>year_size</KEYWORD3>
+
+ </KEYWORDS>
+
+ </RULES>
+
+</MODE>
+
+
diff --git a/jEdit/modes/smi-mib.xml b/jEdit/modes/smi-mib.xml
index ed8982e..90ce64e 100644
--- a/jEdit/modes/smi-mib.xml
+++ b/jEdit/modes/smi-mib.xml
@@ -1,131 +1,131 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- SMI MIB mode by Scott Allen (scotta at idirect.com)
- For "Structure of Management Information" version 2 (SMIv2)
- "Management Information Base" (MIB) modules as used by the
- "Simple Network Management Protocol" (SNMP).
-
- As per RFC's 2578, 2579 and 2580
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="--" />
-
- <PROPERTY NAME="noWordSep" VALUE="-_" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="unindentNextLines" VALUE=".*::=\s*\{.*\}\s*$" />
- <PROPERTY NAME="indentNextLines"
- VALUE=".*(::=|AGENT-CAPABILITIES|DESCRIPTION|IMPORTS|MODULE-COMPLIANCE|MODULE-IDENTITY|NOTIFICATION-GROUP|NOTIFICATION-TYPE|OBJECT-GROUP|OBJECT-IDENTITY|OBJECT-TYPE|TEXTUAL-CONVENTION)\s*$" />
- </PROPS>
-
- <RULES
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE">
-
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">::=</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
-
- <SEQ TYPE="KEYWORD2">OBJECT IDENTIFIER</SEQ>
- <SEQ TYPE="KEYWORD2">SEQUENCE OF</SEQ>
- <SEQ TYPE="KEYWORD2">OCTET STRING</SEQ>
-
- <KEYWORDS>
- <FUNCTION>AGENT-CAPABILITIES</FUNCTION>
- <FUNCTION>BEGIN</FUNCTION>
- <FUNCTION>END</FUNCTION>
- <FUNCTION>FROM</FUNCTION>
- <FUNCTION>IMPORTS</FUNCTION>
- <FUNCTION>MODULE-COMPLIANCE</FUNCTION>
- <FUNCTION>MODULE-IDENTITY</FUNCTION>
- <FUNCTION>NOTIFICATION-GROUP</FUNCTION>
- <FUNCTION>NOTIFICATION-TYPE</FUNCTION>
- <FUNCTION>OBJECT-GROUP</FUNCTION>
- <FUNCTION>OBJECT-IDENTITY</FUNCTION>
- <FUNCTION>OBJECT-TYPE</FUNCTION>
- <FUNCTION>TEXTUAL-CONVENTION</FUNCTION>
-
- <KEYWORD1>ACCESS</KEYWORD1>
- <KEYWORD1>AUGMENTS</KEYWORD1>
- <KEYWORD1>CONTACT-INFO</KEYWORD1>
- <KEYWORD1>CREATION-REQUIRES</KEYWORD1>
- <KEYWORD1>DEFINITIONS</KEYWORD1>
- <KEYWORD1>DEFVAL</KEYWORD1>
- <KEYWORD1>DESCRIPTION</KEYWORD1>
- <KEYWORD1>DISPLAY-HINT</KEYWORD1>
- <KEYWORD1>GROUP</KEYWORD1>
- <KEYWORD1>INCLUDES</KEYWORD1>
- <KEYWORD1>INDEX</KEYWORD1>
- <KEYWORD1>LAST-UPDATED</KEYWORD1>
- <KEYWORD1>MANDATORY-GROUPS</KEYWORD1>
- <KEYWORD1>MAX-ACCESS</KEYWORD1>
- <KEYWORD1>MIN-ACCESS</KEYWORD1>
- <KEYWORD1>MODULE</KEYWORD1>
- <KEYWORD1>NOTIFICATIONS</KEYWORD1>
- <KEYWORD1>OBJECT</KEYWORD1>
- <KEYWORD1>OBJECTS</KEYWORD1>
- <KEYWORD1>ORGANIZATION</KEYWORD1>
- <KEYWORD1>PRODUCT-RELEASE</KEYWORD1>
- <KEYWORD1>REFERENCE</KEYWORD1>
- <KEYWORD1>REVISION</KEYWORD1>
- <KEYWORD1>STATUS</KEYWORD1>
- <KEYWORD1>SYNTAX</KEYWORD1>
- <KEYWORD1>SUPPORTS</KEYWORD1>
- <KEYWORD1>UNITS</KEYWORD1>
- <KEYWORD1>VARIATION</KEYWORD1>
- <KEYWORD1>WRITE-SYNTAX</KEYWORD1>
-
- <KEYWORD2>AutonomousType</KEYWORD2>
- <KEYWORD2>BITS</KEYWORD2>
- <KEYWORD2>Counter32</KEYWORD2>
- <KEYWORD2>Counter64</KEYWORD2>
- <KEYWORD2>DateAndTime</KEYWORD2>
- <KEYWORD2>DisplayString</KEYWORD2>
- <KEYWORD2>Gauge32</KEYWORD2>
- <KEYWORD2>InstancePointer</KEYWORD2>
- <KEYWORD2>INTEGER</KEYWORD2>
- <KEYWORD2>Integer32</KEYWORD2>
- <KEYWORD2>IpAddress</KEYWORD2>
- <KEYWORD2>MacAddress</KEYWORD2>
- <KEYWORD2>Opaque</KEYWORD2>
- <KEYWORD2>PhysAddress</KEYWORD2>
- <KEYWORD2>RowPointer</KEYWORD2>
- <KEYWORD2>RowStatus</KEYWORD2>
- <KEYWORD2>SEQUENCE</KEYWORD2>
- <KEYWORD2>TAddress</KEYWORD2>
- <KEYWORD2>TDomain</KEYWORD2>
- <KEYWORD2>TestAndIncr</KEYWORD2>
- <KEYWORD2>TimeInterval</KEYWORD2>
- <KEYWORD2>TimeStamp</KEYWORD2>
- <KEYWORD2>TimeTicks</KEYWORD2>
- <KEYWORD2>TruthValue</KEYWORD2>
- <KEYWORD2>StorageType</KEYWORD2>
- <KEYWORD2>Unsigned32</KEYWORD2>
- <KEYWORD2>VariablePointer</KEYWORD2>
-
- <KEYWORD3>accessible-for-notify</KEYWORD3>
- <KEYWORD3>current</KEYWORD3>
- <KEYWORD3>deprecated</KEYWORD3>
- <KEYWORD3>not-accessible</KEYWORD3>
- <KEYWORD3>obsolete</KEYWORD3>
- <KEYWORD3>read-create</KEYWORD3>
- <KEYWORD3>read-only</KEYWORD3>
- <KEYWORD3>read-write</KEYWORD3>
- <KEYWORD3>SIZE</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ SMI MIB mode by Scott Allen (scotta at idirect.com)
+ For "Structure of Management Information" version 2 (SMIv2)
+ "Management Information Base" (MIB) modules as used by the
+ "Simple Network Management Protocol" (SNMP).
+
+ As per RFC's 2578, 2579 and 2580
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="--" />
+
+ <PROPERTY NAME="noWordSep" VALUE="-_" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="unindentNextLines" VALUE=".*::=\s*\{.*\}\s*$" />
+ <PROPERTY NAME="indentNextLines"
+ VALUE=".*(::=|AGENT-CAPABILITIES|DESCRIPTION|IMPORTS|MODULE-COMPLIANCE|MODULE-IDENTITY|NOTIFICATION-GROUP|NOTIFICATION-TYPE|OBJECT-GROUP|OBJECT-IDENTITY|OBJECT-TYPE|TEXTUAL-CONVENTION)\s*$" />
+ </PROPS>
+
+ <RULES
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE">
+
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">::=</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+
+ <SEQ TYPE="KEYWORD2">OBJECT IDENTIFIER</SEQ>
+ <SEQ TYPE="KEYWORD2">SEQUENCE OF</SEQ>
+ <SEQ TYPE="KEYWORD2">OCTET STRING</SEQ>
+
+ <KEYWORDS>
+ <FUNCTION>AGENT-CAPABILITIES</FUNCTION>
+ <FUNCTION>BEGIN</FUNCTION>
+ <FUNCTION>END</FUNCTION>
+ <FUNCTION>FROM</FUNCTION>
+ <FUNCTION>IMPORTS</FUNCTION>
+ <FUNCTION>MODULE-COMPLIANCE</FUNCTION>
+ <FUNCTION>MODULE-IDENTITY</FUNCTION>
+ <FUNCTION>NOTIFICATION-GROUP</FUNCTION>
+ <FUNCTION>NOTIFICATION-TYPE</FUNCTION>
+ <FUNCTION>OBJECT-GROUP</FUNCTION>
+ <FUNCTION>OBJECT-IDENTITY</FUNCTION>
+ <FUNCTION>OBJECT-TYPE</FUNCTION>
+ <FUNCTION>TEXTUAL-CONVENTION</FUNCTION>
+
+ <KEYWORD1>ACCESS</KEYWORD1>
+ <KEYWORD1>AUGMENTS</KEYWORD1>
+ <KEYWORD1>CONTACT-INFO</KEYWORD1>
+ <KEYWORD1>CREATION-REQUIRES</KEYWORD1>
+ <KEYWORD1>DEFINITIONS</KEYWORD1>
+ <KEYWORD1>DEFVAL</KEYWORD1>
+ <KEYWORD1>DESCRIPTION</KEYWORD1>
+ <KEYWORD1>DISPLAY-HINT</KEYWORD1>
+ <KEYWORD1>GROUP</KEYWORD1>
+ <KEYWORD1>INCLUDES</KEYWORD1>
+ <KEYWORD1>INDEX</KEYWORD1>
+ <KEYWORD1>LAST-UPDATED</KEYWORD1>
+ <KEYWORD1>MANDATORY-GROUPS</KEYWORD1>
+ <KEYWORD1>MAX-ACCESS</KEYWORD1>
+ <KEYWORD1>MIN-ACCESS</KEYWORD1>
+ <KEYWORD1>MODULE</KEYWORD1>
+ <KEYWORD1>NOTIFICATIONS</KEYWORD1>
+ <KEYWORD1>OBJECT</KEYWORD1>
+ <KEYWORD1>OBJECTS</KEYWORD1>
+ <KEYWORD1>ORGANIZATION</KEYWORD1>
+ <KEYWORD1>PRODUCT-RELEASE</KEYWORD1>
+ <KEYWORD1>REFERENCE</KEYWORD1>
+ <KEYWORD1>REVISION</KEYWORD1>
+ <KEYWORD1>STATUS</KEYWORD1>
+ <KEYWORD1>SYNTAX</KEYWORD1>
+ <KEYWORD1>SUPPORTS</KEYWORD1>
+ <KEYWORD1>UNITS</KEYWORD1>
+ <KEYWORD1>VARIATION</KEYWORD1>
+ <KEYWORD1>WRITE-SYNTAX</KEYWORD1>
+
+ <KEYWORD2>AutonomousType</KEYWORD2>
+ <KEYWORD2>BITS</KEYWORD2>
+ <KEYWORD2>Counter32</KEYWORD2>
+ <KEYWORD2>Counter64</KEYWORD2>
+ <KEYWORD2>DateAndTime</KEYWORD2>
+ <KEYWORD2>DisplayString</KEYWORD2>
+ <KEYWORD2>Gauge32</KEYWORD2>
+ <KEYWORD2>InstancePointer</KEYWORD2>
+ <KEYWORD2>INTEGER</KEYWORD2>
+ <KEYWORD2>Integer32</KEYWORD2>
+ <KEYWORD2>IpAddress</KEYWORD2>
+ <KEYWORD2>MacAddress</KEYWORD2>
+ <KEYWORD2>Opaque</KEYWORD2>
+ <KEYWORD2>PhysAddress</KEYWORD2>
+ <KEYWORD2>RowPointer</KEYWORD2>
+ <KEYWORD2>RowStatus</KEYWORD2>
+ <KEYWORD2>SEQUENCE</KEYWORD2>
+ <KEYWORD2>TAddress</KEYWORD2>
+ <KEYWORD2>TDomain</KEYWORD2>
+ <KEYWORD2>TestAndIncr</KEYWORD2>
+ <KEYWORD2>TimeInterval</KEYWORD2>
+ <KEYWORD2>TimeStamp</KEYWORD2>
+ <KEYWORD2>TimeTicks</KEYWORD2>
+ <KEYWORD2>TruthValue</KEYWORD2>
+ <KEYWORD2>StorageType</KEYWORD2>
+ <KEYWORD2>Unsigned32</KEYWORD2>
+ <KEYWORD2>VariablePointer</KEYWORD2>
+
+ <KEYWORD3>accessible-for-notify</KEYWORD3>
+ <KEYWORD3>current</KEYWORD3>
+ <KEYWORD3>deprecated</KEYWORD3>
+ <KEYWORD3>not-accessible</KEYWORD3>
+ <KEYWORD3>obsolete</KEYWORD3>
+ <KEYWORD3>read-create</KEYWORD3>
+ <KEYWORD3>read-only</KEYWORD3>
+ <KEYWORD3>read-write</KEYWORD3>
+ <KEYWORD3>SIZE</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/splus.xml b/jEdit/modes/splus.xml
index 8d3e253..8cfd3f0 100644
--- a/jEdit/modes/splus.xml
+++ b/jEdit/modes/splus.xml
@@ -1,81 +1,81 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="wordBreakChars" VALUE="_,+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">_</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><-</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
- MATCH_TYPE="OPERATOR"
- TYPE="LABEL">:</MARK_PREVIOUS>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>sizeof</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <KEYWORD1>function</KEYWORD1>
-
- <LITERAL2>T</LITERAL2>
- <LITERAL2>F</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="wordBreakChars" VALUE="_,+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">_</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><-</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
+ MATCH_TYPE="OPERATOR"
+ TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>sizeof</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <KEYWORD1>function</KEYWORD1>
+
+ <LITERAL2>T</LITERAL2>
+ <LITERAL2>F</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/sql-loader.xml b/jEdit/modes/sql-loader.xml
index ae62fc3..43b3be5 100644
--- a/jEdit/modes/sql-loader.xml
+++ b/jEdit/modes/sql-loader.xml
@@ -1,122 +1,122 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN DELEGATE="pl-sql::MAIN">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR">!></SEQ>
- <SEQ TYPE="OPERATOR">!<</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
-
- <KEYWORDS>
- <!-- reserved words -->
- <KEYWORD1>LOAD</KEYWORD1>
- <KEYWORD1>DATA</KEYWORD1>
- <KEYWORD1>INFILE</KEYWORD1>
- <KEYWORD1>BADFILE</KEYWORD1>
- <KEYWORD1>DISCARDFILE</KEYWORD1>
- <KEYWORD1>INTO</KEYWORD1>
- <KEYWORD1>TABLE</KEYWORD1>
- <KEYWORD1>FIELDS</KEYWORD1>
- <KEYWORD1>TERMINATED</KEYWORD1>
- <KEYWORD1>BY</KEYWORD1>
- <KEYWORD1>OPTIONALLY</KEYWORD1>
- <KEYWORD1>ENCLOSED</KEYWORD1>
- <KEYWORD1>EXTERNAL</KEYWORD1>
- <KEYWORD1>TRAILING</KEYWORD1>
- <KEYWORD1>NULLCOLS</KEYWORD1>
- <KEYWORD1>NULLIF</KEYWORD1>
- <KEYWORD1>DATA</KEYWORD1>
- <KEYWORD1>BLANKS</KEYWORD1>
- <KEYWORD1>INSERT</KEYWORD1>
- <KEYWORD1>INTO</KEYWORD1>
- <KEYWORD1>POSITION</KEYWORD1>
- <KEYWORD1>WHEN</KEYWORD1>
- <KEYWORD1>APPEND</KEYWORD1>
- <KEYWORD1>REPLACE</KEYWORD1>
- <KEYWORD1>EOF</KEYWORD1>
- <KEYWORD1>LOBFILE</KEYWORD1>
- <KEYWORD1>TRUNCATE</KEYWORD1>
- <KEYWORD1>COLUMN</KEYWORD1>
-
- <!--function-->
- <KEYWORD1>COUNT</KEYWORD1>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>SDF</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>SYSDATE</KEYWORD1>
-
- <!-- data types -->
- <KEYWORD1>binary</KEYWORD1>
- <KEYWORD1>bit</KEYWORD1>
- <KEYWORD1>blob</KEYWORD1>
- <KEYWORD1>boolean</KEYWORD1>
- <KEYWORD1>char</KEYWORD1>
- <KEYWORD1>character</KEYWORD1>
- <KEYWORD1>constant</KEYWORD1>
- <KEYWORD1>date</KEYWORD1>
- <KEYWORD1>datetime</KEYWORD1>
- <KEYWORD1>decimal</KEYWORD1>
- <KEYWORD1>double</KEYWORD1>
- <KEYWORD1>filler</KEYWORD1>
- <KEYWORD1>float</KEYWORD1>
- <KEYWORD1>image</KEYWORD1>
- <KEYWORD1>int</KEYWORD1>
- <KEYWORD1>integer</KEYWORD1>
- <KEYWORD1>money</KEYWORD1>
- <!-- KEYWORD1>name</KEYWORD1 -->
- <KEYWORD1>numeric</KEYWORD1>
- <KEYWORD1>nchar</KEYWORD1>
- <KEYWORD1>nvarchar</KEYWORD1>
- <KEYWORD1>ntext</KEYWORD1>
- <KEYWORD1>object</KEYWORD1>
- <KEYWORD1>pls_integer</KEYWORD1>
- <KEYWORD1>raw</KEYWORD1>
- <KEYWORD1>real</KEYWORD1>
- <KEYWORD1>smalldatetime</KEYWORD1>
- <KEYWORD1>smallint</KEYWORD1>
- <KEYWORD1>smallmoney</KEYWORD1>
- <KEYWORD1>sequence</KEYWORD1>
- <KEYWORD1>text</KEYWORD1>
- <KEYWORD1>timestamp</KEYWORD1>
- <KEYWORD1>tinyint</KEYWORD1>
- <KEYWORD1>uniqueidentifier</KEYWORD1>
- <KEYWORD1>varbinary</KEYWORD1>
- <KEYWORD1>varchar</KEYWORD1>
- <KEYWORD1>varchar2</KEYWORD1>
- <KEYWORD1>varray</KEYWORD1>
- <KEYWORD1>zoned</KEYWORD1>
- </KEYWORDS>
- </RULES>
-</MODE>
-
-
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN DELEGATE="pl-sql::MAIN">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">!></SEQ>
+ <SEQ TYPE="OPERATOR">!<</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+
+ <KEYWORDS>
+ <!-- reserved words -->
+ <KEYWORD1>LOAD</KEYWORD1>
+ <KEYWORD1>DATA</KEYWORD1>
+ <KEYWORD1>INFILE</KEYWORD1>
+ <KEYWORD1>BADFILE</KEYWORD1>
+ <KEYWORD1>DISCARDFILE</KEYWORD1>
+ <KEYWORD1>INTO</KEYWORD1>
+ <KEYWORD1>TABLE</KEYWORD1>
+ <KEYWORD1>FIELDS</KEYWORD1>
+ <KEYWORD1>TERMINATED</KEYWORD1>
+ <KEYWORD1>BY</KEYWORD1>
+ <KEYWORD1>OPTIONALLY</KEYWORD1>
+ <KEYWORD1>ENCLOSED</KEYWORD1>
+ <KEYWORD1>EXTERNAL</KEYWORD1>
+ <KEYWORD1>TRAILING</KEYWORD1>
+ <KEYWORD1>NULLCOLS</KEYWORD1>
+ <KEYWORD1>NULLIF</KEYWORD1>
+ <KEYWORD1>DATA</KEYWORD1>
+ <KEYWORD1>BLANKS</KEYWORD1>
+ <KEYWORD1>INSERT</KEYWORD1>
+ <KEYWORD1>INTO</KEYWORD1>
+ <KEYWORD1>POSITION</KEYWORD1>
+ <KEYWORD1>WHEN</KEYWORD1>
+ <KEYWORD1>APPEND</KEYWORD1>
+ <KEYWORD1>REPLACE</KEYWORD1>
+ <KEYWORD1>EOF</KEYWORD1>
+ <KEYWORD1>LOBFILE</KEYWORD1>
+ <KEYWORD1>TRUNCATE</KEYWORD1>
+ <KEYWORD1>COLUMN</KEYWORD1>
+
+ <!--function-->
+ <KEYWORD1>COUNT</KEYWORD1>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>SDF</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>SYSDATE</KEYWORD1>
+
+ <!-- data types -->
+ <KEYWORD1>binary</KEYWORD1>
+ <KEYWORD1>bit</KEYWORD1>
+ <KEYWORD1>blob</KEYWORD1>
+ <KEYWORD1>boolean</KEYWORD1>
+ <KEYWORD1>char</KEYWORD1>
+ <KEYWORD1>character</KEYWORD1>
+ <KEYWORD1>constant</KEYWORD1>
+ <KEYWORD1>date</KEYWORD1>
+ <KEYWORD1>datetime</KEYWORD1>
+ <KEYWORD1>decimal</KEYWORD1>
+ <KEYWORD1>double</KEYWORD1>
+ <KEYWORD1>filler</KEYWORD1>
+ <KEYWORD1>float</KEYWORD1>
+ <KEYWORD1>image</KEYWORD1>
+ <KEYWORD1>int</KEYWORD1>
+ <KEYWORD1>integer</KEYWORD1>
+ <KEYWORD1>money</KEYWORD1>
+ <!-- KEYWORD1>name</KEYWORD1 -->
+ <KEYWORD1>numeric</KEYWORD1>
+ <KEYWORD1>nchar</KEYWORD1>
+ <KEYWORD1>nvarchar</KEYWORD1>
+ <KEYWORD1>ntext</KEYWORD1>
+ <KEYWORD1>object</KEYWORD1>
+ <KEYWORD1>pls_integer</KEYWORD1>
+ <KEYWORD1>raw</KEYWORD1>
+ <KEYWORD1>real</KEYWORD1>
+ <KEYWORD1>smalldatetime</KEYWORD1>
+ <KEYWORD1>smallint</KEYWORD1>
+ <KEYWORD1>smallmoney</KEYWORD1>
+ <KEYWORD1>sequence</KEYWORD1>
+ <KEYWORD1>text</KEYWORD1>
+ <KEYWORD1>timestamp</KEYWORD1>
+ <KEYWORD1>tinyint</KEYWORD1>
+ <KEYWORD1>uniqueidentifier</KEYWORD1>
+ <KEYWORD1>varbinary</KEYWORD1>
+ <KEYWORD1>varchar</KEYWORD1>
+ <KEYWORD1>varchar2</KEYWORD1>
+ <KEYWORD1>varray</KEYWORD1>
+ <KEYWORD1>zoned</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
+
diff --git a/jEdit/modes/sqr.xml b/jEdit/modes/sqr.xml
index 6e28544..ac55615 100644
--- a/jEdit/modes/sqr.xml
+++ b/jEdit/modes/sqr.xml
@@ -1,152 +1,152 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- SQR Mode by Richard F. Ashwell III -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="!" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Normal comments. -->
- <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
-
- <!-- Literal String -->
- <SPAN TYPE="LABEL" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- SQR Replacement String -->
- <SPAN TYPE="LABEL" NO_LINE_BREAK="TRUE">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <MARK_FOLLOWING TYPE="LITERAL1">$</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL2">#</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="MARKUP">&</MARK_FOLLOWING>
-
- <KEYWORDS>
- <!-- Section KeyWords -->
- <FUNCTION>begin-procedure</FUNCTION>
- <FUNCTION>end-procedure</FUNCTION>
- <FUNCTION>begin-report</FUNCTION>
- <FUNCTION>end-report</FUNCTION>
- <FUNCTION>begin-heading</FUNCTION>
- <FUNCTION>end-heading</FUNCTION>
- <FUNCTION>begin-setup</FUNCTION>
- <FUNCTION>end-setup</FUNCTION>
- <FUNCTION>begin-footing</FUNCTION>
- <FUNCTION>end-footing</FUNCTION>
- <FUNCTION>begin-program</FUNCTION>
- <FUNCTION>end-program</FUNCTION>
-
- <!-- Block Keywords -->
- <KEYWORD1>begin-select</KEYWORD1>
- <KEYWORD1>end-select</KEYWORD1>
- <KEYWORD1>begin-sql</KEYWORD1>
- <KEYWORD1>end-sql</KEYWORD1>
-
- <!-- SQR Functional Keywords -->
- <KEYWORD2>add</KEYWORD2>
- <KEYWORD2>array-add</KEYWORD2>
- <KEYWORD2>array-divide</KEYWORD2>
- <KEYWORD2>array-multiply</KEYWORD2>
- <KEYWORD2>array-subtract</KEYWORD2>
- <KEYWORD2>ask</KEYWORD2>
- <KEYWORD2>break</KEYWORD2>
- <KEYWORD2>call</KEYWORD2>
- <KEYWORD2>clear-array</KEYWORD2>
- <KEYWORD2>close</KEYWORD2>
- <KEYWORD2>columns</KEYWORD2>
- <KEYWORD2>commit</KEYWORD2>
- <KEYWORD2>concat</KEYWORD2>
- <KEYWORD2>connect</KEYWORD2>
- <KEYWORD2>create-array</KEYWORD2>
- <KEYWORD2>date-time</KEYWORD2>
- <KEYWORD2>display</KEYWORD2>
- <KEYWORD2>divide</KEYWORD2>
- <KEYWORD2>do</KEYWORD2>
- <KEYWORD2>dollar-symbol</KEYWORD2>
- <KEYWORD2>else</KEYWORD2>
- <KEYWORD2>encode</KEYWORD2>
- <KEYWORD2>end-evaluate</KEYWORD2>
- <KEYWORD2>end-if</KEYWORD2>
- <KEYWORD2>end-while</KEYWORD2>
- <KEYWORD2>evaluate</KEYWORD2>
- <KEYWORD2>execute</KEYWORD2>
- <KEYWORD2>extract</KEYWORD2>
- <KEYWORD2>find</KEYWORD2>
- <KEYWORD2>font</KEYWORD2>
- <KEYWORD2>get</KEYWORD2>
- <KEYWORD2>goto</KEYWORD2>
- <KEYWORD2>graphic</KEYWORD2>
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD2>last-page</KEYWORD2>
- <KEYWORD2>let</KEYWORD2>
- <KEYWORD2>lookup</KEYWORD2>
- <KEYWORD2>lowercase</KEYWORD2>
- <KEYWORD2>money-symbol</KEYWORD2>
- <KEYWORD2>move</KEYWORD2>
- <KEYWORD2>multiply</KEYWORD2>
- <KEYWORD2>new-page</KEYWORD2>
- <KEYWORD2>new-report</KEYWORD2>
- <KEYWORD2>next-column</KEYWORD2>
- <KEYWORD2>next-listing</KEYWORD2>
- <KEYWORD2>no-formfeed</KEYWORD2>
- <KEYWORD2>open</KEYWORD2>
- <KEYWORD2>page-number</KEYWORD2>
- <KEYWORD2>page-size</KEYWORD2>
- <KEYWORD2>position</KEYWORD2>
- <KEYWORD2>print</KEYWORD2>
- <KEYWORD2>print-bar-code</KEYWORD2>
- <KEYWORD2>print-chart</KEYWORD2>
- <KEYWORD2>print-direct</KEYWORD2>
- <KEYWORD2>print-image</KEYWORD2>
- <KEYWORD2>printer-deinit</KEYWORD2>
- <KEYWORD2>printer-init</KEYWORD2>
- <KEYWORD2>put</KEYWORD2>
- <KEYWORD2>read</KEYWORD2>
- <KEYWORD2>rollback</KEYWORD2>
- <KEYWORD2>show</KEYWORD2>
- <KEYWORD2>stop</KEYWORD2>
- <KEYWORD2>string</KEYWORD2>
- <KEYWORD2>subtract</KEYWORD2>
- <KEYWORD2>unstring</KEYWORD2>
- <KEYWORD2>uppercase</KEYWORD2>
- <KEYWORD2>use</KEYWORD2>
- <KEYWORD2>use-column</KEYWORD2>
- <KEYWORD2>use-printer-type</KEYWORD2>
- <KEYWORD2>use-procedure</KEYWORD2>
- <KEYWORD2>use-report</KEYWORD2>
- <KEYWORD2>use-report</KEYWORD2>
- <KEYWORD2>while</KEYWORD2>
- <KEYWORD2>write</KEYWORD2>
- <KEYWORD2>to</KEYWORD2>
-
- <!-- SQL Keywords -->
- <KEYWORD3>from</KEYWORD3>
- <KEYWORD3>where</KEYWORD3>
- <KEYWORD3>and</KEYWORD3>
- <KEYWORD3>between</KEYWORD3>
- <KEYWORD3>or</KEYWORD3>
- <KEYWORD3>in</KEYWORD3>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- SQR Mode by Richard F. Ashwell III -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="!" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Normal comments. -->
+ <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
+
+ <!-- Literal String -->
+ <SPAN TYPE="LABEL" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- SQR Replacement String -->
+ <SPAN TYPE="LABEL" NO_LINE_BREAK="TRUE">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <MARK_FOLLOWING TYPE="LITERAL1">$</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL2">#</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="MARKUP">&</MARK_FOLLOWING>
+
+ <KEYWORDS>
+ <!-- Section KeyWords -->
+ <FUNCTION>begin-procedure</FUNCTION>
+ <FUNCTION>end-procedure</FUNCTION>
+ <FUNCTION>begin-report</FUNCTION>
+ <FUNCTION>end-report</FUNCTION>
+ <FUNCTION>begin-heading</FUNCTION>
+ <FUNCTION>end-heading</FUNCTION>
+ <FUNCTION>begin-setup</FUNCTION>
+ <FUNCTION>end-setup</FUNCTION>
+ <FUNCTION>begin-footing</FUNCTION>
+ <FUNCTION>end-footing</FUNCTION>
+ <FUNCTION>begin-program</FUNCTION>
+ <FUNCTION>end-program</FUNCTION>
+
+ <!-- Block Keywords -->
+ <KEYWORD1>begin-select</KEYWORD1>
+ <KEYWORD1>end-select</KEYWORD1>
+ <KEYWORD1>begin-sql</KEYWORD1>
+ <KEYWORD1>end-sql</KEYWORD1>
+
+ <!-- SQR Functional Keywords -->
+ <KEYWORD2>add</KEYWORD2>
+ <KEYWORD2>array-add</KEYWORD2>
+ <KEYWORD2>array-divide</KEYWORD2>
+ <KEYWORD2>array-multiply</KEYWORD2>
+ <KEYWORD2>array-subtract</KEYWORD2>
+ <KEYWORD2>ask</KEYWORD2>
+ <KEYWORD2>break</KEYWORD2>
+ <KEYWORD2>call</KEYWORD2>
+ <KEYWORD2>clear-array</KEYWORD2>
+ <KEYWORD2>close</KEYWORD2>
+ <KEYWORD2>columns</KEYWORD2>
+ <KEYWORD2>commit</KEYWORD2>
+ <KEYWORD2>concat</KEYWORD2>
+ <KEYWORD2>connect</KEYWORD2>
+ <KEYWORD2>create-array</KEYWORD2>
+ <KEYWORD2>date-time</KEYWORD2>
+ <KEYWORD2>display</KEYWORD2>
+ <KEYWORD2>divide</KEYWORD2>
+ <KEYWORD2>do</KEYWORD2>
+ <KEYWORD2>dollar-symbol</KEYWORD2>
+ <KEYWORD2>else</KEYWORD2>
+ <KEYWORD2>encode</KEYWORD2>
+ <KEYWORD2>end-evaluate</KEYWORD2>
+ <KEYWORD2>end-if</KEYWORD2>
+ <KEYWORD2>end-while</KEYWORD2>
+ <KEYWORD2>evaluate</KEYWORD2>
+ <KEYWORD2>execute</KEYWORD2>
+ <KEYWORD2>extract</KEYWORD2>
+ <KEYWORD2>find</KEYWORD2>
+ <KEYWORD2>font</KEYWORD2>
+ <KEYWORD2>get</KEYWORD2>
+ <KEYWORD2>goto</KEYWORD2>
+ <KEYWORD2>graphic</KEYWORD2>
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>last-page</KEYWORD2>
+ <KEYWORD2>let</KEYWORD2>
+ <KEYWORD2>lookup</KEYWORD2>
+ <KEYWORD2>lowercase</KEYWORD2>
+ <KEYWORD2>money-symbol</KEYWORD2>
+ <KEYWORD2>move</KEYWORD2>
+ <KEYWORD2>multiply</KEYWORD2>
+ <KEYWORD2>new-page</KEYWORD2>
+ <KEYWORD2>new-report</KEYWORD2>
+ <KEYWORD2>next-column</KEYWORD2>
+ <KEYWORD2>next-listing</KEYWORD2>
+ <KEYWORD2>no-formfeed</KEYWORD2>
+ <KEYWORD2>open</KEYWORD2>
+ <KEYWORD2>page-number</KEYWORD2>
+ <KEYWORD2>page-size</KEYWORD2>
+ <KEYWORD2>position</KEYWORD2>
+ <KEYWORD2>print</KEYWORD2>
+ <KEYWORD2>print-bar-code</KEYWORD2>
+ <KEYWORD2>print-chart</KEYWORD2>
+ <KEYWORD2>print-direct</KEYWORD2>
+ <KEYWORD2>print-image</KEYWORD2>
+ <KEYWORD2>printer-deinit</KEYWORD2>
+ <KEYWORD2>printer-init</KEYWORD2>
+ <KEYWORD2>put</KEYWORD2>
+ <KEYWORD2>read</KEYWORD2>
+ <KEYWORD2>rollback</KEYWORD2>
+ <KEYWORD2>show</KEYWORD2>
+ <KEYWORD2>stop</KEYWORD2>
+ <KEYWORD2>string</KEYWORD2>
+ <KEYWORD2>subtract</KEYWORD2>
+ <KEYWORD2>unstring</KEYWORD2>
+ <KEYWORD2>uppercase</KEYWORD2>
+ <KEYWORD2>use</KEYWORD2>
+ <KEYWORD2>use-column</KEYWORD2>
+ <KEYWORD2>use-printer-type</KEYWORD2>
+ <KEYWORD2>use-procedure</KEYWORD2>
+ <KEYWORD2>use-report</KEYWORD2>
+ <KEYWORD2>use-report</KEYWORD2>
+ <KEYWORD2>while</KEYWORD2>
+ <KEYWORD2>write</KEYWORD2>
+ <KEYWORD2>to</KEYWORD2>
+
+ <!-- SQL Keywords -->
+ <KEYWORD3>from</KEYWORD3>
+ <KEYWORD3>where</KEYWORD3>
+ <KEYWORD3>and</KEYWORD3>
+ <KEYWORD3>between</KEYWORD3>
+ <KEYWORD3>or</KEYWORD3>
+ <KEYWORD3>in</KEYWORD3>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/squidconf.xml b/jEdit/modes/squidconf.xml
index d2aeb9f..d7deed1 100644
--- a/jEdit/modes/squidconf.xml
+++ b/jEdit/modes/squidconf.xml
@@ -1,227 +1,227 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Highlighting for squid.conf by Kris Kopicki (29/11/2003). For squid 2.5-stable -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#"/>
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Comment -->
- <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
-
- <KEYWORDS>
- <KEYWORD1>http_port</KEYWORD1>
- <KEYWORD1>https_port</KEYWORD1>
- <KEYWORD1>ssl_unclean_shutdown</KEYWORD1>
- <KEYWORD1>icp_port</KEYWORD1>
- <KEYWORD1>htcp_port</KEYWORD1>
- <KEYWORD1>mcast_groups</KEYWORD1>
- <KEYWORD1>udp_incoming_address</KEYWORD1>
- <KEYWORD1>udp_outgoing_address</KEYWORD1>
- <KEYWORD1>cache_peer</KEYWORD1>
- <KEYWORD1>cache_peer_domain</KEYWORD1>
- <KEYWORD1>neighbor_type_domain</KEYWORD1>
- <KEYWORD1>icp_query_timeout</KEYWORD1>
- <KEYWORD1>maximum_icp_query_timeout</KEYWORD1>
- <KEYWORD1>mcast_icp_query_timeout</KEYWORD1>
- <KEYWORD1>dead_peer_timeout</KEYWORD1>
- <KEYWORD1>hierarchy_stoplist</KEYWORD1>
- <KEYWORD1>no_cache</KEYWORD1>
- <KEYWORD1>cache_mem</KEYWORD1>
- <KEYWORD1>cache_swap_low</KEYWORD1>
- <KEYWORD1>cache_swap_high</KEYWORD1>
- <KEYWORD1>maximum_object_size</KEYWORD1>
- <KEYWORD1>minimum_object_size</KEYWORD1>
- <KEYWORD1>maximum_object_size_in_memory</KEYWORD1>
- <KEYWORD1>ipcache_size</KEYWORD1>
- <KEYWORD1>ipcache_low</KEYWORD1>
- <KEYWORD1>ipcache_high</KEYWORD1>
- <KEYWORD1>fqdncache_size</KEYWORD1>
- <KEYWORD1>cache_replacement_policy</KEYWORD1>
- <KEYWORD1>memory_replacement_policy</KEYWORD1>
- <KEYWORD1>cache_dir</KEYWORD1>
- <KEYWORD1>cache_access_log</KEYWORD1>
- <KEYWORD1>cache_log</KEYWORD1>
- <KEYWORD1>cache_store_log</KEYWORD1>
- <KEYWORD1>cache_swap_log</KEYWORD1>
- <KEYWORD1>emulate_httpd_log</KEYWORD1>
- <KEYWORD1>log_ip_on_direct</KEYWORD1>
- <KEYWORD1>mime_table</KEYWORD1>
- <KEYWORD1>log_mime_hdrs</KEYWORD1>
- <KEYWORD1>useragent_log</KEYWORD1>
- <KEYWORD1>referer_log</KEYWORD1>
- <KEYWORD1>pid_filename</KEYWORD1>
- <KEYWORD1>debug_options</KEYWORD1>
- <KEYWORD1>log_fqdn</KEYWORD1>
- <KEYWORD1>client_netmask</KEYWORD1>
- <KEYWORD1>ftp_user</KEYWORD1>
- <KEYWORD1>ftp_list_width</KEYWORD1>
- <KEYWORD1>ftp_passive</KEYWORD1>
- <KEYWORD1>ftp_sanitycheck</KEYWORD1>
- <KEYWORD1>cache_dns_program</KEYWORD1>
- <KEYWORD1>dns_children</KEYWORD1>
- <KEYWORD1>dns_retransmit_interval</KEYWORD1>
- <KEYWORD1>dns_timeout</KEYWORD1>
- <KEYWORD1>dns_defnames</KEYWORD1>
- <KEYWORD1>dns_nameservers</KEYWORD1>
- <KEYWORD1>hosts_file</KEYWORD1>
- <KEYWORD1>diskd_program</KEYWORD1>
- <KEYWORD1>unlinkd_program</KEYWORD1>
- <KEYWORD1>pinger_program</KEYWORD1>
- <KEYWORD1>redirect_program</KEYWORD1>
- <KEYWORD1>redirect_children</KEYWORD1>
- <KEYWORD1>redirect_rewrites_host_header</KEYWORD1>
- <KEYWORD1>redirector_access</KEYWORD1>
- <KEYWORD1>auth_param</KEYWORD1>
- <KEYWORD1>authenticate_cache_garbage_interval</KEYWORD1>
- <KEYWORD1>authenticate_ttl</KEYWORD1>
- <KEYWORD1>authenticate_ip_ttl</KEYWORD1>
- <KEYWORD1>external_acl_type</KEYWORD1>
- <KEYWORD1>wais_relay_host</KEYWORD1>
- <KEYWORD1>wais_relay_port</KEYWORD1>
- <KEYWORD1>request_header_max_size</KEYWORD1>
- <KEYWORD1>request_body_max_size</KEYWORD1>
- <KEYWORD1>refresh_pattern</KEYWORD1>
- <KEYWORD1>quick_abort_min</KEYWORD1>
- <KEYWORD1>quick_abort_max</KEYWORD1>
- <KEYWORD1>quick_abort_pct</KEYWORD1>
- <KEYWORD1>negative_ttl</KEYWORD1>
- <KEYWORD1>positive_dns_ttl</KEYWORD1>
- <KEYWORD1>negative_dns_ttl</KEYWORD1>
- <KEYWORD1>range_offset_limit</KEYWORD1>
- <KEYWORD1>connect_timeout</KEYWORD1>
- <KEYWORD1>peer_connect_timeout</KEYWORD1>
- <KEYWORD1>read_timeout</KEYWORD1>
- <KEYWORD1>request_timeout</KEYWORD1>
- <KEYWORD1>persistent_request_timeout</KEYWORD1>
- <KEYWORD1>client_lifetime</KEYWORD1>
- <KEYWORD1>half_closed_clients</KEYWORD1>
- <KEYWORD1>pconn_timeout</KEYWORD1>
- <KEYWORD1>ident_timeout</KEYWORD1>
- <KEYWORD1>shutdown_lifetime</KEYWORD1>
- <KEYWORD1>acl</KEYWORD1>
- <KEYWORD1>http_access</KEYWORD1>
- <KEYWORD1>http_reply_access</KEYWORD1>
- <KEYWORD1>icp_access</KEYWORD1>
- <KEYWORD1>miss_access</KEYWORD1>
- <KEYWORD1>cache_peer_access</KEYWORD1>
- <KEYWORD1>ident_lookup_access</KEYWORD1>
- <KEYWORD1>tcp_outgoing_tos</KEYWORD1>
- <KEYWORD1>tcp_outgoing_address</KEYWORD1>
- <KEYWORD1>reply_body_max_size</KEYWORD1>
- <KEYWORD1>cache_mgr</KEYWORD1>
- <KEYWORD1>cache_effective_user</KEYWORD1>
- <KEYWORD1>cache_effective_group</KEYWORD1>
- <KEYWORD1>visible_hostname</KEYWORD1>
- <KEYWORD1>unique_hostname</KEYWORD1>
- <KEYWORD1>hostname_aliases</KEYWORD1>
- <KEYWORD1>announce_period</KEYWORD1>
- <KEYWORD1>announce_host</KEYWORD1>
- <KEYWORD1>announce_file</KEYWORD1>
- <KEYWORD1>announce_port</KEYWORD1>
- <KEYWORD1>httpd_accel_host</KEYWORD1>
- <KEYWORD1>httpd_accel_port</KEYWORD1>
- <KEYWORD1>httpd_accel_single_host</KEYWORD1>
- <KEYWORD1>httpd_accel_with_proxy</KEYWORD1>
- <KEYWORD1>httpd_accel_uses_host_header</KEYWORD1>
- <KEYWORD1>dns_testnames</KEYWORD1>
- <KEYWORD1>logfile_rotate</KEYWORD1>
- <KEYWORD1>append_domain</KEYWORD1>
- <KEYWORD1>tcp_recv_bufsize</KEYWORD1>
- <KEYWORD1>err_html_text</KEYWORD1>
- <KEYWORD1>deny_info</KEYWORD1>
- <KEYWORD1>memory_pools</KEYWORD1>
- <KEYWORD1>memory_pools_limit</KEYWORD1>
- <KEYWORD1>forwarded_for</KEYWORD1>
- <KEYWORD1>log_icp_queries</KEYWORD1>
- <KEYWORD1>icp_hit_stale</KEYWORD1>
- <KEYWORD1>minimum_direct_hops</KEYWORD1>
- <KEYWORD1>minimum_direct_rtt</KEYWORD1>
- <KEYWORD1>cachemgr_passwd</KEYWORD1>
- <KEYWORD1>store_avg_object_size</KEYWORD1>
- <KEYWORD1>store_objects_per_bucket</KEYWORD1>
- <KEYWORD1>client_db</KEYWORD1>
- <KEYWORD1>netdb_low</KEYWORD1>
- <KEYWORD1>netdb_high</KEYWORD1>
- <KEYWORD1>netdb_ping_period</KEYWORD1>
- <KEYWORD1>query_icmp</KEYWORD1>
- <KEYWORD1>test_reachability</KEYWORD1>
- <KEYWORD1>buffered_logs</KEYWORD1>
- <KEYWORD1>reload_into_ims</KEYWORD1>
- <KEYWORD1>always_direct</KEYWORD1>
- <KEYWORD1>never_direct</KEYWORD1>
- <KEYWORD1>header_access</KEYWORD1>
- <KEYWORD1>header_replace</KEYWORD1>
- <KEYWORD1>icon_directory</KEYWORD1>
- <KEYWORD1>error_directory</KEYWORD1>
- <KEYWORD1>maximum_single_addr_tries</KEYWORD1>
- <KEYWORD1>snmp_port</KEYWORD1>
- <KEYWORD1>snmp_access</KEYWORD1>
- <KEYWORD1>snmp_incoming_address</KEYWORD1>
- <KEYWORD1>snmp_outgoing_address</KEYWORD1>
- <KEYWORD1>as_whois_server</KEYWORD1>
- <KEYWORD1>wccp_router</KEYWORD1>
- <KEYWORD1>wccp_version</KEYWORD1>
- <KEYWORD1>wccp_incoming_address</KEYWORD1>
- <KEYWORD1>wccp_outgoing_address</KEYWORD1>
- <KEYWORD1>delay_pools</KEYWORD1>
- <KEYWORD1>delay_class</KEYWORD1>
- <KEYWORD1>delay_access</KEYWORD1>
- <KEYWORD1>delay_parameters</KEYWORD1>
- <KEYWORD1>delay_initial_bucket_level</KEYWORD1>
- <KEYWORD1>incoming_icp_average</KEYWORD1>
- <KEYWORD1>incoming_http_average</KEYWORD1>
- <KEYWORD1>incoming_dns_average</KEYWORD1>
- <KEYWORD1>min_icp_poll_cnt</KEYWORD1>
- <KEYWORD1>min_dns_poll_cnt</KEYWORD1>
- <KEYWORD1>min_http_poll_cnt</KEYWORD1>
- <KEYWORD1>max_open_disk_fds</KEYWORD1>
- <KEYWORD1>offline_mode</KEYWORD1>
- <KEYWORD1>uri_whitespace</KEYWORD1>
- <KEYWORD1>broken_posts</KEYWORD1>
- <KEYWORD1>mcast_miss_addr</KEYWORD1>
- <KEYWORD1>mcast_miss_ttl</KEYWORD1>
- <KEYWORD1>mcast_miss_port</KEYWORD1>
- <KEYWORD1>mcast_miss_encode_key</KEYWORD1>
- <KEYWORD1>nonhierarchical_direct</KEYWORD1>
- <KEYWORD1>prefer_direct</KEYWORD1>
- <KEYWORD1>strip_query_terms</KEYWORD1>
- <KEYWORD1>coredump_dir</KEYWORD1>
- <KEYWORD1>redirector_bypass</KEYWORD1>
- <KEYWORD1>ignore_unknown_nameservers</KEYWORD1>
- <KEYWORD1>digest_generation</KEYWORD1>
- <KEYWORD1>digest_bits_per_entry</KEYWORD1>
- <KEYWORD1>digest_rebuild_period</KEYWORD1>
- <KEYWORD1>digest_rewrite_period</KEYWORD1>
- <KEYWORD1>digest_swapout_chunk_size</KEYWORD1>
- <KEYWORD1>digest_rebuild_chunk_percentage</KEYWORD1>
- <KEYWORD1>chroot</KEYWORD1>
- <KEYWORD1>client_persistent_connections</KEYWORD1>
- <KEYWORD1>server_persistent_connections</KEYWORD1>
- <KEYWORD1>pipeline_prefetch</KEYWORD1>
- <KEYWORD1>extension_methods</KEYWORD1>
- <KEYWORD1>request_entities</KEYWORD1>
- <KEYWORD1>high_response_time_warning</KEYWORD1>
- <KEYWORD1>high_page_fault_warning</KEYWORD1>
- <KEYWORD1>high_memory_warning</KEYWORD1>
- <KEYWORD1>store_dir_select_algorithm</KEYWORD1>
- <KEYWORD1>forward_log</KEYWORD1>
- <KEYWORD1>ie_refresh</KEYWORD1>
- <KEYWORD1>vary_ignore_expire</KEYWORD1>
- <KEYWORD1>sleep_after_fork</KEYWORD1>
-
- <KEYWORD2>dst</KEYWORD2>
- <KEYWORD2>src</KEYWORD2>
- <KEYWORD2>method</KEYWORD2>
- <KEYWORD2>port</KEYWORD2>
- <KEYWORD2>proxy_auth</KEYWORD2>
-
- <LITERAL2>on</LITERAL2>
- <LITERAL2>off</LITERAL2>
- <LITERAL2>allow</LITERAL2>
- <LITERAL2>deny</LITERAL2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Highlighting for squid.conf by Kris Kopicki (29/11/2003). For squid 2.5-stable -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#"/>
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Comment -->
+ <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
+
+ <KEYWORDS>
+ <KEYWORD1>http_port</KEYWORD1>
+ <KEYWORD1>https_port</KEYWORD1>
+ <KEYWORD1>ssl_unclean_shutdown</KEYWORD1>
+ <KEYWORD1>icp_port</KEYWORD1>
+ <KEYWORD1>htcp_port</KEYWORD1>
+ <KEYWORD1>mcast_groups</KEYWORD1>
+ <KEYWORD1>udp_incoming_address</KEYWORD1>
+ <KEYWORD1>udp_outgoing_address</KEYWORD1>
+ <KEYWORD1>cache_peer</KEYWORD1>
+ <KEYWORD1>cache_peer_domain</KEYWORD1>
+ <KEYWORD1>neighbor_type_domain</KEYWORD1>
+ <KEYWORD1>icp_query_timeout</KEYWORD1>
+ <KEYWORD1>maximum_icp_query_timeout</KEYWORD1>
+ <KEYWORD1>mcast_icp_query_timeout</KEYWORD1>
+ <KEYWORD1>dead_peer_timeout</KEYWORD1>
+ <KEYWORD1>hierarchy_stoplist</KEYWORD1>
+ <KEYWORD1>no_cache</KEYWORD1>
+ <KEYWORD1>cache_mem</KEYWORD1>
+ <KEYWORD1>cache_swap_low</KEYWORD1>
+ <KEYWORD1>cache_swap_high</KEYWORD1>
+ <KEYWORD1>maximum_object_size</KEYWORD1>
+ <KEYWORD1>minimum_object_size</KEYWORD1>
+ <KEYWORD1>maximum_object_size_in_memory</KEYWORD1>
+ <KEYWORD1>ipcache_size</KEYWORD1>
+ <KEYWORD1>ipcache_low</KEYWORD1>
+ <KEYWORD1>ipcache_high</KEYWORD1>
+ <KEYWORD1>fqdncache_size</KEYWORD1>
+ <KEYWORD1>cache_replacement_policy</KEYWORD1>
+ <KEYWORD1>memory_replacement_policy</KEYWORD1>
+ <KEYWORD1>cache_dir</KEYWORD1>
+ <KEYWORD1>cache_access_log</KEYWORD1>
+ <KEYWORD1>cache_log</KEYWORD1>
+ <KEYWORD1>cache_store_log</KEYWORD1>
+ <KEYWORD1>cache_swap_log</KEYWORD1>
+ <KEYWORD1>emulate_httpd_log</KEYWORD1>
+ <KEYWORD1>log_ip_on_direct</KEYWORD1>
+ <KEYWORD1>mime_table</KEYWORD1>
+ <KEYWORD1>log_mime_hdrs</KEYWORD1>
+ <KEYWORD1>useragent_log</KEYWORD1>
+ <KEYWORD1>referer_log</KEYWORD1>
+ <KEYWORD1>pid_filename</KEYWORD1>
+ <KEYWORD1>debug_options</KEYWORD1>
+ <KEYWORD1>log_fqdn</KEYWORD1>
+ <KEYWORD1>client_netmask</KEYWORD1>
+ <KEYWORD1>ftp_user</KEYWORD1>
+ <KEYWORD1>ftp_list_width</KEYWORD1>
+ <KEYWORD1>ftp_passive</KEYWORD1>
+ <KEYWORD1>ftp_sanitycheck</KEYWORD1>
+ <KEYWORD1>cache_dns_program</KEYWORD1>
+ <KEYWORD1>dns_children</KEYWORD1>
+ <KEYWORD1>dns_retransmit_interval</KEYWORD1>
+ <KEYWORD1>dns_timeout</KEYWORD1>
+ <KEYWORD1>dns_defnames</KEYWORD1>
+ <KEYWORD1>dns_nameservers</KEYWORD1>
+ <KEYWORD1>hosts_file</KEYWORD1>
+ <KEYWORD1>diskd_program</KEYWORD1>
+ <KEYWORD1>unlinkd_program</KEYWORD1>
+ <KEYWORD1>pinger_program</KEYWORD1>
+ <KEYWORD1>redirect_program</KEYWORD1>
+ <KEYWORD1>redirect_children</KEYWORD1>
+ <KEYWORD1>redirect_rewrites_host_header</KEYWORD1>
+ <KEYWORD1>redirector_access</KEYWORD1>
+ <KEYWORD1>auth_param</KEYWORD1>
+ <KEYWORD1>authenticate_cache_garbage_interval</KEYWORD1>
+ <KEYWORD1>authenticate_ttl</KEYWORD1>
+ <KEYWORD1>authenticate_ip_ttl</KEYWORD1>
+ <KEYWORD1>external_acl_type</KEYWORD1>
+ <KEYWORD1>wais_relay_host</KEYWORD1>
+ <KEYWORD1>wais_relay_port</KEYWORD1>
+ <KEYWORD1>request_header_max_size</KEYWORD1>
+ <KEYWORD1>request_body_max_size</KEYWORD1>
+ <KEYWORD1>refresh_pattern</KEYWORD1>
+ <KEYWORD1>quick_abort_min</KEYWORD1>
+ <KEYWORD1>quick_abort_max</KEYWORD1>
+ <KEYWORD1>quick_abort_pct</KEYWORD1>
+ <KEYWORD1>negative_ttl</KEYWORD1>
+ <KEYWORD1>positive_dns_ttl</KEYWORD1>
+ <KEYWORD1>negative_dns_ttl</KEYWORD1>
+ <KEYWORD1>range_offset_limit</KEYWORD1>
+ <KEYWORD1>connect_timeout</KEYWORD1>
+ <KEYWORD1>peer_connect_timeout</KEYWORD1>
+ <KEYWORD1>read_timeout</KEYWORD1>
+ <KEYWORD1>request_timeout</KEYWORD1>
+ <KEYWORD1>persistent_request_timeout</KEYWORD1>
+ <KEYWORD1>client_lifetime</KEYWORD1>
+ <KEYWORD1>half_closed_clients</KEYWORD1>
+ <KEYWORD1>pconn_timeout</KEYWORD1>
+ <KEYWORD1>ident_timeout</KEYWORD1>
+ <KEYWORD1>shutdown_lifetime</KEYWORD1>
+ <KEYWORD1>acl</KEYWORD1>
+ <KEYWORD1>http_access</KEYWORD1>
+ <KEYWORD1>http_reply_access</KEYWORD1>
+ <KEYWORD1>icp_access</KEYWORD1>
+ <KEYWORD1>miss_access</KEYWORD1>
+ <KEYWORD1>cache_peer_access</KEYWORD1>
+ <KEYWORD1>ident_lookup_access</KEYWORD1>
+ <KEYWORD1>tcp_outgoing_tos</KEYWORD1>
+ <KEYWORD1>tcp_outgoing_address</KEYWORD1>
+ <KEYWORD1>reply_body_max_size</KEYWORD1>
+ <KEYWORD1>cache_mgr</KEYWORD1>
+ <KEYWORD1>cache_effective_user</KEYWORD1>
+ <KEYWORD1>cache_effective_group</KEYWORD1>
+ <KEYWORD1>visible_hostname</KEYWORD1>
+ <KEYWORD1>unique_hostname</KEYWORD1>
+ <KEYWORD1>hostname_aliases</KEYWORD1>
+ <KEYWORD1>announce_period</KEYWORD1>
+ <KEYWORD1>announce_host</KEYWORD1>
+ <KEYWORD1>announce_file</KEYWORD1>
+ <KEYWORD1>announce_port</KEYWORD1>
+ <KEYWORD1>httpd_accel_host</KEYWORD1>
+ <KEYWORD1>httpd_accel_port</KEYWORD1>
+ <KEYWORD1>httpd_accel_single_host</KEYWORD1>
+ <KEYWORD1>httpd_accel_with_proxy</KEYWORD1>
+ <KEYWORD1>httpd_accel_uses_host_header</KEYWORD1>
+ <KEYWORD1>dns_testnames</KEYWORD1>
+ <KEYWORD1>logfile_rotate</KEYWORD1>
+ <KEYWORD1>append_domain</KEYWORD1>
+ <KEYWORD1>tcp_recv_bufsize</KEYWORD1>
+ <KEYWORD1>err_html_text</KEYWORD1>
+ <KEYWORD1>deny_info</KEYWORD1>
+ <KEYWORD1>memory_pools</KEYWORD1>
+ <KEYWORD1>memory_pools_limit</KEYWORD1>
+ <KEYWORD1>forwarded_for</KEYWORD1>
+ <KEYWORD1>log_icp_queries</KEYWORD1>
+ <KEYWORD1>icp_hit_stale</KEYWORD1>
+ <KEYWORD1>minimum_direct_hops</KEYWORD1>
+ <KEYWORD1>minimum_direct_rtt</KEYWORD1>
+ <KEYWORD1>cachemgr_passwd</KEYWORD1>
+ <KEYWORD1>store_avg_object_size</KEYWORD1>
+ <KEYWORD1>store_objects_per_bucket</KEYWORD1>
+ <KEYWORD1>client_db</KEYWORD1>
+ <KEYWORD1>netdb_low</KEYWORD1>
+ <KEYWORD1>netdb_high</KEYWORD1>
+ <KEYWORD1>netdb_ping_period</KEYWORD1>
+ <KEYWORD1>query_icmp</KEYWORD1>
+ <KEYWORD1>test_reachability</KEYWORD1>
+ <KEYWORD1>buffered_logs</KEYWORD1>
+ <KEYWORD1>reload_into_ims</KEYWORD1>
+ <KEYWORD1>always_direct</KEYWORD1>
+ <KEYWORD1>never_direct</KEYWORD1>
+ <KEYWORD1>header_access</KEYWORD1>
+ <KEYWORD1>header_replace</KEYWORD1>
+ <KEYWORD1>icon_directory</KEYWORD1>
+ <KEYWORD1>error_directory</KEYWORD1>
+ <KEYWORD1>maximum_single_addr_tries</KEYWORD1>
+ <KEYWORD1>snmp_port</KEYWORD1>
+ <KEYWORD1>snmp_access</KEYWORD1>
+ <KEYWORD1>snmp_incoming_address</KEYWORD1>
+ <KEYWORD1>snmp_outgoing_address</KEYWORD1>
+ <KEYWORD1>as_whois_server</KEYWORD1>
+ <KEYWORD1>wccp_router</KEYWORD1>
+ <KEYWORD1>wccp_version</KEYWORD1>
+ <KEYWORD1>wccp_incoming_address</KEYWORD1>
+ <KEYWORD1>wccp_outgoing_address</KEYWORD1>
+ <KEYWORD1>delay_pools</KEYWORD1>
+ <KEYWORD1>delay_class</KEYWORD1>
+ <KEYWORD1>delay_access</KEYWORD1>
+ <KEYWORD1>delay_parameters</KEYWORD1>
+ <KEYWORD1>delay_initial_bucket_level</KEYWORD1>
+ <KEYWORD1>incoming_icp_average</KEYWORD1>
+ <KEYWORD1>incoming_http_average</KEYWORD1>
+ <KEYWORD1>incoming_dns_average</KEYWORD1>
+ <KEYWORD1>min_icp_poll_cnt</KEYWORD1>
+ <KEYWORD1>min_dns_poll_cnt</KEYWORD1>
+ <KEYWORD1>min_http_poll_cnt</KEYWORD1>
+ <KEYWORD1>max_open_disk_fds</KEYWORD1>
+ <KEYWORD1>offline_mode</KEYWORD1>
+ <KEYWORD1>uri_whitespace</KEYWORD1>
+ <KEYWORD1>broken_posts</KEYWORD1>
+ <KEYWORD1>mcast_miss_addr</KEYWORD1>
+ <KEYWORD1>mcast_miss_ttl</KEYWORD1>
+ <KEYWORD1>mcast_miss_port</KEYWORD1>
+ <KEYWORD1>mcast_miss_encode_key</KEYWORD1>
+ <KEYWORD1>nonhierarchical_direct</KEYWORD1>
+ <KEYWORD1>prefer_direct</KEYWORD1>
+ <KEYWORD1>strip_query_terms</KEYWORD1>
+ <KEYWORD1>coredump_dir</KEYWORD1>
+ <KEYWORD1>redirector_bypass</KEYWORD1>
+ <KEYWORD1>ignore_unknown_nameservers</KEYWORD1>
+ <KEYWORD1>digest_generation</KEYWORD1>
+ <KEYWORD1>digest_bits_per_entry</KEYWORD1>
+ <KEYWORD1>digest_rebuild_period</KEYWORD1>
+ <KEYWORD1>digest_rewrite_period</KEYWORD1>
+ <KEYWORD1>digest_swapout_chunk_size</KEYWORD1>
+ <KEYWORD1>digest_rebuild_chunk_percentage</KEYWORD1>
+ <KEYWORD1>chroot</KEYWORD1>
+ <KEYWORD1>client_persistent_connections</KEYWORD1>
+ <KEYWORD1>server_persistent_connections</KEYWORD1>
+ <KEYWORD1>pipeline_prefetch</KEYWORD1>
+ <KEYWORD1>extension_methods</KEYWORD1>
+ <KEYWORD1>request_entities</KEYWORD1>
+ <KEYWORD1>high_response_time_warning</KEYWORD1>
+ <KEYWORD1>high_page_fault_warning</KEYWORD1>
+ <KEYWORD1>high_memory_warning</KEYWORD1>
+ <KEYWORD1>store_dir_select_algorithm</KEYWORD1>
+ <KEYWORD1>forward_log</KEYWORD1>
+ <KEYWORD1>ie_refresh</KEYWORD1>
+ <KEYWORD1>vary_ignore_expire</KEYWORD1>
+ <KEYWORD1>sleep_after_fork</KEYWORD1>
+
+ <KEYWORD2>dst</KEYWORD2>
+ <KEYWORD2>src</KEYWORD2>
+ <KEYWORD2>method</KEYWORD2>
+ <KEYWORD2>port</KEYWORD2>
+ <KEYWORD2>proxy_auth</KEYWORD2>
+
+ <LITERAL2>on</LITERAL2>
+ <LITERAL2>off</LITERAL2>
+ <LITERAL2>allow</LITERAL2>
+ <LITERAL2>deny</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/ssharp.xml b/jEdit/modes/ssharp.xml
index b9f16a1..89ad5db 100644
--- a/jEdit/modes/ssharp.xml
+++ b/jEdit/modes/ssharp.xml
@@ -1,145 +1,145 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- S# mode, by Barry Carr (Ixian Software Components Ltd)
- based on Marcio Marchini mqm at magma.ca Smalltalk mode -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="commentStart" VALUE=""" />
- <PROPERTY NAME="commentEnd" VALUE=""" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="[" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="]" />
-
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
- <!-- Standard literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT3">#</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">""</EOL_SPAN>
-
- <SPAN TYPE="COMMENT1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL2" ESCAPE="\">
- <BEGIN>«</BEGIN>
- <END>»</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">_</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">==</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">//</SEQ>
- <SEQ TYPE="OPERATOR">\\</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">**</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">^^</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">-></SEQ>
- <SEQ TYPE="OPERATOR">&&</SEQ>
- <SEQ TYPE="OPERATOR">||</SEQ>
- <SEQ TYPE="OPERATOR">^|</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR">~=</SEQ>
- <SEQ TYPE="OPERATOR">!==</SEQ>
- <SEQ TYPE="OPERATOR">~~</SEQ>
-
- <MARK_PREVIOUS TYPE="KEYWORD3" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
- <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR">#</MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL1" MATCH_TYPE="OPERATOR">$</MARK_FOLLOWING>
-
- <KEYWORDS>
- <!-- Constants -->
- <KEYWORD1>disable</KEYWORD1>
- <KEYWORD1>enable</KEYWORD1>
- <KEYWORD1>no</KEYWORD1>
- <KEYWORD1>off</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>yes</KEYWORD1>
-
- <!-- Reserved identifiers -->
- <KEYWORD2>self</KEYWORD2>
- <KEYWORD2>true</KEYWORD2>
- <KEYWORD2>false</KEYWORD2>
- <KEYWORD2>nil</KEYWORD2>
- <KEYWORD2>super</KEYWORD2>
- <KEYWORD2>thread</KEYWORD2>
- <KEYWORD2>sender</KEYWORD2>
- <KEYWORD2>senderMethod</KEYWORD2>
- <KEYWORD2>blockSelf</KEYWORD2>
- <KEYWORD2>scheduler</KEYWORD2>
- <KEYWORD2>¼</KEYWORD2>
-
- <!-- not really keywords, but a different color works well-->
- <KEYWORD4>isNil</KEYWORD4>
- <KEYWORD4>not</KEYWORD4>
-
- <!-- not really -->
- <LITERAL2>Smalltalk</LITERAL2>
- <LITERAL2>Transcript</LITERAL2>
-
- <!-- base classes -->
- <LITERAL2>Date</LITERAL2>
- <LITERAL2>Time</LITERAL2>
- <LITERAL2>Boolean</LITERAL2>
- <LITERAL2>True</LITERAL2>
- <LITERAL2>False</LITERAL2>
- <LITERAL2>Character</LITERAL2>
- <LITERAL2>String</LITERAL2>
- <LITERAL2>Array</LITERAL2>
- <LITERAL2>Symbol</LITERAL2>
- <LITERAL2>Integer</LITERAL2>
- <LITERAL2>Object</LITERAL2>
-
- <LITERAL3>Application</LITERAL3>
- <LITERAL3>Category</LITERAL3>
- <LITERAL3>Class</LITERAL3>
- <LITERAL3>Compiler</LITERAL3>
- <LITERAL3>EntryPoint</LITERAL3>
- <LITERAL3>Enum</LITERAL3>
- <LITERAL3>Eval</LITERAL3>
- <LITERAL3>Exception</LITERAL3>
- <LITERAL3>Function</LITERAL3>
- <LITERAL3>IconResource</LITERAL3>
- <LITERAL3>Interface</LITERAL3>
- <LITERAL3>Literal</LITERAL3>
- <LITERAL3>Namespace</LITERAL3>
- <LITERAL3>Method</LITERAL3>
- <LITERAL3>Mixin</LITERAL3>
- <LITERAL3>Module</LITERAL3>
- <LITERAL3>Project</LITERAL3>
- <LITERAL3>Reference</LITERAL3>
- <LITERAL3>Require</LITERAL3>
- <LITERAL3>Resource</LITERAL3>
- <LITERAL3>Signal</LITERAL3>
- <LITERAL3>Struct</LITERAL3>
- <LITERAL3>Subsystem</LITERAL3>
- <LITERAL3>Specifications</LITERAL3>
- <LITERAL3>Warning</LITERAL3>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- S# mode, by Barry Carr (Ixian Software Components Ltd)
+ based on Marcio Marchini mqm at magma.ca Smalltalk mode -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="commentStart" VALUE=""" />
+ <PROPERTY NAME="commentEnd" VALUE=""" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="[" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="]" />
+
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- Standard literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT3">#</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">""</EOL_SPAN>
+
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL2" ESCAPE="\">
+ <BEGIN>«</BEGIN>
+ <END>»</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">_</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">==</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">//</SEQ>
+ <SEQ TYPE="OPERATOR">\\</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">**</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">^^</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">-></SEQ>
+ <SEQ TYPE="OPERATOR">&&</SEQ>
+ <SEQ TYPE="OPERATOR">||</SEQ>
+ <SEQ TYPE="OPERATOR">^|</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">~=</SEQ>
+ <SEQ TYPE="OPERATOR">!==</SEQ>
+ <SEQ TYPE="OPERATOR">~~</SEQ>
+
+ <MARK_PREVIOUS TYPE="KEYWORD3" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+ <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="OPERATOR">#</MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL1" MATCH_TYPE="OPERATOR">$</MARK_FOLLOWING>
+
+ <KEYWORDS>
+ <!-- Constants -->
+ <KEYWORD1>disable</KEYWORD1>
+ <KEYWORD1>enable</KEYWORD1>
+ <KEYWORD1>no</KEYWORD1>
+ <KEYWORD1>off</KEYWORD1>
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>yes</KEYWORD1>
+
+ <!-- Reserved identifiers -->
+ <KEYWORD2>self</KEYWORD2>
+ <KEYWORD2>true</KEYWORD2>
+ <KEYWORD2>false</KEYWORD2>
+ <KEYWORD2>nil</KEYWORD2>
+ <KEYWORD2>super</KEYWORD2>
+ <KEYWORD2>thread</KEYWORD2>
+ <KEYWORD2>sender</KEYWORD2>
+ <KEYWORD2>senderMethod</KEYWORD2>
+ <KEYWORD2>blockSelf</KEYWORD2>
+ <KEYWORD2>scheduler</KEYWORD2>
+ <KEYWORD2>¼</KEYWORD2>
+
+ <!-- not really keywords, but a different color works well-->
+ <KEYWORD4>isNil</KEYWORD4>
+ <KEYWORD4>not</KEYWORD4>
+
+ <!-- not really -->
+ <LITERAL2>Smalltalk</LITERAL2>
+ <LITERAL2>Transcript</LITERAL2>
+
+ <!-- base classes -->
+ <LITERAL2>Date</LITERAL2>
+ <LITERAL2>Time</LITERAL2>
+ <LITERAL2>Boolean</LITERAL2>
+ <LITERAL2>True</LITERAL2>
+ <LITERAL2>False</LITERAL2>
+ <LITERAL2>Character</LITERAL2>
+ <LITERAL2>String</LITERAL2>
+ <LITERAL2>Array</LITERAL2>
+ <LITERAL2>Symbol</LITERAL2>
+ <LITERAL2>Integer</LITERAL2>
+ <LITERAL2>Object</LITERAL2>
+
+ <LITERAL3>Application</LITERAL3>
+ <LITERAL3>Category</LITERAL3>
+ <LITERAL3>Class</LITERAL3>
+ <LITERAL3>Compiler</LITERAL3>
+ <LITERAL3>EntryPoint</LITERAL3>
+ <LITERAL3>Enum</LITERAL3>
+ <LITERAL3>Eval</LITERAL3>
+ <LITERAL3>Exception</LITERAL3>
+ <LITERAL3>Function</LITERAL3>
+ <LITERAL3>IconResource</LITERAL3>
+ <LITERAL3>Interface</LITERAL3>
+ <LITERAL3>Literal</LITERAL3>
+ <LITERAL3>Namespace</LITERAL3>
+ <LITERAL3>Method</LITERAL3>
+ <LITERAL3>Mixin</LITERAL3>
+ <LITERAL3>Module</LITERAL3>
+ <LITERAL3>Project</LITERAL3>
+ <LITERAL3>Reference</LITERAL3>
+ <LITERAL3>Require</LITERAL3>
+ <LITERAL3>Resource</LITERAL3>
+ <LITERAL3>Signal</LITERAL3>
+ <LITERAL3>Struct</LITERAL3>
+ <LITERAL3>Subsystem</LITERAL3>
+ <LITERAL3>Specifications</LITERAL3>
+ <LITERAL3>Warning</LITERAL3>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/stata.xml b/jEdit/modes/stata.xml
new file mode 100644
index 0000000..88a705a
--- /dev/null
+++ b/jEdit/modes/stata.xml
@@ -0,0 +1,2979 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--Based on Syntax file for Stata v9.x. and 10.x from the jedit community
+ Original by Glenn Hoetker, Updated by Jesse Hamner
+ Updated by goebbe version 2010/07
+ Thanks to Elliott Lowy sharing macro/string/quote support
+-->
+
+<!--You should put the following two lines into your jedit/modes/catalog file:
+ <MODE NAME="stata" FILE="stata.xml"
+ FILE_NAME_GLOB="*.{do,ado,mata}" />
+-->
+
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="* " />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+
+ <!--MAIN:-->
+ <RULES
+ IGNORE_CASE="FALSE"
+ NO_WORD_SEP="`'_?"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(([\.]?[0-9]+)([eE]?)([-+]*)([0-9]*)) | (([0-9]+\.*[0-9]*|\.[0-9]+)([+-]?[eE]?[0-9]+)) | ((([0-9]+\.[0-9]*|\.[0-9]+))[Ee]?)"
+ >
+ <!--Span semicolon environment (semicolon as command-separator):-->
+ <SPAN_REGEXP TYPE="KEYWORD4" DELEGATE="SEMICOLON_ENV" HASH_CHAR="#d">
+ <BEGIN>#d[\s]*[;]</BEGIN>
+ <END>#d cr</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD4" DELEGATE="SEMICOLON_ENV" HASH_CHAR="#del">
+ <BEGIN>#del[\s]*[;]</BEGIN>
+ <END>#del cr</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD4" DELEGATE="SEMICOLON_ENV" HASH_CHAR="#del">
+ <BEGIN>#deli?m?i?t?[\s]*[;]</BEGIN>
+ <END>#delimit cr</END>
+ </SPAN_REGEXP>
+
+ <!--Mata one-liner:-->
+ <EOL_SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="MATA_ENV" AT_WHITESPACE_END="TRUE" HASH_CHAR="mata">mata[\s]*[:]*[\s]*(?=[\w]+)</EOL_SPAN_REGEXP>
+ <!--Span Mata environment:-->
+ <SPAN_REGEXP TYPE="KEYWORD3" DELEGATE="MATA_ENV" AT_WHITESPACE_END="TRUE" HASH_CHAR="mata">
+ <BEGIN>mata[\s]*([:]|$)</BEGIN>
+ <END>end</END>
+ </SPAN_REGEXP>
+
+ <!--Apply to everything else:-->
+ <EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">*</EOL_SPAN>
+
+ <IMPORT DELEGATE="UNIVERSAL"/>
+ <IMPORT DELEGATE="KEYWORDLIST"/>
+
+ </RULES>
+
+
+ <RULES SET="UNIVERSAL"
+ IGNORE_CASE="FALSE"
+ NO_WORD_SEP="`'_?"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(([\.]?[0-9]+)([eE]?)([-+]*)([0-9]*)) | (([0-9]+\.*[0-9]*|\.[0-9]+)([+-]?[eE]?[0-9]+)) | ((([0-9]+\.[0-9]*|\.[0-9]+))[Ee]?)"
+ >
+
+ <!-- Line comments -->
+ <EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">//</EOL_SPAN>
+ <!--If there is code in the line before the // than tab or whitespace is required before // as a separator:-->
+ <EOL_SPAN_REGEXP TYPE="COMMENT1">[\s]///</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP TYPE="COMMENT1">[\s]//</EOL_SPAN_REGEXP>
+
+ <!-- Multiline comment -->
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <!--Do not highlight documented file endings:-->
+ <SEQ TYPE="NULL">.ado</SEQ>
+ <SEQ TYPE="NULL">.dct</SEQ>
+ <SEQ TYPE="NULL">.do</SEQ>
+ <SEQ TYPE="NULL">.dta</SEQ>
+ <SEQ TYPE="NULL">.gph</SEQ>
+ <SEQ TYPE="NULL">.grec</SEQ>
+ <SEQ TYPE="NULL">.log</SEQ>
+ <SEQ TYPE="NULL">.mata</SEQ>
+ <SEQ TYPE="NULL">.mlib</SEQ>
+ <SEQ TYPE="NULL">.mmat</SEQ>
+ <SEQ TYPE="NULL">.mo</SEQ>
+ <SEQ TYPE="NULL">.out</SEQ>
+ <SEQ TYPE="NULL">.raw</SEQ>
+ <SEQ TYPE="NULL">.mo</SEQ>
+ <SEQ TYPE="NULL">.smcl</SEQ>
+ <SEQ TYPE="NULL">.sthlp</SEQ>
+ <SEQ TYPE="NULL">.ster</SEQ>
+
+ <!--Operators:-->
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ_REGEXP TYPE="OPERATOR" HASH_CHAR="%">%[^ )]+</SEQ_REGEXP> <!--highlight formats e.g.: %10.0f-->
+
+ <SEQ TYPE="NULL">,</SEQ>
+ <SEQ TYPE="NULL">]</SEQ>
+ <SEQ TYPE="NULL">[</SEQ>
+ <SEQ TYPE="NULL">?</SEQ>
+
+ <!--Highlight time-series operators-->
+ <!--e.g.: L. L1. L2. L(1/3). F. F1. F(2/4). D. D1. S. S1. -->
+ <SEQ_REGEXP TYPE="OPERATOR" AT_WORD_START="TRUE" HASH_CHAR="L">L(([\d]*[.])|([(][\d]+/[\d]+[)][.]))</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="OPERATOR" AT_WORD_START="TRUE" HASH_CHAR="F">F(([\d]*[.])|([(][\d]+/[\d]+[)][.]))</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="OPERATOR" AT_WORD_START="TRUE" HASH_CHAR="D">D(([\d]*[.])|([(][\d]+/[\d]+[)][.]))</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="OPERATOR" AT_WORD_START="TRUE" HASH_CHAR="S">S(([\d]*[.])|([(][\d]+/[\d]+[)][.]))</SEQ_REGEXP>
+
+ <!-- Highlight variable references and declarations (macros): -->
+ <!--commands that define only one macrovariables per line:-->
+ <SEQ_REGEXP TYPE="LITERAL4" AT_WORD_START="TRUE" HASH_CHAR="loc">loca?l?((\s+\w+)|$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="LITERAL4" AT_WORD_START="TRUE" HASH_CHAR="gl">glo?b?a?l?((\s+\w+)|$)</SEQ_REGEXP>
+ <!--The following could also be implemented with regexp and positive lockahead - however positive lockahead is currently brocken in Sun-Java-->
+ <MARK_FOLLOWING TYPE="LITERAL4" MATCH_TYPE="KEYWORD2">foreach </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL4" MATCH_TYPE="KEYWORD2">foreach </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL4" MATCH_TYPE="KEYWORD2">forv </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL4" MATCH_TYPE="KEYWORD2">forv </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL4" MATCH_TYPE="KEYWORD2">forvalues </MARK_FOLLOWING>
+ <MARK_FOLLOWING TYPE="LITERAL4" MATCH_TYPE="KEYWORD2">forvalues </MARK_FOLLOWING>
+ <!--commands that define one or more macrovariables per line:-->
+ <SEQ_REGEXP TYPE="LITERAL4" AT_WHITESPACE_END="TRUE" HASH_CHAR="tempvar" >tempvar((\s+\w+)+|$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="LITERAL4" AT_WHITESPACE_END="TRUE" HASH_CHAR="tempname">tempname((\s+\w+)+|$)</SEQ_REGEXP>
+
+ <!-- To highlight global macro-variables: (local macro variables have their own rule set)-->
+ <!--e.g.: $macroname ${macroname}nomacro -->
+ <SPAN TYPE="LITERAL4"><BEGIN>${</BEGIN><END>}</END></SPAN>
+ <MARK_FOLLOWING TYPE="LITERAL4" MATCH_TYPE="RULE">$</MARK_FOLLOWING>
+
+ <!-- Highlight Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="NULL">(</MARK_PREVIOUS>
+ <SEQ TYPE="NULL">)</SEQ>
+
+ <!-- The special conditions "set", "do", "run", "sysdir" and "shell" -->
+ <SEQ_REGEXP TYPE="KEYWORD3" AT_WHITESPACE_END="TRUE" HASH_CHAR="cap" >capt?u?r?e?[\s]+log([\s]+|$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" AT_WHITESPACE_END="TRUE" HASH_CHAR="ru" >run?([\s]+|$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" AT_WORD_START="TRUE" HASH_CHAR="log" >log([\s]+|$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" AT_WORD_START="TRUE" HASH_CHAR="do" >do([\s]+|$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" AT_WORD_START="TRUE" HASH_CHAR="set" >set[\s]+(obs)(([\s]+(?![\D]+))|$)</SEQ_REGEXP> <!--highlight ""set obs" 1000" but not ""set obs" = 1000""-->
+ <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="label">label([\s]+(drop)([\s]+|$))</SEQ_REGEXP> <!--highlight "label "drop"" as keyword2-->
+ <SEQ_REGEXP TYPE="KEYWORD1" AT_WORD_START="TRUE" HASH_CHAR="macro">macro([\s]+(drop)([\s]+|$))</SEQ_REGEXP> <!--highlight "macro "drop"" as keyword1-->
+ <SEQ_REGEXP TYPE="KEYWORD3" AT_WORD_START="TRUE" HASH_CHAR="drop" >drop([\s]+(?!if|[=])|$)</SEQ_REGEXP> <!--highlight ""drop" varlist" but not ""drop" if condition"-->
+ <SEQ_REGEXP TYPE="KEYWORD3" AT_WORD_START="TRUE" HASH_CHAR="keep" >keep([\s]+(?!if|[=])|$)</SEQ_REGEXP> <!--highlight ""keep" varlist" but not ""keep" if condition"-->
+
+ <SEQ_REGEXP TYPE="KEYWORD4" AT_WHITESPACE_END="TRUE" HASH_CHAR="set" >set(?!([\s]+[\w]+[\s]*[=]))</SEQ_REGEXP> <!--highlight ""set" variable 1000" but not ""set" varibale = 1000"-->
+ <SEQ_REGEXP TYPE="KEYWORD4" AT_WHITESPACE_END="TRUE" HASH_CHAR="mata" >mata[\s]+set([\s]+|$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" AT_WHITESPACE_END="TRUE" HASH_CHAR="shell" >shell([\s]+|$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD4" AT_WHITESPACE_END="TRUE" HASH_CHAR="sysdir">sysdir([\s]+|$)</SEQ_REGEXP>
+
+ <!-- A few identifiers and variables -->
+ <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="c" >c\((\w+)\)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="str">str(\d+)</SEQ_REGEXP>
+
+ <!-- Import rules for stings, macros and quotes (see beyond) -->
+ <IMPORT DELEGATE="STRINGMACRO"/>
+ </RULES>
+
+
+ <RULES SET="SEMICOLON_ENV"
+ IGNORE_CASE="FALSE"
+ NO_WORD_SEP="`'_?"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(([\.]?[0-9]+)([eE]?)([-+]*)([0-9]*)) | (([0-9]+\.*[0-9]*|\.[0-9]+)([+-]?[eE]?[0-9]+)) | ((([0-9]+\.[0-9]*|\.[0-9]+))[Ee]?)"
+ >
+ <!--The following type of comments are ONLY valid inside SEMICOLON environment:-->
+ <SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">
+ <BEGIN>*</BEGIN><END>;</END></SPAN>
+
+ <!-- Line comments: -->
+ <!-- //-line comments at the start of a line do not work reliably in semicolon environment (this is a Stata problem)-->
+ <!-- e.g.: put //-comment at the line start of two successive lines at the start of semicolon environment: this will lead to an Stata(v10)-error/break-->
+ <!-- if you want to enable this anyway, just uncomment the follwoing line: -->
+ <!--<EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">//</EOL_SPAN>-->
+ <EOL_SPAN_REGEXP TYPE="COMMENT1">[\s]///</EOL_SPAN_REGEXP>
+ <EOL_SPAN_REGEXP TYPE="COMMENT1">[\s]//</EOL_SPAN_REGEXP>
+
+ <IMPORT DELEGATE="UNIVERSAL"/>
+ <IMPORT DELEGATE="KEYWORDLIST"/>
+ </RULES>
+
+
+ <RULES SET="MATA_ENV"
+ IGNORE_CASE="FALSE"
+ NO_WORD_SEP="`'_?"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(([\.]?[0-9]+)([eE]?)([-+]*)([0-9]*)) | (([0-9]+\.*[0-9]*|\.[0-9]+)([+-]?[eE]?[0-9]+)) | ((([0-9]+\.[0-9]*|\.[0-9]+))[Ee]?)"
+ >
+ <!--The following type of comment is NOT valid inside MATA environments :-->
+ <!--<EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">*</EOL_SPAN>-->
+
+ <!--"do " constructs have a specific meaning in in mata-environment:-->
+ <SEQ_REGEXP TYPE="KEYWORD2" AT_WORD_START="TRUE" HASH_CHAR="do" >do([\s]+|$)</SEQ_REGEXP>
+
+ <!--Import universal rules - but not keywords-->
+ <IMPORT DELEGATE="UNIVERSAL"/>
+
+ <!-- Instead use the list of officially reserved MATA keywords:-->
+ <KEYWORDS>
+
+ <KEYWORD1>array</KEYWORD1>
+ <KEYWORD1>colvector</KEYWORD1>
+ <KEYWORD1>external</KEYWORD1>
+ <KEYWORD1>mata</KEYWORD1>
+ <KEYWORD1>matrix</KEYWORD1>
+ <KEYWORD1>mlib</KEYWORD1>
+ <KEYWORD1>pointer</KEYWORD1>
+ <KEYWORD1>real</KEYWORD1>
+ <KEYWORD1>rowvector</KEYWORD1>
+ <KEYWORD1>scalar</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>struct</KEYWORD1>
+ <KEYWORD1>transmorphic</KEYWORD1>
+ <KEYWORD1>vector</KEYWORD1>
+ <KEYWORD1>version</KEYWORD1>
+ <KEYWORD1>void</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>describe</KEYWORD1>
+
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>else</KEYWORD2>
+ <KEYWORD2>for</KEYWORD2>
+ <KEYWORD2>goto</KEYWORD2>
+ <KEYWORD2>while</KEYWORD2>
+ <KEYWORD2>this</KEYWORD2>
+ <KEYWORD2>do</KEYWORD2>
+ <KEYWORD2>return</KEYWORD2>
+ <KEYWORD2>break</KEYWORD2>
+ <KEYWORD2>continue</KEYWORD2>
+
+ <KEYWORD2>add</KEYWORD2>
+ <KEYWORD2>create</KEYWORD2>
+ <KEYWORD2>index</KEYWORD2>
+ <KEYWORD2>replace</KEYWORD2>
+ <KEYWORD2>using</KEYWORD2>
+
+ <KEYWORD2>byte</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>long</KEYWORD2>
+ <KEYWORD2>float</KEYWORD2>
+ <KEYWORD2>double</KEYWORD2>
+ <KEYWORD2>quad</KEYWORD2>
+ <KEYWORD2>short</KEYWORD2>
+ <KEYWORD2>boolean</KEYWORD2>
+ <KEYWORD2>complex</KEYWORD2>
+ <KEYWORD2>const</KEYWORD2>
+
+ <!--Other (reserved) MATA keywords:-->
+ <KEYWORD2>aggregate</KEYWORD2>
+ <KEYWORD2>case</KEYWORD2>
+ <KEYWORD2>catch</KEYWORD2>
+ <KEYWORD2>class</KEYWORD2>
+ <KEYWORD2>default</KEYWORD2>
+ <KEYWORD2>delegate</KEYWORD2>
+ <KEYWORD2>case</KEYWORD2>
+ <KEYWORD2>eltypedef</KEYWORD2>
+ <KEYWORD2>enum</KEYWORD2>
+ <KEYWORD2>explicit</KEYWORD2>
+ <KEYWORD2>export</KEYWORD2>
+ <KEYWORD2>external</KEYWORD2>
+ <KEYWORD2>friend</KEYWORD2>
+ <KEYWORD2>function </KEYWORD2>
+ <KEYWORD2>inline</KEYWORD2>
+ <KEYWORD2>namespace</KEYWORD2>
+ <KEYWORD2>new</KEYWORD2>
+ <KEYWORD2>NULL</KEYWORD2>
+ <KEYWORD2>numeric</KEYWORD2>
+ <KEYWORD2>operator</KEYWORD2>
+ <KEYWORD2>orgtypedef</KEYWORD2>
+ <KEYWORD2>pointer</KEYWORD2>
+ <KEYWORD2>polymorphic</KEYWORD2>
+ <KEYWORD2>pragma</KEYWORD2>
+ <KEYWORD2>private</KEYWORD2>
+ <KEYWORD2>protected</KEYWORD2>
+ <KEYWORD2>public</KEYWORD2>
+ <KEYWORD2>signed</KEYWORD2>
+ <KEYWORD2>static</KEYWORD2>
+ <KEYWORD2>super</KEYWORD2>
+ <KEYWORD2>switch</KEYWORD2>
+ <KEYWORD2>template</KEYWORD2>
+ <KEYWORD2>throw</KEYWORD2>
+ <KEYWORD2>transmorphic</KEYWORD2>
+ <KEYWORD2>try</KEYWORD2>
+ <KEYWORD2>typedef</KEYWORD2>
+ <KEYWORD2>typename</KEYWORD2>
+ <KEYWORD2>union</KEYWORD2>
+ <KEYWORD2>unsigned</KEYWORD2>
+ <KEYWORD2>virtual</KEYWORD2>
+ <KEYWORD2>volatile</KEYWORD2>
+
+ </KEYWORDS>
+ </RULES>
+
+
+ <RULES SET="KEYWORDLIST"
+ IGNORE_CASE="FALSE"
+ NO_WORD_SEP="`'_?"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(([\.]?[0-9]+)([eE]?)([-+]*)([0-9]*)) | (([0-9]+\.*[0-9]*|\.[0-9]+)([+-]?[eE]?[0-9]+)) | ((([0-9]+\.[0-9]*|\.[0-9]+))[Ee]?)"
+ >
+ <!-- Example for "keyword"-style rules - that allows for flexible abbreviations (but are computationaly expensive): -->
+ <!--<SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="bys" AT_WORD_START="TRUE">byso?r?t?([\s]+|$)</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="cap" AT_WORD_START="TRUE">capt?u?r?e?([\s]+|$)</SEQ_REGEXP> -->
+
+ <!-- This list of keywords owes much to similar files for other editors which
+ members of the Stata community have so generously made freely available -->
+ <KEYWORDS>
+ <!-- Highlight keywords connected to files/filenames: -->
+ <KEYWORD3>ap</KEYWORD3>
+ <KEYWORD3>app</KEYWORD3>
+ <KEYWORD3>appe</KEYWORD3>
+ <KEYWORD3>appen</KEYWORD3>
+ <KEYWORD3>append</KEYWORD3>
+ <KEYWORD3>erase</KEYWORD3>
+ <KEYWORD3>mer</KEYWORD3>
+ <KEYWORD3>merg</KEYWORD3>
+ <KEYWORD3>merge</KEYWORD3>
+ <KEYWORD3>preserve</KEYWORD3>
+ <KEYWORD3>restore</KEYWORD3>
+ <KEYWORD3>rm</KEYWORD3>
+ <KEYWORD3>using</KEYWORD3>
+ <KEYWORD3>use</KEYWORD3>
+ <KEYWORD3>save</KEYWORD3>
+ <KEYWORD3>sav</KEYWORD3>
+ <KEYWORD3>xmlsave</KEYWORD3>
+ <KEYWORD3>xmluse</KEYWORD3>
+
+ <!-- Data management and programming keywords: -->
+ <KEYWORD2>_estimates</KEYWORD2>
+ <KEYWORD2>_return</KEYWORD2>
+ <KEYWORD2>accum</KEYWORD2>
+ <KEYWORD2>adopath</KEYWORD2>
+ <KEYWORD2>args</KEYWORD2>
+ <KEYWORD2>break</KEYWORD2>
+ <KEYWORD2>by</KEYWORD2>
+ <KEYWORD2>byable</KEYWORD2>
+ <KEYWORD2>bys</KEYWORD2>
+ <KEYWORD2>bysort</KEYWORD2>
+ <KEYWORD2>class</KEYWORD2>
+ <KEYWORD2>cap</KEYWORD2>
+ <KEYWORD2>capture</KEYWORD2>
+ <KEYWORD2>char</KEYWORD2>
+ <KEYWORD2>class</KEYWORD2>
+ <KEYWORD2>classutil</KEYWORD2>
+ <KEYWORD2>comments</KEYWORD2>
+ <KEYWORD2>compare</KEYWORD2>
+ <KEYWORD2>compress</KEYWORD2>
+ <KEYWORD2>confirm</KEYWORD2>
+ <KEYWORD2>continue</KEYWORD2>
+ <KEYWORD2>creturn</KEYWORD2>
+ <KEYWORD2>define</KEYWORD2>
+ <!--<KEYWORD2>delimit</KEYWORD2>-->
+ <KEYWORD2>discard</KEYWORD2>
+ <KEYWORD2>dissimilarity</KEYWORD2>
+ <KEYWORD2>drop</KEYWORD2>
+ <KEYWORD2>eigenvalues</KEYWORD2>
+ <KEYWORD2>else</KEYWORD2>
+ <KEYWORD2>end</KEYWORD2>
+ <KEYWORD2>ereturn</KEYWORD2>
+ <KEYWORD2>expand</KEYWORD2>
+ <KEYWORD2>file</KEYWORD2>
+ <KEYWORD2>findfile</KEYWORD2>
+ <KEYWORD2>for</KEYWORD2>
+ <KEYWORD2>foreach</KEYWORD2>
+ <KEYWORD2>forvalues</KEYWORD2>
+ <KEYWORD2>get</KEYWORD2>
+ <KEYWORD2>if</KEYWORD2>
+ <KEYWORD2>in</KEYWORD2>
+ <KEYWORD2>keep</KEYWORD2>
+ <KEYWORD2>lab</KEYWORD2>
+ <KEYWORD2>labe</KEYWORD2>
+ <KEYWORD2>label</KEYWORD2>
+ <KEYWORD2>loc</KEYWORD2>
+ <KEYWORD2>loca</KEYWORD2>
+ <KEYWORD2>local</KEYWORD2>
+ <KEYWORD2>odbc</KEYWORD2>
+ <KEYWORD2>outfix</KEYWORD2>
+ <KEYWORD2>program</KEYWORD2>
+ <KEYWORD2>properties</KEYWORD2>
+ <KEYWORD2>recode</KEYWORD2>
+ <KEYWORD2>replace</KEYWORD2>
+ <KEYWORD2>return</KEYWORD2>
+ <KEYWORD2>rmsg</KEYWORD2>
+ <KEYWORD2>rownames</KEYWORD2>
+ <KEYWORD2>serset</KEYWORD2>
+ <KEYWORD2>so</KEYWORD2>
+ <KEYWORD2>sor</KEYWORD2>
+ <KEYWORD2>sort</KEYWORD2>
+ <KEYWORD2>sortpreserve</KEYWORD2>
+ <KEYWORD2>svd</KEYWORD2>
+ <KEYWORD2>symeigen</KEYWORD2>
+ <KEYWORD2>trace</KEYWORD2>
+ <KEYWORD2>unabcmd</KEYWORD2>
+ <KEYWORD2>utility</KEYWORD2>
+ <KEYWORD2>while</KEYWORD2>
+ <KEYWORD2>runtest</KEYWORD2>
+
+ <!-- Display keywords - most of thes keyword are covered inother sections-->
+ <KEYWORD1>di</KEYWORD1>
+ <KEYWORD1>disp</KEYWORD1>
+ <KEYWORD1>display</KEYWORD1>
+ <KEYWORD1>outtex</KEYWORD1>
+ <KEYWORD1>outreg</KEYWORD1>
+ <KEYWORD1>printf</KEYWORD1>
+ <KEYWORD1>count</KEYWORD1>
+ <KEYWORD1>describe</KEYWORD1>
+ <KEYWORD1>list</KEYWORD1>
+ <KEYWORD1>errprintf</KEYWORD1>
+ <KEYWORD1>more</KEYWORD1>
+ <KEYWORD1>cmdlog</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+
+ <!-- Unix-like i/o functions -->
+ <LITERAL3>dir</LITERAL3>
+ <LITERAL3>chdir</LITERAL3>
+ <LITERAL3>mkdir</LITERAL3>
+ <LITERAL3>rmdir</LITERAL3>
+ <LITERAL3>pwd</LITERAL3>
+ <LITERAL3>fileexists</LITERAL3>
+ <LITERAL3>cat</LITERAL3>
+ <LITERAL3>unlink</LITERAL3>
+ <!--<LITERAL3>erase</LITERAL3>-->
+ <LITERAL3>ls</LITERAL3>
+
+ <!-- Identifiers and variables -->
+ <KEYWORD2>byte</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>long</KEYWORD2>
+ <KEYWORD2>float</KEYWORD2>
+ <KEYWORD2>double</KEYWORD2>
+
+ <KEYWORD1>_rc</KEYWORD1>
+ <KEYWORD1>_b</KEYWORD1>
+ <KEYWORD1>_coef</KEYWORD1>
+ <KEYWORD1>_cons</KEYWORD1>
+ <KEYWORD1>_n</KEYWORD1>
+ <KEYWORD1>_N</KEYWORD1>
+ <KEYWORD1>_pi</KEYWORD1>
+ <KEYWORD1>_rc</KEYWORD1>
+ <KEYWORD1>_se</KEYWORD1>
+
+ <!-- Stata statistics functions from Stata 9: -->
+ <KEYWORD1>_3dax0</KEYWORD1>
+ <KEYWORD1>_3daxmin</KEYWORD1>
+ <KEYWORD1>_3daxout</KEYWORD1>
+ <KEYWORD1>_3daxtbl</KEYWORD1>
+ <KEYWORD1>_3ddflts</KEYWORD1>
+ <KEYWORD1>_3dmkdta</KEYWORD1>
+ <KEYWORD1>_3dmnmx</KEYWORD1>
+ <KEYWORD1>_3dproj</KEYWORD1>
+ <KEYWORD1>_3drproj</KEYWORD1>
+ <KEYWORD1>_3drshow</KEYWORD1>
+ <KEYWORD1>_3dshad</KEYWORD1>
+ <KEYWORD1>_3dsvusr</KEYWORD1>
+ <KEYWORD1>__GEEBT</KEYWORD1>
+ <KEYWORD1>__GEERC</KEYWORD1>
+ <KEYWORD1>__GEEUC</KEYWORD1>
+ <KEYWORD1>_a_cls_msg</KEYWORD1>
+ <KEYWORD1>_ac</KEYWORD1>
+ <KEYWORD1>_addgph</KEYWORD1>
+ <KEYWORD1>_addl</KEYWORD1>
+ <KEYWORD1>_addop</KEYWORD1>
+ <KEYWORD1>_adjksm</KEYWORD1>
+ <KEYWORD1>_assert</KEYWORD1>
+ <KEYWORD1>_assert_mreldif</KEYWORD1>
+ <KEYWORD1>_assert_mreldifp</KEYWORD1>
+ <KEYWORD1>_assert_mreldifs</KEYWORD1>
+ <KEYWORD1>_assert_obs</KEYWORD1>
+ <KEYWORD1>_assert_streq</KEYWORD1>
+ <KEYWORD1>_at</KEYWORD1>
+ <KEYWORD1>_bigtab</KEYWORD1>
+ <KEYWORD1>_binperfect</KEYWORD1>
+ <KEYWORD1>_binperfout</KEYWORD1>
+ <KEYWORD1>_biplotmat</KEYWORD1>
+ <KEYWORD1>_brr_sum</KEYWORD1>
+ <KEYWORD1>_bs_display</KEYWORD1>
+ <KEYWORD1>_bs_sum</KEYWORD1>
+ <KEYWORD1>_bsqreg</KEYWORD1>
+ <KEYWORD1>_btcmd</KEYWORD1>
+ <KEYWORD1>_byobs</KEYWORD1>
+ <KEYWORD1>_byoptnotallowed</KEYWORD1>
+ <KEYWORD1>_ca_parse_normalize</KEYWORD1>
+ <KEYWORD1>_ca_process_mlabel</KEYWORD1>
+ <KEYWORD1>_callerr</KEYWORD1>
+ <KEYWORD1>_cci</KEYWORD1>
+ <KEYWORD1>_check4gropts</KEYWORD1>
+ <KEYWORD1>_check_eformopt</KEYWORD1>
+ <KEYWORD1>_choice_table</KEYWORD1>
+ <KEYWORD1>_ckirfset</KEYWORD1>
+ <KEYWORD1>_cknotsvaroi</KEYWORD1>
+ <KEYWORD1>_ckvec</KEYWORD1>
+ <KEYWORD1>_clsarr2list</KEYWORD1>
+ <KEYWORD1>_cmdxel</KEYWORD1>
+ <KEYWORD1>_coef_table</KEYWORD1>
+ <KEYWORD1>_coef_table_header</KEYWORD1>
+ <KEYWORD1>_column</KEYWORD1>
+ <KEYWORD1>_confirm_date</KEYWORD1>
+ <KEYWORD1>_confirm_number_or_date</KEYWORD1>
+ <KEYWORD1>_copy_mat_stripes</KEYWORD1>
+ <KEYWORD1>_cpmatnm</KEYWORD1>
+ <KEYWORD1>_cr1form</KEYWORD1>
+ <KEYWORD1>_cr1invt</KEYWORD1>
+ <KEYWORD1>_cr1se</KEYWORD1>
+ <KEYWORD1>_cr1t</KEYWORD1>
+ <KEYWORD1>_crc2use</KEYWORD1>
+ <KEYWORD1>_crc4fld</KEYWORD1>
+ <KEYWORD1>_crcacnt</KEYWORD1>
+ <KEYWORD1>_crcar1</KEYWORD1>
+ <KEYWORD1>_crcause</KEYWORD1>
+ <KEYWORD1>_crcbcrt</KEYWORD1>
+ <KEYWORD1>_crcbin</KEYWORD1>
+ <KEYWORD1>_crcbygr</KEYWORD1>
+ <KEYWORD1>_crcchi2</KEYWORD1>
+ <KEYWORD1>_crcchkt</KEYWORD1>
+ <KEYWORD1>_crcchkw</KEYWORD1>
+ <KEYWORD1>_crcci</KEYWORD1>
+ <KEYWORD1>_crccip</KEYWORD1>
+ <KEYWORD1>_crceprs</KEYWORD1>
+ <KEYWORD1>_crcexn1</KEYWORD1>
+ <KEYWORD1>_crcexn2</KEYWORD1>
+ <KEYWORD1>_crcexn4</KEYWORD1>
+ <KEYWORD1>_crcexn5</KEYWORD1>
+ <KEYWORD1>_crcexn6</KEYWORD1>
+ <KEYWORD1>_crcexn7</KEYWORD1>
+ <KEYWORD1>_crcexn8</KEYWORD1>
+ <KEYWORD1>_crcexn9</KEYWORD1>
+ <KEYWORD1>_crcexna</KEYWORD1>
+ <KEYWORD1>_crcexnb</KEYWORD1>
+ <KEYWORD1>_crcexnc</KEYWORD1>
+ <KEYWORD1>_crcexnd</KEYWORD1>
+ <KEYWORD1>_crcexne</KEYWORD1>
+ <KEYWORD1>_crcexnf</KEYWORD1>
+ <KEYWORD1>_crcexnt</KEYWORD1>
+ <KEYWORD1>_crcgldv</KEYWORD1>
+ <KEYWORD1>_crcglil</KEYWORD1>
+ <KEYWORD1>_crcichi</KEYWORD1>
+ <KEYWORD1>_crcird</KEYWORD1>
+ <KEYWORD1>_crcirr</KEYWORD1>
+ <KEYWORD1>_crcksm</KEYWORD1>
+ <KEYWORD1>_crclf</KEYWORD1>
+ <KEYWORD1>_crcmeq</KEYWORD1>
+ <KEYWORD1>_crcmiss</KEYWORD1>
+ <KEYWORD1>_crcnlou</KEYWORD1>
+ <KEYWORD1>_crcnms2</KEYWORD1>
+ <KEYWORD1>_crcnuse</KEYWORD1>
+ <KEYWORD1>_crcor</KEYWORD1>
+ <KEYWORD1>_crcphdr</KEYWORD1>
+ <KEYWORD1>_crcplst</KEYWORD1>
+ <KEYWORD1>_crcra</KEYWORD1>
+ <KEYWORD1>_crcrd</KEYWORD1>
+ <KEYWORD1>_crcrnfd</KEYWORD1>
+ <KEYWORD1>_crcrr</KEYWORD1>
+ <KEYWORD1>_crcrsfl</KEYWORD1>
+ <KEYWORD1>_crcseq</KEYWORD1>
+ <KEYWORD1>_crcshdr</KEYWORD1>
+ <KEYWORD1>_crcslbl</KEYWORD1>
+ <KEYWORD1>_crcsrv2</KEYWORD1>
+ <KEYWORD1>_crcsrvc</KEYWORD1>
+ <KEYWORD1>_crcstep</KEYWORD1>
+ <KEYWORD1>_crcswxx</KEYWORD1>
+ <KEYWORD1>_crct</KEYWORD1>
+ <KEYWORD1>_crctmge</KEYWORD1>
+ <KEYWORD1>_crcunab</KEYWORD1>
+ <KEYWORD1>_crcunit</KEYWORD1>
+ <KEYWORD1>_crcvarl</KEYWORD1>
+ <KEYWORD1>_crcwsrv</KEYWORD1>
+ <KEYWORD1>_crczsku</KEYWORD1>
+ <KEYWORD1>_cu_c0</KEYWORD1>
+ <KEYWORD1>_cvar</KEYWORD1>
+ <KEYWORD1>_date2elapsed</KEYWORD1>
+ <KEYWORD1>_diag2mat</KEYWORD1>
+ <KEYWORD1>_diparm</KEYWORD1>
+ <KEYWORD1>_diparm_8</KEYWORD1>
+ <KEYWORD1>_dm_create</KEYWORD1>
+ <KEYWORD1>_dots</KEYWORD1>
+ <KEYWORD1>_e2r</KEYWORD1>
+ <KEYWORD1>_egennoby</KEYWORD1>
+ <KEYWORD1>_evlist</KEYWORD1>
+ <KEYWORD1>_exp_list_expand</KEYWORD1>
+ <KEYWORD1>_exp_list_parse</KEYWORD1>
+ <KEYWORD1>_find_tsops</KEYWORD1>
+ <KEYWORD1>_fr_area_parse_and_log</KEYWORD1>
+ <KEYWORD1>_fr_aspect_parse_and_log</KEYWORD1>
+ <KEYWORD1>_fr_draw_rect</KEYWORD1>
+ <KEYWORD1>_fr_droplines_draw</KEYWORD1>
+ <KEYWORD1>_fr_erasearr</KEYWORD1>
+ <KEYWORD1>_fr_legend_parse_and_log</KEYWORD1>
+ <KEYWORD1>_fr_merged_implicit</KEYWORD1>
+ <KEYWORD1>_fr_runlog</KEYWORD1>
+ <KEYWORD1>_fr_sztextbox_parse_and_log</KEYWORD1>
+ <KEYWORD1>_fr_tbstyle_parse_and_log</KEYWORD1>
+ <KEYWORD1>_fr_tedits_parse_and_log</KEYWORD1>
+ <KEYWORD1>_fr_textbox_parse_and_log</KEYWORD1>
+ <KEYWORD1>_fr_title_parse_and_log</KEYWORD1>
+ <KEYWORD1>_fr_x_log_cleanup</KEYWORD1>
+ <KEYWORD1>_fr_x_log_create</KEYWORD1>
+ <KEYWORD1>_fracchk</KEYWORD1>
+ <KEYWORD1>_fraccox</KEYWORD1>
+ <KEYWORD1>_fracddp</KEYWORD1>
+ <KEYWORD1>_fracdis</KEYWORD1>
+ <KEYWORD1>_fracdv</KEYWORD1>
+ <KEYWORD1>_fracin</KEYWORD1>
+ <KEYWORD1>_fracmdp</KEYWORD1>
+ <KEYWORD1>_fracord</KEYWORD1>
+ <KEYWORD1>_fracpp</KEYWORD1>
+ <KEYWORD1>_fracpv</KEYWORD1>
+ <KEYWORD1>_fracrep</KEYWORD1>
+ <KEYWORD1>_fracwgt</KEYWORD1>
+ <KEYWORD1>_fracxo</KEYWORD1>
+ <KEYWORD1>_frr_sztextbox_pnl</KEYWORD1>
+ <KEYWORD1>_gany</KEYWORD1>
+ <KEYWORD1>_ganycount</KEYWORD1>
+ <KEYWORD1>_ganymatch</KEYWORD1>
+ <KEYWORD1>_ganyvalue</KEYWORD1>
+ <KEYWORD1>_gconcat</KEYWORD1>
+ <KEYWORD1>_gcount</KEYWORD1>
+ <KEYWORD1>_gcut</KEYWORD1>
+ <KEYWORD1>_gdiff</KEYWORD1>
+ <KEYWORD1>_gends</KEYWORD1>
+ <KEYWORD1>_geqany</KEYWORD1>
+ <KEYWORD1>_get_diparmopts</KEYWORD1>
+ <KEYWORD1>_get_diparmopts_8</KEYWORD1>
+ <KEYWORD1>_get_eformopts</KEYWORD1>
+ <KEYWORD1>_get_eqspec</KEYWORD1>
+ <KEYWORD1>_get_gropts</KEYWORD1>
+ <KEYWORD1>_get_irf</KEYWORD1>
+ <KEYWORD1>_get_offopt</KEYWORD1>
+ <KEYWORD1>_getbv</KEYWORD1>
+ <KEYWORD1>_getcovcorr</KEYWORD1>
+ <KEYWORD1>_getfilename</KEYWORD1>
+ <KEYWORD1>_getnewlabelname</KEYWORD1>
+ <KEYWORD1>_getrhs</KEYWORD1>
+ <KEYWORD1>_getrres</KEYWORD1>
+ <KEYWORD1>_getvarcns</KEYWORD1>
+ <KEYWORD1>_getxel</KEYWORD1>
+ <KEYWORD1>_getxel2</KEYWORD1>
+ <KEYWORD1>_gfill</KEYWORD1>
+ <KEYWORD1>_ggroup</KEYWORD1>
+ <KEYWORD1>_giqr</KEYWORD1>
+ <KEYWORD1>_gkurt</KEYWORD1>
+ <KEYWORD1>_gladder</KEYWORD1>
+ <KEYWORD1>_glmfl</KEYWORD1>
+ <KEYWORD1>_glmilnk</KEYWORD1>
+ <KEYWORD1>_glmmapf</KEYWORD1>
+ <KEYWORD1>_glmmapl</KEYWORD1>
+ <KEYWORD1>_glmresd</KEYWORD1>
+ <KEYWORD1>_glmrpt</KEYWORD1>
+ <KEYWORD1>_glmwgt</KEYWORD1>
+ <KEYWORD1>_gm_edit</KEYWORD1>
+ <KEYWORD1>_gm_log</KEYWORD1>
+ <KEYWORD1>_gma</KEYWORD1>
+ <KEYWORD1>_gmad</KEYWORD1>
+ <KEYWORD1>_gmax</KEYWORD1>
+ <KEYWORD1>_gmdev</KEYWORD1>
+ <KEYWORD1>_gmdmean</KEYWORD1>
+ <KEYWORD1>_gmdmed</KEYWORD1>
+ <KEYWORD1>_gmean</KEYWORD1>
+ <KEYWORD1>_gmedian</KEYWORD1>
+ <KEYWORD1>_gmin</KEYWORD1>
+ <KEYWORD1>_gmode</KEYWORD1>
+ <KEYWORD1>_gmtr</KEYWORD1>
+ <KEYWORD1>_gneqany</KEYWORD1>
+ <KEYWORD1>_gpc</KEYWORD1>
+ <KEYWORD1>_gpctile</KEYWORD1>
+ <KEYWORD1>_gr_arrowhead</KEYWORD1>
+ <KEYWORD1>_gr_atomize_styles</KEYWORD1>
+ <KEYWORD1>_gr_common_axes</KEYWORD1>
+ <KEYWORD1>_gr_drawrect</KEYWORD1>
+ <KEYWORD1>_gr_linkstyles</KEYWORD1>
+ <KEYWORD1>_gr_symbol_of</KEYWORD1>
+ <KEYWORD1>_grank</KEYWORD1>
+ <KEYWORD1>_grank2</KEYWORD1>
+ <KEYWORD1>_grfirst</KEYWORD1>
+ <KEYWORD1>_grlast</KEYWORD1>
+ <KEYWORD1>_grmax</KEYWORD1>
+ <KEYWORD1>_grmean</KEYWORD1>
+ <KEYWORD1>_grmin</KEYWORD1>
+ <KEYWORD1>_grmiss</KEYWORD1>
+ <KEYWORD1>_grmiss2</KEYWORD1>
+ <KEYWORD1>_grobs</KEYWORD1>
+ <KEYWORD1>_growfirst</KEYWORD1>
+ <KEYWORD1>_growlast</KEYWORD1>
+ <KEYWORD1>_growmax</KEYWORD1>
+ <KEYWORD1>_growmean</KEYWORD1>
+ <KEYWORD1>_growmin</KEYWORD1>
+ <KEYWORD1>_growmiss</KEYWORD1>
+ <KEYWORD1>_grownonmiss</KEYWORD1>
+ <KEYWORD1>_growsd</KEYWORD1>
+ <KEYWORD1>_growtotal</KEYWORD1>
+ <KEYWORD1>_grsd</KEYWORD1>
+ <KEYWORD1>_grsum</KEYWORD1>
+ <KEYWORD1>_gs_addgrname</KEYWORD1>
+ <KEYWORD1>_gs_bygraph</KEYWORD1>
+ <KEYWORD1>_gs_clean_graphlist</KEYWORD1>
+ <KEYWORD1>_gs_default_bands</KEYWORD1>
+ <KEYWORD1>_gs_islivefile</KEYWORD1>
+ <KEYWORD1>_gs_parse_and_log_axoptions</KEYWORD1>
+ <KEYWORD1>_gs_parse_and_log_axtitle</KEYWORD1>
+ <KEYWORD1>_gs_parse_and_log_lines</KEYWORD1>
+ <KEYWORD1>_gs_parse_and_log_tickset</KEYWORD1>
+ <KEYWORD1>_gs_rdfilehdr</KEYWORD1>
+ <KEYWORD1>_gs_wrfilehdr</KEYWORD1>
+ <KEYWORD1>_gs_x_create</KEYWORD1>
+ <KEYWORD1>_gsd</KEYWORD1>
+ <KEYWORD1>_gseq</KEYWORD1>
+ <KEYWORD1>_gskew</KEYWORD1>
+ <KEYWORD1>_gsrank</KEYWORD1>
+ <KEYWORD1>_gstd</KEYWORD1>
+ <KEYWORD1>_gsum</KEYWORD1>
+ <KEYWORD1>_gtag</KEYWORD1>
+ <KEYWORD1>_gtma</KEYWORD1>
+ <KEYWORD1>_gtotal</KEYWORD1>
+ <KEYWORD1>_gtrank</KEYWORD1>
+ <KEYWORD1>_hadamard_verify</KEYWORD1>
+ <KEYWORD1>_hu</KEYWORD1>
+ <KEYWORD1>_hub</KEYWORD1>
+ <KEYWORD1>_hube</KEYWORD1>
+ <KEYWORD1>_huber</KEYWORD1>
+ <KEYWORD1>_hw_comp</KEYWORD1>
+ <KEYWORD1>_hw_opt_d0</KEYWORD1>
+ <KEYWORD1>_hwsa_comp</KEYWORD1>
+ <KEYWORD1>_hwsa_opt_d0</KEYWORD1>
+ <KEYWORD1>_hwsm_comp</KEYWORD1>
+ <KEYWORD1>_hwsm_opt_d0</KEYWORD1>
+ <KEYWORD1>_inlist</KEYWORD1>
+ <KEYWORD1>_invlist</KEYWORD1>
+ <KEYWORD1>_isfit</KEYWORD1>
+ <KEYWORD1>_ivreg_project</KEYWORD1>
+ <KEYWORD1>_jk_nlegend</KEYWORD1>
+ <KEYWORD1>_jk_pseudo</KEYWORD1>
+ <KEYWORD1>_jk_sum</KEYWORD1>
+ <KEYWORD1>_jprfpdt</KEYWORD1>
+ <KEYWORD1>_jprfpdx</KEYWORD1>
+ <KEYWORD1>_jprfpfp</KEYWORD1>
+ <KEYWORD1>_jprfpgn</KEYWORD1>
+ <KEYWORD1>_jprfpin</KEYWORD1>
+ <KEYWORD1>_jprfplx</KEYWORD1>
+ <KEYWORD1>_jprfpmm</KEYWORD1>
+ <KEYWORD1>_jprfppp</KEYWORD1>
+ <KEYWORD1>_jprfpre</KEYWORD1>
+ <KEYWORD1>_jprfprp</KEYWORD1>
+ <KEYWORD1>_jprfpse</KEYWORD1>
+ <KEYWORD1>_jprfptp</KEYWORD1>
+ <KEYWORD1>_jprfpxo</KEYWORD1>
+ <KEYWORD1>_jprglef</KEYWORD1>
+ <KEYWORD1>_jprglfl</KEYWORD1>
+ <KEYWORD1>_jprglil</KEYWORD1>
+ <KEYWORD1>_jprglld</KEYWORD1>
+ <KEYWORD1>_jprglwz</KEYWORD1>
+ <KEYWORD1>_jprxrpa</KEYWORD1>
+ <KEYWORD1>_kalman1</KEYWORD1>
+ <KEYWORD1>_ksmwrk</KEYWORD1>
+ <KEYWORD1>_labels2names</KEYWORD1>
+ <KEYWORD1>_ldrtest</KEYWORD1>
+ <KEYWORD1>_linemax</KEYWORD1>
+ <KEYWORD1>_line</KEYWORD1>
+ <KEYWORD1>_lines</KEYWORD1>
+ <KEYWORD1>_loop_brr</KEYWORD1>
+ <KEYWORD1>_loop_jknife</KEYWORD1>
+ <KEYWORD1>_loop_jknife2</KEYWORD1>
+ <KEYWORD1>_loop_jknife_fw</KEYWORD1>
+ <KEYWORD1>_loop_jknife_iw</KEYWORD1>
+ <KEYWORD1>_loop_rw</KEYWORD1>
+ <KEYWORD1>_lrtest7</KEYWORD1>
+ <KEYWORD1>_m2matrix</KEYWORD1>
+ <KEYWORD1>_m2scalar</KEYWORD1>
+ <KEYWORD1>_maked</KEYWORD1>
+ <KEYWORD1>_mat_clean_coleq</KEYWORD1>
+ <KEYWORD1>_matplot</KEYWORD1>
+ <KEYWORD1>_matsort</KEYWORD1>
+ <KEYWORD1>_mdisplay</KEYWORD1>
+ <KEYWORD1>_mds_classical</KEYWORD1>
+ <KEYWORD1>_mds_dataheader</KEYWORD1>
+ <KEYWORD1>_mds_display</KEYWORD1>
+ <KEYWORD1>_mds_display_classical</KEYWORD1>
+ <KEYWORD1>_mds_euclidean</KEYWORD1>
+ <KEYWORD1>_mds_parse_dopts</KEYWORD1>
+ <KEYWORD1>_mds_parse_method</KEYWORD1>
+ <KEYWORD1>_mds_parse_s2d</KEYWORD1>
+ <KEYWORD1>_mds_s2d</KEYWORD1>
+ <KEYWORD1>_me_der</KEYWORD1>
+ <KEYWORD1>_me_der2</KEYWORD1>
+ <KEYWORD1>_me_derb</KEYWORD1>
+ <KEYWORD1>_me_derd</KEYWORD1>
+ <KEYWORD1>_me_l_der</KEYWORD1>
+ <KEYWORD1>_me_l_der2</KEYWORD1>
+ <KEYWORD1>_mfrmvec</KEYWORD1>
+ <KEYWORD1>_mka2</KEYWORD1>
+ <KEYWORD1>_mkg</KEYWORD1>
+ <KEYWORD1>_mkkmn</KEYWORD1>
+ <KEYWORD1>_mksigma</KEYWORD1>
+ <KEYWORD1>_mkvec</KEYWORD1>
+ <KEYWORD1>_mprobitestimator</KEYWORD1>
+ <KEYWORD1>_mtest</KEYWORD1>
+ <KEYWORD1>_mvec</KEYWORD1>
+ <KEYWORD1>_newey</KEYWORD1>
+ <KEYWORD1>_nlout</KEYWORD1>
+ <KEYWORD1>_no_estat</KEYWORD1>
+ <KEYWORD1>_no_predict</KEYWORD1>
+ <KEYWORD1>_nobs</KEYWORD1>
+ <KEYWORD1>_on_colon_parse</KEYWORD1>
+ <KEYWORD1>_opnum</KEYWORD1>
+ <KEYWORD1>_parmlist</KEYWORD1>
+ <KEYWORD1>_parse_optexp</KEYWORD1>
+ <KEYWORD1>_parsevl</KEYWORD1>
+ <KEYWORD1>_parsewt</KEYWORD1>
+ <KEYWORD1>_partset</KEYWORD1>
+ <KEYWORD1>_pctile</KEYWORD1>
+ <KEYWORD1>_pk_p</KEYWORD1>
+ <KEYWORD1>_plotpos</KEYWORD1>
+ <KEYWORD1>_pred_me</KEYWORD1>
+ <KEYWORD1>_pred_missings</KEYWORD1>
+ <KEYWORD1>_pred_rules</KEYWORD1>
+ <KEYWORD1>_pred_se</KEYWORD1>
+ <KEYWORD1>_predict</KEYWORD1>
+ <KEYWORD1>_prefix_check4esample</KEYWORD1>
+ <KEYWORD1>_prefix_checkopt</KEYWORD1>
+ <KEYWORD1>_prefix_clear</KEYWORD1>
+ <KEYWORD1>_prefix_command</KEYWORD1>
+ <KEYWORD1>_prefix_depvarblocklist</KEYWORD1>
+ <KEYWORD1>_prefix_display</KEYWORD1>
+ <KEYWORD1>_prefix_expand</KEYWORD1>
+ <KEYWORD1>_prefix_explist</KEYWORD1>
+ <KEYWORD1>_prefix_footnote</KEYWORD1>
+ <KEYWORD1>_prefix_getchars</KEYWORD1>
+ <KEYWORD1>_prefix_getmat</KEYWORD1>
+ <KEYWORD1>_prefix_legend</KEYWORD1>
+ <KEYWORD1>_prefix_mlogit</KEYWORD1>
+ <KEYWORD1>_prefix_model_test</KEYWORD1>
+ <KEYWORD1>_prefix_note</KEYWORD1>
+ <KEYWORD1>_prefix_reject</KEYWORD1>
+ <KEYWORD1>_prefix_relabel_eqns</KEYWORD1>
+ <KEYWORD1>_prefix_run_error</KEYWORD1>
+ <KEYWORD1>_prefix_saving</KEYWORD1>
+ <KEYWORD1>_prefix_title</KEYWORD1>
+ <KEYWORD1>_prefix_varblocklist</KEYWORD1>
+ <KEYWORD1>_prefix_vcenotallowed</KEYWORD1>
+ <KEYWORD1>_qreg</KEYWORD1>
+ <KEYWORD1>_qregwls</KEYWORD1>
+ <KEYWORD1>_qsort_index</KEYWORD1>
+ <KEYWORD1>_qsur</KEYWORD1>
+ <KEYWORD1>_r2e</KEYWORD1>
+ <KEYWORD1>_repart</KEYWORD1>
+ <KEYWORD1>_repost</KEYWORD1>
+ <KEYWORD1>_resample_warn</KEYWORD1>
+ <KEYWORD1>_restore_labels</KEYWORD1>
+ <KEYWORD1>_result</KEYWORD1>
+ <KEYWORD1>_returnclear</KEYWORD1>
+ <KEYWORD1>_rmcoll</KEYWORD1>
+ <KEYWORD1>_rmcollright</KEYWORD1>
+ <KEYWORD1>_rmdcoll</KEYWORD1>
+ <KEYWORD1>_robksm</KEYWORD1>
+ <KEYWORD1>_robust</KEYWORD1>
+ <KEYWORD1>_robust2</KEYWORD1>
+ <KEYWORD1>_roccom1</KEYWORD1>
+ <KEYWORD1>_roccom1_8</KEYWORD1>
+ <KEYWORD1>_rocsen</KEYWORD1>
+ <KEYWORD1>_rotate_clear</KEYWORD1>
+ <KEYWORD1>_rotate_text</KEYWORD1>
+ <KEYWORD1>_score_spec</KEYWORD1>
+ <KEYWORD1>_sep_varsylags</KEYWORD1>
+ <KEYWORD1>_set_irf_vars</KEYWORD1>
+ <KEYWORD1>_sfran</KEYWORD1>
+ <KEYWORD1>_shortenpath</KEYWORD1>
+ <KEYWORD1>_sigfm</KEYWORD1>
+ <KEYWORD1>_small2dotz</KEYWORD1>
+ <KEYWORD1>_stata_internalerror</KEYWORD1>
+ <KEYWORD1>_stcurv</KEYWORD1>
+ <KEYWORD1>_strip_labels</KEYWORD1>
+ <KEYWORD1>_sttrend</KEYWORD1>
+ <KEYWORD1>_stubstar2names</KEYWORD1>
+ <KEYWORD1>_subchar</KEYWORD1>
+ <KEYWORD1>_sum_table</KEYWORD1>
+ <KEYWORD1>_sumaccum</KEYWORD1>
+ <KEYWORD1>_sunflower_binar</KEYWORD1>
+ <KEYWORD1>_svar_cnsmac</KEYWORD1>
+ <KEYWORD1>_svar_eqmac</KEYWORD1>
+ <KEYWORD1>_svar_newcns</KEYWORD1>
+ <KEYWORD1>_svar_post</KEYWORD1>
+ <KEYWORD1>_svard2</KEYWORD1>
+ <KEYWORD1>_svariden</KEYWORD1>
+ <KEYWORD1>_svaridenlr</KEYWORD1>
+ <KEYWORD1>_svarlrd2</KEYWORD1>
+ <KEYWORD1>_svd</KEYWORD1>
+ <KEYWORD1>_svy</KEYWORD1>
+ <KEYWORD1>_svy2</KEYWORD1>
+ <KEYWORD1>_svy_check_cmdopts</KEYWORD1>
+ <KEYWORD1>_svy_check_fpc</KEYWORD1>
+ <KEYWORD1>_svy_check_postw</KEYWORD1>
+ <KEYWORD1>_svy_check_predict</KEYWORD1>
+ <KEYWORD1>_svy_check_vce</KEYWORD1>
+ <KEYWORD1>_svy_fpc_note</KEYWORD1>
+ <KEYWORD1>_svy_ftest</KEYWORD1>
+ <KEYWORD1>_svy_ivreg_first</KEYWORD1>
+ <KEYWORD1>_svy_mkdeff</KEYWORD1>
+ <KEYWORD1>_svy_mkmeff</KEYWORD1>
+ <KEYWORD1>_svy_mkvmsp</KEYWORD1>
+ <KEYWORD1>_svy_mkvsrs</KEYWORD1>
+ <KEYWORD1>_svy_newrule</KEYWORD1>
+ <KEYWORD1>_svy_setup</KEYWORD1>
+ <KEYWORD1>_svy_singleton_note</KEYWORD1>
+ <KEYWORD1>_svy_subpop</KEYWORD1>
+ <KEYWORD1>_svy_subpop_note</KEYWORD1>
+ <KEYWORD1>_svy_summarize</KEYWORD1>
+ <KEYWORD1>_svy_summarize_legend</KEYWORD1>
+ <KEYWORD1>_svy_tabulate</KEYWORD1>
+ <KEYWORD1>_svydes_dlg</KEYWORD1>
+ <KEYWORD1>_svylc</KEYWORD1>
+ <KEYWORD1>_svyset</KEYWORD1>
+ <KEYWORD1>_sw_lik</KEYWORD1>
+ <KEYWORD1>_sw_lik2</KEYWORD1>
+ <KEYWORD1>_sw_ood</KEYWORD1>
+ <KEYWORD1>_ts</KEYWORD1>
+ <KEYWORD1>_ts_dexp</KEYWORD1>
+ <KEYWORD1>_ts_dsmp</KEYWORD1>
+ <KEYWORD1>_ts_exp</KEYWORD1>
+ <KEYWORD1>_ts_flag</KEYWORD1>
+ <KEYWORD1>_ts_gdat</KEYWORD1>
+ <KEYWORD1>_ts_hw</KEYWORD1>
+ <KEYWORD1>_ts_hwsa</KEYWORD1>
+ <KEYWORD1>_ts_hwsm</KEYWORD1>
+ <KEYWORD1>_ts_meqn</KEYWORD1>
+ <KEYWORD1>_ts_pars</KEYWORD1>
+ <KEYWORD1>_ts_peri</KEYWORD1>
+ <KEYWORD1>_tsheadr</KEYWORD1>
+ <KEYWORD1>_tsinchk</KEYWORD1>
+ <KEYWORD1>_tsma</KEYWORD1>
+ <KEYWORD1>_ttest</KEYWORD1>
+ <KEYWORD1>_ttest1</KEYWORD1>
+ <KEYWORD1>_ttest2</KEYWORD1>
+ <KEYWORD1>_tutends</KEYWORD1>
+ <KEYWORD1>_tx_mtr1</KEYWORD1>
+ <KEYWORD1>_tx_mtr2</KEYWORD1>
+ <KEYWORD1>_tx_mtr3</KEYWORD1>
+ <KEYWORD1>_tx_mtr4</KEYWORD1>
+ <KEYWORD1>_tx_mtr5</KEYWORD1>
+ <KEYWORD1>_tx_rpl</KEYWORD1>
+ <KEYWORD1>_var_mka</KEYWORD1>
+ <KEYWORD1>_varbsf</KEYWORD1>
+ <KEYWORD1>_vardisprmse</KEYWORD1>
+ <KEYWORD1>_varfcast</KEYWORD1>
+ <KEYWORD1>_varfcast_clear</KEYWORD1>
+ <KEYWORD1>_varfcast_fcast</KEYWORD1>
+ <KEYWORD1>_varfcast_graph</KEYWORD1>
+ <KEYWORD1>_varirf</KEYWORD1>
+ <KEYWORD1>_varsim</KEYWORD1>
+ <KEYWORD1>_vce_parserun</KEYWORD1>
+ <KEYWORD1>_vec_ckgraph</KEYWORD1>
+ <KEYWORD1>_vec_dreduced</KEYWORD1>
+ <KEYWORD1>_vec_grcroots</KEYWORD1>
+ <KEYWORD1>_vec_opck</KEYWORD1>
+ <KEYWORD1>_vec_pgparse</KEYWORD1>
+ <KEYWORD1>_vec_pgridplots</KEYWORD1>
+ <KEYWORD1>_vec_postvar</KEYWORD1>
+ <KEYWORD1>_vecauxdisp</KEYWORD1>
+ <KEYWORD1>_vecfcast_compute</KEYWORD1>
+ <KEYWORD1>_vecfcast_compute_w</KEYWORD1>
+ <KEYWORD1>_vecgetacns</KEYWORD1>
+ <KEYWORD1>_vecgetcv</KEYWORD1>
+ <KEYWORD1>_vecgtn</KEYWORD1>
+ <KEYWORD1>_vecmka</KEYWORD1>
+ <KEYWORD1>_vecmkapvp</KEYWORD1>
+ <KEYWORD1>_vecmkce</KEYWORD1>
+ <KEYWORD1>_vecmkgam</KEYWORD1>
+ <KEYWORD1>_vecmksi</KEYWORD1>
+ <KEYWORD1>_vecmktrend</KEYWORD1>
+ <KEYWORD1>_vecortho</KEYWORD1>
+ <KEYWORD1>_vecpclean</KEYWORD1>
+ <KEYWORD1>_vectparse</KEYWORD1>
+ <KEYWORD1>_vecu</KEYWORD1>
+ <KEYWORD1>_virf_add</KEYWORD1>
+ <KEYWORD1>_virf_char</KEYWORD1>
+ <KEYWORD1>_virf_fck</KEYWORD1>
+ <KEYWORD1>_virf_mknewfile</KEYWORD1>
+ <KEYWORD1>_virf_nlen</KEYWORD1>
+ <KEYWORD1>_virf_use</KEYWORD1>
+ <KEYWORD1>_wkapm</KEYWORD1>
+ <KEYWORD1>_writenum</KEYWORD1>
+ <KEYWORD1>_wsrvcrv</KEYWORD1>
+ <KEYWORD1>_xtreg_chk_cl</KEYWORD1>
+ <KEYWORD1>_xtreg_chk_cl2</KEYWORD1>
+ <KEYWORD1>_xtrenorm</KEYWORD1>
+ <KEYWORD1>about</KEYWORD1>
+ <KEYWORD1>abs</KEYWORD1>
+ <KEYWORD1>ac</KEYWORD1>
+ <KEYWORD1>ac_7</KEYWORD1>
+ <KEYWORD1>acprplot</KEYWORD1>
+ <KEYWORD1>acprplot_7</KEYWORD1>
+ <KEYWORD1>adjust</KEYWORD1>
+ <KEYWORD1>ado</KEYWORD1>
+ <KEYWORD1>adopath</KEYWORD1>
+ <KEYWORD1>adoupdate</KEYWORD1>
+ <KEYWORD1>alpha</KEYWORD1>
+ <KEYWORD1>ameans</KEYWORD1>
+ <KEYWORD1>an</KEYWORD1>
+ <KEYWORD1>ano</KEYWORD1>
+ <KEYWORD1>anov</KEYWORD1>
+ <KEYWORD1>anova</KEYWORD1>
+ <KEYWORD1>anova_estat</KEYWORD1>
+ <KEYWORD1>anova_terms</KEYWORD1>
+ <KEYWORD1>anovadef</KEYWORD1>
+ <KEYWORD1>aorder</KEYWORD1>
+ <KEYWORD1>arch</KEYWORD1>
+ <KEYWORD1>arch_dr</KEYWORD1>
+ <KEYWORD1>arch_estat</KEYWORD1>
+ <KEYWORD1>arch_p</KEYWORD1>
+ <KEYWORD1>archlm</KEYWORD1>
+ <KEYWORD1>areg</KEYWORD1>
+ <KEYWORD1>areg_p</KEYWORD1>
+ <KEYWORD1>args</KEYWORD1>
+ <KEYWORD1>arima</KEYWORD1>
+ <KEYWORD1>arima_dr</KEYWORD1>
+ <KEYWORD1>arima_estat</KEYWORD1>
+ <KEYWORD1>arima_p</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>asmprobit</KEYWORD1>
+ <KEYWORD1>asmprobit_estat</KEYWORD1>
+ <KEYWORD1>asmprobit_lf</KEYWORD1>
+ <KEYWORD1>asmprobit_mfx__dlg</KEYWORD1>
+ <KEYWORD1>asmprobit_p</KEYWORD1>
+ <KEYWORD1>ass</KEYWORD1>
+ <KEYWORD1>asse</KEYWORD1>
+ <KEYWORD1>asser</KEYWORD1>
+ <KEYWORD1>assert</KEYWORD1>
+ <KEYWORD1>avplot</KEYWORD1>
+ <KEYWORD1>avplot_7</KEYWORD1>
+ <KEYWORD1>avplots</KEYWORD1>
+ <KEYWORD1>avplots_7</KEYWORD1>
+ <KEYWORD1>bcskew0</KEYWORD1>
+ <KEYWORD1>be</KEYWORD1>
+ <KEYWORD1>bee</KEYWORD1>
+ <KEYWORD1>beep</KEYWORD1>
+ <KEYWORD1>bgodfrey</KEYWORD1>
+ <KEYWORD1>binreg</KEYWORD1>
+ <KEYWORD1>bip0_lf</KEYWORD1>
+ <KEYWORD1>bip0_lf7</KEYWORD1>
+ <KEYWORD1>biplot</KEYWORD1>
+ <KEYWORD1>bipp_lf</KEYWORD1>
+ <KEYWORD1>bipp_lf7</KEYWORD1>
+ <KEYWORD1>bipr_lf</KEYWORD1>
+ <KEYWORD1>bipr_lf7</KEYWORD1>
+ <KEYWORD1>bipr_p</KEYWORD1>
+ <KEYWORD1>bipr_p7</KEYWORD1>
+ <KEYWORD1>biprobit</KEYWORD1>
+ <KEYWORD1>biprobit7</KEYWORD1>
+ <KEYWORD1>bitest</KEYWORD1>
+ <KEYWORD1>bitesti</KEYWORD1>
+ <KEYWORD1>bitowt</KEYWORD1>
+ <KEYWORD1>blogit</KEYWORD1>
+ <KEYWORD1>bmemsize</KEYWORD1>
+ <KEYWORD1>boot</KEYWORD1>
+ <KEYWORD1>bootsamp</KEYWORD1>
+ <KEYWORD1>bootstrap</KEYWORD1>
+ <KEYWORD1>bootstrap_8</KEYWORD1>
+ <KEYWORD1>boxco_l</KEYWORD1>
+ <KEYWORD1>boxco_p</KEYWORD1>
+ <KEYWORD1>boxcox</KEYWORD1>
+ <KEYWORD1>boxcox_6</KEYWORD1>
+ <KEYWORD1>boxcox_p</KEYWORD1>
+ <KEYWORD1>bprobit</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>brier</KEYWORD1>
+ <KEYWORD1>brr</KEYWORD1>
+ <KEYWORD1>brrstat</KEYWORD1>
+ <KEYWORD1>bs</KEYWORD1>
+ <KEYWORD1>bs_7</KEYWORD1>
+ <KEYWORD1>bsampl_w</KEYWORD1>
+ <KEYWORD1>bsample</KEYWORD1>
+ <KEYWORD1>bsample_7</KEYWORD1>
+ <KEYWORD1>bsqreg</KEYWORD1>
+ <KEYWORD1>bstat</KEYWORD1>
+ <KEYWORD1>bstat_7</KEYWORD1>
+ <KEYWORD1>bstat_8</KEYWORD1>
+ <KEYWORD1>bstrap</KEYWORD1>
+ <KEYWORD1>bstrap_7</KEYWORD1>
+ <KEYWORD1>c_local</KEYWORD1>
+ <KEYWORD1>ca</KEYWORD1>
+ <KEYWORD1>ca_estat</KEYWORD1>
+ <KEYWORD1>ca_p</KEYWORD1>
+ <KEYWORD1>cabiplot</KEYWORD1>
+ <KEYWORD1>camat</KEYWORD1>
+ <KEYWORD1>canon</KEYWORD1>
+ <KEYWORD1>canon_8</KEYWORD1>
+ <KEYWORD1>canon_8_p</KEYWORD1>
+ <KEYWORD1>canon_estat</KEYWORD1>
+ <KEYWORD1>canon_p</KEYWORD1>
+ <KEYWORD1>caprojection</KEYWORD1>
+ <KEYWORD1>cat</KEYWORD1>
+ <KEYWORD1>cc</KEYWORD1>
+ <KEYWORD1>cchart</KEYWORD1>
+ <KEYWORD1>cchart_7</KEYWORD1>
+ <KEYWORD1>cci</KEYWORD1>
+ <KEYWORD1>cd</KEYWORD1>
+ <KEYWORD1>censobs_table</KEYWORD1>
+ <KEYWORD1>centile</KEYWORD1>
+ <KEYWORD1>cf</KEYWORD1>
+ <KEYWORD1>char</KEYWORD1>
+ <KEYWORD1>chdir</KEYWORD1>
+ <KEYWORD1>checkdlgfiles</KEYWORD1>
+ <KEYWORD1>checkestimationsample</KEYWORD1>
+ <KEYWORD1>checkhlpfiles</KEYWORD1>
+ <KEYWORD1>checksum</KEYWORD1>
+ <KEYWORD1>ci</KEYWORD1>
+ <KEYWORD1>cii</KEYWORD1>
+ <KEYWORD1>cksum</KEYWORD1>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>clo</KEYWORD1>
+ <KEYWORD1>clocal</KEYWORD1>
+ <KEYWORD1>clog</KEYWORD1>
+ <KEYWORD1>clog_lf</KEYWORD1>
+ <KEYWORD1>clog_p</KEYWORD1>
+ <KEYWORD1>clogi</KEYWORD1>
+ <KEYWORD1>clogi_sw</KEYWORD1>
+ <KEYWORD1>clogit</KEYWORD1>
+ <KEYWORD1>clogit_lf</KEYWORD1>
+ <KEYWORD1>clogit_p</KEYWORD1>
+ <KEYWORD1>clogitp</KEYWORD1>
+ <KEYWORD1>clogl_sw</KEYWORD1>
+ <KEYWORD1>cloglog</KEYWORD1>
+ <KEYWORD1>clonevar</KEYWORD1>
+ <KEYWORD1>clslistarray</KEYWORD1>
+ <KEYWORD1>cluster</KEYWORD1>
+ <KEYWORD1>cluster_measures</KEYWORD1>
+ <KEYWORD1>cluster_stop</KEYWORD1>
+ <KEYWORD1>cluster_tree</KEYWORD1>
+ <KEYWORD1>cluster_tree_8</KEYWORD1>
+ <KEYWORD1>clustermat</KEYWORD1>
+ <KEYWORD1>cnr</KEYWORD1>
+ <KEYWORD1>cnre</KEYWORD1>
+ <KEYWORD1>cnreg</KEYWORD1>
+ <KEYWORD1>cnreg_p</KEYWORD1>
+ <KEYWORD1>cnreg_sw</KEYWORD1>
+ <KEYWORD1>cnsreg</KEYWORD1>
+ <KEYWORD1>codebook</KEYWORD1>
+ <KEYWORD1>collaps4</KEYWORD1>
+ <KEYWORD1>collapse</KEYWORD1>
+ <KEYWORD1>colormult_nb</KEYWORD1>
+ <KEYWORD1>colormult_nw</KEYWORD1>
+ <KEYWORD1>conf</KEYWORD1>
+ <KEYWORD1>confi</KEYWORD1>
+ <KEYWORD1>confir</KEYWORD1>
+ <KEYWORD1>confirm</KEYWORD1>
+ <KEYWORD1>conren</KEYWORD1>
+ <KEYWORD1>cons</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>constr</KEYWORD1>
+ <KEYWORD1>constra</KEYWORD1>
+ <KEYWORD1>constrai</KEYWORD1>
+ <KEYWORD1>constrain</KEYWORD1>
+ <KEYWORD1>constraint</KEYWORD1>
+ <KEYWORD1>contract</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>copyright</KEYWORD1>
+ <KEYWORD1>copysource</KEYWORD1>
+ <KEYWORD1>cor</KEYWORD1>
+ <KEYWORD1>corc</KEYWORD1>
+ <KEYWORD1>corr</KEYWORD1>
+ <KEYWORD1>corr2data</KEYWORD1>
+ <KEYWORD1>corr_anti</KEYWORD1>
+ <KEYWORD1>corr_kmo</KEYWORD1>
+ <KEYWORD1>corr_smc</KEYWORD1>
+ <KEYWORD1>corre</KEYWORD1>
+ <KEYWORD1>correl</KEYWORD1>
+ <KEYWORD1>correla</KEYWORD1>
+ <KEYWORD1>correlat</KEYWORD1>
+ <KEYWORD1>correlate</KEYWORD1>
+ <KEYWORD1>corrgram</KEYWORD1>
+ <KEYWORD1>cou</KEYWORD1>
+ <KEYWORD1>coun</KEYWORD1>
+ <KEYWORD1>count</KEYWORD1>
+ <KEYWORD1>cox</KEYWORD1>
+ <KEYWORD1>cox_p</KEYWORD1>
+ <KEYWORD1>cox_sw</KEYWORD1>
+ <KEYWORD1>coxbase</KEYWORD1>
+ <KEYWORD1>coxhaz</KEYWORD1>
+ <KEYWORD1>coxvar</KEYWORD1>
+ <KEYWORD1>cp</KEYWORD1>
+ <KEYWORD1>cprplot</KEYWORD1>
+ <KEYWORD1>cprplot_7</KEYWORD1>
+ <KEYWORD1>crc</KEYWORD1>
+ <KEYWORD1>cross</KEYWORD1>
+ <KEYWORD1>cs</KEYWORD1>
+ <KEYWORD1>cscript</KEYWORD1>
+ <KEYWORD1>cscript_log</KEYWORD1>
+ <KEYWORD1>csi</KEYWORD1>
+ <KEYWORD1>ct</KEYWORD1>
+ <KEYWORD1>ct_is</KEYWORD1>
+ <KEYWORD1>ctset</KEYWORD1>
+ <KEYWORD1>ctst_5</KEYWORD1>
+ <KEYWORD1>ctst_st</KEYWORD1>
+ <KEYWORD1>cttost</KEYWORD1>
+ <KEYWORD1>cumsp</KEYWORD1>
+ <KEYWORD1>cumsp_7</KEYWORD1>
+ <KEYWORD1>cumul</KEYWORD1>
+ <KEYWORD1>cusum</KEYWORD1>
+ <KEYWORD1>cusum_7</KEYWORD1>
+ <KEYWORD1>cutil</KEYWORD1>
+ <KEYWORD1>d</KEYWORD1>
+ <KEYWORD1>datetof</KEYWORD1>
+ <KEYWORD1>db</KEYWORD1>
+ <KEYWORD1>dbeta</KEYWORD1>
+ <KEYWORD1>de</KEYWORD1>
+ <KEYWORD1>debug</KEYWORD1>
+ <KEYWORD1>debugbuf</KEYWORD1>
+ <KEYWORD1>dec</KEYWORD1>
+ <KEYWORD1>deco</KEYWORD1>
+ <KEYWORD1>decod</KEYWORD1>
+ <KEYWORD1>decode</KEYWORD1>
+ <KEYWORD1>deff</KEYWORD1>
+ <KEYWORD1>des</KEYWORD1>
+ <KEYWORD1>desc</KEYWORD1>
+ <KEYWORD1>descr</KEYWORD1>
+ <KEYWORD1>descri</KEYWORD1>
+ <KEYWORD1>describ</KEYWORD1>
+ <KEYWORD1>describe</KEYWORD1>
+ <KEYWORD1>destring</KEYWORD1>
+ <KEYWORD1>dfbeta</KEYWORD1>
+ <KEYWORD1>dfgls</KEYWORD1>
+ <KEYWORD1>dfuller</KEYWORD1>
+ <KEYWORD1>diff</KEYWORD1>
+ <KEYWORD1>dir</KEYWORD1>
+ <KEYWORD1>dirstats</KEYWORD1>
+ <KEYWORD1>discard</KEYWORD1>
+ <KEYWORD1>disp_res</KEYWORD1>
+ <KEYWORD1>disp_s</KEYWORD1>
+ <KEYWORD1>doe</KEYWORD1>
+ <KEYWORD1>doed</KEYWORD1>
+ <KEYWORD1>doedi</KEYWORD1>
+ <KEYWORD1>doedit</KEYWORD1>
+ <KEYWORD1>dotplot</KEYWORD1>
+ <KEYWORD1>dotplot_7</KEYWORD1>
+ <KEYWORD1>dprobit</KEYWORD1>
+ <KEYWORD1>drawnorm</KEYWORD1>
+ <KEYWORD1>ds</KEYWORD1>
+ <KEYWORD1>ds_util</KEYWORD1>
+ <KEYWORD1>dstdize</KEYWORD1>
+ <KEYWORD1>duplicates</KEYWORD1>
+ <KEYWORD1>durbina</KEYWORD1>
+ <KEYWORD1>dwstat</KEYWORD1>
+ <KEYWORD1>dydx</KEYWORD1>
+ <KEYWORD1>dynre</KEYWORD1>
+ <KEYWORD1>dynren</KEYWORD1>
+ <KEYWORD1>ed</KEYWORD1>
+ <KEYWORD1>edi</KEYWORD1>
+ <KEYWORD1>edit</KEYWORD1>
+ <KEYWORD1>egen</KEYWORD1>
+ <KEYWORD1>eivreg</KEYWORD1>
+ <KEYWORD1>emdef</KEYWORD1>
+ <KEYWORD1>en</KEYWORD1>
+ <KEYWORD1>enc</KEYWORD1>
+ <KEYWORD1>enco</KEYWORD1>
+ <KEYWORD1>encod</KEYWORD1>
+ <KEYWORD1>encode</KEYWORD1>
+ <KEYWORD1>enter</KEYWORD1>
+ <!--<KEYWORD1>eq</KEYWORD1>-->
+ <KEYWORD1>ereg</KEYWORD1>
+ <KEYWORD1>ereg_lf</KEYWORD1>
+ <KEYWORD1>ereg_p</KEYWORD1>
+ <KEYWORD1>ereg_sw</KEYWORD1>
+ <KEYWORD1>ereghet</KEYWORD1>
+ <KEYWORD1>ereghet_glf</KEYWORD1>
+ <KEYWORD1>ereghet_glf_sh</KEYWORD1>
+ <KEYWORD1>ereghet_gp</KEYWORD1>
+ <KEYWORD1>ereghet_ilf</KEYWORD1>
+ <KEYWORD1>ereghet_ilf_sh</KEYWORD1>
+ <KEYWORD1>ereghet_ip</KEYWORD1>
+ <KEYWORD1>err</KEYWORD1>
+ <KEYWORD1>erro</KEYWORD1>
+ <KEYWORD1>error</KEYWORD1>
+ <KEYWORD1>estimates</KEYWORD1>
+ <KEYWORD1>estimate</KEYWORD1>
+ <KEYWORD1>estimat</KEYWORD1>
+ <KEYWORD1>estima</KEYWORD1>
+ <KEYWORD1>estim</KEYWORD1>
+ <KEYWORD1>esti</KEYWORD1>
+ <KEYWORD1>est</KEYWORD1>
+ <KEYWORD1>est_cfexist</KEYWORD1>
+ <KEYWORD1>est_cfname</KEYWORD1>
+ <KEYWORD1>est_clickable</KEYWORD1>
+ <KEYWORD1>est_expand</KEYWORD1>
+ <KEYWORD1>est_hold</KEYWORD1>
+ <KEYWORD1>est_table</KEYWORD1>
+ <KEYWORD1>est_unhold</KEYWORD1>
+ <KEYWORD1>est_unholdok</KEYWORD1>
+ <KEYWORD1>estat</KEYWORD1>
+ <KEYWORD1>estat_default</KEYWORD1>
+ <KEYWORD1>estat_summ</KEYWORD1>
+ <KEYWORD1>estat_vce_only</KEYWORD1>
+ <KEYWORD1>esti</KEYWORD1>
+ <KEYWORD1>estim</KEYWORD1>
+ <KEYWORD1>estima</KEYWORD1>
+ <KEYWORD1>estimat</KEYWORD1>
+ <KEYWORD1>estimate</KEYWORD1>
+ <KEYWORD1>etodow</KEYWORD1>
+ <KEYWORD1>etof</KEYWORD1>
+ <KEYWORD1>etomdy</KEYWORD1>
+ <KEYWORD1>ex</KEYWORD1>
+ <KEYWORD1>exec</KEYWORD1>
+ <KEYWORD1>execu</KEYWORD1>
+ <KEYWORD1>execut</KEYWORD1>
+ <KEYWORD1>execute</KEYWORD1>
+ <KEYWORD1>exi</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>expandcl</KEYWORD1>
+ <KEYWORD1>export</KEYWORD1>
+ <KEYWORD1>fac</KEYWORD1>
+ <KEYWORD1>fact</KEYWORD1>
+ <KEYWORD1>facto</KEYWORD1>
+ <KEYWORD1>factor</KEYWORD1>
+ <KEYWORD1>factor_estat</KEYWORD1>
+ <KEYWORD1>factor_p</KEYWORD1>
+ <KEYWORD1>factor_pca_rotated</KEYWORD1>
+ <KEYWORD1>factor_rotate</KEYWORD1>
+ <KEYWORD1>factormat</KEYWORD1>
+ <KEYWORD1>failure</KEYWORD1>
+ <KEYWORD1>fcast</KEYWORD1>
+ <KEYWORD1>fcast_compute</KEYWORD1>
+ <KEYWORD1>fcast_graph</KEYWORD1>
+ <KEYWORD1>fft</KEYWORD1>
+ <KEYWORD1>fh_st</KEYWORD1>
+ <KEYWORD1>fillin</KEYWORD1>
+ <KEYWORD1>find_hlp_file</KEYWORD1>
+ <KEYWORD1>findit</KEYWORD1>
+ <KEYWORD1>findit_7</KEYWORD1>
+ <KEYWORD1>fit</KEYWORD1>
+ <!--<KEYWORD1>for</KEYWORD1>-->
+ <KEYWORD1>for5_0</KEYWORD1>
+ <KEYWORD1>force</KEYWORD1>
+ <KEYWORD1>form</KEYWORD1>
+ <KEYWORD1>forma</KEYWORD1>
+ <KEYWORD1>format</KEYWORD1>
+ <KEYWORD1>fpredict</KEYWORD1>
+ <KEYWORD1>frac_154</KEYWORD1>
+ <KEYWORD1>frac_adj</KEYWORD1>
+ <KEYWORD1>frac_chk</KEYWORD1>
+ <KEYWORD1>frac_cox</KEYWORD1>
+ <KEYWORD1>frac_ddp</KEYWORD1>
+ <KEYWORD1>frac_dis</KEYWORD1>
+ <KEYWORD1>frac_dv</KEYWORD1>
+ <KEYWORD1>frac_in</KEYWORD1>
+ <KEYWORD1>frac_mun</KEYWORD1>
+ <KEYWORD1>frac_pp</KEYWORD1>
+ <KEYWORD1>frac_pq</KEYWORD1>
+ <KEYWORD1>frac_pv</KEYWORD1>
+ <KEYWORD1>frac_wgt</KEYWORD1>
+ <KEYWORD1>frac_xo</KEYWORD1>
+ <KEYWORD1>fracgen</KEYWORD1>
+ <KEYWORD1>fracplot</KEYWORD1>
+ <KEYWORD1>fracplot_7</KEYWORD1>
+ <KEYWORD1>fracpoly</KEYWORD1>
+ <KEYWORD1>fracpred</KEYWORD1>
+ <KEYWORD1>fron_ex</KEYWORD1>
+ <KEYWORD1>fron_hn</KEYWORD1>
+ <KEYWORD1>fron_p</KEYWORD1>
+ <KEYWORD1>fron_tn</KEYWORD1>
+ <KEYWORD1>fron_tn2</KEYWORD1>
+ <KEYWORD1>frontier</KEYWORD1>
+ <KEYWORD1>ftodate</KEYWORD1>
+ <KEYWORD1>ftoe</KEYWORD1>
+ <KEYWORD1>ftomdy</KEYWORD1>
+ <KEYWORD1>ftowdate</KEYWORD1>
+ <KEYWORD1>g</KEYWORD1>
+ <KEYWORD1>gamhet_glf</KEYWORD1>
+ <KEYWORD1>gamhet_gp</KEYWORD1>
+ <KEYWORD1>gamhet_ilf</KEYWORD1>
+ <KEYWORD1>gamhet_ip</KEYWORD1>
+ <KEYWORD1>gamma</KEYWORD1>
+ <KEYWORD1>gamma_d2</KEYWORD1>
+ <KEYWORD1>gamma_lf</KEYWORD1>
+ <KEYWORD1>gamma_p</KEYWORD1>
+ <KEYWORD1>gamma_sw</KEYWORD1>
+ <KEYWORD1>gammahet</KEYWORD1>
+ <KEYWORD1>gdi_hexagon</KEYWORD1>
+ <KEYWORD1>gdi_spokes</KEYWORD1>
+ <KEYWORD1>ge</KEYWORD1>
+ <KEYWORD1>gen</KEYWORD1>
+ <KEYWORD1>gene</KEYWORD1>
+ <KEYWORD1>gener</KEYWORD1>
+ <KEYWORD1>genera</KEYWORD1>
+ <KEYWORD1>generat</KEYWORD1>
+ <KEYWORD1>generate</KEYWORD1>
+ <KEYWORD1>genrank</KEYWORD1>
+ <KEYWORD1>genstd</KEYWORD1>
+ <KEYWORD1>genvmean</KEYWORD1>
+ <KEYWORD1>gettoken</KEYWORD1>
+ <KEYWORD1>gl</KEYWORD1>
+ <KEYWORD1>gladder</KEYWORD1>
+ <KEYWORD1>gladder_7</KEYWORD1>
+ <KEYWORD1>glim_l01</KEYWORD1>
+ <KEYWORD1>glim_l02</KEYWORD1>
+ <KEYWORD1>glim_l03</KEYWORD1>
+ <KEYWORD1>glim_l04</KEYWORD1>
+ <KEYWORD1>glim_l05</KEYWORD1>
+ <KEYWORD1>glim_l06</KEYWORD1>
+ <KEYWORD1>glim_l07</KEYWORD1>
+ <KEYWORD1>glim_l08</KEYWORD1>
+ <KEYWORD1>glim_l09</KEYWORD1>
+ <KEYWORD1>glim_l10</KEYWORD1>
+ <KEYWORD1>glim_l11</KEYWORD1>
+ <KEYWORD1>glim_l12</KEYWORD1>
+ <KEYWORD1>glim_lf</KEYWORD1>
+ <KEYWORD1>glim_mu</KEYWORD1>
+ <KEYWORD1>glim_nw1</KEYWORD1>
+ <KEYWORD1>glim_nw2</KEYWORD1>
+ <KEYWORD1>glim_nw3</KEYWORD1>
+ <KEYWORD1>glim_p</KEYWORD1>
+ <KEYWORD1>glim_v1</KEYWORD1>
+ <KEYWORD1>glim_v2</KEYWORD1>
+ <KEYWORD1>glim_v3</KEYWORD1>
+ <KEYWORD1>glim_v4</KEYWORD1>
+ <KEYWORD1>glim_v5</KEYWORD1>
+ <KEYWORD1>glim_v6</KEYWORD1>
+ <KEYWORD1>glim_v7</KEYWORD1>
+ <KEYWORD1>glm</KEYWORD1>
+ <KEYWORD1>glm_6</KEYWORD1>
+ <KEYWORD1>glm_p</KEYWORD1>
+ <KEYWORD1>glm_sw</KEYWORD1>
+ <KEYWORD1>glmpred</KEYWORD1>
+ <KEYWORD1>glogit</KEYWORD1>
+ <KEYWORD1>glogit_8</KEYWORD1>
+ <KEYWORD1>glogit_p</KEYWORD1>
+ <KEYWORD1>gmeans</KEYWORD1>
+ <KEYWORD1>gnbre_lf</KEYWORD1>
+ <KEYWORD1>gnbreg</KEYWORD1>
+ <KEYWORD1>gnbreg_5</KEYWORD1>
+ <KEYWORD1>gnbreg_p</KEYWORD1>
+ <KEYWORD1>gomp_lf</KEYWORD1>
+ <KEYWORD1>gompe_sw</KEYWORD1>
+ <KEYWORD1>gomper_p</KEYWORD1>
+ <KEYWORD1>gompertz</KEYWORD1>
+ <KEYWORD1>gompertzhet</KEYWORD1>
+ <KEYWORD1>gomphet_glf</KEYWORD1>
+ <KEYWORD1>gomphet_glf_sh</KEYWORD1>
+ <KEYWORD1>gomphet_gp</KEYWORD1>
+ <KEYWORD1>gomphet_ilf</KEYWORD1>
+ <KEYWORD1>gomphet_ilf_sh</KEYWORD1>
+ <KEYWORD1>gomphet_ip</KEYWORD1>
+ <KEYWORD1>gph</KEYWORD1>
+ <KEYWORD1>gphdot</KEYWORD1>
+ <KEYWORD1>gphpen</KEYWORD1>
+ <KEYWORD1>gphprint</KEYWORD1>
+ <KEYWORD1>gprobi_p</KEYWORD1>
+ <KEYWORD1>gprobit</KEYWORD1>
+ <KEYWORD1>gprobit_8</KEYWORD1>
+ <KEYWORD1>gr</KEYWORD1>
+ <KEYWORD1>gr_copy</KEYWORD1>
+ <KEYWORD1>gr_current</KEYWORD1>
+ <KEYWORD1>gr_db</KEYWORD1>
+ <KEYWORD1>gr_describe</KEYWORD1>
+ <KEYWORD1>gr_dir</KEYWORD1>
+ <KEYWORD1>gr_draw</KEYWORD1>
+ <KEYWORD1>gr_draw_replay</KEYWORD1>
+ <KEYWORD1>gr_drop</KEYWORD1>
+ <KEYWORD1>gr_edit</KEYWORD1>
+ <KEYWORD1>gr_editviewopts</KEYWORD1>
+ <KEYWORD1>gr_example</KEYWORD1>
+ <KEYWORD1>gr_example2</KEYWORD1>
+ <KEYWORD1>gr_export</KEYWORD1>
+ <KEYWORD1>gr_print</KEYWORD1>
+ <KEYWORD1>gr_qscheme</KEYWORD1>
+ <KEYWORD1>gr_query</KEYWORD1>
+ <KEYWORD1>gr_read</KEYWORD1>
+ <KEYWORD1>gr_rename</KEYWORD1>
+ <KEYWORD1>gr_replay</KEYWORD1>
+ <KEYWORD1>gr_save</KEYWORD1>
+ <KEYWORD1>gr_set</KEYWORD1>
+ <KEYWORD1>gr_setscheme</KEYWORD1>
+ <KEYWORD1>gr_table</KEYWORD1>
+ <KEYWORD1>gr_undo</KEYWORD1>
+ <KEYWORD1>gr_use</KEYWORD1>
+ <KEYWORD1>gra</KEYWORD1>
+ <KEYWORD1>grap</KEYWORD1>
+ <KEYWORD1>graph</KEYWORD1>
+ <KEYWORD1>grebar</KEYWORD1>
+ <KEYWORD1>greigen</KEYWORD1>
+ <KEYWORD1>greigen_7</KEYWORD1>
+ <KEYWORD1>greigen_8</KEYWORD1>
+ <KEYWORD1>grmeanby</KEYWORD1>
+ <KEYWORD1>grmeanby_7</KEYWORD1>
+ <KEYWORD1>gs_fileinfo</KEYWORD1>
+ <KEYWORD1>gs_filetype</KEYWORD1>
+ <KEYWORD1>gs_graphinfo</KEYWORD1>
+ <KEYWORD1>gs_stat</KEYWORD1>
+ <KEYWORD1>gsort</KEYWORD1>
+ <KEYWORD1>gwood</KEYWORD1>
+ <KEYWORD1>h</KEYWORD1>
+ <KEYWORD1>hadimvo</KEYWORD1>
+ <KEYWORD1>hareg</KEYWORD1>
+ <KEYWORD1>hausman</KEYWORD1>
+ <KEYWORD1>he</KEYWORD1>
+ <KEYWORD1>heck_d2</KEYWORD1>
+ <KEYWORD1>heckma_p</KEYWORD1>
+ <KEYWORD1>heckman</KEYWORD1>
+ <KEYWORD1>heckp_lf</KEYWORD1>
+ <KEYWORD1>heckpr_p</KEYWORD1>
+ <KEYWORD1>heckprob</KEYWORD1>
+ <KEYWORD1>hel</KEYWORD1>
+ <KEYWORD1>help</KEYWORD1>
+ <KEYWORD1>helpchk</KEYWORD1>
+ <KEYWORD1>hereg</KEYWORD1>
+ <KEYWORD1>hetpr_lf</KEYWORD1>
+ <KEYWORD1>hetpr_p</KEYWORD1>
+ <KEYWORD1>hetprob</KEYWORD1>
+ <KEYWORD1>hettest</KEYWORD1>
+ <KEYWORD1>hilite</KEYWORD1>
+ <KEYWORD1>hist</KEYWORD1>
+ <KEYWORD1>hist_7</KEYWORD1>
+ <KEYWORD1>histogram</KEYWORD1>
+ <KEYWORD1>hlogit</KEYWORD1>
+ <KEYWORD1>hlu</KEYWORD1>
+ <KEYWORD1>hmeans</KEYWORD1>
+ <KEYWORD1>hotel</KEYWORD1>
+ <KEYWORD1>hotelling</KEYWORD1>
+ <KEYWORD1>hprobit</KEYWORD1>
+ <KEYWORD1>hreg</KEYWORD1>
+ <KEYWORD1>hsearch</KEYWORD1>
+ <KEYWORD1>icd9</KEYWORD1>
+ <KEYWORD1>icd9_ff</KEYWORD1>
+ <KEYWORD1>icd9p</KEYWORD1>
+ <KEYWORD1>id</KEYWORD1>
+ <KEYWORD1>iis</KEYWORD1>
+ <KEYWORD1>impute</KEYWORD1>
+ <KEYWORD1>imtest</KEYWORD1>
+ <KEYWORD1>inbase</KEYWORD1>
+ <KEYWORD1>inf</KEYWORD1>
+ <KEYWORD1>infi</KEYWORD1>
+ <KEYWORD1>infil</KEYWORD1>
+ <KEYWORD1>infile</KEYWORD1>
+ <KEYWORD1>infix</KEYWORD1>
+ <KEYWORD1>inflate</KEYWORD1>
+ <KEYWORD1>inp</KEYWORD1>
+ <KEYWORD1>inpu</KEYWORD1>
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD1>ins</KEYWORD1>
+ <KEYWORD1>insh</KEYWORD1>
+ <KEYWORD1>inshe</KEYWORD1>
+ <KEYWORD1>inshee</KEYWORD1>
+ <KEYWORD1>insheet</KEYWORD1>
+ <KEYWORD1>insp</KEYWORD1>
+ <KEYWORD1>inspe</KEYWORD1>
+ <KEYWORD1>inspec</KEYWORD1>
+ <KEYWORD1>inspect</KEYWORD1>
+ <KEYWORD1>integ</KEYWORD1>
+ <KEYWORD1>inten</KEYWORD1>
+ <KEYWORD1>intreg</KEYWORD1>
+ <KEYWORD1>intreg_7</KEYWORD1>
+ <KEYWORD1>intreg_p</KEYWORD1>
+ <KEYWORD1>intrg2_ll</KEYWORD1>
+ <KEYWORD1>intrg_ll</KEYWORD1>
+ <KEYWORD1>intrg_ll2</KEYWORD1>
+ <KEYWORD1>ipolate</KEYWORD1>
+ <KEYWORD1>iqreg</KEYWORD1>
+ <KEYWORD1>ir</KEYWORD1>
+ <KEYWORD1>irf</KEYWORD1>
+ <KEYWORD1>irf_create</KEYWORD1>
+ <KEYWORD1>irfm</KEYWORD1>
+ <KEYWORD1>iri</KEYWORD1>
+ <KEYWORD1>is_svy</KEYWORD1>
+ <KEYWORD1>is_svysum</KEYWORD1>
+ <KEYWORD1>isid</KEYWORD1>
+ <KEYWORD1>istdize</KEYWORD1>
+ <KEYWORD1>ivprob_1_lf</KEYWORD1>
+ <KEYWORD1>ivprob_lf</KEYWORD1>
+ <KEYWORD1>ivprobit</KEYWORD1>
+ <KEYWORD1>ivprobit_p</KEYWORD1>
+ <KEYWORD1>ivreg</KEYWORD1>
+ <KEYWORD1>ivreg_footnote</KEYWORD1>
+ <KEYWORD1>ivtob_1_lf</KEYWORD1>
+ <KEYWORD1>ivtob_lf</KEYWORD1>
+ <KEYWORD1>ivtobit</KEYWORD1>
+ <KEYWORD1>ivtobit_p</KEYWORD1>
+ <KEYWORD1>jackknife</KEYWORD1>
+ <KEYWORD1>jacknife</KEYWORD1>
+ <KEYWORD1>jknife</KEYWORD1>
+ <KEYWORD1>jknife_6</KEYWORD1>
+ <KEYWORD1>jknife_8</KEYWORD1>
+ <KEYWORD1>jkstat</KEYWORD1>
+ <KEYWORD1>joinby</KEYWORD1>
+ <KEYWORD1>kalarma1</KEYWORD1>
+ <KEYWORD1>kap</KEYWORD1>
+ <KEYWORD1>kap_3</KEYWORD1>
+ <KEYWORD1>kapmeier</KEYWORD1>
+ <KEYWORD1>kappa</KEYWORD1>
+ <KEYWORD1>kapwgt</KEYWORD1>
+ <KEYWORD1>kdensity</KEYWORD1>
+ <KEYWORD1>kdensity_7</KEYWORD1>
+ <KEYWORD1>ksm</KEYWORD1>
+ <KEYWORD1>ksmirnov</KEYWORD1>
+ <KEYWORD1>ktau</KEYWORD1>
+ <KEYWORD1>kwallis</KEYWORD1>
+ <KEYWORD1>l</KEYWORD1>
+ <KEYWORD1>la</KEYWORD1>
+ <KEYWORD1>labelbook</KEYWORD1>
+ <KEYWORD1>ladder</KEYWORD1>
+ <KEYWORD1>level</KEYWORD1>
+ <KEYWORD1>levels</KEYWORD1>
+ <KEYWORD1>levelsof</KEYWORD1>
+ <KEYWORD1>leverage</KEYWORD1>
+ <KEYWORD1>lfit</KEYWORD1>
+ <KEYWORD1>lfit_p</KEYWORD1>
+ <KEYWORD1>li</KEYWORD1>
+ <KEYWORD1>lincom</KEYWORD1>
+ <KEYWORD1>line</KEYWORD1>
+ <KEYWORD1>linktest</KEYWORD1>
+ <KEYWORD1>lis</KEYWORD1>
+ <KEYWORD1>list</KEYWORD1>
+ <KEYWORD1>lloghet_glf</KEYWORD1>
+ <KEYWORD1>lloghet_glf_sh</KEYWORD1>
+ <KEYWORD1>lloghet_gp</KEYWORD1>
+ <KEYWORD1>lloghet_ilf</KEYWORD1>
+ <KEYWORD1>lloghet_ilf_sh</KEYWORD1>
+ <KEYWORD1>lloghet_ip</KEYWORD1>
+ <KEYWORD1>llogi_sw</KEYWORD1>
+ <KEYWORD1>llogis_p</KEYWORD1>
+ <KEYWORD1>llogist</KEYWORD1>
+ <KEYWORD1>llogistic</KEYWORD1>
+ <KEYWORD1>llogistichet</KEYWORD1>
+ <KEYWORD1>lnorm_lf</KEYWORD1>
+ <KEYWORD1>lnorm_sw</KEYWORD1>
+ <KEYWORD1>lnorma_p</KEYWORD1>
+ <KEYWORD1>lnormal</KEYWORD1>
+ <KEYWORD1>lnormalhet</KEYWORD1>
+ <KEYWORD1>lnormhet_glf</KEYWORD1>
+ <KEYWORD1>lnormhet_glf_sh</KEYWORD1>
+ <KEYWORD1>lnormhet_gp</KEYWORD1>
+ <KEYWORD1>lnormhet_ilf</KEYWORD1>
+ <KEYWORD1>lnormhet_ilf_sh</KEYWORD1>
+ <KEYWORD1>lnormhet_ip</KEYWORD1>
+ <KEYWORD1>lnskew0</KEYWORD1>
+ <KEYWORD1>lo</KEYWORD1>
+ <KEYWORD1>loadingplot</KEYWORD1>
+ <KEYWORD1>logi</KEYWORD1>
+ <KEYWORD1>logis_lf</KEYWORD1>
+ <KEYWORD1>logistic</KEYWORD1>
+ <KEYWORD1>logistic_p</KEYWORD1>
+ <KEYWORD1>logit</KEYWORD1>
+ <KEYWORD1>logit_estat</KEYWORD1>
+ <KEYWORD1>logit_p</KEYWORD1>
+ <KEYWORD1>loglogs</KEYWORD1>
+ <KEYWORD1>logrank</KEYWORD1>
+ <KEYWORD1>loneway</KEYWORD1>
+ <KEYWORD1>loo</KEYWORD1>
+ <KEYWORD1>look</KEYWORD1>
+ <KEYWORD1>lookfor</KEYWORD1>
+ <KEYWORD1>looku</KEYWORD1>
+ <KEYWORD1>lookup</KEYWORD1>
+ <KEYWORD1>lowess</KEYWORD1>
+ <KEYWORD1>lowess_7</KEYWORD1>
+ <KEYWORD1>lpredict</KEYWORD1>
+ <KEYWORD1>lrecomp</KEYWORD1>
+ <KEYWORD1>lroc</KEYWORD1>
+ <KEYWORD1>lroc_7</KEYWORD1>
+ <KEYWORD1>lrtest</KEYWORD1>
+ <KEYWORD1>lsens</KEYWORD1>
+ <KEYWORD1>lsens_7</KEYWORD1>
+ <KEYWORD1>lsens_x</KEYWORD1>
+ <KEYWORD1>lstat</KEYWORD1>
+ <KEYWORD1>ltable</KEYWORD1>
+ <KEYWORD1>ltable_7</KEYWORD1>
+ <KEYWORD1>ltriang</KEYWORD1>
+ <KEYWORD1>lv</KEYWORD1>
+ <KEYWORD1>lvr2plot</KEYWORD1>
+ <KEYWORD1>lvr2plot_7</KEYWORD1>
+ <KEYWORD1>ma</KEYWORD1>
+ <KEYWORD1>mac</KEYWORD1>
+ <KEYWORD1>macr</KEYWORD1>
+ <KEYWORD1>macro</KEYWORD1>
+ <KEYWORD1>makecns</KEYWORD1>
+ <KEYWORD1>man</KEYWORD1>
+ <KEYWORD1>manova_estat</KEYWORD1>
+ <KEYWORD1>manova_p</KEYWORD1>
+ <KEYWORD1>mantel</KEYWORD1>
+ <KEYWORD1>mark</KEYWORD1>
+ <KEYWORD1>markout</KEYWORD1>
+ <KEYWORD1>marksample</KEYWORD1>
+ <KEYWORD1>mat</KEYWORD1>
+ <KEYWORD1>mat_capp</KEYWORD1>
+ <KEYWORD1>mat_order</KEYWORD1>
+ <KEYWORD1>mat_rapp</KEYWORD1>
+ <KEYWORD1>mata</KEYWORD1>
+ <KEYWORD1>mata_matdescribe</KEYWORD1>
+ <KEYWORD1>mata_matsave</KEYWORD1>
+ <KEYWORD1>mata_matuse</KEYWORD1>
+ <KEYWORD1>matalabel</KEYWORD1>
+ <KEYWORD1>matcproc</KEYWORD1>
+ <KEYWORD1>matlist</KEYWORD1>
+ <KEYWORD1>matname</KEYWORD1>
+ <KEYWORD1>matr</KEYWORD1>
+ <KEYWORD1>matri</KEYWORD1>
+ <KEYWORD1>matrix</KEYWORD1>
+ <KEYWORD1>matrix_input__dlg</KEYWORD1>
+ <KEYWORD1>matsize</KEYWORD1>
+ <KEYWORD1>matstrik</KEYWORD1>
+ <KEYWORD1>mcc</KEYWORD1>
+ <KEYWORD1>mcci</KEYWORD1>
+ <KEYWORD1>md0_</KEYWORD1>
+ <KEYWORD1>md1_</KEYWORD1>
+ <KEYWORD1>md1debu_</KEYWORD1>
+ <KEYWORD1>md1debug_</KEYWORD1>
+ <KEYWORD1>md2_</KEYWORD1>
+ <KEYWORD1>md2debu_</KEYWORD1>
+ <KEYWORD1>md2debug_</KEYWORD1>
+ <KEYWORD1>mds</KEYWORD1>
+ <KEYWORD1>mds_estat</KEYWORD1>
+ <KEYWORD1>mds_p</KEYWORD1>
+ <KEYWORD1>mdsconfig</KEYWORD1>
+ <KEYWORD1>mdslong</KEYWORD1>
+ <KEYWORD1>mdsmat</KEYWORD1>
+ <KEYWORD1>mdsshepard</KEYWORD1>
+ <KEYWORD1>mdytoe</KEYWORD1>
+ <KEYWORD1>mdytof</KEYWORD1>
+ <KEYWORD1>me_derd</KEYWORD1>
+ <KEYWORD1>mean</KEYWORD1>
+ <KEYWORD1>means</KEYWORD1>
+ <KEYWORD1>median</KEYWORD1>
+ <KEYWORD1>memory</KEYWORD1>
+ <KEYWORD1>memsize</KEYWORD1>
+ <KEYWORD1>meqparse</KEYWORD1>
+ <KEYWORD1>mfp</KEYWORD1>
+ <KEYWORD1>mfx</KEYWORD1>
+ <KEYWORD1>mhelp</KEYWORD1>
+ <KEYWORD1>mhodds</KEYWORD1>
+ <KEYWORD1>mixed_ll</KEYWORD1>
+ <KEYWORD1>mixed_ll_reparm</KEYWORD1>
+ <KEYWORD1>mkassert</KEYWORD1>
+ <KEYWORD1>mkdir</KEYWORD1>
+ <KEYWORD1>mkmat</KEYWORD1>
+ <KEYWORD1>mkspline</KEYWORD1>
+ <KEYWORD1>ml</KEYWORD1>
+ <KEYWORD1>ml_5</KEYWORD1>
+ <KEYWORD1>ml_adjs</KEYWORD1>
+ <KEYWORD1>ml_bhhhs</KEYWORD1>
+ <KEYWORD1>ml_c_d</KEYWORD1>
+ <KEYWORD1>ml_check</KEYWORD1>
+ <KEYWORD1>ml_clear</KEYWORD1>
+ <KEYWORD1>ml_cnt</KEYWORD1>
+ <KEYWORD1>ml_debug</KEYWORD1>
+ <KEYWORD1>ml_defd</KEYWORD1>
+ <KEYWORD1>ml_e0</KEYWORD1>
+ <KEYWORD1>ml_e0_bfgs</KEYWORD1>
+ <KEYWORD1>ml_e0_cycle</KEYWORD1>
+ <KEYWORD1>ml_e0_dfp</KEYWORD1>
+ <KEYWORD1>ml_e0i</KEYWORD1>
+ <KEYWORD1>ml_e1</KEYWORD1>
+ <KEYWORD1>ml_e1_bfgs</KEYWORD1>
+ <KEYWORD1>ml_e1_bhhh</KEYWORD1>
+ <KEYWORD1>ml_e1_cycle</KEYWORD1>
+ <KEYWORD1>ml_e1_dfp</KEYWORD1>
+ <KEYWORD1>ml_e2</KEYWORD1>
+ <KEYWORD1>ml_e2_cycle</KEYWORD1>
+ <KEYWORD1>ml_ebfg0</KEYWORD1>
+ <KEYWORD1>ml_ebfr0</KEYWORD1>
+ <KEYWORD1>ml_ebfr1</KEYWORD1>
+ <KEYWORD1>ml_ebh0q</KEYWORD1>
+ <KEYWORD1>ml_ebhh0</KEYWORD1>
+ <KEYWORD1>ml_ebhr0</KEYWORD1>
+ <KEYWORD1>ml_ebr0i</KEYWORD1>
+ <KEYWORD1>ml_ecr0i</KEYWORD1>
+ <KEYWORD1>ml_edfp0</KEYWORD1>
+ <KEYWORD1>ml_edfr0</KEYWORD1>
+ <KEYWORD1>ml_edfr1</KEYWORD1>
+ <KEYWORD1>ml_edr0i</KEYWORD1>
+ <KEYWORD1>ml_eds</KEYWORD1>
+ <KEYWORD1>ml_eer0i</KEYWORD1>
+ <KEYWORD1>ml_egr0i</KEYWORD1>
+ <KEYWORD1>ml_elf</KEYWORD1>
+ <KEYWORD1>ml_elf_bfgs</KEYWORD1>
+ <KEYWORD1>ml_elf_bhhh</KEYWORD1>
+ <KEYWORD1>ml_elf_cycle</KEYWORD1>
+ <KEYWORD1>ml_elf_dfp</KEYWORD1>
+ <KEYWORD1>ml_elfi</KEYWORD1>
+ <KEYWORD1>ml_elfs</KEYWORD1>
+ <KEYWORD1>ml_enr0i</KEYWORD1>
+ <KEYWORD1>ml_enrr0</KEYWORD1>
+ <KEYWORD1>ml_erdu0</KEYWORD1>
+ <KEYWORD1>ml_erdu0_bfgs</KEYWORD1>
+ <KEYWORD1>ml_erdu0_bhhh</KEYWORD1>
+ <KEYWORD1>ml_erdu0_bhhhq</KEYWORD1>
+ <KEYWORD1>ml_erdu0_cycle</KEYWORD1>
+ <KEYWORD1>ml_erdu0_dfp</KEYWORD1>
+ <KEYWORD1>ml_erdu0_nrbfgs</KEYWORD1>
+ <KEYWORD1>ml_exde</KEYWORD1>
+ <KEYWORD1>ml_footnote</KEYWORD1>
+ <KEYWORD1>ml_geqnr</KEYWORD1>
+ <KEYWORD1>ml_grad0</KEYWORD1>
+ <KEYWORD1>ml_graph</KEYWORD1>
+ <KEYWORD1>ml_hbhhh</KEYWORD1>
+ <KEYWORD1>ml_hd0</KEYWORD1>
+ <KEYWORD1>ml_hold</KEYWORD1>
+ <KEYWORD1>ml_init</KEYWORD1>
+ <KEYWORD1>ml_inv</KEYWORD1>
+ <KEYWORD1>ml_log</KEYWORD1>
+ <KEYWORD1>ml_max</KEYWORD1>
+ <KEYWORD1>ml_mlout</KEYWORD1>
+ <KEYWORD1>ml_mlout_8</KEYWORD1>
+ <KEYWORD1>ml_model</KEYWORD1>
+ <KEYWORD1>ml_nb0</KEYWORD1>
+ <KEYWORD1>ml_opt</KEYWORD1>
+ <KEYWORD1>ml_p</KEYWORD1>
+ <KEYWORD1>ml_plot</KEYWORD1>
+ <KEYWORD1>ml_query</KEYWORD1>
+ <KEYWORD1>ml_rdgrd</KEYWORD1>
+ <KEYWORD1>ml_repor</KEYWORD1>
+ <KEYWORD1>ml_s_e</KEYWORD1>
+ <KEYWORD1>ml_score</KEYWORD1>
+ <KEYWORD1>ml_searc</KEYWORD1>
+ <KEYWORD1>ml_technique</KEYWORD1>
+ <KEYWORD1>ml_unhold</KEYWORD1>
+ <KEYWORD1>mleval</KEYWORD1>
+ <KEYWORD1>mlf_</KEYWORD1>
+ <KEYWORD1>mlmatsum</KEYWORD1>
+ <KEYWORD1>mlog</KEYWORD1>
+ <KEYWORD1>mlogi</KEYWORD1>
+ <KEYWORD1>mlogit</KEYWORD1>
+ <KEYWORD1>mlogit_footnote</KEYWORD1>
+ <KEYWORD1>mlogit_p</KEYWORD1>
+ <KEYWORD1>mlopts</KEYWORD1>
+ <KEYWORD1>mlsum</KEYWORD1>
+ <KEYWORD1>mlvecsum</KEYWORD1>
+ <KEYWORD1>mmerge</KEYWORD1>
+ <KEYWORD1>mnl0_</KEYWORD1>
+ <KEYWORD1>mor</KEYWORD1>
+ <KEYWORD1>more</KEYWORD1>
+ <KEYWORD1>mov</KEYWORD1>
+ <KEYWORD1>move</KEYWORD1>
+ <KEYWORD1>mprobit</KEYWORD1>
+ <KEYWORD1>mprobit_lf</KEYWORD1>
+ <KEYWORD1>mprobit_p</KEYWORD1>
+ <KEYWORD1>mrdu0_</KEYWORD1>
+ <KEYWORD1>mrdu1_</KEYWORD1>
+ <KEYWORD1>mvdecode</KEYWORD1>
+ <KEYWORD1>mvencode</KEYWORD1>
+ <KEYWORD1>mvreg</KEYWORD1>
+ <KEYWORD1>mvreg_estat</KEYWORD1>
+ <KEYWORD1>n</KEYWORD1>
+ <KEYWORD1>nbreg</KEYWORD1>
+ <KEYWORD1>nbreg_al</KEYWORD1>
+ <KEYWORD1>nbreg_lf</KEYWORD1>
+ <KEYWORD1>nbreg_p</KEYWORD1>
+ <KEYWORD1>nbreg_sw</KEYWORD1>
+ <KEYWORD1>nestreg</KEYWORD1>
+ <KEYWORD1>net</KEYWORD1>
+ <KEYWORD1>newey</KEYWORD1>
+ <KEYWORD1>newey_7</KEYWORD1>
+ <KEYWORD1>newey_p</KEYWORD1>
+ <KEYWORD1>news</KEYWORD1>
+ <KEYWORD1>nl</KEYWORD1>
+ <KEYWORD1>nl_7</KEYWORD1>
+ <KEYWORD1>nl_9</KEYWORD1>
+ <KEYWORD1>nl_9_p</KEYWORD1>
+ <KEYWORD1>nl_p</KEYWORD1>
+ <KEYWORD1>nl_p_7</KEYWORD1>
+ <KEYWORD1>nlcom</KEYWORD1>
+ <KEYWORD1>nlcom_p</KEYWORD1>
+ <KEYWORD1>nlexp2</KEYWORD1>
+ <KEYWORD1>nlexp2_7</KEYWORD1>
+ <KEYWORD1>nlexp2a</KEYWORD1>
+ <KEYWORD1>nlexp2a_7</KEYWORD1>
+ <KEYWORD1>nlexp3</KEYWORD1>
+ <KEYWORD1>nlexp3_7</KEYWORD1>
+ <KEYWORD1>nlgom3</KEYWORD1>
+ <KEYWORD1>nlgom3_7</KEYWORD1>
+ <KEYWORD1>nlgom4</KEYWORD1>
+ <KEYWORD1>nlgom4_7</KEYWORD1>
+ <KEYWORD1>nlinit</KEYWORD1>
+ <KEYWORD1>nllog3</KEYWORD1>
+ <KEYWORD1>nllog3_7</KEYWORD1>
+ <KEYWORD1>nllog4</KEYWORD1>
+ <KEYWORD1>nllog4_7</KEYWORD1>
+ <KEYWORD1>nlog_rd</KEYWORD1>
+ <KEYWORD1>nlogit</KEYWORD1>
+ <KEYWORD1>nlogit_p</KEYWORD1>
+ <KEYWORD1>nlogitgen</KEYWORD1>
+ <KEYWORD1>nlogittree</KEYWORD1>
+ <KEYWORD1>nlpred</KEYWORD1>
+ <KEYWORD1>no</KEYWORD1>
+ <KEYWORD1>nobreak</KEYWORD1>
+ <KEYWORD1>noi</KEYWORD1>
+ <KEYWORD1>nois</KEYWORD1>
+ <KEYWORD1>noisi</KEYWORD1>
+ <KEYWORD1>noisil</KEYWORD1>
+ <KEYWORD1>noisily</KEYWORD1>
+ <KEYWORD1>nostop</KEYWORD1>
+ <KEYWORD1>note</KEYWORD1>
+ <KEYWORD1>notes</KEYWORD1>
+ <KEYWORD1>notify</KEYWORD1>
+ <KEYWORD1>nptrend</KEYWORD1>
+ <KEYWORD1>numlabel</KEYWORD1>
+ <KEYWORD1>numlist</KEYWORD1>
+ <KEYWORD1>off</KEYWORD1>
+ <KEYWORD1>old_ver</KEYWORD1>
+ <KEYWORD1>olo</KEYWORD1>
+ <KEYWORD1>olog</KEYWORD1>
+ <KEYWORD1>ologi</KEYWORD1>
+ <KEYWORD1>ologi_sw</KEYWORD1>
+ <KEYWORD1>ologit</KEYWORD1>
+ <KEYWORD1>ologit_p</KEYWORD1>
+ <KEYWORD1>ologitp</KEYWORD1>
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>one</KEYWORD1>
+ <KEYWORD1>onew</KEYWORD1>
+ <KEYWORD1>onewa</KEYWORD1>
+ <KEYWORD1>oneway</KEYWORD1>
+ <KEYWORD1>op_colnm</KEYWORD1>
+ <KEYWORD1>op_comp</KEYWORD1>
+ <KEYWORD1>op_diff</KEYWORD1>
+ <KEYWORD1>op_inv</KEYWORD1>
+ <KEYWORD1>op_str</KEYWORD1>
+ <KEYWORD1>opr</KEYWORD1>
+ <KEYWORD1>opro</KEYWORD1>
+ <KEYWORD1>oprob</KEYWORD1>
+ <KEYWORD1>oprob_sw</KEYWORD1>
+ <KEYWORD1>oprobi</KEYWORD1>
+ <KEYWORD1>oprobi_p</KEYWORD1>
+ <KEYWORD1>oprobit</KEYWORD1>
+ <KEYWORD1>oprobitp</KEYWORD1>
+ <KEYWORD1>opts_exclusive</KEYWORD1>
+ <KEYWORD1>order</KEYWORD1>
+ <KEYWORD1>orthog</KEYWORD1>
+ <KEYWORD1>orthpoly</KEYWORD1>
+ <KEYWORD1>ou</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+ <KEYWORD1>outf</KEYWORD1>
+ <KEYWORD1>outfi</KEYWORD1>
+ <KEYWORD1>outfil</KEYWORD1>
+ <KEYWORD1>outfile</KEYWORD1>
+ <KEYWORD1>outs</KEYWORD1>
+ <KEYWORD1>outsh</KEYWORD1>
+ <KEYWORD1>outshe</KEYWORD1>
+ <KEYWORD1>outshee</KEYWORD1>
+ <KEYWORD1>outsheet</KEYWORD1>
+ <KEYWORD1>ovtest</KEYWORD1>
+ <KEYWORD1>pac</KEYWORD1>
+ <KEYWORD1>pac_7</KEYWORD1>
+ <KEYWORD1>palette</KEYWORD1>
+ <KEYWORD1>par</KEYWORD1>
+ <KEYWORD1>pars</KEYWORD1>
+ <KEYWORD1>parse</KEYWORD1>
+ <KEYWORD1>parse_dissim</KEYWORD1>
+ <KEYWORD1>pause</KEYWORD1>
+ <KEYWORD1>pca</KEYWORD1>
+ <KEYWORD1>pca_8</KEYWORD1>
+ <KEYWORD1>pca_display</KEYWORD1>
+ <KEYWORD1>pca_estat</KEYWORD1>
+ <KEYWORD1>pca_p</KEYWORD1>
+ <KEYWORD1>pca_rotate</KEYWORD1>
+ <KEYWORD1>pcamat</KEYWORD1>
+ <KEYWORD1>pchart</KEYWORD1>
+ <KEYWORD1>pchart_7</KEYWORD1>
+ <KEYWORD1>pchi</KEYWORD1>
+ <KEYWORD1>pchi_7</KEYWORD1>
+ <KEYWORD1>pcorr</KEYWORD1>
+ <KEYWORD1>pctile</KEYWORD1>
+ <KEYWORD1>pentium</KEYWORD1>
+ <KEYWORD1>pergram</KEYWORD1>
+ <KEYWORD1>pergram_7</KEYWORD1>
+ <KEYWORD1>permute</KEYWORD1>
+ <KEYWORD1>permute_8</KEYWORD1>
+ <KEYWORD1>personal</KEYWORD1>
+ <KEYWORD1>peto_st</KEYWORD1>
+ <KEYWORD1>pkcollapse</KEYWORD1>
+ <KEYWORD1>pkcross</KEYWORD1>
+ <KEYWORD1>pkequiv</KEYWORD1>
+ <KEYWORD1>pkexamine</KEYWORD1>
+ <KEYWORD1>pkexamine_7</KEYWORD1>
+ <KEYWORD1>pkshape</KEYWORD1>
+ <KEYWORD1>pksumm</KEYWORD1>
+ <KEYWORD1>pksumm_7</KEYWORD1>
+ <KEYWORD1>pl</KEYWORD1>
+ <KEYWORD1>playsnd</KEYWORD1>
+ <KEYWORD1>plo</KEYWORD1>
+ <KEYWORD1>plot</KEYWORD1>
+ <KEYWORD1>plug</KEYWORD1>
+ <KEYWORD1>plugi</KEYWORD1>
+ <KEYWORD1>plugin</KEYWORD1>
+ <KEYWORD1>pnorm</KEYWORD1>
+ <KEYWORD1>pnorm_7</KEYWORD1>
+ <KEYWORD1>poisgof</KEYWORD1>
+ <KEYWORD1>poiss_lf</KEYWORD1>
+ <KEYWORD1>poiss_sw</KEYWORD1>
+ <KEYWORD1>poisso_p</KEYWORD1>
+ <KEYWORD1>poisson</KEYWORD1>
+ <KEYWORD1>poisson_estat</KEYWORD1>
+ <KEYWORD1>pop</KEYWORD1>
+ <KEYWORD1>popu</KEYWORD1>
+ <KEYWORD1>popup</KEYWORD1>
+ <KEYWORD1>post</KEYWORD1>
+ <KEYWORD1>postclose</KEYWORD1>
+ <KEYWORD1>postfile</KEYWORD1>
+ <KEYWORD1>pperron</KEYWORD1>
+ <KEYWORD1>pr</KEYWORD1>
+ <KEYWORD1>prais</KEYWORD1>
+ <KEYWORD1>prais_e</KEYWORD1>
+ <KEYWORD1>prais_e2</KEYWORD1>
+ <KEYWORD1>prais_p</KEYWORD1>
+ <KEYWORD1>pred</KEYWORD1>
+ <KEYWORD1>predi</KEYWORD1>
+ <KEYWORD1>predic</KEYWORD1>
+ <KEYWORD1>predict</KEYWORD1>
+ <KEYWORD1>predictnl</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>printgr</KEYWORD1>
+ <KEYWORD1>priorest</KEYWORD1>
+ <KEYWORD1>pro</KEYWORD1>
+ <KEYWORD1>prob</KEYWORD1>
+ <KEYWORD1>probi</KEYWORD1>
+ <KEYWORD1>probit</KEYWORD1>
+ <KEYWORD1>probit_estat</KEYWORD1>
+ <KEYWORD1>probit_p</KEYWORD1>
+ <KEYWORD1>proc_time</KEYWORD1>
+ <KEYWORD1>procoverlay</KEYWORD1>
+ <KEYWORD1>procrustes</KEYWORD1>
+ <KEYWORD1>procrustes_estat</KEYWORD1>
+ <KEYWORD1>procrustes_p</KEYWORD1>
+ <KEYWORD1>profiler</KEYWORD1>
+ <KEYWORD1>prop</KEYWORD1>
+ <KEYWORD1>proportion</KEYWORD1>
+ <KEYWORD1>prove</KEYWORD1>
+ <KEYWORD1>prtest</KEYWORD1>
+ <KEYWORD1>prtesti</KEYWORD1>
+ <KEYWORD1>push</KEYWORD1>
+ <KEYWORD1>pwcorr</KEYWORD1>
+ <KEYWORD1>pwd</KEYWORD1>
+ <KEYWORD1>q</KEYWORD1>
+ <KEYWORD1>qby</KEYWORD1>
+ <KEYWORD1>qbys</KEYWORD1>
+ <KEYWORD1>qchi</KEYWORD1>
+ <KEYWORD1>qchi_7</KEYWORD1>
+ <KEYWORD1>qladder</KEYWORD1>
+ <KEYWORD1>qladder_7</KEYWORD1>
+ <KEYWORD1>qnorm</KEYWORD1>
+ <KEYWORD1>qnorm_7</KEYWORD1>
+ <KEYWORD1>qqplot</KEYWORD1>
+ <KEYWORD1>qqplot_7</KEYWORD1>
+ <KEYWORD1>qreg</KEYWORD1>
+ <KEYWORD1>qreg_c</KEYWORD1>
+ <KEYWORD1>qreg_p</KEYWORD1>
+ <KEYWORD1>qreg_sw</KEYWORD1>
+ <KEYWORD1>qu</KEYWORD1>
+ <KEYWORD1>quadchk</KEYWORD1>
+ <KEYWORD1>quantile</KEYWORD1>
+ <KEYWORD1>quantile_7</KEYWORD1>
+ <KEYWORD1>que</KEYWORD1>
+ <KEYWORD1>quer</KEYWORD1>
+ <KEYWORD1>query</KEYWORD1>
+ <KEYWORD1>qui</KEYWORD1>
+ <KEYWORD1>quie</KEYWORD1>
+ <KEYWORD1>quiet</KEYWORD1>
+ <KEYWORD1>quietl</KEYWORD1>
+ <KEYWORD1>quietly</KEYWORD1>
+ <KEYWORD1>range</KEYWORD1>
+ <KEYWORD1>ranksum</KEYWORD1>
+ <KEYWORD1>ratio</KEYWORD1>
+ <KEYWORD1>rchart</KEYWORD1>
+ <KEYWORD1>rchart_7</KEYWORD1>
+ <KEYWORD1>rcof</KEYWORD1>
+ <KEYWORD1>rc_spline</KEYWORD1>
+ <KEYWORD1>recast</KEYWORD1>
+ <KEYWORD1>reg</KEYWORD1>
+ <KEYWORD1>reg3</KEYWORD1>
+ <KEYWORD1>reg3_p</KEYWORD1>
+ <KEYWORD1>regdw</KEYWORD1>
+ <KEYWORD1>regr</KEYWORD1>
+ <KEYWORD1>regre</KEYWORD1>
+ <KEYWORD1>regre_p2</KEYWORD1>
+ <KEYWORD1>regres</KEYWORD1>
+ <KEYWORD1>regres_p</KEYWORD1>
+ <KEYWORD1>regress</KEYWORD1>
+ <KEYWORD1>regress_estat</KEYWORD1>
+ <KEYWORD1>regriv_p</KEYWORD1>
+ <KEYWORD1>remap</KEYWORD1>
+ <KEYWORD1>ren</KEYWORD1>
+ <KEYWORD1>rena</KEYWORD1>
+ <KEYWORD1>renam</KEYWORD1>
+ <KEYWORD1>rename</KEYWORD1>
+ <KEYWORD1>renpfix</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>reshape</KEYWORD1>
+ <KEYWORD1>ret</KEYWORD1>
+ <KEYWORD1>retu</KEYWORD1>
+ <KEYWORD1>retur</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>robvar</KEYWORD1>
+ <KEYWORD1>robust</KEYWORD1>
+ <KEYWORD1>roccomp</KEYWORD1>
+ <KEYWORD1>roccomp_7</KEYWORD1>
+ <KEYWORD1>roccomp_8</KEYWORD1>
+ <KEYWORD1>rocf_lf</KEYWORD1>
+ <KEYWORD1>rocfit</KEYWORD1>
+ <KEYWORD1>rocfit_8</KEYWORD1>
+ <KEYWORD1>rocgold</KEYWORD1>
+ <KEYWORD1>rocplot</KEYWORD1>
+ <KEYWORD1>rocplot_7</KEYWORD1>
+ <KEYWORD1>roctab</KEYWORD1>
+ <KEYWORD1>roctab_7</KEYWORD1>
+ <KEYWORD1>rolling</KEYWORD1>
+ <KEYWORD1>rologit</KEYWORD1>
+ <KEYWORD1>rologit_p</KEYWORD1>
+ <KEYWORD1>rot</KEYWORD1>
+ <KEYWORD1>rota</KEYWORD1>
+ <KEYWORD1>rotat</KEYWORD1>
+ <KEYWORD1>rotate</KEYWORD1>
+ <KEYWORD1>rotatemat</KEYWORD1>
+ <KEYWORD1>rreg</KEYWORD1>
+ <KEYWORD1>rreg_p</KEYWORD1>
+ <KEYWORD1>rvfplot</KEYWORD1>
+ <KEYWORD1>rvfplot_7</KEYWORD1>
+ <KEYWORD1>rvpplot</KEYWORD1>
+ <KEYWORD1>rvpplot_7</KEYWORD1>
+ <KEYWORD1>sa</KEYWORD1>
+ <KEYWORD1>safesum</KEYWORD1>
+ <KEYWORD1>sample</KEYWORD1>
+ <KEYWORD1>sampsi</KEYWORD1>
+ <KEYWORD1>savedresults</KEYWORD1>
+ <KEYWORD1>saveold</KEYWORD1>
+ <KEYWORD1>say</KEYWORD1>
+ <KEYWORD1>sc</KEYWORD1>
+ <KEYWORD1>sca</KEYWORD1>
+ <KEYWORD1>scal</KEYWORD1>
+ <KEYWORD1>scala</KEYWORD1>
+ <KEYWORD1>scalar</KEYWORD1>
+ <KEYWORD1>scatter</KEYWORD1>
+ <KEYWORD1>scm_mine</KEYWORD1>
+ <KEYWORD1>sco</KEYWORD1>
+ <KEYWORD1>scob_lf</KEYWORD1>
+ <KEYWORD1>scob_p</KEYWORD1>
+ <KEYWORD1>scobi_sw</KEYWORD1>
+ <KEYWORD1>scobit</KEYWORD1>
+ <KEYWORD1>scor</KEYWORD1>
+ <KEYWORD1>score</KEYWORD1>
+ <KEYWORD1>scoreplot</KEYWORD1>
+ <KEYWORD1>scoreplot_help</KEYWORD1>
+ <KEYWORD1>scree</KEYWORD1>
+ <KEYWORD1>screeplot</KEYWORD1>
+ <KEYWORD1>screeplot_help</KEYWORD1>
+ <KEYWORD1>sdtest</KEYWORD1>
+ <KEYWORD1>sdtesti</KEYWORD1>
+ <KEYWORD1>se</KEYWORD1>
+ <KEYWORD1>search</KEYWORD1>
+ <KEYWORD1>separate</KEYWORD1>
+ <KEYWORD1>seperate</KEYWORD1>
+ <KEYWORD1>serrbar</KEYWORD1>
+ <KEYWORD1>serrbar_7</KEYWORD1>
+ <KEYWORD1>set_defaults</KEYWORD1>
+ <KEYWORD1>sfrancia</KEYWORD1>
+ <KEYWORD1>sh</KEYWORD1>
+ <KEYWORD1>she</KEYWORD1>
+ <KEYWORD1>shel</KEYWORD1>
+ <KEYWORD1>shewhart</KEYWORD1>
+ <KEYWORD1>shewhart_7</KEYWORD1>
+ <KEYWORD1>showpoint</KEYWORD1>
+ <KEYWORD1>signestimationsample</KEYWORD1>
+ <KEYWORD1>signrank</KEYWORD1>
+ <KEYWORD1>signtest</KEYWORD1>
+ <KEYWORD1>simul</KEYWORD1>
+ <KEYWORD1>simul_7</KEYWORD1>
+ <KEYWORD1>simulate</KEYWORD1>
+ <KEYWORD1>simulate_8</KEYWORD1>
+ <KEYWORD1>simulinit</KEYWORD1>
+ <KEYWORD1>sktest</KEYWORD1>
+ <KEYWORD1>sleep</KEYWORD1>
+ <KEYWORD1>slogit</KEYWORD1>
+ <KEYWORD1>slogit_d2</KEYWORD1>
+ <KEYWORD1>slogit_p</KEYWORD1>
+ <KEYWORD1>smooth</KEYWORD1>
+ <KEYWORD1>snapspan</KEYWORD1>
+ <KEYWORD1>spbase</KEYWORD1>
+ <KEYWORD1>spearman</KEYWORD1>
+ <KEYWORD1>speedchk1</KEYWORD1>
+ <KEYWORD1>speekchk2</KEYWORD1>
+ <KEYWORD1>spikeplot</KEYWORD1>
+ <KEYWORD1>spikeplot_7</KEYWORD1>
+ <KEYWORD1>spikeplt</KEYWORD1>
+ <KEYWORD1>spline</KEYWORD1>
+ <KEYWORD1>spline_x</KEYWORD1>
+ <KEYWORD1>split</KEYWORD1>
+ <KEYWORD1>sqreg</KEYWORD1>
+ <KEYWORD1>sqreg_p</KEYWORD1>
+ <KEYWORD1>sret</KEYWORD1>
+ <KEYWORD1>sretu</KEYWORD1>
+ <KEYWORD1>sretur</KEYWORD1>
+ <KEYWORD1>sreturn</KEYWORD1>
+ <KEYWORD1>ssc</KEYWORD1>
+ <KEYWORD1>st</KEYWORD1>
+ <KEYWORD1>st_ct</KEYWORD1>
+ <KEYWORD1>st_hc</KEYWORD1>
+ <KEYWORD1>st_hcd</KEYWORD1>
+ <KEYWORD1>st_hcd_sh</KEYWORD1>
+ <KEYWORD1>st_is</KEYWORD1>
+ <KEYWORD1>st_issys</KEYWORD1>
+ <KEYWORD1>st_note</KEYWORD1>
+ <KEYWORD1>st_promo</KEYWORD1>
+ <KEYWORD1>st_set</KEYWORD1>
+ <KEYWORD1>st_show</KEYWORD1>
+ <KEYWORD1>st_smpl</KEYWORD1>
+ <KEYWORD1>st_subid</KEYWORD1>
+ <KEYWORD1>stack</KEYWORD1>
+ <KEYWORD1>stackdepth</KEYWORD1>
+ <KEYWORD1>stackreset</KEYWORD1>
+ <KEYWORD1>statsby</KEYWORD1>
+ <KEYWORD1>statsby_8</KEYWORD1>
+ <KEYWORD1>stbase</KEYWORD1>
+ <KEYWORD1>stci</KEYWORD1>
+ <KEYWORD1>stci_7</KEYWORD1>
+ <KEYWORD1>stcox</KEYWORD1>
+ <KEYWORD1>stcox_estat</KEYWORD1>
+ <KEYWORD1>stcox_fr</KEYWORD1>
+ <KEYWORD1>stcox_fr_ll</KEYWORD1>
+ <KEYWORD1>stcox_p</KEYWORD1>
+ <KEYWORD1>stcox_sw</KEYWORD1>
+ <KEYWORD1>stcoxkm</KEYWORD1>
+ <KEYWORD1>stcoxkm_7</KEYWORD1>
+ <KEYWORD1>stcstat</KEYWORD1>
+ <KEYWORD1>stcurv</KEYWORD1>
+ <KEYWORD1>stcurve</KEYWORD1>
+ <KEYWORD1>stcurve_7</KEYWORD1>
+ <KEYWORD1>stdes</KEYWORD1>
+ <KEYWORD1>stem</KEYWORD1>
+ <KEYWORD1>stepwise</KEYWORD1>
+ <KEYWORD1>stereg</KEYWORD1>
+ <KEYWORD1>stfill</KEYWORD1>
+ <KEYWORD1>stgen</KEYWORD1>
+ <KEYWORD1>stinit</KEYWORD1>
+ <KEYWORD1>stir</KEYWORD1>
+ <KEYWORD1>stjoin</KEYWORD1>
+ <KEYWORD1>stmc</KEYWORD1>
+ <KEYWORD1>stmh</KEYWORD1>
+ <KEYWORD1>stphplot</KEYWORD1>
+ <KEYWORD1>stphplot_7</KEYWORD1>
+ <KEYWORD1>stphtest</KEYWORD1>
+ <KEYWORD1>stphtest_7</KEYWORD1>
+ <KEYWORD1>stptime</KEYWORD1>
+ <KEYWORD1>strate</KEYWORD1>
+ <KEYWORD1>strate_7</KEYWORD1>
+ <KEYWORD1>streg</KEYWORD1>
+ <KEYWORD1>streg_sw</KEYWORD1>
+ <KEYWORD1>streset</KEYWORD1>
+ <KEYWORD1>sts</KEYWORD1>
+ <KEYWORD1>sts_7</KEYWORD1>
+ <KEYWORD1>stset</KEYWORD1>
+ <KEYWORD1>stsplit</KEYWORD1>
+ <KEYWORD1>stsum</KEYWORD1>
+ <KEYWORD1>sttocc</KEYWORD1>
+ <KEYWORD1>sttoct</KEYWORD1>
+ <KEYWORD1>stvary</KEYWORD1>
+ <KEYWORD1>stweib</KEYWORD1>
+ <KEYWORD1>su</KEYWORD1>
+ <KEYWORD1>subwin</KEYWORD1>
+ <KEYWORD1>suest</KEYWORD1>
+ <KEYWORD1>suest_8</KEYWORD1>
+ <KEYWORD1>sum</KEYWORD1>
+ <KEYWORD1>summ</KEYWORD1>
+ <KEYWORD1>summa</KEYWORD1>
+ <KEYWORD1>summar</KEYWORD1>
+ <KEYWORD1>summari</KEYWORD1>
+ <KEYWORD1>summariz</KEYWORD1>
+ <KEYWORD1>summarize</KEYWORD1>
+ <KEYWORD1>sunflower</KEYWORD1>
+ <KEYWORD1>sureg</KEYWORD1>
+ <KEYWORD1>survcurv</KEYWORD1>
+ <KEYWORD1>survsum</KEYWORD1>
+ <KEYWORD1>svar</KEYWORD1>
+ <KEYWORD1>svar_p</KEYWORD1>
+ <KEYWORD1>svmat</KEYWORD1>
+ <KEYWORD1>svy</KEYWORD1>
+ <KEYWORD1>svy_disp</KEYWORD1>
+ <KEYWORD1>svy_dreg</KEYWORD1>
+ <KEYWORD1>svy_est</KEYWORD1>
+ <KEYWORD1>svy_est_7</KEYWORD1>
+ <KEYWORD1>svy_estat</KEYWORD1>
+ <KEYWORD1>svy_get</KEYWORD1>
+ <KEYWORD1>svy_gnbreg_p</KEYWORD1>
+ <KEYWORD1>svy_head</KEYWORD1>
+ <KEYWORD1>svy_header</KEYWORD1>
+ <KEYWORD1>svy_heckman_p</KEYWORD1>
+ <KEYWORD1>svy_heckprob_p</KEYWORD1>
+ <KEYWORD1>svy_intreg_p</KEYWORD1>
+ <KEYWORD1>svy_ivreg_p</KEYWORD1>
+ <KEYWORD1>svy_logistic_p</KEYWORD1>
+ <KEYWORD1>svy_logit_p</KEYWORD1>
+ <KEYWORD1>svy_mlogit_p</KEYWORD1>
+ <KEYWORD1>svy_nbreg_p</KEYWORD1>
+ <KEYWORD1>svy_ologit_p</KEYWORD1>
+ <KEYWORD1>svy_oprobit_p</KEYWORD1>
+ <KEYWORD1>svy_poisson_p</KEYWORD1>
+ <KEYWORD1>svy_probit_p</KEYWORD1>
+ <KEYWORD1>svy_regress_p</KEYWORD1>
+ <KEYWORD1>svy_sub</KEYWORD1>
+ <KEYWORD1>svy_sub_7</KEYWORD1>
+ <KEYWORD1>svy_x</KEYWORD1>
+ <KEYWORD1>svy_x_7</KEYWORD1>
+ <KEYWORD1>svy_x_p</KEYWORD1>
+ <KEYWORD1>svydes</KEYWORD1>
+ <KEYWORD1>svydes_8</KEYWORD1>
+ <KEYWORD1>svygen</KEYWORD1>
+ <KEYWORD1>svygnbreg</KEYWORD1>
+ <KEYWORD1>svyheckman</KEYWORD1>
+ <KEYWORD1>svyheckprob</KEYWORD1>
+ <KEYWORD1>svyintreg</KEYWORD1>
+ <KEYWORD1>svyintreg_7</KEYWORD1>
+ <KEYWORD1>svyintrg</KEYWORD1>
+ <KEYWORD1>svyivreg</KEYWORD1>
+ <KEYWORD1>svylc</KEYWORD1>
+ <KEYWORD1>svylog_p</KEYWORD1>
+ <KEYWORD1>svylogit</KEYWORD1>
+ <KEYWORD1>svymarkout</KEYWORD1>
+ <KEYWORD1>svymarkout_8</KEYWORD1>
+ <KEYWORD1>svymean</KEYWORD1>
+ <KEYWORD1>svymlog</KEYWORD1>
+ <KEYWORD1>svymlogit</KEYWORD1>
+ <KEYWORD1>svynbreg</KEYWORD1>
+ <KEYWORD1>svyolog</KEYWORD1>
+ <KEYWORD1>svyologit</KEYWORD1>
+ <KEYWORD1>svyoprob</KEYWORD1>
+ <KEYWORD1>svyoprobit</KEYWORD1>
+ <KEYWORD1>svyopts</KEYWORD1>
+ <KEYWORD1>svypois</KEYWORD1>
+ <KEYWORD1>svypois_7</KEYWORD1>
+ <KEYWORD1>svypoisson</KEYWORD1>
+ <KEYWORD1>svyprobit</KEYWORD1>
+ <KEYWORD1>svyprobt</KEYWORD1>
+ <KEYWORD1>svyprop</KEYWORD1>
+ <KEYWORD1>svyprop_7</KEYWORD1>
+ <KEYWORD1>svyratio</KEYWORD1>
+ <KEYWORD1>svyreg</KEYWORD1>
+ <KEYWORD1>svyreg_p</KEYWORD1>
+ <KEYWORD1>svyregress</KEYWORD1>
+ <KEYWORD1>svyset</KEYWORD1>
+ <KEYWORD1>svyset_7</KEYWORD1>
+ <KEYWORD1>svyset_8</KEYWORD1>
+ <KEYWORD1>svytab</KEYWORD1>
+ <KEYWORD1>svytab_7</KEYWORD1>
+ <KEYWORD1>svytest</KEYWORD1>
+ <KEYWORD1>svytotal</KEYWORD1>
+ <KEYWORD1>sw</KEYWORD1>
+ <KEYWORD1>sw_8</KEYWORD1>
+ <KEYWORD1>swcnreg</KEYWORD1>
+ <KEYWORD1>swcox</KEYWORD1>
+ <KEYWORD1>swereg</KEYWORD1>
+ <KEYWORD1>swilk</KEYWORD1>
+ <KEYWORD1>swlogis</KEYWORD1>
+ <KEYWORD1>swlogit</KEYWORD1>
+ <KEYWORD1>swologit</KEYWORD1>
+ <KEYWORD1>swoprbt</KEYWORD1>
+ <KEYWORD1>swpois</KEYWORD1>
+ <KEYWORD1>swprobit</KEYWORD1>
+ <KEYWORD1>swqreg</KEYWORD1>
+ <KEYWORD1>swtobit</KEYWORD1>
+ <KEYWORD1>swweib</KEYWORD1>
+ <KEYWORD1>symmetry</KEYWORD1>
+ <KEYWORD1>symmi</KEYWORD1>
+ <KEYWORD1>symplot</KEYWORD1>
+ <KEYWORD1>symplot_7</KEYWORD1>
+ <KEYWORD1>syntax</KEYWORD1>
+ <KEYWORD1>sysdescribe</KEYWORD1>
+ <KEYWORD1>sysuse</KEYWORD1>
+ <KEYWORD1>szroeter</KEYWORD1>
+ <KEYWORD1>ta</KEYWORD1>
+ <KEYWORD1>tab</KEYWORD1>
+ <KEYWORD1>tab1</KEYWORD1>
+ <KEYWORD1>tab2</KEYWORD1>
+ <KEYWORD1>tab_or</KEYWORD1>
+ <KEYWORD1>tabd</KEYWORD1>
+ <KEYWORD1>tabdi</KEYWORD1>
+ <KEYWORD1>tabdis</KEYWORD1>
+ <KEYWORD1>tabdisp</KEYWORD1>
+ <KEYWORD1>tabi</KEYWORD1>
+ <KEYWORD1>table</KEYWORD1>
+ <KEYWORD1>tabodds</KEYWORD1>
+ <KEYWORD1>tabodds_7</KEYWORD1>
+ <KEYWORD1>tabstat</KEYWORD1>
+ <KEYWORD1>tabu</KEYWORD1>
+ <KEYWORD1>tabul</KEYWORD1>
+ <KEYWORD1>tabula</KEYWORD1>
+ <KEYWORD1>tabulat</KEYWORD1>
+ <KEYWORD1>tabulate</KEYWORD1>
+ <KEYWORD1>te</KEYWORD1>
+ <KEYWORD1>tempfile</KEYWORD1>
+ <KEYWORD1>tempname</KEYWORD1>
+ <KEYWORD1>tempvar</KEYWORD1>
+ <KEYWORD1>tes</KEYWORD1>
+ <KEYWORD1>test</KEYWORD1>
+ <KEYWORD1>testnl</KEYWORD1>
+ <KEYWORD1>testparm</KEYWORD1>
+ <KEYWORD1>teststd</KEYWORD1>
+ <KEYWORD1>tetrachoric</KEYWORD1>
+ <KEYWORD1>time_it</KEYWORD1>
+ <KEYWORD1>timer</KEYWORD1>
+ <KEYWORD1>tis</KEYWORD1>
+ <KEYWORD1>tob</KEYWORD1>
+ <KEYWORD1>tobi</KEYWORD1>
+ <KEYWORD1>tobit</KEYWORD1>
+ <KEYWORD1>tobit_p</KEYWORD1>
+ <KEYWORD1>tobit_sw</KEYWORD1>
+ <KEYWORD1>token</KEYWORD1>
+ <KEYWORD1>tokeni</KEYWORD1>
+ <KEYWORD1>tokeniz</KEYWORD1>
+ <KEYWORD1>tokenize</KEYWORD1>
+ <KEYWORD1>tostring</KEYWORD1>
+ <KEYWORD1>total</KEYWORD1>
+ <KEYWORD1>touch</KEYWORD1>
+ <KEYWORD1>treat_ll</KEYWORD1>
+ <KEYWORD1>treatr_p</KEYWORD1>
+ <KEYWORD1>treatreg</KEYWORD1>
+ <KEYWORD1>trim</KEYWORD1>
+ <KEYWORD1>trnb_cons</KEYWORD1>
+ <KEYWORD1>trnb_mean</KEYWORD1>
+ <KEYWORD1>trpoiss_d2</KEYWORD1>
+ <KEYWORD1>trunc_ll</KEYWORD1>
+ <KEYWORD1>truncr_p</KEYWORD1>
+ <KEYWORD1>truncreg</KEYWORD1>
+ <KEYWORD1>tsappend</KEYWORD1>
+ <KEYWORD1>tset</KEYWORD1>
+ <KEYWORD1>tsfill</KEYWORD1>
+ <KEYWORD1>tsline</KEYWORD1>
+ <KEYWORD1>tsline_ex</KEYWORD1>
+ <KEYWORD1>tsreport</KEYWORD1>
+ <KEYWORD1>tsrevar</KEYWORD1>
+ <KEYWORD1>tsrline</KEYWORD1>
+ <KEYWORD1>tsset</KEYWORD1>
+ <KEYWORD1>tssmooth</KEYWORD1>
+ <KEYWORD1>tsunab</KEYWORD1>
+ <KEYWORD1>ttest</KEYWORD1>
+ <KEYWORD1>ttesti</KEYWORD1>
+ <KEYWORD1>tut_chk</KEYWORD1>
+ <KEYWORD1>tut_wait</KEYWORD1>
+ <KEYWORD1>tutorial</KEYWORD1>
+ <KEYWORD1>tw</KEYWORD1>
+ <KEYWORD1>tware_st</KEYWORD1>
+ <KEYWORD1>two</KEYWORD1>
+ <KEYWORD1>twoway</KEYWORD1>
+ <KEYWORD1>twoway__fpfit_serset</KEYWORD1>
+ <KEYWORD1>twoway__function_gen</KEYWORD1>
+ <KEYWORD1>twoway__histogram_gen</KEYWORD1>
+ <KEYWORD1>twoway__ipoint_serset</KEYWORD1>
+ <KEYWORD1>twoway__ipoints_serset</KEYWORD1>
+ <KEYWORD1>twoway__kdensity_gen</KEYWORD1>
+ <KEYWORD1>twoway__lfit_serset</KEYWORD1>
+ <KEYWORD1>twoway__normgen_gen</KEYWORD1>
+ <KEYWORD1>twoway__pci_serset</KEYWORD1>
+ <KEYWORD1>twoway__qfit_serset</KEYWORD1>
+ <KEYWORD1>twoway__scatteri_serset</KEYWORD1>
+ <KEYWORD1>twoway__sunflower_gen</KEYWORD1>
+ <KEYWORD1>twoway_ksm_serset</KEYWORD1>
+ <KEYWORD1>ty</KEYWORD1>
+ <KEYWORD1>typ</KEYWORD1>
+ <KEYWORD1>type</KEYWORD1>
+ <KEYWORD1>typeof</KEYWORD1>
+ <KEYWORD1>u</KEYWORD1>
+ <KEYWORD1>unab</KEYWORD1>
+ <KEYWORD1>unabbrev</KEYWORD1>
+ <KEYWORD1>unidiff</KEYWORD1>
+ <KEYWORD1>update</KEYWORD1>
+ <KEYWORD1>us</KEYWORD1>
+ <KEYWORD1>uselabel</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD1>var_mkcompanion</KEYWORD1>
+ <KEYWORD1>var_p</KEYWORD1>
+ <KEYWORD1>varbasic</KEYWORD1>
+ <KEYWORD1>varfcast</KEYWORD1>
+ <KEYWORD1>vargranger</KEYWORD1>
+ <KEYWORD1>varirf</KEYWORD1>
+ <KEYWORD1>varirf_add</KEYWORD1>
+ <KEYWORD1>varirf_cgraph</KEYWORD1>
+ <KEYWORD1>varirf_create</KEYWORD1>
+ <KEYWORD1>varirf_ctable</KEYWORD1>
+ <KEYWORD1>varirf_describe</KEYWORD1>
+ <KEYWORD1>varirf_dir</KEYWORD1>
+ <KEYWORD1>varirf_drop</KEYWORD1>
+ <KEYWORD1>varirf_erase</KEYWORD1>
+ <KEYWORD1>varirf_graph</KEYWORD1>
+ <KEYWORD1>varirf_ograph</KEYWORD1>
+ <KEYWORD1>varirf_rename</KEYWORD1>
+ <KEYWORD1>varirf_set</KEYWORD1>
+ <KEYWORD1>varirf_table</KEYWORD1>
+ <KEYWORD1>varlmar</KEYWORD1>
+ <KEYWORD1>varnorm</KEYWORD1>
+ <KEYWORD1>varsoc</KEYWORD1>
+ <KEYWORD1>varstable</KEYWORD1>
+ <KEYWORD1>varstable_w</KEYWORD1>
+ <KEYWORD1>varstable_w2</KEYWORD1>
+ <KEYWORD1>varwle</KEYWORD1>
+ <KEYWORD1>vce</KEYWORD1>
+ <KEYWORD1>vec</KEYWORD1>
+ <KEYWORD1>vec_fevd</KEYWORD1>
+ <KEYWORD1>vec_mkphi</KEYWORD1>
+ <KEYWORD1>vec_p</KEYWORD1>
+ <KEYWORD1>vec_p_w</KEYWORD1>
+ <KEYWORD1>vecirf_create</KEYWORD1>
+ <KEYWORD1>veclmar</KEYWORD1>
+ <KEYWORD1>veclmar_w</KEYWORD1>
+ <KEYWORD1>vecnorm</KEYWORD1>
+ <KEYWORD1>vecnorm_w</KEYWORD1>
+ <KEYWORD1>vecrank</KEYWORD1>
+ <KEYWORD1>vecstable</KEYWORD1>
+ <KEYWORD1>verinst</KEYWORD1>
+ <KEYWORD1>vers</KEYWORD1>
+ <KEYWORD1>versi</KEYWORD1>
+ <KEYWORD1>versio</KEYWORD1>
+ <KEYWORD1>version</KEYWORD1>
+ <KEYWORD1>viewsource</KEYWORD1>
+ <KEYWORD1>vif</KEYWORD1>
+ <KEYWORD1>vwls</KEYWORD1>
+ <KEYWORD1>wdatetof</KEYWORD1>
+ <KEYWORD1>wdctl</KEYWORD1>
+ <KEYWORD1>wdlg</KEYWORD1>
+ <KEYWORD1>wdupdate</KEYWORD1>
+ <KEYWORD1>webdescribe</KEYWORD1>
+ <KEYWORD1>webseek</KEYWORD1>
+ <KEYWORD1>webuse</KEYWORD1>
+ <KEYWORD1>weib1_lf</KEYWORD1>
+ <KEYWORD1>weib2_lf</KEYWORD1>
+ <KEYWORD1>weib_lf</KEYWORD1>
+ <KEYWORD1>weib_lf0</KEYWORD1>
+ <KEYWORD1>weibhet_glf</KEYWORD1>
+ <KEYWORD1>weibhet_glf_sh</KEYWORD1>
+ <KEYWORD1>weibhet_glfa</KEYWORD1>
+ <KEYWORD1>weibhet_glfa_sh</KEYWORD1>
+ <KEYWORD1>weibhet_gp</KEYWORD1>
+ <KEYWORD1>weibhet_ilf</KEYWORD1>
+ <KEYWORD1>weibhet_ilf_sh</KEYWORD1>
+ <KEYWORD1>weibhet_ilfa</KEYWORD1>
+ <KEYWORD1>weibhet_ilfa_sh</KEYWORD1>
+ <KEYWORD1>weibhet_ip</KEYWORD1>
+ <KEYWORD1>weibu_sw</KEYWORD1>
+ <KEYWORD1>weibul_p</KEYWORD1>
+ <KEYWORD1>weibull</KEYWORD1>
+ <KEYWORD1>weibull_c</KEYWORD1>
+ <KEYWORD1>weibull_s</KEYWORD1>
+ <KEYWORD1>weibullhet</KEYWORD1>
+ <KEYWORD1>wh</KEYWORD1>
+ <KEYWORD1>whelp</KEYWORD1>
+ <KEYWORD1>whi</KEYWORD1>
+ <KEYWORD1>whic</KEYWORD1>
+ <KEYWORD1>which</KEYWORD1>
+ <KEYWORD1>who</KEYWORD1>
+ <KEYWORD1>wilc_st</KEYWORD1>
+ <KEYWORD1>wilcoxon</KEYWORD1>
+ <KEYWORD1>win</KEYWORD1>
+ <KEYWORD1>wind</KEYWORD1>
+ <KEYWORD1>windo</KEYWORD1>
+ <KEYWORD1>window</KEYWORD1>
+ <KEYWORD1>winexec</KEYWORD1>
+ <KEYWORD1>wmenu</KEYWORD1>
+ <KEYWORD1>wntestb</KEYWORD1>
+ <KEYWORD1>wntestb_7</KEYWORD1>
+ <KEYWORD1>wntestq</KEYWORD1>
+ <KEYWORD1>xchart</KEYWORD1>
+ <KEYWORD1>xchart_7</KEYWORD1>
+ <KEYWORD1>xcorr</KEYWORD1>
+ <KEYWORD1>xcorr_7</KEYWORD1>
+ <KEYWORD1>xi</KEYWORD1>
+ <KEYWORD1>xi_6</KEYWORD1>
+ <KEYWORD1>xpose</KEYWORD1>
+ <KEYWORD1>xt_iis</KEYWORD1>
+ <KEYWORD1>xt_tis</KEYWORD1>
+ <KEYWORD1>xtab_p</KEYWORD1>
+ <KEYWORD1>xtabond</KEYWORD1>
+ <KEYWORD1>xtabond2</KEYWORD1>
+ <KEYWORD1>xtbin_p</KEYWORD1>
+ <KEYWORD1>xtclog</KEYWORD1>
+ <KEYWORD1>xtcloglog</KEYWORD1>
+ <KEYWORD1>xtcloglog_8</KEYWORD1>
+ <KEYWORD1>xtcloglog_d2</KEYWORD1>
+ <KEYWORD1>xtcloglog_pa_p</KEYWORD1>
+ <KEYWORD1>xtcloglog_re_p</KEYWORD1>
+ <KEYWORD1>xtcnt_p</KEYWORD1>
+ <KEYWORD1>xtcorr</KEYWORD1>
+ <KEYWORD1>xtdata</KEYWORD1>
+ <KEYWORD1>xtdes</KEYWORD1>
+ <KEYWORD1>xtdpdsys</KEYWORD1>
+ <KEYWORD1>xtfisher</KEYWORD1>
+ <KEYWORD1>xtfront_p</KEYWORD1>
+ <KEYWORD1>xtfrontier</KEYWORD1>
+ <KEYWORD1>xtgee</KEYWORD1>
+ <KEYWORD1>xtgee_elink</KEYWORD1>
+ <KEYWORD1>xtgee_estat</KEYWORD1>
+ <KEYWORD1>xtgee_makeivar</KEYWORD1>
+ <KEYWORD1>xtgee_p</KEYWORD1>
+ <KEYWORD1>xtgee_plink</KEYWORD1>
+ <KEYWORD1>xtgls</KEYWORD1>
+ <KEYWORD1>xtgls_p</KEYWORD1>
+ <KEYWORD1>xthaus</KEYWORD1>
+ <KEYWORD1>xthausman</KEYWORD1>
+ <KEYWORD1>xtht_p</KEYWORD1>
+ <KEYWORD1>xthtaylor</KEYWORD1>
+ <KEYWORD1>xtile</KEYWORD1>
+ <KEYWORD1>xtint_p</KEYWORD1>
+ <KEYWORD1>xtintreg</KEYWORD1>
+ <KEYWORD1>xtintreg_8</KEYWORD1>
+ <KEYWORD1>xtintreg_d2</KEYWORD1>
+ <KEYWORD1>xtintreg_p</KEYWORD1>
+ <KEYWORD1>xtivp_1</KEYWORD1>
+ <KEYWORD1>xtivp_2</KEYWORD1>
+ <KEYWORD1>xtivreg</KEYWORD1>
+ <KEYWORD1>xtline</KEYWORD1>
+ <KEYWORD1>xtline_ex</KEYWORD1>
+ <KEYWORD1>xtlogit</KEYWORD1>
+ <KEYWORD1>xtlogit_8</KEYWORD1>
+ <KEYWORD1>xtlogit_d2</KEYWORD1>
+ <KEYWORD1>xtlogit_fe_p</KEYWORD1>
+ <KEYWORD1>xtlogit_pa_p</KEYWORD1>
+ <KEYWORD1>xtlogit_re_p</KEYWORD1>
+ <KEYWORD1>xtlsdvc</KEYWORD1>
+ <KEYWORD1>xtmixed</KEYWORD1>
+ <KEYWORD1>xtmixed_estat</KEYWORD1>
+ <KEYWORD1>xtmixed_p</KEYWORD1>
+ <KEYWORD1>xtnb_fe</KEYWORD1>
+ <KEYWORD1>xtnb_lf</KEYWORD1>
+ <KEYWORD1>xtnbreg</KEYWORD1>
+ <KEYWORD1>xtnbreg_pa_p</KEYWORD1>
+ <KEYWORD1>xtnbreg_refe_p</KEYWORD1>
+ <KEYWORD1>xtpcse</KEYWORD1>
+ <KEYWORD1>xtpcse_p</KEYWORD1>
+ <KEYWORD1>xtpois</KEYWORD1>
+ <KEYWORD1>xtpoisson</KEYWORD1>
+ <KEYWORD1>xtpoisson_d2</KEYWORD1>
+ <KEYWORD1>xtpoisson_pa_p</KEYWORD1>
+ <KEYWORD1>xtpoisson_refe_p</KEYWORD1>
+ <KEYWORD1>xtpred</KEYWORD1>
+ <KEYWORD1>xtprobit</KEYWORD1>
+ <KEYWORD1>xtprobit_8</KEYWORD1>
+ <KEYWORD1>xtprobit_d2</KEYWORD1>
+ <KEYWORD1>xtprobit_re_p</KEYWORD1>
+ <KEYWORD1>xtps_fe</KEYWORD1>
+ <KEYWORD1>xtps_lf</KEYWORD1>
+ <KEYWORD1>xtps_ren</KEYWORD1>
+ <KEYWORD1>xtps_ren_8</KEYWORD1>
+ <KEYWORD1>xtrar_p</KEYWORD1>
+ <KEYWORD1>xtrc</KEYWORD1>
+ <KEYWORD1>xtrc_p</KEYWORD1>
+ <KEYWORD1>xtrch_p</KEYWORD1>
+ <KEYWORD1>xtrchh</KEYWORD1>
+ <KEYWORD1>xtrefe_p</KEYWORD1>
+ <KEYWORD1>xtreg</KEYWORD1>
+ <KEYWORD1>xtreg_be</KEYWORD1>
+ <KEYWORD1>xtreg_fe</KEYWORD1>
+ <KEYWORD1>xtreg_ml</KEYWORD1>
+ <KEYWORD1>xtreg_pa_p</KEYWORD1>
+ <KEYWORD1>xtreg_re</KEYWORD1>
+ <KEYWORD1>xtregar</KEYWORD1>
+ <KEYWORD1>xtrere_p</KEYWORD1>
+ <KEYWORD1>xtserial</KEYWORD1>
+ <KEYWORD1>xtset</KEYWORD1>
+ <KEYWORD1>xtsf_ll</KEYWORD1>
+ <KEYWORD1>xtsf_llti</KEYWORD1>
+ <KEYWORD1>xtsum</KEYWORD1>
+ <KEYWORD1>xttab</KEYWORD1>
+ <KEYWORD1>xttest0</KEYWORD1>
+ <KEYWORD1>xttest2</KEYWORD1>
+ <KEYWORD1>xttest3</KEYWORD1>
+ <KEYWORD1>xttobit</KEYWORD1>
+ <KEYWORD1>xttobit_8</KEYWORD1>
+ <KEYWORD1>xttobit_p</KEYWORD1>
+ <KEYWORD1>xttrans</KEYWORD1>
+ <KEYWORD1>xwin</KEYWORD1>
+ <KEYWORD1>xwind</KEYWORD1>
+ <KEYWORD1>xwindo</KEYWORD1>
+ <KEYWORD1>xwindow</KEYWORD1>
+ <KEYWORD1>y_ado</KEYWORD1>
+ <KEYWORD1>yx</KEYWORD1>
+ <KEYWORD1>yxview__barlike_draw</KEYWORD1>
+ <KEYWORD1>yxview_area_draw</KEYWORD1>
+ <KEYWORD1>yxview_bar_draw</KEYWORD1>
+ <KEYWORD1>yxview_dot_draw</KEYWORD1>
+ <KEYWORD1>yxview_dropline_draw</KEYWORD1>
+ <KEYWORD1>yxview_function_draw</KEYWORD1>
+ <KEYWORD1>yxview_iarrow_draw</KEYWORD1>
+ <KEYWORD1>yxview_ilabels_draw</KEYWORD1>
+ <KEYWORD1>yxview_normal_draw</KEYWORD1>
+ <KEYWORD1>yxview_pcarrow_draw</KEYWORD1>
+ <KEYWORD1>yxview_pcbarrow_draw</KEYWORD1>
+ <KEYWORD1>yxview_pccapsym_draw</KEYWORD1>
+ <KEYWORD1>yxview_pcscatter_draw</KEYWORD1>
+ <KEYWORD1>yxview_pcspike_draw</KEYWORD1>
+ <KEYWORD1>yxview_rarea_draw</KEYWORD1>
+ <KEYWORD1>yxview_rbar_draw</KEYWORD1>
+ <KEYWORD1>yxview_rbarm_draw</KEYWORD1>
+ <KEYWORD1>yxview_rcap_draw</KEYWORD1>
+ <KEYWORD1>yxview_rcapsym_draw</KEYWORD1>
+ <KEYWORD1>yxview_rconnected_draw</KEYWORD1>
+ <KEYWORD1>yxview_rline_draw</KEYWORD1>
+ <KEYWORD1>yxview_rscatter_draw</KEYWORD1>
+ <KEYWORD1>yxview_rspike_draw</KEYWORD1>
+ <KEYWORD1>yxview_spike_draw</KEYWORD1>
+ <KEYWORD1>yxview_sunflower_draw</KEYWORD1>
+ <KEYWORD1>zap_s</KEYWORD1>
+ <KEYWORD1>zinb</KEYWORD1>
+ <KEYWORD1>zinb_llf</KEYWORD1>
+ <KEYWORD1>zinb_plf</KEYWORD1>
+ <KEYWORD1>zip</KEYWORD1>
+ <KEYWORD1>zip_llf</KEYWORD1>
+ <KEYWORD1>zip_p</KEYWORD1>
+ <KEYWORD1>zip_plf</KEYWORD1>
+ <KEYWORD1>zt_ct_5</KEYWORD1>
+ <KEYWORD1>zt_hc_5</KEYWORD1>
+ <KEYWORD1>zt_hcd_5</KEYWORD1>
+ <KEYWORD1>zt_is_5</KEYWORD1>
+ <KEYWORD1>zt_iss_5</KEYWORD1>
+ <KEYWORD1>zt_sho_5</KEYWORD1>
+ <KEYWORD1>zt_smp_5</KEYWORD1>
+ <KEYWORD1>ztbase_5</KEYWORD1>
+ <KEYWORD1>ztcox_5</KEYWORD1>
+ <KEYWORD1>ztdes_5</KEYWORD1>
+ <KEYWORD1>ztereg_5</KEYWORD1>
+ <KEYWORD1>ztfill_5</KEYWORD1>
+ <KEYWORD1>ztgen_5</KEYWORD1>
+ <KEYWORD1>ztir_5</KEYWORD1>
+ <KEYWORD1>ztjoin_5</KEYWORD1>
+ <KEYWORD1>ztnb</KEYWORD1>
+ <KEYWORD1>ztnb_p</KEYWORD1>
+ <KEYWORD1>ztp</KEYWORD1>
+ <KEYWORD1>ztp_p</KEYWORD1>
+ <KEYWORD1>zts_5</KEYWORD1>
+ <KEYWORD1>ztset_5</KEYWORD1>
+ <KEYWORD1>ztspli_5</KEYWORD1>
+ <KEYWORD1>ztsum_5</KEYWORD1>
+ <KEYWORD1>zttoct_5</KEYWORD1>
+ <KEYWORD1>ztvary_5</KEYWORD1>
+ <KEYWORD1>ztweib_5</KEYWORD1>
+
+ <!-- display ) -->
+ <KEYWORD1>inp</KEYWORD1>
+ <KEYWORD1>res</KEYWORD1>
+ <KEYWORD1>txt</KEYWORD1>
+
+
+
+ <!-- Survival Model keywords (recent addons ) -->
+ <KEYWORD1>basec</KEYWORD1>
+ <KEYWORD1>basechazard</KEYWORD1>
+ <KEYWORD1>basehc</KEYWORD1>
+ <KEYWORD1>bases</KEYWORD1>
+ <KEYWORD1>basesurv</KEYWORD1>
+ <KEYWORD1>eff</KEYWORD1>
+ <KEYWORD1>effects</KEYWORD1>
+ <KEYWORD1>esr</KEYWORD1>
+ <KEYWORD1>tvc</KEYWORD1>
+ <KEYWORD1>strata</KEYWORD1>
+ <KEYWORD1>efron</KEYWORD1>
+ <KEYWORD1>shared</KEYWORD1>
+ <KEYWORD1>sh</KEYWORD1>
+ <KEYWORD1>offset</KEYWORD1>
+ <KEYWORD1>breslow</KEYWORD1>
+ <KEYWORD1>bre</KEYWORD1>
+ <KEYWORD1>texp</KEYWORD1>
+ <KEYWORD1>exactm</KEYWORD1>
+ <KEYWORD1>exactp</KEYWORD1>
+ <KEYWORD1>con</KEYWORD1>
+ <KEYWORD1>noadjust</KEYWORD1>
+ <KEYWORD1>noadj</KEYWORD1>
+ <KEYWORD1>noshow</KEYWORD1>
+ <KEYWORD1>nosh</KEYWORD1>
+ <KEYWORD1>mgale</KEYWORD1>
+ <KEYWORD1>mg</KEYWORD1>
+ <KEYWORD1>phtest</KEYWORD1>
+ <KEYWORD1>sch</KEYWORD1>
+ <KEYWORD1>schoenfeld</KEYWORD1>
+ <KEYWORD1>scaledsch</KEYWORD1>
+ <KEYWORD1>sca</KEYWORD1>
+ <KEYWORD1>stphplot</KEYWORD1>
+ <KEYWORD1>stcoxkm</KEYWORD1>
+ <KEYWORD1>z</KEYWORD1>
+ <KEYWORD1>zero</KEYWORD1>
+ <KEYWORD1>noneg</KEYWORD1>
+ <KEYWORD1>nonegative</KEYWORD1>
+ <KEYWORD1>nolnt</KEYWORD1>
+ <KEYWORD1>nolntime</KEYWORD1>
+ <KEYWORD1>addplot</KEYWORD1>
+ <KEYWORD1>ties</KEYWORD1>
+ <KEYWORD1>tie</KEYWORD1>
+ <KEYWORD1>sep</KEYWORD1>
+ <KEYWORD1>separate</KEYWORD1>
+
+ <!-- Some add-on ado packages: -->
+ <KEYWORD1>_gsqelemcount</KEYWORD1>
+ <KEYWORD1>_gsqepicount</KEYWORD1>
+ <KEYWORD1>_gsqgapcount</KEYWORD1>
+ <KEYWORD1>_gsqgaplength</KEYWORD1>
+ <KEYWORD1>_gsqitemcount</KEYWORD1>
+ <KEYWORD1>_gsqlength</KEYWORD1>
+ <KEYWORD1>est2one</KEYWORD1>
+ <KEYWORD1>est2rowlbl</KEYWORD1>
+ <KEYWORD1>est2tex</KEYWORD1>
+ <KEYWORD1>est2vec</KEYWORD1>
+ <KEYWORD1>estsimp</KEYWORD1>
+ <KEYWORD1>maketex</KEYWORD1>
+ <KEYWORD1>matload</KEYWORD1>
+ <KEYWORD1>matsave</KEYWORD1>
+ <KEYWORD1>newey2</KEYWORD1>
+ <KEYWORD1>outtable</KEYWORD1>
+ <KEYWORD1>outtable7</KEYWORD1>
+ <KEYWORD1>outtex</KEYWORD1>
+ <KEYWORD1>outtex6</KEYWORD1>
+ <KEYWORD1>relogit</KEYWORD1>
+ <KEYWORD1>relogitq</KEYWORD1>
+ <KEYWORD1>renvars</KEYWORD1>
+ <KEYWORD1>setx</KEYWORD1>
+ <KEYWORD1>setxhl</KEYWORD1>
+ <KEYWORD1>simqi</KEYWORD1>
+ <KEYWORD1>sp_adj</KEYWORD1>
+ <KEYWORD1>spbase</KEYWORD1>
+ <KEYWORD1>spline</KEYWORD1>
+ <KEYWORD1>sqclusterdat</KEYWORD1>
+ <KEYWORD1>sqclustermat</KEYWORD1>
+ <KEYWORD1>sqdes</KEYWORD1>
+ <KEYWORD1>sqindexplot</KEYWORD1>
+ <KEYWORD1>sqom</KEYWORD1>
+ <KEYWORD1>sqparcoord</KEYWORD1>
+ <KEYWORD1>sqset</KEYWORD1>
+ <KEYWORD1>sqstatlist</KEYWORD1>
+ <KEYWORD1>sqstatsum</KEYWORD1>
+ <KEYWORD1>sqstattab1</KEYWORD1>
+ <KEYWORD1>sqstattab2</KEYWORD1>
+ <KEYWORD1>sqstattabsum</KEYWORD1>
+ <KEYWORD1>sqtab</KEYWORD1>
+ <KEYWORD1>sumqi</KEYWORD1>
+ <KEYWORD1>sutex</KEYWORD1>
+ <KEYWORD1>sutex6</KEYWORD1>
+ <KEYWORD1>tlogit</KEYWORD1>
+ <KEYWORD1>xtfevd</KEYWORD1>
+ <KEYWORD1>xtserial</KEYWORD1>
+ <KEYWORD1>xttest1</KEYWORD1>
+
+ <!-- options: -->
+ <KEYWORD1>nokeep</KEYWORD1>
+ <KEYWORD1>fe</KEYWORD1>
+ <KEYWORD1>re</KEYWORD1>
+ <KEYWORD1>pairwise</KEYWORD1>
+ <KEYWORD1>gmm</KEYWORD1>
+ <KEYWORD1>distribution</KEYWORD1>
+ <KEYWORD1>loglogistic</KEYWORD1>
+ <KEYWORD1>lognormal</KEYWORD1>
+ <KEYWORD1>exponential</KEYWORD1>
+ <KEYWORD1>nohr</KEYWORD1>
+ <KEYWORD1>schoenfeld</KEYWORD1>
+ <KEYWORD1>scaledsch</KEYWORD1>
+ <KEYWORD1>basechazard</KEYWORD1>
+ <KEYWORD1>basesurv</KEYWORD1>
+ <KEYWORD1>basehc</KEYWORD1>
+ <KEYWORD1>esr</KEYWORD1>
+ <KEYWORD1>time0</KEYWORD1>
+ <KEYWORD1>origin</KEYWORD1>
+
+ <!-- graphing options: -->
+ <KEYWORD1>dropline</KEYWORD1>
+ <KEYWORD1>bar</KEYWORD1>
+ <KEYWORD1>hbar</KEYWORD1>
+ <KEYWORD1>allc</KEYWORD1>
+ <KEYWORD1>allcategories</KEYWORD1>
+ <KEYWORD1>yalt</KEYWORD1>
+ <KEYWORD1>xalt</KEYWORD1>
+ <KEYWORD1>yalternate</KEYWORD1>
+ <KEYWORD1>xalternate</KEYWORD1>
+ <KEYWORD1>exclude0</KEYWORD1>
+ <KEYWORD1>yrev</KEYWORD1>
+ <KEYWORD1>yreverse</KEYWORD1>
+ <KEYWORD1>blab</KEYWORD1>
+ <KEYWORD1>blabel</KEYWORD1>
+ <KEYWORD1>yvar</KEYWORD1>
+ <KEYWORD1>yvaroptions</KEYWORD1>
+ <KEYWORD1>nolabel</KEYWORD1>
+ <KEYWORD1>nolab</KEYWORD1>
+ <KEYWORD1>dot</KEYWORD1>
+ <KEYWORD1>box</KEYWORD1>
+ <KEYWORD1>pie</KEYWORD1>
+ <KEYWORD1>combine</KEYWORD1>
+ <KEYWORD1>printcolor</KEYWORD1>
+ <KEYWORD1>yax</KEYWORD1>
+ <KEYWORD1>xax</KEYWORD1>
+ <KEYWORD1>yaxis</KEYWORD1>
+ <KEYWORD1>xaxis</KEYWORD1>
+ <KEYWORD1>legend</KEYWORD1>
+ <KEYWORD1>msymbol</KEYWORD1>
+ <KEYWORD1>ytic</KEYWORD1>
+ <KEYWORD1>xtic</KEYWORD1>
+ <KEYWORD1>ytick</KEYWORD1>
+ <KEYWORD1>xtick</KEYWORD1>
+ <KEYWORD1>lpattern</KEYWORD1>
+ <KEYWORD1>ti</KEYWORD1>
+ <KEYWORD1>tick</KEYWORD1>
+ <KEYWORD1>mlab</KEYWORD1>
+ <KEYWORD1>mlabel</KEYWORD1>
+ <KEYWORD1>mtick</KEYWORD1>
+ <KEYWORD1>mtic</KEYWORD1>
+ <KEYWORD1>yscale</KEYWORD1>
+ <KEYWORD1>xscale</KEYWORD1>
+ <KEYWORD1>tscale</KEYWORD1>
+ <KEYWORD1>ysc</KEYWORD1>
+ <KEYWORD1>xsc</KEYWORD1>
+ <KEYWORD1>tsc</KEYWORD1>
+ <KEYWORD1>ylab</KEYWORD1>
+ <KEYWORD1>xlab</KEYWORD1>
+ <KEYWORD1>ylabel</KEYWORD1>
+ <KEYWORD1>xlabel</KEYWORD1>
+ <KEYWORD1>yti</KEYWORD1>
+ <KEYWORD1>xti</KEYWORD1>
+ <KEYWORD1>ytitle</KEYWORD1>
+ <KEYWORD1>xtitle</KEYWORD1>
+ </KEYWORDS>
+
+ </RULES>
+
+
+<!-- Rule sets for strings, macros, quotes -->
+ <RULES SET="STRINGMACRO">
+ <SPAN TYPE="LITERAL3" DELEGATE="COM-QUOTE"><BEGIN>`"</BEGIN><END>"'</END></SPAN>
+ <SPAN TYPE="LITERAL1" DELEGATE="DUB-QUOTE"><BEGIN>"</BEGIN><END>"</END></SPAN>
+ <IMPORT DELEGATE="MACROS"/>
+ </RULES>
+
+ <!-- COM-Quotes are highlighted as LITERAL3 - except:functions and macros -->
+ <RULES SET="COM-QUOTE"
+ DEFAULT="LITERAL3"
+ >
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="FUNCTION">(</MARK_PREVIOUS>
+ <SEQ TYPE="FUNCTION">)</SEQ>
+ <IMPORT DELEGATE="MACROS"/>
+ </RULES>
+
+ <!-- DUB-Quotes are highlighted as LITERAL1 - except: macros -->
+ <RULES SET="DUB-QUOTE"
+ DEFAULT="LITERAL1"
+ >
+ <IMPORT DELEGATE="MACROS"/>
+ </RULES>
+
+ <!-- MACTROS are highlighted as LITERAL4:-->
+ <RULES SET="MACROS"
+ DEFAULT="LITERAL4"
+ >
+ <SPAN TYPE="LITERAL4" DELEGATE="EXPRESSION">
+ <BEGIN>`=</BEGIN><END>'</END></SPAN>
+ <SPAN TYPE="LITERAL4" DELEGATE="GIVEUP">
+ <BEGIN>`:</BEGIN><END>'</END></SPAN>
+ <SPAN TYPE="LITERAL4" DELEGATE="MACROS">
+ <BEGIN>`</BEGIN><END>'</END></SPAN>
+ <SEQ_REGEXP TYPE="LITERAL4" HASH_CHAR="$">\$[a-zA-Z]\w*</SEQ_REGEXP>
+ </RULES>
+
+ <RULES SET="EXPRESSION"
+ DEFAULT="NULL"
+ HIGHLIGHT_DIGITS="TRUE"
+ >
+ <SPAN_REGEXP TYPE="FUNCTION" DELEGATE="EXPRESSION" HASH_CHARS="abcdefghijklmnopqrstuvwxyz_"><BEGIN>\w*\(</BEGIN><END>)</END></SPAN_REGEXP>
+ <IMPORT DELEGATE="STRINGMACRO"/>
+ </RULES>
+
+ <RULES SET="GIVEUP"
+ DEFAULT="NULL"
+ >
+ <IMPORT DELEGATE="STRINGMACRO"/>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/stataado.xml b/jEdit/modes/stataado.xml
deleted file mode 100644
index 6dc4eab..0000000
--- a/jEdit/modes/stataado.xml
+++ /dev/null
@@ -1,2691 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <!--Based on Syntax file for Stata v9.x. and 10.x from the jedit community
- Original by Glenn Hoetker, Updated by Jesse Hamner
- Thanks to Christian Goebel for the global macro highlighting regex
- -->
-
- <!-- You should put the following line into your jedit/modes/catalog file:
- <MODE NAME="stata_ado" FILE="stataado.xml"
- FILE_NAME_GLOB="*.{ado}" />
- -->
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(([\.]?[0-9]+)([eE]?)([-+]*)([0-9]*))|(([0-9]+\.*[0-9]*|\.[0-9]+)([+-]?[eE]?[0-9]+))|((([0-9]+\.[0-9]*|\.[0-9]+))[Ee]?)">
-
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="* " />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
-
-<!-- whitespace: (space and tab) -->
- <WHITESPACE> </WHITESPACE>
- <WHITESPACE> </WHITESPACE>
-
-<!--Comments in two colors-->
- <!-- Line Comment -->
- <EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">*</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">///</EOL_SPAN>
-
- <!-- Multiline comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SEQ TYPE="NULL">)</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="NULL">.</SEQ>
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SEQ TYPE="NULL">]</SEQ>
- <SEQ TYPE="NULL">[</SEQ>
- <SEQ TYPE="NULL">?</SEQ>
-
-<!-- To color quoted strings: -->
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="FALSE" AT_WORD_START="TRUE">
- <BEGIN>"</BEGIN><END>"</END>
- </SPAN>
-
-<!-- To color variable references and declarations: -->
- <!-- To color declared global variables: -->
- <SEQ_REGEXP TYPE="LITERAL4" HASH_CHAR="$">\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
- <!-- To highlight global and local variable declarations: -->
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">local </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">loc </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">loca </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">glo </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">glob </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">globa </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">global </MARK_FOLLOWING>
- <!-- To highlight variables when they are used: -->
-<!-- <SPAN TYPE="LITERAL4" NO_LINE_BREAK="TRUE" AT_WORD_START="FALSE">
- <BEGIN>`</BEGIN> <END>'</END>
- </SPAN>-->
-
-<!-- To Highlight filenames: -->
- <MARK_PREVIOUS TYPE="KEYWORD3">using </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">use </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">save </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">sav </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">xmlsave </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">xmluse </MARK_PREVIOUS>
-
-<!-- The special conditions "set", "do", "run", "sysdir" and "shell" -->
-<!-- Swapped AT_LINE_START="TRUE" for AT_WHITESPACE_END="TRUE" in 2.5.0 -->
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">set </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">do </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">shell </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">sysdir </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">ru </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">run </EOL_SPAN>
-
-<!-- This list of keywords owes much to similar files for other editors which
- members of the Stata community have so generously made freely available -->
-
-<!-- Stata is case sensitive, so this mode sets JEdit to be case-sensitive -->
- <KEYWORDS IGNORE_CASE="FALSE">
-
-<!-- First, some Data management and programming keywords: -->
- <KEYWORD2>_estimates</KEYWORD2>
- <KEYWORD2>_return</KEYWORD2>
- <KEYWORD2>accum</KEYWORD2>
- <KEYWORD2>adopath</KEYWORD2>
- <KEYWORD2>ap</KEYWORD2>
- <KEYWORD2>app</KEYWORD2>
- <KEYWORD2>appe</KEYWORD2>
- <KEYWORD2>appen</KEYWORD2>
- <KEYWORD2>append</KEYWORD2>
- <KEYWORD2>args</KEYWORD2>
- <KEYWORD2>break</KEYWORD2>
- <KEYWORD2>by</KEYWORD2>
- <KEYWORD2>byable</KEYWORD2>
- <KEYWORD2>bysort</KEYWORD2>
- <KEYWORD2>class</KEYWORD2>
- <KEYWORD2>capture</KEYWORD2>
- <KEYWORD2>char</KEYWORD2>
- <KEYWORD2>class</KEYWORD2>
- <KEYWORD2>classutil</KEYWORD2>
- <KEYWORD2>comments</KEYWORD2>
- <KEYWORD2>compare</KEYWORD2>
- <KEYWORD2>compress</KEYWORD2>
- <KEYWORD2>confirm</KEYWORD2>
- <KEYWORD2>continue</KEYWORD2>
- <KEYWORD2>creturn</KEYWORD2>
- <KEYWORD2>define</KEYWORD2>
- <KEYWORD2>delimit</KEYWORD2>
- <KEYWORD2>discard</KEYWORD2>
- <KEYWORD2>di</KEYWORD2>
- <KEYWORD2>disp</KEYWORD2>
- <KEYWORD2>display</KEYWORD2>
- <KEYWORD2>dissimilarity</KEYWORD2>
- <KEYWORD2>drop</KEYWORD2>
- <KEYWORD2>eigenvalues</KEYWORD2>
- <KEYWORD2>end</KEYWORD2>
- <KEYWORD2>ereturn</KEYWORD2>
- <KEYWORD2>expand</KEYWORD2>
- <KEYWORD2>file</KEYWORD2>
- <KEYWORD2>findfile</KEYWORD2>
- <KEYWORD2>foreach</KEYWORD2>
- <KEYWORD2>forvalues</KEYWORD2>
- <KEYWORD2>get</KEYWORD2>
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD2>in</KEYWORD2>
- <KEYWORD2>lab</KEYWORD2>
- <KEYWORD2>labe</KEYWORD2>
- <KEYWORD2>label</KEYWORD2>
- <KEYWORD2>loc</KEYWORD2>
- <KEYWORD2>loca</KEYWORD2>
- <KEYWORD2>local</KEYWORD2>
- <KEYWORD2>mer</KEYWORD2>
- <KEYWORD2>merg</KEYWORD2>
- <KEYWORD2>merge</KEYWORD2>
- <KEYWORD2>odbc</KEYWORD2>
- <KEYWORD2>outfix</KEYWORD2>
- <KEYWORD2>program</KEYWORD2>
- <KEYWORD2>properties</KEYWORD2>
- <KEYWORD2>recode</KEYWORD2>
- <KEYWORD2>replace</KEYWORD2>
- <KEYWORD2>return</KEYWORD2>
- <KEYWORD2>rmsg</KEYWORD2>
- <KEYWORD2>rownames</KEYWORD2>
- <KEYWORD2>serset</KEYWORD2>
- <KEYWORD2>so</KEYWORD2>
- <KEYWORD2>sor</KEYWORD2>
- <KEYWORD2>sort</KEYWORD2>
- <KEYWORD2>sortpreserve</KEYWORD2>
- <KEYWORD2>svd</KEYWORD2>
- <KEYWORD2>symeigen</KEYWORD2>
- <KEYWORD2>trace</KEYWORD2>
- <KEYWORD2>unabcmd</KEYWORD2>
- <KEYWORD2>utility</KEYWORD2>
- <KEYWORD2>while</KEYWORD2>
- <KEYWORD2>runtest</KEYWORD2>
-
-<!-- Some display keywords -->
-
- <KEYWORD4>outtex</KEYWORD4>
- <KEYWORD4>outreg</KEYWORD4>
- <KEYWORD4>printf</KEYWORD4>
- <KEYWORD4>count</KEYWORD4>
- <KEYWORD4>describe</KEYWORD4>
- <KEYWORD4>list</KEYWORD4>
- <KEYWORD4>errprintf</KEYWORD4>
- <KEYWORD4>more</KEYWORD4>
- <KEYWORD4>log</KEYWORD4>
- <KEYWORD4>cmdlog</KEYWORD4>
- <KEYWORD4>close</KEYWORD4>
-
-<!-- Some unix-like i/o functions -->
-
- <LITERAL3>dir</LITERAL3>
- <LITERAL3>chdir</LITERAL3>
- <LITERAL3>mkdir</LITERAL3>
- <LITERAL3>rmdir</LITERAL3>
- <LITERAL3>pwd</LITERAL3>
- <LITERAL3>fileexists</LITERAL3>
- <LITERAL3>cat</LITERAL3>
- <LITERAL3>unlink</LITERAL3>
- <LITERAL3>erase</LITERAL3>
- <LITERAL3>ls</LITERAL3>
-
-<!-- a few identifiers and variables -->
- <KEYWORD2>byte</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>long</KEYWORD2>
- <KEYWORD2>float</KEYWORD2>
- <KEYWORD2>double</KEYWORD2>
- <SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="s" AT_WORD_START="TRUE">str(\d+)</SEQ_REGEXP>
- <KEYWORD2>_rc</KEYWORD2>
- <SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="c" AT_WORD_START="TRUE">c\((\w+)\)</SEQ_REGEXP>
-
-<!-- Next the Stata statistics functions from Stata 9: -->
-
- <KEYWORD1>_3dax0</KEYWORD1>
- <KEYWORD1>_3daxmin</KEYWORD1>
- <KEYWORD1>_3daxout</KEYWORD1>
- <KEYWORD1>_3daxtbl</KEYWORD1>
- <KEYWORD1>_3ddflts</KEYWORD1>
- <KEYWORD1>_3dmkdta</KEYWORD1>
- <KEYWORD1>_3dmnmx</KEYWORD1>
- <KEYWORD1>_3dproj</KEYWORD1>
- <KEYWORD1>_3drproj</KEYWORD1>
- <KEYWORD1>_3drshow</KEYWORD1>
- <KEYWORD1>_3dshad</KEYWORD1>
- <KEYWORD1>_3dsvusr</KEYWORD1>
- <KEYWORD1>__GEEBT</KEYWORD1>
- <KEYWORD1>__GEERC</KEYWORD1>
- <KEYWORD1>__GEEUC</KEYWORD1>
- <KEYWORD1>_a_cls_msg</KEYWORD1>
- <KEYWORD1>_ac</KEYWORD1>
- <KEYWORD1>_addgph</KEYWORD1>
- <KEYWORD1>_addl</KEYWORD1>
- <KEYWORD1>_addop</KEYWORD1>
- <KEYWORD1>_adjksm</KEYWORD1>
- <KEYWORD1>_assert</KEYWORD1>
- <KEYWORD1>_assert_mreldif</KEYWORD1>
- <KEYWORD1>_assert_mreldifp</KEYWORD1>
- <KEYWORD1>_assert_mreldifs</KEYWORD1>
- <KEYWORD1>_assert_obs</KEYWORD1>
- <KEYWORD1>_assert_streq</KEYWORD1>
- <KEYWORD1>_at</KEYWORD1>
- <KEYWORD1>_bigtab</KEYWORD1>
- <KEYWORD1>_binperfect</KEYWORD1>
- <KEYWORD1>_binperfout</KEYWORD1>
- <KEYWORD1>_biplotmat</KEYWORD1>
- <KEYWORD1>_brr_sum</KEYWORD1>
- <KEYWORD1>_bs_display</KEYWORD1>
- <KEYWORD1>_bs_sum</KEYWORD1>
- <KEYWORD1>_bsqreg</KEYWORD1>
- <KEYWORD1>_btcmd</KEYWORD1>
- <KEYWORD1>_byobs</KEYWORD1>
- <KEYWORD1>_byoptnotallowed</KEYWORD1>
- <KEYWORD1>_ca_parse_normalize</KEYWORD1>
- <KEYWORD1>_ca_process_mlabel</KEYWORD1>
- <KEYWORD1>_callerr</KEYWORD1>
- <KEYWORD1>_cci</KEYWORD1>
- <KEYWORD1>_check4gropts</KEYWORD1>
- <KEYWORD1>_check_eformopt</KEYWORD1>
- <KEYWORD1>_choice_table</KEYWORD1>
- <KEYWORD1>_ckirfset</KEYWORD1>
- <KEYWORD1>_cknotsvaroi</KEYWORD1>
- <KEYWORD1>_ckvec</KEYWORD1>
- <KEYWORD1>_clsarr2list</KEYWORD1>
- <KEYWORD1>_cmdxel</KEYWORD1>
- <KEYWORD1>_coef_table</KEYWORD1>
- <KEYWORD1>_coef_table_header</KEYWORD1>
- <KEYWORD1>_column</KEYWORD1>
- <KEYWORD1>_confirm_date</KEYWORD1>
- <KEYWORD1>_confirm_number_or_date</KEYWORD1>
- <KEYWORD1>_copy_mat_stripes</KEYWORD1>
- <KEYWORD1>_cpmatnm</KEYWORD1>
- <KEYWORD1>_cr1form</KEYWORD1>
- <KEYWORD1>_cr1invt</KEYWORD1>
- <KEYWORD1>_cr1se</KEYWORD1>
- <KEYWORD1>_cr1t</KEYWORD1>
- <KEYWORD1>_crc2use</KEYWORD1>
- <KEYWORD1>_crc4fld</KEYWORD1>
- <KEYWORD1>_crcacnt</KEYWORD1>
- <KEYWORD1>_crcar1</KEYWORD1>
- <KEYWORD1>_crcause</KEYWORD1>
- <KEYWORD1>_crcbcrt</KEYWORD1>
- <KEYWORD1>_crcbin</KEYWORD1>
- <KEYWORD1>_crcbygr</KEYWORD1>
- <KEYWORD1>_crcchi2</KEYWORD1>
- <KEYWORD1>_crcchkt</KEYWORD1>
- <KEYWORD1>_crcchkw</KEYWORD1>
- <KEYWORD1>_crcci</KEYWORD1>
- <KEYWORD1>_crccip</KEYWORD1>
- <KEYWORD1>_crceprs</KEYWORD1>
- <KEYWORD1>_crcexn1</KEYWORD1>
- <KEYWORD1>_crcexn2</KEYWORD1>
- <KEYWORD1>_crcexn4</KEYWORD1>
- <KEYWORD1>_crcexn5</KEYWORD1>
- <KEYWORD1>_crcexn6</KEYWORD1>
- <KEYWORD1>_crcexn7</KEYWORD1>
- <KEYWORD1>_crcexn8</KEYWORD1>
- <KEYWORD1>_crcexn9</KEYWORD1>
- <KEYWORD1>_crcexna</KEYWORD1>
- <KEYWORD1>_crcexnb</KEYWORD1>
- <KEYWORD1>_crcexnc</KEYWORD1>
- <KEYWORD1>_crcexnd</KEYWORD1>
- <KEYWORD1>_crcexne</KEYWORD1>
- <KEYWORD1>_crcexnf</KEYWORD1>
- <KEYWORD1>_crcexnt</KEYWORD1>
- <KEYWORD1>_crcgldv</KEYWORD1>
- <KEYWORD1>_crcglil</KEYWORD1>
- <KEYWORD1>_crcichi</KEYWORD1>
- <KEYWORD1>_crcird</KEYWORD1>
- <KEYWORD1>_crcirr</KEYWORD1>
- <KEYWORD1>_crcksm</KEYWORD1>
- <KEYWORD1>_crclf</KEYWORD1>
- <KEYWORD1>_crcmeq</KEYWORD1>
- <KEYWORD1>_crcmiss</KEYWORD1>
- <KEYWORD1>_crcnlou</KEYWORD1>
- <KEYWORD1>_crcnms2</KEYWORD1>
- <KEYWORD1>_crcnuse</KEYWORD1>
- <KEYWORD1>_crcor</KEYWORD1>
- <KEYWORD1>_crcphdr</KEYWORD1>
- <KEYWORD1>_crcplst</KEYWORD1>
- <KEYWORD1>_crcra</KEYWORD1>
- <KEYWORD1>_crcrd</KEYWORD1>
- <KEYWORD1>_crcrnfd</KEYWORD1>
- <KEYWORD1>_crcrr</KEYWORD1>
- <KEYWORD1>_crcrsfl</KEYWORD1>
- <KEYWORD1>_crcseq</KEYWORD1>
- <KEYWORD1>_crcshdr</KEYWORD1>
- <KEYWORD1>_crcslbl</KEYWORD1>
- <KEYWORD1>_crcsrv2</KEYWORD1>
- <KEYWORD1>_crcsrvc</KEYWORD1>
- <KEYWORD1>_crcstep</KEYWORD1>
- <KEYWORD1>_crcswxx</KEYWORD1>
- <KEYWORD1>_crct</KEYWORD1>
- <KEYWORD1>_crctmge</KEYWORD1>
- <KEYWORD1>_crcunab</KEYWORD1>
- <KEYWORD1>_crcunit</KEYWORD1>
- <KEYWORD1>_crcvarl</KEYWORD1>
- <KEYWORD1>_crcwsrv</KEYWORD1>
- <KEYWORD1>_crczsku</KEYWORD1>
- <KEYWORD1>_cu_c0</KEYWORD1>
- <KEYWORD1>_cvar</KEYWORD1>
- <KEYWORD1>_date2elapsed</KEYWORD1>
- <KEYWORD1>_diag2mat</KEYWORD1>
- <KEYWORD1>_diparm</KEYWORD1>
- <KEYWORD1>_diparm_8</KEYWORD1>
- <KEYWORD1>_dm_create</KEYWORD1>
- <KEYWORD1>_dots</KEYWORD1>
- <KEYWORD1>_e2r</KEYWORD1>
- <KEYWORD1>_egennoby</KEYWORD1>
- <KEYWORD1>_evlist</KEYWORD1>
- <KEYWORD1>_exp_list_expand</KEYWORD1>
- <KEYWORD1>_exp_list_parse</KEYWORD1>
- <KEYWORD1>_find_tsops</KEYWORD1>
- <KEYWORD1>_fr_area_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_aspect_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_draw_rect</KEYWORD1>
- <KEYWORD1>_fr_droplines_draw</KEYWORD1>
- <KEYWORD1>_fr_erasearr</KEYWORD1>
- <KEYWORD1>_fr_legend_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_merged_implicit</KEYWORD1>
- <KEYWORD1>_fr_runlog</KEYWORD1>
- <KEYWORD1>_fr_sztextbox_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_tbstyle_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_tedits_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_textbox_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_title_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_x_log_cleanup</KEYWORD1>
- <KEYWORD1>_fr_x_log_create</KEYWORD1>
- <KEYWORD1>_fracchk</KEYWORD1>
- <KEYWORD1>_fraccox</KEYWORD1>
- <KEYWORD1>_fracddp</KEYWORD1>
- <KEYWORD1>_fracdis</KEYWORD1>
- <KEYWORD1>_fracdv</KEYWORD1>
- <KEYWORD1>_fracin</KEYWORD1>
- <KEYWORD1>_fracmdp</KEYWORD1>
- <KEYWORD1>_fracord</KEYWORD1>
- <KEYWORD1>_fracpp</KEYWORD1>
- <KEYWORD1>_fracpv</KEYWORD1>
- <KEYWORD1>_fracrep</KEYWORD1>
- <KEYWORD1>_fracwgt</KEYWORD1>
- <KEYWORD1>_fracxo</KEYWORD1>
- <KEYWORD1>_frr_sztextbox_pnl</KEYWORD1>
- <KEYWORD1>_gany</KEYWORD1>
- <KEYWORD1>_ganycount</KEYWORD1>
- <KEYWORD1>_ganymatch</KEYWORD1>
- <KEYWORD1>_ganyvalue</KEYWORD1>
- <KEYWORD1>_gconcat</KEYWORD1>
- <KEYWORD1>_gcount</KEYWORD1>
- <KEYWORD1>_gcut</KEYWORD1>
- <KEYWORD1>_gdiff</KEYWORD1>
- <KEYWORD1>_gends</KEYWORD1>
- <KEYWORD1>_geqany</KEYWORD1>
- <KEYWORD1>_get_diparmopts</KEYWORD1>
- <KEYWORD1>_get_diparmopts_8</KEYWORD1>
- <KEYWORD1>_get_eformopts</KEYWORD1>
- <KEYWORD1>_get_eqspec</KEYWORD1>
- <KEYWORD1>_get_gropts</KEYWORD1>
- <KEYWORD1>_get_irf</KEYWORD1>
- <KEYWORD1>_get_offopt</KEYWORD1>
- <KEYWORD1>_getbv</KEYWORD1>
- <KEYWORD1>_getcovcorr</KEYWORD1>
- <KEYWORD1>_getfilename</KEYWORD1>
- <KEYWORD1>_getnewlabelname</KEYWORD1>
- <KEYWORD1>_getrhs</KEYWORD1>
- <KEYWORD1>_getrres</KEYWORD1>
- <KEYWORD1>_getvarcns</KEYWORD1>
- <KEYWORD1>_getxel</KEYWORD1>
- <KEYWORD1>_getxel2</KEYWORD1>
- <KEYWORD1>_gfill</KEYWORD1>
- <KEYWORD1>_ggroup</KEYWORD1>
- <KEYWORD1>_giqr</KEYWORD1>
- <KEYWORD1>_gkurt</KEYWORD1>
- <KEYWORD1>_gladder</KEYWORD1>
- <KEYWORD1>_glmfl</KEYWORD1>
- <KEYWORD1>_glmilnk</KEYWORD1>
- <KEYWORD1>_glmmapf</KEYWORD1>
- <KEYWORD1>_glmmapl</KEYWORD1>
- <KEYWORD1>_glmresd</KEYWORD1>
- <KEYWORD1>_glmrpt</KEYWORD1>
- <KEYWORD1>_glmwgt</KEYWORD1>
- <KEYWORD1>_gm_edit</KEYWORD1>
- <KEYWORD1>_gm_log</KEYWORD1>
- <KEYWORD1>_gma</KEYWORD1>
- <KEYWORD1>_gmad</KEYWORD1>
- <KEYWORD1>_gmax</KEYWORD1>
- <KEYWORD1>_gmdev</KEYWORD1>
- <KEYWORD1>_gmdmean</KEYWORD1>
- <KEYWORD1>_gmdmed</KEYWORD1>
- <KEYWORD1>_gmean</KEYWORD1>
- <KEYWORD1>_gmedian</KEYWORD1>
- <KEYWORD1>_gmin</KEYWORD1>
- <KEYWORD1>_gmode</KEYWORD1>
- <KEYWORD1>_gmtr</KEYWORD1>
- <KEYWORD1>_gneqany</KEYWORD1>
- <KEYWORD1>_gpc</KEYWORD1>
- <KEYWORD1>_gpctile</KEYWORD1>
- <KEYWORD1>_gr_arrowhead</KEYWORD1>
- <KEYWORD1>_gr_atomize_styles</KEYWORD1>
- <KEYWORD1>_gr_common_axes</KEYWORD1>
- <KEYWORD1>_gr_drawrect</KEYWORD1>
- <KEYWORD1>_gr_linkstyles</KEYWORD1>
- <KEYWORD1>_gr_symbol_of</KEYWORD1>
- <KEYWORD1>_grank</KEYWORD1>
- <KEYWORD1>_grank2</KEYWORD1>
- <KEYWORD1>_grfirst</KEYWORD1>
- <KEYWORD1>_grlast</KEYWORD1>
- <KEYWORD1>_grmax</KEYWORD1>
- <KEYWORD1>_grmean</KEYWORD1>
- <KEYWORD1>_grmin</KEYWORD1>
- <KEYWORD1>_grmiss</KEYWORD1>
- <KEYWORD1>_grmiss2</KEYWORD1>
- <KEYWORD1>_grobs</KEYWORD1>
- <KEYWORD1>_growfirst</KEYWORD1>
- <KEYWORD1>_growlast</KEYWORD1>
- <KEYWORD1>_growmax</KEYWORD1>
- <KEYWORD1>_growmean</KEYWORD1>
- <KEYWORD1>_growmin</KEYWORD1>
- <KEYWORD1>_growmiss</KEYWORD1>
- <KEYWORD1>_grownonmiss</KEYWORD1>
- <KEYWORD1>_growsd</KEYWORD1>
- <KEYWORD1>_growtotal</KEYWORD1>
- <KEYWORD1>_grsd</KEYWORD1>
- <KEYWORD1>_grsum</KEYWORD1>
- <KEYWORD1>_gs_addgrname</KEYWORD1>
- <KEYWORD1>_gs_bygraph</KEYWORD1>
- <KEYWORD1>_gs_clean_graphlist</KEYWORD1>
- <KEYWORD1>_gs_default_bands</KEYWORD1>
- <KEYWORD1>_gs_islivefile</KEYWORD1>
- <KEYWORD1>_gs_parse_and_log_axoptions</KEYWORD1>
- <KEYWORD1>_gs_parse_and_log_axtitle</KEYWORD1>
- <KEYWORD1>_gs_parse_and_log_lines</KEYWORD1>
- <KEYWORD1>_gs_parse_and_log_tickset</KEYWORD1>
- <KEYWORD1>_gs_rdfilehdr</KEYWORD1>
- <KEYWORD1>_gs_wrfilehdr</KEYWORD1>
- <KEYWORD1>_gs_x_create</KEYWORD1>
- <KEYWORD1>_gsd</KEYWORD1>
- <KEYWORD1>_gseq</KEYWORD1>
- <KEYWORD1>_gskew</KEYWORD1>
- <KEYWORD1>_gsrank</KEYWORD1>
- <KEYWORD1>_gstd</KEYWORD1>
- <KEYWORD1>_gsum</KEYWORD1>
- <KEYWORD1>_gtag</KEYWORD1>
- <KEYWORD1>_gtma</KEYWORD1>
- <KEYWORD1>_gtotal</KEYWORD1>
- <KEYWORD1>_gtrank</KEYWORD1>
- <KEYWORD1>_hadamard_verify</KEYWORD1>
- <KEYWORD1>_hu</KEYWORD1>
- <KEYWORD1>_hub</KEYWORD1>
- <KEYWORD1>_hube</KEYWORD1>
- <KEYWORD1>_huber</KEYWORD1>
- <KEYWORD1>_hw_comp</KEYWORD1>
- <KEYWORD1>_hw_opt_d0</KEYWORD1>
- <KEYWORD1>_hwsa_comp</KEYWORD1>
- <KEYWORD1>_hwsa_opt_d0</KEYWORD1>
- <KEYWORD1>_hwsm_comp</KEYWORD1>
- <KEYWORD1>_hwsm_opt_d0</KEYWORD1>
- <KEYWORD1>_inlist</KEYWORD1>
- <KEYWORD1>_invlist</KEYWORD1>
- <KEYWORD1>_isfit</KEYWORD1>
- <KEYWORD1>_ivreg_project</KEYWORD1>
- <KEYWORD1>_jk_nlegend</KEYWORD1>
- <KEYWORD1>_jk_pseudo</KEYWORD1>
- <KEYWORD1>_jk_sum</KEYWORD1>
- <KEYWORD1>_jprfpdt</KEYWORD1>
- <KEYWORD1>_jprfpdx</KEYWORD1>
- <KEYWORD1>_jprfpfp</KEYWORD1>
- <KEYWORD1>_jprfpgn</KEYWORD1>
- <KEYWORD1>_jprfpin</KEYWORD1>
- <KEYWORD1>_jprfplx</KEYWORD1>
- <KEYWORD1>_jprfpmm</KEYWORD1>
- <KEYWORD1>_jprfppp</KEYWORD1>
- <KEYWORD1>_jprfpre</KEYWORD1>
- <KEYWORD1>_jprfprp</KEYWORD1>
- <KEYWORD1>_jprfpse</KEYWORD1>
- <KEYWORD1>_jprfptp</KEYWORD1>
- <KEYWORD1>_jprfpxo</KEYWORD1>
- <KEYWORD1>_jprglef</KEYWORD1>
- <KEYWORD1>_jprglfl</KEYWORD1>
- <KEYWORD1>_jprglil</KEYWORD1>
- <KEYWORD1>_jprglld</KEYWORD1>
- <KEYWORD1>_jprglwz</KEYWORD1>
- <KEYWORD1>_jprxrpa</KEYWORD1>
- <KEYWORD1>_kalman1</KEYWORD1>
- <KEYWORD1>_ksmwrk</KEYWORD1>
- <KEYWORD1>_labels2names</KEYWORD1>
- <KEYWORD1>_ldrtest</KEYWORD1>
- <KEYWORD1>_linemax</KEYWORD1>
- <KEYWORD1>_line</KEYWORD1>
- <KEYWORD1>_lines</KEYWORD1>
- <KEYWORD1>_loop_brr</KEYWORD1>
- <KEYWORD1>_loop_jknife</KEYWORD1>
- <KEYWORD1>_loop_jknife2</KEYWORD1>
- <KEYWORD1>_loop_jknife_fw</KEYWORD1>
- <KEYWORD1>_loop_jknife_iw</KEYWORD1>
- <KEYWORD1>_loop_rw</KEYWORD1>
- <KEYWORD1>_lrtest7</KEYWORD1>
- <KEYWORD1>_m2matrix</KEYWORD1>
- <KEYWORD1>_m2scalar</KEYWORD1>
- <KEYWORD1>_maked</KEYWORD1>
- <KEYWORD1>_mat_clean_coleq</KEYWORD1>
- <KEYWORD1>_matplot</KEYWORD1>
- <KEYWORD1>_matsort</KEYWORD1>
- <KEYWORD1>_mdisplay</KEYWORD1>
- <KEYWORD1>_mds_classical</KEYWORD1>
- <KEYWORD1>_mds_dataheader</KEYWORD1>
- <KEYWORD1>_mds_display</KEYWORD1>
- <KEYWORD1>_mds_display_classical</KEYWORD1>
- <KEYWORD1>_mds_euclidean</KEYWORD1>
- <KEYWORD1>_mds_parse_dopts</KEYWORD1>
- <KEYWORD1>_mds_parse_method</KEYWORD1>
- <KEYWORD1>_mds_parse_s2d</KEYWORD1>
- <KEYWORD1>_mds_s2d</KEYWORD1>
- <KEYWORD1>_me_der</KEYWORD1>
- <KEYWORD1>_me_der2</KEYWORD1>
- <KEYWORD1>_me_derb</KEYWORD1>
- <KEYWORD1>_me_derd</KEYWORD1>
- <KEYWORD1>_me_l_der</KEYWORD1>
- <KEYWORD1>_me_l_der2</KEYWORD1>
- <KEYWORD1>_mfrmvec</KEYWORD1>
- <KEYWORD1>_mka2</KEYWORD1>
- <KEYWORD1>_mkg</KEYWORD1>
- <KEYWORD1>_mkkmn</KEYWORD1>
- <KEYWORD1>_mksigma</KEYWORD1>
- <KEYWORD1>_mkvec</KEYWORD1>
- <KEYWORD1>_mprobitestimator</KEYWORD1>
- <KEYWORD1>_mtest</KEYWORD1>
- <KEYWORD1>_mvec</KEYWORD1>
- <KEYWORD1>_newey</KEYWORD1>
- <KEYWORD1>_nlout</KEYWORD1>
- <KEYWORD1>_no_estat</KEYWORD1>
- <KEYWORD1>_no_predict</KEYWORD1>
- <KEYWORD1>_nobs</KEYWORD1>
- <KEYWORD1>_on_colon_parse</KEYWORD1>
- <KEYWORD1>_opnum</KEYWORD1>
- <KEYWORD1>_parmlist</KEYWORD1>
- <KEYWORD1>_parse_optexp</KEYWORD1>
- <KEYWORD1>_parsevl</KEYWORD1>
- <KEYWORD1>_parsewt</KEYWORD1>
- <KEYWORD1>_partset</KEYWORD1>
- <KEYWORD1>_pctile</KEYWORD1>
- <KEYWORD1>_pk_p</KEYWORD1>
- <KEYWORD1>_plotpos</KEYWORD1>
- <KEYWORD1>_pred_me</KEYWORD1>
- <KEYWORD1>_pred_missings</KEYWORD1>
- <KEYWORD1>_pred_rules</KEYWORD1>
- <KEYWORD1>_pred_se</KEYWORD1>
- <KEYWORD1>_predict</KEYWORD1>
- <KEYWORD1>_prefix_check4esample</KEYWORD1>
- <KEYWORD1>_prefix_checkopt</KEYWORD1>
- <KEYWORD1>_prefix_clear</KEYWORD1>
- <KEYWORD1>_prefix_command</KEYWORD1>
- <KEYWORD1>_prefix_depvarblocklist</KEYWORD1>
- <KEYWORD1>_prefix_display</KEYWORD1>
- <KEYWORD1>_prefix_expand</KEYWORD1>
- <KEYWORD1>_prefix_explist</KEYWORD1>
- <KEYWORD1>_prefix_footnote</KEYWORD1>
- <KEYWORD1>_prefix_getchars</KEYWORD1>
- <KEYWORD1>_prefix_getmat</KEYWORD1>
- <KEYWORD1>_prefix_legend</KEYWORD1>
- <KEYWORD1>_prefix_mlogit</KEYWORD1>
- <KEYWORD1>_prefix_model_test</KEYWORD1>
- <KEYWORD1>_prefix_note</KEYWORD1>
- <KEYWORD1>_prefix_reject</KEYWORD1>
- <KEYWORD1>_prefix_relabel_eqns</KEYWORD1>
- <KEYWORD1>_prefix_run_error</KEYWORD1>
- <KEYWORD1>_prefix_saving</KEYWORD1>
- <KEYWORD1>_prefix_title</KEYWORD1>
- <KEYWORD1>_prefix_varblocklist</KEYWORD1>
- <KEYWORD1>_prefix_vcenotallowed</KEYWORD1>
- <KEYWORD1>_qreg</KEYWORD1>
- <KEYWORD1>_qregwls</KEYWORD1>
- <KEYWORD1>_qsort_index</KEYWORD1>
- <KEYWORD1>_qsur</KEYWORD1>
- <KEYWORD1>_r2e</KEYWORD1>
- <KEYWORD1>_repart</KEYWORD1>
- <KEYWORD1>_repost</KEYWORD1>
- <KEYWORD1>_resample_warn</KEYWORD1>
- <KEYWORD1>_restore_labels</KEYWORD1>
- <KEYWORD1>_result</KEYWORD1>
- <KEYWORD1>_returnclear</KEYWORD1>
- <KEYWORD1>_rmcoll</KEYWORD1>
- <KEYWORD1>_rmcollright</KEYWORD1>
- <KEYWORD1>_rmdcoll</KEYWORD1>
- <KEYWORD1>_robksm</KEYWORD1>
- <KEYWORD1>_robust</KEYWORD1>
- <KEYWORD1>_robust2</KEYWORD1>
- <KEYWORD1>_roccom1</KEYWORD1>
- <KEYWORD1>_roccom1_8</KEYWORD1>
- <KEYWORD1>_rocsen</KEYWORD1>
- <KEYWORD1>_rotate_clear</KEYWORD1>
- <KEYWORD1>_rotate_text</KEYWORD1>
- <KEYWORD1>_score_spec</KEYWORD1>
- <KEYWORD1>_sep_varsylags</KEYWORD1>
- <KEYWORD1>_set_irf_vars</KEYWORD1>
- <KEYWORD1>_sfran</KEYWORD1>
- <KEYWORD1>_shortenpath</KEYWORD1>
- <KEYWORD1>_sigfm</KEYWORD1>
- <KEYWORD1>_small2dotz</KEYWORD1>
- <KEYWORD1>_stata_internalerror</KEYWORD1>
- <KEYWORD1>_stcurv</KEYWORD1>
- <KEYWORD1>_strip_labels</KEYWORD1>
- <KEYWORD1>_sttrend</KEYWORD1>
- <KEYWORD1>_stubstar2names</KEYWORD1>
- <KEYWORD1>_subchar</KEYWORD1>
- <KEYWORD1>_sum_table</KEYWORD1>
- <KEYWORD1>_sumaccum</KEYWORD1>
- <KEYWORD1>_sunflower_binar</KEYWORD1>
- <KEYWORD1>_svar_cnsmac</KEYWORD1>
- <KEYWORD1>_svar_eqmac</KEYWORD1>
- <KEYWORD1>_svar_newcns</KEYWORD1>
- <KEYWORD1>_svar_post</KEYWORD1>
- <KEYWORD1>_svard2</KEYWORD1>
- <KEYWORD1>_svariden</KEYWORD1>
- <KEYWORD1>_svaridenlr</KEYWORD1>
- <KEYWORD1>_svarlrd2</KEYWORD1>
- <KEYWORD1>_svd</KEYWORD1>
- <KEYWORD1>_svy</KEYWORD1>
- <KEYWORD1>_svy2</KEYWORD1>
- <KEYWORD1>_svy_check_cmdopts</KEYWORD1>
- <KEYWORD1>_svy_check_fpc</KEYWORD1>
- <KEYWORD1>_svy_check_postw</KEYWORD1>
- <KEYWORD1>_svy_check_predict</KEYWORD1>
- <KEYWORD1>_svy_check_vce</KEYWORD1>
- <KEYWORD1>_svy_fpc_note</KEYWORD1>
- <KEYWORD1>_svy_ftest</KEYWORD1>
- <KEYWORD1>_svy_ivreg_first</KEYWORD1>
- <KEYWORD1>_svy_mkdeff</KEYWORD1>
- <KEYWORD1>_svy_mkmeff</KEYWORD1>
- <KEYWORD1>_svy_mkvmsp</KEYWORD1>
- <KEYWORD1>_svy_mkvsrs</KEYWORD1>
- <KEYWORD1>_svy_newrule</KEYWORD1>
- <KEYWORD1>_svy_setup</KEYWORD1>
- <KEYWORD1>_svy_singleton_note</KEYWORD1>
- <KEYWORD1>_svy_subpop</KEYWORD1>
- <KEYWORD1>_svy_subpop_note</KEYWORD1>
- <KEYWORD1>_svy_summarize</KEYWORD1>
- <KEYWORD1>_svy_summarize_legend</KEYWORD1>
- <KEYWORD1>_svy_tabulate</KEYWORD1>
- <KEYWORD1>_svydes_dlg</KEYWORD1>
- <KEYWORD1>_svylc</KEYWORD1>
- <KEYWORD1>_svyset</KEYWORD1>
- <KEYWORD1>_sw_lik</KEYWORD1>
- <KEYWORD1>_sw_lik2</KEYWORD1>
- <KEYWORD1>_sw_ood</KEYWORD1>
- <KEYWORD1>_ts</KEYWORD1>
- <KEYWORD1>_ts_dexp</KEYWORD1>
- <KEYWORD1>_ts_dsmp</KEYWORD1>
- <KEYWORD1>_ts_exp</KEYWORD1>
- <KEYWORD1>_ts_flag</KEYWORD1>
- <KEYWORD1>_ts_gdat</KEYWORD1>
- <KEYWORD1>_ts_hw</KEYWORD1>
- <KEYWORD1>_ts_hwsa</KEYWORD1>
- <KEYWORD1>_ts_hwsm</KEYWORD1>
- <KEYWORD1>_ts_meqn</KEYWORD1>
- <KEYWORD1>_ts_pars</KEYWORD1>
- <KEYWORD1>_ts_peri</KEYWORD1>
- <KEYWORD1>_tsheadr</KEYWORD1>
- <KEYWORD1>_tsinchk</KEYWORD1>
- <KEYWORD1>_tsma</KEYWORD1>
- <KEYWORD1>_ttest</KEYWORD1>
- <KEYWORD1>_ttest1</KEYWORD1>
- <KEYWORD1>_ttest2</KEYWORD1>
- <KEYWORD1>_tutends</KEYWORD1>
- <KEYWORD1>_tx_mtr1</KEYWORD1>
- <KEYWORD1>_tx_mtr2</KEYWORD1>
- <KEYWORD1>_tx_mtr3</KEYWORD1>
- <KEYWORD1>_tx_mtr4</KEYWORD1>
- <KEYWORD1>_tx_mtr5</KEYWORD1>
- <KEYWORD1>_tx_rpl</KEYWORD1>
- <KEYWORD1>_var_mka</KEYWORD1>
- <KEYWORD1>_varbsf</KEYWORD1>
- <KEYWORD1>_vardisprmse</KEYWORD1>
- <KEYWORD1>_varfcast</KEYWORD1>
- <KEYWORD1>_varfcast_clear</KEYWORD1>
- <KEYWORD1>_varfcast_fcast</KEYWORD1>
- <KEYWORD1>_varfcast_graph</KEYWORD1>
- <KEYWORD1>_varirf</KEYWORD1>
- <KEYWORD1>_varsim</KEYWORD1>
- <KEYWORD1>_vce_parserun</KEYWORD1>
- <KEYWORD1>_vec_ckgraph</KEYWORD1>
- <KEYWORD1>_vec_dreduced</KEYWORD1>
- <KEYWORD1>_vec_grcroots</KEYWORD1>
- <KEYWORD1>_vec_opck</KEYWORD1>
- <KEYWORD1>_vec_pgparse</KEYWORD1>
- <KEYWORD1>_vec_pgridplots</KEYWORD1>
- <KEYWORD1>_vec_postvar</KEYWORD1>
- <KEYWORD1>_vecauxdisp</KEYWORD1>
- <KEYWORD1>_vecfcast_compute</KEYWORD1>
- <KEYWORD1>_vecfcast_compute_w</KEYWORD1>
- <KEYWORD1>_vecgetacns</KEYWORD1>
- <KEYWORD1>_vecgetcv</KEYWORD1>
- <KEYWORD1>_vecgtn</KEYWORD1>
- <KEYWORD1>_vecmka</KEYWORD1>
- <KEYWORD1>_vecmkapvp</KEYWORD1>
- <KEYWORD1>_vecmkce</KEYWORD1>
- <KEYWORD1>_vecmkgam</KEYWORD1>
- <KEYWORD1>_vecmksi</KEYWORD1>
- <KEYWORD1>_vecmktrend</KEYWORD1>
- <KEYWORD1>_vecortho</KEYWORD1>
- <KEYWORD1>_vecpclean</KEYWORD1>
- <KEYWORD1>_vectparse</KEYWORD1>
- <KEYWORD1>_vecu</KEYWORD1>
- <KEYWORD1>_virf_add</KEYWORD1>
- <KEYWORD1>_virf_char</KEYWORD1>
- <KEYWORD1>_virf_fck</KEYWORD1>
- <KEYWORD1>_virf_mknewfile</KEYWORD1>
- <KEYWORD1>_virf_nlen</KEYWORD1>
- <KEYWORD1>_virf_use</KEYWORD1>
- <KEYWORD1>_wkapm</KEYWORD1>
- <KEYWORD1>_writenum</KEYWORD1>
- <KEYWORD1>_wsrvcrv</KEYWORD1>
- <KEYWORD1>_xtreg_chk_cl</KEYWORD1>
- <KEYWORD1>_xtreg_chk_cl2</KEYWORD1>
- <KEYWORD1>_xtrenorm</KEYWORD1>
- <KEYWORD1>about</KEYWORD1>
- <KEYWORD1>abs</KEYWORD1>
- <KEYWORD1>ac</KEYWORD1>
- <KEYWORD1>ac_7</KEYWORD1>
- <KEYWORD1>acprplot</KEYWORD1>
- <KEYWORD1>acprplot_7</KEYWORD1>
- <KEYWORD1>adjust</KEYWORD1>
- <KEYWORD1>ado</KEYWORD1>
- <KEYWORD1>adopath</KEYWORD1>
- <KEYWORD1>adoupdate</KEYWORD1>
- <KEYWORD1>alpha</KEYWORD1>
- <KEYWORD1>ameans</KEYWORD1>
- <KEYWORD1>an</KEYWORD1>
- <KEYWORD1>ano</KEYWORD1>
- <KEYWORD1>anov</KEYWORD1>
- <KEYWORD1>anova</KEYWORD1>
- <KEYWORD1>anova_estat</KEYWORD1>
- <KEYWORD1>anova_terms</KEYWORD1>
- <KEYWORD1>anovadef</KEYWORD1>
- <KEYWORD1>aorder</KEYWORD1>
- <KEYWORD1>arch</KEYWORD1>
- <KEYWORD1>arch_dr</KEYWORD1>
- <KEYWORD1>arch_estat</KEYWORD1>
- <KEYWORD1>arch_p</KEYWORD1>
- <KEYWORD1>archlm</KEYWORD1>
- <KEYWORD1>areg</KEYWORD1>
- <KEYWORD1>areg_p</KEYWORD1>
- <KEYWORD1>args</KEYWORD1>
- <KEYWORD1>arima</KEYWORD1>
- <KEYWORD1>arima_dr</KEYWORD1>
- <KEYWORD1>arima_estat</KEYWORD1>
- <KEYWORD1>arima_p</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>asmprobit</KEYWORD1>
- <KEYWORD1>asmprobit_estat</KEYWORD1>
- <KEYWORD1>asmprobit_lf</KEYWORD1>
- <KEYWORD1>asmprobit_mfx__dlg</KEYWORD1>
- <KEYWORD1>asmprobit_p</KEYWORD1>
- <KEYWORD1>ass</KEYWORD1>
- <KEYWORD1>asse</KEYWORD1>
- <KEYWORD1>asser</KEYWORD1>
- <KEYWORD1>assert</KEYWORD1>
- <KEYWORD1>avplot</KEYWORD1>
- <KEYWORD1>avplot_7</KEYWORD1>
- <KEYWORD1>avplots</KEYWORD1>
- <KEYWORD1>avplots_7</KEYWORD1>
- <KEYWORD1>bcskew0</KEYWORD1>
- <KEYWORD1>be</KEYWORD1>
- <KEYWORD1>bee</KEYWORD1>
- <KEYWORD1>beep</KEYWORD1>
- <KEYWORD1>bgodfrey</KEYWORD1>
- <KEYWORD1>binreg</KEYWORD1>
- <KEYWORD1>bip0_lf</KEYWORD1>
- <KEYWORD1>bip0_lf7</KEYWORD1>
- <KEYWORD1>biplot</KEYWORD1>
- <KEYWORD1>bipp_lf</KEYWORD1>
- <KEYWORD1>bipp_lf7</KEYWORD1>
- <KEYWORD1>bipr_lf</KEYWORD1>
- <KEYWORD1>bipr_lf7</KEYWORD1>
- <KEYWORD1>bipr_p</KEYWORD1>
- <KEYWORD1>bipr_p7</KEYWORD1>
- <KEYWORD1>biprobit</KEYWORD1>
- <KEYWORD1>biprobit7</KEYWORD1>
- <KEYWORD1>bitest</KEYWORD1>
- <KEYWORD1>bitesti</KEYWORD1>
- <KEYWORD1>bitowt</KEYWORD1>
- <KEYWORD1>blogit</KEYWORD1>
- <KEYWORD1>bmemsize</KEYWORD1>
- <KEYWORD1>boot</KEYWORD1>
- <KEYWORD1>bootsamp</KEYWORD1>
- <KEYWORD1>bootstrap</KEYWORD1>
- <KEYWORD1>bootstrap_8</KEYWORD1>
- <KEYWORD1>boxco_l</KEYWORD1>
- <KEYWORD1>boxco_p</KEYWORD1>
- <KEYWORD1>boxcox</KEYWORD1>
- <KEYWORD1>boxcox_6</KEYWORD1>
- <KEYWORD1>boxcox_p</KEYWORD1>
- <KEYWORD1>bprobit</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>brier</KEYWORD1>
- <KEYWORD1>brr</KEYWORD1>
- <KEYWORD1>brrstat</KEYWORD1>
- <KEYWORD1>bs</KEYWORD1>
- <KEYWORD1>bs_7</KEYWORD1>
- <KEYWORD1>bsampl_w</KEYWORD1>
- <KEYWORD1>bsample</KEYWORD1>
- <KEYWORD1>bsample_7</KEYWORD1>
- <KEYWORD1>bsqreg</KEYWORD1>
- <KEYWORD1>bstat</KEYWORD1>
- <KEYWORD1>bstat_7</KEYWORD1>
- <KEYWORD1>bstat_8</KEYWORD1>
- <KEYWORD1>bstrap</KEYWORD1>
- <KEYWORD1>bstrap_7</KEYWORD1>
- <KEYWORD1>c_local</KEYWORD1>
- <KEYWORD1>ca</KEYWORD1>
- <KEYWORD1>ca_estat</KEYWORD1>
- <KEYWORD1>ca_p</KEYWORD1>
- <KEYWORD1>cabiplot</KEYWORD1>
- <KEYWORD1>camat</KEYWORD1>
- <KEYWORD1>canon</KEYWORD1>
- <KEYWORD1>canon_8</KEYWORD1>
- <KEYWORD1>canon_8_p</KEYWORD1>
- <KEYWORD1>canon_estat</KEYWORD1>
- <KEYWORD1>canon_p</KEYWORD1>
- <KEYWORD1>caprojection</KEYWORD1>
- <KEYWORD1>capture</KEYWORD1>
- <KEYWORD1>cat</KEYWORD1>
- <KEYWORD1>cc</KEYWORD1>
- <KEYWORD1>cchart</KEYWORD1>
- <KEYWORD1>cchart_7</KEYWORD1>
- <KEYWORD1>cci</KEYWORD1>
- <KEYWORD1>cd</KEYWORD1>
- <KEYWORD1>censobs_table</KEYWORD1>
- <KEYWORD1>centile</KEYWORD1>
- <KEYWORD1>cf</KEYWORD1>
- <KEYWORD1>char</KEYWORD1>
- <KEYWORD1>chdir</KEYWORD1>
- <KEYWORD1>checkdlgfiles</KEYWORD1>
- <KEYWORD1>checkestimationsample</KEYWORD1>
- <KEYWORD1>checkhlpfiles</KEYWORD1>
- <KEYWORD1>checksum</KEYWORD1>
- <KEYWORD1>ci</KEYWORD1>
- <KEYWORD1>cii</KEYWORD1>
- <KEYWORD1>cksum</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>clo</KEYWORD1>
- <KEYWORD1>clocal</KEYWORD1>
- <KEYWORD1>clog</KEYWORD1>
- <KEYWORD1>clog_lf</KEYWORD1>
- <KEYWORD1>clog_p</KEYWORD1>
- <KEYWORD1>clogi</KEYWORD1>
- <KEYWORD1>clogi_sw</KEYWORD1>
- <KEYWORD1>clogit</KEYWORD1>
- <KEYWORD1>clogit_lf</KEYWORD1>
- <KEYWORD1>clogit_p</KEYWORD1>
- <KEYWORD1>clogitp</KEYWORD1>
- <KEYWORD1>clogl_sw</KEYWORD1>
- <KEYWORD1>cloglog</KEYWORD1>
- <KEYWORD1>clonevar</KEYWORD1>
- <KEYWORD1>clslistarray</KEYWORD1>
- <KEYWORD1>cluster</KEYWORD1>
- <KEYWORD1>cluster_measures</KEYWORD1>
- <KEYWORD1>cluster_stop</KEYWORD1>
- <KEYWORD1>cluster_tree</KEYWORD1>
- <KEYWORD1>cluster_tree_8</KEYWORD1>
- <KEYWORD1>clustermat</KEYWORD1>
- <KEYWORD1>cnr</KEYWORD1>
- <KEYWORD1>cnre</KEYWORD1>
- <KEYWORD1>cnreg</KEYWORD1>
- <KEYWORD1>cnreg_p</KEYWORD1>
- <KEYWORD1>cnreg_sw</KEYWORD1>
- <KEYWORD1>cnsreg</KEYWORD1>
- <KEYWORD1>codebook</KEYWORD1>
- <KEYWORD1>collaps4</KEYWORD1>
- <KEYWORD1>collapse</KEYWORD1>
- <KEYWORD1>colormult_nb</KEYWORD1>
- <KEYWORD1>colormult_nw</KEYWORD1>
- <KEYWORD1>conf</KEYWORD1>
- <KEYWORD1>confi</KEYWORD1>
- <KEYWORD1>confir</KEYWORD1>
- <KEYWORD1>confirm</KEYWORD1>
- <KEYWORD1>conren</KEYWORD1>
- <KEYWORD1>cons</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>constr</KEYWORD1>
- <KEYWORD1>constra</KEYWORD1>
- <KEYWORD1>constrai</KEYWORD1>
- <KEYWORD1>constrain</KEYWORD1>
- <KEYWORD1>constraint</KEYWORD1>
- <KEYWORD1>contract</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>copyright</KEYWORD1>
- <KEYWORD1>copysource</KEYWORD1>
- <KEYWORD1>cor</KEYWORD1>
- <KEYWORD1>corc</KEYWORD1>
- <KEYWORD1>corr</KEYWORD1>
- <KEYWORD1>corr2data</KEYWORD1>
- <KEYWORD1>corr_anti</KEYWORD1>
- <KEYWORD1>corr_kmo</KEYWORD1>
- <KEYWORD1>corr_smc</KEYWORD1>
- <KEYWORD1>corre</KEYWORD1>
- <KEYWORD1>correl</KEYWORD1>
- <KEYWORD1>correla</KEYWORD1>
- <KEYWORD1>correlat</KEYWORD1>
- <KEYWORD1>correlate</KEYWORD1>
- <KEYWORD1>corrgram</KEYWORD1>
- <KEYWORD1>cou</KEYWORD1>
- <KEYWORD1>coun</KEYWORD1>
- <KEYWORD1>count</KEYWORD1>
- <KEYWORD1>cox</KEYWORD1>
- <KEYWORD1>cox_p</KEYWORD1>
- <KEYWORD1>cox_sw</KEYWORD1>
- <KEYWORD1>coxbase</KEYWORD1>
- <KEYWORD1>coxhaz</KEYWORD1>
- <KEYWORD1>coxvar</KEYWORD1>
- <KEYWORD1>cp</KEYWORD1>
- <KEYWORD1>cprplot</KEYWORD1>
- <KEYWORD1>cprplot_7</KEYWORD1>
- <KEYWORD1>crc</KEYWORD1>
- <KEYWORD1>cross</KEYWORD1>
- <KEYWORD1>cs</KEYWORD1>
- <KEYWORD1>cscript</KEYWORD1>
- <KEYWORD1>cscript_log</KEYWORD1>
- <KEYWORD1>csi</KEYWORD1>
- <KEYWORD1>ct</KEYWORD1>
- <KEYWORD1>ct_is</KEYWORD1>
- <KEYWORD1>ctset</KEYWORD1>
- <KEYWORD1>ctst_5</KEYWORD1>
- <KEYWORD1>ctst_st</KEYWORD1>
- <KEYWORD1>cttost</KEYWORD1>
- <KEYWORD1>cumsp</KEYWORD1>
- <KEYWORD1>cumsp_7</KEYWORD1>
- <KEYWORD1>cumul</KEYWORD1>
- <KEYWORD1>cusum</KEYWORD1>
- <KEYWORD1>cusum_7</KEYWORD1>
- <KEYWORD1>cutil</KEYWORD1>
- <KEYWORD1>d</KEYWORD1>
- <KEYWORD1>datetof</KEYWORD1>
- <KEYWORD1>db</KEYWORD1>
- <KEYWORD1>dbeta</KEYWORD1>
- <KEYWORD1>de</KEYWORD1>
- <KEYWORD1>debug</KEYWORD1>
- <KEYWORD1>debugbuf</KEYWORD1>
- <KEYWORD1>dec</KEYWORD1>
- <KEYWORD1>deco</KEYWORD1>
- <KEYWORD1>decod</KEYWORD1>
- <KEYWORD1>decode</KEYWORD1>
- <KEYWORD1>deff</KEYWORD1>
- <KEYWORD1>des</KEYWORD1>
- <KEYWORD1>desc</KEYWORD1>
- <KEYWORD1>descr</KEYWORD1>
- <KEYWORD1>descri</KEYWORD1>
- <KEYWORD1>describ</KEYWORD1>
- <KEYWORD1>describe</KEYWORD1>
- <KEYWORD1>destring</KEYWORD1>
- <KEYWORD1>dfbeta</KEYWORD1>
- <KEYWORD1>dfgls</KEYWORD1>
- <KEYWORD1>dfuller</KEYWORD1>
- <KEYWORD1>diff</KEYWORD1>
- <KEYWORD1>dir</KEYWORD1>
- <KEYWORD1>dirstats</KEYWORD1>
- <KEYWORD1>discard</KEYWORD1>
- <KEYWORD1>disp_res</KEYWORD1>
- <KEYWORD1>disp_s</KEYWORD1>
- <KEYWORD1>doe</KEYWORD1>
- <KEYWORD1>doed</KEYWORD1>
- <KEYWORD1>doedi</KEYWORD1>
- <KEYWORD1>doedit</KEYWORD1>
- <KEYWORD1>dotplot</KEYWORD1>
- <KEYWORD1>dotplot_7</KEYWORD1>
- <KEYWORD1>dprobit</KEYWORD1>
- <KEYWORD1>drawnorm</KEYWORD1>
- <KEYWORD1>ds</KEYWORD1>
- <KEYWORD1>ds_util</KEYWORD1>
- <KEYWORD1>dstdize</KEYWORD1>
- <KEYWORD1>duplicates</KEYWORD1>
- <KEYWORD1>durbina</KEYWORD1>
- <KEYWORD1>dwstat</KEYWORD1>
- <KEYWORD1>dydx</KEYWORD1>
- <KEYWORD1>dynre</KEYWORD1>
- <KEYWORD1>dynren</KEYWORD1>
- <KEYWORD1>e</KEYWORD1>
- <KEYWORD1>ed</KEYWORD1>
- <KEYWORD1>edi</KEYWORD1>
- <KEYWORD1>edit</KEYWORD1>
- <KEYWORD1>egen</KEYWORD1>
- <KEYWORD1>eivreg</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>emdef</KEYWORD1>
- <KEYWORD1>en</KEYWORD1>
- <KEYWORD1>enc</KEYWORD1>
- <KEYWORD1>enco</KEYWORD1>
- <KEYWORD1>encod</KEYWORD1>
- <KEYWORD1>encode</KEYWORD1>
- <KEYWORD1>enter</KEYWORD1>
- <KEYWORD1>eq</KEYWORD1>
- <KEYWORD1>erase</KEYWORD1>
- <KEYWORD1>ereg</KEYWORD1>
- <KEYWORD1>ereg_lf</KEYWORD1>
- <KEYWORD1>ereg_p</KEYWORD1>
- <KEYWORD1>ereg_sw</KEYWORD1>
- <KEYWORD1>ereghet</KEYWORD1>
- <KEYWORD1>ereghet_glf</KEYWORD1>
- <KEYWORD1>ereghet_glf_sh</KEYWORD1>
- <KEYWORD1>ereghet_gp</KEYWORD1>
- <KEYWORD1>ereghet_ilf</KEYWORD1>
- <KEYWORD1>ereghet_ilf_sh</KEYWORD1>
- <KEYWORD1>ereghet_ip</KEYWORD1>
- <KEYWORD1>err</KEYWORD1>
- <KEYWORD1>erro</KEYWORD1>
- <KEYWORD1>error</KEYWORD1>
- <KEYWORD1>estimates</KEYWORD1>
- <KEYWORD1>estimate</KEYWORD1>
- <KEYWORD1>estimat</KEYWORD1>
- <KEYWORD1>estima</KEYWORD1>
- <KEYWORD1>estim</KEYWORD1>
- <KEYWORD1>esti</KEYWORD1>
- <KEYWORD1>est</KEYWORD1>
- <KEYWORD1>est_cfexist</KEYWORD1>
- <KEYWORD1>est_cfname</KEYWORD1>
- <KEYWORD1>est_clickable</KEYWORD1>
- <KEYWORD1>est_expand</KEYWORD1>
- <KEYWORD1>est_hold</KEYWORD1>
- <KEYWORD1>est_table</KEYWORD1>
- <KEYWORD1>est_unhold</KEYWORD1>
- <KEYWORD1>est_unholdok</KEYWORD1>
- <KEYWORD1>estat</KEYWORD1>
- <KEYWORD1>estat_default</KEYWORD1>
- <KEYWORD1>estat_summ</KEYWORD1>
- <KEYWORD1>estat_vce_only</KEYWORD1>
- <KEYWORD1>esti</KEYWORD1>
- <KEYWORD1>estim</KEYWORD1>
- <KEYWORD1>estima</KEYWORD1>
- <KEYWORD1>estimat</KEYWORD1>
- <KEYWORD1>estimate</KEYWORD1>
- <KEYWORD1>etodow</KEYWORD1>
- <KEYWORD1>etof</KEYWORD1>
- <KEYWORD1>etomdy</KEYWORD1>
- <KEYWORD1>ex</KEYWORD1>
- <KEYWORD1>exec</KEYWORD1>
- <KEYWORD1>execu</KEYWORD1>
- <KEYWORD1>execut</KEYWORD1>
- <KEYWORD1>execute</KEYWORD1>
- <KEYWORD1>exi</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>expandcl</KEYWORD1>
- <KEYWORD1>export</KEYWORD1>
- <KEYWORD1>fac</KEYWORD1>
- <KEYWORD1>fact</KEYWORD1>
- <KEYWORD1>facto</KEYWORD1>
- <KEYWORD1>factor</KEYWORD1>
- <KEYWORD1>factor_estat</KEYWORD1>
- <KEYWORD1>factor_p</KEYWORD1>
- <KEYWORD1>factor_pca_rotated</KEYWORD1>
- <KEYWORD1>factor_rotate</KEYWORD1>
- <KEYWORD1>factormat</KEYWORD1>
- <KEYWORD1>failure</KEYWORD1>
- <KEYWORD1>fcast</KEYWORD1>
- <KEYWORD1>fcast_compute</KEYWORD1>
- <KEYWORD1>fcast_graph</KEYWORD1>
- <KEYWORD1>fft</KEYWORD1>
- <KEYWORD1>fh_st</KEYWORD1>
- <KEYWORD1>fillin</KEYWORD1>
- <KEYWORD1>find_hlp_file</KEYWORD1>
- <KEYWORD1>findit</KEYWORD1>
- <KEYWORD1>findit_7</KEYWORD1>
- <KEYWORD1>fit</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>for5_0</KEYWORD1>
- <KEYWORD1>force</KEYWORD1>
- <KEYWORD1>form</KEYWORD1>
- <KEYWORD1>forma</KEYWORD1>
- <KEYWORD1>format</KEYWORD1>
- <KEYWORD1>fpredict</KEYWORD1>
- <KEYWORD1>frac_154</KEYWORD1>
- <KEYWORD1>frac_adj</KEYWORD1>
- <KEYWORD1>frac_chk</KEYWORD1>
- <KEYWORD1>frac_cox</KEYWORD1>
- <KEYWORD1>frac_ddp</KEYWORD1>
- <KEYWORD1>frac_dis</KEYWORD1>
- <KEYWORD1>frac_dv</KEYWORD1>
- <KEYWORD1>frac_in</KEYWORD1>
- <KEYWORD1>frac_mun</KEYWORD1>
- <KEYWORD1>frac_pp</KEYWORD1>
- <KEYWORD1>frac_pq</KEYWORD1>
- <KEYWORD1>frac_pv</KEYWORD1>
- <KEYWORD1>frac_wgt</KEYWORD1>
- <KEYWORD1>frac_xo</KEYWORD1>
- <KEYWORD1>fracgen</KEYWORD1>
- <KEYWORD1>fracplot</KEYWORD1>
- <KEYWORD1>fracplot_7</KEYWORD1>
- <KEYWORD1>fracpoly</KEYWORD1>
- <KEYWORD1>fracpred</KEYWORD1>
- <KEYWORD1>fron_ex</KEYWORD1>
- <KEYWORD1>fron_hn</KEYWORD1>
- <KEYWORD1>fron_p</KEYWORD1>
- <KEYWORD1>fron_tn</KEYWORD1>
- <KEYWORD1>fron_tn2</KEYWORD1>
- <KEYWORD1>frontier</KEYWORD1>
- <KEYWORD1>ftodate</KEYWORD1>
- <KEYWORD1>ftoe</KEYWORD1>
- <KEYWORD1>ftomdy</KEYWORD1>
- <KEYWORD1>ftowdate</KEYWORD1>
- <KEYWORD1>g</KEYWORD1>
- <KEYWORD1>gamhet_glf</KEYWORD1>
- <KEYWORD1>gamhet_gp</KEYWORD1>
- <KEYWORD1>gamhet_ilf</KEYWORD1>
- <KEYWORD1>gamhet_ip</KEYWORD1>
- <KEYWORD1>gamma</KEYWORD1>
- <KEYWORD1>gamma_d2</KEYWORD1>
- <KEYWORD1>gamma_lf</KEYWORD1>
- <KEYWORD1>gamma_p</KEYWORD1>
- <KEYWORD1>gamma_sw</KEYWORD1>
- <KEYWORD1>gammahet</KEYWORD1>
- <KEYWORD1>gdi_hexagon</KEYWORD1>
- <KEYWORD1>gdi_spokes</KEYWORD1>
- <KEYWORD1>ge</KEYWORD1>
- <KEYWORD1>gen</KEYWORD1>
- <KEYWORD1>gene</KEYWORD1>
- <KEYWORD1>gener</KEYWORD1>
- <KEYWORD1>genera</KEYWORD1>
- <KEYWORD1>generat</KEYWORD1>
- <KEYWORD1>generate</KEYWORD1>
- <KEYWORD1>genrank</KEYWORD1>
- <KEYWORD1>genstd</KEYWORD1>
- <KEYWORD1>genvmean</KEYWORD1>
- <KEYWORD1>gettoken</KEYWORD1>
- <KEYWORD1>gl</KEYWORD1>
- <KEYWORD1>gladder</KEYWORD1>
- <KEYWORD1>gladder_7</KEYWORD1>
- <KEYWORD1>glim_l01</KEYWORD1>
- <KEYWORD1>glim_l02</KEYWORD1>
- <KEYWORD1>glim_l03</KEYWORD1>
- <KEYWORD1>glim_l04</KEYWORD1>
- <KEYWORD1>glim_l05</KEYWORD1>
- <KEYWORD1>glim_l06</KEYWORD1>
- <KEYWORD1>glim_l07</KEYWORD1>
- <KEYWORD1>glim_l08</KEYWORD1>
- <KEYWORD1>glim_l09</KEYWORD1>
- <KEYWORD1>glim_l10</KEYWORD1>
- <KEYWORD1>glim_l11</KEYWORD1>
- <KEYWORD1>glim_l12</KEYWORD1>
- <KEYWORD1>glim_lf</KEYWORD1>
- <KEYWORD1>glim_mu</KEYWORD1>
- <KEYWORD1>glim_nw1</KEYWORD1>
- <KEYWORD1>glim_nw2</KEYWORD1>
- <KEYWORD1>glim_nw3</KEYWORD1>
- <KEYWORD1>glim_p</KEYWORD1>
- <KEYWORD1>glim_v1</KEYWORD1>
- <KEYWORD1>glim_v2</KEYWORD1>
- <KEYWORD1>glim_v3</KEYWORD1>
- <KEYWORD1>glim_v4</KEYWORD1>
- <KEYWORD1>glim_v5</KEYWORD1>
- <KEYWORD1>glim_v6</KEYWORD1>
- <KEYWORD1>glim_v7</KEYWORD1>
- <KEYWORD1>glm</KEYWORD1>
- <KEYWORD1>glm_6</KEYWORD1>
- <KEYWORD1>glm_p</KEYWORD1>
- <KEYWORD1>glm_sw</KEYWORD1>
- <KEYWORD1>glmpred</KEYWORD1>
- <KEYWORD1>glogit</KEYWORD1>
- <KEYWORD1>glogit_8</KEYWORD1>
- <KEYWORD1>glogit_p</KEYWORD1>
- <KEYWORD1>gmeans</KEYWORD1>
- <KEYWORD1>gnbre_lf</KEYWORD1>
- <KEYWORD1>gnbreg</KEYWORD1>
- <KEYWORD1>gnbreg_5</KEYWORD1>
- <KEYWORD1>gnbreg_p</KEYWORD1>
- <KEYWORD1>gomp_lf</KEYWORD1>
- <KEYWORD1>gompe_sw</KEYWORD1>
- <KEYWORD1>gomper_p</KEYWORD1>
- <KEYWORD1>gompertz</KEYWORD1>
- <KEYWORD1>gompertzhet</KEYWORD1>
- <KEYWORD1>gomphet_glf</KEYWORD1>
- <KEYWORD1>gomphet_glf_sh</KEYWORD1>
- <KEYWORD1>gomphet_gp</KEYWORD1>
- <KEYWORD1>gomphet_ilf</KEYWORD1>
- <KEYWORD1>gomphet_ilf_sh</KEYWORD1>
- <KEYWORD1>gomphet_ip</KEYWORD1>
- <KEYWORD1>gph</KEYWORD1>
- <KEYWORD1>gphdot</KEYWORD1>
- <KEYWORD1>gphpen</KEYWORD1>
- <KEYWORD1>gphprint</KEYWORD1>
- <KEYWORD1>gprobi_p</KEYWORD1>
- <KEYWORD1>gprobit</KEYWORD1>
- <KEYWORD1>gprobit_8</KEYWORD1>
- <KEYWORD1>gr</KEYWORD1>
- <KEYWORD1>gr_copy</KEYWORD1>
- <KEYWORD1>gr_current</KEYWORD1>
- <KEYWORD1>gr_db</KEYWORD1>
- <KEYWORD1>gr_describe</KEYWORD1>
- <KEYWORD1>gr_dir</KEYWORD1>
- <KEYWORD1>gr_draw</KEYWORD1>
- <KEYWORD1>gr_draw_replay</KEYWORD1>
- <KEYWORD1>gr_drop</KEYWORD1>
- <KEYWORD1>gr_edit</KEYWORD1>
- <KEYWORD1>gr_editviewopts</KEYWORD1>
- <KEYWORD1>gr_example</KEYWORD1>
- <KEYWORD1>gr_example2</KEYWORD1>
- <KEYWORD1>gr_export</KEYWORD1>
- <KEYWORD1>gr_print</KEYWORD1>
- <KEYWORD1>gr_qscheme</KEYWORD1>
- <KEYWORD1>gr_query</KEYWORD1>
- <KEYWORD1>gr_read</KEYWORD1>
- <KEYWORD1>gr_rename</KEYWORD1>
- <KEYWORD1>gr_replay</KEYWORD1>
- <KEYWORD1>gr_save</KEYWORD1>
- <KEYWORD1>gr_set</KEYWORD1>
- <KEYWORD1>gr_setscheme</KEYWORD1>
- <KEYWORD1>gr_table</KEYWORD1>
- <KEYWORD1>gr_undo</KEYWORD1>
- <KEYWORD1>gr_use</KEYWORD1>
- <KEYWORD1>gra</KEYWORD1>
- <KEYWORD1>grap</KEYWORD1>
- <KEYWORD1>graph</KEYWORD1>
- <KEYWORD1>grebar</KEYWORD1>
- <KEYWORD1>greigen</KEYWORD1>
- <KEYWORD1>greigen_7</KEYWORD1>
- <KEYWORD1>greigen_8</KEYWORD1>
- <KEYWORD1>grmeanby</KEYWORD1>
- <KEYWORD1>grmeanby_7</KEYWORD1>
- <KEYWORD1>gs_fileinfo</KEYWORD1>
- <KEYWORD1>gs_filetype</KEYWORD1>
- <KEYWORD1>gs_graphinfo</KEYWORD1>
- <KEYWORD1>gs_stat</KEYWORD1>
- <KEYWORD1>gsort</KEYWORD1>
- <KEYWORD1>gwood</KEYWORD1>
- <KEYWORD1>h</KEYWORD1>
- <KEYWORD1>hadimvo</KEYWORD1>
- <KEYWORD1>hareg</KEYWORD1>
- <KEYWORD1>hausman</KEYWORD1>
- <KEYWORD1>he</KEYWORD1>
- <KEYWORD1>heck_d2</KEYWORD1>
- <KEYWORD1>heckma_p</KEYWORD1>
- <KEYWORD1>heckman</KEYWORD1>
- <KEYWORD1>heckp_lf</KEYWORD1>
- <KEYWORD1>heckpr_p</KEYWORD1>
- <KEYWORD1>heckprob</KEYWORD1>
- <KEYWORD1>hel</KEYWORD1>
- <KEYWORD1>help</KEYWORD1>
- <KEYWORD1>helpchk</KEYWORD1>
- <KEYWORD1>hereg</KEYWORD1>
- <KEYWORD1>hetpr_lf</KEYWORD1>
- <KEYWORD1>hetpr_p</KEYWORD1>
- <KEYWORD1>hetprob</KEYWORD1>
- <KEYWORD1>hettest</KEYWORD1>
- <KEYWORD1>hilite</KEYWORD1>
- <KEYWORD1>hist</KEYWORD1>
- <KEYWORD1>hist_7</KEYWORD1>
- <KEYWORD1>histogram</KEYWORD1>
- <KEYWORD1>hlogit</KEYWORD1>
- <KEYWORD1>hlu</KEYWORD1>
- <KEYWORD1>hmeans</KEYWORD1>
- <KEYWORD1>hotel</KEYWORD1>
- <KEYWORD1>hotelling</KEYWORD1>
- <KEYWORD1>hprobit</KEYWORD1>
- <KEYWORD1>hreg</KEYWORD1>
- <KEYWORD1>hsearch</KEYWORD1>
- <KEYWORD1>icd9</KEYWORD1>
- <KEYWORD1>icd9_ff</KEYWORD1>
- <KEYWORD1>icd9p</KEYWORD1>
- <KEYWORD1>id</KEYWORD1>
- <KEYWORD1>iis</KEYWORD1>
- <KEYWORD1>impute</KEYWORD1>
- <KEYWORD1>imtest</KEYWORD1>
- <KEYWORD1>inbase</KEYWORD1>
- <KEYWORD1>inf</KEYWORD1>
- <KEYWORD1>infi</KEYWORD1>
- <KEYWORD1>infil</KEYWORD1>
- <KEYWORD1>infile</KEYWORD1>
- <KEYWORD1>infix</KEYWORD1>
- <KEYWORD1>inflate</KEYWORD1>
- <KEYWORD1>inp</KEYWORD1>
- <KEYWORD1>inpu</KEYWORD1>
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD1>ins</KEYWORD1>
- <KEYWORD1>insh</KEYWORD1>
- <KEYWORD1>inshe</KEYWORD1>
- <KEYWORD1>inshee</KEYWORD1>
- <KEYWORD1>insheet</KEYWORD1>
- <KEYWORD1>insp</KEYWORD1>
- <KEYWORD1>inspe</KEYWORD1>
- <KEYWORD1>inspec</KEYWORD1>
- <KEYWORD1>inspect</KEYWORD1>
- <KEYWORD1>integ</KEYWORD1>
- <KEYWORD1>inten</KEYWORD1>
- <KEYWORD1>intreg</KEYWORD1>
- <KEYWORD1>intreg_7</KEYWORD1>
- <KEYWORD1>intreg_p</KEYWORD1>
- <KEYWORD1>intrg2_ll</KEYWORD1>
- <KEYWORD1>intrg_ll</KEYWORD1>
- <KEYWORD1>intrg_ll2</KEYWORD1>
- <KEYWORD1>ipolate</KEYWORD1>
- <KEYWORD1>iqreg</KEYWORD1>
- <KEYWORD1>ir</KEYWORD1>
- <KEYWORD1>irf</KEYWORD1>
- <KEYWORD1>irf_create</KEYWORD1>
- <KEYWORD1>irfm</KEYWORD1>
- <KEYWORD1>iri</KEYWORD1>
- <KEYWORD1>is_svy</KEYWORD1>
- <KEYWORD1>is_svysum</KEYWORD1>
- <KEYWORD1>isid</KEYWORD1>
- <KEYWORD1>istdize</KEYWORD1>
- <KEYWORD1>ivprob_1_lf</KEYWORD1>
- <KEYWORD1>ivprob_lf</KEYWORD1>
- <KEYWORD1>ivprobit</KEYWORD1>
- <KEYWORD1>ivprobit_p</KEYWORD1>
- <KEYWORD1>ivreg</KEYWORD1>
- <KEYWORD1>ivreg_footnote</KEYWORD1>
- <KEYWORD1>ivtob_1_lf</KEYWORD1>
- <KEYWORD1>ivtob_lf</KEYWORD1>
- <KEYWORD1>ivtobit</KEYWORD1>
- <KEYWORD1>ivtobit_p</KEYWORD1>
- <KEYWORD1>jackknife</KEYWORD1>
- <KEYWORD1>jacknife</KEYWORD1>
- <KEYWORD1>jknife</KEYWORD1>
- <KEYWORD1>jknife_6</KEYWORD1>
- <KEYWORD1>jknife_8</KEYWORD1>
- <KEYWORD1>jkstat</KEYWORD1>
- <KEYWORD1>joinby</KEYWORD1>
- <KEYWORD1>kalarma1</KEYWORD1>
- <KEYWORD1>kap</KEYWORD1>
- <KEYWORD1>kap_3</KEYWORD1>
- <KEYWORD1>kapmeier</KEYWORD1>
- <KEYWORD1>kappa</KEYWORD1>
- <KEYWORD1>kapwgt</KEYWORD1>
- <KEYWORD1>kdensity</KEYWORD1>
- <KEYWORD1>kdensity_7</KEYWORD1>
- <KEYWORD1>keep</KEYWORD1>
- <KEYWORD1>ksm</KEYWORD1>
- <KEYWORD1>ksmirnov</KEYWORD1>
- <KEYWORD1>ktau</KEYWORD1>
- <KEYWORD1>kwallis</KEYWORD1>
- <KEYWORD1>l</KEYWORD1>
- <KEYWORD1>la</KEYWORD1>
- <KEYWORD1>labelbook</KEYWORD1>
- <KEYWORD1>ladder</KEYWORD1>
- <KEYWORD1>level</KEYWORD1>
- <KEYWORD1>levels</KEYWORD1>
- <KEYWORD1>levelsof</KEYWORD1>
- <KEYWORD1>leverage</KEYWORD1>
- <KEYWORD1>lfit</KEYWORD1>
- <KEYWORD1>lfit_p</KEYWORD1>
- <KEYWORD1>li</KEYWORD1>
- <KEYWORD1>lincom</KEYWORD1>
- <KEYWORD1>line</KEYWORD1>
- <KEYWORD1>linktest</KEYWORD1>
- <KEYWORD1>lis</KEYWORD1>
- <KEYWORD1>list</KEYWORD1>
- <KEYWORD1>lloghet_glf</KEYWORD1>
- <KEYWORD1>lloghet_glf_sh</KEYWORD1>
- <KEYWORD1>lloghet_gp</KEYWORD1>
- <KEYWORD1>lloghet_ilf</KEYWORD1>
- <KEYWORD1>lloghet_ilf_sh</KEYWORD1>
- <KEYWORD1>lloghet_ip</KEYWORD1>
- <KEYWORD1>llogi_sw</KEYWORD1>
- <KEYWORD1>llogis_p</KEYWORD1>
- <KEYWORD1>llogist</KEYWORD1>
- <KEYWORD1>llogistic</KEYWORD1>
- <KEYWORD1>llogistichet</KEYWORD1>
- <KEYWORD1>lnorm_lf</KEYWORD1>
- <KEYWORD1>lnorm_sw</KEYWORD1>
- <KEYWORD1>lnorma_p</KEYWORD1>
- <KEYWORD1>lnormal</KEYWORD1>
- <KEYWORD1>lnormalhet</KEYWORD1>
- <KEYWORD1>lnormhet_glf</KEYWORD1>
- <KEYWORD1>lnormhet_glf_sh</KEYWORD1>
- <KEYWORD1>lnormhet_gp</KEYWORD1>
- <KEYWORD1>lnormhet_ilf</KEYWORD1>
- <KEYWORD1>lnormhet_ilf_sh</KEYWORD1>
- <KEYWORD1>lnormhet_ip</KEYWORD1>
- <KEYWORD1>lnskew0</KEYWORD1>
- <KEYWORD1>lo</KEYWORD1>
- <KEYWORD1>loadingplot</KEYWORD1>
- <KEYWORD1>logi</KEYWORD1>
- <KEYWORD1>logis_lf</KEYWORD1>
- <KEYWORD1>logistic</KEYWORD1>
- <KEYWORD1>logistic_p</KEYWORD1>
- <KEYWORD1>logit</KEYWORD1>
- <KEYWORD1>logit_estat</KEYWORD1>
- <KEYWORD1>logit_p</KEYWORD1>
- <KEYWORD1>loglogs</KEYWORD1>
- <KEYWORD1>logrank</KEYWORD1>
- <KEYWORD1>loneway</KEYWORD1>
- <KEYWORD1>loo</KEYWORD1>
- <KEYWORD1>look</KEYWORD1>
- <KEYWORD1>lookfor</KEYWORD1>
- <KEYWORD1>looku</KEYWORD1>
- <KEYWORD1>lookup</KEYWORD1>
- <KEYWORD1>lowess</KEYWORD1>
- <KEYWORD1>lowess_7</KEYWORD1>
- <KEYWORD1>lpredict</KEYWORD1>
- <KEYWORD1>lrecomp</KEYWORD1>
- <KEYWORD1>lroc</KEYWORD1>
- <KEYWORD1>lroc_7</KEYWORD1>
- <KEYWORD1>lrtest</KEYWORD1>
- <KEYWORD1>lsens</KEYWORD1>
- <KEYWORD1>lsens_7</KEYWORD1>
- <KEYWORD1>lsens_x</KEYWORD1>
- <KEYWORD1>lstat</KEYWORD1>
- <KEYWORD1>ltable</KEYWORD1>
- <KEYWORD1>ltable_7</KEYWORD1>
- <KEYWORD1>ltriang</KEYWORD1>
- <KEYWORD1>lv</KEYWORD1>
- <KEYWORD1>lvr2plot</KEYWORD1>
- <KEYWORD1>lvr2plot_7</KEYWORD1>
- <KEYWORD1>ma</KEYWORD1>
- <KEYWORD1>mac</KEYWORD1>
- <KEYWORD1>macr</KEYWORD1>
- <KEYWORD1>macro</KEYWORD1>
- <KEYWORD1>makecns</KEYWORD1>
- <KEYWORD1>man</KEYWORD1>
- <KEYWORD1>manova_estat</KEYWORD1>
- <KEYWORD1>manova_p</KEYWORD1>
- <KEYWORD1>mantel</KEYWORD1>
- <KEYWORD1>mark</KEYWORD1>
- <KEYWORD1>markout</KEYWORD1>
- <KEYWORD1>marksample</KEYWORD1>
- <KEYWORD1>mat</KEYWORD1>
- <KEYWORD1>mat_capp</KEYWORD1>
- <KEYWORD1>mat_order</KEYWORD1>
- <KEYWORD1>mat_rapp</KEYWORD1>
- <KEYWORD1>mata_matdescribe</KEYWORD1>
- <KEYWORD1>mata_matsave</KEYWORD1>
- <KEYWORD1>mata_matuse</KEYWORD1>
- <KEYWORD1>matalabel</KEYWORD1>
- <KEYWORD1>matcproc</KEYWORD1>
- <KEYWORD1>matlist</KEYWORD1>
- <KEYWORD1>matname</KEYWORD1>
- <KEYWORD1>matr</KEYWORD1>
- <KEYWORD1>matri</KEYWORD1>
- <KEYWORD1>matrix</KEYWORD1>
- <KEYWORD1>matrix_input__dlg</KEYWORD1>
- <KEYWORD1>matsize</KEYWORD1>
- <KEYWORD1>matstrik</KEYWORD1>
- <KEYWORD1>mcc</KEYWORD1>
- <KEYWORD1>mcci</KEYWORD1>
- <KEYWORD1>md0_</KEYWORD1>
- <KEYWORD1>md1_</KEYWORD1>
- <KEYWORD1>md1debu_</KEYWORD1>
- <KEYWORD1>md1debug_</KEYWORD1>
- <KEYWORD1>md2_</KEYWORD1>
- <KEYWORD1>md2debu_</KEYWORD1>
- <KEYWORD1>md2debug_</KEYWORD1>
- <KEYWORD1>mds</KEYWORD1>
- <KEYWORD1>mds_estat</KEYWORD1>
- <KEYWORD1>mds_p</KEYWORD1>
- <KEYWORD1>mdsconfig</KEYWORD1>
- <KEYWORD1>mdslong</KEYWORD1>
- <KEYWORD1>mdsmat</KEYWORD1>
- <KEYWORD1>mdsshepard</KEYWORD1>
- <KEYWORD1>mdytoe</KEYWORD1>
- <KEYWORD1>mdytof</KEYWORD1>
- <KEYWORD1>me_derd</KEYWORD1>
- <KEYWORD1>mean</KEYWORD1>
- <KEYWORD1>means</KEYWORD1>
- <KEYWORD1>median</KEYWORD1>
- <KEYWORD1>memory</KEYWORD1>
- <KEYWORD1>memsize</KEYWORD1>
- <KEYWORD1>meqparse</KEYWORD1>
- <KEYWORD1>mfp</KEYWORD1>
- <KEYWORD1>mfx</KEYWORD1>
- <KEYWORD1>mhelp</KEYWORD1>
- <KEYWORD1>mhodds</KEYWORD1>
- <KEYWORD1>mixed_ll</KEYWORD1>
- <KEYWORD1>mixed_ll_reparm</KEYWORD1>
- <KEYWORD1>mkassert</KEYWORD1>
- <KEYWORD1>mkdir</KEYWORD1>
- <KEYWORD1>mkmat</KEYWORD1>
- <KEYWORD1>mkspline</KEYWORD1>
- <KEYWORD1>ml</KEYWORD1>
- <KEYWORD1>ml_5</KEYWORD1>
- <KEYWORD1>ml_adjs</KEYWORD1>
- <KEYWORD1>ml_bhhhs</KEYWORD1>
- <KEYWORD1>ml_c_d</KEYWORD1>
- <KEYWORD1>ml_check</KEYWORD1>
- <KEYWORD1>ml_clear</KEYWORD1>
- <KEYWORD1>ml_cnt</KEYWORD1>
- <KEYWORD1>ml_debug</KEYWORD1>
- <KEYWORD1>ml_defd</KEYWORD1>
- <KEYWORD1>ml_e0</KEYWORD1>
- <KEYWORD1>ml_e0_bfgs</KEYWORD1>
- <KEYWORD1>ml_e0_cycle</KEYWORD1>
- <KEYWORD1>ml_e0_dfp</KEYWORD1>
- <KEYWORD1>ml_e0i</KEYWORD1>
- <KEYWORD1>ml_e1</KEYWORD1>
- <KEYWORD1>ml_e1_bfgs</KEYWORD1>
- <KEYWORD1>ml_e1_bhhh</KEYWORD1>
- <KEYWORD1>ml_e1_cycle</KEYWORD1>
- <KEYWORD1>ml_e1_dfp</KEYWORD1>
- <KEYWORD1>ml_e2</KEYWORD1>
- <KEYWORD1>ml_e2_cycle</KEYWORD1>
- <KEYWORD1>ml_ebfg0</KEYWORD1>
- <KEYWORD1>ml_ebfr0</KEYWORD1>
- <KEYWORD1>ml_ebfr1</KEYWORD1>
- <KEYWORD1>ml_ebh0q</KEYWORD1>
- <KEYWORD1>ml_ebhh0</KEYWORD1>
- <KEYWORD1>ml_ebhr0</KEYWORD1>
- <KEYWORD1>ml_ebr0i</KEYWORD1>
- <KEYWORD1>ml_ecr0i</KEYWORD1>
- <KEYWORD1>ml_edfp0</KEYWORD1>
- <KEYWORD1>ml_edfr0</KEYWORD1>
- <KEYWORD1>ml_edfr1</KEYWORD1>
- <KEYWORD1>ml_edr0i</KEYWORD1>
- <KEYWORD1>ml_eds</KEYWORD1>
- <KEYWORD1>ml_eer0i</KEYWORD1>
- <KEYWORD1>ml_egr0i</KEYWORD1>
- <KEYWORD1>ml_elf</KEYWORD1>
- <KEYWORD1>ml_elf_bfgs</KEYWORD1>
- <KEYWORD1>ml_elf_bhhh</KEYWORD1>
- <KEYWORD1>ml_elf_cycle</KEYWORD1>
- <KEYWORD1>ml_elf_dfp</KEYWORD1>
- <KEYWORD1>ml_elfi</KEYWORD1>
- <KEYWORD1>ml_elfs</KEYWORD1>
- <KEYWORD1>ml_enr0i</KEYWORD1>
- <KEYWORD1>ml_enrr0</KEYWORD1>
- <KEYWORD1>ml_erdu0</KEYWORD1>
- <KEYWORD1>ml_erdu0_bfgs</KEYWORD1>
- <KEYWORD1>ml_erdu0_bhhh</KEYWORD1>
- <KEYWORD1>ml_erdu0_bhhhq</KEYWORD1>
- <KEYWORD1>ml_erdu0_cycle</KEYWORD1>
- <KEYWORD1>ml_erdu0_dfp</KEYWORD1>
- <KEYWORD1>ml_erdu0_nrbfgs</KEYWORD1>
- <KEYWORD1>ml_exde</KEYWORD1>
- <KEYWORD1>ml_footnote</KEYWORD1>
- <KEYWORD1>ml_geqnr</KEYWORD1>
- <KEYWORD1>ml_grad0</KEYWORD1>
- <KEYWORD1>ml_graph</KEYWORD1>
- <KEYWORD1>ml_hbhhh</KEYWORD1>
- <KEYWORD1>ml_hd0</KEYWORD1>
- <KEYWORD1>ml_hold</KEYWORD1>
- <KEYWORD1>ml_init</KEYWORD1>
- <KEYWORD1>ml_inv</KEYWORD1>
- <KEYWORD1>ml_log</KEYWORD1>
- <KEYWORD1>ml_max</KEYWORD1>
- <KEYWORD1>ml_mlout</KEYWORD1>
- <KEYWORD1>ml_mlout_8</KEYWORD1>
- <KEYWORD1>ml_model</KEYWORD1>
- <KEYWORD1>ml_nb0</KEYWORD1>
- <KEYWORD1>ml_opt</KEYWORD1>
- <KEYWORD1>ml_p</KEYWORD1>
- <KEYWORD1>ml_plot</KEYWORD1>
- <KEYWORD1>ml_query</KEYWORD1>
- <KEYWORD1>ml_rdgrd</KEYWORD1>
- <KEYWORD1>ml_repor</KEYWORD1>
- <KEYWORD1>ml_s_e</KEYWORD1>
- <KEYWORD1>ml_score</KEYWORD1>
- <KEYWORD1>ml_searc</KEYWORD1>
- <KEYWORD1>ml_technique</KEYWORD1>
- <KEYWORD1>ml_unhold</KEYWORD1>
- <KEYWORD1>mleval</KEYWORD1>
- <KEYWORD1>mlf_</KEYWORD1>
- <KEYWORD1>mlmatsum</KEYWORD1>
- <KEYWORD1>mlog</KEYWORD1>
- <KEYWORD1>mlogi</KEYWORD1>
- <KEYWORD1>mlogit</KEYWORD1>
- <KEYWORD1>mlogit_footnote</KEYWORD1>
- <KEYWORD1>mlogit_p</KEYWORD1>
- <KEYWORD1>mlopts</KEYWORD1>
- <KEYWORD1>mlsum</KEYWORD1>
- <KEYWORD1>mlvecsum</KEYWORD1>
- <KEYWORD1>mmerge</KEYWORD1>
- <KEYWORD1>mnl0_</KEYWORD1>
- <KEYWORD1>mor</KEYWORD1>
- <KEYWORD1>more</KEYWORD1>
- <KEYWORD1>mov</KEYWORD1>
- <KEYWORD1>move</KEYWORD1>
- <KEYWORD1>mprobit</KEYWORD1>
- <KEYWORD1>mprobit_lf</KEYWORD1>
- <KEYWORD1>mprobit_p</KEYWORD1>
- <KEYWORD1>mrdu0_</KEYWORD1>
- <KEYWORD1>mrdu1_</KEYWORD1>
- <KEYWORD1>mvdecode</KEYWORD1>
- <KEYWORD1>mvencode</KEYWORD1>
- <KEYWORD1>mvreg</KEYWORD1>
- <KEYWORD1>mvreg_estat</KEYWORD1>
- <KEYWORD1>n</KEYWORD1>
- <KEYWORD1>nbreg</KEYWORD1>
- <KEYWORD1>nbreg_al</KEYWORD1>
- <KEYWORD1>nbreg_lf</KEYWORD1>
- <KEYWORD1>nbreg_p</KEYWORD1>
- <KEYWORD1>nbreg_sw</KEYWORD1>
- <KEYWORD1>nestreg</KEYWORD1>
- <KEYWORD1>net</KEYWORD1>
- <KEYWORD1>newey</KEYWORD1>
- <KEYWORD1>newey_7</KEYWORD1>
- <KEYWORD1>newey_p</KEYWORD1>
- <KEYWORD1>news</KEYWORD1>
- <KEYWORD1>nl</KEYWORD1>
- <KEYWORD1>nl_7</KEYWORD1>
- <KEYWORD1>nl_9</KEYWORD1>
- <KEYWORD1>nl_9_p</KEYWORD1>
- <KEYWORD1>nl_p</KEYWORD1>
- <KEYWORD1>nl_p_7</KEYWORD1>
- <KEYWORD1>nlcom</KEYWORD1>
- <KEYWORD1>nlcom_p</KEYWORD1>
- <KEYWORD1>nlexp2</KEYWORD1>
- <KEYWORD1>nlexp2_7</KEYWORD1>
- <KEYWORD1>nlexp2a</KEYWORD1>
- <KEYWORD1>nlexp2a_7</KEYWORD1>
- <KEYWORD1>nlexp3</KEYWORD1>
- <KEYWORD1>nlexp3_7</KEYWORD1>
- <KEYWORD1>nlgom3</KEYWORD1>
- <KEYWORD1>nlgom3_7</KEYWORD1>
- <KEYWORD1>nlgom4</KEYWORD1>
- <KEYWORD1>nlgom4_7</KEYWORD1>
- <KEYWORD1>nlinit</KEYWORD1>
- <KEYWORD1>nllog3</KEYWORD1>
- <KEYWORD1>nllog3_7</KEYWORD1>
- <KEYWORD1>nllog4</KEYWORD1>
- <KEYWORD1>nllog4_7</KEYWORD1>
- <KEYWORD1>nlog_rd</KEYWORD1>
- <KEYWORD1>nlogit</KEYWORD1>
- <KEYWORD1>nlogit_p</KEYWORD1>
- <KEYWORD1>nlogitgen</KEYWORD1>
- <KEYWORD1>nlogittree</KEYWORD1>
- <KEYWORD1>nlpred</KEYWORD1>
- <KEYWORD1>no</KEYWORD1>
- <KEYWORD1>nobreak</KEYWORD1>
- <KEYWORD1>noi</KEYWORD1>
- <KEYWORD1>nois</KEYWORD1>
- <KEYWORD1>noisi</KEYWORD1>
- <KEYWORD1>noisil</KEYWORD1>
- <KEYWORD1>noisily</KEYWORD1>
- <KEYWORD1>nostop</KEYWORD1>
- <KEYWORD1>note</KEYWORD1>
- <KEYWORD1>notes</KEYWORD1>
- <KEYWORD1>notify</KEYWORD1>
- <KEYWORD1>nptrend</KEYWORD1>
- <KEYWORD1>numlabel</KEYWORD1>
- <KEYWORD1>numlist</KEYWORD1>
- <KEYWORD1>off</KEYWORD1>
- <KEYWORD1>old_ver</KEYWORD1>
- <KEYWORD1>olo</KEYWORD1>
- <KEYWORD1>olog</KEYWORD1>
- <KEYWORD1>ologi</KEYWORD1>
- <KEYWORD1>ologi_sw</KEYWORD1>
- <KEYWORD1>ologit</KEYWORD1>
- <KEYWORD1>ologit_p</KEYWORD1>
- <KEYWORD1>ologitp</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>one</KEYWORD1>
- <KEYWORD1>onew</KEYWORD1>
- <KEYWORD1>onewa</KEYWORD1>
- <KEYWORD1>oneway</KEYWORD1>
- <KEYWORD1>op_colnm</KEYWORD1>
- <KEYWORD1>op_comp</KEYWORD1>
- <KEYWORD1>op_diff</KEYWORD1>
- <KEYWORD1>op_inv</KEYWORD1>
- <KEYWORD1>op_str</KEYWORD1>
- <KEYWORD1>opr</KEYWORD1>
- <KEYWORD1>opro</KEYWORD1>
- <KEYWORD1>oprob</KEYWORD1>
- <KEYWORD1>oprob_sw</KEYWORD1>
- <KEYWORD1>oprobi</KEYWORD1>
- <KEYWORD1>oprobi_p</KEYWORD1>
- <KEYWORD1>oprobit</KEYWORD1>
- <KEYWORD1>oprobitp</KEYWORD1>
- <KEYWORD1>opts_exclusive</KEYWORD1>
- <KEYWORD1>order</KEYWORD1>
- <KEYWORD1>orthog</KEYWORD1>
- <KEYWORD1>orthpoly</KEYWORD1>
- <KEYWORD1>ou</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>outf</KEYWORD1>
- <KEYWORD1>outfi</KEYWORD1>
- <KEYWORD1>outfil</KEYWORD1>
- <KEYWORD1>outfile</KEYWORD1>
- <KEYWORD1>outs</KEYWORD1>
- <KEYWORD1>outsh</KEYWORD1>
- <KEYWORD1>outshe</KEYWORD1>
- <KEYWORD1>outshee</KEYWORD1>
- <KEYWORD1>outsheet</KEYWORD1>
- <KEYWORD1>ovtest</KEYWORD1>
- <KEYWORD1>pac</KEYWORD1>
- <KEYWORD1>pac_7</KEYWORD1>
- <KEYWORD1>palette</KEYWORD1>
- <KEYWORD1>par</KEYWORD1>
- <KEYWORD1>pars</KEYWORD1>
- <KEYWORD1>parse</KEYWORD1>
- <KEYWORD1>parse_dissim</KEYWORD1>
- <KEYWORD1>pause</KEYWORD1>
- <KEYWORD1>pca</KEYWORD1>
- <KEYWORD1>pca_8</KEYWORD1>
- <KEYWORD1>pca_display</KEYWORD1>
- <KEYWORD1>pca_estat</KEYWORD1>
- <KEYWORD1>pca_p</KEYWORD1>
- <KEYWORD1>pca_rotate</KEYWORD1>
- <KEYWORD1>pcamat</KEYWORD1>
- <KEYWORD1>pchart</KEYWORD1>
- <KEYWORD1>pchart_7</KEYWORD1>
- <KEYWORD1>pchi</KEYWORD1>
- <KEYWORD1>pchi_7</KEYWORD1>
- <KEYWORD1>pcorr</KEYWORD1>
- <KEYWORD1>pctile</KEYWORD1>
- <KEYWORD1>pentium</KEYWORD1>
- <KEYWORD1>pergram</KEYWORD1>
- <KEYWORD1>pergram_7</KEYWORD1>
- <KEYWORD1>permute</KEYWORD1>
- <KEYWORD1>permute_8</KEYWORD1>
- <KEYWORD1>personal</KEYWORD1>
- <KEYWORD1>peto_st</KEYWORD1>
- <KEYWORD1>pkcollapse</KEYWORD1>
- <KEYWORD1>pkcross</KEYWORD1>
- <KEYWORD1>pkequiv</KEYWORD1>
- <KEYWORD1>pkexamine</KEYWORD1>
- <KEYWORD1>pkexamine_7</KEYWORD1>
- <KEYWORD1>pkshape</KEYWORD1>
- <KEYWORD1>pksumm</KEYWORD1>
- <KEYWORD1>pksumm_7</KEYWORD1>
- <KEYWORD1>pl</KEYWORD1>
- <KEYWORD1>playsnd</KEYWORD1>
- <KEYWORD1>plo</KEYWORD1>
- <KEYWORD1>plot</KEYWORD1>
- <KEYWORD1>plug</KEYWORD1>
- <KEYWORD1>plugi</KEYWORD1>
- <KEYWORD1>plugin</KEYWORD1>
- <KEYWORD1>pnorm</KEYWORD1>
- <KEYWORD1>pnorm_7</KEYWORD1>
- <KEYWORD1>poisgof</KEYWORD1>
- <KEYWORD1>poiss_lf</KEYWORD1>
- <KEYWORD1>poiss_sw</KEYWORD1>
- <KEYWORD1>poisso_p</KEYWORD1>
- <KEYWORD1>poisson</KEYWORD1>
- <KEYWORD1>poisson_estat</KEYWORD1>
- <KEYWORD1>pop</KEYWORD1>
- <KEYWORD1>popu</KEYWORD1>
- <KEYWORD1>popup</KEYWORD1>
- <KEYWORD1>post</KEYWORD1>
- <KEYWORD1>postclose</KEYWORD1>
- <KEYWORD1>postfile</KEYWORD1>
- <KEYWORD1>pperron</KEYWORD1>
- <KEYWORD1>pr</KEYWORD1>
- <KEYWORD1>prais</KEYWORD1>
- <KEYWORD1>prais_e</KEYWORD1>
- <KEYWORD1>prais_e2</KEYWORD1>
- <KEYWORD1>prais_p</KEYWORD1>
- <KEYWORD1>pred</KEYWORD1>
- <KEYWORD1>predi</KEYWORD1>
- <KEYWORD1>predic</KEYWORD1>
- <KEYWORD1>predict</KEYWORD1>
- <KEYWORD1>predictnl</KEYWORD1>
- <KEYWORD1>preserve</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>printgr</KEYWORD1>
- <KEYWORD1>priorest</KEYWORD1>
- <KEYWORD1>pro</KEYWORD1>
- <KEYWORD1>prob</KEYWORD1>
- <KEYWORD1>probi</KEYWORD1>
- <KEYWORD1>probit</KEYWORD1>
- <KEYWORD1>probit_estat</KEYWORD1>
- <KEYWORD1>probit_p</KEYWORD1>
- <KEYWORD1>proc_time</KEYWORD1>
- <KEYWORD1>procoverlay</KEYWORD1>
- <KEYWORD1>procrustes</KEYWORD1>
- <KEYWORD1>procrustes_estat</KEYWORD1>
- <KEYWORD1>procrustes_p</KEYWORD1>
- <KEYWORD1>profiler</KEYWORD1>
- <KEYWORD1>prop</KEYWORD1>
- <KEYWORD1>proportion</KEYWORD1>
- <KEYWORD1>prove</KEYWORD1>
- <KEYWORD1>prtest</KEYWORD1>
- <KEYWORD1>prtesti</KEYWORD1>
- <KEYWORD1>push</KEYWORD1>
- <KEYWORD1>pwcorr</KEYWORD1>
- <KEYWORD1>pwd</KEYWORD1>
- <KEYWORD1>q</KEYWORD1>
- <KEYWORD1>qby</KEYWORD1>
- <KEYWORD1>qbys</KEYWORD1>
- <KEYWORD1>qchi</KEYWORD1>
- <KEYWORD1>qchi_7</KEYWORD1>
- <KEYWORD1>qladder</KEYWORD1>
- <KEYWORD1>qladder_7</KEYWORD1>
- <KEYWORD1>qnorm</KEYWORD1>
- <KEYWORD1>qnorm_7</KEYWORD1>
- <KEYWORD1>qqplot</KEYWORD1>
- <KEYWORD1>qqplot_7</KEYWORD1>
- <KEYWORD1>qreg</KEYWORD1>
- <KEYWORD1>qreg_c</KEYWORD1>
- <KEYWORD1>qreg_p</KEYWORD1>
- <KEYWORD1>qreg_sw</KEYWORD1>
- <KEYWORD1>qu</KEYWORD1>
- <KEYWORD1>quadchk</KEYWORD1>
- <KEYWORD1>quantile</KEYWORD1>
- <KEYWORD1>quantile_7</KEYWORD1>
- <KEYWORD1>que</KEYWORD1>
- <KEYWORD1>quer</KEYWORD1>
- <KEYWORD1>query</KEYWORD1>
- <KEYWORD1>qui</KEYWORD1>
- <KEYWORD1>quie</KEYWORD1>
- <KEYWORD1>quiet</KEYWORD1>
- <KEYWORD1>quietl</KEYWORD1>
- <KEYWORD1>quietly</KEYWORD1>
- <KEYWORD1>range</KEYWORD1>
- <KEYWORD1>ranksum</KEYWORD1>
- <KEYWORD1>ratio</KEYWORD1>
- <KEYWORD1>rchart</KEYWORD1>
- <KEYWORD1>rchart_7</KEYWORD1>
- <KEYWORD1>rcof</KEYWORD1>
- <KEYWORD1>rc_spline</KEYWORD1>
- <KEYWORD1>recast</KEYWORD1>
- <KEYWORD1>reg</KEYWORD1>
- <KEYWORD1>reg3</KEYWORD1>
- <KEYWORD1>reg3_p</KEYWORD1>
- <KEYWORD1>regdw</KEYWORD1>
- <KEYWORD1>regr</KEYWORD1>
- <KEYWORD1>regre</KEYWORD1>
- <KEYWORD1>regre_p2</KEYWORD1>
- <KEYWORD1>regres</KEYWORD1>
- <KEYWORD1>regres_p</KEYWORD1>
- <KEYWORD1>regress</KEYWORD1>
- <KEYWORD1>regress_estat</KEYWORD1>
- <KEYWORD1>regriv_p</KEYWORD1>
- <KEYWORD1>remap</KEYWORD1>
- <KEYWORD1>ren</KEYWORD1>
- <KEYWORD1>rena</KEYWORD1>
- <KEYWORD1>renam</KEYWORD1>
- <KEYWORD1>rename</KEYWORD1>
- <KEYWORD1>renpfix</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>reshape</KEYWORD1>
- <KEYWORD1>restore</KEYWORD1>
- <KEYWORD1>ret</KEYWORD1>
- <KEYWORD1>retu</KEYWORD1>
- <KEYWORD1>retur</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>rm</KEYWORD1>
- <KEYWORD1>robvar</KEYWORD1>
- <KEYWORD1>robust</KEYWORD1>
- <KEYWORD1>roccomp</KEYWORD1>
- <KEYWORD1>roccomp_7</KEYWORD1>
- <KEYWORD1>roccomp_8</KEYWORD1>
- <KEYWORD1>rocf_lf</KEYWORD1>
- <KEYWORD1>rocfit</KEYWORD1>
- <KEYWORD1>rocfit_8</KEYWORD1>
- <KEYWORD1>rocgold</KEYWORD1>
- <KEYWORD1>rocplot</KEYWORD1>
- <KEYWORD1>rocplot_7</KEYWORD1>
- <KEYWORD1>roctab</KEYWORD1>
- <KEYWORD1>roctab_7</KEYWORD1>
- <KEYWORD1>rolling</KEYWORD1>
- <KEYWORD1>rologit</KEYWORD1>
- <KEYWORD1>rologit_p</KEYWORD1>
- <KEYWORD1>rot</KEYWORD1>
- <KEYWORD1>rota</KEYWORD1>
- <KEYWORD1>rotat</KEYWORD1>
- <KEYWORD1>rotate</KEYWORD1>
- <KEYWORD1>rotatemat</KEYWORD1>
- <KEYWORD1>rreg</KEYWORD1>
- <KEYWORD1>rreg_p</KEYWORD1>
- <KEYWORD1>rvfplot</KEYWORD1>
- <KEYWORD1>rvfplot_7</KEYWORD1>
- <KEYWORD1>rvpplot</KEYWORD1>
- <KEYWORD1>rvpplot_7</KEYWORD1>
- <KEYWORD1>sa</KEYWORD1>
- <KEYWORD1>safesum</KEYWORD1>
- <KEYWORD1>sample</KEYWORD1>
- <KEYWORD1>sampsi</KEYWORD1>
- <KEYWORD1>savedresults</KEYWORD1>
- <KEYWORD1>saveold</KEYWORD1>
- <KEYWORD1>say</KEYWORD1>
- <KEYWORD1>sc</KEYWORD1>
- <KEYWORD1>sca</KEYWORD1>
- <KEYWORD1>scal</KEYWORD1>
- <KEYWORD1>scala</KEYWORD1>
- <KEYWORD1>scalar</KEYWORD1>
- <KEYWORD1>scatter</KEYWORD1>
- <KEYWORD1>scm_mine</KEYWORD1>
- <KEYWORD1>sco</KEYWORD1>
- <KEYWORD1>scob_lf</KEYWORD1>
- <KEYWORD1>scob_p</KEYWORD1>
- <KEYWORD1>scobi_sw</KEYWORD1>
- <KEYWORD1>scobit</KEYWORD1>
- <KEYWORD1>scor</KEYWORD1>
- <KEYWORD1>score</KEYWORD1>
- <KEYWORD1>scoreplot</KEYWORD1>
- <KEYWORD1>scoreplot_help</KEYWORD1>
- <KEYWORD1>scree</KEYWORD1>
- <KEYWORD1>screeplot</KEYWORD1>
- <KEYWORD1>screeplot_help</KEYWORD1>
- <KEYWORD1>sdtest</KEYWORD1>
- <KEYWORD1>sdtesti</KEYWORD1>
- <KEYWORD1>se</KEYWORD1>
- <KEYWORD1>search</KEYWORD1>
- <KEYWORD1>separate</KEYWORD1>
- <KEYWORD1>seperate</KEYWORD1>
- <KEYWORD1>serrbar</KEYWORD1>
- <KEYWORD1>serrbar_7</KEYWORD1>
- <KEYWORD1>set_defaults</KEYWORD1>
- <KEYWORD1>sfrancia</KEYWORD1>
- <KEYWORD1>sh</KEYWORD1>
- <KEYWORD1>she</KEYWORD1>
- <KEYWORD1>shel</KEYWORD1>
- <KEYWORD1>shewhart</KEYWORD1>
- <KEYWORD1>shewhart_7</KEYWORD1>
- <KEYWORD1>showpoint</KEYWORD1>
- <KEYWORD1>signestimationsample</KEYWORD1>
- <KEYWORD1>signrank</KEYWORD1>
- <KEYWORD1>signtest</KEYWORD1>
- <KEYWORD1>simul</KEYWORD1>
- <KEYWORD1>simul_7</KEYWORD1>
- <KEYWORD1>simulate</KEYWORD1>
- <KEYWORD1>simulate_8</KEYWORD1>
- <KEYWORD1>simulinit</KEYWORD1>
- <KEYWORD1>sktest</KEYWORD1>
- <KEYWORD1>sleep</KEYWORD1>
- <KEYWORD1>slogit</KEYWORD1>
- <KEYWORD1>slogit_d2</KEYWORD1>
- <KEYWORD1>slogit_p</KEYWORD1>
- <KEYWORD1>smooth</KEYWORD1>
- <KEYWORD1>snapspan</KEYWORD1>
- <KEYWORD1>spbase</KEYWORD1>
- <KEYWORD1>spearman</KEYWORD1>
- <KEYWORD1>speedchk1</KEYWORD1>
- <KEYWORD1>speekchk2</KEYWORD1>
- <KEYWORD1>spikeplot</KEYWORD1>
- <KEYWORD1>spikeplot_7</KEYWORD1>
- <KEYWORD1>spikeplt</KEYWORD1>
- <KEYWORD1>spline</KEYWORD1>
- <KEYWORD1>spline_x</KEYWORD1>
- <KEYWORD1>split</KEYWORD1>
- <KEYWORD1>sqreg</KEYWORD1>
- <KEYWORD1>sqreg_p</KEYWORD1>
- <KEYWORD1>sret</KEYWORD1>
- <KEYWORD1>sretu</KEYWORD1>
- <KEYWORD1>sretur</KEYWORD1>
- <KEYWORD1>sreturn</KEYWORD1>
- <KEYWORD1>ssc</KEYWORD1>
- <KEYWORD1>st</KEYWORD1>
- <KEYWORD1>st_ct</KEYWORD1>
- <KEYWORD1>st_hc</KEYWORD1>
- <KEYWORD1>st_hcd</KEYWORD1>
- <KEYWORD1>st_hcd_sh</KEYWORD1>
- <KEYWORD1>st_is</KEYWORD1>
- <KEYWORD1>st_issys</KEYWORD1>
- <KEYWORD1>st_note</KEYWORD1>
- <KEYWORD1>st_promo</KEYWORD1>
- <KEYWORD1>st_set</KEYWORD1>
- <KEYWORD1>st_show</KEYWORD1>
- <KEYWORD1>st_smpl</KEYWORD1>
- <KEYWORD1>st_subid</KEYWORD1>
- <KEYWORD1>stack</KEYWORD1>
- <KEYWORD1>stackdepth</KEYWORD1>
- <KEYWORD1>stackreset</KEYWORD1>
- <KEYWORD1>statsby</KEYWORD1>
- <KEYWORD1>statsby_8</KEYWORD1>
- <KEYWORD1>stbase</KEYWORD1>
- <KEYWORD1>stci</KEYWORD1>
- <KEYWORD1>stci_7</KEYWORD1>
- <KEYWORD1>stcox</KEYWORD1>
- <KEYWORD1>stcox_estat</KEYWORD1>
- <KEYWORD1>stcox_fr</KEYWORD1>
- <KEYWORD1>stcox_fr_ll</KEYWORD1>
- <KEYWORD1>stcox_p</KEYWORD1>
- <KEYWORD1>stcox_sw</KEYWORD1>
- <KEYWORD1>stcoxkm</KEYWORD1>
- <KEYWORD1>stcoxkm_7</KEYWORD1>
- <KEYWORD1>stcstat</KEYWORD1>
- <KEYWORD1>stcurv</KEYWORD1>
- <KEYWORD1>stcurve</KEYWORD1>
- <KEYWORD1>stcurve_7</KEYWORD1>
- <KEYWORD1>stdes</KEYWORD1>
- <KEYWORD1>stem</KEYWORD1>
- <KEYWORD1>stepwise</KEYWORD1>
- <KEYWORD1>stereg</KEYWORD1>
- <KEYWORD1>stfill</KEYWORD1>
- <KEYWORD1>stgen</KEYWORD1>
- <KEYWORD1>stinit</KEYWORD1>
- <KEYWORD1>stir</KEYWORD1>
- <KEYWORD1>stjoin</KEYWORD1>
- <KEYWORD1>stmc</KEYWORD1>
- <KEYWORD1>stmh</KEYWORD1>
- <KEYWORD1>stphplot</KEYWORD1>
- <KEYWORD1>stphplot_7</KEYWORD1>
- <KEYWORD1>stphtest</KEYWORD1>
- <KEYWORD1>stphtest_7</KEYWORD1>
- <KEYWORD1>stptime</KEYWORD1>
- <KEYWORD1>strate</KEYWORD1>
- <KEYWORD1>strate_7</KEYWORD1>
- <KEYWORD1>streg</KEYWORD1>
- <KEYWORD1>streg_sw</KEYWORD1>
- <KEYWORD1>streset</KEYWORD1>
- <KEYWORD1>sts</KEYWORD1>
- <KEYWORD1>sts_7</KEYWORD1>
- <KEYWORD1>stset</KEYWORD1>
- <KEYWORD1>stsplit</KEYWORD1>
- <KEYWORD1>stsum</KEYWORD1>
- <KEYWORD1>sttocc</KEYWORD1>
- <KEYWORD1>sttoct</KEYWORD1>
- <KEYWORD1>stvary</KEYWORD1>
- <KEYWORD1>stweib</KEYWORD1>
- <KEYWORD1>su</KEYWORD1>
- <KEYWORD1>subwin</KEYWORD1>
- <KEYWORD1>suest</KEYWORD1>
- <KEYWORD1>suest_8</KEYWORD1>
- <KEYWORD1>sum</KEYWORD1>
- <KEYWORD1>summ</KEYWORD1>
- <KEYWORD1>summa</KEYWORD1>
- <KEYWORD1>summar</KEYWORD1>
- <KEYWORD1>summari</KEYWORD1>
- <KEYWORD1>summariz</KEYWORD1>
- <KEYWORD1>summarize</KEYWORD1>
- <KEYWORD1>sunflower</KEYWORD1>
- <KEYWORD1>sureg</KEYWORD1>
- <KEYWORD1>survcurv</KEYWORD1>
- <KEYWORD1>survsum</KEYWORD1>
- <KEYWORD1>svar</KEYWORD1>
- <KEYWORD1>svar_p</KEYWORD1>
- <KEYWORD1>svmat</KEYWORD1>
- <KEYWORD1>svy</KEYWORD1>
- <KEYWORD1>svy_disp</KEYWORD1>
- <KEYWORD1>svy_dreg</KEYWORD1>
- <KEYWORD1>svy_est</KEYWORD1>
- <KEYWORD1>svy_est_7</KEYWORD1>
- <KEYWORD1>svy_estat</KEYWORD1>
- <KEYWORD1>svy_get</KEYWORD1>
- <KEYWORD1>svy_gnbreg_p</KEYWORD1>
- <KEYWORD1>svy_head</KEYWORD1>
- <KEYWORD1>svy_header</KEYWORD1>
- <KEYWORD1>svy_heckman_p</KEYWORD1>
- <KEYWORD1>svy_heckprob_p</KEYWORD1>
- <KEYWORD1>svy_intreg_p</KEYWORD1>
- <KEYWORD1>svy_ivreg_p</KEYWORD1>
- <KEYWORD1>svy_logistic_p</KEYWORD1>
- <KEYWORD1>svy_logit_p</KEYWORD1>
- <KEYWORD1>svy_mlogit_p</KEYWORD1>
- <KEYWORD1>svy_nbreg_p</KEYWORD1>
- <KEYWORD1>svy_ologit_p</KEYWORD1>
- <KEYWORD1>svy_oprobit_p</KEYWORD1>
- <KEYWORD1>svy_poisson_p</KEYWORD1>
- <KEYWORD1>svy_probit_p</KEYWORD1>
- <KEYWORD1>svy_regress_p</KEYWORD1>
- <KEYWORD1>svy_sub</KEYWORD1>
- <KEYWORD1>svy_sub_7</KEYWORD1>
- <KEYWORD1>svy_x</KEYWORD1>
- <KEYWORD1>svy_x_7</KEYWORD1>
- <KEYWORD1>svy_x_p</KEYWORD1>
- <KEYWORD1>svydes</KEYWORD1>
- <KEYWORD1>svydes_8</KEYWORD1>
- <KEYWORD1>svygen</KEYWORD1>
- <KEYWORD1>svygnbreg</KEYWORD1>
- <KEYWORD1>svyheckman</KEYWORD1>
- <KEYWORD1>svyheckprob</KEYWORD1>
- <KEYWORD1>svyintreg</KEYWORD1>
- <KEYWORD1>svyintreg_7</KEYWORD1>
- <KEYWORD1>svyintrg</KEYWORD1>
- <KEYWORD1>svyivreg</KEYWORD1>
- <KEYWORD1>svylc</KEYWORD1>
- <KEYWORD1>svylog_p</KEYWORD1>
- <KEYWORD1>svylogit</KEYWORD1>
- <KEYWORD1>svymarkout</KEYWORD1>
- <KEYWORD1>svymarkout_8</KEYWORD1>
- <KEYWORD1>svymean</KEYWORD1>
- <KEYWORD1>svymlog</KEYWORD1>
- <KEYWORD1>svymlogit</KEYWORD1>
- <KEYWORD1>svynbreg</KEYWORD1>
- <KEYWORD1>svyolog</KEYWORD1>
- <KEYWORD1>svyologit</KEYWORD1>
- <KEYWORD1>svyoprob</KEYWORD1>
- <KEYWORD1>svyoprobit</KEYWORD1>
- <KEYWORD1>svyopts</KEYWORD1>
- <KEYWORD1>svypois</KEYWORD1>
- <KEYWORD1>svypois_7</KEYWORD1>
- <KEYWORD1>svypoisson</KEYWORD1>
- <KEYWORD1>svyprobit</KEYWORD1>
- <KEYWORD1>svyprobt</KEYWORD1>
- <KEYWORD1>svyprop</KEYWORD1>
- <KEYWORD1>svyprop_7</KEYWORD1>
- <KEYWORD1>svyratio</KEYWORD1>
- <KEYWORD1>svyreg</KEYWORD1>
- <KEYWORD1>svyreg_p</KEYWORD1>
- <KEYWORD1>svyregress</KEYWORD1>
- <KEYWORD1>svyset</KEYWORD1>
- <KEYWORD1>svyset_7</KEYWORD1>
- <KEYWORD1>svyset_8</KEYWORD1>
- <KEYWORD1>svytab</KEYWORD1>
- <KEYWORD1>svytab_7</KEYWORD1>
- <KEYWORD1>svytest</KEYWORD1>
- <KEYWORD1>svytotal</KEYWORD1>
- <KEYWORD1>sw</KEYWORD1>
- <KEYWORD1>sw_8</KEYWORD1>
- <KEYWORD1>swcnreg</KEYWORD1>
- <KEYWORD1>swcox</KEYWORD1>
- <KEYWORD1>swereg</KEYWORD1>
- <KEYWORD1>swilk</KEYWORD1>
- <KEYWORD1>swlogis</KEYWORD1>
- <KEYWORD1>swlogit</KEYWORD1>
- <KEYWORD1>swologit</KEYWORD1>
- <KEYWORD1>swoprbt</KEYWORD1>
- <KEYWORD1>swpois</KEYWORD1>
- <KEYWORD1>swprobit</KEYWORD1>
- <KEYWORD1>swqreg</KEYWORD1>
- <KEYWORD1>swtobit</KEYWORD1>
- <KEYWORD1>swweib</KEYWORD1>
- <KEYWORD1>symmetry</KEYWORD1>
- <KEYWORD1>symmi</KEYWORD1>
- <KEYWORD1>symplot</KEYWORD1>
- <KEYWORD1>symplot_7</KEYWORD1>
- <KEYWORD1>syntax</KEYWORD1>
- <KEYWORD1>sysdescribe</KEYWORD1>
- <KEYWORD1>sysuse</KEYWORD1>
- <KEYWORD1>szroeter</KEYWORD1>
- <KEYWORD1>ta</KEYWORD1>
- <KEYWORD1>tab</KEYWORD1>
- <KEYWORD1>tab1</KEYWORD1>
- <KEYWORD1>tab2</KEYWORD1>
- <KEYWORD1>tab_or</KEYWORD1>
- <KEYWORD1>tabd</KEYWORD1>
- <KEYWORD1>tabdi</KEYWORD1>
- <KEYWORD1>tabdis</KEYWORD1>
- <KEYWORD1>tabdisp</KEYWORD1>
- <KEYWORD1>tabi</KEYWORD1>
- <KEYWORD1>table</KEYWORD1>
- <KEYWORD1>tabodds</KEYWORD1>
- <KEYWORD1>tabodds_7</KEYWORD1>
- <KEYWORD1>tabstat</KEYWORD1>
- <KEYWORD1>tabu</KEYWORD1>
- <KEYWORD1>tabul</KEYWORD1>
- <KEYWORD1>tabula</KEYWORD1>
- <KEYWORD1>tabulat</KEYWORD1>
- <KEYWORD1>tabulate</KEYWORD1>
- <KEYWORD1>te</KEYWORD1>
- <KEYWORD1>tempfile</KEYWORD1>
- <KEYWORD1>tempname</KEYWORD1>
- <KEYWORD1>tempvar</KEYWORD1>
- <KEYWORD1>tes</KEYWORD1>
- <KEYWORD1>test</KEYWORD1>
- <KEYWORD1>testnl</KEYWORD1>
- <KEYWORD1>testparm</KEYWORD1>
- <KEYWORD1>teststd</KEYWORD1>
- <KEYWORD1>tetrachoric</KEYWORD1>
- <KEYWORD1>time_it</KEYWORD1>
- <KEYWORD1>timer</KEYWORD1>
- <KEYWORD1>tis</KEYWORD1>
- <KEYWORD1>tob</KEYWORD1>
- <KEYWORD1>tobi</KEYWORD1>
- <KEYWORD1>tobit</KEYWORD1>
- <KEYWORD1>tobit_p</KEYWORD1>
- <KEYWORD1>tobit_sw</KEYWORD1>
- <KEYWORD1>token</KEYWORD1>
- <KEYWORD1>tokeni</KEYWORD1>
- <KEYWORD1>tokeniz</KEYWORD1>
- <KEYWORD1>tokenize</KEYWORD1>
- <KEYWORD1>tostring</KEYWORD1>
- <KEYWORD1>total</KEYWORD1>
- <KEYWORD1>touch</KEYWORD1>
- <KEYWORD1>treat_ll</KEYWORD1>
- <KEYWORD1>treatr_p</KEYWORD1>
- <KEYWORD1>treatreg</KEYWORD1>
- <KEYWORD1>trim</KEYWORD1>
- <KEYWORD1>trnb_cons</KEYWORD1>
- <KEYWORD1>trnb_mean</KEYWORD1>
- <KEYWORD1>trpoiss_d2</KEYWORD1>
- <KEYWORD1>trunc_ll</KEYWORD1>
- <KEYWORD1>truncr_p</KEYWORD1>
- <KEYWORD1>truncreg</KEYWORD1>
- <KEYWORD1>tsappend</KEYWORD1>
- <KEYWORD1>tset</KEYWORD1>
- <KEYWORD1>tsfill</KEYWORD1>
- <KEYWORD1>tsline</KEYWORD1>
- <KEYWORD1>tsline_ex</KEYWORD1>
- <KEYWORD1>tsreport</KEYWORD1>
- <KEYWORD1>tsrevar</KEYWORD1>
- <KEYWORD1>tsrline</KEYWORD1>
- <KEYWORD1>tsset</KEYWORD1>
- <KEYWORD1>tssmooth</KEYWORD1>
- <KEYWORD1>tsunab</KEYWORD1>
- <KEYWORD1>ttest</KEYWORD1>
- <KEYWORD1>ttesti</KEYWORD1>
- <KEYWORD1>tut_chk</KEYWORD1>
- <KEYWORD1>tut_wait</KEYWORD1>
- <KEYWORD1>tutorial</KEYWORD1>
- <KEYWORD1>tw</KEYWORD1>
- <KEYWORD1>tware_st</KEYWORD1>
- <KEYWORD1>two</KEYWORD1>
- <KEYWORD1>twoway</KEYWORD1>
- <KEYWORD1>twoway__fpfit_serset</KEYWORD1>
- <KEYWORD1>twoway__function_gen</KEYWORD1>
- <KEYWORD1>twoway__histogram_gen</KEYWORD1>
- <KEYWORD1>twoway__ipoint_serset</KEYWORD1>
- <KEYWORD1>twoway__ipoints_serset</KEYWORD1>
- <KEYWORD1>twoway__kdensity_gen</KEYWORD1>
- <KEYWORD1>twoway__lfit_serset</KEYWORD1>
- <KEYWORD1>twoway__normgen_gen</KEYWORD1>
- <KEYWORD1>twoway__pci_serset</KEYWORD1>
- <KEYWORD1>twoway__qfit_serset</KEYWORD1>
- <KEYWORD1>twoway__scatteri_serset</KEYWORD1>
- <KEYWORD1>twoway__sunflower_gen</KEYWORD1>
- <KEYWORD1>twoway_ksm_serset</KEYWORD1>
- <KEYWORD1>ty</KEYWORD1>
- <KEYWORD1>typ</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
- <KEYWORD1>typeof</KEYWORD1>
- <KEYWORD1>u</KEYWORD1>
- <KEYWORD1>unab</KEYWORD1>
- <KEYWORD1>unabbrev</KEYWORD1>
- <KEYWORD1>unidiff</KEYWORD1>
- <KEYWORD1>update</KEYWORD1>
- <KEYWORD1>us</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
- <KEYWORD1>uselabel</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
- <KEYWORD1>var_mkcompanion</KEYWORD1>
- <KEYWORD1>var_p</KEYWORD1>
- <KEYWORD1>varbasic</KEYWORD1>
- <KEYWORD1>varfcast</KEYWORD1>
- <KEYWORD1>vargranger</KEYWORD1>
- <KEYWORD1>varirf</KEYWORD1>
- <KEYWORD1>varirf_add</KEYWORD1>
- <KEYWORD1>varirf_cgraph</KEYWORD1>
- <KEYWORD1>varirf_create</KEYWORD1>
- <KEYWORD1>varirf_ctable</KEYWORD1>
- <KEYWORD1>varirf_describe</KEYWORD1>
- <KEYWORD1>varirf_dir</KEYWORD1>
- <KEYWORD1>varirf_drop</KEYWORD1>
- <KEYWORD1>varirf_erase</KEYWORD1>
- <KEYWORD1>varirf_graph</KEYWORD1>
- <KEYWORD1>varirf_ograph</KEYWORD1>
- <KEYWORD1>varirf_rename</KEYWORD1>
- <KEYWORD1>varirf_set</KEYWORD1>
- <KEYWORD1>varirf_table</KEYWORD1>
- <KEYWORD1>varlmar</KEYWORD1>
- <KEYWORD1>varnorm</KEYWORD1>
- <KEYWORD1>varsoc</KEYWORD1>
- <KEYWORD1>varstable</KEYWORD1>
- <KEYWORD1>varstable_w</KEYWORD1>
- <KEYWORD1>varstable_w2</KEYWORD1>
- <KEYWORD1>varwle</KEYWORD1>
- <KEYWORD1>vce</KEYWORD1>
- <KEYWORD1>vec</KEYWORD1>
- <KEYWORD1>vec_fevd</KEYWORD1>
- <KEYWORD1>vec_mkphi</KEYWORD1>
- <KEYWORD1>vec_p</KEYWORD1>
- <KEYWORD1>vec_p_w</KEYWORD1>
- <KEYWORD1>vecirf_create</KEYWORD1>
- <KEYWORD1>veclmar</KEYWORD1>
- <KEYWORD1>veclmar_w</KEYWORD1>
- <KEYWORD1>vecnorm</KEYWORD1>
- <KEYWORD1>vecnorm_w</KEYWORD1>
- <KEYWORD1>vecrank</KEYWORD1>
- <KEYWORD1>vecstable</KEYWORD1>
- <KEYWORD1>verinst</KEYWORD1>
- <KEYWORD1>vers</KEYWORD1>
- <KEYWORD1>versi</KEYWORD1>
- <KEYWORD1>versio</KEYWORD1>
- <KEYWORD1>version</KEYWORD1>
- <KEYWORD1>viewsource</KEYWORD1>
- <KEYWORD1>vif</KEYWORD1>
- <KEYWORD1>vwls</KEYWORD1>
- <KEYWORD1>wdatetof</KEYWORD1>
- <KEYWORD1>wdctl</KEYWORD1>
- <KEYWORD1>wdlg</KEYWORD1>
- <KEYWORD1>wdupdate</KEYWORD1>
- <KEYWORD1>webdescribe</KEYWORD1>
- <KEYWORD1>webseek</KEYWORD1>
- <KEYWORD1>webuse</KEYWORD1>
- <KEYWORD1>weib1_lf</KEYWORD1>
- <KEYWORD1>weib2_lf</KEYWORD1>
- <KEYWORD1>weib_lf</KEYWORD1>
- <KEYWORD1>weib_lf0</KEYWORD1>
- <KEYWORD1>weibhet_glf</KEYWORD1>
- <KEYWORD1>weibhet_glf_sh</KEYWORD1>
- <KEYWORD1>weibhet_glfa</KEYWORD1>
- <KEYWORD1>weibhet_glfa_sh</KEYWORD1>
- <KEYWORD1>weibhet_gp</KEYWORD1>
- <KEYWORD1>weibhet_ilf</KEYWORD1>
- <KEYWORD1>weibhet_ilf_sh</KEYWORD1>
- <KEYWORD1>weibhet_ilfa</KEYWORD1>
- <KEYWORD1>weibhet_ilfa_sh</KEYWORD1>
- <KEYWORD1>weibhet_ip</KEYWORD1>
- <KEYWORD1>weibu_sw</KEYWORD1>
- <KEYWORD1>weibul_p</KEYWORD1>
- <KEYWORD1>weibull</KEYWORD1>
- <KEYWORD1>weibull_c</KEYWORD1>
- <KEYWORD1>weibull_s</KEYWORD1>
- <KEYWORD1>weibullhet</KEYWORD1>
- <KEYWORD1>wh</KEYWORD1>
- <KEYWORD1>whelp</KEYWORD1>
- <KEYWORD1>whi</KEYWORD1>
- <KEYWORD1>whic</KEYWORD1>
- <KEYWORD1>which</KEYWORD1>
- <KEYWORD1>who</KEYWORD1>
- <KEYWORD1>wilc_st</KEYWORD1>
- <KEYWORD1>wilcoxon</KEYWORD1>
- <KEYWORD1>win</KEYWORD1>
- <KEYWORD1>wind</KEYWORD1>
- <KEYWORD1>windo</KEYWORD1>
- <KEYWORD1>window</KEYWORD1>
- <KEYWORD1>winexec</KEYWORD1>
- <KEYWORD1>wmenu</KEYWORD1>
- <KEYWORD1>wntestb</KEYWORD1>
- <KEYWORD1>wntestb_7</KEYWORD1>
- <KEYWORD1>wntestq</KEYWORD1>
- <KEYWORD1>xchart</KEYWORD1>
- <KEYWORD1>xchart_7</KEYWORD1>
- <KEYWORD1>xcorr</KEYWORD1>
- <KEYWORD1>xcorr_7</KEYWORD1>
- <KEYWORD1>xi</KEYWORD1>
- <KEYWORD1>xi_6</KEYWORD1>
- <KEYWORD1>xpose</KEYWORD1>
- <KEYWORD1>xt_iis</KEYWORD1>
- <KEYWORD1>xt_tis</KEYWORD1>
- <KEYWORD1>xtab_p</KEYWORD1>
- <KEYWORD1>xtabond</KEYWORD1>
- <KEYWORD1>xtabond2</KEYWORD1>
- <KEYWORD1>xtbin_p</KEYWORD1>
- <KEYWORD1>xtclog</KEYWORD1>
- <KEYWORD1>xtcloglog</KEYWORD1>
- <KEYWORD1>xtcloglog_8</KEYWORD1>
- <KEYWORD1>xtcloglog_d2</KEYWORD1>
- <KEYWORD1>xtcloglog_pa_p</KEYWORD1>
- <KEYWORD1>xtcloglog_re_p</KEYWORD1>
- <KEYWORD1>xtcnt_p</KEYWORD1>
- <KEYWORD1>xtcorr</KEYWORD1>
- <KEYWORD1>xtdata</KEYWORD1>
- <KEYWORD1>xtdes</KEYWORD1>
- <KEYWORD1>xtdpdsys</KEYWORD1>
- <KEYWORD1>xtfisher</KEYWORD1>
- <KEYWORD1>xtfront_p</KEYWORD1>
- <KEYWORD1>xtfrontier</KEYWORD1>
- <KEYWORD1>xtgee</KEYWORD1>
- <KEYWORD1>xtgee_elink</KEYWORD1>
- <KEYWORD1>xtgee_estat</KEYWORD1>
- <KEYWORD1>xtgee_makeivar</KEYWORD1>
- <KEYWORD1>xtgee_p</KEYWORD1>
- <KEYWORD1>xtgee_plink</KEYWORD1>
- <KEYWORD1>xtgls</KEYWORD1>
- <KEYWORD1>xtgls_p</KEYWORD1>
- <KEYWORD1>xthaus</KEYWORD1>
- <KEYWORD1>xthausman</KEYWORD1>
- <KEYWORD1>xtht_p</KEYWORD1>
- <KEYWORD1>xthtaylor</KEYWORD1>
- <KEYWORD1>xtile</KEYWORD1>
- <KEYWORD1>xtint_p</KEYWORD1>
- <KEYWORD1>xtintreg</KEYWORD1>
- <KEYWORD1>xtintreg_8</KEYWORD1>
- <KEYWORD1>xtintreg_d2</KEYWORD1>
- <KEYWORD1>xtintreg_p</KEYWORD1>
- <KEYWORD1>xtivp_1</KEYWORD1>
- <KEYWORD1>xtivp_2</KEYWORD1>
- <KEYWORD1>xtivreg</KEYWORD1>
- <KEYWORD1>xtline</KEYWORD1>
- <KEYWORD1>xtline_ex</KEYWORD1>
- <KEYWORD1>xtlogit</KEYWORD1>
- <KEYWORD1>xtlogit_8</KEYWORD1>
- <KEYWORD1>xtlogit_d2</KEYWORD1>
- <KEYWORD1>xtlogit_fe_p</KEYWORD1>
- <KEYWORD1>xtlogit_pa_p</KEYWORD1>
- <KEYWORD1>xtlogit_re_p</KEYWORD1>
- <KEYWORD1>xtlsdvc</KEYWORD1>
- <KEYWORD1>xtmixed</KEYWORD1>
- <KEYWORD1>xtmixed_estat</KEYWORD1>
- <KEYWORD1>xtmixed_p</KEYWORD1>
- <KEYWORD1>xtnb_fe</KEYWORD1>
- <KEYWORD1>xtnb_lf</KEYWORD1>
- <KEYWORD1>xtnbreg</KEYWORD1>
- <KEYWORD1>xtnbreg_pa_p</KEYWORD1>
- <KEYWORD1>xtnbreg_refe_p</KEYWORD1>
- <KEYWORD1>xtpcse</KEYWORD1>
- <KEYWORD1>xtpcse_p</KEYWORD1>
- <KEYWORD1>xtpois</KEYWORD1>
- <KEYWORD1>xtpoisson</KEYWORD1>
- <KEYWORD1>xtpoisson_d2</KEYWORD1>
- <KEYWORD1>xtpoisson_pa_p</KEYWORD1>
- <KEYWORD1>xtpoisson_refe_p</KEYWORD1>
- <KEYWORD1>xtpred</KEYWORD1>
- <KEYWORD1>xtprobit</KEYWORD1>
- <KEYWORD1>xtprobit_8</KEYWORD1>
- <KEYWORD1>xtprobit_d2</KEYWORD1>
- <KEYWORD1>xtprobit_re_p</KEYWORD1>
- <KEYWORD1>xtps_fe</KEYWORD1>
- <KEYWORD1>xtps_lf</KEYWORD1>
- <KEYWORD1>xtps_ren</KEYWORD1>
- <KEYWORD1>xtps_ren_8</KEYWORD1>
- <KEYWORD1>xtrar_p</KEYWORD1>
- <KEYWORD1>xtrc</KEYWORD1>
- <KEYWORD1>xtrc_p</KEYWORD1>
- <KEYWORD1>xtrch_p</KEYWORD1>
- <KEYWORD1>xtrchh</KEYWORD1>
- <KEYWORD1>xtrefe_p</KEYWORD1>
- <KEYWORD1>xtreg</KEYWORD1>
- <KEYWORD1>xtreg_be</KEYWORD1>
- <KEYWORD1>xtreg_fe</KEYWORD1>
- <KEYWORD1>xtreg_ml</KEYWORD1>
- <KEYWORD1>xtreg_pa_p</KEYWORD1>
- <KEYWORD1>xtreg_re</KEYWORD1>
- <KEYWORD1>xtregar</KEYWORD1>
- <KEYWORD1>xtrere_p</KEYWORD1>
- <KEYWORD1>xtserial</KEYWORD1>
- <KEYWORD1>xtset</KEYWORD1>
- <KEYWORD1>xtsf_ll</KEYWORD1>
- <KEYWORD1>xtsf_llti</KEYWORD1>
- <KEYWORD1>xtsum</KEYWORD1>
- <KEYWORD1>xttab</KEYWORD1>
- <KEYWORD1>xttest0</KEYWORD1>
- <KEYWORD1>xttest2</KEYWORD1>
- <KEYWORD1>xttest3</KEYWORD1>
- <KEYWORD1>xttobit</KEYWORD1>
- <KEYWORD1>xttobit_8</KEYWORD1>
- <KEYWORD1>xttobit_p</KEYWORD1>
- <KEYWORD1>xttrans</KEYWORD1>
- <KEYWORD1>xwin</KEYWORD1>
- <KEYWORD1>xwind</KEYWORD1>
- <KEYWORD1>xwindo</KEYWORD1>
- <KEYWORD1>xwindow</KEYWORD1>
- <KEYWORD1>y_ado</KEYWORD1>
- <KEYWORD1>yx</KEYWORD1>
- <KEYWORD1>yxview__barlike_draw</KEYWORD1>
- <KEYWORD1>yxview_area_draw</KEYWORD1>
- <KEYWORD1>yxview_bar_draw</KEYWORD1>
- <KEYWORD1>yxview_dot_draw</KEYWORD1>
- <KEYWORD1>yxview_dropline_draw</KEYWORD1>
- <KEYWORD1>yxview_function_draw</KEYWORD1>
- <KEYWORD1>yxview_iarrow_draw</KEYWORD1>
- <KEYWORD1>yxview_ilabels_draw</KEYWORD1>
- <KEYWORD1>yxview_normal_draw</KEYWORD1>
- <KEYWORD1>yxview_pcarrow_draw</KEYWORD1>
- <KEYWORD1>yxview_pcbarrow_draw</KEYWORD1>
- <KEYWORD1>yxview_pccapsym_draw</KEYWORD1>
- <KEYWORD1>yxview_pcscatter_draw</KEYWORD1>
- <KEYWORD1>yxview_pcspike_draw</KEYWORD1>
- <KEYWORD1>yxview_rarea_draw</KEYWORD1>
- <KEYWORD1>yxview_rbar_draw</KEYWORD1>
- <KEYWORD1>yxview_rbarm_draw</KEYWORD1>
- <KEYWORD1>yxview_rcap_draw</KEYWORD1>
- <KEYWORD1>yxview_rcapsym_draw</KEYWORD1>
- <KEYWORD1>yxview_rconnected_draw</KEYWORD1>
- <KEYWORD1>yxview_rline_draw</KEYWORD1>
- <KEYWORD1>yxview_rscatter_draw</KEYWORD1>
- <KEYWORD1>yxview_rspike_draw</KEYWORD1>
- <KEYWORD1>yxview_spike_draw</KEYWORD1>
- <KEYWORD1>yxview_sunflower_draw</KEYWORD1>
- <KEYWORD1>zap_s</KEYWORD1>
- <KEYWORD1>zinb</KEYWORD1>
- <KEYWORD1>zinb_llf</KEYWORD1>
- <KEYWORD1>zinb_plf</KEYWORD1>
- <KEYWORD1>zip</KEYWORD1>
- <KEYWORD1>zip_llf</KEYWORD1>
- <KEYWORD1>zip_p</KEYWORD1>
- <KEYWORD1>zip_plf</KEYWORD1>
- <KEYWORD1>zt_ct_5</KEYWORD1>
- <KEYWORD1>zt_hc_5</KEYWORD1>
- <KEYWORD1>zt_hcd_5</KEYWORD1>
- <KEYWORD1>zt_is_5</KEYWORD1>
- <KEYWORD1>zt_iss_5</KEYWORD1>
- <KEYWORD1>zt_sho_5</KEYWORD1>
- <KEYWORD1>zt_smp_5</KEYWORD1>
- <KEYWORD1>ztbase_5</KEYWORD1>
- <KEYWORD1>ztcox_5</KEYWORD1>
- <KEYWORD1>ztdes_5</KEYWORD1>
- <KEYWORD1>ztereg_5</KEYWORD1>
- <KEYWORD1>ztfill_5</KEYWORD1>
- <KEYWORD1>ztgen_5</KEYWORD1>
- <KEYWORD1>ztir_5</KEYWORD1>
- <KEYWORD1>ztjoin_5</KEYWORD1>
- <KEYWORD1>ztnb</KEYWORD1>
- <KEYWORD1>ztnb_p</KEYWORD1>
- <KEYWORD1>ztp</KEYWORD1>
- <KEYWORD1>ztp_p</KEYWORD1>
- <KEYWORD1>zts_5</KEYWORD1>
- <KEYWORD1>ztset_5</KEYWORD1>
- <KEYWORD1>ztspli_5</KEYWORD1>
- <KEYWORD1>ztsum_5</KEYWORD1>
- <KEYWORD1>zttoct_5</KEYWORD1>
- <KEYWORD1>ztvary_5</KEYWORD1>
- <KEYWORD1>ztweib_5</KEYWORD1>
-
-<!-- Survival Model keywords (recent addons ) -->
- <KEYWORD1>basec</KEYWORD1>
- <KEYWORD1>basechazard</KEYWORD1>
- <KEYWORD1>basehc</KEYWORD1>
- <KEYWORD1>bases</KEYWORD1>
- <KEYWORD1>basesurv</KEYWORD1>
- <KEYWORD1>eff</KEYWORD1>
- <KEYWORD1>effects</KEYWORD1>
- <KEYWORD1>esr</KEYWORD1>
- <KEYWORD1>tvc</KEYWORD1>
- <KEYWORD1>strata</KEYWORD1>
- <KEYWORD1>efron</KEYWORD1>
- <KEYWORD1>shared</KEYWORD1>
- <KEYWORD1>sh</KEYWORD1>
- <KEYWORD1>offset</KEYWORD1>
- <KEYWORD1>breslow</KEYWORD1>
- <KEYWORD1>bre</KEYWORD1>
- <KEYWORD1>texp</KEYWORD1>
- <KEYWORD1>exactm</KEYWORD1>
- <KEYWORD1>exactp</KEYWORD1>
- <KEYWORD1>con</KEYWORD1>
- <KEYWORD1>noadjust</KEYWORD1>
- <KEYWORD1>noadj</KEYWORD1>
- <KEYWORD1>noshow</KEYWORD1>
- <KEYWORD1>nosh</KEYWORD1>
- <KEYWORD1>mgale</KEYWORD1>
- <KEYWORD1>mg</KEYWORD1>
- <KEYWORD1>phtest</KEYWORD1>
- <KEYWORD1>sch</KEYWORD1>
- <KEYWORD1>schoenfeld</KEYWORD1>
- <KEYWORD1>scaledsch</KEYWORD1>
- <KEYWORD1>sca</KEYWORD1>
- <KEYWORD1>stphplot</KEYWORD1>
- <KEYWORD1>stcoxkm</KEYWORD1>
- <KEYWORD1>z</KEYWORD1>
- <KEYWORD1>zero</KEYWORD1>
- <KEYWORD1>noneg</KEYWORD1>
- <KEYWORD1>nonegative</KEYWORD1>
- <KEYWORD1>nolnt</KEYWORD1>
- <KEYWORD1>nolntime</KEYWORD1>
- <KEYWORD1>addplot</KEYWORD1>
- <KEYWORD1>ties</KEYWORD1>
- <KEYWORD1>tie</KEYWORD1>
- <KEYWORD1>sep</KEYWORD1>
- <KEYWORD1>separate</KEYWORD1>
-
- <!-- Some add-on ado packages: -->
-
- <KEYWORD1>_gsqelemcount</KEYWORD1>
- <KEYWORD1>_gsqepicount</KEYWORD1>
- <KEYWORD1>_gsqgapcount</KEYWORD1>
- <KEYWORD1>_gsqgaplength</KEYWORD1>
- <KEYWORD1>_gsqitemcount</KEYWORD1>
- <KEYWORD1>_gsqlength</KEYWORD1>
- <KEYWORD1>est2one</KEYWORD1>
- <KEYWORD1>est2rowlbl</KEYWORD1>
- <KEYWORD1>est2tex</KEYWORD1>
- <KEYWORD1>est2vec</KEYWORD1>
- <KEYWORD1>estsimp</KEYWORD1>
- <KEYWORD1>maketex</KEYWORD1>
- <KEYWORD1>matload</KEYWORD1>
- <KEYWORD1>matsave</KEYWORD1>
- <KEYWORD1>newey2</KEYWORD1>
- <KEYWORD1>outtable</KEYWORD1>
- <KEYWORD1>outtable7</KEYWORD1>
- <KEYWORD1>outtex</KEYWORD1>
- <KEYWORD1>outtex6</KEYWORD1>
- <KEYWORD1>relogit</KEYWORD1>
- <KEYWORD1>relogitq</KEYWORD1>
- <KEYWORD1>renvars</KEYWORD1>
- <KEYWORD1>setx</KEYWORD1>
- <KEYWORD1>setxhl</KEYWORD1>
- <KEYWORD1>simqi</KEYWORD1>
- <KEYWORD1>sp_adj</KEYWORD1>
- <KEYWORD1>spbase</KEYWORD1>
- <KEYWORD1>spline</KEYWORD1>
- <KEYWORD1>sqclusterdat</KEYWORD1>
- <KEYWORD1>sqclustermat</KEYWORD1>
- <KEYWORD1>sqdes</KEYWORD1>
- <KEYWORD1>sqindexplot</KEYWORD1>
- <KEYWORD1>sqom</KEYWORD1>
- <KEYWORD1>sqparcoord</KEYWORD1>
- <KEYWORD1>sqset</KEYWORD1>
- <KEYWORD1>sqstatlist</KEYWORD1>
- <KEYWORD1>sqstatsum</KEYWORD1>
- <KEYWORD1>sqstattab1</KEYWORD1>
- <KEYWORD1>sqstattab2</KEYWORD1>
- <KEYWORD1>sqstattabsum</KEYWORD1>
- <KEYWORD1>sqtab</KEYWORD1>
- <KEYWORD1>sumqi</KEYWORD1>
- <KEYWORD1>sutex</KEYWORD1>
- <KEYWORD1>sutex6</KEYWORD1>
- <KEYWORD1>tlogit</KEYWORD1>
- <KEYWORD1>xtfevd</KEYWORD1>
- <KEYWORD1>xtserial</KEYWORD1>
- <KEYWORD1>xttest1</KEYWORD1>
-
- <!-- options: -->
-
- <KEYWORD1>nokeep</KEYWORD1>
- <KEYWORD1>fe</KEYWORD1>
- <KEYWORD1>re</KEYWORD1>
- <KEYWORD1>pairwise</KEYWORD1>
- <KEYWORD1>gmm</KEYWORD1>
- <KEYWORD1>distribution</KEYWORD1>
- <KEYWORD1>loglogistic</KEYWORD1>
- <KEYWORD1>lognormal</KEYWORD1>
- <KEYWORD1>exponential</KEYWORD1>
- <KEYWORD1>nohr</KEYWORD1>
- <KEYWORD1>schoenfeld</KEYWORD1>
- <KEYWORD1>scaledsch</KEYWORD1>
- <KEYWORD1>basechazard</KEYWORD1>
- <KEYWORD1>basesurv</KEYWORD1>
- <KEYWORD1>basehc</KEYWORD1>
- <KEYWORD1>esr</KEYWORD1>
- <KEYWORD1>time0</KEYWORD1>
- <KEYWORD1>origin</KEYWORD1>
-
- <!-- graphing options: -->
- <KEYWORD1>dropline</KEYWORD1>
- <KEYWORD1>bar</KEYWORD1>
- <KEYWORD1>hbar</KEYWORD1>
- <KEYWORD1>allc</KEYWORD1>
- <KEYWORD1>allcategories</KEYWORD1>
- <KEYWORD1>yalt</KEYWORD1>
- <KEYWORD1>xalt</KEYWORD1>
- <KEYWORD1>yalternate</KEYWORD1>
- <KEYWORD1>xalternate</KEYWORD1>
- <KEYWORD1>exclude0</KEYWORD1>
- <KEYWORD1>yrev</KEYWORD1>
- <KEYWORD1>yreverse</KEYWORD1>
- <KEYWORD1>blab</KEYWORD1>
- <KEYWORD1>blabel</KEYWORD1>
- <KEYWORD1>yvar</KEYWORD1>
- <KEYWORD1>yvaroptions</KEYWORD1>
- <KEYWORD1>nolabel</KEYWORD1>
- <KEYWORD1>nolab</KEYWORD1>
- <KEYWORD1>dot</KEYWORD1>
- <KEYWORD1>box</KEYWORD1>
- <KEYWORD1>pie</KEYWORD1>
- <KEYWORD1>combine</KEYWORD1>
- <KEYWORD1>printcolor</KEYWORD1>
- <KEYWORD1>yax</KEYWORD1>
- <KEYWORD1>xax</KEYWORD1>
- <KEYWORD1>yaxis</KEYWORD1>
- <KEYWORD1>xaxis</KEYWORD1>
- <KEYWORD1>legend</KEYWORD1>
- <KEYWORD1>msymbol</KEYWORD1>
- <KEYWORD1>ytic</KEYWORD1>
- <KEYWORD1>xtic</KEYWORD1>
- <KEYWORD1>ytick</KEYWORD1>
- <KEYWORD1>xtick</KEYWORD1>
- <KEYWORD1>lpattern</KEYWORD1>
- <KEYWORD1>ti</KEYWORD1>
- <KEYWORD1>tick</KEYWORD1>
- <KEYWORD1>mlab</KEYWORD1>
- <KEYWORD1>mlabel</KEYWORD1>
- <KEYWORD1>mtick</KEYWORD1>
- <KEYWORD1>mtic</KEYWORD1>
- <KEYWORD1>yscale</KEYWORD1>
- <KEYWORD1>xscale</KEYWORD1>
- <KEYWORD1>tscale</KEYWORD1>
- <KEYWORD1>ysc</KEYWORD1>
- <KEYWORD1>xsc</KEYWORD1>
- <KEYWORD1>tsc</KEYWORD1>
- <KEYWORD1>ylab</KEYWORD1>
- <KEYWORD1>xlab</KEYWORD1>
- <KEYWORD1>ylabel</KEYWORD1>
- <KEYWORD1>xlabel</KEYWORD1>
- <KEYWORD1>yti</KEYWORD1>
- <KEYWORD1>xti</KEYWORD1>
- <KEYWORD1>ytitle</KEYWORD1>
- <KEYWORD1>xtitle</KEYWORD1>
-
- </KEYWORDS>
- </RULES>
-</MODE>
-
-
diff --git a/jEdit/modes/statado.xml b/jEdit/modes/statado.xml
deleted file mode 100644
index b536b77..0000000
--- a/jEdit/modes/statado.xml
+++ /dev/null
@@ -1,2691 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <!--Based on Syntax file for Stata v9.x. and 10.x from the jedit community
- Original by Glenn Hoetker, Updated by Jesse Hamner
- Thanks to Christian Goebel for the global macro highlighting regex
- -->
-
- <!-- You should put the following line into your jedit/modes/catalog file:
- <MODE NAME="stata_do" FILE="statado.xml"
- FILE_NAME_GLOB="*.{do}" />
- -->
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(([\.]?[0-9]+)([eE]?)([-+]*)([0-9]*))|(([0-9]+\.*[0-9]*|\.[0-9]+)([+-]?[eE]?[0-9]+))|((([0-9]+\.[0-9]*|\.[0-9]+))[Ee]?)">
-
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="* " />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
-
-<!-- whitespace: (space and tab) -->
- <WHITESPACE> </WHITESPACE>
- <WHITESPACE> </WHITESPACE>
-
-<!--Comments in two colors-->
- <!-- Line Comment -->
- <EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">*</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">///</EOL_SPAN>
-
- <!-- Multiline comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SEQ TYPE="NULL">)</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="NULL">.</SEQ>
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SEQ TYPE="NULL">]</SEQ>
- <SEQ TYPE="NULL">[</SEQ>
- <SEQ TYPE="NULL">?</SEQ>
-
-<!-- To color quoted strings: -->
- <SPAN TYPE="LITERAL2" NO_LINE_BREAK="FALSE" AT_WORD_START="TRUE">
- <BEGIN>"</BEGIN><END>"</END>
- </SPAN>
-
-<!-- To color variable references and declarations: -->
- <!-- To color declared global variables: -->
- <SEQ_REGEXP TYPE="LITERAL4" HASH_CHAR="$">\$((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
- <!-- To highlight global and local variable declarations: -->
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">local </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">loc </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">loca </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">glo </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">glob </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">globa </MARK_FOLLOWING>
- <MARK_FOLLOWING TYPE="LITERAL4" EXCLUDE_MATCH="FALSE">global </MARK_FOLLOWING>
- <!-- To highlight variables when they are used: -->
- <SPAN TYPE="LITERAL4" NO_LINE_BREAK="TRUE" AT_WORD_START="FALSE">
- <BEGIN>`</BEGIN> <END>'</END>
- </SPAN>
-
-<!-- To Highlight filenames: -->
- <MARK_PREVIOUS TYPE="KEYWORD3">using </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">use </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">save </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">sav </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">xmlsave </MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="KEYWORD3">xmluse </MARK_PREVIOUS>
-
-<!-- The special conditions "set", "do", "run", "sysdir" and "shell" -->
-<!-- Swapped AT_LINE_START="TRUE" for AT_WHITESPACE_END="TRUE" in 2.5.0 -->
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">set </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">do </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">shell </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">sysdir </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">ru </EOL_SPAN>
- <EOL_SPAN TYPE="MARKUP" AT_WHITESPACE_END="TRUE">run </EOL_SPAN>
-
-<!-- This list of keywords owes much to similar files for other editors which
- members of the Stata community have so generously made freely available -->
-
-<!-- Stata is case sensitive, so this mode sets JEdit to be case-sensitive -->
- <KEYWORDS IGNORE_CASE="FALSE">
-
-<!-- First, some Data management and programming keywords: -->
- <KEYWORD2>_estimates</KEYWORD2>
- <KEYWORD2>_return</KEYWORD2>
- <KEYWORD2>accum</KEYWORD2>
- <KEYWORD2>adopath</KEYWORD2>
- <KEYWORD2>ap</KEYWORD2>
- <KEYWORD2>app</KEYWORD2>
- <KEYWORD2>appe</KEYWORD2>
- <KEYWORD2>appen</KEYWORD2>
- <KEYWORD2>append</KEYWORD2>
- <KEYWORD2>args</KEYWORD2>
- <KEYWORD2>break</KEYWORD2>
- <KEYWORD2>by</KEYWORD2>
- <KEYWORD2>byable</KEYWORD2>
- <KEYWORD2>bysort</KEYWORD2>
- <KEYWORD2>class</KEYWORD2>
- <KEYWORD2>capture</KEYWORD2>
- <KEYWORD2>char</KEYWORD2>
- <KEYWORD2>class</KEYWORD2>
- <KEYWORD2>classutil</KEYWORD2>
- <KEYWORD2>comments</KEYWORD2>
- <KEYWORD2>compare</KEYWORD2>
- <KEYWORD2>compress</KEYWORD2>
- <KEYWORD2>confirm</KEYWORD2>
- <KEYWORD2>continue</KEYWORD2>
- <KEYWORD2>creturn</KEYWORD2>
- <KEYWORD2>define</KEYWORD2>
- <KEYWORD2>delimit</KEYWORD2>
- <KEYWORD2>discard</KEYWORD2>
- <KEYWORD2>di</KEYWORD2>
- <KEYWORD2>disp</KEYWORD2>
- <KEYWORD2>display</KEYWORD2>
- <KEYWORD2>dissimilarity</KEYWORD2>
- <KEYWORD2>drop</KEYWORD2>
- <KEYWORD2>eigenvalues</KEYWORD2>
- <KEYWORD2>end</KEYWORD2>
- <KEYWORD2>ereturn</KEYWORD2>
- <KEYWORD2>expand</KEYWORD2>
- <KEYWORD2>file</KEYWORD2>
- <KEYWORD2>findfile</KEYWORD2>
- <KEYWORD2>foreach</KEYWORD2>
- <KEYWORD2>forvalues</KEYWORD2>
- <KEYWORD2>get</KEYWORD2>
- <KEYWORD2>if</KEYWORD2>
- <KEYWORD2>in</KEYWORD2>
- <KEYWORD2>lab</KEYWORD2>
- <KEYWORD2>labe</KEYWORD2>
- <KEYWORD2>label</KEYWORD2>
- <KEYWORD2>loc</KEYWORD2>
- <KEYWORD2>loca</KEYWORD2>
- <KEYWORD2>local</KEYWORD2>
- <KEYWORD2>mer</KEYWORD2>
- <KEYWORD2>merg</KEYWORD2>
- <KEYWORD2>merge</KEYWORD2>
- <KEYWORD2>odbc</KEYWORD2>
- <KEYWORD2>outfix</KEYWORD2>
- <KEYWORD2>program</KEYWORD2>
- <KEYWORD2>properties</KEYWORD2>
- <KEYWORD2>recode</KEYWORD2>
- <KEYWORD2>replace</KEYWORD2>
- <KEYWORD2>return</KEYWORD2>
- <KEYWORD2>rmsg</KEYWORD2>
- <KEYWORD2>rownames</KEYWORD2>
- <KEYWORD2>serset</KEYWORD2>
- <KEYWORD2>so</KEYWORD2>
- <KEYWORD2>sor</KEYWORD2>
- <KEYWORD2>sort</KEYWORD2>
- <KEYWORD2>sortpreserve</KEYWORD2>
- <KEYWORD2>svd</KEYWORD2>
- <KEYWORD2>symeigen</KEYWORD2>
- <KEYWORD2>trace</KEYWORD2>
- <KEYWORD2>unabcmd</KEYWORD2>
- <KEYWORD2>utility</KEYWORD2>
- <KEYWORD2>while</KEYWORD2>
- <KEYWORD2>runtest</KEYWORD2>
-
-<!-- Some display keywords -->
-
- <KEYWORD4>outtex</KEYWORD4>
- <KEYWORD4>outreg</KEYWORD4>
- <KEYWORD4>printf</KEYWORD4>
- <KEYWORD4>count</KEYWORD4>
- <KEYWORD4>describe</KEYWORD4>
- <KEYWORD4>list</KEYWORD4>
- <KEYWORD4>errprintf</KEYWORD4>
- <KEYWORD4>more</KEYWORD4>
- <KEYWORD4>log</KEYWORD4>
- <KEYWORD4>cmdlog</KEYWORD4>
- <KEYWORD4>close</KEYWORD4>
-
-<!-- Some unix-like i/o functions -->
-
- <LITERAL3>dir</LITERAL3>
- <LITERAL3>chdir</LITERAL3>
- <LITERAL3>mkdir</LITERAL3>
- <LITERAL3>rmdir</LITERAL3>
- <LITERAL3>pwd</LITERAL3>
- <LITERAL3>fileexists</LITERAL3>
- <LITERAL3>cat</LITERAL3>
- <LITERAL3>unlink</LITERAL3>
- <LITERAL3>erase</LITERAL3>
- <LITERAL3>ls</LITERAL3>
-
-<!-- a few identifiers and variables -->
- <KEYWORD2>byte</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>long</KEYWORD2>
- <KEYWORD2>float</KEYWORD2>
- <KEYWORD2>double</KEYWORD2>
- <SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="s" AT_WORD_START="TRUE">str(\d+)</SEQ_REGEXP>
- <KEYWORD2>_rc</KEYWORD2>
- <SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="c" AT_WORD_START="TRUE">c\((\w+)\)</SEQ_REGEXP>
-
-<!-- Next the Stata statistics functions from Stata 9: -->
-
- <KEYWORD1>_3dax0</KEYWORD1>
- <KEYWORD1>_3daxmin</KEYWORD1>
- <KEYWORD1>_3daxout</KEYWORD1>
- <KEYWORD1>_3daxtbl</KEYWORD1>
- <KEYWORD1>_3ddflts</KEYWORD1>
- <KEYWORD1>_3dmkdta</KEYWORD1>
- <KEYWORD1>_3dmnmx</KEYWORD1>
- <KEYWORD1>_3dproj</KEYWORD1>
- <KEYWORD1>_3drproj</KEYWORD1>
- <KEYWORD1>_3drshow</KEYWORD1>
- <KEYWORD1>_3dshad</KEYWORD1>
- <KEYWORD1>_3dsvusr</KEYWORD1>
- <KEYWORD1>__GEEBT</KEYWORD1>
- <KEYWORD1>__GEERC</KEYWORD1>
- <KEYWORD1>__GEEUC</KEYWORD1>
- <KEYWORD1>_a_cls_msg</KEYWORD1>
- <KEYWORD1>_ac</KEYWORD1>
- <KEYWORD1>_addgph</KEYWORD1>
- <KEYWORD1>_addl</KEYWORD1>
- <KEYWORD1>_addop</KEYWORD1>
- <KEYWORD1>_adjksm</KEYWORD1>
- <KEYWORD1>_assert</KEYWORD1>
- <KEYWORD1>_assert_mreldif</KEYWORD1>
- <KEYWORD1>_assert_mreldifp</KEYWORD1>
- <KEYWORD1>_assert_mreldifs</KEYWORD1>
- <KEYWORD1>_assert_obs</KEYWORD1>
- <KEYWORD1>_assert_streq</KEYWORD1>
- <KEYWORD1>_at</KEYWORD1>
- <KEYWORD1>_bigtab</KEYWORD1>
- <KEYWORD1>_binperfect</KEYWORD1>
- <KEYWORD1>_binperfout</KEYWORD1>
- <KEYWORD1>_biplotmat</KEYWORD1>
- <KEYWORD1>_brr_sum</KEYWORD1>
- <KEYWORD1>_bs_display</KEYWORD1>
- <KEYWORD1>_bs_sum</KEYWORD1>
- <KEYWORD1>_bsqreg</KEYWORD1>
- <KEYWORD1>_btcmd</KEYWORD1>
- <KEYWORD1>_byobs</KEYWORD1>
- <KEYWORD1>_byoptnotallowed</KEYWORD1>
- <KEYWORD1>_ca_parse_normalize</KEYWORD1>
- <KEYWORD1>_ca_process_mlabel</KEYWORD1>
- <KEYWORD1>_callerr</KEYWORD1>
- <KEYWORD1>_cci</KEYWORD1>
- <KEYWORD1>_check4gropts</KEYWORD1>
- <KEYWORD1>_check_eformopt</KEYWORD1>
- <KEYWORD1>_choice_table</KEYWORD1>
- <KEYWORD1>_ckirfset</KEYWORD1>
- <KEYWORD1>_cknotsvaroi</KEYWORD1>
- <KEYWORD1>_ckvec</KEYWORD1>
- <KEYWORD1>_clsarr2list</KEYWORD1>
- <KEYWORD1>_cmdxel</KEYWORD1>
- <KEYWORD1>_coef_table</KEYWORD1>
- <KEYWORD1>_coef_table_header</KEYWORD1>
- <KEYWORD1>_column</KEYWORD1>
- <KEYWORD1>_confirm_date</KEYWORD1>
- <KEYWORD1>_confirm_number_or_date</KEYWORD1>
- <KEYWORD1>_copy_mat_stripes</KEYWORD1>
- <KEYWORD1>_cpmatnm</KEYWORD1>
- <KEYWORD1>_cr1form</KEYWORD1>
- <KEYWORD1>_cr1invt</KEYWORD1>
- <KEYWORD1>_cr1se</KEYWORD1>
- <KEYWORD1>_cr1t</KEYWORD1>
- <KEYWORD1>_crc2use</KEYWORD1>
- <KEYWORD1>_crc4fld</KEYWORD1>
- <KEYWORD1>_crcacnt</KEYWORD1>
- <KEYWORD1>_crcar1</KEYWORD1>
- <KEYWORD1>_crcause</KEYWORD1>
- <KEYWORD1>_crcbcrt</KEYWORD1>
- <KEYWORD1>_crcbin</KEYWORD1>
- <KEYWORD1>_crcbygr</KEYWORD1>
- <KEYWORD1>_crcchi2</KEYWORD1>
- <KEYWORD1>_crcchkt</KEYWORD1>
- <KEYWORD1>_crcchkw</KEYWORD1>
- <KEYWORD1>_crcci</KEYWORD1>
- <KEYWORD1>_crccip</KEYWORD1>
- <KEYWORD1>_crceprs</KEYWORD1>
- <KEYWORD1>_crcexn1</KEYWORD1>
- <KEYWORD1>_crcexn2</KEYWORD1>
- <KEYWORD1>_crcexn4</KEYWORD1>
- <KEYWORD1>_crcexn5</KEYWORD1>
- <KEYWORD1>_crcexn6</KEYWORD1>
- <KEYWORD1>_crcexn7</KEYWORD1>
- <KEYWORD1>_crcexn8</KEYWORD1>
- <KEYWORD1>_crcexn9</KEYWORD1>
- <KEYWORD1>_crcexna</KEYWORD1>
- <KEYWORD1>_crcexnb</KEYWORD1>
- <KEYWORD1>_crcexnc</KEYWORD1>
- <KEYWORD1>_crcexnd</KEYWORD1>
- <KEYWORD1>_crcexne</KEYWORD1>
- <KEYWORD1>_crcexnf</KEYWORD1>
- <KEYWORD1>_crcexnt</KEYWORD1>
- <KEYWORD1>_crcgldv</KEYWORD1>
- <KEYWORD1>_crcglil</KEYWORD1>
- <KEYWORD1>_crcichi</KEYWORD1>
- <KEYWORD1>_crcird</KEYWORD1>
- <KEYWORD1>_crcirr</KEYWORD1>
- <KEYWORD1>_crcksm</KEYWORD1>
- <KEYWORD1>_crclf</KEYWORD1>
- <KEYWORD1>_crcmeq</KEYWORD1>
- <KEYWORD1>_crcmiss</KEYWORD1>
- <KEYWORD1>_crcnlou</KEYWORD1>
- <KEYWORD1>_crcnms2</KEYWORD1>
- <KEYWORD1>_crcnuse</KEYWORD1>
- <KEYWORD1>_crcor</KEYWORD1>
- <KEYWORD1>_crcphdr</KEYWORD1>
- <KEYWORD1>_crcplst</KEYWORD1>
- <KEYWORD1>_crcra</KEYWORD1>
- <KEYWORD1>_crcrd</KEYWORD1>
- <KEYWORD1>_crcrnfd</KEYWORD1>
- <KEYWORD1>_crcrr</KEYWORD1>
- <KEYWORD1>_crcrsfl</KEYWORD1>
- <KEYWORD1>_crcseq</KEYWORD1>
- <KEYWORD1>_crcshdr</KEYWORD1>
- <KEYWORD1>_crcslbl</KEYWORD1>
- <KEYWORD1>_crcsrv2</KEYWORD1>
- <KEYWORD1>_crcsrvc</KEYWORD1>
- <KEYWORD1>_crcstep</KEYWORD1>
- <KEYWORD1>_crcswxx</KEYWORD1>
- <KEYWORD1>_crct</KEYWORD1>
- <KEYWORD1>_crctmge</KEYWORD1>
- <KEYWORD1>_crcunab</KEYWORD1>
- <KEYWORD1>_crcunit</KEYWORD1>
- <KEYWORD1>_crcvarl</KEYWORD1>
- <KEYWORD1>_crcwsrv</KEYWORD1>
- <KEYWORD1>_crczsku</KEYWORD1>
- <KEYWORD1>_cu_c0</KEYWORD1>
- <KEYWORD1>_cvar</KEYWORD1>
- <KEYWORD1>_date2elapsed</KEYWORD1>
- <KEYWORD1>_diag2mat</KEYWORD1>
- <KEYWORD1>_diparm</KEYWORD1>
- <KEYWORD1>_diparm_8</KEYWORD1>
- <KEYWORD1>_dm_create</KEYWORD1>
- <KEYWORD1>_dots</KEYWORD1>
- <KEYWORD1>_e2r</KEYWORD1>
- <KEYWORD1>_egennoby</KEYWORD1>
- <KEYWORD1>_evlist</KEYWORD1>
- <KEYWORD1>_exp_list_expand</KEYWORD1>
- <KEYWORD1>_exp_list_parse</KEYWORD1>
- <KEYWORD1>_find_tsops</KEYWORD1>
- <KEYWORD1>_fr_area_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_aspect_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_draw_rect</KEYWORD1>
- <KEYWORD1>_fr_droplines_draw</KEYWORD1>
- <KEYWORD1>_fr_erasearr</KEYWORD1>
- <KEYWORD1>_fr_legend_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_merged_implicit</KEYWORD1>
- <KEYWORD1>_fr_runlog</KEYWORD1>
- <KEYWORD1>_fr_sztextbox_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_tbstyle_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_tedits_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_textbox_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_title_parse_and_log</KEYWORD1>
- <KEYWORD1>_fr_x_log_cleanup</KEYWORD1>
- <KEYWORD1>_fr_x_log_create</KEYWORD1>
- <KEYWORD1>_fracchk</KEYWORD1>
- <KEYWORD1>_fraccox</KEYWORD1>
- <KEYWORD1>_fracddp</KEYWORD1>
- <KEYWORD1>_fracdis</KEYWORD1>
- <KEYWORD1>_fracdv</KEYWORD1>
- <KEYWORD1>_fracin</KEYWORD1>
- <KEYWORD1>_fracmdp</KEYWORD1>
- <KEYWORD1>_fracord</KEYWORD1>
- <KEYWORD1>_fracpp</KEYWORD1>
- <KEYWORD1>_fracpv</KEYWORD1>
- <KEYWORD1>_fracrep</KEYWORD1>
- <KEYWORD1>_fracwgt</KEYWORD1>
- <KEYWORD1>_fracxo</KEYWORD1>
- <KEYWORD1>_frr_sztextbox_pnl</KEYWORD1>
- <KEYWORD1>_gany</KEYWORD1>
- <KEYWORD1>_ganycount</KEYWORD1>
- <KEYWORD1>_ganymatch</KEYWORD1>
- <KEYWORD1>_ganyvalue</KEYWORD1>
- <KEYWORD1>_gconcat</KEYWORD1>
- <KEYWORD1>_gcount</KEYWORD1>
- <KEYWORD1>_gcut</KEYWORD1>
- <KEYWORD1>_gdiff</KEYWORD1>
- <KEYWORD1>_gends</KEYWORD1>
- <KEYWORD1>_geqany</KEYWORD1>
- <KEYWORD1>_get_diparmopts</KEYWORD1>
- <KEYWORD1>_get_diparmopts_8</KEYWORD1>
- <KEYWORD1>_get_eformopts</KEYWORD1>
- <KEYWORD1>_get_eqspec</KEYWORD1>
- <KEYWORD1>_get_gropts</KEYWORD1>
- <KEYWORD1>_get_irf</KEYWORD1>
- <KEYWORD1>_get_offopt</KEYWORD1>
- <KEYWORD1>_getbv</KEYWORD1>
- <KEYWORD1>_getcovcorr</KEYWORD1>
- <KEYWORD1>_getfilename</KEYWORD1>
- <KEYWORD1>_getnewlabelname</KEYWORD1>
- <KEYWORD1>_getrhs</KEYWORD1>
- <KEYWORD1>_getrres</KEYWORD1>
- <KEYWORD1>_getvarcns</KEYWORD1>
- <KEYWORD1>_getxel</KEYWORD1>
- <KEYWORD1>_getxel2</KEYWORD1>
- <KEYWORD1>_gfill</KEYWORD1>
- <KEYWORD1>_ggroup</KEYWORD1>
- <KEYWORD1>_giqr</KEYWORD1>
- <KEYWORD1>_gkurt</KEYWORD1>
- <KEYWORD1>_gladder</KEYWORD1>
- <KEYWORD1>_glmfl</KEYWORD1>
- <KEYWORD1>_glmilnk</KEYWORD1>
- <KEYWORD1>_glmmapf</KEYWORD1>
- <KEYWORD1>_glmmapl</KEYWORD1>
- <KEYWORD1>_glmresd</KEYWORD1>
- <KEYWORD1>_glmrpt</KEYWORD1>
- <KEYWORD1>_glmwgt</KEYWORD1>
- <KEYWORD1>_gm_edit</KEYWORD1>
- <KEYWORD1>_gm_log</KEYWORD1>
- <KEYWORD1>_gma</KEYWORD1>
- <KEYWORD1>_gmad</KEYWORD1>
- <KEYWORD1>_gmax</KEYWORD1>
- <KEYWORD1>_gmdev</KEYWORD1>
- <KEYWORD1>_gmdmean</KEYWORD1>
- <KEYWORD1>_gmdmed</KEYWORD1>
- <KEYWORD1>_gmean</KEYWORD1>
- <KEYWORD1>_gmedian</KEYWORD1>
- <KEYWORD1>_gmin</KEYWORD1>
- <KEYWORD1>_gmode</KEYWORD1>
- <KEYWORD1>_gmtr</KEYWORD1>
- <KEYWORD1>_gneqany</KEYWORD1>
- <KEYWORD1>_gpc</KEYWORD1>
- <KEYWORD1>_gpctile</KEYWORD1>
- <KEYWORD1>_gr_arrowhead</KEYWORD1>
- <KEYWORD1>_gr_atomize_styles</KEYWORD1>
- <KEYWORD1>_gr_common_axes</KEYWORD1>
- <KEYWORD1>_gr_drawrect</KEYWORD1>
- <KEYWORD1>_gr_linkstyles</KEYWORD1>
- <KEYWORD1>_gr_symbol_of</KEYWORD1>
- <KEYWORD1>_grank</KEYWORD1>
- <KEYWORD1>_grank2</KEYWORD1>
- <KEYWORD1>_grfirst</KEYWORD1>
- <KEYWORD1>_grlast</KEYWORD1>
- <KEYWORD1>_grmax</KEYWORD1>
- <KEYWORD1>_grmean</KEYWORD1>
- <KEYWORD1>_grmin</KEYWORD1>
- <KEYWORD1>_grmiss</KEYWORD1>
- <KEYWORD1>_grmiss2</KEYWORD1>
- <KEYWORD1>_grobs</KEYWORD1>
- <KEYWORD1>_growfirst</KEYWORD1>
- <KEYWORD1>_growlast</KEYWORD1>
- <KEYWORD1>_growmax</KEYWORD1>
- <KEYWORD1>_growmean</KEYWORD1>
- <KEYWORD1>_growmin</KEYWORD1>
- <KEYWORD1>_growmiss</KEYWORD1>
- <KEYWORD1>_grownonmiss</KEYWORD1>
- <KEYWORD1>_growsd</KEYWORD1>
- <KEYWORD1>_growtotal</KEYWORD1>
- <KEYWORD1>_grsd</KEYWORD1>
- <KEYWORD1>_grsum</KEYWORD1>
- <KEYWORD1>_gs_addgrname</KEYWORD1>
- <KEYWORD1>_gs_bygraph</KEYWORD1>
- <KEYWORD1>_gs_clean_graphlist</KEYWORD1>
- <KEYWORD1>_gs_default_bands</KEYWORD1>
- <KEYWORD1>_gs_islivefile</KEYWORD1>
- <KEYWORD1>_gs_parse_and_log_axoptions</KEYWORD1>
- <KEYWORD1>_gs_parse_and_log_axtitle</KEYWORD1>
- <KEYWORD1>_gs_parse_and_log_lines</KEYWORD1>
- <KEYWORD1>_gs_parse_and_log_tickset</KEYWORD1>
- <KEYWORD1>_gs_rdfilehdr</KEYWORD1>
- <KEYWORD1>_gs_wrfilehdr</KEYWORD1>
- <KEYWORD1>_gs_x_create</KEYWORD1>
- <KEYWORD1>_gsd</KEYWORD1>
- <KEYWORD1>_gseq</KEYWORD1>
- <KEYWORD1>_gskew</KEYWORD1>
- <KEYWORD1>_gsrank</KEYWORD1>
- <KEYWORD1>_gstd</KEYWORD1>
- <KEYWORD1>_gsum</KEYWORD1>
- <KEYWORD1>_gtag</KEYWORD1>
- <KEYWORD1>_gtma</KEYWORD1>
- <KEYWORD1>_gtotal</KEYWORD1>
- <KEYWORD1>_gtrank</KEYWORD1>
- <KEYWORD1>_hadamard_verify</KEYWORD1>
- <KEYWORD1>_hu</KEYWORD1>
- <KEYWORD1>_hub</KEYWORD1>
- <KEYWORD1>_hube</KEYWORD1>
- <KEYWORD1>_huber</KEYWORD1>
- <KEYWORD1>_hw_comp</KEYWORD1>
- <KEYWORD1>_hw_opt_d0</KEYWORD1>
- <KEYWORD1>_hwsa_comp</KEYWORD1>
- <KEYWORD1>_hwsa_opt_d0</KEYWORD1>
- <KEYWORD1>_hwsm_comp</KEYWORD1>
- <KEYWORD1>_hwsm_opt_d0</KEYWORD1>
- <KEYWORD1>_inlist</KEYWORD1>
- <KEYWORD1>_invlist</KEYWORD1>
- <KEYWORD1>_isfit</KEYWORD1>
- <KEYWORD1>_ivreg_project</KEYWORD1>
- <KEYWORD1>_jk_nlegend</KEYWORD1>
- <KEYWORD1>_jk_pseudo</KEYWORD1>
- <KEYWORD1>_jk_sum</KEYWORD1>
- <KEYWORD1>_jprfpdt</KEYWORD1>
- <KEYWORD1>_jprfpdx</KEYWORD1>
- <KEYWORD1>_jprfpfp</KEYWORD1>
- <KEYWORD1>_jprfpgn</KEYWORD1>
- <KEYWORD1>_jprfpin</KEYWORD1>
- <KEYWORD1>_jprfplx</KEYWORD1>
- <KEYWORD1>_jprfpmm</KEYWORD1>
- <KEYWORD1>_jprfppp</KEYWORD1>
- <KEYWORD1>_jprfpre</KEYWORD1>
- <KEYWORD1>_jprfprp</KEYWORD1>
- <KEYWORD1>_jprfpse</KEYWORD1>
- <KEYWORD1>_jprfptp</KEYWORD1>
- <KEYWORD1>_jprfpxo</KEYWORD1>
- <KEYWORD1>_jprglef</KEYWORD1>
- <KEYWORD1>_jprglfl</KEYWORD1>
- <KEYWORD1>_jprglil</KEYWORD1>
- <KEYWORD1>_jprglld</KEYWORD1>
- <KEYWORD1>_jprglwz</KEYWORD1>
- <KEYWORD1>_jprxrpa</KEYWORD1>
- <KEYWORD1>_kalman1</KEYWORD1>
- <KEYWORD1>_ksmwrk</KEYWORD1>
- <KEYWORD1>_labels2names</KEYWORD1>
- <KEYWORD1>_ldrtest</KEYWORD1>
- <KEYWORD1>_linemax</KEYWORD1>
- <KEYWORD1>_line</KEYWORD1>
- <KEYWORD1>_lines</KEYWORD1>
- <KEYWORD1>_loop_brr</KEYWORD1>
- <KEYWORD1>_loop_jknife</KEYWORD1>
- <KEYWORD1>_loop_jknife2</KEYWORD1>
- <KEYWORD1>_loop_jknife_fw</KEYWORD1>
- <KEYWORD1>_loop_jknife_iw</KEYWORD1>
- <KEYWORD1>_loop_rw</KEYWORD1>
- <KEYWORD1>_lrtest7</KEYWORD1>
- <KEYWORD1>_m2matrix</KEYWORD1>
- <KEYWORD1>_m2scalar</KEYWORD1>
- <KEYWORD1>_maked</KEYWORD1>
- <KEYWORD1>_mat_clean_coleq</KEYWORD1>
- <KEYWORD1>_matplot</KEYWORD1>
- <KEYWORD1>_matsort</KEYWORD1>
- <KEYWORD1>_mdisplay</KEYWORD1>
- <KEYWORD1>_mds_classical</KEYWORD1>
- <KEYWORD1>_mds_dataheader</KEYWORD1>
- <KEYWORD1>_mds_display</KEYWORD1>
- <KEYWORD1>_mds_display_classical</KEYWORD1>
- <KEYWORD1>_mds_euclidean</KEYWORD1>
- <KEYWORD1>_mds_parse_dopts</KEYWORD1>
- <KEYWORD1>_mds_parse_method</KEYWORD1>
- <KEYWORD1>_mds_parse_s2d</KEYWORD1>
- <KEYWORD1>_mds_s2d</KEYWORD1>
- <KEYWORD1>_me_der</KEYWORD1>
- <KEYWORD1>_me_der2</KEYWORD1>
- <KEYWORD1>_me_derb</KEYWORD1>
- <KEYWORD1>_me_derd</KEYWORD1>
- <KEYWORD1>_me_l_der</KEYWORD1>
- <KEYWORD1>_me_l_der2</KEYWORD1>
- <KEYWORD1>_mfrmvec</KEYWORD1>
- <KEYWORD1>_mka2</KEYWORD1>
- <KEYWORD1>_mkg</KEYWORD1>
- <KEYWORD1>_mkkmn</KEYWORD1>
- <KEYWORD1>_mksigma</KEYWORD1>
- <KEYWORD1>_mkvec</KEYWORD1>
- <KEYWORD1>_mprobitestimator</KEYWORD1>
- <KEYWORD1>_mtest</KEYWORD1>
- <KEYWORD1>_mvec</KEYWORD1>
- <KEYWORD1>_newey</KEYWORD1>
- <KEYWORD1>_nlout</KEYWORD1>
- <KEYWORD1>_no_estat</KEYWORD1>
- <KEYWORD1>_no_predict</KEYWORD1>
- <KEYWORD1>_nobs</KEYWORD1>
- <KEYWORD1>_on_colon_parse</KEYWORD1>
- <KEYWORD1>_opnum</KEYWORD1>
- <KEYWORD1>_parmlist</KEYWORD1>
- <KEYWORD1>_parse_optexp</KEYWORD1>
- <KEYWORD1>_parsevl</KEYWORD1>
- <KEYWORD1>_parsewt</KEYWORD1>
- <KEYWORD1>_partset</KEYWORD1>
- <KEYWORD1>_pctile</KEYWORD1>
- <KEYWORD1>_pk_p</KEYWORD1>
- <KEYWORD1>_plotpos</KEYWORD1>
- <KEYWORD1>_pred_me</KEYWORD1>
- <KEYWORD1>_pred_missings</KEYWORD1>
- <KEYWORD1>_pred_rules</KEYWORD1>
- <KEYWORD1>_pred_se</KEYWORD1>
- <KEYWORD1>_predict</KEYWORD1>
- <KEYWORD1>_prefix_check4esample</KEYWORD1>
- <KEYWORD1>_prefix_checkopt</KEYWORD1>
- <KEYWORD1>_prefix_clear</KEYWORD1>
- <KEYWORD1>_prefix_command</KEYWORD1>
- <KEYWORD1>_prefix_depvarblocklist</KEYWORD1>
- <KEYWORD1>_prefix_display</KEYWORD1>
- <KEYWORD1>_prefix_expand</KEYWORD1>
- <KEYWORD1>_prefix_explist</KEYWORD1>
- <KEYWORD1>_prefix_footnote</KEYWORD1>
- <KEYWORD1>_prefix_getchars</KEYWORD1>
- <KEYWORD1>_prefix_getmat</KEYWORD1>
- <KEYWORD1>_prefix_legend</KEYWORD1>
- <KEYWORD1>_prefix_mlogit</KEYWORD1>
- <KEYWORD1>_prefix_model_test</KEYWORD1>
- <KEYWORD1>_prefix_note</KEYWORD1>
- <KEYWORD1>_prefix_reject</KEYWORD1>
- <KEYWORD1>_prefix_relabel_eqns</KEYWORD1>
- <KEYWORD1>_prefix_run_error</KEYWORD1>
- <KEYWORD1>_prefix_saving</KEYWORD1>
- <KEYWORD1>_prefix_title</KEYWORD1>
- <KEYWORD1>_prefix_varblocklist</KEYWORD1>
- <KEYWORD1>_prefix_vcenotallowed</KEYWORD1>
- <KEYWORD1>_qreg</KEYWORD1>
- <KEYWORD1>_qregwls</KEYWORD1>
- <KEYWORD1>_qsort_index</KEYWORD1>
- <KEYWORD1>_qsur</KEYWORD1>
- <KEYWORD1>_r2e</KEYWORD1>
- <KEYWORD1>_repart</KEYWORD1>
- <KEYWORD1>_repost</KEYWORD1>
- <KEYWORD1>_resample_warn</KEYWORD1>
- <KEYWORD1>_restore_labels</KEYWORD1>
- <KEYWORD1>_result</KEYWORD1>
- <KEYWORD1>_returnclear</KEYWORD1>
- <KEYWORD1>_rmcoll</KEYWORD1>
- <KEYWORD1>_rmcollright</KEYWORD1>
- <KEYWORD1>_rmdcoll</KEYWORD1>
- <KEYWORD1>_robksm</KEYWORD1>
- <KEYWORD1>_robust</KEYWORD1>
- <KEYWORD1>_robust2</KEYWORD1>
- <KEYWORD1>_roccom1</KEYWORD1>
- <KEYWORD1>_roccom1_8</KEYWORD1>
- <KEYWORD1>_rocsen</KEYWORD1>
- <KEYWORD1>_rotate_clear</KEYWORD1>
- <KEYWORD1>_rotate_text</KEYWORD1>
- <KEYWORD1>_score_spec</KEYWORD1>
- <KEYWORD1>_sep_varsylags</KEYWORD1>
- <KEYWORD1>_set_irf_vars</KEYWORD1>
- <KEYWORD1>_sfran</KEYWORD1>
- <KEYWORD1>_shortenpath</KEYWORD1>
- <KEYWORD1>_sigfm</KEYWORD1>
- <KEYWORD1>_small2dotz</KEYWORD1>
- <KEYWORD1>_stata_internalerror</KEYWORD1>
- <KEYWORD1>_stcurv</KEYWORD1>
- <KEYWORD1>_strip_labels</KEYWORD1>
- <KEYWORD1>_sttrend</KEYWORD1>
- <KEYWORD1>_stubstar2names</KEYWORD1>
- <KEYWORD1>_subchar</KEYWORD1>
- <KEYWORD1>_sum_table</KEYWORD1>
- <KEYWORD1>_sumaccum</KEYWORD1>
- <KEYWORD1>_sunflower_binar</KEYWORD1>
- <KEYWORD1>_svar_cnsmac</KEYWORD1>
- <KEYWORD1>_svar_eqmac</KEYWORD1>
- <KEYWORD1>_svar_newcns</KEYWORD1>
- <KEYWORD1>_svar_post</KEYWORD1>
- <KEYWORD1>_svard2</KEYWORD1>
- <KEYWORD1>_svariden</KEYWORD1>
- <KEYWORD1>_svaridenlr</KEYWORD1>
- <KEYWORD1>_svarlrd2</KEYWORD1>
- <KEYWORD1>_svd</KEYWORD1>
- <KEYWORD1>_svy</KEYWORD1>
- <KEYWORD1>_svy2</KEYWORD1>
- <KEYWORD1>_svy_check_cmdopts</KEYWORD1>
- <KEYWORD1>_svy_check_fpc</KEYWORD1>
- <KEYWORD1>_svy_check_postw</KEYWORD1>
- <KEYWORD1>_svy_check_predict</KEYWORD1>
- <KEYWORD1>_svy_check_vce</KEYWORD1>
- <KEYWORD1>_svy_fpc_note</KEYWORD1>
- <KEYWORD1>_svy_ftest</KEYWORD1>
- <KEYWORD1>_svy_ivreg_first</KEYWORD1>
- <KEYWORD1>_svy_mkdeff</KEYWORD1>
- <KEYWORD1>_svy_mkmeff</KEYWORD1>
- <KEYWORD1>_svy_mkvmsp</KEYWORD1>
- <KEYWORD1>_svy_mkvsrs</KEYWORD1>
- <KEYWORD1>_svy_newrule</KEYWORD1>
- <KEYWORD1>_svy_setup</KEYWORD1>
- <KEYWORD1>_svy_singleton_note</KEYWORD1>
- <KEYWORD1>_svy_subpop</KEYWORD1>
- <KEYWORD1>_svy_subpop_note</KEYWORD1>
- <KEYWORD1>_svy_summarize</KEYWORD1>
- <KEYWORD1>_svy_summarize_legend</KEYWORD1>
- <KEYWORD1>_svy_tabulate</KEYWORD1>
- <KEYWORD1>_svydes_dlg</KEYWORD1>
- <KEYWORD1>_svylc</KEYWORD1>
- <KEYWORD1>_svyset</KEYWORD1>
- <KEYWORD1>_sw_lik</KEYWORD1>
- <KEYWORD1>_sw_lik2</KEYWORD1>
- <KEYWORD1>_sw_ood</KEYWORD1>
- <KEYWORD1>_ts</KEYWORD1>
- <KEYWORD1>_ts_dexp</KEYWORD1>
- <KEYWORD1>_ts_dsmp</KEYWORD1>
- <KEYWORD1>_ts_exp</KEYWORD1>
- <KEYWORD1>_ts_flag</KEYWORD1>
- <KEYWORD1>_ts_gdat</KEYWORD1>
- <KEYWORD1>_ts_hw</KEYWORD1>
- <KEYWORD1>_ts_hwsa</KEYWORD1>
- <KEYWORD1>_ts_hwsm</KEYWORD1>
- <KEYWORD1>_ts_meqn</KEYWORD1>
- <KEYWORD1>_ts_pars</KEYWORD1>
- <KEYWORD1>_ts_peri</KEYWORD1>
- <KEYWORD1>_tsheadr</KEYWORD1>
- <KEYWORD1>_tsinchk</KEYWORD1>
- <KEYWORD1>_tsma</KEYWORD1>
- <KEYWORD1>_ttest</KEYWORD1>
- <KEYWORD1>_ttest1</KEYWORD1>
- <KEYWORD1>_ttest2</KEYWORD1>
- <KEYWORD1>_tutends</KEYWORD1>
- <KEYWORD1>_tx_mtr1</KEYWORD1>
- <KEYWORD1>_tx_mtr2</KEYWORD1>
- <KEYWORD1>_tx_mtr3</KEYWORD1>
- <KEYWORD1>_tx_mtr4</KEYWORD1>
- <KEYWORD1>_tx_mtr5</KEYWORD1>
- <KEYWORD1>_tx_rpl</KEYWORD1>
- <KEYWORD1>_var_mka</KEYWORD1>
- <KEYWORD1>_varbsf</KEYWORD1>
- <KEYWORD1>_vardisprmse</KEYWORD1>
- <KEYWORD1>_varfcast</KEYWORD1>
- <KEYWORD1>_varfcast_clear</KEYWORD1>
- <KEYWORD1>_varfcast_fcast</KEYWORD1>
- <KEYWORD1>_varfcast_graph</KEYWORD1>
- <KEYWORD1>_varirf</KEYWORD1>
- <KEYWORD1>_varsim</KEYWORD1>
- <KEYWORD1>_vce_parserun</KEYWORD1>
- <KEYWORD1>_vec_ckgraph</KEYWORD1>
- <KEYWORD1>_vec_dreduced</KEYWORD1>
- <KEYWORD1>_vec_grcroots</KEYWORD1>
- <KEYWORD1>_vec_opck</KEYWORD1>
- <KEYWORD1>_vec_pgparse</KEYWORD1>
- <KEYWORD1>_vec_pgridplots</KEYWORD1>
- <KEYWORD1>_vec_postvar</KEYWORD1>
- <KEYWORD1>_vecauxdisp</KEYWORD1>
- <KEYWORD1>_vecfcast_compute</KEYWORD1>
- <KEYWORD1>_vecfcast_compute_w</KEYWORD1>
- <KEYWORD1>_vecgetacns</KEYWORD1>
- <KEYWORD1>_vecgetcv</KEYWORD1>
- <KEYWORD1>_vecgtn</KEYWORD1>
- <KEYWORD1>_vecmka</KEYWORD1>
- <KEYWORD1>_vecmkapvp</KEYWORD1>
- <KEYWORD1>_vecmkce</KEYWORD1>
- <KEYWORD1>_vecmkgam</KEYWORD1>
- <KEYWORD1>_vecmksi</KEYWORD1>
- <KEYWORD1>_vecmktrend</KEYWORD1>
- <KEYWORD1>_vecortho</KEYWORD1>
- <KEYWORD1>_vecpclean</KEYWORD1>
- <KEYWORD1>_vectparse</KEYWORD1>
- <KEYWORD1>_vecu</KEYWORD1>
- <KEYWORD1>_virf_add</KEYWORD1>
- <KEYWORD1>_virf_char</KEYWORD1>
- <KEYWORD1>_virf_fck</KEYWORD1>
- <KEYWORD1>_virf_mknewfile</KEYWORD1>
- <KEYWORD1>_virf_nlen</KEYWORD1>
- <KEYWORD1>_virf_use</KEYWORD1>
- <KEYWORD1>_wkapm</KEYWORD1>
- <KEYWORD1>_writenum</KEYWORD1>
- <KEYWORD1>_wsrvcrv</KEYWORD1>
- <KEYWORD1>_xtreg_chk_cl</KEYWORD1>
- <KEYWORD1>_xtreg_chk_cl2</KEYWORD1>
- <KEYWORD1>_xtrenorm</KEYWORD1>
- <KEYWORD1>about</KEYWORD1>
- <KEYWORD1>abs</KEYWORD1>
- <KEYWORD1>ac</KEYWORD1>
- <KEYWORD1>ac_7</KEYWORD1>
- <KEYWORD1>acprplot</KEYWORD1>
- <KEYWORD1>acprplot_7</KEYWORD1>
- <KEYWORD1>adjust</KEYWORD1>
- <KEYWORD1>ado</KEYWORD1>
- <KEYWORD1>adopath</KEYWORD1>
- <KEYWORD1>adoupdate</KEYWORD1>
- <KEYWORD1>alpha</KEYWORD1>
- <KEYWORD1>ameans</KEYWORD1>
- <KEYWORD1>an</KEYWORD1>
- <KEYWORD1>ano</KEYWORD1>
- <KEYWORD1>anov</KEYWORD1>
- <KEYWORD1>anova</KEYWORD1>
- <KEYWORD1>anova_estat</KEYWORD1>
- <KEYWORD1>anova_terms</KEYWORD1>
- <KEYWORD1>anovadef</KEYWORD1>
- <KEYWORD1>aorder</KEYWORD1>
- <KEYWORD1>arch</KEYWORD1>
- <KEYWORD1>arch_dr</KEYWORD1>
- <KEYWORD1>arch_estat</KEYWORD1>
- <KEYWORD1>arch_p</KEYWORD1>
- <KEYWORD1>archlm</KEYWORD1>
- <KEYWORD1>areg</KEYWORD1>
- <KEYWORD1>areg_p</KEYWORD1>
- <KEYWORD1>args</KEYWORD1>
- <KEYWORD1>arima</KEYWORD1>
- <KEYWORD1>arima_dr</KEYWORD1>
- <KEYWORD1>arima_estat</KEYWORD1>
- <KEYWORD1>arima_p</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>asmprobit</KEYWORD1>
- <KEYWORD1>asmprobit_estat</KEYWORD1>
- <KEYWORD1>asmprobit_lf</KEYWORD1>
- <KEYWORD1>asmprobit_mfx__dlg</KEYWORD1>
- <KEYWORD1>asmprobit_p</KEYWORD1>
- <KEYWORD1>ass</KEYWORD1>
- <KEYWORD1>asse</KEYWORD1>
- <KEYWORD1>asser</KEYWORD1>
- <KEYWORD1>assert</KEYWORD1>
- <KEYWORD1>avplot</KEYWORD1>
- <KEYWORD1>avplot_7</KEYWORD1>
- <KEYWORD1>avplots</KEYWORD1>
- <KEYWORD1>avplots_7</KEYWORD1>
- <KEYWORD1>bcskew0</KEYWORD1>
- <KEYWORD1>be</KEYWORD1>
- <KEYWORD1>bee</KEYWORD1>
- <KEYWORD1>beep</KEYWORD1>
- <KEYWORD1>bgodfrey</KEYWORD1>
- <KEYWORD1>binreg</KEYWORD1>
- <KEYWORD1>bip0_lf</KEYWORD1>
- <KEYWORD1>bip0_lf7</KEYWORD1>
- <KEYWORD1>biplot</KEYWORD1>
- <KEYWORD1>bipp_lf</KEYWORD1>
- <KEYWORD1>bipp_lf7</KEYWORD1>
- <KEYWORD1>bipr_lf</KEYWORD1>
- <KEYWORD1>bipr_lf7</KEYWORD1>
- <KEYWORD1>bipr_p</KEYWORD1>
- <KEYWORD1>bipr_p7</KEYWORD1>
- <KEYWORD1>biprobit</KEYWORD1>
- <KEYWORD1>biprobit7</KEYWORD1>
- <KEYWORD1>bitest</KEYWORD1>
- <KEYWORD1>bitesti</KEYWORD1>
- <KEYWORD1>bitowt</KEYWORD1>
- <KEYWORD1>blogit</KEYWORD1>
- <KEYWORD1>bmemsize</KEYWORD1>
- <KEYWORD1>boot</KEYWORD1>
- <KEYWORD1>bootsamp</KEYWORD1>
- <KEYWORD1>bootstrap</KEYWORD1>
- <KEYWORD1>bootstrap_8</KEYWORD1>
- <KEYWORD1>boxco_l</KEYWORD1>
- <KEYWORD1>boxco_p</KEYWORD1>
- <KEYWORD1>boxcox</KEYWORD1>
- <KEYWORD1>boxcox_6</KEYWORD1>
- <KEYWORD1>boxcox_p</KEYWORD1>
- <KEYWORD1>bprobit</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>brier</KEYWORD1>
- <KEYWORD1>brr</KEYWORD1>
- <KEYWORD1>brrstat</KEYWORD1>
- <KEYWORD1>bs</KEYWORD1>
- <KEYWORD1>bs_7</KEYWORD1>
- <KEYWORD1>bsampl_w</KEYWORD1>
- <KEYWORD1>bsample</KEYWORD1>
- <KEYWORD1>bsample_7</KEYWORD1>
- <KEYWORD1>bsqreg</KEYWORD1>
- <KEYWORD1>bstat</KEYWORD1>
- <KEYWORD1>bstat_7</KEYWORD1>
- <KEYWORD1>bstat_8</KEYWORD1>
- <KEYWORD1>bstrap</KEYWORD1>
- <KEYWORD1>bstrap_7</KEYWORD1>
- <KEYWORD1>c_local</KEYWORD1>
- <KEYWORD1>ca</KEYWORD1>
- <KEYWORD1>ca_estat</KEYWORD1>
- <KEYWORD1>ca_p</KEYWORD1>
- <KEYWORD1>cabiplot</KEYWORD1>
- <KEYWORD1>camat</KEYWORD1>
- <KEYWORD1>canon</KEYWORD1>
- <KEYWORD1>canon_8</KEYWORD1>
- <KEYWORD1>canon_8_p</KEYWORD1>
- <KEYWORD1>canon_estat</KEYWORD1>
- <KEYWORD1>canon_p</KEYWORD1>
- <KEYWORD1>caprojection</KEYWORD1>
- <KEYWORD1>capture</KEYWORD1>
- <KEYWORD1>cat</KEYWORD1>
- <KEYWORD1>cc</KEYWORD1>
- <KEYWORD1>cchart</KEYWORD1>
- <KEYWORD1>cchart_7</KEYWORD1>
- <KEYWORD1>cci</KEYWORD1>
- <KEYWORD1>cd</KEYWORD1>
- <KEYWORD1>censobs_table</KEYWORD1>
- <KEYWORD1>centile</KEYWORD1>
- <KEYWORD1>cf</KEYWORD1>
- <KEYWORD1>char</KEYWORD1>
- <KEYWORD1>chdir</KEYWORD1>
- <KEYWORD1>checkdlgfiles</KEYWORD1>
- <KEYWORD1>checkestimationsample</KEYWORD1>
- <KEYWORD1>checkhlpfiles</KEYWORD1>
- <KEYWORD1>checksum</KEYWORD1>
- <KEYWORD1>ci</KEYWORD1>
- <KEYWORD1>cii</KEYWORD1>
- <KEYWORD1>cksum</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>clo</KEYWORD1>
- <KEYWORD1>clocal</KEYWORD1>
- <KEYWORD1>clog</KEYWORD1>
- <KEYWORD1>clog_lf</KEYWORD1>
- <KEYWORD1>clog_p</KEYWORD1>
- <KEYWORD1>clogi</KEYWORD1>
- <KEYWORD1>clogi_sw</KEYWORD1>
- <KEYWORD1>clogit</KEYWORD1>
- <KEYWORD1>clogit_lf</KEYWORD1>
- <KEYWORD1>clogit_p</KEYWORD1>
- <KEYWORD1>clogitp</KEYWORD1>
- <KEYWORD1>clogl_sw</KEYWORD1>
- <KEYWORD1>cloglog</KEYWORD1>
- <KEYWORD1>clonevar</KEYWORD1>
- <KEYWORD1>clslistarray</KEYWORD1>
- <KEYWORD1>cluster</KEYWORD1>
- <KEYWORD1>cluster_measures</KEYWORD1>
- <KEYWORD1>cluster_stop</KEYWORD1>
- <KEYWORD1>cluster_tree</KEYWORD1>
- <KEYWORD1>cluster_tree_8</KEYWORD1>
- <KEYWORD1>clustermat</KEYWORD1>
- <KEYWORD1>cnr</KEYWORD1>
- <KEYWORD1>cnre</KEYWORD1>
- <KEYWORD1>cnreg</KEYWORD1>
- <KEYWORD1>cnreg_p</KEYWORD1>
- <KEYWORD1>cnreg_sw</KEYWORD1>
- <KEYWORD1>cnsreg</KEYWORD1>
- <KEYWORD1>codebook</KEYWORD1>
- <KEYWORD1>collaps4</KEYWORD1>
- <KEYWORD1>collapse</KEYWORD1>
- <KEYWORD1>colormult_nb</KEYWORD1>
- <KEYWORD1>colormult_nw</KEYWORD1>
- <KEYWORD1>conf</KEYWORD1>
- <KEYWORD1>confi</KEYWORD1>
- <KEYWORD1>confir</KEYWORD1>
- <KEYWORD1>confirm</KEYWORD1>
- <KEYWORD1>conren</KEYWORD1>
- <KEYWORD1>cons</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>constr</KEYWORD1>
- <KEYWORD1>constra</KEYWORD1>
- <KEYWORD1>constrai</KEYWORD1>
- <KEYWORD1>constrain</KEYWORD1>
- <KEYWORD1>constraint</KEYWORD1>
- <KEYWORD1>contract</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>copyright</KEYWORD1>
- <KEYWORD1>copysource</KEYWORD1>
- <KEYWORD1>cor</KEYWORD1>
- <KEYWORD1>corc</KEYWORD1>
- <KEYWORD1>corr</KEYWORD1>
- <KEYWORD1>corr2data</KEYWORD1>
- <KEYWORD1>corr_anti</KEYWORD1>
- <KEYWORD1>corr_kmo</KEYWORD1>
- <KEYWORD1>corr_smc</KEYWORD1>
- <KEYWORD1>corre</KEYWORD1>
- <KEYWORD1>correl</KEYWORD1>
- <KEYWORD1>correla</KEYWORD1>
- <KEYWORD1>correlat</KEYWORD1>
- <KEYWORD1>correlate</KEYWORD1>
- <KEYWORD1>corrgram</KEYWORD1>
- <KEYWORD1>cou</KEYWORD1>
- <KEYWORD1>coun</KEYWORD1>
- <KEYWORD1>count</KEYWORD1>
- <KEYWORD1>cox</KEYWORD1>
- <KEYWORD1>cox_p</KEYWORD1>
- <KEYWORD1>cox_sw</KEYWORD1>
- <KEYWORD1>coxbase</KEYWORD1>
- <KEYWORD1>coxhaz</KEYWORD1>
- <KEYWORD1>coxvar</KEYWORD1>
- <KEYWORD1>cp</KEYWORD1>
- <KEYWORD1>cprplot</KEYWORD1>
- <KEYWORD1>cprplot_7</KEYWORD1>
- <KEYWORD1>crc</KEYWORD1>
- <KEYWORD1>cross</KEYWORD1>
- <KEYWORD1>cs</KEYWORD1>
- <KEYWORD1>cscript</KEYWORD1>
- <KEYWORD1>cscript_log</KEYWORD1>
- <KEYWORD1>csi</KEYWORD1>
- <KEYWORD1>ct</KEYWORD1>
- <KEYWORD1>ct_is</KEYWORD1>
- <KEYWORD1>ctset</KEYWORD1>
- <KEYWORD1>ctst_5</KEYWORD1>
- <KEYWORD1>ctst_st</KEYWORD1>
- <KEYWORD1>cttost</KEYWORD1>
- <KEYWORD1>cumsp</KEYWORD1>
- <KEYWORD1>cumsp_7</KEYWORD1>
- <KEYWORD1>cumul</KEYWORD1>
- <KEYWORD1>cusum</KEYWORD1>
- <KEYWORD1>cusum_7</KEYWORD1>
- <KEYWORD1>cutil</KEYWORD1>
- <KEYWORD1>d</KEYWORD1>
- <KEYWORD1>datetof</KEYWORD1>
- <KEYWORD1>db</KEYWORD1>
- <KEYWORD1>dbeta</KEYWORD1>
- <KEYWORD1>de</KEYWORD1>
- <KEYWORD1>debug</KEYWORD1>
- <KEYWORD1>debugbuf</KEYWORD1>
- <KEYWORD1>dec</KEYWORD1>
- <KEYWORD1>deco</KEYWORD1>
- <KEYWORD1>decod</KEYWORD1>
- <KEYWORD1>decode</KEYWORD1>
- <KEYWORD1>deff</KEYWORD1>
- <KEYWORD1>des</KEYWORD1>
- <KEYWORD1>desc</KEYWORD1>
- <KEYWORD1>descr</KEYWORD1>
- <KEYWORD1>descri</KEYWORD1>
- <KEYWORD1>describ</KEYWORD1>
- <KEYWORD1>describe</KEYWORD1>
- <KEYWORD1>destring</KEYWORD1>
- <KEYWORD1>dfbeta</KEYWORD1>
- <KEYWORD1>dfgls</KEYWORD1>
- <KEYWORD1>dfuller</KEYWORD1>
- <KEYWORD1>diff</KEYWORD1>
- <KEYWORD1>dir</KEYWORD1>
- <KEYWORD1>dirstats</KEYWORD1>
- <KEYWORD1>discard</KEYWORD1>
- <KEYWORD1>disp_res</KEYWORD1>
- <KEYWORD1>disp_s</KEYWORD1>
- <KEYWORD1>doe</KEYWORD1>
- <KEYWORD1>doed</KEYWORD1>
- <KEYWORD1>doedi</KEYWORD1>
- <KEYWORD1>doedit</KEYWORD1>
- <KEYWORD1>dotplot</KEYWORD1>
- <KEYWORD1>dotplot_7</KEYWORD1>
- <KEYWORD1>dprobit</KEYWORD1>
- <KEYWORD1>drawnorm</KEYWORD1>
- <KEYWORD1>ds</KEYWORD1>
- <KEYWORD1>ds_util</KEYWORD1>
- <KEYWORD1>dstdize</KEYWORD1>
- <KEYWORD1>duplicates</KEYWORD1>
- <KEYWORD1>durbina</KEYWORD1>
- <KEYWORD1>dwstat</KEYWORD1>
- <KEYWORD1>dydx</KEYWORD1>
- <KEYWORD1>dynre</KEYWORD1>
- <KEYWORD1>dynren</KEYWORD1>
- <KEYWORD1>e</KEYWORD1>
- <KEYWORD1>ed</KEYWORD1>
- <KEYWORD1>edi</KEYWORD1>
- <KEYWORD1>edit</KEYWORD1>
- <KEYWORD1>egen</KEYWORD1>
- <KEYWORD1>eivreg</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>emdef</KEYWORD1>
- <KEYWORD1>en</KEYWORD1>
- <KEYWORD1>enc</KEYWORD1>
- <KEYWORD1>enco</KEYWORD1>
- <KEYWORD1>encod</KEYWORD1>
- <KEYWORD1>encode</KEYWORD1>
- <KEYWORD1>enter</KEYWORD1>
- <KEYWORD1>eq</KEYWORD1>
- <KEYWORD1>erase</KEYWORD1>
- <KEYWORD1>ereg</KEYWORD1>
- <KEYWORD1>ereg_lf</KEYWORD1>
- <KEYWORD1>ereg_p</KEYWORD1>
- <KEYWORD1>ereg_sw</KEYWORD1>
- <KEYWORD1>ereghet</KEYWORD1>
- <KEYWORD1>ereghet_glf</KEYWORD1>
- <KEYWORD1>ereghet_glf_sh</KEYWORD1>
- <KEYWORD1>ereghet_gp</KEYWORD1>
- <KEYWORD1>ereghet_ilf</KEYWORD1>
- <KEYWORD1>ereghet_ilf_sh</KEYWORD1>
- <KEYWORD1>ereghet_ip</KEYWORD1>
- <KEYWORD1>err</KEYWORD1>
- <KEYWORD1>erro</KEYWORD1>
- <KEYWORD1>error</KEYWORD1>
- <KEYWORD1>estimates</KEYWORD1>
- <KEYWORD1>estimate</KEYWORD1>
- <KEYWORD1>estimat</KEYWORD1>
- <KEYWORD1>estima</KEYWORD1>
- <KEYWORD1>estim</KEYWORD1>
- <KEYWORD1>esti</KEYWORD1>
- <KEYWORD1>est</KEYWORD1>
- <KEYWORD1>est_cfexist</KEYWORD1>
- <KEYWORD1>est_cfname</KEYWORD1>
- <KEYWORD1>est_clickable</KEYWORD1>
- <KEYWORD1>est_expand</KEYWORD1>
- <KEYWORD1>est_hold</KEYWORD1>
- <KEYWORD1>est_table</KEYWORD1>
- <KEYWORD1>est_unhold</KEYWORD1>
- <KEYWORD1>est_unholdok</KEYWORD1>
- <KEYWORD1>estat</KEYWORD1>
- <KEYWORD1>estat_default</KEYWORD1>
- <KEYWORD1>estat_summ</KEYWORD1>
- <KEYWORD1>estat_vce_only</KEYWORD1>
- <KEYWORD1>esti</KEYWORD1>
- <KEYWORD1>estim</KEYWORD1>
- <KEYWORD1>estima</KEYWORD1>
- <KEYWORD1>estimat</KEYWORD1>
- <KEYWORD1>estimate</KEYWORD1>
- <KEYWORD1>etodow</KEYWORD1>
- <KEYWORD1>etof</KEYWORD1>
- <KEYWORD1>etomdy</KEYWORD1>
- <KEYWORD1>ex</KEYWORD1>
- <KEYWORD1>exec</KEYWORD1>
- <KEYWORD1>execu</KEYWORD1>
- <KEYWORD1>execut</KEYWORD1>
- <KEYWORD1>execute</KEYWORD1>
- <KEYWORD1>exi</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>expandcl</KEYWORD1>
- <KEYWORD1>export</KEYWORD1>
- <KEYWORD1>fac</KEYWORD1>
- <KEYWORD1>fact</KEYWORD1>
- <KEYWORD1>facto</KEYWORD1>
- <KEYWORD1>factor</KEYWORD1>
- <KEYWORD1>factor_estat</KEYWORD1>
- <KEYWORD1>factor_p</KEYWORD1>
- <KEYWORD1>factor_pca_rotated</KEYWORD1>
- <KEYWORD1>factor_rotate</KEYWORD1>
- <KEYWORD1>factormat</KEYWORD1>
- <KEYWORD1>failure</KEYWORD1>
- <KEYWORD1>fcast</KEYWORD1>
- <KEYWORD1>fcast_compute</KEYWORD1>
- <KEYWORD1>fcast_graph</KEYWORD1>
- <KEYWORD1>fft</KEYWORD1>
- <KEYWORD1>fh_st</KEYWORD1>
- <KEYWORD1>fillin</KEYWORD1>
- <KEYWORD1>find_hlp_file</KEYWORD1>
- <KEYWORD1>findit</KEYWORD1>
- <KEYWORD1>findit_7</KEYWORD1>
- <KEYWORD1>fit</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>for5_0</KEYWORD1>
- <KEYWORD1>force</KEYWORD1>
- <KEYWORD1>form</KEYWORD1>
- <KEYWORD1>forma</KEYWORD1>
- <KEYWORD1>format</KEYWORD1>
- <KEYWORD1>fpredict</KEYWORD1>
- <KEYWORD1>frac_154</KEYWORD1>
- <KEYWORD1>frac_adj</KEYWORD1>
- <KEYWORD1>frac_chk</KEYWORD1>
- <KEYWORD1>frac_cox</KEYWORD1>
- <KEYWORD1>frac_ddp</KEYWORD1>
- <KEYWORD1>frac_dis</KEYWORD1>
- <KEYWORD1>frac_dv</KEYWORD1>
- <KEYWORD1>frac_in</KEYWORD1>
- <KEYWORD1>frac_mun</KEYWORD1>
- <KEYWORD1>frac_pp</KEYWORD1>
- <KEYWORD1>frac_pq</KEYWORD1>
- <KEYWORD1>frac_pv</KEYWORD1>
- <KEYWORD1>frac_wgt</KEYWORD1>
- <KEYWORD1>frac_xo</KEYWORD1>
- <KEYWORD1>fracgen</KEYWORD1>
- <KEYWORD1>fracplot</KEYWORD1>
- <KEYWORD1>fracplot_7</KEYWORD1>
- <KEYWORD1>fracpoly</KEYWORD1>
- <KEYWORD1>fracpred</KEYWORD1>
- <KEYWORD1>fron_ex</KEYWORD1>
- <KEYWORD1>fron_hn</KEYWORD1>
- <KEYWORD1>fron_p</KEYWORD1>
- <KEYWORD1>fron_tn</KEYWORD1>
- <KEYWORD1>fron_tn2</KEYWORD1>
- <KEYWORD1>frontier</KEYWORD1>
- <KEYWORD1>ftodate</KEYWORD1>
- <KEYWORD1>ftoe</KEYWORD1>
- <KEYWORD1>ftomdy</KEYWORD1>
- <KEYWORD1>ftowdate</KEYWORD1>
- <KEYWORD1>g</KEYWORD1>
- <KEYWORD1>gamhet_glf</KEYWORD1>
- <KEYWORD1>gamhet_gp</KEYWORD1>
- <KEYWORD1>gamhet_ilf</KEYWORD1>
- <KEYWORD1>gamhet_ip</KEYWORD1>
- <KEYWORD1>gamma</KEYWORD1>
- <KEYWORD1>gamma_d2</KEYWORD1>
- <KEYWORD1>gamma_lf</KEYWORD1>
- <KEYWORD1>gamma_p</KEYWORD1>
- <KEYWORD1>gamma_sw</KEYWORD1>
- <KEYWORD1>gammahet</KEYWORD1>
- <KEYWORD1>gdi_hexagon</KEYWORD1>
- <KEYWORD1>gdi_spokes</KEYWORD1>
- <KEYWORD1>ge</KEYWORD1>
- <KEYWORD1>gen</KEYWORD1>
- <KEYWORD1>gene</KEYWORD1>
- <KEYWORD1>gener</KEYWORD1>
- <KEYWORD1>genera</KEYWORD1>
- <KEYWORD1>generat</KEYWORD1>
- <KEYWORD1>generate</KEYWORD1>
- <KEYWORD1>genrank</KEYWORD1>
- <KEYWORD1>genstd</KEYWORD1>
- <KEYWORD1>genvmean</KEYWORD1>
- <KEYWORD1>gettoken</KEYWORD1>
- <KEYWORD1>gl</KEYWORD1>
- <KEYWORD1>gladder</KEYWORD1>
- <KEYWORD1>gladder_7</KEYWORD1>
- <KEYWORD1>glim_l01</KEYWORD1>
- <KEYWORD1>glim_l02</KEYWORD1>
- <KEYWORD1>glim_l03</KEYWORD1>
- <KEYWORD1>glim_l04</KEYWORD1>
- <KEYWORD1>glim_l05</KEYWORD1>
- <KEYWORD1>glim_l06</KEYWORD1>
- <KEYWORD1>glim_l07</KEYWORD1>
- <KEYWORD1>glim_l08</KEYWORD1>
- <KEYWORD1>glim_l09</KEYWORD1>
- <KEYWORD1>glim_l10</KEYWORD1>
- <KEYWORD1>glim_l11</KEYWORD1>
- <KEYWORD1>glim_l12</KEYWORD1>
- <KEYWORD1>glim_lf</KEYWORD1>
- <KEYWORD1>glim_mu</KEYWORD1>
- <KEYWORD1>glim_nw1</KEYWORD1>
- <KEYWORD1>glim_nw2</KEYWORD1>
- <KEYWORD1>glim_nw3</KEYWORD1>
- <KEYWORD1>glim_p</KEYWORD1>
- <KEYWORD1>glim_v1</KEYWORD1>
- <KEYWORD1>glim_v2</KEYWORD1>
- <KEYWORD1>glim_v3</KEYWORD1>
- <KEYWORD1>glim_v4</KEYWORD1>
- <KEYWORD1>glim_v5</KEYWORD1>
- <KEYWORD1>glim_v6</KEYWORD1>
- <KEYWORD1>glim_v7</KEYWORD1>
- <KEYWORD1>glm</KEYWORD1>
- <KEYWORD1>glm_6</KEYWORD1>
- <KEYWORD1>glm_p</KEYWORD1>
- <KEYWORD1>glm_sw</KEYWORD1>
- <KEYWORD1>glmpred</KEYWORD1>
- <KEYWORD1>glogit</KEYWORD1>
- <KEYWORD1>glogit_8</KEYWORD1>
- <KEYWORD1>glogit_p</KEYWORD1>
- <KEYWORD1>gmeans</KEYWORD1>
- <KEYWORD1>gnbre_lf</KEYWORD1>
- <KEYWORD1>gnbreg</KEYWORD1>
- <KEYWORD1>gnbreg_5</KEYWORD1>
- <KEYWORD1>gnbreg_p</KEYWORD1>
- <KEYWORD1>gomp_lf</KEYWORD1>
- <KEYWORD1>gompe_sw</KEYWORD1>
- <KEYWORD1>gomper_p</KEYWORD1>
- <KEYWORD1>gompertz</KEYWORD1>
- <KEYWORD1>gompertzhet</KEYWORD1>
- <KEYWORD1>gomphet_glf</KEYWORD1>
- <KEYWORD1>gomphet_glf_sh</KEYWORD1>
- <KEYWORD1>gomphet_gp</KEYWORD1>
- <KEYWORD1>gomphet_ilf</KEYWORD1>
- <KEYWORD1>gomphet_ilf_sh</KEYWORD1>
- <KEYWORD1>gomphet_ip</KEYWORD1>
- <KEYWORD1>gph</KEYWORD1>
- <KEYWORD1>gphdot</KEYWORD1>
- <KEYWORD1>gphpen</KEYWORD1>
- <KEYWORD1>gphprint</KEYWORD1>
- <KEYWORD1>gprobi_p</KEYWORD1>
- <KEYWORD1>gprobit</KEYWORD1>
- <KEYWORD1>gprobit_8</KEYWORD1>
- <KEYWORD1>gr</KEYWORD1>
- <KEYWORD1>gr_copy</KEYWORD1>
- <KEYWORD1>gr_current</KEYWORD1>
- <KEYWORD1>gr_db</KEYWORD1>
- <KEYWORD1>gr_describe</KEYWORD1>
- <KEYWORD1>gr_dir</KEYWORD1>
- <KEYWORD1>gr_draw</KEYWORD1>
- <KEYWORD1>gr_draw_replay</KEYWORD1>
- <KEYWORD1>gr_drop</KEYWORD1>
- <KEYWORD1>gr_edit</KEYWORD1>
- <KEYWORD1>gr_editviewopts</KEYWORD1>
- <KEYWORD1>gr_example</KEYWORD1>
- <KEYWORD1>gr_example2</KEYWORD1>
- <KEYWORD1>gr_export</KEYWORD1>
- <KEYWORD1>gr_print</KEYWORD1>
- <KEYWORD1>gr_qscheme</KEYWORD1>
- <KEYWORD1>gr_query</KEYWORD1>
- <KEYWORD1>gr_read</KEYWORD1>
- <KEYWORD1>gr_rename</KEYWORD1>
- <KEYWORD1>gr_replay</KEYWORD1>
- <KEYWORD1>gr_save</KEYWORD1>
- <KEYWORD1>gr_set</KEYWORD1>
- <KEYWORD1>gr_setscheme</KEYWORD1>
- <KEYWORD1>gr_table</KEYWORD1>
- <KEYWORD1>gr_undo</KEYWORD1>
- <KEYWORD1>gr_use</KEYWORD1>
- <KEYWORD1>gra</KEYWORD1>
- <KEYWORD1>grap</KEYWORD1>
- <KEYWORD1>graph</KEYWORD1>
- <KEYWORD1>grebar</KEYWORD1>
- <KEYWORD1>greigen</KEYWORD1>
- <KEYWORD1>greigen_7</KEYWORD1>
- <KEYWORD1>greigen_8</KEYWORD1>
- <KEYWORD1>grmeanby</KEYWORD1>
- <KEYWORD1>grmeanby_7</KEYWORD1>
- <KEYWORD1>gs_fileinfo</KEYWORD1>
- <KEYWORD1>gs_filetype</KEYWORD1>
- <KEYWORD1>gs_graphinfo</KEYWORD1>
- <KEYWORD1>gs_stat</KEYWORD1>
- <KEYWORD1>gsort</KEYWORD1>
- <KEYWORD1>gwood</KEYWORD1>
- <KEYWORD1>h</KEYWORD1>
- <KEYWORD1>hadimvo</KEYWORD1>
- <KEYWORD1>hareg</KEYWORD1>
- <KEYWORD1>hausman</KEYWORD1>
- <KEYWORD1>he</KEYWORD1>
- <KEYWORD1>heck_d2</KEYWORD1>
- <KEYWORD1>heckma_p</KEYWORD1>
- <KEYWORD1>heckman</KEYWORD1>
- <KEYWORD1>heckp_lf</KEYWORD1>
- <KEYWORD1>heckpr_p</KEYWORD1>
- <KEYWORD1>heckprob</KEYWORD1>
- <KEYWORD1>hel</KEYWORD1>
- <KEYWORD1>help</KEYWORD1>
- <KEYWORD1>helpchk</KEYWORD1>
- <KEYWORD1>hereg</KEYWORD1>
- <KEYWORD1>hetpr_lf</KEYWORD1>
- <KEYWORD1>hetpr_p</KEYWORD1>
- <KEYWORD1>hetprob</KEYWORD1>
- <KEYWORD1>hettest</KEYWORD1>
- <KEYWORD1>hilite</KEYWORD1>
- <KEYWORD1>hist</KEYWORD1>
- <KEYWORD1>hist_7</KEYWORD1>
- <KEYWORD1>histogram</KEYWORD1>
- <KEYWORD1>hlogit</KEYWORD1>
- <KEYWORD1>hlu</KEYWORD1>
- <KEYWORD1>hmeans</KEYWORD1>
- <KEYWORD1>hotel</KEYWORD1>
- <KEYWORD1>hotelling</KEYWORD1>
- <KEYWORD1>hprobit</KEYWORD1>
- <KEYWORD1>hreg</KEYWORD1>
- <KEYWORD1>hsearch</KEYWORD1>
- <KEYWORD1>icd9</KEYWORD1>
- <KEYWORD1>icd9_ff</KEYWORD1>
- <KEYWORD1>icd9p</KEYWORD1>
- <KEYWORD1>id</KEYWORD1>
- <KEYWORD1>iis</KEYWORD1>
- <KEYWORD1>impute</KEYWORD1>
- <KEYWORD1>imtest</KEYWORD1>
- <KEYWORD1>inbase</KEYWORD1>
- <KEYWORD1>inf</KEYWORD1>
- <KEYWORD1>infi</KEYWORD1>
- <KEYWORD1>infil</KEYWORD1>
- <KEYWORD1>infile</KEYWORD1>
- <KEYWORD1>infix</KEYWORD1>
- <KEYWORD1>inflate</KEYWORD1>
- <KEYWORD1>inp</KEYWORD1>
- <KEYWORD1>inpu</KEYWORD1>
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD1>ins</KEYWORD1>
- <KEYWORD1>insh</KEYWORD1>
- <KEYWORD1>inshe</KEYWORD1>
- <KEYWORD1>inshee</KEYWORD1>
- <KEYWORD1>insheet</KEYWORD1>
- <KEYWORD1>insp</KEYWORD1>
- <KEYWORD1>inspe</KEYWORD1>
- <KEYWORD1>inspec</KEYWORD1>
- <KEYWORD1>inspect</KEYWORD1>
- <KEYWORD1>integ</KEYWORD1>
- <KEYWORD1>inten</KEYWORD1>
- <KEYWORD1>intreg</KEYWORD1>
- <KEYWORD1>intreg_7</KEYWORD1>
- <KEYWORD1>intreg_p</KEYWORD1>
- <KEYWORD1>intrg2_ll</KEYWORD1>
- <KEYWORD1>intrg_ll</KEYWORD1>
- <KEYWORD1>intrg_ll2</KEYWORD1>
- <KEYWORD1>ipolate</KEYWORD1>
- <KEYWORD1>iqreg</KEYWORD1>
- <KEYWORD1>ir</KEYWORD1>
- <KEYWORD1>irf</KEYWORD1>
- <KEYWORD1>irf_create</KEYWORD1>
- <KEYWORD1>irfm</KEYWORD1>
- <KEYWORD1>iri</KEYWORD1>
- <KEYWORD1>is_svy</KEYWORD1>
- <KEYWORD1>is_svysum</KEYWORD1>
- <KEYWORD1>isid</KEYWORD1>
- <KEYWORD1>istdize</KEYWORD1>
- <KEYWORD1>ivprob_1_lf</KEYWORD1>
- <KEYWORD1>ivprob_lf</KEYWORD1>
- <KEYWORD1>ivprobit</KEYWORD1>
- <KEYWORD1>ivprobit_p</KEYWORD1>
- <KEYWORD1>ivreg</KEYWORD1>
- <KEYWORD1>ivreg_footnote</KEYWORD1>
- <KEYWORD1>ivtob_1_lf</KEYWORD1>
- <KEYWORD1>ivtob_lf</KEYWORD1>
- <KEYWORD1>ivtobit</KEYWORD1>
- <KEYWORD1>ivtobit_p</KEYWORD1>
- <KEYWORD1>jackknife</KEYWORD1>
- <KEYWORD1>jacknife</KEYWORD1>
- <KEYWORD1>jknife</KEYWORD1>
- <KEYWORD1>jknife_6</KEYWORD1>
- <KEYWORD1>jknife_8</KEYWORD1>
- <KEYWORD1>jkstat</KEYWORD1>
- <KEYWORD1>joinby</KEYWORD1>
- <KEYWORD1>kalarma1</KEYWORD1>
- <KEYWORD1>kap</KEYWORD1>
- <KEYWORD1>kap_3</KEYWORD1>
- <KEYWORD1>kapmeier</KEYWORD1>
- <KEYWORD1>kappa</KEYWORD1>
- <KEYWORD1>kapwgt</KEYWORD1>
- <KEYWORD1>kdensity</KEYWORD1>
- <KEYWORD1>kdensity_7</KEYWORD1>
- <KEYWORD1>keep</KEYWORD1>
- <KEYWORD1>ksm</KEYWORD1>
- <KEYWORD1>ksmirnov</KEYWORD1>
- <KEYWORD1>ktau</KEYWORD1>
- <KEYWORD1>kwallis</KEYWORD1>
- <KEYWORD1>l</KEYWORD1>
- <KEYWORD1>la</KEYWORD1>
- <KEYWORD1>labelbook</KEYWORD1>
- <KEYWORD1>ladder</KEYWORD1>
- <KEYWORD1>level</KEYWORD1>
- <KEYWORD1>levels</KEYWORD1>
- <KEYWORD1>levelsof</KEYWORD1>
- <KEYWORD1>leverage</KEYWORD1>
- <KEYWORD1>lfit</KEYWORD1>
- <KEYWORD1>lfit_p</KEYWORD1>
- <KEYWORD1>li</KEYWORD1>
- <KEYWORD1>lincom</KEYWORD1>
- <KEYWORD1>line</KEYWORD1>
- <KEYWORD1>linktest</KEYWORD1>
- <KEYWORD1>lis</KEYWORD1>
- <KEYWORD1>list</KEYWORD1>
- <KEYWORD1>lloghet_glf</KEYWORD1>
- <KEYWORD1>lloghet_glf_sh</KEYWORD1>
- <KEYWORD1>lloghet_gp</KEYWORD1>
- <KEYWORD1>lloghet_ilf</KEYWORD1>
- <KEYWORD1>lloghet_ilf_sh</KEYWORD1>
- <KEYWORD1>lloghet_ip</KEYWORD1>
- <KEYWORD1>llogi_sw</KEYWORD1>
- <KEYWORD1>llogis_p</KEYWORD1>
- <KEYWORD1>llogist</KEYWORD1>
- <KEYWORD1>llogistic</KEYWORD1>
- <KEYWORD1>llogistichet</KEYWORD1>
- <KEYWORD1>lnorm_lf</KEYWORD1>
- <KEYWORD1>lnorm_sw</KEYWORD1>
- <KEYWORD1>lnorma_p</KEYWORD1>
- <KEYWORD1>lnormal</KEYWORD1>
- <KEYWORD1>lnormalhet</KEYWORD1>
- <KEYWORD1>lnormhet_glf</KEYWORD1>
- <KEYWORD1>lnormhet_glf_sh</KEYWORD1>
- <KEYWORD1>lnormhet_gp</KEYWORD1>
- <KEYWORD1>lnormhet_ilf</KEYWORD1>
- <KEYWORD1>lnormhet_ilf_sh</KEYWORD1>
- <KEYWORD1>lnormhet_ip</KEYWORD1>
- <KEYWORD1>lnskew0</KEYWORD1>
- <KEYWORD1>lo</KEYWORD1>
- <KEYWORD1>loadingplot</KEYWORD1>
- <KEYWORD1>logi</KEYWORD1>
- <KEYWORD1>logis_lf</KEYWORD1>
- <KEYWORD1>logistic</KEYWORD1>
- <KEYWORD1>logistic_p</KEYWORD1>
- <KEYWORD1>logit</KEYWORD1>
- <KEYWORD1>logit_estat</KEYWORD1>
- <KEYWORD1>logit_p</KEYWORD1>
- <KEYWORD1>loglogs</KEYWORD1>
- <KEYWORD1>logrank</KEYWORD1>
- <KEYWORD1>loneway</KEYWORD1>
- <KEYWORD1>loo</KEYWORD1>
- <KEYWORD1>look</KEYWORD1>
- <KEYWORD1>lookfor</KEYWORD1>
- <KEYWORD1>looku</KEYWORD1>
- <KEYWORD1>lookup</KEYWORD1>
- <KEYWORD1>lowess</KEYWORD1>
- <KEYWORD1>lowess_7</KEYWORD1>
- <KEYWORD1>lpredict</KEYWORD1>
- <KEYWORD1>lrecomp</KEYWORD1>
- <KEYWORD1>lroc</KEYWORD1>
- <KEYWORD1>lroc_7</KEYWORD1>
- <KEYWORD1>lrtest</KEYWORD1>
- <KEYWORD1>lsens</KEYWORD1>
- <KEYWORD1>lsens_7</KEYWORD1>
- <KEYWORD1>lsens_x</KEYWORD1>
- <KEYWORD1>lstat</KEYWORD1>
- <KEYWORD1>ltable</KEYWORD1>
- <KEYWORD1>ltable_7</KEYWORD1>
- <KEYWORD1>ltriang</KEYWORD1>
- <KEYWORD1>lv</KEYWORD1>
- <KEYWORD1>lvr2plot</KEYWORD1>
- <KEYWORD1>lvr2plot_7</KEYWORD1>
- <KEYWORD1>ma</KEYWORD1>
- <KEYWORD1>mac</KEYWORD1>
- <KEYWORD1>macr</KEYWORD1>
- <KEYWORD1>macro</KEYWORD1>
- <KEYWORD1>makecns</KEYWORD1>
- <KEYWORD1>man</KEYWORD1>
- <KEYWORD1>manova_estat</KEYWORD1>
- <KEYWORD1>manova_p</KEYWORD1>
- <KEYWORD1>mantel</KEYWORD1>
- <KEYWORD1>mark</KEYWORD1>
- <KEYWORD1>markout</KEYWORD1>
- <KEYWORD1>marksample</KEYWORD1>
- <KEYWORD1>mat</KEYWORD1>
- <KEYWORD1>mat_capp</KEYWORD1>
- <KEYWORD1>mat_order</KEYWORD1>
- <KEYWORD1>mat_rapp</KEYWORD1>
- <KEYWORD1>mata_matdescribe</KEYWORD1>
- <KEYWORD1>mata_matsave</KEYWORD1>
- <KEYWORD1>mata_matuse</KEYWORD1>
- <KEYWORD1>matalabel</KEYWORD1>
- <KEYWORD1>matcproc</KEYWORD1>
- <KEYWORD1>matlist</KEYWORD1>
- <KEYWORD1>matname</KEYWORD1>
- <KEYWORD1>matr</KEYWORD1>
- <KEYWORD1>matri</KEYWORD1>
- <KEYWORD1>matrix</KEYWORD1>
- <KEYWORD1>matrix_input__dlg</KEYWORD1>
- <KEYWORD1>matsize</KEYWORD1>
- <KEYWORD1>matstrik</KEYWORD1>
- <KEYWORD1>mcc</KEYWORD1>
- <KEYWORD1>mcci</KEYWORD1>
- <KEYWORD1>md0_</KEYWORD1>
- <KEYWORD1>md1_</KEYWORD1>
- <KEYWORD1>md1debu_</KEYWORD1>
- <KEYWORD1>md1debug_</KEYWORD1>
- <KEYWORD1>md2_</KEYWORD1>
- <KEYWORD1>md2debu_</KEYWORD1>
- <KEYWORD1>md2debug_</KEYWORD1>
- <KEYWORD1>mds</KEYWORD1>
- <KEYWORD1>mds_estat</KEYWORD1>
- <KEYWORD1>mds_p</KEYWORD1>
- <KEYWORD1>mdsconfig</KEYWORD1>
- <KEYWORD1>mdslong</KEYWORD1>
- <KEYWORD1>mdsmat</KEYWORD1>
- <KEYWORD1>mdsshepard</KEYWORD1>
- <KEYWORD1>mdytoe</KEYWORD1>
- <KEYWORD1>mdytof</KEYWORD1>
- <KEYWORD1>me_derd</KEYWORD1>
- <KEYWORD1>mean</KEYWORD1>
- <KEYWORD1>means</KEYWORD1>
- <KEYWORD1>median</KEYWORD1>
- <KEYWORD1>memory</KEYWORD1>
- <KEYWORD1>memsize</KEYWORD1>
- <KEYWORD1>meqparse</KEYWORD1>
- <KEYWORD1>mfp</KEYWORD1>
- <KEYWORD1>mfx</KEYWORD1>
- <KEYWORD1>mhelp</KEYWORD1>
- <KEYWORD1>mhodds</KEYWORD1>
- <KEYWORD1>mixed_ll</KEYWORD1>
- <KEYWORD1>mixed_ll_reparm</KEYWORD1>
- <KEYWORD1>mkassert</KEYWORD1>
- <KEYWORD1>mkdir</KEYWORD1>
- <KEYWORD1>mkmat</KEYWORD1>
- <KEYWORD1>mkspline</KEYWORD1>
- <KEYWORD1>ml</KEYWORD1>
- <KEYWORD1>ml_5</KEYWORD1>
- <KEYWORD1>ml_adjs</KEYWORD1>
- <KEYWORD1>ml_bhhhs</KEYWORD1>
- <KEYWORD1>ml_c_d</KEYWORD1>
- <KEYWORD1>ml_check</KEYWORD1>
- <KEYWORD1>ml_clear</KEYWORD1>
- <KEYWORD1>ml_cnt</KEYWORD1>
- <KEYWORD1>ml_debug</KEYWORD1>
- <KEYWORD1>ml_defd</KEYWORD1>
- <KEYWORD1>ml_e0</KEYWORD1>
- <KEYWORD1>ml_e0_bfgs</KEYWORD1>
- <KEYWORD1>ml_e0_cycle</KEYWORD1>
- <KEYWORD1>ml_e0_dfp</KEYWORD1>
- <KEYWORD1>ml_e0i</KEYWORD1>
- <KEYWORD1>ml_e1</KEYWORD1>
- <KEYWORD1>ml_e1_bfgs</KEYWORD1>
- <KEYWORD1>ml_e1_bhhh</KEYWORD1>
- <KEYWORD1>ml_e1_cycle</KEYWORD1>
- <KEYWORD1>ml_e1_dfp</KEYWORD1>
- <KEYWORD1>ml_e2</KEYWORD1>
- <KEYWORD1>ml_e2_cycle</KEYWORD1>
- <KEYWORD1>ml_ebfg0</KEYWORD1>
- <KEYWORD1>ml_ebfr0</KEYWORD1>
- <KEYWORD1>ml_ebfr1</KEYWORD1>
- <KEYWORD1>ml_ebh0q</KEYWORD1>
- <KEYWORD1>ml_ebhh0</KEYWORD1>
- <KEYWORD1>ml_ebhr0</KEYWORD1>
- <KEYWORD1>ml_ebr0i</KEYWORD1>
- <KEYWORD1>ml_ecr0i</KEYWORD1>
- <KEYWORD1>ml_edfp0</KEYWORD1>
- <KEYWORD1>ml_edfr0</KEYWORD1>
- <KEYWORD1>ml_edfr1</KEYWORD1>
- <KEYWORD1>ml_edr0i</KEYWORD1>
- <KEYWORD1>ml_eds</KEYWORD1>
- <KEYWORD1>ml_eer0i</KEYWORD1>
- <KEYWORD1>ml_egr0i</KEYWORD1>
- <KEYWORD1>ml_elf</KEYWORD1>
- <KEYWORD1>ml_elf_bfgs</KEYWORD1>
- <KEYWORD1>ml_elf_bhhh</KEYWORD1>
- <KEYWORD1>ml_elf_cycle</KEYWORD1>
- <KEYWORD1>ml_elf_dfp</KEYWORD1>
- <KEYWORD1>ml_elfi</KEYWORD1>
- <KEYWORD1>ml_elfs</KEYWORD1>
- <KEYWORD1>ml_enr0i</KEYWORD1>
- <KEYWORD1>ml_enrr0</KEYWORD1>
- <KEYWORD1>ml_erdu0</KEYWORD1>
- <KEYWORD1>ml_erdu0_bfgs</KEYWORD1>
- <KEYWORD1>ml_erdu0_bhhh</KEYWORD1>
- <KEYWORD1>ml_erdu0_bhhhq</KEYWORD1>
- <KEYWORD1>ml_erdu0_cycle</KEYWORD1>
- <KEYWORD1>ml_erdu0_dfp</KEYWORD1>
- <KEYWORD1>ml_erdu0_nrbfgs</KEYWORD1>
- <KEYWORD1>ml_exde</KEYWORD1>
- <KEYWORD1>ml_footnote</KEYWORD1>
- <KEYWORD1>ml_geqnr</KEYWORD1>
- <KEYWORD1>ml_grad0</KEYWORD1>
- <KEYWORD1>ml_graph</KEYWORD1>
- <KEYWORD1>ml_hbhhh</KEYWORD1>
- <KEYWORD1>ml_hd0</KEYWORD1>
- <KEYWORD1>ml_hold</KEYWORD1>
- <KEYWORD1>ml_init</KEYWORD1>
- <KEYWORD1>ml_inv</KEYWORD1>
- <KEYWORD1>ml_log</KEYWORD1>
- <KEYWORD1>ml_max</KEYWORD1>
- <KEYWORD1>ml_mlout</KEYWORD1>
- <KEYWORD1>ml_mlout_8</KEYWORD1>
- <KEYWORD1>ml_model</KEYWORD1>
- <KEYWORD1>ml_nb0</KEYWORD1>
- <KEYWORD1>ml_opt</KEYWORD1>
- <KEYWORD1>ml_p</KEYWORD1>
- <KEYWORD1>ml_plot</KEYWORD1>
- <KEYWORD1>ml_query</KEYWORD1>
- <KEYWORD1>ml_rdgrd</KEYWORD1>
- <KEYWORD1>ml_repor</KEYWORD1>
- <KEYWORD1>ml_s_e</KEYWORD1>
- <KEYWORD1>ml_score</KEYWORD1>
- <KEYWORD1>ml_searc</KEYWORD1>
- <KEYWORD1>ml_technique</KEYWORD1>
- <KEYWORD1>ml_unhold</KEYWORD1>
- <KEYWORD1>mleval</KEYWORD1>
- <KEYWORD1>mlf_</KEYWORD1>
- <KEYWORD1>mlmatsum</KEYWORD1>
- <KEYWORD1>mlog</KEYWORD1>
- <KEYWORD1>mlogi</KEYWORD1>
- <KEYWORD1>mlogit</KEYWORD1>
- <KEYWORD1>mlogit_footnote</KEYWORD1>
- <KEYWORD1>mlogit_p</KEYWORD1>
- <KEYWORD1>mlopts</KEYWORD1>
- <KEYWORD1>mlsum</KEYWORD1>
- <KEYWORD1>mlvecsum</KEYWORD1>
- <KEYWORD1>mmerge</KEYWORD1>
- <KEYWORD1>mnl0_</KEYWORD1>
- <KEYWORD1>mor</KEYWORD1>
- <KEYWORD1>more</KEYWORD1>
- <KEYWORD1>mov</KEYWORD1>
- <KEYWORD1>move</KEYWORD1>
- <KEYWORD1>mprobit</KEYWORD1>
- <KEYWORD1>mprobit_lf</KEYWORD1>
- <KEYWORD1>mprobit_p</KEYWORD1>
- <KEYWORD1>mrdu0_</KEYWORD1>
- <KEYWORD1>mrdu1_</KEYWORD1>
- <KEYWORD1>mvdecode</KEYWORD1>
- <KEYWORD1>mvencode</KEYWORD1>
- <KEYWORD1>mvreg</KEYWORD1>
- <KEYWORD1>mvreg_estat</KEYWORD1>
- <KEYWORD1>n</KEYWORD1>
- <KEYWORD1>nbreg</KEYWORD1>
- <KEYWORD1>nbreg_al</KEYWORD1>
- <KEYWORD1>nbreg_lf</KEYWORD1>
- <KEYWORD1>nbreg_p</KEYWORD1>
- <KEYWORD1>nbreg_sw</KEYWORD1>
- <KEYWORD1>nestreg</KEYWORD1>
- <KEYWORD1>net</KEYWORD1>
- <KEYWORD1>newey</KEYWORD1>
- <KEYWORD1>newey_7</KEYWORD1>
- <KEYWORD1>newey_p</KEYWORD1>
- <KEYWORD1>news</KEYWORD1>
- <KEYWORD1>nl</KEYWORD1>
- <KEYWORD1>nl_7</KEYWORD1>
- <KEYWORD1>nl_9</KEYWORD1>
- <KEYWORD1>nl_9_p</KEYWORD1>
- <KEYWORD1>nl_p</KEYWORD1>
- <KEYWORD1>nl_p_7</KEYWORD1>
- <KEYWORD1>nlcom</KEYWORD1>
- <KEYWORD1>nlcom_p</KEYWORD1>
- <KEYWORD1>nlexp2</KEYWORD1>
- <KEYWORD1>nlexp2_7</KEYWORD1>
- <KEYWORD1>nlexp2a</KEYWORD1>
- <KEYWORD1>nlexp2a_7</KEYWORD1>
- <KEYWORD1>nlexp3</KEYWORD1>
- <KEYWORD1>nlexp3_7</KEYWORD1>
- <KEYWORD1>nlgom3</KEYWORD1>
- <KEYWORD1>nlgom3_7</KEYWORD1>
- <KEYWORD1>nlgom4</KEYWORD1>
- <KEYWORD1>nlgom4_7</KEYWORD1>
- <KEYWORD1>nlinit</KEYWORD1>
- <KEYWORD1>nllog3</KEYWORD1>
- <KEYWORD1>nllog3_7</KEYWORD1>
- <KEYWORD1>nllog4</KEYWORD1>
- <KEYWORD1>nllog4_7</KEYWORD1>
- <KEYWORD1>nlog_rd</KEYWORD1>
- <KEYWORD1>nlogit</KEYWORD1>
- <KEYWORD1>nlogit_p</KEYWORD1>
- <KEYWORD1>nlogitgen</KEYWORD1>
- <KEYWORD1>nlogittree</KEYWORD1>
- <KEYWORD1>nlpred</KEYWORD1>
- <KEYWORD1>no</KEYWORD1>
- <KEYWORD1>nobreak</KEYWORD1>
- <KEYWORD1>noi</KEYWORD1>
- <KEYWORD1>nois</KEYWORD1>
- <KEYWORD1>noisi</KEYWORD1>
- <KEYWORD1>noisil</KEYWORD1>
- <KEYWORD1>noisily</KEYWORD1>
- <KEYWORD1>nostop</KEYWORD1>
- <KEYWORD1>note</KEYWORD1>
- <KEYWORD1>notes</KEYWORD1>
- <KEYWORD1>notify</KEYWORD1>
- <KEYWORD1>nptrend</KEYWORD1>
- <KEYWORD1>numlabel</KEYWORD1>
- <KEYWORD1>numlist</KEYWORD1>
- <KEYWORD1>off</KEYWORD1>
- <KEYWORD1>old_ver</KEYWORD1>
- <KEYWORD1>olo</KEYWORD1>
- <KEYWORD1>olog</KEYWORD1>
- <KEYWORD1>ologi</KEYWORD1>
- <KEYWORD1>ologi_sw</KEYWORD1>
- <KEYWORD1>ologit</KEYWORD1>
- <KEYWORD1>ologit_p</KEYWORD1>
- <KEYWORD1>ologitp</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>one</KEYWORD1>
- <KEYWORD1>onew</KEYWORD1>
- <KEYWORD1>onewa</KEYWORD1>
- <KEYWORD1>oneway</KEYWORD1>
- <KEYWORD1>op_colnm</KEYWORD1>
- <KEYWORD1>op_comp</KEYWORD1>
- <KEYWORD1>op_diff</KEYWORD1>
- <KEYWORD1>op_inv</KEYWORD1>
- <KEYWORD1>op_str</KEYWORD1>
- <KEYWORD1>opr</KEYWORD1>
- <KEYWORD1>opro</KEYWORD1>
- <KEYWORD1>oprob</KEYWORD1>
- <KEYWORD1>oprob_sw</KEYWORD1>
- <KEYWORD1>oprobi</KEYWORD1>
- <KEYWORD1>oprobi_p</KEYWORD1>
- <KEYWORD1>oprobit</KEYWORD1>
- <KEYWORD1>oprobitp</KEYWORD1>
- <KEYWORD1>opts_exclusive</KEYWORD1>
- <KEYWORD1>order</KEYWORD1>
- <KEYWORD1>orthog</KEYWORD1>
- <KEYWORD1>orthpoly</KEYWORD1>
- <KEYWORD1>ou</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>outf</KEYWORD1>
- <KEYWORD1>outfi</KEYWORD1>
- <KEYWORD1>outfil</KEYWORD1>
- <KEYWORD1>outfile</KEYWORD1>
- <KEYWORD1>outs</KEYWORD1>
- <KEYWORD1>outsh</KEYWORD1>
- <KEYWORD1>outshe</KEYWORD1>
- <KEYWORD1>outshee</KEYWORD1>
- <KEYWORD1>outsheet</KEYWORD1>
- <KEYWORD1>ovtest</KEYWORD1>
- <KEYWORD1>pac</KEYWORD1>
- <KEYWORD1>pac_7</KEYWORD1>
- <KEYWORD1>palette</KEYWORD1>
- <KEYWORD1>par</KEYWORD1>
- <KEYWORD1>pars</KEYWORD1>
- <KEYWORD1>parse</KEYWORD1>
- <KEYWORD1>parse_dissim</KEYWORD1>
- <KEYWORD1>pause</KEYWORD1>
- <KEYWORD1>pca</KEYWORD1>
- <KEYWORD1>pca_8</KEYWORD1>
- <KEYWORD1>pca_display</KEYWORD1>
- <KEYWORD1>pca_estat</KEYWORD1>
- <KEYWORD1>pca_p</KEYWORD1>
- <KEYWORD1>pca_rotate</KEYWORD1>
- <KEYWORD1>pcamat</KEYWORD1>
- <KEYWORD1>pchart</KEYWORD1>
- <KEYWORD1>pchart_7</KEYWORD1>
- <KEYWORD1>pchi</KEYWORD1>
- <KEYWORD1>pchi_7</KEYWORD1>
- <KEYWORD1>pcorr</KEYWORD1>
- <KEYWORD1>pctile</KEYWORD1>
- <KEYWORD1>pentium</KEYWORD1>
- <KEYWORD1>pergram</KEYWORD1>
- <KEYWORD1>pergram_7</KEYWORD1>
- <KEYWORD1>permute</KEYWORD1>
- <KEYWORD1>permute_8</KEYWORD1>
- <KEYWORD1>personal</KEYWORD1>
- <KEYWORD1>peto_st</KEYWORD1>
- <KEYWORD1>pkcollapse</KEYWORD1>
- <KEYWORD1>pkcross</KEYWORD1>
- <KEYWORD1>pkequiv</KEYWORD1>
- <KEYWORD1>pkexamine</KEYWORD1>
- <KEYWORD1>pkexamine_7</KEYWORD1>
- <KEYWORD1>pkshape</KEYWORD1>
- <KEYWORD1>pksumm</KEYWORD1>
- <KEYWORD1>pksumm_7</KEYWORD1>
- <KEYWORD1>pl</KEYWORD1>
- <KEYWORD1>playsnd</KEYWORD1>
- <KEYWORD1>plo</KEYWORD1>
- <KEYWORD1>plot</KEYWORD1>
- <KEYWORD1>plug</KEYWORD1>
- <KEYWORD1>plugi</KEYWORD1>
- <KEYWORD1>plugin</KEYWORD1>
- <KEYWORD1>pnorm</KEYWORD1>
- <KEYWORD1>pnorm_7</KEYWORD1>
- <KEYWORD1>poisgof</KEYWORD1>
- <KEYWORD1>poiss_lf</KEYWORD1>
- <KEYWORD1>poiss_sw</KEYWORD1>
- <KEYWORD1>poisso_p</KEYWORD1>
- <KEYWORD1>poisson</KEYWORD1>
- <KEYWORD1>poisson_estat</KEYWORD1>
- <KEYWORD1>pop</KEYWORD1>
- <KEYWORD1>popu</KEYWORD1>
- <KEYWORD1>popup</KEYWORD1>
- <KEYWORD1>post</KEYWORD1>
- <KEYWORD1>postclose</KEYWORD1>
- <KEYWORD1>postfile</KEYWORD1>
- <KEYWORD1>pperron</KEYWORD1>
- <KEYWORD1>pr</KEYWORD1>
- <KEYWORD1>prais</KEYWORD1>
- <KEYWORD1>prais_e</KEYWORD1>
- <KEYWORD1>prais_e2</KEYWORD1>
- <KEYWORD1>prais_p</KEYWORD1>
- <KEYWORD1>pred</KEYWORD1>
- <KEYWORD1>predi</KEYWORD1>
- <KEYWORD1>predic</KEYWORD1>
- <KEYWORD1>predict</KEYWORD1>
- <KEYWORD1>predictnl</KEYWORD1>
- <KEYWORD1>preserve</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>printgr</KEYWORD1>
- <KEYWORD1>priorest</KEYWORD1>
- <KEYWORD1>pro</KEYWORD1>
- <KEYWORD1>prob</KEYWORD1>
- <KEYWORD1>probi</KEYWORD1>
- <KEYWORD1>probit</KEYWORD1>
- <KEYWORD1>probit_estat</KEYWORD1>
- <KEYWORD1>probit_p</KEYWORD1>
- <KEYWORD1>proc_time</KEYWORD1>
- <KEYWORD1>procoverlay</KEYWORD1>
- <KEYWORD1>procrustes</KEYWORD1>
- <KEYWORD1>procrustes_estat</KEYWORD1>
- <KEYWORD1>procrustes_p</KEYWORD1>
- <KEYWORD1>profiler</KEYWORD1>
- <KEYWORD1>prop</KEYWORD1>
- <KEYWORD1>proportion</KEYWORD1>
- <KEYWORD1>prove</KEYWORD1>
- <KEYWORD1>prtest</KEYWORD1>
- <KEYWORD1>prtesti</KEYWORD1>
- <KEYWORD1>push</KEYWORD1>
- <KEYWORD1>pwcorr</KEYWORD1>
- <KEYWORD1>pwd</KEYWORD1>
- <KEYWORD1>q</KEYWORD1>
- <KEYWORD1>qby</KEYWORD1>
- <KEYWORD1>qbys</KEYWORD1>
- <KEYWORD1>qchi</KEYWORD1>
- <KEYWORD1>qchi_7</KEYWORD1>
- <KEYWORD1>qladder</KEYWORD1>
- <KEYWORD1>qladder_7</KEYWORD1>
- <KEYWORD1>qnorm</KEYWORD1>
- <KEYWORD1>qnorm_7</KEYWORD1>
- <KEYWORD1>qqplot</KEYWORD1>
- <KEYWORD1>qqplot_7</KEYWORD1>
- <KEYWORD1>qreg</KEYWORD1>
- <KEYWORD1>qreg_c</KEYWORD1>
- <KEYWORD1>qreg_p</KEYWORD1>
- <KEYWORD1>qreg_sw</KEYWORD1>
- <KEYWORD1>qu</KEYWORD1>
- <KEYWORD1>quadchk</KEYWORD1>
- <KEYWORD1>quantile</KEYWORD1>
- <KEYWORD1>quantile_7</KEYWORD1>
- <KEYWORD1>que</KEYWORD1>
- <KEYWORD1>quer</KEYWORD1>
- <KEYWORD1>query</KEYWORD1>
- <KEYWORD1>qui</KEYWORD1>
- <KEYWORD1>quie</KEYWORD1>
- <KEYWORD1>quiet</KEYWORD1>
- <KEYWORD1>quietl</KEYWORD1>
- <KEYWORD1>quietly</KEYWORD1>
- <KEYWORD1>range</KEYWORD1>
- <KEYWORD1>ranksum</KEYWORD1>
- <KEYWORD1>ratio</KEYWORD1>
- <KEYWORD1>rchart</KEYWORD1>
- <KEYWORD1>rchart_7</KEYWORD1>
- <KEYWORD1>rcof</KEYWORD1>
- <KEYWORD1>rc_spline</KEYWORD1>
- <KEYWORD1>recast</KEYWORD1>
- <KEYWORD1>reg</KEYWORD1>
- <KEYWORD1>reg3</KEYWORD1>
- <KEYWORD1>reg3_p</KEYWORD1>
- <KEYWORD1>regdw</KEYWORD1>
- <KEYWORD1>regr</KEYWORD1>
- <KEYWORD1>regre</KEYWORD1>
- <KEYWORD1>regre_p2</KEYWORD1>
- <KEYWORD1>regres</KEYWORD1>
- <KEYWORD1>regres_p</KEYWORD1>
- <KEYWORD1>regress</KEYWORD1>
- <KEYWORD1>regress_estat</KEYWORD1>
- <KEYWORD1>regriv_p</KEYWORD1>
- <KEYWORD1>remap</KEYWORD1>
- <KEYWORD1>ren</KEYWORD1>
- <KEYWORD1>rena</KEYWORD1>
- <KEYWORD1>renam</KEYWORD1>
- <KEYWORD1>rename</KEYWORD1>
- <KEYWORD1>renpfix</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>reshape</KEYWORD1>
- <KEYWORD1>restore</KEYWORD1>
- <KEYWORD1>ret</KEYWORD1>
- <KEYWORD1>retu</KEYWORD1>
- <KEYWORD1>retur</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>rm</KEYWORD1>
- <KEYWORD1>robvar</KEYWORD1>
- <KEYWORD1>robust</KEYWORD1>
- <KEYWORD1>roccomp</KEYWORD1>
- <KEYWORD1>roccomp_7</KEYWORD1>
- <KEYWORD1>roccomp_8</KEYWORD1>
- <KEYWORD1>rocf_lf</KEYWORD1>
- <KEYWORD1>rocfit</KEYWORD1>
- <KEYWORD1>rocfit_8</KEYWORD1>
- <KEYWORD1>rocgold</KEYWORD1>
- <KEYWORD1>rocplot</KEYWORD1>
- <KEYWORD1>rocplot_7</KEYWORD1>
- <KEYWORD1>roctab</KEYWORD1>
- <KEYWORD1>roctab_7</KEYWORD1>
- <KEYWORD1>rolling</KEYWORD1>
- <KEYWORD1>rologit</KEYWORD1>
- <KEYWORD1>rologit_p</KEYWORD1>
- <KEYWORD1>rot</KEYWORD1>
- <KEYWORD1>rota</KEYWORD1>
- <KEYWORD1>rotat</KEYWORD1>
- <KEYWORD1>rotate</KEYWORD1>
- <KEYWORD1>rotatemat</KEYWORD1>
- <KEYWORD1>rreg</KEYWORD1>
- <KEYWORD1>rreg_p</KEYWORD1>
- <KEYWORD1>rvfplot</KEYWORD1>
- <KEYWORD1>rvfplot_7</KEYWORD1>
- <KEYWORD1>rvpplot</KEYWORD1>
- <KEYWORD1>rvpplot_7</KEYWORD1>
- <KEYWORD1>sa</KEYWORD1>
- <KEYWORD1>safesum</KEYWORD1>
- <KEYWORD1>sample</KEYWORD1>
- <KEYWORD1>sampsi</KEYWORD1>
- <KEYWORD1>savedresults</KEYWORD1>
- <KEYWORD1>saveold</KEYWORD1>
- <KEYWORD1>say</KEYWORD1>
- <KEYWORD1>sc</KEYWORD1>
- <KEYWORD1>sca</KEYWORD1>
- <KEYWORD1>scal</KEYWORD1>
- <KEYWORD1>scala</KEYWORD1>
- <KEYWORD1>scalar</KEYWORD1>
- <KEYWORD1>scatter</KEYWORD1>
- <KEYWORD1>scm_mine</KEYWORD1>
- <KEYWORD1>sco</KEYWORD1>
- <KEYWORD1>scob_lf</KEYWORD1>
- <KEYWORD1>scob_p</KEYWORD1>
- <KEYWORD1>scobi_sw</KEYWORD1>
- <KEYWORD1>scobit</KEYWORD1>
- <KEYWORD1>scor</KEYWORD1>
- <KEYWORD1>score</KEYWORD1>
- <KEYWORD1>scoreplot</KEYWORD1>
- <KEYWORD1>scoreplot_help</KEYWORD1>
- <KEYWORD1>scree</KEYWORD1>
- <KEYWORD1>screeplot</KEYWORD1>
- <KEYWORD1>screeplot_help</KEYWORD1>
- <KEYWORD1>sdtest</KEYWORD1>
- <KEYWORD1>sdtesti</KEYWORD1>
- <KEYWORD1>se</KEYWORD1>
- <KEYWORD1>search</KEYWORD1>
- <KEYWORD1>separate</KEYWORD1>
- <KEYWORD1>seperate</KEYWORD1>
- <KEYWORD1>serrbar</KEYWORD1>
- <KEYWORD1>serrbar_7</KEYWORD1>
- <KEYWORD1>set_defaults</KEYWORD1>
- <KEYWORD1>sfrancia</KEYWORD1>
- <KEYWORD1>sh</KEYWORD1>
- <KEYWORD1>she</KEYWORD1>
- <KEYWORD1>shel</KEYWORD1>
- <KEYWORD1>shewhart</KEYWORD1>
- <KEYWORD1>shewhart_7</KEYWORD1>
- <KEYWORD1>showpoint</KEYWORD1>
- <KEYWORD1>signestimationsample</KEYWORD1>
- <KEYWORD1>signrank</KEYWORD1>
- <KEYWORD1>signtest</KEYWORD1>
- <KEYWORD1>simul</KEYWORD1>
- <KEYWORD1>simul_7</KEYWORD1>
- <KEYWORD1>simulate</KEYWORD1>
- <KEYWORD1>simulate_8</KEYWORD1>
- <KEYWORD1>simulinit</KEYWORD1>
- <KEYWORD1>sktest</KEYWORD1>
- <KEYWORD1>sleep</KEYWORD1>
- <KEYWORD1>slogit</KEYWORD1>
- <KEYWORD1>slogit_d2</KEYWORD1>
- <KEYWORD1>slogit_p</KEYWORD1>
- <KEYWORD1>smooth</KEYWORD1>
- <KEYWORD1>snapspan</KEYWORD1>
- <KEYWORD1>spbase</KEYWORD1>
- <KEYWORD1>spearman</KEYWORD1>
- <KEYWORD1>speedchk1</KEYWORD1>
- <KEYWORD1>speekchk2</KEYWORD1>
- <KEYWORD1>spikeplot</KEYWORD1>
- <KEYWORD1>spikeplot_7</KEYWORD1>
- <KEYWORD1>spikeplt</KEYWORD1>
- <KEYWORD1>spline</KEYWORD1>
- <KEYWORD1>spline_x</KEYWORD1>
- <KEYWORD1>split</KEYWORD1>
- <KEYWORD1>sqreg</KEYWORD1>
- <KEYWORD1>sqreg_p</KEYWORD1>
- <KEYWORD1>sret</KEYWORD1>
- <KEYWORD1>sretu</KEYWORD1>
- <KEYWORD1>sretur</KEYWORD1>
- <KEYWORD1>sreturn</KEYWORD1>
- <KEYWORD1>ssc</KEYWORD1>
- <KEYWORD1>st</KEYWORD1>
- <KEYWORD1>st_ct</KEYWORD1>
- <KEYWORD1>st_hc</KEYWORD1>
- <KEYWORD1>st_hcd</KEYWORD1>
- <KEYWORD1>st_hcd_sh</KEYWORD1>
- <KEYWORD1>st_is</KEYWORD1>
- <KEYWORD1>st_issys</KEYWORD1>
- <KEYWORD1>st_note</KEYWORD1>
- <KEYWORD1>st_promo</KEYWORD1>
- <KEYWORD1>st_set</KEYWORD1>
- <KEYWORD1>st_show</KEYWORD1>
- <KEYWORD1>st_smpl</KEYWORD1>
- <KEYWORD1>st_subid</KEYWORD1>
- <KEYWORD1>stack</KEYWORD1>
- <KEYWORD1>stackdepth</KEYWORD1>
- <KEYWORD1>stackreset</KEYWORD1>
- <KEYWORD1>statsby</KEYWORD1>
- <KEYWORD1>statsby_8</KEYWORD1>
- <KEYWORD1>stbase</KEYWORD1>
- <KEYWORD1>stci</KEYWORD1>
- <KEYWORD1>stci_7</KEYWORD1>
- <KEYWORD1>stcox</KEYWORD1>
- <KEYWORD1>stcox_estat</KEYWORD1>
- <KEYWORD1>stcox_fr</KEYWORD1>
- <KEYWORD1>stcox_fr_ll</KEYWORD1>
- <KEYWORD1>stcox_p</KEYWORD1>
- <KEYWORD1>stcox_sw</KEYWORD1>
- <KEYWORD1>stcoxkm</KEYWORD1>
- <KEYWORD1>stcoxkm_7</KEYWORD1>
- <KEYWORD1>stcstat</KEYWORD1>
- <KEYWORD1>stcurv</KEYWORD1>
- <KEYWORD1>stcurve</KEYWORD1>
- <KEYWORD1>stcurve_7</KEYWORD1>
- <KEYWORD1>stdes</KEYWORD1>
- <KEYWORD1>stem</KEYWORD1>
- <KEYWORD1>stepwise</KEYWORD1>
- <KEYWORD1>stereg</KEYWORD1>
- <KEYWORD1>stfill</KEYWORD1>
- <KEYWORD1>stgen</KEYWORD1>
- <KEYWORD1>stinit</KEYWORD1>
- <KEYWORD1>stir</KEYWORD1>
- <KEYWORD1>stjoin</KEYWORD1>
- <KEYWORD1>stmc</KEYWORD1>
- <KEYWORD1>stmh</KEYWORD1>
- <KEYWORD1>stphplot</KEYWORD1>
- <KEYWORD1>stphplot_7</KEYWORD1>
- <KEYWORD1>stphtest</KEYWORD1>
- <KEYWORD1>stphtest_7</KEYWORD1>
- <KEYWORD1>stptime</KEYWORD1>
- <KEYWORD1>strate</KEYWORD1>
- <KEYWORD1>strate_7</KEYWORD1>
- <KEYWORD1>streg</KEYWORD1>
- <KEYWORD1>streg_sw</KEYWORD1>
- <KEYWORD1>streset</KEYWORD1>
- <KEYWORD1>sts</KEYWORD1>
- <KEYWORD1>sts_7</KEYWORD1>
- <KEYWORD1>stset</KEYWORD1>
- <KEYWORD1>stsplit</KEYWORD1>
- <KEYWORD1>stsum</KEYWORD1>
- <KEYWORD1>sttocc</KEYWORD1>
- <KEYWORD1>sttoct</KEYWORD1>
- <KEYWORD1>stvary</KEYWORD1>
- <KEYWORD1>stweib</KEYWORD1>
- <KEYWORD1>su</KEYWORD1>
- <KEYWORD1>subwin</KEYWORD1>
- <KEYWORD1>suest</KEYWORD1>
- <KEYWORD1>suest_8</KEYWORD1>
- <KEYWORD1>sum</KEYWORD1>
- <KEYWORD1>summ</KEYWORD1>
- <KEYWORD1>summa</KEYWORD1>
- <KEYWORD1>summar</KEYWORD1>
- <KEYWORD1>summari</KEYWORD1>
- <KEYWORD1>summariz</KEYWORD1>
- <KEYWORD1>summarize</KEYWORD1>
- <KEYWORD1>sunflower</KEYWORD1>
- <KEYWORD1>sureg</KEYWORD1>
- <KEYWORD1>survcurv</KEYWORD1>
- <KEYWORD1>survsum</KEYWORD1>
- <KEYWORD1>svar</KEYWORD1>
- <KEYWORD1>svar_p</KEYWORD1>
- <KEYWORD1>svmat</KEYWORD1>
- <KEYWORD1>svy</KEYWORD1>
- <KEYWORD1>svy_disp</KEYWORD1>
- <KEYWORD1>svy_dreg</KEYWORD1>
- <KEYWORD1>svy_est</KEYWORD1>
- <KEYWORD1>svy_est_7</KEYWORD1>
- <KEYWORD1>svy_estat</KEYWORD1>
- <KEYWORD1>svy_get</KEYWORD1>
- <KEYWORD1>svy_gnbreg_p</KEYWORD1>
- <KEYWORD1>svy_head</KEYWORD1>
- <KEYWORD1>svy_header</KEYWORD1>
- <KEYWORD1>svy_heckman_p</KEYWORD1>
- <KEYWORD1>svy_heckprob_p</KEYWORD1>
- <KEYWORD1>svy_intreg_p</KEYWORD1>
- <KEYWORD1>svy_ivreg_p</KEYWORD1>
- <KEYWORD1>svy_logistic_p</KEYWORD1>
- <KEYWORD1>svy_logit_p</KEYWORD1>
- <KEYWORD1>svy_mlogit_p</KEYWORD1>
- <KEYWORD1>svy_nbreg_p</KEYWORD1>
- <KEYWORD1>svy_ologit_p</KEYWORD1>
- <KEYWORD1>svy_oprobit_p</KEYWORD1>
- <KEYWORD1>svy_poisson_p</KEYWORD1>
- <KEYWORD1>svy_probit_p</KEYWORD1>
- <KEYWORD1>svy_regress_p</KEYWORD1>
- <KEYWORD1>svy_sub</KEYWORD1>
- <KEYWORD1>svy_sub_7</KEYWORD1>
- <KEYWORD1>svy_x</KEYWORD1>
- <KEYWORD1>svy_x_7</KEYWORD1>
- <KEYWORD1>svy_x_p</KEYWORD1>
- <KEYWORD1>svydes</KEYWORD1>
- <KEYWORD1>svydes_8</KEYWORD1>
- <KEYWORD1>svygen</KEYWORD1>
- <KEYWORD1>svygnbreg</KEYWORD1>
- <KEYWORD1>svyheckman</KEYWORD1>
- <KEYWORD1>svyheckprob</KEYWORD1>
- <KEYWORD1>svyintreg</KEYWORD1>
- <KEYWORD1>svyintreg_7</KEYWORD1>
- <KEYWORD1>svyintrg</KEYWORD1>
- <KEYWORD1>svyivreg</KEYWORD1>
- <KEYWORD1>svylc</KEYWORD1>
- <KEYWORD1>svylog_p</KEYWORD1>
- <KEYWORD1>svylogit</KEYWORD1>
- <KEYWORD1>svymarkout</KEYWORD1>
- <KEYWORD1>svymarkout_8</KEYWORD1>
- <KEYWORD1>svymean</KEYWORD1>
- <KEYWORD1>svymlog</KEYWORD1>
- <KEYWORD1>svymlogit</KEYWORD1>
- <KEYWORD1>svynbreg</KEYWORD1>
- <KEYWORD1>svyolog</KEYWORD1>
- <KEYWORD1>svyologit</KEYWORD1>
- <KEYWORD1>svyoprob</KEYWORD1>
- <KEYWORD1>svyoprobit</KEYWORD1>
- <KEYWORD1>svyopts</KEYWORD1>
- <KEYWORD1>svypois</KEYWORD1>
- <KEYWORD1>svypois_7</KEYWORD1>
- <KEYWORD1>svypoisson</KEYWORD1>
- <KEYWORD1>svyprobit</KEYWORD1>
- <KEYWORD1>svyprobt</KEYWORD1>
- <KEYWORD1>svyprop</KEYWORD1>
- <KEYWORD1>svyprop_7</KEYWORD1>
- <KEYWORD1>svyratio</KEYWORD1>
- <KEYWORD1>svyreg</KEYWORD1>
- <KEYWORD1>svyreg_p</KEYWORD1>
- <KEYWORD1>svyregress</KEYWORD1>
- <KEYWORD1>svyset</KEYWORD1>
- <KEYWORD1>svyset_7</KEYWORD1>
- <KEYWORD1>svyset_8</KEYWORD1>
- <KEYWORD1>svytab</KEYWORD1>
- <KEYWORD1>svytab_7</KEYWORD1>
- <KEYWORD1>svytest</KEYWORD1>
- <KEYWORD1>svytotal</KEYWORD1>
- <KEYWORD1>sw</KEYWORD1>
- <KEYWORD1>sw_8</KEYWORD1>
- <KEYWORD1>swcnreg</KEYWORD1>
- <KEYWORD1>swcox</KEYWORD1>
- <KEYWORD1>swereg</KEYWORD1>
- <KEYWORD1>swilk</KEYWORD1>
- <KEYWORD1>swlogis</KEYWORD1>
- <KEYWORD1>swlogit</KEYWORD1>
- <KEYWORD1>swologit</KEYWORD1>
- <KEYWORD1>swoprbt</KEYWORD1>
- <KEYWORD1>swpois</KEYWORD1>
- <KEYWORD1>swprobit</KEYWORD1>
- <KEYWORD1>swqreg</KEYWORD1>
- <KEYWORD1>swtobit</KEYWORD1>
- <KEYWORD1>swweib</KEYWORD1>
- <KEYWORD1>symmetry</KEYWORD1>
- <KEYWORD1>symmi</KEYWORD1>
- <KEYWORD1>symplot</KEYWORD1>
- <KEYWORD1>symplot_7</KEYWORD1>
- <KEYWORD1>syntax</KEYWORD1>
- <KEYWORD1>sysdescribe</KEYWORD1>
- <KEYWORD1>sysuse</KEYWORD1>
- <KEYWORD1>szroeter</KEYWORD1>
- <KEYWORD1>ta</KEYWORD1>
- <KEYWORD1>tab</KEYWORD1>
- <KEYWORD1>tab1</KEYWORD1>
- <KEYWORD1>tab2</KEYWORD1>
- <KEYWORD1>tab_or</KEYWORD1>
- <KEYWORD1>tabd</KEYWORD1>
- <KEYWORD1>tabdi</KEYWORD1>
- <KEYWORD1>tabdis</KEYWORD1>
- <KEYWORD1>tabdisp</KEYWORD1>
- <KEYWORD1>tabi</KEYWORD1>
- <KEYWORD1>table</KEYWORD1>
- <KEYWORD1>tabodds</KEYWORD1>
- <KEYWORD1>tabodds_7</KEYWORD1>
- <KEYWORD1>tabstat</KEYWORD1>
- <KEYWORD1>tabu</KEYWORD1>
- <KEYWORD1>tabul</KEYWORD1>
- <KEYWORD1>tabula</KEYWORD1>
- <KEYWORD1>tabulat</KEYWORD1>
- <KEYWORD1>tabulate</KEYWORD1>
- <KEYWORD1>te</KEYWORD1>
- <KEYWORD1>tempfile</KEYWORD1>
- <KEYWORD1>tempname</KEYWORD1>
- <KEYWORD1>tempvar</KEYWORD1>
- <KEYWORD1>tes</KEYWORD1>
- <KEYWORD1>test</KEYWORD1>
- <KEYWORD1>testnl</KEYWORD1>
- <KEYWORD1>testparm</KEYWORD1>
- <KEYWORD1>teststd</KEYWORD1>
- <KEYWORD1>tetrachoric</KEYWORD1>
- <KEYWORD1>time_it</KEYWORD1>
- <KEYWORD1>timer</KEYWORD1>
- <KEYWORD1>tis</KEYWORD1>
- <KEYWORD1>tob</KEYWORD1>
- <KEYWORD1>tobi</KEYWORD1>
- <KEYWORD1>tobit</KEYWORD1>
- <KEYWORD1>tobit_p</KEYWORD1>
- <KEYWORD1>tobit_sw</KEYWORD1>
- <KEYWORD1>token</KEYWORD1>
- <KEYWORD1>tokeni</KEYWORD1>
- <KEYWORD1>tokeniz</KEYWORD1>
- <KEYWORD1>tokenize</KEYWORD1>
- <KEYWORD1>tostring</KEYWORD1>
- <KEYWORD1>total</KEYWORD1>
- <KEYWORD1>touch</KEYWORD1>
- <KEYWORD1>treat_ll</KEYWORD1>
- <KEYWORD1>treatr_p</KEYWORD1>
- <KEYWORD1>treatreg</KEYWORD1>
- <KEYWORD1>trim</KEYWORD1>
- <KEYWORD1>trnb_cons</KEYWORD1>
- <KEYWORD1>trnb_mean</KEYWORD1>
- <KEYWORD1>trpoiss_d2</KEYWORD1>
- <KEYWORD1>trunc_ll</KEYWORD1>
- <KEYWORD1>truncr_p</KEYWORD1>
- <KEYWORD1>truncreg</KEYWORD1>
- <KEYWORD1>tsappend</KEYWORD1>
- <KEYWORD1>tset</KEYWORD1>
- <KEYWORD1>tsfill</KEYWORD1>
- <KEYWORD1>tsline</KEYWORD1>
- <KEYWORD1>tsline_ex</KEYWORD1>
- <KEYWORD1>tsreport</KEYWORD1>
- <KEYWORD1>tsrevar</KEYWORD1>
- <KEYWORD1>tsrline</KEYWORD1>
- <KEYWORD1>tsset</KEYWORD1>
- <KEYWORD1>tssmooth</KEYWORD1>
- <KEYWORD1>tsunab</KEYWORD1>
- <KEYWORD1>ttest</KEYWORD1>
- <KEYWORD1>ttesti</KEYWORD1>
- <KEYWORD1>tut_chk</KEYWORD1>
- <KEYWORD1>tut_wait</KEYWORD1>
- <KEYWORD1>tutorial</KEYWORD1>
- <KEYWORD1>tw</KEYWORD1>
- <KEYWORD1>tware_st</KEYWORD1>
- <KEYWORD1>two</KEYWORD1>
- <KEYWORD1>twoway</KEYWORD1>
- <KEYWORD1>twoway__fpfit_serset</KEYWORD1>
- <KEYWORD1>twoway__function_gen</KEYWORD1>
- <KEYWORD1>twoway__histogram_gen</KEYWORD1>
- <KEYWORD1>twoway__ipoint_serset</KEYWORD1>
- <KEYWORD1>twoway__ipoints_serset</KEYWORD1>
- <KEYWORD1>twoway__kdensity_gen</KEYWORD1>
- <KEYWORD1>twoway__lfit_serset</KEYWORD1>
- <KEYWORD1>twoway__normgen_gen</KEYWORD1>
- <KEYWORD1>twoway__pci_serset</KEYWORD1>
- <KEYWORD1>twoway__qfit_serset</KEYWORD1>
- <KEYWORD1>twoway__scatteri_serset</KEYWORD1>
- <KEYWORD1>twoway__sunflower_gen</KEYWORD1>
- <KEYWORD1>twoway_ksm_serset</KEYWORD1>
- <KEYWORD1>ty</KEYWORD1>
- <KEYWORD1>typ</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
- <KEYWORD1>typeof</KEYWORD1>
- <KEYWORD1>u</KEYWORD1>
- <KEYWORD1>unab</KEYWORD1>
- <KEYWORD1>unabbrev</KEYWORD1>
- <KEYWORD1>unidiff</KEYWORD1>
- <KEYWORD1>update</KEYWORD1>
- <KEYWORD1>us</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
- <KEYWORD1>uselabel</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
- <KEYWORD1>var_mkcompanion</KEYWORD1>
- <KEYWORD1>var_p</KEYWORD1>
- <KEYWORD1>varbasic</KEYWORD1>
- <KEYWORD1>varfcast</KEYWORD1>
- <KEYWORD1>vargranger</KEYWORD1>
- <KEYWORD1>varirf</KEYWORD1>
- <KEYWORD1>varirf_add</KEYWORD1>
- <KEYWORD1>varirf_cgraph</KEYWORD1>
- <KEYWORD1>varirf_create</KEYWORD1>
- <KEYWORD1>varirf_ctable</KEYWORD1>
- <KEYWORD1>varirf_describe</KEYWORD1>
- <KEYWORD1>varirf_dir</KEYWORD1>
- <KEYWORD1>varirf_drop</KEYWORD1>
- <KEYWORD1>varirf_erase</KEYWORD1>
- <KEYWORD1>varirf_graph</KEYWORD1>
- <KEYWORD1>varirf_ograph</KEYWORD1>
- <KEYWORD1>varirf_rename</KEYWORD1>
- <KEYWORD1>varirf_set</KEYWORD1>
- <KEYWORD1>varirf_table</KEYWORD1>
- <KEYWORD1>varlmar</KEYWORD1>
- <KEYWORD1>varnorm</KEYWORD1>
- <KEYWORD1>varsoc</KEYWORD1>
- <KEYWORD1>varstable</KEYWORD1>
- <KEYWORD1>varstable_w</KEYWORD1>
- <KEYWORD1>varstable_w2</KEYWORD1>
- <KEYWORD1>varwle</KEYWORD1>
- <KEYWORD1>vce</KEYWORD1>
- <KEYWORD1>vec</KEYWORD1>
- <KEYWORD1>vec_fevd</KEYWORD1>
- <KEYWORD1>vec_mkphi</KEYWORD1>
- <KEYWORD1>vec_p</KEYWORD1>
- <KEYWORD1>vec_p_w</KEYWORD1>
- <KEYWORD1>vecirf_create</KEYWORD1>
- <KEYWORD1>veclmar</KEYWORD1>
- <KEYWORD1>veclmar_w</KEYWORD1>
- <KEYWORD1>vecnorm</KEYWORD1>
- <KEYWORD1>vecnorm_w</KEYWORD1>
- <KEYWORD1>vecrank</KEYWORD1>
- <KEYWORD1>vecstable</KEYWORD1>
- <KEYWORD1>verinst</KEYWORD1>
- <KEYWORD1>vers</KEYWORD1>
- <KEYWORD1>versi</KEYWORD1>
- <KEYWORD1>versio</KEYWORD1>
- <KEYWORD1>version</KEYWORD1>
- <KEYWORD1>viewsource</KEYWORD1>
- <KEYWORD1>vif</KEYWORD1>
- <KEYWORD1>vwls</KEYWORD1>
- <KEYWORD1>wdatetof</KEYWORD1>
- <KEYWORD1>wdctl</KEYWORD1>
- <KEYWORD1>wdlg</KEYWORD1>
- <KEYWORD1>wdupdate</KEYWORD1>
- <KEYWORD1>webdescribe</KEYWORD1>
- <KEYWORD1>webseek</KEYWORD1>
- <KEYWORD1>webuse</KEYWORD1>
- <KEYWORD1>weib1_lf</KEYWORD1>
- <KEYWORD1>weib2_lf</KEYWORD1>
- <KEYWORD1>weib_lf</KEYWORD1>
- <KEYWORD1>weib_lf0</KEYWORD1>
- <KEYWORD1>weibhet_glf</KEYWORD1>
- <KEYWORD1>weibhet_glf_sh</KEYWORD1>
- <KEYWORD1>weibhet_glfa</KEYWORD1>
- <KEYWORD1>weibhet_glfa_sh</KEYWORD1>
- <KEYWORD1>weibhet_gp</KEYWORD1>
- <KEYWORD1>weibhet_ilf</KEYWORD1>
- <KEYWORD1>weibhet_ilf_sh</KEYWORD1>
- <KEYWORD1>weibhet_ilfa</KEYWORD1>
- <KEYWORD1>weibhet_ilfa_sh</KEYWORD1>
- <KEYWORD1>weibhet_ip</KEYWORD1>
- <KEYWORD1>weibu_sw</KEYWORD1>
- <KEYWORD1>weibul_p</KEYWORD1>
- <KEYWORD1>weibull</KEYWORD1>
- <KEYWORD1>weibull_c</KEYWORD1>
- <KEYWORD1>weibull_s</KEYWORD1>
- <KEYWORD1>weibullhet</KEYWORD1>
- <KEYWORD1>wh</KEYWORD1>
- <KEYWORD1>whelp</KEYWORD1>
- <KEYWORD1>whi</KEYWORD1>
- <KEYWORD1>whic</KEYWORD1>
- <KEYWORD1>which</KEYWORD1>
- <KEYWORD1>who</KEYWORD1>
- <KEYWORD1>wilc_st</KEYWORD1>
- <KEYWORD1>wilcoxon</KEYWORD1>
- <KEYWORD1>win</KEYWORD1>
- <KEYWORD1>wind</KEYWORD1>
- <KEYWORD1>windo</KEYWORD1>
- <KEYWORD1>window</KEYWORD1>
- <KEYWORD1>winexec</KEYWORD1>
- <KEYWORD1>wmenu</KEYWORD1>
- <KEYWORD1>wntestb</KEYWORD1>
- <KEYWORD1>wntestb_7</KEYWORD1>
- <KEYWORD1>wntestq</KEYWORD1>
- <KEYWORD1>xchart</KEYWORD1>
- <KEYWORD1>xchart_7</KEYWORD1>
- <KEYWORD1>xcorr</KEYWORD1>
- <KEYWORD1>xcorr_7</KEYWORD1>
- <KEYWORD1>xi</KEYWORD1>
- <KEYWORD1>xi_6</KEYWORD1>
- <KEYWORD1>xpose</KEYWORD1>
- <KEYWORD1>xt_iis</KEYWORD1>
- <KEYWORD1>xt_tis</KEYWORD1>
- <KEYWORD1>xtab_p</KEYWORD1>
- <KEYWORD1>xtabond</KEYWORD1>
- <KEYWORD1>xtabond2</KEYWORD1>
- <KEYWORD1>xtbin_p</KEYWORD1>
- <KEYWORD1>xtclog</KEYWORD1>
- <KEYWORD1>xtcloglog</KEYWORD1>
- <KEYWORD1>xtcloglog_8</KEYWORD1>
- <KEYWORD1>xtcloglog_d2</KEYWORD1>
- <KEYWORD1>xtcloglog_pa_p</KEYWORD1>
- <KEYWORD1>xtcloglog_re_p</KEYWORD1>
- <KEYWORD1>xtcnt_p</KEYWORD1>
- <KEYWORD1>xtcorr</KEYWORD1>
- <KEYWORD1>xtdata</KEYWORD1>
- <KEYWORD1>xtdes</KEYWORD1>
- <KEYWORD1>xtdpdsys</KEYWORD1>
- <KEYWORD1>xtfisher</KEYWORD1>
- <KEYWORD1>xtfront_p</KEYWORD1>
- <KEYWORD1>xtfrontier</KEYWORD1>
- <KEYWORD1>xtgee</KEYWORD1>
- <KEYWORD1>xtgee_elink</KEYWORD1>
- <KEYWORD1>xtgee_estat</KEYWORD1>
- <KEYWORD1>xtgee_makeivar</KEYWORD1>
- <KEYWORD1>xtgee_p</KEYWORD1>
- <KEYWORD1>xtgee_plink</KEYWORD1>
- <KEYWORD1>xtgls</KEYWORD1>
- <KEYWORD1>xtgls_p</KEYWORD1>
- <KEYWORD1>xthaus</KEYWORD1>
- <KEYWORD1>xthausman</KEYWORD1>
- <KEYWORD1>xtht_p</KEYWORD1>
- <KEYWORD1>xthtaylor</KEYWORD1>
- <KEYWORD1>xtile</KEYWORD1>
- <KEYWORD1>xtint_p</KEYWORD1>
- <KEYWORD1>xtintreg</KEYWORD1>
- <KEYWORD1>xtintreg_8</KEYWORD1>
- <KEYWORD1>xtintreg_d2</KEYWORD1>
- <KEYWORD1>xtintreg_p</KEYWORD1>
- <KEYWORD1>xtivp_1</KEYWORD1>
- <KEYWORD1>xtivp_2</KEYWORD1>
- <KEYWORD1>xtivreg</KEYWORD1>
- <KEYWORD1>xtline</KEYWORD1>
- <KEYWORD1>xtline_ex</KEYWORD1>
- <KEYWORD1>xtlogit</KEYWORD1>
- <KEYWORD1>xtlogit_8</KEYWORD1>
- <KEYWORD1>xtlogit_d2</KEYWORD1>
- <KEYWORD1>xtlogit_fe_p</KEYWORD1>
- <KEYWORD1>xtlogit_pa_p</KEYWORD1>
- <KEYWORD1>xtlogit_re_p</KEYWORD1>
- <KEYWORD1>xtlsdvc</KEYWORD1>
- <KEYWORD1>xtmixed</KEYWORD1>
- <KEYWORD1>xtmixed_estat</KEYWORD1>
- <KEYWORD1>xtmixed_p</KEYWORD1>
- <KEYWORD1>xtnb_fe</KEYWORD1>
- <KEYWORD1>xtnb_lf</KEYWORD1>
- <KEYWORD1>xtnbreg</KEYWORD1>
- <KEYWORD1>xtnbreg_pa_p</KEYWORD1>
- <KEYWORD1>xtnbreg_refe_p</KEYWORD1>
- <KEYWORD1>xtpcse</KEYWORD1>
- <KEYWORD1>xtpcse_p</KEYWORD1>
- <KEYWORD1>xtpois</KEYWORD1>
- <KEYWORD1>xtpoisson</KEYWORD1>
- <KEYWORD1>xtpoisson_d2</KEYWORD1>
- <KEYWORD1>xtpoisson_pa_p</KEYWORD1>
- <KEYWORD1>xtpoisson_refe_p</KEYWORD1>
- <KEYWORD1>xtpred</KEYWORD1>
- <KEYWORD1>xtprobit</KEYWORD1>
- <KEYWORD1>xtprobit_8</KEYWORD1>
- <KEYWORD1>xtprobit_d2</KEYWORD1>
- <KEYWORD1>xtprobit_re_p</KEYWORD1>
- <KEYWORD1>xtps_fe</KEYWORD1>
- <KEYWORD1>xtps_lf</KEYWORD1>
- <KEYWORD1>xtps_ren</KEYWORD1>
- <KEYWORD1>xtps_ren_8</KEYWORD1>
- <KEYWORD1>xtrar_p</KEYWORD1>
- <KEYWORD1>xtrc</KEYWORD1>
- <KEYWORD1>xtrc_p</KEYWORD1>
- <KEYWORD1>xtrch_p</KEYWORD1>
- <KEYWORD1>xtrchh</KEYWORD1>
- <KEYWORD1>xtrefe_p</KEYWORD1>
- <KEYWORD1>xtreg</KEYWORD1>
- <KEYWORD1>xtreg_be</KEYWORD1>
- <KEYWORD1>xtreg_fe</KEYWORD1>
- <KEYWORD1>xtreg_ml</KEYWORD1>
- <KEYWORD1>xtreg_pa_p</KEYWORD1>
- <KEYWORD1>xtreg_re</KEYWORD1>
- <KEYWORD1>xtregar</KEYWORD1>
- <KEYWORD1>xtrere_p</KEYWORD1>
- <KEYWORD1>xtserial</KEYWORD1>
- <KEYWORD1>xtset</KEYWORD1>
- <KEYWORD1>xtsf_ll</KEYWORD1>
- <KEYWORD1>xtsf_llti</KEYWORD1>
- <KEYWORD1>xtsum</KEYWORD1>
- <KEYWORD1>xttab</KEYWORD1>
- <KEYWORD1>xttest0</KEYWORD1>
- <KEYWORD1>xttest2</KEYWORD1>
- <KEYWORD1>xttest3</KEYWORD1>
- <KEYWORD1>xttobit</KEYWORD1>
- <KEYWORD1>xttobit_8</KEYWORD1>
- <KEYWORD1>xttobit_p</KEYWORD1>
- <KEYWORD1>xttrans</KEYWORD1>
- <KEYWORD1>xwin</KEYWORD1>
- <KEYWORD1>xwind</KEYWORD1>
- <KEYWORD1>xwindo</KEYWORD1>
- <KEYWORD1>xwindow</KEYWORD1>
- <KEYWORD1>y_ado</KEYWORD1>
- <KEYWORD1>yx</KEYWORD1>
- <KEYWORD1>yxview__barlike_draw</KEYWORD1>
- <KEYWORD1>yxview_area_draw</KEYWORD1>
- <KEYWORD1>yxview_bar_draw</KEYWORD1>
- <KEYWORD1>yxview_dot_draw</KEYWORD1>
- <KEYWORD1>yxview_dropline_draw</KEYWORD1>
- <KEYWORD1>yxview_function_draw</KEYWORD1>
- <KEYWORD1>yxview_iarrow_draw</KEYWORD1>
- <KEYWORD1>yxview_ilabels_draw</KEYWORD1>
- <KEYWORD1>yxview_normal_draw</KEYWORD1>
- <KEYWORD1>yxview_pcarrow_draw</KEYWORD1>
- <KEYWORD1>yxview_pcbarrow_draw</KEYWORD1>
- <KEYWORD1>yxview_pccapsym_draw</KEYWORD1>
- <KEYWORD1>yxview_pcscatter_draw</KEYWORD1>
- <KEYWORD1>yxview_pcspike_draw</KEYWORD1>
- <KEYWORD1>yxview_rarea_draw</KEYWORD1>
- <KEYWORD1>yxview_rbar_draw</KEYWORD1>
- <KEYWORD1>yxview_rbarm_draw</KEYWORD1>
- <KEYWORD1>yxview_rcap_draw</KEYWORD1>
- <KEYWORD1>yxview_rcapsym_draw</KEYWORD1>
- <KEYWORD1>yxview_rconnected_draw</KEYWORD1>
- <KEYWORD1>yxview_rline_draw</KEYWORD1>
- <KEYWORD1>yxview_rscatter_draw</KEYWORD1>
- <KEYWORD1>yxview_rspike_draw</KEYWORD1>
- <KEYWORD1>yxview_spike_draw</KEYWORD1>
- <KEYWORD1>yxview_sunflower_draw</KEYWORD1>
- <KEYWORD1>zap_s</KEYWORD1>
- <KEYWORD1>zinb</KEYWORD1>
- <KEYWORD1>zinb_llf</KEYWORD1>
- <KEYWORD1>zinb_plf</KEYWORD1>
- <KEYWORD1>zip</KEYWORD1>
- <KEYWORD1>zip_llf</KEYWORD1>
- <KEYWORD1>zip_p</KEYWORD1>
- <KEYWORD1>zip_plf</KEYWORD1>
- <KEYWORD1>zt_ct_5</KEYWORD1>
- <KEYWORD1>zt_hc_5</KEYWORD1>
- <KEYWORD1>zt_hcd_5</KEYWORD1>
- <KEYWORD1>zt_is_5</KEYWORD1>
- <KEYWORD1>zt_iss_5</KEYWORD1>
- <KEYWORD1>zt_sho_5</KEYWORD1>
- <KEYWORD1>zt_smp_5</KEYWORD1>
- <KEYWORD1>ztbase_5</KEYWORD1>
- <KEYWORD1>ztcox_5</KEYWORD1>
- <KEYWORD1>ztdes_5</KEYWORD1>
- <KEYWORD1>ztereg_5</KEYWORD1>
- <KEYWORD1>ztfill_5</KEYWORD1>
- <KEYWORD1>ztgen_5</KEYWORD1>
- <KEYWORD1>ztir_5</KEYWORD1>
- <KEYWORD1>ztjoin_5</KEYWORD1>
- <KEYWORD1>ztnb</KEYWORD1>
- <KEYWORD1>ztnb_p</KEYWORD1>
- <KEYWORD1>ztp</KEYWORD1>
- <KEYWORD1>ztp_p</KEYWORD1>
- <KEYWORD1>zts_5</KEYWORD1>
- <KEYWORD1>ztset_5</KEYWORD1>
- <KEYWORD1>ztspli_5</KEYWORD1>
- <KEYWORD1>ztsum_5</KEYWORD1>
- <KEYWORD1>zttoct_5</KEYWORD1>
- <KEYWORD1>ztvary_5</KEYWORD1>
- <KEYWORD1>ztweib_5</KEYWORD1>
-
-<!-- Survival Model keywords (recent addons ) -->
- <KEYWORD1>basec</KEYWORD1>
- <KEYWORD1>basechazard</KEYWORD1>
- <KEYWORD1>basehc</KEYWORD1>
- <KEYWORD1>bases</KEYWORD1>
- <KEYWORD1>basesurv</KEYWORD1>
- <KEYWORD1>eff</KEYWORD1>
- <KEYWORD1>effects</KEYWORD1>
- <KEYWORD1>esr</KEYWORD1>
- <KEYWORD1>tvc</KEYWORD1>
- <KEYWORD1>strata</KEYWORD1>
- <KEYWORD1>efron</KEYWORD1>
- <KEYWORD1>shared</KEYWORD1>
- <KEYWORD1>sh</KEYWORD1>
- <KEYWORD1>offset</KEYWORD1>
- <KEYWORD1>breslow</KEYWORD1>
- <KEYWORD1>bre</KEYWORD1>
- <KEYWORD1>texp</KEYWORD1>
- <KEYWORD1>exactm</KEYWORD1>
- <KEYWORD1>exactp</KEYWORD1>
- <KEYWORD1>con</KEYWORD1>
- <KEYWORD1>noadjust</KEYWORD1>
- <KEYWORD1>noadj</KEYWORD1>
- <KEYWORD1>noshow</KEYWORD1>
- <KEYWORD1>nosh</KEYWORD1>
- <KEYWORD1>mgale</KEYWORD1>
- <KEYWORD1>mg</KEYWORD1>
- <KEYWORD1>phtest</KEYWORD1>
- <KEYWORD1>sch</KEYWORD1>
- <KEYWORD1>schoenfeld</KEYWORD1>
- <KEYWORD1>scaledsch</KEYWORD1>
- <KEYWORD1>sca</KEYWORD1>
- <KEYWORD1>stphplot</KEYWORD1>
- <KEYWORD1>stcoxkm</KEYWORD1>
- <KEYWORD1>z</KEYWORD1>
- <KEYWORD1>zero</KEYWORD1>
- <KEYWORD1>noneg</KEYWORD1>
- <KEYWORD1>nonegative</KEYWORD1>
- <KEYWORD1>nolnt</KEYWORD1>
- <KEYWORD1>nolntime</KEYWORD1>
- <KEYWORD1>addplot</KEYWORD1>
- <KEYWORD1>ties</KEYWORD1>
- <KEYWORD1>tie</KEYWORD1>
- <KEYWORD1>sep</KEYWORD1>
- <KEYWORD1>separate</KEYWORD1>
-
- <!-- Some add-on ado packages: -->
-
- <KEYWORD1>_gsqelemcount</KEYWORD1>
- <KEYWORD1>_gsqepicount</KEYWORD1>
- <KEYWORD1>_gsqgapcount</KEYWORD1>
- <KEYWORD1>_gsqgaplength</KEYWORD1>
- <KEYWORD1>_gsqitemcount</KEYWORD1>
- <KEYWORD1>_gsqlength</KEYWORD1>
- <KEYWORD1>est2one</KEYWORD1>
- <KEYWORD1>est2rowlbl</KEYWORD1>
- <KEYWORD1>est2tex</KEYWORD1>
- <KEYWORD1>est2vec</KEYWORD1>
- <KEYWORD1>estsimp</KEYWORD1>
- <KEYWORD1>maketex</KEYWORD1>
- <KEYWORD1>matload</KEYWORD1>
- <KEYWORD1>matsave</KEYWORD1>
- <KEYWORD1>newey2</KEYWORD1>
- <KEYWORD1>outtable</KEYWORD1>
- <KEYWORD1>outtable7</KEYWORD1>
- <KEYWORD1>outtex</KEYWORD1>
- <KEYWORD1>outtex6</KEYWORD1>
- <KEYWORD1>relogit</KEYWORD1>
- <KEYWORD1>relogitq</KEYWORD1>
- <KEYWORD1>renvars</KEYWORD1>
- <KEYWORD1>setx</KEYWORD1>
- <KEYWORD1>setxhl</KEYWORD1>
- <KEYWORD1>simqi</KEYWORD1>
- <KEYWORD1>sp_adj</KEYWORD1>
- <KEYWORD1>spbase</KEYWORD1>
- <KEYWORD1>spline</KEYWORD1>
- <KEYWORD1>sqclusterdat</KEYWORD1>
- <KEYWORD1>sqclustermat</KEYWORD1>
- <KEYWORD1>sqdes</KEYWORD1>
- <KEYWORD1>sqindexplot</KEYWORD1>
- <KEYWORD1>sqom</KEYWORD1>
- <KEYWORD1>sqparcoord</KEYWORD1>
- <KEYWORD1>sqset</KEYWORD1>
- <KEYWORD1>sqstatlist</KEYWORD1>
- <KEYWORD1>sqstatsum</KEYWORD1>
- <KEYWORD1>sqstattab1</KEYWORD1>
- <KEYWORD1>sqstattab2</KEYWORD1>
- <KEYWORD1>sqstattabsum</KEYWORD1>
- <KEYWORD1>sqtab</KEYWORD1>
- <KEYWORD1>sumqi</KEYWORD1>
- <KEYWORD1>sutex</KEYWORD1>
- <KEYWORD1>sutex6</KEYWORD1>
- <KEYWORD1>tlogit</KEYWORD1>
- <KEYWORD1>xtfevd</KEYWORD1>
- <KEYWORD1>xtserial</KEYWORD1>
- <KEYWORD1>xttest1</KEYWORD1>
-
- <!-- options: -->
-
- <KEYWORD1>nokeep</KEYWORD1>
- <KEYWORD1>fe</KEYWORD1>
- <KEYWORD1>re</KEYWORD1>
- <KEYWORD1>pairwise</KEYWORD1>
- <KEYWORD1>gmm</KEYWORD1>
- <KEYWORD1>distribution</KEYWORD1>
- <KEYWORD1>loglogistic</KEYWORD1>
- <KEYWORD1>lognormal</KEYWORD1>
- <KEYWORD1>exponential</KEYWORD1>
- <KEYWORD1>nohr</KEYWORD1>
- <KEYWORD1>schoenfeld</KEYWORD1>
- <KEYWORD1>scaledsch</KEYWORD1>
- <KEYWORD1>basechazard</KEYWORD1>
- <KEYWORD1>basesurv</KEYWORD1>
- <KEYWORD1>basehc</KEYWORD1>
- <KEYWORD1>esr</KEYWORD1>
- <KEYWORD1>time0</KEYWORD1>
- <KEYWORD1>origin</KEYWORD1>
-
- <!-- graphing options: -->
- <KEYWORD1>dropline</KEYWORD1>
- <KEYWORD1>bar</KEYWORD1>
- <KEYWORD1>hbar</KEYWORD1>
- <KEYWORD1>allc</KEYWORD1>
- <KEYWORD1>allcategories</KEYWORD1>
- <KEYWORD1>yalt</KEYWORD1>
- <KEYWORD1>xalt</KEYWORD1>
- <KEYWORD1>yalternate</KEYWORD1>
- <KEYWORD1>xalternate</KEYWORD1>
- <KEYWORD1>exclude0</KEYWORD1>
- <KEYWORD1>yrev</KEYWORD1>
- <KEYWORD1>yreverse</KEYWORD1>
- <KEYWORD1>blab</KEYWORD1>
- <KEYWORD1>blabel</KEYWORD1>
- <KEYWORD1>yvar</KEYWORD1>
- <KEYWORD1>yvaroptions</KEYWORD1>
- <KEYWORD1>nolabel</KEYWORD1>
- <KEYWORD1>nolab</KEYWORD1>
- <KEYWORD1>dot</KEYWORD1>
- <KEYWORD1>box</KEYWORD1>
- <KEYWORD1>pie</KEYWORD1>
- <KEYWORD1>combine</KEYWORD1>
- <KEYWORD1>printcolor</KEYWORD1>
- <KEYWORD1>yax</KEYWORD1>
- <KEYWORD1>xax</KEYWORD1>
- <KEYWORD1>yaxis</KEYWORD1>
- <KEYWORD1>xaxis</KEYWORD1>
- <KEYWORD1>legend</KEYWORD1>
- <KEYWORD1>msymbol</KEYWORD1>
- <KEYWORD1>ytic</KEYWORD1>
- <KEYWORD1>xtic</KEYWORD1>
- <KEYWORD1>ytick</KEYWORD1>
- <KEYWORD1>xtick</KEYWORD1>
- <KEYWORD1>lpattern</KEYWORD1>
- <KEYWORD1>ti</KEYWORD1>
- <KEYWORD1>tick</KEYWORD1>
- <KEYWORD1>mlab</KEYWORD1>
- <KEYWORD1>mlabel</KEYWORD1>
- <KEYWORD1>mtick</KEYWORD1>
- <KEYWORD1>mtic</KEYWORD1>
- <KEYWORD1>yscale</KEYWORD1>
- <KEYWORD1>xscale</KEYWORD1>
- <KEYWORD1>tscale</KEYWORD1>
- <KEYWORD1>ysc</KEYWORD1>
- <KEYWORD1>xsc</KEYWORD1>
- <KEYWORD1>tsc</KEYWORD1>
- <KEYWORD1>ylab</KEYWORD1>
- <KEYWORD1>xlab</KEYWORD1>
- <KEYWORD1>ylabel</KEYWORD1>
- <KEYWORD1>xlabel</KEYWORD1>
- <KEYWORD1>yti</KEYWORD1>
- <KEYWORD1>xti</KEYWORD1>
- <KEYWORD1>ytitle</KEYWORD1>
- <KEYWORD1>xtitle</KEYWORD1>
-
- </KEYWORDS>
- </RULES>
-</MODE>
-
-
diff --git a/jEdit/modes/svn-commit.xml b/jEdit/modes/svn-commit.xml
index 5cd415c..b4700f9 100644
--- a/jEdit/modes/svn-commit.xml
+++ b/jEdit/modes/svn-commit.xml
@@ -1,22 +1,22 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-<MODE NAME="svn-commit" FILE="svn-commit.xml"/>
--->
-
-<MODE>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
- <SEQ TYPE="COMMENT1"
- DELEGATE="CHANGED"
- AT_LINE_START="TRUE"
- >--This line, and those below, will be ignored--</SEQ>
- </RULES>
- <RULES SET="CHANGED">
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">A</EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">D</EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">M</EOL_SPAN>
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">_</EOL_SPAN>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+<MODE NAME="svn-commit" FILE="svn-commit.xml"/>
+-->
+
+<MODE>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
+ <SEQ TYPE="COMMENT1"
+ DELEGATE="CHANGED"
+ AT_LINE_START="TRUE"
+ >--This line, and those below, will be ignored--</SEQ>
+ </RULES>
+ <RULES SET="CHANGED">
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">A</EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">D</EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">M</EOL_SPAN>
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT2">_</EOL_SPAN>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/swig.xml b/jEdit/modes/swig.xml
index 59cb36e..ffa2712 100644
--- a/jEdit/modes/swig.xml
+++ b/jEdit/modes/swig.xml
@@ -1,34 +1,34 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
-
- <SPAN TYPE="LITERAL3" ESCAPE="\">
- <BEGIN>%{</BEGIN>
- <END>%}</END>
- </SPAN>
-
- <!-- swig directive -->
- <MARK_FOLLOWING AT_WORD_START="TRUE" TYPE="KEYWORD4">%</MARK_FOLLOWING>
-
- <IMPORT DELEGATE="c::MAIN"/>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+
+ <SPAN TYPE="LITERAL3" ESCAPE="\">
+ <BEGIN>%{</BEGIN>
+ <END>%}</END>
+ </SPAN>
+
+ <!-- swig directive -->
+ <MARK_FOLLOWING AT_WORD_START="TRUE" TYPE="KEYWORD4">%</MARK_FOLLOWING>
+
+ <IMPORT DELEGATE="c::MAIN"/>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/tcl.xml b/jEdit/modes/tcl.xml
index d16d786..7590fd8 100644
--- a/jEdit/modes/tcl.xml
+++ b/jEdit/modes/tcl.xml
@@ -1,685 +1,685 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Tcl mode by Michael Jacobson.
- cplusplus and pascal modes used as reference.
- 2006/10/20 Jean-Francois Larvoire:
- - Fixed comments detection: Only # at the beginning of Tcl commands are comments!
- - Quoted strings can span multiple lines.
- - Added recursive in-string substituted command and variable analysis.
- - Added numerous missing tcl keywords and variables up to version 8.4.14.
- - Removed $ on global variable keywords, as they're often used with $::.
- - Added Expect keywords, as KEYWORD2. (send was already in tk as KEYWORD2)
- - Avoid colouring substituted variables that are homonyms of a keyword.
- - Highlight hexadecimal numbers too.
- 2006/10/23 Jean-Francois Larvoire:
- - Strings and blocks only begin at word start.
- - Updated {# comment detection to manage the whole {} block. This catches
- all { and }, and makes it unnecessary to define them as KEYWORDs.
- - Bug fix: Do not delegate content evaluation for ${} scalar variables.
- 2009/02/10: Albert Davidson Chou - added lineComment property for TCL mode (2119958)
-
- Limitations:
- - Unbalanced quotes or brackets within braces, such as in regular expressions,
- will confuse the analysis. Workaround: If possible, use a \ to escape the
- unbalanced character. Else add a ;# comment with a closing " or ].
- Known bugs:
- - Continuation line detection does not work. Same bug as espace chars below.
- - ; highlighting as an OPERATOR does not work.
- Known bugs (Were there before, and I failed to fix them):
- - \c escape colouring does not work for escapes embedded in words.
- I attemted numerous workarounds using spans and regexps, but they
- all seem to fail to detect anything beginning with a \. And using
- NO_ESCAPE="TRUE" does not help.
- - {} within quoted strings should not affect indentation. -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- </PROPS>
-
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="0x\p{XDigit}+|\d+">
-
- <!-- Continuation line. Processed before anything else by Tcl. (Does not work)-->
- <EOL_SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="\">\\$</EOL_SPAN_REGEXP>
-
- <!-- Comments after a ; command separator -->
- <!-- Note: The ; isn't bolded as other operators. Why?-->
- <EOL_SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR=";" DELEGATE="TCL_COMMENT">;\s*(?=#)</EOL_SPAN_REGEXP>
- <!-- Comments at the { opening of a block -->
- <SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="{" DELEGATE="TCL_COMMENT">
- <BEGIN>\{\s*(?=#)</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
- <!-- Comments on a line of their own. -->
- <EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">#</EOL_SPAN>
-
- <!-- Quoted strings -->
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE" AT_WORD_START="TRUE" DELEGATE="TCL_STRING">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- Avoid colouring substituted variables that are homonyms of a keyword -->
- <!-- Indexed array variable. Delegate to MAIN, as the index string is evaluated by Tcl.-->
- <SPAN_REGEXP TYPE="NULL" HASH_CHAR="$" DELEGATE="MAIN">
- <BEGIN>\$(\w|::)+\(</BEGIN>
- <END>)</END>
- </SPAN_REGEXP>
- <!-- General scalar variable. Do not delegate, as the ${} block content is not evalutated by Tcl. -->
- <SPAN TYPE="NULL">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
- <!-- Plain scalar variable. -->
- <SEQ_REGEXP TYPE="NULL" HASH_CHAR="$">\$(\w|::)+</SEQ_REGEXP>
-
- <!-- Sub-block -->
- <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" AT_WORD_START="TRUE" DELEGATE="MAIN">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- Sub-commands to be substituted -->
- <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" DELEGATE="MAIN">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Escaped characters -->
- <SEQ TYPE="KEYWORD3">\a</SEQ>
- <SEQ TYPE="KEYWORD3">\b</SEQ>
- <SEQ TYPE="KEYWORD3">\f</SEQ>
- <SEQ TYPE="KEYWORD3">\n</SEQ>
- <SEQ TYPE="KEYWORD3">\r</SEQ>
- <SEQ TYPE="KEYWORD3">\t</SEQ>
- <SEQ TYPE="KEYWORD3">\v</SEQ>
-
- <!-- Tcl syntax operators. -->
- <!-- Note that "{}[]" are already caught above.-->
- <!-- Delegate to main, as a new command begins after the ; -->
- <SEQ TYPE="OPERATOR" DELEGATE="MAIN">;</SEQ>
- <SEQ TYPE="NULL">::</SEQ>
-
- <!-- Math expression operators -->
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
-
- <KEYWORDS>
- <!-- Tcl keywords-->
- <KEYWORD1>append</KEYWORD1>
- <KEYWORD1>array</KEYWORD1>
- <KEYWORD1>concat</KEYWORD1>
- <KEYWORD1>console</KEYWORD1>
- <KEYWORD1>eval</KEYWORD1>
- <KEYWORD1>expr</KEYWORD1>
- <KEYWORD1>format</KEYWORD1>
- <KEYWORD1>global</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>trace</KEYWORD1>
- <KEYWORD1>unset</KEYWORD1>
- <KEYWORD1>upvar</KEYWORD1>
- <KEYWORD1>join</KEYWORD1>
- <KEYWORD1>lappend</KEYWORD1>
- <KEYWORD1>lindex</KEYWORD1>
- <KEYWORD1>linsert</KEYWORD1>
- <KEYWORD1>list</KEYWORD1>
- <KEYWORD1>llength</KEYWORD1>
- <KEYWORD1>lrange</KEYWORD1>
- <KEYWORD1>lreplace</KEYWORD1>
- <KEYWORD1>lsearch</KEYWORD1>
- <KEYWORD1>lsort</KEYWORD1>
- <KEYWORD1>split</KEYWORD1>
- <KEYWORD1>scan</KEYWORD1>
- <KEYWORD1>string</KEYWORD1>
- <KEYWORD1>regexp</KEYWORD1>
- <KEYWORD1>regsub</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>elseif</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>foreach</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>proc</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>source</KEYWORD1>
- <KEYWORD1>unknown</KEYWORD1>
- <KEYWORD1>uplevel</KEYWORD1>
- <KEYWORD1>cd</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>eof</KEYWORD1>
- <KEYWORD1>file</KEYWORD1>
- <KEYWORD1>flush</KEYWORD1>
- <KEYWORD1>gets</KEYWORD1>
- <KEYWORD1>glob</KEYWORD1>
- <KEYWORD1>open</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>puts</KEYWORD1>
- <KEYWORD1>pwd</KEYWORD1>
- <KEYWORD1>seek</KEYWORD1>
- <KEYWORD1>tell</KEYWORD1>
- <KEYWORD1>catch</KEYWORD1>
- <KEYWORD1>error</KEYWORD1>
- <KEYWORD1>exec</KEYWORD1>
- <KEYWORD1>pid</KEYWORD1>
- <KEYWORD1>after</KEYWORD1>
- <KEYWORD1>time</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>history</KEYWORD1>
- <KEYWORD1>rename</KEYWORD1>
- <KEYWORD1>info</KEYWORD1>
- <!-- expr keywords-->
- <KEYWORD1>ceil</KEYWORD1>
- <KEYWORD1>floor</KEYWORD1>
- <KEYWORD1>round</KEYWORD1>
- <KEYWORD1>incr</KEYWORD1>
- <KEYWORD1>abs</KEYWORD1>
- <KEYWORD1>acos</KEYWORD1>
- <KEYWORD1>cos</KEYWORD1>
- <KEYWORD1>cosh</KEYWORD1>
- <KEYWORD1>asin</KEYWORD1>
- <KEYWORD1>sin</KEYWORD1>
- <KEYWORD1>sinh</KEYWORD1>
- <KEYWORD1>atan</KEYWORD1>
- <KEYWORD1>atan2</KEYWORD1>
- <KEYWORD1>tan</KEYWORD1>
- <KEYWORD1>tanh</KEYWORD1>
- <KEYWORD1>log</KEYWORD1>
- <KEYWORD1>log10</KEYWORD1>
- <KEYWORD1>fmod</KEYWORD1>
- <KEYWORD1>pow</KEYWORD1>
- <KEYWORD1>hypot</KEYWORD1>
- <KEYWORD1>sqrt</KEYWORD1>
- <KEYWORD1>double</KEYWORD1>
- <KEYWORD1>int</KEYWORD1>
- <!-- New Tcl keywords up to tcl 8.4.14 -->
- <KEYWORD1>bgerror</KEYWORD1>
- <KEYWORD1>binary</KEYWORD1>
- <KEYWORD1>clock</KEYWORD1>
- <KEYWORD1>dde</KEYWORD1>
- <KEYWORD1>encoding</KEYWORD1>
- <KEYWORD1>fblocked</KEYWORD1>
- <KEYWORD1>fconfigure</KEYWORD1>
- <KEYWORD1>fcopy</KEYWORD1>
- <KEYWORD1>fileevent</KEYWORD1>
- <KEYWORD1>filename</KEYWORD1>
- <KEYWORD1>http</KEYWORD1>
- <KEYWORD1>interp</KEYWORD1>
- <KEYWORD1>load</KEYWORD1>
- <KEYWORD1>lset</KEYWORD1>
- <KEYWORD1>memory</KEYWORD1>
- <KEYWORD1>msgcat</KEYWORD1>
- <KEYWORD1>namespace</KEYWORD1>
- <KEYWORD1>package</KEYWORD1>
- <KEYWORD1>pkg::create</KEYWORD1>
- <KEYWORD1>pkg_mkIndex</KEYWORD1>
- <KEYWORD1>registry</KEYWORD1>
- <KEYWORD1>resource</KEYWORD1>
- <KEYWORD1>socket</KEYWORD1>
- <KEYWORD1>subst</KEYWORD1>
- <KEYWORD1>update</KEYWORD1>
- <KEYWORD1>variable</KEYWORD1>
- <KEYWORD1>vwait</KEYWORD1>
- <!-- Standard library of Tcl interpretor procedures -->
- <KEYWORD1>auto_execok</KEYWORD1>
- <KEYWORD1>auto_import</KEYWORD1>
- <KEYWORD1>auto_load</KEYWORD1>
- <KEYWORD1>auto_mkindex</KEYWORD1>
- <KEYWORD1>auto_mkindex_old</KEYWORD1>
- <KEYWORD1>auto_qualify</KEYWORD1>
- <KEYWORD1>auto_reset</KEYWORD1>
- <KEYWORD1>parray</KEYWORD1>
- <KEYWORD1>tcl_endOfWord</KEYWORD1>
- <KEYWORD1>tcl_findLibrary</KEYWORD1>
- <KEYWORD1>tcl_startOfNextWord</KEYWORD1>
- <KEYWORD1>tcl_startOfPreviousWord</KEYWORD1>
- <KEYWORD1>tcl_wordBreakAfter</KEYWORD1>
- <KEYWORD1>tcl_wordBreakBefore</KEYWORD1>
-
- <!-- Tk keywords -->
- <KEYWORD2>bind</KEYWORD2>
- <KEYWORD2>button</KEYWORD2>
- <KEYWORD2>canvas</KEYWORD2>
- <KEYWORD2>checkbutton</KEYWORD2>
- <KEYWORD2>destroy</KEYWORD2>
- <KEYWORD2>entry</KEYWORD2>
- <KEYWORD2>focus</KEYWORD2>
- <KEYWORD2>frame</KEYWORD2>
- <KEYWORD2>grab</KEYWORD2>
- <KEYWORD2>image</KEYWORD2>
- <KEYWORD2>label</KEYWORD2>
- <KEYWORD2>listbox</KEYWORD2>
- <KEYWORD2>lower</KEYWORD2>
- <KEYWORD2>menu</KEYWORD2>
- <KEYWORD2>menubutton</KEYWORD2>
- <KEYWORD2>message</KEYWORD2>
- <KEYWORD2>option</KEYWORD2>
- <KEYWORD2>pack</KEYWORD2>
- <KEYWORD2>placer</KEYWORD2>
- <KEYWORD2>radiobutton</KEYWORD2>
- <KEYWORD2>raise</KEYWORD2>
- <KEYWORD2>scale</KEYWORD2>
- <KEYWORD2>scrollbar</KEYWORD2>
- <KEYWORD2>selection</KEYWORD2>
- <KEYWORD2>send</KEYWORD2>
- <KEYWORD2>text</KEYWORD2>
- <KEYWORD2>tk</KEYWORD2>
- <KEYWORD2>tkerror</KEYWORD2>
- <KEYWORD2>tkwait</KEYWORD2>
- <KEYWORD2>toplevel</KEYWORD2>
- <KEYWORD2>update</KEYWORD2>
- <KEYWORD2>winfo</KEYWORD2>
- <KEYWORD2>wm</KEYWORD2>
-
- <!-- Expect keywords. Using KEYWORD2 as send is already one -->
- <!-- KEYWORD2 close -->
- <KEYWORD2>debug</KEYWORD2>
- <KEYWORD2>disconnect</KEYWORD2>
- <!-- KEYWORD2 exit -->
- <KEYWORD2>exp_continue</KEYWORD2>
- <KEYWORD2>exp_internal</KEYWORD2>
- <KEYWORD2>exp_open</KEYWORD2>
- <KEYWORD2>exp_pid</KEYWORD2>
- <KEYWORD2>exp_version</KEYWORD2>
- <KEYWORD2>expect</KEYWORD2>
- <KEYWORD2>expect_after</KEYWORD2>
- <KEYWORD2>expect_background</KEYWORD2>
- <KEYWORD2>expect_before</KEYWORD2>
- <KEYWORD2>expect_tty</KEYWORD2>
- <KEYWORD2>expect_user</KEYWORD2>
- <KEYWORD2>fork</KEYWORD2>
- <KEYWORD2>inter_return</KEYWORD2>
- <KEYWORD2>interact</KEYWORD2>
- <KEYWORD2>interpreter</KEYWORD2>
- <KEYWORD2>log_file</KEYWORD2>
- <KEYWORD2>log_user</KEYWORD2>
- <KEYWORD2>match_max</KEYWORD2>
- <KEYWORD2>overlay</KEYWORD2>
- <KEYWORD2>parity</KEYWORD2>
- <KEYWORD2>promptl</KEYWORD2>
- <KEYWORD2>prompt2</KEYWORD2>
- <KEYWORD2>remove_nulls</KEYWORD2>
- <!-- KEYWORD2 send -->
- <KEYWORD2>send_error </KEYWORD2>
- <KEYWORD2>send_log</KEYWORD2>
- <KEYWORD2>send_tty</KEYWORD2>
- <KEYWORD2>send_user</KEYWORD2>
- <KEYWORD2>sleep</KEYWORD2>
- <KEYWORD2>spawn</KEYWORD2>
- <KEYWORD2>strace</KEYWORD2>
- <KEYWORD2>stty</KEYWORD2>
- <KEYWORD2>system</KEYWORD2>
- <KEYWORD2>timestamp</KEYWORD2>
- <KEYWORD2>trap</KEYWORD2>
- <KEYWORD2>wait</KEYWORD2>
- <!-- Arguments to expect commands-->
- <KEYWORD3>full_buffer</KEYWORD3>
- <KEYWORD3>timeout</KEYWORD3>
- <!-- KEYWORD3 eof-->
-
- <!-- Global variables-->
- <KEYWORD3>argv0</KEYWORD3>
- <KEYWORD3>argv</KEYWORD3>
- <KEYWORD3>argc</KEYWORD3>
- <KEYWORD3>tk_version</KEYWORD3>
- <KEYWORD3>tk_library</KEYWORD3>
- <KEYWORD3>tk_strictMotif</KEYWORD3>
- <!-- New global variables up to tcl 8.4.14 -->
- <KEYWORD3>env</KEYWORD3>
- <KEYWORD3>errorCode</KEYWORD3>
- <KEYWORD3>errorInfo</KEYWORD3>
- <KEYWORD3>geometry</KEYWORD3>
- <KEYWORD3>tcl_library</KEYWORD3>
- <KEYWORD3>tcl_patchLevel</KEYWORD3>
- <KEYWORD3>tcl_pkgPath</KEYWORD3>
- <KEYWORD3>tcl_platform</KEYWORD3>
- <KEYWORD3>tcl_precision</KEYWORD3>
- <KEYWORD3>tcl_rcFileName</KEYWORD3>
- <KEYWORD3>tcl_rcRsrcName</KEYWORD3>
- <KEYWORD3>tcl_traceCompile</KEYWORD3>
- <KEYWORD3>tcl_traceExec</KEYWORD3>
- <KEYWORD3>tcl_wordchars</KEYWORD3>
- <KEYWORD3>tcl_nonwordchars</KEYWORD3>
- <KEYWORD3>tcl_version</KEYWORD3>
- <KEYWORD3>tcl_interactive</KEYWORD3>
-
- <!-- Common arguments to tcl and Tk keywords -->
- <KEYWORD3>exact</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- <KEYWORD3>indices</KEYWORD3>
- <KEYWORD3>nocase</KEYWORD3>
- <KEYWORD3>nocomplain</KEYWORD3>
- <KEYWORD3>nonewline</KEYWORD3>
- <KEYWORD3>code</KEYWORD3>
- <KEYWORD3>errorinfo</KEYWORD3>
- <KEYWORD3>errorcode</KEYWORD3>
- <KEYWORD3>atime</KEYWORD3>
- <KEYWORD3>anymore</KEYWORD3>
- <KEYWORD3>args</KEYWORD3>
- <KEYWORD3>body</KEYWORD3>
- <KEYWORD3>compare</KEYWORD3>
- <KEYWORD3>cmdcount</KEYWORD3>
- <KEYWORD3>commands</KEYWORD3>
- <KEYWORD3>ctime</KEYWORD3>
- <KEYWORD3>current</KEYWORD3>
- <KEYWORD3>default</KEYWORD3>
- <KEYWORD3>dev</KEYWORD3>
- <KEYWORD3>dirname</KEYWORD3>
- <KEYWORD3>donesearch</KEYWORD3>
- <KEYWORD3>errorinfo</KEYWORD3>
- <KEYWORD3>executable</KEYWORD3>
- <KEYWORD3>extension</KEYWORD3>
- <KEYWORD3>first</KEYWORD3>
- <KEYWORD3>globals</KEYWORD3>
- <KEYWORD3>gid</KEYWORD3>
- <KEYWORD3>index</KEYWORD3>
- <KEYWORD3>ino</KEYWORD3>
- <KEYWORD3>isdirectory</KEYWORD3>
- <KEYWORD3>isfile</KEYWORD3>
- <KEYWORD3>keep</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>level</KEYWORD3>
- <KEYWORD3>length</KEYWORD3>
- <KEYWORD3>library</KEYWORD3>
- <KEYWORD3>locals</KEYWORD3>
- <KEYWORD3>lstat</KEYWORD3>
- <KEYWORD3>match</KEYWORD3>
- <KEYWORD3>mode</KEYWORD3>
- <KEYWORD3>mtime</KEYWORD3>
- <KEYWORD3>names</KEYWORD3>
- <KEYWORD3>nextelement</KEYWORD3>
- <KEYWORD3>nextid</KEYWORD3>
- <KEYWORD3>nlink</KEYWORD3>
- <KEYWORD3>none</KEYWORD3>
- <KEYWORD3>procs</KEYWORD3>
- <KEYWORD3>owned</KEYWORD3>
- <KEYWORD3>range</KEYWORD3>
- <KEYWORD3>readable</KEYWORD3>
- <KEYWORD3>readlink</KEYWORD3>
- <KEYWORD3>redo</KEYWORD3>
- <KEYWORD3>release</KEYWORD3>
- <KEYWORD3>rootname</KEYWORD3>
- <KEYWORD3>script</KEYWORD3>
- <KEYWORD3>show</KEYWORD3>
- <KEYWORD3>size</KEYWORD3>
- <KEYWORD3>startsearch</KEYWORD3>
- <KEYWORD3>stat</KEYWORD3>
- <KEYWORD3>status</KEYWORD3>
- <KEYWORD3>substitute</KEYWORD3>
- <KEYWORD3>tail</KEYWORD3>
- <KEYWORD3>tclversion</KEYWORD3>
- <KEYWORD3>tolower</KEYWORD3>
- <KEYWORD3>toupper</KEYWORD3>
- <KEYWORD3>trim</KEYWORD3>
- <KEYWORD3>trimleft</KEYWORD3>
- <KEYWORD3>trimright</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>uid</KEYWORD3>
- <KEYWORD3>variable</KEYWORD3>
- <KEYWORD3>vars</KEYWORD3>
- <KEYWORD3>vdelete</KEYWORD3>
- <KEYWORD3>vinfo</KEYWORD3>
- <KEYWORD3>visibility</KEYWORD3>
- <KEYWORD3>window</KEYWORD3>
- <KEYWORD3>writable</KEYWORD3>
- <KEYWORD3>accelerator</KEYWORD3>
- <KEYWORD3>activeforeground</KEYWORD3>
- <KEYWORD3>activebackground</KEYWORD3>
- <KEYWORD3>anchor</KEYWORD3>
- <KEYWORD3>aspect</KEYWORD3>
- <KEYWORD3>background</KEYWORD3>
- <KEYWORD3>before</KEYWORD3>
- <KEYWORD3>bg</KEYWORD3>
- <KEYWORD3>borderwidth</KEYWORD3>
- <KEYWORD3>bd</KEYWORD3>
- <KEYWORD3>bitmap</KEYWORD3>
- <KEYWORD3>command</KEYWORD3>
- <KEYWORD3>cursor</KEYWORD3>
- <KEYWORD3>default</KEYWORD3>
- <KEYWORD3>expand</KEYWORD3>
- <KEYWORD3>family</KEYWORD3>
- <KEYWORD3>fg</KEYWORD3>
- <KEYWORD3>fill</KEYWORD3>
- <KEYWORD3>font</KEYWORD3>
- <KEYWORD3>force</KEYWORD3>
- <KEYWORD3>foreground</KEYWORD3>
- <KEYWORD3>from</KEYWORD3>
- <KEYWORD3>height</KEYWORD3>
- <KEYWORD3>icon</KEYWORD3>
- <KEYWORD3>question</KEYWORD3>
- <KEYWORD3>warning</KEYWORD3>
- <KEYWORD3>in</KEYWORD3>
- <KEYWORD3>ipadx</KEYWORD3>
- <KEYWORD3>ipady</KEYWORD3>
- <KEYWORD3>justify</KEYWORD3>
- <KEYWORD3>left</KEYWORD3>
- <KEYWORD3>center</KEYWORD3>
- <KEYWORD3>right</KEYWORD3>
- <KEYWORD3>length</KEYWORD3>
- <KEYWORD3>padx</KEYWORD3>
- <KEYWORD3>pady</KEYWORD3>
- <KEYWORD3>offvalue</KEYWORD3>
- <KEYWORD3>onvalue</KEYWORD3>
- <KEYWORD3>orient</KEYWORD3>
- <KEYWORD3>horizontal</KEYWORD3>
- <KEYWORD3>vertical</KEYWORD3>
- <KEYWORD3>outline</KEYWORD3>
- <KEYWORD3>oversrike</KEYWORD3>
- <KEYWORD3>relief</KEYWORD3>
- <KEYWORD3>raised</KEYWORD3>
- <KEYWORD3>sunken</KEYWORD3>
- <KEYWORD3>flat</KEYWORD3>
- <KEYWORD3>groove</KEYWORD3>
- <KEYWORD3>ridge</KEYWORD3>
- <KEYWORD3>solid</KEYWORD3>
- <KEYWORD3>screen</KEYWORD3>
- <KEYWORD3>selectbackground</KEYWORD3>
- <KEYWORD3>selectforeground</KEYWORD3>
- <KEYWORD3>setgrid</KEYWORD3>
- <KEYWORD3>side</KEYWORD3>
- <KEYWORD3>size</KEYWORD3>
- <KEYWORD3>slant</KEYWORD3>
- <KEYWORD3>left</KEYWORD3>
- <KEYWORD3>right</KEYWORD3>
- <KEYWORD3>top</KEYWORD3>
- <KEYWORD3>bottom</KEYWORD3>
- <KEYWORD3>spacing1</KEYWORD3>
- <KEYWORD3>spacing2</KEYWORD3>
- <KEYWORD3>spacing3</KEYWORD3>
- <KEYWORD3>state</KEYWORD3>
- <KEYWORD3>stipple</KEYWORD3>
- <KEYWORD3>takefocus</KEYWORD3>
- <KEYWORD3>tearoff</KEYWORD3>
- <KEYWORD3>textvariable</KEYWORD3>
- <KEYWORD3>title</KEYWORD3>
- <KEYWORD3>to</KEYWORD3>
- <KEYWORD3>type</KEYWORD3>
- <KEYWORD3>abortretryignore</KEYWORD3>
- <KEYWORD3>ok</KEYWORD3>
- <KEYWORD3>okcancel</KEYWORD3>
- <KEYWORD3>retrycancel</KEYWORD3>
- <KEYWORD3>yesno</KEYWORD3>
- <KEYWORD3>yesnocancel</KEYWORD3>
- <KEYWORD3>underline</KEYWORD3>
- <KEYWORD3>value</KEYWORD3>
- <KEYWORD3>variable</KEYWORD3>
- <KEYWORD3>weight</KEYWORD3>
- <KEYWORD3>width</KEYWORD3>
- <KEYWORD3>xscrollcommand</KEYWORD3>
- <KEYWORD3>yscrollcommand</KEYWORD3>
- <KEYWORD3>active</KEYWORD3>
- <KEYWORD3>add</KEYWORD3>
- <KEYWORD3>arc</KEYWORD3>
- <KEYWORD3>aspect</KEYWORD3>
- <KEYWORD3>bitmap</KEYWORD3>
- <KEYWORD3>cascade</KEYWORD3>
- <KEYWORD3>cget</KEYWORD3>
- <KEYWORD3>children</KEYWORD3>
- <KEYWORD3>class</KEYWORD3>
- <KEYWORD3>clear</KEYWORD3>
- <KEYWORD3>client</KEYWORD3>
- <KEYWORD3>create</KEYWORD3>
- <KEYWORD3>colormodel</KEYWORD3>
- <KEYWORD3>command</KEYWORD3>
- <KEYWORD3>configure</KEYWORD3>
- <KEYWORD3>deiconify</KEYWORD3>
- <KEYWORD3>delete</KEYWORD3>
- <KEYWORD3>disabled</KEYWORD3>
- <KEYWORD3>exists</KEYWORD3>
- <KEYWORD3>focusmodel</KEYWORD3>
- <KEYWORD3>flash</KEYWORD3>
- <KEYWORD3>forget</KEYWORD3>
- <KEYWORD3>geometry</KEYWORD3>
- <KEYWORD3>get</KEYWORD3>
- <KEYWORD3>group</KEYWORD3>
- <KEYWORD3>handle</KEYWORD3>
- <KEYWORD3>iconbitmap</KEYWORD3>
- <KEYWORD3>iconify</KEYWORD3>
- <KEYWORD3>iconmask</KEYWORD3>
- <KEYWORD3>iconname</KEYWORD3>
- <KEYWORD3>iconposition</KEYWORD3>
- <KEYWORD3>iconwindow</KEYWORD3>
- <KEYWORD3>idletasks</KEYWORD3>
- <KEYWORD3>insert</KEYWORD3>
- <KEYWORD3>interps</KEYWORD3>
- <KEYWORD3>itemconfigure</KEYWORD3>
- <KEYWORD3>invoke</KEYWORD3>
- <KEYWORD3>line</KEYWORD3>
- <KEYWORD3>mark</KEYWORD3>
- <KEYWORD3>maxsize</KEYWORD3>
- <KEYWORD3>minsize</KEYWORD3>
- <KEYWORD3>move</KEYWORD3>
- <KEYWORD3>name</KEYWORD3>
- <KEYWORD3>normal</KEYWORD3>
- <KEYWORD3>overrideredirect</KEYWORD3>
- <KEYWORD3>oval</KEYWORD3>
- <KEYWORD3>own</KEYWORD3>
- <KEYWORD3>photo</KEYWORD3>
- <KEYWORD3>polygon</KEYWORD3>
- <KEYWORD3>positionfrom</KEYWORD3>
- <KEYWORD3>propagate</KEYWORD3>
- <KEYWORD3>protocol</KEYWORD3>
- <KEYWORD3>ranges</KEYWORD3>
- <KEYWORD3>rectangle</KEYWORD3>
- <KEYWORD3>remove</KEYWORD3>
- <KEYWORD3>resizable</KEYWORD3>
- <KEYWORD3>separator</KEYWORD3>
- <KEYWORD3>slaves</KEYWORD3>
- <KEYWORD3>sizefrom</KEYWORD3>
- <KEYWORD3>state</KEYWORD3>
- <KEYWORD3>tag</KEYWORD3>
- <KEYWORD3>title</KEYWORD3>
- <KEYWORD3>transient</KEYWORD3>
- <KEYWORD3>window</KEYWORD3>
- <KEYWORD3>withdraw</KEYWORD3>
- <KEYWORD3>xview</KEYWORD3>
- <KEYWORD3>yview</KEYWORD3>
- <KEYWORD3>Activate</KEYWORD3>
- <KEYWORD3>Alt</KEYWORD3>
- <KEYWORD3>Any</KEYWORD3>
- <KEYWORD3>B1</KEYWORD3>
- <KEYWORD3>B2</KEYWORD3>
- <KEYWORD3>B3</KEYWORD3>
- <KEYWORD3>Button1</KEYWORD3>
- <KEYWORD3>Button2</KEYWORD3>
- <KEYWORD3>Button3</KEYWORD3>
- <KEYWORD3>ButtonPress</KEYWORD3>
- <KEYWORD3>ButtonRelease</KEYWORD3>
- <KEYWORD3>Double</KEYWORD3>
- <KEYWORD3>Circulate</KEYWORD3>
- <KEYWORD3>Colormap</KEYWORD3>
- <KEYWORD3>Configure</KEYWORD3>
- <KEYWORD3>Control</KEYWORD3>
- <KEYWORD3>Deactivate</KEYWORD3>
- <KEYWORD3>Escape</KEYWORD3>
- <KEYWORD3>Expose</KEYWORD3>
- <KEYWORD3>FocusIn</KEYWORD3>
- <KEYWORD3>FocusOut</KEYWORD3>
- <KEYWORD3>Gravity</KEYWORD3>
- <KEYWORD3>Key</KEYWORD3>
- <KEYWORD3>KeyPress</KEYWORD3>
- <KEYWORD3>KeyRelease</KEYWORD3>
- <KEYWORD3>Lock</KEYWORD3>
- <KEYWORD3>Meta</KEYWORD3>
- <KEYWORD3>Property</KEYWORD3>
- <KEYWORD3>Reparent</KEYWORD3>
- <KEYWORD3>Shift</KEYWORD3>
- <KEYWORD3>Unmap</KEYWORD3>
- <KEYWORD3>Visibility</KEYWORD3>
- <KEYWORD3>Button</KEYWORD3>
- <KEYWORD3>ButtonPress</KEYWORD3>
- <KEYWORD3>ButtonRelease</KEYWORD3>
- <KEYWORD3>Destroy</KEYWORD3>
- <KEYWORD3>Escape</KEYWORD3>
- <KEYWORD3>Enter</KEYWORD3>
- <KEYWORD3>Leave</KEYWORD3>
- <KEYWORD3>Motion</KEYWORD3>
- <KEYWORD3>MenuSelect</KEYWORD3>
- <KEYWORD3>Triple</KEYWORD3>
- <KEYWORD3>all</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="TCL_COMMENT" DEFAULT="OPERATOR">
- <!-- Allows catching blocks starting with a comment.
- or comments following a ; -->
- <SEQ_REGEXP TYPE="COMMENT1" HASH_CHAR="#" DELEGATE="MAIN">#.*</SEQ_REGEXP>
- </RULES>
-
- <RULES SET="TCL_STRING" DEFAULT="LITERAL1" ESCAPE="\">
- <PROPS>
- <PROPERTY NAME="indentOpenBrackets" VALUE="" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="" />
- </PROPS>
-
- <!-- Continuation line. Processed before anything else by Tcl.-->
- <EOL_SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="\">\\$</EOL_SPAN_REGEXP>
-
- <!-- Avoid colouring variables substituted inside strings -->
- <SPAN_REGEXP TYPE="NULL" HASH_CHAR="$" DELEGATE="MAIN">
- <BEGIN>\$(\w|::)+\(</BEGIN>
- <END>)</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="NULL" HASH_CHAR="$" DELEGATE="MAIN">
- <BEGIN>\$\{</BEGIN>
- <END>}</END>
- </SPAN_REGEXP>
- <SEQ_REGEXP TYPE="NULL" HASH_CHAR="$">\$(\w|::)+</SEQ_REGEXP>
-
- <!-- Sub-commands to be substituted -->
- <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" DELEGATE="MAIN">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Escaped characters -->
- <SEQ TYPE="KEYWORD3">\a</SEQ>
- <SEQ TYPE="KEYWORD3">\b</SEQ>
- <SEQ TYPE="KEYWORD3">\f</SEQ>
- <SEQ TYPE="KEYWORD3">\n</SEQ>
- <SEQ TYPE="KEYWORD3">\r</SEQ>
- <SEQ TYPE="KEYWORD3">\t</SEQ>
- <SEQ TYPE="KEYWORD3">\v</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Tcl mode by Michael Jacobson.
+ cplusplus and pascal modes used as reference.
+ 2006/10/20 Jean-Francois Larvoire:
+ - Fixed comments detection: Only # at the beginning of Tcl commands are comments!
+ - Quoted strings can span multiple lines.
+ - Added recursive in-string substituted command and variable analysis.
+ - Added numerous missing tcl keywords and variables up to version 8.4.14.
+ - Removed $ on global variable keywords, as they're often used with $::.
+ - Added Expect keywords, as KEYWORD2. (send was already in tk as KEYWORD2)
+ - Avoid colouring substituted variables that are homonyms of a keyword.
+ - Highlight hexadecimal numbers too.
+ 2006/10/23 Jean-Francois Larvoire:
+ - Strings and blocks only begin at word start.
+ - Updated {# comment detection to manage the whole {} block. This catches
+ all { and }, and makes it unnecessary to define them as KEYWORDs.
+ - Bug fix: Do not delegate content evaluation for ${} scalar variables.
+ 2009/02/10: Albert Davidson Chou - added lineComment property for TCL mode (2119958)
+
+ Limitations:
+ - Unbalanced quotes or brackets within braces, such as in regular expressions,
+ will confuse the analysis. Workaround: If possible, use a \ to escape the
+ unbalanced character. Else add a ;# comment with a closing " or ].
+ Known bugs:
+ - Continuation line detection does not work. Same bug as espace chars below.
+ - ; highlighting as an OPERATOR does not work.
+ Known bugs (Were there before, and I failed to fix them):
+ - \c escape colouring does not work for escapes embedded in words.
+ I attemted numerous workarounds using spans and regexps, but they
+ all seem to fail to detect anything beginning with a \. And using
+ NO_ESCAPE="TRUE" does not help.
+ - {} within quoted strings should not affect indentation. -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="0x\p{XDigit}+|\d+">
+
+ <!-- Continuation line. Processed before anything else by Tcl. (Does not work)-->
+ <EOL_SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="\">\\$</EOL_SPAN_REGEXP>
+
+ <!-- Comments after a ; command separator -->
+ <!-- Note: The ; isn't bolded as other operators. Why?-->
+ <EOL_SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR=";" DELEGATE="TCL_COMMENT">;\s*(?=#)</EOL_SPAN_REGEXP>
+ <!-- Comments at the { opening of a block -->
+ <SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="{" DELEGATE="TCL_COMMENT">
+ <BEGIN>\{\s*(?=#)</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+ <!-- Comments on a line of their own. -->
+ <EOL_SPAN TYPE="COMMENT1" AT_WHITESPACE_END="TRUE">#</EOL_SPAN>
+
+ <!-- Quoted strings -->
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE" AT_WORD_START="TRUE" DELEGATE="TCL_STRING">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- Avoid colouring substituted variables that are homonyms of a keyword -->
+ <!-- Indexed array variable. Delegate to MAIN, as the index string is evaluated by Tcl.-->
+ <SPAN_REGEXP TYPE="NULL" HASH_CHAR="$" DELEGATE="MAIN">
+ <BEGIN>\$(\w|::)+\(</BEGIN>
+ <END>)</END>
+ </SPAN_REGEXP>
+ <!-- General scalar variable. Do not delegate, as the ${} block content is not evalutated by Tcl. -->
+ <SPAN TYPE="NULL">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <!-- Plain scalar variable. -->
+ <SEQ_REGEXP TYPE="NULL" HASH_CHAR="$">\$(\w|::)+</SEQ_REGEXP>
+
+ <!-- Sub-block -->
+ <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" AT_WORD_START="TRUE" DELEGATE="MAIN">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Sub-commands to be substituted -->
+ <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" DELEGATE="MAIN">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Escaped characters -->
+ <SEQ TYPE="KEYWORD3">\a</SEQ>
+ <SEQ TYPE="KEYWORD3">\b</SEQ>
+ <SEQ TYPE="KEYWORD3">\f</SEQ>
+ <SEQ TYPE="KEYWORD3">\n</SEQ>
+ <SEQ TYPE="KEYWORD3">\r</SEQ>
+ <SEQ TYPE="KEYWORD3">\t</SEQ>
+ <SEQ TYPE="KEYWORD3">\v</SEQ>
+
+ <!-- Tcl syntax operators. -->
+ <!-- Note that "{}[]" are already caught above.-->
+ <!-- Delegate to main, as a new command begins after the ; -->
+ <SEQ TYPE="OPERATOR" DELEGATE="MAIN">;</SEQ>
+ <SEQ TYPE="NULL">::</SEQ>
+
+ <!-- Math expression operators -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+
+ <KEYWORDS>
+ <!-- Tcl keywords-->
+ <KEYWORD1>append</KEYWORD1>
+ <KEYWORD1>array</KEYWORD1>
+ <KEYWORD1>concat</KEYWORD1>
+ <KEYWORD1>console</KEYWORD1>
+ <KEYWORD1>eval</KEYWORD1>
+ <KEYWORD1>expr</KEYWORD1>
+ <KEYWORD1>format</KEYWORD1>
+ <KEYWORD1>global</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>trace</KEYWORD1>
+ <KEYWORD1>unset</KEYWORD1>
+ <KEYWORD1>upvar</KEYWORD1>
+ <KEYWORD1>join</KEYWORD1>
+ <KEYWORD1>lappend</KEYWORD1>
+ <KEYWORD1>lindex</KEYWORD1>
+ <KEYWORD1>linsert</KEYWORD1>
+ <KEYWORD1>list</KEYWORD1>
+ <KEYWORD1>llength</KEYWORD1>
+ <KEYWORD1>lrange</KEYWORD1>
+ <KEYWORD1>lreplace</KEYWORD1>
+ <KEYWORD1>lsearch</KEYWORD1>
+ <KEYWORD1>lsort</KEYWORD1>
+ <KEYWORD1>split</KEYWORD1>
+ <KEYWORD1>scan</KEYWORD1>
+ <KEYWORD1>string</KEYWORD1>
+ <KEYWORD1>regexp</KEYWORD1>
+ <KEYWORD1>regsub</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>elseif</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>foreach</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>proc</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>source</KEYWORD1>
+ <KEYWORD1>unknown</KEYWORD1>
+ <KEYWORD1>uplevel</KEYWORD1>
+ <KEYWORD1>cd</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>eof</KEYWORD1>
+ <KEYWORD1>file</KEYWORD1>
+ <KEYWORD1>flush</KEYWORD1>
+ <KEYWORD1>gets</KEYWORD1>
+ <KEYWORD1>glob</KEYWORD1>
+ <KEYWORD1>open</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>puts</KEYWORD1>
+ <KEYWORD1>pwd</KEYWORD1>
+ <KEYWORD1>seek</KEYWORD1>
+ <KEYWORD1>tell</KEYWORD1>
+ <KEYWORD1>catch</KEYWORD1>
+ <KEYWORD1>error</KEYWORD1>
+ <KEYWORD1>exec</KEYWORD1>
+ <KEYWORD1>pid</KEYWORD1>
+ <KEYWORD1>after</KEYWORD1>
+ <KEYWORD1>time</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>history</KEYWORD1>
+ <KEYWORD1>rename</KEYWORD1>
+ <KEYWORD1>info</KEYWORD1>
+ <!-- expr keywords-->
+ <KEYWORD1>ceil</KEYWORD1>
+ <KEYWORD1>floor</KEYWORD1>
+ <KEYWORD1>round</KEYWORD1>
+ <KEYWORD1>incr</KEYWORD1>
+ <KEYWORD1>abs</KEYWORD1>
+ <KEYWORD1>acos</KEYWORD1>
+ <KEYWORD1>cos</KEYWORD1>
+ <KEYWORD1>cosh</KEYWORD1>
+ <KEYWORD1>asin</KEYWORD1>
+ <KEYWORD1>sin</KEYWORD1>
+ <KEYWORD1>sinh</KEYWORD1>
+ <KEYWORD1>atan</KEYWORD1>
+ <KEYWORD1>atan2</KEYWORD1>
+ <KEYWORD1>tan</KEYWORD1>
+ <KEYWORD1>tanh</KEYWORD1>
+ <KEYWORD1>log</KEYWORD1>
+ <KEYWORD1>log10</KEYWORD1>
+ <KEYWORD1>fmod</KEYWORD1>
+ <KEYWORD1>pow</KEYWORD1>
+ <KEYWORD1>hypot</KEYWORD1>
+ <KEYWORD1>sqrt</KEYWORD1>
+ <KEYWORD1>double</KEYWORD1>
+ <KEYWORD1>int</KEYWORD1>
+ <!-- New Tcl keywords up to tcl 8.4.14 -->
+ <KEYWORD1>bgerror</KEYWORD1>
+ <KEYWORD1>binary</KEYWORD1>
+ <KEYWORD1>clock</KEYWORD1>
+ <KEYWORD1>dde</KEYWORD1>
+ <KEYWORD1>encoding</KEYWORD1>
+ <KEYWORD1>fblocked</KEYWORD1>
+ <KEYWORD1>fconfigure</KEYWORD1>
+ <KEYWORD1>fcopy</KEYWORD1>
+ <KEYWORD1>fileevent</KEYWORD1>
+ <KEYWORD1>filename</KEYWORD1>
+ <KEYWORD1>http</KEYWORD1>
+ <KEYWORD1>interp</KEYWORD1>
+ <KEYWORD1>load</KEYWORD1>
+ <KEYWORD1>lset</KEYWORD1>
+ <KEYWORD1>memory</KEYWORD1>
+ <KEYWORD1>msgcat</KEYWORD1>
+ <KEYWORD1>namespace</KEYWORD1>
+ <KEYWORD1>package</KEYWORD1>
+ <KEYWORD1>pkg::create</KEYWORD1>
+ <KEYWORD1>pkg_mkIndex</KEYWORD1>
+ <KEYWORD1>registry</KEYWORD1>
+ <KEYWORD1>resource</KEYWORD1>
+ <KEYWORD1>socket</KEYWORD1>
+ <KEYWORD1>subst</KEYWORD1>
+ <KEYWORD1>update</KEYWORD1>
+ <KEYWORD1>variable</KEYWORD1>
+ <KEYWORD1>vwait</KEYWORD1>
+ <!-- Standard library of Tcl interpretor procedures -->
+ <KEYWORD1>auto_execok</KEYWORD1>
+ <KEYWORD1>auto_import</KEYWORD1>
+ <KEYWORD1>auto_load</KEYWORD1>
+ <KEYWORD1>auto_mkindex</KEYWORD1>
+ <KEYWORD1>auto_mkindex_old</KEYWORD1>
+ <KEYWORD1>auto_qualify</KEYWORD1>
+ <KEYWORD1>auto_reset</KEYWORD1>
+ <KEYWORD1>parray</KEYWORD1>
+ <KEYWORD1>tcl_endOfWord</KEYWORD1>
+ <KEYWORD1>tcl_findLibrary</KEYWORD1>
+ <KEYWORD1>tcl_startOfNextWord</KEYWORD1>
+ <KEYWORD1>tcl_startOfPreviousWord</KEYWORD1>
+ <KEYWORD1>tcl_wordBreakAfter</KEYWORD1>
+ <KEYWORD1>tcl_wordBreakBefore</KEYWORD1>
+
+ <!-- Tk keywords -->
+ <KEYWORD2>bind</KEYWORD2>
+ <KEYWORD2>button</KEYWORD2>
+ <KEYWORD2>canvas</KEYWORD2>
+ <KEYWORD2>checkbutton</KEYWORD2>
+ <KEYWORD2>destroy</KEYWORD2>
+ <KEYWORD2>entry</KEYWORD2>
+ <KEYWORD2>focus</KEYWORD2>
+ <KEYWORD2>frame</KEYWORD2>
+ <KEYWORD2>grab</KEYWORD2>
+ <KEYWORD2>image</KEYWORD2>
+ <KEYWORD2>label</KEYWORD2>
+ <KEYWORD2>listbox</KEYWORD2>
+ <KEYWORD2>lower</KEYWORD2>
+ <KEYWORD2>menu</KEYWORD2>
+ <KEYWORD2>menubutton</KEYWORD2>
+ <KEYWORD2>message</KEYWORD2>
+ <KEYWORD2>option</KEYWORD2>
+ <KEYWORD2>pack</KEYWORD2>
+ <KEYWORD2>placer</KEYWORD2>
+ <KEYWORD2>radiobutton</KEYWORD2>
+ <KEYWORD2>raise</KEYWORD2>
+ <KEYWORD2>scale</KEYWORD2>
+ <KEYWORD2>scrollbar</KEYWORD2>
+ <KEYWORD2>selection</KEYWORD2>
+ <KEYWORD2>send</KEYWORD2>
+ <KEYWORD2>text</KEYWORD2>
+ <KEYWORD2>tk</KEYWORD2>
+ <KEYWORD2>tkerror</KEYWORD2>
+ <KEYWORD2>tkwait</KEYWORD2>
+ <KEYWORD2>toplevel</KEYWORD2>
+ <KEYWORD2>update</KEYWORD2>
+ <KEYWORD2>winfo</KEYWORD2>
+ <KEYWORD2>wm</KEYWORD2>
+
+ <!-- Expect keywords. Using KEYWORD2 as send is already one -->
+ <!-- KEYWORD2 close -->
+ <KEYWORD2>debug</KEYWORD2>
+ <KEYWORD2>disconnect</KEYWORD2>
+ <!-- KEYWORD2 exit -->
+ <KEYWORD2>exp_continue</KEYWORD2>
+ <KEYWORD2>exp_internal</KEYWORD2>
+ <KEYWORD2>exp_open</KEYWORD2>
+ <KEYWORD2>exp_pid</KEYWORD2>
+ <KEYWORD2>exp_version</KEYWORD2>
+ <KEYWORD2>expect</KEYWORD2>
+ <KEYWORD2>expect_after</KEYWORD2>
+ <KEYWORD2>expect_background</KEYWORD2>
+ <KEYWORD2>expect_before</KEYWORD2>
+ <KEYWORD2>expect_tty</KEYWORD2>
+ <KEYWORD2>expect_user</KEYWORD2>
+ <KEYWORD2>fork</KEYWORD2>
+ <KEYWORD2>inter_return</KEYWORD2>
+ <KEYWORD2>interact</KEYWORD2>
+ <KEYWORD2>interpreter</KEYWORD2>
+ <KEYWORD2>log_file</KEYWORD2>
+ <KEYWORD2>log_user</KEYWORD2>
+ <KEYWORD2>match_max</KEYWORD2>
+ <KEYWORD2>overlay</KEYWORD2>
+ <KEYWORD2>parity</KEYWORD2>
+ <KEYWORD2>promptl</KEYWORD2>
+ <KEYWORD2>prompt2</KEYWORD2>
+ <KEYWORD2>remove_nulls</KEYWORD2>
+ <!-- KEYWORD2 send -->
+ <KEYWORD2>send_error </KEYWORD2>
+ <KEYWORD2>send_log</KEYWORD2>
+ <KEYWORD2>send_tty</KEYWORD2>
+ <KEYWORD2>send_user</KEYWORD2>
+ <KEYWORD2>sleep</KEYWORD2>
+ <KEYWORD2>spawn</KEYWORD2>
+ <KEYWORD2>strace</KEYWORD2>
+ <KEYWORD2>stty</KEYWORD2>
+ <KEYWORD2>system</KEYWORD2>
+ <KEYWORD2>timestamp</KEYWORD2>
+ <KEYWORD2>trap</KEYWORD2>
+ <KEYWORD2>wait</KEYWORD2>
+ <!-- Arguments to expect commands-->
+ <KEYWORD3>full_buffer</KEYWORD3>
+ <KEYWORD3>timeout</KEYWORD3>
+ <!-- KEYWORD3 eof-->
+
+ <!-- Global variables-->
+ <KEYWORD3>argv0</KEYWORD3>
+ <KEYWORD3>argv</KEYWORD3>
+ <KEYWORD3>argc</KEYWORD3>
+ <KEYWORD3>tk_version</KEYWORD3>
+ <KEYWORD3>tk_library</KEYWORD3>
+ <KEYWORD3>tk_strictMotif</KEYWORD3>
+ <!-- New global variables up to tcl 8.4.14 -->
+ <KEYWORD3>env</KEYWORD3>
+ <KEYWORD3>errorCode</KEYWORD3>
+ <KEYWORD3>errorInfo</KEYWORD3>
+ <KEYWORD3>geometry</KEYWORD3>
+ <KEYWORD3>tcl_library</KEYWORD3>
+ <KEYWORD3>tcl_patchLevel</KEYWORD3>
+ <KEYWORD3>tcl_pkgPath</KEYWORD3>
+ <KEYWORD3>tcl_platform</KEYWORD3>
+ <KEYWORD3>tcl_precision</KEYWORD3>
+ <KEYWORD3>tcl_rcFileName</KEYWORD3>
+ <KEYWORD3>tcl_rcRsrcName</KEYWORD3>
+ <KEYWORD3>tcl_traceCompile</KEYWORD3>
+ <KEYWORD3>tcl_traceExec</KEYWORD3>
+ <KEYWORD3>tcl_wordchars</KEYWORD3>
+ <KEYWORD3>tcl_nonwordchars</KEYWORD3>
+ <KEYWORD3>tcl_version</KEYWORD3>
+ <KEYWORD3>tcl_interactive</KEYWORD3>
+
+ <!-- Common arguments to tcl and Tk keywords -->
+ <KEYWORD3>exact</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ <KEYWORD3>indices</KEYWORD3>
+ <KEYWORD3>nocase</KEYWORD3>
+ <KEYWORD3>nocomplain</KEYWORD3>
+ <KEYWORD3>nonewline</KEYWORD3>
+ <KEYWORD3>code</KEYWORD3>
+ <KEYWORD3>errorinfo</KEYWORD3>
+ <KEYWORD3>errorcode</KEYWORD3>
+ <KEYWORD3>atime</KEYWORD3>
+ <KEYWORD3>anymore</KEYWORD3>
+ <KEYWORD3>args</KEYWORD3>
+ <KEYWORD3>body</KEYWORD3>
+ <KEYWORD3>compare</KEYWORD3>
+ <KEYWORD3>cmdcount</KEYWORD3>
+ <KEYWORD3>commands</KEYWORD3>
+ <KEYWORD3>ctime</KEYWORD3>
+ <KEYWORD3>current</KEYWORD3>
+ <KEYWORD3>default</KEYWORD3>
+ <KEYWORD3>dev</KEYWORD3>
+ <KEYWORD3>dirname</KEYWORD3>
+ <KEYWORD3>donesearch</KEYWORD3>
+ <KEYWORD3>errorinfo</KEYWORD3>
+ <KEYWORD3>executable</KEYWORD3>
+ <KEYWORD3>extension</KEYWORD3>
+ <KEYWORD3>first</KEYWORD3>
+ <KEYWORD3>globals</KEYWORD3>
+ <KEYWORD3>gid</KEYWORD3>
+ <KEYWORD3>index</KEYWORD3>
+ <KEYWORD3>ino</KEYWORD3>
+ <KEYWORD3>isdirectory</KEYWORD3>
+ <KEYWORD3>isfile</KEYWORD3>
+ <KEYWORD3>keep</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>level</KEYWORD3>
+ <KEYWORD3>length</KEYWORD3>
+ <KEYWORD3>library</KEYWORD3>
+ <KEYWORD3>locals</KEYWORD3>
+ <KEYWORD3>lstat</KEYWORD3>
+ <KEYWORD3>match</KEYWORD3>
+ <KEYWORD3>mode</KEYWORD3>
+ <KEYWORD3>mtime</KEYWORD3>
+ <KEYWORD3>names</KEYWORD3>
+ <KEYWORD3>nextelement</KEYWORD3>
+ <KEYWORD3>nextid</KEYWORD3>
+ <KEYWORD3>nlink</KEYWORD3>
+ <KEYWORD3>none</KEYWORD3>
+ <KEYWORD3>procs</KEYWORD3>
+ <KEYWORD3>owned</KEYWORD3>
+ <KEYWORD3>range</KEYWORD3>
+ <KEYWORD3>readable</KEYWORD3>
+ <KEYWORD3>readlink</KEYWORD3>
+ <KEYWORD3>redo</KEYWORD3>
+ <KEYWORD3>release</KEYWORD3>
+ <KEYWORD3>rootname</KEYWORD3>
+ <KEYWORD3>script</KEYWORD3>
+ <KEYWORD3>show</KEYWORD3>
+ <KEYWORD3>size</KEYWORD3>
+ <KEYWORD3>startsearch</KEYWORD3>
+ <KEYWORD3>stat</KEYWORD3>
+ <KEYWORD3>status</KEYWORD3>
+ <KEYWORD3>substitute</KEYWORD3>
+ <KEYWORD3>tail</KEYWORD3>
+ <KEYWORD3>tclversion</KEYWORD3>
+ <KEYWORD3>tolower</KEYWORD3>
+ <KEYWORD3>toupper</KEYWORD3>
+ <KEYWORD3>trim</KEYWORD3>
+ <KEYWORD3>trimleft</KEYWORD3>
+ <KEYWORD3>trimright</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>uid</KEYWORD3>
+ <KEYWORD3>variable</KEYWORD3>
+ <KEYWORD3>vars</KEYWORD3>
+ <KEYWORD3>vdelete</KEYWORD3>
+ <KEYWORD3>vinfo</KEYWORD3>
+ <KEYWORD3>visibility</KEYWORD3>
+ <KEYWORD3>window</KEYWORD3>
+ <KEYWORD3>writable</KEYWORD3>
+ <KEYWORD3>accelerator</KEYWORD3>
+ <KEYWORD3>activeforeground</KEYWORD3>
+ <KEYWORD3>activebackground</KEYWORD3>
+ <KEYWORD3>anchor</KEYWORD3>
+ <KEYWORD3>aspect</KEYWORD3>
+ <KEYWORD3>background</KEYWORD3>
+ <KEYWORD3>before</KEYWORD3>
+ <KEYWORD3>bg</KEYWORD3>
+ <KEYWORD3>borderwidth</KEYWORD3>
+ <KEYWORD3>bd</KEYWORD3>
+ <KEYWORD3>bitmap</KEYWORD3>
+ <KEYWORD3>command</KEYWORD3>
+ <KEYWORD3>cursor</KEYWORD3>
+ <KEYWORD3>default</KEYWORD3>
+ <KEYWORD3>expand</KEYWORD3>
+ <KEYWORD3>family</KEYWORD3>
+ <KEYWORD3>fg</KEYWORD3>
+ <KEYWORD3>fill</KEYWORD3>
+ <KEYWORD3>font</KEYWORD3>
+ <KEYWORD3>force</KEYWORD3>
+ <KEYWORD3>foreground</KEYWORD3>
+ <KEYWORD3>from</KEYWORD3>
+ <KEYWORD3>height</KEYWORD3>
+ <KEYWORD3>icon</KEYWORD3>
+ <KEYWORD3>question</KEYWORD3>
+ <KEYWORD3>warning</KEYWORD3>
+ <KEYWORD3>in</KEYWORD3>
+ <KEYWORD3>ipadx</KEYWORD3>
+ <KEYWORD3>ipady</KEYWORD3>
+ <KEYWORD3>justify</KEYWORD3>
+ <KEYWORD3>left</KEYWORD3>
+ <KEYWORD3>center</KEYWORD3>
+ <KEYWORD3>right</KEYWORD3>
+ <KEYWORD3>length</KEYWORD3>
+ <KEYWORD3>padx</KEYWORD3>
+ <KEYWORD3>pady</KEYWORD3>
+ <KEYWORD3>offvalue</KEYWORD3>
+ <KEYWORD3>onvalue</KEYWORD3>
+ <KEYWORD3>orient</KEYWORD3>
+ <KEYWORD3>horizontal</KEYWORD3>
+ <KEYWORD3>vertical</KEYWORD3>
+ <KEYWORD3>outline</KEYWORD3>
+ <KEYWORD3>oversrike</KEYWORD3>
+ <KEYWORD3>relief</KEYWORD3>
+ <KEYWORD3>raised</KEYWORD3>
+ <KEYWORD3>sunken</KEYWORD3>
+ <KEYWORD3>flat</KEYWORD3>
+ <KEYWORD3>groove</KEYWORD3>
+ <KEYWORD3>ridge</KEYWORD3>
+ <KEYWORD3>solid</KEYWORD3>
+ <KEYWORD3>screen</KEYWORD3>
+ <KEYWORD3>selectbackground</KEYWORD3>
+ <KEYWORD3>selectforeground</KEYWORD3>
+ <KEYWORD3>setgrid</KEYWORD3>
+ <KEYWORD3>side</KEYWORD3>
+ <KEYWORD3>size</KEYWORD3>
+ <KEYWORD3>slant</KEYWORD3>
+ <KEYWORD3>left</KEYWORD3>
+ <KEYWORD3>right</KEYWORD3>
+ <KEYWORD3>top</KEYWORD3>
+ <KEYWORD3>bottom</KEYWORD3>
+ <KEYWORD3>spacing1</KEYWORD3>
+ <KEYWORD3>spacing2</KEYWORD3>
+ <KEYWORD3>spacing3</KEYWORD3>
+ <KEYWORD3>state</KEYWORD3>
+ <KEYWORD3>stipple</KEYWORD3>
+ <KEYWORD3>takefocus</KEYWORD3>
+ <KEYWORD3>tearoff</KEYWORD3>
+ <KEYWORD3>textvariable</KEYWORD3>
+ <KEYWORD3>title</KEYWORD3>
+ <KEYWORD3>to</KEYWORD3>
+ <KEYWORD3>type</KEYWORD3>
+ <KEYWORD3>abortretryignore</KEYWORD3>
+ <KEYWORD3>ok</KEYWORD3>
+ <KEYWORD3>okcancel</KEYWORD3>
+ <KEYWORD3>retrycancel</KEYWORD3>
+ <KEYWORD3>yesno</KEYWORD3>
+ <KEYWORD3>yesnocancel</KEYWORD3>
+ <KEYWORD3>underline</KEYWORD3>
+ <KEYWORD3>value</KEYWORD3>
+ <KEYWORD3>variable</KEYWORD3>
+ <KEYWORD3>weight</KEYWORD3>
+ <KEYWORD3>width</KEYWORD3>
+ <KEYWORD3>xscrollcommand</KEYWORD3>
+ <KEYWORD3>yscrollcommand</KEYWORD3>
+ <KEYWORD3>active</KEYWORD3>
+ <KEYWORD3>add</KEYWORD3>
+ <KEYWORD3>arc</KEYWORD3>
+ <KEYWORD3>aspect</KEYWORD3>
+ <KEYWORD3>bitmap</KEYWORD3>
+ <KEYWORD3>cascade</KEYWORD3>
+ <KEYWORD3>cget</KEYWORD3>
+ <KEYWORD3>children</KEYWORD3>
+ <KEYWORD3>class</KEYWORD3>
+ <KEYWORD3>clear</KEYWORD3>
+ <KEYWORD3>client</KEYWORD3>
+ <KEYWORD3>create</KEYWORD3>
+ <KEYWORD3>colormodel</KEYWORD3>
+ <KEYWORD3>command</KEYWORD3>
+ <KEYWORD3>configure</KEYWORD3>
+ <KEYWORD3>deiconify</KEYWORD3>
+ <KEYWORD3>delete</KEYWORD3>
+ <KEYWORD3>disabled</KEYWORD3>
+ <KEYWORD3>exists</KEYWORD3>
+ <KEYWORD3>focusmodel</KEYWORD3>
+ <KEYWORD3>flash</KEYWORD3>
+ <KEYWORD3>forget</KEYWORD3>
+ <KEYWORD3>geometry</KEYWORD3>
+ <KEYWORD3>get</KEYWORD3>
+ <KEYWORD3>group</KEYWORD3>
+ <KEYWORD3>handle</KEYWORD3>
+ <KEYWORD3>iconbitmap</KEYWORD3>
+ <KEYWORD3>iconify</KEYWORD3>
+ <KEYWORD3>iconmask</KEYWORD3>
+ <KEYWORD3>iconname</KEYWORD3>
+ <KEYWORD3>iconposition</KEYWORD3>
+ <KEYWORD3>iconwindow</KEYWORD3>
+ <KEYWORD3>idletasks</KEYWORD3>
+ <KEYWORD3>insert</KEYWORD3>
+ <KEYWORD3>interps</KEYWORD3>
+ <KEYWORD3>itemconfigure</KEYWORD3>
+ <KEYWORD3>invoke</KEYWORD3>
+ <KEYWORD3>line</KEYWORD3>
+ <KEYWORD3>mark</KEYWORD3>
+ <KEYWORD3>maxsize</KEYWORD3>
+ <KEYWORD3>minsize</KEYWORD3>
+ <KEYWORD3>move</KEYWORD3>
+ <KEYWORD3>name</KEYWORD3>
+ <KEYWORD3>normal</KEYWORD3>
+ <KEYWORD3>overrideredirect</KEYWORD3>
+ <KEYWORD3>oval</KEYWORD3>
+ <KEYWORD3>own</KEYWORD3>
+ <KEYWORD3>photo</KEYWORD3>
+ <KEYWORD3>polygon</KEYWORD3>
+ <KEYWORD3>positionfrom</KEYWORD3>
+ <KEYWORD3>propagate</KEYWORD3>
+ <KEYWORD3>protocol</KEYWORD3>
+ <KEYWORD3>ranges</KEYWORD3>
+ <KEYWORD3>rectangle</KEYWORD3>
+ <KEYWORD3>remove</KEYWORD3>
+ <KEYWORD3>resizable</KEYWORD3>
+ <KEYWORD3>separator</KEYWORD3>
+ <KEYWORD3>slaves</KEYWORD3>
+ <KEYWORD3>sizefrom</KEYWORD3>
+ <KEYWORD3>state</KEYWORD3>
+ <KEYWORD3>tag</KEYWORD3>
+ <KEYWORD3>title</KEYWORD3>
+ <KEYWORD3>transient</KEYWORD3>
+ <KEYWORD3>window</KEYWORD3>
+ <KEYWORD3>withdraw</KEYWORD3>
+ <KEYWORD3>xview</KEYWORD3>
+ <KEYWORD3>yview</KEYWORD3>
+ <KEYWORD3>Activate</KEYWORD3>
+ <KEYWORD3>Alt</KEYWORD3>
+ <KEYWORD3>Any</KEYWORD3>
+ <KEYWORD3>B1</KEYWORD3>
+ <KEYWORD3>B2</KEYWORD3>
+ <KEYWORD3>B3</KEYWORD3>
+ <KEYWORD3>Button1</KEYWORD3>
+ <KEYWORD3>Button2</KEYWORD3>
+ <KEYWORD3>Button3</KEYWORD3>
+ <KEYWORD3>ButtonPress</KEYWORD3>
+ <KEYWORD3>ButtonRelease</KEYWORD3>
+ <KEYWORD3>Double</KEYWORD3>
+ <KEYWORD3>Circulate</KEYWORD3>
+ <KEYWORD3>Colormap</KEYWORD3>
+ <KEYWORD3>Configure</KEYWORD3>
+ <KEYWORD3>Control</KEYWORD3>
+ <KEYWORD3>Deactivate</KEYWORD3>
+ <KEYWORD3>Escape</KEYWORD3>
+ <KEYWORD3>Expose</KEYWORD3>
+ <KEYWORD3>FocusIn</KEYWORD3>
+ <KEYWORD3>FocusOut</KEYWORD3>
+ <KEYWORD3>Gravity</KEYWORD3>
+ <KEYWORD3>Key</KEYWORD3>
+ <KEYWORD3>KeyPress</KEYWORD3>
+ <KEYWORD3>KeyRelease</KEYWORD3>
+ <KEYWORD3>Lock</KEYWORD3>
+ <KEYWORD3>Meta</KEYWORD3>
+ <KEYWORD3>Property</KEYWORD3>
+ <KEYWORD3>Reparent</KEYWORD3>
+ <KEYWORD3>Shift</KEYWORD3>
+ <KEYWORD3>Unmap</KEYWORD3>
+ <KEYWORD3>Visibility</KEYWORD3>
+ <KEYWORD3>Button</KEYWORD3>
+ <KEYWORD3>ButtonPress</KEYWORD3>
+ <KEYWORD3>ButtonRelease</KEYWORD3>
+ <KEYWORD3>Destroy</KEYWORD3>
+ <KEYWORD3>Escape</KEYWORD3>
+ <KEYWORD3>Enter</KEYWORD3>
+ <KEYWORD3>Leave</KEYWORD3>
+ <KEYWORD3>Motion</KEYWORD3>
+ <KEYWORD3>MenuSelect</KEYWORD3>
+ <KEYWORD3>Triple</KEYWORD3>
+ <KEYWORD3>all</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="TCL_COMMENT" DEFAULT="OPERATOR">
+ <!-- Allows catching blocks starting with a comment.
+ or comments following a ; -->
+ <SEQ_REGEXP TYPE="COMMENT1" HASH_CHAR="#" DELEGATE="MAIN">#.*</SEQ_REGEXP>
+ </RULES>
+
+ <RULES SET="TCL_STRING" DEFAULT="LITERAL1" ESCAPE="\">
+ <PROPS>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="" />
+ </PROPS>
+
+ <!-- Continuation line. Processed before anything else by Tcl.-->
+ <EOL_SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="\">\\$</EOL_SPAN_REGEXP>
+
+ <!-- Avoid colouring variables substituted inside strings -->
+ <SPAN_REGEXP TYPE="NULL" HASH_CHAR="$" DELEGATE="MAIN">
+ <BEGIN>\$(\w|::)+\(</BEGIN>
+ <END>)</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="NULL" HASH_CHAR="$" DELEGATE="MAIN">
+ <BEGIN>\$\{</BEGIN>
+ <END>}</END>
+ </SPAN_REGEXP>
+ <SEQ_REGEXP TYPE="NULL" HASH_CHAR="$">\$(\w|::)+</SEQ_REGEXP>
+
+ <!-- Sub-commands to be substituted -->
+ <SPAN TYPE="OPERATOR" NO_LINE_BREAK="FALSE" DELEGATE="MAIN">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Escaped characters -->
+ <SEQ TYPE="KEYWORD3">\a</SEQ>
+ <SEQ TYPE="KEYWORD3">\b</SEQ>
+ <SEQ TYPE="KEYWORD3">\f</SEQ>
+ <SEQ TYPE="KEYWORD3">\n</SEQ>
+ <SEQ TYPE="KEYWORD3">\r</SEQ>
+ <SEQ TYPE="KEYWORD3">\t</SEQ>
+ <SEQ TYPE="KEYWORD3">\v</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/tex.xml b/jEdit/modes/tex.xml
index c59bfa8..712e93d 100644
--- a/jEdit/modes/tex.xml
+++ b/jEdit/modes/tex.xml
@@ -1,107 +1,107 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="%" />
- <PROPERTY NAME="wordBreakChars" VALUE="{}" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE">
- <!-- $$...$$ -->
- <SPAN TYPE="MARKUP" DELEGATE="MATH">
- <BEGIN>$$</BEGIN>
- <END>$$</END>
- </SPAN>
-
- <!-- $...$ -->
- <SPAN TYPE="MARKUP" DELEGATE="MATH">
- <BEGIN>$</BEGIN>
- <END>$</END>
- </SPAN>
-
- <!-- \[...\] (LaTeX math mode) -->
- <SPAN TYPE="MARKUP" DELEGATE="MATH">
- <BEGIN>\[</BEGIN>
- <END>\]</END>
- </SPAN>
-
- <!-- some commands must be handled specially -->
- <SEQ TYPE="KEYWORD1">\$</SEQ>
- <SEQ TYPE="KEYWORD1">\\</SEQ>
- <SEQ TYPE="KEYWORD1">\%</SEQ>
-
- <!-- \iffalse ... \fi - a block comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>\iffalse</BEGIN>
- <END>\fi</END>
- </SPAN>
-
- <!-- \begin{verbatim} ... \end{verbatim} -->
- <SPAN TYPE="KEYWORD1" DELEGATE="VERBATIM">
- <BEGIN>\begin{verbatim}</BEGIN>
- <END>\end{verbatim}</END>
- </SPAN>
-
- <!-- \verb|sometext| -->
- <SPAN TYPE="KEYWORD1" DELEGATE="VERBATIM"
- NO_LINE_BREAK="TRUE">
- <BEGIN>\verb|</BEGIN>
- <END>|</END>
- </SPAN>
- <!-- \... commands -->
- <MARK_FOLLOWING TYPE="KEYWORD1">\</MARK_FOLLOWING>
-
- <!-- comments -->
- <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
-
- <!-- word separators -->
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- </RULES>
-
- <RULES SET="MATH" DEFAULT="MARKUP">
- <!-- some commands must be handled specially -->
- <SEQ TYPE="KEYWORD3">\$</SEQ>
- <SEQ TYPE="KEYWORD3">\\</SEQ>
- <SEQ TYPE="KEYWORD3">\%</SEQ>
-
- <!-- \... commands -->
- <MARK_FOLLOWING TYPE="KEYWORD3">\</MARK_FOLLOWING>
-
- <!-- word separators -->
- <SEQ TYPE="KEYWORD2">)</SEQ>
- <SEQ TYPE="KEYWORD2">(</SEQ>
- <SEQ TYPE="KEYWORD2">{</SEQ>
- <SEQ TYPE="KEYWORD2">}</SEQ>
- <SEQ TYPE="KEYWORD2">[</SEQ>
- <SEQ TYPE="KEYWORD2">]</SEQ>
- <SEQ TYPE="KEYWORD2">=</SEQ>
- <SEQ TYPE="KEYWORD2">!</SEQ>
- <SEQ TYPE="KEYWORD2">+</SEQ>
- <SEQ TYPE="KEYWORD2">-</SEQ>
- <SEQ TYPE="KEYWORD2">/</SEQ>
- <SEQ TYPE="KEYWORD2">*</SEQ>
- <SEQ TYPE="KEYWORD2">></SEQ>
- <SEQ TYPE="KEYWORD2"><</SEQ>
- <SEQ TYPE="KEYWORD2">&</SEQ>
- <SEQ TYPE="KEYWORD2">|</SEQ>
- <SEQ TYPE="KEYWORD2">^</SEQ>
- <SEQ TYPE="KEYWORD2">~</SEQ>
- <SEQ TYPE="KEYWORD2">.</SEQ>
- <SEQ TYPE="KEYWORD2">,</SEQ>
- <SEQ TYPE="KEYWORD2">;</SEQ>
- <SEQ TYPE="KEYWORD2">?</SEQ>
- <SEQ TYPE="KEYWORD2">:</SEQ>
- <SEQ TYPE="KEYWORD2">'</SEQ>
- <SEQ TYPE="KEYWORD2">"</SEQ>
- <SEQ TYPE="KEYWORD2">`</SEQ>
-
- <!-- comments -->
- <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
- </RULES>
-
- <RULES SET="VERBATIM" DEFAULT="NULL" />
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="%" />
+ <PROPERTY NAME="wordBreakChars" VALUE="{}" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE">
+ <!-- $$...$$ -->
+ <SPAN TYPE="MARKUP" DELEGATE="MATH">
+ <BEGIN>$$</BEGIN>
+ <END>$$</END>
+ </SPAN>
+
+ <!-- $...$ -->
+ <SPAN TYPE="MARKUP" DELEGATE="MATH">
+ <BEGIN>$</BEGIN>
+ <END>$</END>
+ </SPAN>
+
+ <!-- \[...\] (LaTeX math mode) -->
+ <SPAN TYPE="MARKUP" DELEGATE="MATH">
+ <BEGIN>\[</BEGIN>
+ <END>\]</END>
+ </SPAN>
+
+ <!-- some commands must be handled specially -->
+ <SEQ TYPE="KEYWORD1">\$</SEQ>
+ <SEQ TYPE="KEYWORD1">\\</SEQ>
+ <SEQ TYPE="KEYWORD1">\%</SEQ>
+
+ <!-- \iffalse ... \fi - a block comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>\iffalse</BEGIN>
+ <END>\fi</END>
+ </SPAN>
+
+ <!-- \begin{verbatim} ... \end{verbatim} -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="VERBATIM">
+ <BEGIN>\begin{verbatim}</BEGIN>
+ <END>\end{verbatim}</END>
+ </SPAN>
+
+ <!-- \verb|sometext| -->
+ <SPAN TYPE="KEYWORD1" DELEGATE="VERBATIM"
+ NO_LINE_BREAK="TRUE">
+ <BEGIN>\verb|</BEGIN>
+ <END>|</END>
+ </SPAN>
+ <!-- \... commands -->
+ <MARK_FOLLOWING TYPE="KEYWORD1">\</MARK_FOLLOWING>
+
+ <!-- comments -->
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+
+ <!-- word separators -->
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ </RULES>
+
+ <RULES SET="MATH" DEFAULT="MARKUP">
+ <!-- some commands must be handled specially -->
+ <SEQ TYPE="KEYWORD3">\$</SEQ>
+ <SEQ TYPE="KEYWORD3">\\</SEQ>
+ <SEQ TYPE="KEYWORD3">\%</SEQ>
+
+ <!-- \... commands -->
+ <MARK_FOLLOWING TYPE="KEYWORD3">\</MARK_FOLLOWING>
+
+ <!-- word separators -->
+ <SEQ TYPE="KEYWORD2">)</SEQ>
+ <SEQ TYPE="KEYWORD2">(</SEQ>
+ <SEQ TYPE="KEYWORD2">{</SEQ>
+ <SEQ TYPE="KEYWORD2">}</SEQ>
+ <SEQ TYPE="KEYWORD2">[</SEQ>
+ <SEQ TYPE="KEYWORD2">]</SEQ>
+ <SEQ TYPE="KEYWORD2">=</SEQ>
+ <SEQ TYPE="KEYWORD2">!</SEQ>
+ <SEQ TYPE="KEYWORD2">+</SEQ>
+ <SEQ TYPE="KEYWORD2">-</SEQ>
+ <SEQ TYPE="KEYWORD2">/</SEQ>
+ <SEQ TYPE="KEYWORD2">*</SEQ>
+ <SEQ TYPE="KEYWORD2">></SEQ>
+ <SEQ TYPE="KEYWORD2"><</SEQ>
+ <SEQ TYPE="KEYWORD2">&</SEQ>
+ <SEQ TYPE="KEYWORD2">|</SEQ>
+ <SEQ TYPE="KEYWORD2">^</SEQ>
+ <SEQ TYPE="KEYWORD2">~</SEQ>
+ <SEQ TYPE="KEYWORD2">.</SEQ>
+ <SEQ TYPE="KEYWORD2">,</SEQ>
+ <SEQ TYPE="KEYWORD2">;</SEQ>
+ <SEQ TYPE="KEYWORD2">?</SEQ>
+ <SEQ TYPE="KEYWORD2">:</SEQ>
+ <SEQ TYPE="KEYWORD2">'</SEQ>
+ <SEQ TYPE="KEYWORD2">"</SEQ>
+ <SEQ TYPE="KEYWORD2">`</SEQ>
+
+ <!-- comments -->
+ <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
+ </RULES>
+
+ <RULES SET="VERBATIM" DEFAULT="NULL" />
+</MODE>
diff --git a/jEdit/modes/texinfo.xml b/jEdit/modes/texinfo.xml
index 32ce589..277afe1 100644
--- a/jEdit/modes/texinfo.xml
+++ b/jEdit/modes/texinfo.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="@c" />
- </PROPS>
- <RULES>
- <!-- comments -->
- <EOL_SPAN TYPE="COMMENT1">@c </EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">@comment </EOL_SPAN>
-
- <!-- @... commands -->
- <MARK_FOLLOWING TYPE="KEYWORD1">@</MARK_FOLLOWING>
-
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="@c" />
+ </PROPS>
+ <RULES>
+ <!-- comments -->
+ <EOL_SPAN TYPE="COMMENT1">@c </EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">@comment </EOL_SPAN>
+
+ <!-- @... commands -->
+ <MARK_FOLLOWING TYPE="KEYWORD1">@</MARK_FOLLOWING>
+
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/text.xml b/jEdit/modes/text.xml
index fe66537..7f4b044 100644
--- a/jEdit/modes/text.xml
+++ b/jEdit/modes/text.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0"?>
-
-<!-- The most complicated edit mode ever, for plain text mode -->
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <RULES>
- <TERMINATE AT_CHAR="0" />
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!-- The most complicated edit mode ever, for plain text mode -->
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <RULES>
+ <TERMINATE AT_CHAR="0" />
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/tld.xml b/jEdit/modes/tld.xml
new file mode 100644
index 0000000..c77e2e6
--- /dev/null
+++ b/jEdit/modes/tld.xml
@@ -0,0 +1,260 @@
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!-- mode for tag library description (tld) files -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+ <!-- {{{ MAIN -->
+ <RULES>
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- DTD Entity declarations -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="ENTITY-TAGS">
+ <BEGIN><!ENTITY</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CDATA sections -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="CDATA">
+ <BEGIN><![CDATA[</BEGIN>
+ <END>]]></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- PI directives -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN><?</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <KEYWORDS>
+ <KEYWORD4>tagdependent</KEYWORD4>
+ <KEYWORD4>empty</KEYWORD4>
+ <KEYWORD4>scriptless</KEYWORD4>
+ <KEYWORD4>true</KEYWORD4>
+ <KEYWORD4>false</KEYWORD4>
+ <KEYWORD4>NESTED</KEYWORD4>
+ <KEYWORD4>AT_BEGIN</KEYWORD4>
+ <KEYWORD4>AT_END</KEYWORD4>
+ </KEYWORDS>
+
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ TAGS -->
+ <RULES SET="TAGS" DEFAULT="MARKUP" NO_WORD_SEP="-_">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="MARKUP" DELEGATE="STRING">"</SEQ>
+
+ <SEQ TYPE="MARKUP" DELEGATE="tld::MAIN">/></SEQ>
+ <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <KEYWORDS>
+ <KEYWORD1>taglib</KEYWORD1>
+ <KEYWORD1>tag</KEYWORD1>
+ <KEYWORD1>tag-file</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>tag-extension</KEYWORD1>
+ <KEYWORD1>validator</KEYWORD1>
+
+ <KEYWORD2>description</KEYWORD2>
+ <KEYWORD2>display-name</KEYWORD2>
+ <KEYWORD2>icon</KEYWORD2>
+ <KEYWORD2>tlib-version</KEYWORD2>
+ <KEYWORD2>short-name</KEYWORD2>
+ <KEYWORD2>uri</KEYWORD2>
+ <KEYWORD2>listener</KEYWORD2>
+ <KEYWORD2>validator-class</KEYWORD2>
+ <KEYWORD2>init-param</KEYWORD2>
+ <KEYWORD2>name</KEYWORD2>
+ <KEYWORD2>path</KEYWORD2>
+ <KEYWORD2>example</KEYWORD2>
+ <KEYWORD2>tag-extension</KEYWORD2>
+ <KEYWORD2>tag-class</KEYWORD2>
+ <KEYWORD2>tei-class</KEYWORD2>
+ <KEYWORD2>body-content</KEYWORD2>
+ <KEYWORD2>variable</KEYWORD2>
+ <KEYWORD2>attribute</KEYWORD2>
+ <KEYWORD2>dynamic-attributes</KEYWORD2>
+ <KEYWORD2>required</KEYWORD2>
+ <KEYWORD2>rtexprvalue</KEYWORD2>
+ <KEYWORD2>type</KEYWORD2>
+ <KEYWORD2>fragment</KEYWORD2>
+ <KEYWORD2>name-given</KEYWORD2>
+ <KEYWORD2>name-from-attribute</KEYWORD2>
+ <KEYWORD2>variable-class</KEYWORD2>
+ <KEYWORD2>declare</KEYWORD2>
+ <KEYWORD2>scope</KEYWORD2>
+
+
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ DTD-TAGS -->
+ <RULES SET="DTD-TAGS" DEFAULT="KEYWORD2" IGNORE_CASE="FALSE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <!-- Parameter entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>%</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- This appears in some SGML documents -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="MAIN">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>CDATA</KEYWORD1>
+ <KEYWORD1>EMPTY</KEYWORD1>
+ <KEYWORD1>INCLUDE</KEYWORD1>
+ <KEYWORD1>IGNORE</KEYWORD1>
+ <KEYWORD1>NDATA</KEYWORD1>
+ <KEYWORD1>#IMPLIED</KEYWORD1>
+ <KEYWORD1>#PCDATA</KEYWORD1>
+ <KEYWORD1>#REQUIRED</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ ENTITY-TAGS -->
+ <RULES SET="ENTITY-TAGS" DEFAULT="KEYWORD2">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>SYSTEM</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ CDATA -->
+ <RULES SET="CDATA" DEFAULT="COMMENT2">
+ <KEYWORDS>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>yes</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <!-- {{{ STRING -->
+ <RULES SET="STRING" DEFAULT="LITERAL1">
+ <!-- ant property -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SEQ TYPE="NULL">\"</SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="TAGS">"</SEQ>
+
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ <KEYWORDS>
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>yes</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+ </KEYWORDS>
+ </RULES>
+ <!-- }}} -->
+
+ <RULES SET="BACK_TO_XML" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="tld::TAGS">></SEQ>
+ </RULES>
+</MODE>
+
+
diff --git a/jEdit/modes/tpl.xml b/jEdit/modes/tpl.xml
index 67d5ad4..a21737b 100644
--- a/jEdit/modes/tpl.xml
+++ b/jEdit/modes/tpl.xml
@@ -1,94 +1,94 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
- Tpl mode by Brant Gurganus <brantgurganus2001 at cherokeescouting.org>
- Adapted from ColdFusion
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT3">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
-
- <!-- Delegate {php}-Tags to PHP mode -->
- <SPAN TYPE="KEYWORD3" DELEGATE="php::PHP">
- <BEGIN>{PHP}</BEGIN>
- <END>{/PHP}</END>
- </SPAN>
-
- <!-- TPL markup start tags -->
- <SPAN TYPE="KEYWORD3" DELEGATE="TPL">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
- </RULES>
-
- <RULES SET="TPL" DEFAULT="KEYWORD1" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LABEL">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LABEL">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">*</SEQ>
-
-
- <KEYWORDS>
- <KEYWORD1>include</KEYWORD1>
- <OPERATOR>=</OPERATOR>
- <KEYWORD2>START</KEYWORD2>
- <KEYWORD2>END</KEYWORD2>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="TAGS" DEFAULT="MARKUP" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- </RULES>
-</MODE>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+ Tpl mode by Brant Gurganus <brantgurganus2001 at cherokeescouting.org>
+ Adapted from ColdFusion
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT3">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <!-- Delegate {php}-Tags to PHP mode -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="php::PHP">
+ <BEGIN>{PHP}</BEGIN>
+ <END>{/PHP}</END>
+ </SPAN>
+
+ <!-- TPL markup start tags -->
+ <SPAN TYPE="KEYWORD3" DELEGATE="TPL">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="TPL" DEFAULT="KEYWORD1" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LABEL">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LABEL">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+
+ <KEYWORDS>
+ <KEYWORD1>include</KEYWORD1>
+ <OPERATOR>=</OPERATOR>
+ <KEYWORD2>START</KEYWORD2>
+ <KEYWORD2>END</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="TAGS" DEFAULT="MARKUP" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/tsp.xml b/jEdit/modes/tsp.xml
index 5aeeb94..3284c30 100644
--- a/jEdit/modes/tsp.xml
+++ b/jEdit/modes/tsp.xml
@@ -1,269 +1,269 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!-- basic TSP mode -->
-<!-- Recommended catalog entry:
- <MODE NAME="tsp" FILE="tsp.xml"
- FILE_NAME_GLOB="*.tsp" />
--->
-<MODE>
- <PROPS>
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="lineComment" VALUE="?" />
- <PROPERTY NAME="noWordSep" VALUE="_" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
- <RULES ESCAPE="\" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" AT_WORD_START="TRUE" >
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" AT_WORD_START="TRUE" >
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT2">?</EOL_SPAN>
- <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="@">@((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
-
- <!-- assignment -->
- <SEQ TYPE="OPERATOR">=</SEQ>
- <!-- comparison -->
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">^=</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <!-- arithmetic -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">**</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">'</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <!--<SEQ TYPE="OPERATOR">)'</SEQ>
- <SEQ TYPE="OPERATOR">]'</SEQ> -->
-
- <!-- logical -->
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <!-- misc -->
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="NULL">.</SEQ>
- <SEQ TYPE="NULL">,</SEQ>
- <SEQ TYPE="NULL">;</SEQ>
- <SEQ TYPE="NULL">]</SEQ>
- <SEQ TYPE="NULL">[</SEQ>
- <SEQ TYPE="NULL">(</SEQ>
- <SEQ TYPE="NULL">)</SEQ>
- <SEQ TYPE="NULL">{</SEQ>
- <SEQ TYPE="NULL">}</SEQ>
-
- <!-- Function calls -->
- <!--<MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">(</MARK_PREVIOUS>-->
- <KEYWORDS>
- <KEYWORD1>r1</KEYWORD1>
- <KEYWORD1>bjest</KEYWORD1>
- <KEYWORD1>bjident</KEYWORD1>
- <KEYWORD1>corr</KEYWORD1>
- <KEYWORD1>cova</KEYWORD1>
- <KEYWORD1>inst</KEYWORD1>
- <KEYWORD1>kalman</KEYWORD1>
- <KEYWORD1>lad</KEYWORD1>
- <KEYWORD1>liml</KEYWORD1>
- <KEYWORD1>lms</KEYWORD1>
- <KEYWORD1>moment</KEYWORD1>
- <KEYWORD1>msd</KEYWORD1>
- <KEYWORD1>olsq</KEYWORD1>
- <KEYWORD1>panel</KEYWORD1>
- <KEYWORD1>prin</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
- <KEYWORD1>3sls</KEYWORD1>
- <KEYWORD1>arch</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>differ</KEYWORD1>
- <KEYWORD1>eqsub</KEYWORD1>
- <KEYWORD1>fiml</KEYWORD1>
- <KEYWORD1>orm</KEYWORD1>
- <KEYWORD1>frml</KEYWORD1>
- <KEYWORD1>gmm</KEYWORD1>
- <KEYWORD1>ident</KEYWORD1>
- <KEYWORD1>lsq</KEYWORD1>
- <KEYWORD1>param</KEYWORD1>
- <KEYWORD1>sur</KEYWORD1>
- <KEYWORD1>logit</KEYWORD1>
- <KEYWORD1>ml</KEYWORD1>
- <KEYWORD1>negbin</KEYWORD1>
- <KEYWORD1>ordprob</KEYWORD1>
- <KEYWORD1>poisson</KEYWORD1>
- <KEYWORD1>probit</KEYWORD1>
- <KEYWORD1>sampsel</KEYWORD1>
- <KEYWORD1>tobit</KEYWORD1>
- <KEYWORD1>actfit</KEYWORD1>
- <KEYWORD1>bjfrcst</KEYWORD1>
- <KEYWORD1>forcst</KEYWORD1>
- <KEYWORD1>model</KEYWORD1>
- <KEYWORD1>siml</KEYWORD1>
- <KEYWORD1>solve</KEYWORD1>
- <KEYWORD1>capitl</KEYWORD1>
- <KEYWORD1>onvert</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>delete</KEYWORD1>
- <KEYWORD1>divind</KEYWORD1>
- <KEYWORD1>dummy</KEYWORD1>
- <KEYWORD1>genr</KEYWORD1>
- <KEYWORD1>length</KEYWORD1>
- <KEYWORD1>list</KEYWORD1>
- <KEYWORD1>normal</KEYWORD1>
- <KEYWORD1>random</KEYWORD1>
- <KEYWORD1>rename</KEYWORD1>
- <KEYWORD1>sama</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>sort</KEYWORD1>
- <KEYWORD1>trend</KEYWORD1>
- <KEYWORD1>moving</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>dbcomp</KEYWORD1>
- <KEYWORD1>dbconv</KEYWORD1>
- <KEYWORD1>dbcopy</KEYWORD1>
- <KEYWORD1>dbdel</KEYWORD1>
- <KEYWORD1>dbdump</KEYWORD1>
- <KEYWORD1>dblist</KEYWORD1>
- <KEYWORD1>dbprint</KEYWORD1>
- <KEYWORD1>fetch</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD1>keep</KEYWORD1>
- <KEYWORD1>load</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>output</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>recover</KEYWORD1>
- <KEYWORD1>restore</KEYWORD1>
- <KEYWORD1>save</KEYWORD1>
- <KEYWORD1>store</KEYWORD1>
- <KEYWORD1>terminal</KEYWORD1>
- <KEYWORD1>write</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>collect</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>dot</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>enddo</KEYWORD1>
- <KEYWORD1>enddot</KEYWORD1>
- <KEYWORD1>endproc</KEYWORD1>
- <KEYWORD1>exec</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>proc</KEYWORD1>
- <KEYWORD1>quit</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>add</KEYWORD1>
- <KEYWORD1>drop</KEYWORD1>
- <KEYWORD1>edit</KEYWORD1>
- <KEYWORD1>enter</KEYWORD1>
- <KEYWORD1>retry</KEYWORD1>
- <KEYWORD1>update</KEYWORD1>
- <KEYWORD1>asmbug</KEYWORD1>
- <KEYWORD1>compress</KEYWORD1>
- <KEYWORD1>date</KEYWORD1>
- <KEYWORD1>debug</KEYWORD1>
- <KEYWORD1>dir</KEYWORD1>
- <KEYWORD1>doc</KEYWORD1>
- <KEYWORD1>dump</KEYWORD1>
- <KEYWORD1>find</KEYWORD1>
- <KEYWORD1>graph</KEYWORD1>
- <KEYWORD1>help</KEYWORD1>
- <KEYWORD1>helpr</KEYWORD1>
- <KEYWORD1>hist</KEYWORD1>
- <KEYWORD1>name</KEYWORD1>
- <KEYWORD1>nopause</KEYWORD1>
- <KEYWORD1>page</KEYWORD1>
- <KEYWORD1>pause</KEYWORD1>
- <KEYWORD1>plot</KEYWORD1>
- <KEYWORD1>review</KEYWORD1>
- <KEYWORD1>show</KEYWORD1>
- <KEYWORD1>symtab</KEYWORD1>
- <KEYWORD1>system</KEYWORD1>
- <KEYWORD1>title</KEYWORD1>
- <KEYWORD1>tstats</KEYWORD1>
- <KEYWORD1>user</KEYWORD1>
- <KEYWORD1>freq</KEYWORD1>
- <KEYWORD1>noplots</KEYWORD1>
- <KEYWORD1>noprint</KEYWORD1>
- <KEYWORD1>nosupres</KEYWORD1>
- <KEYWORD1>options</KEYWORD1>
- <KEYWORD1>plots</KEYWORD1>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>smpl</KEYWORD1>
- <KEYWORD1>smplif</KEYWORD1>
- <KEYWORD1>supres</KEYWORD1>
- <KEYWORD1>inprod</KEYWORD1>
- <KEYWORD1>inv</KEYWORD1>
- <KEYWORD1>madd</KEYWORD1>
- <KEYWORD1>matran</KEYWORD1>
- <KEYWORD1>matrix</KEYWORD1>
- <KEYWORD1>mdiv</KEYWORD1>
- <KEYWORD1>mediv</KEYWORD1>
- <KEYWORD1>memult</KEYWORD1>
- <KEYWORD1>mform</KEYWORD1>
- <KEYWORD1>mmake</KEYWORD1>
- <KEYWORD1>mmult</KEYWORD1>
- <KEYWORD1>msquare</KEYWORD1>
- <KEYWORD1>msub</KEYWORD1>
- <KEYWORD1>orthon</KEYWORD1>
- <KEYWORD1>t2ymlt</KEYWORD1>
- <KEYWORD1>unmake</KEYWORD1>
- <KEYWORD1>vgvmlt</KEYWORD1>
- <KEYWORD1>yfact</KEYWORD1>
- <KEYWORD1>yinv</KEYWORD1>
- <KEYWORD1>yldfac</KEYWORD1>
- <KEYWORD1>yquad</KEYWORD1>
- <KEYWORD1>analyz</KEYWORD1>
- <KEYWORD1>cdf</KEYWORD1>
- <KEYWORD1>coint</KEYWORD1>
- <KEYWORD1>regopt</KEYWORD1>
- <!--Functions:-->
- <KEYWORD2>log</KEYWORD2>
- <KEYWORD2>exp</KEYWORD2>
- <KEYWORD2>abs</KEYWORD2>
- <KEYWORD2>log10</KEYWORD2>
- <KEYWORD2>sqrt</KEYWORD2>
- <KEYWORD2>sin</KEYWORD2>
- <KEYWORD2>cos</KEYWORD2>
- <KEYWORD2>tan</KEYWORD2>
- <KEYWORD2>atan</KEYWORD2>
- <KEYWORD2>norm</KEYWORD2>
- <KEYWORD2>cnorm</KEYWORD2>
- <KEYWORD2>cnormi</KEYWORD2>
- <KEYWORD2>lnorm</KEYWORD2>
- <KEYWORD2>lcnorm</KEYWORD2>
- <KEYWORD2>dlcnorm</KEYWORD2>
- <KEYWORD2>gamfn</KEYWORD2>
- <KEYWORD2>lgamfn</KEYWORD2>
- <KEYWORD2>dlgamfn</KEYWORD2>
- <KEYWORD2>trigamma</KEYWORD2>
- <KEYWORD2>fact</KEYWORD2>
- <KEYWORD2>lfact</KEYWORD2>
- <KEYWORD2>sign</KEYWORD2>
- <KEYWORD2>pos</KEYWORD2>
- <KEYWORD2>miss</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>ceil</KEYWORD2>
- <KEYWORD2>round</KEYWORD2>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!-- basic TSP mode -->
+<!-- Recommended catalog entry:
+ <MODE NAME="tsp" FILE="tsp.xml"
+ FILE_NAME_GLOB="*.tsp" />
+-->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="lineComment" VALUE="?" />
+ <PROPERTY NAME="noWordSep" VALUE="_" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+ <RULES ESCAPE="\" IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" AT_WORD_START="TRUE" >
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" AT_WORD_START="TRUE" >
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT2">?</EOL_SPAN>
+ <SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="@">@((\p{Alpha}\w*|_\w+)?::)*(\p{Alpha}\w*|_\w+|\d+)</SEQ_REGEXP>
+
+ <!-- assignment -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <!-- comparison -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">^=</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <!-- arithmetic -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">**</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">'</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <!--<SEQ TYPE="OPERATOR">)'</SEQ>
+ <SEQ TYPE="OPERATOR">]'</SEQ> -->
+
+ <!-- logical -->
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <!-- misc -->
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="NULL">.</SEQ>
+ <SEQ TYPE="NULL">,</SEQ>
+ <SEQ TYPE="NULL">;</SEQ>
+ <SEQ TYPE="NULL">]</SEQ>
+ <SEQ TYPE="NULL">[</SEQ>
+ <SEQ TYPE="NULL">(</SEQ>
+ <SEQ TYPE="NULL">)</SEQ>
+ <SEQ TYPE="NULL">{</SEQ>
+ <SEQ TYPE="NULL">}</SEQ>
+
+ <!-- Function calls -->
+ <!--<MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">(</MARK_PREVIOUS>-->
+ <KEYWORDS>
+ <KEYWORD1>r1</KEYWORD1>
+ <KEYWORD1>bjest</KEYWORD1>
+ <KEYWORD1>bjident</KEYWORD1>
+ <KEYWORD1>corr</KEYWORD1>
+ <KEYWORD1>cova</KEYWORD1>
+ <KEYWORD1>inst</KEYWORD1>
+ <KEYWORD1>kalman</KEYWORD1>
+ <KEYWORD1>lad</KEYWORD1>
+ <KEYWORD1>liml</KEYWORD1>
+ <KEYWORD1>lms</KEYWORD1>
+ <KEYWORD1>moment</KEYWORD1>
+ <KEYWORD1>msd</KEYWORD1>
+ <KEYWORD1>olsq</KEYWORD1>
+ <KEYWORD1>panel</KEYWORD1>
+ <KEYWORD1>prin</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD1>3sls</KEYWORD1>
+ <KEYWORD1>arch</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>differ</KEYWORD1>
+ <KEYWORD1>eqsub</KEYWORD1>
+ <KEYWORD1>fiml</KEYWORD1>
+ <KEYWORD1>orm</KEYWORD1>
+ <KEYWORD1>frml</KEYWORD1>
+ <KEYWORD1>gmm</KEYWORD1>
+ <KEYWORD1>ident</KEYWORD1>
+ <KEYWORD1>lsq</KEYWORD1>
+ <KEYWORD1>param</KEYWORD1>
+ <KEYWORD1>sur</KEYWORD1>
+ <KEYWORD1>logit</KEYWORD1>
+ <KEYWORD1>ml</KEYWORD1>
+ <KEYWORD1>negbin</KEYWORD1>
+ <KEYWORD1>ordprob</KEYWORD1>
+ <KEYWORD1>poisson</KEYWORD1>
+ <KEYWORD1>probit</KEYWORD1>
+ <KEYWORD1>sampsel</KEYWORD1>
+ <KEYWORD1>tobit</KEYWORD1>
+ <KEYWORD1>actfit</KEYWORD1>
+ <KEYWORD1>bjfrcst</KEYWORD1>
+ <KEYWORD1>forcst</KEYWORD1>
+ <KEYWORD1>model</KEYWORD1>
+ <KEYWORD1>siml</KEYWORD1>
+ <KEYWORD1>solve</KEYWORD1>
+ <KEYWORD1>capitl</KEYWORD1>
+ <KEYWORD1>onvert</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>delete</KEYWORD1>
+ <KEYWORD1>divind</KEYWORD1>
+ <KEYWORD1>dummy</KEYWORD1>
+ <KEYWORD1>genr</KEYWORD1>
+ <KEYWORD1>length</KEYWORD1>
+ <KEYWORD1>list</KEYWORD1>
+ <KEYWORD1>normal</KEYWORD1>
+ <KEYWORD1>random</KEYWORD1>
+ <KEYWORD1>rename</KEYWORD1>
+ <KEYWORD1>sama</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>sort</KEYWORD1>
+ <KEYWORD1>trend</KEYWORD1>
+ <KEYWORD1>moving</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>dbcomp</KEYWORD1>
+ <KEYWORD1>dbconv</KEYWORD1>
+ <KEYWORD1>dbcopy</KEYWORD1>
+ <KEYWORD1>dbdel</KEYWORD1>
+ <KEYWORD1>dbdump</KEYWORD1>
+ <KEYWORD1>dblist</KEYWORD1>
+ <KEYWORD1>dbprint</KEYWORD1>
+ <KEYWORD1>fetch</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD1>keep</KEYWORD1>
+ <KEYWORD1>load</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+ <KEYWORD1>output</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>recover</KEYWORD1>
+ <KEYWORD1>restore</KEYWORD1>
+ <KEYWORD1>save</KEYWORD1>
+ <KEYWORD1>store</KEYWORD1>
+ <KEYWORD1>terminal</KEYWORD1>
+ <KEYWORD1>write</KEYWORD1>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>collect</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>dot</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>enddo</KEYWORD1>
+ <KEYWORD1>enddot</KEYWORD1>
+ <KEYWORD1>endproc</KEYWORD1>
+ <KEYWORD1>exec</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>proc</KEYWORD1>
+ <KEYWORD1>quit</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>add</KEYWORD1>
+ <KEYWORD1>drop</KEYWORD1>
+ <KEYWORD1>edit</KEYWORD1>
+ <KEYWORD1>enter</KEYWORD1>
+ <KEYWORD1>retry</KEYWORD1>
+ <KEYWORD1>update</KEYWORD1>
+ <KEYWORD1>asmbug</KEYWORD1>
+ <KEYWORD1>compress</KEYWORD1>
+ <KEYWORD1>date</KEYWORD1>
+ <KEYWORD1>debug</KEYWORD1>
+ <KEYWORD1>dir</KEYWORD1>
+ <KEYWORD1>doc</KEYWORD1>
+ <KEYWORD1>dump</KEYWORD1>
+ <KEYWORD1>find</KEYWORD1>
+ <KEYWORD1>graph</KEYWORD1>
+ <KEYWORD1>help</KEYWORD1>
+ <KEYWORD1>helpr</KEYWORD1>
+ <KEYWORD1>hist</KEYWORD1>
+ <KEYWORD1>name</KEYWORD1>
+ <KEYWORD1>nopause</KEYWORD1>
+ <KEYWORD1>page</KEYWORD1>
+ <KEYWORD1>pause</KEYWORD1>
+ <KEYWORD1>plot</KEYWORD1>
+ <KEYWORD1>review</KEYWORD1>
+ <KEYWORD1>show</KEYWORD1>
+ <KEYWORD1>symtab</KEYWORD1>
+ <KEYWORD1>system</KEYWORD1>
+ <KEYWORD1>title</KEYWORD1>
+ <KEYWORD1>tstats</KEYWORD1>
+ <KEYWORD1>user</KEYWORD1>
+ <KEYWORD1>freq</KEYWORD1>
+ <KEYWORD1>noplots</KEYWORD1>
+ <KEYWORD1>noprint</KEYWORD1>
+ <KEYWORD1>nosupres</KEYWORD1>
+ <KEYWORD1>options</KEYWORD1>
+ <KEYWORD1>plots</KEYWORD1>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>smpl</KEYWORD1>
+ <KEYWORD1>smplif</KEYWORD1>
+ <KEYWORD1>supres</KEYWORD1>
+ <KEYWORD1>inprod</KEYWORD1>
+ <KEYWORD1>inv</KEYWORD1>
+ <KEYWORD1>madd</KEYWORD1>
+ <KEYWORD1>matran</KEYWORD1>
+ <KEYWORD1>matrix</KEYWORD1>
+ <KEYWORD1>mdiv</KEYWORD1>
+ <KEYWORD1>mediv</KEYWORD1>
+ <KEYWORD1>memult</KEYWORD1>
+ <KEYWORD1>mform</KEYWORD1>
+ <KEYWORD1>mmake</KEYWORD1>
+ <KEYWORD1>mmult</KEYWORD1>
+ <KEYWORD1>msquare</KEYWORD1>
+ <KEYWORD1>msub</KEYWORD1>
+ <KEYWORD1>orthon</KEYWORD1>
+ <KEYWORD1>t2ymlt</KEYWORD1>
+ <KEYWORD1>unmake</KEYWORD1>
+ <KEYWORD1>vgvmlt</KEYWORD1>
+ <KEYWORD1>yfact</KEYWORD1>
+ <KEYWORD1>yinv</KEYWORD1>
+ <KEYWORD1>yldfac</KEYWORD1>
+ <KEYWORD1>yquad</KEYWORD1>
+ <KEYWORD1>analyz</KEYWORD1>
+ <KEYWORD1>cdf</KEYWORD1>
+ <KEYWORD1>coint</KEYWORD1>
+ <KEYWORD1>regopt</KEYWORD1>
+ <!--Functions:-->
+ <KEYWORD2>log</KEYWORD2>
+ <KEYWORD2>exp</KEYWORD2>
+ <KEYWORD2>abs</KEYWORD2>
+ <KEYWORD2>log10</KEYWORD2>
+ <KEYWORD2>sqrt</KEYWORD2>
+ <KEYWORD2>sin</KEYWORD2>
+ <KEYWORD2>cos</KEYWORD2>
+ <KEYWORD2>tan</KEYWORD2>
+ <KEYWORD2>atan</KEYWORD2>
+ <KEYWORD2>norm</KEYWORD2>
+ <KEYWORD2>cnorm</KEYWORD2>
+ <KEYWORD2>cnormi</KEYWORD2>
+ <KEYWORD2>lnorm</KEYWORD2>
+ <KEYWORD2>lcnorm</KEYWORD2>
+ <KEYWORD2>dlcnorm</KEYWORD2>
+ <KEYWORD2>gamfn</KEYWORD2>
+ <KEYWORD2>lgamfn</KEYWORD2>
+ <KEYWORD2>dlgamfn</KEYWORD2>
+ <KEYWORD2>trigamma</KEYWORD2>
+ <KEYWORD2>fact</KEYWORD2>
+ <KEYWORD2>lfact</KEYWORD2>
+ <KEYWORD2>sign</KEYWORD2>
+ <KEYWORD2>pos</KEYWORD2>
+ <KEYWORD2>miss</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>ceil</KEYWORD2>
+ <KEYWORD2>round</KEYWORD2>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/tsql.xml b/jEdit/modes/tsql.xml
index 9d76e02..932dbba 100644
--- a/jEdit/modes/tsql.xml
+++ b/jEdit/modes/tsql.xml
@@ -1,1019 +1,1019 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Identifier -->
- <SPAN TYPE="LITERAL2" ESCAPE="\">
- <BEGIN>`</BEGIN>
- <END>`</END>
- </SPAN>
-
- <MARK_PREVIOUS TYPE="FUNCTION"
- MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR">!></SEQ>
- <SEQ TYPE="OPERATOR">!<</SEQ>
- <SEQ TYPE="OPERATOR">::</SEQ>
- <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <MARK_FOLLOWING TYPE="LITERAL2">@</MARK_FOLLOWING>
-
- <KEYWORDS>
- <!-- reserved words -->
- <KEYWORD1>ABSOLUTE</KEYWORD1>
- <KEYWORD1>ADD</KEYWORD1>
- <KEYWORD1>ALTER</KEYWORD1>
- <KEYWORD1>ANSI_NULLS</KEYWORD1>
- <KEYWORD1>AS</KEYWORD1>
- <KEYWORD1>ASC</KEYWORD1>
- <KEYWORD1>AUTHORIZATION</KEYWORD1>
- <KEYWORD1>BACKUP</KEYWORD1>
- <KEYWORD1>BEGIN</KEYWORD1>
- <KEYWORD1>BREAK</KEYWORD1>
- <KEYWORD1>BROWSE</KEYWORD1>
- <KEYWORD1>BULK</KEYWORD1>
- <KEYWORD1>BY</KEYWORD1>
- <KEYWORD1>CASCADE</KEYWORD1>
- <KEYWORD1>CHECK</KEYWORD1>
- <KEYWORD1>CHECKPOINT</KEYWORD1>
- <KEYWORD1>CLOSE</KEYWORD1>
- <KEYWORD1>CLUSTERED</KEYWORD1>
- <KEYWORD1>COLUMN</KEYWORD1>
- <KEYWORD1>COMMIT</KEYWORD1>
- <KEYWORD1>COMMITTED</KEYWORD1>
- <KEYWORD1>COMPUTE</KEYWORD1>
- <KEYWORD1>CONFIRM</KEYWORD1>
- <KEYWORD1>CONSTRAINT</KEYWORD1>
- <KEYWORD1>CONTAINS</KEYWORD1>
- <KEYWORD1>CONTAINSTABLE</KEYWORD1>
- <KEYWORD1>CONTINUE</KEYWORD1>
- <KEYWORD1>CONTROLROW</KEYWORD1>
- <KEYWORD1>CREATE</KEYWORD1>
- <KEYWORD1>CURRENT</KEYWORD1>
- <KEYWORD1>CURRENT_DATE</KEYWORD1>
- <KEYWORD1>CURRENT_TIME</KEYWORD1>
- <KEYWORD1>CURSOR</KEYWORD1>
- <KEYWORD1>DATABASE</KEYWORD1>
- <KEYWORD1>DBCC</KEYWORD1>
- <KEYWORD1>DEALLOCATE</KEYWORD1>
- <KEYWORD1>DECLARE</KEYWORD1>
- <KEYWORD1>DEFAULT</KEYWORD1>
- <KEYWORD1>DELETE</KEYWORD1>
- <KEYWORD1>DENY</KEYWORD1>
- <KEYWORD1>DESC</KEYWORD1>
- <KEYWORD1>DISK</KEYWORD1>
- <KEYWORD1>DISTINCT</KEYWORD1>
- <KEYWORD1>DISTRIBUTED</KEYWORD1>
- <KEYWORD1>DOUBLE</KEYWORD1>
- <KEYWORD1>DROP</KEYWORD1>
- <KEYWORD1>DUMMY</KEYWORD1>
- <KEYWORD1>DUMP</KEYWORD1>
- <KEYWORD1>DYNAMIC</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>ERRLVL</KEYWORD1>
- <KEYWORD1>ERROREXIT</KEYWORD1>
- <KEYWORD1>ESCAPE</KEYWORD1>
- <KEYWORD1>EXCEPT</KEYWORD1>
- <KEYWORD1>EXEC</KEYWORD1>
- <KEYWORD1>EXECUTE</KEYWORD1>
- <KEYWORD1>EXIT</KEYWORD1>
- <KEYWORD1>FAST_FORWARD</KEYWORD1>
- <KEYWORD1>FETCH</KEYWORD1>
- <KEYWORD1>FILE</KEYWORD1>
- <KEYWORD1>FILLFACTOR</KEYWORD1>
- <KEYWORD1>FIRST</KEYWORD1>
- <KEYWORD1>FLOPPY</KEYWORD1>
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>FOREIGN</KEYWORD1>
- <KEYWORD1>FORWARD_ONLY</KEYWORD1>
- <KEYWORD1>FREETEXT</KEYWORD1>
- <KEYWORD1>FREETEXTTABLE</KEYWORD1>
- <KEYWORD1>FROM</KEYWORD1>
- <KEYWORD1>FULL</KEYWORD1>
- <KEYWORD1>FUNCTION</KEYWORD1>
- <KEYWORD1>GLOBAL</KEYWORD1>
- <KEYWORD1>GOTO</KEYWORD1>
- <KEYWORD1>GRANT</KEYWORD1>
- <KEYWORD1>GROUP</KEYWORD1>
- <KEYWORD1>HAVING</KEYWORD1>
- <KEYWORD1>HOLDLOCK</KEYWORD1>
- <KEYWORD1>ID</KEYWORD1>
- <KEYWORD1>IDENTITYCOL</KEYWORD1>
- <KEYWORD1>IDENTITY_INSERT</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>INDEX</KEYWORD1>
- <KEYWORD1>INNER</KEYWORD1>
- <KEYWORD1>INSENSITIVE</KEYWORD1>
- <KEYWORD1>INSERT</KEYWORD1>
- <KEYWORD1>INTO</KEYWORD1>
- <KEYWORD1>IS</KEYWORD1>
- <KEYWORD1>ISOLATION</KEYWORD1>
- <KEYWORD1>KEY</KEYWORD1>
- <KEYWORD1>KEYSET</KEYWORD1>
- <KEYWORD1>KILL</KEYWORD1>
- <KEYWORD1>LAST</KEYWORD1>
- <KEYWORD1>LEVEL</KEYWORD1>
- <KEYWORD1>LINENO</KEYWORD1>
- <KEYWORD1>LOAD</KEYWORD1>
- <KEYWORD1>LOCAL</KEYWORD1>
- <KEYWORD1>MAX</KEYWORD1>
- <KEYWORD1>MIN</KEYWORD1>
- <KEYWORD1>MIRROREXIT</KEYWORD1>
- <KEYWORD1>NATIONAL</KEYWORD1>
- <KEYWORD1>NEXT</KEYWORD1>
- <KEYWORD1>NOCHECK</KEYWORD1>
- <KEYWORD1>NONCLUSTERED</KEYWORD1>
- <KEYWORD1>OF</KEYWORD1>
- <KEYWORD1>OFF</KEYWORD1>
- <KEYWORD1>OFFSETS</KEYWORD1>
- <KEYWORD1>ON</KEYWORD1>
- <KEYWORD1>ONCE</KEYWORD1>
- <KEYWORD1>ONLY</KEYWORD1>
- <KEYWORD1>OPEN</KEYWORD1>
- <KEYWORD1>OPENDATASOURCE</KEYWORD1>
- <KEYWORD1>OPENQUERY</KEYWORD1>
- <KEYWORD1>OPENROWSET</KEYWORD1>
- <KEYWORD1>OPTIMISTIC</KEYWORD1>
- <KEYWORD1>OPTION</KEYWORD1>
- <KEYWORD1>ORDER</KEYWORD1>
- <KEYWORD1>OUTPUT</KEYWORD1>
- <KEYWORD1>OVER</KEYWORD1>
- <KEYWORD1>PERCENT</KEYWORD1>
- <KEYWORD1>PERM</KEYWORD1>
- <KEYWORD1>PERMANENT</KEYWORD1>
- <KEYWORD1>PIPE</KEYWORD1>
- <KEYWORD1>PLAN</KEYWORD1>
- <KEYWORD1>PRECISION</KEYWORD1>
- <KEYWORD1>PREPARE</KEYWORD1>
- <KEYWORD1>PRIMARY</KEYWORD1>
- <KEYWORD1>PRINT</KEYWORD1>
- <KEYWORD1>PRIOR</KEYWORD1>
- <KEYWORD1>PRIVILEGES</KEYWORD1>
- <KEYWORD1>PROC</KEYWORD1>
- <KEYWORD1>PROCEDURE</KEYWORD1>
- <KEYWORD1>PROCESSEXIT</KEYWORD1>
- <KEYWORD1>PUBLIC</KEYWORD1>
- <KEYWORD1>QUOTED_IDENTIFIER</KEYWORD1>
- <KEYWORD1>RAISERROR</KEYWORD1>
- <KEYWORD1>READ</KEYWORD1>
- <KEYWORD1>READTEXT</KEYWORD1>
- <KEYWORD1>READ_ONLY</KEYWORD1>
- <KEYWORD1>RECONFIGURE</KEYWORD1>
- <KEYWORD1>REFERENCES</KEYWORD1>
- <KEYWORD1>RELATIVE</KEYWORD1>
- <KEYWORD1>REPEATABLE</KEYWORD1>
- <KEYWORD1>REPLICATION</KEYWORD1>
- <KEYWORD1>RESTORE</KEYWORD1>
- <KEYWORD1>RESTRICT</KEYWORD1>
- <KEYWORD1>RETURN</KEYWORD1>
- <KEYWORD1>RETURNS</KEYWORD1>
- <KEYWORD1>REVOKE</KEYWORD1>
- <KEYWORD1>ROLLBACK</KEYWORD1>
- <KEYWORD1>ROWGUIDCOL</KEYWORD1>
- <KEYWORD1>RULE</KEYWORD1>
- <KEYWORD1>SAVE</KEYWORD1>
- <KEYWORD1>SCHEMA</KEYWORD1>
- <KEYWORD1>SCROLL</KEYWORD1>
- <KEYWORD1>SCROLL_LOCKS</KEYWORD1>
- <KEYWORD1>SELECT</KEYWORD1>
- <KEYWORD1>SERIALIZABLE</KEYWORD1>
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>SETUSER</KEYWORD1>
- <KEYWORD1>SHUTDOWN</KEYWORD1>
- <KEYWORD1>STATIC</KEYWORD1>
- <KEYWORD1>STATISTICS</KEYWORD1>
- <KEYWORD1>TABLE</KEYWORD1>
- <KEYWORD1>TAPE</KEYWORD1>
- <KEYWORD1>TEMP</KEYWORD1>
- <KEYWORD1>TEMPORARY</KEYWORD1>
- <KEYWORD1>TEXTIMAGE_ON</KEYWORD1>
- <KEYWORD1>THEN</KEYWORD1>
- <KEYWORD1>TO</KEYWORD1>
- <KEYWORD1>TOP</KEYWORD1>
- <KEYWORD1>TRAN</KEYWORD1>
- <KEYWORD1>TRANSACTION</KEYWORD1>
- <KEYWORD1>TRIGGER</KEYWORD1>
- <KEYWORD1>TRUNCATE</KEYWORD1>
- <KEYWORD1>TSEQUAL</KEYWORD1>
- <KEYWORD1>UNCOMMITTED</KEYWORD1>
- <KEYWORD1>UNION</KEYWORD1>
- <KEYWORD1>UNIQUE</KEYWORD1>
- <KEYWORD1>UPDATE</KEYWORD1>
- <KEYWORD1>UPDATETEXT</KEYWORD1>
- <KEYWORD1>USE</KEYWORD1>
- <KEYWORD1>VALUES</KEYWORD1>
- <KEYWORD1>VARYING</KEYWORD1>
- <KEYWORD1>VIEW</KEYWORD1>
- <KEYWORD1>WAITFOR</KEYWORD1>
- <KEYWORD1>WHEN</KEYWORD1>
- <KEYWORD1>WHERE</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
- <KEYWORD1>WITH</KEYWORD1>
- <KEYWORD1>WORK</KEYWORD1>
- <KEYWORD1>WRITETEXT</KEYWORD1>
-
- <!-- data types -->
- <KEYWORD1>binary</KEYWORD1>
- <KEYWORD1>bit</KEYWORD1>
- <KEYWORD1>char</KEYWORD1>
- <KEYWORD1>character</KEYWORD1>
- <KEYWORD1>datetime</KEYWORD1>
- <KEYWORD1>decimal</KEYWORD1>
- <KEYWORD1>float</KEYWORD1>
- <KEYWORD1>image</KEYWORD1>
- <KEYWORD1>int</KEYWORD1>
- <KEYWORD1>integer</KEYWORD1>
- <KEYWORD1>money</KEYWORD1>
- <KEYWORD1>name</KEYWORD1>
- <KEYWORD1>numeric</KEYWORD1>
- <KEYWORD1>nchar</KEYWORD1>
- <KEYWORD1>nvarchar</KEYWORD1>
- <KEYWORD1>ntext</KEYWORD1>
- <KEYWORD1>real</KEYWORD1>
- <KEYWORD1>smalldatetime</KEYWORD1>
- <KEYWORD1>smallint</KEYWORD1>
- <KEYWORD1>smallmoney</KEYWORD1>
- <KEYWORD1>text</KEYWORD1>
- <KEYWORD1>timestamp</KEYWORD1>
- <KEYWORD1>tinyint</KEYWORD1>
- <KEYWORD1>uniqueidentifier</KEYWORD1>
- <KEYWORD1>varbinary</KEYWORD1>
- <KEYWORD1>varchar</KEYWORD1>
-
- <!-- system functions -->
- <KEYWORD2>@@CONNECTIONS</KEYWORD2>
- <KEYWORD2>@@CPU_BUSY</KEYWORD2>
- <KEYWORD2>@@CURSOR_ROWS</KEYWORD2>
- <KEYWORD2>@@DATEFIRST</KEYWORD2>
- <KEYWORD2>@@DBTS</KEYWORD2>
- <KEYWORD2>@@ERROR</KEYWORD2>
- <KEYWORD2>@@FETCH_STATUS</KEYWORD2>
- <KEYWORD2>@@IDENTITY</KEYWORD2>
- <KEYWORD2>@@IDLE</KEYWORD2>
- <KEYWORD2>@@IO_BUSY</KEYWORD2>
- <KEYWORD2>@@LANGID</KEYWORD2>
- <KEYWORD2>@@LANGUAGE</KEYWORD2>
- <KEYWORD2>@@LOCK_TIMEOUT</KEYWORD2>
- <KEYWORD2>@@MAX_CONNECTIONS</KEYWORD2>
- <KEYWORD2>@@MAX_PRECISION</KEYWORD2>
- <KEYWORD2>@@NESTLEVEL</KEYWORD2>
- <KEYWORD2>@@OPTIONS</KEYWORD2>
- <KEYWORD2>@@PACKET_ERRORS</KEYWORD2>
- <KEYWORD2>@@PACK_RECEIVED</KEYWORD2>
- <KEYWORD2>@@PACK_SENT</KEYWORD2>
- <KEYWORD2>@@PROCID</KEYWORD2>
- <KEYWORD2>@@REMSERVER</KEYWORD2>
- <KEYWORD2>@@ROWCOUNT</KEYWORD2>
- <KEYWORD2>@@SERVERNAME</KEYWORD2>
- <KEYWORD2>@@SERVICENAME</KEYWORD2>
- <KEYWORD2>@@SPID</KEYWORD2>
- <KEYWORD2>@@TEXTSIZE</KEYWORD2>
- <KEYWORD2>@@TIMETICKS</KEYWORD2>
- <KEYWORD2>@@TOTAL_ERRORS</KEYWORD2>
- <KEYWORD2>@@TOTAL_READ</KEYWORD2>
- <KEYWORD2>@@TOTAL_WRITE</KEYWORD2>
- <KEYWORD2>@@TRANCOUNT</KEYWORD2>
- <KEYWORD2>@@VERSION</KEYWORD2>
- <KEYWORD2>ABS</KEYWORD2>
- <KEYWORD2>ACOS</KEYWORD2>
- <KEYWORD2>APP_NAME</KEYWORD2>
- <KEYWORD2>ASCII</KEYWORD2>
- <KEYWORD2>ASIN</KEYWORD2>
- <KEYWORD2>ATAN</KEYWORD2>
- <KEYWORD2>ATN2</KEYWORD2>
- <KEYWORD2>AVG</KEYWORD2>
- <KEYWORD2>BINARY_CHECKSUM</KEYWORD2>
- <KEYWORD2>CASE</KEYWORD2>
- <KEYWORD2>CAST</KEYWORD2>
- <KEYWORD2>CEILING</KEYWORD2>
- <KEYWORD2>CHARINDEX</KEYWORD2>
- <KEYWORD2>CHECKSUM</KEYWORD2>
- <KEYWORD2>CHECKSUM_AGG</KEYWORD2>
- <KEYWORD2>COALESCE</KEYWORD2>
- <KEYWORD2>COLLATIONPROPERTY</KEYWORD2>
- <KEYWORD2>COLUMNPROPERTY</KEYWORD2>
- <KEYWORD2>COL_LENGTH</KEYWORD2>
- <KEYWORD2>COL_NAME</KEYWORD2>
- <KEYWORD2>CONVERT</KEYWORD2>
- <KEYWORD2>COS</KEYWORD2>
- <KEYWORD2>COT</KEYWORD2>
- <KEYWORD2>COUNT</KEYWORD2>
- <KEYWORD2>COUNT_BIG</KEYWORD2>
- <KEYWORD2>CURRENT_DATE</KEYWORD2>
- <KEYWORD2>CURRENT_TIME</KEYWORD2>
- <KEYWORD2>CURRENT_TIMESTAMP</KEYWORD2>
- <KEYWORD2>CURRENT_USER</KEYWORD2>
- <KEYWORD2>CURSOR_STATUS</KEYWORD2>
- <KEYWORD2>DATABASEPROPERTY</KEYWORD2>
- <KEYWORD2>DATALENGTH</KEYWORD2>
- <KEYWORD2>DATEADD</KEYWORD2>
- <KEYWORD2>DATEDIFF</KEYWORD2>
- <KEYWORD2>DATENAME</KEYWORD2>
- <KEYWORD2>DATEPART</KEYWORD2>
- <KEYWORD2>DAY</KEYWORD2>
- <KEYWORD2>DB_ID</KEYWORD2>
- <KEYWORD2>DB_NAME</KEYWORD2>
- <KEYWORD2>DEGREES</KEYWORD2>
- <KEYWORD2>DIFFERENCE</KEYWORD2>
- <KEYWORD2>EXP</KEYWORD2>
- <KEYWORD2>FILEGROUPPROPERTY</KEYWORD2>
- <KEYWORD2>FILEGROUP_ID</KEYWORD2>
- <KEYWORD2>FILEGROUP_NAME</KEYWORD2>
- <KEYWORD2>FILEPROPERTY</KEYWORD2>
- <KEYWORD2>FILE_ID</KEYWORD2>
- <KEYWORD2>FILE_NAME</KEYWORD2>
- <KEYWORD2>FLOOR</KEYWORD2>
- <KEYWORD2>FORMATMESSAGE</KEYWORD2>
- <KEYWORD2>FULLTEXTCATALOGPROPERTY</KEYWORD2>
- <KEYWORD2>FULLTEXTSERVICEPROPERTY</KEYWORD2>
- <KEYWORD2>GETANSINULL</KEYWORD2>
- <KEYWORD2>GETDATE</KEYWORD2>
- <KEYWORD2>GETUTCDATE</KEYWORD2>
- <KEYWORD2>GROUPING</KEYWORD2>
- <KEYWORD2>HOST_ID</KEYWORD2>
- <KEYWORD2>HOST_NAME</KEYWORD2>
- <KEYWORD2>IDENTITY</KEYWORD2>
- <KEYWORD2>IDENTITY_INSERT</KEYWORD2>
- <KEYWORD2>IDENT_CURRENT</KEYWORD2>
- <KEYWORD2>IDENT_INCR</KEYWORD2>
- <KEYWORD2>IDENT_SEED</KEYWORD2>
- <KEYWORD2>INDEXPROPERTY</KEYWORD2>
- <KEYWORD2>INDEX_COL</KEYWORD2>
- <KEYWORD2>ISDATE</KEYWORD2>
- <KEYWORD2>ISNULL</KEYWORD2>
- <KEYWORD2>ISNUMERIC</KEYWORD2>
- <KEYWORD2>IS_MEMBER</KEYWORD2>
- <KEYWORD2>IS_SRVROLEMEMBER</KEYWORD2>
- <KEYWORD2>LEFT</KEYWORD2>
- <KEYWORD2>LEN</KEYWORD2>
- <KEYWORD2>LOG10</KEYWORD2>
- <KEYWORD2>LOG</KEYWORD2>
- <KEYWORD2>LOWER</KEYWORD2>
- <KEYWORD2>LTRIM</KEYWORD2>
- <KEYWORD2>MONTH</KEYWORD2>
- <KEYWORD2>NEWID</KEYWORD2>
- <KEYWORD2>NULLIF</KEYWORD2>
- <KEYWORD2>OBJECTPROPERTY</KEYWORD2>
- <KEYWORD2>OBJECT_ID</KEYWORD2>
- <KEYWORD2>OBJECT_NAME</KEYWORD2>
- <KEYWORD2>PARSENAME</KEYWORD2>
- <KEYWORD2>PATINDEX</KEYWORD2>
- <KEYWORD2>PERMISSIONS</KEYWORD2>
- <KEYWORD2>PI</KEYWORD2>
- <KEYWORD2>POWER</KEYWORD2>
- <KEYWORD2>QUOTENAME</KEYWORD2>
- <KEYWORD2>RADIANS</KEYWORD2>
- <KEYWORD2>RAND</KEYWORD2>
- <KEYWORD2>REPLACE</KEYWORD2>
- <KEYWORD2>REPLICATE</KEYWORD2>
- <KEYWORD2>REVERSE</KEYWORD2>
- <KEYWORD2>RIGHT</KEYWORD2>
- <KEYWORD2>ROUND</KEYWORD2>
- <KEYWORD2>ROWCOUNT_BIG</KEYWORD2>
- <KEYWORD2>RTRIM</KEYWORD2>
- <KEYWORD2>SCOPE_IDENTITY</KEYWORD2>
- <KEYWORD2>SERVERPROPERTY</KEYWORD2>
- <KEYWORD2>SESSIONPROPERTY</KEYWORD2>
- <KEYWORD2>SESSION_USER</KEYWORD2>
- <KEYWORD2>SIGN</KEYWORD2>
- <KEYWORD2>SIN</KEYWORD2>
- <KEYWORD2>SOUNDEX</KEYWORD2>
- <KEYWORD2>SPACE</KEYWORD2>
- <KEYWORD2>SQRT</KEYWORD2>
- <KEYWORD2>SQUARE</KEYWORD2>
- <KEYWORD2>STATS_DATE</KEYWORD2>
- <KEYWORD2>STDEV</KEYWORD2>
- <KEYWORD2>STDEVP</KEYWORD2>
- <KEYWORD2>STR</KEYWORD2>
- <KEYWORD2>STUFF</KEYWORD2>
- <KEYWORD2>SUBSTRING</KEYWORD2>
- <KEYWORD2>SUM</KEYWORD2>
- <KEYWORD2>SUSER_ID</KEYWORD2>
- <KEYWORD2>SUSER_NAME</KEYWORD2>
- <KEYWORD2>SUSER_SID</KEYWORD2>
- <KEYWORD2>SUSER_SNAME</KEYWORD2>
- <KEYWORD2>SYSTEM_USER</KEYWORD2>
- <KEYWORD2>TAN</KEYWORD2>
- <KEYWORD2>TEXTPTR</KEYWORD2>
- <KEYWORD2>TEXTVALID</KEYWORD2>
- <KEYWORD2>TYPEPROPERTY</KEYWORD2>
- <KEYWORD2>UNICODE</KEYWORD2>
- <KEYWORD2>UPPER</KEYWORD2>
- <KEYWORD2>USER</KEYWORD2>
- <KEYWORD2>USER_ID</KEYWORD2>
- <KEYWORD2>USER_NAME</KEYWORD2>
- <KEYWORD2>VAR</KEYWORD2>
- <KEYWORD2>VARP</KEYWORD2>
- <KEYWORD2>YEAR</KEYWORD2>
-
- <!-- operators -->
- <KEYWORD1>ALL</KEYWORD1>
- <KEYWORD1>AND</KEYWORD1>
- <KEYWORD1>ANY</KEYWORD1>
- <KEYWORD1>BETWEEN</KEYWORD1>
- <KEYWORD1>CROSS</KEYWORD1>
- <KEYWORD1>EXISTS</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>INTERSECT</KEYWORD1>
- <KEYWORD1>JOIN</KEYWORD1>
- <KEYWORD1>LIKE</KEYWORD1>
- <KEYWORD1>NOT</KEYWORD1>
- <KEYWORD1>NULL</KEYWORD1>
- <KEYWORD1>OR</KEYWORD1>
- <KEYWORD1>OUTER</KEYWORD1>
- <KEYWORD1>SOME</KEYWORD1>
-
- <!-- SQL Server 7.0 system stored procedures -->
- <KEYWORD3>sp_add_agent_parameter</KEYWORD3>
- <KEYWORD3>sp_add_agent_profile</KEYWORD3>
- <KEYWORD3>sp_add_alert</KEYWORD3>
- <KEYWORD3>sp_add_category</KEYWORD3>
- <KEYWORD3>sp_add_data_file_recover_suspect_db</KEYWORD3>
- <KEYWORD3>sp_add_job</KEYWORD3>
- <KEYWORD3>sp_add_jobschedule</KEYWORD3>
- <KEYWORD3>sp_add_jobserver</KEYWORD3>
- <KEYWORD3>sp_add_jobstep</KEYWORD3>
- <KEYWORD3>sp_add_log_file_recover_suspect_db</KEYWORD3>
- <KEYWORD3>sp_add_notification</KEYWORD3>
- <KEYWORD3>sp_add_operator</KEYWORD3>
- <KEYWORD3>sp_add_targetservergroup</KEYWORD3>
- <KEYWORD3>sp_add_targetsvrgrp_member</KEYWORD3>
- <KEYWORD3>sp_addalias</KEYWORD3>
- <KEYWORD3>sp_addapprole</KEYWORD3>
- <KEYWORD3>sp_addarticle</KEYWORD3>
- <KEYWORD3>sp_adddistpublisher</KEYWORD3>
- <KEYWORD3>sp_adddistributiondb</KEYWORD3>
- <KEYWORD3>sp_adddistributor</KEYWORD3>
- <KEYWORD3>sp_addextendedproc</KEYWORD3>
- <KEYWORD3>sp_addgroup</KEYWORD3>
- <KEYWORD3>sp_addlinkedserver</KEYWORD3>
- <KEYWORD3>sp_addlinkedsrvlogin</KEYWORD3>
- <KEYWORD3>sp_addlinkedsrvlogin</KEYWORD3>
- <KEYWORD3>sp_addlogin</KEYWORD3>
- <KEYWORD3>sp_addmergearticle</KEYWORD3>
- <KEYWORD3>sp_addmergefilter</KEYWORD3>
- <KEYWORD3>sp_addmergepublication</KEYWORD3>
- <KEYWORD3>sp_addmergepullsubscription</KEYWORD3>
- <KEYWORD3>sp_addmergepullsubscription_agent</KEYWORD3>
- <KEYWORD3>sp_addmergesubscription</KEYWORD3>
- <KEYWORD3>sp_addmessage</KEYWORD3>
- <KEYWORD3>sp_addpublication</KEYWORD3>
- <KEYWORD3>sp_addpublication_snapshot</KEYWORD3>
- <KEYWORD3>sp_addpublisher70</KEYWORD3>
- <KEYWORD3>sp_addpullsubscription</KEYWORD3>
- <KEYWORD3>sp_addpullsubscription_agent</KEYWORD3>
- <KEYWORD3>sp_addremotelogin</KEYWORD3>
- <KEYWORD3>sp_addrole</KEYWORD3>
- <KEYWORD3>sp_addrolemember</KEYWORD3>
- <KEYWORD3>sp_addserver</KEYWORD3>
- <KEYWORD3>sp_addsrvrolemember</KEYWORD3>
- <KEYWORD3>sp_addsubscriber</KEYWORD3>
- <KEYWORD3>sp_addsubscriber_schedule</KEYWORD3>
- <KEYWORD3>sp_addsubscription</KEYWORD3>
- <KEYWORD3>sp_addsynctriggers</KEYWORD3>
- <KEYWORD3>sp_addtabletocontents</KEYWORD3>
- <KEYWORD3>sp_addtask</KEYWORD3>
- <KEYWORD3>sp_addtype</KEYWORD3>
- <KEYWORD3>sp_addumpdevice</KEYWORD3>
- <KEYWORD3>sp_adduser</KEYWORD3>
- <KEYWORD3>sp_altermessage</KEYWORD3>
- <KEYWORD3>sp_apply_job_to_targets</KEYWORD3>
- <KEYWORD3>sp_approlepassword</KEYWORD3>
- <KEYWORD3>sp_article_validation</KEYWORD3>
- <KEYWORD3>sp_articlecolumn</KEYWORD3>
- <KEYWORD3>sp_articlefilter</KEYWORD3>
- <KEYWORD3>sp_articlesynctranprocs</KEYWORD3>
- <KEYWORD3>sp_articleview</KEYWORD3>
- <KEYWORD3>sp_attach_db</KEYWORD3>
- <KEYWORD3>sp_attach_single_file_db</KEYWORD3>
- <KEYWORD3>sp_autostats</KEYWORD3>
- <KEYWORD3>sp_bindefault</KEYWORD3>
- <KEYWORD3>sp_bindrule</KEYWORD3>
- <KEYWORD3>sp_bindsession</KEYWORD3>
- <KEYWORD3>sp_browsereplcmds</KEYWORD3>
- <KEYWORD3>sp_catalogs</KEYWORD3>
- <KEYWORD3>sp_certify_removable</KEYWORD3>
- <KEYWORD3>sp_change_agent_parameter</KEYWORD3>
- <KEYWORD3>sp_change_agent_profile</KEYWORD3>
- <KEYWORD3>sp_change_subscription_properties</KEYWORD3>
- <KEYWORD3>sp_change_users_login</KEYWORD3>
- <KEYWORD3>sp_changearticle</KEYWORD3>
- <KEYWORD3>sp_changedbowner</KEYWORD3>
- <KEYWORD3>sp_changedistpublisher</KEYWORD3>
- <KEYWORD3>sp_changedistributiondb</KEYWORD3>
- <KEYWORD3>sp_changedistributor_password</KEYWORD3>
- <KEYWORD3>sp_changedistributor_property</KEYWORD3>
- <KEYWORD3>sp_changegroup</KEYWORD3>
- <KEYWORD3>sp_changemergearticle</KEYWORD3>
- <KEYWORD3>sp_changemergefilter</KEYWORD3>
- <KEYWORD3>sp_changemergepublication</KEYWORD3>
- <KEYWORD3>sp_changemergepullsubscription</KEYWORD3>
- <KEYWORD3>sp_changemergesubscription</KEYWORD3>
- <KEYWORD3>sp_changeobjectowner</KEYWORD3>
- <KEYWORD3>sp_changepublication</KEYWORD3>
- <KEYWORD3>sp_changesubscriber</KEYWORD3>
- <KEYWORD3>sp_changesubscriber_schedule</KEYWORD3>
- <KEYWORD3>sp_changesubstatus</KEYWORD3>
- <KEYWORD3>sp_check_for_sync_trigger</KEYWORD3>
- <KEYWORD3>sp_column_privileges</KEYWORD3>
- <KEYWORD3>sp_column_privileges_ex</KEYWORD3>
- <KEYWORD3>sp_columns</KEYWORD3>
- <KEYWORD3>sp_columns_ex</KEYWORD3>
- <KEYWORD3>sp_configure</KEYWORD3>
- <KEYWORD3>sp_create_removable</KEYWORD3>
- <KEYWORD3>sp_createorphan</KEYWORD3>
- <KEYWORD3>sp_createstats</KEYWORD3>
- <KEYWORD3>sp_cursor</KEYWORD3>
- <KEYWORD3>sp_cursor_list</KEYWORD3>
- <KEYWORD3>sp_cursorclose</KEYWORD3>
- <KEYWORD3>sp_cursorexecute</KEYWORD3>
- <KEYWORD3>sp_cursorfetch</KEYWORD3>
- <KEYWORD3>sp_cursoropen</KEYWORD3>
- <KEYWORD3>sp_cursoroption</KEYWORD3>
- <KEYWORD3>sp_cursorprepare</KEYWORD3>
- <KEYWORD3>sp_cursorunprepare</KEYWORD3>
- <KEYWORD3>sp_cycle_errorlog</KEYWORD3>
- <KEYWORD3>sp_databases</KEYWORD3>
- <KEYWORD3>sp_datatype_info</KEYWORD3>
- <KEYWORD3>sp_dbcmptlevel</KEYWORD3>
- <KEYWORD3>sp_dbfixedrolepermission</KEYWORD3>
- <KEYWORD3>sp_dboption</KEYWORD3>
- <KEYWORD3>sp_defaultdb</KEYWORD3>
- <KEYWORD3>sp_defaultlanguage</KEYWORD3>
- <KEYWORD3>sp_delete_alert</KEYWORD3>
- <KEYWORD3>sp_delete_backuphistory</KEYWORD3>
- <KEYWORD3>sp_delete_category</KEYWORD3>
- <KEYWORD3>sp_delete_job</KEYWORD3>
- <KEYWORD3>sp_delete_jobschedule</KEYWORD3>
- <KEYWORD3>sp_delete_jobserver</KEYWORD3>
- <KEYWORD3>sp_delete_jobstep</KEYWORD3>
- <KEYWORD3>sp_delete_notification</KEYWORD3>
- <KEYWORD3>sp_delete_operator</KEYWORD3>
- <KEYWORD3>sp_delete_targetserver</KEYWORD3>
- <KEYWORD3>sp_delete_targetservergroup</KEYWORD3>
- <KEYWORD3>sp_delete_targetsvrgrp_member</KEYWORD3>
- <KEYWORD3>sp_deletemergeconflictrow</KEYWORD3>
- <KEYWORD3>sp_denylogin</KEYWORD3>
- <KEYWORD3>sp_depends</KEYWORD3>
- <KEYWORD3>sp_describe_cursor</KEYWORD3>
- <KEYWORD3>sp_describe_cursor_columns</KEYWORD3>
- <KEYWORD3>sp_describe_cursor_tables</KEYWORD3>
- <KEYWORD3>sp_detach_db</KEYWORD3>
- <KEYWORD3>sp_drop_agent_parameter</KEYWORD3>
- <KEYWORD3>sp_drop_agent_profile</KEYWORD3>
- <KEYWORD3>sp_dropalias</KEYWORD3>
- <KEYWORD3>sp_dropapprole</KEYWORD3>
- <KEYWORD3>sp_droparticle</KEYWORD3>
- <KEYWORD3>sp_dropdevice</KEYWORD3>
- <KEYWORD3>sp_dropdistpublisher</KEYWORD3>
- <KEYWORD3>sp_dropdistributiondb</KEYWORD3>
- <KEYWORD3>sp_dropdistributor</KEYWORD3>
- <KEYWORD3>sp_dropextendedproc</KEYWORD3>
- <KEYWORD3>sp_dropgroup</KEYWORD3>
- <KEYWORD3>sp_droplinkedsrvlogin</KEYWORD3>
- <KEYWORD3>sp_droplinkedsrvlogin</KEYWORD3>
- <KEYWORD3>sp_droplogin</KEYWORD3>
- <KEYWORD3>sp_dropmergearticle</KEYWORD3>
- <KEYWORD3>sp_dropmergefilter</KEYWORD3>
- <KEYWORD3>sp_dropmergepublication</KEYWORD3>
- <KEYWORD3>sp_dropmergepullsubscription</KEYWORD3>
- <KEYWORD3>sp_dropmergesubscription</KEYWORD3>
- <KEYWORD3>sp_dropmessage</KEYWORD3>
- <KEYWORD3>sp_droporphans</KEYWORD3>
- <KEYWORD3>sp_droppublication</KEYWORD3>
- <KEYWORD3>sp_droppullsubscription</KEYWORD3>
- <KEYWORD3>sp_dropremotelogin</KEYWORD3>
- <KEYWORD3>sp_droprole</KEYWORD3>
- <KEYWORD3>sp_droprolemember</KEYWORD3>
- <KEYWORD3>sp_dropserver</KEYWORD3>
- <KEYWORD3>sp_dropsrvrolemember</KEYWORD3>
- <KEYWORD3>sp_dropsubscriber</KEYWORD3>
- <KEYWORD3>sp_dropsubscription</KEYWORD3>
- <KEYWORD3>sp_droptask</KEYWORD3>
- <KEYWORD3>sp_droptype</KEYWORD3>
- <KEYWORD3>sp_dropuser</KEYWORD3>
- <KEYWORD3>sp_dropwebtask</KEYWORD3>
- <KEYWORD3>sp_dsninfo</KEYWORD3>
- <KEYWORD3>sp_dumpparamcmd</KEYWORD3>
- <KEYWORD3>sp_enumcodepages</KEYWORD3>
- <KEYWORD3>sp_enumcustomresolvers</KEYWORD3>
- <KEYWORD3>sp_enumdsn</KEYWORD3>
- <KEYWORD3>sp_enumfullsubscribers</KEYWORD3>
- <KEYWORD3>sp_execute</KEYWORD3>
- <KEYWORD3>sp_executesql</KEYWORD3>
- <KEYWORD3>sp_expired_subscription_cleanup</KEYWORD3>
- <KEYWORD3>sp_fkeys</KEYWORD3>
- <KEYWORD3>sp_foreignkeys</KEYWORD3>
- <KEYWORD3>sp_fulltext_catalog</KEYWORD3>
- <KEYWORD3>sp_fulltext_column</KEYWORD3>
- <KEYWORD3>sp_fulltext_database</KEYWORD3>
- <KEYWORD3>sp_fulltext_service</KEYWORD3>
- <KEYWORD3>sp_fulltext_table</KEYWORD3>
- <KEYWORD3>sp_generatefilters</KEYWORD3>
- <KEYWORD3>sp_get_distributor</KEYWORD3>
- <KEYWORD3>sp_getbindtoken</KEYWORD3>
- <KEYWORD3>sp_getmergedeletetype</KEYWORD3>
- <KEYWORD3>sp_grant_publication_access</KEYWORD3>
- <KEYWORD3>sp_grantdbaccess</KEYWORD3>
- <KEYWORD3>sp_grantlogin</KEYWORD3>
- <KEYWORD3>sp_help</KEYWORD3>
- <KEYWORD3>sp_help_agent_default</KEYWORD3>
- <KEYWORD3>sp_help_agent_parameter</KEYWORD3>
- <KEYWORD3>sp_help_agent_profile</KEYWORD3>
- <KEYWORD3>sp_help_alert</KEYWORD3>
- <KEYWORD3>sp_help_category</KEYWORD3>
- <KEYWORD3>sp_help_downloadlist</KEYWORD3>
- <KEYWORD3>sp_help_fulltext_catalogs</KEYWORD3>
- <KEYWORD3>sp_help_fulltext_catalogs_cursor</KEYWORD3>
- <KEYWORD3>sp_help_fulltext_columns</KEYWORD3>
- <KEYWORD3>sp_help_fulltext_columns_cursor</KEYWORD3>
- <KEYWORD3>sp_help_fulltext_tables</KEYWORD3>
- <KEYWORD3>sp_help_fulltext_tables_cursor</KEYWORD3>
- <KEYWORD3>sp_help_job</KEYWORD3>
- <KEYWORD3>sp_help_jobhistory</KEYWORD3>
- <KEYWORD3>sp_help_jobschedule</KEYWORD3>
- <KEYWORD3>sp_help_jobserver</KEYWORD3>
- <KEYWORD3>sp_help_jobstep</KEYWORD3>
- <KEYWORD3>sp_help_notification</KEYWORD3>
- <KEYWORD3>sp_help_operator</KEYWORD3>
- <KEYWORD3>sp_help_publication_access</KEYWORD3>
- <KEYWORD3>sp_help_targetserver</KEYWORD3>
- <KEYWORD3>sp_help_targetservergroup</KEYWORD3>
- <KEYWORD3>sp_helparticle</KEYWORD3>
- <KEYWORD3>sp_helparticlecolumns</KEYWORD3>
- <KEYWORD3>sp_helpconstraint</KEYWORD3>
- <KEYWORD3>sp_helpdb</KEYWORD3>
- <KEYWORD3>sp_helpdbfixedrole</KEYWORD3>
- <KEYWORD3>sp_helpdevice</KEYWORD3>
- <KEYWORD3>sp_helpdistpublisher</KEYWORD3>
- <KEYWORD3>sp_helpdistributiondb</KEYWORD3>
- <KEYWORD3>sp_helpdistributor</KEYWORD3>
- <KEYWORD3>sp_helpextendedproc</KEYWORD3>
- <KEYWORD3>sp_helpfile</KEYWORD3>
- <KEYWORD3>sp_helpfilegroup</KEYWORD3>
- <KEYWORD3>sp_helpgroup</KEYWORD3>
- <KEYWORD3>sp_helphistory</KEYWORD3>
- <KEYWORD3>sp_helpindex</KEYWORD3>
- <KEYWORD3>sp_helplanguage</KEYWORD3>
- <KEYWORD3>sp_helplinkedsrvlogin</KEYWORD3>
- <KEYWORD3>sp_helplogins</KEYWORD3>
- <KEYWORD3>sp_helpmergearticle</KEYWORD3>
- <KEYWORD3>sp_helpmergearticleconflicts</KEYWORD3>
- <KEYWORD3>sp_helpmergeconflictrows</KEYWORD3>
- <KEYWORD3>sp_helpmergedeleteconflictrows</KEYWORD3>
- <KEYWORD3>sp_helpmergefilter</KEYWORD3>
- <KEYWORD3>sp_helpmergepublication</KEYWORD3>
- <KEYWORD3>sp_helpmergepullsubscription</KEYWORD3>
- <KEYWORD3>sp_helpmergesubscription</KEYWORD3>
- <KEYWORD3>sp_helpntgroup</KEYWORD3>
- <KEYWORD3>sp_helppublication</KEYWORD3>
- <KEYWORD3>sp_helppullsubscription</KEYWORD3>
- <KEYWORD3>sp_helpremotelogin</KEYWORD3>
- <KEYWORD3>sp_helpreplicationdboption</KEYWORD3>
- <KEYWORD3>sp_helprole</KEYWORD3>
- <KEYWORD3>sp_helprolemember</KEYWORD3>
- <KEYWORD3>sp_helprotect</KEYWORD3>
- <KEYWORD3>sp_helpserver</KEYWORD3>
- <KEYWORD3>sp_helpsort</KEYWORD3>
- <KEYWORD3>sp_helpsrvrole</KEYWORD3>
- <KEYWORD3>sp_helpsrvrolemember</KEYWORD3>
- <KEYWORD3>sp_helpsubscriberinfo</KEYWORD3>
- <KEYWORD3>sp_helpsubscription</KEYWORD3>
- <KEYWORD3>sp_helpsubscription_properties</KEYWORD3>
- <KEYWORD3>sp_helptask</KEYWORD3>
- <KEYWORD3>sp_helptext</KEYWORD3>
- <KEYWORD3>sp_helptrigger</KEYWORD3>
- <KEYWORD3>sp_helpuser</KEYWORD3>
- <KEYWORD3>sp_indexes</KEYWORD3>
- <KEYWORD3>sp_indexoption</KEYWORD3>
- <KEYWORD3>sp_link_publication</KEYWORD3>
- <KEYWORD3>sp_linkedservers</KEYWORD3>
- <KEYWORD3>sp_lock</KEYWORD3>
- <KEYWORD3>sp_makewebtask</KEYWORD3>
- <KEYWORD3>sp_manage_jobs_by_login</KEYWORD3>
- <KEYWORD3>sp_mergedummyupdate</KEYWORD3>
- <KEYWORD3>sp_mergesubscription_cleanup</KEYWORD3>
- <KEYWORD3>sp_monitor</KEYWORD3>
- <KEYWORD3>sp_msx_defect</KEYWORD3>
- <KEYWORD3>sp_msx_enlist</KEYWORD3>
- <KEYWORD3>sp_OACreate</KEYWORD3>
- <KEYWORD3>sp_OADestroy</KEYWORD3>
- <KEYWORD3>sp_OAGetErrorInfo</KEYWORD3>
- <KEYWORD3>sp_OAGetProperty</KEYWORD3>
- <KEYWORD3>sp_OAMethod</KEYWORD3>
- <KEYWORD3>sp_OASetProperty</KEYWORD3>
- <KEYWORD3>sp_OAStop</KEYWORD3>
- <KEYWORD3>sp_password</KEYWORD3>
- <KEYWORD3>sp_pkeys</KEYWORD3>
- <KEYWORD3>sp_post_msx_operation</KEYWORD3>
- <KEYWORD3>sp_prepare</KEYWORD3>
- <KEYWORD3>sp_primarykeys</KEYWORD3>
- <KEYWORD3>sp_processmail</KEYWORD3>
- <KEYWORD3>sp_procoption</KEYWORD3>
- <KEYWORD3>sp_publication_validation</KEYWORD3>
- <KEYWORD3>sp_purge_jobhistory</KEYWORD3>
- <KEYWORD3>sp_purgehistory</KEYWORD3>
- <KEYWORD3>sp_reassigntask</KEYWORD3>
- <KEYWORD3>sp_recompile</KEYWORD3>
- <KEYWORD3>sp_refreshsubscriptions</KEYWORD3>
- <KEYWORD3>sp_refreshview</KEYWORD3>
- <KEYWORD3>sp_reinitmergepullsubscription</KEYWORD3>
- <KEYWORD3>sp_reinitmergesubscription</KEYWORD3>
- <KEYWORD3>sp_reinitpullsubscription</KEYWORD3>
- <KEYWORD3>sp_reinitsubscription</KEYWORD3>
- <KEYWORD3>sp_remoteoption</KEYWORD3>
- <KEYWORD3>sp_remove_job_from_targets</KEYWORD3>
- <KEYWORD3>sp_removedbreplication</KEYWORD3>
- <KEYWORD3>sp_rename</KEYWORD3>
- <KEYWORD3>sp_renamedb</KEYWORD3>
- <KEYWORD3>sp_replcmds</KEYWORD3>
- <KEYWORD3>sp_replcounters</KEYWORD3>
- <KEYWORD3>sp_repldone</KEYWORD3>
- <KEYWORD3>sp_replflush</KEYWORD3>
- <KEYWORD3>sp_replication_agent_checkup</KEYWORD3>
- <KEYWORD3>sp_replicationdboption</KEYWORD3>
- <KEYWORD3>sp_replsetoriginator</KEYWORD3>
- <KEYWORD3>sp_replshowcmds</KEYWORD3>
- <KEYWORD3>sp_repltrans</KEYWORD3>
- <KEYWORD3>sp_reset_connection</KEYWORD3>
- <KEYWORD3>sp_resync_targetserver</KEYWORD3>
- <KEYWORD3>sp_revoke_publication_access</KEYWORD3>
- <KEYWORD3>sp_revokedbaccess</KEYWORD3>
- <KEYWORD3>sp_revokelogin</KEYWORD3>
- <KEYWORD3>sp_runwebtask</KEYWORD3>
- <KEYWORD3>sp_script_synctran_commands</KEYWORD3>
- <KEYWORD3>sp_scriptdelproc</KEYWORD3>
- <KEYWORD3>sp_scriptinsproc</KEYWORD3>
- <KEYWORD3>sp_scriptmappedupdproc</KEYWORD3>
- <KEYWORD3>sp_scriptupdproc</KEYWORD3>
- <KEYWORD3>sp_sdidebug</KEYWORD3>
- <KEYWORD3>sp_server_info</KEYWORD3>
- <KEYWORD3>sp_serveroption</KEYWORD3>
- <KEYWORD3>sp_serveroption</KEYWORD3>
- <KEYWORD3>sp_setapprole</KEYWORD3>
- <KEYWORD3>sp_setnetname</KEYWORD3>
- <KEYWORD3>sp_spaceused</KEYWORD3>
- <KEYWORD3>sp_special_columns</KEYWORD3>
- <KEYWORD3>sp_sproc_columns</KEYWORD3>
- <KEYWORD3>sp_srvrolepermission</KEYWORD3>
- <KEYWORD3>sp_start_job</KEYWORD3>
- <KEYWORD3>sp_statistics</KEYWORD3>
- <KEYWORD3>sp_stop_job</KEYWORD3>
- <KEYWORD3>sp_stored_procedures</KEYWORD3>
- <KEYWORD3>sp_subscription_cleanup</KEYWORD3>
- <KEYWORD3>sp_table_privileges</KEYWORD3>
- <KEYWORD3>sp_table_privileges_ex</KEYWORD3>
- <KEYWORD3>sp_table_validation</KEYWORD3>
- <KEYWORD3>sp_tableoption</KEYWORD3>
- <KEYWORD3>sp_tables</KEYWORD3>
- <KEYWORD3>sp_tables_ex</KEYWORD3>
- <KEYWORD3>sp_unbindefault</KEYWORD3>
- <KEYWORD3>sp_unbindrule</KEYWORD3>
- <KEYWORD3>sp_unprepare</KEYWORD3>
- <KEYWORD3>sp_update_agent_profile</KEYWORD3>
- <KEYWORD3>sp_update_alert</KEYWORD3>
- <KEYWORD3>sp_update_category</KEYWORD3>
- <KEYWORD3>sp_update_job</KEYWORD3>
- <KEYWORD3>sp_update_jobschedule</KEYWORD3>
- <KEYWORD3>sp_update_jobstep</KEYWORD3>
- <KEYWORD3>sp_update_notification</KEYWORD3>
- <KEYWORD3>sp_update_operator</KEYWORD3>
- <KEYWORD3>sp_update_targetservergroup</KEYWORD3>
- <KEYWORD3>sp_updatestats</KEYWORD3>
- <KEYWORD3>sp_updatetask</KEYWORD3>
- <KEYWORD3>sp_validatelogins</KEYWORD3>
- <KEYWORD3>sp_validname</KEYWORD3>
- <KEYWORD3>sp_who</KEYWORD3>
- <KEYWORD3>xp_cmdshell</KEYWORD3>
- <KEYWORD3>xp_deletemail</KEYWORD3>
- <KEYWORD3>xp_enumgroups</KEYWORD3>
- <KEYWORD3>xp_findnextmsg</KEYWORD3>
- <KEYWORD3>xp_findnextmsg</KEYWORD3>
- <KEYWORD3>xp_grantlogin</KEYWORD3>
- <KEYWORD3>xp_logevent</KEYWORD3>
- <KEYWORD3>xp_loginconfig</KEYWORD3>
- <KEYWORD3>xp_logininfo</KEYWORD3>
- <KEYWORD3>xp_msver</KEYWORD3>
- <KEYWORD3>xp_readmail</KEYWORD3>
- <KEYWORD3>xp_revokelogin</KEYWORD3>
- <KEYWORD3>xp_sendmail</KEYWORD3>
- <KEYWORD3>xp_sprintf</KEYWORD3>
- <KEYWORD3>xp_sqlinventory</KEYWORD3>
- <KEYWORD3>xp_sqlmaint</KEYWORD3>
- <KEYWORD3>xp_sqltrace</KEYWORD3>
- <KEYWORD3>xp_sscanf</KEYWORD3>
- <KEYWORD3>xp_startmail</KEYWORD3>
- <KEYWORD3>xp_stopmail</KEYWORD3>
- <KEYWORD3>xp_trace_addnewqueue</KEYWORD3>
- <KEYWORD3>xp_trace_deletequeuedefinition</KEYWORD3>
- <KEYWORD3>xp_trace_destroyqueue</KEYWORD3>
- <KEYWORD3>xp_trace_enumqueuedefname</KEYWORD3>
- <KEYWORD3>xp_trace_enumqueuehandles</KEYWORD3>
- <KEYWORD3>xp_trace_eventclassrequired</KEYWORD3>
- <KEYWORD3>xp_trace_flushqueryhistory</KEYWORD3>
- <KEYWORD3>xp_trace_generate_event</KEYWORD3>
- <KEYWORD3>xp_trace_getappfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getconnectionidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getcpufilter</KEYWORD3>
- <KEYWORD3>xp_trace_getdbidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getdurationfilter</KEYWORD3>
- <KEYWORD3>xp_trace_geteventfilter</KEYWORD3>
- <KEYWORD3>xp_trace_geteventnames</KEYWORD3>
- <KEYWORD3>xp_trace_getevents</KEYWORD3>
- <KEYWORD3>xp_trace_gethostfilter</KEYWORD3>
- <KEYWORD3>xp_trace_gethpidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getindidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getntdmfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getntnmfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getobjidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getqueueautostart</KEYWORD3>
- <KEYWORD3>xp_trace_getqueuedestination</KEYWORD3>
- <KEYWORD3>xp_trace_getqueueproperties</KEYWORD3>
- <KEYWORD3>xp_trace_getreadfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getserverfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getseverityfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getspidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getsysobjectsfilter</KEYWORD3>
- <KEYWORD3>xp_trace_gettextfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getuserfilter</KEYWORD3>
- <KEYWORD3>xp_trace_getwritefilter</KEYWORD3>
- <KEYWORD3>xp_trace_loadqueuedefinition</KEYWORD3>
- <KEYWORD3>xp_trace_pausequeue</KEYWORD3>
- <KEYWORD3>xp_trace_restartqueue</KEYWORD3>
- <KEYWORD3>xp_trace_savequeuedefinition</KEYWORD3>
- <KEYWORD3>xp_trace_setappfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setconnectionidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setcpufilter</KEYWORD3>
- <KEYWORD3>xp_trace_setdbidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setdurationfilter</KEYWORD3>
- <KEYWORD3>xp_trace_seteventclassrequired</KEYWORD3>
- <KEYWORD3>xp_trace_seteventfilter</KEYWORD3>
- <KEYWORD3>xp_trace_sethostfilter</KEYWORD3>
- <KEYWORD3>xp_trace_sethpidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setindidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setntdmfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setntnmfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setobjidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setqueryhistory</KEYWORD3>
- <KEYWORD3>xp_trace_setqueueautostart</KEYWORD3>
- <KEYWORD3>xp_trace_setqueuecreateinfo</KEYWORD3>
- <KEYWORD3>xp_trace_setqueuedestination</KEYWORD3>
- <KEYWORD3>xp_trace_setreadfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setserverfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setseverityfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setspidfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setsysobjectsfilter</KEYWORD3>
- <KEYWORD3>xp_trace_settextfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setuserfilter</KEYWORD3>
- <KEYWORD3>xp_trace_setwritefilter</KEYWORD3>
- <KEYWORD3>fn_helpcollations</KEYWORD3>
- <KEYWORD3>fn_servershareddrives</KEYWORD3>
- <KEYWORD3>fn_virtualfilestats</KEYWORD3>
-
- <!-- SQL Server 7.0 system tables -->
- <KEYWORD3>backupfile</KEYWORD3>
- <KEYWORD3>backupmediafamily</KEYWORD3>
- <KEYWORD3>backupmediaset</KEYWORD3>
- <KEYWORD3>backupset</KEYWORD3>
- <KEYWORD3>MSagent_parameters</KEYWORD3>
- <KEYWORD3>MSagent_profiles</KEYWORD3>
- <KEYWORD3>MSarticles</KEYWORD3>
- <KEYWORD3>MSdistpublishers</KEYWORD3>
- <KEYWORD3>MSdistribution_agents</KEYWORD3>
- <KEYWORD3>MSdistribution_history</KEYWORD3>
- <KEYWORD3>MSdistributiondbs</KEYWORD3>
- <KEYWORD3>MSdistributor</KEYWORD3>
- <KEYWORD3>MSlogreader_agents</KEYWORD3>
- <KEYWORD3>MSlogreader_history</KEYWORD3>
- <KEYWORD3>MSmerge_agents</KEYWORD3>
- <KEYWORD3>MSmerge_contents</KEYWORD3>
- <KEYWORD3>MSmerge_delete_conflicts</KEYWORD3>
- <KEYWORD3>MSmerge_genhistory</KEYWORD3>
- <KEYWORD3>MSmerge_history</KEYWORD3>
- <KEYWORD3>MSmerge_replinfo</KEYWORD3>
- <KEYWORD3>MSmerge_subscriptions</KEYWORD3>
- <KEYWORD3>MSmerge_tombstone</KEYWORD3>
- <KEYWORD3>MSpublication_access</KEYWORD3>
- <KEYWORD3>Mspublications</KEYWORD3>
- <KEYWORD3>Mspublisher_databases</KEYWORD3>
- <KEYWORD3>MSrepl_commands</KEYWORD3>
- <KEYWORD3>MSrepl_errors</KEYWORD3>
- <KEYWORD3>Msrepl_originators</KEYWORD3>
- <KEYWORD3>MSrepl_transactions</KEYWORD3>
- <KEYWORD3>MSrepl_version</KEYWORD3>
- <KEYWORD3>MSreplication_objects</KEYWORD3>
- <KEYWORD3>MSreplication_subscriptions</KEYWORD3>
- <KEYWORD3>MSsnapshot_agents</KEYWORD3>
- <KEYWORD3>MSsnapshot_history</KEYWORD3>
- <KEYWORD3>MSsubscriber_info</KEYWORD3>
- <KEYWORD3>MSsubscriber_schedule</KEYWORD3>
- <KEYWORD3>MSsubscription_properties</KEYWORD3>
- <KEYWORD3>MSsubscriptions</KEYWORD3>
- <KEYWORD3>restorefile</KEYWORD3>
- <KEYWORD3>restorefilegroup</KEYWORD3>
- <KEYWORD3>restorehistory</KEYWORD3>
- <KEYWORD3>sysalerts</KEYWORD3>
- <KEYWORD3>sysallocations</KEYWORD3>
- <KEYWORD3>sysaltfiles</KEYWORD3>
- <KEYWORD3>sysarticles</KEYWORD3>
- <KEYWORD3>sysarticleupdates</KEYWORD3>
- <KEYWORD3>syscacheobjects</KEYWORD3>
- <KEYWORD3>syscategories</KEYWORD3>
- <KEYWORD3>syscharsets</KEYWORD3>
- <KEYWORD3>syscolumns</KEYWORD3>
- <KEYWORD3>syscomments</KEYWORD3>
- <KEYWORD3>sysconfigures</KEYWORD3>
- <KEYWORD3>sysconstraints</KEYWORD3>
- <KEYWORD3>syscurconfigs</KEYWORD3>
- <KEYWORD3>sysdatabases</KEYWORD3>
- <KEYWORD3>sysdatabases</KEYWORD3>
- <KEYWORD3>sysdepends</KEYWORD3>
- <KEYWORD3>sysdevices</KEYWORD3>
- <KEYWORD3>sysdownloadlist</KEYWORD3>
- <KEYWORD3>sysfilegroups</KEYWORD3>
- <KEYWORD3>sysfiles</KEYWORD3>
- <KEYWORD3>sysforeignkeys</KEYWORD3>
- <KEYWORD3>sysfulltextcatalogs</KEYWORD3>
- <KEYWORD3>sysindexes</KEYWORD3>
- <KEYWORD3>sysindexkeys</KEYWORD3>
- <KEYWORD3>sysjobhistory</KEYWORD3>
- <KEYWORD3>sysjobs</KEYWORD3>
- <KEYWORD3>sysjobschedules</KEYWORD3>
- <KEYWORD3>sysjobservers</KEYWORD3>
- <KEYWORD3>sysjobsteps</KEYWORD3>
- <KEYWORD3>syslanguages</KEYWORD3>
- <KEYWORD3>syslockinfo</KEYWORD3>
- <KEYWORD3>syslogins</KEYWORD3>
- <KEYWORD3>sysmembers</KEYWORD3>
- <KEYWORD3>sysmergearticles</KEYWORD3>
- <KEYWORD3>sysmergepublications</KEYWORD3>
- <KEYWORD3>sysmergeschemachange</KEYWORD3>
- <KEYWORD3>sysmergesubscriptions</KEYWORD3>
- <KEYWORD3>sysmergesubsetfilters</KEYWORD3>
- <KEYWORD3>sysmessages</KEYWORD3>
- <KEYWORD3>sysnotifications</KEYWORD3>
- <KEYWORD3>sysobjects</KEYWORD3>
- <KEYWORD3>sysobjects</KEYWORD3>
- <KEYWORD3>sysoledbusers</KEYWORD3>
- <KEYWORD3>sysoperators</KEYWORD3>
- <KEYWORD3>sysperfinfo</KEYWORD3>
- <KEYWORD3>syspermissions</KEYWORD3>
- <KEYWORD3>sysprocesses</KEYWORD3>
- <KEYWORD3>sysprotects</KEYWORD3>
- <KEYWORD3>syspublications</KEYWORD3>
- <KEYWORD3>sysreferences</KEYWORD3>
- <KEYWORD3>sysremotelogins</KEYWORD3>
- <KEYWORD3>sysreplicationalerts</KEYWORD3>
- <KEYWORD3>sysservers</KEYWORD3>
- <KEYWORD3>sysservers</KEYWORD3>
- <KEYWORD3>syssubscriptions</KEYWORD3>
- <KEYWORD3>systargetservergroupmembers</KEYWORD3>
- <KEYWORD3>systargetservergroups</KEYWORD3>
- <KEYWORD3>systargetservers</KEYWORD3>
- <KEYWORD3>systaskids</KEYWORD3>
- <KEYWORD3>systypes</KEYWORD3>
- <KEYWORD3>sysusers</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Identifier -->
+ <SPAN TYPE="LITERAL2" ESCAPE="\">
+ <BEGIN>`</BEGIN>
+ <END>`</END>
+ </SPAN>
+
+ <MARK_PREVIOUS TYPE="FUNCTION"
+ MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">!></SEQ>
+ <SEQ TYPE="OPERATOR">!<</SEQ>
+ <SEQ TYPE="OPERATOR">::</SEQ>
+ <MARK_PREVIOUS TYPE="LABEL" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <MARK_FOLLOWING TYPE="LITERAL2">@</MARK_FOLLOWING>
+
+ <KEYWORDS>
+ <!-- reserved words -->
+ <KEYWORD1>ABSOLUTE</KEYWORD1>
+ <KEYWORD1>ADD</KEYWORD1>
+ <KEYWORD1>ALTER</KEYWORD1>
+ <KEYWORD1>ANSI_NULLS</KEYWORD1>
+ <KEYWORD1>AS</KEYWORD1>
+ <KEYWORD1>ASC</KEYWORD1>
+ <KEYWORD1>AUTHORIZATION</KEYWORD1>
+ <KEYWORD1>BACKUP</KEYWORD1>
+ <KEYWORD1>BEGIN</KEYWORD1>
+ <KEYWORD1>BREAK</KEYWORD1>
+ <KEYWORD1>BROWSE</KEYWORD1>
+ <KEYWORD1>BULK</KEYWORD1>
+ <KEYWORD1>BY</KEYWORD1>
+ <KEYWORD1>CASCADE</KEYWORD1>
+ <KEYWORD1>CHECK</KEYWORD1>
+ <KEYWORD1>CHECKPOINT</KEYWORD1>
+ <KEYWORD1>CLOSE</KEYWORD1>
+ <KEYWORD1>CLUSTERED</KEYWORD1>
+ <KEYWORD1>COLUMN</KEYWORD1>
+ <KEYWORD1>COMMIT</KEYWORD1>
+ <KEYWORD1>COMMITTED</KEYWORD1>
+ <KEYWORD1>COMPUTE</KEYWORD1>
+ <KEYWORD1>CONFIRM</KEYWORD1>
+ <KEYWORD1>CONSTRAINT</KEYWORD1>
+ <KEYWORD1>CONTAINS</KEYWORD1>
+ <KEYWORD1>CONTAINSTABLE</KEYWORD1>
+ <KEYWORD1>CONTINUE</KEYWORD1>
+ <KEYWORD1>CONTROLROW</KEYWORD1>
+ <KEYWORD1>CREATE</KEYWORD1>
+ <KEYWORD1>CURRENT</KEYWORD1>
+ <KEYWORD1>CURRENT_DATE</KEYWORD1>
+ <KEYWORD1>CURRENT_TIME</KEYWORD1>
+ <KEYWORD1>CURSOR</KEYWORD1>
+ <KEYWORD1>DATABASE</KEYWORD1>
+ <KEYWORD1>DBCC</KEYWORD1>
+ <KEYWORD1>DEALLOCATE</KEYWORD1>
+ <KEYWORD1>DECLARE</KEYWORD1>
+ <KEYWORD1>DEFAULT</KEYWORD1>
+ <KEYWORD1>DELETE</KEYWORD1>
+ <KEYWORD1>DENY</KEYWORD1>
+ <KEYWORD1>DESC</KEYWORD1>
+ <KEYWORD1>DISK</KEYWORD1>
+ <KEYWORD1>DISTINCT</KEYWORD1>
+ <KEYWORD1>DISTRIBUTED</KEYWORD1>
+ <KEYWORD1>DOUBLE</KEYWORD1>
+ <KEYWORD1>DROP</KEYWORD1>
+ <KEYWORD1>DUMMY</KEYWORD1>
+ <KEYWORD1>DUMP</KEYWORD1>
+ <KEYWORD1>DYNAMIC</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>ERRLVL</KEYWORD1>
+ <KEYWORD1>ERROREXIT</KEYWORD1>
+ <KEYWORD1>ESCAPE</KEYWORD1>
+ <KEYWORD1>EXCEPT</KEYWORD1>
+ <KEYWORD1>EXEC</KEYWORD1>
+ <KEYWORD1>EXECUTE</KEYWORD1>
+ <KEYWORD1>EXIT</KEYWORD1>
+ <KEYWORD1>FAST_FORWARD</KEYWORD1>
+ <KEYWORD1>FETCH</KEYWORD1>
+ <KEYWORD1>FILE</KEYWORD1>
+ <KEYWORD1>FILLFACTOR</KEYWORD1>
+ <KEYWORD1>FIRST</KEYWORD1>
+ <KEYWORD1>FLOPPY</KEYWORD1>
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>FOREIGN</KEYWORD1>
+ <KEYWORD1>FORWARD_ONLY</KEYWORD1>
+ <KEYWORD1>FREETEXT</KEYWORD1>
+ <KEYWORD1>FREETEXTTABLE</KEYWORD1>
+ <KEYWORD1>FROM</KEYWORD1>
+ <KEYWORD1>FULL</KEYWORD1>
+ <KEYWORD1>FUNCTION</KEYWORD1>
+ <KEYWORD1>GLOBAL</KEYWORD1>
+ <KEYWORD1>GOTO</KEYWORD1>
+ <KEYWORD1>GRANT</KEYWORD1>
+ <KEYWORD1>GROUP</KEYWORD1>
+ <KEYWORD1>HAVING</KEYWORD1>
+ <KEYWORD1>HOLDLOCK</KEYWORD1>
+ <KEYWORD1>ID</KEYWORD1>
+ <KEYWORD1>IDENTITYCOL</KEYWORD1>
+ <KEYWORD1>IDENTITY_INSERT</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>INDEX</KEYWORD1>
+ <KEYWORD1>INNER</KEYWORD1>
+ <KEYWORD1>INSENSITIVE</KEYWORD1>
+ <KEYWORD1>INSERT</KEYWORD1>
+ <KEYWORD1>INTO</KEYWORD1>
+ <KEYWORD1>IS</KEYWORD1>
+ <KEYWORD1>ISOLATION</KEYWORD1>
+ <KEYWORD1>KEY</KEYWORD1>
+ <KEYWORD1>KEYSET</KEYWORD1>
+ <KEYWORD1>KILL</KEYWORD1>
+ <KEYWORD1>LAST</KEYWORD1>
+ <KEYWORD1>LEVEL</KEYWORD1>
+ <KEYWORD1>LINENO</KEYWORD1>
+ <KEYWORD1>LOAD</KEYWORD1>
+ <KEYWORD1>LOCAL</KEYWORD1>
+ <KEYWORD1>MAX</KEYWORD1>
+ <KEYWORD1>MIN</KEYWORD1>
+ <KEYWORD1>MIRROREXIT</KEYWORD1>
+ <KEYWORD1>NATIONAL</KEYWORD1>
+ <KEYWORD1>NEXT</KEYWORD1>
+ <KEYWORD1>NOCHECK</KEYWORD1>
+ <KEYWORD1>NONCLUSTERED</KEYWORD1>
+ <KEYWORD1>OF</KEYWORD1>
+ <KEYWORD1>OFF</KEYWORD1>
+ <KEYWORD1>OFFSETS</KEYWORD1>
+ <KEYWORD1>ON</KEYWORD1>
+ <KEYWORD1>ONCE</KEYWORD1>
+ <KEYWORD1>ONLY</KEYWORD1>
+ <KEYWORD1>OPEN</KEYWORD1>
+ <KEYWORD1>OPENDATASOURCE</KEYWORD1>
+ <KEYWORD1>OPENQUERY</KEYWORD1>
+ <KEYWORD1>OPENROWSET</KEYWORD1>
+ <KEYWORD1>OPTIMISTIC</KEYWORD1>
+ <KEYWORD1>OPTION</KEYWORD1>
+ <KEYWORD1>ORDER</KEYWORD1>
+ <KEYWORD1>OUTPUT</KEYWORD1>
+ <KEYWORD1>OVER</KEYWORD1>
+ <KEYWORD1>PERCENT</KEYWORD1>
+ <KEYWORD1>PERM</KEYWORD1>
+ <KEYWORD1>PERMANENT</KEYWORD1>
+ <KEYWORD1>PIPE</KEYWORD1>
+ <KEYWORD1>PLAN</KEYWORD1>
+ <KEYWORD1>PRECISION</KEYWORD1>
+ <KEYWORD1>PREPARE</KEYWORD1>
+ <KEYWORD1>PRIMARY</KEYWORD1>
+ <KEYWORD1>PRINT</KEYWORD1>
+ <KEYWORD1>PRIOR</KEYWORD1>
+ <KEYWORD1>PRIVILEGES</KEYWORD1>
+ <KEYWORD1>PROC</KEYWORD1>
+ <KEYWORD1>PROCEDURE</KEYWORD1>
+ <KEYWORD1>PROCESSEXIT</KEYWORD1>
+ <KEYWORD1>PUBLIC</KEYWORD1>
+ <KEYWORD1>QUOTED_IDENTIFIER</KEYWORD1>
+ <KEYWORD1>RAISERROR</KEYWORD1>
+ <KEYWORD1>READ</KEYWORD1>
+ <KEYWORD1>READTEXT</KEYWORD1>
+ <KEYWORD1>READ_ONLY</KEYWORD1>
+ <KEYWORD1>RECONFIGURE</KEYWORD1>
+ <KEYWORD1>REFERENCES</KEYWORD1>
+ <KEYWORD1>RELATIVE</KEYWORD1>
+ <KEYWORD1>REPEATABLE</KEYWORD1>
+ <KEYWORD1>REPLICATION</KEYWORD1>
+ <KEYWORD1>RESTORE</KEYWORD1>
+ <KEYWORD1>RESTRICT</KEYWORD1>
+ <KEYWORD1>RETURN</KEYWORD1>
+ <KEYWORD1>RETURNS</KEYWORD1>
+ <KEYWORD1>REVOKE</KEYWORD1>
+ <KEYWORD1>ROLLBACK</KEYWORD1>
+ <KEYWORD1>ROWGUIDCOL</KEYWORD1>
+ <KEYWORD1>RULE</KEYWORD1>
+ <KEYWORD1>SAVE</KEYWORD1>
+ <KEYWORD1>SCHEMA</KEYWORD1>
+ <KEYWORD1>SCROLL</KEYWORD1>
+ <KEYWORD1>SCROLL_LOCKS</KEYWORD1>
+ <KEYWORD1>SELECT</KEYWORD1>
+ <KEYWORD1>SERIALIZABLE</KEYWORD1>
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>SETUSER</KEYWORD1>
+ <KEYWORD1>SHUTDOWN</KEYWORD1>
+ <KEYWORD1>STATIC</KEYWORD1>
+ <KEYWORD1>STATISTICS</KEYWORD1>
+ <KEYWORD1>TABLE</KEYWORD1>
+ <KEYWORD1>TAPE</KEYWORD1>
+ <KEYWORD1>TEMP</KEYWORD1>
+ <KEYWORD1>TEMPORARY</KEYWORD1>
+ <KEYWORD1>TEXTIMAGE_ON</KEYWORD1>
+ <KEYWORD1>THEN</KEYWORD1>
+ <KEYWORD1>TO</KEYWORD1>
+ <KEYWORD1>TOP</KEYWORD1>
+ <KEYWORD1>TRAN</KEYWORD1>
+ <KEYWORD1>TRANSACTION</KEYWORD1>
+ <KEYWORD1>TRIGGER</KEYWORD1>
+ <KEYWORD1>TRUNCATE</KEYWORD1>
+ <KEYWORD1>TSEQUAL</KEYWORD1>
+ <KEYWORD1>UNCOMMITTED</KEYWORD1>
+ <KEYWORD1>UNION</KEYWORD1>
+ <KEYWORD1>UNIQUE</KEYWORD1>
+ <KEYWORD1>UPDATE</KEYWORD1>
+ <KEYWORD1>UPDATETEXT</KEYWORD1>
+ <KEYWORD1>USE</KEYWORD1>
+ <KEYWORD1>VALUES</KEYWORD1>
+ <KEYWORD1>VARYING</KEYWORD1>
+ <KEYWORD1>VIEW</KEYWORD1>
+ <KEYWORD1>WAITFOR</KEYWORD1>
+ <KEYWORD1>WHEN</KEYWORD1>
+ <KEYWORD1>WHERE</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+ <KEYWORD1>WITH</KEYWORD1>
+ <KEYWORD1>WORK</KEYWORD1>
+ <KEYWORD1>WRITETEXT</KEYWORD1>
+
+ <!-- data types -->
+ <KEYWORD1>binary</KEYWORD1>
+ <KEYWORD1>bit</KEYWORD1>
+ <KEYWORD1>char</KEYWORD1>
+ <KEYWORD1>character</KEYWORD1>
+ <KEYWORD1>datetime</KEYWORD1>
+ <KEYWORD1>decimal</KEYWORD1>
+ <KEYWORD1>float</KEYWORD1>
+ <KEYWORD1>image</KEYWORD1>
+ <KEYWORD1>int</KEYWORD1>
+ <KEYWORD1>integer</KEYWORD1>
+ <KEYWORD1>money</KEYWORD1>
+ <KEYWORD1>name</KEYWORD1>
+ <KEYWORD1>numeric</KEYWORD1>
+ <KEYWORD1>nchar</KEYWORD1>
+ <KEYWORD1>nvarchar</KEYWORD1>
+ <KEYWORD1>ntext</KEYWORD1>
+ <KEYWORD1>real</KEYWORD1>
+ <KEYWORD1>smalldatetime</KEYWORD1>
+ <KEYWORD1>smallint</KEYWORD1>
+ <KEYWORD1>smallmoney</KEYWORD1>
+ <KEYWORD1>text</KEYWORD1>
+ <KEYWORD1>timestamp</KEYWORD1>
+ <KEYWORD1>tinyint</KEYWORD1>
+ <KEYWORD1>uniqueidentifier</KEYWORD1>
+ <KEYWORD1>varbinary</KEYWORD1>
+ <KEYWORD1>varchar</KEYWORD1>
+
+ <!-- system functions -->
+ <KEYWORD2>@@CONNECTIONS</KEYWORD2>
+ <KEYWORD2>@@CPU_BUSY</KEYWORD2>
+ <KEYWORD2>@@CURSOR_ROWS</KEYWORD2>
+ <KEYWORD2>@@DATEFIRST</KEYWORD2>
+ <KEYWORD2>@@DBTS</KEYWORD2>
+ <KEYWORD2>@@ERROR</KEYWORD2>
+ <KEYWORD2>@@FETCH_STATUS</KEYWORD2>
+ <KEYWORD2>@@IDENTITY</KEYWORD2>
+ <KEYWORD2>@@IDLE</KEYWORD2>
+ <KEYWORD2>@@IO_BUSY</KEYWORD2>
+ <KEYWORD2>@@LANGID</KEYWORD2>
+ <KEYWORD2>@@LANGUAGE</KEYWORD2>
+ <KEYWORD2>@@LOCK_TIMEOUT</KEYWORD2>
+ <KEYWORD2>@@MAX_CONNECTIONS</KEYWORD2>
+ <KEYWORD2>@@MAX_PRECISION</KEYWORD2>
+ <KEYWORD2>@@NESTLEVEL</KEYWORD2>
+ <KEYWORD2>@@OPTIONS</KEYWORD2>
+ <KEYWORD2>@@PACKET_ERRORS</KEYWORD2>
+ <KEYWORD2>@@PACK_RECEIVED</KEYWORD2>
+ <KEYWORD2>@@PACK_SENT</KEYWORD2>
+ <KEYWORD2>@@PROCID</KEYWORD2>
+ <KEYWORD2>@@REMSERVER</KEYWORD2>
+ <KEYWORD2>@@ROWCOUNT</KEYWORD2>
+ <KEYWORD2>@@SERVERNAME</KEYWORD2>
+ <KEYWORD2>@@SERVICENAME</KEYWORD2>
+ <KEYWORD2>@@SPID</KEYWORD2>
+ <KEYWORD2>@@TEXTSIZE</KEYWORD2>
+ <KEYWORD2>@@TIMETICKS</KEYWORD2>
+ <KEYWORD2>@@TOTAL_ERRORS</KEYWORD2>
+ <KEYWORD2>@@TOTAL_READ</KEYWORD2>
+ <KEYWORD2>@@TOTAL_WRITE</KEYWORD2>
+ <KEYWORD2>@@TRANCOUNT</KEYWORD2>
+ <KEYWORD2>@@VERSION</KEYWORD2>
+ <KEYWORD2>ABS</KEYWORD2>
+ <KEYWORD2>ACOS</KEYWORD2>
+ <KEYWORD2>APP_NAME</KEYWORD2>
+ <KEYWORD2>ASCII</KEYWORD2>
+ <KEYWORD2>ASIN</KEYWORD2>
+ <KEYWORD2>ATAN</KEYWORD2>
+ <KEYWORD2>ATN2</KEYWORD2>
+ <KEYWORD2>AVG</KEYWORD2>
+ <KEYWORD2>BINARY_CHECKSUM</KEYWORD2>
+ <KEYWORD2>CASE</KEYWORD2>
+ <KEYWORD2>CAST</KEYWORD2>
+ <KEYWORD2>CEILING</KEYWORD2>
+ <KEYWORD2>CHARINDEX</KEYWORD2>
+ <KEYWORD2>CHECKSUM</KEYWORD2>
+ <KEYWORD2>CHECKSUM_AGG</KEYWORD2>
+ <KEYWORD2>COALESCE</KEYWORD2>
+ <KEYWORD2>COLLATIONPROPERTY</KEYWORD2>
+ <KEYWORD2>COLUMNPROPERTY</KEYWORD2>
+ <KEYWORD2>COL_LENGTH</KEYWORD2>
+ <KEYWORD2>COL_NAME</KEYWORD2>
+ <KEYWORD2>CONVERT</KEYWORD2>
+ <KEYWORD2>COS</KEYWORD2>
+ <KEYWORD2>COT</KEYWORD2>
+ <KEYWORD2>COUNT</KEYWORD2>
+ <KEYWORD2>COUNT_BIG</KEYWORD2>
+ <KEYWORD2>CURRENT_DATE</KEYWORD2>
+ <KEYWORD2>CURRENT_TIME</KEYWORD2>
+ <KEYWORD2>CURRENT_TIMESTAMP</KEYWORD2>
+ <KEYWORD2>CURRENT_USER</KEYWORD2>
+ <KEYWORD2>CURSOR_STATUS</KEYWORD2>
+ <KEYWORD2>DATABASEPROPERTY</KEYWORD2>
+ <KEYWORD2>DATALENGTH</KEYWORD2>
+ <KEYWORD2>DATEADD</KEYWORD2>
+ <KEYWORD2>DATEDIFF</KEYWORD2>
+ <KEYWORD2>DATENAME</KEYWORD2>
+ <KEYWORD2>DATEPART</KEYWORD2>
+ <KEYWORD2>DAY</KEYWORD2>
+ <KEYWORD2>DB_ID</KEYWORD2>
+ <KEYWORD2>DB_NAME</KEYWORD2>
+ <KEYWORD2>DEGREES</KEYWORD2>
+ <KEYWORD2>DIFFERENCE</KEYWORD2>
+ <KEYWORD2>EXP</KEYWORD2>
+ <KEYWORD2>FILEGROUPPROPERTY</KEYWORD2>
+ <KEYWORD2>FILEGROUP_ID</KEYWORD2>
+ <KEYWORD2>FILEGROUP_NAME</KEYWORD2>
+ <KEYWORD2>FILEPROPERTY</KEYWORD2>
+ <KEYWORD2>FILE_ID</KEYWORD2>
+ <KEYWORD2>FILE_NAME</KEYWORD2>
+ <KEYWORD2>FLOOR</KEYWORD2>
+ <KEYWORD2>FORMATMESSAGE</KEYWORD2>
+ <KEYWORD2>FULLTEXTCATALOGPROPERTY</KEYWORD2>
+ <KEYWORD2>FULLTEXTSERVICEPROPERTY</KEYWORD2>
+ <KEYWORD2>GETANSINULL</KEYWORD2>
+ <KEYWORD2>GETDATE</KEYWORD2>
+ <KEYWORD2>GETUTCDATE</KEYWORD2>
+ <KEYWORD2>GROUPING</KEYWORD2>
+ <KEYWORD2>HOST_ID</KEYWORD2>
+ <KEYWORD2>HOST_NAME</KEYWORD2>
+ <KEYWORD2>IDENTITY</KEYWORD2>
+ <KEYWORD2>IDENTITY_INSERT</KEYWORD2>
+ <KEYWORD2>IDENT_CURRENT</KEYWORD2>
+ <KEYWORD2>IDENT_INCR</KEYWORD2>
+ <KEYWORD2>IDENT_SEED</KEYWORD2>
+ <KEYWORD2>INDEXPROPERTY</KEYWORD2>
+ <KEYWORD2>INDEX_COL</KEYWORD2>
+ <KEYWORD2>ISDATE</KEYWORD2>
+ <KEYWORD2>ISNULL</KEYWORD2>
+ <KEYWORD2>ISNUMERIC</KEYWORD2>
+ <KEYWORD2>IS_MEMBER</KEYWORD2>
+ <KEYWORD2>IS_SRVROLEMEMBER</KEYWORD2>
+ <KEYWORD2>LEFT</KEYWORD2>
+ <KEYWORD2>LEN</KEYWORD2>
+ <KEYWORD2>LOG10</KEYWORD2>
+ <KEYWORD2>LOG</KEYWORD2>
+ <KEYWORD2>LOWER</KEYWORD2>
+ <KEYWORD2>LTRIM</KEYWORD2>
+ <KEYWORD2>MONTH</KEYWORD2>
+ <KEYWORD2>NEWID</KEYWORD2>
+ <KEYWORD2>NULLIF</KEYWORD2>
+ <KEYWORD2>OBJECTPROPERTY</KEYWORD2>
+ <KEYWORD2>OBJECT_ID</KEYWORD2>
+ <KEYWORD2>OBJECT_NAME</KEYWORD2>
+ <KEYWORD2>PARSENAME</KEYWORD2>
+ <KEYWORD2>PATINDEX</KEYWORD2>
+ <KEYWORD2>PERMISSIONS</KEYWORD2>
+ <KEYWORD2>PI</KEYWORD2>
+ <KEYWORD2>POWER</KEYWORD2>
+ <KEYWORD2>QUOTENAME</KEYWORD2>
+ <KEYWORD2>RADIANS</KEYWORD2>
+ <KEYWORD2>RAND</KEYWORD2>
+ <KEYWORD2>REPLACE</KEYWORD2>
+ <KEYWORD2>REPLICATE</KEYWORD2>
+ <KEYWORD2>REVERSE</KEYWORD2>
+ <KEYWORD2>RIGHT</KEYWORD2>
+ <KEYWORD2>ROUND</KEYWORD2>
+ <KEYWORD2>ROWCOUNT_BIG</KEYWORD2>
+ <KEYWORD2>RTRIM</KEYWORD2>
+ <KEYWORD2>SCOPE_IDENTITY</KEYWORD2>
+ <KEYWORD2>SERVERPROPERTY</KEYWORD2>
+ <KEYWORD2>SESSIONPROPERTY</KEYWORD2>
+ <KEYWORD2>SESSION_USER</KEYWORD2>
+ <KEYWORD2>SIGN</KEYWORD2>
+ <KEYWORD2>SIN</KEYWORD2>
+ <KEYWORD2>SOUNDEX</KEYWORD2>
+ <KEYWORD2>SPACE</KEYWORD2>
+ <KEYWORD2>SQRT</KEYWORD2>
+ <KEYWORD2>SQUARE</KEYWORD2>
+ <KEYWORD2>STATS_DATE</KEYWORD2>
+ <KEYWORD2>STDEV</KEYWORD2>
+ <KEYWORD2>STDEVP</KEYWORD2>
+ <KEYWORD2>STR</KEYWORD2>
+ <KEYWORD2>STUFF</KEYWORD2>
+ <KEYWORD2>SUBSTRING</KEYWORD2>
+ <KEYWORD2>SUM</KEYWORD2>
+ <KEYWORD2>SUSER_ID</KEYWORD2>
+ <KEYWORD2>SUSER_NAME</KEYWORD2>
+ <KEYWORD2>SUSER_SID</KEYWORD2>
+ <KEYWORD2>SUSER_SNAME</KEYWORD2>
+ <KEYWORD2>SYSTEM_USER</KEYWORD2>
+ <KEYWORD2>TAN</KEYWORD2>
+ <KEYWORD2>TEXTPTR</KEYWORD2>
+ <KEYWORD2>TEXTVALID</KEYWORD2>
+ <KEYWORD2>TYPEPROPERTY</KEYWORD2>
+ <KEYWORD2>UNICODE</KEYWORD2>
+ <KEYWORD2>UPPER</KEYWORD2>
+ <KEYWORD2>USER</KEYWORD2>
+ <KEYWORD2>USER_ID</KEYWORD2>
+ <KEYWORD2>USER_NAME</KEYWORD2>
+ <KEYWORD2>VAR</KEYWORD2>
+ <KEYWORD2>VARP</KEYWORD2>
+ <KEYWORD2>YEAR</KEYWORD2>
+
+ <!-- operators -->
+ <KEYWORD1>ALL</KEYWORD1>
+ <KEYWORD1>AND</KEYWORD1>
+ <KEYWORD1>ANY</KEYWORD1>
+ <KEYWORD1>BETWEEN</KEYWORD1>
+ <KEYWORD1>CROSS</KEYWORD1>
+ <KEYWORD1>EXISTS</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>INTERSECT</KEYWORD1>
+ <KEYWORD1>JOIN</KEYWORD1>
+ <KEYWORD1>LIKE</KEYWORD1>
+ <KEYWORD1>NOT</KEYWORD1>
+ <KEYWORD1>NULL</KEYWORD1>
+ <KEYWORD1>OR</KEYWORD1>
+ <KEYWORD1>OUTER</KEYWORD1>
+ <KEYWORD1>SOME</KEYWORD1>
+
+ <!-- SQL Server 7.0 system stored procedures -->
+ <KEYWORD3>sp_add_agent_parameter</KEYWORD3>
+ <KEYWORD3>sp_add_agent_profile</KEYWORD3>
+ <KEYWORD3>sp_add_alert</KEYWORD3>
+ <KEYWORD3>sp_add_category</KEYWORD3>
+ <KEYWORD3>sp_add_data_file_recover_suspect_db</KEYWORD3>
+ <KEYWORD3>sp_add_job</KEYWORD3>
+ <KEYWORD3>sp_add_jobschedule</KEYWORD3>
+ <KEYWORD3>sp_add_jobserver</KEYWORD3>
+ <KEYWORD3>sp_add_jobstep</KEYWORD3>
+ <KEYWORD3>sp_add_log_file_recover_suspect_db</KEYWORD3>
+ <KEYWORD3>sp_add_notification</KEYWORD3>
+ <KEYWORD3>sp_add_operator</KEYWORD3>
+ <KEYWORD3>sp_add_targetservergroup</KEYWORD3>
+ <KEYWORD3>sp_add_targetsvrgrp_member</KEYWORD3>
+ <KEYWORD3>sp_addalias</KEYWORD3>
+ <KEYWORD3>sp_addapprole</KEYWORD3>
+ <KEYWORD3>sp_addarticle</KEYWORD3>
+ <KEYWORD3>sp_adddistpublisher</KEYWORD3>
+ <KEYWORD3>sp_adddistributiondb</KEYWORD3>
+ <KEYWORD3>sp_adddistributor</KEYWORD3>
+ <KEYWORD3>sp_addextendedproc</KEYWORD3>
+ <KEYWORD3>sp_addgroup</KEYWORD3>
+ <KEYWORD3>sp_addlinkedserver</KEYWORD3>
+ <KEYWORD3>sp_addlinkedsrvlogin</KEYWORD3>
+ <KEYWORD3>sp_addlinkedsrvlogin</KEYWORD3>
+ <KEYWORD3>sp_addlogin</KEYWORD3>
+ <KEYWORD3>sp_addmergearticle</KEYWORD3>
+ <KEYWORD3>sp_addmergefilter</KEYWORD3>
+ <KEYWORD3>sp_addmergepublication</KEYWORD3>
+ <KEYWORD3>sp_addmergepullsubscription</KEYWORD3>
+ <KEYWORD3>sp_addmergepullsubscription_agent</KEYWORD3>
+ <KEYWORD3>sp_addmergesubscription</KEYWORD3>
+ <KEYWORD3>sp_addmessage</KEYWORD3>
+ <KEYWORD3>sp_addpublication</KEYWORD3>
+ <KEYWORD3>sp_addpublication_snapshot</KEYWORD3>
+ <KEYWORD3>sp_addpublisher70</KEYWORD3>
+ <KEYWORD3>sp_addpullsubscription</KEYWORD3>
+ <KEYWORD3>sp_addpullsubscription_agent</KEYWORD3>
+ <KEYWORD3>sp_addremotelogin</KEYWORD3>
+ <KEYWORD3>sp_addrole</KEYWORD3>
+ <KEYWORD3>sp_addrolemember</KEYWORD3>
+ <KEYWORD3>sp_addserver</KEYWORD3>
+ <KEYWORD3>sp_addsrvrolemember</KEYWORD3>
+ <KEYWORD3>sp_addsubscriber</KEYWORD3>
+ <KEYWORD3>sp_addsubscriber_schedule</KEYWORD3>
+ <KEYWORD3>sp_addsubscription</KEYWORD3>
+ <KEYWORD3>sp_addsynctriggers</KEYWORD3>
+ <KEYWORD3>sp_addtabletocontents</KEYWORD3>
+ <KEYWORD3>sp_addtask</KEYWORD3>
+ <KEYWORD3>sp_addtype</KEYWORD3>
+ <KEYWORD3>sp_addumpdevice</KEYWORD3>
+ <KEYWORD3>sp_adduser</KEYWORD3>
+ <KEYWORD3>sp_altermessage</KEYWORD3>
+ <KEYWORD3>sp_apply_job_to_targets</KEYWORD3>
+ <KEYWORD3>sp_approlepassword</KEYWORD3>
+ <KEYWORD3>sp_article_validation</KEYWORD3>
+ <KEYWORD3>sp_articlecolumn</KEYWORD3>
+ <KEYWORD3>sp_articlefilter</KEYWORD3>
+ <KEYWORD3>sp_articlesynctranprocs</KEYWORD3>
+ <KEYWORD3>sp_articleview</KEYWORD3>
+ <KEYWORD3>sp_attach_db</KEYWORD3>
+ <KEYWORD3>sp_attach_single_file_db</KEYWORD3>
+ <KEYWORD3>sp_autostats</KEYWORD3>
+ <KEYWORD3>sp_bindefault</KEYWORD3>
+ <KEYWORD3>sp_bindrule</KEYWORD3>
+ <KEYWORD3>sp_bindsession</KEYWORD3>
+ <KEYWORD3>sp_browsereplcmds</KEYWORD3>
+ <KEYWORD3>sp_catalogs</KEYWORD3>
+ <KEYWORD3>sp_certify_removable</KEYWORD3>
+ <KEYWORD3>sp_change_agent_parameter</KEYWORD3>
+ <KEYWORD3>sp_change_agent_profile</KEYWORD3>
+ <KEYWORD3>sp_change_subscription_properties</KEYWORD3>
+ <KEYWORD3>sp_change_users_login</KEYWORD3>
+ <KEYWORD3>sp_changearticle</KEYWORD3>
+ <KEYWORD3>sp_changedbowner</KEYWORD3>
+ <KEYWORD3>sp_changedistpublisher</KEYWORD3>
+ <KEYWORD3>sp_changedistributiondb</KEYWORD3>
+ <KEYWORD3>sp_changedistributor_password</KEYWORD3>
+ <KEYWORD3>sp_changedistributor_property</KEYWORD3>
+ <KEYWORD3>sp_changegroup</KEYWORD3>
+ <KEYWORD3>sp_changemergearticle</KEYWORD3>
+ <KEYWORD3>sp_changemergefilter</KEYWORD3>
+ <KEYWORD3>sp_changemergepublication</KEYWORD3>
+ <KEYWORD3>sp_changemergepullsubscription</KEYWORD3>
+ <KEYWORD3>sp_changemergesubscription</KEYWORD3>
+ <KEYWORD3>sp_changeobjectowner</KEYWORD3>
+ <KEYWORD3>sp_changepublication</KEYWORD3>
+ <KEYWORD3>sp_changesubscriber</KEYWORD3>
+ <KEYWORD3>sp_changesubscriber_schedule</KEYWORD3>
+ <KEYWORD3>sp_changesubstatus</KEYWORD3>
+ <KEYWORD3>sp_check_for_sync_trigger</KEYWORD3>
+ <KEYWORD3>sp_column_privileges</KEYWORD3>
+ <KEYWORD3>sp_column_privileges_ex</KEYWORD3>
+ <KEYWORD3>sp_columns</KEYWORD3>
+ <KEYWORD3>sp_columns_ex</KEYWORD3>
+ <KEYWORD3>sp_configure</KEYWORD3>
+ <KEYWORD3>sp_create_removable</KEYWORD3>
+ <KEYWORD3>sp_createorphan</KEYWORD3>
+ <KEYWORD3>sp_createstats</KEYWORD3>
+ <KEYWORD3>sp_cursor</KEYWORD3>
+ <KEYWORD3>sp_cursor_list</KEYWORD3>
+ <KEYWORD3>sp_cursorclose</KEYWORD3>
+ <KEYWORD3>sp_cursorexecute</KEYWORD3>
+ <KEYWORD3>sp_cursorfetch</KEYWORD3>
+ <KEYWORD3>sp_cursoropen</KEYWORD3>
+ <KEYWORD3>sp_cursoroption</KEYWORD3>
+ <KEYWORD3>sp_cursorprepare</KEYWORD3>
+ <KEYWORD3>sp_cursorunprepare</KEYWORD3>
+ <KEYWORD3>sp_cycle_errorlog</KEYWORD3>
+ <KEYWORD3>sp_databases</KEYWORD3>
+ <KEYWORD3>sp_datatype_info</KEYWORD3>
+ <KEYWORD3>sp_dbcmptlevel</KEYWORD3>
+ <KEYWORD3>sp_dbfixedrolepermission</KEYWORD3>
+ <KEYWORD3>sp_dboption</KEYWORD3>
+ <KEYWORD3>sp_defaultdb</KEYWORD3>
+ <KEYWORD3>sp_defaultlanguage</KEYWORD3>
+ <KEYWORD3>sp_delete_alert</KEYWORD3>
+ <KEYWORD3>sp_delete_backuphistory</KEYWORD3>
+ <KEYWORD3>sp_delete_category</KEYWORD3>
+ <KEYWORD3>sp_delete_job</KEYWORD3>
+ <KEYWORD3>sp_delete_jobschedule</KEYWORD3>
+ <KEYWORD3>sp_delete_jobserver</KEYWORD3>
+ <KEYWORD3>sp_delete_jobstep</KEYWORD3>
+ <KEYWORD3>sp_delete_notification</KEYWORD3>
+ <KEYWORD3>sp_delete_operator</KEYWORD3>
+ <KEYWORD3>sp_delete_targetserver</KEYWORD3>
+ <KEYWORD3>sp_delete_targetservergroup</KEYWORD3>
+ <KEYWORD3>sp_delete_targetsvrgrp_member</KEYWORD3>
+ <KEYWORD3>sp_deletemergeconflictrow</KEYWORD3>
+ <KEYWORD3>sp_denylogin</KEYWORD3>
+ <KEYWORD3>sp_depends</KEYWORD3>
+ <KEYWORD3>sp_describe_cursor</KEYWORD3>
+ <KEYWORD3>sp_describe_cursor_columns</KEYWORD3>
+ <KEYWORD3>sp_describe_cursor_tables</KEYWORD3>
+ <KEYWORD3>sp_detach_db</KEYWORD3>
+ <KEYWORD3>sp_drop_agent_parameter</KEYWORD3>
+ <KEYWORD3>sp_drop_agent_profile</KEYWORD3>
+ <KEYWORD3>sp_dropalias</KEYWORD3>
+ <KEYWORD3>sp_dropapprole</KEYWORD3>
+ <KEYWORD3>sp_droparticle</KEYWORD3>
+ <KEYWORD3>sp_dropdevice</KEYWORD3>
+ <KEYWORD3>sp_dropdistpublisher</KEYWORD3>
+ <KEYWORD3>sp_dropdistributiondb</KEYWORD3>
+ <KEYWORD3>sp_dropdistributor</KEYWORD3>
+ <KEYWORD3>sp_dropextendedproc</KEYWORD3>
+ <KEYWORD3>sp_dropgroup</KEYWORD3>
+ <KEYWORD3>sp_droplinkedsrvlogin</KEYWORD3>
+ <KEYWORD3>sp_droplinkedsrvlogin</KEYWORD3>
+ <KEYWORD3>sp_droplogin</KEYWORD3>
+ <KEYWORD3>sp_dropmergearticle</KEYWORD3>
+ <KEYWORD3>sp_dropmergefilter</KEYWORD3>
+ <KEYWORD3>sp_dropmergepublication</KEYWORD3>
+ <KEYWORD3>sp_dropmergepullsubscription</KEYWORD3>
+ <KEYWORD3>sp_dropmergesubscription</KEYWORD3>
+ <KEYWORD3>sp_dropmessage</KEYWORD3>
+ <KEYWORD3>sp_droporphans</KEYWORD3>
+ <KEYWORD3>sp_droppublication</KEYWORD3>
+ <KEYWORD3>sp_droppullsubscription</KEYWORD3>
+ <KEYWORD3>sp_dropremotelogin</KEYWORD3>
+ <KEYWORD3>sp_droprole</KEYWORD3>
+ <KEYWORD3>sp_droprolemember</KEYWORD3>
+ <KEYWORD3>sp_dropserver</KEYWORD3>
+ <KEYWORD3>sp_dropsrvrolemember</KEYWORD3>
+ <KEYWORD3>sp_dropsubscriber</KEYWORD3>
+ <KEYWORD3>sp_dropsubscription</KEYWORD3>
+ <KEYWORD3>sp_droptask</KEYWORD3>
+ <KEYWORD3>sp_droptype</KEYWORD3>
+ <KEYWORD3>sp_dropuser</KEYWORD3>
+ <KEYWORD3>sp_dropwebtask</KEYWORD3>
+ <KEYWORD3>sp_dsninfo</KEYWORD3>
+ <KEYWORD3>sp_dumpparamcmd</KEYWORD3>
+ <KEYWORD3>sp_enumcodepages</KEYWORD3>
+ <KEYWORD3>sp_enumcustomresolvers</KEYWORD3>
+ <KEYWORD3>sp_enumdsn</KEYWORD3>
+ <KEYWORD3>sp_enumfullsubscribers</KEYWORD3>
+ <KEYWORD3>sp_execute</KEYWORD3>
+ <KEYWORD3>sp_executesql</KEYWORD3>
+ <KEYWORD3>sp_expired_subscription_cleanup</KEYWORD3>
+ <KEYWORD3>sp_fkeys</KEYWORD3>
+ <KEYWORD3>sp_foreignkeys</KEYWORD3>
+ <KEYWORD3>sp_fulltext_catalog</KEYWORD3>
+ <KEYWORD3>sp_fulltext_column</KEYWORD3>
+ <KEYWORD3>sp_fulltext_database</KEYWORD3>
+ <KEYWORD3>sp_fulltext_service</KEYWORD3>
+ <KEYWORD3>sp_fulltext_table</KEYWORD3>
+ <KEYWORD3>sp_generatefilters</KEYWORD3>
+ <KEYWORD3>sp_get_distributor</KEYWORD3>
+ <KEYWORD3>sp_getbindtoken</KEYWORD3>
+ <KEYWORD3>sp_getmergedeletetype</KEYWORD3>
+ <KEYWORD3>sp_grant_publication_access</KEYWORD3>
+ <KEYWORD3>sp_grantdbaccess</KEYWORD3>
+ <KEYWORD3>sp_grantlogin</KEYWORD3>
+ <KEYWORD3>sp_help</KEYWORD3>
+ <KEYWORD3>sp_help_agent_default</KEYWORD3>
+ <KEYWORD3>sp_help_agent_parameter</KEYWORD3>
+ <KEYWORD3>sp_help_agent_profile</KEYWORD3>
+ <KEYWORD3>sp_help_alert</KEYWORD3>
+ <KEYWORD3>sp_help_category</KEYWORD3>
+ <KEYWORD3>sp_help_downloadlist</KEYWORD3>
+ <KEYWORD3>sp_help_fulltext_catalogs</KEYWORD3>
+ <KEYWORD3>sp_help_fulltext_catalogs_cursor</KEYWORD3>
+ <KEYWORD3>sp_help_fulltext_columns</KEYWORD3>
+ <KEYWORD3>sp_help_fulltext_columns_cursor</KEYWORD3>
+ <KEYWORD3>sp_help_fulltext_tables</KEYWORD3>
+ <KEYWORD3>sp_help_fulltext_tables_cursor</KEYWORD3>
+ <KEYWORD3>sp_help_job</KEYWORD3>
+ <KEYWORD3>sp_help_jobhistory</KEYWORD3>
+ <KEYWORD3>sp_help_jobschedule</KEYWORD3>
+ <KEYWORD3>sp_help_jobserver</KEYWORD3>
+ <KEYWORD3>sp_help_jobstep</KEYWORD3>
+ <KEYWORD3>sp_help_notification</KEYWORD3>
+ <KEYWORD3>sp_help_operator</KEYWORD3>
+ <KEYWORD3>sp_help_publication_access</KEYWORD3>
+ <KEYWORD3>sp_help_targetserver</KEYWORD3>
+ <KEYWORD3>sp_help_targetservergroup</KEYWORD3>
+ <KEYWORD3>sp_helparticle</KEYWORD3>
+ <KEYWORD3>sp_helparticlecolumns</KEYWORD3>
+ <KEYWORD3>sp_helpconstraint</KEYWORD3>
+ <KEYWORD3>sp_helpdb</KEYWORD3>
+ <KEYWORD3>sp_helpdbfixedrole</KEYWORD3>
+ <KEYWORD3>sp_helpdevice</KEYWORD3>
+ <KEYWORD3>sp_helpdistpublisher</KEYWORD3>
+ <KEYWORD3>sp_helpdistributiondb</KEYWORD3>
+ <KEYWORD3>sp_helpdistributor</KEYWORD3>
+ <KEYWORD3>sp_helpextendedproc</KEYWORD3>
+ <KEYWORD3>sp_helpfile</KEYWORD3>
+ <KEYWORD3>sp_helpfilegroup</KEYWORD3>
+ <KEYWORD3>sp_helpgroup</KEYWORD3>
+ <KEYWORD3>sp_helphistory</KEYWORD3>
+ <KEYWORD3>sp_helpindex</KEYWORD3>
+ <KEYWORD3>sp_helplanguage</KEYWORD3>
+ <KEYWORD3>sp_helplinkedsrvlogin</KEYWORD3>
+ <KEYWORD3>sp_helplogins</KEYWORD3>
+ <KEYWORD3>sp_helpmergearticle</KEYWORD3>
+ <KEYWORD3>sp_helpmergearticleconflicts</KEYWORD3>
+ <KEYWORD3>sp_helpmergeconflictrows</KEYWORD3>
+ <KEYWORD3>sp_helpmergedeleteconflictrows</KEYWORD3>
+ <KEYWORD3>sp_helpmergefilter</KEYWORD3>
+ <KEYWORD3>sp_helpmergepublication</KEYWORD3>
+ <KEYWORD3>sp_helpmergepullsubscription</KEYWORD3>
+ <KEYWORD3>sp_helpmergesubscription</KEYWORD3>
+ <KEYWORD3>sp_helpntgroup</KEYWORD3>
+ <KEYWORD3>sp_helppublication</KEYWORD3>
+ <KEYWORD3>sp_helppullsubscription</KEYWORD3>
+ <KEYWORD3>sp_helpremotelogin</KEYWORD3>
+ <KEYWORD3>sp_helpreplicationdboption</KEYWORD3>
+ <KEYWORD3>sp_helprole</KEYWORD3>
+ <KEYWORD3>sp_helprolemember</KEYWORD3>
+ <KEYWORD3>sp_helprotect</KEYWORD3>
+ <KEYWORD3>sp_helpserver</KEYWORD3>
+ <KEYWORD3>sp_helpsort</KEYWORD3>
+ <KEYWORD3>sp_helpsrvrole</KEYWORD3>
+ <KEYWORD3>sp_helpsrvrolemember</KEYWORD3>
+ <KEYWORD3>sp_helpsubscriberinfo</KEYWORD3>
+ <KEYWORD3>sp_helpsubscription</KEYWORD3>
+ <KEYWORD3>sp_helpsubscription_properties</KEYWORD3>
+ <KEYWORD3>sp_helptask</KEYWORD3>
+ <KEYWORD3>sp_helptext</KEYWORD3>
+ <KEYWORD3>sp_helptrigger</KEYWORD3>
+ <KEYWORD3>sp_helpuser</KEYWORD3>
+ <KEYWORD3>sp_indexes</KEYWORD3>
+ <KEYWORD3>sp_indexoption</KEYWORD3>
+ <KEYWORD3>sp_link_publication</KEYWORD3>
+ <KEYWORD3>sp_linkedservers</KEYWORD3>
+ <KEYWORD3>sp_lock</KEYWORD3>
+ <KEYWORD3>sp_makewebtask</KEYWORD3>
+ <KEYWORD3>sp_manage_jobs_by_login</KEYWORD3>
+ <KEYWORD3>sp_mergedummyupdate</KEYWORD3>
+ <KEYWORD3>sp_mergesubscription_cleanup</KEYWORD3>
+ <KEYWORD3>sp_monitor</KEYWORD3>
+ <KEYWORD3>sp_msx_defect</KEYWORD3>
+ <KEYWORD3>sp_msx_enlist</KEYWORD3>
+ <KEYWORD3>sp_OACreate</KEYWORD3>
+ <KEYWORD3>sp_OADestroy</KEYWORD3>
+ <KEYWORD3>sp_OAGetErrorInfo</KEYWORD3>
+ <KEYWORD3>sp_OAGetProperty</KEYWORD3>
+ <KEYWORD3>sp_OAMethod</KEYWORD3>
+ <KEYWORD3>sp_OASetProperty</KEYWORD3>
+ <KEYWORD3>sp_OAStop</KEYWORD3>
+ <KEYWORD3>sp_password</KEYWORD3>
+ <KEYWORD3>sp_pkeys</KEYWORD3>
+ <KEYWORD3>sp_post_msx_operation</KEYWORD3>
+ <KEYWORD3>sp_prepare</KEYWORD3>
+ <KEYWORD3>sp_primarykeys</KEYWORD3>
+ <KEYWORD3>sp_processmail</KEYWORD3>
+ <KEYWORD3>sp_procoption</KEYWORD3>
+ <KEYWORD3>sp_publication_validation</KEYWORD3>
+ <KEYWORD3>sp_purge_jobhistory</KEYWORD3>
+ <KEYWORD3>sp_purgehistory</KEYWORD3>
+ <KEYWORD3>sp_reassigntask</KEYWORD3>
+ <KEYWORD3>sp_recompile</KEYWORD3>
+ <KEYWORD3>sp_refreshsubscriptions</KEYWORD3>
+ <KEYWORD3>sp_refreshview</KEYWORD3>
+ <KEYWORD3>sp_reinitmergepullsubscription</KEYWORD3>
+ <KEYWORD3>sp_reinitmergesubscription</KEYWORD3>
+ <KEYWORD3>sp_reinitpullsubscription</KEYWORD3>
+ <KEYWORD3>sp_reinitsubscription</KEYWORD3>
+ <KEYWORD3>sp_remoteoption</KEYWORD3>
+ <KEYWORD3>sp_remove_job_from_targets</KEYWORD3>
+ <KEYWORD3>sp_removedbreplication</KEYWORD3>
+ <KEYWORD3>sp_rename</KEYWORD3>
+ <KEYWORD3>sp_renamedb</KEYWORD3>
+ <KEYWORD3>sp_replcmds</KEYWORD3>
+ <KEYWORD3>sp_replcounters</KEYWORD3>
+ <KEYWORD3>sp_repldone</KEYWORD3>
+ <KEYWORD3>sp_replflush</KEYWORD3>
+ <KEYWORD3>sp_replication_agent_checkup</KEYWORD3>
+ <KEYWORD3>sp_replicationdboption</KEYWORD3>
+ <KEYWORD3>sp_replsetoriginator</KEYWORD3>
+ <KEYWORD3>sp_replshowcmds</KEYWORD3>
+ <KEYWORD3>sp_repltrans</KEYWORD3>
+ <KEYWORD3>sp_reset_connection</KEYWORD3>
+ <KEYWORD3>sp_resync_targetserver</KEYWORD3>
+ <KEYWORD3>sp_revoke_publication_access</KEYWORD3>
+ <KEYWORD3>sp_revokedbaccess</KEYWORD3>
+ <KEYWORD3>sp_revokelogin</KEYWORD3>
+ <KEYWORD3>sp_runwebtask</KEYWORD3>
+ <KEYWORD3>sp_script_synctran_commands</KEYWORD3>
+ <KEYWORD3>sp_scriptdelproc</KEYWORD3>
+ <KEYWORD3>sp_scriptinsproc</KEYWORD3>
+ <KEYWORD3>sp_scriptmappedupdproc</KEYWORD3>
+ <KEYWORD3>sp_scriptupdproc</KEYWORD3>
+ <KEYWORD3>sp_sdidebug</KEYWORD3>
+ <KEYWORD3>sp_server_info</KEYWORD3>
+ <KEYWORD3>sp_serveroption</KEYWORD3>
+ <KEYWORD3>sp_serveroption</KEYWORD3>
+ <KEYWORD3>sp_setapprole</KEYWORD3>
+ <KEYWORD3>sp_setnetname</KEYWORD3>
+ <KEYWORD3>sp_spaceused</KEYWORD3>
+ <KEYWORD3>sp_special_columns</KEYWORD3>
+ <KEYWORD3>sp_sproc_columns</KEYWORD3>
+ <KEYWORD3>sp_srvrolepermission</KEYWORD3>
+ <KEYWORD3>sp_start_job</KEYWORD3>
+ <KEYWORD3>sp_statistics</KEYWORD3>
+ <KEYWORD3>sp_stop_job</KEYWORD3>
+ <KEYWORD3>sp_stored_procedures</KEYWORD3>
+ <KEYWORD3>sp_subscription_cleanup</KEYWORD3>
+ <KEYWORD3>sp_table_privileges</KEYWORD3>
+ <KEYWORD3>sp_table_privileges_ex</KEYWORD3>
+ <KEYWORD3>sp_table_validation</KEYWORD3>
+ <KEYWORD3>sp_tableoption</KEYWORD3>
+ <KEYWORD3>sp_tables</KEYWORD3>
+ <KEYWORD3>sp_tables_ex</KEYWORD3>
+ <KEYWORD3>sp_unbindefault</KEYWORD3>
+ <KEYWORD3>sp_unbindrule</KEYWORD3>
+ <KEYWORD3>sp_unprepare</KEYWORD3>
+ <KEYWORD3>sp_update_agent_profile</KEYWORD3>
+ <KEYWORD3>sp_update_alert</KEYWORD3>
+ <KEYWORD3>sp_update_category</KEYWORD3>
+ <KEYWORD3>sp_update_job</KEYWORD3>
+ <KEYWORD3>sp_update_jobschedule</KEYWORD3>
+ <KEYWORD3>sp_update_jobstep</KEYWORD3>
+ <KEYWORD3>sp_update_notification</KEYWORD3>
+ <KEYWORD3>sp_update_operator</KEYWORD3>
+ <KEYWORD3>sp_update_targetservergroup</KEYWORD3>
+ <KEYWORD3>sp_updatestats</KEYWORD3>
+ <KEYWORD3>sp_updatetask</KEYWORD3>
+ <KEYWORD3>sp_validatelogins</KEYWORD3>
+ <KEYWORD3>sp_validname</KEYWORD3>
+ <KEYWORD3>sp_who</KEYWORD3>
+ <KEYWORD3>xp_cmdshell</KEYWORD3>
+ <KEYWORD3>xp_deletemail</KEYWORD3>
+ <KEYWORD3>xp_enumgroups</KEYWORD3>
+ <KEYWORD3>xp_findnextmsg</KEYWORD3>
+ <KEYWORD3>xp_findnextmsg</KEYWORD3>
+ <KEYWORD3>xp_grantlogin</KEYWORD3>
+ <KEYWORD3>xp_logevent</KEYWORD3>
+ <KEYWORD3>xp_loginconfig</KEYWORD3>
+ <KEYWORD3>xp_logininfo</KEYWORD3>
+ <KEYWORD3>xp_msver</KEYWORD3>
+ <KEYWORD3>xp_readmail</KEYWORD3>
+ <KEYWORD3>xp_revokelogin</KEYWORD3>
+ <KEYWORD3>xp_sendmail</KEYWORD3>
+ <KEYWORD3>xp_sprintf</KEYWORD3>
+ <KEYWORD3>xp_sqlinventory</KEYWORD3>
+ <KEYWORD3>xp_sqlmaint</KEYWORD3>
+ <KEYWORD3>xp_sqltrace</KEYWORD3>
+ <KEYWORD3>xp_sscanf</KEYWORD3>
+ <KEYWORD3>xp_startmail</KEYWORD3>
+ <KEYWORD3>xp_stopmail</KEYWORD3>
+ <KEYWORD3>xp_trace_addnewqueue</KEYWORD3>
+ <KEYWORD3>xp_trace_deletequeuedefinition</KEYWORD3>
+ <KEYWORD3>xp_trace_destroyqueue</KEYWORD3>
+ <KEYWORD3>xp_trace_enumqueuedefname</KEYWORD3>
+ <KEYWORD3>xp_trace_enumqueuehandles</KEYWORD3>
+ <KEYWORD3>xp_trace_eventclassrequired</KEYWORD3>
+ <KEYWORD3>xp_trace_flushqueryhistory</KEYWORD3>
+ <KEYWORD3>xp_trace_generate_event</KEYWORD3>
+ <KEYWORD3>xp_trace_getappfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getconnectionidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getcpufilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getdbidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getdurationfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_geteventfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_geteventnames</KEYWORD3>
+ <KEYWORD3>xp_trace_getevents</KEYWORD3>
+ <KEYWORD3>xp_trace_gethostfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_gethpidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getindidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getntdmfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getntnmfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getobjidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getqueueautostart</KEYWORD3>
+ <KEYWORD3>xp_trace_getqueuedestination</KEYWORD3>
+ <KEYWORD3>xp_trace_getqueueproperties</KEYWORD3>
+ <KEYWORD3>xp_trace_getreadfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getserverfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getseverityfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getspidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getsysobjectsfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_gettextfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getuserfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_getwritefilter</KEYWORD3>
+ <KEYWORD3>xp_trace_loadqueuedefinition</KEYWORD3>
+ <KEYWORD3>xp_trace_pausequeue</KEYWORD3>
+ <KEYWORD3>xp_trace_restartqueue</KEYWORD3>
+ <KEYWORD3>xp_trace_savequeuedefinition</KEYWORD3>
+ <KEYWORD3>xp_trace_setappfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setconnectionidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setcpufilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setdbidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setdurationfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_seteventclassrequired</KEYWORD3>
+ <KEYWORD3>xp_trace_seteventfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_sethostfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_sethpidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setindidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setntdmfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setntnmfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setobjidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setqueryhistory</KEYWORD3>
+ <KEYWORD3>xp_trace_setqueueautostart</KEYWORD3>
+ <KEYWORD3>xp_trace_setqueuecreateinfo</KEYWORD3>
+ <KEYWORD3>xp_trace_setqueuedestination</KEYWORD3>
+ <KEYWORD3>xp_trace_setreadfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setserverfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setseverityfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setspidfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setsysobjectsfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_settextfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setuserfilter</KEYWORD3>
+ <KEYWORD3>xp_trace_setwritefilter</KEYWORD3>
+ <KEYWORD3>fn_helpcollations</KEYWORD3>
+ <KEYWORD3>fn_servershareddrives</KEYWORD3>
+ <KEYWORD3>fn_virtualfilestats</KEYWORD3>
+
+ <!-- SQL Server 7.0 system tables -->
+ <KEYWORD3>backupfile</KEYWORD3>
+ <KEYWORD3>backupmediafamily</KEYWORD3>
+ <KEYWORD3>backupmediaset</KEYWORD3>
+ <KEYWORD3>backupset</KEYWORD3>
+ <KEYWORD3>MSagent_parameters</KEYWORD3>
+ <KEYWORD3>MSagent_profiles</KEYWORD3>
+ <KEYWORD3>MSarticles</KEYWORD3>
+ <KEYWORD3>MSdistpublishers</KEYWORD3>
+ <KEYWORD3>MSdistribution_agents</KEYWORD3>
+ <KEYWORD3>MSdistribution_history</KEYWORD3>
+ <KEYWORD3>MSdistributiondbs</KEYWORD3>
+ <KEYWORD3>MSdistributor</KEYWORD3>
+ <KEYWORD3>MSlogreader_agents</KEYWORD3>
+ <KEYWORD3>MSlogreader_history</KEYWORD3>
+ <KEYWORD3>MSmerge_agents</KEYWORD3>
+ <KEYWORD3>MSmerge_contents</KEYWORD3>
+ <KEYWORD3>MSmerge_delete_conflicts</KEYWORD3>
+ <KEYWORD3>MSmerge_genhistory</KEYWORD3>
+ <KEYWORD3>MSmerge_history</KEYWORD3>
+ <KEYWORD3>MSmerge_replinfo</KEYWORD3>
+ <KEYWORD3>MSmerge_subscriptions</KEYWORD3>
+ <KEYWORD3>MSmerge_tombstone</KEYWORD3>
+ <KEYWORD3>MSpublication_access</KEYWORD3>
+ <KEYWORD3>Mspublications</KEYWORD3>
+ <KEYWORD3>Mspublisher_databases</KEYWORD3>
+ <KEYWORD3>MSrepl_commands</KEYWORD3>
+ <KEYWORD3>MSrepl_errors</KEYWORD3>
+ <KEYWORD3>Msrepl_originators</KEYWORD3>
+ <KEYWORD3>MSrepl_transactions</KEYWORD3>
+ <KEYWORD3>MSrepl_version</KEYWORD3>
+ <KEYWORD3>MSreplication_objects</KEYWORD3>
+ <KEYWORD3>MSreplication_subscriptions</KEYWORD3>
+ <KEYWORD3>MSsnapshot_agents</KEYWORD3>
+ <KEYWORD3>MSsnapshot_history</KEYWORD3>
+ <KEYWORD3>MSsubscriber_info</KEYWORD3>
+ <KEYWORD3>MSsubscriber_schedule</KEYWORD3>
+ <KEYWORD3>MSsubscription_properties</KEYWORD3>
+ <KEYWORD3>MSsubscriptions</KEYWORD3>
+ <KEYWORD3>restorefile</KEYWORD3>
+ <KEYWORD3>restorefilegroup</KEYWORD3>
+ <KEYWORD3>restorehistory</KEYWORD3>
+ <KEYWORD3>sysalerts</KEYWORD3>
+ <KEYWORD3>sysallocations</KEYWORD3>
+ <KEYWORD3>sysaltfiles</KEYWORD3>
+ <KEYWORD3>sysarticles</KEYWORD3>
+ <KEYWORD3>sysarticleupdates</KEYWORD3>
+ <KEYWORD3>syscacheobjects</KEYWORD3>
+ <KEYWORD3>syscategories</KEYWORD3>
+ <KEYWORD3>syscharsets</KEYWORD3>
+ <KEYWORD3>syscolumns</KEYWORD3>
+ <KEYWORD3>syscomments</KEYWORD3>
+ <KEYWORD3>sysconfigures</KEYWORD3>
+ <KEYWORD3>sysconstraints</KEYWORD3>
+ <KEYWORD3>syscurconfigs</KEYWORD3>
+ <KEYWORD3>sysdatabases</KEYWORD3>
+ <KEYWORD3>sysdatabases</KEYWORD3>
+ <KEYWORD3>sysdepends</KEYWORD3>
+ <KEYWORD3>sysdevices</KEYWORD3>
+ <KEYWORD3>sysdownloadlist</KEYWORD3>
+ <KEYWORD3>sysfilegroups</KEYWORD3>
+ <KEYWORD3>sysfiles</KEYWORD3>
+ <KEYWORD3>sysforeignkeys</KEYWORD3>
+ <KEYWORD3>sysfulltextcatalogs</KEYWORD3>
+ <KEYWORD3>sysindexes</KEYWORD3>
+ <KEYWORD3>sysindexkeys</KEYWORD3>
+ <KEYWORD3>sysjobhistory</KEYWORD3>
+ <KEYWORD3>sysjobs</KEYWORD3>
+ <KEYWORD3>sysjobschedules</KEYWORD3>
+ <KEYWORD3>sysjobservers</KEYWORD3>
+ <KEYWORD3>sysjobsteps</KEYWORD3>
+ <KEYWORD3>syslanguages</KEYWORD3>
+ <KEYWORD3>syslockinfo</KEYWORD3>
+ <KEYWORD3>syslogins</KEYWORD3>
+ <KEYWORD3>sysmembers</KEYWORD3>
+ <KEYWORD3>sysmergearticles</KEYWORD3>
+ <KEYWORD3>sysmergepublications</KEYWORD3>
+ <KEYWORD3>sysmergeschemachange</KEYWORD3>
+ <KEYWORD3>sysmergesubscriptions</KEYWORD3>
+ <KEYWORD3>sysmergesubsetfilters</KEYWORD3>
+ <KEYWORD3>sysmessages</KEYWORD3>
+ <KEYWORD3>sysnotifications</KEYWORD3>
+ <KEYWORD3>sysobjects</KEYWORD3>
+ <KEYWORD3>sysobjects</KEYWORD3>
+ <KEYWORD3>sysoledbusers</KEYWORD3>
+ <KEYWORD3>sysoperators</KEYWORD3>
+ <KEYWORD3>sysperfinfo</KEYWORD3>
+ <KEYWORD3>syspermissions</KEYWORD3>
+ <KEYWORD3>sysprocesses</KEYWORD3>
+ <KEYWORD3>sysprotects</KEYWORD3>
+ <KEYWORD3>syspublications</KEYWORD3>
+ <KEYWORD3>sysreferences</KEYWORD3>
+ <KEYWORD3>sysremotelogins</KEYWORD3>
+ <KEYWORD3>sysreplicationalerts</KEYWORD3>
+ <KEYWORD3>sysservers</KEYWORD3>
+ <KEYWORD3>sysservers</KEYWORD3>
+ <KEYWORD3>syssubscriptions</KEYWORD3>
+ <KEYWORD3>systargetservergroupmembers</KEYWORD3>
+ <KEYWORD3>systargetservergroups</KEYWORD3>
+ <KEYWORD3>systargetservers</KEYWORD3>
+ <KEYWORD3>systaskids</KEYWORD3>
+ <KEYWORD3>systypes</KEYWORD3>
+ <KEYWORD3>sysusers</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/tthtml.xml b/jEdit/modes/tthtml.xml
index b0874ce..1bd96e3 100644
--- a/jEdit/modes/tthtml.xml
+++ b/jEdit/modes/tthtml.xml
@@ -1,266 +1,266 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<MODE>
- <!--
- Made by Krassimir Berov: k.berov at gmail.com
- -->
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="[" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="]" />
- <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
- <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
- <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
- <PROPERTY NAME="indentNextLine" VALUE="(FOREACH|FOR|WHILE|IF|ELSIF|ELSE|UNLESS|SWITCH|CASE|TRY|CATCH)(\s.*?)?;" />
- </PROPS>
-
- <!-- ESCAPE is not exactly right but it is needed to correctly
- handle JavaScript in on* parameters -->
- <RULES SET="TAGS" DEFAULT="MARKUP">
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <SEQ TYPE="OPERATOR">=</SEQ><!-- give priority to TT -->
-
- </RULES>
-
- <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
- <SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">></SEQ>
- <!-- handle <SCRIPT SRC="..."> properly -->
- <SEQ TYPE="MARKUP" DELEGATE="html::MAIN">SRC=</SEQ>
- </RULES>
-
- <RULES SET="CSS" DEFAULT="MARKUP">
- <SEQ TYPE="MARKUP" DELEGATE="css::MAIN">></SEQ>
- </RULES>
- <RULES IGNORE_CASE="TRUE">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- <SPAN TYPE="COMMENT2">
- <BEGIN>[%#</BEGIN>
- <END>%]</END>
- </SPAN>
- <SPAN_REGEXP DELEGATE="perl::MAIN" HASH_CHAR="[%">
- <BEGIN>\[%\s*?PERL\s*?%\]</BEGIN>
- <END>\[%\s*?END\s*?%\]</END>
- </SPAN_REGEXP>
-
- <SPAN TYPE="LITERAL3" DELEGATE="TT">
- <BEGIN>[%</BEGIN>
- <END>%]</END>
- </SPAN>
- </RULES>
- <RULES SET="TT"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
-
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
- <!-- Scalar variables -->
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?[\w:]+</SEQ_REGEXP>
- <!-- Scalar variables
- <SEQ_REGEXP ->ADD HASH_CHARS here if uncommenting<- TYPE="KEYWORD2">\s[a-z_0-9]+\s</SEQ_REGEXP> -->
- <!-- Compound Variables -->
- <MARK_PREVIOUS TYPE="KEYWORD4" MATCH_TYPE="CONTEXT">.</MARK_PREVIOUS>
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="CONTEXT">(</MARK_PREVIOUS>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">]</SEQ>
- <SEQ TYPE="OPERATOR">[</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <KEYWORDS>
- <!-- Template directives -->
- <KEYWORD1>SET</KEYWORD1>
- <KEYWORD1>GET</KEYWORD1>
- <KEYWORD1>CALL</KEYWORD1>
- <KEYWORD1>DEFAULT</KEYWORD1>
- <KEYWORD1>IF</KEYWORD1>
- <KEYWORD1>ELSIF</KEYWORD1>
- <KEYWORD1>ELSE</KEYWORD1>
- <KEYWORD1>UNLESS</KEYWORD1>
- <KEYWORD1>LAST</KEYWORD1>
- <KEYWORD1>NEXT</KEYWORD1>
- <KEYWORD1>FOR</KEYWORD1>
- <KEYWORD1>FOREACH</KEYWORD1>
- <KEYWORD1>WHILE</KEYWORD1>
- <KEYWORD1>SWITCH</KEYWORD1>
- <KEYWORD1>CASE</KEYWORD1>
- <KEYWORD1>PROCESS</KEYWORD1>
- <KEYWORD1>INCLUDE</KEYWORD1>
- <KEYWORD1>INSERT</KEYWORD1>
- <KEYWORD1>WRAPPER</KEYWORD1>
- <KEYWORD1>BLOCK</KEYWORD1>
- <KEYWORD1>MACRO</KEYWORD1>
- <KEYWORD1>END</KEYWORD1>
- <KEYWORD1>USE</KEYWORD1>
- <KEYWORD1>IN</KEYWORD1>
- <KEYWORD1>FILTER</KEYWORD1>
- <KEYWORD1>TRY</KEYWORD1>
- <KEYWORD1>THROW</KEYWORD1>
- <KEYWORD1>CATCH</KEYWORD1>
- <KEYWORD1>FINAL</KEYWORD1>
- <KEYWORD1>META</KEYWORD1>
- <KEYWORD1>TAGS</KEYWORD1>
- <KEYWORD1>DEBUG</KEYWORD1>
- <KEYWORD1>PERL</KEYWORD1>
- <!-- Compile Time Constant Folding -->
- <KEYWORD1>constants</KEYWORD1>
- <!-- Special Variables -->
- <KEYWORD2>template</KEYWORD2>
- <KEYWORD2>component</KEYWORD2>
- <KEYWORD2>loop</KEYWORD2>
- <KEYWORD2>error</KEYWORD2>
- <KEYWORD2>content</KEYWORD2>
-
- <!-- VMethods -->
- <!-- Scalar Virtual Methods -->
- <KEYWORD3>defined</KEYWORD3>
- <KEYWORD3>length</KEYWORD3>
- <KEYWORD3>repeat</KEYWORD3>
- <KEYWORD3>replace</KEYWORD3>
- <KEYWORD3>match</KEYWORD3>
- <KEYWORD3>search</KEYWORD3>
- <KEYWORD3>split</KEYWORD3>
- <KEYWORD3>chunk</KEYWORD3>
- <KEYWORD3>list</KEYWORD3>
- <KEYWORD3>hash</KEYWORD3>
- <KEYWORD3>size</KEYWORD3>
-
- <!-- Hash Virtual Methods -->
- <KEYWORD3>keys</KEYWORD3>
- <KEYWORD3>values</KEYWORD3>
- <KEYWORD3>each</KEYWORD3>
- <KEYWORD3>sort</KEYWORD3>
- <KEYWORD3>nsort</KEYWORD3>
- <KEYWORD3>import</KEYWORD3>
- <KEYWORD3>defined</KEYWORD3>
- <KEYWORD3>exists</KEYWORD3>
- <KEYWORD3>item</KEYWORD3>
-
- <!-- List Virtual Methods -->
- <KEYWORD3>first</KEYWORD3>
- <KEYWORD3>last</KEYWORD3>
- <KEYWORD3>max</KEYWORD3>
- <KEYWORD3>reverse</KEYWORD3>
- <KEYWORD3>join</KEYWORD3>
- <KEYWORD3>grep</KEYWORD3>
- <KEYWORD3>unshift</KEYWORD3>
- <KEYWORD3>push</KEYWORD3>
- <KEYWORD3>shift</KEYWORD3>
- <KEYWORD3>pop</KEYWORD3>
- <KEYWORD3>unique</KEYWORD3>
- <KEYWORD3>merge</KEYWORD3>
- <KEYWORD3>slice</KEYWORD3>
- <KEYWORD3>splice</KEYWORD3>
- <KEYWORD3>count</KEYWORD3>
-
- <!-- Standard filters -->
- <FUNCTION>format</FUNCTION>
- <FUNCTION>upper</FUNCTION>
- <FUNCTION>lower</FUNCTION>
- <FUNCTION>ucfirst</FUNCTION>
- <FUNCTION>lcfirst</FUNCTION>
- <FUNCTION>trim</FUNCTION>
- <FUNCTION>collapse</FUNCTION>
- <FUNCTION>html</FUNCTION>
- <FUNCTION>html_entity</FUNCTION>
- <FUNCTION>html_para</FUNCTION>
- <FUNCTION>html_break</FUNCTION>
- <FUNCTION>html_para_break</FUNCTION>
- <FUNCTION>html_line_break</FUNCTION>
- <FUNCTION>uri</FUNCTION>
- <FUNCTION>url</FUNCTION>
- <FUNCTION>indent</FUNCTION>
- <FUNCTION>truncate</FUNCTION>
- <FUNCTION>repeat</FUNCTION>
- <FUNCTION>remove</FUNCTION>
- <FUNCTION>replace</FUNCTION>
- <FUNCTION>redirect</FUNCTION>
- <FUNCTION>eval</FUNCTION>
- <FUNCTION>evaltt</FUNCTION>
- <FUNCTION>perl</FUNCTION>
- <FUNCTION>evalperl</FUNCTION>
- <FUNCTION>stdout</FUNCTION>
- <FUNCTION>stderr</FUNCTION>
- <FUNCTION>null</FUNCTION>
- <FUNCTION>latex</FUNCTION>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <!--
+ Made by Krassimir Berov: k.berov at gmail.com
+ -->
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="[" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="]" />
+ <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
+ <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
+ <PROPERTY NAME="indentNextLine" VALUE="(FOREACH|FOR|WHILE|IF|ELSIF|ELSE|UNLESS|SWITCH|CASE|TRY|CATCH)(\s.*?)?;" />
+ </PROPS>
+
+ <!-- ESCAPE is not exactly right but it is needed to correctly
+ handle JavaScript in on* parameters -->
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <SEQ TYPE="OPERATOR">=</SEQ><!-- give priority to TT -->
+
+ </RULES>
+
+ <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
+ <SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">></SEQ>
+ <!-- handle <SCRIPT SRC="..."> properly -->
+ <SEQ TYPE="MARKUP" DELEGATE="html::MAIN">SRC=</SEQ>
+ </RULES>
+
+ <RULES SET="CSS" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="css::MAIN">></SEQ>
+ </RULES>
+ <RULES IGNORE_CASE="TRUE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>[%#</BEGIN>
+ <END>%]</END>
+ </SPAN>
+ <SPAN_REGEXP DELEGATE="perl::MAIN" HASH_CHAR="[%">
+ <BEGIN>\[%\s*?PERL\s*?%\]</BEGIN>
+ <END>\[%\s*?END\s*?%\]</END>
+ </SPAN_REGEXP>
+
+ <SPAN TYPE="LITERAL3" DELEGATE="TT">
+ <BEGIN>[%</BEGIN>
+ <END>%]</END>
+ </SPAN>
+ </RULES>
+ <RULES SET="TT"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="VARIABLE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <!-- Scalar variables -->
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?[\w:]+</SEQ_REGEXP>
+ <!-- Scalar variables
+ <SEQ_REGEXP ->ADD HASH_CHARS here if uncommenting<- TYPE="KEYWORD2">\s[a-z_0-9]+\s</SEQ_REGEXP> -->
+ <!-- Compound Variables -->
+ <MARK_PREVIOUS TYPE="KEYWORD4" MATCH_TYPE="CONTEXT">.</MARK_PREVIOUS>
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="CONTEXT">(</MARK_PREVIOUS>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">]</SEQ>
+ <SEQ TYPE="OPERATOR">[</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <KEYWORDS>
+ <!-- Template directives -->
+ <KEYWORD1>SET</KEYWORD1>
+ <KEYWORD1>GET</KEYWORD1>
+ <KEYWORD1>CALL</KEYWORD1>
+ <KEYWORD1>DEFAULT</KEYWORD1>
+ <KEYWORD1>IF</KEYWORD1>
+ <KEYWORD1>ELSIF</KEYWORD1>
+ <KEYWORD1>ELSE</KEYWORD1>
+ <KEYWORD1>UNLESS</KEYWORD1>
+ <KEYWORD1>LAST</KEYWORD1>
+ <KEYWORD1>NEXT</KEYWORD1>
+ <KEYWORD1>FOR</KEYWORD1>
+ <KEYWORD1>FOREACH</KEYWORD1>
+ <KEYWORD1>WHILE</KEYWORD1>
+ <KEYWORD1>SWITCH</KEYWORD1>
+ <KEYWORD1>CASE</KEYWORD1>
+ <KEYWORD1>PROCESS</KEYWORD1>
+ <KEYWORD1>INCLUDE</KEYWORD1>
+ <KEYWORD1>INSERT</KEYWORD1>
+ <KEYWORD1>WRAPPER</KEYWORD1>
+ <KEYWORD1>BLOCK</KEYWORD1>
+ <KEYWORD1>MACRO</KEYWORD1>
+ <KEYWORD1>END</KEYWORD1>
+ <KEYWORD1>USE</KEYWORD1>
+ <KEYWORD1>IN</KEYWORD1>
+ <KEYWORD1>FILTER</KEYWORD1>
+ <KEYWORD1>TRY</KEYWORD1>
+ <KEYWORD1>THROW</KEYWORD1>
+ <KEYWORD1>CATCH</KEYWORD1>
+ <KEYWORD1>FINAL</KEYWORD1>
+ <KEYWORD1>META</KEYWORD1>
+ <KEYWORD1>TAGS</KEYWORD1>
+ <KEYWORD1>DEBUG</KEYWORD1>
+ <KEYWORD1>PERL</KEYWORD1>
+ <!-- Compile Time Constant Folding -->
+ <KEYWORD1>constants</KEYWORD1>
+ <!-- Special Variables -->
+ <KEYWORD2>template</KEYWORD2>
+ <KEYWORD2>component</KEYWORD2>
+ <KEYWORD2>loop</KEYWORD2>
+ <KEYWORD2>error</KEYWORD2>
+ <KEYWORD2>content</KEYWORD2>
+
+ <!-- VMethods -->
+ <!-- Scalar Virtual Methods -->
+ <KEYWORD3>defined</KEYWORD3>
+ <KEYWORD3>length</KEYWORD3>
+ <KEYWORD3>repeat</KEYWORD3>
+ <KEYWORD3>replace</KEYWORD3>
+ <KEYWORD3>match</KEYWORD3>
+ <KEYWORD3>search</KEYWORD3>
+ <KEYWORD3>split</KEYWORD3>
+ <KEYWORD3>chunk</KEYWORD3>
+ <KEYWORD3>list</KEYWORD3>
+ <KEYWORD3>hash</KEYWORD3>
+ <KEYWORD3>size</KEYWORD3>
+
+ <!-- Hash Virtual Methods -->
+ <KEYWORD3>keys</KEYWORD3>
+ <KEYWORD3>values</KEYWORD3>
+ <KEYWORD3>each</KEYWORD3>
+ <KEYWORD3>sort</KEYWORD3>
+ <KEYWORD3>nsort</KEYWORD3>
+ <KEYWORD3>import</KEYWORD3>
+ <KEYWORD3>defined</KEYWORD3>
+ <KEYWORD3>exists</KEYWORD3>
+ <KEYWORD3>item</KEYWORD3>
+
+ <!-- List Virtual Methods -->
+ <KEYWORD3>first</KEYWORD3>
+ <KEYWORD3>last</KEYWORD3>
+ <KEYWORD3>max</KEYWORD3>
+ <KEYWORD3>reverse</KEYWORD3>
+ <KEYWORD3>join</KEYWORD3>
+ <KEYWORD3>grep</KEYWORD3>
+ <KEYWORD3>unshift</KEYWORD3>
+ <KEYWORD3>push</KEYWORD3>
+ <KEYWORD3>shift</KEYWORD3>
+ <KEYWORD3>pop</KEYWORD3>
+ <KEYWORD3>unique</KEYWORD3>
+ <KEYWORD3>merge</KEYWORD3>
+ <KEYWORD3>slice</KEYWORD3>
+ <KEYWORD3>splice</KEYWORD3>
+ <KEYWORD3>count</KEYWORD3>
+
+ <!-- Standard filters -->
+ <FUNCTION>format</FUNCTION>
+ <FUNCTION>upper</FUNCTION>
+ <FUNCTION>lower</FUNCTION>
+ <FUNCTION>ucfirst</FUNCTION>
+ <FUNCTION>lcfirst</FUNCTION>
+ <FUNCTION>trim</FUNCTION>
+ <FUNCTION>collapse</FUNCTION>
+ <FUNCTION>html</FUNCTION>
+ <FUNCTION>html_entity</FUNCTION>
+ <FUNCTION>html_para</FUNCTION>
+ <FUNCTION>html_break</FUNCTION>
+ <FUNCTION>html_para_break</FUNCTION>
+ <FUNCTION>html_line_break</FUNCTION>
+ <FUNCTION>uri</FUNCTION>
+ <FUNCTION>url</FUNCTION>
+ <FUNCTION>indent</FUNCTION>
+ <FUNCTION>truncate</FUNCTION>
+ <FUNCTION>repeat</FUNCTION>
+ <FUNCTION>remove</FUNCTION>
+ <FUNCTION>replace</FUNCTION>
+ <FUNCTION>redirect</FUNCTION>
+ <FUNCTION>eval</FUNCTION>
+ <FUNCTION>evaltt</FUNCTION>
+ <FUNCTION>perl</FUNCTION>
+ <FUNCTION>evalperl</FUNCTION>
+ <FUNCTION>stdout</FUNCTION>
+ <FUNCTION>stderr</FUNCTION>
+ <FUNCTION>null</FUNCTION>
+ <FUNCTION>latex</FUNCTION>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/turbobasic.xml b/jEdit/modes/turbobasic.xml
index 15ce512..7e895f8 100644
--- a/jEdit/modes/turbobasic.xml
+++ b/jEdit/modes/turbobasic.xml
@@ -1,368 +1,368 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<!-- Turbobasic, 3/25/09 by Ben Dutcher -->
-<!-- The Turbo Basic compiler was a Borland product. It's way old. My manual dates from 1987 -->
-<!-- The categories here are those in the manual, except where I couldn't get them to work. -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="'" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" ESCAPE="\">
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- TurboBasic will use either symbol to start a comment -->
- <EOL_SPAN TYPE="COMMENT1">'</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">rem </EOL_SPAN>
-
-
- <!-- Comparison operators -->
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
-
- <!-- indicate a named constant like %true. Remember you need to define them once only. Integers only. -->
- <SPAN_REGEXP HASH_CHAR="%" TYPE="MARKUP" AT_WORD_START="TRUE" NO_WORD_BREAK="TRUE">
- <BEGIN>%</BEGIN>
- <END>\S*</END>
- </SPAN_REGEXP>
-
- <!-- Arithmetic operators -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">mod</SEQ>
-
- <!-- File number marker like #3, but which also is used to indicate a double-precison variable like FineMeasuremet# -->
- <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">#</SEQ>
-
- <!-- to handle "def FNmine(), etc.: -->
- <SEQ TYPE="KEYWORD1">def FN</SEQ>
-
- <!-- rather than enter option and base as separate keywords, since they are used only in this combination -->
- <SEQ TYPE="KEYWORD1">option base</SEQ>
-
- <!-- <SEQ TYPE="NULL">_</SEQ>-->
- <!-- Instruction separator -->
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <KEYWORDS>
-
- <!-- Weirdly enough, Turbo Basic doesn't support the words TRUE or FALSE
- so I always define them in the code. with %false = 0: %true = not %false -->
-
- <!-- occasional test word. It's not in the manual, but that would have been fun. -->
- <KEYWORD3>notalotta</KEYWORD3>
-
- <!-- Listed as keywords, but also described as unsupported:
- list
- usr, usr0-usr9
- Just listed as unsupported:
- auto, delete, edit, load, new, renum, save, cont, merge, motor
- -->
- <!-- Logical operators -->
- <KEYWORD3>and</KEYWORD3>
- <KEYWORD3>eqv</KEYWORD3>
- <KEYWORD3>imp</KEYWORD3>
- <KEYWORD3>not</KEYWORD3>
- <KEYWORD3>or</KEYWORD3>
- <KEYWORD3>xor</KEYWORD3>
-
- <!-- chaining -->
- <KEYWORD1>chain</KEYWORD1>
- <KEYWORD1>common</KEYWORD1>
- <KEYWORD1>run</KEYWORD1>
-
- <!-- compiler control -->
- <KEYWORD1>dim</KEYWORD1>
- <KEYWORD1>lbound</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <!-- KEYWORD1>option base</KEYWORD1 -->
- <KEYWORD1>rem</KEYWORD1>
- <KEYWORD1>shared</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>tron</KEYWORD1>
- <KEYWORD1>troff</KEYWORD1>
- <KEYWORD1>ubound</KEYWORD1>
-
- <!-- devices -->
- <!-- KEYWORD1>open com</KEYWORD1 -->
- <KEYWORD1>com</KEYWORD1>
- <KEYWORD1>inp</KEYWORD1>
- <KEYWORD1>ioctl$</KEYWORD1>
- <KEYWORD1>ioctl</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
-
- <!-- DOS -->
- <KEYWORD1>chdir</KEYWORD1>
- <KEYWORD1>command$</KEYWORD1>
- <KEYWORD1>date$</KEYWORD1>
- <KEYWORD1>environ$</KEYWORD1>
- <KEYWORD1>environ</KEYWORD1>
- <KEYWORD1>kill</KEYWORD1>
- <KEYWORD1>mkdir</KEYWORD1>
- <KEYWORD1>rmdir</KEYWORD1>
- <KEYWORD1>shell</KEYWORD1>
- <KEYWORD1>system</KEYWORD1>
- <KEYWORD1>time$</KEYWORD1>
-
- <!-- Error Handling -->
- <KEYWORD1>eradr</KEYWORD1>
- <KEYWORD1>erdev</KEYWORD1>
- <KEYWORD1>erdev$</KEYWORD1>
- <KEYWORD1>erl</KEYWORD1>
- <KEYWORD1>error</KEYWORD1>
- <KEYWORD1>err</KEYWORD1>
-
- <!-- files -->
- <KEYWORD1>bload</KEYWORD1>
- <KEYWORD1>bsave</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>eof</KEYWORD1>
- <KEYWORD1>field</KEYWORD1>
- <KEYWORD1>files</KEYWORD1>
- <KEYWORD1>get</KEYWORD1>
- <!-- KEYWORD1>line input #</KEYWORD1 -->
- <KEYWORD1>loc</KEYWORD1>
- <KEYWORD1>lof</KEYWORD1>
- <KEYWORD1>lset</KEYWORD1>
- <KEYWORD1>name</KEYWORD1>
- <KEYWORD1>open</KEYWORD1>
- <!-- KEYWORD1>print #</KEYWORD1 -->
- <KEYWORD1>put$</KEYWORD1>
- <KEYWORD1>put</KEYWORD1>
- <KEYWORD1>reset</KEYWORD1>
- <KEYWORD1>rset</KEYWORD1>
- <KEYWORD1>seek</KEYWORD1>
- <KEYWORD1>using</KEYWORD1>
- <!-- KEYWORD1>write #</KEYWORD1 -->
-
- <!-- flow control -->
- <!--KEYWORD1>call absolute</KEYWORD1 -->
- <!-- KEYWORD1>call interrupt</KEYWORD1 -->
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>def</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>elseif</KEYWORD1>
- <!-- KEYWORD1>end case</KEYWORD1>
- <KEYWORD1>case else</KEYWORD1 -->
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>gosub</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>inline</KEYWORD1>
- <KEYWORD1>resume</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>step</KEYWORD1>
- <KEYWORD1>stop</KEYWORD1>
- <KEYWORD1>sub</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <!-- KEYWORD1>def fn</KEYWORD1>
- <KEYWORD1>end def</KEYWORD1>
- <KEYWORD1>end sub</KEYWORD1 -->
- <KEYWORD1>wend</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <!-- draw/graphics -->
- <KEYWORD1>circle</KEYWORD1>
- <KEYWORD1>draw</KEYWORD1>
- <KEYWORD1>line</KEYWORD1>
- <KEYWORD1>paint</KEYWORD1>
- <!-- KEYWORD1>palette using</KEYWORD1 -->
- <KEYWORD1>palette</KEYWORD1>
- <KEYWORD1>peek</KEYWORD1>
- <KEYWORD1>pen</KEYWORD1>
- <KEYWORD1>pmap</KEYWORD1>
- <KEYWORD1>point</KEYWORD1>
- <KEYWORD1>poke</KEYWORD1>
- <KEYWORD1>preset</KEYWORD1>
- <KEYWORD1>pset</KEYWORD1>
- <KEYWORD1>put</KEYWORD1>
- <KEYWORD1>view</KEYWORD1>
- <KEYWORD1>window</KEYWORD1>
-
- <!-- hardware events -->
- <KEYWORD1>mtimer</KEYWORD1>
- <KEYWORD1>off</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <!-- KEYWORD1>on com</KEYWORD1>
- <KEYWORD1>on error</KEYWORD1>
- <KEYWORD1>on key</KEYWORD1>
- <KEYWORD1>on pen</KEYWORD1>
- <KEYWORD1>on play</KEYWORD1>
- <KEYWORD1>on strig</KEYWORD1>
- <KEYWORD1>on timer</KEYWORD1 -->
- <KEYWORD1>stick</KEYWORD1>
- <KEYWORD1>strig</KEYWORD1>
- <KEYWORD1>timer</KEYWORD1>
- <KEYWORD1>wait</KEYWORD1>
-
- <!--input -->
- <KEYWORD1>inkey$</KEYWORD1>
- <KEYWORD1>input$</KEYWORD1>
- <!-- KEYWORD1>input #</KEYWORD1 -->
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD1>instat</KEYWORD1>
- <!-- KEYWORD1>line input</KEYWORD1 -->
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>restore</KEYWORD1>
-
- <!-- keyboard -->
- <!-- KEYWORD1>key on</KEYWORD1>
- <KEYWORD1>key off</KEYWORD1 -->
- <KEYWORD1>key</KEYWORD1>
-
- <!-- memory -->
- <KEYWORD1>clear</KEYWORD1>
- <!-- KEYWORD1>def seg</KEYWORD1 -->
- <KEYWORD1>endmem</KEYWORD1>
- <KEYWORD1>erase</KEYWORD1>
- <KEYWORD1>fre</KEYWORD1>
- <KEYWORD1>memset</KEYWORD1>
- <KEYWORD1>poke</KEYWORD1>
- <KEYWORD1>seg</KEYWORD1>
- <KEYWORD1>varptr$</KEYWORD1>
- <KEYWORD1>varptr</KEYWORD1>
- <KEYWORD1>varseg</KEYWORD1>
-
- <!-- metastatements -->
- <KEYWORD2>$com1</KEYWORD2>
- <KEYWORD2>$com2</KEYWORD2>
- <KEYWORD2>$com</KEYWORD2>
- <KEYWORD2>$debug</KEYWORD2>
- <KEYWORD2>$dynamic</KEYWORD2>
- <KEYWORD2>$event</KEYWORD2>
- <KEYWORD2>$if</KEYWORD2>
- <KEYWORD2>$else</KEYWORD2>
- <KEYWORD2>$endif</KEYWORD2>
- <KEYWORD2>$include</KEYWORD2>
- <KEYWORD2>$inline</KEYWORD2>
- <KEYWORD2>$list</KEYWORD2>
- <KEYWORD2>$option</KEYWORD2>
- <KEYWORD2>$segment</KEYWORD2>
- <KEYWORD2>$sound</KEYWORD2>
- <KEYWORD2>$stack</KEYWORD2>
- <KEYWORD2>$static</KEYWORD2>
-
- <!-- Miscellaneous -->
- <KEYWORD1>data</KEYWORD1>
- <KEYWORD1>delay</KEYWORD1>
- <KEYWORD1>reg</KEYWORD1>
- <KEYWORD1>swap</KEYWORD1>
-
-
- <!-- Math Functions -->
- <FUNCTION>abs</FUNCTION>
- <FUNCTION>asc</FUNCTION>
- <FUNCTION>atn</FUNCTION>
- <FUNCTION>cdbl</FUNCTION>
- <FUNCTION>ceil</FUNCTION>
- <FUNCTION>cint</FUNCTION>
- <FUNCTION>clng</FUNCTION>
- <FUNCTION>cos</FUNCTION>
- <FUNCTION>csng</FUNCTION>
- <FUNCTION>cvi</FUNCTION>
- <FUNCTION>cvl</FUNCTION>
- <FUNCTION>cvs</FUNCTION>
- <FUNCTION>cvd</FUNCTION>
- <FUNCTION>cvmd</FUNCTION>
- <FUNCTION>cvms</FUNCTION>
- <KEYWORD2>decr</KEYWORD2>
- <KEYWORD2>defint</KEYWORD2>
- <KEYWORD2>deflng</KEYWORD2>
- <KEYWORD2>defsng</KEYWORD2>
- <KEYWORD2>defdbl</KEYWORD2>
- <KEYWORD2>defstr</KEYWORD2>
- <FUNCTION>exp2</FUNCTION>
- <FUNCTION>exp10</FUNCTION>
- <FUNCTION>exp</FUNCTION>
- <FUNCTION>fix</FUNCTION>
- <KEYWORD2>incr</KEYWORD2>
- <FUNCTION>int</FUNCTION>
- <FUNCTION>log10</FUNCTION>
- <FUNCTION>log2</FUNCTION>
- <FUNCTION>log</FUNCTION>
- <FUNCTION>mki$</FUNCTION>
- <FUNCTION>mkl$</FUNCTION>
- <FUNCTION>mks$</FUNCTION>
- <FUNCTION>mkd$</FUNCTION>
- <FUNCTION>mkmd$</FUNCTION>
- <FUNCTION>mkms$</FUNCTION>
- <KEYWORD2>randomize</KEYWORD2>
- <KEYWORD2>random</KEYWORD2>
- <FUNCTION>rnd</FUNCTION>
- <FUNCTION>sgn</FUNCTION>
- <FUNCTION>sin</FUNCTION>
- <FUNCTION>spc</FUNCTION>
- <FUNCTION>sqr</FUNCTION>
- <FUNCTION>tab</FUNCTION>
- <FUNCTION>tan</FUNCTION>
-
- <!-- output -->
- <KEYWORD1>print</KEYWORD1>
- <!-- KEYWORD1>print #</KEYWORD1>
- <KEYWORD1>print using</KEYWORD1 -->
- <KEYWORD1>write</KEYWORD1>
-
- <!-- printer -->
- <KEYWORD1>lpos</KEYWORD1>
- <!-- KEYWORD1>lprint using</KEYWORD1 -->
- <KEYWORD1>lprint</KEYWORD1>
-
- <!-- screen -->
- <KEYWORD1>cls</KEYWORD1>
- <KEYWORD1>color</KEYWORD1>
- <KEYWORD1>csrlin</KEYWORD1>
- <KEYWORD1>locate</KEYWORD1>
- <KEYWORD1>pos</KEYWORD1>
- <KEYWORD1>screen</KEYWORD1>
- <KEYWORD1>width</KEYWORD1>
-
- <!-- sound -->
- <KEYWORD1>beep</KEYWORD1>
- <KEYWORD1>play</KEYWORD1>
- <KEYWORD1>sound</KEYWORD1>
-
- <!-- strings -->
- <FUNCTION>bin$</FUNCTION>
- <FUNCTION>chr$</FUNCTION>
- <FUNCTION>get$</FUNCTION>
- <FUNCTION>hex$</FUNCTION>
- <FUNCTION>instr</FUNCTION>
- <FUNCTION>lcase$</FUNCTION>
- <FUNCTION>left$</FUNCTION>
- <FUNCTION>len</FUNCTION>
- <FUNCTION>mid$</FUNCTION>
- <FUNCTION>oct$</FUNCTION>
- <FUNCTION>right$</FUNCTION>
- <FUNCTION>space$</FUNCTION>
- <FUNCTION>str$</FUNCTION>
- <FUNCTION>string$</FUNCTION>
- <FUNCTION>ucase$</FUNCTION>
- <FUNCTION>val</FUNCTION>
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<!-- Turbobasic, 3/25/09 by Ben Dutcher -->
+<!-- The Turbo Basic compiler was a Borland product. It's way old. My manual dates from 1987 -->
+<!-- The categories here are those in the manual, except where I couldn't get them to work. -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="'" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" ESCAPE="\">
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- TurboBasic will use either symbol to start a comment -->
+ <EOL_SPAN TYPE="COMMENT1">'</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">rem </EOL_SPAN>
+
+
+ <!-- Comparison operators -->
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+
+ <!-- indicate a named constant like %true. Remember you need to define them once only. Integers only. -->
+ <SPAN_REGEXP HASH_CHAR="%" TYPE="MARKUP" AT_WORD_START="TRUE" NO_WORD_BREAK="TRUE">
+ <BEGIN>%</BEGIN>
+ <END>\S*</END>
+ </SPAN_REGEXP>
+
+ <!-- Arithmetic operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">mod</SEQ>
+
+ <!-- File number marker like #3, but which also is used to indicate a double-precison variable like FineMeasuremet# -->
+ <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">#</SEQ>
+
+ <!-- to handle "def FNmine(), etc.: -->
+ <SEQ TYPE="KEYWORD1">def FN</SEQ>
+
+ <!-- rather than enter option and base as separate keywords, since they are used only in this combination -->
+ <SEQ TYPE="KEYWORD1">option base</SEQ>
+
+ <!-- <SEQ TYPE="NULL">_</SEQ>-->
+ <!-- Instruction separator -->
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <KEYWORDS>
+
+ <!-- Weirdly enough, Turbo Basic doesn't support the words TRUE or FALSE
+ so I always define them in the code. with %false = 0: %true = not %false -->
+
+ <!-- occasional test word. It's not in the manual, but that would have been fun. -->
+ <KEYWORD3>notalotta</KEYWORD3>
+
+ <!-- Listed as keywords, but also described as unsupported:
+ list
+ usr, usr0-usr9
+ Just listed as unsupported:
+ auto, delete, edit, load, new, renum, save, cont, merge, motor
+ -->
+ <!-- Logical operators -->
+ <KEYWORD3>and</KEYWORD3>
+ <KEYWORD3>eqv</KEYWORD3>
+ <KEYWORD3>imp</KEYWORD3>
+ <KEYWORD3>not</KEYWORD3>
+ <KEYWORD3>or</KEYWORD3>
+ <KEYWORD3>xor</KEYWORD3>
+
+ <!-- chaining -->
+ <KEYWORD1>chain</KEYWORD1>
+ <KEYWORD1>common</KEYWORD1>
+ <KEYWORD1>run</KEYWORD1>
+
+ <!-- compiler control -->
+ <KEYWORD1>dim</KEYWORD1>
+ <KEYWORD1>lbound</KEYWORD1>
+ <KEYWORD1>let</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <!-- KEYWORD1>option base</KEYWORD1 -->
+ <KEYWORD1>rem</KEYWORD1>
+ <KEYWORD1>shared</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>tron</KEYWORD1>
+ <KEYWORD1>troff</KEYWORD1>
+ <KEYWORD1>ubound</KEYWORD1>
+
+ <!-- devices -->
+ <!-- KEYWORD1>open com</KEYWORD1 -->
+ <KEYWORD1>com</KEYWORD1>
+ <KEYWORD1>inp</KEYWORD1>
+ <KEYWORD1>ioctl$</KEYWORD1>
+ <KEYWORD1>ioctl</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+
+ <!-- DOS -->
+ <KEYWORD1>chdir</KEYWORD1>
+ <KEYWORD1>command$</KEYWORD1>
+ <KEYWORD1>date$</KEYWORD1>
+ <KEYWORD1>environ$</KEYWORD1>
+ <KEYWORD1>environ</KEYWORD1>
+ <KEYWORD1>kill</KEYWORD1>
+ <KEYWORD1>mkdir</KEYWORD1>
+ <KEYWORD1>rmdir</KEYWORD1>
+ <KEYWORD1>shell</KEYWORD1>
+ <KEYWORD1>system</KEYWORD1>
+ <KEYWORD1>time$</KEYWORD1>
+
+ <!-- Error Handling -->
+ <KEYWORD1>eradr</KEYWORD1>
+ <KEYWORD1>erdev</KEYWORD1>
+ <KEYWORD1>erdev$</KEYWORD1>
+ <KEYWORD1>erl</KEYWORD1>
+ <KEYWORD1>error</KEYWORD1>
+ <KEYWORD1>err</KEYWORD1>
+
+ <!-- files -->
+ <KEYWORD1>bload</KEYWORD1>
+ <KEYWORD1>bsave</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>eof</KEYWORD1>
+ <KEYWORD1>field</KEYWORD1>
+ <KEYWORD1>files</KEYWORD1>
+ <KEYWORD1>get</KEYWORD1>
+ <!-- KEYWORD1>line input #</KEYWORD1 -->
+ <KEYWORD1>loc</KEYWORD1>
+ <KEYWORD1>lof</KEYWORD1>
+ <KEYWORD1>lset</KEYWORD1>
+ <KEYWORD1>name</KEYWORD1>
+ <KEYWORD1>open</KEYWORD1>
+ <!-- KEYWORD1>print #</KEYWORD1 -->
+ <KEYWORD1>put$</KEYWORD1>
+ <KEYWORD1>put</KEYWORD1>
+ <KEYWORD1>reset</KEYWORD1>
+ <KEYWORD1>rset</KEYWORD1>
+ <KEYWORD1>seek</KEYWORD1>
+ <KEYWORD1>using</KEYWORD1>
+ <!-- KEYWORD1>write #</KEYWORD1 -->
+
+ <!-- flow control -->
+ <!--KEYWORD1>call absolute</KEYWORD1 -->
+ <!-- KEYWORD1>call interrupt</KEYWORD1 -->
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>def</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>elseif</KEYWORD1>
+ <!-- KEYWORD1>end case</KEYWORD1>
+ <KEYWORD1>case else</KEYWORD1 -->
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>gosub</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>inline</KEYWORD1>
+ <KEYWORD1>resume</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>step</KEYWORD1>
+ <KEYWORD1>stop</KEYWORD1>
+ <KEYWORD1>sub</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <!-- KEYWORD1>def fn</KEYWORD1>
+ <KEYWORD1>end def</KEYWORD1>
+ <KEYWORD1>end sub</KEYWORD1 -->
+ <KEYWORD1>wend</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <!-- draw/graphics -->
+ <KEYWORD1>circle</KEYWORD1>
+ <KEYWORD1>draw</KEYWORD1>
+ <KEYWORD1>line</KEYWORD1>
+ <KEYWORD1>paint</KEYWORD1>
+ <!-- KEYWORD1>palette using</KEYWORD1 -->
+ <KEYWORD1>palette</KEYWORD1>
+ <KEYWORD1>peek</KEYWORD1>
+ <KEYWORD1>pen</KEYWORD1>
+ <KEYWORD1>pmap</KEYWORD1>
+ <KEYWORD1>point</KEYWORD1>
+ <KEYWORD1>poke</KEYWORD1>
+ <KEYWORD1>preset</KEYWORD1>
+ <KEYWORD1>pset</KEYWORD1>
+ <KEYWORD1>put</KEYWORD1>
+ <KEYWORD1>view</KEYWORD1>
+ <KEYWORD1>window</KEYWORD1>
+
+ <!-- hardware events -->
+ <KEYWORD1>mtimer</KEYWORD1>
+ <KEYWORD1>off</KEYWORD1>
+ <KEYWORD1>on</KEYWORD1>
+ <!-- KEYWORD1>on com</KEYWORD1>
+ <KEYWORD1>on error</KEYWORD1>
+ <KEYWORD1>on key</KEYWORD1>
+ <KEYWORD1>on pen</KEYWORD1>
+ <KEYWORD1>on play</KEYWORD1>
+ <KEYWORD1>on strig</KEYWORD1>
+ <KEYWORD1>on timer</KEYWORD1 -->
+ <KEYWORD1>stick</KEYWORD1>
+ <KEYWORD1>strig</KEYWORD1>
+ <KEYWORD1>timer</KEYWORD1>
+ <KEYWORD1>wait</KEYWORD1>
+
+ <!--input -->
+ <KEYWORD1>inkey$</KEYWORD1>
+ <KEYWORD1>input$</KEYWORD1>
+ <!-- KEYWORD1>input #</KEYWORD1 -->
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD1>instat</KEYWORD1>
+ <!-- KEYWORD1>line input</KEYWORD1 -->
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>restore</KEYWORD1>
+
+ <!-- keyboard -->
+ <!-- KEYWORD1>key on</KEYWORD1>
+ <KEYWORD1>key off</KEYWORD1 -->
+ <KEYWORD1>key</KEYWORD1>
+
+ <!-- memory -->
+ <KEYWORD1>clear</KEYWORD1>
+ <!-- KEYWORD1>def seg</KEYWORD1 -->
+ <KEYWORD1>endmem</KEYWORD1>
+ <KEYWORD1>erase</KEYWORD1>
+ <KEYWORD1>fre</KEYWORD1>
+ <KEYWORD1>memset</KEYWORD1>
+ <KEYWORD1>poke</KEYWORD1>
+ <KEYWORD1>seg</KEYWORD1>
+ <KEYWORD1>varptr$</KEYWORD1>
+ <KEYWORD1>varptr</KEYWORD1>
+ <KEYWORD1>varseg</KEYWORD1>
+
+ <!-- metastatements -->
+ <KEYWORD2>$com1</KEYWORD2>
+ <KEYWORD2>$com2</KEYWORD2>
+ <KEYWORD2>$com</KEYWORD2>
+ <KEYWORD2>$debug</KEYWORD2>
+ <KEYWORD2>$dynamic</KEYWORD2>
+ <KEYWORD2>$event</KEYWORD2>
+ <KEYWORD2>$if</KEYWORD2>
+ <KEYWORD2>$else</KEYWORD2>
+ <KEYWORD2>$endif</KEYWORD2>
+ <KEYWORD2>$include</KEYWORD2>
+ <KEYWORD2>$inline</KEYWORD2>
+ <KEYWORD2>$list</KEYWORD2>
+ <KEYWORD2>$option</KEYWORD2>
+ <KEYWORD2>$segment</KEYWORD2>
+ <KEYWORD2>$sound</KEYWORD2>
+ <KEYWORD2>$stack</KEYWORD2>
+ <KEYWORD2>$static</KEYWORD2>
+
+ <!-- Miscellaneous -->
+ <KEYWORD1>data</KEYWORD1>
+ <KEYWORD1>delay</KEYWORD1>
+ <KEYWORD1>reg</KEYWORD1>
+ <KEYWORD1>swap</KEYWORD1>
+
+
+ <!-- Math Functions -->
+ <FUNCTION>abs</FUNCTION>
+ <FUNCTION>asc</FUNCTION>
+ <FUNCTION>atn</FUNCTION>
+ <FUNCTION>cdbl</FUNCTION>
+ <FUNCTION>ceil</FUNCTION>
+ <FUNCTION>cint</FUNCTION>
+ <FUNCTION>clng</FUNCTION>
+ <FUNCTION>cos</FUNCTION>
+ <FUNCTION>csng</FUNCTION>
+ <FUNCTION>cvi</FUNCTION>
+ <FUNCTION>cvl</FUNCTION>
+ <FUNCTION>cvs</FUNCTION>
+ <FUNCTION>cvd</FUNCTION>
+ <FUNCTION>cvmd</FUNCTION>
+ <FUNCTION>cvms</FUNCTION>
+ <KEYWORD2>decr</KEYWORD2>
+ <KEYWORD2>defint</KEYWORD2>
+ <KEYWORD2>deflng</KEYWORD2>
+ <KEYWORD2>defsng</KEYWORD2>
+ <KEYWORD2>defdbl</KEYWORD2>
+ <KEYWORD2>defstr</KEYWORD2>
+ <FUNCTION>exp2</FUNCTION>
+ <FUNCTION>exp10</FUNCTION>
+ <FUNCTION>exp</FUNCTION>
+ <FUNCTION>fix</FUNCTION>
+ <KEYWORD2>incr</KEYWORD2>
+ <FUNCTION>int</FUNCTION>
+ <FUNCTION>log10</FUNCTION>
+ <FUNCTION>log2</FUNCTION>
+ <FUNCTION>log</FUNCTION>
+ <FUNCTION>mki$</FUNCTION>
+ <FUNCTION>mkl$</FUNCTION>
+ <FUNCTION>mks$</FUNCTION>
+ <FUNCTION>mkd$</FUNCTION>
+ <FUNCTION>mkmd$</FUNCTION>
+ <FUNCTION>mkms$</FUNCTION>
+ <KEYWORD2>randomize</KEYWORD2>
+ <KEYWORD2>random</KEYWORD2>
+ <FUNCTION>rnd</FUNCTION>
+ <FUNCTION>sgn</FUNCTION>
+ <FUNCTION>sin</FUNCTION>
+ <FUNCTION>spc</FUNCTION>
+ <FUNCTION>sqr</FUNCTION>
+ <FUNCTION>tab</FUNCTION>
+ <FUNCTION>tan</FUNCTION>
+
+ <!-- output -->
+ <KEYWORD1>print</KEYWORD1>
+ <!-- KEYWORD1>print #</KEYWORD1>
+ <KEYWORD1>print using</KEYWORD1 -->
+ <KEYWORD1>write</KEYWORD1>
+
+ <!-- printer -->
+ <KEYWORD1>lpos</KEYWORD1>
+ <!-- KEYWORD1>lprint using</KEYWORD1 -->
+ <KEYWORD1>lprint</KEYWORD1>
+
+ <!-- screen -->
+ <KEYWORD1>cls</KEYWORD1>
+ <KEYWORD1>color</KEYWORD1>
+ <KEYWORD1>csrlin</KEYWORD1>
+ <KEYWORD1>locate</KEYWORD1>
+ <KEYWORD1>pos</KEYWORD1>
+ <KEYWORD1>screen</KEYWORD1>
+ <KEYWORD1>width</KEYWORD1>
+
+ <!-- sound -->
+ <KEYWORD1>beep</KEYWORD1>
+ <KEYWORD1>play</KEYWORD1>
+ <KEYWORD1>sound</KEYWORD1>
+
+ <!-- strings -->
+ <FUNCTION>bin$</FUNCTION>
+ <FUNCTION>chr$</FUNCTION>
+ <FUNCTION>get$</FUNCTION>
+ <FUNCTION>hex$</FUNCTION>
+ <FUNCTION>instr</FUNCTION>
+ <FUNCTION>lcase$</FUNCTION>
+ <FUNCTION>left$</FUNCTION>
+ <FUNCTION>len</FUNCTION>
+ <FUNCTION>mid$</FUNCTION>
+ <FUNCTION>oct$</FUNCTION>
+ <FUNCTION>right$</FUNCTION>
+ <FUNCTION>space$</FUNCTION>
+ <FUNCTION>str$</FUNCTION>
+ <FUNCTION>string$</FUNCTION>
+ <FUNCTION>ucase$</FUNCTION>
+ <FUNCTION>val</FUNCTION>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/twiki.xml b/jEdit/modes/twiki.xml
index 8c0ecbb..ccb6231 100644
--- a/jEdit/modes/twiki.xml
+++ b/jEdit/modes/twiki.xml
@@ -1,153 +1,153 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- catalog entry:
-
-<MODE NAME="twiki" FILE="twiki.xml"
- FILE_NAME_GLOB="*.twiki"/>
-
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="noTabs" VALUE="true" />
- <PROPERTY NAME="wrap" VALUE="soft" />
- </PROPS>
- <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="FALSE">
-
- <!-- though not encouraged, HTML is supported -->
- <IMPORT DELEGATE="html::MAIN"/>
-
- <!-- signature - a convention, not actual markup -->
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">-- </EOL_SPAN>
-
- <!-- header -->
- <EOL_SPAN_REGEXP HASH_CHAR="---+"
- TYPE="KEYWORD1"
- AT_LINE_START="TRUE"
- >-{3}[+]{1,6}(?:!!)?\s</EOL_SPAN_REGEXP>
-
- <!-- bold -->
- <SEQ_REGEXP
- HASH_CHAR="*"
- AT_LINE_START="FALSE"
- TYPE="KEYWORD4"
- >\*[^\s*][^*]*\*</SEQ_REGEXP>
-
- <!-- bold and italic -->
- <SEQ_REGEXP
- HASH_CHAR="__"
- AT_LINE_START="FALSE"
- TYPE="KEYWORD4"
- >__\w.*?\w__</SEQ_REGEXP>
-
- <!-- italic -->
- <SEQ_REGEXP
- HASH_CHAR="_"
- AT_LINE_START="FALSE"
- TYPE="KEYWORD4"
- >_\w.*?\w_</SEQ_REGEXP>
-
- <!-- bold and fixed font -->
- <SEQ_REGEXP
- HASH_CHAR="=="
- AT_LINE_START="FALSE"
- TYPE="KEYWORD4"
- >==\w.*?\w==</SEQ_REGEXP>
-
- <!-- fixed font -->
- <SEQ_REGEXP
- HASH_CHAR="="
- AT_LINE_START="FALSE"
- TYPE="KEYWORD4"
- >=\w.*?\w=</SEQ_REGEXP>
-
- <!-- separator -->
- <EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD4">---</EOL_SPAN>
-
- <!-- wiki words -->
- <SEQ_REGEXP HASH_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZ" AT_WORD_START="TRUE" TYPE="KEYWORD2">[A-Z][A-Z.]*[a-z.]+(?:[A-Z][A-Z.]*[a-z.]*[a-z])+</SEQ_REGEXP>
-
- <!-- links -->
- <SPAN TYPE="KEYWORD3">
- <BEGIN>[[</BEGIN>
- <END>]]</END>
- </SPAN>
-
- <!-- verbatim -->
- <SPAN TYPE="LITERAL2">
- <BEGIN><verbatim></BEGIN>
- <END></verbatim></END>
- </SPAN>
-
- <!-- prevent a link -->
- <SEQ TYPE="LITERAL2"><nop></SEQ>
-
- <!-- disable links -->
- <SPAN TYPE="LITERAL2">
- <BEGIN><noautolink></BEGIN>
- <END></noautolink></END>
- </SPAN>
-
- <!-- terms -->
- <SEQ_REGEXP HASH_CHAR=" " TYPE="KEYWORD2" AT_LINE_START="FALSE"
- >\s{3}\w(?: |-|\w)*?\w+:\s</SEQ_REGEXP>
-
- <!-- twiki variables -->
- <SEQ_REGEXP HASH_CHAR="%"
- TYPE="FUNCTION"
- >%[A-Z]+(?:\{[^\}]+\})?%</SEQ_REGEXP>
-
- <KEYWORDS>
- <!-- variables, just here for complete-word -->
- <NULL>ATTACHURL</NULL>
- <NULL>ATTACHURLPATH</NULL>
- <NULL>BASETOPIC</NULL>
- <NULL>BASEWEB</NULL>
- <NULL>GMTIME</NULL>
- <NULL>HOMETOPIC</NULL>
- <NULL>HTTP_HOST</NULL>
- <NULL>INCLUDE</NULL>
- <NULL>INCLUDINGTOPIC</NULL>
- <NULL>INCLUDINGWEB</NULL>
- <NULL>MAINWEB</NULL>
- <NULL>NOTIFYTOPIC</NULL>
- <NULL>PUBURL</NULL>
- <NULL>PUBURLPATH</NULL>
- <NULL>REMOTE_ADDR</NULL>
- <NULL>REMOTE_PORT</NULL>
- <NULL>REMOTE_USER</NULL>
- <NULL>SCRIPTSUFFIX</NULL>
- <NULL>SCRIPTURL</NULL>
- <NULL>SCRIPTURLPATH</NULL>
- <NULL>SEARCH</NULL>
- <NULL>SERVERTIME</NULL>
- <NULL>SPACEDTOPIC</NULL>
- <NULL>STARTINCLUDE</NULL>
- <NULL>STATISTICSTOPIC</NULL>
- <NULL>STOPINCLUDE</NULL>
- <NULL>TOC</NULL>
- <NULL>TOPIC</NULL>
- <NULL>TOPICLIST</NULL>
- <NULL>TWIKIWEB</NULL>
- <NULL>URLENCODE</NULL>
- <NULL>URLPARAM</NULL>
- <NULL>USERNAME</NULL>
- <NULL>WEB</NULL>
- <NULL>WEBLIST</NULL>
- <NULL>WEBPREFSTOPIC</NULL>
- <NULL>WIKIHOMEURL</NULL>
- <NULL>WIKINAME</NULL>
- <NULL>WIKIPREFSTOPIC</NULL>
- <NULL>WIKITOOLNAME</NULL>
- <NULL>WIKIUSERNAME</NULL>
- <NULL>WIKIUSERSTOPIC</NULL>
- <NULL>WIKIVERSION</NULL>
- </KEYWORDS>
-
- </RULES>
-
-</MODE>
-
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- catalog entry:
+
+<MODE NAME="twiki" FILE="twiki.xml"
+ FILE_NAME_GLOB="*.twiki"/>
+
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="noTabs" VALUE="true" />
+ <PROPERTY NAME="wrap" VALUE="soft" />
+ </PROPS>
+ <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="FALSE">
+
+ <!-- though not encouraged, HTML is supported -->
+ <IMPORT DELEGATE="html::MAIN"/>
+
+ <!-- signature - a convention, not actual markup -->
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="COMMENT1">-- </EOL_SPAN>
+
+ <!-- header -->
+ <EOL_SPAN_REGEXP HASH_CHAR="---+"
+ TYPE="KEYWORD1"
+ AT_LINE_START="TRUE"
+ >-{3}[+]{1,6}(?:!!)?\s</EOL_SPAN_REGEXP>
+
+ <!-- bold -->
+ <SEQ_REGEXP
+ HASH_CHAR="*"
+ AT_LINE_START="FALSE"
+ TYPE="KEYWORD4"
+ >\*[^\s*][^*]*\*</SEQ_REGEXP>
+
+ <!-- bold and italic -->
+ <SEQ_REGEXP
+ HASH_CHAR="__"
+ AT_LINE_START="FALSE"
+ TYPE="KEYWORD4"
+ >__\w.*?\w__</SEQ_REGEXP>
+
+ <!-- italic -->
+ <SEQ_REGEXP
+ HASH_CHAR="_"
+ AT_LINE_START="FALSE"
+ TYPE="KEYWORD4"
+ >_\w.*?\w_</SEQ_REGEXP>
+
+ <!-- bold and fixed font -->
+ <SEQ_REGEXP
+ HASH_CHAR="=="
+ AT_LINE_START="FALSE"
+ TYPE="KEYWORD4"
+ >==\w.*?\w==</SEQ_REGEXP>
+
+ <!-- fixed font -->
+ <SEQ_REGEXP
+ HASH_CHAR="="
+ AT_LINE_START="FALSE"
+ TYPE="KEYWORD4"
+ >=\w.*?\w=</SEQ_REGEXP>
+
+ <!-- separator -->
+ <EOL_SPAN AT_LINE_START="TRUE" TYPE="KEYWORD4">---</EOL_SPAN>
+
+ <!-- wiki words -->
+ <SEQ_REGEXP HASH_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZ" AT_WORD_START="TRUE" TYPE="KEYWORD2">[A-Z][A-Z.]*[a-z.]+(?:[A-Z][A-Z.]*[a-z.]*[a-z])+</SEQ_REGEXP>
+
+ <!-- links -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN>[[</BEGIN>
+ <END>]]</END>
+ </SPAN>
+
+ <!-- verbatim -->
+ <SPAN TYPE="LITERAL2">
+ <BEGIN><verbatim></BEGIN>
+ <END></verbatim></END>
+ </SPAN>
+
+ <!-- prevent a link -->
+ <SEQ TYPE="LITERAL2"><nop></SEQ>
+
+ <!-- disable links -->
+ <SPAN TYPE="LITERAL2">
+ <BEGIN><noautolink></BEGIN>
+ <END></noautolink></END>
+ </SPAN>
+
+ <!-- terms -->
+ <SEQ_REGEXP HASH_CHAR=" " TYPE="KEYWORD2" AT_LINE_START="FALSE"
+ >\s{3}\w(?: |-|\w)*?\w+:\s</SEQ_REGEXP>
+
+ <!-- twiki variables -->
+ <SEQ_REGEXP HASH_CHAR="%"
+ TYPE="FUNCTION"
+ >%[A-Z]+(?:\{[^\}]+\})?%</SEQ_REGEXP>
+
+ <KEYWORDS>
+ <!-- variables, just here for complete-word -->
+ <NULL>ATTACHURL</NULL>
+ <NULL>ATTACHURLPATH</NULL>
+ <NULL>BASETOPIC</NULL>
+ <NULL>BASEWEB</NULL>
+ <NULL>GMTIME</NULL>
+ <NULL>HOMETOPIC</NULL>
+ <NULL>HTTP_HOST</NULL>
+ <NULL>INCLUDE</NULL>
+ <NULL>INCLUDINGTOPIC</NULL>
+ <NULL>INCLUDINGWEB</NULL>
+ <NULL>MAINWEB</NULL>
+ <NULL>NOTIFYTOPIC</NULL>
+ <NULL>PUBURL</NULL>
+ <NULL>PUBURLPATH</NULL>
+ <NULL>REMOTE_ADDR</NULL>
+ <NULL>REMOTE_PORT</NULL>
+ <NULL>REMOTE_USER</NULL>
+ <NULL>SCRIPTSUFFIX</NULL>
+ <NULL>SCRIPTURL</NULL>
+ <NULL>SCRIPTURLPATH</NULL>
+ <NULL>SEARCH</NULL>
+ <NULL>SERVERTIME</NULL>
+ <NULL>SPACEDTOPIC</NULL>
+ <NULL>STARTINCLUDE</NULL>
+ <NULL>STATISTICSTOPIC</NULL>
+ <NULL>STOPINCLUDE</NULL>
+ <NULL>TOC</NULL>
+ <NULL>TOPIC</NULL>
+ <NULL>TOPICLIST</NULL>
+ <NULL>TWIKIWEB</NULL>
+ <NULL>URLENCODE</NULL>
+ <NULL>URLPARAM</NULL>
+ <NULL>USERNAME</NULL>
+ <NULL>WEB</NULL>
+ <NULL>WEBLIST</NULL>
+ <NULL>WEBPREFSTOPIC</NULL>
+ <NULL>WIKIHOMEURL</NULL>
+ <NULL>WIKINAME</NULL>
+ <NULL>WIKIPREFSTOPIC</NULL>
+ <NULL>WIKITOOLNAME</NULL>
+ <NULL>WIKIUSERNAME</NULL>
+ <NULL>WIKIUSERSTOPIC</NULL>
+ <NULL>WIKIVERSION</NULL>
+ </KEYWORDS>
+
+ </RULES>
+
+</MODE>
+
+
diff --git a/jEdit/modes/typoscript.xml b/jEdit/modes/typoscript.xml
index 82b2ca1..3b591ba 100644
--- a/jEdit/modes/typoscript.xml
+++ b/jEdit/modes/typoscript.xml
@@ -1,81 +1,81 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- TypoScript syntax highlighting, by Neil Bertram <neil at tasmanstudios.co.nz>
- Based on Kasper's highlighter in ExtDevEval and his "TypoScript Syntax and In-depth Study"
- available at http://typo3.org/documentation/document-library/doc_core_ts/
-
- -->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="#"/>
- <PROPERTY NAME="lineComment" VALUE="/"/>
- <PROPERTY NAME="commentStart" VALUE="/*"/>
- <PROPERTY NAME="commentEnd" VALUE="*/"/>
- <PROPERTY NAME="indentOpenBrackets" VALUE="({"/>
- <PROPERTY NAME="indentCloseBrackets" VALUE=")}"/>
- <PROPERTY NAME="lineUpClosingBracket" VALUE="true"/>
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP=":" DEFAULT="MARKUP">
- <!-- Include statement (<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/html/mainmenu_typoscript.txt">) -->
- <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" AT_LINE_START="TRUE">
- <BEGIN><INCLUDE</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- Assignments (using the = operator) are delegated to the assignment rule for more flexibility -->
- <EOL_SPAN TYPE="OPERATOR" DELEGATE="typoscript::assignment" AT_LINE_START="FALSE" AT_WHITESPACE_END="FALSE">=</EOL_SPAN>
-
- <!-- Multi-line assignments (using the (blah blah) syntax) -->
- <SPAN TYPE="OPERATOR" AT_LINE_START="FALSE" NO_LINE_BREAK="FALSE" DELEGATE="typoscript::assignment">
- <BEGIN>(</BEGIN>
- <END AT_WHITESPACE_END="TRUE">)</END>
- </SPAN>
-
- <!-- Object copies (using the < operator)
- Note that object references (=<) are not highlighted due to the fact
- that they're only supported by the core template engine, and not
- actually a feature of typoscript itself
- -->
- <EOL_SPAN TYPE="OPERATOR" AT_LINE_START="FALSE" DELEGATE="typoscript::copy"><</EOL_SPAN>
-
- <!-- Comments
- - note that block comments must start/end at the beginning of the trimmed line
- but this is difficult to accomplish here, so we just force it to be line-start
- -->
- <EOL_SPAN AT_WORD_START="TRUE" TYPE="COMMENT4">#</EOL_SPAN>
- <SPAN TYPE="COMMENT1" NO_LINE_BREAK="FALSE" AT_LINE_START="TRUE">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <EOL_SPAN AT_WORD_START="TRUE" TYPE="COMMENT2">/</EOL_SPAN>
-
- <!-- Conditionals (anything inside square brackets at a word start -->
- <SPAN TYPE="KEYWORD1" NO_LINE_BREAK="TRUE" AT_WORD_START="TRUE">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Special characters that haven't been caught yet -->
- <SEQ TYPE="NULL">{</SEQ>
- <SEQ TYPE="NULL">}</SEQ>
- <SEQ TYPE="NULL">(</SEQ>
- <SEQ TYPE="NULL">)</SEQ>
- </RULES>
-
- <!-- Rule for both single and multi-line assignments -->
- <RULES SET="assignment" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE" DEFAULT="LITERAL1">
- <!-- TypoScript constants inserted with {$blah} are highlighted -->
- <SPAN TYPE="LABEL" AT_WORD_START="FALSE" AT_LINE_START="FALSE">
- <BEGIN>{$</BEGIN>
- <END>}</END>
- </SPAN>
- </RULES>
-
- <!-- Rule for object copies -->
- <RULES SET="copy" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE" DEFAULT="KEYWORD2">
- <!-- nothing right now -->
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- TypoScript syntax highlighting, by Neil Bertram <neil at tasmanstudios.co.nz>
+ Based on Kasper's highlighter in ExtDevEval and his "TypoScript Syntax and In-depth Study"
+ available at http://typo3.org/documentation/document-library/doc_core_ts/
+
+ -->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="#"/>
+ <PROPERTY NAME="lineComment" VALUE="/"/>
+ <PROPERTY NAME="commentStart" VALUE="/*"/>
+ <PROPERTY NAME="commentEnd" VALUE="*/"/>
+ <PROPERTY NAME="indentOpenBrackets" VALUE="({"/>
+ <PROPERTY NAME="indentCloseBrackets" VALUE=")}"/>
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true"/>
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP=":" DEFAULT="MARKUP">
+ <!-- Include statement (<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/html/mainmenu_typoscript.txt">) -->
+ <SPAN TYPE="KEYWORD4" NO_LINE_BREAK="TRUE" AT_LINE_START="TRUE">
+ <BEGIN><INCLUDE</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- Assignments (using the = operator) are delegated to the assignment rule for more flexibility -->
+ <EOL_SPAN TYPE="OPERATOR" DELEGATE="typoscript::assignment" AT_LINE_START="FALSE" AT_WHITESPACE_END="FALSE">=</EOL_SPAN>
+
+ <!-- Multi-line assignments (using the (blah blah) syntax) -->
+ <SPAN TYPE="OPERATOR" AT_LINE_START="FALSE" NO_LINE_BREAK="FALSE" DELEGATE="typoscript::assignment">
+ <BEGIN>(</BEGIN>
+ <END AT_WHITESPACE_END="TRUE">)</END>
+ </SPAN>
+
+ <!-- Object copies (using the < operator)
+ Note that object references (=<) are not highlighted due to the fact
+ that they're only supported by the core template engine, and not
+ actually a feature of typoscript itself
+ -->
+ <EOL_SPAN TYPE="OPERATOR" AT_LINE_START="FALSE" DELEGATE="typoscript::copy"><</EOL_SPAN>
+
+ <!-- Comments
+ - note that block comments must start/end at the beginning of the trimmed line
+ but this is difficult to accomplish here, so we just force it to be line-start
+ -->
+ <EOL_SPAN AT_WORD_START="TRUE" TYPE="COMMENT4">#</EOL_SPAN>
+ <SPAN TYPE="COMMENT1" NO_LINE_BREAK="FALSE" AT_LINE_START="TRUE">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <EOL_SPAN AT_WORD_START="TRUE" TYPE="COMMENT2">/</EOL_SPAN>
+
+ <!-- Conditionals (anything inside square brackets at a word start -->
+ <SPAN TYPE="KEYWORD1" NO_LINE_BREAK="TRUE" AT_WORD_START="TRUE">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Special characters that haven't been caught yet -->
+ <SEQ TYPE="NULL">{</SEQ>
+ <SEQ TYPE="NULL">}</SEQ>
+ <SEQ TYPE="NULL">(</SEQ>
+ <SEQ TYPE="NULL">)</SEQ>
+ </RULES>
+
+ <!-- Rule for both single and multi-line assignments -->
+ <RULES SET="assignment" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE" DEFAULT="LITERAL1">
+ <!-- TypoScript constants inserted with {$blah} are highlighted -->
+ <SPAN TYPE="LABEL" AT_WORD_START="FALSE" AT_LINE_START="FALSE">
+ <BEGIN>{$</BEGIN>
+ <END>}</END>
+ </SPAN>
+ </RULES>
+
+ <!-- Rule for object copies -->
+ <RULES SET="copy" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="FALSE" DEFAULT="KEYWORD2">
+ <!-- nothing right now -->
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/url.xml b/jEdit/modes/url.xml
new file mode 100644
index 0000000..c78bc50
--- /dev/null
+++ b/jEdit/modes/url.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- URL mode, by Kevin Hunter of caktusgroup.com (kevin@) for jEdit -->
+<!--
+Attempting to implement http://en.wikipedia.org/wiki/URI_scheme. Most
+schemes should work. There are some commented out. However, as of
+Wed, 11 Jun 2008, I'm still working out some kinks. Specifically,
+these work
+
+http://www.example.com/
+http://www.example.com/path/to/file?id=true
+http://user@example.com/path/to/file
+http://user:pass@example.com/path/to/file
+
+and these don't work:
+
+http://www.example.com (no trailing / messes it up)
+http://www.example.com/p/t/f?id=2&var=true ('&' and 'var' do not get marked)
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME='wordBreakChars' VALUE=',-=<>/?^&*' />
+ </PROPS>
+
+ <RULES SET='DOMAINNAME'
+ IGNORE_CASE='TRUE'
+ >
+
+ <MARK_PREVIOUS TYPE='LITERAL2' MATCH_TYPE='OPERATOR'>@</MARK_PREVIOUS>
+ <MARK_PREVIOUS TYPE='LITERAL2' MATCH_TYPE='OPERATOR'>:</MARK_PREVIOUS>
+ <MARK_PREVIOUS TYPE='LITERAL2' MATCH_TYPE='OPERATOR'>/</MARK_PREVIOUS>
+
+ <SPAN_REGEXP DELEGATE='unwritten_AUTHORITY' MATCH_TYPE='LITERAL2' NO_LINE_BREAK='TRUE' NO_WORD_BREAK='TRUE'>
+ <BEGIN>(?=\b[\w.:-]+@(\b))</BEGIN> <!-- Why doesn't this match at the *boundary* between :// and <username>? It's wrapped in a (?=<look ahead assertion>) -->
+ <END>$1</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP DELEGATE='unwritten_HOSTNAME' MATCH_TYPE='LITERAL1' NO_LINE_BREAK='TRUE' NO_WORD_BREAK='TRUE'>
+ <BEGIN>(\b)[\w.-]+((?=/))</BEGIN>
+ <END>$1</END>
+ </SPAN_REGEXP>
+ <EOL_SPAN TYPE='LITERAL4' MATCH_TYPE='OPERATOR'>/</EOL_SPAN>
+ </RULES>
+ <RULES
+ IGNORE_CASE='FALSE'
+ HIGHLIGHT_DIGITS='TRUE' DIGIT_RE='[0-9][0-9a-zA-Z]*'>
+
+ <MARK_FOLLOWING TYPE='LITERAL2' MATCH_TYPE='OPERATOR'>?</MARK_FOLLOWING>
+ <!-- <MARK_FOLLOWING TYPE='LITERAL2' MATCH_TYPE='OPERATOR'>&</MARK_FOLLOWING> -->
+
+ <SEQ TYPE='OPERATOR'>/</SEQ>
+ <SEQ TYPE='LITERAL4'>+</SEQ>
+
+ <SPAN_REGEXP TYPE='LITERAL1' MATCH_TYPE='OPERATOR' NO_LINE_BREAK='TRUE' NO_WORD_BREAK='FALSE'>
+ <BEGIN>=</BEGIN>
+ <END>&</END>
+ </SPAN_REGEXP>
+ <SPAN DELEGATE='DOMAINNAME' TYPE='LITERAL2' MATCH_TYPE='OPERATOR' NO_LINE_BREAK='TRUE' NO_WORD_BREAK='TRUE'>
+ <BEGIN>://</BEGIN>
+ <END>/</END>
+ </SPAN>
+
+ <IMPORT DELEGATE='SCHEMES' />
+ </RULES>
+ <RULES SET='SCHEMES' IGNORE_CASE='TRUE'>
+ <KEYWORDS>
+ <!-- Url types -->
+ <KEYWORD1>aaa</KEYWORD1> <!-- Diameter Protocol RFC 3588 -->
+ <KEYWORD1>aaas</KEYWORD1> <!-- Diameter Protocol (secure) RFC 3588 -->
+ <KEYWORD1>acap</KEYWORD1> <!-- Application Configuration Access Protocol RFC 2244 -->
+ <KEYWORD1>cap</KEYWORD1> <!-- Calendar access protocol RFC 4324 -->
+ <KEYWORD1>cid</KEYWORD1> <!-- Referencing individual parts of an SMTP/MIME message RFC 2392 -->
+ <KEYWORD1>crid</KEYWORD1> <!-- TV-Anytime Content Reference Identifier RFC 4078 -->
+ <KEYWORD1>data</KEYWORD1> <!-- Inclusion of small data items inline RFC 2397 -->
+ <KEYWORD1>dav</KEYWORD1> <!-- HTTP Extensions for Distributed Authoring (WebDAV) RFC 2518 -->
+ <KEYWORD1>dict</KEYWORD1> <!-- Dictionary service protocol RFC 2229 -->
+ <KEYWORD1>dns</KEYWORD1> <!-- Domain Name System RFC 4501 -->
+ <KEYWORD1>fax</KEYWORD1> <!-- Used for telefacsimile numbers RFC 2806 -->
+ <KEYWORD1>ftp</KEYWORD1> <!-- File Transfer Protocal RFC 1738 -->
+ <KEYWORD1>file</KEYWORD1> <!-- Addressing files on local or network file systems RFC 1738 -->
+ <KEYWORD1>ftp</KEYWORD1> <!-- FTP resources RFC 1738 -->
+ <KEYWORD1>go</KEYWORD1> <!-- Common Name Resolution Protocol RFC 3368 -->
+ <KEYWORD1>gopher</KEYWORD1> <!-- Used with Gopher protocol RFC 4266 -->
+ <KEYWORD1>h323</KEYWORD1> <!-- Used with H.323 multimedia communications RFC 3508 -->
+ <KEYWORD1>http</KEYWORD1> <!-- HTTP resources RFC 2616 -->
+ <KEYWORD1>https</KEYWORD1> <!-- HTTP connections secured using SSL/TLS RFC 2817 -->
+ <KEYWORD1>icap</KEYWORD1> <!-- Internet Content Adaptation Protocol RFC 3507 -->
+ <KEYWORD1>im</KEYWORD1> <!-- Instant messaging protocol RFC 3860 RFC 4622 -->
+ <KEYWORD1>imap</KEYWORD1> <!-- Accessing e-mail resources through IMAP RFC 2192 -->
+ <KEYWORD1>info</KEYWORD1> <!-- Information Assets with Identifiers in Public Namespaces RFC 4452 -->
+ <KEYWORD1>ipp</KEYWORD1> <!-- Internet Printing Protocol RFC 3510 -->
+ <KEYWORD1>iris</KEYWORD1> <!-- Internet Registry Information Service RFC 3981 -->
+ <KEYWORD1>ldap</KEYWORD1> <!-- LDAP directory request RFC 2255 RFC 4516 -->
+ <!-- <KEYWORD1>mailto</KEYWORD1> SMTP e-mail addresses and default content RFC 2368 -->
+ <KEYWORD1>mid</KEYWORD1> <!-- Referencing SMTP/MIME messages, or parts of messages. RFC 2392 -->
+ <KEYWORD1>modem</KEYWORD1> <!-- modem RFC 3966 -->
+ <KEYWORD1>msrp</KEYWORD1> <!-- msrps Message Session Relay Protocol RFC 4975 -->
+ <KEYWORD1>mtqp</KEYWORD1> <!-- Message Tracking Query Protocol RFC 3887 -->
+ <KEYWORD1>mupdate</KEYWORD1> <!-- Mailbox Update Protocol RFC 3656 -->
+ <KEYWORD1>news</KEYWORD1> <!-- (Usenet) newsgroups and postings RFC 1738 -->
+ <KEYWORD1>nfs</KEYWORD1> <!-- Network File System resources RFC 2224 -->
+ <KEYWORD1>nntp</KEYWORD1> <!-- Usenet NNTP RFC 1738 -->
+ <KEYWORD1>opaquelocktoken</KEYWORD1> <!-- opaquelocktoken RFC 4918 -->
+ <KEYWORD1>pop</KEYWORD1> <!-- Accessing mailbox through POP3 RFC 2384 -->
+ <KEYWORD1>pres</KEYWORD1> <!-- Used in Common Profile for Presence (CPP) to identify presence RFC 3859 -->
+ <KEYWORD1>prospero</KEYWORD1> <!-- Prospero Directory Service RFC 4157 -->
+ <KEYWORD1>rtsp</KEYWORD1> <!-- Real Time Streaming Protocol RFC 2326 -->
+ <KEYWORD1>service</KEYWORD1> <!-- ??? RFC 2609 -->
+ <KEYWORD1>shttp</KEYWORD1> <!-- Secure HTTP RFC 2660 -->
+ <!-- <KEYWORD1>sip</KEYWORD1> Used with Session Initiation Protocol (SIP) RFC 3969 RFC 3261 -->
+ <!-- <KEYWORD1>sips</KEYWORD1> Secure equivalent of sip RFC 3969 RFC 3261 -->
+ <KEYWORD1>snmp</KEYWORD1> <!-- Simple Network Management Protocol RFC 4088 -->
+ <KEYWORD1>tag</KEYWORD1> <!-- ??? RFC 4151 -->
+ <KEYWORD1>telnet</KEYWORD1> <!-- Used with telnet RFC 4248 -->
+ <KEYWORD1>tftp</KEYWORD1> <!-- Trivial File Transfer Protocol RFC 3617 -->
+ <KEYWORD1>thismessage</KEYWORD1> <!-- multipart/related relative reference resolution RFC 2557 -->
+ <KEYWORD1>tip</KEYWORD1> <!-- Transaction Internet Protocol RFC 2371 -->
+ <KEYWORD1>tv</KEYWORD1> <!-- TV Broadcasts RFC 2838 -->
+ <KEYWORD1>urn</KEYWORD1> <!-- Uniform Resource Names RFC 2141 -->
+ <KEYWORD1>vemmi</KEYWORD1> <!-- Versatile Multimedia Interface RFC 2122 -->
+ <KEYWORD1>wais</KEYWORD1> <!-- Used with Wide area information server (WAIS) RFC 4156 -->
+ <KEYWORD1>xmlrpc.beep</KEYWORD1> <!-- xmlrpc.beep RFC 3529 -->
+ <KEYWORD1>xmpp</KEYWORD1> <!-- XMPP (Jabber) RFC 5122 -->
+
+ <!-- Unofficial but common URL schemes -->
+ <KEYWORD2>chrome</KEYWORD2> <!-- Used in Mozilla/Gecko based browsers -->
+ <KEYWORD2>cvs</KEYWORD2> <!-- Concurrent Versions System (CVS) Repository Access -->
+ <!-- <KEYWORD2>ed2k</KEYWORD2> Resources available using the eDonkey2000 network -->
+ <KEYWORD2>feed</KEYWORD2> <!-- web feed subscription -->
+ <KEYWORD2>fish</KEYWORD2> <!-- Accessing another computer's files using the SSH protocol -->
+ <KEYWORD2>gg</KEYWORD2> <!-- Starting chat with Gadu-Gadu user -->
+ <KEYWORD2>gizmoproject</KEYWORD2> <!-- Gizmo Project calling link. -->
+ <!-- <KEYWORD2>iax2</KEYWORD2> Inter-Asterisk eXchange protocol version 2 IETF Draft -->
+ <KEYWORD2>irc</KEYWORD2> <!-- Connecting to a server to join a channel. IETF Draft -->
+ <KEYWORD2>ircs</KEYWORD2> <!-- Secure equivalent of irc IETF Draft -->
+ <KEYWORD2>keyparc</KEYWORD2> <!-- Keyparc encrypt/decrypt resource. -->
+ <KEYWORD2>lastfm</KEYWORD2> <!-- Connecting to a radio stream from Last.fm. -->
+ <KEYWORD2>ldaps</KEYWORD2> <!-- Secure equivalent of ldap -->
+ <!-- <KEYWORD2>magnet</KEYWORD2> "magnet links" -->
+ <KEYWORD2>(other</KEYWORD2> <!-- parameters are also possible) -->
+ <KEYWORD2>mms</KEYWORD2> <!-- Windows streaming media -->
+ <!-- <KEYWORD2>mvn</KEYWORD2> Access Apache Maven repository artifacts -->
+ <KEYWORD2>nsfw</KEYWORD2> <!-- Not Safe For Work -->
+ <KEYWORD2>psyc</KEYWORD2> <!-- Used to identify or locate a person, group, or place -->
+ <KEYWORD2>rsync</KEYWORD2> <!-- Rsync -->
+ <KEYWORD2>secondlife</KEYWORD2> <!-- Open the Map floater in Second Life -->
+ <KEYWORD2>sftp</KEYWORD2> <!-- SFTP file transfers (not FTPS (FTP/SSL)) IETF Draft -->
+ <KEYWORD2>skype</KEYWORD2> <!-- Launching Skype call (official; see also callto:) -->
+ <KEYWORD2>ssh</KEYWORD2> <!-- SSH connections (like telnet:) and -->
+ <KEYWORD2>smb</KEYWORD2> <!-- Accessing SMB/CIFS shares IETF Draft -->
+ <KEYWORD2>soldat</KEYWORD2> <!-- Joining servers -->
+ <!-- <KEYWORD2>steam</KEYWORD2> Interact with Steam -->
+ <KEYWORD2>teamspeak</KEYWORD2> <!-- Joining a server. -->
+ <KEYWORD2>unreal</KEYWORD2> <!-- Joining servers -->
+ <KEYWORD2>ut2004</KEYWORD2> <!-- Joining servers -->
+ <KEYWORD2>ventrilo</KEYWORD2> <!-- Joining a server. -->
+ <!-- <KEYWORD2>view-source</KEYWORD2> Shows a web page as code 'in the raw'. -->
+ <KEYWORD2>webcal</KEYWORD2> <!-- Subscribing to calendars in iCalendar format -->
+ <KEYWORD2>wyciwyg</KEYWORD2> <!-- What You Cache Is What You Get WYCIWYG -->
+ <KEYWORD2>xfire</KEYWORD2> <!-- Adding friends and servers, joining servers -->
+ <KEYWORD2>ymsgr</KEYWORD2> <!-- Sending an instant message to a Yahoo! Contact. -->
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/uscript.xml b/jEdit/modes/uscript.xml
index f0e3245..81c66f7 100644
--- a/jEdit/modes/uscript.xml
+++ b/jEdit/modes/uscript.xml
@@ -1,160 +1,160 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
-
- <!-- Auto indent -->
- <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
-
- <!-- Silly comment -->
- <SEQ TYPE="COMMENT1">/**/</SEQ>
-
- <!-- Java comment (C style) -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
-
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">@</SEQ>
- <SEQ TYPE="OPERATOR">#</SEQ>
- <SEQ TYPE="OPERATOR">$</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">\\</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">`</SEQ>
-
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>abstract</KEYWORD1>
- <KEYWORD1>auto</KEYWORD1>
- <KEYWORD1>array</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>coerce</KEYWORD1>
- <KEYWORD1>collapscategories</KEYWORD1>
- <KEYWORD1>config</KEYWORD1>
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>defaultproperties</KEYWORD1>
- <KEYWORD1>deprecated</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>dontcollapsecategories</KEYWORD1>
- <KEYWORD1>edfindable</KEYWORD1>
- <KEYWORD1>editconst</KEYWORD1>
- <KEYWORD1>editinline</KEYWORD1>
- <KEYWORD1>editinlinenew</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>enum</KEYWORD1>
- <KEYWORD1>event</KEYWORD1>
- <KEYWORD1>exec</KEYWORD1>
- <KEYWORD1>export</KEYWORD1>
- <KEYWORD1>exportstructs</KEYWORD1>
- <KEYWORD1>extends</KEYWORD1>
- <KEYWORD1>false</KEYWORD1>
- <KEYWORD1>final</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>foreach</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>globalconfig</KEYWORD1>
- <KEYWORD1>hidecategories</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>ignores</KEYWORD1>
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD1>iterator</KEYWORD1>
- <KEYWORD1>latent</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>localized</KEYWORD1>
- <KEYWORD1>native</KEYWORD1>
- <KEYWORD1>nativereplication</KEYWORD1>
- <KEYWORD1>noexport</KEYWORD1>
- <KEYWORD1>noteditinlinenew</KEYWORD1>
- <KEYWORD1>notplaceable</KEYWORD1>
- <KEYWORD1>operator</KEYWORD1>
- <KEYWORD1>optional</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>perobjectconfig</KEYWORD1>
- <KEYWORD1>placeable</KEYWORD1>
- <KEYWORD1>postoperator</KEYWORD1>
- <KEYWORD1>preoperator</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
- <KEYWORD1>protected</KEYWORD1>
- <KEYWORD1>reliable</KEYWORD1>
- <KEYWORD1>replication</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>safereplace</KEYWORD1>
- <KEYWORD1>showcategories</KEYWORD1>
- <KEYWORD1>simulated</KEYWORD1>
- <KEYWORD1>singular</KEYWORD1>
- <KEYWORD1>state</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>struct</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>transient</KEYWORD1>
- <KEYWORD1>travel</KEYWORD1>
- <KEYWORD1>true</KEYWORD1>
- <KEYWORD1>unreliable</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>var</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>within</KEYWORD1>
-
- <KEYWORD2>default</KEYWORD2>
- <KEYWORD2>global</KEYWORD2>
- <KEYWORD2>none</KEYWORD2>
- <KEYWORD2>self</KEYWORD2>
- <KEYWORD2>static</KEYWORD2>
- <KEYWORD2>super</KEYWORD2>
-
- <KEYWORD3>bool</KEYWORD3>
- <KEYWORD3>byte</KEYWORD3>
- <KEYWORD3>float</KEYWORD3>
- <KEYWORD3>int</KEYWORD3>
- <KEYWORD3>name</KEYWORD3>
- <KEYWORD3>string</KEYWORD3>
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+
+ <!-- Silly comment -->
+ <SEQ TYPE="COMMENT1">/**/</SEQ>
+
+ <!-- Java comment (C style) -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>
+
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">@</SEQ>
+ <SEQ TYPE="OPERATOR">#</SEQ>
+ <SEQ TYPE="OPERATOR">$</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">\\</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">`</SEQ>
+
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_WHITESPACE_END="TRUE">:</MARK_PREVIOUS>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>abstract</KEYWORD1>
+ <KEYWORD1>auto</KEYWORD1>
+ <KEYWORD1>array</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>coerce</KEYWORD1>
+ <KEYWORD1>collapscategories</KEYWORD1>
+ <KEYWORD1>config</KEYWORD1>
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>defaultproperties</KEYWORD1>
+ <KEYWORD1>deprecated</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>dontcollapsecategories</KEYWORD1>
+ <KEYWORD1>edfindable</KEYWORD1>
+ <KEYWORD1>editconst</KEYWORD1>
+ <KEYWORD1>editinline</KEYWORD1>
+ <KEYWORD1>editinlinenew</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>enum</KEYWORD1>
+ <KEYWORD1>event</KEYWORD1>
+ <KEYWORD1>exec</KEYWORD1>
+ <KEYWORD1>export</KEYWORD1>
+ <KEYWORD1>exportstructs</KEYWORD1>
+ <KEYWORD1>extends</KEYWORD1>
+ <KEYWORD1>false</KEYWORD1>
+ <KEYWORD1>final</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>foreach</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>globalconfig</KEYWORD1>
+ <KEYWORD1>hidecategories</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>ignores</KEYWORD1>
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD1>iterator</KEYWORD1>
+ <KEYWORD1>latent</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>localized</KEYWORD1>
+ <KEYWORD1>native</KEYWORD1>
+ <KEYWORD1>nativereplication</KEYWORD1>
+ <KEYWORD1>noexport</KEYWORD1>
+ <KEYWORD1>noteditinlinenew</KEYWORD1>
+ <KEYWORD1>notplaceable</KEYWORD1>
+ <KEYWORD1>operator</KEYWORD1>
+ <KEYWORD1>optional</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+ <KEYWORD1>perobjectconfig</KEYWORD1>
+ <KEYWORD1>placeable</KEYWORD1>
+ <KEYWORD1>postoperator</KEYWORD1>
+ <KEYWORD1>preoperator</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+ <KEYWORD1>protected</KEYWORD1>
+ <KEYWORD1>reliable</KEYWORD1>
+ <KEYWORD1>replication</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>safereplace</KEYWORD1>
+ <KEYWORD1>showcategories</KEYWORD1>
+ <KEYWORD1>simulated</KEYWORD1>
+ <KEYWORD1>singular</KEYWORD1>
+ <KEYWORD1>state</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>struct</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>transient</KEYWORD1>
+ <KEYWORD1>travel</KEYWORD1>
+ <KEYWORD1>true</KEYWORD1>
+ <KEYWORD1>unreliable</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>var</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>within</KEYWORD1>
+
+ <KEYWORD2>default</KEYWORD2>
+ <KEYWORD2>global</KEYWORD2>
+ <KEYWORD2>none</KEYWORD2>
+ <KEYWORD2>self</KEYWORD2>
+ <KEYWORD2>static</KEYWORD2>
+ <KEYWORD2>super</KEYWORD2>
+
+ <KEYWORD3>bool</KEYWORD3>
+ <KEYWORD3>byte</KEYWORD3>
+ <KEYWORD3>float</KEYWORD3>
+ <KEYWORD3>int</KEYWORD3>
+ <KEYWORD3>name</KEYWORD3>
+ <KEYWORD3>string</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/vbscript.xml b/jEdit/modes/vbscript.xml
index 9f0e9bf..f8e8e65 100644
--- a/jEdit/modes/vbscript.xml
+++ b/jEdit/modes/vbscript.xml
@@ -1,739 +1,739 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- VBScript mode by Andre Kaplan -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="'" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- conditional compilation -->
- <EOL_SPAN TYPE="KEYWORD2">#if</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#else</EOL_SPAN>
- <EOL_SPAN TYPE="KEYWORD2">#end</EOL_SPAN>
-
- <EOL_SPAN TYPE="COMMENT1">'</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT1">rem </EOL_SPAN>
-
- <!-- Comparison operators -->
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">.</SEQ>
- <!-- See in keywords: is -->
-
- <!-- Arithmetic operators -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">\</SEQ>
- <!-- See in keywords: mod -->
- <SEQ TYPE="OPERATOR">^</SEQ>
-
- <!-- Concatenation operators -->
- <SEQ TYPE="OPERATOR">&</SEQ>
- <!-- <SEQ TYPE="OPERATOR">+</SEQ> -->
-
- <!-- Logical operators -->
- <!-- See in keywords: and, or, not, xor, eqv -->
-
- <!-- EOL Continuation -->
-<!-- <SEQ TYPE="NULL">_</SEQ>-->
- <!-- Instruction separator -->
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <KEYWORDS>
- <!-- Conditional Statements -->
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>elseif</KEYWORD1>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
-
- <!-- Loop Statements -->
- <!-- For..Next -->
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>step</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <!-- For Each..Next -->
- <KEYWORD1>each</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <!-- Do..Loop -->
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
- <!-- While..Wend -->
- <KEYWORD1>wend</KEYWORD1>
-
- <!-- Closing, Exit Statements -->
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
-
- <!-- Methods, Functions, Class, Properties, Variables -->
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>sub</KEYWORD1>
- <KEYWORD1>class</KEYWORD1>
- <KEYWORD1>property</KEYWORD1>
- <KEYWORD1>get</KEYWORD1>
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>set</KEYWORD1>
-
- <!-- Parameters passing -->
- <KEYWORD1>byval</KEYWORD1>
- <KEYWORD1>byref</KEYWORD1>
-
- <!-- Declaration -->
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>dim</KEYWORD1>
- <KEYWORD1>redim</KEYWORD1>
- <KEYWORD1>preserve</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
-
- <!-- Object Assignement/Instantiation -->
- <KEYWORD1>set</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
-
- <!-- Visibility -->
- <KEYWORD1>public</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>private</KEYWORD1>
-
- <!-- Comments -->
- <KEYWORD1>rem</KEYWORD1>
-
- <!-- Function Call - Dynamic Evaluation -->
- <KEYWORD1>call</KEYWORD1>
- <KEYWORD1>execute</KEYWORD1>
- <KEYWORD1>eval</KEYWORD1>
-
- <!-- Miscellaneous -->
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>error</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>resume</KEYWORD1>
- <KEYWORD1>option</KEYWORD1>
- <KEYWORD1>explicit</KEYWORD1>
- <KEYWORD1>erase</KEYWORD1>
- <KEYWORD1>randomize</KEYWORD1>
-
- <!-- Operators -->
- <!-- Comparison operators -->
- <OPERATOR>is</OPERATOR>
- <!-- Arithmetic operators -->
- <OPERATOR>mod</OPERATOR>
- <!-- Logical operators -->
- <OPERATOR>and</OPERATOR>
- <OPERATOR>or</OPERATOR>
- <OPERATOR>not</OPERATOR>
- <OPERATOR>xor</OPERATOR>
- <OPERATOR>imp</OPERATOR>
-
- <!-- Datatypes Constants/Literals -->
- <KEYWORD3>false</KEYWORD3>
- <KEYWORD3>true</KEYWORD3>
- <KEYWORD3>empty</KEYWORD3>
- <KEYWORD3>nothing</KEYWORD3>
- <KEYWORD3>null</KEYWORD3>
-
- <!-- VBScript Constants -->
- <!-- Color constants -->
- <LITERAL2>vbblack</LITERAL2>
- <LITERAL2>vbred</LITERAL2>
- <LITERAL2>vbgreen</LITERAL2>
- <LITERAL2>vbyellow</LITERAL2>
- <LITERAL2>vbblue</LITERAL2>
- <LITERAL2>vbmagenta</LITERAL2>
- <LITERAL2>vbcyan</LITERAL2>
- <LITERAL2>vbwhite</LITERAL2>
-
- <!-- Date & Time Constants -->
-<!-- <LITERAL2>vbSunday</LITERAL2>
- <LITERAL2>vbMonday</LITERAL2>
- <LITERAL2>vbTuesday</LITERAL2>
- <LITERAL2>vbWednesday</LITERAL2>
- <LITERAL2>vbThursday</LITERAL2>
- <LITERAL2>vbFriday</LITERAL2>
- <LITERAL2>vbSaturday</LITERAL2>
- <LITERAL2>vbUseSystem</LITERAL2>
- <LITERAL2>vbUseSystemDayOfWeek</LITERAL2>
- <LITERAL2>vbFirstJan1</LITERAL2>
- <LITERAL2>vbFirstFourDays</LITERAL2>
- <LITERAL2>vbFirstFullWeek</LITERAL2>
--->
- <!-- Date Format Constants -->
- <LITERAL2>vbGeneralDate</LITERAL2>
- <LITERAL2>vbLongDate</LITERAL2>
- <LITERAL2>vbShortDate</LITERAL2>
- <LITERAL2>vbLongTime</LITERAL2>
- <LITERAL2>vbShortTime</LITERAL2>
-
- <!-- Miscellaneous -->
- <LITERAL2>vbObjectError</LITERAL2>
- <KEYWORD2>Err</KEYWORD2>
-
- <!-- MsgBox Constants -->
- <LITERAL2>vbOKOnly</LITERAL2>
- <LITERAL2>vbOKCancel</LITERAL2>
- <LITERAL2>vbAbortRetryIgnore</LITERAL2>
- <LITERAL2>vbYesNoCancel</LITERAL2>
- <LITERAL2>vbYesNo</LITERAL2>
- <LITERAL2>vbRetryCancel</LITERAL2>
- <LITERAL2>vbCritical</LITERAL2>
- <LITERAL2>vbQuestion</LITERAL2>
- <LITERAL2>vbExclamation</LITERAL2>
- <LITERAL2>vbInformation</LITERAL2>
- <LITERAL2>vbDefaultButton1</LITERAL2>
- <LITERAL2>vbDefaultButton2</LITERAL2>
- <LITERAL2>vbDefaultButton3</LITERAL2>
- <LITERAL2>vbDefaultButton4</LITERAL2>
- <LITERAL2>vbApplicationModal</LITERAL2>
- <LITERAL2>vbSystemModal</LITERAL2>
- <LITERAL2>vbOK</LITERAL2>
- <LITERAL2>vbCancel</LITERAL2>
- <LITERAL2>vbAbort</LITERAL2>
- <LITERAL2>vbRetry</LITERAL2>
- <LITERAL2>vbIgnore</LITERAL2>
- <LITERAL2>vbYes</LITERAL2>
- <LITERAL2>vbNo</LITERAL2>
-
- <!-- Tristate Constants -->
- <LITERAL2>vbUseDefault</LITERAL2>
- <LITERAL2>vbTrue</LITERAL2>
- <LITERAL2>vbFalse</LITERAL2>
-
- <!-- String Constants -->
- <LITERAL2>vbcr</LITERAL2>
- <LITERAL2>vbcrlf</LITERAL2>
- <LITERAL2>vbformfeed</LITERAL2>
- <LITERAL2>vblf</LITERAL2>
- <LITERAL2>vbnewline</LITERAL2>
- <LITERAL2>vbnullchar</LITERAL2>
- <LITERAL2>vbnullstring</LITERAL2>
- <LITERAL2>vbtab</LITERAL2>
- <LITERAL2>vbverticaltab</LITERAL2>
- <!-- VarType Constants -->
- <LITERAL2>vbempty</LITERAL2>
- <LITERAL2>vbnull</LITERAL2>
- <LITERAL2>vbinteger</LITERAL2>
- <LITERAL2>vblong</LITERAL2>
- <LITERAL2>vbsingle</LITERAL2>
- <LITERAL2>vbdouble</LITERAL2>
- <LITERAL2>vbcurrency</LITERAL2>
- <LITERAL2>vbdate</LITERAL2>
- <LITERAL2>vbstring</LITERAL2>
- <LITERAL2>vbobject</LITERAL2>
- <LITERAL2>vberror</LITERAL2>
- <LITERAL2>vbboolean</LITERAL2>
- <LITERAL2>vbvariant</LITERAL2>
- <LITERAL2>vbdataobject</LITERAL2>
- <LITERAL2>vbdecimal</LITERAL2>
- <LITERAL2>vbbyte</LITERAL2>
- <LITERAL2>vbarray</LITERAL2>
-
- <!-- Built-in Functions -->
- <!-- Array Handling -->
- <KEYWORD2>array</KEYWORD2>
- <KEYWORD2>lbound</KEYWORD2>
- <KEYWORD2>ubound</KEYWORD2>
- <!-- Conversion Functions (Variant) -->
- <KEYWORD2>cbool</KEYWORD2>
- <KEYWORD2>cbyte</KEYWORD2>
- <KEYWORD2>ccur</KEYWORD2>
- <KEYWORD2>cdate</KEYWORD2>
- <KEYWORD2>cdbl</KEYWORD2>
- <KEYWORD2>cint</KEYWORD2>
- <KEYWORD2>clng</KEYWORD2>
- <KEYWORD2>csng</KEYWORD2>
- <KEYWORD2>cstr</KEYWORD2>
- <!-- Conversion Functions (Radix) -->
- <KEYWORD2>hex</KEYWORD2>
- <KEYWORD2>oct</KEYWORD2>
- <!-- Date/Time Functions -->
- <KEYWORD2>date</KEYWORD2>
- <KEYWORD2>time</KEYWORD2>
- <KEYWORD2>dateadd</KEYWORD2>
- <KEYWORD2>datediff</KEYWORD2>
- <KEYWORD2>datepart</KEYWORD2>
- <KEYWORD2>dateserial</KEYWORD2>
- <KEYWORD2>datevalue</KEYWORD2>
- <KEYWORD2>day</KEYWORD2>
- <KEYWORD2>month</KEYWORD2>
- <KEYWORD2>monthname</KEYWORD2>
- <KEYWORD2>weekday</KEYWORD2>
- <KEYWORD2>weekdayname</KEYWORD2>
- <KEYWORD2>year</KEYWORD2>
- <KEYWORD2>hour</KEYWORD2>
- <KEYWORD2>minute</KEYWORD2>
- <KEYWORD2>second</KEYWORD2>
- <KEYWORD2>now</KEYWORD2>
- <KEYWORD2>timeserial</KEYWORD2>
- <KEYWORD2>timevalue</KEYWORD2>
- <!-- Formatting Strings -->
- <KEYWORD2>formatcurrency</KEYWORD2>
- <KEYWORD2>formatdatetime</KEYWORD2>
- <KEYWORD2>formatnumber</KEYWORD2>
- <KEYWORD2>formatpercent</KEYWORD2>
- <!-- Input/Output -->
- <KEYWORD2>inputbox</KEYWORD2>
- <KEYWORD2>loadpicture</KEYWORD2>
- <KEYWORD2>msgbox</KEYWORD2>
- <!-- Math Functions -->
- <KEYWORD2>atn</KEYWORD2>
- <KEYWORD2>cos</KEYWORD2>
- <KEYWORD2>sin</KEYWORD2>
- <KEYWORD2>tan</KEYWORD2>
- <KEYWORD2>exp</KEYWORD2>
- <KEYWORD2>log</KEYWORD2>
- <KEYWORD2>sqr</KEYWORD2>
- <KEYWORD2>rnd</KEYWORD2>
- <!-- Miscellaneous -->
- <KEYWORD2>rgb</KEYWORD2>
- <!-- Objects -->
- <KEYWORD2>createobject</KEYWORD2>
- <KEYWORD2>getobject</KEYWORD2>
- <KEYWORD2>getref</KEYWORD2>
- <!-- Rounding -->
- <KEYWORD2>abs</KEYWORD2>
- <KEYWORD2>int</KEYWORD2>
- <KEYWORD2>fix</KEYWORD2>
- <KEYWORD2>round</KEYWORD2>
- <KEYWORD2>sgn</KEYWORD2>
- <!-- Script Engine ID -->
- <KEYWORD2>scriptengine</KEYWORD2>
- <KEYWORD2>scriptenginebuildversion</KEYWORD2>
- <KEYWORD2>scriptenginemajorversion</KEYWORD2>
- <KEYWORD2>scriptengineminorversion</KEYWORD2>
- <!-- Strings -->
- <KEYWORD2>asc</KEYWORD2>
- <KEYWORD2>ascb</KEYWORD2>
- <KEYWORD2>ascw</KEYWORD2>
- <KEYWORD2>chr</KEYWORD2>
- <KEYWORD2>chrb</KEYWORD2>
- <KEYWORD2>chrw</KEYWORD2>
- <KEYWORD2>filter</KEYWORD2>
- <KEYWORD2>instr</KEYWORD2>
- <KEYWORD2>instrb</KEYWORD2>
- <KEYWORD2>instrrev</KEYWORD2>
- <KEYWORD2>join</KEYWORD2>
- <KEYWORD2>len</KEYWORD2>
- <KEYWORD2>lenb</KEYWORD2>
- <KEYWORD2>lcase</KEYWORD2>
- <KEYWORD2>ucase</KEYWORD2>
- <KEYWORD2>left</KEYWORD2>
- <KEYWORD2>leftb</KEYWORD2>
- <KEYWORD2>mid</KEYWORD2>
- <KEYWORD2>midb</KEYWORD2>
- <KEYWORD2>right</KEYWORD2>
- <KEYWORD2>rightb</KEYWORD2>
- <KEYWORD2>replace</KEYWORD2>
- <KEYWORD2>space</KEYWORD2>
- <KEYWORD2>split</KEYWORD2>
- <KEYWORD2>strcomp</KEYWORD2>
- <KEYWORD2>string</KEYWORD2>
- <KEYWORD2>strreverse</KEYWORD2>
- <KEYWORD2>ltrim</KEYWORD2>
- <KEYWORD2>rtrim</KEYWORD2>
- <KEYWORD2>trim</KEYWORD2>
- <!-- Variants -->
- <KEYWORD2>isarray</KEYWORD2>
- <KEYWORD2>isdate</KEYWORD2>
- <KEYWORD2>isempty</KEYWORD2>
- <KEYWORD2>isnull</KEYWORD2>
- <KEYWORD2>isnumeric</KEYWORD2>
- <KEYWORD2>isobject</KEYWORD2>
- <KEYWORD2>typename</KEYWORD2>
- <KEYWORD2>vartype</KEYWORD2>
-
- <!-- Comment/Uncomment your favorite ADO Constants-->
-
- <!-- ADO Constants-->
-
- <!-- CursorTypeEnum Values -->
- <LITERAL2>adOpenForwardOnly</LITERAL2>
- <LITERAL2>adOpenKeyset</LITERAL2>
- <LITERAL2>adOpenDynamic</LITERAL2>
- <LITERAL2>adOpenStatic</LITERAL2>
-
- <!-- CursorOptionEnum Values -->
-<!-- <LITERAL2>adHoldRecords</LITERAL2>
- <LITERAL2>adMovePrevious</LITERAL2>
- <LITERAL2>adAddNew</LITERAL2>
- <LITERAL2>adDelete</LITERAL2>
- <LITERAL2>adUpdate</LITERAL2>
- <LITERAL2>adBookmark</LITERAL2>
- <LITERAL2>adApproxPosition</LITERAL2>
- <LITERAL2>adUpdateBatch</LITERAL2>
- <LITERAL2>adResync</LITERAL2>
- <LITERAL2>adNotify</LITERAL2>
- <LITERAL2>adFind</LITERAL2>
- <LITERAL2>adSeek</LITERAL2>
- <LITERAL2>adIndex</LITERAL2>
--->
- <!-- LockTypeEnum Values -->
- <LITERAL2>adLockReadOnly</LITERAL2>
- <LITERAL2>adLockPessimistic</LITERAL2>
- <LITERAL2>adLockOptimistic</LITERAL2>
- <LITERAL2>adLockBatchOptimistic</LITERAL2>
-
- <!-- ExecuteOptionEnum Values -->
- <LITERAL2>adRunAsync</LITERAL2>
- <LITERAL2>adAsyncExecute</LITERAL2>
- <LITERAL2>adAsyncFetch</LITERAL2>
- <LITERAL2>adAsyncFetchNonBlocking</LITERAL2>
- <LITERAL2>adExecuteNoRecords</LITERAL2>
-
- <!-- ConnectOptionEnum Values -->
-<!-- <LITERAL2>adAsyncConnect</LITERAL2>
--->
- <!-- ObjectStateEnum Values -->
- <LITERAL2>adStateClosed</LITERAL2>
- <LITERAL2>adStateOpen</LITERAL2>
- <LITERAL2>adStateConnecting</LITERAL2>
- <LITERAL2>adStateExecuting</LITERAL2>
- <LITERAL2>adStateFetching</LITERAL2>
-
- <!-- CursorLocationEnum Values -->
- <LITERAL2>adUseServer</LITERAL2>
- <LITERAL2>adUseClient</LITERAL2>
-
- <!-- DataTypeEnum Values -->
- <LITERAL2>adEmpty</LITERAL2>
- <LITERAL2>adTinyInt</LITERAL2>
- <LITERAL2>adSmallInt</LITERAL2>
- <LITERAL2>adInteger</LITERAL2>
- <LITERAL2>adBigInt</LITERAL2>
- <LITERAL2>adUnsignedTinyInt</LITERAL2>
- <LITERAL2>adUnsignedSmallInt</LITERAL2>
- <LITERAL2>adUnsignedInt</LITERAL2>
- <LITERAL2>adUnsignedBigInt</LITERAL2>
- <LITERAL2>adSingle</LITERAL2>
- <LITERAL2>adDouble</LITERAL2>
- <LITERAL2>adCurrency</LITERAL2>
- <LITERAL2>adDecimal</LITERAL2>
- <LITERAL2>adNumeric</LITERAL2>
- <LITERAL2>adBoolean</LITERAL2>
- <LITERAL2>adError</LITERAL2>
- <LITERAL2>adUserDefined</LITERAL2>
- <LITERAL2>adVariant</LITERAL2>
- <LITERAL2>adIDispatch</LITERAL2>
- <LITERAL2>adIUnknown</LITERAL2>
- <LITERAL2>adGUID</LITERAL2>
- <LITERAL2>adDate</LITERAL2>
- <LITERAL2>adDBDate</LITERAL2>
- <LITERAL2>adDBTime</LITERAL2>
- <LITERAL2>adDBTimeStamp</LITERAL2>
- <LITERAL2>adBSTR</LITERAL2>
- <LITERAL2>adChar</LITERAL2>
- <LITERAL2>adVarChar</LITERAL2>
- <LITERAL2>adLongVarChar</LITERAL2>
- <LITERAL2>adWChar</LITERAL2>
- <LITERAL2>adVarWChar</LITERAL2>
- <LITERAL2>adLongVarWChar</LITERAL2>
- <LITERAL2>adBinary</LITERAL2>
- <LITERAL2>adVarBinary</LITERAL2>
- <LITERAL2>adLongVarBinary</LITERAL2>
- <LITERAL2>adChapter</LITERAL2>
- <LITERAL2>adFileTime</LITERAL2>
- <LITERAL2>adDBFileTime</LITERAL2>
- <LITERAL2>adPropVariant</LITERAL2>
- <LITERAL2>adVarNumeric</LITERAL2>
-
- <!-- FieldAttributeEnum Values -->
-<!-- <LITERAL2>adFldMayDefer</LITERAL2>
- <LITERAL2>adFldUpdatable</LITERAL2>
- <LITERAL2>adFldUnknownUpdatable</LITERAL2>
- <LITERAL2>adFldFixed</LITERAL2>
- <LITERAL2>adFldIsNullable</LITERAL2>
- <LITERAL2>adFldMayBeNull</LITERAL2>
- <LITERAL2>adFldLong</LITERAL2>
- <LITERAL2>adFldRowID</LITERAL2>
- <LITERAL2>adFldRowVersion</LITERAL2>
- <LITERAL2>adFldCacheDeferred</LITERAL2>
- <LITERAL2>adFldKeyColumn</LITERAL2>
--->
-
- <!-- EditModeEnum Values -->
-<!-- <LITERAL2>adEditNone</LITERAL2>
- <LITERAL2>adEditInProgress</LITERAL2>
- <LITERAL2>adEditAdd</LITERAL2>
- <LITERAL2>adEditDelete</LITERAL2>
--->
- <!-- RecordStatusEnum Values -->
-<!-- <LITERAL2>adRecOK</LITERAL2>
- <LITERAL2>adRecNew</LITERAL2>
- <LITERAL2>adRecModified</LITERAL2>
- <LITERAL2>adRecDeleted</LITERAL2>
- <LITERAL2>adRecUnmodified</LITERAL2>
- <LITERAL2>adRecInvalid</LITERAL2>
- <LITERAL2>adRecMultipleChanges</LITERAL2>
- <LITERAL2>adRecPendingChanges</LITERAL2>
- <LITERAL2>adRecCanceled</LITERAL2>
- <LITERAL2>adRecCantRelease</LITERAL2>
- <LITERAL2>adRecConcurrencyViolation</LITERAL2>
- <LITERAL2>adRecIntegrityViolation</LITERAL2>
- <LITERAL2>adRecMaxChangesExceeded</LITERAL2>
- <LITERAL2>adRecObjectOpen</LITERAL2>
- <LITERAL2>adRecOutOfMemory</LITERAL2>
- <LITERAL2>adRecPermissionDenied</LITERAL2>
- <LITERAL2>adRecSchemaViolation</LITERAL2>
- <LITERAL2>adRecDBDeleted</LITERAL2>
--->
- <!-- GetRowsOptionEnum Values -->
-<!-- <LITERAL2>adGetRowsRest</LITERAL2>
--->
-
- <!-- PositionEnum Values -->
-<!-- <LITERAL2>adPosUnknown</LITERAL2>
- <LITERAL2>adPosBOF</LITERAL2>
- <LITERAL2>adPosEOF</LITERAL2>
--->
-
- <!-- enum Values -->
-<!-- <LITERAL2>adBookmarkCurrent</LITERAL2>
- <LITERAL2>adBookmarkFirst</LITERAL2>
- <LITERAL2>adBookmarkLast</LITERAL2>
--->
- <!-- MarshalOptionsEnum Values -->
-<!-- <LITERAL2>adMarshalAll</LITERAL2>
- <LITERAL2>adMarshalModifiedOnly</LITERAL2>
--->
- <!-- AffectEnum Values -->
-<!-- <LITERAL2>adAffectCurrent</LITERAL2>
- <LITERAL2>adAffectGroup</LITERAL2>
- <LITERAL2>adAffectAll</LITERAL2>
- <LITERAL2>adAffectAllChapters</LITERAL2>
--->
-
- <!-- ResyncEnum Values -->
-<!-- <LITERAL2>adResyncUnderlyingValues</LITERAL2>
- <LITERAL2>adResyncAllValues</LITERAL2>
--->
- <!-- CompareEnum Values -->
-<!-- <LITERAL2>adCompareLessThan</LITERAL2>
- <LITERAL2>adCompareEqual</LITERAL2>
- <LITERAL2>adCompareGreaterThan</LITERAL2>
- <LITERAL2>adCompareNotEqual</LITERAL2>
- <LITERAL2>adCompareNotComparable</LITERAL2>
--->
- <!-- FilterGroupEnum Values -->
-<!-- <LITERAL2>adFilterNone</LITERAL2>
- <LITERAL2>adFilterPendingRecords</LITERAL2>
- <LITERAL2>adFilterAffectedRecords</LITERAL2>
- <LITERAL2>adFilterFetchedRecords</LITERAL2>
- <LITERAL2>adFilterPredicate</LITERAL2>
- <LITERAL2>adFilterConflictingRecords</LITERAL2>
--->
- <!-- SearchDirectionEnum Values -->
-<!-- <LITERAL2>adSearchForward</LITERAL2>
- <LITERAL2>adSearchBackward</LITERAL2>
--->
-
- <!-- PersistFormatEnum Values -->
- <LITERAL2>adPersistADTG</LITERAL2>
- <LITERAL2>adPersistXML</LITERAL2>
-
- <!-- StringFormatEnum Values -->
-<!-- <LITERAL2>adStringXML</LITERAL2>
- <LITERAL2>adStringHTML</LITERAL2>
- <LITERAL2>adClipString</LITERAL2>
--->
- <!-- ConnectPromptEnum Values -->
-<!-- <LITERAL2>adPromptAlways</LITERAL2>
- <LITERAL2>adPromptComplete</LITERAL2>
- <LITERAL2>adPromptCompleteRequired</LITERAL2>
- <LITERAL2>adPromptNever</LITERAL2>
--->
- <!-- ConnectModeEnum Values -->
-<!-- <LITERAL2>adModeUnknown</LITERAL2>
- <LITERAL2>adModeRead</LITERAL2>
- <LITERAL2>adModeWrite</LITERAL2>
- <LITERAL2>adModeReadWrite</LITERAL2>
- <LITERAL2>adModeShareDenyRead</LITERAL2>
- <LITERAL2>adModeShareDenyWrite</LITERAL2>
- <LITERAL2>adModeShareExclusive</LITERAL2>
- <LITERAL2>adModeShareDenyNone</LITERAL2>
--->
- <!-- IsolationLevelEnum Values -->
-<!-- <LITERAL2>adXactUnspecified</LITERAL2>
- <LITERAL2>adXactChaos</LITERAL2>
- <LITERAL2>adXactReadUncommitted</LITERAL2>
- <LITERAL2>adXactBrowse</LITERAL2>
- <LITERAL2>adXactCursorStability</LITERAL2>
- <LITERAL2>adXactReadCommitted</LITERAL2>
- <LITERAL2>adXactRepeatableRead</LITERAL2>
- <LITERAL2>adXactSerializable</LITERAL2>
- <LITERAL2>adXactIsolated</LITERAL2>
--->
- <!-- XactAttributeEnum Values -->
-<!-- <LITERAL2>adXactCommitRetaining</LITERAL2>
- <LITERAL2>adXactAbortRetaining</LITERAL2>
--->
- <!-- PropertyAttributesEnum Values -->
-<!-- <LITERAL2>adPropNotSupported</LITERAL2>
- <LITERAL2>adPropRequired</LITERAL2>
- <LITERAL2>adPropOptional</LITERAL2>
- <LITERAL2>adPropRead</LITERAL2>
- <LITERAL2>adPropWrite</LITERAL2>
--->
- <!-- ErrorValueEnum Values -->
-<!-- <LITERAL2>adErrInvalidArgument</LITERAL2>
- <LITERAL2>adErrNoCurrentRecord</LITERAL2>
- <LITERAL2>adErrIllegalOperation</LITERAL2>
- <LITERAL2>adErrInTransaction</LITERAL2>
- <LITERAL2>adErrFeatureNotAvailable</LITERAL2>
- <LITERAL2>adErrItemNotFound</LITERAL2>
- <LITERAL2>adErrObjectInCollection</LITERAL2>
- <LITERAL2>adErrObjectNotSet</LITERAL2>
- <LITERAL2>adErrDataConversion</LITERAL2>
- <LITERAL2>adErrObjectClosed</LITERAL2>
- <LITERAL2>adErrObjectOpen</LITERAL2>
- <LITERAL2>adErrProviderNotFound</LITERAL2>
- <LITERAL2>adErrBoundToCommand</LITERAL2>
- <LITERAL2>adErrInvalidParamInfo</LITERAL2>
- <LITERAL2>adErrInvalidConnection</LITERAL2>
- <LITERAL2>adErrNotReentrant</LITERAL2>
- <LITERAL2>adErrStillExecuting</LITERAL2>
- <LITERAL2>adErrOperationCancelled</LITERAL2>
- <LITERAL2>adErrStillConnecting</LITERAL2>
- <LITERAL2>adErrNotExecuting</LITERAL2>
- <LITERAL2>adErrUnsafeOperation</LITERAL2>
--->
- <!-- ParameterAttributesEnum Values -->
- <LITERAL2>adParamSigned</LITERAL2>
- <LITERAL2>adParamNullable</LITERAL2>
- <LITERAL2>adParamLong</LITERAL2>
-
- <!-- ParameterDirectionEnum Values -->
- <LITERAL2>adParamUnknown</LITERAL2>
- <LITERAL2>adParamInput</LITERAL2>
- <LITERAL2>adParamOutput</LITERAL2>
- <LITERAL2>adParamInputOutput</LITERAL2>
- <LITERAL2>adParamReturnValue</LITERAL2>
-
- <!-- CommandTypeEnum Values -->
- <LITERAL2>adCmdUnknown</LITERAL2>
- <LITERAL2>adCmdText</LITERAL2>
- <LITERAL2>adCmdTable</LITERAL2>
- <LITERAL2>adCmdStoredProc</LITERAL2>
- <LITERAL2>adCmdFile</LITERAL2>
- <LITERAL2>adCmdTableDirect</LITERAL2>
-
- <!-- EventStatusEnum Values -->
-<!-- <LITERAL2>adStatusOK</LITERAL2>
- <LITERAL2>adStatusErrorsOccurred</LITERAL2>
- <LITERAL2>adStatusCantDeny</LITERAL2>
- <LITERAL2>adStatusCancel</LITERAL2>
- <LITERAL2>adStatusUnwantedEvent</LITERAL2>
--->
- <!-- EventReasonEnum Values -->
-<!-- <LITERAL2>adRsnAddNew</LITERAL2>
- <LITERAL2>adRsnDelete</LITERAL2>
- <LITERAL2>adRsnUpdate</LITERAL2>
- <LITERAL2>adRsnUndoUpdate</LITERAL2>
- <LITERAL2>adRsnUndoAddNew</LITERAL2>
- <LITERAL2>adRsnUndoDelete</LITERAL2>
- <LITERAL2>adRsnRequery</LITERAL2>
- <LITERAL2>adRsnResynch</LITERAL2>
- <LITERAL2>adRsnClose</LITERAL2>
- <LITERAL2>adRsnMove</LITERAL2>
- <LITERAL2>adRsnFirstChange</LITERAL2>
- <LITERAL2>adRsnMoveFirst</LITERAL2>
- <LITERAL2>adRsnMoveNext</LITERAL2>
- <LITERAL2>adRsnMovePrevious</LITERAL2>
- <LITERAL2>adRsnMoveLast</LITERAL2>
--->
- <!-- SchemaEnum Values -->
-<!-- <LITERAL2>adSchemaProviderSpecific</LITERAL2>
- <LITERAL2>adSchemaAsserts</LITERAL2>
- <LITERAL2>adSchemaCatalogs</LITERAL2>
- <LITERAL2>adSchemaCharacterSets</LITERAL2>
- <LITERAL2>adSchemaCollations</LITERAL2>
- <LITERAL2>adSchemaColumns</LITERAL2>
- <LITERAL2>adSchemaCheckConstraints</LITERAL2>
- <LITERAL2>adSchemaConstraintColumnUsage</LITERAL2>
- <LITERAL2>adSchemaConstraintTableUsage</LITERAL2>
- <LITERAL2>adSchemaKeyColumnUsage</LITERAL2>
- <LITERAL2>adSchemaReferentialConstraints</LITERAL2>
- <LITERAL2>adSchemaTableConstraints</LITERAL2>
- <LITERAL2>adSchemaColumnsDomainUsage</LITERAL2>
- <LITERAL2>adSchemaIndexes</LITERAL2>
- <LITERAL2>adSchemaColumnPrivileges</LITERAL2>
- <LITERAL2>adSchemaTablePrivileges</LITERAL2>
- <LITERAL2>adSchemaUsagePrivileges</LITERAL2>
- <LITERAL2>adSchemaProcedures</LITERAL2>
- <LITERAL2>adSchemaSchemata</LITERAL2>
- <LITERAL2>adSchemaSQLLanguages</LITERAL2>
- <LITERAL2>adSchemaStatistics</LITERAL2>
- <LITERAL2>adSchemaTables</LITERAL2>
- <LITERAL2>adSchemaTranslations</LITERAL2>
- <LITERAL2>adSchemaProviderTypes</LITERAL2>
- <LITERAL2>adSchemaViews</LITERAL2>
- <LITERAL2>adSchemaViewColumnUsage</LITERAL2>
- <LITERAL2>adSchemaViewTableUsage</LITERAL2>
- <LITERAL2>adSchemaProcedureParameters</LITERAL2>
- <LITERAL2>adSchemaForeignKeys</LITERAL2>
- <LITERAL2>adSchemaPrimaryKeys</LITERAL2>
- <LITERAL2>adSchemaProcedureColumns</LITERAL2>
- <LITERAL2>adSchemaDBInfoKeywords</LITERAL2>
- <LITERAL2>adSchemaDBInfoLiterals</LITERAL2>
- <LITERAL2>adSchemaCubes</LITERAL2>
- <LITERAL2>adSchemaDimensions</LITERAL2>
- <LITERAL2>adSchemaHierarchies</LITERAL2>
- <LITERAL2>adSchemaLevels</LITERAL2>
- <LITERAL2>adSchemaMeasures</LITERAL2>
- <LITERAL2>adSchemaProperties</LITERAL2>
- <LITERAL2>adSchemaMembers</LITERAL2>
--->
- <!-- SeekEnum Values -->
-<!-- <LITERAL2>adSeekFirstEQ</LITERAL2>
- <LITERAL2>adSeekLastEQ</LITERAL2>
- <LITERAL2>adSeekAfterEQ</LITERAL2>
- <LITERAL2>adSeekAfter</LITERAL2>
- <LITERAL2>adSeekBeforeEQ</LITERAL2>
- <LITERAL2>adSeekBefore</LITERAL2>
--->
- <!-- ADCPROP_UPDATECRITERIA_ENUM Values -->
-<!-- <LITERAL2>adCriteriaKey</LITERAL2>
- <LITERAL2>adCriteriaAllCols</LITERAL2>
- <LITERAL2>adCriteriaUpdCols</LITERAL2>
- <LITERAL2>adCriteriaTimeStamp</LITERAL2>
--->
- <!-- ADCPROP_ASYNCTHREADPRIORITY_ENUM Values -->
-<!-- <LITERAL2>adPriorityLowest</LITERAL2>
- <LITERAL2>adPriorityBelowNormal</LITERAL2>
- <LITERAL2>adPriorityNormal</LITERAL2>
- <LITERAL2>adPriorityAboveNormal</LITERAL2>
- <LITERAL2>adPriorityHighest</LITERAL2>
--->
- <!-- CEResyncEnum Values -->
-<!-- <LITERAL2>adResyncNone</LITERAL2>
- <LITERAL2>adResyncAutoIncrement</LITERAL2>
- <LITERAL2>adResyncConflicts</LITERAL2>
- <LITERAL2>adResyncUpdates</LITERAL2>
- <LITERAL2>adResyncInserts</LITERAL2>
- <LITERAL2>adResyncAll</LITERAL2>
--->
- <!-- ADCPROP_AUTORECALC_ENUM Values -->
-<!-- <LITERAL2>adRecalcUpFront</LITERAL2>
- <LITERAL2>adRecalcAlways</LITERAL2>
--->
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- VBScript mode by Andre Kaplan -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="'" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- conditional compilation -->
+ <EOL_SPAN TYPE="KEYWORD2">#if</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#else</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD2">#end</EOL_SPAN>
+
+ <EOL_SPAN TYPE="COMMENT1">'</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">rem </EOL_SPAN>
+
+ <!-- Comparison operators -->
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">.</SEQ>
+ <!-- See in keywords: is -->
+
+ <!-- Arithmetic operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">\</SEQ>
+ <!-- See in keywords: mod -->
+ <SEQ TYPE="OPERATOR">^</SEQ>
+
+ <!-- Concatenation operators -->
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <!-- <SEQ TYPE="OPERATOR">+</SEQ> -->
+
+ <!-- Logical operators -->
+ <!-- See in keywords: and, or, not, xor, eqv -->
+
+ <!-- EOL Continuation -->
+<!-- <SEQ TYPE="NULL">_</SEQ>-->
+ <!-- Instruction separator -->
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <KEYWORDS>
+ <!-- Conditional Statements -->
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>elseif</KEYWORD1>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+
+ <!-- Loop Statements -->
+ <!-- For..Next -->
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>step</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <!-- For Each..Next -->
+ <KEYWORD1>each</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <!-- Do..Loop -->
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+ <!-- While..Wend -->
+ <KEYWORD1>wend</KEYWORD1>
+
+ <!-- Closing, Exit Statements -->
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+
+ <!-- Methods, Functions, Class, Properties, Variables -->
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>sub</KEYWORD1>
+ <KEYWORD1>class</KEYWORD1>
+ <KEYWORD1>property</KEYWORD1>
+ <KEYWORD1>get</KEYWORD1>
+ <KEYWORD1>let</KEYWORD1>
+ <KEYWORD1>set</KEYWORD1>
+
+ <!-- Parameters passing -->
+ <KEYWORD1>byval</KEYWORD1>
+ <KEYWORD1>byref</KEYWORD1>
+
+ <!-- Declaration -->
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>dim</KEYWORD1>
+ <KEYWORD1>redim</KEYWORD1>
+ <KEYWORD1>preserve</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+
+ <!-- Object Assignement/Instantiation -->
+ <KEYWORD1>set</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+
+ <!-- Visibility -->
+ <KEYWORD1>public</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>private</KEYWORD1>
+
+ <!-- Comments -->
+ <KEYWORD1>rem</KEYWORD1>
+
+ <!-- Function Call - Dynamic Evaluation -->
+ <KEYWORD1>call</KEYWORD1>
+ <KEYWORD1>execute</KEYWORD1>
+ <KEYWORD1>eval</KEYWORD1>
+
+ <!-- Miscellaneous -->
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>error</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>resume</KEYWORD1>
+ <KEYWORD1>option</KEYWORD1>
+ <KEYWORD1>explicit</KEYWORD1>
+ <KEYWORD1>erase</KEYWORD1>
+ <KEYWORD1>randomize</KEYWORD1>
+
+ <!-- Operators -->
+ <!-- Comparison operators -->
+ <OPERATOR>is</OPERATOR>
+ <!-- Arithmetic operators -->
+ <OPERATOR>mod</OPERATOR>
+ <!-- Logical operators -->
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+ <OPERATOR>xor</OPERATOR>
+ <OPERATOR>imp</OPERATOR>
+
+ <!-- Datatypes Constants/Literals -->
+ <KEYWORD3>false</KEYWORD3>
+ <KEYWORD3>true</KEYWORD3>
+ <KEYWORD3>empty</KEYWORD3>
+ <KEYWORD3>nothing</KEYWORD3>
+ <KEYWORD3>null</KEYWORD3>
+
+ <!-- VBScript Constants -->
+ <!-- Color constants -->
+ <LITERAL2>vbblack</LITERAL2>
+ <LITERAL2>vbred</LITERAL2>
+ <LITERAL2>vbgreen</LITERAL2>
+ <LITERAL2>vbyellow</LITERAL2>
+ <LITERAL2>vbblue</LITERAL2>
+ <LITERAL2>vbmagenta</LITERAL2>
+ <LITERAL2>vbcyan</LITERAL2>
+ <LITERAL2>vbwhite</LITERAL2>
+
+ <!-- Date & Time Constants -->
+<!-- <LITERAL2>vbSunday</LITERAL2>
+ <LITERAL2>vbMonday</LITERAL2>
+ <LITERAL2>vbTuesday</LITERAL2>
+ <LITERAL2>vbWednesday</LITERAL2>
+ <LITERAL2>vbThursday</LITERAL2>
+ <LITERAL2>vbFriday</LITERAL2>
+ <LITERAL2>vbSaturday</LITERAL2>
+ <LITERAL2>vbUseSystem</LITERAL2>
+ <LITERAL2>vbUseSystemDayOfWeek</LITERAL2>
+ <LITERAL2>vbFirstJan1</LITERAL2>
+ <LITERAL2>vbFirstFourDays</LITERAL2>
+ <LITERAL2>vbFirstFullWeek</LITERAL2>
+-->
+ <!-- Date Format Constants -->
+ <LITERAL2>vbGeneralDate</LITERAL2>
+ <LITERAL2>vbLongDate</LITERAL2>
+ <LITERAL2>vbShortDate</LITERAL2>
+ <LITERAL2>vbLongTime</LITERAL2>
+ <LITERAL2>vbShortTime</LITERAL2>
+
+ <!-- Miscellaneous -->
+ <LITERAL2>vbObjectError</LITERAL2>
+ <KEYWORD2>Err</KEYWORD2>
+
+ <!-- MsgBox Constants -->
+ <LITERAL2>vbOKOnly</LITERAL2>
+ <LITERAL2>vbOKCancel</LITERAL2>
+ <LITERAL2>vbAbortRetryIgnore</LITERAL2>
+ <LITERAL2>vbYesNoCancel</LITERAL2>
+ <LITERAL2>vbYesNo</LITERAL2>
+ <LITERAL2>vbRetryCancel</LITERAL2>
+ <LITERAL2>vbCritical</LITERAL2>
+ <LITERAL2>vbQuestion</LITERAL2>
+ <LITERAL2>vbExclamation</LITERAL2>
+ <LITERAL2>vbInformation</LITERAL2>
+ <LITERAL2>vbDefaultButton1</LITERAL2>
+ <LITERAL2>vbDefaultButton2</LITERAL2>
+ <LITERAL2>vbDefaultButton3</LITERAL2>
+ <LITERAL2>vbDefaultButton4</LITERAL2>
+ <LITERAL2>vbApplicationModal</LITERAL2>
+ <LITERAL2>vbSystemModal</LITERAL2>
+ <LITERAL2>vbOK</LITERAL2>
+ <LITERAL2>vbCancel</LITERAL2>
+ <LITERAL2>vbAbort</LITERAL2>
+ <LITERAL2>vbRetry</LITERAL2>
+ <LITERAL2>vbIgnore</LITERAL2>
+ <LITERAL2>vbYes</LITERAL2>
+ <LITERAL2>vbNo</LITERAL2>
+
+ <!-- Tristate Constants -->
+ <LITERAL2>vbUseDefault</LITERAL2>
+ <LITERAL2>vbTrue</LITERAL2>
+ <LITERAL2>vbFalse</LITERAL2>
+
+ <!-- String Constants -->
+ <LITERAL2>vbcr</LITERAL2>
+ <LITERAL2>vbcrlf</LITERAL2>
+ <LITERAL2>vbformfeed</LITERAL2>
+ <LITERAL2>vblf</LITERAL2>
+ <LITERAL2>vbnewline</LITERAL2>
+ <LITERAL2>vbnullchar</LITERAL2>
+ <LITERAL2>vbnullstring</LITERAL2>
+ <LITERAL2>vbtab</LITERAL2>
+ <LITERAL2>vbverticaltab</LITERAL2>
+ <!-- VarType Constants -->
+ <LITERAL2>vbempty</LITERAL2>
+ <LITERAL2>vbnull</LITERAL2>
+ <LITERAL2>vbinteger</LITERAL2>
+ <LITERAL2>vblong</LITERAL2>
+ <LITERAL2>vbsingle</LITERAL2>
+ <LITERAL2>vbdouble</LITERAL2>
+ <LITERAL2>vbcurrency</LITERAL2>
+ <LITERAL2>vbdate</LITERAL2>
+ <LITERAL2>vbstring</LITERAL2>
+ <LITERAL2>vbobject</LITERAL2>
+ <LITERAL2>vberror</LITERAL2>
+ <LITERAL2>vbboolean</LITERAL2>
+ <LITERAL2>vbvariant</LITERAL2>
+ <LITERAL2>vbdataobject</LITERAL2>
+ <LITERAL2>vbdecimal</LITERAL2>
+ <LITERAL2>vbbyte</LITERAL2>
+ <LITERAL2>vbarray</LITERAL2>
+
+ <!-- Built-in Functions -->
+ <!-- Array Handling -->
+ <KEYWORD2>array</KEYWORD2>
+ <KEYWORD2>lbound</KEYWORD2>
+ <KEYWORD2>ubound</KEYWORD2>
+ <!-- Conversion Functions (Variant) -->
+ <KEYWORD2>cbool</KEYWORD2>
+ <KEYWORD2>cbyte</KEYWORD2>
+ <KEYWORD2>ccur</KEYWORD2>
+ <KEYWORD2>cdate</KEYWORD2>
+ <KEYWORD2>cdbl</KEYWORD2>
+ <KEYWORD2>cint</KEYWORD2>
+ <KEYWORD2>clng</KEYWORD2>
+ <KEYWORD2>csng</KEYWORD2>
+ <KEYWORD2>cstr</KEYWORD2>
+ <!-- Conversion Functions (Radix) -->
+ <KEYWORD2>hex</KEYWORD2>
+ <KEYWORD2>oct</KEYWORD2>
+ <!-- Date/Time Functions -->
+ <KEYWORD2>date</KEYWORD2>
+ <KEYWORD2>time</KEYWORD2>
+ <KEYWORD2>dateadd</KEYWORD2>
+ <KEYWORD2>datediff</KEYWORD2>
+ <KEYWORD2>datepart</KEYWORD2>
+ <KEYWORD2>dateserial</KEYWORD2>
+ <KEYWORD2>datevalue</KEYWORD2>
+ <KEYWORD2>day</KEYWORD2>
+ <KEYWORD2>month</KEYWORD2>
+ <KEYWORD2>monthname</KEYWORD2>
+ <KEYWORD2>weekday</KEYWORD2>
+ <KEYWORD2>weekdayname</KEYWORD2>
+ <KEYWORD2>year</KEYWORD2>
+ <KEYWORD2>hour</KEYWORD2>
+ <KEYWORD2>minute</KEYWORD2>
+ <KEYWORD2>second</KEYWORD2>
+ <KEYWORD2>now</KEYWORD2>
+ <KEYWORD2>timeserial</KEYWORD2>
+ <KEYWORD2>timevalue</KEYWORD2>
+ <!-- Formatting Strings -->
+ <KEYWORD2>formatcurrency</KEYWORD2>
+ <KEYWORD2>formatdatetime</KEYWORD2>
+ <KEYWORD2>formatnumber</KEYWORD2>
+ <KEYWORD2>formatpercent</KEYWORD2>
+ <!-- Input/Output -->
+ <KEYWORD2>inputbox</KEYWORD2>
+ <KEYWORD2>loadpicture</KEYWORD2>
+ <KEYWORD2>msgbox</KEYWORD2>
+ <!-- Math Functions -->
+ <KEYWORD2>atn</KEYWORD2>
+ <KEYWORD2>cos</KEYWORD2>
+ <KEYWORD2>sin</KEYWORD2>
+ <KEYWORD2>tan</KEYWORD2>
+ <KEYWORD2>exp</KEYWORD2>
+ <KEYWORD2>log</KEYWORD2>
+ <KEYWORD2>sqr</KEYWORD2>
+ <KEYWORD2>rnd</KEYWORD2>
+ <!-- Miscellaneous -->
+ <KEYWORD2>rgb</KEYWORD2>
+ <!-- Objects -->
+ <KEYWORD2>createobject</KEYWORD2>
+ <KEYWORD2>getobject</KEYWORD2>
+ <KEYWORD2>getref</KEYWORD2>
+ <!-- Rounding -->
+ <KEYWORD2>abs</KEYWORD2>
+ <KEYWORD2>int</KEYWORD2>
+ <KEYWORD2>fix</KEYWORD2>
+ <KEYWORD2>round</KEYWORD2>
+ <KEYWORD2>sgn</KEYWORD2>
+ <!-- Script Engine ID -->
+ <KEYWORD2>scriptengine</KEYWORD2>
+ <KEYWORD2>scriptenginebuildversion</KEYWORD2>
+ <KEYWORD2>scriptenginemajorversion</KEYWORD2>
+ <KEYWORD2>scriptengineminorversion</KEYWORD2>
+ <!-- Strings -->
+ <KEYWORD2>asc</KEYWORD2>
+ <KEYWORD2>ascb</KEYWORD2>
+ <KEYWORD2>ascw</KEYWORD2>
+ <KEYWORD2>chr</KEYWORD2>
+ <KEYWORD2>chrb</KEYWORD2>
+ <KEYWORD2>chrw</KEYWORD2>
+ <KEYWORD2>filter</KEYWORD2>
+ <KEYWORD2>instr</KEYWORD2>
+ <KEYWORD2>instrb</KEYWORD2>
+ <KEYWORD2>instrrev</KEYWORD2>
+ <KEYWORD2>join</KEYWORD2>
+ <KEYWORD2>len</KEYWORD2>
+ <KEYWORD2>lenb</KEYWORD2>
+ <KEYWORD2>lcase</KEYWORD2>
+ <KEYWORD2>ucase</KEYWORD2>
+ <KEYWORD2>left</KEYWORD2>
+ <KEYWORD2>leftb</KEYWORD2>
+ <KEYWORD2>mid</KEYWORD2>
+ <KEYWORD2>midb</KEYWORD2>
+ <KEYWORD2>right</KEYWORD2>
+ <KEYWORD2>rightb</KEYWORD2>
+ <KEYWORD2>replace</KEYWORD2>
+ <KEYWORD2>space</KEYWORD2>
+ <KEYWORD2>split</KEYWORD2>
+ <KEYWORD2>strcomp</KEYWORD2>
+ <KEYWORD2>string</KEYWORD2>
+ <KEYWORD2>strreverse</KEYWORD2>
+ <KEYWORD2>ltrim</KEYWORD2>
+ <KEYWORD2>rtrim</KEYWORD2>
+ <KEYWORD2>trim</KEYWORD2>
+ <!-- Variants -->
+ <KEYWORD2>isarray</KEYWORD2>
+ <KEYWORD2>isdate</KEYWORD2>
+ <KEYWORD2>isempty</KEYWORD2>
+ <KEYWORD2>isnull</KEYWORD2>
+ <KEYWORD2>isnumeric</KEYWORD2>
+ <KEYWORD2>isobject</KEYWORD2>
+ <KEYWORD2>typename</KEYWORD2>
+ <KEYWORD2>vartype</KEYWORD2>
+
+ <!-- Comment/Uncomment your favorite ADO Constants-->
+
+ <!-- ADO Constants-->
+
+ <!-- CursorTypeEnum Values -->
+ <LITERAL2>adOpenForwardOnly</LITERAL2>
+ <LITERAL2>adOpenKeyset</LITERAL2>
+ <LITERAL2>adOpenDynamic</LITERAL2>
+ <LITERAL2>adOpenStatic</LITERAL2>
+
+ <!-- CursorOptionEnum Values -->
+<!-- <LITERAL2>adHoldRecords</LITERAL2>
+ <LITERAL2>adMovePrevious</LITERAL2>
+ <LITERAL2>adAddNew</LITERAL2>
+ <LITERAL2>adDelete</LITERAL2>
+ <LITERAL2>adUpdate</LITERAL2>
+ <LITERAL2>adBookmark</LITERAL2>
+ <LITERAL2>adApproxPosition</LITERAL2>
+ <LITERAL2>adUpdateBatch</LITERAL2>
+ <LITERAL2>adResync</LITERAL2>
+ <LITERAL2>adNotify</LITERAL2>
+ <LITERAL2>adFind</LITERAL2>
+ <LITERAL2>adSeek</LITERAL2>
+ <LITERAL2>adIndex</LITERAL2>
+-->
+ <!-- LockTypeEnum Values -->
+ <LITERAL2>adLockReadOnly</LITERAL2>
+ <LITERAL2>adLockPessimistic</LITERAL2>
+ <LITERAL2>adLockOptimistic</LITERAL2>
+ <LITERAL2>adLockBatchOptimistic</LITERAL2>
+
+ <!-- ExecuteOptionEnum Values -->
+ <LITERAL2>adRunAsync</LITERAL2>
+ <LITERAL2>adAsyncExecute</LITERAL2>
+ <LITERAL2>adAsyncFetch</LITERAL2>
+ <LITERAL2>adAsyncFetchNonBlocking</LITERAL2>
+ <LITERAL2>adExecuteNoRecords</LITERAL2>
+
+ <!-- ConnectOptionEnum Values -->
+<!-- <LITERAL2>adAsyncConnect</LITERAL2>
+-->
+ <!-- ObjectStateEnum Values -->
+ <LITERAL2>adStateClosed</LITERAL2>
+ <LITERAL2>adStateOpen</LITERAL2>
+ <LITERAL2>adStateConnecting</LITERAL2>
+ <LITERAL2>adStateExecuting</LITERAL2>
+ <LITERAL2>adStateFetching</LITERAL2>
+
+ <!-- CursorLocationEnum Values -->
+ <LITERAL2>adUseServer</LITERAL2>
+ <LITERAL2>adUseClient</LITERAL2>
+
+ <!-- DataTypeEnum Values -->
+ <LITERAL2>adEmpty</LITERAL2>
+ <LITERAL2>adTinyInt</LITERAL2>
+ <LITERAL2>adSmallInt</LITERAL2>
+ <LITERAL2>adInteger</LITERAL2>
+ <LITERAL2>adBigInt</LITERAL2>
+ <LITERAL2>adUnsignedTinyInt</LITERAL2>
+ <LITERAL2>adUnsignedSmallInt</LITERAL2>
+ <LITERAL2>adUnsignedInt</LITERAL2>
+ <LITERAL2>adUnsignedBigInt</LITERAL2>
+ <LITERAL2>adSingle</LITERAL2>
+ <LITERAL2>adDouble</LITERAL2>
+ <LITERAL2>adCurrency</LITERAL2>
+ <LITERAL2>adDecimal</LITERAL2>
+ <LITERAL2>adNumeric</LITERAL2>
+ <LITERAL2>adBoolean</LITERAL2>
+ <LITERAL2>adError</LITERAL2>
+ <LITERAL2>adUserDefined</LITERAL2>
+ <LITERAL2>adVariant</LITERAL2>
+ <LITERAL2>adIDispatch</LITERAL2>
+ <LITERAL2>adIUnknown</LITERAL2>
+ <LITERAL2>adGUID</LITERAL2>
+ <LITERAL2>adDate</LITERAL2>
+ <LITERAL2>adDBDate</LITERAL2>
+ <LITERAL2>adDBTime</LITERAL2>
+ <LITERAL2>adDBTimeStamp</LITERAL2>
+ <LITERAL2>adBSTR</LITERAL2>
+ <LITERAL2>adChar</LITERAL2>
+ <LITERAL2>adVarChar</LITERAL2>
+ <LITERAL2>adLongVarChar</LITERAL2>
+ <LITERAL2>adWChar</LITERAL2>
+ <LITERAL2>adVarWChar</LITERAL2>
+ <LITERAL2>adLongVarWChar</LITERAL2>
+ <LITERAL2>adBinary</LITERAL2>
+ <LITERAL2>adVarBinary</LITERAL2>
+ <LITERAL2>adLongVarBinary</LITERAL2>
+ <LITERAL2>adChapter</LITERAL2>
+ <LITERAL2>adFileTime</LITERAL2>
+ <LITERAL2>adDBFileTime</LITERAL2>
+ <LITERAL2>adPropVariant</LITERAL2>
+ <LITERAL2>adVarNumeric</LITERAL2>
+
+ <!-- FieldAttributeEnum Values -->
+<!-- <LITERAL2>adFldMayDefer</LITERAL2>
+ <LITERAL2>adFldUpdatable</LITERAL2>
+ <LITERAL2>adFldUnknownUpdatable</LITERAL2>
+ <LITERAL2>adFldFixed</LITERAL2>
+ <LITERAL2>adFldIsNullable</LITERAL2>
+ <LITERAL2>adFldMayBeNull</LITERAL2>
+ <LITERAL2>adFldLong</LITERAL2>
+ <LITERAL2>adFldRowID</LITERAL2>
+ <LITERAL2>adFldRowVersion</LITERAL2>
+ <LITERAL2>adFldCacheDeferred</LITERAL2>
+ <LITERAL2>adFldKeyColumn</LITERAL2>
+-->
+
+ <!-- EditModeEnum Values -->
+<!-- <LITERAL2>adEditNone</LITERAL2>
+ <LITERAL2>adEditInProgress</LITERAL2>
+ <LITERAL2>adEditAdd</LITERAL2>
+ <LITERAL2>adEditDelete</LITERAL2>
+-->
+ <!-- RecordStatusEnum Values -->
+<!-- <LITERAL2>adRecOK</LITERAL2>
+ <LITERAL2>adRecNew</LITERAL2>
+ <LITERAL2>adRecModified</LITERAL2>
+ <LITERAL2>adRecDeleted</LITERAL2>
+ <LITERAL2>adRecUnmodified</LITERAL2>
+ <LITERAL2>adRecInvalid</LITERAL2>
+ <LITERAL2>adRecMultipleChanges</LITERAL2>
+ <LITERAL2>adRecPendingChanges</LITERAL2>
+ <LITERAL2>adRecCanceled</LITERAL2>
+ <LITERAL2>adRecCantRelease</LITERAL2>
+ <LITERAL2>adRecConcurrencyViolation</LITERAL2>
+ <LITERAL2>adRecIntegrityViolation</LITERAL2>
+ <LITERAL2>adRecMaxChangesExceeded</LITERAL2>
+ <LITERAL2>adRecObjectOpen</LITERAL2>
+ <LITERAL2>adRecOutOfMemory</LITERAL2>
+ <LITERAL2>adRecPermissionDenied</LITERAL2>
+ <LITERAL2>adRecSchemaViolation</LITERAL2>
+ <LITERAL2>adRecDBDeleted</LITERAL2>
+-->
+ <!-- GetRowsOptionEnum Values -->
+<!-- <LITERAL2>adGetRowsRest</LITERAL2>
+-->
+
+ <!-- PositionEnum Values -->
+<!-- <LITERAL2>adPosUnknown</LITERAL2>
+ <LITERAL2>adPosBOF</LITERAL2>
+ <LITERAL2>adPosEOF</LITERAL2>
+-->
+
+ <!-- enum Values -->
+<!-- <LITERAL2>adBookmarkCurrent</LITERAL2>
+ <LITERAL2>adBookmarkFirst</LITERAL2>
+ <LITERAL2>adBookmarkLast</LITERAL2>
+-->
+ <!-- MarshalOptionsEnum Values -->
+<!-- <LITERAL2>adMarshalAll</LITERAL2>
+ <LITERAL2>adMarshalModifiedOnly</LITERAL2>
+-->
+ <!-- AffectEnum Values -->
+<!-- <LITERAL2>adAffectCurrent</LITERAL2>
+ <LITERAL2>adAffectGroup</LITERAL2>
+ <LITERAL2>adAffectAll</LITERAL2>
+ <LITERAL2>adAffectAllChapters</LITERAL2>
+-->
+
+ <!-- ResyncEnum Values -->
+<!-- <LITERAL2>adResyncUnderlyingValues</LITERAL2>
+ <LITERAL2>adResyncAllValues</LITERAL2>
+-->
+ <!-- CompareEnum Values -->
+<!-- <LITERAL2>adCompareLessThan</LITERAL2>
+ <LITERAL2>adCompareEqual</LITERAL2>
+ <LITERAL2>adCompareGreaterThan</LITERAL2>
+ <LITERAL2>adCompareNotEqual</LITERAL2>
+ <LITERAL2>adCompareNotComparable</LITERAL2>
+-->
+ <!-- FilterGroupEnum Values -->
+<!-- <LITERAL2>adFilterNone</LITERAL2>
+ <LITERAL2>adFilterPendingRecords</LITERAL2>
+ <LITERAL2>adFilterAffectedRecords</LITERAL2>
+ <LITERAL2>adFilterFetchedRecords</LITERAL2>
+ <LITERAL2>adFilterPredicate</LITERAL2>
+ <LITERAL2>adFilterConflictingRecords</LITERAL2>
+-->
+ <!-- SearchDirectionEnum Values -->
+<!-- <LITERAL2>adSearchForward</LITERAL2>
+ <LITERAL2>adSearchBackward</LITERAL2>
+-->
+
+ <!-- PersistFormatEnum Values -->
+ <LITERAL2>adPersistADTG</LITERAL2>
+ <LITERAL2>adPersistXML</LITERAL2>
+
+ <!-- StringFormatEnum Values -->
+<!-- <LITERAL2>adStringXML</LITERAL2>
+ <LITERAL2>adStringHTML</LITERAL2>
+ <LITERAL2>adClipString</LITERAL2>
+-->
+ <!-- ConnectPromptEnum Values -->
+<!-- <LITERAL2>adPromptAlways</LITERAL2>
+ <LITERAL2>adPromptComplete</LITERAL2>
+ <LITERAL2>adPromptCompleteRequired</LITERAL2>
+ <LITERAL2>adPromptNever</LITERAL2>
+-->
+ <!-- ConnectModeEnum Values -->
+<!-- <LITERAL2>adModeUnknown</LITERAL2>
+ <LITERAL2>adModeRead</LITERAL2>
+ <LITERAL2>adModeWrite</LITERAL2>
+ <LITERAL2>adModeReadWrite</LITERAL2>
+ <LITERAL2>adModeShareDenyRead</LITERAL2>
+ <LITERAL2>adModeShareDenyWrite</LITERAL2>
+ <LITERAL2>adModeShareExclusive</LITERAL2>
+ <LITERAL2>adModeShareDenyNone</LITERAL2>
+-->
+ <!-- IsolationLevelEnum Values -->
+<!-- <LITERAL2>adXactUnspecified</LITERAL2>
+ <LITERAL2>adXactChaos</LITERAL2>
+ <LITERAL2>adXactReadUncommitted</LITERAL2>
+ <LITERAL2>adXactBrowse</LITERAL2>
+ <LITERAL2>adXactCursorStability</LITERAL2>
+ <LITERAL2>adXactReadCommitted</LITERAL2>
+ <LITERAL2>adXactRepeatableRead</LITERAL2>
+ <LITERAL2>adXactSerializable</LITERAL2>
+ <LITERAL2>adXactIsolated</LITERAL2>
+-->
+ <!-- XactAttributeEnum Values -->
+<!-- <LITERAL2>adXactCommitRetaining</LITERAL2>
+ <LITERAL2>adXactAbortRetaining</LITERAL2>
+-->
+ <!-- PropertyAttributesEnum Values -->
+<!-- <LITERAL2>adPropNotSupported</LITERAL2>
+ <LITERAL2>adPropRequired</LITERAL2>
+ <LITERAL2>adPropOptional</LITERAL2>
+ <LITERAL2>adPropRead</LITERAL2>
+ <LITERAL2>adPropWrite</LITERAL2>
+-->
+ <!-- ErrorValueEnum Values -->
+<!-- <LITERAL2>adErrInvalidArgument</LITERAL2>
+ <LITERAL2>adErrNoCurrentRecord</LITERAL2>
+ <LITERAL2>adErrIllegalOperation</LITERAL2>
+ <LITERAL2>adErrInTransaction</LITERAL2>
+ <LITERAL2>adErrFeatureNotAvailable</LITERAL2>
+ <LITERAL2>adErrItemNotFound</LITERAL2>
+ <LITERAL2>adErrObjectInCollection</LITERAL2>
+ <LITERAL2>adErrObjectNotSet</LITERAL2>
+ <LITERAL2>adErrDataConversion</LITERAL2>
+ <LITERAL2>adErrObjectClosed</LITERAL2>
+ <LITERAL2>adErrObjectOpen</LITERAL2>
+ <LITERAL2>adErrProviderNotFound</LITERAL2>
+ <LITERAL2>adErrBoundToCommand</LITERAL2>
+ <LITERAL2>adErrInvalidParamInfo</LITERAL2>
+ <LITERAL2>adErrInvalidConnection</LITERAL2>
+ <LITERAL2>adErrNotReentrant</LITERAL2>
+ <LITERAL2>adErrStillExecuting</LITERAL2>
+ <LITERAL2>adErrOperationCancelled</LITERAL2>
+ <LITERAL2>adErrStillConnecting</LITERAL2>
+ <LITERAL2>adErrNotExecuting</LITERAL2>
+ <LITERAL2>adErrUnsafeOperation</LITERAL2>
+-->
+ <!-- ParameterAttributesEnum Values -->
+ <LITERAL2>adParamSigned</LITERAL2>
+ <LITERAL2>adParamNullable</LITERAL2>
+ <LITERAL2>adParamLong</LITERAL2>
+
+ <!-- ParameterDirectionEnum Values -->
+ <LITERAL2>adParamUnknown</LITERAL2>
+ <LITERAL2>adParamInput</LITERAL2>
+ <LITERAL2>adParamOutput</LITERAL2>
+ <LITERAL2>adParamInputOutput</LITERAL2>
+ <LITERAL2>adParamReturnValue</LITERAL2>
+
+ <!-- CommandTypeEnum Values -->
+ <LITERAL2>adCmdUnknown</LITERAL2>
+ <LITERAL2>adCmdText</LITERAL2>
+ <LITERAL2>adCmdTable</LITERAL2>
+ <LITERAL2>adCmdStoredProc</LITERAL2>
+ <LITERAL2>adCmdFile</LITERAL2>
+ <LITERAL2>adCmdTableDirect</LITERAL2>
+
+ <!-- EventStatusEnum Values -->
+<!-- <LITERAL2>adStatusOK</LITERAL2>
+ <LITERAL2>adStatusErrorsOccurred</LITERAL2>
+ <LITERAL2>adStatusCantDeny</LITERAL2>
+ <LITERAL2>adStatusCancel</LITERAL2>
+ <LITERAL2>adStatusUnwantedEvent</LITERAL2>
+-->
+ <!-- EventReasonEnum Values -->
+<!-- <LITERAL2>adRsnAddNew</LITERAL2>
+ <LITERAL2>adRsnDelete</LITERAL2>
+ <LITERAL2>adRsnUpdate</LITERAL2>
+ <LITERAL2>adRsnUndoUpdate</LITERAL2>
+ <LITERAL2>adRsnUndoAddNew</LITERAL2>
+ <LITERAL2>adRsnUndoDelete</LITERAL2>
+ <LITERAL2>adRsnRequery</LITERAL2>
+ <LITERAL2>adRsnResynch</LITERAL2>
+ <LITERAL2>adRsnClose</LITERAL2>
+ <LITERAL2>adRsnMove</LITERAL2>
+ <LITERAL2>adRsnFirstChange</LITERAL2>
+ <LITERAL2>adRsnMoveFirst</LITERAL2>
+ <LITERAL2>adRsnMoveNext</LITERAL2>
+ <LITERAL2>adRsnMovePrevious</LITERAL2>
+ <LITERAL2>adRsnMoveLast</LITERAL2>
+-->
+ <!-- SchemaEnum Values -->
+<!-- <LITERAL2>adSchemaProviderSpecific</LITERAL2>
+ <LITERAL2>adSchemaAsserts</LITERAL2>
+ <LITERAL2>adSchemaCatalogs</LITERAL2>
+ <LITERAL2>adSchemaCharacterSets</LITERAL2>
+ <LITERAL2>adSchemaCollations</LITERAL2>
+ <LITERAL2>adSchemaColumns</LITERAL2>
+ <LITERAL2>adSchemaCheckConstraints</LITERAL2>
+ <LITERAL2>adSchemaConstraintColumnUsage</LITERAL2>
+ <LITERAL2>adSchemaConstraintTableUsage</LITERAL2>
+ <LITERAL2>adSchemaKeyColumnUsage</LITERAL2>
+ <LITERAL2>adSchemaReferentialConstraints</LITERAL2>
+ <LITERAL2>adSchemaTableConstraints</LITERAL2>
+ <LITERAL2>adSchemaColumnsDomainUsage</LITERAL2>
+ <LITERAL2>adSchemaIndexes</LITERAL2>
+ <LITERAL2>adSchemaColumnPrivileges</LITERAL2>
+ <LITERAL2>adSchemaTablePrivileges</LITERAL2>
+ <LITERAL2>adSchemaUsagePrivileges</LITERAL2>
+ <LITERAL2>adSchemaProcedures</LITERAL2>
+ <LITERAL2>adSchemaSchemata</LITERAL2>
+ <LITERAL2>adSchemaSQLLanguages</LITERAL2>
+ <LITERAL2>adSchemaStatistics</LITERAL2>
+ <LITERAL2>adSchemaTables</LITERAL2>
+ <LITERAL2>adSchemaTranslations</LITERAL2>
+ <LITERAL2>adSchemaProviderTypes</LITERAL2>
+ <LITERAL2>adSchemaViews</LITERAL2>
+ <LITERAL2>adSchemaViewColumnUsage</LITERAL2>
+ <LITERAL2>adSchemaViewTableUsage</LITERAL2>
+ <LITERAL2>adSchemaProcedureParameters</LITERAL2>
+ <LITERAL2>adSchemaForeignKeys</LITERAL2>
+ <LITERAL2>adSchemaPrimaryKeys</LITERAL2>
+ <LITERAL2>adSchemaProcedureColumns</LITERAL2>
+ <LITERAL2>adSchemaDBInfoKeywords</LITERAL2>
+ <LITERAL2>adSchemaDBInfoLiterals</LITERAL2>
+ <LITERAL2>adSchemaCubes</LITERAL2>
+ <LITERAL2>adSchemaDimensions</LITERAL2>
+ <LITERAL2>adSchemaHierarchies</LITERAL2>
+ <LITERAL2>adSchemaLevels</LITERAL2>
+ <LITERAL2>adSchemaMeasures</LITERAL2>
+ <LITERAL2>adSchemaProperties</LITERAL2>
+ <LITERAL2>adSchemaMembers</LITERAL2>
+-->
+ <!-- SeekEnum Values -->
+<!-- <LITERAL2>adSeekFirstEQ</LITERAL2>
+ <LITERAL2>adSeekLastEQ</LITERAL2>
+ <LITERAL2>adSeekAfterEQ</LITERAL2>
+ <LITERAL2>adSeekAfter</LITERAL2>
+ <LITERAL2>adSeekBeforeEQ</LITERAL2>
+ <LITERAL2>adSeekBefore</LITERAL2>
+-->
+ <!-- ADCPROP_UPDATECRITERIA_ENUM Values -->
+<!-- <LITERAL2>adCriteriaKey</LITERAL2>
+ <LITERAL2>adCriteriaAllCols</LITERAL2>
+ <LITERAL2>adCriteriaUpdCols</LITERAL2>
+ <LITERAL2>adCriteriaTimeStamp</LITERAL2>
+-->
+ <!-- ADCPROP_ASYNCTHREADPRIORITY_ENUM Values -->
+<!-- <LITERAL2>adPriorityLowest</LITERAL2>
+ <LITERAL2>adPriorityBelowNormal</LITERAL2>
+ <LITERAL2>adPriorityNormal</LITERAL2>
+ <LITERAL2>adPriorityAboveNormal</LITERAL2>
+ <LITERAL2>adPriorityHighest</LITERAL2>
+-->
+ <!-- CEResyncEnum Values -->
+<!-- <LITERAL2>adResyncNone</LITERAL2>
+ <LITERAL2>adResyncAutoIncrement</LITERAL2>
+ <LITERAL2>adResyncConflicts</LITERAL2>
+ <LITERAL2>adResyncUpdates</LITERAL2>
+ <LITERAL2>adResyncInserts</LITERAL2>
+ <LITERAL2>adResyncAll</LITERAL2>
+-->
+ <!-- ADCPROP_AUTORECALC_ENUM Values -->
+<!-- <LITERAL2>adRecalcUpFront</LITERAL2>
+ <LITERAL2>adRecalcAlways</LITERAL2>
+-->
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/velocity.xml b/jEdit/modes/velocity.xml
index 876ff54..120c882 100644
--- a/jEdit/modes/velocity.xml
+++ b/jEdit/modes/velocity.xml
@@ -1,115 +1,115 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="#*" />
- <PROPERTY NAME="commentEnd" VALUE="*#" />
- <PROPERTY NAME="lineComment" VALUE="##" />
- <!-- Auto indent -->
- <PROPERTY NAME="indentNextLines" VALUE="^\s*(#(foreach|if|elseif|else))\s*\(.*\)\s*"/>
- <PROPERTY NAME="unindentThisLine" VALUE="^\s*#(end|elseif|else)\b.*"/>
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="html::TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- <IMPORT DELEGATE="VELOCITY" />
- </RULES>
-
- <RULES SET="VELOCITY">
- <SPAN TYPE="COMMENT2">
- <BEGIN>#*</BEGIN>
- <END>*#</END>
- </SPAN>
-
- <EOL_SPAN TYPE="COMMENT3">##</EOL_SPAN>
-
- <SPAN TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
-
- <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3"
- >\$!?[A-z][A-z0-9._-]*</SEQ_REGEXP>
-
- <KEYWORDS>
- <KEYWORD1>#set</KEYWORD1>
- <KEYWORD1>#foreach</KEYWORD1>
- <KEYWORD1>#end</KEYWORD1>
- <KEYWORD1>#if</KEYWORD1>
- <KEYWORD1>#else</KEYWORD1>
- <KEYWORD1>#elseif</KEYWORD1>
- <KEYWORD1>#parse</KEYWORD1>
- <KEYWORD1>#macro</KEYWORD1>
- <KEYWORD1>#stop</KEYWORD1>
- <KEYWORD1>#include</KEYWORD1>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
- <SEQ TYPE="MARKUP" DELEGATE="JAVASCRIPT2">></SEQ>
- <!-- handle <SCRIPT SRC="..."> properly -->
- <SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
- </RULES>
-
- <RULES SET="JAVASCRIPT2"
- IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
-
- <IMPORT DELEGATE="VELOCITY" />
- <IMPORT DELEGATE="javascript::MAIN" />
- </RULES>
-
- <RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
- <SEQ TYPE="MARKUP" DELEGATE="MAIN">></SEQ>
- </RULES>
-
- <RULES SET="CSS" DEFAULT="MARKUP">
- <SEQ TYPE="MARKUP" DELEGATE="CSS2">></SEQ>
- </RULES>
-
- <RULES SET="CSS2"
- IGNORE_CASE="TRUE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="[\p{Digit}]+(pt|pc|in|mm|cm|em|ex|px|ms|s|%)"
- NO_WORD_SEP="-_">
-
- <IMPORT DELEGATE="VELOCITY" />
- <IMPORT DELEGATE="css::MAIN" />
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="#*" />
+ <PROPERTY NAME="commentEnd" VALUE="*#" />
+ <PROPERTY NAME="lineComment" VALUE="##" />
+ <!-- Auto indent -->
+ <PROPERTY NAME="indentNextLines" VALUE="^\s*(#(foreach|if|elseif|else))\s*\(.*\)\s*"/>
+ <PROPERTY NAME="unindentThisLine" VALUE="^\s*#(end|elseif|else)\b.*"/>
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="html::TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ <IMPORT DELEGATE="VELOCITY" />
+ </RULES>
+
+ <RULES SET="VELOCITY">
+ <SPAN TYPE="COMMENT2">
+ <BEGIN>#*</BEGIN>
+ <END>*#</END>
+ </SPAN>
+
+ <EOL_SPAN TYPE="COMMENT3">##</EOL_SPAN>
+
+ <SPAN TYPE="KEYWORD3" NO_LINE_BREAK="TRUE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3"
+ >\$!?[A-z][A-z0-9._-]*</SEQ_REGEXP>
+
+ <KEYWORDS>
+ <KEYWORD1>#set</KEYWORD1>
+ <KEYWORD1>#foreach</KEYWORD1>
+ <KEYWORD1>#end</KEYWORD1>
+ <KEYWORD1>#if</KEYWORD1>
+ <KEYWORD1>#else</KEYWORD1>
+ <KEYWORD1>#elseif</KEYWORD1>
+ <KEYWORD1>#parse</KEYWORD1>
+ <KEYWORD1>#macro</KEYWORD1>
+ <KEYWORD1>#stop</KEYWORD1>
+ <KEYWORD1>#include</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
+ <SEQ TYPE="MARKUP" DELEGATE="JAVASCRIPT2">></SEQ>
+ <!-- handle <SCRIPT SRC="..."> properly -->
+ <SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
+ </RULES>
+
+ <RULES SET="JAVASCRIPT2"
+ IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
+
+ <IMPORT DELEGATE="VELOCITY" />
+ <IMPORT DELEGATE="javascript::MAIN" />
+ </RULES>
+
+ <RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="MAIN">></SEQ>
+ </RULES>
+
+ <RULES SET="CSS" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="CSS2">></SEQ>
+ </RULES>
+
+ <RULES SET="CSS2"
+ IGNORE_CASE="TRUE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="[\p{Digit}]+(pt|pc|in|mm|cm|em|ex|px|ms|s|%)"
+ NO_WORD_SEP="-_">
+
+ <IMPORT DELEGATE="VELOCITY" />
+ <IMPORT DELEGATE="css::MAIN" />
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/verilog.xml b/jEdit/modes/verilog.xml
index 96e0a6b..b4329a6 100644
--- a/jEdit/modes/verilog.xml
+++ b/jEdit/modes/verilog.xml
@@ -1,219 +1,219 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- Written By: Wojciech Stryjewski - thvortex at sourceforge.net -->
-
-<MODE>
- <PROPS>
- <!-- Rules for indenting:
- - Case expressions (a line ending with colon) are indented
- - Keywords begin, module, task, etc. always indented
- - Keywords if, while, etc. indent only if ; not on the same line
- -->
- <PROPERTY NAME="indentNextLines" VALUE="(.*:\s*)|(\s*(begin|fork|task|table|specify|primitive|module|generate|function|case[xz]?)\b.*)|(\s*(always|if|else|for|forever|initial|repeat|while)\b[^;]*)" />
-
- <PROPERTY NAME="commentStart" VALUE="/*" />
- <PROPERTY NAME="commentEnd" VALUE="*/" />
- <PROPERTY NAME="lineComment" VALUE="//" />
- <PROPERTY NAME="noWordSep" VALUE="_'" />
- <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
- </PROPS>
- <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="([\p{Digit}]|_)+" NO_WORD_SEP="'">
- <!-- Comments -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>/*</BEGIN>
- <END>*/</END>
- </SPAN>
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
-
- <!--String Literals -->
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SEQ TYPE="DIGIT">'d</SEQ>
- <SEQ TYPE="DIGIT">'h</SEQ>
- <SEQ TYPE="DIGIT">'b</SEQ>
- <SEQ TYPE="DIGIT">'o</SEQ>
-
- <!-- Function calls, module instantiation, system tasks with args -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <!-- Operators -->
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">%</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <SEQ TYPE="OPERATOR">~</SEQ>
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
-
- <KEYWORDS>
- <!-- Regular Keywords -->
- <KEYWORD1>always</KEYWORD1>
- <KEYWORD1>assign</KEYWORD1>
- <KEYWORD1>begin</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>casex</KEYWORD1>
- <KEYWORD1>casez</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>deassign</KEYWORD1>
- <KEYWORD1>disable</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>endcase</KEYWORD1>
- <KEYWORD1>endfunction</KEYWORD1>
- <KEYWORD1>endgenerate</KEYWORD1>
- <KEYWORD1>endmodule</KEYWORD1>
- <KEYWORD1>endprimitive</KEYWORD1>
- <KEYWORD1>endspecify</KEYWORD1>
- <KEYWORD1>endtable</KEYWORD1>
- <KEYWORD1>endtask</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>force</KEYWORD1>
- <KEYWORD1>forever</KEYWORD1>
- <KEYWORD1>fork</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>generate</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>initial</KEYWORD1>
- <KEYWORD1>join</KEYWORD1>
- <KEYWORD1>macromodule</KEYWORD1>
- <KEYWORD1>module</KEYWORD1>
- <KEYWORD1>negedge</KEYWORD1>
- <KEYWORD1>posedge</KEYWORD1>
- <KEYWORD1>primitive</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>release</KEYWORD1>
- <KEYWORD1>specify</KEYWORD1>
- <KEYWORD1>table</KEYWORD1>
- <KEYWORD1>task</KEYWORD1>
- <KEYWORD1>wait</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
- <!-- Compiler Directives -->
- <KEYWORD2>`include</KEYWORD2>
- <KEYWORD2>`define</KEYWORD2>
- <KEYWORD2>`undef</KEYWORD2>
- <KEYWORD2>`ifdef</KEYWORD2>
- <KEYWORD2>`ifndef</KEYWORD2>
- <KEYWORD2>`else</KEYWORD2>
- <KEYWORD2>`endif</KEYWORD2>
- <KEYWORD2>`timescale</KEYWORD2>
- <KEYWORD2>`resetall</KEYWORD2>
- <KEYWORD2>`signed</KEYWORD2>
- <KEYWORD2>`unsigned</KEYWORD2>
- <KEYWORD2>`celldefine</KEYWORD2>
- <KEYWORD2>`endcelldefine</KEYWORD2>
- <KEYWORD2>`default_nettype</KEYWORD2>
- <KEYWORD2>`unconnected_drive</KEYWORD2>
- <KEYWORD2>`nounconnected_drive</KEYWORD2>
- <KEYWORD2>`protect</KEYWORD2>
- <KEYWORD2>`endprotect</KEYWORD2>
- <KEYWORD2>`protected</KEYWORD2>
- <KEYWORD2>`endprotected</KEYWORD2>
- <KEYWORD2>`remove_gatename</KEYWORD2>
- <KEYWORD2>`noremove_gatename</KEYWORD2>
- <KEYWORD2>`remove_netname</KEYWORD2>
- <KEYWORD2>`noremove_netname</KEYWORD2>
- <KEYWORD2>`expand_vectornets</KEYWORD2>
- <KEYWORD2>`noexpand_vectornets</KEYWORD2>
- <KEYWORD2>`autoexpand_vectornets</KEYWORD2>
-
- <!-- Type Declaration Keywords -->
- <KEYWORD3>integer</KEYWORD3>
- <KEYWORD3>reg</KEYWORD3>
- <KEYWORD3>time</KEYWORD3>
- <KEYWORD3>realtime</KEYWORD3>
- <KEYWORD3>defparam</KEYWORD3>
- <KEYWORD3>parameter</KEYWORD3>
- <KEYWORD3>event</KEYWORD3>
- <KEYWORD3>wire</KEYWORD3>
- <KEYWORD3>wand</KEYWORD3>
- <KEYWORD3>wor</KEYWORD3>
- <KEYWORD3>tri</KEYWORD3>
- <KEYWORD3>triand</KEYWORD3>
- <KEYWORD3>trior</KEYWORD3>
- <KEYWORD3>tri0</KEYWORD3>
- <KEYWORD3>tri1</KEYWORD3>
- <KEYWORD3>trireg</KEYWORD3>
- <KEYWORD3>vectored</KEYWORD3>
- <KEYWORD3>scalared</KEYWORD3>
- <KEYWORD3>input</KEYWORD3>
- <KEYWORD3>output</KEYWORD3>
- <KEYWORD3>inout</KEYWORD3>
-
- <!-- Signal Strengths -->
- <KEYWORD3>supply0</KEYWORD3>
- <KEYWORD3>supply1</KEYWORD3>
- <KEYWORD3>strong0</KEYWORD3>
- <KEYWORD3>strong1</KEYWORD3>
- <KEYWORD3>pull0</KEYWORD3>
- <KEYWORD3>pull1</KEYWORD3>
- <KEYWORD3>weak0</KEYWORD3>
- <KEYWORD3>weak1</KEYWORD3>
- <KEYWORD3>highz0</KEYWORD3>
- <KEYWORD3>highz1</KEYWORD3>
- <KEYWORD3>small</KEYWORD3>
- <KEYWORD3>medium</KEYWORD3>
- <KEYWORD3>large</KEYWORD3>
-
- <!-- System Tasks With No/Optional Arguments -->
- <FUNCTION>$stop</FUNCTION>
- <FUNCTION>$finish</FUNCTION>
- <FUNCTION>$time</FUNCTION>
- <FUNCTION>$stime</FUNCTION>
- <FUNCTION>$realtime</FUNCTION>
- <FUNCTION>$settrace</FUNCTION>
- <FUNCTION>$cleartrace</FUNCTION>
- <FUNCTION>$showscopes</FUNCTION>
- <FUNCTION>$showvars</FUNCTION>
- <FUNCTION>$monitoron</FUNCTION>
- <FUNCTION>$monitoroff</FUNCTION>
- <FUNCTION>$random</FUNCTION>
- <FUNCTION>$printtimescale</FUNCTION>
- <FUNCTION>$timeformat</FUNCTION>
-
- <!-- Built-in primitives -->
- <FUNCTION>and</FUNCTION>
- <FUNCTION>nand</FUNCTION>
- <FUNCTION>or</FUNCTION>
- <FUNCTION>nor</FUNCTION>
- <FUNCTION>xor</FUNCTION>
- <FUNCTION>xnor</FUNCTION>
- <FUNCTION>buf</FUNCTION>
- <FUNCTION>bufif0</FUNCTION>
- <FUNCTION>bufif1</FUNCTION>
- <FUNCTION>not</FUNCTION>
- <FUNCTION>notif0</FUNCTION>
- <FUNCTION>notif1</FUNCTION>
- <FUNCTION>nmos</FUNCTION>
- <FUNCTION>pmos</FUNCTION>
- <FUNCTION>cmos</FUNCTION>
- <FUNCTION>rnmos</FUNCTION>
- <FUNCTION>rpmos</FUNCTION>
- <FUNCTION>rcmos</FUNCTION>
- <FUNCTION>tran</FUNCTION>
- <FUNCTION>tranif0</FUNCTION>
- <FUNCTION>tranif1</FUNCTION>
- <FUNCTION>rtran</FUNCTION>
- <FUNCTION>rtranif0</FUNCTION>
- <FUNCTION>rtranif1</FUNCTION>
- <FUNCTION>pullup</FUNCTION>
- <FUNCTION>pulldown</FUNCTION>
- </KEYWORDS>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Written By: Wojciech Stryjewski - thvortex at sourceforge.net -->
+
+<MODE>
+ <PROPS>
+ <!-- Rules for indenting:
+ - Case expressions (a line ending with colon) are indented
+ - Keywords begin, module, task, etc. always indented
+ - Keywords if, while, etc. indent only if ; not on the same line
+ -->
+ <PROPERTY NAME="indentNextLines" VALUE="(.*:\s*)|(\s*(begin|fork|task|table|specify|primitive|module|generate|function|case[xz]?)\b.*)|(\s*(always|if|else|for|forever|initial|repeat|while)\b[^;]*)" />
+
+ <PROPERTY NAME="commentStart" VALUE="/*" />
+ <PROPERTY NAME="commentEnd" VALUE="*/" />
+ <PROPERTY NAME="lineComment" VALUE="//" />
+ <PROPERTY NAME="noWordSep" VALUE="_'" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ </PROPS>
+ <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="([\p{Digit}]|_)+" NO_WORD_SEP="'">
+ <!-- Comments -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>/*</BEGIN>
+ <END>*/</END>
+ </SPAN>
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+
+ <!--String Literals -->
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SEQ TYPE="DIGIT">'d</SEQ>
+ <SEQ TYPE="DIGIT">'h</SEQ>
+ <SEQ TYPE="DIGIT">'b</SEQ>
+ <SEQ TYPE="DIGIT">'o</SEQ>
+
+ <!-- Function calls, module instantiation, system tasks with args -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <!-- Operators -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">%</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <SEQ TYPE="OPERATOR">~</SEQ>
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+
+ <KEYWORDS>
+ <!-- Regular Keywords -->
+ <KEYWORD1>always</KEYWORD1>
+ <KEYWORD1>assign</KEYWORD1>
+ <KEYWORD1>begin</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>casex</KEYWORD1>
+ <KEYWORD1>casez</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>deassign</KEYWORD1>
+ <KEYWORD1>disable</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>endcase</KEYWORD1>
+ <KEYWORD1>endfunction</KEYWORD1>
+ <KEYWORD1>endgenerate</KEYWORD1>
+ <KEYWORD1>endmodule</KEYWORD1>
+ <KEYWORD1>endprimitive</KEYWORD1>
+ <KEYWORD1>endspecify</KEYWORD1>
+ <KEYWORD1>endtable</KEYWORD1>
+ <KEYWORD1>endtask</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>force</KEYWORD1>
+ <KEYWORD1>forever</KEYWORD1>
+ <KEYWORD1>fork</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>generate</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>initial</KEYWORD1>
+ <KEYWORD1>join</KEYWORD1>
+ <KEYWORD1>macromodule</KEYWORD1>
+ <KEYWORD1>module</KEYWORD1>
+ <KEYWORD1>negedge</KEYWORD1>
+ <KEYWORD1>posedge</KEYWORD1>
+ <KEYWORD1>primitive</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>release</KEYWORD1>
+ <KEYWORD1>specify</KEYWORD1>
+ <KEYWORD1>table</KEYWORD1>
+ <KEYWORD1>task</KEYWORD1>
+ <KEYWORD1>wait</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+ <!-- Compiler Directives -->
+ <KEYWORD2>`include</KEYWORD2>
+ <KEYWORD2>`define</KEYWORD2>
+ <KEYWORD2>`undef</KEYWORD2>
+ <KEYWORD2>`ifdef</KEYWORD2>
+ <KEYWORD2>`ifndef</KEYWORD2>
+ <KEYWORD2>`else</KEYWORD2>
+ <KEYWORD2>`endif</KEYWORD2>
+ <KEYWORD2>`timescale</KEYWORD2>
+ <KEYWORD2>`resetall</KEYWORD2>
+ <KEYWORD2>`signed</KEYWORD2>
+ <KEYWORD2>`unsigned</KEYWORD2>
+ <KEYWORD2>`celldefine</KEYWORD2>
+ <KEYWORD2>`endcelldefine</KEYWORD2>
+ <KEYWORD2>`default_nettype</KEYWORD2>
+ <KEYWORD2>`unconnected_drive</KEYWORD2>
+ <KEYWORD2>`nounconnected_drive</KEYWORD2>
+ <KEYWORD2>`protect</KEYWORD2>
+ <KEYWORD2>`endprotect</KEYWORD2>
+ <KEYWORD2>`protected</KEYWORD2>
+ <KEYWORD2>`endprotected</KEYWORD2>
+ <KEYWORD2>`remove_gatename</KEYWORD2>
+ <KEYWORD2>`noremove_gatename</KEYWORD2>
+ <KEYWORD2>`remove_netname</KEYWORD2>
+ <KEYWORD2>`noremove_netname</KEYWORD2>
+ <KEYWORD2>`expand_vectornets</KEYWORD2>
+ <KEYWORD2>`noexpand_vectornets</KEYWORD2>
+ <KEYWORD2>`autoexpand_vectornets</KEYWORD2>
+
+ <!-- Type Declaration Keywords -->
+ <KEYWORD3>integer</KEYWORD3>
+ <KEYWORD3>reg</KEYWORD3>
+ <KEYWORD3>time</KEYWORD3>
+ <KEYWORD3>realtime</KEYWORD3>
+ <KEYWORD3>defparam</KEYWORD3>
+ <KEYWORD3>parameter</KEYWORD3>
+ <KEYWORD3>event</KEYWORD3>
+ <KEYWORD3>wire</KEYWORD3>
+ <KEYWORD3>wand</KEYWORD3>
+ <KEYWORD3>wor</KEYWORD3>
+ <KEYWORD3>tri</KEYWORD3>
+ <KEYWORD3>triand</KEYWORD3>
+ <KEYWORD3>trior</KEYWORD3>
+ <KEYWORD3>tri0</KEYWORD3>
+ <KEYWORD3>tri1</KEYWORD3>
+ <KEYWORD3>trireg</KEYWORD3>
+ <KEYWORD3>vectored</KEYWORD3>
+ <KEYWORD3>scalared</KEYWORD3>
+ <KEYWORD3>input</KEYWORD3>
+ <KEYWORD3>output</KEYWORD3>
+ <KEYWORD3>inout</KEYWORD3>
+
+ <!-- Signal Strengths -->
+ <KEYWORD3>supply0</KEYWORD3>
+ <KEYWORD3>supply1</KEYWORD3>
+ <KEYWORD3>strong0</KEYWORD3>
+ <KEYWORD3>strong1</KEYWORD3>
+ <KEYWORD3>pull0</KEYWORD3>
+ <KEYWORD3>pull1</KEYWORD3>
+ <KEYWORD3>weak0</KEYWORD3>
+ <KEYWORD3>weak1</KEYWORD3>
+ <KEYWORD3>highz0</KEYWORD3>
+ <KEYWORD3>highz1</KEYWORD3>
+ <KEYWORD3>small</KEYWORD3>
+ <KEYWORD3>medium</KEYWORD3>
+ <KEYWORD3>large</KEYWORD3>
+
+ <!-- System Tasks With No/Optional Arguments -->
+ <FUNCTION>$stop</FUNCTION>
+ <FUNCTION>$finish</FUNCTION>
+ <FUNCTION>$time</FUNCTION>
+ <FUNCTION>$stime</FUNCTION>
+ <FUNCTION>$realtime</FUNCTION>
+ <FUNCTION>$settrace</FUNCTION>
+ <FUNCTION>$cleartrace</FUNCTION>
+ <FUNCTION>$showscopes</FUNCTION>
+ <FUNCTION>$showvars</FUNCTION>
+ <FUNCTION>$monitoron</FUNCTION>
+ <FUNCTION>$monitoroff</FUNCTION>
+ <FUNCTION>$random</FUNCTION>
+ <FUNCTION>$printtimescale</FUNCTION>
+ <FUNCTION>$timeformat</FUNCTION>
+
+ <!-- Built-in primitives -->
+ <FUNCTION>and</FUNCTION>
+ <FUNCTION>nand</FUNCTION>
+ <FUNCTION>or</FUNCTION>
+ <FUNCTION>nor</FUNCTION>
+ <FUNCTION>xor</FUNCTION>
+ <FUNCTION>xnor</FUNCTION>
+ <FUNCTION>buf</FUNCTION>
+ <FUNCTION>bufif0</FUNCTION>
+ <FUNCTION>bufif1</FUNCTION>
+ <FUNCTION>not</FUNCTION>
+ <FUNCTION>notif0</FUNCTION>
+ <FUNCTION>notif1</FUNCTION>
+ <FUNCTION>nmos</FUNCTION>
+ <FUNCTION>pmos</FUNCTION>
+ <FUNCTION>cmos</FUNCTION>
+ <FUNCTION>rnmos</FUNCTION>
+ <FUNCTION>rpmos</FUNCTION>
+ <FUNCTION>rcmos</FUNCTION>
+ <FUNCTION>tran</FUNCTION>
+ <FUNCTION>tranif0</FUNCTION>
+ <FUNCTION>tranif1</FUNCTION>
+ <FUNCTION>rtran</FUNCTION>
+ <FUNCTION>rtranif0</FUNCTION>
+ <FUNCTION>rtranif1</FUNCTION>
+ <FUNCTION>pullup</FUNCTION>
+ <FUNCTION>pulldown</FUNCTION>
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/modes/vhdl.xml b/jEdit/modes/vhdl.xml
index b04913c..c5d02db 100644
--- a/jEdit/modes/vhdl.xml
+++ b/jEdit/modes/vhdl.xml
@@ -1,457 +1,457 @@
-<?xml version="1.0"?>
-<!--
- contributed by M. Cesar R. Lacruz (mcesar at sec.upm.es)
- v1.1 2008/08/29
- from previous work by Dante Fabrizio and Nitsan Vardi
--->
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="label" VALUE="VHDL" />
- <PROPERTY NAME="lineComment" VALUE="--" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
-
- <!-- string -->
- <SPAN_REGEXP TYPE="LITERAL4" AT_WORD_START="TRUE" NO_LINE_BREAK="TRUE">
- <BEGIN>[box]?"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="LITERAL4" AT_WORD_START="TRUE" NO_LINE_BREAK="TRUE">
- <BEGIN>[box]?%</BEGIN>
- <END>%</END>
- </SPAN_REGEXP>
-
- <!-- char -->
- <SEQ_REGEXP TYPE="LITERAL1" HASH_CHAR="'">(?:'[\x20-\x7e\xa0-\xff]')</SEQ_REGEXP>
-
- <!-- predefined attribute -->
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'left\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'right\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'low\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'high\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'ascending\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'image\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'value\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'pos\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'val\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'succ\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'pred\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'leftof\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'rightof\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'base\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'delayed\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'stable\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'quiet\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'transaction\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'event\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'active\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'last_event\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'last_active\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'last_value\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'driving\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'driving_value\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'range\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'reverse_range\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'length\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'simple_name\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'path_name\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'instance_name\b</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'foreign\b</SEQ_REGEXP>
-
- <!-- other attribute -->
- <MARK_FOLLOWING TYPE="KEYWORD4" MATCH_TYPE="KEYWORD3">'</MARK_FOLLOWING>
-
- <!-- comment -->
- <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
-
- <!-- label -->
- <!-- sorry, but 'label : component_name', 'label : procedure_name'
- & 'label : variable :=' are not managed, as they collide with
- 'generic_name : generic_type' -->
- <SEQ_REGEXP TYPE="LABEL" AT_WHITESPACE_END="TRUE">(\w|\w[\w\d_]*[\w\d])\s*(?=:)(?!:=)(?!:\s*\d)(?=:\s*(if\b|case\b|while\b|for\b|loop\b|next\b|null\b|block\b|process\b|wait\b|postponed\b|assert\b|with\b|entity\b|component\b|configuration\b|exit\b|return\b|(?:(?:\w[\w\d_]*\w|\w)\s*<=)))</SEQ_REGEXP>
-
- <!-- operator -->
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">=></SEQ>
- <SEQ TYPE="OPERATOR">**</SEQ>
- <SEQ TYPE="OPERATOR">:=</SEQ>
- <SEQ TYPE="OPERATOR">/=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">&</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
-
- <!-- number -->
- <SEQ_REGEXP TYPE="DIGIT" AT_WORD_START="TRUE"
- >\d{1,2}#(?:(?:[\da-f][\da-f_]*\.?[\da-f_]*[\da-f])|[\da-f])#(?:e[+-]?(?:\d[\d_]*\d|\d))?</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="DIGIT" AT_WORD_START="TRUE"
- >\d{1,2}:(?:(?:[\da-f][\da-f_]*\.?[\da-f_]*[\da-f])|[\da-f]):(?:e[+-]?(?:\d[\d_]*\d|\d))?</SEQ_REGEXP>
- <SEQ_REGEXP TYPE="DIGIT" AT_WORD_START="TRUE"
- >(?:(?:\d[\d_]*\.?[\d_]*\d)|\d)(?:e[+-]?(?:\d[\d_]*\d|\d))?</SEQ_REGEXP>
-
- <KEYWORDS>
- <!-- VHDL-87 keyword -->
- <KEYWORD1>access</KEYWORD1>
- <KEYWORD1>after</KEYWORD1>
- <KEYWORD1>alias</KEYWORD1>
- <KEYWORD1>all</KEYWORD1>
- <KEYWORD1>architecture</KEYWORD1>
- <KEYWORD1>array</KEYWORD1>
- <KEYWORD1>assert</KEYWORD1>
- <KEYWORD1>attribute</KEYWORD1>
- <KEYWORD1>begin</KEYWORD1>
- <KEYWORD1>block</KEYWORD1>
- <KEYWORD1>body</KEYWORD1>
- <KEYWORD1>buffer</KEYWORD1>
- <KEYWORD1>bus</KEYWORD1>
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>component</KEYWORD1>
- <KEYWORD1>configuration</KEYWORD1>
- <KEYWORD1>constant</KEYWORD1>
- <KEYWORD1>disconnect</KEYWORD1>
- <KEYWORD1>downto</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>elsif</KEYWORD1>
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>entity</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
- <KEYWORD1>file</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>generate</KEYWORD1>
- <KEYWORD1>generic</KEYWORD1>
- <KEYWORD1>guarded</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>inout</KEYWORD1>
- <KEYWORD1>is</KEYWORD1>
- <KEYWORD1>label</KEYWORD1>
- <KEYWORD1>library</KEYWORD1>
- <KEYWORD1>linkage</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
- <KEYWORD1>map</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>null</KEYWORD1>
- <KEYWORD1>of</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>open</KEYWORD1>
- <KEYWORD1>others</KEYWORD1>
- <KEYWORD1>out</KEYWORD1>
- <KEYWORD1>package</KEYWORD1>
- <KEYWORD1>port</KEYWORD1>
- <KEYWORD1>procedure</KEYWORD1>
- <KEYWORD1>process</KEYWORD1>
- <KEYWORD1>range</KEYWORD1>
- <KEYWORD1>record</KEYWORD1>
- <KEYWORD1>register</KEYWORD1>
- <KEYWORD1>report</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>select</KEYWORD1>
- <KEYWORD1>severity</KEYWORD1>
- <KEYWORD1>signal</KEYWORD1>
- <KEYWORD1>subtype</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>transport</KEYWORD1>
- <KEYWORD1>type</KEYWORD1>
- <KEYWORD1>units</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>use</KEYWORD1>
- <KEYWORD1>variable</KEYWORD1>
- <KEYWORD1>wait</KEYWORD1>
- <KEYWORD1>when</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
- <KEYWORD1>with</KEYWORD1>
-
- <!-- VHDL-93 new keyword -->
- <KEYWORD1>group</KEYWORD1>
- <KEYWORD1>impure</KEYWORD1>
- <KEYWORD1>inertial</KEYWORD1>
- <KEYWORD1>literal</KEYWORD1>
- <KEYWORD1>postponed</KEYWORD1>
- <KEYWORD1>pure</KEYWORD1>
- <KEYWORD1>reject</KEYWORD1>
- <KEYWORD1>shared</KEYWORD1>
- <KEYWORD1>unaffected</KEYWORD1>
-
- <!-- VHDL-2001 new keyword -->
- <KEYWORD1>protected</KEYWORD1>
-
- <!-- VHDL-87 keyword, but shown as operator -->
- <OPERATOR>abs</OPERATOR>
- <OPERATOR>and</OPERATOR>
- <OPERATOR>mod</OPERATOR>
- <OPERATOR>nand</OPERATOR>
- <OPERATOR>nor</OPERATOR>
- <OPERATOR>not</OPERATOR>
- <OPERATOR>or</OPERATOR>
- <OPERATOR>rem</OPERATOR>
- <OPERATOR>xor</OPERATOR>
-
- <!-- VHDL-93 new keyword, but shown as operator -->
- <OPERATOR>rol</OPERATOR>
- <OPERATOR>ror</OPERATOR>
- <OPERATOR>sll</OPERATOR>
- <OPERATOR>srl</OPERATOR>
- <OPERATOR>sla</OPERATOR>
- <OPERATOR>sra</OPERATOR>
- <OPERATOR>xnor</OPERATOR>
-
- <!-- VHDL-87 keyword, but shown as function -->
- <FUNCTION>deallocate</FUNCTION>
-
- <!-- built-in & standard type -->
- <KEYWORD2>bit</KEYWORD2>
- <KEYWORD2>bit_vector</KEYWORD2>
- <KEYWORD2>boolean</KEYWORD2>
- <KEYWORD2>character</KEYWORD2>
- <KEYWORD2>delay_length</KEYWORD2>
- <FUNCTION>now</FUNCTION>
- <FUNCTION>file_open</FUNCTION>
- <FUNCTION>file_close</FUNCTION>
- <FUNCTION>read</FUNCTION>
- <FUNCTION>write</FUNCTION>
- <FUNCTION>endfile</FUNCTION>
- <KEYWORD2>file_open_kind</KEYWORD2>
- <KEYWORD2>file_open_status</KEYWORD2>
- <KEYWORD2>integer</KEYWORD2>
- <KEYWORD2>natural</KEYWORD2>
- <KEYWORD2>positive</KEYWORD2>
- <KEYWORD2>real</KEYWORD2>
- <KEYWORD2>severity_level</KEYWORD2>
- <KEYWORD2>string</KEYWORD2>
- <KEYWORD2>time</KEYWORD2>
- <!-- boolean -->
- <LITERAL1>false</LITERAL1>
- <LITERAL1>true</LITERAL1>
- <!-- char, only those not having a ' ' representation -->
- <LITERAL1>nul</LITERAL1>
- <LITERAL1>soh</LITERAL1>
- <LITERAL1>stx</LITERAL1>
- <LITERAL1>etx</LITERAL1>
- <LITERAL1>eot</LITERAL1>
- <LITERAL1>enq</LITERAL1>
- <LITERAL1>ack</LITERAL1>
- <LITERAL1>bel</LITERAL1>
- <LITERAL1>bs</LITERAL1>
- <LITERAL1>ht</LITERAL1>
- <LITERAL1>lf</LITERAL1>
- <LITERAL1>vt</LITERAL1>
- <LITERAL1>ff</LITERAL1>
- <LITERAL1>cr</LITERAL1>
- <LITERAL1>so</LITERAL1>
- <LITERAL1>si</LITERAL1>
- <LITERAL1>dle</LITERAL1>
- <LITERAL1>dc1</LITERAL1>
- <LITERAL1>dc2</LITERAL1>
- <LITERAL1>dc3</LITERAL1>
- <LITERAL1>dc4</LITERAL1>
- <LITERAL1>nak</LITERAL1>
- <LITERAL1>syn</LITERAL1>
- <LITERAL1>etb</LITERAL1>
- <LITERAL1>can</LITERAL1>
- <LITERAL1>em</LITERAL1>
- <LITERAL1>sub</LITERAL1>
- <LITERAL1>esc</LITERAL1>
- <LITERAL1>fsp</LITERAL1>
- <LITERAL1>gsp</LITERAL1>
- <LITERAL1>rsp</LITERAL1>
- <LITERAL1>usp</LITERAL1>
- <LITERAL1>del</LITERAL1>
- <LITERAL1>c128</LITERAL1>
- <LITERAL1>c129</LITERAL1>
- <LITERAL1>c130</LITERAL1>
- <LITERAL1>c131</LITERAL1>
- <LITERAL1>c132</LITERAL1>
- <LITERAL1>c133</LITERAL1>
- <LITERAL1>c134</LITERAL1>
- <LITERAL1>c135</LITERAL1>
- <LITERAL1>c136</LITERAL1>
- <LITERAL1>c137</LITERAL1>
- <LITERAL1>c138</LITERAL1>
- <LITERAL1>c139</LITERAL1>
- <LITERAL1>c140</LITERAL1>
- <LITERAL1>c141</LITERAL1>
- <LITERAL1>c142</LITERAL1>
- <LITERAL1>c143</LITERAL1>
- <LITERAL1>c144</LITERAL1>
- <LITERAL1>c145</LITERAL1>
- <LITERAL1>c146</LITERAL1>
- <LITERAL1>c147</LITERAL1>
- <LITERAL1>c148</LITERAL1>
- <LITERAL1>c149</LITERAL1>
- <LITERAL1>c150</LITERAL1>
- <LITERAL1>c151</LITERAL1>
- <LITERAL1>c152</LITERAL1>
- <LITERAL1>c153</LITERAL1>
- <LITERAL1>c154</LITERAL1>
- <LITERAL1>c155</LITERAL1>
- <LITERAL1>c156</LITERAL1>
- <LITERAL1>c157</LITERAL1>
- <LITERAL1>c158</LITERAL1>
- <LITERAL1>c159</LITERAL1>
- <!-- severity_level -->
- <LITERAL1>note</LITERAL1>
- <LITERAL1>warning</LITERAL1>
- <LITERAL1>error</LITERAL1>
- <LITERAL1>failure</LITERAL1>
- <!-- file_open_kind -->
- <LITERAL1>read_mode</LITERAL1>
- <LITERAL1>write_mode</LITERAL1>
- <LITERAL1>append_mode</LITERAL1>
- <!-- file_open_status -->
- <LITERAL1>open_ok</LITERAL1>
- <LITERAL1>status_error</LITERAL1>
- <LITERAL1>name_error</LITERAL1>
- <LITERAL1>mode_error</LITERAL1>
-
- <!-- ieee.std_logic_1164 -->
- <KEYWORD2>std_logic</KEYWORD2>
- <KEYWORD2>std_ulogic</KEYWORD2>
- <KEYWORD2>std_logic_vector</KEYWORD2>
- <KEYWORD2>std_ulogic_vector</KEYWORD2>
- <KEYWORD2>x01</KEYWORD2>
- <KEYWORD2>x01z</KEYWORD2>
- <KEYWORD2>ux01</KEYWORD2>
- <KEYWORD2>ux01z</KEYWORD2>
- <FUNCTION>to_bit</FUNCTION>
- <FUNCTION>to_bitvector</FUNCTION>
- <FUNCTION>to_stdulogic</FUNCTION>
- <FUNCTION>to_stdlogicvector</FUNCTION>
- <FUNCTION>to_stdulogicvector</FUNCTION>
- <FUNCTION>to_x01</FUNCTION>
- <FUNCTION>to_x01z</FUNCTION>
- <FUNCTION>to_ux01</FUNCTION>
- <FUNCTION>rising_edge</FUNCTION>
- <FUNCTION>falling_edge</FUNCTION>
- <FUNCTION>is_x</FUNCTION>
-
- <!-- ieee.numeric_std -->
- <KEYWORD2>signed</KEYWORD2>
- <KEYWORD2>unsigned</KEYWORD2>
- <FUNCTION>shift_left</FUNCTION>
- <FUNCTION>shift_right</FUNCTION>
- <FUNCTION>rotate_left</FUNCTION>
- <FUNCTION>rotate_right</FUNCTION>
- <FUNCTION>resize</FUNCTION>
- <FUNCTION>std_match</FUNCTION>
- <FUNCTION>to_integer</FUNCTION>
- <FUNCTION>to_unsigned</FUNCTION>
- <FUNCTION>to_signed</FUNCTION>
-
- <!-- std.textio -->
- <KEYWORD2>line</KEYWORD2>
- <KEYWORD2>text</KEYWORD2>
- <KEYWORD2>side</KEYWORD2>
- <KEYWORD2>width</KEYWORD2>
- <LITERAL2>left</LITERAL2>
- <LITERAL2>right</LITERAL2>
- <LITERAL2>std_input</LITERAL2>
- <LITERAL2>std_output</LITERAL2>
- <LITERAL3>input</LITERAL3>
- <LITERAL3>output</LITERAL3>
- <FUNCTION>readline</FUNCTION>
- <FUNCTION>writeline</FUNCTION>
-
- <!-- ieee.std_logic_textio -->
- <FUNCTION>oread</FUNCTION>
- <FUNCTION>owrite</FUNCTION>
- <FUNCTION>hread</FUNCTION>
- <FUNCTION>hwrite</FUNCTION>
-
- <!-- ieee.std_logic_arith -->
- <KEYWORD2>signed</KEYWORD2>
- <KEYWORD2>unsigned</KEYWORD2>
- <KEYWORD2>small_int</KEYWORD2>
- <FUNCTION>conv_integer</FUNCTION>
- <FUNCTION>conv_unsigned</FUNCTION>
- <FUNCTION>conv_signed</FUNCTION>
- <FUNCTION>conv_std_logic_vector</FUNCTION>
- <FUNCTION>shl</FUNCTION>
- <FUNCTION>shr</FUNCTION>
- <FUNCTION>ext</FUNCTION>
- <FUNCTION>sxt</FUNCTION>
-
- <!-- ieee.math_real -->
- <LITERAL2>math_e</LITERAL2>
- <LITERAL2>math_1_over_e</LITERAL2>
- <LITERAL2>math_pi</LITERAL2>
- <LITERAL2>math_2_pi</LITERAL2>
- <LITERAL2>math_1_over_pi</LITERAL2>
- <LITERAL2>math_pi_over_2</LITERAL2>
- <LITERAL2>math_pi_over_3</LITERAL2>
- <LITERAL2>math_pi_over_4</LITERAL2>
- <LITERAL2>math_3_pi_over_2</LITERAL2>
- <LITERAL2>math_log_of_2</LITERAL2>
- <LITERAL2>math_log_of_10</LITERAL2>
- <LITERAL2>math_log2_of_e</LITERAL2>
- <LITERAL2>math_log10_of_e</LITERAL2>
- <LITERAL2>math_sqrt_2</LITERAL2>
- <LITERAL2>math_1_over_sqrt_2</LITERAL2>
- <LITERAL2>math_sqrt_pi</LITERAL2>
- <LITERAL2>math_deg_to_rad</LITERAL2>
- <LITERAL2>math_rad_to_deg</LITERAL2>
- <FUNCTION>sign</FUNCTION>
- <FUNCTION>ceil</FUNCTION>
- <FUNCTION>floor</FUNCTION>
- <FUNCTION>round</FUNCTION>
- <FUNCTION>trunc</FUNCTION>
- <FUNCTION>realmax</FUNCTION>
- <FUNCTION>realmin</FUNCTION>
- <FUNCTION>uniform</FUNCTION>
- <FUNCTION>sqrt</FUNCTION>
- <FUNCTION>cbrt</FUNCTION>
- <FUNCTION>exp</FUNCTION>
- <FUNCTION>log</FUNCTION>
- <FUNCTION>log2</FUNCTION>
- <FUNCTION>log10</FUNCTION>
- <FUNCTION>sin</FUNCTION>
- <FUNCTION>cos</FUNCTION>
- <FUNCTION>tan</FUNCTION>
- <FUNCTION>arcsin</FUNCTION>
- <FUNCTION>arccos</FUNCTION>
- <FUNCTION>arctan</FUNCTION>
- <FUNCTION>sinh</FUNCTION>
- <FUNCTION>cosh</FUNCTION>
- <FUNCTION>tanh</FUNCTION>
- <FUNCTION>arcsinh</FUNCTION>
- <FUNCTION>arccosh</FUNCTION>
- <FUNCTION>arctanh</FUNCTION>
-
- <!-- ieee.math_complex -->
- <KEYWORD2>complex</KEYWORD2>
- <KEYWORD2>positive_real</KEYWORD2>
- <KEYWORD2>principal_value</KEYWORD2>
- <KEYWORD2>complex_polar</KEYWORD2>
- <KEYWORD2>re</KEYWORD2>
- <KEYWORD2>im</KEYWORD2>
- <KEYWORD2>mag</KEYWORD2>
- <KEYWORD2>arg</KEYWORD2>
- <LITERAL2>math_cbase_1</LITERAL2>
- <LITERAL2>math_cbase_j</LITERAL2>
- <LITERAL2>math_czero</LITERAL2>
- <FUNCTION>cmplx</FUNCTION>
- <FUNCTION>get_principal_value</FUNCTION>
- <FUNCTION>complex_to_polar</FUNCTION>
- <FUNCTION>polar_to_complex</FUNCTION>
- <FUNCTION>conj</FUNCTION>
-
- </KEYWORDS>
- </RULES>
-</MODE>
-
-
+<?xml version="1.0"?>
+<!--
+ contributed by M. Cesar R. Lacruz (mcesar at sec.upm.es)
+ v1.1 2008/08/29
+ from previous work by Dante Fabrizio and Nitsan Vardi
+-->
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="label" VALUE="VHDL" />
+ <PROPERTY NAME="lineComment" VALUE="--" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+
+ <!-- string -->
+ <SPAN_REGEXP TYPE="LITERAL4" AT_WORD_START="TRUE" NO_LINE_BREAK="TRUE">
+ <BEGIN>[box]?"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="LITERAL4" AT_WORD_START="TRUE" NO_LINE_BREAK="TRUE">
+ <BEGIN>[box]?%</BEGIN>
+ <END>%</END>
+ </SPAN_REGEXP>
+
+ <!-- char -->
+ <SEQ_REGEXP TYPE="LITERAL1" HASH_CHAR="'">(?:'[\x20-\x7e\xa0-\xff]')</SEQ_REGEXP>
+
+ <!-- predefined attribute -->
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'left\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'right\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'low\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'high\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'ascending\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'image\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'value\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'pos\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'val\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'succ\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'pred\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'leftof\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'rightof\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'base\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'delayed\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'stable\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'quiet\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'transaction\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'event\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'active\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'last_event\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'last_active\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'last_value\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'driving\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'driving_value\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'range\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'reverse_range\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'length\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'simple_name\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'path_name\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'instance_name\b</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHAR="'">'foreign\b</SEQ_REGEXP>
+
+ <!-- other attribute -->
+ <MARK_FOLLOWING TYPE="KEYWORD4" MATCH_TYPE="KEYWORD3">'</MARK_FOLLOWING>
+
+ <!-- comment -->
+ <EOL_SPAN TYPE="COMMENT1">--</EOL_SPAN>
+
+ <!-- label -->
+ <!-- sorry, but 'label : component_name', 'label : procedure_name'
+ & 'label : variable :=' are not managed, as they collide with
+ 'generic_name : generic_type' -->
+ <SEQ_REGEXP TYPE="LABEL" AT_WHITESPACE_END="TRUE">(\w|\w[\w\d_]*[\w\d])\s*(?=:)(?!:=)(?!:\s*\d)(?=:\s*(if\b|case\b|while\b|for\b|loop\b|next\b|null\b|block\b|process\b|wait\b|postponed\b|assert\b|with\b|entity\b|component\b|configuration\b|exit\b|return\b|(?:(?:\w[\w\d_]*\w|\w)\s*<=)))</SEQ_REGEXP>
+
+ <!-- operator -->
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">=></SEQ>
+ <SEQ TYPE="OPERATOR">**</SEQ>
+ <SEQ TYPE="OPERATOR">:=</SEQ>
+ <SEQ TYPE="OPERATOR">/=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">&</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+
+ <!-- number -->
+ <SEQ_REGEXP TYPE="DIGIT" AT_WORD_START="TRUE"
+ >\d{1,2}#(?:(?:[\da-f][\da-f_]*\.?[\da-f_]*[\da-f])|[\da-f])#(?:e[+-]?(?:\d[\d_]*\d|\d))?</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="DIGIT" AT_WORD_START="TRUE"
+ >\d{1,2}:(?:(?:[\da-f][\da-f_]*\.?[\da-f_]*[\da-f])|[\da-f]):(?:e[+-]?(?:\d[\d_]*\d|\d))?</SEQ_REGEXP>
+ <SEQ_REGEXP TYPE="DIGIT" AT_WORD_START="TRUE"
+ >(?:(?:\d[\d_]*\.?[\d_]*\d)|\d)(?:e[+-]?(?:\d[\d_]*\d|\d))?</SEQ_REGEXP>
+
+ <KEYWORDS>
+ <!-- VHDL-87 keyword -->
+ <KEYWORD1>access</KEYWORD1>
+ <KEYWORD1>after</KEYWORD1>
+ <KEYWORD1>alias</KEYWORD1>
+ <KEYWORD1>all</KEYWORD1>
+ <KEYWORD1>architecture</KEYWORD1>
+ <KEYWORD1>array</KEYWORD1>
+ <KEYWORD1>assert</KEYWORD1>
+ <KEYWORD1>attribute</KEYWORD1>
+ <KEYWORD1>begin</KEYWORD1>
+ <KEYWORD1>block</KEYWORD1>
+ <KEYWORD1>body</KEYWORD1>
+ <KEYWORD1>buffer</KEYWORD1>
+ <KEYWORD1>bus</KEYWORD1>
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>component</KEYWORD1>
+ <KEYWORD1>configuration</KEYWORD1>
+ <KEYWORD1>constant</KEYWORD1>
+ <KEYWORD1>disconnect</KEYWORD1>
+ <KEYWORD1>downto</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>elsif</KEYWORD1>
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>entity</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+ <KEYWORD1>file</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>generate</KEYWORD1>
+ <KEYWORD1>generic</KEYWORD1>
+ <KEYWORD1>guarded</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>inout</KEYWORD1>
+ <KEYWORD1>is</KEYWORD1>
+ <KEYWORD1>label</KEYWORD1>
+ <KEYWORD1>library</KEYWORD1>
+ <KEYWORD1>linkage</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+ <KEYWORD1>map</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>null</KEYWORD1>
+ <KEYWORD1>of</KEYWORD1>
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>open</KEYWORD1>
+ <KEYWORD1>others</KEYWORD1>
+ <KEYWORD1>out</KEYWORD1>
+ <KEYWORD1>package</KEYWORD1>
+ <KEYWORD1>port</KEYWORD1>
+ <KEYWORD1>procedure</KEYWORD1>
+ <KEYWORD1>process</KEYWORD1>
+ <KEYWORD1>range</KEYWORD1>
+ <KEYWORD1>record</KEYWORD1>
+ <KEYWORD1>register</KEYWORD1>
+ <KEYWORD1>report</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>select</KEYWORD1>
+ <KEYWORD1>severity</KEYWORD1>
+ <KEYWORD1>signal</KEYWORD1>
+ <KEYWORD1>subtype</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>transport</KEYWORD1>
+ <KEYWORD1>type</KEYWORD1>
+ <KEYWORD1>units</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>use</KEYWORD1>
+ <KEYWORD1>variable</KEYWORD1>
+ <KEYWORD1>wait</KEYWORD1>
+ <KEYWORD1>when</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+ <KEYWORD1>with</KEYWORD1>
+
+ <!-- VHDL-93 new keyword -->
+ <KEYWORD1>group</KEYWORD1>
+ <KEYWORD1>impure</KEYWORD1>
+ <KEYWORD1>inertial</KEYWORD1>
+ <KEYWORD1>literal</KEYWORD1>
+ <KEYWORD1>postponed</KEYWORD1>
+ <KEYWORD1>pure</KEYWORD1>
+ <KEYWORD1>reject</KEYWORD1>
+ <KEYWORD1>shared</KEYWORD1>
+ <KEYWORD1>unaffected</KEYWORD1>
+
+ <!-- VHDL-2001 new keyword -->
+ <KEYWORD1>protected</KEYWORD1>
+
+ <!-- VHDL-87 keyword, but shown as operator -->
+ <OPERATOR>abs</OPERATOR>
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>mod</OPERATOR>
+ <OPERATOR>nand</OPERATOR>
+ <OPERATOR>nor</OPERATOR>
+ <OPERATOR>not</OPERATOR>
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>rem</OPERATOR>
+ <OPERATOR>xor</OPERATOR>
+
+ <!-- VHDL-93 new keyword, but shown as operator -->
+ <OPERATOR>rol</OPERATOR>
+ <OPERATOR>ror</OPERATOR>
+ <OPERATOR>sll</OPERATOR>
+ <OPERATOR>srl</OPERATOR>
+ <OPERATOR>sla</OPERATOR>
+ <OPERATOR>sra</OPERATOR>
+ <OPERATOR>xnor</OPERATOR>
+
+ <!-- VHDL-87 keyword, but shown as function -->
+ <FUNCTION>deallocate</FUNCTION>
+
+ <!-- built-in & standard type -->
+ <KEYWORD2>bit</KEYWORD2>
+ <KEYWORD2>bit_vector</KEYWORD2>
+ <KEYWORD2>boolean</KEYWORD2>
+ <KEYWORD2>character</KEYWORD2>
+ <KEYWORD2>delay_length</KEYWORD2>
+ <FUNCTION>now</FUNCTION>
+ <FUNCTION>file_open</FUNCTION>
+ <FUNCTION>file_close</FUNCTION>
+ <FUNCTION>read</FUNCTION>
+ <FUNCTION>write</FUNCTION>
+ <FUNCTION>endfile</FUNCTION>
+ <KEYWORD2>file_open_kind</KEYWORD2>
+ <KEYWORD2>file_open_status</KEYWORD2>
+ <KEYWORD2>integer</KEYWORD2>
+ <KEYWORD2>natural</KEYWORD2>
+ <KEYWORD2>positive</KEYWORD2>
+ <KEYWORD2>real</KEYWORD2>
+ <KEYWORD2>severity_level</KEYWORD2>
+ <KEYWORD2>string</KEYWORD2>
+ <KEYWORD2>time</KEYWORD2>
+ <!-- boolean -->
+ <LITERAL1>false</LITERAL1>
+ <LITERAL1>true</LITERAL1>
+ <!-- char, only those not having a ' ' representation -->
+ <LITERAL1>nul</LITERAL1>
+ <LITERAL1>soh</LITERAL1>
+ <LITERAL1>stx</LITERAL1>
+ <LITERAL1>etx</LITERAL1>
+ <LITERAL1>eot</LITERAL1>
+ <LITERAL1>enq</LITERAL1>
+ <LITERAL1>ack</LITERAL1>
+ <LITERAL1>bel</LITERAL1>
+ <LITERAL1>bs</LITERAL1>
+ <LITERAL1>ht</LITERAL1>
+ <LITERAL1>lf</LITERAL1>
+ <LITERAL1>vt</LITERAL1>
+ <LITERAL1>ff</LITERAL1>
+ <LITERAL1>cr</LITERAL1>
+ <LITERAL1>so</LITERAL1>
+ <LITERAL1>si</LITERAL1>
+ <LITERAL1>dle</LITERAL1>
+ <LITERAL1>dc1</LITERAL1>
+ <LITERAL1>dc2</LITERAL1>
+ <LITERAL1>dc3</LITERAL1>
+ <LITERAL1>dc4</LITERAL1>
+ <LITERAL1>nak</LITERAL1>
+ <LITERAL1>syn</LITERAL1>
+ <LITERAL1>etb</LITERAL1>
+ <LITERAL1>can</LITERAL1>
+ <LITERAL1>em</LITERAL1>
+ <LITERAL1>sub</LITERAL1>
+ <LITERAL1>esc</LITERAL1>
+ <LITERAL1>fsp</LITERAL1>
+ <LITERAL1>gsp</LITERAL1>
+ <LITERAL1>rsp</LITERAL1>
+ <LITERAL1>usp</LITERAL1>
+ <LITERAL1>del</LITERAL1>
+ <LITERAL1>c128</LITERAL1>
+ <LITERAL1>c129</LITERAL1>
+ <LITERAL1>c130</LITERAL1>
+ <LITERAL1>c131</LITERAL1>
+ <LITERAL1>c132</LITERAL1>
+ <LITERAL1>c133</LITERAL1>
+ <LITERAL1>c134</LITERAL1>
+ <LITERAL1>c135</LITERAL1>
+ <LITERAL1>c136</LITERAL1>
+ <LITERAL1>c137</LITERAL1>
+ <LITERAL1>c138</LITERAL1>
+ <LITERAL1>c139</LITERAL1>
+ <LITERAL1>c140</LITERAL1>
+ <LITERAL1>c141</LITERAL1>
+ <LITERAL1>c142</LITERAL1>
+ <LITERAL1>c143</LITERAL1>
+ <LITERAL1>c144</LITERAL1>
+ <LITERAL1>c145</LITERAL1>
+ <LITERAL1>c146</LITERAL1>
+ <LITERAL1>c147</LITERAL1>
+ <LITERAL1>c148</LITERAL1>
+ <LITERAL1>c149</LITERAL1>
+ <LITERAL1>c150</LITERAL1>
+ <LITERAL1>c151</LITERAL1>
+ <LITERAL1>c152</LITERAL1>
+ <LITERAL1>c153</LITERAL1>
+ <LITERAL1>c154</LITERAL1>
+ <LITERAL1>c155</LITERAL1>
+ <LITERAL1>c156</LITERAL1>
+ <LITERAL1>c157</LITERAL1>
+ <LITERAL1>c158</LITERAL1>
+ <LITERAL1>c159</LITERAL1>
+ <!-- severity_level -->
+ <LITERAL1>note</LITERAL1>
+ <LITERAL1>warning</LITERAL1>
+ <LITERAL1>error</LITERAL1>
+ <LITERAL1>failure</LITERAL1>
+ <!-- file_open_kind -->
+ <LITERAL1>read_mode</LITERAL1>
+ <LITERAL1>write_mode</LITERAL1>
+ <LITERAL1>append_mode</LITERAL1>
+ <!-- file_open_status -->
+ <LITERAL1>open_ok</LITERAL1>
+ <LITERAL1>status_error</LITERAL1>
+ <LITERAL1>name_error</LITERAL1>
+ <LITERAL1>mode_error</LITERAL1>
+
+ <!-- ieee.std_logic_1164 -->
+ <KEYWORD2>std_logic</KEYWORD2>
+ <KEYWORD2>std_ulogic</KEYWORD2>
+ <KEYWORD2>std_logic_vector</KEYWORD2>
+ <KEYWORD2>std_ulogic_vector</KEYWORD2>
+ <KEYWORD2>x01</KEYWORD2>
+ <KEYWORD2>x01z</KEYWORD2>
+ <KEYWORD2>ux01</KEYWORD2>
+ <KEYWORD2>ux01z</KEYWORD2>
+ <FUNCTION>to_bit</FUNCTION>
+ <FUNCTION>to_bitvector</FUNCTION>
+ <FUNCTION>to_stdulogic</FUNCTION>
+ <FUNCTION>to_stdlogicvector</FUNCTION>
+ <FUNCTION>to_stdulogicvector</FUNCTION>
+ <FUNCTION>to_x01</FUNCTION>
+ <FUNCTION>to_x01z</FUNCTION>
+ <FUNCTION>to_ux01</FUNCTION>
+ <FUNCTION>rising_edge</FUNCTION>
+ <FUNCTION>falling_edge</FUNCTION>
+ <FUNCTION>is_x</FUNCTION>
+
+ <!-- ieee.numeric_std -->
+ <KEYWORD2>signed</KEYWORD2>
+ <KEYWORD2>unsigned</KEYWORD2>
+ <FUNCTION>shift_left</FUNCTION>
+ <FUNCTION>shift_right</FUNCTION>
+ <FUNCTION>rotate_left</FUNCTION>
+ <FUNCTION>rotate_right</FUNCTION>
+ <FUNCTION>resize</FUNCTION>
+ <FUNCTION>std_match</FUNCTION>
+ <FUNCTION>to_integer</FUNCTION>
+ <FUNCTION>to_unsigned</FUNCTION>
+ <FUNCTION>to_signed</FUNCTION>
+
+ <!-- std.textio -->
+ <KEYWORD2>line</KEYWORD2>
+ <KEYWORD2>text</KEYWORD2>
+ <KEYWORD2>side</KEYWORD2>
+ <KEYWORD2>width</KEYWORD2>
+ <LITERAL2>left</LITERAL2>
+ <LITERAL2>right</LITERAL2>
+ <LITERAL2>std_input</LITERAL2>
+ <LITERAL2>std_output</LITERAL2>
+ <LITERAL3>input</LITERAL3>
+ <LITERAL3>output</LITERAL3>
+ <FUNCTION>readline</FUNCTION>
+ <FUNCTION>writeline</FUNCTION>
+
+ <!-- ieee.std_logic_textio -->
+ <FUNCTION>oread</FUNCTION>
+ <FUNCTION>owrite</FUNCTION>
+ <FUNCTION>hread</FUNCTION>
+ <FUNCTION>hwrite</FUNCTION>
+
+ <!-- ieee.std_logic_arith -->
+ <KEYWORD2>signed</KEYWORD2>
+ <KEYWORD2>unsigned</KEYWORD2>
+ <KEYWORD2>small_int</KEYWORD2>
+ <FUNCTION>conv_integer</FUNCTION>
+ <FUNCTION>conv_unsigned</FUNCTION>
+ <FUNCTION>conv_signed</FUNCTION>
+ <FUNCTION>conv_std_logic_vector</FUNCTION>
+ <FUNCTION>shl</FUNCTION>
+ <FUNCTION>shr</FUNCTION>
+ <FUNCTION>ext</FUNCTION>
+ <FUNCTION>sxt</FUNCTION>
+
+ <!-- ieee.math_real -->
+ <LITERAL2>math_e</LITERAL2>
+ <LITERAL2>math_1_over_e</LITERAL2>
+ <LITERAL2>math_pi</LITERAL2>
+ <LITERAL2>math_2_pi</LITERAL2>
+ <LITERAL2>math_1_over_pi</LITERAL2>
+ <LITERAL2>math_pi_over_2</LITERAL2>
+ <LITERAL2>math_pi_over_3</LITERAL2>
+ <LITERAL2>math_pi_over_4</LITERAL2>
+ <LITERAL2>math_3_pi_over_2</LITERAL2>
+ <LITERAL2>math_log_of_2</LITERAL2>
+ <LITERAL2>math_log_of_10</LITERAL2>
+ <LITERAL2>math_log2_of_e</LITERAL2>
+ <LITERAL2>math_log10_of_e</LITERAL2>
+ <LITERAL2>math_sqrt_2</LITERAL2>
+ <LITERAL2>math_1_over_sqrt_2</LITERAL2>
+ <LITERAL2>math_sqrt_pi</LITERAL2>
+ <LITERAL2>math_deg_to_rad</LITERAL2>
+ <LITERAL2>math_rad_to_deg</LITERAL2>
+ <FUNCTION>sign</FUNCTION>
+ <FUNCTION>ceil</FUNCTION>
+ <FUNCTION>floor</FUNCTION>
+ <FUNCTION>round</FUNCTION>
+ <FUNCTION>trunc</FUNCTION>
+ <FUNCTION>realmax</FUNCTION>
+ <FUNCTION>realmin</FUNCTION>
+ <FUNCTION>uniform</FUNCTION>
+ <FUNCTION>sqrt</FUNCTION>
+ <FUNCTION>cbrt</FUNCTION>
+ <FUNCTION>exp</FUNCTION>
+ <FUNCTION>log</FUNCTION>
+ <FUNCTION>log2</FUNCTION>
+ <FUNCTION>log10</FUNCTION>
+ <FUNCTION>sin</FUNCTION>
+ <FUNCTION>cos</FUNCTION>
+ <FUNCTION>tan</FUNCTION>
+ <FUNCTION>arcsin</FUNCTION>
+ <FUNCTION>arccos</FUNCTION>
+ <FUNCTION>arctan</FUNCTION>
+ <FUNCTION>sinh</FUNCTION>
+ <FUNCTION>cosh</FUNCTION>
+ <FUNCTION>tanh</FUNCTION>
+ <FUNCTION>arcsinh</FUNCTION>
+ <FUNCTION>arccosh</FUNCTION>
+ <FUNCTION>arctanh</FUNCTION>
+
+ <!-- ieee.math_complex -->
+ <KEYWORD2>complex</KEYWORD2>
+ <KEYWORD2>positive_real</KEYWORD2>
+ <KEYWORD2>principal_value</KEYWORD2>
+ <KEYWORD2>complex_polar</KEYWORD2>
+ <KEYWORD2>re</KEYWORD2>
+ <KEYWORD2>im</KEYWORD2>
+ <KEYWORD2>mag</KEYWORD2>
+ <KEYWORD2>arg</KEYWORD2>
+ <LITERAL2>math_cbase_1</LITERAL2>
+ <LITERAL2>math_cbase_j</LITERAL2>
+ <LITERAL2>math_czero</LITERAL2>
+ <FUNCTION>cmplx</FUNCTION>
+ <FUNCTION>get_principal_value</FUNCTION>
+ <FUNCTION>complex_to_polar</FUNCTION>
+ <FUNCTION>polar_to_complex</FUNCTION>
+ <FUNCTION>conj</FUNCTION>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
+
diff --git a/jEdit/modes/visualbasic.xml b/jEdit/modes/visualbasic.xml
new file mode 100644
index 0000000..5fc76e4
--- /dev/null
+++ b/jEdit/modes/visualbasic.xml
@@ -0,0 +1,1163 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- Catalog entry:
+ <MODE NAME="visualbasic" FILE="visualbasic.xml" FILE_NAME_GLOB="*.{vb}" />
+-->
+
+<!--
+ Visual Basic by Marcelo Gennari (margenn at gmail.com)
+ Based on VBScript mode by Andre Kaplan
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="'" />
+ <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(do until|else|elseif|for|function|if|select case|sub|while)\s*(then)?.*"
+ />
+ <PROPERTY NAME="unindentNextLine" VALUE="\s*(end (if|select)|loop|wend)\s*" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE"> <BEGIN>"</BEGIN> <END>"</END> </SPAN>
+
+ <!-- conditional compilation -->
+ <EOL_SPAN TYPE="KEYWORD4">#if</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD4">#else</EOL_SPAN>
+ <EOL_SPAN TYPE="KEYWORD4">#end</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">'</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT1">rem </EOL_SPAN>
+
+ <!-- Dates -->
+ <SEQ_REGEXP TYPE="KEYWORD3" HASH_CHARS="#"
+ AT_WORD_START="TRUE">#\d{1,4}/\d{1,4}/\d{1,4}( \d{1,2}\:\d{1,2}(:\d{1,2}| ?(am|pm))?)?#</SEQ_REGEXP>
+
+ <!-- Numbers: Float|Int|Hex|Oct and variations -->
+ <SEQ_REGEXP TYPE="DIGIT" HASH_CHARS="0123456789-&"
+ AT_WORD_START="TRUE">-?(\d+\.\d+([!@]|E[+-]\d+)?|\d+[&!@#]?|&H[0-9A-F]+&?|&O[0-7]+&?)</SEQ_REGEXP>
+
+ <!-- Recordset fields -->
+ <SEQ_REGEXP TYPE="LITERAL4" HASH_CHARS="abcdefghijklmnopqrstuvwxyz" AT_WORD_START="TRUE">\w+!\w+\b</SEQ_REGEXP>
+
+ <!-- Labels -->
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="NULL" AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <!-- Functions -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="NULL">(</MARK_PREVIOUS>
+
+
+ <KEYWORDS>
+ <!-- API Functions -->
+ <KEYWORD1>Abs</KEYWORD1>
+ <KEYWORD1>Array</KEYWORD1>
+ <KEYWORD1>Asc</KEYWORD1>
+ <KEYWORD1>AscB</KEYWORD1>
+ <KEYWORD1>AscW</KEYWORD1>
+ <KEYWORD1>Atn</KEYWORD1>
+ <KEYWORD1>Avg</KEYWORD1>
+ <KEYWORD1>CBool</KEYWORD1>
+ <KEYWORD1>CByte</KEYWORD1>
+ <KEYWORD1>CCur</KEYWORD1>
+ <KEYWORD1>CDate</KEYWORD1>
+ <KEYWORD1>CDbl</KEYWORD1>
+ <KEYWORD1>Cdec</KEYWORD1>
+ <KEYWORD1>Choose</KEYWORD1>
+ <KEYWORD1>Chr</KEYWORD1>
+ <KEYWORD1>ChrB</KEYWORD1>
+ <KEYWORD1>ChrW</KEYWORD1>
+ <KEYWORD1>CInt</KEYWORD1>
+ <KEYWORD1>CLng</KEYWORD1>
+ <KEYWORD1>Command</KEYWORD1>
+ <KEYWORD1>Cos</KEYWORD1>
+ <KEYWORD1>Count</KEYWORD1>
+ <KEYWORD1>CreateObject</KEYWORD1>
+ <KEYWORD1>CSng</KEYWORD1>
+ <KEYWORD1>CStr</KEYWORD1>
+ <KEYWORD1>CurDir</KEYWORD1>
+ <KEYWORD1>CVar</KEYWORD1>
+ <KEYWORD1>CVDate</KEYWORD1>
+ <KEYWORD1>CVErr</KEYWORD1>
+ <KEYWORD1>DateAdd</KEYWORD1>
+ <KEYWORD1>DateDiff</KEYWORD1>
+ <KEYWORD1>DatePart</KEYWORD1>
+ <KEYWORD1>DateSerial</KEYWORD1>
+ <KEYWORD1>DateValue</KEYWORD1>
+ <KEYWORD1>Day</KEYWORD1>
+ <KEYWORD1>DDB</KEYWORD1>
+ <KEYWORD1>Dir</KEYWORD1>
+ <KEYWORD1>DoEvents</KEYWORD1>
+ <KEYWORD1>Environ</KEYWORD1>
+ <KEYWORD1>EOF</KEYWORD1>
+ <KEYWORD1>Exp</KEYWORD1>
+ <KEYWORD1>FileAttr</KEYWORD1>
+ <KEYWORD1>FileDateTime</KEYWORD1>
+ <KEYWORD1>FileLen</KEYWORD1>
+ <KEYWORD1>Fix</KEYWORD1>
+ <KEYWORD1>Format</KEYWORD1>
+ <KEYWORD1>FreeFile</KEYWORD1>
+ <KEYWORD1>FV</KEYWORD1>
+ <KEYWORD1>GetAllStrings</KEYWORD1>
+ <KEYWORD1>GetAttr</KEYWORD1>
+ <KEYWORD1>GetAutoServerSettings</KEYWORD1>
+ <KEYWORD1>GetObject</KEYWORD1>
+ <KEYWORD1>GetSetting</KEYWORD1>
+ <KEYWORD1>Hex</KEYWORD1>
+ <KEYWORD1>Hour</KEYWORD1>
+ <KEYWORD1>IIf</KEYWORD1>
+ <KEYWORD1>IMEStatus</KEYWORD1>
+ <KEYWORD1>Input</KEYWORD1>
+ <KEYWORD1>InputB</KEYWORD1>
+ <KEYWORD1>InputBox</KEYWORD1>
+ <KEYWORD1>InStr</KEYWORD1>
+ <KEYWORD1>InstB</KEYWORD1>
+ <KEYWORD1>Int</KEYWORD1>
+ <KEYWORD1>IPmt</KEYWORD1>
+ <KEYWORD1>IsArray</KEYWORD1>
+ <KEYWORD1>IsDate</KEYWORD1>
+ <KEYWORD1>IsEmpty</KEYWORD1>
+ <KEYWORD1>IsError</KEYWORD1>
+ <KEYWORD1>IsMissing</KEYWORD1>
+ <KEYWORD1>IsNull</KEYWORD1>
+ <KEYWORD1>IsNumeric</KEYWORD1>
+ <KEYWORD1>IsObject</KEYWORD1>
+ <KEYWORD1>LBound</KEYWORD1>
+ <KEYWORD1>LCase</KEYWORD1>
+ <KEYWORD1>Left</KEYWORD1>
+ <KEYWORD1>LeftB</KEYWORD1>
+ <KEYWORD1>Len</KEYWORD1>
+ <KEYWORD1>LenB</KEYWORD1>
+ <KEYWORD1>LoadPicture</KEYWORD1>
+ <KEYWORD1>Loc</KEYWORD1>
+ <KEYWORD1>LOF</KEYWORD1>
+ <KEYWORD1>Log</KEYWORD1>
+ <KEYWORD1>LTrim</KEYWORD1>
+ <KEYWORD1>Max</KEYWORD1>
+ <KEYWORD1>Mid</KEYWORD1>
+ <KEYWORD1>MidB</KEYWORD1>
+ <KEYWORD1>Min</KEYWORD1>
+ <KEYWORD1>Minute</KEYWORD1>
+ <KEYWORD1>MIRR</KEYWORD1>
+ <KEYWORD1>Month</KEYWORD1>
+ <KEYWORD1>MsgBox</KEYWORD1>
+ <KEYWORD1>Now</KEYWORD1>
+ <KEYWORD1>NPer</KEYWORD1>
+ <KEYWORD1>NPV</KEYWORD1>
+ <KEYWORD1>Oct</KEYWORD1>
+ <KEYWORD1>Partition</KEYWORD1>
+ <KEYWORD1>Pmt</KEYWORD1>
+ <KEYWORD1>PPmt</KEYWORD1>
+ <KEYWORD1>PV</KEYWORD1>
+ <KEYWORD1>QBColor</KEYWORD1>
+ <KEYWORD1>Rate</KEYWORD1>
+ <KEYWORD1>RGB</KEYWORD1>
+ <KEYWORD1>Right</KEYWORD1>
+ <KEYWORD1>RightB</KEYWORD1>
+ <KEYWORD1>Rnd</KEYWORD1>
+ <KEYWORD1>RTrim</KEYWORD1>
+ <KEYWORD1>Second</KEYWORD1>
+ <KEYWORD1>Seek</KEYWORD1>
+ <KEYWORD1>Sgn</KEYWORD1>
+ <KEYWORD1>Shell</KEYWORD1>
+ <KEYWORD1>Sin</KEYWORD1>
+ <KEYWORD1>SLN</KEYWORD1>
+ <KEYWORD1>Space</KEYWORD1>
+ <KEYWORD1>Spc</KEYWORD1>
+ <KEYWORD1>Sqr</KEYWORD1>
+ <KEYWORD1>StDev</KEYWORD1>
+ <KEYWORD1>StDevP</KEYWORD1>
+ <KEYWORD1>Str</KEYWORD1>
+ <KEYWORD1>StrComp</KEYWORD1>
+ <KEYWORD1>StrConv</KEYWORD1>
+ <KEYWORD1>Switch</KEYWORD1>
+ <KEYWORD1>Sum</KEYWORD1>
+ <KEYWORD1>SYD</KEYWORD1>
+ <KEYWORD1>Tab</KEYWORD1>
+ <KEYWORD1>Tan</KEYWORD1>
+ <KEYWORD1>Time</KEYWORD1>
+ <KEYWORD1>Timer</KEYWORD1>
+ <KEYWORD1>TimeSerial</KEYWORD1>
+ <KEYWORD1>TimeValue</KEYWORD1>
+ <KEYWORD1>Trim</KEYWORD1>
+ <KEYWORD1>TypeName</KEYWORD1>
+ <KEYWORD1>UBound</KEYWORD1>
+ <KEYWORD1>UCase</KEYWORD1>
+ <KEYWORD1>Val</KEYWORD1>
+ <KEYWORD1>Var</KEYWORD1>
+ <KEYWORD1>VarP</KEYWORD1>
+ <KEYWORD1>VarType</KEYWORD1>
+ <KEYWORD1>Weekday</KEYWORD1>
+ <KEYWORD1>Year</KEYWORD1>
+
+ <!--Methods-->
+ <KEYWORD2>Accept</KEYWORD2>
+ <KEYWORD2>Activate</KEYWORD2>
+ <KEYWORD2>Add</KEYWORD2>
+ <KEYWORD2>AddCustom</KEYWORD2>
+ <KEYWORD2>AddFile</KEYWORD2>
+ <KEYWORD2>AddFromFile</KEYWORD2>
+ <KEYWORD2>AddFromTemplate</KEYWORD2>
+ <KEYWORD2>AddItem</KEYWORD2>
+ <KEYWORD2>AddNew</KEYWORD2>
+ <KEYWORD2>AddToAddInToolbar</KEYWORD2>
+ <KEYWORD2>AddToolboxProgID</KEYWORD2>
+ <KEYWORD2>Append</KEYWORD2>
+ <KEYWORD2>AppendChunk</KEYWORD2>
+ <KEYWORD2>Arrange</KEYWORD2>
+ <KEYWORD2>Assert</KEYWORD2>
+ <KEYWORD2>AsyncRead</KEYWORD2>
+ <KEYWORD2>BatchUpdate</KEYWORD2>
+ <KEYWORD2>BeginTrans</KEYWORD2>
+ <KEYWORD2>Bind</KEYWORD2>
+ <KEYWORD2>Cancel</KEYWORD2>
+ <KEYWORD2>CancelAsyncRead</KEYWORD2>
+ <KEYWORD2>CancelBatch</KEYWORD2>
+ <KEYWORD2>CancelUpdate</KEYWORD2>
+ <KEYWORD2>CanPropertyChange</KEYWORD2>
+ <KEYWORD2>CaptureImage</KEYWORD2>
+ <KEYWORD2>CellText</KEYWORD2>
+ <KEYWORD2>CellValue</KEYWORD2>
+ <KEYWORD2>Circle</KEYWORD2>
+ <KEYWORD2>Clear</KEYWORD2>
+ <KEYWORD2>ClearFields</KEYWORD2>
+ <KEYWORD2>ClearSel</KEYWORD2>
+ <KEYWORD2>ClearSelCols</KEYWORD2>
+ <KEYWORD2>Clone</KEYWORD2>
+ <KEYWORD2>Close</KEYWORD2>
+ <KEYWORD2>Cls</KEYWORD2>
+ <KEYWORD2>ColContaining</KEYWORD2>
+ <KEYWORD2>ColumnSize</KEYWORD2>
+ <KEYWORD2>CommandTimeout</KEYWORD2>
+ <KEYWORD2>CommitTrans</KEYWORD2>
+ <KEYWORD2>CompactDatabase</KEYWORD2>
+ <KEYWORD2>Compose</KEYWORD2>
+ <KEYWORD2>Connect</KEYWORD2>
+ <KEYWORD2>ConnectionTimeout</KEYWORD2>
+ <KEYWORD2>Copy</KEYWORD2>
+ <KEYWORD2>CopyQueryDef</KEYWORD2>
+ <KEYWORD2>CreateDatabase</KEYWORD2>
+ <KEYWORD2>CreateDragImage</KEYWORD2>
+ <KEYWORD2>CreateEmbed</KEYWORD2>
+ <KEYWORD2>CreateField</KEYWORD2>
+ <KEYWORD2>CreateGroup</KEYWORD2>
+ <KEYWORD2>CreateIndex</KEYWORD2>
+ <KEYWORD2>CreateLink</KEYWORD2>
+ <KEYWORD2>CreatePreparedStatement</KEYWORD2>
+ <KEYWORD2>CreatePropery</KEYWORD2>
+ <KEYWORD2>CreateQuery</KEYWORD2>
+ <KEYWORD2>CreateQueryDef</KEYWORD2>
+ <KEYWORD2>CreateRelation</KEYWORD2>
+ <KEYWORD2>CreateTableDef</KEYWORD2>
+ <KEYWORD2>CreateUser</KEYWORD2>
+ <KEYWORD2>CreateWorkspace</KEYWORD2>
+ <KEYWORD2>CursorLocation</KEYWORD2>
+ <KEYWORD2>Customize</KEYWORD2>
+ <KEYWORD2>Delete</KEYWORD2>
+ <KEYWORD2>DeleteColumnLabels</KEYWORD2>
+ <KEYWORD2>DeleteColumns</KEYWORD2>
+ <KEYWORD2>DeleteRowLabels</KEYWORD2>
+ <KEYWORD2>DeleteRows</KEYWORD2>
+ <KEYWORD2>DoVerb</KEYWORD2>
+ <KEYWORD2>Drag</KEYWORD2>
+ <KEYWORD2>Draw</KEYWORD2>
+ <KEYWORD2>Edit</KEYWORD2>
+ <KEYWORD2>EditCopy</KEYWORD2>
+ <KEYWORD2>EditPaste</KEYWORD2>
+ <KEYWORD2>EndDoc</KEYWORD2>
+ <KEYWORD2>EnsureVisible</KEYWORD2>
+ <KEYWORD2>EstablishConnection</KEYWORD2>
+ <KEYWORD2>Execute</KEYWORD2>
+ <KEYWORD2>ExtractIcon</KEYWORD2>
+ <KEYWORD2>Fetch</KEYWORD2>
+ <KEYWORD2>FetchVerbs</KEYWORD2>
+ <KEYWORD2>Files</KEYWORD2>
+ <KEYWORD2>FillCache</KEYWORD2>
+ <KEYWORD2>Find</KEYWORD2>
+ <KEYWORD2>FindFirst</KEYWORD2>
+ <KEYWORD2>FindItem</KEYWORD2>
+ <KEYWORD2>FindLast</KEYWORD2>
+ <KEYWORD2>FindNext</KEYWORD2>
+ <KEYWORD2>FindPrevious</KEYWORD2>
+ <KEYWORD2>Forward</KEYWORD2>
+ <KEYWORD2>GetBookmark</KEYWORD2>
+ <KEYWORD2>GetChunk</KEYWORD2>
+ <KEYWORD2>GetClipString</KEYWORD2>
+ <KEYWORD2>GetData</KEYWORD2>
+ <KEYWORD2>GetFirstVisible</KEYWORD2>
+ <KEYWORD2>GetFormat</KEYWORD2>
+ <KEYWORD2>GetHeader</KEYWORD2>
+ <KEYWORD2>GetLineFromChar</KEYWORD2>
+ <KEYWORD2>GetNumTicks</KEYWORD2>
+ <KEYWORD2>GetRows</KEYWORD2>
+ <KEYWORD2>GetSelectedPart</KEYWORD2>
+ <KEYWORD2>GetText</KEYWORD2>
+ <KEYWORD2>GetVisibleCount</KEYWORD2>
+ <KEYWORD2>GoBack</KEYWORD2>
+ <KEYWORD2>GoForward</KEYWORD2>
+ <KEYWORD2>Hide</KEYWORD2>
+ <KEYWORD2>HitTest</KEYWORD2>
+ <KEYWORD2>HoldFields</KEYWORD2>
+ <KEYWORD2>Idle</KEYWORD2>
+ <KEYWORD2>InitializeLabels</KEYWORD2>
+ <KEYWORD2>InsertColumnLabels</KEYWORD2>
+ <KEYWORD2>InsertColumns</KEYWORD2>
+ <KEYWORD2>InsertObjDlg</KEYWORD2>
+ <KEYWORD2>InsertRowLabels</KEYWORD2>
+ <KEYWORD2>InsertRows</KEYWORD2>
+ <KEYWORD2>Item</KEYWORD2>
+ <KEYWORD2>KillDoc</KEYWORD2>
+ <KEYWORD2>Layout</KEYWORD2>
+ <KEYWORD2>Line</KEYWORD2>
+ <KEYWORD2>LinkExecute</KEYWORD2>
+ <KEYWORD2>LinkPoke</KEYWORD2>
+ <KEYWORD2>LinkRequest</KEYWORD2>
+ <KEYWORD2>LinkSend</KEYWORD2>
+ <KEYWORD2>Listen</KEYWORD2>
+ <KEYWORD2>LoadFile</KEYWORD2>
+ <KEYWORD2>LoadResData</KEYWORD2>
+ <KEYWORD2>LoadResPicture</KEYWORD2>
+ <KEYWORD2>LoadResString</KEYWORD2>
+ <KEYWORD2>LogEvent</KEYWORD2>
+ <KEYWORD2>MakeCompileFile</KEYWORD2>
+ <KEYWORD2>MakeReplica</KEYWORD2>
+ <KEYWORD2>MoreResults</KEYWORD2>
+ <KEYWORD2>Move</KEYWORD2>
+ <KEYWORD2>MoveData</KEYWORD2>
+ <KEYWORD2>MoveFirst</KEYWORD2>
+ <KEYWORD2>MoveLast</KEYWORD2>
+ <KEYWORD2>MoveNext</KEYWORD2>
+ <KEYWORD2>MovePrevious</KEYWORD2>
+ <KEYWORD2>NavigateTo</KEYWORD2>
+ <KEYWORD2>NewPage</KEYWORD2>
+ <KEYWORD2>NewPassword</KEYWORD2>
+ <KEYWORD2>NextRecordset</KEYWORD2>
+ <KEYWORD2>OLEDrag</KEYWORD2>
+ <KEYWORD2>OnAddinsUpdate</KEYWORD2>
+ <KEYWORD2>OnConnection</KEYWORD2>
+ <KEYWORD2>OnDisconnection</KEYWORD2>
+ <KEYWORD2>OnStartupComplete</KEYWORD2>
+ <KEYWORD2>Open</KEYWORD2>
+ <KEYWORD2>OpenConnection</KEYWORD2>
+ <KEYWORD2>OpenDatabase</KEYWORD2>
+ <KEYWORD2>OpenQueryDef</KEYWORD2>
+ <KEYWORD2>OpenRecordset</KEYWORD2>
+ <KEYWORD2>OpenResultset</KEYWORD2>
+ <KEYWORD2>OpenURL</KEYWORD2>
+ <KEYWORD2>Overlay</KEYWORD2>
+ <KEYWORD2>PaintPicture</KEYWORD2>
+ <KEYWORD2>Paste</KEYWORD2>
+ <KEYWORD2>PastSpecialDlg</KEYWORD2>
+ <KEYWORD2>PeekData</KEYWORD2>
+ <KEYWORD2>Play</KEYWORD2>
+ <KEYWORD2>Point</KEYWORD2>
+ <KEYWORD2>PopulatePartial</KEYWORD2>
+ <KEYWORD2>PopupMenu</KEYWORD2>
+ <KEYWORD2>Print</KEYWORD2>
+ <KEYWORD2>PrintForm</KEYWORD2>
+ <KEYWORD2>PropertyChanged</KEYWORD2>
+ <KEYWORD2>PSet</KEYWORD2>
+ <KEYWORD2>Quit</KEYWORD2>
+ <KEYWORD2>Raise</KEYWORD2>
+ <KEYWORD2>RandomDataFill</KEYWORD2>
+ <KEYWORD2>RandomFillColumns</KEYWORD2>
+ <KEYWORD2>RandomFillRows</KEYWORD2>
+ <KEYWORD2>rdoCreateEnvironment</KEYWORD2>
+ <KEYWORD2>rdoRegisterDataSource</KEYWORD2>
+ <KEYWORD2>ReadFromFile</KEYWORD2>
+ <KEYWORD2>ReadProperty</KEYWORD2>
+ <KEYWORD2>Rebind</KEYWORD2>
+ <KEYWORD2>ReFill</KEYWORD2>
+ <KEYWORD2>Refresh</KEYWORD2>
+ <KEYWORD2>RefreshLink</KEYWORD2>
+ <KEYWORD2>RegisterDatabase</KEYWORD2>
+ <KEYWORD2>Reload</KEYWORD2>
+ <KEYWORD2>Remove</KEYWORD2>
+ <KEYWORD2>RemoveAddInFromToolbar</KEYWORD2>
+ <KEYWORD2>RemoveItem</KEYWORD2>
+ <KEYWORD2>Render</KEYWORD2>
+ <KEYWORD2>RepairDatabase</KEYWORD2>
+ <KEYWORD2>Reply</KEYWORD2>
+ <KEYWORD2>ReplyAll</KEYWORD2>
+ <KEYWORD2>Requery</KEYWORD2>
+ <KEYWORD2>ResetCustom</KEYWORD2>
+ <KEYWORD2>ResetCustomLabel</KEYWORD2>
+ <KEYWORD2>ResolveName</KEYWORD2>
+ <KEYWORD2>RestoreToolbar</KEYWORD2>
+ <KEYWORD2>Resync</KEYWORD2>
+ <KEYWORD2>Rollback</KEYWORD2>
+ <KEYWORD2>RollbackTrans</KEYWORD2>
+ <KEYWORD2>RowBookmark</KEYWORD2>
+ <KEYWORD2>RowContaining</KEYWORD2>
+ <KEYWORD2>RowTop</KEYWORD2>
+ <KEYWORD2>Save</KEYWORD2>
+ <KEYWORD2>SaveAs</KEYWORD2>
+ <KEYWORD2>SaveFile</KEYWORD2>
+ <KEYWORD2>SaveToFile</KEYWORD2>
+ <KEYWORD2>SaveToolbar</KEYWORD2>
+ <KEYWORD2>SaveToOle1File</KEYWORD2>
+ <KEYWORD2>Scale</KEYWORD2>
+ <KEYWORD2>ScaleX</KEYWORD2>
+ <KEYWORD2>ScaleY</KEYWORD2>
+ <KEYWORD2>Scroll</KEYWORD2>
+ <KEYWORD2>Select</KEYWORD2>
+ <KEYWORD2>SelectAll</KEYWORD2>
+ <KEYWORD2>SelectPart</KEYWORD2>
+ <KEYWORD2>SelPrint</KEYWORD2>
+ <KEYWORD2>Send</KEYWORD2>
+ <KEYWORD2>SendData</KEYWORD2>
+ <KEYWORD2>Set</KEYWORD2>
+ <KEYWORD2>SetAutoServerSettings</KEYWORD2>
+ <KEYWORD2>SetData</KEYWORD2>
+ <KEYWORD2>SetFocus</KEYWORD2>
+ <KEYWORD2>SetOption</KEYWORD2>
+ <KEYWORD2>SetSize</KEYWORD2>
+ <KEYWORD2>SetText</KEYWORD2>
+ <KEYWORD2>SetViewport</KEYWORD2>
+ <KEYWORD2>Show</KEYWORD2>
+ <KEYWORD2>ShowColor</KEYWORD2>
+ <KEYWORD2>ShowFont</KEYWORD2>
+ <KEYWORD2>ShowHelp</KEYWORD2>
+ <KEYWORD2>ShowOpen</KEYWORD2>
+ <KEYWORD2>ShowPrinter</KEYWORD2>
+ <KEYWORD2>ShowSave</KEYWORD2>
+ <KEYWORD2>ShowWhatsThis</KEYWORD2>
+ <KEYWORD2>SignOff</KEYWORD2>
+ <KEYWORD2>SignOn</KEYWORD2>
+ <KEYWORD2>Size</KEYWORD2>
+ <KEYWORD2>Span</KEYWORD2>
+ <KEYWORD2>SplitContaining</KEYWORD2>
+ <KEYWORD2>StartLabelEdit</KEYWORD2>
+ <KEYWORD2>StartLogging</KEYWORD2>
+ <KEYWORD2>Stop</KEYWORD2>
+ <KEYWORD2>Synchronize</KEYWORD2>
+ <KEYWORD2>TextHeight</KEYWORD2>
+ <KEYWORD2>TextWidth</KEYWORD2>
+ <KEYWORD2>ToDefaults</KEYWORD2>
+ <KEYWORD2>TwipsToChartPart</KEYWORD2>
+ <KEYWORD2>TypeByChartType</KEYWORD2>
+ <KEYWORD2>Update</KEYWORD2>
+ <KEYWORD2>UpdateControls</KEYWORD2>
+ <KEYWORD2>UpdateRecord</KEYWORD2>
+ <KEYWORD2>UpdateRow</KEYWORD2>
+ <KEYWORD2>Upto</KEYWORD2>
+ <KEYWORD2>WhatsThisMode</KEYWORD2>
+ <KEYWORD2>WriteProperty</KEYWORD2>
+ <KEYWORD2>ZOrder</KEYWORD2>
+
+ <!--Events-->
+ <KEYWORD3>AccessKeyPress</KEYWORD3>
+ <KEYWORD3>AfterAddFile</KEYWORD3>
+ <KEYWORD3>AfterChangeFileName</KEYWORD3>
+ <KEYWORD3>AfterCloseFile</KEYWORD3>
+ <KEYWORD3>AfterColEdit</KEYWORD3>
+ <KEYWORD3>AfterColUpdate</KEYWORD3>
+ <KEYWORD3>AfterDelete</KEYWORD3>
+ <KEYWORD3>AfterInsert</KEYWORD3>
+ <KEYWORD3>AfterLabelEdit</KEYWORD3>
+ <KEYWORD3>AfterRemoveFile</KEYWORD3>
+ <KEYWORD3>AfterUpdate</KEYWORD3>
+ <KEYWORD3>AfterWriteFile</KEYWORD3>
+ <KEYWORD3>AmbienChanged</KEYWORD3>
+ <KEYWORD3>ApplyChanges</KEYWORD3>
+ <KEYWORD3>Associate</KEYWORD3>
+ <KEYWORD3>AsyncReadComplete</KEYWORD3>
+ <KEYWORD3>AxisActivated</KEYWORD3>
+ <KEYWORD3>AxisLabelActivated</KEYWORD3>
+ <KEYWORD3>AxisLabelSelected</KEYWORD3>
+ <KEYWORD3>AxisLabelUpdated</KEYWORD3>
+ <KEYWORD3>AxisSelected</KEYWORD3>
+ <KEYWORD3>AxisTitleActivated</KEYWORD3>
+ <KEYWORD3>AxisTitleSelected</KEYWORD3>
+ <KEYWORD3>AxisTitleUpdated</KEYWORD3>
+ <KEYWORD3>AxisUpdated</KEYWORD3>
+ <KEYWORD3>BeforeClick</KEYWORD3>
+ <KEYWORD3>BeforeColEdit</KEYWORD3>
+ <KEYWORD3>BeforeColUpdate</KEYWORD3>
+ <KEYWORD3>BeforeConnect</KEYWORD3>
+ <KEYWORD3>BeforeDelete</KEYWORD3>
+ <KEYWORD3>BeforeInsert</KEYWORD3>
+ <KEYWORD3>BeforeLabelEdit</KEYWORD3>
+ <KEYWORD3>BeforeLoadFile</KEYWORD3>
+ <KEYWORD3>BeforeUpdate</KEYWORD3>
+ <KEYWORD3>ButtonClick</KEYWORD3>
+ <KEYWORD3>ButtonCompleted</KEYWORD3>
+ <KEYWORD3>ButtonGotFocus</KEYWORD3>
+ <KEYWORD3>ButtonLostFocus</KEYWORD3>
+ <KEYWORD3>Change</KEYWORD3>
+ <KEYWORD3>ChartActivated</KEYWORD3>
+ <KEYWORD3>ChartSelected</KEYWORD3>
+ <KEYWORD3>ChartUpdated</KEYWORD3>
+ <KEYWORD3>Click</KEYWORD3>
+ <KEYWORD3>ColEdit</KEYWORD3>
+ <KEYWORD3>Collapse</KEYWORD3>
+ <KEYWORD3>ColResize</KEYWORD3>
+ <KEYWORD3>ColumnClick</KEYWORD3>
+ <KEYWORD3>Compare</KEYWORD3>
+ <KEYWORD3>ConfigChageCancelled</KEYWORD3>
+ <KEYWORD3>ConfigChanged</KEYWORD3>
+ <KEYWORD3>ConnectionRequest</KEYWORD3>
+ <KEYWORD3>DataArrival</KEYWORD3>
+ <KEYWORD3>DataChanged</KEYWORD3>
+ <KEYWORD3>DataUpdated</KEYWORD3>
+ <KEYWORD3>DblClick</KEYWORD3>
+ <KEYWORD3>Deactivate</KEYWORD3>
+ <KEYWORD3>DeviceArrival</KEYWORD3>
+ <KEYWORD3>DeviceOtherEvent</KEYWORD3>
+ <KEYWORD3>DeviceQueryRemove</KEYWORD3>
+ <KEYWORD3>DeviceQueryRemoveFailed</KEYWORD3>
+ <KEYWORD3>DeviceRemoveComplete</KEYWORD3>
+ <KEYWORD3>DeviceRemovePending</KEYWORD3>
+ <KEYWORD3>DevModeChange</KEYWORD3>
+ <KEYWORD3>Disconnect</KEYWORD3>
+ <KEYWORD3>DisplayChanged</KEYWORD3>
+ <KEYWORD3>Dissociate</KEYWORD3>
+ <KEYWORD3>DoGetNewFileName</KEYWORD3>
+ <KEYWORD3>Done</KEYWORD3>
+ <KEYWORD3>DonePainting</KEYWORD3>
+ <KEYWORD3>DownClick</KEYWORD3>
+ <KEYWORD3>DragDrop</KEYWORD3>
+ <KEYWORD3>DragOver</KEYWORD3>
+ <KEYWORD3>DropDown</KEYWORD3>
+ <KEYWORD3>EditProperty</KEYWORD3>
+ <KEYWORD3>EnterCell</KEYWORD3>
+ <KEYWORD3>EnterFocus</KEYWORD3>
+ <KEYWORD3>Event</KEYWORD3>
+ <KEYWORD3>ExitFocus</KEYWORD3>
+ <KEYWORD3>Expand</KEYWORD3>
+ <KEYWORD3>FootnoteActivated</KEYWORD3>
+ <KEYWORD3>FootnoteSelected</KEYWORD3>
+ <KEYWORD3>FootnoteUpdated</KEYWORD3>
+ <KEYWORD3>GotFocus</KEYWORD3>
+ <KEYWORD3>HeadClick</KEYWORD3>
+ <KEYWORD3>InfoMessage</KEYWORD3>
+ <KEYWORD3>Initialize</KEYWORD3>
+ <KEYWORD3>IniProperties</KEYWORD3>
+ <KEYWORD3>ItemActivated</KEYWORD3>
+ <KEYWORD3>ItemAdded</KEYWORD3>
+ <KEYWORD3>ItemCheck</KEYWORD3>
+ <KEYWORD3>ItemClick</KEYWORD3>
+ <KEYWORD3>ItemReloaded</KEYWORD3>
+ <KEYWORD3>ItemRemoved</KEYWORD3>
+ <KEYWORD3>ItemRenamed</KEYWORD3>
+ <KEYWORD3>ItemSeletected</KEYWORD3>
+ <KEYWORD3>KeyDown</KEYWORD3>
+ <KEYWORD3>KeyPress</KEYWORD3>
+ <KEYWORD3>KeyUp</KEYWORD3>
+ <KEYWORD3>LeaveCell</KEYWORD3>
+ <KEYWORD3>LegendActivated</KEYWORD3>
+ <KEYWORD3>LegendSelected</KEYWORD3>
+ <KEYWORD3>LegendUpdated</KEYWORD3>
+ <KEYWORD3>LinkClose</KEYWORD3>
+ <KEYWORD3>LinkError</KEYWORD3>
+ <KEYWORD3>LinkNotify</KEYWORD3>
+ <KEYWORD3>LinkOpen</KEYWORD3>
+ <KEYWORD3>Load</KEYWORD3>
+ <KEYWORD3>LostFocus</KEYWORD3>
+ <KEYWORD3>MouseDown</KEYWORD3>
+ <KEYWORD3>MouseMove</KEYWORD3>
+ <KEYWORD3>MouseUp</KEYWORD3>
+ <KEYWORD3>NodeClick</KEYWORD3>
+ <KEYWORD3>ObjectMove</KEYWORD3>
+ <KEYWORD3>OLECompleteDrag</KEYWORD3>
+ <KEYWORD3>OLEDragDrop</KEYWORD3>
+ <KEYWORD3>OLEDragOver</KEYWORD3>
+ <KEYWORD3>OLEGiveFeedback</KEYWORD3>
+ <KEYWORD3>OLESetData</KEYWORD3>
+ <KEYWORD3>OLEStartDrag</KEYWORD3>
+ <KEYWORD3>OnAddNew</KEYWORD3>
+ <KEYWORD3>OnComm</KEYWORD3>
+ <KEYWORD3>Paint</KEYWORD3>
+ <KEYWORD3>PanelClick</KEYWORD3>
+ <KEYWORD3>PanelDblClick</KEYWORD3>
+ <KEYWORD3>PathChange</KEYWORD3>
+ <KEYWORD3>PatternChange</KEYWORD3>
+ <KEYWORD3>PlotActivated</KEYWORD3>
+ <KEYWORD3>PlotSelected</KEYWORD3>
+ <KEYWORD3>PlotUpdated</KEYWORD3>
+ <KEYWORD3>PointActivated</KEYWORD3>
+ <KEYWORD3>PointLabelActivated</KEYWORD3>
+ <KEYWORD3>PointLabelSelected</KEYWORD3>
+ <KEYWORD3>PointLabelUpdated</KEYWORD3>
+ <KEYWORD3>PointSelected</KEYWORD3>
+ <KEYWORD3>PointUpdated</KEYWORD3>
+ <KEYWORD3>PowerQuerySuspend</KEYWORD3>
+ <KEYWORD3>PowerResume</KEYWORD3>
+ <KEYWORD3>PowerStatusChanged</KEYWORD3>
+ <KEYWORD3>PowerSuspend</KEYWORD3>
+ <KEYWORD3>QueryChangeConfig</KEYWORD3>
+ <KEYWORD3>QueryComplete</KEYWORD3>
+ <KEYWORD3>QueryCompleted</KEYWORD3>
+ <KEYWORD3>QueryTimeout</KEYWORD3>
+ <KEYWORD3>QueryUnload</KEYWORD3>
+ <KEYWORD3>ReadProperties</KEYWORD3>
+ <KEYWORD3>Reposition</KEYWORD3>
+ <KEYWORD3>RequestChangeFileName</KEYWORD3>
+ <KEYWORD3>RequestWriteFile</KEYWORD3>
+ <KEYWORD3>Resize</KEYWORD3>
+ <KEYWORD3>ResultsChanged</KEYWORD3>
+ <KEYWORD3>RowColChange</KEYWORD3>
+ <KEYWORD3>RowCurrencyChange</KEYWORD3>
+ <KEYWORD3>RowResize</KEYWORD3>
+ <KEYWORD3>RowStatusChanged</KEYWORD3>
+ <KEYWORD3>SelChange</KEYWORD3>
+ <KEYWORD3>SelectionChanged</KEYWORD3>
+ <KEYWORD3>SendComplete</KEYWORD3>
+ <KEYWORD3>SendProgress</KEYWORD3>
+ <KEYWORD3>SeriesActivated</KEYWORD3>
+ <KEYWORD3>SeriesSelected</KEYWORD3>
+ <KEYWORD3>SeriesUpdated</KEYWORD3>
+ <KEYWORD3>SettingChanged</KEYWORD3>
+ <KEYWORD3>SplitChange</KEYWORD3>
+ <KEYWORD3>StateChanged</KEYWORD3>
+ <KEYWORD3>StatusUpdate</KEYWORD3>
+ <KEYWORD3>SysColorsChanged</KEYWORD3>
+ <KEYWORD3>Terminate</KEYWORD3>
+ <KEYWORD3>TimeChanged</KEYWORD3>
+ <KEYWORD3>TitleActivated</KEYWORD3>
+ <KEYWORD3>TitleSelected</KEYWORD3>
+ <KEYWORD3>TitleActivated</KEYWORD3>
+ <KEYWORD3>UnboundAddData</KEYWORD3>
+ <KEYWORD3>UnboundDeleteRow</KEYWORD3>
+ <KEYWORD3>UnboundGetRelativeBookmark</KEYWORD3>
+ <KEYWORD3>UnboundReadData</KEYWORD3>
+ <KEYWORD3>UnboundWriteData</KEYWORD3>
+ <KEYWORD3>Unload</KEYWORD3>
+ <KEYWORD3>UpClick</KEYWORD3>
+ <KEYWORD3>Updated</KEYWORD3>
+ <KEYWORD3>Validate</KEYWORD3>
+ <KEYWORD3>ValidationError</KEYWORD3>
+ <KEYWORD3>WillAssociate</KEYWORD3>
+ <KEYWORD3>WillChangeData</KEYWORD3>
+ <KEYWORD3>WillDissociate</KEYWORD3>
+ <KEYWORD3>WillExecute</KEYWORD3>
+ <KEYWORD3>WillUpdateRows</KEYWORD3>
+ <KEYWORD3>WithEvents</KEYWORD3>
+ <KEYWORD3>WriteProperties</KEYWORD3>
+
+ <!--Statements-->
+ <KEYWORD4>AppActivate</KEYWORD4>
+ <KEYWORD4>Base</KEYWORD4>
+ <KEYWORD4>Beep</KEYWORD4>
+ <KEYWORD4>Call</KEYWORD4>
+ <KEYWORD4>Case</KEYWORD4>
+ <KEYWORD4>ChDir</KEYWORD4>
+ <KEYWORD4>ChDrive</KEYWORD4>
+ <KEYWORD4>Const</KEYWORD4>
+ <KEYWORD4>Declare</KEYWORD4>
+ <KEYWORD4>DefBool</KEYWORD4>
+ <KEYWORD4>DefByte</KEYWORD4>
+ <KEYWORD4>DefCur</KEYWORD4>
+ <KEYWORD4>DefDate</KEYWORD4>
+ <KEYWORD4>DefDbl</KEYWORD4>
+ <KEYWORD4>DefDec</KEYWORD4>
+ <KEYWORD4>DefInt</KEYWORD4>
+ <KEYWORD4>DefLng</KEYWORD4>
+ <KEYWORD4>DefObj</KEYWORD4>
+ <KEYWORD4>DefSng</KEYWORD4>
+ <KEYWORD4>DefStr</KEYWORD4>
+ <KEYWORD4>Deftype</KEYWORD4>
+ <KEYWORD4>DefVar</KEYWORD4>
+ <KEYWORD4>DeleteSetting</KEYWORD4>
+ <KEYWORD4>Dim</KEYWORD4>
+ <KEYWORD4>Do</KEYWORD4>
+ <KEYWORD4>Each</KEYWORD4>
+ <KEYWORD4>Else</KEYWORD4>
+ <KEYWORD4>ElseIf</KEYWORD4>
+ <KEYWORD4>End</KEYWORD4>
+ <KEYWORD4>Enum</KEYWORD4>
+ <KEYWORD4>Erase</KEYWORD4>
+ <KEYWORD4>Error</KEYWORD4>
+ <KEYWORD4>Event</KEYWORD4>
+ <KEYWORD4>Exit</KEYWORD4>
+ <KEYWORD4>Explicit</KEYWORD4>
+ <KEYWORD4>False</KEYWORD4>
+ <KEYWORD4>FileCopy</KEYWORD4>
+ <KEYWORD4>For</KEYWORD4>
+ <KEYWORD4>ForEach</KEYWORD4>
+ <KEYWORD4>Friend</KEYWORD4>
+ <KEYWORD4>Function</KEYWORD4>
+ <KEYWORD4>Get</KEYWORD4>
+ <KEYWORD4>GoSub</KEYWORD4>
+ <KEYWORD4>GoTo</KEYWORD4>
+ <KEYWORD4>If</KEYWORD4>
+ <KEYWORD4>Implements</KEYWORD4>
+ <KEYWORD4>In</KEYWORD4>
+ <KEYWORD4>Kill</KEYWORD4>
+ <KEYWORD4>Let</KEYWORD4>
+ <KEYWORD4>LineInput</KEYWORD4>
+ <KEYWORD4>Lock</KEYWORD4>
+ <KEYWORD4>Loop</KEYWORD4>
+ <KEYWORD4>LSet</KEYWORD4>
+ <KEYWORD4>MkDir</KEYWORD4>
+ <KEYWORD4>Name</KEYWORD4>
+ <KEYWORD4>New</KEYWORD4>
+ <KEYWORD4>Next</KEYWORD4>
+ <KEYWORD4>Nothing</KEYWORD4>
+ <KEYWORD4>Null</KEYWORD4>
+ <KEYWORD4>OnError</KEYWORD4>
+ <KEYWORD4>On</KEYWORD4>
+ <KEYWORD4>Option</KEYWORD4>
+ <KEYWORD4>Private</KEYWORD4>
+ <KEYWORD4>Property</KEYWORD4>
+ <KEYWORD4>Public</KEYWORD4>
+ <KEYWORD4>Put</KEYWORD4>
+ <KEYWORD4>RaiseEvent</KEYWORD4>
+ <KEYWORD4>Randomize</KEYWORD4>
+ <KEYWORD4>ReDim</KEYWORD4>
+ <KEYWORD4>Rem</KEYWORD4>
+ <KEYWORD4>Reset</KEYWORD4>
+ <KEYWORD4>Resume</KEYWORD4>
+ <KEYWORD4>Return</KEYWORD4>
+ <KEYWORD4>RmDir</KEYWORD4>
+ <KEYWORD4>RSet</KEYWORD4>
+ <KEYWORD4>SavePicture</KEYWORD4>
+ <KEYWORD4>SaveSetting</KEYWORD4>
+ <KEYWORD4>SendKeys</KEYWORD4>
+ <KEYWORD4>SetAttr</KEYWORD4>
+ <KEYWORD4>Static</KEYWORD4>
+ <KEYWORD4>Sub</KEYWORD4>
+ <KEYWORD4>Then</KEYWORD4>
+ <KEYWORD4>To</KEYWORD4>
+ <KEYWORD4>True</KEYWORD4>
+ <KEYWORD4>Type</KEYWORD4>
+ <KEYWORD4>Unlock</KEYWORD4>
+ <KEYWORD4>Until</KEYWORD4>
+ <KEYWORD4>Wend</KEYWORD4>
+ <KEYWORD4>While</KEYWORD4>
+ <KEYWORD4>Width</KEYWORD4>
+ <KEYWORD4>With</KEYWORD4>
+ <KEYWORD4>Write</KEYWORD4>
+
+ <!--Data types-->
+ <KEYWORD4>ADODB</KEYWORD4>
+ <KEYWORD4>Boolean</KEYWORD4>
+ <KEYWORD4>Byte</KEYWORD4>
+ <KEYWORD4>Connection</KEYWORD4>
+ <KEYWORD4>Currency</KEYWORD4>
+ <KEYWORD4>Date</KEYWORD4>
+ <KEYWORD4>Double</KEYWORD4>
+ <KEYWORD4>Integer</KEYWORD4>
+ <KEYWORD4>Long</KEYWORD4>
+ <KEYWORD4>Recordset</KEYWORD4>
+ <KEYWORD4>Single</KEYWORD4>
+ <KEYWORD4>String</KEYWORD4>
+ <KEYWORD4>Variant</KEYWORD4>
+
+ <!--Constants -->
+ <LITERAL3>adAddNew</LITERAL3>
+ <LITERAL3>adAffectAll</LITERAL3>
+ <LITERAL3>adAffectAllChapters</LITERAL3>
+ <LITERAL3>adAffectCurrent</LITERAL3>
+ <LITERAL3>adAffectGroup</LITERAL3>
+ <LITERAL3>adApproxPosition</LITERAL3>
+ <LITERAL3>adAsyncConnect</LITERAL3>
+ <LITERAL3>adAsyncExecute</LITERAL3>
+ <LITERAL3>adAsyncFetch</LITERAL3>
+ <LITERAL3>adAsyncFetchNonBlocking</LITERAL3>
+ <LITERAL3>adBSTR</LITERAL3>
+ <LITERAL3>adBigInt</LITERAL3>
+ <LITERAL3>adBinary</LITERAL3>
+ <LITERAL3>adBookmark</LITERAL3>
+ <LITERAL3>adBookmarkCurrent</LITERAL3>
+ <LITERAL3>adBookmarkFirst</LITERAL3>
+ <LITERAL3>adBookmarkLast</LITERAL3>
+ <LITERAL3>adBoolean</LITERAL3>
+ <LITERAL3>adChapter</LITERAL3>
+ <LITERAL3>adChar</LITERAL3>
+ <LITERAL3>adClipString</LITERAL3>
+ <LITERAL3>adCmdFile</LITERAL3>
+ <LITERAL3>adCmdStoredProc</LITERAL3>
+ <LITERAL3>adCmdTable</LITERAL3>
+ <LITERAL3>adCmdTableDirect</LITERAL3>
+ <LITERAL3>adCmdText</LITERAL3>
+ <LITERAL3>adCmdUnknown</LITERAL3>
+ <LITERAL3>adCompareEqual</LITERAL3>
+ <LITERAL3>adCompareGreaterThan</LITERAL3>
+ <LITERAL3>adCompareLessThan</LITERAL3>
+ <LITERAL3>adCompareNotComparable</LITERAL3>
+ <LITERAL3>adCompareNotEqual</LITERAL3>
+ <LITERAL3>adCriteriaAllCols</LITERAL3>
+ <LITERAL3>adCriteriaKey</LITERAL3>
+ <LITERAL3>adCriteriaTimeStamp</LITERAL3>
+ <LITERAL3>adCriteriaUpdCols</LITERAL3>
+ <LITERAL3>adCurrency</LITERAL3>
+ <LITERAL3>adDBDate</LITERAL3>
+ <LITERAL3>adDBFileTime</LITERAL3>
+ <LITERAL3>adDBTime</LITERAL3>
+ <LITERAL3>adDBTimeStamp</LITERAL3>
+ <LITERAL3>adDate</LITERAL3>
+ <LITERAL3>adDecimal</LITERAL3>
+ <LITERAL3>adDelete</LITERAL3>
+ <LITERAL3>adDouble</LITERAL3>
+ <LITERAL3>adEditAdd</LITERAL3>
+ <LITERAL3>adEditDelete</LITERAL3>
+ <LITERAL3>adEditInProgress</LITERAL3>
+ <LITERAL3>adEditNone</LITERAL3>
+ <LITERAL3>adEmpty</LITERAL3>
+ <LITERAL3>adErrBoundToCommand</LITERAL3>
+ <LITERAL3>adErrDataConversion</LITERAL3>
+ <LITERAL3>adErrFeatureNotAvailable</LITERAL3>
+ <LITERAL3>adErrIllegalOperation</LITERAL3>
+ <LITERAL3>adErrInTransaction</LITERAL3>
+ <LITERAL3>adErrInvalidArgument</LITERAL3>
+ <LITERAL3>adErrInvalidConnection</LITERAL3>
+ <LITERAL3>adErrInvalidParamInfo</LITERAL3>
+ <LITERAL3>adErrItemNotFound</LITERAL3>
+ <LITERAL3>adErrNoCurrentRecord</LITERAL3>
+ <LITERAL3>adErrNotExecuting</LITERAL3>
+ <LITERAL3>adErrNotReentrant</LITERAL3>
+ <LITERAL3>adErrObjectClosed</LITERAL3>
+ <LITERAL3>adErrObjectInCollection</LITERAL3>
+ <LITERAL3>adErrObjectNotSet</LITERAL3>
+ <LITERAL3>adErrObjectOpen</LITERAL3>
+ <LITERAL3>adErrOperationCancelled</LITERAL3>
+ <LITERAL3>adErrProviderNotFound</LITERAL3>
+ <LITERAL3>adErrStillConnecting</LITERAL3>
+ <LITERAL3>adErrStillExecuting</LITERAL3>
+ <LITERAL3>adErrUnsafeOperation</LITERAL3>
+ <LITERAL3>adError</LITERAL3>
+ <LITERAL3>adExecuteNoRecords</LITERAL3>
+ <LITERAL3>adFileTime</LITERAL3>
+ <LITERAL3>adFilterAffectedRecords</LITERAL3>
+ <LITERAL3>adFilterConflictingRecords</LITERAL3>
+ <LITERAL3>adFilterFetchedRecords</LITERAL3>
+ <LITERAL3>adFilterNone</LITERAL3>
+ <LITERAL3>adFilterPendingRecords</LITERAL3>
+ <LITERAL3>adFilterPredicate</LITERAL3>
+ <LITERAL3>adFind</LITERAL3>
+ <LITERAL3>adFldCacheDeferred</LITERAL3>
+ <LITERAL3>adFldFixed</LITERAL3>
+ <LITERAL3>adFldIsNullable</LITERAL3>
+ <LITERAL3>adFldKeyColumn</LITERAL3>
+ <LITERAL3>adFldLong</LITERAL3>
+ <LITERAL3>adFldMayBeNull</LITERAL3>
+ <LITERAL3>adFldMayDefer</LITERAL3>
+ <LITERAL3>adFldRowID</LITERAL3>
+ <LITERAL3>adFldRowVersion</LITERAL3>
+ <LITERAL3>adFldUnknownUpdatable</LITERAL3>
+ <LITERAL3>adFldUpdatable</LITERAL3>
+ <LITERAL3>adGUID</LITERAL3>
+ <LITERAL3>adGetRowsRest</LITERAL3>
+ <LITERAL3>adHoldRecords</LITERAL3>
+ <LITERAL3>adIDispatch</LITERAL3>
+ <LITERAL3>adIUnknown</LITERAL3>
+ <LITERAL3>adIndex</LITERAL3>
+ <LITERAL3>adInteger</LITERAL3>
+ <LITERAL3>adLockBatchOptimistic</LITERAL3>
+ <LITERAL3>adLockOptimistic</LITERAL3>
+ <LITERAL3>adLockPessimistic</LITERAL3>
+ <LITERAL3>adLockReadOnly</LITERAL3>
+ <LITERAL3>adLongVarBinary</LITERAL3>
+ <LITERAL3>adLongVarChar</LITERAL3>
+ <LITERAL3>adLongVarWChar</LITERAL3>
+ <LITERAL3>adMarshalAll</LITERAL3>
+ <LITERAL3>adMarshalModifiedOnly</LITERAL3>
+ <LITERAL3>adModeRead</LITERAL3>
+ <LITERAL3>adModeReadWrite</LITERAL3>
+ <LITERAL3>adModeShareDenyNone</LITERAL3>
+ <LITERAL3>adModeShareDenyRead</LITERAL3>
+ <LITERAL3>adModeShareDenyWrite</LITERAL3>
+ <LITERAL3>adModeShareExclusive</LITERAL3>
+ <LITERAL3>adModeUnknown</LITERAL3>
+ <LITERAL3>adModeWrite</LITERAL3>
+ <LITERAL3>adMovePrevious</LITERAL3>
+ <LITERAL3>adNotify</LITERAL3>
+ <LITERAL3>adNumeric</LITERAL3>
+ <LITERAL3>adOpenDynamic</LITERAL3>
+ <LITERAL3>adOpenForwardOnly</LITERAL3>
+ <LITERAL3>adOpenKeyset</LITERAL3>
+ <LITERAL3>adOpenStatic</LITERAL3>
+ <LITERAL3>adParamInput</LITERAL3>
+ <LITERAL3>adParamInputOutput</LITERAL3>
+ <LITERAL3>adParamLong</LITERAL3>
+ <LITERAL3>adParamNullable</LITERAL3>
+ <LITERAL3>adParamOutput</LITERAL3>
+ <LITERAL3>adParamReturnValue</LITERAL3>
+ <LITERAL3>adParamSigned</LITERAL3>
+ <LITERAL3>adParamUnknown</LITERAL3>
+ <LITERAL3>adPersistADTG</LITERAL3>
+ <LITERAL3>adPersistXML</LITERAL3>
+ <LITERAL3>adPosBOF</LITERAL3>
+ <LITERAL3>adPosEOF</LITERAL3>
+ <LITERAL3>adPosUnknown</LITERAL3>
+ <LITERAL3>adPriorityAboveNormal</LITERAL3>
+ <LITERAL3>adPriorityBelowNormal</LITERAL3>
+ <LITERAL3>adPriorityHighest</LITERAL3>
+ <LITERAL3>adPriorityLowest</LITERAL3>
+ <LITERAL3>adPriorityNormal</LITERAL3>
+ <LITERAL3>adPromptAlways</LITERAL3>
+ <LITERAL3>adPromptComplete</LITERAL3>
+ <LITERAL3>adPromptCompleteRequired</LITERAL3>
+ <LITERAL3>adPromptNever</LITERAL3>
+ <LITERAL3>adPropNotSupported</LITERAL3>
+ <LITERAL3>adPropOptional</LITERAL3>
+ <LITERAL3>adPropRead</LITERAL3>
+ <LITERAL3>adPropRequired</LITERAL3>
+ <LITERAL3>adPropVariant</LITERAL3>
+ <LITERAL3>adPropWrite</LITERAL3>
+ <LITERAL3>adRecCanceled</LITERAL3>
+ <LITERAL3>adRecCantRelease</LITERAL3>
+ <LITERAL3>adRecConcurrencyViolation</LITERAL3>
+ <LITERAL3>adRecDBDeleted</LITERAL3>
+ <LITERAL3>adRecDeleted</LITERAL3>
+ <LITERAL3>adRecIntegrityViolation</LITERAL3>
+ <LITERAL3>adRecInvalid</LITERAL3>
+ <LITERAL3>adRecMaxChangesExceeded</LITERAL3>
+ <LITERAL3>adRecModified</LITERAL3>
+ <LITERAL3>adRecMultipleChanges</LITERAL3>
+ <LITERAL3>adRecNew</LITERAL3>
+ <LITERAL3>adRecOK</LITERAL3>
+ <LITERAL3>adRecObjectOpen</LITERAL3>
+ <LITERAL3>adRecOutOfMemory</LITERAL3>
+ <LITERAL3>adRecPendingChanges</LITERAL3>
+ <LITERAL3>adRecPermissionDenied</LITERAL3>
+ <LITERAL3>adRecSchemaViolation</LITERAL3>
+ <LITERAL3>adRecUnmodified</LITERAL3>
+ <LITERAL3>adRecalcAlways</LITERAL3>
+ <LITERAL3>adRecalcUpFront</LITERAL3>
+ <LITERAL3>adResync</LITERAL3>
+ <LITERAL3>adResyncAll</LITERAL3>
+ <LITERAL3>adResyncAllValues</LITERAL3>
+ <LITERAL3>adResyncAutoIncrement</LITERAL3>
+ <LITERAL3>adResyncConflicts</LITERAL3>
+ <LITERAL3>adResyncInserts</LITERAL3>
+ <LITERAL3>adResyncNone</LITERAL3>
+ <LITERAL3>adResyncUnderlyingValues</LITERAL3>
+ <LITERAL3>adResyncUpdates</LITERAL3>
+ <LITERAL3>adRsnAddNew</LITERAL3>
+ <LITERAL3>adRsnClose</LITERAL3>
+ <LITERAL3>adRsnDelete</LITERAL3>
+ <LITERAL3>adRsnFirstChange</LITERAL3>
+ <LITERAL3>adRsnMove</LITERAL3>
+ <LITERAL3>adRsnMoveFirst</LITERAL3>
+ <LITERAL3>adRsnMoveLast</LITERAL3>
+ <LITERAL3>adRsnMoveNext</LITERAL3>
+ <LITERAL3>adRsnMovePrevious</LITERAL3>
+ <LITERAL3>adRsnRequery</LITERAL3>
+ <LITERAL3>adRsnResynch</LITERAL3>
+ <LITERAL3>adRsnUndoAddNew</LITERAL3>
+ <LITERAL3>adRsnUndoDelete</LITERAL3>
+ <LITERAL3>adRsnUndoUpdate</LITERAL3>
+ <LITERAL3>adRsnUpdate</LITERAL3>
+ <LITERAL3>adRunAsync</LITERAL3>
+ <LITERAL3>adSchemaAsserts</LITERAL3>
+ <LITERAL3>adSchemaCatalogs</LITERAL3>
+ <LITERAL3>adSchemaCharacterSets</LITERAL3>
+ <LITERAL3>adSchemaCheckConstraints</LITERAL3>
+ <LITERAL3>adSchemaCollations</LITERAL3>
+ <LITERAL3>adSchemaColumnPrivileges</LITERAL3>
+ <LITERAL3>adSchemaColumns</LITERAL3>
+ <LITERAL3>adSchemaColumnsDomainUsage</LITERAL3>
+ <LITERAL3>adSchemaConstraintColumnUsage</LITERAL3>
+ <LITERAL3>adSchemaConstraintTableUsage</LITERAL3>
+ <LITERAL3>adSchemaCubes</LITERAL3>
+ <LITERAL3>adSchemaDBInfoKeywords</LITERAL3>
+ <LITERAL3>adSchemaDBInfoLiterals</LITERAL3>
+ <LITERAL3>adSchemaDimensions</LITERAL3>
+ <LITERAL3>adSchemaForeignKeys</LITERAL3>
+ <LITERAL3>adSchemaHierarchies</LITERAL3>
+ <LITERAL3>adSchemaIndexes</LITERAL3>
+ <LITERAL3>adSchemaKeyColumnUsage</LITERAL3>
+ <LITERAL3>adSchemaLevels</LITERAL3>
+ <LITERAL3>adSchemaMeasures</LITERAL3>
+ <LITERAL3>adSchemaMembers</LITERAL3>
+ <LITERAL3>adSchemaPrimaryKeys</LITERAL3>
+ <LITERAL3>adSchemaProcedureColumns</LITERAL3>
+ <LITERAL3>adSchemaProcedureParameters</LITERAL3>
+ <LITERAL3>adSchemaProcedures</LITERAL3>
+ <LITERAL3>adSchemaProperties</LITERAL3>
+ <LITERAL3>adSchemaProviderSpecific</LITERAL3>
+ <LITERAL3>adSchemaProviderTypes</LITERAL3>
+ <LITERAL3>adSchemaReferentialConstraints</LITERAL3>
+ <LITERAL3>adSchemaSQLLanguages</LITERAL3>
+ <LITERAL3>adSchemaSchemata</LITERAL3>
+ <LITERAL3>adSchemaStatistics</LITERAL3>
+ <LITERAL3>adSchemaTableConstraints</LITERAL3>
+ <LITERAL3>adSchemaTablePrivileges</LITERAL3>
+ <LITERAL3>adSchemaTables</LITERAL3>
+ <LITERAL3>adSchemaTranslations</LITERAL3>
+ <LITERAL3>adSchemaUsagePrivileges</LITERAL3>
+ <LITERAL3>adSchemaViewColumnUsage</LITERAL3>
+ <LITERAL3>adSchemaViewTableUsage</LITERAL3>
+ <LITERAL3>adSchemaViews</LITERAL3>
+ <LITERAL3>adSearchBackward</LITERAL3>
+ <LITERAL3>adSearchForward</LITERAL3>
+ <LITERAL3>adSeek</LITERAL3>
+ <LITERAL3>adSeekAfter</LITERAL3>
+ <LITERAL3>adSeekAfterEQ</LITERAL3>
+ <LITERAL3>adSeekBefore</LITERAL3>
+ <LITERAL3>adSeekBeforeEQ</LITERAL3>
+ <LITERAL3>adSeekFirstEQ</LITERAL3>
+ <LITERAL3>adSeekLastEQ</LITERAL3>
+ <LITERAL3>adSingle</LITERAL3>
+ <LITERAL3>adSmallInt</LITERAL3>
+ <LITERAL3>adStateClosed</LITERAL3>
+ <LITERAL3>adStateConnecting</LITERAL3>
+ <LITERAL3>adStateExecuting</LITERAL3>
+ <LITERAL3>adStateFetching</LITERAL3>
+ <LITERAL3>adStateOpen</LITERAL3>
+ <LITERAL3>adStatusCancel</LITERAL3>
+ <LITERAL3>adStatusCantDeny</LITERAL3>
+ <LITERAL3>adStatusErrorsOccurred</LITERAL3>
+ <LITERAL3>adStatusOK</LITERAL3>
+ <LITERAL3>adStatusUnwantedEvent</LITERAL3>
+ <LITERAL3>adStringHTML</LITERAL3>
+ <LITERAL3>adStringXML</LITERAL3>
+ <LITERAL3>adTinyInt</LITERAL3>
+ <LITERAL3>adUnsignedBigInt</LITERAL3>
+ <LITERAL3>adUnsignedInt</LITERAL3>
+ <LITERAL3>adUnsignedSmallInt</LITERAL3>
+ <LITERAL3>adUnsignedTinyInt</LITERAL3>
+ <LITERAL3>adUpdate</LITERAL3>
+ <LITERAL3>adUpdateBatch</LITERAL3>
+ <LITERAL3>adUseClient</LITERAL3>
+ <LITERAL3>adUseServer</LITERAL3>
+ <LITERAL3>adUserDefined</LITERAL3>
+ <LITERAL3>adVarBinary</LITERAL3>
+ <LITERAL3>adVarChar</LITERAL3>
+ <LITERAL3>adVarNumeric</LITERAL3>
+ <LITERAL3>adVarWChar</LITERAL3>
+ <LITERAL3>adVariant</LITERAL3>
+ <LITERAL3>adWChar</LITERAL3>
+ <LITERAL3>adXactAbortRetaining</LITERAL3>
+ <LITERAL3>adXactBrowse</LITERAL3>
+ <LITERAL3>adXactChaos</LITERAL3>
+ <LITERAL3>adXactCommitRetaining</LITERAL3>
+ <LITERAL3>adXactCursorStability</LITERAL3>
+ <LITERAL3>adXactIsolated</LITERAL3>
+ <LITERAL3>adXactReadCommitted</LITERAL3>
+ <LITERAL3>adXactReadUncommitted</LITERAL3>
+ <LITERAL3>adXactRepeatableRead</LITERAL3>
+ <LITERAL3>adXactSerializable</LITERAL3>
+ <LITERAL3>adXactUnspecified</LITERAL3>
+ <LITERAL3>dbAppendOnly</LITERAL3>
+ <LITERAL3>dbConsistent</LITERAL3>
+ <LITERAL3>dbDenyRead</LITERAL3>
+ <LITERAL3>dbDenyWrite</LITERAL3>
+ <LITERAL3>dbExecDirect</LITERAL3>
+ <LITERAL3>dbForwardOnly</LITERAL3>
+ <LITERAL3>dbInconsistent</LITERAL3>
+ <LITERAL3>dbOpenDynamic</LITERAL3>
+ <LITERAL3>dbOpenDynaset</LITERAL3>
+ <LITERAL3>dbOpenForwardOnly</LITERAL3>
+ <LITERAL3>dbOpenSnapshot</LITERAL3>
+ <LITERAL3>dbOpenTable</LITERAL3>
+ <LITERAL3>dbOptimistic</LITERAL3>
+ <LITERAL3>dbOptimisticBatch</LITERAL3>
+ <LITERAL3>dbOptimisticValue</LITERAL3>
+ <LITERAL3>dbPessimistic</LITERAL3>
+ <LITERAL3>dbReadOnly</LITERAL3>
+ <LITERAL3>dbRunAsync</LITERAL3>
+ <LITERAL3>dbSeeChanges</LITERAL3>
+ <LITERAL3>dbSQLPassThrough</LITERAL3>
+ <LITERAL3>vbAbort</LITERAL3>
+ <LITERAL3>vbAbortRetryIgnore</LITERAL3>
+ <LITERAL3>vbApplicationModal</LITERAL3>
+ <LITERAL3>vbCancel</LITERAL3>
+ <LITERAL3>vbCritical</LITERAL3>
+ <LITERAL3>vbDefaultButton1</LITERAL3>
+ <LITERAL3>vbDefaultButton2</LITERAL3>
+ <LITERAL3>vbDefaultButton3</LITERAL3>
+ <LITERAL3>vbDefaultButton4</LITERAL3>
+ <LITERAL3>vbExclamation</LITERAL3>
+ <LITERAL3>vbFalse</LITERAL3>
+ <LITERAL3>vbFirstFourDays</LITERAL3>
+ <LITERAL3>vbFirstFullWeek</LITERAL3>
+ <LITERAL3>vbFirstJan1</LITERAL3>
+ <LITERAL3>vbFriday</LITERAL3>
+ <LITERAL3>vbGeneralDate</LITERAL3>
+ <LITERAL3>vbIgnore</LITERAL3>
+ <LITERAL3>vbInformation</LITERAL3>
+ <LITERAL3>vbLongDate</LITERAL3>
+ <LITERAL3>vbLongTime</LITERAL3>
+ <LITERAL3>vbMonday</LITERAL3>
+ <LITERAL3>vbNo</LITERAL3>
+ <LITERAL3>vbOK</LITERAL3>
+ <LITERAL3>vbOKCancel</LITERAL3>
+ <LITERAL3>vbOKOnly</LITERAL3>
+ <LITERAL3>vbObjectError</LITERAL3>
+ <LITERAL3>vbQuestion</LITERAL3>
+ <LITERAL3>vbRetry</LITERAL3>
+ <LITERAL3>vbRetryCancel</LITERAL3>
+ <LITERAL3>vbSaturday</LITERAL3>
+ <LITERAL3>vbShortDate</LITERAL3>
+ <LITERAL3>vbShortTime</LITERAL3>
+ <LITERAL3>vbSunday</LITERAL3>
+ <LITERAL3>vbSystemModal</LITERAL3>
+ <LITERAL3>vbThursday</LITERAL3>
+ <LITERAL3>vbTrue</LITERAL3>
+ <LITERAL3>vbTuesday</LITERAL3>
+ <LITERAL3>vbUseDefault</LITERAL3>
+ <LITERAL3>vbUseSystem</LITERAL3>
+ <LITERAL3>vbUseSystemDayOfWeek</LITERAL3>
+ <LITERAL3>vbWednesday</LITERAL3>
+ <LITERAL3>vbYes</LITERAL3>
+ <LITERAL3>vbYesNo</LITERAL3>
+ <LITERAL3>vbYesNoCancel</LITERAL3>
+ <LITERAL3>vbarray</LITERAL3>
+ <LITERAL3>vbblack</LITERAL3>
+ <LITERAL3>vbblue</LITERAL3>
+ <LITERAL3>vbboolean</LITERAL3>
+ <LITERAL3>vbbyte</LITERAL3>
+ <LITERAL3>vbcr</LITERAL3>
+ <LITERAL3>vbcrlf</LITERAL3>
+ <LITERAL3>vbcurrency</LITERAL3>
+ <LITERAL3>vbcyan</LITERAL3>
+ <LITERAL3>vbdataobject</LITERAL3>
+ <LITERAL3>vbdate</LITERAL3>
+ <LITERAL3>vbdecimal</LITERAL3>
+ <LITERAL3>vbdouble</LITERAL3>
+ <LITERAL3>vbempty</LITERAL3>
+ <LITERAL3>vberror</LITERAL3>
+ <LITERAL3>vbformfeed</LITERAL3>
+ <LITERAL3>vbgreen</LITERAL3>
+ <LITERAL3>vbinteger</LITERAL3>
+ <LITERAL3>vblf</LITERAL3>
+ <LITERAL3>vblong</LITERAL3>
+ <LITERAL3>vbmagenta</LITERAL3>
+ <LITERAL3>vbnewline</LITERAL3>
+ <LITERAL3>vbnull</LITERAL3>
+ <LITERAL3>vbnullchar</LITERAL3>
+ <LITERAL3>vbnullstring</LITERAL3>
+ <LITERAL3>vbobject</LITERAL3>
+ <LITERAL3>vbred</LITERAL3>
+ <LITERAL3>vbsingle</LITERAL3>
+ <LITERAL3>vbstring</LITERAL3>
+ <LITERAL3>vbtab</LITERAL3>
+ <LITERAL3>vbvariant</LITERAL3>
+ <LITERAL3>vbverticaltab</LITERAL3>
+ <LITERAL3>vbwhite</LITERAL3>
+ <LITERAL3>vbyellow</LITERAL3>
+
+ <!--Operators-->
+ <OPERATOR>*</OPERATOR>
+ <OPERATOR>+</OPERATOR>
+ <OPERATOR>-</OPERATOR>
+ <OPERATOR>/</OPERATOR>
+ <OPERATOR>=</OPERATOR>
+ <OPERATOR>\</OPERATOR>
+ <OPERATOR>^</OPERATOR>
+ <OPERATOR>&</OPERATOR>
+ <OPERATOR>></OPERATOR>
+ <OPERATOR>>=</OPERATOR>
+ <OPERATOR><></OPERATOR>
+ <OPERATOR><</OPERATOR>
+ <OPERATOR><=</OPERATOR>
+ <OPERATOR>And</OPERATOR>
+ <OPERATOR>Eqv</OPERATOR>
+ <OPERATOR>Like</OPERATOR>
+ <OPERATOR>Mod</OPERATOR>
+ <OPERATOR>Not</OPERATOR>
+ <OPERATOR>Or</OPERATOR>
+ <OPERATOR>Xor</OPERATOR>
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
+
+
+
diff --git a/jEdit/modes/xml.xml b/jEdit/modes/xml.xml
index c100d24..01fba8c 100644
--- a/jEdit/modes/xml.xml
+++ b/jEdit/modes/xml.xml
@@ -1,161 +1,161 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
- <RULES>
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- DTD Entity declarations -->
- <SPAN TYPE="KEYWORD2" DELEGATE="ENTITY-TAGS">
- <BEGIN><!ENTITY</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- CDATA sections -->
- <SPAN TYPE="KEYWORD2" DELEGATE="CDATA">
- <BEGIN><![CDATA[</BEGIN>
- <END>]]></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- PI directives -->
- <SPAN TYPE="KEYWORD3">
- <BEGIN><?</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
- <RULES SET="TAGS" DEFAULT="MARKUP" NO_WORD_SEP="-_">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="MARKUP">/</SEQ>
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
- </RULES>
- <RULES SET="DTD-TAGS" DEFAULT="KEYWORD2" IGNORE_CASE="FALSE">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>--</BEGIN>
- <END>--</END>
- </SPAN>
-
- <!-- Parameter entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>%</BEGIN>
- <END>;</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- This appears in some SGML documents -->
- <SPAN TYPE="KEYWORD2" DELEGATE="MAIN">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>CDATA</KEYWORD1>
- <KEYWORD1>EMPTY</KEYWORD1>
- <KEYWORD1>INCLUDE</KEYWORD1>
- <KEYWORD1>IGNORE</KEYWORD1>
- <KEYWORD1>NDATA</KEYWORD1>
- <KEYWORD1>#IMPLIED</KEYWORD1>
- <KEYWORD1>#PCDATA</KEYWORD1>
- <KEYWORD1>#REQUIRED</KEYWORD1>
- </KEYWORDS>
- </RULES>
- <RULES SET="ENTITY-TAGS" DEFAULT="KEYWORD2">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>--</BEGIN>
- <END>--</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <SEQ TYPE="OPERATOR">%</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>SYSTEM</KEYWORD1>
- </KEYWORDS>
- </RULES>
- <RULES SET="CDATA" DEFAULT="COMMENT2">
- <!-- no rules -->
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+ <RULES>
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- DTD Entity declarations -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="ENTITY-TAGS">
+ <BEGIN><!ENTITY</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CDATA sections -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="CDATA">
+ <BEGIN><![CDATA[</BEGIN>
+ <END>]]></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- PI directives -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN><?</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+ <RULES SET="TAGS" DEFAULT="MARKUP" NO_WORD_SEP="-_">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="MARKUP">/</SEQ>
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+ </RULES>
+ <RULES SET="DTD-TAGS" DEFAULT="KEYWORD2" IGNORE_CASE="FALSE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <!-- Parameter entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>%</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- This appears in some SGML documents -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="MAIN">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>CDATA</KEYWORD1>
+ <KEYWORD1>EMPTY</KEYWORD1>
+ <KEYWORD1>INCLUDE</KEYWORD1>
+ <KEYWORD1>IGNORE</KEYWORD1>
+ <KEYWORD1>NDATA</KEYWORD1>
+ <KEYWORD1>#IMPLIED</KEYWORD1>
+ <KEYWORD1>#PCDATA</KEYWORD1>
+ <KEYWORD1>#REQUIRED</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+ <RULES SET="ENTITY-TAGS" DEFAULT="KEYWORD2">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>SYSTEM</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+ <RULES SET="CDATA" DEFAULT="COMMENT2">
+ <!-- no rules -->
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/xq.xml b/jEdit/modes/xq.xml
index 5b455c2..af5df76 100644
--- a/jEdit/modes/xq.xml
+++ b/jEdit/modes/xq.xml
@@ -1,459 +1,459 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- <PROPERTY NAME="commentStart" VALUE="(:" />
- <PROPERTY NAME="commentEnd" VALUE=":)" />
- <PROPERTY NAME="wordBreakChars" VALUE=":,+=<>/?^&*" />
-
- <!-- Auto indent -->
- <!-- <PROPERTY NAME="indentOpenBrackets" VALUE="{" /> -->
- <!-- <PROPERTY NAME="indentCloseBrackets" VALUE="}" /> -->
- <PROPERTY NAME="indentNextLine"
- VALUE="\s*(((if)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
- <!-- set this to 'true' if you want to use GNU coding style -->
- <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
- <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
- </PROPS>
- <RULES>
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
-
- <!-- DTD Entity declarations -->
- <SPAN TYPE="KEYWORD2" DELEGATE="ENTITY-TAGS">
- <BEGIN><!ENTITY</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- CDATA sections -->
- <SPAN TYPE="KEYWORD2" DELEGATE="CDATA">
- <BEGIN><![CDATA[</BEGIN>
- <END>]]></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- PI directives -->
- <SPAN TYPE="KEYWORD3">
- <BEGIN><?</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><![CDATA[<[a-zA-Z/]\w*]]></BEGIN>
- <END>></END>
- </SPAN_REGEXP>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <RULES SET="TAGS" DEFAULT="MARKUP" NO_WORD_SEP="-_">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
-
- <SEQ TYPE="MARKUP">/</SEQ>
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
- </RULES>
-
- <RULES SET="DTD-TAGS" DEFAULT="KEYWORD2" IGNORE_CASE="FALSE">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>--</BEGIN>
- <END>--</END>
- </SPAN>
-
- <!-- Parameter entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>%</BEGIN>
- <END>;</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- This appears in some SGML documents -->
- <SPAN TYPE="KEYWORD2" DELEGATE="MAIN">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">(</SEQ>
- <SEQ TYPE="OPERATOR">)</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">,</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>CDATA</KEYWORD1>
- <KEYWORD1>EMPTY</KEYWORD1>
- <KEYWORD1>INCLUDE</KEYWORD1>
- <KEYWORD1>IGNORE</KEYWORD1>
- <KEYWORD1>NDATA</KEYWORD1>
- <KEYWORD1>#IMPLIED</KEYWORD1>
- <KEYWORD1>#PCDATA</KEYWORD1>
- <KEYWORD1>#REQUIRED</KEYWORD1>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="ENTITY-TAGS" DEFAULT="KEYWORD2">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>--</BEGIN>
- <END>--</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <SEQ TYPE="OPERATOR">%</SEQ>
-
- <KEYWORDS>
- <KEYWORD1>SYSTEM</KEYWORD1>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="CDATA" DEFAULT="COMMENT2">
- <!-- no rules -->
- </RULES>
-
- <RULES IGNORE_CASE="FALSE"
- HIGHLIGHT_DIGITS="TRUE"
- DIGIT_RE="(0x\p{XDigit}+[lL]?|\d+(e\d*)?[lLdDfF]?)">
-
- <!-- XQuery style comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN>(:</BEGIN>
- <END>:)</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
-
- <!-- Function calls -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <SEQ TYPE="OPERATOR">,</SEQ>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
-
- <SEQ TYPE="OPERATOR"><<</SEQ>
- <SEQ TYPE="OPERATOR">>></SEQ>
-
- <SEQ TYPE="OPERATOR">+</SEQ>
-<!--
- <SEQ TYPE="OPERATOR">-</SEQ>
- -->
- <SEQ TYPE="OPERATOR">*</SEQ>
-
- <!-- unary -/+ ? -->
-
- <SEQ TYPE="OPERATOR">|</SEQ>
-
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">//</SEQ>
-
- <SEQ TYPE="OPERATOR">}</SEQ>
- <SEQ TYPE="OPERATOR">{</SEQ>
-
- <KEYWORDS>
- <OPERATOR>some</OPERATOR>
- <OPERATOR>every</OPERATOR>
-
- <OPERATOR>or</OPERATOR>
- <OPERATOR>and</OPERATOR>
-
- <OPERATOR>instance of</OPERATOR>
-
- <OPERATOR>treat as</OPERATOR>
-
- <OPERATOR>castable as</OPERATOR>
-
- <OPERATOR>cast as</OPERATOR>
-
- <OPERATOR>eq</OPERATOR>
- <OPERATOR>ne</OPERATOR>
- <OPERATOR>lt</OPERATOR>
- <OPERATOR>gt</OPERATOR>
- <OPERATOR>ge</OPERATOR>
- <OPERATOR>is</OPERATOR>
-
- <OPERATOR>to</OPERATOR>
-
- <OPERATOR>div</OPERATOR>
- <OPERATOR>idiv</OPERATOR>
- <OPERATOR>mod</OPERATOR>
-
- <OPERATOR>union</OPERATOR>
-
- <OPERATOR>intersect</OPERATOR>
- <OPERATOR>except</OPERATOR>
-
- <KEYWORD1>return</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>at</KEYWORD1>
-
- <KEYWORD1>let</KEYWORD1>
- <KEYWORD1>:=</KEYWORD1>
-
- <KEYWORD1>where</KEYWORD1>
-
- <KEYWORD1>stable</KEYWORD1>
- <KEYWORD1>order</KEYWORD1>
- <KEYWORD1>by</KEYWORD1>
-
- <LITERAL2>ascending</LITERAL2>
- <LITERAL2>descending</LITERAL2>
-
- <LITERAL2>greatest</LITERAL2>
- <LITERAL2>least</LITERAL2>
- <LITERAL2>collation</LITERAL2>
-
- <KEYWORD3>typeswitch</KEYWORD3>
- <KEYWORD3>default</KEYWORD3>
-
- <KEYWORD1>cast</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
-
- <LITERAL2>true</LITERAL2>
- <LITERAL2>false</LITERAL2>
-
- <KEYWORD3>xquery</KEYWORD3>
- <KEYWORD3>version</KEYWORD3>
-
- <KEYWORD3>declare</KEYWORD3>
- <KEYWORD3>function</KEYWORD3>
- <KEYWORD3>library</KEYWORD3>
- <KEYWORD3>variable</KEYWORD3>
- <KEYWORD3>module</KEYWORD3>
- <KEYWORD3>namespace</KEYWORD3>
- <KEYWORD3>local</KEYWORD3>
-
- <KEYWORD3>validate</KEYWORD3>
- <KEYWORD3>import</KEYWORD3>
- <KEYWORD3>schema</KEYWORD3>
- <KEYWORD3>validation</KEYWORD3>
- <KEYWORD3>collection</KEYWORD3>
-
- <KEYWORD3>ancestor</KEYWORD3>
- <KEYWORD3>descendant</KEYWORD3>
- <KEYWORD3>self</KEYWORD3>
- <KEYWORD3>parent</KEYWORD3>
- <KEYWORD3>child</KEYWORD3>
- <KEYWORD3>self</KEYWORD3>
- <KEYWORD3>descendant-or-self</KEYWORD3>
- <KEYWORD3>ancestor-or-self</KEYWORD3>
- <KEYWORD3>preceding-sibling</KEYWORD3>
- <KEYWORD3>following-sibling</KEYWORD3>
- <KEYWORD3>following</KEYWORD3>
- <KEYWORD3>preceding</KEYWORD3>
-
- <KEYWORD4>xs:integer</KEYWORD4>
- <KEYWORD4>xs:decimal</KEYWORD4>
- <KEYWORD4>xs:double</KEYWORD4>
- <KEYWORD4>xs:string</KEYWORD4>
- <KEYWORD4>xs:date</KEYWORD4>
- <KEYWORD4>xs:time</KEYWORD4>
- <KEYWORD4>xs:dateTime</KEYWORD4>
- <KEYWORD4>xs:boolean</KEYWORD4>
-
- <KEYWORD4>item</KEYWORD4>
- <KEYWORD4>element</KEYWORD4>
- <KEYWORD4>attribute</KEYWORD4>
- <KEYWORD4>comment</KEYWORD4>
- <KEYWORD4>document</KEYWORD4>
- <KEYWORD4>document-node</KEYWORD4>
- <KEYWORD4>node</KEYWORD4>
- <KEYWORD4>empty</KEYWORD4>
-
- <FUNCTION>zero-or-one</FUNCTION>
- <FUNCTION>avg</FUNCTION>
- <FUNCTION>base-uri</FUNCTION>
- <FUNCTION>boolean</FUNCTION>
- <FUNCTION>ceiling</FUNCTION>
- <FUNCTION>codepoints-to-string</FUNCTION>
- <FUNCTION>collection</FUNCTION>
- <FUNCTION>compare</FUNCTION>
- <FUNCTION>concat</FUNCTION>
- <FUNCTION>contains</FUNCTION>
- <FUNCTION>count</FUNCTION>
- <FUNCTION>current-date</FUNCTION>
- <FUNCTION>current-dateTime</FUNCTION>
- <FUNCTION>current-time</FUNCTION>
- <FUNCTION>data</FUNCTION>
- <FUNCTION>day-from-date</FUNCTION>
- <FUNCTION>day-from-dateTime</FUNCTION>
- <FUNCTION>days-from-duration</FUNCTION>
- <FUNCTION>deep-equal</FUNCTION>
- <FUNCTION>distinct-values</FUNCTION>
- <FUNCTION>doc</FUNCTION>
- <FUNCTION>adjust-time-to-timezone</FUNCTION>
- <FUNCTION>adjust-dateTime-to-timezone</FUNCTION>
- <FUNCTION>string-length</FUNCTION>
- <FUNCTION>string-join</FUNCTION>
- <FUNCTION>string</FUNCTION>
- <FUNCTION>starts-with</FUNCTION>
- <FUNCTION>seconds-from-time</FUNCTION>
- <FUNCTION>seconds-from-duration</FUNCTION>
- <FUNCTION>seconds-from-dateTime</FUNCTION>
- <FUNCTION>round-half-to-even</FUNCTION>
- <FUNCTION>round</FUNCTION>
- <FUNCTION>root</FUNCTION>
- <FUNCTION>reverse</FUNCTION>
- <FUNCTION>replace</FUNCTION>
- <FUNCTION>remove</FUNCTION>
- <FUNCTION>prefix-from-QName</FUNCTION>
- <FUNCTION>position</FUNCTION>
- <FUNCTION>one-or-more</FUNCTION>
- <FUNCTION>number</FUNCTION>
- <FUNCTION>QName</FUNCTION>
- <FUNCTION>abs</FUNCTION>
- <FUNCTION>adjust-date-to-timezone</FUNCTION>
- <FUNCTION>doc-available</FUNCTION>
- <FUNCTION>doctype</FUNCTION>
- <FUNCTION>document</FUNCTION>
- <FUNCTION>last</FUNCTION>
- <FUNCTION>local-name</FUNCTION>
- <FUNCTION>local-name-from-QName</FUNCTION>
- <FUNCTION>lower-case</FUNCTION>
- <FUNCTION>match-all</FUNCTION>
- <FUNCTION>match-any</FUNCTION>
- <FUNCTION>matches</FUNCTION>
- <FUNCTION>max</FUNCTION>
- <FUNCTION>min</FUNCTION>
- <FUNCTION>minutes-from-dateTime</FUNCTION>
- <FUNCTION>minutes-from-duration</FUNCTION>
- <FUNCTION>minutes-from-time</FUNCTION>
- <FUNCTION>month-from-date</FUNCTION>
- <FUNCTION>month-from-dateTime</FUNCTION>
- <FUNCTION>name</FUNCTION>
- <FUNCTION>namespace-uri</FUNCTION>
- <FUNCTION>namespace-uri-for-prefix</FUNCTION>
- <FUNCTION>namespace-uri-from-QName</FUNCTION>
- <FUNCTION>node-name</FUNCTION>
- <FUNCTION>normalize-space</FUNCTION>
- <FUNCTION>lang</FUNCTION>
- <FUNCTION>item-at</FUNCTION>
- <FUNCTION>document-uri</FUNCTION>
- <FUNCTION>empty</FUNCTION>
- <FUNCTION>encode-for-uri</FUNCTION>
- <FUNCTION>ends-with</FUNCTION>
- <FUNCTION>error</FUNCTION>
- <FUNCTION>escape-html-uri</FUNCTION>
- <FUNCTION>escape-uri</FUNCTION>
- <FUNCTION>exactly-one</FUNCTION>
- <FUNCTION>exists</FUNCTION>
- <FUNCTION>false</FUNCTION>
- <FUNCTION>floor</FUNCTION>
- <FUNCTION>hours-from-dateTime</FUNCTION>
- <FUNCTION>hours-from-duration</FUNCTION>
- <FUNCTION>hours-from-time</FUNCTION>
- <FUNCTION>id</FUNCTION>
- <FUNCTION>implicit-timezone</FUNCTION>
- <FUNCTION>in-scope-prefixes</FUNCTION>
- <FUNCTION>index-of</FUNCTION>
- <FUNCTION>insert-before</FUNCTION>
- <FUNCTION>iri-to-uri</FUNCTION>
- <FUNCTION>string-pad</FUNCTION>
- <FUNCTION>string-to-codepoints</FUNCTION>
- <FUNCTION>sum</FUNCTION>
- <FUNCTION>timezone-from-date</FUNCTION>
- <FUNCTION>timezone-from-dateTime</FUNCTION>
- <FUNCTION>timezone-from-time</FUNCTION>
- <FUNCTION>not</FUNCTION>
- <FUNCTION>tokenize</FUNCTION>
- <FUNCTION>translate</FUNCTION>
- <FUNCTION>true</FUNCTION>
- <FUNCTION>unordered</FUNCTION>
- <FUNCTION>upper-case</FUNCTION>
- <FUNCTION>xcollection</FUNCTION>
- <FUNCTION>year-from-date</FUNCTION>
- <FUNCTION>year-from-dateTime</FUNCTION>
- <FUNCTION>substring-before</FUNCTION>
- <FUNCTION>subsequence</FUNCTION>
- <FUNCTION>substring</FUNCTION>
- <FUNCTION>substring-after</FUNCTION>
-
- </KEYWORDS>
- </RULES>
-
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ <PROPERTY NAME="commentStart" VALUE="(:" />
+ <PROPERTY NAME="commentEnd" VALUE=":)" />
+ <PROPERTY NAME="wordBreakChars" VALUE=":,+=<>/?^&*" />
+
+ <!-- Auto indent -->
+ <!-- <PROPERTY NAME="indentOpenBrackets" VALUE="{" /> -->
+ <!-- <PROPERTY NAME="indentCloseBrackets" VALUE="}" /> -->
+ <PROPERTY NAME="indentNextLine"
+ VALUE="\s*(((if)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
+ <!-- set this to 'true' if you want to use GNU coding style -->
+ <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
+ <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
+ </PROPS>
+ <RULES>
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+
+ <!-- DTD Entity declarations -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="ENTITY-TAGS">
+ <BEGIN><!ENTITY</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- CDATA sections -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="CDATA">
+ <BEGIN><![CDATA[</BEGIN>
+ <END>]]></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- PI directives -->
+ <SPAN TYPE="KEYWORD3">
+ <BEGIN><?</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN_REGEXP HASH_CHAR="<" TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><![CDATA[<[a-zA-Z/]\w*]]></BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="TAGS" DEFAULT="MARKUP" NO_WORD_SEP="-_">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+
+ <SEQ TYPE="MARKUP">/</SEQ>
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR">:</MARK_PREVIOUS>
+ </RULES>
+
+ <RULES SET="DTD-TAGS" DEFAULT="KEYWORD2" IGNORE_CASE="FALSE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <!-- Parameter entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>%</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- This appears in some SGML documents -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="MAIN">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">(</SEQ>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>CDATA</KEYWORD1>
+ <KEYWORD1>EMPTY</KEYWORD1>
+ <KEYWORD1>INCLUDE</KEYWORD1>
+ <KEYWORD1>IGNORE</KEYWORD1>
+ <KEYWORD1>NDATA</KEYWORD1>
+ <KEYWORD1>#IMPLIED</KEYWORD1>
+ <KEYWORD1>#PCDATA</KEYWORD1>
+ <KEYWORD1>#REQUIRED</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="ENTITY-TAGS" DEFAULT="KEYWORD2">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>--</BEGIN>
+ <END>--</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <SEQ TYPE="OPERATOR">%</SEQ>
+
+ <KEYWORDS>
+ <KEYWORD1>SYSTEM</KEYWORD1>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="CDATA" DEFAULT="COMMENT2">
+ <!-- no rules -->
+ </RULES>
+
+ <RULES IGNORE_CASE="FALSE"
+ HIGHLIGHT_DIGITS="TRUE"
+ DIGIT_RE="(0x\p{XDigit}+[lL]?|\d+(e\d*)?[lLdDfF]?)">
+
+ <!-- XQuery style comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN>(:</BEGIN>
+ <END>:)</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" ESCAPE="\" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+
+ <!-- Function calls -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+
+ <SEQ TYPE="OPERATOR"><<</SEQ>
+ <SEQ TYPE="OPERATOR">>></SEQ>
+
+ <SEQ TYPE="OPERATOR">+</SEQ>
+<!--
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ -->
+ <SEQ TYPE="OPERATOR">*</SEQ>
+
+ <!-- unary -/+ ? -->
+
+ <SEQ TYPE="OPERATOR">|</SEQ>
+
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">//</SEQ>
+
+ <SEQ TYPE="OPERATOR">}</SEQ>
+ <SEQ TYPE="OPERATOR">{</SEQ>
+
+ <KEYWORDS>
+ <OPERATOR>some</OPERATOR>
+ <OPERATOR>every</OPERATOR>
+
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>and</OPERATOR>
+
+ <OPERATOR>instance of</OPERATOR>
+
+ <OPERATOR>treat as</OPERATOR>
+
+ <OPERATOR>castable as</OPERATOR>
+
+ <OPERATOR>cast as</OPERATOR>
+
+ <OPERATOR>eq</OPERATOR>
+ <OPERATOR>ne</OPERATOR>
+ <OPERATOR>lt</OPERATOR>
+ <OPERATOR>gt</OPERATOR>
+ <OPERATOR>ge</OPERATOR>
+ <OPERATOR>is</OPERATOR>
+
+ <OPERATOR>to</OPERATOR>
+
+ <OPERATOR>div</OPERATOR>
+ <OPERATOR>idiv</OPERATOR>
+ <OPERATOR>mod</OPERATOR>
+
+ <OPERATOR>union</OPERATOR>
+
+ <OPERATOR>intersect</OPERATOR>
+ <OPERATOR>except</OPERATOR>
+
+ <KEYWORD1>return</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>at</KEYWORD1>
+
+ <KEYWORD1>let</KEYWORD1>
+ <KEYWORD1>:=</KEYWORD1>
+
+ <KEYWORD1>where</KEYWORD1>
+
+ <KEYWORD1>stable</KEYWORD1>
+ <KEYWORD1>order</KEYWORD1>
+ <KEYWORD1>by</KEYWORD1>
+
+ <LITERAL2>ascending</LITERAL2>
+ <LITERAL2>descending</LITERAL2>
+
+ <LITERAL2>greatest</LITERAL2>
+ <LITERAL2>least</LITERAL2>
+ <LITERAL2>collation</LITERAL2>
+
+ <KEYWORD3>typeswitch</KEYWORD3>
+ <KEYWORD3>default</KEYWORD3>
+
+ <KEYWORD1>cast</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+
+ <LITERAL2>true</LITERAL2>
+ <LITERAL2>false</LITERAL2>
+
+ <KEYWORD3>xquery</KEYWORD3>
+ <KEYWORD3>version</KEYWORD3>
+
+ <KEYWORD3>declare</KEYWORD3>
+ <KEYWORD3>function</KEYWORD3>
+ <KEYWORD3>library</KEYWORD3>
+ <KEYWORD3>variable</KEYWORD3>
+ <KEYWORD3>module</KEYWORD3>
+ <KEYWORD3>namespace</KEYWORD3>
+ <KEYWORD3>local</KEYWORD3>
+
+ <KEYWORD3>validate</KEYWORD3>
+ <KEYWORD3>import</KEYWORD3>
+ <KEYWORD3>schema</KEYWORD3>
+ <KEYWORD3>validation</KEYWORD3>
+ <KEYWORD3>collection</KEYWORD3>
+
+ <KEYWORD3>ancestor</KEYWORD3>
+ <KEYWORD3>descendant</KEYWORD3>
+ <KEYWORD3>self</KEYWORD3>
+ <KEYWORD3>parent</KEYWORD3>
+ <KEYWORD3>child</KEYWORD3>
+ <KEYWORD3>self</KEYWORD3>
+ <KEYWORD3>descendant-or-self</KEYWORD3>
+ <KEYWORD3>ancestor-or-self</KEYWORD3>
+ <KEYWORD3>preceding-sibling</KEYWORD3>
+ <KEYWORD3>following-sibling</KEYWORD3>
+ <KEYWORD3>following</KEYWORD3>
+ <KEYWORD3>preceding</KEYWORD3>
+
+ <KEYWORD4>xs:integer</KEYWORD4>
+ <KEYWORD4>xs:decimal</KEYWORD4>
+ <KEYWORD4>xs:double</KEYWORD4>
+ <KEYWORD4>xs:string</KEYWORD4>
+ <KEYWORD4>xs:date</KEYWORD4>
+ <KEYWORD4>xs:time</KEYWORD4>
+ <KEYWORD4>xs:dateTime</KEYWORD4>
+ <KEYWORD4>xs:boolean</KEYWORD4>
+
+ <KEYWORD4>item</KEYWORD4>
+ <KEYWORD4>element</KEYWORD4>
+ <KEYWORD4>attribute</KEYWORD4>
+ <KEYWORD4>comment</KEYWORD4>
+ <KEYWORD4>document</KEYWORD4>
+ <KEYWORD4>document-node</KEYWORD4>
+ <KEYWORD4>node</KEYWORD4>
+ <KEYWORD4>empty</KEYWORD4>
+
+ <FUNCTION>zero-or-one</FUNCTION>
+ <FUNCTION>avg</FUNCTION>
+ <FUNCTION>base-uri</FUNCTION>
+ <FUNCTION>boolean</FUNCTION>
+ <FUNCTION>ceiling</FUNCTION>
+ <FUNCTION>codepoints-to-string</FUNCTION>
+ <FUNCTION>collection</FUNCTION>
+ <FUNCTION>compare</FUNCTION>
+ <FUNCTION>concat</FUNCTION>
+ <FUNCTION>contains</FUNCTION>
+ <FUNCTION>count</FUNCTION>
+ <FUNCTION>current-date</FUNCTION>
+ <FUNCTION>current-dateTime</FUNCTION>
+ <FUNCTION>current-time</FUNCTION>
+ <FUNCTION>data</FUNCTION>
+ <FUNCTION>day-from-date</FUNCTION>
+ <FUNCTION>day-from-dateTime</FUNCTION>
+ <FUNCTION>days-from-duration</FUNCTION>
+ <FUNCTION>deep-equal</FUNCTION>
+ <FUNCTION>distinct-values</FUNCTION>
+ <FUNCTION>doc</FUNCTION>
+ <FUNCTION>adjust-time-to-timezone</FUNCTION>
+ <FUNCTION>adjust-dateTime-to-timezone</FUNCTION>
+ <FUNCTION>string-length</FUNCTION>
+ <FUNCTION>string-join</FUNCTION>
+ <FUNCTION>string</FUNCTION>
+ <FUNCTION>starts-with</FUNCTION>
+ <FUNCTION>seconds-from-time</FUNCTION>
+ <FUNCTION>seconds-from-duration</FUNCTION>
+ <FUNCTION>seconds-from-dateTime</FUNCTION>
+ <FUNCTION>round-half-to-even</FUNCTION>
+ <FUNCTION>round</FUNCTION>
+ <FUNCTION>root</FUNCTION>
+ <FUNCTION>reverse</FUNCTION>
+ <FUNCTION>replace</FUNCTION>
+ <FUNCTION>remove</FUNCTION>
+ <FUNCTION>prefix-from-QName</FUNCTION>
+ <FUNCTION>position</FUNCTION>
+ <FUNCTION>one-or-more</FUNCTION>
+ <FUNCTION>number</FUNCTION>
+ <FUNCTION>QName</FUNCTION>
+ <FUNCTION>abs</FUNCTION>
+ <FUNCTION>adjust-date-to-timezone</FUNCTION>
+ <FUNCTION>doc-available</FUNCTION>
+ <FUNCTION>doctype</FUNCTION>
+ <FUNCTION>document</FUNCTION>
+ <FUNCTION>last</FUNCTION>
+ <FUNCTION>local-name</FUNCTION>
+ <FUNCTION>local-name-from-QName</FUNCTION>
+ <FUNCTION>lower-case</FUNCTION>
+ <FUNCTION>match-all</FUNCTION>
+ <FUNCTION>match-any</FUNCTION>
+ <FUNCTION>matches</FUNCTION>
+ <FUNCTION>max</FUNCTION>
+ <FUNCTION>min</FUNCTION>
+ <FUNCTION>minutes-from-dateTime</FUNCTION>
+ <FUNCTION>minutes-from-duration</FUNCTION>
+ <FUNCTION>minutes-from-time</FUNCTION>
+ <FUNCTION>month-from-date</FUNCTION>
+ <FUNCTION>month-from-dateTime</FUNCTION>
+ <FUNCTION>name</FUNCTION>
+ <FUNCTION>namespace-uri</FUNCTION>
+ <FUNCTION>namespace-uri-for-prefix</FUNCTION>
+ <FUNCTION>namespace-uri-from-QName</FUNCTION>
+ <FUNCTION>node-name</FUNCTION>
+ <FUNCTION>normalize-space</FUNCTION>
+ <FUNCTION>lang</FUNCTION>
+ <FUNCTION>item-at</FUNCTION>
+ <FUNCTION>document-uri</FUNCTION>
+ <FUNCTION>empty</FUNCTION>
+ <FUNCTION>encode-for-uri</FUNCTION>
+ <FUNCTION>ends-with</FUNCTION>
+ <FUNCTION>error</FUNCTION>
+ <FUNCTION>escape-html-uri</FUNCTION>
+ <FUNCTION>escape-uri</FUNCTION>
+ <FUNCTION>exactly-one</FUNCTION>
+ <FUNCTION>exists</FUNCTION>
+ <FUNCTION>false</FUNCTION>
+ <FUNCTION>floor</FUNCTION>
+ <FUNCTION>hours-from-dateTime</FUNCTION>
+ <FUNCTION>hours-from-duration</FUNCTION>
+ <FUNCTION>hours-from-time</FUNCTION>
+ <FUNCTION>id</FUNCTION>
+ <FUNCTION>implicit-timezone</FUNCTION>
+ <FUNCTION>in-scope-prefixes</FUNCTION>
+ <FUNCTION>index-of</FUNCTION>
+ <FUNCTION>insert-before</FUNCTION>
+ <FUNCTION>iri-to-uri</FUNCTION>
+ <FUNCTION>string-pad</FUNCTION>
+ <FUNCTION>string-to-codepoints</FUNCTION>
+ <FUNCTION>sum</FUNCTION>
+ <FUNCTION>timezone-from-date</FUNCTION>
+ <FUNCTION>timezone-from-dateTime</FUNCTION>
+ <FUNCTION>timezone-from-time</FUNCTION>
+ <FUNCTION>not</FUNCTION>
+ <FUNCTION>tokenize</FUNCTION>
+ <FUNCTION>translate</FUNCTION>
+ <FUNCTION>true</FUNCTION>
+ <FUNCTION>unordered</FUNCTION>
+ <FUNCTION>upper-case</FUNCTION>
+ <FUNCTION>xcollection</FUNCTION>
+ <FUNCTION>year-from-date</FUNCTION>
+ <FUNCTION>year-from-dateTime</FUNCTION>
+ <FUNCTION>substring-before</FUNCTION>
+ <FUNCTION>subsequence</FUNCTION>
+ <FUNCTION>substring</FUNCTION>
+ <FUNCTION>substring-after</FUNCTION>
+
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
diff --git a/jEdit/modes/xsl.xml b/jEdit/modes/xsl.xml
index 4205d57..cb6a6f2 100644
--- a/jEdit/modes/xsl.xml
+++ b/jEdit/modes/xsl.xml
@@ -1,447 +1,447 @@
-<?xml version="1.0"?>
-<!DOCTYPE MODE SYSTEM "xmode.dtd"><!--
- ======================================================================
- Edit mode for XSLT 1.0 and XSLT 2.0
- ======================================================================
- Token types:
-
- COMMENT1 XML comments
- COMMENT2 XPath 2.0 comments - top or nested within COMMENT3
- COMMENT3 XPath 2.0 comments - nested within COMMENT2
- COMMENT4 Default task names used in Task List
- DIGIT Digits
- FUNCTION Functions
- INVALID -
- KEYWORD1 XSLT element names
- KEYWORD2 XSLT attribute names
- KEYWORD3 Attribute values
- KEYWORD4 Axes specifiers
- LABEL Namespace prefixes
- LITERAL1 String literals
- LITERAL2 Parameter and variable references
- LITERAL3 Entity references and processing instructions
- LITERAL4 DTD constructs and CDATA sections
- MARKUP Result elements and extension elements
- OPERATOR XPath 2.0 keywords + some other stuff
- ======================================================================
--->
-
-<MODE>
-
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--"/>
- <PROPERTY NAME="commentEnd" VALUE="-->"/>
- </PROPS>
-
- <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="FALSE">
-
- <!-- XML comments -->
- <SPAN DELEGATE="TASKS" TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- Assume 'xsl' prefix for XSLT elements -->
- <SPAN_REGEXP HASH_CHAR="<" DELEGATE="XSLTAGS" TYPE="KEYWORD2">
- <BEGIN><(?=xsl:)</BEGIN>
- <END>></END>
- </SPAN_REGEXP>
-
- <SPAN_REGEXP HASH_CHAR="<" DELEGATE="XSLTAGS" TYPE="KEYWORD2">
- <BEGIN><(?=/xsl:)</BEGIN>
- <END>></END>
- </SPAN_REGEXP>
-
- <!-- CDATA marked sections. Reuse common xml mode -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::CDATA">
- <BEGIN><![CDATA[</BEGIN>
- <END>]]></END>
- </SPAN>
-
- <!-- DTD constructs. Reuse common xml mode -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- Entity references -->
- <SPAN TYPE="LITERAL3" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
-
- <!-- Processing instructions -->
- <SPAN TYPE="LITERAL3">
- <BEGIN><?</BEGIN>
- <END>?></END>
- </SPAN>
-
- <!-- Result elements and extension elements -->
- <SPAN DELEGATE="TAGS" TYPE="MARKUP">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
- </RULES>
-
- <!-- XML comments -->
- <RULES DEFAULT="COMMENT1" IGNORE_CASE="FALSE" SET="TASKS">
- <!-- Default task names used in Task List -->
- <KEYWORDS>
- <COMMENT4>DEBUG:</COMMENT4>
- <COMMENT4>DONE:</COMMENT4>
- <COMMENT4>FIXME:</COMMENT4>
- <COMMENT4>IDEA:</COMMENT4>
- <COMMENT4>NOTE:</COMMENT4>
- <COMMENT4>QUESTION:</COMMENT4>
- <COMMENT4>TODO:</COMMENT4>
- <COMMENT4>XXX</COMMENT4>
- <COMMENT4>???</COMMENT4>
- </KEYWORDS>
- </RULES>
-
- <!-- Result elements and extension elements -->
- <RULES DEFAULT="MARKUP" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP=".-_:" SET="TAGS">
-
- <!-- Highlight all AVTs in result attribute values. -->
- <SPAN TYPE="MARKUP" DELEGATE="AVT">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="MARKUP" DELEGATE="AVT">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- Namespace declarations -->
- <SEQ TYPE="OPERATOR">xmlns:</SEQ>
- <!-- Default namespace declaration. Not really used in XSLT -->
- <SEQ TYPE="OPERATOR">xmlns</SEQ>
-
- <!-- Namespace prefixes -->
- <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
-
- </RULES>
-
- <!-- AVTs -->
- <RULES DEFAULT="KEYWORD3" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP=".-_:" SET="AVT">
-
- <!-- Literal curly braces ({}) must be written as {{ or }} -->
- <SEQ>{{</SEQ>
- <SEQ>}}</SEQ><!-- Does nothing. Is overridden by the SPAN below. -->
-
- <!-- The AVT itself -->
- <SPAN DELEGATE="XPATH" TYPE="OPERATOR">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
-
- <!-- Entity references -->
- <SPAN TYPE="LITERAL3" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
-
- </RULES>
-
- <!-- XSLT tags -->
- <RULES DEFAULT="KEYWORD2" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP=".-_:" SET="XSLTAGS">
-
- <!-- If we spot something that looks like an AVT, assume it is. Lazy, I know... -->
- <SPAN TYPE="KEYWORD2" DELEGATE="AVT">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="KEYWORD2" DELEGATE="AVT">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- XSLT attributes that contains XPath expressions or match patterns -->
- <!-- count -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="count" DELEGATE="XPATH">
- <BEGIN>count[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="count" DELEGATE="XPATH">
- <BEGIN>count[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- from -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="from" DELEGATE="XPATH">
- <BEGIN>from[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="from" DELEGATE="XPATH">
- <BEGIN>from[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- group-adjacent -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-adjacent" DELEGATE="XPATH">
- <BEGIN>group-adjacent[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-adjacent" DELEGATE="XPATH">
- <BEGIN>group-adjacent[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- group-by -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-by" DELEGATE="XPATH">
- <BEGIN>group-by[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-by" DELEGATE="XPATH">
- <BEGIN>group-by[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- group-ending-with -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-ending-with" DELEGATE="XPATH">
- <BEGIN>group-ending-with[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-ending-with" DELEGATE="XPATH">
- <BEGIN>group-ending-with[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- group-starting-with -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-starting-with" DELEGATE="XPATH">
- <BEGIN>group-starting-with[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-starting-with" DELEGATE="XPATH">
- <BEGIN>group-starting-with[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- match -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="match" DELEGATE="XPATH">
- <BEGIN>match[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="match" DELEGATE="XPATH">
- <BEGIN>match[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- select -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="select" DELEGATE="XPATH">
- <BEGIN>select[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="select" DELEGATE="XPATH">
- <BEGIN>select[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- test -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="test" DELEGATE="XPATH">
- <BEGIN>test[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="test" DELEGATE="XPATH">
- <BEGIN>test[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- use -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="use" DELEGATE="XPATH">
- <BEGIN>use[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="use" DELEGATE="XPATH">
- <BEGIN>use[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
- <!-- value -->
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="value" DELEGATE="XPATH">
- <BEGIN>value[\p{Space}]*=[\p{Space}]*"</BEGIN>
- <END>"</END>
- </SPAN_REGEXP>
- <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="select" DELEGATE="XPATH">
- <BEGIN>select[\p{Space}]*=[\p{Space}]*'</BEGIN>
- <END>'</END>
- </SPAN_REGEXP>
-
- <!-- Namespace declarations -->
- <SEQ TYPE="OPERATOR">xmlns:</SEQ>
- <!-- Default namespace declaration. Not really used in XSLT -->
- <SEQ TYPE="OPERATOR">xmlns</SEQ>
-
- <!-- Namespace prefixes -->
- <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
-
- <!-- XSLT 2.0 element names -->
- <KEYWORDS>
- <KEYWORD1>analyze-string</KEYWORD1>
- <KEYWORD1>apply-imports</KEYWORD1>
- <KEYWORD1>apply-templates</KEYWORD1>
- <KEYWORD1>attribute</KEYWORD1>
- <KEYWORD1>attribute-set</KEYWORD1>
- <KEYWORD1>call-template</KEYWORD1>
- <KEYWORD1>character-map</KEYWORD1>
- <KEYWORD1>choose</KEYWORD1>
- <KEYWORD1>comment</KEYWORD1>
- <KEYWORD1>copy</KEYWORD1>
- <KEYWORD1>copy-of</KEYWORD1>
- <KEYWORD1>decimal-format</KEYWORD1>
- <KEYWORD1>document</KEYWORD1>
- <KEYWORD1>element</KEYWORD1>
- <KEYWORD1>fallback</KEYWORD1>
- <KEYWORD1>for-each</KEYWORD1>
- <KEYWORD1>for-each-group</KEYWORD1>
- <KEYWORD1>function</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
- <KEYWORD1>import-schema</KEYWORD1>
- <KEYWORD1>include</KEYWORD1>
- <KEYWORD1>key</KEYWORD1>
- <KEYWORD1>matching-substring</KEYWORD1>
- <KEYWORD1>message</KEYWORD1>
- <KEYWORD1>namespace</KEYWORD1>
- <KEYWORD1>namespace-alias</KEYWORD1>
- <KEYWORD1>next-match</KEYWORD1>
- <KEYWORD1>non-matching-substring</KEYWORD1>
- <KEYWORD1>number</KEYWORD1>
- <KEYWORD1>otherwise</KEYWORD1>
- <KEYWORD1>output</KEYWORD1>
- <KEYWORD1>output-character</KEYWORD1>
- <KEYWORD1>param</KEYWORD1>
- <KEYWORD1>perform-sort</KEYWORD1>
- <KEYWORD1>preserve-space</KEYWORD1>
- <KEYWORD1>processing-instruction</KEYWORD1>
- <KEYWORD1>result-document</KEYWORD1>
- <KEYWORD1>sequence</KEYWORD1>
- <KEYWORD1>sort</KEYWORD1>
- <KEYWORD1>strip-space</KEYWORD1>
- <KEYWORD1>stylesheet</KEYWORD1>
- <KEYWORD1>template</KEYWORD1>
- <KEYWORD1>text</KEYWORD1>
- <KEYWORD1>transform</KEYWORD1>
- <KEYWORD1>value-of</KEYWORD1>
- <KEYWORD1>variable</KEYWORD1>
- <KEYWORD1>when</KEYWORD1>
- <KEYWORD1>with-param</KEYWORD1>
- </KEYWORDS>
-
- </RULES>
-
- <RULES DEFAULT="KEYWORD3" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[\p{Digit}]+([\p{Punct}][\p{Digit}]+)?" NO_WORD_SEP=".-_" SET="XPATH">
- <!-- String literals -->
- <SPAN TYPE="LITERAL1">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <!-- XPath comments -->
- <SPAN TYPE="COMMENT2" DELEGATE="XPATHCOMMENT2">
- <BEGIN>(:</BEGIN>
- <END>:)</END>
- </SPAN>
-
- <!-- Axes specifiers -->
- <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
- <!-- Abbreviated 'attribute::' -->
- <SEQ TYPE="KEYWORD4">@</SEQ>
-
- <!-- XPath 2.0 operators + some other stuff -->
- <!-- Comparison expressions -->
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR">!=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">></SEQ><!-- Treat as operator -->
- <SEQ TYPE="OPERATOR"><</SEQ><!-- Treat as operator -->
- <!-- Optional occurrence indicator -->
- <SEQ TYPE="OPERATOR">?</SEQ>
- <!-- Addition operator, one-or-more occurrence indicator-->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <!-- Multiplication operator, zero-or-more occurrence indicator, node test -->
- <SEQ TYPE="OPERATOR">*</SEQ>
- <!-- Path expression step separator -->
- <SEQ TYPE="OPERATOR">/</SEQ>
- <!-- Union operator -->
- <SEQ TYPE="OPERATOR">|</SEQ>
- <!-- Sequence expression item separator -->
- <SEQ TYPE="OPERATOR">,</SEQ>
-
- <!-- Predicates -->
- <SPAN TYPE="OPERATOR" DELEGATE="XPATH">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
-
- <!-- Entity references -->
- <SPAN TYPE="LITERAL3" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
-
- <!-- Namespace prefixes -->
- <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
-
- <!-- Functions -->
- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
- <SEQ TYPE="OPERATOR">)</SEQ>
-
- <!-- Variables -->
- <MARK_FOLLOWING TYPE="LITERAL2">$</MARK_FOLLOWING>
- <!-- XPath 2.0 keywords + some other stuff -->
- <KEYWORDS>
- <!-- Keywords -->
- <OPERATOR>and</OPERATOR>
- <OPERATOR>as</OPERATOR>
- <OPERATOR>castable</OPERATOR>
- <OPERATOR>div</OPERATOR>
- <OPERATOR>else</OPERATOR>
- <OPERATOR>eq</OPERATOR>
- <OPERATOR>every</OPERATOR>
- <OPERATOR>except</OPERATOR>
- <OPERATOR>for</OPERATOR>
- <OPERATOR>ge</OPERATOR>
- <OPERATOR>gt</OPERATOR>
- <OPERATOR>idiv</OPERATOR>
- <OPERATOR>if</OPERATOR>
- <OPERATOR>in</OPERATOR>
- <OPERATOR>instance</OPERATOR>
- <OPERATOR>intersect</OPERATOR>
- <OPERATOR>is</OPERATOR>
- <OPERATOR>isnot</OPERATOR>
- <OPERATOR>le</OPERATOR>
- <OPERATOR>lt</OPERATOR>
- <OPERATOR>mod</OPERATOR>
- <OPERATOR>nillable</OPERATOR>
- <OPERATOR>ne</OPERATOR>
- <OPERATOR>of</OPERATOR>
- <OPERATOR>or</OPERATOR>
- <OPERATOR>return</OPERATOR>
- <OPERATOR>satisfies</OPERATOR>
- <OPERATOR>some</OPERATOR>
- <OPERATOR>then</OPERATOR>
- <OPERATOR>to</OPERATOR>
- <OPERATOR>treat</OPERATOR>
- <OPERATOR>union</OPERATOR>
-
- <!-- Subtraction operator -->
- <OPERATOR>-</OPERATOR>
-
- </KEYWORDS>
-
- </RULES>
-
- <!-- XPath comments - top or nested within COMMENT3 -->
- <RULES DEFAULT="COMMENT2" SET="XPATHCOMMENT2">
- <SPAN TYPE="COMMENT3" DELEGATE="XPATHCOMMENT3">
- <BEGIN>(:</BEGIN>
- <END>:)</END>
- </SPAN>
- </RULES>
-
- <!-- XPath comments - nested within COMMENT2 -->
- <RULES DEFAULT="COMMENT3" SET="XPATHCOMMENT3">
- <SPAN TYPE="COMMENT2" DELEGATE="XPATHCOMMENT2">
- <BEGIN>(:</BEGIN>
- <END>:)</END>
- </SPAN>
- </RULES>
-
-</MODE>
-
-
+<?xml version="1.0"?>
+<!DOCTYPE MODE SYSTEM "xmode.dtd"><!--
+ ======================================================================
+ Edit mode for XSLT 1.0 and XSLT 2.0
+ ======================================================================
+ Token types:
+
+ COMMENT1 XML comments
+ COMMENT2 XPath 2.0 comments - top or nested within COMMENT3
+ COMMENT3 XPath 2.0 comments - nested within COMMENT2
+ COMMENT4 Default task names used in Task List
+ DIGIT Digits
+ FUNCTION Functions
+ INVALID -
+ KEYWORD1 XSLT element names
+ KEYWORD2 XSLT attribute names
+ KEYWORD3 Attribute values
+ KEYWORD4 Axes specifiers
+ LABEL Namespace prefixes
+ LITERAL1 String literals
+ LITERAL2 Parameter and variable references
+ LITERAL3 Entity references and processing instructions
+ LITERAL4 DTD constructs and CDATA sections
+ MARKUP Result elements and extension elements
+ OPERATOR XPath 2.0 keywords + some other stuff
+ ======================================================================
+-->
+
+<MODE>
+
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--"/>
+ <PROPERTY NAME="commentEnd" VALUE="-->"/>
+ </PROPS>
+
+ <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="FALSE">
+
+ <!-- XML comments -->
+ <SPAN DELEGATE="TASKS" TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- Assume 'xsl' prefix for XSLT elements -->
+ <SPAN_REGEXP HASH_CHAR="<" DELEGATE="XSLTAGS" TYPE="KEYWORD2">
+ <BEGIN><(?=xsl:)</BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+
+ <SPAN_REGEXP HASH_CHAR="<" DELEGATE="XSLTAGS" TYPE="KEYWORD2">
+ <BEGIN><(?=/xsl:)</BEGIN>
+ <END>></END>
+ </SPAN_REGEXP>
+
+ <!-- CDATA marked sections. Reuse common xml mode -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::CDATA">
+ <BEGIN><![CDATA[</BEGIN>
+ <END>]]></END>
+ </SPAN>
+
+ <!-- DTD constructs. Reuse common xml mode -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- Entity references -->
+ <SPAN TYPE="LITERAL3" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <!-- Processing instructions -->
+ <SPAN TYPE="LITERAL3">
+ <BEGIN><?</BEGIN>
+ <END>?></END>
+ </SPAN>
+
+ <!-- Result elements and extension elements -->
+ <SPAN DELEGATE="TAGS" TYPE="MARKUP">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+ </RULES>
+
+ <!-- XML comments -->
+ <RULES DEFAULT="COMMENT1" IGNORE_CASE="FALSE" SET="TASKS">
+ <!-- Default task names used in Task List -->
+ <KEYWORDS>
+ <COMMENT4>DEBUG:</COMMENT4>
+ <COMMENT4>DONE:</COMMENT4>
+ <COMMENT4>FIXME:</COMMENT4>
+ <COMMENT4>IDEA:</COMMENT4>
+ <COMMENT4>NOTE:</COMMENT4>
+ <COMMENT4>QUESTION:</COMMENT4>
+ <COMMENT4>TODO:</COMMENT4>
+ <COMMENT4>XXX</COMMENT4>
+ <COMMENT4>???</COMMENT4>
+ </KEYWORDS>
+ </RULES>
+
+ <!-- Result elements and extension elements -->
+ <RULES DEFAULT="MARKUP" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP=".-_:" SET="TAGS">
+
+ <!-- Highlight all AVTs in result attribute values. -->
+ <SPAN TYPE="MARKUP" DELEGATE="AVT">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="MARKUP" DELEGATE="AVT">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- Namespace declarations -->
+ <SEQ TYPE="OPERATOR">xmlns:</SEQ>
+ <!-- Default namespace declaration. Not really used in XSLT -->
+ <SEQ TYPE="OPERATOR">xmlns</SEQ>
+
+ <!-- Namespace prefixes -->
+ <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
+
+ </RULES>
+
+ <!-- AVTs -->
+ <RULES DEFAULT="KEYWORD3" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP=".-_:" SET="AVT">
+
+ <!-- Literal curly braces ({}) must be written as {{ or }} -->
+ <SEQ>{{</SEQ>
+ <SEQ>}}</SEQ><!-- Does nothing. Is overridden by the SPAN below. -->
+
+ <!-- The AVT itself -->
+ <SPAN DELEGATE="XPATH" TYPE="OPERATOR">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+
+ <!-- Entity references -->
+ <SPAN TYPE="LITERAL3" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ </RULES>
+
+ <!-- XSLT tags -->
+ <RULES DEFAULT="KEYWORD2" HIGHLIGHT_DIGITS="FALSE" NO_WORD_SEP=".-_:" SET="XSLTAGS">
+
+ <!-- If we spot something that looks like an AVT, assume it is. Lazy, I know... -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="AVT">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="KEYWORD2" DELEGATE="AVT">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- XSLT attributes that contains XPath expressions or match patterns -->
+ <!-- count -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="count" DELEGATE="XPATH">
+ <BEGIN>count[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="count" DELEGATE="XPATH">
+ <BEGIN>count[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- from -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="from" DELEGATE="XPATH">
+ <BEGIN>from[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="from" DELEGATE="XPATH">
+ <BEGIN>from[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- group-adjacent -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-adjacent" DELEGATE="XPATH">
+ <BEGIN>group-adjacent[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-adjacent" DELEGATE="XPATH">
+ <BEGIN>group-adjacent[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- group-by -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-by" DELEGATE="XPATH">
+ <BEGIN>group-by[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-by" DELEGATE="XPATH">
+ <BEGIN>group-by[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- group-ending-with -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-ending-with" DELEGATE="XPATH">
+ <BEGIN>group-ending-with[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-ending-with" DELEGATE="XPATH">
+ <BEGIN>group-ending-with[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- group-starting-with -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-starting-with" DELEGATE="XPATH">
+ <BEGIN>group-starting-with[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="group-starting-with" DELEGATE="XPATH">
+ <BEGIN>group-starting-with[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- match -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="match" DELEGATE="XPATH">
+ <BEGIN>match[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="match" DELEGATE="XPATH">
+ <BEGIN>match[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- select -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="select" DELEGATE="XPATH">
+ <BEGIN>select[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="select" DELEGATE="XPATH">
+ <BEGIN>select[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- test -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="test" DELEGATE="XPATH">
+ <BEGIN>test[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="test" DELEGATE="XPATH">
+ <BEGIN>test[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- use -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="use" DELEGATE="XPATH">
+ <BEGIN>use[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="use" DELEGATE="XPATH">
+ <BEGIN>use[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+ <!-- value -->
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="value" DELEGATE="XPATH">
+ <BEGIN>value[\p{Space}]*=[\p{Space}]*"</BEGIN>
+ <END>"</END>
+ </SPAN_REGEXP>
+ <SPAN_REGEXP TYPE="KEYWORD2" HASH_CHAR="select" DELEGATE="XPATH">
+ <BEGIN>select[\p{Space}]*=[\p{Space}]*'</BEGIN>
+ <END>'</END>
+ </SPAN_REGEXP>
+
+ <!-- Namespace declarations -->
+ <SEQ TYPE="OPERATOR">xmlns:</SEQ>
+ <!-- Default namespace declaration. Not really used in XSLT -->
+ <SEQ TYPE="OPERATOR">xmlns</SEQ>
+
+ <!-- Namespace prefixes -->
+ <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <!-- XSLT 2.0 element names -->
+ <KEYWORDS>
+ <KEYWORD1>analyze-string</KEYWORD1>
+ <KEYWORD1>apply-imports</KEYWORD1>
+ <KEYWORD1>apply-templates</KEYWORD1>
+ <KEYWORD1>attribute</KEYWORD1>
+ <KEYWORD1>attribute-set</KEYWORD1>
+ <KEYWORD1>call-template</KEYWORD1>
+ <KEYWORD1>character-map</KEYWORD1>
+ <KEYWORD1>choose</KEYWORD1>
+ <KEYWORD1>comment</KEYWORD1>
+ <KEYWORD1>copy</KEYWORD1>
+ <KEYWORD1>copy-of</KEYWORD1>
+ <KEYWORD1>decimal-format</KEYWORD1>
+ <KEYWORD1>document</KEYWORD1>
+ <KEYWORD1>element</KEYWORD1>
+ <KEYWORD1>fallback</KEYWORD1>
+ <KEYWORD1>for-each</KEYWORD1>
+ <KEYWORD1>for-each-group</KEYWORD1>
+ <KEYWORD1>function</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>import-schema</KEYWORD1>
+ <KEYWORD1>include</KEYWORD1>
+ <KEYWORD1>key</KEYWORD1>
+ <KEYWORD1>matching-substring</KEYWORD1>
+ <KEYWORD1>message</KEYWORD1>
+ <KEYWORD1>namespace</KEYWORD1>
+ <KEYWORD1>namespace-alias</KEYWORD1>
+ <KEYWORD1>next-match</KEYWORD1>
+ <KEYWORD1>non-matching-substring</KEYWORD1>
+ <KEYWORD1>number</KEYWORD1>
+ <KEYWORD1>otherwise</KEYWORD1>
+ <KEYWORD1>output</KEYWORD1>
+ <KEYWORD1>output-character</KEYWORD1>
+ <KEYWORD1>param</KEYWORD1>
+ <KEYWORD1>perform-sort</KEYWORD1>
+ <KEYWORD1>preserve-space</KEYWORD1>
+ <KEYWORD1>processing-instruction</KEYWORD1>
+ <KEYWORD1>result-document</KEYWORD1>
+ <KEYWORD1>sequence</KEYWORD1>
+ <KEYWORD1>sort</KEYWORD1>
+ <KEYWORD1>strip-space</KEYWORD1>
+ <KEYWORD1>stylesheet</KEYWORD1>
+ <KEYWORD1>template</KEYWORD1>
+ <KEYWORD1>text</KEYWORD1>
+ <KEYWORD1>transform</KEYWORD1>
+ <KEYWORD1>value-of</KEYWORD1>
+ <KEYWORD1>variable</KEYWORD1>
+ <KEYWORD1>when</KEYWORD1>
+ <KEYWORD1>with-param</KEYWORD1>
+ </KEYWORDS>
+
+ </RULES>
+
+ <RULES DEFAULT="KEYWORD3" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[\p{Digit}]+([\p{Punct}][\p{Digit}]+)?" NO_WORD_SEP=".-_" SET="XPATH">
+ <!-- String literals -->
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <!-- XPath comments -->
+ <SPAN TYPE="COMMENT2" DELEGATE="XPATHCOMMENT2">
+ <BEGIN>(:</BEGIN>
+ <END>:)</END>
+ </SPAN>
+
+ <!-- Axes specifiers -->
+ <MARK_PREVIOUS TYPE="KEYWORD4">::</MARK_PREVIOUS>
+ <!-- Abbreviated 'attribute::' -->
+ <SEQ TYPE="KEYWORD4">@</SEQ>
+
+ <!-- XPath 2.0 operators + some other stuff -->
+ <!-- Comparison expressions -->
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR">!=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ><!-- Treat as operator -->
+ <SEQ TYPE="OPERATOR"><</SEQ><!-- Treat as operator -->
+ <!-- Optional occurrence indicator -->
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <!-- Addition operator, one-or-more occurrence indicator-->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <!-- Multiplication operator, zero-or-more occurrence indicator, node test -->
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <!-- Path expression step separator -->
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <!-- Union operator -->
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <!-- Sequence expression item separator -->
+ <SEQ TYPE="OPERATOR">,</SEQ>
+
+ <!-- Predicates -->
+ <SPAN TYPE="OPERATOR" DELEGATE="XPATH">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+
+ <!-- Entity references -->
+ <SPAN TYPE="LITERAL3" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+
+ <!-- Namespace prefixes -->
+ <MARK_PREVIOUS TYPE="LABEL">:</MARK_PREVIOUS>
+
+ <!-- Functions -->
+ <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
+ <SEQ TYPE="OPERATOR">)</SEQ>
+
+ <!-- Variables -->
+ <MARK_FOLLOWING TYPE="LITERAL2">$</MARK_FOLLOWING>
+ <!-- XPath 2.0 keywords + some other stuff -->
+ <KEYWORDS>
+ <!-- Keywords -->
+ <OPERATOR>and</OPERATOR>
+ <OPERATOR>as</OPERATOR>
+ <OPERATOR>castable</OPERATOR>
+ <OPERATOR>div</OPERATOR>
+ <OPERATOR>else</OPERATOR>
+ <OPERATOR>eq</OPERATOR>
+ <OPERATOR>every</OPERATOR>
+ <OPERATOR>except</OPERATOR>
+ <OPERATOR>for</OPERATOR>
+ <OPERATOR>ge</OPERATOR>
+ <OPERATOR>gt</OPERATOR>
+ <OPERATOR>idiv</OPERATOR>
+ <OPERATOR>if</OPERATOR>
+ <OPERATOR>in</OPERATOR>
+ <OPERATOR>instance</OPERATOR>
+ <OPERATOR>intersect</OPERATOR>
+ <OPERATOR>is</OPERATOR>
+ <OPERATOR>isnot</OPERATOR>
+ <OPERATOR>le</OPERATOR>
+ <OPERATOR>lt</OPERATOR>
+ <OPERATOR>mod</OPERATOR>
+ <OPERATOR>nillable</OPERATOR>
+ <OPERATOR>ne</OPERATOR>
+ <OPERATOR>of</OPERATOR>
+ <OPERATOR>or</OPERATOR>
+ <OPERATOR>return</OPERATOR>
+ <OPERATOR>satisfies</OPERATOR>
+ <OPERATOR>some</OPERATOR>
+ <OPERATOR>then</OPERATOR>
+ <OPERATOR>to</OPERATOR>
+ <OPERATOR>treat</OPERATOR>
+ <OPERATOR>union</OPERATOR>
+
+ <!-- Subtraction operator -->
+ <OPERATOR>-</OPERATOR>
+
+ </KEYWORDS>
+
+ </RULES>
+
+ <!-- XPath comments - top or nested within COMMENT3 -->
+ <RULES DEFAULT="COMMENT2" SET="XPATHCOMMENT2">
+ <SPAN TYPE="COMMENT3" DELEGATE="XPATHCOMMENT3">
+ <BEGIN>(:</BEGIN>
+ <END>:)</END>
+ </SPAN>
+ </RULES>
+
+ <!-- XPath comments - nested within COMMENT2 -->
+ <RULES DEFAULT="COMMENT3" SET="XPATHCOMMENT3">
+ <SPAN TYPE="COMMENT2" DELEGATE="XPATHCOMMENT2">
+ <BEGIN>(:</BEGIN>
+ <END>:)</END>
+ </SPAN>
+ </RULES>
+
+</MODE>
+
+
diff --git a/jEdit/modes/yab.xml b/jEdit/modes/yab.xml
index 59a6110..28feb19 100644
--- a/jEdit/modes/yab.xml
+++ b/jEdit/modes/yab.xml
@@ -1,318 +1,318 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!-- YAB (YABasic) 3/22/09 by Ben Dutcher -->
-<!-- roughly based on the grouping in the YAB documentation -->
-<MODE>
- <PROPS>
- <PROPERTY NAME="lineComment" VALUE="'" />
- </PROPS>
-
- <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" ESCAPE="\">
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <!-- YAB uses both the logical operator AND, and the bitwise function AND() -->
- <!-- Doing something wrong here. Goal is to mark the "and" of "and(a,b)" as a function,
- but not mark the opening "(". I'm using SEQ instead, even though it does mark the "(".
- -->
- <!-- MARK_PREVIOUS AT_WORD_START="TRUE"
- MATCH_TYPE="FUNCTION">"and("</MARK_PREVIOUS -->
-
- <!-- YAB has a large number of comment tags -->
- <EOL_SPAN TYPE="COMMENT1">rem </EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT3" AT_LINE_START="TRUE">documentation</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT3" AT_LINE_START="TRUE">docu</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT3" AT_LINE_START="TRUE">doc</EOL_SPAN>
- <EOL_SPAN TYPE="COMMENT4" AT_LINE_START="TRUE">#</EOL_SPAN>
-
- <!-- Comparison operators -->
- <SEQ TYPE="OPERATOR"><</SEQ>
- <SEQ TYPE="OPERATOR"><=</SEQ>
- <SEQ TYPE="OPERATOR">>=</SEQ>
- <SEQ TYPE="OPERATOR">></SEQ>
- <SEQ TYPE="OPERATOR">=</SEQ>
- <SEQ TYPE="OPERATOR"><></SEQ>
-
- <!-- Arithmetic operators -->
- <SEQ TYPE="OPERATOR">+</SEQ>
- <SEQ TYPE="OPERATOR">-</SEQ>
- <SEQ TYPE="OPERATOR">*</SEQ>
- <SEQ TYPE="OPERATOR">/</SEQ>
- <SEQ TYPE="OPERATOR">**</SEQ>
- <SEQ TYPE="OPERATOR">^</SEQ>
- <!-- YAB uses both the logical operator AND, and the bitwise function AND() -->
- <!-- Unfortuantely, this also marks the opening "(" -->
- <SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">and(</SEQ>
-
- <!-- Concatenation operators -->
- <!-- strings -->
- <SEQ TYPE="OPERATOR">&</SEQ>
-
- <!-- <SEQ TYPE="NULL">_</SEQ>-->
- <!-- Instruction separator -->
- <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
- AT_LINE_START="TRUE">:</MARK_PREVIOUS>
-
- <KEYWORDS>
-
- <!-- just testing! -->
- <KEYWORD4>alotta</KEYWORD4>
-
- <!-- Conditional Statements -->
- <KEYWORD1>case</KEYWORD1>
- <KEYWORD1>default</KEYWORD1>
- <KEYWORD1>else</KEYWORD1>
- <KEYWORD1>elseif</KEYWORD1>
- <KEYWORD1>elsif</KEYWORD1>
- <KEYWORD1>endif</KEYWORD1>
- <KEYWORD1>fi</KEYWORD1>
- <KEYWORD1>if</KEYWORD1>
- <KEYWORD1>switch</KEYWORD1>
- <KEYWORD1>then</KEYWORD1>
-
- <!-- naviagation -->
- <KEYWORD1>gosub</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>label</KEYWORD1>
- <KEYWORD1>return</KEYWORD1>
-
- <!-- special -->
- <KEYWORD1>bind</KEYWORD1>
- <KEYWORD1>compile</KEYWORD1>
-
- <!-- Loop Statements -->
- <KEYWORD1>break</KEYWORD1>
- <KEYWORD1>continue</KEYWORD1>
- <KEYWORD1>do</KEYWORD1>
- <KEYWORD1>each</KEYWORD1>
- <KEYWORD1>for</KEYWORD1>
- <KEYWORD1>in</KEYWORD1>
- <KEYWORD1>loop</KEYWORD1>
- <KEYWORD1>next</KEYWORD1>
- <KEYWORD1>repeat</KEYWORD1>
- <KEYWORD1>step</KEYWORD1>
- <KEYWORD1>to</KEYWORD1>
- <KEYWORD1>until</KEYWORD1>
- <KEYWORD1>wend</KEYWORD1>
- <KEYWORD1>while</KEYWORD1>
-
-
- <!-- Closing, Exit Statements -->
- <KEYWORD1>end</KEYWORD1>
- <KEYWORD1>exit</KEYWORD1>
-
- <!-- control -->
- <KEYWORD1>pause</KEYWORD1>
- <KEYWORD1>sleep</KEYWORD1>
- <KEYWORD1>wait</KEYWORD1>
-
- <!-- Methods, Functions, Class, Properties, Variables -->
- <KEYWORD1>export</KEYWORD1>
- <KEYWORD1>import</KEYWORD1>
- <KEYWORD1>local</KEYWORD1>
- <KEYWORD1>numparam</KEYWORD1>
- <KEYWORD1>numparams</KEYWORD1>
- <KEYWORD1>static</KEYWORD1>
- <KEYWORD1>sub</KEYWORD1>
- <KEYWORD1>subroutine</KEYWORD1>
- <!-- end sub -->
-
-
- <!-- Declaration -->
- <KEYWORD1>const</KEYWORD1>
- <KEYWORD1>dim</KEYWORD1>
- <KEYWORD1>redim</KEYWORD1>
-
- <!-- Comments -->
- <KEYWORD3>rem</KEYWORD3>
- <KEYWORD2>documentation</KEYWORD2>
- <KEYWORD3>docu$</KEYWORD3>
- <KEYWORD2>docu</KEYWORD2>
- <KEYWORD2>doc</KEYWORD2>
-
- <!-- Function Call - Dynamic Evaluation -->
- <KEYWORD1>execute$</KEYWORD1>
- <KEYWORD1>execute</KEYWORD1>
- <KEYWORD1>system</KEYWORD1>
- <KEYWORD1>system$</KEYWORD1>
-
- <!-- Miscellaneous -->
- <KEYWORD1>beep</KEYWORD1>
- <KEYWORD1>bell</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>data</KEYWORD1>
- <KEYWORD1>erase</KEYWORD1>
- <KEYWORD1>error</KEYWORD1>
- <KEYWORD1>explicit</KEYWORD1>
- <KEYWORD1>getscreen$</KEYWORD1>
- <KEYWORD1>goto</KEYWORD1>
- <KEYWORD1>interrupt</KEYWORD1>
- <KEYWORD1>on</KEYWORD1>
- <KEYWORD1>option</KEYWORD1>
- <KEYWORD1>putscreen</KEYWORD1>
- <KEYWORD1>randomize</KEYWORD1>
- <KEYWORD1>read</KEYWORD1>
- <KEYWORD1>restore</KEYWORD1>
- <KEYWORD1>resume</KEYWORD1>
- <KEYWORD1>screen</KEYWORD1>
- <!-- on interrupt -->
- <!-- clear screen -->
-
-
- <!-- I/O -->
- <KEYWORD1>@</KEYWORD1>
- <KEYWORD1>as</KEYWORD1>
- <KEYWORD1>at</KEYWORD1>
- <KEYWORD1>close</KEYWORD1>
- <KEYWORD1>eof</KEYWORD1>
- <KEYWORD1>inkey$</KEYWORD1>
- <KEYWORD1>input</KEYWORD1>
- <KEYWORD1>line</KEYWORD1>
- <KEYWORD1>mouseb</KEYWORD1>
- <KEYWORD1>mousemod</KEYWORD1>
- <KEYWORD1>mousex</KEYWORD1>
- <KEYWORD1>mousey</KEYWORD1>
- <KEYWORD1>open</KEYWORD1>
- <KEYWORD1>peek$</KEYWORD1>
- <KEYWORD1>peek</KEYWORD1>
- <KEYWORD1>poke</KEYWORD1>
- <KEYWORD1>print</KEYWORD1>
- <KEYWORD1>printer</KEYWORD1>
- <KEYWORD1>reading</KEYWORD1>
- <KEYWORD1>seek</KEYWORD1>
- <KEYWORD1>tell</KEYWORD1>
- <KEYWORD1>using</KEYWORD1>
- <KEYWORD1>writing</KEYWORD1>
- <!-- line input -->
- <!-- for reading as, for writing as -->
- <!-- open printer, close printer -->
- <!-- print color, print colour, print reverse, print at, print @ -->
-
- <!-- draw -->
- <KEYWORD1>backcolor</KEYWORD1>
- <KEYWORD1>backcolour</KEYWORD1>
- <KEYWORD1>box</KEYWORD1>
- <KEYWORD1>circle</KEYWORD1>
- <KEYWORD1>clear</KEYWORD1>
- <KEYWORD1>color</KEYWORD1>
- <KEYWORD1>colour</KEYWORD1>
- <KEYWORD1>curve</KEYWORD1>
- <KEYWORD1>dot</KEYWORD1>
- <KEYWORD1>fill</KEYWORD1>
- <KEYWORD1>getbit$</KEYWORD1>
- <KEYWORD1>line</KEYWORD1>
- <KEYWORD1>new</KEYWORD1>
- <!-- open window, window origin, close curve, clear window, close window, new curve -->
- <KEYWORD1>origin</KEYWORD1>
- <KEYWORD1>putbit</KEYWORD1>
- <KEYWORD1>rectangle</KEYWORD1>
- <KEYWORD1>reverse</KEYWORD1>
- <KEYWORD1>text</KEYWORD1>
- <KEYWORD1>triangle</KEYWORD1>
- <KEYWORD1>window</KEYWORD1>
-
- <!-- Operators -->
-
- <!-- Arithmetic operators -->
- <OPERATOR>let</OPERATOR>
- <OPERATOR>mod</OPERATOR>
-
- <!-- Logical operators -->
- <KEYWORD3>and</KEYWORD3>
- <KEYWORD3>eor</KEYWORD3>
- <KEYWORD3>imp</KEYWORD3>
- <KEYWORD3>not</KEYWORD3>
- <KEYWORD3>or</KEYWORD3>
- <KEYWORD3>xor</KEYWORD3>
-
- <!-- Datatypes Constants/Literals -->
- <KEYWORD3>false</KEYWORD3>
- <KEYWORD3>true</KEYWORD3>
-
- <!-- Miscellaneous -->
- <LITERAL2>euler</LITERAL2>
- <LITERAL2>pi</LITERAL2>
-
- <!-- Built-in Functions -->
- <!-- Array Handling -->
- <KEYWORD2>arraydimension</KEYWORD2>
- <KEYWORD2>arraydim</KEYWORD2>
- <KEYWORD2>arraysize</KEYWORD2>
-
- <!-- Conversion Functions (Radix) -->
- <FUNCTION>bin$</FUNCTION>
- <FUNCTION>dec</FUNCTION>
- <FUNCTION>hex$</FUNCTION>
- <FUNCTION>str$</FUNCTION>
-
- <!-- Date/Time Functions -->
- <FUNCTION>date$</FUNCTION>
- <FUNCTION>time$</FUNCTION>
-
- <!-- Math Functions -->
- <FUNCTION>abs</FUNCTION>
- <FUNCTION>acos</FUNCTION>
- <!-- FUNCTION>and(</FUNCTION -->
- <FUNCTION>asin</FUNCTION>
- <FUNCTION>atan</FUNCTION>
- <FUNCTION>bin$</FUNCTION>
- <FUNCTION>cos</FUNCTION>
- <FUNCTION>dec</FUNCTION>
- <FUNCTION>eor</FUNCTION>
- <FUNCTION>exp</FUNCTION>
- <FUNCTION>fix</FUNCTION>
- <FUNCTION>frac</FUNCTION>
- <FUNCTION>int</FUNCTION>
- <FUNCTION>log</FUNCTION>
- <FUNCTION>max</FUNCTION>
- <FUNCTION>min</FUNCTION>
- <FUNCTION>ran</FUNCTION>
- <FUNCTION>sgn</FUNCTION>
- <FUNCTION>sig</FUNCTION>
- <FUNCTION>sin</FUNCTION>
- <FUNCTION>sqr</FUNCTION>
- <FUNCTION>sqrt</FUNCTION>
- <FUNCTION>tan</FUNCTION>
-
- <!-- Strings -->
- <FUNCTION>asc</FUNCTION>
- <FUNCTION>chr$</FUNCTION>
- <FUNCTION>glob</FUNCTION>
- <FUNCTION>hex$</FUNCTION>
- <FUNCTION>instr</FUNCTION>
- <FUNCTION>left$</FUNCTION>
- <FUNCTION>len</FUNCTION>
- <FUNCTION>lower$</FUNCTION>
- <FUNCTION>ltrim$</FUNCTION>
- <FUNCTION>mid$</FUNCTION>
- <FUNCTION>right$</FUNCTION>
- <FUNCTION>rinstr</FUNCTION>
- <FUNCTION>rtrim$</FUNCTION>
- <FUNCTION>split</FUNCTION>
- <FUNCTION>token</FUNCTION>
- <FUNCTION>trim$</FUNCTION>
- <FUNCTION>upper$</FUNCTION>
- <FUNCTION>val</FUNCTION>
-
- <!-- YABasic listed keywords that aren't described in the YABasic documentation:
- bitblit$
- bitblit
- bitblt$
- bitblt
- filled
- mousebutton
- mousemodifier
- rect
- split$
- token$
- -->
-
-
- </KEYWORDS>
- </RULES>
-</MODE>
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!-- YAB (YABasic) 3/22/09 by Ben Dutcher -->
+<!-- roughly based on the grouping in the YAB documentation -->
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="lineComment" VALUE="'" />
+ </PROPS>
+
+ <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE" ESCAPE="\">
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <!-- YAB uses both the logical operator AND, and the bitwise function AND() -->
+ <!-- Doing something wrong here. Goal is to mark the "and" of "and(a,b)" as a function,
+ but not mark the opening "(". I'm using SEQ instead, even though it does mark the "(".
+ -->
+ <!-- MARK_PREVIOUS AT_WORD_START="TRUE"
+ MATCH_TYPE="FUNCTION">"and("</MARK_PREVIOUS -->
+
+ <!-- YAB has a large number of comment tags -->
+ <EOL_SPAN TYPE="COMMENT1">rem </EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT3" AT_LINE_START="TRUE">documentation</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT3" AT_LINE_START="TRUE">docu</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT3" AT_LINE_START="TRUE">doc</EOL_SPAN>
+ <EOL_SPAN TYPE="COMMENT4" AT_LINE_START="TRUE">#</EOL_SPAN>
+
+ <!-- Comparison operators -->
+ <SEQ TYPE="OPERATOR"><</SEQ>
+ <SEQ TYPE="OPERATOR"><=</SEQ>
+ <SEQ TYPE="OPERATOR">>=</SEQ>
+ <SEQ TYPE="OPERATOR">></SEQ>
+ <SEQ TYPE="OPERATOR">=</SEQ>
+ <SEQ TYPE="OPERATOR"><></SEQ>
+
+ <!-- Arithmetic operators -->
+ <SEQ TYPE="OPERATOR">+</SEQ>
+ <SEQ TYPE="OPERATOR">-</SEQ>
+ <SEQ TYPE="OPERATOR">*</SEQ>
+ <SEQ TYPE="OPERATOR">/</SEQ>
+ <SEQ TYPE="OPERATOR">**</SEQ>
+ <SEQ TYPE="OPERATOR">^</SEQ>
+ <!-- YAB uses both the logical operator AND, and the bitwise function AND() -->
+ <!-- Unfortuantely, this also marks the opening "(" -->
+ <SEQ TYPE="FUNCTION" AT_WORD_START="TRUE">and(</SEQ>
+
+ <!-- Concatenation operators -->
+ <!-- strings -->
+ <SEQ TYPE="OPERATOR">&</SEQ>
+
+ <!-- <SEQ TYPE="NULL">_</SEQ>-->
+ <!-- Instruction separator -->
+ <MARK_PREVIOUS TYPE="LABEL" MATCH_TYPE="OPERATOR"
+ AT_LINE_START="TRUE">:</MARK_PREVIOUS>
+
+ <KEYWORDS>
+
+ <!-- just testing! -->
+ <KEYWORD4>alotta</KEYWORD4>
+
+ <!-- Conditional Statements -->
+ <KEYWORD1>case</KEYWORD1>
+ <KEYWORD1>default</KEYWORD1>
+ <KEYWORD1>else</KEYWORD1>
+ <KEYWORD1>elseif</KEYWORD1>
+ <KEYWORD1>elsif</KEYWORD1>
+ <KEYWORD1>endif</KEYWORD1>
+ <KEYWORD1>fi</KEYWORD1>
+ <KEYWORD1>if</KEYWORD1>
+ <KEYWORD1>switch</KEYWORD1>
+ <KEYWORD1>then</KEYWORD1>
+
+ <!-- naviagation -->
+ <KEYWORD1>gosub</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>label</KEYWORD1>
+ <KEYWORD1>return</KEYWORD1>
+
+ <!-- special -->
+ <KEYWORD1>bind</KEYWORD1>
+ <KEYWORD1>compile</KEYWORD1>
+
+ <!-- Loop Statements -->
+ <KEYWORD1>break</KEYWORD1>
+ <KEYWORD1>continue</KEYWORD1>
+ <KEYWORD1>do</KEYWORD1>
+ <KEYWORD1>each</KEYWORD1>
+ <KEYWORD1>for</KEYWORD1>
+ <KEYWORD1>in</KEYWORD1>
+ <KEYWORD1>loop</KEYWORD1>
+ <KEYWORD1>next</KEYWORD1>
+ <KEYWORD1>repeat</KEYWORD1>
+ <KEYWORD1>step</KEYWORD1>
+ <KEYWORD1>to</KEYWORD1>
+ <KEYWORD1>until</KEYWORD1>
+ <KEYWORD1>wend</KEYWORD1>
+ <KEYWORD1>while</KEYWORD1>
+
+
+ <!-- Closing, Exit Statements -->
+ <KEYWORD1>end</KEYWORD1>
+ <KEYWORD1>exit</KEYWORD1>
+
+ <!-- control -->
+ <KEYWORD1>pause</KEYWORD1>
+ <KEYWORD1>sleep</KEYWORD1>
+ <KEYWORD1>wait</KEYWORD1>
+
+ <!-- Methods, Functions, Class, Properties, Variables -->
+ <KEYWORD1>export</KEYWORD1>
+ <KEYWORD1>import</KEYWORD1>
+ <KEYWORD1>local</KEYWORD1>
+ <KEYWORD1>numparam</KEYWORD1>
+ <KEYWORD1>numparams</KEYWORD1>
+ <KEYWORD1>static</KEYWORD1>
+ <KEYWORD1>sub</KEYWORD1>
+ <KEYWORD1>subroutine</KEYWORD1>
+ <!-- end sub -->
+
+
+ <!-- Declaration -->
+ <KEYWORD1>const</KEYWORD1>
+ <KEYWORD1>dim</KEYWORD1>
+ <KEYWORD1>redim</KEYWORD1>
+
+ <!-- Comments -->
+ <KEYWORD3>rem</KEYWORD3>
+ <KEYWORD2>documentation</KEYWORD2>
+ <KEYWORD3>docu$</KEYWORD3>
+ <KEYWORD2>docu</KEYWORD2>
+ <KEYWORD2>doc</KEYWORD2>
+
+ <!-- Function Call - Dynamic Evaluation -->
+ <KEYWORD1>execute$</KEYWORD1>
+ <KEYWORD1>execute</KEYWORD1>
+ <KEYWORD1>system</KEYWORD1>
+ <KEYWORD1>system$</KEYWORD1>
+
+ <!-- Miscellaneous -->
+ <KEYWORD1>beep</KEYWORD1>
+ <KEYWORD1>bell</KEYWORD1>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>data</KEYWORD1>
+ <KEYWORD1>erase</KEYWORD1>
+ <KEYWORD1>error</KEYWORD1>
+ <KEYWORD1>explicit</KEYWORD1>
+ <KEYWORD1>getscreen$</KEYWORD1>
+ <KEYWORD1>goto</KEYWORD1>
+ <KEYWORD1>interrupt</KEYWORD1>
+ <KEYWORD1>on</KEYWORD1>
+ <KEYWORD1>option</KEYWORD1>
+ <KEYWORD1>putscreen</KEYWORD1>
+ <KEYWORD1>randomize</KEYWORD1>
+ <KEYWORD1>read</KEYWORD1>
+ <KEYWORD1>restore</KEYWORD1>
+ <KEYWORD1>resume</KEYWORD1>
+ <KEYWORD1>screen</KEYWORD1>
+ <!-- on interrupt -->
+ <!-- clear screen -->
+
+
+ <!-- I/O -->
+ <KEYWORD1>@</KEYWORD1>
+ <KEYWORD1>as</KEYWORD1>
+ <KEYWORD1>at</KEYWORD1>
+ <KEYWORD1>close</KEYWORD1>
+ <KEYWORD1>eof</KEYWORD1>
+ <KEYWORD1>inkey$</KEYWORD1>
+ <KEYWORD1>input</KEYWORD1>
+ <KEYWORD1>line</KEYWORD1>
+ <KEYWORD1>mouseb</KEYWORD1>
+ <KEYWORD1>mousemod</KEYWORD1>
+ <KEYWORD1>mousex</KEYWORD1>
+ <KEYWORD1>mousey</KEYWORD1>
+ <KEYWORD1>open</KEYWORD1>
+ <KEYWORD1>peek$</KEYWORD1>
+ <KEYWORD1>peek</KEYWORD1>
+ <KEYWORD1>poke</KEYWORD1>
+ <KEYWORD1>print</KEYWORD1>
+ <KEYWORD1>printer</KEYWORD1>
+ <KEYWORD1>reading</KEYWORD1>
+ <KEYWORD1>seek</KEYWORD1>
+ <KEYWORD1>tell</KEYWORD1>
+ <KEYWORD1>using</KEYWORD1>
+ <KEYWORD1>writing</KEYWORD1>
+ <!-- line input -->
+ <!-- for reading as, for writing as -->
+ <!-- open printer, close printer -->
+ <!-- print color, print colour, print reverse, print at, print @ -->
+
+ <!-- draw -->
+ <KEYWORD1>backcolor</KEYWORD1>
+ <KEYWORD1>backcolour</KEYWORD1>
+ <KEYWORD1>box</KEYWORD1>
+ <KEYWORD1>circle</KEYWORD1>
+ <KEYWORD1>clear</KEYWORD1>
+ <KEYWORD1>color</KEYWORD1>
+ <KEYWORD1>colour</KEYWORD1>
+ <KEYWORD1>curve</KEYWORD1>
+ <KEYWORD1>dot</KEYWORD1>
+ <KEYWORD1>fill</KEYWORD1>
+ <KEYWORD1>getbit$</KEYWORD1>
+ <KEYWORD1>line</KEYWORD1>
+ <KEYWORD1>new</KEYWORD1>
+ <!-- open window, window origin, close curve, clear window, close window, new curve -->
+ <KEYWORD1>origin</KEYWORD1>
+ <KEYWORD1>putbit</KEYWORD1>
+ <KEYWORD1>rectangle</KEYWORD1>
+ <KEYWORD1>reverse</KEYWORD1>
+ <KEYWORD1>text</KEYWORD1>
+ <KEYWORD1>triangle</KEYWORD1>
+ <KEYWORD1>window</KEYWORD1>
+
+ <!-- Operators -->
+
+ <!-- Arithmetic operators -->
+ <OPERATOR>let</OPERATOR>
+ <OPERATOR>mod</OPERATOR>
+
+ <!-- Logical operators -->
+ <KEYWORD3>and</KEYWORD3>
+ <KEYWORD3>eor</KEYWORD3>
+ <KEYWORD3>imp</KEYWORD3>
+ <KEYWORD3>not</KEYWORD3>
+ <KEYWORD3>or</KEYWORD3>
+ <KEYWORD3>xor</KEYWORD3>
+
+ <!-- Datatypes Constants/Literals -->
+ <KEYWORD3>false</KEYWORD3>
+ <KEYWORD3>true</KEYWORD3>
+
+ <!-- Miscellaneous -->
+ <LITERAL2>euler</LITERAL2>
+ <LITERAL2>pi</LITERAL2>
+
+ <!-- Built-in Functions -->
+ <!-- Array Handling -->
+ <KEYWORD2>arraydimension</KEYWORD2>
+ <KEYWORD2>arraydim</KEYWORD2>
+ <KEYWORD2>arraysize</KEYWORD2>
+
+ <!-- Conversion Functions (Radix) -->
+ <FUNCTION>bin$</FUNCTION>
+ <FUNCTION>dec</FUNCTION>
+ <FUNCTION>hex$</FUNCTION>
+ <FUNCTION>str$</FUNCTION>
+
+ <!-- Date/Time Functions -->
+ <FUNCTION>date$</FUNCTION>
+ <FUNCTION>time$</FUNCTION>
+
+ <!-- Math Functions -->
+ <FUNCTION>abs</FUNCTION>
+ <FUNCTION>acos</FUNCTION>
+ <!-- FUNCTION>and(</FUNCTION -->
+ <FUNCTION>asin</FUNCTION>
+ <FUNCTION>atan</FUNCTION>
+ <FUNCTION>bin$</FUNCTION>
+ <FUNCTION>cos</FUNCTION>
+ <FUNCTION>dec</FUNCTION>
+ <FUNCTION>eor</FUNCTION>
+ <FUNCTION>exp</FUNCTION>
+ <FUNCTION>fix</FUNCTION>
+ <FUNCTION>frac</FUNCTION>
+ <FUNCTION>int</FUNCTION>
+ <FUNCTION>log</FUNCTION>
+ <FUNCTION>max</FUNCTION>
+ <FUNCTION>min</FUNCTION>
+ <FUNCTION>ran</FUNCTION>
+ <FUNCTION>sgn</FUNCTION>
+ <FUNCTION>sig</FUNCTION>
+ <FUNCTION>sin</FUNCTION>
+ <FUNCTION>sqr</FUNCTION>
+ <FUNCTION>sqrt</FUNCTION>
+ <FUNCTION>tan</FUNCTION>
+
+ <!-- Strings -->
+ <FUNCTION>asc</FUNCTION>
+ <FUNCTION>chr$</FUNCTION>
+ <FUNCTION>glob</FUNCTION>
+ <FUNCTION>hex$</FUNCTION>
+ <FUNCTION>instr</FUNCTION>
+ <FUNCTION>left$</FUNCTION>
+ <FUNCTION>len</FUNCTION>
+ <FUNCTION>lower$</FUNCTION>
+ <FUNCTION>ltrim$</FUNCTION>
+ <FUNCTION>mid$</FUNCTION>
+ <FUNCTION>right$</FUNCTION>
+ <FUNCTION>rinstr</FUNCTION>
+ <FUNCTION>rtrim$</FUNCTION>
+ <FUNCTION>split</FUNCTION>
+ <FUNCTION>token</FUNCTION>
+ <FUNCTION>trim$</FUNCTION>
+ <FUNCTION>upper$</FUNCTION>
+ <FUNCTION>val</FUNCTION>
+
+ <!-- YABasic listed keywords that aren't described in the YABasic documentation:
+ bitblit$
+ bitblit
+ bitblt$
+ bitblt
+ filled
+ mousebutton
+ mousemodifier
+ rect
+ split$
+ token$
+ -->
+
+
+ </KEYWORDS>
+ </RULES>
+</MODE>
diff --git a/jEdit/modes/yaml.xml b/jEdit/modes/yaml.xml
index 2c90e79..dcdb15e 100644
--- a/jEdit/modes/yaml.xml
+++ b/jEdit/modes/yaml.xml
@@ -1,83 +1,83 @@
-<?xml version="1.0"?>
-<!--
-YAML mode by Jakub RoztoÄil <jakub at webkitchen.cz>
--->
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-<MODE>
- <PROPS>
- <PROPERTY NAME="indentNextLines" VALUE=".+:$" />
- <PROPERTY NAME="indentOpenBrackets" VALUE="[{|>" />
- <PROPERTY NAME="indentCloseBrackets" VALUE="}]" />
- <PROPERTY NAME="ignoreWhitespace" VALUE="false" />
- <PROPERTY NAME="lineComment" VALUE="#" />
- <!-- YAML forbids tabs -->
- <PROPERTY NAME="noTabs" VALUE="true" />
- <PROPERTY NAME="indentSize" VALUE="2" />
- <PROPERTY NAME="tabSize" VALUE="2" />
- </PROPS>
-
- <RULES ESCAPE="\" HIGHLIGHT_DIGITS="TRUE">
- <SEQ TYPE="KEYWORD3">...</SEQ>
- <SEQ TYPE="KEYWORD3">---</SEQ>
- <!-- NAME -->
- <SEQ_REGEXP AT_WHITESPACE_END="TRUE" DELEGATE="VALUES">-( |$)</SEQ_REGEXP>
- <IMPORT DELEGATE="NAME" />
- </RULES>
-
- <RULES SET="NAME">
- <SEQ_REGEXP TYPE="KEYWORD1" DELEGATE="VALUES">[^:\[\]{},'"#]+:( |$)</SEQ_REGEXP>
- <!-- Useful for Symfony configuration files -->
- <SPAN TYPE="MARKUP" DELEGATE="php::PHP">
- <BEGIN><?php</BEGIN>
- <END>?></END>
- </SPAN>
- </RULES>
-
- <RULES SET="ARRAYS">
- <SPAN NO_LINE_BREAK="FALSE" TYPE="OPERATOR" DELEGATE="ARRAY">
- <BEGIN>{</BEGIN>
- <END>}</END>
- </SPAN>
- <SPAN NO_LINE_BREAK="FALSE" TYPE="OPERATOR" DELEGATE="ARRAY">
- <BEGIN>[</BEGIN>
- <END>]</END>
- </SPAN>
- </RULES>
-
- <RULES SET="ARRAY">
- <IMPORT DELEGATE="VALUES" />
- <SEQ TYPE="OPERATOR">,</SEQ>
- </RULES>
-
- <RULES SET="AFTER_NAME"></RULES>
-
- <RULES SET="VALUES" HIGHLIGHT_DIGITS="TRUE">
- <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="FALSE">#</EOL_SPAN>
- <IMPORT DELEGATE="NAME" />
- <IMPORT DELEGATE="ARRAYS" />
- <!-- Yaml forbids tabs -->
- <SEQ_REGEXP TYPE="INVALID" DELEGATE="INVALID">\t</SEQ_REGEXP>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
- <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
- <KEYWORDS>
- <KEYWORD3>~</KEYWORD3>
- <KEYWORD3>false</KEYWORD3>
- <KEYWORD3>n</KEYWORD3>
- <KEYWORD3>No</KEYWORD3>
- <KEYWORD3>off</KEYWORD3>
- <KEYWORD3>Y</KEYWORD3>
- <KEYWORD3>true</KEYWORD3>
- <KEYWORD3>Yes</KEYWORD3>
- <KEYWORD3>ON</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
-</MODE>
-
-
+<?xml version="1.0"?>
+<!--
+YAML mode by Jakub RoztoÄil <jakub at webkitchen.cz>
+-->
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="indentNextLines" VALUE=".+:$" />
+ <PROPERTY NAME="indentOpenBrackets" VALUE="[{|>" />
+ <PROPERTY NAME="indentCloseBrackets" VALUE="}]" />
+ <PROPERTY NAME="ignoreWhitespace" VALUE="false" />
+ <PROPERTY NAME="lineComment" VALUE="#" />
+ <!-- YAML forbids tabs -->
+ <PROPERTY NAME="noTabs" VALUE="true" />
+ <PROPERTY NAME="indentSize" VALUE="2" />
+ <PROPERTY NAME="tabSize" VALUE="2" />
+ </PROPS>
+
+ <RULES ESCAPE="\" HIGHLIGHT_DIGITS="TRUE">
+ <SEQ TYPE="KEYWORD3">...</SEQ>
+ <SEQ TYPE="KEYWORD3">---</SEQ>
+ <!-- NAME -->
+ <SEQ_REGEXP AT_WHITESPACE_END="TRUE" DELEGATE="VALUES">-( |$)</SEQ_REGEXP>
+ <IMPORT DELEGATE="NAME" />
+ </RULES>
+
+ <RULES SET="NAME">
+ <SEQ_REGEXP TYPE="KEYWORD1" DELEGATE="VALUES">[^:\[\]{},'"#]+:( |$)</SEQ_REGEXP>
+ <!-- Useful for Symfony configuration files -->
+ <SPAN TYPE="MARKUP" DELEGATE="php::PHP">
+ <BEGIN><?php</BEGIN>
+ <END>?></END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="ARRAYS">
+ <SPAN NO_LINE_BREAK="FALSE" TYPE="OPERATOR" DELEGATE="ARRAY">
+ <BEGIN>{</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <SPAN NO_LINE_BREAK="FALSE" TYPE="OPERATOR" DELEGATE="ARRAY">
+ <BEGIN>[</BEGIN>
+ <END>]</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="ARRAY">
+ <IMPORT DELEGATE="VALUES" />
+ <SEQ TYPE="OPERATOR">,</SEQ>
+ </RULES>
+
+ <RULES SET="AFTER_NAME"></RULES>
+
+ <RULES SET="VALUES" HIGHLIGHT_DIGITS="TRUE">
+ <EOL_SPAN TYPE="COMMENT1" AT_LINE_START="FALSE">#</EOL_SPAN>
+ <IMPORT DELEGATE="NAME" />
+ <IMPORT DELEGATE="ARRAYS" />
+ <!-- Yaml forbids tabs -->
+ <SEQ_REGEXP TYPE="INVALID" DELEGATE="INVALID">\t</SEQ_REGEXP>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+ <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+ <KEYWORDS>
+ <KEYWORD3>~</KEYWORD3>
+ <KEYWORD3>false</KEYWORD3>
+ <KEYWORD3>n</KEYWORD3>
+ <KEYWORD3>No</KEYWORD3>
+ <KEYWORD3>off</KEYWORD3>
+ <KEYWORD3>Y</KEYWORD3>
+ <KEYWORD3>true</KEYWORD3>
+ <KEYWORD3>Yes</KEYWORD3>
+ <KEYWORD3>ON</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+</MODE>
+
+
diff --git a/jEdit/modes/zpt.xml b/jEdit/modes/zpt.xml
index d5ad3ce..193b638 100644
--- a/jEdit/modes/zpt.xml
+++ b/jEdit/modes/zpt.xml
@@ -1,171 +1,171 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE MODE SYSTEM "xmode.dtd">
-
-<!--
-<MODE NAME="zpt" FILE="zpt.xml"
- FILE_NAME_GLOB="*.{pt,zpt}"/>
--->
-
-<MODE>
- <PROPS>
- <PROPERTY NAME="commentStart" VALUE="<!--" />
- <PROPERTY NAME="commentEnd" VALUE="-->" />
- </PROPS>
- <RULES IGNORE_CASE="TRUE">
- <!-- SGML comment -->
- <SPAN TYPE="COMMENT1">
- <BEGIN><!--</BEGIN>
- <END>--></END>
- </SPAN>
-
- <!-- JavaScript -->
- <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
- <BEGIN><SCRIPT</BEGIN>
- <END></SCRIPT></END>
- </SPAN>
-
- <!-- stylesheet -->
- <SPAN TYPE="MARKUP" DELEGATE="CSS">
- <BEGIN><STYLE</BEGIN>
- <END></STYLE></END>
- </SPAN>
-
- <!-- DTD instructions -->
- <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
- <BEGIN><!</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- markup tags -->
- <SPAN TYPE="MARKUP" DELEGATE="TAGS">
- <BEGIN><</BEGIN>
- <END>></END>
- </SPAN>
-
- <!-- SGML entities -->
- <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
- <BEGIN>&</BEGIN>
- <END>;</END>
- </SPAN>
- </RULES>
-
- <RULES SET="TAGS" DEFAULT="MARKUP">
- <SPAN TYPE="LITERAL1" DELEGATE="ATTRIBUTE">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL1" DELEGATE="ATTRIBUTE">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SEQ TYPE="OPERATOR">=</SEQ>
-
- <KEYWORDS>
- <!-- TAL -->
- <KEYWORD1>tal</KEYWORD1>
- <KEYWORD3>attributes</KEYWORD3>
- <KEYWORD3>define</KEYWORD3>
- <KEYWORD3>condition</KEYWORD3>
- <KEYWORD3>content</KEYWORD3>
- <KEYWORD3>omit-tag</KEYWORD3>
- <KEYWORD3>on-error</KEYWORD3>
- <KEYWORD3>repeat</KEYWORD3>
- <KEYWORD3>replace</KEYWORD3>
-
- <!-- METAL -->
- <KEYWORD1>metal</KEYWORD1>
- <KEYWORD3>define-macro</KEYWORD3>
- <KEYWORD3>define-slot</KEYWORD3>
- <KEYWORD3>fill-slot</KEYWORD3>
- <KEYWORD3>use-macro</KEYWORD3>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="ATTRIBUTE" DEFAULT="LITERAL1" ESCAPE="\">
- <SEQ TYPE="OPERATOR">:</SEQ>
- <SEQ TYPE="OPERATOR">;</SEQ>
- <SEQ TYPE="OPERATOR">?</SEQ>
- <SEQ TYPE="OPERATOR">|</SEQ>
- <SEQ TYPE="LITERAL2">$$</SEQ>
-
- <SPAN TYPE="LITERAL4">
- <BEGIN>"</BEGIN>
- <END>"</END>
- </SPAN>
-
- <SPAN TYPE="LITERAL4">
- <BEGIN>'</BEGIN>
- <END>'</END>
- </SPAN>
-
- <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
- <BEGIN>${</BEGIN>
- <END>}</END>
- </SPAN>
- <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
- <!-- highligh python expressions -->
- <!--
- <SEQ TYPE="LITERAL2" DELEGATE="python::MAIN"
- AT_LINE_START="FALSE">python:</SEQ>
- -->
- <KEYWORDS>
- <!-- TALES expression types -->
- <KEYWORD4>exists</KEYWORD4>
- <KEYWORD4>nocall</KEYWORD4>
- <KEYWORD4>not</KEYWORD4>
- <KEYWORD4>path</KEYWORD4>
- <KEYWORD4>python</KEYWORD4>
- <KEYWORD4>string</KEYWORD4>
- <KEYWORD4>structure</KEYWORD4>
-
- <!-- built-in TALES variables -->
- <!-- NOTE: root, here, container, template,
- request, user, and modules are optional -->
- <LITERAL3>CONTEXTS</LITERAL3>
- <LITERAL3>attrs</LITERAL3>
- <LITERAL3>container</LITERAL3>
- <LITERAL3>default</LITERAL3>
- <LITERAL3>here</LITERAL3>
- <LITERAL3>modules</LITERAL3>
- <LITERAL3>nothing</LITERAL3>
- <LITERAL3>options</LITERAL3>
- <LITERAL3>repeat</LITERAL3>
- <LITERAL3>request</LITERAL3>
- <LITERAL3>root</LITERAL3>
- <LITERAL3>template</LITERAL3>
- <LITERAL3>user</LITERAL3>
-
- <!-- repeat variable attributes -->
- <LITERAL3>index</LITERAL3>
- <LITERAL3>number</LITERAL3>
- <LITERAL3>even</LITERAL3>
- <LITERAL3>odd</LITERAL3>
- <LITERAL3>start</LITERAL3>
- <LITERAL3>end</LITERAL3>
- <LITERAL3>first</LITERAL3>
- <LITERAL3>last</LITERAL3>
- <LITERAL3>length</LITERAL3>
- <LITERAL3>letter</LITERAL3>
- <LITERAL3>Letter</LITERAL3>
- <LITERAL3>roman</LITERAL3>
- <LITERAL3>Roman</LITERAL3>
- </KEYWORDS>
- </RULES>
-
- <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
- <SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">></SEQ>
- <SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
- </RULES>
-
- <RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
- <SEQ TYPE="MARKUP" DELEGATE="zpt::MAIN">></SEQ>
- </RULES>
-
- <RULES SET="CSS" DEFAULT="MARKUP">
- <SEQ TYPE="MARKUP" DELEGATE="css::MAIN">></SEQ>
- </RULES>
-</MODE>
-
+<?xml version="1.0"?>
+
+<!DOCTYPE MODE SYSTEM "xmode.dtd">
+
+<!--
+<MODE NAME="zpt" FILE="zpt.xml"
+ FILE_NAME_GLOB="*.{pt,zpt}"/>
+-->
+
+<MODE>
+ <PROPS>
+ <PROPERTY NAME="commentStart" VALUE="<!--" />
+ <PROPERTY NAME="commentEnd" VALUE="-->" />
+ </PROPS>
+ <RULES IGNORE_CASE="TRUE">
+ <!-- SGML comment -->
+ <SPAN TYPE="COMMENT1">
+ <BEGIN><!--</BEGIN>
+ <END>--></END>
+ </SPAN>
+
+ <!-- JavaScript -->
+ <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
+ <BEGIN><SCRIPT</BEGIN>
+ <END></SCRIPT></END>
+ </SPAN>
+
+ <!-- stylesheet -->
+ <SPAN TYPE="MARKUP" DELEGATE="CSS">
+ <BEGIN><STYLE</BEGIN>
+ <END></STYLE></END>
+ </SPAN>
+
+ <!-- DTD instructions -->
+ <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
+ <BEGIN><!</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- markup tags -->
+ <SPAN TYPE="MARKUP" DELEGATE="TAGS">
+ <BEGIN><</BEGIN>
+ <END>></END>
+ </SPAN>
+
+ <!-- SGML entities -->
+ <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
+ <BEGIN>&</BEGIN>
+ <END>;</END>
+ </SPAN>
+ </RULES>
+
+ <RULES SET="TAGS" DEFAULT="MARKUP">
+ <SPAN TYPE="LITERAL1" DELEGATE="ATTRIBUTE">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL1" DELEGATE="ATTRIBUTE">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SEQ TYPE="OPERATOR">=</SEQ>
+
+ <KEYWORDS>
+ <!-- TAL -->
+ <KEYWORD1>tal</KEYWORD1>
+ <KEYWORD3>attributes</KEYWORD3>
+ <KEYWORD3>define</KEYWORD3>
+ <KEYWORD3>condition</KEYWORD3>
+ <KEYWORD3>content</KEYWORD3>
+ <KEYWORD3>omit-tag</KEYWORD3>
+ <KEYWORD3>on-error</KEYWORD3>
+ <KEYWORD3>repeat</KEYWORD3>
+ <KEYWORD3>replace</KEYWORD3>
+
+ <!-- METAL -->
+ <KEYWORD1>metal</KEYWORD1>
+ <KEYWORD3>define-macro</KEYWORD3>
+ <KEYWORD3>define-slot</KEYWORD3>
+ <KEYWORD3>fill-slot</KEYWORD3>
+ <KEYWORD3>use-macro</KEYWORD3>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="ATTRIBUTE" DEFAULT="LITERAL1" ESCAPE="\">
+ <SEQ TYPE="OPERATOR">:</SEQ>
+ <SEQ TYPE="OPERATOR">;</SEQ>
+ <SEQ TYPE="OPERATOR">?</SEQ>
+ <SEQ TYPE="OPERATOR">|</SEQ>
+ <SEQ TYPE="LITERAL2">$$</SEQ>
+
+ <SPAN TYPE="LITERAL4">
+ <BEGIN>"</BEGIN>
+ <END>"</END>
+ </SPAN>
+
+ <SPAN TYPE="LITERAL4">
+ <BEGIN>'</BEGIN>
+ <END>'</END>
+ </SPAN>
+
+ <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
+ <BEGIN>${</BEGIN>
+ <END>}</END>
+ </SPAN>
+ <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
+ <!-- highligh python expressions -->
+ <!--
+ <SEQ TYPE="LITERAL2" DELEGATE="python::MAIN"
+ AT_LINE_START="FALSE">python:</SEQ>
+ -->
+ <KEYWORDS>
+ <!-- TALES expression types -->
+ <KEYWORD4>exists</KEYWORD4>
+ <KEYWORD4>nocall</KEYWORD4>
+ <KEYWORD4>not</KEYWORD4>
+ <KEYWORD4>path</KEYWORD4>
+ <KEYWORD4>python</KEYWORD4>
+ <KEYWORD4>string</KEYWORD4>
+ <KEYWORD4>structure</KEYWORD4>
+
+ <!-- built-in TALES variables -->
+ <!-- NOTE: root, here, container, template,
+ request, user, and modules are optional -->
+ <LITERAL3>CONTEXTS</LITERAL3>
+ <LITERAL3>attrs</LITERAL3>
+ <LITERAL3>container</LITERAL3>
+ <LITERAL3>default</LITERAL3>
+ <LITERAL3>here</LITERAL3>
+ <LITERAL3>modules</LITERAL3>
+ <LITERAL3>nothing</LITERAL3>
+ <LITERAL3>options</LITERAL3>
+ <LITERAL3>repeat</LITERAL3>
+ <LITERAL3>request</LITERAL3>
+ <LITERAL3>root</LITERAL3>
+ <LITERAL3>template</LITERAL3>
+ <LITERAL3>user</LITERAL3>
+
+ <!-- repeat variable attributes -->
+ <LITERAL3>index</LITERAL3>
+ <LITERAL3>number</LITERAL3>
+ <LITERAL3>even</LITERAL3>
+ <LITERAL3>odd</LITERAL3>
+ <LITERAL3>start</LITERAL3>
+ <LITERAL3>end</LITERAL3>
+ <LITERAL3>first</LITERAL3>
+ <LITERAL3>last</LITERAL3>
+ <LITERAL3>length</LITERAL3>
+ <LITERAL3>letter</LITERAL3>
+ <LITERAL3>Letter</LITERAL3>
+ <LITERAL3>roman</LITERAL3>
+ <LITERAL3>Roman</LITERAL3>
+ </KEYWORDS>
+ </RULES>
+
+ <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
+ <SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">></SEQ>
+ <SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
+ </RULES>
+
+ <RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="zpt::MAIN">></SEQ>
+ </RULES>
+
+ <RULES SET="CSS" DEFAULT="MARKUP">
+ <SEQ TYPE="MARKUP" DELEGATE="css::MAIN">></SEQ>
+ </RULES>
+</MODE>
+
diff --git a/jEdit/net/sourceforge/jarbundler/AppBundleProperties.java b/jEdit/net/sourceforge/jarbundler/AppBundleProperties.java
index ef8ecc2..9df1216 100644
--- a/jEdit/net/sourceforge/jarbundler/AppBundleProperties.java
+++ b/jEdit/net/sourceforge/jarbundler/AppBundleProperties.java
@@ -1,337 +1,337 @@
-/*
- * A Mac OS X Jar Bundler Ant Task.
- *
- * Copyright (c) 2003, Seth J. Morabito <sethm at loomcom.com> All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-
-package net.sourceforge.jarbundler;
-
-// Java Utility
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.LinkedList;
-
-// Java language imports
-import java.lang.String;
-
-public class AppBundleProperties {
-
- // Required
- private String mApplicationName;
- private String mMainClass;
-
- // Application short name
- private String mCFBundleName = null;
-
- // Finder version, with default
- private String mCFBundleShortVersionString = "1.0";
-
- // Get Info string, optional
- private String mCFBundleGetInfoString = null;
-
- // Build number, optional
- private String mCFBundleVersion = null;
-
- // Help Book folder, optional
- private String mCFHelpBookFolder = null;
-
- // Help Book name, optional
- private String mCFHelpBookName = null;
-
- // Explicit default: false
- private boolean mCFBundleAllowMixedLocalizations = false;
-
- // Explicit default: JavaApplicationStub
- private String mCFBundleExecutable = "JavaApplicationStub";
-
- // Explicit default: English
- private String mCFBundleDevelopmentRegion = "English";
-
- // Explicit default: APPL
- private final String mCFBundlePackageType = "APPL";
-
- // Explicit default: ????
- private String mCFBundleSignature = "????";
-
- // Explicit default: 1.3+
- private String mJVMVersion = "1.3+";
-
- // Explicit default: 6.0
- private final String mCFBundleInfoDictionaryVersion = "6.0";
-
- // Optional keys, with no defaults.
-
- private String mCFBundleIconFile = null;
- private String mCFBundleIdentifier = null;
- private String mVMOptions = null; // Java VM options
- private String mWorkingDirectory = null; // Java Working Dir
- private String mArguments = null; // Java command line arguments
-
- // Class path and extra class path elements
- private List mClassPath = new ArrayList();
- private List mExtraClassPath = new ArrayList();
-
- // Java properties
- private Hashtable mJavaProperties = new Hashtable();
-
- // Document types
- private List mDocumentTypes = new LinkedList();
-
- // Services
- private List mServices = new LinkedList();
-
- // ================================================================================
-
- /**
- * Add a Java runtime property to the properties hashtable.
- */
-
- public void addJavaProperty(String prop, String val) {
- mJavaProperties.put(prop, val);
- }
-
- public Hashtable getJavaProperties() {
- return mJavaProperties;
- }
-
- public void addToClassPath(String s) {
- mClassPath.add("$JAVAROOT/" + s);
- }
-
- public void addToExtraClassPath(String s) {
- mExtraClassPath.add(s);
- }
-
- public List getExtraClassPath() {
- return mExtraClassPath;
- }
-
- public DocumentType createDocumentType() {
- return new DocumentType();
- }
-
- public List getDocumentTypes() {
- return mDocumentTypes;
- }
-
- /**
- * Add a document type to the document type list.
- */
- public void addDocumentType(DocumentType documentType) {
- mDocumentTypes.add(documentType);
- }
-
- public Service createService() {
- return new Service();
- }
-
- public List getServices() {
- return mServices;
- }
-
- /**
- * Add a service to the services list.
- */
- public void addService(Service service) {
- mServices.add(service);
- }
-
- // ================================================================================
-
- public void setApplicationName(String s) {
- mApplicationName = s;
- }
-
- public String getApplicationName() {
- return mApplicationName;
- }
-
- // ================================================================================
- //
- // Bundle setters and getters
- //
-
- public void setCFBundleName(String s) {
-
- if (s.length() > 16)
- System.err
- .println("WARNING: 'shortname' is recommeded to be no more than 16 "
- + "charaters long. See usage notes.");
- mCFBundleName = s;
- }
-
- public String getCFBundleName() {
- if (mCFBundleName == null)
- return getApplicationName();
-
- return mCFBundleName;
- }
-
- public void setCFBundleVersion(String s) {
- mCFBundleVersion = s;
- }
-
- public String getCFBundleVersion() {
- return mCFBundleVersion;
- }
-
- public void setCFBundleInfoDictionaryVersion(String s) {
- // mCFBundleInfoDictionaryVersion = s;
- }
-
- public String getCFBundleInfoDictionaryVersion() {
- return mCFBundleInfoDictionaryVersion;
- }
-
- public void setCFBundleIdentifier(String s) {
- mCFBundleIdentifier = s;
- }
-
- public String getCFBundleIdentifier() {
- return mCFBundleIdentifier;
- }
-
- public void setCFBundleGetInfoString(String s) {
- mCFBundleGetInfoString = s;
- }
-
- public String getCFBundleGetInfoString() {
- if (mCFBundleGetInfoString == null)
- return getCFBundleShortVersionString();
-
- return mCFBundleGetInfoString;
- }
-
- public void setCFBundleShortVersionString(String s) {
- mCFBundleShortVersionString = s;
- }
-
- public String getCFBundleShortVersionString() {
- return mCFBundleShortVersionString;
- }
-
- public void setCFBundleIconFile(String s) {
- mCFBundleIconFile = s;
- }
-
- public String getCFBundleIconFile() {
- return mCFBundleIconFile;
- }
-
- public void setCFBundleAllowMixedLocalizations(boolean b) {
- mCFBundleAllowMixedLocalizations = b;
- }
-
- public boolean getCFBundleAllowMixedLocalizations() {
- return mCFBundleAllowMixedLocalizations;
- }
-
- public void setCFBundleExecutable(String s) {
- mCFBundleExecutable = s;
- }
-
- public String getCFBundleExecutable() {
- return mCFBundleExecutable;
- }
-
- public void setCFBundleDevelopmentRegion(String s) {
- mCFBundleDevelopmentRegion = s;
- }
-
- public String getCFBundleDevelopmentRegion() {
- return mCFBundleDevelopmentRegion;
- }
-
- public void setCFBundlePackageType(String s) {
- // mCFBundlePackageType = s;
- }
-
- public String getCFBundlePackageType() {
- return mCFBundlePackageType;
- }
-
- public void setCFBundleSignature(String s) {
- mCFBundleSignature = s;
- }
-
- public String getCFBundleSignature() {
- return mCFBundleSignature;
- }
-
- public void setCFBundleHelpBookFolder(String s) {
- mCFHelpBookFolder = s;
- }
-
- public String getCFBundleHelpBookFolder() {
- return mCFHelpBookFolder;
- }
-
- public void setCFBundleHelpBookName(String s) {
- mCFHelpBookName = s;
- }
-
- public String getCFBundleHelpBookName() {
- return mCFHelpBookName;
- }
-
- public void setMainClass(String s) {
- mMainClass = s;
- }
-
- public String getMainClass() {
- return mMainClass;
- }
-
- public void setJVMVersion(String s) {
- mJVMVersion = s;
- }
-
- public String getJVMVersion() {
- return mJVMVersion;
- }
-
- public void setVMOptions(String s) {
- mVMOptions = s;
- }
-
- public String getVMOptions() {
- return mVMOptions;
- }
-
- public void setWorkingDirectory(String s) {
- mWorkingDirectory = s;
- }
-
- public String getWorkingDirectory() {
- return mWorkingDirectory;
- }
-
- public void setArguments(String s) {
- mArguments = s;
- }
-
- public String getArguments() {
- return mArguments;
- }
-
- public List getClassPath() {
- return mClassPath;
- }
-
-}
+/*
+ * A Mac OS X Jar Bundler Ant Task.
+ *
+ * Copyright (c) 2003, Seth J. Morabito <sethm at loomcom.com> All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+package net.sourceforge.jarbundler;
+
+// Java Utility
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.LinkedList;
+
+// Java language imports
+import java.lang.String;
+
+public class AppBundleProperties {
+
+ // Required
+ private String mApplicationName;
+ private String mMainClass;
+
+ // Application short name
+ private String mCFBundleName = null;
+
+ // Finder version, with default
+ private String mCFBundleShortVersionString = "1.0";
+
+ // Get Info string, optional
+ private String mCFBundleGetInfoString = null;
+
+ // Build number, optional
+ private String mCFBundleVersion = null;
+
+ // Help Book folder, optional
+ private String mCFHelpBookFolder = null;
+
+ // Help Book name, optional
+ private String mCFHelpBookName = null;
+
+ // Explicit default: false
+ private boolean mCFBundleAllowMixedLocalizations = false;
+
+ // Explicit default: JavaApplicationStub
+ private String mCFBundleExecutable = "JavaApplicationStub";
+
+ // Explicit default: English
+ private String mCFBundleDevelopmentRegion = "English";
+
+ // Explicit default: APPL
+ private final String mCFBundlePackageType = "APPL";
+
+ // Explicit default: ????
+ private String mCFBundleSignature = "????";
+
+ // Explicit default: 1.3+
+ private String mJVMVersion = "1.3+";
+
+ // Explicit default: 6.0
+ private final String mCFBundleInfoDictionaryVersion = "6.0";
+
+ // Optional keys, with no defaults.
+
+ private String mCFBundleIconFile = null;
+ private String mCFBundleIdentifier = null;
+ private String mVMOptions = null; // Java VM options
+ private String mWorkingDirectory = null; // Java Working Dir
+ private String mArguments = null; // Java command line arguments
+
+ // Class path and extra class path elements
+ private List mClassPath = new ArrayList();
+ private List mExtraClassPath = new ArrayList();
+
+ // Java properties
+ private Hashtable mJavaProperties = new Hashtable();
+
+ // Document types
+ private List mDocumentTypes = new LinkedList();
+
+ // Services
+ private List mServices = new LinkedList();
+
+ // ================================================================================
+
+ /**
+ * Add a Java runtime property to the properties hashtable.
+ */
+
+ public void addJavaProperty(String prop, String val) {
+ mJavaProperties.put(prop, val);
+ }
+
+ public Hashtable getJavaProperties() {
+ return mJavaProperties;
+ }
+
+ public void addToClassPath(String s) {
+ mClassPath.add("$JAVAROOT/" + s);
+ }
+
+ public void addToExtraClassPath(String s) {
+ mExtraClassPath.add(s);
+ }
+
+ public List getExtraClassPath() {
+ return mExtraClassPath;
+ }
+
+ public DocumentType createDocumentType() {
+ return new DocumentType();
+ }
+
+ public List getDocumentTypes() {
+ return mDocumentTypes;
+ }
+
+ /**
+ * Add a document type to the document type list.
+ */
+ public void addDocumentType(DocumentType documentType) {
+ mDocumentTypes.add(documentType);
+ }
+
+ public Service createService() {
+ return new Service();
+ }
+
+ public List getServices() {
+ return mServices;
+ }
+
+ /**
+ * Add a service to the services list.
+ */
+ public void addService(Service service) {
+ mServices.add(service);
+ }
+
+ // ================================================================================
+
+ public void setApplicationName(String s) {
+ mApplicationName = s;
+ }
+
+ public String getApplicationName() {
+ return mApplicationName;
+ }
+
+ // ================================================================================
+ //
+ // Bundle setters and getters
+ //
+
+ public void setCFBundleName(String s) {
+
+ if (s.length() > 16)
+ System.err
+ .println("WARNING: 'shortname' is recommeded to be no more than 16 "
+ + "charaters long. See usage notes.");
+ mCFBundleName = s;
+ }
+
+ public String getCFBundleName() {
+ if (mCFBundleName == null)
+ return getApplicationName();
+
+ return mCFBundleName;
+ }
+
+ public void setCFBundleVersion(String s) {
+ mCFBundleVersion = s;
+ }
+
+ public String getCFBundleVersion() {
+ return mCFBundleVersion;
+ }
+
+ public void setCFBundleInfoDictionaryVersion(String s) {
+ // mCFBundleInfoDictionaryVersion = s;
+ }
+
+ public String getCFBundleInfoDictionaryVersion() {
+ return mCFBundleInfoDictionaryVersion;
+ }
+
+ public void setCFBundleIdentifier(String s) {
+ mCFBundleIdentifier = s;
+ }
+
+ public String getCFBundleIdentifier() {
+ return mCFBundleIdentifier;
+ }
+
+ public void setCFBundleGetInfoString(String s) {
+ mCFBundleGetInfoString = s;
+ }
+
+ public String getCFBundleGetInfoString() {
+ if (mCFBundleGetInfoString == null)
+ return getCFBundleShortVersionString();
+
+ return mCFBundleGetInfoString;
+ }
+
+ public void setCFBundleShortVersionString(String s) {
+ mCFBundleShortVersionString = s;
+ }
+
+ public String getCFBundleShortVersionString() {
+ return mCFBundleShortVersionString;
+ }
+
+ public void setCFBundleIconFile(String s) {
+ mCFBundleIconFile = s;
+ }
+
+ public String getCFBundleIconFile() {
+ return mCFBundleIconFile;
+ }
+
+ public void setCFBundleAllowMixedLocalizations(boolean b) {
+ mCFBundleAllowMixedLocalizations = b;
+ }
+
+ public boolean getCFBundleAllowMixedLocalizations() {
+ return mCFBundleAllowMixedLocalizations;
+ }
+
+ public void setCFBundleExecutable(String s) {
+ mCFBundleExecutable = s;
+ }
+
+ public String getCFBundleExecutable() {
+ return mCFBundleExecutable;
+ }
+
+ public void setCFBundleDevelopmentRegion(String s) {
+ mCFBundleDevelopmentRegion = s;
+ }
+
+ public String getCFBundleDevelopmentRegion() {
+ return mCFBundleDevelopmentRegion;
+ }
+
+ public void setCFBundlePackageType(String s) {
+ // mCFBundlePackageType = s;
+ }
+
+ public String getCFBundlePackageType() {
+ return mCFBundlePackageType;
+ }
+
+ public void setCFBundleSignature(String s) {
+ mCFBundleSignature = s;
+ }
+
+ public String getCFBundleSignature() {
+ return mCFBundleSignature;
+ }
+
+ public void setCFBundleHelpBookFolder(String s) {
+ mCFHelpBookFolder = s;
+ }
+
+ public String getCFBundleHelpBookFolder() {
+ return mCFHelpBookFolder;
+ }
+
+ public void setCFBundleHelpBookName(String s) {
+ mCFHelpBookName = s;
+ }
+
+ public String getCFBundleHelpBookName() {
+ return mCFHelpBookName;
+ }
+
+ public void setMainClass(String s) {
+ mMainClass = s;
+ }
+
+ public String getMainClass() {
+ return mMainClass;
+ }
+
+ public void setJVMVersion(String s) {
+ mJVMVersion = s;
+ }
+
+ public String getJVMVersion() {
+ return mJVMVersion;
+ }
+
+ public void setVMOptions(String s) {
+ mVMOptions = s;
+ }
+
+ public String getVMOptions() {
+ return mVMOptions;
+ }
+
+ public void setWorkingDirectory(String s) {
+ mWorkingDirectory = s;
+ }
+
+ public String getWorkingDirectory() {
+ return mWorkingDirectory;
+ }
+
+ public void setArguments(String s) {
+ mArguments = s;
+ }
+
+ public String getArguments() {
+ return mArguments;
+ }
+
+ public List getClassPath() {
+ return mClassPath;
+ }
+
+}
diff --git a/jEdit/net/sourceforge/jarbundler/DocumentType.java b/jEdit/net/sourceforge/jarbundler/DocumentType.java
index c045bc8..68931f4 100644
--- a/jEdit/net/sourceforge/jarbundler/DocumentType.java
+++ b/jEdit/net/sourceforge/jarbundler/DocumentType.java
@@ -1,188 +1,188 @@
-package net.sourceforge.jarbundler;
-
-import java.lang.String;
-
-import java.io.File;
-
-import java.util.List;
-import java.util.Arrays;
-import java.util.ArrayList;
-
-/**
- * Represents an Info.plist DocumentType used for associating a document with
- * the application
- *
- * The Document Types allows you to specify which documents your finished
- * product can handle. You should list the application's primary document type
- * first because the document controller uses that type by default when the user
- * requests a new document.
- *
- * Name - The name of the document type.
- *
- *
- * Extensions - A list of the filename extensions for this document type. Don't
- * include the period in the extension.
- *
- *
- * OS Types - A list of four-letter codes for the document. These codes are
- * stored in the document's resources or information property list files.
- *
- *
- * MIME Types - A list of the Multipurpose Internet Mail Extensions (MIME) types
- * for the document. MIME types identify content types for Internet
- * applications.
- *
- *
- * Icon File - The name of the file that contains the document type's icon.
- *
- *
- * Role - A description of how the application uses the documents of this type.
- *
- * Editor - The application can display, edit, and save documents of this type.
- *
- * Viewer - The application can display, but not edit, documents of this type.
- *
- * Shell - The application provides runtime services for other processes for
- * example, a Java applet viewer.
- *
- * None - The application can neither display nor edit documents of this type
- * but instead uses them in some other way. For example, Sketch uses this role
- * to declare types it can export but not read.
- *
- *
- * Bundle - Specifies whether the document is a single file or a file bundle,
- * that is, a directory that is treated as a single document by certain
- * applications, such as the Finder.
- *
- *
- * <documenttype> name="Scan Project" extensions="scansort scanproj"
- * ostypes="fold disk fdrp" iconfile="document.icns" mimetypes="text/html
- * image/jpeg" role="editor" bundle="true" />
- *
- */
-
-
-public class DocumentType {
-
- private static final List EMPTYLIST = new ArrayList(0);
-
- /** Name. The name of the document type. */
- public String name = null;
-
- /**
- * Extensions. A list of the filename extensions for this document type.
- * Don't include the period in the extension.
- */
-
- public String[] extensions = null;
- /**
- * OS Types. A list of four-letter codes for the document. These codes are
- * stored in the document's resources or information property list files.
- */
-
- public String[] osTypes = null;
- /**
- * MIME Types. A list of the Multipurpose Internet Mail Extensions (MIME)
- * types for the document. MIME types identify content types for Internet
- * applications.
- */
-
- public String[] mimeTypes = null;
-
- /**
- * Icon File. The name of the file that contains the document types icon.
- */
-
- public File iconFile = null;
- /**
- * Role. A description of how the application uses the documents of this
- * type. You can choose from four values:
- * <p>
- * Editor. The application can display, edit, and save documents of this
- * type.
- * <p>
- * Viewer. The application can display, but not edit, documents of this
- * type.
- * <p>
- * Shell. The application provides runtime services for other processesfor
- * example, a Java applet viewer.
- * <p>
- * None. The application can neither display nor edit documents of this type
- * but instead uses them in some other way. For example, Sketch uses this
- * role to declare types it can export but not read.
- */
-
- public String role = null;
-
- /**
- * Bundle. Specifies whether the document is a single file document or a
- * document bundle, that is, a directory that is treated as a single
- * document by certain applications, such as the Finder.
- */
-
- public boolean isBundle = false;
-
- // Document type name
- public void setName(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- // Extensions
- public void setExtensions(String extensions) {
- this.extensions = extensions.split("[\\s,]");
- }
-
- public List getExtensions() {
- return (extensions == null) ? EMPTYLIST : Arrays.asList(extensions);
- }
-
- // OS Types
- public void setOSTypes(String osTypes) {
- this.osTypes = osTypes.split("[\\s,]");
- }
-
- public List getOSTypes() {
- return (osTypes == null) ? EMPTYLIST : Arrays.asList(osTypes);
- }
-
- // mime-types
- public void setMimeTypes(String mimeTypes) {
- this.mimeTypes = mimeTypes.split("[\\s,]");
- }
-
- public List getMimeTypes() {
- return (mimeTypes == null) ? EMPTYLIST : Arrays.asList(this.mimeTypes);
- }
-
- // Document icon file
- public void setIconFile(File iconFile) {
- this.iconFile = iconFile;
- }
-
- public File getIconFile() {
- return iconFile;
- }
-
- // Document role
- public void setRole(String role) {
- this.role = role;
- }
-
- public String getRole() {
- return role;
- }
-
- // Is this document represented as a bundle
- public void setBundle(boolean isBundle) {
- this.isBundle = isBundle;
- }
-
- public boolean isBundle() {
- return isBundle;
- }
-
-}
+package net.sourceforge.jarbundler;
+
+import java.lang.String;
+
+import java.io.File;
+
+import java.util.List;
+import java.util.Arrays;
+import java.util.ArrayList;
+
+/**
+ * Represents an Info.plist DocumentType used for associating a document with
+ * the application
+ *
+ * The Document Types allows you to specify which documents your finished
+ * product can handle. You should list the application's primary document type
+ * first because the document controller uses that type by default when the user
+ * requests a new document.
+ *
+ * Name - The name of the document type.
+ *
+ *
+ * Extensions - A list of the filename extensions for this document type. Don't
+ * include the period in the extension.
+ *
+ *
+ * OS Types - A list of four-letter codes for the document. These codes are
+ * stored in the document's resources or information property list files.
+ *
+ *
+ * MIME Types - A list of the Multipurpose Internet Mail Extensions (MIME) types
+ * for the document. MIME types identify content types for Internet
+ * applications.
+ *
+ *
+ * Icon File - The name of the file that contains the document type's icon.
+ *
+ *
+ * Role - A description of how the application uses the documents of this type.
+ *
+ * Editor - The application can display, edit, and save documents of this type.
+ *
+ * Viewer - The application can display, but not edit, documents of this type.
+ *
+ * Shell - The application provides runtime services for other processes for
+ * example, a Java applet viewer.
+ *
+ * None - The application can neither display nor edit documents of this type
+ * but instead uses them in some other way. For example, Sketch uses this role
+ * to declare types it can export but not read.
+ *
+ *
+ * Bundle - Specifies whether the document is a single file or a file bundle,
+ * that is, a directory that is treated as a single document by certain
+ * applications, such as the Finder.
+ *
+ *
+ * <documenttype> name="Scan Project" extensions="scansort scanproj"
+ * ostypes="fold disk fdrp" iconfile="document.icns" mimetypes="text/html
+ * image/jpeg" role="editor" bundle="true" />
+ *
+ */
+
+
+public class DocumentType {
+
+ private static final List EMPTYLIST = new ArrayList(0);
+
+ /** Name. The name of the document type. */
+ public String name = null;
+
+ /**
+ * Extensions. A list of the filename extensions for this document type.
+ * Don't include the period in the extension.
+ */
+
+ public String[] extensions = null;
+ /**
+ * OS Types. A list of four-letter codes for the document. These codes are
+ * stored in the document's resources or information property list files.
+ */
+
+ public String[] osTypes = null;
+ /**
+ * MIME Types. A list of the Multipurpose Internet Mail Extensions (MIME)
+ * types for the document. MIME types identify content types for Internet
+ * applications.
+ */
+
+ public String[] mimeTypes = null;
+
+ /**
+ * Icon File. The name of the file that contains the document types icon.
+ */
+
+ public File iconFile = null;
+ /**
+ * Role. A description of how the application uses the documents of this
+ * type. You can choose from four values:
+ * <p>
+ * Editor. The application can display, edit, and save documents of this
+ * type.
+ * <p>
+ * Viewer. The application can display, but not edit, documents of this
+ * type.
+ * <p>
+ * Shell. The application provides runtime services for other processesfor
+ * example, a Java applet viewer.
+ * <p>
+ * None. The application can neither display nor edit documents of this type
+ * but instead uses them in some other way. For example, Sketch uses this
+ * role to declare types it can export but not read.
+ */
+
+ public String role = null;
+
+ /**
+ * Bundle. Specifies whether the document is a single file document or a
+ * document bundle, that is, a directory that is treated as a single
+ * document by certain applications, such as the Finder.
+ */
+
+ public boolean isBundle = false;
+
+ // Document type name
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ // Extensions
+ public void setExtensions(String extensions) {
+ this.extensions = extensions.split("[\\s,]");
+ }
+
+ public List getExtensions() {
+ return (extensions == null) ? EMPTYLIST : Arrays.asList(extensions);
+ }
+
+ // OS Types
+ public void setOSTypes(String osTypes) {
+ this.osTypes = osTypes.split("[\\s,]");
+ }
+
+ public List getOSTypes() {
+ return (osTypes == null) ? EMPTYLIST : Arrays.asList(osTypes);
+ }
+
+ // mime-types
+ public void setMimeTypes(String mimeTypes) {
+ this.mimeTypes = mimeTypes.split("[\\s,]");
+ }
+
+ public List getMimeTypes() {
+ return (mimeTypes == null) ? EMPTYLIST : Arrays.asList(this.mimeTypes);
+ }
+
+ // Document icon file
+ public void setIconFile(File iconFile) {
+ this.iconFile = iconFile;
+ }
+
+ public File getIconFile() {
+ return iconFile;
+ }
+
+ // Document role
+ public void setRole(String role) {
+ this.role = role;
+ }
+
+ public String getRole() {
+ return role;
+ }
+
+ // Is this document represented as a bundle
+ public void setBundle(boolean isBundle) {
+ this.isBundle = isBundle;
+ }
+
+ public boolean isBundle() {
+ return isBundle;
+ }
+
+}
diff --git a/jEdit/net/sourceforge/jarbundler/HelpBook.java b/jEdit/net/sourceforge/jarbundler/HelpBook.java
index e0c9cf8..6a35018 100644
--- a/jEdit/net/sourceforge/jarbundler/HelpBook.java
+++ b/jEdit/net/sourceforge/jarbundler/HelpBook.java
@@ -1,71 +1,71 @@
-package net.sourceforge.jarbundler;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tools.ant.taskdefs.MatchingTask;
-import org.apache.tools.ant.types.FileList;
-import org.apache.tools.ant.types.FileSet;
-
-import java.lang.String;
-
-
-
-public class HelpBook extends MatchingTask {
-
- private String folderName = null;
- private String name = null;
- private String locale = null;
-
- private final List fileLists = new ArrayList();
- private final List fileSets = new ArrayList();
-
-
- // Help Book name
- public void setName(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
-
- // Help Book folder name
- public void setFolderName(String folderName) {
- this.folderName = folderName;
- }
-
- public String getFolderName() {
- return folderName;
- }
-
-
- // Help Book locale
- public void setLocale(String locale) {
- this.locale = locale;
- }
-
- public String getLocale() {
- return locale;
- }
-
- // Help Book files as a ANT FileList
- public void addFileList(FileList fileList) {
- fileLists.add(fileList);
- }
-
- public List getFileLists() {
- return fileLists;
- }
-
- // Help Book files as a ANT FileSet
- public void addFileSet(FileSet fileSet) {
- fileSets.add(fileSet);
- }
-
- public List getFileSets() {
- return fileSets;
- }
-
-}
+package net.sourceforge.jarbundler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.types.FileList;
+import org.apache.tools.ant.types.FileSet;
+
+import java.lang.String;
+
+
+
+public class HelpBook extends MatchingTask {
+
+ private String folderName = null;
+ private String name = null;
+ private String locale = null;
+
+ private final List fileLists = new ArrayList();
+ private final List fileSets = new ArrayList();
+
+
+ // Help Book name
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+
+ // Help Book folder name
+ public void setFolderName(String folderName) {
+ this.folderName = folderName;
+ }
+
+ public String getFolderName() {
+ return folderName;
+ }
+
+
+ // Help Book locale
+ public void setLocale(String locale) {
+ this.locale = locale;
+ }
+
+ public String getLocale() {
+ return locale;
+ }
+
+ // Help Book files as a ANT FileList
+ public void addFileList(FileList fileList) {
+ fileLists.add(fileList);
+ }
+
+ public List getFileLists() {
+ return fileLists;
+ }
+
+ // Help Book files as a ANT FileSet
+ public void addFileSet(FileSet fileSet) {
+ fileSets.add(fileSet);
+ }
+
+ public List getFileSets() {
+ return fileSets;
+ }
+
+}
diff --git a/jEdit/net/sourceforge/jarbundler/JarBundler.java b/jEdit/net/sourceforge/jarbundler/JarBundler.java
index 6569fb6..56081a7 100644
--- a/jEdit/net/sourceforge/jarbundler/JarBundler.java
+++ b/jEdit/net/sourceforge/jarbundler/JarBundler.java
@@ -1,1480 +1,1480 @@
-/*
- * A Mac OS X Jar Bundler Ant Task.
- *
- * Copyright (c) 2003, Seth J. Morabito <sethm at loomcom.com> All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package net.sourceforge.jarbundler;
-
-// This package's imports
-import net.sourceforge.jarbundler.AppBundleProperties;
-import net.sourceforge.jarbundler.DocumentType;
-import net.sourceforge.jarbundler.JavaProperty;
-import net.sourceforge.jarbundler.PropertyListWriter;
-
-// Java I/O
-import java.io.BufferedWriter;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-
-// Java Utility
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-// Apache Jakarta
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.FileScanner;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-
-import org.apache.tools.ant.types.FileList;
-import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.types.PatternSet;
-
-import org.apache.tools.ant.taskdefs.MatchingTask;
-import org.apache.tools.ant.taskdefs.Chmod;
-import org.apache.tools.ant.taskdefs.Delete;
-
-import org.apache.tools.ant.util.FileUtils;
-
-
-// Java language imports
-import java.lang.Boolean;
-import java.lang.Process;
-import java.lang.Runtime;
-import java.lang.String;
-import java.lang.System;
-
-/**
- * <p>
- * An ant task which creates a Mac OS X Application Bundle for a Java
- * application.
- * </p>
- *
- * <dl>
- * <dt>dir</dt>
- * <dd>The directory into which to put the new application bundle.</dd>
- * <dt>name</dt>
- * <dd>The name of the application bundle. Note that the maximum length of this
- * name is 16 characters, and it will be silently cropped if it is longer than
- * this.</dd>
- * <dt>mainclass</dt>
- * <dd>The main Java class to call when running the application.</dd>
- * </dl>
- *
- * <p>
- * One of the following three MUST be used:
- *
- * <ol>
- * <li>jars Space or comma-separated list of JAR files to include.; OR</li>
- * <li>One or more nested <jarfileset>s. These are normal ANT FileSets;
- * OR </li>
- * <li>One or more nested <jarfilelist>s. These are standard ANT
- * FileLists. </li>
- * </ol>
- *
- * <p>
- * Optional attributes:
- *
- * <p>
- * The following attributes are not required, but you can use them to override
- * default behavior.
- *
- * <dl>
- * <dt>verbose
- * <dd>If true, show more verbose output while running the task
- *
- * <dt>version
- * <dd>Version information about your application (e.g., "1.0")
- *
- * <dt>infostring
- * <dd>String to show in the "Get Info" dialog
- * </dl>
- *
- * These attributes control the fine-tuning of the "Mac OS X" look and feel.
- *
- * <dl>
- * <dt>arguments
- * <dd>Command line arguments. (no default)
- *
- * <dt>smalltabs
- * <dd>Use small tabs. (default "false") Deprecated under JVM 1.4.1
- *
- * <dt>antialiasedgraphics
- * <dd>Use anti-aliased graphics (default "false")
- *
- * <dt>antialiasedtext
- * <dd>Use anti-aliased text (default "false")
- *
- * <dt>bundleid
- * <dd>Unique identifier for this bundle, in the form of a Java package. No
- * default.
- *
- * <dt>buildnumber
- * <dd>Unique identifier for this build
- *
- * <dt>developmentregion
- * <dd>Development Region. Default "English".
- *
- * <dt>execs
- * <dd>Files to be copied into "Resources/MacOS" and made executable
- *
- * <dt>liveresize
- * <dd>Use "Live resizing" (default "false") Deprecated under JVM 1.4.1
- *
- *
- * <dt>growbox
- * <dd>Show growbox (default "true")
- *
- * <dt>growboxintrudes
- * <dd>Intruding growbox (default "false") Deprecated under JVM 1.4.1
- *
- * <dt>screenmenu
- * <dd>Put swing menu into Mac OS X menu bar.
- *
- * <dt>type
- * <dd>Bundle type (default "APPL")
- *
- * <dt>signature
- * <dd>Bundle Signature (default "????")
- *
- * <dt>stubfile
- * <dd>The Java Application Stub file to copy for your application (default
- * MacOS system stub file)
- * </dl>
- *
- * <p>
- * Rarely used optional attributes.
- * <dl>
- * <dt>chmod
- * <dd>Full path to the chmod command. This almost certainly does NOT need to
- * be set.
- * </dl>
- *
- * <p>
- * The task also supports nested <execfileset> and/or <execfilelist>
- * elements, and <resourcefileset> and/or <resourcefilelist>
- * elements, which are standard Ant FileSet and FileList elements. In the first
- * case, the referenced files are copied to the <code>Contents/MacOS</code>
- * directory and made executable, and in the second they are copied to the
- * <code>Contents/Resources</code> directory and not made executable. If you
- * winrces, note that in fact the files are installed in locations which have
- * the same relation to the <code>Contents/Resources</code> directory as the
- * files in the FileSet or FileList have to the 'dir' attribute. Thus in the
- * case:
- *
- * <pre>
- * <resourcefileset dir="builddir/architectures"
- * includes="ppc/*.jnilib"/>
- * </pre>
- *
- * <p>
- * the <code>*.jnilib</code> files will be installed in
- * <code>Contents/Resources/ppc</code>.
- *
- * <p>
- * The task supports a nested <javaproperty> element, which allows you to
- * specify further properties which are set for the JVM when the application is
- * launched. This takes a required <code>key</code> attribute, giving the
- * property key, plus an attribute giving the property value, which may be one
- * of <code>value</code>, giving the string value of the property,
- * <code>file</code>, setting the value of the property to be the absolute
- * path of the given file, or <code>path</code>, which sets the value to the
- * given path. If you are setting paths here, recall that, within the bundle,
- * <code>$APP_PACKAGE</code> is set to the root directory of the bundle (ie,
- * the path to the <code>foo.app</code> directory), and <code>$JAVAROOT</code>
- * to the directory <code>Contents/Resources/Java</code>.
- *
- * <p>
- * Minimum example:
- *
- * <pre>
- *
- * <jarbundler dir="release" name="Bar Project" mainclass="org.bar.Main"
- * jars="bin/Bar.jar" />
- * </pre>
- *
- * <p>
- * Using Filesets
- *
- * <pre>
- * <jarbundler dir="release" name="Bar Project" mainclass="org.bar.Main">
- * <jarfileset dir="bin">
- * <include name="*.jar" />
- * <exclude name="test.jar" />
- * </jarfileset>
- * <execfileset dir="execs">
- * <include name="**" />
- * </execfileset>
- * </jarbundler>
- * </pre>
- *
- * <p>
- * Much Longer example:
- * </p>
- *
- * <pre>
- * <jarbundler dir="release"
- * name="Foo Project"
- * mainclass="org.bar.Main"
- * version="1.0 b 1"
- * infostring="Foo Project (c) 2002"
- * type="APPL"
- * jars="bin/foo.jar bin/bar.jar"
- * execs="exec/foobar"
- * signature="????"
- * workingdirectory="temp"
- * icon="resources/foo.icns"
- * jvmversion="1.4.1+"
- * vmoptions="-Xmx256m"/>
- * </pre>
- *
- * http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/
- */
-public class JarBundler extends MatchingTask {
-
- private static final String DEFAULT_STUB = "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub";
-
- private static final String ABOUTMENU_KEY = "com.apple.mrj.application.apple.menu.about.name";
- private static final Set menuItems = new HashSet();
- private File mAppIcon;
-
- private File mRootDir;
-
- private final List mJavaFileLists = new ArrayList();
- private final List mJarFileSets = new ArrayList();
-
- private final List mExecFileLists = new ArrayList();
- private final List mExecFileSets = new ArrayList();
-
- private final List mResourceFileLists = new ArrayList();
- private final List mResourceFileSets = new ArrayList();
-
- private final List mJarFileLists = new ArrayList();
- private final List mJavaFileSets = new ArrayList();
-
- private final List mExtraClassPathFileLists = new ArrayList();
- private final List mExtraClassPathFileSets = new ArrayList();
-
- private final List mJarAttrs = new ArrayList();
-
- private final List mExecAttrs = new ArrayList();
-
- private final List mExtraClassPathAttrs = new ArrayList();
-
- private final List mHelpBooks = new ArrayList();
-
- private boolean mVerbose = false;
- private boolean mShowPlist = false;
-
- // Java properties used by Mac OS X Java applications
-
- private File mStubFile = new File(DEFAULT_STUB);
-
- private Boolean mAntiAliasedGraphics = null;
-
- private Boolean mAntiAliasedText = null;
-
- private Boolean mLiveResize = null;
-
- private Boolean mScreenMenuBar = null;
-
- private Boolean mGrowbox = null;
-
- private Boolean mGrowboxIntrudes = null;
-
- // The root of the application bundle
- private File bundleDir;
-
- // "Contents" directory
- private File mContentsDir;
-
- // "Contents/MacOS" directory
- private File mMacOsDir;
-
- // "Contents/Resources" directory
- private File mResourcesDir;
-
- // "Contents/Resources/Java" directory
- private File mJavaDir;
-
- // Full path to the 'chmod' command. Can be overridden
- // with the 'chmod' attribute. Won't cause any harm if
- // not set, or if this executable doesn't exist.
-
-
- private AppBundleProperties bundleProperties = new AppBundleProperties();
-
- // Ant file utilities
-
- private FileUtils mFileUtils = FileUtils.getFileUtils();
-
- /***************************************************************************
- * Retreive task attributes
- **************************************************************************/
-
- /**
- * Arguments to the
- *
- * @param s
- * The arguments to pass to the application being launched.
- */
- public void setArguments(String s) {
- bundleProperties.setArguments(s);
- }
-
- /**
- * Override the stub file path to build on non-MacOS platforms
- *
- * @param file
- * the path to the stub file
- */
- public void setStubFile(File file) {
- mStubFile = (file.exists()) ? file : new File(DEFAULT_STUB);
- bundleProperties.setCFBundleExecutable(file.getName());
- }
-
- /**
- * Setter for the "dir" attribute (required)
- */
- public void setDir(File f) {
- mRootDir = f;
- }
-
- /**
- * Setter for the "name" attribute (required) This attribute names the
- * output application bundle and asks as the CFBundleName if 'bundlename' is
- * not specified
- */
- public void setName(String s) {
- bundleProperties.setApplicationName(s);
- }
-
- /**
- * Setter for the "shortname" attribute (optional) This key identifies the
- * short name of the bundle. This name should be less than 16 characters
- * long and be suitable for displaying in the menu and the About box. The
- * name is (silently) cropped to this if necessary.
- */
- public void setShortName(String s) {
- bundleProperties.setCFBundleName(s);
- }
-
- /**
- * Setter for the "mainclass" attribute (required)
- */
- public void setMainClass(String s) {
- bundleProperties.setMainClass(s);
- }
-
- /**
- * Setter for the "WorkingDirectory" attribute (optional)
- */
- public void setWorkingDirectory(String s) {
- bundleProperties.setWorkingDirectory(s);
- }
-
- /**
- * Setter for the "icon" attribute (optional)
- */
-
- public void setIcon(File f) {
- mAppIcon = f;
- bundleProperties.setCFBundleIconFile(f.getName());
- }
-
- /**
- * Setter for the "bundleid" attribute (optional) This key specifies a
- * unique identifier string for the bundle. This identifier should be in the
- * form of a Java-style package name, for example com.mycompany.myapp. The
- * bundle identifier can be used to locate the bundle at runtime. The
- * preferences system uses this string to identify applications uniquely.
- *
- * No default.
- */
- public void setBundleid(String s) {
- bundleProperties.setCFBundleIdentifier(s);
- }
-
- /**
- * Setter for the "developmentregion" attribute(optional) Default "English".
- */
- public void setDevelopmentregion(String s) {
- bundleProperties.setCFBundleDevelopmentRegion(s);
- }
-
- /**
- * Setter for the "aboutmenuname" attribute (optional)
- */
- public void setAboutmenuname(String s) {
- bundleProperties.setCFBundleName(s);
- }
-
- /**
- * Setter for the "smalltabs" attribute (optional)
- */
- public void setSmallTabs(boolean b) {
- bundleProperties.addJavaProperty("com.apple.smallTabs", new Boolean(b)
- .toString());
- }
-
- /**
- * Setter for the "vmoptions" attribute (optional)
- */
- public void setVmoptions(String s) {
- bundleProperties.setVMOptions(s);
- }
-
- /**
- * Setter for the "antialiasedgraphics" attribute (optional)
- */
- public void setAntialiasedgraphics(boolean b) {
- mAntiAliasedGraphics = new Boolean(b);
- }
-
- /**
- * Setter for the "antialiasedtext" attribute (optional)
- */
- public void setAntialiasedtext(boolean b) {
- mAntiAliasedText = new Boolean(b);
- }
-
- /**
- * Setter for the "screenmenu" attribute (optional)
- */
- public void setScreenmenu(boolean b) {
- mScreenMenuBar = new Boolean(b);
- }
-
- /**
- * Setter for the "growbox" attribute (optional)
- */
- public void setGrowbox(boolean b) {
- mGrowbox = new Boolean(b);
- }
-
- /**
- * Setter for the "growboxintrudes" attribute (optional)
- */
- public void setGrowboxintrudes(boolean b) {
- mGrowboxIntrudes = new Boolean(b);
- }
-
- /**
- * Setter for the "liveresize" attribute (optional)
- */
- public void setLiveresize(boolean b) {
- mLiveResize = new Boolean(b);
- }
-
- /**
- * Setter for the "type" attribute (optional)
- */
- public void setType(String s) {
- bundleProperties.setCFBundlePackageType(s);
- }
-
- /**
- * Setter for the "signature" attribute (optional)
- */
- public void setSignature(String s) {
- bundleProperties.setCFBundleSignature(s);
- }
-
- /**
- * Setter for the "jvmversion" attribute (optional)
- */
- public void setJvmversion(String s) {
- bundleProperties.setJVMVersion(s);
- }
-
- /**
- * Setter for the "infostring" attribute (optional) This key identifies a
- * human-readable plain text string displaying the copyright information for
- * the bundle. The Finder displays this information in the Info window of
- * the bundle. (This string was also known as the long version string in Mac
- * OS 9). The format of the key should be of the following format: "©
- * Great Software, Inc, 1999". You can localize this string by including it
- * in the InfoPlist.strings file of the appropriate .lproj directory.
- */
-
- public void setInfoString(String s) {
- bundleProperties.setCFBundleGetInfoString(s);
- }
-
- /**
- * Setter for the "shortinfostring" attribute (optional) This key identifies
- * the marketing version of the bundle. The marketing version is a string
- * that usually displays the major and minor version of the bundle. This
- * string is usually of the form n.n.n where n is a number. The first number
- * is the major version number of the bundle. The second and third numbers
- * are minor revision numbers. You may omit minor revision numbers as
- * appropriate. The value of this key is displayed in the default About box
- * for Cocoa applications.
- *
- * The value for this key differs from the value for "CFBundleVersion",
- * which identifies a specific build number. The CFBundleShortVersionString
- * value represents a more formal version that does not change with every
- * build.
- */
- public void setShortInfoString(String s) {
- setVersion(s);
- }
-
- /**
- * Setter for the "verbose" attribute (optional)
- */
- public void setVerbose(boolean verbose) {
- this.mVerbose = verbose;
- }
- public void setShowPlist(boolean showPlist) {
- this.mShowPlist = showPlist;
- }
-
-
-
-
- /**
- * Setter for the "buildnumber" attribute (optional) This key specifies the
- * exact build version of the bundle. This string is usually of the form
- * nn.n.nxnnn where n is a digit and x is a character from the set [abdf].
- * The first number is the major version number of the bundle and can
- * contain one or two digits to represent a number in the range 0-99. The
- * second and third numbers are minor revision numbers and must be a single
- * numeric digit. The fourth set of digits is the specific build number for
- * the release.
- *
- * You may omit minor revision and build number information as appropriate.
- * You may also omit major and minor revision information and specify only a
- * build number. For example, valid version numbers include: 1.0.1,
- * 1.2.1b10, 1.2d200, d125, 101, and 1.0.
- *
- * The value of this key typically changes between builds and is displayed
- * in the Cocoa About panel in parenthesis. To specify the version
- * information of a released bundle, use the CFBundleShortVersionString key.
- */
- public void setBuild(String s) {
- bundleProperties.setCFBundleVersion(s);
- }
-
- /**
- * Setter for the version attribute (optional). It is this property, not
- * CFBundleVersion, which should receive the `short' version string. See for
- * example
- * <http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/>
- */
- public void setVersion(String s) {
- bundleProperties.setCFBundleShortVersionString(s);
- }
-
- public void setHelpBookFolder(String s) {
- bundleProperties.setCFBundleHelpBookFolder(s);
- }
-
- public void setHelpBookName(String s) {
- bundleProperties.setCFBundleHelpBookName(s);
- }
-
- /**
- * Setter for the "jars" attribute (required if no "jarfileset" is present)
- */
- public void setJars(String s) {
- PatternSet patset = new PatternSet();
- patset.setIncludes(s);
-
- String[] jarNames = patset.getIncludePatterns(getProject());
-
- for (int i = 0; i < jarNames.length; i++)
- mJarAttrs.add(getProject().resolveFile(jarNames[i]));
- }
-
- /**
- * Setter for the "jar" attribute (required if no "jarfileset" is present)
- */
- public void setJar(File s) {
- mJarAttrs.add(s);
- }
-
- /**
- * Setter for the "execs" attribute (optional)
- */
- public void setExecs(String s) {
- PatternSet patset = new PatternSet();
- patset.setIncludes(s);
-
- String[] execNames = patset.getIncludePatterns(getProject());
-
- for (int i = 0; i < execNames.length; i++) {
- File f = new File(execNames[i]);
- mExecAttrs.add(f);
- }
- }
-
- /**
- * Setter for the "extraclasspath" attribute (optional)
- */
- public void setExtraclasspath(String s) {
- PatternSet patset = new PatternSet();
- patset.setIncludes(s);
-
- String[] cpNames = patset.getIncludePatterns(getProject());
-
- for (int i = 0; i < cpNames.length; i++) {
- File f = new File(cpNames[i]);
- mExtraClassPathAttrs.add(f);
- }
- }
-
- /**
- * Set the 'chmod' executable.
- */
- public void setChmod(String s) {
- log("The \"chmod\" attribute has deprecaited, using the ANT Chmod task internally");
- }
-
- /***************************************************************************
- * Nested tasks - derived from FileList and FileSet
- **************************************************************************/
-
- public void addJarfileset(FileSet fs) {
- mJarFileSets.add(fs);
- }
-
- public void addJarfilelist(FileList fl) {
- mJarFileLists.add(fl);
- }
-
- public void addExecfileset(FileSet fs) {
- mExecFileSets.add(fs);
- }
-
- public void addExecfilelist(FileList fl) {
- mExecFileLists.add(fl);
- }
-
- public void addResourcefileset(FileSet fs) {
- mResourceFileSets.add(fs);
- }
-
- public void addResourcefilelist(FileList fl) {
- mResourceFileLists.add(fl);
- }
-
- public void addJavafileset(FileSet fs) {
- mJavaFileSets.add(fs);
- }
-
- public void addJavafilelist(FileList fl) {
- mJavaFileLists.add(fl);
- }
-
- public void addExtraclasspathfileset(FileSet fs) {
- mExtraClassPathFileSets.add(fs);
- }
-
- public void addExtraclasspathfilelist(FileList fl) {
- mExtraClassPathFileLists.add(fl);
- }
-
-
- /***************************************************************************
- * Nested tasks - new tasks with custom attributes
- **************************************************************************/
-
-
- public void addConfiguredJavaProperty(JavaProperty javaProperty)
- throws BuildException {
-
- String name = javaProperty.getName();
- String value = javaProperty.getValue();
-
- if ((name == null) || (value == null))
- throw new BuildException(
- "'<javaproperty>' must have both 'name' and 'value' attibutes");
-
- bundleProperties.addJavaProperty(name, value);
- }
-
- public void addConfiguredDocumentType(DocumentType documentType) throws BuildException {
-
- String name = documentType.getName();
- String role = documentType.getRole();
- List osTypes = documentType.getOSTypes();
- List extensions = documentType.getExtensions();
- List mimeTypes = documentType.getMimeTypes();
-
- if ((name == null) || (role == null))
- throw new BuildException(
- "'<documenttype>' must have both a 'name' and a 'role' attibute");
-
- if ((osTypes.isEmpty()) && (extensions.isEmpty()) && (mimeTypes.isEmpty()))
- throw new BuildException(
- "'<documenttype>' of \""
- + name
- + "\" must have 'osTypes' or 'extensions' or 'mimeTypes'");
-
- bundleProperties.addDocumentType(documentType);
- }
-
- public void addConfiguredService(Service service) {
-
- //if (service.getPortName() == null)
- // throw new BuildException("\"<service>\" must have a \"portName\" attribute");
-
- if (service.getMessage() == null)
- throw new BuildException("\"<service>\" must have a \"message\" attribute");
-
- String menuItem = service.getMenuItem();
- if (menuItem == null)
- throw new BuildException("\"<service>\" must have a \"menuItem\" attribute");
- if (!menuItems.add(menuItem))
- throw new BuildException("\"<service>\" \"menuItem\" value must be unique");
-
- if (service.getSendTypes().isEmpty() && service.getReturnTypes().isEmpty())
- throw new BuildException("\"<service>\" must have either a \"sendTypes\" attribute, a \"returnTypes\" attribute or both");
-
- String keyEquivalent = service.getKeyEquivalent();
- if ((keyEquivalent != null) && (1 != keyEquivalent.length()))
- throw new BuildException("\"<service>\" \"keyEquivalent\" must be one character if present");
-
- String timeoutString = service.getTimeout();
- if (timeoutString != null) {
- long timeout = -1;
- try {
- timeout = Long.parseLong(timeoutString);
- } catch (NumberFormatException nfe) {
- throw new BuildException("\"<service>\" \"timeout\" must be a positive integral number");
- }
- if (timeout < 0)
- throw new BuildException("\"<service>\" \"timeout\" must not be negative");
- }
-
- bundleProperties.addService(service);
- }
-
- public void addConfiguredHelpBook(HelpBook helpBook) {
-
- // Validity check on 'foldername'
- if (helpBook.getFolderName() == null) {
- if (bundleProperties.getCFBundleHelpBookFolder() == null)
- throw new BuildException("Either the '<helpbook>' attribute 'foldername' or the '<jarbundler>' attribute 'helpbookfolder' must be defined");
- helpBook.setFolderName(bundleProperties.getCFBundleHelpBookFolder());
- }
-
- // Validity check on 'title'
- if (helpBook.getName() == null) {
- if (bundleProperties.getCFBundleHelpBookName() == null)
- throw new BuildException("Either the '<helpbook>' attribute 'name' or the '<jarbundler>' attribute 'helpbookname' must be defined");
- helpBook.setName(bundleProperties.getCFBundleHelpBookName());
- }
-
- // Make sure some file were selected...
- List fileLists = helpBook.getFileLists();
- List fileSets = helpBook.getFileSets();
-
- if ( fileLists.isEmpty() && fileSets.isEmpty() )
- throw new BuildException("The '<helpbook>' task must have either " +
- "'<fileset>' or '<filelist>' nested tags");
-
-
- mHelpBooks.add(helpBook);
- }
-
-
-
- /***************************************************************************
- * Execute the task
- **************************************************************************/
-
- /**
- * The method executing the task
- */
-
- public void execute() throws BuildException {
-
- // Delete any existing Application bundle directory structure
-
- bundleDir = new File(mRootDir, bundleProperties.getApplicationName() + ".app");
-
- if (bundleDir.exists()) {
- Delete deleteTask = new Delete();
- deleteTask.setProject(getProject());
- deleteTask.setDir(bundleDir);
- deleteTask.execute();
- }
-
- // Validate - look for required attributes
- // ///////////////////////////////////////////
-
- if (mRootDir == null)
- throw new BuildException("Required attribute \"dir\" is not set.");
-
- if (mJarAttrs.isEmpty() && mJarFileSets.isEmpty()
- && mJarFileLists.isEmpty())
- throw new BuildException("Either the attribute \"jar\" must "
- + "be set, or one or more jarfilelists or "
- + "jarfilesets must be added.");
-
- if (!mJarAttrs.isEmpty()
- && (!mJarFileSets.isEmpty() || !mJarFileLists.isEmpty()))
- throw new BuildException(
- "Cannot set both the attribute "
- + "\"jars\" and use jar filesets/filelists. Use only one or the other.");
-
- if (bundleProperties.getApplicationName() == null)
- throw new BuildException("Required attribute \"name\" is not set.");
-
- if (bundleProperties.getMainClass() == null)
- throw new BuildException(
- "Required attribute \"mainclass\" is not set.");
-
- // /////////////////////////////////////////////////////////////////////////////////////
-
- // Set up some Java properties
-
- // About Menu, deprecated under 1.4+
- if (useOldPropertyNames())
- bundleProperties.addJavaProperty(ABOUTMENU_KEY, bundleProperties
- .getCFBundleName());
-
- // Anti Aliased Graphics, renamed in 1.4+
- String antiAliasedProperty = useOldPropertyNames()
- ? "com.apple.macosx.AntiAliasedGraphicsOn"
- : "apple.awt.antialiasing";
-
- if (mAntiAliasedGraphics != null)
- bundleProperties.addJavaProperty(antiAliasedProperty,
- mAntiAliasedGraphics.toString());
-
- // Anti Aliased Text, renamed in 1.4+
- String antiAliasedTextProperty = useOldPropertyNames()
- ? "com.apple.macosx.AntiAliasedTextOn"
- : "apple.awt.textantialiasing";
-
- if (mAntiAliasedText != null)
- bundleProperties.addJavaProperty(antiAliasedTextProperty,
- mAntiAliasedText.toString());
-
- // Live Resize, deprecated under 1.4+
- if (useOldPropertyNames() && (mLiveResize != null))
- bundleProperties.addJavaProperty(
- "com.apple.mrj.application.live-resize", mLiveResize
- .toString());
-
- // Screen Menu Bar, renamed in 1.4+
- String screenMenuBarProperty = useOldPropertyNames()
- ? "com.apple.macos.useScreenMenuBar"
- : "apple.laf.useScreenMenuBar";
-
- if (mScreenMenuBar != null)
- bundleProperties.addJavaProperty(screenMenuBarProperty,
- mScreenMenuBar.toString());
-
- // Growbox, added with 1.4+
- if ((useOldPropertyNames() == false) && (mGrowbox != null))
- bundleProperties.addJavaProperty("apple.awt.showGrowBox", mGrowbox
- .toString());
-
- // Growbox Intrudes, deprecated under 1.4+
- if (useOldPropertyNames() && (mGrowboxIntrudes != null))
- bundleProperties.addJavaProperty(
- "com.apple.mrj.application.growbox.intrudes",
- mGrowboxIntrudes.toString());
-
- if (!mRootDir.exists()
- || (mRootDir.exists() && !mRootDir.isDirectory()))
- throw new BuildException(
- "Destination directory specified by \"dir\" "
- + "attribute must already exist.");
-
- if (bundleDir.exists())
- throw new BuildException("The directory/bundle \""
- + bundleDir.getName()
- + "\" already exists, cannot continue.");
-
- // Status message
- log("Creating application bundle: " + bundleDir);
-
- if (!bundleDir.mkdir())
- throw new BuildException("Unable to create bundle: " + bundleDir);
-
- // Make the Contents directory
- mContentsDir = new File(bundleDir, "Contents");
-
- if (!mContentsDir.mkdir())
- throw new BuildException("Unable to create directory "
- + mContentsDir);
-
- // Make the "MacOS" directory
- mMacOsDir = new File(mContentsDir, "MacOS");
-
- if (!mMacOsDir.mkdir())
- throw new BuildException("Unable to create directory " + mMacOsDir);
-
- // Make the Resources directory
- mResourcesDir = new File(mContentsDir, "Resources");
-
- if (!mResourcesDir.mkdir())
- throw new BuildException("Unable to create directory "
- + mResourcesDir);
-
- // Make the Resources/Java directory
- mJavaDir = new File(mResourcesDir, "Java");
-
- if (!mJavaDir.mkdir())
- throw new BuildException("Unable to create directory " + mJavaDir);
-
- // Copy icon file to resource dir. If no icon parameter
- // is supplied, the default icon will be used.
-
- if (mAppIcon != null) {
-
-
- try {
- File dest = new File(mResourcesDir, mAppIcon.getName());
-
- if(mVerbose)
- log("Copying application icon file to \"" + bundlePath(dest) + "\"");
-
- mFileUtils.copyFile(mAppIcon, dest);
- } catch (IOException ex) {
- throw new BuildException("Cannot copy icon file: " + ex);
- }
- }
-
- // Copy document type icons, if any, to the resource dir
- try {
- Iterator itor = bundleProperties.getDocumentTypes().iterator();
-
- while (itor.hasNext()) {
- DocumentType documentType = (DocumentType) itor.next();
- File iconFile = documentType.getIconFile();
- if (iconFile != null) {
- File dest = new File(mResourcesDir, iconFile.getName());
- if(mVerbose)
- log("Copying document icon file to \"" + bundlePath(dest) + "\"");
- mFileUtils.copyFile(iconFile, dest);
- }
- }
- } catch (IOException ex) {
- throw new BuildException("Cannot copy document icon file: " + ex);
- }
-
- // Copy application jar(s) from the "jars" attribute (if any)
- processJarAttrs();
-
- // Copy application jar(s) from the nested jarfileset element(s)
- processJarFileSets();
-
- // Copy application jar(s) from the nested jarfilelist element(s)
- processJarFileLists();
-
- // Copy executable(s) from the "execs" attribute (if any)
- processExecAttrs();
-
- // Copy executable(s) from the nested execfileset element(s)
- processExecFileSets();
-
- // Copy executable(s) from the nested execfilelist element(s)
- processExecFileLists();
-
- // Copy resource(s) from the nested resourcefileset element(s)
- processResourceFileSets();
-
- // Copy resource(s) from the nested javafileset element(s)
- processJavaFileSets();
-
- // Copy resource(s) from the nested resourcefilelist element(s)
- processResourceFileLists();
-
- // Copy resource(s) from the nested javafilelist element(s)
- processJavaFileLists();
-
- // Add external classpath references from the extraclasspath attributes
- processExtraClassPathAttrs();
-
- // Add external classpath references from the nested
- // extraclasspathfileset element(s)
- processExtraClassPathFileSets();
-
- // Add external classpath references from the nested
- // extraclasspathfilelist attributes
- processExtraClassPathFileLists();
-
- // Copy HelpBooks into place
- copyHelpBooks();
-
- // Copy the JavaApplicationStub file from the Java system directory to
- // the MacOS directory
- copyApplicationStub();
-
- // Create the Info.plist file
- writeInfoPlist();
-
- // Create the PkgInfo file
- writePkgInfo();
-
- // Done!
- }
-
- /***************************************************************************
- * Private utility methods.
- **************************************************************************/
-
- private void setExecutable(File f) {
-
- Chmod chmodTask = new Chmod();
- chmodTask.setProject(getProject());
- chmodTask.setFile(f);
- chmodTask.setPerm("ugo+rx");
-
- if (mVerbose)
- log("Setting \"" + bundlePath(f) + "\" to executable");
-
- chmodTask.execute();
-
- }
-
- /**
- * Utility method to determine whether this app bundle is targeting a 1.3 or
- * 1.4 VM. The Mac OS X 1.3 VM uses different Java property names from the
- * 1.4 VM to hint at native Mac OS X look and feel options. For example, on
- * 1.3 the Java property to tell the VM to display Swing menu bars as screen
- * menus is "com.apple.macos.useScreenMenuBar". Under 1.4, it becomes
- * "apple.laf.useScreenMenuBar". Such is the price of progress, I suppose.
- *
- * Obviously, this logic may need refactoring in the future.
- */
-
- private boolean useOldPropertyNames() {
- return (bundleProperties.getJVMVersion().startsWith("1.3"));
- }
-
- private void processJarAttrs() throws BuildException {
-
- try {
-
- for (Iterator jarIter = mJarAttrs.iterator(); jarIter.hasNext();) {
- File src = (File) jarIter.next();
- File dest = new File(mJavaDir, src.getName());
-
- if (mVerbose)
- log("Copying JAR file to \"" + bundlePath(dest) + "\"");
-
-
- mFileUtils.copyFile(src, dest);
- bundleProperties.addToClassPath(dest.getName());
- }
- } catch (IOException ex) {
- throw new BuildException("Cannot copy jar file: " + ex);
- }
- }
-
- private void processJarFileSets() throws BuildException {
-
- for (Iterator jarIter = mJarFileSets.iterator(); jarIter.hasNext();) {
-
- FileSet fs = (FileSet) jarIter.next();
-
- Project p = fs.getProject();
- File srcDir = fs.getDir(p);
- FileScanner ds = fs.getDirectoryScanner(p);
- fs.setupDirectoryScanner(ds, p);
- ds.scan();
-
- String[] files = ds.getIncludedFiles();
-
- try {
-
- for (int i = 0; i < files.length; i++) {
- String fileName = files[i];
- File src = new File(srcDir, fileName);
- File dest = new File(mJavaDir, fileName);
-
- if (mVerbose)
- log("Copying JAR file to \"" + bundlePath(dest) + "\"");
-
- mFileUtils.copyFile(src, dest);
- bundleProperties.addToClassPath(fileName);
- }
-
- } catch (IOException ex) {
- throw new BuildException("Cannot copy jar file: " + ex);
- }
- }
- }
-
- private void processJarFileLists() throws BuildException {
-
- for (Iterator jarIter = mJarFileLists.iterator(); jarIter.hasNext();) {
- FileList fl = (FileList) jarIter.next();
- Project p = fl.getProject();
- File srcDir = fl.getDir(p);
- String[] files = fl.getFiles(p);
-
- try {
-
- for (int i = 0; i < files.length; i++) {
- String fileName = files[i];
- File src = new File(srcDir, fileName);
- File dest = new File(mJavaDir, fileName);
-
- if (mVerbose)
- log("Copying JAR file to \"" + bundlePath(dest) + "\"");
-
-
- mFileUtils.copyFile(src, dest);
- bundleProperties.addToClassPath(fileName);
- }
- } catch (IOException ex) {
- throw new BuildException("Cannot copy jar file: " + ex);
- }
- }
- }
-
- private void processExtraClassPathAttrs() throws BuildException {
-
- for (Iterator jarIter = mExtraClassPathAttrs.iterator(); jarIter
- .hasNext();) {
- File src = (File) jarIter.next();
- bundleProperties.addToExtraClassPath(src.getPath());
- }
- }
-
- private void processExtraClassPathFileSets() throws BuildException {
-
- for (Iterator jarIter = mExtraClassPathFileSets.iterator(); jarIter
- .hasNext();) {
- FileSet fs = (FileSet) jarIter.next();
- Project p = fs.getProject();
- File srcDir = fs.getDir(p);
- FileScanner ds = fs.getDirectoryScanner(p);
- fs.setupDirectoryScanner(ds, p);
- ds.scan();
-
- String[] files = ds.getIncludedFiles();
-
- for (int i = 0; i < files.length; i++) {
- File f = new File(srcDir, files[i]);
- bundleProperties.addToExtraClassPath(f.getPath());
- }
- }
- }
-
- private void processExtraClassPathFileLists() throws BuildException {
-
- for (Iterator jarIter = mExtraClassPathFileLists.iterator(); jarIter
- .hasNext();) {
- FileList fl = (FileList) jarIter.next();
- Project p = fl.getProject();
- File srcDir = fl.getDir(p);
- String[] files = fl.getFiles(p);
-
- for (int i = 0; i < files.length; i++) {
- File f = new File(srcDir, files[i]);
- bundleProperties.addToExtraClassPath(f.getPath());
- }
- }
- }
-
- private void processExecAttrs() throws BuildException {
-
- try {
-
- for (Iterator execIter = mExecAttrs.iterator(); execIter.hasNext();) {
- File src = (File) execIter.next();
- File dest = new File(mMacOsDir, src.getName());
-
- if (mVerbose)
- log("Copying exec file to \"" + bundlePath(dest) + "\"");
-
-
- mFileUtils.copyFile(src, dest);
- setExecutable(dest);
- }
- } catch (IOException ex) {
- throw new BuildException("Cannot copy exec file: " + ex);
- }
- }
-
- // Methods for copying FileSets into the application bundle ///////////////////////////////
-
- // Files for the Contents/MacOS directory
- private void processExecFileSets() {
- processCopyingFileSets(mExecFileSets, mMacOsDir, true);
- }
-
- // Files for the Contents/Resources directory
- private void processResourceFileSets() {
- processCopyingFileSets(mResourceFileSets, mResourcesDir, false);
- }
-
- // Files for the Contents/Resources/Java directory
- private void processJavaFileSets() {
- processCopyingFileSets(mJavaFileSets, mJavaDir, false);
- }
-
- private void processCopyingFileSets(List fileSets, File targetdir, boolean setExec) {
-
- for (Iterator execIter = fileSets.iterator(); execIter.hasNext();) {
- FileSet fs = (FileSet) execIter.next();
- Project p = fs.getProject();
- File srcDir = fs.getDir(p);
- FileScanner ds = fs.getDirectoryScanner(p);
- fs.setupDirectoryScanner(ds, p);
- ds.scan();
-
- String[] files = ds.getIncludedFiles();
-
- if (files.length == 0) {
- // this is probably an error -- warn about it
- System.err
- .println("WARNING: fileset for copying from directory "
- + srcDir + ": no files found");
- } else {
- try {
- for (int i = 0; i < files.length; i++) {
- String fileName = files[i];
- File src = new File(srcDir, fileName);
- File dest = new File(targetdir, fileName);
-
- if (mVerbose)
- log("Copying "
- + (setExec ? "exec" : "resource")
- + " file to \"" + bundlePath(dest) +"\"");
-
- mFileUtils.copyFile(src, dest);
- if (setExec)
- setExecutable(dest);
- }
- } catch (IOException ex) {
- throw new BuildException("Cannot copy file: " + ex);
- }
- }
- }
- }
-
- // Methods for copying FileLists into the application bundle /////////////////////////////
-
- // Files for the Contents/MacOS directory
- private void processExecFileLists() throws BuildException {
- processCopyingFileLists(mExecFileLists, mMacOsDir, true);
- }
-
- // Files for the Contents/Resources directory
- private void processResourceFileLists() throws BuildException {
- processCopyingFileLists(mResourceFileLists, mResourcesDir, false);
- }
-
- // Files for the Contents/Resources/Java directory
- private void processJavaFileLists() throws BuildException {
- processCopyingFileLists(mJavaFileLists, mJavaDir, false);
- }
-
- private void processCopyingFileLists(List fileLists, File targetDir, boolean setExec) throws BuildException {
-
- for (Iterator execIter = fileLists.iterator(); execIter.hasNext();) {
-
- FileList fl = (FileList) execIter.next();
- Project p = fl.getProject();
- File srcDir = fl.getDir(p);
- String[] files = fl.getFiles(p);
-
- if (files.length == 0) {
- // this is probably an error -- warn about it
- System.err.println("WARNING: filelist for copying from directory "
- + srcDir + ": no files found");
- } else {
- try {
- for (int i = 0; i < files.length; i++) {
- String fileName = files[i];
- File src = new File(srcDir, fileName);
- File dest = new File(targetDir, fileName);
-
- if (mVerbose)
- log("Copying "
- + (setExec ? "exec" : "resource")
- + " file to \"" + bundlePath(dest) +"\"");
-
- mFileUtils.copyFile(src, dest);
- if (setExec)
- setExecutable(dest);
- }
- } catch (IOException ex) {
- throw new BuildException("Cannot copy jar file: " + ex);
- }
- }
- }
- }
-
-
-
- private void copyHelpBooks() {
-
- for (Iterator itor = mHelpBooks.iterator(); itor.hasNext();) {
-
- HelpBook helpBook = (HelpBook)itor.next();
-
- String folderName = helpBook.getFolderName();
- String name = helpBook.getName();
- String locale = helpBook.getLocale();
-
- List fileLists = helpBook.getFileLists();
- List fileSets = helpBook.getFileSets();
-
-
- File helpBookDir = null;
-
- if (locale == null) {
-
- // Set the Bundle entries for a nonlocalized Help Book
- if (folderName != null)
- bundleProperties.setCFBundleHelpBookFolder(folderName);
-
- if (name != null)
- bundleProperties.setCFBundleHelpBookName(name);
-
- // The non-localized Help Book is top level "/Resources"
- helpBookDir = new File(mResourcesDir, folderName);
- helpBookDir.mkdir();
-
- if(mVerbose)
- log("Creating Help Book at \"" +
- bundlePath(helpBookDir) + "\"");
-
-
- } else {
-
- // The localized Help Book is "/Resources/locale.lproj"
-
- File lproj = new File(mResourcesDir, locale + ".lproj");
- lproj.mkdir();
- helpBookDir = new File(lproj, folderName);
- helpBookDir.mkdir();
-
- if(mVerbose)
- log("Creating Help Book for \"" + locale +
- "\" at \"" + bundlePath(helpBookDir) + "\"");
-
- // Create a local file to override the Bundle settings
- File infoPList = new File(lproj, "InfoPlist.strings");
- PrintWriter writer = null;
- try {
- writer = new PrintWriter(new FileWriter(infoPList));
- writer.println("CFBundleHelpBookFolder = \"" + folderName + "\";");
- writer.println("CFBundleHelpBookName = \"" + name + "\";");
- writer.println("CFBundleName = \"" + bundleProperties.getCFBundleName() + "\";");
- } catch (IOException ioe) {
- throw new BuildException("IOException in writing Help Book locale: " + locale);
- } finally {
- mFileUtils.close(writer);
- }
- }
-
- // Write the Help Book source files into the bundle
-
- processCopyingFileSets(fileSets, helpBookDir, false);
- processCopyingFileLists(fileLists, helpBookDir, false);
-
- }
- }
-
-
-
-
- // Copy the application stub into the bundle
- // /////////////////////////////////////////////
-
- private void copyApplicationStub() throws BuildException {
-
- File newStubFile = new File(mMacOsDir, bundleProperties.getCFBundleExecutable());
-
- if (mVerbose)
- log("Copying Java application stub to \"" + bundlePath(newStubFile) + "\"");
-
- try {
- mFileUtils.copyFile(mStubFile, newStubFile);
- } catch (IOException ex) {
- throw new BuildException("Cannot copy Java Application Stub: " + ex);
- }
-
- // Set the permissions on the stub file to executable
-
- setExecutable(newStubFile);
- }
-
- private void writeInfoPlist() throws BuildException {
- PropertyListWriter listWriter = new PropertyListWriter(bundleProperties);
- File infoPlist = new File(mContentsDir, "Info.plist");
-
- listWriter.writeFile(infoPlist);
-
- if (mVerbose)
- log("Creating \"" + bundlePath(infoPlist) + "\" file");
-
-
- if (mShowPlist) {
- try {
- BufferedReader in = new BufferedReader(new FileReader(infoPlist));
- String str;
- while ((str = in.readLine()) != null)
- log(str);
- in.close();
- } catch (IOException e) {
- throw new BuildException(e);
- }
- }
- }
-
-
- //
- // Write the PkgInfo file into the application bundle
- //
-
- private void writePkgInfo() throws BuildException {
- File pkgInfo = new File(mContentsDir, "PkgInfo");
- PrintWriter writer = null;
-
- try {
- writer = new PrintWriter(new BufferedWriter(new FileWriter(pkgInfo)));
- writer.print(bundleProperties.getCFBundlePackageType());
- writer.println(bundleProperties.getCFBundleSignature());
- writer.flush();
- } catch (IOException ex) {
- throw new BuildException("Cannot create PkgInfo file: " + ex);
- } finally {
- mFileUtils.close(writer);
- }
- }
-
- private String bundlePath(File bundleFile) {
-
- String rootPath = bundleDir.getAbsolutePath();
- String thisPath = bundleFile.getAbsolutePath();
-
- return thisPath.substring(rootPath.length());
-
- }
-}
+/*
+ * A Mac OS X Jar Bundler Ant Task.
+ *
+ * Copyright (c) 2003, Seth J. Morabito <sethm at loomcom.com> All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package net.sourceforge.jarbundler;
+
+// This package's imports
+import net.sourceforge.jarbundler.AppBundleProperties;
+import net.sourceforge.jarbundler.DocumentType;
+import net.sourceforge.jarbundler.JavaProperty;
+import net.sourceforge.jarbundler.PropertyListWriter;
+
+// Java I/O
+import java.io.BufferedWriter;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+
+// Java Utility
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+// Apache Jakarta
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.FileScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+
+import org.apache.tools.ant.types.FileList;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.PatternSet;
+
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.taskdefs.Chmod;
+import org.apache.tools.ant.taskdefs.Delete;
+
+import org.apache.tools.ant.util.FileUtils;
+
+
+// Java language imports
+import java.lang.Boolean;
+import java.lang.Process;
+import java.lang.Runtime;
+import java.lang.String;
+import java.lang.System;
+
+/**
+ * <p>
+ * An ant task which creates a Mac OS X Application Bundle for a Java
+ * application.
+ * </p>
+ *
+ * <dl>
+ * <dt>dir</dt>
+ * <dd>The directory into which to put the new application bundle.</dd>
+ * <dt>name</dt>
+ * <dd>The name of the application bundle. Note that the maximum length of this
+ * name is 16 characters, and it will be silently cropped if it is longer than
+ * this.</dd>
+ * <dt>mainclass</dt>
+ * <dd>The main Java class to call when running the application.</dd>
+ * </dl>
+ *
+ * <p>
+ * One of the following three MUST be used:
+ *
+ * <ol>
+ * <li>jars Space or comma-separated list of JAR files to include.; OR</li>
+ * <li>One or more nested <jarfileset>s. These are normal ANT FileSets;
+ * OR </li>
+ * <li>One or more nested <jarfilelist>s. These are standard ANT
+ * FileLists. </li>
+ * </ol>
+ *
+ * <p>
+ * Optional attributes:
+ *
+ * <p>
+ * The following attributes are not required, but you can use them to override
+ * default behavior.
+ *
+ * <dl>
+ * <dt>verbose
+ * <dd>If true, show more verbose output while running the task
+ *
+ * <dt>version
+ * <dd>Version information about your application (e.g., "1.0")
+ *
+ * <dt>infostring
+ * <dd>String to show in the "Get Info" dialog
+ * </dl>
+ *
+ * These attributes control the fine-tuning of the "Mac OS X" look and feel.
+ *
+ * <dl>
+ * <dt>arguments
+ * <dd>Command line arguments. (no default)
+ *
+ * <dt>smalltabs
+ * <dd>Use small tabs. (default "false") Deprecated under JVM 1.4.1
+ *
+ * <dt>antialiasedgraphics
+ * <dd>Use anti-aliased graphics (default "false")
+ *
+ * <dt>antialiasedtext
+ * <dd>Use anti-aliased text (default "false")
+ *
+ * <dt>bundleid
+ * <dd>Unique identifier for this bundle, in the form of a Java package. No
+ * default.
+ *
+ * <dt>buildnumber
+ * <dd>Unique identifier for this build
+ *
+ * <dt>developmentregion
+ * <dd>Development Region. Default "English".
+ *
+ * <dt>execs
+ * <dd>Files to be copied into "Resources/MacOS" and made executable
+ *
+ * <dt>liveresize
+ * <dd>Use "Live resizing" (default "false") Deprecated under JVM 1.4.1
+ *
+ *
+ * <dt>growbox
+ * <dd>Show growbox (default "true")
+ *
+ * <dt>growboxintrudes
+ * <dd>Intruding growbox (default "false") Deprecated under JVM 1.4.1
+ *
+ * <dt>screenmenu
+ * <dd>Put swing menu into Mac OS X menu bar.
+ *
+ * <dt>type
+ * <dd>Bundle type (default "APPL")
+ *
+ * <dt>signature
+ * <dd>Bundle Signature (default "????")
+ *
+ * <dt>stubfile
+ * <dd>The Java Application Stub file to copy for your application (default
+ * MacOS system stub file)
+ * </dl>
+ *
+ * <p>
+ * Rarely used optional attributes.
+ * <dl>
+ * <dt>chmod
+ * <dd>Full path to the chmod command. This almost certainly does NOT need to
+ * be set.
+ * </dl>
+ *
+ * <p>
+ * The task also supports nested <execfileset> and/or <execfilelist>
+ * elements, and <resourcefileset> and/or <resourcefilelist>
+ * elements, which are standard Ant FileSet and FileList elements. In the first
+ * case, the referenced files are copied to the <code>Contents/MacOS</code>
+ * directory and made executable, and in the second they are copied to the
+ * <code>Contents/Resources</code> directory and not made executable. If you
+ * winrces, note that in fact the files are installed in locations which have
+ * the same relation to the <code>Contents/Resources</code> directory as the
+ * files in the FileSet or FileList have to the 'dir' attribute. Thus in the
+ * case:
+ *
+ * <pre>
+ * <resourcefileset dir="builddir/architectures"
+ * includes="ppc/*.jnilib"/>
+ * </pre>
+ *
+ * <p>
+ * the <code>*.jnilib</code> files will be installed in
+ * <code>Contents/Resources/ppc</code>.
+ *
+ * <p>
+ * The task supports a nested <javaproperty> element, which allows you to
+ * specify further properties which are set for the JVM when the application is
+ * launched. This takes a required <code>key</code> attribute, giving the
+ * property key, plus an attribute giving the property value, which may be one
+ * of <code>value</code>, giving the string value of the property,
+ * <code>file</code>, setting the value of the property to be the absolute
+ * path of the given file, or <code>path</code>, which sets the value to the
+ * given path. If you are setting paths here, recall that, within the bundle,
+ * <code>$APP_PACKAGE</code> is set to the root directory of the bundle (ie,
+ * the path to the <code>foo.app</code> directory), and <code>$JAVAROOT</code>
+ * to the directory <code>Contents/Resources/Java</code>.
+ *
+ * <p>
+ * Minimum example:
+ *
+ * <pre>
+ *
+ * <jarbundler dir="release" name="Bar Project" mainclass="org.bar.Main"
+ * jars="bin/Bar.jar" />
+ * </pre>
+ *
+ * <p>
+ * Using Filesets
+ *
+ * <pre>
+ * <jarbundler dir="release" name="Bar Project" mainclass="org.bar.Main">
+ * <jarfileset dir="bin">
+ * <include name="*.jar" />
+ * <exclude name="test.jar" />
+ * </jarfileset>
+ * <execfileset dir="execs">
+ * <include name="**" />
+ * </execfileset>
+ * </jarbundler>
+ * </pre>
+ *
+ * <p>
+ * Much Longer example:
+ * </p>
+ *
+ * <pre>
+ * <jarbundler dir="release"
+ * name="Foo Project"
+ * mainclass="org.bar.Main"
+ * version="1.0 b 1"
+ * infostring="Foo Project (c) 2002"
+ * type="APPL"
+ * jars="bin/foo.jar bin/bar.jar"
+ * execs="exec/foobar"
+ * signature="????"
+ * workingdirectory="temp"
+ * icon="resources/foo.icns"
+ * jvmversion="1.4.1+"
+ * vmoptions="-Xmx256m"/>
+ * </pre>
+ *
+ * http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/
+ */
+public class JarBundler extends MatchingTask {
+
+ private static final String DEFAULT_STUB = "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub";
+
+ private static final String ABOUTMENU_KEY = "com.apple.mrj.application.apple.menu.about.name";
+ private static final Set menuItems = new HashSet();
+ private File mAppIcon;
+
+ private File mRootDir;
+
+ private final List mJavaFileLists = new ArrayList();
+ private final List mJarFileSets = new ArrayList();
+
+ private final List mExecFileLists = new ArrayList();
+ private final List mExecFileSets = new ArrayList();
+
+ private final List mResourceFileLists = new ArrayList();
+ private final List mResourceFileSets = new ArrayList();
+
+ private final List mJarFileLists = new ArrayList();
+ private final List mJavaFileSets = new ArrayList();
+
+ private final List mExtraClassPathFileLists = new ArrayList();
+ private final List mExtraClassPathFileSets = new ArrayList();
+
+ private final List mJarAttrs = new ArrayList();
+
+ private final List mExecAttrs = new ArrayList();
+
+ private final List mExtraClassPathAttrs = new ArrayList();
+
+ private final List mHelpBooks = new ArrayList();
+
+ private boolean mVerbose = false;
+ private boolean mShowPlist = false;
+
+ // Java properties used by Mac OS X Java applications
+
+ private File mStubFile = new File(DEFAULT_STUB);
+
+ private Boolean mAntiAliasedGraphics = null;
+
+ private Boolean mAntiAliasedText = null;
+
+ private Boolean mLiveResize = null;
+
+ private Boolean mScreenMenuBar = null;
+
+ private Boolean mGrowbox = null;
+
+ private Boolean mGrowboxIntrudes = null;
+
+ // The root of the application bundle
+ private File bundleDir;
+
+ // "Contents" directory
+ private File mContentsDir;
+
+ // "Contents/MacOS" directory
+ private File mMacOsDir;
+
+ // "Contents/Resources" directory
+ private File mResourcesDir;
+
+ // "Contents/Resources/Java" directory
+ private File mJavaDir;
+
+ // Full path to the 'chmod' command. Can be overridden
+ // with the 'chmod' attribute. Won't cause any harm if
+ // not set, or if this executable doesn't exist.
+
+
+ private AppBundleProperties bundleProperties = new AppBundleProperties();
+
+ // Ant file utilities
+
+ private FileUtils mFileUtils = FileUtils.getFileUtils();
+
+ /***************************************************************************
+ * Retreive task attributes
+ **************************************************************************/
+
+ /**
+ * Arguments to the
+ *
+ * @param s
+ * The arguments to pass to the application being launched.
+ */
+ public void setArguments(String s) {
+ bundleProperties.setArguments(s);
+ }
+
+ /**
+ * Override the stub file path to build on non-MacOS platforms
+ *
+ * @param file
+ * the path to the stub file
+ */
+ public void setStubFile(File file) {
+ mStubFile = (file.exists()) ? file : new File(DEFAULT_STUB);
+ bundleProperties.setCFBundleExecutable(file.getName());
+ }
+
+ /**
+ * Setter for the "dir" attribute (required)
+ */
+ public void setDir(File f) {
+ mRootDir = f;
+ }
+
+ /**
+ * Setter for the "name" attribute (required) This attribute names the
+ * output application bundle and asks as the CFBundleName if 'bundlename' is
+ * not specified
+ */
+ public void setName(String s) {
+ bundleProperties.setApplicationName(s);
+ }
+
+ /**
+ * Setter for the "shortname" attribute (optional) This key identifies the
+ * short name of the bundle. This name should be less than 16 characters
+ * long and be suitable for displaying in the menu and the About box. The
+ * name is (silently) cropped to this if necessary.
+ */
+ public void setShortName(String s) {
+ bundleProperties.setCFBundleName(s);
+ }
+
+ /**
+ * Setter for the "mainclass" attribute (required)
+ */
+ public void setMainClass(String s) {
+ bundleProperties.setMainClass(s);
+ }
+
+ /**
+ * Setter for the "WorkingDirectory" attribute (optional)
+ */
+ public void setWorkingDirectory(String s) {
+ bundleProperties.setWorkingDirectory(s);
+ }
+
+ /**
+ * Setter for the "icon" attribute (optional)
+ */
+
+ public void setIcon(File f) {
+ mAppIcon = f;
+ bundleProperties.setCFBundleIconFile(f.getName());
+ }
+
+ /**
+ * Setter for the "bundleid" attribute (optional) This key specifies a
+ * unique identifier string for the bundle. This identifier should be in the
+ * form of a Java-style package name, for example com.mycompany.myapp. The
+ * bundle identifier can be used to locate the bundle at runtime. The
+ * preferences system uses this string to identify applications uniquely.
+ *
+ * No default.
+ */
+ public void setBundleid(String s) {
+ bundleProperties.setCFBundleIdentifier(s);
+ }
+
+ /**
+ * Setter for the "developmentregion" attribute(optional) Default "English".
+ */
+ public void setDevelopmentregion(String s) {
+ bundleProperties.setCFBundleDevelopmentRegion(s);
+ }
+
+ /**
+ * Setter for the "aboutmenuname" attribute (optional)
+ */
+ public void setAboutmenuname(String s) {
+ bundleProperties.setCFBundleName(s);
+ }
+
+ /**
+ * Setter for the "smalltabs" attribute (optional)
+ */
+ public void setSmallTabs(boolean b) {
+ bundleProperties.addJavaProperty("com.apple.smallTabs", new Boolean(b)
+ .toString());
+ }
+
+ /**
+ * Setter for the "vmoptions" attribute (optional)
+ */
+ public void setVmoptions(String s) {
+ bundleProperties.setVMOptions(s);
+ }
+
+ /**
+ * Setter for the "antialiasedgraphics" attribute (optional)
+ */
+ public void setAntialiasedgraphics(boolean b) {
+ mAntiAliasedGraphics = new Boolean(b);
+ }
+
+ /**
+ * Setter for the "antialiasedtext" attribute (optional)
+ */
+ public void setAntialiasedtext(boolean b) {
+ mAntiAliasedText = new Boolean(b);
+ }
+
+ /**
+ * Setter for the "screenmenu" attribute (optional)
+ */
+ public void setScreenmenu(boolean b) {
+ mScreenMenuBar = new Boolean(b);
+ }
+
+ /**
+ * Setter for the "growbox" attribute (optional)
+ */
+ public void setGrowbox(boolean b) {
+ mGrowbox = new Boolean(b);
+ }
+
+ /**
+ * Setter for the "growboxintrudes" attribute (optional)
+ */
+ public void setGrowboxintrudes(boolean b) {
+ mGrowboxIntrudes = new Boolean(b);
+ }
+
+ /**
+ * Setter for the "liveresize" attribute (optional)
+ */
+ public void setLiveresize(boolean b) {
+ mLiveResize = new Boolean(b);
+ }
+
+ /**
+ * Setter for the "type" attribute (optional)
+ */
+ public void setType(String s) {
+ bundleProperties.setCFBundlePackageType(s);
+ }
+
+ /**
+ * Setter for the "signature" attribute (optional)
+ */
+ public void setSignature(String s) {
+ bundleProperties.setCFBundleSignature(s);
+ }
+
+ /**
+ * Setter for the "jvmversion" attribute (optional)
+ */
+ public void setJvmversion(String s) {
+ bundleProperties.setJVMVersion(s);
+ }
+
+ /**
+ * Setter for the "infostring" attribute (optional) This key identifies a
+ * human-readable plain text string displaying the copyright information for
+ * the bundle. The Finder displays this information in the Info window of
+ * the bundle. (This string was also known as the long version string in Mac
+ * OS 9). The format of the key should be of the following format: "©
+ * Great Software, Inc, 1999". You can localize this string by including it
+ * in the InfoPlist.strings file of the appropriate .lproj directory.
+ */
+
+ public void setInfoString(String s) {
+ bundleProperties.setCFBundleGetInfoString(s);
+ }
+
+ /**
+ * Setter for the "shortinfostring" attribute (optional) This key identifies
+ * the marketing version of the bundle. The marketing version is a string
+ * that usually displays the major and minor version of the bundle. This
+ * string is usually of the form n.n.n where n is a number. The first number
+ * is the major version number of the bundle. The second and third numbers
+ * are minor revision numbers. You may omit minor revision numbers as
+ * appropriate. The value of this key is displayed in the default About box
+ * for Cocoa applications.
+ *
+ * The value for this key differs from the value for "CFBundleVersion",
+ * which identifies a specific build number. The CFBundleShortVersionString
+ * value represents a more formal version that does not change with every
+ * build.
+ */
+ public void setShortInfoString(String s) {
+ setVersion(s);
+ }
+
+ /**
+ * Setter for the "verbose" attribute (optional)
+ */
+ public void setVerbose(boolean verbose) {
+ this.mVerbose = verbose;
+ }
+ public void setShowPlist(boolean showPlist) {
+ this.mShowPlist = showPlist;
+ }
+
+
+
+
+ /**
+ * Setter for the "buildnumber" attribute (optional) This key specifies the
+ * exact build version of the bundle. This string is usually of the form
+ * nn.n.nxnnn where n is a digit and x is a character from the set [abdf].
+ * The first number is the major version number of the bundle and can
+ * contain one or two digits to represent a number in the range 0-99. The
+ * second and third numbers are minor revision numbers and must be a single
+ * numeric digit. The fourth set of digits is the specific build number for
+ * the release.
+ *
+ * You may omit minor revision and build number information as appropriate.
+ * You may also omit major and minor revision information and specify only a
+ * build number. For example, valid version numbers include: 1.0.1,
+ * 1.2.1b10, 1.2d200, d125, 101, and 1.0.
+ *
+ * The value of this key typically changes between builds and is displayed
+ * in the Cocoa About panel in parenthesis. To specify the version
+ * information of a released bundle, use the CFBundleShortVersionString key.
+ */
+ public void setBuild(String s) {
+ bundleProperties.setCFBundleVersion(s);
+ }
+
+ /**
+ * Setter for the version attribute (optional). It is this property, not
+ * CFBundleVersion, which should receive the `short' version string. See for
+ * example
+ * <http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/>
+ */
+ public void setVersion(String s) {
+ bundleProperties.setCFBundleShortVersionString(s);
+ }
+
+ public void setHelpBookFolder(String s) {
+ bundleProperties.setCFBundleHelpBookFolder(s);
+ }
+
+ public void setHelpBookName(String s) {
+ bundleProperties.setCFBundleHelpBookName(s);
+ }
+
+ /**
+ * Setter for the "jars" attribute (required if no "jarfileset" is present)
+ */
+ public void setJars(String s) {
+ PatternSet patset = new PatternSet();
+ patset.setIncludes(s);
+
+ String[] jarNames = patset.getIncludePatterns(getProject());
+
+ for (int i = 0; i < jarNames.length; i++)
+ mJarAttrs.add(getProject().resolveFile(jarNames[i]));
+ }
+
+ /**
+ * Setter for the "jar" attribute (required if no "jarfileset" is present)
+ */
+ public void setJar(File s) {
+ mJarAttrs.add(s);
+ }
+
+ /**
+ * Setter for the "execs" attribute (optional)
+ */
+ public void setExecs(String s) {
+ PatternSet patset = new PatternSet();
+ patset.setIncludes(s);
+
+ String[] execNames = patset.getIncludePatterns(getProject());
+
+ for (int i = 0; i < execNames.length; i++) {
+ File f = new File(execNames[i]);
+ mExecAttrs.add(f);
+ }
+ }
+
+ /**
+ * Setter for the "extraclasspath" attribute (optional)
+ */
+ public void setExtraclasspath(String s) {
+ PatternSet patset = new PatternSet();
+ patset.setIncludes(s);
+
+ String[] cpNames = patset.getIncludePatterns(getProject());
+
+ for (int i = 0; i < cpNames.length; i++) {
+ File f = new File(cpNames[i]);
+ mExtraClassPathAttrs.add(f);
+ }
+ }
+
+ /**
+ * Set the 'chmod' executable.
+ */
+ public void setChmod(String s) {
+ log("The \"chmod\" attribute has deprecaited, using the ANT Chmod task internally");
+ }
+
+ /***************************************************************************
+ * Nested tasks - derived from FileList and FileSet
+ **************************************************************************/
+
+ public void addJarfileset(FileSet fs) {
+ mJarFileSets.add(fs);
+ }
+
+ public void addJarfilelist(FileList fl) {
+ mJarFileLists.add(fl);
+ }
+
+ public void addExecfileset(FileSet fs) {
+ mExecFileSets.add(fs);
+ }
+
+ public void addExecfilelist(FileList fl) {
+ mExecFileLists.add(fl);
+ }
+
+ public void addResourcefileset(FileSet fs) {
+ mResourceFileSets.add(fs);
+ }
+
+ public void addResourcefilelist(FileList fl) {
+ mResourceFileLists.add(fl);
+ }
+
+ public void addJavafileset(FileSet fs) {
+ mJavaFileSets.add(fs);
+ }
+
+ public void addJavafilelist(FileList fl) {
+ mJavaFileLists.add(fl);
+ }
+
+ public void addExtraclasspathfileset(FileSet fs) {
+ mExtraClassPathFileSets.add(fs);
+ }
+
+ public void addExtraclasspathfilelist(FileList fl) {
+ mExtraClassPathFileLists.add(fl);
+ }
+
+
+ /***************************************************************************
+ * Nested tasks - new tasks with custom attributes
+ **************************************************************************/
+
+
+ public void addConfiguredJavaProperty(JavaProperty javaProperty)
+ throws BuildException {
+
+ String name = javaProperty.getName();
+ String value = javaProperty.getValue();
+
+ if ((name == null) || (value == null))
+ throw new BuildException(
+ "'<javaproperty>' must have both 'name' and 'value' attibutes");
+
+ bundleProperties.addJavaProperty(name, value);
+ }
+
+ public void addConfiguredDocumentType(DocumentType documentType) throws BuildException {
+
+ String name = documentType.getName();
+ String role = documentType.getRole();
+ List osTypes = documentType.getOSTypes();
+ List extensions = documentType.getExtensions();
+ List mimeTypes = documentType.getMimeTypes();
+
+ if ((name == null) || (role == null))
+ throw new BuildException(
+ "'<documenttype>' must have both a 'name' and a 'role' attibute");
+
+ if ((osTypes.isEmpty()) && (extensions.isEmpty()) && (mimeTypes.isEmpty()))
+ throw new BuildException(
+ "'<documenttype>' of \""
+ + name
+ + "\" must have 'osTypes' or 'extensions' or 'mimeTypes'");
+
+ bundleProperties.addDocumentType(documentType);
+ }
+
+ public void addConfiguredService(Service service) {
+
+ //if (service.getPortName() == null)
+ // throw new BuildException("\"<service>\" must have a \"portName\" attribute");
+
+ if (service.getMessage() == null)
+ throw new BuildException("\"<service>\" must have a \"message\" attribute");
+
+ String menuItem = service.getMenuItem();
+ if (menuItem == null)
+ throw new BuildException("\"<service>\" must have a \"menuItem\" attribute");
+ if (!menuItems.add(menuItem))
+ throw new BuildException("\"<service>\" \"menuItem\" value must be unique");
+
+ if (service.getSendTypes().isEmpty() && service.getReturnTypes().isEmpty())
+ throw new BuildException("\"<service>\" must have either a \"sendTypes\" attribute, a \"returnTypes\" attribute or both");
+
+ String keyEquivalent = service.getKeyEquivalent();
+ if ((keyEquivalent != null) && (1 != keyEquivalent.length()))
+ throw new BuildException("\"<service>\" \"keyEquivalent\" must be one character if present");
+
+ String timeoutString = service.getTimeout();
+ if (timeoutString != null) {
+ long timeout = -1;
+ try {
+ timeout = Long.parseLong(timeoutString);
+ } catch (NumberFormatException nfe) {
+ throw new BuildException("\"<service>\" \"timeout\" must be a positive integral number");
+ }
+ if (timeout < 0)
+ throw new BuildException("\"<service>\" \"timeout\" must not be negative");
+ }
+
+ bundleProperties.addService(service);
+ }
+
+ public void addConfiguredHelpBook(HelpBook helpBook) {
+
+ // Validity check on 'foldername'
+ if (helpBook.getFolderName() == null) {
+ if (bundleProperties.getCFBundleHelpBookFolder() == null)
+ throw new BuildException("Either the '<helpbook>' attribute 'foldername' or the '<jarbundler>' attribute 'helpbookfolder' must be defined");
+ helpBook.setFolderName(bundleProperties.getCFBundleHelpBookFolder());
+ }
+
+ // Validity check on 'title'
+ if (helpBook.getName() == null) {
+ if (bundleProperties.getCFBundleHelpBookName() == null)
+ throw new BuildException("Either the '<helpbook>' attribute 'name' or the '<jarbundler>' attribute 'helpbookname' must be defined");
+ helpBook.setName(bundleProperties.getCFBundleHelpBookName());
+ }
+
+ // Make sure some file were selected...
+ List fileLists = helpBook.getFileLists();
+ List fileSets = helpBook.getFileSets();
+
+ if ( fileLists.isEmpty() && fileSets.isEmpty() )
+ throw new BuildException("The '<helpbook>' task must have either " +
+ "'<fileset>' or '<filelist>' nested tags");
+
+
+ mHelpBooks.add(helpBook);
+ }
+
+
+
+ /***************************************************************************
+ * Execute the task
+ **************************************************************************/
+
+ /**
+ * The method executing the task
+ */
+
+ public void execute() throws BuildException {
+
+ // Delete any existing Application bundle directory structure
+
+ bundleDir = new File(mRootDir, bundleProperties.getApplicationName() + ".app");
+
+ if (bundleDir.exists()) {
+ Delete deleteTask = new Delete();
+ deleteTask.setProject(getProject());
+ deleteTask.setDir(bundleDir);
+ deleteTask.execute();
+ }
+
+ // Validate - look for required attributes
+ // ///////////////////////////////////////////
+
+ if (mRootDir == null)
+ throw new BuildException("Required attribute \"dir\" is not set.");
+
+ if (mJarAttrs.isEmpty() && mJarFileSets.isEmpty()
+ && mJarFileLists.isEmpty())
+ throw new BuildException("Either the attribute \"jar\" must "
+ + "be set, or one or more jarfilelists or "
+ + "jarfilesets must be added.");
+
+ if (!mJarAttrs.isEmpty()
+ && (!mJarFileSets.isEmpty() || !mJarFileLists.isEmpty()))
+ throw new BuildException(
+ "Cannot set both the attribute "
+ + "\"jars\" and use jar filesets/filelists. Use only one or the other.");
+
+ if (bundleProperties.getApplicationName() == null)
+ throw new BuildException("Required attribute \"name\" is not set.");
+
+ if (bundleProperties.getMainClass() == null)
+ throw new BuildException(
+ "Required attribute \"mainclass\" is not set.");
+
+ // /////////////////////////////////////////////////////////////////////////////////////
+
+ // Set up some Java properties
+
+ // About Menu, deprecated under 1.4+
+ if (useOldPropertyNames())
+ bundleProperties.addJavaProperty(ABOUTMENU_KEY, bundleProperties
+ .getCFBundleName());
+
+ // Anti Aliased Graphics, renamed in 1.4+
+ String antiAliasedProperty = useOldPropertyNames()
+ ? "com.apple.macosx.AntiAliasedGraphicsOn"
+ : "apple.awt.antialiasing";
+
+ if (mAntiAliasedGraphics != null)
+ bundleProperties.addJavaProperty(antiAliasedProperty,
+ mAntiAliasedGraphics.toString());
+
+ // Anti Aliased Text, renamed in 1.4+
+ String antiAliasedTextProperty = useOldPropertyNames()
+ ? "com.apple.macosx.AntiAliasedTextOn"
+ : "apple.awt.textantialiasing";
+
+ if (mAntiAliasedText != null)
+ bundleProperties.addJavaProperty(antiAliasedTextProperty,
+ mAntiAliasedText.toString());
+
+ // Live Resize, deprecated under 1.4+
+ if (useOldPropertyNames() && (mLiveResize != null))
+ bundleProperties.addJavaProperty(
+ "com.apple.mrj.application.live-resize", mLiveResize
+ .toString());
+
+ // Screen Menu Bar, renamed in 1.4+
+ String screenMenuBarProperty = useOldPropertyNames()
+ ? "com.apple.macos.useScreenMenuBar"
+ : "apple.laf.useScreenMenuBar";
+
+ if (mScreenMenuBar != null)
+ bundleProperties.addJavaProperty(screenMenuBarProperty,
+ mScreenMenuBar.toString());
+
+ // Growbox, added with 1.4+
+ if ((useOldPropertyNames() == false) && (mGrowbox != null))
+ bundleProperties.addJavaProperty("apple.awt.showGrowBox", mGrowbox
+ .toString());
+
+ // Growbox Intrudes, deprecated under 1.4+
+ if (useOldPropertyNames() && (mGrowboxIntrudes != null))
+ bundleProperties.addJavaProperty(
+ "com.apple.mrj.application.growbox.intrudes",
+ mGrowboxIntrudes.toString());
+
+ if (!mRootDir.exists()
+ || (mRootDir.exists() && !mRootDir.isDirectory()))
+ throw new BuildException(
+ "Destination directory specified by \"dir\" "
+ + "attribute must already exist.");
+
+ if (bundleDir.exists())
+ throw new BuildException("The directory/bundle \""
+ + bundleDir.getName()
+ + "\" already exists, cannot continue.");
+
+ // Status message
+ log("Creating application bundle: " + bundleDir);
+
+ if (!bundleDir.mkdir())
+ throw new BuildException("Unable to create bundle: " + bundleDir);
+
+ // Make the Contents directory
+ mContentsDir = new File(bundleDir, "Contents");
+
+ if (!mContentsDir.mkdir())
+ throw new BuildException("Unable to create directory "
+ + mContentsDir);
+
+ // Make the "MacOS" directory
+ mMacOsDir = new File(mContentsDir, "MacOS");
+
+ if (!mMacOsDir.mkdir())
+ throw new BuildException("Unable to create directory " + mMacOsDir);
+
+ // Make the Resources directory
+ mResourcesDir = new File(mContentsDir, "Resources");
+
+ if (!mResourcesDir.mkdir())
+ throw new BuildException("Unable to create directory "
+ + mResourcesDir);
+
+ // Make the Resources/Java directory
+ mJavaDir = new File(mResourcesDir, "Java");
+
+ if (!mJavaDir.mkdir())
+ throw new BuildException("Unable to create directory " + mJavaDir);
+
+ // Copy icon file to resource dir. If no icon parameter
+ // is supplied, the default icon will be used.
+
+ if (mAppIcon != null) {
+
+
+ try {
+ File dest = new File(mResourcesDir, mAppIcon.getName());
+
+ if(mVerbose)
+ log("Copying application icon file to \"" + bundlePath(dest) + "\"");
+
+ mFileUtils.copyFile(mAppIcon, dest);
+ } catch (IOException ex) {
+ throw new BuildException("Cannot copy icon file: " + ex);
+ }
+ }
+
+ // Copy document type icons, if any, to the resource dir
+ try {
+ Iterator itor = bundleProperties.getDocumentTypes().iterator();
+
+ while (itor.hasNext()) {
+ DocumentType documentType = (DocumentType) itor.next();
+ File iconFile = documentType.getIconFile();
+ if (iconFile != null) {
+ File dest = new File(mResourcesDir, iconFile.getName());
+ if(mVerbose)
+ log("Copying document icon file to \"" + bundlePath(dest) + "\"");
+ mFileUtils.copyFile(iconFile, dest);
+ }
+ }
+ } catch (IOException ex) {
+ throw new BuildException("Cannot copy document icon file: " + ex);
+ }
+
+ // Copy application jar(s) from the "jars" attribute (if any)
+ processJarAttrs();
+
+ // Copy application jar(s) from the nested jarfileset element(s)
+ processJarFileSets();
+
+ // Copy application jar(s) from the nested jarfilelist element(s)
+ processJarFileLists();
+
+ // Copy executable(s) from the "execs" attribute (if any)
+ processExecAttrs();
+
+ // Copy executable(s) from the nested execfileset element(s)
+ processExecFileSets();
+
+ // Copy executable(s) from the nested execfilelist element(s)
+ processExecFileLists();
+
+ // Copy resource(s) from the nested resourcefileset element(s)
+ processResourceFileSets();
+
+ // Copy resource(s) from the nested javafileset element(s)
+ processJavaFileSets();
+
+ // Copy resource(s) from the nested resourcefilelist element(s)
+ processResourceFileLists();
+
+ // Copy resource(s) from the nested javafilelist element(s)
+ processJavaFileLists();
+
+ // Add external classpath references from the extraclasspath attributes
+ processExtraClassPathAttrs();
+
+ // Add external classpath references from the nested
+ // extraclasspathfileset element(s)
+ processExtraClassPathFileSets();
+
+ // Add external classpath references from the nested
+ // extraclasspathfilelist attributes
+ processExtraClassPathFileLists();
+
+ // Copy HelpBooks into place
+ copyHelpBooks();
+
+ // Copy the JavaApplicationStub file from the Java system directory to
+ // the MacOS directory
+ copyApplicationStub();
+
+ // Create the Info.plist file
+ writeInfoPlist();
+
+ // Create the PkgInfo file
+ writePkgInfo();
+
+ // Done!
+ }
+
+ /***************************************************************************
+ * Private utility methods.
+ **************************************************************************/
+
+ private void setExecutable(File f) {
+
+ Chmod chmodTask = new Chmod();
+ chmodTask.setProject(getProject());
+ chmodTask.setFile(f);
+ chmodTask.setPerm("ugo+rx");
+
+ if (mVerbose)
+ log("Setting \"" + bundlePath(f) + "\" to executable");
+
+ chmodTask.execute();
+
+ }
+
+ /**
+ * Utility method to determine whether this app bundle is targeting a 1.3 or
+ * 1.4 VM. The Mac OS X 1.3 VM uses different Java property names from the
+ * 1.4 VM to hint at native Mac OS X look and feel options. For example, on
+ * 1.3 the Java property to tell the VM to display Swing menu bars as screen
+ * menus is "com.apple.macos.useScreenMenuBar". Under 1.4, it becomes
+ * "apple.laf.useScreenMenuBar". Such is the price of progress, I suppose.
+ *
+ * Obviously, this logic may need refactoring in the future.
+ */
+
+ private boolean useOldPropertyNames() {
+ return (bundleProperties.getJVMVersion().startsWith("1.3"));
+ }
+
+ private void processJarAttrs() throws BuildException {
+
+ try {
+
+ for (Iterator jarIter = mJarAttrs.iterator(); jarIter.hasNext();) {
+ File src = (File) jarIter.next();
+ File dest = new File(mJavaDir, src.getName());
+
+ if (mVerbose)
+ log("Copying JAR file to \"" + bundlePath(dest) + "\"");
+
+
+ mFileUtils.copyFile(src, dest);
+ bundleProperties.addToClassPath(dest.getName());
+ }
+ } catch (IOException ex) {
+ throw new BuildException("Cannot copy jar file: " + ex);
+ }
+ }
+
+ private void processJarFileSets() throws BuildException {
+
+ for (Iterator jarIter = mJarFileSets.iterator(); jarIter.hasNext();) {
+
+ FileSet fs = (FileSet) jarIter.next();
+
+ Project p = fs.getProject();
+ File srcDir = fs.getDir(p);
+ FileScanner ds = fs.getDirectoryScanner(p);
+ fs.setupDirectoryScanner(ds, p);
+ ds.scan();
+
+ String[] files = ds.getIncludedFiles();
+
+ try {
+
+ for (int i = 0; i < files.length; i++) {
+ String fileName = files[i];
+ File src = new File(srcDir, fileName);
+ File dest = new File(mJavaDir, fileName);
+
+ if (mVerbose)
+ log("Copying JAR file to \"" + bundlePath(dest) + "\"");
+
+ mFileUtils.copyFile(src, dest);
+ bundleProperties.addToClassPath(fileName);
+ }
+
+ } catch (IOException ex) {
+ throw new BuildException("Cannot copy jar file: " + ex);
+ }
+ }
+ }
+
+ private void processJarFileLists() throws BuildException {
+
+ for (Iterator jarIter = mJarFileLists.iterator(); jarIter.hasNext();) {
+ FileList fl = (FileList) jarIter.next();
+ Project p = fl.getProject();
+ File srcDir = fl.getDir(p);
+ String[] files = fl.getFiles(p);
+
+ try {
+
+ for (int i = 0; i < files.length; i++) {
+ String fileName = files[i];
+ File src = new File(srcDir, fileName);
+ File dest = new File(mJavaDir, fileName);
+
+ if (mVerbose)
+ log("Copying JAR file to \"" + bundlePath(dest) + "\"");
+
+
+ mFileUtils.copyFile(src, dest);
+ bundleProperties.addToClassPath(fileName);
+ }
+ } catch (IOException ex) {
+ throw new BuildException("Cannot copy jar file: " + ex);
+ }
+ }
+ }
+
+ private void processExtraClassPathAttrs() throws BuildException {
+
+ for (Iterator jarIter = mExtraClassPathAttrs.iterator(); jarIter
+ .hasNext();) {
+ File src = (File) jarIter.next();
+ bundleProperties.addToExtraClassPath(src.getPath());
+ }
+ }
+
+ private void processExtraClassPathFileSets() throws BuildException {
+
+ for (Iterator jarIter = mExtraClassPathFileSets.iterator(); jarIter
+ .hasNext();) {
+ FileSet fs = (FileSet) jarIter.next();
+ Project p = fs.getProject();
+ File srcDir = fs.getDir(p);
+ FileScanner ds = fs.getDirectoryScanner(p);
+ fs.setupDirectoryScanner(ds, p);
+ ds.scan();
+
+ String[] files = ds.getIncludedFiles();
+
+ for (int i = 0; i < files.length; i++) {
+ File f = new File(srcDir, files[i]);
+ bundleProperties.addToExtraClassPath(f.getPath());
+ }
+ }
+ }
+
+ private void processExtraClassPathFileLists() throws BuildException {
+
+ for (Iterator jarIter = mExtraClassPathFileLists.iterator(); jarIter
+ .hasNext();) {
+ FileList fl = (FileList) jarIter.next();
+ Project p = fl.getProject();
+ File srcDir = fl.getDir(p);
+ String[] files = fl.getFiles(p);
+
+ for (int i = 0; i < files.length; i++) {
+ File f = new File(srcDir, files[i]);
+ bundleProperties.addToExtraClassPath(f.getPath());
+ }
+ }
+ }
+
+ private void processExecAttrs() throws BuildException {
+
+ try {
+
+ for (Iterator execIter = mExecAttrs.iterator(); execIter.hasNext();) {
+ File src = (File) execIter.next();
+ File dest = new File(mMacOsDir, src.getName());
+
+ if (mVerbose)
+ log("Copying exec file to \"" + bundlePath(dest) + "\"");
+
+
+ mFileUtils.copyFile(src, dest);
+ setExecutable(dest);
+ }
+ } catch (IOException ex) {
+ throw new BuildException("Cannot copy exec file: " + ex);
+ }
+ }
+
+ // Methods for copying FileSets into the application bundle ///////////////////////////////
+
+ // Files for the Contents/MacOS directory
+ private void processExecFileSets() {
+ processCopyingFileSets(mExecFileSets, mMacOsDir, true);
+ }
+
+ // Files for the Contents/Resources directory
+ private void processResourceFileSets() {
+ processCopyingFileSets(mResourceFileSets, mResourcesDir, false);
+ }
+
+ // Files for the Contents/Resources/Java directory
+ private void processJavaFileSets() {
+ processCopyingFileSets(mJavaFileSets, mJavaDir, false);
+ }
+
+ private void processCopyingFileSets(List fileSets, File targetdir, boolean setExec) {
+
+ for (Iterator execIter = fileSets.iterator(); execIter.hasNext();) {
+ FileSet fs = (FileSet) execIter.next();
+ Project p = fs.getProject();
+ File srcDir = fs.getDir(p);
+ FileScanner ds = fs.getDirectoryScanner(p);
+ fs.setupDirectoryScanner(ds, p);
+ ds.scan();
+
+ String[] files = ds.getIncludedFiles();
+
+ if (files.length == 0) {
+ // this is probably an error -- warn about it
+ System.err
+ .println("WARNING: fileset for copying from directory "
+ + srcDir + ": no files found");
+ } else {
+ try {
+ for (int i = 0; i < files.length; i++) {
+ String fileName = files[i];
+ File src = new File(srcDir, fileName);
+ File dest = new File(targetdir, fileName);
+
+ if (mVerbose)
+ log("Copying "
+ + (setExec ? "exec" : "resource")
+ + " file to \"" + bundlePath(dest) +"\"");
+
+ mFileUtils.copyFile(src, dest);
+ if (setExec)
+ setExecutable(dest);
+ }
+ } catch (IOException ex) {
+ throw new BuildException("Cannot copy file: " + ex);
+ }
+ }
+ }
+ }
+
+ // Methods for copying FileLists into the application bundle /////////////////////////////
+
+ // Files for the Contents/MacOS directory
+ private void processExecFileLists() throws BuildException {
+ processCopyingFileLists(mExecFileLists, mMacOsDir, true);
+ }
+
+ // Files for the Contents/Resources directory
+ private void processResourceFileLists() throws BuildException {
+ processCopyingFileLists(mResourceFileLists, mResourcesDir, false);
+ }
+
+ // Files for the Contents/Resources/Java directory
+ private void processJavaFileLists() throws BuildException {
+ processCopyingFileLists(mJavaFileLists, mJavaDir, false);
+ }
+
+ private void processCopyingFileLists(List fileLists, File targetDir, boolean setExec) throws BuildException {
+
+ for (Iterator execIter = fileLists.iterator(); execIter.hasNext();) {
+
+ FileList fl = (FileList) execIter.next();
+ Project p = fl.getProject();
+ File srcDir = fl.getDir(p);
+ String[] files = fl.getFiles(p);
+
+ if (files.length == 0) {
+ // this is probably an error -- warn about it
+ System.err.println("WARNING: filelist for copying from directory "
+ + srcDir + ": no files found");
+ } else {
+ try {
+ for (int i = 0; i < files.length; i++) {
+ String fileName = files[i];
+ File src = new File(srcDir, fileName);
+ File dest = new File(targetDir, fileName);
+
+ if (mVerbose)
+ log("Copying "
+ + (setExec ? "exec" : "resource")
+ + " file to \"" + bundlePath(dest) +"\"");
+
+ mFileUtils.copyFile(src, dest);
+ if (setExec)
+ setExecutable(dest);
+ }
+ } catch (IOException ex) {
+ throw new BuildException("Cannot copy jar file: " + ex);
+ }
+ }
+ }
+ }
+
+
+
+ private void copyHelpBooks() {
+
+ for (Iterator itor = mHelpBooks.iterator(); itor.hasNext();) {
+
+ HelpBook helpBook = (HelpBook)itor.next();
+
+ String folderName = helpBook.getFolderName();
+ String name = helpBook.getName();
+ String locale = helpBook.getLocale();
+
+ List fileLists = helpBook.getFileLists();
+ List fileSets = helpBook.getFileSets();
+
+
+ File helpBookDir = null;
+
+ if (locale == null) {
+
+ // Set the Bundle entries for a nonlocalized Help Book
+ if (folderName != null)
+ bundleProperties.setCFBundleHelpBookFolder(folderName);
+
+ if (name != null)
+ bundleProperties.setCFBundleHelpBookName(name);
+
+ // The non-localized Help Book is top level "/Resources"
+ helpBookDir = new File(mResourcesDir, folderName);
+ helpBookDir.mkdir();
+
+ if(mVerbose)
+ log("Creating Help Book at \"" +
+ bundlePath(helpBookDir) + "\"");
+
+
+ } else {
+
+ // The localized Help Book is "/Resources/locale.lproj"
+
+ File lproj = new File(mResourcesDir, locale + ".lproj");
+ lproj.mkdir();
+ helpBookDir = new File(lproj, folderName);
+ helpBookDir.mkdir();
+
+ if(mVerbose)
+ log("Creating Help Book for \"" + locale +
+ "\" at \"" + bundlePath(helpBookDir) + "\"");
+
+ // Create a local file to override the Bundle settings
+ File infoPList = new File(lproj, "InfoPlist.strings");
+ PrintWriter writer = null;
+ try {
+ writer = new PrintWriter(new FileWriter(infoPList));
+ writer.println("CFBundleHelpBookFolder = \"" + folderName + "\";");
+ writer.println("CFBundleHelpBookName = \"" + name + "\";");
+ writer.println("CFBundleName = \"" + bundleProperties.getCFBundleName() + "\";");
+ } catch (IOException ioe) {
+ throw new BuildException("IOException in writing Help Book locale: " + locale);
+ } finally {
+ mFileUtils.close(writer);
+ }
+ }
+
+ // Write the Help Book source files into the bundle
+
+ processCopyingFileSets(fileSets, helpBookDir, false);
+ processCopyingFileLists(fileLists, helpBookDir, false);
+
+ }
+ }
+
+
+
+
+ // Copy the application stub into the bundle
+ // /////////////////////////////////////////////
+
+ private void copyApplicationStub() throws BuildException {
+
+ File newStubFile = new File(mMacOsDir, bundleProperties.getCFBundleExecutable());
+
+ if (mVerbose)
+ log("Copying Java application stub to \"" + bundlePath(newStubFile) + "\"");
+
+ try {
+ mFileUtils.copyFile(mStubFile, newStubFile);
+ } catch (IOException ex) {
+ throw new BuildException("Cannot copy Java Application Stub: " + ex);
+ }
+
+ // Set the permissions on the stub file to executable
+
+ setExecutable(newStubFile);
+ }
+
+ private void writeInfoPlist() throws BuildException {
+ PropertyListWriter listWriter = new PropertyListWriter(bundleProperties);
+ File infoPlist = new File(mContentsDir, "Info.plist");
+
+ listWriter.writeFile(infoPlist);
+
+ if (mVerbose)
+ log("Creating \"" + bundlePath(infoPlist) + "\" file");
+
+
+ if (mShowPlist) {
+ try {
+ BufferedReader in = new BufferedReader(new FileReader(infoPlist));
+ String str;
+ while ((str = in.readLine()) != null)
+ log(str);
+ in.close();
+ } catch (IOException e) {
+ throw new BuildException(e);
+ }
+ }
+ }
+
+
+ //
+ // Write the PkgInfo file into the application bundle
+ //
+
+ private void writePkgInfo() throws BuildException {
+ File pkgInfo = new File(mContentsDir, "PkgInfo");
+ PrintWriter writer = null;
+
+ try {
+ writer = new PrintWriter(new BufferedWriter(new FileWriter(pkgInfo)));
+ writer.print(bundleProperties.getCFBundlePackageType());
+ writer.println(bundleProperties.getCFBundleSignature());
+ writer.flush();
+ } catch (IOException ex) {
+ throw new BuildException("Cannot create PkgInfo file: " + ex);
+ } finally {
+ mFileUtils.close(writer);
+ }
+ }
+
+ private String bundlePath(File bundleFile) {
+
+ String rootPath = bundleDir.getAbsolutePath();
+ String thisPath = bundleFile.getAbsolutePath();
+
+ return thisPath.substring(rootPath.length());
+
+ }
+}
diff --git a/jEdit/net/sourceforge/jarbundler/JavaProperty.java b/jEdit/net/sourceforge/jarbundler/JavaProperty.java
index 6952546..7f8481d 100644
--- a/jEdit/net/sourceforge/jarbundler/JavaProperty.java
+++ b/jEdit/net/sourceforge/jarbundler/JavaProperty.java
@@ -1,64 +1,64 @@
-package net.sourceforge.jarbundler;
-
-public class JavaProperty {
-
- /** The JavaProperties' name and value */
-
- private String name = null;
- private String value = null;
-
- /**
- * Construct an empty JavaProperty
- */
-
- public JavaProperty() {
- }
-
- /**
- * Set the JavaProperties's name; required
- *
- * @param name
- * the JavaProperties' name
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Get the JavaProperties' name
- *
- * @return the JavaProperties' name.
- */
- public String getName() {
-
- if (this.name == null)
- return null;
-
- return this.name.trim();
- }
-
- /**
- * Set the JavaProperties' value; required
- *
- * @param value
- * the JavaProperties' value
- */
-
- public void setValue(String value) {
- this.value = value;
- }
-
- /**
- * Get the JavaProperties' value.
- *
- * @return the JavaProperties' value.
- */
- public String getValue() {
-
- if (this.value == null)
- return null;
-
- return this.value.trim();
- }
-
-}
+package net.sourceforge.jarbundler;
+
+public class JavaProperty {
+
+ /** The JavaProperties' name and value */
+
+ private String name = null;
+ private String value = null;
+
+ /**
+ * Construct an empty JavaProperty
+ */
+
+ public JavaProperty() {
+ }
+
+ /**
+ * Set the JavaProperties's name; required
+ *
+ * @param name
+ * the JavaProperties' name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Get the JavaProperties' name
+ *
+ * @return the JavaProperties' name.
+ */
+ public String getName() {
+
+ if (this.name == null)
+ return null;
+
+ return this.name.trim();
+ }
+
+ /**
+ * Set the JavaProperties' value; required
+ *
+ * @param value
+ * the JavaProperties' value
+ */
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the JavaProperties' value.
+ *
+ * @return the JavaProperties' value.
+ */
+ public String getValue() {
+
+ if (this.value == null)
+ return null;
+
+ return this.value.trim();
+ }
+
+}
diff --git a/jEdit/net/sourceforge/jarbundler/PropertyListWriter.java b/jEdit/net/sourceforge/jarbundler/PropertyListWriter.java
index 184065c..4019211 100644
--- a/jEdit/net/sourceforge/jarbundler/PropertyListWriter.java
+++ b/jEdit/net/sourceforge/jarbundler/PropertyListWriter.java
@@ -1,442 +1,442 @@
-/*
- * Write the application bundle file: Info.plist
- *
- * Copyright (c) 2006, William A. Gilbert <gilbert at informagen.com> All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package net.sourceforge.jarbundler;
-
-// This package's imports
-import net.sourceforge.jarbundler.AppBundleProperties;
-
-// Java I/O
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-
-// Java Utility
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-// Java language imports
-import java.lang.Boolean;
-import java.lang.ClassCastException;
-import java.lang.Double;
-import java.lang.String;
-import java.lang.System;
-
-// Apache Ant
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.util.FileUtils;
-
-// Java XML DOM creation
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.ParserConfigurationException;
-
-// W3C DOM
-import org.w3c.dom.Document;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Node;
-import org.w3c.dom.Element;
-import org.w3c.dom.Attr;
-
-
-// Xerces serializer
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.XMLSerializer;
-import org.apache.xml.serialize.LineSeparator;
-
-
-
-/**
- * Write out a Java application bundle property list file. For descriptions of
- * the property list keys, see <a
- * href="http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html"
- * >Apple docs</a>.
- */
-
-
-public class PropertyListWriter {
-
-
- // Our application bundle properties
- private AppBundleProperties bundleProperties;
-
- private double version = 1.3;
-
- // DOM version of Info.plist file
- private Document document = null;
-
-
- private FileUtils fileUtils = FileUtils.getFileUtils();
-
- /**
- * Create a new Property List writer.
- */
- public PropertyListWriter(AppBundleProperties bundleProperties) {
- this.bundleProperties = bundleProperties;
- setJavaVersion(bundleProperties.getJVMVersion());
- }
-
- private void setJavaVersion(String version) {
-
- if (version == null)
- return;
-
- this.version = Double.valueOf(version.substring(0, 3)).doubleValue();
- }
-
-
- public void writeFile(File fileName) throws BuildException {
-
- Writer writer = null;
-
- try {
-
- this.document = createDOM();
- buildDOM();
-
- // Serialize the DOM into the writer
- writer = new BufferedWriter(new OutputStreamWriter(
- new FileOutputStream(fileName), "UTF-8"));
- // Prettify the XML Two space indenting, no line wrapping
- OutputFormat outputFormat = new OutputFormat();
- outputFormat.setMethod("xml");
- outputFormat.setIndenting(true);
- outputFormat.setIndent(2);
- outputFormat.setLineWidth(0);
-
- // Create a DOM serlializer and write the XML
- XMLSerializer serializer = new XMLSerializer(writer, outputFormat);
- serializer.asDOMSerializer();
- serializer.serialize(this.document);
-
- } catch (ParserConfigurationException pce) {
- throw new BuildException(pce);
- } catch (IOException ex) {
- throw new BuildException("Unable to write \"" + fileName + "\"");
- } finally {
- fileUtils.close(writer);
- }
-
-
- }
-
- private Document createDOM() throws ParserConfigurationException {
-
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder documentBuilder = factory.newDocumentBuilder();
- DOMImplementation domImpl = documentBuilder.getDOMImplementation();
-
- // We needed to reference using the full class name here because we already have
- // a class named "DocumentType"
-
- org.w3c.dom.DocumentType doctype = domImpl.createDocumentType(
- "plist",
- "-//Apple Computer//DTD PLIST 1.0//EN",
- "http://www.apple.com/DTDs/PropertyList-1.0.dtd");
-
- return domImpl.createDocument(null, "plist", doctype);
- }
-
-
- private void buildDOM() {
-
- Element plist = this.document.getDocumentElement();
- plist.setAttribute("version","1.0");
-
- // Open the top level dictionary, <dict>
-
- Node dict = createNode("dict", plist);
-
- // Application short name i.e. About menu name
- writeKeyStringPair("CFBundleName", bundleProperties.getCFBundleName(), dict);
-
- // Finder 'Version' label, defaults to "1.0"
- writeKeyStringPair("CFBundleShortVersionString", bundleProperties.getCFBundleShortVersionString(), dict);
-
- // Finder 'Get Info'
- writeKeyStringPair("CFBundleGetInfoString", bundleProperties.getCFBundleGetInfoString(), dict);
-
- // Mac OS X required key, defaults to "false"
- writeKeyStringPair("CFBundleAllowMixedLocalizations",
- (bundleProperties.getCFBundleAllowMixedLocalizations() ? "true" : "false"),
- dict);
-
- // Mac OS X required, defaults to "6.0"
- writeKeyStringPair("CFBundleInfoDictionaryVersion",
- bundleProperties.getCFBundleInfoDictionaryVersion(), dict);
-
- // Bundle Executable name, required, defaults to "JavaApplicationStub"
- writeKeyStringPair("CFBundleExecutable", bundleProperties.getCFBundleExecutable(), dict);
-
- // Bundle Development Region, required, defaults to "English"
- writeKeyStringPair("CFBundleDevelopmentRegion", bundleProperties.getCFBundleDevelopmentRegion(), dict);
-
- // Bundle Package Type, required, defaults tp "APPL"
- writeKeyStringPair("CFBundlePackageType", bundleProperties.getCFBundlePackageType(), dict);
-
- // Bundle Signature, required, defaults tp "????"
- writeKeyStringPair("CFBundleSignature", bundleProperties.getCFBundleSignature(), dict);
-
- // Application build number, optional
- if (bundleProperties.getCFBundleVersion() != null)
- writeKeyStringPair("CFBundleVersion", bundleProperties.getCFBundleVersion(), dict);
-
- // Application Icon file, optional
- if (bundleProperties.getCFBundleIconFile() != null)
- writeKeyStringPair("CFBundleIconFile", bundleProperties.getCFBundleIconFile(), dict);
-
- // Bundle Identifier, optional
- if (bundleProperties.getCFBundleIdentifier() != null)
- writeKeyStringPair("CFBundleIdentifier", bundleProperties.getCFBundleIdentifier(), dict);
-
- // Help Book Folder, optional
- if (bundleProperties.getCFBundleHelpBookFolder() != null)
- writeKeyStringPair("CFBundleHelpBookFolder", bundleProperties.getCFBundleHelpBookFolder(), dict);
-
- // Help Book Name, optional
- if (bundleProperties.getCFBundleHelpBookName() != null)
- writeKeyStringPair("CFBundleHelpBookName", bundleProperties.getCFBundleHelpBookName(), dict);
-
- // Document Types, optional
- List documentTypes = bundleProperties.getDocumentTypes();
-
- if (documentTypes.size() > 0)
- writeDocumentTypes(documentTypes, dict);
-
- // Java entry in the plist dictionary
- writeKey("Java", dict);
- Node javaDict = createNode("dict", dict);
-
- // Main class, required
- writeKeyStringPair("MainClass", bundleProperties.getMainClass(), javaDict);
-
- // Target JVM version, optional but recommended
- if (bundleProperties.getJVMVersion() != null)
- writeKeyStringPair("JVMVersion", bundleProperties.getJVMVersion(), javaDict);
-
-
- // Classpath is composed of two types, required
- // 1: Jars bundled into the JAVA_ROOT of the application
- // 2: External directories or files with an absolute path
-
- List classPath = bundleProperties.getClassPath();
- List extraClassPath = bundleProperties.getExtraClassPath();
-
- if ((classPath.size() > 0) || (extraClassPath.size() > 0))
- writeClasspath(classPath, extraClassPath, javaDict);
-
-
- // JVM options, optional
- if (bundleProperties.getVMOptions() != null)
- writeKeyStringPair("VMOptions", bundleProperties.getVMOptions(), javaDict);
-
- // Working directory, optional
- if (bundleProperties.getWorkingDirectory() != null)
- writeKeyStringPair("WorkingDirectory", bundleProperties.getWorkingDirectory(), javaDict);
-
- // Main class arguments, optional
- if (bundleProperties.getArguments() != null)
- writeKeyStringPair("Arguments", bundleProperties.getArguments(), javaDict);
-
- // Java properties, optional
- Hashtable javaProperties = bundleProperties.getJavaProperties();
-
- if (javaProperties.isEmpty() == false)
- writeJavaProperties(javaProperties, javaDict);
-
-
- // Services, optional
- List services = bundleProperties.getServices();
- if (services.size() > 0)
- writeServices(services,dict);
-
- }
-
-
- private void writeDocumentTypes(List documentTypes, Node appendTo) {
-
- writeKey("CFBundleDocumentTypes", appendTo);
-
- Node array = createNode("array", appendTo);
-
- Iterator itor = documentTypes.iterator();
-
- while (itor.hasNext()) {
-
- DocumentType documentType = (DocumentType) itor.next();
-
- Node documentDict = createNode("dict", array);
-
- writeKeyStringPair("CFBundleTypeName", documentType.getName(), documentDict);
- writeKeyStringPair("CFBundleTypeRole", documentType.getRole(), documentDict);
-
- File iconFile = documentType.getIconFile();
-
- if (iconFile != null)
- writeKeyStringPair("CFBundleTypeIconFile", iconFile.getName(), documentDict);
-
-
- List extensions = documentType.getExtensions();
-
- if (extensions.isEmpty() == false) {
- writeKey("CFBundleTypeExtensions", documentDict);
- writeArray(extensions, documentDict);
- }
-
- List osTypes = documentType.getOSTypes();
-
- if (osTypes.isEmpty() == false) {
- writeKey("CFBundleTypeOSTypes", documentDict);
- writeArray(osTypes, documentDict);
- }
-
-
- List mimeTypes = documentType.getMimeTypes();
-
- if (mimeTypes.isEmpty() == false) {
- writeKey("CFBundleTypeMIMETypes", documentDict);
- writeArray(mimeTypes, documentDict);
- }
-
- // Only write this key if true
- if (documentType.isBundle())
- writeKeyStringPair("LSTypeIsPackage", "true", documentDict);
- }
- }
-
- private void writeServices(List services, Node appendTo) {
-
- writeKey("NSServices",appendTo);
- Node array = createNode("array",appendTo);
- Iterator itor = services.iterator();
-
- while (itor.hasNext()) {
- Service service = (Service)itor.next();
- Node serviceDict = createNode("dict",array);
-
- String portName = service.getPortName();
- if (portName == null)
- portName = bundleProperties.getCFBundleName();
-
- writeKeyStringPair("NSPortName", portName, serviceDict);
- writeKeyStringPair("NSMessage",service.getMessage(),serviceDict);
-
- List sendTypes = service.getSendTypes();
- if (!sendTypes.isEmpty()) {
- writeKey("NSSendTypes",serviceDict);
- writeArray(sendTypes,serviceDict);
- }
-
- List returnTypes = service.getReturnTypes();
- if (!returnTypes.isEmpty()) {
- writeKey("NSReturnTypes",serviceDict);
- writeArray(returnTypes,serviceDict);
- }
-
- writeKey("NSMenuItem",serviceDict);
- Node menuItemDict = createNode("dict",serviceDict);
- writeKeyStringPair("default",service.getMenuItem(),menuItemDict);
-
- String keyEquivalent = service.getKeyEquivalent();
- if (null != keyEquivalent) {
- writeKey("NSKeyEquivalent",serviceDict);
- Node keyEquivalentDict = createNode("dict",serviceDict);
- writeKeyStringPair("default",keyEquivalent,keyEquivalentDict);
- }
-
- String userData = service.getUserData();
- if (null != userData)
- writeKeyStringPair("NSUserData", userData, serviceDict);
-
- String timeout = service.getTimeout();
- if (null != timeout)
- writeKeyStringPair("NSTimeout",timeout,serviceDict);
- }
- }
-
- private void writeClasspath(List classpath, List extraClasspath, Node appendTo) {
- writeKey("ClassPath", appendTo);
- classpath.addAll(extraClasspath);
- writeArray(classpath, appendTo);
- }
-
-
- private void writeJavaProperties(Hashtable javaProperties, Node appendTo) {
-
- writeKey("Properties", appendTo);
-
- Node propertiesDict = createNode("dict", appendTo);
-
- for (Iterator i = javaProperties.keySet().iterator(); i.hasNext();) {
- String key = (String) i.next();
-
- if (key.startsWith("com.apple.") && (version >= 1.4)) {
- System.out.println("Deprecated as of 1.4: " + key);
- continue;
- }
-
- writeKeyStringPair(key, (String)javaProperties.get(key), propertiesDict);
- }
- }
-
- private Node createNode(String tag, Node appendTo) {
- Node node = this.document.createElement(tag);
- appendTo.appendChild(node);
- return node;
- }
-
-
- private void writeKeyStringPair(String key, String string, Node appendTo) {
-
- if (string == null)
- return;
-
- writeKey(key, appendTo);
- writeString(string, appendTo);
- }
-
-
- private void writeKey(String key, Node appendTo) {
- Element keyNode = this.document.createElement("key");
- appendTo.appendChild(keyNode);
- keyNode.appendChild(this.document.createTextNode(key));
- }
-
-
- private void writeString(String string, Node appendTo) {
- Element stringNode = this.document.createElement("string");
- stringNode.appendChild(this.document.createTextNode(string));
- appendTo.appendChild(stringNode);
- }
-
- private void writeArray(List stringList, Node appendTo) {
-
- Node arrayNode = createNode("array", appendTo);
-
- for (Iterator it = stringList.iterator(); it.hasNext();)
- writeString((String)it.next(), arrayNode);
-
- }
-
-}
+/*
+ * Write the application bundle file: Info.plist
+ *
+ * Copyright (c) 2006, William A. Gilbert <gilbert at informagen.com> All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package net.sourceforge.jarbundler;
+
+// This package's imports
+import net.sourceforge.jarbundler.AppBundleProperties;
+
+// Java I/O
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+
+// Java Utility
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+
+// Java language imports
+import java.lang.Boolean;
+import java.lang.ClassCastException;
+import java.lang.Double;
+import java.lang.String;
+import java.lang.System;
+
+// Apache Ant
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.util.FileUtils;
+
+// Java XML DOM creation
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+
+// W3C DOM
+import org.w3c.dom.Document;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Node;
+import org.w3c.dom.Element;
+import org.w3c.dom.Attr;
+
+
+// Xerces serializer
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.apache.xml.serialize.LineSeparator;
+
+
+
+/**
+ * Write out a Java application bundle property list file. For descriptions of
+ * the property list keys, see <a
+ * href="http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html"
+ * >Apple docs</a>.
+ */
+
+
+public class PropertyListWriter {
+
+
+ // Our application bundle properties
+ private AppBundleProperties bundleProperties;
+
+ private double version = 1.3;
+
+ // DOM version of Info.plist file
+ private Document document = null;
+
+
+ private FileUtils fileUtils = FileUtils.getFileUtils();
+
+ /**
+ * Create a new Property List writer.
+ */
+ public PropertyListWriter(AppBundleProperties bundleProperties) {
+ this.bundleProperties = bundleProperties;
+ setJavaVersion(bundleProperties.getJVMVersion());
+ }
+
+ private void setJavaVersion(String version) {
+
+ if (version == null)
+ return;
+
+ this.version = Double.valueOf(version.substring(0, 3)).doubleValue();
+ }
+
+
+ public void writeFile(File fileName) throws BuildException {
+
+ Writer writer = null;
+
+ try {
+
+ this.document = createDOM();
+ buildDOM();
+
+ // Serialize the DOM into the writer
+ writer = new BufferedWriter(new OutputStreamWriter(
+ new FileOutputStream(fileName), "UTF-8"));
+ // Prettify the XML Two space indenting, no line wrapping
+ OutputFormat outputFormat = new OutputFormat();
+ outputFormat.setMethod("xml");
+ outputFormat.setIndenting(true);
+ outputFormat.setIndent(2);
+ outputFormat.setLineWidth(0);
+
+ // Create a DOM serlializer and write the XML
+ XMLSerializer serializer = new XMLSerializer(writer, outputFormat);
+ serializer.asDOMSerializer();
+ serializer.serialize(this.document);
+
+ } catch (ParserConfigurationException pce) {
+ throw new BuildException(pce);
+ } catch (IOException ex) {
+ throw new BuildException("Unable to write \"" + fileName + "\"");
+ } finally {
+ fileUtils.close(writer);
+ }
+
+
+ }
+
+ private Document createDOM() throws ParserConfigurationException {
+
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder documentBuilder = factory.newDocumentBuilder();
+ DOMImplementation domImpl = documentBuilder.getDOMImplementation();
+
+ // We needed to reference using the full class name here because we already have
+ // a class named "DocumentType"
+
+ org.w3c.dom.DocumentType doctype = domImpl.createDocumentType(
+ "plist",
+ "-//Apple Computer//DTD PLIST 1.0//EN",
+ "http://www.apple.com/DTDs/PropertyList-1.0.dtd");
+
+ return domImpl.createDocument(null, "plist", doctype);
+ }
+
+
+ private void buildDOM() {
+
+ Element plist = this.document.getDocumentElement();
+ plist.setAttribute("version","1.0");
+
+ // Open the top level dictionary, <dict>
+
+ Node dict = createNode("dict", plist);
+
+ // Application short name i.e. About menu name
+ writeKeyStringPair("CFBundleName", bundleProperties.getCFBundleName(), dict);
+
+ // Finder 'Version' label, defaults to "1.0"
+ writeKeyStringPair("CFBundleShortVersionString", bundleProperties.getCFBundleShortVersionString(), dict);
+
+ // Finder 'Get Info'
+ writeKeyStringPair("CFBundleGetInfoString", bundleProperties.getCFBundleGetInfoString(), dict);
+
+ // Mac OS X required key, defaults to "false"
+ writeKeyStringPair("CFBundleAllowMixedLocalizations",
+ (bundleProperties.getCFBundleAllowMixedLocalizations() ? "true" : "false"),
+ dict);
+
+ // Mac OS X required, defaults to "6.0"
+ writeKeyStringPair("CFBundleInfoDictionaryVersion",
+ bundleProperties.getCFBundleInfoDictionaryVersion(), dict);
+
+ // Bundle Executable name, required, defaults to "JavaApplicationStub"
+ writeKeyStringPair("CFBundleExecutable", bundleProperties.getCFBundleExecutable(), dict);
+
+ // Bundle Development Region, required, defaults to "English"
+ writeKeyStringPair("CFBundleDevelopmentRegion", bundleProperties.getCFBundleDevelopmentRegion(), dict);
+
+ // Bundle Package Type, required, defaults tp "APPL"
+ writeKeyStringPair("CFBundlePackageType", bundleProperties.getCFBundlePackageType(), dict);
+
+ // Bundle Signature, required, defaults tp "????"
+ writeKeyStringPair("CFBundleSignature", bundleProperties.getCFBundleSignature(), dict);
+
+ // Application build number, optional
+ if (bundleProperties.getCFBundleVersion() != null)
+ writeKeyStringPair("CFBundleVersion", bundleProperties.getCFBundleVersion(), dict);
+
+ // Application Icon file, optional
+ if (bundleProperties.getCFBundleIconFile() != null)
+ writeKeyStringPair("CFBundleIconFile", bundleProperties.getCFBundleIconFile(), dict);
+
+ // Bundle Identifier, optional
+ if (bundleProperties.getCFBundleIdentifier() != null)
+ writeKeyStringPair("CFBundleIdentifier", bundleProperties.getCFBundleIdentifier(), dict);
+
+ // Help Book Folder, optional
+ if (bundleProperties.getCFBundleHelpBookFolder() != null)
+ writeKeyStringPair("CFBundleHelpBookFolder", bundleProperties.getCFBundleHelpBookFolder(), dict);
+
+ // Help Book Name, optional
+ if (bundleProperties.getCFBundleHelpBookName() != null)
+ writeKeyStringPair("CFBundleHelpBookName", bundleProperties.getCFBundleHelpBookName(), dict);
+
+ // Document Types, optional
+ List documentTypes = bundleProperties.getDocumentTypes();
+
+ if (documentTypes.size() > 0)
+ writeDocumentTypes(documentTypes, dict);
+
+ // Java entry in the plist dictionary
+ writeKey("Java", dict);
+ Node javaDict = createNode("dict", dict);
+
+ // Main class, required
+ writeKeyStringPair("MainClass", bundleProperties.getMainClass(), javaDict);
+
+ // Target JVM version, optional but recommended
+ if (bundleProperties.getJVMVersion() != null)
+ writeKeyStringPair("JVMVersion", bundleProperties.getJVMVersion(), javaDict);
+
+
+ // Classpath is composed of two types, required
+ // 1: Jars bundled into the JAVA_ROOT of the application
+ // 2: External directories or files with an absolute path
+
+ List classPath = bundleProperties.getClassPath();
+ List extraClassPath = bundleProperties.getExtraClassPath();
+
+ if ((classPath.size() > 0) || (extraClassPath.size() > 0))
+ writeClasspath(classPath, extraClassPath, javaDict);
+
+
+ // JVM options, optional
+ if (bundleProperties.getVMOptions() != null)
+ writeKeyStringPair("VMOptions", bundleProperties.getVMOptions(), javaDict);
+
+ // Working directory, optional
+ if (bundleProperties.getWorkingDirectory() != null)
+ writeKeyStringPair("WorkingDirectory", bundleProperties.getWorkingDirectory(), javaDict);
+
+ // Main class arguments, optional
+ if (bundleProperties.getArguments() != null)
+ writeKeyStringPair("Arguments", bundleProperties.getArguments(), javaDict);
+
+ // Java properties, optional
+ Hashtable javaProperties = bundleProperties.getJavaProperties();
+
+ if (javaProperties.isEmpty() == false)
+ writeJavaProperties(javaProperties, javaDict);
+
+
+ // Services, optional
+ List services = bundleProperties.getServices();
+ if (services.size() > 0)
+ writeServices(services,dict);
+
+ }
+
+
+ private void writeDocumentTypes(List documentTypes, Node appendTo) {
+
+ writeKey("CFBundleDocumentTypes", appendTo);
+
+ Node array = createNode("array", appendTo);
+
+ Iterator itor = documentTypes.iterator();
+
+ while (itor.hasNext()) {
+
+ DocumentType documentType = (DocumentType) itor.next();
+
+ Node documentDict = createNode("dict", array);
+
+ writeKeyStringPair("CFBundleTypeName", documentType.getName(), documentDict);
+ writeKeyStringPair("CFBundleTypeRole", documentType.getRole(), documentDict);
+
+ File iconFile = documentType.getIconFile();
+
+ if (iconFile != null)
+ writeKeyStringPair("CFBundleTypeIconFile", iconFile.getName(), documentDict);
+
+
+ List extensions = documentType.getExtensions();
+
+ if (extensions.isEmpty() == false) {
+ writeKey("CFBundleTypeExtensions", documentDict);
+ writeArray(extensions, documentDict);
+ }
+
+ List osTypes = documentType.getOSTypes();
+
+ if (osTypes.isEmpty() == false) {
+ writeKey("CFBundleTypeOSTypes", documentDict);
+ writeArray(osTypes, documentDict);
+ }
+
+
+ List mimeTypes = documentType.getMimeTypes();
+
+ if (mimeTypes.isEmpty() == false) {
+ writeKey("CFBundleTypeMIMETypes", documentDict);
+ writeArray(mimeTypes, documentDict);
+ }
+
+ // Only write this key if true
+ if (documentType.isBundle())
+ writeKeyStringPair("LSTypeIsPackage", "true", documentDict);
+ }
+ }
+
+ private void writeServices(List services, Node appendTo) {
+
+ writeKey("NSServices",appendTo);
+ Node array = createNode("array",appendTo);
+ Iterator itor = services.iterator();
+
+ while (itor.hasNext()) {
+ Service service = (Service)itor.next();
+ Node serviceDict = createNode("dict",array);
+
+ String portName = service.getPortName();
+ if (portName == null)
+ portName = bundleProperties.getCFBundleName();
+
+ writeKeyStringPair("NSPortName", portName, serviceDict);
+ writeKeyStringPair("NSMessage",service.getMessage(),serviceDict);
+
+ List sendTypes = service.getSendTypes();
+ if (!sendTypes.isEmpty()) {
+ writeKey("NSSendTypes",serviceDict);
+ writeArray(sendTypes,serviceDict);
+ }
+
+ List returnTypes = service.getReturnTypes();
+ if (!returnTypes.isEmpty()) {
+ writeKey("NSReturnTypes",serviceDict);
+ writeArray(returnTypes,serviceDict);
+ }
+
+ writeKey("NSMenuItem",serviceDict);
+ Node menuItemDict = createNode("dict",serviceDict);
+ writeKeyStringPair("default",service.getMenuItem(),menuItemDict);
+
+ String keyEquivalent = service.getKeyEquivalent();
+ if (null != keyEquivalent) {
+ writeKey("NSKeyEquivalent",serviceDict);
+ Node keyEquivalentDict = createNode("dict",serviceDict);
+ writeKeyStringPair("default",keyEquivalent,keyEquivalentDict);
+ }
+
+ String userData = service.getUserData();
+ if (null != userData)
+ writeKeyStringPair("NSUserData", userData, serviceDict);
+
+ String timeout = service.getTimeout();
+ if (null != timeout)
+ writeKeyStringPair("NSTimeout",timeout,serviceDict);
+ }
+ }
+
+ private void writeClasspath(List classpath, List extraClasspath, Node appendTo) {
+ writeKey("ClassPath", appendTo);
+ classpath.addAll(extraClasspath);
+ writeArray(classpath, appendTo);
+ }
+
+
+ private void writeJavaProperties(Hashtable javaProperties, Node appendTo) {
+
+ writeKey("Properties", appendTo);
+
+ Node propertiesDict = createNode("dict", appendTo);
+
+ for (Iterator i = javaProperties.keySet().iterator(); i.hasNext();) {
+ String key = (String) i.next();
+
+ if (key.startsWith("com.apple.") && (version >= 1.4)) {
+ System.out.println("Deprecated as of 1.4: " + key);
+ continue;
+ }
+
+ writeKeyStringPair(key, (String)javaProperties.get(key), propertiesDict);
+ }
+ }
+
+ private Node createNode(String tag, Node appendTo) {
+ Node node = this.document.createElement(tag);
+ appendTo.appendChild(node);
+ return node;
+ }
+
+
+ private void writeKeyStringPair(String key, String string, Node appendTo) {
+
+ if (string == null)
+ return;
+
+ writeKey(key, appendTo);
+ writeString(string, appendTo);
+ }
+
+
+ private void writeKey(String key, Node appendTo) {
+ Element keyNode = this.document.createElement("key");
+ appendTo.appendChild(keyNode);
+ keyNode.appendChild(this.document.createTextNode(key));
+ }
+
+
+ private void writeString(String string, Node appendTo) {
+ Element stringNode = this.document.createElement("string");
+ stringNode.appendChild(this.document.createTextNode(string));
+ appendTo.appendChild(stringNode);
+ }
+
+ private void writeArray(List stringList, Node appendTo) {
+
+ Node arrayNode = createNode("array", appendTo);
+
+ for (Iterator it = stringList.iterator(); it.hasNext();)
+ writeString((String)it.next(), arrayNode);
+
+ }
+
+}
diff --git a/jEdit/net/sourceforge/jarbundler/Service.java b/jEdit/net/sourceforge/jarbundler/Service.java
index 63d38ef..531eb65 100644
--- a/jEdit/net/sourceforge/jarbundler/Service.java
+++ b/jEdit/net/sourceforge/jarbundler/Service.java
@@ -1,204 +1,204 @@
-package net.sourceforge.jarbundler;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-
-
-/**
- * Represents an Info.plist Service specifying a service provided by the application.
- *
- * Port Name - The name of the port the application monitors for incoming service requests.
- *
-
- * Message - The name of the instance method to invoke for the service.
- * In Objective-C, the instance method must be of the form messageName:userData:error:.
- * In Java, the instance method must be of the form messageName(NSPasteBoard,String).
- *
- *
- * Menu Item - The text to add to the Services menu. The value must be unique.
- * You can use a slash character "/" to specify a submenu. For example, Mail/Send
- * would appear in the Services Menu as a menu named Mail with an item named Send.
- *
- *
- * Send Types - A list of the data type names that can be read by the service.
- * The NSPasteboard class description lists several common data types.
- *
- *
- * Return Types - A list of the data type names that can be returned by the service.
- * The NSPasteboard class description lists several common data types.
- * You must specify either Return Types, Send Types or both.
- *
- * You must specify either Send Types, Return Types or both.
- *
- *
- * Key Equivalent - This attribute is optional. The keyboard equivalent used to invoke
- * the service menu command. The value has to be a single character. Users invoke this
- * keyboard equivalent by pressing the Command and Shift key modifiers along with the character.
- *
- *
- * User Data - This attribute is optional. The value is free choosable and is passed
- * to the method as second parameter.
- *
- *
- * Timeout - This attribute is optional. It indicates the number of milliseconds
- * Services should wait for a response from the application providing
- * a service when a respond is required.
- *
- *
- * <service portname="jarBundler"
- * message="processRequest"
- * menuitem="JarBundler/Process Request"
- * sendtypes="NSStringPboardType,NSFilenamesPboardType"
- * returntypes="NSStringPboardType"
- * keyequivalent="p"
- * userdata="a string passed to the method"
- * timeout="5000" />
- */
-public class Service {
- private static final List EMPTYLIST = new ArrayList(0);
-
-
- /** The name of the port the application monitors for incoming service requests. */
- private String portName = null;
-
-
- /**
-
- * The name of the instance method to invoke for the service.
- * In Objective-C, the instance method must be of the form messageName:userData:error:.
-
- * In Java, the instance method must be of the form messageName(NSPasteBoard,String).
- */
- private String message = null;
-
-
- /**
-
- * The text to add to the Services menu. The value must be unique.
-
- * You can use a slash character "/" to specify a submenu. For example, Mail/Send
-
- * would appear in the Services Menu as a menu named Mail with an item named Send.
- */
- private String menuItem = null;
-
- /**
- * A list of the data type names that can be read by the service.
-
- * The NSPasteboard class description lists several common data types.
-
- * You must specify either Send Types, Return Types or both.
- */
- private String[] sendTypes = null;
-
-
- /**
- * A list of the data type names that can be returned by the service.
-
- * The NSPasteboard class description lists several common data types.
-
- * You must specify either Return Types, Send Types or both.
- */
- private String[] returnTypes = null;
-
-
- /**
- * This attribute is optional. The keyboard equivalent used to invoke
-
- * the service menu command. The value has to be a single character. Users invoke this
-
- * keyboard equivalent by pressing the Command and Shift key modifiers along with the character.
-
- */
- private String keyEquivalent = null;
-
-
- /**
-
- * This attribute is optional. The value is free choosable and is passed
-
- * to the method as second parameter.
-
- */
- private String userData = null;
-
-
- /**
-
- * This attribute is optional. It indicates the number of milliseconds
-
- * Services should wait for a response from the application providing
-
- * a service when a respond is required.
-
- */
- private String timeout = null;
-
-
- public void setPortName(String portName) {
- this.portName = portName;
- }
-
- public String getPortName() {
- return portName;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMenuItem(String menuItem) {
- this.menuItem = menuItem;
-
- }
-
- public String getMenuItem() {
- return menuItem;
- }
-
- public void setSendTypes(String sendTypes) {
- this.sendTypes = sendTypes.split("[\\s,]");
- }
-
- public List getSendTypes() {
- return (sendTypes == null) ? EMPTYLIST : Arrays.asList(sendTypes);
- }
-
- public void setReturnTypes(String returnTypes) {
- this.returnTypes = returnTypes.split("[\\s,]");
- }
-
- public List getReturnTypes() {
- return (returnTypes == null) ? EMPTYLIST : Arrays.asList(returnTypes);
- }
-
- public void setKeyEquivalent(String keyEquivalent) {
- this.keyEquivalent = keyEquivalent;
- }
-
- public String getKeyEquivalent() {
- return keyEquivalent;
- }
-
- public void setUserData(String userData) {
- this.userData = userData;
- }
-
- public String getUserData() {
- return userData;
- }
-
- public void setTimeout(String timeout) {
- this.timeout = timeout;
- }
-
- public String getTimeout() {
- return timeout;
- }
-}
+package net.sourceforge.jarbundler;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+
+
+/**
+ * Represents an Info.plist Service specifying a service provided by the application.
+ *
+ * Port Name - The name of the port the application monitors for incoming service requests.
+ *
+
+ * Message - The name of the instance method to invoke for the service.
+ * In Objective-C, the instance method must be of the form messageName:userData:error:.
+ * In Java, the instance method must be of the form messageName(NSPasteBoard,String).
+ *
+ *
+ * Menu Item - The text to add to the Services menu. The value must be unique.
+ * You can use a slash character "/" to specify a submenu. For example, Mail/Send
+ * would appear in the Services Menu as a menu named Mail with an item named Send.
+ *
+ *
+ * Send Types - A list of the data type names that can be read by the service.
+ * The NSPasteboard class description lists several common data types.
+ *
+ *
+ * Return Types - A list of the data type names that can be returned by the service.
+ * The NSPasteboard class description lists several common data types.
+ * You must specify either Return Types, Send Types or both.
+ *
+ * You must specify either Send Types, Return Types or both.
+ *
+ *
+ * Key Equivalent - This attribute is optional. The keyboard equivalent used to invoke
+ * the service menu command. The value has to be a single character. Users invoke this
+ * keyboard equivalent by pressing the Command and Shift key modifiers along with the character.
+ *
+ *
+ * User Data - This attribute is optional. The value is free choosable and is passed
+ * to the method as second parameter.
+ *
+ *
+ * Timeout - This attribute is optional. It indicates the number of milliseconds
+ * Services should wait for a response from the application providing
+ * a service when a respond is required.
+ *
+ *
+ * <service portname="jarBundler"
+ * message="processRequest"
+ * menuitem="JarBundler/Process Request"
+ * sendtypes="NSStringPboardType,NSFilenamesPboardType"
+ * returntypes="NSStringPboardType"
+ * keyequivalent="p"
+ * userdata="a string passed to the method"
+ * timeout="5000" />
+ */
+public class Service {
+ private static final List EMPTYLIST = new ArrayList(0);
+
+
+ /** The name of the port the application monitors for incoming service requests. */
+ private String portName = null;
+
+
+ /**
+
+ * The name of the instance method to invoke for the service.
+ * In Objective-C, the instance method must be of the form messageName:userData:error:.
+
+ * In Java, the instance method must be of the form messageName(NSPasteBoard,String).
+ */
+ private String message = null;
+
+
+ /**
+
+ * The text to add to the Services menu. The value must be unique.
+
+ * You can use a slash character "/" to specify a submenu. For example, Mail/Send
+
+ * would appear in the Services Menu as a menu named Mail with an item named Send.
+ */
+ private String menuItem = null;
+
+ /**
+ * A list of the data type names that can be read by the service.
+
+ * The NSPasteboard class description lists several common data types.
+
+ * You must specify either Send Types, Return Types or both.
+ */
+ private String[] sendTypes = null;
+
+
+ /**
+ * A list of the data type names that can be returned by the service.
+
+ * The NSPasteboard class description lists several common data types.
+
+ * You must specify either Return Types, Send Types or both.
+ */
+ private String[] returnTypes = null;
+
+
+ /**
+ * This attribute is optional. The keyboard equivalent used to invoke
+
+ * the service menu command. The value has to be a single character. Users invoke this
+
+ * keyboard equivalent by pressing the Command and Shift key modifiers along with the character.
+
+ */
+ private String keyEquivalent = null;
+
+
+ /**
+
+ * This attribute is optional. The value is free choosable and is passed
+
+ * to the method as second parameter.
+
+ */
+ private String userData = null;
+
+
+ /**
+
+ * This attribute is optional. It indicates the number of milliseconds
+
+ * Services should wait for a response from the application providing
+
+ * a service when a respond is required.
+
+ */
+ private String timeout = null;
+
+
+ public void setPortName(String portName) {
+ this.portName = portName;
+ }
+
+ public String getPortName() {
+ return portName;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMenuItem(String menuItem) {
+ this.menuItem = menuItem;
+
+ }
+
+ public String getMenuItem() {
+ return menuItem;
+ }
+
+ public void setSendTypes(String sendTypes) {
+ this.sendTypes = sendTypes.split("[\\s,]");
+ }
+
+ public List getSendTypes() {
+ return (sendTypes == null) ? EMPTYLIST : Arrays.asList(sendTypes);
+ }
+
+ public void setReturnTypes(String returnTypes) {
+ this.returnTypes = returnTypes.split("[\\s,]");
+ }
+
+ public List getReturnTypes() {
+ return (returnTypes == null) ? EMPTYLIST : Arrays.asList(returnTypes);
+ }
+
+ public void setKeyEquivalent(String keyEquivalent) {
+ this.keyEquivalent = keyEquivalent;
+ }
+
+ public String getKeyEquivalent() {
+ return keyEquivalent;
+ }
+
+ public void setUserData(String userData) {
+ this.userData = userData;
+ }
+
+ public String getUserData() {
+ return userData;
+ }
+
+ public void setTimeout(String timeout) {
+ this.timeout = timeout;
+ }
+
+ public String getTimeout() {
+ return timeout;
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/Abbrevs.java b/jEdit/org/gjt/sp/jedit/Abbrevs.java
index 7334308..72fc68f 100644
--- a/jEdit/org/gjt/sp/jedit/Abbrevs.java
+++ b/jEdit/org/gjt/sp/jedit/Abbrevs.java
@@ -1,594 +1,594 @@
-/*
- * Abbrevs.java - Abbreviation manager
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.io.*;
-import java.util.*;
-import org.gjt.sp.jedit.gui.AddAbbrevDialog;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Abbreviation manager.
- * @author Slava Pestov
- * @version $Id: Abbrevs.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class Abbrevs
-{
- public static final String ENCODING = "UTF8";
-
- //{{{ getExpandOnInput() method
- /**
- * Returns if abbreviations should be expanded after the
- * user finishes typing a word.
- */
- public static boolean getExpandOnInput()
- {
- return expandOnInput;
- } //}}}
-
- //{{{ setExpandOnInput() method
- /**
- * Sets if abbreviations should be expanded after the
- * user finishes typing a word.
- * @param expandOnInput If true, typing a non-alphanumeric character
- * will automatically attempt to expand the current abbrev
- */
- public static void setExpandOnInput(boolean expandOnInput)
- {
- Abbrevs.expandOnInput = expandOnInput;
- } //}}}
-
- //{{{ expandAbbrev() method
- /**
- * Expands the abbrev at the caret position in the specified
- * view.
- * @param view The view
- * @param add If true and abbrev not found, will ask user if
- * it should be added
- * @since jEdit 2.6pre4
- */
- public static boolean expandAbbrev(View view, boolean add)
- {
- //{{{ Figure out some minor things
- Buffer buffer = view.getBuffer();
- JEditTextArea textArea = view.getTextArea();
- if(!buffer.isEditable())
- {
- view.getToolkit().beep();
- return false;
- }
-
- int line = textArea.getCaretLine();
- int lineStart = buffer.getLineStartOffset(line);
- int caret = textArea.getCaretPosition();
-
- String lineText = buffer.getLineText(line);
- if(lineText.length() == 0)
- {
- if(add)
- view.getToolkit().beep();
- return false;
- }
-
- int pos = caret - lineStart;
- if(pos == 0)
- {
- if(add)
- view.getToolkit().beep();
- return false;
- } //}}}
-
- // we reuse the 'pp' vector to save time
- m_pp.removeAllElements();
-
- int wordStart;
- String abbrev;
-
- //{{{ Handle abbrevs of the form abbrev#pos1#pos2#pos3#...
- if(lineText.charAt(pos-1) == '#')
- {
- wordStart = lineText.indexOf('#');
- wordStart = TextUtilities.findWordStart(lineText,wordStart,
- buffer.getStringProperty("noWordSep") + '#');
-
- abbrev = lineText.substring(wordStart,pos - 1);
-
- // positional parameters will be inserted where $1, $2, $3, ...
- // occurs in the expansion
-
- int lastIndex = 0;
- for(int i = 0; i < abbrev.length(); i++)
- {
- if(abbrev.charAt(i) == '#')
- {
- m_pp.addElement(abbrev.substring(lastIndex,i));
- lastIndex = i + 1;
- }
- }
-
- m_pp.addElement(abbrev.substring(lastIndex));
-
- // the first element of pp is the abbrev itself
- abbrev = m_pp.elementAt(0);
- m_pp.removeElementAt(0);
- } //}}}
- //{{{ Handle ordinary abbrevs
- else
- {
- wordStart = TextUtilities.findWordStart(lineText,pos - 1,
- buffer.getStringProperty("noWordSep"));
-
- abbrev = lineText.substring(wordStart,pos);
- } //}}}
-
- Expansion expand = expandAbbrev(buffer.getMode().getName(),
- abbrev,(buffer.getBooleanProperty("noTabs") ?
- buffer.getTabSize() : 0),m_pp);
-
- //{{{ Maybe show add abbrev dialog
- if(expand == null)
- {
- if(add)
- new AddAbbrevDialog(view,abbrev);
-
- return false;
- } //}}}
- //{{{ Insert the expansion
- else
- {
- buffer.remove(lineStart + wordStart,
- pos - wordStart);
-
- int whitespace = buffer.insertIndented(
- lineStart + wordStart,
- expand.text);
-
- int newlines = countNewlines(expand.text,
- expand.caretPosition);
-
- if(expand.caretPosition != -1)
- {
- textArea.setCaretPosition(lineStart + wordStart
- + expand.caretPosition
- + newlines * whitespace);
- }
- if(expand.posParamCount != m_pp.size())
- {
- view.getStatus().setMessageAndClear(
- jEdit.getProperty(
- "view.status.incomplete-abbrev",
- new Integer[] { Integer.valueOf(m_pp.size()),
- Integer.valueOf(expand.posParamCount) }));
- }
-
- return true;
- } //}}}
- } //}}}
-
- //{{{ getGlobalAbbrevs() method
- /**
- * Returns the global abbreviation set.
- * @since jEdit 2.3pre1
- */
- public static Hashtable<String,String> getGlobalAbbrevs()
- {
- if(!loaded)
- load();
-
- return globalAbbrevs;
- } //}}}
-
- //{{{ setGlobalAbbrevs() method
- /**
- * Sets the global abbreviation set.
- * @param globalAbbrevs The new global abbrev set
- * @since jEdit 2.3pre1
- */
- public static void setGlobalAbbrevs(Hashtable<String,String> globalAbbrevs)
- {
- abbrevsChanged = true;
- Abbrevs.globalAbbrevs = globalAbbrevs;
- } //}}}
-
- //{{{ getModeAbbrevs() method
- /**
- * Returns the mode-specific abbreviation set.
- * @since jEdit 2.3pre1
- */
- public static Hashtable<String,Hashtable<String,String>> getModeAbbrevs()
- {
- if(!loaded)
- load();
-
- return modes;
- } //}}}
-
- //{{{ setModeAbbrevs() method
- /**
- * Sets the mode-specific abbreviation set.
- * @param modes The new mode abbrev set
- * @since jEdit 2.3pre1
- */
- public static void setModeAbbrevs(Hashtable<String,Hashtable<String,String>> modes)
- {
- abbrevsChanged = true;
- Abbrevs.modes = modes;
- } //}}}
-
- //{{{ addGlobalAbbrev() method
- /**
- * Adds an abbreviation to the global abbreviation list.
- * @param abbrev The abbreviation
- * @param expansion The expansion
- * @since jEdit 3.1pre1
- */
- public static void addGlobalAbbrev(String abbrev, String expansion)
- {
- if(!loaded)
- load();
-
- globalAbbrevs.put(abbrev,expansion);
- abbrevsChanged = true;
- } //}}}
-
- //{{{ addModeAbbrev() method
- /**
- * Adds a mode-specific abbrev.
- * @param mode The edit mode
- * @param abbrev The abbrev
- * @param expansion The expansion
- * @since jEdit 3.1pre1
- */
- public static void addModeAbbrev(String mode, String abbrev, String expansion)
- {
- if(!loaded)
- load();
-
- Hashtable<String,String> modeAbbrevs = modes.get(mode);
- if(modeAbbrevs == null)
- {
- modeAbbrevs = new Hashtable<String,String>();
- modes.put(mode,modeAbbrevs);
- }
- modeAbbrevs.put(abbrev,expansion);
- abbrevsChanged = true;
- } //}}}
-
- //{{{ save() method
- static void save()
- {
- jEdit.setBooleanProperty("view.expandOnInput",expandOnInput);
-
- String settings = jEdit.getSettingsDirectory();
- if(abbrevsChanged && settings != null)
- {
- File file1 = new File(MiscUtilities.constructPath(settings,"#abbrevs#save#"));
- File file2 = new File(MiscUtilities.constructPath(settings,"abbrevs"));
- if(file2.exists() && file2.lastModified() != abbrevsModTime)
- {
- Log.log(Log.WARNING,Abbrevs.class,file2 + " changed on disk;"
- + " will not save abbrevs");
- }
- else
- {
- jEdit.backupSettingsFile(file2);
-
- try
- {
- saveAbbrevs(new OutputStreamWriter(
- new FileOutputStream(file1),
- ENCODING));
- file2.delete();
- file1.renameTo(file2);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,Abbrevs.class,"Error while saving " + file1);
- Log.log(Log.ERROR,Abbrevs.class,e);
- }
- abbrevsModTime = file2.lastModified();
- }
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private static boolean loaded;
- private static boolean abbrevsChanged;
- private static long abbrevsModTime;
- private static boolean expandOnInput;
- private static Hashtable<String,String> globalAbbrevs;
- private static Hashtable<String,Hashtable<String,String>> modes;
-
- /** Vector of Positional Parameters */
- private static Vector<String> m_pp = new Vector<String>();
- //}}}
-
- private Abbrevs() {}
-
- static
- {
- expandOnInput = jEdit.getBooleanProperty("view.expandOnInput");
- }
-
- //{{{ load() method
- private static void load()
- {
- globalAbbrevs = new Hashtable<String,String>();
- modes = new Hashtable<String,Hashtable<String,String>>();
-
- String settings = jEdit.getSettingsDirectory();
- if(settings != null)
- {
- File file = new File(MiscUtilities.constructPath(settings,"abbrevs"));
- abbrevsModTime = file.lastModified();
-
- try
- {
- loadAbbrevs(new InputStreamReader(
- new FileInputStream(file),ENCODING));
- loaded = true;
- }
- catch(FileNotFoundException fnf)
- {
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,Abbrevs.class,"Error while loading " + file);
- Log.log(Log.ERROR,Abbrevs.class,e);
- }
- }
-
- // only load global abbrevs if user abbrevs file could not be loaded
- if(!loaded)
- {
- try
- {
- loadAbbrevs(new InputStreamReader(Abbrevs.class
- .getResourceAsStream("default.abbrevs"),
- ENCODING));
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,Abbrevs.class,"Error while loading default.abbrevs");
- Log.log(Log.ERROR,Abbrevs.class,e);
- }
- loaded = true;
- }
- } //}}}
-
- //{{{ countNewlines() method
- private static int countNewlines(String s, int end)
- {
- int counter = 0;
-
- for(int i = 0; i < end; i++)
- {
- if(s.charAt(i) == '\n')
- counter++;
- }
-
- return counter;
- } //}}}
-
- //{{{ expandAbbrev() method
- private static Expansion expandAbbrev(String mode, String abbrev,
- int softTabSize, Vector<String> pp)
- {
- m_pp = pp;
- if(!loaded)
- load();
-
- // try mode-specific abbrevs first
- String expand = null;
- Hashtable<String,String> modeAbbrevs = modes.get(mode);
- if(modeAbbrevs != null)
- expand = modeAbbrevs.get(abbrev);
-
- if(expand == null)
- expand = globalAbbrevs.get(abbrev);
-
- if(expand == null)
- return null;
- else
- return new Expansion(expand,softTabSize,m_pp);
- } //}}}
-
- //{{{ loadAbbrevs() method
- private static void loadAbbrevs(Reader _in) throws Exception
- {
- BufferedReader in = new BufferedReader(_in);
-
- try
- {
- Hashtable<String,String> currentAbbrevs = globalAbbrevs;
-
- String line;
- while((line = in.readLine()) != null)
- {
- int index = line.indexOf('|');
-
- if(line.length() == 0)
- continue;
- else if(line.startsWith("[") && index == -1)
- {
- if(line.equals("[global]"))
- currentAbbrevs = globalAbbrevs;
- else
- {
- String mode = line.substring(1,
- line.length() - 1);
- currentAbbrevs = modes.get(mode);
- if(currentAbbrevs == null)
- {
- currentAbbrevs = new Hashtable<String,String>();
- modes.put(mode,currentAbbrevs);
- }
- }
- }
- else if(index != -1)
- {
- currentAbbrevs.put(line.substring(0,index),
- line.substring(index + 1));
- }
- }
- }
- finally
- {
- in.close();
- }
- } //}}}
-
- //{{{ saveAbbrevs() method
- private static void saveAbbrevs(Writer _out) throws Exception
- {
- BufferedWriter out = new BufferedWriter(_out);
- String lineSep = System.getProperty("line.separator");
-
- // write global abbrevs
- out.write("[global]");
- out.write(lineSep);
-
- saveAbbrevs(out,globalAbbrevs);
-
- // write mode abbrevs
- Enumeration<String> keys = modes.keys();
- Enumeration<Hashtable<String,String>> values = modes.elements();
- while(keys.hasMoreElements())
- {
- out.write('[');
- out.write(keys.nextElement());
- out.write(']');
- out.write(lineSep);
- saveAbbrevs(out,values.nextElement());
- }
-
- out.close();
- } //}}}
-
- //{{{ saveAbbrevs() method
- private static void saveAbbrevs(Writer out, Hashtable<String,String> abbrevs)
- throws Exception
- {
- String lineSep = System.getProperty("line.separator");
-
- Enumeration<String> keys = abbrevs.keys();
- Enumeration<String> values = abbrevs.elements();
- while(keys.hasMoreElements())
- {
- String abbrev = keys.nextElement();
- out.write(abbrev);
- out.write('|');
- out.write(values.nextElement());
- out.write(lineSep);
- }
- } //}}}
-
- //}}}
-
- //{{{ Expansion class
- static class Expansion
- {
- String text;
- int caretPosition = -1;
- int lineCount;
-
- // number of positional parameters in abbreviation expansion
- int posParamCount;
-
- //{{{ Expansion constructor
- Expansion(String text, int softTabSize, List<String> pp)
- {
- StringBuilder buf = new StringBuilder();
- boolean backslash = false;
-
- for(int i = 0; i < text.length(); i++)
- {
- char ch = text.charAt(i);
- //{{{ Handle backslash
- if(backslash)
- {
- backslash = false;
-
- if(ch == '|')
- caretPosition = buf.length();
- else if(ch == 'n')
- {
- buf.append('\n');
- lineCount++;
- }
- else if(ch == 't')
- {
- if(softTabSize == 0)
- buf.append('\t');
- else
- {
- for(int j = 0; j < softTabSize; j++)
- buf.append(' ');
- }
- }
- else
- buf.append(ch);
- }
- else if(ch == '\\')
- backslash = true;
- //}}}
- //{{{ Handle $
- else if(ch == '$')
- {
- if(i != text.length() - 1)
- {
- ch = text.charAt(i + 1);
- if(Character.isDigit(ch) && ch != '0')
- {
- i++;
-
- int pos = ch - '0';
- posParamCount = Math.max(pos,posParamCount);
- // $n is 1-indexed, but vector
- // contents is zero indexed
- if(pos <= pp.size())
- buf.append(pp.get(pos - 1));
- }
- else
- {
- // $key will be $key, for
- // example
- buf.append('$');
- }
- }
- else
- buf.append('$'); // $ at end is literal
- } //}}}
- else
- buf.append(ch);
- }
-
- this.text = buf.toString();
- } //}}}
- } //}}}
-}
+/*
+ * Abbrevs.java - Abbreviation manager
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.io.*;
+import java.util.*;
+import org.gjt.sp.jedit.gui.AddAbbrevDialog;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Abbreviation manager.
+ * @author Slava Pestov
+ * @version $Id: Abbrevs.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class Abbrevs
+{
+ public static final String ENCODING = "UTF8";
+
+ //{{{ getExpandOnInput() method
+ /**
+ * Returns if abbreviations should be expanded after the
+ * user finishes typing a word.
+ */
+ public static boolean getExpandOnInput()
+ {
+ return expandOnInput;
+ } //}}}
+
+ //{{{ setExpandOnInput() method
+ /**
+ * Sets if abbreviations should be expanded after the
+ * user finishes typing a word.
+ * @param expandOnInput If true, typing a non-alphanumeric character
+ * will automatically attempt to expand the current abbrev
+ */
+ public static void setExpandOnInput(boolean expandOnInput)
+ {
+ Abbrevs.expandOnInput = expandOnInput;
+ } //}}}
+
+ //{{{ expandAbbrev() method
+ /**
+ * Expands the abbrev at the caret position in the specified
+ * view.
+ * @param view The view
+ * @param add If true and abbrev not found, will ask user if
+ * it should be added
+ * @since jEdit 2.6pre4
+ */
+ public static boolean expandAbbrev(View view, boolean add)
+ {
+ //{{{ Figure out some minor things
+ Buffer buffer = view.getBuffer();
+ JEditTextArea textArea = view.getTextArea();
+ if(!buffer.isEditable())
+ {
+ view.getToolkit().beep();
+ return false;
+ }
+
+ int line = textArea.getCaretLine();
+ int lineStart = buffer.getLineStartOffset(line);
+ int caret = textArea.getCaretPosition();
+
+ String lineText = buffer.getLineText(line);
+ if(lineText.length() == 0)
+ {
+ if(add)
+ view.getToolkit().beep();
+ return false;
+ }
+
+ int pos = caret - lineStart;
+ if(pos == 0)
+ {
+ if(add)
+ view.getToolkit().beep();
+ return false;
+ } //}}}
+
+ // we reuse the 'pp' vector to save time
+ m_pp.removeAllElements();
+
+ int wordStart;
+ String abbrev;
+
+ //{{{ Handle abbrevs of the form abbrev#pos1#pos2#pos3#...
+ if(lineText.charAt(pos-1) == '#')
+ {
+ wordStart = lineText.indexOf('#');
+ wordStart = TextUtilities.findWordStart(lineText,wordStart,
+ buffer.getStringProperty("noWordSep") + '#');
+
+ abbrev = lineText.substring(wordStart,pos - 1);
+
+ // positional parameters will be inserted where $1, $2, $3, ...
+ // occurs in the expansion
+
+ int lastIndex = 0;
+ for(int i = 0; i < abbrev.length(); i++)
+ {
+ if(abbrev.charAt(i) == '#')
+ {
+ m_pp.addElement(abbrev.substring(lastIndex,i));
+ lastIndex = i + 1;
+ }
+ }
+
+ m_pp.addElement(abbrev.substring(lastIndex));
+
+ // the first element of pp is the abbrev itself
+ abbrev = m_pp.elementAt(0);
+ m_pp.removeElementAt(0);
+ } //}}}
+ //{{{ Handle ordinary abbrevs
+ else
+ {
+ wordStart = TextUtilities.findWordStart(lineText,pos - 1,
+ buffer.getStringProperty("noWordSep"));
+
+ abbrev = lineText.substring(wordStart,pos);
+ } //}}}
+
+ Expansion expand = expandAbbrev(buffer.getMode().getName(),
+ abbrev,(buffer.getBooleanProperty("noTabs") ?
+ buffer.getTabSize() : 0),m_pp);
+
+ //{{{ Maybe show add abbrev dialog
+ if(expand == null)
+ {
+ if(add)
+ new AddAbbrevDialog(view,abbrev);
+
+ return false;
+ } //}}}
+ //{{{ Insert the expansion
+ else
+ {
+ buffer.remove(lineStart + wordStart,
+ pos - wordStart);
+
+ int whitespace = buffer.insertIndented(
+ lineStart + wordStart,
+ expand.text);
+
+ int newlines = countNewlines(expand.text,
+ expand.caretPosition);
+
+ if(expand.caretPosition != -1)
+ {
+ textArea.setCaretPosition(lineStart + wordStart
+ + expand.caretPosition
+ + newlines * whitespace);
+ }
+ if(expand.posParamCount != m_pp.size())
+ {
+ view.getStatus().setMessageAndClear(
+ jEdit.getProperty(
+ "view.status.incomplete-abbrev",
+ new Integer[] { Integer.valueOf(m_pp.size()),
+ Integer.valueOf(expand.posParamCount) }));
+ }
+
+ return true;
+ } //}}}
+ } //}}}
+
+ //{{{ getGlobalAbbrevs() method
+ /**
+ * Returns the global abbreviation set.
+ * @since jEdit 2.3pre1
+ */
+ public static Hashtable<String,String> getGlobalAbbrevs()
+ {
+ if(!loaded)
+ load();
+
+ return globalAbbrevs;
+ } //}}}
+
+ //{{{ setGlobalAbbrevs() method
+ /**
+ * Sets the global abbreviation set.
+ * @param globalAbbrevs The new global abbrev set
+ * @since jEdit 2.3pre1
+ */
+ public static void setGlobalAbbrevs(Hashtable<String,String> globalAbbrevs)
+ {
+ abbrevsChanged = true;
+ Abbrevs.globalAbbrevs = globalAbbrevs;
+ } //}}}
+
+ //{{{ getModeAbbrevs() method
+ /**
+ * Returns the mode-specific abbreviation set.
+ * @since jEdit 2.3pre1
+ */
+ public static Hashtable<String,Hashtable<String,String>> getModeAbbrevs()
+ {
+ if(!loaded)
+ load();
+
+ return modes;
+ } //}}}
+
+ //{{{ setModeAbbrevs() method
+ /**
+ * Sets the mode-specific abbreviation set.
+ * @param modes The new mode abbrev set
+ * @since jEdit 2.3pre1
+ */
+ public static void setModeAbbrevs(Hashtable<String,Hashtable<String,String>> modes)
+ {
+ abbrevsChanged = true;
+ Abbrevs.modes = modes;
+ } //}}}
+
+ //{{{ addGlobalAbbrev() method
+ /**
+ * Adds an abbreviation to the global abbreviation list.
+ * @param abbrev The abbreviation
+ * @param expansion The expansion
+ * @since jEdit 3.1pre1
+ */
+ public static void addGlobalAbbrev(String abbrev, String expansion)
+ {
+ if(!loaded)
+ load();
+
+ globalAbbrevs.put(abbrev,expansion);
+ abbrevsChanged = true;
+ } //}}}
+
+ //{{{ addModeAbbrev() method
+ /**
+ * Adds a mode-specific abbrev.
+ * @param mode The edit mode
+ * @param abbrev The abbrev
+ * @param expansion The expansion
+ * @since jEdit 3.1pre1
+ */
+ public static void addModeAbbrev(String mode, String abbrev, String expansion)
+ {
+ if(!loaded)
+ load();
+
+ Hashtable<String,String> modeAbbrevs = modes.get(mode);
+ if(modeAbbrevs == null)
+ {
+ modeAbbrevs = new Hashtable<String,String>();
+ modes.put(mode,modeAbbrevs);
+ }
+ modeAbbrevs.put(abbrev,expansion);
+ abbrevsChanged = true;
+ } //}}}
+
+ //{{{ save() method
+ static void save()
+ {
+ jEdit.setBooleanProperty("view.expandOnInput",expandOnInput);
+
+ String settings = jEdit.getSettingsDirectory();
+ if(abbrevsChanged && settings != null)
+ {
+ File file1 = new File(MiscUtilities.constructPath(settings,"#abbrevs#save#"));
+ File file2 = new File(MiscUtilities.constructPath(settings,"abbrevs"));
+ if(file2.exists() && file2.lastModified() != abbrevsModTime)
+ {
+ Log.log(Log.WARNING,Abbrevs.class,file2 + " changed on disk;"
+ + " will not save abbrevs");
+ }
+ else
+ {
+ jEdit.backupSettingsFile(file2);
+
+ try
+ {
+ saveAbbrevs(new OutputStreamWriter(
+ new FileOutputStream(file1),
+ ENCODING));
+ file2.delete();
+ file1.renameTo(file2);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,Abbrevs.class,"Error while saving " + file1);
+ Log.log(Log.ERROR,Abbrevs.class,e);
+ }
+ abbrevsModTime = file2.lastModified();
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private static boolean loaded;
+ private static boolean abbrevsChanged;
+ private static long abbrevsModTime;
+ private static boolean expandOnInput;
+ private static Hashtable<String,String> globalAbbrevs;
+ private static Hashtable<String,Hashtable<String,String>> modes;
+
+ /** Vector of Positional Parameters */
+ private static Vector<String> m_pp = new Vector<String>();
+ //}}}
+
+ private Abbrevs() {}
+
+ static
+ {
+ expandOnInput = jEdit.getBooleanProperty("view.expandOnInput");
+ }
+
+ //{{{ load() method
+ private static void load()
+ {
+ globalAbbrevs = new Hashtable<String,String>();
+ modes = new Hashtable<String,Hashtable<String,String>>();
+
+ String settings = jEdit.getSettingsDirectory();
+ if(settings != null)
+ {
+ File file = new File(MiscUtilities.constructPath(settings,"abbrevs"));
+ abbrevsModTime = file.lastModified();
+
+ try
+ {
+ loadAbbrevs(new InputStreamReader(
+ new FileInputStream(file),ENCODING));
+ loaded = true;
+ }
+ catch(FileNotFoundException fnf)
+ {
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,Abbrevs.class,"Error while loading " + file);
+ Log.log(Log.ERROR,Abbrevs.class,e);
+ }
+ }
+
+ // only load global abbrevs if user abbrevs file could not be loaded
+ if(!loaded)
+ {
+ try
+ {
+ loadAbbrevs(new InputStreamReader(Abbrevs.class
+ .getResourceAsStream("default.abbrevs"),
+ ENCODING));
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,Abbrevs.class,"Error while loading default.abbrevs");
+ Log.log(Log.ERROR,Abbrevs.class,e);
+ }
+ loaded = true;
+ }
+ } //}}}
+
+ //{{{ countNewlines() method
+ private static int countNewlines(String s, int end)
+ {
+ int counter = 0;
+
+ for(int i = 0; i < end; i++)
+ {
+ if(s.charAt(i) == '\n')
+ counter++;
+ }
+
+ return counter;
+ } //}}}
+
+ //{{{ expandAbbrev() method
+ private static Expansion expandAbbrev(String mode, String abbrev,
+ int softTabSize, Vector<String> pp)
+ {
+ m_pp = pp;
+ if(!loaded)
+ load();
+
+ // try mode-specific abbrevs first
+ String expand = null;
+ Hashtable<String,String> modeAbbrevs = modes.get(mode);
+ if(modeAbbrevs != null)
+ expand = modeAbbrevs.get(abbrev);
+
+ if(expand == null)
+ expand = globalAbbrevs.get(abbrev);
+
+ if(expand == null)
+ return null;
+ else
+ return new Expansion(expand,softTabSize,m_pp);
+ } //}}}
+
+ //{{{ loadAbbrevs() method
+ private static void loadAbbrevs(Reader _in) throws Exception
+ {
+ BufferedReader in = new BufferedReader(_in);
+
+ try
+ {
+ Hashtable<String,String> currentAbbrevs = globalAbbrevs;
+
+ String line;
+ while((line = in.readLine()) != null)
+ {
+ int index = line.indexOf('|');
+
+ if(line.length() == 0)
+ continue;
+ else if(line.startsWith("[") && index == -1)
+ {
+ if(line.equals("[global]"))
+ currentAbbrevs = globalAbbrevs;
+ else
+ {
+ String mode = line.substring(1,
+ line.length() - 1);
+ currentAbbrevs = modes.get(mode);
+ if(currentAbbrevs == null)
+ {
+ currentAbbrevs = new Hashtable<String,String>();
+ modes.put(mode,currentAbbrevs);
+ }
+ }
+ }
+ else if(index != -1)
+ {
+ currentAbbrevs.put(line.substring(0,index),
+ line.substring(index + 1));
+ }
+ }
+ }
+ finally
+ {
+ in.close();
+ }
+ } //}}}
+
+ //{{{ saveAbbrevs() method
+ private static void saveAbbrevs(Writer _out) throws Exception
+ {
+ BufferedWriter out = new BufferedWriter(_out);
+ String lineSep = System.getProperty("line.separator");
+
+ // write global abbrevs
+ out.write("[global]");
+ out.write(lineSep);
+
+ saveAbbrevs(out,globalAbbrevs);
+
+ // write mode abbrevs
+ Enumeration<String> keys = modes.keys();
+ Enumeration<Hashtable<String,String>> values = modes.elements();
+ while(keys.hasMoreElements())
+ {
+ out.write('[');
+ out.write(keys.nextElement());
+ out.write(']');
+ out.write(lineSep);
+ saveAbbrevs(out,values.nextElement());
+ }
+
+ out.close();
+ } //}}}
+
+ //{{{ saveAbbrevs() method
+ private static void saveAbbrevs(Writer out, Hashtable<String,String> abbrevs)
+ throws Exception
+ {
+ String lineSep = System.getProperty("line.separator");
+
+ Enumeration<String> keys = abbrevs.keys();
+ Enumeration<String> values = abbrevs.elements();
+ while(keys.hasMoreElements())
+ {
+ String abbrev = keys.nextElement();
+ out.write(abbrev);
+ out.write('|');
+ out.write(values.nextElement());
+ out.write(lineSep);
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Expansion class
+ static class Expansion
+ {
+ String text;
+ int caretPosition = -1;
+ int lineCount;
+
+ // number of positional parameters in abbreviation expansion
+ int posParamCount;
+
+ //{{{ Expansion constructor
+ Expansion(String text, int softTabSize, List<String> pp)
+ {
+ StringBuilder buf = new StringBuilder();
+ boolean backslash = false;
+
+ for(int i = 0; i < text.length(); i++)
+ {
+ char ch = text.charAt(i);
+ //{{{ Handle backslash
+ if(backslash)
+ {
+ backslash = false;
+
+ if(ch == '|')
+ caretPosition = buf.length();
+ else if(ch == 'n')
+ {
+ buf.append('\n');
+ lineCount++;
+ }
+ else if(ch == 't')
+ {
+ if(softTabSize == 0)
+ buf.append('\t');
+ else
+ {
+ for(int j = 0; j < softTabSize; j++)
+ buf.append(' ');
+ }
+ }
+ else
+ buf.append(ch);
+ }
+ else if(ch == '\\')
+ backslash = true;
+ //}}}
+ //{{{ Handle $
+ else if(ch == '$')
+ {
+ if(i != text.length() - 1)
+ {
+ ch = text.charAt(i + 1);
+ if(Character.isDigit(ch) && ch != '0')
+ {
+ i++;
+
+ int pos = ch - '0';
+ posParamCount = Math.max(pos,posParamCount);
+ // $n is 1-indexed, but vector
+ // contents is zero indexed
+ if(pos <= pp.size())
+ buf.append(pp.get(pos - 1));
+ }
+ else
+ {
+ // $key will be $key, for
+ // example
+ buf.append('$');
+ }
+ }
+ else
+ buf.append('$'); // $ at end is literal
+ } //}}}
+ else
+ buf.append(ch);
+ }
+
+ this.text = buf.toString();
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/AbstractOptionPane.java b/jEdit/org/gjt/sp/jedit/AbstractOptionPane.java
index 611cd63..aae6ec7 100644
--- a/jEdit/org/gjt/sp/jedit/AbstractOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/AbstractOptionPane.java
@@ -1,416 +1,416 @@
-/*
- * AbstractOptionPane.java - Abstract option pane
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import javax.swing.border.EmptyBorder;
-import javax.swing.*;
-import java.awt.*;
-//}}}
-
-/**
- * The default implementation of the option pane interface.<p>
- *
- * See {@link EditPlugin} for information on how jEdit obtains and constructs
- * option pane instances.<p>
- *
- * Most option panes extend this implementation of {@link OptionPane}, instead
- * of implementing {@link OptionPane} directly. This class provides a convenient
- * default framework for laying out configuration options.<p>
- *
- * It is derived from Java's <code>JPanel</code> class and uses a
- * <code>GridBagLayout</code> object for component management. Since
- * <code>GridBagLayout</code> can be a bit cumbersome to use, this class
- * contains shortcut methods to simplify layout:
- *
- * <ul>
- * <li>{@link #addComponent(Component)}</li>
- * <li>{@link #addComponent(String,Component)}</li>
- * <li>{@link #addComponent(String,Component,int)}</li>
- * <li>{@link #addComponent(Component,Component)}</li>
- * <li>{@link #addComponent(Component,Component,int)}</li>
- * <li>{@link #addSeparator()}</li>
- * <li>{@link #addSeparator(String)}</li>
- * </ul>
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: AbstractOptionPane.java 13806 2008-09-26 08:45:42Z kpouer $
- */
-// even though this class is called AbstractOptionPane, it is not really
-// abstract, since BufferOptions uses an instance of it to lay out its
-// components.
-public class AbstractOptionPane extends JPanel implements OptionPane
-{
- //{{{ AbstractOptionPane constructor
- /**
- * Creates a new option pane.
- * @param internalName The internal name. The option pane's label is set to the
- * value of the property named <code>options.<i>name</i>.label</code>.
- */
- public AbstractOptionPane(String internalName)
- {
- this.name = internalName;
- setLayout(gridBag = new GridBagLayout());
- } //}}}
-
- //{{{ getName() method
- /**
- * Returns the internal name of this option pane. The option pane's label
- * is set to the value of the property named
- * <code>options.<i>name</i>.label</code>.
- */
- @Override
- public String getName()
- {
- return name;
- } //}}}
-
- //{{{ getComponent() method
- /**
- * Returns the component that should be displayed for this option pane.
- * Because this class extends Component, it simply returns "this".
- */
- public Component getComponent()
- {
- return this;
- } //}}}
-
- //{{{ init() method
- /**
- * Do not override this method, override {@link #_init()} instead.
- */
- // final in 4.2
- public void init()
- {
- if(!initialized)
- {
- initialized = true;
- _init();
- }
- } //}}}
-
- //{{{ save() method
- /**
- * Do not override this method, override {@link #_save()} instead.
- */
- // final in 4.2
- public void save()
- {
- if(initialized)
- _save();
- } //}}}
-
- //{{{ newLabel()
- /**
- * @return a label which has the same tooltiptext as the Component
- * that it is a label for. This is used to create labels from inside
- * AbstractOptionPane.
- * @since jEdit 4.3pre4
- */
- public JLabel newLabel(String label, Component comp)
- {
- JLabel retval = new JLabel(label);
- try /* to get the tooltip of the component */
- {
- JComponent jc = (JComponent) comp;
- String tttext = jc.getToolTipText();
- retval.setToolTipText(tttext);
- }
- catch (Exception e)
- {
- /* There probably wasn't a tooltip,
- * or it wasn't a JComponent.
- We don't care. */
- }
- return retval;
- }// }}}
-
- //{{{ addComponent() method
- /**
- * Adds a labeled component to the option pane. Components are
- * added in a vertical fashion, one per row. The label is
- * displayed to the left of the component.
- * @param label The label
- * @param comp The component
- */
- public void addComponent(String label, Component comp)
- {
- JLabel l = newLabel(label, comp);
- l.setBorder(new EmptyBorder(0,0,0,12));
- addComponent(l,comp,GridBagConstraints.BOTH);
- } //}}}
-
- //{{{ addComponent() method
- /**
- * Adds a labeled component to the option pane. Components are
- * added in a vertical fashion, one per row. The label is
- * displayed to the left of the component.
- * @param label The label
- * @param comp The component
- * @param fill Fill parameter to GridBagConstraints for the right
- * component
- */
- public void addComponent(String label, Component comp, int fill)
- {
- JLabel l = newLabel(label, comp);
- l.setBorder(new EmptyBorder(0,0,0,12));
- addComponent(l,comp,fill);
- } //}}}
-
- //{{{ addComponent() method
- /**
- * Adds a labeled component to the option pane. Components are
- * added in a vertical fashion, one per row. The label is
- * displayed to the left of the component.
- * @param comp1 The label
- * @param comp2 The component
- *
- * @since jEdit 4.1pre3
- */
- public void addComponent(Component comp1, Component comp2)
- {
- addComponent(comp1,comp2,GridBagConstraints.BOTH);
- } //}}}
-
- //{{{ addComponent() method
- /**
- * Adds a labeled component to the option pane. Components are
- * added in a vertical fashion, one per row. The label is
- * displayed to the left of the component.
- * @param comp1 The label
- * @param comp2 The component
- * @param fill Fill parameter to GridBagConstraints for the right
- * component
- *
- * @since jEdit 4.1pre3
- */
- public void addComponent(Component comp1, Component comp2, int fill)
- {
- copyToolTips(comp1, comp2);
- GridBagConstraints cons = new GridBagConstraints();
- cons.gridy = y++;
- cons.gridheight = 1;
- cons.gridwidth = 1;
- cons.weightx = 0.0f;
- cons.insets = new Insets(1,0,1,0);
- cons.fill = GridBagConstraints.BOTH;
-
- gridBag.setConstraints(comp1,cons);
- add(comp1);
-
- cons.fill = fill;
- cons.gridx = 1;
- cons.weightx = 1.0f;
- gridBag.setConstraints(comp2,cons);
- add(comp2);
- } //}}}
-
- //{{{ addComponent() method
- /**
- * Adds a component to the option pane. Components are
- * added in a vertical fashion, one per row.
- * @param comp The component
- */
- public void addComponent(Component comp)
- {
- GridBagConstraints cons = new GridBagConstraints();
- cons.gridy = y++;
- cons.gridheight = 1;
- cons.gridwidth = GridBagConstraints.REMAINDER;
- cons.fill = GridBagConstraints.NONE;
- cons.anchor = GridBagConstraints.WEST;
- cons.weightx = 1.0f;
- cons.insets = new Insets(1,0,1,0);
-
- gridBag.setConstraints(comp,cons);
- add(comp);
- } //}}}
-
- //{{{ addComponent() method
- /**
- * Adds a component to the option pane. Components are
- * added in a vertical fashion, one per row.
- * @param comp The component
- * @param fill Fill parameter to GridBagConstraints
- * @since jEdit 4.2pre2
- */
- public void addComponent(Component comp, int fill)
- {
- GridBagConstraints cons = new GridBagConstraints();
- cons.gridy = y++;
- cons.gridheight = 1;
- cons.gridwidth = GridBagConstraints.REMAINDER;
- cons.fill = fill;
- cons.anchor = GridBagConstraints.WEST;
- cons.weightx = 1.0f;
- cons.insets = new Insets(1,0,1,0);
-
- gridBag.setConstraints(comp,cons);
- add(comp);
- } //}}}
-
- //{{{ copyToolTips() method
- private static void copyToolTips(Component c1, Component c2)
- {
- int tooltips = 0;
- int jc = 0;
- String text = null;
- JComponent jc1 = null;
- try
- {
- jc1 = (JComponent) c1;
- text = jc1.getToolTipText();
- ++jc;
- if (text != null && text.length() > 0)
- tooltips++;
- }
- catch (Exception e)
- {
- }
-
- JComponent jc2 = null;
- try
- {
- jc2 = (JComponent) c2;
- String text2 = jc2.getToolTipText();
- ++jc;
- if (text2 != null && text2.length() > 0)
- {
- text = text2;
- tooltips++;
- }
- }
- catch (Exception e)
- {
- }
-
- if (tooltips == 1 && jc == 2)
- {
- jc1.setToolTipText(text);
- jc2.setToolTipText(text);
- }
-
- } //}}}
-
- //{{{ addSeparator() method
- /**
- * Adds a separator component.
- * @since jEdit 4.1pre7
- */
- public void addSeparator()
- {
- addComponent(Box.createVerticalStrut(6));
-
- JSeparator sep = new JSeparator(SwingConstants.HORIZONTAL);
-
- GridBagConstraints cons = new GridBagConstraints();
- cons.gridy = y++;
- cons.gridheight = 1;
- cons.gridwidth = GridBagConstraints.REMAINDER;
- cons.fill = GridBagConstraints.BOTH;
- cons.anchor = GridBagConstraints.WEST;
- cons.weightx = 1.0f;
- //cons.insets = new Insets(1,0,1,0);
-
- gridBag.setConstraints(sep,cons);
- add(sep);
-
- addComponent(Box.createVerticalStrut(6));
- } //}}}
-
- //{{{ addSeparator() method
- /**
- * Adds a separator component.
- * @param label The separator label property
- * @since jEdit 2.6pre2
- */
- public void addSeparator(String label)
- {
- if(y != 0)
- addComponent(Box.createVerticalStrut(6));
-
- Box box = new Box(BoxLayout.X_AXIS);
- Box box2 = new Box(BoxLayout.Y_AXIS);
- box2.add(Box.createGlue());
- box2.add(new JSeparator(SwingConstants.HORIZONTAL));
- box2.add(Box.createGlue());
- box.add(box2);
- JLabel l = new JLabel(jEdit.getProperty(label));
- l.setMaximumSize(l.getPreferredSize());
- box.add(l);
- Box box3 = new Box(BoxLayout.Y_AXIS);
- box3.add(Box.createGlue());
- box3.add(new JSeparator(SwingConstants.HORIZONTAL));
- box3.add(Box.createGlue());
- box.add(box3);
-
- GridBagConstraints cons = new GridBagConstraints();
- cons.gridy = y++;
- cons.gridheight = 1;
- cons.gridwidth = GridBagConstraints.REMAINDER;
- cons.fill = GridBagConstraints.BOTH;
- cons.anchor = GridBagConstraints.WEST;
- cons.weightx = 1.0f;
- cons.insets = new Insets(1,0,1,0);
-
- gridBag.setConstraints(box,cons);
- add(box);
- } //}}}
-
- //{{{ Protected members
- /**
- * Has the option pane been initialized?
- */
- protected boolean initialized;
-
- /**
- * The layout manager.
- */
- protected GridBagLayout gridBag;
-
- /**
- * The number of components already added to the layout manager.
- */
- protected int y;
-
- /**
- * This method should create and arrange the components of the option pane
- * and initialize the option data displayed to the user. This method
- * is called when the option pane is first displayed, and is not
- * called again for the lifetime of the object.
- */
- protected void _init() {}
-
- /**
- * Called when the options dialog's "ok" button is clicked.
- * This should save any properties being edited in this option
- * pane.
- */
- protected void _save() {}
- //}}}
-
- //{{{ Private members
- private String name;
- //}}}
-}
+/*
+ * AbstractOptionPane.java - Abstract option pane
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import javax.swing.border.EmptyBorder;
+import javax.swing.*;
+import java.awt.*;
+//}}}
+
+/**
+ * The default implementation of the option pane interface.<p>
+ *
+ * See {@link EditPlugin} for information on how jEdit obtains and constructs
+ * option pane instances.<p>
+ *
+ * Most option panes extend this implementation of {@link OptionPane}, instead
+ * of implementing {@link OptionPane} directly. This class provides a convenient
+ * default framework for laying out configuration options.<p>
+ *
+ * It is derived from Java's <code>JPanel</code> class and uses a
+ * <code>GridBagLayout</code> object for component management. Since
+ * <code>GridBagLayout</code> can be a bit cumbersome to use, this class
+ * contains shortcut methods to simplify layout:
+ *
+ * <ul>
+ * <li>{@link #addComponent(Component)}</li>
+ * <li>{@link #addComponent(String,Component)}</li>
+ * <li>{@link #addComponent(String,Component,int)}</li>
+ * <li>{@link #addComponent(Component,Component)}</li>
+ * <li>{@link #addComponent(Component,Component,int)}</li>
+ * <li>{@link #addSeparator()}</li>
+ * <li>{@link #addSeparator(String)}</li>
+ * </ul>
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: AbstractOptionPane.java 13806 2008-09-26 08:45:42Z kpouer $
+ */
+// even though this class is called AbstractOptionPane, it is not really
+// abstract, since BufferOptions uses an instance of it to lay out its
+// components.
+public class AbstractOptionPane extends JPanel implements OptionPane
+{
+ //{{{ AbstractOptionPane constructor
+ /**
+ * Creates a new option pane.
+ * @param internalName The internal name. The option pane's label is set to the
+ * value of the property named <code>options.<i>name</i>.label</code>.
+ */
+ public AbstractOptionPane(String internalName)
+ {
+ this.name = internalName;
+ setLayout(gridBag = new GridBagLayout());
+ } //}}}
+
+ //{{{ getName() method
+ /**
+ * Returns the internal name of this option pane. The option pane's label
+ * is set to the value of the property named
+ * <code>options.<i>name</i>.label</code>.
+ */
+ @Override
+ public String getName()
+ {
+ return name;
+ } //}}}
+
+ //{{{ getComponent() method
+ /**
+ * Returns the component that should be displayed for this option pane.
+ * Because this class extends Component, it simply returns "this".
+ */
+ public Component getComponent()
+ {
+ return this;
+ } //}}}
+
+ //{{{ init() method
+ /**
+ * Do not override this method, override {@link #_init()} instead.
+ */
+ // final in 4.2
+ public void init()
+ {
+ if(!initialized)
+ {
+ initialized = true;
+ _init();
+ }
+ } //}}}
+
+ //{{{ save() method
+ /**
+ * Do not override this method, override {@link #_save()} instead.
+ */
+ // final in 4.2
+ public void save()
+ {
+ if(initialized)
+ _save();
+ } //}}}
+
+ //{{{ newLabel()
+ /**
+ * @return a label which has the same tooltiptext as the Component
+ * that it is a label for. This is used to create labels from inside
+ * AbstractOptionPane.
+ * @since jEdit 4.3pre4
+ */
+ public JLabel newLabel(String label, Component comp)
+ {
+ JLabel retval = new JLabel(label);
+ try /* to get the tooltip of the component */
+ {
+ JComponent jc = (JComponent) comp;
+ String tttext = jc.getToolTipText();
+ retval.setToolTipText(tttext);
+ }
+ catch (Exception e)
+ {
+ /* There probably wasn't a tooltip,
+ * or it wasn't a JComponent.
+ We don't care. */
+ }
+ return retval;
+ }// }}}
+
+ //{{{ addComponent() method
+ /**
+ * Adds a labeled component to the option pane. Components are
+ * added in a vertical fashion, one per row. The label is
+ * displayed to the left of the component.
+ * @param label The label
+ * @param comp The component
+ */
+ public void addComponent(String label, Component comp)
+ {
+ JLabel l = newLabel(label, comp);
+ l.setBorder(new EmptyBorder(0,0,0,12));
+ addComponent(l,comp,GridBagConstraints.BOTH);
+ } //}}}
+
+ //{{{ addComponent() method
+ /**
+ * Adds a labeled component to the option pane. Components are
+ * added in a vertical fashion, one per row. The label is
+ * displayed to the left of the component.
+ * @param label The label
+ * @param comp The component
+ * @param fill Fill parameter to GridBagConstraints for the right
+ * component
+ */
+ public void addComponent(String label, Component comp, int fill)
+ {
+ JLabel l = newLabel(label, comp);
+ l.setBorder(new EmptyBorder(0,0,0,12));
+ addComponent(l,comp,fill);
+ } //}}}
+
+ //{{{ addComponent() method
+ /**
+ * Adds a labeled component to the option pane. Components are
+ * added in a vertical fashion, one per row. The label is
+ * displayed to the left of the component.
+ * @param comp1 The label
+ * @param comp2 The component
+ *
+ * @since jEdit 4.1pre3
+ */
+ public void addComponent(Component comp1, Component comp2)
+ {
+ addComponent(comp1,comp2,GridBagConstraints.BOTH);
+ } //}}}
+
+ //{{{ addComponent() method
+ /**
+ * Adds a labeled component to the option pane. Components are
+ * added in a vertical fashion, one per row. The label is
+ * displayed to the left of the component.
+ * @param comp1 The label
+ * @param comp2 The component
+ * @param fill Fill parameter to GridBagConstraints for the right
+ * component
+ *
+ * @since jEdit 4.1pre3
+ */
+ public void addComponent(Component comp1, Component comp2, int fill)
+ {
+ copyToolTips(comp1, comp2);
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.gridy = y++;
+ cons.gridheight = 1;
+ cons.gridwidth = 1;
+ cons.weightx = 0.0f;
+ cons.insets = new Insets(1,0,1,0);
+ cons.fill = GridBagConstraints.BOTH;
+
+ gridBag.setConstraints(comp1,cons);
+ add(comp1);
+
+ cons.fill = fill;
+ cons.gridx = 1;
+ cons.weightx = 1.0f;
+ gridBag.setConstraints(comp2,cons);
+ add(comp2);
+ } //}}}
+
+ //{{{ addComponent() method
+ /**
+ * Adds a component to the option pane. Components are
+ * added in a vertical fashion, one per row.
+ * @param comp The component
+ */
+ public void addComponent(Component comp)
+ {
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.gridy = y++;
+ cons.gridheight = 1;
+ cons.gridwidth = GridBagConstraints.REMAINDER;
+ cons.fill = GridBagConstraints.NONE;
+ cons.anchor = GridBagConstraints.WEST;
+ cons.weightx = 1.0f;
+ cons.insets = new Insets(1,0,1,0);
+
+ gridBag.setConstraints(comp,cons);
+ add(comp);
+ } //}}}
+
+ //{{{ addComponent() method
+ /**
+ * Adds a component to the option pane. Components are
+ * added in a vertical fashion, one per row.
+ * @param comp The component
+ * @param fill Fill parameter to GridBagConstraints
+ * @since jEdit 4.2pre2
+ */
+ public void addComponent(Component comp, int fill)
+ {
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.gridy = y++;
+ cons.gridheight = 1;
+ cons.gridwidth = GridBagConstraints.REMAINDER;
+ cons.fill = fill;
+ cons.anchor = GridBagConstraints.WEST;
+ cons.weightx = 1.0f;
+ cons.insets = new Insets(1,0,1,0);
+
+ gridBag.setConstraints(comp,cons);
+ add(comp);
+ } //}}}
+
+ //{{{ copyToolTips() method
+ private static void copyToolTips(Component c1, Component c2)
+ {
+ int tooltips = 0;
+ int jc = 0;
+ String text = null;
+ JComponent jc1 = null;
+ try
+ {
+ jc1 = (JComponent) c1;
+ text = jc1.getToolTipText();
+ ++jc;
+ if (text != null && text.length() > 0)
+ tooltips++;
+ }
+ catch (Exception e)
+ {
+ }
+
+ JComponent jc2 = null;
+ try
+ {
+ jc2 = (JComponent) c2;
+ String text2 = jc2.getToolTipText();
+ ++jc;
+ if (text2 != null && text2.length() > 0)
+ {
+ text = text2;
+ tooltips++;
+ }
+ }
+ catch (Exception e)
+ {
+ }
+
+ if (tooltips == 1 && jc == 2)
+ {
+ jc1.setToolTipText(text);
+ jc2.setToolTipText(text);
+ }
+
+ } //}}}
+
+ //{{{ addSeparator() method
+ /**
+ * Adds a separator component.
+ * @since jEdit 4.1pre7
+ */
+ public void addSeparator()
+ {
+ addComponent(Box.createVerticalStrut(6));
+
+ JSeparator sep = new JSeparator(SwingConstants.HORIZONTAL);
+
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.gridy = y++;
+ cons.gridheight = 1;
+ cons.gridwidth = GridBagConstraints.REMAINDER;
+ cons.fill = GridBagConstraints.BOTH;
+ cons.anchor = GridBagConstraints.WEST;
+ cons.weightx = 1.0f;
+ //cons.insets = new Insets(1,0,1,0);
+
+ gridBag.setConstraints(sep,cons);
+ add(sep);
+
+ addComponent(Box.createVerticalStrut(6));
+ } //}}}
+
+ //{{{ addSeparator() method
+ /**
+ * Adds a separator component.
+ * @param label The separator label property
+ * @since jEdit 2.6pre2
+ */
+ public void addSeparator(String label)
+ {
+ if(y != 0)
+ addComponent(Box.createVerticalStrut(6));
+
+ Box box = new Box(BoxLayout.X_AXIS);
+ Box box2 = new Box(BoxLayout.Y_AXIS);
+ box2.add(Box.createGlue());
+ box2.add(new JSeparator(SwingConstants.HORIZONTAL));
+ box2.add(Box.createGlue());
+ box.add(box2);
+ JLabel l = new JLabel(jEdit.getProperty(label));
+ l.setMaximumSize(l.getPreferredSize());
+ box.add(l);
+ Box box3 = new Box(BoxLayout.Y_AXIS);
+ box3.add(Box.createGlue());
+ box3.add(new JSeparator(SwingConstants.HORIZONTAL));
+ box3.add(Box.createGlue());
+ box.add(box3);
+
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.gridy = y++;
+ cons.gridheight = 1;
+ cons.gridwidth = GridBagConstraints.REMAINDER;
+ cons.fill = GridBagConstraints.BOTH;
+ cons.anchor = GridBagConstraints.WEST;
+ cons.weightx = 1.0f;
+ cons.insets = new Insets(1,0,1,0);
+
+ gridBag.setConstraints(box,cons);
+ add(box);
+ } //}}}
+
+ //{{{ Protected members
+ /**
+ * Has the option pane been initialized?
+ */
+ protected boolean initialized;
+
+ /**
+ * The layout manager.
+ */
+ protected GridBagLayout gridBag;
+
+ /**
+ * The number of components already added to the layout manager.
+ */
+ protected int y;
+
+ /**
+ * This method should create and arrange the components of the option pane
+ * and initialize the option data displayed to the user. This method
+ * is called when the option pane is first displayed, and is not
+ * called again for the lifetime of the object.
+ */
+ protected void _init() {}
+
+ /**
+ * Called when the options dialog's "ok" button is clicked.
+ * This should save any properties being edited in this option
+ * pane.
+ */
+ protected void _save() {}
+ //}}}
+
+ //{{{ Private members
+ private String name;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/ActionContext.java b/jEdit/org/gjt/sp/jedit/ActionContext.java
index 1eea500..7543a42 100644
--- a/jEdit/org/gjt/sp/jedit/ActionContext.java
+++ b/jEdit/org/gjt/sp/jedit/ActionContext.java
@@ -1,71 +1,71 @@
-/*
- * ActionContext.java - For code sharing between jEdit and VFSBrowser
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import java.util.*;
-
-/**
- * Manages a collection of action sets. There are two instances of this class
- * in jEdit:
- * <ul>
- * <li>{@link org.gjt.sp.jedit.jEdit#getActionContext()} - editor actions
- * <li>{@link org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()} - browser
- * actions
- * </ul>
- *
- * @since jEdit 4.2pre1
- * @author Slava Pestov
- * @version $Id: ActionContext.java 13436 2008-08-27 02:32:08Z ezust $
- */
-public abstract class ActionContext extends JEditActionContext<EditAction, ActionSet>
-{
- //{{{ getActionSetForAction() method
- /**
- * Returns the action set that contains the specified action.
- * This method is still here for binary compatility
- *
- * @param action The action
- * @return the actionSet that contains the given action
- * @since jEdit 4.2pre1
- */
- @Override
- public ActionSet getActionSetForAction(String action)
- {
- return super.getActionSetForAction(action);
- } //}}}
-
- //{{{ getAction() method
- /**
- * Returns the specified action.
- * @param name The action name
- * @return a EditAction or null if it doesn't exist
- * @since jEdit 4.2pre1
- */
- @Override
- public EditAction getAction(String name)
- {
- return super.getAction(name);
- } //}}}
-
-
-}
+/*
+ * ActionContext.java - For code sharing between jEdit and VFSBrowser
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import java.util.*;
+
+/**
+ * Manages a collection of action sets. There are two instances of this class
+ * in jEdit:
+ * <ul>
+ * <li>{@link org.gjt.sp.jedit.jEdit#getActionContext()} - editor actions
+ * <li>{@link org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()} - browser
+ * actions
+ * </ul>
+ *
+ * @since jEdit 4.2pre1
+ * @author Slava Pestov
+ * @version $Id: ActionContext.java 13436 2008-08-27 02:32:08Z ezust $
+ */
+public abstract class ActionContext extends JEditActionContext<EditAction, ActionSet>
+{
+ //{{{ getActionSetForAction() method
+ /**
+ * Returns the action set that contains the specified action.
+ * This method is still here for binary compatility
+ *
+ * @param action The action
+ * @return the actionSet that contains the given action
+ * @since jEdit 4.2pre1
+ */
+ @Override
+ public ActionSet getActionSetForAction(String action)
+ {
+ return super.getActionSetForAction(action);
+ } //}}}
+
+ //{{{ getAction() method
+ /**
+ * Returns the specified action.
+ * @param name The action name
+ * @return a EditAction or null if it doesn't exist
+ * @since jEdit 4.2pre1
+ */
+ @Override
+ public EditAction getAction(String name)
+ {
+ return super.getAction(name);
+ } //}}}
+
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/ActionListHandler.java b/jEdit/org/gjt/sp/jedit/ActionListHandler.java
index a4a0c0d..ca0eba4 100644
--- a/jEdit/org/gjt/sp/jedit/ActionListHandler.java
+++ b/jEdit/org/gjt/sp/jedit/ActionListHandler.java
@@ -1,197 +1,197 @@
-/*
- * ActionListHandler.java - XML handler for action files
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001 Slava Pestov
- * Portions copyright (C) 1999 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.util.Stack;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-//}}}
-
-/**
- * This class loads the actions.xml files into a {@link JEditActionSet}. * @author Slava Pestov
- * @author Mike Dillon
- */
-class ActionListHandler extends DefaultHandler
-{
- //{{{ ActionListHandler constructor
- ActionListHandler(String path, JEditActionSet actionSet)
- {
- this.path = path;
- this.actionSet = actionSet;
- stateStack = new Stack<String>();
- code = new StringBuilder();
- isSelected = new StringBuilder();
- } //}}}
-
- //{{{ resolveEntity() method
- @Override
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "actions.dtd", getClass());
- } //}}}
-
- //{{{ attribute() method
- public void attribute(String aname, String value, boolean isSpecified)
- {
- aname = (aname == null) ? null : aname.intern();
- value = (value == null) ? null : value.intern();
-
- if(aname == "NAME")
- actionName = value;
- else if(aname == "NO_REPEAT")
- noRepeat = (value == "TRUE");
- else if(aname == "NO_RECORD")
- noRecord = (value == "TRUE");
- else if(aname == "NO_REMEMBER_LAST")
- noRememberLast = (value == "TRUE");
- } //}}}
-
- //{{{ characters() method
- @Override
- public void characters(char[] c, int off, int len)
- {
- String tag = peekElement();
- if (tag.equals("CODE"))
- {
- code.append(c, off, len);
- }
- else if (tag.equals("IS_SELECTED"))
- {
- isSelected.append(c, off, len);
- }
- } //}}}
-
- //{{{ startElement() method
- @Override
- public void startElement(String uri, String localName,
- String qName, Attributes attrs)
- {
- String tag = pushElement(qName);
-
- if (tag.equals("ACTION"))
- {
- actionName = attrs.getValue("NAME");
- noRepeat = "TRUE".equals(attrs.getValue("NO_REPEAT"));
- noRecord = "TRUE".equals(attrs.getValue("NO_RECORD"));
- noRememberLast = "TRUE".equals(attrs.getValue("NO_REMEMBER_LAST"));
- code.setLength(0);
- isSelected.setLength(0);
- }
- } //}}}
-
- //{{{ endElement() method
- @Override
- public void endElement(String uri, String localName, String qName)
- {
- String tag = peekElement();
-
- if (qName.equals(tag))
- {
- if (tag.equals("ACTION"))
- {
- String selected = (isSelected.length() > 0) ?
- isSelected.toString() : null;
- JEditAbstractEditAction action =
- actionSet.createBeanShellAction(actionName,
- code.toString(),
- selected,
- noRepeat,
- noRecord,
- noRememberLast);
- actionSet.addAction(action);
- noRepeat = noRecord = noRememberLast = false;
- code.setLength(0);
- isSelected.setLength(0);
- }
-
- popElement();
- }
- else
- {
- // can't happen
- throw new InternalError();
- }
- } //}}}
-
- //{{{ startDocument() method
- @Override
- public void startDocument()
- {
- try
- {
- pushElement(null);
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR,this, e);
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private String path;
- private JEditActionSet actionSet;
-
- private String actionName;
- private final StringBuilder code;
- private final StringBuilder isSelected;
-
- private boolean noRepeat;
- private boolean noRecord;
- private boolean noRememberLast;
-
- private final Stack<String> stateStack;
- //}}}
-
- //{{{ pushElement() method
- private String pushElement(String name)
- {
- name = (name == null) ? null : name.intern();
-
- stateStack.push(name);
-
- return name;
- } //}}}
-
- //{{{ peekElement() method
- private String peekElement()
- {
- return stateStack.peek();
- } //}}}
-
- //{{{ popElement() method
- private String popElement()
- {
- return stateStack.pop();
- } //}}}
-
- //}}}
-}
+/*
+ * ActionListHandler.java - XML handler for action files
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001 Slava Pestov
+ * Portions copyright (C) 1999 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.util.Stack;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+//}}}
+
+/**
+ * This class loads the actions.xml files into a {@link JEditActionSet}. * @author Slava Pestov
+ * @author Mike Dillon
+ */
+class ActionListHandler extends DefaultHandler
+{
+ //{{{ ActionListHandler constructor
+ ActionListHandler(String path, JEditActionSet actionSet)
+ {
+ this.path = path;
+ this.actionSet = actionSet;
+ stateStack = new Stack<String>();
+ code = new StringBuilder();
+ isSelected = new StringBuilder();
+ } //}}}
+
+ //{{{ resolveEntity() method
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "actions.dtd", getClass());
+ } //}}}
+
+ //{{{ attribute() method
+ public void attribute(String aname, String value, boolean isSpecified)
+ {
+ aname = (aname == null) ? null : aname.intern();
+ value = (value == null) ? null : value.intern();
+
+ if(aname == "NAME")
+ actionName = value;
+ else if(aname == "NO_REPEAT")
+ noRepeat = (value == "TRUE");
+ else if(aname == "NO_RECORD")
+ noRecord = (value == "TRUE");
+ else if(aname == "NO_REMEMBER_LAST")
+ noRememberLast = (value == "TRUE");
+ } //}}}
+
+ //{{{ characters() method
+ @Override
+ public void characters(char[] c, int off, int len)
+ {
+ String tag = peekElement();
+ if (tag.equals("CODE"))
+ {
+ code.append(c, off, len);
+ }
+ else if (tag.equals("IS_SELECTED"))
+ {
+ isSelected.append(c, off, len);
+ }
+ } //}}}
+
+ //{{{ startElement() method
+ @Override
+ public void startElement(String uri, String localName,
+ String qName, Attributes attrs)
+ {
+ String tag = pushElement(qName);
+
+ if (tag.equals("ACTION"))
+ {
+ actionName = attrs.getValue("NAME");
+ noRepeat = "TRUE".equals(attrs.getValue("NO_REPEAT"));
+ noRecord = "TRUE".equals(attrs.getValue("NO_RECORD"));
+ noRememberLast = "TRUE".equals(attrs.getValue("NO_REMEMBER_LAST"));
+ code.setLength(0);
+ isSelected.setLength(0);
+ }
+ } //}}}
+
+ //{{{ endElement() method
+ @Override
+ public void endElement(String uri, String localName, String qName)
+ {
+ String tag = peekElement();
+
+ if (qName.equals(tag))
+ {
+ if (tag.equals("ACTION"))
+ {
+ String selected = (isSelected.length() > 0) ?
+ isSelected.toString() : null;
+ JEditAbstractEditAction action =
+ actionSet.createBeanShellAction(actionName,
+ code.toString(),
+ selected,
+ noRepeat,
+ noRecord,
+ noRememberLast);
+ actionSet.addAction(action);
+ noRepeat = noRecord = noRememberLast = false;
+ code.setLength(0);
+ isSelected.setLength(0);
+ }
+
+ popElement();
+ }
+ else
+ {
+ // can't happen
+ throw new InternalError();
+ }
+ } //}}}
+
+ //{{{ startDocument() method
+ @Override
+ public void startDocument()
+ {
+ try
+ {
+ pushElement(null);
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR,this, e);
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private String path;
+ private JEditActionSet actionSet;
+
+ private String actionName;
+ private final StringBuilder code;
+ private final StringBuilder isSelected;
+
+ private boolean noRepeat;
+ private boolean noRecord;
+ private boolean noRememberLast;
+
+ private final Stack<String> stateStack;
+ //}}}
+
+ //{{{ pushElement() method
+ private String pushElement(String name)
+ {
+ name = (name == null) ? null : name.intern();
+
+ stateStack.push(name);
+
+ return name;
+ } //}}}
+
+ //{{{ peekElement() method
+ private String peekElement()
+ {
+ return stateStack.peek();
+ } //}}}
+
+ //{{{ popElement() method
+ private String popElement()
+ {
+ return stateStack.pop();
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/ActionSet.java b/jEdit/org/gjt/sp/jedit/ActionSet.java
index c78ec3a..b30974c 100644
--- a/jEdit/org/gjt/sp/jedit/ActionSet.java
+++ b/jEdit/org/gjt/sp/jedit/ActionSet.java
@@ -1,335 +1,335 @@
-/*
- * ActionSet.java - A set of actions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ imports
-import java.net.URL;
-import java.util.*;
-
-import org.gjt.sp.jedit.input.AbstractInputHandler;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * A set of actions, either loaded from an XML file, or constructed at runtime
- * by a plugin. <p>
- *
- * <h3>Action sets loaded from XML files</h3>
- *
- * Action sets are read from these files inside the plugin JAR:
- * <ul>
- * <li><code>actions.xml</code> - actions made available for use in jEdit views,
- * including the view's <b>Plugins</b> menu, the tool bar, etc.</li>
- * <li><code>browser.actions.xml</code> - actions for the file system browser's
- * <b>Plugins</b> menu.</li>
- * </ul>
- *
- * An action definition file has the following form:
- *
- * <pre><?xml version="1.0"?>
- *<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
- *<ACTIONS>
- * <ACTION NAME="some-action">
- * <CODE>
- * // BeanShell code evaluated when the action is invoked
- * </CODE>
- * </ACTION>
- * <ACTION NAME="some-toggle-action">
- * <CODE>
- * // BeanShell code evaluated when the action is invoked
- * </CODE>
- * <IS_SELECTED>
- * // BeanShell code that should evaluate to true or false
- * </IS_SELECTED>
- * </ACTION>
- *</ACTIONS></pre>
- *
- * The following elements are valid:
- *
- * <ul>
- * <li>
- * <code>ACTIONS</code> is the top-level element and refers
- * to the set of actions used by the plugin.
- * </li>
- * <li>
- * An <code>ACTION</code> contains the data for a particular action.
- * It has three attributes: a required <code>NAME</code>;
- * an optional <code>NO_REPEAT</code>, which is a flag
- * indicating whether the action should not be repeated with the
- * <b>C+ENTER</b> command; and an optional
- * <code>NO_RECORD</code> which is a a flag indicating whether the
- * action should be recorded if it is invoked while the user is recording a
- * macro. The two flag attributes
- * can have two possible values, "TRUE" or
- * "FALSE". In both cases, "FALSE" is the
- * default if the attribute is not specified.
- * </li>
- * <li>
- * An <code>ACTION</code> can have two child elements
- * within it: a required <code>CODE</code> element which
- * specifies the
- * BeanShell code that will be executed when the action is invoked,
- * and an optional <code>IS_SELECTED</code> element, used for
- * checkbox
- * menu items. The <code>IS_SELECTED</code> element contains
- * BeanShell code that returns a boolean flag that will
- * determine the state of the checkbox.
- * </li>
- * </ul>
- *
- * Each action must have a property <code><i>name</i>.label</code> containing
- * the action's menu item label.
- *
- * <h3>View actions</h3>
- *
- * Actions defined in <code>actions.xml</code> can be added to the view's
- * <b>Plugins</b> menu; see {@link EditPlugin}.
- * The action code may use any standard predefined
- * BeanShell variable; see {@link BeanShell}.
- *
- * <h3>File system browser actions</h3>
- *
- * Actions defined in <code>actions.xml</code> can be added to the file
- * system browser's <b>Plugins</b> menu; see {@link EditPlugin}.
- * The action code may use any standard predefined
- * BeanShell variable, in addition to a variable <code>browser</code> which
- * contains a reference to the current
- * {@link org.gjt.sp.jedit.browser.VFSBrowser} instance.<p>
- *
- * File system browser actions should not define
- * <code><IS_SELECTED></code> blocks.
- *
- * <h3>Custom action sets</h3>
- *
- * Call {@link jEdit#addActionSet(ActionSet)} to add a custom action set to
- * jEdit's action context. You must also call {@link #initKeyBindings()} for new
- * action sets. Don't forget to call {@link jEdit#removeActionSet(ActionSet)}
- * before your plugin is unloaded, too.
- *
- * @see jEdit#getActionContext()
- * @see org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()
- * @see ActionContext#getActionNames()
- * @see ActionContext#getAction(String)
- * @see jEdit#addActionSet(ActionSet)
- * @see jEdit#removeActionSet(ActionSet)
- * @see PluginJAR#getActionSet()
- * @see BeanShell
- * @see View
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: ActionSet.java 16333 2009-10-14 09:30:00Z kpouer $
- * @since jEdit 4.0pre1
- */
-public class ActionSet extends JEditActionSet<EditAction> implements Comparable
-{
- //{{{ ActionSet constructor
- /**
- * Creates a new action set.
- * @since jEdit 4.0pre1
- */
- public ActionSet()
- {
- label = "<no label set; plugin bug>";
- } //}}}
-
- //{{{ ActionSet constructor
- /**
- * Creates a new action set.
- * @param plugin The plugin
- * @param cachedActionNames The list of cached action names
- * @param cachedActionToggleFlags The list of cached action toggle flags
- * @param uri The actions.xml URI
- * @since jEdit 4.2pre2
- */
- public ActionSet(PluginJAR plugin, String[] cachedActionNames,
- boolean[] cachedActionToggleFlags, URL uri)
- {
- this();
- this.plugin = plugin;
- this.uri = uri;
- if(cachedActionNames != null)
- {
- for(int i = 0; i < cachedActionNames.length; i++)
- {
- actions.put(cachedActionNames[i],placeholder);
- jEdit.setTemporaryProperty(cachedActionNames[i]
- + ".toggle",cachedActionToggleFlags[i]
- ? "true" : "false");
- }
- }
- loaded = false;
- } //}}}
-
- //{{{ addAction() method
- /**
- * Adds an action to the action set.
- * It exists for binary compatibility issues
- * @param action The action
- * @since jEdit 4.0pre1
- */
- @Override
- public void addAction(EditAction action)
- {
- super.addAction(action);
- } //}}}
-
- //{{{ getArray() method
- protected EditAction[] getArray(int size)
- {
- return new EditAction[size];
- } //}}}
-
- //{{{ getActions() method
- /**
- * Returns an array of all actions in this action set.<p>
- *
- * <b>Deferred loading:</b> this will load the action set if necessary.
- *
- * @since jEdit 4.0pre1
- */
- @Override
- public EditAction[] getActions()
- {
- return super.getActions();
- } //}}}
-
- //{{{ ActionSet constructor
- /**
- * Creates a new action set.
- * @param label The label, shown in the shortcuts option pane
- * @since jEdit 4.0pre1
- */
- public ActionSet(String label)
- {
- this();
- setLabel(label);
- } //}}}
-
- //{{{ getLabel() method
- /**
- * Return the action source label.
- * @since jEdit 4.0pre1
- */
- public String getLabel()
- {
- return label;
- } //}}}
-
- //{{{ setLabel() method
- /**
- * Sets the action source label.
- * @param label The label
- * @since jEdit 4.0pre1
- */
- public void setLabel(String label)
- {
- if(label == null)
- throw new NullPointerException();
- this.label = label;
- } //}}}
-
- //{{{ getPluginJAR() method
- /**
- * Return the plugin this action set was loaded from, or null.
- * @since jEdit 4.2pre13
- */
- public PluginJAR getPluginJAR()
- {
- return plugin;
- } //}}}
-
- //{{{ getCacheableActionNames() method
- /**
- * Returns an array of all action names in this action set that should
- * be cached; namely, <code>BeanShellAction</code>s.
- * @since jEdit 4.2pre1
- */
- @Override
- public String[] getCacheableActionNames()
- {
- LinkedList<String> retVal = new LinkedList<String>();
- Enumeration e = actions.elements();
- while(e.hasMoreElements())
- {
- Object obj = e.nextElement();
- if(obj == placeholder)
- {
- // ??? this should only be called with
- // fully loaded action set
- Log.log(Log.WARNING,this,"Action set not up "
- + "to date");
- }
- else if(obj instanceof BeanShellAction)
- retVal.add(((BeanShellAction)obj).getName());
- }
- return retVal.toArray(new String[retVal.size()]);
- } //}}}
-
- //{{{ getProperty() method
- protected String getProperty(String name)
- {
- return jEdit.getProperty(name);
- } //}}}
-
- //{{{ getInputHandler() method
- public AbstractInputHandler getInputHandler()
- {
- return jEdit.getInputHandler();
- } //}}}
-
- //{{{ compareTo() method
- public int compareTo(Object o)
- {
- return label.compareTo(((ActionSet)o).label);
- }//}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- return label;
- } //}}}
-
- //{{{ createBeanShellAction() method
- /**
- * Creates a BeanShellAction.
- * @since 4.3pre13
- */
- protected EditAction createBeanShellAction(String actionName,
- String code,
- String selected,
- boolean noRepeat,
- boolean noRecord,
- boolean noRememberLast)
- {
- return new BeanShellAction(actionName,code,selected,noRepeat,noRecord,noRememberLast);
- }
- //}}}
-
- //{{{ Private members
- private String label;
- private PluginJAR plugin;
- //}}}
-
-}
+/*
+ * ActionSet.java - A set of actions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ imports
+import java.net.URL;
+import java.util.*;
+
+import org.gjt.sp.jedit.input.AbstractInputHandler;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * A set of actions, either loaded from an XML file, or constructed at runtime
+ * by a plugin. <p>
+ *
+ * <h3>Action sets loaded from XML files</h3>
+ *
+ * Action sets are read from these files inside the plugin JAR:
+ * <ul>
+ * <li><code>actions.xml</code> - actions made available for use in jEdit views,
+ * including the view's <b>Plugins</b> menu, the tool bar, etc.</li>
+ * <li><code>browser.actions.xml</code> - actions for the file system browser's
+ * <b>Plugins</b> menu.</li>
+ * </ul>
+ *
+ * An action definition file has the following form:
+ *
+ * <pre><?xml version="1.0"?>
+ *<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
+ *<ACTIONS>
+ * <ACTION NAME="some-action">
+ * <CODE>
+ * // BeanShell code evaluated when the action is invoked
+ * </CODE>
+ * </ACTION>
+ * <ACTION NAME="some-toggle-action">
+ * <CODE>
+ * // BeanShell code evaluated when the action is invoked
+ * </CODE>
+ * <IS_SELECTED>
+ * // BeanShell code that should evaluate to true or false
+ * </IS_SELECTED>
+ * </ACTION>
+ *</ACTIONS></pre>
+ *
+ * The following elements are valid:
+ *
+ * <ul>
+ * <li>
+ * <code>ACTIONS</code> is the top-level element and refers
+ * to the set of actions used by the plugin.
+ * </li>
+ * <li>
+ * An <code>ACTION</code> contains the data for a particular action.
+ * It has three attributes: a required <code>NAME</code>;
+ * an optional <code>NO_REPEAT</code>, which is a flag
+ * indicating whether the action should not be repeated with the
+ * <b>C+ENTER</b> command; and an optional
+ * <code>NO_RECORD</code> which is a a flag indicating whether the
+ * action should be recorded if it is invoked while the user is recording a
+ * macro. The two flag attributes
+ * can have two possible values, "TRUE" or
+ * "FALSE". In both cases, "FALSE" is the
+ * default if the attribute is not specified.
+ * </li>
+ * <li>
+ * An <code>ACTION</code> can have two child elements
+ * within it: a required <code>CODE</code> element which
+ * specifies the
+ * BeanShell code that will be executed when the action is invoked,
+ * and an optional <code>IS_SELECTED</code> element, used for
+ * checkbox
+ * menu items. The <code>IS_SELECTED</code> element contains
+ * BeanShell code that returns a boolean flag that will
+ * determine the state of the checkbox.
+ * </li>
+ * </ul>
+ *
+ * Each action must have a property <code><i>name</i>.label</code> containing
+ * the action's menu item label.
+ *
+ * <h3>View actions</h3>
+ *
+ * Actions defined in <code>actions.xml</code> can be added to the view's
+ * <b>Plugins</b> menu; see {@link EditPlugin}.
+ * The action code may use any standard predefined
+ * BeanShell variable; see {@link BeanShell}.
+ *
+ * <h3>File system browser actions</h3>
+ *
+ * Actions defined in <code>actions.xml</code> can be added to the file
+ * system browser's <b>Plugins</b> menu; see {@link EditPlugin}.
+ * The action code may use any standard predefined
+ * BeanShell variable, in addition to a variable <code>browser</code> which
+ * contains a reference to the current
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser} instance.<p>
+ *
+ * File system browser actions should not define
+ * <code><IS_SELECTED></code> blocks.
+ *
+ * <h3>Custom action sets</h3>
+ *
+ * Call {@link jEdit#addActionSet(ActionSet)} to add a custom action set to
+ * jEdit's action context. You must also call {@link #initKeyBindings()} for new
+ * action sets. Don't forget to call {@link jEdit#removeActionSet(ActionSet)}
+ * before your plugin is unloaded, too.
+ *
+ * @see jEdit#getActionContext()
+ * @see org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()
+ * @see ActionContext#getActionNames()
+ * @see ActionContext#getAction(String)
+ * @see jEdit#addActionSet(ActionSet)
+ * @see jEdit#removeActionSet(ActionSet)
+ * @see PluginJAR#getActionSet()
+ * @see BeanShell
+ * @see View
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: ActionSet.java 16333 2009-10-14 09:30:00Z kpouer $
+ * @since jEdit 4.0pre1
+ */
+public class ActionSet extends JEditActionSet<EditAction> implements Comparable
+{
+ //{{{ ActionSet constructor
+ /**
+ * Creates a new action set.
+ * @since jEdit 4.0pre1
+ */
+ public ActionSet()
+ {
+ label = "<no label set; plugin bug>";
+ } //}}}
+
+ //{{{ ActionSet constructor
+ /**
+ * Creates a new action set.
+ * @param plugin The plugin
+ * @param cachedActionNames The list of cached action names
+ * @param cachedActionToggleFlags The list of cached action toggle flags
+ * @param uri The actions.xml URI
+ * @since jEdit 4.2pre2
+ */
+ public ActionSet(PluginJAR plugin, String[] cachedActionNames,
+ boolean[] cachedActionToggleFlags, URL uri)
+ {
+ this();
+ this.plugin = plugin;
+ this.uri = uri;
+ if(cachedActionNames != null)
+ {
+ for(int i = 0; i < cachedActionNames.length; i++)
+ {
+ actions.put(cachedActionNames[i],placeholder);
+ jEdit.setTemporaryProperty(cachedActionNames[i]
+ + ".toggle",cachedActionToggleFlags[i]
+ ? "true" : "false");
+ }
+ }
+ loaded = false;
+ } //}}}
+
+ //{{{ addAction() method
+ /**
+ * Adds an action to the action set.
+ * It exists for binary compatibility issues
+ * @param action The action
+ * @since jEdit 4.0pre1
+ */
+ @Override
+ public void addAction(EditAction action)
+ {
+ super.addAction(action);
+ } //}}}
+
+ //{{{ getArray() method
+ protected EditAction[] getArray(int size)
+ {
+ return new EditAction[size];
+ } //}}}
+
+ //{{{ getActions() method
+ /**
+ * Returns an array of all actions in this action set.<p>
+ *
+ * <b>Deferred loading:</b> this will load the action set if necessary.
+ *
+ * @since jEdit 4.0pre1
+ */
+ @Override
+ public EditAction[] getActions()
+ {
+ return super.getActions();
+ } //}}}
+
+ //{{{ ActionSet constructor
+ /**
+ * Creates a new action set.
+ * @param label The label, shown in the shortcuts option pane
+ * @since jEdit 4.0pre1
+ */
+ public ActionSet(String label)
+ {
+ this();
+ setLabel(label);
+ } //}}}
+
+ //{{{ getLabel() method
+ /**
+ * Return the action source label.
+ * @since jEdit 4.0pre1
+ */
+ public String getLabel()
+ {
+ return label;
+ } //}}}
+
+ //{{{ setLabel() method
+ /**
+ * Sets the action source label.
+ * @param label The label
+ * @since jEdit 4.0pre1
+ */
+ public void setLabel(String label)
+ {
+ if(label == null)
+ throw new NullPointerException();
+ this.label = label;
+ } //}}}
+
+ //{{{ getPluginJAR() method
+ /**
+ * Return the plugin this action set was loaded from, or null.
+ * @since jEdit 4.2pre13
+ */
+ public PluginJAR getPluginJAR()
+ {
+ return plugin;
+ } //}}}
+
+ //{{{ getCacheableActionNames() method
+ /**
+ * Returns an array of all action names in this action set that should
+ * be cached; namely, <code>BeanShellAction</code>s.
+ * @since jEdit 4.2pre1
+ */
+ @Override
+ public String[] getCacheableActionNames()
+ {
+ LinkedList<String> retVal = new LinkedList<String>();
+ Enumeration e = actions.elements();
+ while(e.hasMoreElements())
+ {
+ Object obj = e.nextElement();
+ if(obj == placeholder)
+ {
+ // ??? this should only be called with
+ // fully loaded action set
+ Log.log(Log.WARNING,this,"Action set not up "
+ + "to date");
+ }
+ else if(obj instanceof BeanShellAction)
+ retVal.add(((BeanShellAction)obj).getName());
+ }
+ return retVal.toArray(new String[retVal.size()]);
+ } //}}}
+
+ //{{{ getProperty() method
+ protected String getProperty(String name)
+ {
+ return jEdit.getProperty(name);
+ } //}}}
+
+ //{{{ getInputHandler() method
+ public AbstractInputHandler getInputHandler()
+ {
+ return jEdit.getInputHandler();
+ } //}}}
+
+ //{{{ compareTo() method
+ public int compareTo(Object o)
+ {
+ return label.compareTo(((ActionSet)o).label);
+ }//}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ return label;
+ } //}}}
+
+ //{{{ createBeanShellAction() method
+ /**
+ * Creates a BeanShellAction.
+ * @since 4.3pre13
+ */
+ protected EditAction createBeanShellAction(String actionName,
+ String code,
+ String selected,
+ boolean noRepeat,
+ boolean noRecord,
+ boolean noRememberLast)
+ {
+ return new BeanShellAction(actionName,code,selected,noRepeat,noRecord,noRememberLast);
+ }
+ //}}}
+
+ //{{{ Private members
+ private String label;
+ private PluginJAR plugin;
+ //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/Autosave.java b/jEdit/org/gjt/sp/jedit/Autosave.java
index 0d98a90..5bb011d 100644
--- a/jEdit/org/gjt/sp/jedit/Autosave.java
+++ b/jEdit/org/gjt/sp/jedit/Autosave.java
@@ -1,110 +1,110 @@
-/*
- * Autosave.java - Autosave manager
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import javax.swing.Timer;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: Autosave.java 12504 2008-04-22 23:12:43Z ezust $
- */
-class Autosave implements ActionListener
-{
- //{{{ setInterval() method
- public static void setInterval(int interval)
- {
- if(interval == 0)
- {
- if(timer != null)
- {
- timer.stop();
- timer = null;
- }
-
- return;
- }
-
- interval *= 1000;
-
- if(timer == null)
- {
- timer = new Timer(interval,new Autosave());
- timer.start();
- }
- else
- timer.setDelay(interval);
- } //}}}
-
- //{{{ stop() method
- public static void stop()
- {
- if(timer != null)
- timer.stop();
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- if (jEdit.getIntegerProperty("autosave",0) == 0)
- return;
- // might come in handy useful some time
- /* Runtime runtime = Runtime.getRuntime();
- int freeMemory = (int)(runtime.freeMemory() / 1024);
- int totalMemory = (int)(runtime.totalMemory() / 1024);
- int usedMemory = (totalMemory - freeMemory);
-
- Log.log(Log.DEBUG,this,"Java heap: " + usedMemory + "Kb / "
- + totalMemory + "Kb, " + (usedMemory * 100 / totalMemory)
- + "%"); */
-
- // save list of open files
- if(jEdit.getViewCount() != 0
- && PerspectiveManager.isPerspectiveDirty())
- {
- PerspectiveManager.setPerspectiveDirty(false);
- PerspectiveManager.savePerspective(true);
- }
- boolean autosaveUntitled = jEdit.getBooleanProperty("autosaveUntitled");
- Buffer[] bufferArray = jEdit.getBuffers();
- for(int i = 0; i < bufferArray.length; i++)
- {
- Buffer buffer = bufferArray[i];
- if (autosaveUntitled || !buffer.isUntitled())
- buffer.autosave();
- }
-
- // flush log
- Log.flushStream();
- } //}}}
-
- //{{{ Private members
- private static Timer timer;
-
- private Autosave() {}
- //}}}
-}
+/*
+ * Autosave.java - Autosave manager
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import javax.swing.Timer;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: Autosave.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+class Autosave implements ActionListener
+{
+ //{{{ setInterval() method
+ public static void setInterval(int interval)
+ {
+ if(interval == 0)
+ {
+ if(timer != null)
+ {
+ timer.stop();
+ timer = null;
+ }
+
+ return;
+ }
+
+ interval *= 1000;
+
+ if(timer == null)
+ {
+ timer = new Timer(interval,new Autosave());
+ timer.start();
+ }
+ else
+ timer.setDelay(interval);
+ } //}}}
+
+ //{{{ stop() method
+ public static void stop()
+ {
+ if(timer != null)
+ timer.stop();
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ if (jEdit.getIntegerProperty("autosave",0) == 0)
+ return;
+ // might come in handy useful some time
+ /* Runtime runtime = Runtime.getRuntime();
+ int freeMemory = (int)(runtime.freeMemory() / 1024);
+ int totalMemory = (int)(runtime.totalMemory() / 1024);
+ int usedMemory = (totalMemory - freeMemory);
+
+ Log.log(Log.DEBUG,this,"Java heap: " + usedMemory + "Kb / "
+ + totalMemory + "Kb, " + (usedMemory * 100 / totalMemory)
+ + "%"); */
+
+ // save list of open files
+ if(jEdit.getViewCount() != 0
+ && PerspectiveManager.isPerspectiveDirty())
+ {
+ PerspectiveManager.setPerspectiveDirty(false);
+ PerspectiveManager.savePerspective(true);
+ }
+ boolean autosaveUntitled = jEdit.getBooleanProperty("autosaveUntitled");
+ Buffer[] bufferArray = jEdit.getBuffers();
+ for(int i = 0; i < bufferArray.length; i++)
+ {
+ Buffer buffer = bufferArray[i];
+ if (autosaveUntitled || !buffer.isUntitled())
+ buffer.autosave();
+ }
+
+ // flush log
+ Log.flushStream();
+ } //}}}
+
+ //{{{ Private members
+ private static Timer timer;
+
+ private Autosave() {}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/BeanShell.java b/jEdit/org/gjt/sp/jedit/BeanShell.java
index e755785..10ba218 100644
--- a/jEdit/org/gjt/sp/jedit/BeanShell.java
+++ b/jEdit/org/gjt/sp/jedit/BeanShell.java
@@ -1,587 +1,587 @@
-/*
- * BeanShell.java - BeanShell scripting support
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import org.gjt.sp.jedit.bsh.*;
-
-import java.io.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.gui.BeanShellErrorDialog;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * BeanShell is jEdit's extension language.<p>
- *
- * When run from jEdit, BeanShell code has access to the following predefined
- * variables:
- *
- * <ul>
- * <li><code>view</code> - the currently active {@link View}.</li>
- * <li><code>editPane</code> - the currently active {@link EditPane}.</li>
- * <li><code>textArea</code> - the edit pane's {@link JEditTextArea}.</li>
- * <li><code>buffer</code> - the edit pane's {@link Buffer}.</li>
- * <li><code>wm</code> - the view's {@link
- * org.gjt.sp.jedit.gui.DockableWindowManager}.</li>
- * <li><code>scriptPath</code> - the path name of the currently executing
- * BeanShell script.</li>
- * </ul>
- *
- * @author Slava Pestov
- * @version $Id: BeanShell.java 14851 2009-03-26 10:34:42Z kpouer $
- */
-public class BeanShell
-{
- private static final BeanShellFacade<View> bsh = new MyBeanShellFacade();
-
- static void init()
- {
- Log.log(Log.MESSAGE, BeanShell.class, "Beanshell Init");
- }
-
- //{{{ evalSelection() method
- /**
- * Evaluates the text selected in the specified text area.
- * @since jEdit 2.7pre2
- */
- public static void evalSelection(View view, JEditTextArea textArea)
- {
- bsh.evalSelection(view, textArea);
- } //}}}
-
- //{{{ showEvaluateDialog() method
- /**
- * Prompts for a BeanShell expression to evaluate.
- * @since jEdit 2.7pre2
- */
- public static void showEvaluateDialog(View view)
- {
- String command = GUIUtilities.input(view,"beanshell-eval-input",null);
- if(command != null)
- {
- if(!command.endsWith(";"))
- command = command + ";";
-
- int repeat = view.getInputHandler().getRepeatCount();
-
- if(view.getMacroRecorder() != null)
- {
- view.getMacroRecorder().record(repeat,command);
- }
-
- Object returnValue = null;
- try
- {
- for(int i = 0; i < repeat; i++)
- {
- returnValue = bsh._eval(view,bsh.getNameSpace(),command);
- }
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,BeanShell.class,e);
-
- bsh.handleException(view,null,e);
- }
-
- if(returnValue != null)
- {
- String[] args = { returnValue.toString() };
- GUIUtilities.message(view,"beanshell-eval",args);
- }
- }
- } //}}}
-
- //{{{ showEvaluateLinesDialog() method
- /**
- * Evaluates the specified script for each selected line.
- * @since jEdit 4.0pre1
- */
- public static void showEvaluateLinesDialog(View view)
- {
- String command = GUIUtilities.input(view,"beanshell-eval-line",null);
-
- JEditTextArea textArea = view.getTextArea();
- Buffer buffer = view.getBuffer();
-
- if(command == null || command.length() == 0)
- return;
-
- Selection[] selection = textArea.getSelection();
- if(selection.length == 0)
- {
- view.getToolkit().beep();
- return;
- }
-
- if(!command.endsWith(";"))
- command = command + ";";
-
- String script = "int[] lines = textArea.getSelectedLines();\n"
- + "for(int i = 0; i < lines.length; i++)\n"
- + "{\n"
- + "line = lines[i];\n"
- + "index = line - lines[0];\n"
- + "start = buffer.getLineStartOffset(line);\n"
- + "end = buffer.getLineEndOffset(line);\n"
- + "text = buffer.getText(start,end - start - 1);\n"
- + "newText = " + command + "\n"
- + "if(newText != null)\n"
- + "{\n"
- + "buffer.remove(start,end - start - 1);\n"
- + "buffer.insert(start,String.valueOf(newText));\n"
- + "}\n"
- + "}\n";
-
- if(view.getMacroRecorder() != null)
- view.getMacroRecorder().record(1,script);
-
- try
- {
- buffer.beginCompoundEdit();
-
- bsh.eval(view,script);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
-
- textArea.selectNone();
- } //}}}
-
- //{{{ runScript() method
- /**
- * Runs a BeanShell script. Errors are shown in a dialog box.<p>
- *
- * If the <code>in</code> parameter is non-null, the script is
- * read from that stream; otherwise it is read from the file identified
- * by <code>path</code>.<p>
- *
- * The <code>scriptPath</code> BeanShell variable is set to the path
- * name of the script.
- *
- * @param view The view. Within the script, references to
- * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- * are determined with reference to this parameter.
- * @param path The script file's VFS path.
- * @param in The reader to read the script from, or <code>null</code>.
- * @param ownNamespace If set to <code>false</code>, methods and
- * variables defined in the script will be available to all future
- * uses of BeanShell; if set to <code>true</code>, they will be lost as
- * soon as the script finishes executing. jEdit uses a value of
- * <code>false</code> when running startup scripts, and a value of
- * <code>true</code> when running all other macros.
- *
- * @since jEdit 4.0pre7
- */
- public static void runScript(View view, String path, Reader in,
- boolean ownNamespace)
- {
- try
- {
- _runScript(view,path,in,ownNamespace);
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,BeanShell.class,e);
-
- bsh.handleException(view,path,e);
- }
- } //}}}
-
- //{{{ runScript() method
- /**
- * Runs a BeanShell script. Errors are shown in a dialog box.<p>
- *
- * If the <code>in</code> parameter is non-null, the script is
- * read from that stream; otherwise it is read from the file identified
- * by <code>path</code>.<p>
- *
- * The <code>scriptPath</code> BeanShell variable is set to the path
- * name of the script.
- *
- * @param view The view. Within the script, references to
- * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- * are determined with reference to this parameter.
- * @param path The script file's VFS path.
- * @param in The reader to read the script from, or <code>null</code>.
- * @param namespace The namespace to run the script in.
- *
- * @since jEdit 4.2pre5
- */
- public static void runScript(View view, String path, Reader in,
- NameSpace namespace)
- {
- try
- {
- _runScript(view,path,in,namespace);
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,BeanShell.class,e);
-
- bsh.handleException(view,path,e);
- }
- } //}}}
-
- //{{{ _runScript() method
- /**
- * Runs a BeanShell script. Errors are passed to the caller.<p>
- *
- * If the <code>in</code> parameter is non-null, the script is
- * read from that stream; otherwise it is read from the file identified
- * by <code>path</code>.<p>
- *
- * The <code>scriptPath</code> BeanShell variable is set to the path
- * name of the script.
- *
- * @param view The view. Within the script, references to
- * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- * are determined with reference to this parameter.
- * @param path The script file's VFS path.
- * @param in The reader to read the script from, or <code>null</code>.
- * @param ownNamespace If set to <code>false</code>, methods and
- * variables defined in the script will be available to all future
- * uses of BeanShell; if set to <code>true</code>, they will be lost as
- * soon as the script finishes executing. jEdit uses a value of
- * <code>false</code> when running startup scripts, and a value of
- * <code>true</code> when running all other macros.
- * @exception Exception instances are thrown when various BeanShell errors
- * occur
- * @since jEdit 4.0pre7
- */
- public static void _runScript(View view, String path, Reader in,
- boolean ownNamespace) throws Exception
- {
- _runScript(view,path,in,ownNamespace
- ? new NameSpace(bsh.getNameSpace(),"namespace")
- : bsh.getNameSpace());
- } //}}}
-
- //{{{ _runScript() method
- /**
- * Runs a BeanShell script. Errors are passed to the caller.<p>
- *
- * If the <code>in</code> parameter is non-null, the script is
- * read from that stream; otherwise it is read from the file identified
- * by <code>path</code>.<p>
- *
- * The <code>scriptPath</code> BeanShell variable is set to the path
- * name of the script.
- *
- * @param view The view. Within the script, references to
- * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- * are determined with reference to this parameter.
- * @param path The script file's VFS path.
- * @param in The reader to read the script from, or <code>null</code>.
- * @param namespace The namespace to run the script in.
- * @exception Exception instances are thrown when various BeanShell errors
- * occur
- * @since jEdit 4.2pre5
- */
- public static void _runScript(View view, String path, Reader in,
- NameSpace namespace) throws Exception
- {
- Log.log(Log.MESSAGE,BeanShell.class,"Running script " + path);
-
- Interpreter interp = BeanShellFacade.createInterpreter(namespace);
-
- try
- {
- if(in == null)
- {
- Buffer buffer = jEdit.openTemporary(null,
- null,path,false);
-
- if(!buffer.isLoaded())
- VFSManager.waitForRequests();
-
- in = new StringReader(buffer.getText(0,
- buffer.getLength()));
- }
-
- bsh.setupDefaultVariables(namespace,view);
- interp.set("scriptPath",path);
-
- running = true;
-
- interp.eval(in,namespace,path);
- }
- catch(Exception e)
- {
- BeanShellFacade.unwrapException(e);
- }
- finally
- {
- running = false;
- try
- {
- // no need to do this for macros!
- if(namespace == bsh.getNameSpace())
- {
- bsh.resetDefaultVariables(namespace);
- interp.unset("scriptPath");
- }
- }
- catch(EvalError e)
- {
- // do nothing
- }
- }
- } //}}}
-
- //{{{ eval() method
- /**
- * Evaluates the specified BeanShell expression. Errors are reported in
- * a dialog box.
- * @param view The view. Within the script, references to
- * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- * are determined with reference to this parameter.
- * @param namespace The namespace
- * @param command The expression
- * @since jEdit 4.0pre8
- */
- public static Object eval(View view, NameSpace namespace, String command)
- {
- return bsh.eval(view, namespace, command);
- } //}}}
-
- //{{{ _eval() method
- /**
- * Evaluates the specified BeanShell expression. Unlike
- * <code>eval()</code>, this method passes any exceptions to the caller.
- *
- * @param view The view. Within the script, references to
- * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- * are determined with reference to this parameter.
- * @param namespace The namespace
- * @param command The expression
- * @exception Exception instances are thrown when various BeanShell
- * errors occur
- * @since jEdit 3.2pre7
- */
- public static Object _eval(View view, NameSpace namespace, String command)
- throws Exception
- {
- return bsh._eval(view, namespace, command);
- } //}}}
-
- //{{{ cacheBlock() method
- /**
- * Caches a block of code, returning a handle that can be passed to
- * runCachedBlock().
- * @param id An identifier. If null, a unique identifier is generated
- * @param code The code
- * @param namespace If true, the namespace will be set
- * @exception Exception instances are thrown when various BeanShell errors
- * occur
- * @since jEdit 4.1pre1
- */
- public static BshMethod cacheBlock(String id, String code, boolean namespace)
- throws Exception
- {
- return bsh.cacheBlock(id, code, namespace);
- } //}}}
-
- //{{{ runCachedBlock() method
- /**
- * Runs a cached block of code in the specified namespace. Faster than
- * evaluating the block each time.
- * @param method The method instance returned by cacheBlock()
- * @param view The view
- * @param namespace The namespace to run the code in
- * @exception Exception instances are thrown when various BeanShell
- * errors occur
- * @since jEdit 4.1pre1
- */
- public static Object runCachedBlock(BshMethod method, View view,
- NameSpace namespace) throws Exception
- {
- return bsh.runCachedBlock(method, view, namespace);
- } //}}}
-
- //{{{ isScriptRunning() method
- /**
- * Returns if a BeanShell script or macro is currently running.
- * @since jEdit 2.7pre2
- */
- public static boolean isScriptRunning()
- {
- return running;
- } //}}}
-
- //{{{ getNameSpace() method
- /**
- * Returns the global namespace.
- * @since jEdit 3.2pre5
- */
- public static NameSpace getNameSpace()
- {
- return bsh.getNameSpace();
- } //}}}
-
- //{{{ Deprecated functions
-
- //{{{ runScript() method
- /**
- * @deprecated The <code>rethrowBshErrors</code> parameter is now
- * obsolete; call <code>_runScript()</code> or <code>runScript()</code>
- * instead.
- */
- @Deprecated
- public static void runScript(View view, String path,
- boolean ownNamespace, boolean rethrowBshErrors)
- {
- runScript(view,path,null,ownNamespace);
- } //}}}
-
- //{{{ runScript() method
- /**
- * @deprecated The <code>rethrowBshErrors</code> parameter is now
- * obsolete; call <code>_runScript()</code> or <code>runScript()</code>
- * instead.
- */
- @Deprecated
- public static void runScript(View view, String path, Reader in,
- boolean ownNamespace, boolean rethrowBshErrors)
- {
- runScript(view,path,in,ownNamespace);
- } //}}}
-
- //{{{ eval() method
- /**
- * @deprecated The <code>rethrowBshErrors</code> parameter is now
- * obsolete; call <code>_eval()</code> or <code>eval()</code> instead.
- */
- @Deprecated
- public static Object eval(View view, String command,
- boolean rethrowBshErrors)
- {
- return bsh.eval(view,command);
- } //}}}
-
- //{{{ eval() method
- /**
- * @deprecated The <code>rethrowBshErrors</code> parameter is now
- * obsolete; call <code>_eval()</code> or <code>eval()</code> instead.
- */
- @Deprecated
- public static Object eval(View view, NameSpace namespace,
- String command, boolean rethrowBshErrors)
- {
- return eval(view,namespace,command);
- } //}}}
-
- //}}}
-
- //{{{ Package-private members
-
- //{{{ resetClassManager() method
- /**
- * Causes BeanShell internal structures to drop references to cached
- * Class instances.
- */
- static void resetClassManager()
- {
- bsh.resetClassManager();
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Static variables
- private static boolean running;
- //}}}
-
- //}}}
-
- /**
- * The BeanshellFacade that is used by jEdit.
- */
- private static class MyBeanShellFacade extends BeanShellFacade<View>
- {
- private MyBeanShellFacade()
- {
- classManager.setClassLoader(new JARClassLoader());
- }
-
- @Override
- protected void init()
- {
- super.init();
- global.importPackage("org.gjt.sp.jedit.browser");
- global.importPackage("org.gjt.sp.jedit.bufferset");
- global.importPackage("org.gjt.sp.jedit.statusbar");
- global.importPackage("org.gjt.sp.jedit.gui");
- global.importPackage("org.gjt.sp.jedit.help");
- global.importPackage("org.gjt.sp.jedit.io");
- global.importPackage("org.gjt.sp.jedit.menu");
- global.importPackage("org.gjt.sp.jedit.msg");
- global.importPackage("org.gjt.sp.jedit.options");
- global.importPackage("org.gjt.sp.jedit.pluginmgr");
- global.importPackage("org.gjt.sp.jedit.print");
- global.importPackage("org.gjt.sp.jedit.search");
- }
-
- @Override
- protected void setupDefaultVariables(NameSpace namespace, View view) throws UtilEvalError
- {
- if(view != null)
- {
- EditPane editPane = view.getEditPane();
- namespace.setVariable("view",view, false);
- namespace.setVariable("editPane",editPane, false);
- namespace.setVariable("buffer",editPane.getBuffer(), false);
- namespace.setVariable("textArea",editPane.getTextArea(), false);
- namespace.setVariable("wm",view.getDockableWindowManager(), false);
- }
- }
-
- @Override
- protected void resetDefaultVariables(NameSpace namespace) throws UtilEvalError
- {
- namespace.setVariable("view",null, false);
- namespace.setVariable("editPane",null, false);
- namespace.setVariable("buffer",null, false);
- namespace.setVariable("textArea",null, false);
- namespace.setVariable("wm",null, false);
- }
-
- @Override
- protected void handleException(View view, String path, Throwable t)
- {
- if(t instanceof IOException)
- {
- VFSManager.error(view,path,"ioerror.read-error",
- new String[] { t.toString() });
- }
- else
- new BeanShellErrorDialog(view,t);
- }
-
- }
-}
+/*
+ * BeanShell.java - BeanShell scripting support
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import org.gjt.sp.jedit.bsh.*;
+
+import java.io.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.gui.BeanShellErrorDialog;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * BeanShell is jEdit's extension language.<p>
+ *
+ * When run from jEdit, BeanShell code has access to the following predefined
+ * variables:
+ *
+ * <ul>
+ * <li><code>view</code> - the currently active {@link View}.</li>
+ * <li><code>editPane</code> - the currently active {@link EditPane}.</li>
+ * <li><code>textArea</code> - the edit pane's {@link JEditTextArea}.</li>
+ * <li><code>buffer</code> - the edit pane's {@link Buffer}.</li>
+ * <li><code>wm</code> - the view's {@link
+ * org.gjt.sp.jedit.gui.DockableWindowManager}.</li>
+ * <li><code>scriptPath</code> - the path name of the currently executing
+ * BeanShell script.</li>
+ * </ul>
+ *
+ * @author Slava Pestov
+ * @version $Id: BeanShell.java 18327 2010-08-11 15:00:49Z kpouer $
+ */
+public class BeanShell
+{
+ private static final BeanShellFacade<View> bsh = new MyBeanShellFacade();
+
+ static void init()
+ {
+ Log.log(Log.MESSAGE, BeanShell.class, "Beanshell Init");
+ }
+
+ //{{{ evalSelection() method
+ /**
+ * Evaluates the text selected in the specified text area.
+ * @since jEdit 2.7pre2
+ */
+ public static void evalSelection(View view, JEditTextArea textArea)
+ {
+ bsh.evalSelection(view, textArea);
+ } //}}}
+
+ //{{{ showEvaluateDialog() method
+ /**
+ * Prompts for a BeanShell expression to evaluate.
+ * @since jEdit 2.7pre2
+ */
+ public static void showEvaluateDialog(View view)
+ {
+ String command = GUIUtilities.input(view,"beanshell-eval-input",null);
+ if(command != null)
+ {
+ if(!command.endsWith(";"))
+ command = command + ";";
+
+ int repeat = view.getInputHandler().getRepeatCount();
+
+ if(view.getMacroRecorder() != null)
+ {
+ view.getMacroRecorder().record(repeat,command);
+ }
+
+ Object returnValue = null;
+ try
+ {
+ for(int i = 0; i < repeat; i++)
+ {
+ returnValue = bsh._eval(view,bsh.getNameSpace(),command);
+ }
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,BeanShell.class,e);
+
+ bsh.handleException(view,null,e);
+ }
+
+ if(returnValue != null)
+ {
+ String[] args = { returnValue.toString() };
+ GUIUtilities.message(view,"beanshell-eval",args);
+ }
+ }
+ } //}}}
+
+ //{{{ showEvaluateLinesDialog() method
+ /**
+ * Evaluates the specified script for each selected line.
+ * @since jEdit 4.0pre1
+ */
+ public static void showEvaluateLinesDialog(View view)
+ {
+ String command = GUIUtilities.input(view,"beanshell-eval-line",null);
+
+ JEditTextArea textArea = view.getTextArea();
+ Buffer buffer = view.getBuffer();
+
+ if(command == null || command.length() == 0)
+ return;
+
+ Selection[] selection = textArea.getSelection();
+ if(selection.length == 0)
+ {
+ view.getToolkit().beep();
+ return;
+ }
+
+ if(!command.endsWith(";"))
+ command = command + ";";
+
+ String script = "int[] lines = textArea.getSelectedLines();\n"
+ + "for(int i = 0; i < lines.length; i++)\n"
+ + "{\n"
+ + "line = lines[i];\n"
+ + "index = line - lines[0];\n"
+ + "start = buffer.getLineStartOffset(line);\n"
+ + "end = buffer.getLineEndOffset(line);\n"
+ + "text = buffer.getText(start,end - start - 1);\n"
+ + "newText = " + command + "\n"
+ + "if(newText != null)\n"
+ + "{\n"
+ + "buffer.remove(start,end - start - 1);\n"
+ + "buffer.insert(start,String.valueOf(newText));\n"
+ + "}\n"
+ + "}\n";
+
+ if(view.getMacroRecorder() != null)
+ view.getMacroRecorder().record(1,script);
+
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ bsh.eval(view,script);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ textArea.selectNone();
+ } //}}}
+
+ //{{{ runScript() method
+ /**
+ * Runs a BeanShell script. Errors are shown in a dialog box.<p>
+ *
+ * If the <code>in</code> parameter is non-null, the script is
+ * read from that stream; otherwise it is read from the file identified
+ * by <code>path</code>.<p>
+ *
+ * The <code>scriptPath</code> BeanShell variable is set to the path
+ * name of the script.
+ *
+ * @param view The view. Within the script, references to
+ * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
+ * are determined with reference to this parameter.
+ * @param path The script file's VFS path.
+ * @param in The reader to read the script from, or <code>null</code>.
+ * @param ownNamespace If set to <code>false</code>, methods and
+ * variables defined in the script will be available to all future
+ * uses of BeanShell; if set to <code>true</code>, they will be lost as
+ * soon as the script finishes executing. jEdit uses a value of
+ * <code>false</code> when running startup scripts, and a value of
+ * <code>true</code> when running all other macros.
+ *
+ * @since jEdit 4.0pre7
+ */
+ public static void runScript(View view, String path, Reader in,
+ boolean ownNamespace)
+ {
+ try
+ {
+ _runScript(view,path,in,ownNamespace);
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,BeanShell.class,e);
+
+ bsh.handleException(view,path,e);
+ }
+ } //}}}
+
+ //{{{ runScript() method
+ /**
+ * Runs a BeanShell script. Errors are shown in a dialog box.<p>
+ *
+ * If the <code>in</code> parameter is non-null, the script is
+ * read from that stream; otherwise it is read from the file identified
+ * by <code>path</code>.<p>
+ *
+ * The <code>scriptPath</code> BeanShell variable is set to the path
+ * name of the script.
+ *
+ * @param view The view. Within the script, references to
+ * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
+ * are determined with reference to this parameter.
+ * @param path The script file's VFS path.
+ * @param in The reader to read the script from, or <code>null</code>.
+ * @param namespace The namespace to run the script in.
+ *
+ * @since jEdit 4.2pre5
+ */
+ public static void runScript(View view, String path, Reader in,
+ NameSpace namespace)
+ {
+ try
+ {
+ _runScript(view,path,in,namespace);
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,BeanShell.class,e);
+
+ bsh.handleException(view,path,e);
+ }
+ } //}}}
+
+ //{{{ _runScript() method
+ /**
+ * Runs a BeanShell script. Errors are passed to the caller.<p>
+ *
+ * If the <code>in</code> parameter is non-null, the script is
+ * read from that stream; otherwise it is read from the file identified
+ * by <code>path</code>.<p>
+ *
+ * The <code>scriptPath</code> BeanShell variable is set to the path
+ * name of the script.
+ *
+ * @param view The view. Within the script, references to
+ * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
+ * are determined with reference to this parameter.
+ * @param path The script file's VFS path.
+ * @param in The reader to read the script from, or <code>null</code>.
+ * @param ownNamespace If set to <code>false</code>, methods and
+ * variables defined in the script will be available to all future
+ * uses of BeanShell; if set to <code>true</code>, they will be lost as
+ * soon as the script finishes executing. jEdit uses a value of
+ * <code>false</code> when running startup scripts, and a value of
+ * <code>true</code> when running all other macros.
+ * @exception Exception instances are thrown when various BeanShell errors
+ * occur
+ * @since jEdit 4.0pre7
+ */
+ public static void _runScript(View view, String path, Reader in,
+ boolean ownNamespace) throws Exception
+ {
+ _runScript(view,path,in,ownNamespace
+ ? new NameSpace(bsh.getNameSpace(),"namespace")
+ : bsh.getNameSpace());
+ } //}}}
+
+ //{{{ _runScript() method
+ /**
+ * Runs a BeanShell script. Errors are passed to the caller.<p>
+ *
+ * If the <code>in</code> parameter is non-null, the script is
+ * read from that stream; otherwise it is read from the file identified
+ * by <code>path</code>.<p>
+ *
+ * The <code>scriptPath</code> BeanShell variable is set to the path
+ * name of the script.
+ *
+ * @param view The view. Within the script, references to
+ * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
+ * are determined with reference to this parameter.
+ * @param path The script file's VFS path.
+ * @param in The reader to read the script from, or <code>null</code>.
+ * @param namespace The namespace to run the script in.
+ * @exception Exception instances are thrown when various BeanShell errors
+ * occur
+ * @since jEdit 4.2pre5
+ */
+ public static void _runScript(View view, String path, Reader in,
+ NameSpace namespace) throws Exception
+ {
+ Log.log(Log.MESSAGE,BeanShell.class,"Running script " + path);
+
+ Interpreter interp = BeanShellFacade.createInterpreter(namespace);
+
+ try
+ {
+ if(in == null)
+ {
+ Buffer buffer = jEdit.openTemporary(null,
+ null,path,false);
+
+ if(!buffer.isLoaded())
+ VFSManager.waitForRequests();
+
+ in = new StringReader(buffer.getText(0,
+ buffer.getLength()));
+ }
+
+ bsh.setupDefaultVariables(namespace,view);
+ interp.set("scriptPath",path);
+
+ running = true;
+
+ interp.eval(in,namespace,path);
+ }
+ catch(Exception e)
+ {
+ BeanShellFacade.unwrapException(e);
+ }
+ finally
+ {
+ running = false;
+ try
+ {
+ // no need to do this for macros!
+ if(namespace == bsh.getNameSpace())
+ {
+ bsh.resetDefaultVariables(namespace);
+ interp.unset("scriptPath");
+ }
+ }
+ catch(EvalError e)
+ {
+ // do nothing
+ }
+ }
+ } //}}}
+
+ //{{{ eval() method
+ /**
+ * Evaluates the specified BeanShell expression. Errors are reported in
+ * a dialog box.
+ * @param view The view. Within the script, references to
+ * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
+ * are determined with reference to this parameter.
+ * @param namespace The namespace
+ * @param command The expression
+ * @since jEdit 4.0pre8
+ */
+ public static Object eval(View view, NameSpace namespace, String command)
+ {
+ return bsh.eval(view, namespace, command);
+ } //}}}
+
+ //{{{ _eval() method
+ /**
+ * Evaluates the specified BeanShell expression. Unlike
+ * <code>eval()</code>, this method passes any exceptions to the caller.
+ *
+ * @param view The view. Within the script, references to
+ * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
+ * are determined with reference to this parameter.
+ * @param namespace The namespace
+ * @param command The expression
+ * @exception Exception instances are thrown when various BeanShell
+ * errors occur
+ * @since jEdit 3.2pre7
+ */
+ public static Object _eval(View view, NameSpace namespace, String command)
+ throws Exception
+ {
+ return bsh._eval(view, namespace, command);
+ } //}}}
+
+ //{{{ cacheBlock() method
+ /**
+ * Caches a block of code, returning a handle that can be passed to
+ * runCachedBlock().
+ * @param id An identifier. If null, a unique identifier is generated
+ * @param code The code
+ * @param namespace If true, the namespace will be set
+ * @exception Exception instances are thrown when various BeanShell errors
+ * occur
+ * @since jEdit 4.1pre1
+ */
+ public static BshMethod cacheBlock(String id, String code, boolean namespace)
+ throws Exception
+ {
+ return bsh.cacheBlock(id, code, namespace);
+ } //}}}
+
+ //{{{ runCachedBlock() method
+ /**
+ * Runs a cached block of code in the specified namespace. Faster than
+ * evaluating the block each time.
+ * @param method The method instance returned by cacheBlock()
+ * @param view The view
+ * @param namespace The namespace to run the code in
+ * @exception Exception instances are thrown when various BeanShell
+ * errors occur
+ * @since jEdit 4.1pre1
+ */
+ public static Object runCachedBlock(BshMethod method, View view,
+ NameSpace namespace) throws Exception
+ {
+ return bsh.runCachedBlock(method, view, namespace);
+ } //}}}
+
+ //{{{ isScriptRunning() method
+ /**
+ * Returns if a BeanShell script or macro is currently running.
+ * @since jEdit 2.7pre2
+ */
+ public static boolean isScriptRunning()
+ {
+ return running;
+ } //}}}
+
+ //{{{ getNameSpace() method
+ /**
+ * Returns the global namespace.
+ * @since jEdit 3.2pre5
+ */
+ public static NameSpace getNameSpace()
+ {
+ return bsh.getNameSpace();
+ } //}}}
+
+ //{{{ Deprecated functions
+
+ //{{{ runScript() method
+ /**
+ * @deprecated The <code>rethrowBshErrors</code> parameter is now
+ * obsolete; call <code>_runScript()</code> or <code>runScript()</code>
+ * instead.
+ */
+ @Deprecated
+ public static void runScript(View view, String path,
+ boolean ownNamespace, boolean rethrowBshErrors)
+ {
+ runScript(view,path,null,ownNamespace);
+ } //}}}
+
+ //{{{ runScript() method
+ /**
+ * @deprecated The <code>rethrowBshErrors</code> parameter is now
+ * obsolete; call <code>_runScript()</code> or <code>runScript()</code>
+ * instead.
+ */
+ @Deprecated
+ public static void runScript(View view, String path, Reader in,
+ boolean ownNamespace, boolean rethrowBshErrors)
+ {
+ runScript(view,path,in,ownNamespace);
+ } //}}}
+
+ //{{{ eval() method
+ /**
+ * @deprecated The <code>rethrowBshErrors</code> parameter is now
+ * obsolete; call <code>_eval()</code> or <code>eval()</code> instead.
+ */
+ @Deprecated
+ public static Object eval(View view, String command,
+ boolean rethrowBshErrors)
+ {
+ return bsh.eval(view,command);
+ } //}}}
+
+ //{{{ eval() method
+ /**
+ * @deprecated The <code>rethrowBshErrors</code> parameter is now
+ * obsolete; call <code>_eval()</code> or <code>eval()</code> instead.
+ */
+ @Deprecated
+ public static Object eval(View view, NameSpace namespace,
+ String command, boolean rethrowBshErrors)
+ {
+ return eval(view,namespace,command);
+ } //}}}
+
+ //}}}
+
+ //{{{ Package-private members
+
+ //{{{ resetClassManager() method
+ /**
+ * Causes BeanShell internal structures to drop references to cached
+ * Class instances.
+ */
+ static void resetClassManager()
+ {
+ bsh.resetClassManager();
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Static variables
+ private static boolean running;
+ //}}}
+
+ //}}}
+
+ /**
+ * The BeanshellFacade that is used by jEdit.
+ */
+ private static class MyBeanShellFacade extends BeanShellFacade<View>
+ {
+ private MyBeanShellFacade()
+ {
+ classManager.setClassLoader(new JARClassLoader());
+ }
+
+ @Override
+ protected void init()
+ {
+ super.init();
+ global.importPackage("org.gjt.sp.jedit.browser");
+ global.importPackage("org.gjt.sp.jedit.bufferset");
+ global.importPackage("org.gjt.sp.jedit.statusbar");
+ global.importPackage("org.gjt.sp.jedit.gui");
+ global.importPackage("org.gjt.sp.jedit.help");
+ global.importPackage("org.gjt.sp.jedit.io");
+ global.importPackage("org.gjt.sp.jedit.menu");
+ global.importPackage("org.gjt.sp.jedit.msg");
+ global.importPackage("org.gjt.sp.jedit.options");
+ global.importPackage("org.gjt.sp.jedit.pluginmgr");
+ global.importPackage("org.gjt.sp.jedit.print");
+ global.importPackage("org.gjt.sp.jedit.search");
+ }
+
+ @Override
+ protected void setupDefaultVariables(NameSpace namespace, View view) throws UtilEvalError
+ {
+ if(view != null)
+ {
+ EditPane editPane = view.getEditPane();
+ setVariable(namespace, "view", view);
+ setVariable(namespace, "editPane",editPane);
+ setVariable(namespace, "buffer",editPane.getBuffer());
+ setVariable(namespace, "textArea",editPane.getTextArea());
+ setVariable(namespace, "wm",view.getDockableWindowManager());
+ }
+ }
+
+ @Override
+ protected void resetDefaultVariables(NameSpace namespace) throws UtilEvalError
+ {
+ namespace.setVariable("view",null, false);
+ namespace.setVariable("editPane",null, false);
+ namespace.setVariable("buffer",null, false);
+ namespace.setVariable("textArea",null, false);
+ namespace.setVariable("wm",null, false);
+ }
+
+ @Override
+ protected void handleException(View view, String path, Throwable t)
+ {
+ if(t instanceof IOException)
+ {
+ VFSManager.error(view,path,"ioerror.read-error",
+ new String[] { t.toString() });
+ }
+ else
+ new BeanShellErrorDialog(view,t);
+ }
+
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/BeanShellAction.java b/jEdit/org/gjt/sp/jedit/BeanShellAction.java
index 1542fe1..3e8c3f5 100644
--- a/jEdit/org/gjt/sp/jedit/BeanShellAction.java
+++ b/jEdit/org/gjt/sp/jedit/BeanShellAction.java
@@ -1,204 +1,204 @@
-/*
- * BeanShellAction.java - BeanShell action
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import org.gjt.sp.jedit.bsh.*;
-import java.lang.ref.SoftReference;
-import java.awt.Component;
-import org.gjt.sp.jedit.gui.BeanShellErrorDialog;
-import org.gjt.sp.util.Log;
-
-/**
- * An action that evaluates BeanShell code when invoked. BeanShell actions are
- * usually loaded from <code>actions.xml</code> and
- * <code>browser.actions.xml</code> files; see {@link ActionSet} for syntax
- * information.
- *
- * @see jEdit#getAction(String)
- * @see jEdit#getActionNames()
- * @see ActionSet
- *
- * @author Slava Pestov
- * @version $Id: BeanShellAction.java 13516 2008-09-03 19:40:47Z k_satoda $
- */
-public class BeanShellAction extends EditAction
-{
- //{{{ BeanShellAction constructor
- public BeanShellAction(String name, String code, String isSelected,
- boolean noRepeat, boolean noRecord, boolean noRememberLast)
- {
- super(name);
-
- /* Some characters that we like to use in action names
- * ('.', '-') are not allowed in BeanShell identifiers. */
- String sanitizedName = name.replace('.','_').replace('-','_');
- this.code = new CachedBshMethod("action_" + sanitizedName, code);
- if (isSelected != null)
- {
- this.isSelected = new CachedBshMethod("selected_" + sanitizedName, isSelected);
- }
- this.noRepeat = noRepeat;
- this.noRecord = noRecord;
- this.noRememberLast = noRememberLast;
-
- jEdit.setTemporaryProperty(name + ".toggle",
- isSelected != null ? "true" : "false");
- } //}}}
-
- //{{{ invoke() method
- public void invoke(View view)
- {
- try
- {
- BeanShell.runCachedBlock(code.get(),view,
- new NameSpace(BeanShell.getNameSpace(),
- "BeanShellAction.invoke()"));
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,this,e);
-
- new BeanShellErrorDialog(view,e);
- }
- } //}}}
-
- //{{{ isSelected() method
- public boolean isSelected(Component comp)
- {
- if(isSelected == null)
- return false;
-
- NameSpace global = BeanShell.getNameSpace();
-
- try
- {
- View view = GUIUtilities.getView(comp);
-
- // undocumented hack to allow browser actions to work.
- // XXX - clean up in 4.3
- global.setVariable("_comp",comp);
-
- return Boolean.TRUE.equals(BeanShell.runCachedBlock(
- isSelected.get(),view,
- new NameSpace(BeanShell.getNameSpace(),
- "BeanShellAction.isSelected()")));
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,this,e);
-
- // dialogs fuck things up if a menu is visible, etc!
- //new BeanShellErrorDialog(view,e);
-
- // so that in the future we don't see streams of
- // exceptions
- isSelected = null;
-
- return false;
- }
- finally
- {
- try
- {
- global.setVariable("_comp",null);
- }
- catch(UtilEvalError err)
- {
- Log.log(Log.ERROR,this,err);
- }
- }
- } //}}}
-
- //{{{ noRepeat() method
- public boolean noRepeat()
- {
- return noRepeat;
- } //}}}
-
- //{{{ noRecord() method
- public boolean noRecord()
- {
- return noRecord;
- } //}}}
-
- //{{{ noRememberLast() method
- /**
- * Returns if this edit action should not be remembered as the most
- * recently invoked action.
- * @since jEdit 4.2pre1
- */
- public boolean noRememberLast()
- {
- return noRememberLast;
- } //}}}
-
- //{{{ getCode() method
- public String getCode()
- {
- return code.getSource().trim();
- } //}}}
-
- //{{{ Private members
- private boolean noRepeat;
- private boolean noRecord;
- private boolean noRememberLast;
- private CachedBshMethod code;
- private CachedBshMethod isSelected;
-
- //{{{ CachedBshMethod class
- private static class CachedBshMethod
- {
- private final String name;
- private final String source;
- private SoftReference<BshMethod> cache;
-
- public CachedBshMethod(String name, String source)
- {
- this.name = name;
- this.source = source;
- this.cache = null;
- }
-
- public BshMethod get() throws java.lang.Exception
- {
- if (cache != null)
- {
- BshMethod cached = cache.get();
- if (cached != null)
- {
- return cached;
- }
- }
- BshMethod newOne = BeanShell.cacheBlock(name, source, true);
- cache = new SoftReference<BshMethod>(newOne);
- return newOne;
- }
-
- public String getSource()
- {
- return source;
- }
- }//}}}
-
- //}}}
-}
+/*
+ * BeanShellAction.java - BeanShell action
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import org.gjt.sp.jedit.bsh.*;
+import java.lang.ref.SoftReference;
+import java.awt.Component;
+import org.gjt.sp.jedit.gui.BeanShellErrorDialog;
+import org.gjt.sp.util.Log;
+
+/**
+ * An action that evaluates BeanShell code when invoked. BeanShell actions are
+ * usually loaded from <code>actions.xml</code> and
+ * <code>browser.actions.xml</code> files; see {@link ActionSet} for syntax
+ * information.
+ *
+ * @see jEdit#getAction(String)
+ * @see jEdit#getActionNames()
+ * @see ActionSet
+ *
+ * @author Slava Pestov
+ * @version $Id: BeanShellAction.java 13516 2008-09-03 19:40:47Z k_satoda $
+ */
+public class BeanShellAction extends EditAction
+{
+ //{{{ BeanShellAction constructor
+ public BeanShellAction(String name, String code, String isSelected,
+ boolean noRepeat, boolean noRecord, boolean noRememberLast)
+ {
+ super(name);
+
+ /* Some characters that we like to use in action names
+ * ('.', '-') are not allowed in BeanShell identifiers. */
+ String sanitizedName = name.replace('.','_').replace('-','_');
+ this.code = new CachedBshMethod("action_" + sanitizedName, code);
+ if (isSelected != null)
+ {
+ this.isSelected = new CachedBshMethod("selected_" + sanitizedName, isSelected);
+ }
+ this.noRepeat = noRepeat;
+ this.noRecord = noRecord;
+ this.noRememberLast = noRememberLast;
+
+ jEdit.setTemporaryProperty(name + ".toggle",
+ isSelected != null ? "true" : "false");
+ } //}}}
+
+ //{{{ invoke() method
+ public void invoke(View view)
+ {
+ try
+ {
+ BeanShell.runCachedBlock(code.get(),view,
+ new NameSpace(BeanShell.getNameSpace(),
+ "BeanShellAction.invoke()"));
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,this,e);
+
+ new BeanShellErrorDialog(view,e);
+ }
+ } //}}}
+
+ //{{{ isSelected() method
+ public boolean isSelected(Component comp)
+ {
+ if(isSelected == null)
+ return false;
+
+ NameSpace global = BeanShell.getNameSpace();
+
+ try
+ {
+ View view = GUIUtilities.getView(comp);
+
+ // undocumented hack to allow browser actions to work.
+ // XXX - clean up in 4.3
+ global.setVariable("_comp",comp);
+
+ return Boolean.TRUE.equals(BeanShell.runCachedBlock(
+ isSelected.get(),view,
+ new NameSpace(BeanShell.getNameSpace(),
+ "BeanShellAction.isSelected()")));
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,this,e);
+
+ // dialogs fuck things up if a menu is visible, etc!
+ //new BeanShellErrorDialog(view,e);
+
+ // so that in the future we don't see streams of
+ // exceptions
+ isSelected = null;
+
+ return false;
+ }
+ finally
+ {
+ try
+ {
+ global.setVariable("_comp",null);
+ }
+ catch(UtilEvalError err)
+ {
+ Log.log(Log.ERROR,this,err);
+ }
+ }
+ } //}}}
+
+ //{{{ noRepeat() method
+ public boolean noRepeat()
+ {
+ return noRepeat;
+ } //}}}
+
+ //{{{ noRecord() method
+ public boolean noRecord()
+ {
+ return noRecord;
+ } //}}}
+
+ //{{{ noRememberLast() method
+ /**
+ * Returns if this edit action should not be remembered as the most
+ * recently invoked action.
+ * @since jEdit 4.2pre1
+ */
+ public boolean noRememberLast()
+ {
+ return noRememberLast;
+ } //}}}
+
+ //{{{ getCode() method
+ public String getCode()
+ {
+ return code.getSource().trim();
+ } //}}}
+
+ //{{{ Private members
+ private boolean noRepeat;
+ private boolean noRecord;
+ private boolean noRememberLast;
+ private CachedBshMethod code;
+ private CachedBshMethod isSelected;
+
+ //{{{ CachedBshMethod class
+ private static class CachedBshMethod
+ {
+ private final String name;
+ private final String source;
+ private SoftReference<BshMethod> cache;
+
+ public CachedBshMethod(String name, String source)
+ {
+ this.name = name;
+ this.source = source;
+ this.cache = null;
+ }
+
+ public BshMethod get() throws java.lang.Exception
+ {
+ if (cache != null)
+ {
+ BshMethod cached = cache.get();
+ if (cached != null)
+ {
+ return cached;
+ }
+ }
+ BshMethod newOne = BeanShell.cacheBlock(name, source, true);
+ cache = new SoftReference<BshMethod>(newOne);
+ return newOne;
+ }
+
+ public String getSource()
+ {
+ return source;
+ }
+ }//}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/BeanShellFacade.java b/jEdit/org/gjt/sp/jedit/BeanShellFacade.java
index ea33bd4..45e9484 100644
--- a/jEdit/org/gjt/sp/jedit/BeanShellFacade.java
+++ b/jEdit/org/gjt/sp/jedit/BeanShellFacade.java
@@ -1,324 +1,338 @@
-/*
- * BeanShellFacade.java - A BeanShell facade
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.lang.reflect.InvocationTargetException;
-import org.gjt.sp.jedit.bsh.BshClassManager;
-import org.gjt.sp.jedit.bsh.BshMethod;
-import org.gjt.sp.jedit.bsh.CallStack;
-import org.gjt.sp.jedit.bsh.Interpreter;
-import org.gjt.sp.jedit.bsh.NameSpace;
-import org.gjt.sp.jedit.bsh.Primitive;
-import org.gjt.sp.jedit.bsh.TargetError;
-import org.gjt.sp.jedit.bsh.UtilEvalError;
-import org.gjt.sp.jedit.bsh.classpath.ClassManagerImpl;
-import org.gjt.sp.jedit.textarea.TextArea;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * This class will be the interface for beanshell interaction.
- * In jEdit it will be used with the static methods of {@link BeanShell}
- * @author Matthieu Casanova
- * @since jEdit 4.3pre13
- */
-public abstract class BeanShellFacade<T>
-{
- //{{{ BeanShellFacade constructor
- protected BeanShellFacade()
- {
- classManager = new ClassManagerImpl();
- global = new NameSpace(classManager,
- "jEdit embedded BeanShell interpreter");
-
- interpForMethods = createInterpreter(global);
- init();
- } //}}}
-
- //{{{ init() method
- /**
- * Initialize things. It is called by the constructor.
- * You can override it to import other packages
- */
- protected void init()
- {
- global.importPackage("org.gjt.sp.jedit");
- global.importPackage("org.gjt.sp.jedit.buffer");
- global.importPackage("org.gjt.sp.jedit.syntax");
- global.importPackage("org.gjt.sp.jedit.textarea");
- global.importPackage("org.gjt.sp.util");
- } //}}}
-
- //{{{ evalSelection() method
- /**
- * Evaluates the text selected in the specified text area.
- */
- public void evalSelection(T param, TextArea textArea)
- {
- String command = textArea.getSelectedText();
- if(command == null)
- {
- textArea.getToolkit().beep();
- return;
- }
- Object returnValue = eval(param,global,command);
- if(returnValue != null)
- textArea.setSelectedText(returnValue.toString());
- } //}}}
-
- //{{{ eval() method
- /**
- * Evaluates the specified BeanShell expression with the global namespace
- * @param param The parameter
- * @param command The expression
- */
- public Object eval(T param, String command)
- {
- return eval(param, global, command);
- } //}}}
-
- //{{{ eval() method
- /**
- * Evaluates the specified BeanShell expression. Errors are reported in
- * a dialog box.
- * @param param The parameter
- * @param namespace The namespace
- * @param command The expression
- */
- public Object eval(T param, NameSpace namespace, String command)
- {
- try
- {
- return _eval(param,namespace,command);
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,BeanShellFacade.class,e);
-
- handleException(param,null,e);
- }
-
- return null;
- } //}}}
-
- //{{{ _eval() method
- /**
- * Evaluates the specified BeanShell expression. Unlike
- * <code>eval()</code>, this method passes any exceptions to the caller.
- *
- * @param view The view. Within the script, references to
- * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
- * are determined with reference to this parameter.
- * @param namespace The namespace
- * @param command The expression
- * @exception Exception instances are thrown when various BeanShell
- * errors occur
- */
- public Object _eval(T view, NameSpace namespace, String command)
- throws Exception
- {
- Interpreter interp = createInterpreter(namespace);
-
- try
- {
- setupDefaultVariables(namespace,view);
- if(Debug.BEANSHELL_DEBUG)
- Log.log(Log.DEBUG,BeanShellFacade.class,command);
- return interp.eval(command);
- }
- catch(Exception e)
- {
- unwrapException(e);
- // never called
- return null;
- }
- finally
- {
- try
- {
- resetDefaultVariables(namespace);
- }
- catch(UtilEvalError e)
- {
- // do nothing
- }
- }
- } //}}}
-
- //{{{ cacheBlock() method
- /**
- * Caches a block of code, returning a handle that can be passed to
- * runCachedBlock().
- * @param id An identifier.
- * @param code The code
- * @param namespace If true, the namespace will be set
- * @exception Exception instances are thrown when various BeanShell errors
- * occur
- */
- public BshMethod cacheBlock(String id, String code, boolean namespace)
- throws Exception
- {
- // Make local namespace so that the method could be GCed
- // if it becomes unnecessary.
- NameSpace local = new NameSpace(global, "__internal_" + id);
- // This name should be unique enough not to shadow any outer
- // identifier.
- String name = "__runCachedMethod";
- if(namespace)
- {
- _eval(null,local,name + "(ns) {\nthis.callstack.set(0,ns);\n" + code + "\n}");
- return local.getMethod(name,new Class[] { NameSpace.class });
- }
- else
- {
- _eval(null,local,name + "() {\n" + code + "\n}");
- return local.getMethod(name,new Class[0]);
- }
- } //}}}
-
- //{{{ runCachedBlock() method
- /**
- * Runs a cached block of code in the specified namespace. Faster than
- * evaluating the block each time.
- * @param method The method instance returned by cacheBlock()
- * @param namespace The namespace to run the code in
- * @exception Exception instances are thrown when various BeanShell
- * errors occur
- */
- public Object runCachedBlock(BshMethod method, T param,
- NameSpace namespace) throws Exception
- {
- boolean useNamespace;
- if(namespace == null)
- {
- useNamespace = false;
- namespace = global;
- }
- else
- useNamespace = true;
-
- try
- {
- setupDefaultVariables(namespace,param);
-
- Object retVal = method.invoke(useNamespace
- ? new Object[] { namespace }
- : NO_ARGS,
- interpForMethods,new CallStack(), null);
- if(retVal instanceof Primitive)
- {
- if(retVal == Primitive.VOID)
- return null;
- else
- return ((Primitive)retVal).getValue();
- }
- else
- return retVal;
- }
- catch(Exception e)
- {
- unwrapException(e);
- // never called
- return null;
- }
- finally
- {
- resetDefaultVariables(namespace);
- }
- } //}}}
-
- //{{{ getNameSpace() method
- /**
- * Returns the global namespace.
- */
- public NameSpace getNameSpace()
- {
- return global;
- } //}}}
-
- //{{{ resetClassManager() method
- /**
- * Causes BeanShell internal structures to drop references to cached
- * Class instances.
- */
- void resetClassManager()
- {
- classManager.reset();
- } //}}}
-
- //{{{ setupDefaultVariables() method
- protected abstract void setupDefaultVariables(NameSpace namespace, T param)
- throws UtilEvalError;
- //}}}
-
- //{{{ resetDefaultVariables() method
- protected abstract void resetDefaultVariables(NameSpace namespace)
- throws UtilEvalError;
- //}}}
-
- //{{{ handleException() method
- protected abstract void handleException(T param, String path, Throwable t);
- //}}}
-
- //{{{ createInterpreter() method
- protected static Interpreter createInterpreter(NameSpace nameSpace)
- {
- return new Interpreter(null,System.out,System.err,false,nameSpace);
- } //}}}
-
- //{{{ unwrapException() method
- /**
- * This extracts an exception from a 'wrapping' exception, as BeanShell
- * sometimes throws. This gives the user a more accurate error traceback
- */
- protected static void unwrapException(Exception e) throws Exception
- {
- if(e instanceof TargetError)
- {
- Throwable t = ((TargetError)e).getTarget();
- if(t instanceof Exception)
- throw (Exception)t;
- else if(t instanceof Error)
- throw (Error)t;
- }
-
- if(e instanceof InvocationTargetException)
- {
- Throwable t = ((InvocationTargetException)e).getTargetException();
- if(t instanceof Exception)
- throw (Exception)t;
- else if(t instanceof Error)
- throw (Error)t;
- }
-
- throw e;
- } //}}}
-
- //{{{ Static variables
- protected NameSpace global;
- protected BshClassManager classManager;
- private static Interpreter interpForMethods;
- private static final Object[] NO_ARGS = new Object[0];
- //}}}
-}
+/*
+ * BeanShellFacade.java - A BeanShell facade
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.lang.reflect.InvocationTargetException;
+import org.gjt.sp.jedit.bsh.BshClassManager;
+import org.gjt.sp.jedit.bsh.BshMethod;
+import org.gjt.sp.jedit.bsh.CallStack;
+import org.gjt.sp.jedit.bsh.Interpreter;
+import org.gjt.sp.jedit.bsh.NameSpace;
+import org.gjt.sp.jedit.bsh.Primitive;
+import org.gjt.sp.jedit.bsh.TargetError;
+import org.gjt.sp.jedit.bsh.UtilEvalError;
+import org.gjt.sp.jedit.bsh.classpath.ClassManagerImpl;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * This class will be the interface for beanshell interaction.
+ * In jEdit it will be used with the static methods of {@link BeanShell}
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre13
+ */
+public abstract class BeanShellFacade<T>
+{
+ //{{{ BeanShellFacade constructor
+ protected BeanShellFacade()
+ {
+ classManager = new ClassManagerImpl();
+ global = new NameSpace(classManager,
+ "jEdit embedded BeanShell interpreter");
+
+ interpForMethods = createInterpreter(global);
+ init();
+ } //}}}
+
+ //{{{ init() method
+ /**
+ * Initialize things. It is called by the constructor.
+ * You can override it to import other packages
+ */
+ protected void init()
+ {
+ global.importPackage("org.gjt.sp.jedit");
+ global.importPackage("org.gjt.sp.jedit.buffer");
+ global.importPackage("org.gjt.sp.jedit.syntax");
+ global.importPackage("org.gjt.sp.jedit.textarea");
+ global.importPackage("org.gjt.sp.util");
+ } //}}}
+
+ //{{{ evalSelection() method
+ /**
+ * Evaluates the text selected in the specified text area.
+ */
+ public void evalSelection(T param, TextArea textArea)
+ {
+ String command = textArea.getSelectedText();
+ if(command == null)
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+ Object returnValue = eval(param,global,command);
+ if(returnValue != null)
+ textArea.setSelectedText(returnValue.toString());
+ } //}}}
+
+ //{{{ eval() method
+ /**
+ * Evaluates the specified BeanShell expression with the global namespace
+ * @param param The parameter
+ * @param command The expression
+ */
+ public Object eval(T param, String command)
+ {
+ return eval(param, global, command);
+ } //}}}
+
+ //{{{ eval() method
+ /**
+ * Evaluates the specified BeanShell expression. Errors are reported in
+ * a dialog box.
+ * @param param The parameter
+ * @param namespace The namespace
+ * @param command The expression
+ */
+ public Object eval(T param, NameSpace namespace, String command)
+ {
+ try
+ {
+ return _eval(param,namespace,command);
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,BeanShellFacade.class,e);
+
+ handleException(param,null,e);
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ _eval() method
+ /**
+ * Evaluates the specified BeanShell expression. Unlike
+ * <code>eval()</code>, this method passes any exceptions to the caller.
+ *
+ * @param view The view. Within the script, references to
+ * <code>buffer</code>, <code>textArea</code> and <code>editPane</code>
+ * are determined with reference to this parameter.
+ * @param namespace The namespace
+ * @param command The expression
+ * @exception Exception instances are thrown when various BeanShell
+ * errors occur
+ */
+ public Object _eval(T view, NameSpace namespace, String command)
+ throws Exception
+ {
+ Interpreter interp = createInterpreter(namespace);
+
+ try
+ {
+ setupDefaultVariables(namespace,view);
+ if(Debug.BEANSHELL_DEBUG)
+ Log.log(Log.DEBUG,BeanShellFacade.class,command);
+ return interp.eval(command);
+ }
+ catch(Exception e)
+ {
+ unwrapException(e);
+ // never called
+ return null;
+ }
+ finally
+ {
+ try
+ {
+ resetDefaultVariables(namespace);
+ }
+ catch(UtilEvalError e)
+ {
+ // do nothing
+ }
+ }
+ } //}}}
+
+ //{{{ cacheBlock() method
+ /**
+ * Caches a block of code, returning a handle that can be passed to
+ * runCachedBlock().
+ * @param id An identifier.
+ * @param code The code
+ * @param namespace If true, the namespace will be set
+ * @exception Exception instances are thrown when various BeanShell errors
+ * occur
+ */
+ public BshMethod cacheBlock(String id, String code, boolean namespace)
+ throws Exception
+ {
+ // Make local namespace so that the method could be GCed
+ // if it becomes unnecessary.
+ NameSpace local = new NameSpace(global, "__internal_" + id);
+ // This name should be unique enough not to shadow any outer
+ // identifier.
+ String name = "__runCachedMethod";
+ if(namespace)
+ {
+ _eval(null,local,name + "(ns) {\nthis.callstack.set(0,ns);\n" + code + "\n}");
+ return local.getMethod(name,new Class[] { NameSpace.class });
+ }
+ else
+ {
+ _eval(null,local,name + "() {\n" + code + "\n}");
+ return local.getMethod(name,new Class[0]);
+ }
+ } //}}}
+
+ //{{{ runCachedBlock() method
+ /**
+ * Runs a cached block of code in the specified namespace. Faster than
+ * evaluating the block each time.
+ * @param method The method instance returned by cacheBlock()
+ * @param namespace The namespace to run the code in
+ * @exception Exception instances are thrown when various BeanShell
+ * errors occur
+ */
+ public Object runCachedBlock(BshMethod method, T param,
+ NameSpace namespace) throws Exception
+ {
+ boolean useNamespace;
+ if(namespace == null)
+ {
+ useNamespace = false;
+ namespace = global;
+ }
+ else
+ useNamespace = true;
+
+ try
+ {
+ setupDefaultVariables(namespace,param);
+
+ Object retVal = method.invoke(useNamespace
+ ? new Object[] { namespace }
+ : NO_ARGS,
+ interpForMethods,new CallStack(), null);
+ if(retVal instanceof Primitive)
+ {
+ if(retVal == Primitive.VOID)
+ return null;
+ else
+ return ((Primitive)retVal).getValue();
+ }
+ else
+ return retVal;
+ }
+ catch(Exception e)
+ {
+ unwrapException(e);
+ // never called
+ return null;
+ }
+ finally
+ {
+ resetDefaultVariables(namespace);
+ }
+ } //}}}
+
+ //{{{ getNameSpace() method
+ /**
+ * Returns the global namespace.
+ */
+ public NameSpace getNameSpace()
+ {
+ return global;
+ } //}}}
+
+ //{{{ resetClassManager() method
+ /**
+ * Causes BeanShell internal structures to drop references to cached
+ * Class instances.
+ */
+ void resetClassManager()
+ {
+ classManager.reset();
+ } //}}}
+
+ //{{{ setVariable() method
+ /**
+ * Set a beanshell variable in the namespace without overriding it
+ * @param nameSpace the namespace
+ * @param name the name of the variable
+ * @param object the value of the variable
+ * @throws UtilEvalError
+ */
+ protected void setVariable(NameSpace nameSpace, String name, Object object) throws UtilEvalError
+ {
+ if (nameSpace.getVariable(name) == Primitive.VOID)
+ nameSpace.setVariable(name,object, false);
+ } //}}}
+
+ //{{{ setupDefaultVariables() method
+ protected abstract void setupDefaultVariables(NameSpace namespace, T param)
+ throws UtilEvalError;
+ //}}}
+
+ //{{{ resetDefaultVariables() method
+ protected abstract void resetDefaultVariables(NameSpace namespace)
+ throws UtilEvalError;
+ //}}}
+
+ //{{{ handleException() method
+ protected abstract void handleException(T param, String path, Throwable t);
+ //}}}
+
+ //{{{ createInterpreter() method
+ protected static Interpreter createInterpreter(NameSpace nameSpace)
+ {
+ return new Interpreter(null,System.out,System.err,false,nameSpace);
+ } //}}}
+
+ //{{{ unwrapException() method
+ /**
+ * This extracts an exception from a 'wrapping' exception, as BeanShell
+ * sometimes throws. This gives the user a more accurate error traceback
+ */
+ protected static void unwrapException(Exception e) throws Exception
+ {
+ if(e instanceof TargetError)
+ {
+ Throwable t = ((TargetError)e).getTarget();
+ if(t instanceof Exception)
+ throw (Exception)t;
+ else if(t instanceof Error)
+ throw (Error)t;
+ }
+
+ if(e instanceof InvocationTargetException)
+ {
+ Throwable t = ((InvocationTargetException)e).getTargetException();
+ if(t instanceof Exception)
+ throw (Exception)t;
+ else if(t instanceof Error)
+ throw (Error)t;
+ }
+
+ throw e;
+ } //}}}
+
+ //{{{ Static variables
+ protected NameSpace global;
+ protected BshClassManager classManager;
+ private static Interpreter interpForMethods;
+ private static final Object[] NO_ARGS = new Object[0];
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/Buffer.java b/jEdit/org/gjt/sp/jedit/Buffer.java
index 1e2ba56..f69dbe5 100644
--- a/jEdit/org/gjt/sp/jedit/Buffer.java
+++ b/jEdit/org/gjt/sp/jedit/Buffer.java
@@ -1,2256 +1,2217 @@
-/*
- * Buffer.java - jEdit buffer
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2005 Slava Pestov
- * Portions copyright (C) 1999, 2000 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import org.gjt.sp.jedit.browser.VFSBrowser;
-import org.gjt.sp.jedit.buffer.*;
-import org.gjt.sp.jedit.bufferio.BufferAutosaveRequest;
-import org.gjt.sp.jedit.bufferio.BufferIORequest;
-import org.gjt.sp.jedit.bufferio.MarkersSaveRequest;
-import org.gjt.sp.jedit.bufferset.BufferSet;
-import org.gjt.sp.jedit.gui.StyleEditor;
-import org.gjt.sp.jedit.io.FileVFS;
-import org.gjt.sp.jedit.io.VFS;
-import org.gjt.sp.jedit.io.VFSFile;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.msg.BufferUpdate;
-import org.gjt.sp.jedit.syntax.*;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-import org.gjt.sp.util.IntegerArray;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.jedit.visitors.JEditVisitorAdapter;
-import org.gjt.sp.jedit.visitors.SaveCaretInfoVisitor;
-import org.gjt.sp.jedit.options.GeneralOptionPane;
-
-import javax.swing.*;
-import javax.swing.text.AttributeSet;
-import javax.swing.text.Segment;
-import java.io.File;
-import java.io.IOException;
-import java.net.Socket;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Vector;
-import java.util.Map;
-//}}}
-
-/**
- * A <code>Buffer</code> represents the contents of an open text
- * file as it is maintained in the computer's memory (as opposed to
- * how it may be stored on a disk).<p>
- *
- * In a BeanShell script, you can obtain the current buffer instance from the
- * <code>buffer</code> variable.<p>
- *
- * This class does not have a public constructor.
- * Buffers can be opened and closed using methods in the <code>jEdit</code>
- * class.<p>
- *
- * This class is partially thread-safe, however you must pay attention to two
- * very important guidelines:
- * <ul>
- * <li>Changes to a buffer can only be made from the AWT thread.
- * <li>When accessing the buffer from another thread, you must
- * grab a read lock if you plan on performing more than one call, to ensure that
- * the buffer contents are not changed by the AWT thread for the duration of the
- * lock. Only methods whose descriptions specify thread safety can be invoked
- * from other threads.
- * </ul>
- *
- * @author Slava Pestov
- * @version $Id: Buffer.java 17764 2010-05-08 09:46:42Z k_satoda $
- */
-public class Buffer extends JEditBuffer
-{
- //{{{ Some constants
- /**
- * Backed up property.
- * @since jEdit 3.2pre2
- */
- public static final String BACKED_UP = "Buffer__backedUp";
-
- /**
- * Caret info properties.
- * @since jEdit 3.2pre1
- */
- public static final String CARET = "Buffer__caret";
- public static final String CARET_POSITIONED = "Buffer__caretPositioned";
-
- /**
- * Stores a List of {@link org.gjt.sp.jedit.textarea.Selection} instances.
- */
- public static final String SELECTION = "Buffer__selection";
-
- /**
- * This should be a physical line number, so that the scroll
- * position is preserved correctly across reloads (which will
- * affect virtual line numbers, due to fold being reset)
- */
- public static final String SCROLL_VERT = "Buffer__scrollVert";
- public static final String SCROLL_HORIZ = "Buffer__scrollHoriz";
-
- /**
- * Should jEdit try to set the encoding based on a UTF8, UTF16 or
- * XML signature at the beginning of the file?
- */
- public static final String ENCODING_AUTODETECT = "encodingAutodetect";
-
- /**
- * This property is set to 'true' if the file has a trailing newline.
- * @since jEdit 4.0pre1
- */
- public static final String TRAILING_EOL = "trailingEOL";
-
- /**
- * This property is set to 'true' if the file should be GZipped.
- * @since jEdit 4.0pre4
- */
- public static final String GZIPPED = "gzipped";
- //}}}
-
- //{{{ Input/output methods
-
- //{{{ reload() method
- /**
- * Reloads the buffer from disk, asking for confirmation if the buffer
- * has unsaved changes.
- * @param view The view
- * @since jEdit 2.7pre2
- */
- public void reload(View view)
- {
- if (getFlag(UNTITLED))
- return;
- if(isDirty())
- {
- String[] args = { path };
- int result = GUIUtilities.confirm(view,"changedreload",
- args,JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
- if(result != JOptionPane.YES_OPTION)
- return;
- }
- view.visit(new SaveCaretInfoVisitor());
- load(view,true);
- } //}}}
-
- //{{{ load() method
- /**
- * Loads the buffer from disk.
- * @param view The view
- * @param reload If true, user will not be asked to recover autosave
- * file, if any
- *
- * @since 2.5pre1
- */
- public boolean load(final View view, final boolean reload)
- {
- if(isPerformingIO())
- {
- GUIUtilities.error(view,"buffer-multiple-io",null);
- return false;
- }
-
- setBooleanProperty(BufferIORequest.ERROR_OCCURRED,false);
-
- setLoading(true);
-
- // view text areas temporarily blank out while a buffer is
- // being loaded, to indicate to the user that there is no
- // data available yet.
- if(!getFlag(TEMPORARY))
- EditBus.send(new BufferUpdate(this,view,BufferUpdate.LOAD_STARTED));
-
- final boolean loadAutosave;
-
- if(reload || !getFlag(NEW_FILE))
- {
- if(file != null)
- modTime = file.lastModified();
-
- // Only on initial load
- if(!reload && autosaveFile != null && autosaveFile.exists())
- loadAutosave = recoverAutosave(view);
- else
- {
- if(autosaveFile != null)
- autosaveFile.delete();
- loadAutosave = false;
- }
-
- if(!loadAutosave)
- {
- VFS vfs = VFSManager.getVFSForPath(path);
-
- if(!checkFileForLoad(view,vfs,path))
- {
- setLoading(false);
- return false;
- }
-
- // have to check again since above might set
- // NEW_FILE flag
- if(reload || !getFlag(NEW_FILE))
- {
- if(!vfs.load(view,this,path))
- {
- setLoading(false);
- return false;
- }
- }
- }
- }
- else
- loadAutosave = false;
-
- //{{{ Do some stuff once loading is finished
- Runnable runnable = new Runnable()
- {
- public void run()
- {
- String newPath = getStringProperty(
- BufferIORequest.NEW_PATH);
- Segment seg = (Segment)getProperty(
- BufferIORequest.LOAD_DATA);
- IntegerArray endOffsets = (IntegerArray)
- getProperty(BufferIORequest.END_OFFSETS);
-
- loadText(seg,endOffsets);
-
- unsetProperty(BufferIORequest.LOAD_DATA);
- unsetProperty(BufferIORequest.END_OFFSETS);
- unsetProperty(BufferIORequest.NEW_PATH);
-
- undoMgr.clear();
- undoMgr.setLimit(jEdit.getIntegerProperty(
- "buffer.undoCount",100));
-
- if(!getFlag(TEMPORARY))
- finishLoading();
-
- setLoading(false);
-
- // if reloading a file, clear dirty flag
- if(reload)
- setDirty(false);
-
- if(!loadAutosave && newPath != null)
- setPath(newPath);
-
- // if loadAutosave is false, we loaded an
- // autosave file, so we set 'dirty' to true
-
- // note that we don't use setDirty(),
- // because a) that would send an unnecessary
- // message, b) it would also set the
- // AUTOSAVE_DIRTY flag, which will make
- // the autosave thread write out a
- // redundant autosave file
- if(loadAutosave)
- Buffer.super.setDirty(true);
-
- // send some EditBus messages
- if(!getFlag(TEMPORARY))
- {
- fireBufferLoaded();
- EditBus.send(new BufferUpdate(Buffer.this,
- view,BufferUpdate.LOADED));
- //EditBus.send(new BufferUpdate(Buffer.this,
- // view,BufferUpdate.MARKERS_CHANGED));
- }
- }
- }; //}}}
-
- if(getFlag(TEMPORARY))
- runnable.run();
- else
- VFSManager.runInAWTThread(runnable);
-
- return true;
- } //}}}
-
- //{{{ insertFile() method
- /**
- * Loads a file from disk, and inserts it into this buffer.
- * @param view The view
- * @param path the path of the file to insert
- *
- * @since 4.0pre1
- */
- public boolean insertFile(View view, String path)
- {
- if(isPerformingIO())
- {
- GUIUtilities.error(view,"buffer-multiple-io",null);
- return false;
- }
-
- setBooleanProperty(BufferIORequest.ERROR_OCCURRED,false);
-
- path = MiscUtilities.constructPath(this.path,path);
-
- Buffer buffer = jEdit.getBuffer(path);
- if(buffer != null)
- {
- view.getTextArea().setSelectedText(
- buffer.getText(0,buffer.getLength()));
- return true;
- }
-
- VFS vfs = VFSManager.getVFSForPath(path);
-
- // this returns false if initial sanity
- // checks (if the file is a directory, etc)
- // fail
- return vfs.insert(view,this,path);
- } //}}}
-
- //{{{ autosave() method
- /**
- * Autosaves this buffer.
- */
- public void autosave()
- {
- if(autosaveFile == null || !getFlag(AUTOSAVE_DIRTY)
- || !isDirty() || isPerformingIO() ||
- !autosaveFile.getParentFile().exists())
- return;
-
- setFlag(AUTOSAVE_DIRTY,false);
-
- VFSManager.runInWorkThread(new BufferAutosaveRequest(
- null,this,null,VFSManager.getFileVFS(),
- autosaveFile.getPath()));
- } //}}}
-
- //{{{ saveAs() method
- /**
- * Prompts the user for a file to save this buffer to.
- * @param view The view
- * @param rename True if the buffer's path should be changed, false
- * if only a copy should be saved to the specified filename
- * @since jEdit 2.6pre5
- */
- public boolean saveAs(View view, boolean rename)
- {
- String[] files = GUIUtilities.showVFSFileDialog(view,path,
- VFSBrowser.SAVE_DIALOG,false);
-
- // files[] should have length 1, since the dialog type is
- // SAVE_DIALOG
- if(files == null)
- return false;
-
- return save(view,files[0],rename);
- } //}}}
-
- //{{{ save() method
- /**
- * Saves this buffer to the specified path name, or the current path
- * name if it's null.
- * @param view The view
- * @param path The path name to save the buffer to, or null to use
- * the existing path
- */
- public boolean save(View view, String path)
- {
- return save(view,path,true,false);
- } //}}}
-
- //{{{ save() method
- /**
- * Saves this buffer to the specified path name, or the current path
- * name if it's null.
- * @param view The view
- * @param path The path name to save the buffer to, or null to use
- * the existing path
- * @param rename True if the buffer's path should be changed, false
- * if only a copy should be saved to the specified filename
- * @since jEdit 2.6pre5
- */
- public boolean save(View view, String path, boolean rename)
- {
- return save(view,path,rename,false);
- } //}}}
-
- //{{{ save() method
- /**
- * Saves this buffer to the specified path name, or the current path
- * name if it's null.
- * @param view The view
- * @param path The path name to save the buffer to, or null to use
- * the existing path
- * @param rename True if the buffer's path should be changed, false
- * if only a copy should be saved to the specified filename
- * @param disableFileStatusCheck Disables file status checking
- * regardless of the state of the checkFileStatus property
- */
- public boolean save(final View view, String path, final boolean rename, boolean disableFileStatusCheck)
- {
- if(isPerformingIO())
- {
- GUIUtilities.error(view,"buffer-multiple-io",null);
- return false;
- }
-
- setBooleanProperty(BufferIORequest.ERROR_OCCURRED,false);
-
- if(path == null && getFlag(NEW_FILE))
- return saveAs(view,rename);
-
- if(path == null && file != null)
- {
- long newModTime = file.lastModified();
-
- if(newModTime != modTime
- && jEdit.getBooleanProperty("view.checkModStatus"))
- {
- Object[] args = { this.path };
- int result = GUIUtilities.confirm(view,
- "filechanged-save",args,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
- if(result != JOptionPane.YES_OPTION)
- return false;
- }
- }
-
- EditBus.send(new BufferUpdate(this,view,BufferUpdate.SAVING));
-
- setPerformingIO(true);
-
- final String oldPath = this.path;
- final String oldSymlinkPath = symlinkPath;
- final String newPath = path == null ? this.path : path;
-
- VFS vfs = VFSManager.getVFSForPath(newPath);
-
- if(!checkFileForSave(view,vfs,newPath))
- {
- setPerformingIO(false);
- return false;
- }
-
- Object session = vfs.createVFSSession(newPath,view);
- if (session == null)
- {
- setPerformingIO(false);
- return false;
- }
-
- unsetProperty("overwriteReadonly");
- unsetProperty("forbidTwoStageSave");
- try
- {
- VFSFile file = vfs._getFile(session,newPath,view);
- if (file != null)
- {
- boolean vfsRenameCap = (vfs.getCapabilities() & VFS.RENAME_CAP) != 0;
- if (!file.isWriteable())
- {
- Log.log(Log.WARNING, this, "Buffer saving : File " + file + " is readOnly");
- if (vfsRenameCap)
- {
- Log.log(Log.DEBUG, this, "Buffer saving : VFS can rename files");
- String savePath = vfs._canonPath(session,newPath,view);
- if(!MiscUtilities.isURL(savePath))
- savePath = MiscUtilities.resolveSymlinks(savePath);
- savePath = vfs.getTwoStageSaveName(savePath);
- if (savePath == null)
- {
- Log.log(Log.DEBUG, this, "Buffer saving : two stage save impossible because path is null");
- VFSManager.error(view,
- newPath,
- "ioerror.save-readonly-twostagefail",
- null);
- setPerformingIO(false);
- return false;
- }
- else
- {
- int result = GUIUtilities.confirm(
- view, "vfs.overwrite-readonly",
- new Object[]{newPath},
- JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
- if (result == JOptionPane.YES_OPTION)
- {
- Log.log(Log.WARNING, this, "Buffer saving : two stage save will be used to save buffer");
- setBooleanProperty("overwriteReadonly",true);
- }
- else
- {
- Log.log(Log.DEBUG,this, "Buffer not saved");
- setPerformingIO(false);
- return false;
- }
- }
- }
- else
- {
- Log.log(Log.WARNING, this, "Buffer saving : file is readonly and vfs cannot do two stage save");
- VFSManager.error(view,
- newPath,
- "ioerror.write-error-readonly",
- null);
- setPerformingIO(false);
- return false;
- }
- }
- else
- {
- String savePath = vfs._canonPath(session,newPath,view);
- if(!MiscUtilities.isURL(savePath))
- savePath = MiscUtilities.resolveSymlinks(savePath);
- savePath = vfs.getTwoStageSaveName(savePath);
- if (jEdit.getBooleanProperty("twoStageSave") && (!vfsRenameCap || savePath == null))
- {
- // the file is writeable but the vfs cannot do two stage. We must overwrite
- // readonly flag
-
-
- int result = GUIUtilities.confirm(
- view, "vfs.twostageimpossible",
- new Object[]{newPath},
- JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
- if (result == JOptionPane.YES_OPTION)
- {
- Log.log(Log.WARNING, this, "Buffer saving : two stage save cannot be used");
- setBooleanProperty("forbidTwoStageSave",true);
- }
- else
- {
- Log.log(Log.DEBUG,this, "Buffer not saved");
- setPerformingIO(false);
- return false;
- }
-
- }
- }
- }
- }
- catch(IOException io)
- {
- VFSManager.error(view,newPath,"ioerror",
- new String[] { io.toString() });
- setPerformingIO(false);
- return false;
- }
- finally
- {
- try
- {
- vfs._endVFSSession(session,view);
- }
- catch(IOException io)
- {
- VFSManager.error(view,newPath,"ioerror",
- new String[] { io.toString() });
- setPerformingIO(false);
- return false;
- }
- }
-
- if(!vfs.save(view,this,newPath))
- {
- setPerformingIO(false);
- return false;
- }
-
- // Once save is complete, do a few other things
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- setPerformingIO(false);
- setProperty("overwriteReadonly",null);
- finishSaving(view,oldPath,oldSymlinkPath,
- newPath,rename,getBooleanProperty(
- BufferIORequest.ERROR_OCCURRED));
- updateMarkersFile(view);
- }
- });
-
- int check = jEdit.getIntegerProperty("checkFileStatus");
- if(!disableFileStatusCheck && (check == GeneralOptionPane.checkFileStatus_all ||
- check == GeneralOptionPane.checkFileStatus_operations))
- jEdit.checkBufferStatus(view,false);
-
- return true;
- } //}}}
-
- //{{{ checkFileStatus() method
- public static final int FILE_NOT_CHANGED = 0;
- public static final int FILE_CHANGED = 1;
- public static final int FILE_DELETED = 2;
- /**
- * Check if the buffer has changed on disk.
- * @return One of <code>NOT_CHANGED</code>, <code>CHANGED</code>, or
- * <code>DELETED</code>.
- *
- * @since jEdit 4.2pre1
- */
- public int checkFileStatus(View view)
- {
- // - don't do these checks while a save is in progress,
- // because for a moment newModTime will be greater than
- // oldModTime, due to the multithreading
- // - only supported on local file system
- if(!isPerformingIO() && file != null && !getFlag(NEW_FILE))
- {
- boolean newReadOnly = file.exists() && !file.canWrite();
- if(newReadOnly != isFileReadOnly())
- {
- setFileReadOnly(newReadOnly);
- EditBus.send(new BufferUpdate(this,null,
- BufferUpdate.DIRTY_CHANGED));
- }
-
- long oldModTime = modTime;
- long newModTime = file.lastModified();
-
- if(newModTime != oldModTime)
- {
- modTime = newModTime;
-
- if(!file.exists())
- {
- setFlag(NEW_FILE,true);
- setDirty(true);
- return FILE_DELETED;
- }
- else
- {
- return FILE_CHANGED;
- }
- }
- }
-
- return FILE_NOT_CHANGED;
- } //}}}
-
- //}}}
-
- //{{{ Getters/setter methods for various buffer meta-data
-
- //{{{ getLastModified() method
- /**
- * Returns the last time jEdit modified the file on disk.
- * This method is thread-safe.
- */
- public long getLastModified()
- {
- return modTime;
- } //}}}
-
- //{{{ setLastModified() method
- /**
- * Sets the last time jEdit modified the file on disk.
- * @param modTime The new modification time
- */
- public void setLastModified(long modTime)
- {
- this.modTime = modTime;
- } //}}}
-
- //{{{ getAutoReload() method
- /**
- * Returns the status of the AUTORELOAD flag
- * If true, reload changed files automatically
- */
- public boolean getAutoReload()
- {
- return getFlag(AUTORELOAD);
- } //}}}
-
- //{{{ setAutoReload() method
- /**
- * Sets the status of the AUTORELOAD flag
- * @param value # If true, reload changed files automatically
- */
- public void setAutoReload(boolean value)
- {
- setFlag(AUTORELOAD, value);
- } //}}}
-
- //{{{ getAutoReloadDialog() method
- /**
- * Returns the status of the AUTORELOAD_DIALOG flag
- * If true, prompt for reloading or notify user
- * when the file has changed on disk
- */
- public boolean getAutoReloadDialog()
- {
- return getFlag(AUTORELOAD_DIALOG);
- } //}}}
-
- //{{{ setAutoReloadDialog() method
- /**
- * Sets the status of the AUTORELOAD_DIALOG flag
- * @param value # If true, prompt for reloading or notify user
- * when the file has changed on disk
-
- */
- public void setAutoReloadDialog(boolean value)
- {
- setFlag(AUTORELOAD_DIALOG, value);
- } //}}}
-
- //{{{ getVFS() method
- /**
- * Returns the virtual filesystem responsible for loading and
- * saving this buffer. This method is thread-safe.
- */
- public VFS getVFS()
- {
- return VFSManager.getVFSForPath(path);
- } //}}}
-
- //{{{ getAutosaveFile() method
- /**
- * Returns the autosave file for this buffer. This may be null if
- * the file is non-local.
- */
- public File getAutosaveFile()
- {
- return autosaveFile;
- } //}}}
-
- //{{{ removeAutosaveFile() method
- /**
- * Remove the autosave file.
- * @since jEdit 4.3pre12
- */
- public void removeAutosaveFile()
- {
- if (autosaveFile != null)
- {
- autosaveFile.delete();
- setFlag(AUTOSAVE_DIRTY,true);
- }
- } //}}}
-
- //{{{ getName() method
- /**
- * Returns the name of this buffer. This method is thread-safe.
- */
- public String getName()
- {
- return name;
- } //}}}
-
- //{{{ getPath() method
- /**
- * Returns the path name of this buffer. This method is thread-safe.
- */
- public String getPath()
- {
- return path;
- } //}}}
-
- //{{{ getPath() method
- /**
- * @param shortVersion if true, replaces home path with ~/ on unix
- */
- public String getPath(Boolean shortVersion)
- {
- return shortVersion ? MiscUtilities.abbreviate(path) : getPath();
- } //}}}
-
-
- //{{{ getSymlinkPath() method
- /**
- * If this file is a symbolic link, returns the link destination.
- * Otherwise returns the file's path. This method is thread-safe.
- * @since jEdit 4.2pre1
- */
- public String getSymlinkPath()
- {
- return symlinkPath;
- } //}}}
-
- //{{{ getDirectory() method
- /**
- * Returns the directory containing this buffer.
- * @since jEdit 4.1pre11
- */
- public String getDirectory()
- {
- return directory;
- } //}}}
-
- //{{{ isClosed() method
- /**
- * Returns true if this buffer has been closed with
- * {@link org.gjt.sp.jedit.jEdit#closeBuffer(View,Buffer)}.
- * This method is thread-safe.
- */
- public boolean isClosed()
- {
- return getFlag(CLOSED);
- } //}}}
-
- //{{{ isLoaded() method
- /**
- * Returns true if the buffer is loaded. This method is thread-safe.
- */
- public boolean isLoaded()
- {
- return !isLoading();
- } //}}}
-
- //{{{ isNewFile() method
- /**
- * Returns whether this buffer lacks a corresponding version on disk.
- * This method is thread-safe.
- */
- public boolean isNewFile()
- {
- return getFlag(NEW_FILE);
- } //}}}
-
- //{{{ setNewFile() method
- /**
- * Sets the new file flag.
- * @param newFile The new file flag
- */
- public void setNewFile(boolean newFile)
- {
- setFlag(NEW_FILE,newFile);
- if(!newFile)
- setFlag(UNTITLED,false);
- } //}}}
-
- //{{{ isUntitled() method
- /**
- * Returns true if this file is 'untitled'. This method is thread-safe.
- */
- public boolean isUntitled()
- {
- return getFlag(UNTITLED);
- } //}}}
-
- //{{{ setDirty() method
- /**
- * Sets the 'dirty' (changed since last save) flag of this buffer.
- */
- @Override
- public void setDirty(boolean d)
- {
- boolean old_d = isDirty();
- if (isUntitled() && jEdit.getBooleanProperty("suppressNotSavedConfirmUntitled"))
- d = false;
- if (d && getLength() == initialLength)
- {
- if (jEdit.getBooleanProperty("useMD5forDirtyCalculation"))
- d = !Arrays.equals(calculateHash(), md5hash);
- }
- super.setDirty(d);
- boolean editable = isEditable();
-
- if(d)
- {
- if(editable)
- setFlag(AUTOSAVE_DIRTY,true);
- }
- else
- {
- setFlag(AUTOSAVE_DIRTY,false);
-
- if(autosaveFile != null)
- autosaveFile.delete();
- }
-
- if(d != old_d && editable)
- {
- EditBus.send(new BufferUpdate(this,null,
- BufferUpdate.DIRTY_CHANGED));
- }
- } //}}}
-
- //{{{ isTemporary() method
- /**
- * Returns if this is a temporary buffer. This method is thread-safe.
- * @see jEdit#openTemporary(View,String,String,boolean)
- * @see jEdit#commitTemporary(Buffer)
- * @since jEdit 2.2pre7
- */
- public boolean isTemporary()
- {
- return getFlag(TEMPORARY);
- } //}}}
-
- //{{{ getIcon() method
- /**
- * Returns this buffer's icon.
- * @since jEdit 2.6pre6
- */
- public Icon getIcon()
- {
- if(isDirty())
- return GUIUtilities.loadIcon("dirty.gif");
- else if(isReadOnly())
- return GUIUtilities.loadIcon("readonly.gif");
- else if(getFlag(NEW_FILE))
- return GUIUtilities.loadIcon("new.gif");
- else
- return GUIUtilities.loadIcon("normal.gif");
- } //}}}
-
- //}}}
-
- //{{{ Buffer events
-
- //{{{ addBufferChangeListener() method
- /**
- * @deprecated Call {@link JEditBuffer#addBufferListener(BufferListener,int)}.
- */
- @Deprecated
- public void addBufferChangeListener(BufferChangeListener listener,
- int priority)
- {
- addBufferListener(new BufferChangeListener.Adapter(listener),priority);
- } //}}}
-
- //{{{ addBufferChangeListener() method
- /**
- * @deprecated Call {@link JEditBuffer#addBufferListener(BufferListener)}.
- */
- @Deprecated
- public void addBufferChangeListener(BufferChangeListener listener)
- {
- addBufferListener(new BufferChangeListener.Adapter(listener), NORMAL_PRIORITY);
- } //}}}
-
- //{{{ removeBufferChangeListener() method
- /**
- * @deprecated Call {@link JEditBuffer#removeBufferListener(BufferListener)}.
- */
- @Deprecated
- public void removeBufferChangeListener(BufferChangeListener listener)
- {
- BufferListener[] listeners = getBufferListeners();
-
- for(int i = 0; i < listeners.length; i++)
- {
- BufferListener l = listeners[i];
- if(l instanceof BufferChangeListener.Adapter)
- {
- if(((BufferChangeListener.Adapter)l).getDelegate() == listener)
- {
- removeBufferListener(l);
- return;
- }
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Property methods
-
- //{{{ propertiesChanged() method
- /**
- * Reloads settings from the properties. This should be called
- * after the <code>syntax</code> or <code>folding</code>
- * buffer-local properties are changed.
- */
- @Override
- public void propertiesChanged()
- {
- super.propertiesChanged();
- setAutoReloadDialog(jEdit.getBooleanProperty("autoReloadDialog"));
- setAutoReload(jEdit.getBooleanProperty("autoReload"));
- if (!isTemporary())
- EditBus.send(new BufferUpdate(this,null,BufferUpdate.PROPERTIES_CHANGED));
- } //}}}
-
- //{{{ getDefaultProperty() method
- @Override
- public Object getDefaultProperty(String name)
- {
- Object retVal;
-
- if(mode != null)
- {
- retVal = mode.getProperty(name);
- if(retVal == null)
- return null;
-
- setDefaultProperty(name,retVal);
- return retVal;
- }
- // Now try buffer.<property>
- String value = jEdit.getProperty("buffer." + name);
- if(value == null)
- return null;
-
- // Try returning it as an integer first
- try
- {
- retVal = new Integer(value);
- }
- catch(NumberFormatException nf)
- {
- retVal = value;
- }
-
- return retVal;
- } //}}}
-
- //{{{ toggleWordWrap() method
- /**
- * Toggles word wrap between the three available modes. This is used
- * by the status bar.
- * @param view We show a message in the view's status bar
- * @since jEdit 4.1pre3
- */
- public void toggleWordWrap(View view)
- {
- String wrap = getStringProperty("wrap");
- if(wrap.equals("none"))
- wrap = "soft";
- else if(wrap.equals("soft"))
- wrap = "hard";
- else if(wrap.equals("hard"))
- wrap = "none";
- view.getStatus().setMessageAndClear(jEdit.getProperty(
- "view.status.wrap-changed",new String[] {
- wrap }));
- setProperty("wrap",wrap);
- propertiesChanged();
- } //}}}
-
- //{{{ toggleLineSeparator() method
- /**
- * Toggles the line separator between the three available settings.
- * This is used by the status bar.
- * @param view We show a message in the view's status bar
- * @since jEdit 4.1pre3
- */
- public void toggleLineSeparator(View view)
- {
- String status = null;
- String lineSep = getStringProperty(LINESEP);
- if("\n".equals(lineSep))
- {
- status = "windows";
- lineSep = "\r\n";
- }
- else if("\r\n".equals(lineSep))
- {
- status = "mac";
- lineSep = "\r";
- }
- else if("\r".equals(lineSep))
- {
- status = "unix";
- lineSep = "\n";
- }
- view.getStatus().setMessageAndClear(jEdit.getProperty(
- "view.status.linesep-changed",new String[] {
- jEdit.getProperty("lineSep." + status) }));
- setProperty(LINESEP, lineSep);
- setDirty(true);
- propertiesChanged();
- } //}}}
-
- //{{{ getContextSensitiveProperty() method
- /**
- * Some settings, like comment start and end strings, can
- * vary between different parts of a buffer (HTML text and inline
- * JavaScript, for example).
- * @param offset The offset
- * @param name The property name
- * @since jEdit 4.0pre3
- */
- @Override
- public String getContextSensitiveProperty(int offset, String name)
- {
- Object value = super.getContextSensitiveProperty(offset,name);
-
- if(value == null)
- {
- ParserRuleSet rules = getRuleSetAtOffset(offset);
-
- value = jEdit.getMode(rules.getModeName())
- .getProperty(name);
-
- if(value == null)
- value = mode.getProperty(name);
- }
-
- if(value == null)
- return null;
- else
- return String.valueOf(value);
- } //}}}
-
- //}}}
-
- //{{{ Edit modes, syntax highlighting
-
- //{{{ setMode() method
- /**
- * Sets this buffer's edit mode by calling the accept() method
- * of each registered edit mode.
- */
- public void setMode()
- {
- String userMode = getStringProperty("mode");
- if(userMode != null)
- {
- unsetProperty("mode");
- Mode m = ModeProvider.instance.getMode(userMode);
- if(m != null)
- {
- setMode(m);
- return;
- }
- }
-
- String firstLine = getLineText(0);
-
- Mode mode = ModeProvider.instance.getModeForFile(name, firstLine);
- if (mode != null)
- {
- setMode(mode);
- return;
- }
-
- Mode defaultMode = jEdit.getMode(jEdit.getProperty("buffer.defaultMode"));
- if(defaultMode == null)
- defaultMode = jEdit.getMode("text");
-
- if (defaultMode != null)
- setMode(defaultMode);
- } //}}}
-
- //}}}
-
- //{{{ Deprecated methods
-
- //{{{ putProperty() method
- /**
- * @deprecated Call <code>setProperty()</code> instead.
- */
- @Deprecated
- public void putProperty(Object name, Object value)
- {
- // for backwards compatibility
- if(!(name instanceof String))
- return;
-
- setProperty((String)name,value);
- } //}}}
-
- //{{{ putBooleanProperty() method
- /**
- * @deprecated Call <code>setBooleanProperty()</code> instead
- */
- @Deprecated
- public void putBooleanProperty(String name, boolean value)
- {
- setBooleanProperty(name,value);
- } //}}}
-
- //{{{ markTokens() method
- /**
- * @deprecated Use org.gjt.sp.jedit.syntax.DefaultTokenHandler instead
- */
- @Deprecated
- public static class TokenList extends DefaultTokenHandler
- {
- public Token getFirstToken()
- {
- return getTokens();
- }
- }
-
- /**
- * @deprecated Use the other form of <code>markTokens()</code> instead
- */
- @Deprecated
- public TokenList markTokens(int lineIndex)
- {
- TokenList list = new TokenList();
- markTokens(lineIndex,list);
- return list;
- } //}}}
-
- //{{{ insertString() method
- /**
- * Insert a string into the buffer
- * @param offset The offset
- * @param str The string
- * @param attr ignored
- * @deprecated Call <code>insert()</code> instead.
- */
- @Deprecated
- public void insertString(int offset, String str, AttributeSet attr)
- {
- insert(offset,str);
- } //}}}
-
- //{{{ getFile() method
- /**
- * @deprecated Do not call this method, use {@link #getPath()}
- * instead.
- */
- @Deprecated
- public File getFile()
- {
- return file;
- } //}}}
-
- //}}}
-
- //{{{ Marker methods
-
- //{{{ getMarkers() method
- /**
- * Returns a vector of markers.
- * @since jEdit 3.2pre1
- */
- public Vector<Marker> getMarkers()
- {
- return markers;
- } //}}}
-
- //{{{ getMarkerStatusPrompt() method
- /**
- * Returns the status prompt for the given marker action. Only
- * intended to be called from <code>actions.xml</code>.
- * @since jEdit 4.2pre2
- */
- public String getMarkerStatusPrompt(String action)
- {
- return jEdit.getProperty("view.status." + action,
- new String[] { getMarkerNameString() });
- } //}}}
-
- //{{{ getMarkerNameString() method
- /**
- * Returns a string of all set markers, used by the status bar
- * (eg, "a b $ % ^").
- * @since jEdit 4.2pre2
- */
- public String getMarkerNameString()
- {
- StringBuilder buf = new StringBuilder();
- for(int i = 0; i < markers.size(); i++)
- {
- Marker marker = markers.get(i);
- if(marker.getShortcut() != '\0')
- {
- if(buf.length() != 0)
- buf.append(' ');
- buf.append(marker.getShortcut());
- }
- }
-
- if(buf.length() == 0)
- return jEdit.getProperty("view.status.no-markers");
- else
- return buf.toString();
- } //}}}
-
- //{{{ addOrRemoveMarker() method
- /**
- * If a marker is set on the line of the position, it is removed. Otherwise
- * a new marker with the specified shortcut is added.
- * @param pos The position of the marker
- * @param shortcut The shortcut ('\0' if none)
- * @since jEdit 3.2pre5
- */
- public void addOrRemoveMarker(char shortcut, int pos)
- {
- int line = getLineOfOffset(pos);
- if(getMarkerAtLine(line) != null)
- removeMarker(line);
- else
- addMarker(shortcut,pos);
- } //}}}
-
- //{{{ addMarker() method
- /**
- * Adds a marker to this buffer.
- * @param pos The position of the marker
- * @param shortcut The shortcut ('\0' if none)
- * @since jEdit 3.2pre1
- */
- public void addMarker(char shortcut, int pos)
- {
- Marker markerN = new Marker(this,shortcut,pos);
- boolean added = false;
-
- // don't sort markers while buffer is being loaded
- if(isLoaded())
- {
- setFlag(MARKERS_CHANGED,true);
-
- markerN.createPosition();
-
- for(int i = 0; i < markers.size(); i++)
- {
- Marker marker = markers.get(i);
- if(shortcut != '\0' && marker.getShortcut() == shortcut)
- marker.setShortcut('\0');
-
- if(marker.getPosition() == pos)
- {
- markers.removeElementAt(i);
- i--;
- }
- }
-
- for(int i = 0; i < markers.size(); i++)
- {
- Marker marker = markers.get(i);
- if(marker.getPosition() > pos)
- {
- markers.insertElementAt(markerN,i);
- added = true;
- break;
- }
- }
- }
-
- if(!added)
- markers.addElement(markerN);
-
- if(isLoaded() && !getFlag(TEMPORARY))
- {
- EditBus.send(new BufferUpdate(this,null,
- BufferUpdate.MARKERS_CHANGED));
- }
- } //}}}
-
- //{{{ getMarkerInRange() method
- /**
- * Returns the first marker within the specified range.
- * @param start The start offset
- * @param end The end offset
- * @since jEdit 4.0pre4
- */
- public Marker getMarkerInRange(int start, int end)
- {
- for(int i = 0; i < markers.size(); i++)
- {
- Marker marker = markers.get(i);
- int pos = marker.getPosition();
- if(pos >= start && pos < end)
- return marker;
- }
-
- return null;
- } //}}}
-
- //{{{ getMarkerAtLine() method
- /**
- * Returns the first marker at the specified line, or <code>null</code>
- * if there is none.
- * @param line The line number
- * @since jEdit 3.2pre2
- */
- public Marker getMarkerAtLine(int line)
- {
- for(int i = 0; i < markers.size(); i++)
- {
- Marker marker = markers.get(i);
- if(getLineOfOffset(marker.getPosition()) == line)
- return marker;
- }
-
- return null;
- } //}}}
-
- //{{{ removeMarker() method
- /**
- * Removes all markers at the specified line.
- * @param line The line number
- * @since jEdit 3.2pre2
- */
- public void removeMarker(int line)
- {
- for(int i = 0; i < markers.size(); i++)
- {
- Marker marker = markers.get(i);
- if(getLineOfOffset(marker.getPosition()) == line)
- {
- setFlag(MARKERS_CHANGED,true);
- marker.removePosition();
- markers.removeElementAt(i);
- i--;
- }
- }
-
- EditBus.send(new BufferUpdate(this,null,
- BufferUpdate.MARKERS_CHANGED));
- } //}}}
-
- //{{{ removeAllMarkers() method
- /**
- * Removes all defined markers.
- * @since jEdit 2.6pre1
- */
- public void removeAllMarkers()
- {
- setFlag(MARKERS_CHANGED,true);
-
- for(int i = 0; i < markers.size(); i++)
- markers.get(i).removePosition();
-
- markers.removeAllElements();
-
- if(isLoaded())
- {
- EditBus.send(new BufferUpdate(this,null,
- BufferUpdate.MARKERS_CHANGED));
- }
- } //}}}
-
- //{{{ getMarker() method
- /**
- * Returns the marker with the specified shortcut.
- * @param shortcut The shortcut
- * @since jEdit 3.2pre2
- */
- public Marker getMarker(char shortcut)
- {
- for (Marker marker : markers)
- {
- if(marker.getShortcut() == shortcut)
- return marker;
- }
- return null;
- } //}}}
-
- //{{{ getMarkersPath() method
- /**
- * Returns the path for this buffer's markers file
- * @param vfs The appropriate VFS
- * @since jEdit 4.3pre7
- * @deprecated it will fail if you save to another VFS. use {@link #getMarkersPath(VFS, String)}
- */
- @Deprecated
- public String getMarkersPath(VFS vfs)
- {
- return getMarkersPath(vfs, path);
- } //}}}
-
- //{{{ getMarkersPath() method
- /**
- * Returns the path for this buffer's markers file
- * @param vfs The appropriate VFS
- * @param path the path of the buffer, it can be different from the field
- * when using save-as
- * @since jEdit 4.3pre10
- */
- public static String getMarkersPath(VFS vfs, String path)
- {
- return vfs.getParentOfPath(path)
- + '.' + vfs.getFileName(path)
- + ".marks";
- } //}}}
-
- //{{{ updateMarkersFile() method
- /**
- * Save the markers file, or delete it when there are mo markers left
- * Handling markers is now independent from saving the buffer.
- * Changing markers will not set the buffer dirty any longer.
- * @param view The current view
- * @since jEdit 4.3pre7
- */
- public boolean updateMarkersFile(View view)
- {
- if(!markersChanged())
- return true;
- // adapted from VFS.save
- VFS vfs = VFSManager.getVFSForPath(getPath());
- if (((vfs.getCapabilities() & VFS.WRITE_CAP) == 0) ||
- !vfs.isMarkersFileSupported())
- {
- VFSManager.error(view, path, "vfs.not-supported.save",
- new String[] { "markers file" });
- return false;
- }
- Object session = vfs.createVFSSession(path, view);
- if(session == null)
- return false;
- VFSManager.runInWorkThread(
- new MarkersSaveRequest(
- view, this, session, vfs, path));
- return true;
- } //}}}
-
- //{{{ markersChanged() method
- /**
- * Return true when markers have changed and the markers file needs
- * to be updated
- * @since jEdit 4.3pre7
- */
- public boolean markersChanged()
- {
- return getFlag(MARKERS_CHANGED);
- } //}}}
-
- //{{{ setMarkersChanged() method
- /**
- * Sets/unsets the MARKERS_CHANGED flag
- * @since jEdit 4.3pre7
- */
- public void setMarkersChanged(boolean changed)
- {
- setFlag(MARKERS_CHANGED, changed);
- } //}}}
-
- //}}}
-
- //{{{ Miscellaneous methods
-
- //{{{ setWaitSocket() method
- /**
- * This socket is closed when the buffer is closed.
- */
- public void setWaitSocket(Socket waitSocket)
- {
- this.waitSocket = waitSocket;
- } //}}}
-
- //{{{ getNext() method
- /**
- * Returns the next buffer in the list.
- */
- public Buffer getNext()
- {
- return next;
- } //}}}
-
- //{{{ getPrev() method
- /**
- * Returns the previous buffer in the list.
- */
- public Buffer getPrev()
- {
- return prev;
- } //}}}
-
- //{{{ getIndex() method
- /**
- * Returns the position of this buffer in the buffer list.
- */
- public int getIndex()
- {
- int count = 0;
- Buffer buffer = prev;
- while (true)
- {
- if(buffer == null)
- break;
- count++;
- buffer = buffer.prev;
- }
- return count;
- } //}}}
-
- //{{{ toString() method
- /**
- * Returns a string representation of this buffer.
- * This simply returns the path name.
- */
- @Override
- public String toString()
- {
- return name + " (" + MiscUtilities.abbreviate(directory) + ')';
- } //}}}
-
- //{{{ addBufferUndoListener() method
- /**
- * Adds a buffer undo listener.
- * @param listener The listener
- * @since jEdit 4.3pre18
- */
- public void addBufferUndoListener(BufferUndoListener listener)
- {
- undoListeners.add(listener);
- } //}}}
-
- //{{{ removeBufferUndoListener() method
- /**
- * Removes a buffer undo listener.
- * @param listener The listener
- * @since jEdit 4.3pre18
- */
- public void removeBufferUndoListener(BufferUndoListener listener)
- {
- undoListeners.remove(listener);
- } //}}}
-
- //}}}
-
- //{{{ Package-private members
- /** The previous buffer in the list. */
- Buffer prev;
- /** The next buffer in the list. */
- Buffer next;
-
- //{{{ Buffer constructor
- Buffer(String path, boolean newFile, boolean temp, Map props)
- {
- super(props);
-
- markers = new Vector<Marker>();
-
- setFlag(TEMPORARY,temp);
-
- // this must be called before any EditBus messages are sent
- setPath(path);
-
- /* Magic: UNTITLED is only set if newFile param to
- * constructor is set, NEW_FILE is also set if file
- * doesn't exist on disk.
- *
- * This is so that we can tell apart files created
- * with jEdit.newFile(), and those that just don't
- * exist on disk.
- *
- * Why do we need to tell the difference between the
- * two? jEdit.addBufferToList() checks if the only
- * opened buffer is an untitled buffer, and if so,
- * replaces it with the buffer to add. We don't want
- * this behavior to occur with files that don't
- * exist on disk; only untitled ones.
- */
- setFlag(UNTITLED,newFile);
- setFlag(NEW_FILE,newFile);
- setFlag(AUTORELOAD,jEdit.getBooleanProperty("autoReload"));
- setFlag(AUTORELOAD_DIALOG,jEdit.getBooleanProperty("autoReloadDialog"));
-
- undoListeners = new Vector<BufferUndoListener>();
- } //}}}
-
- //{{{ commitTemporary() method
- void commitTemporary()
- {
- setFlag(TEMPORARY,false);
-
- finishLoading();
- } //}}}
-
- //{{{ close() method
- void close()
- {
- setFlag(CLOSED,true);
-
- if(autosaveFile != null)
- autosaveFile.delete();
-
- // notify clients with -wait
- if(waitSocket != null)
- {
- try
- {
- waitSocket.getOutputStream().write('\0');
- waitSocket.getOutputStream().flush();
- waitSocket.getInputStream().close();
- waitSocket.getOutputStream().close();
- waitSocket.close();
- }
- catch(IOException io)
- {
- //Log.log(Log.ERROR,this,io);
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Protected members
-
- //{{{ fireBeginUndo() method
- protected void fireBeginUndo()
- {
- for (BufferUndoListener listener: undoListeners)
- {
- try
- {
- listener.beginUndo(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer undo event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ fireEndUndo() method
- protected void fireEndUndo()
- {
- for (BufferUndoListener listener: undoListeners)
- {
- try
- {
- listener.endUndo(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer undo event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ fireBeginRedo() method
- protected void fireBeginRedo()
- {
- for (BufferUndoListener listener: undoListeners)
- {
- try
- {
- listener.beginRedo(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer begin redo event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ fireEndRedo() method
- protected void fireEndRedo()
- {
- for (BufferUndoListener listener: undoListeners)
- {
- try
- {
- listener.endRedo(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer end redo event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
- //}}}
-
- //{{{ Private members
-
- //{{{ Flags
-
- //{{{ setFlag() method
- private void setFlag(int flag, boolean value)
- {
- if(value)
- flags |= 1 << flag;
- else
- flags &= ~(1 << flag);
- } //}}}
-
- //{{{ getFlag() method
- private boolean getFlag(int flag)
- {
- int mask = 1 << flag;
- return (flags & mask) == mask;
- } //}}}
-
- //{{{ Flag values
- private static final int CLOSED = 0;
- private static final int NEW_FILE = 3;
- private static final int UNTITLED = 4;
- private static final int AUTOSAVE_DIRTY = 5;
- private static final int AUTORELOAD = 6;
- private static final int AUTORELOAD_DIALOG = 7;
- private static final int TEMPORARY = 10;
- private static final int MARKERS_CHANGED = 12;
- //}}}
-
- private int flags;
-
- //}}}
-
- //{{{ Instance variables
- private String path;
- private String symlinkPath;
- private String name;
- private String directory;
- private File file;
- private File autosaveFile;
- private long modTime;
- private byte[] md5hash;
- private int initialLength;
-
- private final Vector<Marker> markers;
-
- private Socket waitSocket;
- private List<BufferUndoListener> undoListeners;
- //}}}
-
- //{{{ setPath() method
- private void setPath(final String path)
- {
- jEdit.visit(new JEditVisitorAdapter()
- {
- @Override
- public void visit(EditPane editPane)
- {
- editPane.bufferRenamed(Buffer.this.path, path);
- }
- });
-
- this.path = path;
- VFS vfs = VFSManager.getVFSForPath(path);
- if((vfs.getCapabilities() & VFS.WRITE_CAP) == 0)
- setFileReadOnly(true);
- name = vfs.getFileName(path);
- directory = vfs.getParentOfPath(path);
-
- if(vfs instanceof FileVFS)
- {
- file = new File(path);
- symlinkPath = MiscUtilities.resolveSymlinks(path);
-
- // if we don't do this, the autosave file won't be
- // deleted after a save as
- if(autosaveFile != null)
- autosaveFile.delete();
- autosaveFile = new File(file.getParent(),'#' + name + '#');
- }
- else
- {
- // I wonder if the lack of this broke anything in the
- // past?
- file = null;
- autosaveFile = null;
- symlinkPath = path;
- }
- } //}}}
-
-
- //{{{ recoverAutosave() method
- private boolean recoverAutosave(final View view)
- {
- if(!autosaveFile.canRead())
- return false;
-
- // this method might get called at startup
- GUIUtilities.hideSplashScreen();
-
- final Object[] args = { autosaveFile.getPath() };
- int result = GUIUtilities.confirm(view,"autosave-found",args,
- JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
-
- if(result == JOptionPane.YES_OPTION)
- {
- VFSManager.getFileVFS().load(view,this,autosaveFile.getPath());
-
- // show this message when all I/O requests are
- // complete
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- GUIUtilities.message(view,"autosave-loaded",args);
- }
- });
-
- return true;
- }
- else
- return false;
- } //}}}
-
- //{{{ checkFileForLoad() method
- private boolean checkFileForLoad(View view, VFS vfs, String path)
- {
- if((vfs.getCapabilities() & VFS.LOW_LATENCY_CAP) != 0)
- {
- Object session = vfs.createVFSSession(path, view);
- if(session == null)
- return false;
-
- try
- {
- VFSFile file = vfs._getFile(session,path,view);
- if(file == null)
- {
- setNewFile(true);
- return true;
- }
-
- if(!file.isReadable())
- {
- VFSManager.error(view,path,"ioerror.no-read",null);
- setNewFile(false);
- return false;
- }
-
- setFileReadOnly(!file.isWriteable());
-
- if(file.getType() != VFSFile.FILE)
- {
- VFSManager.error(view,path,
- "ioerror.open-directory",null);
- setNewFile(false);
- return false;
- }
- }
- catch(IOException io)
- {
- VFSManager.error(view,path,"ioerror",
- new String[] { io.toString() });
- return false;
- }
- finally
- {
- try
- {
- vfs._endVFSSession(session,view);
- }
- catch(IOException io)
- {
- VFSManager.error(view,path,"ioerror",
- new String[] { io.toString() });
- return false;
- }
- }
- }
-
- return true;
- } //}}}
-
- //{{{ checkFileForSave() method
- private static boolean checkFileForSave(View view, VFS vfs, String path)
- {
- if((vfs.getCapabilities() & VFS.LOW_LATENCY_CAP) != 0)
- {
- Object session = vfs.createVFSSession(path,view);
- if(session == null)
- return false;
-
- try
- {
- VFSFile file = vfs._getFile(session,path,view);
- if(file == null)
- return true;
-
- if(file.getType() != VFSFile.FILE)
- {
- VFSManager.error(view,path,
- "ioerror.save-directory",null);
- return false;
- }
- }
- catch(IOException io)
- {
- VFSManager.error(view,path,"ioerror",
- new String[] { io.toString() });
- return false;
- }
- finally
- {
- try
- {
- vfs._endVFSSession(session,view);
- }
- catch(IOException io)
- {
- VFSManager.error(view,path,"ioerror",
- new String[] { io.toString() });
- return false;
- }
- }
- }
-
- return true;
- } //}}}
-
- /** @return an MD5 hash of the contents of the buffer */
- private byte[] calculateHash()
- {
- final byte[] dummy = new byte[1];
- if (!jEdit.getBooleanProperty("useMD5forDirtyCalculation"))
- return dummy;
- ByteBuffer bb = null;
- readLock();
- try
- {
- // Log.log(Log.NOTICE, this, "calculateHash()");
- int length = getLength();
- bb = ByteBuffer.allocate(length * 2); // Chars are 2 bytes
- CharBuffer cb = bb.asCharBuffer();
- cb.append( getSegment(0, length) );
- }
- finally
- {
- readUnlock();
- }
- try
- {
- MessageDigest digest = java.security.MessageDigest.getInstance("MD5");
- digest.update( bb );
- return digest.digest();
- }
- catch (NoSuchAlgorithmException nsae)
- {
- Log.log(Log.ERROR, this, "Can't Calculate MD5 hash!", nsae);
- return dummy;
- }
-
- }
-
- /** Update the buffer's members with the current hash and length,
- * for later comparison.
- */
- private void updateHash()
- {
- initialLength = getLength();
- md5hash = calculateHash();
- }
-
- //{{{ finishLoading() method
- private void finishLoading()
- {
- updateHash();
-
- parseBufferLocalProperties();
- // AHA!
- // this is probably the only way to fix this
- FoldHandler oldFoldHandler = getFoldHandler();
- setMode();
-
- if(getFoldHandler() == oldFoldHandler)
- {
- // on a reload, the fold handler doesn't change, but
- // we still need to re-collapse folds.
- // don't do this on initial fold handler creation
- invalidateFoldLevels();
-
- fireFoldHandlerChanged();
- }
-
- // Create marker positions
- for(int i = 0; i < markers.size(); i++)
- {
- Marker marker = markers.get(i);
- marker.removePosition();
- int pos = marker.getPosition();
- if(pos > getLength())
- marker.setPosition(getLength());
- else if(pos < 0)
- marker.setPosition(0);
- marker.createPosition();
- }
- } //}}}
-
- //{{{ finishSaving() method
- private void finishSaving(View view, String oldPath,
- String oldSymlinkPath, String path,
- boolean rename, boolean error)
- {
-
- //{{{ Set the buffer's path
- // Caveat: won't work if save() called with a relative path.
- // But I don't think anyone calls it like that anyway.
- if(!error && !path.equals(oldPath))
- {
- Buffer buffer = jEdit.getBuffer(path);
-
- if(rename)
- {
- /* if we save a file with the same name as one
- * that's already open, we presume that we can
- * close the existing file, since the user
- * would have confirmed the overwrite in the
- * 'save as' dialog box anyway */
- if(buffer != null && /* can't happen? */
- !buffer.getPath().equals(oldPath))
- {
- buffer.setDirty(false);
- jEdit.closeBuffer(view,buffer);
- }
-
- setPath(path);
- final HashSet<BufferSet> bufferSets = new HashSet<BufferSet>();
- final HashSet<EditPane> editPanesCurrent = new HashSet<EditPane>();
- jEdit.visit(new JEditVisitorAdapter()
- {
- @Override
- public void visit(EditPane editPane)
- {
- BufferSet bufferSet = editPane.getBufferSet();
- if (bufferSet.indexOf(Buffer.this) != -1)
- {
- bufferSets.add(bufferSet);
- if (editPane.getBuffer() == Buffer.this)
- editPanesCurrent.add(editPane);
- }
- }
- });
- jEdit.getBufferSetManager().removeBuffer(this);
- for (BufferSet bufferSet: bufferSets)
- jEdit.getBufferSetManager().addBuffer(bufferSet, this);
- for (EditPane editPane: editPanesCurrent)
- editPane.setBuffer(this);
- }
- else
- {
- /* if we saved over an already open file using
- * 'save a copy as', then reload the existing
- * buffer */
- if(buffer != null && /* can't happen? */
- !buffer.getPath().equals(oldPath))
- {
- buffer.load(view,true);
- }
- }
- } //}}}
-
- //{{{ Update this buffer for the new path
- if(rename)
- {
- if(file != null)
- modTime = file.lastModified();
-
- if(!error)
- {
- // we do a write lock so that the
- // autosave, which grabs a read lock,
- // is not executed between the
- // deletion of the autosave file
- // and clearing of the dirty flag
- try
- {
- writeLock();
-
- if(autosaveFile != null)
- autosaveFile.delete();
-
- setFlag(AUTOSAVE_DIRTY,false);
- setFileReadOnly(false);
- setFlag(NEW_FILE,false);
- setFlag(UNTITLED,false);
- super.setDirty(false);
- if(jEdit.getBooleanProperty("resetUndoOnSave"))
- {
- undoMgr.clear();
- }
- }
- finally
- {
- writeUnlock();
- }
-
- parseBufferLocalProperties();
-
- if(!getPath().equals(oldPath))
- {
- if (!isTemporary())
- jEdit.updatePosition(oldSymlinkPath,this);
- setMode();
- }
- else
- {
- // if user adds mode buffer-local property
- String newMode = getStringProperty("mode");
- if(newMode != null &&
- !newMode.equals(getMode()
- .getName()))
- setMode();
- else
- propertiesChanged();
- }
-
- updateHash();
-
- if (!isTemporary())
- {
- EditBus.send(new BufferUpdate(this,
- view,BufferUpdate.DIRTY_CHANGED));
-
- // new message type introduced in 4.0pre4
- EditBus.send(new BufferUpdate(this,
- view,BufferUpdate.SAVED));
- }
- }
- } //}}}
- } //}}}
-
- //{{{ editSyntaxStyle() method
- /**
- * Edit the syntax style of the token under the caret.
- *
- * @param textArea the textarea where your caret is
- * @since jEdit 4.3pre11
- */
- public void editSyntaxStyle(JEditTextArea textArea)
- {
- int lineNum = textArea.getCaretLine();
- int start = getLineStartOffset(lineNum);
- int position = textArea.getCaretPosition();
-
- DefaultTokenHandler tokenHandler = new DefaultTokenHandler();
- markTokens(lineNum,tokenHandler);
- Token token = tokenHandler.getTokens();
-
- while(token.id != Token.END)
- {
- int next = start + token.length;
- if (start <= position && next > position)
- break;
- start = next;
- token = token.next;
- }
- if (token.id == Token.END || token.id == Token.NULL)
- {
- JOptionPane.showMessageDialog(jEdit.getActiveView(),
- jEdit.getProperty("syntax-style-no-token.message"),
- jEdit.getProperty("syntax-style-no-token.title"),
- JOptionPane.PLAIN_MESSAGE);
- return;
- }
- String typeName = Token.tokenToString(token.id);
- String property = "view.style." + typeName.toLowerCase();
- SyntaxStyle currentStyle = GUIUtilities.parseStyle(
- jEdit.getProperty(property), "Dialog",12);
- SyntaxStyle style = new StyleEditor(jEdit.getActiveView(),
- currentStyle, typeName).getStyle();
- if(style != null)
- {
- jEdit.setProperty(property, GUIUtilities.getStyleString(style));
- jEdit.propertiesChanged();
- }
- } //}}}
- //}}}
-}
+/*
+ * Buffer.java - jEdit buffer
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2005 Slava Pestov
+ * Portions copyright (C) 1999, 2000 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.io.File;
+import java.io.IOException;
+import java.net.Socket;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.swing.Icon;
+import javax.swing.JOptionPane;
+import javax.swing.text.AttributeSet;
+import javax.swing.text.Segment;
+
+import org.gjt.sp.jedit.browser.VFSBrowser;
+import org.gjt.sp.jedit.buffer.BufferChangeListener;
+import org.gjt.sp.jedit.buffer.BufferListener;
+import org.gjt.sp.jedit.buffer.BufferUndoListener;
+import org.gjt.sp.jedit.buffer.FoldHandler;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.bufferio.BufferAutosaveRequest;
+import org.gjt.sp.jedit.bufferio.BufferIORequest;
+import org.gjt.sp.jedit.bufferio.MarkersSaveRequest;
+import org.gjt.sp.jedit.bufferset.BufferSet;
+import org.gjt.sp.jedit.gui.StyleEditor;
+import org.gjt.sp.jedit.io.FileVFS;
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.jedit.io.VFSFile;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.jedit.msg.BufferUpdate;
+import org.gjt.sp.jedit.options.GeneralOptionPane;
+import org.gjt.sp.jedit.syntax.DefaultTokenHandler;
+import org.gjt.sp.jedit.syntax.ModeProvider;
+import org.gjt.sp.jedit.syntax.ParserRuleSet;
+import org.gjt.sp.jedit.syntax.Token;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+import org.gjt.sp.jedit.visitors.JEditVisitorAdapter;
+import org.gjt.sp.jedit.visitors.SaveCaretInfoVisitor;
+import org.gjt.sp.util.IntegerArray;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.util.ThreadUtilities;
+
+/**
+ * A <code>Buffer</code> represents the contents of an open text
+ * file as it is maintained in the computer's memory (as opposed to
+ * how it may be stored on a disk).<p>
+ *
+ * In a BeanShell script, you can obtain the current buffer instance from the
+ * <code>buffer</code> variable.<p>
+ *
+ * This class does not have a public constructor.
+ * Buffers can be opened and closed using methods in the <code>jEdit</code>
+ * class.<p>
+ *
+ * This class is partially thread-safe, however you must pay attention to two
+ * very important guidelines:
+ * <ul>
+ * <li>Operations such as insert() and remove(),
+ * undo(), change Buffer data in a writeLock(), and must
+ * be called from the AWT thread.
+ * <li>When accessing the buffer from another thread, you must
+ * call readLock() before and readUnLock() after, if you plan on performing
+ * more than one read, to ensure that the buffer contents are not changed by
+ * the AWT thread for the duration of the lock. Only methods whose descriptions
+ * specify thread safety can be invoked from other threads.
+ * </ul>
+
+ *
+ * @author Slava Pestov
+ * @version $Id: Buffer.java 19187 2011-01-09 16:59:29Z ezust $
+ */
+public class Buffer extends JEditBuffer
+{
+ //{{{ Some constants
+ /**
+ * Backed up property.
+ * @since jEdit 3.2pre2
+ */
+ public static final String BACKED_UP = "Buffer__backedUp";
+
+ /**
+ * Caret info properties.
+ * @since jEdit 3.2pre1
+ */
+ public static final String CARET = "Buffer__caret";
+ public static final String CARET_POSITIONED = "Buffer__caretPositioned";
+
+ /**
+ * Stores a List of {@link org.gjt.sp.jedit.textarea.Selection} instances.
+ */
+ public static final String SELECTION = "Buffer__selection";
+
+ /**
+ * This should be a physical line number, so that the scroll
+ * position is preserved correctly across reloads (which will
+ * affect virtual line numbers, due to fold being reset)
+ */
+ public static final String SCROLL_VERT = "Buffer__scrollVert";
+ public static final String SCROLL_HORIZ = "Buffer__scrollHoriz";
+
+ /**
+ * Should jEdit try to set the encoding based on a UTF8, UTF16 or
+ * XML signature at the beginning of the file?
+ */
+ public static final String ENCODING_AUTODETECT = "encodingAutodetect";
+
+ /**
+ * This property is set to 'true' if the file has a trailing newline.
+ * @since jEdit 4.0pre1
+ */
+ public static final String TRAILING_EOL = "trailingEOL";
+
+ /**
+ * This property is set to 'true' if the file should be GZipped.
+ * @since jEdit 4.0pre4
+ */
+ public static final String GZIPPED = "gzipped";
+ //}}}
+
+ //{{{ Input/output methods
+
+ //{{{ reload() method
+ /**
+ * Reloads the buffer from disk, asking for confirmation if the buffer
+ * has unsaved changes.
+ * @param view The view
+ * @since jEdit 2.7pre2
+ */
+ public void reload(View view)
+ {
+ if (getFlag(UNTITLED))
+ return;
+ if(isDirty())
+ {
+ String[] args = { path };
+ int result = GUIUtilities.confirm(view,"changedreload",
+ args,JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if(result != JOptionPane.YES_OPTION)
+ return;
+ }
+ view.visit(new SaveCaretInfoVisitor());
+ load(view,true);
+ } //}}}
+
+ //{{{ load() method
+ /**
+ * Loads the buffer from disk.
+ * @param view The view
+ * @param reload If true, user will not be asked to recover autosave
+ * file, if any
+ *
+ * @since 2.5pre1
+ */
+ public boolean load(final View view, final boolean reload)
+ {
+ if(isPerformingIO())
+ {
+ GUIUtilities.error(view,"buffer-multiple-io",null);
+ return false;
+ }
+
+ setBooleanProperty(BufferIORequest.ERROR_OCCURRED,false);
+
+ setLoading(true);
+
+ // view text areas temporarily blank out while a buffer is
+ // being loaded, to indicate to the user that there is no
+ // data available yet.
+ if(!getFlag(TEMPORARY))
+ EditBus.send(new BufferUpdate(this,view,BufferUpdate.LOAD_STARTED));
+
+ final boolean loadAutosave;
+
+ if(reload || !getFlag(NEW_FILE))
+ {
+ if(file != null)
+ modTime = file.lastModified();
+
+ // Only on initial load
+ if(!reload && autosaveFile != null && autosaveFile.exists())
+ loadAutosave = recoverAutosave(view);
+ else
+ {
+ if(autosaveFile != null)
+ autosaveFile.delete();
+ loadAutosave = false;
+ }
+
+ if(!loadAutosave)
+ {
+ VFS vfs = VFSManager.getVFSForPath(path);
+
+ if(!checkFileForLoad(view,vfs,path))
+ {
+ setLoading(false);
+ return false;
+ }
+
+ // have to check again since above might set
+ // NEW_FILE flag
+ if(reload || !getFlag(NEW_FILE))
+ {
+ if(!vfs.load(view,this,path))
+ {
+ setLoading(false);
+ return false;
+ }
+ }
+ }
+ }
+ else
+ loadAutosave = false;
+
+ //{{{ Do some stuff once loading is finished
+ Runnable runnable = new Runnable()
+ {
+ public void run()
+ {
+ String newPath = getStringProperty(
+ BufferIORequest.NEW_PATH);
+ Segment seg = (Segment)getProperty(
+ BufferIORequest.LOAD_DATA);
+ IntegerArray endOffsets = (IntegerArray)
+ getProperty(BufferIORequest.END_OFFSETS);
+
+ loadText(seg,endOffsets);
+
+ unsetProperty(BufferIORequest.LOAD_DATA);
+ unsetProperty(BufferIORequest.END_OFFSETS);
+ unsetProperty(BufferIORequest.NEW_PATH);
+
+ undoMgr.clear();
+ undoMgr.setLimit(jEdit.getIntegerProperty(
+ "buffer.undoCount",100));
+
+ if(!getFlag(TEMPORARY))
+ finishLoading();
+
+ setLoading(false);
+
+ // if reloading a file, clear dirty flag
+ if(reload)
+ setDirty(false);
+
+ if(!loadAutosave && newPath != null)
+ setPath(newPath);
+
+ // if loadAutosave is false, we loaded an
+ // autosave file, so we set 'dirty' to true
+
+ // note that we don't use setDirty(),
+ // because a) that would send an unnecessary
+ // message, b) it would also set the
+ // AUTOSAVE_DIRTY flag, which will make
+ // the autosave thread write out a
+ // redundant autosave file
+ if(loadAutosave)
+ Buffer.super.setDirty(true);
+
+ // send some EditBus messages
+ if(!getFlag(TEMPORARY))
+ {
+ fireBufferLoaded();
+ EditBus.send(new BufferUpdate(Buffer.this,
+ view,BufferUpdate.LOADED));
+ //EditBus.send(new BufferUpdate(Buffer.this,
+ // view,BufferUpdate.MARKERS_CHANGED));
+ }
+ }
+ }; //}}}
+
+ if(getFlag(TEMPORARY))
+ runnable.run();
+ else
+ VFSManager.runInAWTThread(runnable);
+
+ return true;
+ } //}}}
+
+ //{{{ insertFile() method
+ /**
+ * Loads a file from disk, and inserts it into this buffer.
+ * @param view The view
+ * @param path the path of the file to insert
+ *
+ * @since 4.0pre1
+ */
+ public boolean insertFile(View view, String path)
+ {
+ if(isPerformingIO())
+ {
+ GUIUtilities.error(view,"buffer-multiple-io",null);
+ return false;
+ }
+
+ setBooleanProperty(BufferIORequest.ERROR_OCCURRED,false);
+
+ path = MiscUtilities.constructPath(this.path,path);
+
+ Buffer buffer = jEdit.getBuffer(path);
+ if(buffer != null)
+ {
+ view.getTextArea().setSelectedText(
+ buffer.getText(0,buffer.getLength()));
+ return true;
+ }
+
+ VFS vfs = VFSManager.getVFSForPath(path);
+
+ // this returns false if initial sanity
+ // checks (if the file is a directory, etc)
+ // fail
+ return vfs.insert(view,this,path);
+ } //}}}
+
+ //{{{ autosave() method
+ /**
+ * Autosaves this buffer.
+ */
+ public void autosave()
+ {
+ if(autosaveFile == null || !getFlag(AUTOSAVE_DIRTY)
+ || !isDirty() || isPerformingIO() ||
+ !autosaveFile.getParentFile().exists())
+ return;
+
+ setFlag(AUTOSAVE_DIRTY,false);
+
+ VFSManager.runInWorkThread(new BufferAutosaveRequest(
+ null,this,null,VFSManager.getFileVFS(),
+ autosaveFile.getPath()));
+ } //}}}
+
+ //{{{ saveAs() method
+ /**
+ * Prompts the user for a file to save this buffer to.
+ * @param view The view
+ * @param rename True if the buffer's path should be changed, false
+ * if only a copy should be saved to the specified filename
+ * @since jEdit 2.6pre5
+ */
+ public boolean saveAs(View view, boolean rename)
+ {
+ String[] files = GUIUtilities.showVFSFileDialog(view,path,
+ VFSBrowser.SAVE_DIALOG,false);
+
+ // files[] should have length 1, since the dialog type is
+ // SAVE_DIALOG
+ if(files == null)
+ return false;
+
+ boolean saved = save(view, files[0], rename);
+ if (saved)
+ setReadOnly(false);
+ return saved;
+ } //}}}
+
+ //{{{ save() method
+ /**
+ * Saves this buffer to the specified path name, or the current path
+ * name if it's null.
+ * @param view The view
+ * @param path The path name to save the buffer to, or null to use
+ * the existing path
+ */
+ public boolean save(View view, String path)
+ {
+ return save(view,path,true,false);
+ } //}}}
+
+ //{{{ save() method
+ /**
+ * Saves this buffer to the specified path name, or the current path
+ * name if it's null.
+ * @param view The view
+ * @param path The path name to save the buffer to, or null to use
+ * the existing path
+ * @param rename True if the buffer's path should be changed, false
+ * if only a copy should be saved to the specified filename
+ * @since jEdit 2.6pre5
+ */
+ public boolean save(View view, String path, boolean rename)
+ {
+ return save(view,path,rename,false);
+ } //}}}
+
+ //{{{ save() method
+ /**
+ * Saves this buffer to the specified path name, or the current path
+ * name if it's null.
+ * @param view The view
+ * @param path The path name to save the buffer to, or null to use
+ * the existing path
+ * @param rename True if the buffer's path should be changed, false
+ * if only a copy should be saved to the specified filename
+ * @param disableFileStatusCheck Disables file status checking
+ * regardless of the state of the checkFileStatus property
+ */
+ public boolean save(final View view, String path, final boolean rename, boolean disableFileStatusCheck)
+ {
+ if(isPerformingIO())
+ {
+ GUIUtilities.error(view,"buffer-multiple-io",null);
+ return false;
+ }
+
+ setBooleanProperty(BufferIORequest.ERROR_OCCURRED,false);
+
+ if(path == null && getFlag(NEW_FILE))
+ return saveAs(view,rename);
+
+ if(path == null && file != null)
+ {
+ long newModTime = file.lastModified();
+
+ if(newModTime != modTime
+ && jEdit.getBooleanProperty("view.checkModStatus"))
+ {
+ Object[] args = { this.path };
+ int result = GUIUtilities.confirm(view,
+ "filechanged-save",args,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if(result != JOptionPane.YES_OPTION)
+ return false;
+ }
+ }
+
+ EditBus.send(new BufferUpdate(this,view,BufferUpdate.SAVING));
+
+ setPerformingIO(true);
+
+ final String oldPath = this.path;
+ final String oldSymlinkPath = symlinkPath;
+ final String newPath = path == null ? this.path : path;
+
+ VFS vfs = VFSManager.getVFSForPath(newPath);
+
+ if(!checkFileForSave(view,vfs,newPath))
+ {
+ setPerformingIO(false);
+ return false;
+ }
+
+ Object session = vfs.createVFSSession(newPath,view);
+ if (session == null)
+ {
+ setPerformingIO(false);
+ return false;
+ }
+
+ unsetProperty("overwriteReadonly");
+ unsetProperty("forbidTwoStageSave");
+ try
+ {
+ VFSFile file = vfs._getFile(session,newPath,view);
+ if (file != null)
+ {
+ boolean vfsRenameCap = (vfs.getCapabilities() & VFS.RENAME_CAP) != 0;
+ if (!file.isWriteable())
+ {
+ Log.log(Log.WARNING, this, "Buffer saving : File " + file + " is readOnly");
+ if (vfsRenameCap)
+ {
+ Log.log(Log.DEBUG, this, "Buffer saving : VFS can rename files");
+ String savePath = vfs._canonPath(session,newPath,view);
+ if(!MiscUtilities.isURL(savePath))
+ savePath = MiscUtilities.resolveSymlinks(savePath);
+ savePath = vfs.getTwoStageSaveName(savePath);
+ if (savePath == null)
+ {
+ Log.log(Log.DEBUG, this, "Buffer saving : two stage save impossible because path is null");
+ VFSManager.error(view,
+ newPath,
+ "ioerror.save-readonly-twostagefail",
+ null);
+ setPerformingIO(false);
+ return false;
+ }
+ else
+ {
+ int result = GUIUtilities.confirm(
+ view, "vfs.overwrite-readonly",
+ new Object[]{newPath},
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if (result == JOptionPane.YES_OPTION)
+ {
+ Log.log(Log.WARNING, this, "Buffer saving : two stage save will be used to save buffer");
+ setBooleanProperty("overwriteReadonly",true);
+ }
+ else
+ {
+ Log.log(Log.DEBUG,this, "Buffer not saved");
+ setPerformingIO(false);
+ return false;
+ }
+ }
+ }
+ else
+ {
+ Log.log(Log.WARNING, this, "Buffer saving : file is readonly and vfs cannot do two stage save");
+ VFSManager.error(view,
+ newPath,
+ "ioerror.write-error-readonly",
+ null);
+ setPerformingIO(false);
+ return false;
+ }
+ }
+ else
+ {
+ String savePath = vfs._canonPath(session,newPath,view);
+ if(!MiscUtilities.isURL(savePath))
+ savePath = MiscUtilities.resolveSymlinks(savePath);
+ savePath = vfs.getTwoStageSaveName(savePath);
+ if (jEdit.getBooleanProperty("twoStageSave") && (!vfsRenameCap || savePath == null))
+ {
+ // the file is writeable but the vfs cannot do two stage. We must overwrite
+ // readonly flag
+
+
+ int result = GUIUtilities.confirm(
+ view, "vfs.twostageimpossible",
+ new Object[]{newPath},
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if (result == JOptionPane.YES_OPTION)
+ {
+ Log.log(Log.WARNING, this, "Buffer saving : two stage save cannot be used");
+ setBooleanProperty("forbidTwoStageSave",true);
+ }
+ else
+ {
+ Log.log(Log.DEBUG,this, "Buffer not saved");
+ setPerformingIO(false);
+ return false;
+ }
+
+ }
+ }
+ }
+ }
+ catch(IOException io)
+ {
+ VFSManager.error(view,newPath,"ioerror",
+ new String[] { io.toString() });
+ setPerformingIO(false);
+ return false;
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,view);
+ }
+ catch(IOException io)
+ {
+ VFSManager.error(view,newPath,"ioerror",
+ new String[] { io.toString() });
+ setPerformingIO(false);
+ return false;
+ }
+ }
+
+ if(!vfs.save(view,this,newPath))
+ {
+ setPerformingIO(false);
+ return false;
+ }
+
+ // Once save is complete, do a few other things
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ setPerformingIO(false);
+ setProperty("overwriteReadonly",null);
+ finishSaving(view,oldPath,oldSymlinkPath,
+ newPath,rename,getBooleanProperty(
+ BufferIORequest.ERROR_OCCURRED));
+ updateMarkersFile(view);
+ }
+ });
+
+ int check = jEdit.getIntegerProperty("checkFileStatus");
+ if(!disableFileStatusCheck && (check == GeneralOptionPane.checkFileStatus_all ||
+ check == GeneralOptionPane.checkFileStatus_operations))
+ jEdit.checkBufferStatus(view,false);
+
+ return true;
+ } //}}}
+
+ //{{{ checkFileStatus() method
+ public static final int FILE_NOT_CHANGED = 0;
+ public static final int FILE_CHANGED = 1;
+ public static final int FILE_DELETED = 2;
+ /**
+ * Check if the buffer has changed on disk.
+ * @return One of <code>NOT_CHANGED</code>, <code>CHANGED</code>, or
+ * <code>DELETED</code>.
+ *
+ * @since jEdit 4.2pre1
+ */
+ public int checkFileStatus(View view)
+ {
+ // - don't do these checks while a save is in progress,
+ // because for a moment newModTime will be greater than
+ // oldModTime, due to the multithreading
+ // - only supported on local file system
+ if(!isPerformingIO() && file != null && !getFlag(NEW_FILE))
+ {
+ boolean newReadOnly = file.exists() && !file.canWrite();
+ if(newReadOnly != isFileReadOnly())
+ {
+ setFileReadOnly(newReadOnly);
+ EditBus.send(new BufferUpdate(this,null,
+ BufferUpdate.DIRTY_CHANGED));
+ }
+
+ long oldModTime = modTime;
+ long newModTime = file.lastModified();
+
+ if(newModTime != oldModTime)
+ {
+ modTime = newModTime;
+
+ if(!file.exists())
+ {
+ setFlag(NEW_FILE,true);
+ setDirty(true);
+ return FILE_DELETED;
+ }
+ else
+ {
+ return FILE_CHANGED;
+ }
+ }
+ }
+
+ return FILE_NOT_CHANGED;
+ } //}}}
+
+ //}}}
+
+ //{{{ Getters/setter methods for various buffer meta-data
+
+ //{{{ getLastModified() method
+ /**
+ * Returns the last time jEdit modified the file on disk.
+ * This method is thread-safe.
+ */
+ public long getLastModified()
+ {
+ return modTime;
+ } //}}}
+
+ //{{{ setLastModified() method
+ /**
+ * Sets the last time jEdit modified the file on disk.
+ * @param modTime The new modification time
+ */
+ public void setLastModified(long modTime)
+ {
+ this.modTime = modTime;
+ } //}}}
+
+ //{{{ getAutoReload() method
+ /**
+ * Returns the status of the AUTORELOAD flag
+ * If true, reload changed files automatically
+ */
+ public boolean getAutoReload()
+ {
+ return getFlag(AUTORELOAD);
+ } //}}}
+
+ //{{{ setAutoReload() method
+ /**
+ * Sets the status of the AUTORELOAD flag
+ * @param value # If true, reload changed files automatically
+ */
+ public void setAutoReload(boolean value)
+ {
+ setFlag(AUTORELOAD, value);
+ autoreloadOverridden = isAutoreloadPropertyOverriden();
+ } //}}}
+
+ //{{{ getAutoReloadDialog() method
+ /**
+ * Returns the status of the AUTORELOAD_DIALOG flag
+ * If true, prompt for reloading or notify user
+ * when the file has changed on disk
+ */
+ public boolean getAutoReloadDialog()
+ {
+ return getFlag(AUTORELOAD_DIALOG);
+ } //}}}
+
+ //{{{ setAutoReloadDialog() method
+ /**
+ * Sets the status of the AUTORELOAD_DIALOG flag
+ * @param value # If true, prompt for reloading or notify user
+ * when the file has changed on disk
+
+ */
+ public void setAutoReloadDialog(boolean value)
+ {
+ setFlag(AUTORELOAD_DIALOG, value);
+ autoreloadOverridden = isAutoreloadPropertyOverriden();
+ } //}}}
+
+ //{{{ getVFS() method
+ /**
+ * Returns the virtual filesystem responsible for loading and
+ * saving this buffer. This method is thread-safe.
+ */
+ public VFS getVFS()
+ {
+ return VFSManager.getVFSForPath(path);
+ } //}}}
+
+ //{{{ getAutosaveFile() method
+ /**
+ * Returns the autosave file for this buffer. This may be null if
+ * the file is non-local.
+ */
+ public File getAutosaveFile()
+ {
+ return autosaveFile;
+ } //}}}
+
+ //{{{ removeAutosaveFile() method
+ /**
+ * Remove the autosave file.
+ * @since jEdit 4.3pre12
+ */
+ public void removeAutosaveFile()
+ {
+ if (autosaveFile != null)
+ {
+ autosaveFile.delete();
+ setFlag(AUTOSAVE_DIRTY,true);
+ }
+ } //}}}
+
+ //{{{ getName() method
+ /**
+ * Returns the name of this buffer. This method is thread-safe.
+ */
+ public String getName()
+ {
+ return name;
+ } //}}}
+
+ //{{{ getPath() method
+ /**
+ * Returns the path name of this buffer. This method is thread-safe.
+ */
+ public String getPath()
+ {
+ return path;
+ } //}}}
+
+ //{{{ getPath() method
+ /**
+ * @param shortVersion if true, replaces home path with ~/ on unix
+ */
+ public String getPath(Boolean shortVersion)
+ {
+ return shortVersion ? MiscUtilities.abbreviate(path) : getPath();
+ } //}}}
+
+
+ //{{{ getSymlinkPath() method
+ /**
+ * If this file is a symbolic link, returns the link destination.
+ * Otherwise returns the file's path. This method is thread-safe.
+ * @since jEdit 4.2pre1
+ */
+ public String getSymlinkPath()
+ {
+ return symlinkPath;
+ } //}}}
+
+ //{{{ getDirectory() method
+ /**
+ * Returns the directory containing this buffer.
+ * @since jEdit 4.1pre11
+ */
+ public String getDirectory()
+ {
+ return directory;
+ } //}}}
+
+ //{{{ isClosed() method
+ /**
+ * Returns true if this buffer has been closed with
+ * {@link org.gjt.sp.jedit.jEdit#closeBuffer(View,Buffer)}.
+ * This method is thread-safe.
+ */
+ public boolean isClosed()
+ {
+ return getFlag(CLOSED);
+ } //}}}
+
+ //{{{ isLoaded() method
+ /**
+ * Returns true if the buffer is loaded. This method is thread-safe.
+ */
+ public boolean isLoaded()
+ {
+ return !isLoading();
+ } //}}}
+
+ //{{{ isNewFile() method
+ /**
+ * Returns whether this buffer lacks a corresponding version on disk.
+ * This method is thread-safe.
+ */
+ public boolean isNewFile()
+ {
+ return getFlag(NEW_FILE);
+ } //}}}
+
+ //{{{ setNewFile() method
+ /**
+ * Sets the new file flag.
+ * @param newFile The new file flag
+ */
+ public void setNewFile(boolean newFile)
+ {
+ setFlag(NEW_FILE,newFile);
+ if(!newFile)
+ setFlag(UNTITLED,false);
+ } //}}}
+
+ //{{{ isUntitled() method
+ /**
+ * Returns true if this file is 'untitled'. This method is thread-safe.
+ */
+ public boolean isUntitled()
+ {
+ return getFlag(UNTITLED);
+ } //}}}
+
+ //{{{ setDirty() method
+ /**
+ * Sets the 'dirty' (changed since last save) flag of this buffer.
+ */
+ @Override
+ public void setDirty(boolean d)
+ {
+ boolean old_d = isDirty();
+ if (isUntitled() && jEdit.getBooleanProperty("suppressNotSavedConfirmUntitled"))
+ d = false;
+ if (d && getLength() == initialLength)
+ {
+ if (jEdit.getBooleanProperty("useMD5forDirtyCalculation"))
+ d = !Arrays.equals(calculateHash(), md5hash);
+ }
+ super.setDirty(d);
+ boolean editable = isEditable();
+
+ if(d)
+ {
+ if(editable)
+ setFlag(AUTOSAVE_DIRTY,true);
+ }
+ else
+ {
+ setFlag(AUTOSAVE_DIRTY,false);
+
+ if(autosaveFile != null)
+ autosaveFile.delete();
+ }
+
+ if(d != old_d && editable)
+ {
+ EditBus.send(new BufferUpdate(this,null,
+ BufferUpdate.DIRTY_CHANGED));
+ }
+ } //}}}
+
+ //{{{ isTemporary() method
+ /**
+ * Returns if this is a temporary buffer. This method is thread-safe.
+ * @see jEdit#openTemporary(View,String,String,boolean)
+ * @see jEdit#commitTemporary(Buffer)
+ * @since jEdit 2.2pre7
+ */
+ public boolean isTemporary()
+ {
+ return getFlag(TEMPORARY);
+ } //}}}
+
+ //{{{ getIcon() method
+ /**
+ * Returns this buffer's icon.
+ * @since jEdit 2.6pre6
+ */
+ public Icon getIcon()
+ {
+ if(isDirty())
+ return GUIUtilities.loadIcon("dirty.gif");
+ else if(isReadOnly())
+ return GUIUtilities.loadIcon("readonly.gif");
+ else if(getFlag(NEW_FILE))
+ return GUIUtilities.loadIcon("new.gif");
+ else
+ return GUIUtilities.loadIcon("normal.gif");
+ } //}}}
+
+ //}}}
+
+ //{{{ Buffer events
+
+ //{{{ addBufferChangeListener() method
+ /**
+ * @deprecated Call {@link JEditBuffer#addBufferListener(BufferListener,int)}.
+ */
+ @Deprecated
+ public void addBufferChangeListener(BufferChangeListener listener,
+ int priority)
+ {
+ addBufferListener(new BufferChangeListener.Adapter(listener),priority);
+ } //}}}
+
+ //{{{ addBufferChangeListener() method
+ /**
+ * @deprecated Call {@link JEditBuffer#addBufferListener(BufferListener)}.
+ */
+ @Deprecated
+ public void addBufferChangeListener(BufferChangeListener listener)
+ {
+ addBufferListener(new BufferChangeListener.Adapter(listener), NORMAL_PRIORITY);
+ } //}}}
+
+ //{{{ removeBufferChangeListener() method
+ /**
+ * @deprecated Call {@link JEditBuffer#removeBufferListener(BufferListener)}.
+ */
+ @Deprecated
+ public void removeBufferChangeListener(BufferChangeListener listener)
+ {
+ BufferListener[] listeners = getBufferListeners();
+
+ for(int i = 0; i < listeners.length; i++)
+ {
+ BufferListener l = listeners[i];
+ if(l instanceof BufferChangeListener.Adapter)
+ {
+ if(((BufferChangeListener.Adapter)l).getDelegate() == listener)
+ {
+ removeBufferListener(l);
+ return;
+ }
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Property methods
+
+ //{{{ propertiesChanged() method
+ /**
+ * Reloads settings from the properties. This should be called
+ * after the <code>syntax</code> or <code>folding</code>
+ * buffer-local properties are changed.
+ */
+ @Override
+ public void propertiesChanged()
+ {
+ super.propertiesChanged();
+ if (!autoreloadOverridden)
+ {
+ setAutoReloadDialog(jEdit.getBooleanProperty("autoReloadDialog"));
+ setAutoReload(jEdit.getBooleanProperty("autoReload"));
+ }
+ if (!isTemporary())
+ EditBus.send(new BufferUpdate(this,null,BufferUpdate.PROPERTIES_CHANGED));
+ } //}}}
+
+ //{{{ getDefaultProperty() method
+ @Override
+ public Object getDefaultProperty(String name)
+ {
+ Object retVal;
+
+ if(mode != null)
+ {
+ retVal = mode.getProperty(name);
+ if(retVal == null)
+ return null;
+
+ setDefaultProperty(name,retVal);
+ return retVal;
+ }
+ // Now try buffer.<property>
+ String value = jEdit.getProperty("buffer." + name);
+ if(value == null)
+ return null;
+
+ // Try returning it as an integer first
+ try
+ {
+ retVal = new Integer(value);
+ }
+ catch(NumberFormatException nf)
+ {
+ retVal = value;
+ }
+
+ return retVal;
+ } //}}}
+
+ //{{{ toggleWordWrap() method
+ /**
+ * Toggles word wrap between the three available modes. This is used
+ * by the status bar.
+ * @param view We show a message in the view's status bar
+ * @since jEdit 4.1pre3
+ */
+ public void toggleWordWrap(View view)
+ {
+ String wrap = getStringProperty("wrap");
+ if(wrap.equals("none"))
+ wrap = "soft";
+ else if(wrap.equals("soft"))
+ wrap = "hard";
+ else if(wrap.equals("hard"))
+ wrap = "none";
+ view.getStatus().setMessageAndClear(jEdit.getProperty(
+ "view.status.wrap-changed",new String[] {
+ wrap }));
+ setProperty("wrap",wrap);
+ propertiesChanged();
+ } //}}}
+
+ //{{{ toggleLineSeparator() method
+ /**
+ * Toggles the line separator between the three available settings.
+ * This is used by the status bar.
+ * @param view We show a message in the view's status bar
+ * @since jEdit 4.1pre3
+ */
+ public void toggleLineSeparator(View view)
+ {
+ String status = null;
+ String lineSep = getStringProperty(LINESEP);
+ if("\n".equals(lineSep))
+ {
+ status = "windows";
+ lineSep = "\r\n";
+ }
+ else if("\r\n".equals(lineSep))
+ {
+ status = "mac";
+ lineSep = "\r";
+ }
+ else if("\r".equals(lineSep))
+ {
+ status = "unix";
+ lineSep = "\n";
+ }
+ view.getStatus().setMessageAndClear(jEdit.getProperty(
+ "view.status.linesep-changed",new String[] {
+ jEdit.getProperty("lineSep." + status) }));
+ setProperty(LINESEP, lineSep);
+ setDirty(true);
+ propertiesChanged();
+ } //}}}
+
+ //{{{ getContextSensitiveProperty() method
+ /**
+ * Some settings, like comment start and end strings, can
+ * vary between different parts of a buffer (HTML text and inline
+ * JavaScript, for example).
+ * @param offset The offset
+ * @param name The property name
+ * @since jEdit 4.0pre3
+ */
+ @Override
+ public String getContextSensitiveProperty(int offset, String name)
+ {
+ Object value = super.getContextSensitiveProperty(offset,name);
+
+ if(value == null)
+ {
+ ParserRuleSet rules = getRuleSetAtOffset(offset);
+
+ value = jEdit.getMode(rules.getModeName())
+ .getProperty(name);
+
+ if(value == null)
+ value = mode.getProperty(name);
+ }
+
+ if(value == null)
+ return null;
+ else
+ return String.valueOf(value);
+ } //}}}
+
+ //}}}
+
+ //{{{ Edit modes, syntax highlighting
+
+ //{{{ setMode() method
+ /**
+ * Sets this buffer's edit mode by calling the accept() method
+ * of each registered edit mode.
+ */
+ public void setMode()
+ {
+ String userMode = getStringProperty("mode");
+ if(userMode != null)
+ {
+ unsetProperty("mode");
+ Mode m = ModeProvider.instance.getMode(userMode);
+ if(m != null)
+ {
+ setMode(m);
+ return;
+ }
+ }
+
+ String firstLine = getLineText(0);
+
+ Mode mode = ModeProvider.instance.getModeForFile(name, firstLine);
+ if (mode != null)
+ {
+ setMode(mode);
+ return;
+ }
+
+ Mode defaultMode = jEdit.getMode(jEdit.getProperty("buffer.defaultMode"));
+ if(defaultMode == null)
+ defaultMode = jEdit.getMode("text");
+
+ if (defaultMode != null)
+ setMode(defaultMode);
+ } //}}}
+
+ //}}}
+
+ //{{{ Deprecated methods
+
+ //{{{ putProperty() method
+ /**
+ * @deprecated Call <code>setProperty()</code> instead.
+ */
+ @Deprecated
+ public void putProperty(Object name, Object value)
+ {
+ // for backwards compatibility
+ if(!(name instanceof String))
+ return;
+
+ setProperty((String)name,value);
+ } //}}}
+
+ //{{{ putBooleanProperty() method
+ /**
+ * @deprecated Call <code>setBooleanProperty()</code> instead
+ */
+ @Deprecated
+ public void putBooleanProperty(String name, boolean value)
+ {
+ setBooleanProperty(name,value);
+ } //}}}
+
+ //{{{ markTokens() method
+ /**
+ * @deprecated Use org.gjt.sp.jedit.syntax.DefaultTokenHandler instead
+ */
+ @Deprecated
+ public static class TokenList extends DefaultTokenHandler
+ {
+ public Token getFirstToken()
+ {
+ return getTokens();
+ }
+ }
+
+ /**
+ * @deprecated Use the other form of <code>markTokens()</code> instead
+ */
+ @Deprecated
+ public TokenList markTokens(int lineIndex)
+ {
+ TokenList list = new TokenList();
+ markTokens(lineIndex,list);
+ return list;
+ } //}}}
+
+ //{{{ insertString() method
+ /**
+ * Insert a string into the buffer
+ * @param offset The offset
+ * @param str The string
+ * @param attr ignored
+ * @deprecated Call <code>insert()</code> instead.
+ */
+ @Deprecated
+ public void insertString(int offset, String str, AttributeSet attr)
+ {
+ insert(offset,str);
+ } //}}}
+
+ //{{{ getFile() method
+ /**
+ * @deprecated Do not call this method, use {@link #getPath()}
+ * instead.
+ */
+ @Deprecated
+ public File getFile()
+ {
+ return file;
+ } //}}}
+
+ //}}}
+
+ //{{{ Marker methods
+
+ //{{{ getMarkers() method
+ /**
+ * Returns a vector of markers.
+ * @since jEdit 3.2pre1
+ */
+ public Vector<Marker> getMarkers()
+ {
+ return markers;
+ } //}}}
+
+ //{{{ getMarkerStatusPrompt() method
+ /**
+ * Returns the status prompt for the given marker action. Only
+ * intended to be called from <code>actions.xml</code>.
+ * @since jEdit 4.2pre2
+ */
+ public String getMarkerStatusPrompt(String action)
+ {
+ return jEdit.getProperty("view.status." + action,
+ new String[] { getMarkerNameString() });
+ } //}}}
+
+ //{{{ getMarkerNameString() method
+ /**
+ * Returns a string of all set markers, used by the status bar
+ * (eg, "a b $ % ^").
+ * @since jEdit 4.2pre2
+ */
+ public String getMarkerNameString()
+ {
+ StringBuilder buf = new StringBuilder();
+ for(int i = 0; i < markers.size(); i++)
+ {
+ Marker marker = markers.get(i);
+ if(marker.getShortcut() != '\0')
+ {
+ if(buf.length() != 0)
+ buf.append(' ');
+ buf.append(marker.getShortcut());
+ }
+ }
+
+ if(buf.length() == 0)
+ return jEdit.getProperty("view.status.no-markers");
+ else
+ return buf.toString();
+ } //}}}
+
+ //{{{ addOrRemoveMarker() method
+ /**
+ * If a marker is set on the line of the position, it is removed. Otherwise
+ * a new marker with the specified shortcut is added.
+ * @param pos The position of the marker
+ * @param shortcut The shortcut ('\0' if none)
+ * @since jEdit 3.2pre5
+ */
+ public void addOrRemoveMarker(char shortcut, int pos)
+ {
+ int line = getLineOfOffset(pos);
+ if(getMarkerAtLine(line) != null)
+ removeMarker(line);
+ else
+ addMarker(shortcut,pos);
+ } //}}}
+
+ //{{{ addMarker() method
+ /**
+ * Adds a marker to this buffer.
+ * @param pos The position of the marker
+ * @param shortcut The shortcut ('\0' if none)
+ * @since jEdit 3.2pre1
+ */
+ public void addMarker(char shortcut, int pos)
+ {
+ Marker markerN = new Marker(this,shortcut,pos);
+ boolean added = false;
+
+ // don't sort markers while buffer is being loaded
+ if(isLoaded())
+ {
+ setFlag(MARKERS_CHANGED,true);
+
+ markerN.createPosition();
+
+ for(int i = 0; i < markers.size(); i++)
+ {
+ Marker marker = markers.get(i);
+ if(shortcut != '\0' && marker.getShortcut() == shortcut)
+ marker.setShortcut('\0');
+
+ if(marker.getPosition() == pos)
+ {
+ markers.removeElementAt(i);
+ i--;
+ }
+ }
+
+ for(int i = 0; i < markers.size(); i++)
+ {
+ Marker marker = markers.get(i);
+ if(marker.getPosition() > pos)
+ {
+ markers.insertElementAt(markerN,i);
+ added = true;
+ break;
+ }
+ }
+ }
+
+ if(!added)
+ markers.addElement(markerN);
+
+ if(isLoaded() && !getFlag(TEMPORARY))
+ {
+ EditBus.send(new BufferUpdate(this,null,
+ BufferUpdate.MARKERS_CHANGED));
+ }
+ } //}}}
+
+ //{{{ getMarkerInRange() method
+ /**
+ * Returns the first marker within the specified range.
+ * @param start The start offset
+ * @param end The end offset
+ * @since jEdit 4.0pre4
+ */
+ public Marker getMarkerInRange(int start, int end)
+ {
+ for(int i = 0; i < markers.size(); i++)
+ {
+ Marker marker = markers.get(i);
+ int pos = marker.getPosition();
+ if(pos >= start && pos < end)
+ return marker;
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ getMarkerAtLine() method
+ /**
+ * Returns the first marker at the specified line, or <code>null</code>
+ * if there is none.
+ * @param line The line number
+ * @since jEdit 3.2pre2
+ */
+ public Marker getMarkerAtLine(int line)
+ {
+ for(int i = 0; i < markers.size(); i++)
+ {
+ Marker marker = markers.get(i);
+ if(getLineOfOffset(marker.getPosition()) == line)
+ return marker;
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ removeMarker() method
+ /**
+ * Removes all markers at the specified line.
+ * @param line The line number
+ * @since jEdit 3.2pre2
+ */
+ public void removeMarker(int line)
+ {
+ for(int i = 0; i < markers.size(); i++)
+ {
+ Marker marker = markers.get(i);
+ if(getLineOfOffset(marker.getPosition()) == line)
+ {
+ setFlag(MARKERS_CHANGED,true);
+ marker.removePosition();
+ markers.removeElementAt(i);
+ i--;
+ }
+ }
+
+ EditBus.send(new BufferUpdate(this,null,
+ BufferUpdate.MARKERS_CHANGED));
+ } //}}}
+
+ //{{{ removeAllMarkers() method
+ /**
+ * Removes all defined markers.
+ * @since jEdit 2.6pre1
+ */
+ public void removeAllMarkers()
+ {
+ setFlag(MARKERS_CHANGED,true);
+
+ for(int i = 0; i < markers.size(); i++)
+ markers.get(i).removePosition();
+
+ markers.removeAllElements();
+
+ if(isLoaded())
+ {
+ EditBus.send(new BufferUpdate(this,null,
+ BufferUpdate.MARKERS_CHANGED));
+ }
+ } //}}}
+
+ //{{{ getMarker() method
+ /**
+ * Returns the marker with the specified shortcut.
+ * @param shortcut The shortcut
+ * @since jEdit 3.2pre2
+ */
+ public Marker getMarker(char shortcut)
+ {
+ for (Marker marker : markers)
+ {
+ if(marker.getShortcut() == shortcut)
+ return marker;
+ }
+ return null;
+ } //}}}
+
+ //{{{ getMarkersPath() method
+ /**
+ * Returns the path for this buffer's markers file
+ * @param vfs The appropriate VFS
+ * @since jEdit 4.3pre7
+ * @deprecated it will fail if you save to another VFS. use {@link #getMarkersPath(VFS, String)}
+ */
+ @Deprecated
+ public String getMarkersPath(VFS vfs)
+ {
+ return getMarkersPath(vfs, path);
+ } //}}}
+
+ //{{{ getMarkersPath() method
+ /**
+ * Returns the path for this buffer's markers file
+ * @param vfs The appropriate VFS
+ * @param path the path of the buffer, it can be different from the field
+ * when using save-as
+ * @since jEdit 4.3pre10
+ */
+ public static String getMarkersPath(VFS vfs, String path)
+ {
+ return vfs.getParentOfPath(path)
+ + '.' + vfs.getFileName(path)
+ + ".marks";
+ } //}}}
+
+ //{{{ updateMarkersFile() method
+ /**
+ * Save the markers file, or delete it when there are mo markers left
+ * Handling markers is now independent from saving the buffer.
+ * Changing markers will not set the buffer dirty any longer.
+ * @param view The current view
+ * @since jEdit 4.3pre7
+ */
+ public boolean updateMarkersFile(View view)
+ {
+ if(!markersChanged())
+ return true;
+ // adapted from VFS.save
+ VFS vfs = VFSManager.getVFSForPath(getPath());
+ if (((vfs.getCapabilities() & VFS.WRITE_CAP) == 0) ||
+ !vfs.isMarkersFileSupported())
+ {
+ VFSManager.error(view, path, "vfs.not-supported.save",
+ new String[] { "markers file" });
+ return false;
+ }
+ Object session = vfs.createVFSSession(path, view);
+ if(session == null)
+ return false;
+ ThreadUtilities.runInBackground(
+ new MarkersSaveRequest(
+ view, this, session, vfs, path));
+ return true;
+ } //}}}
+
+ //{{{ markersChanged() method
+ /**
+ * Return true when markers have changed and the markers file needs
+ * to be updated
+ * @since jEdit 4.3pre7
+ */
+ public boolean markersChanged()
+ {
+ return getFlag(MARKERS_CHANGED);
+ } //}}}
+
+ //{{{ setMarkersChanged() method
+ /**
+ * Sets/unsets the MARKERS_CHANGED flag
+ * @since jEdit 4.3pre7
+ */
+ public void setMarkersChanged(boolean changed)
+ {
+ setFlag(MARKERS_CHANGED, changed);
+ } //}}}
+
+ //}}}
+
+ //{{{ Miscellaneous methods
+
+ //{{{ setWaitSocket() method
+ /**
+ * This socket is closed when the buffer is closed.
+ */
+ public void setWaitSocket(Socket waitSocket)
+ {
+ this.waitSocket = waitSocket;
+ } //}}}
+
+ //{{{ getNext() method
+ /**
+ * Returns the next buffer in the list.
+ */
+ public Buffer getNext()
+ {
+ return next;
+ } //}}}
+
+ //{{{ getPrev() method
+ /**
+ * Returns the previous buffer in the list.
+ */
+ public Buffer getPrev()
+ {
+ return prev;
+ } //}}}
+
+ //{{{ getIndex() method
+ /**
+ * Returns the position of this buffer in the buffer list.
+ */
+ public int getIndex()
+ {
+ int count = 0;
+ Buffer buffer = prev;
+ while (true)
+ {
+ if(buffer == null)
+ break;
+ count++;
+ buffer = buffer.prev;
+ }
+ return count;
+ } //}}}
+
+ //{{{ toString() method
+ /**
+ * Returns a string representation of this buffer.
+ * This simply returns the path name.
+ */
+ @Override
+ public String toString()
+ {
+ return name + " (" + MiscUtilities.abbreviate(directory) + ')';
+ } //}}}
+
+ //{{{ addBufferUndoListener() method
+ /**
+ * Adds a buffer undo listener.
+ * @param listener The listener
+ * @since jEdit 4.3pre18
+ */
+ public void addBufferUndoListener(BufferUndoListener listener)
+ {
+ undoListeners.add(listener);
+ } //}}}
+
+ //{{{ removeBufferUndoListener() method
+ /**
+ * Removes a buffer undo listener.
+ * @param listener The listener
+ * @since jEdit 4.3pre18
+ */
+ public void removeBufferUndoListener(BufferUndoListener listener)
+ {
+ undoListeners.remove(listener);
+ } //}}}
+
+ //}}}
+
+ //{{{ Package-private members
+ /** The previous buffer in the list. */
+ Buffer prev;
+ /** The next buffer in the list. */
+ Buffer next;
+
+ //{{{ Buffer constructor
+ Buffer(String path, boolean newFile, boolean temp, Map props)
+ {
+ super(props);
+
+ markers = new Vector<Marker>();
+
+ setFlag(TEMPORARY,temp);
+
+ // this must be called before any EditBus messages are sent
+ setPath(path);
+
+ /* Magic: UNTITLED is only set if newFile param to
+ * constructor is set, NEW_FILE is also set if file
+ * doesn't exist on disk.
+ *
+ * This is so that we can tell apart files created
+ * with jEdit.newFile(), and those that just don't
+ * exist on disk.
+ *
+ * Why do we need to tell the difference between the
+ * two? jEdit.addBufferToList() checks if the only
+ * opened buffer is an untitled buffer, and if so,
+ * replaces it with the buffer to add. We don't want
+ * this behavior to occur with files that don't
+ * exist on disk; only untitled ones.
+ */
+ setFlag(UNTITLED,newFile);
+ setFlag(NEW_FILE,newFile);
+ setFlag(AUTORELOAD,jEdit.getBooleanProperty("autoReload"));
+ setFlag(AUTORELOAD_DIALOG,jEdit.getBooleanProperty("autoReloadDialog"));
+
+ undoListeners = new Vector<BufferUndoListener>();
+ } //}}}
+
+ //{{{ commitTemporary() method
+ void commitTemporary()
+ {
+ setFlag(TEMPORARY,false);
+
+ finishLoading();
+ } //}}}
+
+ //{{{ close() method
+ void close()
+ {
+ setFlag(CLOSED,true);
+
+ if(autosaveFile != null)
+ autosaveFile.delete();
+
+ // notify clients with -wait
+ if(waitSocket != null)
+ {
+ try
+ {
+ waitSocket.getOutputStream().write('\0');
+ waitSocket.getOutputStream().flush();
+ waitSocket.getInputStream().close();
+ waitSocket.getOutputStream().close();
+ waitSocket.close();
+ }
+ catch(IOException io)
+ {
+ //Log.log(Log.ERROR,this,io);
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Protected members
+
+ //{{{ fireBeginUndo() method
+ protected void fireBeginUndo()
+ {
+ for (BufferUndoListener listener: undoListeners)
+ {
+ try
+ {
+ listener.beginUndo(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer undo event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ fireEndUndo() method
+ protected void fireEndUndo()
+ {
+ for (BufferUndoListener listener: undoListeners)
+ {
+ try
+ {
+ listener.endUndo(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer undo event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ fireBeginRedo() method
+ protected void fireBeginRedo()
+ {
+ for (BufferUndoListener listener: undoListeners)
+ {
+ try
+ {
+ listener.beginRedo(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer begin redo event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ fireEndRedo() method
+ protected void fireEndRedo()
+ {
+ for (BufferUndoListener listener: undoListeners)
+ {
+ try
+ {
+ listener.endRedo(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer end redo event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Flags
+
+ //{{{ setFlag() method
+ private void setFlag(int flag, boolean value)
+ {
+ if(value)
+ flags |= 1 << flag;
+ else
+ flags &= ~(1 << flag);
+ } //}}}
+
+ //{{{ getFlag() method
+ private boolean getFlag(int flag)
+ {
+ int mask = 1 << flag;
+ return (flags & mask) == mask;
+ } //}}}
+
+ //{{{ getFlag() method
+ private boolean isAutoreloadPropertyOverriden()
+ {
+ return getFlag(AUTORELOAD) != jEdit.getBooleanProperty("autoReload") ||
+ getFlag(AUTORELOAD_DIALOG) != jEdit.getBooleanProperty("autoReloadDialog");
+ } //}}}
+
+ //{{{ Flag values
+ private static final int CLOSED = 0;
+ private static final int NEW_FILE = 3;
+ private static final int UNTITLED = 4;
+ private static final int AUTOSAVE_DIRTY = 5;
+ private static final int AUTORELOAD = 6;
+ private static final int AUTORELOAD_DIALOG = 7;
+ private static final int TEMPORARY = 10;
+ private static final int MARKERS_CHANGED = 12;
+ //}}}
+
+ private int flags;
+
+ //}}}
+
+ //{{{ Instance variables
+ /** Indicate if the autoreload property was overridden */
+ private boolean autoreloadOverridden;
+ private String path;
+ private String symlinkPath;
+ private String name;
+ private String directory;
+ private File file;
+ private File autosaveFile;
+ private long modTime;
+ private byte[] md5hash;
+ private int initialLength;
+
+ private final Vector<Marker> markers;
+
+ private Socket waitSocket;
+ private List<BufferUndoListener> undoListeners;
+ //}}}
+
+ //{{{ setPath() method
+ private void setPath(final String path)
+ {
+ jEdit.visit(new JEditVisitorAdapter()
+ {
+ @Override
+ public void visit(EditPane editPane)
+ {
+ editPane.bufferRenamed(Buffer.this.path, path);
+ }
+ });
+
+ this.path = path;
+ VFS vfs = VFSManager.getVFSForPath(path);
+ if((vfs.getCapabilities() & VFS.WRITE_CAP) == 0)
+ setFileReadOnly(true);
+ name = vfs.getFileName(path);
+ directory = vfs.getParentOfPath(path);
+
+ if(vfs instanceof FileVFS)
+ {
+ file = new File(path);
+ symlinkPath = MiscUtilities.resolveSymlinks(path);
+
+ // if we don't do this, the autosave file won't be
+ // deleted after a save as
+ if(autosaveFile != null)
+ autosaveFile.delete();
+ autosaveFile = new File(file.getParent(),'#' + name + '#');
+ }
+ else
+ {
+ // I wonder if the lack of this broke anything in the
+ // past?
+ file = null;
+ autosaveFile = null;
+ symlinkPath = path;
+ }
+ } //}}}
+
+
+ //{{{ recoverAutosave() method
+ private boolean recoverAutosave(final View view)
+ {
+ if(!autosaveFile.canRead())
+ return false;
+
+ // this method might get called at startup
+ GUIUtilities.hideSplashScreen();
+
+ final Object[] args = { autosaveFile.getPath() };
+ int result = GUIUtilities.confirm(view,"autosave-found",args,
+ JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
+
+ if(result == JOptionPane.YES_OPTION)
+ {
+ VFSManager.getFileVFS().load(view,this,autosaveFile.getPath());
+
+ // show this message when all I/O requests are
+ // complete
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ GUIUtilities.message(view,"autosave-loaded",args);
+ }
+ });
+
+ return true;
+ }
+ else
+ return false;
+ } //}}}
+
+ //{{{ checkFileForLoad() method
+ private boolean checkFileForLoad(View view, VFS vfs, String path)
+ {
+ if((vfs.getCapabilities() & VFS.LOW_LATENCY_CAP) != 0)
+ {
+ Object session = vfs.createVFSSession(path, view);
+ if(session == null)
+ return false;
+
+ try
+ {
+ VFSFile file = vfs._getFile(session,path,view);
+ if(file == null)
+ {
+ setNewFile(true);
+ return true;
+ }
+
+ if(!file.isReadable())
+ {
+ VFSManager.error(view,path,"ioerror.no-read",null);
+ setNewFile(false);
+ return false;
+ }
+
+ setFileReadOnly(!file.isWriteable());
+
+ if(file.getType() != VFSFile.FILE)
+ {
+ VFSManager.error(view,path,
+ "ioerror.open-directory",null);
+ setNewFile(false);
+ return false;
+ }
+ }
+ catch(IOException io)
+ {
+ VFSManager.error(view,path,"ioerror",
+ new String[] { io.toString() });
+ return false;
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,view);
+ }
+ catch(IOException io)
+ {
+ VFSManager.error(view,path,"ioerror",
+ new String[] { io.toString() });
+ return false;
+ }
+ }
+ }
+
+ return true;
+ } //}}}
+
+ //{{{ checkFileForSave() method
+ private static boolean checkFileForSave(View view, VFS vfs, String path)
+ {
+ if((vfs.getCapabilities() & VFS.LOW_LATENCY_CAP) != 0)
+ {
+ Object session = vfs.createVFSSession(path,view);
+ if(session == null)
+ return false;
+
+ try
+ {
+ VFSFile file = vfs._getFile(session,path,view);
+ if(file == null)
+ return true;
+
+ if(file.getType() != VFSFile.FILE)
+ {
+ VFSManager.error(view,path,
+ "ioerror.save-directory",null);
+ return false;
+ }
+ }
+ catch(IOException io)
+ {
+ VFSManager.error(view,path,"ioerror",
+ new String[] { io.toString() });
+ return false;
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,view);
+ }
+ catch(IOException io)
+ {
+ VFSManager.error(view,path,"ioerror",
+ new String[] { io.toString() });
+ return false;
+ }
+ }
+ }
+
+ return true;
+ } //}}}
+
+ /** @return an MD5 hash of the contents of the buffer */
+ private byte[] calculateHash()
+ {
+ final byte[] dummy = new byte[1];
+ if (!jEdit.getBooleanProperty("useMD5forDirtyCalculation"))
+ return dummy;
+ return StandardUtilities.md5(getText());
+ }
+
+ /** Update the buffer's members with the current hash and length,
+ * for later comparison.
+ */
+ private void updateHash()
+ {
+ initialLength = getLength();
+ md5hash = calculateHash();
+ }
+
+ //{{{ finishLoading() method
+ private void finishLoading()
+ {
+ updateHash();
+
+ parseBufferLocalProperties();
+ // AHA!
+ // this is probably the only way to fix this
+ FoldHandler oldFoldHandler = getFoldHandler();
+ setMode();
+
+ if(getFoldHandler() == oldFoldHandler)
+ {
+ // on a reload, the fold handler doesn't change, but
+ // we still need to re-collapse folds.
+ // don't do this on initial fold handler creation
+ invalidateFoldLevels();
+
+ fireFoldHandlerChanged();
+ }
+
+ // Create marker positions
+ for(int i = 0; i < markers.size(); i++)
+ {
+ Marker marker = markers.get(i);
+ marker.removePosition();
+ int pos = marker.getPosition();
+ if(pos > getLength())
+ marker.setPosition(getLength());
+ else if(pos < 0)
+ marker.setPosition(0);
+ marker.createPosition();
+ }
+ } //}}}
+
+ //{{{ finishSaving() method
+ private void finishSaving(View view, String oldPath,
+ String oldSymlinkPath, String path,
+ boolean rename, boolean error)
+ {
+
+ //{{{ Set the buffer's path
+ // Caveat: won't work if save() called with a relative path.
+ // But I don't think anyone calls it like that anyway.
+ if(!error && !path.equals(oldPath))
+ {
+ Buffer buffer = jEdit.getBuffer(path);
+
+ if(rename)
+ {
+ /* if we save a file with the same name as one
+ * that's already open, we presume that we can
+ * close the existing file, since the user
+ * would have confirmed the overwrite in the
+ * 'save as' dialog box anyway */
+ if(buffer != null && /* can't happen? */
+ !buffer.getPath().equals(oldPath))
+ {
+ buffer.setDirty(false);
+ jEdit.closeBuffer(view,buffer);
+ }
+
+ setPath(path);
+ jEdit.visit(new JEditVisitorAdapter()
+ {
+ @Override
+ public void visit(EditPane editPane)
+ {
+ BufferSet bufferSet = editPane.getBufferSet();
+ if (bufferSet.indexOf(Buffer.this) != -1)
+ {
+ bufferSet.sort();
+ }
+ }
+ });
+ }
+ else
+ {
+ /* if we saved over an already open file using
+ * 'save a copy as', then reload the existing
+ * buffer */
+ if(buffer != null && /* can't happen? */
+ !buffer.getPath().equals(oldPath))
+ {
+ buffer.load(view,true);
+ }
+ }
+ } //}}}
+
+ //{{{ Update this buffer for the new path
+ if(rename)
+ {
+ if(file != null)
+ modTime = file.lastModified();
+
+ if(!error)
+ {
+ // we do a write lock so that the
+ // autosave, which grabs a read lock,
+ // is not executed between the
+ // deletion of the autosave file
+ // and clearing of the dirty flag
+ try
+ {
+ writeLock();
+
+ if(autosaveFile != null)
+ autosaveFile.delete();
+
+ setFlag(AUTOSAVE_DIRTY,false);
+ setFileReadOnly(false);
+ setFlag(NEW_FILE,false);
+ setFlag(UNTITLED,false);
+ super.setDirty(false);
+ if(jEdit.getBooleanProperty("resetUndoOnSave"))
+ {
+ undoMgr.clear();
+ }
+ }
+ finally
+ {
+ writeUnlock();
+ }
+
+ parseBufferLocalProperties();
+
+ if(!getPath().equals(oldPath))
+ {
+ if (!isTemporary())
+ jEdit.updatePosition(oldSymlinkPath,this);
+ setMode();
+ }
+ else
+ {
+ // if user adds mode buffer-local property
+ String newMode = getStringProperty("mode");
+ if(newMode != null &&
+ !newMode.equals(getMode()
+ .getName()))
+ setMode();
+ else
+ propertiesChanged();
+ }
+
+ updateHash();
+
+ if (!isTemporary())
+ {
+ EditBus.send(new BufferUpdate(this,
+ view,BufferUpdate.DIRTY_CHANGED));
+
+ // new message type introduced in 4.0pre4
+ EditBus.send(new BufferUpdate(this,
+ view,BufferUpdate.SAVED));
+ }
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ editSyntaxStyle() method
+ /**
+ * Edit the syntax style of the token under the caret.
+ *
+ * @param textArea the textarea where your caret is
+ * @since jEdit 4.3pre11
+ * @deprecated
+ * This method implicitly assumes (textArea.getBuffer() == this).
+ * Use gui.StyleEditor#invokeForCaret(JEditTextArea) instead.
+ */
+ @Deprecated
+ public void editSyntaxStyle(JEditTextArea textArea)
+ {
+ StyleEditor.invokeForCaret(textArea);
+ } //}}}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/BufferHistory.java b/jEdit/org/gjt/sp/jedit/BufferHistory.java
index 1500c5b..26dcb97 100644
--- a/jEdit/org/gjt/sp/jedit/BufferHistory.java
+++ b/jEdit/org/gjt/sp/jedit/BufferHistory.java
@@ -1,463 +1,463 @@
-/*
- * BufferHistory.java - Remembers caret positions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.io.IOException;
-import java.util.*;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.jedit.msg.DynamicMenuChanged;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-import org.gjt.sp.util.IOUtilities;
-//}}}
-
-/**
- * Recent file list.
- * @author Slava Pestov
- * @version $Id: BufferHistory.java 14455 2009-01-25 10:10:56Z kpouer $
- */
-public class BufferHistory
-{
- //{{{ Entry class
- /**
- * Recent file list entry.
- */
- public static class Entry
- {
- public String path;
- public int caret;
- public String selection;
- public String encoding;
- public String mode;
-
- public Selection[] getSelection()
- {
- return stringToSelection(selection);
- }
-
- public Entry(String path, int caret, String selection, String encoding, String mode)
- {
- this.path = path;
- this.caret = caret;
- this.selection = selection;
- this.encoding = encoding;
- this.mode = mode;
- }
-
- public String toString()
- {
- return path + ": " + caret;
- }
- } //}}}
-
- //{{{ getEntry() method
- public static Entry getEntry(String path)
- {
- historyLock.readLock().lock();
- try
- {
- for (Entry entry : history)
- {
- if(MiscUtilities.pathsEqual(entry.path,path))
- return entry;
- }
- }
- finally
- {
- historyLock.readLock().unlock();
- }
-
- return null;
- } //}}}
-
- //{{{ setEntry() method
- public static void setEntry(String path, int caret, Selection[] selection,
- String encoding, String mode)
- {
- Entry entry = new Entry(path,caret,
- selectionToString(selection), encoding, mode);
- historyLock.writeLock().lock();
- try
- {
- removeEntry(path);
- addEntry(entry);
- }
- finally
- {
- historyLock.writeLock().unlock();
- }
- notifyChange();
- } //}}}
-
- //{{{ clear() method
- /**
- * Clear the BufferHistory.
- * @since 4.3pre6
- */
- public static void clear()
- {
- historyLock.writeLock().lock();
- try
- {
- history.clear();
- }
- finally
- {
- historyLock.writeLock().unlock();
- }
- notifyChange();
- } //}}}
-
- //{{{ getHistory() method
- /**
- * Returns the Buffer list.
- * @return the buffer history list
- * @since jEdit 4.2pre2
- */
- public static List<Entry> getHistory()
- {
- // Returns a snapshot to avoid concurrent access to the
- // history. This requires O(n) time, but it should be ok
- // because this method should be used only by external
- // O(n) operation.
-
- historyLock.readLock().lock();
- try
- {
- return (List<Entry>)history.clone();
- }
- finally
- {
- historyLock.readLock().unlock();
- }
- } //}}}
-
- //{{{ load() method
- public static void load()
- {
- if(recentXML == null)
- return;
-
- if(!recentXML.fileExists())
- return;
-
- Log.log(Log.MESSAGE,BufferHistory.class,"Loading " + recentXML);
-
- RecentHandler handler = new RecentHandler();
- try
- {
- recentXML.load(handler);
- }
- catch(IOException e)
- {
- Log.log(Log.ERROR,BufferHistory.class,e);
- }
- trimToLimit(handler.result);
- history = handler.result;
- } //}}}
-
- //{{{ save() method
- public static void save()
- {
- if(recentXML == null)
- return;
-
- if(recentXML.hasChangedOnDisk())
- {
- Log.log(Log.WARNING,BufferHistory.class,recentXML
- + " changed on disk; will not save recent"
- + " files");
- return;
- }
-
- Log.log(Log.MESSAGE,BufferHistory.class,"Saving " + recentXML);
-
- String lineSep = System.getProperty("line.separator");
-
- SettingsXML.Saver out = null;
-
- try
- {
- out = recentXML.openSaver();
- out.writeXMLDeclaration();
-
- out.write("<!DOCTYPE RECENT SYSTEM \"recent.dtd\">");
- out.write(lineSep);
- out.write("<RECENT>");
- out.write(lineSep);
-
- // Make a snapshot to avoid long locking period
- // which may be required by file I/O.
- List<Entry> snapshot = getHistory();
-
- for (Entry entry : snapshot)
- {
- out.write("<ENTRY>");
- out.write(lineSep);
-
- out.write("<PATH>");
- out.write(XMLUtilities.charsToEntities(entry.path,false));
- out.write("</PATH>");
- out.write(lineSep);
-
- out.write("<CARET>");
- out.write(String.valueOf(entry.caret));
- out.write("</CARET>");
- out.write(lineSep);
-
- if(entry.selection != null
- && entry.selection.length() > 0)
- {
- out.write("<SELECTION>");
- out.write(entry.selection);
- out.write("</SELECTION>");
- out.write(lineSep);
- }
-
- if(entry.encoding != null)
- {
- out.write("<ENCODING>");
- out.write(entry.encoding);
- out.write("</ENCODING>");
- out.write(lineSep);
- }
-
- if (entry.mode != null)
- {
- out.write("<MODE>");
- out.write(entry.mode);
- out.write("</MODE>");
- out.write(lineSep);
- }
-
- out.write("</ENTRY>");
- out.write(lineSep);
- }
-
- out.write("</RECENT>");
- out.write(lineSep);
-
- out.finish();
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,BufferHistory.class,e);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
- } //}}}
-
- //{{{ Private members
- private static LinkedList<Entry> history;
- private static ReentrantReadWriteLock historyLock;
- private static SettingsXML recentXML;
-
- //{{{ Class initializer
- static
- {
- history = new LinkedList<Entry>();
- historyLock = new ReentrantReadWriteLock();
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory != null)
- {
- recentXML = new SettingsXML(settingsDirectory, "recent");
- }
- } //}}}
-
- //{{{ addEntry() method
- private static void addEntry(Entry entry)
- {
- historyLock.writeLock().lock();
- try
- {
- history.addFirst(entry);
- trimToLimit(history);
- }
- finally
- {
- historyLock.writeLock().unlock();
- }
- } //}}}
-
- //{{{ removeEntry() method
- private static void removeEntry(String path)
- {
- historyLock.writeLock().lock();
- try
- {
- Iterator<Entry> iter = history.iterator();
- while(iter.hasNext())
- {
- Entry entry = iter.next();
- if(MiscUtilities.pathsEqual(path,entry.path))
- {
- iter.remove();
- return;
- }
- }
- }
- finally
- {
- historyLock.writeLock().unlock();
- }
- } //}}}
-
- //{{{ selectionToString() method
- private static String selectionToString(Selection[] s)
- {
- if(s == null)
- return null;
-
- StringBuilder buf = new StringBuilder();
-
- for(int i = 0; i < s.length; i++)
- {
- if(i != 0)
- buf.append(' ');
-
- Selection sel = s[i];
- if(sel instanceof Selection.Range)
- buf.append("range ");
- else //if(sel instanceof Selection.Rect)
- buf.append("rect ");
- buf.append(sel.getStart());
- buf.append(' ');
- buf.append(sel.getEnd());
- }
-
- return buf.toString();
- } //}}}
-
- //{{{ stringToSelection() method
- private static Selection[] stringToSelection(String s)
- {
- if(s == null)
- return null;
-
- List<Selection> selection = new ArrayList<Selection>();
- StringTokenizer st = new StringTokenizer(s);
-
- while(st.hasMoreTokens())
- {
- String type = st.nextToken();
- int start = Integer.parseInt(st.nextToken());
- int end = Integer.parseInt(st.nextToken());
- if(end < start)
- {
- // I'm not sure when this can happen,
- // but it does sometimes, witness the
- // jEdit bug tracker.
- continue;
- }
-
- Selection sel;
- if(type.equals("range"))
- sel = new Selection.Range(start,end);
- else //if(type.equals("rect"))
- sel = new Selection.Rect(start,end);
-
- selection.add(sel);
- }
-
- Selection[] returnValue = new Selection[selection.size()];
- returnValue = selection.toArray(returnValue);
- return returnValue;
- } //}}}
-
- //{{{ trimToLimit() method
- private static void trimToLimit(LinkedList<Entry> list)
- {
- int max = jEdit.getIntegerProperty("recentFiles",50);
- while(list.size() > max)
- list.removeLast();
- } //}}}
-
- //{{{ notifyChange() method
- private static void notifyChange()
- {
- EditBus.send(new DynamicMenuChanged("recent-files"));
- } //}}}
-
- //{{{ RecentHandler class
- private static class RecentHandler extends DefaultHandler
- {
- public LinkedList<Entry> result = new LinkedList<Entry>();
-
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "recent.dtd", getClass());
- }
-
- public void endElement(String uri, String localName, String name)
- {
- if(name.equals("ENTRY"))
- {
- result.addLast(new Entry(
- path,caret,selection,
- encoding,
- mode));
- path = null;
- caret = 0;
- selection = null;
- encoding = null;
- mode = null;
- }
- else if(name.equals("PATH"))
- path = charData.toString();
- else if(name.equals("CARET"))
- caret = Integer.parseInt(charData.toString());
- else if(name.equals("SELECTION"))
- selection = charData.toString();
- else if(name.equals("ENCODING"))
- encoding = charData.toString();
- else if(name.equals("MODE"))
- mode = charData.toString();
- charData.setLength(0);
- }
-
- public void characters(char[] ch, int start, int length)
- {
- charData.append(ch,start,length);
- }
-
- // end HandlerBase implementation
-
- // private members
- private String path;
- private int caret;
- private String selection;
- private String encoding;
- private String mode;
- private StringBuilder charData = new StringBuilder();
- } //}}}
-
- //}}}
-}
+/*
+ * BufferHistory.java - Remembers caret positions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.jedit.msg.DynamicMenuChanged;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+import org.gjt.sp.util.IOUtilities;
+//}}}
+
+/**
+ * Recent file list.
+ * @author Slava Pestov
+ * @version $Id: BufferHistory.java 14455 2009-01-25 10:10:56Z kpouer $
+ */
+public class BufferHistory
+{
+ //{{{ Entry class
+ /**
+ * Recent file list entry.
+ */
+ public static class Entry
+ {
+ public String path;
+ public int caret;
+ public String selection;
+ public String encoding;
+ public String mode;
+
+ public Selection[] getSelection()
+ {
+ return stringToSelection(selection);
+ }
+
+ public Entry(String path, int caret, String selection, String encoding, String mode)
+ {
+ this.path = path;
+ this.caret = caret;
+ this.selection = selection;
+ this.encoding = encoding;
+ this.mode = mode;
+ }
+
+ public String toString()
+ {
+ return path + ": " + caret;
+ }
+ } //}}}
+
+ //{{{ getEntry() method
+ public static Entry getEntry(String path)
+ {
+ historyLock.readLock().lock();
+ try
+ {
+ for (Entry entry : history)
+ {
+ if(MiscUtilities.pathsEqual(entry.path,path))
+ return entry;
+ }
+ }
+ finally
+ {
+ historyLock.readLock().unlock();
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ setEntry() method
+ public static void setEntry(String path, int caret, Selection[] selection,
+ String encoding, String mode)
+ {
+ Entry entry = new Entry(path,caret,
+ selectionToString(selection), encoding, mode);
+ historyLock.writeLock().lock();
+ try
+ {
+ removeEntry(path);
+ addEntry(entry);
+ }
+ finally
+ {
+ historyLock.writeLock().unlock();
+ }
+ notifyChange();
+ } //}}}
+
+ //{{{ clear() method
+ /**
+ * Clear the BufferHistory.
+ * @since 4.3pre6
+ */
+ public static void clear()
+ {
+ historyLock.writeLock().lock();
+ try
+ {
+ history.clear();
+ }
+ finally
+ {
+ historyLock.writeLock().unlock();
+ }
+ notifyChange();
+ } //}}}
+
+ //{{{ getHistory() method
+ /**
+ * Returns the Buffer list.
+ * @return the buffer history list
+ * @since jEdit 4.2pre2
+ */
+ public static List<Entry> getHistory()
+ {
+ // Returns a snapshot to avoid concurrent access to the
+ // history. This requires O(n) time, but it should be ok
+ // because this method should be used only by external
+ // O(n) operation.
+
+ historyLock.readLock().lock();
+ try
+ {
+ return (List<Entry>)history.clone();
+ }
+ finally
+ {
+ historyLock.readLock().unlock();
+ }
+ } //}}}
+
+ //{{{ load() method
+ public static void load()
+ {
+ if(recentXML == null)
+ return;
+
+ if(!recentXML.fileExists())
+ return;
+
+ Log.log(Log.MESSAGE,BufferHistory.class,"Loading " + recentXML);
+
+ RecentHandler handler = new RecentHandler();
+ try
+ {
+ recentXML.load(handler);
+ }
+ catch(IOException e)
+ {
+ Log.log(Log.ERROR,BufferHistory.class,e);
+ }
+ trimToLimit(handler.result);
+ history = handler.result;
+ } //}}}
+
+ //{{{ save() method
+ public static void save()
+ {
+ if(recentXML == null)
+ return;
+
+ if(recentXML.hasChangedOnDisk())
+ {
+ Log.log(Log.WARNING,BufferHistory.class,recentXML
+ + " changed on disk; will not save recent"
+ + " files");
+ return;
+ }
+
+ Log.log(Log.MESSAGE,BufferHistory.class,"Saving " + recentXML);
+
+ String lineSep = System.getProperty("line.separator");
+
+ SettingsXML.Saver out = null;
+
+ try
+ {
+ out = recentXML.openSaver();
+ out.writeXMLDeclaration();
+
+ out.write("<!DOCTYPE RECENT SYSTEM \"recent.dtd\">");
+ out.write(lineSep);
+ out.write("<RECENT>");
+ out.write(lineSep);
+
+ // Make a snapshot to avoid long locking period
+ // which may be required by file I/O.
+ List<Entry> snapshot = getHistory();
+
+ for (Entry entry : snapshot)
+ {
+ out.write("<ENTRY>");
+ out.write(lineSep);
+
+ out.write("<PATH>");
+ out.write(XMLUtilities.charsToEntities(entry.path,false));
+ out.write("</PATH>");
+ out.write(lineSep);
+
+ out.write("<CARET>");
+ out.write(String.valueOf(entry.caret));
+ out.write("</CARET>");
+ out.write(lineSep);
+
+ if(entry.selection != null
+ && entry.selection.length() > 0)
+ {
+ out.write("<SELECTION>");
+ out.write(entry.selection);
+ out.write("</SELECTION>");
+ out.write(lineSep);
+ }
+
+ if(entry.encoding != null)
+ {
+ out.write("<ENCODING>");
+ out.write(entry.encoding);
+ out.write("</ENCODING>");
+ out.write(lineSep);
+ }
+
+ if (entry.mode != null)
+ {
+ out.write("<MODE>");
+ out.write(entry.mode);
+ out.write("</MODE>");
+ out.write(lineSep);
+ }
+
+ out.write("</ENTRY>");
+ out.write(lineSep);
+ }
+
+ out.write("</RECENT>");
+ out.write(lineSep);
+
+ out.finish();
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,BufferHistory.class,e);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private static LinkedList<Entry> history;
+ private static ReentrantReadWriteLock historyLock;
+ private static SettingsXML recentXML;
+
+ //{{{ Class initializer
+ static
+ {
+ history = new LinkedList<Entry>();
+ historyLock = new ReentrantReadWriteLock();
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory != null)
+ {
+ recentXML = new SettingsXML(settingsDirectory, "recent");
+ }
+ } //}}}
+
+ //{{{ addEntry() method
+ private static void addEntry(Entry entry)
+ {
+ historyLock.writeLock().lock();
+ try
+ {
+ history.addFirst(entry);
+ trimToLimit(history);
+ }
+ finally
+ {
+ historyLock.writeLock().unlock();
+ }
+ } //}}}
+
+ //{{{ removeEntry() method
+ private static void removeEntry(String path)
+ {
+ historyLock.writeLock().lock();
+ try
+ {
+ Iterator<Entry> iter = history.iterator();
+ while(iter.hasNext())
+ {
+ Entry entry = iter.next();
+ if(MiscUtilities.pathsEqual(path,entry.path))
+ {
+ iter.remove();
+ return;
+ }
+ }
+ }
+ finally
+ {
+ historyLock.writeLock().unlock();
+ }
+ } //}}}
+
+ //{{{ selectionToString() method
+ private static String selectionToString(Selection[] s)
+ {
+ if(s == null)
+ return null;
+
+ StringBuilder buf = new StringBuilder();
+
+ for(int i = 0; i < s.length; i++)
+ {
+ if(i != 0)
+ buf.append(' ');
+
+ Selection sel = s[i];
+ if(sel instanceof Selection.Range)
+ buf.append("range ");
+ else //if(sel instanceof Selection.Rect)
+ buf.append("rect ");
+ buf.append(sel.getStart());
+ buf.append(' ');
+ buf.append(sel.getEnd());
+ }
+
+ return buf.toString();
+ } //}}}
+
+ //{{{ stringToSelection() method
+ private static Selection[] stringToSelection(String s)
+ {
+ if(s == null)
+ return null;
+
+ List<Selection> selection = new ArrayList<Selection>();
+ StringTokenizer st = new StringTokenizer(s);
+
+ while(st.hasMoreTokens())
+ {
+ String type = st.nextToken();
+ int start = Integer.parseInt(st.nextToken());
+ int end = Integer.parseInt(st.nextToken());
+ if(end < start)
+ {
+ // I'm not sure when this can happen,
+ // but it does sometimes, witness the
+ // jEdit bug tracker.
+ continue;
+ }
+
+ Selection sel;
+ if(type.equals("range"))
+ sel = new Selection.Range(start,end);
+ else //if(type.equals("rect"))
+ sel = new Selection.Rect(start,end);
+
+ selection.add(sel);
+ }
+
+ Selection[] returnValue = new Selection[selection.size()];
+ returnValue = selection.toArray(returnValue);
+ return returnValue;
+ } //}}}
+
+ //{{{ trimToLimit() method
+ private static void trimToLimit(LinkedList<Entry> list)
+ {
+ int max = jEdit.getIntegerProperty("recentFiles",50);
+ while(list.size() > max)
+ list.removeLast();
+ } //}}}
+
+ //{{{ notifyChange() method
+ private static void notifyChange()
+ {
+ EditBus.send(new DynamicMenuChanged("recent-files"));
+ } //}}}
+
+ //{{{ RecentHandler class
+ private static class RecentHandler extends DefaultHandler
+ {
+ public LinkedList<Entry> result = new LinkedList<Entry>();
+
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "recent.dtd", getClass());
+ }
+
+ public void endElement(String uri, String localName, String name)
+ {
+ if(name.equals("ENTRY"))
+ {
+ result.addLast(new Entry(
+ path,caret,selection,
+ encoding,
+ mode));
+ path = null;
+ caret = 0;
+ selection = null;
+ encoding = null;
+ mode = null;
+ }
+ else if(name.equals("PATH"))
+ path = charData.toString();
+ else if(name.equals("CARET"))
+ caret = Integer.parseInt(charData.toString());
+ else if(name.equals("SELECTION"))
+ selection = charData.toString();
+ else if(name.equals("ENCODING"))
+ encoding = charData.toString();
+ else if(name.equals("MODE"))
+ mode = charData.toString();
+ charData.setLength(0);
+ }
+
+ public void characters(char[] ch, int start, int length)
+ {
+ charData.append(ch,start,length);
+ }
+
+ // end HandlerBase implementation
+
+ // private members
+ private String path;
+ private int caret;
+ private String selection;
+ private String encoding;
+ private String mode;
+ private StringBuilder charData = new StringBuilder();
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/Debug.java b/jEdit/org/gjt/sp/jedit/Debug.java
index c85add4..eb707e7 100644
--- a/jEdit/org/gjt/sp/jedit/Debug.java
+++ b/jEdit/org/gjt/sp/jedit/Debug.java
@@ -1,152 +1,152 @@
-/*
- * Debug.java - Various debugging flags
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-/**
- * This class contains various debugging flags mainly useful for core
- * development.
- * @since jEdit 4.2pre1
- * @author Slava Pestov
- * @version $Id: Debug.java 13534 2008-09-06 08:08:16Z k_satoda $
- */
-public class Debug
-{
- /**
- * Print messages when the gap moves, and other offset manager state
- * changes.
- */
- public static boolean OFFSET_DEBUG = false;
-
- /**
- * Print messages when text area and display manager perform scroll
- * updates.
- */
- public static boolean SCROLL_DEBUG = false;
-
- /**
- * Print messages when text area tries to make the caret visible.
- */
- public static boolean SCROLL_TO_DEBUG = false;
-
- /**
- * Display an error if the scrolling code detects an inconsistency.
- * This kills performance!
- */
- public static boolean SCROLL_VERIFY = false;
-
- /**
- * Print messages when screen line counts change.
- */
- public static boolean SCREEN_LINES_DEBUG = false;
-
- /**
- * For checking context, etc.
- */
- public static boolean TOKEN_MARKER_DEBUG = false;
-
- /**
- * For checking fold level invalidation, etc.
- */
- public static boolean FOLD_DEBUG = false;
-
- /**
- * For checking the line visibility structure..
- */
- public static boolean FOLD_VIS_DEBUG = false;
-
- /**
- * For checking invalidation, etc.
- */
- public static boolean CHUNK_CACHE_DEBUG = false;
-
- /**
- * Paints boxes around chunks.
- */
- public static boolean CHUNK_PAINT_DEBUG = false;
-
- /**
- * Show time taken to repaint text area painter.
- */
- public static boolean PAINT_TIMER = false;
-
- /**
- * Show time taken for each EBComponent.
- */
- public static boolean EB_TIMER = false;
-
- /**
- * Paint strings instead of glyph vectors.
- */
- public static boolean DISABLE_GLYPH_VECTOR = false;
-
- /**
- * Logs messages when BeanShell code is evaluated.
- */
- public static boolean BEANSHELL_DEBUG = false;
-
- /**
- * If true, an alternative dispatcher using key typed events will be
- * used to handle a modifier key press in conjunction with an alphabet
- * key. <b>On by default on MacOS.</b>
- */
- public static boolean ALTERNATIVE_DISPATCHER = OperatingSystem.isMacOS();
-
- /**
- * If true, A+ shortcuts are disabled. If you use this, you should also
- * remap the the modifiers so that A+ is actually something else.
- * <b>On by default on MacOS.</b>
- */
- public static boolean ALT_KEY_PRESSED_DISABLED = OperatingSystem.isMacOS();
-
- /**
- * Geometry workaround for X11.
- */
- public static boolean GEOMETRY_WORKAROUND = false;
-
- /**
- * Dump key events received by text area?
- */
- public static boolean DUMP_KEY_EVENTS = false;
-
- /**
- * Indent debug.
- */
- public static boolean INDENT_DEBUG = false;
-
- /**
- * Printing debug.
- */
- public static boolean PRINT_DEBUG = false;
-
- /**
- * Create new search dialogs instead of reusing instances.
- */
- public static boolean DISABLE_SEARCH_DIALOG_POOL = false;
-
- /**
- * Disable multihead support, since it can cause window positioning
- * problems with some Java versions.
- * @since jEdit 4.3pre1
- */
- public static boolean DISABLE_MULTIHEAD = false;
-}
+/*
+ * Debug.java - Various debugging flags
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+/**
+ * This class contains various debugging flags mainly useful for core
+ * development.
+ * @since jEdit 4.2pre1
+ * @author Slava Pestov
+ * @version $Id: Debug.java 13534 2008-09-06 08:08:16Z k_satoda $
+ */
+public class Debug
+{
+ /**
+ * Print messages when the gap moves, and other offset manager state
+ * changes.
+ */
+ public static boolean OFFSET_DEBUG = false;
+
+ /**
+ * Print messages when text area and display manager perform scroll
+ * updates.
+ */
+ public static boolean SCROLL_DEBUG = false;
+
+ /**
+ * Print messages when text area tries to make the caret visible.
+ */
+ public static boolean SCROLL_TO_DEBUG = false;
+
+ /**
+ * Display an error if the scrolling code detects an inconsistency.
+ * This kills performance!
+ */
+ public static boolean SCROLL_VERIFY = false;
+
+ /**
+ * Print messages when screen line counts change.
+ */
+ public static boolean SCREEN_LINES_DEBUG = false;
+
+ /**
+ * For checking context, etc.
+ */
+ public static boolean TOKEN_MARKER_DEBUG = false;
+
+ /**
+ * For checking fold level invalidation, etc.
+ */
+ public static boolean FOLD_DEBUG = false;
+
+ /**
+ * For checking the line visibility structure..
+ */
+ public static boolean FOLD_VIS_DEBUG = false;
+
+ /**
+ * For checking invalidation, etc.
+ */
+ public static boolean CHUNK_CACHE_DEBUG = false;
+
+ /**
+ * Paints boxes around chunks.
+ */
+ public static boolean CHUNK_PAINT_DEBUG = false;
+
+ /**
+ * Show time taken to repaint text area painter.
+ */
+ public static boolean PAINT_TIMER = false;
+
+ /**
+ * Show time taken for each EBComponent.
+ */
+ public static boolean EB_TIMER = false;
+
+ /**
+ * Paint strings instead of glyph vectors.
+ */
+ public static boolean DISABLE_GLYPH_VECTOR = false;
+
+ /**
+ * Logs messages when BeanShell code is evaluated.
+ */
+ public static boolean BEANSHELL_DEBUG = false;
+
+ /**
+ * If true, an alternative dispatcher using key typed events will be
+ * used to handle a modifier key press in conjunction with an alphabet
+ * key. <b>On by default on MacOS.</b>
+ */
+ public static boolean ALTERNATIVE_DISPATCHER = OperatingSystem.isMacOS();
+
+ /**
+ * If true, A+ shortcuts are disabled. If you use this, you should also
+ * remap the the modifiers so that A+ is actually something else.
+ * <b>On by default on MacOS.</b>
+ */
+ public static boolean ALT_KEY_PRESSED_DISABLED = OperatingSystem.isMacOS();
+
+ /**
+ * Geometry workaround for X11.
+ */
+ public static boolean GEOMETRY_WORKAROUND = false;
+
+ /**
+ * Dump key events received by text area?
+ */
+ public static boolean DUMP_KEY_EVENTS = false;
+
+ /**
+ * Indent debug.
+ */
+ public static boolean INDENT_DEBUG = false;
+
+ /**
+ * Printing debug.
+ */
+ public static boolean PRINT_DEBUG = false;
+
+ /**
+ * Create new search dialogs instead of reusing instances.
+ */
+ public static boolean DISABLE_SEARCH_DIALOG_POOL = false;
+
+ /**
+ * Disable multihead support, since it can cause window positioning
+ * problems with some Java versions.
+ * @since jEdit 4.3pre1
+ */
+ public static boolean DISABLE_MULTIHEAD = false;
+}
diff --git a/jEdit/org/gjt/sp/jedit/EBComponent.java b/jEdit/org/gjt/sp/jedit/EBComponent.java
index ba46a35..07cca71 100644
--- a/jEdit/org/gjt/sp/jedit/EBComponent.java
+++ b/jEdit/org/gjt/sp/jedit/EBComponent.java
@@ -1,56 +1,56 @@
-/*
- * EBComponent.java - An EditBus component
- * Copyright (C) 1999 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-/**
- * A component on the EditBus. Every plugin class that uses the EditBus for
- * receiving messages must implement this interface.
- *
- * @see org.gjt.sp.jedit.EBMessage
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: EBComponent.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 2.2pre6
- */
-public interface EBComponent
-{
- /**
- * Handles a message sent on the EditBus.
- *
- * This method must specify the type of responses the plugin will have
- * for various subclasses of the {@link EBMessage} class. Typically
- * this is done with one or more <code>if</code> blocks that test
- * whether the message is an instance of a derived message class in
- * which the component has an interest. For example:
- *
- * <pre> if(msg instanceof BufferUpdate) {
- * // a buffer's state has changed!
- * }
- * else if(msg instanceof ViewUpdate) {
- * // a view's state has changed!
- * }
- * // ... and so on</pre>
- *
- * @param message The message
- */
- void handleMessage(EBMessage message);
-}
+/*
+ * EBComponent.java - An EditBus component
+ * Copyright (C) 1999 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+/**
+ * A component on the EditBus. Every plugin class that uses the EditBus for
+ * receiving messages must implement this interface.
+ *
+ * @see org.gjt.sp.jedit.EBMessage
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: EBComponent.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 2.2pre6
+ */
+public interface EBComponent
+{
+ /**
+ * Handles a message sent on the EditBus.
+ *
+ * This method must specify the type of responses the plugin will have
+ * for various subclasses of the {@link EBMessage} class. Typically
+ * this is done with one or more <code>if</code> blocks that test
+ * whether the message is an instance of a derived message class in
+ * which the component has an interest. For example:
+ *
+ * <pre> if(msg instanceof BufferUpdate) {
+ * // a buffer's state has changed!
+ * }
+ * else if(msg instanceof ViewUpdate) {
+ * // a view's state has changed!
+ * }
+ * // ... and so on</pre>
+ *
+ * @param message The message
+ */
+ void handleMessage(EBMessage message);
+}
diff --git a/jEdit/org/gjt/sp/jedit/EBMessage.java b/jEdit/org/gjt/sp/jedit/EBMessage.java
index 0534af1..13af706 100644
--- a/jEdit/org/gjt/sp/jedit/EBMessage.java
+++ b/jEdit/org/gjt/sp/jedit/EBMessage.java
@@ -1,99 +1,99 @@
-/*
- * EBMessage.java - An EditBus message
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-/**
- * The base class of all EditBus messages.<p>
- *
- * Message classes extending this class typically add
- * other data members and methods to provide subscribers with whatever is
- * needed to handle the message appropriately.<p>
- *
- * Message types sent by jEdit can be found in the
- * {@link org.gjt.sp.jedit.msg} package.
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: EBMessage.java 12625 2008-05-11 12:07:29Z kpouer $
- *
- * @since jEdit 2.2pre6
- */
-public abstract class EBMessage
-{
- //{{{ EBMessage constructor
- /**
- * Creates a new message.
- * @param source The message source
- * @since jEdit 4.2pre1
- */
- protected EBMessage(Object source)
- {
- this.source = source;
- } //}}}
-
- //{{{ EBMessage constructor
- /**
- * Creates a new message.
- * @param source The message source
- */
- protected EBMessage(EBComponent source)
- {
- this.source = source;
- } //}}}
-
- //{{{ getSource() method
- /**
- * Returns the sender of this message.
- * @since jEdit 4.2pre1
- */
- public Object getSource()
- {
- return source;
- } //}}}
-
- //{{{ toString() method
- /**
- * Returns a string representation of this message.
- */
- @Override
- public String toString()
- {
- String className = getClass().getName();
- int index = className.lastIndexOf('.');
- return className.substring(index + 1)
- + '[' + paramString() + ']';
- } //}}}
-
- //{{{ paramString() method
- /**
- * Returns a string representation of this message's parameters.
- */
- public String paramString()
- {
- return "source=" + source;
- } //}}}
-
- //{{{ Private members
- private Object source;
- //}}}
-}
+/*
+ * EBMessage.java - An EditBus message
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+/**
+ * The base class of all EditBus messages.<p>
+ *
+ * Message classes extending this class typically add
+ * other data members and methods to provide subscribers with whatever is
+ * needed to handle the message appropriately.<p>
+ *
+ * Message types sent by jEdit can be found in the
+ * {@link org.gjt.sp.jedit.msg} package.
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: EBMessage.java 12625 2008-05-11 12:07:29Z kpouer $
+ *
+ * @since jEdit 2.2pre6
+ */
+public abstract class EBMessage
+{
+ //{{{ EBMessage constructor
+ /**
+ * Creates a new message.
+ * @param source The message source
+ * @since jEdit 4.2pre1
+ */
+ protected EBMessage(Object source)
+ {
+ this.source = source;
+ } //}}}
+
+ //{{{ EBMessage constructor
+ /**
+ * Creates a new message.
+ * @param source The message source
+ */
+ protected EBMessage(EBComponent source)
+ {
+ this.source = source;
+ } //}}}
+
+ //{{{ getSource() method
+ /**
+ * Returns the sender of this message.
+ * @since jEdit 4.2pre1
+ */
+ public Object getSource()
+ {
+ return source;
+ } //}}}
+
+ //{{{ toString() method
+ /**
+ * Returns a string representation of this message.
+ */
+ @Override
+ public String toString()
+ {
+ String className = getClass().getName();
+ int index = className.lastIndexOf('.');
+ return className.substring(index + 1)
+ + '[' + paramString() + ']';
+ } //}}}
+
+ //{{{ paramString() method
+ /**
+ * Returns a string representation of this message's parameters.
+ */
+ public String paramString()
+ {
+ return "source=" + source;
+ } //}}}
+
+ //{{{ Private members
+ private Object source;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/EBPlugin.java b/jEdit/org/gjt/sp/jedit/EBPlugin.java
index b67c52e..008e999 100644
--- a/jEdit/org/gjt/sp/jedit/EBPlugin.java
+++ b/jEdit/org/gjt/sp/jedit/EBPlugin.java
@@ -1,58 +1,58 @@
-/*
- * EBPlugin.java - An EditBus plugin
- * Copyright (C) 1999 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import org.gjt.sp.util.Log;
-
-/**
- * Plugins extending this class are automatically added to the EditBus.
- * Otherwise, this class is identical to the {@link EditPlugin}
- * class.
- *
- * @see org.gjt.sp.jedit.EditBus
- * @see org.gjt.sp.jedit.EBComponent
- * @see org.gjt.sp.jedit.EBMessage
- *
- * @author Slava Pestov
- * @version $Id: EBPlugin.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public abstract class EBPlugin extends EditPlugin implements EBComponent
-{
- /**
- * Handles a message sent on the EditBus.
- */
- // next version: remove this
- public void handleMessage(EBMessage message)
- {
- EditBus.removeFromBus(this);
- if(seenWarning)
- return;
- seenWarning = true;
- Log.log(Log.WARNING,this,getClassName() + " should extend"
- + " EditPlugin not EBPlugin since it has an empty"
- + " handleMessage()");
- }
-
- // protected members
- protected EBPlugin() {}
-
- // private members
- private boolean seenWarning;
-}
+/*
+ * EBPlugin.java - An EditBus plugin
+ * Copyright (C) 1999 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import org.gjt.sp.util.Log;
+
+/**
+ * Plugins extending this class are automatically added to the EditBus.
+ * Otherwise, this class is identical to the {@link EditPlugin}
+ * class.
+ *
+ * @see org.gjt.sp.jedit.EditBus
+ * @see org.gjt.sp.jedit.EBComponent
+ * @see org.gjt.sp.jedit.EBMessage
+ *
+ * @author Slava Pestov
+ * @version $Id: EBPlugin.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public abstract class EBPlugin extends EditPlugin implements EBComponent
+{
+ /**
+ * Handles a message sent on the EditBus.
+ */
+ // next version: remove this
+ public void handleMessage(EBMessage message)
+ {
+ EditBus.removeFromBus(this);
+ if(seenWarning)
+ return;
+ seenWarning = true;
+ Log.log(Log.WARNING,this,getClassName() + " should extend"
+ + " EditPlugin not EBPlugin since it has an empty"
+ + " handleMessage()");
+ }
+
+ // protected members
+ protected EBPlugin() {}
+
+ // private members
+ private boolean seenWarning;
+}
diff --git a/jEdit/org/gjt/sp/jedit/EditAction.java b/jEdit/org/gjt/sp/jedit/EditAction.java
index 5ba204d..8e3a699 100644
--- a/jEdit/org/gjt/sp/jedit/EditAction.java
+++ b/jEdit/org/gjt/sp/jedit/EditAction.java
@@ -1,224 +1,225 @@
-/*
- * EditAction.java - jEdit action listener
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import org.gjt.sp.util.Log;
-import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-//}}}
-
-/**
- * An action that can be bound to a menu item, tool bar button or keystroke.
- *
- * @see jEdit#getAction(String)
- * @see jEdit#getActionNames()
- * @see ActionSet
- *
- * @author Slava Pestov
- * @version $Id: EditAction.java 16334 2009-10-14 09:31:11Z kpouer $
- */
-public abstract class EditAction extends JEditAbstractEditAction<View>
-{
- //{{{ EditAction constructors
- /**
- * Creates a new edit action with the specified name.
- * @param name The action name
- */
- public EditAction(String name)
- {
- super(name);
- }
-
- public EditAction(String name, Object[] newArgs)
- {
- super(name, newArgs);
- } //}}}
-
- //{{{ getLabel() method
- /**
- * Returns the action's label. This returns the
- * value of the property named by {@link #getName()} suffixed
- * with <code>.label</code>.
- *
- */
- public String getLabel()
- {
- if (args != null)
- {
- return jEdit.getProperty(name + ".label", args);
- }
- return jEdit.getProperty(name + ".label");
- } //}}}
-
- //{{{ getMouseOverText() method
- /**
- * Returns the action's mouse over message. This returns the
- * value of the property named by {@link #getName()} suffixed
- * with <code>.mouse-over</code>.
- */
- public final String getMouseOverText()
- {
- return jEdit.getProperty(name + ".mouse-over");
- } //}}}
-
- //{{{ invoke() method
- /**
- * Invokes the action. This is an implementation of the Command pattern,
- * and concrete actions should override this.
- *
- * @param view The view
- * @since jEdit 2.7pre2
- * abstract since jEdit 4.3pre7
- */
- abstract public void invoke(View view);
-
- //{{{ getView() method
- /**
- * @deprecated Call <code>GUIUtilities.getView()</code> instead.
- */
- public static View getView(Component comp)
- {
- // moved to GUIUtilities as it makes no sense being here.
- return GUIUtilities.getView(comp);
- } //}}}
-
- //{{{ isToggle() method
- /**
- * Returns if this edit action should be displayed as a check box
- * in menus. This returns the
- * value of the property named by {@link #getName()} suffixed
- * with <code>.toggle</code>.
- *
- * @since jEdit 2.2pre4
- */
- public final boolean isToggle()
- {
- return jEdit.getBooleanProperty(name + ".toggle");
- } //}}}
-
- //{{{ isSelected() method
- /**
- * If this edit action is a toggle, returns if it is selected or not.
- * @param comp The component
- * @since jEdit 4.2pre1
- */
- public boolean isSelected(Component comp)
- {
- return false;
- } //}}}
-
- //{{{ noRepeat() method
- /**
- * Returns if this edit action should not be repeated. Returns false
- * by default.
- * @since jEdit 2.7pre2
- */
- public boolean noRepeat()
- {
- return false;
- } //}}}
-
- //{{{ noRecord() method
- /**
- * Returns if this edit action should not be recorded. Returns false
- * by default.
- * @since jEdit 2.7pre2
- */
- public boolean noRecord()
- {
- return false;
- } //}}}
-
- //{{{ noRememberLast() method
- /**
- * Returns if this edit action should not be remembered as the most
- * recently invoked action.
- * @since jEdit 4.2pre1
- */
- public boolean noRememberLast()
- {
- return false;
- } //}}}
-
- //{{{ getCode() method
- /**
- * Returns the BeanShell code that will replay this action.
- * BeanShellAction.getCode() returns something more interesting for Actions that were loaded
- * from the actions.xml file.
- * You do not need to override this method if your action name is unique,
- * this EditAction was added to an ActionSet and that to an ActionContext of jEdit.
- *
- * concrete since jEdit 4.3pre7
- * @since jEdit 2.7pre2
- *
- */
- public String getCode()
- {
- return "jEdit.getAction(" + name + ").invoke(view); ";
- }
- //}}}
-
- //{{{ Wrapper class
- /**
- * 'Wrap' EditActions in this class to turn them into AWT
- * ActionListeners, that can be attached to buttons, menu items, etc.
- */
- public static class Wrapper implements ActionListener
- {
-
- private final ActionContext context;
- private final String actionName;
-
- /**
- * Creates a new action listener wrapper.
- * @since jEdit 4.2pre1
- */
- public Wrapper(ActionContext context, String actionName)
- {
- this.context = context;
- this.actionName = actionName;
- }
-
- /**
- * Called when the user selects this action from a menu.
- * It passes the action through the
- * {@link org.gjt.sp.jedit.gui.InputHandler#invokeAction(EditAction)}
- * method, which performs any recording or repeating.
- *
- * @param evt The action event
- */
- public void actionPerformed(ActionEvent evt)
- {
- EditAction action = context.getAction(actionName);
- if(action == null)
- {
- Log.log(Log.WARNING,this,"Unknown action: "
- + actionName);
- }
- else
- context.invokeAction(evt,action);
- }
- } //}}}
-}
+/*
+ * EditAction.java - jEdit action listener
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import org.gjt.sp.util.Log;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+//}}}
+
+/**
+ * An action that can be bound to a menu item, tool bar button or keystroke.
+ *
+ * @see jEdit#getAction(String)
+ * @see jEdit#getActionNames()
+ * @see ActionSet
+ *
+ * @author Slava Pestov
+ * @version $Id: EditAction.java 17144 2010-01-30 00:32:11Z kpouer $
+ */
+public abstract class EditAction extends JEditAbstractEditAction<View>
+{
+ //{{{ EditAction constructors
+ /**
+ * Creates a new edit action with the specified name.
+ * @param name The action name
+ */
+ public EditAction(String name)
+ {
+ super(name);
+ }
+
+ public EditAction(String name, Object[] newArgs)
+ {
+ super(name, newArgs);
+ } //}}}
+
+ //{{{ getLabel() method
+ /**
+ * Returns the action's label. This returns the
+ * value of the property named by {@link #getName()} suffixed
+ * with <code>.label</code>.
+ *
+ */
+ public String getLabel()
+ {
+ if (args != null)
+ {
+ return jEdit.getProperty(name + ".label", args);
+ }
+ return jEdit.getProperty(name + ".label");
+ } //}}}
+
+ //{{{ getMouseOverText() method
+ /**
+ * Returns the action's mouse over message. This returns the
+ * value of the property named by {@link #getName()} suffixed
+ * with <code>.mouse-over</code>.
+ */
+ public final String getMouseOverText()
+ {
+ return jEdit.getProperty(name + ".mouse-over");
+ } //}}}
+
+ //{{{ invoke() method
+ /**
+ * Invokes the action. This is an implementation of the Command pattern,
+ * and concrete actions should override this.
+ *
+ * @param view The view
+ * @since jEdit 2.7pre2
+ * abstract since jEdit 4.3pre7
+ */
+ abstract public void invoke(View view);
+
+ //{{{ getView() method
+ /**
+ * @deprecated Call <code>GUIUtilities.getView()</code> instead.
+ */
+ @Deprecated
+ public static View getView(Component comp)
+ {
+ // moved to GUIUtilities as it makes no sense being here.
+ return GUIUtilities.getView(comp);
+ } //}}}
+
+ //{{{ isToggle() method
+ /**
+ * Returns if this edit action should be displayed as a check box
+ * in menus. This returns the
+ * value of the property named by {@link #getName()} suffixed
+ * with <code>.toggle</code>.
+ *
+ * @since jEdit 2.2pre4
+ */
+ public final boolean isToggle()
+ {
+ return jEdit.getBooleanProperty(name + ".toggle");
+ } //}}}
+
+ //{{{ isSelected() method
+ /**
+ * If this edit action is a toggle, returns if it is selected or not.
+ * @param comp The component
+ * @since jEdit 4.2pre1
+ */
+ public boolean isSelected(Component comp)
+ {
+ return false;
+ } //}}}
+
+ //{{{ noRepeat() method
+ /**
+ * Returns if this edit action should not be repeated. Returns false
+ * by default.
+ * @since jEdit 2.7pre2
+ */
+ public boolean noRepeat()
+ {
+ return false;
+ } //}}}
+
+ //{{{ noRecord() method
+ /**
+ * Returns if this edit action should not be recorded. Returns false
+ * by default.
+ * @since jEdit 2.7pre2
+ */
+ public boolean noRecord()
+ {
+ return false;
+ } //}}}
+
+ //{{{ noRememberLast() method
+ /**
+ * Returns if this edit action should not be remembered as the most
+ * recently invoked action.
+ * @since jEdit 4.2pre1
+ */
+ public boolean noRememberLast()
+ {
+ return false;
+ } //}}}
+
+ //{{{ getCode() method
+ /**
+ * Returns the BeanShell code that will replay this action.
+ * BeanShellAction.getCode() returns something more interesting for Actions that were loaded
+ * from the actions.xml file.
+ * You do not need to override this method if your action name is unique,
+ * this EditAction was added to an ActionSet and that to an ActionContext of jEdit.
+ *
+ * concrete since jEdit 4.3pre7
+ * @since jEdit 2.7pre2
+ *
+ */
+ public String getCode()
+ {
+ return "jEdit.getAction(" + name + ").invoke(view); ";
+ }
+ //}}}
+
+ //{{{ Wrapper class
+ /**
+ * 'Wrap' EditActions in this class to turn them into AWT
+ * ActionListeners, that can be attached to buttons, menu items, etc.
+ */
+ public static class Wrapper implements ActionListener
+ {
+
+ private final ActionContext context;
+ private final String actionName;
+
+ /**
+ * Creates a new action listener wrapper.
+ * @since jEdit 4.2pre1
+ */
+ public Wrapper(ActionContext context, String actionName)
+ {
+ this.context = context;
+ this.actionName = actionName;
+ }
+
+ /**
+ * Called when the user selects this action from a menu.
+ * It passes the action through the
+ * {@link org.gjt.sp.jedit.gui.InputHandler#invokeAction(EditAction)}
+ * method, which performs any recording or repeating.
+ *
+ * @param evt The action event
+ */
+ public void actionPerformed(ActionEvent evt)
+ {
+ EditAction action = context.getAction(actionName);
+ if(action == null)
+ {
+ Log.log(Log.WARNING,this,"Unknown action: "
+ + actionName);
+ }
+ else
+ context.invokeAction(evt,action);
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/EditBus.java b/jEdit/org/gjt/sp/jedit/EditBus.java
index 0af0e0b..7999f3b 100644
--- a/jEdit/org/gjt/sp/jedit/EditBus.java
+++ b/jEdit/org/gjt/sp/jedit/EditBus.java
@@ -1,403 +1,477 @@
-/*
- * EditBus.java - The EditBus
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import java.lang.annotation.*;
-import java.lang.reflect.Method;
-import java.util.*;
-import org.gjt.sp.util.Log;
-
-/**
- * jEdit's global event notification mechanism.<p>
- *
- * Plugins register with the EditBus to receive messages reflecting
- * changes in the application's state, including changes in buffers,
- * views and edit panes, changes in the set of properties maintained
- * by the application, and the closing of the application.<p>
- *
- * The EditBus maintains a list of objects that have requested to receive
- * messages. When a message is sent using this class, all registered
- * components receive it in turn. Classes for objects that sourceibe to
- * the EditBus must implement the {@link EBComponent} interface, which
- * defines the single method {@link EBComponent#handleMessage(EBMessage)}.<p>
- *
- * Alternatively, since jEdit4.3pre19, EditBus components can be any
- * object. Handlers for EditBus messages are created by annotating
- * methods with the {@link EBHandler} annotation. Such methods should
- * expect a single parameter - an edit bus message of any desired type.
- * If a message matching the type (or any of its super-types, unless the
- * annotation requests exact type matching) is being sent, the annotated
- * method will be called instead of the default {@link
- * EBComponent#handleMessage(EBMessage)}. If a handler exists for a
- * specific message type, the default handler will not be called.<p>
- *
- * A plugin core class that extends the
- * {@link EBPlugin} abstract class (and whose name ends with
- * <code>Plugin</code> for identification purposes) will automatically be
- * added to the EditBus during jEdit's startup routine. Any other
- * class - for example, a dockable window that needs to receive
- * notification of buffer changes - must perform its own registration by calling
- * {@link #addToBus(Object)} during its initialization.
- * A convenient place to register in a class derived from <code>JComponent</code>
- * would be in an implementation of the <code>JComponent</code> method
- * <code>addNotify()</code>.<p>
- *
- * Message types sent by jEdit can be found in the
- * {@link org.gjt.sp.jedit.msg} package.<p>
- *
- * Plugins can also send their own messages - any object can send a message to
- * the EditBus by calling the static method {@link #send(EBMessage)}.
- * Most plugins, however, only concern themselves with receiving, not
- * sending, messages.
- *
- * @see org.gjt.sp.jedit.EBComponent
- * @see org.gjt.sp.jedit.EBMessage
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: EditBus.java 16473 2009-11-12 06:32:01Z vanza $
- *
- * @since jEdit 2.2pre6
- */
-public class EditBus
-{
-
- //{{{ EBHandler annotation
- /**
- * This annotation should be used in methods that are to be
- * considered "edit bus message handlers". When registering
- * an object using {@link #addToBus(Object)}, all methods
- * tagged with this annotation will be considered as handlers
- * for specific edit bus messages.<p>
- *
- * Each method should expect a single argument (an object of
- * some type derived from EBMessage, inclusive). When
- * delivering an EBMessage, the bus will search for and invoke
- * all handlers matching the outgoing message type.<p>
- *
- * @since jEdit 4.3pre19
- */
- @Retention(RetentionPolicy.RUNTIME)
- @Target(ElementType.METHOD)
- public static @interface EBHandler
- {
- /**
- * Whether the message should match the exact type of
- * the parameter, instead of a compatible type.
- */
- boolean exact() default false;
- } //}}}
-
- //{{{ addToBus() method
- /**
- * Adds a component to the bus. It will receive all messages sent
- * on the bus.
- *
- * @param comp The component to add
- */
- public static void addToBus(EBComponent comp)
- {
- addToBus((Object)comp);
- } //}}}
-
- //{{{ addToBus() method
- /**
- * Adds a component to the bus. Methods annotated with the
- * {@link EBHandler} annotation found in the component will
- * be used as EditBus message handlers if a message of a
- * matching type is sent on the bus.<p>
- *
- * If the component implements {@link EBComponent}, then the
- * {@link EBComponent#handleMessage(EBMessage)} method will be
- * called for every message sent on the bus.
- *
- * @param comp The component to add
- *
- * @since jEdit 4.3pre19
- */
- public static void addToBus(Object comp)
- {
- components.addComponent(comp);
- } //}}}
-
- //{{{ removeFromBus() method
- /**
- * Removes a component from the bus.
- * @param comp The component to remove
- */
- public static void removeFromBus(EBComponent comp)
- {
- removeFromBus((Object) comp);
- } //}}}
-
- //{{{ removeFromBus() method
- /**
- * Removes a component from the bus.
- * @param comp The component to remove
- * @since 4.3pre19
- */
- public static void removeFromBus(Object comp)
- {
- components.removeComponent(comp);
- } //}}}
-
- //{{{ getComponents() method
- /**
- * Returns an array of all components connected to the bus.
- *
- * @deprecated Don't use this method. It now returns an empty array.
- */
- @Deprecated
- public static EBComponent[] getComponents()
- {
- return new EBComponent[0];
- } //}}}
-
- //{{{ send() method
- /**
- * Sends a message to all components on the bus in turn.
- * @param message The message
- */
- public static void send(EBMessage message)
- {
- Log.log(Log.DEBUG,EditBus.class,message.toString());
-
- components.lock();
- try
- {
- sendImpl(message);
- }
- finally
- {
- components.unlock();
- }
- } //}}}
-
- //{{{ Private members
- private static final HandlerList components = new HandlerList();
-
- // can't create new instances
- private EditBus() {}
-
- //{{{ dispatch() method
- private static void dispatch(EBMessageHandler emh,
- EBMessage msg)
- throws Exception
- {
- if (emh.handler != null)
- emh.handler.invoke(emh.comp, msg);
- else
- {
- assert (emh.comp instanceof EBComponent);
- ((EBComponent)emh.comp).handleMessage(msg);
- }
- } //}}}
-
- //{{{ sendImpl() method
- private static void sendImpl(EBMessage message)
- {
- boolean isExact = true;
- Class<?> type = message.getClass();
- while (!type.equals(Object.class))
- {
- List<EBMessageHandler> handlers = components.get(type);
- if (handlers != null)
- {
- try
- {
- for (EBMessageHandler emh : handlers)
- {
- if (!isExact &&
- emh.source != null &&
- emh.source.exact())
- {
- continue;
- }
- if(Debug.EB_TIMER)
- {
- long start = System.nanoTime();
- dispatch(emh, message);
- long time = System.nanoTime() - start;
- if(time >= 1000000)
- {
- Log.log(Log.DEBUG,EditBus.class,emh.comp + ": " + time + " ns");
- }
- }
- else
- dispatch(emh, message);
- }
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,EditBus.class,"Exception"
- + " while sending message on EditBus:");
- Log.log(Log.ERROR,EditBus.class,t);
- }
- }
- type = type.getSuperclass();
- isExact = false;
- }
- } //}}}
-
- //}}}
-
- //{{{ EBMessageHandler class
- private static class EBMessageHandler
- {
-
- EBMessageHandler(Object comp,
- Method handler,
- EBHandler source)
- {
- this.comp = comp;
- this.handler = handler;
- this.source = source;
- }
-
- Object comp;
- Method handler;
- EBHandler source;
- } //}}}
-
- //{{{ HandlerList class
- /**
- * A "special" hash map that has some optimizations for use by
- * the EditBus. Notably, it allows setting a "read only" mode
- * where modifications to the map are postponed until the map
- * is unlocked.
- */
- private static class HandlerList
- extends HashMap<Class<?>, List<EBMessageHandler>>
- {
-
- public List<EBMessageHandler> safeGet(Class<?> type)
- {
- List<EBMessageHandler> lst = super.get(type);
- if (lst == null) {
- lst = new LinkedList<EBMessageHandler>();
- super.put(type, lst);
- }
- return lst;
- }
-
-
- public synchronized void lock()
- {
- lock++;
- }
-
-
- public synchronized void unlock()
- {
- lock--;
- if (lock == 0)
- {
- for (Object comp : add)
- addComponent(comp);
- for (Object comp : remove)
- removeComponent(comp);
- add.clear();
- remove.clear();
- }
- }
-
-
- public synchronized void removeComponent(Object comp)
- {
- if (lock != 0)
- {
- remove.add(comp);
- return;
- }
-
- for (Class<?> msg : keySet())
- {
- List<EBMessageHandler> handlers = get(msg);
- if (handlers == null)
- continue;
- for (Iterator<EBMessageHandler> it = handlers.iterator();
- it.hasNext(); )
- {
- EBMessageHandler emh = it.next();
- if (emh.comp == comp)
- it.remove();
- }
- }
- }
-
-
- public synchronized void addComponent(Object comp)
- {
- if (lock != 0)
- {
- add.add(comp);
- return;
- }
-
- for (Method m : comp.getClass().getMethods())
- {
- EBHandler source = m.getAnnotation(EBHandler.class);
- if (source == null)
- continue;
-
- Class[] params = m.getParameterTypes();
-
- if (params.length != 1)
- {
- Log.log(Log.ERROR, EditBus.class,
- "Invalid EBHandler method " + m.getName() +
- " in class " + comp.getClass().getName() +
- ": too many parameters.");
- continue;
- }
-
- if (!EBMessage.class.isAssignableFrom(params[0]))
- {
- Log.log(Log.ERROR, EditBus.class,
- "Invalid parameter " + params[0].getName() +
- " in method " + m.getName() +
- " of class " + comp.getClass().getName());
- continue;
- }
-
- synchronized (components)
- {
- safeGet(params[0]).add(new EBMessageHandler(comp, m, source));
- }
- }
-
- /*
- * If the component implements EBComponent, then add the
- * default handler for backwards compatibility.
- */
- if (comp instanceof EBComponent)
- safeGet(EBMessage.class).add(new EBMessageHandler(comp, null, null));
- }
-
-
- private int lock;
- private List<Object> add = new LinkedList<Object>();
- private List<Object> remove = new LinkedList<Object>();
- } //}}}
-
-}
+/*
+ * EditBus.java - The EditBus
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import java.awt.*;
+import java.lang.annotation.*;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
+import java.util.List;
+
+import org.gjt.sp.util.Log;
+
+/**
+ * jEdit's global event notification mechanism.<p>
+ *
+ * Plugins register with the EditBus to receive messages reflecting
+ * changes in the application's state, including changes in buffers,
+ * views and edit panes, changes in the set of properties maintained
+ * by the application, and the closing of the application.<p>
+ *
+ * The EditBus maintains a list of objects that have requested to receive
+ * messages. When a message is sent using this class, all registered
+ * components receive it in turn. Classes for objects that subscribe to
+ * the EditBus must implement the {@link EBComponent} interface, which
+ * defines the single method {@link EBComponent#handleMessage(EBMessage)}.<p>
+ *
+ * Alternatively, since jEdit4.3pre19, EditBus components can be any
+ * object. Handlers for EditBus messages are created by annotating
+ * methods with the {@link EBHandler} annotation. Such methods should
+ * expect a single parameter - an edit bus message of any desired type.
+ * If a message matching the type (or any of its super-types, unless the
+ * annotation requests exact type matching) is being sent, the annotated
+ * method will be called instead of the default {@link
+ * EBComponent#handleMessage(EBMessage)}. If a handler exists for a
+ * specific message type, the default handler will not be called.<p>
+ *
+ * A plugin core class that extends the
+ * {@link EBPlugin} abstract class (and whose name ends with
+ * <code>Plugin</code> for identification purposes) will automatically be
+ * added to the EditBus during jEdit's startup routine. Any other
+ * class - for example, a dockable window that needs to receive
+ * notification of buffer changes - must perform its own registration by calling
+ * {@link #addToBus(Object)} during its initialization.
+ * A convenient place to register in a class derived from <code>JComponent</code>
+ * would be in an implementation of the <code>JComponent</code> method
+ * <code>addNotify()</code>.<p>
+ *
+ * Message types sent by jEdit can be found in the
+ * {@link org.gjt.sp.jedit.msg} package.<p>
+ *
+ * Plugins can also send their own messages - any object can send a message to
+ * the EditBus by calling the static method {@link #send(EBMessage)}.
+ * Most plugins, however, only concern themselves with receiving, not
+ * sending, messages.
+ *
+ * @see org.gjt.sp.jedit.EBComponent
+ * @see org.gjt.sp.jedit.EBMessage
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: EditBus.java 18566 2010-09-15 09:07:34Z kpouer $
+ *
+ * @since jEdit 2.2pre6
+ */
+public class EditBus
+{
+
+ //{{{ EBHandler annotation
+ /**
+ * This annotation should be used in methods that are to be
+ * considered "edit bus message handlers". When registering
+ * an object using {@link #addToBus(Object)}, all methods
+ * tagged with this annotation will be considered as handlers
+ * for specific edit bus messages.<p>
+ *
+ * Each method should expect a single argument (an object of
+ * some type derived from EBMessage, inclusive). When
+ * delivering an EBMessage, the bus will search for and invoke
+ * all handlers matching the outgoing message type.<p>
+ *
+ * Since jEdit 4.4pre1, this annotation can also be added to
+ * classes extending EditPlugin. This will make the plugin
+ * be added to the bus automatically, similarly to how
+ * EBPlugin works, but without having to implement the
+ * EBComponent interface.
+ *
+ * @since jEdit 4.3pre19
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ElementType.TYPE, ElementType.METHOD})
+ public static @interface EBHandler
+ {
+ /**
+ * Whether the message should match the exact type of
+ * the parameter, instead of a compatible type.
+ */
+ boolean exact() default false;
+ } //}}}
+
+ //{{{ addToBus() method
+ /**
+ * Adds a component to the bus. It will receive all messages sent
+ * on the bus.
+ *
+ * @param comp The component to add
+ */
+ public static void addToBus(EBComponent comp)
+ {
+ addToBus((Object)comp);
+ } //}}}
+
+ //{{{ addToBus() method
+ /**
+ * Adds a component to the bus. Methods annotated with the
+ * {@link EBHandler} annotation found in the component will
+ * be used as EditBus message handlers if a message of a
+ * matching type is sent on the bus.<p>
+ *
+ * If the component implements {@link EBComponent}, then the
+ * {@link EBComponent#handleMessage(EBMessage)} method will be
+ * called for every message sent on the bus.
+ *
+ * @param comp The component to add
+ *
+ * @since jEdit 4.3pre19
+ */
+ public static void addToBus(Object comp)
+ {
+ components.addComponent(comp);
+ } //}}}
+
+ //{{{ removeFromBus() method
+ /**
+ * Removes a component from the bus.
+ * @param comp The component to remove
+ */
+ public static void removeFromBus(EBComponent comp)
+ {
+ removeFromBus((Object) comp);
+ } //}}}
+
+ //{{{ removeFromBus() method
+ /**
+ * Removes a component from the bus.
+ * @param comp The component to remove
+ * @since 4.3pre19
+ */
+ public static void removeFromBus(Object comp)
+ {
+ components.removeComponent(comp);
+ } //}}}
+
+ //{{{ getComponents() method
+ /**
+ * Returns an array of all components connected to the bus.
+ *
+ * @deprecated Don't use this method. It now returns an empty array.
+ */
+ @Deprecated
+ public static EBComponent[] getComponents()
+ {
+ return new EBComponent[0];
+ } //}}}
+
+ //{{{ send() method
+ /**
+ * Sends a message to all components on the bus in turn.
+ * The message is delivered to components in the AWT thread,
+ * and this method will wait until all handlers receive the
+ * message before returning.
+ *
+ * @param message The message
+ */
+ public static void send(EBMessage message)
+ {
+ Runnable sender = new SendMessage(message);
+
+ if (EventQueue.isDispatchThread())
+ {
+ sender.run();
+ return;
+ }
+
+ /*
+ * We can't throw any checked exceptions from this
+ * method. It will break all source that currently
+ * expects this method to not throw them. So we catch
+ * them and log them instead.
+ */
+ try
+ {
+ EventQueue.invokeAndWait(sender);
+ }
+ catch (InterruptedException ie)
+ {
+ Log.log(Log.ERROR, EditBus.class, ie);
+ }
+ catch (InvocationTargetException ite)
+ {
+ Log.log(Log.ERROR, EditBus.class, ite);
+ }
+ } //}}}
+
+ //{{{ sendAsync() method
+ /**
+ * Schedules a message to be sent on the edit bus as soon as
+ * the AWT thread is done processing current events. The
+ * method returns immediately (i.e., before the message is
+ * sent).
+ *
+ * @param message The message
+ *
+ * @since jEdit 4.4pre1
+ */
+ public static void sendAsync(EBMessage message)
+ {
+ EventQueue.invokeLater(new SendMessage(message));
+ } //}}}
+
+ //{{{ Private members
+ private static final HandlerList components = new HandlerList();
+
+ // can't create new instances
+ private EditBus() {}
+
+ //{{{ dispatch() method
+ private static void dispatch(EBMessageHandler emh,
+ EBMessage msg)
+ throws Exception
+ {
+ if (emh.handler != null)
+ emh.handler.invoke(emh.comp, msg);
+ else
+ {
+ assert (emh.comp instanceof EBComponent);
+ ((EBComponent)emh.comp).handleMessage(msg);
+ }
+ } //}}}
+
+ //{{{ sendImpl() method
+ private static void sendImpl(EBMessage message)
+ {
+ boolean isExact = true;
+ Class<?> type = message.getClass();
+ while (!type.equals(Object.class))
+ {
+ List<EBMessageHandler> handlers = components.get(type);
+ if (handlers != null)
+ {
+ try
+ {
+ for (EBMessageHandler emh : handlers)
+ {
+ if (!isExact &&
+ emh.source != null &&
+ emh.source.exact())
+ {
+ continue;
+ }
+ if(Debug.EB_TIMER)
+ {
+ long start = System.nanoTime();
+ dispatch(emh, message);
+ long time = System.nanoTime() - start;
+ if(time >= 1000000)
+ {
+ Log.log(Log.DEBUG,EditBus.class,emh.comp + ": " + time + " ns");
+ }
+ }
+ else
+ dispatch(emh, message);
+ }
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,EditBus.class,"Exception"
+ + " while sending message on EditBus:");
+ Log.log(Log.ERROR,EditBus.class,t);
+ }
+ }
+ type = type.getSuperclass();
+ isExact = false;
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ EBMessageHandler class
+ private static class EBMessageHandler
+ {
+
+ EBMessageHandler(Object comp,
+ Method handler,
+ EBHandler source)
+ {
+ this.comp = comp;
+ this.handler = handler;
+ this.source = source;
+ }
+
+ Object comp;
+ Method handler;
+ EBHandler source;
+ } //}}}
+
+ //{{{ HandlerList class
+ /**
+ * A "special" hash map that has some optimizations for use by
+ * the EditBus. Notably, it allows setting a "read only" mode
+ * where modifications to the map are postponed until the map
+ * is unlocked.
+ */
+ private static class HandlerList
+ extends HashMap<Class<?>, List<EBMessageHandler>>
+ {
+
+ public List<EBMessageHandler> safeGet(Class<?> type)
+ {
+ List<EBMessageHandler> lst = super.get(type);
+ if (lst == null) {
+ lst = new LinkedList<EBMessageHandler>();
+ super.put(type, lst);
+ }
+ return lst;
+ }
+
+
+ public synchronized void lock()
+ {
+ lock++;
+ }
+
+
+ public synchronized void unlock()
+ {
+ lock--;
+ if (lock == 0)
+ {
+ for (Object comp : add)
+ addComponent(comp);
+ for (Object comp : remove)
+ removeComponent(comp);
+ add.clear();
+ remove.clear();
+ }
+ }
+
+
+ public synchronized void removeComponent(Object comp)
+ {
+ if (lock != 0)
+ {
+ remove.add(comp);
+ return;
+ }
+
+ for (Map.Entry<Class<?>, List<EBMessageHandler>> entry: entrySet())
+ {
+ Class<?> msg = entry.getKey();
+ List<EBMessageHandler> handlers = entry.getValue();
+ if (handlers == null)
+ continue;
+ for (Iterator<EBMessageHandler> it = handlers.iterator();
+ it.hasNext(); )
+ {
+ EBMessageHandler emh = it.next();
+ if (emh.comp == comp)
+ it.remove();
+ }
+ }
+ }
+
+
+ public synchronized void addComponent(Object comp)
+ {
+ if (lock != 0)
+ {
+ add.add(comp);
+ return;
+ }
+
+ for (Method m : comp.getClass().getMethods())
+ {
+ EBHandler source = m.getAnnotation(EBHandler.class);
+ if (source == null)
+ continue;
+
+ Class[] params = m.getParameterTypes();
+
+ if (params.length != 1)
+ {
+ Log.log(Log.ERROR, EditBus.class,
+ "Invalid EBHandler method " + m.getName() +
+ " in class " + comp.getClass().getName() +
+ ": too many parameters.");
+ continue;
+ }
+
+ if (!EBMessage.class.isAssignableFrom(params[0]))
+ {
+ Log.log(Log.ERROR, EditBus.class,
+ "Invalid parameter " + params[0].getName() +
+ " in method " + m.getName() +
+ " of class " + comp.getClass().getName());
+ continue;
+ }
+
+ synchronized (components)
+ {
+ safeGet(params[0]).add(new EBMessageHandler(comp, m, source));
+ }
+ }
+
+ /*
+ * If the component implements EBComponent, then add the
+ * default handler for backwards compatibility.
+ */
+ if (comp instanceof EBComponent)
+ safeGet(EBMessage.class).add(new EBMessageHandler(comp, null, null));
+ }
+
+
+ private int lock;
+ private List<Object> add = new LinkedList<Object>();
+ private List<Object> remove = new LinkedList<Object>();
+ } //}}}
+
+ //{{{ SendMessage class
+ private static class SendMessage implements Runnable
+ {
+
+ public SendMessage(EBMessage message)
+ {
+ this.message = message;
+ }
+
+
+ public void run()
+ {
+ Log.log(Log.DEBUG,EditBus.class,message.toString());
+
+ components.lock();
+ try
+ {
+ sendImpl(message);
+ }
+ finally
+ {
+ components.unlock();
+ }
+ }
+
+ private EBMessage message;
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/EditPane.java b/jEdit/org/gjt/sp/jedit/EditPane.java
index c469c47..68f0add 100644
--- a/jEdit/org/gjt/sp/jedit/EditPane.java
+++ b/jEdit/org/gjt/sp/jedit/EditPane.java
@@ -1,1407 +1,1309 @@
-/*
- * EditPane.java - Text area and buffer switcher
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.FontMetrics;
-import java.awt.Graphics2D;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.swing.JPanel;
-import javax.swing.SwingUtilities;
-
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.bufferset.BufferSet;
-import org.gjt.sp.jedit.bufferset.BufferSetListener;
-import org.gjt.sp.jedit.bufferset.BufferSetManager;
-import org.gjt.sp.jedit.gui.BufferSwitcher;
-import org.gjt.sp.jedit.gui.StatusBar;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.msg.BufferChanging;
-import org.gjt.sp.jedit.msg.BufferUpdate;
-import org.gjt.sp.jedit.msg.EditPaneUpdate;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-import org.gjt.sp.jedit.options.GutterOptionPane;
-import org.gjt.sp.jedit.syntax.SyntaxStyle;
-import org.gjt.sp.jedit.textarea.AntiAlias;
-import org.gjt.sp.jedit.textarea.Gutter;
-import org.gjt.sp.jedit.textarea.GutterPopupHandler;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-import org.gjt.sp.jedit.textarea.MouseHandler;
-import org.gjt.sp.jedit.textarea.Selection;
-import org.gjt.sp.jedit.textarea.StatusListener;
-import org.gjt.sp.jedit.textarea.TextArea;
-import org.gjt.sp.jedit.textarea.TextAreaExtension;
-import org.gjt.sp.jedit.textarea.TextAreaPainter;
-import org.gjt.sp.jedit.textarea.TextAreaTransferHandler;
-import org.gjt.sp.util.SyntaxUtilities;
-
-//}}}
-
-/**
- * A panel containing a text area.<p>
- *
- * In a BeanShell script, you can obtain the current edit pane from the
- * <code>editPane</code> variable.<p>
- *
- *
- * Each View can have multiple editPanes, one is active at a time.
- * Each EditPane has a single JEditTextArea, and is operating on single buffer.
- * The EditPane also can switch buffers.
- *
- * This is the "controller" between a JEditTextArea (view) and a buffer (model).
- *
- * This class does not have a public constructor.
- * Edit panes can be created and destroyed using methods in the
- * {@link View} class.<p>
- *
- *
- * @see View#splitHorizontally()
- * @see View#splitVertically()
- * @see View#unsplitCurrent()
- * @see View#unsplit()
- * @see View#getEditPane()
- * @see View#getEditPanes()
- *
- * @author Slava Pestov
- * @version $Id: EditPane.java 17498 2010-03-19 17:20:31Z kpouer $
- */
-public class EditPane extends JPanel implements EBComponent, BufferSetListener
-{
- //{{{ getView() method
- /**
- * Returns the view containing this edit pane.
- * @return the view that contains this EditPane
- * @since jEdit 2.5pre2
- */
- public View getView()
- {
- return view;
- } //}}}
-
- // {{{ get(TextArea) method
- /**
- * Returns the EditPane of a TextArea.
- *
- * @param ta the textArea
- * @return the EditPane containing the TextArea.
- */
- public static EditPane get(TextArea ta)
- {
- if (ta == null) return null;
- return (EditPane)SwingUtilities.getAncestorOfClass(EditPane.class, ta);
- } // }}}
-
- //{{{ getBuffer() method
- /**
- * Returns the current buffer.
- * @return the current buffer
- * @since jEdit 2.5pre2
- */
- public Buffer getBuffer()
- {
- return buffer;
- } //}}}
-
- //{{{ setBuffer() methods
- /**
- * Sets the current buffer.
- * @param buffer The buffer to edit.
- * @since jEdit 2.5pre2
- */
- public void setBuffer(Buffer buffer)
- {
- setBuffer(buffer, true);
- }
-
- /**
- * Sets the current buffer.
- * @param buffer The buffer to edit.
- * @param requestFocus true if the textarea should request focus, false otherwise
- * @since jEdit 4.3pre6
- */
- public void setBuffer(final Buffer buffer, boolean requestFocus)
- {
-
- if(buffer == null)
- throw new NullPointerException();
-
- if(this.buffer == buffer)
- return;
-
- if (bufferSet.indexOf(buffer) == -1)
- {
- jEdit.getBufferSetManager().addBuffer(this, buffer);
- }
- //if(buffer.insideCompoundEdit())
- // buffer.endCompoundEdit();
- EditBus.send(new BufferChanging(this, buffer));
- if (bufferSet.indexOf(this.buffer) != -1)
- {
- // when closing the last buffer of a bufferSet, the current buffer will still be the closed
- // buffer until a new empty buffer is created.
- // So if the current buffer is not anymore in the bufferSet, do not set the recentBuffer
- recentBuffer = this.buffer;
- }
- if(recentBuffer != null)
- saveCaretInfo();
- this.buffer = buffer;
-
- textArea.setBuffer(buffer);
-
- if(!init)
- {
- view.updateTitle();
-
- if(bufferSwitcher != null)
- {
- if(bufferSwitcher.getSelectedItem() != buffer)
- bufferSwitcher.setSelectedItem(buffer);
- bufferSwitcher.setToolTipText(buffer.getPath());
- }
-
- EditBus.send(new EditPaneUpdate(this,EditPaneUpdate
- .BUFFER_CHANGED));
- }
-
- if (requestFocus)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- // only do this if we are the current edit pane
- if(view.getEditPane() == EditPane.this
- && (bufferSwitcher == null
- || !bufferSwitcher.isPopupVisible()))
- {
- textArea.requestFocus();
- }
- }
- });
- }
-
- // Only do this after all I/O requests are complete
- Runnable runnable = new Runnable()
- {
- public void run()
- {
- // avoid a race condition
- // see bug #834338
- if(buffer == getBuffer())
- loadCaretInfo();
- }
- };
-
- if(buffer.isPerformingIO())
- VFSManager.runInAWTThread(runnable);
- else
- runnable.run();
- } //}}}
-
- //{{{ prevBuffer() method
- /**
- * Selects the previous buffer.
- * @since jEdit 2.7pre2
- */
- public void prevBuffer()
- {
- Buffer buffer = bufferSet.getPreviousBuffer(bufferSet.indexOf(this.buffer));
- setBuffer(buffer);
- } //}}}
-
- //{{{ nextBuffer() method
- /**
- * Selects the next buffer.
- * @since jEdit 2.7pre2
- */
- public void nextBuffer()
- {
- Buffer buffer = bufferSet.getNextBuffer(bufferSet.indexOf(this.buffer));
- setBuffer(buffer);
- } //}}}
-
- //{{{ recentBuffer() method
- /**
- * Selects the most recently edited buffer.
- * @since jEdit 2.7pre2
- */
- public void recentBuffer()
- {
- if(recentBuffer != null)
- setBuffer(recentBuffer);
- else
- getToolkit().beep();
- } //}}}
-
- //{{{ focusOnTextArea() method
- /**
- * Sets the focus onto the text area.
- * @since jEdit 2.5pre2
- */
- public void focusOnTextArea()
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- textArea.requestFocus();
- }
- });
- } //}}}
-
- //{{{ getTextArea() method
- /**
- * Returns the view's text area.
- * @return the text area of the edit pane
- * @since jEdit 2.5pre2
- */
- public JEditTextArea getTextArea()
- {
- return textArea;
- } //}}}
-
- //{{{ getBufferSwitcher() method
- /**
- * Returns the buffer switcher combo box instance.
- * @return the buffer switcher (it can be null)
- * @since jEdit 4.1pre8
- */
- public BufferSwitcher getBufferSwitcher()
- {
- return bufferSwitcher;
- } //}}}
-
- //{{{ focusBufferSwitcher() method
- /**
- * Pops up and focuses on the buffer switcher combo box.
- * @since jEdit 4.3pre18
- * (previously known as showBufferSwitcher)
- */
- public void focusBufferSwitcher()
- {
- if(bufferSwitcher == null)
- getToolkit().beep();
- else
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- bufferSwitcher.requestFocus();
- bufferSwitcher.showPopup();
- }
-
- });
- }
- } //}}}
-
- //{{{ saveCaretInfo() method
- /**
- * Saves the caret information to the current buffer.
- * @since jEdit 2.5pre2
- */
- public void saveCaretInfo()
- {
- if(!buffer.isLoaded())
- return;
-
- buffer.setIntegerProperty(Buffer.CARET,
- textArea.getCaretPosition());
-
- CaretInfo caretInfo = caretsForPath.get(buffer.getPath());
- if (caretInfo == null)
- {
- caretInfo = new CaretInfo();
- caretsForPath.put(buffer.getPath(), caretInfo);
- }
- caretInfo.caret = textArea.getCaretPosition();
-
-
- Selection[] selection = textArea.getSelection();
- for(int i = 0; i < selection.length; i++)
- selection[i] = (Selection)selection[i].clone();
- buffer.setProperty(Buffer.SELECTION,selection);
- caretInfo.selection = selection;
-
- caretInfo.rectangularSelection = textArea.isRectangularSelectionEnabled();
- caretInfo.multipleSelection = textArea.isMultipleSelectionEnabled();
-
- buffer.setIntegerProperty(Buffer.SCROLL_VERT,
- textArea.getFirstPhysicalLine());
- caretInfo.scrollVert = textArea.getFirstPhysicalLine();
- buffer.setIntegerProperty(Buffer.SCROLL_HORIZ,
- textArea.getHorizontalOffset());
- caretInfo.scrollHoriz = textArea.getHorizontalOffset();
- if (!buffer.isUntitled())
- {
- BufferHistory.setEntry(buffer.getPath(), textArea.getCaretPosition(),
- (Selection[])buffer.getProperty(Buffer.SELECTION),
- buffer.getStringProperty(JEditBuffer.ENCODING),
- buffer.getMode().getName());
- }
- } //}}}
-
- //{{{ loadCaretInfo() method
- /**
- * Loads the caret and selection information from this EditPane, fall
- * back to the information from the current buffer if none is already
- * in this EditPane.
- * @since jEdit 2.5pre2
- */
- public void loadCaretInfo()
- {
- // get our internal map of buffer -> CaretInfo since there might
- // be current info already
- CaretInfo caretInfo = caretsForPath.get(buffer.getPath());
- if (caretInfo == null)
- {
- caretInfo = new CaretInfo();
- }
-
- // set the position of the caret itself.
- // Caret position could be stored in the internal map already,
- // if so, use that one first. Otherwise, fall back to any
- // previously saved caret position that was stored in the
- // buffer properties.
- int caret = caretInfo.caret;
- if (caret == -1 || buffer.getBooleanProperty(Buffer.CARET_POSITIONED))
- {
- Integer i = (Integer) buffer.getProperty(Buffer.CARET);
- caret = i == null ? -1 : i;
- }
- buffer.unsetProperty(Buffer.CARET_POSITIONED);
-
-
- if(caret != -1)
- textArea.setCaretPosition(Math.min(caret,
- buffer.getLength()));
-
- // set any selections
- Selection[] selection = caretInfo.selection;
- if ( selection == null )
- {
- selection = (Selection[]) buffer.getProperty(Buffer.SELECTION);
- }
- if(selection != null)
- {
- for(int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- int max = buffer.getLength();
- if(s.getStart() > max || s.getEnd() > max)
- selection[i] = null;
- }
- }
- textArea.setSelection(selection);
- textArea.setRectangularSelectionEnabled(caretInfo.rectangularSelection);
- textArea.setMultipleSelectionEnabled(caretInfo.multipleSelection);
- // set firstLine value
- int firstLine = caretInfo.scrollVert;
- if ( firstLine == -1 )
- {
- Integer i = (Integer) buffer.getProperty(Buffer.SCROLL_VERT);
- firstLine = i == null ? -1 : i;
- }
-
- if(firstLine != -1)
- textArea.setFirstPhysicalLine(firstLine);
-
- // set horizontal offset
- int horizontalOffset = caretInfo.scrollHoriz;
- if (horizontalOffset == -1)
- {
- Integer i = (Integer) buffer.getProperty(Buffer.SCROLL_HORIZ);
- horizontalOffset = i == null ? -1 : i;
- }
-
- if(horizontalOffset != -1)
- textArea.setHorizontalOffset(horizontalOffset);
-
- /* Silly bug workaround #8694. If you look at the above code,
- * note that we restore the saved caret position first, then
- * scroll to the saved location. However, the caret changing
- * can itself result in scrolling to a different location than
- * what was saved; and since moveCaretPosition() calls
- * updateBracketHighlight(), the bracket highlight's out of
- * bounds calculation will rely on a different set of physical
- * first/last lines than what we will end up with eventually.
- * Instead of confusing the user with status messages that
- * appear at random when switching buffers, we simply hide the
- * message altogether. */
- view.getStatus().setMessage(null);
- } //}}}
-
- //{{{ bufferRenamed() method
- /**
- * This method should be called by the Buffer when the path is changing.
- * @param oldPath the old path of the buffer
- * @param newPath the new path of the buffer
- */
- void bufferRenamed(String oldPath, String newPath)
- {
- CaretInfo caretInfo = caretsForPath.remove(oldPath);
- if (caretInfo != null)
- caretsForPath.put(newPath, caretInfo);
-
- } //}}}
-
- //{{{ CaretInfo class
- /**
- * Need to track this info for each buffer that this EditPane might edit
- * since a buffer may be open in more than one EditPane at a time. That
- * means we need to track this info at the EditPane level rather than
- * the buffer level.
- */
- private static class CaretInfo
- {
- public int caret = -1;
- public Selection[] selection;
- public int scrollVert = -1;
- public int scrollHoriz = -1;
- public boolean rectangularSelection;
- public boolean multipleSelection;
- } //}}}
-
- //{{{ goToNextMarker() method
- /**
- * Moves the caret to the next marker.
- * @since jEdit 4.3pre3
- */
- public void goToNextMarker(boolean select)
- {
- java.util.List<Marker> markers = buffer.getMarkers();
- if(markers.isEmpty())
- {
- getToolkit().beep();
- return;
- }
-
- Marker marker = null;
-
- int caret = textArea.getCaretPosition();
-
- for(int i = 0; i < markers.size(); i++)
- {
- Marker _marker = markers.get(i);
- if(_marker.getPosition() > caret)
- {
- marker = _marker;
- break;
- }
- }
- // the markers list is not empty at this point
- if(marker == null)
- marker = markers.get(0);
-
- if(select)
- textArea.extendSelection(caret,marker.getPosition());
- else if(!textArea.isMultipleSelectionEnabled())
- textArea.selectNone();
- textArea.moveCaretPosition(marker.getPosition());
- } //}}}
-
- //{{{ goToPrevMarker() method
- /**
- * Moves the caret to the previous marker.
- * @since jEdit 2.7pre2
- */
- public void goToPrevMarker(boolean select)
- {
- java.util.List<Marker> markers = buffer.getMarkers();
- if(markers.isEmpty())
- {
- getToolkit().beep();
- return;
- }
-
- int caret = textArea.getCaretPosition();
-
- Marker marker = null;
- for(int i = markers.size() - 1; i >= 0; i--)
- {
- Marker _marker = markers.get(i);
- if(_marker.getPosition() < caret)
- {
- marker = _marker;
- break;
- }
- }
-
- if(marker == null)
- marker = markers.get(markers.size() - 1);
-
- if(select)
- textArea.extendSelection(caret,marker.getPosition());
- else if(!textArea.isMultipleSelectionEnabled())
- textArea.selectNone();
- textArea.moveCaretPosition(marker.getPosition());
- } //}}}
-
- //{{{ goToMarker() method
- /**
- * Moves the caret to the marker with the specified shortcut.
- * @param shortcut The shortcut
- * @param select True if the selection should be extended,
- * false otherwise
- * @since jEdit 3.2pre2
- */
- public void goToMarker(char shortcut, boolean select)
- {
- Marker marker = buffer.getMarker(shortcut);
- if(marker == null)
- {
- getToolkit().beep();
- return;
- }
-
- int pos = marker.getPosition();
-
- if(select)
- textArea.extendSelection(textArea.getCaretPosition(),pos);
- else if(!textArea.isMultipleSelectionEnabled())
- textArea.selectNone();
- textArea.moveCaretPosition(pos);
- } //}}}
-
- //{{{ addMarker() method
- /**
- * Adds a marker at the caret position.
- * @since jEdit 3.2pre1
- */
- public void addMarker()
- {
- int caretLine = textArea.getCaretLine();
-
- // always add markers on selected lines
- Selection[] selection = textArea.getSelection();
- for(int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- int startLine = s.getStartLine();
- if(startLine != s.getEndLine() && startLine != caretLine)
- {
- buffer.addMarker('\0',s.getStart());
- }
-
- if(s.getEndLine() != caretLine)
- buffer.addMarker('\0',s.getEnd());
- }
-
- // toggle marker on caret line
- buffer.addOrRemoveMarker('\0',textArea.getCaretPosition());
- } //}}}
-
- //{{{ swapMarkerAndCaret() method
- /**
- * Moves the caret to the marker with the specified shortcut,
- * then sets the marker position to the former caret position.
- * @param shortcut The shortcut
- * @since jEdit 3.2pre2
- */
- public void swapMarkerAndCaret(char shortcut)
- {
- Marker marker = buffer.getMarker(shortcut);
- if(marker == null)
- {
- getToolkit().beep();
- return;
- }
-
- int caret = textArea.getCaretPosition();
-
- textArea.setCaretPosition(marker.getPosition());
- buffer.addMarker(shortcut,caret);
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof PropertiesChanged)
- {
- propertiesChanged();
- loadBufferSwitcher();
- }
- else if(msg instanceof BufferUpdate)
- handleBufferUpdate((BufferUpdate)msg);
- } //}}}
-
- //{{{ getMinimumSize() method
- /**
- * Returns 0,0 for split pane compatibility.
- */
- @Override
- public final Dimension getMinimumSize()
- {
- return new Dimension(0,0);
- } //}}}
-
- //{{{ getBufferSet() method
- /**
- * Returns the current buffer set.
- * This can be changed by setBufferSetScope().
- * @return the buffer set which is currently used by this EditPane
- * @since jEdit 4.3pre17
- */
- public BufferSet getBufferSet()
- {
- return bufferSet;
- } //}}}
-
- //{{{ getBufferSetScope() method
- /**
- * Get the current scope of bufferSet.
- * @since jEdit 4.3pre17
- */
- public BufferSet.Scope getBufferSetScope()
- {
- return bufferSetScope;
- } //}}}
-
- //{{{ setBufferSetScope() methods
- /**
- * Set the scope of bufferSet for the EditPane.
- * @param scope the new scope
- * @since jEdit 4.3pre17
- */
- public void setBufferSetScope(BufferSet.Scope scope)
- {
- if (this.bufferSetScope != scope)
- {
- BufferSet oldBufferSet = this.bufferSet;
- BufferSet newBufferSet;
- switch (scope)
- {
- case editpane:
- newBufferSet = new BufferSet();
- break;
- case view:
- newBufferSet = view.getLocalBufferSet();
- break;
- default:
- scope = BufferSet.Scope.global;
- case global:
- newBufferSet = jEdit.getGlobalBufferSet();
- break;
- }
-
- BufferSetManager bufferSetManager = jEdit.getBufferSetManager();
-
- if (jEdit.isStartupDone()) // Ignore "new buffersets contain:" option when loading perspective
- {
- String action = jEdit.getProperty("editpane.bufferset.new");
- BufferSetManager.NewBufferSetAction bufferSetAction = BufferSetManager.NewBufferSetAction.fromString(action);
- View activeView = jEdit.getActiveView();
- switch (bufferSetAction)
- {
- case copy:
- if (oldBufferSet == null)
- {
- EditPane editPane = view.getEditPane();
- if (editPane == null)
- {
- if (activeView != null)
- editPane = activeView.getEditPane();
-
- }
- if (editPane == null)
- {
- bufferSetManager.addAllBuffers(newBufferSet);
- }
- else
- {
- bufferSetManager.mergeBufferSet(newBufferSet, editPane.bufferSet);
- }
- }
- else
- bufferSetManager.mergeBufferSet(newBufferSet, oldBufferSet);
- break;
- case empty:
- break;
- case currentbuffer:
- if (activeView == null)
- break;
- EditPane editPane = activeView.getEditPane();
- Buffer buffer = editPane.getBuffer();
- bufferSetManager.addBuffer(newBufferSet,buffer);
- break;
- }
- }
- if (buffer != null)
- bufferSetManager.addBuffer(newBufferSet, buffer);
-
-
- this.bufferSet = newBufferSet;
- this.bufferSetScope = scope;
- if (newBufferSet.size() == 0)
- {
- jEdit.newFile(this);
- }
-
- // This must be after updating this.bufferSet since
- // removeBufferSetListener() uses
- // EditPane#getBufferSet() on this EditPane.
- if (oldBufferSet != null)
- {
- oldBufferSet.removeBufferSetListener(this);
- }
-
- newBufferSet.addBufferSetListener(this);
- if (bufferSwitcher != null)
- {
- bufferSwitcher.updateBufferList();
- }
- EditBus.send(new EditPaneUpdate(this, EditPaneUpdate.BUFFERSET_CHANGED));
- if (newBufferSet.indexOf(recentBuffer) == -1)
- {
- // the recent buffer is not in the bufferSet
- recentBuffer = null;
- }
- if (newBufferSet.indexOf(buffer) == -1)
- {
- // the current buffer is not contained in the bufferSet, we must change the current buffer
- if (recentBuffer != null)
- setBuffer(recentBuffer);
- else
- {
- setBuffer(newBufferSet.getBuffer(0));
- }
- }
- if (jEdit.isStartupDone()) // Do not mark perspective dirty on startup
- PerspectiveManager.setPerspectiveDirty(true);
- }
- } //}}}
-
- //{{{ bufferAdded() method
- /**
- * A buffer was added in the bufferSet.
- * @param buffer the added buffer
- * @param index the position where it was added
- * @since jEdit 4.3pre15
- */
- public void bufferAdded(Buffer buffer, int index)
- {
- if (buffer == null)
- return;
- if (bufferSwitcher != null)
- bufferSwitcher.updateBufferList();
- if (bufferSet.indexOf(this.buffer) == -1)
- {
- // it happens when having 1 untitled buffer if I open a file. The untitled buffer
- // is closed but the new buffer is not yet opened
- setBuffer(buffer);
- }
- } //}}}
-
- //{{{ bufferRemoved() method
- /**
- * A buffer was removed from the bufferSet.
- * @param buffer the removed buffer
- * @param index the position where it was before being removed
- * @since jEdit 4.3pre15
- */
- public void bufferRemoved(Buffer buffer, int index)
- {
- if (buffer.isUntitled())
- {
- // the buffer was a new file so I do not need to keep it's informations
- caretsForPath.remove(buffer.getPath());
- }
- if (buffer == this.buffer)
- {
- // The closed buffer is the current buffer
- Buffer newBuffer = recentBuffer != null ?
- recentBuffer : bufferSet.getPreviousBuffer(index);
-
- if(newBuffer != null && !newBuffer.isClosed())
- {
- setBuffer(newBuffer);
- if (bufferSet.size() > 1)
- {
- recentBuffer = bufferSet.getPreviousBuffer(index -1);
- }
- }
- else if(bufferSet.size() != 0)
- {
- setBuffer(bufferSet.getBuffer(0));
- recentBuffer = null;
- }
- }
- if(buffer == recentBuffer)
- recentBuffer = null;
- if (bufferSwitcher != null)
- bufferSwitcher.updateBufferList();
- } //}}}
-
- //{{{ bufferMoved() method
- /**
- * A buffer was moved in the BufferSet.
- * @param buffer the moved buffer
- * @param oldIndex the position it was before
- * @param newIndex the new position
- * @since jEdit 4.3pre15
- */
- public void bufferMoved(Buffer buffer, int oldIndex, int newIndex)
- {
- if (bufferSwitcher != null)
- bufferSwitcher.updateBufferList();
- } //}}}
-
- //{{{ bufferSetSorted() method
- /**
- * The bufferSet was sorted
- * @since jEdit 4.3pre16
- */
- public void bufferSetSorted()
- {
- if (bufferSwitcher != null)
- bufferSwitcher.updateBufferList();
- } //}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- return getClass().getName() + '['
- + (view.getEditPane() == this
- ? "active" : "inactive")
- + ',' + bufferSetScope + ']';
- } //}}}
-
- //{{{ Package-private members
-
- //{{{ EditPane constructor
- EditPane(View view, Buffer buffer, BufferSet.Scope scope)
- {
- super(new BorderLayout());
-
- init = true;
-
- this.view = view;
-
-
- textArea = new JEditTextArea(view);
- textArea.getPainter().setAntiAlias(new AntiAlias(jEdit.getProperty("view.antiAlias")));
- textArea.setMouseHandler(new MouseHandler(textArea));
- textArea.setTransferHandler(new TextAreaTransferHandler());
- markerHighlight = new MarkerHighlight();
- Gutter gutter = textArea.getGutter();
- gutter.setGutterEnabled(GutterOptionPane.isGutterEnabled());
- gutter.setMinLineNumberDigitCount(GutterOptionPane.getMinLineNumberDigits());
- gutter.setSelectionAreaEnabled(GutterOptionPane.isSelectionAreaEnabled());
- gutter.addExtension(markerHighlight);
- gutter.setSelectionPopupHandler(
- new GutterPopupHandler()
- {
- public void handlePopup(int x, int y, int line)
- {
- Buffer buffer = getBuffer();
- buffer.addOrRemoveMarker('\0',
- buffer.getLineStartOffset(line));
- }
- });
-
- textArea.addStatusListener(new StatusHandler());
- add(BorderLayout.CENTER,textArea);
-
- propertiesChanged();
- this.buffer = buffer;
- setBufferSetScope(scope);
- this.buffer = null;
- if(buffer == null)
- {
- setBuffer(jEdit.getFirstBuffer());
- }
- else
- setBuffer(buffer);
-
- loadBufferSwitcher();
-
- init = false;
- EditBus.addToBus(this);
- } //}}}
-
- //{{{ close() method
- void close()
- {
- saveCaretInfo();
- EditBus.send(new EditPaneUpdate(this,EditPaneUpdate.DESTROYED));
- bufferSet.removeBufferSetListener(this);
- EditBus.removeFromBus(this);
- textArea.dispose();
- } //}}}
-
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private boolean init;
- /** The View where the edit pane is. */
- private final View view;
-
- private BufferSet bufferSet;
- private BufferSet.Scope bufferSetScope;
-
- /** The current buffer. */
- private Buffer buffer;
- private Buffer recentBuffer;
- private BufferSwitcher bufferSwitcher;
-
- /** The textArea inside the edit pane. */
- private final JEditTextArea textArea;
- private final MarkerHighlight markerHighlight;
-
- // A map of buffer.getPath() -> CaretInfo. This is necessary for
- // when the same buffer is open in more than one EditPane and the user
- // is switching between buffers. We want to keep the caret in the
- // right position in each EditPane, which won't be the case if we
- // just use the buffer caret property.
- private final Map<String, CaretInfo> caretsForPath = new HashMap<String, CaretInfo>();
-
- //}}}
-
- //{{{ propertiesChanged() method
- private void propertiesChanged()
- {
- TextAreaPainter painter = textArea.getPainter();
-
- initPainter(painter);
- Gutter gutter = textArea.getGutter();
- gutter.setExpanded(jEdit.getBooleanProperty(
- "view.gutter.lineNumbers"));
- int interval = jEdit.getIntegerProperty(
- "view.gutter.highlightInterval",5);
- gutter.setHighlightInterval(interval);
- gutter.setCurrentLineHighlightEnabled(jEdit.getBooleanProperty(
- "view.gutter.highlightCurrentLine"));
- gutter.setStructureHighlightEnabled(jEdit.getBooleanProperty(
- "view.gutter.structureHighlight"));
- gutter.setStructureHighlightColor(
- jEdit.getColorProperty("view.gutter.structureHighlightColor"));
- gutter.setBackground(
- jEdit.getColorProperty("view.gutter.bgColor"));
- gutter.setForeground(
- jEdit.getColorProperty("view.gutter.fgColor"));
- gutter.setHighlightedForeground(
- jEdit.getColorProperty("view.gutter.highlightColor"));
- gutter.setFoldColor(
- jEdit.getColorProperty("view.gutter.foldColor"));
- markerHighlight.setMarkerHighlightColor(
- jEdit.getColorProperty("view.gutter.markerColor"));
- markerHighlight.setMarkerHighlightEnabled(jEdit.getBooleanProperty(
- "view.gutter.markerHighlight"));
- gutter.setCurrentLineForeground(
- jEdit.getColorProperty("view.gutter.currentLineColor"));
- String alignment = jEdit.getProperty(
- "view.gutter.numberAlignment");
- if ("right".equals(alignment))
- {
- gutter.setLineNumberAlignment(Gutter.RIGHT);
- }
- else if ("center".equals(alignment))
- {
- gutter.setLineNumberAlignment(Gutter.CENTER);
- }
- else // left == default case
- {
- gutter.setLineNumberAlignment(Gutter.LEFT);
- }
-
- gutter.setFont(jEdit.getFontProperty("view.gutter.font"));
- gutter.setGutterEnabled(GutterOptionPane.isGutterEnabled());
- gutter.setMinLineNumberDigitCount(
- GutterOptionPane.getMinLineNumberDigits());
- gutter.setSelectionAreaEnabled(
- GutterOptionPane.isSelectionAreaEnabled());
- gutter.setSelectionAreaBackground(
- GutterOptionPane.getSelectionAreaBackground());
- gutter.setSelectionAreaWidth(
- GutterOptionPane.getSelectionAreaWidth());
-
- int width = jEdit.getIntegerProperty(
- "view.gutter.borderWidth",3);
- gutter.setBorder(width,
- jEdit.getColorProperty("view.gutter.focusBorderColor"),
- jEdit.getColorProperty("view.gutter.noFocusBorderColor"),
- textArea.getPainter().getBackground());
- gutter.setFoldPainter(textArea.getFoldPainter());
-
- textArea.setCaretBlinkEnabled(jEdit.getBooleanProperty(
- "view.caretBlink"));
-
- textArea.setElectricScroll(jEdit.getIntegerProperty(
- "view.electricBorders",0));
-
- // Set up the right-click popup menu
- textArea.createPopupMenu(null);
-
- // use old property name for backwards compatibility
- textArea.setQuickCopyEnabled(jEdit.getBooleanProperty(
- "view.middleMousePaste"));
-
- textArea.setDragEnabled(jEdit.getBooleanProperty(
- "view.dragAndDrop"));
-
- textArea.setJoinNonWordChars(jEdit.getBooleanProperty(
- "view.joinNonWordChars"));
-
- textArea.setCtrlForRectangularSelection(jEdit.getBooleanProperty(
- "view.ctrlForRectangularSelection"));
-
- textArea.propertiesChanged();
-
- if (bufferSwitcher != null)
- {
- bufferSwitcher.setMaximumRowCount(jEdit.getIntegerProperty(
- "bufferSwitcher.maxRowCount",10));
- }
- } //}}}
-
- //{{{ initPainter() method
- /**
- * Init the painter of a textarea.
- *
- * @param painter the painter of a textarea
- * @since jEdit 4.3pre12
- */
- public static void initPainter(TextAreaPainter painter)
- {
- painter.setFont(jEdit.getFontProperty("view.font"));
- painter.setStructureHighlightEnabled(jEdit.getBooleanProperty(
- "view.structureHighlight"));
- painter.setStructureHighlightColor(
- jEdit.getColorProperty("view.structureHighlightColor"));
- painter.setEOLMarkersPainted(jEdit.getBooleanProperty(
- "view.eolMarkers"));
- painter.setEOLMarkerColor(
- jEdit.getColorProperty("view.eolMarkerColor"));
- painter.setWrapGuidePainted(jEdit.getBooleanProperty(
- "view.wrapGuide"));
- painter.setWrapGuideColor(
- jEdit.getColorProperty("view.wrapGuideColor"));
- painter.setCaretColor(
- jEdit.getColorProperty("view.caretColor"));
- painter.setSelectionColor(
- jEdit.getColorProperty("view.selectionColor"));
- painter.setMultipleSelectionColor(
- jEdit.getColorProperty("view.multipleSelectionColor"));
- painter.setBackground(
- jEdit.getColorProperty("view.bgColor"));
- painter.setForeground(
- jEdit.getColorProperty("view.fgColor"));
- painter.setBlockCaretEnabled(jEdit.getBooleanProperty(
- "view.blockCaret"));
- painter.setThickCaretEnabled(jEdit.getBooleanProperty(
- "view.thickCaret"));
- painter.setLineHighlightEnabled(jEdit.getBooleanProperty(
- "view.lineHighlight"));
- painter.setLineHighlightColor(
- jEdit.getColorProperty("view.lineHighlightColor"));
- painter.setAntiAlias(new AntiAlias(jEdit.getProperty("view.antiAlias")));
- painter.setFractionalFontMetricsEnabled(jEdit.getBooleanProperty(
- "view.fracFontMetrics"));
-
- String defaultFont = jEdit.getProperty("view.font");
- int defaultFontSize = jEdit.getIntegerProperty("view.fontsize",12);
- painter.setStyles(SyntaxUtilities.loadStyles(defaultFont,defaultFontSize));
-
- SyntaxStyle[] foldLineStyle = new SyntaxStyle[4];
- for(int i = 0; i <= 3; i++)
- {
- foldLineStyle[i] = GUIUtilities.parseStyle(
- jEdit.getProperty("view.style.foldLine." + i),
- defaultFont,defaultFontSize);
- }
- painter.setFoldLineStyle(foldLineStyle);
- } //}}}
-
- //{{{ loadBufferSwitcher() method
- void loadBufferSwitcher()
- {
- if(jEdit.getBooleanProperty("view.showBufferSwitcher"))
- {
- if(bufferSwitcher == null)
- {
- bufferSwitcher = new BufferSwitcher(this);
- add(BorderLayout.NORTH,bufferSwitcher);
- bufferSwitcher.updateBufferList();
- revalidate();
- }
- }
- else if(bufferSwitcher != null)
- {
- remove(bufferSwitcher);
- revalidate();
- bufferSwitcher = null;
- }
- } //}}}
-
- //{{{ handleBufferUpdate() method
- private void handleBufferUpdate(BufferUpdate msg)
- {
- Buffer _buffer = msg.getBuffer();
- if(msg.getWhat() == BufferUpdate.CREATED)
- {
- if(bufferSwitcher != null)
- bufferSwitcher.updateBufferList();
-
- /* When closing the last buffer, the BufferUpdate.CLOSED
- * handler doesn't call setBuffer(), because null buffers
- * are not supported. Instead, it waits for the subsequent
- * 'Untitled' file creation. */
- if(buffer.isClosed())
- {
- // since recentBuffer will be set to the one that
- // was closed
- recentBuffer = null;
- }
- }
- else if(msg.getWhat() == BufferUpdate.CLOSED)
- {
- if(bufferSwitcher != null)
- bufferSwitcher.updateBufferList();
-
- if(_buffer == buffer)
- {
- // The closed buffer is the current buffer
- Buffer newBuffer = recentBuffer != null ?
- recentBuffer : _buffer.getPrev();
-
- if(newBuffer != null && !newBuffer.isClosed())
- {
- setBuffer(newBuffer);
- recentBuffer = newBuffer.getPrev();
- }
- }
- else if(_buffer == recentBuffer)
- recentBuffer = null;
-
- Buffer closedBuffer = msg.getBuffer();
- if (closedBuffer.isUntitled())
- {
- // the buffer was a new file so I do not need to keep it's informations
- caretsForPath.remove(closedBuffer.getPath());
- }
- }
- else if(msg.getWhat() == BufferUpdate.LOAD_STARTED)
- {
- if(_buffer == buffer)
- {
- textArea.setCaretPosition(0);
- textArea.getPainter().repaint();
- }
- }
- else if(msg.getWhat() == BufferUpdate.LOADED)
- {
- if(_buffer == buffer)
- {
- textArea.repaint();
- if(bufferSwitcher != null)
- bufferSwitcher.updateBufferList();
-
- if(view.getEditPane() == this)
- {
- StatusBar status = view.getStatus();
- status.updateCaretStatus();
- status.updateBufferStatus();
- status.updateMiscStatus();
- }
-
- loadCaretInfo();
- }
-
- }
- else if(msg.getWhat() == BufferUpdate.DIRTY_CHANGED)
- {
- if(_buffer == buffer && bufferSwitcher != null)
- {
- if(buffer.isDirty())
- bufferSwitcher.repaint();
- else
- bufferSwitcher.updateBufferList();
- }
- }
- else if(msg.getWhat() == BufferUpdate.MARKERS_CHANGED)
- {
- if(_buffer == buffer)
- textArea.getGutter().repaint();
- }
- else if(msg.getWhat() == BufferUpdate.PROPERTIES_CHANGED)
- {
- if(_buffer == buffer && buffer.isLoaded())
- {
- textArea.propertiesChanged();
- if(view.getEditPane() == this)
- view.getStatus().updateBufferStatus();
- }
- }
- else if(msg.getWhat() == BufferUpdate.SAVED && _buffer == buffer)
- {
- textArea.propertiesChanged();
- }
- } //}}}
-
- //}}}
-
- //{{{ StatusHandler class
- class StatusHandler implements StatusListener
- {
- public void statusChanged(org.gjt.sp.jedit.textarea.TextArea textArea, int flag, boolean value)
- {
- StatusBar status = view.getStatus();
- if(status == null)
- return;
-
- switch(flag)
- {
- case OVERWRITE_CHANGED:
- status.setMessageAndClear(
- jEdit.getProperty("view.status.overwrite-changed",
- new Integer[] { value ? 1 : 0 }));
- break;
- case MULTI_SELECT_CHANGED:
- status.setMessageAndClear(
- jEdit.getProperty("view.status.multi-changed",
- new Integer[] { value ? 1 : 0 }));
- break;
- case RECT_SELECT_CHANGED:
- status.setMessageAndClear(
- jEdit.getProperty("view.status.rect-select-changed",
- new Integer[] { value ? 1 : 0 }));
- break;
- }
-
- status.updateMiscStatus();
- }
-
- public void bracketSelected(org.gjt.sp.jedit.textarea.TextArea textArea, int line, String text)
- {
- StatusBar status = view.getStatus();
- if(status == null)
- return;
-
- status.setMessageAndClear(jEdit.getProperty(
- "view.status.bracket",new Object[] {
- line, text }));
- }
-
- public void narrowActive(org.gjt.sp.jedit.textarea.TextArea textArea)
- {
- StatusBar status = view.getStatus();
- if(status == null)
- return;
-
- status.setMessageAndClear(
- jEdit.getProperty("view.status.narrow"));
- }
- } //}}}
-
- //{{{ MarkerHighlight class
- class MarkerHighlight extends TextAreaExtension
- {
- private boolean markerHighlight;
- private Color markerHighlightColor;
-
- //{{{ getMarkerHighlightColor() method
- public Color getMarkerHighlightColor()
- {
- return markerHighlightColor;
- } //}}}
-
- //{{{ setMarkerHighlightColor() method
- public void setMarkerHighlightColor(Color markerHighlightColor)
- {
- this.markerHighlightColor = markerHighlightColor;
- } //}}}
-
- //{{{ isMarkerHighlightEnabled() method
- public boolean isMarkerHighlightEnabled()
- {
- return markerHighlight;
- } //}}}
-
- //{{{ isMarkerHighlightEnabled()
- public void setMarkerHighlightEnabled(boolean markerHighlight)
- {
- this.markerHighlight = markerHighlight;
- } //}}}
-
- //{{{ paintValidLine() method
- @Override
- public void paintValidLine(Graphics2D gfx, int screenLine,
- int physicalLine, int start, int end, int y)
- {
- if(isMarkerHighlightEnabled())
- {
- Buffer buffer = (Buffer)textArea.getBuffer();
- if(buffer.getMarkerInRange(start,end) != null)
- {
- gfx.setColor(getMarkerHighlightColor());
- FontMetrics fm = textArea.getPainter().getFontMetrics();
- gfx.fillRect(0,y,textArea.getGutter()
- .getWidth(),fm.getHeight());
- }
- }
- } //}}}
-
- //{{{ getToolTipText() method
- @Override
- public String getToolTipText(int x, int y)
- {
- if(isMarkerHighlightEnabled())
- {
- int lineHeight = textArea.getPainter().getFontMetrics().getHeight();
- if(lineHeight == 0)
- return null;
-
- int line = y / lineHeight;
- int start = textArea.getScreenLineStartOffset(line);
- int end = textArea.getScreenLineEndOffset(line);
- if(start == -1 || end == -1)
- return null;
-
- Buffer buffer = (Buffer)textArea.getBuffer();
- Marker marker = buffer.getMarkerInRange(start,end);
- if(marker != null)
- {
- char shortcut = marker.getShortcut();
- if(shortcut == '\0')
- return jEdit.getProperty("view.gutter.marker.no-name");
- else
- {
- String[] args = { String.valueOf(shortcut) };
- return jEdit.getProperty("view.gutter.marker",args);
- }
- }
- }
-
- return null;
- } //}}}
- } //}}}
-}
+/*
+ * EditPane.java - Text area and buffer switcher
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FontMetrics;
+import java.awt.Graphics2D;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.bufferset.BufferSet;
+import org.gjt.sp.jedit.bufferset.BufferSetListener;
+import org.gjt.sp.jedit.gui.BufferSwitcher;
+import org.gjt.sp.jedit.gui.StatusBar;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.jedit.msg.BufferChanging;
+import org.gjt.sp.jedit.msg.BufferUpdate;
+import org.gjt.sp.jedit.msg.EditPaneUpdate;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.jedit.options.GutterOptionPane;
+import org.gjt.sp.jedit.syntax.SyntaxStyle;
+import org.gjt.sp.jedit.textarea.AntiAlias;
+import org.gjt.sp.jedit.textarea.Gutter;
+import org.gjt.sp.jedit.textarea.GutterPopupHandler;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+import org.gjt.sp.jedit.textarea.MouseHandler;
+import org.gjt.sp.jedit.textarea.Selection;
+import org.gjt.sp.jedit.textarea.StatusListener;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.jedit.textarea.TextAreaExtension;
+import org.gjt.sp.jedit.textarea.TextAreaPainter;
+import org.gjt.sp.jedit.textarea.TextAreaTransferHandler;
+import org.gjt.sp.util.SyntaxUtilities;
+import org.gjt.sp.util.ThreadUtilities;
+//}}}
+
+/**
+ * A panel containing a text area.<p>
+ *
+ * In a BeanShell script, you can obtain the current edit pane from the
+ * <code>editPane</code> variable.<p>
+ *
+ *
+ * Each View can have multiple editPanes, one is active at a time.
+ * Each EditPane has a single JEditTextArea, and is operating on single buffer.
+ * The EditPane also can switch buffers.
+ *
+ * This is the "controller" between a JEditTextArea (view) and a buffer (model).
+ *
+ * This class does not have a public constructor.
+ * Edit panes can be created and destroyed using methods in the
+ * {@link View} class.<p>
+ *
+ *
+ * @see View#splitHorizontally()
+ * @see View#splitVertically()
+ * @see View#unsplitCurrent()
+ * @see View#unsplit()
+ * @see View#getEditPane()
+ * @see View#getEditPanes()
+ *
+ * @author Slava Pestov
+ * @version $Id: EditPane.java 19610 2011-06-20 22:53:22Z Vampire0 $
+ */
+public class EditPane extends JPanel implements BufferSetListener
+{
+ //{{{ getView() method
+ /**
+ * Returns the view containing this edit pane.
+ * @return the view that contains this EditPane
+ * @since jEdit 2.5pre2
+ */
+ public View getView()
+ {
+ return view;
+ } //}}}
+
+ // {{{ get(TextArea) method
+ /**
+ * Returns the EditPane of a TextArea.
+ *
+ * @param ta the textArea
+ * @return the EditPane containing the TextArea.
+ */
+ public static EditPane get(TextArea ta)
+ {
+ if (ta == null) return null;
+ return (EditPane)SwingUtilities.getAncestorOfClass(EditPane.class, ta);
+ } // }}}
+
+ //{{{ getBuffer() method
+ /**
+ * Returns the current buffer.
+ * @return the current buffer
+ * @since jEdit 2.5pre2
+ */
+ public Buffer getBuffer()
+ {
+ return buffer;
+ } //}}}
+
+ //{{{ setBuffer() methods
+ /**
+ * Sets the current buffer.
+ * @param buffer The buffer to edit.
+ * @since jEdit 2.5pre2
+ */
+ public void setBuffer(Buffer buffer)
+ {
+ setBuffer(buffer, true);
+ }
+
+ /**
+ * Sets the current buffer.
+ * @param buffer The buffer to edit.
+ * @param requestFocus true if the textarea should request focus, false otherwise
+ * @since jEdit 4.3pre6
+ */
+ public void setBuffer(final Buffer buffer, boolean requestFocus)
+ {
+ if(buffer == null)
+ throw new NullPointerException();
+
+ if(this.buffer == buffer)
+ return;
+
+ if (bufferSet.indexOf(buffer) == -1)
+ {
+ jEdit.getBufferSetManager().addBuffer(this, buffer);
+ }
+ //if(buffer.insideCompoundEdit())
+ // buffer.endCompoundEdit();
+ EditBus.send(new BufferChanging(this, buffer));
+ if (bufferSet.indexOf(this.buffer) != -1)
+ {
+ // when closing the last buffer of a bufferSet, the current buffer will still be the closed
+ // buffer until a new empty buffer is created.
+ // So if the current buffer is not anymore in the bufferSet, do not set the recentBuffer
+ recentBuffer = this.buffer;
+ }
+ if(recentBuffer != null)
+ saveCaretInfo();
+ this.buffer = buffer;
+
+ textArea.setBuffer(buffer);
+
+ if(!init)
+ {
+ view.updateTitle();
+
+ if(bufferSwitcher != null)
+ {
+ if(bufferSwitcher.getSelectedItem() != buffer)
+ bufferSwitcher.setSelectedItem(buffer);
+ bufferSwitcher.setToolTipText(buffer.getPath());
+ }
+
+ EditBus.send(new EditPaneUpdate(this,EditPaneUpdate
+ .BUFFER_CHANGED));
+ }
+
+ if (requestFocus)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ // only do this if we are the current edit pane
+ if(view.getEditPane() == EditPane.this
+ && (bufferSwitcher == null
+ || !bufferSwitcher.isPopupVisible()))
+ {
+ textArea.requestFocus();
+ }
+ }
+ });
+ }
+
+ // If the buffer is loading, the caret info will be loaded on
+ // BufferUpdate.LOADED. Otherwise, we don't need to wait for IO.
+ if (!buffer.isLoading())
+ {
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ // avoid a race condition
+ // see bug #834338
+ if(buffer == getBuffer())
+ loadCaretInfo();
+ }
+ });
+ }
+ } //}}}
+
+ //{{{ prevBuffer() method
+ /**
+ * Selects the previous buffer.
+ * @since jEdit 2.7pre2
+ */
+ public void prevBuffer()
+ {
+ Buffer buffer = bufferSet.getPreviousBuffer(bufferSet.indexOf(this.buffer));
+ setBuffer(buffer);
+ } //}}}
+
+ //{{{ nextBuffer() method
+ /**
+ * Selects the next buffer.
+ * @since jEdit 2.7pre2
+ */
+ public void nextBuffer()
+ {
+ Buffer buffer = bufferSet.getNextBuffer(bufferSet.indexOf(this.buffer));
+ setBuffer(buffer);
+ } //}}}
+
+ //{{{ recentBuffer() method
+ /**
+ * Selects the most recently edited buffer.
+ * @since jEdit 2.7pre2
+ */
+ public void recentBuffer()
+ {
+ if(recentBuffer != null)
+ setBuffer(recentBuffer);
+ else
+ getToolkit().beep();
+ } //}}}
+
+ //{{{ focusOnTextArea() method
+ /**
+ * Sets the focus onto the text area.
+ * @since jEdit 2.5pre2
+ */
+ public void focusOnTextArea()
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ textArea.requestFocus();
+ }
+ });
+ } //}}}
+
+ //{{{ getTextArea() method
+ /**
+ * Returns the view's text area.
+ * @return the text area of the edit pane
+ * @since jEdit 2.5pre2
+ */
+ public JEditTextArea getTextArea()
+ {
+ return textArea;
+ } //}}}
+
+ //{{{ getBufferSwitcher() method
+ /**
+ * Returns the buffer switcher combo box instance.
+ * @return the buffer switcher (it can be null)
+ * @since jEdit 4.1pre8
+ */
+ public BufferSwitcher getBufferSwitcher()
+ {
+ return bufferSwitcher;
+ } //}}}
+
+ //{{{ focusBufferSwitcher() method
+ /**
+ * Pops up and focuses on the buffer switcher combo box.
+ * @since jEdit 4.3pre18
+ * (previously known as showBufferSwitcher)
+ */
+ public void focusBufferSwitcher()
+ {
+ if(bufferSwitcher == null)
+ getToolkit().beep();
+ else
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ bufferSwitcher.requestFocus();
+ bufferSwitcher.showPopup();
+ }
+
+ });
+ }
+ } //}}}
+
+ //{{{ saveCaretInfo() method
+ /**
+ * Saves the caret information to the current buffer.
+ * @since jEdit 2.5pre2
+ */
+ public void saveCaretInfo()
+ {
+ if(!buffer.isLoaded())
+ return;
+
+ buffer.setIntegerProperty(Buffer.CARET,
+ textArea.getCaretPosition());
+
+ CaretInfo caretInfo = caretsForPath.get(buffer.getPath());
+ if (caretInfo == null)
+ {
+ caretInfo = new CaretInfo();
+ caretsForPath.put(buffer.getPath(), caretInfo);
+ }
+ caretInfo.caret = textArea.getCaretPosition();
+
+
+ Selection[] selection = textArea.getSelection();
+ for(int i = 0; i < selection.length; i++)
+ selection[i] = (Selection)selection[i].clone();
+ buffer.setProperty(Buffer.SELECTION,selection);
+ caretInfo.selection = selection;
+
+ caretInfo.rectangularSelection = textArea.isRectangularSelectionEnabled();
+ caretInfo.multipleSelection = textArea.isMultipleSelectionEnabled();
+
+ buffer.setIntegerProperty(Buffer.SCROLL_VERT,
+ textArea.getFirstPhysicalLine());
+ caretInfo.scrollVert = textArea.getFirstPhysicalLine();
+ buffer.setIntegerProperty(Buffer.SCROLL_HORIZ,
+ textArea.getHorizontalOffset());
+ caretInfo.scrollHoriz = textArea.getHorizontalOffset();
+ if (!buffer.isUntitled())
+ {
+ BufferHistory.setEntry(buffer.getPath(), textArea.getCaretPosition(),
+ (Selection[])buffer.getProperty(Buffer.SELECTION),
+ buffer.getStringProperty(JEditBuffer.ENCODING),
+ buffer.getMode().getName());
+ }
+ } //}}}
+
+ //{{{ loadCaretInfo() method
+ /**
+ * Loads the caret and selection information from this EditPane, fall
+ * back to the information from the current buffer if none is already
+ * in this EditPane.
+ * @since jEdit 2.5pre2
+ */
+ public void loadCaretInfo()
+ {
+ // get our internal map of buffer -> CaretInfo since there might
+ // be current info already
+ CaretInfo caretInfo = caretsForPath.get(buffer.getPath());
+ if (caretInfo == null)
+ {
+ caretInfo = new CaretInfo();
+ }
+
+ // set the position of the caret itself.
+ // Caret position could be stored in the internal map already,
+ // if so, use that one first. Otherwise, fall back to any
+ // previously saved caret position that was stored in the
+ // buffer properties.
+ int caret = caretInfo.caret;
+ if (caret == -1 || buffer.getBooleanProperty(Buffer.CARET_POSITIONED))
+ {
+ Integer i = (Integer) buffer.getProperty(Buffer.CARET);
+ caret = i == null ? -1 : i;
+ }
+ buffer.unsetProperty(Buffer.CARET_POSITIONED);
+
+
+ if(caret != -1)
+ textArea.setCaretPosition(Math.min(caret,
+ buffer.getLength()));
+
+ // set any selections
+ Selection[] selection = caretInfo.selection;
+ if ( selection == null )
+ {
+ selection = (Selection[]) buffer.getProperty(Buffer.SELECTION);
+ }
+ if(selection != null)
+ {
+ for(int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ int max = buffer.getLength();
+ if(s.getStart() > max || s.getEnd() > max)
+ selection[i] = null;
+ }
+ }
+ textArea.setSelection(selection);
+ textArea.setRectangularSelectionEnabled(caretInfo.rectangularSelection);
+ textArea.setMultipleSelectionEnabled(caretInfo.multipleSelection);
+ // set firstLine value
+ int firstLine = caretInfo.scrollVert;
+ if ( firstLine == -1 )
+ {
+ Integer i = (Integer) buffer.getProperty(Buffer.SCROLL_VERT);
+ firstLine = i == null ? -1 : i;
+ }
+
+ if(firstLine != -1)
+ textArea.setFirstPhysicalLine(firstLine);
+
+ // set horizontal offset
+ int horizontalOffset = caretInfo.scrollHoriz;
+ if (horizontalOffset == -1)
+ {
+ Integer i = (Integer) buffer.getProperty(Buffer.SCROLL_HORIZ);
+ horizontalOffset = i == null ? -1 : i;
+ }
+
+ if(horizontalOffset != -1)
+ textArea.setHorizontalOffset(horizontalOffset);
+
+ /* Silly bug workaround #8694. If you look at the above code,
+ * note that we restore the saved caret position first, then
+ * scroll to the saved location. However, the caret changing
+ * can itself result in scrolling to a different location than
+ * what was saved; and since moveCaretPosition() calls
+ * updateBracketHighlight(), the bracket highlight's out of
+ * bounds calculation will rely on a different set of physical
+ * first/last lines than what we will end up with eventually.
+ * Instead of confusing the user with status messages that
+ * appear at random when switching buffers, we simply hide the
+ * message altogether. */
+ view.getStatus().setMessage(null);
+ } //}}}
+
+ //{{{ bufferRenamed() method
+ /**
+ * This method should be called by the Buffer when the path is changing.
+ * @param oldPath the old path of the buffer
+ * @param newPath the new path of the buffer
+ */
+ void bufferRenamed(String oldPath, String newPath)
+ {
+ CaretInfo caretInfo = caretsForPath.remove(oldPath);
+ if (caretInfo != null)
+ caretsForPath.put(newPath, caretInfo);
+
+ } //}}}
+
+ //{{{ CaretInfo class
+ /**
+ * Need to track this info for each buffer that this EditPane might edit
+ * since a buffer may be open in more than one EditPane at a time. That
+ * means we need to track this info at the EditPane level rather than
+ * the buffer level.
+ */
+ private static class CaretInfo
+ {
+ public int caret = -1;
+ public Selection[] selection;
+ public int scrollVert = -1;
+ public int scrollHoriz = -1;
+ public boolean rectangularSelection;
+ public boolean multipleSelection;
+ } //}}}
+
+ //{{{ goToNextMarker() method
+ /**
+ * Moves the caret to the next marker.
+ * @since jEdit 4.3pre3
+ */
+ public void goToNextMarker(boolean select)
+ {
+ java.util.List<Marker> markers = buffer.getMarkers();
+ if(markers.isEmpty())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ Marker marker = null;
+
+ int caret = textArea.getCaretPosition();
+
+ for(int i = 0; i < markers.size(); i++)
+ {
+ Marker _marker = markers.get(i);
+ if(_marker.getPosition() > caret)
+ {
+ marker = _marker;
+ break;
+ }
+ }
+ // the markers list is not empty at this point
+ if(marker == null)
+ marker = markers.get(0);
+
+ if(select)
+ textArea.extendSelection(caret,marker.getPosition());
+ else if(!textArea.isMultipleSelectionEnabled())
+ textArea.selectNone();
+ textArea.moveCaretPosition(marker.getPosition());
+ } //}}}
+
+ //{{{ goToPrevMarker() method
+ /**
+ * Moves the caret to the previous marker.
+ * @since jEdit 2.7pre2
+ */
+ public void goToPrevMarker(boolean select)
+ {
+ java.util.List<Marker> markers = buffer.getMarkers();
+ if(markers.isEmpty())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ int caret = textArea.getCaretPosition();
+
+ Marker marker = null;
+ for(int i = markers.size() - 1; i >= 0; i--)
+ {
+ Marker _marker = markers.get(i);
+ if(_marker.getPosition() < caret)
+ {
+ marker = _marker;
+ break;
+ }
+ }
+
+ if(marker == null)
+ marker = markers.get(markers.size() - 1);
+
+ if(select)
+ textArea.extendSelection(caret,marker.getPosition());
+ else if(!textArea.isMultipleSelectionEnabled())
+ textArea.selectNone();
+ textArea.moveCaretPosition(marker.getPosition());
+ } //}}}
+
+ //{{{ goToMarker() method
+ /**
+ * Moves the caret to the marker with the specified shortcut.
+ * @param shortcut The shortcut
+ * @param select True if the selection should be extended,
+ * false otherwise
+ * @since jEdit 3.2pre2
+ */
+ public void goToMarker(char shortcut, boolean select)
+ {
+ Marker marker = buffer.getMarker(shortcut);
+ if(marker == null)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ int pos = marker.getPosition();
+
+ if(select)
+ textArea.extendSelection(textArea.getCaretPosition(),pos);
+ else if(!textArea.isMultipleSelectionEnabled())
+ textArea.selectNone();
+ textArea.moveCaretPosition(pos);
+ } //}}}
+
+ //{{{ addMarker() method
+ /**
+ * Adds a marker at the caret position.
+ * @since jEdit 3.2pre1
+ */
+ public void addMarker()
+ {
+ int caretLine = textArea.getCaretLine();
+
+ // always add markers on selected lines
+ Selection[] selection = textArea.getSelection();
+ for(int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ int startLine = s.getStartLine();
+ if(startLine != s.getEndLine() && startLine != caretLine)
+ {
+ buffer.addMarker('\0',s.getStart());
+ }
+
+ if(s.getEndLine() != caretLine)
+ buffer.addMarker('\0',s.getEnd());
+ }
+
+ // toggle marker on caret line
+ buffer.addOrRemoveMarker('\0',textArea.getCaretPosition());
+ } //}}}
+
+ //{{{ swapMarkerAndCaret() method
+ /**
+ * Moves the caret to the marker with the specified shortcut,
+ * then sets the marker position to the former caret position.
+ * @param shortcut The shortcut
+ * @since jEdit 3.2pre2
+ */
+ public void swapMarkerAndCaret(char shortcut)
+ {
+ Marker marker = buffer.getMarker(shortcut);
+ if(marker == null)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ int caret = textArea.getCaretPosition();
+
+ textArea.setCaretPosition(marker.getPosition());
+ buffer.addMarker(shortcut,caret);
+ } //}}}
+
+ //{{{ handlePropertiesChanged() method
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
+ {
+ propertiesChanged();
+ loadBufferSwitcher();
+ } //}}}
+
+ //{{{ getMinimumSize() method
+ /**
+ * Returns 0,0 for split pane compatibility.
+ */
+ @Override
+ public final Dimension getMinimumSize()
+ {
+ return new Dimension(0,0);
+ } //}}}
+
+ //{{{ getBufferSet() method
+ /**
+ * Returns the current buffer set.
+ * This can be changed by setBufferSetScope().
+ * @return the buffer set which is currently used by this EditPane
+ * @since jEdit 4.3pre17
+ */
+ public BufferSet getBufferSet()
+ {
+ return bufferSet;
+ } //}}}
+
+ //{{{ bufferAdded() method
+ /**
+ * A buffer was added in the bufferSet.
+ * @param buffer the added buffer
+ * @param index the position where it was added
+ * @since jEdit 4.3pre15
+ */
+ public void bufferAdded(Buffer buffer, int index)
+ {
+ if (buffer == null)
+ return;
+ if (bufferSwitcher != null)
+ bufferSwitcher.updateBufferList();
+ if (bufferSet.indexOf(this.buffer) == -1)
+ {
+ // it happens when having 1 untitled buffer if I open a file. The untitled buffer
+ // is closed but the new buffer is not yet opened
+ setBuffer(buffer);
+ }
+ } //}}}
+
+ //{{{ bufferRemoved() method
+ /**
+ * A buffer was removed from the bufferSet.
+ * @param buffer the removed buffer
+ * @param index the position where it was before being removed
+ * @since jEdit 4.3pre15
+ */
+ public void bufferRemoved(Buffer buffer, int index)
+ {
+ if (buffer.isUntitled())
+ {
+ // the buffer was a new file so I do not need to keep it's informations
+ caretsForPath.remove(buffer.getPath());
+ }
+ if (buffer == this.buffer)
+ {
+ // The closed buffer is the current buffer
+ Buffer newBuffer = recentBuffer != null ?
+ recentBuffer : bufferSet.getPreviousBuffer(index);
+
+ if(newBuffer != null && !newBuffer.isClosed())
+ {
+ setBuffer(newBuffer);
+ if (bufferSet.size() > 1)
+ {
+ recentBuffer = bufferSet.getPreviousBuffer(index -1);
+ }
+ }
+ else if(bufferSet.size() != 0)
+ {
+ setBuffer(bufferSet.getBuffer(0));
+ recentBuffer = null;
+ }
+ }
+ if(buffer == recentBuffer)
+ recentBuffer = null;
+ if (bufferSwitcher != null)
+ bufferSwitcher.updateBufferList();
+ } //}}}
+
+ //{{{ bufferMoved() method
+ /**
+ * A buffer was moved in the BufferSet.
+ * @param buffer the moved buffer
+ * @param oldIndex the position it was before
+ * @param newIndex the new position
+ * @since jEdit 4.3pre15
+ */
+ public void bufferMoved(Buffer buffer, int oldIndex, int newIndex)
+ {
+ if (bufferSwitcher != null)
+ bufferSwitcher.updateBufferList();
+ } //}}}
+
+ //{{{ bufferSetSorted() method
+ /**
+ * The bufferSet was sorted
+ * @since jEdit 4.3pre16
+ */
+ public void bufferSetSorted()
+ {
+ if (bufferSwitcher != null)
+ bufferSwitcher.updateBufferList();
+ } //}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ return getClass().getName() + '['
+ + (view.getEditPane() == this
+ ? "active]" : "inactive]");
+ } //}}}
+
+ //{{{ Package-private members
+
+ //{{{ EditPane constructor
+ EditPane(View view, BufferSet bufferSetSource, Buffer buffer)
+ {
+ super(new BorderLayout());
+ BufferSet.Scope scope = jEdit.getBufferSetManager().getScope();
+ BufferSet source = bufferSetSource;
+ switch (scope)
+ {
+ case editpane:
+ // do nothing
+ break;
+ case view:
+ {
+ EditPane editPane = view.getEditPane();
+ if (editPane != null)
+ {
+ // if we have an editpane we copy it
+ source = editPane.getBufferSet();
+ }
+ }
+ break;
+ case global:
+ View activeView = jEdit.getActiveView();
+ if (activeView != null)
+ {
+ EditPane editPane = activeView.getEditPane();
+ if (editPane != null)
+ {
+ source = editPane.getBufferSet();
+ }
+ }
+ break;
+ }
+ bufferSet = new BufferSet(source);
+
+ init = true;
+
+ this.view = view;
+
+
+ textArea = new JEditTextArea(view);
+ bufferSet.addBufferSetListener(this);
+ textArea.getPainter().setAntiAlias(new AntiAlias(jEdit.getProperty("view.antiAlias")));
+ textArea.setMouseHandler(new MouseHandler(textArea));
+ textArea.setTransferHandler(new TextAreaTransferHandler());
+ markerHighlight = new MarkerHighlight();
+ Gutter gutter = textArea.getGutter();
+ gutter.setGutterEnabled(GutterOptionPane.isGutterEnabled());
+ gutter.setMinLineNumberDigitCount(GutterOptionPane.getMinLineNumberDigits());
+ gutter.setSelectionAreaEnabled(GutterOptionPane.isSelectionAreaEnabled());
+ gutter.addExtension(markerHighlight);
+ gutter.setSelectionPopupHandler(
+ new GutterPopupHandler()
+ {
+ public void handlePopup(int x, int y, int line)
+ {
+ Buffer buffer = getBuffer();
+ buffer.addOrRemoveMarker('\0',
+ buffer.getLineStartOffset(line));
+ }
+ });
+
+ textArea.addStatusListener(new StatusHandler());
+ add(BorderLayout.CENTER,textArea);
+
+ propertiesChanged();
+ setBuffer(buffer);
+
+ // need to add the buffer to the bufferSet.
+ // It may not have been done by the setBuffer() because the EditPane is not yet known by jEdit, and for
+ // view and global scope it is added through this list
+ if (bufferSet.indexOf(buffer) == -1)
+ bufferSet.addBuffer(buffer);
+
+ loadBufferSwitcher();
+
+ init = false;
+ EditBus.addToBus(this);
+ } //}}}
+
+ //{{{ close() method
+ void close()
+ {
+ saveCaretInfo();
+ EditBus.send(new EditPaneUpdate(this,EditPaneUpdate.DESTROYED));
+ EditBus.removeFromBus(this);
+ textArea.dispose();
+ } //}}}
+
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private boolean init;
+ /** The View where the edit pane is. */
+ private final View view;
+
+ private final BufferSet bufferSet;
+
+ /** The current buffer. */
+ private Buffer buffer;
+ private Buffer recentBuffer;
+ private BufferSwitcher bufferSwitcher;
+
+ /** The textArea inside the edit pane. */
+ private final JEditTextArea textArea;
+ private final MarkerHighlight markerHighlight;
+
+ // A map of buffer.getPath() -> CaretInfo. This is necessary for
+ // when the same buffer is open in more than one EditPane and the user
+ // is switching between buffers. We want to keep the caret in the
+ // right position in each EditPane, which won't be the case if we
+ // just use the buffer caret property.
+ private final Map<String, CaretInfo> caretsForPath = new HashMap<String, CaretInfo>();
+
+ //}}}
+
+ //{{{ propertiesChanged() method
+ private void propertiesChanged()
+ {
+ TextAreaPainter painter = textArea.getPainter();
+
+ initPainter(painter);
+ Gutter gutter = textArea.getGutter();
+ gutter.setExpanded(jEdit.getBooleanProperty(
+ "view.gutter.lineNumbers"));
+ int interval = jEdit.getIntegerProperty(
+ "view.gutter.highlightInterval",5);
+ gutter.setHighlightInterval(interval);
+ gutter.setCurrentLineHighlightEnabled(jEdit.getBooleanProperty(
+ "view.gutter.highlightCurrentLine"));
+ gutter.setStructureHighlightEnabled(jEdit.getBooleanProperty(
+ "view.gutter.structureHighlight"));
+ gutter.setStructureHighlightColor(
+ jEdit.getColorProperty("view.gutter.structureHighlightColor"));
+ gutter.setBackground(
+ jEdit.getColorProperty("view.gutter.bgColor"));
+ gutter.setForeground(
+ jEdit.getColorProperty("view.gutter.fgColor"));
+ gutter.setHighlightedForeground(
+ jEdit.getColorProperty("view.gutter.highlightColor"));
+ gutter.setFoldColor(
+ jEdit.getColorProperty("view.gutter.foldColor"));
+ markerHighlight.setMarkerHighlightColor(
+ jEdit.getColorProperty("view.gutter.markerColor"));
+ markerHighlight.setMarkerHighlightEnabled(jEdit.getBooleanProperty(
+ "view.gutter.markerHighlight"));
+ gutter.setCurrentLineForeground(
+ jEdit.getColorProperty("view.gutter.currentLineColor"));
+ String alignment = jEdit.getProperty(
+ "view.gutter.numberAlignment");
+ if ("right".equals(alignment))
+ {
+ gutter.setLineNumberAlignment(Gutter.RIGHT);
+ }
+ else if ("center".equals(alignment))
+ {
+ gutter.setLineNumberAlignment(Gutter.CENTER);
+ }
+ else // left == default case
+ {
+ gutter.setLineNumberAlignment(Gutter.LEFT);
+ }
+
+ gutter.setFont(jEdit.getFontProperty("view.gutter.font"));
+ gutter.setGutterEnabled(GutterOptionPane.isGutterEnabled());
+ gutter.setMinLineNumberDigitCount(
+ GutterOptionPane.getMinLineNumberDigits());
+ gutter.setSelectionAreaEnabled(
+ GutterOptionPane.isSelectionAreaEnabled());
+ gutter.setSelectionAreaBackground(
+ GutterOptionPane.getSelectionAreaBackground());
+ gutter.setSelectionAreaWidth(
+ GutterOptionPane.getSelectionAreaWidth());
+
+ int width = jEdit.getIntegerProperty(
+ "view.gutter.borderWidth",3);
+ gutter.setBorder(width,
+ jEdit.getColorProperty("view.gutter.focusBorderColor"),
+ jEdit.getColorProperty("view.gutter.noFocusBorderColor"),
+ textArea.getPainter().getBackground());
+ gutter.setFoldPainter(textArea.getFoldPainter());
+
+ textArea.setCaretBlinkEnabled(jEdit.getBooleanProperty(
+ "view.caretBlink"));
+
+ textArea.setElectricScroll(jEdit.getIntegerProperty(
+ "view.electricBorders",0));
+
+ // Set up the right-click popup menu
+ textArea.createPopupMenu(null);
+
+ // use old property name for backwards compatibility
+ textArea.setQuickCopyEnabled(jEdit.getBooleanProperty(
+ "view.middleMousePaste"));
+
+ textArea.setDragEnabled(jEdit.getBooleanProperty(
+ "view.dragAndDrop"));
+
+ textArea.setJoinNonWordChars(jEdit.getBooleanProperty(
+ "view.joinNonWordChars"));
+
+ textArea.setCtrlForRectangularSelection(jEdit.getBooleanProperty(
+ "view.ctrlForRectangularSelection"));
+
+ textArea.propertiesChanged();
+
+ if (bufferSwitcher != null)
+ {
+ bufferSwitcher.setMaximumRowCount(jEdit.getIntegerProperty(
+ "bufferSwitcher.maxRowCount",10));
+ }
+ } //}}}
+
+ //{{{ initPainter() method
+ /**
+ * Init the painter of a textarea.
+ *
+ * @param painter the painter of a textarea
+ * @since jEdit 4.3pre12
+ */
+ public static void initPainter(TextAreaPainter painter)
+ {
+ painter.setFont(jEdit.getFontProperty("view.font"));
+ painter.setStructureHighlightEnabled(jEdit.getBooleanProperty(
+ "view.structureHighlight"));
+ painter.setStructureHighlightColor(
+ jEdit.getColorProperty("view.structureHighlightColor"));
+ painter.setEOLMarkersPainted(jEdit.getBooleanProperty(
+ "view.eolMarkers"));
+ painter.setEOLMarkerColor(
+ jEdit.getColorProperty("view.eolMarkerColor"));
+ painter.setWrapGuidePainted(jEdit.getBooleanProperty(
+ "view.wrapGuide"));
+ painter.setWrapGuideColor(
+ jEdit.getColorProperty("view.wrapGuideColor"));
+ painter.setCaretColor(
+ jEdit.getColorProperty("view.caretColor"));
+ painter.setSelectionColor(
+ jEdit.getColorProperty("view.selectionColor"));
+ painter.setMultipleSelectionColor(
+ jEdit.getColorProperty("view.multipleSelectionColor"));
+ painter.setBackground(
+ jEdit.getColorProperty("view.bgColor"));
+ painter.setForeground(
+ jEdit.getColorProperty("view.fgColor"));
+ painter.setBlockCaretEnabled(jEdit.getBooleanProperty(
+ "view.blockCaret"));
+ painter.setThickCaretEnabled(jEdit.getBooleanProperty(
+ "view.thickCaret"));
+ painter.setLineHighlightEnabled(jEdit.getBooleanProperty(
+ "view.lineHighlight"));
+ painter.setLineHighlightColor(
+ jEdit.getColorProperty("view.lineHighlightColor"));
+ painter.setAntiAlias(new AntiAlias(jEdit.getProperty("view.antiAlias")));
+ painter.setFractionalFontMetricsEnabled(jEdit.getBooleanProperty(
+ "view.fracFontMetrics"));
+
+ painter.setSelectionFgColor(jEdit.getColorProperty(
+ "view.selectionFgColor"));
+ painter.setSelectionFgColorEnabled(jEdit.getBooleanProperty(
+ "view.selectionFg"));
+
+ String defaultFont = jEdit.getProperty("view.font");
+ int defaultFontSize = jEdit.getIntegerProperty("view.fontsize",12);
+ painter.setStyles(SyntaxUtilities.loadStyles(defaultFont,defaultFontSize));
+
+ SyntaxStyle[] foldLineStyle = new SyntaxStyle[4];
+ for(int i = 0; i <= 3; i++)
+ {
+ foldLineStyle[i] = GUIUtilities.parseStyle(
+ jEdit.getProperty("view.style.foldLine." + i),
+ defaultFont,defaultFontSize);
+ }
+ painter.setFoldLineStyle(foldLineStyle);
+ } //}}}
+
+ //{{{ loadBufferSwitcher() method
+ void loadBufferSwitcher()
+ {
+ if(jEdit.getBooleanProperty("view.showBufferSwitcher"))
+ {
+ if(bufferSwitcher == null)
+ {
+ bufferSwitcher = new BufferSwitcher(this);
+ add(BorderLayout.NORTH,bufferSwitcher);
+ bufferSwitcher.updateBufferList();
+ revalidate();
+ }
+ }
+ else if(bufferSwitcher != null)
+ {
+ remove(bufferSwitcher);
+ revalidate();
+ bufferSwitcher = null;
+ }
+ } //}}}
+
+ //{{{ handleBufferUpdate() method
+ @EBHandler
+ public void handleBufferUpdate(BufferUpdate msg)
+ {
+ Buffer _buffer = msg.getBuffer();
+ if(msg.getWhat() == BufferUpdate.CREATED)
+ {
+ if(bufferSwitcher != null)
+ bufferSwitcher.updateBufferList();
+
+ /* When closing the last buffer, the BufferUpdate.CLOSED
+ * handler doesn't call setBuffer(), because null buffers
+ * are not supported. Instead, it waits for the subsequent
+ * 'Untitled' file creation. */
+ if(buffer.isClosed())
+ {
+ // since recentBuffer will be set to the one that
+ // was closed
+ recentBuffer = null;
+ }
+ }
+ else if(msg.getWhat() == BufferUpdate.CLOSED)
+ {
+ if(bufferSwitcher != null)
+ bufferSwitcher.updateBufferList();
+
+ if(_buffer == buffer)
+ {
+ // The closed buffer is the current buffer
+ Buffer newBuffer = recentBuffer != null ?
+ recentBuffer : _buffer.getPrev();
+
+ if(newBuffer != null && !newBuffer.isClosed())
+ {
+ setBuffer(newBuffer);
+ recentBuffer = newBuffer.getPrev();
+ }
+ }
+ else if(_buffer == recentBuffer)
+ recentBuffer = null;
+
+ Buffer closedBuffer = msg.getBuffer();
+ if (closedBuffer.isUntitled())
+ {
+ // the buffer was a new file so I do not need to keep it's informations
+ caretsForPath.remove(closedBuffer.getPath());
+ }
+ }
+ else if(msg.getWhat() == BufferUpdate.LOAD_STARTED)
+ {
+ if(_buffer == buffer)
+ {
+ textArea.setCaretPosition(0);
+ textArea.getPainter().repaint();
+ }
+ }
+ else if(msg.getWhat() == BufferUpdate.LOADED)
+ {
+ if(_buffer == buffer)
+ {
+ textArea.repaint();
+ if(bufferSwitcher != null)
+ bufferSwitcher.updateBufferList();
+
+ if(view.getEditPane() == this)
+ {
+ StatusBar status = view.getStatus();
+ status.updateCaretStatus();
+ status.updateBufferStatus();
+ status.updateMiscStatus();
+ }
+
+ loadCaretInfo();
+ }
+
+ }
+ else if(msg.getWhat() == BufferUpdate.DIRTY_CHANGED)
+ {
+ if(_buffer == buffer && bufferSwitcher != null)
+ {
+ if(buffer.isDirty())
+ bufferSwitcher.repaint();
+ else
+ bufferSwitcher.updateBufferList();
+ }
+ }
+ else if(msg.getWhat() == BufferUpdate.MARKERS_CHANGED)
+ {
+ if(_buffer == buffer)
+ textArea.getGutter().repaint();
+ }
+ else if(msg.getWhat() == BufferUpdate.PROPERTIES_CHANGED)
+ {
+ if(_buffer == buffer && buffer.isLoaded())
+ {
+ textArea.propertiesChanged();
+ if(view.getEditPane() == this)
+ view.getStatus().updateBufferStatus();
+ }
+ }
+ else if(msg.getWhat() == BufferUpdate.SAVED && _buffer == buffer)
+ {
+ textArea.propertiesChanged();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ StatusHandler class
+ class StatusHandler implements StatusListener
+ {
+ public void statusChanged(org.gjt.sp.jedit.textarea.TextArea textArea, int flag, boolean value)
+ {
+ StatusBar status = view.getStatus();
+ if(status == null)
+ return;
+
+ switch(flag)
+ {
+ case OVERWRITE_CHANGED:
+ status.setMessageAndClear(
+ jEdit.getProperty("view.status.overwrite-changed",
+ new Integer[] { value ? 1 : 0 }));
+ break;
+ case MULTI_SELECT_CHANGED:
+ status.setMessageAndClear(
+ jEdit.getProperty("view.status.multi-changed",
+ new Integer[] { value ? 1 : 0 }));
+ break;
+ case RECT_SELECT_CHANGED:
+ status.setMessageAndClear(
+ jEdit.getProperty("view.status.rect-select-changed",
+ new Integer[] { value ? 1 : 0 }));
+ break;
+ }
+
+ status.updateMiscStatus();
+ }
+
+ public void bracketSelected(org.gjt.sp.jedit.textarea.TextArea textArea, int line, String text)
+ {
+ StatusBar status = view.getStatus();
+ if(status == null)
+ return;
+
+ status.setMessageAndClear(jEdit.getProperty(
+ "view.status.bracket",new Object[] {
+ line, text }));
+ }
+
+ public void narrowActive(org.gjt.sp.jedit.textarea.TextArea textArea)
+ {
+ StatusBar status = view.getStatus();
+ if(status == null)
+ return;
+
+ status.setMessageAndClear(
+ jEdit.getProperty("view.status.narrow"));
+ }
+ } //}}}
+
+ //{{{ MarkerHighlight class
+ class MarkerHighlight extends TextAreaExtension
+ {
+ private boolean markerHighlight;
+ private Color markerHighlightColor;
+
+ //{{{ getMarkerHighlightColor() method
+ public Color getMarkerHighlightColor()
+ {
+ return markerHighlightColor;
+ } //}}}
+
+ //{{{ setMarkerHighlightColor() method
+ public void setMarkerHighlightColor(Color markerHighlightColor)
+ {
+ this.markerHighlightColor = markerHighlightColor;
+ } //}}}
+
+ //{{{ isMarkerHighlightEnabled() method
+ public boolean isMarkerHighlightEnabled()
+ {
+ return markerHighlight;
+ } //}}}
+
+ //{{{ isMarkerHighlightEnabled()
+ public void setMarkerHighlightEnabled(boolean markerHighlight)
+ {
+ this.markerHighlight = markerHighlight;
+ } //}}}
+
+ //{{{ paintValidLine() method
+ @Override
+ public void paintValidLine(Graphics2D gfx, int screenLine,
+ int physicalLine, int start, int end, int y)
+ {
+ if(isMarkerHighlightEnabled())
+ {
+ Buffer buffer = (Buffer)textArea.getBuffer();
+ if(buffer.getMarkerInRange(start,end) != null)
+ {
+ gfx.setColor(getMarkerHighlightColor());
+ FontMetrics fm = textArea.getPainter().getFontMetrics();
+ gfx.fillRect(0,y,textArea.getGutter()
+ .getWidth(),fm.getHeight());
+ }
+ }
+ } //}}}
+
+ //{{{ getToolTipText() method
+ @Override
+ public String getToolTipText(int x, int y)
+ {
+ if(isMarkerHighlightEnabled())
+ {
+ int lineHeight = textArea.getPainter().getFontMetrics().getHeight();
+ if(lineHeight == 0)
+ return null;
+
+ int line = y / lineHeight;
+ int start = textArea.getScreenLineStartOffset(line);
+ int end = textArea.getScreenLineEndOffset(line);
+ if(start == -1 || end == -1)
+ return null;
+
+ Buffer buffer = (Buffer)textArea.getBuffer();
+ Marker marker = buffer.getMarkerInRange(start,end);
+ if(marker != null)
+ {
+ char shortcut = marker.getShortcut();
+ if(shortcut == '\0')
+ return jEdit.getProperty("view.gutter.marker.no-name");
+ else
+ {
+ String[] args = { String.valueOf(shortcut) };
+ return jEdit.getProperty("view.gutter.marker",args);
+ }
+ }
+ }
+
+ return null;
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/EditPlugin.java b/jEdit/org/gjt/sp/jedit/EditPlugin.java
index 36b66bb..a374aa2 100644
--- a/jEdit/org/gjt/sp/jedit/EditPlugin.java
+++ b/jEdit/org/gjt/sp/jedit/EditPlugin.java
@@ -1,844 +1,856 @@
-/*
- * EditPlugin.java - Abstract class all plugins must implement
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import org.gjt.sp.jedit.browser.VFSBrowser;
-import org.gjt.sp.jedit.gui.OptionsDialog;
-import org.gjt.sp.jedit.menu.EnhancedMenu;
-import org.gjt.sp.util.Log;
-
-import javax.swing.*;
-import java.io.*;
-import java.util.Vector;
-
-/**
- * The abstract base class that every plugin must implement.
- * Alternatively, instead of extending this class, a plugin core class can
- * extend {@link EBPlugin} to automatically receive EditBus messages.
- *
- * <h3>Basic plugin information properties</h3>
- *
- * Note that in all cases above where a <i>className</i> is needed, the fully
- * qualified class name, including the package name, if any, must be used.<p>
- *
- * The following properties are required for jEdit to load the plugin:
- *
- * <ul>
- * <li><code>plugin.<i>className</i>.activate</code> - set this to
- * <code>defer</code> if your plugin only needs to be loaded when it is first
- * invoked; set it to <code>startup</code> if your plugin must be loaded at
- * startup regardless; set it to a whitespace-separated list of property names
- * if your plugin should be loaded if at least one of these properties is set.
- * Note that if this property is <b>not</b> set, the plugin will not work with
- * jEdit 4.3final.
- * </li>
- * <li><code>plugin.<i>className</i>.name</code></li>
- * <li><code>plugin.<i>className</i>.version</code></li>
- * <li><code>plugin.<i>className</i>.jars</code> - only needed if your plugin
- * bundles external JAR files. Contains a whitespace-separated list of JAR
- * file names. Without this property, the plugin manager will leave behind the
- * external JAR files when removing the plugin.</li>
- * <li><code>plugin.<i>className</i>.files</code> - only needed if your plugin
- * bundles external files like libraries which MUST reside in the local
- * filesystem. Contains a whitespace-separated list of file names.
- * Without this property, the plugin manager will leave behind the
- * external files when removing the plugin.</li>
- * <li><code>plugin.<i>className</i>.description</code> - the short description
- * associated with the plugin. The short description is used by the Plugin
- * Manager and on the list pages on Plugin Central. </li>
- * </ul>
- *
- * The following properties are optional but recommended:
- *
- * <ul>
- * <li><code>plugin.<i>className</i>.author</code></li>
- * <li><code>plugin.<i>className</i>.usePluginHome</code> - whether
- * the plugin uses the EditPlugin.getPluginHome API or not. Even
- * if the plugin doesn't store any data, this property should be set
- * so that the plugin manager can tell that there is no data stored.</li>
- * <li><code>plugin.<i>className</i>.docs</code> - the path to plugin
- * documentation in HTML format. </li>
- * <li><code>plugin.<i>className</i>.longdescription</code> - the path to
- * the long description in XHTML (no fancy stuff here, please - just proper
- * XHTML subset with the basic tags: <tt>html, h1, h2, p, li, ul, ol, a href,b ,i, u, br/ </tt>)
- * <p> The long description is extracted from the plugin at various times,
- * primarily at plugin packaging time to update the data on the
- * plugin detail pages of Plugin Central. </p>
- * <p>
- * If this property is left out, the default will be to look in a file
- * called <description.html>. </p>
- *</li>
- *</ul>
- *<p>
- * For the previous two properties, if a relative path is supplied,
- * it should be both </p>
- * <ol>
- * <li> relative to the location of the .props file (when it is in the source tree) </li>
- * <li> relative to the root of the JAR (when it is packaged in the JAR file) </li>
- *</ol>
- *
- *<p> Both conditions are easily satisfied if the .props file as well as
- * description.html are both located in the root directory of the plugin,
- * as well as the generated JAR. </p>
- *
- * <h3>Plugin dependency properties</h3>
- *
- * <p>Plugin dependencies are also specified using properties.
- * Each dependency is defined in a property named with
- * <code>plugin.<i>className</i>.depend.</code> followed by a number.
- * Dependencies must be numbered in order, starting from zero.
- * This determines the order that dependent plugins get loaded and activated,
- * so order is very important. </p>
-*
- * <p> The value of a dependency property has one of the following forms: </p>
- *
- * <ul>
- * <li> <code>jdk <i>minimumJavaVersion</i></code> </li>
- * <li> <code>jedit <i>minimumjEditVersion</i></code> - note that this must be
- * a version number in the form returned by {@link jEdit#getBuild()},
- * not {@link jEdit#getVersion()}. Note that the documentation here describes
- * the jEdit 4.2 plugin API, so this dependency must be set to at least
- * <code>04.02.99.00</code> (4.2final).</li>
- * <li><code><i>pluginClassName pluginVersion</i></code> - the fully quailified
- * plugin class name with package must be specified.</li>
- * <li><code>optional plugin <i>pluginClassName pluginVersion</i></code> -
- * an optional dependency, indicating that the plugin will work without it,
- * but that the dependency should be loaded before this plugin. </li>
-</ul>
-
- <p>In this example, the ProjectViewer plugin is an optional dependency of
- the Console, beacause the Console only listens to events from the ProjectViewer.
- It requires Jedit 4.2 final. </p>
-
-<pre>
-plugin.console.ConsolePlugin.depend.0=jedit 04.02.99.00
-plugin.console.ConsolePlugin.depend.1=jdk 1.5
-plugin.console.ConsolePlugin.depend.2=plugin errorlist.ErrorListPlugin 1.4
-plugin.console.ConsolePlugin.depend.3=optional plugin projectviewer.ProjectPlugin 2.1.0.92
-</pre>
-
- * <h3>Plugin menu item properties</h3>
- *
- *<p> To add your plugin to the view's <b>Plugins</b> menu, define one of these two
- * properties: </p>
- *
- * <ul>
- * <li><code>plugin.<i>className</i>.menu-item</code> - if this is defined,
- * the action named by this property is added to the <b>Plugins</b> menu.</li>
- * <li><code>plugin.<i>className</i>.menu</code> - if this is defined,
- * a sub-menu is added to the <b>Plugins</b> menu whose content is the
- * whitespace-separated list of action names in this property. A separator may
- * be added to the sub-menu by listing <code>-</code> in the property.</li>
- * </ul>
- *
- * <p>If you want the plugin's menu items to be determined at runtime, define a
- * property <code>plugin.<i>className</i>.menu.code</code> to be BeanShell
- * code that evaluates to an implementation of
- * {@link org.gjt.sp.jedit.menu.DynamicMenuProvider}.</p>
- *<p>
- * To add your plugin to the file system browser's <b>Plugins</b> menu, define
- * one of these two properties:
- *</p>
- * <ul>
- * <li><code>plugin.<i>className</i>.browser-menu-item</code> - if this is
- * defined, the action named by this property is added to the <b>Plugins</b>
- * menu.</li>
- * <li><code>plugin.<i>className</i>.browser-menu</code> - if this is defined,
- * a sub-menu is added to the <b>Plugins</b> menu whose content is the
- * whitespace-separated list of action names in this property. A separator may
- * be added to the sub-menu by listing <code>-</code> in the property.</li>
- * </ul>
- *
- *<p> In all cases, each action's
- * menu item label is taken from the <code><i>actionName</i>.label</code>
- * property. View actions are defined in an <code>actions.xml</code>
- * file, file system browser actions are defined in a
- * <code>browser.actions.xml</code> file; see {@link ActionSet}.
- *</p>
- * <h3>Plugin option pane properties</h3>
- *
- * <p>To add your plugin to the <b>Plugin Options</b> dialog box, define one of
- * these two properties:
- *</p>
- * <ul>
- * <li><code>plugin.<i>className</i>.option-pane=<i>paneName</i></code> - if this is defined,
- * a single option pane with this name is added to the <b>Plugin Options</b>
- * menu.</li>
- * <li><code>plugin.<i>className</i>.option-group=<i>paneName1</i> [<i>paneName2 paneName3</i> ...]</code> - if this is defined,
- * a branch node is added to the <b>Plugin Options</b> dialog box whose content
- * is the whitespace-separated list of <i>paneNames</i> in this property.</li>
- * </ul>
- *
- * Then for each option <i>paneName</i>, define these two properties:
- *
- * <ul>
- * <li><code>options.<i>paneName</i>.label</code> - the label to show
- * for the pane in the dialog box.</li>
- * <li><code>options.<i>paneName</i>.code</code> - BeanShell code that
- * evaluates to an instance of the {@link OptionPane} class.</li>
- *
- * <h3>Example</h3>
- *
- * Here is an example set of plugin properties:
- *
- * <pre>plugin.QuickNotepadPlugin.activate=defer
- *plugin.QuickNotepadPlugin.name=QuickNotepad
- *plugin.QuickNotepadPlugin.author=John Gellene
- *plugin.QuickNotepadPlugin.version=4.2
- *plugin.QuickNotepadPlugin.docs=QuickNotepad.html
- *plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
- *plugin.QuickNotepadPlugin.menu=quicknotepad \
- * - \
- * quicknotepad.choose-file \
- * quicknotepad.save-file \
- * quicknotepad.copy-to-buffer
- *plugin.QuickNotepadPlugin.option-pane=quicknotepad
- *
- * plugin.QuickNotepadPlugin.option-pane=quicknotepad
- * plugin.QuickNotepadPlugin.usePluginHome=false
- * options.quicknotepad.code=new QuickNotepadOptionPane();
- * options.quicknotepad.label=QuickNotepad
- * options.quicknotepad.file=File:
- * options.quicknotepad.choose-file=Choose
- * options.quicknotepad.choose-file.title=Choose a notepad file
- * options.quicknotepad.choose-font=Font:
- * options.quicknotepad.show-filepath.title=Display notepad file path
-</pre>
- *
- * Note that action and option pane labels are not shown in the above example.
- *
- * @see org.gjt.sp.jedit.jEdit#getProperty(String)
- * @see org.gjt.sp.jedit.jEdit#getPlugin(String)
- * @see org.gjt.sp.jedit.jEdit#getPlugins()
- * @see org.gjt.sp.jedit.jEdit#getPluginJAR(String)
- * @see org.gjt.sp.jedit.jEdit#getPluginJARs()
- * @see org.gjt.sp.jedit.jEdit#addPluginJAR(String)
- * @see org.gjt.sp.jedit.jEdit#removePluginJAR(PluginJAR,boolean)
- * @see org.gjt.sp.jedit.ActionSet
- * @see org.gjt.sp.jedit.gui.DockableWindowManager
- * @see org.gjt.sp.jedit.OptionPane
- * @see org.gjt.sp.jedit.PluginJAR
- * @see org.gjt.sp.jedit.ServiceManager
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @author Alan Ezust (API documentation)
- * @since jEdit 2.1pre1
- */
-public abstract class EditPlugin
-{
- //{{{ start() method
- /**
- * jEdit calls this method when the plugin is being activated, either
- * during startup or at any other time. A plugin can get activated for
- * a number of reasons:
- *
- * <ul>
- * <li>The plugin is written for jEdit 4.1 or older, in which case it
- * will always be loaded at startup.</li>
- * <li>The plugin has its <code>activate</code> property set to
- * <code>startup</code>, in which case it will always be loaded at
- * startup.</li>
- * <li>One of the properties listed in the plugin's
- * <code>activate</code> property is set to <code>true</code>,
- * in which case it will always be loaded at startup.</li>
- * <li>One of the plugin's classes is being accessed by another plugin,
- * a macro, or a BeanShell snippet in a plugin API XML file.</li>
- * </ul>
- *
- * Note that this method is always called from the event dispatch
- * thread, even if the activation resulted from a class being loaded
- * from another thread. A side effect of this is that some of your
- * plugin's code might get executed before this method finishes
- * running.<p>
- *
- * When this method is being called for plugins written for jEdit 4.1
- * and below, no views or buffers are open. However, this is not the
- * case for plugins using the new API. For example, if your plugin adds
- * tool bars to views, make sure you correctly handle the case where
- * views are already open when the plugin is loaded.<p>
- *
- * If your plugin must be loaded on startup, take care to have this
- * method return as quickly as possible.<p>
- *
- * The default implementation of this method does nothing.
- *
- * @since jEdit 2.1pre1
- */
- public void start() {}
- //}}}
-
- //{{{ stop() method
- /**
- * jEdit calls this method when the plugin is being unloaded. This can
- * be when the program is exiting, or at any other time.<p>
- *
- * If a plugin uses state information or other persistent data
- * that should be stored in a special format, this would be a good place
- * to write the data to storage. If the plugin uses jEdit's properties
- * API to hold settings, no special processing is needed for them on
- * exit, since they will be saved automatically.<p>
- *
- * With plugins written for jEdit 4.1 and below, this method is only
- * called when the program is exiting. However, this is not the case
- * for plugins using the new API. For example, if your plugin adds
- * tool bars to views, make sure you correctly handle the case where
- * views are still open when the plugin is unloaded.<p>
- *
- * To avoid memory leaks, this method should ensure that no references
- * to any objects created by this plugin remain in the heap. In the
- * case of actions, dockable windows and services, jEdit ensures this
- * automatically. For other objects, your plugin must clean up maually.
- * <p>
- *
- * The default implementation of this method does nothing.
- *
- * @since jEdit 2.1pre1
- */
- public void stop() {} //}}}
-
- //{{{ getPluginHome() method
- /**
- * Returns the home of your plugin.
- *
- * @return the plugin home. It can be null if there is no
- * settings directory
- * @since 4.3pre10
- * @see #getResourceAsStream
- * @see #getResourceAsOutputStream
- * @see #getResourcePath
- */
- public File getPluginHome()
- {
- return getPluginHome(getClassName());
- } //}}}
-
- //{{{ getPluginHome() method
- /**
- * <p>Returns the home of the specified plugin.</p>
- *
- * <p>Since the first parameter is a reference to the
- * {@code Class} instance for the plugin,
- * this method requires the plugin to be activated.</p>
- *
- * <p>See {@link #getPluginHome(EditPlugin)} method, as
- * an alternate, for when the plugin doesn't need
- * to be activated, or when you do not have the
- * {@code Class} instance available.</p>
- *
- * @param clazz the class of the plugin
- * @return the plugin home. It can be null if there is no
- * settings directory
- * @since 4.3pre10
- * @see #getPluginHome(EditPlugin)
- * @see #getResourceAsStream
- * @see #getResourceAsOutputStream
- * @see #getResourcePath
- */
- public static File getPluginHome(Class<? extends EditPlugin> clazz)
- {
- return getPluginHome(clazz.getName());
- } //}}}
-
- //{{{ getPluginHome() method
- /**
- * <p>Returns the home of the specified plugin.</p>
- *
- * <p>This method doesn't need the plugin to be activated. You can pass
- * an {@code EditPlugin.Deferred} instance that you get from
- * {@code jEdit.getPlugin(String)} or {@code jEdit.getPlugins()} if
- * the plugin in question is not activated yet and this method doesn't
- * cause the plugin to get activated. If you have a reference to the
- * plugins {@code Class} instance available, consider using the
- * {@code Class} method.</p>
- *
- * @param plugin the plugin
- * @return the plugin home. It can be null if there is no settings directory
- * @since 4.3pre10
- * @see #getPluginHome(Class)
- * @see #getResourceAsStream
- * @see #getResourceAsOutputStream
- * @see #getResourcePath
- */
- public static File getPluginHome(EditPlugin plugin)
- {
- return getPluginHome(plugin.getClassName());
- } //}}}
-
- //{{{ getPluginHome() method
- /**
- * Returns the home of the specified plugin.
- *
- * @param pluginClassName the plugin class name (fully qualified)
- * @return the plugin home. It can be null if there is no settings directory
- * @since 4.3pre10
- * @see #getResourceAsStream
- * @see #getResourceAsOutputStream
- * @see #getResourcePath
- */
- private static File getPluginHome(String pluginClassName)
- {
- String settingsDirectory = jEdit.getSettingsDirectory();
- if (settingsDirectory == null)
- return null;
-
- File file = new File(settingsDirectory, "plugins");
- if (!file.isDirectory())
- {
- if (!file.mkdir())
- {
- Log.log(Log.ERROR, EditPlugin.class, "Can't create directory:" + file.getAbsolutePath());
- }
- }
- return new File(file, pluginClassName);
- } //}}}
-
- //{{{ getResourceAsStream() method
- /**
- * <p>Returns an input stream to the specified resource, or {@code null}
- * if none is found.</p>
- *
- * <p>Since the first parameter is a reference to the
- * {@code Class} instance for the plugin,
- * this method requires the plugin to be activated.</p>
- *
- * <p>See {@link #getResourceAsStream(EditPlugin,String)} method, as
- * an alternate, for when the plugin doesn't need
- * to be activated, or when you do not have the
- * {@code Class} instance available.</p>
- *
- * @param clazz the plugin class
- * @param path The path to the resource to be returned, relative to
- * the plugin's resource path.
- * @return An input stream for the resource, or <code>null</code>.
- * @since 4.3pre10
- * @see #getPluginHome
- * @see #getResourceAsStream(EditPlugin,String)
- * @see #getResourceAsOutputStream
- * @see #getResourcePath
- */
- public static InputStream getResourceAsStream(Class<? extends EditPlugin> clazz, String path)
- {
- return getResourceAsStream(clazz.getName(), path);
- } //}}}
-
- //{{{ getResourceAsStream() method
- /**
- * <p>Returns an input stream to the specified resource, or <code>null</code>
- * if none is found.</p>
- *
- * <p>This method doesn't need the plugin to be activated. You can pass
- * an {@code EditPlugin.Deferred} instance that you get from
- * {@code jEdit.getPlugin(String)} or {@code jEdit.getPlugins()} if
- * the plugin in question is not activated yet and this method doesn't
- * cause the plugin to get activated. If you have a reference to the
- * plugins {@code Class} instance available, consider using the
- * {@code Class} method.</p>
- *
- * @param plugin the plugin
- * @param path The path to the resource to be returned, relative to
- * the plugin's resource path.
- * @return An input stream for the resource, or <code>null</code>.
- * @since 4.3pre10
- * @see #getPluginHome
- * @see #getResourceAsStream(Class,String)
- * @see #getResourceAsOutputStream
- * @see #getResourcePath
- */
- public static InputStream getResourceAsStream(EditPlugin plugin, String path)
- {
- return getResourceAsStream(plugin.getClassName(), path);
- } //}}}
-
- //{{{ getResourceAsStream() method
- /**
- * Returns an input stream to the specified resource, or <code>null</code>
- * if none is found.
- *
- * @param pluginClassName the plugin class name (fully qualified)
- * @param path The path to the resource to be returned, relative to
- * the plugin's resource path.
- * @return An input stream for the resource, or <code>null</code>.
- * @since 4.3pre10
- * @see #getPluginHome
- * @see #getResourceAsOutputStream
- * @see #getResourcePath
- */
- private static InputStream getResourceAsStream(String pluginClassName, String path)
- {
- try
- {
- File file = getResourcePath(pluginClassName, path);
- if (file == null || !file.exists())
- return null;
- return new FileInputStream(file);
- }
- catch (IOException e)
- {
- return null;
- }
- } //}}}
-
- //{{{ getResourceAsOutputStream() method
- /**
- * <p>Returns an output stream to the specified resource, or {@code null}
- * if access to that resource is denied.</p>
- *
- * <p>Since the first parameter is a reference to the
- * {@code Class} instance for the plugin,
- * this method requires the plugin to be activated.</p>
- *
- * <p>See {@link #getResourceAsOutputStream(EditPlugin,String)} method, as
- * an alternate, for when the plugin doesn't need
- * to be activated, or when you do not have the
- * {@code Class} instance available.</p>
- *
- * @param clazz the plugin class
- * @param path The path to the resource to be returned, relative to
- * the plugin's resource path.
- * @return An output stream for the resource, or <code>null</code>.
- * @since 4.3pre10
- * @see #getPluginHome
- * @see #getResourceAsOutputStream(EditPlugin,String)
- * @see #getResourceAsStream
- * @see #getResourcePath
- */
- public static OutputStream getResourceAsOutputStream(Class<? extends EditPlugin> clazz, String path)
- {
- return getResourceAsOutputStream(clazz.getName(), path);
- } //}}}
-
- //{{{ getResourceAsOutputStream() method
- /**
- * <p>Returns an output stream to the specified resource, or <code>null</node> if access
- * to that resource is denied.</p>
- *
- * <p>This method doesn't need the plugin to be activated. You can pass
- * an {@code EditPlugin.Deferred} instance that you get from
- * {@code jEdit.getPlugin(String)} or {@code jEdit.getPlugins()} if
- * the plugin in question is not activated yet and this method doesn't
- * cause the plugin to get activated. If you have a reference to the
- * plugins {@code Class} instance available, consider using the
- * {@code Class} method.</p>
- *
- * @param plugin the plugin
- * @param path The path to the resource to be returned, relative to
- * the plugin's resource path.
- * @return An output stream for the resource, or <code>null</code>.
- * @since 4.3pre10
- * @see #getPluginHome
- * @see #getResourceAsOutputStream(Class,String)
- * @see #getResourceAsStream
- * @see #getResourcePath
- */
- public static OutputStream getResourceAsOutputStream(EditPlugin plugin, String path)
- {
- return getResourceAsOutputStream(plugin.getClassName(), path);
- } //}}}
-
- //{{{ getResourceAsOutputStream() method
- /**
- * Returns an output stream to the specified resource, or <code>null</node> if access
- * to that resource is denied.
- *
- * @param pluginClassName the plugin class name (fully qualified)
- * @param path The path to the resource to be returned, relative to
- * the plugin's resource path.
- * @return An output stream for the resource, or <code>null</code>.
- * @since 4.3pre10
- * @see #getPluginHome
- * @see #getResourceAsStream
- * @see #getResourcePath
- */
- private static OutputStream getResourceAsOutputStream(String pluginClassName, String path)
- {
- try
- {
- File file = getResourcePath(pluginClassName, path);
- if (file == null)
- return null;
- File parentFile = file.getParentFile();
- if (!parentFile.exists())
- {
- if (!parentFile.mkdirs())
- {
- Log.log(Log.ERROR, EditPlugin.class, "Unable to create folder " + parentFile.getPath());
- return null;
- }
- }
- return new FileOutputStream(file);
- }
- catch (IOException e)
- {
- return null;
- }
- } //}}}
-
- //{{{ getResourcePath() method
- /**
- * <p>Returns the full path of the specified plugin resource.</p>
- *
- * <p>Since the first parameter is a reference to the
- * {@code Class} instance for the plugin,
- * this method requires the plugin to be activated.</p>
- *
- * <p>See {@link #getResourcePath(EditPlugin,String)} method, as
- * an alternate, for when the plugin doesn't need
- * to be activated, or when you do not have the
- * {@code Class} instance available.</p>
- *
- * @param clazz the plugin class
- * @param path The relative path to the resource from the plugin's
- * resource path.
- * @return The absolute path to the resource or null if there is no plugin home.
- * @since 4.3pre10
- * @see #getPluginHome
- * @see #getResourceAsOutputStream
- * @see #getResourceAsStream
- * @see #getResourcePath(EditPlugin,String)
- */
- public static File getResourcePath(Class<? extends EditPlugin> clazz, String path)
- {
- return getResourcePath(clazz.getName(), path);
- } //}}}
-
- //{{{ getResourcePath() method
- /**
- * <p>Returns the full path of the specified plugin resource.</p>
- *
- * <p>This method doesn't need the plugin to be activated. You can pass
- * an {@code EditPlugin.Deferred} instance that you get from
- * {@code jEdit.getPlugin(String)} or {@code jEdit.getPlugins()} if
- * the plugin in question is not activated yet and this method doesn't
- * cause the plugin to get activated. If you have a reference to the
- * plugins {@code Class} instance available, consider using the
- * {@code Class} method.</p>
- *
- * @param plugin the plugin
- * @param path The relative path to the resource from the plugin's
- * resource path.
- * @return The absolute path to the resource or null if there is no plugin home.
- * @since 4.3pre10
- * @see #getPluginHome
- * @see #getResourceAsOutputStream
- * @see #getResourceAsStream
- * @see #getResourcePath(Class,String)
- */
- public static File getResourcePath(EditPlugin plugin, String path)
- {
- return getResourcePath(plugin.getClassName(), path);
- } //}}}
-
- //{{{ getResourcePath() method
- /**
- * Returns the full path of the specified plugin resource.
- *
- * @param pluginClassName the plugin class name (fully qualified)
- * @param path The relative path to the resource from the plugin's
- * resource path.
- * @return The absolute path to the resource or null if there is no plugin home.
- * @since 4.3pre10
- * @see #getPluginHome
- * @see #getResourceAsOutputStream
- * @see #getResourceAsStream
- */
- private static File getResourcePath(String pluginClassName, String path)
- {
- File home = getPluginHome(pluginClassName);
- if (home == null)
- return null;
- return new File(home, path);
- } //}}}
-
- //{{{ getClassName() method
- /**
- * Returns the plugin's class name. This might not be the same as
- * the class of the actual <code>EditPlugin</code> instance, for
- * example if the plugin is not loaded yet.
- *
- * @since jEdit 2.5pre3
- */
- public String getClassName()
- {
- return getClass().getName();
- } //}}}
-
- //{{{ getPluginJAR() method
- /**
- * Returns the JAR file containing this plugin.
- * @since jEdit 4.2pre1
- */
- public PluginJAR getPluginJAR()
- {
- return jar;
- } //}}}
-
- //{{{ createMenuItems() method
- /**
- * Called by the view when constructing its <b>Plugins</b> menu.
- * See the description of this class for details about how the
- * menu items are constructed from plugin properties.
- *
- * @since jEdit 4.2pre1
- */
- public final JMenuItem createMenuItems()
- {
- if(this instanceof Broken)
- return null;
-
- String menuItemName = jEdit.getProperty("plugin." +
- getClassName() + ".menu-item");
- if(menuItemName != null)
- return GUIUtilities.loadMenuItem(menuItemName);
-
- String menuProperty = "plugin." + getClassName() + ".menu";
- String codeProperty = "plugin." + getClassName() + ".menu.code";
- if(jEdit.getProperty(menuProperty) != null
- || jEdit.getProperty(codeProperty) != null)
- {
- String pluginName = jEdit.getProperty("plugin." +
- getClassName() + ".name");
- return new EnhancedMenu(menuProperty,pluginName);
- }
-
- return null;
- } //}}}
-
- //{{{ createBrowserMenuItems() method
- /**
- * Called by the filesystem browser when constructing its
- * <b>Plugins</b> menu.
- * See the description of this class for details about how the
- * menu items are constructed from plugin properties.
- *
- * @since jEdit 4.2pre1
- */
- public final JMenuItem createBrowserMenuItems()
- {
- if(this instanceof Broken)
- return null;
-
- String menuItemName = jEdit.getProperty("plugin." +
- getClassName() + ".browser-menu-item");
- if(menuItemName != null)
- {
- return GUIUtilities.loadMenuItem(
- VFSBrowser.getActionContext(),
- menuItemName,
- false);
- }
-
- String menuProperty = "plugin." + getClassName() + ".browser-menu";
- if(jEdit.getProperty(menuProperty) != null)
- {
- String pluginName = jEdit.getProperty("plugin." +
- getClassName() + ".name");
- return new EnhancedMenu(menuProperty,pluginName,
- VFSBrowser.getActionContext());
- }
-
- return null;
- } //}}}
-
- //{{{ Deprecated methods
-
- //{{{ createMenuItems() method
- /**
- * @deprecated Instead of overriding this method, define properties
- * as specified in the description of this class.
- */
- public void createMenuItems(Vector menuItems) {} //}}}
-
- //{{{ createOptionPanes() method
- /**
- * @deprecated Instead of overriding this method, define properties
- * as specified in the description of this class.
- */
- public void createOptionPanes(OptionsDialog optionsDialog) {} //}}}
-
- //}}}
-
- //{{{ Package-private members
- PluginJAR jar;
- //}}}
-
- //{{{ Broken class
- /**
- * A placeholder for a plugin that didn't load.
- * @see jEdit#getPlugin(String)
- * @see PluginJAR#getPlugin()
- * @see PluginJAR#activatePlugin()
- */
- public static class Broken extends EditPlugin
- {
- public String getClassName()
- {
- return clazz;
- }
-
- // package-private members
- Broken(PluginJAR jar, String clazz)
- {
- this.jar = jar;
- this.clazz = clazz;
- }
-
- // private members
- private String clazz;
- } //}}}
-
- //{{{ Deferred class
- /**
- * A placeholder for a plugin that hasn't been loaded yet.
- * @see jEdit#getPlugin(String)
- * @see PluginJAR#getPlugin()
- * @see PluginJAR#activatePlugin()
- */
- public static class Deferred extends EditPlugin
- {
- public String getClassName()
- {
- return clazz;
- }
-
- // package-private members
- Deferred(PluginJAR jar, String clazz)
- {
- this.jar = jar;
- this.clazz = clazz;
- }
-
- EditPlugin loadPluginClass()
- {
- return null;
- }
-
- public String toString()
- {
- return "Deferred[" + clazz + ']';
- }
-
- // private members
- private String clazz;
- } //}}}
-}
+/*
+ * EditPlugin.java - Abstract class all plugins must implement
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import org.gjt.sp.jedit.browser.VFSBrowser;
+import org.gjt.sp.jedit.gui.OptionsDialog;
+import org.gjt.sp.jedit.menu.EnhancedMenu;
+import org.gjt.sp.util.Log;
+
+import javax.swing.*;
+import java.io.*;
+import java.util.Vector;
+
+/**
+ * The abstract base class that every plugin must implement.
+ * Alternatively, instead of extending this class, a plugin core class can
+ * extend {@link EBPlugin} to automatically receive EditBus messages.
+ *
+ * <h3>Basic plugin information properties</h3>
+ *
+ * Note that in all cases above where a <i>className</i> is needed, the fully
+ * qualified class name, including the package name, if any, must be used.<p>
+ *
+ * The following properties are required for jEdit to load the plugin:
+ *
+ * <ul>
+ * <li><code>plugin.<i>className</i>.activate</code> - set this to
+ * <code>defer</code> if your plugin only needs to be loaded when it is first
+ * invoked; set it to <code>startup</code> if your plugin must be loaded at
+ * startup regardless; set it to a whitespace-separated list of property names
+ * if your plugin should be loaded if at least one of these properties is set.
+ * Note that if this property is <b>not</b> set, the plugin will not work with
+ * jEdit 4.3final.
+ * </li>
+ * <li><code>plugin.<i>className</i>.name</code></li>
+ * <li><code>plugin.<i>className</i>.version</code></li>
+ * <li><code>plugin.<i>className</i>.jars</code> - only needed if your plugin
+ * bundles external JAR files. Contains a whitespace-separated list of JAR
+ * file names. Without this property, the plugin manager will leave behind the
+ * external JAR files when removing the plugin.</li>
+ * <li><code>plugin.<i>className</i>.files</code> - only needed if your plugin
+ * bundles external files like libraries which MUST reside in the local
+ * filesystem. Contains a whitespace-separated list of file names.
+ * Without this property, the plugin manager will leave behind the
+ * external files when removing the plugin.</li>
+ * <li><code>plugin.<i>className</i>.description</code> - the short description
+ * associated with the plugin. The short description is used by the Plugin
+ * Manager and on the list pages on Plugin Central. </li>
+ * </ul>
+ *
+ * The following properties are optional but recommended:
+ *
+ * <ul>
+ * <li><code>plugin.<i>className</i>.author</code></li>
+ * <li><code>plugin.<i>className</i>.usePluginHome</code> - whether
+ * the plugin uses the EditPlugin.getPluginHome API or not. Even
+ * if the plugin doesn't store any data, this property should be set
+ * so that the plugin manager can tell that there is no data stored.</li>
+ * <li><code>plugin.<i>className</i>.docs</code> - the path to plugin
+ * documentation in HTML format. </li>
+ * <li><code>plugin.<i>className</i>.longdescription</code> - the path to
+ * the long description in XHTML (no fancy stuff here, please - just proper
+ * XHTML subset with the basic tags: <tt>html, h1, h2, p, li, ul, ol, a href,b ,i, u, br/ </tt>)
+ * <p> The long description is extracted from the plugin at various times,
+ * primarily at plugin packaging time to update the data on the
+ * plugin detail pages of Plugin Central. </p>
+ * <p>
+ * If this property is left out, the default will be to look in a file
+ * called <description.html>. </p>
+ *</li>
+ *</ul>
+ *<p>
+ * For the previous two properties, if a relative path is supplied,
+ * it should be both </p>
+ * <ol>
+ * <li> relative to the location of the .props file (when it is in the source tree) </li>
+ * <li> relative to the root of the JAR (when it is packaged in the JAR file) </li>
+ *</ol>
+ *
+ *<p> Both conditions are easily satisfied if the .props file as well as
+ * description.html are both located in the root directory of the plugin,
+ * as well as the generated JAR. </p>
+ *
+ * <h3>Plugin dependency properties</h3>
+ *
+ * <p>Plugin dependencies are also specified using properties.
+ * Each dependency is defined in a property named with
+ * <code>plugin.<i>className</i>.depend.</code> followed by a number.
+ * Dependencies must be numbered in order, starting from zero.
+ * This determines the order that dependent plugins get loaded and activated,
+ * so order is very important. </p>
+*
+ * <p> The value of a dependency property has one of the following forms: </p>
+ *
+ * <ul>
+ * <li> <code>jdk <i>minimumJavaVersion</i></code> </li>
+ * <li> <code>jedit <i>minimumjEditVersion</i></code> - note that this must be
+ * a version number in the form returned by {@link jEdit#getBuild()},
+ * not {@link jEdit#getVersion()}. Note that the documentation here describes
+ * the jEdit 4.2 plugin API, so this dependency must be set to at least
+ * <code>04.02.99.00</code> (4.2final).</li>
+ * <li><code><i>pluginClassName pluginVersion</i></code> - the fully quailified
+ * plugin class name with package must be specified.</li>
+ * <li><code>optional plugin <i>pluginClassName pluginVersion</i></code> -
+ * an optional dependency, indicating that the plugin will work without it,
+ * but that the dependency should be loaded before this plugin. </li>
+</ul>
+
+ <p>In this example, the ProjectViewer plugin is an optional dependency of
+ the Console, beacause the Console only listens to events from the ProjectViewer.
+ It requires Jedit 4.2 final. </p>
+
+<pre>
+plugin.console.ConsolePlugin.depend.0=jedit 04.02.99.00
+plugin.console.ConsolePlugin.depend.1=jdk 1.5
+plugin.console.ConsolePlugin.depend.2=plugin errorlist.ErrorListPlugin 1.4
+plugin.console.ConsolePlugin.depend.3=optional plugin projectviewer.ProjectPlugin 2.1.0.92
+</pre>
+
+ * <h3>Plugin menu item properties</h3>
+ *
+ *<p> To add your plugin to the view's <b>Plugins</b> menu, define one of these two
+ * properties: </p>
+ *
+ * <ul>
+ * <li><code>plugin.<i>className</i>.menu-item</code> - if this is defined,
+ * the action named by this property is added to the <b>Plugins</b> menu.</li>
+ * <li><code>plugin.<i>className</i>.menu</code> - if this is defined,
+ * a sub-menu is added to the <b>Plugins</b> menu whose content is the
+ * whitespace-separated list of action names in this property. A separator may
+ * be added to the sub-menu by listing <code>-</code> in the property.</li>
+ * </ul>
+ *
+ * <p>If you want the plugin's menu items to be determined at runtime, define a
+ * property <code>plugin.<i>className</i>.menu.code</code> to be BeanShell
+ * code that evaluates to an implementation of
+ * {@link org.gjt.sp.jedit.menu.DynamicMenuProvider}.</p>
+ *<p>
+ * To add your plugin to the file system browser's <b>Plugins</b> menu, define
+ * one of these two properties:
+ *</p>
+ * <ul>
+ * <li><code>plugin.<i>className</i>.browser-menu-item</code> - if this is
+ * defined, the action named by this property is added to the <b>Plugins</b>
+ * menu.</li>
+ * <li><code>plugin.<i>className</i>.browser-menu</code> - if this is defined,
+ * a sub-menu is added to the <b>Plugins</b> menu whose content is the
+ * whitespace-separated list of action names in this property. A separator may
+ * be added to the sub-menu by listing <code>-</code> in the property.</li>
+ * </ul>
+ *
+ * <p>Again, if the browser menu items need to be determined at runtime, define a
+ * property <code>plugin.<i>className</i>.browser-menu.code</code> to be BeanShell
+ * code that evaluates to an implementation of
+ * {@link org.gjt.sp.jedit.menu.DynamicMenuProvider}.</p>
+ *<p>
+ *
+ *<p> In all cases, each action's
+ * menu item label is taken from the <code><i>actionName</i>.label</code>
+ * property. View actions are defined in an <code>actions.xml</code>
+ * file, file system browser actions are defined in a
+ * <code>browser.actions.xml</code> file; see {@link ActionSet}.
+ *</p>
+ * <h3>Plugin option pane properties</h3>
+ *
+ * <p>To add your plugin to the <b>Plugin Options</b> dialog box, define one of
+ * these two properties:
+ *</p>
+ * <ul>
+ * <li><code>plugin.<i>className</i>.option-pane=<i>paneName</i></code> - if this is defined,
+ * a single option pane with this name is added to the <b>Plugin Options</b>
+ * menu.</li>
+ * <li><code>plugin.<i>className</i>.option-group=<i>paneName1</i> [<i>paneName2 paneName3</i> ...]</code> - if this is defined,
+ * a branch node is added to the <b>Plugin Options</b> dialog box whose content
+ * is the whitespace-separated list of <i>paneNames</i> in this property.</li>
+ * </ul>
+ *
+ * Then for each option <i>paneName</i>, define these two properties:
+ *
+ * <ul>
+ * <li><code>options.<i>paneName</i>.label</code> - the label to show
+ * for the pane in the dialog box.</li>
+ * <li><code>options.<i>paneName</i>.code</code> - BeanShell code that
+ * evaluates to an instance of the {@link OptionPane} class.</li>
+ *
+ * <h3>Example</h3>
+ *
+ * Here is an example set of plugin properties:
+ *
+ * <pre>plugin.QuickNotepadPlugin.activate=defer
+ *plugin.QuickNotepadPlugin.name=QuickNotepad
+ *plugin.QuickNotepadPlugin.author=John Gellene
+ *plugin.QuickNotepadPlugin.version=4.2
+ *plugin.QuickNotepadPlugin.docs=QuickNotepad.html
+ *plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
+ *plugin.QuickNotepadPlugin.menu=quicknotepad \
+ * - \
+ * quicknotepad.choose-file \
+ * quicknotepad.save-file \
+ * quicknotepad.copy-to-buffer
+ *plugin.QuickNotepadPlugin.option-pane=quicknotepad
+ *
+ * plugin.QuickNotepadPlugin.option-pane=quicknotepad
+ * plugin.QuickNotepadPlugin.usePluginHome=false
+ * options.quicknotepad.code=new QuickNotepadOptionPane();
+ * options.quicknotepad.label=QuickNotepad
+ * options.quicknotepad.file=File:
+ * options.quicknotepad.choose-file=Choose
+ * options.quicknotepad.choose-file.title=Choose a notepad file
+ * options.quicknotepad.choose-font=Font:
+ * options.quicknotepad.show-filepath.title=Display notepad file path
+</pre>
+ *
+ * Note that action and option pane labels are not shown in the above example.
+ *
+ * @see org.gjt.sp.jedit.jEdit#getProperty(String)
+ * @see org.gjt.sp.jedit.jEdit#getPlugin(String)
+ * @see org.gjt.sp.jedit.jEdit#getPlugins()
+ * @see org.gjt.sp.jedit.jEdit#getPluginJAR(String)
+ * @see org.gjt.sp.jedit.jEdit#getPluginJARs()
+ * @see org.gjt.sp.jedit.jEdit#addPluginJAR(String)
+ * @see org.gjt.sp.jedit.jEdit#removePluginJAR(PluginJAR,boolean)
+ * @see org.gjt.sp.jedit.ActionSet
+ * @see org.gjt.sp.jedit.gui.DockableWindowManager
+ * @see org.gjt.sp.jedit.OptionPane
+ * @see org.gjt.sp.jedit.PluginJAR
+ * @see org.gjt.sp.jedit.ServiceManager
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @author Alan Ezust (API documentation)
+ * @since jEdit 2.1pre1
+ */
+public abstract class EditPlugin
+{
+ //{{{ start() method
+ /**
+ * jEdit calls this method when the plugin is being activated, either
+ * during startup or at any other time. A plugin can get activated for
+ * a number of reasons:
+ *
+ * <ul>
+ * <li>The plugin is written for jEdit 4.1 or older, in which case it
+ * will always be loaded at startup.</li>
+ * <li>The plugin has its <code>activate</code> property set to
+ * <code>startup</code>, in which case it will always be loaded at
+ * startup.</li>
+ * <li>One of the properties listed in the plugin's
+ * <code>activate</code> property is set to <code>true</code>,
+ * in which case it will always be loaded at startup.</li>
+ * <li>One of the plugin's classes is being accessed by another plugin,
+ * a macro, or a BeanShell snippet in a plugin API XML file.</li>
+ * </ul>
+ *
+ * Note that this method is always called from the event dispatch
+ * thread, even if the activation resulted from a class being loaded
+ * from another thread. A side effect of this is that some of your
+ * plugin's code might get executed before this method finishes
+ * running.<p>
+ *
+ * When this method is being called for plugins written for jEdit 4.1
+ * and below, no views or buffers are open. However, this is not the
+ * case for plugins using the new API. For example, if your plugin adds
+ * tool bars to views, make sure you correctly handle the case where
+ * views are already open when the plugin is loaded.<p>
+ *
+ * If your plugin must be loaded on startup, take care to have this
+ * method return as quickly as possible.<p>
+ *
+ * The default implementation of this method does nothing.
+ *
+ * @since jEdit 2.1pre1
+ */
+ public void start() {}
+ //}}}
+
+ //{{{ stop() method
+ /**
+ * jEdit calls this method when the plugin is being unloaded. This can
+ * be when the program is exiting, or at any other time.<p>
+ *
+ * If a plugin uses state information or other persistent data
+ * that should be stored in a special format, this would be a good place
+ * to write the data to storage. If the plugin uses jEdit's properties
+ * API to hold settings, no special processing is needed for them on
+ * exit, since they will be saved automatically.<p>
+ *
+ * With plugins written for jEdit 4.1 and below, this method is only
+ * called when the program is exiting. However, this is not the case
+ * for plugins using the new API. For example, if your plugin adds
+ * tool bars to views, make sure you correctly handle the case where
+ * views are still open when the plugin is unloaded.<p>
+ *
+ * To avoid memory leaks, this method should ensure that no references
+ * to any objects created by this plugin remain in the heap. In the
+ * case of actions, dockable windows and services, jEdit ensures this
+ * automatically. For other objects, your plugin must clean up maually.
+ * <p>
+ *
+ * The default implementation of this method does nothing.
+ *
+ * @since jEdit 2.1pre1
+ */
+ public void stop() {} //}}}
+
+ //{{{ getPluginHome() method
+ /**
+ * Returns the home of your plugin.
+ *
+ * @return the plugin home. It can be null if there is no
+ * settings directory
+ * @since 4.3pre10
+ * @see #getResourceAsStream
+ * @see #getResourceAsOutputStream
+ * @see #getResourcePath
+ */
+ public File getPluginHome()
+ {
+ return getPluginHome(getClassName());
+ } //}}}
+
+ //{{{ getPluginHome() method
+ /**
+ * <p>Returns the home of the specified plugin.</p>
+ *
+ * <p>Since the first parameter is a reference to the
+ * {@code Class} instance for the plugin,
+ * this method requires the plugin to be activated.</p>
+ *
+ * <p>See {@link #getPluginHome(EditPlugin)} method, as
+ * an alternate, for when the plugin doesn't need
+ * to be activated, or when you do not have the
+ * {@code Class} instance available.</p>
+ *
+ * @param clazz the class of the plugin
+ * @return the plugin home. It can be null if there is no
+ * settings directory
+ * @since 4.3pre10
+ * @see #getPluginHome(EditPlugin)
+ * @see #getResourceAsStream
+ * @see #getResourceAsOutputStream
+ * @see #getResourcePath
+ */
+ public static File getPluginHome(Class<? extends EditPlugin> clazz)
+ {
+ return getPluginHome(clazz.getName());
+ } //}}}
+
+ //{{{ getPluginHome() method
+ /**
+ * <p>Returns the home of the specified plugin.</p>
+ *
+ * <p>This method doesn't need the plugin to be activated. You can pass
+ * an {@code EditPlugin.Deferred} instance that you get from
+ * {@code jEdit.getPlugin(String)} or {@code jEdit.getPlugins()} if
+ * the plugin in question is not activated yet and this method doesn't
+ * cause the plugin to get activated. If you have a reference to the
+ * plugins {@code Class} instance available, consider using the
+ * {@code Class} method.</p>
+ *
+ * @param plugin the plugin
+ * @return the plugin home. It can be null if there is no settings directory
+ * @since 4.3pre10
+ * @see #getPluginHome(Class)
+ * @see #getResourceAsStream
+ * @see #getResourceAsOutputStream
+ * @see #getResourcePath
+ */
+ public static File getPluginHome(EditPlugin plugin)
+ {
+ return getPluginHome(plugin.getClassName());
+ } //}}}
+
+ //{{{ getPluginHome() method
+ /**
+ * Returns the home of the specified plugin.
+ *
+ * @param pluginClassName the plugin class name (fully qualified)
+ * @return the plugin home. It can be null if there is no settings directory
+ * @since 4.3pre10
+ * @see #getResourceAsStream
+ * @see #getResourceAsOutputStream
+ * @see #getResourcePath
+ */
+ private static File getPluginHome(String pluginClassName)
+ {
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if (settingsDirectory == null)
+ return null;
+
+ File file = new File(settingsDirectory, "plugins");
+ if (!file.isDirectory())
+ {
+ if (!file.mkdir())
+ {
+ Log.log(Log.ERROR, EditPlugin.class, "Can't create directory:" + file.getAbsolutePath());
+ }
+ }
+ return new File(file, pluginClassName);
+ } //}}}
+
+ //{{{ getResourceAsStream() method
+ /**
+ * <p>Returns an input stream to the specified resource, or {@code null}
+ * if none is found.</p>
+ *
+ * <p>Since the first parameter is a reference to the
+ * {@code Class} instance for the plugin,
+ * this method requires the plugin to be activated.</p>
+ *
+ * <p>See {@link #getResourceAsStream(EditPlugin,String)} method, as
+ * an alternate, for when the plugin doesn't need
+ * to be activated, or when you do not have the
+ * {@code Class} instance available.</p>
+ *
+ * @param clazz the plugin class
+ * @param path The path to the resource to be returned, relative to
+ * the plugin's resource path.
+ * @return An input stream for the resource, or <code>null</code>.
+ * @since 4.3pre10
+ * @see #getPluginHome
+ * @see #getResourceAsStream(EditPlugin,String)
+ * @see #getResourceAsOutputStream
+ * @see #getResourcePath
+ */
+ public static InputStream getResourceAsStream(Class<? extends EditPlugin> clazz, String path)
+ {
+ return getResourceAsStream(clazz.getName(), path);
+ } //}}}
+
+ //{{{ getResourceAsStream() method
+ /**
+ * <p>Returns an input stream to the specified resource, or <code>null</code>
+ * if none is found.</p>
+ *
+ * <p>This method doesn't need the plugin to be activated. You can pass
+ * an {@code EditPlugin.Deferred} instance that you get from
+ * {@code jEdit.getPlugin(String)} or {@code jEdit.getPlugins()} if
+ * the plugin in question is not activated yet and this method doesn't
+ * cause the plugin to get activated. If you have a reference to the
+ * plugins {@code Class} instance available, consider using the
+ * {@code Class} method.</p>
+ *
+ * @param plugin the plugin
+ * @param path The path to the resource to be returned, relative to
+ * the plugin's resource path.
+ * @return An input stream for the resource, or <code>null</code>.
+ * @since 4.3pre10
+ * @see #getPluginHome
+ * @see #getResourceAsStream(Class,String)
+ * @see #getResourceAsOutputStream
+ * @see #getResourcePath
+ */
+ public static InputStream getResourceAsStream(EditPlugin plugin, String path)
+ {
+ return getResourceAsStream(plugin.getClassName(), path);
+ } //}}}
+
+ //{{{ getResourceAsStream() method
+ /**
+ * Returns an input stream to the specified resource, or <code>null</code>
+ * if none is found.
+ *
+ * @param pluginClassName the plugin class name (fully qualified)
+ * @param path The path to the resource to be returned, relative to
+ * the plugin's resource path.
+ * @return An input stream for the resource, or <code>null</code>.
+ * @since 4.3pre10
+ * @see #getPluginHome
+ * @see #getResourceAsOutputStream
+ * @see #getResourcePath
+ */
+ private static InputStream getResourceAsStream(String pluginClassName, String path)
+ {
+ try
+ {
+ File file = getResourcePath(pluginClassName, path);
+ if (file == null || !file.exists())
+ return null;
+ return new FileInputStream(file);
+ }
+ catch (IOException e)
+ {
+ return null;
+ }
+ } //}}}
+
+ //{{{ getResourceAsOutputStream() method
+ /**
+ * <p>Returns an output stream to the specified resource, or {@code null}
+ * if access to that resource is denied.</p>
+ *
+ * <p>Since the first parameter is a reference to the
+ * {@code Class} instance for the plugin,
+ * this method requires the plugin to be activated.</p>
+ *
+ * <p>See {@link #getResourceAsOutputStream(EditPlugin,String)} method, as
+ * an alternate, for when the plugin doesn't need
+ * to be activated, or when you do not have the
+ * {@code Class} instance available.</p>
+ *
+ * @param clazz the plugin class
+ * @param path The path to the resource to be returned, relative to
+ * the plugin's resource path.
+ * @return An output stream for the resource, or <code>null</code>.
+ * @since 4.3pre10
+ * @see #getPluginHome
+ * @see #getResourceAsOutputStream(EditPlugin,String)
+ * @see #getResourceAsStream
+ * @see #getResourcePath
+ */
+ public static OutputStream getResourceAsOutputStream(Class<? extends EditPlugin> clazz, String path)
+ {
+ return getResourceAsOutputStream(clazz.getName(), path);
+ } //}}}
+
+ //{{{ getResourceAsOutputStream() method
+ /**
+ * <p>Returns an output stream to the specified resource, or <code>null</node> if access
+ * to that resource is denied.</p>
+ *
+ * <p>This method doesn't need the plugin to be activated. You can pass
+ * an {@code EditPlugin.Deferred} instance that you get from
+ * {@code jEdit.getPlugin(String)} or {@code jEdit.getPlugins()} if
+ * the plugin in question is not activated yet and this method doesn't
+ * cause the plugin to get activated. If you have a reference to the
+ * plugins {@code Class} instance available, consider using the
+ * {@code Class} method.</p>
+ *
+ * @param plugin the plugin
+ * @param path The path to the resource to be returned, relative to
+ * the plugin's resource path.
+ * @return An output stream for the resource, or <code>null</code>.
+ * @since 4.3pre10
+ * @see #getPluginHome
+ * @see #getResourceAsOutputStream(Class,String)
+ * @see #getResourceAsStream
+ * @see #getResourcePath
+ */
+ public static OutputStream getResourceAsOutputStream(EditPlugin plugin, String path)
+ {
+ return getResourceAsOutputStream(plugin.getClassName(), path);
+ } //}}}
+
+ //{{{ getResourceAsOutputStream() method
+ /**
+ * Returns an output stream to the specified resource, or <code>null</node> if access
+ * to that resource is denied.
+ *
+ * @param pluginClassName the plugin class name (fully qualified)
+ * @param path The path to the resource to be returned, relative to
+ * the plugin's resource path.
+ * @return An output stream for the resource, or <code>null</code>.
+ * @since 4.3pre10
+ * @see #getPluginHome
+ * @see #getResourceAsStream
+ * @see #getResourcePath
+ */
+ private static OutputStream getResourceAsOutputStream(String pluginClassName, String path)
+ {
+ try
+ {
+ File file = getResourcePath(pluginClassName, path);
+ if (file == null)
+ return null;
+ File parentFile = file.getParentFile();
+ if (!parentFile.exists())
+ {
+ if (!parentFile.mkdirs())
+ {
+ Log.log(Log.ERROR, EditPlugin.class, "Unable to create folder " + parentFile.getPath());
+ return null;
+ }
+ }
+ return new FileOutputStream(file);
+ }
+ catch (IOException e)
+ {
+ return null;
+ }
+ } //}}}
+
+ //{{{ getResourcePath() method
+ /**
+ * <p>Returns the full path of the specified plugin resource.</p>
+ *
+ * <p>Since the first parameter is a reference to the
+ * {@code Class} instance for the plugin,
+ * this method requires the plugin to be activated.</p>
+ *
+ * <p>See {@link #getResourcePath(EditPlugin,String)} method, as
+ * an alternate, for when the plugin doesn't need
+ * to be activated, or when you do not have the
+ * {@code Class} instance available.</p>
+ *
+ * @param clazz the plugin class
+ * @param path The relative path to the resource from the plugin's
+ * resource path.
+ * @return The absolute path to the resource or null if there is no plugin home.
+ * @since 4.3pre10
+ * @see #getPluginHome
+ * @see #getResourceAsOutputStream
+ * @see #getResourceAsStream
+ * @see #getResourcePath(EditPlugin,String)
+ */
+ public static File getResourcePath(Class<? extends EditPlugin> clazz, String path)
+ {
+ return getResourcePath(clazz.getName(), path);
+ } //}}}
+
+ //{{{ getResourcePath() method
+ /**
+ * <p>Returns the full path of the specified plugin resource.</p>
+ *
+ * <p>This method doesn't need the plugin to be activated. You can pass
+ * an {@code EditPlugin.Deferred} instance that you get from
+ * {@code jEdit.getPlugin(String)} or {@code jEdit.getPlugins()} if
+ * the plugin in question is not activated yet and this method doesn't
+ * cause the plugin to get activated. If you have a reference to the
+ * plugins {@code Class} instance available, consider using the
+ * {@code Class} method.</p>
+ *
+ * @param plugin the plugin
+ * @param path The relative path to the resource from the plugin's
+ * resource path.
+ * @return The absolute path to the resource or null if there is no plugin home.
+ * @since 4.3pre10
+ * @see #getPluginHome
+ * @see #getResourceAsOutputStream
+ * @see #getResourceAsStream
+ * @see #getResourcePath(Class,String)
+ */
+ public static File getResourcePath(EditPlugin plugin, String path)
+ {
+ return getResourcePath(plugin.getClassName(), path);
+ } //}}}
+
+ //{{{ getResourcePath() method
+ /**
+ * Returns the full path of the specified plugin resource.
+ *
+ * @param pluginClassName the plugin class name (fully qualified)
+ * @param path The relative path to the resource from the plugin's
+ * resource path.
+ * @return The absolute path to the resource or null if there is no plugin home.
+ * @since 4.3pre10
+ * @see #getPluginHome
+ * @see #getResourceAsOutputStream
+ * @see #getResourceAsStream
+ */
+ private static File getResourcePath(String pluginClassName, String path)
+ {
+ File home = getPluginHome(pluginClassName);
+ if (home == null)
+ return null;
+ return new File(home, path);
+ } //}}}
+
+ //{{{ getClassName() method
+ /**
+ * Returns the plugin's class name. This might not be the same as
+ * the class of the actual <code>EditPlugin</code> instance, for
+ * example if the plugin is not loaded yet.
+ *
+ * @since jEdit 2.5pre3
+ */
+ public String getClassName()
+ {
+ return getClass().getName();
+ } //}}}
+
+ //{{{ getPluginJAR() method
+ /**
+ * Returns the JAR file containing this plugin.
+ * @since jEdit 4.2pre1
+ */
+ public PluginJAR getPluginJAR()
+ {
+ return jar;
+ } //}}}
+
+ //{{{ createMenuItems() method
+ /**
+ * Called by the view when constructing its <b>Plugins</b> menu.
+ * See the description of this class for details about how the
+ * menu items are constructed from plugin properties.
+ *
+ * @since jEdit 4.2pre1
+ */
+ public final JMenuItem createMenuItems()
+ {
+ if(this instanceof Broken)
+ return null;
+
+ String menuItemName = jEdit.getProperty("plugin." +
+ getClassName() + ".menu-item");
+ if(menuItemName != null)
+ return GUIUtilities.loadMenuItem(menuItemName);
+
+ String menuProperty = "plugin." + getClassName() + ".menu";
+ String codeProperty = "plugin." + getClassName() + ".menu.code";
+ if(jEdit.getProperty(menuProperty) != null
+ || jEdit.getProperty(codeProperty) != null)
+ {
+ String pluginName = jEdit.getProperty("plugin." +
+ getClassName() + ".name");
+ return new EnhancedMenu(menuProperty,pluginName);
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ createBrowserMenuItems() method
+ /**
+ * Called by the filesystem browser when constructing its
+ * <b>Plugins</b> menu.
+ * See the description of this class for details about how the
+ * menu items are constructed from plugin properties.
+ *
+ * @since jEdit 4.2pre1
+ */
+ public final JMenuItem createBrowserMenuItems()
+ {
+ if(this instanceof Broken)
+ return null;
+
+ String menuItemName = jEdit.getProperty("plugin." +
+ getClassName() + ".browser-menu-item");
+ if(menuItemName != null)
+ {
+ return GUIUtilities.loadMenuItem(
+ VFSBrowser.getActionContext(),
+ menuItemName,
+ false);
+ }
+
+ String menuProperty = "plugin." + getClassName() + ".browser-menu";
+ String codeProperty = "plugin." + getClassName() + ".browser-menu.code";
+ if(jEdit.getProperty(menuProperty) != null
+ || jEdit.getProperty(codeProperty) != null)
+ {
+ String pluginName = jEdit.getProperty("plugin." +
+ getClassName() + ".name");
+ return new EnhancedMenu(menuProperty,pluginName,
+ VFSBrowser.getActionContext());
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ Deprecated methods
+
+ //{{{ createMenuItems() method
+ /**
+ * @deprecated Instead of overriding this method, define properties
+ * as specified in the description of this class.
+ */
+ @Deprecated
+ public void createMenuItems(Vector menuItems) {} //}}}
+
+ //{{{ createOptionPanes() method
+ /**
+ * @deprecated Instead of overriding this method, define properties
+ * as specified in the description of this class.
+ */
+ @Deprecated
+ public void createOptionPanes(OptionsDialog optionsDialog) {} //}}}
+
+ //}}}
+
+ //{{{ Package-private members
+ PluginJAR jar;
+ //}}}
+
+ //{{{ Broken class
+ /**
+ * A placeholder for a plugin that didn't load.
+ * @see jEdit#getPlugin(String)
+ * @see PluginJAR#getPlugin()
+ * @see PluginJAR#activatePlugin()
+ */
+ public static class Broken extends EditPlugin
+ {
+ @Override
+ public String getClassName()
+ {
+ return clazz;
+ }
+
+ // package-private members
+ Broken(PluginJAR jar, String clazz)
+ {
+ this.jar = jar;
+ this.clazz = clazz;
+ }
+
+ // private members
+ private final String clazz;
+ } //}}}
+
+ //{{{ Deferred class
+ /**
+ * A placeholder for a plugin that hasn't been loaded yet.
+ * @see jEdit#getPlugin(String)
+ * @see PluginJAR#getPlugin()
+ * @see PluginJAR#activatePlugin()
+ */
+ public static class Deferred extends EditPlugin
+ {
+ @Override
+ public String getClassName()
+ {
+ return clazz;
+ }
+
+ // package-private members
+ Deferred(PluginJAR jar, String clazz)
+ {
+ this.jar = jar;
+ this.clazz = clazz;
+ }
+
+ EditPlugin loadPluginClass()
+ {
+ return null;
+ }
+
+ public String toString()
+ {
+ return "Deferred[" + clazz + ']';
+ }
+
+ // private members
+ private final String clazz;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/EditServer.java b/jEdit/org/gjt/sp/jedit/EditServer.java
index c30c832..56a371c 100644
--- a/jEdit/org/gjt/sp/jedit/EditServer.java
+++ b/jEdit/org/gjt/sp/jedit/EditServer.java
@@ -1,368 +1,382 @@
-/*
- * EditServer.java - jEdit server
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import org.gjt.sp.jedit.bsh.NameSpace;
-import javax.swing.SwingUtilities;
-import java.io.*;
-import java.net.*;
-import java.util.Random;
-import org.gjt.sp.jedit.io.FileVFS;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Inter-process communication.<p>
- *
- * The edit server protocol is very simple. <code>$HOME/.jedit/server</code>
- * is an ASCII file containing two lines, the first being the port number,
- * the second being the authorization key.<p>
- *
- * You connect to that port on the local machine, sending the authorization
- * key as four bytes in network byte order, followed by the length of the
- * BeanShell script as two bytes in network byte order, followed by the
- * script in UTF8 encoding. After the socked is closed, the BeanShell script
- * will be executed by jEdit.<p>
- *
- * The snippet is executed in the AWT thread. None of the usual BeanShell
- * variables (view, buffer, textArea, editPane) are set so the script has to
- * figure things out by itself.<p>
- *
- * In most cases, the script will call the static
- * {@link #handleClient(boolean,String,String[])} method, but of course more
- * complicated stuff can be done too.
- *
- * @author Slava Pestov
- * @version $Id: EditServer.java 16264 2009-10-03 06:29:29Z shlomy $
- */
-public class EditServer extends Thread
-{
- //{{{ EditServer constructor
- EditServer(String portFile)
- {
- super("jEdit server daemon [" + portFile + "]");
- setDaemon(true);
- this.portFile = portFile;
-
- try
- {
- // On Unix, set permissions of port file to rw-------,
- // so that on broken Unices which give everyone read
- // access to user home dirs, people can't see your
- // port file (and hence send arbitriary BeanShell code
- // your way. Nasty.)
- if(OperatingSystem.isUnix())
- {
- new File(portFile).createNewFile();
- FileVFS.setPermissions(portFile,0600);
- }
-
- // Bind to any port on localhost; accept 2 simultaneous
- // connection attempts before rejecting connections
- socket = new ServerSocket(0, 2,
- InetAddress.getByName("127.0.0.1"));
- authKey = new Random().nextInt(Integer.MAX_VALUE);
- int port = socket.getLocalPort();
-
- FileWriter out = new FileWriter(portFile);
-
- try
- {
- out.write("b\n");
- out.write(String.valueOf(port));
- out.write("\n");
- out.write(String.valueOf(authKey));
- out.write("\n");
- }
- finally
- {
- out.close();
- }
-
- ok = true;
-
- Log.log(Log.DEBUG,this,"jEdit server started on port "
- + socket.getLocalPort());
- Log.log(Log.DEBUG,this,"Authorization key is "
- + authKey);
- }
- catch(IOException io)
- {
- /* on some Windows versions, connections to localhost
- * fail if the network is not running. To avoid
- * confusing newbies with weird error messages, log
- * errors that occur while starting the server
- * as NOTICE, not ERROR */
- Log.log(Log.NOTICE,this,io);
- }
- } //}}}
-
- //{{{ run() method
- public void run()
- {
- for(;;)
- {
- if(abort)
- return;
-
- Socket client = null;
- try
- {
- client = socket.accept();
-
- // Stop script kiddies from opening the edit
- // server port and just leaving it open, as a
- // DoS
- client.setSoTimeout(1000);
-
- Log.log(Log.MESSAGE,this,client + ": connected");
-
- DataInputStream in = new DataInputStream(
- client.getInputStream());
-
- if(!handleClient(client,in))
- abort = true;
- }
- catch(Exception e)
- {
- if(!abort)
- Log.log(Log.ERROR,this,e);
- abort = true;
- }
- finally
- {
- /* if(client != null)
- {
- try
- {
- client.close();
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- }
-
- client = null;
- } */
- }
- }
- } //}}}
-
- //{{{ handleClient() method
- /**
- * @param restore Ignored unless no views are open
- * @param parent The client's parent directory
- * @param args A list of files. Null entries are ignored, for convinience
- * @since jEdit 3.2pre7
- */
- public static void handleClient(boolean restore, String parent,
- String[] args)
- {
- handleClient(restore,false,false,parent,args);
- } //}}}
-
- //{{{ handleClient() method
- /**
- * @param restore Ignored unless no views are open
- * @param newView Open a new view?
- * @param newPlainView Open a new plain view?
- * @param parent The client's parent directory
- * @param args A list of files. Null entries are ignored, for convinience
- * @since jEdit 4.2pre1
- */
- public static Buffer handleClient(boolean restore,
- boolean newView, boolean newPlainView, String parent,
- String[] args)
- {
- // we have to deal with a huge range of possible border cases here.
- if(jEdit.getFirstView() == null)
- {
- // coming out of background mode.
- // no views open.
- // no buffers open if args empty.
-
- Buffer buffer = jEdit.openFiles(null,parent,args);
-
- if(jEdit.getBufferCount() == 0)
- jEdit.newFile((EditPane) null);
-
- boolean restoreFiles = restore
- && jEdit.getBooleanProperty("restore")
- && (buffer == null
- || jEdit.getBooleanProperty("restore.cli"));
-
- View view = PerspectiveManager.loadPerspective(
- restoreFiles);
-
- if(view == null)
- {
- if(buffer == null)
- buffer = jEdit.getFirstBuffer();
- view = jEdit.newView(null,buffer);
- }
- else if(buffer != null)
- view.setBuffer(buffer,false);
-
- return buffer;
- }
- else if(newPlainView)
- {
- // no background mode, and opening a new view
- Buffer buffer = jEdit.openFiles(null,parent,args);
- if(buffer == null)
- buffer = jEdit.getFirstBuffer();
- jEdit.newView(null,buffer,true);
- return buffer;
- }
- else if(newView)
- {
- // no background mode, and opening a new view
- Buffer buffer = jEdit.openFiles(null,parent,args);
- if(buffer == null)
- buffer = jEdit.getFirstBuffer();
- jEdit.newView(jEdit.getActiveView(),buffer,false);
- return buffer;
- }
- else
- {
- // no background mode, and reusing existing view
- View view = jEdit.getActiveView();
-
- Buffer buffer = jEdit.openFiles(view,parent,args);
-
- // Hack done to fix bringing the window to the front.
- // At least on windows, Frame.toFront() doesn't cut it.
- // Remove the isWindows check if it's broken under other
- // OSes too.
- if (jEdit.getBooleanProperty("server.brokenToFront"))
- view.setState(java.awt.Frame.ICONIFIED);
-
- // un-iconify using JDK 1.3 API
- view.setState(java.awt.Frame.NORMAL);
- view.requestFocus();
- view.toFront();
-
- return buffer;
- }
- } //}}}
-
- //{{{ isOK() method
- boolean isOK()
- {
- return ok;
- } //}}}
-
- //{{{ getPort method
- public int getPort()
- {
- return socket.getLocalPort();
- } //}}}
-
- //{{{ stopServer() method
- void stopServer()
- {
- abort = true;
- try
- {
- socket.close();
- }
- catch(IOException io)
- {
- }
-
- new File(portFile).delete();
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private String portFile;
- private ServerSocket socket;
- private int authKey;
- private boolean ok;
- private boolean abort;
- //}}}
-
- //{{{ handleClient() method
- private boolean handleClient(final Socket client, DataInputStream in)
- throws Exception
- {
- int key = in.readInt();
- if(key != authKey)
- {
- Log.log(Log.ERROR,this,client + ": wrong"
- + " authorization key (got " + key
- + ", expected " + authKey + ")");
- in.close();
- client.close();
-
- return false;
- }
- else
- {
- // Reset the timeout
- client.setSoTimeout(0);
-
- Log.log(Log.DEBUG,this,client + ": authenticated"
- + " successfully");
-
- final String script = in.readUTF();
- Log.log(Log.DEBUG,this,script);
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- try
- {
- NameSpace ns = new NameSpace(
- BeanShell.getNameSpace(),
- "EditServer namespace");
- ns.setVariable("socket",client);
- BeanShell.eval(null,ns,script);
- }
- catch(org.gjt.sp.jedit.bsh.UtilEvalError e)
- {
- Log.log(Log.ERROR,this,e);
- }
- finally
- {
- try
- {
- BeanShell.getNameSpace().setVariable("socket",null);
- }
- catch(org.gjt.sp.jedit.bsh.UtilEvalError e)
- {
- Log.log(Log.ERROR,this,e);
- }
- }
- }
- });
-
- return true;
- }
- } //}}}
-
- //}}}
-}
+/*
+ * EditServer.java - jEdit server
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import org.gjt.sp.jedit.bsh.NameSpace;
+import javax.swing.SwingUtilities;
+import java.io.*;
+import java.net.*;
+import java.util.Random;
+import org.gjt.sp.jedit.io.FileVFS;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Inter-process communication.<p>
+ *
+ * The edit server protocol is very simple. <code>$HOME/.jedit/server</code>
+ * is an ASCII file containing two lines, the first being the port number,
+ * the second being the authorization key.<p>
+ *
+ * You connect to that port on the local machine, sending the authorization
+ * key as four bytes in network byte order, followed by the length of the
+ * BeanShell script as two bytes in network byte order, followed by the
+ * script in UTF8 encoding. After the socked is closed, the BeanShell script
+ * will be executed by jEdit.<p>
+ *
+ * The snippet is executed in the AWT thread. None of the usual BeanShell
+ * variables (view, buffer, textArea, editPane) are set so the script has to
+ * figure things out by itself.<p>
+ *
+ * In most cases, the script will call the static
+ * {@link #handleClient(boolean,String,String[])} method, but of course more
+ * complicated stuff can be done too.
+ *
+ * @author Slava Pestov
+ * @version $Id: EditServer.java 19384 2011-02-23 16:50:37Z k_satoda $
+ */
+public class EditServer extends Thread
+{
+ //{{{ EditServer constructor
+ EditServer(String portFile)
+ {
+ super("jEdit server daemon [" + portFile + "]");
+ setDaemon(true);
+ this.portFile = portFile;
+
+ try
+ {
+ // On Unix, set permissions of port file to rw-------,
+ // so that on broken Unices which give everyone read
+ // access to user home dirs, people can't see your
+ // port file (and hence send arbitriary BeanShell code
+ // your way. Nasty.)
+ if(OperatingSystem.isUnix())
+ {
+ new File(portFile).createNewFile();
+ FileVFS.setPermissions(portFile,0600);
+ }
+
+ // Bind to any port on localhost; accept 2 simultaneous
+ // connection attempts before rejecting connections
+ socket = new ServerSocket(0, 2,
+ InetAddress.getByName("127.0.0.1"));
+ authKey = new Random().nextInt(Integer.MAX_VALUE);
+ int port = socket.getLocalPort();
+
+ FileWriter out = new FileWriter(portFile);
+
+ try
+ {
+ out.write("b\n");
+ out.write(String.valueOf(port));
+ out.write("\n");
+ out.write(String.valueOf(authKey));
+ out.write("\n");
+ }
+ finally
+ {
+ out.close();
+ }
+
+ ok = true;
+
+ Log.log(Log.DEBUG,this,"jEdit server started on port "
+ + socket.getLocalPort());
+ Log.log(Log.DEBUG,this,"Authorization key is "
+ + authKey);
+ }
+ catch(IOException io)
+ {
+ /* on some Windows versions, connections to localhost
+ * fail if the network is not running. To avoid
+ * confusing newbies with weird error messages, log
+ * errors that occur while starting the server
+ * as NOTICE, not ERROR */
+ Log.log(Log.NOTICE,this,io);
+ }
+ } //}}}
+
+ //{{{ run() method
+ public void run()
+ {
+ for(;;)
+ {
+ if(abort)
+ return;
+
+ Socket client = null;
+ try
+ {
+ client = socket.accept();
+
+ // Stop script kiddies from opening the edit
+ // server port and just leaving it open, as a
+ // DoS
+ client.setSoTimeout(1000);
+
+ Log.log(Log.MESSAGE,this,client + ": connected");
+
+ DataInputStream in = new DataInputStream(
+ client.getInputStream());
+
+ if(!handleClient(client,in))
+ abort = true;
+ }
+ catch(Exception e)
+ {
+ if(!abort)
+ Log.log(Log.ERROR,this,e);
+ abort = true;
+ }
+ finally
+ {
+ /* if(client != null)
+ {
+ try
+ {
+ client.close();
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+
+ client = null;
+ } */
+ }
+ }
+ } //}}}
+
+ //{{{ handleClient() method
+ /**
+ * @param restore Ignored unless no views are open
+ * @param parent The client's parent directory
+ * @param args A list of files. Null entries are ignored, for convinience
+ * @since jEdit 3.2pre7
+ */
+ public static void handleClient(boolean restore, String parent,
+ String[] args)
+ {
+ handleClient(restore,false,false,parent,args);
+ } //}}}
+
+ //{{{ handleClient() method
+ /**
+ * @param restore Ignored unless no views are open
+ * @param newView Open a new view?
+ * @param newPlainView Open a new plain view?
+ * @param parent The client's parent directory
+ * @param args A list of files. Null entries are ignored, for convinience
+ * @since jEdit 4.2pre1
+ */
+ public static Buffer handleClient(boolean restore,
+ boolean newView, boolean newPlainView, String parent,
+ String[] args)
+ {
+ // we have to deal with a huge range of possible border cases here.
+ if(jEdit.getFirstView() == null)
+ {
+ // coming out of background mode.
+ // no views open.
+ // no buffers open if args empty.
+
+ boolean hasBufferArgs = false;
+
+ for (String arg : args)
+ {
+ if (arg != null)
+ {
+ hasBufferArgs = true;
+ break;
+ }
+ }
+
+
+ boolean restoreFiles = restore
+ && jEdit.getBooleanProperty("restore")
+ && (!hasBufferArgs
+ || jEdit.getBooleanProperty("restore.cli"));
+
+ View view = PerspectiveManager.loadPerspective(
+ restoreFiles);
+
+ Buffer buffer = jEdit.openFiles(view,parent,args);
+
+ if(view == null)
+ {
+ if(buffer == null)
+ buffer = jEdit.getFirstBuffer();
+ jEdit.newView(null,buffer);
+ }
+ else if(buffer != null)
+ view.setBuffer(buffer,false);
+
+ return buffer;
+ }
+ else if(newPlainView)
+ {
+ // no background mode, and opening a new view
+ Buffer buffer = jEdit.openFiles(null,parent,args);
+ if(buffer == null)
+ buffer = jEdit.getFirstBuffer();
+ jEdit.newView(null,buffer,true);
+ return buffer;
+ }
+ else if(newView)
+ {
+ // no background mode, and opening a new view
+ Buffer buffer = jEdit.openFiles(null,parent,args);
+ if(buffer == null)
+ buffer = jEdit.getFirstBuffer();
+ jEdit.newView(jEdit.getActiveView(),buffer,false);
+ return buffer;
+ }
+ else
+ {
+ // no background mode, and reusing existing view
+ View view = jEdit.getActiveView();
+
+ Buffer buffer = jEdit.openFiles(view,parent,args);
+
+ // Hack done to fix bringing the window to the front.
+ // At least on windows, Frame.toFront() doesn't cut it.
+ // Remove the isWindows check if it's broken under other
+ // OSes too.
+ if (jEdit.getBooleanProperty("server.brokenToFront"))
+ view.setState(java.awt.Frame.ICONIFIED);
+
+ // un-iconify using JDK 1.3 API
+ view.setState(java.awt.Frame.NORMAL);
+ view.requestFocus();
+ view.toFront();
+ // In some platforms (e.g. Windows), only setAlwaysOnTop works
+ if (! view.isAlwaysOnTop())
+ {
+ view.setAlwaysOnTop(true);
+ view.setAlwaysOnTop(false);
+ }
+ return buffer;
+ }
+ } //}}}
+
+ //{{{ isOK() method
+ boolean isOK()
+ {
+ return ok;
+ } //}}}
+
+ //{{{ getPort method
+ public int getPort()
+ {
+ return socket.getLocalPort();
+ } //}}}
+
+ //{{{ stopServer() method
+ void stopServer()
+ {
+ abort = true;
+ try
+ {
+ socket.close();
+ }
+ catch(IOException io)
+ {
+ }
+
+ new File(portFile).delete();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private String portFile;
+ private ServerSocket socket;
+ private int authKey;
+ private boolean ok;
+ private boolean abort;
+ //}}}
+
+ //{{{ handleClient() method
+ private boolean handleClient(final Socket client, DataInputStream in)
+ throws Exception
+ {
+ int key = in.readInt();
+ if(key != authKey)
+ {
+ Log.log(Log.ERROR,this,client + ": wrong"
+ + " authorization key (got " + key
+ + ", expected " + authKey + ")");
+ in.close();
+ client.close();
+
+ return false;
+ }
+ else
+ {
+ // Reset the timeout
+ client.setSoTimeout(0);
+
+ Log.log(Log.DEBUG,this,client + ": authenticated"
+ + " successfully");
+
+ final String script = in.readUTF();
+ Log.log(Log.DEBUG,this,script);
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ NameSpace ns = new NameSpace(
+ BeanShell.getNameSpace(),
+ "EditServer namespace");
+ ns.setVariable("socket",client);
+ BeanShell.eval(null,ns,script);
+ }
+ catch(org.gjt.sp.jedit.bsh.UtilEvalError e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ finally
+ {
+ try
+ {
+ BeanShell.getNameSpace().setVariable("socket",null);
+ }
+ catch(org.gjt.sp.jedit.bsh.UtilEvalError e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ }
+ }
+ });
+
+ return true;
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/GUIUtilities.java b/jEdit/org/gjt/sp/jedit/GUIUtilities.java
index e2b236e..c2db65d 100644
--- a/jEdit/org/gjt/sp/jedit/GUIUtilities.java
+++ b/jEdit/org/gjt/sp/jedit/GUIUtilities.java
@@ -1,2021 +1,2047 @@
-/*
- * GUIUtilities.java - Various GUI utility functions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import org.gjt.sp.jedit.browser.VFSFileChooserDialog;
-import org.gjt.sp.jedit.gui.DynamicContextMenuService;
-import org.gjt.sp.jedit.gui.EnhancedButton;
-import org.gjt.sp.jedit.gui.FloatingWindowContainer;
-import org.gjt.sp.jedit.gui.SplashScreen;
-import org.gjt.sp.jedit.gui.VariableGridLayout;
-import org.gjt.sp.jedit.menu.EnhancedCheckBoxMenuItem;
-import org.gjt.sp.jedit.menu.EnhancedMenu;
-import org.gjt.sp.jedit.menu.EnhancedMenuItem;
-import org.gjt.sp.jedit.syntax.SyntaxStyle;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-import org.gjt.sp.jedit.textarea.TextAreaMouseHandler;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.SyntaxUtilities;
-
-
-import java.net.URL;
-import java.util.*;
-import java.util.List;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-import javax.swing.JList;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JPopupMenu;
-import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
-import javax.swing.JToolBar;
-import javax.swing.ListSelectionModel;
-import javax.swing.SwingUtilities;
-
-
-import java.awt.*;
-import java.awt.event.*;
-//}}}
-
-/**
- * Various GUI functions.<p>
- *
- * The most frequently used members of this class are:
- *
- * <ul>
- * <li>{@link #loadIcon(String)}</li>
- * <li>{@link #confirm(Component,String,Object[],int,int)}</li>
- * <li>{@link #error(Component,String,Object[])}</li>
- * <li>{@link #message(Component,String,Object[])}</li>
-
- * <li>{@link #showVFSFileDialog(View,String,int,boolean)}</li>
- * <li>{@link #loadGeometry(Window,String)}</li>
- * <li>{@link #saveGeometry(Window,String)}</li>
- * <li>{@link #showPopupMenu(JPopupMenu,Component,int,int)}</li>
- * </ul>
- *
- * @author Slava Pestov
- * @version $Id: GUIUtilities.java 16406 2009-10-22 20:42:36Z shlomy $
- */
-public class GUIUtilities
-{
- //{{{ Some predefined icons
- /**
- * @deprecated Use <code>GUIUtilities.loadIcon("new.gif");</code>
- * instead.
- */
- @Deprecated
- public static Icon NEW_BUFFER_ICON;
-
- /**
- * @deprecated Use <code>GUIUtilities.loadIcon("dirty.gif");</code>
- * instead.
- */
- @Deprecated
- public static Icon DIRTY_BUFFER_ICON;
-
- /**
- * @deprecated Use <code>GUIUtilities.loadIcon("readonly.gif");</code>
- * instead.
- */
- @Deprecated
- public static Icon READ_ONLY_BUFFER_ICON;
-
- /**
- * @deprecated Use <code>GUIUtilities.loadIcon("normal.gif");</code>
- * instead.
- */
- @Deprecated
- public static Icon NORMAL_BUFFER_ICON;
-
- /**
- * @deprecated Use <code>GUIUtilities.loadIcon("jedit-icon.gif");</code>
- * instead.
- */
- @Deprecated
- public static Icon WINDOW_ICON;
- //}}}
-
- //{{{ Icon methods
-
- //{{{ setIconPath() method
- /**
- * Sets the path where jEdit looks for icons.
- * @since jEdit 4.2pre5
- */
- public static void setIconPath(String iconPath)
- {
- GUIUtilities.iconPath = iconPath;
- if(icons != null)
- icons.clear();
- } //}}}
-
- //{{{ loadIcon() method
- /**
- * Loads an icon.
- * @param iconName The icon name
- * @since jEdit 2.6pre7
- */
- public static Icon loadIcon(String iconName)
- {
- if(iconName == null)
- return null;
-
- // * Enable old icon naming scheme support
- if(deprecatedIcons != null && deprecatedIcons.containsKey(iconName))
- iconName = deprecatedIcons.get(iconName);
-
- if(icons == null)
- icons = new Hashtable<String, Icon>();
-
- // check if there is a cached version first
- Icon icon = icons.get(iconName);
- if(icon != null)
- return icon;
-
- URL url;
-
- try
- {
- // get the icon
- if(MiscUtilities.isURL(iconName))
- url = new URL(iconName);
- else
- url = new URL(iconPath + iconName);
- }
- catch(Exception e)
- {
- try
- {
- url = new URL(defaultIconPath + iconName);
- }
- catch(Exception ex)
- {
- Log.log(Log.ERROR,GUIUtilities.class,
- "Icon not found: " + iconName);
- Log.log(Log.ERROR,GUIUtilities.class,ex);
- return null;
- }
- }
-
- icon = new ImageIcon(url);
-
- icons.put(iconName,icon);
- return icon;
- } //}}}
-
- //{{{ getEditorIcon() method
- /**
- * Returns the default editor window image.
- */
- public static Image getEditorIcon()
- {
- return ((ImageIcon)loadIcon(jEdit.getProperty("logo.icon.medium"))).getImage();
- } //}}}
-
- //{{{ getPluginIcon() method
- /**
- * Returns the default plugin window image.
- */
- public static Image getPluginIcon()
- {
- return getEditorIcon();
- } //}}}
-
- //}}}
-
- //{{{ Menus, tool bars
-
- //{{{ loadMenuBar() method
- /**
- * Creates a menubar. Plugins should not need to call this method.
- * @param name The menu bar name
- * @since jEdit 3.2pre5
- */
- public static JMenuBar loadMenuBar(String name)
- {
- return loadMenuBar(jEdit.getActionContext(),name);
- } //}}}
-
- //{{{ loadMenuBar() method
- /**
- * Creates a menubar. Plugins should not need to call this method.
- * @param context An action context
- * @param name The menu bar name
- * @since jEdit 4.2pre1
- */
- public static JMenuBar loadMenuBar(ActionContext context, String name)
- {
- String menus = jEdit.getProperty(name);
- StringTokenizer st = new StringTokenizer(menus);
-
- JMenuBar mbar = new JMenuBar();
-
- while(st.hasMoreTokens())
- {
- String menuName = st.nextToken();
- mbar.add(loadMenu(context, menuName));
- }
-
- return mbar;
- } //}}}
-
- //{{{ loadMenu() method
- /**
- * Creates a menu. The menu label is set from the
- * <code><i>name</i>.label</code> property. The menu contents is taken
- * from the <code><i>name</i></code> property, which is a whitespace
- * separated list of action names. An action name of <code>-</code>
- * inserts a separator in the menu.
- * @param name The menu name
- * @see #loadMenuItem(String)
- * @since jEdit 2.6pre2
- */
- public static JMenu loadMenu(String name)
- {
- return loadMenu(jEdit.getActionContext(),name);
- } //}}}
-
- //{{{ loadMenu() method
- /**
- * Creates a menu. The menu label is set from the
- * <code><i>name</i>.label</code> property. The menu contents is taken
- * from the <code><i>name</i></code> property, which is a whitespace
- * separated list of action names. An action name of <code>-</code>
- * inserts a separator in the menu.
- * @param context An action context; either
- * <code>jEdit.getActionContext()</code> or
- * <code>VFSBrowser.getActionContext()</code>.
- * @param name The menu name
- * @see #loadMenuItem(String)
- * @since jEdit 4.2pre1
- */
- public static JMenu loadMenu(ActionContext context, String name)
- {
- return new EnhancedMenu(name,
- jEdit.getProperty(name.concat(".label")),
- context);
- } //}}}
-
- //{{{ loadPopupMenu() method
- /**
- * Creates a popup menu.
- * @param name The menu name
- * @since jEdit 2.6pre2
- */
- public static JPopupMenu loadPopupMenu(String name, JEditTextArea textArea, MouseEvent evt)
- {
- return loadPopupMenu(jEdit.getActionContext(), name, textArea, evt);
- } //}}}
-
- //{{{ loadPopupMenu() method
- /**
- * Creates a popup menu.
-
- * @param name The menu name
- * @since jEdit 2.6pre2
- */
- public static JPopupMenu loadPopupMenu(String name)
- {
- return loadPopupMenu(jEdit.getActionContext(),name);
- } //}}}
-
- //{{{ loadPopupMenu() method
- /**
- * Creates a popup menu.
-
- * @param context An action context; either
- * <code>jEdit.getActionContext()</code> or
- * <code>VFSBrowser.getActionContext()</code>.
- * @param name The menu name
- * @since jEdit 4.2pre1
- */
- public static JPopupMenu loadPopupMenu(ActionContext context, String name)
- {
- return loadPopupMenu(context, name, null, null);
- }
-
- //{{{ loadPopupMenu() method
- /**
- * Creates a popup menu.
- * @param context An action context; either
- * <code>jEdit.getActionContext()</code> or
- * <code>VFSBrowser.getActionContext()</code>.
- * @param name The menu name
- * @param textArea the textArea wanting to show the popup.
- * If not null, include context menu items defined by services.
- * @param evt additional context info about where the mouse was when menu was requested
- * @since jEdit 4.3pre15
- */
- public static JPopupMenu loadPopupMenu(ActionContext context, String name, JEditTextArea textArea, MouseEvent evt)
- {
- JPopupMenu menu = new JPopupMenu();
-
- String menuItems = jEdit.getProperty(name);
- if(menuItems != null)
- {
- StringTokenizer st = new StringTokenizer(menuItems);
- while(st.hasMoreTokens())
- {
- String menuItemName = st.nextToken();
- if(menuItemName.equals("-"))
- menu.addSeparator();
- else
- menu.add(loadMenuItem(context,menuItemName,false));
- }
- }
- // load menu items defined by services
- if (textArea != null)
- {
- List<JMenuItem> list = GUIUtilities.getServiceContextMenuItems(textArea, evt);
- if (!list.isEmpty())
- {
- menu.addSeparator();
- }
- for (JMenuItem mi : list)
- {
- menu.add(mi);
- }
- }
-
- return menu;
- } //}}}
- //{{{ addServiceContextMenuItems() method
- /**
- * @return a list of menu items defined by services.
- *
- * @param textArea the TextArea desiring to display these menu items
- * @since jEdit 4.3pre15
- */
- public static List<JMenuItem> getServiceContextMenuItems(JEditTextArea textArea, MouseEvent evt)
- {
- List<JMenuItem> list = new ArrayList<JMenuItem>();
- String serviceClassName = DynamicContextMenuService.class.getName();
- String[] menuServiceList = ServiceManager.getServiceNames(serviceClassName);
- for (String menuServiceName : menuServiceList)
- {
- if (menuServiceName != null && menuServiceName.trim().length() > 0)
- {
- DynamicContextMenuService dcms = (DynamicContextMenuService)
- ServiceManager.getService(serviceClassName, menuServiceName);
- if (dcms != null)
- {
- JMenuItem[] items = dcms.createMenu(textArea, evt);
- if (items != null)
- {
- list.addAll(Arrays.asList(items));
- }
- }
- }
- }
- return list;
- } //}}}
-
- //{{{ loadMenuItem() method
- /**
- * Creates a menu item. The menu item is bound to the action named by
- * <code>name</code> with label taken from the return value of the
- * {@link EditAction#getLabel()} method.
- *
- * @param name The menu item name
- * @see #loadMenu(String)
- * @since jEdit 2.6pre1
- */
- public static JMenuItem loadMenuItem(String name)
- {
- return loadMenuItem(jEdit.getActionContext(),name,true);
- } //}}}
-
- //{{{ loadMenuItem() method
- /**
- * Creates a menu item.
- * @param name The menu item name
- * @param setMnemonic True if the menu item should have a mnemonic
- * @since jEdit 3.1pre1
- */
- public static JMenuItem loadMenuItem(String name, boolean setMnemonic)
- {
- return loadMenuItem(jEdit.getActionContext(),name,setMnemonic);
- } //}}}
-
- //{{{ loadMenuItem() method
- /**
- * Creates a menu item.
- * @param context An action context; either
- * <code>jEdit.getActionContext()</code> or
- * <code>VFSBrowser.getActionContext()</code>.
- * @param name The menu item name
- * @param setMnemonic True if the menu item should have a mnemonic
- * @since jEdit 4.2pre1
- */
- public static JMenuItem loadMenuItem(ActionContext context, String name,
- boolean setMnemonic)
- {
- if(name.charAt(0) == '%')
- return loadMenu(context,name.substring(1));
-
- return _loadMenuItem(name, context, setMnemonic);
- } //}}}
-
- //{{{ loadMenuItem(EditAction, boolean)
- public static JMenuItem loadMenuItem(EditAction editAction,
- boolean setMnemonic)
- {
- String name = editAction.getName();
- ActionContext context = jEdit.getActionContext();
-
- return _loadMenuItem(name, context, setMnemonic);
- } //}}}
-
- //{{{ loadToolBar() method
- /**
- * Creates a toolbar.
- * @param name The toolbar name
- * @since jEdit 4.2pre2
- */
- public static Container loadToolBar(String name)
- {
- return loadToolBar(jEdit.getActionContext(),name);
- } //}}}
-
- //{{{ loadToolBar() method
- /**
- * Creates a toolbar.
- * @param context An action context; either
- * <code>jEdit.getActionContext()</code> or
- * <code>VFSBrowser.getActionContext()</code>.
- * @param name The toolbar name
- * @since jEdit 4.2pre2
- */
- public static Container loadToolBar(ActionContext context, String name)
- {
- JPanel toolBar = new JPanel(new BorderLayout());
- JToolBar toolB = new JToolBar();
- toolB.setFloatable(false);
- toolB.setMargin(new Insets(0,0,0,0));
-
- String buttons = jEdit.getProperty(name);
- if(buttons != null)
- {
- StringTokenizer st = new StringTokenizer(buttons);
- while(st.hasMoreTokens())
- {
- String button = st.nextToken();
- if(button.equals("-"))
- {
- toolB.addSeparator(new Dimension(12,12));
- }
- else
- {
- JButton b = loadToolButton(context,button);
- if(b != null)
- toolB.add(b);
- }
- }
- }
-
- toolBar.add(toolB);
- return toolBar;
- } //}}}
-
- //{{{ loadToolButton() method
- /**
- * Loads a tool bar button. The tooltip is constructed from
- * the <code><i>name</i>.label</code> and
- * <code><i>name</i>.shortcut</code> properties and the icon is loaded
- * from the resource named '/org/gjt/sp/jedit/icons/' suffixed
- * with the value of the <code><i>name</i>.icon</code> property.
- * @param name The name of the button
- */
- public static EnhancedButton loadToolButton(String name)
- {
- return loadToolButton(jEdit.getActionContext(),name);
- } //}}}
-
- //{{{ loadToolButton() method
- /**
- * Loads a tool bar button. The tooltip is constructed from
- * the <code><i>name</i>.label</code> and
- * <code><i>name</i>.shortcut</code> properties and the icon is loaded
- * from the resource named '/org/gjt/sp/jedit/icons/' suffixed
- * with the value of the <code><i>name</i>.icon</code> property.
- * @param context An action context; either
- * <code>jEdit.getActionContext()</code> or
- * <code>VFSBrowser.getActionContext()</code>.
- * @param name The name of the button
- * @since jEdit 4.2pre1
- */
- public static EnhancedButton loadToolButton(ActionContext context,
- String name)
- {
- String label = jEdit.getProperty(name + ".label");
-
- if(label == null)
- label = name;
-
- Icon icon;
- String iconName = jEdit.getProperty(name + ".icon");
- if(iconName == null)
- icon = loadIcon(jEdit.getProperty("broken-image.icon"));
- else
- {
- icon = loadIcon(iconName);
- if(icon == null)
- icon = loadIcon(jEdit.getProperty("broken-image.icon"));
- }
-
- String toolTip = prettifyMenuLabel(label);
- String shortcutLabel = getShortcutLabel(name);
- if(shortcutLabel != null)
- {
- toolTip = toolTip + " (" + shortcutLabel + ')';
- }
-
- EnhancedButton b = new EnhancedButton(icon,toolTip,name,context);
- b.setPreferredSize(new Dimension(32,32));
- return b;
- } //}}}
-
- //{{{ prettifyMenuLabel() method
- /**
- * `Prettifies' a menu item label by removing the `$' sign. This
- * can be used to process the contents of an <i>action</i>.label
- * property.
- */
- public static String prettifyMenuLabel(String label)
- {
- int index = label.indexOf('$');
- if(index != -1)
- {
- label = label.substring(0,index)
- .concat(label.substring(index + 1));
- }
- return label;
- } //}}}
-
- //{{{ getShortcutLabel() method
- /**
- * Returns a label string to show users what shortcut are
- * assigned to the action.
- */
- public static String getShortcutLabel(String action)
- {
- if(action == null)
- return null;
- else
- {
- String shortcut1 = jEdit.getProperty(action + ".shortcut");
- String shortcut2 = jEdit.getProperty(action + ".shortcut2");
-
- if(shortcut1 == null || shortcut1.length() == 0)
- {
- if(shortcut2 == null || shortcut2.length() == 0)
- return null;
- else
- return shortcut2;
- }
- else
- {
- if(shortcut2 == null || shortcut2.length() == 0)
- return shortcut1;
- else
- return shortcut1 + " or " + shortcut2;
- }
- }
- } //}}}
-
- //}}}
-
- //}}}
-
- //{{{ Canned dialog boxes
-
- //{{{ message() method
- /**
- * Displays a dialog box.
- * The title of the dialog is fetched from
- * the <code><i>name</i>.title</code> property. The message is fetched
- * from the <code><i>name</i>.message</code> property. The message
- * is formatted by the property manager with <code>args</code> as
- * positional parameters.
- * @param comp The component to display the dialog for
- * @param name The name of the dialog
- * @param args Positional parameters to be substituted into the
- * message text
- */
- public static void message(Component comp, String name, Object[] args)
- {
- hideSplashScreen();
-
- JOptionPane.showMessageDialog(comp,
- jEdit.getProperty(name.concat(".message"),args),
- jEdit.getProperty(name.concat(".title"),args),
- JOptionPane.INFORMATION_MESSAGE);
- } //}}}
-
- //{{{ error() method
- /**
- * Displays an error dialog box.
- * The title of the dialog is fetched from
- * the <code><i>name</i>.title</code> property. The message is fetched
- * from the <code><i>name</i>.message</code> property. The message
- * is formatted by the property manager with <code>args</code> as
- * positional parameters.
- * @param comp The component to display the dialog for
- * @param name The name of the dialog
- * @param args Positional parameters to be substituted into the
- * message text
- */
- public static void error(Component comp, String name, Object[] args)
- {
- hideSplashScreen();
-
- JOptionPane.showMessageDialog(comp,
- jEdit.getProperty(name.concat(".message"),args),
- jEdit.getProperty(name.concat(".title"),args),
- JOptionPane.ERROR_MESSAGE);
- } //}}}
-
- //{{{ input() method
- /**
- * Displays an input dialog box and returns any text the user entered.
- * The title of the dialog is fetched from
- * the <code><i>name</i>.title</code> property. The message is fetched
- * from the <code><i>name</i>.message</code> property.
- * @param comp The component to display the dialog for
- * @param name The name of the dialog
- * @param def The text to display by default in the input field
- */
- public static String input(Component comp, String name, Object def)
- {
- return input(comp,name,null,def);
- } //}}}
-
- //{{{ inputProperty() method
- /**
- * Displays an input dialog box and returns any text the user entered.
- * The title of the dialog is fetched from
- * the <code><i>name</i>.title</code> property. The message is fetched
- * from the <code><i>name</i>.message</code> property.
- * @param comp The component to display the dialog for
- * @param name The name of the dialog
- * @param def The property whose text to display in the input field
- */
- public static String inputProperty(Component comp, String name,
- String def)
- {
- return inputProperty(comp,name,null,def);
- } //}}}
-
- //{{{ input() method
- /**
- * Displays an input dialog box and returns any text the user entered.
- * The title of the dialog is fetched from
- * the <code><i>name</i>.title</code> property. The message is fetched
- * from the <code><i>name</i>.message</code> property.
- * @param comp The component to display the dialog for
- * @param name The name of the dialog
- * @param def The text to display by default in the input field
- * @param args Positional parameters to be substituted into the
- * message text
- * @since jEdit 3.1pre3
- */
- public static String input(Component comp, String name,
- Object[] args, Object def)
- {
- hideSplashScreen();
-
- String retVal = (String)JOptionPane.showInputDialog(comp,
- jEdit.getProperty(name.concat(".message"),args),
- jEdit.getProperty(name.concat(".title")),
- JOptionPane.QUESTION_MESSAGE,null,null,def);
- return retVal;
- } //}}}
-
- //{{{ inputProperty() method
- /**
- * Displays an input dialog box and returns any text the user entered.
- * The title of the dialog is fetched from
- * the <code><i>name</i>.title</code> property. The message is fetched
- * from the <code><i>name</i>.message</code> property.
- * @param comp The component to display the dialog for
- * @param name The name of the dialog
- * @param args Positional parameters to be substituted into the
- * message text
- * @param def The property whose text to display in the input field
- * @since jEdit 3.1pre3
- */
- public static String inputProperty(Component comp, String name,
- Object[] args, String def)
- {
- hideSplashScreen();
-
- String retVal = (String)JOptionPane.showInputDialog(comp,
- jEdit.getProperty(name.concat(".message"),args),
- jEdit.getProperty(name.concat(".title")),
- JOptionPane.QUESTION_MESSAGE,
- null,null,jEdit.getProperty(def));
- if(retVal != null)
- jEdit.setProperty(def,retVal);
- return retVal;
- } //}}}
-
- //{{{ confirm() method
- /**
- * Displays a confirm dialog box and returns the button pushed by the
- * user. The title of the dialog is fetched from the
- * <code><i>name</i>.title</code> property. The message is fetched
- * from the <code><i>name</i>.message</code> property.
- * @param comp The component to display the dialog for
- * @param name The name of the dialog
- * @param args Positional parameters to be substituted into the
- * message text
- * @param buttons The buttons to display - for example,
- * JOptionPane.YES_NO_CANCEL_OPTION
- * @param type The dialog type - for example,
- * JOptionPane.WARNING_MESSAGE
- * @since jEdit 3.1pre3
- */
- public static int confirm(Component comp, String name,
- Object[] args, int buttons, int type)
- {
- hideSplashScreen();
-
- return JOptionPane.showConfirmDialog(comp,
- jEdit.getProperty(name + ".message",args),
- jEdit.getProperty(name + ".title"),buttons,type);
- } //}}}
-
- //{{{ listConfirm() method
- /**
- * Displays a confirm dialog box and returns the button pushed by the
- * user. The title of the dialog is fetched from the
- * <code><i>name</i>.title</code> property. The message is fetched
- * from the <code><i>name</i>.message</code> property. The dialog
- * also shows a list of entries given by the <code>listModel</code>
- * parameter.
- * @param comp the parent component
- * @param name the name of the confirm dialog
- * @param args the for the message
- * @param listModel the items in the list
- * @return an integer indicating the option selected by the user
- * @since jEdit 4.3pre1
- */
- public static int listConfirm(Component comp, String name, String[] args,
- Object[] listModel)
- {
- JList list = new JList(listModel);
- list.setVisibleRowCount(8);
-
- Object[] message = {
- jEdit.getProperty(name + ".message",args),
- new JScrollPane(list)
- };
-
- return JOptionPane.showConfirmDialog(comp,
- message,
- jEdit.getProperty(name + ".title"),
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- } //}}}
-
- //{{{ listConfirm() method
- /**
- * Displays a confirm dialog box and returns the button pushed by the
- * user. The title of the dialog is fetched from the
- * <code><i>name</i>.title</code> property. The message is fetched
- * from the <code><i>name</i>.message</code> property. The dialog
- * also shows a list of entries given by the <code>listModel</code>
- * parameter.
- * @param comp the parent component
- * @param name the name of the confirm dialog
- * @param args the for the message
- * @param listModel the items in the list
- * @param selectedItems give an empty list, it will contains in return the selected items
- * @return an integer indicating the option selected by the user
- * @since jEdit 4.3pre12
- */
- public static int listConfirm(Component comp, String name, String[] args,
- Object[] listModel, List selectedItems)
- {
- JList list = new JList(listModel);
- list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
- list.setVisibleRowCount(8);
- list.addSelectionInterval(0,listModel.length - 1);
-
- Object[] message = {
- jEdit.getProperty(name + ".message",args),
- new JScrollPane(list)
- };
-
- int ret = JOptionPane.showConfirmDialog(comp,
- message,
- jEdit.getProperty(name + ".title"),
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- Object[] selectedValues = list.getSelectedValues();
- selectedItems.addAll(Arrays.asList(selectedValues));
- return ret;
- } //}}}
-
- //{{{ showVFSFileDialog() methods
- /**
- * Displays a VFS file selection dialog box.
- * @param view The view, should be non-null
- * @param path The initial directory to display. May be null
- * @param type The dialog type. One of
- * {@link org.gjt.sp.jedit.browser.VFSBrowser#OPEN_DIALOG},
- * {@link org.gjt.sp.jedit.browser.VFSBrowser#SAVE_DIALOG}, or
- * {@link org.gjt.sp.jedit.browser.VFSBrowser#CHOOSE_DIRECTORY_DIALOG}.
- * @param multipleSelection True if multiple selection should be allowed
- * @return The selected file(s)
- * @since jEdit 2.6pre2
- */
- public static String[] showVFSFileDialog(View view, String path,
- int type, boolean multipleSelection)
- {
- // the view should not be null, but some plugins might do this
- if(view == null)
- {
- Log.log(Log.WARNING,GUIUtilities.class,
- "showVFSFileDialog(): given null view, assuming jEdit.getActiveView()");
- view = jEdit.getActiveView();
- }
-
- hideSplashScreen();
-
- VFSFileChooserDialog fileChooser = new VFSFileChooserDialog(
- view,path,type,multipleSelection);
- return fileChooser.getSelectedFiles();
- }
-
- /**
- * Displays a VFS file selection dialog box.
- * This version can specify a dialog as the parent instead
- * of the view.
- * @param view The view, should be non-null
- * @param path The initial directory to display. May be null
- * @param type The dialog type. One of
- * {@link org.gjt.sp.jedit.browser.VFSBrowser#OPEN_DIALOG},
- * {@link org.gjt.sp.jedit.browser.VFSBrowser#SAVE_DIALOG}, or
- * {@link org.gjt.sp.jedit.browser.VFSBrowser#CHOOSE_DIRECTORY_DIALOG}.
- * @param multipleSelection True if multiple selection should be allowed
- * @return The selected file(s)
- * @since jEdit 4.3pre10
- */
- public static String[] showVFSFileDialog(Dialog parent, View view,
- String path, int type, boolean multipleSelection)
- {
- hideSplashScreen();
-
- VFSFileChooserDialog fileChooser = new VFSFileChooserDialog(
- parent, view, path, type, multipleSelection, true);
- return fileChooser.getSelectedFiles();
- }
-
- /**
- * Displays a VFS file selection dialog box.
- * This version can specify a frame as the parent instead
- * of the view.
- * @param parent The parent frame
- * @param view The view, should be non-null
- * @param path The initial directory to display. May be null
- * @param type The dialog type. One of
- * {@link org.gjt.sp.jedit.browser.VFSBrowser#OPEN_DIALOG},
- * {@link org.gjt.sp.jedit.browser.VFSBrowser#SAVE_DIALOG}, or
- * {@link org.gjt.sp.jedit.browser.VFSBrowser#CHOOSE_DIRECTORY_DIALOG}.
- * @param multipleSelection True if multiple selection should be allowed
- * @return The selected file(s)
- * @since jEdit 4.3pre10
- */
- public static String[] showVFSFileDialog(Frame parent, View view,
- String path, int type, boolean multipleSelection)
- {
- hideSplashScreen();
- VFSFileChooserDialog fileChooser = new VFSFileChooserDialog(
- parent, view, path, type, multipleSelection, true);
- return fileChooser.getSelectedFiles();
- } //}}}
-
- //}}}
-
- //{{{ Colors and styles
-
- //{{{ parseColor() method
- /**
- * Converts a color name to a color object. The name must either be
- * a known string, such as `red', `green', etc (complete list is in
- * the <code>java.awt.Color</code> class) or a hex color value
- * prefixed with `#', for example `#ff0088'.
- * @param name The color name
- */
- public static Color parseColor(String name)
- {
- return SyntaxUtilities.parseColor(name, Color.black);
- } //}}}
-
- //{{{ parseColor() method
- /**
- * @deprecated use {@link SyntaxUtilities#parseColor(String,Color)}
- */
- @Deprecated
- public static Color parseColor(String name, Color defaultColor)
- {
- return SyntaxUtilities.parseColor(name, defaultColor);
- } //}}}
-
- //{{{ getColorHexString() method
- /**
- * Converts a color object to its hex value. The hex value
- * prefixed is with `#', for example `#ff0088'.
- * @param c The color object
- * @deprecated use {@link SyntaxUtilities#parseStyle(String,String,int,boolean)}
- */
- @Deprecated
- public static String getColorHexString(Color c)
- {
- return SyntaxUtilities.getColorHexString(c);
- } //}}}
-
- //{{{ parseStyle() method
- /**
- * Converts a style string to a style object.
- * @param str The style string
- * @param family Style strings only specify font style, not font family
- * @param size Style strings only specify font style, not font family
- * @exception IllegalArgumentException if the style is invalid
- * @since jEdit 3.2pre6
- */
- public static SyntaxStyle parseStyle(String str, String family, int size)
- throws IllegalArgumentException
- {
- return SyntaxUtilities.parseStyle(str,family,size,true);
- } //}}}
-
- //{{{ parseStyle() method
- /**
- * Converts a style string to a style object.
- * @param str The style string
- * @param family Style strings only specify font style, not font family
- * @param size Style strings only specify font style, not font family
- * @param color If false, the styles will be monochrome
- * @exception IllegalArgumentException if the style is invalid
- * @since jEdit 4.0pre4
- * @deprecated use {@link SyntaxUtilities#parseStyle(String,String,int,boolean)}
- */
- @Deprecated
- public static SyntaxStyle parseStyle(String str, String family, int size,
- boolean color)
- throws IllegalArgumentException
- {
- return SyntaxUtilities.parseStyle(str,family,size,color);
- } //}}}
-
- //{{{ getStyleString() method
- /**
- * Converts a style into it's string representation.
- * @param style The style
- */
- public static String getStyleString(SyntaxStyle style)
- {
- StringBuilder buf = new StringBuilder();
-
- if (style.getForegroundColor() != null)
- {
- buf.append("color:").append(SyntaxUtilities.getColorHexString(style.getForegroundColor()));
- }
-
- if (style.getBackgroundColor() != null)
- {
- buf.append(" bgColor:").append(SyntaxUtilities.getColorHexString(style.getBackgroundColor()));
- }
-
- Font font = style.getFont();
- if (!font.isPlain())
- {
- buf.append(" style:");
- if (font.isItalic())
- buf.append('i');
- if (font.isBold())
- buf.append('b');
- }
-
- return buf.toString();
- } //}}}
-
- //{{{ loadStyles() method
- /**
- * Loads the syntax styles from the properties, giving them the specified
- * base font family and size.
- * @param family The font family
- * @param size The font size
- * @since jEdit 3.2pre6
- * @deprecated use {@link SyntaxUtilities#loadStyles(String,int)}
- */
- @Deprecated
- public static SyntaxStyle[] loadStyles(String family, int size)
- {
- return SyntaxUtilities.loadStyles(family,size,true);
- }
-
- /**
- * Loads the syntax styles from the properties, giving them the specified
- * base font family and size.
- * @param family The font family
- * @param size The font size
- * @param color If false, the styles will be monochrome
- * @since jEdit 4.0pre4
- * @deprecated use {@link SyntaxUtilities#loadStyles(String,int,boolean)}
- */
- @Deprecated
- public static SyntaxStyle[] loadStyles(String family, int size, boolean color)
- {
- return SyntaxUtilities.loadStyles(family, size, color);
- } //}}}
-
- //}}}
-
- //{{{ Loading, saving window geometry
-
- //{{{ loadGeometry() method
- /**
- * Loads a windows's geometry from the properties.
- * The geometry is loaded from the <code><i>name</i>.x</code>,
- * <code><i>name</i>.y</code>, <code><i>name</i>.width</code> and
- * <code><i>name</i>.height</code> properties.
- *
- * @param win The window to load geometry from
- * @param parent The parent frame to be relative to.
- * @param name The name of the window
- */
- public static void loadGeometry(Window win, Container parent, String name )
- {
- Dimension size = win.getSize();
- int width = jEdit.getIntegerProperty(name + ".width", size.width);
- int height = jEdit.getIntegerProperty(name + ".height", size.height);
- int x = jEdit.getIntegerProperty(name + ".x",50);
- int y = jEdit.getIntegerProperty(name + ".y",50);
- if(parent != null)
- {
- Point location = parent.getLocation();
- x = location.x + x;
- y = location.y + y;
- }
-
- int extState = jEdit.getIntegerProperty(name + ".extendedState", Frame.NORMAL);
-
- Rectangle desired = new Rectangle(x,y,width,height);
- try
- {
- if(!Debug.DISABLE_MULTIHEAD)
- adjustForScreenBounds(desired);
- }
- catch(Exception e)
- {
- /* Workaround for OS X bug. */
- Log.log(Log.ERROR,GUIUtilities.class,e);
- }
-
- if(OperatingSystem.isX11() && Debug.GEOMETRY_WORKAROUND)
- new UnixWorkaround(win,name,desired,extState);
- else
- {
- win.setBounds(desired);
- if(win instanceof Frame)
- ((Frame)win).setExtendedState(extState);
- }
-
- } //}}}
-
- //{{{ loadGeometry() method
- /**
- * Loads a windows's geometry from the properties.
- * The geometry is loaded from the <code><i>name</i>.x</code>,
- * <code><i>name</i>.y</code>, <code><i>name</i>.width</code> and
- * <code><i>name</i>.height</code> properties.
- *
- * @param win The window to load geometry from
- * @param name The name of the window
- */
- public static void loadGeometry(Window win, String name)
- {
- loadGeometry(win, win.getParent(), name);
- } //}}}
-
- //{{{ adjustForScreenBounds() method
- /**
- * Gives a rectangle the specified bounds, ensuring it is within the
- * screen bounds.
- * @since jEdit 4.2pre3
- */
- public static void adjustForScreenBounds(Rectangle desired)
- {
- // Make sure the window is displayed in visible region
- Rectangle osbounds = OperatingSystem.getScreenBounds(desired);
-
- if (desired.width > osbounds.width)
- {
- desired.width = osbounds.width;
- }
- if (desired.x < osbounds.x)
- {
- desired.x = osbounds.x;
- }
- if (desired.x + desired.width > osbounds.x + osbounds.width)
- {
- desired.x = osbounds.x + osbounds.width - desired.width;
- }
- if (desired.height > osbounds.height)
- {
- desired.height = osbounds.height;
- }
- if (desired.y < osbounds.y)
- {
- desired.y = osbounds.y;
- }
- if (desired.y + desired.height > osbounds.y + osbounds.height)
- {
- desired.y = osbounds.y + osbounds.height - desired.height;
- }
- } //}}}
-
- //{{{ UnixWorkaround class
- public static class UnixWorkaround
- {
- Window win;
- String name;
- Rectangle desired;
- Rectangle required;
- long start;
- boolean windowOpened;
-
- //{{{ UnixWorkaround constructor
- public UnixWorkaround(Window win, String name, Rectangle desired,
- int extState)
- {
- this.win = win;
- this.name = name;
- this.desired = desired;
-
- int adjust_x = jEdit.getIntegerProperty(name + ".dx",0);
- int adjust_y = jEdit.getIntegerProperty(name + ".dy",0);
- int adjust_width = jEdit.getIntegerProperty(name + ".d-width",0);
- int adjust_height = jEdit.getIntegerProperty(name + ".d-height",0);
-
- required = new Rectangle(
- desired.x - adjust_x,
- desired.y - adjust_y,
- desired.width - adjust_width,
- desired.height - adjust_height);
-
- Log.log(Log.DEBUG,GUIUtilities.class,"Window " + name
- + ": desired geometry is " + desired);
- Log.log(Log.DEBUG,GUIUtilities.class,"Window " + name
- + ": setting geometry to " + required);
-
- start = System.currentTimeMillis();
-
- win.setBounds(required);
- if(win instanceof Frame)
- ((Frame)win).setExtendedState(extState);
-
- win.addComponentListener(new ComponentHandler());
- win.addWindowListener(new WindowHandler());
- } //}}}
-
- //{{{ ComponentHandler class
- private class ComponentHandler extends ComponentAdapter
- {
- //{{{ componentMoved() method
- @Override
- public void componentMoved(ComponentEvent evt)
- {
- if(System.currentTimeMillis() - start < 1000L)
- {
- Rectangle r = win.getBounds();
- if(!windowOpened && r.equals(required))
- return;
-
- if(!r.equals(desired))
- {
- Log.log(Log.DEBUG,GUIUtilities.class,
- "Window resize blocked: " + win.getBounds());
- win.setBounds(desired);
- }
- }
-
- win.removeComponentListener(this);
- } //}}}
-
- //{{{ componentResized() method
- @Override
- public void componentResized(ComponentEvent evt)
- {
- if(System.currentTimeMillis() - start < 1000L)
- {
- Rectangle r = win.getBounds();
- if(!windowOpened && r.equals(required))
- return;
-
- if(!r.equals(desired))
- {
- Log.log(Log.DEBUG,GUIUtilities.class,
- "Window resize blocked: " + win.getBounds());
- win.setBounds(desired);
- }
- }
-
- win.removeComponentListener(this);
- } //}}}
- } //}}}
-
- //{{{ WindowHandler class
- private class WindowHandler extends WindowAdapter
- {
- //{{{ windowOpened() method
- @Override
- public void windowOpened(WindowEvent evt)
- {
- windowOpened = true;
-
- Rectangle r = win.getBounds();
- Log.log(Log.DEBUG,GUIUtilities.class,"Window "
- + name + ": bounds after opening: " + r);
-
- jEdit.setIntegerProperty(name + ".dx",
- r.x - required.x);
- jEdit.setIntegerProperty(name + ".dy",
- r.y - required.y);
- jEdit.setIntegerProperty(name + ".d-width",
- r.width - required.width);
- jEdit.setIntegerProperty(name + ".d-height",
- r.height - required.height);
-
- win.removeWindowListener(this);
- } //}}}
- } //}}}
- } //}}}
-
- //{{{ saveGeometry() method
- /**
- * Saves a window's geometry to the properties.
- * The geometry is saved to the <code><i>name</i>.x</code>,
- * <code><i>name</i>.y</code>, <code><i>name</i>.width</code> and
- * <code><i>name</i>.height</code> properties.<br />
- * For Frame's and descendents use {@link #addSizeSaver(Frame,String)} to save the sizes
- * correct even if the Frame is in maximized or iconified state.
- * @param win The window to load geometry from
- * @param name The name of the window
- * @see #addSizeSaver(Frame,String)
- */
- public static void saveGeometry(Window win, String name)
- {
- saveGeometry (win, win.getParent(), name);
- } //}}}
-
- //{{{ saveGeometry() method
- /**
- * Saves a window's geometry to the properties.
- * The geometry is saved to the <code><i>name</i>.x</code>,
- * <code><i>name</i>.y</code>, <code><i>name</i>.width</code> and
- * <code><i>name</i>.height</code> properties.<br />
- * For Frame's and descendents use {@link #addSizeSaver(Frame,Container,String)} to save the sizes
- * correct even if the Frame is in maximized or iconified state.
- * @param win The window to load geometry from
- * @param parent The parent frame to be relative to.
- * @param name The name of the window
- * @see #addSizeSaver(Frame,Container,String)
- */
- public static void saveGeometry(Window win, Container parent, String name)
- {
- if(win instanceof Frame)
- {
- jEdit.setIntegerProperty(name + ".extendedState",
- ((Frame)win).getExtendedState());
- }
-
- Rectangle bounds = win.getBounds();
- int x = bounds.x;
- int y = bounds.y;
- if (parent != null)
- {
- Rectangle parentBounds = parent.getBounds();
- x -= parentBounds.x;
- y -= parentBounds.y;
- }
- jEdit.setIntegerProperty(name + ".x",x);
- jEdit.setIntegerProperty(name + ".y",y);
- jEdit.setIntegerProperty(name + ".width", bounds.width);
- jEdit.setIntegerProperty(name + ".height", bounds.height);
- } //}}}
-
- //{{{ centerOnScreen() method
- /**
- * Centers the given window on the screen. This method is needed because
- * JDK 1.3 does not have a <code>JWindow.setLocationRelativeTo()</code>
- * method.
- * @since jEdit 4.2pre3
- * @deprecated use {@link javax.swing.JWindow#setLocationRelativeTo(java.awt.Component)}
- */
- @Deprecated
- public static void centerOnScreen(Window win)
- {
- GraphicsDevice gd = GraphicsEnvironment
- .getLocalGraphicsEnvironment()
- .getDefaultScreenDevice();
- Rectangle gcbounds = gd.getDefaultConfiguration().getBounds();
- int x = gcbounds.x + (gcbounds.width - win.getWidth()) / 2;
- int y = gcbounds.y + (gcbounds.height - win.getHeight()) / 2;
- win.setLocation(x,y);
- } //}}}
-
- //}}}
-
- //{{{ hideSplashScreen() method
- /**
- * Ensures that the splash screen is not visible. This should be
- * called before displaying any dialog boxes or windows at
- * startup.
- */
- public static void hideSplashScreen()
- {
- if(splash != null)
- {
- splash.dispose();
- splash = null;
- }
- } //}}}
-
- //{{{ createMultilineLabel() method
- /**
- * Creates a component that displays a multiple line message. This
- * is implemented by assembling a number of <code>JLabels</code> in
- * a <code>JPanel</code>.
- * @param str The string, with lines delimited by newline
- * (<code>\n</code>) characters.
- * @since jEdit 4.1pre3
- */
- public static JComponent createMultilineLabel(String str)
- {
- JPanel panel = new JPanel(new VariableGridLayout(
- VariableGridLayout.FIXED_NUM_COLUMNS,1,1,1));
- int lastOffset = 0;
- while(true)
- {
- int index = str.indexOf('\n',lastOffset);
- if(index == -1)
- break;
- else
- {
- panel.add(new JLabel(str.substring(lastOffset,index)));
- lastOffset = index + 1;
- }
- }
-
- if(lastOffset != str.length())
- panel.add(new JLabel(str.substring(lastOffset)));
-
- return panel;
- } //}}}
-
- //{{{ requestFocus() method
- /**
- * Focuses on the specified component as soon as the window becomes
- * active.
- * @param win The window
- * @param comp The component
- */
- public static void requestFocus(final Window win, final Component comp)
- {
- win.addWindowFocusListener(new WindowAdapter()
- {
- @Override
- public void windowGainedFocus(WindowEvent evt)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- comp.requestFocusInWindow();
- }
- });
- win.removeWindowFocusListener(this);
- }
- });
- } //}}}
-
- //{{{ isPopupTrigger() method
- /**
- * Returns if the specified event is the popup trigger event.
- * This implements precisely defined behavior, as opposed to
- * MouseEvent.isPopupTrigger().
- * @param evt The event
- * @since jEdit 3.2pre8
- */
- public static boolean isPopupTrigger(MouseEvent evt)
- {
- return TextAreaMouseHandler.isRightButton(evt.getModifiers());
- } //}}}
-
- //{{{ isMiddleButton() method
- /**
- * @param modifiers The modifiers flag from a mouse event
- * @since jEdit 4.1pre9
- */
- public static boolean isMiddleButton(int modifiers)
- {
- return TextAreaMouseHandler.isMiddleButton(modifiers);
- } //}}}
-
- //{{{ isRightButton() method
- /**
- * @param modifiers The modifiers flag from a mouse event
- * @since jEdit 4.1pre9
- */
- public static boolean isRightButton(int modifiers)
- {
- return TextAreaMouseHandler.isRightButton(modifiers);
- } //}}}
-
- //{{{ getScreenBounds() method
- /**
- * Returns the screen bounds, taking into account multi-screen
- * environments.
- * @since jEdit 4.3pre18
- */
- public static Rectangle getScreenBounds()
- {
- Rectangle bounds = GraphicsEnvironment.getLocalGraphicsEnvironment().
- getMaximumWindowBounds();
- GraphicsDevice [] devices = GraphicsEnvironment.
- getLocalGraphicsEnvironment().getScreenDevices();
- if (devices.length > 1)
- {
- for (GraphicsDevice device: devices)
- {
- for (GraphicsConfiguration config: device.getConfigurations())
- bounds = bounds.union(config.getBounds());
- }
- }
- return bounds;
- }
-
- //{{{ showPopupMenu() method
- /**
- * Shows the specified popup menu, ensuring it is displayed within
- * the bounds of the screen.
- * @param popup The popup menu
- * @param comp The component to show it for
- * @param x The x co-ordinate
- * @param y The y co-ordinate
- * @since jEdit 4.0pre1
- * @see javax.swing.JComponent#setComponentPopupMenu(javax.swing.JPopupMenu) setComponentPopupMenu
- * which works better and is simpler to use: you don't have to write the code to
- * show/hide popups in response to mouse events anymore.
- */
- public static void showPopupMenu(JPopupMenu popup, Component comp,
- int x, int y)
- {
- showPopupMenu(popup,comp,x,y,true);
- } //}}}
-
- //{{{ showPopupMenu() method
- /**
- * Shows the specified popup menu, ensuring it is displayed within
- * the bounds of the screen.
- * @param popup The popup menu
- * @param comp The component to show it for
- * @param x The x co-ordinate
- * @param y The y co-ordinate
- * @param point If true, then the popup originates from a single point;
- * otherwise it will originate from the component itself. This affects
- * positioning in the case where the popup does not fit onscreen.
- *
- * @since jEdit 4.1pre1
- */
- public static void showPopupMenu(JPopupMenu popup, Component comp,
- int x, int y, boolean point)
- {
- int offsetX = 0;
- int offsetY = 0;
-
- int extraOffset = point ? 1 : 0;
-
- Component win = comp;
- while(!(win instanceof Window || win == null))
- {
- offsetX += win.getX();
- offsetY += win.getY();
- win = win.getParent();
- }
-
- if(win != null)
- {
- Dimension size = popup.getPreferredSize();
-
- Rectangle screenSize = getScreenBounds();
-
- if(x + offsetX + size.width + win.getX() > screenSize.width
- && x + offsetX + win.getX() >= size.width)
- {
- //System.err.println("x overflow");
- if(point)
- x -= size.width + extraOffset;
- else
- x = win.getWidth() - size.width - offsetX + extraOffset;
- }
- else
- {
- x += extraOffset;
- }
-
- //System.err.println("y=" + y + ",offsetY=" + offsetY
- // + ",size.height=" + size.height
- // + ",win.height=" + win.getHeight());
- if(y + offsetY + size.height + win.getY() > screenSize.height
- && y + offsetY + win.getY() >= size.height)
- {
- if(point)
- y = win.getHeight() - size.height - offsetY + extraOffset;
- else
- y = -size.height - 1;
- }
- else
- {
- y += extraOffset;
- }
-
- popup.show(comp,x,y);
- }
- else
- popup.show(comp,x + extraOffset,y + extraOffset);
-
- } //}}}
-
- //{{{ isAncestorOf() method
- /**
- * Returns if the first component is an ancestor of the
- * second by traversing up the component hierarchy.
- *
- * @param comp1 The ancestor
- * @param comp2 The component to check
- * @since jEdit 4.1pre5
- */
- public static boolean isAncestorOf(Component comp1, Component comp2)
- {
- while(comp2 != null)
- {
- if(comp1 == comp2)
- return true;
- else
- comp2 = comp2.getParent();
- }
-
- return false;
- } //}}}
-
- //{{{ getParentDialog() method
- /**
- * Traverses the given component's parent tree looking for an
- * instance of JDialog, and return it. If not found, return null.
- * @param c The component
- */
- public static JDialog getParentDialog(Component c)
- {
- return (JDialog) SwingUtilities.getAncestorOfClass(JDialog.class, c);
- } //}}}
-
- //{{{ getComponentParent() method
- /**
- * Finds a parent of the specified component.
- * @param comp The component
- * @param clazz Looks for a parent with this class (exact match, not
- * derived).
- * @since jEdit 4.2pre1
- */
- public static Component getComponentParent(Component comp, Class clazz)
- {
- while(true)
- {
- if(comp == null)
- break;
-
- if(comp instanceof JComponent)
- {
- Component real = (Component)((JComponent)comp)
- .getClientProperty("KORTE_REAL_FRAME");
- if(real != null)
- comp = real;
- }
-
- if(comp.getClass().equals(clazz))
- return comp;
- else if(comp instanceof JPopupMenu)
- comp = ((JPopupMenu)comp).getInvoker();
- else if(comp instanceof FloatingWindowContainer)
- {
- comp = ((FloatingWindowContainer)comp)
- .getDockableWindowManager();
- }
- else
- comp = comp.getParent();
- }
- return null;
- } //}}}
-
- //{{{ setEnabledRecursively() method
- /**
- * Call setEnabled() recursively on the container and its descendants.
- * @param c The container
- * @param enabled The enabled state to set
- * @since jEdit 4.3pre17
- */
- public static void setEnabledRecursively(Container c, boolean enabled)
- {
- for (Component child: c.getComponents())
- {
- if (child instanceof Container)
- setEnabledRecursively((Container)child, enabled);
- else
- child.setEnabled(enabled);
- }
- c.setEnabled(enabled);
- } //}}}
-
- //{{{ getView() method
- /**
- * Finds the view parent of the specified component.
- * @since jEdit 4.0pre2
- */
- public static View getView(Component comp)
- {
- return (View)getComponentParent(comp,View.class);
- } //}}}
-
- //{{{ addSizeSaver() method
- /**
- * Adds a SizeSaver to the specified Frame. For non-Frame's use {@link #saveGeometry(Window,String)}
- *
- * @param frame The Frame for which to save the size
- * @param name The prefix for the settings
- * @since jEdit 4.3pre6
- * @see #saveGeometry(Window,String)
- */
- public static void addSizeSaver(Frame frame, String name)
- {
- addSizeSaver(frame,frame.getParent(),name);
- } //}}}
-
- //{{{ addSizeSaver() method
- /**
- * Adds a SizeSaver to the specified Frame. For non-Frame's use {@link #saveGeometry(Window,Container,String)}
- *
- * @param frame The Frame for which to save the size
- * @param parent The parent to be relative to
- * @param name The prefix for the settings
- * @since jEdit 4.3pre7
- * @see #saveGeometry(Window,Container,String)
- */
- public static void addSizeSaver(Frame frame, Container parent, String name)
- {
- SizeSaver ss = new SizeSaver(frame,parent,name);
- frame.addWindowStateListener(ss);
- frame.addComponentListener(ss);
- } //}}}
-
- //{{{ initContinuousLayout() method
- /**
- * Init the continuous layout flag using the jEdit's property
- * appearance.continuousLayout
- *
- * @param split the split. It must never be null
- * @since jEdit 4.3pre9
- */
- public static void initContinuousLayout(JSplitPane split)
- {
- boolean continuousLayout = split.isContinuousLayout();
- if (continuousLayout != jEdit.getBooleanProperty("appearance.continuousLayout"))
- split.setContinuousLayout(!continuousLayout);
- } //}}}
-
- //{{{ Package-private members
-
- //{{{ initializeDeprecatedIcons() method
- /**
- * Initializes a list of mappings between old icon names and new names
- */
- private static void initializeDeprecatedIcons()
- {
- deprecatedIcons.put("File.png", "16x16/mimetypes/text-x-generic.png");
- deprecatedIcons.put("Folder.png", "16x16/places/folder.png");
- deprecatedIcons.put("OpenFolder.png", "16x16/status/folder-open.png");
- deprecatedIcons.put("OpenFile.png", "16x16/actions/edit-select-all.png");
- deprecatedIcons.put("ReloadSmall.png","16x16/actions/view-refresh.png");
- deprecatedIcons.put("DriveSmall.png", "16x16/devices/drive-harddisk.png");
- deprecatedIcons.put("New.png", "22x22/actions/document-new.png");
- deprecatedIcons.put("NewDir.png", "22x22/actions/folder-new.png");
- deprecatedIcons.put("Reload.png", "22x22/actions/view-refresh.png");
- deprecatedIcons.put("Load.png", "22x22/places/plugins.png");
- deprecatedIcons.put("Save.png", "22x22/actions/document-save.png");
- deprecatedIcons.put("SaveAs.png", "22x22/actions/document-save-as.png");
- deprecatedIcons.put("SaveAll.png", "22x22/actions/document-save-all.png");
- deprecatedIcons.put("Open.png", "22x22/actions/document-open.png");
- deprecatedIcons.put("Print.png", "22x22/actions/document-print.png");
- deprecatedIcons.put("Drive.png", "22x22/devices/drive-harddisk.png");
- deprecatedIcons.put("Clear.png", "22x22/actions/edit-clear.png");
- deprecatedIcons.put("Run.png", "22x22/actions/application-run.png");
- deprecatedIcons.put("RunAgain.png", "22x22/actions/application-run-again.png");
- deprecatedIcons.put("RunToBuffer.png", "22x22/actions/run-to-buffer.png");
- deprecatedIcons.put("CopyToBuffer.png", "22x22/actions/copy-to-buffer.png");
- deprecatedIcons.put("Plus.png", "22x22/actions/list-add.png");
- deprecatedIcons.put("Minus.png", "22x22/actions/list-remove.png");
- deprecatedIcons.put("Find.png", "22x22/actions/edit-find.png");
- deprecatedIcons.put("FindAgain.png", "22x22/actions/edit-find-next.png");
- deprecatedIcons.put("FindInDir.png", "22x22/actions/edit-find-in-folder.png");
- deprecatedIcons.put("Parse.png", "22x22/actions/document-reload2.png");
- deprecatedIcons.put("Delete.png", "22x22/actions/edit-delete.png");
- deprecatedIcons.put("Paste.png", "22x22/actions/edit-paste.png");
- deprecatedIcons.put("Cut.png", "22x22/actions/edit-cut.png");
- deprecatedIcons.put("Copy.png", "22x22/actions/edit-copy.png");
- deprecatedIcons.put("Undo.png", "22x22/actions/edit-undo.png");
- deprecatedIcons.put("Redo.png", "22x22/actions/edit-redo.png");
- deprecatedIcons.put("CurrentDir.png", "22x22/status/folder-visiting.png");
- deprecatedIcons.put("ParentDir.png", "22x22/actions/go-parent.png");
- deprecatedIcons.put("PageSetup.png", "22x22/actions/printer-setup.png");
- deprecatedIcons.put("Plugins.png", "22x22/apps/system-installer.png");
- deprecatedIcons.put("Floppy.png", "22x22/devices/media-floppy.png");
- deprecatedIcons.put("Stop.png", "22x22/actions/process-stop.png");
- deprecatedIcons.put("Cancel.png", "22x22/actions/process-stop.png");
- deprecatedIcons.put("Home.png", "22x22/actions/go-home.png");
- deprecatedIcons.put("Help.png", "22x22/apps/help-browser.png");
- deprecatedIcons.put("Properties.png", "22x22/actions/document-properties.png");
- deprecatedIcons.put("Preferences.png","22x22/categories/preferences-system.png");
- deprecatedIcons.put("ZoomIn.png", "22x22/actions/zoom-in.png");
- deprecatedIcons.put("ZoomOut.png", "22x22/actions/zoom-out.png");
- deprecatedIcons.put("BrokenImage.png","22x22/status/image-missing.png");
- deprecatedIcons.put("AdjustWidth.png","22x22/actions/resize-horisontal.png");
- deprecatedIcons.put("ToolbarMenu.gif","ToolbarMenu.gif");
-
- deprecatedIcons.put("Play.png","22x22/actions/media-playback-start.png");
- deprecatedIcons.put("Pause.png","22x22/actions/media-playback-pause.png");
-
- deprecatedIcons.put("MultipleResults.png", "22x22/actions/edit-find-multiple.png");
- deprecatedIcons.put("SingleResult.png", "22x22/actions/edit-find-single.png");
-
- deprecatedIcons.put("NextFile.png", "22x22/go-last.png");
- deprecatedIcons.put("PreviousFile.png","22x22/go-first.png");
-
- deprecatedIcons.put("closebox.gif", "10x10/actions/close.png");
- deprecatedIcons.put("normal.gif", "10x10/status/document-unmodified.png");
- deprecatedIcons.put("readonly.gif", "10x10/emblem/emblem-readonly.png");
- deprecatedIcons.put("dirty.gif", "10x10/status/document-modified.png");
- deprecatedIcons.put("new.gif", "10x10/status/document-new.png");
-
- deprecatedIcons.put("ArrowU.png", "22x22/actions/go-up.png");
- deprecatedIcons.put("ArrowR.png", "22x22/actions/go-next.png");
- deprecatedIcons.put("ArrowD.png", "22x22/actions/go-down.png");
- deprecatedIcons.put("ArrowL.png", "22x22/actions/go-previous.png");
- deprecatedIcons.put("arrow1.png", "16x16/actions/group-expand.png");
- deprecatedIcons.put("arrow2.png", "16x16/actions/group-collapse.png");
-
- deprecatedIcons.put("NewView.png", "22x22/actions/window-new.png");
- deprecatedIcons.put("UnSplit.png", "22x22/actions/window-unsplit.png");
- deprecatedIcons.put("SplitVertical.png", "22x22/actions/window-split-vertical.png");
- deprecatedIcons.put("SplitHorizontal.png", "22x22/actions/window-split-horizontal.png");
-
- deprecatedIcons.put("ButtonProperties.png", "22x22/actions/document-properties.png");
-
- }
- //}}}
-
- //{{{ init() method
- static void init()
- {
- initializeDeprecatedIcons();
-
- // Load the icon theme but fallback on the old icons
- String theme = jEdit.getProperty("icon-theme", "tango");
- Log.log(Log.DEBUG, GUIUtilities.class, "Icon theme set to: "+theme);
- setIconPath("jeditresource:/org/gjt/sp/jedit/icons/themes/" + theme + '/');
- Log.log(Log.DEBUG, GUIUtilities.class, "Loading icon theme from: "+iconPath);
-
- // don't do this in static{} since we need jEdit.initMisc()
- // run first so we have the jeditresource: protocol
- NEW_BUFFER_ICON = loadIcon("new.gif");
- DIRTY_BUFFER_ICON = loadIcon("dirty.gif");
- READ_ONLY_BUFFER_ICON = loadIcon("readonly.gif");
- NORMAL_BUFFER_ICON = loadIcon("normal.gif");
- WINDOW_ICON = loadIcon(jEdit.getProperty("logo.icon.medium"));
- } //}}}
-
- //{{{ showSplashScreen() method
- static void showSplashScreen()
- {
- splash = new SplashScreen();
- } //}}}
-
- //{{{ advanceSplashProgress() method
- static void advanceSplashProgress()
- {
- if(splash != null)
- splash.advance();
- } //}}}
-
- //{{{ advanceSplashProgress() method
- static void advanceSplashProgress(String label)
- {
- if(splash != null)
- splash.advance(label);
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private static SplashScreen splash;
- private static Map<String, Icon> icons;
- private static String iconPath = "jeditresource:/org/gjt/sp/jedit/icons/themes/";
- private static final String defaultIconPath = "jeditresource:/org/gjt/sp/jedit/icons/themes/";
- private static final HashMap<String, String> deprecatedIcons = new HashMap<String, String>();
-
- //{{{ _loadMenuItem() method
- private static JMenuItem _loadMenuItem(String name, ActionContext context, boolean setMnemonic)
- {
-
- String label = jEdit.getProperty(name + ".label");
- if (label == null)
- {
- label = name;
- }
- char mnemonic;
- int index = label.indexOf('$');
- if (index != -1 && label.length() - index > 1)
- {
- mnemonic = Character.toLowerCase(label.charAt(index + 1));
- label = label.substring(0, index).concat(label.substring(++index));
- }
- else
- {
- mnemonic = '\0';
- }
- JMenuItem mi;
- if (jEdit.getBooleanProperty(name + ".toggle"))
- {
- mi = new EnhancedCheckBoxMenuItem(label, name, context);
- }
- else
- {
- mi = new EnhancedMenuItem(label, name, context);
- }
- if (!OperatingSystem.isMacOS() && setMnemonic && mnemonic != '\0')
- {
- mi.setMnemonic(mnemonic);
- }
- Icon itemIcon = loadIcon(jEdit.getProperty(name + ".icon.small"));
- if(itemIcon != null)
- {
- mi.setIcon(itemIcon);
- }
-
- return mi;
- } //}}}
-
- private GUIUtilities() {}
- //}}}
-
- //{{{ Inner classes
-
- //{{{ SizeSaver class
- /**
- * A combined ComponentListener and WindowStateListener to continually save a Frames size.<br />
- * For non-Frame's use {@link GUIUtilities#saveGeometry(Window,String)}
- *
- * @author Björn Kautler
- * @version $Id: GUIUtilities.java 16406 2009-10-22 20:42:36Z shlomy $
- * @since jEdit 4.3pre6
- * @see GUIUtilities#saveGeometry(Window,Container,String)
- */
- private static class SizeSaver extends ComponentAdapter implements WindowStateListener
- {
- private Frame frame;
- private Container parent;
- private String name;
-
- //{{{ SizeSaver constructors
- /**
- * Constructs a new SizeSaver.
- *
- * @param frame The Frame for which to save the size
- * @param parent The parent to be relative to.
- * @param name The prefix for the settings
- */
- SizeSaver(Frame frame, Container parent, String name)
- {
- if (frame == null || name == null)
- {
- throw new NullPointerException();
- }
- this.frame = frame;
- this.parent = parent;
- this.name = name;
- } //}}}
-
- //{{{ windowStateChanged() method
- public void windowStateChanged(WindowEvent wse)
- {
- int extendedState = wse.getNewState();
- jEdit.setIntegerProperty(name + ".extendedState",extendedState);
- Rectangle bounds = frame.getBounds();
- save(extendedState, bounds);
- } //}}}
-
- //{{{ save() method
- private void save(int extendedState, Rectangle bounds)
- {
- switch (extendedState)
- {
- case Frame.MAXIMIZED_VERT:
- jEdit.setIntegerProperty(name + ".x",bounds.x);
- jEdit.setIntegerProperty(name + ".width",bounds.width);
- break;
-
- case Frame.MAXIMIZED_HORIZ:
- jEdit.setIntegerProperty(name + ".y",bounds.y);
- jEdit.setIntegerProperty(name + ".height",bounds.height);
- break;
-
- case Frame.NORMAL:
- saveGeometry(frame,parent,name );
- break;
- }
- } //}}}
-
- //{{{ componentResized() method
- @Override
- public void componentResized(ComponentEvent ce)
- {
- componentMoved(ce);
- } //}}}
-
- //{{{ componentMoved() method
- @Override
- public void componentMoved(ComponentEvent ce)
- {
- final Rectangle bounds = frame.getBounds();
- final Runnable sizeSaver = new Runnable()
- {
- public void run()
- {
- int extendedState = frame.getExtendedState();
- save(extendedState, bounds);
- }
- };
- new Thread("Sizesavingdelay")
- {
- @Override
- public void run()
- {
- try
- {
- Thread.sleep(500L);
- }
- catch (InterruptedException ie)
- {
- }
- SwingUtilities.invokeLater(sizeSaver);
- }
- }.start();
- } //}}}
- } //}}}
-
- //}}}
-}
+/*
+ * GUIUtilities.java - Various GUI utility functions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import org.gjt.sp.jedit.browser.VFSFileChooserDialog;
+import org.gjt.sp.jedit.gui.DynamicContextMenuService;
+import org.gjt.sp.jedit.gui.EnhancedButton;
+import org.gjt.sp.jedit.gui.FloatingWindowContainer;
+import org.gjt.sp.jedit.gui.SplashScreen;
+import org.gjt.sp.jedit.gui.VariableGridLayout;
+import org.gjt.sp.jedit.menu.EnhancedCheckBoxMenuItem;
+import org.gjt.sp.jedit.menu.EnhancedMenu;
+import org.gjt.sp.jedit.menu.EnhancedMenuItem;
+import org.gjt.sp.jedit.syntax.SyntaxStyle;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+import org.gjt.sp.jedit.textarea.TextAreaMouseHandler;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.SyntaxUtilities;
+
+
+import java.net.URL;
+import java.util.*;
+import java.util.List;
+import java.lang.ref.SoftReference;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JToolBar;
+import javax.swing.ListSelectionModel;
+import javax.swing.SwingUtilities;
+
+
+import java.awt.*;
+import java.awt.event.*;
+//}}}
+
+/**
+ * Various GUI functions.<p>
+ *
+ * The most frequently used members of this class are:
+ *
+ * <ul>
+ * <li>{@link #loadIcon(String)}</li>
+ * <li>{@link #confirm(Component,String,Object[],int,int)}</li>
+ * <li>{@link #error(Component,String,Object[])}</li>
+ * <li>{@link #message(Component,String,Object[])}</li>
+
+ * <li>{@link #showVFSFileDialog(View,String,int,boolean)}</li>
+ * <li>{@link #loadGeometry(Window,String)}</li>
+ * <li>{@link #saveGeometry(Window,String)}</li>
+ * <li>{@link #showPopupMenu(JPopupMenu,Component,int,int)}</li>
+ * </ul>
+ *
+ * @author Slava Pestov
+ * @version $Id: GUIUtilities.java 19158 2010-12-19 23:34:48Z ezust $
+ */
+public class GUIUtilities
+{
+ //{{{ Some predefined icons
+ /**
+ * @deprecated Use <code>GUIUtilities.loadIcon("new.gif");</code>
+ * instead.
+ */
+ @Deprecated
+ public static Icon NEW_BUFFER_ICON;
+
+ /**
+ * @deprecated Use <code>GUIUtilities.loadIcon("dirty.gif");</code>
+ * instead.
+ */
+ @Deprecated
+ public static Icon DIRTY_BUFFER_ICON;
+
+ /**
+ * @deprecated Use <code>GUIUtilities.loadIcon("readonly.gif");</code>
+ * instead.
+ */
+ @Deprecated
+ public static Icon READ_ONLY_BUFFER_ICON;
+
+ /**
+ * @deprecated Use <code>GUIUtilities.loadIcon("normal.gif");</code>
+ * instead.
+ */
+ @Deprecated
+ public static Icon NORMAL_BUFFER_ICON;
+
+ /**
+ * @deprecated Use <code>GUIUtilities.loadIcon("jedit-icon.gif");</code>
+ * instead.
+ */
+ @Deprecated
+ public static Icon WINDOW_ICON;
+ //}}}
+
+ //{{{ Icon methods
+
+ //{{{ setIconPath() method
+ /**
+ * Sets the path where jEdit looks for icons.
+ * @since jEdit 4.2pre5
+ */
+ public static void setIconPath(String iconPath)
+ {
+ GUIUtilities.iconPath = iconPath;
+ iconCache = null;
+ } //}}}
+
+ //{{{ loadIcon() method
+ /**
+ * Loads an icon.
+ * @param iconName The icon name
+ * @since jEdit 2.6pre7
+ */
+ public static Icon loadIcon(String iconName)
+ {
+ if(iconName == null)
+ return null;
+
+ // * Enable old icon naming scheme support
+ if(deprecatedIcons != null && deprecatedIcons.containsKey(iconName))
+ iconName = deprecatedIcons.get(iconName);
+
+ // check if there is a cached version first
+ Map<String, Icon> cache = null;
+ if(iconCache != null)
+ {
+ cache = iconCache.get();
+ }
+ if(cache == null)
+ {
+ cache = new Hashtable<String, Icon>();
+ iconCache = new SoftReference<Map<String, Icon>>(cache);
+ }
+ Icon icon = cache.get(iconName);
+ if(icon != null)
+ return icon;
+
+ URL url;
+
+ try
+ {
+ // get the icon
+ if(MiscUtilities.isURL(iconName))
+ url = new URL(iconName);
+ else
+ url = new URL(iconPath + iconName);
+ }
+ catch(Exception e)
+ {
+ try
+ {
+ url = new URL(defaultIconPath + iconName);
+ }
+ catch(Exception ex)
+ {
+ Log.log(Log.ERROR,GUIUtilities.class,
+ "Icon not found: " + iconName);
+ Log.log(Log.ERROR,GUIUtilities.class,ex);
+ return null;
+ }
+ }
+
+ icon = new ImageIcon(url);
+
+ cache.put(iconName,icon);
+ return icon;
+ } //}}}
+
+ //{{{ getEditorIcon() method
+ /**
+ * Returns the default editor window image.
+ */
+ public static Image getEditorIcon()
+ {
+ return ((ImageIcon)loadIcon(jEdit.getProperty("logo.icon.medium"))).getImage();
+ } //}}}
+
+ //{{{ getPluginIcon() method
+ /**
+ * Returns the default plugin window image.
+ */
+ public static Image getPluginIcon()
+ {
+ return getEditorIcon();
+ } //}}}
+
+ //}}}
+
+ //{{{ Menus, tool bars
+
+ //{{{ loadMenuBar() method
+ /**
+ * Creates a menubar. Plugins should not need to call this method.
+ * @param name The menu bar name
+ * @since jEdit 3.2pre5
+ */
+ public static JMenuBar loadMenuBar(String name)
+ {
+ return loadMenuBar(jEdit.getActionContext(),name);
+ } //}}}
+
+ //{{{ loadMenuBar() method
+ /**
+ * Creates a menubar. Plugins should not need to call this method.
+ * @param context An action context
+ * @param name The menu bar name
+ * @since jEdit 4.2pre1
+ */
+ public static JMenuBar loadMenuBar(ActionContext context, String name)
+ {
+ String menus = jEdit.getProperty(name);
+ StringTokenizer st = new StringTokenizer(menus);
+
+ JMenuBar mbar = new JMenuBar();
+
+ while(st.hasMoreTokens())
+ {
+ String menuName = st.nextToken();
+ mbar.add(loadMenu(context, menuName));
+ }
+
+ return mbar;
+ } //}}}
+
+ //{{{ loadMenu() method
+ /**
+ * Creates a menu. The menu label is set from the
+ * <code><i>name</i>.label</code> property. The menu contents is taken
+ * from the <code><i>name</i></code> property, which is a whitespace
+ * separated list of action names. An action name of <code>-</code>
+ * inserts a separator in the menu.
+ * @param name The menu name
+ * @see #loadMenuItem(String)
+ * @since jEdit 2.6pre2
+ */
+ public static JMenu loadMenu(String name)
+ {
+ return loadMenu(jEdit.getActionContext(),name);
+ } //}}}
+
+ //{{{ loadMenu() method
+ /**
+ * Creates a menu. The menu label is set from the
+ * <code><i>name</i>.label</code> property. The menu contents is taken
+ * from the <code><i>name</i></code> property, which is a whitespace
+ * separated list of action names. An action name of <code>-</code>
+ * inserts a separator in the menu.
+ * @param context An action context; either
+ * <code>jEdit.getActionContext()</code> or
+ * <code>VFSBrowser.getActionContext()</code>.
+ * @param name The menu name
+ * @see #loadMenuItem(String)
+ * @since jEdit 4.2pre1
+ */
+ public static JMenu loadMenu(ActionContext context, String name)
+ {
+ return new EnhancedMenu(name,
+ jEdit.getProperty(name.concat(".label")),
+ context);
+ } //}}}
+
+ //{{{ loadPopupMenu() method
+ /**
+ * Creates a popup menu.
+ * @param name The menu name
+ * @since jEdit 2.6pre2
+ */
+ public static JPopupMenu loadPopupMenu(String name, JEditTextArea textArea, MouseEvent evt)
+ {
+ return loadPopupMenu(jEdit.getActionContext(), name, textArea, evt);
+ } //}}}
+
+ //{{{ loadPopupMenu() method
+ /**
+ * Creates a popup menu.
+
+ * @param name The menu name
+ * @since jEdit 2.6pre2
+ */
+ public static JPopupMenu loadPopupMenu(String name)
+ {
+ return loadPopupMenu(jEdit.getActionContext(),name);
+ } //}}}
+
+ //{{{ loadPopupMenu() method
+ /**
+ * Creates a popup menu.
+
+ * @param context An action context; either
+ * <code>jEdit.getActionContext()</code> or
+ * <code>VFSBrowser.getActionContext()</code>.
+ * @param name The menu name
+ * @since jEdit 4.2pre1
+ */
+ public static JPopupMenu loadPopupMenu(ActionContext context, String name)
+ {
+ return loadPopupMenu(context, name, null, null);
+ }
+
+ //{{{ loadPopupMenu() method
+ /**
+ * Creates a popup menu.
+ * @param context An action context; either
+ * <code>jEdit.getActionContext()</code> or
+ * <code>VFSBrowser.getActionContext()</code>.
+ * @param name The menu name
+ * @param textArea the textArea wanting to show the popup.
+ * If not null, include context menu items defined by services.
+ * @param evt additional context info about where the mouse was when menu was requested
+ * @since jEdit 4.3pre15
+ */
+ public static JPopupMenu loadPopupMenu(ActionContext context, String name, JEditTextArea textArea, MouseEvent evt)
+ {
+ JPopupMenu menu = new JPopupMenu();
+
+ String menuItems = jEdit.getProperty(name);
+ if(menuItems != null)
+ {
+ StringTokenizer st = new StringTokenizer(menuItems);
+ while(st.hasMoreTokens())
+ {
+ String menuItemName = st.nextToken();
+ if(menuItemName.equals("-"))
+ menu.addSeparator();
+ else
+ menu.add(loadMenuItem(context,menuItemName,false));
+ }
+ }
+ // load menu items defined by services
+ if (textArea != null)
+ {
+ List<JMenuItem> list = GUIUtilities.getServiceContextMenuItems(textArea, evt);
+ if (!list.isEmpty())
+ {
+ menu.addSeparator();
+ }
+ for (JMenuItem mi : list)
+ {
+ menu.add(mi);
+ }
+ }
+
+ return menu;
+ } //}}}
+ //{{{ addServiceContextMenuItems() method
+ /**
+ * @return a list of menu items defined by services.
+ *
+ * @param textArea the TextArea desiring to display these menu items
+ * @since jEdit 4.3pre15
+ */
+ public static List<JMenuItem> getServiceContextMenuItems(JEditTextArea textArea, MouseEvent evt)
+ {
+ List<JMenuItem> list = new ArrayList<JMenuItem>();
+ String serviceClassName = DynamicContextMenuService.class.getName();
+ String[] menuServiceList = ServiceManager.getServiceNames(serviceClassName);
+ for (String menuServiceName : menuServiceList)
+ {
+ if (menuServiceName != null && menuServiceName.trim().length() > 0)
+ {
+ DynamicContextMenuService dcms = (DynamicContextMenuService)
+ ServiceManager.getService(serviceClassName, menuServiceName);
+ if (dcms != null)
+ {
+ JMenuItem[] items = dcms.createMenu(textArea, evt);
+ if (items != null)
+ {
+ list.addAll(Arrays.asList(items));
+ }
+ }
+ }
+ }
+ return list;
+ } //}}}
+
+ //{{{ loadMenuItem() method
+ /**
+ * Creates a menu item. The menu item is bound to the action named by
+ * <code>name</code> with label taken from the return value of the
+ * {@link EditAction#getLabel()} method.
+ *
+ * @param name The menu item name
+ * @see #loadMenu(String)
+ * @since jEdit 2.6pre1
+ */
+ public static JMenuItem loadMenuItem(String name)
+ {
+ return loadMenuItem(jEdit.getActionContext(),name,true);
+ } //}}}
+
+ //{{{ loadMenuItem() method
+ /**
+ * Creates a menu item.
+ * @param name The menu item name
+ * @param setMnemonic True if the menu item should have a mnemonic
+ * @since jEdit 3.1pre1
+ */
+ public static JMenuItem loadMenuItem(String name, boolean setMnemonic)
+ {
+ return loadMenuItem(jEdit.getActionContext(),name,setMnemonic);
+ } //}}}
+
+ //{{{ loadMenuItem() method
+ /**
+ * Creates a menu item.
+ * @param context An action context; either
+ * <code>jEdit.getActionContext()</code> or
+ * <code>VFSBrowser.getActionContext()</code>.
+ * @param name The menu item name
+ * @param setMnemonic True if the menu item should have a mnemonic
+ * @since jEdit 4.2pre1
+ */
+ public static JMenuItem loadMenuItem(ActionContext context, String name,
+ boolean setMnemonic)
+ {
+ if(name.charAt(0) == '%')
+ return loadMenu(context,name.substring(1));
+
+ return _loadMenuItem(name, context, setMnemonic);
+ } //}}}
+
+ //{{{ loadMenuItem(EditAction, boolean)
+ public static JMenuItem loadMenuItem(EditAction editAction,
+ boolean setMnemonic)
+ {
+ String name = editAction.getName();
+ ActionContext context = jEdit.getActionContext();
+
+ return _loadMenuItem(name, context, setMnemonic);
+ } //}}}
+
+ //{{{ loadToolBar() method
+ /**
+ * Creates a toolbar.
+ * @param name The toolbar name
+ * @since jEdit 4.2pre2
+ */
+ public static Container loadToolBar(String name)
+ {
+ return loadToolBar(jEdit.getActionContext(),name);
+ } //}}}
+
+ //{{{ loadToolBar() method
+ /**
+ * Creates a toolbar.
+ * @param context An action context; either
+ * <code>jEdit.getActionContext()</code> or
+ * <code>VFSBrowser.getActionContext()</code>.
+ * @param name The toolbar name
+ * @since jEdit 4.2pre2
+ */
+ public static Container loadToolBar(ActionContext context, String name)
+ {
+ JToolBar toolB = new JToolBar();
+ toolB.setFloatable(false);
+ toolB.setName(name);
+ toolB.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
+
+ String buttons = jEdit.getProperty(name);
+ if(buttons != null)
+ {
+ StringTokenizer st = new StringTokenizer(buttons);
+ while(st.hasMoreTokens())
+ {
+ String button = st.nextToken();
+ if(button.equals("-"))
+ {
+ toolB.addSeparator(new Dimension(12,12));
+ }
+ else
+ {
+ JButton b = loadToolButton(context,button);
+ if(b != null)
+ toolB.add(b);
+ }
+ }
+ }
+ toolB.addSeparator(new Dimension(12,12));
+ return toolB;
+ } //}}}
+
+ //{{{ loadToolButton() method
+ /**
+ * Loads a tool bar button. The tooltip is constructed from
+ * the <code><i>name</i>.label</code> and
+ * <code><i>name</i>.shortcut</code> properties and the icon is loaded
+ * from the resource named '/org/gjt/sp/jedit/icons/' suffixed
+ * with the value of the <code><i>name</i>.icon</code> property.
+ * @param name The name of the button
+ */
+ public static EnhancedButton loadToolButton(String name)
+ {
+ return loadToolButton(jEdit.getActionContext(),name);
+ } //}}}
+
+ //{{{ loadToolButton() method
+ /**
+ * Loads a tool bar button. The tooltip is constructed from
+ * the <code><i>name</i>.label</code> and
+ * <code><i>name</i>.shortcut</code> properties and the icon is loaded
+ * from the resource named '/org/gjt/sp/jedit/icons/' suffixed
+ * with the value of the <code><i>name</i>.icon</code> property.
+ * @param context An action context; either
+ * <code>jEdit.getActionContext()</code> or
+ * <code>VFSBrowser.getActionContext()</code>.
+ * @param name The name of the button
+ * @since jEdit 4.2pre1
+ */
+ public static EnhancedButton loadToolButton(ActionContext context,
+ String name)
+ {
+ String label = jEdit.getProperty(name + ".label");
+
+ if(label == null)
+ label = name;
+
+ Icon icon;
+ String iconName = jEdit.getProperty(name + ".icon");
+ if(iconName == null)
+ icon = loadIcon(jEdit.getProperty("broken-image.icon"));
+ else
+ {
+ icon = loadIcon(iconName);
+ if(icon == null)
+ icon = loadIcon(jEdit.getProperty("broken-image.icon"));
+ }
+
+ String toolTip = prettifyMenuLabel(label);
+ String shortcutLabel = getShortcutLabel(name);
+ if(shortcutLabel != null)
+ {
+ toolTip = toolTip + " (" + shortcutLabel + ')';
+ }
+
+ EnhancedButton b = new EnhancedButton(icon,toolTip,name,context);
+ b.setPreferredSize(new Dimension(32,32));
+ return b;
+ } //}}}
+
+ //{{{ prettifyMenuLabel() method
+ /**
+ * `Prettifies' a menu item label by removing the `$' sign. This
+ * can be used to process the contents of an <i>action</i>.label
+ * property.
+ */
+ public static String prettifyMenuLabel(String label)
+ {
+ int index = label.indexOf('$');
+ if(index != -1)
+ {
+ label = label.substring(0,index)
+ .concat(label.substring(index + 1));
+ }
+ return label;
+ } //}}}
+
+ //{{{ getShortcutLabel() method
+ /**
+ * Returns a label string to show users what shortcut are
+ * assigned to the action.
+ */
+ public static String getShortcutLabel(String action)
+ {
+ if(action == null)
+ return null;
+ else
+ {
+ String shortcut1 = jEdit.getProperty(action + ".shortcut");
+ String shortcut2 = jEdit.getProperty(action + ".shortcut2");
+
+ if(shortcut1 == null || shortcut1.length() == 0)
+ {
+ if(shortcut2 == null || shortcut2.length() == 0)
+ return null;
+ else
+ return shortcut2;
+ }
+ else
+ {
+ if(shortcut2 == null || shortcut2.length() == 0)
+ return shortcut1;
+ else
+ return shortcut1 + " or " + shortcut2;
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //}}}
+
+ //{{{ Canned dialog boxes
+
+ //{{{ message() method
+ /**
+ * Displays a dialog box.
+ * The title of the dialog is fetched from
+ * the <code><i>name</i>.title</code> property. The message is fetched
+ * from the <code><i>name</i>.message</code> property. The message
+ * is formatted by the property manager with <code>args</code> as
+ * positional parameters.
+ * @param comp The component to display the dialog for
+ * @param name The name of the dialog
+ * @param args Positional parameters to be substituted into the
+ * message text
+ */
+ public static void message(Component comp, String name, Object[] args)
+ {
+ hideSplashScreen();
+
+ JOptionPane.showMessageDialog(comp,
+ jEdit.getProperty(name.concat(".message"),args),
+ jEdit.getProperty(name.concat(".title"),args),
+ JOptionPane.INFORMATION_MESSAGE);
+ } //}}}
+
+ //{{{ error() method
+ /**
+ * Displays an error dialog box.
+ * The title of the dialog is fetched from
+ * the <code><i>name</i>.title</code> property. The message is fetched
+ * from the <code><i>name</i>.message</code> property. The message
+ * is formatted by the property manager with <code>args</code> as
+ * positional parameters.
+ * @param comp The component to display the dialog for
+ * @param name The name of the dialog
+ * @param args Positional parameters to be substituted into the
+ * message text
+ */
+ public static void error(Component comp, String name, Object[] args)
+ {
+ hideSplashScreen();
+
+ JOptionPane.showMessageDialog(comp,
+ jEdit.getProperty(name.concat(".message"),args),
+ jEdit.getProperty(name.concat(".title"),args),
+ JOptionPane.ERROR_MESSAGE);
+ } //}}}
+
+ //{{{ input() method
+ /**
+ * Displays an input dialog box and returns any text the user entered.
+ * The title of the dialog is fetched from
+ * the <code><i>name</i>.title</code> property. The message is fetched
+ * from the <code><i>name</i>.message</code> property.
+ * @param comp The component to display the dialog for
+ * @param name The name of the dialog
+ * @param def The text to display by default in the input field
+ */
+ public static String input(Component comp, String name, Object def)
+ {
+ return input(comp,name,null,def);
+ } //}}}
+
+ //{{{ inputProperty() method
+ /**
+ * Displays an input dialog box and returns any text the user entered.
+ * The title of the dialog is fetched from
+ * the <code><i>name</i>.title</code> property. The message is fetched
+ * from the <code><i>name</i>.message</code> property.
+ * @param comp The component to display the dialog for
+ * @param name The name of the dialog
+ * @param def The property whose text to display in the input field
+ */
+ public static String inputProperty(Component comp, String name,
+ String def)
+ {
+ return inputProperty(comp,name,null,def);
+ } //}}}
+
+ //{{{ input() method
+ /**
+ * Displays an input dialog box and returns any text the user entered.
+ * The title of the dialog is fetched from
+ * the <code><i>name</i>.title</code> property. The message is fetched
+ * from the <code><i>name</i>.message</code> property.
+ * @param comp The component to display the dialog for
+ * @param name The name of the dialog
+ * @param def The text to display by default in the input field
+ * @param args Positional parameters to be substituted into the
+ * message text
+ * @since jEdit 3.1pre3
+ */
+ public static String input(Component comp, String name,
+ Object[] args, Object def)
+ {
+ hideSplashScreen();
+
+ String retVal = (String)JOptionPane.showInputDialog(comp,
+ jEdit.getProperty(name.concat(".message"),args),
+ jEdit.getProperty(name.concat(".title")),
+ JOptionPane.QUESTION_MESSAGE,null,null,def);
+ return retVal;
+ } //}}}
+
+ //{{{ inputProperty() method
+ /**
+ * Displays an input dialog box and returns any text the user entered.
+ * The title of the dialog is fetched from
+ * the <code><i>name</i>.title</code> property. The message is fetched
+ * from the <code><i>name</i>.message</code> property.
+ * @param comp The component to display the dialog for
+ * @param name The name of the dialog
+ * @param args Positional parameters to be substituted into the
+ * message text
+ * @param def The property whose text to display in the input field
+ * @since jEdit 3.1pre3
+ */
+ public static String inputProperty(Component comp, String name,
+ Object[] args, String def)
+ {
+ hideSplashScreen();
+
+ String retVal = (String)JOptionPane.showInputDialog(comp,
+ jEdit.getProperty(name.concat(".message"),args),
+ jEdit.getProperty(name.concat(".title")),
+ JOptionPane.QUESTION_MESSAGE,
+ null,null,jEdit.getProperty(def));
+ if(retVal != null)
+ jEdit.setProperty(def,retVal);
+ return retVal;
+ } //}}}
+
+ //{{{ confirm() method
+ /**
+ * Displays a confirm dialog box and returns the button pushed by the
+ * user. The title of the dialog is fetched from the
+ * <code><i>name</i>.title</code> property. The message is fetched
+ * from the <code><i>name</i>.message</code> property.
+ * @param comp The component to display the dialog for
+ * @param name The name of the dialog
+ * @param args Positional parameters to be substituted into the
+ * message text
+ * @param buttons The buttons to display - for example,
+ * JOptionPane.YES_NO_CANCEL_OPTION
+ * @param type The dialog type - for example,
+ * JOptionPane.WARNING_MESSAGE
+ * @since jEdit 3.1pre3
+ */
+ public static int confirm(final Component comp, final String name,
+ final Object[] args, final int buttons, final int type)
+ {
+ if (EventQueue.isDispatchThread())
+ {
+ hideSplashScreen();
+
+ return JOptionPane.showConfirmDialog(comp,
+ jEdit.getProperty(name + ".message",args),
+ jEdit.getProperty(name + ".title"),buttons,type);
+ }
+ final int [] retValue = new int[1];
+ try
+ {
+ EventQueue.invokeAndWait(new Runnable()
+ {
+ public void run()
+ {
+ retValue[0] = confirm(comp, name, args, buttons, type);
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ return JOptionPane.CANCEL_OPTION;
+ }
+ return retValue[0];
+ } //}}}
+
+ //{{{ listConfirm() method
+ /**
+ * Displays a confirm dialog box and returns the button pushed by the
+ * user. The title of the dialog is fetched from the
+ * <code><i>name</i>.title</code> property. The message is fetched
+ * from the <code><i>name</i>.message</code> property. The dialog
+ * also shows a list of entries given by the <code>listModel</code>
+ * parameter.
+ * @param comp the parent component
+ * @param name the name of the confirm dialog
+ * @param args the for the message
+ * @param listModel the items in the list
+ * @return an integer indicating the option selected by the user
+ * @since jEdit 4.3pre1
+ */
+ public static int listConfirm(Component comp, String name, String[] args,
+ Object[] listModel)
+ {
+ JList list = new JList(listModel);
+ list.setVisibleRowCount(8);
+
+ Object[] message = {
+ jEdit.getProperty(name + ".message",args),
+ new JScrollPane(list)
+ };
+
+ return JOptionPane.showConfirmDialog(comp,
+ message,
+ jEdit.getProperty(name + ".title"),
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ } //}}}
+
+ //{{{ listConfirm() method
+ /**
+ * Displays a confirm dialog box and returns the button pushed by the
+ * user. The title of the dialog is fetched from the
+ * <code><i>name</i>.title</code> property. The message is fetched
+ * from the <code><i>name</i>.message</code> property. The dialog
+ * also shows a list of entries given by the <code>listModel</code>
+ * parameter.
+ * @param comp the parent component
+ * @param name the name of the confirm dialog
+ * @param args the for the message
+ * @param listModel the items in the list
+ * @param selectedItems give an empty list, it will contains in return the selected items
+ * @return an integer indicating the option selected by the user
+ * @since jEdit 4.3pre12
+ */
+ public static int listConfirm(Component comp, String name, String[] args,
+ Object[] listModel, List selectedItems)
+ {
+ JList list = new JList(listModel);
+ list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
+ list.setVisibleRowCount(8);
+ list.addSelectionInterval(0,listModel.length - 1);
+
+ Object[] message = {
+ jEdit.getProperty(name + ".message",args),
+ new JScrollPane(list)
+ };
+
+ int ret = JOptionPane.showConfirmDialog(comp,
+ message,
+ jEdit.getProperty(name + ".title"),
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ Object[] selectedValues = list.getSelectedValues();
+ selectedItems.addAll(Arrays.asList(selectedValues));
+ return ret;
+ } //}}}
+
+ //{{{ showVFSFileDialog() methods
+ /**
+ * Displays a VFS file selection dialog box.
+ * @param view The view, should be non-null
+ * @param path The initial directory to display. May be null
+ * @param type The dialog type. One of
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser#OPEN_DIALOG},
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser#SAVE_DIALOG}, or
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser#CHOOSE_DIRECTORY_DIALOG}.
+ * @param multipleSelection True if multiple selection should be allowed
+ * @return The selected file(s)
+ * @since jEdit 2.6pre2
+ */
+ public static String[] showVFSFileDialog(View view, String path,
+ int type, boolean multipleSelection)
+ {
+ // the view should not be null, but some plugins might do this
+ if(view == null)
+ {
+ Log.log(Log.WARNING,GUIUtilities.class,
+ "showVFSFileDialog(): given null view, assuming jEdit.getActiveView()");
+ view = jEdit.getActiveView();
+ }
+
+ hideSplashScreen();
+
+ VFSFileChooserDialog fileChooser = new VFSFileChooserDialog(
+ view,path,type,multipleSelection);
+ return fileChooser.getSelectedFiles();
+ }
+
+ /**
+ * Displays a VFS file selection dialog box.
+ * This version can specify a dialog as the parent instead
+ * of the view.
+ * @param view The view, should be non-null
+ * @param path The initial directory to display. May be null
+ * @param type The dialog type. One of
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser#OPEN_DIALOG},
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser#SAVE_DIALOG}, or
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser#CHOOSE_DIRECTORY_DIALOG}.
+ * @param multipleSelection True if multiple selection should be allowed
+ * @return The selected file(s)
+ * @since jEdit 4.3pre10
+ */
+ public static String[] showVFSFileDialog(Dialog parent, View view,
+ String path, int type, boolean multipleSelection)
+ {
+ hideSplashScreen();
+
+ VFSFileChooserDialog fileChooser = new VFSFileChooserDialog(
+ parent, view, path, type, multipleSelection, true);
+ return fileChooser.getSelectedFiles();
+ }
+
+ /**
+ * Displays a VFS file selection dialog box.
+ * This version can specify a frame as the parent instead
+ * of the view.
+ * @param parent The parent frame
+ * @param view The view, should be non-null
+ * @param path The initial directory to display. May be null
+ * @param type The dialog type. One of
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser#OPEN_DIALOG},
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser#SAVE_DIALOG}, or
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser#CHOOSE_DIRECTORY_DIALOG}.
+ * @param multipleSelection True if multiple selection should be allowed
+ * @return The selected file(s)
+ * @since jEdit 4.3pre10
+ */
+ public static String[] showVFSFileDialog(Frame parent, View view,
+ String path, int type, boolean multipleSelection)
+ {
+ hideSplashScreen();
+ VFSFileChooserDialog fileChooser = new VFSFileChooserDialog(
+ parent, view, path, type, multipleSelection, true);
+ return fileChooser.getSelectedFiles();
+ } //}}}
+
+ //}}}
+
+ //{{{ Colors and styles
+
+ //{{{ parseColor() method
+ /**
+ * Converts a color name to a color object. The name must either be
+ * a known string, such as `red', `green', etc (complete list is in
+ * the <code>java.awt.Color</code> class) or a hex color value
+ * prefixed with `#', for example `#ff0088'.
+ * @param name The color name
+ */
+ public static Color parseColor(String name)
+ {
+ return SyntaxUtilities.parseColor(name, Color.black);
+ } //}}}
+
+ //{{{ parseColor() method
+ /**
+ * @deprecated use {@link SyntaxUtilities#parseColor(String,Color)}
+ */
+ @Deprecated
+ public static Color parseColor(String name, Color defaultColor)
+ {
+ return SyntaxUtilities.parseColor(name, defaultColor);
+ } //}}}
+
+ //{{{ getColorHexString() method
+ /**
+ * Converts a color object to its hex value. The hex value
+ * prefixed is with `#', for example `#ff0088'.
+ * @param c The color object
+ * @deprecated use {@link SyntaxUtilities#parseStyle(String,String,int,boolean)}
+ */
+ @Deprecated
+ public static String getColorHexString(Color c)
+ {
+ return SyntaxUtilities.getColorHexString(c);
+ } //}}}
+
+ //{{{ parseStyle() method
+ /**
+ * Converts a style string to a style object.
+ * @param str The style string
+ * @param family Style strings only specify font style, not font family
+ * @param size Style strings only specify font style, not font family
+ * @exception IllegalArgumentException if the style is invalid
+ * @since jEdit 3.2pre6
+ */
+ public static SyntaxStyle parseStyle(String str, String family, int size)
+ throws IllegalArgumentException
+ {
+ return SyntaxUtilities.parseStyle(str,family,size,true);
+ } //}}}
+
+ //{{{ parseStyle() method
+ /**
+ * Converts a style string to a style object.
+ * @param str The style string
+ * @param family Style strings only specify font style, not font family
+ * @param size Style strings only specify font style, not font family
+ * @param color If false, the styles will be monochrome
+ * @exception IllegalArgumentException if the style is invalid
+ * @since jEdit 4.0pre4
+ * @deprecated use {@link SyntaxUtilities#parseStyle(String,String,int,boolean)}
+ */
+ @Deprecated
+ public static SyntaxStyle parseStyle(String str, String family, int size,
+ boolean color)
+ throws IllegalArgumentException
+ {
+ return SyntaxUtilities.parseStyle(str,family,size,color);
+ } //}}}
+
+ //{{{ getStyleString() method
+ /**
+ * Converts a style into it's string representation.
+ * @param style The style
+ */
+ public static String getStyleString(SyntaxStyle style)
+ {
+ StringBuilder buf = new StringBuilder();
+
+ if (style.getForegroundColor() != null)
+ {
+ buf.append("color:").append(SyntaxUtilities.getColorHexString(style.getForegroundColor()));
+ }
+
+ if (style.getBackgroundColor() != null)
+ {
+ buf.append(" bgColor:").append(SyntaxUtilities.getColorHexString(style.getBackgroundColor()));
+ }
+
+ Font font = style.getFont();
+ if (!font.isPlain())
+ {
+ buf.append(" style:");
+ if (font.isItalic())
+ buf.append('i');
+ if (font.isBold())
+ buf.append('b');
+ }
+
+ return buf.toString();
+ } //}}}
+
+ //{{{ loadStyles() method
+ /**
+ * Loads the syntax styles from the properties, giving them the specified
+ * base font family and size.
+ * @param family The font family
+ * @param size The font size
+ * @since jEdit 3.2pre6
+ * @deprecated use {@link SyntaxUtilities#loadStyles(String,int)}
+ */
+ @Deprecated
+ public static SyntaxStyle[] loadStyles(String family, int size)
+ {
+ return SyntaxUtilities.loadStyles(family,size,true);
+ }
+
+ /**
+ * Loads the syntax styles from the properties, giving them the specified
+ * base font family and size.
+ * @param family The font family
+ * @param size The font size
+ * @param color If false, the styles will be monochrome
+ * @since jEdit 4.0pre4
+ * @deprecated use {@link SyntaxUtilities#loadStyles(String,int,boolean)}
+ */
+ @Deprecated
+ public static SyntaxStyle[] loadStyles(String family, int size, boolean color)
+ {
+ return SyntaxUtilities.loadStyles(family, size, color);
+ } //}}}
+
+ //}}}
+
+ //{{{ Loading, saving window geometry
+
+ //{{{ loadGeometry() method
+ /**
+ * Loads a windows's geometry from the properties.
+ * The geometry is loaded from the <code><i>name</i>.x</code>,
+ * <code><i>name</i>.y</code>, <code><i>name</i>.width</code> and
+ * <code><i>name</i>.height</code> properties.
+ *
+ * @param win The window to load geometry from
+ * @param parent The parent frame to be relative to.
+ * @param name The name of the window
+ */
+ public static void loadGeometry(Window win, Container parent, String name )
+ {
+ Dimension size = win.getSize();
+ int width = jEdit.getIntegerProperty(name + ".width", size.width);
+ int height = jEdit.getIntegerProperty(name + ".height", size.height);
+ int x = jEdit.getIntegerProperty(name + ".x",50);
+ int y = jEdit.getIntegerProperty(name + ".y",50);
+ if(parent != null)
+ {
+ Point location = parent.getLocation();
+ x = location.x + x;
+ y = location.y + y;
+ }
+
+ int extState = jEdit.getIntegerProperty(name + ".extendedState", Frame.NORMAL);
+
+ Rectangle desired = new Rectangle(x,y,width,height);
+ try
+ {
+ if(!Debug.DISABLE_MULTIHEAD)
+ adjustForScreenBounds(desired);
+ }
+ catch(Exception e)
+ {
+ /* Workaround for OS X bug. */
+ Log.log(Log.ERROR,GUIUtilities.class,e);
+ }
+
+ if(OperatingSystem.isX11() && Debug.GEOMETRY_WORKAROUND)
+ new UnixWorkaround(win,name,desired,extState);
+ else
+ {
+ win.setBounds(desired);
+ if(win instanceof Frame)
+ ((Frame)win).setExtendedState(extState);
+ }
+
+ } //}}}
+
+ //{{{ loadGeometry() method
+ /**
+ * Loads a windows's geometry from the properties.
+ * The geometry is loaded from the <code><i>name</i>.x</code>,
+ * <code><i>name</i>.y</code>, <code><i>name</i>.width</code> and
+ * <code><i>name</i>.height</code> properties.
+ *
+ * @param win The window to load geometry from
+ * @param name The name of the window
+ */
+ public static void loadGeometry(Window win, String name)
+ {
+ loadGeometry(win, win.getParent(), name);
+ } //}}}
+
+ //{{{ adjustForScreenBounds() method
+ /**
+ * Gives a rectangle the specified bounds, ensuring it is within the
+ * screen bounds.
+ * @since jEdit 4.2pre3
+ */
+ public static void adjustForScreenBounds(Rectangle desired)
+ {
+ // Make sure the window is displayed in visible region
+ Rectangle osbounds = OperatingSystem.getScreenBounds(desired);
+
+ if (desired.width > osbounds.width)
+ {
+ desired.width = osbounds.width;
+ }
+ if (desired.x < osbounds.x)
+ {
+ desired.x = osbounds.x;
+ }
+ if (desired.x + desired.width > osbounds.x + osbounds.width)
+ {
+ desired.x = osbounds.x + osbounds.width - desired.width;
+ }
+ if (desired.height > osbounds.height)
+ {
+ desired.height = osbounds.height;
+ }
+ if (desired.y < osbounds.y)
+ {
+ desired.y = osbounds.y;
+ }
+ if (desired.y + desired.height > osbounds.y + osbounds.height)
+ {
+ desired.y = osbounds.y + osbounds.height - desired.height;
+ }
+ } //}}}
+
+ //{{{ UnixWorkaround class
+ public static class UnixWorkaround
+ {
+ Window win;
+ String name;
+ Rectangle desired;
+ Rectangle required;
+ long start;
+ boolean windowOpened;
+
+ //{{{ UnixWorkaround constructor
+ public UnixWorkaround(Window win, String name, Rectangle desired,
+ int extState)
+ {
+ this.win = win;
+ this.name = name;
+ this.desired = desired;
+
+ int adjust_x = jEdit.getIntegerProperty(name + ".dx",0);
+ int adjust_y = jEdit.getIntegerProperty(name + ".dy",0);
+ int adjust_width = jEdit.getIntegerProperty(name + ".d-width",0);
+ int adjust_height = jEdit.getIntegerProperty(name + ".d-height",0);
+
+ required = new Rectangle(
+ desired.x - adjust_x,
+ desired.y - adjust_y,
+ desired.width - adjust_width,
+ desired.height - adjust_height);
+
+ Log.log(Log.DEBUG,GUIUtilities.class,"Window " + name
+ + ": desired geometry is " + desired);
+ Log.log(Log.DEBUG,GUIUtilities.class,"Window " + name
+ + ": setting geometry to " + required);
+
+ start = System.currentTimeMillis();
+
+ win.setBounds(required);
+ if(win instanceof Frame)
+ ((Frame)win).setExtendedState(extState);
+
+ win.addComponentListener(new ComponentHandler());
+ win.addWindowListener(new WindowHandler());
+ } //}}}
+
+ //{{{ ComponentHandler class
+ private class ComponentHandler extends ComponentAdapter
+ {
+ //{{{ componentMoved() method
+ @Override
+ public void componentMoved(ComponentEvent evt)
+ {
+ if(System.currentTimeMillis() - start < 1000L)
+ {
+ Rectangle r = win.getBounds();
+ if(!windowOpened && r.equals(required))
+ return;
+
+ if(!r.equals(desired))
+ {
+ Log.log(Log.DEBUG,GUIUtilities.class,
+ "Window resize blocked: " + win.getBounds());
+ win.setBounds(desired);
+ }
+ }
+
+ win.removeComponentListener(this);
+ } //}}}
+
+ //{{{ componentResized() method
+ @Override
+ public void componentResized(ComponentEvent evt)
+ {
+ if(System.currentTimeMillis() - start < 1000L)
+ {
+ Rectangle r = win.getBounds();
+ if(!windowOpened && r.equals(required))
+ return;
+
+ if(!r.equals(desired))
+ {
+ Log.log(Log.DEBUG,GUIUtilities.class,
+ "Window resize blocked: " + win.getBounds());
+ win.setBounds(desired);
+ }
+ }
+
+ win.removeComponentListener(this);
+ } //}}}
+ } //}}}
+
+ //{{{ WindowHandler class
+ private class WindowHandler extends WindowAdapter
+ {
+ //{{{ windowOpened() method
+ @Override
+ public void windowOpened(WindowEvent evt)
+ {
+ windowOpened = true;
+
+ Rectangle r = win.getBounds();
+ Log.log(Log.DEBUG,GUIUtilities.class,"Window "
+ + name + ": bounds after opening: " + r);
+
+ jEdit.setIntegerProperty(name + ".dx",
+ r.x - required.x);
+ jEdit.setIntegerProperty(name + ".dy",
+ r.y - required.y);
+ jEdit.setIntegerProperty(name + ".d-width",
+ r.width - required.width);
+ jEdit.setIntegerProperty(name + ".d-height",
+ r.height - required.height);
+
+ win.removeWindowListener(this);
+ } //}}}
+ } //}}}
+ } //}}}
+
+ //{{{ saveGeometry() method
+ /**
+ * Saves a window's geometry to the properties.
+ * The geometry is saved to the <code><i>name</i>.x</code>,
+ * <code><i>name</i>.y</code>, <code><i>name</i>.width</code> and
+ * <code><i>name</i>.height</code> properties.<br />
+ * For Frame's and descendents use {@link #addSizeSaver(Frame,String)} to save the sizes
+ * correct even if the Frame is in maximized or iconified state.
+ * @param win The window to load geometry from
+ * @param name The name of the window
+ * @see #addSizeSaver(Frame,String)
+ */
+ public static void saveGeometry(Window win, String name)
+ {
+ saveGeometry (win, win.getParent(), name);
+ } //}}}
+
+ //{{{ saveGeometry() method
+ /**
+ * Saves a window's geometry to the properties.
+ * The geometry is saved to the <code><i>name</i>.x</code>,
+ * <code><i>name</i>.y</code>, <code><i>name</i>.width</code> and
+ * <code><i>name</i>.height</code> properties.<br />
+ * For Frame's and descendents use {@link #addSizeSaver(Frame,Container,String)} to save the sizes
+ * correct even if the Frame is in maximized or iconified state.
+ * @param win The window to load geometry from
+ * @param parent The parent frame to be relative to.
+ * @param name The name of the window
+ * @see #addSizeSaver(Frame,Container,String)
+ */
+ public static void saveGeometry(Window win, Container parent, String name)
+ {
+ if(win instanceof Frame)
+ {
+ jEdit.setIntegerProperty(name + ".extendedState",
+ ((Frame)win).getExtendedState());
+ }
+
+ Rectangle bounds = win.getBounds();
+ int x = bounds.x;
+ int y = bounds.y;
+ if (parent != null)
+ {
+ Rectangle parentBounds = parent.getBounds();
+ x -= parentBounds.x;
+ y -= parentBounds.y;
+ }
+ jEdit.setIntegerProperty(name + ".x",x);
+ jEdit.setIntegerProperty(name + ".y",y);
+ jEdit.setIntegerProperty(name + ".width", bounds.width);
+ jEdit.setIntegerProperty(name + ".height", bounds.height);
+ } //}}}
+
+ //{{{ centerOnScreen() method
+ /**
+ * Centers the given window on the screen. This method is needed because
+ * JDK 1.3 does not have a <code>JWindow.setLocationRelativeTo()</code>
+ * method.
+ * @since jEdit 4.2pre3
+ * @deprecated use {@link javax.swing.JWindow#setLocationRelativeTo(java.awt.Component)}
+ */
+ @Deprecated
+ public static void centerOnScreen(Window win)
+ {
+ GraphicsDevice gd = GraphicsEnvironment
+ .getLocalGraphicsEnvironment()
+ .getDefaultScreenDevice();
+ Rectangle gcbounds = gd.getDefaultConfiguration().getBounds();
+ int x = gcbounds.x + (gcbounds.width - win.getWidth()) / 2;
+ int y = gcbounds.y + (gcbounds.height - win.getHeight()) / 2;
+ win.setLocation(x,y);
+ } //}}}
+
+ //}}}
+
+ //{{{ hideSplashScreen() method
+ /**
+ * Ensures that the splash screen is not visible. This should be
+ * called before displaying any dialog boxes or windows at
+ * startup.
+ */
+ public static void hideSplashScreen()
+ {
+ if(splash != null)
+ {
+ splash.dispose();
+ splash = null;
+ }
+ } //}}}
+
+ //{{{ createMultilineLabel() method
+ /**
+ * Creates a component that displays a multiple line message. This
+ * is implemented by assembling a number of <code>JLabels</code> in
+ * a <code>JPanel</code>.
+ * @param str The string, with lines delimited by newline
+ * (<code>\n</code>) characters.
+ * @since jEdit 4.1pre3
+ */
+ public static JComponent createMultilineLabel(String str)
+ {
+ JPanel panel = new JPanel(new VariableGridLayout(
+ VariableGridLayout.FIXED_NUM_COLUMNS,1,1,1));
+ int lastOffset = 0;
+ while(true)
+ {
+ int index = str.indexOf('\n',lastOffset);
+ if(index == -1)
+ break;
+ else
+ {
+ panel.add(new JLabel(str.substring(lastOffset,index)));
+ lastOffset = index + 1;
+ }
+ }
+
+ if(lastOffset != str.length())
+ panel.add(new JLabel(str.substring(lastOffset)));
+
+ return panel;
+ } //}}}
+
+ //{{{ requestFocus() method
+ /**
+ * Focuses on the specified component as soon as the window becomes
+ * active.
+ * @param win The window
+ * @param comp The component
+ */
+ public static void requestFocus(final Window win, final Component comp)
+ {
+ win.addWindowFocusListener(new WindowAdapter()
+ {
+ @Override
+ public void windowGainedFocus(WindowEvent evt)
+ {
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ comp.requestFocusInWindow();
+ }
+ });
+ win.removeWindowFocusListener(this);
+ }
+ });
+ } //}}}
+
+ //{{{ isPopupTrigger() method
+ /**
+ * Returns if the specified event is the popup trigger event.
+ * This implements precisely defined behavior, as opposed to
+ * MouseEvent.isPopupTrigger().
+ * @param evt The event
+ * @since jEdit 3.2pre8
+ */
+ public static boolean isPopupTrigger(MouseEvent evt)
+ {
+ return TextAreaMouseHandler.isRightButton(evt.getModifiers());
+ } //}}}
+
+ //{{{ isMiddleButton() method
+ /**
+ * @param modifiers The modifiers flag from a mouse event
+ * @since jEdit 4.1pre9
+ */
+ public static boolean isMiddleButton(int modifiers)
+ {
+ return TextAreaMouseHandler.isMiddleButton(modifiers);
+ } //}}}
+
+ //{{{ isRightButton() method
+ /**
+ * @param modifiers The modifiers flag from a mouse event
+ * @since jEdit 4.1pre9
+ */
+ public static boolean isRightButton(int modifiers)
+ {
+ return TextAreaMouseHandler.isRightButton(modifiers);
+ } //}}}
+
+ //{{{ getScreenBounds() method
+ /**
+ * Returns the screen bounds, taking into account multi-screen
+ * environments.
+ * @since jEdit 4.3pre18
+ */
+ public static Rectangle getScreenBounds()
+ {
+ Rectangle bounds = GraphicsEnvironment.getLocalGraphicsEnvironment().
+ getMaximumWindowBounds();
+ GraphicsDevice [] devices = GraphicsEnvironment.
+ getLocalGraphicsEnvironment().getScreenDevices();
+ if (devices.length > 1)
+ {
+ for (GraphicsDevice device: devices)
+ {
+ for (GraphicsConfiguration config: device.getConfigurations())
+ bounds = bounds.union(config.getBounds());
+ }
+ }
+ return bounds;
+ }
+
+ //{{{ showPopupMenu() method
+ /**
+ * Shows the specified popup menu, ensuring it is displayed within
+ * the bounds of the screen.
+ * @param popup The popup menu
+ * @param comp The component to show it for
+ * @param x The x co-ordinate
+ * @param y The y co-ordinate
+ * @since jEdit 4.0pre1
+ * @see javax.swing.JComponent#setComponentPopupMenu(javax.swing.JPopupMenu) setComponentPopupMenu
+ * which works better and is simpler to use: you don't have to write the code to
+ * show/hide popups in response to mouse events anymore.
+ */
+ public static void showPopupMenu(JPopupMenu popup, Component comp,
+ int x, int y)
+ {
+ showPopupMenu(popup,comp,x,y,true);
+ } //}}}
+
+ //{{{ showPopupMenu() method
+ /**
+ * Shows the specified popup menu, ensuring it is displayed within
+ * the bounds of the screen.
+ * @param popup The popup menu
+ * @param comp The component to show it for
+ * @param x The x co-ordinate
+ * @param y The y co-ordinate
+ * @param point If true, then the popup originates from a single point;
+ * otherwise it will originate from the component itself. This affects
+ * positioning in the case where the popup does not fit onscreen.
+ *
+ * @since jEdit 4.1pre1
+ */
+ public static void showPopupMenu(JPopupMenu popup, Component comp,
+ int x, int y, boolean point)
+ {
+ int offsetX = 0;
+ int offsetY = 0;
+
+ int extraOffset = point ? 1 : 0;
+
+ Component win = comp;
+ while(!(win instanceof Window || win == null))
+ {
+ offsetX += win.getX();
+ offsetY += win.getY();
+ win = win.getParent();
+ }
+
+ if(win != null)
+ {
+ Dimension size = popup.getPreferredSize();
+
+ Rectangle screenSize = getScreenBounds();
+
+ if(x + offsetX + size.width + win.getX() > screenSize.width
+ && x + offsetX + win.getX() >= size.width)
+ {
+ //System.err.println("x overflow");
+ if(point)
+ x -= size.width + extraOffset;
+ else
+ x = win.getWidth() - size.width - offsetX + extraOffset;
+ }
+ else
+ {
+ x += extraOffset;
+ }
+
+ //System.err.println("y=" + y + ",offsetY=" + offsetY
+ // + ",size.height=" + size.height
+ // + ",win.height=" + win.getHeight());
+ if(y + offsetY + size.height + win.getY() > screenSize.height
+ && y + offsetY + win.getY() >= size.height)
+ {
+ if(point)
+ y = win.getHeight() - size.height - offsetY + extraOffset;
+ else
+ y = -size.height - 1;
+ }
+ else
+ {
+ y += extraOffset;
+ }
+
+ popup.show(comp,x,y);
+ }
+ else
+ popup.show(comp,x + extraOffset,y + extraOffset);
+
+ } //}}}
+
+ //{{{ isAncestorOf() method
+ /**
+ * Returns if the first component is an ancestor of the
+ * second by traversing up the component hierarchy.
+ *
+ * @param comp1 The ancestor
+ * @param comp2 The component to check
+ * @since jEdit 4.1pre5
+ */
+ public static boolean isAncestorOf(Component comp1, Component comp2)
+ {
+ while(comp2 != null)
+ {
+ if(comp1 == comp2)
+ return true;
+ else
+ comp2 = comp2.getParent();
+ }
+
+ return false;
+ } //}}}
+
+ //{{{ getParentDialog() method
+ /**
+ * Traverses the given component's parent tree looking for an
+ * instance of JDialog, and return it. If not found, return null.
+ * @param c The component
+ */
+ public static JDialog getParentDialog(Component c)
+ {
+ return (JDialog) SwingUtilities.getAncestorOfClass(JDialog.class, c);
+ } //}}}
+
+ //{{{ getComponentParent() method
+ /**
+ * Finds a parent of the specified component.
+ * @param comp The component
+ * @param clazz Looks for a parent with this class (exact match, not
+ * derived).
+ * @since jEdit 4.2pre1
+ */
+ public static Component getComponentParent(Component comp, Class clazz)
+ {
+ while(true)
+ {
+ if(comp == null)
+ break;
+
+ if(comp instanceof JComponent)
+ {
+ Component real = (Component)((JComponent)comp)
+ .getClientProperty("KORTE_REAL_FRAME");
+ if(real != null)
+ comp = real;
+ }
+
+ if(comp.getClass().equals(clazz))
+ return comp;
+ else if(comp instanceof JPopupMenu)
+ comp = ((JPopupMenu)comp).getInvoker();
+ else if(comp instanceof FloatingWindowContainer)
+ {
+ comp = ((FloatingWindowContainer)comp)
+ .getDockableWindowManager();
+ }
+ else
+ comp = comp.getParent();
+ }
+ return null;
+ } //}}}
+
+ //{{{ setEnabledRecursively() method
+ /**
+ * Call setEnabled() recursively on the container and its descendants.
+ * @param c The container
+ * @param enabled The enabled state to set
+ * @since jEdit 4.3pre17
+ */
+ public static void setEnabledRecursively(Container c, boolean enabled)
+ {
+ for (Component child: c.getComponents())
+ {
+ if (child instanceof Container)
+ setEnabledRecursively((Container)child, enabled);
+ else
+ child.setEnabled(enabled);
+ }
+ c.setEnabled(enabled);
+ } //}}}
+
+ //{{{ getView() method
+ /**
+ * Finds the view parent of the specified component.
+ * @since jEdit 4.0pre2
+ */
+ public static View getView(Component comp)
+ {
+ return (View)getComponentParent(comp,View.class);
+ } //}}}
+
+ //{{{ addSizeSaver() method
+ /**
+ * Adds a SizeSaver to the specified Frame. For non-Frame's use {@link #saveGeometry(Window,String)}
+ *
+ * @param frame The Frame for which to save the size
+ * @param name The prefix for the settings
+ * @since jEdit 4.3pre6
+ * @see #saveGeometry(Window,String)
+ */
+ public static void addSizeSaver(Frame frame, String name)
+ {
+ addSizeSaver(frame,frame.getParent(),name);
+ } //}}}
+
+ //{{{ addSizeSaver() method
+ /**
+ * Adds a SizeSaver to the specified Frame. For non-Frame's use {@link #saveGeometry(Window,Container,String)}
+ *
+ * @param frame The Frame for which to save the size
+ * @param parent The parent to be relative to
+ * @param name The prefix for the settings
+ * @since jEdit 4.3pre7
+ * @see #saveGeometry(Window,Container,String)
+ */
+ public static void addSizeSaver(Frame frame, Container parent, String name)
+ {
+ SizeSaver ss = new SizeSaver(frame,parent,name);
+ frame.addWindowStateListener(ss);
+ frame.addComponentListener(ss);
+ } //}}}
+
+ //{{{ initContinuousLayout() method
+ /**
+ * Init the continuous layout flag using the jEdit's property
+ * appearance.continuousLayout
+ *
+ * @param split the split. It must never be null
+ * @since jEdit 4.3pre9
+ */
+ public static void initContinuousLayout(JSplitPane split)
+ {
+ boolean continuousLayout = split.isContinuousLayout();
+ if (continuousLayout != jEdit.getBooleanProperty("appearance.continuousLayout"))
+ split.setContinuousLayout(!continuousLayout);
+ } //}}}
+
+ //{{{ Package-private members
+
+ //{{{ initializeDeprecatedIcons() method
+ /**
+ * Initializes a list of mappings between old icon names and new names
+ */
+ private static void initializeDeprecatedIcons()
+ {
+ deprecatedIcons.put("File.png", "16x16/mimetypes/text-x-generic.png");
+ deprecatedIcons.put("Folder.png", "16x16/places/folder.png");
+ deprecatedIcons.put("OpenFolder.png", "16x16/status/folder-open.png");
+ deprecatedIcons.put("OpenFile.png", "16x16/actions/edit-select-all.png");
+ deprecatedIcons.put("ReloadSmall.png","16x16/actions/view-refresh.png");
+ deprecatedIcons.put("DriveSmall.png", "16x16/devices/drive-harddisk.png");
+ deprecatedIcons.put("New.png", "22x22/actions/document-new.png");
+ deprecatedIcons.put("NewDir.png", "22x22/actions/folder-new.png");
+ deprecatedIcons.put("Reload.png", "22x22/actions/view-refresh.png");
+ deprecatedIcons.put("Load.png", "22x22/places/plugins.png");
+ deprecatedIcons.put("Save.png", "22x22/actions/document-save.png");
+ deprecatedIcons.put("SaveAs.png", "22x22/actions/document-save-as.png");
+ deprecatedIcons.put("SaveAll.png", "22x22/actions/document-save-all.png");
+ deprecatedIcons.put("Open.png", "22x22/actions/document-open.png");
+ deprecatedIcons.put("Print.png", "22x22/actions/document-print.png");
+ deprecatedIcons.put("Drive.png", "22x22/devices/drive-harddisk.png");
+ deprecatedIcons.put("Clear.png", "22x22/actions/edit-clear.png");
+ deprecatedIcons.put("Run.png", "22x22/actions/application-run.png");
+ deprecatedIcons.put("RunAgain.png", "22x22/actions/application-run-again.png");
+ deprecatedIcons.put("RunToBuffer.png", "22x22/actions/run-to-buffer.png");
+ deprecatedIcons.put("CopyToBuffer.png", "22x22/actions/copy-to-buffer.png");
+ deprecatedIcons.put("Plus.png", "22x22/actions/list-add.png");
+ deprecatedIcons.put("Minus.png", "22x22/actions/list-remove.png");
+ deprecatedIcons.put("Find.png", "22x22/actions/edit-find.png");
+ deprecatedIcons.put("FindAgain.png", "22x22/actions/edit-find-next.png");
+ deprecatedIcons.put("FindInDir.png", "22x22/actions/edit-find-in-folder.png");
+ deprecatedIcons.put("Parse.png", "22x22/actions/document-reload2.png");
+ deprecatedIcons.put("Delete.png", "22x22/actions/edit-delete.png");
+ deprecatedIcons.put("Paste.png", "22x22/actions/edit-paste.png");
+ deprecatedIcons.put("Cut.png", "22x22/actions/edit-cut.png");
+ deprecatedIcons.put("Copy.png", "22x22/actions/edit-copy.png");
+ deprecatedIcons.put("Undo.png", "22x22/actions/edit-undo.png");
+ deprecatedIcons.put("Redo.png", "22x22/actions/edit-redo.png");
+ deprecatedIcons.put("CurrentDir.png", "22x22/status/folder-visiting.png");
+ deprecatedIcons.put("ParentDir.png", "22x22/actions/go-parent.png");
+ deprecatedIcons.put("PageSetup.png", "22x22/actions/printer-setup.png");
+ deprecatedIcons.put("Plugins.png", "22x22/apps/system-installer.png");
+ deprecatedIcons.put("Floppy.png", "22x22/devices/media-floppy.png");
+ deprecatedIcons.put("Stop.png", "22x22/actions/process-stop.png");
+ deprecatedIcons.put("Cancel.png", "22x22/actions/process-stop.png");
+ deprecatedIcons.put("Home.png", "22x22/actions/go-home.png");
+ deprecatedIcons.put("Help.png", "22x22/apps/help-browser.png");
+ deprecatedIcons.put("Properties.png", "22x22/actions/document-properties.png");
+ deprecatedIcons.put("Preferences.png","22x22/categories/preferences-system.png");
+ deprecatedIcons.put("ZoomIn.png", "22x22/actions/zoom-in.png");
+ deprecatedIcons.put("ZoomOut.png", "22x22/actions/zoom-out.png");
+ deprecatedIcons.put("BrokenImage.png","22x22/status/image-missing.png");
+ deprecatedIcons.put("AdjustWidth.png","22x22/actions/resize-horisontal.png");
+ deprecatedIcons.put("ToolbarMenu.gif","ToolbarMenu.gif");
+
+ deprecatedIcons.put("Play.png","22x22/actions/media-playback-start.png");
+ deprecatedIcons.put("Pause.png","22x22/actions/media-playback-pause.png");
+
+ deprecatedIcons.put("MultipleResults.png", "22x22/actions/edit-find-multiple.png");
+ deprecatedIcons.put("SingleResult.png", "22x22/actions/edit-find-single.png");
+
+ deprecatedIcons.put("NextFile.png", "22x22/go-last.png");
+ deprecatedIcons.put("PreviousFile.png","22x22/go-first.png");
+
+ deprecatedIcons.put("closebox.gif", "10x10/actions/close.png");
+ deprecatedIcons.put("normal.gif", "10x10/status/document-unmodified.png");
+ deprecatedIcons.put("readonly.gif", "10x10/emblem/emblem-readonly.png");
+ deprecatedIcons.put("dirty.gif", "10x10/status/document-modified.png");
+ deprecatedIcons.put("new.gif", "10x10/status/document-new.png");
+
+ deprecatedIcons.put("ArrowU.png", "22x22/actions/go-up.png");
+ deprecatedIcons.put("ArrowR.png", "22x22/actions/go-next.png");
+ deprecatedIcons.put("ArrowD.png", "22x22/actions/go-down.png");
+ deprecatedIcons.put("ArrowL.png", "22x22/actions/go-previous.png");
+ deprecatedIcons.put("arrow1.png", "16x16/actions/group-expand.png");
+ deprecatedIcons.put("arrow2.png", "16x16/actions/group-collapse.png");
+
+ deprecatedIcons.put("NewView.png", "22x22/actions/window-new.png");
+ deprecatedIcons.put("UnSplit.png", "22x22/actions/window-unsplit.png");
+ deprecatedIcons.put("SplitVertical.png", "22x22/actions/window-split-vertical.png");
+ deprecatedIcons.put("SplitHorizontal.png", "22x22/actions/window-split-horizontal.png");
+
+ deprecatedIcons.put("ButtonProperties.png", "22x22/actions/document-properties.png");
+
+ }
+ //}}}
+
+ //{{{ init() method
+ static void init()
+ {
+ initializeDeprecatedIcons();
+
+ // Load the icon theme but fallback on the old icons
+ String theme = jEdit.getProperty("icon-theme", "tango");
+ Log.log(Log.DEBUG, GUIUtilities.class, "Icon theme set to: "+theme);
+ setIconPath("jeditresource:/org/gjt/sp/jedit/icons/themes/" + theme + '/');
+ Log.log(Log.DEBUG, GUIUtilities.class, "Loading icon theme from: "+iconPath);
+
+ // don't do this in static{} since we need jEdit.initMisc()
+ // run first so we have the jeditresource: protocol
+ NEW_BUFFER_ICON = loadIcon("new.gif");
+ DIRTY_BUFFER_ICON = loadIcon("dirty.gif");
+ READ_ONLY_BUFFER_ICON = loadIcon("readonly.gif");
+ NORMAL_BUFFER_ICON = loadIcon("normal.gif");
+ WINDOW_ICON = loadIcon(jEdit.getProperty("logo.icon.medium"));
+ } //}}}
+
+ //{{{ showSplashScreen() method
+ static void showSplashScreen()
+ {
+ splash = new SplashScreen();
+ } //}}}
+
+ //{{{ advanceSplashProgress() method
+ static void advanceSplashProgress()
+ {
+ if(splash != null)
+ splash.advance();
+ } //}}}
+
+ //{{{ advanceSplashProgress() method
+ static void advanceSplashProgress(String label)
+ {
+ if(splash != null)
+ splash.advance(label);
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private static SplashScreen splash;
+ private static SoftReference<Map<String, Icon>> iconCache;
+ private static String iconPath = "jeditresource:/org/gjt/sp/jedit/icons/themes/";
+ private static final String defaultIconPath = "jeditresource:/org/gjt/sp/jedit/icons/themes/";
+ private static final HashMap<String, String> deprecatedIcons = new HashMap<String, String>();
+
+ //{{{ _loadMenuItem() method
+ private static JMenuItem _loadMenuItem(String name, ActionContext context, boolean setMnemonic)
+ {
+
+ String label = jEdit.getProperty(name + ".label");
+
+ if (label == null)
+ {
+ label = name;
+ }
+ char mnemonic;
+ int index = label.indexOf('$');
+ if (index != -1 && label.length() - index > 1)
+ {
+ mnemonic = Character.toLowerCase(label.charAt(index + 1));
+ label = label.substring(0, index).concat(label.substring(++index));
+ }
+ else
+ {
+ mnemonic = '\0';
+ }
+ JMenuItem mi;
+ if (jEdit.getBooleanProperty(name + ".toggle"))
+ {
+ mi = new EnhancedCheckBoxMenuItem(label, name, context);
+ }
+ else
+ {
+ mi = new EnhancedMenuItem(label, name, context);
+ }
+ if (!OperatingSystem.isMacOS() && setMnemonic && mnemonic != '\0')
+ {
+ mi.setMnemonic(mnemonic);
+ }
+ Icon itemIcon = loadIcon(jEdit.getProperty(name + ".icon.small"));
+ if(itemIcon != null)
+ {
+ mi.setIcon(itemIcon);
+ }
+
+ return mi;
+ } //}}}
+
+ private GUIUtilities() {}
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ SizeSaver class
+ /**
+ * A combined ComponentListener and WindowStateListener to continually save a Frames size.<br />
+ * For non-Frame's use {@link GUIUtilities#saveGeometry(Window,String)}
+ *
+ * @author Björn Kautler
+ * @version $Id: GUIUtilities.java 19158 2010-12-19 23:34:48Z ezust $
+ * @since jEdit 4.3pre6
+ * @see GUIUtilities#saveGeometry(Window,Container,String)
+ */
+ private static class SizeSaver extends ComponentAdapter implements WindowStateListener
+ {
+ private Frame frame;
+ private Container parent;
+ private String name;
+
+ //{{{ SizeSaver constructors
+ /**
+ * Constructs a new SizeSaver.
+ *
+ * @param frame The Frame for which to save the size
+ * @param parent The parent to be relative to.
+ * @param name The prefix for the settings
+ */
+ SizeSaver(Frame frame, Container parent, String name)
+ {
+ if (frame == null || name == null)
+ {
+ throw new NullPointerException();
+ }
+ this.frame = frame;
+ this.parent = parent;
+ this.name = name;
+ } //}}}
+
+ //{{{ windowStateChanged() method
+ public void windowStateChanged(WindowEvent wse)
+ {
+ int extendedState = wse.getNewState();
+ jEdit.setIntegerProperty(name + ".extendedState",extendedState);
+ Rectangle bounds = frame.getBounds();
+ save(extendedState, bounds);
+ } //}}}
+
+ //{{{ save() method
+ private void save(int extendedState, Rectangle bounds)
+ {
+ switch (extendedState)
+ {
+ case Frame.MAXIMIZED_VERT:
+ jEdit.setIntegerProperty(name + ".x",bounds.x);
+ jEdit.setIntegerProperty(name + ".width",bounds.width);
+ break;
+
+ case Frame.MAXIMIZED_HORIZ:
+ jEdit.setIntegerProperty(name + ".y",bounds.y);
+ jEdit.setIntegerProperty(name + ".height",bounds.height);
+ break;
+
+ case Frame.NORMAL:
+ saveGeometry(frame,parent,name );
+ break;
+ }
+ } //}}}
+
+ //{{{ componentResized() method
+ @Override
+ public void componentResized(ComponentEvent ce)
+ {
+ componentMoved(ce);
+ } //}}}
+
+ //{{{ componentMoved() method
+ @Override
+ public void componentMoved(ComponentEvent ce)
+ {
+ final Rectangle bounds = frame.getBounds();
+ final Runnable sizeSaver = new Runnable()
+ {
+ public void run()
+ {
+ int extendedState = frame.getExtendedState();
+ save(extendedState, bounds);
+ }
+ };
+ new Thread("Sizesavingdelay")
+ {
+ @Override
+ public void run()
+ {
+ try
+ {
+ Thread.sleep(500L);
+ }
+ catch (InterruptedException ie)
+ {
+ }
+ EventQueue.invokeLater(sizeSaver);
+ }
+ }.start();
+ } //}}}
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/IPropertyManager.java b/jEdit/org/gjt/sp/jedit/IPropertyManager.java
index 71f2b15..e7386c8 100644
--- a/jEdit/org/gjt/sp/jedit/IPropertyManager.java
+++ b/jEdit/org/gjt/sp/jedit/IPropertyManager.java
@@ -1,39 +1,39 @@
-/*
- * IPropertyManager.java - An interface for class that returns properties
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-
-/**
- * Manage properties.
- * @author Matthieu Casanova
- * @since 4.3pre13
- */
-public interface IPropertyManager
-{
- /**
- * Returns a String property
- * @param name the name of the property
- * @return the string property or null if it doesn't exist
- */
- String getProperty(String name);
-}
+/*
+ * IPropertyManager.java - An interface for class that returns properties
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+
+/**
+ * Manage properties.
+ * @author Matthieu Casanova
+ * @since 4.3pre13
+ */
+public interface IPropertyManager
+{
+ /**
+ * Returns a String property
+ * @param name the name of the property
+ * @return the string property or null if it doesn't exist
+ */
+ String getProperty(String name);
+}
diff --git a/jEdit/org/gjt/sp/jedit/JARClassLoader.java b/jEdit/org/gjt/sp/jedit/JARClassLoader.java
index c08b568..b4bf117 100644
--- a/jEdit/org/gjt/sp/jedit/JARClassLoader.java
+++ b/jEdit/org/gjt/sp/jedit/JARClassLoader.java
@@ -1,547 +1,548 @@
-/*
- * JARClassLoader.java - Loads classes from JAR files
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- * Portions copyright (C) 1999 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.io.InputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.gjt.sp.util.Log;
-
-import java.util.jar.Manifest;
-import java.util.jar.JarFile;
-import java.net.MalformedURLException;
-import java.util.jar.Attributes;
-import java.util.jar.Attributes.Name;
-//}}}
-
-/**
- * A class loader implementation that loads classes from JAR files. All
- * instances share the same set of classes.
- * @author Slava Pestov
- * @version $Id: JARClassLoader.java 16625 2009-12-10 00:00:39Z ezust $
- */
-public class JARClassLoader extends ClassLoader
-{
- //{{{ JARClassLoader constructor
- /**
- * This constructor creates a class loader for loading classes from all
- * plugins. For example BeanShell uses one of these so that scripts can
- * use plugin classes.
- */
- public JARClassLoader()
- {
- this(true);
- }
-
- /**
- * Creates a class loader that will optionally delegate the
- * finding of classes to the parent class loader by default.
- *
- * @since jEdit 4.3pre6
- */
- public JARClassLoader(boolean delegateFirst)
- {
- this.delegateFirst = delegateFirst;
- // for debugging
- id = INDEX++;
- live++;
- } //}}}
-
- //{{{ loadClass() method
- /**
- * @exception ClassNotFoundException if the class could not be found
- */
- public Class loadClass(String clazz, boolean resolveIt)
- throws ClassNotFoundException
- {
- ClassNotFoundException pending = null;
- if (delegateFirst)
- {
- try
- {
- return loadFromParent(clazz);
- }
- catch (ClassNotFoundException cnf)
- {
- // keep going if class was not found.
- pending = cnf;
- }
- }
-
- Object obj = classHash.get(clazz);
- if(obj == NO_CLASS)
- {
- // we remember which classes we don't exist
- // because BeanShell tries loading all possible
- // <imported prefix>.<class name> combinations
- throw new ClassNotFoundException(clazz);
- }
- else if(obj instanceof JARClassLoader)
- {
- JARClassLoader classLoader = (JARClassLoader)obj;
- try
- {
- return classLoader._loadClass(clazz,resolveIt);
- } catch (ClassNotFoundException cnf2)
- {
- classHash.put(clazz,NO_CLASS);
- throw cnf2;
- }
- }
- else if (delegateFirst)
- {
- // if delegating, reaching this statement means
- // the class was really not found. Otherwise
- // we'll try loading from the parent class loader.
- throw pending;
- }
-
- return loadFromParent(clazz);
- } //}}}
-
- //{{{ getResourceAsStream() method
- public InputStream getResourceAsStream(String name)
- {
- try
- {
- // try in current jar first
- if(jar != null)
- {
- ZipFile zipFile = jar.getZipFile();
- ZipEntry entry = zipFile.getEntry(name);
- if(entry != null)
- {
- return zipFile.getInputStream(entry);
- }
- }
- // then try from another jar
- Object obj = resourcesHash.get(name);
- if(obj instanceof JARClassLoader)
- {
- JARClassLoader classLoader = (JARClassLoader)obj;
- return classLoader.getResourceAsStream(name);
- }
- // finally try from the system class loader
- return getSystemResourceAsStream(name);
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
-
- return null;
- }
- } //}}}
-
- //{{{ getResource() method
- /**
- * overriding getResource() because we want to search FIRST in this
- * ClassLoader, then the parent, the path, etc.
- */
- public URL getResource(String name)
- {
- try
- {
- if(jar != null)
- {
- ZipFile zipFile = jar.getZipFile();
- ZipEntry entry = zipFile.getEntry(name);
- if(entry != null)
- {
- return new URL(getResourceAsPath(name));
- }
- }
-
- Object obj = resourcesHash.get(name);
- if(obj instanceof JARClassLoader)
- {
- JARClassLoader classLoader = (JARClassLoader)obj;
- return classLoader.getResource(name);
- } else
- {
- URL ret = getSystemResource(name);
- if(ret != null)
- {
- Log.log(Log.DEBUG,JARClassLoader.class,"Would have returned null for getResource("+name+")");
- Log.log(Log.DEBUG,JARClassLoader.class,"returning("+ret+")");
- }
- return ret;
- }
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
- return null;
- }
- } //}}}
-
- //{{{ getResourceAsPath() method
- /**
- * construct a jeditresource:/etc path from the name
- * of a resource in the associated jar.
- * The existence of the resource is not actually checked.
- *
- * @param name name of the resource
- * @return jeditresource:/path_to_the_jar!name_of_the_resource
- * @throws UnsupportedOperationException if this is an anonymous
- * JARClassLoader (no associated jar).
- */
- public String getResourceAsPath(String name)
- {
- // this must be fixed during plugin development
- if(jar == null)
- throw new UnsupportedOperationException(
- "don't call getResourceAsPath() on anonymous JARClassLoader");
-
- if(!name.startsWith("/"))
- name = '/' + name;
-
- return "jeditresource:/" + MiscUtilities.getFileName(
- jar.getPath()) + '!' + name;
- } //}}}
-
- //{{{ getZipFile() method
- /**
- * @deprecated Call <code>PluginJAR.getZipFile()</code> instead.
- */
- public ZipFile getZipFile()
- {
- try
- {
- return jar.getZipFile();
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
- return null;
- }
- } //}}}
-
- //{{{ dump() method
- /**
- * For debugging.
- */
- public static void dump()
- {
- Log.log(Log.DEBUG,JARClassLoader.class,
- "Total instances created: " + INDEX);
- Log.log(Log.DEBUG,JARClassLoader.class,
- "Live instances: " + live);
- synchronized(classHash)
- {
- for (Map.Entry<String, Object> entry : classHash.entrySet())
- {
- if (entry.getValue() != NO_CLASS)
- {
- Log.log(Log.DEBUG, JARClassLoader.class,
- entry.getKey() + " ==> "
- + entry.getValue());
- }
- }
- }
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- if(jar == null)
- return "<anonymous>(" + id + ')';
- else
- return jar.getPath() + " (" + id + ')';
- } //}}}
-
- //{{{ findResources() method
- /**
- * @return zero or one resource, as returned by getResource()
- */
- public Enumeration getResources(String name) throws IOException
- {
- class SingleElementEnumeration implements Enumeration
- {
- private Object element;
-
- SingleElementEnumeration(Object element)
- {
- this.element = element;
- }
-
- public boolean hasMoreElements()
- {
- return element != null;
- }
-
- public Object nextElement()
- {
- if(element != null)
- {
- Object retval = element;
- element = null;
- return retval;
- }
- else
- throw new NoSuchElementException();
- }
- }
-
- URL resource = getResource(name);
- return new SingleElementEnumeration(resource);
- } //}}}
-
- //{{{ finalize() method
- protected void finalize()
- {
- live--;
- } //}}}
-
- //{{{ Package-private members
-
- //{{{ JARClassLoader constructor
- /**
- * @since jEdit 4.2pre1
- */
- JARClassLoader(PluginJAR jar)
- {
- this();
- this.jar = jar;
- } //}}}
-
- //{{{ activate() method
- void activate()
- {
- if (jar.getPlugin() != null)
- {
- String _delegate = jEdit.getProperty(
- "plugin." + jar.getPlugin().getClassName() + ".class_loader_delegate");
- delegateFirst = _delegate == null || "true".equals(_delegate);
- }
-
- String[] classes = jar.getClasses();
- if(classes != null)
- {
- for(int i = 0; i < classes.length; i++)
- {
- classHash.put(classes[i],this);
- }
- }
-
- String[] resources = jar.getResources();
- if(resources != null)
- {
- for(int i = 0; i < resources.length; i++)
- {
- resourcesHash.put(resources[i],this);
- }
- }
- } //}}}
-
- //{{{ deactivate() method
- void deactivate()
- {
- String[] classes = jar.getClasses();
- if(classes != null)
- {
- for(int i = 0; i < classes.length; i++)
- {
- Object loader = classHash.get(classes[i]);
- if(loader == this)
- classHash.remove(classes[i]);
- else
- /* two plugins provide same class! */;
- }
- }
-
- String[] resources = jar.getResources();
- if(resources == null)
- return;
-
- for(int i = 0; i < resources.length; i++)
- {
- Object loader = resourcesHash.get(resources[i]);
- if(loader == this)
- resourcesHash.remove(resources[i]);
- else
- /* two plugins provide same resource! */;
- }
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- // used to mark non-existent classes in class hash
- private static final Object NO_CLASS = new Object();
-
- private static int INDEX;
- private static int live;
- private static Map<String, Object> classHash = new Hashtable<String, Object>();
- private static Map<String, Object> resourcesHash = new HashMap<String, Object>();
-
- private int id;
- private boolean delegateFirst;
- private PluginJAR jar;
-
- //{{{ _loadClass() method
- /**
- * Load class from this JAR only.
- */
- private synchronized Class _loadClass(String clazz, boolean resolveIt)
- throws ClassNotFoundException
- {
- jar.activatePlugin();
-
- synchronized(this)
- {
- Class cls = findLoadedClass(clazz);
- if(cls != null)
- {
- if(resolveIt)
- resolveClass(cls);
- return cls;
- }
-
- String name = MiscUtilities.classToFile(clazz);
-
- try
- {
- definePackage(clazz);
- ZipFile zipFile = jar.getZipFile();
- ZipEntry entry = zipFile.getEntry(name);
-
- if(entry == null)
- throw new ClassNotFoundException(clazz);
-
- InputStream in = zipFile.getInputStream(entry);
-
- int len = (int)entry.getSize();
- byte[] data = new byte[len];
- int success = 0;
- int offset = 0;
- while(success < len)
- {
- len -= success;
- offset += success;
- success = in.read(data,offset,len);
- if(success == -1)
- {
- Log.log(Log.ERROR,this,"Failed to load class "
- + clazz + " from " + zipFile.getName());
- throw new ClassNotFoundException(clazz);
- }
- }
-
- cls = defineClass(clazz,data,0,data.length);
-
- if(resolveIt)
- resolveClass(cls);
-
- return cls;
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
-
- throw new ClassNotFoundException(clazz);
- }
- }
- } //}}}
-
- //{{{ definePackage(clazz) method
- private void definePackage(String clazz) throws IOException
- {
- int idx = clazz.lastIndexOf('.');
- if (idx != -1)
- {
- String name = clazz.substring(0, idx);
- if (getPackage(name) == null) definePackage(name, new JarFile(jar.getFile()).getManifest());
- }
- } //}}}
-
- //{{{ getMfValue() method
- private static String getMfValue(Attributes sectionAttrs, Attributes mainAttrs, Attributes.Name name)
- {
- String value=null;
- if (sectionAttrs != null)
- value = sectionAttrs.getValue(name);
- else if (mainAttrs != null)
- {
- value = mainAttrs.getValue(name);
- }
- return value;
- }
- //}}}
-
- //{{{ definePackage(packageName, manifest) method
- private void definePackage(String name, Manifest mf)
- {
- if (mf==null)
- {
- definePackage(name, null, null, null, null, null,
- null, null);
- return;
- }
-
- Attributes sa = mf.getAttributes(name.replace('.', '/') + '/');
- Attributes ma = mf.getMainAttributes();
-
- URL sealBase = null;
- if (Boolean.valueOf(getMfValue(sa, ma, Name.SEALED)).booleanValue())
- {
- try
- {
- sealBase = jar.getFile().toURL();
- }
- catch (MalformedURLException e) {}
- }
-
- Package pkg=definePackage(
- name,
- getMfValue(sa, ma, Name.SPECIFICATION_TITLE),
- getMfValue(sa, ma, Name.SPECIFICATION_VERSION),
- getMfValue(sa, ma, Name.SPECIFICATION_VENDOR),
- getMfValue(sa, ma, Name.IMPLEMENTATION_TITLE),
- getMfValue(sa, ma, Name.IMPLEMENTATION_VERSION),
- getMfValue(sa, ma, Name.IMPLEMENTATION_VENDOR),
- sealBase);
- } //}}}
-
- //{{{ loadFromParent() method
- private Class loadFromParent(String clazz)
- throws ClassNotFoundException
- {
- Class cls;
-
- ClassLoader parentLoader = getClass().getClassLoader();
- if (parentLoader != null)
- cls = parentLoader.loadClass(clazz);
- else
- cls = findSystemClass(clazz);
-
- return cls;
- } //}}}
-
- //}}}
-}
+/*
+ * JARClassLoader.java - Loads classes from JAR files
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ * Portions copyright (C) 1999 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.io.InputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.*;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import org.gjt.sp.util.Log;
+
+import java.util.jar.Manifest;
+import java.util.jar.JarFile;
+import java.net.MalformedURLException;
+import java.util.jar.Attributes;
+import java.util.jar.Attributes.Name;
+//}}}
+
+/**
+ * A class loader implementation that loads classes from JAR files. All
+ * instances share the same set of classes.
+ * @author Slava Pestov
+ * @version $Id: JARClassLoader.java 17144 2010-01-30 00:32:11Z kpouer $
+ */
+public class JARClassLoader extends ClassLoader
+{
+ //{{{ JARClassLoader constructor
+ /**
+ * This constructor creates a class loader for loading classes from all
+ * plugins. For example BeanShell uses one of these so that scripts can
+ * use plugin classes.
+ */
+ public JARClassLoader()
+ {
+ this(true);
+ }
+
+ /**
+ * Creates a class loader that will optionally delegate the
+ * finding of classes to the parent class loader by default.
+ *
+ * @since jEdit 4.3pre6
+ */
+ public JARClassLoader(boolean delegateFirst)
+ {
+ this.delegateFirst = delegateFirst;
+ // for debugging
+ id = INDEX++;
+ live++;
+ } //}}}
+
+ //{{{ loadClass() method
+ /**
+ * @exception ClassNotFoundException if the class could not be found
+ */
+ public Class loadClass(String clazz, boolean resolveIt)
+ throws ClassNotFoundException
+ {
+ ClassNotFoundException pending = null;
+ if (delegateFirst)
+ {
+ try
+ {
+ return loadFromParent(clazz);
+ }
+ catch (ClassNotFoundException cnf)
+ {
+ // keep going if class was not found.
+ pending = cnf;
+ }
+ }
+
+ Object obj = classHash.get(clazz);
+ if(obj == NO_CLASS)
+ {
+ // we remember which classes we don't exist
+ // because BeanShell tries loading all possible
+ // <imported prefix>.<class name> combinations
+ throw new ClassNotFoundException(clazz);
+ }
+ else if(obj instanceof JARClassLoader)
+ {
+ JARClassLoader classLoader = (JARClassLoader)obj;
+ try
+ {
+ return classLoader._loadClass(clazz,resolveIt);
+ } catch (ClassNotFoundException cnf2)
+ {
+ classHash.put(clazz,NO_CLASS);
+ throw cnf2;
+ }
+ }
+ else if (delegateFirst)
+ {
+ // if delegating, reaching this statement means
+ // the class was really not found. Otherwise
+ // we'll try loading from the parent class loader.
+ throw pending;
+ }
+
+ return loadFromParent(clazz);
+ } //}}}
+
+ //{{{ getResourceAsStream() method
+ public InputStream getResourceAsStream(String name)
+ {
+ try
+ {
+ // try in current jar first
+ if(jar != null)
+ {
+ ZipFile zipFile = jar.getZipFile();
+ ZipEntry entry = zipFile.getEntry(name);
+ if(entry != null)
+ {
+ return zipFile.getInputStream(entry);
+ }
+ }
+ // then try from another jar
+ Object obj = resourcesHash.get(name);
+ if(obj instanceof JARClassLoader)
+ {
+ JARClassLoader classLoader = (JARClassLoader)obj;
+ return classLoader.getResourceAsStream(name);
+ }
+ // finally try from the system class loader
+ return getSystemResourceAsStream(name);
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+
+ return null;
+ }
+ } //}}}
+
+ //{{{ getResource() method
+ /**
+ * overriding getResource() because we want to search FIRST in this
+ * ClassLoader, then the parent, the path, etc.
+ */
+ public URL getResource(String name)
+ {
+ try
+ {
+ if(jar != null)
+ {
+ ZipFile zipFile = jar.getZipFile();
+ ZipEntry entry = zipFile.getEntry(name);
+ if(entry != null)
+ {
+ return new URL(getResourceAsPath(name));
+ }
+ }
+
+ Object obj = resourcesHash.get(name);
+ if(obj instanceof JARClassLoader)
+ {
+ JARClassLoader classLoader = (JARClassLoader)obj;
+ return classLoader.getResource(name);
+ } else
+ {
+ URL ret = getSystemResource(name);
+ if(ret != null)
+ {
+ Log.log(Log.DEBUG,JARClassLoader.class,"Would have returned null for getResource("+name+")");
+ Log.log(Log.DEBUG,JARClassLoader.class,"returning("+ret+")");
+ }
+ return ret;
+ }
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+ return null;
+ }
+ } //}}}
+
+ //{{{ getResourceAsPath() method
+ /**
+ * construct a jeditresource:/etc path from the name
+ * of a resource in the associated jar.
+ * The existence of the resource is not actually checked.
+ *
+ * @param name name of the resource
+ * @return jeditresource:/path_to_the_jar!name_of_the_resource
+ * @throws UnsupportedOperationException if this is an anonymous
+ * JARClassLoader (no associated jar).
+ */
+ public String getResourceAsPath(String name)
+ {
+ // this must be fixed during plugin development
+ if(jar == null)
+ throw new UnsupportedOperationException(
+ "don't call getResourceAsPath() on anonymous JARClassLoader");
+
+ if(!name.startsWith("/"))
+ name = '/' + name;
+
+ return "jeditresource:/" + MiscUtilities.getFileName(
+ jar.getPath()) + '!' + name;
+ } //}}}
+
+ //{{{ getZipFile() method
+ /**
+ * @deprecated Call <code>PluginJAR.getZipFile()</code> instead.
+ */
+ @Deprecated
+ public ZipFile getZipFile()
+ {
+ try
+ {
+ return jar.getZipFile();
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+ return null;
+ }
+ } //}}}
+
+ //{{{ dump() method
+ /**
+ * For debugging.
+ */
+ public static void dump()
+ {
+ Log.log(Log.DEBUG,JARClassLoader.class,
+ "Total instances created: " + INDEX);
+ Log.log(Log.DEBUG,JARClassLoader.class,
+ "Live instances: " + live);
+ synchronized(classHash)
+ {
+ for (Map.Entry<String, Object> entry : classHash.entrySet())
+ {
+ if (entry.getValue() != NO_CLASS)
+ {
+ Log.log(Log.DEBUG, JARClassLoader.class,
+ entry.getKey() + " ==> "
+ + entry.getValue());
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ if(jar == null)
+ return "<anonymous>(" + id + ')';
+ else
+ return jar.getPath() + " (" + id + ')';
+ } //}}}
+
+ //{{{ findResources() method
+ /**
+ * @return zero or one resource, as returned by getResource()
+ */
+ public Enumeration getResources(String name) throws IOException
+ {
+ class SingleElementEnumeration implements Enumeration
+ {
+ private Object element;
+
+ SingleElementEnumeration(Object element)
+ {
+ this.element = element;
+ }
+
+ public boolean hasMoreElements()
+ {
+ return element != null;
+ }
+
+ public Object nextElement()
+ {
+ if(element != null)
+ {
+ Object retval = element;
+ element = null;
+ return retval;
+ }
+ else
+ throw new NoSuchElementException();
+ }
+ }
+
+ URL resource = getResource(name);
+ return new SingleElementEnumeration(resource);
+ } //}}}
+
+ //{{{ finalize() method
+ protected void finalize()
+ {
+ live--;
+ } //}}}
+
+ //{{{ Package-private members
+
+ //{{{ JARClassLoader constructor
+ /**
+ * @since jEdit 4.2pre1
+ */
+ JARClassLoader(PluginJAR jar)
+ {
+ this();
+ this.jar = jar;
+ } //}}}
+
+ //{{{ activate() method
+ void activate()
+ {
+ if (jar.getPlugin() != null)
+ {
+ String _delegate = jEdit.getProperty(
+ "plugin." + jar.getPlugin().getClassName() + ".class_loader_delegate");
+ delegateFirst = _delegate == null || "true".equals(_delegate);
+ }
+
+ String[] classes = jar.getClasses();
+ if(classes != null)
+ {
+ for(int i = 0; i < classes.length; i++)
+ {
+ classHash.put(classes[i],this);
+ }
+ }
+
+ String[] resources = jar.getResources();
+ if(resources != null)
+ {
+ for(int i = 0; i < resources.length; i++)
+ {
+ resourcesHash.put(resources[i],this);
+ }
+ }
+ } //}}}
+
+ //{{{ deactivate() method
+ void deactivate()
+ {
+ String[] classes = jar.getClasses();
+ if(classes != null)
+ {
+ for(int i = 0; i < classes.length; i++)
+ {
+ Object loader = classHash.get(classes[i]);
+ if(loader == this)
+ classHash.remove(classes[i]);
+ else
+ /* two plugins provide same class! */;
+ }
+ }
+
+ String[] resources = jar.getResources();
+ if(resources == null)
+ return;
+
+ for(int i = 0; i < resources.length; i++)
+ {
+ Object loader = resourcesHash.get(resources[i]);
+ if(loader == this)
+ resourcesHash.remove(resources[i]);
+ else
+ /* two plugins provide same resource! */;
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ // used to mark non-existent classes in class hash
+ private static final Object NO_CLASS = new Object();
+
+ private static int INDEX;
+ private static int live;
+ private static Map<String, Object> classHash = new Hashtable<String, Object>();
+ private static Map<String, Object> resourcesHash = new HashMap<String, Object>();
+
+ private int id;
+ private boolean delegateFirst;
+ private PluginJAR jar;
+
+ //{{{ _loadClass() method
+ /**
+ * Load class from this JAR only.
+ */
+ private synchronized Class _loadClass(String clazz, boolean resolveIt)
+ throws ClassNotFoundException
+ {
+ jar.activatePlugin();
+
+ synchronized(this)
+ {
+ Class cls = findLoadedClass(clazz);
+ if(cls != null)
+ {
+ if(resolveIt)
+ resolveClass(cls);
+ return cls;
+ }
+
+ String name = MiscUtilities.classToFile(clazz);
+
+ try
+ {
+ definePackage(clazz);
+ ZipFile zipFile = jar.getZipFile();
+ ZipEntry entry = zipFile.getEntry(name);
+
+ if(entry == null)
+ throw new ClassNotFoundException(clazz);
+
+ InputStream in = zipFile.getInputStream(entry);
+
+ int len = (int)entry.getSize();
+ byte[] data = new byte[len];
+ int success = 0;
+ int offset = 0;
+ while(success < len)
+ {
+ len -= success;
+ offset += success;
+ success = in.read(data,offset,len);
+ if(success == -1)
+ {
+ Log.log(Log.ERROR,this,"Failed to load class "
+ + clazz + " from " + zipFile.getName());
+ throw new ClassNotFoundException(clazz);
+ }
+ }
+
+ cls = defineClass(clazz,data,0,data.length);
+
+ if(resolveIt)
+ resolveClass(cls);
+
+ return cls;
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+
+ throw new ClassNotFoundException(clazz);
+ }
+ }
+ } //}}}
+
+ //{{{ definePackage(clazz) method
+ private void definePackage(String clazz) throws IOException
+ {
+ int idx = clazz.lastIndexOf('.');
+ if (idx != -1)
+ {
+ String name = clazz.substring(0, idx);
+ if (getPackage(name) == null) definePackage(name, new JarFile(jar.getFile()).getManifest());
+ }
+ } //}}}
+
+ //{{{ getMfValue() method
+ private static String getMfValue(Attributes sectionAttrs, Attributes mainAttrs, Attributes.Name name)
+ {
+ String value=null;
+ if (sectionAttrs != null)
+ value = sectionAttrs.getValue(name);
+ else if (mainAttrs != null)
+ {
+ value = mainAttrs.getValue(name);
+ }
+ return value;
+ }
+ //}}}
+
+ //{{{ definePackage(packageName, manifest) method
+ private void definePackage(String name, Manifest mf)
+ {
+ if (mf==null)
+ {
+ definePackage(name, null, null, null, null, null,
+ null, null);
+ return;
+ }
+
+ Attributes sa = mf.getAttributes(name.replace('.', '/') + '/');
+ Attributes ma = mf.getMainAttributes();
+
+ URL sealBase = null;
+ if (Boolean.valueOf(getMfValue(sa, ma, Name.SEALED)).booleanValue())
+ {
+ try
+ {
+ sealBase = jar.getFile().toURL();
+ }
+ catch (MalformedURLException e) {}
+ }
+
+ definePackage(
+ name,
+ getMfValue(sa, ma, Name.SPECIFICATION_TITLE),
+ getMfValue(sa, ma, Name.SPECIFICATION_VERSION),
+ getMfValue(sa, ma, Name.SPECIFICATION_VENDOR),
+ getMfValue(sa, ma, Name.IMPLEMENTATION_TITLE),
+ getMfValue(sa, ma, Name.IMPLEMENTATION_VERSION),
+ getMfValue(sa, ma, Name.IMPLEMENTATION_VENDOR),
+ sealBase);
+ } //}}}
+
+ //{{{ loadFromParent() method
+ private Class loadFromParent(String clazz)
+ throws ClassNotFoundException
+ {
+ Class cls;
+
+ ClassLoader parentLoader = getClass().getClassLoader();
+ if (parentLoader != null)
+ cls = parentLoader.loadClass(clazz);
+ else
+ cls = findSystemClass(clazz);
+
+ return cls;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/JEditAbstractEditAction.java b/jEdit/org/gjt/sp/jedit/JEditAbstractEditAction.java
index b993034..d62185d 100644
--- a/jEdit/org/gjt/sp/jedit/JEditAbstractEditAction.java
+++ b/jEdit/org/gjt/sp/jedit/JEditAbstractEditAction.java
@@ -1,105 +1,105 @@
-/*
- * AbstractEditAction.java - Base class for EditAction
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-/**
- * An action that can be bound to a menu item, tool bar button or keystroke.
- *
- * @see jEdit#getAction(String)
- * @see jEdit#getActionNames()
- * @see ActionSet
- *
- * @author S. Pestov, M. Casanova, K. Satoda
- * @version $Id: EditAction.java 11177 2007-12-01 09:50:50Z k_satoda $
- * @since 4.3pre13
- */
-public abstract class JEditAbstractEditAction<E>
-{
- //{{{ Private members
- protected String name;
-
- protected Object[] args;
-
- //}}}
-
- //{{{ EditAction constructors
- /**
- * Creates a new edit action with the specified name.
- * @param name The action name
- */
- protected JEditAbstractEditAction(String name)
- {
- this.name = name;
- }
-
- protected JEditAbstractEditAction(String name, Object[] newArgs)
- {
- this.name = name;
- this.args = newArgs;
- } //}}}
-
- //{{{ getName() method
- /**
- * Returns the internal name of this action.
- * @return the action name
- */
- public String getName()
- {
- return name;
- } //}}}
-
- // {{{ setName() method
- /**
- * Changes the name of an action
- * @param newName the new name of the action
- * @since jEdit 4.3pre4
- */
- public void setName(String newName)
- {
- name = newName;
- }// }}}
-
- //{{{ invoke() method
- /**
- * Invokes the action. This is an implementation of the Command pattern,
- * and concrete actions should override this.
- *
- * @param arg the argument
- */
- public abstract void invoke(E arg);
-
- /**
- * @param arg the arguments of the action
- * @param newArgs new argument list
- */
- public final void invoke(E arg, Object[] newArgs)
- {
- args = newArgs;
- invoke(arg);
- } //}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- return name;
- } //}}}
-}
+/*
+ * AbstractEditAction.java - Base class for EditAction
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+/**
+ * An action that can be bound to a menu item, tool bar button or keystroke.
+ *
+ * @see jEdit#getAction(String)
+ * @see jEdit#getActionNames()
+ * @see ActionSet
+ *
+ * @author S. Pestov, M. Casanova, K. Satoda
+ * @version $Id: EditAction.java 11177 2007-12-01 09:50:50Z k_satoda $
+ * @since 4.3pre13
+ */
+public abstract class JEditAbstractEditAction<E>
+{
+ //{{{ Private members
+ protected String name;
+
+ protected Object[] args;
+
+ //}}}
+
+ //{{{ EditAction constructors
+ /**
+ * Creates a new edit action with the specified name.
+ * @param name The action name
+ */
+ protected JEditAbstractEditAction(String name)
+ {
+ this.name = name;
+ }
+
+ protected JEditAbstractEditAction(String name, Object[] newArgs)
+ {
+ this.name = name;
+ this.args = newArgs;
+ } //}}}
+
+ //{{{ getName() method
+ /**
+ * Returns the internal name of this action.
+ * @return the action name
+ */
+ public String getName()
+ {
+ return name;
+ } //}}}
+
+ // {{{ setName() method
+ /**
+ * Changes the name of an action
+ * @param newName the new name of the action
+ * @since jEdit 4.3pre4
+ */
+ public void setName(String newName)
+ {
+ name = newName;
+ }// }}}
+
+ //{{{ invoke() method
+ /**
+ * Invokes the action. This is an implementation of the Command pattern,
+ * and concrete actions should override this.
+ *
+ * @param arg the argument
+ */
+ public abstract void invoke(E arg);
+
+ /**
+ * @param arg the arguments of the action
+ * @param newArgs new argument list
+ */
+ public final void invoke(E arg, Object[] newArgs)
+ {
+ args = newArgs;
+ invoke(arg);
+ } //}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ return name;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/JEditActionContext.java b/jEdit/org/gjt/sp/jedit/JEditActionContext.java
index 25b47b1..d870643 100644
--- a/jEdit/org/gjt/sp/jedit/JEditActionContext.java
+++ b/jEdit/org/gjt/sp/jedit/JEditActionContext.java
@@ -1,181 +1,181 @@
-/*
- * JEditActionContext.java - For code sharing between jEdit and VFSBrowser
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2003 Slava Pestov
- * Portions copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import org.gjt.sp.util.StandardUtilities;
-
-import java.lang.reflect.Array;
-import java.util.*;
-
-/**
- * Manages a collection of action sets. There are two instances of this class
- * in jEdit:
- * <ul>
- * <li>{@link org.gjt.sp.jedit.jEdit#getActionContext()} - editor actions
- * <li>{@link org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()} - browser
- * actions
- * </ul>
- *
- * @since jEdit 4.3pre13
- * @author Slava Pestov
- * @version $Id: ActionContext.java 6884 2006-09-06 02:38:55Z ezust $
- */
-public abstract class JEditActionContext<F extends JEditAbstractEditAction, E extends JEditActionSet<F>>
-{
- //{{{ invokeAction() method
- /**
- * Invokes the given action in response to a user-generated event.
- * @param evt The event
- * @param action The action
- * @since jEdit 4.3pre13
- */
- public abstract void invokeAction(EventObject evt, F action);
- //}}}
-
- //{{{ addActionSet() method
- /**
- * Adds a new action set to the context.
- * @since jEdit 4.3pre13
- */
- public void addActionSet(E actionSet)
- {
- actionNames = null;
- actionSets.addElement(actionSet);
- actionSet.context = this;
- String[] actions = actionSet.getActionNames();
- for(int i = 0; i < actions.length; i++)
- {
- /* Is it already there? */
- if (actionHash.containsKey(actions[i]))
- {
- /* Save it for plugin unloading time */
- E oldAction = actionHash.get(actions[i]);
- overriddenActions.put(actions[i], oldAction);
- }
- actionHash.put(actions[i],actionSet);
- }
- } //}}}
-
- //{{{ removeActionSet() method
- /**
- * Removes an action set from the context.
- * @since jEdit 4.23pre13
- */
- public void removeActionSet(E actionSet)
- {
- actionNames = null;
- actionSets.removeElement(actionSet);
- actionSet.context = null;
- String[] actions = actionSet.getActionNames();
- for(int i = 0; i < actions.length; i++)
- {
- actionHash.remove(actions[i]);
- if (overriddenActions.containsKey(actions[i]))
- {
- E oldAction = overriddenActions.remove(actions[i]);
- actionHash.put(actions[i], oldAction);
- }
- }
- } //}}}
-
- //{{{ getActionSets() method
- /**
- * Returns all registered action sets.
- * @since jEdit 4.3pre13
- */
- public E[] getActionSets()
- {
- if (actionSets.isEmpty())
- return null;
- Class clazz = actionSets.get(0).getClass();
- E[] retVal =(E[]) Array.newInstance(clazz, actionSets.size());
- actionSets.copyInto(retVal);
- return retVal;
- } //}}}
-
- //{{{ getAction() method
- /**
- * Returns the specified action.
- * @param name The action name
- * @return a JEditAbstractEditAction or null if it doesn't exist
- * @since jEdit 4.3pre13
- */
- public F getAction(String name)
- {
- E set = actionHash.get(name);
- if(set == null)
- return null;
- else
- return set.getAction(name);
- } //}}}
-
- //{{{ getActionSetForAction() method
- /**
- * Returns the action set that contains the specified action.
- *
- * @param action The action
- * @return the actionSet that contains the given action
- * @since jEdit 4.3pre13
- */
- public E getActionSetForAction(String action)
- {
- return actionHash.get(action);
- } //}}}
-
- //{{{ getActionNames() method
- /**
- * Returns all registered action names.
- */
- public String[] getActionNames()
- {
- if(actionNames == null)
- {
- List<String> vec = new LinkedList<String>();
- for(int i = 0; i < actionSets.size(); i++)
- (actionSets.elementAt(i)).getActionNames(vec);
-
- actionNames = vec.toArray(new String[vec.size()]);
- Arrays.sort(actionNames,
- new StandardUtilities.StringCompare<String>(true));
- }
-
- return actionNames;
- } //}}}
-
- //{{{ Package-private members
- String[] actionNames;
- /**
- * This map contains as key an action name,
- * and as value the JEditActionSet that contains this action
- */
- Hashtable<String, E> actionHash = new Hashtable<String, E>();
-
- /** A map of built-in actions that were overridden by plugins. */
- Hashtable<String, E> overriddenActions = new Hashtable<String, E>();
- //}}}
-
- //{{{ Private members
- private final Vector<E> actionSets = new Vector<E>();
- //}}}
-}
+/*
+ * JEditActionContext.java - For code sharing between jEdit and VFSBrowser
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2003 Slava Pestov
+ * Portions copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import org.gjt.sp.util.StandardUtilities;
+
+import java.lang.reflect.Array;
+import java.util.*;
+
+/**
+ * Manages a collection of action sets. There are two instances of this class
+ * in jEdit:
+ * <ul>
+ * <li>{@link org.gjt.sp.jedit.jEdit#getActionContext()} - editor actions
+ * <li>{@link org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()} - browser
+ * actions
+ * </ul>
+ *
+ * @since jEdit 4.3pre13
+ * @author Slava Pestov
+ * @version $Id: ActionContext.java 6884 2006-09-06 02:38:55Z ezust $
+ */
+public abstract class JEditActionContext<F extends JEditAbstractEditAction, E extends JEditActionSet<F>>
+{
+ //{{{ invokeAction() method
+ /**
+ * Invokes the given action in response to a user-generated event.
+ * @param evt The event
+ * @param action The action
+ * @since jEdit 4.3pre13
+ */
+ public abstract void invokeAction(EventObject evt, F action);
+ //}}}
+
+ //{{{ addActionSet() method
+ /**
+ * Adds a new action set to the context.
+ * @since jEdit 4.3pre13
+ */
+ public void addActionSet(E actionSet)
+ {
+ actionNames = null;
+ actionSets.addElement(actionSet);
+ actionSet.context = this;
+ String[] actions = actionSet.getActionNames();
+ for(int i = 0; i < actions.length; i++)
+ {
+ /* Is it already there? */
+ if (actionHash.containsKey(actions[i]))
+ {
+ /* Save it for plugin unloading time */
+ E oldAction = actionHash.get(actions[i]);
+ overriddenActions.put(actions[i], oldAction);
+ }
+ actionHash.put(actions[i],actionSet);
+ }
+ } //}}}
+
+ //{{{ removeActionSet() method
+ /**
+ * Removes an action set from the context.
+ * @since jEdit 4.23pre13
+ */
+ public void removeActionSet(E actionSet)
+ {
+ actionNames = null;
+ actionSets.removeElement(actionSet);
+ actionSet.context = null;
+ String[] actions = actionSet.getActionNames();
+ for(int i = 0; i < actions.length; i++)
+ {
+ actionHash.remove(actions[i]);
+ if (overriddenActions.containsKey(actions[i]))
+ {
+ E oldAction = overriddenActions.remove(actions[i]);
+ actionHash.put(actions[i], oldAction);
+ }
+ }
+ } //}}}
+
+ //{{{ getActionSets() method
+ /**
+ * Returns all registered action sets.
+ * @since jEdit 4.3pre13
+ */
+ public E[] getActionSets()
+ {
+ if (actionSets.isEmpty())
+ return null;
+ Class clazz = actionSets.get(0).getClass();
+ E[] retVal =(E[]) Array.newInstance(clazz, actionSets.size());
+ actionSets.copyInto(retVal);
+ return retVal;
+ } //}}}
+
+ //{{{ getAction() method
+ /**
+ * Returns the specified action.
+ * @param name The action name
+ * @return a JEditAbstractEditAction or null if it doesn't exist
+ * @since jEdit 4.3pre13
+ */
+ public F getAction(String name)
+ {
+ E set = actionHash.get(name);
+ if(set == null)
+ return null;
+ else
+ return set.getAction(name);
+ } //}}}
+
+ //{{{ getActionSetForAction() method
+ /**
+ * Returns the action set that contains the specified action.
+ *
+ * @param action The action
+ * @return the actionSet that contains the given action
+ * @since jEdit 4.3pre13
+ */
+ public E getActionSetForAction(String action)
+ {
+ return actionHash.get(action);
+ } //}}}
+
+ //{{{ getActionNames() method
+ /**
+ * Returns all registered action names.
+ */
+ public String[] getActionNames()
+ {
+ if(actionNames == null)
+ {
+ List<String> vec = new LinkedList<String>();
+ for(int i = 0; i < actionSets.size(); i++)
+ (actionSets.elementAt(i)).getActionNames(vec);
+
+ actionNames = vec.toArray(new String[vec.size()]);
+ Arrays.sort(actionNames,
+ new StandardUtilities.StringCompare<String>(true));
+ }
+
+ return actionNames;
+ } //}}}
+
+ //{{{ Package-private members
+ String[] actionNames;
+ /**
+ * This map contains as key an action name,
+ * and as value the JEditActionSet that contains this action
+ */
+ Hashtable<String, E> actionHash = new Hashtable<String, E>();
+
+ /** A map of built-in actions that were overridden by plugins. */
+ Hashtable<String, E> overriddenActions = new Hashtable<String, E>();
+ //}}}
+
+ //{{{ Private members
+ private final Vector<E> actionSets = new Vector<E>();
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/JEditActionSet.java b/jEdit/org/gjt/sp/jedit/JEditActionSet.java
index fb29069..d74cd43 100644
--- a/jEdit/org/gjt/sp/jedit/JEditActionSet.java
+++ b/jEdit/org/gjt/sp/jedit/JEditActionSet.java
@@ -1,474 +1,469 @@
-/*
- * JEditActionSet.java - A set of actions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- * Portions copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-
-import org.gjt.sp.jedit.input.AbstractInputHandler;
-import org.gjt.sp.jedit.input.InputHandlerProvider;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-
-/**
- * A set of actions, either loaded from an XML file, or constructed at runtime
- * by a plugin. <p>
- *
- * <h3>Action sets loaded from XML files</h3>
- *
- * Action sets are read from these files inside the plugin JAR:
- * <ul>
- * <li><code>actions.xml</code> - actions made available for use in jEdit views,
- * including the view's <b>Plugins</b> menu, the tool bar, etc.</li>
- * <li><code>browser.actions.xml</code> - actions for the file system browser's
- * <b>Plugins</b> menu.</li>
- * </ul>
- *
- * An action definition file has the following form:
- *
- * <pre><?xml version="1.0"?>
- *<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
- *<ACTIONS>
- * <ACTION NAME="some-action">
- * <CODE>
- * // BeanShell code evaluated when the action is invoked
- * </CODE>
- * </ACTION>
- * <ACTION NAME="some-toggle-action">
- * <CODE>
- * // BeanShell code evaluated when the action is invoked
- * </CODE>
- * <IS_SELECTED>
- * // BeanShell code that should evaluate to true or false
- * </IS_SELECTED>
- * </ACTION>
- *</ACTIONS></pre>
- *
- * The following elements are valid:
- *
- * <ul>
- * <li>
- * <code>ACTIONS</code> is the top-level element and refers
- * to the set of actions used by the plugin.
- * </li>
- * <li>
- * An <code>ACTION</code> contains the data for a particular action.
- * It has three attributes: a required <code>NAME</code>;
- * an optional <code>NO_REPEAT</code>, which is a flag
- * indicating whether the action should not be repeated with the
- * <b>C+ENTER</b> command; and an optional
- * <code>NO_RECORD</code> which is a a flag indicating whether the
- * action should be recorded if it is invoked while the user is recording a
- * macro. The two flag attributes
- * can have two possible values, "TRUE" or
- * "FALSE". In both cases, "FALSE" is the
- * default if the attribute is not specified.
- * </li>
- * <li>
- * An <code>ACTION</code> can have two child elements
- * within it: a required <code>CODE</code> element which
- * specifies the
- * BeanShell code that will be executed when the action is invoked,
- * and an optional <code>IS_SELECTED</code> element, used for
- * checkbox
- * menu items. The <code>IS_SELECTED</code> element contains
- * BeanShell code that returns a boolean flag that will
- * determine the state of the checkbox.
- * </li>
- * </ul>
- *
- * Each action must have a property <code><i>name</i>.label</code> containing
- * the action's menu item label.
- *
- * <h3>View actions</h3>
- *
- * Actions defined in <code>actions.xml</code> can be added to the view's
- * <b>Plugins</b> menu; see {@link EditPlugin}.
- * The action code may use any standard predefined
- * BeanShell variable; see {@link BeanShell}.
- *
- * <h3>File system browser actions</h3>
- *
- * Actions defined in <code>actions.xml</code> can be added to the file
- * system browser's <b>Plugins</b> menu; see {@link EditPlugin}.
- * The action code may use any standard predefined
- * BeanShell variable, in addition to a variable <code>browser</code> which
- * contains a reference to the current
- * {@link org.gjt.sp.jedit.browser.VFSBrowser} instance.<p>
- *
- * File system browser actions should not define
- * <code><IS_SELECTED></code> blocks.
- *
- * <h3>Custom action sets</h3>
- *
- * Call {@link jEdit#addActionSet(ActionSet)} to add a custom action set to
- * jEdit's action context. You must also call {@link #initKeyBindings()} for new
- * action sets. Don't forget to call {@link jEdit#removeActionSet(ActionSet)}
- * before your plugin is unloaded, too.
- *
- * @see jEdit#getActionContext()
- * @see org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()
- * @see ActionContext#getActionNames()
- * @see ActionContext#getAction(String)
- * @see jEdit#addActionSet(ActionSet)
- * @see jEdit#removeActionSet(ActionSet)
- * @see PluginJAR#getActionSet()
- * @see BeanShell
- * @see View
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: ActionSet.java 9529 2007-05-12 15:06:52Z ezust $
- * @since jEdit 4.3pre13
- */
-public abstract class JEditActionSet<E extends JEditAbstractEditAction> implements InputHandlerProvider
-{
- //{{{ JEditActionSet constructor
- /**
- * Creates a new action set.
- * @since jEdit 4.3pre13
- */
- public JEditActionSet()
- {
- actions = new Hashtable<String, Object>();
- loaded = true;
- } //}}}
-
- //{{{ JEditActionSet constructor
- /**
- * Creates a new action set.
- * @param cachedActionNames The list of cached action names
- * @param uri The actions.xml URI
- * @since jEdit 4.3pre13
- */
- public JEditActionSet(String[] cachedActionNames, URL uri)
- {
- this();
- this.uri = uri;
- if(cachedActionNames != null)
- {
- for(int i = 0; i < cachedActionNames.length; i++)
- {
- actions.put(cachedActionNames[i],placeholder);
- }
- }
- loaded = false;
- } //}}}
-
- //{{{ addAction() method
- /**
- * Adds an action to the action set.
- * @param action The action
- * @since jEdit 4.0pre1
- */
- public void addAction(E action)
- {
- actions.put(action.getName(),action);
- if(context != null)
- {
- context.actionNames = null;
- context.actionHash.put(action.getName(),this);
- }
- } //}}}
-
- //{{{ removeAction() method
- /**
- * Removes an action from the action set.
- * @param name The action name
- * @since jEdit 4.0pre1
- */
- public void removeAction(String name)
- {
- actions.remove(name);
- if(context != null)
- {
- context.actionNames = null;
- context.actionHash.remove(name);
- }
- } //}}}
-
- //{{{ removeAllActions() method
- /**
- * Removes all actions from the action set.
- * @since jEdit 4.0pre1
- */
- public void removeAllActions()
- {
- if(context != null)
- {
- context.actionNames = null;
- String[] actions = getActionNames();
- for(int i = 0; i < actions.length; i++)
- {
- context.actionHash.remove(actions[i]);
- }
- }
- this.actions.clear();
- } //}}}
-
- //{{{ getAction() method
- /**
- * Returns an action with the specified name.<p>
- *
- * <b>Deferred loading:</b> this will load the action set if necessary.
- *
- * @param name The action name
- * @since jEdit 4.0pre1
- */
- public E getAction(String name)
- {
- Object obj = actions.get(name);
- if(obj == placeholder)
- {
- load();
- obj = actions.get(name);
- if(obj == placeholder)
- {
- Log.log(Log.WARNING,this,"Outdated cache");
- obj = null;
- }
- }
-
- return (E) obj;
- } //}}}
-
- //{{{ getActionCount() method
- /**
- * Returns the number of actions in the set.
- * @since jEdit 4.0pre1
- */
- public int getActionCount()
- {
- return actions.size();
- } //}}}
-
- //{{{ getActionNames() method
- /**
- * Returns an array of all action names in this action set.
- * @since jEdit 4.2pre1
- */
- public String[] getActionNames()
- {
- String[] retVal = new String[actions.size()];
- Enumeration e = actions.keys();
- int i = 0;
- while(e.hasMoreElements())
- {
- retVal[i++] = (String)e.nextElement();
- }
- return retVal;
- } //}}}
-
- //{{{ getCacheableActionNames() method
- /**
- * Returns an array of all action names in this action set that should
- * be cached; namely, <code>BeanShellAction</code>s.
- * @since jEdit 4.2pre1
- */
- public String[] getCacheableActionNames()
- {
- LinkedList<String> retVal = new LinkedList<String>();
- Enumeration e = actions.elements();
- while(e.hasMoreElements())
- {
- Object obj = e.nextElement();
- if(obj == placeholder)
- {
- // ??? this should only be called with
- // fully loaded action set
- Log.log(Log.WARNING,this,"Action set not up "
- + "to date");
- }
- else if(obj instanceof JEditBeanShellAction)
- retVal.add(((JEditBeanShellAction)obj).getName());
- }
- return retVal.toArray(new String[retVal.size()]);
- } //}}}
-
- //{{{ getArray() method
- /**
- * Returns an empty array E[].
- * I know it is bad, if you find a method to instantiate a generic Array,
- * tell me
- * @param size the size of the array
- * @return the empty array
- */
- protected abstract E[] getArray(int size);
- //}}}
-
- //{{{ getActions() method
- /**
- * Returns an array of all actions in this action set.<p>
- *
- * <b>Deferred loading:</b> this will load the action set if necessary.
- *
- * @since jEdit 4.0pre1
- */
- public E[] getActions()
- {
- load();
- E[] retVal = getArray(actions.size());
- Enumeration e = actions.elements();
- int i = 0;
- while(e.hasMoreElements())
- {
- retVal[i++] = (E) e.nextElement();
- }
- return retVal;
- } //}}}
-
- //{{{ contains() method
- /**
- * Returns if this action set contains the specified action.
- * @param action The action
- * @since jEdit 4.2pre1
- */
- public boolean contains(String action)
- {
- boolean retval = actions.containsKey(action);
- return retval;
-// return actions.containsKey(action);
- } //}}}
-
- //{{{ size() method
- /**
- * Returns the number of actions in this action set.
- * @since jEdit 4.2pre2
- */
- public int size()
- {
- return actions.size();
- } //}}}
-
- //{{{ load() method
- /**
- * Forces the action set to be loaded. Plugins and macros should not
- * call this method.
- * @since jEdit 4.2pre1
- */
- public void load()
- {
- if(loaded)
- return;
-
- loaded = true;
- //actions.clear();
-
- if (uri == null)
- return;
- try
- {
- Log.log(Log.DEBUG,this,"Loading actions from " + uri);
- ActionListHandler ah = new ActionListHandler(uri.toString(),this);
- if ( XMLUtilities.parseXML(uri.openStream(), ah))
- {
- Log.log(Log.ERROR, this, "Unable to parse: " + uri);
- }
- }
- catch(IOException e)
- {
- Log.log(Log.ERROR,this,uri,e);
- }
- } //}}}
-
- //{{{ createBeanShellAction() method
- /**
- * This method should be implemented to return an action that will execute
- * the given code
- * @since 4.3pre13
- */
- protected abstract JEditAbstractEditAction createBeanShellAction(String actionName,
- String code,
- String selected,
- boolean noRepeat,
- boolean noRecord,
- boolean noRememberLast);
- //}}}
-
- //{{{ initKeyBindings() method
- /**
- * Initializes the action set's key bindings.
- * jEdit calls this method for all registered action sets when the
- * user changes key bindings in the <b>Global Options</b> dialog box.<p>
- *
- * Note if your plugin adds a custom action set to jEdit's collection,
- * it must also call this method on the action set after adding it.
- *
- * @since jEdit 4.2pre1
- */
- public void initKeyBindings()
- {
- AbstractInputHandler inputHandler = getInputHandler();
-
- Iterator<Map.Entry<String,Object>> iter = actions.entrySet().iterator();
- while(iter.hasNext())
- {
- Map.Entry<String,Object> entry = iter.next();
- String name = entry.getKey();
-
- String shortcut1 = getProperty(name + ".shortcut");
- if(shortcut1 != null)
- inputHandler.addKeyBinding(shortcut1,name);
-
- String shortcut2 = getProperty(name + ".shortcut2");
- if(shortcut2 != null)
- inputHandler.addKeyBinding(shortcut2,name);
- }
- } //}}}
-
- //{{{ getProperty() method
- /**
- * Returns a property for the given name.
- * In jEdit it will returns a jEdit.getProperty(name), but it can
- * return something else for a standalone textarea.
- * @param name the property name
- * @return the property value
- * @since 4.3pre13
- */
- protected abstract String getProperty(String name);
- //}}}
-
- //{{{ Package-private members
- JEditActionContext context;
-
- //{{{ getActionNames() method
- void getActionNames(List<String> vec)
- {
- Enumeration<String> e = actions.keys();
- while(e.hasMoreElements())
- vec.add(e.nextElement());
- } //}}}
-
- //}}}
-
- //{{{ Private members
- protected Hashtable<String,Object> actions;
- protected URL uri;
- protected boolean loaded;
-
- protected static final Object placeholder = new Object();
-
- //}}}
-}
+/*
+ * JEditActionSet.java - A set of actions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ * Portions copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import java.io.*;
+import java.net.URL;
+import java.util.*;
+
+import org.gjt.sp.jedit.input.AbstractInputHandler;
+import org.gjt.sp.jedit.input.InputHandlerProvider;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+
+/**
+ * A set of actions, either loaded from an XML file, or constructed at runtime
+ * by a plugin. <p>
+ *
+ * <h3>Action sets loaded from XML files</h3>
+ *
+ * Action sets are read from these files inside the plugin JAR:
+ * <ul>
+ * <li><code>actions.xml</code> - actions made available for use in jEdit views,
+ * including the view's <b>Plugins</b> menu, the tool bar, etc.</li>
+ * <li><code>browser.actions.xml</code> - actions for the file system browser's
+ * <b>Plugins</b> menu.</li>
+ * </ul>
+ *
+ * An action definition file has the following form:
+ *
+ * <pre><?xml version="1.0"?>
+ *<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
+ *<ACTIONS>
+ * <ACTION NAME="some-action">
+ * <CODE>
+ * // BeanShell code evaluated when the action is invoked
+ * </CODE>
+ * </ACTION>
+ * <ACTION NAME="some-toggle-action">
+ * <CODE>
+ * // BeanShell code evaluated when the action is invoked
+ * </CODE>
+ * <IS_SELECTED>
+ * // BeanShell code that should evaluate to true or false
+ * </IS_SELECTED>
+ * </ACTION>
+ *</ACTIONS></pre>
+ *
+ * The following elements are valid:
+ *
+ * <ul>
+ * <li>
+ * <code>ACTIONS</code> is the top-level element and refers
+ * to the set of actions used by the plugin.
+ * </li>
+ * <li>
+ * An <code>ACTION</code> contains the data for a particular action.
+ * It has three attributes: a required <code>NAME</code>;
+ * an optional <code>NO_REPEAT</code>, which is a flag
+ * indicating whether the action should not be repeated with the
+ * <b>C+ENTER</b> command; and an optional
+ * <code>NO_RECORD</code> which is a a flag indicating whether the
+ * action should be recorded if it is invoked while the user is recording a
+ * macro. The two flag attributes
+ * can have two possible values, "TRUE" or
+ * "FALSE". In both cases, "FALSE" is the
+ * default if the attribute is not specified.
+ * </li>
+ * <li>
+ * An <code>ACTION</code> can have two child elements
+ * within it: a required <code>CODE</code> element which
+ * specifies the
+ * BeanShell code that will be executed when the action is invoked,
+ * and an optional <code>IS_SELECTED</code> element, used for
+ * checkbox
+ * menu items. The <code>IS_SELECTED</code> element contains
+ * BeanShell code that returns a boolean flag that will
+ * determine the state of the checkbox.
+ * </li>
+ * </ul>
+ *
+ * Each action must have a property <code><i>name</i>.label</code> containing
+ * the action's menu item label.
+ *
+ * <h3>View actions</h3>
+ *
+ * Actions defined in <code>actions.xml</code> can be added to the view's
+ * <b>Plugins</b> menu; see {@link EditPlugin}.
+ * The action code may use any standard predefined
+ * BeanShell variable; see {@link BeanShell}.
+ *
+ * <h3>File system browser actions</h3>
+ *
+ * Actions defined in <code>actions.xml</code> can be added to the file
+ * system browser's <b>Plugins</b> menu; see {@link EditPlugin}.
+ * The action code may use any standard predefined
+ * BeanShell variable, in addition to a variable <code>browser</code> which
+ * contains a reference to the current
+ * {@link org.gjt.sp.jedit.browser.VFSBrowser} instance.<p>
+ *
+ * File system browser actions should not define
+ * <code><IS_SELECTED></code> blocks.
+ *
+ * <h3>Custom action sets</h3>
+ *
+ * Call {@link jEdit#addActionSet(ActionSet)} to add a custom action set to
+ * jEdit's action context. You must also call {@link #initKeyBindings()} for new
+ * action sets. Don't forget to call {@link jEdit#removeActionSet(ActionSet)}
+ * before your plugin is unloaded, too.
+ *
+ * @see jEdit#getActionContext()
+ * @see org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()
+ * @see ActionContext#getActionNames()
+ * @see ActionContext#getAction(String)
+ * @see jEdit#addActionSet(ActionSet)
+ * @see jEdit#removeActionSet(ActionSet)
+ * @see PluginJAR#getActionSet()
+ * @see BeanShell
+ * @see View
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: ActionSet.java 9529 2007-05-12 15:06:52Z ezust $
+ * @since jEdit 4.3pre13
+ */
+public abstract class JEditActionSet<E extends JEditAbstractEditAction> implements InputHandlerProvider
+{
+ //{{{ JEditActionSet constructor
+ /**
+ * Creates a new action set.
+ * @since jEdit 4.3pre13
+ */
+ protected JEditActionSet()
+ {
+ actions = new Hashtable<String, Object>();
+ loaded = true;
+ } //}}}
+
+ //{{{ JEditActionSet constructor
+ /**
+ * Creates a new action set.
+ * @param cachedActionNames The list of cached action names
+ * @param uri The actions.xml URI
+ * @since jEdit 4.3pre13
+ */
+ protected JEditActionSet(String[] cachedActionNames, URL uri)
+ {
+ this();
+ this.uri = uri;
+ if(cachedActionNames != null)
+ {
+ for(int i = 0; i < cachedActionNames.length; i++)
+ {
+ actions.put(cachedActionNames[i],placeholder);
+ }
+ }
+ loaded = false;
+ } //}}}
+
+ //{{{ addAction() method
+ /**
+ * Adds an action to the action set.
+ * @param action The action
+ * @since jEdit 4.0pre1
+ */
+ public void addAction(E action)
+ {
+ actions.put(action.getName(),action);
+ if(context != null)
+ {
+ context.actionNames = null;
+ context.actionHash.put(action.getName(),this);
+ }
+ } //}}}
+
+ //{{{ removeAction() method
+ /**
+ * Removes an action from the action set.
+ * @param name The action name
+ * @since jEdit 4.0pre1
+ */
+ public void removeAction(String name)
+ {
+ actions.remove(name);
+ if(context != null)
+ {
+ context.actionNames = null;
+ context.actionHash.remove(name);
+ }
+ } //}}}
+
+ //{{{ removeAllActions() method
+ /**
+ * Removes all actions from the action set.
+ * @since jEdit 4.0pre1
+ */
+ public void removeAllActions()
+ {
+ if(context != null)
+ {
+ context.actionNames = null;
+ String[] actions = getActionNames();
+ for(int i = 0; i < actions.length; i++)
+ {
+ context.actionHash.remove(actions[i]);
+ }
+ }
+ actions.clear();
+ } //}}}
+
+ //{{{ getAction() method
+ /**
+ * Returns an action with the specified name.<p>
+ *
+ * <b>Deferred loading:</b> this will load the action set if necessary.
+ *
+ * @param name The action name
+ * @since jEdit 4.0pre1
+ */
+ public E getAction(String name)
+ {
+ Object obj = actions.get(name);
+ if(obj == placeholder)
+ {
+ load();
+ obj = actions.get(name);
+ if(obj == placeholder)
+ {
+ Log.log(Log.WARNING,this,"Outdated cache");
+ obj = null;
+ }
+ }
+
+ return (E) obj;
+ } //}}}
+
+ //{{{ getActionCount() method
+ /**
+ * Returns the number of actions in the set.
+ * @since jEdit 4.0pre1
+ */
+ public int getActionCount()
+ {
+ return actions.size();
+ } //}}}
+
+ //{{{ getActionNames() method
+ /**
+ * Returns an array of all action names in this action set.
+ * @since jEdit 4.2pre1
+ */
+ public String[] getActionNames()
+ {
+ String[] retVal = new String[actions.size()];
+ Set<String> keys = actions.keySet();
+ int i = 0;
+ for (String key : keys)
+ {
+ retVal[i++] = key;
+ }
+ return retVal;
+ } //}}}
+
+ //{{{ getCacheableActionNames() method
+ /**
+ * Returns an array of all action names in this action set that should
+ * be cached; namely, <code>BeanShellAction</code>s.
+ * @since jEdit 4.2pre1
+ */
+ public String[] getCacheableActionNames()
+ {
+ LinkedList<String> retVal = new LinkedList<String>();
+ for (Object obj : actions.values())
+ {
+ if (obj == placeholder)
+ {
+ // ??? this should only be called with
+ // fully loaded action set
+ Log.log(Log.WARNING, this, "Action set not up "
+ + "to date");
+ }
+ else if (obj instanceof JEditBeanShellAction)
+ retVal.add(((JEditBeanShellAction) obj).getName());
+ }
+ return retVal.toArray(new String[retVal.size()]);
+ } //}}}
+
+ //{{{ getArray() method
+ /**
+ * Returns an empty array E[].
+ * I know it is bad, if you find a method to instantiate a generic Array,
+ * tell me
+ * @param size the size of the array
+ * @return the empty array
+ */
+ protected abstract E[] getArray(int size);
+ //}}}
+
+ //{{{ getActions() method
+ /**
+ * Returns an array of all actions in this action set.<p>
+ *
+ * <b>Deferred loading:</b> this will load the action set if necessary.
+ *
+ * @since jEdit 4.0pre1
+ */
+ public E[] getActions()
+ {
+ load();
+ E[] retVal = getArray(actions.size());
+ Collection<Object> values = actions.values();
+ int i = 0;
+ for (Object value : values)
+ {
+ retVal[i++] = (E) value;
+ }
+ return retVal;
+ } //}}}
+
+ //{{{ contains() method
+ /**
+ * Returns if this action set contains the specified action.
+ * @param action The action
+ * @since jEdit 4.2pre1
+ */
+ public boolean contains(String action)
+ {
+ boolean retval = actions.containsKey(action);
+ return retval;
+// return actions.containsKey(action);
+ } //}}}
+
+ //{{{ size() method
+ /**
+ * Returns the number of actions in this action set.
+ * @since jEdit 4.2pre2
+ */
+ public int size()
+ {
+ return actions.size();
+ } //}}}
+
+ //{{{ load() method
+ /**
+ * Forces the action set to be loaded. Plugins and macros should not
+ * call this method.
+ * @since jEdit 4.2pre1
+ */
+ public void load()
+ {
+ if(loaded)
+ return;
+
+ loaded = true;
+ //actions.clear();
+
+ if (uri == null)
+ return;
+ try
+ {
+ Log.log(Log.DEBUG,this,"Loading actions from " + uri);
+ ActionListHandler ah = new ActionListHandler(uri.toString(),this);
+ if ( XMLUtilities.parseXML(uri.openStream(), ah))
+ {
+ Log.log(Log.ERROR, this, "Unable to parse: " + uri);
+ }
+ }
+ catch(IOException e)
+ {
+ Log.log(Log.ERROR,this,uri,e);
+ }
+ } //}}}
+
+ //{{{ createBeanShellAction() method
+ /**
+ * This method should be implemented to return an action that will execute
+ * the given code
+ * @since 4.3pre13
+ */
+ protected abstract JEditAbstractEditAction createBeanShellAction(String actionName,
+ String code,
+ String selected,
+ boolean noRepeat,
+ boolean noRecord,
+ boolean noRememberLast);
+ //}}}
+
+ //{{{ initKeyBindings() method
+ /**
+ * Initializes the action set's key bindings.
+ * jEdit calls this method for all registered action sets when the
+ * user changes key bindings in the <b>Global Options</b> dialog box.<p>
+ *
+ * Note if your plugin adds a custom action set to jEdit's collection,
+ * it must also call this method on the action set after adding it.
+ *
+ * @since jEdit 4.2pre1
+ */
+ public void initKeyBindings()
+ {
+ AbstractInputHandler inputHandler = getInputHandler();
+
+ Set<Map.Entry<String, Object>> entries = actions.entrySet();
+ for (Map.Entry<String, Object> entry : entries)
+ {
+ String name = entry.getKey();
+
+ String shortcut1 = getProperty(name + ".shortcut");
+ if(shortcut1 != null)
+ inputHandler.addKeyBinding(shortcut1,name);
+
+ String shortcut2 = getProperty(name + ".shortcut2");
+ if(shortcut2 != null)
+ inputHandler.addKeyBinding(shortcut2,name);
+ }
+ } //}}}
+
+ //{{{ getProperty() method
+ /**
+ * Returns a property for the given name.
+ * In jEdit it will returns a jEdit.getProperty(name), but it can
+ * return something else for a standalone textarea.
+ * @param name the property name
+ * @return the property value
+ * @since 4.3pre13
+ */
+ protected abstract String getProperty(String name);
+ //}}}
+
+ //{{{ Package-private members
+ JEditActionContext context;
+
+ //{{{ getActionNames() method
+ void getActionNames(List<String> list)
+ {
+ list.addAll(actions.keySet());
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ protected Hashtable<String,Object> actions;
+ protected URL uri;
+ protected boolean loaded;
+
+ protected static final Object placeholder = new Object();
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/JEditBeanShellAction.java b/jEdit/org/gjt/sp/jedit/JEditBeanShellAction.java
index b0d9b58..e5e2d21 100644
--- a/jEdit/org/gjt/sp/jedit/JEditBeanShellAction.java
+++ b/jEdit/org/gjt/sp/jedit/JEditBeanShellAction.java
@@ -1,206 +1,206 @@
-/*
- * JEditBeanShellAction.java - jEdit BeanShell action
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Matthieu Casanova
- * Portions Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import org.gjt.sp.jedit.bsh.*;
-import java.awt.Component;
-import org.gjt.sp.jedit.textarea.TextArea;
-import org.gjt.sp.util.Log;
-
-/**
- * An action that evaluates BeanShell code when invoked. BeanShell actions are
- * usually loaded from <code>actions.xml</code> and
- * <code>browser.actions.xml</code> files; see {@link ActionSet} for syntax
- * information.
- *
- * @see jEdit#getAction(String)
- * @see jEdit#getActionNames()
- * @see ActionSet
- *
- * @author Slava Pestov
- * @author Matthieu Casanova
- * @version $Id: BeanShellAction.java 10803 2007-10-04 20:45:31Z kpouer $
- */
-public class JEditBeanShellAction extends JEditAbstractEditAction<TextArea>
-{
- //{{{ BeanShellAction constructor
- public JEditBeanShellAction(String name, String code, String isSelected,
- boolean noRepeat, boolean noRecord, boolean noRememberLast)
- {
- super(name);
-
- this.code = code;
- this.isSelected = isSelected;
- this.noRepeat = noRepeat;
- this.noRecord = noRecord;
- this.noRememberLast = noRememberLast;
-
- /* Some characters that we like to use in action names
- * ('.', '-') are not allowed in BeanShell identifiers. */
- sanitizedName = name.replace('.','_').replace('-','_');
- } //}}}
-
- //{{{ invoke() method
- public void invoke(TextArea textArea)
- {
- try
- {
- if(cachedCode == null)
- {
- String cachedCodeName = "action_" + sanitizedName;
- cachedCode = bsh.cacheBlock(cachedCodeName,code,true);
- }
-
- bsh.runCachedBlock(cachedCode,textArea,
- new NameSpace(bsh.getNameSpace(),
- "BeanShellAction.invoke()"));
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,this,e);
- }
- } //}}}
-
- //{{{ isSelected() method
- public boolean isSelected(Component comp)
- {
- if(isSelected == null)
- return false;
-
- NameSpace global = bsh.getNameSpace();
-
- try
- {
- if(cachedIsSelected == null)
- {
- String cachedIsSelectedName = "selected_" + sanitizedName;
- cachedIsSelected = bsh.cacheBlock(cachedIsSelectedName,
- isSelected,true);
- }
-
- // undocumented hack to allow browser actions to work.
- // XXX - clean up in 4.3
- global.setVariable("_comp",comp);
-
- return Boolean.TRUE.equals(bsh.runCachedBlock(
- cachedIsSelected,null,
- new NameSpace(bsh.getNameSpace(),
- "BeanShellAction.isSelected()")));
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,this,e);
-
- // dialogs fuck things up if a menu is visible, etc!
- //new BeanShellErrorDialog(view,e);
-
- // so that in the future we don't see streams of
- // exceptions
- isSelected = null;
-
- return false;
- }
- finally
- {
- try
- {
- global.setVariable("_comp",null);
- }
- catch(UtilEvalError err)
- {
- Log.log(Log.ERROR,this,err);
- }
- }
- } //}}}
-
- //{{{ noRepeat() method
- public boolean noRepeat()
- {
- return noRepeat;
- } //}}}
-
- //{{{ noRecord() method
- public boolean noRecord()
- {
- return noRecord;
- } //}}}
-
- //{{{ noRememberLast() method
- /**
- * Returns if this edit action should not be remembered as the most
- * recently invoked action.
- * @since jEdit 4.2pre1
- */
- public boolean noRememberLast()
- {
- return noRememberLast;
- } //}}}
-
- //{{{ getCode() method
- public String getCode()
- {
- return code.trim();
- } //}}}
-
- //{{{ Private members
- private boolean noRepeat;
- private boolean noRecord;
- private boolean noRememberLast;
- private String code;
- private String isSelected;
- private BshMethod cachedCode;
- private BshMethod cachedIsSelected;
- private String sanitizedName;
- private static final BeanShellFacade<TextArea> bsh = new MyBeanShellFacade();
- //}}}
-
- //{{{ MyBeanShellFacade class
- private static class MyBeanShellFacade extends BeanShellFacade<TextArea>
- {
- @Override
- protected void setupDefaultVariables(NameSpace namespace, TextArea textArea) throws UtilEvalError
- {
- if(textArea != null)
- {
- namespace.setVariable("buffer",textArea.getBuffer(), false);
- namespace.setVariable("textArea",textArea, false);
- }
- }
-
- @Override
- protected void resetDefaultVariables(NameSpace namespace) throws UtilEvalError
- {
- namespace.setVariable("buffer",null, false);
- namespace.setVariable("textArea",null, false);
- }
-
- @Override
- protected void handleException(TextArea textArea, String path, Throwable t)
- {
- Log.log(Log.ERROR,this, t, t);
-// new BeanShellErrorDialog(null,t);
- }
- } //}}}
-
-}
+/*
+ * JEditBeanShellAction.java - jEdit BeanShell action
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Matthieu Casanova
+ * Portions Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import org.gjt.sp.jedit.bsh.*;
+import java.awt.Component;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.util.Log;
+
+/**
+ * An action that evaluates BeanShell code when invoked. BeanShell actions are
+ * usually loaded from <code>actions.xml</code> and
+ * <code>browser.actions.xml</code> files; see {@link ActionSet} for syntax
+ * information.
+ *
+ * @see jEdit#getAction(String)
+ * @see jEdit#getActionNames()
+ * @see ActionSet
+ *
+ * @author Slava Pestov
+ * @author Matthieu Casanova
+ * @version $Id: BeanShellAction.java 10803 2007-10-04 20:45:31Z kpouer $
+ */
+public class JEditBeanShellAction extends JEditAbstractEditAction<TextArea>
+{
+ //{{{ BeanShellAction constructor
+ public JEditBeanShellAction(String name, String code, String isSelected,
+ boolean noRepeat, boolean noRecord, boolean noRememberLast)
+ {
+ super(name);
+
+ this.code = code;
+ this.isSelected = isSelected;
+ this.noRepeat = noRepeat;
+ this.noRecord = noRecord;
+ this.noRememberLast = noRememberLast;
+
+ /* Some characters that we like to use in action names
+ * ('.', '-') are not allowed in BeanShell identifiers. */
+ sanitizedName = name.replace('.','_').replace('-','_');
+ } //}}}
+
+ //{{{ invoke() method
+ public void invoke(TextArea textArea)
+ {
+ try
+ {
+ if(cachedCode == null)
+ {
+ String cachedCodeName = "action_" + sanitizedName;
+ cachedCode = bsh.cacheBlock(cachedCodeName,code,true);
+ }
+
+ bsh.runCachedBlock(cachedCode,textArea,
+ new NameSpace(bsh.getNameSpace(),
+ "BeanShellAction.invoke()"));
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ } //}}}
+
+ //{{{ isSelected() method
+ public boolean isSelected(Component comp)
+ {
+ if(isSelected == null)
+ return false;
+
+ NameSpace global = bsh.getNameSpace();
+
+ try
+ {
+ if(cachedIsSelected == null)
+ {
+ String cachedIsSelectedName = "selected_" + sanitizedName;
+ cachedIsSelected = bsh.cacheBlock(cachedIsSelectedName,
+ isSelected,true);
+ }
+
+ // undocumented hack to allow browser actions to work.
+ // XXX - clean up in 4.3
+ global.setVariable("_comp",comp);
+
+ return Boolean.TRUE.equals(bsh.runCachedBlock(
+ cachedIsSelected,null,
+ new NameSpace(bsh.getNameSpace(),
+ "BeanShellAction.isSelected()")));
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,this,e);
+
+ // dialogs fuck things up if a menu is visible, etc!
+ //new BeanShellErrorDialog(view,e);
+
+ // so that in the future we don't see streams of
+ // exceptions
+ isSelected = null;
+
+ return false;
+ }
+ finally
+ {
+ try
+ {
+ global.setVariable("_comp",null);
+ }
+ catch(UtilEvalError err)
+ {
+ Log.log(Log.ERROR,this,err);
+ }
+ }
+ } //}}}
+
+ //{{{ noRepeat() method
+ public boolean noRepeat()
+ {
+ return noRepeat;
+ } //}}}
+
+ //{{{ noRecord() method
+ public boolean noRecord()
+ {
+ return noRecord;
+ } //}}}
+
+ //{{{ noRememberLast() method
+ /**
+ * Returns if this edit action should not be remembered as the most
+ * recently invoked action.
+ * @since jEdit 4.2pre1
+ */
+ public boolean noRememberLast()
+ {
+ return noRememberLast;
+ } //}}}
+
+ //{{{ getCode() method
+ public String getCode()
+ {
+ return code.trim();
+ } //}}}
+
+ //{{{ Private members
+ private boolean noRepeat;
+ private boolean noRecord;
+ private boolean noRememberLast;
+ private String code;
+ private String isSelected;
+ private BshMethod cachedCode;
+ private BshMethod cachedIsSelected;
+ private String sanitizedName;
+ private static final BeanShellFacade<TextArea> bsh = new MyBeanShellFacade();
+ //}}}
+
+ //{{{ MyBeanShellFacade class
+ private static class MyBeanShellFacade extends BeanShellFacade<TextArea>
+ {
+ @Override
+ protected void setupDefaultVariables(NameSpace namespace, TextArea textArea) throws UtilEvalError
+ {
+ if(textArea != null)
+ {
+ setVariable(namespace, "buffer",textArea.getBuffer());
+ setVariable(namespace, "textArea",textArea);
+ }
+ }
+
+ @Override
+ protected void resetDefaultVariables(NameSpace namespace) throws UtilEvalError
+ {
+ namespace.setVariable("buffer",null, false);
+ namespace.setVariable("textArea",null, false);
+ }
+
+ @Override
+ protected void handleException(TextArea textArea, String path, Throwable t)
+ {
+ Log.log(Log.ERROR,this, t, t);
+// new BeanShellErrorDialog(null,t);
+ }
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/JEditKillRing.java b/jEdit/org/gjt/sp/jedit/JEditKillRing.java
index 44e7b4b..62fad38 100644
--- a/jEdit/org/gjt/sp/jedit/JEditKillRing.java
+++ b/jEdit/org/gjt/sp/jedit/JEditKillRing.java
@@ -1,200 +1,200 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003, 2005 Slava Pestov
- * Portions copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit;
-
-import java.util.List;
-import java.util.LinkedList;
-import java.io.IOException;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.jedit.buffer.KillRing;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-import org.gjt.sp.util.IOUtilities;
-
-/**
- * The basic KillRing of jEdit.
- * @author Matthieu Casanova
- * @version $Id: ParserRuleSet.java 5471 2006-06-22 06:31:23Z kpouer $
- */
-class JEditKillRing extends KillRing
-{
- //{{{ Constructor
- JEditKillRing()
- {
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory != null)
- {
- killringXML = new SettingsXML(settingsDirectory, "killring");
- }
- } //}}}
-
- //{{{ load() method
- @Override
- public void load()
- {
- if(killringXML == null)
- return;
-
- if(!killringXML.fileExists())
- return;
-
- Log.log(Log.MESSAGE,KillRing.class,"Loading " + killringXML);
-
- KillRingHandler handler = new KillRingHandler();
- try
- {
- killringXML.load(handler);
- }
- catch (IOException ioe)
- {
- Log.log(Log.ERROR, this, ioe);
- }
- reset(handler.list);
- } //}}}
-
- //{{{ save() method
- @Override
- public void save()
- {
- if(killringXML == null)
- return;
-
- if(killringXML.hasChangedOnDisk())
- {
- Log.log(Log.WARNING,KillRing.class,killringXML
- + " changed on disk; will not save killring"
- + " files");
- return;
- }
-
- Log.log(Log.MESSAGE,KillRing.class,"Saving " + killringXML);
-
- String lineSep = System.getProperty("line.separator");
-
- SettingsXML.Saver out = null;
-
- try
- {
- out = killringXML.openSaver();
- out.writeXMLDeclaration("1.1");
-
- out.write("<!DOCTYPE KILLRING SYSTEM \"killring.dtd\">");
- out.write(lineSep);
- out.write("<KILLRING>");
- out.write(lineSep);
-
- int size = getSize();
- for(int i = size - 1; i >=0; i--)
- {
- out.write("<ENTRY>");
- out.write(XMLUtilities.charsToEntities(
- getElementAt(i).toString(),true));
- out.write("</ENTRY>");
- out.write(lineSep);
- }
-
- out.write("</KILLRING>");
- out.write(lineSep);
-
- out.finish();
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,KillRing.class,e);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
- } //}}}
-
- //{{{ Private members
- private SettingsXML killringXML;
-
- //{{{ KillRingHandler class
- private static class KillRingHandler extends DefaultHandler
- {
- public List<String> list = new LinkedList<String>();
-
- @Override
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "killring.dtd", getClass());
- }
-
- @Override
- public void startElement(String uri, String localName,
- String qName, Attributes attrs)
- {
- inEntry = qName.equals("ENTRY");
- }
-
- @Override
- public void endElement(String uri, String localName, String name)
- {
- if(name.equals("ENTRY"))
- {
- list.add(charData.toString());
- inEntry = false;
- charData.setLength(0);
- }
- }
-
- @Override
- public void characters(char[] ch, int start, int length)
- {
- if (inEntry)
- charData.append(ch, start, length);
- }
-
- @Override
- public void processingInstruction(String target, String data)
- {
- if ("illegal-xml-character".equals(target))
- {
- char ch;
- try
- {
- ch = (char)Integer.parseInt(data.trim());
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, this,
- "Failed to get character from PI"
- + "\"" + target + "\""
- + " with \"" + data + "\""
- + ": " + e);
- return;
- }
- characters(new char[] {ch}, 0, 1);
- }
- }
-
- private final StringBuilder charData = new StringBuilder();
- private boolean inEntry;
- } //}}}
- //}}}
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003, 2005 Slava Pestov
+ * Portions copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit;
+
+import java.util.List;
+import java.util.LinkedList;
+import java.io.IOException;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.jedit.buffer.KillRing;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+import org.gjt.sp.util.IOUtilities;
+
+/**
+ * The basic KillRing of jEdit.
+ * @author Matthieu Casanova
+ * @version $Id: ParserRuleSet.java 5471 2006-06-22 06:31:23Z kpouer $
+ */
+class JEditKillRing extends KillRing
+{
+ //{{{ Constructor
+ JEditKillRing()
+ {
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory != null)
+ {
+ killringXML = new SettingsXML(settingsDirectory, "killring");
+ }
+ } //}}}
+
+ //{{{ load() method
+ @Override
+ public void load()
+ {
+ if(killringXML == null)
+ return;
+
+ if(!killringXML.fileExists())
+ return;
+
+ Log.log(Log.MESSAGE,KillRing.class,"Loading " + killringXML);
+
+ KillRingHandler handler = new KillRingHandler();
+ try
+ {
+ killringXML.load(handler);
+ }
+ catch (IOException ioe)
+ {
+ Log.log(Log.ERROR, this, ioe);
+ }
+ reset(handler.list);
+ } //}}}
+
+ //{{{ save() method
+ @Override
+ public void save()
+ {
+ if(killringXML == null)
+ return;
+
+ if(killringXML.hasChangedOnDisk())
+ {
+ Log.log(Log.WARNING,KillRing.class,killringXML
+ + " changed on disk; will not save killring"
+ + " files");
+ return;
+ }
+
+ Log.log(Log.MESSAGE,KillRing.class,"Saving " + killringXML);
+
+ String lineSep = System.getProperty("line.separator");
+
+ SettingsXML.Saver out = null;
+
+ try
+ {
+ out = killringXML.openSaver();
+ out.writeXMLDeclaration("1.1");
+
+ out.write("<!DOCTYPE KILLRING SYSTEM \"killring.dtd\">");
+ out.write(lineSep);
+ out.write("<KILLRING>");
+ out.write(lineSep);
+
+ int size = getSize();
+ for(int i = size - 1; i >=0; i--)
+ {
+ out.write("<ENTRY>");
+ out.write(XMLUtilities.charsToEntities(
+ getElementAt(i).toString(),true));
+ out.write("</ENTRY>");
+ out.write(lineSep);
+ }
+
+ out.write("</KILLRING>");
+ out.write(lineSep);
+
+ out.finish();
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,KillRing.class,e);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private SettingsXML killringXML;
+
+ //{{{ KillRingHandler class
+ private static class KillRingHandler extends DefaultHandler
+ {
+ public List<String> list = new LinkedList<String>();
+
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "killring.dtd", getClass());
+ }
+
+ @Override
+ public void startElement(String uri, String localName,
+ String qName, Attributes attrs)
+ {
+ inEntry = qName.equals("ENTRY");
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String name)
+ {
+ if(name.equals("ENTRY"))
+ {
+ list.add(charData.toString());
+ inEntry = false;
+ charData.setLength(0);
+ }
+ }
+
+ @Override
+ public void characters(char[] ch, int start, int length)
+ {
+ if (inEntry)
+ charData.append(ch, start, length);
+ }
+
+ @Override
+ public void processingInstruction(String target, String data)
+ {
+ if ("illegal-xml-character".equals(target))
+ {
+ char ch;
+ try
+ {
+ ch = (char)Integer.parseInt(data.trim());
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, this,
+ "Failed to get character from PI"
+ + "\"" + target + "\""
+ + " with \"" + data + "\""
+ + ": " + e);
+ return;
+ }
+ characters(new char[] {ch}, 0, 1);
+ }
+ }
+
+ private final StringBuilder charData = new StringBuilder();
+ private boolean inEntry;
+ } //}}}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/JEditMode.java b/jEdit/org/gjt/sp/jedit/JEditMode.java
index 0b2cdf8..f35fbf4 100644
--- a/jEdit/org/gjt/sp/jedit/JEditMode.java
+++ b/jEdit/org/gjt/sp/jedit/JEditMode.java
@@ -1,105 +1,153 @@
-/*
- * JEditMode.java - jEdit editing mode
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import org.gjt.sp.util.Log;
-
-/**
- * @author Matthieu Casanova
- * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
- * @since jEdit 4.3pre10
- */
-class JEditMode extends Mode
-{
- //{{{ JEditMode constructor
- JEditMode(String name)
- {
- super(name);
- } //}}}
-
- //{{{ getProperty() method
- /**
- * Returns a mode property.
- *
- * @param key The property name
- * @since jEdit 4.3pre10
- */
- @Override
- public Object getProperty(String key)
- {
- String prefix = "mode." + name + '.';
-
- //if(jEdit.getBooleanProperty(prefix + "customSettings"))
- //{
- String property = jEdit.getProperty(prefix + key);
- if(property != null)
- {
- Object value;
- try
- {
- value = new Integer(property);
- }
- catch(NumberFormatException nf)
- {
- value = property;
- }
- return value;
- }
- //}
-
- Object value = props.get(key);
- if(value != null)
- return value;
-
- String global = jEdit.getProperty("buffer." + key);
- if(global != null)
- {
- try
- {
- return new Integer(global);
- }
- catch(NumberFormatException nf)
- {
- return global;
- }
- }
- else
- return null;
- } //}}}
-
- //{{{ loadIfNecessary() method
- /**
- * Loads the mode from disk if it hasn't been loaded already.
- * @since jEdit 4.3pre10
- */
- @Override
- public void loadIfNecessary()
- {
- if(marker == null)
- {
- jEdit.loadMode(this);
- if (marker == null)
- Log.log(Log.ERROR, this, "Mode not correctly loaded, token marker is still null");
- }
- } //}}}
-}
+/*
+ * JEditMode.java - jEdit editing mode
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import org.gjt.sp.util.Log;
+
+/**
+ * @author Matthieu Casanova
+ * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
+ * @since jEdit 4.3pre10
+ */
+class JEditMode extends Mode
+{
+ //{{{ JEditMode constructor
+ JEditMode(String name)
+ {
+ super(name);
+ } //}}}
+
+ //{{{ setProperty() method
+ /**
+ * Sets a mode property.
+ * @param key The property name
+ * @param value The property value
+ */
+ @Override
+ public void setProperty(String key, Object value)
+ {
+ if (initialized)
+ {
+ String prefix = "mode." + name + '.';
+ jEdit.setProperty(prefix + key, value.toString());
+ }
+ props.put(key,value);
+ } //}}}
+
+ //{{{ unsetProperty() method
+ /**
+ * Unsets a mode property.
+ * @param key The property name
+ */
+ @Override
+ public void unsetProperty(String key)
+ {
+ if (initialized)
+ {
+ String prefix = "mode." + name + '.';
+ jEdit.unsetProperty(prefix + key);
+ }
+ props.remove(key);
+ } //}}}
+
+ //{{{ getProperty() method
+ /**
+ * Returns a mode property.
+ *
+ * @param key The property name
+ * @since jEdit 4.3pre10
+ */
+ @Override
+ public Object getProperty(String key)
+ {
+ String prefix = "mode." + name + '.';
+
+ //if(jEdit.getBooleanProperty(prefix + "customSettings"))
+ //{
+ String property = jEdit.getProperty(prefix + key);
+ if(property != null)
+ {
+ Object value;
+ try
+ {
+ value = new Integer(property);
+ }
+ catch(NumberFormatException nf)
+ {
+ value = property;
+ }
+ return value;
+ }
+ //}
+
+ Object value = props.get(key);
+ if(value != null)
+ return value;
+
+ String global = jEdit.getProperty("buffer." + key);
+ if(global != null)
+ {
+ try
+ {
+ return new Integer(global);
+ }
+ catch(NumberFormatException nf)
+ {
+ return global;
+ }
+ }
+ else
+ return null;
+ } //}}}
+
+ //{{{ init() method
+ /**
+ * Keeps track of mode initialization, to avoid overwriting
+ * custom mode properties in the user's settings.
+ */
+ @Override
+ public void init()
+ {
+ initialized = true;
+ super.init();
+ } //}}}
+
+ //{{{ loadIfNecessary() method
+ /**
+ * Loads the mode from disk if it hasn't been loaded already.
+ * @since jEdit 4.3pre10
+ */
+ @Override
+ public void loadIfNecessary()
+ {
+ if(marker == null)
+ {
+ jEdit.loadMode(this);
+ if (marker == null)
+ Log.log(Log.ERROR, this, "Mode not correctly loaded, token marker is still null");
+ }
+ } //}}}
+
+
+ private boolean initialized = false;
+}
diff --git a/jEdit/org/gjt/sp/jedit/JEditRegisterSaver.java b/jEdit/org/gjt/sp/jedit/JEditRegisterSaver.java
index 7b600a6..4b42faf 100644
--- a/jEdit/org/gjt/sp/jedit/JEditRegisterSaver.java
+++ b/jEdit/org/gjt/sp/jedit/JEditRegisterSaver.java
@@ -1,196 +1,196 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit;
-
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-import org.gjt.sp.util.IOUtilities;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Attributes;
-
-import java.io.IOException;
-
-/**
- * The concrete RegisterSaver for jEdit.
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-class JEditRegisterSaver implements RegisterSaver
-{
- //{{{ Constructor
- JEditRegisterSaver()
- {
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory != null)
- {
- registersXML = new SettingsXML(settingsDirectory, "registers");
- }
- } //}}}
-
- //{{{ loadRegisters() method
- public void loadRegisters()
- {
- if(registersXML == null)
- return;
-
- if(!registersXML.fileExists())
- return;
-
- Log.log(Log.MESSAGE,jEdit.class,"Loading " + registersXML);
-
- RegistersHandler handler = new RegistersHandler();
- try
- {
- Registers.setLoading(true);
- registersXML.load(handler);
- }
- catch (IOException ioe)
- {
- Log.log(Log.ERROR, Registers.class, ioe);
- }
- finally
- {
- Registers.setLoading(false);
- }
- } //}}}
-
- //{{{ saveRegisters() method
- public void saveRegisters()
- {
- if(registersXML == null)
- return;
-
- if(registersXML.hasChangedOnDisk())
- {
- Log.log(Log.WARNING,Registers.class,registersXML
- + " changed on disk; will not save registers");
- return;
- }
-
- Log.log(Log.MESSAGE,Registers.class,"Saving " + registersXML);
-
- String lineSep = System.getProperty("line.separator");
-
- SettingsXML.Saver out = null;
-
- try
- {
- out = registersXML.openSaver();
- out.writeXMLDeclaration();
-
- out.write("<!DOCTYPE REGISTERS SYSTEM \"registers.dtd\">");
- out.write(lineSep);
- out.write("<REGISTERS>");
- out.write(lineSep);
-
- Registers.Register[] registers = Registers.getRegisters();
- for(int i = 0; i < registers.length; i++)
- {
- Registers.Register register = registers[i];
- if(register == null ||
- i == '$' ||
- i == '%' ||
- register.toString().length() == 0)
- continue;
-
- out.write("<REGISTER NAME=\"");
- if(i == '"')
- out.write(""");
- else
- out.write((char)i);
- out.write("\">");
-
- out.write(XMLUtilities.charsToEntities(
- register.toString(), false));
-
- out.write("</REGISTER>");
- out.write(lineSep);
- }
-
- out.write("</REGISTERS>");
- out.write(lineSep);
-
- out.finish();
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,Registers.class,e);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
- } //}}}
-
- //{{{ Private members
- private SettingsXML registersXML;
-
- //{{{ RegistersHandler class
- private static class RegistersHandler extends DefaultHandler
- {
- //{{{ resolveEntity() method
- @Override
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "registers.dtd", getClass());
- } //}}}
-
- //{{{ startElement() method
- @Override
- public void startElement(String uri, String localName,
- String qName, Attributes attrs)
- {
- registerName = attrs.getValue("NAME");
- inRegister = "REGISTER".equals(qName);
- } //}}}
-
- //{{{ endElement() method
- @Override
- public void endElement(String uri, String localName, String name)
- {
- if("REGISTER".equals(name))
- {
- if(registerName == null || registerName.length() != 1)
- Log.log(Log.ERROR,this,"Malformed NAME: " + registerName);
- else
- Registers.setRegister(registerName.charAt(0),charData.toString());
- inRegister = false;
- charData.setLength(0);
- }
- } //}}}
-
- //{{{ characters() method
- @Override
- public void characters(char[] ch, int start, int length)
- {
- if (inRegister)
- charData.append(ch, start, length);
- } //}}}
-
- //{{{ Private members
- private String registerName;
- private final StringBuilder charData = new StringBuilder();
- private boolean inRegister;
- //}}}
- } //}}}
- //}}}
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit;
+
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+import org.gjt.sp.util.IOUtilities;
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.Attributes;
+
+import java.io.IOException;
+
+/**
+ * The concrete RegisterSaver for jEdit.
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+class JEditRegisterSaver implements RegisterSaver
+{
+ //{{{ Constructor
+ JEditRegisterSaver()
+ {
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory != null)
+ {
+ registersXML = new SettingsXML(settingsDirectory, "registers");
+ }
+ } //}}}
+
+ //{{{ loadRegisters() method
+ public void loadRegisters()
+ {
+ if(registersXML == null)
+ return;
+
+ if(!registersXML.fileExists())
+ return;
+
+ Log.log(Log.MESSAGE,jEdit.class,"Loading " + registersXML);
+
+ RegistersHandler handler = new RegistersHandler();
+ try
+ {
+ Registers.setLoading(true);
+ registersXML.load(handler);
+ }
+ catch (IOException ioe)
+ {
+ Log.log(Log.ERROR, Registers.class, ioe);
+ }
+ finally
+ {
+ Registers.setLoading(false);
+ }
+ } //}}}
+
+ //{{{ saveRegisters() method
+ public void saveRegisters()
+ {
+ if(registersXML == null)
+ return;
+
+ if(registersXML.hasChangedOnDisk())
+ {
+ Log.log(Log.WARNING,Registers.class,registersXML
+ + " changed on disk; will not save registers");
+ return;
+ }
+
+ Log.log(Log.MESSAGE,Registers.class,"Saving " + registersXML);
+
+ String lineSep = System.getProperty("line.separator");
+
+ SettingsXML.Saver out = null;
+
+ try
+ {
+ out = registersXML.openSaver();
+ out.writeXMLDeclaration();
+
+ out.write("<!DOCTYPE REGISTERS SYSTEM \"registers.dtd\">");
+ out.write(lineSep);
+ out.write("<REGISTERS>");
+ out.write(lineSep);
+
+ Registers.Register[] registers = Registers.getRegisters();
+ for(int i = 0; i < registers.length; i++)
+ {
+ Registers.Register register = registers[i];
+ if(register == null ||
+ i == '$' ||
+ i == '%' ||
+ register.toString().length() == 0)
+ continue;
+
+ out.write("<REGISTER NAME=\"");
+ if(i == '"')
+ out.write(""");
+ else
+ out.write((char)i);
+ out.write("\">");
+
+ out.write(XMLUtilities.charsToEntities(
+ register.toString(), false));
+
+ out.write("</REGISTER>");
+ out.write(lineSep);
+ }
+
+ out.write("</REGISTERS>");
+ out.write(lineSep);
+
+ out.finish();
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,Registers.class,e);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private SettingsXML registersXML;
+
+ //{{{ RegistersHandler class
+ private static class RegistersHandler extends DefaultHandler
+ {
+ //{{{ resolveEntity() method
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "registers.dtd", getClass());
+ } //}}}
+
+ //{{{ startElement() method
+ @Override
+ public void startElement(String uri, String localName,
+ String qName, Attributes attrs)
+ {
+ registerName = attrs.getValue("NAME");
+ inRegister = "REGISTER".equals(qName);
+ } //}}}
+
+ //{{{ endElement() method
+ @Override
+ public void endElement(String uri, String localName, String name)
+ {
+ if("REGISTER".equals(name))
+ {
+ if(registerName == null || registerName.length() != 1)
+ Log.log(Log.ERROR,this,"Malformed NAME: " + registerName);
+ else
+ Registers.setRegister(registerName.charAt(0),charData.toString());
+ inRegister = false;
+ charData.setLength(0);
+ }
+ } //}}}
+
+ //{{{ characters() method
+ @Override
+ public void characters(char[] ch, int start, int length)
+ {
+ if (inRegister)
+ charData.append(ch, start, length);
+ } //}}}
+
+ //{{{ Private members
+ private String registerName;
+ private final StringBuilder charData = new StringBuilder();
+ private boolean inRegister;
+ //}}}
+ } //}}}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/JEditRegistersListener.java b/jEdit/org/gjt/sp/jedit/JEditRegistersListener.java
index 41ff386..fe62e21 100644
--- a/jEdit/org/gjt/sp/jedit/JEditRegistersListener.java
+++ b/jEdit/org/gjt/sp/jedit/JEditRegistersListener.java
@@ -1,36 +1,36 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit;
-
-import org.gjt.sp.jedit.msg.RegisterChanged;
-
-/**
- * The concrete RegistersListener of jEdit.
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-class JEditRegistersListener implements RegistersListener
-{
- public void registerChanged(char name)
- {
- EditBus.send(new RegisterChanged(null, name));
- }
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit;
+
+import org.gjt.sp.jedit.msg.RegisterChanged;
+
+/**
+ * The concrete RegistersListener of jEdit.
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+class JEditRegistersListener implements RegistersListener
+{
+ public void registerChanged(char name)
+ {
+ EditBus.send(new RegisterChanged(null, name));
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/Macros.java b/jEdit/org/gjt/sp/jedit/Macros.java
index 2742b85..d8337df 100644
--- a/jEdit/org/gjt/sp/jedit/Macros.java
+++ b/jEdit/org/gjt/sp/jedit/Macros.java
@@ -1,1033 +1,1050 @@
-/*
- * Macros.java - Macro manager
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2004 Slava Pestov
- * Portions copyright (C) 2002 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-
-import org.gjt.sp.jedit.msg.BufferUpdate;
-import org.gjt.sp.jedit.msg.DynamicMenuChanged;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-
-import javax.swing.*;
-import java.awt.*;
-import java.io.File;
-import java.io.Reader;
-import java.util.*;
-import java.util.List;
-import java.util.regex.Pattern;
-//}}}
-
-/**
- * This class records and runs macros.<p>
- *
- * It also contains a few methods useful for displaying output messages
- * or obtaining input from a macro:
- *
- * <ul>
- * <li>{@link #confirm(Component,String,int)}</li>
- * <li>{@link #confirm(Component,String,int,int)}</li>
- * <li>{@link #error(Component,String)}</li>
- * <li>{@link #input(Component,String)}</li>
- * <li>{@link #input(Component,String,String)}</li>
- * <li>{@link #message(Component,String)}</li>
- * </ul>
- *
- * Note that plugins should not use the above methods. Call
- * the methods in the {@link GUIUtilities} class instead.
- *
- * @author Slava Pestov
- * @version $Id: Macros.java 14091 2008-11-22 20:31:20Z kpouer $
- */
-public class Macros
-{
- //{{{ showRunScriptDialog() method
- /**
- * Prompts for one or more files to run as macros
- * @param view The view
- * @since jEdit 4.0pre7
- */
- public static void showRunScriptDialog(View view)
- {
- String[] paths = GUIUtilities.showVFSFileDialog(view,
- null,JFileChooser.OPEN_DIALOG,true);
- if(paths != null)
- {
- Buffer buffer = view.getBuffer();
- try
- {
- buffer.beginCompoundEdit();
-
-file_loop: for(int i = 0; i < paths.length; i++)
- runScript(view,paths[i],false);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- }
- } //}}}
-
- //{{{ runScript() method
- /**
- * Runs the specified script.
- * Unlike the {@link BeanShell#runScript(View,String,Reader,boolean)}
- * method, this method can run scripts supported
- * by any registered macro handler.
- * @param view The view
- * @param path The VFS path of the script
- * @param ignoreUnknown If true, then unknown file types will be
- * ignored; otherwise, a warning message will be printed and they will
- * be evaluated as BeanShell scripts.
- *
- * @since jEdit 4.1pre2
- */
- public static void runScript(View view, String path, boolean ignoreUnknown)
- {
- Handler handler = getHandlerForPathName(path);
- if(handler != null)
- {
- try
- {
- Macro newMacro = handler.createMacro(
- MiscUtilities.getFileName(path), path);
- newMacro.invoke(view);
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, Macros.class, e);
- return;
- }
- return;
- }
-
- // only executed if above loop falls
- // through, ie there is no handler for
- // this file
- if(ignoreUnknown)
- {
- Log.log(Log.NOTICE,Macros.class,path +
- ": Cannot find a suitable macro handler");
- }
- else
- {
- Log.log(Log.ERROR,Macros.class,path +
- ": Cannot find a suitable macro handler, "
- + "assuming BeanShell");
- getHandler("beanshell").createMacro(
- path,path).invoke(view);
- }
- } //}}}
-
- //{{{ message() method
- /**
- * Utility method that can be used to display a message dialog in a macro.
- * @param comp The component to show the dialog on behalf of, this
- * will usually be a view instance
- * @param message The message
- * @since jEdit 2.7pre2
- */
- public static void message(Component comp, String message)
- {
- GUIUtilities.hideSplashScreen();
-
- JOptionPane.showMessageDialog(comp,message,
- jEdit.getProperty("macro-message.title"),
- JOptionPane.INFORMATION_MESSAGE);
- } //}}}
-
- //{{{ error() method
- /**
- * Utility method that can be used to display an error dialog in a macro.
- * @param comp The component to show the dialog on behalf of, this
- * will usually be a view instance
- * @param message The message
- * @since jEdit 2.7pre2
- */
- public static void error(Component comp, String message)
- {
- GUIUtilities.hideSplashScreen();
-
- JOptionPane.showMessageDialog(comp,message,
- jEdit.getProperty("macro-message.title"),
- JOptionPane.ERROR_MESSAGE);
- } //}}}
-
- //{{{ input() method
- /**
- * Utility method that can be used to prompt for input in a macro.
- * @param comp The component to show the dialog on behalf of, this
- * will usually be a view instance
- * @param prompt The prompt string
- * @since jEdit 2.7pre2
- */
- public static String input(Component comp, String prompt)
- {
- GUIUtilities.hideSplashScreen();
-
- return input(comp,prompt,null);
- } //}}}
-
- //{{{ input() method
- /**
- * Utility method that can be used to prompt for input in a macro.
- * @param comp The component to show the dialog on behalf of, this
- * will usually be a view instance
- * @param prompt The prompt string
- * @since jEdit 3.1final
- */
- public static String input(Component comp, String prompt, String defaultValue)
- {
- GUIUtilities.hideSplashScreen();
-
- return (String)JOptionPane.showInputDialog(comp,prompt,
- jEdit.getProperty("macro-input.title"),
- JOptionPane.QUESTION_MESSAGE,null,null,defaultValue);
- } //}}}
-
- //{{{ confirm() method
- /**
- * Utility method that can be used to ask for confirmation in a macro.
- * @param comp The component to show the dialog on behalf of, this
- * will usually be a view instance
- * @param prompt The prompt string
- * @param buttons The buttons to display - for example,
- * JOptionPane.YES_NO_CANCEL_OPTION
- * @since jEdit 4.0pre2
- */
- public static int confirm(Component comp, String prompt, int buttons)
- {
- GUIUtilities.hideSplashScreen();
-
- return JOptionPane.showConfirmDialog(comp,prompt,
- jEdit.getProperty("macro-confirm.title"),buttons,
- JOptionPane.QUESTION_MESSAGE);
- } //}}}
-
- //{{{ confirm() method
- /**
- * Utility method that can be used to ask for confirmation in a macro.
- * @param comp The component to show the dialog on behalf of, this
- * will usually be a view instance
- * @param prompt The prompt string
- * @param buttons The buttons to display - for example,
- * JOptionPane.YES_NO_CANCEL_OPTION
- * @param type The dialog type - for example,
- * JOptionPane.WARNING_MESSAGE
- */
- public static int confirm(Component comp, String prompt, int buttons, int type)
- {
- GUIUtilities.hideSplashScreen();
-
- return JOptionPane.showConfirmDialog(comp,prompt,
- jEdit.getProperty("macro-confirm.title"),buttons,type);
- } //}}}
-
- //{{{ loadMacros() method
- /**
- * Rebuilds the macros list, and sends a MacrosChanged message
- * (views update their Macros menu upon receiving it)
- * @since jEdit 2.2pre4
- */
- public static void loadMacros()
- {
- macroActionSet.removeAllActions();
- macroHierarchy.removeAllElements();
- macroHash.clear();
-
- // since subsequent macros with the same name are ignored,
- // load user macros first so that they override the system
- // macros.
- String settings = jEdit.getSettingsDirectory();
-
- if(settings != null)
- {
- userMacroPath = MiscUtilities.constructPath(
- settings,"macros");
- loadMacros(macroHierarchy,"",new File(userMacroPath));
- }
-
- if(jEdit.getJEditHome() != null)
- {
- systemMacroPath = MiscUtilities.constructPath(
- jEdit.getJEditHome(),"macros");
- loadMacros(macroHierarchy,"",new File(systemMacroPath));
- }
-
- EditBus.send(new DynamicMenuChanged("macros"));
- } //}}}
-
- //{{{ registerHandler() method
- /**
- * Adds a macro handler to the handlers list
- * @since jEdit 4.0pre6
- */
- public static void registerHandler(Handler handler)
- {
- if (getHandler(handler.getName()) != null)
- {
- Log.log(Log.ERROR, Macros.class, "Cannot register more than one macro handler with the same name");
- return;
- }
-
- Log.log(Log.DEBUG,Macros.class,"Registered " + handler.getName()
- + " macro handler");
- macroHandlers.add(handler);
- } //}}}
-
- //{{{ getHandlers() method
- /**
- * Returns an array containing the list of registered macro handlers
- * @since jEdit 4.0pre6
- */
- public static Handler[] getHandlers()
- {
- Handler[] handlers = new Handler[macroHandlers.size()];
- return macroHandlers.toArray(handlers);
- } //}}}
-
- //{{{ getHandlerForFileName() method
- /**
- * Returns the macro handler suitable for running the specified file
- * name, or null if there is no suitable handler.
- * @since jEdit 4.1pre3
- */
- public static Handler getHandlerForPathName(String pathName)
- {
- for (int i = 0; i < macroHandlers.size(); i++)
- {
- Handler handler = macroHandlers.get(i);
- if (handler.accept(pathName))
- return handler;
- }
-
- return null;
- } //}}}
-
- //{{{ getHandler() method
- /**
- * Returns the macro handler with the specified name, or null if
- * there is no registered handler with that name.
- * @since jEdit 4.0pre6
- */
- public static Handler getHandler(String name)
- {
- for (int i = 0; i < macroHandlers.size(); i++)
- {
- Handler handler = macroHandlers.get(i);
- if (handler.getName().equals(name))
- return handler;
- }
-
- return null;
- }
- //}}}
-
- //{{{ getMacroHierarchy() method
- /**
- * Returns a vector hierarchy with all known macros in it.
- * Each element of this vector is either a macro name string,
- * or another vector. If it is a vector, the first element is a
- * string label, the rest are again, either macro name strings
- * or vectors.
- * @since jEdit 2.6pre1
- */
- public static Vector getMacroHierarchy()
- {
- return macroHierarchy;
- } //}}}
-
- //{{{ getMacroActionSet() method
- /**
- * Returns an action set with all known macros in it.
- * @since jEdit 4.0pre1
- */
- public static ActionSet getMacroActionSet()
- {
- return macroActionSet;
- } //}}}
-
- //{{{ getMacro() method
- /**
- * Returns the macro with the specified name.
- * @param macro The macro's name
- * @since jEdit 2.6pre1
- */
- public static Macro getMacro(String macro)
- {
- return macroHash.get(macro);
- } //}}}
-
- //{{{ getLastMacro() method
- /**
- * @since jEdit 4.3pre1
- */
- public static Macro getLastMacro()
- {
- return lastMacro;
- } //}}}
-
- //{{{ setLastMacro() method
- /**
- * @since jEdit 4.3pre1
- */
- public static void setLastMacro(Macro macro)
- {
- lastMacro = macro;
- } //}}}
-
- //{{{ Macro class
- /**
- * Encapsulates the macro's label, name and path.
- * @since jEdit 2.2pre4
- */
- public static class Macro extends EditAction
- {
- //{{{ Macro constructor
- public Macro(Handler handler, String name, String label, String path)
- {
- super(name);
- this.handler = handler;
- this.label = label;
- this.path = path;
- } //}}}
-
- //{{{ getHandler() method
- public Handler getHandler()
- {
- return handler;
- }
- //}}}
-
- //{{{ getPath() method
- public String getPath()
- {
- return path;
- } //}}}
-
- //{{{ invoke() method
- @Override
- public void invoke(View view)
- {
- setLastMacro(this);
-
- if(view == null)
- handler.runMacro(null,this);
- else
- {
- try
- {
- view.getBuffer().beginCompoundEdit();
- handler.runMacro(view,this);
- }
- finally
- {
- view.getBuffer().endCompoundEdit();
- }
- }
- } //}}}
-
- //{{{ getCode() method
- @Override
- public String getCode()
- {
- return "Macros.getMacro(\"" + getName() + "\").invoke(view);";
- } //}}}
-
- //{{{ macroNameToLabel() method
- public static String macroNameToLabel(String macroName)
- {
- int index = macroName.lastIndexOf('/');
- return macroName.substring(index + 1).replace('_', ' ');
- }
- //}}}
-
- //{{{ Private members
- private Handler handler;
- private String path;
- String label;
- //}}}
- } //}}}
-
- //{{{ recordTemporaryMacro() method
- /**
- * Starts recording a temporary macro.
- * @param view The view
- * @since jEdit 2.7pre2
- */
- public static void recordTemporaryMacro(View view)
- {
- String settings = jEdit.getSettingsDirectory();
-
- if(settings == null)
- {
- GUIUtilities.error(view,"no-settings",new String[0]);
- return;
- }
- if(view.getMacroRecorder() != null)
- {
- GUIUtilities.error(view,"already-recording",new String[0]);
- return;
- }
-
- Buffer buffer = jEdit.openFile((View)null,settings + File.separator
- + "macros","Temporary_Macro.bsh",true,null);
-
- if(buffer == null)
- return;
-
- buffer.remove(0,buffer.getLength());
- buffer.insert(0,jEdit.getProperty("macro.temp.header"));
-
- recordMacro(view,buffer,true);
- } //}}}
-
- //{{{ recordMacro() method
- /**
- * Starts recording a macro.
- * @param view The view
- * @since jEdit 2.7pre2
- */
- public static void recordMacro(View view)
- {
- String settings = jEdit.getSettingsDirectory();
-
- if(settings == null)
- {
- GUIUtilities.error(view,"no-settings",new String[0]);
- return;
- }
-
- if(view.getMacroRecorder() != null)
- {
- GUIUtilities.error(view,"already-recording",new String[0]);
- return;
- }
-
- String name = GUIUtilities.input(view,"record",null);
- if(name == null)
- return;
-
- name = name.replace(' ','_');
-
- Buffer buffer = jEdit.openFile((View) null,null,
- MiscUtilities.constructPath(settings,"macros",
- name + ".bsh"),true,null);
-
- if(buffer == null)
- return;
-
- buffer.remove(0,buffer.getLength());
- buffer.insert(0,jEdit.getProperty("macro.header"));
-
- recordMacro(view,buffer,false);
- } //}}}
-
- //{{{ stopRecording() method
- /**
- * Stops a recording currently in progress.
- * @param view The view
- * @since jEdit 2.7pre2
- */
- public static void stopRecording(View view)
- {
- Recorder recorder = view.getMacroRecorder();
-
- if(recorder == null)
- GUIUtilities.error(view,"macro-not-recording",null);
- else
- {
- view.setMacroRecorder(null);
- if(!recorder.temporary)
- view.setBuffer(recorder.buffer);
- recorder.dispose();
- }
- } //}}}
-
- //{{{ runTemporaryMacro() method
- /**
- * Runs the temporary macro.
- * @param view The view
- * @since jEdit 2.7pre2
- */
- public static void runTemporaryMacro(View view)
- {
- String settings = jEdit.getSettingsDirectory();
-
- if(settings == null)
- {
- GUIUtilities.error(view,"no-settings",null);
- return;
- }
-
- String path = MiscUtilities.constructPath(
- jEdit.getSettingsDirectory(),"macros",
- "Temporary_Macro.bsh");
-
- if(jEdit.getBuffer(path) == null)
- {
- GUIUtilities.error(view,"no-temp-macro",null);
- return;
- }
-
- Handler handler = getHandler("beanshell");
- Macro temp = handler.createMacro(path,path);
-
- Buffer buffer = view.getBuffer();
-
- try
- {
- buffer.beginCompoundEdit();
- temp.invoke(view);
- }
- finally
- {
- /* I already wrote a comment expaining this in
- * Macro.invoke(). */
- if(buffer.insideCompoundEdit())
- buffer.endCompoundEdit();
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Static variables
- private static String systemMacroPath;
- private static String userMacroPath;
-
- private static List<Handler> macroHandlers;
-
- private static ActionSet macroActionSet;
- private static Vector macroHierarchy;
- private static Map<String, Macro> macroHash;
-
- private static Macro lastMacro;
- //}}}
-
- //{{{ Class initializer
- static
- {
- macroHandlers = new ArrayList<Handler>();
- registerHandler(new BeanShellHandler());
- macroActionSet = new ActionSet(jEdit.getProperty("action-set.macros"));
- jEdit.addActionSet(macroActionSet);
- macroHierarchy = new Vector();
- macroHash = new Hashtable<String, Macro>();
- } //}}}
-
- //{{{ loadMacros() method
- private static void loadMacros(List vector, String path, File directory)
- {
- lastMacro = null;
-
- File[] macroFiles = directory.listFiles();
- if(macroFiles == null || macroFiles.length == 0)
- return;
-
- for(int i = 0; i < macroFiles.length; i++)
- {
- File file = macroFiles[i];
- String fileName = file.getName();
- if(file.isHidden())
- {
- /* do nothing! */
- }
- else if(file.isDirectory())
- {
- String submenuName = fileName.replace('_',' ');
- List submenu = null;
- //{{{ try to merge with an existing menu first
- for(int j = 0; j < vector.size(); j++)
- {
- Object obj = vector.get(j);
- if(obj instanceof List)
- {
- List vec = (List)obj;
- if(submenuName.equals(vec.get(0)))
- {
- submenu = vec;
- break;
- }
- }
- } //}}}
- if(submenu == null)
- {
- submenu = new Vector();
- submenu.add(submenuName);
- vector.add(submenu);
- }
-
- loadMacros(submenu,path + fileName + '/',file);
- }
- else
- {
- addMacro(file,path,vector);
- }
- }
- } //}}}
-
- //{{{ addMacro() method
- private static void addMacro(File file, String path, List vector)
- {
- String fileName = file.getName();
- Handler handler = getHandlerForPathName(file.getPath());
-
- if(handler == null)
- return;
-
- try
- {
- // in case macro file name has a space in it.
- // spaces break the view.toolBar property, for instance,
- // since it uses spaces to delimit action names.
- String macroName = (path + fileName).replace(' ','_');
- Macro newMacro = handler.createMacro(macroName,
- file.getPath());
- // ignore if already added.
- // see comment in loadMacros().
- if(macroHash.get(newMacro.getName()) != null)
- return;
-
- vector.add(newMacro.getName());
- jEdit.setTemporaryProperty(newMacro.getName()
- + ".label",
- newMacro.label);
- jEdit.setTemporaryProperty(newMacro.getName()
- + ".mouse-over",
- handler.getLabel() + " - " + file.getPath());
- macroActionSet.addAction(newMacro);
- macroHash.put(newMacro.getName(),newMacro);
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, Macros.class, e);
- macroHandlers.remove(handler);
- }
- } //}}}
-
- //{{{ recordMacro() method
- /**
- * Starts recording a macro.
- * @param view The view
- * @param buffer The buffer to record to
- * @param temporary True if this is a temporary macro
- * @since jEdit 3.0pre5
- */
- private static void recordMacro(View view, Buffer buffer, boolean temporary)
- {
- view.setMacroRecorder(new Recorder(view,buffer,temporary));
-
- // setting the message to 'null' causes the status bar to check
- // if a recording is in progress
- view.getStatus().setMessage(null);
- } //}}}
-
- //}}}
-
- //{{{ Recorder class
- /**
- * Handles macro recording.
- */
- public static class Recorder implements EBComponent
- {
- View view;
- Buffer buffer;
- boolean temporary;
-
- boolean lastWasInput;
- boolean lastWasOverwrite;
- int overwriteCount;
-
- //{{{ Recorder constructor
- public Recorder(View view, Buffer buffer, boolean temporary)
- {
- this.view = view;
- this.buffer = buffer;
- this.temporary = temporary;
- EditBus.addToBus(this);
- } //}}}
-
- //{{{ record() method
- public void record(String code)
- {
- if (BeanShell.isScriptRunning())
- return;
- flushInput();
-
- append("\n");
- append(code);
- } //}}}
-
- //{{{ record() method
- public void record(int repeat, String code)
- {
- if(repeat == 1)
- record(code);
- else
- {
- record("for(int i = 1; i <= " + repeat + "; i++)\n"
- + "{\n"
- + code + '\n'
- + '}');
- }
- } //}}}
-
- //{{{ recordInput() method
- /**
- * @since jEdit 4.2pre5
- */
- public void recordInput(int repeat, char ch, boolean overwrite)
- {
- // record \n and \t on lines specially so that auto indent
- // can take place
- if(ch == '\n')
- record(repeat,"textArea.userInput(\'\\n\');");
- else if(ch == '\t')
- record(repeat,"textArea.userInput(\'\\t\');");
- else
- {
- StringBuilder buf = new StringBuilder(repeat);
- for(int i = 0; i < repeat; i++)
- buf.append(ch);
- recordInput(buf.toString(),overwrite);
- }
- } //}}}
-
- //{{{ recordInput() method
- /**
- * @since jEdit 4.2pre5
- */
- public void recordInput(String str, boolean overwrite)
- {
- String charStr = StandardUtilities.charsToEscapes(str);
-
- if(overwrite)
- {
- if(lastWasOverwrite)
- {
- overwriteCount++;
- append(charStr);
- }
- else
- {
- flushInput();
- overwriteCount = 1;
- lastWasOverwrite = true;
- append("\ntextArea.setSelectedText(\"" + charStr);
- }
- }
- else
- {
- if(lastWasInput)
- append(charStr);
- else
- {
- flushInput();
- lastWasInput = true;
- append("\ntextArea.setSelectedText(\"" + charStr);
- }
- }
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof BufferUpdate)
- {
- BufferUpdate bmsg = (BufferUpdate)msg;
- if(bmsg.getWhat() == BufferUpdate.CLOSED)
- {
- if(bmsg.getBuffer() == buffer)
- stopRecording(view);
- }
- }
- } //}}}
-
- //{{{ append() method
- private void append(String str)
- {
- buffer.insert(buffer.getLength(),str);
- } //}}}
-
- //{{{ dispose() method
- private void dispose()
- {
- flushInput();
-
- for(int i = 0; i < buffer.getLineCount(); i++)
- {
- buffer.indentLine(i,true);
- }
-
- EditBus.removeFromBus(this);
-
- // setting the message to 'null' causes the status bar to
- // check if a recording is in progress
- view.getStatus().setMessage(null);
- } //}}}
-
- //{{{ flushInput() method
- /**
- * We try to merge consecutive inputs. This helper method is
- * called when something other than input is to be recorded.
- */
- private void flushInput()
- {
- if(lastWasInput)
- {
- lastWasInput = false;
- append("\");");
- }
-
- if(lastWasOverwrite)
- {
- lastWasOverwrite = false;
- append("\");\n");
- append("offset = buffer.getLineEndOffset("
- + "textArea.getCaretLine()) - 1;\n");
- append("buffer.remove(textArea.getCaretPosition(),"
- + "Math.min(" + overwriteCount
- + ",offset - "
- + "textArea.getCaretPosition()));");
- }
- } //}}}
- } //}}}
-
- //{{{ Handler class
- /**
- * Encapsulates creating and invoking macros in arbitrary scripting languages
- * @since jEdit 4.0pre6
- */
- public abstract static class Handler
- {
- //{{{ getName() method
- public String getName()
- {
- return name;
- } //}}}
-
- //{{{ getLabel() method
- public String getLabel()
- {
- return label;
- } //}}}
-
- //{{{ accept() method
- public boolean accept(String path)
- {
- return filter.matcher(MiscUtilities.getFileName(path)).matches();
- } //}}}
-
- //{{{ createMacro() method
- public abstract Macro createMacro(String macroName, String path);
- //}}}
-
- //{{{ runMacro() method
- /**
- * Runs the specified macro.
- * @param view The view - may be null.
- * @param macro The macro.
- */
- public abstract void runMacro(View view, Macro macro);
- //}}}
-
- //{{{ runMacro() method
- /**
- * Runs the specified macro. This method is optional; it is
- * called if the specified macro is a startup script. The
- * default behavior is to simply call {@link #runMacro(View,Macros.Macro)}.
- *
- * @param view The view - may be null.
- * @param macro The macro.
- * @param ownNamespace A hint indicating whenever functions and
- * variables defined in the script are to be self-contained, or
- * made available to other scripts. The macro handler may ignore
- * this parameter.
- * @since jEdit 4.1pre3
- */
- public void runMacro(View view, Macro macro, boolean ownNamespace)
- {
- runMacro(view,macro);
- } //}}}
-
- //{{{ Handler constructor
- protected Handler(String name)
- {
- this.name = name;
- label = jEdit.getProperty("macro-handler."
- + name + ".label", name);
- try
- {
- filter = Pattern.compile(StandardUtilities.globToRE(
- jEdit.getProperty(
- "macro-handler." + name + ".glob")));
- }
- catch (Exception e)
- {
- throw new InternalError("Missing or invalid glob for handler " + name);
- }
- } //}}}
-
- //{{{ Private members
- private String name;
- private String label;
- private Pattern filter;
- //}}}
- } //}}}
-
- //{{{ BeanShellHandler class
- private static class BeanShellHandler extends Handler
- {
- //{{{ BeanShellHandler constructor
- BeanShellHandler()
- {
- super("beanshell");
- } //}}}
-
- //{{{ createMacro() method
- @Override
- public Macro createMacro(String macroName, String path)
- {
- // Remove '.bsh'
- macroName = macroName.substring(0, macroName.length() - 4);
-
- return new Macro(this, macroName,
- Macro.macroNameToLabel(macroName), path);
- } //}}}
-
- //{{{ runMacro() method
- @Override
- public void runMacro(View view, Macro macro)
- {
- BeanShell.runScript(view,macro.getPath(),null,true);
- } //}}}
-
- //{{{ runMacro() method
- @Override
- public void runMacro(View view, Macro macro, boolean ownNamespace)
- {
- BeanShell.runScript(view,macro.getPath(),null,ownNamespace);
- } //}}}
- } //}}}
-}
+/*
+ * Macros.java - Macro manager
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2004 Slava Pestov
+ * Portions copyright (C) 2002 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.msg.BufferUpdate;
+import org.gjt.sp.jedit.msg.DynamicMenuChanged;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+
+import javax.swing.*;
+import java.awt.*;
+import java.io.File;
+import java.io.Reader;
+import java.util.*;
+import java.util.List;
+import java.util.regex.Pattern;
+//}}}
+
+/**
+ * This class records and runs macros.<p>
+ *
+ * It also contains a few methods useful for displaying output messages
+ * or obtaining input from a macro:
+ *
+ * <ul>
+ * <li>{@link #confirm(Component,String,int)}</li>
+ * <li>{@link #confirm(Component,String,int,int)}</li>
+ * <li>{@link #error(Component,String)}</li>
+ * <li>{@link #input(Component,String)}</li>
+ * <li>{@link #input(Component,String,String)}</li>
+ * <li>{@link #message(Component,String)}</li>
+ * </ul>
+ *
+ * Note that plugins should not use the above methods. Call
+ * the methods in the {@link GUIUtilities} class instead.
+ *
+ * @author Slava Pestov
+ * @version $Id: Macros.java 16736 2009-12-26 06:24:49Z shlomy $
+ */
+public class Macros
+{
+ //{{{ showRunScriptDialog() method
+ /**
+ * Prompts for one or more files to run as macros
+ * @param view The view
+ * @since jEdit 4.0pre7
+ */
+ public static void showRunScriptDialog(View view)
+ {
+ String[] paths = GUIUtilities.showVFSFileDialog(view,
+ null,JFileChooser.OPEN_DIALOG,true);
+ if(paths != null)
+ {
+ Buffer buffer = view.getBuffer();
+ try
+ {
+ buffer.beginCompoundEdit();
+
+file_loop: for(int i = 0; i < paths.length; i++)
+ runScript(view,paths[i],false);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ }
+ } //}}}
+
+ //{{{ runScript() method
+ /**
+ * Runs the specified script.
+ * Unlike the {@link BeanShell#runScript(View,String,Reader,boolean)}
+ * method, this method can run scripts supported
+ * by any registered macro handler.
+ * @param view The view
+ * @param path The VFS path of the script
+ * @param ignoreUnknown If true, then unknown file types will be
+ * ignored; otherwise, a warning message will be printed and they will
+ * be evaluated as BeanShell scripts.
+ *
+ * @since jEdit 4.1pre2
+ */
+ public static void runScript(View view, String path, boolean ignoreUnknown)
+ {
+ Handler handler = getHandlerForPathName(path);
+ if(handler != null)
+ {
+ try
+ {
+ Macro newMacro = handler.createMacro(
+ MiscUtilities.getFileName(path), path);
+ newMacro.invoke(view);
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, Macros.class, e);
+ return;
+ }
+ return;
+ }
+
+ // only executed if above loop falls
+ // through, ie there is no handler for
+ // this file
+ if(ignoreUnknown)
+ {
+ Log.log(Log.NOTICE,Macros.class,path +
+ ": Cannot find a suitable macro handler");
+ }
+ else
+ {
+ Log.log(Log.ERROR,Macros.class,path +
+ ": Cannot find a suitable macro handler, "
+ + "assuming BeanShell");
+ getHandler("beanshell").createMacro(
+ path,path).invoke(view);
+ }
+ } //}}}
+
+ //{{{ message() method
+ /**
+ * Utility method that can be used to display a message dialog in a macro.
+ * @param comp The component to show the dialog on behalf of, this
+ * will usually be a view instance
+ * @param message The message
+ * @since jEdit 2.7pre2
+ */
+ public static void message(Component comp, String message)
+ {
+ GUIUtilities.hideSplashScreen();
+
+ JOptionPane.showMessageDialog(comp,message,
+ jEdit.getProperty("macro-message.title"),
+ JOptionPane.INFORMATION_MESSAGE);
+ } //}}}
+
+ //{{{ error() method
+ /**
+ * Utility method that can be used to display an error dialog in a macro.
+ * @param comp The component to show the dialog on behalf of, this
+ * will usually be a view instance
+ * @param message The message
+ * @since jEdit 2.7pre2
+ */
+ public static void error(Component comp, String message)
+ {
+ GUIUtilities.hideSplashScreen();
+
+ JOptionPane.showMessageDialog(comp,message,
+ jEdit.getProperty("macro-message.title"),
+ JOptionPane.ERROR_MESSAGE);
+ } //}}}
+
+ //{{{ input() method
+ /**
+ * Utility method that can be used to prompt for input in a macro.
+ * @param comp The component to show the dialog on behalf of, this
+ * will usually be a view instance
+ * @param prompt The prompt string
+ * @since jEdit 2.7pre2
+ */
+ public static String input(Component comp, String prompt)
+ {
+ GUIUtilities.hideSplashScreen();
+
+ return input(comp,prompt,null);
+ } //}}}
+
+ //{{{ input() method
+ /**
+ * Utility method that can be used to prompt for input in a macro.
+ * @param comp The component to show the dialog on behalf of, this
+ * will usually be a view instance
+ * @param prompt The prompt string
+ * @since jEdit 3.1final
+ */
+ public static String input(Component comp, String prompt, String defaultValue)
+ {
+ GUIUtilities.hideSplashScreen();
+
+ return (String)JOptionPane.showInputDialog(comp,prompt,
+ jEdit.getProperty("macro-input.title"),
+ JOptionPane.QUESTION_MESSAGE,null,null,defaultValue);
+ } //}}}
+
+ //{{{ confirm() method
+ /**
+ * Utility method that can be used to ask for confirmation in a macro.
+ * @param comp The component to show the dialog on behalf of, this
+ * will usually be a view instance
+ * @param prompt The prompt string
+ * @param buttons The buttons to display - for example,
+ * JOptionPane.YES_NO_CANCEL_OPTION
+ * @since jEdit 4.0pre2
+ */
+ public static int confirm(Component comp, String prompt, int buttons)
+ {
+ GUIUtilities.hideSplashScreen();
+
+ return JOptionPane.showConfirmDialog(comp,prompt,
+ jEdit.getProperty("macro-confirm.title"),buttons,
+ JOptionPane.QUESTION_MESSAGE);
+ } //}}}
+
+ //{{{ confirm() method
+ /**
+ * Utility method that can be used to ask for confirmation in a macro.
+ * @param comp The component to show the dialog on behalf of, this
+ * will usually be a view instance
+ * @param prompt The prompt string
+ * @param buttons The buttons to display - for example,
+ * JOptionPane.YES_NO_CANCEL_OPTION
+ * @param type The dialog type - for example,
+ * JOptionPane.WARNING_MESSAGE
+ */
+ public static int confirm(Component comp, String prompt, int buttons, int type)
+ {
+ GUIUtilities.hideSplashScreen();
+
+ return JOptionPane.showConfirmDialog(comp,prompt,
+ jEdit.getProperty("macro-confirm.title"),buttons,type);
+ } //}}}
+
+ //{{{ loadMacros() method
+ /**
+ * Rebuilds the macros list, and sends a MacrosChanged message
+ * (views update their Macros menu upon receiving it)
+ * @since jEdit 2.2pre4
+ */
+ public static void loadMacros()
+ {
+ macroActionSet.removeAllActions();
+ macroHierarchy.removeAllElements();
+ macroHash.clear();
+
+ // since subsequent macros with the same name are ignored,
+ // load user macros first so that they override the system
+ // macros.
+ String settings = jEdit.getSettingsDirectory();
+
+ if(settings != null)
+ {
+ userMacroPath = MiscUtilities.constructPath(
+ settings,"macros");
+ loadMacros(macroHierarchy,"",new File(userMacroPath));
+ }
+
+ if(jEdit.getJEditHome() != null)
+ {
+ systemMacroPath = MiscUtilities.constructPath(
+ jEdit.getJEditHome(),"macros");
+ loadMacros(macroHierarchy,"",new File(systemMacroPath));
+ }
+
+ EditBus.send(new DynamicMenuChanged("macros"));
+ } //}}}
+
+ //{{{ registerHandler() method
+ /**
+ * Adds a macro handler to the handlers list
+ * @since jEdit 4.0pre6
+ */
+ public static void registerHandler(Handler handler)
+ {
+ if (getHandler(handler.getName()) != null)
+ {
+ Log.log(Log.ERROR, Macros.class, "Cannot register more than one macro handler with the same name");
+ return;
+ }
+
+ Log.log(Log.DEBUG,Macros.class,"Registered " + handler.getName()
+ + " macro handler");
+ macroHandlers.add(handler);
+ } //}}}
+
+ //{{{ unregisterHandler() method
+ /**
+ * Removes a macro handler from the handlers list
+ * @since jEdit 4.4.1
+ */
+ public static void unregisterHandler(Handler handler)
+ {
+ if (macroHandlers.remove(handler))
+ {
+ Log.log(Log.DEBUG, Macros.class, "Unregistered " + handler.getName()
+ + " macro handler");
+ }
+ else
+ {
+ Log.log(Log.ERROR, Macros.class, "Cannot unregister " + handler.getName()
+ + " macro handler - it is not registered.");
+ }
+ } //}}}
+
+ //{{{ getHandlers() method
+ /**
+ * Returns an array containing the list of registered macro handlers
+ * @since jEdit 4.0pre6
+ */
+ public static Handler[] getHandlers()
+ {
+ Handler[] handlers = new Handler[macroHandlers.size()];
+ return macroHandlers.toArray(handlers);
+ } //}}}
+
+ //{{{ getHandlerForFileName() method
+ /**
+ * Returns the macro handler suitable for running the specified file
+ * name, or null if there is no suitable handler.
+ * @since jEdit 4.1pre3
+ */
+ public static Handler getHandlerForPathName(String pathName)
+ {
+ for (int i = 0; i < macroHandlers.size(); i++)
+ {
+ Handler handler = macroHandlers.get(i);
+ if (handler.accept(pathName))
+ return handler;
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ getHandler() method
+ /**
+ * Returns the macro handler with the specified name, or null if
+ * there is no registered handler with that name.
+ * @since jEdit 4.0pre6
+ */
+ public static Handler getHandler(String name)
+ {
+ for (int i = 0; i < macroHandlers.size(); i++)
+ {
+ Handler handler = macroHandlers.get(i);
+ if (handler.getName().equals(name))
+ return handler;
+ }
+
+ return null;
+ }
+ //}}}
+
+ //{{{ getMacroHierarchy() method
+ /**
+ * Returns a vector hierarchy with all known macros in it.
+ * Each element of this vector is either a macro name string,
+ * or another vector. If it is a vector, the first element is a
+ * string label, the rest are again, either macro name strings
+ * or vectors.
+ * @since jEdit 2.6pre1
+ */
+ public static Vector getMacroHierarchy()
+ {
+ return macroHierarchy;
+ } //}}}
+
+ //{{{ getMacroActionSet() method
+ /**
+ * Returns an action set with all known macros in it.
+ * @since jEdit 4.0pre1
+ */
+ public static ActionSet getMacroActionSet()
+ {
+ return macroActionSet;
+ } //}}}
+
+ //{{{ getMacro() method
+ /**
+ * Returns the macro with the specified name.
+ * @param macro The macro's name
+ * @since jEdit 2.6pre1
+ */
+ public static Macro getMacro(String macro)
+ {
+ return macroHash.get(macro);
+ } //}}}
+
+ //{{{ getLastMacro() method
+ /**
+ * @since jEdit 4.3pre1
+ */
+ public static Macro getLastMacro()
+ {
+ return lastMacro;
+ } //}}}
+
+ //{{{ setLastMacro() method
+ /**
+ * @since jEdit 4.3pre1
+ */
+ public static void setLastMacro(Macro macro)
+ {
+ lastMacro = macro;
+ } //}}}
+
+ //{{{ Macro class
+ /**
+ * Encapsulates the macro's label, name and path.
+ * @since jEdit 2.2pre4
+ */
+ public static class Macro extends EditAction
+ {
+ //{{{ Macro constructor
+ public Macro(Handler handler, String name, String label, String path)
+ {
+ super(name);
+ this.handler = handler;
+ this.label = label;
+ this.path = path;
+ } //}}}
+
+ //{{{ getHandler() method
+ public Handler getHandler()
+ {
+ return handler;
+ }
+ //}}}
+
+ //{{{ getPath() method
+ public String getPath()
+ {
+ return path;
+ } //}}}
+
+ //{{{ invoke() method
+ @Override
+ public void invoke(View view)
+ {
+ setLastMacro(this);
+
+ if(view == null)
+ handler.runMacro(null,this);
+ else
+ {
+ try
+ {
+ view.getBuffer().beginCompoundEdit();
+ handler.runMacro(view,this);
+ }
+ finally
+ {
+ view.getBuffer().endCompoundEdit();
+ }
+ }
+ } //}}}
+
+ //{{{ getCode() method
+ @Override
+ public String getCode()
+ {
+ return "Macros.getMacro(\"" + getName() + "\").invoke(view);";
+ } //}}}
+
+ //{{{ macroNameToLabel() method
+ public static String macroNameToLabel(String macroName)
+ {
+ int index = macroName.lastIndexOf('/');
+ return macroName.substring(index + 1).replace('_', ' ');
+ }
+ //}}}
+
+ //{{{ Private members
+ private Handler handler;
+ private String path;
+ String label;
+ //}}}
+ } //}}}
+
+ //{{{ recordTemporaryMacro() method
+ /**
+ * Starts recording a temporary macro.
+ * @param view The view
+ * @since jEdit 2.7pre2
+ */
+ public static void recordTemporaryMacro(View view)
+ {
+ String settings = jEdit.getSettingsDirectory();
+
+ if(settings == null)
+ {
+ GUIUtilities.error(view,"no-settings",new String[0]);
+ return;
+ }
+ if(view.getMacroRecorder() != null)
+ {
+ GUIUtilities.error(view,"already-recording",new String[0]);
+ return;
+ }
+
+ Buffer buffer = jEdit.openFile((View)null,settings + File.separator
+ + "macros","Temporary_Macro.bsh",true,null);
+
+ if(buffer == null)
+ return;
+
+ buffer.remove(0,buffer.getLength());
+ buffer.insert(0,jEdit.getProperty("macro.temp.header"));
+
+ recordMacro(view,buffer,true);
+ } //}}}
+
+ //{{{ recordMacro() method
+ /**
+ * Starts recording a macro.
+ * @param view The view
+ * @since jEdit 2.7pre2
+ */
+ public static void recordMacro(View view)
+ {
+ String settings = jEdit.getSettingsDirectory();
+
+ if(settings == null)
+ {
+ GUIUtilities.error(view,"no-settings",new String[0]);
+ return;
+ }
+
+ if(view.getMacroRecorder() != null)
+ {
+ GUIUtilities.error(view,"already-recording",new String[0]);
+ return;
+ }
+
+ String name = GUIUtilities.input(view,"record",null);
+ if(name == null)
+ return;
+
+ name = name.replace(' ','_');
+
+ Buffer buffer = jEdit.openFile((View) null,null,
+ MiscUtilities.constructPath(settings,"macros",
+ name + ".bsh"),true,null);
+
+ if(buffer == null)
+ return;
+
+ buffer.remove(0,buffer.getLength());
+ buffer.insert(0,jEdit.getProperty("macro.header"));
+
+ recordMacro(view,buffer,false);
+ } //}}}
+
+ //{{{ stopRecording() method
+ /**
+ * Stops a recording currently in progress.
+ * @param view The view
+ * @since jEdit 2.7pre2
+ */
+ public static void stopRecording(View view)
+ {
+ Recorder recorder = view.getMacroRecorder();
+
+ if(recorder == null)
+ GUIUtilities.error(view,"macro-not-recording",null);
+ else
+ {
+ view.setMacroRecorder(null);
+ if(!recorder.temporary)
+ view.setBuffer(recorder.buffer);
+ recorder.dispose();
+ }
+ } //}}}
+
+ //{{{ runTemporaryMacro() method
+ /**
+ * Runs the temporary macro.
+ * @param view The view
+ * @since jEdit 2.7pre2
+ */
+ public static void runTemporaryMacro(View view)
+ {
+ String settings = jEdit.getSettingsDirectory();
+
+ if(settings == null)
+ {
+ GUIUtilities.error(view,"no-settings",null);
+ return;
+ }
+
+ String path = MiscUtilities.constructPath(
+ jEdit.getSettingsDirectory(),"macros",
+ "Temporary_Macro.bsh");
+
+ if(jEdit.getBuffer(path) == null)
+ {
+ GUIUtilities.error(view,"no-temp-macro",null);
+ return;
+ }
+
+ Handler handler = getHandler("beanshell");
+ Macro temp = handler.createMacro(path,path);
+
+ Buffer buffer = view.getBuffer();
+
+ try
+ {
+ buffer.beginCompoundEdit();
+ temp.invoke(view);
+ }
+ finally
+ {
+ /* I already wrote a comment expaining this in
+ * Macro.invoke(). */
+ if(buffer.insideCompoundEdit())
+ buffer.endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Static variables
+ private static String systemMacroPath;
+ private static String userMacroPath;
+
+ private static List<Handler> macroHandlers;
+
+ private static ActionSet macroActionSet;
+ private static Vector macroHierarchy;
+ private static Map<String, Macro> macroHash;
+
+ private static Macro lastMacro;
+ //}}}
+
+ //{{{ Class initializer
+ static
+ {
+ macroHandlers = new ArrayList<Handler>();
+ registerHandler(new BeanShellHandler());
+ macroActionSet = new ActionSet(jEdit.getProperty("action-set.macros"));
+ jEdit.addActionSet(macroActionSet);
+ macroHierarchy = new Vector();
+ macroHash = new Hashtable<String, Macro>();
+ } //}}}
+
+ //{{{ loadMacros() method
+ private static void loadMacros(List vector, String path, File directory)
+ {
+ lastMacro = null;
+
+ File[] macroFiles = directory.listFiles();
+ if(macroFiles == null || macroFiles.length == 0)
+ return;
+
+ for(int i = 0; i < macroFiles.length; i++)
+ {
+ File file = macroFiles[i];
+ String fileName = file.getName();
+ if(file.isHidden())
+ {
+ /* do nothing! */
+ }
+ else if(file.isDirectory())
+ {
+ String submenuName = fileName.replace('_',' ');
+ List submenu = null;
+ //{{{ try to merge with an existing menu first
+ for(int j = 0; j < vector.size(); j++)
+ {
+ Object obj = vector.get(j);
+ if(obj instanceof List)
+ {
+ List vec = (List)obj;
+ if(submenuName.equals(vec.get(0)))
+ {
+ submenu = vec;
+ break;
+ }
+ }
+ } //}}}
+ if(submenu == null)
+ {
+ submenu = new Vector();
+ submenu.add(submenuName);
+ vector.add(submenu);
+ }
+
+ loadMacros(submenu,path + fileName + '/',file);
+ }
+ else
+ {
+ addMacro(file,path,vector);
+ }
+ }
+ } //}}}
+
+ //{{{ addMacro() method
+ private static void addMacro(File file, String path, List vector)
+ {
+ String fileName = file.getName();
+ Handler handler = getHandlerForPathName(file.getPath());
+
+ if(handler == null)
+ return;
+
+ try
+ {
+ // in case macro file name has a space in it.
+ // spaces break the view.toolBar property, for instance,
+ // since it uses spaces to delimit action names.
+ String macroName = (path + fileName).replace(' ','_');
+ Macro newMacro = handler.createMacro(macroName,
+ file.getPath());
+ // ignore if already added.
+ // see comment in loadMacros().
+ if(macroHash.get(newMacro.getName()) != null)
+ return;
+
+ vector.add(newMacro.getName());
+ jEdit.setTemporaryProperty(newMacro.getName()
+ + ".label",
+ newMacro.label);
+ jEdit.setTemporaryProperty(newMacro.getName()
+ + ".mouse-over",
+ handler.getLabel() + " - " + file.getPath());
+ macroActionSet.addAction(newMacro);
+ macroHash.put(newMacro.getName(),newMacro);
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, Macros.class, e);
+ macroHandlers.remove(handler);
+ }
+ } //}}}
+
+ //{{{ recordMacro() method
+ /**
+ * Starts recording a macro.
+ * @param view The view
+ * @param buffer The buffer to record to
+ * @param temporary True if this is a temporary macro
+ * @since jEdit 3.0pre5
+ */
+ private static void recordMacro(View view, Buffer buffer, boolean temporary)
+ {
+ view.setMacroRecorder(new Recorder(view,buffer,temporary));
+
+ // setting the message to 'null' causes the status bar to check
+ // if a recording is in progress
+ view.getStatus().setMessage(null);
+ } //}}}
+
+ //}}}
+
+ //{{{ Recorder class
+ /**
+ * Handles macro recording.
+ */
+ public static class Recorder
+ {
+ View view;
+ Buffer buffer;
+ boolean temporary;
+
+ boolean lastWasInput;
+ boolean lastWasOverwrite;
+ int overwriteCount;
+
+ //{{{ Recorder constructor
+ public Recorder(View view, Buffer buffer, boolean temporary)
+ {
+ this.view = view;
+ this.buffer = buffer;
+ this.temporary = temporary;
+ EditBus.addToBus(this);
+ } //}}}
+
+ //{{{ record() method
+ public void record(String code)
+ {
+ if (BeanShell.isScriptRunning())
+ return;
+ flushInput();
+
+ append("\n");
+ append(code);
+ } //}}}
+
+ //{{{ record() method
+ public void record(int repeat, String code)
+ {
+ if(repeat == 1)
+ record(code);
+ else
+ {
+ record("for(int i = 1; i <= " + repeat + "; i++)\n"
+ + "{\n"
+ + code + '\n'
+ + '}');
+ }
+ } //}}}
+
+ //{{{ recordInput() method
+ /**
+ * @since jEdit 4.2pre5
+ */
+ public void recordInput(int repeat, char ch, boolean overwrite)
+ {
+ // record \n and \t on lines specially so that auto indent
+ // can take place
+ if(ch == '\n')
+ record(repeat,"textArea.userInput(\'\\n\');");
+ else if(ch == '\t')
+ record(repeat,"textArea.userInput(\'\\t\');");
+ else
+ {
+ StringBuilder buf = new StringBuilder(repeat);
+ for(int i = 0; i < repeat; i++)
+ buf.append(ch);
+ recordInput(buf.toString(),overwrite);
+ }
+ } //}}}
+
+ //{{{ recordInput() method
+ /**
+ * @since jEdit 4.2pre5
+ */
+ public void recordInput(String str, boolean overwrite)
+ {
+ String charStr = StandardUtilities.charsToEscapes(str);
+
+ if(overwrite)
+ {
+ if(lastWasOverwrite)
+ {
+ overwriteCount++;
+ append(charStr);
+ }
+ else
+ {
+ flushInput();
+ overwriteCount = 1;
+ lastWasOverwrite = true;
+ append("\ntextArea.setSelectedText(\"" + charStr);
+ }
+ }
+ else
+ {
+ if(lastWasInput)
+ append(charStr);
+ else
+ {
+ flushInput();
+ lastWasInput = true;
+ append("\ntextArea.setSelectedText(\"" + charStr);
+ }
+ }
+ } //}}}
+
+ //{{{ handleBufferUpdate() method
+ @EBHandler
+ public void handleBufferUpdate(BufferUpdate bmsg)
+ {
+ if(bmsg.getWhat() == BufferUpdate.CLOSED)
+ {
+ if(bmsg.getBuffer() == buffer)
+ stopRecording(view);
+ }
+ } //}}}
+
+ //{{{ append() method
+ private void append(String str)
+ {
+ buffer.insert(buffer.getLength(),str);
+ } //}}}
+
+ //{{{ dispose() method
+ private void dispose()
+ {
+ flushInput();
+
+ for(int i = 0; i < buffer.getLineCount(); i++)
+ {
+ buffer.indentLine(i,true);
+ }
+
+ EditBus.removeFromBus(this);
+
+ // setting the message to 'null' causes the status bar to
+ // check if a recording is in progress
+ view.getStatus().setMessage(null);
+ } //}}}
+
+ //{{{ flushInput() method
+ /**
+ * We try to merge consecutive inputs. This helper method is
+ * called when something other than input is to be recorded.
+ */
+ private void flushInput()
+ {
+ if(lastWasInput)
+ {
+ lastWasInput = false;
+ append("\");");
+ }
+
+ if(lastWasOverwrite)
+ {
+ lastWasOverwrite = false;
+ append("\");\n");
+ append("offset = buffer.getLineEndOffset("
+ + "textArea.getCaretLine()) - 1;\n");
+ append("buffer.remove(textArea.getCaretPosition(),"
+ + "Math.min(" + overwriteCount
+ + ",offset - "
+ + "textArea.getCaretPosition()));");
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ Handler class
+ /**
+ * Encapsulates creating and invoking macros in arbitrary scripting languages
+ * @since jEdit 4.0pre6
+ */
+ public abstract static class Handler
+ {
+ //{{{ getName() method
+ public String getName()
+ {
+ return name;
+ } //}}}
+
+ //{{{ getLabel() method
+ public String getLabel()
+ {
+ return label;
+ } //}}}
+
+ //{{{ accept() method
+ public boolean accept(String path)
+ {
+ return filter.matcher(MiscUtilities.getFileName(path)).matches();
+ } //}}}
+
+ //{{{ createMacro() method
+ public abstract Macro createMacro(String macroName, String path);
+ //}}}
+
+ //{{{ runMacro() method
+ /**
+ * Runs the specified macro.
+ * @param view The view - may be null.
+ * @param macro The macro.
+ */
+ public abstract void runMacro(View view, Macro macro);
+ //}}}
+
+ //{{{ runMacro() method
+ /**
+ * Runs the specified macro. This method is optional; it is
+ * called if the specified macro is a startup script. The
+ * default behavior is to simply call {@link #runMacro(View,Macros.Macro)}.
+ *
+ * @param view The view - may be null.
+ * @param macro The macro.
+ * @param ownNamespace A hint indicating whenever functions and
+ * variables defined in the script are to be self-contained, or
+ * made available to other scripts. The macro handler may ignore
+ * this parameter.
+ * @since jEdit 4.1pre3
+ */
+ public void runMacro(View view, Macro macro, boolean ownNamespace)
+ {
+ runMacro(view,macro);
+ } //}}}
+
+ //{{{ Handler constructor
+ protected Handler(String name)
+ {
+ this.name = name;
+ label = jEdit.getProperty("macro-handler."
+ + name + ".label", name);
+ try
+ {
+ filter = Pattern.compile(StandardUtilities.globToRE(
+ jEdit.getProperty(
+ "macro-handler." + name + ".glob")));
+ }
+ catch (Exception e)
+ {
+ throw new InternalError("Missing or invalid glob for handler " + name);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private String name;
+ private String label;
+ private Pattern filter;
+ //}}}
+ } //}}}
+
+ //{{{ BeanShellHandler class
+ private static class BeanShellHandler extends Handler
+ {
+ //{{{ BeanShellHandler constructor
+ BeanShellHandler()
+ {
+ super("beanshell");
+ } //}}}
+
+ //{{{ createMacro() method
+ @Override
+ public Macro createMacro(String macroName, String path)
+ {
+ // Remove '.bsh'
+ macroName = macroName.substring(0, macroName.length() - 4);
+
+ return new Macro(this, macroName,
+ Macro.macroNameToLabel(macroName), path);
+ } //}}}
+
+ //{{{ runMacro() method
+ @Override
+ public void runMacro(View view, Macro macro)
+ {
+ BeanShell.runScript(view,macro.getPath(),null,true);
+ } //}}}
+
+ //{{{ runMacro() method
+ @Override
+ public void runMacro(View view, Macro macro, boolean ownNamespace)
+ {
+ BeanShell.runScript(view,macro.getPath(),null,ownNamespace);
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/Marker.java b/jEdit/org/gjt/sp/jedit/Marker.java
index b1a34f6..8e8508b 100644
--- a/jEdit/org/gjt/sp/jedit/Marker.java
+++ b/jEdit/org/gjt/sp/jedit/Marker.java
@@ -1,119 +1,119 @@
-/*
- * Marker.java - Named location in a buffer
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 1999, 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import javax.swing.text.Position;
-
-/**
- * Buffers may contain one or more <i>markers</i> which serve
- * as textual bookmarks.<p>
- *
- * A <code>Marker</code> has three key attributes: the
- * <code>Buffer</code> to which it relates, the line number to which
- * the marker refers, and an optional shortcut character. The shortcut
- * identifies the the key that can be pressed with the
- * <b>Markers</b>><b>Go To Marker</b> command.
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: Marker.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class Marker
-{
- //{{{ getShortcut() method
- /**
- * Returns the marker's shortcut character.
- * @since jEdit 3.2pre1
- */
- public char getShortcut()
- {
- return shortcut;
- } //}}}
-
- //{{{ getPosition() method
- /**
- * Returns the position of this marker.
- * @since jEdit 3.2pre1
- */
- public int getPosition()
- {
- return (position == null ? pos : position.getOffset());
- } //}}}
-
- //{{{ Package-private members
-
- //{{{ Marker constructor
- Marker(Buffer buffer, char shortcut, int position)
- {
- this.buffer = buffer;
- this.shortcut = shortcut;
- this.pos = position;
- } //}}}
-
- //{{{ setShortcut() method
- /**
- * Sets the marker's shortcut.
- * @param shortcut The new shortcut
- * @since jEdit 3.2pre1
- */
- void setShortcut(char shortcut)
- {
- this.shortcut = shortcut;
- } //}}}
-
- //{{{ createPosition() method
- void createPosition()
- {
- position = buffer.createPosition(pos);
- } //}}}
-
- //{{{ removePosition() method
- void removePosition()
- {
- // forget the cached Position instance
- if(position != null)
- {
- pos = position.getOffset();
- position = null;
- }
- } //}}}
-
- //{{{ setPosition() method
- /**
- * Sets the position of this marker.
- * @since jEdit 4.0pre5
- */
- void setPosition(int pos)
- {
- this.pos = pos;
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private Buffer buffer;
- private char shortcut;
- private int pos;
- private Position position;
- //}}}
-}
+/*
+ * Marker.java - Named location in a buffer
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 1999, 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import javax.swing.text.Position;
+
+/**
+ * Buffers may contain one or more <i>markers</i> which serve
+ * as textual bookmarks.<p>
+ *
+ * A <code>Marker</code> has three key attributes: the
+ * <code>Buffer</code> to which it relates, the line number to which
+ * the marker refers, and an optional shortcut character. The shortcut
+ * identifies the the key that can be pressed with the
+ * <b>Markers</b>><b>Go To Marker</b> command.
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: Marker.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class Marker
+{
+ //{{{ getShortcut() method
+ /**
+ * Returns the marker's shortcut character.
+ * @since jEdit 3.2pre1
+ */
+ public char getShortcut()
+ {
+ return shortcut;
+ } //}}}
+
+ //{{{ getPosition() method
+ /**
+ * Returns the position of this marker.
+ * @since jEdit 3.2pre1
+ */
+ public int getPosition()
+ {
+ return (position == null ? pos : position.getOffset());
+ } //}}}
+
+ //{{{ Package-private members
+
+ //{{{ Marker constructor
+ Marker(Buffer buffer, char shortcut, int position)
+ {
+ this.buffer = buffer;
+ this.shortcut = shortcut;
+ this.pos = position;
+ } //}}}
+
+ //{{{ setShortcut() method
+ /**
+ * Sets the marker's shortcut.
+ * @param shortcut The new shortcut
+ * @since jEdit 3.2pre1
+ */
+ void setShortcut(char shortcut)
+ {
+ this.shortcut = shortcut;
+ } //}}}
+
+ //{{{ createPosition() method
+ void createPosition()
+ {
+ position = buffer.createPosition(pos);
+ } //}}}
+
+ //{{{ removePosition() method
+ void removePosition()
+ {
+ // forget the cached Position instance
+ if(position != null)
+ {
+ pos = position.getOffset();
+ position = null;
+ }
+ } //}}}
+
+ //{{{ setPosition() method
+ /**
+ * Sets the position of this marker.
+ * @since jEdit 4.0pre5
+ */
+ void setPosition(int pos)
+ {
+ this.pos = pos;
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private Buffer buffer;
+ private char shortcut;
+ private int pos;
+ private Position position;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/MiscUtilities.java b/jEdit/org/gjt/sp/jedit/MiscUtilities.java
index 47517de..63518d4 100644
--- a/jEdit/org/gjt/sp/jedit/MiscUtilities.java
+++ b/jEdit/org/gjt/sp/jedit/MiscUtilities.java
@@ -1,1871 +1,1860 @@
-/*
- * MiscUtilities.java - Various miscallaneous utility functions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2005 Slava Pestov
- * Portions copyright (C) 2000 Richard S. Hall
- * Portions copyright (C) 2001 Dirk Moebius
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import javax.swing.text.Segment;
-import javax.swing.JMenuItem;
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.nio.charset.MalformedInputException;
-import java.text.DecimalFormat;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.ProgressObserver;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.util.IOUtilities;
-
-import org.gjt.sp.util.XMLUtilities;
-import org.gjt.sp.jedit.menu.MenuItemTextComparator;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-//}}}
-
-/**
- * Path name manipulation, string manipulation, and more.<p>
- *
- * The most frequently used members of this class are:<p>
- *
- * <b>Some path name methods:</b><p>
- * <ul>
- * <li>{@link #getFileName(String)}</li>
- * <li>{@link #getParentOfPath(String)}</li>
- * <li>{@link #constructPath(String,String)}</li>
- * </ul>
- * <b>String comparison:</b><p>
-
- * A {@link #compareStrings(String,String,boolean)} method that unlike
- * <function>String.compareTo()</function>, correctly recognizes and handles
- * embedded numbers.<p>
- *
- * This class also defines several inner classes for use with the
- * sorting features of the Java collections API:
- *
- * <ul>
- * <li>{@link MiscUtilities.StringICaseCompare}</li>
- * <li>{@link MiscUtilities.MenuItemCompare}</li>
- * </ul>
- *
- * For example, you might call:<p>
- *
- * <code>Arrays.sort(myListOfStrings,
- * new MiscUtilities.StringICaseCompare());</code>
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: MiscUtilities.java 16559 2009-11-28 18:40:50Z ezust $
- */
-public class MiscUtilities
-{
- /**
- * This encoding is not supported by Java, yet it is useful.
- * A UTF-8 file that begins with 0xEFBBBF.
- * @deprecated
- * Extended encodings are now supported as services.
- * This value is no longer used.
- */
- @Deprecated public static final String UTF_8_Y = "UTF-8Y";
-
- //{{{ Path name methods
-
- //{{{ canonPath() method
- /**
- * @return the canonical form of the specified path name. Currently
- * only expands a leading <code>~</code>. <b>For local path names
- * only.</b>
- * @param path The path name
- * @since jEdit 4.0pre2
- */
- public static String canonPath(String path)
- {
- if(path.length() == 0)
- return path;
-
- if(path.startsWith("file://"))
- path = path.substring("file://".length());
- else if(path.startsWith("file:"))
- path = path.substring("file:".length());
- else if(isURL(path))
- return path;
-
- if(File.separatorChar == '\\')
- {
- // get rid of mixed paths on Windows
- path = path.replace('/','\\');
- // also get rid of trailing spaces on Windows
- int trim = path.length();
- while(path.charAt(trim - 1) == ' ')
- trim--;
-
- if (path.charAt(trim - 1) == '\\')
- while (trim > 1 && path.charAt(trim - 2) == '\\')
- {
- trim--;
- }
- path = path.substring(0,trim);
- }
- else if(OperatingSystem.isMacOS())
- {
- // do the same on OS X
- path = path.replace(':','/');
- }
-
- if(path.startsWith('~' + File.separator))
- {
- path = path.substring(2);
- String home = System.getProperty("user.home");
-
- if(home.endsWith(File.separator))
- return home + path;
- else
- return home + File.separator + path;
- }
- else if("~".equals(path))
- return System.getProperty("user.home");
- else if ("-".equals(path))
- return getParentOfPath(jEdit.getActiveView().getBuffer().getPath());
- else
- return path;
- } //}}}
-
- //{{{ expandVariables() method
- static final String varPatternString = "(\\$([a-zA-Z0-9_]+))";
- static final String varPatternString2 = "(\\$\\{([^}]+)\\})";
- static final Pattern varPattern = Pattern.compile(varPatternString);
- static final Pattern varPattern2 = Pattern.compile(varPatternString2);
-
- /** Accepts a string from the user which may contain variables of various syntaxes.
- * The goal is to support the following:
- * $varname
- * ${varname}
- * And expand each of these by looking at the system environment variables for possible
- * expansions.
- * @return a string which is either the unchanged input string, or one with expanded variables.
- * @since 4.3pre7
- * @author ezust
- */
- public static String expandVariables(String arg)
- {
- Pattern p = varPattern;
- Matcher m = p.matcher(arg);
- if (!m.find())
- {
- p = varPattern2;
- m = p.matcher(arg);
- if (!m.find()) // no variables to substitute
- return arg;
- }
- String varName = m.group(2);
- String expansion = System.getenv(varName);
- if (expansion == null)
- { // try everything uppercase?
- varName = varName.toUpperCase();
- String uparg = arg.toUpperCase();
- m = p.matcher(uparg);
- expansion = System.getenv(varName);
- }
- if (expansion != null)
- {
- expansion = expansion.replace("\\", "\\\\");
- return m.replaceFirst(expansion);
- }
- return arg;
- } //}}}
-
- //{{{ abbreviate() method
- /** returns an abbreviated path, replacing
- * values with variables, if a prefix exists.
- * @since jEdit 4.3pre16
- */
- public static String abbreviate(String path)
- {
- if (svc == null)
- svc = new VarCompressor();
- return svc.compress(path);
- } //}}}
-
- //{{{ resolveSymlinks() method
- /**
- * Resolves any symbolic links in the path name specified
- * using <code>File.getCanonicalPath()</code>. <b>For local path
- * names only.</b>
- * @since jEdit 4.2pre1
- */
- public static String resolveSymlinks(String path)
- {
- if(isURL(path))
- return path;
-
- // 2 aug 2003: OS/2 Java has a broken getCanonicalPath()
- if(OperatingSystem.isOS2())
- return path;
- // 18 nov 2003: calling this on a drive letter on Windows causes
- // drive access
- if(OperatingSystem.isDOSDerived())
- {
- if(path.length() == 2 || path.length() == 3)
- {
- if(path.charAt(1) == ':')
- return path;
- }
- }
- try
- {
- return new File(path).getCanonicalPath();
- }
- catch(IOException io)
- {
- return path;
- }
- } //}}}
-
- //{{{ isAbsolutePath() method
- /**
- * Returns if the specified path name is an absolute path or URL.
- * @since jEdit 4.1pre11
- */
- public static boolean isAbsolutePath(String path)
- {
- if(isURL(path))
- return true;
- else if(path.startsWith("~/") || path.startsWith('~' + File.separator) || "~".equals(path))
- return true;
- else if ("-".equals(path))
- return true;
- else if(OperatingSystem.isDOSDerived())
- {
- if(path.length() == 2 && path.charAt(1) == ':')
- return true;
- if(path.length() > 2 && path.charAt(1) == ':'
- && (path.charAt(2) == '\\'
- || path.charAt(2) == '/'))
- return true;
- if(path.startsWith("\\\\")
- || path.startsWith("//"))
- return true;
- }
- // not sure if this is correct for OpenVMS.
- else if(OperatingSystem.isUnix()
- || OperatingSystem.isVMS())
- {
- // nice and simple
- if(path.length() > 0 && path.charAt(0) == '/')
- return true;
- }
-
- return false;
- } //}}}
-
- //{{{ constructPath() methods
- /**
- * Constructs an absolute path name from a directory and another
- * path name. This method is VFS-aware.
- * @param parent The directory
- * @param path The path name
- */
- public static String constructPath(String parent, String path)
- {
- if(isAbsolutePath(path))
- return canonPath(path);
-
- if (parent == null)
- parent = System.getProperty("user.dir");
-
- if (path == null || path.length() == 0)
- return parent;
-
- // have to handle this case specially on windows.
- // insert \ between, eg A: and myfile.txt.
- if(OperatingSystem.isDOSDerived())
- {
- if(path.length() == 2 && path.charAt(1) == ':')
- return path;
- else if(path.length() > 2 && path.charAt(1) == ':'
- && path.charAt(2) != '\\')
- {
- path = path.substring(0,2) + '\\'
- + path.substring(2);
- return canonPath(path);
- }
- }
-
- String dd = ".." + File.separator;
- String d = '.' + File.separator;
-
- for(;;)
- {
- if(".".equals(path))
- return parent;
- else if("..".equals(path))
- return getParentOfPath(parent);
- else if(path.startsWith(dd) || path.startsWith("../"))
- {
- parent = getParentOfPath(parent);
- path = path.substring(3);
- }
- else if(path.startsWith(d) || path.startsWith("./"))
- path = path.substring(2);
- else
- break;
- }
- if(path.length() == 0)
- return parent;
-
- if(OperatingSystem.isDOSDerived()
- && !isURL(parent)
- && path.charAt(0) == '\\')
- parent = parent.substring(0,2);
-
- VFS vfs = VFSManager.getVFSForPath(parent);
-
- return canonPath(vfs.constructPath(parent,path));
- }
-
- /**
- * Constructs an absolute path name from three path components.
- * This method is VFS-aware.
- * @param parent The parent directory
- * @param path1 The first path
- * @param path2 The second path
- */
- public static String constructPath(String parent,
- String path1, String path2)
- {
- return constructPath(constructPath(parent,path1),path2);
- } //}}}
-
- //{{{ concatPath() method
- /**
- * Like {@link #constructPath}, except <code>path</code> will be
- * appended to <code>parent</code> even if it is absolute.
- * <b>For local path names only.</b>.
- *
- * @param parent the parent path
- * @param path the path to append to the parent
- */
- public static String concatPath(String parent, String path)
- {
- parent = canonPath(parent);
- path = canonPath(path);
-
- // Make all child paths relative.
- if (path.startsWith(File.separator))
- path = path.substring(1);
- else if (path.length() >= 3 && path.charAt(1) == ':')
- path = path.replace(':', File.separatorChar);
-
- if (parent == null)
- parent = System.getProperty("user.dir");
-
- if (parent.endsWith(File.separator))
- return parent + path;
- else
- return parent + File.separator + path;
- } //}}}
-
- //{{{ getFirstSeparatorIndex() method
- /**
- * Return the first index of either / or the OS-specific file
- * separator.
- * @param path The path
- * @since jEdit 4.3pre3
- */
- public static int getFirstSeparatorIndex(String path)
- {
- int start = getPathStart(path);
- int index = path.indexOf('/',start);
- if(index == -1)
- index = path.indexOf(File.separatorChar,start);
- return index;
- } //}}}
-
- //{{{ getLastSeparatorIndex() method
- /**
- * Return the last index of either / or the OS-specific file
- * separator.
- * @param path The path
- * @since jEdit 4.3pre3
- */
- public static int getLastSeparatorIndex(String path)
- {
- int start = getPathStart(path);
- if(start != 0)
- path = path.substring(start);
- int index = Math.max(
- path.lastIndexOf('/'), path.lastIndexOf(File.separatorChar));
- if(index == -1)
- return index;
- else
- return index + start;
- } //}}}
-
-
- //{{{ getFileExtension() method
- /**
- * Returns the extension of the specified filename, or an empty
- * string if there is none.
- * @param path The path
- */
- public static String getFileExtension(String path)
- {
- int fsIndex = getLastSeparatorIndex(path);
- int index = path.lastIndexOf('.');
- // there could be a dot in the path and no file extension
- if(index == -1 || index < fsIndex )
- return "";
- else
- return path.substring(index);
- } //}}}
-
- //{{{ getFileName() method
- /**
- * Returns the last component of the specified path.
- * This method is VFS-aware.
- * @param path The path name
- */
- public static String getFileName(String path)
- {
- return VFSManager.getVFSForPath(path).getFileName(path);
- } //}}}
-
- //{{{ getFileNameNoExtension() method
- /**
- * Returns the last component of the specified path name without the
- * trailing extension (if there is one).
- * @param path The path name
- * @since jEdit 4.0pre8
- */
- public static String getFileNameNoExtension(String path)
- {
- String name = getFileName(path);
- int index = name.indexOf('.');
- if(index == -1)
- return name;
- else
- return name.substring(0,index);
- } //}}}
-
- //{{{ getFileParent() method
- /**
- * @deprecated Call getParentOfPath() instead
- */
- @Deprecated
- public static String getFileParent(String path)
- {
- return getParentOfPath(path);
- } //}}}
-
- //{{{ getParentOfPath() method
- /**
- * Returns the parent of the specified path. This method is VFS-aware.
- * @param path The path name
- * @since jEdit 2.6pre5
- */
- public static String getParentOfPath(String path)
- {
- return VFSManager.getVFSForPath(path).getParentOfPath(path);
- } //}}}
-
- //{{{ getFileProtocol() method
- /**
- * @deprecated Call getProtocolOfURL() instead
- */
- @Deprecated
- public static String getFileProtocol(String url)
- {
- return getProtocolOfURL(url);
- } //}}}
-
- //{{{ getProtocolOfURL() method
- /**
- * Returns the protocol specified by a URL.
- * @param url The URL
- * @since jEdit 2.6pre5
- */
- public static String getProtocolOfURL(String url)
- {
- return url.substring(0,url.indexOf(':'));
- } //}}}
-
- //{{{ isURL() method
- /**
- * Checks if the specified string is a URL.
- * @param str The string to check
- * @return True if the string is a URL, false otherwise
- */
- public static boolean isURL(String str)
- {
- int fsIndex = getLastSeparatorIndex(str);
- if(fsIndex == 0) // /etc/passwd
- return false;
- else if(fsIndex == 2) // C:\AUTOEXEC.BAT
- return false;
-
- int cIndex = str.indexOf(':');
- if(cIndex <= 1) // D:\WINDOWS, or doesn't contain : at all
- return false;
-
- String protocol = str.substring(0,cIndex);
- VFS vfs = VFSManager.getVFSForProtocol(protocol);
- if(vfs != null && !(vfs instanceof UrlVFS))
- return true;
-
- try
- {
- new URL(str);
- return true;
- }
- catch(MalformedURLException mf)
- {
- return false;
- }
- } //}}}
-
- //{{{ saveBackup() methods
- /**
- * Saves a backup (optionally numbered) of a file.
- * @param file A local file
- * @param backups The number of backups. Must be >= 1. If > 1, backup
- * files will be numbered.
- * @param backupPrefix The backup file name prefix
- * @param backupSuffix The backup file name suffix
- * @param backupDirectory The directory where to save backups; if null,
- * they will be saved in the same directory as the file itself.
- * @since jEdit 4.0pre1
- */
- public static void saveBackup(File file, int backups,
- String backupPrefix, String backupSuffix,
- String backupDirectory)
- {
- saveBackup(file,backups,backupPrefix,backupSuffix,backupDirectory,0);
- }
-
- /**
- * Saves a backup (optionally numbered) of a file.
- * @param file A local file
- * @param backups The number of backups. Must be >= 1. If > 1, backup
- * files will be numbered.
- * @param backupPrefix The backup file name prefix
- * @param backupSuffix The backup file name suffix
- * @param backupDirectory The directory where to save backups; if null,
- * they will be saved in the same directory as the file itself.
- * @param backupTimeDistance The minimum time in minutes when a backup
- * version 1 shall be moved into version 2; if 0, backups are always
- * moved.
- * @since jEdit 4.2pre5
- */
- public static void saveBackup(File file, int backups,
- String backupPrefix, String backupSuffix,
- String backupDirectory, int backupTimeDistance)
- {
- if(backupPrefix == null)
- backupPrefix = "";
- if(backupSuffix == null)
- backupSuffix = "";
-
- String name = file.getName();
-
- // If backups is 1, create ~ file
- if(backups == 1)
- {
- File backupFile = new File(backupDirectory,
- backupPrefix + name + backupSuffix);
- long modTime = backupFile.lastModified();
- /* if backup file was created less than
- * 'backupTimeDistance' ago, we do not
- * create the backup */
- if(System.currentTimeMillis() - modTime
- >= backupTimeDistance)
- {
- Log.log(Log.DEBUG,MiscUtilities.class,
- "Saving backup of file \"" +
- file.getAbsolutePath() + "\" to \"" +
- backupFile.getAbsolutePath() + '"');
- backupFile.delete();
- if (!file.renameTo(backupFile))
- IOUtilities.moveFile(file, backupFile);
- }
- }
- // If backups > 1, move old ~n~ files, create ~1~ file
- else
- {
- /* delete a backup created using above method */
- new File(backupDirectory,
- backupPrefix + name + backupSuffix
- + backups + backupSuffix).delete();
-
- File firstBackup = new File(backupDirectory,
- backupPrefix + name + backupSuffix
- + '1' + backupSuffix);
- long modTime = firstBackup.lastModified();
- /* if backup file was created less than
- * 'backupTimeDistance' ago, we do not
- * create the backup */
- if(System.currentTimeMillis() - modTime
- >= backupTimeDistance)
- {
- for(int i = backups - 1; i > 0; i--)
- {
- File backup = new File(backupDirectory,
- backupPrefix + name
- + backupSuffix + i
- + backupSuffix);
-
- backup.renameTo(new File(backupDirectory,
- backupPrefix + name
- + backupSuffix + (i + 1)
- + backupSuffix));
- }
-
- File backupFile = new File(backupDirectory,
- backupPrefix + name + backupSuffix
- + '1' + backupSuffix);
- Log.log(Log.DEBUG,MiscUtilities.class,
- "Saving backup of file \"" +
- file.getAbsolutePath() + "\" to \"" +
- backupFile.getAbsolutePath() + '"');
- if (!file.renameTo(backupFile))
- IOUtilities.moveFile(file, backupFile);
- }
- }
- } //}}}
-
- //{{{ moveFile() method
- /**
- * Moves the source file to the destination.
- *
- * If the destination cannot be created or is a read-only file, the
- * method returns <code>false</code>. Otherwise, the contents of the
- * source are copied to the destination, the source is deleted,
- * and <code>true</code> is returned.
- *
- * @param source The source file to move.
- * @param dest The destination where to move the file.
- * @return true on success, false otherwise.
- *
- * @since jEdit 4.3pre1
- * @deprecated use {@link org.gjt.sp.util.IOUtilities#moveFile(java.io.File, java.io.File)}
- */
- @Deprecated
- public static boolean moveFile(File source, File dest)
- {
- return IOUtilities.moveFile(source, dest);
- } //}}}
-
- //{{{ copyStream() methods
- /**
- * Copy an input stream to an output stream.
- *
- * @param bufferSize the size of the buffer
- * @param progress the progress observer it could be null
- * @param in the input stream
- * @param out the output stream
- * @param canStop if true, the copy can be stopped by interrupting the thread
- * @return <code>true</code> if the copy was done, <code>false</code> if it was interrupted
- * @throws IOException IOException If an I/O error occurs
- * @since jEdit 4.3pre3
- * @deprecated use {@link IOUtilities#copyStream(int, org.gjt.sp.util.ProgressObserver, java.io.InputStream, java.io.OutputStream, boolean)}
- */
- @Deprecated
- public static boolean copyStream(int bufferSize, ProgressObserver progress,
- InputStream in, OutputStream out, boolean canStop)
- throws IOException
- {
- return IOUtilities.copyStream(bufferSize, progress, in, out, canStop);
- }
-
- /**
- * Copy an input stream to an output stream with a buffer of 4096 bytes.
- *
- * @param progress the progress observer it could be null
- * @param in the input stream
- * @param out the output stream
- * @param canStop if true, the copy can be stopped by interrupting the thread
- * @return <code>true</code> if the copy was done, <code>false</code> if it was interrupted
- * @throws IOException IOException If an I/O error occurs
- * @since jEdit 4.3pre3
- * @deprecated use {@link IOUtilities#copyStream(org.gjt.sp.util.ProgressObserver, java.io.InputStream, java.io.OutputStream, boolean)}
- */
- @Deprecated
- public static boolean copyStream(ProgressObserver progress, InputStream in, OutputStream out, boolean canStop)
- throws IOException
- {
- return IOUtilities.copyStream(4096,progress, in, out, canStop);
- } //}}}
-
- //{{{ isBinary() methods
- /**
- * Check if a Reader is binary.
- * @deprecated
- * Use isBinary(InputStream) instead.
- */
- @Deprecated
- public static boolean isBinary(Reader reader) throws IOException
- {
- return containsNullCharacter(reader);
- }
-
- /**
- * Check if an InputStream is binary.
- * First this tries encoding auto detection. If an encoding is
- * detected, the stream should be a text stream. Otherwise, this
- * will check the first characters 100
- * (jEdit property vfs.binaryCheck.length) in the system default
- * encoding. If more than 1 (jEdit property vfs.binaryCheck.count)
- * NUL(\u0000) was found, the stream is declared binary.
- *
- * This is not 100% because sometimes the autodetection could fail.
- *
- * This method will not close the stream. You have to do it yourself
- *
- * @param in the stream
- * @return <code>true</code> if the stream was detected as binary
- * @throws IOException IOException If an I/O error occurs
- * @since jEdit 4.3pre10
- */
- public static boolean isBinary(InputStream in) throws IOException
- {
- AutoDetection.Result detection = new AutoDetection.Result(in);
- // If an encoding is detected, this is a text stream
- if (detection.getDetectedEncoding() != null)
- {
- return false;
- }
- // Read the stream in system default encoding. The encoding
- // might be wrong. But enough for binary detection.
- try
- {
- return containsNullCharacter(
- new InputStreamReader(detection.getRewindedStream()));
- }
- catch (MalformedInputException mie)
- {
- // This error probably means the input is binary.
- return true;
- }
- } //}}}
-
- //{{{ isBackup() method
- /**
- * Check if the filename is a backup file.
- * @param filename the filename to check
- * @return true if this is a backup file.
- * @since jEdit 4.3pre5
- */
- public static boolean isBackup(String filename)
- {
- if (filename.startsWith("#")) return true;
- if (filename.endsWith("~")) return true;
- if (filename.endsWith(".bak")) return true;
- return false;
- } //}}}
-
-
- //{{{ autodetect() method
- /**
- * Tries to detect if the stream is gzipped, and if it has an encoding
- * specified with an XML PI.
- *
- * @param in the input stream reader that must be autodetected
- * @param buffer a buffer. It can be null if you only want to autodetect the encoding of a file
- * @return a Reader using the detected encoding
- * @throws IOException io exception during read
- * @since jEdit 4.3pre5
- */
- public static Reader autodetect(InputStream in, Buffer buffer) throws IOException
- {
- String encoding;
- if (buffer == null)
- encoding = System.getProperty("file.encoding");
- else
- encoding = buffer.getStringProperty(JEditBuffer.ENCODING);
- boolean gzipped = false;
-
- if (buffer == null || buffer.getBooleanProperty(Buffer.ENCODING_AUTODETECT))
- {
- AutoDetection.Result detection = new AutoDetection.Result(in);
- gzipped = detection.streamIsGzipped();
- if (gzipped)
- {
- Log.log(Log.DEBUG, MiscUtilities.class
- , "Stream is Gzipped");
- }
- String detected = detection.getDetectedEncoding();
- if (detected != null)
- {
- encoding = detected;
- Log.log(Log.DEBUG, MiscUtilities.class
- , "Stream encoding detected is " + detected);
- }
- in = detection.getRewindedStream();
- }
- else
- {
- // Make the stream buffered in the same way.
- in = AutoDetection.getMarkedStream(in);
- }
-
- Reader result = EncodingServer.getTextReader(in, encoding);
- if (buffer != null)
- {
- // Store the successful properties.
- if (gzipped)
- {
- buffer.setBooleanProperty(Buffer.GZIPPED,true);
- }
- buffer.setProperty(JEditBuffer.ENCODING, encoding);
- }
- return result;
- } //}}}
-
- //{{{ closeQuietly() method
- /**
- * Method that will close an {@link InputStream} ignoring it if it is null and ignoring exceptions.
- *
- * @param in the InputStream to close.
- * @since jEdit 4.3pre3
- * @deprecated use {@link IOUtilities#closeQuietly(java.io.InputStream)}
- */
- @Deprecated
- public static void closeQuietly(InputStream in)
- {
- IOUtilities.closeQuietly(in);
- } //}}}
-
- //{{{ copyStream() method
- /**
- * Method that will close an {@link OutputStream} ignoring it if it is null and ignoring exceptions.
- *
- * @param out the OutputStream to close.
- * @since jEdit 4.3pre3
- * @deprecated use {@link IOUtilities#closeQuietly(java.io.OutputStream)}
- */
- @Deprecated
- public static void closeQuietly(OutputStream out)
- {
- IOUtilities.closeQuietly(out);
- } //}}}
-
- //{{{ fileToClass() method
- /**
- * Converts a file name to a class name. All slash characters are
- * replaced with periods and the trailing '.class' is removed.
- * @param name The file name
- */
- public static String fileToClass(String name)
- {
- char[] clsName = name.toCharArray();
- for(int i = clsName.length - 6; i >= 0; i--)
- if(clsName[i] == '/')
- clsName[i] = '.';
- return new String(clsName,0,clsName.length - 6);
- } //}}}
-
- //{{{ classToFile() method
- /**
- * Converts a class name to a file name. All periods are replaced
- * with slashes and the '.class' extension is added.
- * @param name The class name
- */
- public static String classToFile(String name)
- {
- return name.replace('.','/').concat(".class");
- } //}}}
-
- //{{{ pathsEqual() method
- /**
- * @param p1 A path name
- * @param p2 A path name
- * @return True if both paths are equal, ignoring trailing slashes, as
- * well as case insensitivity on Windows.
- * @since jEdit 4.3pre2
- */
- public static boolean pathsEqual(String p1, String p2)
- {
- VFS v1 = VFSManager.getVFSForPath(p1);
- VFS v2 = VFSManager.getVFSForPath(p2);
-
- if(v1 != v2)
- return false;
-
- if(p1.endsWith("/") || p1.endsWith(File.separator))
- p1 = p1.substring(0,p1.length() - 1);
-
- if(p2.endsWith("/") || p2.endsWith(File.separator))
- p2 = p2.substring(0,p2.length() - 1);
-
- if((v1.getCapabilities() & VFS.CASE_INSENSITIVE_CAP) != 0)
- return p1.equalsIgnoreCase(p2);
- else
- return p1.equals(p2);
- } //}}}
-
- //}}}
-
- //{{{ Text methods
-
- //{{{ getLeadingWhiteSpace() method
- /**
- * Returns the number of leading white space characters in the
- * specified string.
- * @param str The string
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getLeadingWhiteSpace(String)}
- */
- @Deprecated
- public static int getLeadingWhiteSpace(String str)
- {
- return StandardUtilities.getLeadingWhiteSpace(str);
- } //}}}
-
- //{{{ getTrailingWhiteSpace() method
- /**
- * Returns the number of trailing whitespace characters in the
- * specified string.
- * @param str The string
- * @since jEdit 2.5pre5
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getTrailingWhiteSpace(String)}
- */
- @Deprecated
- public static int getTrailingWhiteSpace(String str)
- {
- return StandardUtilities.getTrailingWhiteSpace(str);
- } //}}}
-
- //{{{ getLeadingWhiteSpaceWidth() method
- /**
- * Returns the width of the leading white space in the specified
- * string.
- * @param str The string
- * @param tabSize The tab size
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getLeadingWhiteSpace(String)}
- */
- @Deprecated
- public static int getLeadingWhiteSpaceWidth(String str, int tabSize)
- {
- return StandardUtilities.getLeadingWhiteSpaceWidth(str, tabSize);
- } //}}}
-
- //{{{ getVirtualWidth() method
- /**
- * Returns the virtual column number (taking tabs into account) of the
- * specified offset in the segment.
- *
- * @param seg The segment
- * @param tabSize The tab size
- * @since jEdit 4.1pre1
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getVirtualWidth(javax.swing.text.Segment, int)}
- */
- @Deprecated
- public static int getVirtualWidth(Segment seg, int tabSize)
- {
- return StandardUtilities.getVirtualWidth(seg, tabSize);
- } //}}}
-
- //{{{ getOffsetOfVirtualColumn() method
- /**
- * Returns the array offset of a virtual column number (taking tabs
- * into account) in the segment.
- *
- * @param seg The segment
- * @param tabSize The tab size
- * @param column The virtual column number
- * @param totalVirtualWidth If this array is non-null, the total
- * virtual width will be stored in its first location if this method
- * returns -1.
- *
- * @return -1 if the column is out of bounds
- *
- * @since jEdit 4.1pre1
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getVirtualWidth(javax.swing.text.Segment, int)}
- */
- @Deprecated
- public static int getOffsetOfVirtualColumn(Segment seg, int tabSize,
- int column, int[] totalVirtualWidth)
- {
- return StandardUtilities.getOffsetOfVirtualColumn(seg, tabSize, column, totalVirtualWidth);
- } //}}}
-
- //{{{ createWhiteSpace() methods
- /**
- * Creates a string of white space with the specified length.<p>
- *
- * To get a whitespace string tuned to the current buffer's
- * settings, call this method as follows:
- *
- * <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
- * (buffer.getBooleanProperty("noTabs") ? 0
- * : buffer.getTabSize()));</pre>
- *
- * @param len The length
- * @param tabSize The tab size, or 0 if tabs are not to be used
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#createWhiteSpace(int, int)}
- */
- @Deprecated
- public static String createWhiteSpace(int len, int tabSize)
- {
- return StandardUtilities.createWhiteSpace(len,tabSize,0);
- }
-
- /**
- * Creates a string of white space with the specified length.<p>
- *
- * To get a whitespace string tuned to the current buffer's
- * settings, call this method as follows:
- *
- * <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
- * (buffer.getBooleanProperty("noTabs") ? 0
- * : buffer.getTabSize()));</pre>
- *
- * @param len The length
- * @param tabSize The tab size, or 0 if tabs are not to be used
- * @param start The start offset, for tab alignment
- * @since jEdit 4.2pre1
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#createWhiteSpace(int, int, int)}
- */
- @Deprecated
- public static String createWhiteSpace(int len, int tabSize, int start)
- {
- return StandardUtilities.createWhiteSpace(len, tabSize, start);
- } //}}}
-
- //{{{ globToRE() method
- /**
- * Converts a Unix-style glob to a regular expression.<p>
- *
- * ? becomes ., * becomes .*, {aa,bb} becomes (aa|bb).
- * @param glob The glob pattern
- * @deprecated Use {@link org.gjt.sp.util.StandardUtilities#globToRE(String)}.
- */
- @Deprecated
- public static String globToRE(String glob)
- {
- return StandardUtilities.globToRE(glob);
- } //}}}
-
- //{{{ escapesToChars() method
- /**
- * Converts "\n" and "\t" escapes in the specified string to
- * newlines and tabs.
- * @param str The string
- * @since jEdit 2.3pre1
- */
- public static String escapesToChars(String str)
- {
- StringBuilder buf = new StringBuilder();
- for(int i = 0; i < str.length(); i++)
- {
- char c = str.charAt(i);
- switch(c)
- {
- case '\\':
- if(i == str.length() - 1)
- {
- buf.append('\\');
- break;
- }
- c = str.charAt(++i);
- switch(c)
- {
- case 'n':
- buf.append('\n');
- break;
- case 't':
- buf.append('\t');
- break;
- default:
- buf.append(c);
- break;
- }
- break;
- default:
- buf.append(c);
- }
- }
- return buf.toString();
- } //}}}
-
- //{{{ charsToEscapes() methods
- /**
- * Escapes newlines, tabs, backslashes, and quotes in the specified
- * string.
- * @param str The string
- * @since jEdit 2.3pre1
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#charsToEscapes(String)}
- */
- @Deprecated
- public static String charsToEscapes(String str)
- {
- return StandardUtilities.charsToEscapes(str);
- }
-
- /**
- * Escapes the specified characters in the specified string.
- * @param str The string
- * @param toEscape Any characters that require escaping
- * @since jEdit 4.1pre3
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#charsToEscapes(String)}
- */
- @Deprecated
- public static String charsToEscapes(String str, String toEscape)
- {
- return StandardUtilities.charsToEscapes(str, toEscape);
- } //}}}
-
- //{{{ compareVersions() method
- /**
- * @deprecated Call {@link StandardUtilities#compareStrings(String, String, boolean)} instead
- */
- @Deprecated
- public static int compareVersions(String v1, String v2)
- {
- return StandardUtilities.compareStrings(v1,v2,false);
- } //}}}
-
- //{{{ compareStrings() method
- /**
- * Compares two strings.<p>
- *
- * Unlike <function>String.compareTo()</function>,
- * this method correctly recognizes and handles embedded numbers.
- * For example, it places "My file 2" before "My file 10".<p>
- *
- * @param str1 The first string
- * @param str2 The second string
- * @param ignoreCase If true, case will be ignored
- * @return negative If str1 < str2, 0 if both are the same,
- * positive if str1 > str2
- * @since jEdit 4.0pre1
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities#compareStrings(String, String, boolean)}
- */
- @Deprecated
- public static int compareStrings(String str1, String str2, boolean ignoreCase)
- {
- return StandardUtilities.compareStrings(str1, str2, ignoreCase);
- } //}}}
-
- //{{{ stringsEqual() method
- /**
- * @deprecated Call {@link StandardUtilities#objectsEqual(Object, Object)} instead.
- */
- @Deprecated
- public static boolean stringsEqual(String s1, String s2)
- {
- return StandardUtilities.objectsEqual(s1,s2);
- } //}}}
-
- //{{{ objectsEqual() method
- /**
- * Returns if two strings are equal. This correctly handles null pointers,
- * as opposed to calling <code>o1.equals(o2)</code>.
- * @since jEdit 4.2pre1
- * @deprecated use {@link StandardUtilities#objectsEqual(Object, Object)}
- */
- @Deprecated
- public static boolean objectsEqual(Object o1, Object o2)
- {
- return StandardUtilities.objectsEqual(o1, o2);
- } //}}}
-
- //{{{ charsToEntities() method
- /**
- * Converts <, >, & in the string to their HTML entity
- * equivalents.
- * @param str The string
- * @since jEdit 4.2pre1
- * @deprecated Use {@link org.gjt.sp.util.XMLUtilities#charsToEntities(String, boolean)}.
- */
- @Deprecated
- public static String charsToEntities(String str)
- {
- return XMLUtilities.charsToEntities(str,false);
- } //}}}
-
- //{{{ formatFileSize() method
- public static final DecimalFormat KB_FORMAT = new DecimalFormat("#.# kB");
- public static final DecimalFormat MB_FORMAT = new DecimalFormat("#.# MB");
-
- /**
- * Formats the given file size into a nice string (123 Bytes, 10.6 kB,
- * 1.2 MB).
- * @param length The size
- * @since jEdit 4.2pre1
- */
- public static String formatFileSize(long length)
- {
- if(length < 1024)
- {
- return length + " Bytes";
- }
- else if(length < 1024 << 10)
- {
- return KB_FORMAT.format((double)length / 1024);
- }
- else
- {
- return MB_FORMAT.format((double)length / 1024 / 1024);
- }
- } //}}}
-
- //{{{ getLongestPrefix() methods
- /**
- * Returns the longest common prefix in the given set of strings.
- * @param str The strings
- * @param ignoreCase If true, case insensitive
- * @since jEdit 4.2pre2
- */
- public static String getLongestPrefix(List<String> str, boolean ignoreCase)
- {
- if(str.isEmpty())
- return "";
-
- int prefixLength = 0;
-
-loop: for(;;)
- {
- String s = str.get(0);
- if(prefixLength >= s.length())
- break loop;
- char ch = s.charAt(prefixLength);
- for(int i = 1; i < str.size(); i++)
- {
- s = str.get(i);
- if(prefixLength >= s.length())
- break loop;
- if(!compareChars(s.charAt(prefixLength),ch,ignoreCase))
- break loop;
- }
- prefixLength++;
- }
-
- return str.get(0).substring(0,prefixLength);
- }
-
- /**
- * Returns the longest common prefix in the given set of strings.
- * @param str The strings
- * @param ignoreCase If true, case insensitive
- * @since jEdit 4.2pre2
- */
- public static String getLongestPrefix(String[] str, boolean ignoreCase)
- {
- return getLongestPrefix((Object[])str,ignoreCase);
- }
-
- /**
- * Returns the longest common prefix in the given set of strings.
- * @param str The strings (calls <code>toString()</code> on each object)
- * @param ignoreCase If true, case insensitive
- * @since jEdit 4.2pre6
- */
- public static String getLongestPrefix(Object[] str, boolean ignoreCase)
- {
- if(str.length == 0)
- return "";
-
- int prefixLength = 0;
-
- String first = str[0].toString();
-
-loop: for(;;)
- {
- if(prefixLength >= first.length())
- break loop;
- char ch = first.charAt(prefixLength);
- for(int i = 1; i < str.length; i++)
- {
- String s = str[i].toString();
- if(prefixLength >= s.length())
- break loop;
- if(!compareChars(s.charAt(prefixLength),ch,ignoreCase))
- break loop;
- }
- prefixLength++;
- }
-
- return first.substring(0,prefixLength);
- } //}}}
-
- //}}}
-
- //{{{ quicksort() deprecated methods
- /**
- * Sorts the specified array. Equivalent to calling
- * <code>Arrays.sort()</code>.
- * @param obj The array
- * @param compare Compares the objects
- * @since jEdit 4.0pre4
- * @deprecated use <code>Arrays.sort()</code>
- */
- @Deprecated
- public static void quicksort(Object[] obj, Comparator compare)
- {
- Arrays.sort(obj,compare);
- }
-
-
- /**
- * Sorts the specified vector.
- * @param vector The vector
- * @param compare Compares the objects
- * @since jEdit 4.0pre4
- * @deprecated <code>Collections.sort()</code>
- */
- @Deprecated
- public static void quicksort(Vector vector, Comparator compare)
- {
- Collections.sort(vector,compare);
- }
-
- /**
- * Sorts the specified list.
- * @param list The list
- * @param compare Compares the objects
- * @since jEdit 4.0pre4
- * @deprecated <code>Collections.sort()</code>
- */
- @Deprecated
- public static void quicksort(List list, Comparator compare)
- {
- Collections.sort(list,compare);
- }
-
- /**
- * Sorts the specified array. Equivalent to calling
- * <code>Arrays.sort()</code>.
- * @param obj The array
- * @param compare Compares the objects
- * @deprecated use <code>Arrays.sort()</code>
- */
- @Deprecated
- public static void quicksort(Object[] obj, Compare compare)
- {
- Arrays.sort(obj,compare);
- }
-
- /**
- * Sorts the specified vector.
- * @param vector The vector
- * @param compare Compares the objects
- * @deprecated <code>Collections.sort()</code>
- */
- @Deprecated
- public static void quicksort(Vector vector, Compare compare)
- {
- Collections.sort(vector,compare);
- } //}}}
-
- //{{{ Compare deprecated interface
- /**
- * An interface for comparing objects. This is a hold-over from
- * they days when jEdit had its own sorting API due to JDK 1.1
- * compatibility requirements. Use <code>java.util.Comparator</code>
- * instead.
- * @deprecated
- */
- @Deprecated
- public interface Compare extends Comparator
- {
- int compare(Object obj1, Object obj2);
- } //}}}
-
- //{{{ StringCompare deprecated class
- /**
- * Compares strings.
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities.StringCompare}
- */
- @Deprecated
- public static class StringCompare implements Compare
- {
- public int compare(Object obj1, Object obj2)
- {
- return StandardUtilities.compareStrings(obj1.toString(),
- obj2.toString(),false);
- }
- } //}}}
-
- //{{{ StringICaseCompare deprecated class
- /**
- * Compares strings ignoring case.
- * @deprecated use {@link org.gjt.sp.util.StandardUtilities.StringCompare}
- */
- @Deprecated
- public static class StringICaseCompare implements Comparator<Object>
- {
- public int compare(Object obj1, Object obj2)
- {
- return StandardUtilities.compareStrings(obj1.toString(), obj2.toString(), true);
- }
- } //}}}
-
- //{{{ MenuItemCompare deprecated class
- /**
- * Compares menu item labels.
- * @deprecated Replaced with {@link org.gjt.sp.jedit.menu.MenuItemTextComparator}
- */
- @Deprecated
- public static class MenuItemCompare implements Compare
- {
- private MenuItemTextComparator comparator = new MenuItemTextComparator();
-
- public int compare(Object obj1, Object obj2)
- {
- return comparator.compare((JMenuItem)obj1, (JMenuItem)obj2);
- }
- } //}}}
-
- //{{{ buildToVersion() method
- /**
- * Converts an internal version number (build) into a
- * `human-readable' form.
- * @param build The build
- */
- public static String buildToVersion(String build)
- {
- if(build.length() != 11)
- return "<unknown version: " + build + '>';
- // First 2 chars are the major version number
- int major = Integer.parseInt(build.substring(0,2));
- // Second 2 are the minor number
- int minor = Integer.parseInt(build.substring(3,5));
- // Then the pre-release status
- int beta = Integer.parseInt(build.substring(6,8));
- // Finally the bug fix release
- int bugfix = Integer.parseInt(build.substring(9,11));
-
- return major + "." + minor
- + (beta != 99 ? "rc" + beta :
- (bugfix != 0 ? "." + bugfix : ""));
- } //}}}
-
- //{{{ isToolsJarAvailable() method
- /**
- * If on JDK 1.2 or higher, make sure that tools.jar is available.
- * This method should be called by plugins requiring the classes
- * in this library.
- * <p>
- * tools.jar is searched for in the following places:
- * <ol>
- * <li>the classpath that was used when jEdit was started,
- * <li>jEdit's jars folder in the user's home,
- * <li>jEdit's system jars folder,
- * <li><i>java.home</i>/lib/. In this case, tools.jar is added to
- * jEdit's list of known jars using jEdit.addPluginJAR(),
- * so that it gets loaded through JARClassLoader.
- * </ol><p>
- *
- * On older JDK's this method does not perform any checks, and returns
- * <code>true</code> (even though there is no tools.jar).
- *
- * @return <code>false</code> if and only if on JDK 1.2 and tools.jar
- * could not be found. In this case it prints some warnings on Log,
- * too, about the places where it was searched for.
- * @since jEdit 3.2.2
- */
- public static boolean isToolsJarAvailable()
- {
- Log.log(Log.DEBUG, MiscUtilities.class,"Searching for tools.jar...");
-
- Collection<String> paths = new LinkedList<String>();
-
- //{{{ 1. Check whether tools.jar is in the system classpath:
- paths.add("System classpath: "
- + System.getProperty("java.class.path"));
-
- try
- {
- // Either class sun.tools.javac.Main or
- // com.sun.tools.javac.Main must be there:
- try
- {
- Class.forName("sun.tools.javac.Main");
- }
- catch(ClassNotFoundException e1)
- {
- Class.forName("com.sun.tools.javac.Main");
- }
- Log.log(Log.DEBUG, MiscUtilities.class,
- "- is in classpath. Fine.");
- return true;
- }
- catch(ClassNotFoundException e)
- {
- //Log.log(Log.DEBUG, MiscUtilities.class,
- // "- is not in system classpath.");
- } //}}}
-
- //{{{ 2. Check whether it is in the jEdit user settings jars folder:
- String settingsDir = jEdit.getSettingsDirectory();
- if(settingsDir != null)
- {
- String toolsPath = constructPath(settingsDir, "jars",
- "tools.jar");
- paths.add(toolsPath);
- if(new File(toolsPath).exists())
- {
- Log.log(Log.DEBUG, MiscUtilities.class,
- "- is in the user's jars folder. Fine.");
- // jEdit will load it automatically
- return true;
- }
- } //}}}
-
- //{{{ 3. Check whether it is in jEdit's system jars folder:
- String jEditDir = jEdit.getJEditHome();
- if(jEditDir != null)
- {
- String toolsPath = constructPath(jEditDir, "jars", "tools.jar");
- paths.add(toolsPath);
- if(new File(toolsPath).exists())
- {
- Log.log(Log.DEBUG, MiscUtilities.class,
- "- is in jEdit's system jars folder. Fine.");
- // jEdit will load it automatically
- return true;
- }
- } //}}}
-
- //{{{ 4. Check whether it is in <java.home>/lib:
- String toolsPath = System.getProperty("java.home");
- if(toolsPath.toLowerCase().endsWith(File.separator + "jre"))
- toolsPath = toolsPath.substring(0, toolsPath.length() - 4);
- toolsPath = constructPath(toolsPath, "lib", "tools.jar");
- paths.add(toolsPath);
-
- if(!new File(toolsPath).exists())
- {
- Log.log(Log.WARNING, MiscUtilities.class,
- "Could not find tools.jar.\n"
- + "I checked the following locations:\n"
- + paths.toString());
- return false;
- } //}}}
-
- //{{{ Load it, if not yet done:
- PluginJAR jar = jEdit.getPluginJAR(toolsPath);
- if(jar == null)
- {
- Log.log(Log.DEBUG, MiscUtilities.class,
- "- adding " + toolsPath + " to jEdit plugins.");
- jEdit.addPluginJAR(toolsPath);
- }
- else
- Log.log(Log.DEBUG, MiscUtilities.class,
- "- has been loaded before.");
- //}}}
-
- return true;
- } //}}}
-
- //{{{ parsePermissions() method
- /**
- * Parse a Unix-style permission string (rwxrwxrwx).
- * @param s The string (must be 9 characters long).
- * @since jEdit 4.1pre8
- */
- public static int parsePermissions(String s)
- {
- int permissions = 0;
-
- if(s.length() == 9)
- {
- if(s.charAt(0) == 'r')
- permissions += 0400;
- if(s.charAt(1) == 'w')
- permissions += 0200;
- if(s.charAt(2) == 'x')
- permissions += 0100;
- else if(s.charAt(2) == 's')
- permissions += 04100;
- else if(s.charAt(2) == 'S')
- permissions += 04000;
- if(s.charAt(3) == 'r')
- permissions += 040;
- if(s.charAt(4) == 'w')
- permissions += 020;
- if(s.charAt(5) == 'x')
- permissions += 010;
- else if(s.charAt(5) == 's')
- permissions += 02010;
- else if(s.charAt(5) == 'S')
- permissions += 02000;
- if(s.charAt(6) == 'r')
- permissions += 04;
- if(s.charAt(7) == 'w')
- permissions += 02;
- if(s.charAt(8) == 'x')
- permissions += 01;
- else if(s.charAt(8) == 't')
- permissions += 01001;
- else if(s.charAt(8) == 'T')
- permissions += 01000;
- }
-
- return permissions;
- } //}}}
-
- //{{{ getEncodings() methods
- /**
- * Returns a list of supported character encodings.
- * @since jEdit 4.2pre5
- * @deprecated See #getEncodings(boolean)
- */
- @Deprecated
- public static String[] getEncodings()
- {
- return getEncodings(false);
- }
-
- /**
- * Returns a list of supported character encodings.
- * @since jEdit 4.3pre5
- * @param getSelected Whether to return just the selected encodings or all.
- */
- public static String[] getEncodings(boolean getSelected)
- {
- Set<String> set;
- if (getSelected)
- {
- set = EncodingServer.getSelectedNames();
- }
- else
- {
- set = EncodingServer.getAvailableNames();
- }
- return set.toArray(new String[set.size()]);
- } //}}}
-
- //{{{ throwableToString() method
- /**
- * Returns a string containing the stack trace of the given throwable.
- * @since jEdit 4.2pre6
- */
- public static String throwableToString(Throwable t)
- {
- StringWriter s = new StringWriter();
- t.printStackTrace(new PrintWriter(s));
- return s.toString();
- } //}}}
-
- //{{{ parseXML() method
- /**
- * Convenience method for parsing an XML file.
- *
- * @return Whether any error occured during parsing.
- * @since jEdit 4.3pre5
- * @deprecated Use {@link XMLUtilities#parseXML(InputStream,DefaultHandler)}.
- */
- @Deprecated
- public static boolean parseXML(InputStream in, DefaultHandler handler)
- throws IOException
- {
- return XMLUtilities.parseXML(in, handler);
- } //}}}
-
- //{{{ resolveEntity() method
- /**
- * Tries to find the given systemId in the context of the given
- * class.
- *
- * @deprecated Use {@link XMLUtilities#findEntity(String,String,Class)}.
- */
- @Deprecated
- public static InputSource findEntity(String systemId, String test, Class where)
- {
- return XMLUtilities.findEntity(systemId, test, where);
- } //}}}
-
- //{{{ Private members
- private MiscUtilities() {}
-
- //{{{ compareChars() method
- /**
- * Compares two chars.
- * should this be public?
- * @param ch1 the first char
- * @param ch2 the second char
- * @param ignoreCase true if you want to ignore case
- */
- private static boolean compareChars(char ch1, char ch2, boolean ignoreCase)
- {
- if(ignoreCase)
- return Character.toUpperCase(ch1) == Character.toUpperCase(ch2);
- else
- return ch1 == ch2;
- } //}}}
-
- //{{{ getPathStart() method
- private static int getPathStart(String path)
- {
- if(path.startsWith("/"))
- return 0;
- else if(OperatingSystem.isDOSDerived()
- && path.length() >= 3
- && path.charAt(1) == ':'
- && (path.charAt(2) == '/'
- || path.charAt(2) == '\\'))
- return 3;
- else
- return 0;
- } //}}}
-
- //{{{ containsNullCharacter() method
- private static boolean containsNullCharacter(Reader reader)
- throws IOException
- {
- int nbChars = jEdit.getIntegerProperty("vfs.binaryCheck.length",100);
- int authorized = jEdit.getIntegerProperty("vfs.binaryCheck.count",1);
- for (long i = 0L;i < nbChars;i++)
- {
- int c = reader.read();
- if (c == -1)
- return false;
- if (c == 0)
- {
- authorized--;
- if (authorized == 0)
- return true;
- }
- }
- return false;
- } //}}}
-
- //}}}
-
- static VarCompressor svc = null;
-
- //{{{ VarCompressor class
- /**
- * Singleton class for quickly "compressing" paths into variable-prefixed values.
- * @author alan ezust
- */
- static class VarCompressor
- {
- /** a reverse mapping of values to environment variable names */
- final Map<String, String> prefixMap = new HashMap<String, String>();
- /** previously compressed strings saved for quick access later */
- final Map<String, String> previous = new HashMap<String, String>();
-
- //{{{ VarCompressor constructor
- VarCompressor()
- {
- ProcessBuilder pb = new ProcessBuilder();
- Map<String, String> env = pb.environment();
- if (OperatingSystem.isUnix())
- prefixMap.put(System.getProperty("user.home"), "~");
- for (String k: env.keySet())
- {
- if (k.equalsIgnoreCase("pwd") || k.equalsIgnoreCase("oldpwd")) continue;
- if (!Character.isLetter(k.charAt(0))) continue;
- String v = env.get(k);
- // only add possible candidates to the prefix map
- if (!canBePathPrefix(v)) continue;
- // no need for trailing file separator
- if (v.endsWith(File.separator))
- v = v.substring(0, v.length()-1);
- // check if it is actually shorter
- if (OperatingSystem.isWindows())
- if (k.length()+2 > v.length()) continue; // gets replaced by %FOO%
- else
- if (k.length()+1 > v.length()) continue; // gets replaced by $FOO
- if (OperatingSystem.isWindows())
- {
- // no case sensitivity, might as well convert to lower case
- v = v.toLowerCase();
- k = k.toLowerCase();
- }
- if (prefixMap.containsKey(v))
- {
- String otherKey = prefixMap.get(v);
- if (otherKey.length() < k.length()) continue;
- }
- prefixMap.put(v, k);
- }
- } //}}}
-
- //{{{ compress() method
- String compress(String path)
- {
- String original = path;
- if (previous.containsKey(path))
- {
- return previous.get(path);
- }
- String bestPrefix = "/";
- String verifiedPrefix = bestPrefix;
- for (String tryPrefix : prefixMap.keySet())
- {
- if (tryPrefix.length() < bestPrefix.length()) continue;
- if (OperatingSystem.isWindows() &&
- path.toLowerCase().startsWith(tryPrefix))
- bestPrefix = tryPrefix;
- else if (path.startsWith(tryPrefix))
- {
- bestPrefix = tryPrefix;
- }
- // Only use prefix if it is a directory-prefix of the path
- if (!bestPrefix.equals(verifiedPrefix))
- {
- String remainder = original.substring(bestPrefix.length());
- if (remainder.length() < 1 || remainder.startsWith(File.separator))
- verifiedPrefix = bestPrefix;
- else bestPrefix = verifiedPrefix;
- }
- }
- if (bestPrefix.length() > 1)
- {
- String remainder = original.substring(bestPrefix.length());
- String envvar = prefixMap.get(bestPrefix);
- if (envvar.equals("~"))
- path = envvar + remainder;
- else if (OperatingSystem.isWindows())
- path = '%' + envvar.toUpperCase() + '%' + remainder;
- else
- path = '$' + envvar + remainder;
- }
- previous.put(original, path);
- return path;
- } //}}}
-
- //{{{ canBePathPrefix() method
- // Returns true if the argument may absolutely point a directory.
- // For speed, no access to file system or network should happen.
- private boolean canBePathPrefix(String s)
- {
- // Do not use File#isDirectory() since it causes
- // access to file system or network to check if
- // the directory is actually exists.
- return !s.contains(File.pathSeparator)
- && new File(s).isAbsolute();
- } //}}}
- } //}}}
-
-}
+/*
+ * MiscUtilities.java - Various miscallaneous utility functions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2005 Slava Pestov
+ * Portions copyright (C) 2000 Richard S. Hall
+ * Portions copyright (C) 2001 Dirk Moebius
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import javax.swing.text.Segment;
+import javax.swing.JMenuItem;
+import java.io.*;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.nio.charset.MalformedInputException;
+import java.text.DecimalFormat;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.ProgressObserver;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.util.IOUtilities;
+
+import org.gjt.sp.util.XMLUtilities;
+import org.gjt.sp.jedit.menu.MenuItemTextComparator;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+//}}}
+
+/**
+ * Path name manipulation, string manipulation, and more.<p>
+ *
+ * The most frequently used members of this class are:<p>
+ *
+ * <b>Some path name methods:</b><p>
+ * <ul>
+ * <li>{@link #getFileName(String)}</li>
+ * <li>{@link #getParentOfPath(String)}</li>
+ * <li>{@link #constructPath(String,String)}</li>
+ * </ul>
+ * <b>String comparison:</b><p>
+
+ * A {@link #compareStrings(String,String,boolean)} method that unlike
+ * <function>String.compareTo()</function>, correctly recognizes and handles
+ * embedded numbers.<p>
+ *
+ * This class also defines several inner classes for use with the
+ * sorting features of the Java collections API:
+ *
+ * <ul>
+ * <li>{@link MiscUtilities.StringICaseCompare}</li>
+ * <li>{@link MiscUtilities.MenuItemCompare}</li>
+ * </ul>
+ *
+ * For example, you might call:<p>
+ *
+ * <code>Arrays.sort(myListOfStrings,
+ * new MiscUtilities.StringICaseCompare());</code>
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: MiscUtilities.java 17972 2010-06-03 13:53:26Z voituk $
+ */
+public class MiscUtilities
+{
+ /**
+ * This encoding is not supported by Java, yet it is useful.
+ * A UTF-8 file that begins with 0xEFBBBF.
+ * @deprecated
+ * Extended encodings are now supported as services.
+ * This value is no longer used.
+ */
+ @Deprecated public static final String UTF_8_Y = "UTF-8Y";
+
+ //{{{ Path name methods
+
+ //{{{ canonPath() method
+ /**
+ * @return the canonical form of the specified path name. Currently
+ * only expands a leading <code>~</code>. <b>For local path names
+ * only.</b>
+ * @param path The path name
+ * @since jEdit 4.0pre2
+ */
+ public static String canonPath(String path)
+ {
+ if(path.length() == 0)
+ return path;
+
+ if(path.startsWith("file://"))
+ path = path.substring("file://".length());
+ else if(path.startsWith("file:"))
+ path = path.substring("file:".length());
+ else if(isURL(path))
+ return path;
+
+ if(File.separatorChar == '\\')
+ {
+ // get rid of mixed paths on Windows
+ path = path.replace('/','\\');
+ // also get rid of trailing spaces on Windows
+ int trim = path.length();
+ while(path.charAt(trim - 1) == ' ')
+ trim--;
+
+ if (path.charAt(trim - 1) == '\\')
+ while (trim > 1 && path.charAt(trim - 2) == '\\')
+ {
+ trim--;
+ }
+ path = path.substring(0,trim);
+ }
+
+ if(path.startsWith('~' + File.separator))
+ {
+ path = path.substring(2);
+ String home = System.getProperty("user.home");
+
+ if(home.endsWith(File.separator))
+ return home + path;
+ else
+ return home + File.separator + path;
+ }
+ else if("~".equals(path))
+ return System.getProperty("user.home");
+ else if ("-".equals(path))
+ return getParentOfPath(jEdit.getActiveView().getBuffer().getPath());
+ else
+ return path;
+ } //}}}
+
+ //{{{ expandVariables() method
+ static final String varPatternString = "(\\$([a-zA-Z0-9_]+))";
+ static final String varPatternString2 = "(\\$\\{([^}]+)\\})";
+ static final Pattern varPattern = Pattern.compile(varPatternString);
+ static final Pattern varPattern2 = Pattern.compile(varPatternString2);
+
+ /** Accepts a string from the user which may contain variables of various syntaxes.
+ * The goal is to support the following:
+ * $varname
+ * ${varname}
+ * And expand each of these by looking at the system environment variables for possible
+ * expansions.
+ * @return a string which is either the unchanged input string, or one with expanded variables.
+ * @since 4.3pre7
+ * @author ezust
+ */
+ public static String expandVariables(String arg)
+ {
+ Pattern p = varPattern;
+ Matcher m = p.matcher(arg);
+ if (!m.find())
+ {
+ p = varPattern2;
+ m = p.matcher(arg);
+ if (!m.find()) // no variables to substitute
+ return arg;
+ }
+ String varName = m.group(2);
+ String expansion = System.getenv(varName);
+ if (expansion == null)
+ { // try everything uppercase?
+ varName = varName.toUpperCase();
+ String uparg = arg.toUpperCase();
+ m = p.matcher(uparg);
+ expansion = System.getenv(varName);
+ }
+ if (expansion != null)
+ {
+ expansion = expansion.replace("\\", "\\\\");
+ return m.replaceFirst(expansion);
+ }
+ return arg;
+ } //}}}
+
+ //{{{ abbreviate() method
+ /** returns an abbreviated path, replacing
+ * values with variables, if a prefix exists.
+ * @since jEdit 4.3pre16
+ */
+ public static String abbreviate(String path)
+ {
+ if (svc == null)
+ svc = new VarCompressor();
+ return svc.compress(path);
+ } //}}}
+
+ //{{{ resolveSymlinks() method
+ /**
+ * Resolves any symbolic links in the path name specified
+ * using <code>File.getCanonicalPath()</code>. <b>For local path
+ * names only.</b>
+ * @since jEdit 4.2pre1
+ */
+ public static String resolveSymlinks(String path)
+ {
+ if(isURL(path))
+ return path;
+
+ // 2 aug 2003: OS/2 Java has a broken getCanonicalPath()
+ if(OperatingSystem.isOS2())
+ return path;
+ // 18 nov 2003: calling this on a drive letter on Windows causes
+ // drive access
+ if(OperatingSystem.isDOSDerived())
+ {
+ if(path.length() == 2 || path.length() == 3)
+ {
+ if(path.charAt(1) == ':')
+ return path;
+ }
+ }
+ try
+ {
+ return new File(path).getCanonicalPath();
+ }
+ catch(IOException io)
+ {
+ return path;
+ }
+ } //}}}
+
+ //{{{ isAbsolutePath() method
+ /**
+ * Returns if the specified path name is an absolute path or URL.
+ * @since jEdit 4.1pre11
+ */
+ public static boolean isAbsolutePath(String path)
+ {
+ if(isURL(path))
+ return true;
+ else if(path.startsWith("~/") || path.startsWith('~' + File.separator) || "~".equals(path))
+ return true;
+ else if ("-".equals(path))
+ return true;
+ else if(OperatingSystem.isDOSDerived())
+ {
+ if(path.length() == 2 && path.charAt(1) == ':')
+ return true;
+ if(path.length() > 2 && path.charAt(1) == ':'
+ && (path.charAt(2) == '\\'
+ || path.charAt(2) == '/'))
+ return true;
+ if(path.startsWith("\\\\")
+ || path.startsWith("//"))
+ return true;
+ }
+ // not sure if this is correct for OpenVMS.
+ else if(OperatingSystem.isUnix()
+ || OperatingSystem.isVMS())
+ {
+ // nice and simple
+ if(path.length() > 0 && path.charAt(0) == '/')
+ return true;
+ }
+
+ return false;
+ } //}}}
+
+ //{{{ constructPath() methods
+ /**
+ * Constructs an absolute path name from a directory and another
+ * path name. This method is VFS-aware.
+ * @param parent The directory
+ * @param path The path name
+ */
+ public static String constructPath(String parent, String path)
+ {
+ if(isAbsolutePath(path))
+ return canonPath(path);
+
+ if (parent == null)
+ parent = System.getProperty("user.dir");
+
+ if (path == null || path.length() == 0)
+ return parent;
+
+ // have to handle this case specially on windows.
+ // insert \ between, eg A: and myfile.txt.
+ if(OperatingSystem.isDOSDerived())
+ {
+ if(path.length() == 2 && path.charAt(1) == ':')
+ return path;
+ else if(path.length() > 2 && path.charAt(1) == ':'
+ && path.charAt(2) != '\\')
+ {
+ path = path.substring(0,2) + '\\'
+ + path.substring(2);
+ return canonPath(path);
+ }
+ }
+
+ String dd = ".." + File.separator;
+ String d = '.' + File.separator;
+
+ for(;;)
+ {
+ if(".".equals(path))
+ return parent;
+ else if("..".equals(path))
+ return getParentOfPath(parent);
+ else if(path.startsWith(dd) || path.startsWith("../"))
+ {
+ parent = getParentOfPath(parent);
+ path = path.substring(3);
+ }
+ else if(path.startsWith(d) || path.startsWith("./"))
+ path = path.substring(2);
+ else
+ break;
+ }
+ if(path.length() == 0)
+ return parent;
+
+ if(OperatingSystem.isDOSDerived()
+ && !isURL(parent)
+ && path.charAt(0) == '\\')
+ parent = parent.substring(0,2);
+
+ VFS vfs = VFSManager.getVFSForPath(parent);
+
+ return canonPath(vfs.constructPath(parent,path));
+ }
+
+ /**
+ * Constructs an absolute path name from three path components.
+ * This method is VFS-aware.
+ * @param parent The parent directory
+ * @param path1 The first path
+ * @param path2 The second path
+ */
+ public static String constructPath(String parent,
+ String path1, String path2)
+ {
+ return constructPath(constructPath(parent,path1),path2);
+ } //}}}
+
+ //{{{ concatPath() method
+ /**
+ * Like {@link #constructPath}, except <code>path</code> will be
+ * appended to <code>parent</code> even if it is absolute.
+ * <b>For local path names only.</b>.
+ *
+ * @param parent the parent path
+ * @param path the path to append to the parent
+ */
+ public static String concatPath(String parent, String path)
+ {
+ parent = canonPath(parent);
+ path = canonPath(path);
+
+ // Make all child paths relative.
+ if (path.startsWith(File.separator))
+ path = path.substring(1);
+ else if (path.length() >= 3 && path.charAt(1) == ':')
+ path = path.replace(':', File.separatorChar);
+
+ if (parent == null)
+ parent = System.getProperty("user.dir");
+
+ if (parent.endsWith(File.separator))
+ return parent + path;
+ else
+ return parent + File.separator + path;
+ } //}}}
+
+ //{{{ getFirstSeparatorIndex() method
+ /**
+ * Return the first index of either / or the OS-specific file
+ * separator.
+ * @param path The path
+ * @since jEdit 4.3pre3
+ */
+ public static int getFirstSeparatorIndex(String path)
+ {
+ int start = getPathStart(path);
+ int index = path.indexOf('/',start);
+ if(index == -1)
+ index = path.indexOf(File.separatorChar,start);
+ return index;
+ } //}}}
+
+ //{{{ getLastSeparatorIndex() method
+ /**
+ * Return the last index of either / or the OS-specific file
+ * separator.
+ * @param path The path
+ * @since jEdit 4.3pre3
+ */
+ public static int getLastSeparatorIndex(String path)
+ {
+ int start = getPathStart(path);
+ if(start != 0)
+ path = path.substring(start);
+ int index = Math.max(
+ path.lastIndexOf('/'), path.lastIndexOf(File.separatorChar));
+ if(index == -1)
+ return index;
+ else
+ return index + start;
+ } //}}}
+
+
+ //{{{ getFileExtension() method
+ /**
+ * Returns the extension of the specified filename, or an empty
+ * string if there is none.
+ * @param path The path
+ */
+ public static String getFileExtension(String path)
+ {
+ int fsIndex = getLastSeparatorIndex(path);
+ int index = path.lastIndexOf('.');
+ // there could be a dot in the path and no file extension
+ if(index == -1 || index < fsIndex )
+ return "";
+ else
+ return path.substring(index);
+ } //}}}
+
+ //{{{ getFileName() method
+ /**
+ * Returns the last component of the specified path.
+ * This method is VFS-aware.
+ * @param path The path name
+ */
+ public static String getFileName(String path)
+ {
+ return VFSManager.getVFSForPath(path).getFileName(path);
+ } //}}}
+
+ //{{{ getFileNameNoExtension() method
+ /**
+ * Returns the last component of the specified path name without the
+ * trailing extension (if there is one).
+ * @param path The path name
+ * @since jEdit 4.0pre8
+ */
+ public static String getFileNameNoExtension(String path)
+ {
+ String name = getFileName(path);
+ int index = name.indexOf('.');
+ if(index == -1)
+ return name;
+ else
+ return name.substring(0,index);
+ } //}}}
+
+ //{{{ getFileParent() method
+ /**
+ * @deprecated Call getParentOfPath() instead
+ */
+ @Deprecated
+ public static String getFileParent(String path)
+ {
+ return getParentOfPath(path);
+ } //}}}
+
+ //{{{ getParentOfPath() method
+ /**
+ * Returns the parent of the specified path. This method is VFS-aware.
+ * @param path The path name
+ * @since jEdit 2.6pre5
+ */
+ public static String getParentOfPath(String path)
+ {
+ return VFSManager.getVFSForPath(path).getParentOfPath(path);
+ } //}}}
+
+ //{{{ getFileProtocol() method
+ /**
+ * @deprecated Call getProtocolOfURL() instead
+ */
+ @Deprecated
+ public static String getFileProtocol(String url)
+ {
+ return getProtocolOfURL(url);
+ } //}}}
+
+ //{{{ getProtocolOfURL() method
+ /**
+ * Returns the protocol specified by a URL.
+ * @param url The URL
+ * @since jEdit 2.6pre5
+ */
+ public static String getProtocolOfURL(String url)
+ {
+ return url.substring(0,url.indexOf(':'));
+ } //}}}
+
+ //{{{ isURL() method
+ /**
+ * Checks if the specified string is a URL.
+ * @param str The string to check
+ * @return True if the string is a URL, false otherwise
+ */
+ public static boolean isURL(String str)
+ {
+ int fsIndex = getLastSeparatorIndex(str);
+ if(fsIndex == 0) // /etc/passwd
+ return false;
+ else if(fsIndex == 2) // C:\AUTOEXEC.BAT
+ return false;
+
+ int cIndex = str.indexOf(':');
+ if(cIndex <= 1) // D:\WINDOWS, or doesn't contain : at all
+ return false;
+
+ String protocol = str.substring(0,cIndex);
+ VFS vfs = VFSManager.getVFSForProtocol(protocol);
+ if(vfs != null && !(vfs instanceof UrlVFS))
+ return true;
+
+ try
+ {
+ new URL(str);
+ return true;
+ }
+ catch(MalformedURLException mf)
+ {
+ return false;
+ }
+ } //}}}
+
+ //{{{ saveBackup() methods
+ /**
+ * Saves a backup (optionally numbered) of a file.
+ * @param file A local file
+ * @param backups The number of backups. Must be >= 1. If > 1, backup
+ * files will be numbered.
+ * @param backupPrefix The backup file name prefix
+ * @param backupSuffix The backup file name suffix
+ * @param backupDirectory The directory where to save backups; if null,
+ * they will be saved in the same directory as the file itself.
+ * @since jEdit 4.0pre1
+ */
+ public static void saveBackup(File file, int backups,
+ String backupPrefix, String backupSuffix,
+ String backupDirectory)
+ {
+ saveBackup(file,backups,backupPrefix,backupSuffix,backupDirectory,0);
+ }
+
+ /**
+ * Saves a backup (optionally numbered) of a file.
+ * @param file A local file
+ * @param backups The number of backups. Must be >= 1. If > 1, backup
+ * files will be numbered.
+ * @param backupPrefix The backup file name prefix
+ * @param backupSuffix The backup file name suffix
+ * @param backupDirectory The directory where to save backups; if null,
+ * they will be saved in the same directory as the file itself.
+ * @param backupTimeDistance The minimum time in minutes when a backup
+ * version 1 shall be moved into version 2; if 0, backups are always
+ * moved.
+ * @since jEdit 4.2pre5
+ */
+ public static void saveBackup(File file, int backups,
+ String backupPrefix, String backupSuffix,
+ String backupDirectory, int backupTimeDistance)
+ {
+ if(backupPrefix == null)
+ backupPrefix = "";
+ if(backupSuffix == null)
+ backupSuffix = "";
+
+ String name = file.getName();
+
+ // If backups is 1, create ~ file
+ if(backups == 1)
+ {
+ File backupFile = new File(backupDirectory,
+ backupPrefix + name + backupSuffix);
+ long modTime = backupFile.lastModified();
+ /* if backup file was created less than
+ * 'backupTimeDistance' ago, we do not
+ * create the backup */
+ if(System.currentTimeMillis() - modTime
+ >= backupTimeDistance)
+ {
+ Log.log(Log.DEBUG,MiscUtilities.class,
+ "Saving backup of file \"" +
+ file.getAbsolutePath() + "\" to \"" +
+ backupFile.getAbsolutePath() + '"');
+ backupFile.delete();
+ if (!file.renameTo(backupFile))
+ IOUtilities.moveFile(file, backupFile);
+ }
+ }
+ // If backups > 1, move old ~n~ files, create ~1~ file
+ else
+ {
+ /* delete a backup created using above method */
+ new File(backupDirectory,
+ backupPrefix + name + backupSuffix
+ + backups + backupSuffix).delete();
+
+ File firstBackup = new File(backupDirectory,
+ backupPrefix + name + backupSuffix
+ + '1' + backupSuffix);
+ long modTime = firstBackup.lastModified();
+ /* if backup file was created less than
+ * 'backupTimeDistance' ago, we do not
+ * create the backup */
+ if(System.currentTimeMillis() - modTime
+ >= backupTimeDistance)
+ {
+ for(int i = backups - 1; i > 0; i--)
+ {
+ File backup = new File(backupDirectory,
+ backupPrefix + name
+ + backupSuffix + i
+ + backupSuffix);
+
+ backup.renameTo(new File(backupDirectory,
+ backupPrefix + name
+ + backupSuffix + (i + 1)
+ + backupSuffix));
+ }
+
+ File backupFile = new File(backupDirectory,
+ backupPrefix + name + backupSuffix
+ + '1' + backupSuffix);
+ Log.log(Log.DEBUG,MiscUtilities.class,
+ "Saving backup of file \"" +
+ file.getAbsolutePath() + "\" to \"" +
+ backupFile.getAbsolutePath() + '"');
+ if (!file.renameTo(backupFile))
+ IOUtilities.moveFile(file, backupFile);
+ }
+ }
+ } //}}}
+
+ //{{{ moveFile() method
+ /**
+ * Moves the source file to the destination.
+ *
+ * If the destination cannot be created or is a read-only file, the
+ * method returns <code>false</code>. Otherwise, the contents of the
+ * source are copied to the destination, the source is deleted,
+ * and <code>true</code> is returned.
+ *
+ * @param source The source file to move.
+ * @param dest The destination where to move the file.
+ * @return true on success, false otherwise.
+ *
+ * @since jEdit 4.3pre1
+ * @deprecated use {@link org.gjt.sp.util.IOUtilities#moveFile(java.io.File, java.io.File)}
+ */
+ @Deprecated
+ public static boolean moveFile(File source, File dest)
+ {
+ return IOUtilities.moveFile(source, dest);
+ } //}}}
+
+ //{{{ copyStream() methods
+ /**
+ * Copy an input stream to an output stream.
+ *
+ * @param bufferSize the size of the buffer
+ * @param progress the progress observer it could be null
+ * @param in the input stream
+ * @param out the output stream
+ * @param canStop if true, the copy can be stopped by interrupting the thread
+ * @return <code>true</code> if the copy was done, <code>false</code> if it was interrupted
+ * @throws IOException IOException If an I/O error occurs
+ * @since jEdit 4.3pre3
+ * @deprecated use {@link IOUtilities#copyStream(int, org.gjt.sp.util.ProgressObserver, java.io.InputStream, java.io.OutputStream, boolean)}
+ */
+ @Deprecated
+ public static boolean copyStream(int bufferSize, ProgressObserver progress,
+ InputStream in, OutputStream out, boolean canStop)
+ throws IOException
+ {
+ return IOUtilities.copyStream(bufferSize, progress, in, out, canStop);
+ }
+
+ /**
+ * Copy an input stream to an output stream with a buffer of 4096 bytes.
+ *
+ * @param progress the progress observer it could be null
+ * @param in the input stream
+ * @param out the output stream
+ * @param canStop if true, the copy can be stopped by interrupting the thread
+ * @return <code>true</code> if the copy was done, <code>false</code> if it was interrupted
+ * @throws IOException IOException If an I/O error occurs
+ * @since jEdit 4.3pre3
+ * @deprecated use {@link IOUtilities#copyStream(org.gjt.sp.util.ProgressObserver, java.io.InputStream, java.io.OutputStream, boolean)}
+ */
+ @Deprecated
+ public static boolean copyStream(ProgressObserver progress, InputStream in, OutputStream out, boolean canStop)
+ throws IOException
+ {
+ return IOUtilities.copyStream(4096,progress, in, out, canStop);
+ } //}}}
+
+ //{{{ isBinary() methods
+ /**
+ * Check if a Reader is binary.
+ * @deprecated
+ * Use isBinary(InputStream) instead.
+ */
+ @Deprecated
+ public static boolean isBinary(Reader reader) throws IOException
+ {
+ return containsNullCharacter(reader);
+ }
+
+ /**
+ * Check if an InputStream is binary.
+ * First this tries encoding auto detection. If an encoding is
+ * detected, the stream should be a text stream. Otherwise, this
+ * will check the first characters 100
+ * (jEdit property vfs.binaryCheck.length) in the system default
+ * encoding. If more than 1 (jEdit property vfs.binaryCheck.count)
+ * NUL(\u0000) was found, the stream is declared binary.
+ *
+ * This is not 100% because sometimes the autodetection could fail.
+ *
+ * This method will not close the stream. You have to do it yourself
+ *
+ * @param in the stream
+ * @return <code>true</code> if the stream was detected as binary
+ * @throws IOException IOException If an I/O error occurs
+ * @since jEdit 4.3pre10
+ */
+ public static boolean isBinary(InputStream in) throws IOException
+ {
+ AutoDetection.Result detection = new AutoDetection.Result(in);
+ // If an encoding is detected, this is a text stream
+ if (detection.getDetectedEncoding() != null)
+ {
+ return false;
+ }
+ // Read the stream in system default encoding. The encoding
+ // might be wrong. But enough for binary detection.
+ try
+ {
+ return containsNullCharacter(
+ new InputStreamReader(detection.getRewindedStream()));
+ }
+ catch (MalformedInputException mie)
+ {
+ // This error probably means the input is binary.
+ return true;
+ }
+ } //}}}
+
+ //{{{ isBackup() method
+ /**
+ * Check if the filename is a backup file.
+ * @param filename the filename to check
+ * @return true if this is a backup file.
+ * @since jEdit 4.3pre5
+ */
+ public static boolean isBackup(String filename)
+ {
+ if (filename.startsWith("#")) return true;
+ if (filename.endsWith("~")) return true;
+ if (filename.endsWith(".bak")) return true;
+ return false;
+ } //}}}
+
+
+ //{{{ autodetect() method
+ /**
+ * Tries to detect if the stream is gzipped, and if it has an encoding
+ * specified with an XML PI.
+ *
+ * @param in the input stream reader that must be autodetected
+ * @param buffer a buffer. It can be null if you only want to autodetect the encoding of a file
+ * @return a Reader using the detected encoding
+ * @throws IOException io exception during read
+ * @since jEdit 4.3pre5
+ */
+ public static Reader autodetect(InputStream in, Buffer buffer) throws IOException
+ {
+ String encoding;
+ if (buffer == null)
+ encoding = System.getProperty("file.encoding");
+ else
+ encoding = buffer.getStringProperty(JEditBuffer.ENCODING);
+ boolean gzipped = false;
+
+ if (buffer == null || buffer.getBooleanProperty(Buffer.ENCODING_AUTODETECT))
+ {
+ AutoDetection.Result detection = new AutoDetection.Result(in);
+ gzipped = detection.streamIsGzipped();
+ if (gzipped)
+ {
+ Log.log(Log.DEBUG, MiscUtilities.class
+ , "Stream is Gzipped");
+ }
+ String detected = detection.getDetectedEncoding();
+ if (detected != null)
+ {
+ encoding = detected;
+ Log.log(Log.DEBUG, MiscUtilities.class
+ , "Stream encoding detected is " + detected);
+ }
+ in = detection.getRewindedStream();
+ }
+ else
+ {
+ // Make the stream buffered in the same way.
+ in = AutoDetection.getMarkedStream(in);
+ }
+
+ Reader result = EncodingServer.getTextReader(in, encoding);
+ if (buffer != null)
+ {
+ // Store the successful properties.
+ if (gzipped)
+ {
+ buffer.setBooleanProperty(Buffer.GZIPPED,true);
+ }
+ buffer.setProperty(JEditBuffer.ENCODING, encoding);
+ }
+ return result;
+ } //}}}
+
+ //{{{ closeQuietly() method
+ /**
+ * Method that will close an {@link InputStream} ignoring it if it is null and ignoring exceptions.
+ *
+ * @param in the InputStream to close.
+ * @since jEdit 4.3pre3
+ * @deprecated use {@link IOUtilities#closeQuietly(java.io.InputStream)}
+ */
+ @Deprecated
+ public static void closeQuietly(InputStream in)
+ {
+ IOUtilities.closeQuietly(in);
+ } //}}}
+
+ //{{{ copyStream() method
+ /**
+ * Method that will close an {@link OutputStream} ignoring it if it is null and ignoring exceptions.
+ *
+ * @param out the OutputStream to close.
+ * @since jEdit 4.3pre3
+ * @deprecated use {@link IOUtilities#closeQuietly(java.io.OutputStream)}
+ */
+ @Deprecated
+ public static void closeQuietly(OutputStream out)
+ {
+ IOUtilities.closeQuietly(out);
+ } //}}}
+
+ //{{{ fileToClass() method
+ /**
+ * Converts a file name to a class name. All slash characters are
+ * replaced with periods and the trailing '.class' is removed.
+ * @param name The file name
+ */
+ public static String fileToClass(String name)
+ {
+ char[] clsName = name.toCharArray();
+ for(int i = clsName.length - 6; i >= 0; i--)
+ if(clsName[i] == '/')
+ clsName[i] = '.';
+ return new String(clsName,0,clsName.length - 6);
+ } //}}}
+
+ //{{{ classToFile() method
+ /**
+ * Converts a class name to a file name. All periods are replaced
+ * with slashes and the '.class' extension is added.
+ * @param name The class name
+ */
+ public static String classToFile(String name)
+ {
+ return name.replace('.','/').concat(".class");
+ } //}}}
+
+ //{{{ pathsEqual() method
+ /**
+ * @param p1 A path name
+ * @param p2 A path name
+ * @return True if both paths are equal, ignoring trailing slashes, as
+ * well as case insensitivity on Windows.
+ * @since jEdit 4.3pre2
+ */
+ public static boolean pathsEqual(String p1, String p2)
+ {
+ VFS v1 = VFSManager.getVFSForPath(p1);
+ VFS v2 = VFSManager.getVFSForPath(p2);
+
+ if(v1 != v2)
+ return false;
+
+ if(p1.endsWith("/") || p1.endsWith(File.separator))
+ p1 = p1.substring(0,p1.length() - 1);
+
+ if(p2.endsWith("/") || p2.endsWith(File.separator))
+ p2 = p2.substring(0,p2.length() - 1);
+
+ if((v1.getCapabilities() & VFS.CASE_INSENSITIVE_CAP) != 0)
+ return p1.equalsIgnoreCase(p2);
+ else
+ return p1.equals(p2);
+ } //}}}
+
+ //}}}
+
+ //{{{ Text methods
+
+ //{{{ getLeadingWhiteSpace() method
+ /**
+ * Returns the number of leading white space characters in the
+ * specified string.
+ * @param str The string
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getLeadingWhiteSpace(String)}
+ */
+ @Deprecated
+ public static int getLeadingWhiteSpace(String str)
+ {
+ return StandardUtilities.getLeadingWhiteSpace(str);
+ } //}}}
+
+ //{{{ getTrailingWhiteSpace() method
+ /**
+ * Returns the number of trailing whitespace characters in the
+ * specified string.
+ * @param str The string
+ * @since jEdit 2.5pre5
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getTrailingWhiteSpace(String)}
+ */
+ @Deprecated
+ public static int getTrailingWhiteSpace(String str)
+ {
+ return StandardUtilities.getTrailingWhiteSpace(str);
+ } //}}}
+
+ //{{{ getLeadingWhiteSpaceWidth() method
+ /**
+ * Returns the width of the leading white space in the specified
+ * string.
+ * @param str The string
+ * @param tabSize The tab size
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getLeadingWhiteSpace(String)}
+ */
+ @Deprecated
+ public static int getLeadingWhiteSpaceWidth(String str, int tabSize)
+ {
+ return StandardUtilities.getLeadingWhiteSpaceWidth(str, tabSize);
+ } //}}}
+
+ //{{{ getVirtualWidth() method
+ /**
+ * Returns the virtual column number (taking tabs into account) of the
+ * specified offset in the segment.
+ *
+ * @param seg The segment
+ * @param tabSize The tab size
+ * @since jEdit 4.1pre1
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getVirtualWidth(javax.swing.text.Segment, int)}
+ */
+ @Deprecated
+ public static int getVirtualWidth(Segment seg, int tabSize)
+ {
+ return StandardUtilities.getVirtualWidth(seg, tabSize);
+ } //}}}
+
+ //{{{ getOffsetOfVirtualColumn() method
+ /**
+ * Returns the array offset of a virtual column number (taking tabs
+ * into account) in the segment.
+ *
+ * @param seg The segment
+ * @param tabSize The tab size
+ * @param column The virtual column number
+ * @param totalVirtualWidth If this array is non-null, the total
+ * virtual width will be stored in its first location if this method
+ * returns -1.
+ *
+ * @return -1 if the column is out of bounds
+ *
+ * @since jEdit 4.1pre1
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#getVirtualWidth(javax.swing.text.Segment, int)}
+ */
+ @Deprecated
+ public static int getOffsetOfVirtualColumn(Segment seg, int tabSize,
+ int column, int[] totalVirtualWidth)
+ {
+ return StandardUtilities.getOffsetOfVirtualColumn(seg, tabSize, column, totalVirtualWidth);
+ } //}}}
+
+ //{{{ createWhiteSpace() methods
+ /**
+ * Creates a string of white space with the specified length.<p>
+ *
+ * To get a whitespace string tuned to the current buffer's
+ * settings, call this method as follows:
+ *
+ * <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
+ * (buffer.getBooleanProperty("noTabs") ? 0
+ * : buffer.getTabSize()));</pre>
+ *
+ * @param len The length
+ * @param tabSize The tab size, or 0 if tabs are not to be used
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#createWhiteSpace(int, int)}
+ */
+ @Deprecated
+ public static String createWhiteSpace(int len, int tabSize)
+ {
+ return StandardUtilities.createWhiteSpace(len,tabSize,0);
+ }
+
+ /**
+ * Creates a string of white space with the specified length.<p>
+ *
+ * To get a whitespace string tuned to the current buffer's
+ * settings, call this method as follows:
+ *
+ * <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
+ * (buffer.getBooleanProperty("noTabs") ? 0
+ * : buffer.getTabSize()));</pre>
+ *
+ * @param len The length
+ * @param tabSize The tab size, or 0 if tabs are not to be used
+ * @param start The start offset, for tab alignment
+ * @since jEdit 4.2pre1
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#createWhiteSpace(int, int, int)}
+ */
+ @Deprecated
+ public static String createWhiteSpace(int len, int tabSize, int start)
+ {
+ return StandardUtilities.createWhiteSpace(len, tabSize, start);
+ } //}}}
+
+ //{{{ globToRE() method
+ /**
+ * Converts a Unix-style glob to a regular expression.<p>
+ *
+ * ? becomes ., * becomes .*, {aa,bb} becomes (aa|bb).
+ * @param glob The glob pattern
+ * @deprecated Use {@link org.gjt.sp.util.StandardUtilities#globToRE(String)}.
+ */
+ @Deprecated
+ public static String globToRE(String glob)
+ {
+ return StandardUtilities.globToRE(glob);
+ } //}}}
+
+ //{{{ escapesToChars() method
+ /**
+ * Converts "\n" and "\t" escapes in the specified string to
+ * newlines and tabs.
+ * @param str The string
+ * @since jEdit 2.3pre1
+ */
+ public static String escapesToChars(String str)
+ {
+ StringBuilder buf = new StringBuilder();
+ for(int i = 0; i < str.length(); i++)
+ {
+ char c = str.charAt(i);
+ switch(c)
+ {
+ case '\\':
+ if(i == str.length() - 1)
+ {
+ buf.append('\\');
+ break;
+ }
+ c = str.charAt(++i);
+ switch(c)
+ {
+ case 'n':
+ buf.append('\n');
+ break;
+ case 't':
+ buf.append('\t');
+ break;
+ default:
+ buf.append(c);
+ break;
+ }
+ break;
+ default:
+ buf.append(c);
+ }
+ }
+ return buf.toString();
+ } //}}}
+
+ //{{{ charsToEscapes() methods
+ /**
+ * Escapes newlines, tabs, backslashes, and quotes in the specified
+ * string.
+ * @param str The string
+ * @since jEdit 2.3pre1
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#charsToEscapes(String)}
+ */
+ @Deprecated
+ public static String charsToEscapes(String str)
+ {
+ return StandardUtilities.charsToEscapes(str);
+ }
+
+ /**
+ * Escapes the specified characters in the specified string.
+ * @param str The string
+ * @param toEscape Any characters that require escaping
+ * @since jEdit 4.1pre3
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#charsToEscapes(String)}
+ */
+ @Deprecated
+ public static String charsToEscapes(String str, String toEscape)
+ {
+ return StandardUtilities.charsToEscapes(str, toEscape);
+ } //}}}
+
+ //{{{ compareVersions() method
+ /**
+ * @deprecated Call {@link StandardUtilities#compareStrings(String, String, boolean)} instead
+ */
+ @Deprecated
+ public static int compareVersions(String v1, String v2)
+ {
+ return StandardUtilities.compareStrings(v1,v2,false);
+ } //}}}
+
+ //{{{ compareStrings() method
+ /**
+ * Compares two strings.<p>
+ *
+ * Unlike <function>String.compareTo()</function>,
+ * this method correctly recognizes and handles embedded numbers.
+ * For example, it places "My file 2" before "My file 10".<p>
+ *
+ * @param str1 The first string
+ * @param str2 The second string
+ * @param ignoreCase If true, case will be ignored
+ * @return negative If str1 < str2, 0 if both are the same,
+ * positive if str1 > str2
+ * @since jEdit 4.0pre1
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#compareStrings(String, String, boolean)}
+ */
+ @Deprecated
+ public static int compareStrings(String str1, String str2, boolean ignoreCase)
+ {
+ return StandardUtilities.compareStrings(str1, str2, ignoreCase);
+ } //}}}
+
+ //{{{ stringsEqual() method
+ /**
+ * @deprecated Call {@link StandardUtilities#objectsEqual(Object, Object)} instead.
+ */
+ @Deprecated
+ public static boolean stringsEqual(String s1, String s2)
+ {
+ return StandardUtilities.objectsEqual(s1,s2);
+ } //}}}
+
+ //{{{ objectsEqual() method
+ /**
+ * Returns if two strings are equal. This correctly handles null pointers,
+ * as opposed to calling <code>o1.equals(o2)</code>.
+ * @since jEdit 4.2pre1
+ * @deprecated use {@link StandardUtilities#objectsEqual(Object, Object)}
+ */
+ @Deprecated
+ public static boolean objectsEqual(Object o1, Object o2)
+ {
+ return StandardUtilities.objectsEqual(o1, o2);
+ } //}}}
+
+ //{{{ charsToEntities() method
+ /**
+ * Converts <, >, & in the string to their HTML entity
+ * equivalents.
+ * @param str The string
+ * @since jEdit 4.2pre1
+ * @deprecated Use {@link org.gjt.sp.util.XMLUtilities#charsToEntities(String, boolean)}.
+ */
+ @Deprecated
+ public static String charsToEntities(String str)
+ {
+ return XMLUtilities.charsToEntities(str,false);
+ } //}}}
+
+ //{{{ formatFileSize() method
+ @Deprecated
+ public static final DecimalFormat KB_FORMAT = new DecimalFormat("#.# kB");
+ @Deprecated
+ public static final DecimalFormat MB_FORMAT = new DecimalFormat("#.# MB");
+
+ /**
+ * Formats the given file size into a nice string (123 Bytes, 10.6 kB,
+ * 1.2 MB).
+ * @param length The size
+ * @since jEdit 4.2pre1
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities#formatFileSize(long)}
+ */
+ @Deprecated
+ public static String formatFileSize(long length)
+ {
+ return StandardUtilities.formatFileSize(length);
+ } //}}}
+
+ //{{{ getLongestPrefix() methods
+ /**
+ * Returns the longest common prefix in the given set of strings.
+ * @param str The strings
+ * @param ignoreCase If true, case insensitive
+ * @since jEdit 4.2pre2
+ */
+ public static String getLongestPrefix(List<String> str, boolean ignoreCase)
+ {
+ if(str.isEmpty())
+ return "";
+
+ int prefixLength = 0;
+
+loop: for(;;)
+ {
+ String s = str.get(0);
+ if(prefixLength >= s.length())
+ break loop;
+ char ch = s.charAt(prefixLength);
+ for(int i = 1; i < str.size(); i++)
+ {
+ s = str.get(i);
+ if(prefixLength >= s.length())
+ break loop;
+ if(!compareChars(s.charAt(prefixLength),ch,ignoreCase))
+ break loop;
+ }
+ prefixLength++;
+ }
+
+ return str.get(0).substring(0,prefixLength);
+ }
+
+ /**
+ * Returns the longest common prefix in the given set of strings.
+ * @param str The strings
+ * @param ignoreCase If true, case insensitive
+ * @since jEdit 4.2pre2
+ */
+ public static String getLongestPrefix(String[] str, boolean ignoreCase)
+ {
+ return getLongestPrefix((Object[])str,ignoreCase);
+ }
+
+ /**
+ * Returns the longest common prefix in the given set of strings.
+ * @param str The strings (calls <code>toString()</code> on each object)
+ * @param ignoreCase If true, case insensitive
+ * @since jEdit 4.2pre6
+ */
+ public static String getLongestPrefix(Object[] str, boolean ignoreCase)
+ {
+ if(str.length == 0)
+ return "";
+
+ int prefixLength = 0;
+
+ String first = str[0].toString();
+
+loop: for(;;)
+ {
+ if(prefixLength >= first.length())
+ break loop;
+ char ch = first.charAt(prefixLength);
+ for(int i = 1; i < str.length; i++)
+ {
+ String s = str[i].toString();
+ if(prefixLength >= s.length())
+ break loop;
+ if(!compareChars(s.charAt(prefixLength),ch,ignoreCase))
+ break loop;
+ }
+ prefixLength++;
+ }
+
+ return first.substring(0,prefixLength);
+ } //}}}
+
+ //}}}
+
+ //{{{ quicksort() deprecated methods
+ /**
+ * Sorts the specified array. Equivalent to calling
+ * <code>Arrays.sort()</code>.
+ * @param obj The array
+ * @param compare Compares the objects
+ * @since jEdit 4.0pre4
+ * @deprecated use <code>Arrays.sort()</code>
+ */
+ @Deprecated
+ public static void quicksort(Object[] obj, Comparator compare)
+ {
+ Arrays.sort(obj,compare);
+ }
+
+
+ /**
+ * Sorts the specified vector.
+ * @param vector The vector
+ * @param compare Compares the objects
+ * @since jEdit 4.0pre4
+ * @deprecated <code>Collections.sort()</code>
+ */
+ @Deprecated
+ public static void quicksort(Vector vector, Comparator compare)
+ {
+ Collections.sort(vector,compare);
+ }
+
+ /**
+ * Sorts the specified list.
+ * @param list The list
+ * @param compare Compares the objects
+ * @since jEdit 4.0pre4
+ * @deprecated <code>Collections.sort()</code>
+ */
+ @Deprecated
+ public static void quicksort(List list, Comparator compare)
+ {
+ Collections.sort(list,compare);
+ }
+
+ /**
+ * Sorts the specified array. Equivalent to calling
+ * <code>Arrays.sort()</code>.
+ * @param obj The array
+ * @param compare Compares the objects
+ * @deprecated use <code>Arrays.sort()</code>
+ */
+ @Deprecated
+ public static void quicksort(Object[] obj, Compare compare)
+ {
+ Arrays.sort(obj,compare);
+ }
+
+ /**
+ * Sorts the specified vector.
+ * @param vector The vector
+ * @param compare Compares the objects
+ * @deprecated <code>Collections.sort()</code>
+ */
+ @Deprecated
+ public static void quicksort(Vector vector, Compare compare)
+ {
+ Collections.sort(vector,compare);
+ } //}}}
+
+ //{{{ Compare deprecated interface
+ /**
+ * An interface for comparing objects. This is a hold-over from
+ * they days when jEdit had its own sorting API due to JDK 1.1
+ * compatibility requirements. Use <code>java.util.Comparator</code>
+ * instead.
+ * @deprecated
+ */
+ @Deprecated
+ public interface Compare extends Comparator
+ {
+ int compare(Object obj1, Object obj2);
+ } //}}}
+
+ //{{{ StringCompare deprecated class
+ /**
+ * Compares strings.
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities.StringCompare}
+ */
+ @Deprecated
+ public static class StringCompare implements Compare
+ {
+ public int compare(Object obj1, Object obj2)
+ {
+ return StandardUtilities.compareStrings(obj1.toString(),
+ obj2.toString(),false);
+ }
+ } //}}}
+
+ //{{{ StringICaseCompare deprecated class
+ /**
+ * Compares strings ignoring case.
+ * @deprecated use {@link org.gjt.sp.util.StandardUtilities.StringCompare}
+ */
+ @Deprecated
+ public static class StringICaseCompare implements Comparator<Object>
+ {
+ public int compare(Object obj1, Object obj2)
+ {
+ return StandardUtilities.compareStrings(obj1.toString(), obj2.toString(), true);
+ }
+ } //}}}
+
+ //{{{ MenuItemCompare deprecated class
+ /**
+ * Compares menu item labels.
+ * @deprecated Replaced with {@link org.gjt.sp.jedit.menu.MenuItemTextComparator}
+ */
+ @Deprecated
+ public static class MenuItemCompare implements Compare
+ {
+ private MenuItemTextComparator comparator = new MenuItemTextComparator();
+
+ public int compare(Object obj1, Object obj2)
+ {
+ return comparator.compare((JMenuItem)obj1, (JMenuItem)obj2);
+ }
+ } //}}}
+
+ //{{{ buildToVersion() method
+ /**
+ * Converts an internal version number (build) into a
+ * `human-readable' form.
+ * @param build The build
+ */
+ public static String buildToVersion(String build)
+ {
+ if(build.length() != 11)
+ return "<unknown version: " + build + '>';
+ // First 2 chars are the major version number
+ int major = Integer.parseInt(build.substring(0,2));
+ // Second 2 are the minor number
+ int minor = Integer.parseInt(build.substring(3,5));
+ // Then the pre-release status
+ int beta = Integer.parseInt(build.substring(6,8));
+ // Finally the bug fix release
+ int bugfix = Integer.parseInt(build.substring(9,11));
+
+ return major + "." + minor
+ + (beta != 99 ? "pre" + beta :
+ (bugfix != 0 ? "." + bugfix : ""));
+ } //}}}
+
+ //{{{ isToolsJarAvailable() method
+ /**
+ * If on JDK 1.2 or higher, make sure that tools.jar is available.
+ * This method should be called by plugins requiring the classes
+ * in this library.
+ * <p>
+ * tools.jar is searched for in the following places:
+ * <ol>
+ * <li>the classpath that was used when jEdit was started,
+ * <li>jEdit's jars folder in the user's home,
+ * <li>jEdit's system jars folder,
+ * <li><i>java.home</i>/lib/. In this case, tools.jar is added to
+ * jEdit's list of known jars using jEdit.addPluginJAR(),
+ * so that it gets loaded through JARClassLoader.
+ * </ol><p>
+ *
+ * On older JDK's this method does not perform any checks, and returns
+ * <code>true</code> (even though there is no tools.jar).
+ *
+ * @return <code>false</code> if and only if on JDK 1.2 and tools.jar
+ * could not be found. In this case it prints some warnings on Log,
+ * too, about the places where it was searched for.
+ * @since jEdit 3.2.2
+ */
+ public static boolean isToolsJarAvailable()
+ {
+ Log.log(Log.DEBUG, MiscUtilities.class,"Searching for tools.jar...");
+
+ Collection<String> paths = new LinkedList<String>();
+
+ //{{{ 1. Check whether tools.jar is in the system classpath:
+ paths.add("System classpath: "
+ + System.getProperty("java.class.path"));
+
+ try
+ {
+ // Either class sun.tools.javac.Main or
+ // com.sun.tools.javac.Main must be there:
+ try
+ {
+ Class.forName("sun.tools.javac.Main");
+ }
+ catch(ClassNotFoundException e1)
+ {
+ Class.forName("com.sun.tools.javac.Main");
+ }
+ Log.log(Log.DEBUG, MiscUtilities.class,
+ "- is in classpath. Fine.");
+ return true;
+ }
+ catch(ClassNotFoundException e)
+ {
+ //Log.log(Log.DEBUG, MiscUtilities.class,
+ // "- is not in system classpath.");
+ } //}}}
+
+ //{{{ 2. Check whether it is in the jEdit user settings jars folder:
+ String settingsDir = jEdit.getSettingsDirectory();
+ if(settingsDir != null)
+ {
+ String toolsPath = constructPath(settingsDir, "jars",
+ "tools.jar");
+ paths.add(toolsPath);
+ if(new File(toolsPath).exists())
+ {
+ Log.log(Log.DEBUG, MiscUtilities.class,
+ "- is in the user's jars folder. Fine.");
+ // jEdit will load it automatically
+ return true;
+ }
+ } //}}}
+
+ //{{{ 3. Check whether it is in jEdit's system jars folder:
+ String jEditDir = jEdit.getJEditHome();
+ if(jEditDir != null)
+ {
+ String toolsPath = constructPath(jEditDir, "jars", "tools.jar");
+ paths.add(toolsPath);
+ if(new File(toolsPath).exists())
+ {
+ Log.log(Log.DEBUG, MiscUtilities.class,
+ "- is in jEdit's system jars folder. Fine.");
+ // jEdit will load it automatically
+ return true;
+ }
+ } //}}}
+
+ //{{{ 4. Check whether it is in <java.home>/lib:
+ String toolsPath = System.getProperty("java.home");
+ if(toolsPath.toLowerCase().endsWith(File.separator + "jre"))
+ toolsPath = toolsPath.substring(0, toolsPath.length() - 4);
+ toolsPath = constructPath(toolsPath, "lib", "tools.jar");
+ paths.add(toolsPath);
+
+ if(!new File(toolsPath).exists())
+ {
+ Log.log(Log.WARNING, MiscUtilities.class,
+ "Could not find tools.jar.\n"
+ + "I checked the following locations:\n"
+ + paths.toString());
+ return false;
+ } //}}}
+
+ //{{{ Load it, if not yet done:
+ PluginJAR jar = jEdit.getPluginJAR(toolsPath);
+ if(jar == null)
+ {
+ Log.log(Log.DEBUG, MiscUtilities.class,
+ "- adding " + toolsPath + " to jEdit plugins.");
+ jEdit.addPluginJAR(toolsPath);
+ }
+ else
+ Log.log(Log.DEBUG, MiscUtilities.class,
+ "- has been loaded before.");
+ //}}}
+
+ return true;
+ } //}}}
+
+ //{{{ parsePermissions() method
+ /**
+ * Parse a Unix-style permission string (rwxrwxrwx).
+ * @param s The string (must be 9 characters long).
+ * @since jEdit 4.1pre8
+ */
+ public static int parsePermissions(String s)
+ {
+ int permissions = 0;
+
+ if(s.length() == 9)
+ {
+ if(s.charAt(0) == 'r')
+ permissions += 0400;
+ if(s.charAt(1) == 'w')
+ permissions += 0200;
+ if(s.charAt(2) == 'x')
+ permissions += 0100;
+ else if(s.charAt(2) == 's')
+ permissions += 04100;
+ else if(s.charAt(2) == 'S')
+ permissions += 04000;
+ if(s.charAt(3) == 'r')
+ permissions += 040;
+ if(s.charAt(4) == 'w')
+ permissions += 020;
+ if(s.charAt(5) == 'x')
+ permissions += 010;
+ else if(s.charAt(5) == 's')
+ permissions += 02010;
+ else if(s.charAt(5) == 'S')
+ permissions += 02000;
+ if(s.charAt(6) == 'r')
+ permissions += 04;
+ if(s.charAt(7) == 'w')
+ permissions += 02;
+ if(s.charAt(8) == 'x')
+ permissions += 01;
+ else if(s.charAt(8) == 't')
+ permissions += 01001;
+ else if(s.charAt(8) == 'T')
+ permissions += 01000;
+ }
+
+ return permissions;
+ } //}}}
+
+ //{{{ getEncodings() methods
+ /**
+ * Returns a list of supported character encodings.
+ * @since jEdit 4.2pre5
+ * @deprecated See #getEncodings(boolean)
+ */
+ @Deprecated
+ public static String[] getEncodings()
+ {
+ return getEncodings(false);
+ }
+
+ /**
+ * Returns a list of supported character encodings.
+ * @since jEdit 4.3pre5
+ * @param getSelected Whether to return just the selected encodings or all.
+ */
+ public static String[] getEncodings(boolean getSelected)
+ {
+ Set<String> set;
+ if (getSelected)
+ {
+ set = EncodingServer.getSelectedNames();
+ }
+ else
+ {
+ set = EncodingServer.getAvailableNames();
+ }
+ return set.toArray(new String[set.size()]);
+ } //}}}
+
+ //{{{ throwableToString() method
+ /**
+ * Returns a string containing the stack trace of the given throwable.
+ * @since jEdit 4.2pre6
+ */
+ public static String throwableToString(Throwable t)
+ {
+ StringWriter s = new StringWriter();
+ t.printStackTrace(new PrintWriter(s));
+ return s.toString();
+ } //}}}
+
+ //{{{ parseXML() method
+ /**
+ * Convenience method for parsing an XML file.
+ *
+ * @return Whether any error occured during parsing.
+ * @since jEdit 4.3pre5
+ * @deprecated Use {@link XMLUtilities#parseXML(InputStream,DefaultHandler)}.
+ */
+ @Deprecated
+ public static boolean parseXML(InputStream in, DefaultHandler handler)
+ throws IOException
+ {
+ return XMLUtilities.parseXML(in, handler);
+ } //}}}
+
+ //{{{ resolveEntity() method
+ /**
+ * Tries to find the given systemId in the context of the given
+ * class.
+ *
+ * @deprecated Use {@link XMLUtilities#findEntity(String,String,Class)}.
+ */
+ @Deprecated
+ public static InputSource findEntity(String systemId, String test, Class where)
+ {
+ return XMLUtilities.findEntity(systemId, test, where);
+ } //}}}
+
+ //{{{ Private members
+ private MiscUtilities() {}
+
+ //{{{ compareChars() method
+ /**
+ * Compares two chars.
+ * should this be public?
+ * @param ch1 the first char
+ * @param ch2 the second char
+ * @param ignoreCase true if you want to ignore case
+ */
+ private static boolean compareChars(char ch1, char ch2, boolean ignoreCase)
+ {
+ if(ignoreCase)
+ return Character.toUpperCase(ch1) == Character.toUpperCase(ch2);
+ else
+ return ch1 == ch2;
+ } //}}}
+
+ //{{{ getPathStart() method
+ private static int getPathStart(String path)
+ {
+ if(path.startsWith("/"))
+ return 0;
+ else if(OperatingSystem.isDOSDerived()
+ && path.length() >= 3
+ && path.charAt(1) == ':'
+ && (path.charAt(2) == '/'
+ || path.charAt(2) == '\\'))
+ return 3;
+ else
+ return 0;
+ } //}}}
+
+ //{{{ containsNullCharacter() method
+ private static boolean containsNullCharacter(Reader reader)
+ throws IOException
+ {
+ int nbChars = jEdit.getIntegerProperty("vfs.binaryCheck.length",100);
+ int authorized = jEdit.getIntegerProperty("vfs.binaryCheck.count",1);
+ for (long i = 0L;i < nbChars;i++)
+ {
+ int c = reader.read();
+ if (c == -1)
+ return false;
+ if (c == 0)
+ {
+ authorized--;
+ if (authorized == 0)
+ return true;
+ }
+ }
+ return false;
+ } //}}}
+
+ //}}}
+
+ static VarCompressor svc = null;
+
+ //{{{ VarCompressor class
+ /**
+ * Singleton class for quickly "compressing" paths into variable-prefixed values.
+ * @author alan ezust
+ */
+ static class VarCompressor
+ {
+ /** a reverse mapping of values to environment variable names */
+ final Map<String, String> prefixMap = new HashMap<String, String>();
+ /** previously compressed strings saved for quick access later */
+ final Map<String, String> previous = new HashMap<String, String>();
+
+ //{{{ VarCompressor constructor
+ VarCompressor()
+ {
+ ProcessBuilder pb = new ProcessBuilder();
+ Map<String, String> env = pb.environment();
+ if (OperatingSystem.isUnix())
+ prefixMap.put(System.getProperty("user.home"), "~");
+ for (Map.Entry<String, String> entry: env.entrySet())
+ {
+ String k = entry.getKey();
+ if (k.equalsIgnoreCase("pwd") || k.equalsIgnoreCase("oldpwd")) continue;
+ if (!Character.isLetter(k.charAt(0))) continue;
+ String v = entry.getValue();
+ // only add possible candidates to the prefix map
+ if (!canBePathPrefix(v)) continue;
+ // no need for trailing file separator
+ if (v.endsWith(File.separator))
+ v = v.substring(0, v.length()-1);
+ // check if it is actually shorter
+ if (OperatingSystem.isWindows())
+ if (k.length()+2 > v.length()) continue; // gets replaced by %FOO%
+ else
+ if (k.length()+1 > v.length()) continue; // gets replaced by $FOO
+ if (OperatingSystem.isWindows())
+ {
+ // no case sensitivity, might as well convert to lower case
+ v = v.toLowerCase();
+ k = k.toLowerCase();
+ }
+ if (prefixMap.containsKey(v))
+ {
+ String otherKey = prefixMap.get(v);
+ if (otherKey.length() < k.length()) continue;
+ }
+ prefixMap.put(v, k);
+ }
+ } //}}}
+
+ //{{{ compress() method
+ String compress(String path)
+ {
+ String original = path;
+ if (previous.containsKey(path))
+ {
+ return previous.get(path);
+ }
+ String bestPrefix = "/";
+ String verifiedPrefix = bestPrefix;
+ for (String tryPrefix : prefixMap.keySet())
+ {
+ if (tryPrefix.length() < bestPrefix.length()) continue;
+ if (OperatingSystem.isWindows() &&
+ path.toLowerCase().startsWith(tryPrefix))
+ bestPrefix = tryPrefix;
+ else if (path.startsWith(tryPrefix))
+ {
+ bestPrefix = tryPrefix;
+ }
+ // Only use prefix if it is a directory-prefix of the path
+ if (!bestPrefix.equals(verifiedPrefix))
+ {
+ String remainder = original.substring(bestPrefix.length());
+ if (remainder.length() < 1 || remainder.startsWith(File.separator))
+ verifiedPrefix = bestPrefix;
+ else bestPrefix = verifiedPrefix;
+ }
+ }
+ if (bestPrefix.length() > 1)
+ {
+ String remainder = original.substring(bestPrefix.length());
+ String envvar = prefixMap.get(bestPrefix);
+ if (envvar.equals("~"))
+ path = envvar + remainder;
+ else if (OperatingSystem.isWindows())
+ path = '%' + envvar.toUpperCase() + '%' + remainder;
+ else
+ path = '$' + envvar + remainder;
+ }
+ previous.put(original, path);
+ return path;
+ } //}}}
+
+ //{{{ canBePathPrefix() method
+ // Returns true if the argument may absolutely point a directory.
+ // For speed, no access to file system or network should happen.
+ private boolean canBePathPrefix(String s)
+ {
+ // Do not use File#isDirectory() since it causes
+ // access to file system or network to check if
+ // the directory is actually exists.
+ return !s.contains(File.pathSeparator)
+ && new File(s).isAbsolute();
+ } //}}}
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/Mode.java b/jEdit/org/gjt/sp/jedit/Mode.java
index 87a1b4e..515ef33 100644
--- a/jEdit/org/gjt/sp/jedit/Mode.java
+++ b/jEdit/org/gjt/sp/jedit/Mode.java
@@ -1,442 +1,463 @@
-/*
- * Mode.java - jEdit editing mode
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 1999, 2000 Slava Pestov
- * Copyright (C) 1999 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.lang.reflect.Method;
-import java.util.Hashtable;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-import org.gjt.sp.jedit.indent.DeepIndentRule;
-import org.gjt.sp.jedit.indent.IndentRule;
-import org.gjt.sp.jedit.indent.IndentRuleFactory;
-import org.gjt.sp.jedit.indent.WhitespaceRule;
-import org.gjt.sp.jedit.syntax.TokenMarker;
-import org.gjt.sp.jedit.syntax.ModeProvider;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * An edit mode defines specific settings for editing some type of file.
- * One instance of this class is created for each supported edit mode.
- *
- * @author Slava Pestov
- * @version $Id: Mode.java 16022 2009-08-22 02:14:59Z daleanson $
- */
-public class Mode
-{
- //{{{ Mode constructor
- /**
- * Creates a new edit mode.
- *
- * @param name The name used in mode listings and to query mode
- * properties
- * @see #getProperty(String)
- */
- public Mode(String name)
- {
- this.name = name;
- this.ignoreWhitespace = true;
- props = new Hashtable<String, Object>();
- } //}}}
-
- //{{{ init() method
- /**
- * Initializes the edit mode. Should be called after all properties
- * are loaded and set.
- */
- public void init()
- {
- try
- {
- String filenameGlob = (String)getProperty("filenameGlob");
- if(filenameGlob != null && filenameGlob.length() != 0)
- {
- filenameRE = Pattern.compile(StandardUtilities.globToRE(filenameGlob),
- Pattern.CASE_INSENSITIVE);
- }
-
- String firstlineGlob = (String)getProperty("firstlineGlob");
- if(firstlineGlob != null && firstlineGlob.length() != 0)
- {
- firstlineRE = Pattern.compile(StandardUtilities.globToRE(firstlineGlob),
- Pattern.CASE_INSENSITIVE);
- }
- }
- catch(PatternSyntaxException re)
- {
- Log.log(Log.ERROR,this,"Invalid filename/firstline"
- + " globs in mode " + name);
- Log.log(Log.ERROR,this,re);
- }
-
- // Fix for this bug:
- // -- Put a mode into the user dir with the same name as one
- // on the system dir.
- // -- Reload edit modes.
- // -- Old mode from system dir still used for highlighting
- // until jEdit restart.
- marker = null;
- } //}}}
-
- //{{{ getTokenMarker() method
- /**
- * Returns the token marker for this mode.
- */
- public TokenMarker getTokenMarker()
- {
- loadIfNecessary();
- return marker;
- } //}}}
-
- //{{{ setTokenMarker() method
- /**
- * Sets the token marker for this mode.
- * @param marker The new token marker
- */
- public void setTokenMarker(TokenMarker marker)
- {
- this.marker = marker;
- } //}}}
-
- //{{{ loadIfNecessary() method
- /**
- * Loads the mode from disk if it hasn't been loaded already.
- * @since jEdit 2.5pre3
- */
- public void loadIfNecessary()
- {
- if(marker == null)
- {
- ModeProvider.instance.loadMode(this);
- if (marker == null)
- Log.log(Log.ERROR, this, "Mode not correctly loaded, token marker is still null");
- }
- } //}}}
-
- //{{{ getProperty() method
- /**
- * Returns a mode property.
- * @param key The property name
- *
- * @since jEdit 2.2pre1
- */
- public Object getProperty(String key)
- {
- Object value = props.get(key);
- if(value != null)
- return value;
- return null;
- } //}}}
-
- //{{{ getBooleanProperty() method
- /**
- * Returns the value of a boolean property.
- * @param key The property name
- *
- * @since jEdit 2.5pre3
- */
- public boolean getBooleanProperty(String key)
- {
- Object value = getProperty(key);
- return StandardUtilities.getBoolean(value, false);
- } //}}}
-
- //{{{ setProperty() method
- /**
- * Sets a mode property.
- * @param key The property name
- * @param value The property value
- */
- public void setProperty(String key, Object value)
- {
- props.put(key,value);
- } //}}}
-
- //{{{ unsetProperty() method
- /**
- * Unsets a mode property.
- * @param key The property name
- * @since jEdit 3.2pre3
- */
- public void unsetProperty(String key)
- {
- props.remove(key);
- } //}}}
-
- //{{{ setProperties() method
- /**
- * Should only be called by <code>XModeHandler</code>.
- * @since jEdit 4.0pre3
- */
- public void setProperties(Map props)
- {
- if(props == null)
- props = new Hashtable<String, Object>();
-
- ignoreWhitespace = !"false".equalsIgnoreCase(
- (String)props.get("ignoreWhitespace"));
-
- // need to carry over file name and first line globs because they are
- // not given to us by the XMode handler, but instead are filled in by
- // the catalog loader.
- String filenameGlob = (String)this.props.get("filenameGlob");
- String firstlineGlob = (String)this.props.get("firstlineGlob");
- String filename = (String)this.props.get("file");
- this.props = props;
- if(filenameGlob != null)
- props.put("filenameGlob",filenameGlob);
- if(firstlineGlob != null)
- props.put("firstlineGlob",firstlineGlob);
- if(filename != null)
- props.put("file",filename);
- } //}}}
-
- //{{{ accept() method
- /**
- * Returns true if the edit mode is suitable for editing the specified
- * file. The buffer name and first line is checked against the
- * file name and first line globs, respectively.
- * @param fileName The buffer's name
- * @param firstLine The first line of the buffer
- *
- * @since jEdit 3.2pre3
- */
- public boolean accept(String fileName, String firstLine)
- {
- return acceptFilename(fileName) || acceptFirstLine(firstLine);
- } //}}}
-
- //{{{ acceptFilename() method
- /**
- * Returns true if the buffer name matches the file name glob.
- * @param fileName The buffer's name
- * @return true if the file name matches the file name glob.
- * @since jEdit 4.3pre18
- */
- public boolean acceptFilename(String fileName)
- {
- return filenameRE != null && filenameRE.matcher(fileName).matches();
- } //}}}
-
- //{{{ acceptFirstLine() method
- /**
- * Returns true if the first line matches the first line glob.
- * @param firstLine The first line of the buffer
- * @return true if the first line matches the first line glob.
- * @since jEdit 4.3pre18
- */
- public boolean acceptFirstLine(String firstLine)
- {
- return firstlineRE != null && firstlineRE.matcher(firstLine).matches();
- } //}}}
-
- //{{{ getName() method
- /**
- * Returns the internal name of this edit mode.
- */
- public String getName()
- {
- return name;
- } //}}}
-
- //{{{ toString() method
- /**
- * Returns a string representation of this edit mode.
- */
- public String toString()
- {
- return name;
- } //}}}
-
- //{{{ getIgnoreWhitespace() method
- public boolean getIgnoreWhitespace()
- {
- return ignoreWhitespace;
- } //}}}
-
- //{{{ Indent rules
-
- public synchronized List<IndentRule> getIndentRules()
- {
- if (indentRules == null)
- {
- initIndentRules();
- }
- return indentRules;
- }
-
- public synchronized boolean isElectricKey(char ch)
- {
- if (electricKeys == null)
- {
- String[] props = {
- "indentOpenBrackets",
- "indentCloseBrackets",
- "electricKeys"
- };
-
- StringBuilder buf = new StringBuilder();
- for(int i = 0; i < props.length; i++)
- {
- String prop = (String) getProperty(props[i]);
- if (prop != null)
- buf.append(prop);
- }
-
- electricKeys = buf.toString();
- }
-
- return (electricKeys.indexOf(ch) >= 0);
- }
-
- private void initIndentRules()
- {
- List<IndentRule> rules = new LinkedList<IndentRule>();
-
- String[] regexpProps = {
- "indentNextLine",
- "indentNextLines"
- };
-
- for(int i = 0; i < regexpProps.length; i++)
- {
- IndentRule rule = createRegexpIndentRule(regexpProps[i]);
- if(rule != null)
- rules.add(rule);
- }
-
- String[] bracketProps = {
- "indentOpenBracket",
- "indentCloseBracket",
- "unalignedOpenBracket",
- "unalignedCloseBracket",
- };
-
- for(int i = 0; i < bracketProps.length; i++)
- {
- createBracketIndentRules(bracketProps[i], rules);
- }
-
- String[] finalProps = {
- "unindentThisLine",
- "unindentNextLines"
- };
-
- for(int i = 0; i < finalProps.length; i++)
- {
- IndentRule rule = createRegexpIndentRule(finalProps[i]);
- if(rule != null)
- rules.add(rule);
- }
-
- if (getBooleanProperty("deepIndent"))
- {
- String unalignedOpenBrackets = (String) getProperty("unalignedOpenBrackets");
- if (unalignedOpenBrackets != null)
- {
- for (int i = 0 ; i < unalignedOpenBrackets.length();i++)
- {
- char openChar = unalignedOpenBrackets.charAt(i);
- char closeChar = TextUtilities.getComplementaryBracket(openChar, null);
- if (closeChar != '\0')
- rules.add(new DeepIndentRule(openChar, closeChar));
- }
- }
- }
-
- if (!getIgnoreWhitespace())
- rules.add(new WhitespaceRule());
-
- indentRules = Collections.unmodifiableList(rules);
- }
-
- private IndentRule createRegexpIndentRule(String prop)
- {
- String value = (String) getProperty(prop);
-
- try
- {
- if(value != null)
- {
- Method m = IndentRuleFactory.class.getMethod(
- prop,new Class[] { String.class });
- return (IndentRule)m.invoke(null, value);
- }
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,"Bad indent rule " + prop
- + '=' + value + ':');
- Log.log(Log.ERROR,this,e);
- }
-
- return null;
- }
-
- private void createBracketIndentRules(String prop,
- List<IndentRule> rules)
- {
- String value = (String) getProperty(prop + 's');
-
- try
- {
- if(value != null)
- {
- for(int i = 0; i < value.length(); i++)
- {
- char ch = value.charAt(i);
-
- Method m = IndentRuleFactory.class.getMethod(
- prop,new Class[] { char.class });
- rules.add((IndentRule) m.invoke(null, ch));
- }
- }
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,"Bad indent rule " + prop
- + '=' + value + ':');
- Log.log(Log.ERROR,this,e);
- }
- }
-
- //}}}
-
- //{{{ Private members
- protected String name;
- protected Map<String, Object> props;
- private Pattern firstlineRE;
- private Pattern filenameRE;
- protected TokenMarker marker;
- private List<IndentRule> indentRules;
- private String electricKeys;
- private boolean ignoreWhitespace;
- //}}}
-}
+/*
+ * Mode.java - jEdit editing mode
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 1999, 2000 Slava Pestov
+ * Copyright (C) 1999 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.lang.reflect.Method;
+import java.util.Hashtable;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.gjt.sp.jedit.indent.DeepIndentRule;
+import org.gjt.sp.jedit.indent.IndentRule;
+import org.gjt.sp.jedit.indent.IndentRuleFactory;
+import org.gjt.sp.jedit.indent.WhitespaceRule;
+import org.gjt.sp.jedit.syntax.TokenMarker;
+import org.gjt.sp.jedit.syntax.ModeProvider;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * An edit mode defines specific settings for editing some type of file.
+ * One instance of this class is created for each supported edit mode.
+ *
+ * @author Slava Pestov
+ * @version $Id: Mode.java 18844 2010-10-25 19:15:40Z daleanson $
+ */
+public class Mode
+{
+ //{{{ Mode constructor
+ /**
+ * Creates a new edit mode.
+ *
+ * @param name The name used in mode listings and to query mode
+ * properties
+ * @see #getProperty(String)
+ */
+ public Mode(String name)
+ {
+ this.name = name;
+ this.ignoreWhitespace = true;
+ props = new Hashtable<String, Object>();
+ } //}}}
+
+ //{{{ init() method
+ /**
+ * Initializes the edit mode. Should be called after all properties
+ * are loaded and set.
+ */
+ public void init()
+ {
+ try
+ {
+ filenameRE = null;
+ String filenameGlob = (String)getProperty("filenameGlob");
+ if(filenameGlob != null && filenameGlob.length() != 0)
+ {
+ filenameRE = Pattern.compile(StandardUtilities.globToRE(filenameGlob),
+ Pattern.CASE_INSENSITIVE);
+ }
+
+ firstlineRE = null;
+ String firstlineGlob = (String)getProperty("firstlineGlob");
+ if(firstlineGlob != null && firstlineGlob.length() != 0)
+ {
+ firstlineRE = Pattern.compile(StandardUtilities.globToRE(firstlineGlob),
+ Pattern.CASE_INSENSITIVE);
+ }
+ }
+ catch(PatternSyntaxException re)
+ {
+ Log.log(Log.ERROR,this,"Invalid filename/firstline"
+ + " globs in mode " + name);
+ Log.log(Log.ERROR,this,re);
+ }
+
+ // Fix for this bug:
+ // -- Put a mode into the user dir with the same name as one
+ // on the system dir.
+ // -- Reload edit modes.
+ // -- Old mode from system dir still used for highlighting
+ // until jEdit restart.
+ marker = null;
+ } //}}}
+
+ //{{{ getTokenMarker() method
+ /**
+ * Returns the token marker for this mode.
+ */
+ public TokenMarker getTokenMarker()
+ {
+ loadIfNecessary();
+ return marker;
+ } //}}}
+
+ //{{{ setTokenMarker() method
+ /**
+ * Sets the token marker for this mode.
+ * @param marker The new token marker
+ */
+ public void setTokenMarker(TokenMarker marker)
+ {
+ this.marker = marker;
+ } //}}}
+
+ //{{{ loadIfNecessary() method
+ /**
+ * Loads the mode from disk if it hasn't been loaded already.
+ * @since jEdit 2.5pre3
+ */
+ public void loadIfNecessary()
+ {
+ if(marker == null)
+ {
+ ModeProvider.instance.loadMode(this);
+ if (marker == null)
+ Log.log(Log.ERROR, this, "Mode not correctly loaded, token marker is still null");
+ }
+ } //}}}
+
+ //{{{ getProperty() method
+ /**
+ * Returns a mode property.
+ * @param key The property name
+ *
+ * @since jEdit 2.2pre1
+ */
+ public Object getProperty(String key)
+ {
+ Object value = props.get(key);
+ if(value != null)
+ return value;
+ return null;
+ } //}}}
+
+ //{{{ getBooleanProperty() method
+ /**
+ * Returns the value of a boolean property.
+ * @param key The property name
+ *
+ * @since jEdit 2.5pre3
+ */
+ public boolean getBooleanProperty(String key)
+ {
+ Object value = getProperty(key);
+ return StandardUtilities.getBoolean(value, false);
+ } //}}}
+
+ //{{{ setProperty() method
+ /**
+ * Sets a mode property.
+ * @param key The property name
+ * @param value The property value
+ */
+ public void setProperty(String key, Object value)
+ {
+ props.put(key,value);
+ } //}}}
+
+ //{{{ unsetProperty() method
+ /**
+ * Unsets a mode property.
+ * @param key The property name
+ * @since jEdit 3.2pre3
+ */
+ public void unsetProperty(String key)
+ {
+ props.remove(key);
+ } //}}}
+
+ //{{{ setProperties() method
+ /**
+ * Should only be called by <code>XModeHandler</code>.
+ * @since jEdit 4.0pre3
+ */
+ public void setProperties(Map props)
+ {
+ if(props == null)
+ props = new Hashtable<String, Object>();
+
+ ignoreWhitespace = !"false".equalsIgnoreCase(
+ (String)props.get("ignoreWhitespace"));
+
+ // need to carry over file name and first line globs because they are
+ // not given to us by the XMode handler, but instead are filled in by
+ // the catalog loader.
+ String filenameGlob = (String)this.props.get("filenameGlob");
+ String firstlineGlob = (String)this.props.get("firstlineGlob");
+ String filename = (String)this.props.get("file");
+ this.props = props;
+ if(filenameGlob != null)
+ props.put("filenameGlob",filenameGlob);
+ if(firstlineGlob != null)
+ props.put("firstlineGlob",firstlineGlob);
+ if(filename != null)
+ props.put("file",filename);
+ } //}}}
+
+ //{{{ accept() method
+ /**
+ * Returns true if the edit mode is suitable for editing the specified
+ * file. The buffer name and first line is checked against the
+ * file name and first line globs, respectively.
+ * @param fileName The buffer's name
+ * @param firstLine The first line of the buffer
+ *
+ * @since jEdit 3.2pre3
+ */
+ public boolean accept(String fileName, String firstLine)
+ {
+ return acceptFilename(fileName) || acceptFirstLine(firstLine);
+ } //}}}
+
+ //{{{ acceptFilename() method
+ /**
+ * Returns true if the buffer name matches the file name glob.
+ * @param fileName The buffer's name
+ * @return true if the file name matches the file name glob.
+ * @since jEdit 4.3pre18
+ */
+ public boolean acceptFilename(String fileName)
+ {
+ return filenameRE != null && filenameRE.matcher(fileName).matches();
+ } //}}}
+
+ //{{{ acceptFilenameIdentical() method
+ /**
+ * Returns true if the buffer name is identical to the file name glob.
+ * This works only for regular expressions that only represent themselves,
+ * i.e. without any meta-characters.
+ * @param fileName The buffer's name
+ * @return true if the file name matches the file name glob.
+ * @since jEdit 4.4pre1
+ */
+ public boolean acceptFilenameIdentical(String fileName)
+ {
+ if (fileName == null)
+ {
+ return false;
+ }
+ return (fileName.equals((String)getProperty("filenameGlob")) &&
+ (filenameRE == null || filenameRE.matcher(fileName).matches()));
+ } //}}}
+
+ //{{{ acceptFirstLine() method
+ /**
+ * Returns true if the first line matches the first line glob.
+ * @param firstLine The first line of the buffer
+ * @return true if the first line matches the first line glob.
+ * @since jEdit 4.3pre18
+ */
+ public boolean acceptFirstLine(String firstLine)
+ {
+ return firstlineRE != null && firstlineRE.matcher(firstLine).matches();
+ } //}}}
+
+ //{{{ getName() method
+ /**
+ * Returns the internal name of this edit mode.
+ */
+ public String getName()
+ {
+ return name;
+ } //}}}
+
+ //{{{ toString() method
+ /**
+ * Returns a string representation of this edit mode.
+ */
+ public String toString()
+ {
+ return name;
+ } //}}}
+
+ //{{{ getIgnoreWhitespace() method
+ public boolean getIgnoreWhitespace()
+ {
+ return ignoreWhitespace;
+ } //}}}
+
+ //{{{ Indent rules
+
+ public synchronized List<IndentRule> getIndentRules()
+ {
+ if (indentRules == null)
+ {
+ initIndentRules();
+ }
+ return indentRules;
+ }
+
+ public synchronized boolean isElectricKey(char ch)
+ {
+ if (electricKeys == null)
+ {
+ String[] props = {
+ "indentOpenBrackets",
+ "indentCloseBrackets",
+ "electricKeys"
+ };
+
+ StringBuilder buf = new StringBuilder();
+ for(int i = 0; i < props.length; i++)
+ {
+ String prop = (String) getProperty(props[i]);
+ if (prop != null)
+ buf.append(prop);
+ }
+
+ electricKeys = buf.toString();
+ }
+
+ return (electricKeys.indexOf(ch) >= 0);
+ }
+
+ private void initIndentRules()
+ {
+ List<IndentRule> rules = new LinkedList<IndentRule>();
+
+ String[] regexpProps = {
+ "indentNextLine",
+ "indentNextLines"
+ };
+
+ for(int i = 0; i < regexpProps.length; i++)
+ {
+ IndentRule rule = createRegexpIndentRule(regexpProps[i]);
+ if(rule != null)
+ rules.add(rule);
+ }
+
+ String[] bracketProps = {
+ "indentOpenBracket",
+ "indentCloseBracket",
+ "unalignedOpenBracket",
+ "unalignedCloseBracket",
+ };
+
+ for(int i = 0; i < bracketProps.length; i++)
+ {
+ createBracketIndentRules(bracketProps[i], rules);
+ }
+
+ String[] finalProps = {
+ "unindentThisLine",
+ "unindentNextLines"
+ };
+
+ for(int i = 0; i < finalProps.length; i++)
+ {
+ IndentRule rule = createRegexpIndentRule(finalProps[i]);
+ if(rule != null)
+ rules.add(rule);
+ }
+
+ if (getBooleanProperty("deepIndent"))
+ {
+ String unalignedOpenBrackets = (String) getProperty("unalignedOpenBrackets");
+ if (unalignedOpenBrackets != null)
+ {
+ for (int i = 0 ; i < unalignedOpenBrackets.length();i++)
+ {
+ char openChar = unalignedOpenBrackets.charAt(i);
+ char closeChar = TextUtilities.getComplementaryBracket(openChar, null);
+ if (closeChar != '\0')
+ rules.add(new DeepIndentRule(openChar, closeChar));
+ }
+ }
+ }
+
+ if (!getIgnoreWhitespace())
+ rules.add(new WhitespaceRule());
+
+ indentRules = Collections.unmodifiableList(rules);
+ }
+
+ private IndentRule createRegexpIndentRule(String prop)
+ {
+ String value = (String) getProperty(prop);
+
+ try
+ {
+ if(value != null)
+ {
+ Method m = IndentRuleFactory.class.getMethod(
+ prop,new Class[] { String.class });
+ return (IndentRule)m.invoke(null, value);
+ }
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,"Bad indent rule " + prop
+ + '=' + value + ':');
+ Log.log(Log.ERROR,this,e);
+ }
+
+ return null;
+ }
+
+ private void createBracketIndentRules(String prop,
+ List<IndentRule> rules)
+ {
+ String value = (String) getProperty(prop + 's');
+
+ try
+ {
+ if(value != null)
+ {
+ for(int i = 0; i < value.length(); i++)
+ {
+ char ch = value.charAt(i);
+
+ Method m = IndentRuleFactory.class.getMethod(
+ prop,new Class[] { char.class });
+ rules.add((IndentRule) m.invoke(null, ch));
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,"Bad indent rule " + prop
+ + '=' + value + ':');
+ Log.log(Log.ERROR,this,e);
+ }
+ }
+
+ //}}}
+
+ //{{{ Private members
+ protected String name;
+ protected Map<String, Object> props;
+ private Pattern firstlineRE;
+ private Pattern filenameRE;
+ protected TokenMarker marker;
+ private List<IndentRule> indentRules;
+ private String electricKeys;
+ private boolean ignoreWhitespace;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/ModeCatalogHandler.java b/jEdit/org/gjt/sp/jedit/ModeCatalogHandler.java
index 18cd460..a734cdc 100644
--- a/jEdit/org/gjt/sp/jedit/ModeCatalogHandler.java
+++ b/jEdit/org/gjt/sp/jedit/ModeCatalogHandler.java
@@ -1,106 +1,104 @@
-/*
- * ModeCatalogHandler.java - XML handler for mode catalog files
- * Copyright (C) 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import org.gjt.sp.jedit.syntax.ModeProvider;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-//}}}
-
-/**
- * @author Slava Pestov
- */
-class ModeCatalogHandler extends DefaultHandler
-{
- //{{{ ModeCatalogHandler constructor
- ModeCatalogHandler(String directory, boolean resource)
- {
- this.directory = directory;
- this.resource = resource;
- } //}}}
-
- //{{{ resolveEntity() method
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "catalog.dtd", getClass());
- } //}}}
-
- //{{{ startElement() method
- public void startElement(String uri, String localName,
- String qName, Attributes attrs)
- {
- if (qName.equals("MODE"))
- {
- String modeName = attrs.getValue("NAME");
-
- String file = attrs.getValue("FILE");
- if(file == null)
- {
- Log.log(Log.ERROR,this,directory + "catalog:"
- + " mode " + modeName + " doesn't have"
- + " a FILE attribute");
- }
-
- String filenameGlob = attrs.getValue("FILE_NAME_GLOB");
- String firstlineGlob = attrs.getValue("FIRST_LINE_GLOB");
-
-
- Mode mode = ModeProvider.instance.getMode(modeName);
- if(mode == null)
- {
- mode = instantiateMode(modeName);
- ModeProvider.instance.addMode(mode);
- }
-
- Object path;
- if(resource)
- path = jEdit.class.getResource(directory + file);
- else
- path = MiscUtilities.constructPath(directory,file);
- mode.setProperty("file",path);
-
- if(filenameGlob != null)
- mode.setProperty("filenameGlob",filenameGlob);
- else
- mode.unsetProperty("filenameGlob");
-
- if(firstlineGlob != null)
- mode.setProperty("firstlineGlob",firstlineGlob);
- else
- mode.unsetProperty("firstlineGlob");
-
- mode.init();
- }
- } //}}}
-
- protected Mode instantiateMode(String modeName)
- {
- return new Mode(modeName);
- }
-
- private String directory;
- private boolean resource;
-
-}
-
+/*
+ * ModeCatalogHandler.java - XML handler for mode catalog files
+ * Copyright (C) 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import org.gjt.sp.jedit.syntax.ModeProvider;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+//}}}
+
+/**
+ * @author Slava Pestov
+ */
+class ModeCatalogHandler extends DefaultHandler
+{
+ //{{{ ModeCatalogHandler constructor
+ ModeCatalogHandler(String directory, boolean resource)
+ {
+ this.directory = directory;
+ this.resource = resource;
+ } //}}}
+
+ //{{{ resolveEntity() method
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "catalog.dtd", getClass());
+ } //}}}
+
+ //{{{ startElement() method
+ public void startElement(String uri, String localName,
+ String qName, Attributes attrs)
+ {
+ if (qName.equals("MODE"))
+ {
+ String modeName = attrs.getValue("NAME");
+
+ String file = attrs.getValue("FILE");
+ if(file == null)
+ {
+ Log.log(Log.ERROR,this,directory + "catalog:"
+ + " mode " + modeName + " doesn't have"
+ + " a FILE attribute");
+ }
+
+ String filenameGlob = attrs.getValue("FILE_NAME_GLOB");
+ String firstlineGlob = attrs.getValue("FIRST_LINE_GLOB");
+
+
+ Mode mode = ModeProvider.instance.getMode(modeName);
+ if (mode == null)
+ {
+ mode = instantiateMode(modeName);
+ }
+ ModeProvider.instance.addMode(mode);
+
+ Object path;
+ if(resource)
+ path = jEdit.class.getResource(directory + file);
+ else
+ path = MiscUtilities.constructPath(directory,file);
+ mode.setProperty("file",path);
+
+ mode.unsetProperty("filenameGlob");
+ if(filenameGlob != null)
+ mode.setProperty("filenameGlob",filenameGlob);
+
+ mode.unsetProperty("firstlineGlob");
+ if(firstlineGlob != null)
+ mode.setProperty("firstlineGlob",firstlineGlob);
+
+ mode.init();
+ }
+ } //}}}
+
+ protected Mode instantiateMode(String modeName)
+ {
+ return new Mode(modeName);
+ }
+
+ private String directory;
+ private boolean resource;
+
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/OperatingSystem.java b/jEdit/org/gjt/sp/jedit/OperatingSystem.java
index a8d402e..86953a2 100644
--- a/jEdit/org/gjt/sp/jedit/OperatingSystem.java
+++ b/jEdit/org/gjt/sp/jedit/OperatingSystem.java
@@ -1,374 +1,374 @@
-/*
- * OperatingSystem.java - OS detection
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import java.awt.GraphicsConfiguration;
-import java.awt.GraphicsDevice;
-import java.awt.GraphicsEnvironment;
-import java.awt.Rectangle;
-import java.awt.Toolkit;
-import javax.swing.UIManager;
-import java.io.File;
-import java.util.Set;
-import java.util.HashSet;
-
-import org.gjt.sp.util.Log;
-
-/**
- * Operating system detection routines.
- * @author Slava Pestov
- * @version $Id: OperatingSystem.java 14467 2009-01-25 13:17:42Z kpouer $
- * @since jEdit 4.0pre4
- */
-public class OperatingSystem
-{
- //{{{ getScreenBounds() method
- /**
- * Returns the bounds of the default screen.
- */
- public static Rectangle getScreenBounds()
- {
- int screenX = (int)Toolkit.getDefaultToolkit().getScreenSize().getWidth();
- int screenY = (int)Toolkit.getDefaultToolkit().getScreenSize().getHeight();
- int x, y, w, h;
-
- if (isMacOS())
- {
- x = 0;
- y = 22;
- w = screenX;
- h = screenY - y - 4;//shadow size
- }
- else if (isWindows())
- {
- x = -4;
- y = -4;
- w = screenX - 2*x;
- h = screenY - 2*y;
- }
- else
- {
- x = 0;
- y = 0;
- w = screenX;
- h = screenY;
- }
-
- return new Rectangle(x,y,w,h);
- } //}}}
-
- //{{{ getScreenBounds() method
- /**
- * Returns the bounds of the (virtual) screen that the window should be in
- * @param window The bounds of the window to get the screen for
- */
- public static Rectangle getScreenBounds(Rectangle window)
- {
- GraphicsDevice[] gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
- Set<GraphicsConfiguration> intersects = new HashSet<GraphicsConfiguration>();
-
- // Get available screens
- // O(n^3), this is nasty, but since we aren't dealling with
- // many items it should be fine
- for (int i=0; i < gd.length; i++)
- {
- GraphicsConfiguration gc = gd[i]
- .getDefaultConfiguration();
- // Don't add duplicates
- if (window.intersects(gc.getBounds()))
- {
- if (!intersects.contains(gc))
- intersects.add(gc);
- }
- }
-
- GraphicsConfiguration choice = null;
- if (!intersects.isEmpty())
- {
- // Pick screen with largest intersection
- for (GraphicsConfiguration gcc : intersects)
- {
- if (choice == null)
- choice = gcc;
- else
- {
- Rectangle int1 = choice.getBounds().intersection(window);
- Rectangle int2 = gcc.getBounds().intersection(window);
- int area1 = int1.width * int1.height;
- int area2 = int2.width * int2.height;
- if (area2 > area1)
- choice = gcc;
- }
- }
- }
- else
- choice = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
-
- // Make adjustments for some OS's
- int screenX = choice.getBounds().x;
- int screenY = choice.getBounds().y;
- int screenW = choice.getBounds().width;
- int screenH = choice.getBounds().height;
- int x, y, w, h;
-
- if (isMacOS())
- {
- x = screenX;
- y = screenY + 22;
- w = screenW;
- h = screenH - y - 4;//shadow size
- }
- else
- {
- x = screenX;
- y = screenY;
- w = screenW;
- h = screenH;
- }
-
- // Yay, we're finally there
- return new Rectangle(x,y,w,h);
- } //}}}
-
- //{{{ isDOSDerived() method
- /**
- * Returns if we're running Windows 95/98/ME/NT/2000/XP, or OS/2.
- */
- public static boolean isDOSDerived()
- {
- return isWindows() || isOS2();
- } //}}}
-
- //{{{ isWindows() method
- /**
- * Returns if we're running Windows 95/98/ME/NT/2000/XP.
- */
- public static boolean isWindows()
- {
- return os == WINDOWS_9x || os == WINDOWS_NT;
- } //}}}
-
- //{{{ isWindows9x() method
- /**
- * Returns if we're running Windows 95/98/ME.
- */
- public static boolean isWindows9x()
- {
- return os == WINDOWS_9x;
- } //}}}
-
- //{{{ isWindowsNT() method
- /**
- * Returns if we're running Windows NT/2000/XP.
- */
- public static boolean isWindowsNT()
- {
- return os == WINDOWS_NT;
- } //}}}
-
- //{{{ isOS2() method
- /**
- * Returns if we're running OS/2.
- */
- public static boolean isOS2()
- {
- return os == OS2;
- } //}}}
-
- //{{{ isUnix() method
- /**
- * Returns if we're running Unix (this includes MacOS X).
- */
- public static boolean isUnix()
- {
- return os == UNIX || os == MAC_OS_X;
- } //}}}
-
- //{{{ isMacOS() method
- /**
- * Returns if we're running MacOS X.
- */
- public static boolean isMacOS()
- {
- return os == MAC_OS_X;
- } //}}}
-
- //{{{ isX11() method
- /**
- * Returns if this OS is likely to be using X11 as the graphics
- * system.
- * @since jEdit 4.2pre3
- */
- public static boolean isX11()
- {
- return os == UNIX;
- } //}}}
-
- //{{{ isVMS() method
- /**
- * Returns if we're running VMS.
- */
- public static boolean isVMS()
- {
- return os == VMS;
- } //}}}
-
- //{{{ isMacOSLF() method
- /**
- * Returns if we're running MacOS X and using the native look and feel.
- */
- public static boolean isMacOSLF()
- {
- return isMacOS() && UIManager.getLookAndFeel().isNativeLookAndFeel();
- } //}}}
-
- //{{{ hasScreenMenuBar() method
- /**
- * Returns whether the screen menu bar on Mac OS X is in use.
- * @since jEdit 4.2pre1
- */
- public static boolean hasScreenMenuBar()
- {
- if(!isMacOS())
- return false;
- else if(hasScreenMenuBar == -1)
- {
- String result = System.getProperty("apple.laf.useScreenMenuBar");
- if (result == null)
- result = System.getProperty("com.apple.macos.useScreenMenuBar");
- hasScreenMenuBar = "true".equals(result) ? 1 : 0;
- }
-
- return hasScreenMenuBar == 1;
- } //}}}
-
- //{{{ hasJava14() method
- /**
- * Returns if Java 2 version 1.4, or Java 2 version 1.5 is in use.
- */
- @Deprecated
- public static boolean hasJava14()
- {
- // jEdit 4.3 requires Java 1.4 or later. However, this method exists
- // for two reasons. Compatibility with plugins for jEdit 4.2, and
- // in case somebody wants to borrow this class for their app.
- return java14;
- } //}}}
-
- //{{{ hasJava15() method
- /**
- * Returns if Java 2 version 1.5 is in use.
- */
- @Deprecated
- public static boolean hasJava15()
- {
- return java15;
- } //}}}
-
- //{{{ hasJava16() method
- /**
- * Returns if Java 2 version 1.6 is in use.
- * @since jEdit 4.3pre17
- */
- public static boolean hasJava16()
- {
- return java16;
- } //}}}
-
- //{{{ isCaseInsensitiveFS() method
- /**
- * @since jEdit 4.3pre2
- */
- public static boolean isCaseInsensitiveFS()
- {
- return isDOSDerived() || isMacOS();
- } //}}}
-
- //{{{ Private members
- private static final int UNIX = 0x31337;
- private static final int WINDOWS_9x = 0x640;
- private static final int WINDOWS_NT = 0x666;
- private static final int OS2 = 0xDEAD;
- private static final int MAC_OS_X = 0xABC;
- private static final int VMS = 0xDEAD2;
- private static final int UNKNOWN = 0xBAD;
-
- private static int os;
- private static boolean java14;
- private static boolean java15;
- private static boolean java16;
- private static int hasScreenMenuBar = -1;
-
- //{{{ Class initializer
- static
- {
- if(System.getProperty("mrj.version") != null)
- {
- os = MAC_OS_X;
- }
- else
- {
- String osName = System.getProperty("os.name");
- if(osName.contains("Windows 9")
- || osName.contains("Windows M"))
- {
- os = WINDOWS_9x;
- }
- else if(osName.contains("Windows"))
- {
- os = WINDOWS_NT;
- }
- else if(osName.contains("OS/2"))
- {
- os = OS2;
- }
- else if(osName.contains("VMS"))
- {
- os = VMS;
- }
- else if(File.separatorChar == '/')
- {
- os = UNIX;
- }
- else
- {
- os = UNKNOWN;
- Log.log(Log.WARNING,OperatingSystem.class,
- "Unknown operating system: " + osName);
- }
- }
-
- // for debugging, make jEdit think its using a different
- // version of Java than it really is.
- String javaVersion = System.getProperty("jedit.force.java.version");
- if(javaVersion == null || javaVersion.length() == 0)
- javaVersion = System.getProperty("java.version");
- if(javaVersion == null || javaVersion.length() == 0)
- javaVersion = System.getProperty("java.runtime.version");
- java14 = javaVersion.compareTo("1.4") >= 0;
- java15 = javaVersion.compareTo("1.5") >= 0;
- java16 = javaVersion.compareTo("1.6") >= 0;
- } //}}}
-
- //}}}
-}
+/*
+ * OperatingSystem.java - OS detection
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Rectangle;
+import java.awt.Toolkit;
+import javax.swing.UIManager;
+import java.io.File;
+import java.util.Set;
+import java.util.HashSet;
+
+import org.gjt.sp.util.Log;
+
+/**
+ * Operating system detection routines.
+ * @author Slava Pestov
+ * @version $Id: OperatingSystem.java 14467 2009-01-25 13:17:42Z kpouer $
+ * @since jEdit 4.0pre4
+ */
+public class OperatingSystem
+{
+ //{{{ getScreenBounds() method
+ /**
+ * Returns the bounds of the default screen.
+ */
+ public static Rectangle getScreenBounds()
+ {
+ int screenX = (int)Toolkit.getDefaultToolkit().getScreenSize().getWidth();
+ int screenY = (int)Toolkit.getDefaultToolkit().getScreenSize().getHeight();
+ int x, y, w, h;
+
+ if (isMacOS())
+ {
+ x = 0;
+ y = 22;
+ w = screenX;
+ h = screenY - y - 4;//shadow size
+ }
+ else if (isWindows())
+ {
+ x = -4;
+ y = -4;
+ w = screenX - 2*x;
+ h = screenY - 2*y;
+ }
+ else
+ {
+ x = 0;
+ y = 0;
+ w = screenX;
+ h = screenY;
+ }
+
+ return new Rectangle(x,y,w,h);
+ } //}}}
+
+ //{{{ getScreenBounds() method
+ /**
+ * Returns the bounds of the (virtual) screen that the window should be in
+ * @param window The bounds of the window to get the screen for
+ */
+ public static Rectangle getScreenBounds(Rectangle window)
+ {
+ GraphicsDevice[] gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
+ Set<GraphicsConfiguration> intersects = new HashSet<GraphicsConfiguration>();
+
+ // Get available screens
+ // O(n^3), this is nasty, but since we aren't dealling with
+ // many items it should be fine
+ for (int i=0; i < gd.length; i++)
+ {
+ GraphicsConfiguration gc = gd[i]
+ .getDefaultConfiguration();
+ // Don't add duplicates
+ if (window.intersects(gc.getBounds()))
+ {
+ if (!intersects.contains(gc))
+ intersects.add(gc);
+ }
+ }
+
+ GraphicsConfiguration choice = null;
+ if (!intersects.isEmpty())
+ {
+ // Pick screen with largest intersection
+ for (GraphicsConfiguration gcc : intersects)
+ {
+ if (choice == null)
+ choice = gcc;
+ else
+ {
+ Rectangle int1 = choice.getBounds().intersection(window);
+ Rectangle int2 = gcc.getBounds().intersection(window);
+ int area1 = int1.width * int1.height;
+ int area2 = int2.width * int2.height;
+ if (area2 > area1)
+ choice = gcc;
+ }
+ }
+ }
+ else
+ choice = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
+
+ // Make adjustments for some OS's
+ int screenX = choice.getBounds().x;
+ int screenY = choice.getBounds().y;
+ int screenW = choice.getBounds().width;
+ int screenH = choice.getBounds().height;
+ int x, y, w, h;
+
+ if (isMacOS())
+ {
+ x = screenX;
+ y = screenY + 22;
+ w = screenW;
+ h = screenH - y - 4;//shadow size
+ }
+ else
+ {
+ x = screenX;
+ y = screenY;
+ w = screenW;
+ h = screenH;
+ }
+
+ // Yay, we're finally there
+ return new Rectangle(x,y,w,h);
+ } //}}}
+
+ //{{{ isDOSDerived() method
+ /**
+ * Returns if we're running Windows 95/98/ME/NT/2000/XP, or OS/2.
+ */
+ public static boolean isDOSDerived()
+ {
+ return isWindows() || isOS2();
+ } //}}}
+
+ //{{{ isWindows() method
+ /**
+ * Returns if we're running Windows 95/98/ME/NT/2000/XP.
+ */
+ public static boolean isWindows()
+ {
+ return os == WINDOWS_9x || os == WINDOWS_NT;
+ } //}}}
+
+ //{{{ isWindows9x() method
+ /**
+ * Returns if we're running Windows 95/98/ME.
+ */
+ public static boolean isWindows9x()
+ {
+ return os == WINDOWS_9x;
+ } //}}}
+
+ //{{{ isWindowsNT() method
+ /**
+ * Returns if we're running Windows NT/2000/XP.
+ */
+ public static boolean isWindowsNT()
+ {
+ return os == WINDOWS_NT;
+ } //}}}
+
+ //{{{ isOS2() method
+ /**
+ * Returns if we're running OS/2.
+ */
+ public static boolean isOS2()
+ {
+ return os == OS2;
+ } //}}}
+
+ //{{{ isUnix() method
+ /**
+ * Returns if we're running Unix (this includes MacOS X).
+ */
+ public static boolean isUnix()
+ {
+ return os == UNIX || os == MAC_OS_X;
+ } //}}}
+
+ //{{{ isMacOS() method
+ /**
+ * Returns if we're running MacOS X.
+ */
+ public static boolean isMacOS()
+ {
+ return os == MAC_OS_X;
+ } //}}}
+
+ //{{{ isX11() method
+ /**
+ * Returns if this OS is likely to be using X11 as the graphics
+ * system.
+ * @since jEdit 4.2pre3
+ */
+ public static boolean isX11()
+ {
+ return os == UNIX;
+ } //}}}
+
+ //{{{ isVMS() method
+ /**
+ * Returns if we're running VMS.
+ */
+ public static boolean isVMS()
+ {
+ return os == VMS;
+ } //}}}
+
+ //{{{ isMacOSLF() method
+ /**
+ * Returns if we're running MacOS X and using the native look and feel.
+ */
+ public static boolean isMacOSLF()
+ {
+ return isMacOS() && UIManager.getLookAndFeel().isNativeLookAndFeel();
+ } //}}}
+
+ //{{{ hasScreenMenuBar() method
+ /**
+ * Returns whether the screen menu bar on Mac OS X is in use.
+ * @since jEdit 4.2pre1
+ */
+ public static boolean hasScreenMenuBar()
+ {
+ if(!isMacOS())
+ return false;
+ else if(hasScreenMenuBar == -1)
+ {
+ String result = System.getProperty("apple.laf.useScreenMenuBar");
+ if (result == null)
+ result = System.getProperty("com.apple.macos.useScreenMenuBar");
+ hasScreenMenuBar = "true".equals(result) ? 1 : 0;
+ }
+
+ return hasScreenMenuBar == 1;
+ } //}}}
+
+ //{{{ hasJava14() method
+ /**
+ * Returns if Java 2 version 1.4, or Java 2 version 1.5 is in use.
+ */
+ @Deprecated
+ public static boolean hasJava14()
+ {
+ // jEdit 4.3 requires Java 1.4 or later. However, this method exists
+ // for two reasons. Compatibility with plugins for jEdit 4.2, and
+ // in case somebody wants to borrow this class for their app.
+ return java14;
+ } //}}}
+
+ //{{{ hasJava15() method
+ /**
+ * Returns if Java 2 version 1.5 is in use.
+ */
+ @Deprecated
+ public static boolean hasJava15()
+ {
+ return java15;
+ } //}}}
+
+ //{{{ hasJava16() method
+ /**
+ * Returns if Java 2 version 1.6 is in use.
+ * @since jEdit 4.3pre17
+ */
+ public static boolean hasJava16()
+ {
+ return java16;
+ } //}}}
+
+ //{{{ isCaseInsensitiveFS() method
+ /**
+ * @since jEdit 4.3pre2
+ */
+ public static boolean isCaseInsensitiveFS()
+ {
+ return isDOSDerived() || isMacOS();
+ } //}}}
+
+ //{{{ Private members
+ private static final int UNIX = 0x31337;
+ private static final int WINDOWS_9x = 0x640;
+ private static final int WINDOWS_NT = 0x666;
+ private static final int OS2 = 0xDEAD;
+ private static final int MAC_OS_X = 0xABC;
+ private static final int VMS = 0xDEAD2;
+ private static final int UNKNOWN = 0xBAD;
+
+ private static int os;
+ private static boolean java14;
+ private static boolean java15;
+ private static boolean java16;
+ private static int hasScreenMenuBar = -1;
+
+ //{{{ Class initializer
+ static
+ {
+ if(System.getProperty("mrj.version") != null)
+ {
+ os = MAC_OS_X;
+ }
+ else
+ {
+ String osName = System.getProperty("os.name");
+ if(osName.contains("Windows 9")
+ || osName.contains("Windows M"))
+ {
+ os = WINDOWS_9x;
+ }
+ else if(osName.contains("Windows"))
+ {
+ os = WINDOWS_NT;
+ }
+ else if(osName.contains("OS/2"))
+ {
+ os = OS2;
+ }
+ else if(osName.contains("VMS"))
+ {
+ os = VMS;
+ }
+ else if(File.separatorChar == '/')
+ {
+ os = UNIX;
+ }
+ else
+ {
+ os = UNKNOWN;
+ Log.log(Log.WARNING,OperatingSystem.class,
+ "Unknown operating system: " + osName);
+ }
+ }
+
+ // for debugging, make jEdit think its using a different
+ // version of Java than it really is.
+ String javaVersion = System.getProperty("jedit.force.java.version");
+ if(javaVersion == null || javaVersion.length() == 0)
+ javaVersion = System.getProperty("java.version");
+ if(javaVersion == null || javaVersion.length() == 0)
+ javaVersion = System.getProperty("java.runtime.version");
+ java14 = javaVersion.compareTo("1.4") >= 0;
+ java15 = javaVersion.compareTo("1.5") >= 0;
+ java16 = javaVersion.compareTo("1.6") >= 0;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/OptionGroup.java b/jEdit/org/gjt/sp/jedit/OptionGroup.java
index 30072c0..cd30a38 100644
--- a/jEdit/org/gjt/sp/jedit/OptionGroup.java
+++ b/jEdit/org/gjt/sp/jedit/OptionGroup.java
@@ -1,203 +1,203 @@
-/*
- * OptionGroup.java - Option pane group
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000 mike dillon
- * Portions copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import java.util.*;
-
-/**
- * A set of option panes shown in one branch in the options dialog.<p>
- *
- * Plugins should not create instances of this class directly. See
- * {@link EditPlugin} for information on how jEdit obtains and constructs
- * option pane instances.
- *
- * @author Mike Dillon
- * @version $Id: OptionGroup.java 14444 2009-01-24 06:19:57Z shlomy $
- */
-public class OptionGroup
-{
-
- // {{{ data members
- protected final String name;
- protected final String label;
- protected final Vector<Object> members;
- private boolean sort;
- // }}}
-
- //{{{ OptionGroup constructor
- /**
- * Creates an option group.
- * @param name The internal name of the option group, used to key a
- * property <code>options.<i>name</i>.label</code> which is the
- * label displayed in the options dialog.
- * @see jEdit#getProperty(String)
- */
- public OptionGroup(String name)
- {
- this.name = name;
- label = jEdit.getProperty("options." + name + ".label");
- members = new Vector<Object>();
- } //}}}
-
- //{{{ OptionGroup constructor
- /**
- * Creates an option group.
- * @param label The label
- * @param options A whitespace-separated list of option pane names
- * @since jEdit 4.2pre2
- */
- public OptionGroup(String name, String label, String options)
- {
- this.name = name;
- this.label = label;
- members = new Vector<Object>();
-
- StringTokenizer st = new StringTokenizer(options);
- while(st.hasMoreTokens())
- {
- String pane = st.nextToken();
- addOptionPane(pane);
- }
- } //}}}
-
- //{{{ getName() method
- public String getName()
- {
- return name;
- } //}}}
-
- //{{{ getLabel() method
- /**
- * Returns the option group's human-readable label.
- * @since jEdit 4.2pre1
- */
- public String getLabel()
- {
- return label;
- } //}}}
-
- //{{{ addOptionGroup() method
- public void addOptionGroup(OptionGroup group)
- {
- insertionSort(group.getLabel(),group);
- } //}}}
-
- //{{{ addOptionPane() method
- public void addOptionPane(OptionPane pane)
- {
- String label = jEdit.getProperty("options."
- + pane.getName() + ".label","NO LABEL PROPERTY: "
- + pane.getName());
-
- insertionSort(label,pane);
- } //}}}
-
- //{{{ addOptionPane() method
- public void addOptionPane(String pane)
- {
- String label = jEdit.getProperty("options."
- + pane + ".label","NO LABEL PROPERTY: "
- + pane);
-
- insertionSort(label,pane);
- } //}}}
-
- //{{{ getMembers() method
- public Enumeration<Object> getMembers()
- {
- return members.elements();
- } //}}}
-
- //{{{ getMember() method
- public Object getMember(int index)
- {
- return (index >= 0 && index < members.size())
- ? members.elementAt(index) : null;
- } //}}}
-
- //{{{ getMemberIndex() method
- public int getMemberIndex(Object member)
- {
- return members.indexOf(member);
- } //}}}
-
- //{{{ getMemberCount() method
- public int getMemberCount()
- {
- return members.size();
- } //}}}
-
- //{{{ setSort() method
- /**
- * Sets if the members of this group should be sorted.
- * @since jEdit 4.2pre3
- */
- public void setSort(boolean sort)
- {
- this.sort = sort;
- } //}}}
-
- //{{{ Private members
-
-
- //{{{ insertionSort() method
- private void insertionSort(String newLabel, Object newObj)
- {
- if(sort)
- {
- for(int i = 0; i < members.size(); i++)
- {
- Object obj = members.elementAt(i);
- String label;
- if(obj instanceof OptionPane)
- {
- String name = ((OptionPane)obj).getName();
- label = jEdit.getProperty("options."
- + name + ".label","NO LABEL PROPERTY: "
- + name);
- }
- else if(obj instanceof String)
- {
- label = jEdit.getProperty("options."
- + obj + ".label","NO LABEL PROPERTY: "
- + obj);
- }
- else if(obj instanceof OptionGroup)
- label = ((OptionGroup)obj).getLabel();
- else
- throw new InternalError();
-
- if(newLabel.compareToIgnoreCase(label) < 0)
- {
- members.insertElementAt(newObj,i);
- return;
- }
- }
- }
-
- members.addElement(newObj);
- } //}}}
-
- //}}}
-}
+/*
+ * OptionGroup.java - Option pane group
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000 mike dillon
+ * Portions copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import java.util.*;
+
+/**
+ * A set of option panes shown in one branch in the options dialog.<p>
+ *
+ * Plugins should not create instances of this class directly. See
+ * {@link EditPlugin} for information on how jEdit obtains and constructs
+ * option pane instances.
+ *
+ * @author Mike Dillon
+ * @version $Id: OptionGroup.java 14444 2009-01-24 06:19:57Z shlomy $
+ */
+public class OptionGroup
+{
+
+ // {{{ data members
+ protected final String name;
+ protected final String label;
+ protected final Vector<Object> members;
+ private boolean sort;
+ // }}}
+
+ //{{{ OptionGroup constructor
+ /**
+ * Creates an option group.
+ * @param name The internal name of the option group, used to key a
+ * property <code>options.<i>name</i>.label</code> which is the
+ * label displayed in the options dialog.
+ * @see jEdit#getProperty(String)
+ */
+ public OptionGroup(String name)
+ {
+ this.name = name;
+ label = jEdit.getProperty("options." + name + ".label");
+ members = new Vector<Object>();
+ } //}}}
+
+ //{{{ OptionGroup constructor
+ /**
+ * Creates an option group.
+ * @param label The label
+ * @param options A whitespace-separated list of option pane names
+ * @since jEdit 4.2pre2
+ */
+ public OptionGroup(String name, String label, String options)
+ {
+ this.name = name;
+ this.label = label;
+ members = new Vector<Object>();
+
+ StringTokenizer st = new StringTokenizer(options);
+ while(st.hasMoreTokens())
+ {
+ String pane = st.nextToken();
+ addOptionPane(pane);
+ }
+ } //}}}
+
+ //{{{ getName() method
+ public String getName()
+ {
+ return name;
+ } //}}}
+
+ //{{{ getLabel() method
+ /**
+ * Returns the option group's human-readable label.
+ * @since jEdit 4.2pre1
+ */
+ public String getLabel()
+ {
+ return label;
+ } //}}}
+
+ //{{{ addOptionGroup() method
+ public void addOptionGroup(OptionGroup group)
+ {
+ insertionSort(group.getLabel(),group);
+ } //}}}
+
+ //{{{ addOptionPane() method
+ public void addOptionPane(OptionPane pane)
+ {
+ String label = jEdit.getProperty("options."
+ + pane.getName() + ".label","NO LABEL PROPERTY: "
+ + pane.getName());
+
+ insertionSort(label,pane);
+ } //}}}
+
+ //{{{ addOptionPane() method
+ public void addOptionPane(String pane)
+ {
+ String label = jEdit.getProperty("options."
+ + pane + ".label","NO LABEL PROPERTY: "
+ + pane);
+
+ insertionSort(label,pane);
+ } //}}}
+
+ //{{{ getMembers() method
+ public Enumeration<Object> getMembers()
+ {
+ return members.elements();
+ } //}}}
+
+ //{{{ getMember() method
+ public Object getMember(int index)
+ {
+ return (index >= 0 && index < members.size())
+ ? members.elementAt(index) : null;
+ } //}}}
+
+ //{{{ getMemberIndex() method
+ public int getMemberIndex(Object member)
+ {
+ return members.indexOf(member);
+ } //}}}
+
+ //{{{ getMemberCount() method
+ public int getMemberCount()
+ {
+ return members.size();
+ } //}}}
+
+ //{{{ setSort() method
+ /**
+ * Sets if the members of this group should be sorted.
+ * @since jEdit 4.2pre3
+ */
+ public void setSort(boolean sort)
+ {
+ this.sort = sort;
+ } //}}}
+
+ //{{{ Private members
+
+
+ //{{{ insertionSort() method
+ private void insertionSort(String newLabel, Object newObj)
+ {
+ if(sort)
+ {
+ for(int i = 0; i < members.size(); i++)
+ {
+ Object obj = members.elementAt(i);
+ String label;
+ if(obj instanceof OptionPane)
+ {
+ String name = ((OptionPane)obj).getName();
+ label = jEdit.getProperty("options."
+ + name + ".label","NO LABEL PROPERTY: "
+ + name);
+ }
+ else if(obj instanceof String)
+ {
+ label = jEdit.getProperty("options."
+ + obj + ".label","NO LABEL PROPERTY: "
+ + obj);
+ }
+ else if(obj instanceof OptionGroup)
+ label = ((OptionGroup)obj).getLabel();
+ else
+ throw new InternalError();
+
+ if(newLabel.compareToIgnoreCase(label) < 0)
+ {
+ members.insertElementAt(newObj,i);
+ return;
+ }
+ }
+ }
+
+ members.addElement(newObj);
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/OptionPane.java b/jEdit/org/gjt/sp/jedit/OptionPane.java
index b0bfbf8..a7f976f 100644
--- a/jEdit/org/gjt/sp/jedit/OptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/OptionPane.java
@@ -1,62 +1,62 @@
-/*
- * OptionPane.java - Option pane interface
- * Copyright (C) 1999 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import java.awt.Component;
-
-/**
- * The interface all option panes must implement.<p>
- *
- * See {@link EditPlugin} for information on how jEdit obtains and constructs
- * option pane instances.<p>
- *
- * Note that in most cases it is much easier to extend
- * {@link AbstractOptionPane} instead.
- *
- * @author Slava Pestov
- * @version $Id: OptionPane.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public interface OptionPane
-{
- /**
- * Returns the internal name of this option pane. The option pane's label
- * is set to the value of the property named
- * <code>options.<i>name</i>.label</code>.
- * @see jEdit#getProperty(String)
- */
- String getName();
-
- /**
- * Returns the component that should be displayed for this option pane.
- */
- Component getComponent();
-
- /**
- * This method is called every time the option pane is displayed.
- */
- void init();
-
- /**
- * Called when the options dialog's "ok" button is clicked.
- * This should save any properties being edited in this option
- * pane.
- */
- void save();
-}
+/*
+ * OptionPane.java - Option pane interface
+ * Copyright (C) 1999 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import java.awt.Component;
+
+/**
+ * The interface all option panes must implement.<p>
+ *
+ * See {@link EditPlugin} for information on how jEdit obtains and constructs
+ * option pane instances.<p>
+ *
+ * Note that in most cases it is much easier to extend
+ * {@link AbstractOptionPane} instead.
+ *
+ * @author Slava Pestov
+ * @version $Id: OptionPane.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public interface OptionPane
+{
+ /**
+ * Returns the internal name of this option pane. The option pane's label
+ * is set to the value of the property named
+ * <code>options.<i>name</i>.label</code>.
+ * @see jEdit#getProperty(String)
+ */
+ String getName();
+
+ /**
+ * Returns the component that should be displayed for this option pane.
+ */
+ Component getComponent();
+
+ /**
+ * This method is called every time the option pane is displayed.
+ */
+ void init();
+
+ /**
+ * Called when the options dialog's "ok" button is clicked.
+ * This should save any properties being edited in this option
+ * pane.
+ */
+ void save();
+}
diff --git a/jEdit/org/gjt/sp/jedit/PerspectiveManager.java b/jEdit/org/gjt/sp/jedit/PerspectiveManager.java
index 476d4a2..d495329 100644
--- a/jEdit/org/gjt/sp/jedit/PerspectiveManager.java
+++ b/jEdit/org/gjt/sp/jedit/PerspectiveManager.java
@@ -1,355 +1,378 @@
-/*
- * PerspectiveManager.java - Saves view configuration
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.LinkedList;
-
-import org.gjt.sp.util.IOUtilities;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Manages persistence of open buffers and views across jEdit sessions.
- * @since jEdit 4.2pre1
- * @author Slava Pestov
- * @version $Id: PerspectiveManager.java 15613 2009-06-30 07:07:43Z voituk $
- */
-public class PerspectiveManager
-{
- private static final String PERSPECTIVE_FILENAME = "perspective";
-
- //{{{ isPerspectiveDirty() method
- /**
- * We only autosave the perspective if it has changed, to avoid spinning
- * up the disk on laptops.
- * @since jEdit 4.2pre13
- */
- public static boolean isPerspectiveDirty()
- {
- return dirty;
- } //}}}
-
- //{{{ setPerspectiveDirty() method
- /**
- * We only autosave the perspective if it has changed, to avoid spinning
- * up the disk on laptops.
- * @since jEdit 4.2pre13
- */
- public static void setPerspectiveDirty(boolean dirty)
- {
- PerspectiveManager.dirty = dirty;
- } //}}}
-
- //{{{ isPerspectiveEnabled() method
- /**
- * We disable saving of the perspective while the 'close all' dialog is
- * showing.
- * @since jEdit 4.3pre2
- */
- public static boolean isPerspectiveEnabled()
- {
- return enabled;
- } //}}}
-
- //{{{ setPerspectiveEnabled() method
- /**
- * We disable saving of the perspective while the 'close all' dialog is
- * showing.
- * @since jEdit 4.3pre2
- */
- public static void setPerspectiveEnabled(boolean enabled)
- {
- PerspectiveManager.enabled = enabled;
- } //}}}
-
- //{{{ loadPerspective() method
- public static View loadPerspective(boolean restoreFiles)
- {
- if(perspectiveXML == null)
- return null;
-
- if(!perspectiveXML.fileExists())
- return null;
-
- Log.log(Log.MESSAGE,PerspectiveManager.class,"Loading " + perspectiveXML);
-
- PerspectiveHandler handler = new PerspectiveHandler(restoreFiles);
- try
- {
- perspectiveXML.load(handler);
- }
- catch(IOException e)
- {
- Log.log(Log.ERROR,PerspectiveManager.class,e);
- }
- return handler.view;
- } //}}}
-
- //{{{ savePerspective() method
- public static void savePerspective(boolean autosave)
- {
- if(!isPerspectiveEnabled() || !jEdit.isStartupDone())
- return;
-
- if(perspectiveXML == null)
- return;
-
- // backgrounded
- if(jEdit.getBufferCount() == 0)
- return;
-
- Buffer[] buffers = jEdit.getBuffers();
- Collection<Buffer> savedBuffers = new LinkedList<Buffer>();
- for (Buffer buffer: buffers)
- {
- if (!buffer.isNewFile())
- {
- savedBuffers.add(buffer);
- }
- }
-
- if(!autosave)
- Log.log(Log.MESSAGE,PerspectiveManager.class,"Saving " + perspectiveXML);
-
- String lineSep = System.getProperty("line.separator");
-
- SettingsXML.Saver out = null;
-
- try
- {
- out = perspectiveXML.openSaver();
- out.writeXMLDeclaration();
-
- out.write("<!DOCTYPE PERSPECTIVE SYSTEM \"perspective.dtd\">");
- out.write(lineSep);
- out.write("<PERSPECTIVE>");
- out.write(lineSep);
-
- for (Buffer buffer: savedBuffers)
- {
- out.write("<BUFFER AUTORELOAD=\"");
- out.write(buffer.getAutoReload() ? "TRUE" : "FALSE");
- out.write("\" AUTORELOAD_DIALOG=\"");
- out.write(buffer.getAutoReloadDialog() ? "TRUE" : "FALSE");
- out.write("\">");
- out.write(XMLUtilities.charsToEntities(buffer.getPath(), false));
- out.write("</BUFFER>");
- out.write(lineSep);
- }
-
- View[] views = jEdit.getViews();
- for(int i = 0; i < views.length; i++)
- {
- View view = views[i];
- // ensures that active view is saved last,
- // ie created last on next load, ie in front
- // on next load
- if(view == jEdit.getActiveView()
- && i != views.length - 1)
- {
- View last = views[views.length - 1];
- views[i] = last;
- views[views.length - 1] = view;
- view = last;
- }
-
- View.ViewConfig config = views[i].getViewConfig();
- out.write("<VIEW PLAIN=\"");
- out.write(config.plainView ? "TRUE" : "FALSE");
- out.write("\">");
-
- out.write("<PANES>");
- out.write(lineSep);
- out.write(XMLUtilities.charsToEntities(
- config.splitConfig,false));
- out.write(lineSep);
- out.write("</PANES>");
- out.write(lineSep);
-
- out.write("<GEOMETRY X=\"");
- out.write(String.valueOf(config.x));
- out.write("\" Y=\"");
- out.write(String.valueOf(config.y));
- out.write("\" WIDTH=\"");
- out.write(String.valueOf(config.width));
- out.write("\" HEIGHT=\"");
- out.write(String.valueOf(config.height));
- out.write("\" EXT_STATE=\"");
- out.write(String.valueOf(config.extState));
- out.write("\" />");
- out.write(lineSep);
-
- if (config.docking != null)
- config.docking.saveLayout(PERSPECTIVE_FILENAME, i);
-
- out.write("</VIEW>");
- out.write(lineSep);
- }
-
- out.write("</PERSPECTIVE>");
- out.write(lineSep);
-
- out.finish();
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,PerspectiveManager.class,"Error saving " + perspectiveXML);
- Log.log(Log.ERROR,PerspectiveManager.class,io);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
- } //}}}
-
- //{{{ Private members
- private static boolean dirty, enabled = true;
- private static SettingsXML perspectiveXML;
-
- //{{{ Class initializer
- static
- {
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory != null)
- {
- perspectiveXML = new SettingsXML(settingsDirectory, PERSPECTIVE_FILENAME);
- }
- } //}}}
-
- //{{{ PerspectiveHandler class
- private static class PerspectiveHandler extends DefaultHandler
- {
- View view;
- private StringBuilder charData;
- View.ViewConfig config;
- boolean restoreFiles;
- String autoReload, autoReloadDialog;
-
- PerspectiveHandler(boolean restoreFiles)
- {
- this.restoreFiles = restoreFiles;
- config = new View.ViewConfig();
- charData = new StringBuilder();
- config.docking = View.getDockingFrameworkProvider().createDockingLayout();
- }
-
- @Override
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "perspective.dtd", getClass());
- }
-
- @Override
- public void startElement(String uri, String localName,
- String qName, Attributes attrs)
- {
- charData.setLength(0);
- for (int i = 0; i < attrs.getLength(); i++)
- {
- String name = attrs.getQName(i);
- String value = attrs.getValue(i);
- attribute(name, value);
- }
- }
-
- private void attribute(String aname, String value)
- {
- if(aname.equals("X"))
- config.x = Integer.parseInt(value);
- else if(aname.equals("Y"))
- config.y = Integer.parseInt(value);
- else if(aname.equals("WIDTH"))
- config.width = Integer.parseInt(value);
- else if(aname.equals("HEIGHT"))
- config.height = Integer.parseInt(value);
- else if(aname.equals("EXT_STATE"))
- config.extState = Integer.parseInt(value);
- else if(aname.equals("PLAIN"))
- config.plainView = ("TRUE".equals(value));
- else if(aname.equals("AUTORELOAD"))
- autoReload = value;
- else if(aname.equals("AUTORELOAD_DIALOG"))
- autoReloadDialog = value;
- }
-
- /**
- * @return true if the uri points to a remote file
- */
- public static boolean skipRemote(String uri)
- {
- if (jEdit.getBooleanProperty("restore.remote"))
- return false;
- if(MiscUtilities.isURL(uri))
- {
- String protocol = MiscUtilities.getProtocolOfURL(uri);
- if (!protocol.equals("file")) return true;
- }
- return false;
- }
-
- @Override
- public void endElement(String uri, String localName, String name)
- {
- if(name.equals("BUFFER"))
- {
- if (restoreFiles && !skipRemote(charData.toString()))
- {
- Buffer restored = jEdit.openTemporary(null,null, charData.toString(), false);
- // if the autoReload attributes are not present, don't set anything
- // it's sufficient to check whether they are present on the first BUFFER element
- if (restored != null)
- {
- if(autoReload != null)
- restored.setAutoReload("TRUE".equals(autoReload));
- if(autoReloadDialog != null)
- restored.setAutoReloadDialog("TRUE".equals(autoReloadDialog));
- jEdit.commitTemporary(restored);
- }
- }
- }
- else if(name.equals("PANES"))
- config.splitConfig = charData.toString();
- else if(name.equals("VIEW"))
- {
- if (config.docking != null)
- config.docking.loadLayout(PERSPECTIVE_FILENAME, jEdit.getViewCount());
- view = jEdit.newView(view,null,config);
- config = new View.ViewConfig();
- config.docking = View.getDockingFrameworkProvider().createDockingLayout();
- }
- }
-
- @Override
- public void characters(char[] ch, int start, int length)
- {
- charData.append(ch,start,length);
- }
- } //}}}
-
- //}}}
-}
+/*
+ * PerspectiveManager.java - Saves view configuration
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.LinkedList;
+
+import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Manages persistence of open buffers and views across jEdit sessions.
+ * @since jEdit 4.2pre1
+ * @author Slava Pestov
+ * @version $Id: PerspectiveManager.java 19168 2010-12-29 23:24:51Z ezust $
+ */
+public class PerspectiveManager
+{
+ private static final String PERSPECTIVE_FILENAME = "perspective";
+
+ //{{{ isPerspectiveDirty() method
+ /**
+ * We only autosave the perspective if it has changed, to avoid spinning
+ * up the disk on laptops.
+ * @since jEdit 4.2pre13
+ */
+ public static boolean isPerspectiveDirty()
+ {
+ return dirty;
+ } //}}}
+
+ //{{{ setPerspectiveDirty() method
+ /**
+ * We only autosave the perspective if it has changed, to avoid spinning
+ * up the disk on laptops.
+ * @since jEdit 4.2pre13
+ */
+ public static void setPerspectiveDirty(boolean dirty)
+ {
+ PerspectiveManager.dirty = dirty;
+ } //}}}
+
+ //{{{ isPerspectiveEnabled() method
+ /**
+ * We disable saving of the perspective while the 'close all' dialog is
+ * showing.
+ * @since jEdit 4.3pre2
+ */
+ public static boolean isPerspectiveEnabled()
+ {
+ return enabled;
+ } //}}}
+
+ //{{{ setPerspectiveEnabled() method
+ /**
+ * We disable saving of the perspective while the 'close all' dialog is
+ * showing.
+ * @since jEdit 4.3pre2
+ */
+ public static void setPerspectiveEnabled(boolean enabled)
+ {
+ PerspectiveManager.enabled = enabled;
+ } //}}}
+
+ //{{{ loadPerspective() method
+ public static View loadPerspective(boolean restoreFiles)
+ {
+ if(perspectiveXML == null)
+ return null;
+
+ if(!perspectiveXML.fileExists())
+ return null;
+
+ Log.log(Log.MESSAGE,PerspectiveManager.class,"Loading " + perspectiveXML);
+
+ PerspectiveHandler handler = new PerspectiveHandler(restoreFiles);
+ try
+ {
+ perspectiveXML.load(handler);
+ }
+ catch(IOException e)
+ {
+ Log.log(Log.ERROR,PerspectiveManager.class,e);
+ }
+ return handler.view;
+ } //}}}
+
+ //{{{ savePerspective() method
+ public static void savePerspective(boolean autosave)
+ {
+ if(!isPerspectiveEnabled() || !jEdit.isStartupDone())
+ return;
+
+ if(perspectiveXML == null)
+ return;
+
+ // backgrounded
+ if(jEdit.getBufferCount() == 0)
+ return;
+
+ boolean restoreFiles = jEdit.getBooleanProperty("restore", true);
+ Buffer[] buffers = jEdit.getBuffers();
+ Collection<Buffer> savedBuffers = new LinkedList<Buffer>();
+ if (restoreFiles)
+ {
+ for (Buffer buffer: buffers)
+ {
+ if (!buffer.isNewFile())
+ {
+ savedBuffers.add(buffer);
+ }
+ }
+ }
+
+ if(!autosave)
+ Log.log(Log.MESSAGE,PerspectiveManager.class,"Saving " + perspectiveXML);
+
+ String lineSep = System.getProperty("line.separator");
+
+ SettingsXML.Saver out = null;
+
+ try
+ {
+ out = perspectiveXML.openSaver();
+ out.writeXMLDeclaration();
+
+ out.write("<!DOCTYPE PERSPECTIVE SYSTEM \"perspective.dtd\">");
+ out.write(lineSep);
+ out.write("<PERSPECTIVE>");
+ out.write(lineSep);
+
+ for (Buffer buffer: savedBuffers)
+ {
+ out.write("<BUFFER AUTORELOAD=\"");
+ out.write(buffer.getAutoReload() ? "TRUE" : "FALSE");
+ out.write("\" AUTORELOAD_DIALOG=\"");
+ out.write(buffer.getAutoReloadDialog() ? "TRUE" : "FALSE");
+ out.write("\">");
+ out.write(XMLUtilities.charsToEntities(buffer.getPath(), false));
+ out.write("</BUFFER>");
+ out.write(lineSep);
+ }
+
+ View[] views = jEdit.getViews();
+ for(int i = 0; i < views.length; i++)
+ {
+ View view = views[i];
+ // ensures that active view is saved last,
+ // ie created last on next load, ie in front
+ // on next load
+ if(view == jEdit.getActiveView()
+ && i != views.length - 1)
+ {
+ View last = views[views.length - 1];
+ views[i] = last;
+ views[views.length - 1] = view;
+ view = last;
+ }
+
+ View.ViewConfig config = views[i].getViewConfig();
+ out.write("<VIEW PLAIN=\"");
+ out.write(config.plainView ? "TRUE" : "FALSE");
+ out.write("\">");
+ out.write(lineSep);
+
+ if (config.title != null)
+ {
+ out.write(lineSep);
+ out.write("<TITLE>");
+ out.write(XMLUtilities.charsToEntities(config.title,false));
+ out.write("</TITLE>");
+ out.write(lineSep);
+ }
+
+ out.write("<PANES>");
+ out.write(lineSep);
+ // save the split config only if the user has
+ // elected to restore files on start up.
+ if (restoreFiles)
+ {
+ out.write(XMLUtilities.charsToEntities(
+ config.splitConfig,false));
+ }
+ out.write(lineSep);
+ out.write("</PANES>");
+ out.write(lineSep);
+
+ out.write("<GEOMETRY X=\"");
+ out.write(String.valueOf(config.x));
+ out.write("\" Y=\"");
+ out.write(String.valueOf(config.y));
+ out.write("\" WIDTH=\"");
+ out.write(String.valueOf(config.width));
+ out.write("\" HEIGHT=\"");
+ out.write(String.valueOf(config.height));
+ out.write("\" EXT_STATE=\"");
+ out.write(String.valueOf(config.extState));
+ out.write("\" />");
+ out.write(lineSep);
+
+ if (config.docking != null)
+ config.docking.saveLayout(PERSPECTIVE_FILENAME, i);
+
+ out.write("</VIEW>");
+ out.write(lineSep);
+ }
+
+ out.write("</PERSPECTIVE>");
+ out.write(lineSep);
+
+ out.finish();
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,PerspectiveManager.class,"Error saving " + perspectiveXML);
+ Log.log(Log.ERROR,PerspectiveManager.class,io);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private static boolean dirty, enabled = true;
+ private static SettingsXML perspectiveXML;
+
+ //{{{ Class initializer
+ static
+ {
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory != null)
+ {
+ perspectiveXML = new SettingsXML(settingsDirectory, PERSPECTIVE_FILENAME);
+ }
+ } //}}}
+
+ //{{{ PerspectiveHandler class
+ private static class PerspectiveHandler extends DefaultHandler
+ {
+ View view;
+ private StringBuilder charData;
+ View.ViewConfig config;
+ boolean restoreFiles;
+ String autoReload, autoReloadDialog;
+
+ PerspectiveHandler(boolean restoreFiles)
+ {
+ this.restoreFiles = restoreFiles;
+ config = new View.ViewConfig();
+ charData = new StringBuilder();
+ config.docking = View.getDockingFrameworkProvider().createDockingLayout();
+ }
+
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "perspective.dtd", getClass());
+ }
+
+ @Override
+ public void startElement(String uri, String localName,
+ String qName, Attributes attrs)
+ {
+ charData.setLength(0);
+ for (int i = 0; i < attrs.getLength(); i++)
+ {
+ String name = attrs.getQName(i);
+ String value = attrs.getValue(i);
+ attribute(name, value);
+ }
+ }
+
+ private void attribute(String aname, String value)
+ {
+ if(aname.equals("X"))
+ config.x = Integer.parseInt(value);
+ else if(aname.equals("Y"))
+ config.y = Integer.parseInt(value);
+ else if(aname.equals("WIDTH"))
+ config.width = Integer.parseInt(value);
+ else if(aname.equals("HEIGHT"))
+ config.height = Integer.parseInt(value);
+ else if(aname.equals("EXT_STATE"))
+ config.extState = Integer.parseInt(value);
+ else if(aname.equals("PLAIN"))
+ config.plainView = ("TRUE".equals(value));
+ else if(aname.equals("AUTORELOAD"))
+ autoReload = value;
+ else if(aname.equals("AUTORELOAD_DIALOG"))
+ autoReloadDialog = value;
+ }
+
+ /**
+ * @return true if the uri points to a remote file
+ */
+ public static boolean skipRemote(String uri)
+ {
+ if (jEdit.getBooleanProperty("restore.remote"))
+ return false;
+ if(MiscUtilities.isURL(uri))
+ {
+ String protocol = MiscUtilities.getProtocolOfURL(uri);
+ if (!protocol.equals("file")) return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String name)
+ {
+ if(name.equals("BUFFER"))
+ {
+ if (restoreFiles && !skipRemote(charData.toString()))
+ {
+ Buffer restored = jEdit.openTemporary(null,null, charData.toString(), false);
+ // if the autoReload attributes are not present, don't set anything
+ // it's sufficient to check whether they are present on the first BUFFER element
+ if (restored != null)
+ {
+ if(autoReload != null)
+ restored.setAutoReload("TRUE".equals(autoReload));
+ if(autoReloadDialog != null)
+ restored.setAutoReloadDialog("TRUE".equals(autoReloadDialog));
+ jEdit.commitTemporary(restored);
+ }
+ }
+ }
+ else if(name.equals("PANES") && restoreFiles)
+ {
+ config.splitConfig = charData.toString();
+ }
+ else if(name.equals("VIEW"))
+ {
+ if (config.docking != null)
+ config.docking.loadLayout(PERSPECTIVE_FILENAME, jEdit.getViewCount());
+ view = jEdit.newView(view,null,config);
+ config = new View.ViewConfig();
+ config.docking = View.getDockingFrameworkProvider().createDockingLayout();
+ }
+ else if(name.equals("TITLE"))
+ config.title = charData.toString();
+ }
+
+ @Override
+ public void characters(char[] ch, int start, int length)
+ {
+ charData.append(ch,start,length);
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/PluginJAR.java b/jEdit/org/gjt/sp/jedit/PluginJAR.java
index d0ac27e..480f5be 100644
--- a/jEdit/org/gjt/sp/jedit/PluginJAR.java
+++ b/jEdit/org/gjt/sp/jedit/PluginJAR.java
@@ -1,1745 +1,1752 @@
-/*
- * PluginJAR.java - Controls JAR loading and unloading
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Modifier;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-import javax.swing.SwingUtilities;
-
-import org.gjt.sp.jedit.browser.VFSBrowser;
-import org.gjt.sp.jedit.buffer.DummyFoldHandler;
-import org.gjt.sp.jedit.buffer.FoldHandler;
-import org.gjt.sp.jedit.gui.DockableWindowFactory;
-import org.gjt.sp.jedit.msg.PluginUpdate;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.util.IOUtilities;
-//}}}
-
-/**
- * Loads and unloads plugins.<p>
- *
- * <h3>JAR file contents</h3>
- *
- * When loading a plugin, jEdit looks for the following resources:
- *
- * <ul>
- * <li>A file named <code>actions.xml</code> defining plugin actions.
- * Only one such file per plugin is allowed. See {@link ActionSet} for
- * syntax.</li>
- * <li>A file named <code>browser.actions.xml</code> defining file system
- * browser actions.
- * Only one such file per plugin is allowed. See {@link ActionSet} for
- * syntax.</li>
- * <li>A file named <code>dockables.xml</code> defining dockable windows.
- * Only one such file per plugin is allowed. See {@link
- * org.gjt.sp.jedit.gui.DockableWindowManager} for
- * syntax.</li>
- * <li>A file named <code>services.xml</code> defining additional services
- * offered by the plugin, such as virtual file systems.
- * Only one such file per plugin is allowed. See {@link
- * org.gjt.sp.jedit.ServiceManager} for
- * syntax.</li>
- * <li>File with extension <code>.props</code> containing name/value pairs
- * separated by an equals sign.
- * A plugin can supply any number of property files. Property files are used
- * to define plugin men items, plugin option panes, as well as arbitriary
- * settings and strings used by the plugin. See {@link EditPlugin} for
- * information about properties used by jEdit. See
- * <code>java.util.Properties</code> for property file syntax.</li>
- * </ul>
- *
- * For a plugin to actually do something once it is resident in memory,
- * it must contain a class whose name ends with <code>Plugin</code>.
- * This class, known as the <i>plugin core class</i> must extend
- * {@link EditPlugin} and define a few required properties, otherwise it is
- * ignored.
- *
- * <h3>Dynamic and deferred loading</h3>
- *
- * Unlike in prior jEdit versions, jEdit 4.2 and later allow
- * plugins to be added and removed to the resident set at any time using
- * the {@link jEdit#addPluginJAR(String)} and
- * {@link jEdit#removePluginJAR(PluginJAR,boolean)} methods. Furthermore, the
- * plugin core class might not be loaded until the plugin is first used. See
- * {@link EditPlugin#start()} for a full description.
- *
- *
- * @see org.gjt.sp.jedit.jEdit#getProperty(String)
- * @see org.gjt.sp.jedit.jEdit#getPlugin(String)
- * @see org.gjt.sp.jedit.jEdit#getPlugins()
- * @see org.gjt.sp.jedit.jEdit#getPluginJAR(String)
- * @see org.gjt.sp.jedit.jEdit#getPluginJARs()
- * @see org.gjt.sp.jedit.jEdit#addPluginJAR(String)
- * @see org.gjt.sp.jedit.jEdit#removePluginJAR(PluginJAR,boolean)
- * @see org.gjt.sp.jedit.ActionSet
- * @see org.gjt.sp.jedit.gui.DockableWindowManager
- * @see org.gjt.sp.jedit.OptionPane
- * @see org.gjt.sp.jedit.PluginJAR
- * @see org.gjt.sp.jedit.ServiceManager
- *
- * @author Slava Pestov
- * @version $Id: PluginJAR.java 16756 2009-12-28 04:13:08Z ezust $
- * @since jEdit 4.2pre1
- */
-public class PluginJAR
-{
- //{{{ Instance variables
- private final String path;
- private String cachePath;
- private final File file;
-
- private final JARClassLoader classLoader;
- private ZipFile zipFile;
- private Properties properties;
- /**
- * The class list contained in this jar.
- */
- private String[] classes;
- /**
- * The resource list in this jar.
- */
- private String[] resources;
- private ActionSet actions;
- private ActionSet browserActions;
- private EditPlugin plugin;
- private URL dockablesURI;
- private URL servicesURI;
- private boolean activated;
-
- // Lists of jarPaths
- private final Set<String> theseRequireMe = new LinkedHashSet<String>();
- /** The plugins that uses me as optional dependency. */
- private final Set<String> theseUseMe = new LinkedHashSet<String>();
- private final Set<String> weRequireThese = new LinkedHashSet<String>();
- private final Set<String> weUseThese = new LinkedHashSet<String>();
- //}}}
-
- //{{{ load(String jarPath, boolean activateDependentIfNecessary)
- /**
- * Loads a plugin, and its dependent plugins if necessary.
- *
- * @since jEdit 4.3pre7
- */
- public static PluginJAR load(String path, boolean loadDependents)
- {
- PluginJAR jar = jEdit.getPluginJAR(path);
- if (jar != null && jar.getPlugin() != null)
- {
- return jar;
- }
- jEdit.addPluginJAR(path);
- jar = jEdit.getPluginJAR(path);
- EditPlugin plugin = jar.getPlugin();
- if (plugin == null)
- {
- // No plugin, maybe it is a library
- return jar;
- }
- String className = plugin.getClassName();
- if (loadDependents)
- {
- Set<String> pluginLoadList = getDependencySet(className);
- for (String jarName: pluginLoadList)
- {
- String jarPath = findPlugin(jarName);
- load(jarPath, true);
- }
- }
- // Load extra jars that are part of this plugin
- String jars = jEdit.getProperty("plugin." + className + ".jars");
- if(jars != null)
- {
- String dir = MiscUtilities.getParentOfPath(path);
- StringTokenizer st = new StringTokenizer(jars);
- while(st.hasMoreTokens())
- {
- String _jarPath = MiscUtilities.constructPath(dir,st.nextToken());
- PluginJAR _jar = jEdit.getPluginJAR(_jarPath);
- if(_jar == null)
- {
- jEdit.addPluginJAR(_jarPath);
- }
- }
- }
- jar.checkDependencies();
- jar.activatePluginIfNecessary();
- return jar;
- } // }}}
-
- //{{{ getPath() method
- /**
- * Returns the full path name of this plugin's JAR file.
- */
- public String getPath()
- {
- return path;
- } //}}}
-
- //{{{ findPlugin() method
- /**
- * Unlike getPlugin(), will return a PluginJAR that is not yet loaded,
- * given its classname.
- *
- * @param className a class name
- * @return the JARpath of the first PluginJAR it can find which contains this className,
- * or null if not found.
- * @since 4.3pre7
- */
- public static String findPlugin(String className)
- {
- EditPlugin ep = jEdit.getPlugin(className);
- if (ep != null) return ep.getPluginJAR().getPath();
-
- for (String JARpath: jEdit.getNotLoadedPluginJARs())
- {
- PluginJAR pjar = new PluginJAR(new File(JARpath));
- if (pjar.containsClass(className))
- {
- return JARpath;
- }
- }
- return null;
- } // }}}
-
- //{{{ containsClass() function
- /**
- * @param className a class name
- * @return true if this jar contains a class with that classname.
- * @since jedit 4.3pre7
- */
- boolean containsClass(String className)
- {
- try
- {
- getZipFile();
- }
- catch (IOException ioe)
- {
- throw new RuntimeException(ioe);
- }
- Enumeration<? extends ZipEntry> itr = zipFile.entries();
- while (itr.hasMoreElements())
- {
- String entry = itr.nextElement().toString();
- if (entry.endsWith(".class"))
- {
- String name = entry.substring(0, entry.length() - 6).replace('/', '.');
- if (name.equals(className))
- return true;
- }
- }
- return false;
-
- } // }}}
-
- //{{{ getCachePath() method
- /**
- * Returns the full path name of this plugin's summary file.
- * The summary file is used to store certain information which allows
- * loading of the plugin's resources and core class to be deferred
- * until the plugin is first used. As long as a plugin is using the
- * jEdit 4.2 plugin API, no extra effort is required to take advantage
- * of the summary cache.
- */
- public String getCachePath()
- {
- return cachePath;
- } //}}}
-
- //{{{ getDependencySet() method
- /**
- *
- * @param className of a plugin that we wish to load
- * @return an ordered set of JARpaths that contains the
- * plugins that need to be (re)loaded, in the correct order.
- */
- public static Set<String> getDependencySet(String className)
- {
- String dep;
- Set<String> retval = new LinkedHashSet<String>();
- int i=0;
- while((dep = jEdit.getProperty("plugin." + className + ".depend." + i++)) != null)
- {
- PluginDepends pluginDepends;
- try
- {
- pluginDepends = getPluginDepends(dep);
- }
- catch (IllegalArgumentException e)
- {
- Log.log(Log.ERROR, PluginJAR.class,
- className + " has an invalid dependency: " + dep);
- continue;
- }
-
- if(pluginDepends.what.equals("plugin"))
- {
- int index2 = pluginDepends.arg.indexOf(' ');
- if ( index2 == -1)
- {
- Log.log(Log.ERROR, PluginJAR.class, className
- + " has an invalid dependency: "
- + dep + " (version is missing)");
- continue;
- }
-
- String pluginName = pluginDepends.arg.substring(0,index2);
- String needVersion = pluginDepends.arg.substring(index2 + 1);
- //todo : check version ?
- Set<String> loadTheseFirst = getDependencySet(pluginName);
- loadTheseFirst.add(pluginName);
- loadTheseFirst.addAll(retval);
- retval = loadTheseFirst;
- }
- }
- return retval;
- } // }}}
-
- //{{{ getFile() method
- /**
- * Returns a file pointing to the plugin JAR.
- */
- public File getFile()
- {
- return file;
- } //}}}
-
- //{{{ getClassLoader() method
- /**
- * Returns the plugin's class loader.
- */
- public JARClassLoader getClassLoader()
- {
- return classLoader;
- } //}}}
-
- //{{{ getZipFile() method
- /**
- * Returns the plugin's JAR file, opening it if necessary.
- * @since jEdit 4.2pre1
- */
- public synchronized ZipFile getZipFile() throws IOException
- {
- if(zipFile == null)
- {
- Log.log(Log.DEBUG,this,"Opening " + path);
- zipFile = new ZipFile(path);
- }
- return zipFile;
- } //}}}
-
- //{{{ getActions() method
- /**
- * @deprecated Call getActionSet() instead
- */
- public ActionSet getActions()
- {
- return getActionSet();
- } //}}}
-
- //{{{ getActionSet() method
- /**
- * Returns the plugin's action set for the jEdit action context
- * {@link jEdit#getActionContext()}. These actions are loaded from
- * the <code>actions.xml</code> file; see {@link ActionSet}.
- *.
- * @since jEdit 4.2pre1
- */
- public ActionSet getActionSet()
- {
- return actions;
- } //}}}
-
- //{{{ getBrowserActionSet() method
- /**
- * Returns the plugin's action set for the file system browser action
- * context {@link
- * org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()}.
- * These actions are loaded from
- * the <code>browser.actions.xml</code> file; see {@link ActionSet}.
- *.
- * @since jEdit 4.2pre1
- */
- public ActionSet getBrowserActionSet()
- {
- return browserActions;
- } //}}}
-
- //{{{ checkDependencies() method
- /**
- * Returns true if all dependencies are satisified, false otherwise.
- * Also if dependencies are not satisfied, the plugin is marked as
- * "broken".
- *
- */
- public boolean checkDependencies()
- {
- if(plugin == null)
- return true;
- int i = 0;
- boolean ok = true;
-
- String name = plugin.getClassName();
-
- String dep;
- while((dep = jEdit.getProperty("plugin." + name + ".depend." + i++)) != null)
- {
- PluginDepends pluginDepends;
- try
- {
- pluginDepends = getPluginDepends(dep);
- }
- catch (IllegalArgumentException e)
- {
- Log.log(Log.ERROR,this,name + " has an invalid"
- + " dependency: " + dep);
- ok = false;
- continue;
- }
-
- if(pluginDepends.what.equals("jdk"))
- {
- if(!pluginDepends.optional && StandardUtilities.compareStrings(
- System.getProperty("java.version"),
- pluginDepends.arg,false) < 0)
- {
- String[] args = { pluginDepends.arg,
- System.getProperty("java.version") };
- jEdit.pluginError(path,"plugin-error.dep-jdk",args);
- ok = false;
- }
- }
- else if(pluginDepends.what.equals("jedit"))
- {
- if(pluginDepends.arg.length() != 11)
- {
- Log.log(Log.ERROR,this,"Invalid jEdit version"
- + " number: " + pluginDepends.arg);
- ok = false;
- }
-
- if(!pluginDepends.optional && StandardUtilities.compareStrings(
- jEdit.getBuild(),pluginDepends.arg,false) < 0)
- {
- String needs = MiscUtilities.buildToVersion(pluginDepends.arg);
- String[] args = { needs,
- jEdit.getVersion() };
- jEdit.pluginError(path,
- "plugin-error.dep-jedit",args);
- ok = false;
- }
- }
- else if(pluginDepends.what.equals("plugin"))
- {
- int index2 = pluginDepends.arg.indexOf(' ');
- if(index2 == -1)
- {
- Log.log(Log.ERROR,this,name
- + " has an invalid dependency: "
- + dep + " (version is missing)");
- ok = false;
- continue;
- }
-
- String pluginName = pluginDepends.arg.substring(0,index2);
- String needVersion = pluginDepends.arg.substring(index2 + 1);
- String currVersion = jEdit.getProperty("plugin."
- + pluginName + ".version");
-
- EditPlugin editPlugin = jEdit.getPlugin(pluginName, false);
- if(editPlugin == null)
- {
- if(!pluginDepends.optional)
- {
- String[] args = { needVersion,
- pluginName };
- jEdit.pluginError(path,
- "plugin-error.dep-plugin.no-version",
- args);
- ok = false;
- }
- }
- else if(StandardUtilities.compareStrings(
- currVersion,needVersion,false) < 0)
- {
- if(!pluginDepends.optional)
- {
- String[] args = { needVersion,
- pluginName, currVersion };
- jEdit.pluginError(path, "plugin-error.dep-plugin",args);
- ok = false;
- }
- }
- else if(editPlugin instanceof EditPlugin.Broken)
- {
- if(!pluginDepends.optional)
- {
- String[] args = { pluginName };
- jEdit.pluginError(path, "plugin-error.dep-plugin.broken",args);
- ok = false;
- }
- }
- else
- {
- PluginJAR jar = editPlugin.getPluginJAR();
- if (pluginDepends.optional)
- {
- jar.theseUseMe.add(path);
- weUseThese.add(jar.getPath());
- }
- else
- {
- jar.theseRequireMe.add(path);
- weRequireThese.add(jar.getPath());
- }
- }
- }
- else if(pluginDepends.what.equals("class"))
- {
- if(!pluginDepends.optional)
- {
- try
- {
- classLoader.loadClass(pluginDepends.arg,false);
- }
- catch(Exception e)
- {
- String[] args = { pluginDepends.arg };
- jEdit.pluginError(path, "plugin-error.dep-class",args);
- ok = false;
- }
- }
- }
- else
- {
- Log.log(Log.ERROR,this,name + " has unknown"
- + " dependency: " + dep);
- ok = false;
- }
- }
-
- // each JAR file listed in the plugin's jars property
- // needs to know that we need them
- String jars = jEdit.getProperty("plugin."
- + plugin.getClassName() + ".jars");
- if(jars != null)
- {
- String dir = MiscUtilities.getParentOfPath(path);
-
- StringTokenizer st = new StringTokenizer(jars);
- while(st.hasMoreTokens())
- {
- String jarPath = MiscUtilities.constructPath(
- dir,st.nextToken());
- PluginJAR jar = jEdit.getPluginJAR(jarPath);
- if(jar == null)
- {
- String[] args = { jarPath };
- jEdit.pluginError(path, "plugin-error.missing-jar",args);
- ok = false;
- }
- else
- {
- weRequireThese.add(jarPath);
- jar.theseRequireMe.add(path);
- }
- }
- }
-
- if(!ok)
- breakPlugin();
-
- return ok;
- } //}}}
-
- //{{{ getRequiredJars() method
- /**
- * Returns the required jars of this plugin.
- *
- * @return the required jars of this plugin
- * @since jEdit 4.3pre12
- */
- public Set<String> getRequiredJars()
- {
- return weRequireThese;
- } //}}}
-
- //{{{ getPluginDepends() method
- private static PluginDepends getPluginDepends(String dep) throws IllegalArgumentException
- {
- boolean optional;
- if(dep.startsWith("optional "))
- {
- optional = true;
- dep = dep.substring("optional ".length());
- }
- else
- {
- optional = false;
- }
-
- int index = dep.indexOf(' ');
- if(index == -1)
- throw new IllegalArgumentException("wrong dependency");
-
- String what = dep.substring(0,index);
- String arg = dep.substring(index + 1);
- PluginDepends depends = new PluginDepends();
- depends.what = what;
- depends.arg = arg;
- depends.optional = optional;
- return depends;
- } //}}}
-
- //{{{ PluginDepends class
- private static class PluginDepends
- {
- String what;
- String arg;
- boolean optional;
- } //}}}
-
- //{{{ transitiveClosure()
- /**
- * If plugin A is needed by B, and B is needed by C, we want to
- * tell the user that A is needed by B and C when they try to
- * unload A.
- *
- * @param dependents a set of plugins which we wish to disable
- * @param listModel a set of plugins which will be affected, and will need
- * to be disabled also.
- */
- public static void transitiveClosure(String[] dependents, List<String> listModel)
- {
- for(int i = 0; i < dependents.length; i++)
- {
- String jarPath = dependents[i];
- if(!listModel.contains(jarPath))
- {
- listModel.add(jarPath);
- PluginJAR jar = jEdit.getPluginJAR(
- jarPath);
- transitiveClosure(jar.getDependentPlugins(),
- listModel);
- }
- }
- } //}}}
-
- //{{{ getDependentPlugins() method
- public String[] getDependentPlugins()
- {
- return theseRequireMe.toArray(new String[theseRequireMe.size()]);
- } //}}}
-
- //{{{ getPlugin() method
- /**
- * Returns the plugin core class for this JAR file. Note that if the
- * plugin has not been activated, this will return an instance of
- * {@link EditPlugin.Deferred}. If you need the actual plugin core
- * class instance, call {@link #activatePlugin()} first.
- * If the plugin is not yet loaded, returns null
- *
- * @since jEdit 4.2pre1
- */
- public EditPlugin getPlugin()
- {
- return plugin;
- } //}}}
-
- //{{{ activatePlugin() method
- /**
- * Loads the plugin core class. Does nothing if the plugin core class
- * has already been loaded. This method might be called on startup,
- * depending on what properties are set. See {@link EditPlugin#start()}.
- * This method is thread-safe.
- *
- * @since jEdit 4.2pre1
- */
- public void activatePlugin()
- {
- synchronized (this)
- {
- if (activated)
- {
- // recursive call
- return;
- }
-
- activated = true;
- }
-
- if (!(plugin instanceof EditPlugin.Deferred))
- {
- return;
- }
-
- String className = plugin.getClassName();
-
- try
- {
- Class clazz = classLoader.loadClass(className,false);
- int modifiers = clazz.getModifiers();
- if(Modifier.isInterface(modifiers)
- || Modifier.isAbstract(modifiers)
- || !EditPlugin.class.isAssignableFrom(clazz))
- {
- Log.log(Log.ERROR,this,"Plugin has properties but does not extend EditPlugin: "
- + className);
- breakPlugin();
- return;
- }
-
- plugin = (EditPlugin)clazz.newInstance();
- plugin.jar = this;
- }
- catch (Throwable t)
- {
- breakPlugin();
-
- Log.log(Log.ERROR,this,"Error while starting plugin " + className);
- Log.log(Log.ERROR,this,t);
- String[] args = { t.toString() };
- jEdit.pluginError(path,"plugin-error.start-error",args);
-
- return;
- }
-
- if (jEdit.isMainThread()
- || SwingUtilities.isEventDispatchThread())
- {
- startPlugin();
- }
- else
- {
- // for thread safety
- startPluginLater();
- }
-
- EditBus.send(new PluginUpdate(this,PluginUpdate.ACTIVATED,false));
- } //}}}
-
- //{{{ activateIfNecessary() method
- /**
- * Should be called after a new plugin is installed.
- * @since jEdit 4.2pre2
- */
- public void activatePluginIfNecessary()
- {
- String filename = MiscUtilities.getFileName(getPath());
- jEdit.setBooleanProperty("plugin-blacklist." + filename, false);
- if(!(plugin instanceof EditPlugin.Deferred && plugin != null))
- {
- return;
- }
-
- String className = plugin.getClassName();
-
- // default for plugins that don't specify this property (ie,
- // 4.1-style plugins) is to load them on startup
- String activate = jEdit.getProperty("plugin."
- + className + ".activate");
-
- if(activate == null)
- {
- // 4.1 plugin
- if(!jEdit.isMainThread())
- {
- breakPlugin();
-
- jEdit.pluginError(path,"plugin-error.not-42",null);
- }
- else
- {
- activatePlugin();
- }
- }
- else
- {
- // 4.2 plugin
-
- // if at least one property listed here is true,
- // load the plugin
- boolean load = false;
-
- StringTokenizer st = new StringTokenizer(activate);
- while(st.hasMoreTokens())
- {
- String prop = st.nextToken();
- boolean value = jEdit.getBooleanProperty(prop);
- if(value)
- {
- Log.log(Log.DEBUG,this,"Activating "
- + className + " because of " + prop);
- load = true;
- break;
- }
- }
-
- if(load)
- {
- activatePlugin();
- }
- }
- } //}}}
-
- //{{{ deactivatePlugin() method
- /**
- * Unloads the plugin core class. Does nothing if the plugin core class
- * has not been loaded.
- * This method can only be called from the AWT event dispatch thread!
- * @see EditPlugin#stop()
- *
- * @since jEdit 4.2pre3
- */
- public void deactivatePlugin(boolean exit)
- {
- if(!activated)
- return;
-
- if(!exit)
- {
- // buffers retain a reference to the fold handler in
- // question... and the easiest way to handle fold
- // handler unloading is this...
- Buffer buffer = jEdit.getFirstBuffer();
- while(buffer != null)
- {
- if(buffer.getFoldHandler() != null
- && buffer.getFoldHandler().getClass()
- .getClassLoader() == classLoader)
- {
- buffer.setFoldHandler(
- new DummyFoldHandler());
- }
- buffer = buffer.getNext();
- }
- }
-
- if(plugin != null && !(plugin instanceof EditPlugin.Broken))
- {
- if(plugin instanceof EBPlugin)
- EditBus.removeFromBus((EBComponent)plugin);
-
- try
- {
- plugin.stop();
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Error while "
- + "stopping plugin:");
- Log.log(Log.ERROR,this,t);
- }
-
- plugin = new EditPlugin.Deferred(this,
- plugin.getClassName());
-
- EditBus.send(new PluginUpdate(this,
- PluginUpdate.DEACTIVATED,exit));
-
- if(!exit)
- {
- // see if this is a 4.1-style plugin
- String activate = jEdit.getProperty("plugin."
- + plugin.getClassName() + ".activate");
-
- if(activate == null)
- {
- breakPlugin();
- jEdit.pluginError(path,"plugin-error.not-42",null);
- }
- }
- }
-
- activated = false;
- } //}}}
-
- //{{{ getDockablesURI() method
- /**
- * Returns the location of the plugin's
- * <code>dockables.xml</code> file.
- * @since jEdit 4.2pre1
- */
- public URL getDockablesURI()
- {
- return dockablesURI;
- } //}}}
-
- //{{{ getServicesURI() method
- /**
- * Returns the location of the plugin's
- * <code>services.xml</code> file.
- * @since jEdit 4.2pre1
- */
- public URL getServicesURI()
- {
- return servicesURI;
- } //}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- if(plugin == null)
- return path;
- else
- return path + ",class=" + plugin.getClassName();
- } //}}}
-
- //{{{ Package-private members
-
- //{{{ Static methods
-
- //{{{ getPluginCache() method
- public static PluginCacheEntry getPluginCache(PluginJAR plugin)
- {
- String jarCachePath = plugin.getCachePath();
- if(jarCachePath == null)
- return null;
-
- DataInputStream din = null;
- try
- {
- PluginCacheEntry cache = new PluginCacheEntry();
- cache.plugin = plugin;
- cache.modTime = plugin.getFile().lastModified();
- din = new DataInputStream(
- new BufferedInputStream(
- new FileInputStream(jarCachePath)));
- if(cache.read(din))
- return cache;
- else
- {
- // returns false with outdated cache
- return null;
- }
- }
- catch(FileNotFoundException fnf)
- {
- return null;
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,PluginJAR.class,io);
- return null;
- }
- finally
- {
- IOUtilities.closeQuietly(din);
- }
- } //}}}
-
- //{{{ setPluginCache() method
- static void setPluginCache(PluginJAR plugin, PluginCacheEntry cache)
- {
- String jarCachePath = plugin.getCachePath();
- if(jarCachePath == null)
- return;
-
- Log.log(Log.DEBUG,PluginJAR.class,"Writing " + jarCachePath);
-
- DataOutputStream dout = null;
- try
- {
- dout = new DataOutputStream(
- new BufferedOutputStream(
- new FileOutputStream(jarCachePath)));
- cache.write(dout);
- dout.close();
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,PluginJAR.class,io);
- IOUtilities.closeQuietly(dout);
- new File(jarCachePath).delete();
- }
- } //}}}
-
- //}}}
-
- //{{{ PluginJAR constructor
- /**
- * Creates a PluginJAR object which is not necessarily loaded, but can be later.
- * @see #load(String, boolean)
- */
- public PluginJAR(File file)
- {
- path = file.getPath();
- String jarCacheDir = jEdit.getJARCacheDirectory();
- if(jarCacheDir != null)
- {
- cachePath = MiscUtilities.constructPath(
- jarCacheDir,file.getName() + ".summary");
- }
- this.file = file;
- classLoader = new JARClassLoader(this);
- actions = new ActionSet();
- } //}}}
-
- //{{{ init() method
- void init()
- {
- PluginCacheEntry cache = getPluginCache(this);
- if(cache != null)
- {
- loadCache(cache);
- classLoader.activate();
- }
- else
- {
- try
- {
- cache = generateCache();
- if(cache != null)
- {
- setPluginCache(this,cache);
- classLoader.activate();
- }
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,"Cannot load"
- + " plugin " + path);
- Log.log(Log.ERROR,this,io);
-
- String[] args = { io.toString() };
- jEdit.pluginError(path,"plugin-error.load-error",args);
-
- uninit(false);
- }
- }
- } //}}}
-
- //{{{ uninit() method
- void uninit(boolean exit)
- {
- deactivatePlugin(exit);
-
- if(!exit)
- {
- for (String path : weRequireThese)
- {
- PluginJAR jar = jEdit.getPluginJAR(path);
- if(jar != null)
- jar.theseRequireMe.remove(this.path);
- }
-
- for (String path : weUseThese)
- {
- PluginJAR jar = jEdit.getPluginJAR(path);
- if(jar != null)
- jar.theseUseMe.remove(this.path);
- }
-
- classLoader.deactivate();
- BeanShell.resetClassManager();
-
- if(actions != null)
- jEdit.removeActionSet(actions);
- if(browserActions != null)
- VFSBrowser.getActionContext().removeActionSet(browserActions);
-
- DockableWindowFactory.getInstance()
- .unloadDockableWindows(this);
- ServiceManager.unloadServices(this);
-
- jEdit.removePluginProps(properties);
-
- try
- {
- if(zipFile != null)
- {
- zipFile.close();
- zipFile = null;
- }
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
- }
- }
- } //}}}
-
- //{{{ getClasses() method
- String[] getClasses()
- {
- return classes;
- } //}}}
-
- //{{{ getResources() method
- public String[] getResources()
- {
- return resources;
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ actionsPresentButNotCoreClass() method
- private void actionsPresentButNotCoreClass()
- {
- Log.log(Log.WARNING,this,getPath() + " has an actions.xml but no plugin core class");
- actions.setLabel("MISSING PLUGIN CORE CLASS");
- } //}}}
-
- //{{{ loadCache() method
- private void loadCache(PluginCacheEntry cache)
- {
- classes = cache.classes;
- resources = cache.resources;
-
- /* this should be before dockables are initialized */
- if(cache.cachedProperties != null)
- {
- properties = cache.cachedProperties;
- jEdit.addPluginProps(cache.cachedProperties);
- }
-
- if(cache.actionsURI != null
- && cache.cachedActionNames != null)
- {
- actions = new ActionSet(this,
- cache.cachedActionNames,
- cache.cachedActionToggleFlags,
- cache.actionsURI);
- }
-
- if(cache.browserActionsURI != null
- && cache.cachedBrowserActionNames != null)
- {
- browserActions = new ActionSet(this,
- cache.cachedBrowserActionNames,
- cache.cachedBrowserActionToggleFlags,
- cache.browserActionsURI);
- VFSBrowser.getActionContext().addActionSet(browserActions);
- }
-
- if(cache.dockablesURI != null
- && cache.cachedDockableNames != null
- && cache.cachedDockableActionFlags != null
- && cache.cachedDockableMovableFlags != null)
- {
- dockablesURI = cache.dockablesURI;
- DockableWindowFactory.getInstance()
- .cacheDockableWindows(this,
- cache.cachedDockableNames,
- cache.cachedDockableActionFlags,
- cache.cachedDockableMovableFlags);
- }
-
- if(actions.size() != 0)
- jEdit.addActionSet(actions);
-
- if(cache.servicesURI != null
- && cache.cachedServices != null)
- {
- servicesURI = cache.servicesURI;
- for(int i = 0; i < cache.cachedServices.length;
- i++)
- {
- ServiceManager.Descriptor d
- = cache.cachedServices[i];
- ServiceManager.registerService(d);
- }
- }
-
- if(cache.pluginClass != null)
- {
- // Check if a plugin with the same name
- // is already loaded
- if(jEdit.getPlugin(cache.pluginClass) != null)
- {
- jEdit.pluginError(path, "plugin-error.already-loaded",
- null);
- uninit(false);
- }
- else
- {
- String label = jEdit.getProperty(
- "plugin." + cache.pluginClass
- + ".name");
- actions.setLabel(jEdit.getProperty(
- "action-set.plugin",
- new String[] { label }));
- plugin = new EditPlugin.Deferred(this,
- cache.pluginClass);
- }
- }
- else
- {
- if(actions.size() != 0)
- actionsPresentButNotCoreClass();
- }
- } //}}}
-
- //{{{ generateCache() method
- public PluginCacheEntry generateCache() throws IOException
- {
- properties = new Properties();
-
- List<String> classes = new LinkedList<String>();
- List<String> resources = new LinkedList<String>();
-
- ZipFile zipFile = getZipFile();
-
- List<String> plugins = new LinkedList<String>();
-
- PluginCacheEntry cache = new PluginCacheEntry();
- cache.modTime = file.lastModified();
- cache.cachedProperties = new Properties();
-
- Enumeration<? extends ZipEntry> entries = zipFile.entries();
- while(entries.hasMoreElements())
- {
- ZipEntry entry = entries.nextElement();
- String name = entry.getName();
- String lname = name.toLowerCase();
- if(lname.equals("actions.xml"))
- {
- cache.actionsURI = classLoader.getResource(name);
- }
- else if(lname.equals("browser.actions.xml"))
- {
- cache.browserActionsURI = classLoader.getResource(name);
- }
- else if(lname.equals("dockables.xml"))
- {
- dockablesURI = classLoader.getResource(name);
- cache.dockablesURI = dockablesURI;
- }
- else if(lname.equals("services.xml"))
- {
- servicesURI = classLoader.getResource(name);
- cache.servicesURI = servicesURI;
- }
- else if(lname.endsWith(".props"))
- {
- InputStream in = classLoader.getResourceAsStream(name);
- properties.load(in);
- in.close();
- }
- else if(name.endsWith(".class"))
- {
- String className = MiscUtilities
- .fileToClass(name);
- if(className.endsWith("Plugin"))
- {
- plugins.add(className);
- }
- classes.add(className);
- }
- else
- {
- resources.add(name);
- }
- }
-
- cache.cachedProperties = properties;
- jEdit.addPluginProps(properties);
-
- this.classes = cache.classes =
- classes.toArray(
- new String[classes.size()]);
- this.resources = cache.resources =
- resources.toArray(
- new String[resources.size()]);
-
- String label = null;
-
- for (String className : plugins)
- {
- String _label = jEdit.getProperty("plugin."
- + className + ".name");
- String version = jEdit.getProperty("plugin."
- + className + ".version");
- if(_label == null || version == null)
- {
- Log.log(Log.WARNING,this,"Ignoring: "
- + className);
- }
- else
- {
- cache.pluginClass = className;
-
- // Check if a plugin with the same name
- // is already loaded
- if(jEdit.getPlugin(className) != null)
- {
- jEdit.pluginError(path, "plugin-error.already-loaded",
- null);
- return null;
- }
- plugin = new EditPlugin.Deferred(this,
- className);
- label = _label;
-
- break;
- }
- }
-
- if(cache.actionsURI != null)
- {
- actions = new ActionSet(this,null,null,
- cache.actionsURI);
- actions.load();
- cache.cachedActionNames =
- actions.getCacheableActionNames();
- cache.cachedActionToggleFlags =
- new boolean[cache.cachedActionNames.length];
- for(int i = 0; i < cache.cachedActionNames.length; i++)
- {
- cache.cachedActionToggleFlags[i] =
- jEdit.getBooleanProperty(
- cache.cachedActionNames[i] + ".toggle");
- }
- }
-
- if(cache.browserActionsURI != null)
- {
- browserActions =
- new ActionSet(this,null,null, cache.browserActionsURI);
- browserActions.load();
- VFSBrowser.getActionContext().addActionSet(browserActions);
- cache.cachedBrowserActionNames =
- browserActions.getCacheableActionNames();
- cache.cachedBrowserActionToggleFlags = new boolean[
- cache.cachedBrowserActionNames.length];
- for(int i = 0;
- i < cache.cachedBrowserActionNames.length; i++)
- {
- cache.cachedBrowserActionToggleFlags[i]
- = jEdit.getBooleanProperty(
- cache.cachedBrowserActionNames[i] + ".toggle");
- }
- }
-
- if(dockablesURI != null)
- {
- DockableWindowFactory.getInstance()
- .loadDockableWindows(this, dockablesURI,cache);
- }
-
- if(actions.size() != 0)
- {
- if(label != null)
- {
- actions.setLabel(jEdit.getProperty(
- "action-set.plugin", new String[] { label }));
- }
- else
- actionsPresentButNotCoreClass();
-
- jEdit.addActionSet(actions);
- }
-
- if(servicesURI != null)
- {
- ServiceManager.loadServices(this,servicesURI,cache);
- }
-
- return cache;
- } //}}}
-
- //{{{ startPlugin() method
- private void startPlugin()
- {
- try
- {
- plugin.start();
- }
- catch(Throwable t)
- {
- breakPlugin();
-
- Log.log(Log.ERROR,PluginJAR.this,
- "Error while starting plugin " + plugin.getClassName());
- Log.log(Log.ERROR,PluginJAR.this,t);
- String[] args = { t.toString() };
- jEdit.pluginError(path, "plugin-error.start-error",args);
- }
-
- if(plugin instanceof EBPlugin)
- {
- if(jEdit.getProperty("plugin." + plugin.getClassName()
- + ".activate") == null)
- {
- // old plugins expected jEdit 4.1-style
- // behavior, where a PropertiesChanged
- // was sent after plugins were started
- ((EBComponent)plugin).handleMessage(
- new org.gjt.sp.jedit.msg.PropertiesChanged(null));
- }
- EditBus.addToBus((EBComponent)plugin);
- }
-
- // buffers retain a reference to the fold handler in
- // question... and the easiest way to handle fold
- // handler loading is this...
- Buffer buffer = jEdit.getFirstBuffer();
- while(buffer != null)
- {
- FoldHandler handler =
- FoldHandler.getFoldHandler(
- buffer.getStringProperty("folding"));
- // == null before loaded
- if(buffer.getFoldHandler() != null
- && handler != null
- && handler != buffer.getFoldHandler())
- {
- buffer.setFoldHandler(handler);
- }
- buffer = buffer.getNext();
- }
- } //}}}
-
- //{{{ startPluginLater() method
- private void startPluginLater()
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- if(!activated)
- return;
-
- startPlugin();
- }
- });
- } //}}}
-
- //{{{ breakPlugin() method
- private void breakPlugin()
- {
- plugin = new EditPlugin.Broken(this,plugin.getClassName());
-
- // remove action sets, dockables, etc so that user doesn't
- // see the broken plugin
- uninit(false);
- // but we want properties to hang around
- jEdit.addPluginProps(properties);
- } //}}}
-
- //}}}
-
- //{{{ PluginCacheEntry class
- /**
- * Used by the <code>DockableWindowManager</code> and
- * <code>ServiceManager</code> to handle caching.
- * @since jEdit 4.2pre1
- */
- public static class PluginCacheEntry
- {
- public static final int MAGIC = 0xB7A2E422;
-
- //{{{ Instance variables
- public PluginJAR plugin;
- public long modTime;
-
- public String[] classes;
- public String[] resources;
- public URL actionsURI;
- public String[] cachedActionNames;
- public boolean[] cachedActionToggleFlags;
- public URL browserActionsURI;
- public String[] cachedBrowserActionNames;
- public boolean[] cachedBrowserActionToggleFlags;
- public URL dockablesURI;
- public String[] cachedDockableNames;
- public boolean[] cachedDockableActionFlags;
- public boolean[] cachedDockableMovableFlags;
- public URL servicesURI;
- ServiceManager.Descriptor[] cachedServices;
-
- public Properties cachedProperties;
- public String pluginClass;
- //}}}
-
- /* read() and write() must be kept perfectly in sync...
- * its a very simple file format. doing it this way is
- * faster than serializing since serialization calls
- * reflection, etc. */
-
- //{{{ read() method
- public boolean read(DataInputStream din) throws IOException
- {
- int cacheMagic = din.readInt();
- if(cacheMagic != MAGIC)
- return false;
-
- String cacheBuild = readString(din);
- if(!cacheBuild.equals(jEdit.getBuild()))
- return false;
-
- long cacheModTime = din.readLong();
- if(cacheModTime != modTime)
- return false;
-
- actionsURI = readURI(din);
- cachedActionNames = readStringArray(din);
- cachedActionToggleFlags = readBooleanArray(din);
-
- browserActionsURI = readURI(din);
- cachedBrowserActionNames = readStringArray(din);
- cachedBrowserActionToggleFlags = readBooleanArray(din);
-
- dockablesURI = readURI(din);
- cachedDockableNames = readStringArray(din);
- cachedDockableActionFlags = readBooleanArray(din);
- cachedDockableMovableFlags = readBooleanArray(din);
-
- servicesURI = readURI(din);
- int len = din.readInt();
- if(len == 0)
- cachedServices = null;
- else
- {
- cachedServices = new ServiceManager.Descriptor[len];
- for(int i = 0; i < len; i++)
- {
- ServiceManager.Descriptor d = new
- ServiceManager.Descriptor(
- readString(din),
- readString(din),
- null,
- plugin);
- cachedServices[i] = d;
- }
- }
-
- classes = readStringArray(din);
- resources = readStringArray(din);
-
- cachedProperties = readMap(din);
-
- pluginClass = readString(din);
-
- return true;
- } //}}}
-
- //{{{ write() method
- public void write(DataOutputStream dout) throws IOException
- {
- dout.writeInt(MAGIC);
- writeString(dout,jEdit.getBuild());
-
- dout.writeLong(modTime);
-
- writeString(dout,actionsURI);
- writeStringArray(dout,cachedActionNames);
- writeBooleanArray(dout,cachedActionToggleFlags);
-
- writeString(dout,browserActionsURI);
- writeStringArray(dout,cachedBrowserActionNames);
- writeBooleanArray(dout,cachedBrowserActionToggleFlags);
-
- writeString(dout,dockablesURI);
- writeStringArray(dout,cachedDockableNames);
- writeBooleanArray(dout,cachedDockableActionFlags);
- writeBooleanArray(dout,cachedDockableMovableFlags);
-
- writeString(dout,servicesURI);
- if(cachedServices == null)
- dout.writeInt(0);
- else
- {
- dout.writeInt(cachedServices.length);
- for(int i = 0; i < cachedServices.length; i++)
- {
- writeString(dout,cachedServices[i].clazz);
- writeString(dout,cachedServices[i].name);
- }
- }
-
- writeStringArray(dout,classes);
- writeStringArray(dout,resources);
-
- writeMap(dout,cachedProperties);
-
- writeString(dout,pluginClass);
- } //}}}
-
- //{{{ Private members
-
- //{{{ readString() method
- private static String readString(DataInputStream din)
- throws IOException
- {
- int len = din.readInt();
- if(len == 0)
- return null;
- char[] str = new char[len];
- for(int i = 0; i < len; i++)
- str[i] = din.readChar();
- return new String(str);
- } //}}}
-
- //{{{ readURI() method
- private static URL readURI(DataInputStream din)
- throws IOException
- {
- String str = readString(din);
- if(str == null)
- return null;
- else
- return new URL(str);
- } //}}}
-
- //{{{ readStringArray() method
- private static String[] readStringArray(DataInputStream din)
- throws IOException
- {
- int len = din.readInt();
- if(len == 0)
- return null;
- String[] str = new String[len];
- for(int i = 0; i < len; i++)
- {
- str[i] = readString(din);
- }
- return str;
- } //}}}
-
- //{{{ readBooleanArray() method
- private static boolean[] readBooleanArray(DataInputStream din)
- throws IOException
- {
- int len = din.readInt();
- if(len == 0)
- return null;
- boolean[] bools = new boolean[len];
- for(int i = 0; i < len; i++)
- {
- bools[i] = din.readBoolean();
- }
- return bools;
- } //}}}
-
- //{{{ readMap() method
- private static Properties readMap(DataInputStream din)
- throws IOException
- {
- Properties returnValue = new Properties();
- int count = din.readInt();
- for(int i = 0; i < count; i++)
- {
- String key = readString(din);
- String value = readString(din);
- if(value == null)
- value = "";
- returnValue.put(key,value);
- }
- return returnValue;
- } //}}}
-
- //{{{ writeString() method
- private static void writeString(DataOutputStream dout,
- Object obj) throws IOException
- {
- if(obj == null)
- {
- dout.writeInt(0);
- }
- else
- {
- String str = obj.toString();
- dout.writeInt(str.length());
- dout.writeChars(str);
- }
- } //}}}
-
- //{{{ writeStringArray() method
- private static void writeStringArray(DataOutputStream dout,
- String[] str) throws IOException
- {
- if(str == null)
- {
- dout.writeInt(0);
- }
- else
- {
- dout.writeInt(str.length);
- for(int i = 0; i < str.length; i++)
- {
- writeString(dout,str[i]);
- }
- }
- } //}}}
-
- //{{{ writeBooleanArray() method
- private static void writeBooleanArray(DataOutputStream dout,
- boolean[] bools) throws IOException
- {
- if(bools == null)
- {
- dout.writeInt(0);
- }
- else
- {
- dout.writeInt(bools.length);
- for(int i = 0; i < bools.length; i++)
- {
- dout.writeBoolean(bools[i]);
- }
- }
- } //}}}
-
- //{{{ writeMap() method
- private static void writeMap(DataOutputStream dout, Map map)
- throws IOException
- {
- dout.writeInt(map.size());
- Set<Map.Entry<Object, Object>> set = map.entrySet();
- for (Map.Entry<Object, Object> entry : set)
- {
- writeString(dout,entry.getKey());
- writeString(dout,entry.getValue());
- }
- } //}}}
-
- //}}}
- } //}}}
-}
+/*
+ * PluginJAR.java - Controls JAR loading and unloading
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Modifier;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import javax.swing.SwingUtilities;
+
+import org.gjt.sp.jedit.browser.VFSBrowser;
+import org.gjt.sp.jedit.buffer.DummyFoldHandler;
+import org.gjt.sp.jedit.buffer.FoldHandler;
+import org.gjt.sp.jedit.gui.DockableWindowFactory;
+import org.gjt.sp.jedit.msg.PluginUpdate;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.util.IOUtilities;
+
+import static org.gjt.sp.jedit.EditBus.EBHandler;
+//}}}
+
+/**
+ * Loads and unloads plugins.<p>
+ *
+ * <h3>JAR file contents</h3>
+ *
+ * When loading a plugin, jEdit looks for the following resources:
+ *
+ * <ul>
+ * <li>A file named <code>actions.xml</code> defining plugin actions.
+ * Only one such file per plugin is allowed. See {@link ActionSet} for
+ * syntax.</li>
+ * <li>A file named <code>browser.actions.xml</code> defining file system
+ * browser actions.
+ * Only one such file per plugin is allowed. See {@link ActionSet} for
+ * syntax.</li>
+ * <li>A file named <code>dockables.xml</code> defining dockable windows.
+ * Only one such file per plugin is allowed. See {@link
+ * org.gjt.sp.jedit.gui.DockableWindowManager} for
+ * syntax.</li>
+ * <li>A file named <code>services.xml</code> defining additional services
+ * offered by the plugin, such as virtual file systems.
+ * Only one such file per plugin is allowed. See {@link
+ * org.gjt.sp.jedit.ServiceManager} for
+ * syntax.</li>
+ * <li>File with extension <code>.props</code> containing name/value pairs
+ * separated by an equals sign.
+ * A plugin can supply any number of property files. Property files are used
+ * to define plugin men items, plugin option panes, as well as arbitriary
+ * settings and strings used by the plugin. See {@link EditPlugin} for
+ * information about properties used by jEdit. See
+ * <code>java.util.Properties</code> for property file syntax.</li>
+ * </ul>
+ *
+ * For a plugin to actually do something once it is resident in memory,
+ * it must contain a class whose name ends with <code>Plugin</code>.
+ * This class, known as the <i>plugin core class</i> must extend
+ * {@link EditPlugin} and define a few required properties, otherwise it is
+ * ignored.
+ *
+ * <h3>Dynamic and deferred loading</h3>
+ *
+ * Unlike in prior jEdit versions, jEdit 4.2 and later allow
+ * plugins to be added and removed to the resident set at any time using
+ * the {@link jEdit#addPluginJAR(String)} and
+ * {@link jEdit#removePluginJAR(PluginJAR,boolean)} methods. Furthermore, the
+ * plugin core class might not be loaded until the plugin is first used. See
+ * {@link EditPlugin#start()} for a full description.
+ *
+ *
+ * @see org.gjt.sp.jedit.jEdit#getProperty(String)
+ * @see org.gjt.sp.jedit.jEdit#getPlugin(String)
+ * @see org.gjt.sp.jedit.jEdit#getPlugins()
+ * @see org.gjt.sp.jedit.jEdit#getPluginJAR(String)
+ * @see org.gjt.sp.jedit.jEdit#getPluginJARs()
+ * @see org.gjt.sp.jedit.jEdit#addPluginJAR(String)
+ * @see org.gjt.sp.jedit.jEdit#removePluginJAR(PluginJAR,boolean)
+ * @see org.gjt.sp.jedit.ActionSet
+ * @see org.gjt.sp.jedit.gui.DockableWindowManager
+ * @see org.gjt.sp.jedit.OptionPane
+ * @see org.gjt.sp.jedit.PluginJAR
+ * @see org.gjt.sp.jedit.ServiceManager
+ *
+ * @author Slava Pestov
+ * @version $Id: PluginJAR.java 17144 2010-01-30 00:32:11Z kpouer $
+ * @since jEdit 4.2pre1
+ */
+public class PluginJAR
+{
+ //{{{ Instance variables
+ private final String path;
+ private String cachePath;
+ private final File file;
+
+ private final JARClassLoader classLoader;
+ private ZipFile zipFile;
+ private Properties properties;
+ /**
+ * The class list contained in this jar.
+ */
+ private String[] classes;
+ /**
+ * The resource list in this jar.
+ */
+ private String[] resources;
+ private ActionSet actions;
+ private ActionSet browserActions;
+ private EditPlugin plugin;
+ private URL dockablesURI;
+ private URL servicesURI;
+ private boolean activated;
+
+ // Lists of jarPaths
+ private final Set<String> theseRequireMe = new LinkedHashSet<String>();
+ /** The plugins that uses me as optional dependency. */
+ private final Set<String> theseUseMe = new LinkedHashSet<String>();
+ private final Set<String> weRequireThese = new LinkedHashSet<String>();
+ private final Set<String> weUseThese = new LinkedHashSet<String>();
+ //}}}
+
+ //{{{ load(String jarPath, boolean activateDependentIfNecessary)
+ /**
+ * Loads a plugin, and its dependent plugins if necessary.
+ *
+ * @since jEdit 4.3pre7
+ */
+ public static PluginJAR load(String path, boolean loadDependents)
+ {
+ PluginJAR jar = jEdit.getPluginJAR(path);
+ if (jar != null && jar.getPlugin() != null)
+ {
+ return jar;
+ }
+ jEdit.addPluginJAR(path);
+ jar = jEdit.getPluginJAR(path);
+ EditPlugin plugin = jar.getPlugin();
+ if (plugin == null)
+ {
+ // No plugin, maybe it is a library
+ return jar;
+ }
+ String className = plugin.getClassName();
+ if (loadDependents)
+ {
+ Set<String> pluginLoadList = getDependencySet(className);
+ for (String jarName: pluginLoadList)
+ {
+ String jarPath = findPlugin(jarName);
+ load(jarPath, true);
+ }
+ }
+ // Load extra jars that are part of this plugin
+ String jars = jEdit.getProperty("plugin." + className + ".jars");
+ if(jars != null)
+ {
+ String dir = MiscUtilities.getParentOfPath(path);
+ StringTokenizer st = new StringTokenizer(jars);
+ while(st.hasMoreTokens())
+ {
+ String _jarPath = MiscUtilities.constructPath(dir,st.nextToken());
+ PluginJAR _jar = jEdit.getPluginJAR(_jarPath);
+ if(_jar == null)
+ {
+ jEdit.addPluginJAR(_jarPath);
+ }
+ }
+ }
+ jar.checkDependencies();
+ jar.activatePluginIfNecessary();
+ return jar;
+ } // }}}
+
+ //{{{ getPath() method
+ /**
+ * Returns the full path name of this plugin's JAR file.
+ */
+ public String getPath()
+ {
+ return path;
+ } //}}}
+
+ //{{{ findPlugin() method
+ /**
+ * Unlike getPlugin(), will return a PluginJAR that is not yet loaded,
+ * given its classname.
+ *
+ * @param className a class name
+ * @return the JARpath of the first PluginJAR it can find which contains this className,
+ * or null if not found.
+ * @since 4.3pre7
+ */
+ public static String findPlugin(String className)
+ {
+ EditPlugin ep = jEdit.getPlugin(className);
+ if (ep != null) return ep.getPluginJAR().getPath();
+
+ for (String JARpath: jEdit.getNotLoadedPluginJARs())
+ {
+ PluginJAR pjar = new PluginJAR(new File(JARpath));
+ if (pjar.containsClass(className))
+ {
+ return JARpath;
+ }
+ }
+ return null;
+ } // }}}
+
+ //{{{ containsClass() function
+ /**
+ * @param className a class name
+ * @return true if this jar contains a class with that classname.
+ * @since jedit 4.3pre7
+ */
+ boolean containsClass(String className)
+ {
+ try
+ {
+ getZipFile();
+ }
+ catch (IOException ioe)
+ {
+ throw new RuntimeException(ioe);
+ }
+ Enumeration<? extends ZipEntry> itr = zipFile.entries();
+ while (itr.hasMoreElements())
+ {
+ String entry = itr.nextElement().toString();
+ if (entry.endsWith(".class"))
+ {
+ String name = entry.substring(0, entry.length() - 6).replace('/', '.');
+ if (name.equals(className))
+ return true;
+ }
+ }
+ return false;
+
+ } // }}}
+
+ //{{{ getCachePath() method
+ /**
+ * Returns the full path name of this plugin's summary file.
+ * The summary file is used to store certain information which allows
+ * loading of the plugin's resources and core class to be deferred
+ * until the plugin is first used. As long as a plugin is using the
+ * jEdit 4.2 plugin API, no extra effort is required to take advantage
+ * of the summary cache.
+ */
+ public String getCachePath()
+ {
+ return cachePath;
+ } //}}}
+
+ //{{{ getDependencySet() method
+ /**
+ *
+ * @param className of a plugin that we wish to load
+ * @return an ordered set of JARpaths that contains the
+ * plugins that need to be (re)loaded, in the correct order.
+ */
+ public static Set<String> getDependencySet(String className)
+ {
+ String dep;
+ Set<String> retval = new LinkedHashSet<String>();
+ int i=0;
+ while((dep = jEdit.getProperty("plugin." + className + ".depend." + i++)) != null)
+ {
+ PluginDepends pluginDepends;
+ try
+ {
+ pluginDepends = getPluginDepends(dep);
+ }
+ catch (IllegalArgumentException e)
+ {
+ Log.log(Log.ERROR, PluginJAR.class,
+ className + " has an invalid dependency: " + dep);
+ continue;
+ }
+
+ if(pluginDepends.what.equals("plugin"))
+ {
+ int index2 = pluginDepends.arg.indexOf(' ');
+ if ( index2 == -1)
+ {
+ Log.log(Log.ERROR, PluginJAR.class, className
+ + " has an invalid dependency: "
+ + dep + " (version is missing)");
+ continue;
+ }
+
+ String pluginName = pluginDepends.arg.substring(0,index2);
+ String needVersion = pluginDepends.arg.substring(index2 + 1);
+ //todo : check version ?
+ Set<String> loadTheseFirst = getDependencySet(pluginName);
+ loadTheseFirst.add(pluginName);
+ loadTheseFirst.addAll(retval);
+ retval = loadTheseFirst;
+ }
+ }
+ return retval;
+ } // }}}
+
+ //{{{ getFile() method
+ /**
+ * Returns a file pointing to the plugin JAR.
+ */
+ public File getFile()
+ {
+ return file;
+ } //}}}
+
+ //{{{ getClassLoader() method
+ /**
+ * Returns the plugin's class loader.
+ */
+ public JARClassLoader getClassLoader()
+ {
+ return classLoader;
+ } //}}}
+
+ //{{{ getZipFile() method
+ /**
+ * Returns the plugin's JAR file, opening it if necessary.
+ * @since jEdit 4.2pre1
+ */
+ public synchronized ZipFile getZipFile() throws IOException
+ {
+ if(zipFile == null)
+ {
+ Log.log(Log.DEBUG,this,"Opening " + path);
+ zipFile = new ZipFile(path);
+ }
+ return zipFile;
+ } //}}}
+
+ //{{{ getActions() method
+ /**
+ * @deprecated Call getActionSet() instead
+ */
+ @Deprecated
+ public ActionSet getActions()
+ {
+ return getActionSet();
+ } //}}}
+
+ //{{{ getActionSet() method
+ /**
+ * Returns the plugin's action set for the jEdit action context
+ * {@link jEdit#getActionContext()}. These actions are loaded from
+ * the <code>actions.xml</code> file; see {@link ActionSet}.
+ *.
+ * @since jEdit 4.2pre1
+ */
+ public ActionSet getActionSet()
+ {
+ return actions;
+ } //}}}
+
+ //{{{ getBrowserActionSet() method
+ /**
+ * Returns the plugin's action set for the file system browser action
+ * context {@link
+ * org.gjt.sp.jedit.browser.VFSBrowser#getActionContext()}.
+ * These actions are loaded from
+ * the <code>browser.actions.xml</code> file; see {@link ActionSet}.
+ *.
+ * @since jEdit 4.2pre1
+ */
+ public ActionSet getBrowserActionSet()
+ {
+ return browserActions;
+ } //}}}
+
+ //{{{ checkDependencies() method
+ /**
+ * Returns true if all dependencies are satisified, false otherwise.
+ * Also if dependencies are not satisfied, the plugin is marked as
+ * "broken".
+ *
+ */
+ public boolean checkDependencies()
+ {
+ if(plugin == null)
+ return true;
+ int i = 0;
+ boolean ok = true;
+
+ String name = plugin.getClassName();
+
+ String dep;
+ while((dep = jEdit.getProperty("plugin." + name + ".depend." + i++)) != null)
+ {
+ PluginDepends pluginDepends;
+ try
+ {
+ pluginDepends = getPluginDepends(dep);
+ }
+ catch (IllegalArgumentException e)
+ {
+ Log.log(Log.ERROR,this,name + " has an invalid"
+ + " dependency: " + dep);
+ ok = false;
+ continue;
+ }
+
+ if(pluginDepends.what.equals("jdk"))
+ {
+ if(!pluginDepends.optional && StandardUtilities.compareStrings(
+ System.getProperty("java.version"),
+ pluginDepends.arg,false) < 0)
+ {
+ String[] args = { pluginDepends.arg,
+ System.getProperty("java.version") };
+ jEdit.pluginError(path,"plugin-error.dep-jdk",args);
+ ok = false;
+ }
+ }
+ else if(pluginDepends.what.equals("jedit"))
+ {
+ if(pluginDepends.arg.length() != 11)
+ {
+ Log.log(Log.ERROR,this,"Invalid jEdit version"
+ + " number: " + pluginDepends.arg);
+ ok = false;
+ }
+
+ if(!pluginDepends.optional && StandardUtilities.compareStrings(
+ jEdit.getBuild(),pluginDepends.arg,false) < 0)
+ {
+ String needs = MiscUtilities.buildToVersion(pluginDepends.arg);
+ String[] args = { needs,
+ jEdit.getVersion() };
+ jEdit.pluginError(path,
+ "plugin-error.dep-jedit",args);
+ ok = false;
+ }
+ }
+ else if(pluginDepends.what.equals("plugin"))
+ {
+ int index2 = pluginDepends.arg.indexOf(' ');
+ if(index2 == -1)
+ {
+ Log.log(Log.ERROR,this,name
+ + " has an invalid dependency: "
+ + dep + " (version is missing)");
+ ok = false;
+ continue;
+ }
+
+ String pluginName = pluginDepends.arg.substring(0,index2);
+ String needVersion = pluginDepends.arg.substring(index2 + 1);
+ String currVersion = jEdit.getProperty("plugin."
+ + pluginName + ".version");
+
+ EditPlugin editPlugin = jEdit.getPlugin(pluginName, false);
+ if(editPlugin == null)
+ {
+ if(!pluginDepends.optional)
+ {
+ String[] args = { needVersion,
+ pluginName };
+ jEdit.pluginError(path,
+ "plugin-error.dep-plugin.no-version",
+ args);
+ ok = false;
+ }
+ }
+ else if(StandardUtilities.compareStrings(
+ currVersion,needVersion,false) < 0)
+ {
+ if(!pluginDepends.optional)
+ {
+ String[] args = { needVersion,
+ pluginName, currVersion };
+ jEdit.pluginError(path, "plugin-error.dep-plugin",args);
+ ok = false;
+ }
+ }
+ else if(editPlugin instanceof EditPlugin.Broken)
+ {
+ if(!pluginDepends.optional)
+ {
+ String[] args = { pluginName };
+ jEdit.pluginError(path, "plugin-error.dep-plugin.broken",args);
+ ok = false;
+ }
+ }
+ else
+ {
+ PluginJAR jar = editPlugin.getPluginJAR();
+ if (pluginDepends.optional)
+ {
+ jar.theseUseMe.add(path);
+ weUseThese.add(jar.getPath());
+ }
+ else
+ {
+ jar.theseRequireMe.add(path);
+ weRequireThese.add(jar.getPath());
+ }
+ }
+ }
+ else if(pluginDepends.what.equals("class"))
+ {
+ if(!pluginDepends.optional)
+ {
+ try
+ {
+ classLoader.loadClass(pluginDepends.arg,false);
+ }
+ catch(Exception e)
+ {
+ String[] args = { pluginDepends.arg };
+ jEdit.pluginError(path, "plugin-error.dep-class",args);
+ ok = false;
+ }
+ }
+ }
+ else
+ {
+ Log.log(Log.ERROR,this,name + " has unknown"
+ + " dependency: " + dep);
+ ok = false;
+ }
+ }
+
+ // each JAR file listed in the plugin's jars property
+ // needs to know that we need them
+ String jars = jEdit.getProperty("plugin."
+ + plugin.getClassName() + ".jars");
+ if(jars != null)
+ {
+ String dir = MiscUtilities.getParentOfPath(path);
+
+ StringTokenizer st = new StringTokenizer(jars);
+ while(st.hasMoreTokens())
+ {
+ String jarPath = MiscUtilities.constructPath(
+ dir,st.nextToken());
+ PluginJAR jar = jEdit.getPluginJAR(jarPath);
+ if(jar == null)
+ {
+ String[] args = { jarPath };
+ jEdit.pluginError(path, "plugin-error.missing-jar",args);
+ ok = false;
+ }
+ else
+ {
+ weRequireThese.add(jarPath);
+ jar.theseRequireMe.add(path);
+ }
+ }
+ }
+
+ if(!ok)
+ breakPlugin();
+
+ return ok;
+ } //}}}
+
+ //{{{ getRequiredJars() method
+ /**
+ * Returns the required jars of this plugin.
+ *
+ * @return the required jars of this plugin
+ * @since jEdit 4.3pre12
+ */
+ public Set<String> getRequiredJars()
+ {
+ return weRequireThese;
+ } //}}}
+
+ //{{{ getPluginDepends() method
+ private static PluginDepends getPluginDepends(String dep) throws IllegalArgumentException
+ {
+ boolean optional;
+ if(dep.startsWith("optional "))
+ {
+ optional = true;
+ dep = dep.substring("optional ".length());
+ }
+ else
+ {
+ optional = false;
+ }
+
+ int index = dep.indexOf(' ');
+ if(index == -1)
+ throw new IllegalArgumentException("wrong dependency");
+
+ String what = dep.substring(0,index);
+ String arg = dep.substring(index + 1);
+ PluginDepends depends = new PluginDepends();
+ depends.what = what;
+ depends.arg = arg;
+ depends.optional = optional;
+ return depends;
+ } //}}}
+
+ //{{{ PluginDepends class
+ private static class PluginDepends
+ {
+ String what;
+ String arg;
+ boolean optional;
+ } //}}}
+
+ //{{{ transitiveClosure()
+ /**
+ * If plugin A is needed by B, and B is needed by C, we want to
+ * tell the user that A is needed by B and C when they try to
+ * unload A.
+ *
+ * @param dependents a set of plugins which we wish to disable
+ * @param listModel a set of plugins which will be affected, and will need
+ * to be disabled also.
+ */
+ public static void transitiveClosure(String[] dependents, List<String> listModel)
+ {
+ for(int i = 0; i < dependents.length; i++)
+ {
+ String jarPath = dependents[i];
+ if(!listModel.contains(jarPath))
+ {
+ listModel.add(jarPath);
+ PluginJAR jar = jEdit.getPluginJAR(
+ jarPath);
+ transitiveClosure(jar.getDependentPlugins(),
+ listModel);
+ }
+ }
+ } //}}}
+
+ //{{{ getDependentPlugins() method
+ public String[] getDependentPlugins()
+ {
+ return theseRequireMe.toArray(new String[theseRequireMe.size()]);
+ } //}}}
+
+ //{{{ getPlugin() method
+ /**
+ * Returns the plugin core class for this JAR file. Note that if the
+ * plugin has not been activated, this will return an instance of
+ * {@link EditPlugin.Deferred}. If you need the actual plugin core
+ * class instance, call {@link #activatePlugin()} first.
+ * If the plugin is not yet loaded, returns null
+ *
+ * @since jEdit 4.2pre1
+ */
+ public EditPlugin getPlugin()
+ {
+ return plugin;
+ } //}}}
+
+ //{{{ activatePlugin() method
+ /**
+ * Loads the plugin core class. Does nothing if the plugin core class
+ * has already been loaded. This method might be called on startup,
+ * depending on what properties are set. See {@link EditPlugin#start()}.
+ * This method is thread-safe.
+ *
+ * @since jEdit 4.2pre1
+ */
+ public void activatePlugin()
+ {
+ synchronized (this)
+ {
+ if (activated)
+ {
+ // recursive call
+ return;
+ }
+
+ activated = true;
+ }
+
+ if (!(plugin instanceof EditPlugin.Deferred))
+ {
+ return;
+ }
+
+ String className = plugin.getClassName();
+
+ try
+ {
+ Class clazz = classLoader.loadClass(className,false);
+ int modifiers = clazz.getModifiers();
+ if(Modifier.isInterface(modifiers)
+ || Modifier.isAbstract(modifiers)
+ || !EditPlugin.class.isAssignableFrom(clazz))
+ {
+ Log.log(Log.ERROR,this,"Plugin has properties but does not extend EditPlugin: "
+ + className);
+ breakPlugin();
+ return;
+ }
+
+ plugin = (EditPlugin)clazz.newInstance();
+ plugin.jar = this;
+ }
+ catch (Throwable t)
+ {
+ breakPlugin();
+
+ Log.log(Log.ERROR,this,"Error while starting plugin " + className);
+ Log.log(Log.ERROR,this,t);
+ String[] args = { t.toString() };
+ jEdit.pluginError(path,"plugin-error.start-error",args);
+
+ return;
+ }
+
+ if (jEdit.isMainThread()
+ || SwingUtilities.isEventDispatchThread())
+ {
+ startPlugin();
+ }
+ else
+ {
+ // for thread safety
+ startPluginLater();
+ }
+
+ EditBus.sendAsync(new PluginUpdate(this,PluginUpdate.ACTIVATED,false));
+ } //}}}
+
+ //{{{ activateIfNecessary() method
+ /**
+ * Should be called after a new plugin is installed.
+ * @since jEdit 4.2pre2
+ */
+ public void activatePluginIfNecessary()
+ {
+ String filename = MiscUtilities.getFileName(getPath());
+ jEdit.setBooleanProperty("plugin-blacklist." + filename, false);
+ if(!(plugin instanceof EditPlugin.Deferred && plugin != null))
+ {
+ return;
+ }
+
+ String className = plugin.getClassName();
+
+ // default for plugins that don't specify this property (ie,
+ // 4.1-style plugins) is to load them on startup
+ String activate = jEdit.getProperty("plugin."
+ + className + ".activate");
+
+ if(activate == null)
+ {
+ // 4.1 plugin
+ if(!jEdit.isMainThread())
+ {
+ breakPlugin();
+
+ jEdit.pluginError(path,"plugin-error.not-42",null);
+ }
+ else
+ {
+ activatePlugin();
+ }
+ }
+ else
+ {
+ // 4.2 plugin
+
+ // if at least one property listed here is true,
+ // load the plugin
+ boolean load = false;
+
+ StringTokenizer st = new StringTokenizer(activate);
+ while(st.hasMoreTokens())
+ {
+ String prop = st.nextToken();
+ boolean value = jEdit.getBooleanProperty(prop);
+ if(value)
+ {
+ Log.log(Log.DEBUG,this,"Activating "
+ + className + " because of " + prop);
+ load = true;
+ break;
+ }
+ }
+
+ if(load)
+ {
+ activatePlugin();
+ }
+ }
+ } //}}}
+
+ //{{{ deactivatePlugin() method
+ /**
+ * Unloads the plugin core class. Does nothing if the plugin core class
+ * has not been loaded.
+ * This method can only be called from the AWT event dispatch thread!
+ * @see EditPlugin#stop()
+ *
+ * @since jEdit 4.2pre3
+ */
+ public void deactivatePlugin(boolean exit)
+ {
+ if(!activated)
+ return;
+
+ if(!exit)
+ {
+ // buffers retain a reference to the fold handler in
+ // question... and the easiest way to handle fold
+ // handler unloading is this...
+ Buffer buffer = jEdit.getFirstBuffer();
+ while(buffer != null)
+ {
+ if(buffer.getFoldHandler() != null
+ && buffer.getFoldHandler().getClass()
+ .getClassLoader() == classLoader)
+ {
+ buffer.setFoldHandler(
+ new DummyFoldHandler());
+ }
+ buffer = buffer.getNext();
+ }
+ }
+
+ if(plugin != null && !(plugin instanceof EditPlugin.Broken))
+ {
+ if(plugin instanceof EBPlugin ||
+ plugin.getClass().getAnnotation(EBHandler.class) != null)
+ {
+ EditBus.removeFromBus(plugin);
+ }
+
+ try
+ {
+ plugin.stop();
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Error while "
+ + "stopping plugin:");
+ Log.log(Log.ERROR,this,t);
+ }
+
+ plugin = new EditPlugin.Deferred(this,
+ plugin.getClassName());
+
+ EditBus.send(new PluginUpdate(this,
+ PluginUpdate.DEACTIVATED,exit));
+
+ if(!exit)
+ {
+ // see if this is a 4.1-style plugin
+ String activate = jEdit.getProperty("plugin."
+ + plugin.getClassName() + ".activate");
+
+ if(activate == null)
+ {
+ breakPlugin();
+ jEdit.pluginError(path,"plugin-error.not-42",null);
+ }
+ }
+ }
+
+ activated = false;
+ } //}}}
+
+ //{{{ getDockablesURI() method
+ /**
+ * Returns the location of the plugin's
+ * <code>dockables.xml</code> file.
+ * @since jEdit 4.2pre1
+ */
+ public URL getDockablesURI()
+ {
+ return dockablesURI;
+ } //}}}
+
+ //{{{ getServicesURI() method
+ /**
+ * Returns the location of the plugin's
+ * <code>services.xml</code> file.
+ * @since jEdit 4.2pre1
+ */
+ public URL getServicesURI()
+ {
+ return servicesURI;
+ } //}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ if(plugin == null)
+ return path;
+ else
+ return path + ",class=" + plugin.getClassName();
+ } //}}}
+
+ //{{{ Package-private members
+
+ //{{{ Static methods
+
+ //{{{ getPluginCache() method
+ public static PluginCacheEntry getPluginCache(PluginJAR plugin)
+ {
+ String jarCachePath = plugin.getCachePath();
+ if(jarCachePath == null)
+ return null;
+
+ DataInputStream din = null;
+ try
+ {
+ PluginCacheEntry cache = new PluginCacheEntry();
+ cache.plugin = plugin;
+ cache.modTime = plugin.getFile().lastModified();
+ din = new DataInputStream(
+ new BufferedInputStream(
+ new FileInputStream(jarCachePath)));
+ if(cache.read(din))
+ return cache;
+ else
+ {
+ // returns false with outdated cache
+ return null;
+ }
+ }
+ catch(FileNotFoundException fnf)
+ {
+ return null;
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,PluginJAR.class,io);
+ return null;
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(din);
+ }
+ } //}}}
+
+ //{{{ setPluginCache() method
+ static void setPluginCache(PluginJAR plugin, PluginCacheEntry cache)
+ {
+ String jarCachePath = plugin.getCachePath();
+ if(jarCachePath == null)
+ return;
+
+ Log.log(Log.DEBUG,PluginJAR.class,"Writing " + jarCachePath);
+
+ DataOutputStream dout = null;
+ try
+ {
+ dout = new DataOutputStream(
+ new BufferedOutputStream(
+ new FileOutputStream(jarCachePath)));
+ cache.write(dout);
+ dout.close();
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,PluginJAR.class,io);
+ IOUtilities.closeQuietly(dout);
+ new File(jarCachePath).delete();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ PluginJAR constructor
+ /**
+ * Creates a PluginJAR object which is not necessarily loaded, but can be later.
+ * @see #load(String, boolean)
+ */
+ public PluginJAR(File file)
+ {
+ path = file.getPath();
+ String jarCacheDir = jEdit.getJARCacheDirectory();
+ if(jarCacheDir != null)
+ {
+ cachePath = MiscUtilities.constructPath(
+ jarCacheDir,file.getName() + ".summary");
+ }
+ this.file = file;
+ classLoader = new JARClassLoader(this);
+ actions = new ActionSet();
+ } //}}}
+
+ //{{{ init() method
+ void init()
+ {
+ PluginCacheEntry cache = getPluginCache(this);
+ if(cache != null)
+ {
+ loadCache(cache);
+ classLoader.activate();
+ }
+ else
+ {
+ try
+ {
+ cache = generateCache();
+ if(cache != null)
+ {
+ setPluginCache(this,cache);
+ classLoader.activate();
+ }
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,"Cannot load"
+ + " plugin " + path);
+ Log.log(Log.ERROR,this,io);
+
+ String[] args = { io.toString() };
+ jEdit.pluginError(path,"plugin-error.load-error",args);
+
+ uninit(false);
+ }
+ }
+ } //}}}
+
+ //{{{ uninit() method
+ void uninit(boolean exit)
+ {
+ deactivatePlugin(exit);
+
+ if(!exit)
+ {
+ for (String path : weRequireThese)
+ {
+ PluginJAR jar = jEdit.getPluginJAR(path);
+ if(jar != null)
+ jar.theseRequireMe.remove(this.path);
+ }
+
+ for (String path : weUseThese)
+ {
+ PluginJAR jar = jEdit.getPluginJAR(path);
+ if(jar != null)
+ jar.theseUseMe.remove(this.path);
+ }
+
+ classLoader.deactivate();
+ BeanShell.resetClassManager();
+
+ if(actions != null)
+ jEdit.removeActionSet(actions);
+ if(browserActions != null)
+ VFSBrowser.getActionContext().removeActionSet(browserActions);
+
+ DockableWindowFactory.getInstance()
+ .unloadDockableWindows(this);
+ ServiceManager.unloadServices(this);
+
+ jEdit.removePluginProps(properties);
+
+ try
+ {
+ if(zipFile != null)
+ {
+ zipFile.close();
+ zipFile = null;
+ }
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+ }
+ }
+ } //}}}
+
+ //{{{ getClasses() method
+ String[] getClasses()
+ {
+ return classes;
+ } //}}}
+
+ //{{{ getResources() method
+ public String[] getResources()
+ {
+ return resources;
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ actionsPresentButNotCoreClass() method
+ private void actionsPresentButNotCoreClass()
+ {
+ Log.log(Log.WARNING,this,getPath() + " has an actions.xml but no plugin core class");
+ actions.setLabel("MISSING PLUGIN CORE CLASS");
+ } //}}}
+
+ //{{{ loadCache() method
+ private void loadCache(PluginCacheEntry cache)
+ {
+ classes = cache.classes;
+ resources = cache.resources;
+
+ /* this should be before dockables are initialized */
+ if(cache.cachedProperties != null)
+ {
+ properties = cache.cachedProperties;
+ jEdit.addPluginProps(cache.cachedProperties);
+ }
+
+ if(cache.actionsURI != null
+ && cache.cachedActionNames != null)
+ {
+ actions = new ActionSet(this,
+ cache.cachedActionNames,
+ cache.cachedActionToggleFlags,
+ cache.actionsURI);
+ }
+
+ if(cache.browserActionsURI != null
+ && cache.cachedBrowserActionNames != null)
+ {
+ browserActions = new ActionSet(this,
+ cache.cachedBrowserActionNames,
+ cache.cachedBrowserActionToggleFlags,
+ cache.browserActionsURI);
+ VFSBrowser.getActionContext().addActionSet(browserActions);
+ }
+
+ if(cache.dockablesURI != null
+ && cache.cachedDockableNames != null
+ && cache.cachedDockableActionFlags != null
+ && cache.cachedDockableMovableFlags != null)
+ {
+ dockablesURI = cache.dockablesURI;
+ DockableWindowFactory.getInstance()
+ .cacheDockableWindows(this,
+ cache.cachedDockableNames,
+ cache.cachedDockableActionFlags,
+ cache.cachedDockableMovableFlags);
+ }
+
+ if(actions.size() != 0)
+ jEdit.addActionSet(actions);
+
+ if(cache.servicesURI != null
+ && cache.cachedServices != null)
+ {
+ servicesURI = cache.servicesURI;
+ for(int i = 0; i < cache.cachedServices.length;
+ i++)
+ {
+ ServiceManager.Descriptor d
+ = cache.cachedServices[i];
+ ServiceManager.registerService(d);
+ }
+ }
+
+ if(cache.pluginClass != null)
+ {
+ // Check if a plugin with the same name
+ // is already loaded
+ if(jEdit.getPlugin(cache.pluginClass) != null)
+ {
+ jEdit.pluginError(path, "plugin-error.already-loaded",
+ null);
+ uninit(false);
+ }
+ else
+ {
+ String label = jEdit.getProperty(
+ "plugin." + cache.pluginClass
+ + ".name");
+ actions.setLabel(jEdit.getProperty(
+ "action-set.plugin",
+ new String[] { label }));
+ plugin = new EditPlugin.Deferred(this,
+ cache.pluginClass);
+ }
+ }
+ else
+ {
+ if(actions.size() != 0)
+ actionsPresentButNotCoreClass();
+ }
+ } //}}}
+
+ //{{{ generateCache() method
+ public PluginCacheEntry generateCache() throws IOException
+ {
+ properties = new Properties();
+
+ List<String> classes = new LinkedList<String>();
+ List<String> resources = new LinkedList<String>();
+
+ ZipFile zipFile = getZipFile();
+
+ List<String> plugins = new LinkedList<String>();
+
+ PluginCacheEntry cache = new PluginCacheEntry();
+ cache.modTime = file.lastModified();
+ cache.cachedProperties = new Properties();
+
+ Enumeration<? extends ZipEntry> entries = zipFile.entries();
+ while(entries.hasMoreElements())
+ {
+ ZipEntry entry = entries.nextElement();
+ String name = entry.getName();
+ String lname = name.toLowerCase();
+ if(lname.equals("actions.xml"))
+ {
+ cache.actionsURI = classLoader.getResource(name);
+ }
+ else if(lname.equals("browser.actions.xml"))
+ {
+ cache.browserActionsURI = classLoader.getResource(name);
+ }
+ else if(lname.equals("dockables.xml"))
+ {
+ dockablesURI = classLoader.getResource(name);
+ cache.dockablesURI = dockablesURI;
+ }
+ else if(lname.equals("services.xml"))
+ {
+ servicesURI = classLoader.getResource(name);
+ cache.servicesURI = servicesURI;
+ }
+ else if(lname.endsWith(".props"))
+ {
+ InputStream in = classLoader.getResourceAsStream(name);
+ properties.load(in);
+ in.close();
+ }
+ else if(name.endsWith(".class"))
+ {
+ String className = MiscUtilities
+ .fileToClass(name);
+ if(className.endsWith("Plugin"))
+ {
+ plugins.add(className);
+ }
+ classes.add(className);
+ }
+ else
+ {
+ resources.add(name);
+ }
+ }
+
+ cache.cachedProperties = properties;
+ jEdit.addPluginProps(properties);
+
+ this.classes = cache.classes =
+ classes.toArray(
+ new String[classes.size()]);
+ this.resources = cache.resources =
+ resources.toArray(
+ new String[resources.size()]);
+
+ String label = null;
+
+ for (String className : plugins)
+ {
+ String _label = jEdit.getProperty("plugin."
+ + className + ".name");
+ String version = jEdit.getProperty("plugin."
+ + className + ".version");
+ if(_label == null || version == null)
+ {
+ Log.log(Log.WARNING,this,"Ignoring: "
+ + className);
+ }
+ else
+ {
+ cache.pluginClass = className;
+
+ // Check if a plugin with the same name
+ // is already loaded
+ if(jEdit.getPlugin(className) != null)
+ {
+ jEdit.pluginError(path, "plugin-error.already-loaded",
+ null);
+ return null;
+ }
+ plugin = new EditPlugin.Deferred(this,
+ className);
+ label = _label;
+
+ break;
+ }
+ }
+
+ if(cache.actionsURI != null)
+ {
+ actions = new ActionSet(this,null,null,
+ cache.actionsURI);
+ actions.load();
+ cache.cachedActionNames =
+ actions.getCacheableActionNames();
+ cache.cachedActionToggleFlags =
+ new boolean[cache.cachedActionNames.length];
+ for(int i = 0; i < cache.cachedActionNames.length; i++)
+ {
+ cache.cachedActionToggleFlags[i] =
+ jEdit.getBooleanProperty(
+ cache.cachedActionNames[i] + ".toggle");
+ }
+ }
+
+ if(cache.browserActionsURI != null)
+ {
+ browserActions =
+ new ActionSet(this,null,null, cache.browserActionsURI);
+ browserActions.load();
+ VFSBrowser.getActionContext().addActionSet(browserActions);
+ cache.cachedBrowserActionNames =
+ browserActions.getCacheableActionNames();
+ cache.cachedBrowserActionToggleFlags = new boolean[
+ cache.cachedBrowserActionNames.length];
+ for(int i = 0;
+ i < cache.cachedBrowserActionNames.length; i++)
+ {
+ cache.cachedBrowserActionToggleFlags[i]
+ = jEdit.getBooleanProperty(
+ cache.cachedBrowserActionNames[i] + ".toggle");
+ }
+ }
+
+ if(dockablesURI != null)
+ {
+ DockableWindowFactory.getInstance()
+ .loadDockableWindows(this, dockablesURI,cache);
+ }
+
+ if(actions.size() != 0)
+ {
+ if(label != null)
+ {
+ actions.setLabel(jEdit.getProperty(
+ "action-set.plugin", new String[] { label }));
+ }
+ else
+ actionsPresentButNotCoreClass();
+
+ jEdit.addActionSet(actions);
+ }
+
+ if(servicesURI != null)
+ {
+ ServiceManager.loadServices(this,servicesURI,cache);
+ }
+
+ return cache;
+ } //}}}
+
+ //{{{ startPlugin() method
+ private void startPlugin()
+ {
+ try
+ {
+ plugin.start();
+ }
+ catch(Throwable t)
+ {
+ breakPlugin();
+
+ Log.log(Log.ERROR,PluginJAR.this,
+ "Error while starting plugin " + plugin.getClassName());
+ Log.log(Log.ERROR,PluginJAR.this,t);
+ String[] args = { t.toString() };
+ jEdit.pluginError(path, "plugin-error.start-error",args);
+ }
+
+ if(plugin instanceof EBPlugin ||
+ plugin.getClass().getAnnotation(EBHandler.class) != null)
+ {
+ if(jEdit.getProperty("plugin." + plugin.getClassName()
+ + ".activate") == null)
+ {
+ // old plugins expected jEdit 4.1-style
+ // behavior, where a PropertiesChanged
+ // was sent after plugins were started
+ ((EBComponent)plugin).handleMessage(
+ new org.gjt.sp.jedit.msg.PropertiesChanged(null));
+ }
+ EditBus.addToBus(plugin);
+ }
+
+ // buffers retain a reference to the fold handler in
+ // question... and the easiest way to handle fold
+ // handler loading is this...
+ Buffer buffer = jEdit.getFirstBuffer();
+ while(buffer != null)
+ {
+ FoldHandler handler =
+ FoldHandler.getFoldHandler(
+ buffer.getStringProperty("folding"));
+ // == null before loaded
+ if(buffer.getFoldHandler() != null
+ && handler != null
+ && handler != buffer.getFoldHandler())
+ {
+ buffer.setFoldHandler(handler);
+ }
+ buffer = buffer.getNext();
+ }
+ } //}}}
+
+ //{{{ startPluginLater() method
+ private void startPluginLater()
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ if(!activated)
+ return;
+
+ startPlugin();
+ }
+ });
+ } //}}}
+
+ //{{{ breakPlugin() method
+ private void breakPlugin()
+ {
+ plugin = new EditPlugin.Broken(this,plugin.getClassName());
+
+ // remove action sets, dockables, etc so that user doesn't
+ // see the broken plugin
+ uninit(false);
+ // but we want properties to hang around
+ jEdit.addPluginProps(properties);
+ } //}}}
+
+ //}}}
+
+ //{{{ PluginCacheEntry class
+ /**
+ * Used by the <code>DockableWindowManager</code> and
+ * <code>ServiceManager</code> to handle caching.
+ * @since jEdit 4.2pre1
+ */
+ public static class PluginCacheEntry
+ {
+ public static final int MAGIC = 0xB7A2E422;
+
+ //{{{ Instance variables
+ public PluginJAR plugin;
+ public long modTime;
+
+ public String[] classes;
+ public String[] resources;
+ public URL actionsURI;
+ public String[] cachedActionNames;
+ public boolean[] cachedActionToggleFlags;
+ public URL browserActionsURI;
+ public String[] cachedBrowserActionNames;
+ public boolean[] cachedBrowserActionToggleFlags;
+ public URL dockablesURI;
+ public String[] cachedDockableNames;
+ public boolean[] cachedDockableActionFlags;
+ public boolean[] cachedDockableMovableFlags;
+ public URL servicesURI;
+ ServiceManager.Descriptor[] cachedServices;
+
+ public Properties cachedProperties;
+ public String pluginClass;
+ //}}}
+
+ /* read() and write() must be kept perfectly in sync...
+ * its a very simple file format. doing it this way is
+ * faster than serializing since serialization calls
+ * reflection, etc. */
+
+ //{{{ read() method
+ public boolean read(DataInputStream din) throws IOException
+ {
+ int cacheMagic = din.readInt();
+ if(cacheMagic != MAGIC)
+ return false;
+
+ String cacheBuild = readString(din);
+ if(!cacheBuild.equals(jEdit.getBuild()))
+ return false;
+
+ long cacheModTime = din.readLong();
+ if(cacheModTime != modTime)
+ return false;
+
+ actionsURI = readURI(din);
+ cachedActionNames = readStringArray(din);
+ cachedActionToggleFlags = readBooleanArray(din);
+
+ browserActionsURI = readURI(din);
+ cachedBrowserActionNames = readStringArray(din);
+ cachedBrowserActionToggleFlags = readBooleanArray(din);
+
+ dockablesURI = readURI(din);
+ cachedDockableNames = readStringArray(din);
+ cachedDockableActionFlags = readBooleanArray(din);
+ cachedDockableMovableFlags = readBooleanArray(din);
+
+ servicesURI = readURI(din);
+ int len = din.readInt();
+ if(len == 0)
+ cachedServices = null;
+ else
+ {
+ cachedServices = new ServiceManager.Descriptor[len];
+ for(int i = 0; i < len; i++)
+ {
+ ServiceManager.Descriptor d = new
+ ServiceManager.Descriptor(
+ readString(din),
+ readString(din),
+ null,
+ plugin);
+ cachedServices[i] = d;
+ }
+ }
+
+ classes = readStringArray(din);
+ resources = readStringArray(din);
+
+ cachedProperties = readMap(din);
+
+ pluginClass = readString(din);
+
+ return true;
+ } //}}}
+
+ //{{{ write() method
+ public void write(DataOutputStream dout) throws IOException
+ {
+ dout.writeInt(MAGIC);
+ writeString(dout,jEdit.getBuild());
+
+ dout.writeLong(modTime);
+
+ writeString(dout,actionsURI);
+ writeStringArray(dout,cachedActionNames);
+ writeBooleanArray(dout,cachedActionToggleFlags);
+
+ writeString(dout,browserActionsURI);
+ writeStringArray(dout,cachedBrowserActionNames);
+ writeBooleanArray(dout,cachedBrowserActionToggleFlags);
+
+ writeString(dout,dockablesURI);
+ writeStringArray(dout,cachedDockableNames);
+ writeBooleanArray(dout,cachedDockableActionFlags);
+ writeBooleanArray(dout,cachedDockableMovableFlags);
+
+ writeString(dout,servicesURI);
+ if(cachedServices == null)
+ dout.writeInt(0);
+ else
+ {
+ dout.writeInt(cachedServices.length);
+ for(int i = 0; i < cachedServices.length; i++)
+ {
+ writeString(dout,cachedServices[i].clazz);
+ writeString(dout,cachedServices[i].name);
+ }
+ }
+
+ writeStringArray(dout,classes);
+ writeStringArray(dout,resources);
+
+ writeMap(dout,cachedProperties);
+
+ writeString(dout,pluginClass);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ readString() method
+ private static String readString(DataInputStream din)
+ throws IOException
+ {
+ int len = din.readInt();
+ if(len == 0)
+ return null;
+ char[] str = new char[len];
+ for(int i = 0; i < len; i++)
+ str[i] = din.readChar();
+ return new String(str);
+ } //}}}
+
+ //{{{ readURI() method
+ private static URL readURI(DataInputStream din)
+ throws IOException
+ {
+ String str = readString(din);
+ if(str == null)
+ return null;
+ else
+ return new URL(str);
+ } //}}}
+
+ //{{{ readStringArray() method
+ private static String[] readStringArray(DataInputStream din)
+ throws IOException
+ {
+ int len = din.readInt();
+ if(len == 0)
+ return null;
+ String[] str = new String[len];
+ for(int i = 0; i < len; i++)
+ {
+ str[i] = readString(din);
+ }
+ return str;
+ } //}}}
+
+ //{{{ readBooleanArray() method
+ private static boolean[] readBooleanArray(DataInputStream din)
+ throws IOException
+ {
+ int len = din.readInt();
+ if(len == 0)
+ return null;
+ boolean[] bools = new boolean[len];
+ for(int i = 0; i < len; i++)
+ {
+ bools[i] = din.readBoolean();
+ }
+ return bools;
+ } //}}}
+
+ //{{{ readMap() method
+ private static Properties readMap(DataInputStream din)
+ throws IOException
+ {
+ Properties returnValue = new Properties();
+ int count = din.readInt();
+ for(int i = 0; i < count; i++)
+ {
+ String key = readString(din);
+ String value = readString(din);
+ if(value == null)
+ value = "";
+ returnValue.put(key,value);
+ }
+ return returnValue;
+ } //}}}
+
+ //{{{ writeString() method
+ private static void writeString(DataOutputStream dout,
+ Object obj) throws IOException
+ {
+ if(obj == null)
+ {
+ dout.writeInt(0);
+ }
+ else
+ {
+ String str = obj.toString();
+ dout.writeInt(str.length());
+ dout.writeChars(str);
+ }
+ } //}}}
+
+ //{{{ writeStringArray() method
+ private static void writeStringArray(DataOutputStream dout,
+ String[] str) throws IOException
+ {
+ if(str == null)
+ {
+ dout.writeInt(0);
+ }
+ else
+ {
+ dout.writeInt(str.length);
+ for(int i = 0; i < str.length; i++)
+ {
+ writeString(dout,str[i]);
+ }
+ }
+ } //}}}
+
+ //{{{ writeBooleanArray() method
+ private static void writeBooleanArray(DataOutputStream dout,
+ boolean[] bools) throws IOException
+ {
+ if(bools == null)
+ {
+ dout.writeInt(0);
+ }
+ else
+ {
+ dout.writeInt(bools.length);
+ for(int i = 0; i < bools.length; i++)
+ {
+ dout.writeBoolean(bools[i]);
+ }
+ }
+ } //}}}
+
+ //{{{ writeMap() method
+ private static void writeMap(DataOutputStream dout, Map map)
+ throws IOException
+ {
+ dout.writeInt(map.size());
+ Set<Map.Entry<Object, Object>> set = map.entrySet();
+ for (Map.Entry<Object, Object> entry : set)
+ {
+ writeString(dout,entry.getKey());
+ writeString(dout,entry.getValue());
+ }
+ } //}}}
+
+ //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/PropertyManager.java b/jEdit/org/gjt/sp/jedit/PropertyManager.java
index c2842f1..5e7b5ea 100644
--- a/jEdit/org/gjt/sp/jedit/PropertyManager.java
+++ b/jEdit/org/gjt/sp/jedit/PropertyManager.java
@@ -1,190 +1,190 @@
-/*
- * PropertyManager.java - Manages property files
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import java.io.*;
-import java.util.*;
-
-class PropertyManager
-{
- //{{{ getProperties() method
- Properties getProperties()
- {
- Properties total = new Properties();
- total.putAll(system);
- for (Properties plugin : plugins)
- total.putAll(plugin);
- total.putAll(site);
- total.putAll(user);
- return total;
- } //}}}
-
- //{{{ loadSystemProps() method
- void loadSystemProps(InputStream in)
- throws IOException
- {
- loadProps(system,in);
- } //}}}
-
- //{{{ loadSiteProps() method
- void loadSiteProps(InputStream in)
- throws IOException
- {
- loadProps(site,in);
- } //}}}
-
- //{{{ loadUserProps() method
- void loadUserProps(InputStream in)
- throws IOException
- {
- loadProps(user,in);
- } //}}}
-
- //{{{ saveUserProps() method
- void saveUserProps(OutputStream out)
- throws IOException
- {
- user.store(out,"jEdit properties");
- } //}}}
-
- //{{{ loadPluginProps() method
- Properties loadPluginProps(InputStream in)
- throws IOException
- {
- Properties plugin = new Properties();
- loadProps(plugin,in);
- plugins.add(plugin);
- return plugin;
- } //}}}
-
- //{{{ addPluginProps() method
- void addPluginProps(Properties props)
- {
- plugins.add(props);
- } //}}}
-
- //{{{ removePluginProps() method
- void removePluginProps(Properties props)
- {
- plugins.remove(props);
- } //}}}
-
- //{{{ getProperty() method
- String getProperty(String name)
- {
- String value = user.getProperty(name);
- if(value != null)
- return value;
- else
- return getDefaultProperty(name);
- } //}}}
-
- //{{{ setProperty() method
- void setProperty(String name, String value)
- {
- String prop = getDefaultProperty(name);
-
- /* if value is null:
- * - if default is null, unset user prop
- * - else set user prop to ""
- * else
- * - if default equals value, ignore
- * - if default doesn't equal value, set user
- */
- if(value == null)
- {
- if(prop == null || prop.length() == 0)
- user.remove(name);
- else
- user.setProperty(name,"");
- }
- else
- {
- if(value.equals(prop))
- user.remove(name);
- else
- user.setProperty(name,value);
- }
- } //}}}
-
- //{{{ setTemporaryProperty() method
- public void setTemporaryProperty(String name, String value)
- {
- user.remove(name);
- system.setProperty(name,value);
- } //}}}
-
- //{{{ unsetProperty() method
- void unsetProperty(String name)
- {
- if(getDefaultProperty(name) != null)
- user.setProperty(name,"");
- else
- user.remove(name);
- } //}}}
-
- //{{{ resetProperty() method
- public void resetProperty(String name)
- {
- user.remove(name);
- } //}}}
-
- //{{{ Private members
- private Properties system = new Properties();
- private List<Properties> plugins = new LinkedList<Properties>();
- private Properties site = new Properties();
- private Properties user = new Properties();
-
- //{{{ getDefaultProperty() method
- private String getDefaultProperty(String name)
- {
- String value = site.getProperty(name);
- if(value != null)
- return value;
-
- for (Properties plugin : plugins)
- {
- value = plugin.getProperty(name);
- if (value != null)
- return value;
- }
-
- return system.getProperty(name);
- } //}}}
-
- //{{{ loadProps() method
- private static void loadProps(Properties into, InputStream in)
- throws IOException
- {
- try
- {
- into.load(in);
- }
- finally
- {
- in.close();
- }
- } //}}}
-
- //}}}
-}
+/*
+ * PropertyManager.java - Manages property files
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import java.io.*;
+import java.util.*;
+
+class PropertyManager
+{
+ //{{{ getProperties() method
+ Properties getProperties()
+ {
+ Properties total = new Properties();
+ total.putAll(system);
+ for (Properties plugin : plugins)
+ total.putAll(plugin);
+ total.putAll(site);
+ total.putAll(user);
+ return total;
+ } //}}}
+
+ //{{{ loadSystemProps() method
+ void loadSystemProps(InputStream in)
+ throws IOException
+ {
+ loadProps(system,in);
+ } //}}}
+
+ //{{{ loadSiteProps() method
+ void loadSiteProps(InputStream in)
+ throws IOException
+ {
+ loadProps(site,in);
+ } //}}}
+
+ //{{{ loadUserProps() method
+ void loadUserProps(InputStream in)
+ throws IOException
+ {
+ loadProps(user,in);
+ } //}}}
+
+ //{{{ saveUserProps() method
+ void saveUserProps(OutputStream out)
+ throws IOException
+ {
+ user.store(out,"jEdit properties");
+ } //}}}
+
+ //{{{ loadPluginProps() method
+ Properties loadPluginProps(InputStream in)
+ throws IOException
+ {
+ Properties plugin = new Properties();
+ loadProps(plugin,in);
+ plugins.add(plugin);
+ return plugin;
+ } //}}}
+
+ //{{{ addPluginProps() method
+ void addPluginProps(Properties props)
+ {
+ plugins.add(props);
+ } //}}}
+
+ //{{{ removePluginProps() method
+ void removePluginProps(Properties props)
+ {
+ plugins.remove(props);
+ } //}}}
+
+ //{{{ getProperty() method
+ String getProperty(String name)
+ {
+ String value = user.getProperty(name);
+ if(value != null)
+ return value;
+ else
+ return getDefaultProperty(name);
+ } //}}}
+
+ //{{{ setProperty() method
+ void setProperty(String name, String value)
+ {
+ String prop = getDefaultProperty(name);
+
+ /* if value is null:
+ * - if default is null, unset user prop
+ * - else set user prop to ""
+ * else
+ * - if default equals value, ignore
+ * - if default doesn't equal value, set user
+ */
+ if(value == null)
+ {
+ if(prop == null || prop.length() == 0)
+ user.remove(name);
+ else
+ user.setProperty(name,"");
+ }
+ else
+ {
+ if(value.equals(prop))
+ user.remove(name);
+ else
+ user.setProperty(name,value);
+ }
+ } //}}}
+
+ //{{{ setTemporaryProperty() method
+ public void setTemporaryProperty(String name, String value)
+ {
+ user.remove(name);
+ system.setProperty(name,value);
+ } //}}}
+
+ //{{{ unsetProperty() method
+ void unsetProperty(String name)
+ {
+ if(getDefaultProperty(name) != null)
+ user.setProperty(name,"");
+ else
+ user.remove(name);
+ } //}}}
+
+ //{{{ resetProperty() method
+ public void resetProperty(String name)
+ {
+ user.remove(name);
+ } //}}}
+
+ //{{{ Private members
+ private Properties system = new Properties();
+ private List<Properties> plugins = new LinkedList<Properties>();
+ private Properties site = new Properties();
+ private Properties user = new Properties();
+
+ //{{{ getDefaultProperty() method
+ private String getDefaultProperty(String name)
+ {
+ String value = site.getProperty(name);
+ if(value != null)
+ return value;
+
+ for (Properties plugin : plugins)
+ {
+ value = plugin.getProperty(name);
+ if (value != null)
+ return value;
+ }
+
+ return system.getProperty(name);
+ } //}}}
+
+ //{{{ loadProps() method
+ private static void loadProps(Properties into, InputStream in)
+ throws IOException
+ {
+ try
+ {
+ into.load(in);
+ }
+ finally
+ {
+ in.close();
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/RegisterSaver.java b/jEdit/org/gjt/sp/jedit/RegisterSaver.java
index b0e6819..63a7897 100644
--- a/jEdit/org/gjt/sp/jedit/RegisterSaver.java
+++ b/jEdit/org/gjt/sp/jedit/RegisterSaver.java
@@ -1,33 +1,33 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit;
-
-/**
- * An interface to delegate save/load operations of registers.
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-public interface RegisterSaver
-{
- void loadRegisters();
-
- void saveRegisters();
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit;
+
+/**
+ * An interface to delegate save/load operations of registers.
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+public interface RegisterSaver
+{
+ void loadRegisters();
+
+ void saveRegisters();
+}
diff --git a/jEdit/org/gjt/sp/jedit/Registers.java b/jEdit/org/gjt/sp/jedit/Registers.java
index d0560a9..505a4d9 100644
--- a/jEdit/org/gjt/sp/jedit/Registers.java
+++ b/jEdit/org/gjt/sp/jedit/Registers.java
@@ -1,650 +1,904 @@
-/*
- * Registers.java - Register manager
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.awt.datatransfer.*;
-import java.awt.Toolkit;
-import java.io.*;
-
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.gui.HistoryModel;
-import org.gjt.sp.jedit.textarea.TextArea;
-import org.gjt.sp.jedit.textarea.Selection;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * jEdit's registers are an extension of the clipboard metaphor.<p>
- *
- * A {@link Registers.Register} is string of text indexed by a
- * single character. Typically the text is taken from selected buffer text
- * and the index character is a keyboard character selected by the user.<p>
- *
- * This class defines a number of static methods
- * that give each register the properties of a virtual clipboard.<p>
- *
- * Two classes implement the {@link Registers.Register} interface. A
- * {@link Registers.ClipboardRegister} is tied to the contents of the
- * system clipboard. jEdit assigns a
- * {@link Registers.ClipboardRegister} to the register indexed under
- * the character <code>$</code>. A
- * {@link Registers.StringRegister} is created for registers assigned
- * by the user. In addition, jEdit assigns <code>%</code> to
- * the last text segment selected in the text area. On Windows this is a
- * {@link Registers.StringRegister}, on Unix under Java 2 version 1.4, a
- * {@link Registers.ClipboardRegister}.
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: Registers.java 14793 2009-03-17 22:43:27Z ezust $
- */
-public class Registers
-{
- //{{{ copy() method
- /**
- * Copies the text selected in the text area into the specified register.
- * This will replace the existing contents of the designated register.
- *
- * @param textArea The text area
- * @param register The register
- * @since jEdit 2.7pre2
- */
- public static void copy(TextArea textArea, char register)
- {
- String selection = textArea.getSelectedText();
- if(selection == null)
- return;
-
- setRegister(register,selection);
- HistoryModel.getModel("clipboard").addItem(selection);
-
- } //}}}
-
- //{{{ cut() method
- /**
- * Copies the text selected in the text area into the specified
- * register, and then removes it from the buffer.
- *
- * @param textArea The text area
- * @param register The register
- * @since jEdit 2.7pre2
- */
- public static void cut(TextArea textArea, char register)
- {
- if(textArea.isEditable())
- {
- String selection = textArea.getSelectedText();
- if(selection == null)
- return;
-
- setRegister(register,selection);
- HistoryModel.getModel("clipboard").addItem(selection);
-
- textArea.setSelectedText("");
- }
- else
- textArea.getToolkit().beep();
- } //}}}
-
- //{{{ append() method
- /**
- * Appends the text selected in the text area to the specified register,
- * with a newline between the old and new text.
- * @param textArea The text area
- * @param register The register
- */
- public static void append(TextArea textArea, char register)
- {
- append(textArea,register,"\n",false);
- } //}}}
-
- //{{{ append() method
- /**
- * Appends the text selected in the text area to the specified register.
- * @param textArea The text area
- * @param register The register
- * @param separator The separator to insert between the old and new text
- */
- public static void append(TextArea textArea, char register,
- String separator)
- {
- append(textArea,register,separator,false);
- } //}}}
-
- //{{{ append() method
- /**
- * Appends the text selected in the text area to the specified register.
- * @param textArea The text area
- * @param register The register
- * @param separator The text to insert between the old and new text
- * @param cut Should the current selection be removed?
- * @since jEdit 3.2pre1
- */
- public static void append(TextArea textArea, char register,
- String separator, boolean cut)
- {
- if(cut && !textArea.isEditable())
- {
- textArea.getToolkit().beep();
- return;
- }
-
- String selection = textArea.getSelectedText();
- if(selection == null)
- return;
-
- Register reg = getRegister(register);
-
- if(reg != null)
- {
- String registerContents = reg.toString();
- if(registerContents != null)
- {
- if(registerContents.endsWith(separator))
- selection = registerContents + selection;
- else
- selection = registerContents + separator + selection;
- }
- }
-
- setRegister(register,selection);
- HistoryModel.getModel("clipboard").addItem(selection);
-
- if(cut)
- textArea.setSelectedText("");
- } //}}}
-
- //{{{ paste() methods
- /**
- * Insets the contents of the specified register into the text area.
- * @param textArea The text area
- * @param register The register
- * @since jEdit 2.7pre2
- */
- public static void paste(TextArea textArea, char register)
- {
- paste(textArea,register,false);
- }
-
- /**
- * Inserts the contents of the specified register into the text area.
- * @param textArea The text area
- * @param register The register
- * @param vertical Vertical (columnar) paste
- * @since jEdit 4.1pre1
- */
- public static void paste(TextArea textArea, char register,
- boolean vertical)
- {
- if(!textArea.isEditable())
- {
- textArea.getToolkit().beep();
- return;
- }
-
- Register reg = getRegister(register);
-
- if(reg == null)
- {
- textArea.getToolkit().beep();
- return;
- }
-
- String selection = reg.toString();
- if(selection == null)
- {
- textArea.getToolkit().beep();
- return;
- }
- JEditBuffer buffer = textArea.getBuffer();
- try
- {
- buffer.beginCompoundEdit();
-
- /* vertical paste */
- if(vertical && textArea.getSelectionCount() == 0)
- {
- int caret = textArea.getCaretPosition();
- int caretLine = textArea.getCaretLine();
- Selection.Rect rect = new Selection.Rect(
- caretLine,caret,caretLine,caret);
- textArea.setSelectedText(rect,selection);
- caretLine = textArea.getCaretLine();
-
- if(caretLine != textArea.getLineCount() - 1)
- {
-
- int startColumn = rect.getStartColumn(
- buffer);
- int offset = buffer
- .getOffsetOfVirtualColumn(
- caretLine + 1,startColumn,null);
- if(offset == -1)
- {
- buffer.insertAtColumn(caretLine + 1,startColumn,"");
- textArea.setCaretPosition(
- buffer.getLineEndOffset(
- caretLine + 1) - 1);
- }
- else
- {
- textArea.setCaretPosition(
- buffer.getLineStartOffset(
- caretLine + 1) + offset);
- }
- }
- }
- else /* Regular paste */
- {
- textArea.replaceSelection(selection);
- }
- }
- finally {
- buffer.endCompoundEdit();
- }
- HistoryModel.getModel("clipboard").addItem(selection);
- } //}}}
-
- //{{{ getRegister() method
- /**
- * Returns the specified register.
- * @param name The name
- */
- public static Register getRegister(char name)
- {
- if(name != '$' && name != '%')
- {
- if(!loaded)
- loadRegisters();
- }
-
- if(registers == null || name >= registers.length)
- return null;
- else
- return registers[name];
- } //}}}
-
- //{{{ setRegister() method
- /**
- * Sets the specified register.
- * @param name The name
- * @param newRegister The new value
- */
- public static void setRegister(char name, Register newRegister)
- {
- touchRegister(name);
-
- if(name >= registers.length)
- {
- Register[] newRegisters = new Register[
- Math.min(1<<16, name<<1)];
- System.arraycopy(registers,0,newRegisters,0,
- registers.length);
- registers = newRegisters;
- }
-
- registers[name] = newRegister;
- if (listener != null)
- listener.registerChanged(name);
- } //}}}
-
- //{{{ setRegister() method
- /**
- * Sets the specified register.
- * @param name The name
- * @param value The new value
- */
- public static void setRegister(char name, String value)
- {
- touchRegister(name);
- Register register = getRegister(name);
- if(register != null)
- {
- register.setValue(value);
- if (listener != null)
- listener.registerChanged(name);
- }
- else
- setRegister(name,new StringRegister(value));
- } //}}}
-
- //{{{ clearRegister() method
- /**
- * Sets the value of the specified register to <code>null</code>.
- * @param name The register name
- */
- public static void clearRegister(char name)
- {
- if(name >= registers.length)
- return;
-
- Register register = registers[name];
- if(name == '$' || name == '%')
- register.setValue("");
- else
- {
- registers[name] = null;
- modified = true;
- if (listener != null)
- listener.registerChanged(name);
- }
- } //}}}
-
- //{{{ getRegisters() method
- /**
- * Returns an array of all available registers. Some of the elements
- * of this array might be <code>null</code>.
- */
- public static Register[] getRegisters()
- {
- if(!loaded)
- loadRegisters();
- return registers;
- } //}}}
-
- //{{{ getRegisterNameString() method
- /**
- * Returns a string of all defined registers, used by the status bar
- * (eg, "a b $ % ^").
- * @since jEdit 4.2pre2
- */
- public static String getRegisterNameString()
- {
- if(!loaded)
- loadRegisters();
-
- StringBuilder buf = new StringBuilder(registers.length << 1);
- for(int i = 0; i < registers.length; i++)
- {
- if(registers[i] != null)
- {
- if(buf.length() != 0)
- buf.append(' ');
- buf.append((char)i);
- }
- }
-
- if(buf.length() == 0)
- return null;
- else
- return buf.toString();
- } //}}}
-
- //{{{ saveRegisters() method
- public static void saveRegisters()
- {
- if(!loaded || !modified)
- return;
-
- if (saver != null)
- {
- saver.saveRegisters();
- modified = false;
- }
- } //}}}
-
- //{{{ setListener() method
- public static void setListener(RegistersListener listener)
- {
- Registers.listener = listener;
- } //}}}
-
- //{{{ setSaver() method
- public static void setSaver(RegisterSaver saver)
- {
- Registers.saver = saver;
- } //}}}
-
- //{{{ isLoading() method
- public static boolean isLoading()
- {
- return loading;
- } //}}}
-
- //{{{ setLoading() method
- public static void setLoading(boolean loading)
- {
- Registers.loading = loading;
- } //}}}
-
- //{{{ Private members
- private static Register[] registers;
- private static boolean loaded, loading;
- private static RegisterSaver saver;
- private static RegistersListener listener;
- /**
- * Flag that tell if a register has been modified (except for '%' and '$' registers that aren't
- * saved to the xml file).
- */
- private static boolean modified;
-
- private Registers() {}
-
- static
- {
- registers = new Register[256];
- Toolkit toolkit = Toolkit.getDefaultToolkit();
- registers['$'] = new ClipboardRegister(
- toolkit.getSystemClipboard());
- Clipboard selection = toolkit.getSystemSelection();
- if(selection != null)
- registers['%'] = new ClipboardRegister(selection);
- }
-
- //{{{ touchRegister() method
- private static void touchRegister(char name)
- {
- if(name == '%' || name == '$')
- return;
-
- if(!loaded)
- loadRegisters();
-
- if(!loading)
- modified = true;
- } //}}}
-
- //{{{ loadRegisters() method
- private static void loadRegisters()
- {
- if (saver != null)
- {
- loaded = true;
- saver.loadRegisters();
- }
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ Register interface
- /**
- * A register.
- */
- public interface Register
- {
- /**
- * Converts to a string.
- */
- String toString();
-
- /**
- * Sets the register contents.
- */
- void setValue(String value);
- } //}}}
-
- //{{{ ClipboardRegister class
- /**
- * A clipboard register. Register "$" should always be an
- * instance of this.
- */
- public static class ClipboardRegister implements Register
- {
- Clipboard clipboard;
-
- public ClipboardRegister(Clipboard clipboard)
- {
- this.clipboard = clipboard;
- }
-
- /**
- * Sets the clipboard contents.
- */
- public void setValue(String value)
- {
- StringSelection selection = new StringSelection(value);
- clipboard.setContents(selection,null);
- }
-
- /**
- * Returns the clipboard contents.
- */
- @Override
- public String toString()
- {
- try
- {
-
- if (false)
- {
- /*
- This is to debug clipboard problems.
-
- Apparently, jEdit is unable to copy text from clipbard into the current
- text buffer if the clipboard was filles using the command
- echo test | xselection CLIPBOARD -
- under Linux. However, it seems that Java does not offer any
- data flavor for this clipboard content (under J2RE 1.5.0_06-b05)
- Thus, copying from clipboard seems to be plainly impossible.
- */
- Log.log(Log.DEBUG,this,"clipboard.getContents(this)="+clipboard.getContents(this)+'.');
- debugListDataFlavors(clipboard.getContents(this));
- }
-
- String selection = (String)clipboard
- .getContents(this).getTransferData(
- DataFlavor.stringFlavor);
-
- boolean trailingEOL = selection.endsWith("\n")
- || selection.endsWith(System.getProperty(
- "line.separator"));
-
- // Some Java versions return the clipboard
- // contents using the native line separator,
- // so have to convert it here
- BufferedReader in = new BufferedReader(
- new StringReader(selection));
- StringBuilder buf = new StringBuilder();
- String line;
- while((line = in.readLine()) != null)
- {
- // broken Eclipse workaround!
- // 24 Febuary 2004
- if(line.endsWith("\0"))
- {
- line = line.substring(0,
- line.length() - 1);
- }
- buf.append(line);
- buf.append('\n');
- }
- // remove trailing \n
- if(!trailingEOL && buf.length() != 0)
- buf.setLength(buf.length() - 1);
- return buf.toString();
- }
- catch(Exception e)
- {
- Log.log(Log.NOTICE,this,e);
- return null;
- }
- }
- } //}}}
-
- //{{{ debugListDataFlavors() method
- protected static void debugListDataFlavors(Transferable transferable)
- {
- DataFlavor[] dataFlavors = transferable.getTransferDataFlavors();
-
- for (int i = 0;i<dataFlavors.length;i++)
- {
- DataFlavor dataFlavor = dataFlavors[i];
- Log.log(Log.DEBUG,Registers.class,
- "debugListDataFlavors(): dataFlavor="+
- dataFlavor+'.');
- }
-
- if (dataFlavors.length == 0)
- {
- Log.log(Log.DEBUG,Registers.class,
- "debugListDataFlavors(): no dataFlavor supported.");
- }
- } //}}}
-
-
- //{{{ StringRegister class
- /**
- * Register that stores a string.
- */
- public static class StringRegister implements Register
- {
- private String value;
-
- /**
- * Creates a new string register.
- * @param value The contents
- */
- public StringRegister(String value)
- {
- this.value = value;
- }
-
- /**
- * Sets the register contents.
- */
- public void setValue(String value)
- {
- this.value = value;
- }
-
- /**
- * Converts to a string.
- */
- @Override
- public String toString()
- {
- return value;
- }
-
- /**
- * Called when this register is no longer available. This
- * implementation does nothing.
- */
- public void dispose() {}
- } //}}}
-
- //}}}
-}
+/*
+ * Registers.java - Register manager
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ * Portions Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.awt.datatransfer.*;
+import java.awt.Toolkit;
+import java.awt.datatransfer.DataFlavor;
+import java.io.*;
+
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.datatransfer.JEditDataFlavor;
+import org.gjt.sp.jedit.datatransfer.JEditRichText;
+import org.gjt.sp.jedit.datatransfer.TransferHandler;
+import org.gjt.sp.jedit.gui.HistoryModel;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.jedit.textarea.Selection;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * jEdit's registers are an extension of the clipboard metaphor.<p>
+ *
+ * A {@link Registers.Register} is string of text indexed by a
+ * single character. Typically the text is taken from selected buffer text
+ * and the index character is a keyboard character selected by the user.<p>
+ *
+ * This class defines a number of static methods
+ * that give each register the properties of a virtual clipboard.<p>
+ *
+ * Two classes implement the {@link Registers.Register} interface. A
+ * {@link Registers.ClipboardRegister} is tied to the contents of the
+ * system clipboard. jEdit assigns a
+ * {@link Registers.ClipboardRegister} to the register indexed under
+ * the character <code>$</code>. A
+ * {@link Registers.DefaultRegister} is created for registers assigned
+ * by the user. In addition, jEdit assigns <code>%</code> to
+ * the last text segment selected in the text area. On Windows this is a
+ * {@link Registers.DefaultRegister}, on Unix under Java 2 version 1.4, a
+ * {@link Registers.ClipboardRegister}.
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: Registers.java 17641 2010-04-14 09:01:44Z kpouer $
+ */
+public class Registers
+{
+ //{{{ copy() method
+ /**
+ * Copies the text selected in the text area into the specified register.
+ * This will replace the existing contents of the designated register.
+ *
+ * @param textArea The text area
+ * @param register The register
+ * @since jEdit 2.7pre2
+ */
+ public static void copy(TextArea textArea, char register)
+ {
+ String selection = textArea.getSelectedText();
+ if(selection == null)
+ return;
+
+ Transferable transferable = TransferHandler.getInstance().getTransferable(textArea, selection);
+ setRegister(register, transferable);
+ HistoryModel.getModel("clipboard").addItem(selection);
+
+ } //}}}
+
+ //{{{ cut() method
+ /**
+ * Copies the text selected in the text area into the specified
+ * register, and then removes it from the buffer.
+ *
+ * @param textArea The text area
+ * @param register The register
+ * @since jEdit 2.7pre2
+ */
+ public static void cut(TextArea textArea, char register)
+ {
+ if(textArea.isEditable())
+ {
+ String selection = textArea.getSelectedText();
+ if(selection == null)
+ return;
+
+ Transferable transferable = TransferHandler.getInstance().getTransferable(textArea, selection);
+ setRegister(register,transferable);
+ HistoryModel.getModel("clipboard").addItem(selection);
+
+ textArea.setSelectedText("");
+ }
+ else
+ textArea.getToolkit().beep();
+ } //}}}
+
+ //{{{ append() method
+ /**
+ * Appends the text selected in the text area to the specified register,
+ * with a newline between the old and new text.
+ * @param textArea The text area
+ * @param register The register
+ */
+ public static void append(TextArea textArea, char register)
+ {
+ append(textArea,register,"\n",false);
+ } //}}}
+
+ //{{{ append() method
+ /**
+ * Appends the text selected in the text area to the specified register.
+ * @param textArea The text area
+ * @param register The register
+ * @param separator The separator to insert between the old and new text
+ */
+ public static void append(TextArea textArea, char register,
+ String separator)
+ {
+ append(textArea,register,separator,false);
+ } //}}}
+
+ //{{{ append() method
+ /**
+ * Appends the text selected in the text area to the specified register.
+ * @param textArea The text area
+ * @param register The register
+ * @param separator The text to insert between the old and new text
+ * @param cut Should the current selection be removed?
+ * @since jEdit 3.2pre1
+ */
+ public static void append(TextArea textArea, char register,
+ String separator, boolean cut)
+ {
+ if(cut && !textArea.isEditable())
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+
+ String selection = textArea.getSelectedText();
+ if(selection == null)
+ return;
+
+ Register reg = getRegister(register);
+
+ if(reg != null)
+ {
+ Transferable transferable = reg.getTransferable();
+ if (transferable.isDataFlavorSupported(DataFlavor.stringFlavor))
+ {
+ try
+ {
+ String registerContents = (String) transferable.getTransferData(DataFlavor.stringFlavor);
+ if(registerContents != null)
+ {
+ if(registerContents.endsWith(separator))
+ selection = registerContents + selection;
+ else
+ selection = registerContents + separator + selection;
+ }
+ }
+ catch (UnsupportedFlavorException e)
+ {
+ }
+ catch (IOException e)
+ {
+ Log.log(Log.ERROR, Registers.class, e);
+ }
+ }
+ }
+ Transferable transferable = TransferHandler.getInstance().getTransferable(textArea, selection);
+ setRegister(register,transferable);
+ HistoryModel.getModel("clipboard").addItem(selection);
+
+ if(cut)
+ textArea.setSelectedText("");
+ } //}}}
+
+ //{{{ paste() methods
+ /**
+ * Insets the contents of the specified register into the text area.
+ * @param textArea The text area
+ * @param register The register
+ * @since jEdit 2.7pre2
+ */
+ public static void paste(TextArea textArea, char register)
+ {
+ paste(textArea,register,false);
+ }
+
+ /**
+ * Insets the contents of the specified register into the text area.
+ * @param textArea The text area
+ * @param register The register
+ * @param preferredDataFlavor the preferred dataflavor. If not available
+ * <tt>DataFlavor.stringFlavor</tt> will be used
+ * @since jEdit 4.4pre1
+ */
+ public static void paste(TextArea textArea, char register, DataFlavor preferredDataFlavor)
+ {
+ paste(textArea,register,false, preferredDataFlavor);
+ }
+
+ /**
+ * Inserts the contents of the specified register into the text area.
+ * @param textArea The text area
+ * @param register The register
+ * @param vertical Vertical (columnar) paste
+ * @since jEdit 4.1pre1
+ */
+ public static void paste(TextArea textArea, char register,
+ boolean vertical)
+ {
+ if(!textArea.isEditable())
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+
+ Register reg = getRegister(register);
+
+ if(reg == null)
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+ Transferable transferable = reg.getTransferable();
+ Mode mode = null;
+ String selection = null;
+ if (transferable.isDataFlavorSupported(JEditDataFlavor.jEditRichTextDataFlavor))
+ {
+ try
+ {
+ JEditRichText data = (JEditRichText) transferable.getTransferData(JEditDataFlavor.jEditRichTextDataFlavor);
+ mode = data.getMode();
+ selection = data.getText();
+ }
+ catch (UnsupportedFlavorException e)
+ {
+ Log.log(Log.ERROR, Registers.class, e);
+ }
+ catch (IOException e)
+ {
+ Log.log(Log.ERROR, Registers.class, e);
+ }
+ }
+ else if (transferable.isDataFlavorSupported(DataFlavor.stringFlavor))
+ {
+ selection = getTextFromTransferable(transferable, DataFlavor.stringFlavor);
+ }
+ if(selection == null)
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+ JEditBuffer buffer = textArea.getBuffer();
+ applyMode(mode, buffer);
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ /* vertical paste */
+ if(vertical && textArea.getSelectionCount() == 0)
+ {
+ int caret = textArea.getCaretPosition();
+ int caretLine = textArea.getCaretLine();
+ Selection.Rect rect = new Selection.Rect(
+ caretLine,caret,caretLine,caret);
+ textArea.setSelectedText(rect,selection);
+ caretLine = textArea.getCaretLine();
+
+ if(caretLine != textArea.getLineCount() - 1)
+ {
+
+ int startColumn = rect.getStartColumn(
+ buffer);
+ int offset = buffer
+ .getOffsetOfVirtualColumn(
+ caretLine + 1,startColumn,null);
+ if(offset == -1)
+ {
+ buffer.insertAtColumn(caretLine + 1,startColumn,"");
+ textArea.setCaretPosition(
+ buffer.getLineEndOffset(
+ caretLine + 1) - 1);
+ }
+ else
+ {
+ textArea.setCaretPosition(
+ buffer.getLineStartOffset(
+ caretLine + 1) + offset);
+ }
+ }
+ }
+ else /* Regular paste */
+ {
+ textArea.replaceSelection(selection);
+ }
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ HistoryModel.getModel("clipboard").addItem(selection);
+ } //}}}
+
+ private static void applyMode(Mode mode, JEditBuffer buffer)
+ {
+ if (mode != null &&
+ "text".equals(buffer.getMode().getName()) &&
+ !mode.equals(buffer.getMode()) &&
+ buffer.getLength() == 0)
+ {
+ buffer.setMode(mode);
+ }
+ }
+
+ /**
+ * Inserts the contents of the specified register into the text area.
+ * @param textArea The text area
+ * @param register The register
+ * @param vertical Vertical (columnar) paste
+ * @param preferredDataFlavor the preferred dataflavor. If not available
+ * <tt>DataFlavor.stringFlavor</tt> will be used
+ * @since jEdit 4.4pre1
+ */
+ public static void paste(TextArea textArea, char register,
+ boolean vertical, DataFlavor preferredDataFlavor)
+ {
+ if (JEditDataFlavor.jEditRichTextDataFlavor.equals(preferredDataFlavor))
+ {
+ paste(textArea,register,vertical);
+ return;
+ }
+ if(!textArea.isEditable())
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+
+ Register reg = getRegister(register);
+
+ if(reg == null)
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+ Transferable transferable = reg.getTransferable();
+ String selection = null;
+ if (transferable.isDataFlavorSupported(preferredDataFlavor))
+ {
+ selection = getTextFromTransferable(transferable, preferredDataFlavor);
+ }
+ else if (transferable.isDataFlavorSupported(DataFlavor.stringFlavor))
+ {
+ selection = getTextFromTransferable(transferable, DataFlavor.stringFlavor);
+ }
+ if(selection == null)
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+ JEditBuffer buffer = textArea.getBuffer();
+ /*
+ Commented because it must not use jEdit class.
+ Need to rewrite a property manager that is independant
+ String mime = preferredDataFlavor.getMimeType();
+ int i = mime.indexOf(';');
+ if (i != -1)
+ {
+ mime = mime.substring(0,i);
+ }
+ String mode = jEdit.getProperty("mime2mode."+mime);
+ if (mode != null)
+ {
+ Mode _mode = ModeProvider.instance.getMode(mode);
+ if (_mode != null)
+ {
+ applyMode(_mode, buffer);
+ }
+ } */
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ /* vertical paste */
+ if(vertical && textArea.getSelectionCount() == 0)
+ {
+ int caret = textArea.getCaretPosition();
+ int caretLine = textArea.getCaretLine();
+ Selection.Rect rect = new Selection.Rect(
+ caretLine,caret,caretLine,caret);
+ textArea.setSelectedText(rect,selection);
+ caretLine = textArea.getCaretLine();
+
+ if(caretLine != textArea.getLineCount() - 1)
+ {
+
+ int startColumn = rect.getStartColumn(
+ buffer);
+ int offset = buffer
+ .getOffsetOfVirtualColumn(
+ caretLine + 1,startColumn,null);
+ if(offset == -1)
+ {
+ buffer.insertAtColumn(caretLine + 1,startColumn,"");
+ textArea.setCaretPosition(
+ buffer.getLineEndOffset(
+ caretLine + 1) - 1);
+ }
+ else
+ {
+ textArea.setCaretPosition(
+ buffer.getLineStartOffset(
+ caretLine + 1) + offset);
+ }
+ }
+ }
+ else /* Regular paste */
+ {
+ textArea.replaceSelection(selection);
+ }
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ HistoryModel.getModel("clipboard").addItem(selection);
+ } //}}}
+
+ private static String getTextFromTransferable(Transferable transferable, DataFlavor dataFlavor)
+ {
+ try
+ {
+ Object data = transferable.getTransferData(dataFlavor);
+ if (dataFlavor.getRepresentationClass().equals(String.class))
+ return (String) data;
+ return data.toString();
+ }
+ catch (UnsupportedFlavorException e)
+ {
+ Log.log(Log.ERROR, Registers.class, e);
+ }
+ catch (IOException e)
+ {
+ Log.log(Log.ERROR, Registers.class, e);
+ }
+ return null;
+ }
+
+ //{{{ getRegister() method
+ /**
+ * Returns the specified register.
+ * @param name The name
+ */
+ public static Register getRegister(char name)
+ {
+ if(name != '$' && name != '%')
+ {
+ if(!loaded)
+ loadRegisters();
+ }
+
+ if(registers == null || name >= registers.length)
+ return null;
+ else
+ return registers[name];
+ } //}}}
+
+ //{{{ setRegister() method
+ /**
+ * Sets the specified register.
+ * @param name The name
+ * @param newRegister The new value
+ */
+ public static void setRegister(char name, Register newRegister)
+ {
+ touchRegister(name);
+
+ if(name >= registers.length)
+ {
+ Register[] newRegisters = new Register[
+ Math.min(1<<16, name<<1)];
+ System.arraycopy(registers,0,newRegisters,0,
+ registers.length);
+ registers = newRegisters;
+ }
+
+ registers[name] = newRegister;
+ if (listener != null)
+ listener.registerChanged(name);
+ } //}}}
+
+ //{{{ setRegister() method
+ /**
+ * Sets the specified register.
+ * @param name The name
+ * @param value The new value
+ */
+ public static void setRegister(char name, String value)
+ {
+ setRegister(name, new StringSelection(value));
+ } //}}}
+
+ //{{{ setRegister() method
+ /**
+ * Sets the specified register.
+ * @param name The name
+ * @param transferable the transferable
+ */
+ public static void setRegister(char name, Transferable transferable)
+ {
+ touchRegister(name);
+ Register register = getRegister(name);
+ if(register != null)
+ {
+ register.setTransferable(transferable);
+ if (listener != null)
+ listener.registerChanged(name);
+ }
+ else
+ {
+ DefaultRegister defaultRegister = new DefaultRegister();
+ defaultRegister.setTransferable(transferable);
+ setRegister(name, defaultRegister);
+ }
+ } //}}}
+
+ //{{{ clearRegister() method
+ /**
+ * Sets the value of the specified register to <code>null</code>.
+ * @param name The register name
+ */
+ public static void clearRegister(char name)
+ {
+ if(name >= registers.length)
+ return;
+
+ Register register = registers[name];
+ if(name == '$' || name == '%')
+ register.setValue("");
+ else
+ {
+ registers[name] = null;
+ modified = true;
+ if (listener != null)
+ listener.registerChanged(name);
+ }
+ } //}}}
+
+ //{{{ getRegisters() method
+ /**
+ * Returns an array of all available registers. Some of the elements
+ * of this array might be <code>null</code>.
+ */
+ public static Register[] getRegisters()
+ {
+ if(!loaded)
+ loadRegisters();
+ return registers;
+ } //}}}
+
+ //{{{ getRegisterNameString() method
+ /**
+ * Returns a string of all defined registers, used by the status bar
+ * (eg, "a b $ % ^").
+ * @since jEdit 4.2pre2
+ */
+ public static String getRegisterNameString()
+ {
+ if(!loaded)
+ loadRegisters();
+
+ StringBuilder buf = new StringBuilder(registers.length << 1);
+ for(int i = 0; i < registers.length; i++)
+ {
+ if(registers[i] != null)
+ {
+ if(buf.length() != 0)
+ buf.append(' ');
+ buf.append((char)i);
+ }
+ }
+
+ if(buf.length() == 0)
+ return null;
+ else
+ return buf.toString();
+ } //}}}
+
+ //{{{ saveRegisters() method
+ public static void saveRegisters()
+ {
+ if(!loaded || !modified)
+ return;
+
+ if (saver != null)
+ {
+ saver.saveRegisters();
+ modified = false;
+ }
+ } //}}}
+
+ //{{{ setListener() method
+ public static void setListener(RegistersListener listener)
+ {
+ Registers.listener = listener;
+ } //}}}
+
+ //{{{ setSaver() method
+ public static void setSaver(RegisterSaver saver)
+ {
+ Registers.saver = saver;
+ } //}}}
+
+ //{{{ isLoading() method
+ public static boolean isLoading()
+ {
+ return loading;
+ } //}}}
+
+ //{{{ setLoading() method
+ public static void setLoading(boolean loading)
+ {
+ Registers.loading = loading;
+ } //}}}
+
+ //{{{ Private members
+ private static Register[] registers;
+ private static boolean loaded, loading;
+ private static RegisterSaver saver;
+ private static RegistersListener listener;
+ /**
+ * Flag that tell if a register has been modified (except for '%' and '$' registers that aren't
+ * saved to the xml file).
+ */
+ private static boolean modified;
+
+ private Registers() {}
+
+ static
+ {
+ registers = new Register[256];
+ Toolkit toolkit = Toolkit.getDefaultToolkit();
+ registers['$'] = new ClipboardRegister(
+ toolkit.getSystemClipboard());
+ Clipboard selection = toolkit.getSystemSelection();
+ if(selection != null)
+ registers['%'] = new ClipboardRegister(selection);
+ }
+
+ //{{{ touchRegister() method
+ private static void touchRegister(char name)
+ {
+ if(name == '%' || name == '$')
+ return;
+
+ if(!loaded)
+ loadRegisters();
+
+ if(!loading)
+ modified = true;
+ } //}}}
+
+ //{{{ loadRegisters() method
+ private static void loadRegisters()
+ {
+ if (saver != null)
+ {
+ loaded = true;
+ saver.loadRegisters();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ Register interface
+ /**
+ * A register.
+ */
+ public interface Register
+ {
+ /**
+ * Converts to a string.
+ */
+ @Deprecated
+ String toString();
+
+ /**
+ * Sets the register contents.
+ */
+ @Deprecated
+ void setValue(String value);
+
+ Transferable getTransferable();
+
+ void setTransferable(Transferable transferable);
+ } //}}}
+
+ //{{{ ClipboardRegister class
+ /**
+ * A clipboard register. Register "$" should always be an
+ * instance of this.
+ */
+ public static class ClipboardRegister implements Register
+ {
+ Clipboard clipboard;
+
+ public ClipboardRegister(Clipboard clipboard)
+ {
+ this.clipboard = clipboard;
+ }
+
+ /**
+ * Sets the clipboard contents.
+ */
+ public void setValue(String value)
+ {
+ StringSelection selection = new StringSelection(value);
+ clipboard.setContents(selection,null);
+ }
+
+ /**
+ * Returns the clipboard contents.
+ */
+ @Override
+ public String toString()
+ {
+ try
+ {
+
+ if (false)
+ {
+ /*
+ This is to debug clipboard problems.
+
+ Apparently, jEdit is unable to copy text from clipbard into the current
+ text buffer if the clipboard was filles using the command
+ echo test | xselection CLIPBOARD -
+ under Linux. However, it seems that Java does not offer any
+ data flavor for this clipboard content (under J2RE 1.5.0_06-b05)
+ Thus, copying from clipboard seems to be plainly impossible.
+ */
+ Log.log(Log.DEBUG,this,"clipboard.getContents(this)="+clipboard.getContents(this)+'.');
+ debugListDataFlavors(clipboard.getContents(this));
+ }
+
+ String selection = (String)clipboard
+ .getContents(this).getTransferData(
+ DataFlavor.stringFlavor);
+
+ boolean trailingEOL = selection.endsWith("\n")
+ || selection.endsWith(System.getProperty(
+ "line.separator"));
+
+ // Some Java versions return the clipboard
+ // contents using the native line separator,
+ // so have to convert it here
+ BufferedReader in = new BufferedReader(
+ new StringReader(selection));
+ StringBuilder buf = new StringBuilder();
+ String line;
+ while((line = in.readLine()) != null)
+ {
+ // broken Eclipse workaround!
+ // 24 Febuary 2004
+ if(line.endsWith("\0"))
+ {
+ line = line.substring(0,
+ line.length() - 1);
+ }
+ buf.append(line);
+ buf.append('\n');
+ }
+ // remove trailing \n
+ if(!trailingEOL && buf.length() != 0)
+ buf.setLength(buf.length() - 1);
+ return buf.toString();
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.NOTICE,this,e);
+ return null;
+ }
+ }
+
+ public Transferable getTransferable()
+ {
+ return clipboard.getContents(this);
+ }
+
+ public void setTransferable(Transferable transferable)
+ {
+ clipboard.setContents(transferable, null);
+ }
+ } //}}}
+
+ //{{{ debugListDataFlavors() method
+ protected static void debugListDataFlavors(Transferable transferable)
+ {
+ DataFlavor[] dataFlavors = transferable.getTransferDataFlavors();
+
+ for (int i = 0;i<dataFlavors.length;i++)
+ {
+ DataFlavor dataFlavor = dataFlavors[i];
+ Log.log(Log.DEBUG,Registers.class,
+ "debugListDataFlavors(): dataFlavor="+
+ dataFlavor+'.');
+ }
+
+ if (dataFlavors.length == 0)
+ {
+ Log.log(Log.DEBUG,Registers.class,
+ "debugListDataFlavors(): no dataFlavor supported.");
+ }
+ } //}}}
+
+ //{{{ DefaultRegister class
+ private static class DefaultRegister implements Register
+ {
+ private Transferable transferable;
+
+ public void setValue(String value)
+ {
+ this.transferable = new StringSelection(value);
+ }
+
+ @Override
+ public String toString()
+ {
+ if (transferable == null)
+ return null;
+ if (transferable.isDataFlavorSupported(DataFlavor.stringFlavor))
+ {
+ try
+ {
+ return transferable.getTransferData(DataFlavor.stringFlavor).toString();
+ }
+ catch (UnsupportedFlavorException e)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ catch (IOException e)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ }
+ return transferable.toString();
+ }
+
+ public Transferable getTransferable()
+ {
+ return transferable;
+ }
+
+ public void setTransferable(Transferable transferable)
+ {
+ this.transferable = transferable;
+ }
+ } //}}}
+
+ //{{{ StringRegister class
+ /**
+ * Register that stores a string.
+ */
+ @Deprecated
+ public static class StringRegister extends DefaultRegister
+ {
+ /**
+ * Creates a new string register.
+ * @param value The contents
+ */
+ public StringRegister(String value)
+ {
+ setValue(value);
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/RegistersListener.java b/jEdit/org/gjt/sp/jedit/RegistersListener.java
index 30ce65b..3f71163 100644
--- a/jEdit/org/gjt/sp/jedit/RegistersListener.java
+++ b/jEdit/org/gjt/sp/jedit/RegistersListener.java
@@ -1,31 +1,31 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit;
-
-/**
- * An interface to listen some events about registers.
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-public interface RegistersListener
-{
- void registerChanged(char name);
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit;
+
+/**
+ * An interface to listen some events about registers.
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+public interface RegistersListener
+{
+ void registerChanged(char name);
+}
diff --git a/jEdit/org/gjt/sp/jedit/ServiceListHandler.java b/jEdit/org/gjt/sp/jedit/ServiceListHandler.java
index aeb056c..7da5e6c 100644
--- a/jEdit/org/gjt/sp/jedit/ServiceListHandler.java
+++ b/jEdit/org/gjt/sp/jedit/ServiceListHandler.java
@@ -1,161 +1,161 @@
-/*
- * ServiceManager.java - Handles services.xml files in plugins
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.net.URL;
-import java.util.*;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.util.XMLUtilities;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * @since jEdit 4.2pre1
- * @author Slava Pestov
- * @version $Id: ServiceListHandler.java 14599 2009-02-07 19:06:52Z kpouer $
- */
-class ServiceListHandler extends DefaultHandler
-{
- //{{{ ServiceListHandler constructor
- ServiceListHandler(PluginJAR plugin, URL uri)
- {
- this.plugin = plugin;
- this.uri = uri;
- code = new StringBuilder();
- stateStack = new Stack<String>();
- cachedServices = new LinkedList<ServiceManager.Descriptor>();
- } //}}}
-
- //{{{ resolveEntity() method
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "services.dtd", getClass());
- } //}}}
-
- //{{{ characters() method
- public void characters(char[] c, int off, int len)
- {
- String tag = peekElement();
- if (tag == "SERVICE")
- code.append(c, off, len);
- } //}}}
-
- //{{{ startElement() method
- public void startElement(String uri, String localName,
- String tag, Attributes attrs)
- {
- tag = pushElement(tag);
- serviceName = attrs.getValue("NAME");
- serviceClass = attrs.getValue("CLASS");
- } //}}}
-
- //{{{ endElement() method
- public void endElement(String uri, String localName, String name)
- {
- String tag = peekElement();
-
- if(name.equals(tag))
- {
- if (tag.equals("SERVICE"))
- {
- ServiceManager.Descriptor d =
- new ServiceManager.Descriptor(
- serviceClass,serviceName,code.toString(),plugin);
- ServiceManager.registerService(d);
- cachedServices.add(d);
- code.setLength(0);
- }
-
- popElement();
- }
- else
- {
- // can't happen
- throw new InternalError();
- }
- } //}}}
-
- //{{{ startDocument() method
- public void startDocument()
- {
- try
- {
- pushElement(null);
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, e, e);
- }
- } //}}}
-
- //{{{ getCachedServices() method
- public ServiceManager.Descriptor[] getCachedServices()
- {
- return cachedServices.toArray(
- new ServiceManager.Descriptor[cachedServices.size()]);
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private PluginJAR plugin;
- private URL uri;
-
- private String serviceName;
- private String serviceClass;
- private StringBuilder code;
-
- private Stack<String> stateStack;
-
- private List<ServiceManager.Descriptor> cachedServices;
- //}}}
-
- //{{{ pushElement() method
- private String pushElement(String name)
- {
- name = (name == null) ? null : name.intern();
-
- stateStack.push(name);
-
- return name;
- } //}}}
-
- //{{{ peekElement() method
- private String peekElement()
- {
- return stateStack.peek();
- } //}}}
-
- //{{{ popElement() method
- private String popElement()
- {
- return stateStack.pop();
- } //}}}
-
- //}}}
-}
+/*
+ * ServiceManager.java - Handles services.xml files in plugins
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.net.URL;
+import java.util.*;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.util.XMLUtilities;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * @since jEdit 4.2pre1
+ * @author Slava Pestov
+ * @version $Id: ServiceListHandler.java 16676 2009-12-18 14:44:32Z shlomy $
+ */
+class ServiceListHandler extends DefaultHandler
+{
+ //{{{ ServiceListHandler constructor
+ ServiceListHandler(PluginJAR plugin, URL uri)
+ {
+ this.plugin = plugin;
+ this.uri = uri;
+ code = new StringBuilder();
+ stateStack = new Stack<String>();
+ cachedServices = new LinkedList<ServiceManager.Descriptor>();
+ } //}}}
+
+ //{{{ resolveEntity() method
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "services.dtd", getClass());
+ } //}}}
+
+ //{{{ characters() method
+ public void characters(char[] c, int off, int len)
+ {
+ String tag = peekElement();
+ if (tag == "SERVICE")
+ code.append(c, off, len);
+ } //}}}
+
+ //{{{ startElement() method
+ public void startElement(String uri, String localName,
+ String tag, Attributes attrs)
+ {
+ pushElement(tag);
+ serviceName = attrs.getValue("NAME");
+ serviceClass = attrs.getValue("CLASS");
+ } //}}}
+
+ //{{{ endElement() method
+ public void endElement(String uri, String localName, String name)
+ {
+ String tag = peekElement();
+
+ if(name.equals(tag))
+ {
+ if (tag.equals("SERVICE"))
+ {
+ ServiceManager.Descriptor d =
+ new ServiceManager.Descriptor(
+ serviceClass,serviceName,code.toString(),plugin);
+ ServiceManager.registerService(d);
+ cachedServices.add(d);
+ code.setLength(0);
+ }
+
+ popElement();
+ }
+ else
+ {
+ // can't happen
+ throw new InternalError();
+ }
+ } //}}}
+
+ //{{{ startDocument() method
+ public void startDocument()
+ {
+ try
+ {
+ pushElement(null);
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, e, e);
+ }
+ } //}}}
+
+ //{{{ getCachedServices() method
+ public ServiceManager.Descriptor[] getCachedServices()
+ {
+ return cachedServices.toArray(
+ new ServiceManager.Descriptor[cachedServices.size()]);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private PluginJAR plugin;
+ private URL uri;
+
+ private String serviceName;
+ private String serviceClass;
+ private StringBuilder code;
+
+ private Stack<String> stateStack;
+
+ private List<ServiceManager.Descriptor> cachedServices;
+ //}}}
+
+ //{{{ pushElement() method
+ private String pushElement(String name)
+ {
+ name = (name == null) ? null : name.intern();
+
+ stateStack.push(name);
+
+ return name;
+ } //}}}
+
+ //{{{ peekElement() method
+ private String peekElement()
+ {
+ return stateStack.peek();
+ } //}}}
+
+ //{{{ popElement() method
+ private String popElement()
+ {
+ return stateStack.pop();
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/ServiceManager.java b/jEdit/org/gjt/sp/jedit/ServiceManager.java
index d260451..73496cc 100644
--- a/jEdit/org/gjt/sp/jedit/ServiceManager.java
+++ b/jEdit/org/gjt/sp/jedit/ServiceManager.java
@@ -1,365 +1,389 @@
-/*
- * ServiceManager.java - Handles services.xml files in plugins
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.jedit.buffer.FoldHandlerProvider;
-import org.gjt.sp.jedit.buffer.FoldHandler;
-
-/**
- * A generic way for plugins to provide various API extensions.<p>
- *
- * Services are loaded from files named <code>services.xml</code> inside the
- * plugin JAR. A service definition file has the following form:
- *
- * <pre><?xml version="1.0"?>
- *<!DOCTYPE SERVICES SYSTEM "services.dtd">
- *<SERVICES>
- * <SERVICE NAME="service name" CLASS="fully qualified class name">
- * // BeanShell code evaluated when the sevice is first activated
- * </SERVICE>
- *</SERVICES></pre>
- *
- * The following elements are valid:
- *
- * <ul>
- * <li>
- * <code>SERVICES</code> is the top-level element and refers
- * to the set of services offered by the plugin.
- * </li>
- * <li>
- * A <code>SERVICE</code> contains the data for a particular service
- * activation.
- * It has two attributes, both required: <code>NAME</code> and
- * <code>CLASS</code>. The <code>CLASS</code> attribute must be the name of
- * a known sevice type; see below.
- * </li>
- * <li>
- * A <code>SERVICE</code> element should the BeanShell code that returns a
- * new instance of the named class. Note that this code can return
- * <code>null</code>.
- * </li>
- * </ul>
- *
- * The jEdit core defines the following service types:
- * <ul>
- * <li>{@link org.gjt.sp.jedit.buffer.FoldHandler}</li>
- * <li>{@link org.gjt.sp.jedit.io.VFS}</li>
- * <li>{@link org.gjt.sp.jedit.io.Encoding}</li>
- * <li>{@link org.gjt.sp.jedit.io.EncodingDetector}</li>
- * </ul>
- *
- * Plugins may provide more.<p>
- *
- * To have your plugin accept services, no extra steps are needed other than
- * a piece of code somewhere that calls {@link #getServiceNames(String)} and
- * {@link #getService(String,String)}.
- *
- * @see BeanShell
- * @see PluginJAR
- *
- * @since jEdit 4.2pre1
- * @author Slava Pestov
- * @version $Id: ServiceManager.java 14125 2008-12-01 10:06:24Z kpouer $
- */
-public class ServiceManager
-{
- //{{{ loadServices() method
- /**
- * Loads a <code>services.xml</code> file.
- * @since jEdit 4.2pre1
- */
- public static void loadServices(PluginJAR plugin, URL uri,
- PluginJAR.PluginCacheEntry cache)
- {
- ServiceListHandler dh = new ServiceListHandler(plugin,uri);
- try
- {
- if (!XMLUtilities.parseXML(uri.openStream(), dh)
- && cache != null)
- {
- cache.cachedServices = dh.getCachedServices();
- }
- }
- catch (IOException ioe)
- {
- Log.log(Log.ERROR, ServiceManager.class, ioe);
- }
- } //}}}
-
- //{{{ unloadServices() method
- /**
- * Removes all services belonging to the specified plugin.
- * @param plugin The plugin
- * @since jEdit 4.2pre1
- */
- public static void unloadServices(PluginJAR plugin)
- {
- Iterator<Descriptor> descriptors = serviceMap.keySet().iterator();
- while(descriptors.hasNext())
- {
- Descriptor d = descriptors.next();
- if(d.plugin == plugin)
- descriptors.remove();
- }
- } //}}}
-
- //{{{ registerService() method
- /**
- * Registers a service. Plugins should provide a
- * <code>services.xml</code> file instead of calling this directly.
- *
- * @param clazz The service class
- * @param name The service name
- * @param code BeanShell code to create an instance of this
- * @param plugin The plugin JAR, or null if this is a built-in service
- *
- * @since jEdit 4.2pre1
- */
- public static void registerService(String clazz, String name,
- String code, PluginJAR plugin)
- {
- Descriptor d = new Descriptor(clazz,name,code,plugin);
- serviceMap.put(d,d);
- } //}}}
-
- //{{{ unregisterService() method
- /**
- * Unregisters a service.
- *
- * @param clazz The service class
- * @param name The service name
- *
- * @since jEdit 4.2pre1
- */
- public static void unregisterService(String clazz, String name)
- {
- Descriptor d = new Descriptor(clazz,name);
- serviceMap.remove(d);
- } //}}}
-
- //{{{ getServiceTypes() method
- /**
- * Returns all known service class types.
- *
- * @since jEdit 4.2pre1
- */
- public static String[] getServiceTypes()
- {
- Set<String> returnValue = new HashSet<String>();
-
- Set<Descriptor> keySet = serviceMap.keySet();
- for (Descriptor d : keySet)
- returnValue.add(d.clazz);
-
- return returnValue.toArray(
- new String[returnValue.size()]);
- } //}}}
-
- //{{{ getServiceNames() method
- /**
- * Returns the names of all registered services with the given
- * class. For example, calling this with a parameter of
- * "org.gjt.sp.jedit.io.VFS" returns all known virtual file
- * systems.
- *
- * @param clazz The class name
- * @since jEdit 4.2pre1
- */
- public static String[] getServiceNames(String clazz)
- {
- List<String> returnValue = new ArrayList<String>();
-
- Set<Descriptor> keySet = serviceMap.keySet();
- for (Descriptor d : keySet)
- if(d.clazz.equals(clazz))
- returnValue.add(d.name);
-
-
- return returnValue.toArray(
- new String[returnValue.size()]);
- } //}}}
-
- //{{{ getService() method
- /**
- * Returns an instance of the given service. The first time this is
- * called for a given service, the BeanShell code is evaluated. The
- * result is cached for future invocations, so in effect services are
- * singletons.
- *
- * @param clazz The service class
- * @param name The service name
- * @since jEdit 4.2pre1
- */
- public static Object getService(String clazz, String name)
- {
- // they never taught you this in undergrad computer science
- Descriptor key = new Descriptor(clazz,name);
- Descriptor value = serviceMap.get(key);
- if(value == null)
- {
- // unknown service - <clazz,name> not in table
- return null;
- }
- else
- {
- if(value.code == null)
- {
- loadServices(value.plugin,
- value.plugin.getServicesURI(),
- null);
- value = serviceMap.get(key);
- }
- return value.getInstance();
- }
- } //}}}
-
- //{{{ Package-private members
-
- //{{{ registerService() method
- /**
- * Registers a service.
- *
- * @since jEdit 4.2pre1
- */
- static void registerService(Descriptor d)
- {
- serviceMap.put(d,d);
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private static final Map<Descriptor, Descriptor> serviceMap = new HashMap<Descriptor, Descriptor>();
- //}}}
-
- //{{{ Descriptor class
- static class Descriptor
- {
- final String clazz;
- final String name;
- String code;
- PluginJAR plugin;
- Object instance;
- boolean instanceIsNull;
-
- // this constructor keys the hash table
- Descriptor(String clazz, String name)
- {
- this.clazz = clazz;
- this.name = name;
- }
-
- // this constructor is the value of the hash table
- Descriptor(String clazz, String name, String code,
- PluginJAR plugin)
- {
- this.clazz = clazz;
- this.name = name;
- this.code = code;
- this.plugin = plugin;
- }
-
- Object getInstance()
- {
- if(instanceIsNull)
- return null;
- else if(instance == null)
- {
- // lazy instantiation
- instance = BeanShell.eval(null,
- BeanShell.getNameSpace(),
- code);
- if(instance == null)
- {
- // avoid re-running script if it gives
- // us null
- instanceIsNull = true;
- }
- }
-
- return instance;
- }
- public int hashCode()
- {
- return name.hashCode();
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof Descriptor)
- {
- Descriptor d = (Descriptor)o;
- return d.clazz.equals(clazz)
- && d.name.equals(name);
- }
- else
- return false;
- }
- } //}}}
-
- /**
- * A FoldHandler based on the ServiceManager
- * @author Matthieu Casanova
- * @since jEdit 4.3pre10
- */
- public static class ServiceFoldHandlerProvider implements FoldHandlerProvider
- {
- /**
- * The service type. See {@link org.gjt.sp.jedit.ServiceManager}.
- * @since jEdit 4.3pre10
- */
- public static final String SERVICE = "org.gjt.sp.jedit.buffer.FoldHandler";
-
- /**
- * Returns the fold handler with the specified name, or null if
- * there is no registered handler with that name.
- * @param name The name of the desired fold handler
- * @return the FoldHandler or null if it doesn't exist
- * @since jEdit 4.3pre10
- */
- public FoldHandler getFoldHandler(String name)
- {
- FoldHandler handler = (FoldHandler) getService(SERVICE,name);
- return handler;
- }
-
- /**
- * Returns an array containing the names of all registered fold
- * handlers.
- *
- * @since jEdit 4.3pre10
- */
- public String[] getFoldModes()
- {
- String[] handlers = getServiceNames(SERVICE);
- Arrays.sort(handlers,new StandardUtilities.StringCompare<String>());
- return handlers;
- }
- }
-}
+/*
+ * ServiceManager.java - Handles services.xml files in plugins
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+import java.io.*;
+import java.net.URL;
+import java.util.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.jedit.buffer.FoldHandlerProvider;
+import org.gjt.sp.jedit.buffer.FoldHandler;
+
+/**
+ * A generic way for plugins to provide various API extensions.<p>
+ *
+ * Services are loaded from files named <code>services.xml</code> inside the
+ * plugin JAR. A service definition file has the following form:
+ *
+ * <pre><?xml version="1.0"?>
+ *<!DOCTYPE SERVICES SYSTEM "services.dtd">
+ *<SERVICES>
+ * <SERVICE NAME="service name" CLASS="fully qualified class name">
+ * // BeanShell code evaluated when the sevice is first activated
+ * </SERVICE>
+ *</SERVICES></pre>
+ *
+ * The following elements are valid:
+ *
+ * <ul>
+ * <li>
+ * <code>SERVICES</code> is the top-level element and refers
+ * to the set of services offered by the plugin.
+ * </li>
+ * <li>
+ * A <code>SERVICE</code> contains the data for a particular service
+ * activation.
+ * It has two attributes, both required: <code>NAME</code> and
+ * <code>CLASS</code>. The <code>CLASS</code> attribute must be the name of
+ * a known sevice type; see below.
+ * </li>
+ * <li>
+ * A <code>SERVICE</code> element should the BeanShell code that returns a
+ * new instance of the named class. Note that this code can return
+ * <code>null</code>.
+ * </li>
+ * </ul>
+ *
+ * The jEdit core defines the following service types:
+ * <ul>
+ * <li>{@link org.gjt.sp.jedit.buffer.FoldHandler}</li>
+ * <li>{@link org.gjt.sp.jedit.io.VFS}</li>
+ * <li>{@link org.gjt.sp.jedit.io.Encoding}</li>
+ * <li>{@link org.gjt.sp.jedit.io.EncodingDetector}</li>
+ * </ul>
+ *
+ * Plugins may provide more.<p>
+ *
+ * To have your plugin accept services, no extra steps are needed other than
+ * a piece of code somewhere that calls {@link #getServiceNames(String)} and
+ * {@link #getService(String,String)}.
+ *
+ * @see BeanShell
+ * @see PluginJAR
+ *
+ * @since jEdit 4.2pre1
+ * @author Slava Pestov
+ * @version $Id: ServiceManager.java 17827 2010-05-16 20:51:45Z ezust $
+ */
+public class ServiceManager
+{
+ //{{{ loadServices() method
+ /**
+ * Loads a <code>services.xml</code> file.
+ * @since jEdit 4.2pre1
+ */
+ public static void loadServices(PluginJAR plugin, URL uri,
+ PluginJAR.PluginCacheEntry cache)
+ {
+ ServiceListHandler dh = new ServiceListHandler(plugin,uri);
+ try
+ {
+ if (!XMLUtilities.parseXML(uri.openStream(), dh)
+ && cache != null)
+ {
+ cache.cachedServices = dh.getCachedServices();
+ }
+ }
+ catch (IOException ioe)
+ {
+ Log.log(Log.ERROR, ServiceManager.class, ioe);
+ }
+ } //}}}
+
+ //{{{ unloadServices() method
+ /**
+ * Removes all services belonging to the specified plugin.
+ * @param plugin The plugin
+ * @since jEdit 4.2pre1
+ */
+ public static void unloadServices(PluginJAR plugin)
+ {
+ Iterator<Descriptor> descriptors = serviceMap.keySet().iterator();
+ while(descriptors.hasNext())
+ {
+ Descriptor d = descriptors.next();
+ if(d.plugin == plugin)
+ descriptors.remove();
+ }
+ } //}}}
+
+ //{{{ registerService() method
+ /**
+ * Registers a service. Plugins should provide a
+ * <code>services.xml</code> file instead of calling this directly.
+ *
+ * @param clazz The service class
+ * @param name The service name
+ * @param code BeanShell code to create an instance of this
+ * @param plugin The plugin JAR, or null if this is a built-in service
+ *
+ * @since jEdit 4.2pre1
+ */
+ public static void registerService(String clazz, String name,
+ String code, PluginJAR plugin)
+ {
+ Descriptor d = new Descriptor(clazz,name,code,plugin);
+ serviceMap.put(d,d);
+ } //}}}
+
+ //{{{ unregisterService() method
+ /**
+ * Unregisters a service.
+ *
+ * @param clazz The service class
+ * @param name The service name
+ *
+ * @since jEdit 4.2pre1
+ */
+ public static void unregisterService(String clazz, String name)
+ {
+ Descriptor d = new Descriptor(clazz,name);
+ serviceMap.remove(d);
+ } //}}}
+
+ //{{{ getServiceTypes() method
+ /**
+ * Returns all known service class types.
+ *
+ * @since jEdit 4.2pre1
+ */
+ public static String[] getServiceTypes()
+ {
+ Set<String> returnValue = new HashSet<String>();
+
+ Set<Descriptor> keySet = serviceMap.keySet();
+ for (Descriptor d : keySet)
+ returnValue.add(d.clazz);
+
+ return returnValue.toArray(
+ new String[returnValue.size()]);
+ } //}}}
+
+ //{{{ getServiceNames() method
+ /**
+ * Returns the names of all registered services with the given
+ * class. For example, calling this with a parameter of
+ * "org.gjt.sp.jedit.io.VFS" returns all known virtual file
+ * systems.
+ *
+ * @param clazz The class name
+ * @since jEdit 4.2pre1
+ */
+ public static String[] getServiceNames(String clazz)
+ {
+ List<String> returnValue = new ArrayList<String>();
+
+ Set<Descriptor> keySet = serviceMap.keySet();
+ for (Descriptor d : keySet)
+ if(d.clazz.equals(clazz))
+ returnValue.add(d.name);
+
+
+ return returnValue.toArray(
+ new String[returnValue.size()]);
+ } //}}}
+
+
+ //{{{ getServiceNames() method
+ public static String[] getServiceNames(Class clazz)
+ {
+ return getServiceNames(clazz.getName());
+ } //}}}
+
+ //{{{ getService() methods
+ /**
+ * Returns an instance of the given service. The first time this is
+ * called for a given service, the BeanShell code is evaluated. The
+ * result is cached for future invocations, so in effect services are
+ * singletons.
+ *
+ * @param clazz The service class
+ * @param name The service name
+ * @since jEdit 4.2pre1
+ */
+ public static Object getService(String clazz, String name)
+ {
+
+ Descriptor key = new Descriptor(clazz,name);
+ Descriptor value = serviceMap.get(key);
+ if(value == null)
+ {
+ // unknown service - <clazz,name> not in table
+ return null;
+ }
+ else
+ {
+ if(value.code == null)
+ {
+ loadServices(value.plugin,
+ value.plugin.getServicesURI(),
+ null);
+ value = serviceMap.get(key);
+ }
+ return value.getInstance();
+ }
+ } //}}}
+
+ /**
+ * Returns an instance of the given service. The first time this is
+ * called for a given service, the BeanShell code is evaluated. The
+ * result is cached for future invocations, so in effect services are
+ * singletons.
+ *
+ * @param clazz The service class
+ * @param name The service name
+ * @return the service instance
+ * @since jEdit 4.4pre1
+ */
+ public static <E> E getService(Class<E> clazz, String name)
+ {
+ return (E) getService(clazz.getName(), name);
+ } //}}}
+
+ //{{{ Package-private members
+
+ //{{{ registerService() method
+ /**
+ * Registers a service.
+ *
+ * @param d the service descriptor
+ * @since jEdit 4.2pre1
+ */
+ static void registerService(Descriptor d)
+ {
+ serviceMap.put(d,d);
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private static final Map<Descriptor, Descriptor> serviceMap = new HashMap<Descriptor, Descriptor>();
+ //}}}
+
+ //{{{ Descriptor class
+ static class Descriptor
+ {
+ final String clazz;
+ final String name;
+ String code;
+ PluginJAR plugin;
+ Object instance;
+ boolean instanceIsNull;
+
+ // this constructor keys the hash table
+ Descriptor(String clazz, String name)
+ {
+ this.clazz = clazz;
+ this.name = name;
+ }
+
+ // this constructor is the value of the hash table
+ Descriptor(String clazz, String name, String code,
+ PluginJAR plugin)
+ {
+ this.clazz = clazz;
+ this.name = name;
+ this.code = code;
+ this.plugin = plugin;
+ }
+
+ Object getInstance()
+ {
+ if(instanceIsNull)
+ return null;
+ else if(instance == null)
+ {
+ // lazy instantiation
+ instance = BeanShell.eval(null,
+ BeanShell.getNameSpace(),
+ code);
+ if(instance == null)
+ {
+ // avoid re-running script if it gives
+ // us null
+ instanceIsNull = true;
+ }
+ }
+
+ return instance;
+ }
+ public int hashCode()
+ {
+ return name.hashCode();
+ }
+
+ public boolean equals(Object o)
+ {
+ if(o instanceof Descriptor)
+ {
+ Descriptor d = (Descriptor)o;
+ return d.clazz.equals(clazz)
+ && d.name.equals(name);
+ }
+ else
+ return false;
+ }
+ } //}}}
+
+ /**
+ * A FoldHandler based on the ServiceManager
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre10
+ */
+ public static class ServiceFoldHandlerProvider implements FoldHandlerProvider
+ {
+ /**
+ * The service type. See {@link org.gjt.sp.jedit.ServiceManager}.
+ * @since jEdit 4.3pre10
+ */
+ public static final String SERVICE = "org.gjt.sp.jedit.buffer.FoldHandler";
+
+ /**
+ * Returns the fold handler with the specified name, or null if
+ * there is no registered handler with that name.
+ * @param name The name of the desired fold handler
+ * @return the FoldHandler or null if it doesn't exist
+ * @since jEdit 4.3pre10
+ */
+ public FoldHandler getFoldHandler(String name)
+ {
+ FoldHandler handler = (FoldHandler) getService(SERVICE,name);
+ return handler;
+ }
+
+ /**
+ * Returns an array containing the names of all registered fold
+ * handlers.
+ *
+ * @since jEdit 4.3pre10
+ */
+ public String[] getFoldModes()
+ {
+ String[] handlers = getServiceNames(SERVICE);
+ Arrays.sort(handlers,new StandardUtilities.StringCompare<String>());
+ return handlers;
+ }
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/SettingsReloader.java b/jEdit/org/gjt/sp/jedit/SettingsReloader.java
index 93b93fe..a3f3051 100644
--- a/jEdit/org/gjt/sp/jedit/SettingsReloader.java
+++ b/jEdit/org/gjt/sp/jedit/SettingsReloader.java
@@ -1,95 +1,94 @@
-/*
- * SettingsReloader.java - Utility class reloads macros and modes when necessary
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.io.File;
-import org.gjt.sp.jedit.io.VFS;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.msg.VFSUpdate;
-import org.gjt.sp.jedit.search.*;
-//}}}
-
-class SettingsReloader implements EBComponent
-{
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof VFSUpdate)
- {
- VFSUpdate vmsg = (VFSUpdate)msg;
- maybeReload(vmsg.getPath());
- }
- } //}}}
-
- //{{{ maybeReload() method
- private void maybeReload(String path)
- {
- String jEditHome = jEdit.getJEditHome();
- String settingsDirectory = jEdit.getSettingsDirectory();
-
- if(!MiscUtilities.isURL(path))
- path = MiscUtilities.resolveSymlinks(path);
-
- // On Windows and MacOS, path names are case insensitive
- if((VFSManager.getVFSForPath(path).getCapabilities()
- & VFS.CASE_INSENSITIVE_CAP) != 0)
- {
- path = path.toLowerCase();
- jEditHome = jEditHome.toLowerCase();
- if(settingsDirectory != null)
- settingsDirectory = settingsDirectory.toLowerCase();
- }
-
- // XXX: does this really belong here?
- SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
- if(fileset instanceof DirectoryListSet)
- {
- DirectoryListSet dirset = (DirectoryListSet)fileset;
- String dir = MiscUtilities.resolveSymlinks(
- dirset.getDirectory());
- if(path.startsWith(dir))
- dirset.invalidateCachedList();
- }
-
- if(jEditHome != null && path.startsWith(jEditHome))
- path = path.substring(jEditHome.length());
- else if(settingsDirectory != null && path.startsWith(settingsDirectory))
- path = path.substring(settingsDirectory.length());
- else
- {
- // not in settings directory or jEdit home directory.
- // no need to reload anything.
- return;
- }
-
- if(path.startsWith(File.separator) || path.startsWith("/"))
- path = path.substring(1);
-
- if(path.startsWith("macros"))
- Macros.loadMacros();
- else if(path.startsWith("modes") && (path.endsWith(".xml")
- || path.endsWith("catalog")))
- jEdit.reloadModes();
- } //}}}
-}
+/*
+ * SettingsReloader.java - Utility class reloads macros and modes when necessary
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.io.File;
+
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.jedit.msg.VFSUpdate;
+import org.gjt.sp.jedit.search.*;
+//}}}
+
+class SettingsReloader
+{
+ //{{{ handleMessage() method
+ @EBHandler
+ public void handleVFSUpdate(VFSUpdate vmsg)
+ {
+ maybeReload(vmsg.getPath());
+ } //}}}
+
+ //{{{ maybeReload() method
+ private void maybeReload(String path)
+ {
+ String jEditHome = jEdit.getJEditHome();
+ String settingsDirectory = jEdit.getSettingsDirectory();
+
+ if(!MiscUtilities.isURL(path))
+ path = MiscUtilities.resolveSymlinks(path);
+
+ // On Windows and MacOS, path names are case insensitive
+ if((VFSManager.getVFSForPath(path).getCapabilities()
+ & VFS.CASE_INSENSITIVE_CAP) != 0)
+ {
+ path = path.toLowerCase();
+ jEditHome = jEditHome.toLowerCase();
+ if(settingsDirectory != null)
+ settingsDirectory = settingsDirectory.toLowerCase();
+ }
+
+ // XXX: does this really belong here?
+ SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
+ if(fileset instanceof DirectoryListSet)
+ {
+ DirectoryListSet dirset = (DirectoryListSet)fileset;
+ String dir = MiscUtilities.resolveSymlinks(
+ dirset.getDirectory());
+ if(path.startsWith(dir))
+ dirset.invalidateCachedList();
+ }
+
+ if(jEditHome != null && path.startsWith(jEditHome))
+ path = path.substring(jEditHome.length());
+ else if(settingsDirectory != null && path.startsWith(settingsDirectory))
+ path = path.substring(settingsDirectory.length());
+ else
+ {
+ // not in settings directory or jEdit home directory.
+ // no need to reload anything.
+ return;
+ }
+
+ if(path.startsWith(File.separator) || path.startsWith("/"))
+ path = path.substring(1);
+
+ if(path.startsWith("macros"))
+ Macros.loadMacros();
+ else if(path.startsWith("modes") && (path.endsWith(".xml")
+ || path.endsWith("catalog")))
+ jEdit.reloadModes();
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/SettingsXML.java b/jEdit/org/gjt/sp/jedit/SettingsXML.java
index 170c7c5..37b6fe9 100644
--- a/jEdit/org/gjt/sp/jedit/SettingsXML.java
+++ b/jEdit/org/gjt/sp/jedit/SettingsXML.java
@@ -1,193 +1,193 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.io.File;
-import java.io.IOException;
-import java.io.FileOutputStream;
-import java.io.FileInputStream;
-import java.io.BufferedWriter;
-import java.io.OutputStreamWriter;
-
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.util.XMLUtilities;
-//}}}
-
-/**
- * A XML file in the settings directory.
- * This class provides some common operations to load/save settings
- * from/into a XML file.
- * - Proper encoding and XML declaration.
- * - Two stage save.
- * - Making backup on each save.
- * - Detection of change on disk.
- */
-public class SettingsXML
-{
- //{{{ Saver class
- /**
- * A Writer to write XML for saving.
- * The real settings file is not changed until the finish()
- * method succeeds, in which case the previous settings file is
- * backuped.
- */
- public class Saver extends BufferedWriter
- {
- //{{{ writeXMLDeclaration() method
- /**
- * Write the XML 1.0 declaration.
- * This should be the first output.
- */
- public void writeXMLDeclaration() throws IOException
- {
- writeXMLDeclaration("1.0");
- } //}}}
-
- //{{{ writeXMLDeclaration() method
- /**
- * Write the XML declaration of a specific version.
- * This should be the first output.
- */
- public void writeXMLDeclaration(String version)
- throws IOException
- {
- write("<?xml"
- + " version=\"" + version + "\""
- + " encoding=\"" + encoding + "\""
- + " ?>");
- newLine();
- } //}}}
-
- //{{{ finish() method
- /**
- * Perform the final step of saving.
- */
- public void finish() throws IOException
- {
- close();
- jEdit.backupSettingsFile(file);
- file.delete();
- twoStageSaveFile.renameTo(file);
- knownLastModified = file.lastModified();
- } //}}}
-
- //{{{ Private members
- private File twoStageSaveFile;
- private static final String encoding = "UTF-8";
-
- // Only used by SettingsXML#opneSaver().
- Saver() throws IOException
- {
- this(new File(file.getParentFile(),
- "#" + file.getName() + "#save#"));
- }
-
- // A workaround for a restriction of super().
- private Saver(File twoStageSaveFile) throws IOException
- {
- super(new OutputStreamWriter(
- new FileOutputStream(twoStageSaveFile)
- , encoding));
- this.twoStageSaveFile = twoStageSaveFile;
- }
-
- //}}}
- } //}}}
-
- //{{{ Constructor
- /**
- * Construct a SettingsXML with specific location and name.
- * @param settingsDirectory
- * The settings directory of jedit
- * @param name
- * The file name will be (name + ".xml")
- */
- public SettingsXML(String settingsDirectory, String name)
- {
- String filename = name + ".xml";
- file = new File(MiscUtilities.constructPath(
- settingsDirectory, filename));
- } //}}}
-
- public SettingsXML(File f)
- {
- file = f;
- }
-
- //{{{ fileExits() method
- /**
- * Returns true if the file exists.
- */
- public boolean fileExists()
- {
- return file.exists();
- } //}}}
-
- //{{{ load() method
- /**
- * Parse the XML file to load.
- * @param handler
- * The handler to receive SAX notifications.
- */
- public void load(DefaultHandler handler) throws IOException
- {
- XMLUtilities.parseXML(new FileInputStream(file), handler);
- knownLastModified = file.lastModified();
- } //}}}
-
- //{{{ openSaver() method
- /**
- * Open the file to save in XML.
- */
- public Saver openSaver() throws IOException
- {
- return new Saver();
- } //}}}
-
- //{{{ hasChangedOnDisk() method
- /**
- * Returns true if the file has been changed on disk.
- * This is based on the last modified time at the last saving
- * or loading.
- */
- public boolean hasChangedOnDisk()
- {
- return file.exists()
- && (file.lastModified() != knownLastModified);
- } //}}}
-
- //{{{ toString() method
- /**
- * Returns the file's path.
- */
- public String toString()
- {
- return file.toString();
- } //}}}
-
- //{{{ Private members
- private File file;
- private long knownLastModified;
- //}}}
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.io.File;
+import java.io.IOException;
+import java.io.FileOutputStream;
+import java.io.FileInputStream;
+import java.io.BufferedWriter;
+import java.io.OutputStreamWriter;
+
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.util.XMLUtilities;
+//}}}
+
+/**
+ * A XML file in the settings directory.
+ * This class provides some common operations to load/save settings
+ * from/into a XML file.
+ * - Proper encoding and XML declaration.
+ * - Two stage save.
+ * - Making backup on each save.
+ * - Detection of change on disk.
+ */
+public class SettingsXML
+{
+ //{{{ Saver class
+ /**
+ * A Writer to write XML for saving.
+ * The real settings file is not changed until the finish()
+ * method succeeds, in which case the previous settings file is
+ * backuped.
+ */
+ public class Saver extends BufferedWriter
+ {
+ //{{{ writeXMLDeclaration() method
+ /**
+ * Write the XML 1.0 declaration.
+ * This should be the first output.
+ */
+ public void writeXMLDeclaration() throws IOException
+ {
+ writeXMLDeclaration("1.0");
+ } //}}}
+
+ //{{{ writeXMLDeclaration() method
+ /**
+ * Write the XML declaration of a specific version.
+ * This should be the first output.
+ */
+ public void writeXMLDeclaration(String version)
+ throws IOException
+ {
+ write("<?xml"
+ + " version=\"" + version + "\""
+ + " encoding=\"" + encoding + "\""
+ + " ?>");
+ newLine();
+ } //}}}
+
+ //{{{ finish() method
+ /**
+ * Perform the final step of saving.
+ */
+ public void finish() throws IOException
+ {
+ close();
+ jEdit.backupSettingsFile(file);
+ file.delete();
+ twoStageSaveFile.renameTo(file);
+ knownLastModified = file.lastModified();
+ } //}}}
+
+ //{{{ Private members
+ private File twoStageSaveFile;
+ private static final String encoding = "UTF-8";
+
+ // Only used by SettingsXML#opneSaver().
+ Saver() throws IOException
+ {
+ this(new File(file.getParentFile(),
+ "#" + file.getName() + "#save#"));
+ }
+
+ // A workaround for a restriction of super().
+ private Saver(File twoStageSaveFile) throws IOException
+ {
+ super(new OutputStreamWriter(
+ new FileOutputStream(twoStageSaveFile)
+ , encoding));
+ this.twoStageSaveFile = twoStageSaveFile;
+ }
+
+ //}}}
+ } //}}}
+
+ //{{{ Constructor
+ /**
+ * Construct a SettingsXML with specific location and name.
+ * @param settingsDirectory
+ * The settings directory of jedit
+ * @param name
+ * The file name will be (name + ".xml")
+ */
+ public SettingsXML(String settingsDirectory, String name)
+ {
+ String filename = name + ".xml";
+ file = new File(MiscUtilities.constructPath(
+ settingsDirectory, filename));
+ } //}}}
+
+ public SettingsXML(File f)
+ {
+ file = f;
+ }
+
+ //{{{ fileExits() method
+ /**
+ * Returns true if the file exists.
+ */
+ public boolean fileExists()
+ {
+ return file.exists();
+ } //}}}
+
+ //{{{ load() method
+ /**
+ * Parse the XML file to load.
+ * @param handler
+ * The handler to receive SAX notifications.
+ */
+ public void load(DefaultHandler handler) throws IOException
+ {
+ XMLUtilities.parseXML(new FileInputStream(file), handler);
+ knownLastModified = file.lastModified();
+ } //}}}
+
+ //{{{ openSaver() method
+ /**
+ * Open the file to save in XML.
+ */
+ public Saver openSaver() throws IOException
+ {
+ return new Saver();
+ } //}}}
+
+ //{{{ hasChangedOnDisk() method
+ /**
+ * Returns true if the file has been changed on disk.
+ * This is based on the last modified time at the last saving
+ * or loading.
+ */
+ public boolean hasChangedOnDisk()
+ {
+ return file.exists()
+ && (file.lastModified() != knownLastModified);
+ } //}}}
+
+ //{{{ toString() method
+ /**
+ * Returns the file's path.
+ */
+ public String toString()
+ {
+ return file.toString();
+ } //}}}
+
+ //{{{ Private members
+ private File file;
+ private long knownLastModified;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/TextUtilities.java b/jEdit/org/gjt/sp/jedit/TextUtilities.java
index 45215af..2bc8af7 100644
--- a/jEdit/org/gjt/sp/jedit/TextUtilities.java
+++ b/jEdit/org/gjt/sp/jedit/TextUtilities.java
@@ -1,993 +1,1031 @@
-/*
- * TextUtilities.java - Various text functions
- * Copyright (C) 1998, 2005 Slava Pestov
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.util.*;
-import javax.swing.text.Segment;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.syntax.*;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * Contains several text manipulation methods.
- *
- * <ul>
- * <li>Bracket matching
- * <li>Word start and end offset calculation
- * <li>String comparison
- * <li>Converting tabs to spaces and vice versa
- * <li>Wrapping text
- * <li>String case conversion
- * </ul>
- *
- * @author Slava Pestov
- * @version $Id: TextUtilities.java 16336 2009-10-14 09:56:25Z kpouer $
- */
-public class TextUtilities
-{
- // to avoid slowdown with large files; only scan 10000 lines either way
- public static final int BRACKET_MATCH_LIMIT = 10000;
-
- //{{{ getTokenAtOffset() method
- /**
- * Returns the token that contains the specified offset.
- * @param tokens The token list
- * @param offset The offset
- * @since jEdit 4.0pre3
- */
- public static Token getTokenAtOffset(Token tokens, int offset)
- {
- if(offset == 0 && tokens.id == Token.END)
- return tokens;
-
- for(;;)
- {
- if(tokens.id == Token.END)
- throw new ArrayIndexOutOfBoundsException("offset > line length");
-
- if(tokens.offset + tokens.length > offset)
- return tokens;
- else
- tokens = tokens.next;
- }
- } //}}}
-
- //{{{ getComplementaryBracket() method
- /**
- * Given an opening bracket, return the corresponding closing bracket
- * and store true in <code>direction[0]</code>. Given a closing bracket,
- * return the corresponding opening bracket and store false in
- * <code>direction[0]</code>. Otherwise, return <code>\0</code>.
- * @since jEdit 4.3pre2
- */
- public static char getComplementaryBracket(char ch, boolean[] direction)
- {
- switch(ch)
- {
- case '(': if (direction != null) direction[0] = true; return ')';
- case ')': if (direction != null) direction[0] = false; return '(';
- case '[': if (direction != null) direction[0] = true; return ']';
- case ']': if (direction != null) direction[0] = false; return '[';
- case '{': if (direction != null) direction[0] = true; return '}';
- case '}': if (direction != null) direction[0] = false; return '{';
- case '<': if (direction != null) direction[0] = true; return '>';
- case '>': if (direction != null) direction[0] = false; return '<';
- default: return '\0';
- }
- } //}}}
-
- //{{{ findMatchingBracket() method
- /**
- * Returns the offset of the bracket matching the one at the
- * specified offset of the buffer, or -1 if the bracket is
- * unmatched (or if the character is not a bracket).
- * @param buffer The buffer
- * @param line The line
- * @param offset The offset within that line
- * @since jEdit 2.6pre1
- */
- public static int findMatchingBracket(JEditBuffer buffer, int line, int offset)
- {
- if(offset < 0 || offset >= buffer.getLineLength(line))
- {
- throw new ArrayIndexOutOfBoundsException(offset + ":"
- + buffer.getLineLength(line));
- }
-
- Segment lineText = new Segment();
- buffer.getLineText(line,lineText);
-
- char c = lineText.array[lineText.offset + offset];
- // false - backwards, true - forwards
- boolean[] direction = new boolean[1];
-
- // corresponding character
- char cprime = getComplementaryBracket(c,direction);
-
- if( cprime == '\0' )
- { // c is no bracket
- return -1;
- }
-
- // 1 because we've already 'seen' the first bracket
- int count = 1;
-
- DefaultTokenHandler tokenHandler = new DefaultTokenHandler();
- buffer.markTokens(line,tokenHandler);
-
- // Get the syntax token at 'offset'
- // only tokens with the same type will be checked for
- // the corresponding bracket
- byte idOfBracket = getTokenAtOffset(tokenHandler.getTokens(),offset).id;
-
- boolean haveTokens = true;
-
- int startLine = line;
-
- //{{{ Forward search
- if(direction[0])
- {
- offset++;
-
- for(;;)
- {
- for(int i = offset; i < lineText.count; i++)
- {
- char ch = lineText.array[lineText.offset + i];
- if(ch == c)
- {
- if(!haveTokens)
- {
- tokenHandler.init();
- buffer.markTokens(line,tokenHandler);
- haveTokens = true;
- }
- if(getTokenAtOffset(tokenHandler.getTokens(),i).id == idOfBracket)
- count++;
- }
- else if(ch == cprime)
- {
- if(!haveTokens)
- {
- tokenHandler.init();
- buffer.markTokens(line,tokenHandler);
- haveTokens = true;
- }
- if(getTokenAtOffset(tokenHandler.getTokens(),i).id == idOfBracket)
- {
- count--;
- if(count == 0)
- return buffer.getLineStartOffset(line) + i;
- }
- }
- }
-
- //{{{ Go on to next line
- line++;
- if(line >= buffer.getLineCount() || (line - startLine) > BRACKET_MATCH_LIMIT)
- break;
- buffer.getLineText(line,lineText);
- offset = 0;
- haveTokens = false;
- //}}}
- }
- } //}}}
- //{{{ Backward search
- else
- {
- offset--;
-
- for(;;)
- {
- for(int i = offset; i >= 0; i--)
- {
- char ch = lineText.array[lineText.offset + i];
- if(ch == c)
- {
- if(!haveTokens)
- {
- tokenHandler.init();
- buffer.markTokens(line,tokenHandler);
- haveTokens = true;
- }
- if(getTokenAtOffset(tokenHandler.getTokens(),i).id == idOfBracket)
- count++;
- }
- else if(ch == cprime)
- {
- if(!haveTokens)
- {
- tokenHandler.init();
- buffer.markTokens(line,tokenHandler);
- haveTokens = true;
- }
- if(getTokenAtOffset(tokenHandler.getTokens(),i).id == idOfBracket)
- {
- count--;
- if(count == 0)
- return buffer.getLineStartOffset(line) + i;
- }
- }
- }
-
- //{{{ Go on to previous line
- line--;
- if(line < 0 || (startLine - line) > BRACKET_MATCH_LIMIT)
- break;
- buffer.getLineText(line,lineText);
- offset = lineText.count - 1;
- haveTokens = false;
- //}}}
- }
- } //}}}
-
- // Nothing found
- return -1;
- } //}}}
-
- //{{{ findWordStart() method
- /**
- * Locates the start of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- */
- public static int findWordStart(String line, int pos, String noWordSep)
- {
- return findWordStart(line, pos, noWordSep, true, false);
- } //}}}
-
- //{{{ findWordStart() method
- /**
- * Locates the start of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @since jEdit 4.3pre15
- */
- public static int findWordStart(CharSequence line,
- int pos,
- String noWordSep)
- {
- return findWordStart(line, pos, noWordSep, true, false, false);
- } //}}}
-
-
- /** Similar to perl's join() method on lists,
- * but works with all collections.
- *
- * @param c An iterable collection of Objects
- * @param delim a string to put between each object
- * @return a joined toString() representation of the collection
- *
- * @since jedit 4.3pre3
- */
- public static String join(Collection<String> c, String delim)
- {
- StringBuilder retval = new StringBuilder();
- Iterator<String> itr = c.iterator();
- if (itr.hasNext())
- retval.append( itr.next() );
- else
- return "";
- while (itr.hasNext())
- {
- retval.append(delim);
- retval.append(itr.next());
- }
- return retval.toString();
- }
-
- //{{{ findWordStart() method
- /**
- * Locates the start of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @param joinNonWordChars Treat consecutive non-alphanumeric
- * characters as one word
- * @since jEdit 4.2pre5
- */
- public static int findWordStart(String line, int pos, String noWordSep,
- boolean joinNonWordChars)
- {
- return findWordStart(line,pos,noWordSep,joinNonWordChars,false);
- } //}}}
-
- //{{{ findWordStart() method
- /**
- * Locates the start of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @param joinNonWordChars Treat consecutive non-alphanumeric
- * characters as one word
- * @param eatWhitespace Include whitespace at start of word
- * @since jEdit 4.1pre2
- */
- public static int findWordStart(String line, int pos, String noWordSep,
- boolean joinNonWordChars, boolean eatWhitespace)
- {
- return findWordStart(line, pos, noWordSep, joinNonWordChars, false, eatWhitespace);
- } //}}}
-
- //{{{ findWordStart() method
- /**
- * Locates the start of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @param joinNonWordChars Treat consecutive non-alphanumeric
- * characters as one word
- * @param camelCasedWords Treat "camelCased" parts as words
- * @param eatWhitespace Include whitespace at start of word
- * @since jEdit 4.3pre10
- */
- public static int findWordStart(String line, int pos, String noWordSep,
- boolean joinNonWordChars, boolean camelCasedWords,
- boolean eatWhitespace)
- {
- return findWordStart((CharSequence) line, pos, noWordSep,
- joinNonWordChars, camelCasedWords,
- eatWhitespace);
- } //}}}
-
- //{{{ findWordStart() method
- /**
- * Locates the start of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @param joinNonWordChars Treat consecutive non-alphanumeric
- * characters as one word
- * @param camelCasedWords Treat "camelCased" parts as words
- * @param eatWhitespace Include whitespace at start of word
- * @since jEdit 4.3pre15
- */
- public static int findWordStart(CharSequence line,
- int pos,
- String noWordSep,
- boolean joinNonWordChars,
- boolean camelCasedWords,
- boolean eatWhitespace)
- {
- char ch = line.charAt(pos);
-
- if(noWordSep == null)
- noWordSep = "";
-
- //{{{ the character under the cursor changes how we behave.
- int type = getCharType(ch, noWordSep);
- //}}}
-
- for(int i = pos; i >= 0; i--)
- {
- char lastCh = ch;
- ch = line.charAt(i);
- switch(type)
- {
- //{{{ Whitespace...
- case WHITESPACE:
- // only select other whitespace in this case
- if(Character.isWhitespace(ch))
- break;
- // word char or symbol; stop
- else
- return i + 1; //}}}
- //{{{ Word character...
- case WORD_CHAR:
- // stop at next last (in writing direction) upper case char if camel cased
- // (don't stop at every upper case char, don't treat noWordSep as word chars)
- if (camelCasedWords && Character.isUpperCase(ch) && !Character.isUpperCase(lastCh)
- && Character.isLetterOrDigit(lastCh))
- {
- return i;
- }
- // stop at next first (in writing direction) upper case char if camel cased
- // (don't stop at every upper case char)
- else if (camelCasedWords && !Character.isUpperCase(ch) && Character.isUpperCase(lastCh))
- {
- return i + 1;
- }
- // word char; keep going
- else if(Character.isLetterOrDigit(ch) ||
- noWordSep.indexOf(ch) != -1)
- {
- break;
- }
- // whitespace; include in word if eating
- else if(Character.isWhitespace(ch)
- && eatWhitespace)
- {
- type = WHITESPACE;
- break;
- }
- else
- return i + 1; //}}}
- //{{{ Symbol...
- case SYMBOL:
- if(!joinNonWordChars && pos != i)
- return i + 1;
-
- // whitespace; include in word if eating
- if(Character.isWhitespace(ch))
- {
- if(eatWhitespace)
- {
- type = WHITESPACE;
- break;
- }
- else
- return i + 1;
- }
- else if(Character.isLetterOrDigit(ch) ||
- noWordSep.indexOf(ch) != -1)
- {
- return i + 1;
- }
- else
- {
- break;
- } //}}}
- }
- }
-
- return 0;
- } //}}}
-
- //{{{ findWordEnd() method
- /**
- * Locates the end of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- */
- public static int findWordEnd(String line, int pos, String noWordSep)
- {
- return findWordEnd(line, pos, noWordSep, true);
- } //}}}
-
- //{{{ findWordEnd() method
- /**
- * Locates the end of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @since jEdit 4.3pre15
- */
- public static int findWordEnd(CharSequence line,
- int pos,
- String noWordSep)
- {
- return findWordEnd(line, pos, noWordSep, true, false, false);
- } //}}}
-
- //{{{ findWordEnd() method
- /**
- * Locates the end of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @param joinNonWordChars Treat consecutive non-alphanumeric
- * characters as one word
- * @since jEdit 4.1pre2
- */
- public static int findWordEnd(String line, int pos, String noWordSep,
- boolean joinNonWordChars)
- {
- return findWordEnd(line,pos,noWordSep,joinNonWordChars,false);
- } //}}}
-
- //{{{ findWordEnd() method
- /**
- * Locates the end of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @param joinNonWordChars Treat consecutive non-alphanumeric
- * characters as one word
- * @param eatWhitespace Include whitespace at end of word
- * @since jEdit 4.2pre5
- */
- public static int findWordEnd(String line, int pos, String noWordSep,
- boolean joinNonWordChars, boolean eatWhitespace)
- {
- return findWordEnd(line, pos, noWordSep, joinNonWordChars, false, eatWhitespace);
- } //}}}
-
- //{{{ findWordEnd() method
- /**
- * Locates the end of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @param joinNonWordChars Treat consecutive non-alphanumeric
- * characters as one word
- * @param camelCasedWords Treat "camelCased" parts as words
- * @param eatWhitespace Include whitespace at end of word
- * @since jEdit 4.3pre10
- */
- public static int findWordEnd(String line, int pos, String noWordSep,
- boolean joinNonWordChars, boolean camelCasedWords,
- boolean eatWhitespace)
- {
- return findWordEnd((CharSequence)line, pos, noWordSep,
- joinNonWordChars, camelCasedWords,
- eatWhitespace);
- } //}}}
-
- //{{{ findWordEnd() method
- /**
- * Locates the end of the word at the specified position.
- * @param line The text
- * @param pos The position
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @param joinNonWordChars Treat consecutive non-alphanumeric
- * characters as one word
- * @param camelCasedWords Treat "camelCased" parts as words
- * @param eatWhitespace Include whitespace at end of word
- * @since jEdit 4.3pre15
- */
- public static int findWordEnd(CharSequence line,
- int pos,
- String noWordSep,
- boolean joinNonWordChars,
- boolean camelCasedWords,
- boolean eatWhitespace)
- {
- if(pos != 0)
- pos--;
-
- char ch = line.charAt(pos);
-
- if(noWordSep == null)
- noWordSep = "";
-
- //{{{ the character under the cursor changes how we behave.
- int type = getCharType(ch, noWordSep);
- //}}}
-
- for(int i = pos; i < line.length(); i++)
- {
- char lastCh = ch;
- ch = line.charAt(i);
- switch(type)
- {
- //{{{ Whitespace...
- case WHITESPACE:
- // only select other whitespace in this case
- if(Character.isWhitespace(ch))
- break;
- else
- return i; //}}}
- //{{{ Word character...
- case WORD_CHAR:
- // stop at next last upper case char if camel cased
- // (don't stop at every upper case char, don't treat noWordSep as word chars)
- if (camelCasedWords && i > pos + 1 && !Character.isUpperCase(ch) && Character.isLetterOrDigit(ch)
- && Character.isUpperCase(lastCh))
- {
- return i - 1;
- }
- // stop at next first upper case char if camel caseg (don't stop at every upper case char)
- else if (camelCasedWords && Character.isUpperCase(ch) && !Character.isUpperCase(lastCh))
- {
- return i;
- }
- else if(Character.isLetterOrDigit(ch) ||
- noWordSep.indexOf(ch) != -1)
- {
- break;
- }
- // whitespace; include in word if eating
- else if(Character.isWhitespace(ch)
- && eatWhitespace)
- {
- type = WHITESPACE;
- break;
- }
- else
- return i; //}}}
- //{{{ Symbol...
- case SYMBOL:
- if(!joinNonWordChars && i != pos)
- return i;
-
- // if we see whitespace, set flag.
- if(Character.isWhitespace(ch))
- {
- if(eatWhitespace)
- {
- type = WHITESPACE;
- break;
- }
- else
- return i;
- }
- else if(Character.isLetterOrDigit(ch) ||
- noWordSep.indexOf(ch) != -1)
- {
- return i;
- }
- else
- {
- break;
- } //}}}
- }
- }
-
- return line.length();
- } //}}}
-
- /**
- * Returns the type of the char.
- *
- * @param ch the character
- * @param noWordSep Characters that are non-alphanumeric, but
- * should be treated as word characters anyway
- * @return the type of the char : {@link #WHITESPACE}, {@link #WORD_CHAR}, {@link #SYMBOL}
- */
- private static int getCharType(char ch, String noWordSep)
- {
- int type;
- if(Character.isWhitespace(ch))
- type = WHITESPACE;
- else if(Character.isLetterOrDigit(ch)
- || noWordSep.indexOf(ch) != -1)
- type = WORD_CHAR;
- else
- type = SYMBOL;
- return type;
- }
-
- //{{{ spacesToTabs() method
- /**
- * Converts consecutive spaces to tabs in the specified string.
- * @param in The string
- * @param tabSize The tab size
- */
- public static String spacesToTabs(String in, int tabSize)
- {
- StringBuilder buf = new StringBuilder();
- int width = 0;
- int whitespace = 0;
- for(int i = 0; i < in.length(); i++)
- {
- switch(in.charAt(i))
- {
- case ' ':
- whitespace++;
- width++;
- break;
- case '\t':
- int tab = tabSize - (width % tabSize);
- width += tab;
- whitespace += tab;
- break;
- case '\n':
- if(whitespace != 0)
- {
- buf.append(StandardUtilities
- .createWhiteSpace(whitespace,tabSize,
- width - whitespace));
- }
- whitespace = 0;
- width = 0;
- buf.append('\n');
- break;
- default:
- if(whitespace != 0)
- {
- buf.append(StandardUtilities
- .createWhiteSpace(whitespace,tabSize,
- width - whitespace));
- whitespace = 0;
- }
- buf.append(in.charAt(i));
- width++;
- break;
- }
- }
-
- if(whitespace != 0)
- {
- buf.append(StandardUtilities.createWhiteSpace(whitespace,tabSize,
- width - whitespace));
- }
-
- return buf.toString();
- } //}}}
-
- //{{{ tabsToSpaces() method
- /**
- * Converts tabs to consecutive spaces in the specified string.
- * @param in The string
- * @param tabSize The tab size
- */
- public static String tabsToSpaces(String in, int tabSize)
- {
- StringBuilder buf = new StringBuilder();
- int width = 0;
- for(int i = 0; i < in.length(); i++)
- {
- switch(in.charAt(i))
- {
- case '\t':
- int count = tabSize - (width % tabSize);
- width += count;
- while(--count >= 0)
- buf.append(' ');
- break;
- case '\n':
- width = 0;
- buf.append(in.charAt(i));
- break;
- default:
- width++;
- buf.append(in.charAt(i));
- break;
- }
- }
- return buf.toString();
- } //}}}
-
- //{{{ format() method
- /**
- * Formats the specified text by merging and breaking lines to the
- * specified width.
- * @param text The text
- * @param maxLineLength The maximum line length
- * @param tabSize The tab size
- */
- public static String format(String text, int maxLineLength, int tabSize)
- {
- StringBuilder buf = new StringBuilder();
-
- int index = 0;
-
- for(;;)
- {
- int newIndex = text.indexOf("\n\n",index);
- if(newIndex == -1)
- break;
-
- formatParagraph(text.substring(index,newIndex),
- maxLineLength,tabSize,buf);
- buf.append("\n\n");
- index = newIndex + 2;
- }
-
- if(index != text.length())
- {
- formatParagraph(text.substring(index),
- maxLineLength,tabSize,buf);
- }
-
- return buf.toString();
- } //}}}
-
- //{{{ indexIgnoringWhitespace() method
- /**
- * Inverse of <code>ignoringWhitespaceIndex()</code>.
- * @param str a string (not an empty string)
- * @param index The index
- * @return The number of non-whitespace characters that precede the index.
- * @since jEdit 4.3pre2
- */
- public static int indexIgnoringWhitespace(String str, int index)
- {
- int j = 0;
- for(int i = 0; i < index; i++)
- if(!Character.isWhitespace(str.charAt(i))) j++;
- return j;
- } //}}}
-
- //{{{ ignoringWhitespaceIndex() method
- /**
- * Inverse of <code>indexIgnoringWhitespace()</code>.
- * @param str a string (not an empty string)
- * @param index The index
- * @return The index into the string where the number of non-whitespace
- * characters that precede the index is count.
- * @since jEdit 4.3pre2
- */
- public static int ignoringWhitespaceIndex(String str, int index)
- {
- int j = 0;
- for(int i = 0;;i++)
- {
- if(!Character.isWhitespace(str.charAt(i))) j++;
-
- if(j > index)
- return i;
- if(i == str.length() - 1)
- return i + 1;
- }
- } //}}}
-
- //{{{ getStringCase() method
- public static final int MIXED = 0;
- public static final int LOWER_CASE = 1;
- public static final int UPPER_CASE = 2;
- public static final int TITLE_CASE = 3;
-
- /**
- * Returns if the specified string is all upper case, all lower case,
- * or title case (first letter upper case, rest lower case).
- * @param str The string
- * @since jEdit 4.0pre1
- */
- public static int getStringCase(String str)
- {
- if(str.length() == 0)
- return MIXED;
-
- int state = -1;
-
- char ch = str.charAt(0);
- if(Character.isLetter(ch))
- {
- if(Character.isUpperCase(ch))
- state = UPPER_CASE;
- else
- state = LOWER_CASE;
- }
-
- for(int i = 1; i < str.length(); i++)
- {
- ch = str.charAt(i);
- if(!Character.isLetter(ch))
- continue;
-
- switch(state)
- {
- case UPPER_CASE:
- if(Character.isLowerCase(ch))
- {
- if(i == 1)
- state = TITLE_CASE;
- else
- return MIXED;
- }
- break;
- case LOWER_CASE:
- case TITLE_CASE:
- if(Character.isUpperCase(ch))
- return MIXED;
- break;
- }
- }
-
- return state;
- } //}}}
-
- //{{{ toTitleCase() method
- /**
- * Converts the specified string to title case, by capitalizing the
- * first letter.
- * @param str The string
- * @since jEdit 4.0pre1
- */
- public static String toTitleCase(String str)
- {
- if(str.length() == 0)
- return str;
- else
- {
- return Character.toUpperCase(str.charAt(0))
- + str.substring(1).toLowerCase();
- }
- } //}}}
-
- //{{{ Private members
- private static final int WHITESPACE = 0;
- private static final int WORD_CHAR = 1;
- private static final int SYMBOL = 2;
-
- //{{{ formatParagraph() method
- private static void formatParagraph(String text, int maxLineLength,
- int tabSize, StringBuilder buf)
- {
- // align everything to paragraph's leading indent
- int leadingWhitespaceCount = StandardUtilities.getLeadingWhiteSpace(text);
- String leadingWhitespace = text.substring(0,leadingWhitespaceCount);
- int leadingWhitespaceWidth = StandardUtilities.getLeadingWhiteSpaceWidth(text,tabSize);
-
- buf.append(leadingWhitespace);
-
- int lineLength = leadingWhitespaceWidth;
- StringTokenizer st = new StringTokenizer(text);
- while(st.hasMoreTokens())
- {
- String word = st.nextToken();
- if(lineLength == leadingWhitespaceWidth)
- {
- // do nothing
- }
- else if(lineLength + word.length() + 1 > maxLineLength)
- {
- buf.append('\n');
- buf.append(leadingWhitespace);
- lineLength = leadingWhitespaceWidth;
- }
- else
- {
- buf.append(' ');
- lineLength++;
- }
- buf.append(word);
- lineLength += word.length();
- }
- } //}}}
-
- //{{{ indexIgnoringWhitespace() method
- public static void indexIgnoringWhitespace(String text, int maxLineLength,
- int tabSize, StringBuffer buf)
- {
- // align everything to paragraph's leading indent
- int leadingWhitespaceCount = StandardUtilities.getLeadingWhiteSpace(text);
- String leadingWhitespace = text.substring(0,leadingWhitespaceCount);
- int leadingWhitespaceWidth = StandardUtilities.getLeadingWhiteSpaceWidth(text,tabSize);
-
- buf.append(leadingWhitespace);
-
- int lineLength = leadingWhitespaceWidth;
- StringTokenizer st = new StringTokenizer(text);
- while(st.hasMoreTokens())
- {
- String word = st.nextToken();
- if(lineLength == leadingWhitespaceWidth)
- {
- // do nothing
- }
- else if(lineLength + word.length() + 1 > maxLineLength)
- {
- buf.append('\n');
- buf.append(leadingWhitespace);
- lineLength = leadingWhitespaceWidth;
- }
- else
- {
- buf.append(' ');
- lineLength++;
- }
- buf.append(word);
- lineLength += word.length();
- }
- } //}}}
-
- //}}}
-}
+/*
+ * TextUtilities.java - Various text functions
+ * Copyright (C) 1998, 2005 Slava Pestov
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.util.*;
+import javax.swing.text.Segment;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.syntax.*;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * Contains several text manipulation methods.
+ *
+ * <ul>
+ * <li>Bracket matching
+ * <li>Word start and end offset calculation
+ * <li>String comparison
+ * <li>Converting tabs to spaces and vice versa
+ * <li>Wrapping text
+ * <li>String case conversion
+ * </ul>
+ *
+ * @author Slava Pestov
+ * @version $Id: TextUtilities.java 18343 2010-08-13 09:11:07Z kpouer $
+ */
+public class TextUtilities
+{
+ // to avoid slowdown with large files; only scan 10000 lines either way
+ public static final int BRACKET_MATCH_LIMIT = 10000;
+ public static final int WHITESPACE = 0;
+ public static final int WORD_CHAR = 1;
+ public static final int SYMBOL = 2;
+
+
+ //{{{ getTokenAtOffset() method
+ /**
+ * Returns the token that contains the specified offset.
+ * @param tokens The token list
+ * @param offset The offset
+ * @since jEdit 4.0pre3
+ */
+ public static Token getTokenAtOffset(Token tokens, int offset)
+ {
+ if(offset == 0 && tokens.id == Token.END)
+ return tokens;
+
+ for(;;)
+ {
+ if(tokens.id == Token.END)
+ throw new ArrayIndexOutOfBoundsException("offset > line length");
+
+ if(tokens.offset + tokens.length > offset)
+ return tokens;
+ else
+ tokens = tokens.next;
+ }
+ } //}}}
+
+ //{{{ getComplementaryBracket() method
+ /**
+ * Given an opening bracket, return the corresponding closing bracket
+ * and store true in <code>direction[0]</code>. Given a closing bracket,
+ * return the corresponding opening bracket and store false in
+ * <code>direction[0]</code>. Otherwise, return <code>\0</code>.
+ * @since jEdit 4.3pre2
+ */
+ public static char getComplementaryBracket(char ch, boolean[] direction)
+ {
+ switch(ch)
+ {
+ case '(': if (direction != null) direction[0] = true; return ')';
+ case ')': if (direction != null) direction[0] = false; return '(';
+ case '[': if (direction != null) direction[0] = true; return ']';
+ case ']': if (direction != null) direction[0] = false; return '[';
+ case '{': if (direction != null) direction[0] = true; return '}';
+ case '}': if (direction != null) direction[0] = false; return '{';
+ case '<': if (direction != null) direction[0] = true; return '>';
+ case '>': if (direction != null) direction[0] = false; return '<';
+ default: return '\0';
+ }
+ } //}}}
+
+ //{{{ findMatchingBracket() method
+ /**
+ * Returns the offset of the bracket matching the one at the
+ * specified offset of the buffer, or -1 if the bracket is
+ * unmatched (or if the character is not a bracket).
+ * @param buffer The buffer
+ * @param line The line
+ * @param offset The offset within that line
+ * @since jEdit 2.6pre1
+ */
+ public static int findMatchingBracket(JEditBuffer buffer, int line, int offset)
+ {
+ if(offset < 0 || offset >= buffer.getLineLength(line))
+ {
+ throw new ArrayIndexOutOfBoundsException(offset + ":"
+ + buffer.getLineLength(line));
+ }
+
+ Segment lineText = new Segment();
+ buffer.getLineText(line,lineText);
+
+ char c = lineText.array[lineText.offset + offset];
+ // false - backwards, true - forwards
+ boolean[] direction = new boolean[1];
+
+ // corresponding character
+ char cprime = getComplementaryBracket(c,direction);
+
+ if( cprime == '\0' )
+ { // c is no bracket
+ return -1;
+ }
+
+ // 1 because we've already 'seen' the first bracket
+ int count = 1;
+
+ DefaultTokenHandler tokenHandler = new DefaultTokenHandler();
+ buffer.markTokens(line,tokenHandler);
+
+ // Get the syntax token at 'offset'
+ // only tokens with the same type will be checked for
+ // the corresponding bracket
+ byte idOfBracket = getTokenAtOffset(tokenHandler.getTokens(),offset).id;
+
+ boolean haveTokens = true;
+
+ int startLine = line;
+
+ //{{{ Forward search
+ if(direction[0])
+ {
+ offset++;
+
+ for(;;)
+ {
+ for(int i = offset; i < lineText.count; i++)
+ {
+ char ch = lineText.array[lineText.offset + i];
+ if(ch == c)
+ {
+ if(!haveTokens)
+ {
+ tokenHandler.init();
+ buffer.markTokens(line,tokenHandler);
+ haveTokens = true;
+ }
+ if(getTokenAtOffset(tokenHandler.getTokens(),i).id == idOfBracket)
+ count++;
+ }
+ else if(ch == cprime)
+ {
+ if(!haveTokens)
+ {
+ tokenHandler.init();
+ buffer.markTokens(line,tokenHandler);
+ haveTokens = true;
+ }
+ if(getTokenAtOffset(tokenHandler.getTokens(),i).id == idOfBracket)
+ {
+ count--;
+ if(count == 0)
+ return buffer.getLineStartOffset(line) + i;
+ }
+ }
+ }
+
+ //{{{ Go on to next line
+ line++;
+ if(line >= buffer.getLineCount() || (line - startLine) > BRACKET_MATCH_LIMIT)
+ break;
+ buffer.getLineText(line,lineText);
+ offset = 0;
+ haveTokens = false;
+ //}}}
+ }
+ } //}}}
+ //{{{ Backward search
+ else
+ {
+ offset--;
+
+ for(;;)
+ {
+ for(int i = offset; i >= 0; i--)
+ {
+ char ch = lineText.array[lineText.offset + i];
+ if(ch == c)
+ {
+ if(!haveTokens)
+ {
+ tokenHandler.init();
+ buffer.markTokens(line,tokenHandler);
+ haveTokens = true;
+ }
+ if(getTokenAtOffset(tokenHandler.getTokens(),i).id == idOfBracket)
+ count++;
+ }
+ else if(ch == cprime)
+ {
+ if(!haveTokens)
+ {
+ tokenHandler.init();
+ buffer.markTokens(line,tokenHandler);
+ haveTokens = true;
+ }
+ if(getTokenAtOffset(tokenHandler.getTokens(),i).id == idOfBracket)
+ {
+ count--;
+ if(count == 0)
+ return buffer.getLineStartOffset(line) + i;
+ }
+ }
+ }
+
+ //{{{ Go on to previous line
+ line--;
+ if(line < 0 || (startLine - line) > BRACKET_MATCH_LIMIT)
+ break;
+ buffer.getLineText(line,lineText);
+ offset = lineText.count - 1;
+ haveTokens = false;
+ //}}}
+ }
+ } //}}}
+
+ // Nothing found
+ return -1;
+ } //}}}
+
+ //{{{ join() method
+ /** Similar to perl's join() method on lists,
+ * but works with all collections.
+ *
+ * @param c An iterable collection of Objects
+ * @param delim a string to put between each object
+ * @return a joined toString() representation of the collection
+ *
+ * @since jedit 4.3pre3
+ */
+ public static String join(Collection<String> c, String delim)
+ {
+ StringBuilder retval = new StringBuilder();
+ Iterator<String> itr = c.iterator();
+ if (itr.hasNext())
+ retval.append( itr.next() );
+ else
+ return "";
+ while (itr.hasNext())
+ {
+ retval.append(delim);
+ retval.append(itr.next());
+ }
+ return retval.toString();
+ } //}}}
+
+ //{{{ findWordStart() methods
+ /**
+ * Locates the start of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ */
+ public static int findWordStart(String line, int pos, String noWordSep)
+ {
+ return findWordStart(line, pos, noWordSep, true, false);
+ }
+
+ /**
+ * Locates the start of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @since jEdit 4.3pre15
+ */
+ public static int findWordStart(CharSequence line,
+ int pos,
+ String noWordSep)
+ {
+ return findWordStart(line, pos, noWordSep, true, false, false);
+ }
+
+ /**
+ * Locates the start of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @param joinNonWordChars Treat consecutive non-alphanumeric
+ * characters as one word
+ * @since jEdit 4.2pre5
+ */
+ public static int findWordStart(String line, int pos, String noWordSep,
+ boolean joinNonWordChars)
+ {
+ return findWordStart(line,pos,noWordSep,joinNonWordChars,false);
+ }
+
+ /**
+ * Locates the start of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @param joinNonWordChars Treat consecutive non-alphanumeric
+ * characters as one word
+ * @param eatWhitespace Include whitespace at start of word
+ * @since jEdit 4.1pre2
+ */
+ public static int findWordStart(String line, int pos, String noWordSep,
+ boolean joinNonWordChars, boolean eatWhitespace)
+ {
+ return findWordStart(line, pos, noWordSep, joinNonWordChars,
+ false, eatWhitespace);
+ }
+
+ /**
+ * Locates the start of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @param joinNonWordChars Treat consecutive non-alphanumeric
+ * characters as one word
+ * @param camelCasedWords Treat "camelCased" parts as words
+ * @param eatWhitespace Include whitespace at start of word
+ * @since jEdit 4.3pre10
+ */
+ public static int findWordStart(String line, int pos, String noWordSep,
+ boolean joinNonWordChars, boolean camelCasedWords,
+ boolean eatWhitespace)
+ {
+ return findWordStart((CharSequence) line, pos, noWordSep,
+ joinNonWordChars, camelCasedWords,
+ eatWhitespace);
+ }
+
+ /**
+ * Locates the start of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @param joinNonWordChars Treat consecutive non-alphanumeric
+ * characters as one word
+ * @param camelCasedWords Treat "camelCased" parts as words
+ * @param eatWhitespace Include whitespace at start of word
+ * @since jEdit 4.3pre15
+ */
+ public static int findWordStart(CharSequence line,
+ int pos,
+ String noWordSep,
+ boolean joinNonWordChars,
+ boolean camelCasedWords,
+ boolean eatWhitespace)
+ {
+ return findWordStart(line, pos, noWordSep, joinNonWordChars, camelCasedWords, eatWhitespace, false);
+ }
+
+ /**
+ * Locates the start of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @param joinNonWordChars Treat consecutive non-alphanumeric
+ * characters as one word
+ * @param camelCasedWords Treat "camelCased" parts as words
+ * @param eatWhitespace Include whitespace at start of word
+ * @param eatOnlyAfterWord Eat only whitespace after a word,
+ * in effect this finds actual word starts even if eating
+ * @since jEdit 4.4pre1
+ */
+ public static int findWordStart(CharSequence line, int pos, String noWordSep,
+ boolean joinNonWordChars, boolean camelCasedWords,
+ boolean eatWhitespace, boolean eatOnlyAfterWord)
+ {
+ char ch = line.charAt(pos);
+
+ if(noWordSep == null)
+ noWordSep = "";
+
+ //{{{ the character under the cursor changes how we behave.
+ int type = getCharType(ch, noWordSep);
+ //}}}
+
+ for(int i = pos; i >= 0; i--)
+ {
+ char lastCh = ch;
+ ch = line.charAt(i);
+ switch(type)
+ {
+ //{{{ Whitespace...
+ case WHITESPACE:
+ // only select other whitespace in this case, unless eating only after words
+ if(Character.isWhitespace(ch))
+ break;
+ // word char or symbol; stop, unless eating only after words
+ else if (!eatOnlyAfterWord)
+ {
+ return i + 1;
+ }
+ // we have eaten after-word-whitespace and now continue until word start
+ else if (Character.isLetterOrDigit(ch) || noWordSep.indexOf(ch) != -1)
+ {
+ type = WORD_CHAR;
+ }
+ else
+ type = SYMBOL;
+ break; //}}}
+ //{{{ Word character...
+ case WORD_CHAR:
+ // stop at next last (in writing direction) upper case char if camel cased
+ // (don't stop at every upper case char, don't treat noWordSep as word chars)
+ if (camelCasedWords && Character.isUpperCase(ch) && !Character.isUpperCase(lastCh)
+ && Character.isLetterOrDigit(lastCh))
+ {
+ return i;
+ }
+ // stop at next first (in writing direction) upper case char if camel cased
+ // (don't stop at every upper case char)
+ else if (camelCasedWords && !Character.isUpperCase(ch) && Character.isUpperCase(lastCh))
+ {
+ return i + 1;
+ }
+ // word char; keep going
+ else if(Character.isLetterOrDigit(ch) ||
+ noWordSep.indexOf(ch) != -1)
+ {
+ break;
+ }
+ // whitespace; include in word if eating, but not if only eating after word
+ else if(Character.isWhitespace(ch)
+ && eatWhitespace && !eatOnlyAfterWord)
+ {
+ type = WHITESPACE;
+ break;
+ }
+ else
+ return i + 1; //}}}
+ //{{{ Symbol...
+ case SYMBOL:
+ if(!joinNonWordChars && pos != i)
+ return i + 1;
+
+ // whitespace; include in word if eating, but not if only eating after word
+ if(Character.isWhitespace(ch))
+ {
+ if(eatWhitespace && !eatOnlyAfterWord)
+ {
+ type = WHITESPACE;
+ break;
+ }
+ else
+ return i + 1;
+ }
+ else if(Character.isLetterOrDigit(ch) ||
+ noWordSep.indexOf(ch) != -1)
+ {
+ return i + 1;
+ }
+ else
+ {
+ break;
+ } //}}}
+ }
+ }
+
+ return 0;
+ } //}}}
+
+ //{{{ findWordEnd() methods
+ /**
+ * Locates the end of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ */
+ public static int findWordEnd(String line, int pos, String noWordSep)
+ {
+ return findWordEnd(line, pos, noWordSep, true);
+ }
+
+ /**
+ * Locates the end of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @since jEdit 4.3pre15
+ */
+ public static int findWordEnd(CharSequence line,
+ int pos,
+ String noWordSep)
+ {
+ return findWordEnd(line, pos, noWordSep, true, false, false);
+ }
+
+ /**
+ * Locates the end of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @param joinNonWordChars Treat consecutive non-alphanumeric
+ * characters as one word
+ * @since jEdit 4.1pre2
+ */
+ public static int findWordEnd(String line, int pos, String noWordSep,
+ boolean joinNonWordChars)
+ {
+ return findWordEnd(line,pos,noWordSep,joinNonWordChars,false);
+ }
+
+ /**
+ * Locates the end of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @param joinNonWordChars Treat consecutive non-alphanumeric
+ * characters as one word
+ * @param eatWhitespace Include whitespace at end of word
+ * @since jEdit 4.2pre5
+ */
+ public static int findWordEnd(String line, int pos, String noWordSep,
+ boolean joinNonWordChars, boolean eatWhitespace)
+ {
+ return findWordEnd(line, pos, noWordSep, joinNonWordChars,
+ false, eatWhitespace);
+ }
+
+ /**
+ * Locates the end of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @param joinNonWordChars Treat consecutive non-alphanumeric
+ * characters as one word
+ * @param camelCasedWords Treat "camelCased" parts as words
+ * @param eatWhitespace Include whitespace at end of word
+ * @since jEdit 4.3pre10
+ */
+ public static int findWordEnd(String line, int pos, String noWordSep,
+ boolean joinNonWordChars, boolean camelCasedWords,
+ boolean eatWhitespace)
+ {
+ return findWordEnd((CharSequence)line, pos, noWordSep,
+ joinNonWordChars, camelCasedWords,
+ eatWhitespace);
+ }
+
+ /**
+ * Locates the end of the word at the specified position.
+ * @param line The text
+ * @param pos The position
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway
+ * @param joinNonWordChars Treat consecutive non-alphanumeric
+ * characters as one word
+ * @param camelCasedWords Treat "camelCased" parts as words
+ * @param eatWhitespace Include whitespace at end of word
+ * @since jEdit 4.3pre15
+ */
+ public static int findWordEnd(CharSequence line,
+ int pos,
+ String noWordSep,
+ boolean joinNonWordChars,
+ boolean camelCasedWords,
+ boolean eatWhitespace)
+ {
+ if(pos != 0)
+ pos--;
+
+ char ch = line.charAt(pos);
+
+ if(noWordSep == null)
+ noWordSep = "";
+
+ //{{{ the character under the cursor changes how we behave.
+ int type = getCharType(ch, noWordSep);
+ //}}}
+
+ for(int i = pos; i < line.length(); i++)
+ {
+ char lastCh = ch;
+ ch = line.charAt(i);
+ switch(type)
+ {
+ //{{{ Whitespace...
+ case WHITESPACE:
+ // only select other whitespace in this case
+ if(Character.isWhitespace(ch))
+ break;
+ else
+ return i; //}}}
+ //{{{ Word character...
+ case WORD_CHAR:
+ // stop at next last upper case char if camel cased
+ // (don't stop at every upper case char, don't treat noWordSep as word chars)
+ if (camelCasedWords && i > pos + 1 && !Character.isUpperCase(ch) && Character.isLetterOrDigit(ch)
+ && Character.isUpperCase(lastCh))
+ {
+ return i - 1;
+ }
+ // stop at next first upper case char if camel caseg (don't stop at every upper case char)
+ else if (camelCasedWords && Character.isUpperCase(ch) && !Character.isUpperCase(lastCh))
+ {
+ return i;
+ }
+ else if(Character.isLetterOrDigit(ch) ||
+ noWordSep.indexOf(ch) != -1)
+ {
+ break;
+ }
+ // whitespace; include in word if eating
+ else if(Character.isWhitespace(ch)
+ && eatWhitespace)
+ {
+ type = WHITESPACE;
+ break;
+ }
+ else
+ return i; //}}}
+ //{{{ Symbol...
+ case SYMBOL:
+ if(!joinNonWordChars && i != pos)
+ return i;
+
+ // if we see whitespace, set flag.
+ if(Character.isWhitespace(ch))
+ {
+ if(eatWhitespace)
+ {
+ type = WHITESPACE;
+ break;
+ }
+ else
+ return i;
+ }
+ else if(Character.isLetterOrDigit(ch) ||
+ noWordSep.indexOf(ch) != -1)
+ {
+ return i;
+ }
+ else
+ {
+ break;
+ } //}}}
+ }
+ }
+
+ return line.length();
+ } //}}}
+
+ //{{{ getCharType() method
+ /**
+ * Returns the type of the char.
+ *
+ * @param ch the character
+ * @param noWordSep Characters that are non-alphanumeric, but
+ * should be treated as word characters anyway, it must not be null
+ * @return the type of the char : {@link #WHITESPACE},
+ * {@link #WORD_CHAR}, {@link #SYMBOL}
+ * @since jEdit 4.4pre1
+ */
+ public static int getCharType(char ch, String noWordSep)
+ {
+ int type;
+ if(Character.isWhitespace(ch))
+ type = WHITESPACE;
+ else if(Character.isLetterOrDigit(ch)
+ || noWordSep.indexOf(ch) != -1)
+ type = WORD_CHAR;
+ else
+ type = SYMBOL;
+ return type;
+ } //}}}
+
+
+ //{{{ spacesToTabs() method
+ /**
+ * Converts consecutive spaces to tabs in the specified string.
+ * @param in The string
+ * @param tabSize The tab size
+ */
+ public static String spacesToTabs(String in, int tabSize)
+ {
+ StringBuilder buf = new StringBuilder();
+ int width = 0;
+ int whitespace = 0;
+ for(int i = 0; i < in.length(); i++)
+ {
+ switch(in.charAt(i))
+ {
+ case ' ':
+ whitespace++;
+ width++;
+ break;
+ case '\t':
+ int tab = tabSize - (width % tabSize);
+ width += tab;
+ whitespace += tab;
+ break;
+ case '\n':
+ if(whitespace != 0)
+ {
+ buf.append(StandardUtilities
+ .createWhiteSpace(whitespace,tabSize,
+ width - whitespace));
+ }
+ whitespace = 0;
+ width = 0;
+ buf.append('\n');
+ break;
+ default:
+ if(whitespace != 0)
+ {
+ buf.append(StandardUtilities
+ .createWhiteSpace(whitespace,tabSize,
+ width - whitespace));
+ whitespace = 0;
+ }
+ buf.append(in.charAt(i));
+ width++;
+ break;
+ }
+ }
+
+ if(whitespace != 0)
+ {
+ buf.append(StandardUtilities.createWhiteSpace(whitespace,tabSize,
+ width - whitespace));
+ }
+
+ return buf.toString();
+ } //}}}
+
+ //{{{ tabsToSpaces() method
+ /**
+ * Converts tabs to consecutive spaces in the specified string.
+ * @param in The string
+ * @param tabSize The tab size
+ */
+ public static String tabsToSpaces(String in, int tabSize)
+ {
+ StringBuilder buf = new StringBuilder();
+ int width = 0;
+ for(int i = 0; i < in.length(); i++)
+ {
+ switch(in.charAt(i))
+ {
+ case '\t':
+ int count = tabSize - (width % tabSize);
+ width += count;
+ while(--count >= 0)
+ buf.append(' ');
+ break;
+ case '\n':
+ width = 0;
+ buf.append(in.charAt(i));
+ break;
+ default:
+ width++;
+ buf.append(in.charAt(i));
+ break;
+ }
+ }
+ return buf.toString();
+ } //}}}
+
+ //{{{ format() method
+ /**
+ * Formats the specified text by merging and breaking lines to the
+ * specified width.
+ * @param text The text
+ * @param maxLineLength The maximum line length
+ * @param tabSize The tab size
+ */
+ public static String format(String text, int maxLineLength, int tabSize)
+ {
+ StringBuilder buf = new StringBuilder();
+
+ int index = 0;
+
+ for(;;)
+ {
+ int newIndex = text.indexOf("\n\n",index);
+ if(newIndex == -1)
+ break;
+
+ formatParagraph(text.substring(index,newIndex),
+ maxLineLength,tabSize,buf);
+ buf.append("\n\n");
+ index = newIndex + 2;
+ }
+
+ if(index != text.length())
+ {
+ formatParagraph(text.substring(index),
+ maxLineLength,tabSize,buf);
+ }
+
+ return buf.toString();
+ } //}}}
+
+ //{{{ indexIgnoringWhitespace() method
+ /**
+ * Inverse of <code>ignoringWhitespaceIndex()</code>.
+ * @param str a string (not an empty string)
+ * @param index The index
+ * @return The number of non-whitespace characters that precede the index.
+ * @since jEdit 4.3pre2
+ */
+ public static int indexIgnoringWhitespace(String str, int index)
+ {
+ int j = 0;
+ for(int i = 0; i < index; i++)
+ if(!Character.isWhitespace(str.charAt(i))) j++;
+ return j;
+ } //}}}
+
+ //{{{ ignoringWhitespaceIndex() method
+ /**
+ * Inverse of <code>indexIgnoringWhitespace()</code>.
+ * @param str a string (not an empty string)
+ * @param index The index
+ * @return The index into the string where the number of non-whitespace
+ * characters that precede the index is count.
+ * @since jEdit 4.3pre2
+ */
+ public static int ignoringWhitespaceIndex(String str, int index)
+ {
+ int j = 0;
+ for(int i = 0;;i++)
+ {
+ if(!Character.isWhitespace(str.charAt(i))) j++;
+
+ if(j > index)
+ return i;
+ if(i == str.length() - 1)
+ return i + 1;
+ }
+ } //}}}
+
+ //{{{ getStringCase() methods
+ public static final int MIXED = 0;
+ public static final int LOWER_CASE = 1;
+ public static final int UPPER_CASE = 2;
+ public static final int TITLE_CASE = 3;
+
+ /**
+ * Returns if the specified string is all upper case, all lower case,
+ * or title case (first letter upper case, rest lower case).
+ * @param str The string
+ * @since jEdit 4.4pre1
+ */
+ public static int getStringCase(CharSequence str)
+ {
+ if(str.length() == 0)
+ return MIXED;
+
+ int state = -1;
+
+ char ch = str.charAt(0);
+ if(Character.isLetter(ch))
+ {
+ if(Character.isUpperCase(ch))
+ state = UPPER_CASE;
+ else
+ state = LOWER_CASE;
+ }
+
+ for(int i = 1; i < str.length(); i++)
+ {
+ ch = str.charAt(i);
+ if(!Character.isLetter(ch))
+ continue;
+
+ switch(state)
+ {
+ case UPPER_CASE:
+ if(Character.isLowerCase(ch))
+ {
+ if(i == 1)
+ state = TITLE_CASE;
+ else
+ return MIXED;
+ }
+ break;
+ case LOWER_CASE:
+ case TITLE_CASE:
+ if(Character.isUpperCase(ch))
+ return MIXED;
+ break;
+ }
+ }
+
+ return state;
+ }
+
+ /**
+ * Returns if the specified string is all upper case, all lower case,
+ * or title case (first letter upper case, rest lower case).
+ * @param str The string
+ * @since jEdit 4.0pre1
+ */
+ public static int getStringCase(String str)
+ {
+ return getStringCase((CharSequence) str);
+ } //}}}
+
+ //{{{ toTitleCase() method
+ /**
+ * Converts the specified string to title case, by capitalizing the
+ * first letter.
+ * @param str The string
+ * @since jEdit 4.0pre1
+ */
+ public static String toTitleCase(String str)
+ {
+ if(str.length() == 0)
+ return str;
+ else
+ {
+ return Character.toUpperCase(str.charAt(0))
+ + str.substring(1).toLowerCase();
+ }
+ } //}}}
+
+ //{{{ Private members
+ //{{{ formatParagraph() method
+ private static void formatParagraph(String text, int maxLineLength,
+ int tabSize, StringBuilder buf)
+ {
+ // align everything to paragraph's leading indent
+ int leadingWhitespaceCount = StandardUtilities.getLeadingWhiteSpace(text);
+ String leadingWhitespace = text.substring(0,leadingWhitespaceCount);
+ int leadingWhitespaceWidth = StandardUtilities.getLeadingWhiteSpaceWidth(text,tabSize);
+
+ buf.append(leadingWhitespace);
+
+ int lineLength = leadingWhitespaceWidth;
+ StringTokenizer st = new StringTokenizer(text);
+ while(st.hasMoreTokens())
+ {
+ String word = st.nextToken();
+ if(lineLength == leadingWhitespaceWidth)
+ {
+ // do nothing
+ }
+ else if(lineLength + word.length() + 1 > maxLineLength)
+ {
+ buf.append('\n');
+ buf.append(leadingWhitespace);
+ lineLength = leadingWhitespaceWidth;
+ }
+ else
+ {
+ buf.append(' ');
+ lineLength++;
+ }
+ buf.append(word);
+ lineLength += word.length();
+ }
+ } //}}}
+
+ //{{{ indexIgnoringWhitespace() method
+ public static void indexIgnoringWhitespace(String text, int maxLineLength,
+ int tabSize, StringBuffer buf)
+ {
+ // align everything to paragraph's leading indent
+ int leadingWhitespaceCount = StandardUtilities.getLeadingWhiteSpace(text);
+ String leadingWhitespace = text.substring(0,leadingWhitespaceCount);
+ int leadingWhitespaceWidth = StandardUtilities.getLeadingWhiteSpaceWidth(text,tabSize);
+
+ buf.append(leadingWhitespace);
+
+ int lineLength = leadingWhitespaceWidth;
+ StringTokenizer st = new StringTokenizer(text);
+ while(st.hasMoreTokens())
+ {
+ String word = st.nextToken();
+ if(lineLength == leadingWhitespaceWidth)
+ {
+ // do nothing
+ }
+ else if(lineLength + word.length() + 1 > maxLineLength)
+ {
+ buf.append('\n');
+ buf.append(leadingWhitespace);
+ lineLength = leadingWhitespaceWidth;
+ }
+ else
+ {
+ buf.append(' ');
+ lineLength++;
+ }
+ buf.append(word);
+ lineLength += word.length();
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/View.java b/jEdit/org/gjt/sp/jedit/View.java
index 206538e..ffd3317 100644
--- a/jEdit/org/gjt/sp/jedit/View.java
+++ b/jEdit/org/gjt/sp/jedit/View.java
@@ -1,2302 +1,2327 @@
-/*
- * View.java - jEdit view
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import java.awt.AWTEvent;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Cursor;
-import java.awt.Dimension;
-import java.awt.Frame;
-import java.awt.GraphicsConfiguration;
-import java.awt.GraphicsDevice;
-import java.awt.GraphicsEnvironment;
-import java.awt.Rectangle;
-import java.awt.event.FocusAdapter;
-import java.awt.event.FocusEvent;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.io.IOException;
-import java.io.StreamTokenizer;
-import java.io.StringReader;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Stack;
-
-import javax.swing.JComponent;
-import javax.swing.JFrame;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JMenuItem;
-import javax.swing.JPanel;
-import javax.swing.JSplitPane;
-import javax.swing.LayoutFocusTraversalPolicy;
-import javax.swing.SwingUtilities;
-import javax.swing.event.CaretEvent;
-import javax.swing.event.CaretListener;
-
-import org.gjt.sp.jedit.bufferset.BufferSet;
-import org.gjt.sp.jedit.bufferset.BufferSetManager;
-import org.gjt.sp.jedit.gui.ActionBar;
-import org.gjt.sp.jedit.gui.CloseDialog;
-import org.gjt.sp.jedit.gui.DefaultInputHandler;
-import org.gjt.sp.jedit.gui.DockableWindowFactory;
-import org.gjt.sp.jedit.gui.DockableWindowManager;
-import org.gjt.sp.jedit.gui.HistoryModel;
-import org.gjt.sp.jedit.gui.DockingFrameworkProvider;
-import org.gjt.sp.jedit.gui.InputHandler;
-import org.gjt.sp.jedit.gui.StatusBar;
-import org.gjt.sp.jedit.gui.ToolBarManager;
-import org.gjt.sp.jedit.gui.VariableGridLayout;
-import org.gjt.sp.jedit.gui.DockableWindowManager.DockingLayout;
-import org.gjt.sp.jedit.input.InputHandlerProvider;
-import org.gjt.sp.jedit.msg.BufferUpdate;
-import org.gjt.sp.jedit.msg.EditPaneUpdate;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-import org.gjt.sp.jedit.msg.SearchSettingsChanged;
-import org.gjt.sp.jedit.msg.ViewUpdate;
-import org.gjt.sp.jedit.options.GeneralOptionPane;
-import org.gjt.sp.jedit.search.CurrentBufferSet;
-import org.gjt.sp.jedit.search.SearchAndReplace;
-import org.gjt.sp.jedit.search.SearchBar;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-import org.gjt.sp.jedit.textarea.ScrollListener;
-import org.gjt.sp.jedit.textarea.TextArea;
-import org.gjt.sp.jedit.visitors.JEditVisitor;
-import org.gjt.sp.jedit.visitors.JEditVisitorAdapter;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * A <code>View</code> is jEdit's top-level frame window.<p>
- *
- * In a BeanShell script, you can obtain the current view instance from the
- * <code>view</code> variable.<p>
- *
- * The largest component it contains is an {@link EditPane} that in turn
- * contains a {@link org.gjt.sp.jedit.textarea.JEditTextArea} that displays a
- * {@link Buffer}.
- * A view can have more than one edit pane in a split window configuration.
- * A view also contains a menu bar, an optional toolbar and other window
- * decorations, as well as docked windows.<p>
- *
- * The <b>View</b> class performs two important operations
- * dealing with plugins: creating plugin menu items, and managing dockable
- * windows.
- *
- * <ul>
- * <li>When a view is being created, its initialization routine
- * iterates through the collection of loaded plugins and constructs the
- * <b>Plugins</b> menu using the properties as specified in the
- * {@link EditPlugin} class.</li>
- * <li>The view also creates and initializes a
- * {@link org.gjt.sp.jedit.gui.DockableWindowManager}
- * object. This object is
- * responsible for creating, closing and managing dockable windows.</li>
- * </ul>
- *
- * This class does not have a public constructor.
- * Views can be opened and closed using methods in the <code>jEdit</code>
- * class.
- *
- * @see org.gjt.sp.jedit.jEdit#newView(View)
- * @see org.gjt.sp.jedit.jEdit#newView(View,Buffer)
- * @see org.gjt.sp.jedit.jEdit#newView(View,Buffer,boolean)
- * @see org.gjt.sp.jedit.jEdit#closeView(View)
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: View.java 16772 2009-12-29 15:41:55Z k_satoda $
- */
-public class View extends JFrame implements EBComponent, InputHandlerProvider
-{
- //{{{ User interface
-
- //{{{ ToolBar-related constants
-
- public static final String VIEW_DOCKING_FRAMEWORK_PROPERTY = "view.docking.framework";
- private static final String ORIGINAL_DOCKING_FRAMEWORK = "Original";
- public static final String DOCKING_FRAMEWORK_PROVIDER_SERVICE =
- "org.gjt.sp.jedit.gui.DockingFrameworkProvider";
- private static DockingFrameworkProvider dockingFrameworkProvider;
-
- //{{{ Groups
- /**
- * The group of tool bars above the DockableWindowManager
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int TOP_GROUP = 0;
-
- /**
- * The group of tool bars below the DockableWindowManager
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int BOTTOM_GROUP = 1;
- public static final int DEFAULT_GROUP = TOP_GROUP;
- //}}}
-
- //{{{ Layers
-
- // Common layers
- /**
- * The highest possible layer.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int TOP_LAYER = Integer.MAX_VALUE;
-
- /**
- * The default layer for tool bars with no preference.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int DEFAULT_LAYER = 0;
-
- /**
- * The lowest possible layer.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int BOTTOM_LAYER = Integer.MIN_VALUE;
-
- // Layers for top group
- /**
- * Above system tool bar layer.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int ABOVE_SYSTEM_BAR_LAYER = 150;
-
- /**
- * System tool bar layer.
- * jEdit uses this for the main tool bar.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int SYSTEM_BAR_LAYER = 100;
-
- /**
- * Below system tool bar layer.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int BELOW_SYSTEM_BAR_LAYER = 75;
-
- /**
- * Search bar layer.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int SEARCH_BAR_LAYER = 75;
-
- /**
- * Below search bar layer.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.0pre7
- */
- public static final int BELOW_SEARCH_BAR_LAYER = 50;
-
- // Layers for bottom group
- /**
- * @deprecated Status bar no longer added as a tool bar.
- */
- @Deprecated
- public static final int ABOVE_ACTION_BAR_LAYER = -50;
-
- /**
- * Action bar layer.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.2pre1
- */
- public static final int ACTION_BAR_LAYER = -75;
-
- /**
- * Status bar layer.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.2pre1
- */
- public static final int STATUS_BAR_LAYER = -100;
-
- /**
- * Status bar layer.
- * @see #addToolBar(int,int,java.awt.Component)
- * @since jEdit 4.2pre1
- */
- public static final int BELOW_STATUS_BAR_LAYER = -150;
- //}}}
-
- //}}}
-
- //{{{ getDockableWindowManager() method
- /**
- * Returns the dockable window manager associated with this view.
- * @since jEdit 2.6pre3
- */
- public DockableWindowManager getDockableWindowManager()
- {
- return dockableWindowManager;
- } //}}}
-
- //{{{ getDockingFrameworkName() method
- public static String getDockingFrameworkName()
- {
- String framework = jEdit.getProperty(
- VIEW_DOCKING_FRAMEWORK_PROPERTY, ORIGINAL_DOCKING_FRAMEWORK);
- return framework;
- } //}}}
-
- //{{{ getDockingFrameworkProvider() method
- public static DockingFrameworkProvider getDockingFrameworkProvider()
- {
- if (dockingFrameworkProvider == null)
- {
- String framework = getDockingFrameworkName();
- dockingFrameworkProvider = (DockingFrameworkProvider)
- ServiceManager.getService(
- DOCKING_FRAMEWORK_PROVIDER_SERVICE, framework);
-
- if (dockingFrameworkProvider == null)
- {
- Log.log(Log.ERROR, View.class, "No docking framework " + framework +
- " available, using the original one");
- dockingFrameworkProvider = (DockingFrameworkProvider)
- ServiceManager.getService(
- DOCKING_FRAMEWORK_PROVIDER_SERVICE, ORIGINAL_DOCKING_FRAMEWORK);
- }
- }
- return dockingFrameworkProvider;
- } //}}}
-
- //{{{ getToolBar() method
- /**
- * Returns the view's tool bar.
- * @since jEdit 4.2pre1
- */
- public Container getToolBar()
- {
- return toolBar;
- } //}}}
-
- //{{{ addToolBar() method
- /**
- * Adds a tool bar to this view.
- * @param toolBar The tool bar
- */
- public void addToolBar(Component toolBar)
- {
- addToolBar(DEFAULT_GROUP, DEFAULT_LAYER, toolBar);
- } //}}}
-
- //{{{ addToolBar() method
- /**
- * Adds a tool bar to this view.
- * @param group The tool bar group to add to
- * @param toolBar The tool bar
- * @see org.gjt.sp.jedit.gui.ToolBarManager
- * @since jEdit 4.0pre7
- */
- public void addToolBar(int group, Component toolBar)
- {
- addToolBar(group, DEFAULT_LAYER, toolBar);
- } //}}}
-
- //{{{ addToolBar() method
- /**
- * Adds a tool bar to this view.
- * @param group The tool bar group to add to
- * @param layer The layer of the group to add to
- * @param toolBar The tool bar
- * @see org.gjt.sp.jedit.gui.ToolBarManager
- * @since jEdit 4.0pre7
- */
- public void addToolBar(int group, int layer, Component toolBar)
- {
- toolBarManager.addToolBar(group, layer, toolBar);
- getRootPane().revalidate();
- } //}}}
-
- //{{{ removeToolBar() method
- /**
- * Removes a tool bar from this view.
- * @param toolBar The tool bar
- */
- public void removeToolBar(Component toolBar)
- {
- if (toolBarManager == null) return;
- if (toolBar == null) return;
- toolBarManager.removeToolBar(toolBar);
- getRootPane().revalidate();
- } //}}}
-
- //{{{ showWaitCursor() method
- /**
- * Shows the wait cursor. This method and
- * {@link #hideWaitCursor()} are implemented using a reference
- * count of requests for wait cursors, so that nested calls work
- * correctly; however, you should be careful to use these methods in
- * tandem.<p>
- *
- * To ensure that {@link #hideWaitCursor()} is always called
- * after a {@link #showWaitCursor()}, use a
- * <code>try</code>/<code>finally</code> block, like this:
- * <pre>try
- *{
- * view.showWaitCursor();
- * // ...
- *}
- *finally
- *{
- * view.hideWaitCursor();
- *}</pre>
- */
- public synchronized void showWaitCursor()
- {
- if(waitCount++ == 0)
- {
- Cursor cursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
- setCursor(cursor);
- visit(new SetCursorVisitor(cursor));
- }
- } //}}}
-
- //{{{ hideWaitCursor() method
- /**
- * Hides the wait cursor.
- */
- public synchronized void hideWaitCursor()
- {
- if(waitCount > 0)
- waitCount--;
-
- if(waitCount == 0)
- {
- // still needed even though glass pane
- // has a wait cursor
- Cursor cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
- setCursor(cursor);
-
- visit(new SetCursorVisitor(cursor));
- }
- } //}}}
-
- //{{{ getSearchBar() method
- /**
- * Returns the search bar.
- * @since jEdit 2.4pre4
- */
- public final SearchBar getSearchBar()
- {
- return searchBar;
- } //}}}
-
- //{{{ getActionBar() method
- /**
- * Returns the action bar.
- * @since jEdit 4.2pre3
- */
- public final ActionBar getActionBar()
- {
- return actionBar;
- } //}}}
-
- //{{{ getStatus() method
- /**
- * Returns the status bar. The
- * {@link org.gjt.sp.jedit.gui.StatusBar#setMessage(String)} and
- * {@link org.gjt.sp.jedit.gui.StatusBar#setMessageAndClear(String)} methods can
- * be called on the return value of this method to display status
- * information to the user.
- * @since jEdit 3.2pre2
- */
- public StatusBar getStatus()
- {
- return status;
- } //}}}
-
- //{{{ quickIncrementalSearch() method
- /**
- * Quick search.
- * @since jEdit 4.0pre3
- */
- public void quickIncrementalSearch(boolean word)
- {
- if(searchBar == null)
- searchBar = new SearchBar(this,true);
- if(searchBar.getParent() == null)
- addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);
-
- searchBar.setHyperSearch(false);
-
- JEditTextArea textArea = getTextArea();
-
- if(word)
- {
- String text = textArea.getSelectedText();
- if(text == null)
- {
- textArea.selectWord();
- text = textArea.getSelectedText();
- }
- else if(text.indexOf('\n') != -1)
- text = null;
-
- if(text != null && SearchAndReplace.getRegexp())
- text = SearchAndReplace.escapeRegexp(text,false);
-
- searchBar.getField().setText(text);
- }
-
- searchBar.getField().requestFocus();
- searchBar.getField().selectAll();
- } //}}}
-
- //{{{ quickHyperSearch() method
- /**
- * Quick HyperSearch.
- * @since jEdit 4.0pre3
- */
- public void quickHyperSearch(boolean word)
- {
- JEditTextArea textArea = getTextArea();
-
- if(word)
- {
- String text = textArea.getSelectedText();
- if(text == null)
- {
- textArea.selectWord();
- text = textArea.getSelectedText();
- }
-
- if(text != null && text.indexOf('\n') == -1)
- {
- if(SearchAndReplace.getRegexp())
- {
- text = SearchAndReplace.escapeRegexp(
- text,false);
- }
-
- HistoryModel.getModel("find").addItem(text);
- SearchAndReplace.setSearchString(text);
- SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
- SearchAndReplace.hyperSearch(this);
-
- return;
- }
- }
-
- if(searchBar == null)
- searchBar = new SearchBar(this,true);
- if(searchBar.getParent() == null)
- addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);
-
- searchBar.setHyperSearch(true);
- searchBar.getField().setText(null);
- searchBar.getField().requestFocus();
- searchBar.getField().selectAll();
- } //}}}
-
- //{{{ actionBar() method
- /**
- * Shows the action bar if needed, and sends keyboard focus there.
- * @since jEdit 4.2pre1
- */
- public void actionBar()
- {
- if(actionBar == null)
- actionBar = new ActionBar(this,true);
- if(actionBar.getParent() == null)
- addToolBar(BOTTOM_GROUP,ACTION_BAR_LAYER,actionBar);
-
- actionBar.goToActionBar();
- } //}}}
-
- //}}}
-
- //{{{ Input handling
-
- //{{{ getKeyEventInterceptor() method
- /**
- * Returns the listener that will handle all key events in this
- * view, if any.
- * @return the key event interceptor or null
- */
- public KeyListener getKeyEventInterceptor()
- {
- return inputHandler.getKeyEventInterceptor();
- } //}}}
-
- //{{{ setKeyEventInterceptor() method
- /**
- * Sets the listener that will handle all key events in this
- * view. For example, the complete word command uses this so
- * that all key events are passed to the word list popup while
- * it is visible.
- * @param listener The key event interceptor.
- */
- public void setKeyEventInterceptor(KeyListener listener)
- {
- inputHandler.setKeyEventInterceptor(listener);
- } //}}}
-
- //{{{ getInputHandler() method
- /**
- * Returns the input handler.
- */
- public InputHandler getInputHandler()
- {
- return inputHandler;
- } //}}}
-
-
-
- //{{{ setInputHandler() method
- /**
- * Sets the input handler.
- * @param inputHandler The new input handler
- */
- public void setInputHandler(InputHandler inputHandler)
- {
- this.inputHandler = inputHandler;
- } //}}}
-
- //{{{ getMacroRecorder() method
- /**
- * Returns the macro recorder.
- */
- public Macros.Recorder getMacroRecorder()
- {
- return recorder;
- } //}}}
-
- //{{{ setMacroRecorder() method
- /**
- * Sets the macro recorder.
- * @param recorder The macro recorder
- */
- public void setMacroRecorder(Macros.Recorder recorder)
- {
- this.recorder = recorder;
- } //}}}
-
- //{{{ processKeyEvent() method
- /**
- * Forwards key events directly to the input handler.
- * This is slightly faster than using a KeyListener
- * because some Swing overhead is avoided.
- */
- @Override
- public void processKeyEvent(KeyEvent evt)
- {
- inputHandler.processKeyEvent(evt,VIEW, false);
- if(!evt.isConsumed())
- super.processKeyEvent(evt);
- } //}}}
-
- //{{{ processKeyEvent() method
- /**
- * Forwards key events directly to the input handler.
- * This is slightly faster than using a KeyListener
- * because some Swing overhead is avoided.
- */
- public void processKeyEvent(KeyEvent evt, boolean calledFromTextArea)
- {
- processKeyEvent(evt,calledFromTextArea
- ? TEXT_AREA
- : VIEW);
- } //}}}
-
- //{{{ processKeyEvent() method
- public static final int VIEW = 0;
- public static final int TEXT_AREA = 1;
- public static final int ACTION_BAR = 2;
- /**
- * Forwards key events directly to the input handler.
- * This is slightly faster than using a KeyListener
- * because some Swing overhead is avoided.
- */
- public void processKeyEvent(KeyEvent evt, int from)
- {
- processKeyEvent(evt,from,false);
- }
- /**
- * Forwards key events directly to the input handler.
- * This is slightly faster than using a KeyListener
- * because some Swing overhead is avoided.
- * @deprecated do not use, try {@link org.gjt.sp.jedit.gui.InputHandler#processKeyEvent(java.awt.event.KeyEvent, int, boolean)}
- */
- @Deprecated
- public void processKeyEvent(KeyEvent evt, int from, boolean global)
- {
- inputHandler.processKeyEvent(evt, from, global);
- if(!evt.isConsumed())
- super.processKeyEvent(evt);
- } //}}}
-
-
- //}}}
-
- //{{{ Buffers, edit panes, split panes
-
- //{{{ splitHorizontally() method
- /**
- * Splits the view horizontally.
- * @return the new editPane
- * @since jEdit 4.1pre2
- */
- public EditPane splitHorizontally()
- {
- return split(JSplitPane.VERTICAL_SPLIT);
- } //}}}
-
- //{{{ splitVertically() method
- /**
- * Splits the view vertically.
- * @return the new editPane
- * @since jEdit 4.1pre2
- */
- public EditPane splitVertically()
- {
- return split(JSplitPane.HORIZONTAL_SPLIT);
- } //}}}
-
- //{{{ split() method
- /**
- * Splits the view.
- * @param orientation the orientation {@link javax.swing.JSplitPane#HORIZONTAL_SPLIT} or
- * {@link javax.swing.JSplitPane#VERTICAL_SPLIT}
- * @return the new editPane
- * @since jEdit 4.1pre2
- */
- public EditPane split(int orientation)
- {
- PerspectiveManager.setPerspectiveDirty(true);
-
- editPane.saveCaretInfo();
- EditPane oldEditPane = editPane;
- String action = jEdit.getProperty("editpane.bufferset.new");
- BufferSetManager.NewBufferSetAction bufferSetAction = BufferSetManager.NewBufferSetAction.fromString(action);
- EditPane newEditPane;
- if (bufferSetAction == BufferSetManager.NewBufferSetAction.empty)
- newEditPane = createEditPane(null);
- else
- newEditPane = createEditPane(oldEditPane.getBuffer());
-// setEditPane(newEditPane);
- newEditPane.loadCaretInfo();
-
- JComponent oldParent = (JComponent)oldEditPane.getParent();
-
- final JSplitPane newSplitPane = new JSplitPane(orientation,
- jEdit.getBooleanProperty("appearance.continuousLayout"));
- newSplitPane.setOneTouchExpandable(true);
- newSplitPane.setBorder(null);
- newSplitPane.setMinimumSize(new Dimension(0,0));
- newSplitPane.setResizeWeight(0.5);
-
- int parentSize = orientation == JSplitPane.VERTICAL_SPLIT
- ? oldEditPane.getHeight() : oldEditPane.getWidth();
- final int dividerPosition = (int)((parentSize
- - newSplitPane.getDividerSize()) * 0.5);
- newSplitPane.setDividerLocation(dividerPosition);
-
- if(oldParent instanceof JSplitPane)
- {
- JSplitPane oldSplitPane = (JSplitPane)oldParent;
- int dividerPos = oldSplitPane.getDividerLocation();
-
- Component left = oldSplitPane.getLeftComponent();
-
- if(left == oldEditPane)
- oldSplitPane.setLeftComponent(newSplitPane);
- else
- oldSplitPane.setRightComponent(newSplitPane);
-
- newSplitPane.setLeftComponent(oldEditPane);
- newSplitPane.setRightComponent(newEditPane);
-
- oldSplitPane.setDividerLocation(dividerPos);
- }
- else
- {
- splitPane = newSplitPane;
-
- newSplitPane.setLeftComponent(oldEditPane);
- newSplitPane.setRightComponent(newEditPane);
-
- setMainContent(newSplitPane);
-
- }
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- newSplitPane.setDividerLocation(dividerPosition);
- }
- });
-
- newEditPane.focusOnTextArea();
-
- return newEditPane;
- } //}}}
-
- //{{{ unsplit() method
- /**
- * Unsplits the view.
- * @since jEdit 2.3pre2
- */
- public void unsplit()
- {
- if(splitPane != null)
- {
- lastSplitConfig = getSplitConfig();
-
- PerspectiveManager.setPerspectiveDirty(true);
-
- for(EditPane _editPane: getEditPanes())
- {
- if(editPane != _editPane)
- {
- mergeBufferSets(editPane, _editPane);
- _editPane.close();
- }
- }
-
- setMainContent(editPane);
-
- splitPane = null;
- updateTitle();
-
- editPane.focusOnTextArea();
- }
- else
- getToolkit().beep();
- } //}}}
-
- //{{{ unsplitCurrent() method
- /**
- * Removes the current split.
- * @since jEdit 2.3pre2
- */
- public void unsplitCurrent()
- {
- if(splitPane != null)
- {
- lastSplitConfig = getSplitConfig();
-
- PerspectiveManager.setPerspectiveDirty(true);
-
- // find first split pane parenting current edit pane
- Component comp = editPane;
- while(!(comp instanceof JSplitPane) && comp != null)
- {
- comp = comp.getParent();
- }
-
- // get rid of any edit pane that is a child
- // of the current edit pane's parent splitter
- for(EditPane _editPane: getEditPanes())
- {
- if(GUIUtilities.isAncestorOf(comp,_editPane)
- && _editPane != editPane)
- {
- mergeBufferSets(editPane, _editPane);
- _editPane.close();
- }
- }
-
- JComponent parent = comp == null ? null : (JComponent)comp.getParent();
-
- if(parent instanceof JSplitPane)
- {
- JSplitPane parentSplit = (JSplitPane)parent;
- int pos = parentSplit.getDividerLocation();
- if(parentSplit.getLeftComponent() == comp)
- parentSplit.setLeftComponent(editPane);
- else
- parentSplit.setRightComponent(editPane);
- parentSplit.setDividerLocation(pos);
- parent.revalidate();
- }
- else
- {
- setMainContent(editPane);
- splitPane = null;
- }
-
- updateTitle();
-
- editPane.focusOnTextArea();
- }
- else
- getToolkit().beep();
- } //}}}
-
- //{{{ resplit() method
- /**
- * Restore the split configuration as it was before unsplitting.
- *
- * @since jEdit 4.3pre1
- */
- public void resplit()
- {
- if(lastSplitConfig == null)
- getToolkit().beep();
- else
- setSplitConfig(null,lastSplitConfig);
- } //}}}
-
- //{{{ getSplitConfig() method
- /**
- * Split configurations are recorded in a simple RPN "language".
- * @return The split configuration, describing where splitpanes
- * are, which buffers are open in each EditPane, etc.
- *
- */
- public String getSplitConfig()
- {
- StringBuilder splitConfig = new StringBuilder();
-
- if(splitPane != null)
- getSplitConfig(splitPane,splitConfig);
- else
- {
- appendToSplitConfig(splitConfig, editPane);
- }
-
- return splitConfig.toString();
- } //}}}
-
- //{{{ setSplitConfig() method
- /**
- * sets the split configuration as per the splitConfig.
- *
- * @param buffer if null, checks all buffers to restore View's split config.
- * @param splitConfig the split config, as returned by getSplitConfig()
- */
- public void setSplitConfig(Buffer buffer, String splitConfig)
- {
- try
- {
- Component comp = restoreSplitConfig(buffer,splitConfig);
- setMainContent(comp);
- }
- catch(IOException e)
- {
- // this should never throw an exception.
- throw new InternalError();
- }
- } //}}}
-
- //{{{ nextTextArea() method
- /**
- * Moves keyboard focus to the next text area.
- * @since jEdit 2.7pre4
- */
- public void nextTextArea()
- {
- EditPane[] editPanes = getEditPanes();
- for(int i = 0; i < editPanes.length; i++)
- {
- if(editPane == editPanes[i])
- {
- if(i == editPanes.length - 1)
- editPanes[0].focusOnTextArea();
- else
- editPanes[i+1].focusOnTextArea();
- break;
- }
- }
- } //}}}
-
- //{{{ prevTextArea() method
- /**
- * Moves keyboard focus to the previous text area.
- * @since jEdit 2.7pre4
- */
- public void prevTextArea()
- {
- EditPane[] editPanes = getEditPanes();
- for(int i = 0; i < editPanes.length; i++)
- {
- if(editPane == editPanes[i])
- {
- if(i == 0)
- editPanes[editPanes.length - 1].focusOnTextArea();
- else
- editPanes[i-1].focusOnTextArea();
- break;
- }
- }
- } //}}}
-
- //{{{ getSplitPane() method
- /**
- * Returns the top-level split pane, if any.
- * @return the top JSplitPane if any.
- * @since jEdit 2.3pre2
- */
- public JSplitPane getSplitPane()
- {
- return splitPane;
- } //}}}
-
- //{{{ getBuffer() method
- /**
- * Returns the current edit pane's buffer.
- * @return the current edit pane's buffer, it can be null
- */
- public Buffer getBuffer()
- {
- if(editPane == null)
- return null;
- else
- return editPane.getBuffer();
- } //}}}
-
- //{{{ setBuffer() method
- /**
- * Sets the current edit pane's buffer.
- * @param buffer The buffer
- */
- public void setBuffer(Buffer buffer)
- {
- setBuffer(buffer,false);
- } //}}}
-
- //{{{ setBuffer() method
- /**
- * Sets the current edit pane's buffer.
- * @param buffer The buffer
- * @param disableFileStatusCheck Disables file status checking
- * regardless of the state of the checkFileStatus property
- */
- public void setBuffer(Buffer buffer, boolean disableFileStatusCheck)
- {
- setBuffer(buffer, disableFileStatusCheck, true);
- } //}}}
-
- //{{{ setBuffer() method
- /**
- * Sets the current edit pane's buffer.
- * @param buffer The buffer
- * @param disableFileStatusCheck Disables file status checking
- * regardless of the state of the checkFileStatus property
- * @param focus Whether the textarea should request focus
- * @since jEdit 4.3pre13
- */
- public void setBuffer(Buffer buffer, boolean disableFileStatusCheck, boolean focus)
- {
- editPane.setBuffer(buffer, focus);
- int check = jEdit.getIntegerProperty("checkFileStatus");
- if(!disableFileStatusCheck && (check == GeneralOptionPane.checkFileStatus_all ||
- check == GeneralOptionPane.checkFileStatus_operations ||
- check == GeneralOptionPane.checkFileStatus_focusBuffer))
- jEdit.checkBufferStatus(this, true);
- } //}}}
-
- //{{{ goToBuffer() method
- /**
- * If this buffer is open in one of the view's edit panes, sets focus
- * to that edit pane. Otherwise, opens the buffer in the currently
- * active edit pane.
- * @param buffer The buffer
- * @return the current edit pane
- * @since jEdit 4.2pre1
- */
- public EditPane goToBuffer(Buffer buffer)
- {
- return showBuffer(buffer, true);
- } //}}}
-
- //{{{ showBuffer() method
- /**
- * If this buffer is open in one of the view's edit panes, activates
- * that edit pane. Otherwise, opens the buffer in the currently
- * active edit pane. But the focus is not moved.
- * @param buffer The buffer to show
- * @return the current edit pane
- * @since jEdit 4.3pre13
- */
- public EditPane showBuffer(Buffer buffer)
- {
- return showBuffer(buffer, false);
- } //}}}
-
- //{{{ getTextArea() method
- /**
- * Returns the current edit pane's text area.
- * @return the current edit pane's text area, or <b>null</b> if there is no edit pane yet
- */
- public JEditTextArea getTextArea()
- {
- if(editPane == null)
- return null;
- else
- return editPane.getTextArea();
- } //}}}
-
- //{{{ getEditPane() method
- /**
- * Returns the current edit pane.
- * @return the current edit pane
- * @since jEdit 2.5pre2
- */
- public EditPane getEditPane()
- {
- return editPane;
- } //}}}
-
- //{{{ getEditPanes() method
- /**
- * Returns all edit panes.
- * @return an array of all edit panes in the view
- * @since jEdit 2.5pre2
- */
- public EditPane[] getEditPanes()
- {
- if(splitPane == null)
- {
- EditPane[] ep = { editPane };
- return ep;
- }
- else
- {
- List<EditPane> vec = new ArrayList<EditPane>();
- getEditPanes(vec,splitPane);
- EditPane[] ep = new EditPane[vec.size()];
- vec.toArray(ep);
- return ep;
- }
- } //}}}
-
- /**
- * Returns the view's local buffer set, which can be shared by
- * several editpanes.
- * @return the view's buffer set
- * @since jEdit 4.3pre17
- */
- public BufferSet getLocalBufferSet()
- {
- return localBufferSet;
- }
-
- //{{{ getViewConfig() method
- /**
- * @return a ViewConfig instance for the current view
- * @since jEdit 4.2pre1
- */
- public ViewConfig getViewConfig()
- {
- ViewConfig config = new ViewConfig();
- config.plainView = isPlainView();
- config.splitConfig = getSplitConfig();
- config.extState = getExtendedState();
- config.docking = dockableWindowManager.getDockingLayout(config);
- String prefix = config.plainView ? "plain-view" : "view";
- switch (config.extState)
- {
- case Frame.MAXIMIZED_BOTH:
- case Frame.ICONIFIED:
- config.x = jEdit.getIntegerProperty(prefix + ".x",getX());
- config.y = jEdit.getIntegerProperty(prefix + ".y",getY());
- config.width = jEdit.getIntegerProperty(prefix + ".width",getWidth());
- config.height = jEdit.getIntegerProperty(prefix + ".height",getHeight());
- break;
-
- case Frame.MAXIMIZED_VERT:
- config.x = getX();
- config.y = jEdit.getIntegerProperty(prefix + ".y",getY());
- config.width = getWidth();
- config.height = jEdit.getIntegerProperty(prefix + ".height",getHeight());
- break;
-
- case Frame.MAXIMIZED_HORIZ:
- config.x = jEdit.getIntegerProperty(prefix + ".x",getX());
- config.y = getY();
- config.width = jEdit.getIntegerProperty(prefix + ".width",getWidth());
- config.height = getHeight();
- break;
-
- case Frame.NORMAL:
- default:
- config.x = getX();
- config.y = getY();
- config.width = getWidth();
- config.height = getHeight();
- break;
- }
- return config;
- } //}}}
-
- //}}}
-
- //{{{ isClosed() method
- /**
- * Returns true if this view has been closed with
- * {@link jEdit#closeView(View)}.
- * @return true if the view is closed
- */
- public boolean isClosed()
- {
- return closed;
- } //}}}
-
- //{{{ isPlainView() method
- /**
- * Returns true if this is an auxilliary view with no dockable windows.
- * @return true if the view is plain
- * @since jEdit 4.1pre2
- */
- public boolean isPlainView()
- {
- return plainView;
- } //}}}
-
- //{{{ getNext() method
- /**
- * Returns the next view in the list.
- * @return the next view
- */
- public View getNext()
- {
- return next;
- } //}}}
-
- //{{{ getPrev() method
- /**
- * Returns the previous view in the list.
- * @return the preview view
- */
- public View getPrev()
- {
- return prev;
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof PropertiesChanged)
- propertiesChanged();
- else if(msg instanceof SearchSettingsChanged)
- {
- if(searchBar != null)
- searchBar.update();
- }
- else if(msg instanceof BufferUpdate)
- handleBufferUpdate((BufferUpdate)msg);
- else if(msg instanceof EditPaneUpdate)
- handleEditPaneUpdate((EditPaneUpdate)msg);
- } //}}}
-
- //{{{ getMinimumSize() method
- @Override
- public Dimension getMinimumSize()
- {
- return new Dimension(0,0);
- } //}}}
-
- //{{{ setWaitSocket() method
- /**
- * This socket is closed when the buffer is closed.
- */
- public void setWaitSocket(Socket waitSocket)
- {
- this.waitSocket = waitSocket;
- } //}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- return getClass().getName() + '['
- + (jEdit.getActiveView() == this
- ? "active" : "inactive")
- + ']';
- } //}}}
-
- //{{{ updateTitle() method
- /**
- * Updates the title bar.
- */
- public void updateTitle()
- {
- List<Buffer> buffers = new ArrayList<Buffer>();
- EditPane[] editPanes = getEditPanes();
- for(int i = 0; i < editPanes.length; i++)
- {
- Buffer buffer = editPanes[i].getBuffer();
- if(!buffers.contains(buffer))
- buffers.add(buffer);
- }
-
- StringBuilder title = new StringBuilder();
-
- /* On Mac OS X, apps are not supposed to show their name in the
- title bar. */
- if(!OperatingSystem.isMacOS())
- title.append(jEdit.getProperty("view.title"));
-
- for(int i = 0; i < buffers.size(); i++)
- {
- if(i != 0)
- title.append(", ");
-
- Buffer buffer = buffers.get(i);
- title.append(showFullPath && !buffer.isNewFile()
- ? buffer.getPath(true) : buffer.getName());
- if(buffer.isDirty())
- title.append(jEdit.getProperty("view.title.dirty"));
- }
-
- setTitle(title.toString());
- } //}}}
-
- //{{{ getPrefixFocusOwner() method
- public Component getPrefixFocusOwner()
- {
- return prefixFocusOwner;
- } //}}}
-
- //{{{ setPrefixFocusOwner() method
- public void setPrefixFocusOwner(Component prefixFocusOwner)
- {
- this.prefixFocusOwner = prefixFocusOwner;
- } //}}}
-
- //{{{ visit() method
- /**
- * Visit the the editpanes and textareas of the view
- * @param visitor the visitor
- * @since jEdit 4.3pre13
- */
- public void visit(JEditVisitor visitor)
- {
- EditPane[] panes = getEditPanes();
- for (int i = 0; i < panes.length; i++)
- {
- EditPane editPane = panes[i];
- visitor.visit(editPane);
- visitor.visit(editPane.getTextArea());
- }
- } //}}}
-
- //{{{ Package-private members
- View prev;
- View next;
-
- //{{{ View constructor
- View(Buffer buffer, ViewConfig config)
- {
- fullScreenMode = false;
- menuBar = null;
- plainView = config.plainView;
-
- enableEvents(AWTEvent.KEY_EVENT_MASK);
-
- setIconImage(GUIUtilities.getEditorIcon());
-
- mainPanel = new JPanel();
- mainPanel.setLayout(new BorderLayout());
- dockableWindowManager = getDockingFrameworkProvider().create(this,
- DockableWindowFactory.getInstance(), config);
- dockableWindowManager.setMainPanel(mainPanel);
-
- topToolBars = new JPanel(new VariableGridLayout(
- VariableGridLayout.FIXED_NUM_COLUMNS,
- 1));
- bottomToolBars = new JPanel(new VariableGridLayout(
- VariableGridLayout.FIXED_NUM_COLUMNS,
- 1));
-
- toolBarManager = new ToolBarManager(topToolBars, bottomToolBars);
-
- status = new StatusBar(this);
-
- inputHandler = new DefaultInputHandler(this,(DefaultInputHandler)
- jEdit.getInputHandler());
-
- localBufferSet = new BufferSet();
-
- setSplitConfig(buffer,config.splitConfig);
-
- getContentPane().add(BorderLayout.CENTER,dockableWindowManager);
-
- dockableWindowManager.init();
-
- // tool bar and status bar gets added in propertiesChanged()
- // depending in the 'tool bar alternate layout' setting.
- propertiesChanged();
-
- setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
- addWindowListener(new WindowHandler());
-
- setFocusTraversalPolicy(new MyFocusTraversalPolicy());
-
- EditBus.addToBus(this);
-
- GUIUtilities.addSizeSaver(this, null, plainView ? "plain-view" : "view");
- } //}}}
-
- //{{{ updateFullScreenProps() method
- public void updateFullScreenProps()
- {
- boolean alternateLayout = jEdit.getBooleanProperty(
- "view.toolbar.alternateLayout");
- boolean showMenu = jEdit.getBooleanProperty("fullScreenIncludesMenu");
- boolean showToolbars = jEdit.getBooleanProperty("fullScreenIncludesToolbar");
- boolean showStatus = jEdit.getBooleanProperty("fullScreenIncludesStatus");
- if (! showMenu)
- {
- menuBar = getJMenuBar();
- setJMenuBar(null);
- }
- else if (menuBar != null)
- setJMenuBar(menuBar);
- if (alternateLayout)
- {
- // Note: Bottom toolbar is the action bar, which is always enabled
- if (! showToolbars)
- getContentPane().remove(topToolBars);
- else
- getContentPane().add(BorderLayout.NORTH,topToolBars);
- if (! showStatus)
- removeToolBar(status);
- else
- addToolBar(BOTTOM_GROUP,STATUS_BAR_LAYER,status);
- }
- else
- {
- // Note: Bottom toolbar is the action bar, which is always enabled
- if (! showToolbars)
- mainPanel.remove(topToolBars);
- else
- mainPanel.add(topToolBars, BorderLayout.NORTH);
- if (! showStatus)
- getContentPane().remove(status);
- else
- getContentPane().add(BorderLayout.SOUTH,status);
- }
- } //}}}
-
- //{{{ toggleFullScreen() method
- public void toggleFullScreen()
- {
- fullScreenMode = (! fullScreenMode);
- GraphicsDevice sd = getGraphicsConfiguration().getDevice();
- dispose();
- if (fullScreenMode)
- {
- updateFullScreenProps();
- windowedBounds = getBounds();
- setUndecorated(true);
- setBounds(sd.getDefaultConfiguration().getBounds());
- validate();
- }
- else
- {
- boolean showStatus = plainView ? jEdit.getBooleanProperty("view.status.plainview.visible") :
- jEdit.getBooleanProperty("view.status.visible");
- if ((menuBar != null) && (getJMenuBar() != menuBar))
- setJMenuBar(menuBar);
- boolean alternateLayout = jEdit.getBooleanProperty(
- "view.toolbar.alternateLayout");
- if (alternateLayout)
- {
- getContentPane().add(BorderLayout.NORTH,topToolBars);
- if (showStatus)
- addToolBar(BOTTOM_GROUP,STATUS_BAR_LAYER,status);
- }
- else
- {
- mainPanel.add(topToolBars, BorderLayout.NORTH);
- if (showStatus)
- getContentPane().add(BorderLayout.SOUTH,status);
- }
- setUndecorated(false);
- setBounds(windowedBounds);
- }
- setVisible(true);
- toFront();
- // so you can keep typing in your editpane afterwards...
- editPane.getTextArea().requestFocus();
- } //}}}
-
- //{{{ confirmToCloseDirty() methods
- /**
- * If the view contains dirty buffers which will be closed on
- * closing the view, show the confirmation dialog for user.
- * @return
- * true if there are no such buffers or user select OK
- * to close the view; false if user select Cancel
- */
- boolean confirmToCloseDirty()
- {
- Set<Buffer> checkingBuffers = getOpenBuffers();
- for (View view: jEdit.getViews())
- {
- if (view != this)
- {
- checkingBuffers.removeAll(
- view.getOpenBuffers());
- }
- }
- for (Buffer buffer: checkingBuffers)
- {
- if (buffer.isDirty())
- {
- return new CloseDialog(this, checkingBuffers).isOK();
- }
- }
- return true;
- } //}}}
-
- //{{{ close() method
- void close()
- {
- EditBus.send(new ViewUpdate(this,ViewUpdate.CLOSED));
- closed = true;
-
- // save dockable window geometry, and close 'em
- dockableWindowManager.close();
-
- EditBus.removeFromBus(this);
- dispose();
-
- EditPane[] editPanes = getEditPanes();
- for(int i = 0; i < editPanes.length; i++)
- editPanes[i].close();
-
- // null some variables so that retaining references
- // to closed views won't hurt as much.
- toolBarManager = null;
- toolBar = null;
- searchBar = null;
- splitPane = null;
- inputHandler = null;
- recorder = null;
-
- getContentPane().removeAll();
-
- // notify clients with -wait
- if(waitSocket != null)
- {
- try
- {
- waitSocket.getOutputStream().write('\0');
- waitSocket.getOutputStream().flush();
- waitSocket.getInputStream().close();
- waitSocket.getOutputStream().close();
- waitSocket.close();
- }
- catch(IOException io)
- {
- //Log.log(Log.ERROR,this,io);
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private boolean closed;
-
- private DockableWindowManager dockableWindowManager;
- private JPanel mainPanel;
-
- private JPanel topToolBars;
- private JPanel bottomToolBars;
- private ToolBarManager toolBarManager;
-
- private Container toolBar;
- private SearchBar searchBar;
- private ActionBar actionBar;
-
- private EditPane editPane;
- private JSplitPane splitPane;
- private String lastSplitConfig;
- private final BufferSet localBufferSet;
-
- private StatusBar status;
-
- private InputHandler inputHandler;
- private Macros.Recorder recorder;
- private Component prefixFocusOwner;
-
- private int waitCount;
-
- private boolean showFullPath;
-
- private boolean plainView;
-
- private Socket waitSocket;
- private Component mainContent;
-
- private boolean fullScreenMode;
- private Rectangle windowedBounds;
- private JMenuBar menuBar;
-
- //}}}
-
- //{{{ setMainContent() method
- private void setMainContent(Component c)
- {
- if (mainContent != null)
- mainPanel.remove(mainContent);
- mainContent = c;
- mainPanel.add(mainContent, BorderLayout.CENTER);
- mainPanel.revalidate();
- mainPanel.repaint();
- } //}}}
-
- //{{{ getEditPanes() method
- private static void getEditPanes(List<EditPane> vec, Component comp)
- {
- if(comp instanceof EditPane)
- vec.add((EditPane) comp);
- else if(comp instanceof JSplitPane)
- {
- JSplitPane split = (JSplitPane)comp;
- getEditPanes(vec,split.getLeftComponent());
- getEditPanes(vec,split.getRightComponent());
- }
- } //}}}
-
- //{{{ showBuffer() method
- private EditPane showBuffer(Buffer buffer, boolean focus)
- {
- if(editPane.getBuffer() == buffer
- && editPane.getTextArea().getVisibleLines() > 1)
- {
- if (focus)
- editPane.focusOnTextArea();
- return editPane;
- }
-
- EditPane[] editPanes = getEditPanes();
- for(int i = 0; i < editPanes.length; i++)
- {
- EditPane ep = editPanes[i];
- if(ep.getBuffer() == buffer
- /* ignore zero-height splits, etc */
- && ep.getTextArea().getVisibleLines() > 1)
- {
- setEditPane(ep);
- if (focus)
- ep.focusOnTextArea();
- return ep;
- }
- }
-
- setBuffer(buffer,false, focus);
- return editPane;
- } //}}}
-
- //{{{ getSplitConfig() method
- /*
- * The split config is recorded in a simple RPN "language".
- */
- private static void getSplitConfig(JSplitPane splitPane,
- StringBuilder splitConfig)
- {
- Component right = splitPane.getRightComponent();
- appendToSplitConfig(splitConfig, right);
-
- splitConfig.append(' ');
-
- Component left = splitPane.getLeftComponent();
- appendToSplitConfig(splitConfig, left);
-
- splitConfig.append(' ');
- splitConfig.append(splitPane.getDividerLocation());
- splitConfig.append(' ');
- splitConfig.append(splitPane.getOrientation()
- == JSplitPane.VERTICAL_SPLIT ? "vertical" : "horizontal");
- } //}}}
-
- //{{{ appendToSplitConfig() method
- /**
- * Append the Component to the split config.
- * The component must be a JSplitPane or an EditPane
- *
- * @param splitConfig the split config
- * @param component the component
- */
- private static void appendToSplitConfig(StringBuilder splitConfig, Component component)
- {
- if(component instanceof JSplitPane)
- {
- // the component is a JSplitPane
- getSplitConfig((JSplitPane)component,splitConfig);
- }
- else
- {
- // the component is an editPane
- EditPane editPane = (EditPane) component;
- splitConfig.append('"');
- splitConfig.append(StandardUtilities.charsToEscapes(
- editPane.getBuffer().getPath()));
- splitConfig.append("\" buffer");
- BufferSet bufferSet = editPane.getBufferSet();
- Buffer[] buffers = bufferSet.getAllBuffers();
- for (Buffer buffer : buffers)
- {
- if (!buffer.isNewFile())
- {
- splitConfig.append(" \"");
- splitConfig.append(StandardUtilities.charsToEscapes(
- buffer.getPath()));
- splitConfig.append("\" buff");
- }
- }
- splitConfig.append(" \"");
- splitConfig.append(editPane.getBufferSetScope());
- splitConfig.append("\" bufferset");
- }
- } //}}}
-
- //{{{ restoreSplitConfig() method
- private Component restoreSplitConfig(Buffer buffer, String splitConfig)
- throws IOException
- // this is where checked exceptions piss me off. this method only uses
- // a StringReader which can never throw an exception...
- {
- if(buffer != null)
- {
- return editPane = createEditPane(buffer);
- }
- else if(splitConfig == null)
- {
- return editPane = createEditPane(jEdit.getFirstBuffer());
- }
- Buffer[] buffers = jEdit.getBuffers();
-
- Stack<Object> stack = new Stack<Object>();
-
- // we create a stream tokenizer for parsing a simple
- // stack-based language
- StreamTokenizer st = new StreamTokenizer(new StringReader(
- splitConfig));
- st.whitespaceChars(0,' ');
- /* all printable ASCII characters */
- st.wordChars('#','~');
- st.commentChar('!');
- st.quoteChar('"');
- st.eolIsSignificant(false);
- boolean continuousLayout = jEdit.getBooleanProperty("appearance.continuousLayout");
- List<Buffer> editPaneBuffers = new ArrayList<Buffer>();
-loop: while (true)
- {
- switch(st.nextToken())
- {
- case StreamTokenizer.TT_EOF:
- break loop;
- case StreamTokenizer.TT_WORD:
- if(st.sval.equals("vertical") ||
- st.sval.equals("horizontal"))
- {
- int orientation
- = st.sval.equals("vertical")
- ? JSplitPane.VERTICAL_SPLIT
- : JSplitPane.HORIZONTAL_SPLIT;
- int divider = ((Integer)stack.pop())
- .intValue();
- Object obj1 = stack.pop();
- Object obj2 = stack.pop();
- // Backward compatibility with pre-bufferset versions
- if (obj1 instanceof Buffer)
- {
- Buffer b1 = buffer = (Buffer) obj1;
- jEdit.getGlobalBufferSet().addBufferAt(b1, -1);
- obj1 = editPane = createEditPane(b1, BufferSet.Scope.global);
- }
- if (obj2 instanceof Buffer)
- {
- Buffer b2 = (Buffer) obj2;
- jEdit.getGlobalBufferSet().addBufferAt(b2, -1);
- obj2 = createEditPane(b2, BufferSet.Scope.global);
- }
- stack.push(splitPane = new JSplitPane(
- orientation,
- continuousLayout,
- (Component)obj1,
- (Component)obj2));
- splitPane.setOneTouchExpandable(true);
- splitPane.setBorder(null);
- splitPane.setMinimumSize(
- new Dimension(0,0));
- splitPane.setDividerLocation(divider);
- }
- else if(st.sval.equals("buffer"))
- {
- Object obj = stack.pop();
- if(obj instanceof Integer)
- {
- int index = ((Integer)obj).intValue();
- if(index >= 0 && index < buffers.length)
- buffer = buffers[index];
- }
- else if(obj instanceof String)
- {
- String path = (String)obj;
- buffer = jEdit.getBuffer(path);
- if (buffer == null)
- {
- int untitledCount = jEdit.getNextUntitledBufferId();
- buffer = jEdit.openFile(this,null,"Untitled-" + untitledCount,true,null);
- }
- }
-
- if(buffer == null)
- buffer = jEdit.getFirstBuffer();
- stack.push(buffer);
- }
- else if (st.sval.equals("buff"))
- {
-
- String path = (String)stack.pop();
- buffer = jEdit.getBuffer(path);
- if (buffer == null)
- {
- Log.log(Log.WARNING, this, "Buffer " + path + " doesn't exist");
- }
- else
- {
- editPaneBuffers.add(buffer);
- }
- }
- else if (st.sval.equals("bufferset"))
- {
- BufferSet.Scope scope = BufferSet.Scope.fromString((String) stack.pop());
- buffer = (Buffer) stack.pop();
- editPane = createEditPane(buffer, scope);
- stack.push(editPane);
- BufferSetManager bufferSetManager = jEdit.getBufferSetManager();
- BufferSet bufferSet = editPane.getBufferSet();
- int i = 0;
- for (Buffer buff : editPaneBuffers)
- {
- if (buff == buffer)
- bufferSet.addBufferAt(buffer, i);
- else
- bufferSetManager.addBuffer(bufferSet, buff);
- i++;
- }
- editPaneBuffers.clear();
- }
- break;
- case StreamTokenizer.TT_NUMBER:
- stack.push((int)st.nval);
- break;
- case '"':
- stack.push(st.sval);
- break;
- }
- }
-
- // Backward compatibility with pre-bufferset versions
- Object obj = stack.peek();
- if (obj instanceof Buffer)
- {
- jEdit.getGlobalBufferSet().addBufferAt((Buffer)obj, -1);
- obj = editPane = createEditPane((Buffer)obj,
- BufferSet.Scope.global);
- }
-
- updateGutterBorders();
-
- return (Component)obj;
- } //}}}
-
- //{{{ propertiesChanged() method
- /**
- * Reloads various settings from the properties.
- */
- private void propertiesChanged()
- {
- setJMenuBar(GUIUtilities.loadMenuBar("view.mbar"));
-
- loadToolBars();
-
- showFullPath = jEdit.getBooleanProperty("view.showFullPath");
- updateTitle();
-
- status.propertiesChanged();
-
- removeToolBar(status);
- getContentPane().remove(status);
-
- boolean showStatus = plainView ? jEdit.getBooleanProperty("view.status.plainview.visible") :
- jEdit.getBooleanProperty("view.status.visible");
- if (jEdit.getBooleanProperty("view.toolbar.alternateLayout"))
- {
- getContentPane().add(BorderLayout.NORTH,topToolBars);
- getContentPane().add(BorderLayout.SOUTH,bottomToolBars);
- if (showStatus)
- addToolBar(BOTTOM_GROUP,STATUS_BAR_LAYER,status);
- }
- else
- {
- mainPanel.add(topToolBars, BorderLayout.NORTH);
- mainPanel.add(bottomToolBars, BorderLayout.SOUTH);
- if (showStatus)
- getContentPane().add(BorderLayout.SOUTH,status);
- }
- updateBufferSwitcherStates();
-
- getRootPane().revalidate();
-
- if (splitPane != null)
- GUIUtilities.initContinuousLayout(splitPane);
- //SwingUtilities.updateComponentTreeUI(getRootPane());
-
- if (fullScreenMode)
- updateFullScreenProps();
- } //}}}
-
- //{{{ updateBufferSwitcherStates() method
- /**
- * Enables or Disables the "Focus Buffer Switcher" menu item in the View menu
- * depending on the visible state of the buffer switcher. The menu item
- * is intended to have the same effect as clicking on the buffer switcher
- * combo box, and it doesn't make sense to have this action available if
- * the buffer switcher isn't visible.
- * Also shows or hides the Buffer Switcher itself, since this can be invoked after
- * the toggle buffer switcher action.
- */
- public void updateBufferSwitcherStates()
- {
- boolean show = jEdit.getBooleanProperty("view.showBufferSwitcher");
- JMenuBar menubar = getJMenuBar();
- if (menubar == null)
- {
- return;
- }
- String viewmenu_label = jEdit.getProperty("view.label");
- viewmenu_label = viewmenu_label.replace("$", "");
- String sbs_label = jEdit.getProperty("focus-buffer-switcher.label");
- sbs_label = sbs_label.replace("$", "");
- JMenu viewmenu = null;
- for (int i = 0; i < menubar.getMenuCount(); i++)
- {
- JMenu menu = menubar.getMenu(i);
- if (menu.getText().equals(viewmenu_label))
- {
- viewmenu = menu;
- break;
- }
- }
- if (viewmenu != null)
- {
- for (int i = 0; i < viewmenu.getMenuComponentCount(); i++)
- {
- Component item = viewmenu.getMenuComponent(i);
- if (item instanceof JMenuItem && ((JMenuItem)item).getText().equals(sbs_label))
- {
- ((JMenuItem)item).setEnabled(show);
- // viewmenu.invalidate();
- }
- }
- }
- // Toggle the visibility of the BufferSwitcher itself
- for (View v: jEdit.getViews())
- for (EditPane ep: v.getEditPanes())
- ep.loadBufferSwitcher();
- } //}}}
-
-
- //{{{ loadToolBars() method
- private void loadToolBars()
- {
- if(jEdit.getBooleanProperty("view.showToolbar") && !plainView)
- {
- if(toolBar != null)
- toolBarManager.removeToolBar(toolBar);
-
- toolBar = GUIUtilities.loadToolBar("view.toolbar");
-
- addToolBar(TOP_GROUP, SYSTEM_BAR_LAYER, toolBar);
- }
- else if(toolBar != null)
- {
- removeToolBar(toolBar);
- toolBar = null;
- }
-
- if(searchBar != null)
- {
- searchBar.propertiesChanged();
- removeToolBar(searchBar);
- }
-
- if(jEdit.getBooleanProperty("view.showSearchbar") && !plainView)
- {
- if(searchBar == null)
- searchBar = new SearchBar(this,false);
- addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);
- }
- } //}}}
-
- //{{{ createEditPane() methods
- private EditPane createEditPane(Buffer buffer)
- {
- return createEditPane(buffer, BufferSet.Scope.fromString(
- jEdit.getProperty("editpane.bufferset.default")));
- }
-
- private EditPane createEditPane(Buffer buffer, BufferSet.Scope scope)
- {
- EditPane editPane = new EditPane(this,buffer, scope);
- JEditTextArea textArea = editPane.getTextArea();
- textArea.addFocusListener(new FocusHandler());
- textArea.addCaretListener(new CaretHandler());
- textArea.addScrollListener(new ScrollHandler());
- EditBus.send(new EditPaneUpdate(editPane,EditPaneUpdate.CREATED));
- return editPane;
- } //}}}
-
- //{{{ setEditPane() method
- private void setEditPane(EditPane editPane)
- {
- this.editPane = editPane;
- status.updateCaretStatus();
- status.updateBufferStatus();
- status.updateMiscStatus();
-
- // repaint the gutter so that the border color
- // reflects the focus state
- updateGutterBorders();
-
- EditBus.send(new ViewUpdate(this,ViewUpdate.EDIT_PANE_CHANGED));
- } //}}}
-
- //{{{ handleBufferUpdate() method
- private void handleBufferUpdate(BufferUpdate msg)
- {
- Buffer buffer = msg.getBuffer();
- if(msg.getWhat() == BufferUpdate.DIRTY_CHANGED
- || msg.getWhat() == BufferUpdate.LOADED)
- {
- EditPane[] editPanes = getEditPanes();
- for(int i = 0; i < editPanes.length; i++)
- {
- if(editPanes[i].getBuffer() == buffer)
- {
- updateTitle();
- break;
- }
- }
- }
- } //}}}
-
- //{{{ handleEditPaneUpdate() method
- private void handleEditPaneUpdate(EditPaneUpdate msg)
- {
- EditPane editPane = msg.getEditPane();
- if(editPane.getView() == this
- && msg.getWhat() == EditPaneUpdate.BUFFER_CHANGED
- && editPane.getBuffer().isLoaded())
- {
- closeDuplicateBuffers(msg);
- status.updateCaretStatus();
- status.updateBufferStatus();
- status.updateMiscStatus();
- }
- } //}}}
-
- //{{{ closeDuplicateBuffers() method
- private void closeDuplicateBuffers(EditPaneUpdate epu)
- {
- if (!jEdit.getBooleanProperty("buffersets.exclusive"))
- return;
- EditPane ep = epu.getEditPane();
- /* Only one view needs to handle this message, since
- we iterate through all the other views */
- if (ep.getView() != this) return;
- Buffer b = ep.getBuffer();
- for (View v: jEdit.getViews())
- {
- for (EditPane epc : v.getEditPanes())
- {
- // if it's my editpane, skip it.
- if (epc == ep) continue;
- // If it's view scope, it has to be of a different view
- if ((epc.getBufferSetScope() == BufferSet.Scope.view)
- && (v == this)) continue;
- // If it's global, forget it.
- if (epc.getBufferSet() == jEdit.getGlobalBufferSet()) continue;
- // Is it in the bufferset?
- if (epc.getBufferSet().indexOf(b) < 0) continue;
- // found it open in a disjoint bufferset !
- jEdit.getBufferSetManager().removeBuffer(epc, b);
- }
- }
- } //}}}
-
- //{{{ updateGutterBorders() method
- /**
- * Updates the borders of all gutters in this view to reflect the
- * currently focused text area.
- * @since jEdit 2.6final
- */
- private void updateGutterBorders()
- {
- EditPane[] editPanes = getEditPanes();
- for(int i = 0; i < editPanes.length; i++)
- editPanes[i].getTextArea().getGutter().updateBorder();
- } //}}}
-
- //{{{ getOpenBuffers() method
- private Set<Buffer> getOpenBuffers()
- {
- Set<Buffer> openBuffers = new HashSet<Buffer>();
- for (EditPane editPane: getEditPanes())
- {
- openBuffers.addAll(Arrays.asList(
- editPane.getBufferSet().getAllBuffers()));
- }
- return openBuffers;
- } //}}}
-
- //{{{ mergeBufferSets() method
- /**
- * Merge a EditPane's BufferSet into another one.
- * This is used on unsplitting panes not to close buffers.
- */
- static private void mergeBufferSets(EditPane target, EditPane source)
- {
- BufferSet sourceBufferSet = source.getBufferSet();
- BufferSet targetBufferSet = target.getBufferSet();
- if (sourceBufferSet != targetBufferSet)
- {
- jEdit.getBufferSetManager().mergeBufferSet(
- targetBufferSet, sourceBufferSet);
- }
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ CaretHandler class
- private class CaretHandler implements CaretListener
- {
- public void caretUpdate(CaretEvent evt)
- {
- if(evt.getSource() == getTextArea())
- status.updateCaretStatus();
- }
- } //}}}
-
- //{{{ FocusHandler class
- private class FocusHandler extends FocusAdapter
- {
- @Override
- public void focusGained(FocusEvent evt)
- {
- // walk up hierarchy, looking for an EditPane
- Component comp = (Component)evt.getSource();
- while(!(comp instanceof EditPane))
- {
- if(comp == null)
- return;
-
- comp = comp.getParent();
- }
-
- if(comp != editPane)
- setEditPane((EditPane)comp);
- else
- updateGutterBorders();
- }
- } //}}}
-
- //{{{ ScrollHandler class
- private class ScrollHandler implements ScrollListener
- {
- public void scrolledVertically(TextArea textArea)
- {
- if(getTextArea() == textArea)
- status.updateCaretStatus();
- }
-
- public void scrolledHorizontally(TextArea textArea) {}
- } //}}}
-
- //{{{ WindowHandler class
- private class WindowHandler extends WindowAdapter
- {
- @Override
- public void windowActivated(WindowEvent evt)
- {
- boolean editPaneChanged =
- jEdit.getActiveViewInternal() != View.this;
- jEdit.setActiveView(View.this);
-
- // People have reported hangs with JDK 1.4; might be
- // caused by modal dialogs being displayed from
- // windowActivated()
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- int check = jEdit.getIntegerProperty("checkFileStatus");
- if(check == GeneralOptionPane.checkFileStatus_focus ||
- check == GeneralOptionPane.checkFileStatus_all)
- jEdit.checkBufferStatus(View.this,false);
- else if(check == GeneralOptionPane.checkFileStatus_focusBuffer)
- jEdit.checkBufferStatus(View.this,true);
- }
- });
-
- if (editPaneChanged)
- {
- EditBus.send(new ViewUpdate(View.this,ViewUpdate
- .ACTIVATED));
- }
- }
-
- @Override
- public void windowClosing(WindowEvent evt)
- {
- jEdit.closeView(View.this);
- }
- } //}}}
-
- //{{{ ViewConfig class
- public static class ViewConfig
- {
- public int x, y, width, height, extState;
- public boolean plainView;
- public String splitConfig;
- public DockingLayout docking;
-
- public ViewConfig()
- {
- }
-
- public ViewConfig(boolean plainView)
- {
- this.plainView = plainView;
- String prefix = plainView ? "plain-view" : "view";
- x = jEdit.getIntegerProperty(prefix + ".x",0);
- y = jEdit.getIntegerProperty(prefix + ".y",0);
- width = jEdit.getIntegerProperty(prefix + ".width",0);
- height = jEdit.getIntegerProperty(prefix + ".height",0);
- extState = jEdit.getIntegerProperty(prefix + ".extendedState", Frame.NORMAL);
- }
-
- public ViewConfig(boolean plainView, String splitConfig,
- int x, int y, int width, int height, int extState)
- {
- this.plainView = plainView;
- this.splitConfig = splitConfig;
- this.x = x;
- this.y = y;
- this.width = width;
- this.height = height;
- this.extState = extState;
- }
- } //}}}
-
- // Checks if the specified rectangle is within screen boundaries
- private boolean isInsideScreen(View parent, Rectangle r)
- {
- Rectangle bounds;
- if (parent == null)
- bounds = GUIUtilities.getScreenBounds();
- else
- bounds = parent.getGraphicsConfiguration().getBounds();
- int minWidth = jEdit.getIntegerProperty("view.minStartupWidth");
- int minHeight = jEdit.getIntegerProperty("view.minStartupHeight");
- return (r.x < bounds.width - minWidth &&
- r.x + r.width > minWidth &&
- r.y < bounds.height - minHeight &&
- r.y + r.height > minHeight);
- }
-
- public void adjust(View parent, ViewConfig config)
- {
- if(config.width != 0 && config.height != 0)
- {
- Rectangle desired = new Rectangle(
- config.x, config.y, config.width, config.height);
- if (! isInsideScreen(parent, desired))
- setLocationRelativeTo(parent);
- else
- {
- if(OperatingSystem.isX11() && Debug.GEOMETRY_WORKAROUND)
- new GUIUtilities.UnixWorkaround(this,"view",desired,config.extState);
- else
- {
- setBounds(desired);
- setExtendedState(config.extState);
- }
- }
- }
- else
- setLocationRelativeTo(parent);
- }
-
- //{{{ MyFocusTraversalPolicy class
- private static class MyFocusTraversalPolicy extends LayoutFocusTraversalPolicy
- {
- @Override
- public Component getDefaultComponent(Container focusCycleRoot)
- {
- return GUIUtilities.getView(focusCycleRoot).getTextArea();
- }
- } //}}}
-
- //{{{ SetCursorVisitor class
- private static class SetCursorVisitor extends JEditVisitorAdapter
- {
- private final Cursor cursor;
-
- SetCursorVisitor(Cursor cursor)
- {
- this.cursor = cursor;
- }
-
- @Override
- public void visit(EditPane editPane)
- {
- editPane.setCursor(cursor);
- }
- }//}}}
- //}}}
-
-}
+/*
+ * View.java - jEdit view
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.io.IOException;
+import java.io.StreamTokenizer;
+import java.io.StringReader;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.Stack;
+
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JSplitPane;
+import javax.swing.LayoutFocusTraversalPolicy;
+import javax.swing.MenuSelectionManager;
+import javax.swing.event.CaretEvent;
+import javax.swing.event.CaretListener;
+
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.bufferset.BufferSet;
+import org.gjt.sp.jedit.bufferset.BufferSetManager;
+import org.gjt.sp.jedit.gui.ActionBar;
+import org.gjt.sp.jedit.gui.CloseDialog;
+import org.gjt.sp.jedit.gui.DefaultInputHandler;
+import org.gjt.sp.jedit.gui.DockableWindowFactory;
+import org.gjt.sp.jedit.gui.DockableWindowManager;
+import org.gjt.sp.jedit.gui.HistoryModel;
+import org.gjt.sp.jedit.gui.DockingFrameworkProvider;
+import org.gjt.sp.jedit.gui.InputHandler;
+import org.gjt.sp.jedit.gui.StatusBar;
+import org.gjt.sp.jedit.gui.ToolBarManager;
+import org.gjt.sp.jedit.gui.VariableGridLayout;
+import org.gjt.sp.jedit.gui.DockableWindowManager.DockingLayout;
+import org.gjt.sp.jedit.input.InputHandlerProvider;
+import org.gjt.sp.jedit.msg.BufferUpdate;
+import org.gjt.sp.jedit.msg.EditPaneUpdate;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.jedit.msg.SearchSettingsChanged;
+import org.gjt.sp.jedit.msg.ViewUpdate;
+import org.gjt.sp.jedit.options.GeneralOptionPane;
+import org.gjt.sp.jedit.search.CurrentBufferSet;
+import org.gjt.sp.jedit.search.SearchAndReplace;
+import org.gjt.sp.jedit.search.SearchBar;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+import org.gjt.sp.jedit.textarea.ScrollListener;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.jedit.visitors.JEditVisitor;
+import org.gjt.sp.jedit.visitors.JEditVisitorAdapter;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * A <code>View</code> is jEdit's top-level frame window.<p>
+ *
+ * In a BeanShell script, you can obtain the current view instance from the
+ * <code>view</code> variable.<p>
+ *
+ * The largest component it contains is an {@link EditPane} that in turn
+ * contains a {@link org.gjt.sp.jedit.textarea.JEditTextArea} that displays a
+ * {@link Buffer}.
+ * A view can have more than one edit pane in a split window configuration.
+ * A view also contains a menu bar, an optional toolbar and other window
+ * decorations, as well as docked windows.<p>
+ *
+ * The <b>View</b> class performs two important operations
+ * dealing with plugins: creating plugin menu items, and managing dockable
+ * windows.
+ *
+ * <ul>
+ * <li>When a view is being created, its initialization routine
+ * iterates through the collection of loaded plugins and constructs the
+ * <b>Plugins</b> menu using the properties as specified in the
+ * {@link EditPlugin} class.</li>
+ * <li>The view also creates and initializes a
+ * {@link org.gjt.sp.jedit.gui.DockableWindowManager}
+ * object. This object is
+ * responsible for creating, closing and managing dockable windows.</li>
+ * </ul>
+ *
+ * This class does not have a public constructor.
+ * Views can be opened and closed using methods in the <code>jEdit</code>
+ * class.
+ *
+ * @see org.gjt.sp.jedit.jEdit#newView(View)
+ * @see org.gjt.sp.jedit.jEdit#newView(View,Buffer)
+ * @see org.gjt.sp.jedit.jEdit#newView(View,Buffer,boolean)
+ * @see org.gjt.sp.jedit.jEdit#closeView(View)
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: View.java 19139 2010-12-14 21:44:18Z ezust $
+ */
+public class View extends JFrame implements InputHandlerProvider
+{
+ //{{{ User interface
+
+ //{{{ ToolBar-related constants
+
+ public static final String VIEW_DOCKING_FRAMEWORK_PROPERTY = "view.docking.framework";
+ private static final String ORIGINAL_DOCKING_FRAMEWORK = "Original";
+ public static final String DOCKING_FRAMEWORK_PROVIDER_SERVICE =
+ "org.gjt.sp.jedit.gui.DockingFrameworkProvider";
+ private static DockingFrameworkProvider dockingFrameworkProvider;
+
+ //{{{ Groups
+ /**
+ * The group of tool bars above the DockableWindowManager
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int TOP_GROUP = 0;
+
+ /**
+ * The group of tool bars below the DockableWindowManager
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int BOTTOM_GROUP = 1;
+ public static final int DEFAULT_GROUP = TOP_GROUP;
+ //}}}
+
+ //{{{ Layers
+
+ // Common layers
+ /**
+ * The highest possible layer.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int TOP_LAYER = Integer.MAX_VALUE;
+
+ /**
+ * The default layer for tool bars with no preference.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int DEFAULT_LAYER = 0;
+
+ /**
+ * The lowest possible layer.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int BOTTOM_LAYER = Integer.MIN_VALUE;
+
+ // Layers for top group
+ /**
+ * Above system tool bar layer.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int ABOVE_SYSTEM_BAR_LAYER = 150;
+
+ /**
+ * System tool bar layer.
+ * jEdit uses this for the main tool bar.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int SYSTEM_BAR_LAYER = 100;
+
+ /**
+ * Below system tool bar layer.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int BELOW_SYSTEM_BAR_LAYER = 75;
+
+ /**
+ * Search bar layer.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int SEARCH_BAR_LAYER = 75;
+
+ /**
+ * Below search bar layer.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.0pre7
+ */
+ public static final int BELOW_SEARCH_BAR_LAYER = 50;
+
+ // Layers for bottom group
+ /**
+ * @deprecated Status bar no longer added as a tool bar.
+ */
+ @Deprecated
+ public static final int ABOVE_ACTION_BAR_LAYER = -50;
+
+ /**
+ * Action bar layer.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.2pre1
+ */
+ public static final int ACTION_BAR_LAYER = -75;
+
+ /**
+ * Status bar layer.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.2pre1
+ */
+ public static final int STATUS_BAR_LAYER = -100;
+
+ /**
+ * Status bar layer.
+ * @see #addToolBar(int,int,java.awt.Component)
+ * @since jEdit 4.2pre1
+ */
+ public static final int BELOW_STATUS_BAR_LAYER = -150;
+ //}}}
+
+ //}}}
+
+ //{{{ getDockableWindowManager() method
+ /**
+ * Returns the dockable window manager associated with this view.
+ * @since jEdit 2.6pre3
+ */
+ public DockableWindowManager getDockableWindowManager()
+ {
+ return dockableWindowManager;
+ } //}}}
+
+ //{{{ getDockingFrameworkName() method
+ public static String getDockingFrameworkName()
+ {
+ String framework = jEdit.getProperty(
+ VIEW_DOCKING_FRAMEWORK_PROPERTY, ORIGINAL_DOCKING_FRAMEWORK);
+ return framework;
+ } //}}}
+
+ //{{{ getDockingFrameworkProvider() method
+ public static DockingFrameworkProvider getDockingFrameworkProvider()
+ {
+ if (dockingFrameworkProvider == null)
+ {
+ String framework = getDockingFrameworkName();
+ dockingFrameworkProvider = (DockingFrameworkProvider)
+ ServiceManager.getService(
+ DOCKING_FRAMEWORK_PROVIDER_SERVICE, framework);
+
+ if (dockingFrameworkProvider == null)
+ {
+ Log.log(Log.ERROR, View.class, "No docking framework " + framework +
+ " available, using the original one");
+ dockingFrameworkProvider = (DockingFrameworkProvider)
+ ServiceManager.getService(
+ DOCKING_FRAMEWORK_PROVIDER_SERVICE, ORIGINAL_DOCKING_FRAMEWORK);
+ }
+ }
+ return dockingFrameworkProvider;
+ } //}}}
+
+ //{{{ getToolBar() method
+ /**
+ * Returns the view's tool bar.
+ * @since jEdit 4.2pre1
+ */
+ public Container getToolBar()
+ {
+ return toolBar;
+ } //}}}
+
+ //{{{ addToolBar() methods
+ /**
+ * Adds a tool bar to this view.
+ * @param toolBar The tool bar
+ */
+ public void addToolBar(Component toolBar)
+ {
+ addToolBar(DEFAULT_GROUP, DEFAULT_LAYER, toolBar);
+ }
+
+ /**
+ * Adds a tool bar to this view.
+ * @param group The tool bar group to add to
+ * @param toolBar The tool bar
+ * @see org.gjt.sp.jedit.gui.ToolBarManager
+ * @since jEdit 4.0pre7
+ */
+ public void addToolBar(int group, Component toolBar)
+ {
+ addToolBar(group, DEFAULT_LAYER, toolBar);
+ }
+
+ /**
+ * Adds a tool bar to this view.
+ * @param group The tool bar group to add to
+ * @param layer The layer of the group to add to
+ * @param toolBar The tool bar
+ * @see org.gjt.sp.jedit.gui.ToolBarManager
+ * @since jEdit 4.0pre7
+ */
+ public void addToolBar(int group, int layer, Component toolBar)
+ {
+ toolBarManager.addToolBar(group, layer, toolBar);
+ getRootPane().revalidate();
+ } //}}}
+
+ //{{{ removeToolBar() method
+ /**
+ * Removes a tool bar from this view.
+ * @param toolBar The tool bar
+ */
+ public void removeToolBar(Component toolBar)
+ {
+ if (toolBarManager == null) return;
+ if (toolBar == null) return;
+ toolBarManager.removeToolBar(toolBar);
+ getRootPane().revalidate();
+ } //}}}
+
+ //{{{ showWaitCursor() method
+ /**
+ * Shows the wait cursor. This method and
+ * {@link #hideWaitCursor()} are implemented using a reference
+ * count of requests for wait cursors, so that nested calls work
+ * correctly; however, you should be careful to use these methods in
+ * tandem.<p>
+ *
+ * To ensure that {@link #hideWaitCursor()} is always called
+ * after a {@link #showWaitCursor()}, use a
+ * <code>try</code>/<code>finally</code> block, like this:
+ * <pre>try
+ *{
+ * view.showWaitCursor();
+ * // ...
+ *}
+ *finally
+ *{
+ * view.hideWaitCursor();
+ *}</pre>
+ */
+ public synchronized void showWaitCursor()
+ {
+ if(waitCount++ == 0)
+ {
+ Cursor cursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
+ setCursor(cursor);
+ visit(new SetCursorVisitor(cursor));
+ }
+ } //}}}
+
+ //{{{ hideWaitCursor() method
+ /**
+ * Hides the wait cursor.
+ */
+ public synchronized void hideWaitCursor()
+ {
+ if(waitCount > 0)
+ waitCount--;
+
+ if(waitCount == 0)
+ {
+ // still needed even though glass pane
+ // has a wait cursor
+ Cursor cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
+ setCursor(cursor);
+
+ visit(new SetCursorVisitor(cursor));
+ }
+ } //}}}
+
+ //{{{ getSearchBar() method
+ /**
+ * Returns the search bar.
+ * @since jEdit 2.4pre4
+ */
+ public final SearchBar getSearchBar()
+ {
+ return searchBar;
+ } //}}}
+
+ //{{{ getActionBar() method
+ /**
+ * Returns the action bar.
+ * @since jEdit 4.2pre3
+ */
+ public final ActionBar getActionBar()
+ {
+ return actionBar;
+ } //}}}
+
+ //{{{ getStatus() method
+ /**
+ * Returns the status bar. The
+ * {@link org.gjt.sp.jedit.gui.StatusBar#setMessage(String)} and
+ * {@link org.gjt.sp.jedit.gui.StatusBar#setMessageAndClear(String)} methods can
+ * be called on the return value of this method to display status
+ * information to the user.
+ * @since jEdit 3.2pre2
+ */
+ public StatusBar getStatus()
+ {
+ return status;
+ } //}}}
+
+ //{{{ quickIncrementalSearch() method
+ /**
+ * Quick search.
+ * @since jEdit 4.0pre3
+ */
+ public void quickIncrementalSearch(boolean word)
+ {
+ if(searchBar == null)
+ searchBar = new SearchBar(this,true);
+ if(searchBar.getParent() == null)
+ addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);
+
+ searchBar.setHyperSearch(false);
+
+ JEditTextArea textArea = getTextArea();
+
+ if(word)
+ {
+ String text = textArea.getSelectedText();
+ if(text == null)
+ {
+ textArea.selectWord();
+ text = textArea.getSelectedText();
+ }
+ else if(text.indexOf('\n') != -1)
+ text = null;
+
+ if(text != null && SearchAndReplace.getRegexp())
+ text = SearchAndReplace.escapeRegexp(text,false);
+
+ searchBar.getField().setText(text);
+ }
+
+ searchBar.getField().requestFocus();
+ searchBar.getField().selectAll();
+ } //}}}
+
+ //{{{ quickHyperSearch() method
+ /**
+ * Quick HyperSearch.
+ * @since jEdit 4.0pre3
+ */
+ public void quickHyperSearch(boolean word)
+ {
+ JEditTextArea textArea = getTextArea();
+
+ if(word)
+ {
+ String text = textArea.getSelectedText();
+ if(text == null)
+ {
+ textArea.selectWord();
+ text = textArea.getSelectedText();
+ }
+
+ if(text != null && text.indexOf('\n') == -1)
+ {
+ if(SearchAndReplace.getRegexp())
+ {
+ text = SearchAndReplace.escapeRegexp(
+ text,false);
+ }
+
+ HistoryModel.getModel("find").addItem(text);
+ SearchAndReplace.setSearchString(text);
+ SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
+ SearchAndReplace.hyperSearch(this);
+
+ return;
+ }
+ }
+
+ if(searchBar == null)
+ searchBar = new SearchBar(this,true);
+ if(searchBar.getParent() == null)
+ addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);
+
+ searchBar.setHyperSearch(true);
+ searchBar.getField().setText(null);
+ searchBar.getField().requestFocus();
+ searchBar.getField().selectAll();
+ } //}}}
+
+ //{{{ actionBar() method
+ /**
+ * Shows the action bar if needed, and sends keyboard focus there.
+ * @since jEdit 4.2pre1
+ */
+ public void actionBar()
+ {
+ if(actionBar == null)
+ actionBar = new ActionBar(this,true);
+ if(actionBar.getParent() == null)
+ addToolBar(BOTTOM_GROUP,ACTION_BAR_LAYER,actionBar);
+
+ actionBar.goToActionBar();
+ } //}}}
+
+ //}}}
+
+ //{{{ Input handling
+
+ //{{{ getKeyEventInterceptor() method
+ /**
+ * Returns the listener that will handle all key events in this
+ * view, if any.
+ * @return the key event interceptor or null
+ */
+ public KeyListener getKeyEventInterceptor()
+ {
+ return inputHandler.getKeyEventInterceptor();
+ } //}}}
+
+ //{{{ setKeyEventInterceptor() method
+ /**
+ * Sets the listener that will handle all key events in this
+ * view. For example, the complete word command uses this so
+ * that all key events are passed to the word list popup while
+ * it is visible.
+ * @param listener The key event interceptor.
+ */
+ public void setKeyEventInterceptor(KeyListener listener)
+ {
+ inputHandler.setKeyEventInterceptor(listener);
+ } //}}}
+
+ //{{{ getInputHandler() method
+ /**
+ * Returns the input handler.
+ */
+ public InputHandler getInputHandler()
+ {
+ return inputHandler;
+ } //}}}
+
+
+
+ //{{{ setInputHandler() method
+ /**
+ * Sets the input handler.
+ * @param inputHandler The new input handler
+ */
+ public void setInputHandler(InputHandler inputHandler)
+ {
+ this.inputHandler = inputHandler;
+ } //}}}
+
+ //{{{ getMacroRecorder() method
+ /**
+ * Returns the macro recorder.
+ */
+ public Macros.Recorder getMacroRecorder()
+ {
+ return recorder;
+ } //}}}
+
+ //{{{ setMacroRecorder() method
+ /**
+ * Sets the macro recorder.
+ * @param recorder The macro recorder
+ */
+ public void setMacroRecorder(Macros.Recorder recorder)
+ {
+ this.recorder = recorder;
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ /**
+ * Forwards key events directly to the input handler.
+ * This is slightly faster than using a KeyListener
+ * because some Swing overhead is avoided.
+ */
+ @Override
+ public void processKeyEvent(KeyEvent evt)
+ {
+ inputHandler.processKeyEvent(evt,VIEW, false);
+ if(!evt.isConsumed())
+ super.processKeyEvent(evt);
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ /**
+ * Forwards key events directly to the input handler.
+ * This is slightly faster than using a KeyListener
+ * because some Swing overhead is avoided.
+ */
+ public void processKeyEvent(KeyEvent evt, boolean calledFromTextArea)
+ {
+ processKeyEvent(evt,calledFromTextArea
+ ? TEXT_AREA
+ : VIEW);
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ public static final int VIEW = 0;
+ public static final int TEXT_AREA = 1;
+ public static final int ACTION_BAR = 2;
+ /**
+ * Forwards key events directly to the input handler.
+ * This is slightly faster than using a KeyListener
+ * because some Swing overhead is avoided.
+ */
+ public void processKeyEvent(KeyEvent evt, int from)
+ {
+ processKeyEvent(evt,from,false);
+ }
+ /**
+ * Forwards key events directly to the input handler.
+ * This is slightly faster than using a KeyListener
+ * because some Swing overhead is avoided.
+ * @deprecated do not use, try {@link org.gjt.sp.jedit.gui.InputHandler#processKeyEvent(java.awt.event.KeyEvent, int, boolean)}
+ */
+ @Deprecated
+ public void processKeyEvent(KeyEvent evt, int from, boolean global)
+ {
+ inputHandler.processKeyEvent(evt, from, global);
+ if(!evt.isConsumed())
+ super.processKeyEvent(evt);
+ } //}}}
+
+
+ //}}}
+
+ //{{{ Buffers, edit panes, split panes
+
+ //{{{ splitHorizontally() method
+ /**
+ * Splits the view horizontally.
+ * @return the new editPane
+ * @since jEdit 4.1pre2
+ */
+ public EditPane splitHorizontally()
+ {
+ return split(JSplitPane.VERTICAL_SPLIT);
+ } //}}}
+
+ //{{{ splitVertically() method
+ /**
+ * Splits the view vertically.
+ * @return the new editPane
+ * @since jEdit 4.1pre2
+ */
+ public EditPane splitVertically()
+ {
+ return split(JSplitPane.HORIZONTAL_SPLIT);
+ } //}}}
+
+ //{{{ split() method
+ /**
+ * Splits the view.
+ * @param orientation the orientation {@link javax.swing.JSplitPane#HORIZONTAL_SPLIT} or
+ * {@link javax.swing.JSplitPane#VERTICAL_SPLIT}
+ * @return the new editPane
+ * @since jEdit 4.1pre2
+ */
+ public EditPane split(int orientation)
+ {
+ PerspectiveManager.setPerspectiveDirty(true);
+
+ editPane.saveCaretInfo();
+ EditPane oldEditPane = editPane;
+ EditPane newEditPane = createEditPane(oldEditPane);
+// setEditPane(newEditPane);
+ newEditPane.loadCaretInfo();
+
+ JComponent oldParent = (JComponent)oldEditPane.getParent();
+
+ final JSplitPane newSplitPane = new JSplitPane(orientation,
+ jEdit.getBooleanProperty("appearance.continuousLayout"));
+ newSplitPane.setOneTouchExpandable(true);
+ newSplitPane.setBorder(null);
+ newSplitPane.setMinimumSize(new Dimension(0,0));
+ newSplitPane.setResizeWeight(0.5);
+
+ int parentSize = orientation == JSplitPane.VERTICAL_SPLIT
+ ? oldEditPane.getHeight() : oldEditPane.getWidth();
+ final int dividerPosition = (int)((parentSize
+ - newSplitPane.getDividerSize()) * 0.5);
+ newSplitPane.setDividerLocation(dividerPosition);
+
+ if(oldParent instanceof JSplitPane)
+ {
+ JSplitPane oldSplitPane = (JSplitPane)oldParent;
+ int dividerPos = oldSplitPane.getDividerLocation();
+
+ Component left = oldSplitPane.getLeftComponent();
+
+ if(left == oldEditPane)
+ oldSplitPane.setLeftComponent(newSplitPane);
+ else
+ oldSplitPane.setRightComponent(newSplitPane);
+
+ newSplitPane.setLeftComponent(oldEditPane);
+ newSplitPane.setRightComponent(newEditPane);
+
+ oldSplitPane.setDividerLocation(dividerPos);
+ }
+ else
+ {
+ splitPane = newSplitPane;
+
+ newSplitPane.setLeftComponent(oldEditPane);
+ newSplitPane.setRightComponent(newEditPane);
+
+ setMainContent(newSplitPane);
+
+ }
+
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ newSplitPane.setDividerLocation(dividerPosition);
+ }
+ });
+
+ newEditPane.focusOnTextArea();
+
+ return newEditPane;
+ } //}}}
+
+ //{{{ unsplit() method
+ /**
+ * Unsplits the view.
+ * @since jEdit 2.3pre2
+ */
+ public void unsplit()
+ {
+ if(splitPane != null)
+ {
+ lastSplitConfig = getSplitConfig();
+
+ PerspectiveManager.setPerspectiveDirty(true);
+ BufferSet.Scope scope = jEdit.getBufferSetManager().getScope();
+ for(EditPane _editPane: getEditPanes())
+ {
+ if(editPane != _editPane)
+ {
+ if (scope == BufferSet.Scope.editpane)
+ mergeBufferSets(editPane, _editPane);
+ _editPane.close();
+ }
+ }
+
+ setMainContent(editPane);
+
+ splitPane = null;
+ updateTitle();
+
+ editPane.focusOnTextArea();
+ }
+ else
+ getToolkit().beep();
+ } //}}}
+
+ //{{{ unsplitCurrent() method
+ /**
+ * Removes the current split.
+ * @since jEdit 2.3pre2
+ */
+ public void unsplitCurrent()
+ {
+ if(splitPane != null)
+ {
+ lastSplitConfig = getSplitConfig();
+
+ PerspectiveManager.setPerspectiveDirty(true);
+
+ // find first split pane parenting current edit pane
+ Component comp = editPane;
+ while(!(comp instanceof JSplitPane) && comp != null)
+ {
+ comp = comp.getParent();
+ }
+
+ BufferSet.Scope scope = jEdit.getBufferSetManager().getScope();
+ // get rid of any edit pane that is a child
+ // of the current edit pane's parent splitter
+ for(EditPane _editPane: getEditPanes())
+ {
+ if(GUIUtilities.isAncestorOf(comp,_editPane)
+ && _editPane != editPane)
+ {
+ if (scope == BufferSet.Scope.editpane)
+ mergeBufferSets(editPane, _editPane);
+ _editPane.close();
+ }
+ }
+
+ JComponent parent = comp == null ? null : (JComponent)comp.getParent();
+
+ if(parent instanceof JSplitPane)
+ {
+ JSplitPane parentSplit = (JSplitPane)parent;
+ int pos = parentSplit.getDividerLocation();
+ if(parentSplit.getLeftComponent() == comp)
+ parentSplit.setLeftComponent(editPane);
+ else
+ parentSplit.setRightComponent(editPane);
+ parentSplit.setDividerLocation(pos);
+ parent.revalidate();
+ }
+ else
+ {
+ setMainContent(editPane);
+ splitPane = null;
+ }
+
+ updateTitle();
+
+ editPane.focusOnTextArea();
+ }
+ else
+ getToolkit().beep();
+ } //}}}
+
+ //{{{ resplit() method
+ /**
+ * Restore the split configuration as it was before unsplitting.
+ *
+ * @since jEdit 4.3pre1
+ */
+ public void resplit()
+ {
+ if(lastSplitConfig == null)
+ getToolkit().beep();
+ else
+ setSplitConfig(null,lastSplitConfig);
+ } //}}}
+
+ //{{{ getSplitConfig() method
+ /**
+ * Split configurations are recorded in a simple RPN "language".
+ * @return The split configuration, describing where splitpanes
+ * are, which buffers are open in each EditPane, etc.
+ *
+ */
+ public String getSplitConfig()
+ {
+ StringBuilder splitConfig = new StringBuilder();
+
+ if(splitPane != null)
+ getSplitConfig(splitPane,splitConfig);
+ else
+ {
+ appendToSplitConfig(splitConfig, editPane);
+ }
+
+ return splitConfig.toString();
+ } //}}}
+
+ //{{{ setSplitConfig() method
+ /**
+ * sets the split configuration as per the splitConfig.
+ *
+ * @param buffer if null, checks all buffers to restore View's split config.
+ * @param splitConfig the split config, as returned by getSplitConfig()
+ */
+ public void setSplitConfig(Buffer buffer, String splitConfig)
+ {
+ try
+ {
+ Component comp = restoreSplitConfig(buffer,splitConfig);
+ setMainContent(comp);
+ updateTitle();
+ }
+ catch(IOException e)
+ {
+ // this should never throw an exception.
+ throw new InternalError();
+ }
+ } //}}}
+
+ //{{{ nextTextArea() method
+ /**
+ * Moves keyboard focus to the next text area.
+ * @since jEdit 2.7pre4
+ */
+ public void nextTextArea()
+ {
+ EditPane[] editPanes = getEditPanes();
+ for(int i = 0; i < editPanes.length; i++)
+ {
+ if(editPane == editPanes[i])
+ {
+ if(i == editPanes.length - 1)
+ editPanes[0].focusOnTextArea();
+ else
+ editPanes[i+1].focusOnTextArea();
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ prevTextArea() method
+ /**
+ * Moves keyboard focus to the previous text area.
+ * @since jEdit 2.7pre4
+ */
+ public void prevTextArea()
+ {
+ EditPane[] editPanes = getEditPanes();
+ for(int i = 0; i < editPanes.length; i++)
+ {
+ if(editPane == editPanes[i])
+ {
+ if(i == 0)
+ editPanes[editPanes.length - 1].focusOnTextArea();
+ else
+ editPanes[i-1].focusOnTextArea();
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ getSplitPane() method
+ /**
+ * Returns the top-level split pane, if any.
+ * @return the top JSplitPane if any.
+ * @since jEdit 2.3pre2
+ */
+ public JSplitPane getSplitPane()
+ {
+ return splitPane;
+ } //}}}
+
+ //{{{ getBuffer() method
+ /**
+ * Returns the current edit pane's buffer.
+ * @return the current edit pane's buffer, it can be null
+ */
+ public Buffer getBuffer()
+ {
+ if(editPane == null)
+ return null;
+ else
+ return editPane.getBuffer();
+ } //}}}
+
+ //{{{ setBuffer() method
+ /**
+ * Sets the current edit pane's buffer.
+ * @param buffer The buffer
+ */
+ public void setBuffer(Buffer buffer)
+ {
+ setBuffer(buffer,false);
+ } //}}}
+
+ //{{{ setBuffer() method
+ /**
+ * Sets the current edit pane's buffer.
+ * @param buffer The buffer
+ * @param disableFileStatusCheck Disables file status checking
+ * regardless of the state of the checkFileStatus property
+ */
+ public void setBuffer(Buffer buffer, boolean disableFileStatusCheck)
+ {
+ setBuffer(buffer, disableFileStatusCheck, true);
+ } //}}}
+
+ //{{{ setBuffer() method
+ /**
+ * Sets the current edit pane's buffer.
+ * @param buffer The buffer
+ * @param disableFileStatusCheck Disables file status checking
+ * regardless of the state of the checkFileStatus property
+ * @param focus Whether the textarea should request focus
+ * @since jEdit 4.3pre13
+ */
+ public void setBuffer(Buffer buffer, boolean disableFileStatusCheck, boolean focus)
+ {
+ editPane.setBuffer(buffer, focus);
+ int check = jEdit.getIntegerProperty("checkFileStatus");
+ if(!disableFileStatusCheck && (check == GeneralOptionPane.checkFileStatus_all ||
+ check == GeneralOptionPane.checkFileStatus_operations ||
+ check == GeneralOptionPane.checkFileStatus_focusBuffer))
+ jEdit.checkBufferStatus(this, true);
+ } //}}}
+
+ //{{{ goToBuffer() method
+ /**
+ * If this buffer is open in one of the view's edit panes, sets focus
+ * to that edit pane. Otherwise, opens the buffer in the currently
+ * active edit pane.
+ * @param buffer The buffer
+ * @return the current edit pane
+ * @since jEdit 4.2pre1
+ */
+ public EditPane goToBuffer(Buffer buffer)
+ {
+ return showBuffer(buffer, true);
+ } //}}}
+
+ //{{{ showBuffer() method
+ /**
+ * If this buffer is open in one of the view's edit panes, activates
+ * that edit pane. Otherwise, opens the buffer in the currently
+ * active edit pane. But the focus is not moved.
+ * @param buffer The buffer to show
+ * @return the current edit pane
+ * @since jEdit 4.3pre13
+ */
+ public EditPane showBuffer(Buffer buffer)
+ {
+ return showBuffer(buffer, false);
+ } //}}}
+
+ //{{{ getTextArea() method
+ /**
+ * Returns the current edit pane's text area.
+ * @return the current edit pane's text area, or <b>null</b> if there is no edit pane yet
+ */
+ public JEditTextArea getTextArea()
+ {
+ if(editPane == null)
+ return null;
+ else
+ return editPane.getTextArea();
+ } //}}}
+
+ //{{{ getEditPane() method
+ /**
+ * Returns the current edit pane.
+ * @return the current edit pane
+ * @since jEdit 2.5pre2
+ */
+ public EditPane getEditPane()
+ {
+ return editPane;
+ } //}}}
+
+ //{{{ getEditPanes() method
+ /**
+ * Returns all edit panes.
+ * @return an array of all edit panes in the view
+ * @since jEdit 2.5pre2
+ */
+ public EditPane[] getEditPanes()
+ {
+ if(splitPane == null)
+ {
+ EditPane[] ep = { editPane };
+ return ep;
+ }
+ else
+ {
+ List<EditPane> vec = new ArrayList<EditPane>();
+ getEditPanes(vec,splitPane);
+ EditPane[] ep = new EditPane[vec.size()];
+ vec.toArray(ep);
+ return ep;
+ }
+ } //}}}
+
+ //{{{ getViewConfig() method
+ /**
+ * @return a ViewConfig instance for the current view
+ * @since jEdit 4.2pre1
+ */
+ public ViewConfig getViewConfig()
+ {
+ ViewConfig config = new ViewConfig();
+ config.plainView = isPlainView();
+ config.splitConfig = getSplitConfig();
+ config.extState = getExtendedState();
+ config.docking = dockableWindowManager.getDockingLayout(config);
+ config.title = userTitle;
+ String prefix = config.plainView ? "plain-view" : "view";
+ switch (config.extState)
+ {
+ case Frame.MAXIMIZED_BOTH:
+ case Frame.ICONIFIED:
+ config.x = jEdit.getIntegerProperty(prefix + ".x",getX());
+ config.y = jEdit.getIntegerProperty(prefix + ".y",getY());
+ config.width = jEdit.getIntegerProperty(prefix + ".width",getWidth());
+ config.height = jEdit.getIntegerProperty(prefix + ".height",getHeight());
+ break;
+
+ case Frame.MAXIMIZED_VERT:
+ config.x = getX();
+ config.y = jEdit.getIntegerProperty(prefix + ".y",getY());
+ config.width = getWidth();
+ config.height = jEdit.getIntegerProperty(prefix + ".height",getHeight());
+ break;
+
+ case Frame.MAXIMIZED_HORIZ:
+ config.x = jEdit.getIntegerProperty(prefix + ".x",getX());
+ config.y = getY();
+ config.width = jEdit.getIntegerProperty(prefix + ".width",getWidth());
+ config.height = getHeight();
+ break;
+
+ case Frame.NORMAL:
+ default:
+ config.x = getX();
+ config.y = getY();
+ config.width = getWidth();
+ config.height = getHeight();
+ break;
+ }
+ return config;
+ } //}}}
+
+ //}}}
+
+ //{{{ isClosed() method
+ /**
+ * Returns true if this view has been closed with
+ * {@link jEdit#closeView(View)}.
+ * @return true if the view is closed
+ */
+ public boolean isClosed()
+ {
+ return closed;
+ } //}}}
+
+ //{{{ isPlainView() method
+ /**
+ * Returns true if this is an auxilliary view with no dockable windows.
+ * @return true if the view is plain
+ * @since jEdit 4.1pre2
+ */
+ public boolean isPlainView()
+ {
+ return plainView;
+ } //}}}
+
+ //{{{ getNext() method
+ /**
+ * Returns the next view in the list.
+ * @return the next view
+ */
+ public View getNext()
+ {
+ return next;
+ } //}}}
+
+ //{{{ getPrev() method
+ /**
+ * Returns the previous view in the list.
+ * @return the preview view
+ */
+ public View getPrev()
+ {
+ return prev;
+ } //}}}
+
+ //{{{ handlePropertiesChanged()
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
+ {
+ propertiesChanged();
+ } //}}}
+
+ //{{{ handleSearchSettingsChanged() method
+ @EBHandler
+ public void handleSearchSettingsChanged(SearchSettingsChanged msg)
+ {
+ if(searchBar != null)
+ searchBar.update();
+ } //}}}
+
+ //{{{ getMinimumSize() method
+ @Override
+ public Dimension getMinimumSize()
+ {
+ return new Dimension(0,0);
+ } //}}}
+
+ //{{{ setWaitSocket() method
+ /**
+ * This socket is closed when the buffer is closed.
+ */
+ public void setWaitSocket(Socket waitSocket)
+ {
+ this.waitSocket = waitSocket;
+ } //}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ return getClass().getName() + '['
+ + (jEdit.getActiveView() == this
+ ? "active" : "inactive")
+ + ']';
+ } //}}}
+
+ //{{{ updateTitle() method
+ /**
+ * Updates the title bar.
+ */
+ public void updateTitle()
+ {
+ List<Buffer> buffers = new ArrayList<Buffer>();
+ EditPane[] editPanes = getEditPanes();
+ for(int i = 0; i < editPanes.length; i++)
+ {
+ Buffer buffer = editPanes[i].getBuffer();
+ if(!buffers.contains(buffer))
+ buffers.add(buffer);
+ }
+
+ StringBuilder title = new StringBuilder();
+
+ /* On Mac OS X, apps are not supposed to show their name in the
+ title bar. */
+ if(!OperatingSystem.isMacOS())
+ {
+ if (userTitle != null)
+ title.append(userTitle);
+ else
+ title.append(jEdit.getProperty("view.title"));
+ }
+
+ for(int i = 0; i < buffers.size(); i++)
+ {
+ if(i != 0)
+ title.append(", ");
+
+ Buffer buffer = buffers.get(i);
+ title.append(showFullPath && !buffer.isNewFile()
+ ? buffer.getPath(true) : buffer.getName());
+ if(buffer.isDirty())
+ title.append(jEdit.getProperty("view.title.dirty"));
+ }
+
+ setTitle(title.toString());
+ } //}}}
+
+ //{{{ setUserTitle() method
+ /**
+ * Sets a user-defined title for this view instead of the "view.title" property.
+ */
+ public void setUserTitle(String title)
+ {
+ userTitle = title + " - ";
+ updateTitle();
+ } //}}}
+
+ //{{{ showUserTitleDialog() method
+ /**
+ * Shows a dialog for selecting a user-defined title for this view.
+ */
+ public void showUserTitleDialog()
+ {
+ String title = JOptionPane.showInputDialog(this, jEdit.getProperty(
+ "view.title.select"));
+ if (title == null)
+ return;
+ setUserTitle(title);
+ } //}}}
+
+ //{{{ getPrefixFocusOwner() method
+ public Component getPrefixFocusOwner()
+ {
+ return prefixFocusOwner;
+ } //}}}
+
+ //{{{ setPrefixFocusOwner() method
+ public void setPrefixFocusOwner(Component prefixFocusOwner)
+ {
+ this.prefixFocusOwner = prefixFocusOwner;
+ } //}}}
+
+ //{{{ visit() method
+ /**
+ * Visit the the editpanes and textareas of the view
+ * @param visitor the visitor
+ * @since jEdit 4.3pre13
+ */
+ public void visit(JEditVisitor visitor)
+ {
+ EditPane[] panes = getEditPanes();
+ for (int i = 0; i < panes.length; i++)
+ {
+ EditPane editPane = panes[i];
+ visitor.visit(editPane);
+ visitor.visit(editPane.getTextArea());
+ }
+ } //}}}
+
+ // {{{ closeAllMenus()
+ /** closes any popup menus that may have been opened
+ @since jEdit 4.4pre1
+ */
+ public void closeAllMenus()
+ {
+ MenuSelectionManager.defaultManager().clearSelectedPath();
+ KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
+ } // }}}
+
+ //{{{ Package-private members
+ View prev;
+ View next;
+
+ //{{{ View constructor
+ View(Buffer buffer, ViewConfig config)
+ {
+ fullScreenMode = false;
+ menuBar = null;
+ plainView = config.plainView;
+
+ enableEvents(AWTEvent.KEY_EVENT_MASK);
+
+ setIconImage(GUIUtilities.getEditorIcon());
+
+ mainPanel = new JPanel();
+ mainPanel.setLayout(new BorderLayout());
+ dockableWindowManager = getDockingFrameworkProvider().create(this,
+ DockableWindowFactory.getInstance(), config);
+ userTitle = config.title;
+ dockableWindowManager.setMainPanel(mainPanel);
+
+ topToolBars = new JPanel(new VariableGridLayout(
+ VariableGridLayout.FIXED_NUM_COLUMNS,
+ 1));
+ bottomToolBars = new JPanel(new VariableGridLayout(
+ VariableGridLayout.FIXED_NUM_COLUMNS,
+ 1));
+
+ toolBarManager = new ToolBarManager(topToolBars, bottomToolBars);
+
+ status = new StatusBar(this);
+
+ inputHandler = new DefaultInputHandler(this,(DefaultInputHandler)
+ jEdit.getInputHandler());
+
+ setSplitConfig(buffer,config.splitConfig);
+
+ getContentPane().add(BorderLayout.CENTER,dockableWindowManager);
+
+ dockableWindowManager.init();
+
+ // tool bar and status bar gets added in propertiesChanged()
+ // depending in the 'tool bar alternate layout' setting.
+ propertiesChanged();
+
+ setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
+ addWindowListener(new WindowHandler());
+
+ setFocusTraversalPolicy(new MyFocusTraversalPolicy());
+
+ EditBus.addToBus(this);
+
+ GUIUtilities.addSizeSaver(this, null, plainView ? "plain-view" : "view");
+ } //}}}
+
+ //{{{ updateFullScreenProps() method
+ public void updateFullScreenProps()
+ {
+ boolean alternateLayout = jEdit.getBooleanProperty(
+ "view.toolbar.alternateLayout");
+ boolean showMenu = jEdit.getBooleanProperty("fullScreenIncludesMenu");
+ boolean showToolbars = jEdit.getBooleanProperty("fullScreenIncludesToolbar");
+ boolean showStatus = jEdit.getBooleanProperty("fullScreenIncludesStatus");
+ if (! showMenu)
+ {
+ menuBar = getJMenuBar();
+ setJMenuBar(null);
+ }
+ else if (menuBar != null)
+ setJMenuBar(menuBar);
+ // Note: Bottom toolbar is the action bar, which is always enabled
+ loadToolBars();
+ if (alternateLayout)
+ {
+ if (! showStatus)
+ removeToolBar(status);
+ else
+ addToolBar(BOTTOM_GROUP,STATUS_BAR_LAYER,status);
+ }
+ else
+ {
+ if (! showStatus)
+ getContentPane().remove(status);
+ else
+ getContentPane().add(BorderLayout.SOUTH,status);
+ }
+ } //}}}
+
+ //{{{ toggleFullScreen() method
+ public void toggleFullScreen()
+ {
+ fullScreenMode = (! fullScreenMode);
+ GraphicsDevice sd = getGraphicsConfiguration().getDevice();
+ dispose();
+ if (fullScreenMode)
+ {
+ updateFullScreenProps();
+ windowedBounds = getBounds();
+ setUndecorated(true);
+ setBounds(sd.getDefaultConfiguration().getBounds());
+ validate();
+ }
+ else
+ {
+ boolean showStatus = plainView ? jEdit.getBooleanProperty("view.status.plainview.visible") :
+ jEdit.getBooleanProperty("view.status.visible");
+ if ((menuBar != null) && (getJMenuBar() != menuBar))
+ setJMenuBar(menuBar);
+ boolean alternateLayout = jEdit.getBooleanProperty(
+ "view.toolbar.alternateLayout");
+ loadToolBars();
+ if (showStatus)
+ {
+ if (alternateLayout)
+ addToolBar(BOTTOM_GROUP,STATUS_BAR_LAYER,status);
+ else
+ getContentPane().add(BorderLayout.SOUTH,status);
+ }
+ setUndecorated(false);
+ setBounds(windowedBounds);
+ }
+ setVisible(true);
+ toFront();
+ closeAllMenus();
+ // so you can keep typing in your editpane afterwards...
+ editPane.getTextArea().requestFocus();
+ } //}}}
+
+ //{{{ confirmToCloseDirty() methods
+ /**
+ * If the view contains dirty buffers which will be closed on
+ * closing the view, show the confirmation dialog for user.
+ * @return
+ * true if there are no such buffers or user select OK
+ * to close the view; false if user select Cancel
+ */
+ boolean confirmToCloseDirty()
+ {
+ Set<Buffer> checkingBuffers = getOpenBuffers();
+ for (View view: jEdit.getViews())
+ {
+ if (view != this)
+ {
+ checkingBuffers.removeAll(
+ view.getOpenBuffers());
+ }
+ }
+ for (Buffer buffer: checkingBuffers)
+ {
+ if (buffer.isDirty())
+ {
+ return new CloseDialog(this, checkingBuffers).isOK();
+ }
+ }
+ return true;
+ } //}}}
+
+ //{{{ close() method
+ void close()
+ {
+ EditBus.send(new ViewUpdate(this,ViewUpdate.CLOSED));
+ closed = true;
+
+ // save dockable window geometry, and close 'em
+ dockableWindowManager.close();
+
+ EditBus.removeFromBus(this);
+ dispose();
+
+ EditPane[] editPanes = getEditPanes();
+ for(int i = 0; i < editPanes.length; i++)
+ editPanes[i].close();
+
+ // null some variables so that retaining references
+ // to closed views won't hurt as much.
+ toolBarManager = null;
+ toolBar = null;
+ searchBar = null;
+ splitPane = null;
+ inputHandler = null;
+ recorder = null;
+
+ getContentPane().removeAll();
+
+ // notify clients with -wait
+ if(waitSocket != null)
+ {
+ try
+ {
+ waitSocket.getOutputStream().write('\0');
+ waitSocket.getOutputStream().flush();
+ waitSocket.getInputStream().close();
+ waitSocket.getOutputStream().close();
+ waitSocket.close();
+ }
+ catch(IOException io)
+ {
+ //Log.log(Log.ERROR,this,io);
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private boolean closed;
+
+ private DockableWindowManager dockableWindowManager;
+ private JPanel mainPanel;
+
+ private JPanel topToolBars;
+ private JPanel bottomToolBars;
+ private ToolBarManager toolBarManager;
+
+ private Container toolBar;
+ private SearchBar searchBar;
+ private ActionBar actionBar;
+
+ private EditPane editPane;
+ private JSplitPane splitPane;
+ private String lastSplitConfig;
+
+ private StatusBar status;
+
+ private InputHandler inputHandler;
+ private Macros.Recorder recorder;
+ private Component prefixFocusOwner;
+
+ private int waitCount;
+
+ private boolean showFullPath;
+
+ private boolean plainView;
+
+ private Socket waitSocket;
+ private Component mainContent;
+
+ private boolean fullScreenMode;
+ private Rectangle windowedBounds;
+ private JMenuBar menuBar;
+ private String userTitle;
+ //}}}
+
+ //{{{ setMainContent() method
+ private void setMainContent(Component c)
+ {
+ if (mainContent != null)
+ mainPanel.remove(mainContent);
+ mainContent = c;
+ mainPanel.add(mainContent, BorderLayout.CENTER);
+ if (c instanceof JSplitPane)
+ {
+ splitPane = (JSplitPane)c;
+ }
+ else
+ {
+ splitPane = null;
+ editPane = (EditPane)c;
+ }
+ mainPanel.revalidate();
+ mainPanel.repaint();
+ } //}}}
+
+ //{{{ getEditPanes() method
+ private static void getEditPanes(List<EditPane> vec, Component comp)
+ {
+ if(comp instanceof EditPane)
+ vec.add((EditPane) comp);
+ else if(comp instanceof JSplitPane)
+ {
+ JSplitPane split = (JSplitPane)comp;
+ getEditPanes(vec,split.getLeftComponent());
+ getEditPanes(vec,split.getRightComponent());
+ }
+ } //}}}
+
+ //{{{ showBuffer() method
+ private EditPane showBuffer(Buffer buffer, boolean focus)
+ {
+ if(editPane.getBuffer() == buffer
+ && editPane.getTextArea().getVisibleLines() > 1)
+ {
+ if (focus)
+ editPane.focusOnTextArea();
+ return editPane;
+ }
+
+ EditPane[] editPanes = getEditPanes();
+ for(int i = 0; i < editPanes.length; i++)
+ {
+ EditPane ep = editPanes[i];
+ if(ep.getBuffer() == buffer
+ /* ignore zero-height splits, etc */
+ && ep.getTextArea().getVisibleLines() > 1)
+ {
+ setEditPane(ep);
+ if (focus)
+ ep.focusOnTextArea();
+ return ep;
+ }
+ }
+
+ setBuffer(buffer,false, focus);
+ return editPane;
+ } //}}}
+
+ //{{{ getSplitConfig() method
+ /*
+ * The split config is recorded in a simple RPN "language".
+ */
+ private static void getSplitConfig(JSplitPane splitPane,
+ StringBuilder splitConfig)
+ {
+ Component right = splitPane.getRightComponent();
+ appendToSplitConfig(splitConfig, right);
+
+ splitConfig.append(' ');
+
+ Component left = splitPane.getLeftComponent();
+ appendToSplitConfig(splitConfig, left);
+
+ splitConfig.append(' ');
+ splitConfig.append(splitPane.getDividerLocation());
+ splitConfig.append(' ');
+ splitConfig.append(splitPane.getOrientation()
+ == JSplitPane.VERTICAL_SPLIT ? "vertical" : "horizontal");
+ } //}}}
+
+ //{{{ appendToSplitConfig() method
+ /**
+ * Append the Component to the split config.
+ * The component must be a JSplitPane or an EditPane
+ *
+ * @param splitConfig the split config
+ * @param component the component
+ */
+ private static void appendToSplitConfig(StringBuilder splitConfig, Component component)
+ {
+ if(component instanceof JSplitPane)
+ {
+ // the component is a JSplitPane
+ getSplitConfig((JSplitPane)component,splitConfig);
+ }
+ else
+ {
+ // the component is an editPane
+ EditPane editPane = (EditPane) component;
+ splitConfig.append('"');
+ splitConfig.append(StandardUtilities.charsToEscapes(
+ editPane.getBuffer().getPath()));
+ splitConfig.append("\" buffer");
+ BufferSet bufferSet = editPane.getBufferSet();
+ Buffer[] buffers = bufferSet.getAllBuffers();
+ for (Buffer buffer : buffers)
+ {
+ if (!buffer.isNewFile())
+ {
+ splitConfig.append(" \"");
+ splitConfig.append(StandardUtilities.charsToEscapes(
+ buffer.getPath()));
+ splitConfig.append("\" buff");
+ }
+ }
+ splitConfig.append(" \"");
+ splitConfig.append(jEdit.getBufferSetManager().getScope());
+ splitConfig.append("\" bufferset");
+ }
+ } //}}}
+
+ //{{{ restoreSplitConfig() method
+ private Component restoreSplitConfig(Buffer buffer, String splitConfig)
+ throws IOException
+ // this is where checked exceptions piss me off. this method only uses
+ // a StringReader which can never throw an exception...
+ {
+ if(buffer != null)
+ {
+ return editPane = createEditPane(buffer);
+ }
+ else if(splitConfig == null || splitConfig.trim().length() == 0)
+ {
+
+ Buffer buf = jEdit.getFirstBuffer();
+ if (buf == null)
+ {
+ buf = BufferSetManager.createUntitledBuffer();
+ }
+ return editPane = createEditPane(buf);
+ }
+ Buffer[] buffers = jEdit.getBuffers();
+
+ Stack<Object> stack = new Stack<Object>();
+
+ // we create a stream tokenizer for parsing a simple
+ // stack-based language
+ StreamTokenizer st = new StreamTokenizer(new StringReader(
+ splitConfig));
+ st.whitespaceChars(0,' ');
+ /* all printable ASCII characters */
+ st.wordChars('#','~');
+ st.commentChar('!');
+ st.quoteChar('"');
+ st.eolIsSignificant(false);
+ boolean continuousLayout = jEdit.getBooleanProperty("appearance.continuousLayout");
+ List<Buffer> editPaneBuffers = new ArrayList<Buffer>();
+loop: while (true)
+ {
+ switch(st.nextToken())
+ {
+ case StreamTokenizer.TT_EOF:
+ break loop;
+ case StreamTokenizer.TT_WORD:
+ if(st.sval.equals("vertical") ||
+ st.sval.equals("horizontal"))
+ {
+ int orientation
+ = st.sval.equals("vertical")
+ ? JSplitPane.VERTICAL_SPLIT
+ : JSplitPane.HORIZONTAL_SPLIT;
+ int divider = ((Integer)stack.pop())
+ .intValue();
+ Object obj1 = stack.pop();
+ Object obj2 = stack.pop();
+ // Backward compatibility with pre-bufferset versions
+ if (obj1 instanceof Buffer)
+ {
+ Buffer b1 = buffer = (Buffer) obj1;
+ obj1 = editPane = createEditPane(b1);
+ }
+ if (obj2 instanceof Buffer)
+ {
+ Buffer b2 = (Buffer) obj2;
+ obj2 = createEditPane(b2);
+ }
+ stack.push(splitPane = new JSplitPane(
+ orientation,
+ continuousLayout,
+ (Component)obj1,
+ (Component)obj2));
+ splitPane.setOneTouchExpandable(true);
+ splitPane.setBorder(null);
+ splitPane.setMinimumSize(
+ new Dimension(0,0));
+ splitPane.setDividerLocation(divider);
+ }
+ else if(st.sval.equals("buffer"))
+ {
+ Object obj = stack.pop();
+ if(obj instanceof Integer)
+ {
+ int index = ((Integer)obj).intValue();
+ if(index >= 0 && index < buffers.length)
+ buffer = buffers[index];
+ }
+ else if(obj instanceof String)
+ {
+ String path = (String)obj;
+ buffer = jEdit.getBuffer(path);
+ if (buffer == null)
+ {
+ buffer = jEdit.openTemporary(jEdit.getActiveView(), null,
+ path, true, null);
+ jEdit.commitTemporary(buffer);
+ }
+ }
+
+ if(buffer == null)
+ buffer = jEdit.getFirstBuffer();
+ stack.push(buffer);
+ editPaneBuffers.add(buffer);
+ }
+ else if (st.sval.equals("buff"))
+ {
+ String path = (String)stack.pop();
+ buffer = jEdit.getBuffer(path);
+ if (buffer == null)
+ {
+ Log.log(Log.WARNING, this, "Buffer " + path + " doesn't exist");
+ }
+ else
+ {
+ editPaneBuffers.add(buffer);
+ }
+ }
+ else if (st.sval.equals("bufferset"))
+ {
+ // pop the bufferset scope. Not used anymore but still here for compatibility
+ // with old perspectives
+ stack.pop();
+ buffer = (Buffer) stack.pop();
+ editPane = createEditPane(buffer);
+ stack.push(editPane);
+ BufferSet bufferSet = editPane.getBufferSet();
+ int i = 0;
+ for (Buffer buff : editPaneBuffers)
+ {
+ bufferSet.addBufferAt(buff,i);
+ i++;
+ }
+ editPaneBuffers.clear();
+ }
+ break;
+ case StreamTokenizer.TT_NUMBER:
+ stack.push((int)st.nval);
+ break;
+ case '"':
+ stack.push(st.sval);
+ break;
+ }
+ }
+
+ // Backward compatibility with pre-bufferset versions
+ Object obj = stack.peek();
+ if (obj instanceof Buffer)
+ {
+ obj = editPane = createEditPane((Buffer)obj);
+ }
+
+ updateGutterBorders();
+
+ return (Component)obj;
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ /**
+ * Reloads various settings from the properties.
+ */
+ private void propertiesChanged()
+ {
+ setJMenuBar(GUIUtilities.loadMenuBar("view.mbar"));
+
+ loadToolBars();
+
+ showFullPath = jEdit.getBooleanProperty("view.showFullPath");
+ updateTitle();
+
+ status.propertiesChanged();
+
+ removeToolBar(status);
+ getContentPane().remove(status);
+
+ boolean showStatus = plainView ? jEdit.getBooleanProperty("view.status.plainview.visible") :
+ jEdit.getBooleanProperty("view.status.visible");
+ if (jEdit.getBooleanProperty("view.toolbar.alternateLayout"))
+ {
+ getContentPane().add(BorderLayout.NORTH,topToolBars);
+ getContentPane().add(BorderLayout.SOUTH,bottomToolBars);
+ if (showStatus)
+ addToolBar(BOTTOM_GROUP,STATUS_BAR_LAYER,status);
+ }
+ else
+ {
+ mainPanel.add(topToolBars, BorderLayout.NORTH);
+ mainPanel.add(bottomToolBars, BorderLayout.SOUTH);
+ if (showStatus)
+ getContentPane().add(BorderLayout.SOUTH,status);
+ }
+ updateBufferSwitcherStates();
+
+ getRootPane().revalidate();
+
+ if (splitPane != null)
+ GUIUtilities.initContinuousLayout(splitPane);
+ //SwingUtilities.updateComponentTreeUI(getRootPane());
+
+ if (fullScreenMode)
+ updateFullScreenProps();
+ } //}}}
+
+ //{{{ updateBufferSwitcherStates() method
+ /**
+ * Enables or Disables the "Focus Buffer Switcher" menu item in the View menu
+ * depending on the visible state of the buffer switcher. The menu item
+ * is intended to have the same effect as clicking on the buffer switcher
+ * combo box, and it doesn't make sense to have this action available if
+ * the buffer switcher isn't visible.
+ * Also shows or hides the Buffer Switcher itself, since this can be invoked after
+ * the toggle buffer switcher action.
+ */
+ public void updateBufferSwitcherStates()
+ {
+ boolean show = jEdit.getBooleanProperty("view.showBufferSwitcher");
+ JMenuBar menubar = getJMenuBar();
+ if (menubar == null)
+ {
+ return;
+ }
+ String viewmenu_label = jEdit.getProperty("view.label");
+ viewmenu_label = viewmenu_label.replace("$", "");
+ String sbs_label = jEdit.getProperty("focus-buffer-switcher.label");
+ sbs_label = sbs_label.replace("$", "");
+ JMenu viewmenu = null;
+ for (int i = 0; i < menubar.getMenuCount(); i++)
+ {
+ JMenu menu = menubar.getMenu(i);
+ if (menu.getText().equals(viewmenu_label))
+ {
+ viewmenu = menu;
+ break;
+ }
+ }
+ if (viewmenu != null)
+ {
+ for (int i = 0; i < viewmenu.getMenuComponentCount(); i++)
+ {
+ Component item = viewmenu.getMenuComponent(i);
+ if (item instanceof JMenuItem && ((JMenuItem)item).getText().equals(sbs_label))
+ {
+ item.setEnabled(show);
+ // viewmenu.invalidate();
+ }
+ }
+ }
+ // Toggle the visibility of the BufferSwitcher itself
+ for (View v: jEdit.getViews())
+ for (EditPane ep: v.getEditPanes())
+ ep.loadBufferSwitcher();
+ } //}}}
+
+
+ //{{{ loadToolBars() method
+ private void loadToolBars()
+ {
+ if((! plainView) && (fullScreenMode ?
+ jEdit.getBooleanProperty("fullScreenIncludesToolbar") :
+ jEdit.getBooleanProperty("view.showToolbar")))
+ {
+ if(toolBar != null)
+ toolBarManager.removeToolBar(toolBar);
+
+ toolBar = GUIUtilities.loadToolBar("view.toolbar");
+
+ addToolBar(TOP_GROUP, SYSTEM_BAR_LAYER, toolBar);
+ }
+ else if(toolBar != null)
+ {
+ removeToolBar(toolBar);
+ toolBar = null;
+ }
+
+ if(searchBar != null)
+ {
+ searchBar.propertiesChanged();
+ removeToolBar(searchBar);
+ }
+
+ if(jEdit.getBooleanProperty("view.showSearchbar") && !plainView)
+ {
+ if(searchBar == null)
+ searchBar = new SearchBar(this,false);
+ addToolBar(TOP_GROUP,SEARCH_BAR_LAYER,searchBar);
+ }
+ } //}}}
+
+ //{{{ createEditPane() methods
+ private EditPane createEditPane(Buffer buffer)
+ {
+ EditPane editPane = new EditPane(this, null, buffer);
+ JEditTextArea textArea = editPane.getTextArea();
+ textArea.addFocusListener(new FocusHandler());
+ textArea.addCaretListener(new CaretHandler());
+ textArea.addScrollListener(new ScrollHandler());
+ EditBus.send(new EditPaneUpdate(editPane,EditPaneUpdate.CREATED));
+ return editPane;
+ }
+
+ private EditPane createEditPane(EditPane oldEditPane)
+ {
+ EditPane editPane = new EditPane(this, oldEditPane.getBufferSet(), oldEditPane.getBuffer());
+ JEditTextArea textArea = editPane.getTextArea();
+ textArea.addFocusListener(new FocusHandler());
+ textArea.addCaretListener(new CaretHandler());
+ textArea.addScrollListener(new ScrollHandler());
+ EditBus.send(new EditPaneUpdate(editPane,EditPaneUpdate.CREATED));
+ return editPane;
+ } //}}}
+
+ //{{{ setEditPane() method
+ private void setEditPane(EditPane editPane)
+ {
+ this.editPane = editPane;
+ status.updateCaretStatus();
+ status.updateBufferStatus();
+ status.updateMiscStatus();
+
+ // repaint the gutter so that the border color
+ // reflects the focus state
+ updateGutterBorders();
+
+ EditBus.send(new ViewUpdate(this,ViewUpdate.EDIT_PANE_CHANGED));
+ } //}}}
+
+ //{{{ handleBufferUpdate() method
+ @EBHandler
+ public void handleBufferUpdate(BufferUpdate msg)
+ {
+ Buffer buffer = msg.getBuffer();
+ if(msg.getWhat() == BufferUpdate.DIRTY_CHANGED
+ || msg.getWhat() == BufferUpdate.LOADED)
+ {
+ EditPane[] editPanes = getEditPanes();
+ for(int i = 0; i < editPanes.length; i++)
+ {
+ if(editPanes[i].getBuffer() == buffer)
+ {
+ updateTitle();
+ break;
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ handleEditPaneUpdate() method
+ @EBHandler
+ public void handleEditPaneUpdate(EditPaneUpdate msg)
+ {
+ EditPane editPane = msg.getEditPane();
+ if(editPane != null &&
+ editPane.getView() == this
+ && msg.getWhat() == EditPaneUpdate.BUFFER_CHANGED
+ && editPane.getBuffer().isLoaded())
+ {
+ closeDuplicateBuffers(msg);
+ status.updateCaretStatus();
+ status.updateBufferStatus();
+ status.updateMiscStatus();
+ }
+ } //}}}
+
+ //{{{ closeDuplicateBuffers() method
+ private void closeDuplicateBuffers(EditPaneUpdate epu)
+ {
+ if (!jEdit.getBooleanProperty("buffersets.exclusive"))
+ return;
+ final BufferSet.Scope scope = jEdit.getBufferSetManager().getScope();
+ if (scope == BufferSet.Scope.global)
+ return;
+ final EditPane ep = epu.getEditPane();
+ /* Only one view needs to handle this message, since
+ we iterate through all the other views */
+ final View view = ep.getView();
+ if (view != this)
+ return;
+ final Buffer b = ep.getBuffer();
+
+ jEdit.visit(new JEditVisitorAdapter()
+ {
+ @Override
+ public void visit(EditPane editPane)
+ {
+ if (editPane == ep ||
+ (scope == BufferSet.Scope.view && editPane.getView() == view))
+ return;
+ if (editPane.getBufferSet().indexOf(b) < 0)
+ return;
+ jEdit.getBufferSetManager().removeBuffer(editPane, b);
+ }
+ });
+ } //}}}
+
+ //{{{ updateGutterBorders() method
+ /**
+ * Updates the borders of all gutters in this view to reflect the
+ * currently focused text area.
+ * @since jEdit 2.6final
+ */
+ private void updateGutterBorders()
+ {
+ EditPane[] editPanes = getEditPanes();
+ for(int i = 0; i < editPanes.length; i++)
+ editPanes[i].getTextArea().getGutter().updateBorder();
+ } //}}}
+
+ //{{{ getOpenBuffers() method
+ private Set<Buffer> getOpenBuffers()
+ {
+ Set<Buffer> openBuffers = new HashSet<Buffer>();
+ for (EditPane editPane: getEditPanes())
+ {
+ openBuffers.addAll(Arrays.asList(
+ editPane.getBufferSet().getAllBuffers()));
+ }
+ return openBuffers;
+ } //}}}
+
+ //{{{ mergeBufferSets() method
+ /**
+ * Merge a EditPane's BufferSet into another one.
+ * This is used on unsplitting panes not to close buffers.
+ * @param target the target bufferSet where we will merge buffers from source
+ * @param source the source bufferSet
+ */
+ private static void mergeBufferSets(EditPane target, EditPane source)
+ {
+ BufferSetManager manager = jEdit.getBufferSetManager();
+ for (Buffer buffer: source.getBufferSet().getAllBuffers())
+ {
+ manager.addBuffer(target, buffer);
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ CaretHandler class
+ private class CaretHandler implements CaretListener
+ {
+ public void caretUpdate(CaretEvent evt)
+ {
+ if(evt.getSource() == getTextArea())
+ status.updateCaretStatus();
+ }
+ } //}}}
+
+ //{{{ FocusHandler class
+ private class FocusHandler extends FocusAdapter
+ {
+ @Override
+ public void focusGained(FocusEvent evt)
+ {
+ // walk up hierarchy, looking for an EditPane
+ Component comp = (Component)evt.getSource();
+ while(!(comp instanceof EditPane))
+ {
+ if(comp == null)
+ return;
+
+ comp = comp.getParent();
+ }
+
+ if(comp != editPane)
+ setEditPane((EditPane)comp);
+ else
+ updateGutterBorders();
+ }
+ } //}}}
+
+ //{{{ ScrollHandler class
+ private class ScrollHandler implements ScrollListener
+ {
+ public void scrolledVertically(TextArea textArea)
+ {
+ if(getTextArea() == textArea)
+ status.updateCaretStatus();
+ }
+
+ public void scrolledHorizontally(TextArea textArea) {}
+ } //}}}
+
+ //{{{ WindowHandler class
+ private class WindowHandler extends WindowAdapter
+ {
+ @Override
+ public void windowActivated(WindowEvent evt)
+ {
+ boolean editPaneChanged =
+ jEdit.getActiveViewInternal() != View.this;
+ jEdit.setActiveView(View.this);
+
+ // People have reported hangs with JDK 1.4; might be
+ // caused by modal dialogs being displayed from
+ // windowActivated()
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ int check = jEdit.getIntegerProperty("checkFileStatus");
+ if(check == GeneralOptionPane.checkFileStatus_focus ||
+ check == GeneralOptionPane.checkFileStatus_all)
+ jEdit.checkBufferStatus(View.this,false);
+ else if(check == GeneralOptionPane.checkFileStatus_focusBuffer)
+ jEdit.checkBufferStatus(View.this,true);
+ }
+ });
+
+ if (editPaneChanged)
+ {
+ EditBus.send(new ViewUpdate(View.this,ViewUpdate
+ .ACTIVATED));
+ }
+ }
+
+ @Override
+ public void windowClosing(WindowEvent evt)
+ {
+ jEdit.closeView(View.this);
+ }
+ } //}}}
+
+ //{{{ ViewConfig class
+ public static class ViewConfig
+ {
+ public int x, y, width, height, extState;
+ public boolean plainView;
+ public String splitConfig;
+ public DockingLayout docking;
+ public String title;
+
+ public ViewConfig()
+ {
+ }
+
+ public ViewConfig(boolean plainView)
+ {
+ this.plainView = plainView;
+ String prefix = plainView ? "plain-view" : "view";
+ x = jEdit.getIntegerProperty(prefix + ".x",0);
+ y = jEdit.getIntegerProperty(prefix + ".y",0);
+ width = jEdit.getIntegerProperty(prefix + ".width",0);
+ height = jEdit.getIntegerProperty(prefix + ".height",0);
+ extState = jEdit.getIntegerProperty(prefix + ".extendedState", Frame.NORMAL);
+ }
+
+ public ViewConfig(boolean plainView, String splitConfig,
+ int x, int y, int width, int height, int extState)
+ {
+ this.plainView = plainView;
+ this.splitConfig = splitConfig;
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ this.extState = extState;
+ }
+ } //}}}
+
+ //{{{ isInsideScreen() method
+ private static boolean isInsideScreen(View parent, Rectangle r)
+ {
+ Rectangle bounds;
+ if (parent == null)
+ bounds = GUIUtilities.getScreenBounds();
+ else
+ bounds = parent.getGraphicsConfiguration().getBounds();
+ int minWidth = jEdit.getIntegerProperty("view.minStartupWidth");
+ int minHeight = jEdit.getIntegerProperty("view.minStartupHeight");
+ return r.x + r.width > bounds.x + minWidth && // right edge at minWidth pixels on the right of the left bound
+ r.x < bounds.x + bounds.width - minWidth && // left edge at minWidth pixels on the left of the right bound
+ r.y + r.height > bounds.y + minHeight && // bottom edge at minHeight pixels under the top bound
+ r.y < bounds.y + bounds.height - minHeight; // top edge at minHeight pixels on the top of the bottom bound
+ } //}}}
+
+ public void adjust(View parent, ViewConfig config)
+ {
+ if(config.width != 0 && config.height != 0)
+ {
+ Rectangle desired = new Rectangle(
+ config.x, config.y, config.width, config.height);
+ if (! isInsideScreen(parent, desired))
+ setLocationRelativeTo(parent);
+ else
+ {
+ if(OperatingSystem.isX11() && Debug.GEOMETRY_WORKAROUND)
+ new GUIUtilities.UnixWorkaround(this,"view",desired,config.extState);
+ else
+ {
+ setBounds(desired);
+ setExtendedState(config.extState);
+ }
+ }
+ }
+ else
+ setLocationRelativeTo(parent);
+ }
+
+ //{{{ MyFocusTraversalPolicy class
+ private static class MyFocusTraversalPolicy extends LayoutFocusTraversalPolicy
+ {
+ @Override
+ public Component getDefaultComponent(Container focusCycleRoot)
+ {
+ return GUIUtilities.getView(focusCycleRoot).getTextArea();
+ }
+ } //}}}
+
+ //{{{ SetCursorVisitor class
+ private static class SetCursorVisitor extends JEditVisitorAdapter
+ {
+ private final Cursor cursor;
+
+ SetCursorVisitor(Cursor cursor)
+ {
+ this.cursor = cursor;
+ }
+
+ @Override
+ public void visit(EditPane editPane)
+ {
+ editPane.setCursor(cursor);
+ }
+ }//}}}
+ //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/actions.dtd b/jEdit/org/gjt/sp/jedit/actions.dtd
index a86f4ca..dfd9025 100644
--- a/jEdit/org/gjt/sp/jedit/actions.dtd
+++ b/jEdit/org/gjt/sp/jedit/actions.dtd
@@ -1,16 +1,16 @@
-<!ENTITY % att-bool '( TRUE | FALSE )' >
-
-<!-- ACTIONS element -->
-<!ELEMENT ACTIONS ( ACTION+ ) >
-
-<!-- ACTION element -->
-<!ELEMENT ACTION ( CODE, (IS_SELECTED?) ) >
-<!ATTLIST ACTION
- NAME ID #REQUIRED
- NO_REPEAT %att-bool; "FALSE"
- NO_RECORD %att-bool; "FALSE"
- NO_REMEMBER_LAST %att-bool; "FALSE" >
-
-<!-- ACTION children -->
-<!ELEMENT CODE ( #PCDATA ) >
-<!ELEMENT IS_SELECTED ( #PCDATA ) >
+<!ENTITY % att-bool '( TRUE | FALSE )' >
+
+<!-- ACTIONS element -->
+<!ELEMENT ACTIONS ( ACTION+ ) >
+
+<!-- ACTION element -->
+<!ELEMENT ACTION ( CODE, (IS_SELECTED?) ) >
+<!ATTLIST ACTION
+ NAME ID #REQUIRED
+ NO_REPEAT %att-bool; "FALSE"
+ NO_RECORD %att-bool; "FALSE"
+ NO_REMEMBER_LAST %att-bool; "FALSE" >
+
+<!-- ACTION children -->
+<!ELEMENT CODE ( #PCDATA ) >
+<!ELEMENT IS_SELECTED ( #PCDATA ) >
diff --git a/jEdit/org/gjt/sp/jedit/actions.xml b/jEdit/org/gjt/sp/jedit/actions.xml
index a5f691c..7fc3eca 100644
--- a/jEdit/org/gjt/sp/jedit/actions.xml
+++ b/jEdit/org/gjt/sp/jedit/actions.xml
@@ -1,1550 +1,1599 @@
-<?xml version="1.0"?>
-<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
-
-<!-- jEdit action table -->
-<!-- Copyright (C) 2000, 2003 Slava Pestov -->
-
-<!-- :tabSize=8:indentSize=8:noTabs=false: -->
-<!-- :folding=indent:collapseFolds=1:mode=jedit-actions: -->
-
-<!-- Actions are the 'glue' that binds menu item selections and keystrokes -->
-<!-- to jEdit's APIs. For simplicity and compactness, they are written in -->
-<!-- the BeanShell scripting language. -->
-
-<ACTIONS>
-
-<ACTION NAME="about">
- <CODE>
- new AboutDialog(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="action-bar" NO_REPEAT="TRUE" NO_RECORD="TRUE" NO_REMEMBER_LAST="TRUE">
- <CODE>
- view.actionBar();
- </CODE>
-</ACTION>
-
-<ACTION NAME="add-explicit-fold">
- <CODE>
- textArea.addExplicitFold();
- </CODE>
-</ACTION>
-
-<ACTION NAME="add-buffer-to-favorites">
- <CODE>
- FavoritesVFS.addToFavorites(buffer.getPath(),VFS.DirectoryEntry.FILE);
- </CODE>
-</ACTION>
-
-<ACTION NAME="add-dir-to-favorites">
- <CODE>
- FavoritesVFS.addToFavorites(buffer.getDirectory(),VFS.DirectoryEntry.DIRECTORY);
- </CODE>
-</ACTION>
-
-<ACTION NAME="add-marker">
- <CODE>
- editPane.addMarker();
- </CODE>
-</ACTION>
-
-<ACTION NAME="add-marker-shortcut" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- buffer.getMarkerStatusPrompt("add-marker"),
- "buffer.addMarker(__char__,textArea.getCaretPosition());");
- </CODE>
-</ACTION>
-
-<ACTION NAME="backspace">
- <CODE>
- textArea.backspace();
- </CODE>
-</ACTION>
-
-<ACTION NAME="backspace-word">
- <CODE>
- textArea.backspaceWord();
- </CODE>
-</ACTION>
-
-<ACTION NAME="backspace-word-std">
- <CODE>
- textArea.backspaceWord(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="bottom-docking-area">
- <CODE>
- wm.getBottomDockingArea().showMostRecent();
- </CODE>
-</ACTION>
-
-<ACTION NAME="buffer-options">
- <CODE>
- new BufferOptions(view,buffer);
- </CODE>
-</ACTION>
-
-<ACTION NAME="center-caret">
- <CODE>
- textArea.centerCaret();
- </CODE>
-</ACTION>
-
-<ACTION NAME="close-all">
- <CODE>
- jEdit.closeAllBuffers(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="closeall-except-active">
- <CODE>
- org.gjt.sp.jedit.bufferset.BufferSet bufferSet = editPane.getBufferSet();
- Buffer[] buffers = bufferSet.getAllBuffers();
- for (Buffer buff:buffers)
- {
- if (buff != buffer)
- jEdit.closeBuffer(editPane,buff);
- }
- </CODE>
-</ACTION>
-
-<ACTION NAME="close-buffer">
- <CODE>
- jEdit.closeBuffer(editPane,buffer);
- </CODE>
-</ACTION>
-
-<ACTION NAME="global-close-buffer">
- <CODE>
- jEdit.closeBuffer(view,buffer);
- </CODE>
-</ACTION>
-
-<ACTION NAME="close-docking-area">
- <CODE>
- wm.closeCurrentArea();
- </CODE>
-</ACTION>
-
-<ACTION NAME="close-view">
- <CODE>
- jEdit.closeView(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="collapse-all-folds">
- <CODE>
- textArea.getDisplayManager().expandFolds(1);
- </CODE>
-</ACTION>
-
-<ACTION NAME="collapse-fold">
- <CODE>
- textArea.collapseFold();
- </CODE>
-</ACTION>
-
-<ACTION NAME="complete-word">
- <CODE>
- CompleteWord.completeWord(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="copy">
- <CODE>
- Registers.copy(textArea,'$');
- </CODE>
-</ACTION>
-
-<ACTION NAME="copy-append">
- <CODE>
- Registers.append(textArea,'$',"\n",false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="copy-append-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- jEdit.getRegisterStatusPrompt("copy-append-string-register"),
- "Registers.append(textArea,__char__,\"\\n\",false);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="copy-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- jEdit.getRegisterStatusPrompt("copy-string-register"),
- "Registers.copy(textArea,__char__);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="cut">
- <CODE>
- Registers.cut(textArea,'$');
- </CODE>
-</ACTION>
-
-<ACTION NAME="cut-append">
- <CODE>
- Registers.append(textArea,'$',"\n",true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="cut-append-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- jEdit.getRegisterStatusPrompt("cut-append-string-register"),
- "Registers.append(textArea,__char__,\"\\n\",true);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="cut-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- jEdit.getRegisterStatusPrompt("cut-string-register"),
- "Registers.cut(textArea,__char__);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="delete">
- <CODE>
- textArea.delete();
- </CODE>
-</ACTION>
-
-<ACTION NAME="delete-end-line">
- <CODE>
- textArea.deleteToEndOfLine();
- </CODE>
-</ACTION>
-
-<ACTION NAME="delete-line">
- <CODE>
- textArea.deleteLine();
- </CODE>
-</ACTION>
-
-<ACTION NAME="delete-paragraph">
- <CODE>
- textArea.deleteParagraph();
- </CODE>
-</ACTION>
-
-<ACTION NAME="delete-start-line">
- <CODE>
- textArea.deleteToStartOfLine();
- </CODE>
-</ACTION>
-
-<ACTION NAME="delete-word">
- <CODE>
- textArea.deleteWord();
- </CODE>
-</ACTION>
-
-<ACTION NAME="delete-word-std">
- <CODE>
- textArea.deleteWord(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="document-end">
- <CODE>
- textArea.goToBufferEnd(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="document-home">
- <CODE>
- textArea.goToBufferStart(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="edit-favorites">
- <CODE>
- VFSBrowser.browseDirectory(view,"favorites:");
- </CODE>
-</ACTION>
-
-<ACTION NAME="edit-syntax-style">
- <CODE>
- buffer.editSyntaxStyle(textArea);
- </CODE>
-</ACTION>
-
-<ACTION NAME="end" NO_RECORD="TRUE">
- <CODE>
- textArea.end(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="smart-end" NO_RECORD="TRUE">
- <CODE>
- textArea.smartEnd(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="eval" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- BeanShell.showEvaluateDialog(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="eval-for-selected-lines">
- <CODE>
- BeanShell.showEvaluateLinesDialog(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="eval-selection">
- <CODE>
- BeanShell.evalSelection(view,textArea);
- </CODE>
-</ACTION>
-
-<ACTION NAME="expand-abbrev">
- <CODE>
- Abbrevs.expandAbbrev(view,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="expand-all-folds">
- <CODE>
- textArea.getDisplayManager().expandAllFolds();
- textArea.scrollToCaret(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="exit">
- <CODE>
- jEdit.exit(view,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="expand-fold">
- <CODE>
- textArea.expandFold(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="expand-one-level">
- <CODE>
- textArea.expandFold(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="expand-folds" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- jEdit.getProperty("view.status.expand-folds"),
- "textArea.getDisplayManager().expandFolds(__char__);\n"
- + "textArea.scrollToCaret(false);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="find" NO_RECORD="TRUE">
- <CODE>
- SearchDialog.showSearchDialog(view,textArea.getSelectedText(),SearchDialog.CURRENT_BUFFER);
- </CODE>
-</ACTION>
-
-<ACTION NAME="find-next" NO_RECORD="TRUE">
- <CODE>
- SearchAndReplace.setReverseSearch(false);
- SearchAndReplace.find(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="find-prev" NO_RECORD="TRUE">
- <CODE>
- SearchAndReplace.setReverseSearch(true);
- SearchAndReplace.find(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="format-paragraph">
- <CODE>
- textArea.formatParagraph();
- </CODE>
-</ACTION>
-
-<ACTION NAME="global-options">
- <CODE>
- new GlobalOptions(view);
- </CODE>
-</ACTION>
-<ACTION NAME="global-bufferset">
- <CODE>
- editPane.setBufferSetScope(BufferSet.Scope.global);
- </CODE>
-</ACTION>
-<ACTION NAME="view-bufferset">
- <CODE>
- editPane.setBufferSetScope(BufferSet.Scope.view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="bufferset-toggle-exclusive">
-<CODE>
- jEdit.setBooleanProperty("buffersets.exclusive",
- !jEdit.getBooleanProperty("buffersets.exclusive"));
-</CODE>
-<IS_SELECTED>
- jEdit.getBooleanProperty("buffersets.exclusive");
-</IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="editpane-bufferset">
- <CODE>
- editPane.setBufferSetScope(BufferSet.Scope.editpane);
- </CODE>
-</ACTION>
-
-<ACTION NAME="goto-line">
- <CODE>
- textArea.showGoToLineDialog();
- </CODE>
-</ACTION>
-
-<ACTION NAME="goto-marker" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- buffer.getMarkerStatusPrompt("goto-marker"),
- "editPane.goToMarker(__char__,false);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="help">
- <CODE>
- new HelpViewer();
- </CODE>
-</ACTION>
-
-<ACTION NAME="smart-home" NO_RECORD="TRUE">
- <CODE>
- textArea.smartHome(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="home" NO_RECORD="TRUE">
- <CODE>
- textArea.home(false);
- </CODE>
-</ACTION>
-
-
-<ACTION NAME="hypersearch" NO_RECORD="TRUE">
- <CODE>
- view.quickHyperSearch(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="hypersearch-word" NO_RECORD="TRUE">
- <CODE>
- view.quickHyperSearch(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="ignore-case">
- <CODE>
- SearchAndReplace.setIgnoreCase(!SearchAndReplace.getIgnoreCase());
- </CODE>
- <IS_SELECTED>
- SearchAndReplace.getIgnoreCase();
- </IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="indent-lines">
- <CODE>
- textArea.indentSelectedLines();
- </CODE>
-</ACTION>
-
-<ACTION NAME="insert-literal">
- <CODE>
- view.getInputHandler().readNextChar(
- jEdit.getProperty("view.status.insert-literal"),
- "textArea.setSelectedText(String.valueOf(__char__));");
- </CODE>
-</ACTION>
-
-<ACTION NAME="insert-newline">
- <CODE>
- textArea.userInput('\n');
- </CODE>
-</ACTION>
-
-<ACTION NAME="insert-tab">
- <CODE>
- textArea.userInput('\t');
- </CODE>
-</ACTION>
-
-<ACTION NAME="insert-newline-indent">
- <CODE>
- textArea.insertEnterAndIndent();
- </CODE>
-</ACTION>
-
-<ACTION NAME="insert-tab-indent">
- <CODE>
- textArea.insertTabAndIndent();
- </CODE>
-</ACTION>
-
-<ACTION NAME="invert-selection">
- <CODE>
- textArea.invertSelection();
- </CODE>
-</ACTION>
-
-<ACTION NAME="join-lines">
- <CODE>
- textArea.joinLines();
- </CODE>
-</ACTION>
-
-<ACTION NAME="keyboard-tester">
- <CODE>
- new GrabKeyDialog(view,null,null,jEdit.newFile(view));
- </CODE>
-</ACTION>
-
-<ACTION NAME="last-action" NO_RECORD="TRUE" NO_REMEMBER_LAST="TRUE">
- <CODE>
- view.getInputHandler().invokeLastAction();
- </CODE>
-</ACTION>
-
-<ACTION NAME="last-macro" NO_RECORD="TRUE" NO_REMEMBER_LAST="TRUE">
- <CODE>
- if(Macros.getLastMacro() == null)
- view.getToolkit().beep();
- else
- Macros.getLastMacro().invoke(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="left-docking-area">
- <CODE>
- wm.getLeftDockingArea().showMostRecent();
- </CODE>
-</ACTION>
-
-<ACTION NAME="line-comment">
- <CODE>
- textArea.lineComment();
- </CODE>
-</ACTION>
-
-<ACTION NAME="line-end">
- <CODE>
- textArea.goToEndOfLine(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="line-home">
- <CODE>
- textArea.goToStartOfLine(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="logs-remove-all-errors">
- <CODE>
- Log.throwables.clear();
- </CODE>
-</ACTION>
-
-<ACTION NAME="match-bracket">
- <CODE>
- textArea.goToMatchingBracket();
- </CODE>
-</ACTION>
-
-<ACTION NAME="memory-status">
- <CODE>
- jEdit.showMemoryDialog(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="narrow-to-fold">
- <CODE>
- textArea.narrowToFold();
- </CODE>
-</ACTION>
-
-<ACTION NAME="narrow-to-selection">
- <CODE>
- textArea.narrowToSelection();
- </CODE>
-</ACTION>
-
-<ACTION NAME="new-file">
- <CODE>
- jEdit.newFile(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="new-file-in-mode">
- <CODE>
- Mode[] modes = jEdit.getModes();
- Mode currentMode = buffer.getMode();
- String dialogTitle = jEdit.getProperty("new-file-in-mode.dialog.title");
- String dialogMessage = jEdit.getProperty("new-file-in-mode.dialog.message");
- Mode choice = (Mode)JOptionPane.showInputDialog(
- view,
- dialogMessage,
- dialogTitle,
- JOptionPane.QUESTION_MESSAGE,
- null,
- modes,
- currentMode);
- if(choice != null) {
- Buffer newBuffer = jEdit.newFile(view);
- view.goToBuffer(newBuffer);
- newBuffer.setMode(choice);
- }
- </CODE>
-</ACTION>
-
-<ACTION NAME="new-plain-view">
- <CODE>
- jEdit.newView(view,buffer,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="new-view">
- <CODE>
- jEdit.newView(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-bracket">
- <CODE>
- textArea.goToNextBracket(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-buffer">
- <CODE>
- editPane.nextBuffer();
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-char">
- <CODE>
- textArea.goToNextCharacter(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-fold">
- <CODE>
- textArea.goToNextFold(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-line">
- <CODE>
- textArea.goToNextLine(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-marker">
- <CODE>
- editPane.goToNextMarker(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-page">
- <CODE>
- textArea.goToNextPage(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-paragraph">
- <CODE>
- textArea.goToNextParagraph(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-textarea">
- <CODE>
- view.nextTextArea();
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-word">
- <CODE>
- textArea.goToNextWord(false,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="next-word-std">
- <CODE>
- textArea.goToNextWord(false,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="open-file">
- <CODE>
- GUIUtilities.showVFSFileDialog(view,null,VFSBrowser.BROWSER_DIALOG,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="overwrite" NO_RECORD="TRUE">
- <CODE>
- textArea.toggleOverwriteEnabled();
- </CODE>
- <IS_SELECTED>
- return textArea.isOverwriteEnabled();
- </IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="page-setup">
- <CODE>
- BufferPrinter1_4.pageSetup(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="parent-fold">
- <CODE>
- textArea.goToParentFold();
- </CODE>
-</ACTION>
-
-<ACTION NAME="paste">
- <CODE>
- Registers.paste(textArea,'$',false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="paste-deleted">
- <CODE>
- new PasteFromListDialog("paste-deleted",view,
- KillRing.getInstance());
- </CODE>
-</ACTION>
-
-<ACTION NAME="paste-previous">
- <CODE>
- new PasteFromListDialog("paste-previous",view,
- HistoryModel.getModel("clipboard"));
- </CODE>
-</ACTION>
-
-<ACTION NAME="paste-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- jEdit.getRegisterStatusPrompt("paste-string-register"),
- "Registers.paste(textArea,__char__,false);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="layout-save" NO_REPEAT="TRUE">
- <CODE>
- DockingLayoutManager.saveAs(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="layout-load" NO_REPEAT="TRUE">
- <CODE>
- DockingLayoutManager.load(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="layout-save-current-mode" NO_REPEAT="TRUE">
- <CODE>
- DockingLayoutManager.saveCurrentModeLayout(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="layout-load-current-mode" NO_REPEAT="TRUE">
- <CODE>
- DockingLayoutManager.loadCurrentModeLayout(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="plugin-manager">
- <CODE>
- PluginManager.showPluginManager(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="plugin-options">
- <CODE>
- new PluginOptions(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-bracket">
- <CODE>
- textArea.goToPrevBracket(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-buffer">
- <CODE>
- editPane.prevBuffer();
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-char">
- <CODE>
- textArea.goToPrevCharacter(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-fold">
- <CODE>
- textArea.goToPrevFold(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-line">
- <CODE>
- textArea.goToPrevLine(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-marker">
- <CODE>
- editPane.goToPrevMarker(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-page">
- <CODE>
- textArea.goToPrevPage(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-paragraph">
- <CODE>
- textArea.goToPrevParagraph(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-textarea">
- <CODE>
- view.prevTextArea();
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-word">
- <CODE>
- textArea.goToPrevWord(false,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="prev-word-std">
- <CODE>
- textArea.goToPrevWord(false,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="print">
- <CODE>
- if(jEdit.getBooleanProperty("print.force13"))
- BufferPrinter1_3.print(view,buffer,false);
- else
- BufferPrinter1_4.print(view,buffer,false);
- </CODE>
-</ACTION>
-
-<!-- not yet implemented -->
-
-<!-- <ACTION NAME="print-selection">
- <CODE>
- BufferPrinter.print(view,buffer,true);
- </CODE>
-</ACTION> -->
-
-<ACTION NAME="quick-search" NO_RECORD="TRUE">
- <CODE>
- view.quickIncrementalSearch(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="quick-search-word" NO_RECORD="TRUE">
- <CODE>
- view.quickIncrementalSearch(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="range-comment">
- <CODE>
- textArea.rangeComment();
- </CODE>
-</ACTION>
-
-<ACTION NAME="record-macro" NO_RECORD="TRUE">
- <CODE>
- Macros.recordMacro(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="record-temp-macro" NO_RECORD="TRUE">
- <CODE>
- Macros.recordTemporaryMacro(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="recent-buffer">
- <CODE>
- view.getEditPane().recentBuffer();
- </CODE>
-</ACTION>
-
-<ACTION NAME="redo">
- <CODE>
- buffer.redo(textArea);
- </CODE>
-</ACTION>
-
-<ACTION NAME="regexp">
- <CODE>
- SearchAndReplace.setRegexp(!SearchAndReplace.getRegexp());
- </CODE>
- <IS_SELECTED>
- SearchAndReplace.getRegexp();
- </IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="reload">
- <CODE>
- buffer.reload(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="reload-all">
- <CODE>
- jEdit.reloadAllBuffers(view,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="reload-modes">
- <CODE>
- jEdit.reloadModes();
- </CODE>
-</ACTION>
-
-<ACTION NAME="remove-all-markers">
- <CODE>
- buffer.removeAllMarkers();
- </CODE>
-</ACTION>
-
-<ACTION NAME="remove-marker" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- buffer.removeMarker(textArea.getCaretLine());
- </CODE>
-</ACTION>
-
-<ACTION NAME="remove-trailing-ws">
- <CODE>
- textArea.removeTrailingWhiteSpace();
- </CODE>
-</ACTION>
-
-<ACTION NAME="replace-all" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- SearchAndReplace.replaceAll(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="replace-and-find-next" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- if(SearchAndReplace.replace(view))
- SearchAndReplace.find(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="replace-in-selection" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- SearchAndReplace.replace(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="rescan-macros">
- <CODE>
- Macros.loadMacros();
- </CODE>
-</ACTION>
-
-<ACTION NAME="resplit">
- <CODE>
- view.resplit();
- </CODE>
-</ACTION>
-
-<ACTION NAME="right-docking-area">
- <CODE>
- wm.getRightDockingArea().showMostRecent();
- </CODE>
-</ACTION>
-
-<ACTION NAME="run-other-macro">
- <CODE>
- Macros.showRunScriptDialog(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="run-temp-macro" NO_RECORD="TRUE">
- <CODE>
- Macros.runTemporaryMacro(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="save">
- <CODE>
- buffer.save(view,null,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="save-all">
- <CODE>
- jEdit.saveAllBuffers(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="save-as">
- <CODE>
- buffer.saveAs(view,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="save-a-copy-as">
- <CODE>
- buffer.saveAs(view,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="scroll-down-line">
- <CODE>
- textArea.scrollDownLine();
- </CODE>
-</ACTION>
-
-<ACTION NAME="scroll-down-page">
- <CODE>
- textArea.scrollDownPage();
- </CODE>
-</ACTION>
-
-<ACTION NAME="scroll-and-center">
- <CODE>
- textArea.scrollAndCenterCaret();
- </CODE>
-</ACTION>
-
-<ACTION NAME="scroll-to-current-line">
- <CODE>
- if(!textArea.getDisplayManager().isLineVisible(
- textArea.getCaretLine()))
- {
- textArea.getDisplayManager().expandFold(
- textArea.getCaretLine(),true);
- }
- textArea.scrollToCaret(true);
- textArea.requestFocus();
-
- </CODE>
-</ACTION>
-
-<ACTION NAME="scroll-up-line">
- <CODE>
- textArea.scrollUpLine();
- </CODE>
-</ACTION>
-
-<ACTION NAME="scroll-up-page">
- <CODE>
- textArea.scrollUpPage();
- </CODE>
-</ACTION>
-
-<ACTION NAME="search-in-open-buffers" NO_RECORD="TRUE">
- <CODE>
- SearchDialog.showSearchDialog(view,textArea.getSelectedText(),
- SearchDialog.ALL_BUFFERS);
- </CODE>
-</ACTION>
-
-<ACTION NAME="search-in-directory" NO_RECORD="TRUE">
- <CODE>
- SearchDialog.showSearchDialog(view,textArea.getSelectedText(),
- SearchDialog.DIRECTORY);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-all">
- <CODE>
- textArea.selectAll();
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-block">
- <CODE>
- textArea.selectBlock();
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-fold">
- <CODE>
- textArea.selectFold();
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-home" NO_RECORD="TRUE">
- <CODE>
- textArea.smartHome(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-end" NO_RECORD="TRUE">
- <CODE>
- textArea.smartEnd(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-line">
- <CODE>
- textArea.selectLine();
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-line-range">
- <CODE>
- new SelectLineRange(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-paragraph">
- <CODE>
- textArea.selectParagraph();
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-word">
- <CODE>
- textArea.selectWord();
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-document-end">
- <CODE>
- textArea.goToBufferEnd(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-document-home">
- <CODE>
- textArea.goToBufferStart(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-line-home">
- <CODE>
- textArea.goToStartOfLine(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-line-end">
- <CODE>
- textArea.goToEndOfLine(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-marker" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- buffer.getMarkerStatusPrompt("select-marker"),
- "editPane.goToMarker(__char__,true);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-next-bracket">
- <CODE>
- textArea.goToNextBracket(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-next-char">
- <CODE>
- textArea.goToNextCharacter(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-next-line">
- <CODE>
- textArea.goToNextLine(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-next-marker">
- <CODE>
- textArea.goToNextMarker(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-next-page">
- <CODE>
- textArea.goToNextPage(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-next-paragraph">
- <CODE>
- textArea.goToNextParagraph(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-next-word">
- <CODE>
- textArea.goToNextWord(true,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-next-word-std">
- <CODE>
- textArea.goToNextWord(true,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-none">
- <CODE>
- s = textArea.getSelectionAtOffset(textArea.getCaretPosition());
- if(s == null)
- textArea.selectNone();
- else
- textArea.removeFromSelection(s);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-prev-bracket">
- <CODE>
- textArea.goToPrevBracket(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-prev-char">
- <CODE>
- textArea.goToPrevCharacter(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-prev-line">
- <CODE>
- textArea.goToPrevLine(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-prev-marker">
- <CODE>
- textArea.goToPrevMarker(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-prev-page">
- <CODE>
- textArea.goToPrevPage(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-prev-paragraph">
- <CODE>
- textArea.goToPrevParagraph(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-prev-word">
- <CODE>
- textArea.goToPrevWord(true,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-prev-word-std">
- <CODE>
- textArea.goToPrevWord(true,true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-visible-home">
- <CODE>
- textArea.goToFirstVisibleLine(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-visible-end">
- <CODE>
- textArea.goToLastVisibleLine(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-whitespace-end">
- <CODE>
- textArea.goToEndOfWhiteSpace(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="select-whitespace-home">
- <CODE>
- textArea.goToStartOfWhiteSpace(true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="shift-left">
- <CODE>
- textArea.shiftIndentLeft();
- </CODE>
-</ACTION>
-
-<ACTION NAME="shift-right">
- <CODE>
- textArea.shiftIndentRight();
- </CODE>
-</ACTION>
-
-<ACTION NAME="toggle-buffer-switcher">
-<CODE>
- b = !jEdit.getBooleanProperty("view.showBufferSwitcher");
- jEdit.setBooleanProperty("view.showBufferSwitcher", b);
- view.updateBufferSwitcherStates();
- if (b) editPane.focusBufferSwitcher();
-</CODE>
-<IS_SELECTED>
- jEdit.getBooleanProperty("view.showBufferSwitcher");
-</IS_SELECTED>
-</ACTION>
-
-
-<ACTION NAME="focus-buffer-switcher">
- <CODE>
- editPane.focusBufferSwitcher();
- </CODE>
-</ACTION>
-
-<ACTION NAME="show-context-menu">
- <CODE>
- textArea.showPopupMenu();
- </CODE>
-</ACTION>
-
-<ACTION NAME="spaces-to-tabs">
- <CODE>
- textArea.spacesToTabs();
- </CODE>
-</ACTION>
-
-<ACTION NAME="split-horizontal">
- <CODE>
- view.splitHorizontally();
- </CODE>
-</ACTION>
-
-<ACTION NAME="split-vertical">
- <CODE>
- view.splitVertically();
- </CODE>
-</ACTION>
-
-<ACTION NAME="stop-recording" NO_RECORD="TRUE">
- <CODE>
- Macros.stopRecording(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="swap-marker" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- buffer.getMarkerStatusPrompt("swap-marker"),
- "editPane.swapMarkerAndCaret(__char__);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="tabs-to-spaces">
- <CODE>
- textArea.tabsToSpaces();
- </CODE>
-</ACTION>
-
-<ACTION NAME="tip-of-the-day">
- <CODE>
- new TipOfTheDay(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="to-lower">
- <CODE>
- textArea.toLowerCase();
- </CODE>
-</ACTION>
-
-<ACTION NAME="to-upper">
- <CODE>
- textArea.toUpperCase();
- </CODE>
-</ACTION>
-
-<ACTION NAME="top-docking-area">
- <CODE>
- wm.getTopDockingArea().showMostRecent();
- </CODE>
-</ACTION>
-
-<ACTION NAME="toggle-dock-areas">
- <CODE>
- wm.toggleDockAreas();
- </CODE>
-</ACTION>
-
-<ACTION NAME="toggle-full-screen">
- <CODE>
- view.toggleFullScreen();
- </CODE>
-</ACTION>
-
-<ACTION NAME="toggle-gutter">
- <CODE>
- boolean showing = jEdit.getBooleanProperty("view.gutter.enabled");
- jEdit.setBooleanProperty("view.gutter.enabled", !showing);
- jEdit.propertiesChanged();
- </CODE>
- <IS_SELECTED>
- return jEdit.getBooleanProperty("view.gutter.enabled");
- </IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="toggle-line-numbers">
- <CODE>
- boolean shown = jEdit.getBooleanProperty("view.gutter.lineNumbers");
- jEdit.setBooleanProperty("view.gutter.lineNumbers", !shown);
- if (! shown)
- jEdit.setBooleanProperty("view.gutter.enabled", !shown);
- jEdit.propertiesChanged();
- </CODE>
- <IS_SELECTED>
- return textArea.getGutter().isExpanded();
- </IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="toggle-statusbar">
- <CODE>
- boolean showing = view.getStatus().isShowing();
- if (view.isPlainView())
- {
- jEdit.setBooleanProperty("view.status.plainview.visible", !showing);
- }
- else
- {
- jEdit.setBooleanProperty("view.status.visible", !showing);
- }
- jEdit.propertiesChanged();
- </CODE>
- <IS_SELECTED>
- return view.getStatus().isShowing();
- </IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="toggle-line-separator">
- <CODE>
- buffer.toggleLineSeparator(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="toggle-multi-select">
- <CODE>
- textArea.toggleMultipleSelectionEnabled();
- </CODE>
- <IS_SELECTED>
- return textArea.isMultipleSelectionEnabled();
- </IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="toggle-rect-select">
- <CODE>
- textArea.toggleRectangularSelectionEnabled();
- </CODE>
- <IS_SELECTED>
- return textArea.isRectangularSelectionEnabled();
- </IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="toggle-word-wrap">
- <CODE>
- buffer.toggleWordWrap(view);
- </CODE>
-</ACTION>
-
-<ACTION NAME="update-log">
- <CODE>
- Log.flushStream();
- </CODE>
-</ACTION>
-
-<ACTION NAME="undo">
- <CODE>
- buffer.undo(textArea);
- </CODE>
-</ACTION>
-
-<ACTION NAME="unsplit">
- <CODE>
- view.unsplit();
- </CODE>
-</ACTION>
-
-<ACTION NAME="unsplit-current">
- <CODE>
- view.unsplitCurrent();
- </CODE>
-</ACTION>
-
-<ACTION NAME="vertical-paste">
- <CODE>
- Registers.paste(textArea,'$',true);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vertical-paste-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
- <CODE>
- view.getInputHandler().readNextChar(
- jEdit.getRegisterStatusPrompt("vertical-paste-string-register"),
- "Registers.paste(textArea,__char__,true);");
- </CODE>
-</ACTION>
-
-<ACTION NAME="visible-end">
- <CODE>
- textArea.goToLastVisibleLine(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="visible-home">
- <CODE>
- textArea.goToFirstVisibleLine(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="whitespace-end">
- <CODE>
- textArea.goToEndOfWhiteSpace(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="whitespace-home">
- <CODE>
- textArea.goToStartOfWhiteSpace(false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="word-count">
- <CODE>
- textArea.showWordCountDialog();
- </CODE>
-</ACTION>
-
-</ACTIONS>
+<?xml version="1.0"?>
+<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
+
+<!-- jEdit action table -->
+<!-- Copyright (C) 2000, 2003 Slava Pestov -->
+
+<!-- :tabSize=8:indentSize=8:noTabs=false: -->
+<!-- :folding=indent:collapseFolds=1:mode=jedit-actions: -->
+
+<!-- Actions are the 'glue' that binds menu item selections and keystrokes -->
+<!-- to jEdit's APIs. For simplicity and compactness, they are written in -->
+<!-- the BeanShell scripting language. -->
+
+<ACTIONS>
+
+<ACTION NAME="about">
+ <CODE>
+ new AboutDialog(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="action-bar" NO_REPEAT="TRUE" NO_RECORD="TRUE" NO_REMEMBER_LAST="TRUE">
+ <CODE>
+ view.actionBar();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="add-explicit-fold">
+ <CODE>
+ textArea.addExplicitFold();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="add-buffer-to-favorites">
+ <CODE>
+ FavoritesVFS.addToFavorites(buffer.getPath(),VFS.DirectoryEntry.FILE);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="add-dir-to-favorites">
+ <CODE>
+ FavoritesVFS.addToFavorites(buffer.getDirectory(),VFS.DirectoryEntry.DIRECTORY);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="add-marker">
+ <CODE>
+ editPane.addMarker();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="add-marker-shortcut" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ buffer.getMarkerStatusPrompt("add-marker"),
+ "buffer.addMarker(__char__,textArea.getCaretPosition());");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="backspace">
+ <CODE>
+ textArea.backspace();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="backspace-word">
+ <CODE>
+ textArea.backspaceWord();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="backspace-word-std">
+ <CODE>
+ textArea.backspaceWord(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="backspace-word-std-after">
+ <CODE>
+ textArea.backspaceWord(true, true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="bottom-docking-area">
+ <CODE>
+ wm.getBottomDockingArea().showMostRecent();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="buffer-options">
+ <CODE>
+ new BufferOptions(view,buffer);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="center-caret">
+ <CODE>
+ textArea.centerCaret();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="close-all">
+ <CODE>
+ jEdit.closeAllBuffers(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="closeall-except-active">
+ <CODE>
+ org.gjt.sp.jedit.bufferset.BufferSet bufferSet = editPane.getBufferSet();
+ Buffer[] buffers = bufferSet.getAllBuffers();
+ for (Buffer buff:buffers)
+ {
+ if (buff != buffer)
+ jEdit.closeBuffer(editPane,buff);
+ }
+ </CODE>
+</ACTION>
+
+<ACTION NAME="close-buffer">
+ <CODE>
+ jEdit.closeBuffer(editPane,buffer);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="global-close-buffer">
+ <CODE>
+ jEdit.closeBuffer(view,buffer);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="close-docking-area">
+ <CODE>
+ wm.closeCurrentArea();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="close-view">
+ <CODE>
+ jEdit.closeView(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="collapse-all-folds">
+ <CODE>
+ textArea.getDisplayManager().expandFolds(1);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="collapse-fold">
+ <CODE>
+ textArea.collapseFold();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="complete-word">
+ <CODE>
+ CompleteWord.completeWord(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="copy">
+ <CODE>
+ Registers.copy(textArea,'$');
+ </CODE>
+</ACTION>
+
+<ACTION NAME="copy-append">
+ <CODE>
+ Registers.append(textArea,'$',"\n",false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="copy-append-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ jEdit.getRegisterStatusPrompt("copy-append-string-register"),
+ "Registers.append(textArea,__char__,\"\\n\",false);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="copy-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ jEdit.getRegisterStatusPrompt("copy-string-register"),
+ "Registers.copy(textArea,__char__);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="cut">
+ <CODE>
+ Registers.cut(textArea,'$');
+ </CODE>
+</ACTION>
+
+<ACTION NAME="cut-append">
+ <CODE>
+ Registers.append(textArea,'$',"\n",true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="cut-append-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ jEdit.getRegisterStatusPrompt("cut-append-string-register"),
+ "Registers.append(textArea,__char__,\"\\n\",true);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="cut-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ jEdit.getRegisterStatusPrompt("cut-string-register"),
+ "Registers.cut(textArea,__char__);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="delete">
+ <CODE>
+ textArea.delete();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="delete-end-line">
+ <CODE>
+ textArea.deleteToEndOfLine();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="delete-line">
+ <CODE>
+ textArea.deleteLine();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="delete-paragraph">
+ <CODE>
+ textArea.deleteParagraph();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="delete-start-line">
+ <CODE>
+ textArea.deleteToStartOfLine();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="delete-word">
+ <CODE>
+ textArea.deleteWord();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="delete-word-std">
+ <CODE>
+ textArea.deleteWord(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="document-end">
+ <CODE>
+ textArea.goToBufferEnd(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="document-home">
+ <CODE>
+ textArea.goToBufferStart(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="edit-favorites">
+ <CODE>
+ VFSBrowser.browseDirectory(view,"favorites:");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="edit-syntax-style">
+ <CODE>
+ StyleEditor.invokeForCaret(textArea);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="end" NO_RECORD="TRUE">
+ <CODE>
+ textArea.end(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="smart-end" NO_RECORD="TRUE">
+ <CODE>
+ textArea.smartEnd(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="eval" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ BeanShell.showEvaluateDialog(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="eval-for-selected-lines">
+ <CODE>
+ BeanShell.showEvaluateLinesDialog(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="eval-selection">
+ <CODE>
+ BeanShell.evalSelection(view,textArea);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="expand-abbrev">
+ <CODE>
+ Abbrevs.expandAbbrev(view,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="expand-all-folds">
+ <CODE>
+ textArea.getDisplayManager().expandAllFolds();
+ textArea.scrollToCaret(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="exit">
+ <CODE>
+ jEdit.exit(view,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="expand-fold">
+ <CODE>
+ textArea.expandFold(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="expand-one-level">
+ <CODE>
+ textArea.expandFold(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="expand-folds" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ jEdit.getProperty("view.status.expand-folds"),
+ "textArea.getDisplayManager().expandFolds(__char__);\n"
+ + "textArea.scrollToCaret(false);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="find" NO_RECORD="TRUE">
+ <CODE>
+ SearchDialog.showSearchDialog(view,textArea.getSelectedText(),SearchDialog.CURRENT_BUFFER);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="find-next" NO_RECORD="TRUE">
+ <CODE>
+ SearchAndReplace.setReverseSearch(false);
+ SearchAndReplace.find(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="find-prev" NO_RECORD="TRUE">
+ <CODE>
+ SearchAndReplace.setReverseSearch(true);
+ SearchAndReplace.find(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="focus-on-textarea">
+ <CODE>
+ editPane.focusOnTextArea();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="format-paragraph">
+ <CODE>
+ textArea.formatParagraph();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="global-options">
+ <CODE>
+ new GlobalOptions(view);
+ </CODE>
+</ACTION>
+<ACTION NAME="global-bufferset">
+ <CODE>
+ bufferSetManager = jEdit.getBufferSetManager();
+ bufferSetManager.setScope(BufferSet.Scope.global);
+ </CODE>
+</ACTION>
+<ACTION NAME="view-bufferset">
+ <CODE>
+ bufferSetManager = jEdit.getBufferSetManager();
+ bufferSetManager.setScope(BufferSet.Scope.view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="bufferset-toggle-exclusive">
+<CODE>
+ jEdit.setBooleanProperty("buffersets.exclusive",
+ !jEdit.getBooleanProperty("buffersets.exclusive"));
+</CODE>
+<IS_SELECTED>
+ jEdit.getBooleanProperty("buffersets.exclusive");
+</IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="editpane-bufferset">
+ <CODE>
+ bufferSetManager = jEdit.getBufferSetManager();
+ bufferSetManager.setScope(BufferSet.Scope.editpane);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="goto-line">
+ <CODE>
+ textArea.showGoToLineDialog();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="goto-marker" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ buffer.getMarkerStatusPrompt("goto-marker"),
+ "editPane.goToMarker(__char__,false);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="help">
+ <CODE>
+ new HelpViewer();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="smart-home" NO_RECORD="TRUE">
+ <CODE>
+ textArea.smartHome(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="home" NO_RECORD="TRUE">
+ <CODE>
+ textArea.home(false);
+ </CODE>
+</ACTION>
+
+
+<ACTION NAME="hypersearch" NO_RECORD="TRUE">
+ <CODE>
+ view.quickHyperSearch(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="hypersearch-word" NO_RECORD="TRUE">
+ <CODE>
+ view.quickHyperSearch(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="ignore-case">
+ <CODE>
+ SearchAndReplace.setIgnoreCase(!SearchAndReplace.getIgnoreCase());
+ </CODE>
+ <IS_SELECTED>
+ SearchAndReplace.getIgnoreCase();
+ </IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="indent-lines">
+ <CODE>
+ textArea.indentSelectedLines();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="insert-literal">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ jEdit.getProperty("view.status.insert-literal"),
+ "textArea.setSelectedText(String.valueOf(__char__));");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="insert-newline">
+ <CODE>
+ textArea.userInput('\n');
+ </CODE>
+</ACTION>
+
+<ACTION NAME="insert-tab">
+ <CODE>
+ textArea.userInput('\t');
+ </CODE>
+</ACTION>
+
+<ACTION NAME="insert-newline-indent">
+ <CODE>
+ textArea.insertEnterAndIndent();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="insert-tab-indent">
+ <CODE>
+ textArea.insertTabAndIndent();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="invert-selection">
+ <CODE>
+ textArea.invertSelection();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="join-lines">
+ <CODE>
+ textArea.joinLines();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="keyboard-tester">
+ <CODE>
+ new GrabKeyDialog(view,null,null,jEdit.newFile(view));
+ </CODE>
+</ACTION>
+
+<ACTION NAME="last-action" NO_RECORD="TRUE" NO_REMEMBER_LAST="TRUE">
+ <CODE>
+ view.getInputHandler().invokeLastAction();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="last-macro" NO_RECORD="TRUE" NO_REMEMBER_LAST="TRUE">
+ <CODE>
+ if(Macros.getLastMacro() == null)
+ view.getToolkit().beep();
+ else
+ Macros.getLastMacro().invoke(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="left-docking-area">
+ <CODE>
+ wm.getLeftDockingArea().showMostRecent();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="line-comment">
+ <CODE>
+ textArea.lineComment();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="line-end">
+ <CODE>
+ textArea.goToEndOfLine(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="line-home">
+ <CODE>
+ textArea.goToStartOfLine(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="logs-remove-all-errors">
+ <CODE>
+ Log.throwables.clear();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="match-bracket">
+ <CODE>
+ textArea.goToMatchingBracket();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="memory-status">
+ <CODE>
+ jEdit.showMemoryDialog(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="narrow-to-fold">
+ <CODE>
+ textArea.narrowToFold();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="narrow-to-selection">
+ <CODE>
+ textArea.narrowToSelection();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="new-file">
+ <CODE>
+ jEdit.newFile(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="new-file-in-mode">
+ <CODE>
+ Mode[] modes = jEdit.getModes();
+ Mode currentMode = buffer.getMode();
+ String dialogTitle = jEdit.getProperty("new-file-in-mode.dialog.title");
+ String dialogMessage = jEdit.getProperty("new-file-in-mode.dialog.message");
+ Mode choice = (Mode)JOptionPane.showInputDialog(
+ view,
+ dialogMessage,
+ dialogTitle,
+ JOptionPane.QUESTION_MESSAGE,
+ null,
+ modes,
+ currentMode);
+ if(choice != null) {
+ Buffer newBuffer = jEdit.newFile(view);
+ view.goToBuffer(newBuffer);
+ newBuffer.setMode(choice);
+ }
+ </CODE>
+</ACTION>
+
+<ACTION NAME="new-plain-view">
+ <CODE>
+ jEdit.newView(view,buffer,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="new-view">
+ <CODE>
+ bsm = jEdit.getBufferSetManager();
+ if (bsm.getScope() == BufferSet.Scope.global) {
+ jEdit.newView(view);
+ }
+ else {
+ View.ViewConfig config = new View.ViewConfig();
+ config.docking = view.getViewConfig().docking;
+ jEdit.newView(view,bsm.createUntitledBuffer(),config);
+ }
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-bracket">
+ <CODE>
+ textArea.goToNextBracket(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-buffer">
+ <CODE>
+ editPane.nextBuffer();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-char">
+ <CODE>
+ textArea.goToNextCharacter(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-fold">
+ <CODE>
+ textArea.goToNextFold(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-line">
+ <CODE>
+ textArea.goToNextLine(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-marker">
+ <CODE>
+ editPane.goToNextMarker(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-page">
+ <CODE>
+ textArea.goToNextPage(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-paragraph">
+ <CODE>
+ textArea.goToNextParagraph(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-textarea">
+ <CODE>
+ view.nextTextArea();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-word">
+ <CODE>
+ textArea.goToNextWord(false,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="next-word-std">
+ <CODE>
+ textArea.goToNextWord(false,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="open-file">
+ <CODE>
+ GUIUtilities.showVFSFileDialog(view,null,VFSBrowser.BROWSER_DIALOG,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="overwrite" NO_RECORD="TRUE">
+ <CODE>
+ textArea.toggleOverwriteEnabled();
+ </CODE>
+ <IS_SELECTED>
+ return textArea.isOverwriteEnabled();
+ </IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="page-setup">
+ <CODE>
+ BufferPrinter1_4.pageSetup(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="parent-fold">
+ <CODE>
+ textArea.goToParentFold();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="paste">
+ <CODE>
+ Registers.paste(textArea,'$',false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="paste-deleted">
+ <CODE>
+ new PasteFromListDialog("paste-deleted",view,
+ KillRing.getInstance());
+ </CODE>
+</ACTION>
+
+<ACTION NAME="paste-previous">
+ <CODE>
+ new PasteFromListDialog("paste-previous",view,
+ HistoryModel.getModel("clipboard"));
+ </CODE>
+</ACTION>
+
+<ACTION NAME="paste-special">
+ <CODE>
+ new PasteSpecialDialog(view, textArea);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="paste-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ jEdit.getRegisterStatusPrompt("paste-string-register"),
+ "Registers.paste(textArea,__char__,false);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="layout-save" NO_REPEAT="TRUE">
+ <CODE>
+ DockingLayoutManager.saveAs(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="layout-load" NO_REPEAT="TRUE">
+ <CODE>
+ DockingLayoutManager.load(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="layout-save-current-mode" NO_REPEAT="TRUE">
+ <CODE>
+ DockingLayoutManager.saveCurrentModeLayout(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="layout-load-current-mode" NO_REPEAT="TRUE">
+ <CODE>
+ DockingLayoutManager.loadCurrentModeLayout(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="plugin-manager">
+ <CODE>
+ PluginManager.showPluginManager(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="plugin-options">
+ <CODE>
+ new PluginOptions(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-bracket">
+ <CODE>
+ textArea.goToPrevBracket(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-buffer">
+ <CODE>
+ editPane.prevBuffer();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-char">
+ <CODE>
+ textArea.goToPrevCharacter(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-fold">
+ <CODE>
+ textArea.goToPrevFold(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-line">
+ <CODE>
+ textArea.goToPrevLine(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-marker">
+ <CODE>
+ editPane.goToPrevMarker(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-page">
+ <CODE>
+ textArea.goToPrevPage(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-paragraph">
+ <CODE>
+ textArea.goToPrevParagraph(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-textarea">
+ <CODE>
+ view.prevTextArea();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-word">
+ <CODE>
+ textArea.goToPrevWord(false,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-word-std">
+ <CODE>
+ textArea.goToPrevWord(false,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="prev-word-std-after">
+ <CODE>
+ textArea.goToPrevWord(false,true,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="print">
+ <CODE>
+ if(jEdit.getBooleanProperty("print.force13"))
+ BufferPrinter1_3.print(view,buffer,false);
+ else
+ BufferPrinter1_4.print(view,buffer,false);
+ </CODE>
+</ACTION>
+
+<!-- not yet implemented -->
+
+<!-- <ACTION NAME="print-selection">
+ <CODE>
+ BufferPrinter.print(view,buffer,true);
+ </CODE>
+</ACTION> -->
+
+<ACTION NAME="quick-search" NO_RECORD="TRUE">
+ <CODE>
+ view.quickIncrementalSearch(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="quick-search-word" NO_RECORD="TRUE">
+ <CODE>
+ view.quickIncrementalSearch(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="range-comment">
+ <CODE>
+ textArea.rangeComment();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="record-macro" NO_RECORD="TRUE">
+ <CODE>
+ Macros.recordMacro(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="record-temp-macro" NO_RECORD="TRUE">
+ <CODE>
+ Macros.recordTemporaryMacro(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="recent-buffer">
+ <CODE>
+ view.getEditPane().recentBuffer();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="redo">
+ <CODE>
+ buffer.redo(textArea);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="regexp">
+ <CODE>
+ SearchAndReplace.setRegexp(!SearchAndReplace.getRegexp());
+ </CODE>
+ <IS_SELECTED>
+ SearchAndReplace.getRegexp();
+ </IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="reload">
+ <CODE>
+ buffer.reload(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="reload-all">
+ <CODE>
+ jEdit.reloadAllBuffers(view,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="reload-modes">
+ <CODE>
+ jEdit.reloadModes();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="remove-all-markers">
+ <CODE>
+ buffer.removeAllMarkers();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="remove-marker" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ buffer.removeMarker(textArea.getCaretLine());
+ </CODE>
+</ACTION>
+
+<ACTION NAME="remove-trailing-ws">
+ <CODE>
+ textArea.removeTrailingWhiteSpace();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="replace-all" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ SearchAndReplace.replaceAll(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="replace-and-find-next" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ if(SearchAndReplace.replace(view))
+ SearchAndReplace.find(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="replace-in-selection" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ SearchAndReplace.replace(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="rescan-macros">
+ <CODE>
+ Macros.loadMacros();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="resplit">
+ <CODE>
+ view.resplit();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="right-docking-area">
+ <CODE>
+ wm.getRightDockingArea().showMostRecent();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="run-other-macro">
+ <CODE>
+ Macros.showRunScriptDialog(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="run-temp-macro" NO_RECORD="TRUE">
+ <CODE>
+ Macros.runTemporaryMacro(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="save">
+ <CODE>
+ buffer.save(view,null,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="save-all">
+ <CODE>
+ jEdit.saveAllBuffers(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="save-as">
+ <CODE>
+ buffer.saveAs(view,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="save-a-copy-as">
+ <CODE>
+ buffer.saveAs(view,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="scroll-down-line">
+ <CODE>
+ textArea.scrollDownLine();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="scroll-down-page">
+ <CODE>
+ textArea.scrollDownPage();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="scroll-and-center">
+ <CODE>
+ view.closeAllMenus();
+ textArea.scrollAndCenterCaret();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="scroll-to-current-line">
+ <CODE>
+ view.closeAllMenus();
+ if(!textArea.getDisplayManager().isLineVisible(
+ textArea.getCaretLine()))
+ {
+ textArea.getDisplayManager().expandFold(
+ textArea.getCaretLine(),true);
+ }
+ textArea.scrollToCaret(true);
+ textArea.requestFocus();
+
+ </CODE>
+</ACTION>
+
+<ACTION NAME="scroll-up-line">
+ <CODE>
+ textArea.scrollUpLine();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="scroll-up-page">
+ <CODE>
+ textArea.scrollUpPage();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="search-in-open-buffers" NO_RECORD="TRUE">
+ <CODE>
+ SearchDialog.showSearchDialog(view,textArea.getSelectedText(),
+ SearchDialog.ALL_BUFFERS);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="search-in-directory" NO_RECORD="TRUE">
+ <CODE>
+ SearchDialog.showSearchDialog(view,textArea.getSelectedText(),
+ SearchDialog.DIRECTORY);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-all">
+ <CODE>
+ textArea.selectAll();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-block">
+ <CODE>
+ textArea.selectBlock();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-fold">
+ <CODE>
+ textArea.selectFold();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-home" NO_RECORD="TRUE">
+ <CODE>
+ textArea.smartHome(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-end" NO_RECORD="TRUE">
+ <CODE>
+ textArea.smartEnd(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-line">
+ <CODE>
+ textArea.selectLine();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-line-range">
+ <CODE>
+ new SelectLineRange(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-paragraph">
+ <CODE>
+ textArea.selectParagraph();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-word">
+ <CODE>
+ textArea.selectWord();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-document-end">
+ <CODE>
+ textArea.goToBufferEnd(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-document-home">
+ <CODE>
+ textArea.goToBufferStart(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-line-home">
+ <CODE>
+ textArea.goToStartOfLine(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-line-end">
+ <CODE>
+ textArea.goToEndOfLine(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-marker" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ buffer.getMarkerStatusPrompt("select-marker"),
+ "editPane.goToMarker(__char__,true);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-next-bracket">
+ <CODE>
+ textArea.goToNextBracket(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-next-char">
+ <CODE>
+ textArea.goToNextCharacter(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-next-line">
+ <CODE>
+ textArea.goToNextLine(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-next-marker">
+ <CODE>
+ textArea.goToNextMarker(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-next-page">
+ <CODE>
+ textArea.goToNextPage(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-next-paragraph">
+ <CODE>
+ textArea.goToNextParagraph(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-next-word">
+ <CODE>
+ textArea.goToNextWord(true,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-next-word-std">
+ <CODE>
+ textArea.goToNextWord(true,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-none">
+ <CODE>
+ s = textArea.getSelectionAtOffset(textArea.getCaretPosition());
+ if(s == null)
+ textArea.selectNone();
+ else
+ textArea.removeFromSelection(s);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-prev-bracket">
+ <CODE>
+ textArea.goToPrevBracket(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-prev-char">
+ <CODE>
+ textArea.goToPrevCharacter(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-prev-line">
+ <CODE>
+ textArea.goToPrevLine(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-prev-marker">
+ <CODE>
+ textArea.goToPrevMarker(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-prev-page">
+ <CODE>
+ textArea.goToPrevPage(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-prev-paragraph">
+ <CODE>
+ textArea.goToPrevParagraph(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-prev-word">
+ <CODE>
+ textArea.goToPrevWord(true,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-prev-word-std">
+ <CODE>
+ textArea.goToPrevWord(true,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-prev-word-std-after">
+ <CODE>
+ textArea.goToPrevWord(true,true,true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-visible-home">
+ <CODE>
+ textArea.goToFirstVisibleLine(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-visible-end">
+ <CODE>
+ textArea.goToLastVisibleLine(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-whitespace-end">
+ <CODE>
+ textArea.goToEndOfWhiteSpace(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="select-whitespace-home">
+ <CODE>
+ textArea.goToStartOfWhiteSpace(true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="shift-left">
+ <CODE>
+ textArea.shiftIndentLeft();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="shift-right">
+ <CODE>
+ textArea.shiftIndentRight();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="set-view-title">
+ <CODE>
+ view.showUserTitleDialog();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="toggle-buffer-switcher">
+<CODE>
+ b = !jEdit.getBooleanProperty("view.showBufferSwitcher");
+ jEdit.setBooleanProperty("view.showBufferSwitcher", b);
+ view.updateBufferSwitcherStates();
+ if (b) editPane.focusBufferSwitcher();
+</CODE>
+<IS_SELECTED>
+ jEdit.getBooleanProperty("view.showBufferSwitcher");
+</IS_SELECTED>
+</ACTION>
+
+
+<ACTION NAME="focus-buffer-switcher">
+ <CODE>
+ editPane.focusBufferSwitcher();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="show-context-menu">
+ <CODE>
+ textArea.showPopupMenu();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="spaces-to-tabs">
+ <CODE>
+ textArea.spacesToTabs();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="split-horizontal">
+ <CODE>
+ view.splitHorizontally();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="split-vertical">
+ <CODE>
+ view.splitVertically();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="stop-recording" NO_RECORD="TRUE">
+ <CODE>
+ Macros.stopRecording(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="swap-marker" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ buffer.getMarkerStatusPrompt("swap-marker"),
+ "editPane.swapMarkerAndCaret(__char__);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="tabs-to-spaces">
+ <CODE>
+ textArea.tabsToSpaces();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="tip-of-the-day">
+ <CODE>
+ new TipOfTheDay(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="to-lower">
+ <CODE>
+ textArea.toLowerCase();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="to-upper">
+ <CODE>
+ textArea.toUpperCase();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="top-docking-area">
+ <CODE>
+ wm.getTopDockingArea().showMostRecent();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="toggle-dock-areas">
+ <CODE>
+ wm.toggleDockAreas();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="toggle-full-screen">
+ <CODE>
+ view.toggleFullScreen();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="toggle-gutter">
+ <CODE>
+ boolean showing = jEdit.getBooleanProperty("view.gutter.enabled");
+ jEdit.setBooleanProperty("view.gutter.enabled", !showing);
+ jEdit.propertiesChanged();
+ </CODE>
+ <IS_SELECTED>
+ return jEdit.getBooleanProperty("view.gutter.enabled");
+ </IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="toggle-line-numbers">
+ <CODE>
+ boolean shown = jEdit.getBooleanProperty("view.gutter.lineNumbers");
+ jEdit.setBooleanProperty("view.gutter.lineNumbers", !shown);
+ if (! shown)
+ jEdit.setBooleanProperty("view.gutter.enabled", !shown);
+ jEdit.propertiesChanged();
+ </CODE>
+ <IS_SELECTED>
+ return textArea.getGutter().isExpanded();
+ </IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="toggle-statusbar">
+ <CODE>
+ boolean showing = view.getStatus().isShowing();
+ if (view.isPlainView())
+ {
+ jEdit.setBooleanProperty("view.status.plainview.visible", !showing);
+ }
+ else
+ {
+ jEdit.setBooleanProperty("view.status.visible", !showing);
+ }
+ jEdit.propertiesChanged();
+ </CODE>
+ <IS_SELECTED>
+ return view.getStatus().isShowing();
+ </IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="toggle-line-separator">
+ <CODE>
+ buffer.toggleLineSeparator(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="toggle-multi-select">
+ <CODE>
+ textArea.toggleMultipleSelectionEnabled();
+ </CODE>
+ <IS_SELECTED>
+ return textArea.isMultipleSelectionEnabled();
+ </IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="toggle-rect-select">
+ <CODE>
+ textArea.toggleRectangularSelectionEnabled();
+ </CODE>
+ <IS_SELECTED>
+ return textArea.isRectangularSelectionEnabled();
+ </IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="toggle-word-wrap">
+ <CODE>
+ buffer.toggleWordWrap(view);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="update-log">
+ <CODE>
+ Log.flushStream();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="undo">
+ <CODE>
+ buffer.undo(textArea);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="unsplit">
+ <CODE>
+ view.unsplit();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="unsplit-current">
+ <CODE>
+ view.unsplitCurrent();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vertical-paste">
+ <CODE>
+ Registers.paste(textArea,'$',true);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vertical-paste-string-register" NO_REPEAT="TRUE" NO_RECORD="TRUE">
+ <CODE>
+ view.getInputHandler().readNextChar(
+ jEdit.getRegisterStatusPrompt("vertical-paste-string-register"),
+ "Registers.paste(textArea,__char__,true);");
+ </CODE>
+</ACTION>
+
+<ACTION NAME="visible-end">
+ <CODE>
+ textArea.goToLastVisibleLine(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="visible-home">
+ <CODE>
+ textArea.goToFirstVisibleLine(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="whitespace-end">
+ <CODE>
+ textArea.goToEndOfWhiteSpace(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="whitespace-home">
+ <CODE>
+ textArea.goToStartOfWhiteSpace(false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="word-count">
+ <CODE>
+ textArea.showWordCountDialog();
+ </CODE>
+</ACTION>
+
+</ACTIONS>
diff --git a/jEdit/org/gjt/sp/jedit/browser.actions.xml b/jEdit/org/gjt/sp/jedit/browser.actions.xml
index 4257601..d3b7dfe 100644
--- a/jEdit/org/gjt/sp/jedit/browser.actions.xml
+++ b/jEdit/org/gjt/sp/jedit/browser.actions.xml
@@ -1,206 +1,239 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
-
-<!-- VFS browser action table -->
-<!-- Copyright (C) 2003 Slava Pestov -->
-
-<!-- :tabSize=8:indentSize=8:noTabs=false: -->
-<!-- :folding=indent:collapseFolds=1:mode=jedit-actions: -->
-
-<!-- Actions are the 'glue' that binds menu item selections and keystrokes -->
-<!-- to jEdit's APIs. For simplicity and compactness, they are written in -->
-<!-- the BeanShell scripting language. -->
-
-<ACTIONS>
-
-<ACTION NAME="vfs.browser.browse">
- <CODE>
- if (files.length != 0)
- browser.setDirectory(files[0].path);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.previous">
- <CODE>
- browser.previousDirectory();
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.next">
- <CODE>
- browser.nextDirectory();
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.browse-window">
- <CODE>
- for(int i = 0; i < files.length; i++)
- {
- VFSBrowser.browseDirectoryInNewWindow(view,
- files[i].path);
- }
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.close">
- <CODE>
- for(int i = 0; i < files.length; i++)
- {
- Buffer buffer = jEdit.getBuffer(files[i].path);
- if(buffer != null)
- jEdit.closeBuffer(view,buffer);
- }
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.copy-path">
- <CODE>
- buf = new StringBuilder();
- for(int i = 0; i < files.length; i++)
- {
- if(i != 0)
- buf.append('\n');
- buf.append(files[i].path);
- }
- Registers.setRegister('$',buf.toString());
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.paste">
- <CODE>
- buf = new StringBuilder();
- for(int i = 0; i < files.length; i++)
- {
- if(i != 0)
- buf.append('\n');
- buf.append(files[i].path);
- }
- String source = Registers.getRegister('$').toString();
- String target = buf.toString();
- if (source == null || target.length() == 0 || source.length() == 0)
- return;
- VFSManager.runInWorkThread(new CopyFileWorker(view, source, target));
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.delete">
- <CODE>
- if (files.length != 0)
- browser.delete(files);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.home">
- <CODE>
- browser.setDirectory(System.getProperty("user.home"));
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.insert">
- <CODE>
- browser.filesActivated(VFSBrowser.M_INSERT,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.new-directory">
- <CODE>
- browser.mkdir();
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.new-file">
- <CODE>
- browser.newFile();
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.open">
- <CODE>
- browser.filesActivated(VFSBrowser.M_OPEN,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.open-view">
- <CODE>
- browser.filesActivated(VFSBrowser.M_OPEN_NEW_VIEW,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.open-plain-view">
- <CODE>
- browser.filesActivated(VFSBrowser.M_OPEN_NEW_PLAIN_VIEW,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.open-split">
- <CODE>
- browser.filesActivated(VFSBrowser.M_OPEN_NEW_SPLIT,false);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.properties">
- <CODE>
- browser.fileProperties(files);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.reload">
- <CODE>
- browser.reloadDirectory();
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.rename">
- <CODE>
- if (files.length != 0)
- browser.rename(files[0].path);
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.roots">
- <CODE>
- browser.rootDirectory();
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.search-directory">
- <CODE>
- browser.searchInDirectory();
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.show-hidden-files">
- <CODE>
- browser.setShowHiddenFiles(!browser.getShowHiddenFiles());
- browser.reloadDirectory();
- </CODE>
- <IS_SELECTED>
- /* NOTE: I do NOT want plugins creating check box menu items
- * in jEdit 4.2! The API is not stable, note the _comp hack...
- * in 4.3 I will finish the full action API refactoring and
- * IS_SELECTED blocks in browser actions will have access to
- * the browser variable just like the CODE block above.
- *
- * Love, Slava */
- VFSBrowser browser = GUIUtilities.getComponentParent(_comp,
- VFSBrowser.class);
- return browser.getShowHiddenFiles();
- browser = null;
- </IS_SELECTED>
-</ACTION>
-
-<ACTION NAME="vfs.browser.synchronize">
- <CODE>
- browser.setDirectory(view.getBuffer().getDirectory());
- </CODE>
-</ACTION>
-
-<ACTION NAME="vfs.browser.up">
- <CODE>
- browser.setDirectory(MiscUtilities.getParentOfPath(
- browser.getDirectory()));
- </CODE>
-</ACTION>
-
-</ACTIONS>
+<?xml version="1.0"?>
+
+<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
+
+<!-- VFS browser action table -->
+<!-- Copyright (C) 2003 Slava Pestov -->
+
+<!-- :tabSize=8:indentSize=8:noTabs=false: -->
+<!-- :folding=indent:collapseFolds=1:mode=jedit-actions: -->
+
+<!-- Actions are the 'glue' that binds menu item selections and keystrokes -->
+<!-- to jEdit's APIs. For simplicity and compactness, they are written in -->
+<!-- the BeanShell scripting language. -->
+
+<ACTIONS>
+
+<ACTION NAME="vfs.browser.browse">
+ <CODE>
+ if (files.length != 0)
+ browser.setDirectory(files[0].path);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.previous">
+ <CODE>
+ browser.previousDirectory();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.next">
+ <CODE>
+ browser.nextDirectory();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.closedialog">
+ <CODE>
+ browser.dispose();
+ </CODE>
+</ACTION>
+
+
+<ACTION NAME="vfs.browser.browse-window">
+ <CODE>
+ for(int i = 0; i < files.length; i++)
+ {
+ VFSBrowser.browseDirectoryInNewWindow(view,
+ files[i].path);
+ }
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.close">
+ <CODE>
+ for(int i = 0; i < files.length; i++)
+ {
+ Buffer buffer = jEdit.getBuffer(files[i].path);
+ if(buffer != null)
+ jEdit.closeBuffer(view,buffer);
+ }
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.copy-path">
+ <CODE>
+ org.gjt.sp.jedit.datatransfer.ListVFSFileTransferable transferable =
+ new org.gjt.sp.jedit.datatransfer.ListVFSFileTransferable(files);
+ Registers.setRegister('$',transferable);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.paste">
+ <CODE>
+ if (files.length != 1)
+ return;
+ org.gjt.sp.jedit.io.VFSFile file = files[0];
+ String targetPath;
+ switch (file.getType())
+ {
+ case org.gjt.sp.jedit.io.VFSFile.FILESYSTEM:
+ return;
+ case org.gjt.sp.jedit.io.VFSFile.FILE:
+ targetPath = MiscUtilities.getParentOfPath(file.getPath());
+ break;
+ case org.gjt.sp.jedit.io.VFSFile.DIRECTORY:
+ targetPath = file.getPath();
+ break;
+ }
+
+ java.awt.datatransfer.Transferable transferable = Registers.getRegister('$').getTransferable();
+ if (transferable.isDataFlavorSupported(org.gjt.sp.jedit.datatransfer.ListVFSFileTransferable.jEditFileList))
+ {
+ List copiedFiles = (List) transferable.getTransferData(org.gjt.sp.jedit.datatransfer.ListVFSFileTransferable.jEditFileList);
+ Iterator iterator = copiedFiles.iterator();
+ while (iterator.hasNext())
+ {
+ org.gjt.sp.jedit.io.VFSFile f = (org.gjt.sp.jedit.io.VFSFile) iterator.next();
+ if (f.getType() == org.gjt.sp.jedit.io.VFSFile.FILE)
+ {
+ ThreadUtilities.runInBackground(new CopyFileWorker(view, f.getPath(), targetPath));
+ }
+ }
+ }
+ else if (transferable.isDataFlavorSupported(java.awt.datatransfer.DataFlavor.javaFileListFlavor))
+ {
+ List copiedFiles = (List) transferable.getTransferData(java.awt.datatransfer.DataFlavor.javaFileListFlavor);
+ Iterator iterator = copiedFiles.iterator();
+ while (iterator.hasNext())
+ {
+ File f = (File) iterator.next();
+ if (f.isFile())
+ {
+ ThreadUtilities.runInBackground(new CopyFileWorker(view, f.getAbsolutePath(), targetPath));
+ }
+ }
+ }
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.delete">
+ <CODE>
+ if (files.length != 0)
+ browser.delete(files);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.home">
+ <CODE>
+ browser.setDirectory(System.getProperty("user.home"));
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.insert">
+ <CODE>
+ browser.filesActivated(VFSBrowser.M_INSERT,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.new-directory">
+ <CODE>
+ browser.mkdir();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.new-file">
+ <CODE>
+ browser.newFile();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.open">
+ <CODE>
+ browser.filesActivated(VFSBrowser.M_OPEN,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.open-view">
+ <CODE>
+ browser.filesActivated(VFSBrowser.M_OPEN_NEW_VIEW,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.open-plain-view">
+ <CODE>
+ browser.filesActivated(VFSBrowser.M_OPEN_NEW_PLAIN_VIEW,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.open-split">
+ <CODE>
+ browser.filesActivated(VFSBrowser.M_OPEN_NEW_SPLIT,false);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.properties">
+ <CODE>
+ browser.fileProperties(files);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.reload">
+ <CODE>
+ browser.reloadDirectory();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.rename">
+ <CODE>
+ if (files.length != 0)
+ browser.rename(files[0].path);
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.roots">
+ <CODE>
+ browser.rootDirectory();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.search-directory">
+ <CODE>
+ browser.searchInDirectory();
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.show-hidden-files">
+ <CODE>
+ browser.setShowHiddenFiles(!browser.getShowHiddenFiles());
+ browser.reloadDirectory();
+ </CODE>
+ <IS_SELECTED>
+ /* NOTE: I do NOT want plugins creating check box menu items
+ * in jEdit 4.2! The API is not stable, note the _comp hack...
+ * in 4.3 I will finish the full action API refactoring and
+ * IS_SELECTED blocks in browser actions will have access to
+ * the browser variable just like the CODE block above.
+ *
+ * Love, Slava */
+ VFSBrowser browser = GUIUtilities.getComponentParent(_comp,
+ VFSBrowser.class);
+ return browser.getShowHiddenFiles();
+ browser = null;
+ </IS_SELECTED>
+</ACTION>
+
+<ACTION NAME="vfs.browser.synchronize">
+ <CODE>
+ browser.setDirectory(view.getBuffer().getDirectory());
+ </CODE>
+</ACTION>
+
+<ACTION NAME="vfs.browser.up">
+ <CODE>
+ browser.setDirectory(MiscUtilities.getParentOfPath(
+ browser.getDirectory()));
+ </CODE>
+</ACTION>
+
+</ACTIONS>
diff --git a/jEdit/org/gjt/sp/jedit/browser/AbstractBrowserTask.java b/jEdit/org/gjt/sp/jedit/browser/AbstractBrowserTask.java
new file mode 100644
index 0000000..db00302
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/browser/AbstractBrowserTask.java
@@ -0,0 +1,127 @@
+/*
+ * AbstractBrowserTask
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright © 2010 Matthieu Casanova
+ * Portions Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.util.Task;
+import org.gjt.sp.util.TaskListener;
+import org.gjt.sp.util.TaskManager;
+import org.gjt.sp.util.ThreadUtilities;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @version $Id: AbstractBrowserTask.java 18380 2010-08-18 13:10:43Z kpouer $
+ */
+abstract class AbstractBrowserTask extends Task
+{
+ //{{{ BrowserIORequest constructors
+ /**
+ * Creates a new browser I/O request.
+ * @param browser The VFS browser instance
+ * @param path1 The first path name to operate on
+ * @param path2 The second path name to operate on
+ * @param loadInfo A two-element array filled out by the request;
+ * element 1 is the canonical path, element 2 is the file list.
+ */
+ AbstractBrowserTask(VFSBrowser browser,
+ Object session, VFS vfs, String path1, String path2,
+ Object[] loadInfo)
+ {
+ this(browser, session, vfs, path1, path2, loadInfo, null);
+ }
+
+ /**
+ * Creates a new browser I/O request.
+ * @param browser The VFS browser instance
+ * @param path1 The first path name to operate on
+ * @param path2 The second path name to operate on
+ * @param loadInfo A two-element array filled out by the request;
+ * element 1 is the canonical path, element 2 is the file list.
+ */
+ AbstractBrowserTask(VFSBrowser browser,
+ Object session, VFS vfs, String path1, String path2,
+ Object[] loadInfo, Runnable awtTask)
+ {
+ this.browser = browser;
+ this.session = session;
+ this.vfs = vfs;
+ this.path1 = path1;
+ this.path2 = path2;
+ this.loadInfo = loadInfo;
+ if (awtTask != null)
+ {
+ MyTaskListener listener = new MyTaskListener(awtTask);
+ TaskManager.instance.addTaskListener(listener);
+ }
+ } //}}}
+
+ //{{{ Instance variables
+ protected VFSBrowser browser;
+ protected Object session;
+ protected VFS vfs;
+ protected String path1;
+ protected String path2;
+ protected Object[] loadInfo;
+ //}}}
+
+ private class MyTaskListener implements TaskListener
+ {
+ private final Runnable runnable;
+
+ private MyTaskListener(Runnable runnable)
+ {
+ this.runnable = runnable;
+ }
+
+ public void waiting(Task task)
+ {
+ }
+
+ public void running(Task task)
+ {
+ }
+
+ public void done(Task task)
+ {
+ if (task == AbstractBrowserTask.this)
+ {
+ TaskManager.instance.removeTaskListener(this);
+ ThreadUtilities.runInDispatchThread(runnable);
+ }
+ }
+
+ public void statusUpdated(Task task)
+ {
+ }
+
+ public void maximumUpdated(Task task)
+ {
+ }
+
+ public void valueUpdated(Task task)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/jEdit/org/gjt/sp/jedit/browser/BrowserCommandsMenu.java b/jEdit/org/gjt/sp/jedit/browser/BrowserCommandsMenu.java
index fc2f38c..a2d73a4 100644
--- a/jEdit/org/gjt/sp/jedit/browser/BrowserCommandsMenu.java
+++ b/jEdit/org/gjt/sp/jedit/browser/BrowserCommandsMenu.java
@@ -1,319 +1,319 @@
-/*
- * BrowserCommandsMenu.java - provides various commands
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- * Portions copyright (C) 1999 Jason Ginchereau
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-//{{{ Imports
-import java.awt.event.*;
-import java.util.*;
-import javax.swing.*;
-
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.menu.MenuItemTextComparator;
-//}}}
-
-/**
- * @version $Id: BrowserCommandsMenu.java 14254 2008-12-30 10:15:37Z shlomy $
- * @author Slava Pestov and Jason Ginchereau
- */
-public class BrowserCommandsMenu extends JPopupMenu
-{
- //{{{ BrowserCommandsMenu constructor
- public BrowserCommandsMenu(VFSBrowser browser, VFSFile[] files)
- {
- this.browser = browser;
-
- if(files != null)
- {
- VFS vfs = VFSManager.getVFSForPath(
- files[0].getDeletePath());
- int type = files[0].getType();
-
- boolean fileOpen = (jEdit.getBuffer(files[0].getPath()) != null);
-
- /* We check this flag separately so that we can
- delete open files from the favorites. */
- boolean deletePathOpen = (jEdit.getBuffer(files[0].getDeletePath()) != null);
-
- boolean delete = !deletePathOpen
- && (vfs.getCapabilities()
- & VFS.DELETE_CAP) != 0;
- boolean rename = !fileOpen
- && (vfs.getCapabilities()
- & VFS.RENAME_CAP) != 0;
-
- for(int i = 1; i < files.length; i++)
- {
- VFSFile file = files[i];
-
- VFS _vfs = VFSManager.getVFSForPath(file.getDeletePath());
- delete &= (vfs == _vfs) && (_vfs.getCapabilities()
- & VFS.DELETE_CAP) != 0;
-
- if(type == file.getType())
- /* all good */;
- else
- {
- // this will disable most operations if
- // files of multiple types are selected
- type = -1;
- }
-
- // set rename to false if > 1 file selected
- rename = false;
-
- // show 'close' item if at least one selected
- // file is currently open
- if(jEdit.getBuffer(file.getPath()) != null)
- fileOpen = true;
- }
-
- if(type == VFSFile.DIRECTORY
- || type == VFSFile.FILESYSTEM)
- {
- if(files.length == 1)
- add(createMenuItem("browse"));
- if(browser.getMode() == VFSBrowser.BROWSER)
- add(createMenuItem("browse-window"));
- }
- else if(type == VFSFile.FILE
- && (browser.getMode() == VFSBrowser.BROWSER
- || browser.getMode() == VFSBrowser.BROWSER_DIALOG))
- {
- add(createMenuItem("open"));
- add(GUIUtilities.loadMenu(
- VFSBrowser.getActionContext(),
- "vfs.browser.open-in"));
- add(createMenuItem("insert"));
-
- if(fileOpen)
- add(createMenuItem("close"));
- }
- else if(type != -1)
- add(createMenuItem("open"));
-
- if(rename)
- add(createMenuItem("rename"));
-
- if(delete)
- add(createMenuItem("delete"));
-
- add(createMenuItem("copy-path"));
- add(createMenuItem("paste"));
-
- if((files.length == 1) || (browser.getSelectedFiles().length != 0))
- add(createMenuItem("properties"));
-
- addSeparator();
- }
-
- add(createMenuItem("up"));
- add(createMenuItem("previous"));
- add(createMenuItem("next"));
- add(createMenuItem("reload"));
- add(createMenuItem("roots"));
- add(createMenuItem("home"));
- add(createMenuItem("synchronize"));
- addSeparator();
-
- if(browser.getMode() == VFSBrowser.BROWSER)
- add(createMenuItem("new-file"));
-
- add(createMenuItem("new-directory"));
-
- if(browser.getMode() == VFSBrowser.BROWSER)
- {
- addSeparator();
- add(createMenuItem("search-directory"));
- }
-
- addSeparator();
-
- add(createMenuItem("show-hidden-files"));
-
- if(browser.getMode() == VFSBrowser.BROWSER
- || browser.getMode() == VFSBrowser.BROWSER_DIALOG)
- {
- addSeparator();
- add(createEncodingMenu());
- }
- addSeparator();
- add(createPluginMenu(browser));
- update();
- } //}}}
-
- //{{{ update() method
- public void update()
- {
- if(encodingMenuItems != null)
- {
- JRadioButtonMenuItem mi = encodingMenuItems.get(
- browser.currentEncoding);
- if(mi != null)
- {
- mi.setSelected(true);
- otherEncoding.setText(jEdit.getProperty(
- "vfs.browser.other-encoding.label"));
- }
- else
- {
- otherEncoding.setSelected(true);
- otherEncoding.setText(jEdit.getProperty(
- "vfs.browser.other-encoding-2.label",
- new String[] { browser.currentEncoding }));
- }
- }
- } //}}}
-
- //{{{ Private members
- private VFSBrowser browser;
- private HashMap<String, JRadioButtonMenuItem> encodingMenuItems;
- private JCheckBoxMenuItem autoDetect;
- private JRadioButtonMenuItem otherEncoding;
-
- //{{{ createMenuItem() method
- private JMenuItem createMenuItem(String name)
- {
- return GUIUtilities.loadMenuItem(VFSBrowser.getActionContext(),
- "vfs.browser." + name,false);
- } //}}}
-
- //{{{ createEncodingMenu() method
- private JMenu createEncodingMenu()
- {
- ActionHandler actionHandler = new ActionHandler();
-
- encodingMenuItems = new HashMap<String, JRadioButtonMenuItem>();
- JMenu encodingMenu = new JMenu(jEdit.getProperty(
- "vfs.browser.commands.encoding.label"));
-
- JMenu menu = encodingMenu;
-
- autoDetect = new JCheckBoxMenuItem(
- jEdit.getProperty(
- "vfs.browser.commands.encoding.auto-detect"));
- autoDetect.setSelected(browser.autoDetectEncoding);
- autoDetect.setActionCommand("auto-detect");
- autoDetect.addActionListener(actionHandler);
- menu.add(autoDetect);
- menu.addSeparator();
-
- ButtonGroup grp = new ButtonGroup();
-
- List<JMenuItem> encodingMenuItemList = new ArrayList<JMenuItem>();
- String[] encodings = MiscUtilities.getEncodings(true);
- for(int i = 0; i < encodings.length; i++)
- {
- String encoding = encodings[i];
- JRadioButtonMenuItem mi = new JRadioButtonMenuItem(encoding);
- mi.setActionCommand("encoding@" + encoding);
- mi.addActionListener(actionHandler);
- grp.add(mi);
- encodingMenuItems.put(encoding,mi);
- encodingMenuItemList.add(mi);
- }
-
- String systemEncoding = System.getProperty("file.encoding");
- if(encodingMenuItems.get(systemEncoding) == null)
- {
- JRadioButtonMenuItem mi = new JRadioButtonMenuItem(
- systemEncoding);
- mi.setActionCommand("encoding@" + systemEncoding);
- mi.addActionListener(actionHandler);
- grp.add(mi);
- encodingMenuItems.put(systemEncoding,mi);
- encodingMenuItemList.add(mi);
- }
-
- Collections.sort(encodingMenuItemList,
- new MenuItemTextComparator());
-
- Iterator iter = encodingMenuItemList.iterator();
- while(iter.hasNext())
- {
- JRadioButtonMenuItem mi = (JRadioButtonMenuItem)
- iter.next();
-
- if(menu.getMenuComponentCount() > 20)
- {
- JMenu newMenu = new JMenu(
- jEdit.getProperty("common.more"));
- menu.add(newMenu);
- menu = newMenu;
- }
-
- menu.add(mi);
- }
- menu.addSeparator();
-
- otherEncoding = new JRadioButtonMenuItem();
- otherEncoding.setActionCommand("other-encoding");
- otherEncoding.addActionListener(actionHandler);
- grp.add(otherEncoding);
- menu.add(otherEncoding);
-
- return encodingMenu;
- } //}}}
-
- //{{{ createPluginsMenu() method
- private JMenu createPluginMenu(VFSBrowser browser)
- {
- JMenu pluginMenu = new JMenu(jEdit.getProperty(
- "vfs.browser.plugins.label"));
- return (JMenu)browser.createPluginsMenu(pluginMenu,false);
-
- } //}}}
-
-
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- String actionCommand = evt.getActionCommand();
-
- if(actionCommand.equals("auto-detect"))
- {
- browser.autoDetectEncoding
- = autoDetect.isSelected();
- }
- else if(actionCommand.equals("other-encoding"))
- {
- String encoding = GUIUtilities.input(browser,
- "encoding-prompt",null,
- jEdit.getProperty("buffer.encoding",
- System.getProperty("file.encoding")));
- if(encoding == null)
- return;
- browser.currentEncoding = encoding;
- }
- else if(actionCommand.startsWith("encoding@"))
- {
- browser.currentEncoding = actionCommand.substring(9);
- }
- }
- } //}}}
-}
+/*
+ * BrowserCommandsMenu.java - provides various commands
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ * Portions copyright (C) 1999 Jason Ginchereau
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import java.awt.event.*;
+import java.util.*;
+import javax.swing.*;
+
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.menu.MenuItemTextComparator;
+//}}}
+
+/**
+ * @version $Id: BrowserCommandsMenu.java 17393 2010-02-27 12:13:39Z k_satoda $
+ * @author Slava Pestov and Jason Ginchereau
+ */
+public class BrowserCommandsMenu extends JPopupMenu
+{
+ //{{{ BrowserCommandsMenu constructor
+ public BrowserCommandsMenu(VFSBrowser browser, VFSFile[] files)
+ {
+ this.browser = browser;
+
+ if(files != null)
+ {
+ VFS vfs = VFSManager.getVFSForPath(
+ files[0].getDeletePath());
+ int type = files[0].getType();
+
+ boolean fileOpen = (jEdit.getBuffer(files[0].getPath()) != null);
+
+ /* We check this flag separately so that we can
+ delete open files from the favorites. */
+ boolean deletePathOpen = (jEdit.getBuffer(files[0].getDeletePath()) != null);
+
+ boolean delete = !deletePathOpen
+ && (vfs.getCapabilities()
+ & VFS.DELETE_CAP) != 0;
+ boolean rename = !fileOpen
+ && (vfs.getCapabilities()
+ & VFS.RENAME_CAP) != 0;
+
+ for(int i = 1; i < files.length; i++)
+ {
+ VFSFile file = files[i];
+
+ VFS _vfs = VFSManager.getVFSForPath(file.getDeletePath());
+ delete &= (vfs == _vfs) && (_vfs.getCapabilities()
+ & VFS.DELETE_CAP) != 0;
+
+ if(type == file.getType())
+ /* all good */;
+ else
+ {
+ // this will disable most operations if
+ // files of multiple types are selected
+ type = -1;
+ }
+
+ // set rename to false if > 1 file selected
+ rename = false;
+
+ // show 'close' item if at least one selected
+ // file is currently open
+ if(jEdit.getBuffer(file.getPath()) != null)
+ fileOpen = true;
+ }
+
+ if(type == VFSFile.DIRECTORY
+ || type == VFSFile.FILESYSTEM)
+ {
+ if(files.length == 1)
+ add(createMenuItem("browse"));
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ add(createMenuItem("browse-window"));
+ }
+ else if(type == VFSFile.FILE
+ && (browser.getMode() == VFSBrowser.BROWSER
+ || browser.getMode() == VFSBrowser.BROWSER_DIALOG))
+ {
+ add(createMenuItem("open"));
+ add(GUIUtilities.loadMenu(
+ VFSBrowser.getActionContext(),
+ "vfs.browser.open-in"));
+ add(createMenuItem("insert"));
+
+ if(fileOpen)
+ add(createMenuItem("close"));
+ }
+ else if(type != -1)
+ add(createMenuItem("open"));
+
+ if(rename)
+ add(createMenuItem("rename"));
+
+ if(delete)
+ add(createMenuItem("delete"));
+
+ add(createMenuItem("copy-path"));
+ add(createMenuItem("paste"));
+
+ if((files.length == 1) || (browser.getSelectedFiles().length != 0))
+ add(createMenuItem("properties"));
+
+ addSeparator();
+ }
+
+ add(createMenuItem("up"));
+ add(createMenuItem("previous"));
+ add(createMenuItem("next"));
+ add(createMenuItem("reload"));
+ add(createMenuItem("roots"));
+ add(createMenuItem("home"));
+ add(createMenuItem("synchronize"));
+ addSeparator();
+
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ add(createMenuItem("new-file"));
+
+ add(createMenuItem("new-directory"));
+
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ {
+ addSeparator();
+ add(createMenuItem("search-directory"));
+ }
+
+ addSeparator();
+
+ add(createMenuItem("show-hidden-files"));
+
+ if(browser.getMode() == VFSBrowser.BROWSER
+ || browser.getMode() == VFSBrowser.BROWSER_DIALOG)
+ {
+ addSeparator();
+ add(createEncodingMenu());
+ }
+ addSeparator();
+ add(createPluginMenu(browser));
+ update();
+ } //}}}
+
+ //{{{ update() method
+ public void update()
+ {
+ if(encodingMenuItems != null && browser.currentEncoding != null)
+ {
+ JRadioButtonMenuItem mi = encodingMenuItems.get(
+ browser.currentEncoding);
+ if(mi != null)
+ {
+ mi.setSelected(true);
+ otherEncoding.setText(jEdit.getProperty(
+ "vfs.browser.other-encoding.label"));
+ }
+ else
+ {
+ otherEncoding.setSelected(true);
+ otherEncoding.setText(jEdit.getProperty(
+ "vfs.browser.other-encoding-2.label",
+ new String[] { browser.currentEncoding }));
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+ private VFSBrowser browser;
+ private HashMap<String, JRadioButtonMenuItem> encodingMenuItems;
+ private JCheckBoxMenuItem autoDetect;
+ private JRadioButtonMenuItem otherEncoding;
+
+ //{{{ createMenuItem() method
+ private JMenuItem createMenuItem(String name)
+ {
+ return GUIUtilities.loadMenuItem(VFSBrowser.getActionContext(),
+ "vfs.browser." + name,false);
+ } //}}}
+
+ //{{{ createEncodingMenu() method
+ private JMenu createEncodingMenu()
+ {
+ ActionHandler actionHandler = new ActionHandler();
+
+ encodingMenuItems = new HashMap<String, JRadioButtonMenuItem>();
+ JMenu encodingMenu = new JMenu(jEdit.getProperty(
+ "vfs.browser.commands.encoding.label"));
+
+ JMenu menu = encodingMenu;
+
+ autoDetect = new JCheckBoxMenuItem(
+ jEdit.getProperty(
+ "vfs.browser.commands.encoding.auto-detect"));
+ autoDetect.setSelected(browser.autoDetectEncoding);
+ autoDetect.setActionCommand("auto-detect");
+ autoDetect.addActionListener(actionHandler);
+ menu.add(autoDetect);
+ menu.addSeparator();
+
+ ButtonGroup grp = new ButtonGroup();
+
+ List<JMenuItem> encodingMenuItemList = new ArrayList<JMenuItem>();
+ String[] encodings = MiscUtilities.getEncodings(true);
+ for(int i = 0; i < encodings.length; i++)
+ {
+ String encoding = encodings[i];
+ JRadioButtonMenuItem mi = new JRadioButtonMenuItem(encoding);
+ mi.setActionCommand("encoding@" + encoding);
+ mi.addActionListener(actionHandler);
+ grp.add(mi);
+ encodingMenuItems.put(encoding,mi);
+ encodingMenuItemList.add(mi);
+ }
+
+ String systemEncoding = System.getProperty("file.encoding");
+ if(encodingMenuItems.get(systemEncoding) == null)
+ {
+ JRadioButtonMenuItem mi = new JRadioButtonMenuItem(
+ systemEncoding);
+ mi.setActionCommand("encoding@" + systemEncoding);
+ mi.addActionListener(actionHandler);
+ grp.add(mi);
+ encodingMenuItems.put(systemEncoding,mi);
+ encodingMenuItemList.add(mi);
+ }
+
+ Collections.sort(encodingMenuItemList,
+ new MenuItemTextComparator());
+
+ Iterator iter = encodingMenuItemList.iterator();
+ while(iter.hasNext())
+ {
+ JRadioButtonMenuItem mi = (JRadioButtonMenuItem)
+ iter.next();
+
+ if(menu.getMenuComponentCount() > 20)
+ {
+ JMenu newMenu = new JMenu(
+ jEdit.getProperty("common.more"));
+ menu.add(newMenu);
+ menu = newMenu;
+ }
+
+ menu.add(mi);
+ }
+ menu.addSeparator();
+
+ otherEncoding = new JRadioButtonMenuItem();
+ otherEncoding.setActionCommand("other-encoding");
+ otherEncoding.addActionListener(actionHandler);
+ grp.add(otherEncoding);
+ menu.add(otherEncoding);
+
+ return encodingMenu;
+ } //}}}
+
+ //{{{ createPluginsMenu() method
+ private JMenu createPluginMenu(VFSBrowser browser)
+ {
+ JMenu pluginMenu = new JMenu(jEdit.getProperty(
+ "vfs.browser.plugins.label"));
+ return (JMenu)browser.createPluginsMenu(pluginMenu,false);
+
+ } //}}}
+
+
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ String actionCommand = evt.getActionCommand();
+
+ if(actionCommand.equals("auto-detect"))
+ {
+ browser.autoDetectEncoding
+ = autoDetect.isSelected();
+ }
+ else if(actionCommand.equals("other-encoding"))
+ {
+ String encoding = GUIUtilities.input(browser,
+ "encoding-prompt",null,
+ jEdit.getProperty("buffer.encoding",
+ System.getProperty("file.encoding")));
+ if(encoding == null)
+ return;
+ browser.currentEncoding = encoding;
+ }
+ else if(actionCommand.startsWith("encoding@"))
+ {
+ browser.currentEncoding = actionCommand.substring(9);
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/BrowserIORequest.java b/jEdit/org/gjt/sp/jedit/browser/BrowserIORequest.java
index 709a136..043c617 100644
--- a/jEdit/org/gjt/sp/jedit/browser/BrowserIORequest.java
+++ b/jEdit/org/gjt/sp/jedit/browser/BrowserIORequest.java
@@ -1,343 +1,343 @@
-/*
- * BrowserIORequest.java - VFS browser I/O request
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-//{{{ Imports
-import java.io.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * A browser I/O request.
- * @author Slava Pestov
- * @version $Id: BrowserIORequest.java 12504 2008-04-22 23:12:43Z ezust $
- */
-class BrowserIORequest extends WorkRequest
-{
- //{{{ Request types
- /**
- * Directory listing I/O request.
- */
- public static final int LIST_DIRECTORY = 0;
-
- /**
- * Delete file I/O request.
- */
- public static final int DELETE = 1;
-
- /**
- * Rename file I/O request.
- */
- public static final int RENAME = 2;
-
- /**
- * Make directory I/O request.
- */
- public static final int MKDIR = 3;
- //}}}
-
- //{{{ BrowserIORequest constructor
- /**
- * Creates a new browser I/O request.
- * @param type The request type
- * @param browser The VFS browser instance
- * @param path1 The first path name to operate on
- * @param path2 The second path name to operate on
- * @param loadInfo A two-element array filled out by the request;
- * element 1 is the canonical path, element 2 is the file list.
- */
- BrowserIORequest(int type, VFSBrowser browser,
- Object session, VFS vfs, String path1, String path2,
- Object[] loadInfo)
- {
- this.type = type;
- this.browser = browser;
- this.session = session;
- this.vfs = vfs;
- this.path1 = path1;
- this.path2 = path2;
- this.loadInfo = loadInfo;
- } //}}}
-
- //{{{ run() method
- public void run()
- {
- switch(type)
- {
- case LIST_DIRECTORY:
- listDirectory();
- break;
- case DELETE:
- delete();
- break;
- case RENAME:
- rename();
- break;
- case MKDIR:
- mkdir();
- break;
- }
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- String typeString;
- switch(type)
- {
- case LIST_DIRECTORY:
- typeString = "LIST_DIRECTORY";
- break;
- case DELETE:
- typeString = "DELETE";
- break;
- case RENAME:
- typeString = "RENAME";
- break;
- case MKDIR:
- typeString = "MKDIR";
- break;
- default:
- typeString = "UNKNOWN!!!";
- break;
- }
-
- return getClass().getName() + "[type=" + typeString
- + ",vfs=" + vfs + ",path1=" + path1
- + ",path2=" + path2 + "]";
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private int type;
- private VFSBrowser browser;
- private Object session;
- private VFS vfs;
- private String path1;
- private String path2;
- private Object[] loadInfo;
- //}}}
-
- //{{{ listDirectory() method
- private void listDirectory()
- {
- VFSFile[] directory = null;
-
- String[] args = { path1 };
- setStatus(jEdit.getProperty("vfs.status.listing-directory",args));
-
- String canonPath = path1;
-
- try
- {
- setAbortable(true);
-
- canonPath = vfs._canonPath(session,path1,browser);
- directory = vfs._listFiles(session,canonPath,browser);
- }
- catch(IOException io)
- {
- setAbortable(false);
- Log.log(Log.ERROR,this,io);
- String[] pp = { io.toString() };
- VFSManager.error(browser,path1,"ioerror.directory-error",pp);
- }
- catch(WorkThread.Abort a)
- {
- }
- finally
- {
- try
- {
- vfs._endVFSSession(session,browser);
- }
- catch(IOException io)
- {
- setAbortable(false);
- Log.log(Log.ERROR,this,io);
- String[] pp = { io.toString() };
- VFSManager.error(browser,path1,"ioerror.directory-error",pp);
- }
- }
-
- setAbortable(false);
-
- loadInfo[0] = canonPath;
- loadInfo[1] = directory;
- } //}}}
-
- //{{{ delete() method
- private void delete()
- {
- try
- {
- setAbortable(true);
- String[] args = { path1 };
- setStatus(jEdit.getProperty("vfs.status.deleting",args));
-
- try
- {
- path1 = vfs._canonPath(session,path1,browser);
-
-
- if(!vfs._delete(session,path1,browser))
- VFSManager.error(browser,path1,"ioerror.delete-error",null);
- }
- catch(IOException io)
- {
- setAbortable(false);
- Log.log(Log.ERROR,this,io);
- String[] pp = { io.toString() };
- VFSManager.error(browser,path1,"ioerror.directory-error",pp);
- }
- }
- catch(WorkThread.Abort a)
- {
- }
- finally
- {
- try
- {
- vfs._endVFSSession(session,browser);
- }
- catch(IOException io)
- {
- setAbortable(false);
- Log.log(Log.ERROR,this,io);
- String[] pp = { io.toString() };
- VFSManager.error(browser,path1,"ioerror.directory-error",pp);
- }
- }
- } //}}}
-
- //{{{ rename() method
- private void rename()
- {
- try
- {
- setAbortable(true);
- String[] args = { path1, path2 };
- setStatus(jEdit.getProperty("vfs.status.renaming",args));
-
- try
- {
- path1 = vfs._canonPath(session,path1,browser);
- path2 = vfs._canonPath(session,path2,browser);
-
- VFSFile file = vfs._getFile(session,path2,browser);
- if(file != null)
- {
- if((OperatingSystem.isCaseInsensitiveFS())
- && path1.equalsIgnoreCase(path2))
- {
- // allow user to change name
- // case
- }
- else
- {
- VFSManager.error(browser,path1,
- "ioerror.rename-exists",
- new String[] { path2 });
- return;
- }
- }
-
- if(!vfs._rename(session,path1,path2,browser))
- VFSManager.error(browser,path1,"ioerror.rename-error",
- new String[] { path2 });
- }
- catch(IOException io)
- {
- setAbortable(false);
- Log.log(Log.ERROR,this,io);
- String[] pp = { io.toString() };
- VFSManager.error(browser,path1,"ioerror.directory-error",pp);
- }
- }
- catch(WorkThread.Abort a)
- {
- }
- finally
- {
- try
- {
- vfs._endVFSSession(session,browser);
- }
- catch(IOException io)
- {
- setAbortable(false);
- Log.log(Log.ERROR,this,io);
- String[] pp = { io.toString() };
- VFSManager.error(browser,path1,"ioerror.directory-error",pp);
- }
- }
- } //}}}
-
- //{{{ mkdir() method
- private void mkdir()
- {
- try
- {
- setAbortable(true);
- String[] args = { path1 };
- setStatus(jEdit.getProperty("vfs.status.mkdir",args));
-
- try
- {
- path1 = vfs._canonPath(session,path1,browser);
-
- if(!vfs._mkdir(session,path1,browser))
- VFSManager.error(browser,path1,"ioerror.mkdir-error",null);
- }
- catch(IOException io)
- {
- setAbortable(false);
- Log.log(Log.ERROR,this,io);
- args[0] = io.toString();
- VFSManager.error(browser,path1,"ioerror",args);
- }
- }
- catch(WorkThread.Abort a)
- {
- }
- finally
- {
- try
- {
- vfs._endVFSSession(session,browser);
- }
- catch(IOException io)
- {
- setAbortable(false);
- Log.log(Log.ERROR,this,io);
- String[] args = { io.toString() };
- VFSManager.error(browser,path1,"ioerror",args);
- }
- }
- } //}}}
-
- //}}}
-}
+/*
+ * BrowserIORequest.java - VFS browser I/O request
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import java.io.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * A browser I/O request.
+ * @author Slava Pestov
+ * @version $Id: BrowserIORequest.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+class BrowserIORequest extends WorkRequest
+{
+ //{{{ Request types
+ /**
+ * Directory listing I/O request.
+ */
+ public static final int LIST_DIRECTORY = 0;
+
+ /**
+ * Delete file I/O request.
+ */
+ public static final int DELETE = 1;
+
+ /**
+ * Rename file I/O request.
+ */
+ public static final int RENAME = 2;
+
+ /**
+ * Make directory I/O request.
+ */
+ public static final int MKDIR = 3;
+ //}}}
+
+ //{{{ BrowserIORequest constructor
+ /**
+ * Creates a new browser I/O request.
+ * @param type The request type
+ * @param browser The VFS browser instance
+ * @param path1 The first path name to operate on
+ * @param path2 The second path name to operate on
+ * @param loadInfo A two-element array filled out by the request;
+ * element 1 is the canonical path, element 2 is the file list.
+ */
+ BrowserIORequest(int type, VFSBrowser browser,
+ Object session, VFS vfs, String path1, String path2,
+ Object[] loadInfo)
+ {
+ this.type = type;
+ this.browser = browser;
+ this.session = session;
+ this.vfs = vfs;
+ this.path1 = path1;
+ this.path2 = path2;
+ this.loadInfo = loadInfo;
+ } //}}}
+
+ //{{{ run() method
+ public void run()
+ {
+ switch(type)
+ {
+ case LIST_DIRECTORY:
+ listDirectory();
+ break;
+ case DELETE:
+ delete();
+ break;
+ case RENAME:
+ rename();
+ break;
+ case MKDIR:
+ mkdir();
+ break;
+ }
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ String typeString;
+ switch(type)
+ {
+ case LIST_DIRECTORY:
+ typeString = "LIST_DIRECTORY";
+ break;
+ case DELETE:
+ typeString = "DELETE";
+ break;
+ case RENAME:
+ typeString = "RENAME";
+ break;
+ case MKDIR:
+ typeString = "MKDIR";
+ break;
+ default:
+ typeString = "UNKNOWN!!!";
+ break;
+ }
+
+ return getClass().getName() + "[type=" + typeString
+ + ",vfs=" + vfs + ",path1=" + path1
+ + ",path2=" + path2 + "]";
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private int type;
+ private VFSBrowser browser;
+ private Object session;
+ private VFS vfs;
+ private String path1;
+ private String path2;
+ private Object[] loadInfo;
+ //}}}
+
+ //{{{ listDirectory() method
+ private void listDirectory()
+ {
+ VFSFile[] directory = null;
+
+ String[] args = { path1 };
+ setStatus(jEdit.getProperty("vfs.status.listing-directory",args));
+
+ String canonPath = path1;
+
+ try
+ {
+ setAbortable(true);
+
+ canonPath = vfs._canonPath(session,path1,browser);
+ directory = vfs._listFiles(session,canonPath,browser);
+ }
+ catch(IOException io)
+ {
+ setAbortable(false);
+ Log.log(Log.ERROR,this,io);
+ String[] pp = { io.toString() };
+ VFSManager.error(browser,path1,"ioerror.directory-error",pp);
+ }
+ catch(WorkThread.Abort a)
+ {
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,browser);
+ }
+ catch(IOException io)
+ {
+ setAbortable(false);
+ Log.log(Log.ERROR,this,io);
+ String[] pp = { io.toString() };
+ VFSManager.error(browser,path1,"ioerror.directory-error",pp);
+ }
+ }
+
+ setAbortable(false);
+
+ loadInfo[0] = canonPath;
+ loadInfo[1] = directory;
+ } //}}}
+
+ //{{{ delete() method
+ private void delete()
+ {
+ try
+ {
+ setAbortable(true);
+ String[] args = { path1 };
+ setStatus(jEdit.getProperty("vfs.status.deleting",args));
+
+ try
+ {
+ path1 = vfs._canonPath(session,path1,browser);
+
+
+ if(!vfs._delete(session,path1,browser))
+ VFSManager.error(browser,path1,"ioerror.delete-error",null);
+ }
+ catch(IOException io)
+ {
+ setAbortable(false);
+ Log.log(Log.ERROR,this,io);
+ String[] pp = { io.toString() };
+ VFSManager.error(browser,path1,"ioerror.directory-error",pp);
+ }
+ }
+ catch(WorkThread.Abort a)
+ {
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,browser);
+ }
+ catch(IOException io)
+ {
+ setAbortable(false);
+ Log.log(Log.ERROR,this,io);
+ String[] pp = { io.toString() };
+ VFSManager.error(browser,path1,"ioerror.directory-error",pp);
+ }
+ }
+ } //}}}
+
+ //{{{ rename() method
+ private void rename()
+ {
+ try
+ {
+ setAbortable(true);
+ String[] args = { path1, path2 };
+ setStatus(jEdit.getProperty("vfs.status.renaming",args));
+
+ try
+ {
+ path1 = vfs._canonPath(session,path1,browser);
+ path2 = vfs._canonPath(session,path2,browser);
+
+ VFSFile file = vfs._getFile(session,path2,browser);
+ if(file != null)
+ {
+ if((OperatingSystem.isCaseInsensitiveFS())
+ && path1.equalsIgnoreCase(path2))
+ {
+ // allow user to change name
+ // case
+ }
+ else
+ {
+ VFSManager.error(browser,path1,
+ "ioerror.rename-exists",
+ new String[] { path2 });
+ return;
+ }
+ }
+
+ if(!vfs._rename(session,path1,path2,browser))
+ VFSManager.error(browser,path1,"ioerror.rename-error",
+ new String[] { path2 });
+ }
+ catch(IOException io)
+ {
+ setAbortable(false);
+ Log.log(Log.ERROR,this,io);
+ String[] pp = { io.toString() };
+ VFSManager.error(browser,path1,"ioerror.directory-error",pp);
+ }
+ }
+ catch(WorkThread.Abort a)
+ {
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,browser);
+ }
+ catch(IOException io)
+ {
+ setAbortable(false);
+ Log.log(Log.ERROR,this,io);
+ String[] pp = { io.toString() };
+ VFSManager.error(browser,path1,"ioerror.directory-error",pp);
+ }
+ }
+ } //}}}
+
+ //{{{ mkdir() method
+ private void mkdir()
+ {
+ try
+ {
+ setAbortable(true);
+ String[] args = { path1 };
+ setStatus(jEdit.getProperty("vfs.status.mkdir",args));
+
+ try
+ {
+ path1 = vfs._canonPath(session,path1,browser);
+
+ if(!vfs._mkdir(session,path1,browser))
+ VFSManager.error(browser,path1,"ioerror.mkdir-error",null);
+ }
+ catch(IOException io)
+ {
+ setAbortable(false);
+ Log.log(Log.ERROR,this,io);
+ args[0] = io.toString();
+ VFSManager.error(browser,path1,"ioerror",args);
+ }
+ }
+ catch(WorkThread.Abort a)
+ {
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,browser);
+ }
+ catch(IOException io)
+ {
+ setAbortable(false);
+ Log.log(Log.ERROR,this,io);
+ String[] args = { io.toString() };
+ VFSManager.error(browser,path1,"ioerror",args);
+ }
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/BrowserListener.java b/jEdit/org/gjt/sp/jedit/browser/BrowserListener.java
index 9a8487e..d9a8ea9 100644
--- a/jEdit/org/gjt/sp/jedit/browser/BrowserListener.java
+++ b/jEdit/org/gjt/sp/jedit/browser/BrowserListener.java
@@ -1,48 +1,48 @@
-/*
- * BrowserListener.java - VFS browser listener
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-import java.util.EventListener;
-
-import org.gjt.sp.jedit.io.VFSFile;
-
-/**
- * A browser event listener.
- * @author Slava Pestov
- * @version $Id: BrowserListener.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public interface BrowserListener extends EventListener
-{
- /**
- * The user has selected a set of files.
- * @param browser The VFS browser
- * @param files The selected files
- * @since jEdit 4.3pre1
- */
- void filesSelected(VFSBrowser browser, VFSFile[] files);
-
- /**
- * The user has double-clicked a set of files.
- * @param browser The VFS browser
- * @param files The selected files
- * @since jEdit 4.3pre1
- */
- void filesActivated(VFSBrowser browser, VFSFile[] files);
-}
+/*
+ * BrowserListener.java - VFS browser listener
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+import java.util.EventListener;
+
+import org.gjt.sp.jedit.io.VFSFile;
+
+/**
+ * A browser event listener.
+ * @author Slava Pestov
+ * @version $Id: BrowserListener.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public interface BrowserListener extends EventListener
+{
+ /**
+ * The user has selected a set of files.
+ * @param browser The VFS browser
+ * @param files The selected files
+ * @since jEdit 4.3pre1
+ */
+ void filesSelected(VFSBrowser browser, VFSFile[] files);
+
+ /**
+ * The user has double-clicked a set of files.
+ * @param browser The VFS browser
+ * @param files The selected files
+ * @since jEdit 4.3pre1
+ */
+ void filesActivated(VFSBrowser browser, VFSFile[] files);
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/BrowserView.java b/jEdit/org/gjt/sp/jedit/browser/BrowserView.java
index bfaf577..a7a4f0e 100644
--- a/jEdit/org/gjt/sp/jedit/browser/BrowserView.java
+++ b/jEdit/org/gjt/sp/jedit/browser/BrowserView.java
@@ -1,742 +1,756 @@
-/*
- * BrowserView.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-//{{{ Imports
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.*;
-import javax.swing.*;
-
-import java.awt.event.*;
-import java.awt.*;
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-import org.gjt.sp.jedit.gui.DockableWindowManager;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * VFS browser tree view.
- * @author Slava Pestov
- * @version $Id: BrowserView.java 16560 2009-11-29 19:06:17Z kerik-sf $
- */
-class BrowserView extends JPanel
-{
- //{{{ BrowserView constructor
- BrowserView(final VFSBrowser browser)
- {
- this.browser = browser;
-
- tmpExpanded = new HashSet<String>();
- DockableWindowManager dwm = jEdit.getActiveView().getDockableWindowManager();
- KeyListener keyListener = dwm.closeListener(VFSBrowser.NAME);
-
- parentDirectories = new ParentDirectoryList();
- parentDirectories.addKeyListener(keyListener);
- parentDirectories.setName("parent");
-
- parentDirectories.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- parentDirectories.setCellRenderer(new ParentDirectoryRenderer());
- parentDirectories.setVisibleRowCount(5);
- parentDirectories.addMouseListener(new ParentMouseHandler());
-
- final JScrollPane parentScroller = new JScrollPane(parentDirectories);
- parentScroller.setMinimumSize(new Dimension(0,0));
-
- table = new VFSDirectoryEntryTable(this);
- table.addMouseListener(new TableMouseHandler());
- table.setName("file");
- JScrollPane tableScroller = new JScrollPane(table);
- tableScroller.setMinimumSize(new Dimension(0,0));
- tableScroller.getViewport().setBackground(table.getBackground());
- tableScroller.getViewport().addMouseListener(new TableMouseHandler());
- splitPane = new JSplitPane(
- browser.isHorizontalLayout()
- ? JSplitPane.HORIZONTAL_SPLIT : JSplitPane.VERTICAL_SPLIT,
- jEdit.getBooleanProperty("appearance.continuousLayout"),
- parentScroller, tableScroller);
- splitPane.setOneTouchExpandable(true);
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- String prop = browser.isHorizontalLayout() ? "vfs.browser.horizontalSplitter" : "vfs.browser.splitter";
- int loc = jEdit.getIntegerProperty(prop,-1);
- if(loc == -1)
- loc = parentScroller.getPreferredSize().height;
-
- splitPane.setDividerLocation(loc);
- parentDirectories.ensureIndexIsVisible(
- parentDirectories.getModel()
- .getSize());
- }
- });
-
- if(browser.isMultipleSelectionEnabled())
- table.getSelectionModel().setSelectionMode(
- ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
- else
- table.getSelectionModel().setSelectionMode(
- ListSelectionModel.SINGLE_SELECTION);
-
- setLayout(new BorderLayout());
-
- add(BorderLayout.CENTER,splitPane);
-
- propertiesChanged();
- } //}}}
-
- //{{{ focusOnFileView() method
- public void focusOnFileView()
- {
- table.requestFocus();
- } //}}}
-
- //{{{ removeNotify() method
- @Override
- public void removeNotify()
- {
- String prop = browser.isHorizontalLayout() ? "vfs.browser.horizontalSplitter" : "vfs.browser.splitter";
- jEdit.setIntegerProperty(prop,splitPane.getDividerLocation());
-
- super.removeNotify();
- } //}}}
-
- //{{{ getSelectedFiles() method
- public VFSFile[] getSelectedFiles()
- {
- return table.getSelectedFiles();
- } //}}}
-
- //{{{ selectNone() method
- public void selectNone()
- {
- table.clearSelection();
- } //}}}
-
- //{{{ saveExpansionState() method
- public void saveExpansionState()
- {
- tmpExpanded.clear();
- table.getExpandedDirectories(tmpExpanded);
- } //}}}
-
- //{{{ clearExpansionState() method
- public void clearExpansionState()
- {
- tmpExpanded.clear();
- } //}}}
-
- //{{{ loadDirectory() method
- public void loadDirectory(Object node, String path,
- boolean addToHistory)
- {
- path = MiscUtilities.constructPath(browser.getDirectory(),path);
- VFS vfs = VFSManager.getVFSForPath(path);
-
- Object session = vfs.createVFSSession(path,this);
- if(session == null)
- return;
-
- if(node == null)
- {
- parentDirectories.setListData(new Object[] {
- new LoadingPlaceholder() });
- }
-
- Object[] loadInfo = new Object[2];
-
- VFSManager.runInWorkThread(new BrowserIORequest(
- BrowserIORequest.LIST_DIRECTORY,browser,
- session,vfs,path,null,loadInfo));
- browser.directoryLoaded(node,loadInfo,addToHistory);
- } //}}}
-
- //{{{ directoryLoaded() method
- /**
- * Rebuild the parent view after a directory has been loaded.
- *
- * @param node
- * @param path
- * @param directory
- */
- public void directoryLoaded(Object node, String path, java.util.List<VFSFile> directory)
- {
- //{{{ If reloading root, update parent directory list
- if(node == null)
- {
- DefaultListModel parentList = new DefaultListModel();
-
- String parent = path;
-
- for(;;)
- {
- VFS _vfs = VFSManager.getVFSForPath(parent);
- VFSFile file = null;
- if (_vfs instanceof FileVFS)
- {
- Object session = _vfs.createVFSSession(path, browser);
- try
- {
- file = _vfs._getFile(session, parent, browser);
- if (file != null)
- {
- file.setName(_vfs.getFileName(parent));
- }
- }
- catch (IOException e)
- {
- Log.log(Log.ERROR, this, e, e);
- }
- }
- if (file == null)
- {
- // create a DirectoryEntry manually
- // instead of using _vfs._getFile()
- // since so many VFS's have broken
- // implementations of this method
- file = new VFSFile(
- _vfs.getFileName(parent),
- parent,parent,
- VFSFile.DIRECTORY,
- 0L,false);
- }
-
-
- /*parentList.insertElementAt(new VFSFile(
- _vfs.getFileName(parent),
- parent,parent,
- VFSFile.DIRECTORY,
- 0L,false),0);*/
- parentList.insertElementAt(file,0);
- String newParent = _vfs.getParentOfPath(parent);
-
- if(newParent == null ||
- MiscUtilities.pathsEqual(parent,newParent))
- break;
- else
- parent = newParent;
- }
-
- parentDirectories.setModel(parentList);
- int index = parentList.getSize() - 1;
- parentDirectories.setSelectedIndex(index);
- parentDirectories.ensureIndexIsVisible(index);
- } //}}}
-
- table.setDirectory(VFSManager.getVFSForPath(path),
- node,directory,tmpExpanded);
- } //}}}
-
- //{{{ updateFileView() method
- public void updateFileView()
- {
- table.repaint();
- } //}}}
-
- //{{{ maybeReloadDirectory() method
- public void maybeReloadDirectory(String path)
- {
- String browserDir = browser.getDirectory();
- String symlinkBrowserDir;
- if(MiscUtilities.isURL(browserDir))
- {
- symlinkBrowserDir = browserDir;
- }
- else
- {
- symlinkBrowserDir = MiscUtilities.resolveSymlinks(
- browserDir);
- }
-
- if(MiscUtilities.pathsEqual(path,symlinkBrowserDir))
- {
- saveExpansionState();
- loadDirectory(null,browserDir,false);
- }
-
- // because this method is called for *every* VFS update,
- // we don't want to scan the tree all the time. So we
- // use the following algorithm to determine if the path
- // might be part of the tree:
- // - if the path starts with the browser's current directory,
- // we do the tree scan
- // - if the browser's directory is 'favorites:' -- we have to
- // do the tree scan, as every path can appear under the
- // favorites list
- // - if the browser's directory is 'roots:' and path is on
- // the local filesystem, do a tree scan
-
- if(!browserDir.startsWith(FavoritesVFS.PROTOCOL)
- && !browserDir.startsWith(FileRootsVFS.PROTOCOL)
- && !path.startsWith(symlinkBrowserDir))
- return;
-
- if(browserDir.startsWith(FileRootsVFS.PROTOCOL)
- && MiscUtilities.isURL(path)
- && !MiscUtilities.getProtocolOfURL(path)
- .equals("file"))
- return;
-
- table.maybeReloadDirectory(path);
- } //}}}
-
- //{{{ propertiesChanged() method
- public void propertiesChanged()
- {
- showIcons = jEdit.getBooleanProperty("vfs.browser.showIcons");
- table.propertiesChanged();
- GUIUtilities.initContinuousLayout(splitPane);
- splitPane.setBorder(null);
- } //}}}
-
- //{{{ getBrowser() method
- /**
- * Returns the associated <code>VFSBrowser</code> instance.
- * @since jEdit 4.2pre1
- */
- public VFSBrowser getBrowser()
- {
- return browser;
- } //}}}
-
- //{{{ getTable() method
- public VFSDirectoryEntryTable getTable()
- {
- return table;
- } //}}}
-
- //{{{ getParentDirectoryList() method
- public JList getParentDirectoryList()
- {
- return parentDirectories;
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private final VFSBrowser browser;
-
- private final JSplitPane splitPane;
- private final JList parentDirectories;
- private final VFSDirectoryEntryTable table;
- private final Set<String> tmpExpanded;
- private BrowserCommandsMenu popup;
- private boolean showIcons;
- //}}}
-
- //{{{ showFilePopup() method
- private void showFilePopup(VFSFile[] files, Component comp,
- Point point)
- {
- popup = new BrowserCommandsMenu(browser,files);
- // for the parent directory right-click; on the click we select
- // the clicked item, but when the popup goes away we select the
- // currently showing directory.
- popup.addPopupMenuListener(new PopupMenuListener()
- {
- public void popupMenuCanceled(PopupMenuEvent e) {}
-
- public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
-
- public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
- {
- // we use SwingUtilities.invokeLater()
- // so that the action is executed before
- // the popup is hidden.
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- int index = parentDirectories
- .getModel()
- .getSize() - 1;
- parentDirectories.setSelectedIndex(index);
- }
- });
- }
- });
- GUIUtilities.showPopupMenu(popup,comp,point.x,point.y);
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ ParentDirectoryRenderer class
- class ParentDirectoryRenderer extends DefaultListCellRenderer
- {
- private Font plainFont;
- private final Font boldFont;
-
- ParentDirectoryRenderer()
- {
- plainFont = UIManager.getFont("Tree.font");
- if(plainFont == null)
- plainFont = jEdit.getFontProperty("metal.secondary.font");
- boldFont = new Font(plainFont.getName(),Font.BOLD,plainFont.getSize());
- }
-
- @Override
- public Component getListCellRendererComponent(
- JList list,
- Object value,
- int index,
- boolean isSelected,
- boolean cellHasFocus)
- {
- super.getListCellRendererComponent(list,value,index,
- isSelected,cellHasFocus);
-
- ParentDirectoryRenderer.this.setBorder(new EmptyBorder(
- 1,index * 5 + 1,1,1));
-
- if(value instanceof LoadingPlaceholder)
- {
- ParentDirectoryRenderer.this.setFont(plainFont);
-
- setIcon(showIcons ? FileCellRenderer.loadingIcon : null);
- setText(jEdit.getProperty("vfs.browser.tree.loading"));
- }
- else if(value instanceof VFSFile)
- {
- VFSFile dirEntry = (VFSFile)value;
- ParentDirectoryRenderer.this.setFont(boldFont);
-
- setIcon(showIcons ? FileCellRenderer.getIconForFile(dirEntry,true)
- : null);
- setText(dirEntry.getName());
- }
- else if(value == null)
- setText("VFS does not follow VFS API");
-
- return this;
- }
- } //}}}
-
- //{{{ ParentMouseHandler class
- private class ParentMouseHandler extends MouseAdapter
- {
- @Override
- public void mousePressed(MouseEvent evt)
- {
- int row = parentDirectories.locationToIndex(evt.getPoint());
- if(row != -1)
- {
- Object obj = parentDirectories.getModel()
- .getElementAt(row);
- if(obj instanceof VFSFile)
- {
- VFSFile dirEntry = (VFSFile)obj;
- if(GUIUtilities.isPopupTrigger(evt))
- {
- if(popup != null && popup.isVisible())
- {
- popup.setVisible(false);
- popup = null;
- }
- else
- {
- parentDirectories.setSelectedIndex(row);
- showFilePopup(new VFSFile[] {
- dirEntry },parentDirectories,
- evt.getPoint());
- }
- }
- }
- }
- }
-
- @Override
- public void mouseReleased(MouseEvent evt)
- {
- if(evt.getClickCount() % 2 != 0 &&
- !GUIUtilities.isMiddleButton(evt.getModifiers()))
- return;
-
- int row = parentDirectories.locationToIndex(evt.getPoint());
- if(row != -1)
- {
- Object obj = parentDirectories.getModel()
- .getElementAt(row);
- if(obj instanceof VFSFile)
- {
- VFSFile dirEntry = (VFSFile)obj;
- if(!GUIUtilities.isPopupTrigger(evt))
- {
- browser.setDirectory(dirEntry.getPath());
- if(browser.getMode() == VFSBrowser.BROWSER)
- focusOnFileView();
- }
- }
- }
- }
- } //}}}
-
- //{{{ TableMouseHandler class
- private class TableMouseHandler extends MouseAdapter
- {
- //{{{ mouseClicked() method
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- Point p = evt.getPoint();
- int row = table.rowAtPoint(p);
- int column = table.columnAtPoint(p);
- if(row == -1)
- return;
- if(column == 0)
- {
- VFSDirectoryEntryTableModel.Entry entry
- = (VFSDirectoryEntryTableModel.Entry)
- table.getModel().getValueAt(row,0);
- if(FileCellRenderer.ExpansionToggleBorder
- .isExpansionToggle(entry.level,p.x))
- {
- return;
- }
- }
-
- if((evt.getModifiers() & InputEvent.BUTTON1_MASK) != 0
- && evt.getClickCount() % 2 == 0)
- {
- browser.filesActivated(evt.isShiftDown()
- ? VFSBrowser.M_OPEN_NEW_VIEW
- : VFSBrowser.M_OPEN,true);
- }
- else if(GUIUtilities.isMiddleButton(evt.getModifiers()))
- {
- if(evt.isShiftDown())
- table.getSelectionModel().addSelectionInterval(row,row);
- else
- table.getSelectionModel().setSelectionInterval(row,row);
- browser.filesActivated(evt.isShiftDown()
- ? VFSBrowser.M_OPEN_NEW_VIEW
- : VFSBrowser.M_OPEN,true);
- }
- } //}}}
-
- //{{{ mousePressed() method
- @Override
- public void mousePressed(MouseEvent evt)
- {
- Point p = evt.getPoint();
- if(evt.getSource() != table)
- {
- p.x -= table.getX();
- p.y -= table.getY();
- }
-
- int row = table.rowAtPoint(p);
- int column = table.columnAtPoint(p);
- if(column == 0 && row != -1)
- {
- VFSDirectoryEntryTableModel.Entry entry
- = (VFSDirectoryEntryTableModel.Entry)
- table.getModel().getValueAt(row,0);
- if(FileCellRenderer.ExpansionToggleBorder
- .isExpansionToggle(entry.level,p.x))
- {
- table.toggleExpanded(row);
- return;
- }
- }
-
- if(GUIUtilities.isMiddleButton(evt.getModifiers()))
- {
- if(row == -1)
- /* nothing */;
- else if(evt.isShiftDown())
- table.getSelectionModel().addSelectionInterval(row,row);
- else
- table.getSelectionModel().setSelectionInterval(row,row);
- }
- else if(GUIUtilities.isPopupTrigger(evt))
- {
- if(popup != null && popup.isVisible())
- {
- popup.setVisible(false);
- popup = null;
- return;
- }
-
- if(row == -1)
- showFilePopup(null,table,evt.getPoint());
- else
- {
- if(!table.getSelectionModel().isSelectedIndex(row))
- table.getSelectionModel().setSelectionInterval(row,row);
- showFilePopup(getSelectedFiles(),table,evt.getPoint());
- }
- }
- } //}}}
-
- //{{{ mouseReleased() method
- @Override
- public void mouseReleased(MouseEvent evt)
- {
- if(!GUIUtilities.isPopupTrigger(evt)
- && table.getSelectedRow() != -1)
- {
- browser.filesSelected();
- }
- } //}}}
- } //}}}
-
- private static class LoadingPlaceholder {}
- //}}}
-
- class ParentDirectoryList extends JList
- {
-
- public String getPath(int row)
- {
- Collection<String> components = new LinkedList<String>();
- for (int i=1; i<=row; ++i)
- components.add(getModel().getElementAt(i).toString());
- return getModel().getElementAt(0) + TextUtilities.join(components, File.separator);
- }
-
- @Override
- protected void processKeyEvent(KeyEvent evt)
- {
- if (evt.getID() == KeyEvent.KEY_PRESSED)
- {
- ActionContext ac = VFSBrowser.getActionContext();
- int row = parentDirectories.getSelectedIndex();
- switch(evt.getKeyCode())
- {
- case KeyEvent.VK_DOWN:
- evt.consume();
- if (row < parentDirectories.getSize().height-1)
- parentDirectories.setSelectedIndex(++row);
- break;
- case KeyEvent.VK_LEFT:
- if ((evt.getModifiers() & KeyEvent.ALT_MASK)>0)
- {
- evt.consume();
- browser.previousDirectory();
- }
- else super.processEvent(evt);
- break;
- case KeyEvent.VK_RIGHT:
- if ((evt.getModifiers() & KeyEvent.ALT_MASK)>0)
- {
- evt.consume();
- browser.nextDirectory();
- }
- else super.processEvent(evt);
- break;
- case KeyEvent.VK_TAB:
- evt.consume();
- if ((evt.getModifiers() & KeyEvent.SHIFT_MASK) > 0)
- browser.focusOnDefaultComponent();
- else
- table.requestFocus();
- break;
- case KeyEvent.VK_UP :
- evt.consume();
- if (row > 0)
- {
- parentDirectories.setSelectedIndex(--row);
- }
- break;
- case KeyEvent.VK_BACK_SPACE:
- evt.consume();
- EditAction up = ac.getAction("vfs.browser.up");
- ac.invokeAction(evt, up);
- break;
- case KeyEvent.VK_F5:
- evt.consume();
- EditAction reload = ac.getAction("vfs.browser.reload");
- ac.invokeAction(evt, reload);
- break;
- case KeyEvent.VK_ENTER:
- evt.consume();
- String path = getPath(row);
- getBrowser().setDirectory(path);
- table.requestFocus();
- break;
-/* These actions don't work because they look at the EntryTable for the current selected
- * item. We need actions that look at the parentDirectoryList item instead.
- *
- case KeyEvent.VK_DELETE:
- evt.consume();
- ea = ac.getAction("vfs.browser.delete");
- ac.invokeAction(evt, ea);
- break;
- case KeyEvent.CTRL_MASK | KeyEvent.VK_N:
- evt.consume();
- ea = ac.getAction("vfs.browser.new-file");
- ac.invokeAction(evt, ea);
- break;
- case KeyEvent.VK_INSERT:
- evt.consume();
- ea = ac.getAction("vfs.browser.new-directory");
- ac.invokeAction(evt, ea);
- break; */
- }
- }
- else if(evt.getID() == KeyEvent.KEY_TYPED)
- {
- if(evt.isControlDown() || evt.isAltDown()
- || evt.isMetaDown())
- {
- evt.consume();
- return;
- }
- switch(evt.getKeyChar())
- {
- case '~':
- evt.consume();
- if(browser.getMode() == VFSBrowser.BROWSER)
- browser.setDirectory(System.getProperty(
- "user.home"));
- break;
- case '/':
- evt.consume();
- if(browser.getMode() == VFSBrowser.BROWSER)
- browser.rootDirectory();
- break;
- case '-':
- evt.consume();
- if(browser.getMode() == VFSBrowser.BROWSER)
- {
- browser.setDirectory(
- browser.getView().getBuffer()
- .getDirectory());
- }
- break;
- }
- }
- if (!evt.isConsumed())
- super.processKeyEvent(evt);
- }
- }
-
-}
+/*
+ * BrowserView.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.*;
+import javax.swing.*;
+
+import java.awt.event.*;
+import java.awt.*;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+
+import org.gjt.sp.jedit.gui.DockableWindowManager;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.ThreadUtilities;
+//}}}
+
+/**
+ * VFS browser tree view.
+ * @author Slava Pestov
+ * @version $Id: BrowserView.java 18572 2010-09-17 10:57:58Z kpouer $
+ */
+class BrowserView extends JPanel
+{
+ //{{{ BrowserView constructor
+ BrowserView(final VFSBrowser browser)
+ {
+ this.browser = browser;
+
+ tmpExpanded = new HashSet<String>();
+ DockableWindowManager dwm = jEdit.getActiveView().getDockableWindowManager();
+ KeyListener keyListener = dwm.closeListener(VFSBrowser.NAME);
+
+ parentDirectories = new ParentDirectoryList();
+ parentDirectories.addKeyListener(keyListener);
+ parentDirectories.setName("parent");
+
+ parentDirectories.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ parentDirectories.setCellRenderer(new ParentDirectoryRenderer());
+ parentDirectories.setVisibleRowCount(5);
+ parentDirectories.addMouseListener(new ParentMouseHandler());
+
+ final JScrollPane parentScroller = new JScrollPane(parentDirectories);
+ parentScroller.setMinimumSize(new Dimension(0,0));
+
+ table = new VFSDirectoryEntryTable(this);
+ table.addMouseListener(new TableMouseHandler());
+ table.setName("file");
+ JScrollPane tableScroller = new JScrollPane(table);
+ tableScroller.setMinimumSize(new Dimension(0,0));
+ tableScroller.getViewport().setBackground(table.getBackground());
+ tableScroller.getViewport().addMouseListener(new TableMouseHandler());
+ splitPane = new JSplitPane(
+ browser.isHorizontalLayout()
+ ? JSplitPane.HORIZONTAL_SPLIT : JSplitPane.VERTICAL_SPLIT,
+ jEdit.getBooleanProperty("appearance.continuousLayout"),
+ parentScroller, tableScroller);
+ splitPane.setOneTouchExpandable(true);
+
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ String prop = browser.isHorizontalLayout() ? "vfs.browser.horizontalSplitter" : "vfs.browser.splitter";
+ int loc = jEdit.getIntegerProperty(prop,-1);
+ if(loc == -1)
+ loc = parentScroller.getPreferredSize().height;
+
+ splitPane.setDividerLocation(loc);
+ parentDirectories.ensureIndexIsVisible(
+ parentDirectories.getModel()
+ .getSize());
+ }
+ });
+
+ if(browser.isMultipleSelectionEnabled())
+ table.getSelectionModel().setSelectionMode(
+ ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
+ else
+ table.getSelectionModel().setSelectionMode(
+ ListSelectionModel.SINGLE_SELECTION);
+
+ setLayout(new BorderLayout());
+
+ add(BorderLayout.CENTER,splitPane);
+
+ propertiesChanged();
+ } //}}}
+
+ //{{{ focusOnFileView() method
+ public void focusOnFileView()
+ {
+ table.requestFocus();
+ } //}}}
+
+ //{{{ removeNotify() method
+ @Override
+ public void removeNotify()
+ {
+ String prop = browser.isHorizontalLayout() ? "vfs.browser.horizontalSplitter" : "vfs.browser.splitter";
+ jEdit.setIntegerProperty(prop,splitPane.getDividerLocation());
+
+ super.removeNotify();
+ } //}}}
+
+ //{{{ getSelectedFiles() method
+ public VFSFile[] getSelectedFiles()
+ {
+ return table.getSelectedFiles();
+ } //}}}
+
+ //{{{ selectNone() method
+ public void selectNone()
+ {
+ table.clearSelection();
+ } //}}}
+
+ //{{{ saveExpansionState() method
+ public void saveExpansionState()
+ {
+ tmpExpanded.clear();
+ table.getExpandedDirectories(tmpExpanded);
+ } //}}}
+
+ //{{{ clearExpansionState() method
+ public void clearExpansionState()
+ {
+ tmpExpanded.clear();
+ } //}}}
+
+ //{{{ loadDirectory() method
+ public void loadDirectory(Object node, String path,
+ boolean addToHistory)
+ {
+ loadDirectory(node, path, addToHistory, null);
+ } //}}}
+
+
+ //{{{ loadDirectory() method
+ public void loadDirectory(final Object node, String path,
+ final boolean addToHistory, final Runnable delayedAWTTask)
+ {
+ path = MiscUtilities.constructPath(browser.getDirectory(),path);
+ VFS vfs = VFSManager.getVFSForPath(path);
+
+ Object session = vfs.createVFSSession(path,this);
+ if(session == null)
+ return;
+
+ if(node == null)
+ {
+ parentDirectories.setListData(new Object[] {
+ new LoadingPlaceholder() });
+ }
+
+ final Object[] loadInfo = new Object[2];
+ Runnable awtRunnable = new Runnable()
+ {
+ public void run()
+ {
+ browser.directoryLoaded(node,loadInfo,addToHistory);
+ if (delayedAWTTask != null)
+ delayedAWTTask.run();
+ }
+ };
+ ThreadUtilities.runInBackground(new ListDirectoryBrowserTask(browser,
+ session, vfs, path, null, loadInfo, awtRunnable));
+ } //}}}
+
+ //{{{ directoryLoaded() method
+ /**
+ * Rebuild the parent view after a directory has been loaded.
+ *
+ * @param node
+ * @param path
+ * @param directory
+ */
+ public void directoryLoaded(Object node, String path, java.util.List<VFSFile> directory)
+ {
+ //{{{ If reloading root, update parent directory list
+ if(node == null)
+ {
+ DefaultListModel parentList = new DefaultListModel();
+
+ String parent = path;
+
+ for(;;)
+ {
+ VFS _vfs = VFSManager.getVFSForPath(parent);
+ VFSFile file = null;
+ if (_vfs instanceof FileVFS)
+ {
+ Object session = _vfs.createVFSSession(path, browser);
+ try
+ {
+ file = _vfs._getFile(session, parent, browser);
+ if (file != null)
+ {
+ file.setName(_vfs.getFileName(parent));
+ }
+ }
+ catch (IOException e)
+ {
+ Log.log(Log.ERROR, this, e, e);
+ }
+ }
+ if (file == null)
+ {
+ // create a DirectoryEntry manually
+ // instead of using _vfs._getFile()
+ // since so many VFS's have broken
+ // implementations of this method
+ file = new VFSFile(
+ _vfs.getFileName(parent),
+ parent,parent,
+ VFSFile.DIRECTORY,
+ 0L,false);
+ }
+
+
+ /*parentList.insertElementAt(new VFSFile(
+ _vfs.getFileName(parent),
+ parent,parent,
+ VFSFile.DIRECTORY,
+ 0L,false),0);*/
+ parentList.insertElementAt(file,0);
+ String newParent = _vfs.getParentOfPath(parent);
+
+ if(newParent == null ||
+ MiscUtilities.pathsEqual(parent,newParent))
+ break;
+ else
+ parent = newParent;
+ }
+
+ parentDirectories.setModel(parentList);
+ int index = parentList.getSize() - 1;
+ parentDirectories.setSelectedIndex(index);
+ parentDirectories.ensureIndexIsVisible(index);
+ } //}}}
+
+ table.setDirectory(VFSManager.getVFSForPath(path),
+ node,directory,tmpExpanded);
+ } //}}}
+
+ //{{{ updateFileView() method
+ public void updateFileView()
+ {
+ table.repaint();
+ } //}}}
+
+ //{{{ maybeReloadDirectory() method
+ public void maybeReloadDirectory(String path)
+ {
+ String browserDir = browser.getDirectory();
+ String symlinkBrowserDir;
+ if(MiscUtilities.isURL(browserDir))
+ {
+ symlinkBrowserDir = browserDir;
+ }
+ else
+ {
+ symlinkBrowserDir = MiscUtilities.resolveSymlinks(
+ browserDir);
+ }
+
+ if(MiscUtilities.pathsEqual(path,symlinkBrowserDir))
+ {
+ saveExpansionState();
+ loadDirectory(null,browserDir,false);
+ }
+
+ // because this method is called for *every* VFS update,
+ // we don't want to scan the tree all the time. So we
+ // use the following algorithm to determine if the path
+ // might be part of the tree:
+ // - if the path starts with the browser's current directory,
+ // we do the tree scan
+ // - if the browser's directory is 'favorites:' -- we have to
+ // do the tree scan, as every path can appear under the
+ // favorites list
+ // - if the browser's directory is 'roots:' and path is on
+ // the local filesystem, do a tree scan
+
+ if(!browserDir.startsWith(FavoritesVFS.PROTOCOL)
+ && !browserDir.startsWith(FileRootsVFS.PROTOCOL)
+ && !path.startsWith(symlinkBrowserDir))
+ return;
+
+ if(browserDir.startsWith(FileRootsVFS.PROTOCOL)
+ && MiscUtilities.isURL(path)
+ && !"file".equals(MiscUtilities.getProtocolOfURL(path)))
+ return;
+
+ table.maybeReloadDirectory(path);
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ public void propertiesChanged()
+ {
+ showIcons = jEdit.getBooleanProperty("vfs.browser.showIcons");
+ table.propertiesChanged();
+ GUIUtilities.initContinuousLayout(splitPane);
+ splitPane.setBorder(null);
+ } //}}}
+
+ //{{{ getBrowser() method
+ /**
+ * Returns the associated <code>VFSBrowser</code> instance.
+ * @since jEdit 4.2pre1
+ */
+ public VFSBrowser getBrowser()
+ {
+ return browser;
+ } //}}}
+
+ //{{{ getTable() method
+ public VFSDirectoryEntryTable getTable()
+ {
+ return table;
+ } //}}}
+
+ //{{{ getParentDirectoryList() method
+ public JList getParentDirectoryList()
+ {
+ return parentDirectories;
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private final VFSBrowser browser;
+
+ private final JSplitPane splitPane;
+ private final JList parentDirectories;
+ private final VFSDirectoryEntryTable table;
+ private final Set<String> tmpExpanded;
+ private BrowserCommandsMenu popup;
+ private boolean showIcons;
+ //}}}
+
+ //{{{ showFilePopup() method
+ private void showFilePopup(VFSFile[] files, Component comp,
+ Point point)
+ {
+ popup = new BrowserCommandsMenu(browser,files);
+ // for the parent directory right-click; on the click we select
+ // the clicked item, but when the popup goes away we select the
+ // currently showing directory.
+ popup.addPopupMenuListener(new PopupMenuListener()
+ {
+ public void popupMenuCanceled(PopupMenuEvent e) {}
+
+ public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
+
+ public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
+ {
+ // we use SwingUtilities.invokeLater()
+ // so that the action is executed before
+ // the popup is hidden.
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ int index = parentDirectories
+ .getModel()
+ .getSize() - 1;
+ parentDirectories.setSelectedIndex(index);
+ }
+ });
+ }
+ });
+ GUIUtilities.showPopupMenu(popup,comp,point.x,point.y);
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ParentDirectoryRenderer class
+ class ParentDirectoryRenderer extends DefaultListCellRenderer
+ {
+ private Font plainFont;
+ private final Font boldFont;
+
+ ParentDirectoryRenderer()
+ {
+ plainFont = UIManager.getFont("Tree.font");
+ if(plainFont == null)
+ plainFont = jEdit.getFontProperty("metal.secondary.font");
+ boldFont = new Font(plainFont.getName(),Font.BOLD,plainFont.getSize());
+ }
+
+ @Override
+ public Component getListCellRendererComponent(
+ JList list,
+ Object value,
+ int index,
+ boolean isSelected,
+ boolean cellHasFocus)
+ {
+ super.getListCellRendererComponent(list,value,index,
+ isSelected,cellHasFocus);
+
+ ParentDirectoryRenderer.this.setBorder(new EmptyBorder(
+ 1,index * 5 + 1,1,1));
+
+ if(value instanceof LoadingPlaceholder)
+ {
+ ParentDirectoryRenderer.this.setFont(plainFont);
+
+ setIcon(showIcons ? FileCellRenderer.loadingIcon : null);
+ setText(jEdit.getProperty("vfs.browser.tree.loading"));
+ }
+ else if(value instanceof VFSFile)
+ {
+ VFSFile dirEntry = (VFSFile)value;
+ ParentDirectoryRenderer.this.setFont(boldFont);
+
+ setIcon(showIcons ? FileCellRenderer.getIconForFile(dirEntry,true)
+ : null);
+ setText(dirEntry.getName());
+ }
+ else if(value == null)
+ setText("VFS does not follow VFS API");
+
+ return this;
+ }
+ } //}}}
+
+ //{{{ ParentMouseHandler class
+ private class ParentMouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ int row = parentDirectories.locationToIndex(evt.getPoint());
+ if(row != -1)
+ {
+ Object obj = parentDirectories.getModel()
+ .getElementAt(row);
+ if(obj instanceof VFSFile)
+ {
+ VFSFile dirEntry = (VFSFile)obj;
+ if(GUIUtilities.isPopupTrigger(evt))
+ {
+ if(popup != null && popup.isVisible())
+ {
+ popup.setVisible(false);
+ popup = null;
+ }
+ else
+ {
+ parentDirectories.setSelectedIndex(row);
+ showFilePopup(new VFSFile[] {
+ dirEntry },parentDirectories,
+ evt.getPoint());
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void mouseReleased(MouseEvent evt)
+ {
+ if(evt.getClickCount() % 2 != 0 &&
+ !GUIUtilities.isMiddleButton(evt.getModifiers()))
+ return;
+
+ int row = parentDirectories.locationToIndex(evt.getPoint());
+ if(row != -1)
+ {
+ Object obj = parentDirectories.getModel()
+ .getElementAt(row);
+ if(obj instanceof VFSFile)
+ {
+ VFSFile dirEntry = (VFSFile)obj;
+ if(!GUIUtilities.isPopupTrigger(evt))
+ {
+ browser.setDirectory(dirEntry.getPath());
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ focusOnFileView();
+ }
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ TableMouseHandler class
+ private class TableMouseHandler extends MouseAdapter
+ {
+ //{{{ mouseClicked() method
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ Point p = evt.getPoint();
+ int row = table.rowAtPoint(p);
+ int column = table.columnAtPoint(p);
+ if(row == -1)
+ return;
+ if(column == 0)
+ {
+ VFSDirectoryEntryTableModel.Entry entry
+ = (VFSDirectoryEntryTableModel.Entry)
+ table.getModel().getValueAt(row,0);
+ if(FileCellRenderer.ExpansionToggleBorder
+ .isExpansionToggle(entry.level,p.x))
+ {
+ return;
+ }
+ }
+
+ if((evt.getModifiers() & InputEvent.BUTTON1_MASK) != 0
+ && evt.getClickCount() % 2 == 0)
+ {
+ browser.filesActivated(evt.isShiftDown()
+ ? VFSBrowser.M_OPEN_NEW_VIEW
+ : VFSBrowser.M_OPEN,true);
+ }
+ else if(GUIUtilities.isMiddleButton(evt.getModifiers()))
+ {
+ if(evt.isShiftDown())
+ table.getSelectionModel().addSelectionInterval(row,row);
+ else
+ table.getSelectionModel().setSelectionInterval(row,row);
+ browser.filesActivated(evt.isShiftDown()
+ ? VFSBrowser.M_OPEN_NEW_VIEW
+ : VFSBrowser.M_OPEN,true);
+ }
+ } //}}}
+
+ //{{{ mousePressed() method
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ Point p = evt.getPoint();
+ if(evt.getSource() != table)
+ {
+ p.x -= table.getX();
+ p.y -= table.getY();
+ }
+
+ int row = table.rowAtPoint(p);
+ int column = table.columnAtPoint(p);
+ if(column == 0 && row != -1)
+ {
+ VFSDirectoryEntryTableModel.Entry entry
+ = (VFSDirectoryEntryTableModel.Entry)
+ table.getModel().getValueAt(row,0);
+ if(FileCellRenderer.ExpansionToggleBorder
+ .isExpansionToggle(entry.level,p.x))
+ {
+ table.toggleExpanded(row);
+ return;
+ }
+ }
+
+ if(GUIUtilities.isMiddleButton(evt.getModifiers()))
+ {
+ if(row == -1)
+ /* nothing */;
+ else if(evt.isShiftDown())
+ table.getSelectionModel().addSelectionInterval(row,row);
+ else
+ table.getSelectionModel().setSelectionInterval(row,row);
+ }
+ else if(GUIUtilities.isPopupTrigger(evt))
+ {
+ if(popup != null && popup.isVisible())
+ {
+ popup.setVisible(false);
+ popup = null;
+ return;
+ }
+
+ if(row == -1)
+ showFilePopup(null,table,evt.getPoint());
+ else
+ {
+ if(!table.getSelectionModel().isSelectedIndex(row))
+ table.getSelectionModel().setSelectionInterval(row,row);
+ showFilePopup(getSelectedFiles(),table,evt.getPoint());
+ }
+ }
+ } //}}}
+
+ //{{{ mouseReleased() method
+ @Override
+ public void mouseReleased(MouseEvent evt)
+ {
+ if(!GUIUtilities.isPopupTrigger(evt)
+ && table.getSelectedRow() != -1)
+ {
+ browser.filesSelected();
+ }
+ } //}}}
+ } //}}}
+
+ private static class LoadingPlaceholder {}
+ //}}}
+
+ class ParentDirectoryList extends JList
+ {
+
+ public String getPath(int row)
+ {
+ Collection<String> components = new LinkedList<String>();
+ for (int i=1; i<=row; ++i)
+ components.add(getModel().getElementAt(i).toString());
+ return getModel().getElementAt(0) + TextUtilities.join(components, File.separator);
+ }
+
+ @Override
+ protected void processKeyEvent(KeyEvent evt)
+ {
+ if (evt.getID() == KeyEvent.KEY_PRESSED)
+ {
+ ActionContext ac = VFSBrowser.getActionContext();
+ int row = parentDirectories.getSelectedIndex();
+ switch(evt.getKeyCode())
+ {
+ case KeyEvent.VK_DOWN:
+ evt.consume();
+ if (row < parentDirectories.getSize().height-1)
+ parentDirectories.setSelectedIndex(++row);
+ break;
+ case KeyEvent.VK_LEFT:
+ if ((evt.getModifiers() & InputEvent.ALT_MASK)>0)
+ {
+ evt.consume();
+ browser.previousDirectory();
+ }
+ else super.processEvent(evt);
+ break;
+ case KeyEvent.VK_RIGHT:
+ if ((evt.getModifiers() & InputEvent.ALT_MASK)>0)
+ {
+ evt.consume();
+ browser.nextDirectory();
+ }
+ else super.processEvent(evt);
+ break;
+ case KeyEvent.VK_TAB:
+ evt.consume();
+ if ((evt.getModifiers() & InputEvent.SHIFT_MASK) > 0)
+ browser.focusOnDefaultComponent();
+ else
+ table.requestFocus();
+ break;
+ case KeyEvent.VK_UP :
+ evt.consume();
+ if (row > 0)
+ {
+ parentDirectories.setSelectedIndex(--row);
+ }
+ break;
+ case KeyEvent.VK_BACK_SPACE:
+ evt.consume();
+ EditAction up = ac.getAction("vfs.browser.up");
+ ac.invokeAction(evt, up);
+ break;
+ case KeyEvent.VK_F5:
+ evt.consume();
+ EditAction reload = ac.getAction("vfs.browser.reload");
+ ac.invokeAction(evt, reload);
+ break;
+ case KeyEvent.VK_ENTER:
+ evt.consume();
+ String path = getPath(row);
+ getBrowser().setDirectory(path);
+ table.requestFocus();
+ break;
+/* These actions don't work because they look at the EntryTable for the current selected
+ * item. We need actions that look at the parentDirectoryList item instead.
+ *
+ case KeyEvent.VK_DELETE:
+ evt.consume();
+ ea = ac.getAction("vfs.browser.delete");
+ ac.invokeAction(evt, ea);
+ break;
+ case KeyEvent.CTRL_MASK | KeyEvent.VK_N:
+ evt.consume();
+ ea = ac.getAction("vfs.browser.new-file");
+ ac.invokeAction(evt, ea);
+ break;
+ case KeyEvent.VK_INSERT:
+ evt.consume();
+ ea = ac.getAction("vfs.browser.new-directory");
+ ac.invokeAction(evt, ea);
+ break; */
+ }
+ }
+ else if(evt.getID() == KeyEvent.KEY_TYPED)
+ {
+ if(evt.isControlDown() || evt.isAltDown()
+ || evt.isMetaDown())
+ {
+ evt.consume();
+ return;
+ }
+ switch(evt.getKeyChar())
+ {
+ case '~':
+ evt.consume();
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ browser.setDirectory(System.getProperty(
+ "user.home"));
+ break;
+ case '/':
+ evt.consume();
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ browser.rootDirectory();
+ break;
+ case '-':
+ evt.consume();
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ {
+ browser.setDirectory(
+ browser.getView().getBuffer()
+ .getDirectory());
+ }
+ break;
+ }
+ }
+ if (!evt.isConsumed())
+ super.processKeyEvent(evt);
+ }
+ }
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/FileCellRenderer.java b/jEdit/org/gjt/sp/jedit/browser/FileCellRenderer.java
index fa879d0..2e5008b 100644
--- a/jEdit/org/gjt/sp/jedit/browser/FileCellRenderer.java
+++ b/jEdit/org/gjt/sp/jedit/browser/FileCellRenderer.java
@@ -1,291 +1,291 @@
-/*
- * FileCellRenderer.java - renders table cells for the VFS browser
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999 Jason Ginchereau
- * Portions copyright (C) 2001, 2003 Slava Pestov
- * Portions copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-//{{{ Imports
-import java.awt.*;
-import java.awt.font.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.table.*;
-import org.gjt.sp.jedit.io.VFSFile;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * Local filesystem VFS.
- * @version $Id: FileCellRenderer.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class FileCellRenderer extends DefaultTableCellRenderer
-{
- public static Icon fileIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.file.icon"));
- public static Icon openFileIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.open-file.icon"));
- public static Icon dirIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.dir.icon"));
- public static Icon openDirIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.open-dir.icon"));
- public static Icon filesystemIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.filesystem.icon"));
- public static Icon loadingIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.loading.icon"));
-
- //{{{ FileCellRenderer constructor
- public FileCellRenderer()
- {
- plainFont = UIManager.getFont("Tree.font");
- if(plainFont == null)
- plainFont = jEdit.getFontProperty("metal.secondary.font");
- boldFont = plainFont.deriveFont(Font.BOLD);
- } //}}}
-
- //{{{ getTableCellRendererComponent() method
- public Component getTableCellRendererComponent(JTable table,
- Object value, boolean isSelected, boolean hasFocus,
- int row, int column)
- {
- super.getTableCellRendererComponent(table,value,isSelected,
- hasFocus,row,column);
-
- if(value instanceof VFSDirectoryEntryTableModel.Entry)
- {
- VFSDirectoryEntryTableModel.Entry entry =
- (VFSDirectoryEntryTableModel.Entry)value;
- VFSFile file = entry.dirEntry;
-
- setFont(file.getType() == VFSFile.FILE
- ? plainFont : boldFont);
-
- this.isSelected = isSelected;
- this.file = file;
-
- if(column == 0)
- {
- // while its broken to have a null
- // symlinkPath, some older plugins
- // might...
- String path;
- if(file.getSymlinkPath() == null)
- path = file.getPath();
- else
- path = file.getSymlinkPath();
- openBuffer = jEdit._getBuffer(path) != null;
-
- setIcon(showIcons
- ? getIconForFile(file,entry.expanded,
- openBuffer) : null);
- setText(file.getName());
-
- int state;
- if(file.getType() == VFSFile.FILE)
- state = ExpansionToggleBorder.STATE_NONE;
- else if(entry.expanded)
- state = ExpansionToggleBorder.STATE_EXPANDED;
- else
- state = ExpansionToggleBorder.STATE_COLLAPSED;
-
- setBorder(new ExpansionToggleBorder(
- state,entry.level));
- }
- else
- {
- VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)table.getModel();
- String extAttr = model.getExtendedAttribute(column);
-
- openBuffer = false;
- setIcon(null);
- setText(file.getExtendedAttribute(extAttr));
- setBorder(new EmptyBorder(1,1,1,1));
- }
- }
-
- return this;
- } //}}}
-
- //{{{ paintComponent() method
- public void paintComponent(Graphics g)
- {
- if(!isSelected)
- {
- Color color = file.getColor();
-
- setForeground(color == null
- ? UIManager.getColor("Tree.foreground")
- : color);
- }
-
- super.paintComponent(g);
-
- if(openBuffer)
- {
- Font font = getFont();
-
- FontMetrics fm = getFontMetrics(font);
- int x, y;
- if(getIcon() == null)
- {
- x = 0;
- y = fm.getAscent() + 2;
- }
- else
- {
- x = getIcon().getIconWidth() + getIconTextGap();
- y = Math.max(fm.getAscent() + 2,16);
- }
-
- Insets border = getBorder().getBorderInsets(this);
- x += border.left;
-
- g.setColor(getForeground());
- g.drawLine(x,y,x + fm.stringWidth(getText()),y);
- }
- } //}}}
-
- //{{{ getIconForFile() method
- /**
- * @since jEdit 4.3pre2
- */
- public static Icon getIconForFile(VFSFile file,
- boolean expanded)
- {
- return getIconForFile(file,expanded,
- jEdit._getBuffer(file.getSymlinkPath()) != null);
- } //}}}
-
- //{{{ getIconForFile() method
- public static Icon getIconForFile(VFSFile file,
- boolean expanded, boolean openBuffer)
- {
- if (defaultIcons)
- return file.getDefaultIcon(expanded, openBuffer);
- return file.getIcon(expanded, openBuffer);
- } //}}}
-
- //{{{ Package-private members
- Font plainFont;
- Font boldFont;
- boolean showIcons;
- private static boolean defaultIcons = true;
-
- //{{{ propertiesChanged() method
- void propertiesChanged()
- {
- showIcons = jEdit.getBooleanProperty("vfs.browser.showIcons");
- defaultIcons = jEdit.getBooleanProperty("vfs.browser.useDefaultIcons");
- } //}}}
-
- //{{{ getEntryWidth() method
- int getEntryWidth(VFSDirectoryEntryTableModel.Entry entry,
- Font font, FontRenderContext fontRenderContext)
- {
- String name = entry.dirEntry.getName();
- int width = (int)font.getStringBounds(name,fontRenderContext)
- .getWidth();
- width += ExpansionToggleBorder.ICON_WIDTH
- + entry.level * ExpansionToggleBorder.LEVEL_WIDTH
- + 3;
- if(showIcons)
- {
- width += fileIcon.getIconWidth();
- width += getIconTextGap();
- }
- return width;
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private boolean openBuffer;
- private boolean isSelected;
- private VFSFile file;
- //}}}
-
- //{{{ ExpansionToggleBorder class
- static class ExpansionToggleBorder implements Border
- {
- static final Icon COLLAPSE_ICON;
- static final Icon EXPAND_ICON;
- static final int ICON_WIDTH;
-
- static final int LEVEL_WIDTH = 10;
-
- static final int STATE_NONE = 0;
- static final int STATE_COLLAPSED = 1;
- static final int STATE_EXPANDED = 2;
-
- //{{{ ExpansionToggleBorder constructor
- ExpansionToggleBorder(int state, int level)
- {
- this.state = state;
- this.level = level;
- } //}}}
-
- //{{{ paintBorder() method
- public void paintBorder(Component c, Graphics g,
- int x, int y, int width, int height)
- {
- // paint the opposite icon of what the state is
- switch(state)
- {
- case STATE_COLLAPSED:
- EXPAND_ICON.paintIcon(c,g,
- x + level * LEVEL_WIDTH + 2,
- y + (height - EXPAND_ICON.getIconHeight()) / 2);
- break;
- case STATE_EXPANDED:
- COLLAPSE_ICON.paintIcon(c,g,
- x + level * LEVEL_WIDTH + 2,
- y + (height - COLLAPSE_ICON.getIconHeight()) / 2);
- break;
- }
- } //}}}
-
- //{{{ getBorderInsets() method
- public Insets getBorderInsets(Component c)
- {
- return new Insets(1,level * LEVEL_WIDTH
- + ICON_WIDTH + 4,1,1);
- } //}}}
-
- //{{{ isBorderOpaque() method
- public boolean isBorderOpaque()
- {
- return false;
- } //}}}
-
- //{{{ isExpansionToggle() method
- public static boolean isExpansionToggle(int level, int x)
- {
- return (x >= level * LEVEL_WIDTH)
- && (x <= level * LEVEL_WIDTH + ICON_WIDTH);
- } //}}}
-
- //{{{ Private members
- private int state;
- private int level;
-
- static
- {
- COLLAPSE_ICON = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.collapse.icon"));
- EXPAND_ICON = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.expand.icon"));
- ICON_WIDTH = Math.max(COLLAPSE_ICON.getIconWidth(), EXPAND_ICON.getIconWidth());
- } //}}}
- } //}}}
-}
+/*
+ * FileCellRenderer.java - renders table cells for the VFS browser
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999 Jason Ginchereau
+ * Portions copyright (C) 2001, 2003 Slava Pestov
+ * Portions copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.font.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.table.*;
+import org.gjt.sp.jedit.io.VFSFile;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * Local filesystem VFS.
+ * @version $Id: FileCellRenderer.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class FileCellRenderer extends DefaultTableCellRenderer
+{
+ public static Icon fileIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.file.icon"));
+ public static Icon openFileIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.open-file.icon"));
+ public static Icon dirIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.dir.icon"));
+ public static Icon openDirIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.open-dir.icon"));
+ public static Icon filesystemIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.filesystem.icon"));
+ public static Icon loadingIcon = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.loading.icon"));
+
+ //{{{ FileCellRenderer constructor
+ public FileCellRenderer()
+ {
+ plainFont = UIManager.getFont("Tree.font");
+ if(plainFont == null)
+ plainFont = jEdit.getFontProperty("metal.secondary.font");
+ boldFont = plainFont.deriveFont(Font.BOLD);
+ } //}}}
+
+ //{{{ getTableCellRendererComponent() method
+ public Component getTableCellRendererComponent(JTable table,
+ Object value, boolean isSelected, boolean hasFocus,
+ int row, int column)
+ {
+ super.getTableCellRendererComponent(table,value,isSelected,
+ hasFocus,row,column);
+
+ if(value instanceof VFSDirectoryEntryTableModel.Entry)
+ {
+ VFSDirectoryEntryTableModel.Entry entry =
+ (VFSDirectoryEntryTableModel.Entry)value;
+ VFSFile file = entry.dirEntry;
+
+ setFont(file.getType() == VFSFile.FILE
+ ? plainFont : boldFont);
+
+ this.isSelected = isSelected;
+ this.file = file;
+
+ if(column == 0)
+ {
+ // while its broken to have a null
+ // symlinkPath, some older plugins
+ // might...
+ String path;
+ if(file.getSymlinkPath() == null)
+ path = file.getPath();
+ else
+ path = file.getSymlinkPath();
+ openBuffer = jEdit._getBuffer(path) != null;
+
+ setIcon(showIcons
+ ? getIconForFile(file,entry.expanded,
+ openBuffer) : null);
+ setText(file.getName());
+
+ int state;
+ if(file.getType() == VFSFile.FILE)
+ state = ExpansionToggleBorder.STATE_NONE;
+ else if(entry.expanded)
+ state = ExpansionToggleBorder.STATE_EXPANDED;
+ else
+ state = ExpansionToggleBorder.STATE_COLLAPSED;
+
+ setBorder(new ExpansionToggleBorder(
+ state,entry.level));
+ }
+ else
+ {
+ VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)table.getModel();
+ String extAttr = model.getExtendedAttribute(column);
+
+ openBuffer = false;
+ setIcon(null);
+ setText(file.getExtendedAttribute(extAttr));
+ setBorder(new EmptyBorder(1,1,1,1));
+ }
+ }
+
+ return this;
+ } //}}}
+
+ //{{{ paintComponent() method
+ public void paintComponent(Graphics g)
+ {
+ if(!isSelected)
+ {
+ Color color = file.getColor();
+
+ setForeground(color == null
+ ? UIManager.getColor("Tree.foreground")
+ : color);
+ }
+
+ super.paintComponent(g);
+
+ if(openBuffer)
+ {
+ Font font = getFont();
+
+ FontMetrics fm = getFontMetrics(font);
+ int x, y;
+ if(getIcon() == null)
+ {
+ x = 0;
+ y = fm.getAscent() + 2;
+ }
+ else
+ {
+ x = getIcon().getIconWidth() + getIconTextGap();
+ y = Math.max(fm.getAscent() + 2,16);
+ }
+
+ Insets border = getBorder().getBorderInsets(this);
+ x += border.left;
+
+ g.setColor(getForeground());
+ g.drawLine(x,y,x + fm.stringWidth(getText()),y);
+ }
+ } //}}}
+
+ //{{{ getIconForFile() method
+ /**
+ * @since jEdit 4.3pre2
+ */
+ public static Icon getIconForFile(VFSFile file,
+ boolean expanded)
+ {
+ return getIconForFile(file,expanded,
+ jEdit._getBuffer(file.getSymlinkPath()) != null);
+ } //}}}
+
+ //{{{ getIconForFile() method
+ public static Icon getIconForFile(VFSFile file,
+ boolean expanded, boolean openBuffer)
+ {
+ if (defaultIcons)
+ return file.getDefaultIcon(expanded, openBuffer);
+ return file.getIcon(expanded, openBuffer);
+ } //}}}
+
+ //{{{ Package-private members
+ Font plainFont;
+ Font boldFont;
+ boolean showIcons;
+ private static boolean defaultIcons = true;
+
+ //{{{ propertiesChanged() method
+ void propertiesChanged()
+ {
+ showIcons = jEdit.getBooleanProperty("vfs.browser.showIcons");
+ defaultIcons = jEdit.getBooleanProperty("vfs.browser.useDefaultIcons");
+ } //}}}
+
+ //{{{ getEntryWidth() method
+ int getEntryWidth(VFSDirectoryEntryTableModel.Entry entry,
+ Font font, FontRenderContext fontRenderContext)
+ {
+ String name = entry.dirEntry.getName();
+ int width = (int)font.getStringBounds(name,fontRenderContext)
+ .getWidth();
+ width += ExpansionToggleBorder.ICON_WIDTH
+ + entry.level * ExpansionToggleBorder.LEVEL_WIDTH
+ + 3;
+ if(showIcons)
+ {
+ width += fileIcon.getIconWidth();
+ width += getIconTextGap();
+ }
+ return width;
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private boolean openBuffer;
+ private boolean isSelected;
+ private VFSFile file;
+ //}}}
+
+ //{{{ ExpansionToggleBorder class
+ static class ExpansionToggleBorder implements Border
+ {
+ static final Icon COLLAPSE_ICON;
+ static final Icon EXPAND_ICON;
+ static final int ICON_WIDTH;
+
+ static final int LEVEL_WIDTH = 10;
+
+ static final int STATE_NONE = 0;
+ static final int STATE_COLLAPSED = 1;
+ static final int STATE_EXPANDED = 2;
+
+ //{{{ ExpansionToggleBorder constructor
+ ExpansionToggleBorder(int state, int level)
+ {
+ this.state = state;
+ this.level = level;
+ } //}}}
+
+ //{{{ paintBorder() method
+ public void paintBorder(Component c, Graphics g,
+ int x, int y, int width, int height)
+ {
+ // paint the opposite icon of what the state is
+ switch(state)
+ {
+ case STATE_COLLAPSED:
+ EXPAND_ICON.paintIcon(c,g,
+ x + level * LEVEL_WIDTH + 2,
+ y + (height - EXPAND_ICON.getIconHeight()) / 2);
+ break;
+ case STATE_EXPANDED:
+ COLLAPSE_ICON.paintIcon(c,g,
+ x + level * LEVEL_WIDTH + 2,
+ y + (height - COLLAPSE_ICON.getIconHeight()) / 2);
+ break;
+ }
+ } //}}}
+
+ //{{{ getBorderInsets() method
+ public Insets getBorderInsets(Component c)
+ {
+ return new Insets(1,level * LEVEL_WIDTH
+ + ICON_WIDTH + 4,1,1);
+ } //}}}
+
+ //{{{ isBorderOpaque() method
+ public boolean isBorderOpaque()
+ {
+ return false;
+ } //}}}
+
+ //{{{ isExpansionToggle() method
+ public static boolean isExpansionToggle(int level, int x)
+ {
+ return (x >= level * LEVEL_WIDTH)
+ && (x <= level * LEVEL_WIDTH + ICON_WIDTH);
+ } //}}}
+
+ //{{{ Private members
+ private int state;
+ private int level;
+
+ static
+ {
+ COLLAPSE_ICON = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.collapse.icon"));
+ EXPAND_ICON = GUIUtilities.loadIcon(jEdit.getProperty("vfs.browser.expand.icon"));
+ ICON_WIDTH = Math.max(COLLAPSE_ICON.getIconWidth(), EXPAND_ICON.getIconWidth());
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/ListDirectoryBrowserTask.java b/jEdit/org/gjt/sp/jedit/browser/ListDirectoryBrowserTask.java
new file mode 100644
index 0000000..cd24d76
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/browser/ListDirectoryBrowserTask.java
@@ -0,0 +1,119 @@
+/*
+ * ListDirectoryBrowserTask
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright © 2010 Matthieu Casanova
+ * Portions Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.jedit.io.VFSFile;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.util.Log;
+
+import java.io.IOException;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @version $Id: ListDirectoryBrowserTask.java 18380 2010-08-18 13:10:43Z kpouer $
+ */
+class ListDirectoryBrowserTask extends AbstractBrowserTask
+{
+ //{{{ BrowserIORequest constructor
+ /**
+ * Creates a new browser I/O request.
+ * @param browser The VFS browser instance
+ * @param path1 The first path name to operate on
+ * @param path2 The second path name to operate on
+ * @param loadInfo A two-element array filled out by the request;
+ * element 1 is the canonical path, element 2 is the file list.
+ */
+ ListDirectoryBrowserTask(VFSBrowser browser,
+ Object session, VFS vfs, String path1, String path2,
+ Object[] loadInfo, Runnable awtRunnable)
+ {
+ super(browser, session, vfs, path1, path2, loadInfo, awtRunnable);
+ } //}}}
+
+ //{{{ run() method
+ public void _run()
+ {
+ listDirectory();
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return getClass().getName() + "[type=LIST_DIRECTORY"
+ + ",vfs=" + vfs + ",path1=" + path1
+ + ",path2=" + path2 + "]";
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ listDirectory() method
+ private void listDirectory()
+ {
+ VFSFile[] directory = null;
+
+ String[] args = { path1 };
+ setStatus(jEdit.getProperty("vfs.status.listing-directory",args));
+
+ String canonPath = path1;
+
+ try
+ {
+ setCancellable(true);
+
+ canonPath = vfs._canonPath(session,path1,browser);
+ directory = vfs._listFiles(session,canonPath,browser);
+ }
+ catch(IOException io)
+ {
+ setCancellable(false);
+ Log.log(Log.ERROR,this,io);
+ String[] pp = { io.toString() };
+ VFSManager.error(browser,path1,"ioerror.directory-error",pp);
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,browser);
+ }
+ catch(IOException io)
+ {
+ setCancellable(false);
+ Log.log(Log.ERROR,this,io);
+ String[] pp = { io.toString() };
+ VFSManager.error(browser,path1,"ioerror.directory-error",pp);
+ }
+ }
+
+ setCancellable(false);
+
+ loadInfo[0] = canonPath;
+ loadInfo[1] = directory;
+ } //}}}
+ //}}}
+}
\ No newline at end of file
diff --git a/jEdit/org/gjt/sp/jedit/browser/VFSBrowser.java b/jEdit/org/gjt/sp/jedit/browser/VFSBrowser.java
index 69c2309..f02f100 100644
--- a/jEdit/org/gjt/sp/jedit/browser/VFSBrowser.java
+++ b/jEdit/org/gjt/sp/jedit/browser/VFSBrowser.java
@@ -1,2113 +1,2119 @@
-/*
- * VFSBrowser.java - VFS browser
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-//{{{ Imports
-import org.gjt.sp.jedit.bsh.*;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.io.File;
-import java.util.*;
-import java.util.List;
-
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.msg.*;
-import org.gjt.sp.jedit.search.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.jedit.menu.MenuItemTextComparator;
-//}}}
-
-/**
- * The main class of the VFS browser.
- * Used as dockable, and also embedded inside the
- * VFSFileChooserDialog.
- *
- * @author Slava Pestov
- * @version $Id: VFSBrowser.java 16560 2009-11-29 19:06:17Z kerik-sf $
- */
-public class VFSBrowser extends JPanel implements EBComponent,
- DefaultFocusComponent, DockableWindow
-{
- public static final String NAME = "vfs.browser";
-
- //{{{ Browser types
- /**
- * Open file dialog mode. Equals JFileChooser.OPEN_DIALOG for
- * backwards compatibility.
- */
- public static final int OPEN_DIALOG = 0;
-
- /**
- * Save file dialog mode. Equals JFileChooser.SAVE_DIALOG for
- * backwards compatibility.
- */
- public static final int SAVE_DIALOG = 1;
- /**
- * Choose directory dialog mode.
- */
- public static final int BROWSER_DIALOG = 4;
- /**
- * Choose directory dialog mode.
- */
- public static final int CHOOSE_DIRECTORY_DIALOG = 3;
-
- /**
- * Stand-alone browser mode.
- */
- public static final int BROWSER = 2;
- //}}}
-
- //{{{ browseDirectoryInNewWindow() method
- /**
- * Opens the specified directory in a new, floating, file system browser.
- * @param view The view
- * @param path The directory's path
- * @since jEdit 4.1pre2
- */
- public static void browseDirectoryInNewWindow(View view, String path)
- {
- DockableWindowManager wm = view.getDockableWindowManager();
- if(path != null)
- {
- // this is such a bad way of doing it, but oh well...
- jEdit.setTemporaryProperty("vfs.browser.path.tmp",path);
- }
- wm.floatDockableWindow("vfs.browser");
- jEdit.unsetProperty("vfs.browser.path.tmp");
- } //}}}
-
- //{{{ browseDirectory() method
- /**
- * Opens the specified directory in a file system browser.
- * @param view The view
- * @param path The directory's path
- * @since jEdit 4.0pre3
- */
- public static void browseDirectory(View view, String path)
- {
- DockableWindowManager wm = view.getDockableWindowManager();
- VFSBrowser browser = (VFSBrowser)wm.getDockable(NAME);
- if(browser != null)
- {
- wm.showDockableWindow(NAME);
- browser.setDirectory(path);
- }
- else
- {
- if(path != null)
- {
- // this is such a bad way of doing it, but oh well...
- jEdit.setTemporaryProperty("vfs.browser.path.tmp",path);
- }
- wm.addDockableWindow("vfs.browser");
- jEdit.unsetProperty("vfs.browser.path.tmp");
- }
- } //}}}
-
- //{{{ getActionContext() method
- /**
- * Returns the browser action context.
- * @since jEdit 4.2pre1
- */
- public static ActionContext getActionContext()
- {
- return actionContext;
- } //}}}
-
- //{{{ VFSBrowser constructor
- /**
- * Creates a new VFS browser.
- * @param view The view to open buffers in by default
- */
- public VFSBrowser(View view, String position)
- {
- this(view,null,BROWSER,true,position);
- } //}}}
-
- //{{{ VFSBrowser constructor
- /**
- * Creates a new VFS browser.
- * @param view The view to open buffers in by default
- * @param path The path to display
- * @param mode The browser mode
- * @param multipleSelection True if multiple selection should be allowed
- * @param position Where the browser is located
- * @since jEdit 4.2pre1
- */
- public VFSBrowser(View view, String path, int mode,
- boolean multipleSelection, String position)
- {
- super(new BorderLayout());
-
- listenerList = new EventListenerList();
-
- this.mode = mode;
- this.multipleSelection = multipleSelection;
- this.view = view;
-
- DockableWindowManager dwm = view.getDockableWindowManager();
- KeyListener keyListener = dwm.closeListener(NAME);
- addKeyListener(keyListener);
-
- currentEncoding = jEdit.getProperty("buffer.encoding",
- System.getProperty("file.encoding"));
- autoDetectEncoding = jEdit.getBooleanProperty(
- "buffer.encodingAutodetect");
-
- ActionHandler actionHandler = new ActionHandler();
-
- topBox = new Box(BoxLayout.Y_AXIS);
- horizontalLayout = (mode != BROWSER
- || DockableWindowManager.TOP.equals(position)
- || DockableWindowManager.BOTTOM.equals(position));
-
- toolbarBox = new Box(horizontalLayout
- ? BoxLayout.X_AXIS
- : BoxLayout.Y_AXIS);
-
- topBox.add(toolbarBox);
-
- GridBagLayout layout = new GridBagLayout();
- pathAndFilterPanel = new JPanel(layout);
- if(isHorizontalLayout())
- pathAndFilterPanel.setBorder(new EmptyBorder(12,12,12,12));
-
- GridBagConstraints cons = new GridBagConstraints();
- cons.gridwidth = cons.gridheight = 1;
- cons.gridx = cons.gridy = 0;
- cons.fill = GridBagConstraints.BOTH;
- cons.anchor = GridBagConstraints.EAST;
- JLabel label = new JLabel(jEdit.getProperty("vfs.browser.path"),
- SwingConstants.RIGHT);
- label.setBorder(new EmptyBorder(0,0,0,12));
- layout.setConstraints(label,cons);
- pathAndFilterPanel.add(label);
-
- pathField = new HistoryTextField("vfs.browser.path");
- pathField.setName("path");
- pathField.addKeyListener(keyListener);
- pathField.setInstantPopups(true);
- pathField.setEnterAddsToHistory(false);
- pathField.setSelectAllOnFocus(true);
-
- if (mode == BROWSER)
- {
- pathField.addKeyListener(new KeyAdapter()
- {
- public void keyReleased(KeyEvent e)
- {
- if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
- {
- pathField.setText(VFSBrowser.this.path);
- }
- }
- });
- }
-
- // because its preferred size can be quite wide, we
- // don't want it to make the browser way too big,
- // so set the preferred width to 0.
- Dimension prefSize = pathField.getPreferredSize();
- prefSize.width = 0;
- pathField.setPreferredSize(prefSize);
- pathField.addActionListener(actionHandler);
- cons.gridx = 1;
- cons.weightx = 1.0;
- cons.gridwidth = GridBagConstraints.REMAINDER;
-
- layout.setConstraints(pathField,cons);
- pathAndFilterPanel.add(pathField);
-
- filterCheckbox = new JCheckBox(jEdit.getProperty("vfs.browser.filter"));
- filterCheckbox.setMargin(new Insets(0,0,0,0));
-// filterCheckbox.setRequestFocusEnabled(false);
- filterCheckbox.setBorder(new EmptyBorder(0,0,0,12));
- filterCheckbox.setSelected(jEdit.getBooleanProperty(
- "vfs.browser.filter-enabled"));
-
- filterCheckbox.addActionListener(actionHandler);
- filterCheckbox.addKeyListener(keyListener);
- filterCheckbox.setName("filter-checkbox");
- if(mode != CHOOSE_DIRECTORY_DIALOG)
- {
- cons.gridwidth = 1;
- cons.gridx = 0;
- cons.weightx = 0.0;
- cons.gridy = 1;
- layout.setConstraints(filterCheckbox,cons);
- pathAndFilterPanel.add(filterCheckbox);
- }
-
- filterField = new JComboBox();
- filterEditor = new HistoryComboBoxEditor("vfs.browser.filter");
- filterEditor.setToolTipText(jEdit.getProperty("glob.tooltip"));
- filterEditor.setInstantPopups(true);
- filterEditor.setSelectAllOnFocus(true);
- filterEditor.addActionListener(actionHandler);
- filterEditor.addKeyListener(keyListener);
- filterField.setName("filter-field");
- String filter;
- if(mode == BROWSER || !jEdit.getBooleanProperty(
- "vfs.browser.currentBufferFilter"))
- {
- filter = jEdit.getProperty("vfs.browser.last-filter");
- if(filter == null)
- filter = jEdit.getProperty("vfs.browser.default-filter");
- }
- else
- {
- String ext = MiscUtilities.getFileExtension(
- view.getBuffer().getName());
- if(ext.length() == 0)
- filter = jEdit.getProperty("vfs.browser.default-filter");
- else
- filter = '*' + ext;
- }
-
- // filterField.getEditor().setItem(new GlobVFSFileFilter(filter));
- // filterField.addItem(filterField.getEditor().getItem());
- filterEditor.setItem(new GlobVFSFileFilter(filter));
- filterField.addItem(filterEditor.getItem());
- filterField.addItemListener(actionHandler);
- filterField.setRenderer(new VFSFileFilterRenderer());
-
- // loads the registered VFSFileFilter services.
- String[] _filters = ServiceManager.getServiceNames(VFSFileFilter.SERVICE_NAME);
- for (int i = 0; i < _filters.length; i++)
- {
- VFSFileFilter _filter = (VFSFileFilter)
- ServiceManager.getService(VFSFileFilter.SERVICE_NAME, _filters[i]);
- filterField.addItem(_filter);
- }
-
- if(mode != CHOOSE_DIRECTORY_DIALOG)
- {
- cons.gridwidth = GridBagConstraints.REMAINDER;
- cons.fill = GridBagConstraints.HORIZONTAL;
- cons.gridx = 1;
- cons.weightx = 1.0;
- if (filterField.getItemCount() > 1)
- {
- filterField.setEditor(filterEditor);
- filterField.setEditable(true);
- layout.setConstraints(filterField,cons);
- pathAndFilterPanel.add(filterField);
- }
- else
- {
- layout.setConstraints(filterEditor,cons);
- pathAndFilterPanel.add(filterEditor);
- }
- }
-
- topBox.add(pathAndFilterPanel);
- add(BorderLayout.NORTH,topBox);
-
- add(BorderLayout.CENTER,browserView = new BrowserView(this));
- if(isHorizontalLayout())
- browserView.setBorder(new EmptyBorder(0,12,0,12));
- defaultFocusComponent = browserView.getTable();
- propertiesChanged();
-
- updateFilterEnabled();
-
- setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
- // see VFSBrowser.browseDirectory()
- if(path == null)
- path = jEdit.getProperty("vfs.browser.path.tmp");
-
- if(path == null || path.length() == 0)
- {
- String userHome = System.getProperty("user.home");
- String defaultPath = jEdit.getProperty("vfs.browser.defaultPath");
- if("home".equals(defaultPath))
- path = userHome;
- else if("working".equals(defaultPath))
- path = System.getProperty("user.dir");
- else if("buffer".equals(defaultPath))
- {
- Buffer buffer = view.getBuffer();
- path = buffer.getDirectory();
- }
- else if("last".equals(defaultPath))
- {
- HistoryModel pathModel = HistoryModel.getModel("vfs.browser.path");
- if(pathModel.getSize() == 0)
- path = "~";
- else
- path = pathModel.getItem(0);
- }
- else if("favorites".equals(defaultPath))
- path = "favorites:";
- else
- {
- // unknown value??!!!
- path = userHome;
- }
- }
-
- final String _path = path;
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- setDirectory(_path);
- }
- });
- } //}}}
-
- //{{{ focusOnDefaultComponent() method
- public void focusOnDefaultComponent()
- {
- // pathField.requestFocus();
- defaultFocusComponent.requestFocus();
- } //}}}
-
- // {{{ setDefaultFocusComponent()
- /** Only used by VFSFileChooserDialog, since it embeds this in a dialog
- */
- void setDefaultFocusComponent(JComponent c)
- {
- defaultFocusComponent = c;
- }// }}}
-
- //{{{ addNotify() method
- @Override
- public void addNotify()
- {
- super.addNotify();
- EditBus.addToBus(this);
- } //}}}
-
- //{{{ removeNotify() method
- @Override
- public void removeNotify()
- {
- super.removeNotify();
- jEdit.setBooleanProperty("vfs.browser.filter-enabled",
- filterCheckbox.isSelected());
- if(mode == BROWSER || !jEdit.getBooleanProperty(
- "vfs.browser.currentBufferFilter"))
- {
- VFSFileFilter selectedFilter =
- (VFSFileFilter) filterField.getSelectedItem();
- if (selectedFilter instanceof GlobVFSFileFilter)
- jEdit.setProperty("vfs.browser.last-filter",
- ((GlobVFSFileFilter)selectedFilter).getGlob());
- }
- EditBus.removeFromBus(this);
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof PropertiesChanged)
- propertiesChanged();
- else if(msg instanceof BufferUpdate)
- {
- BufferUpdate bmsg = (BufferUpdate)msg;
- if(bmsg.getWhat() == BufferUpdate.CREATED
- || bmsg.getWhat() == BufferUpdate.CLOSED)
- browserView.updateFileView();
- }
- else if(msg instanceof PluginUpdate)
- {
- PluginUpdate pmsg = (PluginUpdate)msg;
- if((pmsg.getWhat() == PluginUpdate.LOADED ||
- pmsg.getWhat() == PluginUpdate.UNLOADED) &&
- plugins != null /* plugins can be null if the VFSBrowser menu bar is hidden */)
- {
- plugins.updatePopupMenu();
- }
- }
- else if(msg instanceof VFSUpdate)
- {
- maybeReloadDirectory(((VFSUpdate)msg).getPath());
- }
- } //}}}
-
- //{{{ getView() method
- public View getView()
- {
- return view;
- } //}}}
-
- //{{{ getMode() method
- public int getMode()
- {
- return mode;
- } //}}}
-
- //{{{ isMultipleSelectionEnabled() method
- public boolean isMultipleSelectionEnabled()
- {
- return multipleSelection;
- } //}}}
-
- //{{{ isHorizontalLayout() method
- public boolean isHorizontalLayout()
- {
- return horizontalLayout;
- } //}}}
-
- //{{{ getShowHiddenFiles() method
- public boolean getShowHiddenFiles()
- {
- return showHiddenFiles;
- } //}}}
-
- //{{{ setShowHiddenFiles() method
- public void setShowHiddenFiles(boolean showHiddenFiles)
- {
- this.showHiddenFiles = showHiddenFiles;
- } //}}}
-
- //{{{ getFilenameFilter() method
- /**
- * Returns the file name filter glob.
- * @since jEdit 3.2pre2
- * @deprecated Use {@link #getVFSFileFilter()} instead. This method
- * might return wrong information since jEdit 4.3pre6.
- */
- @Deprecated
- public String getFilenameFilter()
- {
- if(filterCheckbox.isSelected())
- {
- String filter = filterField.getSelectedItem().toString();
- if(filter.length() == 0)
- return "*";
- else
- return filter;
- }
- else
- return "*";
- } //}}}
-
- //{{{ getVFSFileFilter() method
- /**
- * Returns the currently active VFSFileFilter.
- *
- * @since jEdit 4.3pre7
- */
- public VFSFileFilter getVFSFileFilter()
- {
- if (mode == CHOOSE_DIRECTORY_DIALOG)
- return new DirectoriesOnlyFilter();
- return (VFSFileFilter) filterField.getSelectedItem();
- } //}}}
-
- //{{{ addVFSFileFilter() method
- /**
- * Adds a file filter to the browser.
- *
- * @since jEdit 4.3pre7
- */
- public void addVFSFileFilter(VFSFileFilter filter)
- {
- filterField.addItem(filter);
- if (filterField.getItemCount() == 2)
- {
- filterField.setEditor(filterEditor);
- filterField.setEditable(true);
-
- GridBagLayout layout = (GridBagLayout) pathAndFilterPanel.getLayout();
- GridBagConstraints cons =layout.getConstraints(filterEditor);
- cons.gridwidth = GridBagConstraints.REMAINDER;
- cons.fill = GridBagConstraints.HORIZONTAL;
- cons.gridx = 1;
- cons.weightx = 1;
-
- pathAndFilterPanel.remove(filterEditor);
- layout.setConstraints(filterField, cons);
- pathAndFilterPanel.add(filterField);
- pathAndFilterPanel.validate();
- pathAndFilterPanel.repaint();
- }
- } //}}}
-
- //{{{ setFilenameFilter() method
- public void setFilenameFilter(String filter)
- {
- if(filter == null || filter.length() == 0 || "*".equals(filter))
- filterCheckbox.setSelected(false);
- else
- {
- filterCheckbox.setSelected(true);
- filterEditor.setItem(new GlobVFSFileFilter(filter));
- }
- } //}}}
-
- //{{{ getDirectoryField() method
- public HistoryTextField getDirectoryField()
- {
- return pathField;
- } //}}}
-
- //{{{ getDirectory() method
- public String getDirectory()
- {
- return path;
- } //}}}
-
- // {{{ Directory Stack operations
- /**
- * @since jedit 4.3pre15
- */
- public void previousDirectory()
- {
- if (historyStack.size() > 1)
- {
- historyStack.pop();
- nextDirectoryStack.push(path);
- setDirectory(historyStack.peek());
- historyStack.pop();
- }
- }
-
-
- /**
- * @since jEdit 4.3pre15
- */
- public void nextDirectory()
- {
- if (!nextDirectoryStack.isEmpty())
- {
- setDirectory(nextDirectoryStack.pop());
- }
- }
- // }}}
-
- //{{{ setDirectory() method
- public void setDirectory(String path)
- {
- if(path.startsWith("file:"))
- path = path.substring(5);
- path = MiscUtilities.expandVariables(path);
- pathField.setText(path);
-
- if(!startRequest())
- return;
-
- historyStack.push(path);
- browserView.saveExpansionState();
- browserView.loadDirectory(null,path,true);
- this.path = path;
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- endRequest();
- }
- });
- } //}}}
-
- //{{{ getRootDirectory() method
- public static String getRootDirectory()
- {
- if(OperatingSystem.isMacOS() || OperatingSystem.isDOSDerived())
- return FileRootsVFS.PROTOCOL + ':';
- else
- return "/";
- } //}}}
-
- //{{{ rootDirectory() method
- /**
- * Goes to the local drives directory.
- * @since jEdit 4.0pre4
- */
- public void rootDirectory()
- {
- setDirectory(getRootDirectory());
- } //}}}
-
- //{{{ reloadDirectory() method
- public void reloadDirectory()
- {
- // used by FTP plugin to clear directory cache
- VFSManager.getVFSForPath(path).reloadDirectory(path);
-
- browserView.saveExpansionState();
- browserView.loadDirectory(null,path,false);
- } //}}}
-
- //{{{ delete() method
- /**
- * Note that all files must be on the same VFS.
- * @since jEdit 4.3pre2
- */
- public void delete(VFSFile[] files)
- {
- String dialogType;
-
- if(MiscUtilities.isURL(files[0].getDeletePath())
- && FavoritesVFS.PROTOCOL.equals(
- MiscUtilities.getProtocolOfURL(files[0].getDeletePath())))
- {
- dialogType = "vfs.browser.delete-favorites";
- }
- else
- {
- dialogType = "vfs.browser.delete-confirm";
- }
-
- StringBuilder buf = new StringBuilder();
- String typeStr = "files";
- for(int i = 0; i < files.length; i++)
- {
- buf.append(files[i].getPath());
- buf.append('\n');
- if (files[i].getType() == VFSFile.DIRECTORY)
- typeStr = "directories and their contents";
- }
-
- Object[] args = { buf.toString(), typeStr};
-
- int result = GUIUtilities.confirm(this,dialogType,args,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
- if(result != JOptionPane.YES_OPTION)
- return;
-
- VFS vfs = VFSManager.getVFSForPath(files[0].getDeletePath());
-
- if(!startRequest())
- return;
-
- for(int i = 0; i < files.length; i++)
- {
- Object session = vfs.createVFSSession(files[i].getDeletePath(),this);
- if(session == null)
- continue;
-
- VFSManager.runInWorkThread(new BrowserIORequest(
- BrowserIORequest.DELETE,this,
- session,vfs,files[i].getDeletePath(),
- null,null));
- }
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- endRequest();
- }
- });
- } //}}}
-
- //{{{ rename() method
- public void rename(String from)
- {
- VFS vfs = VFSManager.getVFSForPath(from);
-
- String filename = vfs.getFileName(from);
- String[] args = { filename };
- String to = GUIUtilities.input(this,"vfs.browser.rename",
- args,filename);
- if(to == null)
- return;
-
- to = MiscUtilities.constructPath(vfs.getParentOfPath(from),to);
-
- Object session = vfs.createVFSSession(from,this);
- if(session == null)
- return;
-
- if(!startRequest())
- return;
-
- VFSManager.runInWorkThread(new BrowserIORequest(
- BrowserIORequest.RENAME,this,
- session,vfs,from,to,null));
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- endRequest();
- }
- });
- } //}}}
-
- //{{{ rename() method
- public void rename(String from, String newname)
- {
- VFS vfs = VFSManager.getVFSForPath(from);
-
- String filename = vfs.getFileName(from);
- String[] args = { filename };
- String to = newname;
-
- if(to == null || filename.equals(newname))
- return;
-
- to = MiscUtilities.constructPath(vfs.getParentOfPath(from),to);
-
- Object session = vfs.createVFSSession(from,this);
- if(session == null)
- return;
-
- if(!startRequest())
- return;
-
- VFSManager.runInWorkThread(new BrowserIORequest(
- BrowserIORequest.RENAME,this,
- session,vfs,from,to,null));
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- endRequest();
- }
- });
- } //}}}
-
- //{{{ mkdir() method
- public void mkdir()
- {
- String newDirectory = GUIUtilities.input(this,"vfs.browser.mkdir",null);
- if(newDirectory == null)
- return;
-
- // if a directory is selected, create new dir in there.
- // if a file is selected, create new dir inside its parent.
- final VFSFile[] selected = getSelectedFiles();
- String parent;
- if(selected.length == 0)
- parent = path;
- else if(selected[0].getType() == VFSFile.FILE)
- {
- parent = selected[0].getPath();
- parent = VFSManager.getVFSForPath(parent)
- .getParentOfPath(parent);
- }
- else
- parent = selected[0].getPath();
-
- VFS vfs = VFSManager.getVFSForPath(parent);
-
- // path is the currently viewed directory in the browser
- newDirectory = MiscUtilities.constructPath(parent,newDirectory);
-
- Object session = vfs.createVFSSession(newDirectory,this);
- if(session == null)
- return;
-
- if(!startRequest())
- return;
-
- VFSManager.runInWorkThread(new BrowserIORequest(
- BrowserIORequest.MKDIR,this,
- session,vfs,newDirectory,null,null));
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- endRequest();
- if (selected.length != 0 && selected[0].getType() != VFSFile.FILE)
- {
- VFSDirectoryEntryTable directoryEntryTable = browserView.getTable();
- int selectedRow = directoryEntryTable.getSelectedRow();
- VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel) directoryEntryTable.getModel();
- VFSDirectoryEntryTableModel.Entry entry = model.files[selectedRow];
- if (!entry.expanded)
- {
- browserView.clearExpansionState();
- browserView.loadDirectory(entry,entry.dirEntry.getPath(),
- false);
- }
- }
- }
- });
- } //}}}
-
- //{{{ newFile() method
- /**
- * Creates a new file in the current directory.
- * @since jEdit 4.0pre2
- */
- public void newFile()
- {
- VFSFile[] selected = getSelectedFiles();
- if(selected.length >= 1)
- {
- VFSFile file = selected[0];
- if(file.getType() == VFSFile.DIRECTORY)
- jEdit.newFile(view,file.getPath());
- else
- {
- VFS vfs = VFSManager.getVFSForPath(file.getPath());
- jEdit.newFile(view,vfs.getParentOfPath(file.getPath()));
- }
- }
- else
- jEdit.newFile(view,path);
- } //}}}
-
- //{{{ fileProperties() method
- /**
- * Show selected file's properties.
- */
- public void fileProperties(VFSFile[] files)
- {
- new FilePropertiesDialog(view, this, files);
- } //}}}
-
- //{{{ searchInDirectory() method
- /**
- * Opens a directory search in the current directory.
- * @since jEdit 4.0pre2
- */
- public void searchInDirectory()
- {
- VFSFile[] selected = getSelectedFiles();
- if(selected.length >= 1)
- {
- VFSFile file = selected[0];
- searchInDirectory(file.getPath(),file.getType() != VFSFile.FILE);
- }
- else
- {
- searchInDirectory(path,true);
- }
- } //}}}
-
- //{{{ searchInDirectory() method
- /**
- * Opens a directory search in the specified directory.
- * @param path The path name
- * @param directory True if the path is a directory, false if it is a file
- * @since jEdit 4.2pre1
- */
- public void searchInDirectory(String path, boolean directory)
- {
- String filter;
- VFSFileFilter vfsff = getVFSFileFilter();
- if (vfsff instanceof GlobVFSFileFilter)
- filter = ((GlobVFSFileFilter)vfsff).getGlob();
- else
- filter = "*";
-
- if (!directory)
- {
- String name = MiscUtilities.getFileName(path);
- String ext = MiscUtilities.getFileExtension(name);
- filter = (ext == null || ext.length() == 0
- ? filter : '*' + ext);
- path = MiscUtilities.getParentOfPath(path);
- }
-
- SearchAndReplace.setSearchFileSet(new DirectoryListSet(
- path,filter,true));
- SearchDialog.showSearchDialog(view,null,SearchDialog.DIRECTORY);
- } //}}}
-
- //{{{ getBrowserView() method
- BrowserView getBrowserView()
- {
- return browserView;
- } //}}}
-
- //{{{ getSelectedFiles() method
- /**
- * @since jEdit 4.3pre2
- */
- public VFSFile[] getSelectedFiles()
- {
- return browserView.getSelectedFiles();
- } //}}}
-
- //{{{ locateFile() method
- /**
- * Goes to the given file's directory and selects the file in the list.
- * @param path The file
- * @since jEdit 4.2pre2
- */
- public void locateFile(final String path)
- {
- VFSFileFilter filter = getVFSFileFilter();
- if(!filter.accept(MiscUtilities.getFileName(path)))
- setFilenameFilter(null);
-
- setDirectory(MiscUtilities.getParentOfPath(path));
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- browserView.getTable().selectFile(path);
- }
- });
- } //}}}
-
- //{{{ createPluginsMenu() method
- public JComponent createPluginsMenu(JComponent pluginMenu, boolean showManagerOptions)
- {
- ActionHandler actionHandler = new ActionHandler();
- if(showManagerOptions && getMode() == BROWSER)
- {
- pluginMenu.add(GUIUtilities.loadMenuItem("plugin-manager",false));
- pluginMenu.add(GUIUtilities.loadMenuItem("plugin-options",false));
- if (pluginMenu instanceof JMenu)
- ((JMenu)pluginMenu).addSeparator();
- else if (pluginMenu instanceof JPopupMenu)
- ((JPopupMenu)pluginMenu).addSeparator();
-
- }
- else
- /* we're in a modal dialog */;
-
- List<JMenuItem> vec = new ArrayList<JMenuItem>();
-
- //{{{ old API
- Enumeration<VFS> e = VFSManager.getFilesystems();
-
- while(e.hasMoreElements())
- {
- VFS vfs = e.nextElement();
- if((vfs.getCapabilities() & VFS.BROWSE_CAP) == 0)
- continue;
-
- JMenuItem menuItem = new JMenuItem(jEdit.getProperty(
- "vfs." + vfs.getName() + ".label"));
- menuItem.setActionCommand(vfs.getName());
- menuItem.addActionListener(actionHandler);
- vec.add(menuItem);
- } //}}}
-
- //{{{ new API
- EditPlugin[] plugins = jEdit.getPlugins();
- for (int i = 0; i < plugins.length; i++)
- {
- JMenuItem menuItem = plugins[i].createBrowserMenuItems();
- if(menuItem != null)
- vec.add(menuItem);
- } //}}}
-
- if (!vec.isEmpty())
- {
- Collections.sort(vec,new MenuItemTextComparator());
- for(int i = 0; i < vec.size(); i++)
- pluginMenu.add(vec.get(i));
- }
- else
- {
- JMenuItem mi = new JMenuItem(jEdit.getProperty(
- "vfs.browser.plugins.no-plugins.label"));
- mi.setEnabled(false);
- pluginMenu.add(mi);
- }
-
- return pluginMenu;
- } //}}}
-
- //{{{ addBrowserListener() method
- public void addBrowserListener(BrowserListener l)
- {
- listenerList.add(BrowserListener.class,l);
- } //}}}
-
- //{{{ removeBrowserListener() method
- public void removeBrowserListener(BrowserListener l)
- {
- listenerList.remove(BrowserListener.class,l);
- } //}}}
-
- //{{{ filesActivated() method
- // canDoubleClickClose set to false when ENTER pressed
- public static final int M_OPEN = 0;
- public static final int M_OPEN_NEW_VIEW = 1;
- public static final int M_OPEN_NEW_PLAIN_VIEW = 2;
- public static final int M_OPEN_NEW_SPLIT = 3;
- public static final int M_INSERT = 4;
-
- /**
- * This method does the "double-click" handling. It is public so that
- * <code>browser.actions.xml</code> can bind to it.
- * @since jEdit 4.2pre2
- */
- public void filesActivated(int mode, boolean canDoubleClickClose)
- {
- VFSFile[] selectedFiles = browserView.getSelectedFiles();
-
- Buffer buffer = null;
-
-check_selected: for(int i = 0; i < selectedFiles.length; i++)
- {
- VFSFile file = selectedFiles[i];
-
- if(file.getType() == VFSFile.DIRECTORY
- || file.getType() == VFSFile.FILESYSTEM)
- {
- if(mode == M_OPEN_NEW_VIEW && this.mode == BROWSER)
- browseDirectoryInNewWindow(view,file.getPath());
- else
- setDirectory(file.getPath());
- }
- else if(this.mode == BROWSER || this.mode == BROWSER_DIALOG)
- {
- if(mode == M_INSERT)
- {
- view.getBuffer().insertFile(view,
- file.getPath());
- continue check_selected;
- }
-
- Buffer _buffer = jEdit.getBuffer(file.getPath());
- if(_buffer == null)
- {
- Hashtable<String, Object> props = new Hashtable<String, Object>();
- props.put(JEditBuffer.ENCODING,currentEncoding);
- props.put(Buffer.ENCODING_AUTODETECT,
- Boolean.valueOf(autoDetectEncoding));
- _buffer = jEdit.openFile(view, null,
- file.getPath(),false,props);
- }
- else if(doubleClickClose && canDoubleClickClose
- && this.mode != BROWSER_DIALOG
- && selectedFiles.length == 1)
- {
- // close if this buffer is currently
- // visible in the view.
- EditPane[] editPanes = view.getEditPanes();
- for(int j = 0; j < editPanes.length; j++)
- {
- if(editPanes[j].getBuffer() == _buffer)
- {
- jEdit.closeBuffer(view,_buffer);
- return;
- }
- }
- }
-
- if(_buffer != null)
- buffer = _buffer;
- }
- else
- {
- // if a file is selected in OPEN_DIALOG or
- // SAVE_DIALOG mode, just let the listener(s)
- // handle it
- }
- }
-
- if(buffer != null)
- {
- switch(mode)
- {
- case M_OPEN:
- view.setBuffer(buffer);
- break;
- case M_OPEN_NEW_VIEW:
- jEdit.newView(view,buffer,false);
- break;
- case M_OPEN_NEW_PLAIN_VIEW:
- jEdit.newView(view,buffer,true);
- break;
- case M_OPEN_NEW_SPLIT:
- view.splitHorizontally().setBuffer(buffer);
- break;
- }
- }
-
- Object[] listeners = listenerList.getListenerList();
- for(int i = 0; i < listeners.length; i++)
- {
- if(listeners[i] == BrowserListener.class)
- {
- BrowserListener l = (BrowserListener)listeners[i+1];
- l.filesActivated(this,selectedFiles);
- }
- }
- } //}}}
-
-
- //{{{ move() method
- public void move(String newPosition)
- {
- boolean horz = (mode != BROWSER
- || DockableWindowManager.TOP.equals(newPosition)
- || DockableWindowManager.BOTTOM.equals(newPosition));
- if (horz == horizontalLayout)
- return;
- horizontalLayout = horz;
- topBox.remove(toolbarBox);
- toolbarBox = new Box(horizontalLayout
- ? BoxLayout.X_AXIS
- : BoxLayout.Y_AXIS);
- topBox.add(toolbarBox, 0);
- propertiesChanged();
- } //}}}
-
- //{{{ Package-private members
- String currentEncoding;
- boolean autoDetectEncoding;
-
- //{{{ directoryLoaded() method
- void directoryLoaded(Object node, Object[] loadInfo,
- boolean addToHistory)
- {
- VFSManager.runInAWTThread(new DirectoryLoadedAWTRequest(
- node,loadInfo,addToHistory));
- } //}}}
-
- //{{{ filesSelected() method
- void filesSelected()
- {
- VFSFile[] selectedFiles = browserView.getSelectedFiles();
-
- if(mode == BROWSER)
- {
- for(int i = 0; i < selectedFiles.length; i++)
- {
- VFSFile file = selectedFiles[i];
- Buffer buffer = jEdit.getBuffer(file.getPath());
- if(buffer != null && view != null)
- view.setBuffer(buffer);
- }
- }
-
- Object[] listeners = listenerList.getListenerList();
- for(int i = 0; i < listeners.length; i++)
- {
- if(listeners[i] == BrowserListener.class)
- {
- BrowserListener l = (BrowserListener)listeners[i+1];
- l.filesSelected(this,selectedFiles);
- }
- }
- } //}}}
-
- //{{{ endRequest() method
- void endRequest()
- {
- requestRunning = false;
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- private static final ActionContext actionContext;
-
- static
- {
- actionContext = new BrowserActionContext();
-
- ActionSet builtInActionSet = new ActionSet(null,null,null,
- jEdit.class.getResource("browser.actions.xml"));
- builtInActionSet.setLabel(jEdit.getProperty("action-set.browser"));
- builtInActionSet.load();
- actionContext.addActionSet(builtInActionSet);
- }
-
- //{{{ Instance variables
- private EventListenerList listenerList;
- private View view;
- private boolean horizontalLayout;
- private String path;
- private JPanel pathAndFilterPanel;
- private HistoryTextField pathField;
- private JComponent defaultFocusComponent;
- private JCheckBox filterCheckbox;
- private HistoryComboBoxEditor filterEditor;
- private JComboBox filterField;
- private Box toolbarBox;
- private Box topBox;
- private FavoritesMenuButton favorites;
- private PluginsMenuButton plugins;
- private BrowserView browserView;
- private int mode;
- private boolean multipleSelection;
-
- private boolean showHiddenFiles;
- private boolean sortMixFilesAndDirs;
- private boolean sortIgnoreCase;
- private boolean doubleClickClose;
-
- private boolean requestRunning;
- private boolean maybeReloadRequestRunning;
-
- private Stack<String> historyStack = new Stack<String>();
- private Stack<String> nextDirectoryStack = new Stack<String>();
- //}}}
-
- //{{{ createMenuBar() method
- private Container createMenuBar()
- {
- JToolBar menuBar = new JToolBar();
- menuBar.setFloatable(false);
-
- menuBar.add(new CommandsMenuButton());
- menuBar.add(Box.createHorizontalStrut(3));
- menuBar.add(plugins = new PluginsMenuButton());
- menuBar.add(Box.createHorizontalStrut(3));
- menuBar.add(favorites = new FavoritesMenuButton());
-
- return menuBar;
- } //}}}
-
- //{{{ createToolBar() method
- private Container createToolBar()
- {
- if(mode == BROWSER)
- return GUIUtilities.loadToolBar(actionContext,
- "vfs.browser.toolbar-browser");
- else
- return GUIUtilities.loadToolBar(actionContext,
- "vfs.browser.toolbar-dialog");
- } //}}}
-
- //{{{ propertiesChanged() method
- private void propertiesChanged()
- {
- showHiddenFiles = jEdit.getBooleanProperty("vfs.browser.showHiddenFiles");
- sortMixFilesAndDirs = jEdit.getBooleanProperty("vfs.browser.sortMixFilesAndDirs");
- sortIgnoreCase = jEdit.getBooleanProperty("vfs.browser.sortIgnoreCase");
- doubleClickClose = jEdit.getBooleanProperty("vfs.browser.doubleClickClose");
-
- browserView.propertiesChanged();
-
- toolbarBox.removeAll();
-
- if(jEdit.getBooleanProperty("vfs.browser.showToolbar"))
- {
- Container toolbar = createToolBar();
- if(horizontalLayout)
- toolbarBox.add(toolbar);
- else
- {
- toolbarBox.add(toolbar);
- }
- }
-
- if(jEdit.getBooleanProperty("vfs.browser.showMenubar"))
- {
- Container menubar = createMenuBar();
- if(horizontalLayout)
- {
- toolbarBox.add(menubar,0);
- }
- else
- {
- menubar.add(Box.createGlue());
- toolbarBox.add(menubar);
- }
- }
- else
- {
- plugins = null;
- favorites = null;
- }
-
- revalidate();
-
- if(path != null)
- reloadDirectory();
- } //}}}
-
- /* We do this stuff because the browser is not able to handle
- * more than one request yet */
-
- //{{{ startRequest() method
- private boolean startRequest()
- {
- if(requestRunning)
- {
- // dump stack trace for debugging purposes
- Log.log(Log.DEBUG,this,new Throwable("For debugging purposes"));
-
- GUIUtilities.error(this,"browser-multiple-io",null);
- return false;
- }
- else
- {
- requestRunning = true;
- return true;
- }
- } //}}}
-
- //{{{ updateFilterEnabled() method
- private void updateFilterEnabled()
- {
- filterField.setEnabled(filterCheckbox.isSelected());
- filterEditor.setEnabled(filterCheckbox.isSelected());
- } //}}}
-
- //{{{ maybeReloadDirectory() method
- private void maybeReloadDirectory(String dir)
- {
- if(MiscUtilities.isURL(dir)
- && MiscUtilities.getProtocolOfURL(dir).equals(
- FavoritesVFS.PROTOCOL))
- {
- if(favorites != null)
- favorites.popup = null;
- }
-
- // this is a dirty hack and it relies on the fact
- // that updates for parents are sent before updates
- // for the changed nodes themselves (if this was not
- // the case, the browser wouldn't be updated properly
- // on delete, etc).
- //
- // to avoid causing '> 1 request' errors, don't reload
- // directory if request already active
- if(maybeReloadRequestRunning)
- {
- //Log.log(Log.WARNING,this,"VFS update: request already in progress");
- return;
- }
-
- // save a file -> sends vfs update. if a VFS file dialog box
- // is shown from the same event frame as the save, the
- // VFSUpdate will be delivered before the directory is loaded,
- // and before the path is set.
- if(path != null)
- {
- try
- {
- maybeReloadRequestRunning = true;
-
- browserView.maybeReloadDirectory(dir);
- }
- finally
- {
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- maybeReloadRequestRunning = false;
- }
- });
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener, ItemListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if (isProcessingEvent)
- return;
-
- Object source = evt.getSource();
-
- if (source == pathField
- || source == filterCheckbox)
- {
- isProcessingEvent = true;
- resetLater();
-
- updateFilterEnabled();
-
- String p = pathField.getText();
-
- if(p != null)
- setDirectory(p);
- browserView.focusOnFileView();
- }
-
- else if (source == filterField.getEditor())
- {
- // force the editor to refresh.
- filterField.getEditor().setItem(
- filterField.getEditor().getItem());
- }
-
- // depending on Swing look & feel, filterField.getEditor()
- // returns some ComboBoxUI
- else if (source == filterEditor)
- {
- // force the editor to refresh.
- filterEditor.setItem(
- filterEditor.getItem());
- filterField.setSelectedItem(
- filterEditor.getItem());
- // ### ugly:
- // itemStateChanged does not seem to get fired
- itemStateChanged(new ItemEvent(filterField,
- ItemEvent.ITEM_STATE_CHANGED,
- filterEditor.getItem(),
- ItemEvent.SELECTED));
- }
- }
-
- public void itemStateChanged(ItemEvent e)
- {
- if (isProcessingEvent)
- return;
-
- if (e.getStateChange() != ItemEvent.SELECTED)
- return;
-
- isProcessingEvent = true;
- resetLater();
-
- filterField.setEditable(e.getItem() instanceof GlobVFSFileFilter);
- updateFilterEnabled();
- String path = pathField.getText();
- if(path != null)
- setDirectory(path);
-
- browserView.focusOnFileView();
- }
-
- /**
- * Why this method exists: since both actionPerformed()
- * and itemStateChanged() above can change the combo box,
- * executing one of them can cause a chain reaction causing
- * the other method to be called. This would cause the
- * VFS subsystem to be called several times, which would
- * cause a warning to show up if the first operation is
- * still in progress, or cause a second operation to happen
- * which is not really wanted especially if we're talking
- * about a remove VFS. So the methods set a flag saying
- * that something is going on, and this method resets
- * the flag after the AWT thread is done with the
- * current events.
- */
- private void resetLater()
- {
- SwingUtilities.invokeLater(
- new Runnable()
- {
- public void run()
- {
- isProcessingEvent = false;
- }
- }
- );
- }
-
- private boolean isProcessingEvent;
-
- } //}}}
-
- //{{{ CommandsMenuButton class
- class CommandsMenuButton extends RolloverButton
- {
- //{{{ CommandsMenuButton constructor
- CommandsMenuButton()
- {
- setText(jEdit.getProperty("vfs.browser.commands.label"));
- setIcon(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
- setHorizontalTextPosition(SwingConstants.LEADING);
- setName("commands");
-
- popup = new BrowserCommandsMenu(VFSBrowser.this,null);
-
- CommandsMenuButton.this.setRequestFocusEnabled(false);
- setMargin(new Insets(1,1,1,1));
- CommandsMenuButton.this.addMouseListener(new MouseHandler());
-
- if(OperatingSystem.isMacOSLF())
- CommandsMenuButton.this.putClientProperty("JButton.buttonType","toolbar");
- } //}}}
-
- BrowserCommandsMenu popup;
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- @Override
- public void mousePressed(MouseEvent evt)
- {
- if(!popup.isVisible())
- {
- popup.update();
-
- GUIUtilities.showPopupMenu(
- popup,CommandsMenuButton.this,0,
- CommandsMenuButton.this.getHeight(),
- false);
- }
- else
- {
- popup.setVisible(false);
- }
- }
- } //}}}
- } //}}}
-
- //{{{ PluginsMenuButton class
- class PluginsMenuButton extends RolloverButton
- {
- //{{{ PluginsMenuButton constructor
- PluginsMenuButton()
- {
- setText(jEdit.getProperty("vfs.browser.plugins.label"));
- setIcon(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
- setHorizontalTextPosition(SwingConstants.LEADING);
- setName("plugins");
-
- PluginsMenuButton.this.setRequestFocusEnabled(false);
- setMargin(new Insets(1,1,1,1));
- PluginsMenuButton.this.addMouseListener(new MouseHandler());
-
- if(OperatingSystem.isMacOSLF())
- PluginsMenuButton.this.putClientProperty("JButton.buttonType","toolbar");
- } //}}}
-
- JPopupMenu popup;
-
- //{{{ updatePopupMenu() method
- void updatePopupMenu()
- {
- popup = null;
- } //}}}
-
- //{{{ createPopupMenu() method
- private void createPopupMenu()
- {
- if(popup != null)
- return;
-
- popup = (JPopupMenu)createPluginsMenu(new JPopupMenu(),true);
- } //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- @Override
- public void mousePressed(MouseEvent evt)
- {
- createPopupMenu();
-
- if(!popup.isVisible())
- {
- GUIUtilities.showPopupMenu(
- popup,PluginsMenuButton.this,0,
- PluginsMenuButton.this.getHeight(),
- false);
- }
- else
- {
- popup.setVisible(false);
- }
- }
- } //}}}
- } //}}}
-
- //{{{ FavoritesMenuButton class
- class FavoritesMenuButton extends RolloverButton
- {
- //{{{ FavoritesMenuButton constructor
- FavoritesMenuButton()
- {
- setText(jEdit.getProperty("vfs.browser.favorites.label"));
- setIcon(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
- setHorizontalTextPosition(SwingConstants.LEADING);
- setName("favorites");
-
- FavoritesMenuButton.this.setRequestFocusEnabled(false);
- setMargin(new Insets(1,1,1,1));
- FavoritesMenuButton.this.addMouseListener(new MouseHandler());
-
- if(OperatingSystem.isMacOSLF())
- FavoritesMenuButton.this.putClientProperty("JButton.buttonType","toolbar");
- } //}}}
-
- JPopupMenu popup;
-
- //{{{ createPopupMenu() method
- void createPopupMenu()
- {
- popup = new JPopupMenu();
- ActionHandler actionHandler = new ActionHandler();
-
- JMenuItem mi = new JMenuItem(
- jEdit.getProperty(
- "vfs.browser.favorites"
- + ".add-to-favorites.label"));
- mi.setActionCommand("add-to-favorites");
- mi.addActionListener(actionHandler);
- popup.add(mi);
-
- mi = new JMenuItem(
- jEdit.getProperty(
- "vfs.browser.favorites"
- + ".edit-favorites.label"));
- mi.setActionCommand("dir at favorites:");
- mi.addActionListener(actionHandler);
- popup.add(mi);
-
- popup.addSeparator();
-
- VFSFile[] favorites = FavoritesVFS.getFavorites();
- if(favorites.length == 0)
- {
- mi = new JMenuItem(
- jEdit.getProperty(
- "vfs.browser.favorites"
- + ".no-favorites.label"));
- mi.setEnabled(false);
- popup.add(mi);
- }
- else
- {
- Arrays.sort(favorites,
- new VFS.DirectoryEntryCompare(
- sortMixFilesAndDirs,
- sortIgnoreCase));
- for(int i = 0; i < favorites.length; i++)
- {
- VFSFile favorite = favorites[i];
- mi = new JMenuItem(favorite.getPath());
- mi.setIcon(FileCellRenderer
- .getIconForFile(
- favorite,false));
- String cmd = (favorite.getType() ==
- VFSFile.FILE
- ? "file@" : "dir@")
- + favorite.getPath();
- mi.setActionCommand(cmd);
- mi.addActionListener(actionHandler);
- popup.add(mi);
- }
- }
- } //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- String actionCommand = evt.getActionCommand();
- if("add-to-favorites".equals(actionCommand))
- {
- // if any directories are selected, add
- // them, otherwise add current directory
- VFSFile[] selected = getSelectedFiles();
- if(selected == null || selected.length == 0)
- {
- if(path.equals(FavoritesVFS.PROTOCOL + ':'))
- {
- GUIUtilities.error(VFSBrowser.this,
- "vfs.browser.recurse-favorites",
- null);
- }
- else
- {
- FavoritesVFS.addToFavorites(path,
- VFSFile.DIRECTORY);
- }
- }
- else
- {
- for(int i = 0; i < selected.length; i++)
- {
- VFSFile file = selected[i];
- FavoritesVFS.addToFavorites(file.getPath(),
- file.getType());
- }
- }
- }
- else if(actionCommand.startsWith("dir@"))
- {
- setDirectory(actionCommand.substring(4));
- }
- else if(actionCommand.startsWith("file@"))
- {
- switch(getMode())
- {
- case BROWSER:
- jEdit.openFile(view,actionCommand.substring(5));
- break;
- default:
- locateFile(actionCommand.substring(5));
- break;
- }
- }
- }
- } //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- @Override
- public void mousePressed(MouseEvent evt)
- {
- if(popup != null && popup.isVisible())
- {
- popup.setVisible(false);
- return;
- }
-
- if(popup == null)
- createPopupMenu();
-
- GUIUtilities.showPopupMenu(
- popup,FavoritesMenuButton.this,0,
- FavoritesMenuButton.this.getHeight(),
- false);
- }
- } //}}}
- } //}}}
-
- //{{{ DirectoryLoadedAWTRequest class
- class DirectoryLoadedAWTRequest implements Runnable
- {
- private Object node;
- private Object[] loadInfo;
- private boolean addToHistory;
-
- DirectoryLoadedAWTRequest(Object node, Object[] loadInfo,
- boolean addToHistory)
- {
- this.node = node;
- this.loadInfo = loadInfo;
- this.addToHistory = addToHistory;
- }
-
- public void run()
- {
- String path = (String)loadInfo[0];
- if(path == null)
- {
- // there was an error
- return;
- }
-
- VFSFile[] list = (VFSFile[])loadInfo[1];
-
- if(node == null)
- {
- // This is the new, canonical path
- VFSBrowser.this.path = path;
- if(!pathField.getText().equals(path))
- pathField.setText(path);
- if(path.endsWith("/") ||
- path.endsWith(File.separator))
- {
- // ensure consistent history;
- // eg we don't want both
- // foo/ and foo
- path = path.substring(0,
- path.length() - 1);
- }
-
- if(addToHistory)
- {
- HistoryModel.getModel("vfs.browser.path")
- .addItem(path);
- }
- }
-
- boolean filterEnabled = filterCheckbox.isSelected();
-
- List<VFSFile> directoryList = new ArrayList<VFSFile>();
-
- int directories = 0;
- int files = 0;
- int invisible = 0;
-
- if(list != null)
- {
- VFSFileFilter filter = getVFSFileFilter();
-
- for(int i = 0; i < list.length; i++)
- {
- VFSFile file = list[i];
- if(file.isHidden() && !showHiddenFiles)
- {
- invisible++;
- continue;
- }
-
- if (filter != null && (filterEnabled || filter instanceof DirectoriesOnlyFilter)
- && !filter.accept(file))
- {
- invisible++;
- continue;
- }
-
- if(file.getType() == VFSFile.FILE)
- files++;
- else
- directories++;
-
- directoryList.add(file);
- }
-
- Collections.sort(directoryList,
- new VFS.DirectoryEntryCompare(
- sortMixFilesAndDirs,
- sortIgnoreCase));
- }
-
- browserView.directoryLoaded(node,path,
- directoryList);
-
- // to notify listeners that any existing
- // selection has been deactivated
-
- // turns out under some circumstances this
- // method can switch the current buffer in
- // BROWSER mode.
-
- // in any case, this is only needed for the
- // directory chooser (why?), so we add a
- // check. otherwise poor Rick will go insane.
- if(mode == CHOOSE_DIRECTORY_DIALOG)
- filesSelected();
- }
-
- @Override
- public String toString()
- {
- return (String)loadInfo[0];
- }
- } //}}}
-
- //{{{ BrowserActionContext class
- static class BrowserActionContext extends ActionContext
- {
- /**
- * If event source hierarchy contains a VFSDirectoryEntryTable,
- * this is the currently selected files there. Otherwise, this
- * is the currently selected item in the parent directory list.
- */
- private static VFSFile[] getSelectedFiles(EventObject evt,
- VFSBrowser browser)
- {
- Component source = (Component)evt.getSource();
-
- if(GUIUtilities.getComponentParent(source, BrowserView.ParentDirectoryList.class)
- != null)
- {
- Object[] selected = browser.getBrowserView()
- .getParentDirectoryList()
- .getSelectedValues();
- VFSFile[] returnValue = new VFSFile[
- selected.length];
- System.arraycopy(selected,0,returnValue,0,
- selected.length);
- return returnValue;
- }
- else
- {
- return browser.getSelectedFiles();
- }
- }
-
- @Override
- public void invokeAction(EventObject evt, EditAction action)
- {
- VFSBrowser browser = (VFSBrowser)
- GUIUtilities.getComponentParent(
- (Component)evt.getSource(),
- VFSBrowser.class);
-
- VFSFile[] files = getSelectedFiles(evt,browser);
-
- // in the future we will want something better,
- // eg. having an 'evt' object passed to
- // EditAction.invoke().
-
- // for now, since all browser actions are
- // written in beanshell we set the 'browser'
- // variable directly.
- NameSpace global = BeanShell.getNameSpace();
- try
- {
- global.setVariable("browser",browser);
- global.setVariable("files",files);
-
- View view = browser.getView();
- // I guess ideally all browsers
- // should have views, but since they
- // don't, we just use the active view
- // in that case, since some actions
- // depend on a view being there and
- // I don't want to add checks to
- // them all
- if(view == null)
- view = jEdit.getActiveView();
- action.invoke(view);
- }
- catch(UtilEvalError err)
- {
- Log.log(Log.ERROR,this,err);
- }
- finally
- {
- try
- {
- global.setVariable("browser",null);
- global.setVariable("files",null);
- }
- catch(UtilEvalError err)
- {
- Log.log(Log.ERROR,this,err);
- }
- }
- }
- } //}}}
-
- //{{{ HistoryComboBoxEditor class
- private static class HistoryComboBoxEditor
- extends HistoryTextField
- implements ComboBoxEditor
- {
-
- HistoryComboBoxEditor(String key)
- {
- super(key);
- }
-
- public Object getItem()
- {
- if (current == null)
- {
- current = new GlobVFSFileFilter(getText());
- }
-
- if (!current.getGlob().equals(getText()))
- {
- current.setGlob(getText());
- }
-
- return current;
- }
-
- public void setItem(Object item)
- {
- if (item == current)
- {
- // if we keep the same object, swing
- // will cause an event to be fired
- // on the default button of the dialog,
- // causing a beep since no file is
- // selected...
- if (item != null)
- {
- GlobVFSFileFilter filter = (GlobVFSFileFilter) item;
- current = new GlobVFSFileFilter(filter.getGlob());
- setText(current.getGlob());
- }
- return;
- }
-
- // this happens when changing the selected item
- // in the combo; the combo has not yet fired an
- // itemStateChanged() event, so it's not put into
- // non-editable mode by the handler above.
- if (!(item instanceof GlobVFSFileFilter))
- return;
-
- if (item != null)
- {
- GlobVFSFileFilter filter = (GlobVFSFileFilter) item;
- filter = new GlobVFSFileFilter(filter.getGlob());
- setText(filter.getGlob());
- addCurrentToHistory();
- current = filter;
- }
- else
- {
- setText("*");
- current = new GlobVFSFileFilter("*");
- }
- }
-
- @Override
- protected void processFocusEvent(FocusEvent e)
- {
- // AWT will call setItem() when the editor loses
- // focus; that can cause weird and unwanted things
- // to happen, so ignore lost focus events.
- if (e.getID() != FocusEvent.FOCUS_LOST)
- super.processFocusEvent(e);
- else
- {
- setCaretPosition(0);
- getCaret().setVisible(false);
- }
- }
-
- public Component getEditorComponent()
- {
- return this;
- }
-
- private GlobVFSFileFilter current;
-
- } //}}}
-
- //{{{ VFSFileFilterRenderer class
- private static class VFSFileFilterRenderer extends DefaultListCellRenderer
- {
-
- @Override
- public Component getListCellRendererComponent(JList list,
- Object value, int index, boolean isSelected,
- boolean cellHasFocus)
- {
- assert value instanceof VFSFileFilter : "Filter is not a VFSFileFilter";
- super.getListCellRendererComponent(
- list, value, index, isSelected, cellHasFocus);
- setText(((VFSFileFilter)value).getDescription());
- return this;
- }
-
- } //}}}
-
- //{{{ DirectoriesOnlyFilter class
- public static class DirectoriesOnlyFilter implements VFSFileFilter
- {
-
- public boolean accept(VFSFile file)
- {
- return file.getType() == VFSFile.DIRECTORY
- || file.getType() == VFSFile.FILESYSTEM;
- }
-
- public boolean accept(String url)
- {
- return false;
- }
-
- public String getDescription()
- {
- return jEdit.getProperty("vfs.browser.file_filter.dir_only");
- }
-
- } //}}}
-
- //}}}
-}
+/*
+ * VFSBrowser.java - VFS browser
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.bsh.*;
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.io.File;
+import java.util.*;
+import java.util.List;
+
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.msg.*;
+import org.gjt.sp.jedit.search.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.jedit.menu.MenuItemTextComparator;
+//}}}
+
+/**
+ * The main class of the VFS browser.
+ * Used as dockable, and also embedded inside the
+ * VFSFileChooserDialog.
+ *
+ * @author Slava Pestov
+ * @version $Id: VFSBrowser.java 18962 2010-11-15 20:37:46Z ezust $
+ */
+public class VFSBrowser extends JPanel implements DefaultFocusComponent,
+ DockableWindow
+{
+ public static final String NAME = "vfs.browser";
+
+ //{{{ Browser modes
+ /**
+ * Open file dialog mode. Equals JFileChooser.OPEN_DIALOG for
+ * backwards compatibility.
+ */
+ public static final int OPEN_DIALOG = 0;
+
+ /**
+ * Save file dialog mode. Equals JFileChooser.SAVE_DIALOG for
+ * backwards compatibility.
+ */
+ public static final int SAVE_DIALOG = 1;
+ /**
+ * Choose directory dialog mode.
+ */
+ public static final int BROWSER_DIALOG = 4;
+ /**
+ * Choose directory dialog mode.
+ */
+ public static final int CHOOSE_DIRECTORY_DIALOG = 3;
+
+ /**
+ * Stand-alone dockable browser mode.
+ */
+ public static final int BROWSER = 2;
+ //}}}
+
+ //{{{ browseDirectoryInNewWindow() method
+ /**
+ * Opens the specified directory in a new, floating, file system browser.
+ * @param view The view
+ * @param path The directory's path
+ * @since jEdit 4.1pre2
+ */
+ public static void browseDirectoryInNewWindow(View view, String path)
+ {
+ DockableWindowManager wm = view.getDockableWindowManager();
+ if(path != null)
+ {
+ // this is such a bad way of doing it, but oh well...
+ jEdit.setTemporaryProperty("vfs.browser.path.tmp",path);
+ }
+ wm.floatDockableWindow("vfs.browser");
+ jEdit.unsetProperty("vfs.browser.path.tmp");
+ } //}}}
+
+ //{{{ browseDirectory() method
+ /**
+ * Opens the specified directory in a file system browser.
+ * @param view The view
+ * @param path The directory's path
+ * @since jEdit 4.0pre3
+ */
+ public static void browseDirectory(View view, String path)
+ {
+ DockableWindowManager wm = view.getDockableWindowManager();
+ VFSBrowser browser = (VFSBrowser)wm.getDockable(NAME);
+ if(browser != null)
+ {
+ wm.showDockableWindow(NAME);
+ browser.setDirectory(path);
+ }
+ else
+ {
+ if(path != null)
+ {
+ // this is such a bad way of doing it, but oh well...
+ jEdit.setTemporaryProperty("vfs.browser.path.tmp",path);
+ }
+ wm.addDockableWindow("vfs.browser");
+ jEdit.unsetProperty("vfs.browser.path.tmp");
+ }
+ } //}}}
+
+ //{{{ getActionContext() method
+ /**
+ * Returns the browser action context.
+ * @since jEdit 4.2pre1
+ */
+ public static ActionContext getActionContext()
+ {
+ return actionContext;
+ } //}}}
+
+ //{{{ VFSBrowser constructor
+ /**
+ * Creates a new VFS browser.
+ * @param view The view to open buffers in by default
+ */
+ public VFSBrowser(View view, String position)
+ {
+ this(view,null,BROWSER,true,position);
+ } //}}}
+
+ //{{{ VFSBrowser constructor
+ /**
+ * Creates a new VFS browser.
+ * @param view The view to open buffers in by default
+ * @param path The path to display
+ * @param mode The browser mode
+ * @param multipleSelection True if multiple selection should be allowed
+ * @param position Where the browser is located
+ * @since jEdit 4.2pre1
+ */
+ public VFSBrowser(View view, String path, int mode,
+ boolean multipleSelection, String position)
+ {
+ super(new BorderLayout());
+
+ listenerList = new EventListenerList();
+
+ this.mode = mode;
+ this.multipleSelection = multipleSelection;
+ this.view = view;
+
+
+ currentEncoding = null;
+ autoDetectEncoding = jEdit.getBooleanProperty(
+ "buffer.encodingAutodetect");
+
+ ActionHandler actionHandler = new ActionHandler();
+
+ topBox = new Box(BoxLayout.Y_AXIS);
+ horizontalLayout = mode != BROWSER
+ || DockableWindowManager.TOP.equals(position)
+ || DockableWindowManager.BOTTOM.equals(position);
+
+ toolbarBox = new Box(horizontalLayout
+ ? BoxLayout.X_AXIS
+ : BoxLayout.Y_AXIS);
+
+ topBox.add(toolbarBox);
+
+ GridBagLayout layout = new GridBagLayout();
+ pathAndFilterPanel = new JPanel(layout);
+ if(isHorizontalLayout())
+ pathAndFilterPanel.setBorder(new EmptyBorder(12,12,12,12));
+
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.gridwidth = cons.gridheight = 1;
+ cons.gridx = cons.gridy = 0;
+ cons.fill = GridBagConstraints.BOTH;
+ cons.anchor = GridBagConstraints.EAST;
+ JLabel label = new JLabel(jEdit.getProperty("vfs.browser.path"),
+ SwingConstants.RIGHT);
+ label.setBorder(new EmptyBorder(0,0,0,12));
+ layout.setConstraints(label,cons);
+ pathAndFilterPanel.add(label);
+
+ pathField = new HistoryTextField("vfs.browser.path");
+ pathField.setName("path");
+ pathField.setInstantPopups(true);
+ pathField.setEnterAddsToHistory(false);
+ pathField.setSelectAllOnFocus(true);
+
+
+ // because its preferred size can be quite wide, we
+ // don't want it to make the browser way too big,
+ // so set the preferred width to 0.
+ Dimension prefSize = pathField.getPreferredSize();
+ prefSize.width = 0;
+ pathField.setPreferredSize(prefSize);
+ pathField.addActionListener(actionHandler);
+ cons.gridx = 1;
+ cons.weightx = 1.0;
+ cons.gridwidth = GridBagConstraints.REMAINDER;
+
+ layout.setConstraints(pathField,cons);
+ pathAndFilterPanel.add(pathField);
+
+ filterCheckbox = new JCheckBox(jEdit.getProperty("vfs.browser.filter"));
+ filterCheckbox.setMargin(new Insets(0,0,0,0));
+// filterCheckbox.setRequestFocusEnabled(false);
+ filterCheckbox.setBorder(new EmptyBorder(0,0,0,12));
+ filterCheckbox.setSelected(jEdit.getBooleanProperty(
+ "vfs.browser.filter-enabled"));
+
+ filterCheckbox.addActionListener(actionHandler);
+ filterCheckbox.setName("filter-checkbox");
+ if(mode != CHOOSE_DIRECTORY_DIALOG)
+ {
+ cons.gridwidth = 1;
+ cons.gridx = 0;
+ cons.weightx = 0.0;
+ cons.gridy = 1;
+ layout.setConstraints(filterCheckbox,cons);
+ pathAndFilterPanel.add(filterCheckbox);
+ }
+
+ filterField = new JComboBox();
+ filterEditor = new HistoryComboBoxEditor("vfs.browser.filter");
+ filterEditor.setToolTipText(jEdit.getProperty("glob.tooltip"));
+ filterEditor.setInstantPopups(true);
+ filterEditor.setSelectAllOnFocus(true);
+ filterEditor.addActionListener(actionHandler);
+ filterField.setName("filter-field");
+ String filter;
+ if (mode == BROWSER)
+ {
+ DockableWindowManager dwm = view.getDockableWindowManager();
+ KeyListener keyListener = dwm.closeListener(NAME);
+ filterCheckbox.addKeyListener(keyListener);
+ addKeyListener(keyListener);
+ filterEditor.addKeyListener(keyListener);
+ pathField.addKeyListener(keyListener);
+ // save the location on close of dockable.
+ pathField.addKeyListener(new KeyAdapter()
+ {
+ @Override
+ public void keyReleased(KeyEvent e)
+ {
+ if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
+ {
+ pathField.setText(VFSBrowser.this.path);
+ }
+ }
+ });
+ }
+
+ if(mode == BROWSER || !jEdit.getBooleanProperty(
+ "vfs.browser.currentBufferFilter"))
+ {
+ filter = jEdit.getProperty("vfs.browser.last-filter");
+ if(filter == null)
+ filter = jEdit.getProperty("vfs.browser.default-filter");
+ }
+ else
+ {
+ String ext = MiscUtilities.getFileExtension(
+ view.getBuffer().getName());
+ if(ext.length() == 0)
+ filter = jEdit.getProperty("vfs.browser.default-filter");
+ else
+ filter = '*' + ext;
+ }
+
+ // filterField.getEditor().setItem(new GlobVFSFileFilter(filter));
+ // filterField.addItem(filterField.getEditor().getItem());
+ filterEditor.setItem(new GlobVFSFileFilter(filter));
+ filterField.addItem(filterEditor.getItem());
+ filterField.addItemListener(actionHandler);
+ filterField.setRenderer(new VFSFileFilterRenderer());
+
+ // loads the registered VFSFileFilter services.
+ String[] _filters = ServiceManager.getServiceNames(VFSFileFilter.SERVICE_NAME);
+ for (int i = 0; i < _filters.length; i++)
+ {
+ VFSFileFilter _filter = (VFSFileFilter)
+ ServiceManager.getService(VFSFileFilter.SERVICE_NAME, _filters[i]);
+ filterField.addItem(_filter);
+ }
+
+ if(mode != CHOOSE_DIRECTORY_DIALOG)
+ {
+ cons.gridwidth = GridBagConstraints.REMAINDER;
+ cons.fill = GridBagConstraints.HORIZONTAL;
+ cons.gridx = 1;
+ cons.weightx = 1.0;
+ if (filterField.getItemCount() > 1)
+ {
+ filterField.setEditor(filterEditor);
+ filterField.setEditable(true);
+ layout.setConstraints(filterField,cons);
+ pathAndFilterPanel.add(filterField);
+ }
+ else
+ {
+ layout.setConstraints(filterEditor,cons);
+ pathAndFilterPanel.add(filterEditor);
+ }
+ }
+
+ topBox.add(pathAndFilterPanel);
+ add(BorderLayout.NORTH,topBox);
+
+ add(BorderLayout.CENTER,browserView = new BrowserView(this));
+ if(isHorizontalLayout())
+ browserView.setBorder(new EmptyBorder(0,12,0,12));
+ defaultFocusComponent = browserView.getTable();
+ propertiesChanged();
+
+ updateFilterEnabled();
+
+ setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
+ // see VFSBrowser.browseDirectory()
+ if(path == null)
+ path = jEdit.getProperty("vfs.browser.path.tmp");
+
+ if(path == null || path.length() == 0)
+ {
+ String userHome = System.getProperty("user.home");
+ String defaultPath = jEdit.getProperty("vfs.browser.defaultPath");
+ if("home".equals(defaultPath))
+ path = userHome;
+ else if("working".equals(defaultPath))
+ path = System.getProperty("user.dir");
+ else if("buffer".equals(defaultPath))
+ {
+ Buffer buffer = view.getBuffer();
+ path = buffer.getDirectory();
+ }
+ else if("last".equals(defaultPath))
+ {
+ HistoryModel pathModel = HistoryModel.getModel("vfs.browser.path");
+ if(pathModel.getSize() == 0)
+ path = "~";
+ else
+ path = pathModel.getItem(0);
+ }
+ else if("favorites".equals(defaultPath))
+ path = "favorites:";
+ else
+ {
+ // unknown value??!!!
+ path = userHome;
+ }
+ }
+
+ final String _path = path;
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ setDirectory(_path);
+ }
+ });
+ } //}}}
+
+ //{{{ focusOnDefaultComponent() method
+ public void focusOnDefaultComponent()
+ {
+ // pathField.requestFocus();
+ defaultFocusComponent.requestFocus();
+ } //}}}
+
+ // {{{ setDefaultFocusComponent()
+ /** Only used by VFSFileChooserDialog, since it embeds this in a dialog
+ */
+ void setDefaultFocusComponent(JComponent c)
+ {
+ defaultFocusComponent = c;
+ }// }}}
+
+ //{{{ addNotify() method
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ EditBus.addToBus(this);
+ } //}}}
+
+ //{{{ removeNotify() method
+ @Override
+ public void removeNotify()
+ {
+ super.removeNotify();
+ jEdit.setBooleanProperty("vfs.browser.filter-enabled",
+ filterCheckbox.isSelected());
+ if(mode == BROWSER || !jEdit.getBooleanProperty(
+ "vfs.browser.currentBufferFilter"))
+ {
+ VFSFileFilter selectedFilter =
+ (VFSFileFilter) filterField.getSelectedItem();
+ if (selectedFilter instanceof GlobVFSFileFilter)
+ jEdit.setProperty("vfs.browser.last-filter",
+ ((GlobVFSFileFilter)selectedFilter).getGlob());
+ }
+ EditBus.removeFromBus(this);
+ } //}}}
+
+ //{{{ handlePropertiesChanged() method
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
+ {
+ propertiesChanged();
+ } //}}}
+
+ //{{{ handleBufferUpdate() method
+ @EBHandler
+ public void handleBufferUpdate(BufferUpdate bmsg)
+ {
+ if (bmsg.getWhat() == BufferUpdate.CREATED ||
+ bmsg.getWhat() == BufferUpdate.CLOSED)
+ {
+ browserView.updateFileView();
+ }
+ } //}}}
+
+ //{{{ handlePluginUpdate() method
+ @EBHandler
+ public void handlePluginUpdate(PluginUpdate pmsg)
+ {
+ if((pmsg.getWhat() == PluginUpdate.LOADED ||
+ pmsg.getWhat() == PluginUpdate.UNLOADED) &&
+ plugins != null /* plugins can be null if the VFSBrowser menu bar is hidden */)
+ {
+ plugins.updatePopupMenu();
+ }
+ } //}}}
+
+ //{{{ handleVFSUpdate() method
+ @EBHandler
+ public void handleVFSUpdate(VFSUpdate msg)
+ {
+ maybeReloadDirectory(msg.getPath());
+ } //}}}
+
+ //{{{ getView() method
+ public View getView()
+ {
+ return view;
+ } //}}}
+
+ //{{{ getMode() method
+ public int getMode()
+ {
+ return mode;
+ } //}}}
+
+ //{{{ isMultipleSelectionEnabled() method
+ public boolean isMultipleSelectionEnabled()
+ {
+ return multipleSelection;
+ } //}}}
+
+ //{{{ isHorizontalLayout() method
+ public boolean isHorizontalLayout()
+ {
+ return horizontalLayout;
+ } //}}}
+
+ //{{{ getShowHiddenFiles() method
+ public boolean getShowHiddenFiles()
+ {
+ return showHiddenFiles;
+ } //}}}
+
+ //{{{ setShowHiddenFiles() method
+ public void setShowHiddenFiles(boolean showHiddenFiles)
+ {
+ this.showHiddenFiles = showHiddenFiles;
+ } //}}}
+
+ //{{{ getFilenameFilter() method
+ /**
+ * Returns the file name filter glob.
+ * @since jEdit 3.2pre2
+ * @deprecated Use {@link #getVFSFileFilter()} instead. This method
+ * might return wrong information since jEdit 4.3pre6.
+ */
+ @Deprecated
+ public String getFilenameFilter()
+ {
+ if(filterCheckbox.isSelected())
+ {
+ String filter = filterField.getSelectedItem().toString();
+ if(filter.length() == 0)
+ return "*";
+ else
+ return filter;
+ }
+ else
+ return "*";
+ } //}}}
+
+ //{{{ getVFSFileFilter() method
+ /**
+ * Returns the currently active VFSFileFilter.
+ *
+ * @since jEdit 4.3pre7
+ */
+ public VFSFileFilter getVFSFileFilter()
+ {
+ if (mode == CHOOSE_DIRECTORY_DIALOG)
+ return new DirectoriesOnlyFilter();
+ return (VFSFileFilter) filterField.getSelectedItem();
+ } //}}}
+
+ //{{{ addVFSFileFilter() method
+ /**
+ * Adds a file filter to the browser.
+ *
+ * @since jEdit 4.3pre7
+ */
+ public void addVFSFileFilter(VFSFileFilter filter)
+ {
+ filterField.addItem(filter);
+ if (filterField.getItemCount() == 2)
+ {
+ filterField.setEditor(filterEditor);
+ filterField.setEditable(true);
+
+ GridBagLayout layout = (GridBagLayout) pathAndFilterPanel.getLayout();
+ GridBagConstraints cons =layout.getConstraints(filterEditor);
+ cons.gridwidth = GridBagConstraints.REMAINDER;
+ cons.fill = GridBagConstraints.HORIZONTAL;
+ cons.gridx = 1;
+ cons.weightx = 1;
+
+ pathAndFilterPanel.remove(filterEditor);
+ layout.setConstraints(filterField, cons);
+ pathAndFilterPanel.add(filterField);
+ pathAndFilterPanel.validate();
+ pathAndFilterPanel.repaint();
+ }
+ } //}}}
+
+ //{{{ setFilenameFilter() method
+ public void setFilenameFilter(String filter)
+ {
+ if(filter == null || filter.length() == 0 || "*".equals(filter))
+ filterCheckbox.setSelected(false);
+ else
+ {
+ filterCheckbox.setSelected(true);
+ filterEditor.setItem(new GlobVFSFileFilter(filter));
+ }
+ } //}}}
+
+ //{{{ getDirectoryField() method
+ public HistoryTextField getDirectoryField()
+ {
+ return pathField;
+ } //}}}
+
+ //{{{ getDirectory() method
+ public String getDirectory()
+ {
+ return path;
+ } //}}}
+
+ // {{{ Directory Stack operations
+ /**
+ * @since jedit 4.3pre15
+ */
+ public void previousDirectory()
+ {
+ if (historyStack.size() > 1)
+ {
+ historyStack.pop();
+ nextDirectoryStack.push(path);
+ setDirectory(historyStack.peek());
+ historyStack.pop();
+ }
+ }
+
+
+ /**
+ * @since jEdit 4.3pre15
+ */
+ public void nextDirectory()
+ {
+ if (!nextDirectoryStack.isEmpty())
+ {
+ setDirectory(nextDirectoryStack.pop());
+ }
+ }
+ // }}}
+
+ //{{{ setDirectory() method
+ public void setDirectory(String path)
+ {
+ if(path.startsWith("file:"))
+ path = path.substring(5);
+ path = MiscUtilities.expandVariables(path);
+ pathField.setText(path);
+
+ if(!startRequest())
+ return;
+
+ historyStack.push(path);
+ browserView.saveExpansionState();
+ Runnable delayedAWTRequest = new Runnable()
+ {
+ public void run()
+ {
+ endRequest();
+ }
+ };
+ browserView.loadDirectory(null,path,true, delayedAWTRequest);
+ this.path = path;
+ } //}}}
+
+ //{{{ getRootDirectory() method
+ public static String getRootDirectory()
+ {
+ if(OperatingSystem.isMacOS() || OperatingSystem.isDOSDerived())
+ return FileRootsVFS.PROTOCOL + ':';
+ else
+ return "/";
+ } //}}}
+
+ //{{{ rootDirectory() method
+ /**
+ * Goes to the local drives directory.
+ * @since jEdit 4.0pre4
+ */
+ public void rootDirectory()
+ {
+ setDirectory(getRootDirectory());
+ } //}}}
+
+ //{{{ reloadDirectory() method
+ public void reloadDirectory()
+ {
+ // used by FTP plugin to clear directory cache
+ VFSManager.getVFSForPath(path).reloadDirectory(path);
+
+ browserView.saveExpansionState();
+ browserView.loadDirectory(null,path,false);
+ } //}}}
+
+ //{{{ delete() method
+ /**
+ * Note that all files must be on the same VFS.
+ * @since jEdit 4.3pre2
+ */
+ public void delete(VFSFile[] files)
+ {
+ String dialogType;
+
+ if(MiscUtilities.isURL(files[0].getDeletePath())
+ && FavoritesVFS.PROTOCOL.equals(
+ MiscUtilities.getProtocolOfURL(files[0].getDeletePath())))
+ {
+ dialogType = "vfs.browser.delete-favorites";
+ }
+ else
+ {
+ dialogType = "vfs.browser.delete-confirm";
+ }
+
+ StringBuilder buf = new StringBuilder();
+ String typeStr = "files";
+ for(int i = 0; i < files.length; i++)
+ {
+ buf.append(files[i].getPath());
+ buf.append('\n');
+ if (files[i].getType() == VFSFile.DIRECTORY)
+ typeStr = "directories and their contents";
+ }
+
+ Object[] args = { buf.toString(), typeStr};
+
+ int result = GUIUtilities.confirm(this,dialogType,args,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if(result != JOptionPane.YES_OPTION)
+ return;
+
+ VFS vfs = VFSManager.getVFSForPath(files[0].getDeletePath());
+
+ if(!startRequest())
+ return;
+
+ for(int i = 0; i < files.length; i++)
+ {
+ Object session = vfs.createVFSSession(files[i].getDeletePath(),this);
+ if(session == null)
+ continue;
+
+ VFSManager.runInWorkThread(new BrowserIORequest(
+ BrowserIORequest.DELETE,this,
+ session,vfs,files[i].getDeletePath(),
+ null,null));
+ }
+
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ endRequest();
+ }
+ });
+ } //}}}
+
+ //{{{ rename() method
+ public void rename(String from)
+ {
+ VFS vfs = VFSManager.getVFSForPath(from);
+
+ String filename = vfs.getFileName(from);
+ String[] args = { filename };
+ String to = GUIUtilities.input(this,"vfs.browser.rename",
+ args,filename);
+ if(to == null)
+ return;
+
+ to = MiscUtilities.constructPath(vfs.getParentOfPath(from),to);
+
+ Object session = vfs.createVFSSession(from,this);
+ if(session == null)
+ return;
+
+ if(!startRequest())
+ return;
+
+ VFSManager.runInWorkThread(new BrowserIORequest(
+ BrowserIORequest.RENAME,this,
+ session,vfs,from,to,null));
+
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ endRequest();
+ }
+ });
+ } //}}}
+
+ //{{{ rename() method
+ public void rename(String from, String newname)
+ {
+ VFS vfs = VFSManager.getVFSForPath(from);
+
+ String filename = vfs.getFileName(from);
+ String to = newname;
+
+ if(to == null || filename.equals(newname))
+ return;
+
+ to = MiscUtilities.constructPath(vfs.getParentOfPath(from),to);
+
+ Object session = vfs.createVFSSession(from,this);
+ if(session == null)
+ return;
+
+ if(!startRequest())
+ return;
+
+ VFSManager.runInWorkThread(new BrowserIORequest(
+ BrowserIORequest.RENAME,this,
+ session,vfs,from,to,null));
+
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ endRequest();
+ }
+ });
+ } //}}}
+
+ //{{{ mkdir() method
+ public void mkdir()
+ {
+ String newDirectory = GUIUtilities.input(this,"vfs.browser.mkdir",null);
+ if(newDirectory == null)
+ return;
+
+ // if a directory is selected, create new dir in there.
+ // if a file is selected, create new dir inside its parent.
+ final VFSFile[] selected = getSelectedFiles();
+ String parent;
+ if(selected.length == 0)
+ parent = path;
+ else if(selected[0].getType() == VFSFile.FILE)
+ {
+ parent = selected[0].getPath();
+ parent = VFSManager.getVFSForPath(parent)
+ .getParentOfPath(parent);
+ }
+ else
+ parent = selected[0].getPath();
+
+ VFS vfs = VFSManager.getVFSForPath(parent);
+
+ // path is the currently viewed directory in the browser
+ newDirectory = MiscUtilities.constructPath(parent,newDirectory);
+
+ Object session = vfs.createVFSSession(newDirectory,this);
+ if(session == null)
+ return;
+
+ if(!startRequest())
+ return;
+
+ VFSManager.runInWorkThread(new BrowserIORequest(
+ BrowserIORequest.MKDIR,this,
+ session,vfs,newDirectory,null,null));
+
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ endRequest();
+ if (selected.length != 0 && selected[0].getType() != VFSFile.FILE)
+ {
+ VFSDirectoryEntryTable directoryEntryTable = browserView.getTable();
+ int selectedRow = directoryEntryTable.getSelectedRow();
+ VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel) directoryEntryTable.getModel();
+ VFSDirectoryEntryTableModel.Entry entry = model.files[selectedRow];
+ if (!entry.expanded)
+ {
+ browserView.clearExpansionState();
+ browserView.loadDirectory(entry,entry.dirEntry.getPath(),
+ false);
+ }
+ }
+ }
+ });
+ } //}}}
+
+ //{{{ newFile() method
+ /**
+ * Creates a new file in the current directory.
+ * @since jEdit 4.0pre2
+ */
+ public void newFile()
+ {
+ VFSFile[] selected = getSelectedFiles();
+ if(selected.length >= 1)
+ {
+ VFSFile file = selected[0];
+ if(file.getType() == VFSFile.DIRECTORY)
+ jEdit.newFile(view,file.getPath());
+ else
+ {
+ VFS vfs = VFSManager.getVFSForPath(file.getPath());
+ jEdit.newFile(view,vfs.getParentOfPath(file.getPath()));
+ }
+ }
+ else
+ jEdit.newFile(view,path);
+ } //}}}
+
+ //{{{ fileProperties() method
+ /**
+ * Show selected file's properties.
+ */
+ public void fileProperties(VFSFile[] files)
+ {
+ new FilePropertiesDialog(view, this, files);
+ } //}}}
+
+ //{{{ searchInDirectory() method
+ /**
+ * Opens a directory search in the current directory.
+ * @since jEdit 4.0pre2
+ */
+ public void searchInDirectory()
+ {
+ VFSFile[] selected = getSelectedFiles();
+ if(selected.length >= 1)
+ {
+ VFSFile file = selected[0];
+ searchInDirectory(file.getPath(),file.getType() != VFSFile.FILE);
+ }
+ else
+ {
+ searchInDirectory(path,true);
+ }
+ } //}}}
+
+ //{{{ searchInDirectory() method
+ /**
+ * Opens a directory search in the specified directory.
+ * @param path The path name
+ * @param directory True if the path is a directory, false if it is a file
+ * @since jEdit 4.2pre1
+ */
+ public void searchInDirectory(String path, boolean directory)
+ {
+ String filter;
+ VFSFileFilter vfsff = getVFSFileFilter();
+ if (vfsff instanceof GlobVFSFileFilter)
+ filter = ((GlobVFSFileFilter)vfsff).getGlob();
+ else
+ filter = "*";
+
+ if (!directory)
+ {
+ String name = MiscUtilities.getFileName(path);
+ String ext = MiscUtilities.getFileExtension(name);
+ filter = ext == null || ext.length() == 0
+ ? filter : '*' + ext;
+ path = MiscUtilities.getParentOfPath(path);
+ }
+
+ SearchAndReplace.setSearchFileSet(new DirectoryListSet(
+ path,filter,true));
+ SearchDialog.showSearchDialog(view,null,SearchDialog.DIRECTORY);
+ } //}}}
+
+ //{{{ getBrowserView() method
+ BrowserView getBrowserView()
+ {
+ return browserView;
+ } //}}}
+
+ //{{{ getSelectedFiles() method
+ /**
+ * Return the selected files in the lower browser tree.
+ * @since jEdit 4.3pre2
+ */
+ public VFSFile[] getSelectedFiles()
+ {
+ return browserView.getSelectedFiles();
+ } //}}}
+
+ //{{{ getSelectedFiles() method
+ /**
+ * Return the selected files from the point of view of the
+ * given component. This may be the selected directory from the
+ * upper tree component of the browser (directory tree) or
+ * the selected files in the bottom tree component.
+ * This method is to be used by code running inside VFSBrowser
+ * such as a DynamicMenuProvider. Use the other method otherwise.
+ * The main difference is this function searches the component
+ * hierarchy for a {@link BrowserView.ParentDirectoryList} to get
+ * the list of currently selected files from there. Otherwise, it
+ * returns what {@link #getSelectedFiles()} would return.
+ * @param source the source component to start from when
+ * navigating the component hierarchy
+ * @since jEdit 4.4pre1
+ */
+ public VFSFile[] getSelectedFiles(Component source)
+ {
+ if(GUIUtilities.getComponentParent(source, BrowserView.ParentDirectoryList.class)
+ != null)
+ {
+ Object[] selected = getBrowserView()
+ .getParentDirectoryList()
+ .getSelectedValues();
+ VFSFile[] returnValue = new VFSFile[
+ selected.length];
+ System.arraycopy(selected,0,returnValue,0,
+ selected.length);
+ return returnValue;
+ }
+ else
+ {
+ return getSelectedFiles();
+ }
+ } //}}}
+
+ //{{{ locateFile() method
+ /**
+ * Goes to the given file's directory and selects the file in the list.
+ * @param path The file
+ * @since jEdit 4.2pre2
+ */
+ public void locateFile(final String path)
+ {
+ VFSFileFilter filter = getVFSFileFilter();
+ if(!filter.accept(MiscUtilities.getFileName(path)))
+ setFilenameFilter(null);
+
+ setDirectory(MiscUtilities.getParentOfPath(path));
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ browserView.getTable().selectFile(path);
+ }
+ });
+ } //}}}
+
+ //{{{ createPluginsMenu() method
+ public JComponent createPluginsMenu(JComponent pluginMenu, boolean showManagerOptions)
+ {
+ ActionHandler actionHandler = new ActionHandler();
+ if(showManagerOptions && getMode() == BROWSER)
+ {
+ pluginMenu.add(GUIUtilities.loadMenuItem("plugin-manager",false));
+ pluginMenu.add(GUIUtilities.loadMenuItem("plugin-options",false));
+ if (pluginMenu instanceof JMenu)
+ ((JMenu)pluginMenu).addSeparator();
+ else if (pluginMenu instanceof JPopupMenu)
+ ((JPopupMenu)pluginMenu).addSeparator();
+
+ }
+ else
+ /* we're in a modal dialog */;
+
+ List<JMenuItem> vec = new ArrayList<JMenuItem>();
+
+ //{{{ old API
+ Enumeration<VFS> e = VFSManager.getFilesystems();
+
+ while(e.hasMoreElements())
+ {
+ VFS vfs = e.nextElement();
+ if((vfs.getCapabilities() & VFS.BROWSE_CAP) == 0)
+ continue;
+
+ JMenuItem menuItem = new JMenuItem(jEdit.getProperty(
+ "vfs." + vfs.getName() + ".label"));
+ menuItem.setActionCommand(vfs.getName());
+ menuItem.addActionListener(actionHandler);
+ vec.add(menuItem);
+ } //}}}
+
+ //{{{ new API
+ EditPlugin[] plugins = jEdit.getPlugins();
+ for (int i = 0; i < plugins.length; i++)
+ {
+ JMenuItem menuItem = plugins[i].createBrowserMenuItems();
+ if(menuItem != null)
+ vec.add(menuItem);
+ } //}}}
+
+ if (!vec.isEmpty())
+ {
+ Collections.sort(vec,new MenuItemTextComparator());
+ for(int i = 0; i < vec.size(); i++)
+ pluginMenu.add(vec.get(i));
+ }
+ else
+ {
+ JMenuItem mi = new JMenuItem(jEdit.getProperty(
+ "vfs.browser.plugins.no-plugins.label"));
+ mi.setEnabled(false);
+ pluginMenu.add(mi);
+ }
+
+ return pluginMenu;
+ } //}}}
+
+ //{{{ addBrowserListener() method
+ public void addBrowserListener(BrowserListener l)
+ {
+ listenerList.add(BrowserListener.class,l);
+ } //}}}
+
+ //{{{ removeBrowserListener() method
+ public void removeBrowserListener(BrowserListener l)
+ {
+ listenerList.remove(BrowserListener.class,l);
+ } //}}}
+
+ //{{{ filesActivated() method
+ // canDoubleClickClose set to false when ENTER pressed
+ public static final int M_OPEN = 0;
+ public static final int M_OPEN_NEW_VIEW = 1;
+ public static final int M_OPEN_NEW_PLAIN_VIEW = 2;
+ public static final int M_OPEN_NEW_SPLIT = 3;
+ public static final int M_INSERT = 4;
+
+ /**
+ * This method does the "double-click" handling. It is public so that
+ * <code>browser.actions.xml</code> can bind to it.
+ * @since jEdit 4.2pre2
+ */
+ public void filesActivated(int mode, boolean canDoubleClickClose)
+ {
+ VFSFile[] selectedFiles = browserView.getSelectedFiles();
+
+ Buffer buffer = null;
+
+check_selected: for(int i = 0; i < selectedFiles.length; i++)
+ {
+ VFSFile file = selectedFiles[i];
+
+ if(file.getType() == VFSFile.DIRECTORY
+ || file.getType() == VFSFile.FILESYSTEM)
+ {
+ if(mode == M_OPEN_NEW_VIEW && this.mode == BROWSER)
+ browseDirectoryInNewWindow(view,file.getPath());
+ else
+ setDirectory(file.getPath());
+ }
+ else if(this.mode == BROWSER || this.mode == BROWSER_DIALOG)
+ {
+ if(mode == M_INSERT)
+ {
+ view.getBuffer().insertFile(view,
+ file.getPath());
+ continue check_selected;
+ }
+
+ Buffer _buffer = jEdit.getBuffer(file.getPath());
+ if(_buffer == null)
+ {
+ Hashtable<String, Object> props = new Hashtable<String, Object>();
+ if(currentEncoding != null)
+ {
+ props.put(JEditBuffer.ENCODING,currentEncoding);
+ }
+ props.put(Buffer.ENCODING_AUTODETECT,
+ autoDetectEncoding);
+ _buffer = jEdit.openFile(view, null,
+ file.getPath(),false,props);
+ }
+ else if(doubleClickClose && canDoubleClickClose
+ && this.mode != BROWSER_DIALOG
+ && selectedFiles.length == 1)
+ {
+ // close if this buffer is currently
+ // visible in the view.
+ EditPane[] editPanes = view.getEditPanes();
+ for(int j = 0; j < editPanes.length; j++)
+ {
+ if(editPanes[j].getBuffer() == _buffer)
+ {
+ jEdit.closeBuffer(view,_buffer);
+ return;
+ }
+ }
+ }
+
+ if(_buffer != null)
+ buffer = _buffer;
+ }
+ else
+ {
+ // if a file is selected in OPEN_DIALOG or
+ // SAVE_DIALOG mode, just let the listener(s)
+ // handle it
+ }
+ }
+
+ if(buffer != null)
+ {
+ switch(mode)
+ {
+ case M_OPEN:
+ view.setBuffer(buffer);
+ break;
+ case M_OPEN_NEW_VIEW:
+ jEdit.newView(view,buffer,false);
+ break;
+ case M_OPEN_NEW_PLAIN_VIEW:
+ jEdit.newView(view,buffer,true);
+ break;
+ case M_OPEN_NEW_SPLIT:
+ view.splitHorizontally().setBuffer(buffer);
+ break;
+ }
+ }
+
+ Object[] listeners = listenerList.getListenerList();
+ for(int i = 0; i < listeners.length; i++)
+ {
+ if(listeners[i] == BrowserListener.class)
+ {
+ BrowserListener l = (BrowserListener)listeners[i+1];
+ l.filesActivated(this,selectedFiles);
+ }
+ }
+ } //}}}
+
+ //{{{ dispose() method
+ /** Disposes the browser, regardless of whether it is a dialog or a dockable
+ */
+ public void dispose() {
+ if (this.mode == BROWSER) {
+ view.getDockableWindowManager().hideDockableWindow(NAME);
+ }
+ else {
+ GUIUtilities.getParentDialog(this).dispose();
+ }
+ }//}}}
+
+ //{{{ move() method
+ public void move(String newPosition)
+ {
+ boolean horz = mode != BROWSER
+ || DockableWindowManager.TOP.equals(newPosition)
+ || DockableWindowManager.BOTTOM.equals(newPosition);
+ if (horz == horizontalLayout)
+ return;
+ horizontalLayout = horz;
+ topBox.remove(toolbarBox);
+ toolbarBox = new Box(horizontalLayout
+ ? BoxLayout.X_AXIS
+ : BoxLayout.Y_AXIS);
+ topBox.add(toolbarBox, 0);
+ propertiesChanged();
+ } //}}}
+
+ //{{{ Package-private members
+
+ // This can be null untill an user explicitly selects an encoding
+ // so that this don't overwrite more accurate encoding information
+ // like buffer histories.
+ String currentEncoding;
+
+ boolean autoDetectEncoding;
+
+ //{{{ directoryLoaded() method
+ void directoryLoaded(Object node, Object[] loadInfo,
+ boolean addToHistory)
+ {
+ String path = (String)loadInfo[0];
+ if(path == null)
+ {
+ // there was an error
+ return;
+ }
+
+ VFSFile[] list = (VFSFile[])loadInfo[1];
+
+ if(node == null)
+ {
+ // This is the new, canonical path
+ VFSBrowser.this.path = path;
+ if(!pathField.getText().equals(path))
+ pathField.setText(path);
+ if(path.endsWith("/") ||
+ path.endsWith(File.separator))
+ {
+ // ensure consistent history;
+ // eg we don't want both
+ // foo/ and foo
+ path = path.substring(0,
+ path.length() - 1);
+ }
+
+ if(addToHistory)
+ {
+ HistoryModel.getModel("vfs.browser.path")
+ .addItem(path);
+ }
+ }
+
+ boolean filterEnabled = filterCheckbox.isSelected();
+
+ List<VFSFile> directoryList = new ArrayList<VFSFile>();
+
+ int directories = 0;
+ int files = 0;
+ int invisible = 0;
+
+ if(list != null)
+ {
+ VFSFileFilter filter = getVFSFileFilter();
+
+ for(int i = 0; i < list.length; i++)
+ {
+ VFSFile file = list[i];
+ if(file.isHidden() && !showHiddenFiles)
+ {
+ invisible++;
+ continue;
+ }
+
+ if (filter != null && (filterEnabled || filter instanceof DirectoriesOnlyFilter)
+ && !filter.accept(file))
+ {
+ invisible++;
+ continue;
+ }
+
+ if(file.getType() == VFSFile.FILE)
+ files++;
+ else
+ directories++;
+
+ directoryList.add(file);
+ }
+
+ Collections.sort(directoryList,
+ new VFS.DirectoryEntryCompare(
+ sortMixFilesAndDirs,
+ sortIgnoreCase));
+ }
+
+ browserView.directoryLoaded(node,path,
+ directoryList);
+
+ // to notify listeners that any existing
+ // selection has been deactivated
+
+ // turns out under some circumstances this
+ // method can switch the current buffer in
+ // BROWSER mode.
+
+ // in any case, this is only needed for the
+ // directory chooser (why?), so we add a
+ // check. otherwise poor Rick will go insane.
+ if(mode == CHOOSE_DIRECTORY_DIALOG)
+ filesSelected();
+ } //}}}
+
+ //{{{ filesSelected() method
+ void filesSelected()
+ {
+ VFSFile[] selectedFiles = browserView.getSelectedFiles();
+
+ if(mode == BROWSER)
+ {
+ for(int i = 0; i < selectedFiles.length; i++)
+ {
+ VFSFile file = selectedFiles[i];
+ Buffer buffer = jEdit.getBuffer(file.getPath());
+ if(buffer != null && view != null)
+ view.setBuffer(buffer);
+ }
+ }
+
+ Object[] listeners = listenerList.getListenerList();
+ for(int i = 0; i < listeners.length; i++)
+ {
+ if(listeners[i] == BrowserListener.class)
+ {
+ BrowserListener l = (BrowserListener)listeners[i+1];
+ l.filesSelected(this,selectedFiles);
+ }
+ }
+ } //}}}
+
+ //{{{ endRequest() method
+ void endRequest()
+ {
+ requestRunning = false;
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ private static final ActionContext actionContext;
+
+ static
+ {
+ actionContext = new BrowserActionContext();
+
+ ActionSet builtInActionSet = new ActionSet(null,null,null,
+ jEdit.class.getResource("browser.actions.xml"));
+ builtInActionSet.setLabel(jEdit.getProperty("action-set.browser"));
+ builtInActionSet.load();
+ actionContext.addActionSet(builtInActionSet);
+ }
+
+ //{{{ Instance variables
+ private EventListenerList listenerList;
+ private View view;
+ private boolean horizontalLayout;
+ private String path;
+ private JPanel pathAndFilterPanel;
+ private HistoryTextField pathField;
+ private JComponent defaultFocusComponent;
+ private JCheckBox filterCheckbox;
+ private HistoryComboBoxEditor filterEditor;
+ private JComboBox filterField;
+ private Box toolbarBox;
+ private Box topBox;
+ private FavoritesMenuButton favorites;
+ private PluginsMenuButton plugins;
+ private BrowserView browserView;
+ private int mode;
+ private boolean multipleSelection;
+
+ private boolean showHiddenFiles;
+ private boolean sortMixFilesAndDirs;
+ private boolean sortIgnoreCase;
+ private boolean doubleClickClose;
+
+ private boolean requestRunning;
+ private boolean maybeReloadRequestRunning;
+
+ private final Stack<String> historyStack = new Stack<String>();
+ private final Stack<String> nextDirectoryStack = new Stack<String>();
+ //}}}
+
+ //{{{ createMenuBar() method
+ private Container createMenuBar()
+ {
+ JToolBar menuBar = new JToolBar();
+ menuBar.setFloatable(false);
+
+ menuBar.add(new CommandsMenuButton());
+ menuBar.add(Box.createHorizontalStrut(3));
+ menuBar.add(plugins = new PluginsMenuButton());
+ menuBar.add(Box.createHorizontalStrut(3));
+ menuBar.add(favorites = new FavoritesMenuButton());
+
+ return menuBar;
+ } //}}}
+
+ //{{{ createToolBar() method
+ private Container createToolBar()
+ {
+ if(mode == BROWSER)
+ return GUIUtilities.loadToolBar(actionContext,
+ "vfs.browser.toolbar-browser");
+ else
+ return GUIUtilities.loadToolBar(actionContext,
+ "vfs.browser.toolbar-dialog");
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ private void propertiesChanged()
+ {
+ showHiddenFiles = jEdit.getBooleanProperty("vfs.browser.showHiddenFiles");
+ sortMixFilesAndDirs = jEdit.getBooleanProperty("vfs.browser.sortMixFilesAndDirs");
+ sortIgnoreCase = jEdit.getBooleanProperty("vfs.browser.sortIgnoreCase");
+ doubleClickClose = jEdit.getBooleanProperty("vfs.browser.doubleClickClose");
+
+ browserView.propertiesChanged();
+
+ toolbarBox.removeAll();
+
+ if(jEdit.getBooleanProperty("vfs.browser.showToolbar"))
+ {
+ Container toolbar = createToolBar();
+ toolbarBox.add(toolbar);
+ }
+
+ if(jEdit.getBooleanProperty("vfs.browser.showMenubar"))
+ {
+ Container menubar = createMenuBar();
+ if(horizontalLayout)
+ {
+ toolbarBox.add(menubar,0);
+ }
+ else
+ {
+ menubar.add(Box.createGlue());
+ toolbarBox.add(menubar);
+ }
+ }
+ else
+ {
+ plugins = null;
+ favorites = null;
+ }
+
+ revalidate();
+
+ if(path != null)
+ reloadDirectory();
+ } //}}}
+
+ /* We do this stuff because the browser is not able to handle
+ * more than one request yet */
+
+ //{{{ startRequest() method
+ private boolean startRequest()
+ {
+ if(requestRunning)
+ {
+ // dump stack trace for debugging purposes
+ Log.log(Log.DEBUG,this,new Throwable("For debugging purposes"));
+
+ GUIUtilities.error(this,"browser-multiple-io",null);
+ return false;
+ }
+ else
+ {
+ requestRunning = true;
+ return true;
+ }
+ } //}}}
+
+ //{{{ updateFilterEnabled() method
+ private void updateFilterEnabled()
+ {
+ filterField.setEnabled(filterCheckbox.isSelected());
+ filterEditor.setEnabled(filterCheckbox.isSelected());
+ } //}}}
+
+ //{{{ maybeReloadDirectory() method
+ private void maybeReloadDirectory(String dir)
+ {
+ if(MiscUtilities.isURL(dir)
+ && MiscUtilities.getProtocolOfURL(dir).equals(
+ FavoritesVFS.PROTOCOL))
+ {
+ if(favorites != null)
+ favorites.popup = null;
+ }
+
+ // this is a dirty hack and it relies on the fact
+ // that updates for parents are sent before updates
+ // for the changed nodes themselves (if this was not
+ // the case, the browser wouldn't be updated properly
+ // on delete, etc).
+ //
+ // to avoid causing '> 1 request' errors, don't reload
+ // directory if request already active
+ if(maybeReloadRequestRunning)
+ {
+ //Log.log(Log.WARNING,this,"VFS update: request already in progress");
+ return;
+ }
+
+ // save a file -> sends vfs update. if a VFS file dialog box
+ // is shown from the same event frame as the save, the
+ // VFSUpdate will be delivered before the directory is loaded,
+ // and before the path is set.
+ if(path != null)
+ {
+ try
+ {
+ maybeReloadRequestRunning = true;
+
+ browserView.maybeReloadDirectory(dir);
+ }
+ finally
+ {
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ maybeReloadRequestRunning = false;
+ }
+ });
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener, ItemListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if (isProcessingEvent)
+ return;
+
+ Object source = evt.getSource();
+
+ if (source == pathField
+ || source == filterCheckbox)
+ {
+ isProcessingEvent = true;
+ resetLater();
+
+ updateFilterEnabled();
+
+ String p = pathField.getText();
+
+ if(p != null)
+ setDirectory(p);
+ browserView.focusOnFileView();
+ }
+
+ else if (source == filterField.getEditor())
+ {
+ // force the editor to refresh.
+ filterField.getEditor().setItem(
+ filterField.getEditor().getItem());
+ }
+
+ // depending on Swing look & feel, filterField.getEditor()
+ // returns some ComboBoxUI
+ else if (source == filterEditor)
+ {
+ // force the editor to refresh.
+ filterEditor.setItem(
+ filterEditor.getItem());
+ filterField.setSelectedItem(
+ filterEditor.getItem());
+ // ### ugly:
+ // itemStateChanged does not seem to get fired
+ itemStateChanged(new ItemEvent(filterField,
+ ItemEvent.ITEM_STATE_CHANGED,
+ filterEditor.getItem(),
+ ItemEvent.SELECTED));
+ }
+ }
+
+ public void itemStateChanged(ItemEvent e)
+ {
+ if (isProcessingEvent)
+ return;
+
+ if (e.getStateChange() != ItemEvent.SELECTED)
+ return;
+
+ isProcessingEvent = true;
+ resetLater();
+
+ filterField.setEditable(e.getItem() instanceof GlobVFSFileFilter);
+ updateFilterEnabled();
+ String path = pathField.getText();
+ if(path != null)
+ setDirectory(path);
+
+ browserView.focusOnFileView();
+ }
+
+ /**
+ * Why this method exists: since both actionPerformed()
+ * and itemStateChanged() above can change the combo box,
+ * executing one of them can cause a chain reaction causing
+ * the other method to be called. This would cause the
+ * VFS subsystem to be called several times, which would
+ * cause a warning to show up if the first operation is
+ * still in progress, or cause a second operation to happen
+ * which is not really wanted especially if we're talking
+ * about a remove VFS. So the methods set a flag saying
+ * that something is going on, and this method resets
+ * the flag after the AWT thread is done with the
+ * current events.
+ */
+ private void resetLater()
+ {
+ SwingUtilities.invokeLater(
+ new Runnable()
+ {
+ public void run()
+ {
+ isProcessingEvent = false;
+ }
+ }
+ );
+ }
+
+ private boolean isProcessingEvent;
+
+ } //}}}
+
+ //{{{ CommandsMenuButton class
+ class CommandsMenuButton extends RolloverButton
+ {
+ //{{{ CommandsMenuButton constructor
+ CommandsMenuButton()
+ {
+ setText(jEdit.getProperty("vfs.browser.commands.label"));
+ setIcon(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
+ setHorizontalTextPosition(SwingConstants.LEADING);
+ setName("commands");
+
+ popup = new BrowserCommandsMenu(VFSBrowser.this,null);
+
+ CommandsMenuButton.this.setRequestFocusEnabled(false);
+ setMargin(new Insets(1,1,1,1));
+ CommandsMenuButton.this.addMouseListener(new MouseHandler());
+
+ if(OperatingSystem.isMacOSLF())
+ CommandsMenuButton.this.putClientProperty("JButton.buttonType","toolbar");
+ } //}}}
+
+ BrowserCommandsMenu popup;
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ if(!popup.isVisible())
+ {
+ popup.update();
+
+ GUIUtilities.showPopupMenu(
+ popup,CommandsMenuButton.this,0,
+ CommandsMenuButton.this.getHeight(),
+ false);
+ }
+ else
+ {
+ popup.setVisible(false);
+ }
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ PluginsMenuButton class
+ class PluginsMenuButton extends RolloverButton
+ {
+ //{{{ PluginsMenuButton constructor
+ PluginsMenuButton()
+ {
+ setText(jEdit.getProperty("vfs.browser.plugins.label"));
+ setIcon(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
+ setHorizontalTextPosition(SwingConstants.LEADING);
+ setName("plugins");
+
+ PluginsMenuButton.this.setRequestFocusEnabled(false);
+ setMargin(new Insets(1,1,1,1));
+ PluginsMenuButton.this.addMouseListener(new MouseHandler());
+
+ if(OperatingSystem.isMacOSLF())
+ PluginsMenuButton.this.putClientProperty("JButton.buttonType","toolbar");
+ } //}}}
+
+ JPopupMenu popup;
+
+ //{{{ updatePopupMenu() method
+ void updatePopupMenu()
+ {
+ popup = null;
+ } //}}}
+
+ //{{{ createPopupMenu() method
+ private void createPopupMenu()
+ {
+ if(popup != null)
+ return;
+
+ popup = (JPopupMenu)createPluginsMenu(new JPopupMenu(),true);
+ } //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ createPopupMenu();
+
+ if(!popup.isVisible())
+ {
+ GUIUtilities.showPopupMenu(
+ popup,PluginsMenuButton.this,0,
+ PluginsMenuButton.this.getHeight(),
+ false);
+ }
+ else
+ {
+ popup.setVisible(false);
+ }
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ FavoritesMenuButton class
+ class FavoritesMenuButton extends RolloverButton
+ {
+ //{{{ FavoritesMenuButton constructor
+ FavoritesMenuButton()
+ {
+ setText(jEdit.getProperty("vfs.browser.favorites.label"));
+ setIcon(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
+ setHorizontalTextPosition(SwingConstants.LEADING);
+ setName("favorites");
+
+ FavoritesMenuButton.this.setRequestFocusEnabled(false);
+ setMargin(new Insets(1,1,1,1));
+ FavoritesMenuButton.this.addMouseListener(new MouseHandler());
+
+ if(OperatingSystem.isMacOSLF())
+ FavoritesMenuButton.this.putClientProperty("JButton.buttonType","toolbar");
+ } //}}}
+
+ JPopupMenu popup;
+
+ //{{{ createPopupMenu() method
+ void createPopupMenu()
+ {
+ popup = new JPopupMenu();
+ ActionHandler actionHandler = new ActionHandler();
+
+ JMenuItem mi = new JMenuItem(
+ jEdit.getProperty(
+ "vfs.browser.favorites"
+ + ".add-to-favorites.label"));
+ mi.setActionCommand("add-to-favorites");
+ mi.addActionListener(actionHandler);
+ popup.add(mi);
+
+ mi = new JMenuItem(
+ jEdit.getProperty(
+ "vfs.browser.favorites"
+ + ".edit-favorites.label"));
+ mi.setActionCommand("dir at favorites:");
+ mi.addActionListener(actionHandler);
+ popup.add(mi);
+
+ popup.addSeparator();
+
+ VFSFile[] favorites = FavoritesVFS.getFavorites();
+ if(favorites.length == 0)
+ {
+ mi = new JMenuItem(
+ jEdit.getProperty(
+ "vfs.browser.favorites"
+ + ".no-favorites.label"));
+ mi.setEnabled(false);
+ popup.add(mi);
+ }
+ else
+ {
+ Arrays.sort(favorites,
+ new VFS.DirectoryEntryCompare(
+ sortMixFilesAndDirs,
+ sortIgnoreCase));
+ for(int i = 0; i < favorites.length; i++)
+ {
+ VFSFile favorite = favorites[i];
+ mi = new JMenuItem(favorite.getPath());
+ mi.setIcon(FileCellRenderer
+ .getIconForFile(
+ favorite,false));
+ String cmd = (favorite.getType() ==
+ VFSFile.FILE
+ ? "file@" : "dir@")
+ + favorite.getPath();
+ mi.setActionCommand(cmd);
+ mi.addActionListener(actionHandler);
+ popup.add(mi);
+ }
+ }
+ } //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ String actionCommand = evt.getActionCommand();
+ if("add-to-favorites".equals(actionCommand))
+ {
+ // if any directories are selected, add
+ // them, otherwise add current directory
+ VFSFile[] selected = getSelectedFiles();
+ if(selected == null || selected.length == 0)
+ {
+ if(path.equals(FavoritesVFS.PROTOCOL + ':'))
+ {
+ GUIUtilities.error(VFSBrowser.this,
+ "vfs.browser.recurse-favorites",
+ null);
+ }
+ else
+ {
+ FavoritesVFS.addToFavorites(path,
+ VFSFile.DIRECTORY);
+ }
+ }
+ else
+ {
+ for(int i = 0; i < selected.length; i++)
+ {
+ VFSFile file = selected[i];
+ FavoritesVFS.addToFavorites(file.getPath(),
+ file.getType());
+ }
+ }
+ }
+ else if(actionCommand.startsWith("dir@"))
+ {
+ setDirectory(actionCommand.substring(4));
+ }
+ else if(actionCommand.startsWith("file@"))
+ {
+ switch(getMode())
+ {
+ case BROWSER:
+ jEdit.openFile(view,actionCommand.substring(5));
+ break;
+ default:
+ locateFile(actionCommand.substring(5));
+ break;
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ if(popup != null && popup.isVisible())
+ {
+ popup.setVisible(false);
+ return;
+ }
+
+ if(popup == null)
+ createPopupMenu();
+
+ GUIUtilities.showPopupMenu(
+ popup,FavoritesMenuButton.this,0,
+ FavoritesMenuButton.this.getHeight(),
+ false);
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ BrowserActionContext class
+ static class BrowserActionContext extends ActionContext
+ {
+ @Override
+ public void invokeAction(EventObject evt, EditAction action)
+ {
+ Component source = (Component)evt.getSource();
+ VFSBrowser browser = (VFSBrowser)
+ GUIUtilities.getComponentParent(
+ source,
+ VFSBrowser.class);
+
+ VFSFile[] files = browser.getSelectedFiles(source);
+
+ // in the future we will want something better,
+ // eg. having an 'evt' object passed to
+ // EditAction.invoke().
+
+ // for now, since all browser actions are
+ // written in beanshell we set the 'browser'
+ // variable directly.
+ NameSpace global = BeanShell.getNameSpace();
+ try
+ {
+ global.setVariable("browser",browser);
+ global.setVariable("files",files);
+
+ View view = browser.getView();
+ // I guess ideally all browsers
+ // should have views, but since they
+ // don't, we just use the active view
+ // in that case, since some actions
+ // depend on a view being there and
+ // I don't want to add checks to
+ // them all
+ if(view == null)
+ view = jEdit.getActiveView();
+ action.invoke(view);
+ }
+ catch(UtilEvalError err)
+ {
+ Log.log(Log.ERROR,this,err);
+ }
+ finally
+ {
+ try
+ {
+ global.setVariable("browser",null);
+ global.setVariable("files",null);
+ }
+ catch(UtilEvalError err)
+ {
+ Log.log(Log.ERROR,this,err);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ HistoryComboBoxEditor class
+ private static class HistoryComboBoxEditor
+ extends HistoryTextField
+ implements ComboBoxEditor
+ {
+
+ HistoryComboBoxEditor(String key)
+ {
+ super(key);
+ }
+
+ public Object getItem()
+ {
+ if (current == null)
+ {
+ current = new GlobVFSFileFilter(getText());
+ }
+
+ if (!current.getGlob().equals(getText()))
+ {
+ current.setGlob(getText());
+ }
+
+ return current;
+ }
+
+ public void setItem(Object item)
+ {
+ if (item == current)
+ {
+ // if we keep the same object, swing
+ // will cause an event to be fired
+ // on the default button of the dialog,
+ // causing a beep since no file is
+ // selected...
+ if (item != null)
+ {
+ GlobVFSFileFilter filter = (GlobVFSFileFilter) item;
+ current = new GlobVFSFileFilter(filter.getGlob());
+ setText(current.getGlob());
+ }
+ return;
+ }
+
+ if (item != null)
+ {
+ // this happens when changing the selected item
+ // in the combo; the combo has not yet fired an
+ // itemStateChanged() event, so it's not put into
+ // non-editable mode by the handler above.
+ if (!(item instanceof GlobVFSFileFilter))
+ return;
+
+ GlobVFSFileFilter filter = (GlobVFSFileFilter) item;
+ filter = new GlobVFSFileFilter(filter.getGlob());
+ setText(filter.getGlob());
+ addCurrentToHistory();
+ current = filter;
+ }
+ else
+ {
+ setText("*");
+ current = new GlobVFSFileFilter("*");
+ }
+ }
+
+ @Override
+ protected void processFocusEvent(FocusEvent e)
+ {
+ // AWT will call setItem() when the editor loses
+ // focus; that can cause weird and unwanted things
+ // to happen, so ignore lost focus events.
+ if (e.getID() != FocusEvent.FOCUS_LOST)
+ super.processFocusEvent(e);
+ else
+ {
+ setCaretPosition(0);
+ getCaret().setVisible(false);
+ }
+ }
+
+ public Component getEditorComponent()
+ {
+ return this;
+ }
+
+ private GlobVFSFileFilter current;
+
+ } //}}}
+
+ //{{{ VFSFileFilterRenderer class
+ private static class VFSFileFilterRenderer extends DefaultListCellRenderer
+ {
+
+ @Override
+ public Component getListCellRendererComponent(JList list,
+ Object value, int index, boolean isSelected,
+ boolean cellHasFocus)
+ {
+ assert value instanceof VFSFileFilter : "Filter is not a VFSFileFilter";
+ super.getListCellRendererComponent(
+ list, value, index, isSelected, cellHasFocus);
+ setText(((VFSFileFilter)value).getDescription());
+ return this;
+ }
+
+ } //}}}
+
+ //{{{ DirectoriesOnlyFilter class
+ public static class DirectoriesOnlyFilter implements VFSFileFilter
+ {
+
+ public boolean accept(VFSFile file)
+ {
+ return file.getType() == VFSFile.DIRECTORY
+ || file.getType() == VFSFile.FILESYSTEM;
+ }
+
+ public boolean accept(String url)
+ {
+ return false;
+ }
+
+ public String getDescription()
+ {
+ return jEdit.getProperty("vfs.browser.file_filter.dir_only");
+ }
+
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/VFSDirectoryEntryTable.java b/jEdit/org/gjt/sp/jedit/browser/VFSDirectoryEntryTable.java
index 46c8533..d13af08 100644
--- a/jEdit/org/gjt/sp/jedit/browser/VFSDirectoryEntryTable.java
+++ b/jEdit/org/gjt/sp/jedit/browser/VFSDirectoryEntryTable.java
@@ -1,661 +1,666 @@
-/*
- * VFSDirectoryEntryTable.java - VFS directory entry table
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-//{{{ Imports
-import javax.swing.event.*;
-import javax.swing.table.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.font.*;
-import java.awt.*;
-import java.util.LinkedList;
-import java.util.Set;
-
-import org.gjt.sp.jedit.browser.VFSDirectoryEntryTableModel.Entry;
-import org.gjt.sp.jedit.io.VFS;
-import org.gjt.sp.jedit.io.VFSFile;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.msg.VFSPathSelected;
-import org.gjt.sp.jedit.ActionContext;
-import org.gjt.sp.jedit.EditAction;
-import org.gjt.sp.jedit.EditBus;
-import org.gjt.sp.jedit.MiscUtilities;
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: VFSDirectoryEntryTable.java 16348 2009-10-14 10:40:15Z kpouer $
- * @since jEdit 4.2pre1
- */
-public class VFSDirectoryEntryTable extends JTable
-{
- //{{{ VFSDirectoryEntryTable constructor
- VFSDirectoryEntryTable(BrowserView browserView)
- {
- super(new VFSDirectoryEntryTableModel());
- this.browserView = browserView;
- setShowGrid(false);
-
- setIntercellSpacing(new Dimension(0,0));
-
- setDefaultRenderer(Entry.class,
- renderer = new FileCellRenderer());
-
- header = getTableHeader();
- header.setReorderingAllowed(false);
- addMouseListener(new MainMouseHandler());
- header.addMouseListener(new MouseHandler());
- header.setDefaultRenderer(new HeaderRenderer(
- (DefaultTableCellRenderer)header.getDefaultRenderer()));
-
- setRowSelectionAllowed(true);
-
- getColumnModel().addColumnModelListener(new ColumnHandler());
-
- setAutoResizeMode(AUTO_RESIZE_OFF);
- } //}}}
-
- //{{{ selectFile() method
- public boolean selectFile(String path)
- {
- for(int i = 0; i < getRowCount(); i++)
- {
- Entry entry = (Entry) getValueAt(i,1);
- if(entry.dirEntry.getPath().equals(path))
- {
- setSelectedRow(i);
- return true;
- }
- }
-
- return false;
- } //}}}
-
- //{{{ doTypeSelect() method
- public void doTypeSelect(String str, boolean dirsOnly)
- {
- if(str.length() == 0)
- clearSelection();
- else if(getSelectedRow() == -1)
- doTypeSelect(str,0,getRowCount(),dirsOnly);
- else
- {
- int start = getSelectionModel().getMaxSelectionIndex();
- boolean retVal = doTypeSelect(str,start,getRowCount(),
- dirsOnly);
-
- if(!retVal)
- {
- // scan from selection to end failed, so
- // scan from start to selection
- doTypeSelect(str,0,start,dirsOnly);
- }
- }
- } //}}}
-
- //{{{ getSelectedFiles() method
- public VFSFile[] getSelectedFiles()
- {
- VFSDirectoryEntryTableModel model
- = (VFSDirectoryEntryTableModel)getModel();
-
- java.util.List<VFSFile> returnValue = new LinkedList<VFSFile>();
- int[] selectedRows = getSelectedRows();
- for(int i = 0; i < selectedRows.length; i++)
- {
- returnValue.add(model.files[selectedRows[i]].dirEntry);
- }
- return returnValue.toArray(new VFSFile[returnValue.size()]);
- } //}}}
-
- //{{{ getExpandedDirectories() method
- public void getExpandedDirectories(Set<String> set)
- {
- VFSDirectoryEntryTableModel model
- = (VFSDirectoryEntryTableModel)getModel();
-
- if(model.files != null)
- {
- for(int i = 0; i < model.files.length; i++)
- {
- if(model.files[i].expanded)
- set.add(model.files[i].dirEntry.getPath());
- }
- }
- } //}}}
-
- //{{{ toggleExpanded() method
- public void toggleExpanded(final int row)
- {
- VFSDirectoryEntryTableModel model
- = (VFSDirectoryEntryTableModel)getModel();
-
- Entry entry = model.files[row];
- if(entry.dirEntry.getType() == VFSFile.FILE)
- return;
-
- if(entry.expanded)
- {
- model.collapse(VFSManager.getVFSForPath(
- entry.dirEntry.getPath()),row);
- resizeColumns();
- }
- else
- {
- browserView.clearExpansionState();
- browserView.loadDirectory(entry,entry.dirEntry.getPath(),
- false);
- }
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- setSelectedRow(row);
- }
- });
- } //}}}
-
- //{{{ setDirectory() method
- public void setDirectory(VFS vfs, Object node, java.util.List<VFSFile> list,
- Set<String> tmpExpanded)
- {
- timer.stop();
- typeSelectBuffer.setLength(0);
-
- VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)getModel();
- int startIndex;
- if(node == null)
- {
- startIndex = 0;
- model.setRoot(vfs,list);
- }
- else
- {
- startIndex =
- model.expand(
- vfs,
- (Entry)node,
- list);
- startIndex++;
- }
-
- for(int i = 0; i < list.size(); i++)
- {
- Entry e = model.files[startIndex + i];
- String path = e.dirEntry.getPath();
- if(tmpExpanded.contains(path))
- {
- browserView.loadDirectory(e,path,false);
- tmpExpanded.remove(path);
- }
- }
-
- resizeColumns();
- } //}}}
-
- //{{{ maybeReloadDirectory() method
- public void maybeReloadDirectory(String path)
- {
- VFSDirectoryEntryTableModel model
- = (VFSDirectoryEntryTableModel)getModel();
-
- for(int i = 0; i < model.files.length; i++)
- {
- Entry e = model.files[i];
- if(!e.expanded || e.dirEntry.getType() == VFSFile.FILE)
- continue;
-
- VFSFile dirEntry = e.dirEntry;
- // work around for broken FTP plugin!
- String otherPath;
- if(dirEntry.getSymlinkPath() == null)
- otherPath = dirEntry.getPath();
- else
- otherPath = dirEntry.getSymlinkPath();
- if(MiscUtilities.pathsEqual(path,otherPath))
- {
- browserView.saveExpansionState();
- browserView.loadDirectory(e,path,false);
- return;
- }
- }
- } //}}}
-
- //{{{ propertiesChanged() method
- public void propertiesChanged()
- {
- renderer.propertiesChanged();
-
- VFSFile template = new VFSFile(
- "foo","foo","foo",VFSFile.FILE,0L,false);
- setRowHeight(renderer.getTableCellRendererComponent(
- this,new Entry(template,0),
- false,false,0,0).getPreferredSize().height);
- Dimension prefSize = getPreferredSize();
- setPreferredScrollableViewportSize(new Dimension(prefSize.width,
- getRowHeight() * 12));
- } //}}}
-
- //{{{ scrollRectToVisible() method
- @Override
- public void scrollRectToVisible(Rectangle rect)
- {
- // avoid scrolling to the right
- rect.width = 0;
- super.scrollRectToVisible(rect);
- } //}}}
-
- //{{{ processKeyEvent() method
- @Override
- public void processKeyEvent(KeyEvent evt)
- {
- if(evt.getID() == KeyEvent.KEY_PRESSED)
- {
- VFSDirectoryEntryTableModel model =
- (VFSDirectoryEntryTableModel)getModel();
- int row = getSelectedRow();
- ActionContext ac = VFSBrowser.getActionContext();
- ActionContext jac = jEdit.getActionContext();
- EditAction browserUp = ac.getAction("vfs.browser.up");
- VFSBrowser browser = browserView.getBrowser();
- switch(evt.getKeyCode())
- {
- case KeyEvent.VK_LEFT:
- evt.consume();
- if ((evt.getModifiers() & InputEvent.ALT_MASK)>0)
- {
- browser.previousDirectory();
- }
- else
- {
- if(row != -1)
- {
- if(model.files[row].expanded)
- {
- toggleExpanded(row);
- return;
- }
-
- for(int i = row - 1; i >= 0; i--)
- {
- if(model.files[i].expanded &&
- model.files[i].level < model.files[row].level)
- {
- setSelectedRow(i);
- return;
- }
- }
- }
-
- String dir = browserView.getBrowser()
- .getDirectory();
- dir = MiscUtilities.getParentOfPath(dir);
- browserView.getBrowser().setDirectory(dir);
- }
- break;
- case KeyEvent.VK_TAB:
- evt.consume();
- if ((evt.getModifiers() & InputEvent.SHIFT_MASK) > 0)
- {
- browserView.getParentDirectoryList().requestFocus();
- }
- else
- {
- browser.focusOnDefaultComponent();
- }
- break;
- case KeyEvent.VK_BACK_SPACE:
- evt.consume();
- ac.invokeAction(evt, browserUp);
- break;
- case KeyEvent.VK_UP:
- if ((evt.getModifiers() & InputEvent.ALT_MASK) >0)
- {
- evt.consume();
- ac.invokeAction(evt, browserUp);
- }
- break;
- case KeyEvent.VK_DELETE:
- evt.consume();
- EditAction deleteAct = ac.getAction("vfs.browser.delete");
- ac.invokeAction(evt, deleteAct);
- break;
- case KeyEvent.VK_N:
- if ((evt.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) == InputEvent.CTRL_DOWN_MASK)
- {
- evt.consume();
- EditAction ea = ac.getAction("vfs.browser.new-file");
- ac.invokeAction(evt, ea);
- }
- break;
- case KeyEvent.VK_INSERT:
- evt.consume();
- EditAction newDir = ac.getAction("vfs.browser.new-directory");
- ac.invokeAction(evt, newDir);
- break;
- case KeyEvent.VK_ESCAPE:
- EditAction cda = jac.getAction("close-docking-area");
- cda.invoke(jEdit.getActiveView());
- evt.consume();
- break;
- case KeyEvent.VK_F2:
- EditAction ren = ac.getAction("vfs.browser.rename");
- evt.consume();
- ac.invokeAction(evt, ren);
- break;
- case KeyEvent.VK_F5:
- evt.consume();
- EditAction reload= ac.getAction("vfs.browser.reload");
- ac.invokeAction(evt, reload);
- break;
- case KeyEvent.VK_F6:
- case KeyEvent.VK_RIGHT:
- evt.consume();
- if ((evt.getModifiers() & InputEvent.ALT_MASK)>0)
- {
- browser.nextDirectory();
- }
- else if(row != -1)
- {
- if(!model.files[row].expanded)
- toggleExpanded(row);
- }
- break;
- case KeyEvent.VK_ENTER:
- evt.consume();
- browserView.getBrowser().filesActivated(
- evt.isShiftDown()
- ? VFSBrowser.M_OPEN_NEW_VIEW
- : VFSBrowser.M_OPEN,false);
-
- break;
- }
- }
- else if(evt.getID() == KeyEvent.KEY_TYPED)
- {
-
- if(evt.isControlDown() || evt.isAltDown()
- || evt.isMetaDown())
- {
- evt.consume();
- return;
- }
-
- // hack...
- if(evt.isShiftDown() && evt.getKeyChar() == '\n')
- {
- evt.consume();
- return;
- }
-
-
- VFSBrowser browser = browserView.getBrowser();
-
- switch(evt.getKeyChar())
- {
- case '~':
- evt.consume();
- if(browser.getMode() == VFSBrowser.BROWSER)
- browser.setDirectory(System.getProperty(
- "user.home"));
- break;
- case '/':
- evt.consume();
- if(browser.getMode() == VFSBrowser.BROWSER)
- browser.rootDirectory();
- break;
- case '-':
- evt.consume();
- if(browser.getMode() == VFSBrowser.BROWSER)
- {
- browser.setDirectory(
- browser.getView().getBuffer()
- .getDirectory());
- }
- break;
- default:
- evt.consume();
- typeSelectBuffer.append(evt.getKeyChar());
- doTypeSelect(typeSelectBuffer.toString(),
- browser.getMode() == VFSBrowser
- .CHOOSE_DIRECTORY_DIALOG);
-
- timer.stop();
- timer.setInitialDelay(750);
- timer.setRepeats(false);
- timer.start();
- return;
- }
- }
-
- if(!evt.isConsumed())
- super.processKeyEvent(evt);
- } //}}}
-
- //{{{ setSelectedRow() method
- public void setSelectedRow(int row)
- {
- getSelectionModel().setSelectionInterval(row,row);
- scrollRectToVisible(getCellRect(row,0,true));
- } //}}}
-
- //{{{ Private members
- private final BrowserView browserView;
- private final JTableHeader header;
- private final FileCellRenderer renderer;
- private final StringBuffer typeSelectBuffer = new StringBuffer();
- private final Timer timer = new Timer(0,new ClearTypeSelect());
- private boolean resizingColumns;
-
- //{{{ doTypeSelect() method
- private boolean doTypeSelect(String str, int start, int end,
- boolean dirsOnly)
- {
- VFSFile[] files = ((VFSDirectoryEntryTableModel)
- getModel()).getFiles();
-
- int index = VFSFile.findCompletion(files,start,end,str,dirsOnly);
- if(index != -1)
- {
- setSelectedRow(index);
- return true;
- }
- else
- return false;
- } //}}}
-
- //{{{ resizeColumns() method
- private void resizeColumns()
- {
- VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)getModel();
-
- FontRenderContext fontRenderContext = new FontRenderContext(
- null,false,false);
- int[] widths = new int[model.getColumnCount()];
- for(int i = 0; i < widths.length; i++)
- {
- String columnName = model.getColumnName(i);
- if(columnName != null)
- {
- widths[i] = (int)renderer.plainFont
- .getStringBounds(columnName,
- fontRenderContext).getWidth();
- }
- }
-
- for(int i = 1; i < widths.length; i++)
- {
- //String extAttr = model.getExtendedAttribute(i);
- widths[i] = Math.max(widths[i],model.getColumnWidth(i));
- }
-
- for(int i = 0; i < model.files.length; i++)
- {
- Entry entry = model.files[i];
- Font font = entry.dirEntry.getType()
- == VFSFile.FILE
- ? renderer.plainFont : renderer.boldFont;
-
- widths[0] = Math.max(widths[0],renderer.getEntryWidth(
- entry,font,fontRenderContext));
- }
-
- widths[0] += 10;
-
- TableColumnModel columns = getColumnModel();
-
- try
- {
- resizingColumns = true;
- for(int i = 0; i < widths.length; i++)
- {
- columns.getColumn(i).setPreferredWidth(widths[i]);
- columns.getColumn(i).setWidth(widths[i]);
- }
- }
- finally
- {
- resizingColumns = false;
- }
-
- doLayout();
- } //}}}
-
- //{{{ saveWidths() method
- private void saveWidths()
- {
- if(resizingColumns)
- return;
-
- VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)getModel();
- TableColumnModel columns = getColumnModel();
-
- for(int i = 1; i < model.getColumnCount(); i++)
- model.setColumnWidth(i,columns.getColumn(i).getWidth());
- } //}}}
-
- //}}}
-
- //{{{ ClearTypeSelect class
- class ClearTypeSelect implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- typeSelectBuffer.setLength(0);
- }
- } //}}}
-
- //{{{ ColumnHandler class
- class ColumnHandler implements TableColumnModelListener
- {
- public void columnAdded(TableColumnModelEvent e) {}
- public void columnRemoved(TableColumnModelEvent e) {}
- public void columnMoved(TableColumnModelEvent e) {}
- public void columnSelectionChanged(ListSelectionEvent e) {}
-
- public void columnMarginChanged(ChangeEvent e)
- {
- saveWidths();
- }
- } //}}}
-
- //{{{ class MainMouseHandler
- class MainMouseHandler extends MouseInputAdapter
- {
-
- @Override
- public void mouseClicked(MouseEvent e)
- {
- super.mouseClicked(e);
- int ind = getSelectionModel().getMinSelectionIndex();
- Entry node = (Entry) getModel().getValueAt(ind, 0);
- boolean isDir = node.dirEntry.getType() == VFSFile.DIRECTORY;
- EditBus.send(new VFSPathSelected(jEdit.getActiveView(),
- node.dirEntry.getPath(), isDir));
- }
-
- } //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseInputAdapter
- {
- @Override
- public void mousePressed(MouseEvent evt)
- {
- // double click on columns header
- if (evt.getSource() == header && evt.getClickCount() == 2)
- {
- VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel) header.getTable().getModel();
- TableColumnModel columnModel = header.getColumnModel();
- int viewColumn = columnModel.getColumnIndexAtX(evt.getX());
- int column = columnModel.getColumn(viewColumn).getModelIndex();
- saveWidths();
- if(model.sortByColumn(column))
- {
- resizeColumns();
- Log.log(Log.DEBUG,this,"VFSDirectoryEntryTable sorted by "
- + model.getColumnName(column)
- + (model.getAscending() ? " ascending" : " descending") );
- }
- }
- }
- } //}}}
-
- //{{{ HeaderRenderer
- static class HeaderRenderer extends DefaultTableCellRenderer
- {
- private final DefaultTableCellRenderer tcr;
-
- HeaderRenderer(DefaultTableCellRenderer tcr)
- {
- this.tcr = tcr;
- }
-
- @Override
- public Component getTableCellRendererComponent(JTable table, Object value,
- boolean isSelected, boolean hasFocus, int row, int column)
- {
- JLabel l = (JLabel)tcr.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
- VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)table.getModel();
- Icon icon = column == model.getSortColumn()
- ? model.getAscending() ? ASC_ICON : DESC_ICON
- : null;
- l.setIcon(icon);
- // l.setHorizontalTextPosition(l.LEADING);
- return l;
- }
- } //}}}
-
- //{{{ SortOrder Icons
-
- static final Icon ASC_ICON = GUIUtilities.loadIcon("arrow-asc.png");
- static final Icon DESC_ICON = GUIUtilities.loadIcon("arrow-desc.png");
-
- //}}}
-
-}
+/*
+ * VFSDirectoryEntryTable.java - VFS directory entry table
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import javax.swing.event.*;
+import javax.swing.table.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.font.*;
+import java.awt.*;
+import java.util.LinkedList;
+import java.util.Set;
+
+import org.gjt.sp.jedit.browser.VFSDirectoryEntryTableModel.Entry;
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.jedit.io.VFSFile;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.jedit.msg.VFSPathSelected;
+import org.gjt.sp.jedit.ActionContext;
+import org.gjt.sp.jedit.EditAction;
+import org.gjt.sp.jedit.EditBus;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.ThreadUtilities;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: VFSDirectoryEntryTable.java 18962 2010-11-15 20:37:46Z ezust $
+ * @since jEdit 4.2pre1
+ */
+public class VFSDirectoryEntryTable extends JTable
+{
+ //{{{ VFSDirectoryEntryTable constructor
+ VFSDirectoryEntryTable(BrowserView browserView)
+ {
+ super(new VFSDirectoryEntryTableModel());
+ this.browserView = browserView;
+ setShowGrid(false);
+
+ setIntercellSpacing(new Dimension(0,0));
+
+ setDefaultRenderer(Entry.class,
+ renderer = new FileCellRenderer());
+
+ header = getTableHeader();
+ header.setReorderingAllowed(false);
+ addMouseListener(new MainMouseHandler());
+ header.addMouseListener(new MouseHandler());
+ header.setDefaultRenderer(new HeaderRenderer(
+ (DefaultTableCellRenderer)header.getDefaultRenderer()));
+
+ setRowSelectionAllowed(true);
+
+ getColumnModel().addColumnModelListener(new ColumnHandler());
+
+ setAutoResizeMode(AUTO_RESIZE_OFF);
+ } //}}}
+
+ //{{{ selectFile() method
+ public boolean selectFile(String path)
+ {
+ for(int i = 0; i < getRowCount(); i++)
+ {
+ Entry entry = (Entry) getValueAt(i,1);
+ if(entry.dirEntry.getPath().equals(path))
+ {
+ setSelectedRow(i);
+ return true;
+ }
+ }
+
+ return false;
+ } //}}}
+
+ //{{{ doTypeSelect() method
+ public void doTypeSelect(String str, boolean dirsOnly)
+ {
+ if(str.length() == 0)
+ clearSelection();
+ else if(getSelectedRow() == -1)
+ doTypeSelect(str,0,getRowCount(),dirsOnly);
+ else
+ {
+ int start = getSelectionModel().getMaxSelectionIndex();
+ boolean retVal = doTypeSelect(str,start,getRowCount(),
+ dirsOnly);
+
+ if(!retVal)
+ {
+ // scan from selection to end failed, so
+ // scan from start to selection
+ doTypeSelect(str,0,start,dirsOnly);
+ }
+ }
+ } //}}}
+
+ //{{{ getSelectedFiles() method
+ public VFSFile[] getSelectedFiles()
+ {
+ VFSDirectoryEntryTableModel model
+ = (VFSDirectoryEntryTableModel)getModel();
+
+ java.util.List<VFSFile> returnValue = new LinkedList<VFSFile>();
+ int[] selectedRows = getSelectedRows();
+ for(int i = 0; i < selectedRows.length; i++)
+ {
+ returnValue.add(model.files[selectedRows[i]].dirEntry);
+ }
+ return returnValue.toArray(new VFSFile[returnValue.size()]);
+ } //}}}
+
+ //{{{ getExpandedDirectories() method
+ public void getExpandedDirectories(Set<String> set)
+ {
+ VFSDirectoryEntryTableModel model
+ = (VFSDirectoryEntryTableModel)getModel();
+
+ if(model.files != null)
+ {
+ for(int i = 0; i < model.files.length; i++)
+ {
+ if(model.files[i].expanded)
+ set.add(model.files[i].dirEntry.getPath());
+ }
+ }
+ } //}}}
+
+ //{{{ toggleExpanded() method
+ public void toggleExpanded(final int row)
+ {
+ VFSDirectoryEntryTableModel model
+ = (VFSDirectoryEntryTableModel)getModel();
+
+ Entry entry = model.files[row];
+ if(entry.dirEntry.getType() == VFSFile.FILE)
+ return;
+
+ Runnable delayedAwtTask = new Runnable()
+ {
+ public void run()
+ {
+ setSelectedRow(row);
+ }
+ };
+ if(entry.expanded)
+ {
+ model.collapse(VFSManager.getVFSForPath(
+ entry.dirEntry.getPath()),row);
+ resizeColumns();
+ ThreadUtilities.runInDispatchThread(delayedAwtTask);
+ }
+ else
+ {
+ browserView.clearExpansionState();
+ browserView.loadDirectory(entry,entry.dirEntry.getPath(),
+ false, delayedAwtTask);
+ }
+
+
+
+ } //}}}
+
+ //{{{ setDirectory() method
+ public void setDirectory(VFS vfs, Object node, java.util.List<VFSFile> list,
+ Set<String> tmpExpanded)
+ {
+ timer.stop();
+ typeSelectBuffer.setLength(0);
+
+ VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)getModel();
+ int startIndex;
+ if(node == null)
+ {
+ startIndex = 0;
+ model.setRoot(vfs,list);
+ }
+ else
+ {
+ startIndex =
+ model.expand(
+ vfs,
+ (Entry)node,
+ list);
+ startIndex++;
+ }
+
+ for(int i = 0; i < list.size(); i++)
+ {
+ Entry e = model.files[startIndex + i];
+ String path = e.dirEntry.getPath();
+ if(tmpExpanded.contains(path))
+ {
+ browserView.loadDirectory(e,path,false);
+ tmpExpanded.remove(path);
+ }
+ }
+
+ resizeColumns();
+ } //}}}
+
+ //{{{ maybeReloadDirectory() method
+ public void maybeReloadDirectory(String path)
+ {
+ VFSDirectoryEntryTableModel model
+ = (VFSDirectoryEntryTableModel)getModel();
+
+ for(int i = 0; i < model.files.length; i++)
+ {
+ Entry e = model.files[i];
+ if(!e.expanded || e.dirEntry.getType() == VFSFile.FILE)
+ continue;
+
+ VFSFile dirEntry = e.dirEntry;
+ // work around for broken FTP plugin!
+ String otherPath;
+ if(dirEntry.getSymlinkPath() == null)
+ otherPath = dirEntry.getPath();
+ else
+ otherPath = dirEntry.getSymlinkPath();
+ if(MiscUtilities.pathsEqual(path,otherPath))
+ {
+ browserView.saveExpansionState();
+ browserView.loadDirectory(e,path,false);
+ return;
+ }
+ }
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ public void propertiesChanged()
+ {
+ renderer.propertiesChanged();
+
+ VFSFile template = new VFSFile(
+ "foo","foo","foo",VFSFile.FILE,0L,false);
+ setRowHeight(renderer.getTableCellRendererComponent(
+ this,new Entry(template,0),
+ false,false,0,0).getPreferredSize().height);
+ Dimension prefSize = getPreferredSize();
+ setPreferredScrollableViewportSize(new Dimension(prefSize.width,
+ getRowHeight() * 12));
+ } //}}}
+
+ //{{{ scrollRectToVisible() method
+ @Override
+ public void scrollRectToVisible(Rectangle rect)
+ {
+ // avoid scrolling to the right
+ rect.width = 0;
+ super.scrollRectToVisible(rect);
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ @Override
+ public void processKeyEvent(KeyEvent evt)
+ {
+ if(evt.getID() == KeyEvent.KEY_PRESSED)
+ {
+ VFSDirectoryEntryTableModel model =
+ (VFSDirectoryEntryTableModel)getModel();
+ int row = getSelectedRow();
+ ActionContext ac = VFSBrowser.getActionContext();
+ ActionContext jac = jEdit.getActionContext();
+ EditAction browserUp = ac.getAction("vfs.browser.up");
+ VFSBrowser browser = browserView.getBrowser();
+ switch(evt.getKeyCode())
+ {
+ case KeyEvent.VK_LEFT:
+ evt.consume();
+ if ((evt.getModifiers() & InputEvent.ALT_MASK)>0)
+ {
+ browser.previousDirectory();
+ }
+ else
+ {
+ if(row != -1)
+ {
+ if(model.files[row].expanded)
+ {
+ toggleExpanded(row);
+ return;
+ }
+
+ for(int i = row - 1; i >= 0; i--)
+ {
+ if(model.files[i].expanded &&
+ model.files[i].level < model.files[row].level)
+ {
+ setSelectedRow(i);
+ return;
+ }
+ }
+ }
+
+ String dir = browserView.getBrowser()
+ .getDirectory();
+ dir = MiscUtilities.getParentOfPath(dir);
+ browserView.getBrowser().setDirectory(dir);
+ }
+ break;
+ case KeyEvent.VK_TAB:
+ evt.consume();
+ if ((evt.getModifiers() & InputEvent.SHIFT_MASK) > 0)
+ {
+ browserView.getParentDirectoryList().requestFocus();
+ }
+ else
+ {
+ browser.focusOnDefaultComponent();
+ }
+ break;
+ case KeyEvent.VK_BACK_SPACE:
+ evt.consume();
+ ac.invokeAction(evt, browserUp);
+ break;
+ case KeyEvent.VK_UP:
+ if ((evt.getModifiers() & InputEvent.ALT_MASK) >0)
+ {
+ evt.consume();
+ ac.invokeAction(evt, browserUp);
+ }
+ break;
+ case KeyEvent.VK_DELETE:
+ evt.consume();
+ EditAction deleteAct = ac.getAction("vfs.browser.delete");
+ ac.invokeAction(evt, deleteAct);
+ break;
+ case KeyEvent.VK_N:
+ if ((evt.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) == InputEvent.CTRL_DOWN_MASK)
+ {
+ evt.consume();
+ EditAction ea = ac.getAction("vfs.browser.new-file");
+ ac.invokeAction(evt, ea);
+ }
+ break;
+ case KeyEvent.VK_INSERT:
+ evt.consume();
+ EditAction newDir = ac.getAction("vfs.browser.new-directory");
+ ac.invokeAction(evt, newDir);
+ break;
+ case KeyEvent.VK_ESCAPE:
+ EditAction cda = ac.getAction("vfs.browser.closedialog");
+ ac.invokeAction(evt, cda);
+ break;
+ case KeyEvent.VK_F2:
+ EditAction ren = ac.getAction("vfs.browser.rename");
+ evt.consume();
+ ac.invokeAction(evt, ren);
+ break;
+ case KeyEvent.VK_F5:
+ evt.consume();
+ EditAction reload= ac.getAction("vfs.browser.reload");
+ ac.invokeAction(evt, reload);
+ break;
+ case KeyEvent.VK_F6:
+ case KeyEvent.VK_RIGHT:
+ evt.consume();
+ if ((evt.getModifiers() & InputEvent.ALT_MASK)>0)
+ {
+ browser.nextDirectory();
+ }
+ else if(row != -1)
+ {
+ if(!model.files[row].expanded)
+ toggleExpanded(row);
+ }
+ break;
+ case KeyEvent.VK_ENTER:
+ evt.consume();
+ browserView.getBrowser().filesActivated(
+ evt.isShiftDown()
+ ? VFSBrowser.M_OPEN_NEW_VIEW
+ : VFSBrowser.M_OPEN,false);
+
+ break;
+ }
+ }
+ else if(evt.getID() == KeyEvent.KEY_TYPED)
+ {
+
+ if(evt.isControlDown() || evt.isAltDown()
+ || evt.isMetaDown())
+ {
+ evt.consume();
+ return;
+ }
+
+ // hack...
+ if(evt.isShiftDown() && evt.getKeyChar() == '\n')
+ {
+ evt.consume();
+ return;
+ }
+
+
+ VFSBrowser browser = browserView.getBrowser();
+
+ switch(evt.getKeyChar())
+ {
+ case '~':
+ evt.consume();
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ browser.setDirectory(System.getProperty(
+ "user.home"));
+ break;
+ case '/':
+ evt.consume();
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ browser.rootDirectory();
+ break;
+ case '-':
+ evt.consume();
+ if(browser.getMode() == VFSBrowser.BROWSER)
+ {
+ browser.setDirectory(
+ browser.getView().getBuffer()
+ .getDirectory());
+ }
+ break;
+ default:
+ evt.consume();
+ typeSelectBuffer.append(evt.getKeyChar());
+ doTypeSelect(typeSelectBuffer.toString(),
+ browser.getMode() == VFSBrowser
+ .CHOOSE_DIRECTORY_DIALOG);
+
+ timer.stop();
+ timer.setInitialDelay(750);
+ timer.setRepeats(false);
+ timer.start();
+ return;
+ }
+ }
+
+ if(!evt.isConsumed())
+ super.processKeyEvent(evt);
+ } //}}}
+
+ //{{{ setSelectedRow() method
+ public void setSelectedRow(int row)
+ {
+ getSelectionModel().setSelectionInterval(row,row);
+ scrollRectToVisible(getCellRect(row,0,true));
+ } //}}}
+
+ //{{{ Private members
+ private final BrowserView browserView;
+ private final JTableHeader header;
+ private final FileCellRenderer renderer;
+ private final StringBuffer typeSelectBuffer = new StringBuffer();
+ private final Timer timer = new Timer(0,new ClearTypeSelect());
+ private boolean resizingColumns;
+
+ //{{{ doTypeSelect() method
+ private boolean doTypeSelect(String str, int start, int end,
+ boolean dirsOnly)
+ {
+ VFSFile[] files = ((VFSDirectoryEntryTableModel)
+ getModel()).getFiles();
+
+ int index = VFSFile.findCompletion(files,start,end,str,dirsOnly);
+ if(index != -1)
+ {
+ setSelectedRow(index);
+ return true;
+ }
+ else
+ return false;
+ } //}}}
+
+ //{{{ resizeColumns() method
+ private void resizeColumns()
+ {
+ VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)getModel();
+
+ FontRenderContext fontRenderContext = new FontRenderContext(
+ null,false,false);
+ int[] widths = new int[model.getColumnCount()];
+ for(int i = 0; i < widths.length; i++)
+ {
+ String columnName = model.getColumnName(i);
+ if(columnName != null)
+ {
+ widths[i] = (int)renderer.plainFont
+ .getStringBounds(columnName,
+ fontRenderContext).getWidth();
+ }
+ }
+
+ for(int i = 1; i < widths.length; i++)
+ {
+ //String extAttr = model.getExtendedAttribute(i);
+ widths[i] = Math.max(widths[i],model.getColumnWidth(i));
+ }
+
+ for(int i = 0; i < model.files.length; i++)
+ {
+ Entry entry = model.files[i];
+ Font font = entry.dirEntry.getType()
+ == VFSFile.FILE
+ ? renderer.plainFont : renderer.boldFont;
+
+ widths[0] = Math.max(widths[0],renderer.getEntryWidth(
+ entry,font,fontRenderContext));
+ }
+
+ widths[0] += 10;
+
+ TableColumnModel columns = getColumnModel();
+
+ try
+ {
+ resizingColumns = true;
+ for(int i = 0; i < widths.length; i++)
+ {
+ columns.getColumn(i).setPreferredWidth(widths[i]);
+ columns.getColumn(i).setWidth(widths[i]);
+ }
+ }
+ finally
+ {
+ resizingColumns = false;
+ }
+
+ doLayout();
+ } //}}}
+
+ //{{{ saveWidths() method
+ private void saveWidths()
+ {
+ if(resizingColumns)
+ return;
+
+ VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)getModel();
+ TableColumnModel columns = getColumnModel();
+
+ for(int i = 1; i < model.getColumnCount(); i++)
+ model.setColumnWidth(i,columns.getColumn(i).getWidth());
+ } //}}}
+
+ //}}}
+
+ //{{{ ClearTypeSelect class
+ class ClearTypeSelect implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ typeSelectBuffer.setLength(0);
+ }
+ } //}}}
+
+ //{{{ ColumnHandler class
+ class ColumnHandler implements TableColumnModelListener
+ {
+ public void columnAdded(TableColumnModelEvent e) {}
+ public void columnRemoved(TableColumnModelEvent e) {}
+ public void columnMoved(TableColumnModelEvent e) {}
+ public void columnSelectionChanged(ListSelectionEvent e) {}
+
+ public void columnMarginChanged(ChangeEvent e)
+ {
+ saveWidths();
+ }
+ } //}}}
+
+ //{{{ class MainMouseHandler
+ class MainMouseHandler extends MouseInputAdapter
+ {
+
+ @Override
+ public void mouseClicked(MouseEvent e)
+ {
+ super.mouseClicked(e);
+ int ind = getSelectionModel().getMinSelectionIndex();
+ if (ind == -1)
+ return;
+ Entry node = (Entry) getModel().getValueAt(ind, 0);
+ boolean isDir = node.dirEntry.getType() == VFSFile.DIRECTORY;
+ EditBus.send(new VFSPathSelected(jEdit.getActiveView(),
+ node.dirEntry.getPath(), isDir));
+ }
+
+ } //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseInputAdapter
+ {
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ // double click on columns header
+ if (evt.getSource() == header && evt.getClickCount() == 2)
+ {
+ VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel) header.getTable().getModel();
+ TableColumnModel columnModel = header.getColumnModel();
+ int viewColumn = columnModel.getColumnIndexAtX(evt.getX());
+ int column = columnModel.getColumn(viewColumn).getModelIndex();
+ saveWidths();
+ if(model.sortByColumn(column))
+ {
+ resizeColumns();
+ Log.log(Log.DEBUG,this,"VFSDirectoryEntryTable sorted by "
+ + model.getColumnName(column)
+ + (model.getAscending() ? " ascending" : " descending") );
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ HeaderRenderer
+ static class HeaderRenderer extends DefaultTableCellRenderer
+ {
+ private final DefaultTableCellRenderer tcr;
+
+ HeaderRenderer(DefaultTableCellRenderer tcr)
+ {
+ this.tcr = tcr;
+ }
+
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object value,
+ boolean isSelected, boolean hasFocus, int row, int column)
+ {
+ JLabel l = (JLabel)tcr.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
+ VFSDirectoryEntryTableModel model = (VFSDirectoryEntryTableModel)table.getModel();
+ Icon icon = column == model.getSortColumn()
+ ? model.getAscending() ? ASC_ICON : DESC_ICON
+ : null;
+ l.setIcon(icon);
+ // l.setHorizontalTextPosition(l.LEADING);
+ return l;
+ }
+ } //}}}
+
+ //{{{ SortOrder Icons
+
+ static final Icon ASC_ICON = GUIUtilities.loadIcon("arrow-asc.png");
+ static final Icon DESC_ICON = GUIUtilities.loadIcon("arrow-desc.png");
+
+ //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/VFSDirectoryEntryTableModel.java b/jEdit/org/gjt/sp/jedit/browser/VFSDirectoryEntryTableModel.java
index 2c0e139..dd33cb1 100644
--- a/jEdit/org/gjt/sp/jedit/browser/VFSDirectoryEntryTableModel.java
+++ b/jEdit/org/gjt/sp/jedit/browser/VFSDirectoryEntryTableModel.java
@@ -1,473 +1,473 @@
-/*
- * VFSDirectoryEntryTableModel.java - VFS directory entry table model
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-//{{{ Imports
-import javax.swing.table.*;
-import java.util.*;
-import org.gjt.sp.jedit.io.FileVFS;
-import org.gjt.sp.jedit.io.VFS;
-import org.gjt.sp.jedit.io.VFSFile;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: VFSDirectoryEntryTableModel.java 14450 2009-01-24 22:56:40Z kpouer $
- * @since jEdit 4.2pre1
- */
-public class VFSDirectoryEntryTableModel extends AbstractTableModel
-{
- //{{{ VFSDirectoryEntryTableModel constructor
- public VFSDirectoryEntryTableModel()
- {
- extAttrs = new ArrayList<ExtendedAttribute>();
- sortColumn = 0;
- ascending = true;
- } //}}}
-
- //{{{ setRoot() method
- public void setRoot(VFS vfs, List<VFSFile> list)
- {
- extAttrs.clear();
- addExtendedAttributes(vfs);
-
- /* if(files != null && files.length != 0)
- fireTableRowsDeleted(0,files.length - 1); */
-
- files = new Entry[list.size()];
- for(int i = 0; i < files.length; i++)
- {
- files[i] = new Entry(list.get(i),0);
- }
-
- /* if(files.length != 0)
- fireTableRowsInserted(0,files.length - 1); */
-
- Arrays.sort(files, new EntryCompare(getSortAttribute(sortColumn), ascending));
- fireTableStructureChanged();
- } //}}}
-
- //{{{ expand() method
- public int expand(VFS vfs, Entry entry, List<VFSFile> list)
- {
- int startIndex = -1;
- for(int i = 0; i < files.length; i++)
- {
- if(files[i] == entry)
- startIndex = i;
- }
- if (startIndex != -1)
- collapse(vfs,startIndex);
-
- addExtendedAttributes(vfs);
- entry.expanded = true;
-
- if(list != null)
- {
- // make a large enough destination array
- Entry[] newFiles = new Entry[files.length + list.size()];
- Entry[] subdirFiles = new Entry[list.size()];
-
- for(int i = 0; i < list.size(); i++)
- {
- subdirFiles[i] = new Entry(
- list.get(i),entry.level + 1,entry);
- }
-
- // sort expanded entries according to current sort params
- Arrays.sort(subdirFiles, new EntryCompare(
- getSortAttribute(sortColumn), ascending));
-
- // make room after expanded entry for subdir files
- int nextIndex = startIndex + 1;
- System.arraycopy(files,0,newFiles,0,nextIndex);
- System.arraycopy(subdirFiles,0,newFiles,nextIndex,list.size());
- System.arraycopy(files,nextIndex,newFiles,nextIndex + list.size(),
- files.length - nextIndex);
-
- this.files = newFiles;
-
- /* fireTableRowsInserted(startIndex + 1,
- startIndex + list.size() + 1); */
- }
-
- /* fireTableRowsUpdated(startIndex,startIndex); */
-
- fireTableStructureChanged();
-
- return startIndex;
- } //}}}
-
- //{{{ collapse() method
- public void collapse(VFS vfs, int index)
- {
- Entry entry = files[index];
- if(!entry.expanded)
- return;
-
- entry.expanded = false;
-
- int lastIndex = index + 1;
- while(lastIndex < files.length)
- {
- Entry e = files[lastIndex];
-
- if(e.level <= entry.level)
- break;
-
- lastIndex++;
-
- if(e.expanded)
- {
- removeExtendedAttributes(VFSManager.getVFSForPath(
- e.dirEntry.getPath()));
- }
- }
-
- removeExtendedAttributes(vfs);
-
- Entry[] newFiles = new Entry[files.length - lastIndex + index + 1];
- System.arraycopy(files,0,newFiles,0,index + 1);
- System.arraycopy(files,lastIndex,newFiles,index + 1,
- files.length - lastIndex);
-
- files = newFiles;
-
- /* fireTableRowsUpdated(index,index);
- fireTableRowsDeleted(index + 1,lastIndex); */
-
- fireTableStructureChanged();
- } //}}}
-
- //{{{ getColumnCount() method
- public int getColumnCount()
- {
- return 1 + extAttrs.size();
- } //}}}
-
- //{{{ getRowCount() method
- public int getRowCount()
- {
- if(files == null)
- return 0;
- else
- return files.length;
- } //}}}
-
- //{{{ getColumnName() method
- public String getColumnName(int col)
- {
- if(col == 0)
- return jEdit.getProperty("vfs.browser.name");
- else
- return jEdit.getProperty("vfs.browser." + getExtendedAttribute(col));
- } //}}}
-
- //{{{ getColumnClass() method
- public Class getColumnClass(int col)
- {
- return Entry.class;
- } //}}}
-
- //{{{ getValueAt() method
- public Object getValueAt(int row, int col)
- {
- if(files == null)
- return null;
- else
- return files[row];
- } //}}}
-
- //{{{ getAscending() method
- public boolean getAscending()
- {
- return ascending;
- } //}}}
-
- //{{{ getSortColumn() method
- public int getSortColumn()
- {
- return sortColumn;
- } //}}}
-
- //{{{ getSortAttribute() method
- public String getSortAttribute(int column)
- {
- return column == 0 ? "name" : getExtendedAttribute(column);
- } //}}}
-
- //{{{ sortByColumn() method
- public boolean sortByColumn(int column)
- {
- // toggle ascending/descending if column was clicked again
- ascending = sortColumn != column || !ascending;
-
- // we don't sort by some attributes
- String sortBy = getSortAttribute(column);
- if(sortBy == VFS.EA_STATUS)
- return false;
-
- Arrays.sort(files, new EntryCompare(sortBy, ascending));
-
- // remember column
- sortColumn = column;
- fireTableStructureChanged();
-
- return true;
- } //}}}
-
- //{{{ getExtendedAttribute() method
- public String getExtendedAttribute(int index)
- {
- return extAttrs.get(index - 1).name;
- } //}}}
-
- //{{{ getColumnWidth() method
- /**
- * @param i The column index
- * @return A saved column width
- * @since jEdit 4.3pre2
- */
- public int getColumnWidth(int i)
- {
- String extAttr = getExtendedAttribute(i);
- return jEdit.getIntegerProperty("vfs.browser."
- + extAttr + ".width",100);
- } //}}}
-
- //{{{ setColumnWidth() method
- /**
- * @param i The column index
- * @param w The column width
- * @since jEdit 4.3pre2
- */
- public void setColumnWidth(int i, int w)
- {
- String extAttr = getExtendedAttribute(i);
- jEdit.setIntegerProperty("vfs.browser."
- + extAttr + ".width",w);
- } //}}}
-
- //{{{ getFiles() method
- public VFSFile[] getFiles()
- {
- VFSFile[] f = new VFSFile[files.length];
- for(int i = 0; i < f.length; i++)
- f[i] = files[i].dirEntry;
- return f;
- } //}}}
-
- //{{{ Package-private members
- Entry[] files;
- //}}}
-
- //{{{ Private members
- private List<ExtendedAttribute> extAttrs;
- private int sortColumn;
- private boolean ascending;
-
- //{{{ addExtendedAttributes() method
- private void addExtendedAttributes(VFS vfs)
- {
- String[] attrs = vfs.getExtendedAttributes();
-vfs_attr_loop: for(int i = 0; i < attrs.length; i++)
- {
- for (ExtendedAttribute attr : extAttrs)
- {
- if (attrs[i].equals(attr.name))
- {
- attr.ref++;
- continue vfs_attr_loop;
- }
- }
-
- // this vfs has an extended attribute which is not
- // in the list. add it to the end with a ref count
- // of 1
- extAttrs.add(new ExtendedAttribute(attrs[i]));
- }
- } //}}}
-
- //{{{ removeExtendedAttributes() method
- private void removeExtendedAttributes(VFS vfs)
- {
- String[] attrs = vfs.getExtendedAttributes();
-vfs_attr_loop: for(int i = 0; i < attrs.length; i++)
- {
- Iterator<ExtendedAttribute> iter = extAttrs.iterator();
- while(iter.hasNext())
- {
- ExtendedAttribute attr = iter.next();
- if(attrs[i].equals(attr.name))
- {
- if(--attr.ref == 0)
- {
- // we no longer have any
- // dirs using this extended
- // attribute
- iter.remove();
- }
-
- continue vfs_attr_loop;
- }
- }
-
- // this vfs has an extended attribute which is not
- // in the list ???
- Log.log(Log.WARNING,this,"We forgot about " + attrs[i]);
- }
- } //}}}
-
- //}}}
-
- //{{{ Entry class
- static class Entry
- {
- VFSFile dirEntry;
- // is this branch an expanded dir?
- boolean expanded;
- // how deeply we are nested
- int level;
- // parent entry
- Entry parent;
- // file extension
- String extension;
-
- Entry(VFSFile dirEntry, int level, Entry parent)
- {
- this(dirEntry,level);
- this.parent = parent;
- }
-
- Entry(VFSFile dirEntry, int level)
- {
- this.dirEntry = dirEntry;
- this.level = level;
- this.extension = MiscUtilities.getFileExtension(dirEntry.getName());
- }
-
-
- } //}}}
-
- //{{{ ExtendedAttribute class
- static class ExtendedAttribute
- {
- /* reference counter allows us to remove a column from
- * the table when no directory using this column is
- * visible */
- int ref;
-
- String name;
-
- ExtendedAttribute(String name)
- {
- this.name = name;
- ref = 1;
- }
- } //}}}
-
- //{{{ EntryCompare class
- /**
- * Implementation of {@link Comparator}
- * interface that compares {@link VFSDirectoryEntryTableModel.Entry} instances.
- * For sorting columns in the VFS Browser.
- * @since jEdit 4.3pre7
- */
- static class EntryCompare implements Comparator<Entry>
- {
- private boolean sortIgnoreCase, sortMixFilesAndDirs, sortAscending;
- private String sortAttribute;
- /**
- * Creates a new <code>EntryCompare</code>
- * Expanded branches are sorted, too, but keep with their parent entries
- * @param sortBy The extended attribute by which to sort the entries.
- * @param ascending If false, sort order is reversed.
- */
- EntryCompare(String sortBy, boolean ascending)
- {
- this.sortMixFilesAndDirs = jEdit.getBooleanProperty(
- "vfs.browser.sortMixFilesAndDirs");
- this.sortIgnoreCase = jEdit.getBooleanProperty(
- "vfs.browser.sortIgnoreCase");
- this.sortAscending = ascending;
- this.sortAttribute = sortBy;
- }
-
- public int compare(Entry entry1, Entry entry2)
- {
- // we want to compare sibling ancestors of the entries
- if(entry1.level < entry2.level)
- return compare(entry1, entry2.parent);
- if(entry1.level > entry2.level)
- return compare(entry1.parent, entry2);
-
- // here we have entries of the same level
- if(entry1.parent != entry2.parent)
- return compare(entry1.parent, entry2.parent);
-
- // here we have siblings with the same parents
- // let's do the real comparison
-
- VFSFile file1 = entry1.dirEntry;
- VFSFile file2 = entry2.dirEntry;
-
- if(!sortMixFilesAndDirs)
- {
- if(file1.getType() != file2.getType())
- return file2.getType() - file1.getType();
- }
-
- int result;
-
- // if the modified attribute is present, then we have a LocalFile
- if(sortAttribute == VFS.EA_MODIFIED)
- result = (
- (Long)((FileVFS.LocalFile)file1).getModified())
- .compareTo(
- (Long)((FileVFS.LocalFile)file2).getModified());
- // sort by size
- else if(sortAttribute == VFS.EA_SIZE)
- result = (
- (Long)file1.getLength())
- .compareTo(
- (Long)file2.getLength());
- // sort by type (= extension)
- else if(sortAttribute == VFS.EA_TYPE)
- result = StandardUtilities.compareStrings(
- entry1.extension,
- entry2.extension,
- sortIgnoreCase);
- // default: sort by name
- else
- result = StandardUtilities.compareStrings(
- file1.getName(),
- file2.getName(),
- sortIgnoreCase);
- return sortAscending ? result : -result;
- }
- } //}}}
-}
+/*
+ * VFSDirectoryEntryTableModel.java - VFS directory entry table model
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import javax.swing.table.*;
+import java.util.*;
+import org.gjt.sp.jedit.io.FileVFS;
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.jedit.io.VFSFile;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: VFSDirectoryEntryTableModel.java 14450 2009-01-24 22:56:40Z kpouer $
+ * @since jEdit 4.2pre1
+ */
+public class VFSDirectoryEntryTableModel extends AbstractTableModel
+{
+ //{{{ VFSDirectoryEntryTableModel constructor
+ public VFSDirectoryEntryTableModel()
+ {
+ extAttrs = new ArrayList<ExtendedAttribute>();
+ sortColumn = 0;
+ ascending = true;
+ } //}}}
+
+ //{{{ setRoot() method
+ public void setRoot(VFS vfs, List<VFSFile> list)
+ {
+ extAttrs.clear();
+ addExtendedAttributes(vfs);
+
+ /* if(files != null && files.length != 0)
+ fireTableRowsDeleted(0,files.length - 1); */
+
+ files = new Entry[list.size()];
+ for(int i = 0; i < files.length; i++)
+ {
+ files[i] = new Entry(list.get(i),0);
+ }
+
+ /* if(files.length != 0)
+ fireTableRowsInserted(0,files.length - 1); */
+
+ Arrays.sort(files, new EntryCompare(getSortAttribute(sortColumn), ascending));
+ fireTableStructureChanged();
+ } //}}}
+
+ //{{{ expand() method
+ public int expand(VFS vfs, Entry entry, List<VFSFile> list)
+ {
+ int startIndex = -1;
+ for(int i = 0; i < files.length; i++)
+ {
+ if(files[i] == entry)
+ startIndex = i;
+ }
+ if (startIndex != -1)
+ collapse(vfs,startIndex);
+
+ addExtendedAttributes(vfs);
+ entry.expanded = true;
+
+ if(list != null)
+ {
+ // make a large enough destination array
+ Entry[] newFiles = new Entry[files.length + list.size()];
+ Entry[] subdirFiles = new Entry[list.size()];
+
+ for(int i = 0; i < list.size(); i++)
+ {
+ subdirFiles[i] = new Entry(
+ list.get(i),entry.level + 1,entry);
+ }
+
+ // sort expanded entries according to current sort params
+ Arrays.sort(subdirFiles, new EntryCompare(
+ getSortAttribute(sortColumn), ascending));
+
+ // make room after expanded entry for subdir files
+ int nextIndex = startIndex + 1;
+ System.arraycopy(files,0,newFiles,0,nextIndex);
+ System.arraycopy(subdirFiles,0,newFiles,nextIndex,list.size());
+ System.arraycopy(files,nextIndex,newFiles,nextIndex + list.size(),
+ files.length - nextIndex);
+
+ this.files = newFiles;
+
+ /* fireTableRowsInserted(startIndex + 1,
+ startIndex + list.size() + 1); */
+ }
+
+ /* fireTableRowsUpdated(startIndex,startIndex); */
+
+ fireTableStructureChanged();
+
+ return startIndex;
+ } //}}}
+
+ //{{{ collapse() method
+ public void collapse(VFS vfs, int index)
+ {
+ Entry entry = files[index];
+ if(!entry.expanded)
+ return;
+
+ entry.expanded = false;
+
+ int lastIndex = index + 1;
+ while(lastIndex < files.length)
+ {
+ Entry e = files[lastIndex];
+
+ if(e.level <= entry.level)
+ break;
+
+ lastIndex++;
+
+ if(e.expanded)
+ {
+ removeExtendedAttributes(VFSManager.getVFSForPath(
+ e.dirEntry.getPath()));
+ }
+ }
+
+ removeExtendedAttributes(vfs);
+
+ Entry[] newFiles = new Entry[files.length - lastIndex + index + 1];
+ System.arraycopy(files,0,newFiles,0,index + 1);
+ System.arraycopy(files,lastIndex,newFiles,index + 1,
+ files.length - lastIndex);
+
+ files = newFiles;
+
+ /* fireTableRowsUpdated(index,index);
+ fireTableRowsDeleted(index + 1,lastIndex); */
+
+ fireTableStructureChanged();
+ } //}}}
+
+ //{{{ getColumnCount() method
+ public int getColumnCount()
+ {
+ return 1 + extAttrs.size();
+ } //}}}
+
+ //{{{ getRowCount() method
+ public int getRowCount()
+ {
+ if(files == null)
+ return 0;
+ else
+ return files.length;
+ } //}}}
+
+ //{{{ getColumnName() method
+ public String getColumnName(int col)
+ {
+ if(col == 0)
+ return jEdit.getProperty("vfs.browser.name");
+ else
+ return jEdit.getProperty("vfs.browser." + getExtendedAttribute(col));
+ } //}}}
+
+ //{{{ getColumnClass() method
+ public Class getColumnClass(int col)
+ {
+ return Entry.class;
+ } //}}}
+
+ //{{{ getValueAt() method
+ public Object getValueAt(int row, int col)
+ {
+ if(files == null)
+ return null;
+ else
+ return files[row];
+ } //}}}
+
+ //{{{ getAscending() method
+ public boolean getAscending()
+ {
+ return ascending;
+ } //}}}
+
+ //{{{ getSortColumn() method
+ public int getSortColumn()
+ {
+ return sortColumn;
+ } //}}}
+
+ //{{{ getSortAttribute() method
+ public String getSortAttribute(int column)
+ {
+ return column == 0 ? "name" : getExtendedAttribute(column);
+ } //}}}
+
+ //{{{ sortByColumn() method
+ public boolean sortByColumn(int column)
+ {
+ // toggle ascending/descending if column was clicked again
+ ascending = sortColumn != column || !ascending;
+
+ // we don't sort by some attributes
+ String sortBy = getSortAttribute(column);
+ if(sortBy == VFS.EA_STATUS)
+ return false;
+
+ Arrays.sort(files, new EntryCompare(sortBy, ascending));
+
+ // remember column
+ sortColumn = column;
+ fireTableStructureChanged();
+
+ return true;
+ } //}}}
+
+ //{{{ getExtendedAttribute() method
+ public String getExtendedAttribute(int index)
+ {
+ return extAttrs.get(index - 1).name;
+ } //}}}
+
+ //{{{ getColumnWidth() method
+ /**
+ * @param i The column index
+ * @return A saved column width
+ * @since jEdit 4.3pre2
+ */
+ public int getColumnWidth(int i)
+ {
+ String extAttr = getExtendedAttribute(i);
+ return jEdit.getIntegerProperty("vfs.browser."
+ + extAttr + ".width",100);
+ } //}}}
+
+ //{{{ setColumnWidth() method
+ /**
+ * @param i The column index
+ * @param w The column width
+ * @since jEdit 4.3pre2
+ */
+ public void setColumnWidth(int i, int w)
+ {
+ String extAttr = getExtendedAttribute(i);
+ jEdit.setIntegerProperty("vfs.browser."
+ + extAttr + ".width",w);
+ } //}}}
+
+ //{{{ getFiles() method
+ public VFSFile[] getFiles()
+ {
+ VFSFile[] f = new VFSFile[files.length];
+ for(int i = 0; i < f.length; i++)
+ f[i] = files[i].dirEntry;
+ return f;
+ } //}}}
+
+ //{{{ Package-private members
+ Entry[] files;
+ //}}}
+
+ //{{{ Private members
+ private List<ExtendedAttribute> extAttrs;
+ private int sortColumn;
+ private boolean ascending;
+
+ //{{{ addExtendedAttributes() method
+ private void addExtendedAttributes(VFS vfs)
+ {
+ String[] attrs = vfs.getExtendedAttributes();
+vfs_attr_loop: for(int i = 0; i < attrs.length; i++)
+ {
+ for (ExtendedAttribute attr : extAttrs)
+ {
+ if (attrs[i].equals(attr.name))
+ {
+ attr.ref++;
+ continue vfs_attr_loop;
+ }
+ }
+
+ // this vfs has an extended attribute which is not
+ // in the list. add it to the end with a ref count
+ // of 1
+ extAttrs.add(new ExtendedAttribute(attrs[i]));
+ }
+ } //}}}
+
+ //{{{ removeExtendedAttributes() method
+ private void removeExtendedAttributes(VFS vfs)
+ {
+ String[] attrs = vfs.getExtendedAttributes();
+vfs_attr_loop: for(int i = 0; i < attrs.length; i++)
+ {
+ Iterator<ExtendedAttribute> iter = extAttrs.iterator();
+ while(iter.hasNext())
+ {
+ ExtendedAttribute attr = iter.next();
+ if(attrs[i].equals(attr.name))
+ {
+ if(--attr.ref == 0)
+ {
+ // we no longer have any
+ // dirs using this extended
+ // attribute
+ iter.remove();
+ }
+
+ continue vfs_attr_loop;
+ }
+ }
+
+ // this vfs has an extended attribute which is not
+ // in the list ???
+ Log.log(Log.WARNING,this,"We forgot about " + attrs[i]);
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Entry class
+ static class Entry
+ {
+ VFSFile dirEntry;
+ // is this branch an expanded dir?
+ boolean expanded;
+ // how deeply we are nested
+ int level;
+ // parent entry
+ Entry parent;
+ // file extension
+ String extension;
+
+ Entry(VFSFile dirEntry, int level, Entry parent)
+ {
+ this(dirEntry,level);
+ this.parent = parent;
+ }
+
+ Entry(VFSFile dirEntry, int level)
+ {
+ this.dirEntry = dirEntry;
+ this.level = level;
+ this.extension = MiscUtilities.getFileExtension(dirEntry.getName());
+ }
+
+
+ } //}}}
+
+ //{{{ ExtendedAttribute class
+ static class ExtendedAttribute
+ {
+ /* reference counter allows us to remove a column from
+ * the table when no directory using this column is
+ * visible */
+ int ref;
+
+ String name;
+
+ ExtendedAttribute(String name)
+ {
+ this.name = name;
+ ref = 1;
+ }
+ } //}}}
+
+ //{{{ EntryCompare class
+ /**
+ * Implementation of {@link Comparator}
+ * interface that compares {@link VFSDirectoryEntryTableModel.Entry} instances.
+ * For sorting columns in the VFS Browser.
+ * @since jEdit 4.3pre7
+ */
+ static class EntryCompare implements Comparator<Entry>
+ {
+ private boolean sortIgnoreCase, sortMixFilesAndDirs, sortAscending;
+ private String sortAttribute;
+ /**
+ * Creates a new <code>EntryCompare</code>
+ * Expanded branches are sorted, too, but keep with their parent entries
+ * @param sortBy The extended attribute by which to sort the entries.
+ * @param ascending If false, sort order is reversed.
+ */
+ EntryCompare(String sortBy, boolean ascending)
+ {
+ this.sortMixFilesAndDirs = jEdit.getBooleanProperty(
+ "vfs.browser.sortMixFilesAndDirs");
+ this.sortIgnoreCase = jEdit.getBooleanProperty(
+ "vfs.browser.sortIgnoreCase");
+ this.sortAscending = ascending;
+ this.sortAttribute = sortBy;
+ }
+
+ public int compare(Entry entry1, Entry entry2)
+ {
+ // we want to compare sibling ancestors of the entries
+ if(entry1.level < entry2.level)
+ return compare(entry1, entry2.parent);
+ if(entry1.level > entry2.level)
+ return compare(entry1.parent, entry2);
+
+ // here we have entries of the same level
+ if(entry1.parent != entry2.parent)
+ return compare(entry1.parent, entry2.parent);
+
+ // here we have siblings with the same parents
+ // let's do the real comparison
+
+ VFSFile file1 = entry1.dirEntry;
+ VFSFile file2 = entry2.dirEntry;
+
+ if(!sortMixFilesAndDirs)
+ {
+ if(file1.getType() != file2.getType())
+ return file2.getType() - file1.getType();
+ }
+
+ int result;
+
+ // if the modified attribute is present, then we have a LocalFile
+ if(sortAttribute == VFS.EA_MODIFIED)
+ result = (
+ (Long)((FileVFS.LocalFile)file1).getModified())
+ .compareTo(
+ (Long)((FileVFS.LocalFile)file2).getModified());
+ // sort by size
+ else if(sortAttribute == VFS.EA_SIZE)
+ result = (
+ (Long)file1.getLength())
+ .compareTo(
+ (Long)file2.getLength());
+ // sort by type (= extension)
+ else if(sortAttribute == VFS.EA_TYPE)
+ result = StandardUtilities.compareStrings(
+ entry1.extension,
+ entry2.extension,
+ sortIgnoreCase);
+ // default: sort by name
+ else
+ result = StandardUtilities.compareStrings(
+ file1.getName(),
+ file2.getName(),
+ sortIgnoreCase);
+ return sortAscending ? result : -result;
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java b/jEdit/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java
index c27ff92..31462f9 100644
--- a/jEdit/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java
+++ b/jEdit/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java
@@ -1,592 +1,595 @@
-/*
- * VFSFileChooserDialog.java - VFS file chooser
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-//{{{ Imports
-import javax.swing.border.EmptyBorder;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.BorderLayout;
-import java.awt.Cursor;
-import java.awt.Dimension;
-import java.awt.Dialog;
-import java.awt.Frame;
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-import org.gjt.sp.jedit.gui.EnhancedDialog;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * Wraps the VFS browser in a modal dialog.
- * Shows up when "File-Open" is used.
- * @author Slava Pestov
- * @version $Id: VFSFileChooserDialog.java 16560 2009-11-29 19:06:17Z kerik-sf $
- */
-public class VFSFileChooserDialog extends EnhancedDialog
-{
-
- //{{{ VFSFileChooserDialog constructor
- public VFSFileChooserDialog(View view, String path,
- int mode, boolean multipleSelection)
- {
- this(view,path,mode,multipleSelection,true);
- } //}}}
-
- //{{{ VFSFileChooserDialog constructor
- /**
- * Constructs a new VFSFileChooserDialog. If <code>authoshow</code>
- * is true, the dialog will be show automatically and the call
- * will only return after the user disposes of the dialog.
- *
- * @since jEdit 4.3pre7
- */
- public VFSFileChooserDialog(View view, String path,
- int mode, boolean multipleSelection, boolean autoshow)
- {
- super(view,getDefaultTitle(),true);
- setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
- _init(view,path,mode,multipleSelection,autoshow);
- } //}}}
-
- //{{{ VFSFileChooserDialog constructor
- /**
- * Constructs a new VFSFileChooserDialog.
- * This version can specify a dialog as the parent instead
- * of the view.
- * @since jEdit 4.3pre10
- */
- public VFSFileChooserDialog(Dialog parent, View view, String path,
- int mode, boolean multipleSelection, boolean autoshow)
- {
- super(parent,getDefaultTitle(),true);
- setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
- _init(view,path,mode,multipleSelection,autoshow);
- } //}}}
-
- /**
- * Constructs a new VFSFileChooserDialog.
- * This version can specify a Frame as the parent instead
- * of the view.
- * @since jEdit 4.3pre10
- */
- public VFSFileChooserDialog(Frame parent, View view, String path,
- int mode, boolean multipleSelection, boolean autoshow)
- {
- super(parent, getDefaultTitle(),true);
- setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
- _init(view,path,mode,multipleSelection,autoshow);
- } //}}}
-
-
- //{{{ getBrowser() method
- /**
- * Returns the VFSBrowser instance used internally.
- * @return the VFS browser used in the dialog
- * @since jEdit 4.3pre7
- */
- public VFSBrowser getBrowser()
- {
- return browser;
- } //}}}
-
- //{{{ dispose() method
- @Override
- public void dispose()
- {
- GUIUtilities.saveGeometry(this,"vfs.browser.dialog");
- VFSManager.getIOThreadPool().removeProgressListener(workThreadHandler);
- super.dispose();
- } //}}}
-
- //{{{ ok() method
- @Override
- public void ok()
- {
- VFSFile[] files = browser.getSelectedFiles();
- filename = filenameField.getText();
- boolean choosingDir = (browser.getMode() ==
- VFSBrowser.CHOOSE_DIRECTORY_DIALOG);
-
- if(files.length != 0)
- {
- if(choosingDir)
- {
- isOK = true;
- dispose();
- }
- else
- browser.filesActivated(VFSBrowser.M_OPEN,false);
- return;
- }
- else if(choosingDir && (filename == null || filename.length() == 0))
- {
- isOK = true;
- dispose();
- return;
- }
- else if(filename == null || filename.length() == 0)
- {
- getToolkit().beep();
- return;
- }
-
- String bufferDir = browser.getView().getBuffer()
- .getDirectory();
- if(filename.equals("-"))
- filename = bufferDir;
- else if(filename.startsWith("-/")
- || filename.startsWith('-' + File.separator))
- {
- filename = MiscUtilities.constructPath(
- bufferDir,filename.substring(2));
- }
-
- final int[] type = { -1 };
- filename = MiscUtilities.expandVariables(filename);
- final String path = MiscUtilities.constructPath(
- browser.getDirectory(),filename);
- final VFS vfs = VFSManager.getVFSForPath(path);
- Object session = vfs.createVFSSession(path,this);
- if(session == null)
- return;
-
- VFSManager.runInWorkThread(new GetFileTypeRequest(
- vfs,session,path,type));
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- switch(type[0])
- {
- case VFSFile.FILE:
- if(browser.getMode() == VFSBrowser.CHOOSE_DIRECTORY_DIALOG)
- break;
-
- if(vfs instanceof FileVFS)
- {
- if(doFileExistsWarning(path))
- break;
- }
- isOK = true;
- if(browser.getMode() == VFSBrowser.BROWSER_DIALOG)
- {
- Hashtable props = new Hashtable();
- props.put(JEditBuffer.ENCODING,browser.currentEncoding);
- jEdit.openFile(browser.getView(),
- browser.getDirectory(),
- path,false,props);
- }
- dispose();
- break;
- case VFSFile.DIRECTORY:
- case VFSFile.FILESYSTEM:
- browser.setDirectory(path);
- break;
- }
- }
- });
- } //}}}
-
- //{{{ cancel() method
- @Override
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ getSelectedFiles() method
- public String[] getSelectedFiles()
- {
- if(!isOK)
- return null;
-
- if(browser.getMode() == VFSBrowser.CHOOSE_DIRECTORY_DIALOG)
- {
- if(browser.getSelectedFiles().length > 0)
- {
- return getSelectedFiles(VFSFile.DIRECTORY,
- VFSFile.FILESYSTEM);
- }
- else
- return new String[] { browser.getDirectory() };
- }
- else if(filename != null && filename.length() != 0)
- {
- String path = browser.getDirectory();
- return new String[] { MiscUtilities.constructPath(
- path,filename) };
- }
- else
- return getSelectedFiles(VFSFile.FILE,VFSFile.FILE);
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private VFSBrowser browser;
- private VFSFileNameField filenameField;
- private String filename;
- private JButton ok;
- private JButton cancel;
- private boolean isOK;
- private WorkThreadHandler workThreadHandler;
- //}}}
-
- //{{{ getDefaultTitle() method
- private static String getDefaultTitle()
- {
- return jEdit.getProperty("vfs.browser.title");
- }// }}}
-
- //{{{ _init method
- private void _init(View view, String path,
- int mode, boolean multipleSelection, boolean autoshow)
- {
- JPanel content = new JPanel(new BorderLayout());
- setContentPane(content);
-
- String name;
- if(mode == VFSBrowser.CHOOSE_DIRECTORY_DIALOG)
- name = null;
- else if(path == null || path.endsWith(File.separator)
- || path.endsWith("/"))
- {
- name = null;
- }
- else
- {
- VFS vfs = VFSManager.getVFSForPath(path);
- name = vfs.getFileName(path);
- path = vfs.getParentOfPath(path);
- if ((vfs.getCapabilities() & VFS.BROWSE_CAP) == 0)
- {
- path = null;
- }
- }
-
- browser = new VFSBrowser(view, path, mode, multipleSelection, null);
-
- browser.addBrowserListener(new BrowserHandler());
- content.add(BorderLayout.CENTER,browser);
-
- JPanel panel = new JPanel();
- panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
- panel.setBorder(new EmptyBorder(12,12,12,12));
-
- filenameField = new VFSFileNameField(browser,null);
- filenameField.setText(name);
- filenameField.selectAll();
- filenameField.setName("filename");
- browser.setDefaultFocusComponent(filenameField);
- Box box = new Box(BoxLayout.Y_AXIS);
- box.add(Box.createGlue());
- box.add(filenameField);
- box.add(Box.createGlue());
-
- JLabel label = new JLabel(jEdit.getProperty("vfs.browser.dialog.filename"));
- label.setDisplayedMnemonic(jEdit.getProperty(
- "vfs.browser.dialog.filename.mnemonic").charAt(0));
- label.setLabelFor(filenameField);
- panel.add(label);
- panel.add(Box.createHorizontalStrut(12));
-
- panel.add(box);
-
- panel.add(Box.createHorizontalStrut(12));
-
- ok = new JButton();
- ok.setName("ok");
- getRootPane().setDefaultButton(ok);
-
- switch(mode)
- {
- case VFSBrowser.OPEN_DIALOG:
- case VFSBrowser.BROWSER_DIALOG:
- ok.setText(jEdit.getProperty("vfs.browser.dialog.open"));
- break;
- case VFSBrowser.CHOOSE_DIRECTORY_DIALOG:
- ok.setText(jEdit.getProperty("vfs.browser.dialog.choose-dir"));
- // so that it doesn't resize...
- Dimension dim = ok.getPreferredSize();
- ok.setPreferredSize(dim);
- break;
- case VFSBrowser.SAVE_DIALOG:
- ok.setText(jEdit.getProperty("vfs.browser.dialog.save"));
- break;
- }
-
- ok.addActionListener(new ActionHandler());
- panel.add(ok);
- panel.add(Box.createHorizontalStrut(6));
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.setName("cancel");
- cancel.addActionListener(new ActionHandler());
- panel.add(cancel);
-
- content.add(BorderLayout.SOUTH,panel);
-
- VFSManager.getIOThreadPool().addProgressListener(
- workThreadHandler = new WorkThreadHandler());
-
- pack();
- GUIUtilities.loadGeometry(this,"vfs.browser.dialog");
- GUIUtilities.requestFocus(this,filenameField);
- if (autoshow)
- setVisible(true);
- } //}}}
-
-
-
- //{{{ doFileExistsWarning() method
- private boolean doFileExistsWarning(String filename)
- {
- if(browser.getMode() == VFSBrowser.SAVE_DIALOG
- && new File(filename).exists())
- {
- String[] args = { MiscUtilities.getFileName(filename) };
- int result = GUIUtilities.confirm(browser,
- "fileexists",args,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
- if(result != JOptionPane.YES_OPTION)
- return true;
- }
-
- return false;
- } //}}}
-
- //{{{ getSelectedFiles() method
- private String[] getSelectedFiles(int type1, int type2)
- {
- List<String> l = new ArrayList<String>();
- VFSFile[] selectedFiles = browser.getSelectedFiles();
- for(int i = 0; i < selectedFiles.length; i++)
- {
- VFSFile file = selectedFiles[i];
- if(file.getType() == type1 || file.getType() == type2)
- l.add(file.getPath());
- }
- return l.toArray(new String[l.size()]);
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == ok)
- ok();
- else if(evt.getSource() == cancel)
- cancel();
- }
- } //}}}
-
- //{{{ BrowserHandler class
- private class BrowserHandler implements BrowserListener
- {
- //{{{ filesSelected() method
- public void filesSelected(VFSBrowser browser, VFSFile[] files)
- {
- boolean choosingDir = (browser.getMode()
- == VFSBrowser.CHOOSE_DIRECTORY_DIALOG);
-
- if(files.length == 0)
- {
- if(choosingDir)
- {
- ok.setText(jEdit.getProperty(
- "vfs.browser.dialog.choose-dir"));
- }
- }
- else if(files.length == 1)
- {
- if(choosingDir)
- {
- ok.setText(jEdit.getProperty(
- "vfs.browser.dialog.choose-dir"));
- }
-
- VFSFile file = files[0];
- if(file.getType() == VFSFile.FILE)
- {
- String path = file.getPath();
- String directory = browser.getDirectory();
- String parent = MiscUtilities
- .getParentOfPath(path);
- if(MiscUtilities.pathsEqual(parent,directory))
- path = file.getName();
-
- filenameField.setText(path);
- filenameField.selectAll();
- }
- }
- else
- {
- if(choosingDir)
- {
- ok.setText(jEdit.getProperty(
- "vfs.browser.dialog.choose-dir"));
- }
-
- filenameField.setText(null);
- }
- } //}}}
-
- //{{{ filesActivated() method
- public void filesActivated(VFSBrowser browser, VFSFile[] files)
- {
- filenameField.selectAll();
-
- if(files.length == 0)
- {
- // user pressed enter when the vfs table or
- // file name field has focus, with nothing
- // selected.
- ok();
- return;
- }
-
- for(int i = 0; i < files.length; i++)
- {
- if(files[i].getType() == VFSFile.FILE)
- {
- String path = files[i].getPath();
- VFS vfs = VFSManager.getVFSForPath(path);
- if(browser.getMode() == VFSBrowser.SAVE_DIALOG
- && vfs instanceof FileVFS)
- {
- if(doFileExistsWarning(path))
- return;
- }
-
- isOK = true;
- filenameField.setText(null);
- if(browser.getMode() != VFSBrowser.CHOOSE_DIRECTORY_DIALOG)
- {
- dispose();
- }
- return;
- }
- else
- return;
- }
- } //}}}
- } //}}}
-
- //{{{ WorkThreadListener class
- private class WorkThreadHandler implements WorkThreadProgressListener
- {
- //{{{ statusUpdate() method
- public void statusUpdate(final WorkThreadPool threadPool,
- int threadIndex)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- int requestCount = threadPool.getRequestCount();
- if(requestCount == 0)
- {
- getContentPane().setCursor(
- Cursor.getDefaultCursor());
- }
- else if(requestCount >= 1)
- {
- getContentPane().setCursor(
- Cursor.getPredefinedCursor(
- Cursor.WAIT_CURSOR));
- }
- }
- });
- } //}}}
-
- //{{{ progressUpdate() method
- public void progressUpdate(WorkThreadPool threadPool, int threadIndex)
- {
- } //}}}
- } //}}}
-
- //{{{ GetFileTypeRequest class
- private class GetFileTypeRequest implements Runnable
- {
- VFS vfs;
- Object session;
- String path;
- int[] type;
-
- GetFileTypeRequest(VFS vfs, Object session,
- String path, int[] type)
- {
- this.vfs = vfs;
- this.session = session;
- this.path = path;
- this.type = type;
- }
-
- public void run()
- {
- try
- {
- VFSFile entry = vfs._getFile(
- session,
- path,
- browser);
- if(entry == null)
- {
- // non-existent file
- type[0] = VFSFile.FILE;
- }
- else
- type[0] = entry.getType();
- }
- catch(IOException e)
- {
- VFSManager.error(e,path,browser);
- }
- finally
- {
- try
- {
- vfs._endVFSSession(
- session,
- browser);
- }
- catch(IOException e)
- {
- VFSManager.error(e,path,browser);
- }
- }
- }
- } //}}}
-
- //}}}
-}
+/*
+ * VFSFileChooserDialog.java - VFS file chooser
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import javax.swing.border.EmptyBorder;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.BorderLayout;
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+import org.gjt.sp.jedit.gui.EnhancedDialog;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * Wraps the VFS browser in a modal dialog.
+ * Shows up when "File-Open" is used.
+ * @author Slava Pestov
+ * @version $Id: VFSFileChooserDialog.java 17393 2010-02-27 12:13:39Z k_satoda $
+ */
+public class VFSFileChooserDialog extends EnhancedDialog
+{
+
+ //{{{ VFSFileChooserDialog constructor
+ public VFSFileChooserDialog(View view, String path,
+ int mode, boolean multipleSelection)
+ {
+ this(view,path,mode,multipleSelection,true);
+ } //}}}
+
+ //{{{ VFSFileChooserDialog constructor
+ /**
+ * Constructs a new VFSFileChooserDialog. If <code>authoshow</code>
+ * is true, the dialog will be show automatically and the call
+ * will only return after the user disposes of the dialog.
+ *
+ * @since jEdit 4.3pre7
+ */
+ public VFSFileChooserDialog(View view, String path,
+ int mode, boolean multipleSelection, boolean autoshow)
+ {
+ super(view,getDefaultTitle(),true);
+ setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
+ _init(view,path,mode,multipleSelection,autoshow);
+ } //}}}
+
+ //{{{ VFSFileChooserDialog constructor
+ /**
+ * Constructs a new VFSFileChooserDialog.
+ * This version can specify a dialog as the parent instead
+ * of the view.
+ * @since jEdit 4.3pre10
+ */
+ public VFSFileChooserDialog(Dialog parent, View view, String path,
+ int mode, boolean multipleSelection, boolean autoshow)
+ {
+ super(parent,getDefaultTitle(),true);
+ setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
+ _init(view,path,mode,multipleSelection,autoshow);
+ } //}}}
+
+ /**
+ * Constructs a new VFSFileChooserDialog.
+ * This version can specify a Frame as the parent instead
+ * of the view.
+ * @since jEdit 4.3pre10
+ */
+ public VFSFileChooserDialog(Frame parent, View view, String path,
+ int mode, boolean multipleSelection, boolean autoshow)
+ {
+ super(parent, getDefaultTitle(),true);
+ setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
+ _init(view,path,mode,multipleSelection,autoshow);
+ } //}}}
+
+
+ //{{{ getBrowser() method
+ /**
+ * Returns the VFSBrowser instance used internally.
+ * @return the VFS browser used in the dialog
+ * @since jEdit 4.3pre7
+ */
+ public VFSBrowser getBrowser()
+ {
+ return browser;
+ } //}}}
+
+ //{{{ dispose() method
+ @Override
+ public void dispose()
+ {
+ GUIUtilities.saveGeometry(this,"vfs.browser.dialog");
+ VFSManager.getIOThreadPool().removeProgressListener(workThreadHandler);
+ super.dispose();
+ } //}}}
+
+ //{{{ ok() method
+ @Override
+ public void ok()
+ {
+ VFSFile[] files = browser.getSelectedFiles();
+ filename = filenameField.getText();
+ boolean choosingDir = (browser.getMode() ==
+ VFSBrowser.CHOOSE_DIRECTORY_DIALOG);
+
+ if(files.length != 0)
+ {
+ if(choosingDir)
+ {
+ isOK = true;
+ dispose();
+ }
+ else
+ browser.filesActivated(VFSBrowser.M_OPEN,false);
+ return;
+ }
+ else if(choosingDir && (filename == null || filename.length() == 0))
+ {
+ isOK = true;
+ dispose();
+ return;
+ }
+ else if(filename == null || filename.length() == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ String bufferDir = browser.getView().getBuffer()
+ .getDirectory();
+ if(filename.equals("-"))
+ filename = bufferDir;
+ else if(filename.startsWith("-/")
+ || filename.startsWith('-' + File.separator))
+ {
+ filename = MiscUtilities.constructPath(
+ bufferDir,filename.substring(2));
+ }
+
+ final int[] type = { -1 };
+ filename = MiscUtilities.expandVariables(filename);
+ final String path = MiscUtilities.constructPath(
+ browser.getDirectory(),filename);
+ final VFS vfs = VFSManager.getVFSForPath(path);
+ Object session = vfs.createVFSSession(path,this);
+ if(session == null)
+ return;
+
+ VFSManager.runInWorkThread(new GetFileTypeRequest(
+ vfs,session,path,type));
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ switch(type[0])
+ {
+ case VFSFile.FILE:
+ if(browser.getMode() == VFSBrowser.CHOOSE_DIRECTORY_DIALOG)
+ break;
+
+ if(vfs instanceof FileVFS)
+ {
+ if(doFileExistsWarning(path))
+ break;
+ }
+ isOK = true;
+ if(browser.getMode() == VFSBrowser.BROWSER_DIALOG)
+ {
+ Hashtable props = new Hashtable();
+ if(browser.currentEncoding != null)
+ {
+ props.put(JEditBuffer.ENCODING,browser.currentEncoding);
+ }
+ jEdit.openFile(browser.getView(),
+ browser.getDirectory(),
+ path,false,props);
+ }
+ dispose();
+ break;
+ case VFSFile.DIRECTORY:
+ case VFSFile.FILESYSTEM:
+ browser.setDirectory(path);
+ break;
+ }
+ }
+ });
+ } //}}}
+
+ //{{{ cancel() method
+ @Override
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ getSelectedFiles() method
+ public String[] getSelectedFiles()
+ {
+ if(!isOK)
+ return null;
+
+ if(browser.getMode() == VFSBrowser.CHOOSE_DIRECTORY_DIALOG)
+ {
+ if(browser.getSelectedFiles().length > 0)
+ {
+ return getSelectedFiles(VFSFile.DIRECTORY,
+ VFSFile.FILESYSTEM);
+ }
+ else
+ return new String[] { browser.getDirectory() };
+ }
+ else if(filename != null && filename.length() != 0)
+ {
+ String path = browser.getDirectory();
+ return new String[] { MiscUtilities.constructPath(
+ path,filename) };
+ }
+ else
+ return getSelectedFiles(VFSFile.FILE,VFSFile.FILE);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private VFSBrowser browser;
+ private VFSFileNameField filenameField;
+ private String filename;
+ private JButton ok;
+ private JButton cancel;
+ private boolean isOK;
+ private WorkThreadHandler workThreadHandler;
+ //}}}
+
+ //{{{ getDefaultTitle() method
+ private static String getDefaultTitle()
+ {
+ return jEdit.getProperty("vfs.browser.title");
+ }// }}}
+
+ //{{{ _init method
+ private void _init(View view, String path,
+ int mode, boolean multipleSelection, boolean autoshow)
+ {
+ JPanel content = new JPanel(new BorderLayout());
+ setContentPane(content);
+
+ String name;
+ if(mode == VFSBrowser.CHOOSE_DIRECTORY_DIALOG)
+ name = null;
+ else if(path == null || path.endsWith(File.separator)
+ || path.endsWith("/"))
+ {
+ name = null;
+ }
+ else
+ {
+ VFS vfs = VFSManager.getVFSForPath(path);
+ name = vfs.getFileName(path);
+ path = vfs.getParentOfPath(path);
+ if ((vfs.getCapabilities() & VFS.BROWSE_CAP) == 0)
+ {
+ path = null;
+ }
+ }
+
+ browser = new VFSBrowser(view, path, mode, multipleSelection, null);
+
+ browser.addBrowserListener(new BrowserHandler());
+ content.add(BorderLayout.CENTER,browser);
+
+ JPanel panel = new JPanel();
+ panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
+ panel.setBorder(new EmptyBorder(12,12,12,12));
+
+ filenameField = new VFSFileNameField(browser,null);
+ filenameField.setText(name);
+ filenameField.selectAll();
+ filenameField.setName("filename");
+ browser.setDefaultFocusComponent(filenameField);
+ Box box = new Box(BoxLayout.Y_AXIS);
+ box.add(Box.createGlue());
+ box.add(filenameField);
+ box.add(Box.createGlue());
+
+ JLabel label = new JLabel(jEdit.getProperty("vfs.browser.dialog.filename"));
+ label.setDisplayedMnemonic(jEdit.getProperty(
+ "vfs.browser.dialog.filename.mnemonic").charAt(0));
+ label.setLabelFor(filenameField);
+ panel.add(label);
+ panel.add(Box.createHorizontalStrut(12));
+
+ panel.add(box);
+
+ panel.add(Box.createHorizontalStrut(12));
+
+ ok = new JButton();
+ ok.setName("ok");
+ getRootPane().setDefaultButton(ok);
+
+ switch(mode)
+ {
+ case VFSBrowser.OPEN_DIALOG:
+ case VFSBrowser.BROWSER_DIALOG:
+ ok.setText(jEdit.getProperty("vfs.browser.dialog.open"));
+ break;
+ case VFSBrowser.CHOOSE_DIRECTORY_DIALOG:
+ ok.setText(jEdit.getProperty("vfs.browser.dialog.choose-dir"));
+ // so that it doesn't resize...
+ Dimension dim = ok.getPreferredSize();
+ ok.setPreferredSize(dim);
+ break;
+ case VFSBrowser.SAVE_DIALOG:
+ ok.setText(jEdit.getProperty("vfs.browser.dialog.save"));
+ break;
+ }
+
+ ok.addActionListener(new ActionHandler());
+ panel.add(ok);
+ panel.add(Box.createHorizontalStrut(6));
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.setName("cancel");
+ cancel.addActionListener(new ActionHandler());
+ panel.add(cancel);
+
+ content.add(BorderLayout.SOUTH,panel);
+
+ VFSManager.getIOThreadPool().addProgressListener(
+ workThreadHandler = new WorkThreadHandler());
+
+ pack();
+ GUIUtilities.loadGeometry(this,"vfs.browser.dialog");
+ GUIUtilities.requestFocus(this,filenameField);
+ if (autoshow)
+ setVisible(true);
+ } //}}}
+
+
+
+ //{{{ doFileExistsWarning() method
+ private boolean doFileExistsWarning(String filename)
+ {
+ if(browser.getMode() == VFSBrowser.SAVE_DIALOG
+ && new File(filename).exists())
+ {
+ String[] args = { MiscUtilities.getFileName(filename) };
+ int result = GUIUtilities.confirm(browser,
+ "fileexists",args,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if(result != JOptionPane.YES_OPTION)
+ return true;
+ }
+
+ return false;
+ } //}}}
+
+ //{{{ getSelectedFiles() method
+ private String[] getSelectedFiles(int type1, int type2)
+ {
+ List<String> l = new ArrayList<String>();
+ VFSFile[] selectedFiles = browser.getSelectedFiles();
+ for(int i = 0; i < selectedFiles.length; i++)
+ {
+ VFSFile file = selectedFiles[i];
+ if(file.getType() == type1 || file.getType() == type2)
+ l.add(file.getPath());
+ }
+ return l.toArray(new String[l.size()]);
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == ok)
+ ok();
+ else if(evt.getSource() == cancel)
+ cancel();
+ }
+ } //}}}
+
+ //{{{ BrowserHandler class
+ private class BrowserHandler implements BrowserListener
+ {
+ //{{{ filesSelected() method
+ public void filesSelected(VFSBrowser browser, VFSFile[] files)
+ {
+ boolean choosingDir = (browser.getMode()
+ == VFSBrowser.CHOOSE_DIRECTORY_DIALOG);
+
+ if(files.length == 0)
+ {
+ if(choosingDir)
+ {
+ ok.setText(jEdit.getProperty(
+ "vfs.browser.dialog.choose-dir"));
+ }
+ }
+ else if(files.length == 1)
+ {
+ if(choosingDir)
+ {
+ ok.setText(jEdit.getProperty(
+ "vfs.browser.dialog.choose-dir"));
+ }
+
+ VFSFile file = files[0];
+ if(file.getType() == VFSFile.FILE)
+ {
+ String path = file.getPath();
+ String directory = browser.getDirectory();
+ String parent = MiscUtilities
+ .getParentOfPath(path);
+ if(MiscUtilities.pathsEqual(parent,directory))
+ path = file.getName();
+
+ filenameField.setText(path);
+ filenameField.selectAll();
+ }
+ }
+ else
+ {
+ if(choosingDir)
+ {
+ ok.setText(jEdit.getProperty(
+ "vfs.browser.dialog.choose-dir"));
+ }
+
+ filenameField.setText(null);
+ }
+ } //}}}
+
+ //{{{ filesActivated() method
+ public void filesActivated(VFSBrowser browser, VFSFile[] files)
+ {
+ filenameField.selectAll();
+
+ if(files.length == 0)
+ {
+ // user pressed enter when the vfs table or
+ // file name field has focus, with nothing
+ // selected.
+ ok();
+ return;
+ }
+
+ for(int i = 0; i < files.length; i++)
+ {
+ if(files[i].getType() == VFSFile.FILE)
+ {
+ String path = files[i].getPath();
+ VFS vfs = VFSManager.getVFSForPath(path);
+ if(browser.getMode() == VFSBrowser.SAVE_DIALOG
+ && vfs instanceof FileVFS)
+ {
+ if(doFileExistsWarning(path))
+ return;
+ }
+
+ isOK = true;
+ filenameField.setText(null);
+ if(browser.getMode() != VFSBrowser.CHOOSE_DIRECTORY_DIALOG)
+ {
+ dispose();
+ }
+ return;
+ }
+ else
+ return;
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ WorkThreadListener class
+ private class WorkThreadHandler implements WorkThreadProgressListener
+ {
+ //{{{ statusUpdate() method
+ public void statusUpdate(final WorkThreadPool threadPool,
+ int threadIndex)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ int requestCount = threadPool.getRequestCount();
+ if(requestCount == 0)
+ {
+ getContentPane().setCursor(
+ Cursor.getDefaultCursor());
+ }
+ else if(requestCount >= 1)
+ {
+ getContentPane().setCursor(
+ Cursor.getPredefinedCursor(
+ Cursor.WAIT_CURSOR));
+ }
+ }
+ });
+ } //}}}
+
+ //{{{ progressUpdate() method
+ public void progressUpdate(WorkThreadPool threadPool, int threadIndex)
+ {
+ } //}}}
+ } //}}}
+
+ //{{{ GetFileTypeRequest class
+ private class GetFileTypeRequest implements Runnable
+ {
+ VFS vfs;
+ Object session;
+ String path;
+ int[] type;
+
+ GetFileTypeRequest(VFS vfs, Object session,
+ String path, int[] type)
+ {
+ this.vfs = vfs;
+ this.session = session;
+ this.path = path;
+ this.type = type;
+ }
+
+ public void run()
+ {
+ try
+ {
+ VFSFile entry = vfs._getFile(
+ session,
+ path,
+ browser);
+ if(entry == null)
+ {
+ // non-existent file
+ type[0] = VFSFile.FILE;
+ }
+ else
+ type[0] = entry.getType();
+ }
+ catch(IOException e)
+ {
+ VFSManager.error(e,path,browser);
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(
+ session,
+ browser);
+ }
+ catch(IOException e)
+ {
+ VFSManager.error(e,path,browser);
+ }
+ }
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/VFSFileNameField.java b/jEdit/org/gjt/sp/jedit/browser/VFSFileNameField.java
index ef11871..8b0ea49 100644
--- a/jEdit/org/gjt/sp/jedit/browser/VFSFileNameField.java
+++ b/jEdit/org/gjt/sp/jedit/browser/VFSFileNameField.java
@@ -1,286 +1,286 @@
-/*
- * VFSFileNameField.java - File name field with completion
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.browser;
-
-//{{{ Imports
-import java.util.HashSet;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.gui.HistoryTextField;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.MiscUtilities;
-
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: VFSFileNameField.java 16348 2009-10-14 10:40:15Z kpouer $
- * @since jEdit 4.2pre1
- */
-class VFSFileNameField extends HistoryTextField
-{
- //{{{ VFSFileNameField constructor
- VFSFileNameField(VFSBrowser browser, String model)
- {
- super(model);
- setEnterAddsToHistory(false);
-
- this.browser = browser;
-
- Dimension dim = getPreferredSize();
- dim.width = Integer.MAX_VALUE;
- setMaximumSize(dim);
-
- // Enable TAB pressed for completion instead of
- // focas traversal.
- final int FORWARD = KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS;
- HashSet<AWTKeyStroke> keys = new HashSet<AWTKeyStroke>(
- getFocusTraversalKeys(FORWARD));
- keys.remove(AWTKeyStroke.getAWTKeyStroke("pressed TAB"));
- setFocusTraversalKeys(FORWARD, keys);
- } //}}}
-
- //{{{ processKeyEvent() method
- public void processKeyEvent(KeyEvent evt)
- {
- if(evt.getID() == KeyEvent.KEY_PRESSED)
- {
- String path = getText();
-
- switch(evt.getKeyCode())
- {
- case KeyEvent.VK_TAB:
- doComplete(path);
- break;
- case KeyEvent.VK_LEFT:
- if ((evt.getModifiers() & KeyEvent.ALT_MASK) > 0)
- {
- browser.previousDirectory();
- evt.consume();
- }
- else
- {
- // browser.getBrowserView().getTable().processKeyEvent(evt);
- super.processKeyEvent(evt);
- }
- break;
- case KeyEvent.VK_UP:
- if ((evt.getModifiers() & KeyEvent.ALT_MASK)>0)
- {
- String p = browser.getDirectory();
- browser.setDirectory(MiscUtilities.getParentOfPath(p));
- evt.consume();
- }
- else
- {
- browser.getBrowserView().getTable()
- .processKeyEvent(evt);
- }
- break;
- case KeyEvent.VK_RIGHT:
- if ((evt.getModifiers() & KeyEvent.ALT_MASK)>0)
- {
- evt.consume();
- browser.nextDirectory();
- }
- else
- super.processKeyEvent(evt);
- break;
- case KeyEvent.VK_DOWN:
- case KeyEvent.VK_PAGE_UP:
- case KeyEvent.VK_PAGE_DOWN:
- browser.getBrowserView().getTable()
- .processKeyEvent(evt);
- break;
- case KeyEvent.VK_ENTER:
- browser.filesActivated(
- (evt.isShiftDown()
- ? VFSBrowser.M_OPEN_NEW_VIEW
- : VFSBrowser.M_OPEN),false);
- setText(null);
- evt.consume();
- break;
- default:
- super.processKeyEvent(evt);
- break;
- }
- }
- else if(evt.getID() == KeyEvent.KEY_TYPED)
- {
- char ch = evt.getKeyChar();
- if(ch > 0x20 && ch != 0x7f && ch != 0xff)
- {
- super.processKeyEvent(evt);
- String path = getText();
- BrowserView view = browser.getBrowserView();
- view.selectNone();
-
- if(MiscUtilities.getLastSeparatorIndex(path) == -1)
- {
- int mode = browser.getMode();
- // fix for bug #765507
- // we don't type complete in save dialog
- // boxes. Press TAB to do an explicit
- // complete
- view.getTable().doTypeSelect(path,
- mode == VFSBrowser
- .CHOOSE_DIRECTORY_DIALOG
- ||
- mode == VFSBrowser
- .SAVE_DIALOG);
- }
- }
- else
- super.processKeyEvent(evt);
- }
- } //}}}
-
- //{{{ Private members
- private VFSBrowser browser;
-
- //{{{ doComplete() method
- public String doComplete(String path, String complete, boolean dirsOnly)
- {
- Log.log(Log.DEBUG,VFSFileNameField.class,
- "doComplete(" + path + "," + complete
- + "," + dirsOnly);
-
- for(;;)
- {
- if(complete.length() == 0)
- return path;
- int index = MiscUtilities.getFirstSeparatorIndex(complete);
- if(index == -1)
- return path;
-
- /* Until the very last path component, we only complete on
- directories */
- String newPath = VFSFile.findCompletion(path,
- complete.substring(0,index),browser,true);
- if(newPath == null)
- return null;
- path = newPath;
- complete = complete.substring(index + 1);
- }
- } //}}}
-
- //{{{ doComplete() method
- private void doComplete(String currentText)
- {
- int index = MiscUtilities.getLastSeparatorIndex(currentText);
- String dir;
- if(index != -1)
- dir = currentText.substring(0,index + 1);
- else
- dir = "";
-
- if(MiscUtilities.isAbsolutePath(currentText))
- {
- if(dir.startsWith("/"))
- dir = dir.substring(1);
- dir = doComplete(VFSBrowser.getRootDirectory(),dir,false);
- if(dir == null)
- return;
-
- browser.setDirectory(dir);
- VFSManager.waitForRequests();
-
- if(index == -1)
- {
- if(currentText.startsWith("/"))
- currentText = currentText.substring(1);
- }
- else
- currentText = currentText.substring(index + 1);
- }
- else
- {
- if(dir.length() != 0)
- {
- dir = doComplete(browser.getDirectory(),dir,false);
- if(dir == null)
- return;
-
- browser.setDirectory(dir);
- VFSManager.waitForRequests();
-
- currentText = currentText.substring(index + 1);
- }
- }
-
- BrowserView view = browser.getBrowserView();
- view.selectNone();
- view.getTable().doTypeSelect(currentText,
- browser.getMode() == VFSBrowser
- .CHOOSE_DIRECTORY_DIALOG);
-
- String newText;
-
- VFSFile[] files = view.getSelectedFiles();
- if(files.length == 0)
- newText = currentText;
- else
- {
- String path = files[0].getPath();
- String name = files[0].getName();
- String parent = MiscUtilities.getParentOfPath(path);
-
- if(MiscUtilities.isAbsolutePath(currentText)
- && !currentText.startsWith(browser.getDirectory()))
- {
- newText = path;
- }
- else
- {
- if(MiscUtilities.pathsEqual(parent,browser.getDirectory()))
- newText = name;
- else
- newText = path;
- }
- }
-
- setText(newText);
- } //}}}
-
- //{{{ goToParent() method
- private void goToParent()
- {
- String name = MiscUtilities.getFileName(browser.getDirectory());
- String parent = MiscUtilities.getParentOfPath(
- browser.getDirectory());
- browser.setDirectory(parent);
-
- VFS vfs = VFSManager.getVFSForPath(parent);
- if((vfs.getCapabilities() & VFS.LOW_LATENCY_CAP) != 0)
- {
- VFSManager.waitForRequests();
- setText(name);
- browser.getBrowserView().getTable().doTypeSelect(
- name,browser.getMode() == VFSBrowser
- .CHOOSE_DIRECTORY_DIALOG);
- }
- } //}}}
-
- //}}}
-}
+/*
+ * VFSFileNameField.java - File name field with completion
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.browser;
+
+//{{{ Imports
+import java.util.HashSet;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.gui.HistoryTextField;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.MiscUtilities;
+
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: VFSFileNameField.java 19319 2011-02-01 04:38:55Z ezust $
+ * @since jEdit 4.2pre1 (public since 4.4pre1)
+ */
+public class VFSFileNameField extends HistoryTextField
+{
+ //{{{ VFSFileNameField constructor
+ public VFSFileNameField(VFSBrowser browser, String model)
+ {
+ super(model);
+ setEnterAddsToHistory(false);
+
+ this.browser = browser;
+
+ Dimension dim = getPreferredSize();
+ dim.width = Integer.MAX_VALUE;
+ setMaximumSize(dim);
+
+ // Enable TAB pressed for completion instead of
+ // focas traversal.
+ final int FORWARD = KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS;
+ HashSet<AWTKeyStroke> keys = new HashSet<AWTKeyStroke>(
+ getFocusTraversalKeys(FORWARD));
+ keys.remove(AWTKeyStroke.getAWTKeyStroke("pressed TAB"));
+ setFocusTraversalKeys(FORWARD, keys);
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ public void processKeyEvent(KeyEvent evt)
+ {
+ if(evt.getID() == KeyEvent.KEY_PRESSED)
+ {
+ String path = getText();
+
+ switch(evt.getKeyCode())
+ {
+ case KeyEvent.VK_TAB:
+ doComplete(path);
+ break;
+ case KeyEvent.VK_LEFT:
+ if ((evt.getModifiers() & KeyEvent.ALT_MASK) > 0)
+ {
+ browser.previousDirectory();
+ evt.consume();
+ }
+ else
+ {
+ // browser.getBrowserView().getTable().processKeyEvent(evt);
+ super.processKeyEvent(evt);
+ }
+ break;
+ case KeyEvent.VK_UP:
+ if ((evt.getModifiers() & KeyEvent.ALT_MASK)>0)
+ {
+ String p = browser.getDirectory();
+ browser.setDirectory(MiscUtilities.getParentOfPath(p));
+ evt.consume();
+ }
+ else
+ {
+ browser.getBrowserView().getTable()
+ .processKeyEvent(evt);
+ }
+ break;
+ case KeyEvent.VK_RIGHT:
+ if ((evt.getModifiers() & KeyEvent.ALT_MASK)>0)
+ {
+ evt.consume();
+ browser.nextDirectory();
+ }
+ else
+ super.processKeyEvent(evt);
+ break;
+ case KeyEvent.VK_DOWN:
+ case KeyEvent.VK_PAGE_UP:
+ case KeyEvent.VK_PAGE_DOWN:
+ browser.getBrowserView().getTable()
+ .processKeyEvent(evt);
+ break;
+ case KeyEvent.VK_ENTER:
+ browser.filesActivated(
+ (evt.isShiftDown()
+ ? VFSBrowser.M_OPEN_NEW_VIEW
+ : VFSBrowser.M_OPEN),false);
+ setText(null);
+ evt.consume();
+ break;
+ default:
+ super.processKeyEvent(evt);
+ break;
+ }
+ }
+ else if(evt.getID() == KeyEvent.KEY_TYPED)
+ {
+ char ch = evt.getKeyChar();
+ if(ch > 0x20 && ch != 0x7f && ch != 0xff)
+ {
+ super.processKeyEvent(evt);
+ String path = getText();
+ BrowserView view = browser.getBrowserView();
+ view.selectNone();
+
+ if(MiscUtilities.getLastSeparatorIndex(path) == -1)
+ {
+ int mode = browser.getMode();
+ // fix for bug #765507
+ // we don't type complete in save dialog
+ // boxes. Press TAB to do an explicit
+ // complete
+ view.getTable().doTypeSelect(path,
+ mode == VFSBrowser
+ .CHOOSE_DIRECTORY_DIALOG
+ ||
+ mode == VFSBrowser
+ .SAVE_DIALOG);
+ }
+ }
+ else
+ super.processKeyEvent(evt);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private VFSBrowser browser;
+
+ //{{{ doComplete() method
+ public String doComplete(String path, String complete, boolean dirsOnly)
+ {
+ Log.log(Log.DEBUG,VFSFileNameField.class,
+ "doComplete(" + path + "," + complete
+ + "," + dirsOnly);
+
+ for(;;)
+ {
+ if(complete.length() == 0)
+ return path;
+ int index = MiscUtilities.getFirstSeparatorIndex(complete);
+ if(index == -1)
+ return path;
+
+ /* Until the very last path component, we only complete on
+ directories */
+ String newPath = VFSFile.findCompletion(path,
+ complete.substring(0,index),browser,true);
+ if(newPath == null)
+ return null;
+ path = newPath;
+ complete = complete.substring(index + 1);
+ }
+ } //}}}
+
+ //{{{ doComplete() method
+ private void doComplete(String currentText)
+ {
+ int index = MiscUtilities.getLastSeparatorIndex(currentText);
+ String dir;
+ if(index != -1)
+ dir = currentText.substring(0,index + 1);
+ else
+ dir = "";
+
+ if(MiscUtilities.isAbsolutePath(currentText))
+ {
+ if(dir.startsWith("/"))
+ dir = dir.substring(1);
+ dir = doComplete(VFSBrowser.getRootDirectory(),dir,false);
+ if(dir == null)
+ return;
+
+ browser.setDirectory(dir);
+ VFSManager.waitForRequests();
+
+ if(index == -1)
+ {
+ if(currentText.startsWith("/"))
+ currentText = currentText.substring(1);
+ }
+ else
+ currentText = currentText.substring(index + 1);
+ }
+ else
+ {
+ if(dir.length() != 0)
+ {
+ dir = doComplete(browser.getDirectory(),dir,false);
+ if(dir == null)
+ return;
+
+ browser.setDirectory(dir);
+ VFSManager.waitForRequests();
+
+ currentText = currentText.substring(index + 1);
+ }
+ }
+
+ BrowserView view = browser.getBrowserView();
+ view.selectNone();
+ view.getTable().doTypeSelect(currentText,
+ browser.getMode() == VFSBrowser
+ .CHOOSE_DIRECTORY_DIALOG);
+
+ String newText;
+
+ VFSFile[] files = view.getSelectedFiles();
+ if(files.length == 0)
+ newText = currentText;
+ else
+ {
+ String path = files[0].getPath();
+ String name = files[0].getName();
+ String parent = MiscUtilities.getParentOfPath(path);
+
+ if(MiscUtilities.isAbsolutePath(currentText)
+ && !currentText.startsWith(browser.getDirectory()))
+ {
+ newText = path;
+ }
+ else
+ {
+ if(MiscUtilities.pathsEqual(parent,browser.getDirectory()))
+ newText = name;
+ else
+ newText = path;
+ }
+ }
+
+ setText(newText);
+ } //}}}
+
+ //{{{ goToParent() method
+ private void goToParent()
+ {
+ String name = MiscUtilities.getFileName(browser.getDirectory());
+ String parent = MiscUtilities.getParentOfPath(
+ browser.getDirectory());
+ browser.setDirectory(parent);
+
+ VFS vfs = VFSManager.getVFSForPath(parent);
+ if((vfs.getCapabilities() & VFS.LOW_LATENCY_CAP) != 0)
+ {
+ VFSManager.waitForRequests();
+ setText(name);
+ browser.getBrowserView().getTable().doTypeSelect(
+ name,browser.getMode() == VFSBrowser
+ .CHOOSE_DIRECTORY_DIALOG);
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/browser/package.html b/jEdit/org/gjt/sp/jedit/browser/package.html
index fda2688..fc1ffa6 100644
--- a/jEdit/org/gjt/sp/jedit/browser/package.html
+++ b/jEdit/org/gjt/sp/jedit/browser/package.html
@@ -1 +1 @@
-<html><body>jEdit's file system browser.</body></html>
+<html><body>jEdit's file system browser.</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/buffer/BufferAdapter.java b/jEdit/org/gjt/sp/jedit/buffer/BufferAdapter.java
index f03edd6..e011e41 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/BufferAdapter.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/BufferAdapter.java
@@ -1,138 +1,139 @@
-/*
- * BufferAdapter.java - Buffer listener adapter
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-/**
- * An adapter you can subclass to avoid having to implement all the methods
- * of the {@link BufferListener} interface.
- * @author Slava Pestov
- * @version $Id: BufferAdapter.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.3pre3
- */
-public abstract class BufferAdapter implements BufferListener
-{
- //{{{ foldLevelChanged() method
- /**
- * Called when line fold levels change.
- * @param buffer The buffer in question
- * @param start The start line number
- * @param end The end line number
- * @since jEdit 4.3pre3
- */
- public void foldLevelChanged(JEditBuffer buffer, int start, int end)
- {
- } //}}}
-
- //{{{ contentInserted() method
- /**
- * Called when text is inserted into the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @since jEdit 4.3pre3
- */
- public void contentInserted(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length) {}
- //}}}
-
- /**
- * Called when text is about to be inserted in the buffer.
- *
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @since jEdit 4.3pre11
- */
- public void preContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
- {
- }
-
- //{{{ preContentRemoved() method
- /**
- * Called when text is about to be removed from the buffer, but is
- * still present.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines to be removed
- * @param length The number of characters to be removed
- * @since jEdit 4.3pre3
- */
- public void preContentRemoved(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length) {}
- //}}}
-
- //{{{ contentRemoved() method
- /**
- * Called when text is removed from the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines removed
- * @param length The number of characters removed
- * @since jEdit 4.3pre3
- */
- public void contentRemoved(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length) {}
- //}}}
-
- //{{{ transactionComplete() method
- /**
- * Called after an undo or compound edit has finished. The text area
- * uses this event to queue up and collapse cleanup operations so they
- * are only run once during a long transaction (such as a "Replace All"
- * operation.)
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre3
- */
- public void transactionComplete(JEditBuffer buffer) {}
- //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that folds need to be collapsed if
- * the "collapseFolds" property is set. This method is called after the
- * buffer has been loaded, and also if the user changes the fold
- * handler.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre3
- */
- public void foldHandlerChanged(JEditBuffer buffer) {}
- //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that the buffer has been reloaded.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre3
- */
- public void bufferLoaded(JEditBuffer buffer) {}
- //}}}
-}
+/*
+ * BufferAdapter.java - Buffer listener adapter
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+/**
+ * An adapter you can subclass to avoid having to implement all the methods
+ * of the {@link BufferListener} interface.
+ * @author Slava Pestov
+ * @version $Id: BufferAdapter.java 17966 2010-06-03 08:27:12Z kpouer $
+ * @since jEdit 4.3pre3
+ */
+public abstract class BufferAdapter implements BufferListener
+{
+ //{{{ foldLevelChanged() method
+ /**
+ * Called when line fold levels change.
+ * @param buffer The buffer in question
+ * @param start The start line number
+ * @param end The end line number
+ * @since jEdit 4.3pre3
+ */
+ public void foldLevelChanged(JEditBuffer buffer, int start, int end)
+ {
+ } //}}}
+
+ //{{{ contentInserted() method
+ /**
+ * Called when text is inserted into the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @since jEdit 4.3pre3
+ */
+ public void contentInserted(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length) {}
+ //}}}
+
+ //{{{ preContentInserted() method
+ /**
+ * Called when text is about to be inserted in the buffer.
+ *
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @since jEdit 4.3pre11
+ */
+ public void preContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
+ {
+ } //}}}
+
+ //{{{ preContentRemoved() method
+ /**
+ * Called when text is about to be removed from the buffer, but is
+ * still present.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines to be removed
+ * @param length The number of characters to be removed
+ * @since jEdit 4.3pre3
+ */
+ public void preContentRemoved(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length) {}
+ //}}}
+
+ //{{{ contentRemoved() method
+ /**
+ * Called when text is removed from the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines removed
+ * @param length The number of characters removed
+ * @since jEdit 4.3pre3
+ */
+ public void contentRemoved(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length) {}
+ //}}}
+
+ //{{{ transactionComplete() method
+ /**
+ * Called after an undo or compound edit has finished. The text area
+ * uses this event to queue up and collapse cleanup operations so they
+ * are only run once during a long transaction (such as a "Replace All"
+ * operation.)
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre3
+ */
+ public void transactionComplete(JEditBuffer buffer) {}
+ //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that folds need to be collapsed if
+ * the "collapseFolds" property is set. This method is called after the
+ * buffer has been loaded, and also if the user changes the fold
+ * handler.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre3
+ */
+ public void foldHandlerChanged(JEditBuffer buffer) {}
+ //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that the buffer has been reloaded.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre3
+ */
+ public void bufferLoaded(JEditBuffer buffer) {}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/BufferChangeAdapter.java b/jEdit/org/gjt/sp/jedit/buffer/BufferChangeAdapter.java
index 358683d..5aa5a70 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/BufferChangeAdapter.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/BufferChangeAdapter.java
@@ -1,126 +1,126 @@
-/*
- * BufferChangeListener.java - Buffer listener adapter
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-import org.gjt.sp.jedit.Buffer;
-
-/**
- * An adapter you can subclass to avoid having to implement all the methods
- * of the {@link BufferChangeListener} interface.
- * @author Slava Pestov
- * @version $Id: BufferChangeAdapter.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.0pre1
- */
-public abstract class BufferChangeAdapter implements BufferChangeListener
-{
- //{{{ foldLevelChanged() method
- /**
- * Called when line fold levels change.
- * @param buffer The buffer in question
- * @param start The start line number
- * @param end The end line number
- * @since jEdit 4.0pre1
- */
- public void foldLevelChanged(Buffer buffer, int start, int end)
- {
- } //}}}
-
- //{{{ contentInserted() method
- /**
- * Called when text is inserted into the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @since jEdit 4.0pre1
- */
- public void contentInserted(Buffer buffer, int startLine, int offset,
- int numLines, int length) {}
- //}}}
-
- //{{{ preContentRemoved() method
- /**
- * Called when text is about to be removed from the buffer, but is
- * still present.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines to be removed
- * @param length The number of characters to be removed
- * @since jEdit 4.2pre1
- */
- public void preContentRemoved(Buffer buffer, int startLine, int offset,
- int numLines, int length) {}
- //}}}
-
- //{{{ contentRemoved() method
- /**
- * Called when text is removed from the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines removed
- * @param length The number of characters removed
- * @since jEdit 4.0pre1
- */
- public void contentRemoved(Buffer buffer, int startLine, int offset,
- int numLines, int length) {}
- //}}}
-
- //{{{ transactionComplete() method
- /**
- * Called after an undo or compound edit has finished. The text area
- * uses this event to queue up and collapse cleanup operations so they
- * are only run once during a long transaction (such as a "Replace All"
- * operation.)
- *
- * @param buffer The buffer in question
- * @since jEdit 4.0pre6
- */
- public void transactionComplete(Buffer buffer) {}
- //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that folds need to be collapsed if
- * the "collapseFolds" property is set. This method is called after the
- * buffer has been loaded, and also if the user changes the fold
- * handler.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.2pre2
- */
- public void foldHandlerChanged(Buffer buffer) {}
- //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that the buffer has been reloaded.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre1
- */
- public void bufferLoaded(Buffer buffer) {}
- //}}}
-}
+/*
+ * BufferChangeListener.java - Buffer listener adapter
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+import org.gjt.sp.jedit.Buffer;
+
+/**
+ * An adapter you can subclass to avoid having to implement all the methods
+ * of the {@link BufferChangeListener} interface.
+ * @author Slava Pestov
+ * @version $Id: BufferChangeAdapter.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.0pre1
+ */
+public abstract class BufferChangeAdapter implements BufferChangeListener
+{
+ //{{{ foldLevelChanged() method
+ /**
+ * Called when line fold levels change.
+ * @param buffer The buffer in question
+ * @param start The start line number
+ * @param end The end line number
+ * @since jEdit 4.0pre1
+ */
+ public void foldLevelChanged(Buffer buffer, int start, int end)
+ {
+ } //}}}
+
+ //{{{ contentInserted() method
+ /**
+ * Called when text is inserted into the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @since jEdit 4.0pre1
+ */
+ public void contentInserted(Buffer buffer, int startLine, int offset,
+ int numLines, int length) {}
+ //}}}
+
+ //{{{ preContentRemoved() method
+ /**
+ * Called when text is about to be removed from the buffer, but is
+ * still present.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines to be removed
+ * @param length The number of characters to be removed
+ * @since jEdit 4.2pre1
+ */
+ public void preContentRemoved(Buffer buffer, int startLine, int offset,
+ int numLines, int length) {}
+ //}}}
+
+ //{{{ contentRemoved() method
+ /**
+ * Called when text is removed from the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines removed
+ * @param length The number of characters removed
+ * @since jEdit 4.0pre1
+ */
+ public void contentRemoved(Buffer buffer, int startLine, int offset,
+ int numLines, int length) {}
+ //}}}
+
+ //{{{ transactionComplete() method
+ /**
+ * Called after an undo or compound edit has finished. The text area
+ * uses this event to queue up and collapse cleanup operations so they
+ * are only run once during a long transaction (such as a "Replace All"
+ * operation.)
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.0pre6
+ */
+ public void transactionComplete(Buffer buffer) {}
+ //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that folds need to be collapsed if
+ * the "collapseFolds" property is set. This method is called after the
+ * buffer has been loaded, and also if the user changes the fold
+ * handler.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.2pre2
+ */
+ public void foldHandlerChanged(Buffer buffer) {}
+ //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that the buffer has been reloaded.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre1
+ */
+ public void bufferLoaded(Buffer buffer) {}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/BufferChangeListener.java b/jEdit/org/gjt/sp/jedit/buffer/BufferChangeListener.java
index 930dccd..7185917 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/BufferChangeListener.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/BufferChangeListener.java
@@ -1,268 +1,268 @@
-/*
- * BufferChangeListener.java - Buffer listener interface
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-import org.gjt.sp.jedit.Buffer;
-
-/**
- * A interface for notification of changes to buffer text. While the
- * {@link org.gjt.sp.jedit.msg.BufferUpdate} EditBus message is used for
- * general buffer state changes, this interface is used for events which are
- * fired frequently, or for which performance is essential.<p>
- *
- * Because this interface is subject to change in the future, you
- * should subclass <code>BufferChangeAdapter</code> instead of
- * implementing it directly.
- *
- * @author Slava Pestov
- * @version $Id: BufferChangeListener.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.0pre1
- */
-public interface BufferChangeListener
-{
- //{{{ foldLevelChanged() method
- /**
- * Called when line fold levels change.
- * @param buffer The buffer in question
- * @param startLine The start line number
- * @param endLine The end line number
- * @since jEdit 4.0pre1
- */
- void foldLevelChanged(Buffer buffer, int startLine, int endLine);
- //}}}
-
- //{{{ contentInserted() method
- /**
- * Called when text is inserted into the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @since jEdit 4.0pre1
- */
- void contentInserted(Buffer buffer, int startLine, int offset,
- int numLines, int length);
- //}}}
-
- //{{{ contentRemoved() method
- /**
- * Called when text is removed from the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines removed
- * @param length The number of characters removed
- * @since jEdit 4.0pre1
- */
- void contentRemoved(Buffer buffer, int startLine, int offset,
- int numLines, int length);
- //}}}
-
- //{{{ preContentRemoved() method
- /**
- * Called when text is about to be removed from the buffer, but is
- * still present.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines to be removed
- * @param length The number of characters to be removed
- * @since jEdit 4.2pre1
- */
- public void preContentRemoved(Buffer buffer, int startLine, int offset,
- int numLines, int length);
- //}}}
-
- //{{{ transactionComplete() method
- /**
- * Called after an undo or compound edit has finished. The text area
- * uses this event to queue up and collapse cleanup operations so they
- * are only run once during a long transaction (such as a "Replace All"
- * operation.)
- *
- * @param buffer The buffer in question
- * @since jEdit 4.0pre6
- */
- void transactionComplete(Buffer buffer);
- //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that folds need to be collapsed if
- * the "collapseFolds" property is set. This method is called after the
- * buffer has been loaded, and also if the user changes the fold
- * handler.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.2pre2
- */
- void foldHandlerChanged(Buffer buffer);
- //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that the buffer has been reloaded.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre1
- */
- void bufferLoaded(Buffer buffer);
- //}}}
-
- //{{{ Compatibility with older jEdit plugins
- public class Adapter implements BufferListener
- {
- private BufferChangeListener delegate;
-
- //{{{ Adapter constructor
- public Adapter(BufferChangeListener delegate)
- {
- this.delegate = delegate;
- } //}}}
-
- //{{{ getDelegate() method
- public BufferChangeListener getDelegate()
- {
- return delegate;
- } //}}}
-
- //{{{ foldLevelChanged() method
- /**
- * Called when line fold levels change.
- * @param buffer The buffer in question
- * @param startLine The start line number
- * @param endLine The end line number
- * @since jEdit 4.3pre3
- */
- public void foldLevelChanged(JEditBuffer buffer, int startLine, int endLine)
- {
- delegate.foldLevelChanged((Buffer)buffer,startLine,endLine);
- } //}}}
-
- //{{{ contentInserted() method
- /**
- * Called when text is inserted into the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @since jEdit 4.3pre3
- */
- public void contentInserted(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length)
- {
- delegate.contentInserted((Buffer)buffer,startLine,offset,numLines,length);
- } //}}}
-
- //{{{ contentRemoved() method
- /**
- * Called when text is removed from the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines removed
- * @param length The number of characters removed
- * @since jEdit 4.3pre3
- */
- public void contentRemoved(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length)
- {
- delegate.contentRemoved((Buffer)buffer,startLine,offset,numLines,length);
- } //}}}
-
- /**
- * Called when text is about to be inserted in the buffer.
- *
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @since jEdit 4.3pre11
- */
- public void preContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
- {
- }
-
- //{{{ preContentRemoved() method
- /**
- * Called when text is about to be removed from the buffer, but is
- * still present.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines to be removed
- * @param length The number of characters to be removed
- * @since jEdit 4.3pre3
- */
- public void preContentRemoved(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length)
- {
- delegate.preContentRemoved((Buffer)buffer,startLine,offset,numLines,length);
- } //}}}
-
- //{{{ transactionComplete() method
- /**
- * Called after an undo or compound edit has finished. The text area
- * uses this event to queue up and collapse cleanup operations so they
- * are only run once during a long transaction (such as a "Replace All"
- * operation.)
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre3
- */
- public void transactionComplete(JEditBuffer buffer)
- {
- delegate.transactionComplete((Buffer)buffer);
- } //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that folds need to be collapsed if
- * the "collapseFolds" property is set. This method is called after the
- * buffer has been loaded, and also if the user changes the fold
- * handler.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre3
- */
- public void foldHandlerChanged(JEditBuffer buffer)
- {
- delegate.foldHandlerChanged((Buffer)buffer);
- } //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that the buffer has been reloaded.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre3
- */
- public void bufferLoaded(JEditBuffer buffer)
- {
- delegate.bufferLoaded((Buffer)buffer);
- } //}}}
- } //}}}
-}
+/*
+ * BufferChangeListener.java - Buffer listener interface
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+import org.gjt.sp.jedit.Buffer;
+
+/**
+ * A interface for notification of changes to buffer text. While the
+ * {@link org.gjt.sp.jedit.msg.BufferUpdate} EditBus message is used for
+ * general buffer state changes, this interface is used for events which are
+ * fired frequently, or for which performance is essential.<p>
+ *
+ * Because this interface is subject to change in the future, you
+ * should subclass <code>BufferChangeAdapter</code> instead of
+ * implementing it directly.
+ *
+ * @author Slava Pestov
+ * @version $Id: BufferChangeListener.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.0pre1
+ */
+public interface BufferChangeListener
+{
+ //{{{ foldLevelChanged() method
+ /**
+ * Called when line fold levels change.
+ * @param buffer The buffer in question
+ * @param startLine The start line number
+ * @param endLine The end line number
+ * @since jEdit 4.0pre1
+ */
+ void foldLevelChanged(Buffer buffer, int startLine, int endLine);
+ //}}}
+
+ //{{{ contentInserted() method
+ /**
+ * Called when text is inserted into the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @since jEdit 4.0pre1
+ */
+ void contentInserted(Buffer buffer, int startLine, int offset,
+ int numLines, int length);
+ //}}}
+
+ //{{{ contentRemoved() method
+ /**
+ * Called when text is removed from the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines removed
+ * @param length The number of characters removed
+ * @since jEdit 4.0pre1
+ */
+ void contentRemoved(Buffer buffer, int startLine, int offset,
+ int numLines, int length);
+ //}}}
+
+ //{{{ preContentRemoved() method
+ /**
+ * Called when text is about to be removed from the buffer, but is
+ * still present.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines to be removed
+ * @param length The number of characters to be removed
+ * @since jEdit 4.2pre1
+ */
+ public void preContentRemoved(Buffer buffer, int startLine, int offset,
+ int numLines, int length);
+ //}}}
+
+ //{{{ transactionComplete() method
+ /**
+ * Called after an undo or compound edit has finished. The text area
+ * uses this event to queue up and collapse cleanup operations so they
+ * are only run once during a long transaction (such as a "Replace All"
+ * operation.)
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.0pre6
+ */
+ void transactionComplete(Buffer buffer);
+ //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that folds need to be collapsed if
+ * the "collapseFolds" property is set. This method is called after the
+ * buffer has been loaded, and also if the user changes the fold
+ * handler.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.2pre2
+ */
+ void foldHandlerChanged(Buffer buffer);
+ //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that the buffer has been reloaded.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre1
+ */
+ void bufferLoaded(Buffer buffer);
+ //}}}
+
+ //{{{ Compatibility with older jEdit plugins
+ public class Adapter implements BufferListener
+ {
+ private BufferChangeListener delegate;
+
+ //{{{ Adapter constructor
+ public Adapter(BufferChangeListener delegate)
+ {
+ this.delegate = delegate;
+ } //}}}
+
+ //{{{ getDelegate() method
+ public BufferChangeListener getDelegate()
+ {
+ return delegate;
+ } //}}}
+
+ //{{{ foldLevelChanged() method
+ /**
+ * Called when line fold levels change.
+ * @param buffer The buffer in question
+ * @param startLine The start line number
+ * @param endLine The end line number
+ * @since jEdit 4.3pre3
+ */
+ public void foldLevelChanged(JEditBuffer buffer, int startLine, int endLine)
+ {
+ delegate.foldLevelChanged((Buffer)buffer,startLine,endLine);
+ } //}}}
+
+ //{{{ contentInserted() method
+ /**
+ * Called when text is inserted into the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @since jEdit 4.3pre3
+ */
+ public void contentInserted(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length)
+ {
+ delegate.contentInserted((Buffer)buffer,startLine,offset,numLines,length);
+ } //}}}
+
+ //{{{ contentRemoved() method
+ /**
+ * Called when text is removed from the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines removed
+ * @param length The number of characters removed
+ * @since jEdit 4.3pre3
+ */
+ public void contentRemoved(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length)
+ {
+ delegate.contentRemoved((Buffer)buffer,startLine,offset,numLines,length);
+ } //}}}
+
+ /**
+ * Called when text is about to be inserted in the buffer.
+ *
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @since jEdit 4.3pre11
+ */
+ public void preContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
+ {
+ }
+
+ //{{{ preContentRemoved() method
+ /**
+ * Called when text is about to be removed from the buffer, but is
+ * still present.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines to be removed
+ * @param length The number of characters to be removed
+ * @since jEdit 4.3pre3
+ */
+ public void preContentRemoved(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length)
+ {
+ delegate.preContentRemoved((Buffer)buffer,startLine,offset,numLines,length);
+ } //}}}
+
+ //{{{ transactionComplete() method
+ /**
+ * Called after an undo or compound edit has finished. The text area
+ * uses this event to queue up and collapse cleanup operations so they
+ * are only run once during a long transaction (such as a "Replace All"
+ * operation.)
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre3
+ */
+ public void transactionComplete(JEditBuffer buffer)
+ {
+ delegate.transactionComplete((Buffer)buffer);
+ } //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that folds need to be collapsed if
+ * the "collapseFolds" property is set. This method is called after the
+ * buffer has been loaded, and also if the user changes the fold
+ * handler.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre3
+ */
+ public void foldHandlerChanged(JEditBuffer buffer)
+ {
+ delegate.foldHandlerChanged((Buffer)buffer);
+ } //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that the buffer has been reloaded.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre3
+ */
+ public void bufferLoaded(JEditBuffer buffer)
+ {
+ delegate.bufferLoaded((Buffer)buffer);
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/BufferListener.java b/jEdit/org/gjt/sp/jedit/buffer/BufferListener.java
index 064d121..27fb7f1 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/BufferListener.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/BufferListener.java
@@ -1,150 +1,150 @@
-/*
- * BufferListener.java - Buffer listener interface
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-/**
- * A interface for notification of changes to buffer text.<p>
- *
- * This interface is new in jEdit 4.3pre3. The text area was made independent
- * of the rest of jEdit, and thus this class could no longer depend on
- * <code>org.gjt.sp.jedit.Buffer</code>.<p>
- *
- * While the
- * {@link org.gjt.sp.jedit.msg.BufferUpdate} EditBus message is used for
- * general buffer state changes, this interface is used for events which are
- * fired frequently, or for which performance is essential.<p>
- *
- * Because this interface is subject to change in the future, you
- * should subclass <code>BufferAdapter</code> instead of
- * implementing it directly.
- *
- * @author Slava Pestov
- * @version $Id: BufferListener.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.3pre3
- */
-public interface BufferListener
-{
- //{{{ foldLevelChanged() method
- /**
- * Called when line fold levels change.
- * @param buffer The buffer in question
- * @param startLine The start line number
- * @param endLine The end line number
- * @since jEdit 4.3pre3
- */
- void foldLevelChanged(JEditBuffer buffer, int startLine, int endLine);
- //}}}
-
- //{{{ contentInserted() method
- /**
- * Called when text is inserted into the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @since jEdit 4.3pre3
- */
- void contentInserted(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length);
- //}}}
-
- //{{{ contentRemoved() method
- /**
- * Called when text is removed from the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines removed
- * @param length The number of characters removed
- * @since jEdit 4.3pre3
- */
- void contentRemoved(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length);
- //}}}
-
- //{{{ preContentInserted() method
- /**
- * Called when text is about to be inserted in the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @since jEdit 4.3pre11
- */
- void preContentInserted(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length);
- //}}}
-
- //{{{ preContentRemoved() method
- /**
- * Called when text is about to be removed from the buffer, but is
- * still present.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines to be removed
- * @param length The number of characters to be removed
- * @since jEdit 4.3pre3
- */
- void preContentRemoved(JEditBuffer buffer, int startLine, int offset,
- int numLines, int length);
- //}}}
-
- //{{{ transactionComplete() method
- /**
- * Called after an undo or compound edit has finished. The text area
- * uses this event to queue up and collapse cleanup operations so they
- * are only run once during a long transaction (such as a "Replace All"
- * operation.)
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre3
- */
- void transactionComplete(JEditBuffer buffer);
- //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that folds need to be collapsed if
- * the "collapseFolds" property is set. This method is called after the
- * buffer has been loaded, and also if the user changes the fold
- * handler.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre3
- */
- void foldHandlerChanged(JEditBuffer buffer);
- //}}}
-
- //{{{ foldHandlerChanged() method
- /**
- * Called to notify the text area that the buffer has been reloaded.
- *
- * @param buffer The buffer in question
- * @since jEdit 4.3pre3
- */
- void bufferLoaded(JEditBuffer buffer);
- //}}}
-}
+/*
+ * BufferListener.java - Buffer listener interface
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+/**
+ * A interface for notification of changes to buffer text.<p>
+ *
+ * This interface is new in jEdit 4.3pre3. The text area was made independent
+ * of the rest of jEdit, and thus this class could no longer depend on
+ * <code>org.gjt.sp.jedit.Buffer</code>.<p>
+ *
+ * While the
+ * {@link org.gjt.sp.jedit.msg.BufferUpdate} EditBus message is used for
+ * general buffer state changes, this interface is used for events which are
+ * fired frequently, or for which performance is essential.<p>
+ *
+ * Because this interface is subject to change in the future, you
+ * should subclass <code>BufferAdapter</code> instead of
+ * implementing it directly.
+ *
+ * @author Slava Pestov
+ * @version $Id: BufferListener.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.3pre3
+ */
+public interface BufferListener
+{
+ //{{{ foldLevelChanged() method
+ /**
+ * Called when line fold levels change.
+ * @param buffer The buffer in question
+ * @param startLine The start line number
+ * @param endLine The end line number
+ * @since jEdit 4.3pre3
+ */
+ void foldLevelChanged(JEditBuffer buffer, int startLine, int endLine);
+ //}}}
+
+ //{{{ contentInserted() method
+ /**
+ * Called when text is inserted into the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @since jEdit 4.3pre3
+ */
+ void contentInserted(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length);
+ //}}}
+
+ //{{{ contentRemoved() method
+ /**
+ * Called when text is removed from the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines removed
+ * @param length The number of characters removed
+ * @since jEdit 4.3pre3
+ */
+ void contentRemoved(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length);
+ //}}}
+
+ //{{{ preContentInserted() method
+ /**
+ * Called when text is about to be inserted in the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @since jEdit 4.3pre11
+ */
+ void preContentInserted(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length);
+ //}}}
+
+ //{{{ preContentRemoved() method
+ /**
+ * Called when text is about to be removed from the buffer, but is
+ * still present.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines to be removed
+ * @param length The number of characters to be removed
+ * @since jEdit 4.3pre3
+ */
+ void preContentRemoved(JEditBuffer buffer, int startLine, int offset,
+ int numLines, int length);
+ //}}}
+
+ //{{{ transactionComplete() method
+ /**
+ * Called after an undo or compound edit has finished. The text area
+ * uses this event to queue up and collapse cleanup operations so they
+ * are only run once during a long transaction (such as a "Replace All"
+ * operation.)
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre3
+ */
+ void transactionComplete(JEditBuffer buffer);
+ //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that folds need to be collapsed if
+ * the "collapseFolds" property is set. This method is called after the
+ * buffer has been loaded, and also if the user changes the fold
+ * handler.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre3
+ */
+ void foldHandlerChanged(JEditBuffer buffer);
+ //}}}
+
+ //{{{ foldHandlerChanged() method
+ /**
+ * Called to notify the text area that the buffer has been reloaded.
+ *
+ * @param buffer The buffer in question
+ * @since jEdit 4.3pre3
+ */
+ void bufferLoaded(JEditBuffer buffer);
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/BufferUndoListener.java b/jEdit/org/gjt/sp/jedit/buffer/BufferUndoListener.java
index 8d0e185..fd0039c 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/BufferUndoListener.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/BufferUndoListener.java
@@ -1,72 +1,72 @@
-/*
- * BufferUndoListener.java - Buffer undo listener interface
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2009 Shlomy Reinstein
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-/**
- * A interface for notification of buffer undo/redo actions.
- *
- * This interface makes it easier for undo-aware plugins to process
- * undo/redo actions in a buffer.
- *
- * Buffer undo listeners are added and removed from a buffer using
- * <code>JEditBuffer.addBufferUndoListener<code> and
- * <code>JEditBuffer.removeBufferUndoListener<code>, respectively.
- *
- * @author Shlomy Reinstein
- * @version $Id: BufferUndoListener.java 16098 2009-08-27 21:59:29Z shlomy $
- * @since jEdit 4.3pre18
- */
-public interface BufferUndoListener
-{
- //{{{ beginUndo() method
- /**
- * Called when an undo operation on the buffer begins.
- * @param buffer The buffer in question
- */
- void beginUndo(JEditBuffer buffer);
- //}}}
-
- //{{{ endUndo() method
- /**
- * Called when an undo operation on the buffer ends.
- * @param buffer The buffer in question
- */
- void endUndo(JEditBuffer buffer);
- //}}}
-
- //{{{ beginRedo() method
- /**
- * Called when a redo on the buffer begins.
- * @param buffer The buffer in question
- */
- void beginRedo(JEditBuffer buffer);
- //}}}
-
- //{{{ endRedo() method
- /**
- * Called when a redo on the buffer ends.
- * @param buffer The buffer in question
- */
- void endRedo(JEditBuffer buffer);
- //}}}
-}
+/*
+ * BufferUndoListener.java - Buffer undo listener interface
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2009 Shlomy Reinstein
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+/**
+ * A interface for notification of buffer undo/redo actions.
+ *
+ * This interface makes it easier for undo-aware plugins to process
+ * undo/redo actions in a buffer.
+ *
+ * Buffer undo listeners are added and removed from a buffer using
+ * <code>JEditBuffer.addBufferUndoListener<code> and
+ * <code>JEditBuffer.removeBufferUndoListener<code>, respectively.
+ *
+ * @author Shlomy Reinstein
+ * @version $Id: BufferUndoListener.java 16098 2009-08-27 21:59:29Z shlomy $
+ * @since jEdit 4.3pre18
+ */
+public interface BufferUndoListener
+{
+ //{{{ beginUndo() method
+ /**
+ * Called when an undo operation on the buffer begins.
+ * @param buffer The buffer in question
+ */
+ void beginUndo(JEditBuffer buffer);
+ //}}}
+
+ //{{{ endUndo() method
+ /**
+ * Called when an undo operation on the buffer ends.
+ * @param buffer The buffer in question
+ */
+ void endUndo(JEditBuffer buffer);
+ //}}}
+
+ //{{{ beginRedo() method
+ /**
+ * Called when a redo on the buffer begins.
+ * @param buffer The buffer in question
+ */
+ void beginRedo(JEditBuffer buffer);
+ //}}}
+
+ //{{{ endRedo() method
+ /**
+ * Called when a redo on the buffer ends.
+ * @param buffer The buffer in question
+ */
+ void endRedo(JEditBuffer buffer);
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/ContentManager.java b/jEdit/org/gjt/sp/jedit/buffer/ContentManager.java
index ad882f3..804208a 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/ContentManager.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/ContentManager.java
@@ -1,240 +1,245 @@
-/*
- * ContentManager.java - Manages text content
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-import javax.swing.text.Segment;
-
-/**
- * A class internal to jEdit's document model. You should not use it
- * directly. To improve performance, none of the methods in this class
- * check for out of bounds access, nor are they thread-safe. The
- * <code>Buffer</code> class, through which these methods must be
- * called through, implements such protection.
- *
- * @author Slava Pestov
- * @version $Id: ContentManager.java 16338 2009-10-14 09:59:08Z kpouer $
- * @since jEdit 4.0pre1
- */
-public class ContentManager
-{
- //{{{ getLength() method
- public final int getLength()
- {
- return length;
- } //}}}
-
- //{{{ getText() methods
- public String getText(int start, int len)
- {
- if(start >= gapStart)
- return new String(text,start + gapEnd - gapStart,len);
- else if(start + len <= gapStart)
- return new String(text,start,len);
- else
- {
- return new String(text,start,gapStart - start)
- .concat(new String(text,gapEnd,start + len - gapStart));
- }
- }
-
- /**
- * Returns the specified text range in a <code>Segment</code>.<p>
- *
- * Using a <classname>Segment</classname> is generally more
- * efficient than using a <classname>String</classname> because it
- * results in less memory allocation and array copying.<p>
- *
- *
- * @param start The start offset
- * @param len The number of characters to get
- * @param seg The segment to copy the text to
- * @see JEditBuffer#getText(int, int, Segment)
- */
- public void getText(int start, int len, Segment seg)
- {
- if(start >= gapStart)
- {
- seg.array = text;
- seg.offset = start + gapEnd - gapStart;
- seg.count = len;
- }
- else if(start + len <= gapStart)
- {
- seg.array = text;
- seg.offset = start;
- seg.count = len;
- }
- else
- {
- seg.array = new char[len];
-
- // copy text before gap
- System.arraycopy(text,start,seg.array,0,gapStart - start);
-
- // copy text after gap
- System.arraycopy(text,gapEnd,seg.array,gapStart - start,
- len + start - gapStart);
-
- seg.offset = 0;
- seg.count = len;
- }
- } //}}}
-
- //{{{ getSegment() method
- /**
- * Returns a read-only segment of the buffer.
- *
- * @since jEdit 4.3pre15
- */
- public CharSequence getSegment(int start, int len)
- {
- if(start >= gapStart)
- return new BufferSegment(text,start + gapEnd - gapStart,len);
- else if(start + len <= gapStart)
- return new BufferSegment(text,start,len);
- else
- {
- return new BufferSegment(text,start,gapStart - start,
- new BufferSegment(text,gapEnd,start + len - gapStart));
- }
- } //}}}
-
- //{{{ insert() methods
- public void insert(int start, String str)
- {
- int len = str.length();
- moveGapStart(start);
- if(gapEnd - gapStart < len)
- {
- ensureCapacity(length + len + 1024);
- moveGapEnd(start + len + 1024);
- }
-
- str.getChars(0,len,text,start);
- gapStart += len;
- length += len;
- }
-
- /**
- * Inserts the given data into the buffer.
- *
- * @since jEdit 4.3pre15
- */
- public void insert(int start, CharSequence str)
- {
- int len = str.length();
- moveGapStart(start);
- if(gapEnd - gapStart < len)
- {
- ensureCapacity(length + len + 1024);
- moveGapEnd(start + len + 1024);
- }
-
- for (int i = 0; i < len; i++)
- {
- text[start+i] = str.charAt(i);
- }
- gapStart += len;
- length += len;
- }
-
- public void insert(int start, Segment seg)
- {
- moveGapStart(start);
- if(gapEnd - gapStart < seg.count)
- {
- ensureCapacity(length + seg.count + 1024);
- moveGapEnd(start + seg.count + 1024);
- }
-
- System.arraycopy(seg.array,seg.offset,text,start,seg.count);
- gapStart += seg.count;
- length += seg.count;
- } //}}}
-
- //{{{ _setContent() method
- public void _setContent(char[] text, int length)
- {
- this.text = text;
- this.gapStart = this.gapEnd = 0;
- this.length = length;
- } //}}}
-
- //{{{ remove() method
- public void remove(int start, int len)
- {
- moveGapStart(start);
- gapEnd += len;
- length -= len;
- } //}}}
-
- //{{{ Private members
- private char[] text;
- private int gapStart;
- private int gapEnd;
- private int length;
-
- //{{{ moveGapStart() method
- private void moveGapStart(int newStart)
- {
- int newEnd = gapEnd + (newStart - gapStart);
-
- if(newStart == gapStart)
- {
- // nothing to do
- }
- else if(newStart > gapStart)
- {
- System.arraycopy(text,gapEnd,text,gapStart,
- newStart - gapStart);
- }
- else if(newStart < gapStart)
- {
- System.arraycopy(text,newStart,text,newEnd,
- gapStart - newStart);
- }
-
- gapStart = newStart;
- gapEnd = newEnd;
- } //}}}
-
- //{{{ moveGapEnd() method
- private void moveGapEnd(int newEnd)
- {
- System.arraycopy(text,gapEnd,text,newEnd,length - gapStart);
- gapEnd = newEnd;
- } //}}}
-
- //{{{ ensureCapacity() method
- private void ensureCapacity(int capacity)
- {
- if(capacity >= text.length)
- {
- char[] textN = new char[capacity * 2];
- System.arraycopy(text,0,textN,0,length + (gapEnd - gapStart));
- text = textN;
- }
- } //}}}
-
- //}}}
-}
+/*
+ * ContentManager.java - Manages text content
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+import javax.swing.text.Segment;
+
+/**
+ * A class internal to jEdit's document model. You should not use it
+ * directly. To improve performance, none of the methods in this class
+ * check for out of bounds access, nor are they thread-safe. The
+ * <code>Buffer</code> class, through which these methods must be
+ * called through, implements such protection.
+ *
+ * @author Slava Pestov
+ * @version $Id: ContentManager.java 17813 2010-05-12 14:20:37Z k_satoda $
+ * @since jEdit 4.0pre1
+ */
+class ContentManager
+{
+ //{{{ getLength() method
+ public final int getLength()
+ {
+ return length;
+ } //}}}
+
+ //{{{ getText() methods
+ public String getText(int start, int len)
+ {
+ if(start >= gapStart)
+ return new String(text,start + gapEnd - gapStart,len);
+ else if(start + len <= gapStart)
+ return new String(text,start,len);
+ else
+ {
+ return new String(text,start,gapStart - start)
+ .concat(new String(text,gapEnd,start + len - gapStart));
+ }
+ }
+
+ /**
+ * Returns the specified text range in a <code>Segment</code>.<p>
+ *
+ * Using a <classname>Segment</classname> is generally more
+ * efficient than using a <classname>String</classname> because it
+ * results in less memory allocation and array copying.<p>
+ *
+ *
+ * @param start The start offset
+ * @param len The number of characters to get
+ * @param seg The segment to copy the text to
+ * @see JEditBuffer#getText(int, int, Segment)
+ */
+ public void getText(int start, int len, Segment seg)
+ {
+ if(start >= gapStart)
+ {
+ seg.array = text;
+ seg.offset = start + gapEnd - gapStart;
+ seg.count = len;
+ }
+ else if(start + len <= gapStart)
+ {
+ seg.array = text;
+ seg.offset = start;
+ seg.count = len;
+ }
+ else
+ {
+ seg.array = new char[len];
+
+ // copy text before gap
+ System.arraycopy(text,start,seg.array,0,gapStart - start);
+
+ // copy text after gap
+ System.arraycopy(text,gapEnd,seg.array,gapStart - start,
+ len + start - gapStart);
+
+ seg.offset = 0;
+ seg.count = len;
+ }
+ } //}}}
+
+ //{{{ getSegment() method
+ /**
+ * Returns a read-only segment of the buffer.
+ * It doesn't copy the text
+ *
+ * @param start The start offset
+ * @param len The number of characters to get
+ *
+ * @return a CharSequence that contains the text wanted text
+ * @since jEdit 4.3pre15
+ */
+ public CharSequence getSegment(int start, int len)
+ {
+ if(start >= gapStart)
+ return new BufferSegment(text,start + gapEnd - gapStart,len);
+ else if(start + len <= gapStart)
+ return new BufferSegment(text,start,len);
+ else
+ {
+ return new BufferSegment(text,start,gapStart - start,
+ new BufferSegment(text,gapEnd,start + len - gapStart));
+ }
+ } //}}}
+
+ //{{{ insert() methods
+ public void insert(int start, String str)
+ {
+ int len = str.length();
+ moveGapStart(start);
+ if(gapEnd - gapStart < len)
+ {
+ ensureCapacity(length + len + 1024);
+ moveGapEnd(start + len + 1024);
+ }
+
+ str.getChars(0,len,text,start);
+ gapStart += len;
+ length += len;
+ }
+
+ /**
+ * Inserts the given data into the buffer.
+ *
+ * @since jEdit 4.3pre15
+ */
+ public void insert(int start, CharSequence str)
+ {
+ int len = str.length();
+ moveGapStart(start);
+ if(gapEnd - gapStart < len)
+ {
+ ensureCapacity(length + len + 1024);
+ moveGapEnd(start + len + 1024);
+ }
+
+ for (int i = 0; i < len; i++)
+ {
+ text[start+i] = str.charAt(i);
+ }
+ gapStart += len;
+ length += len;
+ }
+
+ public void insert(int start, Segment seg)
+ {
+ moveGapStart(start);
+ if(gapEnd - gapStart < seg.count)
+ {
+ ensureCapacity(length + seg.count + 1024);
+ moveGapEnd(start + seg.count + 1024);
+ }
+
+ System.arraycopy(seg.array,seg.offset,text,start,seg.count);
+ gapStart += seg.count;
+ length += seg.count;
+ } //}}}
+
+ //{{{ _setContent() method
+ public void _setContent(char[] text, int length)
+ {
+ this.text = text;
+ this.gapStart = this.gapEnd = 0;
+ this.length = length;
+ } //}}}
+
+ //{{{ remove() method
+ public void remove(int start, int len)
+ {
+ moveGapStart(start);
+ gapEnd += len;
+ length -= len;
+ } //}}}
+
+ //{{{ Private members
+ private char[] text;
+ private int gapStart;
+ private int gapEnd;
+ private int length;
+
+ //{{{ moveGapStart() method
+ private void moveGapStart(int newStart)
+ {
+ int newEnd = gapEnd + (newStart - gapStart);
+
+ if(newStart == gapStart)
+ {
+ // nothing to do
+ }
+ else if(newStart > gapStart)
+ {
+ System.arraycopy(text,gapEnd,text,gapStart,
+ newStart - gapStart);
+ }
+ else if(newStart < gapStart)
+ {
+ System.arraycopy(text,newStart,text,newEnd,
+ gapStart - newStart);
+ }
+
+ gapStart = newStart;
+ gapEnd = newEnd;
+ } //}}}
+
+ //{{{ moveGapEnd() method
+ private void moveGapEnd(int newEnd)
+ {
+ System.arraycopy(text,gapEnd,text,newEnd,length - gapStart);
+ gapEnd = newEnd;
+ } //}}}
+
+ //{{{ ensureCapacity() method
+ private void ensureCapacity(int capacity)
+ {
+ if(capacity >= text.length)
+ {
+ char[] textN = new char[capacity * 2];
+ System.arraycopy(text,0,textN,0,length + (gapEnd - gapStart));
+ text = textN;
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/DefaultFoldHandlerProvider.java b/jEdit/org/gjt/sp/jedit/buffer/DefaultFoldHandlerProvider.java
index d11b94a..85e8c18 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/DefaultFoldHandlerProvider.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/DefaultFoldHandlerProvider.java
@@ -1,69 +1,69 @@
-/*
- * DummyFoldHandler.java - Fold handler used when folding is switched off
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- * Portions copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.buffer;
-
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * @author Matthieu Casanova
- * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
- */
-public class DefaultFoldHandlerProvider implements FoldHandlerProvider
-{
- private final Map<String, FoldHandler> folds = new HashMap<String, FoldHandler>();
- /**
- * Returns the fold handler with the specified name, or null if
- * there is no registered handler with that name.
- *
- * @param name The name of the desired fold handler
- * @return the FoldHandler or null if it doesn't exist
- * @since jEdit 4.3pre10
- */
- public FoldHandler getFoldHandler(String name)
- {
- return folds.get(name);
- }
-
- /**
- * Returns an array containing the names of all registered fold
- * handlers.
- *
- * @since jEdit 4.0pre6
- */
- public String[] getFoldModes()
- {
- return folds.keySet().toArray(new String[folds.size()]);
- }
-
- /**
- * Add a new FoldHander.
- *
- * @param foldHandler the new foldHandler
- * @since jEdit 4.3pre13
- */
- public void addFoldHandler(FoldHandler foldHandler)
- {
- folds.put(foldHandler.getName(), foldHandler);
- }
-}
+/*
+ * DummyFoldHandler.java - Fold handler used when folding is switched off
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ * Portions copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.buffer;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author Matthieu Casanova
+ * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
+ */
+public class DefaultFoldHandlerProvider implements FoldHandlerProvider
+{
+ private final Map<String, FoldHandler> folds = new HashMap<String, FoldHandler>();
+ /**
+ * Returns the fold handler with the specified name, or null if
+ * there is no registered handler with that name.
+ *
+ * @param name The name of the desired fold handler
+ * @return the FoldHandler or null if it doesn't exist
+ * @since jEdit 4.3pre10
+ */
+ public FoldHandler getFoldHandler(String name)
+ {
+ return folds.get(name);
+ }
+
+ /**
+ * Returns an array containing the names of all registered fold
+ * handlers.
+ *
+ * @since jEdit 4.0pre6
+ */
+ public String[] getFoldModes()
+ {
+ return folds.keySet().toArray(new String[folds.size()]);
+ }
+
+ /**
+ * Add a new FoldHander.
+ *
+ * @param foldHandler the new foldHandler
+ * @since jEdit 4.3pre13
+ */
+ public void addFoldHandler(FoldHandler foldHandler)
+ {
+ folds.put(foldHandler.getName(), foldHandler);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/DummyFoldHandler.java b/jEdit/org/gjt/sp/jedit/buffer/DummyFoldHandler.java
index 1dd92ba..a4ea45b 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/DummyFoldHandler.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/DummyFoldHandler.java
@@ -1,56 +1,56 @@
-/*
- * DummyFoldHandler.java - Fold handler used when folding is switched off
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-import javax.swing.text.Segment;
-
-/**
- * A fold handler that does nothing.
- * @author Slava Pestov
- * @version $Id: DummyFoldHandler.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.0pre1
- */
-public class DummyFoldHandler extends FoldHandler
-{
- //{{{ DummyFoldHandler constructor
- public DummyFoldHandler()
- {
- super("none");
- }
- //}}}
-
- //{{{ getFoldLevel() method
- /**
- * Returns the fold level of the specified line.
- * @param buffer The buffer in question
- * @param lineIndex The line index
- * @param seg A segment the fold handler can use to obtain any
- * text from the buffer, if necessary
- * @return The fold level of the specified line
- * @since jEdit 4.0pre1
- */
- public int getFoldLevel(JEditBuffer buffer, int lineIndex, Segment seg)
- {
- return 0;
- } //}}}
-}
+/*
+ * DummyFoldHandler.java - Fold handler used when folding is switched off
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+import javax.swing.text.Segment;
+
+/**
+ * A fold handler that does nothing.
+ * @author Slava Pestov
+ * @version $Id: DummyFoldHandler.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.0pre1
+ */
+public class DummyFoldHandler extends FoldHandler
+{
+ //{{{ DummyFoldHandler constructor
+ public DummyFoldHandler()
+ {
+ super("none");
+ }
+ //}}}
+
+ //{{{ getFoldLevel() method
+ /**
+ * Returns the fold level of the specified line.
+ * @param buffer The buffer in question
+ * @param lineIndex The line index
+ * @param seg A segment the fold handler can use to obtain any
+ * text from the buffer, if necessary
+ * @return The fold level of the specified line
+ * @since jEdit 4.0pre1
+ */
+ public int getFoldLevel(JEditBuffer buffer, int lineIndex, Segment seg)
+ {
+ return 0;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/ExplicitFoldHandler.java b/jEdit/org/gjt/sp/jedit/buffer/ExplicitFoldHandler.java
index b7ada0e..64fb8f9 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/ExplicitFoldHandler.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/ExplicitFoldHandler.java
@@ -1,99 +1,99 @@
-/*
- * ExplicitFoldHandler.java - Explicit fold handler
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-import javax.swing.text.Segment;
-
-/**
- * A fold handler that folds lines based on markers ("{{{" and "}}}")
- * embedded in the text.
- *
- * @author Slava Pestov
- * @version $Id: ExplicitFoldHandler.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.0pre1
- */
-public class ExplicitFoldHandler extends FoldHandler
-{
- //{{{ ExplicitFoldHandler constructor
- public ExplicitFoldHandler()
- {
- super("explicit");
- } //}}}
-
- //{{{ getFoldLevel() method
- /**
- * Returns the fold level of the specified line.
- * @param buffer The buffer in question
- * @param lineIndex The line index
- * @param seg A segment the fold handler can use to obtain any
- * text from the buffer, if necessary
- * @return The fold level of the specified line
- * @since jEdit 4.0pre1
- */
- public int getFoldLevel(JEditBuffer buffer, int lineIndex, Segment seg)
- {
- if(lineIndex == 0)
- return 0;
- else
- {
- int foldLevel = buffer.getFoldLevel(lineIndex - 1);
-
- buffer.getLineText(lineIndex - 1,seg);
-
- int offset = seg.offset;
- int count = seg.count;
-
- int openingBrackets = 0, closingBrackets = 0;
- for(int i = 0; i < count; i++)
- {
- switch(seg.array[offset + i])
- {
- case '{':
- closingBrackets = 0;
- openingBrackets++;
- if(openingBrackets == 3)
- {
- foldLevel++;
- openingBrackets = 0;
- }
- break;
- case '}':
- openingBrackets = 0;
- closingBrackets++;
- if(closingBrackets == 3)
- {
- if(foldLevel > 0)
- foldLevel--;
- closingBrackets = 0;
- }
- break;
- default:
- closingBrackets = openingBrackets = 0;
- break;
- }
- }
-
- return foldLevel;
- }
- } //}}}
-}
+/*
+ * ExplicitFoldHandler.java - Explicit fold handler
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+import javax.swing.text.Segment;
+
+/**
+ * A fold handler that folds lines based on markers ("{{{" and "}}}")
+ * embedded in the text.
+ *
+ * @author Slava Pestov
+ * @version $Id: ExplicitFoldHandler.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.0pre1
+ */
+public class ExplicitFoldHandler extends FoldHandler
+{
+ //{{{ ExplicitFoldHandler constructor
+ public ExplicitFoldHandler()
+ {
+ super("explicit");
+ } //}}}
+
+ //{{{ getFoldLevel() method
+ /**
+ * Returns the fold level of the specified line.
+ * @param buffer The buffer in question
+ * @param lineIndex The line index
+ * @param seg A segment the fold handler can use to obtain any
+ * text from the buffer, if necessary
+ * @return The fold level of the specified line
+ * @since jEdit 4.0pre1
+ */
+ public int getFoldLevel(JEditBuffer buffer, int lineIndex, Segment seg)
+ {
+ if(lineIndex == 0)
+ return 0;
+ else
+ {
+ int foldLevel = buffer.getFoldLevel(lineIndex - 1);
+
+ buffer.getLineText(lineIndex - 1,seg);
+
+ int offset = seg.offset;
+ int count = seg.count;
+
+ int openingBrackets = 0, closingBrackets = 0;
+ for(int i = 0; i < count; i++)
+ {
+ switch(seg.array[offset + i])
+ {
+ case '{':
+ closingBrackets = 0;
+ openingBrackets++;
+ if(openingBrackets == 3)
+ {
+ foldLevel++;
+ openingBrackets = 0;
+ }
+ break;
+ case '}':
+ openingBrackets = 0;
+ closingBrackets++;
+ if(closingBrackets == 3)
+ {
+ if(foldLevel > 0)
+ foldLevel--;
+ closingBrackets = 0;
+ }
+ break;
+ default:
+ closingBrackets = openingBrackets = 0;
+ break;
+ }
+ }
+
+ return foldLevel;
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/FoldHandler.java b/jEdit/org/gjt/sp/jedit/buffer/FoldHandler.java
index fdbe7f8..f4ac82c 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/FoldHandler.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/FoldHandler.java
@@ -1,162 +1,162 @@
-/*
- * FoldHandler.java - Fold handler interface
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-import java.util.List;
-
-import javax.swing.text.Segment;
-
-/**
- * Interface for obtaining the fold level of a specified line.<p>
- *
- * Plugins can provide fold handlers by defining entries in their
- * <code>services.xml</code> files like so:
- *
- * <pre><SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="<i>name</i>">
- * new <i>MyFoldHandler<i>();
- *</SERVICE></pre>
- *
- * See {@link org.gjt.sp.jedit.ServiceManager} for details.
- *
- * @author Slava Pestov
- * @version $Id: FoldHandler.java 16133 2009-08-31 21:07:15Z shlomy $
- * @since jEdit 4.3pre3
- */
-public abstract class FoldHandler
-{
- /**
- * The service type. See {@link org.gjt.sp.jedit.ServiceManager}.
- * @since jEdit 4.2pre1
- * @deprecated use {@link org.gjt.sp.jedit.ServiceManager.ServiceFoldHandlerProvider}
- */
- @Deprecated
- public static final String SERVICE = "org.gjt.sp.jedit.buffer.FoldHandler";
-
- /** The FoldHandlerProvider. */
- public static FoldHandlerProvider foldHandlerProvider;
-
- //{{{ getName() method
- /**
- * Returns the internal name of this FoldHandler
- * @return The internal name of this FoldHandler
- * @since jEdit 4.0pre6
- */
- public String getName()
- {
- return name;
- }
- //}}}
-
- //{{{ getFoldLevel() method
- /**
- * Returns the fold level of the specified line.
- * @param buffer The buffer in question
- * @param lineIndex The line index
- * @param seg A segment the fold handler can use to obtain any
- * text from the buffer, if necessary
- * @return The fold level of the specified line
- * @since jEdit 4.0pre1
- */
- public abstract int getFoldLevel(JEditBuffer buffer, int lineIndex, Segment seg);
- //}}}
-
- //{{{ getPrecedingFoldLevels() method
- /**
- * Returns the fold levels of the lines preceding the specified line,
- * which depend on the specified line.
- * @param buffer The buffer in question
- * @param lineIndex The line index
- * @param seg A segment the fold handler can use to obtain any
- * @param lineFoldLevel The fold level of the specified line
- * @return The fold levels of the preceding lines, in decreasing line
- * number order (i.e. bottomost line first).
- * @since jEdit 4.3pre18
- */
- public List<Integer> getPrecedingFoldLevels(JEditBuffer buffer,
- int lineIndex, Segment seg, int lineFoldLevel)
- {
- return null;
- }
- //}}}
-
- //{{{ equals() method
- /**
- * Returns if the specified fold handler is equal to this one.
- * @param o The object
- */
- public boolean equals(Object o)
- {
- // Default implementation... subclasses can extend this.
- if(o == null)
- return false;
- else
- return getClass() == o.getClass();
- } //}}}
-
- //{{{ hashCode() method
- public int hashCode()
- {
- return getClass().hashCode();
- } //}}}
-
- //{{{ getFoldHandler() method
- /**
- * Returns the fold handler with the specified name, or null if
- * there is no registered handler with that name.
- * @param name The name of the desired fold handler
- * @since jEdit 4.0pre6
- */
- public static FoldHandler getFoldHandler(String name)
- {
- return foldHandlerProvider.getFoldHandler(name);
- }
- //}}}
-
- //{{{ getFoldModes() method
- /**
- * Returns an array containing the names of all registered fold
- * handlers.
- *
- * @since jEdit 4.0pre6
- */
- public static String[] getFoldModes()
- {
- return foldHandlerProvider.getFoldModes();
- }
- //}}}
-
- //{{{ FoldHandler() constructor
- protected FoldHandler(String name)
- {
- this.name = name;
- }
- //}}}
-
- //{{{ toString() method
- public String toString()
- {
- return name;
- } //}}}
-
- private String name;
-}
+/*
+ * FoldHandler.java - Fold handler interface
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+import java.util.List;
+
+import javax.swing.text.Segment;
+
+/**
+ * Interface for obtaining the fold level of a specified line.<p>
+ *
+ * Plugins can provide fold handlers by defining entries in their
+ * <code>services.xml</code> files like so:
+ *
+ * <pre><SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="<i>name</i>">
+ * new <i>MyFoldHandler<i>();
+ *</SERVICE></pre>
+ *
+ * See {@link org.gjt.sp.jedit.ServiceManager} for details.
+ *
+ * @author Slava Pestov
+ * @version $Id: FoldHandler.java 18013 2010-06-08 12:32:48Z kpouer $
+ * @since jEdit 4.3pre3
+ */
+public abstract class FoldHandler
+{
+ /**
+ * The service type. See {@link org.gjt.sp.jedit.ServiceManager}.
+ * @since jEdit 4.2pre1
+ * @deprecated use {@link org.gjt.sp.jedit.ServiceManager.ServiceFoldHandlerProvider}
+ */
+ @Deprecated
+ public static final String SERVICE = "org.gjt.sp.jedit.buffer.FoldHandler";
+
+ /** The FoldHandlerProvider. */
+ public static FoldHandlerProvider foldHandlerProvider;
+
+ //{{{ getName() method
+ /**
+ * Returns the internal name of this FoldHandler
+ * @return The internal name of this FoldHandler
+ * @since jEdit 4.0pre6
+ */
+ public String getName()
+ {
+ return name;
+ }
+ //}}}
+
+ //{{{ getFoldLevel() method
+ /**
+ * Returns the fold level of the specified line.
+ * @param buffer The buffer in question
+ * @param lineIndex The line index
+ * @param seg A segment the fold handler can use to obtain any
+ * text from the buffer, if necessary
+ * @return The fold level of the specified line
+ * @since jEdit 4.0pre1
+ */
+ public abstract int getFoldLevel(JEditBuffer buffer, int lineIndex, Segment seg);
+ //}}}
+
+ //{{{ getPrecedingFoldLevels() method
+ /**
+ * Returns the fold levels of the lines preceding the specified line,
+ * which depend on the specified line.
+ * @param buffer The buffer in question
+ * @param lineIndex The line index
+ * @param seg A segment the fold handler can use to obtain any
+ * @param lineFoldLevel The fold level of the specified line
+ * @return The fold levels of the preceding lines, in decreasing line
+ * number order (i.e. bottomost line first).
+ * @since jEdit 4.3pre18
+ */
+ public List<Integer> getPrecedingFoldLevels(JEditBuffer buffer,
+ int lineIndex, Segment seg, int lineFoldLevel)
+ {
+ return null;
+ }
+ //}}}
+
+ //{{{ equals() method
+ /**
+ * Returns if the specified fold handler is equal to this one.
+ * @param o The object
+ */
+ public boolean equals(Object o)
+ {
+ // Default implementation... subclasses can extend this.
+ if(o == null)
+ return false;
+ else
+ return getClass() == o.getClass();
+ } //}}}
+
+ //{{{ hashCode() method
+ public int hashCode()
+ {
+ return getClass().hashCode();
+ } //}}}
+
+ //{{{ getFoldHandler() method
+ /**
+ * Returns the fold handler with the specified name, or null if
+ * there is no registered handler with that name.
+ * @param name The name of the desired fold handler
+ * @since jEdit 4.0pre6
+ */
+ public static FoldHandler getFoldHandler(String name)
+ {
+ return foldHandlerProvider.getFoldHandler(name);
+ }
+ //}}}
+
+ //{{{ getFoldModes() method
+ /**
+ * Returns an array containing the names of all registered fold
+ * handlers.
+ *
+ * @since jEdit 4.0pre6
+ */
+ public static String[] getFoldModes()
+ {
+ return foldHandlerProvider.getFoldModes();
+ }
+ //}}}
+
+ //{{{ FoldHandler() constructor
+ protected FoldHandler(String name)
+ {
+ this.name = name;
+ }
+ //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return name;
+ } //}}}
+
+ private final String name;
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/FoldHandlerProvider.java b/jEdit/org/gjt/sp/jedit/buffer/FoldHandlerProvider.java
index 189b142..37a5a50 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/FoldHandlerProvider.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/FoldHandlerProvider.java
@@ -1,48 +1,48 @@
-/*
- * FoldHandlerProvider.java - Fold handler provider interface
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-/**
- * @author Matthieu Casanova
- * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
- * @since jEdit 4.3pre10
- */
-public interface FoldHandlerProvider
-{
- /**
- * Returns the fold handler with the specified name, or null if
- * there is no registered handler with that name.
- * @param name The name of the desired fold handler
- * @return the FoldHandler or null if it doesn't exist
- * @since jEdit 4.3pre10
- */
- FoldHandler getFoldHandler(String name);
-
- /**
- * Returns an array containing the names of all registered fold
- * handlers.
- *
- * @since jEdit 4.0pre6
- */
- String[] getFoldModes();
-}
+/*
+ * FoldHandlerProvider.java - Fold handler provider interface
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+/**
+ * @author Matthieu Casanova
+ * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
+ * @since jEdit 4.3pre10
+ */
+public interface FoldHandlerProvider
+{
+ /**
+ * Returns the fold handler with the specified name, or null if
+ * there is no registered handler with that name.
+ * @param name The name of the desired fold handler
+ * @return the FoldHandler or null if it doesn't exist
+ * @since jEdit 4.3pre10
+ */
+ FoldHandler getFoldHandler(String name);
+
+ /**
+ * Returns an array containing the names of all registered fold
+ * handlers.
+ *
+ * @since jEdit 4.0pre6
+ */
+ String[] getFoldModes();
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/IndentFoldHandler.java b/jEdit/org/gjt/sp/jedit/buffer/IndentFoldHandler.java
index 31a8587..3dbfaa8 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/IndentFoldHandler.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/IndentFoldHandler.java
@@ -1,136 +1,136 @@
-/*
- * IndentFoldHandler.java - Indent-based fold handler
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.text.Segment;
-
-/**
- * A fold handler that folds lines based on their indent level.
- * @author Slava Pestov
- * @version $Id: IndentFoldHandler.java 16133 2009-08-31 21:07:15Z shlomy $
- * @since jEdit 4.0pre1
- */
-public class IndentFoldHandler extends FoldHandler
-{
- public IndentFoldHandler()
- {
- super("indent");
- }
-
- // Returns the width of leading whitespace in the given segment
- // if it contains non-whitespace characters, or (-1) otherwise.
- private int getLeadingWhitespaceWidth(Segment seg, int tabSize)
- {
- int offset = seg.offset;
- int count = seg.count;
- int whitespace = 0;
-
- for(int i = 0; i < count; i++)
- {
- switch(seg.array[offset + i])
- {
- case ' ':
- whitespace++;
- break;
- case '\t':
- whitespace += (tabSize - whitespace % tabSize);
- break;
- default:
- return whitespace;
- }
- }
- return (-1);
- }
-
- //{{{ getFoldLevel() method
- /**
- * Returns the fold level of the specified line. For a whitespace-only
- * line, returns the fold level of the next non-whitespace line, or
- * the level of the previous line if no non-whitespace line follows or if
- * the level of the previous line is higher.
- * @param buffer The buffer in question
- * @param lineIndex The line index
- * @param seg A segment the fold handler can use to obtain any
- * text from the buffer, if necessary
- * @return The fold level of the specified line
- * @since jEdit 4.0pre1
- */
- public int getFoldLevel(JEditBuffer buffer, int lineIndex, Segment seg)
- {
- int tabSize = buffer.getTabSize();
- // Look for first non-whitespace line starting at lineIndex
- int prevLevel = 0;
- for (int index = lineIndex; index < buffer.getLineCount(); index++)
- {
- buffer.getLineText(index,seg);
- int whitespace = getLeadingWhitespaceWidth(seg,tabSize);
- if(whitespace >= 0) // Non-whitespace found on line
- return (whitespace > prevLevel) ? whitespace : prevLevel;
- if(index == 0)
- return 0;
- if(index == lineIndex)
- prevLevel = buffer.getFoldLevel(lineIndex - 1);
- }
- // All lines from lineIndex are whitespace-only - use fold
- // level of previous line.
- return prevLevel;
- } //}}}
-
- //{{{ getPrecedingFoldLevels() method
- /**
- * Returns the fold levels of the lines preceding the specified line,
- * which depend on the specified line.
- * @param buffer The buffer in question
- * @param lineIndex The line index
- * @param seg A segment the fold handler can use to obtain any
- * @param lineFoldLevel The fold level of the specified line
- * @return The fold levels of the preceding lines, in decreasing line
- * number order (i.e. bottomost line first).
- * @since jEdit 4.3pre18
- */
- public List<Integer> getPrecedingFoldLevels(JEditBuffer buffer,
- int lineIndex, Segment seg, int lineFoldLevel)
- {
- List<Integer> precedingFoldLevels = new ArrayList<Integer>();
- int tabSize = buffer.getTabSize();
- int whitespace = 0;
- int index;
- // Find previous non-whitespace-only line
- for (index = lineIndex - 1; index > 0; index--)
- {
- buffer.getLineText(index,seg);
- whitespace = getLeadingWhitespaceWidth(seg,tabSize);
- if (whitespace >= 0)
- break;
- }
- int max = (lineFoldLevel > whitespace) ? lineFoldLevel : whitespace;
- for (index++; index < lineIndex; index++)
- precedingFoldLevels.add(Integer.valueOf(max));
- return precedingFoldLevels;
- }
- //}}}
-
-}
+/*
+ * IndentFoldHandler.java - Indent-based fold handler
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.text.Segment;
+
+/**
+ * A fold handler that folds lines based on their indent level.
+ * @author Slava Pestov
+ * @version $Id: IndentFoldHandler.java 16133 2009-08-31 21:07:15Z shlomy $
+ * @since jEdit 4.0pre1
+ */
+public class IndentFoldHandler extends FoldHandler
+{
+ public IndentFoldHandler()
+ {
+ super("indent");
+ }
+
+ // Returns the width of leading whitespace in the given segment
+ // if it contains non-whitespace characters, or (-1) otherwise.
+ private int getLeadingWhitespaceWidth(Segment seg, int tabSize)
+ {
+ int offset = seg.offset;
+ int count = seg.count;
+ int whitespace = 0;
+
+ for(int i = 0; i < count; i++)
+ {
+ switch(seg.array[offset + i])
+ {
+ case ' ':
+ whitespace++;
+ break;
+ case '\t':
+ whitespace += (tabSize - whitespace % tabSize);
+ break;
+ default:
+ return whitespace;
+ }
+ }
+ return (-1);
+ }
+
+ //{{{ getFoldLevel() method
+ /**
+ * Returns the fold level of the specified line. For a whitespace-only
+ * line, returns the fold level of the next non-whitespace line, or
+ * the level of the previous line if no non-whitespace line follows or if
+ * the level of the previous line is higher.
+ * @param buffer The buffer in question
+ * @param lineIndex The line index
+ * @param seg A segment the fold handler can use to obtain any
+ * text from the buffer, if necessary
+ * @return The fold level of the specified line
+ * @since jEdit 4.0pre1
+ */
+ public int getFoldLevel(JEditBuffer buffer, int lineIndex, Segment seg)
+ {
+ int tabSize = buffer.getTabSize();
+ // Look for first non-whitespace line starting at lineIndex
+ int prevLevel = 0;
+ for (int index = lineIndex; index < buffer.getLineCount(); index++)
+ {
+ buffer.getLineText(index,seg);
+ int whitespace = getLeadingWhitespaceWidth(seg,tabSize);
+ if(whitespace >= 0) // Non-whitespace found on line
+ return (whitespace > prevLevel) ? whitespace : prevLevel;
+ if(index == 0)
+ return 0;
+ if(index == lineIndex)
+ prevLevel = buffer.getFoldLevel(lineIndex - 1);
+ }
+ // All lines from lineIndex are whitespace-only - use fold
+ // level of previous line.
+ return prevLevel;
+ } //}}}
+
+ //{{{ getPrecedingFoldLevels() method
+ /**
+ * Returns the fold levels of the lines preceding the specified line,
+ * which depend on the specified line.
+ * @param buffer The buffer in question
+ * @param lineIndex The line index
+ * @param seg A segment the fold handler can use to obtain any
+ * @param lineFoldLevel The fold level of the specified line
+ * @return The fold levels of the preceding lines, in decreasing line
+ * number order (i.e. bottomost line first).
+ * @since jEdit 4.3pre18
+ */
+ public List<Integer> getPrecedingFoldLevels(JEditBuffer buffer,
+ int lineIndex, Segment seg, int lineFoldLevel)
+ {
+ List<Integer> precedingFoldLevels = new ArrayList<Integer>();
+ int tabSize = buffer.getTabSize();
+ int whitespace = 0;
+ int index;
+ // Find previous non-whitespace-only line
+ for (index = lineIndex - 1; index > 0; index--)
+ {
+ buffer.getLineText(index,seg);
+ whitespace = getLeadingWhitespaceWidth(seg,tabSize);
+ if (whitespace >= 0)
+ break;
+ }
+ int max = (lineFoldLevel > whitespace) ? lineFoldLevel : whitespace;
+ for (index++; index < lineIndex; index++)
+ precedingFoldLevels.add(Integer.valueOf(max));
+ return precedingFoldLevels;
+ }
+ //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/JEditBuffer.java b/jEdit/org/gjt/sp/jedit/buffer/JEditBuffer.java
index 59efc77..3032ac2 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/JEditBuffer.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/JEditBuffer.java
@@ -1,2778 +1,2808 @@
-/*
- * JEditBuffer.java - jEdit buffer
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2005 Slava Pestov
- * Portions copyright (C) 1999, 2000 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-//{{{ Imports
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.jedit.Mode;
-import org.gjt.sp.jedit.TextUtilities;
-import org.gjt.sp.jedit.indent.IndentAction;
-import org.gjt.sp.jedit.indent.IndentRule;
-import org.gjt.sp.jedit.syntax.*;
-import org.gjt.sp.jedit.textarea.TextArea;
-import org.gjt.sp.util.IntegerArray;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-
-import javax.swing.text.Position;
-import javax.swing.text.Segment;
-import java.awt.*;
-import java.util.*;
-import java.util.List;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.regex.Pattern;
-//}}}
-
-/**
- * A <code>JEditBuffer</code> represents the contents of an open text
- * file as it is maintained in the computer's memory (as opposed to
- * how it may be stored on a disk).<p>
- *
- * This class is partially thread-safe, however you must pay attention to two
- * very important guidelines:
- * <ul>
- * <li>Changes to a buffer can only be made from the AWT thread.
- * <li>When accessing the buffer from another thread, you must
- * grab a read lock if you plan on performing more than one call, to ensure that
- * the buffer contents are not changed by the AWT thread for the duration of the
- * lock. Only methods whose descriptions specify thread safety can be invoked
- * from other threads.
- * </ul>
- *
- * @author Slava Pestov
- * @version $Id: JEditBuffer.java 17654 2010-04-16 10:59:28Z kpouer $
- *
- * @since jEdit 4.3pre3
- */
-public class JEditBuffer
-{
- /**
- * Line separator property.
- */
- public static final String LINESEP = "lineSeparator";
-
- /**
- * Character encoding used when loading and saving.
- * @since jEdit 3.2pre4
- */
- public static final String ENCODING = "encoding";
-
- //{{{ JEditBuffer constructors
- public JEditBuffer(Map props)
- {
- bufferListeners = new Vector<Listener>();
- lock = new ReentrantReadWriteLock();
- contentMgr = new ContentManager();
- lineMgr = new LineManager();
- positionMgr = new PositionManager(this);
- undoMgr = new UndoManager(this);
- integerArray = new IntegerArray();
- propertyLock = new Object();
- properties = new HashMap<Object, PropValue>();
-
- //{{{ need to convert entries of 'props' to PropValue instances
- Set<Map.Entry> set = props.entrySet();
- for (Map.Entry entry : set)
- {
- properties.put(entry.getKey(),new PropValue(entry.getValue(),false));
- } //}}}
-
- // fill in defaults for these from system properties if the
- // corresponding buffer.XXX properties not set
- if(getProperty(ENCODING) == null)
- properties.put(ENCODING,new PropValue(System.getProperty("file.encoding"),false));
- if(getProperty(LINESEP) == null)
- properties.put(LINESEP,new PropValue(System.getProperty("line.separator"),false));
- }
-
- /**
- * Create a new JEditBuffer.
- * It is used by independent textarea only
- */
- public JEditBuffer()
- {
- bufferListeners = new Vector<Listener>();
- lock = new ReentrantReadWriteLock();
- contentMgr = new ContentManager();
- lineMgr = new LineManager();
- positionMgr = new PositionManager(this);
- undoMgr = new UndoManager(this);
- integerArray = new IntegerArray();
- propertyLock = new Object();
- properties = new HashMap<Object, PropValue>();
-
- properties.put("wrap",new PropValue("none",false));
- properties.put("folding",new PropValue("none",false));
- tokenMarker = new TokenMarker();
- tokenMarker.addRuleSet(new ParserRuleSet("text","MAIN"));
- setTokenMarker(tokenMarker);
-
- loadText(null,null);
- // corresponding buffer.XXX properties not set
- if(getProperty(ENCODING) == null)
- properties.put(ENCODING,new PropValue(System.getProperty("file.encoding"),false));
- if(getProperty(LINESEP) == null)
- properties.put(LINESEP,new PropValue(System.getProperty("line.separator"),false));
-
- setFoldHandler(new DummyFoldHandler());
- } //}}}
-
- //{{{ Flags
-
- //{{{ isDirty() method
- /**
- * Returns whether there have been unsaved changes to this buffer.
- * This method is thread-safe.
- */
- public boolean isDirty()
- {
- return dirty;
- } //}}}
-
- //{{{ isLoading() method
- public boolean isLoading()
- {
- return loading;
- } //}}}
-
- //{{{ setLoading() method
- public void setLoading(boolean loading)
- {
- this.loading = loading;
- } //}}}
-
- //{{{ isPerformingIO() method
- /**
- * Returns true if the buffer is currently performing I/O.
- * This method is thread-safe.
- * @since jEdit 2.7pre1
- */
- public boolean isPerformingIO()
- {
- return isLoading() || io;
- } //}}}
-
- //{{{ setPerformingIO() method
- /**
- * Returns true if the buffer is currently performing I/O.
- * This method is thread-safe.
- * @since jEdit 2.7pre1
- */
- public void setPerformingIO(boolean io)
- {
- this.io = io;
- } //}}}
-
- //{{{ isEditable() method
- /**
- * Returns true if this file is editable, false otherwise. A file may
- * become uneditable if it is read only, or if I/O is in progress.
- * This method is thread-safe.
- * @since jEdit 2.7pre1
- */
- public boolean isEditable()
- {
- return !(isReadOnly() || isPerformingIO());
- } //}}}
-
- //{{{ isReadOnly() method
- /**
- * Returns true if this file is read only, false otherwise.
- * This method is thread-safe.
- */
- public boolean isReadOnly()
- {
- return readOnly || readOnlyOverride;
- } //}}}
-
- //{{{ setReadOnly() method
- /**
- * Sets the read only flag.
- * @param readOnly The read only flag
- */
- public void setReadOnly(boolean readOnly)
- {
- readOnlyOverride = readOnly;
- } //}}}
-
- //{{{ setDirty() method
- /**
- * Sets the 'dirty' (changed since last save) flag of this buffer.
- */
- public void setDirty(boolean d)
- {
- boolean editable = isEditable();
-
- if(d)
- {
- if(editable)
- dirty = true;
- }
- else
- {
- dirty = false;
-
- // fixes dirty flag not being reset on
- // save/insert/undo/redo/undo
- if(!isUndoInProgress())
- {
- // this ensures that undo can clear the dirty flag properly
- // when all edits up to a save are undone
- undoMgr.resetClearDirty();
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Thread safety
-
- //{{{ readLock() method
- /**
- * The buffer is guaranteed not to change between calls to
- * {@link #readLock()} and {@link #readUnlock()}.
- */
- public void readLock()
- {
- lock.readLock().lock();
- } //}}}
-
- //{{{ readUnlock() method
- /**
- * The buffer is guaranteed not to change between calls to
- * {@link #readLock()} and {@link #readUnlock()}.
- */
- public void readUnlock()
- {
- lock.readLock().unlock();
- } //}}}
-
- //{{{ writeLock() method
- /**
- * Attempting to obtain read lock will block between calls to
- * {@link #writeLock()} and {@link #writeUnlock()}.
- */
- public void writeLock()
- {
- lock.writeLock().lock();
- } //}}}
-
- //{{{ writeUnlock() method
- /**
- * Attempting to obtain read lock will block between calls to
- * {@link #writeLock()} and {@link #writeUnlock()}.
- */
- public void writeUnlock()
- {
- lock.writeLock().unlock();
- } //}}}
-
- //}}}
-
- //{{{ Line offset methods
-
- //{{{ getLength() method
- /**
- * Returns the number of characters in the buffer. This method is thread-safe.
- */
- public int getLength()
- {
- // no need to lock since this just returns a value and that's it
- return contentMgr.getLength();
- } //}}}
-
- //{{{ getLineCount() method
- /**
- * Returns the number of physical lines in the buffer.
- * This method is thread-safe.
- * @since jEdit 3.1pre1
- */
- public int getLineCount()
- {
- // no need to lock since this just returns a value and that's it
- return lineMgr.getLineCount();
- } //}}}
-
- //{{{ getLineOfOffset() method
- /**
- * Returns the line containing the specified offset.
- * This method is thread-safe.
- * @param offset The offset
- * @since jEdit 4.0pre1
- */
- public int getLineOfOffset(int offset)
- {
- try
- {
- readLock();
-
- if(offset < 0 || offset > getLength())
- throw new ArrayIndexOutOfBoundsException(offset);
-
- return lineMgr.getLineOfOffset(offset);
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ getLineStartOffset() method
- /**
- * Returns the start offset of the specified line.
- * This method is thread-safe.
- * @param line The line
- * @return The start offset of the specified line
- * @since jEdit 4.0pre1
- */
- public int getLineStartOffset(int line)
- {
- try
- {
- readLock();
-
- if(line < 0 || line >= lineMgr.getLineCount())
- throw new ArrayIndexOutOfBoundsException(line);
- else if(line == 0)
- return 0;
-
- return lineMgr.getLineEndOffset(line - 1);
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ getLineEndOffset() method
- /**
- * Returns the end offset of the specified line.
- * This method is thread-safe.
- * @param line The line
- * @return The end offset of the specified line
- * invalid.
- * @since jEdit 4.0pre1
- */
- public int getLineEndOffset(int line)
- {
- try
- {
- readLock();
-
- if(line < 0 || line >= lineMgr.getLineCount())
- throw new ArrayIndexOutOfBoundsException(line);
-
- return lineMgr.getLineEndOffset(line);
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ getLineLength() method
- /**
- * Returns the length of the specified line.
- * This method is thread-safe.
- * @param line The line
- * @since jEdit 4.0pre1
- */
- public int getLineLength(int line)
- {
- try
- {
- readLock();
-
- return getLineEndOffset(line)
- - getLineStartOffset(line) - 1;
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ getPriorNonEmptyLine() method
- /**
- * Auto indent needs this.
- */
- public int getPriorNonEmptyLine(int lineIndex)
- {
- int returnValue = -1;
-
- if (!mode.getIgnoreWhitespace())
- {
- return lineIndex - 1;
- }
-
- for(int i = lineIndex - 1; i >= 0; i--)
- {
- Segment seg = new Segment();
- getLineText(i,seg);
- if(seg.count != 0)
- returnValue = i;
- for(int j = 0; j < seg.count; j++)
- {
- char ch = seg.array[seg.offset + j];
- if(!Character.isWhitespace(ch))
- return i;
- }
- }
-
- // didn't find a line that contains non-whitespace chars
- // so return index of prior whitespace line
- return returnValue;
- } //}}}
-
- //}}}
-
- //{{{ Text getters and setters
-
- //{{{ getLineText() methods
- /**
- * Returns the text on the specified line.
- * This method is thread-safe.
- * @param line The line
- * @return The text, or null if the line is invalid
- * @since jEdit 4.0pre1
- */
- public String getLineText(int line)
- {
- if(line < 0 || line >= lineMgr.getLineCount())
- throw new ArrayIndexOutOfBoundsException(line);
-
- try
- {
- readLock();
-
- int start = line == 0 ? 0 : lineMgr.getLineEndOffset(line - 1);
- int end = lineMgr.getLineEndOffset(line);
-
- return getText(start,end - start - 1);
- }
- finally
- {
- readUnlock();
- }
- }
-
- /**
- * Returns the specified line in a <code>Segment</code>.<p>
- *
- * Using a <classname>Segment</classname> is generally more
- * efficient than using a <classname>String</classname> because it
- * results in less memory allocation and array copying.<p>
- *
- * This method is thread-safe.
- *
- * @param line The line
- * @since jEdit 4.0pre1
- */
- public void getLineText(int line, Segment segment)
- {
- if(line < 0 || line >= lineMgr.getLineCount())
- throw new ArrayIndexOutOfBoundsException(line);
-
- try
- {
- readLock();
-
- int start = line == 0 ? 0 : lineMgr.getLineEndOffset(line - 1);
- int end = lineMgr.getLineEndOffset(line);
-
- getText(start,end - start - 1,segment);
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ getLineSegment() method
- /**
- * Returns the text on the specified line.
- * This method is thread-safe.
- *
- * @param line The line index.
- * @return The text, or null if the line is invalid
- *
- * @since jEdit 4.3pre15
- */
- public CharSequence getLineSegment(int line)
- {
- if(line < 0 || line >= lineMgr.getLineCount())
- throw new ArrayIndexOutOfBoundsException(line);
-
- try
- {
- readLock();
-
- int start = line == 0 ? 0 : lineMgr.getLineEndOffset(line - 1);
- int end = lineMgr.getLineEndOffset(line);
-
- return getSegment(start,end - start - 1);
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ getText() methods
- /**
- * Returns the specified text range. This method is thread-safe.
- * @param start The start offset
- * @param length The number of characters to get
- */
- public String getText(int start, int length)
- {
- try
- {
- readLock();
-
- if(start < 0 || length < 0
- || start + length > contentMgr.getLength())
- throw new ArrayIndexOutOfBoundsException(start + ":" + length);
-
- return contentMgr.getText(start,length);
- }
- finally
- {
- readUnlock();
- }
- }
-
- /**
- * Returns the specified text range in a <code>Segment</code>.<p>
- *
- * Using a <classname>Segment</classname> is generally more
- * efficient than using a <classname>String</classname> because it
- * results in less memory allocation and array copying.<p>
- *
- * This method is thread-safe.
- *
- * @param start The start offset
- * @param length The number of characters to get
- * @param seg The segment to copy the text to
- */
- public void getText(int start, int length, Segment seg)
- {
- try
- {
- readLock();
-
- if(start < 0 || length < 0
- || start + length > contentMgr.getLength())
- throw new ArrayIndexOutOfBoundsException(start + ":" + length);
-
- contentMgr.getText(start,length,seg);
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ getSegment() method
- /**
- * Returns the specified text range. This method is thread-safe.
- *
- * @param start The start offset
- * @param length The number of characters to get
- *
- * @since jEdit 4.3pre15
- */
- public CharSequence getSegment(int start, int length)
- {
- try
- {
- readLock();
-
- if(start < 0 || length < 0
- || start + length > contentMgr.getLength())
- throw new ArrayIndexOutOfBoundsException(start + ":" + length);
-
- return contentMgr.getSegment(start,length);
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ insert() methods
- /**
- * Inserts a string into the buffer.
- * @param offset The offset
- * @param str The string
- * @since jEdit 4.0pre1
- */
- public void insert(int offset, String str)
- {
- if(str == null)
- return;
-
- int len = str.length();
-
- if(len == 0)
- return;
-
- if(isReadOnly())
- throw new RuntimeException("buffer read-only");
-
- try
- {
- writeLock();
-
- if(offset < 0 || offset > contentMgr.getLength())
- throw new ArrayIndexOutOfBoundsException(offset);
-
- contentMgr.insert(offset,str);
-
- integerArray.clear();
-
- for(int i = 0; i < len; i++)
- {
- if(str.charAt(i) == '\n')
- integerArray.add(i + 1);
- }
-
- if(!undoInProgress)
- {
- undoMgr.contentInserted(offset,len,str,!dirty);
- }
-
- contentInserted(offset,len,integerArray);
- }
- finally
- {
- writeUnlock();
- }
- }
-
- /**
- * Inserts a string into the buffer.
- * @param offset The offset
- * @param seg The segment
- * @since jEdit 4.0pre1
- */
- public void insert(int offset, Segment seg)
- {
- if(seg.count == 0)
- return;
-
- if(isReadOnly())
- throw new RuntimeException("buffer read-only");
-
- try
- {
- writeLock();
-
- if(offset < 0 || offset > contentMgr.getLength())
- throw new ArrayIndexOutOfBoundsException(offset);
-
- contentMgr.insert(offset,seg);
-
- integerArray.clear();
-
- for(int i = 0; i < seg.count; i++)
- {
- if(seg.array[seg.offset + i] == '\n')
- integerArray.add(i + 1);
- }
-
- if(!undoInProgress)
- {
- undoMgr.contentInserted(offset,seg.count,
- seg.toString(),!dirty);
- }
-
- contentInserted(offset,seg.count,integerArray);
- }
- finally
- {
- writeUnlock();
- }
- } //}}}
-
- //{{{ remove() method
- /**
- * Removes the specified rang efrom the buffer.
- * @param offset The start offset
- * @param length The number of characters to remove
- */
- public void remove(int offset, int length)
- {
- if(length == 0)
- return;
-
- if(isReadOnly())
- throw new RuntimeException("buffer read-only");
-
- try
- {
- transaction = true;
-
- writeLock();
-
- if(offset < 0 || length < 0
- || offset + length > contentMgr.getLength())
- throw new ArrayIndexOutOfBoundsException(offset + ":" + length);
-
- int startLine = lineMgr.getLineOfOffset(offset);
- int endLine = lineMgr.getLineOfOffset(offset + length);
-
- int numLines = endLine - startLine;
-
- if(!undoInProgress && !loading)
- {
- undoMgr.contentRemoved(offset,length,
- getText(offset,length),
- !dirty);
- }
-
- firePreContentRemoved(startLine,offset,numLines,length);
-
- contentMgr.remove(offset,length);
- lineMgr.contentRemoved(startLine,offset,numLines,length);
- positionMgr.contentRemoved(offset,length);
-
- setDirty(true);
-
- fireContentRemoved(startLine,offset,numLines,length);
-
- /* otherwise it will be delivered later */
- if(!undoInProgress && !insideCompoundEdit())
- fireTransactionComplete();
-
- }
- finally
- {
- transaction = false;
-
- writeUnlock();
- }
- } //}}}
-
- //}}}
-
- //{{{ Indentation
-
- //{{{ removeTrailingWhiteSpace() method
- /**
- * Removes trailing whitespace from all lines in the specified list.
- * @param lines The line numbers
- * @since jEdit 3.2pre1
- */
- public void removeTrailingWhiteSpace(int[] lines)
- {
- try
- {
- beginCompoundEdit();
-
- for(int i = 0; i < lines.length; i++)
- {
- int pos, lineStart, lineEnd, tail;
- Segment seg = new Segment();
- getLineText(lines[i],seg);
-
- // blank line
- if (seg.count == 0) continue;
-
- lineStart = seg.offset;
- lineEnd = seg.offset + seg.count - 1;
-
- for (pos = lineEnd; pos >= lineStart; pos--)
- {
- if (!Character.isWhitespace(seg.array[pos]))
- break;
- }
-
- tail = lineEnd - pos;
-
- // no whitespace
- if (tail == 0) continue;
-
- remove(getLineEndOffset(lines[i]) - 1 - tail,tail);
- }
- }
- finally
- {
- endCompoundEdit();
- }
- } //}}}
-
- //{{{ shiftIndentLeft() method
- /**
- * Shifts the indent of each line in the specified list to the left.
- * @param lines The line numbers
- * @since jEdit 3.2pre1
- */
- public void shiftIndentLeft(int[] lines)
- {
- int tabSize = getTabSize();
- int indentSize = getIndentSize();
- boolean noTabs = getBooleanProperty("noTabs");
-
- try
- {
- beginCompoundEdit();
-
- for(int i = 0; i < lines.length; i++)
- {
- int lineStart = getLineStartOffset(lines[i]);
- CharSequence line = getLineSegment(lines[i]);
- int whiteSpace = StandardUtilities
- .getLeadingWhiteSpace(line);
- if(whiteSpace == 0)
- continue;
- int whiteSpaceWidth = Math.max(0,StandardUtilities
- .getLeadingWhiteSpaceWidth(line,tabSize)
- - indentSize);
-
- insert(lineStart + whiteSpace,StandardUtilities
- .createWhiteSpace(whiteSpaceWidth,
- noTabs ? 0 : tabSize));
- remove(lineStart,whiteSpace);
- }
-
- }
- finally
- {
- endCompoundEdit();
- }
- } //}}}
-
- //{{{ shiftIndentRight() method
- /**
- * Shifts the indent of each line in the specified list to the right.
- * @param lines The line numbers
- * @since jEdit 3.2pre1
- */
- public void shiftIndentRight(int[] lines)
- {
- try
- {
- beginCompoundEdit();
-
- int tabSize = getTabSize();
- int indentSize = getIndentSize();
- boolean noTabs = getBooleanProperty("noTabs");
- for(int i = 0; i < lines.length; i++)
- {
- int lineStart = getLineStartOffset(lines[i]);
- CharSequence line = getLineSegment(lines[i]);
- int whiteSpace = StandardUtilities
- .getLeadingWhiteSpace(line);
-
- // silly usability hack
- //if(lines.length != 1 && whiteSpace == 0)
- // continue;
-
- int whiteSpaceWidth = StandardUtilities
- .getLeadingWhiteSpaceWidth(
- line,tabSize) + indentSize;
- insert(lineStart + whiteSpace,StandardUtilities
- .createWhiteSpace(whiteSpaceWidth,
- noTabs ? 0 : tabSize));
- remove(lineStart,whiteSpace);
- }
- }
- finally
- {
- endCompoundEdit();
- }
- } //}}}
-
- //{{{ indentLines() methods
- /**
- * Indents all specified lines.
- * @param start The first line to indent
- * @param end The last line to indent
- * @since jEdit 3.1pre3
- */
- public void indentLines(int start, int end)
- {
- try
- {
- beginCompoundEdit();
- for(int i = start; i <= end; i++)
- indentLine(i,true);
- }
- finally
- {
- endCompoundEdit();
- }
- }
-
- /**
- * Indents all specified lines.
- * @param lines The line numbers
- * @since jEdit 3.2pre1
- */
- public void indentLines(int[] lines)
- {
- try
- {
- beginCompoundEdit();
- for(int i = 0; i < lines.length; i++)
- indentLine(lines[i],true);
- }
- finally
- {
- endCompoundEdit();
- }
- } //}}}
-
- //{{{ indentLine() methods
- /**
- * @deprecated Use {@link #indentLine(int,boolean)} instead.
- */
- @Deprecated
- public boolean indentLine(int lineIndex, boolean canIncreaseIndent,
- boolean canDecreaseIndent)
- {
- return indentLine(lineIndex,canDecreaseIndent);
- }
-
- /**
- * Indents the specified line.
- * @param lineIndex The line number to indent
- * @param canDecreaseIndent If true, the indent can be decreased as a
- * result of this. Set this to false for Tab key.
- * @return true If indentation took place, false otherwise.
- * @since jEdit 4.2pre2
- */
- public boolean indentLine(int lineIndex, boolean canDecreaseIndent)
- {
- int[] whitespaceChars = new int[1];
- int currentIndent = getCurrentIndentForLine(lineIndex,
- whitespaceChars);
- int prevLineIndex = getPriorNonEmptyLine(lineIndex);
- int prevLineIndent = (prevLineIndex == -1) ? 0 :
- StandardUtilities.getLeadingWhiteSpaceWidth(getLineSegment(
- prevLineIndex), getTabSize());
- int idealIndent = getIdealIndentForLine(lineIndex, prevLineIndex,
- prevLineIndent);
-
- if (idealIndent == -1 || idealIndent == currentIndent ||
- (!canDecreaseIndent && idealIndent < currentIndent))
- return false;
-
- // Do it
- try
- {
- beginCompoundEdit();
-
- int start = getLineStartOffset(lineIndex);
-
- remove(start,whitespaceChars[0]);
- String prevIndentString = (prevLineIndex >= 0) ?
- StandardUtilities.getIndentString(getLineText(
- prevLineIndex)) : null;
- String indentString;
- if (prevIndentString == null)
- {
- indentString = StandardUtilities.createWhiteSpace(
- idealIndent,
- getBooleanProperty("noTabs") ? 0 : getTabSize());
- }
- else if (idealIndent == prevLineIndent)
- indentString = prevIndentString;
- else if (idealIndent < prevLineIndent)
- indentString = StandardUtilities.truncateWhiteSpace(
- idealIndent, getTabSize(), prevIndentString);
- else
- indentString = prevIndentString +
- StandardUtilities.createWhiteSpace(
- idealIndent - prevLineIndent,
- getBooleanProperty("noTabs") ? 0 : getTabSize(),
- prevLineIndent);
- insert(start, indentString);
- }
- finally
- {
- endCompoundEdit();
- }
-
- return true;
- } //}}}
-
- //{{{ getCurrentIndentForLine() method
- /**
- * Returns the line's current leading indent.
- * @param lineIndex The line number
- * @param whitespaceChars If this is non-null, the number of whitespace
- * characters is stored at the 0 index
- * @since jEdit 4.2pre2
- */
- public int getCurrentIndentForLine(int lineIndex, int[] whitespaceChars)
- {
- Segment seg = new Segment();
- getLineText(lineIndex,seg);
-
- int tabSize = getTabSize();
-
- int currentIndent = 0;
-loop: for(int i = 0; i < seg.count; i++)
- {
- char c = seg.array[seg.offset + i];
- switch(c)
- {
- case ' ':
- currentIndent++;
- if(whitespaceChars != null)
- whitespaceChars[0]++;
- break;
- case '\t':
- currentIndent += tabSize - (currentIndent
- % tabSize);
- if(whitespaceChars != null)
- whitespaceChars[0]++;
- break;
- default:
- break loop;
- }
- }
-
- return currentIndent;
- } //}}}
-
- //{{{ getIdealIndentForLine() method
- /**
- * Returns the ideal leading indent for the specified line.
- * This will apply the various auto-indent rules.
- * @param lineIndex The line number
- */
- public int getIdealIndentForLine(int lineIndex)
- {
- int prevLineIndex = getPriorNonEmptyLine(lineIndex);
- int oldIndent = prevLineIndex == -1 ? 0 :
- StandardUtilities.getLeadingWhiteSpaceWidth(
- getLineSegment(prevLineIndex),
- getTabSize());
- return getIdealIndentForLine(lineIndex, prevLineIndex,
- oldIndent);
- } //}}}
-
- //{{{ getIdealIndentForLine() method
- /**
- * Returns the ideal leading indent for the specified line.
- * This will apply the various auto-indent rules.
- * @param lineIndex The line number
- * @param prevLineIndex The index of the previous non-empty line
- * @param oldIndent The indent width of the previous line (or 0)
- */
- private int getIdealIndentForLine(int lineIndex, int prevLineIndex,
- int oldIndent)
- {
- int prevPrevLineIndex = prevLineIndex < 0 ? -1
- : getPriorNonEmptyLine(prevLineIndex);
- int newIndent = oldIndent;
-
- List<IndentRule> indentRules = getIndentRules(lineIndex);
- List<IndentAction> actions = new LinkedList<IndentAction>();
- for (int i = 0;i<indentRules.size();i++)
- {
- IndentRule rule = indentRules.get(i);
- rule.apply(this,lineIndex,prevLineIndex,
- prevPrevLineIndex,actions);
- }
-
-
- for (IndentAction action : actions)
- {
- newIndent = action.calculateIndent(this, lineIndex,
- oldIndent, newIndent);
- if (!action.keepChecking())
- break;
- }
- if (newIndent < 0)
- newIndent = 0;
-
- return newIndent;
- } //}}}
-
- //{{{ getVirtualWidth() method
- /**
- * Returns the virtual column number (taking tabs into account) of the
- * specified position.
- *
- * @param line The line number
- * @param column The column number
- * @since jEdit 4.1pre1
- */
- public int getVirtualWidth(int line, int column)
- {
- try
- {
- readLock();
-
- int start = getLineStartOffset(line);
- Segment seg = new Segment();
- getText(start,column,seg);
-
- return StandardUtilities.getVirtualWidth(seg,getTabSize());
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ getOffsetOfVirtualColumn() method
- /**
- * Returns the offset of a virtual column number (taking tabs
- * into account) relative to the start of the line in question.
- *
- * @param line The line number
- * @param column The virtual column number
- * @param totalVirtualWidth If this array is non-null, the total
- * virtual width will be stored in its first location if this method
- * returns -1.
- *
- * @return -1 if the column is out of bounds
- *
- * @since jEdit 4.1pre1
- */
- public int getOffsetOfVirtualColumn(int line, int column,
- int[] totalVirtualWidth)
- {
- try
- {
- readLock();
-
- Segment seg = new Segment();
- getLineText(line,seg);
-
- return StandardUtilities.getOffsetOfVirtualColumn(seg,
- getTabSize(),column,totalVirtualWidth);
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //{{{ insertAtColumn() method
- /**
- * Like the {@link #insert(int,String)} method, but inserts the string at
- * the specified virtual column. Inserts spaces as appropriate if
- * the line is shorter than the column.
- * @param line The line number
- * @param col The virtual column number
- * @param str The string
- */
- public void insertAtColumn(int line, int col, String str)
- {
- try
- {
- writeLock();
-
- int[] total = new int[1];
- int offset = getOffsetOfVirtualColumn(line,col,total);
- if(offset == -1)
- {
- offset = getLineEndOffset(line) - 1;
- str = StandardUtilities.createWhiteSpace(col - total[0],0) + str;
- }
- else
- offset += getLineStartOffset(line);
-
- insert(offset,str);
- }
- finally
- {
- writeUnlock();
- }
- } //}}}
-
- //{{{ insertIndented() method
- /**
- * Inserts a string into the buffer, indenting each line of the string
- * to match the indent of the first line.
- *
- * @param offset The offset
- * @param text The text
- *
- * @return The number of characters of indent inserted on each new
- * line. This is used by the abbreviations code.
- *
- * @since jEdit 4.2pre14
- */
- public int insertIndented(int offset, String text)
- {
- try
- {
- beginCompoundEdit();
-
- // obtain the leading indent for later use
- int firstLine = getLineOfOffset(offset);
- CharSequence lineText = getLineSegment(firstLine);
- int leadingIndent
- = StandardUtilities.getLeadingWhiteSpaceWidth(
- lineText,getTabSize());
-
- String whiteSpace = StandardUtilities.createWhiteSpace(
- leadingIndent,getBooleanProperty("noTabs")
- ? 0 : getTabSize());
-
- insert(offset,text);
-
- int lastLine = getLineOfOffset(offset + text.length());
-
- // note that if firstLine == lastLine, loop does not
- // execute
- for(int i = firstLine + 1; i <= lastLine; i++)
- {
- insert(getLineStartOffset(i),whiteSpace);
- }
-
- return whiteSpace.length();
- }
- finally
- {
- endCompoundEdit();
- }
- } //}}}
-
- //{{{ isElectricKey() methods
- /**
- * Should inserting this character trigger a re-indent of
- * the current line?
- * @since jEdit 4.3pre2
- * @deprecated Use #isElectricKey(char,int)
- */
- public boolean isElectricKey(char ch)
- {
- return mode.isElectricKey(ch);
- }
-
- /**
- * Should inserting this character trigger a re-indent of
- * the current line?
- * @since jEdit 4.3pre9
- */
- public boolean isElectricKey(char ch, int line)
- {
- TokenMarker.LineContext ctx = lineMgr.getLineContext(line);
- Mode mode = ModeProvider.instance.getMode(ctx.rules.getModeName());
-
- // mode can be null, though that's probably an error "further up":
- if (mode == null)
- return false;
- return mode.isElectricKey(ch);
- } //}}}
-
- //}}}
-
- //{{{ Syntax highlighting
-
- //{{{ markTokens() method
- /**
- * Returns the syntax tokens for the specified line.
- * @param lineIndex The line number
- * @param tokenHandler The token handler that will receive the syntax
- * tokens
- * @since jEdit 4.1pre1
- */
- public void markTokens(int lineIndex, TokenHandler tokenHandler)
- {
- Segment seg = new Segment();
-
- if(lineIndex < 0 || lineIndex >= lineMgr.getLineCount())
- throw new ArrayIndexOutOfBoundsException(lineIndex);
-
- int firstInvalidLineContext = lineMgr.getFirstInvalidLineContext();
- int start;
- if(textMode || firstInvalidLineContext == -1)
- {
- start = lineIndex;
- }
- else
- {
- start = Math.min(firstInvalidLineContext,
- lineIndex);
- }
-
- if(Debug.TOKEN_MARKER_DEBUG)
- Log.log(Log.DEBUG,this,"tokenize from " + start + " to " + lineIndex);
- TokenMarker.LineContext oldContext = null;
- TokenMarker.LineContext context = null;
- for(int i = start; i <= lineIndex; i++)
- {
- getLineText(i,seg);
-
- oldContext = lineMgr.getLineContext(i);
-
- TokenMarker.LineContext prevContext = (
- (i == 0 || textMode) ? null
- : lineMgr.getLineContext(i - 1)
- );
-
- context = tokenMarker.markTokens(prevContext,
- (i == lineIndex ? tokenHandler
- : DummyTokenHandler.INSTANCE), seg);
- lineMgr.setLineContext(i,context);
- }
-
- int lineCount = lineMgr.getLineCount();
- if(lineCount - 1 == lineIndex)
- lineMgr.setFirstInvalidLineContext(-1);
- else if(oldContext != context)
- lineMgr.setFirstInvalidLineContext(lineIndex + 1);
- else if(firstInvalidLineContext == -1)
- /* do nothing */;
- else
- {
- lineMgr.setFirstInvalidLineContext(Math.max(
- firstInvalidLineContext,lineIndex + 1));
- }
- } //}}}
-
- //{{{ getTokenMarker() method
- public TokenMarker getTokenMarker()
- {
- return tokenMarker;
- } //}}}
-
- //{{{ setTokenMarker() method
- public void setTokenMarker(TokenMarker tokenMarker)
- {
- TokenMarker oldTokenMarker = this.tokenMarker;
-
- this.tokenMarker = tokenMarker;
-
- // don't do this on initial token marker
- if(oldTokenMarker != null && tokenMarker != oldTokenMarker)
- {
- lineMgr.setFirstInvalidLineContext(0);
- }
- } //}}}
-
- //{{{ createPosition() method
- /**
- * Creates a floating position.
- * @param offset The offset
- */
- public Position createPosition(int offset)
- {
- try
- {
- readLock();
-
- if(offset < 0 || offset > contentMgr.getLength())
- throw new ArrayIndexOutOfBoundsException(offset);
-
- return positionMgr.createPosition(offset);
- }
- finally
- {
- readUnlock();
- }
- } //}}}
-
- //}}}
-
- //{{{ Property methods
-
- //{{{ propertiesChanged() method
- /**
- * Reloads settings from the properties. This should be called
- * after the <code>syntax</code> or <code>folding</code>
- * buffer-local properties are changed.
- */
- public void propertiesChanged()
- {
- String folding = getStringProperty("folding");
- FoldHandler handler = FoldHandler.getFoldHandler(folding);
-
- if(handler != null)
- {
- setFoldHandler(handler);
- }
- else
- {
- if (folding != null)
- Log.log(Log.WARNING, this, "invalid 'folding' property: " + folding);
- setFoldHandler(new DummyFoldHandler());
- }
- } //}}}
-
- //{{{ getTabSize() method
- /**
- * Returns the tab size used in this buffer. This is equivalent
- * to calling <code>getProperty("tabSize")</code>.
- * This method is thread-safe.
- */
- public int getTabSize()
- {
- int tabSize = getIntegerProperty("tabSize",8);
- if(tabSize <= 0)
- return 8;
- else
- return tabSize;
- } //}}}
-
- //{{{ getIndentSize() method
- /**
- * Returns the indent size used in this buffer. This is equivalent
- * to calling <code>getProperty("indentSize")</code>.
- * This method is thread-safe.
- * @since jEdit 2.7pre1
- */
- public int getIndentSize()
- {
- int indentSize = getIntegerProperty("indentSize",8);
- if(indentSize <= 0)
- return 8;
- else
- return indentSize;
- } //}}}
-
- //{{{ getProperty() method
- /**
- * Returns the value of a buffer-local property.<p>
- *
- * Using this method is generally discouraged, because it returns an
- * <code>Object</code> which must be cast to another type
- * in order to be useful, and this can cause problems if the object
- * is of a different type than what the caller expects.<p>
- *
- * The following methods should be used instead:
- * <ul>
- * <li>{@link #getStringProperty(String)}</li>
- * <li>{@link #getBooleanProperty(String)}</li>
- * <li>{@link #getIntegerProperty(String,int)}</li>
- * </ul>
- *
- * This method is thread-safe.
- *
- * @param name The property name. For backwards compatibility, this
- * is an <code>Object</code>, not a <code>String</code>.
- */
- public Object getProperty(Object name)
- {
- synchronized(propertyLock)
- {
- // First try the buffer-local properties
- PropValue o = properties.get(name);
- if(o != null)
- return o.value;
-
- // For backwards compatibility
- if(!(name instanceof String))
- return null;
-
- Object retVal = getDefaultProperty((String)name);
-
- if(retVal == null)
- return null;
- else
- {
- properties.put(name,new PropValue(retVal,true));
- return retVal;
- }
- }
- } //}}}
-
- //{{{ getDefaultProperty() method
- public Object getDefaultProperty(String key)
- {
- return null;
- } //}}}
-
- //{{{ setProperty() method
- /**
- * Sets the value of a buffer-local property.
- * @param name The property name
- * @param value The property value
- * @since jEdit 4.0pre1
- */
- public void setProperty(String name, Object value)
- {
- if(value == null)
- properties.remove(name);
- else
- {
- PropValue test = properties.get(name);
- if(test == null)
- properties.put(name,new PropValue(value,false));
- else if(test.value.equals(value))
- {
- // do nothing
- }
- else
- {
- test.value = value;
- test.defaultValue = false;
- }
- }
- } //}}}
-
- //{{{ setDefaultProperty() method
- public void setDefaultProperty(String name, Object value)
- {
- properties.put(name,new PropValue(value,true));
- } //}}}
-
- //{{{ unsetProperty() method
- /**
- * Clears the value of a buffer-local property.
- * @param name The property name
- * @since jEdit 4.0pre1
- */
- public void unsetProperty(String name)
- {
- properties.remove(name);
- } //}}}
-
- //{{{ resetCachedProperties() method
- public void resetCachedProperties()
- {
- // Need to reset properties that were cached defaults,
- // since the defaults might have changed.
- Iterator<PropValue> iter = properties.values().iterator();
- while(iter.hasNext())
- {
- PropValue value = iter.next();
- if(value.defaultValue)
- iter.remove();
- }
- } //}}}
-
- //{{{ getStringProperty() method
- /**
- * Returns the value of a string property. This method is thread-safe.
- * @param name The property name
- * @since jEdit 4.0pre1
- */
- public String getStringProperty(String name)
- {
- Object obj = getProperty(name);
- if(obj != null)
- return obj.toString();
- else
- return null;
- } //}}}
-
- //{{{ setStringProperty() method
- /**
- * Sets a string property.
- * @param name The property name
- * @param value The value
- * @since jEdit 4.0pre1
- */
- public void setStringProperty(String name, String value)
- {
- setProperty(name,value);
- } //}}}
-
- //{{{ getBooleanProperty() methods
- /**
- * Returns the value of a boolean property. This method is thread-safe.
- * @param name The property name
- * @since jEdit 4.0pre1
- */
- public boolean getBooleanProperty(String name)
- {
- return getBooleanProperty(name, false);
- }
-
- /**
- * Returns the value of a boolean property. This method is thread-safe.
- * @param name The property name
- * @param def The default value
- * @since jEdit 4.3pre17
- */
- public boolean getBooleanProperty(String name, boolean def)
- {
- Object obj = getProperty(name);
- return StandardUtilities.getBoolean(obj, def);
- } //}}}
-
- //{{{ setBooleanProperty() method
- /**
- * Sets a boolean property.
- * @param name The property name
- * @param value The value
- * @since jEdit 4.0pre1
- */
- public void setBooleanProperty(String name, boolean value)
- {
- setProperty(name,value ? Boolean.TRUE : Boolean.FALSE);
- } //}}}
-
- //{{{ getIntegerProperty() method
- /**
- * Returns the value of an integer property. This method is thread-safe.
- * @param name The property name
- * @since jEdit 4.0pre1
- */
- public int getIntegerProperty(String name, int defaultValue)
- {
- boolean defaultValueFlag;
- Object obj;
- PropValue value = properties.get(name);
- if(value != null)
- {
- obj = value.value;
- defaultValueFlag = value.defaultValue;
- }
- else
- {
- obj = getProperty(name);
- // will be cached from now on...
- defaultValueFlag = true;
- }
-
- if(obj == null)
- return defaultValue;
- else if(obj instanceof Number)
- return ((Number)obj).intValue();
- else
- {
- try
- {
- int returnValue = Integer.parseInt(
- obj.toString().trim());
- properties.put(name,new PropValue(
- returnValue,
- defaultValueFlag));
- return returnValue;
- }
- catch(Exception e)
- {
- return defaultValue;
- }
- }
- } //}}}
-
- //{{{ setIntegerProperty() method
- /**
- * Sets an integer property.
- * @param name The property name
- * @param value The value
- * @since jEdit 4.0pre1
- */
- public void setIntegerProperty(String name, int value)
- {
- setProperty(name,value);
- } //}}}
-
- //{{{ getPatternProperty()
- /**
- * Returns the value of a property as a regular expression.
- * This method is thread-safe.
- * @param name The property name
- * @param flags Regular expression compilation flags
- * @since jEdit 4.3pre5
- */
- public Pattern getPatternProperty(String name, int flags)
- {
- synchronized(propertyLock)
- {
- boolean defaultValueFlag;
- Object obj;
- PropValue value = properties.get(name);
- if(value != null)
- {
- obj = value.value;
- defaultValueFlag = value.defaultValue;
- }
- else
- {
- obj = getProperty(name);
- // will be cached from now on...
- defaultValueFlag = true;
- }
-
- if(obj == null)
- return null;
- else if (obj instanceof Pattern)
- return (Pattern) obj;
- else
- {
- Pattern re = Pattern.compile(obj.toString(),flags);
- properties.put(name,new PropValue(re,
- defaultValueFlag));
- return re;
- }
- }
- } //}}}
-
- //{{{ getRuleSetAtOffset() method
- /**
- * Returns the syntax highlighting ruleset at the specified offset.
- * @since jEdit 4.1pre1
- */
- public ParserRuleSet getRuleSetAtOffset(int offset)
- {
- int line = getLineOfOffset(offset);
- offset -= getLineStartOffset(line);
- if(offset != 0)
- offset--;
-
- DefaultTokenHandler tokens = new DefaultTokenHandler();
- markTokens(line,tokens);
- Token token = TextUtilities.getTokenAtOffset(tokens.getTokens(),offset);
- return token.rules;
- } //}}}
-
- //{{{ getKeywordMapAtOffset() method
- /**
- * Returns the syntax highlighting keyword map in effect at the
- * specified offset. Used by the <b>Complete Word</b> command to
- * complete keywords.
- * @param offset The offset
- * @since jEdit 4.0pre3
- */
- public KeywordMap getKeywordMapAtOffset(int offset)
- {
- return getRuleSetAtOffset(offset).getKeywords();
- } //}}}
-
- //{{{ getContextSensitiveProperty() method
- /**
- * Some settings, like comment start and end strings, can
- * vary between different parts of a buffer (HTML text and inline
- * JavaScript, for example).
- * @param offset The offset
- * @param name The property name
- * @since jEdit 4.0pre3
- */
- public String getContextSensitiveProperty(int offset, String name)
- {
- ParserRuleSet rules = getRuleSetAtOffset(offset);
-
- Object value = null;
-
- Map<String, String> rulesetProps = rules.getProperties();
- if(rulesetProps != null)
- value = rulesetProps.get(name);
-
- if(value == null)
- return null;
- else
- return String.valueOf(value);
- } //}}}
-
- //{{{ getMode() method
- /**
- * Returns this buffer's edit mode. This method is thread-safe.
- */
- public Mode getMode()
- {
- return mode;
- } //}}}
-
- //{{{ setMode() methods
- /**
- * Sets this buffer's edit mode. Note that calling this before a buffer
- * is loaded will have no effect; in that case, set the "mode" property
- * to the name of the mode. A bit inelegant, I know...
- * @param mode The mode name
- * @since jEdit 4.2pre1
- */
- public void setMode(String mode)
- {
- setMode(ModeProvider.instance.getMode(mode));
- }
-
- /**
- * Sets this buffer's edit mode. Note that calling this before a buffer
- * is loaded will have no effect; in that case, set the "mode" property
- * to the name of the mode. A bit inelegant, I know...
- * @param mode The mode
- */
- public void setMode(Mode mode)
- {
- /* This protects against stupid people (like me)
- * doing stuff like buffer.setMode(jEdit.getMode(...)); */
- if(mode == null)
- throw new NullPointerException("Mode must be non-null");
-
- this.mode = mode;
-
- textMode = "text".equals(mode.getName());
-
- setTokenMarker(mode.getTokenMarker());
-
- resetCachedProperties();
- propertiesChanged();
- } //}}}
-
- //}}}
-
- //{{{ Folding methods
-
- //{{{ isFoldStart() method
- /**
- * Returns if the specified line begins a fold.
- * @since jEdit 3.1pre1
- */
- public boolean isFoldStart(int line)
- {
- return line != getLineCount() - 1
- && getFoldLevel(line) < getFoldLevel(line + 1);
- } //}}}
-
- //{{{ isFoldEnd() method
- /**
- * Returns if the specified line ends a fold.
- * @since jEdit 4.2pre5
- */
- public boolean isFoldEnd(int line)
- {
- return line != getLineCount() - 1
- && getFoldLevel(line) > getFoldLevel(line + 1);
- } //}}}
-
- //{{{ invalidateCachedFoldLevels() method
- /**
- * Invalidates all cached fold level information.
- * @since jEdit 4.1pre11
- */
- public void invalidateCachedFoldLevels()
- {
- lineMgr.setFirstInvalidFoldLevel(0);
- fireFoldLevelChanged(0,getLineCount());
- } //}}}
-
- //{{{ getFoldLevel() method
- /**
- * Returns the fold level of the specified line.
- * @param line A physical line index
- * @since jEdit 3.1pre1
- */
- public int getFoldLevel(int line)
- {
- if(line < 0 || line >= lineMgr.getLineCount())
- throw new ArrayIndexOutOfBoundsException(line);
-
- if(foldHandler instanceof DummyFoldHandler)
- return 0;
-
- int firstInvalidFoldLevel = lineMgr.getFirstInvalidFoldLevel();
- if(firstInvalidFoldLevel == -1 || line < firstInvalidFoldLevel)
- {
- return lineMgr.getFoldLevel(line);
- }
- else
- {
- if(Debug.FOLD_DEBUG)
- Log.log(Log.DEBUG,this,"Invalid fold levels from " + firstInvalidFoldLevel + " to " + line);
-
- int newFoldLevel = 0;
- boolean changed = false;
- int firstUpdatedFoldLevel = firstInvalidFoldLevel;
-
- for(int i = firstInvalidFoldLevel; i <= line; i++)
- {
- Segment seg = new Segment();
- newFoldLevel = foldHandler.getFoldLevel(this,i,seg);
- if(newFoldLevel != lineMgr.getFoldLevel(i))
- {
- if(Debug.FOLD_DEBUG)
- Log.log(Log.DEBUG,this,i + " fold level changed");
- changed = true;
- // Update preceding fold levels if necessary
- if (i == firstInvalidFoldLevel)
- {
- List<Integer> precedingFoldLevels =
- foldHandler.getPrecedingFoldLevels(
- this,i,seg,newFoldLevel);
- if (precedingFoldLevels != null)
- {
- int j = i;
- for (Integer foldLevel: precedingFoldLevels)
- {
- j--;
- lineMgr.setFoldLevel(j,foldLevel.intValue());
- }
- if (j < firstUpdatedFoldLevel)
- firstUpdatedFoldLevel = j;
- }
- }
- }
- lineMgr.setFoldLevel(i,newFoldLevel);
- }
-
- if(line == lineMgr.getLineCount() - 1)
- lineMgr.setFirstInvalidFoldLevel(-1);
- else
- lineMgr.setFirstInvalidFoldLevel(line + 1);
-
- if(changed)
- {
- if(Debug.FOLD_DEBUG)
- Log.log(Log.DEBUG,this,"fold level changed: " + firstUpdatedFoldLevel + ',' + line);
- fireFoldLevelChanged(firstUpdatedFoldLevel,line);
- }
-
- return newFoldLevel;
- }
- } //}}}
-
- //{{{ getFoldAtLine() method
- /**
- * Returns an array. The first element is the start line, the
- * second element is the end line, of the fold containing the
- * specified line number.
- * @param line The line number
- * @since jEdit 4.0pre3
- */
- public int[] getFoldAtLine(int line)
- {
- int start, end;
-
- if(isFoldStart(line))
- {
- start = line;
- int foldLevel = getFoldLevel(line);
-
- line++;
-
- while(getFoldLevel(line) > foldLevel)
- {
- line++;
-
- if(line == getLineCount())
- break;
- }
-
- end = line - 1;
- }
- else
- {
- start = line;
- int foldLevel = getFoldLevel(line);
- while(getFoldLevel(start) >= foldLevel)
- {
- if(start == 0)
- break;
- else
- start--;
- }
-
- end = line;
- while(getFoldLevel(end) >= foldLevel)
- {
- end++;
-
- if(end == getLineCount())
- break;
- }
-
- end--;
- }
-
- while(getLineLength(end) == 0 && end > start)
- end--;
-
- return new int[] { start, end };
- } //}}}
-
- //{{{ getFoldHandler() method
- /**
- * Returns the current buffer's fold handler.
- * @since jEdit 4.2pre1
- */
- public FoldHandler getFoldHandler()
- {
- return foldHandler;
- } //}}}
-
- //{{{ setFoldHandler() method
- /**
- * Sets the buffer's fold handler.
- * @since jEdit 4.2pre2
- */
- public void setFoldHandler(FoldHandler foldHandler)
- {
- FoldHandler oldFoldHandler = this.foldHandler;
-
- if(foldHandler.equals(oldFoldHandler))
- return;
-
- this.foldHandler = foldHandler;
-
- lineMgr.setFirstInvalidFoldLevel(0);
-
- fireFoldHandlerChanged();
- } //}}}
-
- //}}}
-
- //{{{ Undo
-
- //{{{ undo() method
- /**
- * Undoes the most recent edit.
- *
- * @since jEdit 4.0pre1
- */
- public void undo(TextArea textArea)
- {
- if(undoMgr == null)
- return;
-
- if(!isEditable())
- {
- textArea.getToolkit().beep();
- return;
- }
-
- try
- {
- writeLock();
-
- undoInProgress = true;
- fireBeginUndo();
- int caret = undoMgr.undo();
- if(caret == -1)
- textArea.getToolkit().beep();
- else
- textArea.setCaretPosition(caret);
-
- fireEndUndo();
- fireTransactionComplete();
- }
- finally
- {
- undoInProgress = false;
-
- writeUnlock();
- }
- } //}}}
-
- //{{{ redo() method
- /**
- * Redoes the most recently undone edit.
- *
- * @since jEdit 2.7pre2
- */
- public void redo(TextArea textArea)
- {
- if(undoMgr == null)
- return;
-
- if(!isEditable())
- {
- Toolkit.getDefaultToolkit().beep();
- return;
- }
-
- try
- {
- writeLock();
-
- undoInProgress = true;
- fireBeginRedo();
- int caret = undoMgr.redo();
- if(caret == -1)
- textArea.getToolkit().beep();
- else
- textArea.setCaretPosition(caret);
-
- fireEndRedo();
- fireTransactionComplete();
- }
- finally
- {
- undoInProgress = false;
-
- writeUnlock();
- }
- } //}}}
-
- //{{{ isTransactionInProgress() method
- /**
- * Returns if an undo or compound edit is currently in progress. If this
- * method returns true, then eventually a
- * {@link org.gjt.sp.jedit.buffer.BufferListener#transactionComplete(JEditBuffer)}
- * buffer event will get fired.
- * @since jEdit 4.0pre6
- */
- public boolean isTransactionInProgress()
- {
- return transaction || undoInProgress || insideCompoundEdit();
- } //}}}
-
- //{{{ beginCompoundEdit() method
- /**
- * Starts a compound edit. All edits from now on until
- * {@link #endCompoundEdit()} are called will be merged
- * into one. This can be used to make a complex operation
- * undoable in one step. Nested calls to
- * {@link #beginCompoundEdit()} behave as expected,
- * requiring the same number of {@link #endCompoundEdit()}
- * calls to end the edit.
- * @see #endCompoundEdit()
- */
- public void beginCompoundEdit()
- {
- try
- {
- writeLock();
-
- undoMgr.beginCompoundEdit();
- }
- finally
- {
- writeUnlock();
- }
- } //}}}
-
- //{{{ endCompoundEdit() method
- /**
- * Ends a compound edit. All edits performed since
- * {@link #beginCompoundEdit()} was called can now
- * be undone in one step by calling {@link #undo(TextArea)}.
- * @see #beginCompoundEdit()
- */
- public void endCompoundEdit()
- {
- try
- {
- writeLock();
-
- undoMgr.endCompoundEdit();
-
- if(!insideCompoundEdit())
- fireTransactionComplete();
- }
- finally
- {
- writeUnlock();
- }
- }//}}}
-
- //{{{ insideCompoundEdit() method
- /**
- * Returns if a compound edit is currently active.
- * @since jEdit 3.1pre1
- */
- public boolean insideCompoundEdit()
- {
- return undoMgr.insideCompoundEdit();
- } //}}}
-
- //{{{ isUndoInProgress() method
- /**
- * Returns if an undo or redo is currently being performed.
- * @since jEdit 4.3pre3
- */
- public boolean isUndoInProgress()
- {
- return undoInProgress;
- } //}}}
-
- //{{{ getUndoId() method
- /**
- * Returns an object that identifies the undo operation to which the
- * current content change belongs. This method can be used by buffer
- * listeners during content changes (contentInserted/contentRemoved)
- * to find out which content changes belong to the same "undo" operation.
- * The same undoId object will be returned for all content changes
- * belonging to the same undo operation. Only the identity of the
- * undoId can be used, by comparing it with a previously-returned undoId
- * using "==".
- * @since jEdit 4.3pre18
- */
- public Object getUndoId()
- {
- return undoMgr.getUndoId();
- } //}}}
-
- //}}}
-
- //{{{ Buffer events
- public static final int NORMAL_PRIORITY = 0;
- public static final int HIGH_PRIORITY = 1;
-
- static class Listener
- {
- BufferListener listener;
- int priority;
-
- Listener(BufferListener listener, int priority)
- {
- this.listener = listener;
- this.priority = priority;
- }
- }
-
- //{{{ addBufferListener() methods
- /**
- * Adds a buffer change listener.
- * @param listener The listener
- * @param priority Listeners with HIGH_PRIORITY get the event before
- * listeners with NORMAL_PRIORITY
- * @since jEdit 4.3pre3
- */
- public void addBufferListener(BufferListener listener,
- int priority)
- {
- Listener l = new Listener(listener,priority);
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- Listener _l = bufferListeners.get(i);
- if(_l.priority < priority)
- {
- bufferListeners.add(i,l);
- return;
- }
- }
- bufferListeners.add(l);
- }
-
- /**
- * Adds a buffer change listener.
- * @param listener The listener
- * @since jEdit 4.3pre3
- */
- public void addBufferListener(BufferListener listener)
- {
- addBufferListener(listener,NORMAL_PRIORITY);
- } //}}}
-
- //{{{ removeBufferListener() method
- /**
- * Removes a buffer change listener.
- * @param listener The listener
- * @since jEdit 4.3pre3
- */
- public void removeBufferListener(BufferListener listener)
- {
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- if(bufferListeners.get(i).listener == listener)
- {
- bufferListeners.remove(i);
- return;
- }
- }
- } //}}}
-
- //{{{ getBufferListeners() method
- /**
- * Returns an array of registered buffer change listeners.
- * @since jEdit 4.3pre3
- */
- public BufferListener[] getBufferListeners()
- {
- BufferListener[] returnValue
- = new BufferListener[
- bufferListeners.size()];
- for(int i = 0; i < returnValue.length; i++)
- {
- returnValue[i] = bufferListeners.get(i).listener;
- }
- return returnValue;
- } //}}}
-
- //{{{ setUndoLimit() method
- /**
- * Set the undo limit of the Undo Manager.
- *
- * @param limit the new limit
- * @since jEdit 4.3pre16
- */
- public void setUndoLimit(int limit)
- {
- if (undoMgr != null)
- undoMgr.setLimit(limit);
- } //}}}
-
- //{{{ canUndo() method
- /**
- * Returns true if an undo operation can be performed.
- * @since jEdit 4.3pre18
- */
- public boolean canUndo()
- {
- if (undoMgr == null)
- return false;
- return undoMgr.canUndo();
- } //}}}
-
- //{{{ canRedo() method
- /**
- * Returns true if a redo operation can be performed.
- * @since jEdit 4.3pre18
- */
- public boolean canRedo()
- {
- if (undoMgr == null)
- return false;
- return undoMgr.canRedo();
- } //}}}
-
- //}}}
-
- //{{{ Protected members
-
- protected Mode mode;
- protected boolean textMode;
- protected UndoManager undoMgr;
-
- //{{{ Event firing methods
-
- //{{{ fireFoldLevelChanged() method
- protected void fireFoldLevelChanged(int start, int end)
- {
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- BufferListener listener = getListener(i);
- try
- {
- listener.foldLevelChanged(this,start,end);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ fireContentInserted() method
- protected void fireContentInserted(int startLine, int offset,
- int numLines, int length)
- {
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- BufferListener listener = getListener(i);
- try
- {
- listener.contentInserted(this,startLine,
- offset,numLines,length);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ fireContentRemoved() method
- protected void fireContentRemoved(int startLine, int offset,
- int numLines, int length)
- {
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- BufferListener listener = getListener(i);
- try
- {
- listener.contentRemoved(this,startLine,
- offset,numLines,length);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ firePreContentInserted() method
- protected void firePreContentInserted(int startLine, int offset,
- int numLines, int length)
- {
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- BufferListener listener = getListener(i);
- try
- {
- listener.preContentInserted(this,startLine,
- offset,numLines,length);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ firePreContentRemoved() method
- protected void firePreContentRemoved(int startLine, int offset,
- int numLines, int length)
- {
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- BufferListener listener = getListener(i);
- try
- {
- listener.preContentRemoved(this,startLine,
- offset,numLines,length);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ fireBeginUndo() method
- protected void fireBeginUndo()
- {
- } //}}}
-
- //{{{ fireEndUndo() method
- protected void fireEndUndo()
- {
- } //}}}
-
- //{{{ fireBeginRedo() method
- protected void fireBeginRedo()
- {
- } //}}}
-
- //{{{ fireEndRedo() method
- protected void fireEndRedo()
- {
- } //}}}
-
- //{{{ fireTransactionComplete() method
- protected void fireTransactionComplete()
- {
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- BufferListener listener = getListener(i);
- try
- {
- listener.transactionComplete(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ fireFoldHandlerChanged() method
- protected void fireFoldHandlerChanged()
- {
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- BufferListener listener = getListener(i);
- try
- {
- listener.foldHandlerChanged(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //{{{ fireBufferLoaded() method
- protected void fireBufferLoaded()
- {
- for(int i = 0; i < bufferListeners.size(); i++)
- {
- BufferListener listener = getListener(i);
- try
- {
- listener.bufferLoaded(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
- Log.log(Log.ERROR,this,t);
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ isFileReadOnly() method
- protected boolean isFileReadOnly()
- {
- return readOnly;
- } //}}}
-
- //{{{ setFileReadOnly() method
- protected void setFileReadOnly(boolean readOnly)
- {
- this.readOnly = readOnly;
- } //}}}
-
- //{{{ loadText() method
- protected void loadText(Segment seg, IntegerArray endOffsets)
- {
- if(seg == null)
- seg = new Segment(new char[1024],0,0);
-
- if(endOffsets == null)
- {
- endOffsets = new IntegerArray();
- endOffsets.add(1);
- }
-
- try
- {
- writeLock();
-
- // For `reload' command
- // contentMgr.remove() changes this!
- int length = getLength();
-
- firePreContentRemoved(0,0,getLineCount()
- - 1,length);
-
- contentMgr.remove(0,length);
- lineMgr.contentRemoved(0,0,getLineCount()
- - 1,length);
- positionMgr.contentRemoved(0,length);
- fireContentRemoved(0,0,getLineCount()
- - 1,length);
-
- firePreContentInserted(0, 0, endOffsets.getSize() - 1, seg.count - 1);
- // theoretically a segment could
- // have seg.offset != 0 but
- // SegmentBuffer never does that
- contentMgr._setContent(seg.array,seg.count);
-
- lineMgr._contentInserted(endOffsets);
- positionMgr.contentInserted(0,seg.count);
-
- fireContentInserted(0,0,
- endOffsets.getSize() - 1,
- seg.count - 1);
- }
- finally
- {
- writeUnlock();
- }
- } //}}}
-
- //{{{ invalidateFoldLevels() method
- protected void invalidateFoldLevels()
- {
- lineMgr.setFirstInvalidFoldLevel(0);
- } //}}}
-
- //{{{ parseBufferLocalProperties() method
- protected void parseBufferLocalProperties()
- {
- int lastLine = Math.min(9,getLineCount() - 1);
- parseBufferLocalProperties(getSegment(0,getLineEndOffset(lastLine) - 1));
-
- // first line for last 10 lines, make sure not to overlap
- // with the first 10
- int firstLine = Math.max(lastLine + 1, getLineCount() - 10);
- if(firstLine < getLineCount())
- {
- int length = getLineEndOffset(getLineCount() - 1)
- - (getLineStartOffset(firstLine) + 1);
- parseBufferLocalProperties(getSegment(getLineStartOffset(firstLine),length));
- }
- } //}}}
-
- //{{{ Used to store property values
- protected static class PropValue
- {
- PropValue(Object value, boolean defaultValue)
- {
- if(value == null)
- throw new NullPointerException();
- this.value = value;
- this.defaultValue = defaultValue;
- }
-
- Object value;
-
- /**
- * If this is true, then this value is cached from the mode
- * or global defaults, so when the defaults change this property
- * value must be reset.
- */
- boolean defaultValue;
-
- /**
- * For debugging purposes.
- */
- public String toString()
- {
- return value.toString();
- }
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private List<Listener> bufferListeners;
- private final ReentrantReadWriteLock lock;
- private ContentManager contentMgr;
- private LineManager lineMgr;
- private PositionManager positionMgr;
- private FoldHandler foldHandler;
- private IntegerArray integerArray;
- private TokenMarker tokenMarker;
- private boolean undoInProgress;
- private boolean dirty;
- private boolean readOnly;
- private boolean readOnlyOverride;
- private boolean transaction;
- private boolean loading;
- private boolean io;
- private final Map<Object, PropValue> properties;
- private final Object propertyLock;
-
- //{{{ getListener() method
- private BufferListener getListener(int index)
- {
- return bufferListeners.get(index).listener;
- } //}}}
-
- //{{{ contentInserted() method
- private void contentInserted(int offset, int length,
- IntegerArray endOffsets)
- {
- try
- {
- transaction = true;
-
- int startLine = lineMgr.getLineOfOffset(offset);
- int numLines = endOffsets.getSize();
-
- if (!loading)
- {
- firePreContentInserted(startLine, offset, numLines, length);
- }
-
- lineMgr.contentInserted(startLine,offset,numLines,length,
- endOffsets);
- positionMgr.contentInserted(offset,length);
-
- setDirty(true);
-
- if(!loading)
- {
- fireContentInserted(startLine,offset,numLines,length);
-
- if(!undoInProgress && !insideCompoundEdit())
- fireTransactionComplete();
- }
-
- }
- finally
- {
- transaction = false;
- }
- } //}}}
-
- //{{{ parseBufferLocalProperties() method
- private void parseBufferLocalProperties(CharSequence prop)
- {
- StringBuilder buf = new StringBuilder();
- String name = null;
- boolean escape = false;
- for(int i = 0; i < prop.length(); i++)
- {
- char c = prop.charAt(i);
- switch(c)
- {
- case ':':
- if(escape)
- {
- escape = false;
- buf.append(':');
- break;
- }
- if(name != null)
- {
- // use the low-level property setting code
- // so that if we have a buffer-local
- // property with the same value as a default,
- // later changes in the default don't affect
- // the buffer-local property
- properties.put(name,new PropValue(buf.toString(),false));
- name = null;
- }
- buf.setLength(0);
- break;
- case '=':
- if(escape)
- {
- escape = false;
- buf.append('=');
- break;
- }
- name = buf.toString();
- buf.setLength(0);
- break;
- case '\\':
- if(escape)
- buf.append('\\');
- escape = !escape;
- break;
- case 'n':
- if(escape)
- { buf.append('\n');
- escape = false;
- break;
- }
- case 'r':
- if(escape)
- { buf.append('\r');
- escape = false;
- break;
- }
- case 't':
- if(escape)
- {
- buf.append('\t');
- escape = false;
- break;
- }
- default:
- buf.append(c);
- break;
- }
- }
- } //}}}
-
- //{{{ getIndentRules() method
- private List<IndentRule> getIndentRules(int line)
- {
- String modeName = null;
- TokenMarker.LineContext ctx = lineMgr.getLineContext(line);
- if (ctx != null && ctx.rules != null)
- modeName = ctx.rules.getModeName();
- if (modeName == null)
- modeName = tokenMarker.getMainRuleSet().getModeName();
- return ModeProvider.instance.getMode(modeName).getIndentRules();
- } //}}}
-
- //}}}
-}
+/*
+ * JEditBuffer.java - jEdit buffer
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2005 Slava Pestov
+ * Portions copyright (C) 1999, 2000 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+//{{{ Imports
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.jedit.Mode;
+import org.gjt.sp.jedit.TextUtilities;
+import org.gjt.sp.jedit.indent.IndentAction;
+import org.gjt.sp.jedit.indent.IndentRule;
+import org.gjt.sp.jedit.syntax.*;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.util.IntegerArray;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+
+import javax.swing.text.Position;
+import javax.swing.text.Segment;
+import java.awt.*;
+import java.util.*;
+import java.util.List;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.regex.Pattern;
+//}}}
+
+/**
+ * A <code>JEditBuffer</code> represents the contents of an open text
+ * file as it is maintained in the computer's memory (as opposed to
+ * how it may be stored on a disk).<p>
+ *
+ * This class is partially thread-safe, however you must pay attention to two
+ * very important guidelines:
+ * <ul>
+ * <li>Operations such as insert() and remove(),
+ * undo(), change Buffer data in a writeLock(), and must
+ * be called from the AWT thread.
+ * <li>When accessing the buffer from another thread, you must
+ * call readLock() before and readUnLock() after, if you plan on performing
+ * more than one read, to ensure that the buffer contents are not changed by
+ * the AWT thread for the duration of the lock. Only methods whose descriptions
+ * specify thread safety can be invoked from other threads.
+ * </ul>
+ *
+ * @author Slava Pestov
+ * @version $Id: JEditBuffer.java 18698 2010-10-01 20:40:40Z daleanson $
+ *
+ * @since jEdit 4.3pre3
+ */
+public class JEditBuffer
+{
+ /**
+ * Line separator property.
+ */
+ public static final String LINESEP = "lineSeparator";
+
+ /**
+ * Character encoding used when loading and saving.
+ * @since jEdit 3.2pre4
+ */
+ public static final String ENCODING = "encoding";
+
+ //{{{ JEditBuffer constructors
+ public JEditBuffer(Map props)
+ {
+ bufferListeners = new Vector<Listener>();
+ lock = new ReentrantReadWriteLock();
+ contentMgr = new ContentManager();
+ lineMgr = new LineManager();
+ positionMgr = new PositionManager(this);
+ undoMgr = new UndoManager(this);
+ integerArray = new IntegerArray();
+ propertyLock = new Object();
+ properties = new HashMap<Object, PropValue>();
+
+ //{{{ need to convert entries of 'props' to PropValue instances
+ Set<Map.Entry> set = props.entrySet();
+ for (Map.Entry entry : set)
+ {
+ properties.put(entry.getKey(),new PropValue(entry.getValue(),false));
+ } //}}}
+
+ // fill in defaults for these from system properties if the
+ // corresponding buffer.XXX properties not set
+ if(getProperty(ENCODING) == null)
+ properties.put(ENCODING,new PropValue(System.getProperty("file.encoding"),false));
+ if(getProperty(LINESEP) == null)
+ properties.put(LINESEP,new PropValue(System.getProperty("line.separator"),false));
+ }
+
+ /**
+ * Create a new JEditBuffer.
+ * It is used by independent textarea only
+ */
+ public JEditBuffer()
+ {
+ bufferListeners = new Vector<Listener>();
+ lock = new ReentrantReadWriteLock();
+ contentMgr = new ContentManager();
+ lineMgr = new LineManager();
+ positionMgr = new PositionManager(this);
+ undoMgr = new UndoManager(this);
+ integerArray = new IntegerArray();
+ propertyLock = new Object();
+ properties = new HashMap<Object, PropValue>();
+
+ properties.put("wrap",new PropValue("none",false));
+ properties.put("folding",new PropValue("none",false));
+ tokenMarker = new TokenMarker();
+ tokenMarker.addRuleSet(new ParserRuleSet("text","MAIN"));
+ setTokenMarker(tokenMarker);
+
+ loadText(null,null);
+ // corresponding buffer.XXX properties not set
+ if(getProperty(ENCODING) == null)
+ properties.put(ENCODING,new PropValue(System.getProperty("file.encoding"),false));
+ if(getProperty(LINESEP) == null)
+ properties.put(LINESEP,new PropValue(System.getProperty("line.separator"),false));
+
+ setFoldHandler(new DummyFoldHandler());
+ } //}}}
+
+ //{{{ Flags
+
+ //{{{ isDirty() method
+ /**
+ * Returns whether there have been unsaved changes to this buffer.
+ * This method is thread-safe.
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ } //}}}
+
+ //{{{ isLoading() method
+ public boolean isLoading()
+ {
+ return loading;
+ } //}}}
+
+ //{{{ setLoading() method
+ public void setLoading(boolean loading)
+ {
+ this.loading = loading;
+ } //}}}
+
+ //{{{ isPerformingIO() method
+ /**
+ * Returns true if the buffer is currently performing I/O.
+ * This method is thread-safe.
+ * @since jEdit 2.7pre1
+ */
+ public boolean isPerformingIO()
+ {
+ return isLoading() || io;
+ } //}}}
+
+ //{{{ setPerformingIO() method
+ /**
+ * Returns true if the buffer is currently performing I/O.
+ * This method is thread-safe.
+ * @since jEdit 2.7pre1
+ */
+ public void setPerformingIO(boolean io)
+ {
+ this.io = io;
+ } //}}}
+
+ //{{{ isEditable() method
+ /**
+ * Returns true if this file is editable, false otherwise. A file may
+ * become uneditable if it is read only, or if I/O is in progress.
+ * This method is thread-safe.
+ * @since jEdit 2.7pre1
+ */
+ public boolean isEditable()
+ {
+ return !(isReadOnly() || isPerformingIO());
+ } //}}}
+
+ //{{{ isReadOnly() method
+ /**
+ * Returns true if this file is read only, false otherwise.
+ * This method is thread-safe.
+ */
+ public boolean isReadOnly()
+ {
+ return readOnly || readOnlyOverride;
+ } //}}}
+
+ //{{{ setReadOnly() method
+ /**
+ * Sets the read only flag.
+ * @param readOnly The read only flag
+ */
+ public void setReadOnly(boolean readOnly)
+ {
+ readOnlyOverride = readOnly;
+ } //}}}
+
+ //{{{ setDirty() method
+ /**
+ * Sets the 'dirty' (changed since last save) flag of this buffer.
+ */
+ public void setDirty(boolean d)
+ {
+ boolean editable = isEditable();
+
+ if(d)
+ {
+ if(editable)
+ dirty = true;
+ }
+ else
+ {
+ dirty = false;
+
+ // fixes dirty flag not being reset on
+ // save/insert/undo/redo/undo
+ if(!isUndoInProgress())
+ {
+ // this ensures that undo can clear the dirty flag properly
+ // when all edits up to a save are undone
+ undoMgr.resetClearDirty();
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Thread safety
+
+ //{{{ readLock() method
+ /**
+ * The buffer is guaranteed not to change between calls to
+ * {@link #readLock()} and {@link #readUnlock()}.
+ */
+ public void readLock()
+ {
+ lock.readLock().lock();
+ } //}}}
+
+ //{{{ readUnlock() method
+ /**
+ * The buffer is guaranteed not to change between calls to
+ * {@link #readLock()} and {@link #readUnlock()}.
+ */
+ public void readUnlock()
+ {
+ lock.readLock().unlock();
+ } //}}}
+
+ //{{{ writeLock() method
+ /**
+ * Attempting to obtain read lock will block between calls to
+ * {@link #writeLock()} and {@link #writeUnlock()}.
+ */
+ public void writeLock()
+ {
+ lock.writeLock().lock();
+ } //}}}
+
+ //{{{ writeUnlock() method
+ /**
+ * Attempting to obtain read lock will block between calls to
+ * {@link #writeLock()} and {@link #writeUnlock()}.
+ */
+ public void writeUnlock()
+ {
+ lock.writeLock().unlock();
+ } //}}}
+
+ //}}}
+
+ //{{{ Line offset methods
+
+ //{{{ getLength() method
+ /**
+ * Returns the number of characters in the buffer. This method is thread-safe.
+ */
+ public int getLength()
+ {
+ // no need to lock since this just returns a value and that's it
+ return contentMgr.getLength();
+ } //}}}
+
+ //{{{ getLineCount() method
+ /**
+ * Returns the number of physical lines in the buffer.
+ * This method is thread-safe.
+ * @since jEdit 3.1pre1
+ */
+ public int getLineCount()
+ {
+ // no need to lock since this just returns a value and that's it
+ return lineMgr.getLineCount();
+ } //}}}
+
+ //{{{ getLineOfOffset() method
+ /**
+ * Returns the line containing the specified offset.
+ * This method is thread-safe.
+ * @param offset The offset
+ * @since jEdit 4.0pre1
+ */
+ public int getLineOfOffset(int offset)
+ {
+ try
+ {
+ readLock();
+
+ if(offset < 0 || offset > getLength())
+ throw new ArrayIndexOutOfBoundsException(offset);
+
+ return lineMgr.getLineOfOffset(offset);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ getLineStartOffset() method
+ /**
+ * Returns the start offset of the specified line.
+ * This method is thread-safe.
+ * @param line The line
+ * @return The start offset of the specified line
+ * @since jEdit 4.0pre1
+ */
+ public int getLineStartOffset(int line)
+ {
+ try
+ {
+ readLock();
+
+ if(line < 0 || line >= lineMgr.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(line);
+ else if(line == 0)
+ return 0;
+
+ return lineMgr.getLineEndOffset(line - 1);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ getLineEndOffset() method
+ /**
+ * Returns the end offset of the specified line.
+ * This method is thread-safe.
+ * @param line The line
+ * @return The end offset of the specified line
+ * invalid.
+ * @since jEdit 4.0pre1
+ */
+ public int getLineEndOffset(int line)
+ {
+ try
+ {
+ readLock();
+
+ if(line < 0 || line >= lineMgr.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(line);
+
+ return lineMgr.getLineEndOffset(line);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ getLineLength() method
+ /**
+ * Returns the length of the specified line.
+ * This method is thread-safe.
+ * @param line The line
+ * @since jEdit 4.0pre1
+ */
+ public int getLineLength(int line)
+ {
+ try
+ {
+ readLock();
+
+ return getLineEndOffset(line)
+ - getLineStartOffset(line) - 1;
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ getPriorNonEmptyLine() method
+ /**
+ * Auto indent needs this.
+ */
+ public int getPriorNonEmptyLine(int lineIndex)
+ {
+ int returnValue = -1;
+
+ if (!mode.getIgnoreWhitespace())
+ {
+ return lineIndex - 1;
+ }
+
+ for(int i = lineIndex - 1; i >= 0; i--)
+ {
+ Segment seg = new Segment();
+ getLineText(i,seg);
+ if(seg.count != 0)
+ returnValue = i;
+ for(int j = 0; j < seg.count; j++)
+ {
+ char ch = seg.array[seg.offset + j];
+ if(!Character.isWhitespace(ch))
+ return i;
+ }
+ }
+
+ // didn't find a line that contains non-whitespace chars
+ // so return index of prior whitespace line
+ return returnValue;
+ } //}}}
+
+ //}}}
+
+ //{{{ Text getters and setters
+
+ //{{{ getLineText() methods
+ /**
+ * Returns the text on the specified line.
+ * This method is thread-safe.
+ * @param line The line
+ * @return The text, or null if the line is invalid
+ * @since jEdit 4.0pre1
+ */
+ public String getLineText(int line)
+ {
+ if(line < 0 || line >= lineMgr.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(line);
+
+ try
+ {
+ readLock();
+
+ int start = line == 0 ? 0 : lineMgr.getLineEndOffset(line - 1);
+ int end = lineMgr.getLineEndOffset(line);
+
+ return getText(start,end - start - 1);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ }
+
+ /**
+ * Returns the specified line in a <code>Segment</code>.<p>
+ *
+ * Using a <classname>Segment</classname> is generally more
+ * efficient than using a <classname>String</classname> because it
+ * results in less memory allocation and array copying.<p>
+ *
+ * This method is thread-safe.
+ *
+ * @param line The line
+ * @since jEdit 4.0pre1
+ */
+ public void getLineText(int line, Segment segment)
+ {
+ if(line < 0 || line >= lineMgr.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(line);
+
+ try
+ {
+ readLock();
+
+ int start = line == 0 ? 0 : lineMgr.getLineEndOffset(line - 1);
+ int end = lineMgr.getLineEndOffset(line);
+
+ getText(start,end - start - 1,segment);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ getLineSegment() method
+ /**
+ * Returns the text on the specified line.
+ * This method is thread-safe.
+ *
+ * @param line The line index.
+ * @return The text, or null if the line is invalid
+ *
+ * @since jEdit 4.3pre15
+ */
+ public CharSequence getLineSegment(int line)
+ {
+ if(line < 0 || line >= lineMgr.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(line);
+
+ try
+ {
+ readLock();
+
+ int start = line == 0 ? 0 : lineMgr.getLineEndOffset(line - 1);
+ int end = lineMgr.getLineEndOffset(line);
+
+ return getSegment(start,end - start - 1);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ getText() methods
+ /**
+ * Returns the specified text range. This method is thread-safe.
+ * @param start The start offset
+ * @param length The number of characters to get
+ */
+ public String getText(int start, int length)
+ {
+ try
+ {
+ readLock();
+
+ if(start < 0 || length < 0
+ || start + length > contentMgr.getLength())
+ throw new ArrayIndexOutOfBoundsException(start + ":" + length);
+
+ return contentMgr.getText(start,length);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ }
+
+ /**
+ * Returns the full buffer content. This method is thread-safe
+ * @since 4.4.1
+ */
+ public String getText()
+ {
+ try
+ {
+ readLock();
+ return contentMgr.getText(0, getLength());
+ }
+ finally
+ {
+ readUnlock();
+ }
+ }
+
+ /**
+ * Returns the specified text range in a <code>Segment</code>.<p>
+ *
+ * Using a <classname>Segment</classname> is generally more
+ * efficient than using a <classname>String</classname> because it
+ * results in less memory allocation and array copying.<p>
+ *
+ * This method is thread-safe.
+ *
+ * @param start The start offset
+ * @param length The number of characters to get
+ * @param seg The segment to copy the text to
+ */
+ public void getText(int start, int length, Segment seg)
+ {
+ try
+ {
+ readLock();
+
+ if(start < 0 || length < 0
+ || start + length > contentMgr.getLength())
+ throw new ArrayIndexOutOfBoundsException(start + ":" + length);
+
+ contentMgr.getText(start,length,seg);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ getSegment() method
+ /**
+ * Returns the specified text range. This method is thread-safe.
+ * It doesn't copy the text
+ *
+ * @param start The start offset
+ * @param length The number of characters to get
+ *
+ * @return a CharSequence that contains the text wanted text
+ * @since jEdit 4.3pre15
+ */
+ public CharSequence getSegment(int start, int length)
+ {
+ try
+ {
+ readLock();
+
+ if(start < 0 || length < 0
+ || start + length > contentMgr.getLength())
+ throw new ArrayIndexOutOfBoundsException(start + ":" + length);
+
+ return contentMgr.getSegment(start,length);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ insert() methods
+ /**
+ * Inserts a string into the buffer.
+ * @param offset The offset
+ * @param str The string
+ * @since jEdit 4.0pre1
+ */
+ public void insert(int offset, String str)
+ {
+ if(str == null)
+ return;
+
+ int len = str.length();
+
+ if(len == 0)
+ return;
+
+ if(isReadOnly())
+ throw new RuntimeException("buffer read-only");
+
+ try
+ {
+ writeLock();
+
+ if(offset < 0 || offset > contentMgr.getLength())
+ throw new ArrayIndexOutOfBoundsException(offset);
+
+ contentMgr.insert(offset,str);
+
+ integerArray.clear();
+
+ for(int i = 0; i < len; i++)
+ {
+ if(str.charAt(i) == '\n')
+ integerArray.add(i + 1);
+ }
+
+ if(!undoInProgress)
+ {
+ undoMgr.contentInserted(offset,len,str,!dirty);
+ }
+
+ contentInserted(offset,len,integerArray);
+ }
+ finally
+ {
+ writeUnlock();
+ }
+ }
+
+ /**
+ * Inserts a string into the buffer.
+ * @param offset The offset
+ * @param seg The segment
+ * @since jEdit 4.0pre1
+ */
+ public void insert(int offset, Segment seg)
+ {
+ if(seg.count == 0)
+ return;
+
+ if(isReadOnly())
+ throw new RuntimeException("buffer read-only");
+
+ try
+ {
+ writeLock();
+
+ if(offset < 0 || offset > contentMgr.getLength())
+ throw new ArrayIndexOutOfBoundsException(offset);
+
+ contentMgr.insert(offset,seg);
+
+ integerArray.clear();
+
+ for(int i = 0; i < seg.count; i++)
+ {
+ if(seg.array[seg.offset + i] == '\n')
+ integerArray.add(i + 1);
+ }
+
+ if(!undoInProgress)
+ {
+ undoMgr.contentInserted(offset,seg.count,
+ seg.toString(),!dirty);
+ }
+
+ contentInserted(offset,seg.count,integerArray);
+ }
+ finally
+ {
+ writeUnlock();
+ }
+ } //}}}
+
+ //{{{ remove() method
+ /**
+ * Removes the specified rang efrom the buffer.
+ * @param offset The start offset
+ * @param length The number of characters to remove
+ */
+ public void remove(int offset, int length)
+ {
+ if(length == 0)
+ return;
+
+ if(isReadOnly())
+ throw new RuntimeException("buffer read-only");
+
+ try
+ {
+ transaction = true;
+
+ writeLock();
+
+ if(offset < 0 || length < 0
+ || offset + length > contentMgr.getLength())
+ throw new ArrayIndexOutOfBoundsException(offset + ":" + length);
+
+ int startLine = lineMgr.getLineOfOffset(offset);
+ int endLine = lineMgr.getLineOfOffset(offset + length);
+
+ int numLines = endLine - startLine;
+
+ if(!undoInProgress && !loading)
+ {
+ undoMgr.contentRemoved(offset,length,
+ getText(offset,length),
+ !dirty);
+ }
+
+ firePreContentRemoved(startLine,offset,numLines,length);
+
+ contentMgr.remove(offset,length);
+ lineMgr.contentRemoved(startLine,offset,numLines,length);
+ positionMgr.contentRemoved(offset,length);
+
+ setDirty(true);
+
+ fireContentRemoved(startLine,offset,numLines,length);
+
+ /* otherwise it will be delivered later */
+ if(!undoInProgress && !insideCompoundEdit())
+ fireTransactionComplete();
+
+ }
+ finally
+ {
+ transaction = false;
+
+ writeUnlock();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Indentation
+
+ //{{{ removeTrailingWhiteSpace() method
+ /**
+ * Removes trailing whitespace from all lines in the specified list.
+ * @param lines The line numbers
+ * @since jEdit 3.2pre1
+ */
+ public void removeTrailingWhiteSpace(int[] lines)
+ {
+ try
+ {
+ beginCompoundEdit();
+
+ for(int i = 0; i < lines.length; i++)
+ {
+ int pos, lineStart, lineEnd, tail;
+ Segment seg = new Segment();
+ getLineText(lines[i],seg);
+
+ // blank line
+ if (seg.count == 0) continue;
+
+ lineStart = seg.offset;
+ lineEnd = seg.offset + seg.count - 1;
+
+ for (pos = lineEnd; pos >= lineStart; pos--)
+ {
+ if (!Character.isWhitespace(seg.array[pos]))
+ break;
+ }
+
+ tail = lineEnd - pos;
+
+ // no whitespace
+ if (tail == 0) continue;
+
+ remove(getLineEndOffset(lines[i]) - 1 - tail,tail);
+ }
+ }
+ finally
+ {
+ endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ shiftIndentLeft() method
+ /**
+ * Shifts the indent of each line in the specified list to the left.
+ * @param lines The line numbers
+ * @since jEdit 3.2pre1
+ */
+ public void shiftIndentLeft(int[] lines)
+ {
+ int tabSize = getTabSize();
+ int indentSize = getIndentSize();
+ boolean noTabs = getBooleanProperty("noTabs");
+
+ try
+ {
+ beginCompoundEdit();
+
+ for(int i = 0; i < lines.length; i++)
+ {
+ int lineStart = getLineStartOffset(lines[i]);
+ CharSequence line = getLineSegment(lines[i]);
+ int whiteSpace = StandardUtilities
+ .getLeadingWhiteSpace(line);
+ if(whiteSpace == 0)
+ continue;
+ int whiteSpaceWidth = Math.max(0,StandardUtilities
+ .getLeadingWhiteSpaceWidth(line,tabSize)
+ - indentSize);
+
+ insert(lineStart + whiteSpace,StandardUtilities
+ .createWhiteSpace(whiteSpaceWidth,
+ noTabs ? 0 : tabSize));
+ remove(lineStart,whiteSpace);
+ }
+
+ }
+ finally
+ {
+ endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ shiftIndentRight() method
+ /**
+ * Shifts the indent of each line in the specified list to the right.
+ * @param lines The line numbers
+ * @since jEdit 3.2pre1
+ */
+ public void shiftIndentRight(int[] lines)
+ {
+ try
+ {
+ beginCompoundEdit();
+
+ int tabSize = getTabSize();
+ int indentSize = getIndentSize();
+ boolean noTabs = getBooleanProperty("noTabs");
+ for(int i = 0; i < lines.length; i++)
+ {
+ int lineStart = getLineStartOffset(lines[i]);
+ CharSequence line = getLineSegment(lines[i]);
+ int whiteSpace = StandardUtilities
+ .getLeadingWhiteSpace(line);
+
+ // silly usability hack
+ //if(lines.length != 1 && whiteSpace == 0)
+ // continue;
+
+ int whiteSpaceWidth = StandardUtilities
+ .getLeadingWhiteSpaceWidth(
+ line,tabSize) + indentSize;
+ insert(lineStart + whiteSpace,StandardUtilities
+ .createWhiteSpace(whiteSpaceWidth,
+ noTabs ? 0 : tabSize));
+ remove(lineStart,whiteSpace);
+ }
+ }
+ finally
+ {
+ endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ indentLines() methods
+ /**
+ * Indents all specified lines.
+ * @param start The first line to indent
+ * @param end The last line to indent
+ * @since jEdit 3.1pre3
+ */
+ public void indentLines(int start, int end)
+ {
+ try
+ {
+ beginCompoundEdit();
+ for(int i = start; i <= end; i++)
+ indentLine(i,true);
+ }
+ finally
+ {
+ endCompoundEdit();
+ }
+ }
+
+ /**
+ * Indents all specified lines.
+ * @param lines The line numbers
+ * @since jEdit 3.2pre1
+ */
+ public void indentLines(int[] lines)
+ {
+ try
+ {
+ beginCompoundEdit();
+ for(int i = 0; i < lines.length; i++)
+ indentLine(lines[i],true);
+ }
+ finally
+ {
+ endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ indentLine() methods
+ /**
+ * @deprecated Use {@link #indentLine(int,boolean)} instead.
+ */
+ @Deprecated
+ public boolean indentLine(int lineIndex, boolean canIncreaseIndent,
+ boolean canDecreaseIndent)
+ {
+ return indentLine(lineIndex,canDecreaseIndent);
+ }
+
+ /**
+ * Indents the specified line.
+ * @param lineIndex The line number to indent
+ * @param canDecreaseIndent If true, the indent can be decreased as a
+ * result of this. Set this to false for Tab key.
+ * @return true If indentation took place, false otherwise.
+ * @since jEdit 4.2pre2
+ */
+ public boolean indentLine(int lineIndex, boolean canDecreaseIndent)
+ {
+ int[] whitespaceChars = new int[1];
+ int currentIndent = getCurrentIndentForLine(lineIndex,
+ whitespaceChars);
+ int prevLineIndex = getPriorNonEmptyLine(lineIndex);
+ int prevLineIndent = (prevLineIndex == -1) ? 0 :
+ StandardUtilities.getLeadingWhiteSpaceWidth(getLineSegment(
+ prevLineIndex), getTabSize());
+ int idealIndent = getIdealIndentForLine(lineIndex, prevLineIndex,
+ prevLineIndent);
+
+ if (idealIndent == -1 || idealIndent == currentIndent ||
+ (!canDecreaseIndent && idealIndent < currentIndent))
+ return false;
+
+ // Do it
+ try
+ {
+ beginCompoundEdit();
+
+ int start = getLineStartOffset(lineIndex);
+
+ remove(start,whitespaceChars[0]);
+ String prevIndentString = (prevLineIndex >= 0) ?
+ StandardUtilities.getIndentString(getLineText(
+ prevLineIndex)) : null;
+ String indentString;
+ if (prevIndentString == null)
+ {
+ indentString = StandardUtilities.createWhiteSpace(
+ idealIndent,
+ getBooleanProperty("noTabs") ? 0 : getTabSize());
+ }
+ else if (idealIndent == prevLineIndent)
+ indentString = prevIndentString;
+ else if (idealIndent < prevLineIndent)
+ indentString = StandardUtilities.truncateWhiteSpace(
+ idealIndent, getTabSize(), prevIndentString);
+ else
+ indentString = prevIndentString +
+ StandardUtilities.createWhiteSpace(
+ idealIndent - prevLineIndent,
+ getBooleanProperty("noTabs") ? 0 : getTabSize(),
+ prevLineIndent);
+ insert(start, indentString);
+ }
+ finally
+ {
+ endCompoundEdit();
+ }
+
+ return true;
+ } //}}}
+
+ //{{{ getCurrentIndentForLine() method
+ /**
+ * Returns the line's current leading indent.
+ * @param lineIndex The line number
+ * @param whitespaceChars If this is non-null, the number of whitespace
+ * characters is stored at the 0 index
+ * @since jEdit 4.2pre2
+ */
+ public int getCurrentIndentForLine(int lineIndex, int[] whitespaceChars)
+ {
+ Segment seg = new Segment();
+ getLineText(lineIndex,seg);
+
+ int tabSize = getTabSize();
+
+ int currentIndent = 0;
+loop: for(int i = 0; i < seg.count; i++)
+ {
+ char c = seg.array[seg.offset + i];
+ switch(c)
+ {
+ case ' ':
+ currentIndent++;
+ if(whitespaceChars != null)
+ whitespaceChars[0]++;
+ break;
+ case '\t':
+ currentIndent += tabSize - (currentIndent
+ % tabSize);
+ if(whitespaceChars != null)
+ whitespaceChars[0]++;
+ break;
+ default:
+ break loop;
+ }
+ }
+
+ return currentIndent;
+ } //}}}
+
+ //{{{ getIdealIndentForLine() method
+ /**
+ * Returns the ideal leading indent for the specified line.
+ * This will apply the various auto-indent rules.
+ * @param lineIndex The line number
+ */
+ public int getIdealIndentForLine(int lineIndex)
+ {
+ int prevLineIndex = getPriorNonEmptyLine(lineIndex);
+ int oldIndent = prevLineIndex == -1 ? 0 :
+ StandardUtilities.getLeadingWhiteSpaceWidth(
+ getLineSegment(prevLineIndex),
+ getTabSize());
+ return getIdealIndentForLine(lineIndex, prevLineIndex,
+ oldIndent);
+ } //}}}
+
+ //{{{ getIdealIndentForLine() method
+ /**
+ * Returns the ideal leading indent for the specified line.
+ * This will apply the various auto-indent rules.
+ * @param lineIndex The line number
+ * @param prevLineIndex The index of the previous non-empty line
+ * @param oldIndent The indent width of the previous line (or 0)
+ */
+ private int getIdealIndentForLine(int lineIndex, int prevLineIndex,
+ int oldIndent)
+ {
+ int prevPrevLineIndex = prevLineIndex < 0 ? -1
+ : getPriorNonEmptyLine(prevLineIndex);
+ int newIndent = oldIndent;
+
+ List<IndentRule> indentRules = getIndentRules(lineIndex);
+ List<IndentAction> actions = new LinkedList<IndentAction>();
+ for (int i = 0;i<indentRules.size();i++)
+ {
+ IndentRule rule = indentRules.get(i);
+ rule.apply(this,lineIndex,prevLineIndex,
+ prevPrevLineIndex,actions);
+ }
+
+
+ for (IndentAction action : actions)
+ {
+ newIndent = action.calculateIndent(this, lineIndex,
+ oldIndent, newIndent);
+ if (!action.keepChecking())
+ break;
+ }
+ if (newIndent < 0)
+ newIndent = 0;
+
+ return newIndent;
+ } //}}}
+
+ //{{{ getVirtualWidth() method
+ /**
+ * Returns the virtual column number (taking tabs into account) of the
+ * specified position.
+ *
+ * @param line The line number
+ * @param column The column number
+ * @since jEdit 4.1pre1
+ */
+ public int getVirtualWidth(int line, int column)
+ {
+ try
+ {
+ readLock();
+
+ int start = getLineStartOffset(line);
+ Segment seg = new Segment();
+ getText(start,column,seg);
+
+ return StandardUtilities.getVirtualWidth(seg,getTabSize());
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ getOffsetOfVirtualColumn() method
+ /**
+ * Returns the offset of a virtual column number (taking tabs
+ * into account) relative to the start of the line in question.
+ *
+ * @param line The line number
+ * @param column The virtual column number
+ * @param totalVirtualWidth If this array is non-null, the total
+ * virtual width will be stored in its first location if this method
+ * returns -1.
+ *
+ * @return -1 if the column is out of bounds
+ *
+ * @since jEdit 4.1pre1
+ */
+ public int getOffsetOfVirtualColumn(int line, int column,
+ int[] totalVirtualWidth)
+ {
+ try
+ {
+ readLock();
+
+ Segment seg = new Segment();
+ getLineText(line,seg);
+
+ return StandardUtilities.getOffsetOfVirtualColumn(seg,
+ getTabSize(),column,totalVirtualWidth);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //{{{ insertAtColumn() method
+ /**
+ * Like the {@link #insert(int,String)} method, but inserts the string at
+ * the specified virtual column. Inserts spaces as appropriate if
+ * the line is shorter than the column.
+ * @param line The line number
+ * @param col The virtual column number
+ * @param str The string
+ */
+ public void insertAtColumn(int line, int col, String str)
+ {
+ try
+ {
+ writeLock();
+
+ int[] total = new int[1];
+ int offset = getOffsetOfVirtualColumn(line,col,total);
+ if(offset == -1)
+ {
+ offset = getLineEndOffset(line) - 1;
+ str = StandardUtilities.createWhiteSpace(col - total[0],0) + str;
+ }
+ else
+ offset += getLineStartOffset(line);
+
+ insert(offset,str);
+ }
+ finally
+ {
+ writeUnlock();
+ }
+ } //}}}
+
+ //{{{ insertIndented() method
+ /**
+ * Inserts a string into the buffer, indenting each line of the string
+ * to match the indent of the first line.
+ *
+ * @param offset The offset
+ * @param text The text
+ *
+ * @return The number of characters of indent inserted on each new
+ * line. This is used by the abbreviations code.
+ *
+ * @since jEdit 4.2pre14
+ */
+ public int insertIndented(int offset, String text)
+ {
+ try
+ {
+ beginCompoundEdit();
+
+ // obtain the leading indent for later use
+ int firstLine = getLineOfOffset(offset);
+ CharSequence lineText = getLineSegment(firstLine);
+ int leadingIndent
+ = StandardUtilities.getLeadingWhiteSpaceWidth(
+ lineText,getTabSize());
+
+ String whiteSpace = StandardUtilities.createWhiteSpace(
+ leadingIndent,getBooleanProperty("noTabs")
+ ? 0 : getTabSize());
+
+ insert(offset,text);
+
+ int lastLine = getLineOfOffset(offset + text.length());
+
+ // note that if firstLine == lastLine, loop does not
+ // execute
+ for(int i = firstLine + 1; i <= lastLine; i++)
+ {
+ insert(getLineStartOffset(i),whiteSpace);
+ }
+
+ return whiteSpace.length();
+ }
+ finally
+ {
+ endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ isElectricKey() methods
+ /**
+ * Should inserting this character trigger a re-indent of
+ * the current line?
+ * @since jEdit 4.3pre2
+ * @deprecated Use #isElectricKey(char,int)
+ */
+ @Deprecated
+ public boolean isElectricKey(char ch)
+ {
+ return mode.isElectricKey(ch);
+ }
+
+ /**
+ * Should inserting this character trigger a re-indent of
+ * the current line?
+ * @since jEdit 4.3pre9
+ */
+ public boolean isElectricKey(char ch, int line)
+ {
+ TokenMarker.LineContext ctx = lineMgr.getLineContext(line);
+ Mode mode = ModeProvider.instance.getMode(ctx.rules.getModeName());
+
+ // mode can be null, though that's probably an error "further up":
+ if (mode == null)
+ return false;
+ return mode.isElectricKey(ch);
+ } //}}}
+
+ //}}}
+
+ //{{{ Syntax highlighting
+
+ //{{{ markTokens() method
+ /**
+ * Returns the syntax tokens for the specified line.
+ * @param lineIndex The line number
+ * @param tokenHandler The token handler that will receive the syntax
+ * tokens
+ * @since jEdit 4.1pre1
+ */
+ public void markTokens(int lineIndex, TokenHandler tokenHandler)
+ {
+ Segment seg = new Segment();
+
+ if(lineIndex < 0 || lineIndex >= lineMgr.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(lineIndex);
+
+ int firstInvalidLineContext = lineMgr.getFirstInvalidLineContext();
+ int start;
+ if(textMode || firstInvalidLineContext == -1)
+ {
+ start = lineIndex;
+ }
+ else
+ {
+ start = Math.min(firstInvalidLineContext,
+ lineIndex);
+ }
+
+ if(Debug.TOKEN_MARKER_DEBUG)
+ Log.log(Log.DEBUG,this,"tokenize from " + start + " to " + lineIndex);
+ TokenMarker.LineContext oldContext = null;
+ TokenMarker.LineContext context = null;
+ for(int i = start; i <= lineIndex; i++)
+ {
+ getLineText(i,seg);
+
+ oldContext = lineMgr.getLineContext(i);
+
+ TokenMarker.LineContext prevContext = (
+ (i == 0 || textMode) ? null
+ : lineMgr.getLineContext(i - 1)
+ );
+
+ context = tokenMarker.markTokens(prevContext,
+ (i == lineIndex ? tokenHandler
+ : DummyTokenHandler.INSTANCE), seg);
+ lineMgr.setLineContext(i,context);
+ }
+
+ int lineCount = lineMgr.getLineCount();
+ if(lineCount - 1 == lineIndex)
+ lineMgr.setFirstInvalidLineContext(-1);
+ else if(oldContext != context)
+ lineMgr.setFirstInvalidLineContext(lineIndex + 1);
+ else if(firstInvalidLineContext == -1)
+ /* do nothing */;
+ else
+ {
+ lineMgr.setFirstInvalidLineContext(Math.max(
+ firstInvalidLineContext,lineIndex + 1));
+ }
+ } //}}}
+
+ //{{{ getTokenMarker() method
+ public TokenMarker getTokenMarker()
+ {
+ return tokenMarker;
+ } //}}}
+
+ //{{{ setTokenMarker() method
+ public void setTokenMarker(TokenMarker tokenMarker)
+ {
+ TokenMarker oldTokenMarker = this.tokenMarker;
+
+ this.tokenMarker = tokenMarker;
+
+ // don't do this on initial token marker
+ if(oldTokenMarker != null && tokenMarker != oldTokenMarker)
+ {
+ lineMgr.setFirstInvalidLineContext(0);
+ }
+ } //}}}
+
+ //{{{ createPosition() method
+ /**
+ * Creates a floating position.
+ * @param offset The offset
+ */
+ public Position createPosition(int offset)
+ {
+ try
+ {
+ readLock();
+
+ if(offset < 0 || offset > contentMgr.getLength())
+ throw new ArrayIndexOutOfBoundsException(offset);
+
+ return positionMgr.createPosition(offset);
+ }
+ finally
+ {
+ readUnlock();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Property methods
+
+ //{{{ propertiesChanged() method
+ /**
+ * Reloads settings from the properties. This should be called
+ * after the <code>syntax</code> or <code>folding</code>
+ * buffer-local properties are changed.
+ */
+ public void propertiesChanged()
+ {
+ String folding = getStringProperty("folding");
+ FoldHandler handler = FoldHandler.getFoldHandler(folding);
+
+ if(handler != null)
+ {
+ setFoldHandler(handler);
+ }
+ else
+ {
+ setFoldHandler(new DummyFoldHandler());
+ }
+ } //}}}
+
+ //{{{ getTabSize() method
+ /**
+ * Returns the tab size used in this buffer. This is equivalent
+ * to calling <code>getProperty("tabSize")</code>.
+ * This method is thread-safe.
+ */
+ public int getTabSize()
+ {
+ int tabSize = getIntegerProperty("tabSize",8);
+ if(tabSize <= 0)
+ return 8;
+ else
+ return tabSize;
+ } //}}}
+
+ //{{{ getIndentSize() method
+ /**
+ * Returns the indent size used in this buffer. This is equivalent
+ * to calling <code>getProperty("indentSize")</code>.
+ * This method is thread-safe.
+ * @since jEdit 2.7pre1
+ */
+ public int getIndentSize()
+ {
+ int indentSize = getIntegerProperty("indentSize",8);
+ if(indentSize <= 0)
+ return 8;
+ else
+ return indentSize;
+ } //}}}
+
+ //{{{ getProperty() method
+ /**
+ * Returns the value of a buffer-local property.<p>
+ *
+ * Using this method is generally discouraged, because it returns an
+ * <code>Object</code> which must be cast to another type
+ * in order to be useful, and this can cause problems if the object
+ * is of a different type than what the caller expects.<p>
+ *
+ * The following methods should be used instead:
+ * <ul>
+ * <li>{@link #getStringProperty(String)}</li>
+ * <li>{@link #getBooleanProperty(String)}</li>
+ * <li>{@link #getIntegerProperty(String,int)}</li>
+ * </ul>
+ *
+ * This method is thread-safe.
+ *
+ * @param name The property name. For backwards compatibility, this
+ * is an <code>Object</code>, not a <code>String</code>.
+ */
+ public Object getProperty(Object name)
+ {
+ synchronized(propertyLock)
+ {
+ // First try the buffer-local properties
+ PropValue o = properties.get(name);
+ if(o != null)
+ return o.value;
+
+ // For backwards compatibility
+ if(!(name instanceof String))
+ return null;
+
+ Object retVal = getDefaultProperty((String)name);
+
+ if(retVal == null)
+ return null;
+ else
+ {
+ properties.put(name,new PropValue(retVal,true));
+ return retVal;
+ }
+ }
+ } //}}}
+
+ //{{{ getDefaultProperty() method
+ public Object getDefaultProperty(String key)
+ {
+ return null;
+ } //}}}
+
+ //{{{ setProperty() method
+ /**
+ * Sets the value of a buffer-local property.
+ * @param name The property name
+ * @param value The property value
+ * @since jEdit 4.0pre1
+ */
+ public void setProperty(String name, Object value)
+ {
+ if(value == null)
+ properties.remove(name);
+ else
+ {
+ PropValue test = properties.get(name);
+ if(test == null)
+ properties.put(name,new PropValue(value,false));
+ else if(test.value.equals(value))
+ {
+ // do nothing
+ }
+ else
+ {
+ test.value = value;
+ test.defaultValue = false;
+ }
+ }
+ } //}}}
+
+ //{{{ setDefaultProperty() method
+ public void setDefaultProperty(String name, Object value)
+ {
+ properties.put(name,new PropValue(value,true));
+ } //}}}
+
+ //{{{ unsetProperty() method
+ /**
+ * Clears the value of a buffer-local property.
+ * @param name The property name
+ * @since jEdit 4.0pre1
+ */
+ public void unsetProperty(String name)
+ {
+ properties.remove(name);
+ } //}}}
+
+ //{{{ resetCachedProperties() method
+ public void resetCachedProperties()
+ {
+ // Need to reset properties that were cached defaults,
+ // since the defaults might have changed.
+ Iterator<PropValue> iter = properties.values().iterator();
+ while(iter.hasNext())
+ {
+ PropValue value = iter.next();
+ if(value.defaultValue)
+ iter.remove();
+ }
+ } //}}}
+
+ //{{{ getStringProperty() method
+ /**
+ * Returns the value of a string property. This method is thread-safe.
+ * @param name The property name
+ * @since jEdit 4.0pre1
+ */
+ public String getStringProperty(String name)
+ {
+ Object obj = getProperty(name);
+ if(obj != null)
+ return obj.toString();
+ else
+ return null;
+ } //}}}
+
+ //{{{ setStringProperty() method
+ /**
+ * Sets a string property.
+ * @param name The property name
+ * @param value The value
+ * @since jEdit 4.0pre1
+ */
+ public void setStringProperty(String name, String value)
+ {
+ setProperty(name,value);
+ } //}}}
+
+ //{{{ getBooleanProperty() methods
+ /**
+ * Returns the value of a boolean property. This method is thread-safe.
+ * @param name The property name
+ * @since jEdit 4.0pre1
+ */
+ public boolean getBooleanProperty(String name)
+ {
+ return getBooleanProperty(name, false);
+ }
+
+ /**
+ * Returns the value of a boolean property. This method is thread-safe.
+ * @param name The property name
+ * @param def The default value
+ * @since jEdit 4.3pre17
+ */
+ public boolean getBooleanProperty(String name, boolean def)
+ {
+ Object obj = getProperty(name);
+ return StandardUtilities.getBoolean(obj, def);
+ } //}}}
+
+ //{{{ setBooleanProperty() method
+ /**
+ * Sets a boolean property.
+ * @param name The property name
+ * @param value The value
+ * @since jEdit 4.0pre1
+ */
+ public void setBooleanProperty(String name, boolean value)
+ {
+ setProperty(name,value ? Boolean.TRUE : Boolean.FALSE);
+ } //}}}
+
+ //{{{ getIntegerProperty() method
+ /**
+ * Returns the value of an integer property. This method is thread-safe.
+ * @param name The property name
+ * @since jEdit 4.0pre1
+ */
+ public int getIntegerProperty(String name, int defaultValue)
+ {
+ boolean defaultValueFlag;
+ Object obj;
+ PropValue value = properties.get(name);
+ if(value != null)
+ {
+ obj = value.value;
+ defaultValueFlag = value.defaultValue;
+ }
+ else
+ {
+ obj = getProperty(name);
+ // will be cached from now on...
+ defaultValueFlag = true;
+ }
+
+ if(obj == null)
+ return defaultValue;
+ else if(obj instanceof Number)
+ return ((Number)obj).intValue();
+ else
+ {
+ try
+ {
+ int returnValue = Integer.parseInt(
+ obj.toString().trim());
+ properties.put(name,new PropValue(
+ returnValue,
+ defaultValueFlag));
+ return returnValue;
+ }
+ catch(Exception e)
+ {
+ return defaultValue;
+ }
+ }
+ } //}}}
+
+ //{{{ setIntegerProperty() method
+ /**
+ * Sets an integer property.
+ * @param name The property name
+ * @param value The value
+ * @since jEdit 4.0pre1
+ */
+ public void setIntegerProperty(String name, int value)
+ {
+ setProperty(name,value);
+ } //}}}
+
+ //{{{ getPatternProperty()
+ /**
+ * Returns the value of a property as a regular expression.
+ * This method is thread-safe.
+ * @param name The property name
+ * @param flags Regular expression compilation flags
+ * @since jEdit 4.3pre5
+ */
+ public Pattern getPatternProperty(String name, int flags)
+ {
+ synchronized(propertyLock)
+ {
+ boolean defaultValueFlag;
+ Object obj;
+ PropValue value = properties.get(name);
+ if(value != null)
+ {
+ obj = value.value;
+ defaultValueFlag = value.defaultValue;
+ }
+ else
+ {
+ obj = getProperty(name);
+ // will be cached from now on...
+ defaultValueFlag = true;
+ }
+
+ if(obj == null)
+ return null;
+ else if (obj instanceof Pattern)
+ return (Pattern) obj;
+ else
+ {
+ Pattern re = Pattern.compile(obj.toString(),flags);
+ properties.put(name,new PropValue(re,
+ defaultValueFlag));
+ return re;
+ }
+ }
+ } //}}}
+
+ //{{{ getRuleSetAtOffset() method
+ /**
+ * Returns the syntax highlighting ruleset at the specified offset.
+ * @since jEdit 4.1pre1
+ */
+ public ParserRuleSet getRuleSetAtOffset(int offset)
+ {
+ int line = getLineOfOffset(offset);
+ offset -= getLineStartOffset(line);
+ if(offset != 0)
+ offset--;
+
+ DefaultTokenHandler tokens = new DefaultTokenHandler();
+ markTokens(line,tokens);
+ Token token = TextUtilities.getTokenAtOffset(tokens.getTokens(),offset);
+ return token.rules;
+ } //}}}
+
+ //{{{ getKeywordMapAtOffset() method
+ /**
+ * Returns the syntax highlighting keyword map in effect at the
+ * specified offset. Used by the <b>Complete Word</b> command to
+ * complete keywords.
+ * @param offset The offset
+ * @since jEdit 4.0pre3
+ */
+ public KeywordMap getKeywordMapAtOffset(int offset)
+ {
+ return getRuleSetAtOffset(offset).getKeywords();
+ } //}}}
+
+ //{{{ getContextSensitiveProperty() method
+ /**
+ * Some settings, like comment start and end strings, can
+ * vary between different parts of a buffer (HTML text and inline
+ * JavaScript, for example).
+ * @param offset The offset
+ * @param name The property name
+ * @since jEdit 4.0pre3
+ */
+ public String getContextSensitiveProperty(int offset, String name)
+ {
+ ParserRuleSet rules = getRuleSetAtOffset(offset);
+
+ Object value = null;
+
+ Map<String, String> rulesetProps = rules.getProperties();
+ if(rulesetProps != null)
+ value = rulesetProps.get(name);
+
+ if(value == null)
+ return null;
+ else
+ return String.valueOf(value);
+ } //}}}
+
+ //{{{ getMode() method
+ /**
+ * Returns this buffer's edit mode. This method is thread-safe.
+ */
+ public Mode getMode()
+ {
+ return mode;
+ } //}}}
+
+ //{{{ setMode() methods
+ /**
+ * Sets this buffer's edit mode. Note that calling this before a buffer
+ * is loaded will have no effect; in that case, set the "mode" property
+ * to the name of the mode. A bit inelegant, I know...
+ * @param mode The mode name
+ * @since jEdit 4.2pre1
+ */
+ public void setMode(String mode)
+ {
+ setMode(ModeProvider.instance.getMode(mode));
+ }
+
+ /**
+ * Sets this buffer's edit mode. Note that calling this before a buffer
+ * is loaded will have no effect; in that case, set the "mode" property
+ * to the name of the mode. A bit inelegant, I know...
+ * @param mode The mode
+ */
+ public void setMode(Mode mode)
+ {
+ /* This protects against stupid people (like me)
+ * doing stuff like buffer.setMode(jEdit.getMode(...)); */
+ if(mode == null)
+ throw new NullPointerException("Mode must be non-null");
+
+ this.mode = mode;
+
+ textMode = "text".equals(mode.getName());
+
+ setTokenMarker(mode.getTokenMarker());
+
+ resetCachedProperties();
+ propertiesChanged();
+ } //}}}
+
+ //}}}
+
+ //{{{ Folding methods
+
+ //{{{ isFoldStart() method
+ /**
+ * Returns if the specified line begins a fold.
+ * @since jEdit 3.1pre1
+ */
+ public boolean isFoldStart(int line)
+ {
+ return line != getLineCount() - 1
+ && getFoldLevel(line) < getFoldLevel(line + 1);
+ } //}}}
+
+ //{{{ isFoldEnd() method
+ /**
+ * Returns if the specified line ends a fold.
+ * @since jEdit 4.2pre5
+ */
+ public boolean isFoldEnd(int line)
+ {
+ return line != getLineCount() - 1
+ && getFoldLevel(line) > getFoldLevel(line + 1);
+ } //}}}
+
+ //{{{ invalidateCachedFoldLevels() method
+ /**
+ * Invalidates all cached fold level information.
+ * @since jEdit 4.1pre11
+ */
+ public void invalidateCachedFoldLevels()
+ {
+ lineMgr.setFirstInvalidFoldLevel(0);
+ fireFoldLevelChanged(0,getLineCount());
+ } //}}}
+
+ //{{{ getFoldLevel() method
+ /**
+ * Returns the fold level of the specified line.
+ * @param line A physical line index
+ * @since jEdit 3.1pre1
+ */
+ public int getFoldLevel(int line)
+ {
+ if(line < 0 || line >= lineMgr.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(line);
+
+ if(foldHandler instanceof DummyFoldHandler)
+ return 0;
+
+ int firstInvalidFoldLevel = lineMgr.getFirstInvalidFoldLevel();
+ if(firstInvalidFoldLevel == -1 || line < firstInvalidFoldLevel)
+ {
+ return lineMgr.getFoldLevel(line);
+ }
+ else
+ {
+ if(Debug.FOLD_DEBUG)
+ Log.log(Log.DEBUG,this,"Invalid fold levels from " + firstInvalidFoldLevel + " to " + line);
+
+ int newFoldLevel = 0;
+ boolean changed = false;
+ int firstUpdatedFoldLevel = firstInvalidFoldLevel;
+
+ for(int i = firstInvalidFoldLevel; i <= line; i++)
+ {
+ Segment seg = new Segment();
+ newFoldLevel = foldHandler.getFoldLevel(this,i,seg);
+ if(newFoldLevel != lineMgr.getFoldLevel(i))
+ {
+ if(Debug.FOLD_DEBUG)
+ Log.log(Log.DEBUG,this,i + " fold level changed");
+ changed = true;
+ // Update preceding fold levels if necessary
+ if (i == firstInvalidFoldLevel)
+ {
+ List<Integer> precedingFoldLevels =
+ foldHandler.getPrecedingFoldLevels(
+ this,i,seg,newFoldLevel);
+ if (precedingFoldLevels != null)
+ {
+ int j = i;
+ for (Integer foldLevel: precedingFoldLevels)
+ {
+ j--;
+ lineMgr.setFoldLevel(j,foldLevel.intValue());
+ }
+ if (j < firstUpdatedFoldLevel)
+ firstUpdatedFoldLevel = j;
+ }
+ }
+ }
+ lineMgr.setFoldLevel(i,newFoldLevel);
+ }
+
+ if(line == lineMgr.getLineCount() - 1)
+ lineMgr.setFirstInvalidFoldLevel(-1);
+ else
+ lineMgr.setFirstInvalidFoldLevel(line + 1);
+
+ if(changed)
+ {
+ if(Debug.FOLD_DEBUG)
+ Log.log(Log.DEBUG,this,"fold level changed: " + firstUpdatedFoldLevel + ',' + line);
+ fireFoldLevelChanged(firstUpdatedFoldLevel,line);
+ }
+
+ return newFoldLevel;
+ }
+ } //}}}
+
+ //{{{ getFoldAtLine() method
+ /**
+ * Returns an array. The first element is the start line, the
+ * second element is the end line, of the fold containing the
+ * specified line number.
+ * @param line The line number
+ * @since jEdit 4.0pre3
+ */
+ public int[] getFoldAtLine(int line)
+ {
+ int start, end;
+
+ if(isFoldStart(line))
+ {
+ start = line;
+ int foldLevel = getFoldLevel(line);
+
+ line++;
+
+ while(getFoldLevel(line) > foldLevel)
+ {
+ line++;
+
+ if(line == getLineCount())
+ break;
+ }
+
+ end = line - 1;
+ }
+ else
+ {
+ start = line;
+ int foldLevel = getFoldLevel(line);
+ while(getFoldLevel(start) >= foldLevel)
+ {
+ if(start == 0)
+ break;
+ else
+ start--;
+ }
+
+ end = line;
+ while(getFoldLevel(end) >= foldLevel)
+ {
+ end++;
+
+ if(end == getLineCount())
+ break;
+ }
+
+ end--;
+ }
+
+ while(getLineLength(end) == 0 && end > start)
+ end--;
+
+ return new int[] { start, end };
+ } //}}}
+
+ //{{{ getFoldHandler() method
+ /**
+ * Returns the current buffer's fold handler.
+ * @since jEdit 4.2pre1
+ */
+ public FoldHandler getFoldHandler()
+ {
+ return foldHandler;
+ } //}}}
+
+ //{{{ setFoldHandler() method
+ /**
+ * Sets the buffer's fold handler.
+ * @since jEdit 4.2pre2
+ */
+ public void setFoldHandler(FoldHandler foldHandler)
+ {
+ FoldHandler oldFoldHandler = this.foldHandler;
+
+ if(foldHandler.equals(oldFoldHandler))
+ return;
+
+ this.foldHandler = foldHandler;
+
+ lineMgr.setFirstInvalidFoldLevel(0);
+
+ fireFoldHandlerChanged();
+ } //}}}
+
+ //}}}
+
+ //{{{ Undo
+
+ //{{{ undo() method
+ /**
+ * Undoes the most recent edit.
+ *
+ * @since jEdit 4.0pre1
+ */
+ public void undo(TextArea textArea)
+ {
+ if(undoMgr == null)
+ return;
+
+ if(!isEditable())
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+
+ try
+ {
+ writeLock();
+
+ undoInProgress = true;
+ fireBeginUndo();
+ int caret = undoMgr.undo();
+ if(caret == -1)
+ textArea.getToolkit().beep();
+ else
+ textArea.setCaretPosition(caret);
+
+ fireEndUndo();
+ fireTransactionComplete();
+ }
+ finally
+ {
+ undoInProgress = false;
+
+ writeUnlock();
+ }
+ } //}}}
+
+ //{{{ redo() method
+ /**
+ * Redoes the most recently undone edit.
+ *
+ * @since jEdit 2.7pre2
+ */
+ public void redo(TextArea textArea)
+ {
+ if(undoMgr == null)
+ return;
+
+ if(!isEditable())
+ {
+ Toolkit.getDefaultToolkit().beep();
+ return;
+ }
+
+ try
+ {
+ writeLock();
+
+ undoInProgress = true;
+ fireBeginRedo();
+ int caret = undoMgr.redo();
+ if(caret == -1)
+ textArea.getToolkit().beep();
+ else
+ textArea.setCaretPosition(caret);
+
+ fireEndRedo();
+ fireTransactionComplete();
+ }
+ finally
+ {
+ undoInProgress = false;
+
+ writeUnlock();
+ }
+ } //}}}
+
+ //{{{ isTransactionInProgress() method
+ /**
+ * Returns if an undo or compound edit is currently in progress. If this
+ * method returns true, then eventually a
+ * {@link org.gjt.sp.jedit.buffer.BufferListener#transactionComplete(JEditBuffer)}
+ * buffer event will get fired.
+ * @since jEdit 4.0pre6
+ */
+ public boolean isTransactionInProgress()
+ {
+ return transaction || undoInProgress || insideCompoundEdit();
+ } //}}}
+
+ //{{{ beginCompoundEdit() method
+ /**
+ * Starts a compound edit. All edits from now on until
+ * {@link #endCompoundEdit()} are called will be merged
+ * into one. This can be used to make a complex operation
+ * undoable in one step. Nested calls to
+ * {@link #beginCompoundEdit()} behave as expected,
+ * requiring the same number of {@link #endCompoundEdit()}
+ * calls to end the edit.
+ * @see #endCompoundEdit()
+ */
+ public void beginCompoundEdit()
+ {
+ try
+ {
+ writeLock();
+
+ undoMgr.beginCompoundEdit();
+ }
+ finally
+ {
+ writeUnlock();
+ }
+ } //}}}
+
+ //{{{ endCompoundEdit() method
+ /**
+ * Ends a compound edit. All edits performed since
+ * {@link #beginCompoundEdit()} was called can now
+ * be undone in one step by calling {@link #undo(TextArea)}.
+ * @see #beginCompoundEdit()
+ */
+ public void endCompoundEdit()
+ {
+ try
+ {
+ writeLock();
+
+ undoMgr.endCompoundEdit();
+
+ if(!insideCompoundEdit())
+ fireTransactionComplete();
+ }
+ finally
+ {
+ writeUnlock();
+ }
+ }//}}}
+
+ //{{{ insideCompoundEdit() method
+ /**
+ * Returns if a compound edit is currently active.
+ * @since jEdit 3.1pre1
+ */
+ public boolean insideCompoundEdit()
+ {
+ return undoMgr.insideCompoundEdit();
+ } //}}}
+
+ //{{{ isUndoInProgress() method
+ /**
+ * Returns if an undo or redo is currently being performed.
+ * @since jEdit 4.3pre3
+ */
+ public boolean isUndoInProgress()
+ {
+ return undoInProgress;
+ } //}}}
+
+ //{{{ getUndoId() method
+ /**
+ * Returns an object that identifies the undo operation to which the
+ * current content change belongs. This method can be used by buffer
+ * listeners during content changes (contentInserted/contentRemoved)
+ * to find out which content changes belong to the same "undo" operation.
+ * The same undoId object will be returned for all content changes
+ * belonging to the same undo operation. Only the identity of the
+ * undoId can be used, by comparing it with a previously-returned undoId
+ * using "==".
+ * @since jEdit 4.3pre18
+ */
+ public Object getUndoId()
+ {
+ return undoMgr.getUndoId();
+ } //}}}
+
+ //}}}
+
+ //{{{ Buffer events
+ public static final int NORMAL_PRIORITY = 0;
+ public static final int HIGH_PRIORITY = 1;
+
+ static class Listener
+ {
+ BufferListener listener;
+ int priority;
+
+ Listener(BufferListener listener, int priority)
+ {
+ this.listener = listener;
+ this.priority = priority;
+ }
+ }
+
+ //{{{ addBufferListener() methods
+ /**
+ * Adds a buffer change listener.
+ * @param listener The listener
+ * @param priority Listeners with HIGH_PRIORITY get the event before
+ * listeners with NORMAL_PRIORITY
+ * @since jEdit 4.3pre3
+ */
+ public void addBufferListener(BufferListener listener,
+ int priority)
+ {
+ Listener l = new Listener(listener,priority);
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ Listener _l = bufferListeners.get(i);
+ if(_l.priority < priority)
+ {
+ bufferListeners.add(i,l);
+ return;
+ }
+ }
+ bufferListeners.add(l);
+ }
+
+ /**
+ * Adds a buffer change listener.
+ * @param listener The listener
+ * @since jEdit 4.3pre3
+ */
+ public void addBufferListener(BufferListener listener)
+ {
+ addBufferListener(listener,NORMAL_PRIORITY);
+ } //}}}
+
+ //{{{ removeBufferListener() method
+ /**
+ * Removes a buffer change listener.
+ * @param listener The listener
+ * @since jEdit 4.3pre3
+ */
+ public void removeBufferListener(BufferListener listener)
+ {
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ if(bufferListeners.get(i).listener == listener)
+ {
+ bufferListeners.remove(i);
+ return;
+ }
+ }
+ } //}}}
+
+ //{{{ getBufferListeners() method
+ /**
+ * Returns an array of registered buffer change listeners.
+ * @since jEdit 4.3pre3
+ */
+ public BufferListener[] getBufferListeners()
+ {
+ BufferListener[] returnValue
+ = new BufferListener[
+ bufferListeners.size()];
+ for(int i = 0; i < returnValue.length; i++)
+ {
+ returnValue[i] = bufferListeners.get(i).listener;
+ }
+ return returnValue;
+ } //}}}
+
+ //{{{ setUndoLimit() method
+ /**
+ * Set the undo limit of the Undo Manager.
+ *
+ * @param limit the new limit
+ * @since jEdit 4.3pre16
+ */
+ public void setUndoLimit(int limit)
+ {
+ if (undoMgr != null)
+ undoMgr.setLimit(limit);
+ } //}}}
+
+ //{{{ canUndo() method
+ /**
+ * Returns true if an undo operation can be performed.
+ * @since jEdit 4.3pre18
+ */
+ public boolean canUndo()
+ {
+ if (undoMgr == null)
+ return false;
+ return undoMgr.canUndo();
+ } //}}}
+
+ //{{{ canRedo() method
+ /**
+ * Returns true if a redo operation can be performed.
+ * @since jEdit 4.3pre18
+ */
+ public boolean canRedo()
+ {
+ if (undoMgr == null)
+ return false;
+ return undoMgr.canRedo();
+ } //}}}
+
+ //}}}
+
+ //{{{ Protected members
+
+ protected Mode mode;
+ protected boolean textMode;
+ protected UndoManager undoMgr;
+
+ //{{{ Event firing methods
+
+ //{{{ fireFoldLevelChanged() method
+ protected void fireFoldLevelChanged(int start, int end)
+ {
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ BufferListener listener = getListener(i);
+ try
+ {
+ listener.foldLevelChanged(this,start,end);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ fireContentInserted() method
+ protected void fireContentInserted(int startLine, int offset,
+ int numLines, int length)
+ {
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ BufferListener listener = getListener(i);
+ try
+ {
+ listener.contentInserted(this,startLine,
+ offset,numLines,length);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ fireContentRemoved() method
+ protected void fireContentRemoved(int startLine, int offset,
+ int numLines, int length)
+ {
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ BufferListener listener = getListener(i);
+ try
+ {
+ listener.contentRemoved(this,startLine,
+ offset,numLines,length);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ firePreContentInserted() method
+ protected void firePreContentInserted(int startLine, int offset,
+ int numLines, int length)
+ {
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ BufferListener listener = getListener(i);
+ try
+ {
+ listener.preContentInserted(this,startLine,
+ offset,numLines,length);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ firePreContentRemoved() method
+ protected void firePreContentRemoved(int startLine, int offset,
+ int numLines, int length)
+ {
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ BufferListener listener = getListener(i);
+ try
+ {
+ listener.preContentRemoved(this,startLine,
+ offset,numLines,length);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ fireBeginUndo() method
+ protected void fireBeginUndo()
+ {
+ } //}}}
+
+ //{{{ fireEndUndo() method
+ protected void fireEndUndo()
+ {
+ } //}}}
+
+ //{{{ fireBeginRedo() method
+ protected void fireBeginRedo()
+ {
+ } //}}}
+
+ //{{{ fireEndRedo() method
+ protected void fireEndRedo()
+ {
+ } //}}}
+
+ //{{{ fireTransactionComplete() method
+ protected void fireTransactionComplete()
+ {
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ BufferListener listener = getListener(i);
+ try
+ {
+ listener.transactionComplete(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ fireFoldHandlerChanged() method
+ protected void fireFoldHandlerChanged()
+ {
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ BufferListener listener = getListener(i);
+ try
+ {
+ listener.foldHandlerChanged(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //{{{ fireBufferLoaded() method
+ protected void fireBufferLoaded()
+ {
+ for(int i = 0; i < bufferListeners.size(); i++)
+ {
+ BufferListener listener = getListener(i);
+ try
+ {
+ listener.bufferLoaded(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Exception while sending buffer event to "+ listener +" :");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ isFileReadOnly() method
+ protected boolean isFileReadOnly()
+ {
+ return readOnly;
+ } //}}}
+
+ //{{{ setFileReadOnly() method
+ protected void setFileReadOnly(boolean readOnly)
+ {
+ this.readOnly = readOnly;
+ } //}}}
+
+ //{{{ loadText() method
+ protected void loadText(Segment seg, IntegerArray endOffsets)
+ {
+ if(seg == null)
+ seg = new Segment(new char[1024],0,0);
+
+ if(endOffsets == null)
+ {
+ endOffsets = new IntegerArray();
+ endOffsets.add(1);
+ }
+
+ try
+ {
+ writeLock();
+
+ // For `reload' command
+ // contentMgr.remove() changes this!
+ int length = getLength();
+
+ firePreContentRemoved(0,0,getLineCount()
+ - 1,length);
+
+ contentMgr.remove(0,length);
+ lineMgr.contentRemoved(0,0,getLineCount()
+ - 1,length);
+ positionMgr.contentRemoved(0,length);
+ fireContentRemoved(0,0,getLineCount()
+ - 1,length);
+
+ firePreContentInserted(0, 0, endOffsets.getSize() - 1, seg.count - 1);
+ // theoretically a segment could
+ // have seg.offset != 0 but
+ // SegmentBuffer never does that
+ contentMgr._setContent(seg.array,seg.count);
+
+ lineMgr._contentInserted(endOffsets);
+ positionMgr.contentInserted(0,seg.count);
+
+ fireContentInserted(0,0,
+ endOffsets.getSize() - 1,
+ seg.count - 1);
+ }
+ finally
+ {
+ writeUnlock();
+ }
+ } //}}}
+
+ //{{{ invalidateFoldLevels() method
+ protected void invalidateFoldLevels()
+ {
+ lineMgr.setFirstInvalidFoldLevel(0);
+ } //}}}
+
+ //{{{ parseBufferLocalProperties() method
+ protected void parseBufferLocalProperties()
+ {
+ int maxRead = 10000;
+ int lineCount = getLineCount();
+ int lastLine = Math.min(9, lineCount - 1);
+ int max = Math.min(maxRead, getLineEndOffset(lastLine) - 1);
+ parseBufferLocalProperties(getSegment(0, max));
+
+ // first line for last 10 lines, make sure not to overlap
+ // with the first 10
+ int firstLine = Math.max(lastLine + 1, lineCount - 10);
+ if(firstLine < lineCount)
+ {
+ int firstLineStartOffset = getLineStartOffset(firstLine);
+ int length = getLineEndOffset(lineCount - 1)
+ - (firstLineStartOffset + 1);
+ if (length > maxRead)
+ {
+ firstLineStartOffset += length - maxRead;
+ length = maxRead;
+ }
+ parseBufferLocalProperties(getSegment(firstLineStartOffset,length));
+ }
+ } //}}}
+
+ //{{{ Used to store property values
+ protected static class PropValue
+ {
+ PropValue(Object value, boolean defaultValue)
+ {
+ if(value == null)
+ throw new NullPointerException();
+ this.value = value;
+ this.defaultValue = defaultValue;
+ }
+
+ Object value;
+
+ /**
+ * If this is true, then this value is cached from the mode
+ * or global defaults, so when the defaults change this property
+ * value must be reset.
+ */
+ boolean defaultValue;
+
+ /**
+ * For debugging purposes.
+ */
+ public String toString()
+ {
+ return value.toString();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private List<Listener> bufferListeners;
+ private final ReentrantReadWriteLock lock;
+ private ContentManager contentMgr;
+ private LineManager lineMgr;
+ private PositionManager positionMgr;
+ private FoldHandler foldHandler;
+ private IntegerArray integerArray;
+ private TokenMarker tokenMarker;
+ private boolean undoInProgress;
+ private boolean dirty;
+ private boolean readOnly;
+ private boolean readOnlyOverride;
+ private boolean transaction;
+ private boolean loading;
+ private boolean io;
+ private final Map<Object, PropValue> properties;
+ private final Object propertyLock;
+
+ //{{{ getListener() method
+ private BufferListener getListener(int index)
+ {
+ return bufferListeners.get(index).listener;
+ } //}}}
+
+ //{{{ contentInserted() method
+ private void contentInserted(int offset, int length,
+ IntegerArray endOffsets)
+ {
+ try
+ {
+ transaction = true;
+
+ int startLine = lineMgr.getLineOfOffset(offset);
+ int numLines = endOffsets.getSize();
+
+ if (!loading)
+ {
+ firePreContentInserted(startLine, offset, numLines, length);
+ }
+
+ lineMgr.contentInserted(startLine,offset,numLines,length,
+ endOffsets);
+ positionMgr.contentInserted(offset,length);
+
+ setDirty(true);
+
+ if(!loading)
+ {
+ fireContentInserted(startLine,offset,numLines,length);
+
+ if(!undoInProgress && !insideCompoundEdit())
+ fireTransactionComplete();
+ }
+
+ }
+ finally
+ {
+ transaction = false;
+ }
+ } //}}}
+
+ //{{{ parseBufferLocalProperties() method
+ private void parseBufferLocalProperties(CharSequence prop)
+ {
+ StringBuilder buf = new StringBuilder();
+ String name = null;
+ boolean escape = false;
+ int length = prop.length();
+ for(int i = 0; i < length; i++)
+ {
+ char c = prop.charAt(i);
+ switch(c)
+ {
+ case ':':
+ if(escape)
+ {
+ escape = false;
+ buf.append(':');
+ break;
+ }
+ if(name != null)
+ {
+ // use the low-level property setting code
+ // so that if we have a buffer-local
+ // property with the same value as a default,
+ // later changes in the default don't affect
+ // the buffer-local property
+ properties.put(name,new PropValue(buf.toString(),false));
+ name = null;
+ }
+ buf.setLength(0);
+ break;
+ case '=':
+ if(escape)
+ {
+ escape = false;
+ buf.append('=');
+ break;
+ }
+ name = buf.toString();
+ buf.setLength(0);
+ break;
+ case '\\':
+ if(escape)
+ buf.append('\\');
+ escape = !escape;
+ break;
+ case 'n':
+ if(escape)
+ { buf.append('\n');
+ escape = false;
+ break;
+ }
+ case 'r':
+ if(escape)
+ { buf.append('\r');
+ escape = false;
+ break;
+ }
+ case 't':
+ if(escape)
+ {
+ buf.append('\t');
+ escape = false;
+ break;
+ }
+ default:
+ buf.append(c);
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ getIndentRules() method
+ private List<IndentRule> getIndentRules(int line)
+ {
+ String modeName = null;
+ TokenMarker.LineContext ctx = lineMgr.getLineContext(line);
+ if (ctx != null && ctx.rules != null)
+ modeName = ctx.rules.getModeName();
+ if (modeName == null)
+ modeName = tokenMarker.getMainRuleSet().getModeName();
+ return ModeProvider.instance.getMode(modeName).getIndentRules();
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/KillRing.java b/jEdit/org/gjt/sp/jedit/buffer/KillRing.java
index d1f899d..6e6f8b4 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/KillRing.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/KillRing.java
@@ -1,300 +1,300 @@
-/*
- * KillRing.java - Stores deleted text
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-import javax.swing.event.ListDataListener;
-import java.util.List;
-
-import org.gjt.sp.jedit.gui.MutableListModel;
-
-/**
- * The kill ring retains deleted text. This class is a singleton -- only one
- * kill ring is used for all of jEdit. Nothing prevents plugins from making their
- * own kill rings for whatever reason, though.
- */
-public class KillRing implements MutableListModel
-{
- //{{{ getInstance() method
- public static KillRing getInstance()
- {
- return killRing;
- } //}}}
-
- //{{{ setInstance() method
- public static void setInstance(KillRing killRing)
- {
- KillRing.killRing = killRing;
- } //}}}
-
- //{{{ propertiesChanged() method
- public void propertiesChanged(int historySize)
- {
- int newSize = Math.max(1, historySize);
- if(ring == null)
- ring = new UndoManager.RemovedContent[newSize];
- else if(newSize != ring.length)
- {
- UndoManager.RemovedContent[] newRing = new UndoManager.RemovedContent[
- newSize];
- int newCount = Math.min(getSize(),newSize);
- for(int i = 0; i < newCount; i++)
- {
- newRing[i] = (UndoManager.RemovedContent)getElementAt(i);
- }
- ring = newRing;
- count = newCount;
- wrap = false;
- }
-
- if(count == ring.length)
- {
- count = 0;
- wrap = true;
- }
- } //}}}
-
- public void load() {}
-
- public void save() {}
-
- //{{{ reset() method
- /**
- * This method is made to be used by implementation of load()
- * method to initialize (or reset) the killring by a loaded
- * sequence of objects.
- *
- * Each element is converted to an element of the killring as
- * followings:
- * - If it is a String, it is converted as if it is a result of
- * getElementAt(n).toString().
- * - Otherwise, it is converted as if it is a Object which was
- * obtained by getElementAt(n).
- *
- * @since jEdit 4.3pre12
- */
- protected void reset(List source)
- {
- UndoManager.RemovedContent[] newRing
- = new UndoManager.RemovedContent[source.size()];
- int i = 0;
- for(Object x: source)
- {
- UndoManager.RemovedContent element;
- if(x instanceof String)
- {
- element = new UndoManager.RemovedContent(
- (String)x);
- }
- else
- {
- element = (UndoManager.RemovedContent)x;
- }
- newRing[i++] = element;
- }
- ring = newRing;
- count = 0;
- wrap = true;
- } //}}}
-
- //{{{ MutableListModel implementation
- public void addListDataListener(ListDataListener listener) {}
-
- public void removeListDataListener(ListDataListener listener) {}
-
- //{{{ getElementAt() method
- public Object getElementAt(int index)
- {
- return ring[virtualToPhysicalIndex(index)];
- } //}}}
-
- //{{{ getSize() method
- public int getSize()
- {
- if(wrap)
- return ring.length;
- else
- return count;
- } //}}}
-
- //{{{ removeElement() method
- public boolean removeElement(Object value)
- {
- for(int i = 0; i < getSize(); i++)
- {
- if(ring[i].equals(value))
- {
- remove(i);
- return true;
- }
- }
- return false;
- } //}}}
-
- //{{{ insertElementAt() method
- public void insertElementAt(Object value, int index)
- {
- /* This is not terribly efficient, but this method is only
- called by the 'Paste Deleted' dialog where the performance
- is not exactly vital */
- remove(index);
- add((UndoManager.RemovedContent)value);
- } //}}}
-
- //}}}
-
- //{{{ Package-private members
-
- //{{{ changed() method
- void changed(UndoManager.RemovedContent rem)
- {
- if(rem.inKillRing)
- {
- // compare existing entries' hashcode with this
- int length = (wrap ? ring.length : count);
- int kill = -1;
-
- for(int i = 0; i < length; i++)
- {
- if(ring[i] != rem
- && ring[i].hashcode == rem.hashcode
- && ring[i].str.equals(rem.str))
- {
- // we don't want duplicate
- // entries in the kill ring
- kill = i;
- break;
- }
- }
-
- if(kill != -1)
- remove(kill);
- }
- else
- add(rem);
- } //}}}
-
- //{{{ add() method
- void add(UndoManager.RemovedContent rem)
- {
- // compare existing entries' hashcode with this
- int length = (wrap ? ring.length : count);
- for(int i = 0; i < length; i++)
- {
- if(ring[i].hashcode == rem.hashcode)
- {
- // strings might be equal!
- if(ring[i].str.equals(rem.str))
- {
- // we don't want duplicate entries
- // in the kill ring
- return;
- }
- }
- }
-
- // no duplicates, check for all-whitespace string
- boolean allWhitespace = true;
- for(int i = 0; i < rem.str.length(); i++)
- {
- if(!Character.isWhitespace(rem.str.charAt(i)))
- {
- allWhitespace = false;
- break;
- }
- }
-
- if(allWhitespace)
- return;
-
- rem.inKillRing = true;
-
- if(ring[count] != null)
- ring[count].inKillRing = false;
-
- ring[count] = rem;
- if(++count >= ring.length)
- {
- wrap = true;
- count = 0;
- }
- } //}}}
-
- //{{{ remove() method
- void remove(int i)
- {
- if(wrap)
- {
- UndoManager.RemovedContent[] newRing = new UndoManager.RemovedContent[
- ring.length];
- int newCount = 0;
- for(int j = 0; j < ring.length; j++)
- {
- int index = virtualToPhysicalIndex(j);
-
- if(i == index)
- {
- ring[index].inKillRing = false;
- continue;
- }
-
- newRing[newCount++] = ring[index];
- }
- ring = newRing;
- count = newCount;
- wrap = false;
- }
- else
- {
- System.arraycopy(ring,i + 1,ring,i,count - i - 1);
- count--;
- }
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private UndoManager.RemovedContent[] ring;
- private int count;
- private boolean wrap;
- private static KillRing killRing = new KillRing();
-
- //{{{ virtualToPhysicalIndex() method
- /**
- * Since the kill ring has a wrap-around representation, we need to
- * convert user-visible indices to actual indices in the array.
- */
- private int virtualToPhysicalIndex(int index)
- {
- if(wrap)
- {
- if(index < count)
- return count - index - 1;
- else
- return count + ring.length - index - 1;
- }
- else
- return count - index - 1;
- } //}}}
-
- //}}}
-}
+/*
+ * KillRing.java - Stores deleted text
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+import javax.swing.event.ListDataListener;
+import java.util.List;
+
+import org.gjt.sp.jedit.gui.MutableListModel;
+
+/**
+ * The kill ring retains deleted text. This class is a singleton -- only one
+ * kill ring is used for all of jEdit. Nothing prevents plugins from making their
+ * own kill rings for whatever reason, though.
+ */
+public class KillRing implements MutableListModel
+{
+ //{{{ getInstance() method
+ public static KillRing getInstance()
+ {
+ return killRing;
+ } //}}}
+
+ //{{{ setInstance() method
+ public static void setInstance(KillRing killRing)
+ {
+ KillRing.killRing = killRing;
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ public void propertiesChanged(int historySize)
+ {
+ int newSize = Math.max(1, historySize);
+ if(ring == null)
+ ring = new UndoManager.RemovedContent[newSize];
+ else if(newSize != ring.length)
+ {
+ UndoManager.RemovedContent[] newRing = new UndoManager.RemovedContent[
+ newSize];
+ int newCount = Math.min(getSize(),newSize);
+ for(int i = 0; i < newCount; i++)
+ {
+ newRing[i] = (UndoManager.RemovedContent)getElementAt(i);
+ }
+ ring = newRing;
+ count = newCount;
+ wrap = false;
+ }
+
+ if(count == ring.length)
+ {
+ count = 0;
+ wrap = true;
+ }
+ } //}}}
+
+ public void load() {}
+
+ public void save() {}
+
+ //{{{ reset() method
+ /**
+ * This method is made to be used by implementation of load()
+ * method to initialize (or reset) the killring by a loaded
+ * sequence of objects.
+ *
+ * Each element is converted to an element of the killring as
+ * followings:
+ * - If it is a String, it is converted as if it is a result of
+ * getElementAt(n).toString().
+ * - Otherwise, it is converted as if it is a Object which was
+ * obtained by getElementAt(n).
+ *
+ * @since jEdit 4.3pre12
+ */
+ protected void reset(List source)
+ {
+ UndoManager.RemovedContent[] newRing
+ = new UndoManager.RemovedContent[source.size()];
+ int i = 0;
+ for(Object x: source)
+ {
+ UndoManager.RemovedContent element;
+ if(x instanceof String)
+ {
+ element = new UndoManager.RemovedContent(
+ (String)x);
+ }
+ else
+ {
+ element = (UndoManager.RemovedContent)x;
+ }
+ newRing[i++] = element;
+ }
+ ring = newRing;
+ count = 0;
+ wrap = true;
+ } //}}}
+
+ //{{{ MutableListModel implementation
+ public void addListDataListener(ListDataListener listener) {}
+
+ public void removeListDataListener(ListDataListener listener) {}
+
+ //{{{ getElementAt() method
+ public Object getElementAt(int index)
+ {
+ return ring[virtualToPhysicalIndex(index)];
+ } //}}}
+
+ //{{{ getSize() method
+ public int getSize()
+ {
+ if(wrap)
+ return ring.length;
+ else
+ return count;
+ } //}}}
+
+ //{{{ removeElement() method
+ public boolean removeElement(Object value)
+ {
+ for(int i = 0; i < getSize(); i++)
+ {
+ if(ring[i].equals(value))
+ {
+ remove(i);
+ return true;
+ }
+ }
+ return false;
+ } //}}}
+
+ //{{{ insertElementAt() method
+ public void insertElementAt(Object value, int index)
+ {
+ /* This is not terribly efficient, but this method is only
+ called by the 'Paste Deleted' dialog where the performance
+ is not exactly vital */
+ remove(index);
+ add((UndoManager.RemovedContent)value);
+ } //}}}
+
+ //}}}
+
+ //{{{ Package-private members
+
+ //{{{ changed() method
+ void changed(UndoManager.RemovedContent rem)
+ {
+ if(rem.inKillRing)
+ {
+ // compare existing entries' hashcode with this
+ int length = (wrap ? ring.length : count);
+ int kill = -1;
+
+ for(int i = 0; i < length; i++)
+ {
+ if(ring[i] != rem
+ && ring[i].hashcode == rem.hashcode
+ && ring[i].str.equals(rem.str))
+ {
+ // we don't want duplicate
+ // entries in the kill ring
+ kill = i;
+ break;
+ }
+ }
+
+ if(kill != -1)
+ remove(kill);
+ }
+ else
+ add(rem);
+ } //}}}
+
+ //{{{ add() method
+ void add(UndoManager.RemovedContent rem)
+ {
+ // compare existing entries' hashcode with this
+ int length = (wrap ? ring.length : count);
+ for(int i = 0; i < length; i++)
+ {
+ if(ring[i].hashcode == rem.hashcode)
+ {
+ // strings might be equal!
+ if(ring[i].str.equals(rem.str))
+ {
+ // we don't want duplicate entries
+ // in the kill ring
+ return;
+ }
+ }
+ }
+
+ // no duplicates, check for all-whitespace string
+ boolean allWhitespace = true;
+ for(int i = 0; i < rem.str.length(); i++)
+ {
+ if(!Character.isWhitespace(rem.str.charAt(i)))
+ {
+ allWhitespace = false;
+ break;
+ }
+ }
+
+ if(allWhitespace)
+ return;
+
+ rem.inKillRing = true;
+
+ if(ring[count] != null)
+ ring[count].inKillRing = false;
+
+ ring[count] = rem;
+ if(++count >= ring.length)
+ {
+ wrap = true;
+ count = 0;
+ }
+ } //}}}
+
+ //{{{ remove() method
+ void remove(int i)
+ {
+ if(wrap)
+ {
+ UndoManager.RemovedContent[] newRing = new UndoManager.RemovedContent[
+ ring.length];
+ int newCount = 0;
+ for(int j = 0; j < ring.length; j++)
+ {
+ int index = virtualToPhysicalIndex(j);
+
+ if(i == index)
+ {
+ ring[index].inKillRing = false;
+ continue;
+ }
+
+ newRing[newCount++] = ring[index];
+ }
+ ring = newRing;
+ count = newCount;
+ wrap = false;
+ }
+ else
+ {
+ System.arraycopy(ring,i + 1,ring,i,count - i - 1);
+ count--;
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private UndoManager.RemovedContent[] ring;
+ private int count;
+ private boolean wrap;
+ private static KillRing killRing = new KillRing();
+
+ //{{{ virtualToPhysicalIndex() method
+ /**
+ * Since the kill ring has a wrap-around representation, we need to
+ * convert user-visible indices to actual indices in the array.
+ */
+ private int virtualToPhysicalIndex(int index)
+ {
+ if(wrap)
+ {
+ if(index < count)
+ return count - index - 1;
+ else
+ return count + ring.length - index - 1;
+ }
+ else
+ return count - index - 1;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/LineManager.java b/jEdit/org/gjt/sp/jedit/buffer/LineManager.java
index 78057f2..195183a 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/LineManager.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/LineManager.java
@@ -1,362 +1,362 @@
-/*
- * LineManager.java - Manages line info, line start offsets, positions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-//{{{ Imports
-import org.gjt.sp.jedit.syntax.*;
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.util.IntegerArray;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * A class internal to jEdit's document model. You should not use it
- * directly. To improve performance, none of the methods in this class
- * check for out of bounds access, nor are they thread-safe. The
- * <code>Buffer</code> class, through which these methods must be
- * called through, implements such protection.
- *
- * @author Slava Pestov
- * @version $Id: LineManager.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.2pre3
- */
-public class LineManager
-{
- //{{{ LineManager constructor
- public LineManager()
- {
- endOffsets = new int[1];
- endOffsets[0] = 1;
- foldLevels = new short[1];
- lineContext = new TokenMarker.LineContext[1];
- lineCount = 1;
- } //}}}
-
- //{{{ getLineCount() method
- public final int getLineCount()
- {
- return lineCount;
- } //}}}
-
- //{{{ getLineOfOffset() method
- public int getLineOfOffset(int offset)
- {
- int start = 0;
- int end = lineCount - 1;
-
- for(;;)
- {
- switch(end - start)
- {
- case 0:
- if(getLineEndOffset(start) <= offset)
- return start + 1;
- else
- return start;
- case 1:
- if(getLineEndOffset(start) <= offset)
- {
- if(getLineEndOffset(end) <= offset)
- return end + 1;
- else
- return end;
- }
- else
- return start;
- default:
- int pivot = (end + start) / 2;
- int value = getLineEndOffset(pivot);
- if(value == offset)
- return pivot + 1;
- else if(value < offset)
- start = pivot + 1;
- else
- end = pivot - 1;
- break;
- }
- }
- } //}}}
-
- //{{{ getLineEndOffset() method
- public final int getLineEndOffset(int line)
- {
- if(gapLine != -1 && line >= gapLine)
- return endOffsets[line] + gapWidth;
- else
- return endOffsets[line];
- } //}}}
-
- //{{{ getFoldLevel() method
- public final int getFoldLevel(int line)
- {
- return foldLevels[line];
- } //}}}
-
- //{{{ setFoldLevel() method
- // Also sets 'fold level valid' flag
- public final void setFoldLevel(int line, int level)
- {
- if(level > 0xffff)
- {
- // limitations...
- level = 0xffff;
- }
-
- foldLevels[line] = (short)level;
- } //}}}
-
- //{{{ setFirstInvalidFoldLevel() method
- public void setFirstInvalidFoldLevel(int firstInvalidFoldLevel)
- {
- this.firstInvalidFoldLevel = firstInvalidFoldLevel;
- } //}}}
-
- //{{{ getFirstInvalidFoldLevel() method
- public int getFirstInvalidFoldLevel()
- {
- return firstInvalidFoldLevel;
- } //}}}
-
- //{{{ getLineContext() method
- public final TokenMarker.LineContext getLineContext(int line)
- {
- return lineContext[line];
- } //}}}
-
- //{{{ setLineContext() method
- public final void setLineContext(int line, TokenMarker.LineContext context)
- {
- lineContext[line] = context;
- } //}}}
-
- //{{{ setFirstInvalidLineContext() method
- public void setFirstInvalidLineContext(int firstInvalidLineContext)
- {
- this.firstInvalidLineContext = firstInvalidLineContext;
- } //}}}
-
- //{{{ getFirstInvalidLineContext() method
- public int getFirstInvalidLineContext()
- {
- return firstInvalidLineContext;
- } //}}}
-
- //{{{ _contentInserted() method
- public void _contentInserted(IntegerArray endOffsets)
- {
- gapLine = -1;
- gapWidth = 0;
- firstInvalidLineContext = firstInvalidFoldLevel = 0;
- lineCount = endOffsets.getSize();
- this.endOffsets = endOffsets.getArray();
- foldLevels = new short[lineCount];
-
- lineContext = new TokenMarker.LineContext[lineCount];
- } //}}}
-
- //{{{ contentInserted() method
- public void contentInserted(int startLine, int offset,
- int numLines, int length, IntegerArray endOffsets)
- {
- int endLine = startLine + numLines;
-
- //{{{ Update line info and line context arrays
- if(numLines > 0)
- {
- //moveGap(-1,0,"contentInserted");
-
- lineCount += numLines;
-
- if(this.endOffsets.length <= lineCount)
- {
- int[] endOffsetsN = new int[(lineCount + 1) * 2];
- System.arraycopy(this.endOffsets,0,endOffsetsN,0,
- this.endOffsets.length);
- this.endOffsets = endOffsetsN;
- }
-
- if(foldLevels.length <= lineCount)
- {
- short[] foldLevelsN = new short[(lineCount + 1) * 2];
- System.arraycopy(foldLevels,0,foldLevelsN,0,
- foldLevels.length);
- foldLevels = foldLevelsN;
- }
-
- if(lineContext.length <= lineCount)
- {
- TokenMarker.LineContext[] lineContextN
- = new TokenMarker.LineContext[(lineCount + 1) * 2];
- System.arraycopy(lineContext,0,lineContextN,0,
- lineContext.length);
- lineContext = lineContextN;
- }
-
- System.arraycopy(this.endOffsets,startLine,
- this.endOffsets,endLine,lineCount - endLine);
- System.arraycopy(foldLevels,startLine,foldLevels,
- endLine,lineCount - endLine);
- System.arraycopy(lineContext,startLine,lineContext,
- endLine,lineCount - endLine);
-
- if(startLine <= gapLine)
- gapLine += numLines;
- else if(gapLine != -1)
- offset -= gapWidth;
-
- if(startLine < firstInvalidLineContext)
- firstInvalidLineContext += numLines;
-
- for(int i = 0; i < numLines; i++)
- {
- this.endOffsets[startLine + i] = (offset + endOffsets.get(i));
- foldLevels[startLine + i] = 0;
- }
- } //}}}
-
- if(firstInvalidFoldLevel == -1 || firstInvalidFoldLevel > startLine)
- firstInvalidFoldLevel = startLine;
- moveGap(endLine,length,"contentInserted");
- } //}}}
-
- //{{{ contentRemoved() method
- public void contentRemoved(int startLine, int offset,
- int numLines, int length)
- {
- int endLine = startLine + numLines;
-
- //{{{ Update line info and line context arrays
- if(numLines > 0)
- {
- //moveGap(-1,0,"contentRemoved");
-
- if(startLine + numLines < gapLine)
- gapLine -= numLines;
- else if(startLine < gapLine)
- gapLine = startLine;
-
- if(startLine + numLines < firstInvalidLineContext)
- firstInvalidLineContext -= numLines;
- else if(startLine < firstInvalidLineContext)
- firstInvalidLineContext = startLine - 1;
-
- lineCount -= numLines;
-
- System.arraycopy(endOffsets,endLine,endOffsets,
- startLine,lineCount - startLine);
- System.arraycopy(foldLevels,endLine,foldLevels,
- startLine,lineCount - startLine);
- System.arraycopy(lineContext,endLine,lineContext,
- startLine,lineCount - startLine);
- } //}}}
-
- if(firstInvalidFoldLevel == -1 || firstInvalidFoldLevel > startLine)
- firstInvalidFoldLevel = startLine;
- moveGap(startLine,-length,"contentRemoved");
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private int[] endOffsets;
- private short[] foldLevels;
- private TokenMarker.LineContext[] lineContext;
-
- private int lineCount;
-
- /**
- * If -1, then there is no gap.
- * Otherwise, all lines from this line onwards need to have gapWidth
- * added to their end offsets.
- */
- private int gapLine;
- private int gapWidth;
-
- /**
- * If -1, all contexts are valid. Otherwise, all lines after this have
- * an invalid context.
- */
- private int firstInvalidLineContext;
-
- /**
- * If -1, all fold levels are valid. Otherwise, all lines after this
- * have an invalid fold level.
- */
- private int firstInvalidFoldLevel;
- //}}}
-
- //{{{ setLineEndOffset() method
- private final void setLineEndOffset(int line, int end)
- {
- endOffsets[line] = end;
- } //}}}
-
- //{{{ moveGap() method
- private final void moveGap(int newGapLine, int newGapWidth, String method)
- {
- if(gapLine == -1)
- gapWidth = newGapWidth;
- else if(newGapLine == -1)
- {
- if(gapWidth != 0)
- {
- if(Debug.OFFSET_DEBUG && gapLine != lineCount)
- Log.log(Log.DEBUG,this,method + ": update from " + gapLine + " to " + lineCount + " width " + gapWidth);
- for(int i = gapLine; i < lineCount; i++)
- setLineEndOffset(i,getLineEndOffset(i));
- }
-
- gapWidth = newGapWidth;
- }
- else if(newGapLine < gapLine)
- {
- if(gapWidth != 0)
- {
- if(Debug.OFFSET_DEBUG && newGapLine != gapLine)
- Log.log(Log.DEBUG,this,method + ": update from " + newGapLine + " to " + gapLine + " width " + gapWidth);
- for(int i = newGapLine; i < gapLine; i++)
- setLineEndOffset(i,getLineEndOffset(i) - gapWidth);
- }
- gapWidth += newGapWidth;
- }
- else //if(newGapLine >= gapLine)
- {
- if(gapWidth != 0)
- {
- if(Debug.OFFSET_DEBUG && gapLine != newGapLine)
- Log.log(Log.DEBUG,this,method + ": update from " + gapLine + " to " + newGapLine + " width " + gapWidth);
- for(int i = gapLine; i < newGapLine; i++)
- setLineEndOffset(i,getLineEndOffset(i));
- }
-
- gapWidth += newGapWidth;
- }
-
- if(newGapLine == lineCount)
- gapLine = -1;
- else
- gapLine = newGapLine;
- } //}}}
-
- //}}}
-}
+/*
+ * LineManager.java - Manages line info, line start offsets, positions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+//{{{ Imports
+import org.gjt.sp.jedit.syntax.*;
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.util.IntegerArray;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * A class internal to jEdit's document model. You should not use it
+ * directly. To improve performance, none of the methods in this class
+ * check for out of bounds access, nor are they thread-safe. The
+ * <code>Buffer</code> class, through which these methods must be
+ * called through, implements such protection.
+ *
+ * @author Slava Pestov
+ * @version $Id: LineManager.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.2pre3
+ */
+public class LineManager
+{
+ //{{{ LineManager constructor
+ public LineManager()
+ {
+ endOffsets = new int[1];
+ endOffsets[0] = 1;
+ foldLevels = new short[1];
+ lineContext = new TokenMarker.LineContext[1];
+ lineCount = 1;
+ } //}}}
+
+ //{{{ getLineCount() method
+ public final int getLineCount()
+ {
+ return lineCount;
+ } //}}}
+
+ //{{{ getLineOfOffset() method
+ public int getLineOfOffset(int offset)
+ {
+ int start = 0;
+ int end = lineCount - 1;
+
+ for(;;)
+ {
+ switch(end - start)
+ {
+ case 0:
+ if(getLineEndOffset(start) <= offset)
+ return start + 1;
+ else
+ return start;
+ case 1:
+ if(getLineEndOffset(start) <= offset)
+ {
+ if(getLineEndOffset(end) <= offset)
+ return end + 1;
+ else
+ return end;
+ }
+ else
+ return start;
+ default:
+ int pivot = (end + start) / 2;
+ int value = getLineEndOffset(pivot);
+ if(value == offset)
+ return pivot + 1;
+ else if(value < offset)
+ start = pivot + 1;
+ else
+ end = pivot - 1;
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ getLineEndOffset() method
+ public final int getLineEndOffset(int line)
+ {
+ if(gapLine != -1 && line >= gapLine)
+ return endOffsets[line] + gapWidth;
+ else
+ return endOffsets[line];
+ } //}}}
+
+ //{{{ getFoldLevel() method
+ public final int getFoldLevel(int line)
+ {
+ return foldLevels[line];
+ } //}}}
+
+ //{{{ setFoldLevel() method
+ // Also sets 'fold level valid' flag
+ public final void setFoldLevel(int line, int level)
+ {
+ if(level > 0xffff)
+ {
+ // limitations...
+ level = 0xffff;
+ }
+
+ foldLevels[line] = (short)level;
+ } //}}}
+
+ //{{{ setFirstInvalidFoldLevel() method
+ public void setFirstInvalidFoldLevel(int firstInvalidFoldLevel)
+ {
+ this.firstInvalidFoldLevel = firstInvalidFoldLevel;
+ } //}}}
+
+ //{{{ getFirstInvalidFoldLevel() method
+ public int getFirstInvalidFoldLevel()
+ {
+ return firstInvalidFoldLevel;
+ } //}}}
+
+ //{{{ getLineContext() method
+ public final TokenMarker.LineContext getLineContext(int line)
+ {
+ return lineContext[line];
+ } //}}}
+
+ //{{{ setLineContext() method
+ public final void setLineContext(int line, TokenMarker.LineContext context)
+ {
+ lineContext[line] = context;
+ } //}}}
+
+ //{{{ setFirstInvalidLineContext() method
+ public void setFirstInvalidLineContext(int firstInvalidLineContext)
+ {
+ this.firstInvalidLineContext = firstInvalidLineContext;
+ } //}}}
+
+ //{{{ getFirstInvalidLineContext() method
+ public int getFirstInvalidLineContext()
+ {
+ return firstInvalidLineContext;
+ } //}}}
+
+ //{{{ _contentInserted() method
+ public void _contentInserted(IntegerArray endOffsets)
+ {
+ gapLine = -1;
+ gapWidth = 0;
+ firstInvalidLineContext = firstInvalidFoldLevel = 0;
+ lineCount = endOffsets.getSize();
+ this.endOffsets = endOffsets.getArray();
+ foldLevels = new short[lineCount];
+
+ lineContext = new TokenMarker.LineContext[lineCount];
+ } //}}}
+
+ //{{{ contentInserted() method
+ public void contentInserted(int startLine, int offset,
+ int numLines, int length, IntegerArray endOffsets)
+ {
+ int endLine = startLine + numLines;
+
+ //{{{ Update line info and line context arrays
+ if(numLines > 0)
+ {
+ //moveGap(-1,0,"contentInserted");
+
+ lineCount += numLines;
+
+ if(this.endOffsets.length <= lineCount)
+ {
+ int[] endOffsetsN = new int[(lineCount + 1) * 2];
+ System.arraycopy(this.endOffsets,0,endOffsetsN,0,
+ this.endOffsets.length);
+ this.endOffsets = endOffsetsN;
+ }
+
+ if(foldLevels.length <= lineCount)
+ {
+ short[] foldLevelsN = new short[(lineCount + 1) * 2];
+ System.arraycopy(foldLevels,0,foldLevelsN,0,
+ foldLevels.length);
+ foldLevels = foldLevelsN;
+ }
+
+ if(lineContext.length <= lineCount)
+ {
+ TokenMarker.LineContext[] lineContextN
+ = new TokenMarker.LineContext[(lineCount + 1) * 2];
+ System.arraycopy(lineContext,0,lineContextN,0,
+ lineContext.length);
+ lineContext = lineContextN;
+ }
+
+ System.arraycopy(this.endOffsets,startLine,
+ this.endOffsets,endLine,lineCount - endLine);
+ System.arraycopy(foldLevels,startLine,foldLevels,
+ endLine,lineCount - endLine);
+ System.arraycopy(lineContext,startLine,lineContext,
+ endLine,lineCount - endLine);
+
+ if(startLine <= gapLine)
+ gapLine += numLines;
+ else if(gapLine != -1)
+ offset -= gapWidth;
+
+ if(startLine < firstInvalidLineContext)
+ firstInvalidLineContext += numLines;
+
+ for(int i = 0; i < numLines; i++)
+ {
+ this.endOffsets[startLine + i] = (offset + endOffsets.get(i));
+ foldLevels[startLine + i] = 0;
+ }
+ } //}}}
+
+ if(firstInvalidFoldLevel == -1 || firstInvalidFoldLevel > startLine)
+ firstInvalidFoldLevel = startLine;
+ moveGap(endLine,length,"contentInserted");
+ } //}}}
+
+ //{{{ contentRemoved() method
+ public void contentRemoved(int startLine, int offset,
+ int numLines, int length)
+ {
+ int endLine = startLine + numLines;
+
+ //{{{ Update line info and line context arrays
+ if(numLines > 0)
+ {
+ //moveGap(-1,0,"contentRemoved");
+
+ if(startLine + numLines < gapLine)
+ gapLine -= numLines;
+ else if(startLine < gapLine)
+ gapLine = startLine;
+
+ if(startLine + numLines < firstInvalidLineContext)
+ firstInvalidLineContext -= numLines;
+ else if(startLine < firstInvalidLineContext)
+ firstInvalidLineContext = startLine - 1;
+
+ lineCount -= numLines;
+
+ System.arraycopy(endOffsets,endLine,endOffsets,
+ startLine,lineCount - startLine);
+ System.arraycopy(foldLevels,endLine,foldLevels,
+ startLine,lineCount - startLine);
+ System.arraycopy(lineContext,endLine,lineContext,
+ startLine,lineCount - startLine);
+ } //}}}
+
+ if(firstInvalidFoldLevel == -1 || firstInvalidFoldLevel > startLine)
+ firstInvalidFoldLevel = startLine;
+ moveGap(startLine,-length,"contentRemoved");
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private int[] endOffsets;
+ private short[] foldLevels;
+ private TokenMarker.LineContext[] lineContext;
+
+ private int lineCount;
+
+ /**
+ * If -1, then there is no gap.
+ * Otherwise, all lines from this line onwards need to have gapWidth
+ * added to their end offsets.
+ */
+ private int gapLine;
+ private int gapWidth;
+
+ /**
+ * If -1, all contexts are valid. Otherwise, all lines after this have
+ * an invalid context.
+ */
+ private int firstInvalidLineContext;
+
+ /**
+ * If -1, all fold levels are valid. Otherwise, all lines after this
+ * have an invalid fold level.
+ */
+ private int firstInvalidFoldLevel;
+ //}}}
+
+ //{{{ setLineEndOffset() method
+ private final void setLineEndOffset(int line, int end)
+ {
+ endOffsets[line] = end;
+ } //}}}
+
+ //{{{ moveGap() method
+ private final void moveGap(int newGapLine, int newGapWidth, String method)
+ {
+ if(gapLine == -1)
+ gapWidth = newGapWidth;
+ else if(newGapLine == -1)
+ {
+ if(gapWidth != 0)
+ {
+ if(Debug.OFFSET_DEBUG && gapLine != lineCount)
+ Log.log(Log.DEBUG,this,method + ": update from " + gapLine + " to " + lineCount + " width " + gapWidth);
+ for(int i = gapLine; i < lineCount; i++)
+ setLineEndOffset(i,getLineEndOffset(i));
+ }
+
+ gapWidth = newGapWidth;
+ }
+ else if(newGapLine < gapLine)
+ {
+ if(gapWidth != 0)
+ {
+ if(Debug.OFFSET_DEBUG && newGapLine != gapLine)
+ Log.log(Log.DEBUG,this,method + ": update from " + newGapLine + " to " + gapLine + " width " + gapWidth);
+ for(int i = newGapLine; i < gapLine; i++)
+ setLineEndOffset(i,getLineEndOffset(i) - gapWidth);
+ }
+ gapWidth += newGapWidth;
+ }
+ else //if(newGapLine >= gapLine)
+ {
+ if(gapWidth != 0)
+ {
+ if(Debug.OFFSET_DEBUG && gapLine != newGapLine)
+ Log.log(Log.DEBUG,this,method + ": update from " + gapLine + " to " + newGapLine + " width " + gapWidth);
+ for(int i = gapLine; i < newGapLine; i++)
+ setLineEndOffset(i,getLineEndOffset(i));
+ }
+
+ gapWidth += newGapWidth;
+ }
+
+ if(newGapLine == lineCount)
+ gapLine = -1;
+ else
+ gapLine = newGapLine;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/PositionManager.java b/jEdit/org/gjt/sp/jedit/buffer/PositionManager.java
index 218e8f5..98d6c90 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/PositionManager.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/PositionManager.java
@@ -1,209 +1,209 @@
-/*
- * PositionManager.java - Manages positions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-//{{{ Imports
-import javax.swing.text.Position;
-import java.util.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * A class internal to jEdit's document model. You should not use it
- * directly.
- *
- * @author Slava Pestov
- * @version $Id: PositionManager.java 13125 2008-07-31 09:55:38Z kpouer $
- * @since jEdit 4.2pre3
- */
-public class PositionManager
-{
- //{{{ PositionManager constructor
- public PositionManager(JEditBuffer buffer)
- {
- this.buffer = buffer;
- } //}}}
-
- //{{{ createPosition() method
- public synchronized Position createPosition(int offset)
- {
- PosBottomHalf bh = new PosBottomHalf(offset);
- PosBottomHalf existing = positions.get(bh);
- if(existing == null)
- {
- positions.put(bh,bh);
- existing = bh;
- }
-
- return new PosTopHalf(existing);
- } //}}}
-
- //{{{ contentInserted() method
- public synchronized void contentInserted(int offset, int length)
- {
- if(positions.isEmpty())
- return;
-
- /* get all positions from offset to the end, inclusive */
- Iterator<PosBottomHalf> iter = positions.tailMap(new PosBottomHalf(offset))
- .keySet().iterator();
-
- iteration = true;
- while(iter.hasNext())
- {
- iter.next().contentInserted(offset,length);
- }
- iteration = false;
- } //}}}
-
- //{{{ contentRemoved() method
- public synchronized void contentRemoved(int offset, int length)
- {
- if(positions.isEmpty())
- return;
-
- /* get all positions from offset to the end, inclusive */
- Iterator<PosBottomHalf> iter = positions.tailMap(new PosBottomHalf(offset))
- .keySet().iterator();
-
- iteration = true;
- while(iter.hasNext())
- {
- iter.next().contentRemoved(offset,length);
- }
- iteration = false;
-
- } //}}}
-
- boolean iteration;
-
- //{{{ Private members
- private JEditBuffer buffer;
- private SortedMap<PosBottomHalf, PosBottomHalf> positions = new TreeMap<PosBottomHalf, PosBottomHalf>();
- //}}}
-
- //{{{ Inner classes
-
- //{{{ PosTopHalf class
- class PosTopHalf implements Position
- {
- final PosBottomHalf bh;
-
- //{{{ PosTopHalf constructor
- PosTopHalf(PosBottomHalf bh)
- {
- this.bh = bh;
- bh.ref();
- } //}}}
-
- //{{{ getOffset() method
- public int getOffset()
- {
- return bh.offset;
- } //}}}
-
- //{{{ finalize() method
- @Override
- protected void finalize()
- {
- synchronized(PositionManager.this)
- {
- bh.unref();
- }
- } //}}}
- } //}}}
-
- //{{{ PosBottomHalf class
- class PosBottomHalf implements Comparable<PosBottomHalf>
- {
- int offset;
- int ref;
-
- //{{{ PosBottomHalf constructor
- PosBottomHalf(int offset)
- {
- this.offset = offset;
- } //}}}
-
- //{{{ ref() method
- void ref()
- {
- ref++;
- } //}}}
-
- //{{{ unref() method
- void unref()
- {
- if(--ref == 0)
- positions.remove(this);
- } //}}}
-
- //{{{ contentInserted() method
- void contentInserted(int offset, int length)
- {
- if(offset > this.offset)
- throw new ArrayIndexOutOfBoundsException();
- this.offset += length;
- checkInvariants();
- } //}}}
-
- //{{{ contentRemoved() method
- void contentRemoved(int offset, int length)
- {
- if(offset > this.offset)
- throw new ArrayIndexOutOfBoundsException();
- if(this.offset <= offset + length)
- this.offset = offset;
- else
- this.offset -= length;
- checkInvariants();
- } //}}}
-
- //{{{ equals() method
- @Override
- public boolean equals(Object o)
- {
- if(!(o instanceof PosBottomHalf))
- return false;
-
- return ((PosBottomHalf)o).offset == offset;
- } //}}}
-
- //{{{ compareTo() method
- public int compareTo(PosBottomHalf posBottomHalf)
- {
- if(iteration)
- Log.log(Log.ERROR,this,"Consistency failure");
- return offset - posBottomHalf.offset;
- } //}}}
-
- //{{{ checkInvariants() method
- private void checkInvariants()
- {
- if(offset < 0 || offset > buffer.getLength())
- throw new ArrayIndexOutOfBoundsException();
- } //}}}
- } //}}}
-
- //}}}
-}
+/*
+ * PositionManager.java - Manages positions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+//{{{ Imports
+import javax.swing.text.Position;
+import java.util.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * A class internal to jEdit's document model. You should not use it
+ * directly.
+ *
+ * @author Slava Pestov
+ * @version $Id: PositionManager.java 17813 2010-05-12 14:20:37Z k_satoda $
+ * @since jEdit 4.2pre3
+ */
+class PositionManager
+{
+ //{{{ PositionManager constructor
+ public PositionManager(JEditBuffer buffer)
+ {
+ this.buffer = buffer;
+ } //}}}
+
+ //{{{ createPosition() method
+ public synchronized Position createPosition(int offset)
+ {
+ PosBottomHalf bh = new PosBottomHalf(offset);
+ PosBottomHalf existing = positions.get(bh);
+ if(existing == null)
+ {
+ positions.put(bh,bh);
+ existing = bh;
+ }
+
+ return new PosTopHalf(existing);
+ } //}}}
+
+ //{{{ contentInserted() method
+ public synchronized void contentInserted(int offset, int length)
+ {
+ if(positions.isEmpty())
+ return;
+
+ /* get all positions from offset to the end, inclusive */
+ Iterator<PosBottomHalf> iter = positions.tailMap(new PosBottomHalf(offset))
+ .keySet().iterator();
+
+ iteration = true;
+ while(iter.hasNext())
+ {
+ iter.next().contentInserted(offset,length);
+ }
+ iteration = false;
+ } //}}}
+
+ //{{{ contentRemoved() method
+ public synchronized void contentRemoved(int offset, int length)
+ {
+ if(positions.isEmpty())
+ return;
+
+ /* get all positions from offset to the end, inclusive */
+ Iterator<PosBottomHalf> iter = positions.tailMap(new PosBottomHalf(offset))
+ .keySet().iterator();
+
+ iteration = true;
+ while(iter.hasNext())
+ {
+ iter.next().contentRemoved(offset,length);
+ }
+ iteration = false;
+
+ } //}}}
+
+ boolean iteration;
+
+ //{{{ Private members
+ private JEditBuffer buffer;
+ private SortedMap<PosBottomHalf, PosBottomHalf> positions = new TreeMap<PosBottomHalf, PosBottomHalf>();
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ PosTopHalf class
+ class PosTopHalf implements Position
+ {
+ final PosBottomHalf bh;
+
+ //{{{ PosTopHalf constructor
+ PosTopHalf(PosBottomHalf bh)
+ {
+ this.bh = bh;
+ bh.ref();
+ } //}}}
+
+ //{{{ getOffset() method
+ public int getOffset()
+ {
+ return bh.offset;
+ } //}}}
+
+ //{{{ finalize() method
+ @Override
+ protected void finalize()
+ {
+ synchronized(PositionManager.this)
+ {
+ bh.unref();
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ PosBottomHalf class
+ class PosBottomHalf implements Comparable<PosBottomHalf>
+ {
+ int offset;
+ int ref;
+
+ //{{{ PosBottomHalf constructor
+ PosBottomHalf(int offset)
+ {
+ this.offset = offset;
+ } //}}}
+
+ //{{{ ref() method
+ void ref()
+ {
+ ref++;
+ } //}}}
+
+ //{{{ unref() method
+ void unref()
+ {
+ if(--ref == 0)
+ positions.remove(this);
+ } //}}}
+
+ //{{{ contentInserted() method
+ void contentInserted(int offset, int length)
+ {
+ if(offset > this.offset)
+ throw new ArrayIndexOutOfBoundsException();
+ this.offset += length;
+ checkInvariants();
+ } //}}}
+
+ //{{{ contentRemoved() method
+ void contentRemoved(int offset, int length)
+ {
+ if(offset > this.offset)
+ throw new ArrayIndexOutOfBoundsException();
+ if(this.offset <= offset + length)
+ this.offset = offset;
+ else
+ this.offset -= length;
+ checkInvariants();
+ } //}}}
+
+ //{{{ equals() method
+ @Override
+ public boolean equals(Object o)
+ {
+ if(!(o instanceof PosBottomHalf))
+ return false;
+
+ return ((PosBottomHalf)o).offset == offset;
+ } //}}}
+
+ //{{{ compareTo() method
+ public int compareTo(PosBottomHalf posBottomHalf)
+ {
+ if(iteration)
+ Log.log(Log.ERROR,this,"Consistency failure");
+ return offset - posBottomHalf.offset;
+ } //}}}
+
+ //{{{ checkInvariants() method
+ private void checkInvariants()
+ {
+ if(offset < 0 || offset > buffer.getLength())
+ throw new ArrayIndexOutOfBoundsException();
+ } //}}}
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/UndoManager.java b/jEdit/org/gjt/sp/jedit/buffer/UndoManager.java
index 8d2ac9e..4461c17 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/UndoManager.java
+++ b/jEdit/org/gjt/sp/jedit/buffer/UndoManager.java
@@ -1,503 +1,502 @@
-/*
- * UndoManager.java - Buffer undo manager
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.buffer;
-
-//{{{ Imports
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * A class internal to jEdit's document model. You should not use it
- * directly. To improve performance, none of the methods in this class
- * check for out of bounds access, nor are they thread-safe. The
- * <code>Buffer</code> class, through which these methods must be
- * called through, implements such protection.
- *
- * @author Slava Pestov
- * @version $Id: UndoManager.java 16098 2009-08-27 21:59:29Z shlomy $
- * @since jEdit 4.0pre1
- */
-public class UndoManager
-{
- //{{{ UndoManager constructor
- public UndoManager(JEditBuffer buffer)
- {
- this.buffer = buffer;
- } //}}}
-
- //{{{ setLimit() method
- public void setLimit(int limit)
- {
- this.limit = limit;
- } //}}}
-
- //{{{ clear() method
- public void clear()
- {
- undosFirst = undosLast = redosFirst = redosLast = null;
- undoCount = 0;
- } //}}}
-
- //{{{ canUndo() method
- public boolean canUndo()
- {
- return (undosLast != null);
- } //}}}
-
- //{{{ undo() method
- public int undo()
- {
- if(insideCompoundEdit())
- throw new InternalError("Unbalanced begin/endCompoundEdit()");
-
- if(undosLast == null)
- return -1;
- else
- {
- reviseUndoId();
- undoCount--;
-
- int caret = undosLast.undo();
- redosFirst = undosLast;
- undosLast = undosLast.prev;
- if(undosLast == null)
- undosFirst = null;
- return caret;
- }
- } //}}}
-
- //{{{ canRedo() method
- public boolean canRedo()
- {
- return (redosFirst != null);
- } //}}}
-
- //{{{ redo() method
- public int redo()
- {
- if(insideCompoundEdit())
- throw new InternalError("Unbalanced begin/endCompoundEdit()");
-
- if(redosFirst == null)
- return -1;
- else
- {
- reviseUndoId();
- undoCount++;
-
- int caret = redosFirst.redo();
- undosLast = redosFirst;
- if(undosFirst == null)
- undosFirst = undosLast;
- redosFirst = redosFirst.next;
- return caret;
- }
- } //}}}
-
- //{{{ beginCompoundEdit() method
- public void beginCompoundEdit()
- {
- if(compoundEditCount == 0)
- {
- compoundEdit = new CompoundEdit();
- reviseUndoId();
- }
-
- compoundEditCount++;
- } //}}}
-
- //{{{ endCompoundEdit() method
- public void endCompoundEdit()
- {
- if(compoundEditCount == 0)
- {
- Log.log(Log.WARNING,this,new Exception("Unbalanced begin/endCompoundEdit()"));
- return;
- }
- else if(compoundEditCount == 1)
- {
- if(compoundEdit.first == null)
- /* nothing done between begin/end calls */;
- else if(compoundEdit.first == compoundEdit.last)
- addEdit(compoundEdit.first);
- else
- addEdit(compoundEdit);
-
- compoundEdit = null;
- }
-
- compoundEditCount--;
- } //}}}
-
- //{{{ insideCompoundEdit() method
- public boolean insideCompoundEdit()
- {
- return compoundEditCount != 0;
- } //}}}
-
- //{{{ getUndoId() method
- public Object getUndoId()
- {
- return undoId;
- } //}}}
-
- //{{{ contentInserted() method
- public void contentInserted(int offset, int length, String text, boolean clearDirty)
- {
- Edit last = getLastEdit();
- Edit toMerge = getMergeEdit();
-
- if(!clearDirty && toMerge instanceof Insert
- && redosFirst == null)
- {
- Insert ins = (Insert)toMerge;
- if(ins.offset == offset)
- {
- ins.str = text.concat(ins.str);
- ins.length += length;
- return;
- }
- else if(ins.offset + ins.length == offset)
- {
- ins.str = ins.str.concat(text);
- ins.length += length;
- return;
- }
- }
-
- Insert ins = new Insert(this,offset,length,text);
-
- if(clearDirty)
- {
- redoClearDirty = last;
- undoClearDirty = ins;
- }
-
- if(compoundEdit != null)
- compoundEdit.add(ins);
- else
- {
- reviseUndoId();
- addEdit(ins);
- }
- } //}}}
-
- //{{{ contentRemoved() method
- public void contentRemoved(int offset, int length, String text, boolean clearDirty)
- {
- Edit last = getLastEdit();
- Edit toMerge = getMergeEdit();
-
- if(!clearDirty && toMerge instanceof Remove
- && redosFirst == null)
- {
- Remove rem = (Remove)toMerge;
- if(rem.offset == offset)
- {
- rem.content.str = rem.content.str.concat(text);
- rem.content.hashcode = rem.content.str.hashCode();
- rem.length += length;
- KillRing.getInstance().changed(rem.content);
- return;
- }
- else if(offset + length == rem.offset)
- {
- rem.content.str = text.concat(rem.content.str);
- rem.content.hashcode = rem.content.str.hashCode();
- rem.length += length;
- rem.offset = offset;
- KillRing.getInstance().changed(rem.content);
- return;
- }
- }
-
- Remove rem = new Remove(this,offset,length,text);
- if(clearDirty)
- {
- redoClearDirty = last;
- undoClearDirty = rem;
- }
-
- if(compoundEdit != null)
- compoundEdit.add(rem);
- else
- {
- reviseUndoId();
- addEdit(rem);
- }
-
- KillRing.getInstance().add(rem.content);
- } //}}}
-
- //{{{ resetClearDirty method
- public void resetClearDirty()
- {
- redoClearDirty = getLastEdit();
- if(redosFirst instanceof CompoundEdit)
- undoClearDirty = ((CompoundEdit)redosFirst).first;
- else
- undoClearDirty = redosFirst;
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private JEditBuffer buffer;
-
- // queue of undos. last is most recent, first is oldest
- private Edit undosFirst;
- private Edit undosLast;
-
- // queue of redos. first is most recent, last is oldest
- private Edit redosFirst;
- private Edit redosLast;
-
- private int limit;
- private int undoCount;
- private int compoundEditCount;
- private CompoundEdit compoundEdit;
- private Edit undoClearDirty, redoClearDirty;
- private Object undoId;
- //}}}
-
- //{{{ addEdit() method
- private void addEdit(Edit edit)
- {
- if(undosFirst == null)
- undosFirst = undosLast = edit;
- else
- {
- undosLast.next = edit;
- edit.prev = undosLast;
- undosLast = edit;
- }
-
- redosFirst = redosLast = null;
-
- undoCount++;
-
- while(undoCount > limit)
- {
- undoCount--;
-
- if(undosFirst == undosLast)
- undosFirst = undosLast = null;
- else
- {
- undosFirst.next.prev = null;
- undosFirst = undosFirst.next;
- }
- }
- } //}}}
-
- //{{{ getMergeEdit() method
- private Edit getMergeEdit()
- {
- Edit last = getLastEdit();
- return (compoundEdit != null ? compoundEdit.last : last);
- } //}}}
-
- //{{{ getLastEdit() method
- private Edit getLastEdit()
- {
- if(undosLast instanceof CompoundEdit)
- return ((CompoundEdit)undosLast).last;
- else
- return undosLast;
- } //}}}
-
- //{{{ reviseUndoId()
- /*
- * Revises a unique undoId for a the undo operation that is being
- * created as a result of a buffer content change, or that is being
- * used for undo/redo. Content changes that belong to the same undo
- * operation will have the same undoId.
- *
- * This method should be called whenever:
- * - a buffer content change causes a new undo operation to be created;
- * i.e. whenever a content change is not included in the same undo
- * operation as the previous.
- * - an undo/redo is performed.
- */
- private void reviseUndoId()
- {
- undoId = new Object();
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ Edit class
- abstract static class Edit
- {
- Edit prev, next;
-
- //{{{ undo() method
- abstract int undo();
- //}}}
-
- //{{{ redo() method
- abstract int redo();
- //}}}
- } //}}}
-
- //{{{ Insert class
- static class Insert extends Edit
- {
- //{{{ Insert constructor
- Insert(UndoManager mgr, int offset, int length, String str)
- {
- this.mgr = mgr;
- this.offset = offset;
- this.length = length;
- this.str = str;
- } //}}}
-
- //{{{ undo() method
- int undo()
- {
- mgr.buffer.remove(offset,length);
- if(mgr.undoClearDirty == this)
- mgr.buffer.setDirty(false);
- return offset;
- } //}}}
-
- //{{{ redo() method
- int redo()
- {
- mgr.buffer.insert(offset,str);
- if(mgr.redoClearDirty == this)
- mgr.buffer.setDirty(false);
- return offset + length;
- } //}}}
-
- UndoManager mgr;
- int offset;
- int length;
- String str;
- } //}}}
-
- //{{{ RemovedContent clas
- // This class is held in KillRing.
- public static class RemovedContent
- {
- String str;
- int hashcode;
- boolean inKillRing;
-
- public RemovedContent(String str)
- {
- this.str = str;
- this.hashcode = str.hashCode();
- }
-
- public String toString()
- {
- return str;
- }
- }// }}}
-
- //{{{ Remove class
- static class Remove extends Edit
- {
- //{{{ Remove constructor
- Remove(UndoManager mgr, int offset, int length, String str)
- {
- this.mgr = mgr;
- this.offset = offset;
- this.length = length;
- this.content = new RemovedContent(str);
- } //}}}
-
- //{{{ undo() method
- int undo()
- {
- mgr.buffer.insert(offset,content.str);
- if(mgr.undoClearDirty == this)
- mgr.buffer.setDirty(false);
- return offset + length;
- } //}}}
-
- //{{{ redo() method
- int redo()
- {
- mgr.buffer.remove(offset,length);
- if(mgr.redoClearDirty == this)
- mgr.buffer.setDirty(false);
- return offset;
- } //}}}
-
- UndoManager mgr;
- int offset;
- int length;
- final RemovedContent content;
- } //}}}
-
- //{{{ CompoundEdit class
- static class CompoundEdit extends Edit
- {
- //{{{ undo() method
- public int undo()
- {
- int retVal = -1;
- Edit edit = last;
- while(edit != null)
- {
- retVal = edit.undo();
- edit = edit.prev;
- }
- return retVal;
- } //}}}
-
- //{{{ redo() method
- public int redo()
- {
- int retVal = -1;
- Edit edit = first;
- while(edit != null)
- {
- retVal = edit.redo();
- edit = edit.next;
- }
- return retVal;
- } //}}}
-
- //{{{ add() method
- public void add(Edit edit)
- {
- if(first == null)
- first = last = edit;
- else
- {
- edit.prev = last;
- last.next = edit;
- last = edit;
- }
- } //}}}
-
- Edit first, last;
- } //}}}
-
- //}}}
-}
+/*
+ * UndoManager.java - Buffer undo manager
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.buffer;
+
+//{{{ Imports
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * A class internal to jEdit's document model. You should not use it
+ * directly. To improve performance, none of the methods in this class
+ * check for out of bounds access, nor are they thread-safe. The
+ * <code>Buffer</code> class, through which these methods must be
+ * called through, implements such protection.
+ *
+ * @author Slava Pestov
+ * @version $Id: UndoManager.java 16728 2009-12-25 14:12:38Z shlomy $
+ * @since jEdit 4.0pre1
+ */
+public class UndoManager
+{
+ //{{{ UndoManager constructor
+ public UndoManager(JEditBuffer buffer)
+ {
+ this.buffer = buffer;
+ } //}}}
+
+ //{{{ setLimit() method
+ public void setLimit(int limit)
+ {
+ this.limit = limit;
+ } //}}}
+
+ //{{{ clear() method
+ public void clear()
+ {
+ undosFirst = undosLast = redosFirst = null;
+ undoCount = 0;
+ } //}}}
+
+ //{{{ canUndo() method
+ public boolean canUndo()
+ {
+ return (undosLast != null);
+ } //}}}
+
+ //{{{ undo() method
+ public int undo()
+ {
+ if(insideCompoundEdit())
+ throw new InternalError("Unbalanced begin/endCompoundEdit()");
+
+ if(undosLast == null)
+ return -1;
+ else
+ {
+ reviseUndoId();
+ undoCount--;
+
+ int caret = undosLast.undo();
+ redosFirst = undosLast;
+ undosLast = undosLast.prev;
+ if(undosLast == null)
+ undosFirst = null;
+ return caret;
+ }
+ } //}}}
+
+ //{{{ canRedo() method
+ public boolean canRedo()
+ {
+ return (redosFirst != null);
+ } //}}}
+
+ //{{{ redo() method
+ public int redo()
+ {
+ if(insideCompoundEdit())
+ throw new InternalError("Unbalanced begin/endCompoundEdit()");
+
+ if(redosFirst == null)
+ return -1;
+ else
+ {
+ reviseUndoId();
+ undoCount++;
+
+ int caret = redosFirst.redo();
+ undosLast = redosFirst;
+ if(undosFirst == null)
+ undosFirst = undosLast;
+ redosFirst = redosFirst.next;
+ return caret;
+ }
+ } //}}}
+
+ //{{{ beginCompoundEdit() method
+ public void beginCompoundEdit()
+ {
+ if(compoundEditCount == 0)
+ {
+ compoundEdit = new CompoundEdit();
+ reviseUndoId();
+ }
+
+ compoundEditCount++;
+ } //}}}
+
+ //{{{ endCompoundEdit() method
+ public void endCompoundEdit()
+ {
+ if(compoundEditCount == 0)
+ {
+ Log.log(Log.WARNING,this,new Exception("Unbalanced begin/endCompoundEdit()"));
+ return;
+ }
+ else if(compoundEditCount == 1)
+ {
+ if(compoundEdit.first == null)
+ /* nothing done between begin/end calls */;
+ else if(compoundEdit.first == compoundEdit.last)
+ addEdit(compoundEdit.first);
+ else
+ addEdit(compoundEdit);
+
+ compoundEdit = null;
+ }
+
+ compoundEditCount--;
+ } //}}}
+
+ //{{{ insideCompoundEdit() method
+ public boolean insideCompoundEdit()
+ {
+ return compoundEditCount != 0;
+ } //}}}
+
+ //{{{ getUndoId() method
+ public Object getUndoId()
+ {
+ return undoId;
+ } //}}}
+
+ //{{{ contentInserted() method
+ public void contentInserted(int offset, int length, String text, boolean clearDirty)
+ {
+ Edit last = getLastEdit();
+ Edit toMerge = getMergeEdit();
+
+ if(!clearDirty && toMerge instanceof Insert
+ && redosFirst == null)
+ {
+ Insert ins = (Insert)toMerge;
+ if(ins.offset == offset)
+ {
+ ins.str = text.concat(ins.str);
+ ins.length += length;
+ return;
+ }
+ else if(ins.offset + ins.length == offset)
+ {
+ ins.str = ins.str.concat(text);
+ ins.length += length;
+ return;
+ }
+ }
+
+ Insert ins = new Insert(this,offset,length,text);
+
+ if(clearDirty)
+ {
+ redoClearDirty = last;
+ undoClearDirty = ins;
+ }
+
+ if(compoundEdit != null)
+ compoundEdit.add(ins);
+ else
+ {
+ reviseUndoId();
+ addEdit(ins);
+ }
+ } //}}}
+
+ //{{{ contentRemoved() method
+ public void contentRemoved(int offset, int length, String text, boolean clearDirty)
+ {
+ Edit last = getLastEdit();
+ Edit toMerge = getMergeEdit();
+
+ if(!clearDirty && toMerge instanceof Remove
+ && redosFirst == null)
+ {
+ Remove rem = (Remove)toMerge;
+ if(rem.offset == offset)
+ {
+ rem.content.str = rem.content.str.concat(text);
+ rem.content.hashcode = rem.content.str.hashCode();
+ rem.length += length;
+ KillRing.getInstance().changed(rem.content);
+ return;
+ }
+ else if(offset + length == rem.offset)
+ {
+ rem.content.str = text.concat(rem.content.str);
+ rem.content.hashcode = rem.content.str.hashCode();
+ rem.length += length;
+ rem.offset = offset;
+ KillRing.getInstance().changed(rem.content);
+ return;
+ }
+ }
+
+ Remove rem = new Remove(this,offset,length,text);
+ if(clearDirty)
+ {
+ redoClearDirty = last;
+ undoClearDirty = rem;
+ }
+
+ if(compoundEdit != null)
+ compoundEdit.add(rem);
+ else
+ {
+ reviseUndoId();
+ addEdit(rem);
+ }
+
+ KillRing.getInstance().add(rem.content);
+ } //}}}
+
+ //{{{ resetClearDirty method
+ public void resetClearDirty()
+ {
+ redoClearDirty = getLastEdit();
+ if(redosFirst instanceof CompoundEdit)
+ undoClearDirty = ((CompoundEdit)redosFirst).first;
+ else
+ undoClearDirty = redosFirst;
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private JEditBuffer buffer;
+
+ // queue of undos. last is most recent, first is oldest
+ private Edit undosFirst;
+ private Edit undosLast;
+
+ // queue of redos. first is most recent, last is oldest
+ private Edit redosFirst;
+
+ private int limit;
+ private int undoCount;
+ private int compoundEditCount;
+ private CompoundEdit compoundEdit;
+ private Edit undoClearDirty, redoClearDirty;
+ private Object undoId;
+ //}}}
+
+ //{{{ addEdit() method
+ private void addEdit(Edit edit)
+ {
+ if(undosFirst == null)
+ undosFirst = undosLast = edit;
+ else
+ {
+ undosLast.next = edit;
+ edit.prev = undosLast;
+ undosLast = edit;
+ }
+
+ redosFirst = null;
+
+ undoCount++;
+
+ while(undoCount > limit)
+ {
+ undoCount--;
+
+ if(undosFirst == undosLast)
+ undosFirst = undosLast = null;
+ else
+ {
+ undosFirst.next.prev = null;
+ undosFirst = undosFirst.next;
+ }
+ }
+ } //}}}
+
+ //{{{ getMergeEdit() method
+ private Edit getMergeEdit()
+ {
+ Edit last = getLastEdit();
+ return (compoundEdit != null ? compoundEdit.last : last);
+ } //}}}
+
+ //{{{ getLastEdit() method
+ private Edit getLastEdit()
+ {
+ if(undosLast instanceof CompoundEdit)
+ return ((CompoundEdit)undosLast).last;
+ else
+ return undosLast;
+ } //}}}
+
+ //{{{ reviseUndoId()
+ /*
+ * Revises a unique undoId for a the undo operation that is being
+ * created as a result of a buffer content change, or that is being
+ * used for undo/redo. Content changes that belong to the same undo
+ * operation will have the same undoId.
+ *
+ * This method should be called whenever:
+ * - a buffer content change causes a new undo operation to be created;
+ * i.e. whenever a content change is not included in the same undo
+ * operation as the previous.
+ * - an undo/redo is performed.
+ */
+ private void reviseUndoId()
+ {
+ undoId = new Object();
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ Edit class
+ abstract static class Edit
+ {
+ Edit prev, next;
+
+ //{{{ undo() method
+ abstract int undo();
+ //}}}
+
+ //{{{ redo() method
+ abstract int redo();
+ //}}}
+ } //}}}
+
+ //{{{ Insert class
+ static class Insert extends Edit
+ {
+ //{{{ Insert constructor
+ Insert(UndoManager mgr, int offset, int length, String str)
+ {
+ this.mgr = mgr;
+ this.offset = offset;
+ this.length = length;
+ this.str = str;
+ } //}}}
+
+ //{{{ undo() method
+ int undo()
+ {
+ mgr.buffer.remove(offset,length);
+ if(mgr.undoClearDirty == this)
+ mgr.buffer.setDirty(false);
+ return offset;
+ } //}}}
+
+ //{{{ redo() method
+ int redo()
+ {
+ mgr.buffer.insert(offset,str);
+ if(mgr.redoClearDirty == this)
+ mgr.buffer.setDirty(false);
+ return offset + length;
+ } //}}}
+
+ UndoManager mgr;
+ int offset;
+ int length;
+ String str;
+ } //}}}
+
+ //{{{ RemovedContent clas
+ // This class is held in KillRing.
+ public static class RemovedContent
+ {
+ String str;
+ int hashcode;
+ boolean inKillRing;
+
+ public RemovedContent(String str)
+ {
+ this.str = str;
+ this.hashcode = str.hashCode();
+ }
+
+ public String toString()
+ {
+ return str;
+ }
+ }// }}}
+
+ //{{{ Remove class
+ static class Remove extends Edit
+ {
+ //{{{ Remove constructor
+ Remove(UndoManager mgr, int offset, int length, String str)
+ {
+ this.mgr = mgr;
+ this.offset = offset;
+ this.length = length;
+ this.content = new RemovedContent(str);
+ } //}}}
+
+ //{{{ undo() method
+ int undo()
+ {
+ mgr.buffer.insert(offset,content.str);
+ if(mgr.undoClearDirty == this)
+ mgr.buffer.setDirty(false);
+ return offset + length;
+ } //}}}
+
+ //{{{ redo() method
+ int redo()
+ {
+ mgr.buffer.remove(offset,length);
+ if(mgr.redoClearDirty == this)
+ mgr.buffer.setDirty(false);
+ return offset;
+ } //}}}
+
+ UndoManager mgr;
+ int offset;
+ int length;
+ final RemovedContent content;
+ } //}}}
+
+ //{{{ CompoundEdit class
+ static class CompoundEdit extends Edit
+ {
+ //{{{ undo() method
+ public int undo()
+ {
+ int retVal = -1;
+ Edit edit = last;
+ while(edit != null)
+ {
+ retVal = edit.undo();
+ edit = edit.prev;
+ }
+ return retVal;
+ } //}}}
+
+ //{{{ redo() method
+ public int redo()
+ {
+ int retVal = -1;
+ Edit edit = first;
+ while(edit != null)
+ {
+ retVal = edit.redo();
+ edit = edit.next;
+ }
+ return retVal;
+ } //}}}
+
+ //{{{ add() method
+ public void add(Edit edit)
+ {
+ if(first == null)
+ first = last = edit;
+ else
+ {
+ edit.prev = last;
+ last.next = edit;
+ last = edit;
+ }
+ } //}}}
+
+ Edit first, last;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/buffer/package.html b/jEdit/org/gjt/sp/jedit/buffer/package.html
index cfcf284..85d0bd4 100644
--- a/jEdit/org/gjt/sp/jedit/buffer/package.html
+++ b/jEdit/org/gjt/sp/jedit/buffer/package.html
@@ -1,2 +1,2 @@
-<html><body>Buffer event listeners, and classes used to implement jEdit's document model.
-</body></html>
+<html><body>Buffer event listeners, and classes used to implement jEdit's document model.
+</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/bufferio/BufferAutosaveRequest.java b/jEdit/org/gjt/sp/jedit/bufferio/BufferAutosaveRequest.java
index 1b4e4fe..cc9bb56 100644
--- a/jEdit/org/gjt/sp/jedit/bufferio/BufferAutosaveRequest.java
+++ b/jEdit/org/gjt/sp/jedit/bufferio/BufferAutosaveRequest.java
@@ -1,118 +1,118 @@
-/*
- * BufferAutosaveRequest.java - I/O request
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.bufferio;
-
-//{{{ Imports
-import java.io.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * A buffer autosave request.
- * @author Slava Pestov
- * @version $Id: BufferAutosaveRequest.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class BufferAutosaveRequest extends BufferIORequest
-{
- //{{{ BufferAutosaveRequest constructor
- /**
- * Creates a new buffer I/O request.
- * @param view The view
- * @param buffer The buffer
- * @param session The VFS session
- * @param vfs The VFS
- * @param path The path
- */
- public BufferAutosaveRequest(View view, Buffer buffer,
- Object session, VFS vfs, String path)
- {
- super(view,buffer,session,vfs,path);
- } //}}}
-
- //{{{ run() method
- public void run()
- {
- OutputStream out = null;
-
- try
- {
- String[] args = { vfs.getFileName(path) };
- setStatus(jEdit.getProperty("vfs.status.autosave",args));
-
- // the entire save operation can be aborted...
- setAbortable(true);
-
- try
- {
- //buffer.readLock();
-
- if(!buffer.isDirty())
- {
- // buffer has been saved while we
- // were waiting.
- return;
- }
-
- out = vfs._createOutputStream(session,path,view);
- if(out == null)
- return;
-
- write(buffer,out);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- String[] pp = { e.toString() };
- VFSManager.error(view,path,"ioerror.write-error",pp);
-
- // Incomplete autosave file should not exist.
- if(out != null)
- {
- try
- {
- out.close();
- out = null;
- vfs._delete(session,path,view);
- }
- catch(IOException ioe)
- {
- Log.log(Log.ERROR,this,ioe);
- }
- }
- }
- //finally
- //{
- //buffer.readUnlock();
- //}
- }
- catch(WorkThread.Abort a)
- {
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
- } //}}}
-}
+/*
+ * BufferAutosaveRequest.java - I/O request
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.bufferio;
+
+//{{{ Imports
+import java.io.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * A buffer autosave request.
+ * @author Slava Pestov
+ * @version $Id: BufferAutosaveRequest.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class BufferAutosaveRequest extends BufferIORequest
+{
+ //{{{ BufferAutosaveRequest constructor
+ /**
+ * Creates a new buffer I/O request.
+ * @param view The view
+ * @param buffer The buffer
+ * @param session The VFS session
+ * @param vfs The VFS
+ * @param path The path
+ */
+ public BufferAutosaveRequest(View view, Buffer buffer,
+ Object session, VFS vfs, String path)
+ {
+ super(view,buffer,session,vfs,path);
+ } //}}}
+
+ //{{{ run() method
+ public void run()
+ {
+ OutputStream out = null;
+
+ try
+ {
+ String[] args = { vfs.getFileName(path) };
+ setStatus(jEdit.getProperty("vfs.status.autosave",args));
+
+ // the entire save operation can be aborted...
+ setAbortable(true);
+
+ try
+ {
+ //buffer.readLock();
+
+ if(!buffer.isDirty())
+ {
+ // buffer has been saved while we
+ // were waiting.
+ return;
+ }
+
+ out = vfs._createOutputStream(session,path,view);
+ if(out == null)
+ return;
+
+ write(buffer,out);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ String[] pp = { e.toString() };
+ VFSManager.error(view,path,"ioerror.write-error",pp);
+
+ // Incomplete autosave file should not exist.
+ if(out != null)
+ {
+ try
+ {
+ out.close();
+ out = null;
+ vfs._delete(session,path,view);
+ }
+ catch(IOException ioe)
+ {
+ Log.log(Log.ERROR,this,ioe);
+ }
+ }
+ }
+ //finally
+ //{
+ //buffer.readUnlock();
+ //}
+ }
+ catch(WorkThread.Abort a)
+ {
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/bufferio/BufferIORequest.java b/jEdit/org/gjt/sp/jedit/bufferio/BufferIORequest.java
index c94dc21..94dfee5 100644
--- a/jEdit/org/gjt/sp/jedit/bufferio/BufferIORequest.java
+++ b/jEdit/org/gjt/sp/jedit/bufferio/BufferIORequest.java
@@ -1,468 +1,468 @@
-/*
- * BufferIORequest.java - I/O request
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.bufferio;
-
-//{{{ Imports
-import java.io.BufferedOutputStream;
-import java.io.CharConversionException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import java.nio.charset.CharacterCodingException;
-
-import javax.swing.text.Segment;
-
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.MiscUtilities;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.io.VFS;
-import org.gjt.sp.jedit.io.Encoding;
-import org.gjt.sp.jedit.io.EncodingServer;
-import org.gjt.sp.util.IntegerArray;
-import org.gjt.sp.util.SegmentBuffer;
-import org.gjt.sp.util.WorkRequest;
-//}}}
-
-/**
- * A buffer I/O request.
- * @author Slava Pestov
- * @version $Id: BufferIORequest.java 16339 2009-10-14 09:59:36Z kpouer $
- */
-public abstract class BufferIORequest extends WorkRequest
-{
- //{{{ Constants
-
- /**
- * Size of I/O buffers.
- */
- public static final int IOBUFSIZE = 32768;
-
- /**
- * Number of lines per progress increment.
- */
- public static final int PROGRESS_INTERVAL = 300;
-
- public static final String LOAD_DATA = "BufferIORequest__loadData";
- public static final String END_OFFSETS = "BufferIORequest__endOffsets";
- public static final String NEW_PATH = "BufferIORequest__newPath";
-
- /**
- * Buffer boolean property set when an error occurs.
- */
- public static final String ERROR_OCCURRED = "BufferIORequest__error";
-
- // These are no longer used but still here only for compatibility.
- @Deprecated public static final int UTF8_MAGIC_1 = 0xef;
- @Deprecated public static final int UTF8_MAGIC_2 = 0xbb;
- @Deprecated public static final int UTF8_MAGIC_3 = 0xbf;
- @Deprecated public static final int UNICODE_MAGIC_1 = 0xfe;
- @Deprecated public static final int UNICODE_MAGIC_2 = 0xff;
- @Deprecated public static final int XML_PI_LENGTH = 50;
- @Deprecated public static final int GZIP_MAGIC_1 = 0x1f;
- @Deprecated public static final int GZIP_MAGIC_2 = 0x8b;
-
- //}}}
-
- //{{{ Instance variables
- protected final View view;
- protected final Buffer buffer;
- protected final Object session;
- protected final VFS vfs;
- protected String path;
- protected final String markersPath;
- //}}}
-
- //{{{ BufferIORequest constructor
- /**
- * Creates a new buffer I/O request.
- * @param view The view
- * @param buffer The buffer
- * @param session The VFS session
- * @param vfs The VFS
- * @param path The path
- */
- protected BufferIORequest(View view, Buffer buffer,
- Object session, VFS vfs, String path)
- {
- this.view = view;
- this.buffer = buffer;
- this.session = session;
- this.vfs = vfs;
- this.path = path;
-
- markersPath = Buffer.getMarkersPath(vfs, path);
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- return getClass().getName() + '[' + buffer + ']';
- } //}}}
-
- //{{{ getCharIOBufferSize() method
- /**
- * Size of character I/O buffers.
- */
- public static int getCharIOBufferSize()
- {
- return IOBUFSIZE;
- } //}}}
-
- //{{{ getByteIOBufferSize() method
- /**
- * Size of byte I/O buffers.
- */
- public static int getByteIOBufferSize()
- {
- // 2 is sizeof char in byte;
- return IOBUFSIZE * 2;
- } //}}}
-
- //{{{ autodetect() method
- /**
- * Tries to detect if the stream is gzipped, and if it has an encoding
- * specified with an XML PI.
- */
- protected Reader autodetect(InputStream in) throws IOException
- {
- return MiscUtilities.autodetect(in, buffer);
- } //}}}
-
- //{{{ read() method
- protected SegmentBuffer read(Reader in, long length,
- boolean insert) throws IOException
- {
- /* we guess an initial size for the array */
- IntegerArray endOffsets = new IntegerArray(
- Math.max(1,(int)(length / 50)));
-
- // only true if the file size is known
- boolean trackProgress = !buffer.isTemporary() && length != 0;
-
- if(trackProgress)
- {
- setMaximum(length);
- setValue(0);
- }
-
- // if the file size is not known, start with a resonable
- // default buffer size
- if(length == 0)
- length = IOBUFSIZE;
-
- SegmentBuffer seg = new SegmentBuffer((int)length + 1);
-
- char[] buf = new char[IOBUFSIZE];
-
- /* Number of characters in 'buf' array.
- InputStream.read() doesn't always fill the
- array (eg, the file size is not a multiple of
- IOBUFSIZE, or it is a GZipped file, etc) */
- int len;
-
- // True if a \n was read after a \r. Usually
- // means this is a DOS/Windows file
- boolean CRLF = false;
-
- // A \r was read, hence a MacOS file
- boolean CROnly = false;
-
- // Was the previous read character a \r?
- // If we read a \n and this is true, we assume
- // we have a DOS/Windows file
- boolean lastWasCR = false;
-
- // Number of lines read. Every 100 lines, we update the
- // progress bar
- int lineCount = 0;
-
- while((len = in.read(buf,0,buf.length)) != -1)
- {
- // Offset of previous line, relative to
- // the start of the I/O buffer (NOT
- // relative to the start of the document)
- int lastLine = 0;
-
- for(int i = 0; i < len; i++)
- {
- // Look for line endings.
- switch(buf[i])
- {
- case '\r':
- // If we read a \r and
- // lastWasCR is also true,
- // it is probably a Mac file
- // (\r\r in stream)
- if(lastWasCR)
- {
- CROnly = true;
- CRLF = false;
- }
- // Otherwise set a flag,
- // so that \n knows that last
- // was a \r
- else
- {
- lastWasCR = true;
- }
-
- // Insert a line
- seg.append(buf,lastLine,i -
- lastLine);
- seg.append('\n');
- endOffsets.add(seg.count);
- if(trackProgress && lineCount++ % PROGRESS_INTERVAL == 0)
- setValue(seg.count);
-
- // This is i+1 to take the
- // trailing \n into account
- lastLine = i + 1;
- break;
- case '\n':
- /* If lastWasCR is true, we just read a \r followed
- by a \n. We specify that this is a Windows file,
- but take no further action and just ignore the \r. */
- if(lastWasCR)
- {
- CROnly = false;
- CRLF = true;
- lastWasCR = false;
- /* Bump lastLine so that the next line doesn't erronously
- pick up the \r */
- lastLine = i + 1;
- }
- /* Otherwise, we found a \n that follows some other
- * character, hence we have a Unix file */
- else
- {
- CROnly = false;
- CRLF = false;
- seg.append(buf,lastLine,
- i - lastLine);
- seg.append('\n');
- endOffsets.add(seg.count);
- if(trackProgress && lineCount++ % PROGRESS_INTERVAL == 0)
- setValue(seg.count);
- lastLine = i + 1;
- }
- break;
- default:
- /* If we find some other character that follows
- a \r, so it is not a Windows file, and probably
- a Mac file */
- if(lastWasCR)
- {
- CROnly = true;
- CRLF = false;
- lastWasCR = false;
- }
- break;
- }
- }
-
- if(trackProgress)
- setValue(seg.count);
-
- // Add remaining stuff from buffer
- seg.append(buf,lastLine,len - lastLine);
- }
-
- setAbortable(false);
-
- String lineSeparator;
- if(seg.count == 0)
- {
- // fix for "[ 865589 ] 0-byte files should open using
- // the default line seperator"
- lineSeparator = jEdit.getProperty(
- "buffer.lineSeparator",
- System.getProperty("line.separator"));
- }
- else if(CRLF)
- lineSeparator = "\r\n";
- else if(CROnly)
- lineSeparator = "\r";
- else
- lineSeparator = "\n";
-
- // Chop trailing newline and/or ^Z (if any)
- int bufferLength = seg.count;
- if(bufferLength != 0)
- {
- char ch = seg.array[bufferLength - 1];
- if(ch == 0x1a /* DOS ^Z */)
- seg.count--;
- }
-
- buffer.setBooleanProperty(Buffer.TRAILING_EOL,false);
- if(bufferLength != 0 && jEdit.getBooleanProperty("stripTrailingEOL"))
- {
- char ch = seg.array[bufferLength - 1];
- if(ch == '\n')
- {
- buffer.setBooleanProperty(Buffer.TRAILING_EOL,true);
- seg.count--;
- endOffsets.setSize(endOffsets.getSize() - 1);
- }
- }
-
- // add a line marker at the end for proper offset manager
- // operation
- endOffsets.add(seg.count + 1);
-
- // to avoid having to deal with read/write locks and such,
- // we insert the loaded data into the buffer in the
- // post-load cleanup runnable, which runs in the AWT thread.
- if(!insert)
- {
- buffer.setProperty(LOAD_DATA,seg);
- buffer.setProperty(END_OFFSETS,endOffsets);
- buffer.setProperty(NEW_PATH,path);
- if(lineSeparator != null)
- buffer.setProperty(JEditBuffer.LINESEP,lineSeparator);
- }
-
- // used in insert()
- return seg;
- } //}}}
-
- //{{{ write() method
- protected void write(Buffer buffer, OutputStream out)
- throws IOException
- {
- String encodingName
- = buffer.getStringProperty(JEditBuffer.ENCODING);
- Encoding encoding = EncodingServer.getEncoding(encodingName);
- Writer writer = encoding.getTextWriter(
- new BufferedOutputStream(out, getByteIOBufferSize()));
-
- Segment lineSegment = new Segment();
- String newline = buffer.getStringProperty(JEditBuffer.LINESEP);
- if(newline == null)
- newline = System.getProperty("line.separator");
-
- final int bufferLineCount = buffer.getLineCount();
- setMaximum(bufferLineCount / PROGRESS_INTERVAL);
- setValue(0);
-
- int i = 0;
- while(i < bufferLineCount)
- {
- buffer.getLineText(i,lineSegment);
- try
- {
- writer.write(lineSegment.array,
- lineSegment.offset,
- lineSegment.count);
- if(i < bufferLineCount - 1
- || (jEdit.getBooleanProperty("stripTrailingEOL")
- && buffer.getBooleanProperty(Buffer.TRAILING_EOL)))
- {
- writer.write(newline);
- }
- }
- catch(CharacterCodingException e)
- {
- String message = getWriteEncodingErrorMessage(
- encodingName, encoding,
- lineSegment, i);
- IOException wrapping = new CharConversionException(message);
- wrapping.initCause(e);
- throw wrapping;
- }
-
- if(++i % PROGRESS_INTERVAL == 0)
- setValue(i / PROGRESS_INTERVAL);
- }
- writer.flush();
- } //}}}
-
- //{{{ Private members
-
- //{{{ createEncodingErrorMessage() method
- private static String getWriteEncodingErrorMessage(
- String encodingName, Encoding encoding,
- Segment line, int lineIndex)
- {
- String args[] = {
- encodingName,
- Integer.toString(lineIndex + 1),
- "UNKNOWN", // column
- "UNKNOWN" // the character
- };
- try
- {
- int charIndex = getFirstGuiltyCharacterIndex(encoding, line);
- if(0 <= charIndex && charIndex < line.count)
- {
- char c = line.array[line.offset + charIndex];
- args[2] = Integer.toString(charIndex + 1);
- args[3] = "'" + c + "' (U+" + Integer.toHexString(c).toUpperCase() + ")";
- }
- }
- catch(Exception e)
- {
- // Ignore.
- }
- return jEdit.getProperty("ioerror.write-encoding-error", args);
- } //}}}
-
- //{{{ getFirstGuiltyCharacterIndex() method
- // Look for the first character which causes encoding error.
- private static int getFirstGuiltyCharacterIndex(Encoding encoding,
- Segment line) throws IOException
- {
- if(line.count < 1)
- {
- return -1;
- }
- else if(line.count == 1)
- {
- return 0;
- }
-
- Writer tester = encoding.getTextWriter(
- new OutputStream()
- {
- public void write(int b) {}
- });
- for(int i = 0; i < line.count; ++i)
- {
- try
- {
- tester.write(line.array[line.offset + i]);
- }
- catch(CharacterCodingException e)
- {
- return i;
- }
- }
- return -1;
- } //}}}
-
- //}}}
-}
+/*
+ * BufferIORequest.java - I/O request
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.bufferio;
+
+//{{{ Imports
+import java.io.BufferedOutputStream;
+import java.io.CharConversionException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.nio.charset.CharacterCodingException;
+
+import javax.swing.text.Segment;
+
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.jedit.io.Encoding;
+import org.gjt.sp.jedit.io.EncodingServer;
+import org.gjt.sp.util.IntegerArray;
+import org.gjt.sp.util.SegmentBuffer;
+import org.gjt.sp.util.WorkRequest;
+//}}}
+
+/**
+ * A buffer I/O request.
+ * @author Slava Pestov
+ * @version $Id: BufferIORequest.java 16339 2009-10-14 09:59:36Z kpouer $
+ */
+public abstract class BufferIORequest extends WorkRequest
+{
+ //{{{ Constants
+
+ /**
+ * Size of I/O buffers.
+ */
+ public static final int IOBUFSIZE = 32768;
+
+ /**
+ * Number of lines per progress increment.
+ */
+ public static final int PROGRESS_INTERVAL = 300;
+
+ public static final String LOAD_DATA = "BufferIORequest__loadData";
+ public static final String END_OFFSETS = "BufferIORequest__endOffsets";
+ public static final String NEW_PATH = "BufferIORequest__newPath";
+
+ /**
+ * Buffer boolean property set when an error occurs.
+ */
+ public static final String ERROR_OCCURRED = "BufferIORequest__error";
+
+ // These are no longer used but still here only for compatibility.
+ @Deprecated public static final int UTF8_MAGIC_1 = 0xef;
+ @Deprecated public static final int UTF8_MAGIC_2 = 0xbb;
+ @Deprecated public static final int UTF8_MAGIC_3 = 0xbf;
+ @Deprecated public static final int UNICODE_MAGIC_1 = 0xfe;
+ @Deprecated public static final int UNICODE_MAGIC_2 = 0xff;
+ @Deprecated public static final int XML_PI_LENGTH = 50;
+ @Deprecated public static final int GZIP_MAGIC_1 = 0x1f;
+ @Deprecated public static final int GZIP_MAGIC_2 = 0x8b;
+
+ //}}}
+
+ //{{{ Instance variables
+ protected final View view;
+ protected final Buffer buffer;
+ protected final Object session;
+ protected final VFS vfs;
+ protected String path;
+ protected final String markersPath;
+ //}}}
+
+ //{{{ BufferIORequest constructor
+ /**
+ * Creates a new buffer I/O request.
+ * @param view The view
+ * @param buffer The buffer
+ * @param session The VFS session
+ * @param vfs The VFS
+ * @param path The path
+ */
+ protected BufferIORequest(View view, Buffer buffer,
+ Object session, VFS vfs, String path)
+ {
+ this.view = view;
+ this.buffer = buffer;
+ this.session = session;
+ this.vfs = vfs;
+ this.path = path;
+
+ markersPath = Buffer.getMarkersPath(vfs, path);
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return getClass().getName() + '[' + buffer + ']';
+ } //}}}
+
+ //{{{ getCharIOBufferSize() method
+ /**
+ * Size of character I/O buffers.
+ */
+ public static int getCharIOBufferSize()
+ {
+ return IOBUFSIZE;
+ } //}}}
+
+ //{{{ getByteIOBufferSize() method
+ /**
+ * Size of byte I/O buffers.
+ */
+ public static int getByteIOBufferSize()
+ {
+ // 2 is sizeof char in byte;
+ return IOBUFSIZE * 2;
+ } //}}}
+
+ //{{{ autodetect() method
+ /**
+ * Tries to detect if the stream is gzipped, and if it has an encoding
+ * specified with an XML PI.
+ */
+ protected Reader autodetect(InputStream in) throws IOException
+ {
+ return MiscUtilities.autodetect(in, buffer);
+ } //}}}
+
+ //{{{ read() method
+ protected SegmentBuffer read(Reader in, long length,
+ boolean insert) throws IOException
+ {
+ /* we guess an initial size for the array */
+ IntegerArray endOffsets = new IntegerArray(
+ Math.max(1,(int)(length / 50)));
+
+ // only true if the file size is known
+ boolean trackProgress = !buffer.isTemporary() && length != 0;
+
+ if(trackProgress)
+ {
+ setMaximum(length);
+ setValue(0);
+ }
+
+ // if the file size is not known, start with a resonable
+ // default buffer size
+ if(length == 0)
+ length = IOBUFSIZE;
+
+ SegmentBuffer seg = new SegmentBuffer((int)length + 1);
+
+ char[] buf = new char[IOBUFSIZE];
+
+ /* Number of characters in 'buf' array.
+ InputStream.read() doesn't always fill the
+ array (eg, the file size is not a multiple of
+ IOBUFSIZE, or it is a GZipped file, etc) */
+ int len;
+
+ // True if a \n was read after a \r. Usually
+ // means this is a DOS/Windows file
+ boolean CRLF = false;
+
+ // A \r was read, hence a MacOS file
+ boolean CROnly = false;
+
+ // Was the previous read character a \r?
+ // If we read a \n and this is true, we assume
+ // we have a DOS/Windows file
+ boolean lastWasCR = false;
+
+ // Number of lines read. Every 100 lines, we update the
+ // progress bar
+ int lineCount = 0;
+
+ while((len = in.read(buf,0,buf.length)) != -1)
+ {
+ // Offset of previous line, relative to
+ // the start of the I/O buffer (NOT
+ // relative to the start of the document)
+ int lastLine = 0;
+
+ for(int i = 0; i < len; i++)
+ {
+ // Look for line endings.
+ switch(buf[i])
+ {
+ case '\r':
+ // If we read a \r and
+ // lastWasCR is also true,
+ // it is probably a Mac file
+ // (\r\r in stream)
+ if(lastWasCR)
+ {
+ CROnly = true;
+ CRLF = false;
+ }
+ // Otherwise set a flag,
+ // so that \n knows that last
+ // was a \r
+ else
+ {
+ lastWasCR = true;
+ }
+
+ // Insert a line
+ seg.append(buf,lastLine,i -
+ lastLine);
+ seg.append('\n');
+ endOffsets.add(seg.count);
+ if(trackProgress && lineCount++ % PROGRESS_INTERVAL == 0)
+ setValue(seg.count);
+
+ // This is i+1 to take the
+ // trailing \n into account
+ lastLine = i + 1;
+ break;
+ case '\n':
+ /* If lastWasCR is true, we just read a \r followed
+ by a \n. We specify that this is a Windows file,
+ but take no further action and just ignore the \r. */
+ if(lastWasCR)
+ {
+ CROnly = false;
+ CRLF = true;
+ lastWasCR = false;
+ /* Bump lastLine so that the next line doesn't erronously
+ pick up the \r */
+ lastLine = i + 1;
+ }
+ /* Otherwise, we found a \n that follows some other
+ * character, hence we have a Unix file */
+ else
+ {
+ CROnly = false;
+ CRLF = false;
+ seg.append(buf,lastLine,
+ i - lastLine);
+ seg.append('\n');
+ endOffsets.add(seg.count);
+ if(trackProgress && lineCount++ % PROGRESS_INTERVAL == 0)
+ setValue(seg.count);
+ lastLine = i + 1;
+ }
+ break;
+ default:
+ /* If we find some other character that follows
+ a \r, so it is not a Windows file, and probably
+ a Mac file */
+ if(lastWasCR)
+ {
+ CROnly = true;
+ CRLF = false;
+ lastWasCR = false;
+ }
+ break;
+ }
+ }
+
+ if(trackProgress)
+ setValue(seg.count);
+
+ // Add remaining stuff from buffer
+ seg.append(buf,lastLine,len - lastLine);
+ }
+
+ setAbortable(false);
+
+ String lineSeparator;
+ if(seg.count == 0)
+ {
+ // fix for "[ 865589 ] 0-byte files should open using
+ // the default line seperator"
+ lineSeparator = jEdit.getProperty(
+ "buffer.lineSeparator",
+ System.getProperty("line.separator"));
+ }
+ else if(CRLF)
+ lineSeparator = "\r\n";
+ else if(CROnly)
+ lineSeparator = "\r";
+ else
+ lineSeparator = "\n";
+
+ // Chop trailing newline and/or ^Z (if any)
+ int bufferLength = seg.count;
+ if(bufferLength != 0)
+ {
+ char ch = seg.array[bufferLength - 1];
+ if(ch == 0x1a /* DOS ^Z */)
+ seg.count--;
+ }
+
+ buffer.setBooleanProperty(Buffer.TRAILING_EOL,false);
+ if(bufferLength != 0 && jEdit.getBooleanProperty("stripTrailingEOL"))
+ {
+ char ch = seg.array[bufferLength - 1];
+ if(ch == '\n')
+ {
+ buffer.setBooleanProperty(Buffer.TRAILING_EOL,true);
+ seg.count--;
+ endOffsets.setSize(endOffsets.getSize() - 1);
+ }
+ }
+
+ // add a line marker at the end for proper offset manager
+ // operation
+ endOffsets.add(seg.count + 1);
+
+ // to avoid having to deal with read/write locks and such,
+ // we insert the loaded data into the buffer in the
+ // post-load cleanup runnable, which runs in the AWT thread.
+ if(!insert)
+ {
+ buffer.setProperty(LOAD_DATA,seg);
+ buffer.setProperty(END_OFFSETS,endOffsets);
+ buffer.setProperty(NEW_PATH,path);
+ if(lineSeparator != null)
+ buffer.setProperty(JEditBuffer.LINESEP,lineSeparator);
+ }
+
+ // used in insert()
+ return seg;
+ } //}}}
+
+ //{{{ write() method
+ protected void write(Buffer buffer, OutputStream out)
+ throws IOException
+ {
+ String encodingName
+ = buffer.getStringProperty(JEditBuffer.ENCODING);
+ Encoding encoding = EncodingServer.getEncoding(encodingName);
+ Writer writer = encoding.getTextWriter(
+ new BufferedOutputStream(out, getByteIOBufferSize()));
+
+ Segment lineSegment = new Segment();
+ String newline = buffer.getStringProperty(JEditBuffer.LINESEP);
+ if(newline == null)
+ newline = System.getProperty("line.separator");
+
+ final int bufferLineCount = buffer.getLineCount();
+ setMaximum(bufferLineCount / PROGRESS_INTERVAL);
+ setValue(0);
+
+ int i = 0;
+ while(i < bufferLineCount)
+ {
+ buffer.getLineText(i,lineSegment);
+ try
+ {
+ writer.write(lineSegment.array,
+ lineSegment.offset,
+ lineSegment.count);
+ if(i < bufferLineCount - 1
+ || (jEdit.getBooleanProperty("stripTrailingEOL")
+ && buffer.getBooleanProperty(Buffer.TRAILING_EOL)))
+ {
+ writer.write(newline);
+ }
+ }
+ catch(CharacterCodingException e)
+ {
+ String message = getWriteEncodingErrorMessage(
+ encodingName, encoding,
+ lineSegment, i);
+ IOException wrapping = new CharConversionException(message);
+ wrapping.initCause(e);
+ throw wrapping;
+ }
+
+ if(++i % PROGRESS_INTERVAL == 0)
+ setValue(i / PROGRESS_INTERVAL);
+ }
+ writer.flush();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ createEncodingErrorMessage() method
+ private static String getWriteEncodingErrorMessage(
+ String encodingName, Encoding encoding,
+ Segment line, int lineIndex)
+ {
+ String args[] = {
+ encodingName,
+ Integer.toString(lineIndex + 1),
+ "UNKNOWN", // column
+ "UNKNOWN" // the character
+ };
+ try
+ {
+ int charIndex = getFirstGuiltyCharacterIndex(encoding, line);
+ if(0 <= charIndex && charIndex < line.count)
+ {
+ char c = line.array[line.offset + charIndex];
+ args[2] = Integer.toString(charIndex + 1);
+ args[3] = "'" + c + "' (U+" + Integer.toHexString(c).toUpperCase() + ")";
+ }
+ }
+ catch(Exception e)
+ {
+ // Ignore.
+ }
+ return jEdit.getProperty("ioerror.write-encoding-error", args);
+ } //}}}
+
+ //{{{ getFirstGuiltyCharacterIndex() method
+ // Look for the first character which causes encoding error.
+ private static int getFirstGuiltyCharacterIndex(Encoding encoding,
+ Segment line) throws IOException
+ {
+ if(line.count < 1)
+ {
+ return -1;
+ }
+ else if(line.count == 1)
+ {
+ return 0;
+ }
+
+ Writer tester = encoding.getTextWriter(
+ new OutputStream()
+ {
+ public void write(int b) {}
+ });
+ for(int i = 0; i < line.count; ++i)
+ {
+ try
+ {
+ tester.write(line.array[line.offset + i]);
+ }
+ catch(CharacterCodingException e)
+ {
+ return i;
+ }
+ }
+ return -1;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/bufferio/BufferInsertRequest.java b/jEdit/org/gjt/sp/jedit/bufferio/BufferInsertRequest.java
index 6ac17fe..517396a 100644
--- a/jEdit/org/gjt/sp/jedit/bufferio/BufferInsertRequest.java
+++ b/jEdit/org/gjt/sp/jedit/bufferio/BufferInsertRequest.java
@@ -1,125 +1,125 @@
-/*
- * BufferInsertRequest.java - I/O request
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.bufferio;
-
-//{{{ Imports
-import java.io.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * A buffer insert request.
- * @author Slava Pestov
- * @version $Id: BufferInsertRequest.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class BufferInsertRequest extends BufferIORequest
-{
- //{{{ BufferInsertRequest constructor
- /**
- * Creates a new buffer I/O request.
- * @param view The view
- * @param buffer The buffer
- * @param session The VFS session
- * @param vfs The VFS
- * @param path The path
- */
- public BufferInsertRequest(View view, Buffer buffer,
- Object session, VFS vfs, String path)
- {
- super(view,buffer,session,vfs,path);
- } //}}}
-
- //{{{ run() method
- public void run()
- {
- InputStream in = null;
- try
- {
- String[] args = { vfs.getFileName(path) };
- setStatus(jEdit.getProperty("vfs.status.load",args));
- setAbortable(true);
-
- path = vfs._canonPath(session,path,view);
-
- VFSFile entry = vfs._getFile(
- session,path,view);
- long length;
- if(entry != null)
- length = entry.getLength();
- else
- length = 0L;
-
- in = vfs._createInputStream(session,path,false,view);
- if(in == null)
- return;
-
- final SegmentBuffer seg = read(
- autodetect(in),length,true);
-
- /* we don't do this in Buffer.insert() so that
- we can insert multiple files at once */
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- view.getTextArea().setSelectedText(
- seg.toString());
- }
- });
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- String[] pp = { e.toString() };
- VFSManager.error(view,path,"ioerror.read-error",pp);
-
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- catch(WorkThread.Abort a)
- {
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- finally
- {
- IOUtilities.closeQuietly(in);
- try
- {
- vfs._endVFSSession(session,view);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- String[] pp = { e.toString() };
- VFSManager.error(view,path,"ioerror.read-error",pp);
-
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- catch(WorkThread.Abort a)
- {
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- }
- } //}}}
-}
+/*
+ * BufferInsertRequest.java - I/O request
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.bufferio;
+
+//{{{ Imports
+import java.io.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * A buffer insert request.
+ * @author Slava Pestov
+ * @version $Id: BufferInsertRequest.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class BufferInsertRequest extends BufferIORequest
+{
+ //{{{ BufferInsertRequest constructor
+ /**
+ * Creates a new buffer I/O request.
+ * @param view The view
+ * @param buffer The buffer
+ * @param session The VFS session
+ * @param vfs The VFS
+ * @param path The path
+ */
+ public BufferInsertRequest(View view, Buffer buffer,
+ Object session, VFS vfs, String path)
+ {
+ super(view,buffer,session,vfs,path);
+ } //}}}
+
+ //{{{ run() method
+ public void run()
+ {
+ InputStream in = null;
+ try
+ {
+ String[] args = { vfs.getFileName(path) };
+ setStatus(jEdit.getProperty("vfs.status.load",args));
+ setAbortable(true);
+
+ path = vfs._canonPath(session,path,view);
+
+ VFSFile entry = vfs._getFile(
+ session,path,view);
+ long length;
+ if(entry != null)
+ length = entry.getLength();
+ else
+ length = 0L;
+
+ in = vfs._createInputStream(session,path,false,view);
+ if(in == null)
+ return;
+
+ final SegmentBuffer seg = read(
+ autodetect(in),length,true);
+
+ /* we don't do this in Buffer.insert() so that
+ we can insert multiple files at once */
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ view.getTextArea().setSelectedText(
+ seg.toString());
+ }
+ });
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ String[] pp = { e.toString() };
+ VFSManager.error(view,path,"ioerror.read-error",pp);
+
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ catch(WorkThread.Abort a)
+ {
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(in);
+ try
+ {
+ vfs._endVFSSession(session,view);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ String[] pp = { e.toString() };
+ VFSManager.error(view,path,"ioerror.read-error",pp);
+
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ catch(WorkThread.Abort a)
+ {
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/bufferio/BufferLoadRequest.java b/jEdit/org/gjt/sp/jedit/bufferio/BufferLoadRequest.java
index e8f760a..bf459e5 100644
--- a/jEdit/org/gjt/sp/jedit/bufferio/BufferLoadRequest.java
+++ b/jEdit/org/gjt/sp/jedit/bufferio/BufferLoadRequest.java
@@ -1,394 +1,394 @@
-/*
- * BufferLoadRequest.java - I/O request
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.bufferio;
-
-//{{{ Imports
-import java.io.*;
-import java.nio.charset.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.zip.GZIPInputStream;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * A buffer load request.
- * @author Slava Pestov
- * @version $Id: BufferLoadRequest.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class BufferLoadRequest extends BufferIORequest
-{
- //{{{ BufferLoadRequest constructor
- /**
- * Creates a new buffer I/O request.
- * @param view The view
- * @param buffer The buffer
- * @param session The VFS session
- * @param vfs The VFS
- * @param path The path
- */
- public BufferLoadRequest(View view, Buffer buffer,
- Object session, VFS vfs, String path)
- {
- super(view,buffer,session,vfs,path);
- } //}}}
-
- //{{{ run() method
- public void run()
- {
- try
- {
- setAbortable(true);
- if(!buffer.isTemporary())
- {
- String[] args = { vfs.getFileName(path) };
- setStatus(jEdit.getProperty("vfs.status.load",args));
- setValue(0L);
- }
-
- path = vfs._canonPath(session,path,view);
-
- readContents();
- buffer.setNewFile(false);
-
- if (jEdit.getBooleanProperty("persistentMarkers") &&
- (vfs.isMarkersFileSupported()))
- {
- InputStream markers = null;
- try
- {
- String[] args = { vfs.getFileName(path) };
- if(!buffer.isTemporary())
- setStatus(jEdit.getProperty("vfs.status.load-markers",args));
- setAbortable(true);
-
- markers = vfs._createInputStream(session,markersPath,true,view);
- if(markers != null)
- readMarkers(buffer,markers);
- }
- catch(Exception e)
- {
- // ignore
- }
- finally
- {
- IOUtilities.closeQuietly(markers);
- }
- }
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- Object[] pp = { e.toString() };
- VFSManager.error(view,path,"ioerror.read-error",pp);
-
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- catch(OutOfMemoryError oom)
- {
- Log.log(Log.ERROR,this,oom);
- VFSManager.error(view,path,"out-of-memory-error",null);
-
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- catch(WorkThread.Abort a)
- {
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- finally
- {
- try
- {
- vfs._endVFSSession(session,view);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- String[] pp = { e.toString() };
- VFSManager.error(view,path,"ioerror.read-error",pp);
-
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- catch(WorkThread.Abort a)
- {
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- }
- } //}}}
-
- //{{{ getNakedStream() method
- /**
- * Returns the raw contents stream for this load request.
- * This stream is not buffered or unzipped.
- */
- private InputStream getNakedStream() throws IOException
- {
- InputStream in = vfs._createInputStream(session,path,false,view);
- if(in != null)
- {
- return in;
- }
- throw new IOException("Unable to get a Stream for " + path);
- } //}}}
-
- //{{{ getContentLength() method
- /**
- * Returns content length of this load request.
- */
- private long getContentLength() throws IOException
- {
- VFSFile entry = vfs._getFile(session,path,view);
- if(entry != null)
- return entry.getLength();
- else
- return 0L;
- } //}}}
-
- //{{{ rewindContentsStream() method
- /**
- * Returns rewinded contents stream.
- * This method assumes the marked stream was made by
- * getMarkedStream() method. The stream may be reopened if reset()
- * failed.
- */
- private BufferedInputStream rewindContentsStream(BufferedInputStream markedStream, boolean gzipped)
- throws IOException
- {
- try
- {
- markedStream.reset();
- return markedStream;
- }
- catch(IOException e)
- {
- Log.log(Log.NOTICE, this
- , path + ": Reopening to rewind the stream");
- // Reopen the stream because the mark has been
- // invalidated while previous reading.
- markedStream.close();
- InputStream in = getNakedStream();
- try
- {
- if(gzipped)
- {
- in = new GZIPInputStream(in);
- }
- BufferedInputStream result
- = AutoDetection.getMarkedStream(in);
- in = null;
- return result;
- }
- finally
- {
- IOUtilities.closeQuietly(in);
- }
- }
- } //}}}
-
- //{{{ readContents() method
- /**
- * Read the contents of this load request.
- * Some auto detection is performed if enabled.
- * - GZIPed file
- * - The encoding
- * If fallback encodings are specified, they are used on
- * encoding errors.
- */
- private void readContents() throws IOException
- {
- long length = getContentLength();
-
- BufferedInputStream markedStream
- = AutoDetection.getMarkedStream(getNakedStream());
- try
- {
- boolean gzipped = false;
- // encodingProviders is consist of given
- // encodings as String or contents-aware
- // detectors as EncodingDetector.
- List<Object> encodingProviders
- = new ArrayList<Object>();
-
- boolean autodetect = buffer.getBooleanProperty(Buffer.ENCODING_AUTODETECT);
- if(autodetect)
- {
- gzipped = AutoDetection.isGzipped(markedStream);
- markedStream.reset();
-
- encodingProviders.addAll(AutoDetection.getEncodingDetectors());
- // If the detected encoding fail, fallback to
- // the original encoding.
- encodingProviders.add(buffer.getStringProperty(Buffer.ENCODING));
-
- String fallbackEncodings = jEdit.getProperty("fallbackEncodings");
- if(fallbackEncodings != null && fallbackEncodings.length() > 0)
- {
- for(String encoding: fallbackEncodings.split("\\s+"))
- {
- encodingProviders.add(encoding);
- }
- }
- }
- else
- {
- gzipped = buffer.getBooleanProperty(Buffer.GZIPPED);
- encodingProviders.add(buffer.getStringProperty(Buffer.ENCODING));
- }
-
- if(gzipped)
- {
- Log.log(Log.DEBUG, this, path + ": Stream is gzipped.");
- markedStream = AutoDetection.getMarkedStream(
- new GZIPInputStream(markedStream));
- }
-
- Set<String> failedEncodings = new HashSet<String>();
- Exception encodingError = null;
- for(Object encodingProvider: encodingProviders)
- {
- String encoding = null;
- if (encodingProvider instanceof String)
- {
- encoding = (String)encodingProvider;
- }
- else if(encodingProvider instanceof EncodingDetector)
- {
- markedStream = rewindContentsStream(markedStream, gzipped);
- encoding = ((EncodingDetector)encodingProvider).detectEncoding(new BufferedInputStream(markedStream));
- }
- else
- {
- Log.log(Log.DEBUG, this, "Strange encodingProvider: " + encodingProvider);
- }
-
- if(encoding == null || encoding.length() <= 0
- || failedEncodings.contains(encoding))
- {
- continue;
- }
-
- markedStream = rewindContentsStream(markedStream, gzipped);
- try
- {
- read(EncodingServer.getTextReader(markedStream, encoding)
- , length, false);
- if(autodetect)
- {
- // Store the successful properties.
- if(gzipped)
- {
- buffer.setBooleanProperty(Buffer.GZIPPED,true);
- }
- buffer.setProperty(Buffer.ENCODING, encoding);
- }
- return;
- }
- catch(CharConversionException e)
- {
- encodingError = e;
- }
- catch(CharacterCodingException e)
- {
- encodingError = e;
- }
- catch(UnsupportedEncodingException e)
- {
- encodingError = e;
- }
- catch(UnsupportedCharsetException e)
- {
- encodingError = e;
- }
- Log.log(Log.NOTICE, this, path + ": " + encoding
- + ": " + encodingError);
- failedEncodings.add(encoding);
- }
- // All possible detectors and encodings failed.
- Object[] pp = { TextUtilities.join(failedEncodings,","), "" };
- if(failedEncodings.size() < 2)
- {
- pp[1] = encodingError.toString();
- }
- else
- {
- pp[1] = "See details in Activity Log";
- }
- VFSManager.error(view,path,"ioerror.encoding-error",pp);
- markedStream = rewindContentsStream(markedStream, gzipped);
- read(EncodingServer.getEncoding(
- buffer.getStringProperty(Buffer.ENCODING)
- ).getPermissiveTextReader(markedStream)
- , length, false);
- if(autodetect && gzipped)
- {
- buffer.setBooleanProperty(Buffer.GZIPPED,true);
- }
- }
- finally
- {
- markedStream.close();
- }
- } //}}}
-
- //{{{ readMarkers() method
- private static void readMarkers(Buffer buffer, InputStream _in)
- throws IOException
- {
- // For `reload' command
- buffer.removeAllMarkers();
-
- BufferedReader in = new BufferedReader(new InputStreamReader(_in));
-
- try
- {
- String line;
- while((line = in.readLine()) != null)
- {
- // malformed marks file?
- if(line.length() == 0)
- continue;
-
- // compatibility kludge for jEdit 3.1 and earlier
- if(line.charAt(0) != '!')
- continue;
-
-
- char shortcut = line.charAt(1);
- int start = line.indexOf(';');
- int end = line.indexOf(';',start + 1);
- int position = Integer.parseInt(line.substring(start + 1,end));
- buffer.addMarker(shortcut,position);
- }
- buffer.setMarkersChanged(false);
- }
- finally
- {
- in.close();
- }
- } //}}}
-}
+/*
+ * BufferLoadRequest.java - I/O request
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.bufferio;
+
+//{{{ Imports
+import java.io.*;
+import java.nio.charset.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.zip.GZIPInputStream;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * A buffer load request.
+ * @author Slava Pestov
+ * @version $Id: BufferLoadRequest.java 17734 2010-05-04 22:08:41Z kpouer $
+ */
+public class BufferLoadRequest extends BufferIORequest
+{
+ //{{{ BufferLoadRequest constructor
+ /**
+ * Creates a new buffer I/O request.
+ * @param view The view
+ * @param buffer The buffer
+ * @param session The VFS session
+ * @param vfs The VFS
+ * @param path The path
+ */
+ public BufferLoadRequest(View view, Buffer buffer,
+ Object session, VFS vfs, String path)
+ {
+ super(view,buffer,session,vfs,path);
+ } //}}}
+
+ //{{{ run() method
+ public void run()
+ {
+ try
+ {
+ setAbortable(true);
+ if(!buffer.isTemporary())
+ {
+ String[] args = { vfs.getFileName(path) };
+ setStatus(jEdit.getProperty("vfs.status.load",args));
+ setValue(0L);
+ }
+
+ path = vfs._canonPath(session,path,view);
+
+ readContents();
+ buffer.setNewFile(false);
+
+ if (jEdit.getBooleanProperty("persistentMarkers") &&
+ (vfs.isMarkersFileSupported()))
+ {
+ InputStream markers = null;
+ try
+ {
+ String[] args = { vfs.getFileName(path) };
+ if(!buffer.isTemporary())
+ setStatus(jEdit.getProperty("vfs.status.load-markers",args));
+ setAbortable(true);
+
+ markers = vfs._createInputStream(session,markersPath,true,view);
+ if(markers != null)
+ readMarkers(buffer,markers);
+ }
+ catch(Exception e)
+ {
+ // ignore
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(markers);
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ Object[] pp = { e.toString() };
+ VFSManager.error(view,path,"ioerror.read-error",pp);
+
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ catch(OutOfMemoryError oom)
+ {
+ Log.log(Log.ERROR,this,oom);
+ VFSManager.error(view,path,"out-of-memory-error",null);
+
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ catch(WorkThread.Abort a)
+ {
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,view);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ String[] pp = { e.toString() };
+ VFSManager.error(view,path,"ioerror.read-error",pp);
+
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ catch(WorkThread.Abort a)
+ {
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ }
+ } //}}}
+
+ //{{{ getNakedStream() method
+ /**
+ * Returns the raw contents stream for this load request.
+ * This stream is not buffered or unzipped.
+ */
+ private InputStream getNakedStream() throws IOException
+ {
+ InputStream in = vfs._createInputStream(session,path,false,view);
+ if(in != null)
+ {
+ return in;
+ }
+ throw new IOException("Unable to get a Stream for " + path);
+ } //}}}
+
+ //{{{ getContentLength() method
+ /**
+ * Returns content length of this load request.
+ */
+ private long getContentLength() throws IOException
+ {
+ VFSFile entry = vfs._getFile(session,path,view);
+ if(entry != null)
+ return entry.getLength();
+ else
+ return 0L;
+ } //}}}
+
+ //{{{ rewindContentsStream() method
+ /**
+ * Returns rewinded contents stream.
+ * This method assumes the marked stream was made by
+ * getMarkedStream() method. The stream may be reopened if reset()
+ * failed.
+ */
+ private BufferedInputStream rewindContentsStream(BufferedInputStream markedStream, boolean gzipped)
+ throws IOException
+ {
+ try
+ {
+ markedStream.reset();
+ return markedStream;
+ }
+ catch(IOException e)
+ {
+ Log.log(Log.NOTICE, this
+ , path + ": Reopening to rewind the stream");
+ // Reopen the stream because the mark has been
+ // invalidated while previous reading.
+ markedStream.close();
+ InputStream in = getNakedStream();
+ try
+ {
+ if(gzipped)
+ {
+ in = new GZIPInputStream(in);
+ }
+ BufferedInputStream result
+ = AutoDetection.getMarkedStream(in);
+ in = null;
+ return result;
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(in);
+ }
+ }
+ } //}}}
+
+ //{{{ readContents() method
+ /**
+ * Read the contents of this load request.
+ * Some auto detection is performed if enabled.
+ * - GZIPed file
+ * - The encoding
+ * If fallback encodings are specified, they are used on
+ * encoding errors.
+ */
+ private void readContents() throws IOException
+ {
+ long length = getContentLength();
+
+ BufferedInputStream markedStream
+ = AutoDetection.getMarkedStream(getNakedStream());
+ try
+ {
+ boolean gzipped = false;
+ // encodingProviders is consist of given
+ // encodings as String or contents-aware
+ // detectors as EncodingDetector.
+ List<Object> encodingProviders
+ = new ArrayList<Object>();
+
+ boolean autodetect = buffer.getBooleanProperty(Buffer.ENCODING_AUTODETECT);
+ if(autodetect)
+ {
+ gzipped = AutoDetection.isGzipped(markedStream);
+ markedStream.reset();
+
+ encodingProviders.addAll(AutoDetection.getEncodingDetectors());
+ // If the detected encoding fail, fallback to
+ // the original encoding.
+ encodingProviders.add(buffer.getStringProperty(JEditBuffer.ENCODING));
+
+ String fallbackEncodings = jEdit.getProperty("fallbackEncodings");
+ if(fallbackEncodings != null && fallbackEncodings.length() > 0)
+ {
+ for(String encoding: fallbackEncodings.split("\\s+"))
+ {
+ encodingProviders.add(encoding);
+ }
+ }
+ }
+ else
+ {
+ gzipped = buffer.getBooleanProperty(Buffer.GZIPPED);
+ encodingProviders.add(buffer.getStringProperty(JEditBuffer.ENCODING));
+ }
+
+ if(gzipped)
+ {
+ Log.log(Log.DEBUG, this, path + ": Stream is gzipped.");
+ markedStream = AutoDetection.getMarkedStream(
+ new GZIPInputStream(markedStream));
+ }
+
+ Set<String> failedEncodings = new HashSet<String>();
+ Exception encodingError = null;
+ for(Object encodingProvider: encodingProviders)
+ {
+ String encoding = null;
+ if (encodingProvider instanceof String)
+ {
+ encoding = (String)encodingProvider;
+ }
+ else if(encodingProvider instanceof EncodingDetector)
+ {
+ markedStream = rewindContentsStream(markedStream, gzipped);
+ encoding = ((EncodingDetector)encodingProvider).detectEncoding(new BufferedInputStream(markedStream));
+ }
+ else
+ {
+ Log.log(Log.DEBUG, this, "Strange encodingProvider: " + encodingProvider);
+ }
+
+ if(encoding == null || encoding.length() <= 0
+ || failedEncodings.contains(encoding))
+ {
+ continue;
+ }
+
+ markedStream = rewindContentsStream(markedStream, gzipped);
+ try
+ {
+ read(EncodingServer.getTextReader(markedStream, encoding)
+ , length, false);
+ if(autodetect)
+ {
+ // Store the successful properties.
+ if(gzipped)
+ {
+ buffer.setBooleanProperty(Buffer.GZIPPED,true);
+ }
+ buffer.setProperty(JEditBuffer.ENCODING, encoding);
+ }
+ return;
+ }
+ catch(CharConversionException e)
+ {
+ encodingError = e;
+ }
+ catch(CharacterCodingException e)
+ {
+ encodingError = e;
+ }
+ catch(UnsupportedEncodingException e)
+ {
+ encodingError = e;
+ }
+ catch(UnsupportedCharsetException e)
+ {
+ encodingError = e;
+ }
+ Log.log(Log.NOTICE, this, path + ": " + encoding
+ + ": " + encodingError);
+ failedEncodings.add(encoding);
+ }
+ // All possible detectors and encodings failed.
+ Object[] pp = { TextUtilities.join(failedEncodings,","), "" };
+ if(failedEncodings.size() < 2)
+ {
+ pp[1] = encodingError.toString();
+ }
+ else
+ {
+ pp[1] = "See details in Activity Log";
+ }
+ VFSManager.error(view,path,"ioerror.encoding-error",pp);
+ markedStream = rewindContentsStream(markedStream, gzipped);
+ read(EncodingServer.getEncoding(
+ buffer.getStringProperty(JEditBuffer.ENCODING)
+ ).getPermissiveTextReader(markedStream)
+ , length, false);
+ if(autodetect && gzipped)
+ {
+ buffer.setBooleanProperty(Buffer.GZIPPED,true);
+ }
+ }
+ finally
+ {
+ markedStream.close();
+ }
+ } //}}}
+
+ //{{{ readMarkers() method
+ private static void readMarkers(Buffer buffer, InputStream _in)
+ throws IOException
+ {
+ // For `reload' command
+ buffer.removeAllMarkers();
+
+ BufferedReader in = new BufferedReader(new InputStreamReader(_in));
+
+ try
+ {
+ String line;
+ while((line = in.readLine()) != null)
+ {
+ // malformed marks file?
+ if(line.length() == 0)
+ continue;
+
+ // compatibility kludge for jEdit 3.1 and earlier
+ if(line.charAt(0) != '!')
+ continue;
+
+
+ char shortcut = line.charAt(1);
+ int start = line.indexOf(';');
+ int end = line.indexOf(';',start + 1);
+ int position = Integer.parseInt(line.substring(start + 1,end));
+ buffer.addMarker(shortcut,position);
+ }
+ buffer.setMarkersChanged(false);
+ }
+ finally
+ {
+ in.close();
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/bufferio/BufferSaveRequest.java b/jEdit/org/gjt/sp/jedit/bufferio/BufferSaveRequest.java
index f76d8fa..0205c64 100644
--- a/jEdit/org/gjt/sp/jedit/bufferio/BufferSaveRequest.java
+++ b/jEdit/org/gjt/sp/jedit/bufferio/BufferSaveRequest.java
@@ -1,232 +1,233 @@
-/*
- * BufferSaveRequest.java - I/O request
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.bufferio;
-
-//{{{ Imports
-import java.io.*;
-import java.util.zip.*;
-
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.*;
-import java.nio.charset.UnsupportedCharsetException;
-//}}}
-
-/**
- * A buffer save request.
- * @author Slava Pestov
- * @version $Id: BufferSaveRequest.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class BufferSaveRequest extends BufferIORequest
-{
- //{{{ BufferSaveRequest constructor
- /**
- * Creates a new buffer I/O request.
- * @param view The view
- * @param buffer The buffer
- * @param session The VFS session
- * @param vfs The VFS
- * @param path The path
- */
- public BufferSaveRequest(View view, Buffer buffer,
- Object session, VFS vfs, String path)
- {
- super(view,buffer,session,vfs,path);
- } //}}}
-
- //{{{ run() method
- public void run()
- {
- /* if the VFS supports renaming files, we first
- * save to #<filename>#save#, then rename that
- * to <filename>, so that if the save fails,
- * data will not be lost.
- *
- * as of 4.1pre7 we now call vfs.getTwoStageSaveName()
- * instead of constructing the path directly
- * since some VFS's might not allow # in filenames.
- */
-
- boolean vfsRenameCap = (vfs.getCapabilities() &
- VFS.RENAME_CAP) != 0;
-
- boolean wantTwoStage = wantTwoStageSave(buffer);
- boolean twoStageSave = vfsRenameCap && wantTwoStage;
-
- try
- {
- String[] args = { vfs.getFileName(path) };
- setStatus(jEdit.getProperty("vfs.status.save",args));
-
- // the entire save operation can be aborted...
- setAbortable(true);
-
- path = vfs._canonPath(session,path,view);
- if(!MiscUtilities.isURL(path))
- path = MiscUtilities.resolveSymlinks(path);
-
- String savePath;
- if(twoStageSave)
- {
- savePath = vfs.getTwoStageSaveName(path);
- if (savePath == null)
- {
- throw new IOException(
- "Can't get a temporary path for two-stage save: "
- + path);
- }
- }
- else
- {
- makeBackup();
- savePath = path;
- }
-
- OutputStream out = vfs._createOutputStream(session,savePath,view);
- if(out == null)
- {
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- return;
- }
- try
- {
- // this must be after the stream is created or
- // we deadlock with SSHTools.
- buffer.readLock();
- try
- {
- // Can't use buffer.getName() here because
- // it is not changed until the save is
- // complete
- if(path.endsWith(".gz"))
- buffer.setBooleanProperty(Buffer.GZIPPED,true);
- else if (buffer.getName().endsWith(".gz"))
- {
- // The path do not ends with gz.
- // The buffer name was .gz.
- // So it means it's blabla.txt.gz -> blabla.txt, I remove
- // the gz property
- buffer.setBooleanProperty(Buffer.GZIPPED, false);
- }
-
- if(buffer.getBooleanProperty(Buffer.GZIPPED))
- out = new GZIPOutputStream(out);
-
- write(buffer,out);
- }
- finally
- {
- buffer.readUnlock();
- }
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
-
- if(twoStageSave)
- {
- makeBackup();
- if(!vfs._rename(session,savePath,path,view))
- throw new IOException("Rename failed: " + savePath);
- }
-
- if(!twoStageSave)
- VFSManager.sendVFSUpdate(vfs,path,true);
- }
- catch(UnsupportedCharsetException e)
- {
- Log.log(Log.ERROR, this, e, e);
- String[] pp = { e.getCharsetName() };
- VFSManager.error(view,path,"ioerror.unsupported-encoding-error",pp);
-
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- String[] pp = { e.toString() };
- VFSManager.error(view,path,"ioerror.write-error",pp);
-
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- catch(WorkThread.Abort a)
- {
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- finally
- {
- try
- {
- vfs._saveComplete(session,buffer,path,view);
- if( twoStageSave )
- {
- vfs._finishTwoStageSave(session,buffer,path,view);
- }
- // clean up left-over markers file
- if(!jEdit.getBooleanProperty("persistentMarkers"))
- vfs._delete(session,Buffer.getMarkersPath(vfs, path),view);
- vfs._endVFSSession(session,view);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- String[] pp = { e.toString() };
- VFSManager.error(view,path,"ioerror.write-error",pp);
-
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- catch(WorkThread.Abort a)
- {
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ makeBackup() method
- /**
- * Make the backup.
- */
- private void makeBackup() throws IOException
- {
- // Only backup once per session
- if(buffer.getProperty(Buffer.BACKED_UP) == null
- || jEdit.getBooleanProperty("backupEverySave"))
- {
- vfs._backup(session,path,view);
- buffer.setBooleanProperty(Buffer.BACKED_UP,true);
- }
- } //}}}
-
- //{{{ wantTwoStageSave() method
- private static boolean wantTwoStageSave(Buffer buffer)
- {
- return !buffer.getBooleanProperty("forbidTwoStageSave") &&
- (buffer.getBooleanProperty("overwriteReadonly") ||
- jEdit.getBooleanProperty("twoStageSave"));
- }//}}}
-
- //}}}
-}
+/*
+ * BufferSaveRequest.java - I/O request
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.bufferio;
+
+//{{{ Imports
+import java.io.*;
+import java.util.zip.*;
+
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.*;
+import java.nio.charset.UnsupportedCharsetException;
+//}}}
+
+/**
+ * A buffer save request.
+ * @author Slava Pestov
+ * @version $Id: BufferSaveRequest.java 17453 2010-03-11 16:33:41Z voituk $
+ */
+public class BufferSaveRequest extends BufferIORequest
+{
+ //{{{ BufferSaveRequest constructor
+ /**
+ * Creates a new buffer I/O request.
+ * @param view The view
+ * @param buffer The buffer
+ * @param session The VFS session
+ * @param vfs The VFS
+ * @param path The path
+ */
+ public BufferSaveRequest(View view, Buffer buffer,
+ Object session, VFS vfs, String path)
+ {
+ super(view,buffer,session,vfs,path);
+ } //}}}
+
+ //{{{ run() method
+ public void run()
+ {
+ /* if the VFS supports renaming files, we first
+ * save to #<filename>#save#, then rename that
+ * to <filename>, so that if the save fails,
+ * data will not be lost.
+ *
+ * as of 4.1pre7 we now call vfs.getTwoStageSaveName()
+ * instead of constructing the path directly
+ * since some VFS's might not allow # in filenames.
+ */
+
+ boolean vfsRenameCap = (vfs.getCapabilities() &
+ VFS.RENAME_CAP) != 0;
+
+ boolean wantTwoStage = wantTwoStageSave(buffer);
+ boolean twoStageSave = vfsRenameCap && wantTwoStage;
+
+ try
+ {
+ String[] args = { vfs.getFileName(path) };
+ setStatus(jEdit.getProperty("vfs.status.save",args));
+
+ // the entire save operation can be aborted...
+ setAbortable(true);
+
+ path = vfs._canonPath(session,path,view);
+ if(!MiscUtilities.isURL(path))
+ path = MiscUtilities.resolveSymlinks(path);
+
+ String savePath;
+ if(twoStageSave)
+ {
+ savePath = vfs.getTwoStageSaveName(path);
+ if (savePath == null)
+ {
+ throw new IOException(
+ "Can't get a temporary path for two-stage save: "
+ + path);
+ }
+ }
+ else
+ {
+ makeBackup();
+ savePath = path;
+ }
+
+ OutputStream out = vfs._createOutputStream(session,savePath,view);
+ if(out == null)
+ {
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ return;
+ }
+ try
+ {
+ // this must be after the stream is created or
+ // we deadlock with SSHTools.
+ buffer.readLock();
+ try
+ {
+ // Can't use buffer.getName() here because
+ // it is not changed until the save is
+ // complete
+ if(path.endsWith(".gz"))
+ buffer.setBooleanProperty(Buffer.GZIPPED,true);
+ else if (buffer.getName().endsWith(".gz"))
+ {
+ // The path do not ends with gz.
+ // The buffer name was .gz.
+ // So it means it's blabla.txt.gz -> blabla.txt, I remove
+ // the gz property
+ buffer.setBooleanProperty(Buffer.GZIPPED, false);
+ }
+
+ if(buffer.getBooleanProperty(Buffer.GZIPPED))
+ out = new GZIPOutputStream(out);
+
+ write(buffer,out);
+ }
+ finally
+ {
+ buffer.readUnlock();
+ }
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+
+ if(twoStageSave)
+ {
+ makeBackup();
+ if(!vfs._rename(session,savePath,path,view))
+ throw new IOException("Rename failed: " + savePath);
+ }
+
+ if(!twoStageSave)
+ VFSManager.sendVFSUpdate(vfs,path,true);
+ }
+ catch(UnsupportedCharsetException e)
+ {
+ Log.log(Log.ERROR, this, e, e);
+ String[] pp = { e.getCharsetName() };
+ VFSManager.error(view,path,"ioerror.unsupported-encoding-error",pp);
+
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ String[] pp = { e.toString() };
+ VFSManager.error(view,path,"ioerror.write-error",pp);
+
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ catch(WorkThread.Abort a)
+ {
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ finally
+ {
+ try
+ {
+ vfs._saveComplete(session,buffer,path,view);
+ if( twoStageSave )
+ {
+ vfs._finishTwoStageSave(session,buffer,path,view);
+ }
+ // clean up left-over markers file
+ if(!jEdit.getBooleanProperty("persistentMarkers"))
+ vfs._delete(session,Buffer.getMarkersPath(vfs, path),view);
+ vfs._endVFSSession(session,view);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ String[] pp = { e.toString() };
+ VFSManager.error(view,path,"ioerror.write-error",pp);
+
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ catch(WorkThread.Abort a)
+ {
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ makeBackup() method
+ /**
+ * Make the backup.
+ */
+ private void makeBackup() throws IOException
+ {
+ // Only backup once per session
+ if(buffer.getProperty(Buffer.BACKED_UP) == null
+ || jEdit.getBooleanProperty("backupEverySave"))
+ {
+ if (jEdit.getIntegerProperty("backups",1) > 0)
+ vfs._backup(session,path,view);
+ buffer.setBooleanProperty(Buffer.BACKED_UP, true);
+ }
+ } //}}}
+
+ //{{{ wantTwoStageSave() method
+ private static boolean wantTwoStageSave(Buffer buffer)
+ {
+ return !buffer.getBooleanProperty("forbidTwoStageSave") &&
+ (buffer.getBooleanProperty("overwriteReadonly") ||
+ jEdit.getBooleanProperty("twoStageSave"));
+ }//}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/bufferio/MarkersSaveRequest.java b/jEdit/org/gjt/sp/jedit/bufferio/MarkersSaveRequest.java
index c22e04a..3a76551 100644
--- a/jEdit/org/gjt/sp/jedit/bufferio/MarkersSaveRequest.java
+++ b/jEdit/org/gjt/sp/jedit/bufferio/MarkersSaveRequest.java
@@ -1,146 +1,146 @@
-/* {{{ MarkersSaveRequest.java - I/O request
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * based on jEdit.buffer.BufferSaveRequest (Copyright (C) 2000, 2005 Slava Pestov)
- * Copyright (C) 2005 Martin Raspe
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * }}} */
-
-package org.gjt.sp.jedit.bufferio;
-
-//{{{ Imports
-import java.io.*;
-import java.util.List;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * A save request for markers. Factored out from BufferSaveRequest.java
- *
- * @author Martin Raspe
- * created May 20, 2005
- * modified $Date: 2006/03/10 12:49:17 $ by $Author: hertzhaft $
- */
-
-public class MarkersSaveRequest extends WorkRequest
-{
- //{{{ Constants
- public static final String ERROR_OCCURRED = "MarkersSaveRequest__error";
- //}}}
-
- //{{{ MarkersSaveRequest constructor
- /**
- * Creates a new I/O request for markers.
- * @param view The view
- * @param buffer The buffer
- * @param session The VFS session
- * @param vfs The VFS
- * @param path The path
- */
- public MarkersSaveRequest(View view, Buffer buffer,
- Object session, VFS vfs, String path)
- {
- this.view = view;
- this.buffer = buffer;
- this.session = session;
- this.vfs = vfs;
- this.path = path;
- this.markersPath = Buffer.getMarkersPath(vfs, path);
-
- } //}}}
-
- //{{{ run() method
- public void run()
- {
- OutputStream out = null;
-
- try
- {
- // the entire save operation can be aborted...
- setAbortable(true);
- try
- {
- // We only save markers to VFS's that support deletion.
- // Otherwise, we will accumilate stale marks files.
- if((vfs.getCapabilities() & VFS.DELETE_CAP) != 0)
- {
- if(buffer.getMarkers().isEmpty())
- vfs._delete(session,markersPath,view);
- else
- {
- String[] args = { vfs.getFileName(path) };
- setStatus(jEdit.getProperty("vfs.status.save-markers",args));
- setValue(0);
- out = vfs._createOutputStream(session,markersPath,view);
- if(out != null)
- writeMarkers(out);
- }
- }
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- }
- catch(WorkThread.Abort a)
- {
- IOUtilities.closeQuietly(out);
- buffer.setBooleanProperty(ERROR_OCCURRED,true);
- }
- } //}}}
-
- //{{{ writeMarkers() method
- private void writeMarkers(OutputStream out)
- throws IOException
- {
- Writer o = new BufferedWriter(new OutputStreamWriter(out));
- try
- {
- List<Marker> markers = buffer.getMarkers();
- for(int i = 0; i < markers.size(); i++)
- {
- Marker marker = markers.get(i);
- o.write('!');
- o.write(marker.getShortcut());
- o.write(';');
-
- String pos = String.valueOf(marker.getPosition());
- o.write(pos);
- o.write(';');
- o.write(pos);
- o.write('\n');
- }
- }
- finally
- {
- o.close();
- }
- } //}}}
-
- //{{{ Instance variables
- protected View view;
- protected Buffer buffer;
- protected Object session;
- protected VFS vfs;
- protected String path;
- protected String markersPath;
- //}}}
-
-}
+/* {{{ MarkersSaveRequest.java - I/O request
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * based on jEdit.buffer.BufferSaveRequest (Copyright (C) 2000, 2005 Slava Pestov)
+ * Copyright (C) 2005 Martin Raspe
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * }}} */
+
+package org.gjt.sp.jedit.bufferio;
+
+//{{{ Imports
+import java.io.*;
+import java.util.List;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * A save request for markers. Factored out from BufferSaveRequest.java
+ *
+ * @author Martin Raspe
+ * created May 20, 2005
+ * modified $Date: 2006/03/10 12:49:17 $ by $Author: hertzhaft $
+ */
+public class MarkersSaveRequest extends Task
+{
+ //{{{ Constants
+ public static final String ERROR_OCCURRED = "MarkersSaveRequest__error";
+ //}}}
+
+ //{{{ MarkersSaveRequest constructor
+ /**
+ * Creates a new I/O request for markers.
+ * @param view The view
+ * @param buffer The buffer
+ * @param session The VFS session
+ * @param vfs The VFS
+ * @param path The path
+ */
+ public MarkersSaveRequest(View view, Buffer buffer,
+ Object session, VFS vfs, String path)
+ {
+ this.view = view;
+ this.buffer = buffer;
+ this.session = session;
+ this.vfs = vfs;
+ this.path = path;
+ this.markersPath = Buffer.getMarkersPath(vfs, path);
+
+ } //}}}
+
+ //{{{ run() method
+ @Override
+ public void _run()
+ {
+ OutputStream out = null;
+
+ try
+ {
+ // the entire save operation can be aborted...
+// setAbortable(true);
+ // We only save markers to VFS's that support deletion.
+ // Otherwise, we will accumilate stale marks files.
+ if((vfs.getCapabilities() & VFS.DELETE_CAP) != 0)
+ {
+ if(buffer.getMarkers().isEmpty())
+ vfs._delete(session,markersPath,view);
+ else
+ {
+ String[] args = { vfs.getFileName(path) };
+ setStatus(jEdit.getProperty("vfs.status.save-markers",args));
+ out = vfs._createOutputStream(session,markersPath,view);
+ if(out != null)
+ writeMarkers(out);
+ }
+ }
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+ buffer.setBooleanProperty(ERROR_OCCURRED,true);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ } //}}}
+
+ //{{{ writeMarkers() method
+ private void writeMarkers(OutputStream out)
+ throws IOException
+ {
+ Writer o = new BufferedWriter(new OutputStreamWriter(out));
+ try
+ {
+ List<Marker> markers = buffer.getMarkers();
+ synchronized (markers)
+ {
+ setMaximum(markers.size());
+ for(int i = 0; i < markers.size(); i++)
+ {
+ setValue(i+1);
+ Marker marker = markers.get(i);
+ o.write('!');
+ o.write(marker.getShortcut());
+ o.write(';');
+
+ String pos = String.valueOf(marker.getPosition());
+ o.write(pos);
+ o.write(';');
+ o.write(pos);
+ o.write('\n');
+ }
+ }
+ }
+ finally
+ {
+ o.close();
+ }
+ } //}}}
+
+ //{{{ Instance variables
+ protected View view;
+ protected Buffer buffer;
+ protected Object session;
+ protected VFS vfs;
+ protected String path;
+ protected String markersPath;
+ //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/bufferset/BufferSet.java b/jEdit/org/gjt/sp/jedit/bufferset/BufferSet.java
index 14fe562..762b215 100644
--- a/jEdit/org/gjt/sp/jedit/bufferset/BufferSet.java
+++ b/jEdit/org/gjt/sp/jedit/bufferset/BufferSet.java
@@ -3,7 +3,7 @@
* :tabSize=8:indentSize=8:noTabs=false:
* :folding=explicit:collapseFolds=1:
*
- * Copyright (C) 2008 Matthieu Casanova
+ * Copyright (C) 2008, 2010 Matthieu Casanova
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -42,31 +42,15 @@ import java.util.Comparator;
*/
public class BufferSet
{
- //{{{ Scope enum
- public enum Scope
- {
- global, view, editpane;
-
- public static Scope fromString(String s)
- {
- Scope[] scopes = values();
- for (Scope scope: scopes)
- {
- if (scope.toString().equals(s))
- return scope;
- }
-
- return global;
- }
- } //}}}
+ public enum Scope { editpane, view, global }
//{{{ BufferSet constructor
- /**
- * Create a new BufferSet.
- */
- public BufferSet()
+ public BufferSet(BufferSet source)
{
- buffers = Collections.synchronizedList(new ArrayList<Buffer>());
+ if (source == null)
+ buffers = Collections.synchronizedList(new ArrayList<Buffer>());
+ else
+ buffers = Collections.synchronizedList(new ArrayList<Buffer>(source.buffers));
listeners = new EventListenerList();
if (jEdit.getBooleanProperty("sortBuffers"))
@@ -76,9 +60,30 @@ public class BufferSet
else
sorter = pathSorter;
}
+ }//}}}
+
+ //{{{ addBuffer() method
+ /**
+ * Internal use only, use
+ * {@link org.gjt.sp.jedit.bufferset.BufferSetManager#addBuffer(org.gjt.sp.jedit.View, org.gjt.sp.jedit.Buffer)}
+ * or
+ * {@link org.gjt.sp.jedit.bufferset.BufferSetManager#addBuffer(org.gjt.sp.jedit.EditPane, org.gjt.sp.jedit.Buffer)}
+ * @param buffer the buffer to be added
+ */
+ public void addBuffer(Buffer buffer)
+ {
+ addBufferAt(buffer, -1);
} //}}}
//{{{ addBufferAt() method
+ /**
+ * Internal use only, use
+ * {@link org.gjt.sp.jedit.bufferset.BufferSetManager#addBuffer(org.gjt.sp.jedit.View, org.gjt.sp.jedit.Buffer)}
+ * or
+ * {@link org.gjt.sp.jedit.bufferset.BufferSetManager#addBuffer(org.gjt.sp.jedit.EditPane, org.gjt.sp.jedit.Buffer)}
+ * @param buffer the buffer to be added
+ * @param position the position where it must be added or -1 if we don't care
+ */
public void addBufferAt(Buffer buffer, int position)
{
Log.log(Log.DEBUG, this, hashCode() + " addBufferAt("+buffer+','+position+')');
@@ -198,7 +203,6 @@ public class BufferSet
}
}
-
/**
* Returns an array of all buffers in this bufferSet.
*
@@ -231,27 +235,6 @@ public class BufferSet
{
Log.log(Log.DEBUG, this, hashCode() + ": removeBufferSetListener " + listener);
listeners.remove(BufferSetListener.class, listener);
- if (!hasListeners())
- {
- // must empty the bufferSet
- Buffer[] buffers = getAllBuffers();
- BufferSetManager bufferSetManager = jEdit.getBufferSetManager();
- for (Buffer buffer : buffers)
- {
- bufferSetManager.removeBuffer(this, buffer);
- }
- }
- } //}}}
-
- //{{{ hasListeners() method
- /**
- * Check if the BufferSet has listeners.
- *
- * @return true if the bufferSet has listeners
- */
- public boolean hasListeners()
- {
- return listeners.getListenerCount() != 0;
} //}}}
//{{{ toString() method
@@ -261,20 +244,34 @@ public class BufferSet
return "BufferSet[nbBuffers="+size()+']';
} //}}}
- //{{{ Package-private members
-
- //{{{ addBuffer() method
- void addBuffer(Buffer buffer)
+ //{{{ sort() method
+ /**
+ * Sort the bufferSet (useful if a buffer has been renamed for example
+ * @since jEdit 4.4pre1
+ */
+ public void sort()
{
- addBufferAt(buffer, -1);
+ if (sorter == null)
+ return;
+ // do the sort
+ Collections.sort(buffers, sorter);
+
+ // notify the listeners so they can repaint themselves
+ BufferSetListener[] listeners = this.listeners.getListeners(BufferSetListener.class);
+ for (BufferSetListener listener : listeners)
+ {
+ listener.bufferSetSorted();
+ }
} //}}}
+ //{{{ Package-private members
+
//{{{ handleMessage
/**
* This method is called by BufferSetManager to signal that this
* BufferSet needs to react to a change in the sorting properties.
*/
- void handleMessage()
+ void propertiesChanged()
{
if (jEdit.getBooleanProperty("sortBuffers"))
{
@@ -284,15 +281,7 @@ public class BufferSet
else
sorter = pathSorter;
- // do the sort
- Collections.sort(buffers, sorter);
-
- // notify the listeners so they can repaint themselves
- BufferSetListener[] listeners = this.listeners.getListeners(BufferSetListener.class);
- for (BufferSetListener listener : listeners)
- {
- listener.bufferSetSorted();
- }
+ sort();
}
else
{
@@ -352,8 +341,7 @@ public class BufferSet
//{{{ Private members
private final List<Buffer> buffers;
- private EventListenerList listeners;
-
+ private final EventListenerList listeners;
private static final Comparator<Buffer> nameSorter = new NameSorter();
private static final Comparator<Buffer> pathSorter = new PathSorter();
private Comparator<Buffer> sorter;
diff --git a/jEdit/org/gjt/sp/jedit/bufferset/BufferSetManager.java b/jEdit/org/gjt/sp/jedit/bufferset/BufferSetManager.java
index 2e92ffb..a8f0762 100644
--- a/jEdit/org/gjt/sp/jedit/bufferset/BufferSetManager.java
+++ b/jEdit/org/gjt/sp/jedit/bufferset/BufferSetManager.java
@@ -3,7 +3,7 @@
* :tabSize=8:indentSize=8:noTabs=false:
* :folding=explicit:collapseFolds=1:
*
- * Copyright (C) 2008 Matthieu Casanova
+ * Copyright (C) 2008, 2010 Matthieu Casanova
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -23,11 +23,11 @@ package org.gjt.sp.jedit.bufferset;
//{{{ Imports
import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.msg.ViewUpdate;
import org.gjt.sp.jedit.msg.EditPaneUpdate;
import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.jedit.visitors.JEditVisitorAdapter;
import org.gjt.sp.util.Log;
-
+import org.gjt.sp.jedit.EditBus.EBHandler;
import java.util.*;
//}}}
@@ -38,100 +38,53 @@ import java.util.*;
* @author Matthieu Casanova
* @since jEdit 4.3pre15
*/
-public class BufferSetManager implements EBComponent
+public class BufferSetManager
{
- //{{{ NewBufferSetAction enum
- public enum NewBufferSetAction
+ //{{{ BufferSetManager constructor
+ public BufferSetManager()
{
- empty, copy, currentbuffer;
-
- public static NewBufferSetAction fromString(String s)
- {
- NewBufferSetAction[] newBufferSetActions = values();
- for (NewBufferSetAction newBufferSetAction : newBufferSetActions)
- {
- if (newBufferSetAction.getName().equals(s))
- return newBufferSetAction;
- }
-
- return currentbuffer;
- }
-
- public String getName()
+ EditBus.addToBus(this);
+ try
{
- return super.toString();
+ scope = BufferSet.Scope.valueOf(jEdit.getProperty("bufferset.scope", "global"));
}
-
- @Override
- public String toString()
+ catch (IllegalArgumentException e)
{
- return jEdit.getProperty("options.editpane.bufferset.newbufferset." + getName());
+ Log.log(Log.ERROR, this, e);
+ scope = BufferSet.Scope.global;
}
} //}}}
- //{{{ BufferSetManager constructor
- public BufferSetManager()
- {
- EditBus.addToBus(this);
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage message)
+ //{{{ handleEditPaneUpdate() method
+ @EBHandler
+ public void handleEditPaneUpdate(EditPaneUpdate message)
{
- if (message instanceof ViewUpdate)
- {
- ViewUpdate viewUpdate = (ViewUpdate) message;
- if (viewUpdate.getWhat() == ViewUpdate.CLOSED)
- {
- View view = viewUpdate.getView();
- // Unlink the buffer from this bufferSet.
- BufferSet viewBufferSet = view.getLocalBufferSet();
- viewBufferSet.getAllBuffers(new BufferSetClosed(viewBufferSet));
- }
- }
- else if (message instanceof EditPaneUpdate)
+ if (message.getWhat() == EditPaneUpdate.DESTROYED)
{
- EditPaneUpdate editPaneUpdate = (EditPaneUpdate) message;
- if (editPaneUpdate.getWhat() == EditPaneUpdate.DESTROYED)
+ EditPane editPane = message.getEditPane();
+ BufferSet bufferSet = editPane.getBufferSet();
+ Buffer[] allBuffers = bufferSet.getAllBuffers();
+ for (Buffer buffer : allBuffers)
{
- EditPane editPane = editPaneUpdate.getEditPane();
- // If the editPane has own BufferSet, unlink the buffer from this bufferSet.
- if (editPane.getBufferSetScope() == BufferSet.Scope.editpane)
- {
- BufferSet editPaneBufferSet = editPane.getBufferSet();
- editPaneBufferSet.getAllBuffers(new BufferSetClosed(editPaneBufferSet));
- }
+ _removeBuffer(bufferSet, buffer);
}
}
- else if (message instanceof PropertiesChanged)
- {
- // pass on PropertiesChanged message to BufferSets so
- // they can resort themselves as needed.
- visit(new BufferSetVisitor()
- {
- public void visit(BufferSet bufferSet)
- {
- bufferSet.handleMessage();
- }
- });
- }
-
} //}}}
- //{{{ mergeBufferSet() method
- /**
- * Merge the content of the source bufferSet into the target bufferSet
- * @param target the target bufferSet
- * @param source the source bufferSet
- * @see org.gjt.sp.jedit.EditPane#setBuffer(org.gjt.sp.jedit.Buffer)
- */
- public void mergeBufferSet(BufferSet target, BufferSet source)
+ //{{{ handlePropertiesChanged() method
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
{
- Buffer[] buffers = source.getAllBuffers();
- for (Buffer buffer : buffers)
+ // pass on PropertiesChanged message to BufferSets so
+ // they can resort themselves as needed.
+ jEdit.visit(new JEditVisitorAdapter()
{
- addBuffer(target, buffer);
- }
+ @Override
+ public void visit(EditPane editPane)
+ {
+ editPane.getBufferSet().propertiesChanged();
+ }
+ });
} //}}}
//{{{ countBufferSets() method
@@ -146,6 +99,75 @@ public class BufferSetManager implements EBComponent
return getOwners(buffer).size();
} //}}}
+ //{{{ setScope() method
+ public void setScope(BufferSet.Scope scope)
+ {
+ if (scope == this.scope)
+ return;
+ jEdit.setProperty("bufferset.scope", scope.name());
+ if (scope.compareTo(this.scope) > 0)
+ {
+ // The new scope is wider
+ if (scope == BufferSet.Scope.global)
+ {
+ final Buffer[] buffers = jEdit.getBuffers();
+ jEdit.visit(new JEditVisitorAdapter()
+ {
+ @Override
+ public void visit(EditPane editPane)
+ {
+ BufferSet bufferSet = editPane.getBufferSet();
+ for (Buffer buffer : buffers)
+ {
+ bufferSet.addBuffer(buffer);
+ }
+ }
+ });
+ }
+ else
+ {
+ final Map<View,Set<Buffer>> buffersMap = new HashMap<View, Set<Buffer>>();
+ jEdit.visit(new JEditVisitorAdapter()
+ {
+ @Override
+ public void visit(EditPane editPane)
+ {
+ BufferSet bufferSet = editPane.getBufferSet();
+ Buffer[] buffers = bufferSet.getAllBuffers();
+ Set<Buffer> set = buffersMap.get(editPane.getView());
+ if (set == null)
+ {
+ set = new HashSet<Buffer>();
+ buffersMap.put(editPane.getView(), set);
+ }
+ set.addAll(Arrays.asList(buffers));
+ }
+ });
+ jEdit.visit(new JEditVisitorAdapter()
+ {
+ @Override
+ public void visit(EditPane editPane)
+ {
+ BufferSet bufferSet = editPane.getBufferSet();
+ Set<Buffer> set = buffersMap.get(editPane.getView());
+ for (Buffer buffer : set)
+ {
+ bufferSet.addBuffer(buffer);
+ }
+ }
+ });
+ }
+ }
+ this.scope = scope;
+ EditBus.send(new PropertiesChanged(this));
+ } //}}}
+
+ //{{{ getScope() method
+ public BufferSet.Scope getScope()
+ {
+ return scope;
+ } //}}}
+
//{{{ addBuffer() methods
/**
* Add a buffer into the current editPane of the given view.
@@ -165,43 +187,38 @@ public class BufferSetManager implements EBComponent
* @param editPane an EditPane (or null)
* @param buffer the buffer to add
*/
- public void addBuffer(EditPane editPane, Buffer buffer)
+ public void addBuffer(EditPane editPane, final Buffer buffer)
{
if (editPane == null)
{
- addBuffer(jEdit.getGlobalBufferSet(), buffer);
+ editPane = jEdit.getActiveView().getEditPane();
}
- else
- {
- BufferSet bufferSet = editPane.getBufferSet();
- addBuffer(bufferSet, buffer);
- }
- }
-
- /**
- * Add a buffer in the given bufferSet.
- *
- * @param bufferSet the bufferSet
- * @param buffer the buffer to add
- */
- public void addBuffer(BufferSet bufferSet, Buffer buffer)
- {
- bufferSet.addBuffer(buffer);
- } //}}}
-
- //{{{ addAllBuffers() method
- /**
- * Add all buffers to the bufferSet.
- *
- * @param bufferSet the bufferSet
- */
- public void addAllBuffers(BufferSet bufferSet)
- {
- Buffer[] buffers = jEdit.getBuffers();
- for (Buffer buffer : buffers)
+ BufferSet bufferSet = editPane.getBufferSet();
+ switch (scope)
{
- if (!buffer.isClosed())
- addBuffer(bufferSet, buffer);
+ case editpane:
+ bufferSet.addBuffer(buffer);
+ break;
+ case view:
+ EditPane[] editPanes = editPane.getView().getEditPanes();
+ for (EditPane pane:editPanes)
+ {
+ if (pane == null)
+ continue;
+ BufferSet bfs = pane.getBufferSet();
+ bfs.addBuffer(buffer);
+ }
+ break;
+ case global:
+ jEdit.visit(new JEditVisitorAdapter()
+ {
+ @Override
+ public void visit(EditPane editPane)
+ {
+ BufferSet bfs = editPane.getBufferSet();
+ bfs.addBuffer(buffer);
+ }
+ });
}
} //}}}
@@ -225,12 +242,28 @@ public class BufferSetManager implements EBComponent
*/
public void removeBuffer(EditPane editPane, Buffer buffer)
{
- BufferSet bufferSet = editPane.getBufferSet();
- removeBuffer(bufferSet, buffer);
+ switch (scope)
+ {
+ case editpane:
+ BufferSet bufferSet = editPane.getBufferSet();
+ removeBuffer(bufferSet, buffer);
+ break;
+ case view:
+ EditPane[] editPanes = editPane.getView().getEditPanes();
+ for (EditPane pane : editPanes)
+ {
+ removeBuffer(pane.getBufferSet(), buffer);
+ }
+ break;
+ case global:
+ jEdit._closeBuffer(null, buffer);
+ break;
+ }
}
/**
- * Remove a buffer from a View's BufferSet.
+ * Remove a buffer from a bufferSet.
+ * And make sure that the bufferSet is not empty after that
*
* @param bufferSet the bufferSet
* @param buffer the buffer that will be removed
@@ -238,26 +271,10 @@ public class BufferSetManager implements EBComponent
void removeBuffer(BufferSet bufferSet, Buffer buffer)
{
Log.log(Log.DEBUG, this, "removeBuffer("+bufferSet+','+buffer+')');
- Set<BufferSet> owners = getOwners(buffer);
- owners.remove(bufferSet);
- bufferSet.removeBuffer(buffer);
-
- if (owners.isEmpty())
- {
- Log.log(Log.DEBUG, this, "Buffer:"+buffer+" is in no bufferSet anymore, closing it");
- jEdit._closeBuffer(null, buffer);
- }
- if (bufferSet.size() == 0 && bufferSet.hasListeners())
- {
- int untitledCount = jEdit.getNextUntitledBufferId();
- Buffer newEmptyBuffer = jEdit.openTemporary(jEdit.getActiveView(), null,
- "Untitled-" + untitledCount,true, null);
- jEdit.commitTemporary(newEmptyBuffer);
- jEdit.getBufferSetManager().addBuffer(bufferSet, newEmptyBuffer);
- }
- } //}}}
+ _removeBuffer(bufferSet, buffer);
+ bufferRemoved(bufferSet);
+ }
- //{{{ removeBuffer() method
/**
* remove a buffer from all bufferSets.
*
@@ -268,61 +285,78 @@ public class BufferSetManager implements EBComponent
for (BufferSet bufferSet : getOwners(buffer))
{
bufferSet.removeBuffer(buffer);
- if (bufferSet.size() == 0 && bufferSet.hasListeners())
- {
- int untitledCount = jEdit.getNextUntitledBufferId();
- Buffer newEmptyBuffer = jEdit.openTemporary(jEdit.getActiveView(), null,
- "Untitled-" + untitledCount,true, null);
- jEdit.commitTemporary(newEmptyBuffer);
- jEdit.getBufferSetManager().addBuffer(bufferSet, newEmptyBuffer);
- }
+ bufferRemoved(bufferSet);
}
+ } //}}}
+ //{{{ bufferRemoved() method
+ /**
+ * This method is called when a buffer has been removed from a bufferSet.
+ * If it is empty, an untitled buffer is created and added to the bufferSet
+ * @param bufferSet the bufferSet from which the buffer was removed
+ */
+ private void bufferRemoved(BufferSet bufferSet)
+ {
+ if (bufferSet.size() == 0)
+ {
+ Buffer newEmptyBuffer = createUntitledBuffer();
+ EditPane editPaneOwner = getOwner(bufferSet);
+ addBuffer(editPaneOwner, newEmptyBuffer);
+ }
} //}}}
- //{{{ visit() method
+ //{{{ _removeBuffer() method
/**
- * This method will visit all buffersets.
+ * Remove a buffer from a bufferSet.
+ * Used when closing an EditPane
*
- * @param visitor the bufferset visitor
+ * @param bufferSet the bufferSet
+ * @param buffer the buffer that will be removed
*/
- public void visit(BufferSetVisitor visitor)
+ private void _removeBuffer(BufferSet bufferSet, Buffer buffer)
{
- BufferSet global = jEdit.getGlobalBufferSet();
- visitor.visit(jEdit.getGlobalBufferSet());
- for (View view: jEdit.getViews())
+ Set<BufferSet> owners = getOwners(buffer);
+ owners.remove(bufferSet);
+ bufferSet.removeBuffer(buffer);
+
+ if (owners.isEmpty())
{
- BufferSet viewLocal = view.getLocalBufferSet();
- if (viewLocal != null)
- {
- visitor.visit(viewLocal);
- }
- for (EditPane editPane: view.getEditPanes())
- {
- BufferSet used = editPane.getBufferSet();
- if (used != global && used != viewLocal)
- {
- visitor.visit(used);
- }
- }
+ Log.log(Log.DEBUG, this, "Buffer:"+buffer+" is in no bufferSet anymore, closing it");
+ jEdit._closeBuffer(null, buffer);
}
} //}}}
+ //{{{ createUntitledBuffer() method
+ /**
+ * Create an untitled buffer
+ * @return the new untitled buffer
+ */
+ public static Buffer createUntitledBuffer()
+ {
+ int untitledCount = jEdit.getNextUntitledBufferId();
+ Buffer newEmptyBuffer = jEdit.openTemporary(jEdit.getActiveView(), null,
+ "Untitled-" + untitledCount,true, null);
+ jEdit.commitTemporary(newEmptyBuffer);
+ return newEmptyBuffer;
+ } //}}}
+
//{{{ Private members
//{{{ getOwners() method
/**
- @return set of BufferSets that contain buffer
- */
- private Set<BufferSet> getOwners(Buffer buffer)
+ * @return set of BufferSets that contain buffer
+ * @since 4.4pre1
+ */
+ public Set<BufferSet> getOwners(Buffer buffer)
{
final Set<BufferSet> candidates = new HashSet<BufferSet>();
// Collect all BufferSets.
- visit(new BufferSetVisitor()
+ jEdit.visit(new JEditVisitorAdapter()
{
- public void visit(BufferSet bufferSet)
+ @Override
+ public void visit(EditPane editPane)
{
- candidates.add(bufferSet);
+ candidates.add(editPane.getBufferSet());
}
});
// Remove all that doesn't contain the buffer.
@@ -338,39 +372,30 @@ public class BufferSetManager implements EBComponent
return candidates;
} //}}}
- //{{{ BufferSetVisitor interface
- public static interface BufferSetVisitor
- {
- void visit(BufferSet bufferSet);
- } //}}}
-
- //{{{ BufferSetClosed class
- private class BufferSetClosed extends BufferSetAdapter
+ //{{{ getOwner() method
+ /**
+ * Return the editpane that owns the BufferSet
+ * @param bufferSet the bufferSet
+ * @return the owner of the given bufferSet
+ */
+ private static EditPane getOwner(BufferSet bufferSet)
{
- /** The closed bufferSet. */
- private final BufferSet closedBufferSet;
-
- //{{{ BufferSetClosed constructors
- private BufferSetClosed(BufferSet closedBufferSet)
- {
- this.closedBufferSet = closedBufferSet;
- } //}}}
-
- //{{{ bufferAdded() method
- @Override
- public void bufferAdded(Buffer buffer, int index)
+ View[] views = jEdit.getViews();
+ for (View view : views)
{
- Set<BufferSet> owners = getOwners(buffer);
- owners.remove(closedBufferSet);
- if (owners.isEmpty())
+ EditPane[] editPanes = view.getEditPanes();
+ for (EditPane editPane : editPanes)
{
- Log.log(Log.MESSAGE, this, "The buffer " +
- buffer + " was removed from a BufferSet, closing it");
- jEdit._closeBuffer(null, buffer);
+ if (editPane.getBufferSet() == bufferSet)
+ {
+ return editPane;
+ }
}
- } //}}}
-
+ }
+ return null;
} //}}}
+ /** The scope of the bufferSets. */
+ private BufferSet.Scope scope;
//}}}
}
diff --git a/jEdit/org/gjt/sp/jedit/catalog.dtd b/jEdit/org/gjt/sp/jedit/catalog.dtd
index 2d4a7e6..0f04885 100644
--- a/jEdit/org/gjt/sp/jedit/catalog.dtd
+++ b/jEdit/org/gjt/sp/jedit/catalog.dtd
@@ -1,10 +1,10 @@
-<!-- MODES element -->
-<!ELEMENT MODES ( MODE* ) >
-
-<!-- MODE element -->
-<!ELEMENT MODE EMPTY >
-<!ATTLIST MODE
- NAME CDATA #REQUIRED
- FILE CDATA #REQUIRED
- FILE_NAME_GLOB CDATA #IMPLIED
- FIRST_LINE_GLOB CDATA #IMPLIED >
+<!-- MODES element -->
+<!ELEMENT MODES ( MODE* ) >
+
+<!-- MODE element -->
+<!ELEMENT MODE EMPTY >
+<!ATTLIST MODE
+ NAME CDATA #REQUIRED
+ FILE CDATA #REQUIRED
+ FILE_NAME_GLOB CDATA #IMPLIED
+ FIRST_LINE_GLOB CDATA #IMPLIED >
diff --git a/jEdit/org/gjt/sp/jedit/datatransfer/JEditDataFlavor.java b/jEdit/org/gjt/sp/jedit/datatransfer/JEditDataFlavor.java
new file mode 100644
index 0000000..e1a28ff
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/datatransfer/JEditDataFlavor.java
@@ -0,0 +1,35 @@
+/*
+ * JEditDataFlavor.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.datatransfer;
+
+import java.awt.datatransfer.DataFlavor;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4.x
+ */
+public class JEditDataFlavor
+{
+ public static final DataFlavor jEditRichTextDataFlavor = new DataFlavor(JEditRichText.class, DataFlavor.javaJVMLocalObjectMimeType);
+ public static final DataFlavor html = new DataFlavor("text/html; class=java.lang.String", "text/html");
+}
diff --git a/jEdit/org/gjt/sp/jedit/datatransfer/JEditRichText.java b/jEdit/org/gjt/sp/jedit/datatransfer/JEditRichText.java
new file mode 100644
index 0000000..739c839
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/datatransfer/JEditRichText.java
@@ -0,0 +1,58 @@
+/*
+ * JEditRichText.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.datatransfer;
+
+import org.gjt.sp.jedit.Mode;
+import org.gjt.sp.jedit.syntax.ModeProvider;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4.x
+ */
+public class JEditRichText
+{
+ private final String text;
+
+ private final String mode;
+
+ public JEditRichText(String text, String mode)
+ {
+ this.text = text;
+ this.mode = mode;
+ }
+
+ public String getText()
+ {
+ return text;
+ }
+
+ public Mode getMode()
+ {
+ return ModeProvider.instance.getMode(mode);
+ }
+
+ @Override
+ public String toString()
+ {
+ return text;
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/datatransfer/JEditTransferable.java b/jEdit/org/gjt/sp/jedit/datatransfer/JEditTransferable.java
new file mode 100644
index 0000000..1420d1a
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/datatransfer/JEditTransferable.java
@@ -0,0 +1,61 @@
+/*
+ * JEditTransferable.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.datatransfer;
+
+import java.awt.datatransfer.*;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4.x
+ */
+public class JEditTransferable implements Transferable
+{
+ private final DataFlavor[] dataFlavors;
+
+ private final Map<DataFlavor, Transferable> flavors;
+
+ public JEditTransferable(Map<DataFlavor, Transferable> flavors)
+ {
+ this.flavors = flavors;
+ dataFlavors = flavors.keySet().toArray(new DataFlavor[flavors.size()]);
+ }
+
+ public DataFlavor[] getTransferDataFlavors()
+ {
+ return dataFlavors;
+ }
+
+ public boolean isDataFlavorSupported(DataFlavor flavor)
+ {
+ return flavors.containsKey(flavor);
+ }
+
+ public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
+ {
+ if (!isDataFlavorSupported(flavor))
+ throw new UnsupportedFlavorException(flavor);
+ Transferable transferable = flavors.get(flavor);
+ return transferable.getTransferData(flavor);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/datatransfer/JEditTransferableService.java b/jEdit/org/gjt/sp/jedit/datatransfer/JEditTransferableService.java
new file mode 100644
index 0000000..253ac22
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/datatransfer/JEditTransferableService.java
@@ -0,0 +1,36 @@
+/*
+ * JEditTransferableService.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.datatransfer;
+
+import org.gjt.sp.jedit.textarea.TextArea;
+
+import java.awt.datatransfer.Transferable;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4.x
+ */
+public interface JEditTransferableService
+{
+ boolean accept(TextArea textArea, String text);
+ Transferable getTransferable(TextArea textArea, String text);
+}
diff --git a/jEdit/org/gjt/sp/jedit/datatransfer/ListVFSFileTransferable.java b/jEdit/org/gjt/sp/jedit/datatransfer/ListVFSFileTransferable.java
new file mode 100644
index 0000000..8b31c95
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/datatransfer/ListVFSFileTransferable.java
@@ -0,0 +1,93 @@
+/*
+ * ListVFSFileTransferable.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.datatransfer;
+
+import org.gjt.sp.jedit.io.FileVFS;
+import org.gjt.sp.jedit.io.VFSFile;
+
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4.x
+ */
+public class ListVFSFileTransferable implements Transferable
+{
+ public static final DataFlavor jEditFileList = new DataFlavor(List.class, "application/x-java-jEdit-list-vfsfile");
+ public static final DataFlavor[] supported = {jEditFileList, DataFlavor.stringFlavor, DataFlavor.javaFileListFlavor};
+
+ private final List<VFSFile> files;
+
+ public ListVFSFileTransferable(VFSFile[] files)
+ {
+ this.files = Collections.unmodifiableList(Arrays.asList(files));
+ }
+
+ public DataFlavor[] getTransferDataFlavors()
+ {
+ return supported;
+ }
+
+ public boolean isDataFlavorSupported(DataFlavor flavor)
+ {
+ return jEditFileList.equals(flavor) || DataFlavor.stringFlavor.equals(flavor);
+ }
+
+ public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
+ {
+ if (jEditFileList.equals(flavor))
+ {
+ return files;
+ }
+ else if (DataFlavor.stringFlavor.equals(flavor))
+ {
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < files.size(); i++)
+ {
+ VFSFile vfsFile = files.get(i);
+ if (i != 0)
+ builder.append('\n');
+ builder.append(vfsFile);
+ }
+ return builder.toString();
+ }
+ else if (DataFlavor.javaFileListFlavor.equals(flavor))
+ {
+ List<File> files = new ArrayList<File>(this.files.size());
+ for (VFSFile file : this.files)
+ {
+ if (file.getVFS() instanceof FileVFS)
+ files.add(new File(file.getPath()));
+ }
+ return files;
+ }
+ throw new UnsupportedFlavorException(flavor);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/datatransfer/RichJEditTextTransferableService.java b/jEdit/org/gjt/sp/jedit/datatransfer/RichJEditTextTransferableService.java
new file mode 100644
index 0000000..e1f8faa
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/datatransfer/RichJEditTextTransferableService.java
@@ -0,0 +1,43 @@
+/*
+ * RichJEditTextTransferableService.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.datatransfer;
+
+import org.gjt.sp.jedit.textarea.TextArea;
+
+import java.awt.datatransfer.Transferable;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4.x
+ */
+public class RichJEditTextTransferableService implements JEditTransferableService
+{
+ public boolean accept(TextArea textArea, String text)
+ {
+ return textArea != null;
+ }
+
+ public Transferable getTransferable(TextArea textArea, String text)
+ {
+ return new RichTextTransferable(text, textArea.getBuffer().getMode().getName());
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/datatransfer/RichTextTransferable.java b/jEdit/org/gjt/sp/jedit/datatransfer/RichTextTransferable.java
new file mode 100644
index 0000000..a42682f
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/datatransfer/RichTextTransferable.java
@@ -0,0 +1,62 @@
+/*
+ * RichTextTransferable.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.datatransfer;
+
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4.x
+ */
+public class RichTextTransferable implements Transferable
+{
+ private static final DataFlavor[] supportedDataFlavor = {JEditDataFlavor.jEditRichTextDataFlavor};
+
+ private final String text;
+ private final String mode;
+
+ public RichTextTransferable(String text, String mode)
+ {
+ this.text = text;
+ this.mode = mode;
+ }
+
+ public DataFlavor[] getTransferDataFlavors()
+ {
+ return supportedDataFlavor;
+ }
+
+ public boolean isDataFlavorSupported(DataFlavor flavor)
+ {
+ return JEditDataFlavor.jEditRichTextDataFlavor.equals(flavor);
+ }
+
+ public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
+ {
+ if (!isDataFlavorSupported(flavor))
+ throw new UnsupportedFlavorException(flavor);
+ return new JEditRichText(text, mode);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/datatransfer/StringTransferableService.java b/jEdit/org/gjt/sp/jedit/datatransfer/StringTransferableService.java
new file mode 100644
index 0000000..1afd57d
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/datatransfer/StringTransferableService.java
@@ -0,0 +1,43 @@
+/*
+ * StringTransferableService.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.datatransfer;
+
+import org.gjt.sp.jedit.textarea.TextArea;
+
+import java.awt.datatransfer.*;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4.x
+ */
+public class StringTransferableService implements JEditTransferableService
+{
+ public boolean accept(TextArea textArea, String text)
+ {
+ return true;
+ }
+
+ public Transferable getTransferable(TextArea textArea, String text)
+ {
+ return new StringSelection(text);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/datatransfer/TransferHandler.java b/jEdit/org/gjt/sp/jedit/datatransfer/TransferHandler.java
new file mode 100644
index 0000000..aab81b0
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/datatransfer/TransferHandler.java
@@ -0,0 +1,78 @@
+/*
+ * TransferHandler.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.datatransfer;
+
+import org.gjt.sp.jedit.textarea.TextArea;
+
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4.x
+ */
+public class TransferHandler
+{
+ private static final TransferHandler instance = new TransferHandler();
+
+ private final List<JEditTransferableService> services;
+
+ private TransferHandler()
+ {
+ services = new ArrayList<JEditTransferableService>();
+ }
+
+ public static TransferHandler getInstance()
+ {
+ return instance;
+ }
+
+ public void registerTransferableService(JEditTransferableService transferableService)
+ {
+ if (!services.contains(transferableService))
+ services.add(transferableService);
+ }
+
+ public Transferable getTransferable(TextArea textArea, String text)
+ {
+ Map<DataFlavor, Transferable> flavors = new HashMap<DataFlavor, Transferable>();
+ for (JEditTransferableService service : services)
+ {
+ if (service.accept(textArea, text))
+ {
+ Transferable t = service.getTransferable(textArea, text);
+ DataFlavor[] supportedDataFlavor = t.getTransferDataFlavors();
+ for (DataFlavor dataFlavor : supportedDataFlavor)
+ {
+ flavors.put(dataFlavor, t);
+ }
+ }
+ }
+ Transferable transferable = new JEditTransferable(flavors);
+
+ return transferable;
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/dockables.dtd b/jEdit/org/gjt/sp/jedit/dockables.dtd
index d77a059..17b2a27 100644
--- a/jEdit/org/gjt/sp/jedit/dockables.dtd
+++ b/jEdit/org/gjt/sp/jedit/dockables.dtd
@@ -1,11 +1,11 @@
-<!ENTITY % att-bool '( TRUE | FALSE )' >
-
-<!-- DOCKABLES element -->
-<!ELEMENT DOCKABLES ( DOCKABLE+ ) >
-
-<!-- DOCKABLE element -->
-<!ELEMENT DOCKABLE ( #PCDATA ) >
-<!ATTLIST DOCKABLE
- NAME CDATA #REQUIRED
- NO_ACTIONS %att-bool; "FALSE"
- MOVABLE %att-bool; "FALSE" >
+<!ENTITY % att-bool '( TRUE | FALSE )' >
+
+<!-- DOCKABLES element -->
+<!ELEMENT DOCKABLES ( DOCKABLE+ ) >
+
+<!-- DOCKABLE element -->
+<!ELEMENT DOCKABLE ( #PCDATA ) >
+<!ATTLIST DOCKABLE
+ NAME CDATA #REQUIRED
+ NO_ACTIONS %att-bool; "FALSE"
+ MOVABLE %att-bool; "FALSE" >
diff --git a/jEdit/org/gjt/sp/jedit/dockables.xml b/jEdit/org/gjt/sp/jedit/dockables.xml
index ae6d878..c7cb092 100644
--- a/jEdit/org/gjt/sp/jedit/dockables.xml
+++ b/jEdit/org/gjt/sp/jedit/dockables.xml
@@ -1,24 +1,28 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
-
-<DOCKABLES>
- <DOCKABLE NAME="log-viewer" MOVABLE="TRUE">
- new LogViewer();
- </DOCKABLE>
- <DOCKABLE NAME="vfs.browser" MOVABLE="TRUE">
- new VFSBrowser(view,position);
- </DOCKABLE>
- <DOCKABLE NAME="hypersearch-results" MOVABLE="TRUE">
- new HyperSearchResults(view);
- </DOCKABLE>
- <DOCKABLE NAME="view-registers" MOVABLE="TRUE">
- new RegisterViewer(view,position);
- </DOCKABLE>
- <DOCKABLE NAME="view-markers" MOVABLE="TRUE">
- new MarkerViewer(view);
- </DOCKABLE>
- <DOCKABLE NAME="io-progress-monitor" MOVABLE="TRUE">
- new IOProgressMonitor();
- </DOCKABLE>
-</DOCKABLES>
+<?xml version="1.0"?>
+
+<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
+
+<DOCKABLES>
+ <DOCKABLE NAME="log-viewer" MOVABLE="TRUE">
+ new LogViewer();
+ </DOCKABLE>
+ <DOCKABLE NAME="vfs.browser" MOVABLE="TRUE">
+ new VFSBrowser(view,position);
+ </DOCKABLE>
+ <DOCKABLE NAME="hypersearch-results" MOVABLE="TRUE">
+ new HyperSearchResults(view);
+ </DOCKABLE>
+ <DOCKABLE NAME="view-registers" MOVABLE="TRUE">
+ new RegisterViewer(view,position);
+ </DOCKABLE>
+ <DOCKABLE NAME="view-markers" MOVABLE="TRUE">
+ new MarkerViewer(view);
+ </DOCKABLE>
+ <DOCKABLE NAME="io-progress-monitor" MOVABLE="TRUE">
+ new IOProgressMonitor();
+ </DOCKABLE>
+
+ <DOCKABLE NAME="task-monitor" MOVABLE="TRUE">
+ new TaskMonitor();
+ </DOCKABLE>
+</DOCKABLES>
diff --git a/jEdit/org/gjt/sp/jedit/gui/AbbrevEditor.java b/jEdit/org/gjt/sp/jedit/gui/AbbrevEditor.java
index 1d603b2..8eeb40b 100644
--- a/jEdit/org/gjt/sp/jedit/gui/AbbrevEditor.java
+++ b/jEdit/org/gjt/sp/jedit/gui/AbbrevEditor.java
@@ -1,231 +1,231 @@
-/*
- * AbbrevEditor.java - Panel for editing abbreviations
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class AbbrevEditor extends JPanel
-{
- //{{{ AbbrevEditor constructor
- public AbbrevEditor()
- {
- GridBagLayout layout = new GridBagLayout();
- setLayout(layout);
-
- GridBagConstraints cons = new GridBagConstraints();
- cons.anchor = cons.WEST;
- cons.fill = cons.BOTH;
- cons.weightx = 0.0f;
- cons.gridx = 1;
- cons.gridy = 1;
-
- JLabel label = new JLabel(jEdit.getProperty("abbrev-editor.abbrev"),
- SwingConstants.RIGHT);
- label.setBorder(new EmptyBorder(0,0,0,12));
- layout.setConstraints(label,cons);
- add(label);
- cons.gridx++;
- cons.weightx = 1.0f;
- abbrev = new JTextField();
- layout.setConstraints(abbrev,cons);
- add(abbrev);
-
- cons.gridx = 1;
- cons.weightx = 0.0f;
- cons.gridwidth = 2;
-
- cons.gridy++;
- label = new JLabel(jEdit.getProperty("abbrev-editor.before"));
- label.setBorder(new EmptyBorder(6,0,3,0));
- layout.setConstraints(label,cons);
- add(label);
-
- cons.gridy++;
- cons.weighty = 1.0f;
- beforeCaret = new JTextArea(4,40);
- JScrollPane scroller = new JScrollPane(beforeCaret);
- layout.setConstraints(scroller,cons);
- add(scroller);
-
- cons.gridy++;
- cons.weighty = 0.0f;
- label = new JLabel(jEdit.getProperty("abbrev-editor.after"));
- label.setBorder(new EmptyBorder(6,0,3,0));
- layout.setConstraints(label,cons);
- add(label);
-
- cons.gridy++;
- cons.weighty = 1.0f;
- afterCaret = new JTextArea(4,40);
- scroller = new JScrollPane(afterCaret);
- layout.setConstraints(scroller,cons);
- add(scroller);
- } //}}}
-
- //{{{ getAbbrev() method
- public String getAbbrev()
- {
- return abbrev.getText();
- } //}}}
-
- //{{{ setAbbrev() method
- public void setAbbrev(String abbrev)
- {
- this.abbrev.setText(abbrev);
- } //}}}
-
- //{{{ getExpansion() method
- public String getExpansion()
- {
- StringBuilder buf = new StringBuilder();
-
- String beforeCaretText = beforeCaret.getText();
- String afterCaretText = afterCaret.getText();
-
- for(int i = 0; i < beforeCaretText.length(); i++)
- {
- char ch = beforeCaretText.charAt(i);
- switch(ch)
- {
- case '\n':
- buf.append("\\n");
- break;
- case '\t':
- buf.append("\\t");
- break;
- case '\\':
- buf.append("\\\\");
- break;
- default:
- buf.append(ch);
- break;
- }
- }
-
- if(afterCaretText.length() != 0)
- {
- buf.append("\\|");
-
- for(int i = 0; i < afterCaretText.length(); i++)
- {
- char ch = afterCaretText.charAt(i);
- switch(ch)
- {
- case '\n':
- buf.append("\\n");
- break;
- case '\t':
- buf.append("\\t");
- break;
- case '\\':
- buf.append("\\\\");
- break;
- default:
- buf.append(ch);
- break;
- }
- }
- }
-
- return buf.toString();
- } //}}}
-
- //{{{ setExpansion() method
- public void setExpansion(String expansion)
- {
- if(expansion == null)
- {
- beforeCaret.setText(null);
- afterCaret.setText(null);
- return;
- }
-
- String beforeCaretText = null;
- String afterCaretText = null;
- StringBuilder buf = new StringBuilder();
-
- for(int i = 0; i < expansion.length(); i++)
- {
- char ch = expansion.charAt(i);
-
- if(ch == '\\' && i != expansion.length() - 1)
- {
- ch = expansion.charAt(++i);
- switch(ch)
- {
- case 't':
- buf.append('\t');
- break;
- case 'n':
- buf.append('\n');
- break;
- case '|':
- beforeCaretText = buf.toString();
- buf.setLength(0);
- break;
- default:
- buf.append(ch);
- break;
- }
- }
- else
- buf.append(ch);
- }
-
- if(beforeCaretText == null)
- beforeCaretText = buf.toString();
- else
- afterCaretText = buf.toString();
-
- beforeCaret.setText(beforeCaretText);
- afterCaret.setText(afterCaretText);
- } //}}}
-
- //{{{ getAbbrevField() method
- public JTextField getAbbrevField()
- {
- return abbrev;
- } //}}}
-
- //{{{ getBeforeCaretTextArea() method
- public JTextArea getBeforeCaretTextArea()
- {
- return beforeCaret;
- } //}}}
-
- //{{{ getAfterCaretTextArea() method
- public JTextArea getAfterCaretTextArea()
- {
- return afterCaret;
- } //}}}
-
- //{{{ Private members
- private JTextField abbrev;
- private JTextArea beforeCaret, afterCaret;
- //}}}
-}
+/*
+ * AbbrevEditor.java - Panel for editing abbreviations
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class AbbrevEditor extends JPanel
+{
+ //{{{ AbbrevEditor constructor
+ public AbbrevEditor()
+ {
+ GridBagLayout layout = new GridBagLayout();
+ setLayout(layout);
+
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.anchor = cons.WEST;
+ cons.fill = cons.BOTH;
+ cons.weightx = 0.0f;
+ cons.gridx = 1;
+ cons.gridy = 1;
+
+ JLabel label = new JLabel(jEdit.getProperty("abbrev-editor.abbrev"),
+ SwingConstants.RIGHT);
+ label.setBorder(new EmptyBorder(0,0,0,12));
+ layout.setConstraints(label,cons);
+ add(label);
+ cons.gridx++;
+ cons.weightx = 1.0f;
+ abbrev = new JTextField();
+ layout.setConstraints(abbrev,cons);
+ add(abbrev);
+
+ cons.gridx = 1;
+ cons.weightx = 0.0f;
+ cons.gridwidth = 2;
+
+ cons.gridy++;
+ label = new JLabel(jEdit.getProperty("abbrev-editor.before"));
+ label.setBorder(new EmptyBorder(6,0,3,0));
+ layout.setConstraints(label,cons);
+ add(label);
+
+ cons.gridy++;
+ cons.weighty = 1.0f;
+ beforeCaret = new JTextArea(4,40);
+ JScrollPane scroller = new JScrollPane(beforeCaret);
+ layout.setConstraints(scroller,cons);
+ add(scroller);
+
+ cons.gridy++;
+ cons.weighty = 0.0f;
+ label = new JLabel(jEdit.getProperty("abbrev-editor.after"));
+ label.setBorder(new EmptyBorder(6,0,3,0));
+ layout.setConstraints(label,cons);
+ add(label);
+
+ cons.gridy++;
+ cons.weighty = 1.0f;
+ afterCaret = new JTextArea(4,40);
+ scroller = new JScrollPane(afterCaret);
+ layout.setConstraints(scroller,cons);
+ add(scroller);
+ } //}}}
+
+ //{{{ getAbbrev() method
+ public String getAbbrev()
+ {
+ return abbrev.getText();
+ } //}}}
+
+ //{{{ setAbbrev() method
+ public void setAbbrev(String abbrev)
+ {
+ this.abbrev.setText(abbrev);
+ } //}}}
+
+ //{{{ getExpansion() method
+ public String getExpansion()
+ {
+ StringBuilder buf = new StringBuilder();
+
+ String beforeCaretText = beforeCaret.getText();
+ String afterCaretText = afterCaret.getText();
+
+ for(int i = 0; i < beforeCaretText.length(); i++)
+ {
+ char ch = beforeCaretText.charAt(i);
+ switch(ch)
+ {
+ case '\n':
+ buf.append("\\n");
+ break;
+ case '\t':
+ buf.append("\\t");
+ break;
+ case '\\':
+ buf.append("\\\\");
+ break;
+ default:
+ buf.append(ch);
+ break;
+ }
+ }
+
+ if(afterCaretText.length() != 0)
+ {
+ buf.append("\\|");
+
+ for(int i = 0; i < afterCaretText.length(); i++)
+ {
+ char ch = afterCaretText.charAt(i);
+ switch(ch)
+ {
+ case '\n':
+ buf.append("\\n");
+ break;
+ case '\t':
+ buf.append("\\t");
+ break;
+ case '\\':
+ buf.append("\\\\");
+ break;
+ default:
+ buf.append(ch);
+ break;
+ }
+ }
+ }
+
+ return buf.toString();
+ } //}}}
+
+ //{{{ setExpansion() method
+ public void setExpansion(String expansion)
+ {
+ if(expansion == null)
+ {
+ beforeCaret.setText(null);
+ afterCaret.setText(null);
+ return;
+ }
+
+ String beforeCaretText = null;
+ String afterCaretText = null;
+ StringBuilder buf = new StringBuilder();
+
+ for(int i = 0; i < expansion.length(); i++)
+ {
+ char ch = expansion.charAt(i);
+
+ if(ch == '\\' && i != expansion.length() - 1)
+ {
+ ch = expansion.charAt(++i);
+ switch(ch)
+ {
+ case 't':
+ buf.append('\t');
+ break;
+ case 'n':
+ buf.append('\n');
+ break;
+ case '|':
+ beforeCaretText = buf.toString();
+ buf.setLength(0);
+ break;
+ default:
+ buf.append(ch);
+ break;
+ }
+ }
+ else
+ buf.append(ch);
+ }
+
+ if(beforeCaretText == null)
+ beforeCaretText = buf.toString();
+ else
+ afterCaretText = buf.toString();
+
+ beforeCaret.setText(beforeCaretText);
+ afterCaret.setText(afterCaretText);
+ } //}}}
+
+ //{{{ getAbbrevField() method
+ public JTextField getAbbrevField()
+ {
+ return abbrev;
+ } //}}}
+
+ //{{{ getBeforeCaretTextArea() method
+ public JTextArea getBeforeCaretTextArea()
+ {
+ return beforeCaret;
+ } //}}}
+
+ //{{{ getAfterCaretTextArea() method
+ public JTextArea getAfterCaretTextArea()
+ {
+ return afterCaret;
+ } //}}}
+
+ //{{{ Private members
+ private JTextField abbrev;
+ private JTextArea beforeCaret, afterCaret;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/AboutDialog.java b/jEdit/org/gjt/sp/jedit/gui/AboutDialog.java
index 1df104d..67e76dd 100644
--- a/jEdit/org/gjt/sp/jedit/gui/AboutDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/AboutDialog.java
@@ -1,322 +1,330 @@
-/*
- * AboutDialog.java - About jEdit dialog box
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.awt.geom.*;
-import java.awt.image.BufferedImage;
-import java.util.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-public class AboutDialog extends JDialog implements ActionListener
-{
- //{{{ AboutDialog constructor
- public AboutDialog(View view)
- {
- super(view,jEdit.getProperty("about.title"), true);
- setResizable(false);
- JButton closeBtn = new JButton(jEdit.getProperty("common.close"));
- closeBtn.addActionListener(this);
- getRootPane().setDefaultButton(closeBtn);
-
- JPanel p = new JPanel(new BorderLayout());
- final AboutPanel aboutPanel = new AboutPanel();
- JPanel flowP = new JPanel(new FlowLayout());
- flowP.add(closeBtn);
- flowP.add(Box.createRigidArea(new Dimension(40, 40)));
- Dimension dim = new Dimension(10, 0);
- p.add(BorderLayout.WEST, Box.createRigidArea(dim));
- p.add(BorderLayout.EAST, Box.createRigidArea(dim));
- p.add(BorderLayout.NORTH, Box.createRigidArea(new Dimension(10, 10)));
- p.add(BorderLayout.SOUTH, flowP);
- p.add(BorderLayout.CENTER, aboutPanel);
-
- closeBtn.setToolTipText(jEdit.getProperty("about.navigate"));
- closeBtn.addKeyListener(new KeyAdapter()
- {
- public void keyPressed(KeyEvent e)
- {
- aboutPanel.handleKeyEvent(e);
- }
- });
-
- setContentPane(p);
- pack();
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
- setLocation((d.width-getWidth())/2, (d.height-getHeight())/2);
- addWindowListener(new WindowAdapter()
- {
- @Override
- public void windowClosing(WindowEvent e)
- {
- closeDialog();
- }
- });
- setVisible(true);
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent e)
- {
- closeDialog();
- } //}}}
-
- //{{{ closeDialog() method
- private void closeDialog()
- {
- AboutPanel.stopThread();
- dispose();
- } //}}}
-
-
- //{{{ AboutPanel class
- private static class AboutPanel extends JComponent implements Runnable
- {
- private BufferedImage bufImage;
- private Graphics2D g;
- private static final Font defaultFont = UIManager.getFont("Label.font");
- private final Font bottomLineFont = defaultFont.deriveFont(9.8f);
- private final String sBottomLine;
- private final ImageIcon image;
- private final Vector<String> vLines;
- private static boolean doWork;
- private Thread th;
- private final FontMetrics fm;
- private int iLineHeight = 0, iListHeight, iLineCount = 0,
- iBottomLineXOffset = 0, iBottomLineYOffset = 0,
- iPipeLineCount = 0, w = 0, h = 0, y = 0;
- private static final int
- SLEEP_TIME = 30,
- iBottomPadding = 36,
- iTopPadding = 120;
- private static Rectangle2D.Float rectangle;
- private static GradientPaint gradientPaint;
- private boolean skipDrain = false;
-
- AboutPanel()
- {
- String mode;
- if (jEdit.getEditServer() != null)
- {
- if (jEdit.isBackgroundModeEnabled())
- mode = jEdit.getProperty("about.mode.server-background");
- else
- mode = jEdit.getProperty("about.mode.server");
- }
- else
- mode = jEdit.getProperty("about.mode.standalone");
- String[] args = { jEdit.getVersion(), mode, System.getProperty("java.version") };
- sBottomLine = jEdit.getProperty("about.version",args);
- setFont(defaultFont);
- fm = getFontMetrics(defaultFont);
- FontMetrics fmBottom = getFontMetrics(bottomLineFont);
- iLineHeight = fm.getHeight();
- vLines = new Vector<String>(50);
- image = (ImageIcon)GUIUtilities.loadIcon("about.png");
- MediaTracker tracker = new MediaTracker(this);
- tracker.addImage(image.getImage(), 0);
-
- try
- {
- tracker.waitForID(0);
- }
- catch(Exception exc)
- {
- tell("AboutPanel: " + exc);
- }
-
- Dimension d = new Dimension(image.getIconWidth(), image.getIconHeight());
- setSize(d);
- setPreferredSize(d);
- w = d.width;
- h = d.height;
- iBottomLineXOffset = (w / 2) - (fmBottom.stringWidth(sBottomLine) / 2);
- iBottomLineYOffset = h-iLineHeight/2;
- StringTokenizer st = new StringTokenizer(
- jEdit.getProperty("about.text"),"\n");
- while(st.hasMoreTokens())
- {
- vLines.add(st.nextToken());
- }
-
- iLineCount = vLines.size();
- iListHeight = iLineCount * iLineHeight;
- startThread();
- updateUI();
- }
-
- private void handleKeyEvent(KeyEvent e)
- {
- if (e.getKeyCode() == KeyEvent.VK_DOWN)
- {
- skipDrain = false;
- Collections.rotate(vLines, -1);
- }
- else if (e.getKeyCode() == KeyEvent.VK_UP)
- {
- skipDrain = false;
- Collections.rotate(vLines, 1);
- }
- else if ((e.getKeyCode() == KeyEvent.VK_LEFT) ||
- (e.getKeyCode() == KeyEvent.VK_RIGHT) ||
- (e.getKeyCode() == KeyEvent.VK_ESCAPE))
- {
- skipDrain = ! skipDrain;
- }
- }
-
- private void drain()
- {
- if (skipDrain)
- return;
- if (bufImage == null)
- {
- //pre-computing all data that can be known at this time
- Dimension d = getSize();
- bufImage = new BufferedImage(d.width, d.height,
- BufferedImage.TYPE_INT_RGB);
- g = bufImage.createGraphics();
- rectangle = new Rectangle2D.Float(0, iTopPadding,
- d.width, d.height-iBottomPadding-iTopPadding);
- //"+1" makes sure every new line from below comes up smoothly
- //cause it gets pre-painted and clipped as needed
- iPipeLineCount = 1 + (int)Math.ceil(rectangle.height/iLineHeight);
- y = d.height+iBottomPadding;
- g.setFont(defaultFont);
- gradientPaint = new GradientPaint(
- rectangle.width/2, iTopPadding+80, new Color(80, 80, 80),
- rectangle.width/2, iTopPadding, new Color(205, 205, 205)
- );
- g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- }
-
- g.drawImage(image.getImage(), 0, 0, w, h, this);
-
- g.setFont(bottomLineFont);
-
- g.setPaint(new Color(55, 55, 55));
- g.drawString(sBottomLine, iBottomLineXOffset, iBottomLineYOffset);
- // Draw a highlight effect
- g.setPaint(new Color(255, 255, 255, 50));
- g.drawString(sBottomLine, iBottomLineXOffset + 1, iBottomLineYOffset + 1);
-
- g.setFont(defaultFont);
- g.setPaint(Color.black);
-
-
- g.drawRect(0, 0, w-1, h-1);
- g.clip(rectangle);
- g.setPaint(gradientPaint);
- int iDrawnLinesCount = 0, yCoor = 0;
-
- for (int i=0; i<iLineCount; i++)
- {
- //check whether the text line is above the canvas, if so, the code skips it
- yCoor = y+ i * iLineHeight;
- if (yCoor < iTopPadding)
- {
- continue;
- }
-
- //good to go, now draw only iPipeLineCount lines and get out from loop
- String sLine = vLines.get(i);
- int x = (w - fm.stringWidth(sLine))/2;
- g.drawString(sLine, x, yCoor);
- if (++iDrawnLinesCount >= iPipeLineCount)
- {
- break;
- }
- }
-
- y--;
- paint(getGraphics());
-
- //check if the end of the list has been reached,
- //if so rewind
- if ((y + iListHeight) < iTopPadding)
- {
- y = h+iBottomPadding;
- }
- }
-
- @Override
- public void update(Graphics g)
- {
- paint(g);
- }
-
- @Override
- public void paint(Graphics panelGraphics)
- {
- if (panelGraphics != null && bufImage != null)
- {
- panelGraphics.drawImage(bufImage, 0, 0, w, h, this);
- }
- }
-
- public void run()
- {
- try
- {
- while(doWork)
- {
- drain();
- Thread.sleep(SLEEP_TIME);
- }
- }
- catch(Exception exc)
- {
- Log.log(Log.ERROR, this, exc);
- }
-
- doWork = false;
- th = null;
- }
-
- public void startThread()
- {
- if (th == null)
- {
- th = new Thread(this);
- doWork = true;
- th.start();
- }
- }
-
- public static void stopThread()
- {
- doWork = false;
- }
-
- public static void tell(Object obj)
- {
- String str = obj == null ? "NULL" : obj.toString();
- JOptionPane.showMessageDialog(jEdit.getActiveView(), str, "Title", 1);
- }
- } //}}}
-}
+/*
+ * AboutDialog.java - About jEdit dialog box
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+
+import java.awt.event.*;
+import java.awt.*;
+import java.awt.geom.*;
+import java.awt.image.BufferedImage;
+import java.util.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+public class AboutDialog extends JDialog implements ActionListener
+{
+ //{{{ AboutDialog constructor
+ public AboutDialog(View view)
+ {
+ super(view,jEdit.getProperty("about.title"), true);
+ setResizable(false);
+ JButton closeBtn = new JButton(jEdit.getProperty("common.close"));
+ closeBtn.addActionListener(this);
+ getRootPane().setDefaultButton(closeBtn);
+
+ JPanel p = new JPanel(new BorderLayout());
+ final AboutPanel aboutPanel = new AboutPanel();
+ JPanel flowP = new JPanel(new FlowLayout());
+ flowP.add(closeBtn);
+ flowP.add(Box.createRigidArea(new Dimension(40, 40)));
+ Dimension dim = new Dimension(10, 0);
+ p.add(BorderLayout.WEST, Box.createRigidArea(dim));
+ p.add(BorderLayout.EAST, Box.createRigidArea(dim));
+ p.add(BorderLayout.NORTH, Box.createRigidArea(new Dimension(10, 10)));
+ p.add(BorderLayout.SOUTH, flowP);
+ p.add(BorderLayout.CENTER, aboutPanel);
+
+ closeBtn.setToolTipText(jEdit.getProperty("about.navigate"));
+ closeBtn.addKeyListener(new KeyAdapter()
+ {
+ public void keyPressed(KeyEvent e)
+ {
+ aboutPanel.handleKeyEvent(e);
+ }
+ });
+
+ setContentPane(p);
+ pack();
+ setLocationRelativeTo(jEdit.getActiveView());
+ addWindowListener(new WindowAdapter()
+ {
+ @Override
+ public void windowClosing(WindowEvent e)
+ {
+ closeDialog();
+ }
+ });
+ setVisible(true);
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent e)
+ {
+ closeDialog();
+ } //}}}
+
+ //{{{ closeDialog() method
+ private void closeDialog()
+ {
+ AboutPanel.stopThread();
+ dispose();
+ } //}}}
+
+
+ //{{{ AboutPanel class
+ private static class AboutPanel extends JComponent implements Runnable
+ {
+ private BufferedImage bufImage;
+ private Graphics2D g;
+ private static final Font defaultFont = UIManager.getFont("Label.font");
+ private final Font bottomLineFont = defaultFont.deriveFont(9.8f);
+ private final String sBottomLine;
+ private final ImageIcon image;
+ private final Vector<String> vLines;
+ private static boolean doWork;
+ private Thread th;
+ private final FontMetrics fm;
+ private int iLineHeight = 0, iListHeight, iLineCount = 0,
+ iBottomLineXOffset = 0, iBottomLineYOffset = 0,
+ iPipeLineCount = 0, w = 0, h = 0, y = 0;
+ private static final int
+ SLEEP_TIME = 30,
+ iBottomPadding = 36,
+ iTopPadding = 120;
+ private static Rectangle2D.Float rectangle;
+ private static GradientPaint gradientPaint;
+ private boolean skipDrain = false;
+
+ AboutPanel()
+ {
+ String mode;
+ if (jEdit.getEditServer() != null)
+ {
+ if (jEdit.isBackgroundModeEnabled())
+ mode = jEdit.getProperty("about.mode.server-background");
+ else
+ mode = jEdit.getProperty("about.mode.server");
+ }
+ else
+ mode = jEdit.getProperty("about.mode.standalone");
+ String[] args = { jEdit.getVersion(), mode, System.getProperty("java.vendor"), System.getProperty("java.version") };
+ sBottomLine = jEdit.getProperty("about.version",args);
+ setFont(defaultFont);
+ fm = getFontMetrics(defaultFont);
+ FontMetrics fmBottom = getFontMetrics(bottomLineFont);
+ iLineHeight = fm.getHeight();
+ vLines = new Vector<String>(50);
+ image = (ImageIcon)GUIUtilities.loadIcon("about.png");
+ MediaTracker tracker = new MediaTracker(this);
+ tracker.addImage(image.getImage(), 0);
+
+ try
+ {
+ tracker.waitForID(0);
+ }
+ catch(Exception exc)
+ {
+ tell("AboutPanel: " + exc);
+ }
+
+ Dimension d = new Dimension(image.getIconWidth(), image.getIconHeight());
+ setSize(d);
+ setPreferredSize(d);
+ w = d.width;
+ h = d.height;
+ iBottomLineXOffset = (w / 2) - (fmBottom.stringWidth(sBottomLine) / 2);
+ iBottomLineYOffset = h-iLineHeight/2;
+ StringTokenizer st = new StringTokenizer(
+ jEdit.getProperty("about.text"),"\n");
+ while(st.hasMoreTokens())
+ {
+ vLines.add(st.nextToken());
+ }
+
+ iLineCount = vLines.size();
+ iListHeight = iLineCount * iLineHeight;
+ startThread();
+ updateUI();
+ }
+
+ private void handleKeyEvent(KeyEvent e)
+ {
+ if (e.getKeyCode() == KeyEvent.VK_DOWN)
+ {
+ skipDrain = false;
+ Collections.rotate(vLines, -1);
+ }
+ else if (e.getKeyCode() == KeyEvent.VK_UP)
+ {
+ skipDrain = false;
+ Collections.rotate(vLines, 1);
+ }
+ else if ((e.getKeyCode() == KeyEvent.VK_LEFT) ||
+ (e.getKeyCode() == KeyEvent.VK_RIGHT) ||
+ (e.getKeyCode() == KeyEvent.VK_SPACE))
+ {
+ skipDrain = ! skipDrain;
+ e.consume();
+ }
+ else if ((e.getKeyCode()) == KeyEvent.VK_ESCAPE)
+ {
+ e.consume();
+ JDialog d = GUIUtilities.getParentDialog(this);
+ stopThread();
+ d.dispose();
+ }
+ }
+
+ private void drain()
+ {
+ if (skipDrain)
+ return;
+ if (bufImage == null)
+ {
+ //pre-computing all data that can be known at this time
+ Dimension d = getSize();
+ bufImage = new BufferedImage(d.width, d.height,
+ BufferedImage.TYPE_INT_RGB);
+ g = bufImage.createGraphics();
+ rectangle = new Rectangle2D.Float(0, iTopPadding,
+ d.width, d.height-iBottomPadding-iTopPadding);
+ //"+1" makes sure every new line from below comes up smoothly
+ //cause it gets pre-painted and clipped as needed
+ iPipeLineCount = 1 + (int)Math.ceil(rectangle.height/iLineHeight);
+ y = d.height+iBottomPadding;
+ g.setFont(defaultFont);
+ gradientPaint = new GradientPaint(
+ rectangle.width/2, iTopPadding+80, new Color(80, 80, 80),
+ rectangle.width/2, iTopPadding, new Color(205, 205, 205)
+ );
+ g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ }
+
+ g.drawImage(image.getImage(), 0, 0, w, h, this);
+
+ g.setFont(bottomLineFont);
+
+ g.setPaint(new Color(55, 55, 55));
+ g.drawString(sBottomLine, iBottomLineXOffset, iBottomLineYOffset);
+ // Draw a highlight effect
+ g.setPaint(new Color(255, 255, 255, 50));
+ g.drawString(sBottomLine, iBottomLineXOffset + 1, iBottomLineYOffset + 1);
+
+ g.setFont(defaultFont);
+ g.setPaint(Color.black);
+
+
+ g.drawRect(0, 0, w-1, h-1);
+ g.clip(rectangle);
+ g.setPaint(gradientPaint);
+ int iDrawnLinesCount = 0, yCoor = 0;
+
+ for (int i=0; i<iLineCount; i++)
+ {
+ //check whether the text line is above the canvas, if so, the code skips it
+ yCoor = y+ i * iLineHeight;
+ if (yCoor < iTopPadding)
+ {
+ continue;
+ }
+
+ //good to go, now draw only iPipeLineCount lines and get out from loop
+ String sLine = vLines.get(i);
+ int x = (w - fm.stringWidth(sLine))/2;
+ g.drawString(sLine, x, yCoor);
+ if (++iDrawnLinesCount >= iPipeLineCount)
+ {
+ break;
+ }
+ }
+
+ y--;
+ paint(getGraphics());
+
+ //check if the end of the list has been reached,
+ //if so rewind
+ if ((y + iListHeight) < iTopPadding)
+ {
+ y = h+iBottomPadding;
+ }
+ }
+
+ @Override
+ public void update(Graphics g)
+ {
+ paint(g);
+ }
+
+ @Override
+ public void paint(Graphics panelGraphics)
+ {
+ if (panelGraphics != null && bufImage != null)
+ {
+ panelGraphics.drawImage(bufImage, 0, 0, w, h, this);
+ }
+ }
+
+ public void run()
+ {
+ try
+ {
+ while(doWork)
+ {
+ drain();
+ Thread.sleep(SLEEP_TIME);
+ }
+ }
+ catch(Exception exc)
+ {
+ Log.log(Log.ERROR, this, exc);
+ }
+
+ doWork = false;
+ th = null;
+ }
+
+ public void startThread()
+ {
+ if (th == null)
+ {
+ th = new Thread(this);
+ doWork = true;
+ th.start();
+ }
+ }
+
+ public static void stopThread()
+ {
+ doWork = false;
+ }
+
+ public static void tell(Object obj)
+ {
+ String str = obj == null ? "NULL" : obj.toString();
+ JOptionPane.showMessageDialog(jEdit.getActiveView(), str, "Title", 1);
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/AbstractContextOptionPane.java b/jEdit/org/gjt/sp/jedit/gui/AbstractContextOptionPane.java
index 42fbf12..3ec3501 100644
--- a/jEdit/org/gjt/sp/jedit/gui/AbstractContextOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/gui/AbstractContextOptionPane.java
@@ -1,317 +1,317 @@
-/*
- * Copyright (C) 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.StandardUtilities;
-
-/**
- * An abstract base class for context menu editors. Provides the base
- * UI and functionality for creating a context menu populated with
- * jEdit actions.
- *
- * @author Slava Pestov
- * @author Marcelo Vanzin
- * @version $Id: AbstractContextOptionPane.java 15613 2009-06-30 07:07:43Z voituk $
- * @since jEdit 4.3pre13
- */
-public abstract class AbstractContextOptionPane extends AbstractOptionPane
-{
-
- /**
- * Constructor that takes a name as an argument, for use by
- * subclasses.
- *
- * @param name Name of the option pane.
- * @param caption String to use as the caption of the context menu
- * configuration list.
- *
- * @since jEdit 4.3pre13
- */
- protected AbstractContextOptionPane(String name, String caption)
- {
- super(name);
- this.caption = new JLabel(caption);
- }
-
- /**
- * Initializes the pane's UI.
- */
- protected void _init()
- {
- setLayout(new BorderLayout());
-
- add(BorderLayout.NORTH,caption);
-
- listModel = new DefaultListModel();
- reloadContextList(getContextMenu());
-
- list = new JList(listModel);
- list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- list.addListSelectionListener(new ListHandler());
-
- add(BorderLayout.CENTER,new JScrollPane(list));
-
- buttons = new JPanel();
- buttons.setBorder(new EmptyBorder(3,0,0,0));
- buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
- ActionHandler actionHandler = new ActionHandler();
- add = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.add.icon")));
- add.setToolTipText(jEdit.getProperty("common.add"));
- add.addActionListener(actionHandler);
- buttons.add(add);
- buttons.add(Box.createHorizontalStrut(6));
- remove = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.remove.icon")));
- remove.setToolTipText(jEdit.getProperty("common.remove"));
- remove.addActionListener(actionHandler);
- buttons.add(remove);
- buttons.add(Box.createHorizontalStrut(6));
- moveUp = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.moveUp.icon")));
- moveUp.setToolTipText(jEdit.getProperty("common.moveUp"));
- moveUp.addActionListener(actionHandler);
- buttons.add(moveUp);
- buttons.add(Box.createHorizontalStrut(6));
- moveDown = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.moveDown.icon")));
- moveDown.setToolTipText(jEdit.getProperty("common.moveDown"));
- moveDown.addActionListener(actionHandler);
- buttons.add(moveDown);
- buttons.add(Box.createGlue());
-
- // add "reset to defaults" button
- reset = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.reset.icon")));
- reset.setToolTipText(jEdit.getProperty("options.context.reset"));
- reset.addActionListener(actionHandler);
- buttons.add(reset);
-
- updateButtons();
- add(BorderLayout.SOUTH,buttons);
- }
-
- /**
- * Returns the context menu to be edited. The default implementation
- * returns jEdit's context menu. Subclasses overriding this method
- * should also override {@link #saveContextMenu(String menu) saveContextMenu}.
- *
- * @since jEdit 4.3pre13
- */
- protected abstract String getContextMenu();
-
- /**
- * Saves the context menu configuration.
- *
- * @since jEdit 4.3pre13
- */
- protected abstract void saveContextMenu(String menu);
-
- /**
- * Adds a widget to the "buttons" panel at the bottom. The component
- * will be added at the very right of the button row (separated from
- * the normal buttons).
- *
- * @since jEdit 4.3pre13
- */
- protected void addButton(JComponent c)
- {
- buttons.add(c);
- }
-
- static class MenuItemCompare implements Comparator<MenuItem>
- {
- public int compare(MenuItem obj1, MenuItem obj2)
- {
- return StandardUtilities.compareStrings(obj1.label, obj2.label, true);
- }
- }
-
- protected void _save()
- {
- StringBuilder buf = new StringBuilder();
- for(int i = 0; i < listModel.getSize(); i++)
- {
- if(i != 0)
- buf.append(' ');
- buf.append(((MenuItem)listModel.elementAt(i)).actionName);
- }
- saveContextMenu(buf.toString());
- }
-
- // private members
- private DefaultListModel listModel;
- private JList list;
- private JButton add;
- private JButton remove;
- private JButton moveUp, moveDown;
- private JButton reset;
- private JLabel caption;
- private JPanel buttons;
-
- private void updateButtons()
- {
- int index = list.getSelectedIndex();
- remove.setEnabled(index != -1 && listModel.getSize() != 0);
- moveUp.setEnabled(index > 0);
- moveDown.setEnabled(index != -1 && index != listModel.getSize() - 1);
- }
-
- private void reloadContextList(String contextMenu)
- {
- listModel.clear();
- StringTokenizer st = new StringTokenizer(contextMenu);
- while(st.hasMoreTokens())
- {
- String actionName = st.nextToken();
- if(actionName.equals("-"))
- listModel.addElement(new AbstractContextOptionPane.MenuItem("-","-"));
- else
- {
- EditAction action = jEdit.getAction(actionName);
- if(action == null)
- continue;
- String label = action.getLabel();
- if(label == null)
- continue;
- listModel.addElement(new AbstractContextOptionPane.MenuItem(actionName,label));
- }
- }
- }
-
- static class MenuItem
- {
- String actionName;
- String label;
-
- MenuItem(String actionName, String label)
- {
- this.actionName = actionName;
- this.label = GUIUtilities.prettifyMenuLabel(label);
- }
-
- public String toString()
- {
- return label;
- }
- }
-
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
-
- if(source == add)
- {
- ContextAddDialog dialog = new ContextAddDialog(
- AbstractContextOptionPane.this);
- String selection = dialog.getSelection();
- if(selection == null)
- return;
-
- int index = list.getSelectedIndex();
- if(index == -1)
- index = listModel.getSize();
- else
- index++;
-
- MenuItem menuItem;
- if(selection.equals("-"))
- menuItem = new AbstractContextOptionPane.MenuItem("-","-");
- else
- {
- menuItem = new AbstractContextOptionPane.MenuItem(selection,
- jEdit.getAction(selection)
- .getLabel());
- }
-
- listModel.insertElementAt(menuItem,index);
- list.setSelectedIndex(index);
- list.ensureIndexIsVisible(index);
- }
- else if(source == remove)
- {
- int index = list.getSelectedIndex();
- listModel.removeElementAt(index);
- if(listModel.getSize() != 0)
- {
- list.setSelectedIndex(
- Math.min(listModel.getSize()-1,
- index));
- }
- updateButtons();
- }
- else if(source == moveUp)
- {
- int index = list.getSelectedIndex();
- Object selected = list.getSelectedValue();
- listModel.removeElementAt(index);
- listModel.insertElementAt(selected,index-1);
- list.setSelectedIndex(index-1);
- list.ensureIndexIsVisible(index - 1);
- }
- else if(source == moveDown)
- {
- int index = list.getSelectedIndex();
- Object selected = list.getSelectedValue();
- listModel.removeElementAt(index);
- listModel.insertElementAt(selected,index+1);
- list.setSelectedIndex(index+1);
- list.ensureIndexIsVisible(index+1);
- }
- else if(source == reset)
- {
- String dialogType = "options.context.reset.dialog";
- int result = GUIUtilities.confirm(list,dialogType,null,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
-
- if(result == JOptionPane.YES_OPTION)
- {
- // the user should be able to cancel the options dialog
- // so we need to modify the list, not the actual property
- // since the default value is not available,
- // we reset, fetch default value and re-set to original
- String orgContext = jEdit.getProperty("view.context");
- jEdit.resetProperty("view.context");
- String defaultContext = jEdit.getProperty("view.context");
- jEdit.setProperty("view.context", orgContext);
- reloadContextList(defaultContext);
-
- // reset selection if user had more buttons than default
- list.setSelectedIndex(0);
- list.ensureIndexIsVisible(0);
- updateButtons();
- }
- }
- }
- }
-
- class ListHandler implements ListSelectionListener
- {
- public void valueChanged(ListSelectionEvent evt)
- {
- updateButtons();
- }
- }
-}
-
+/*
+ * Copyright (C) 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+import javax.swing.border.*;
+import javax.swing.event.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.StandardUtilities;
+
+/**
+ * An abstract base class for context menu editors. Provides the base
+ * UI and functionality for creating a context menu populated with
+ * jEdit actions.
+ *
+ * @author Slava Pestov
+ * @author Marcelo Vanzin
+ * @version $Id: AbstractContextOptionPane.java 18968 2010-11-15 23:31:24Z ezust $
+ * @since jEdit 4.3pre13
+ */
+public abstract class AbstractContextOptionPane extends AbstractOptionPane
+{
+
+ /**
+ * Constructor that takes a name as an argument, for use by
+ * subclasses.
+ *
+ * @param name Name of the option pane.
+ * @param caption String to use as the caption of the context menu
+ * configuration list.
+ *
+ * @since jEdit 4.3pre13
+ */
+ protected AbstractContextOptionPane(String name, String caption)
+ {
+ super(name);
+ this.caption = new JLabel(caption);
+ }
+
+ /**
+ * Initializes the pane's UI.
+ */
+ protected void _init()
+ {
+ setLayout(new BorderLayout());
+
+ add(BorderLayout.NORTH,caption);
+
+ listModel = new DefaultListModel();
+ reloadContextList(getContextMenu());
+
+ list = new JList(listModel);
+ list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ list.addListSelectionListener(new ListHandler());
+
+ add(BorderLayout.CENTER,new JScrollPane(list));
+
+ buttons = new JPanel();
+ buttons.setBorder(new EmptyBorder(3,0,0,0));
+ buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
+ ActionHandler actionHandler = new ActionHandler();
+ add = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.add.icon")));
+ add.setToolTipText(jEdit.getProperty("common.add"));
+ add.addActionListener(actionHandler);
+ buttons.add(add);
+ buttons.add(Box.createHorizontalStrut(6));
+ remove = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.remove.icon")));
+ remove.setToolTipText(jEdit.getProperty("common.remove"));
+ remove.addActionListener(actionHandler);
+ buttons.add(remove);
+ buttons.add(Box.createHorizontalStrut(6));
+ moveUp = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.moveUp.icon")));
+ moveUp.setToolTipText(jEdit.getProperty("common.moveUp"));
+ moveUp.addActionListener(actionHandler);
+ buttons.add(moveUp);
+ buttons.add(Box.createHorizontalStrut(6));
+ moveDown = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.moveDown.icon")));
+ moveDown.setToolTipText(jEdit.getProperty("common.moveDown"));
+ moveDown.addActionListener(actionHandler);
+ buttons.add(moveDown);
+ buttons.add(Box.createGlue());
+
+ // add "reset to defaults" button
+ reset = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.reset.icon")));
+ reset.setToolTipText(jEdit.getProperty("options.context.reset"));
+ reset.addActionListener(actionHandler);
+ buttons.add(reset);
+
+ updateButtons();
+ add(BorderLayout.SOUTH,buttons);
+ }
+
+ /**
+ * Returns the context menu to be edited. The default implementation
+ * returns jEdit's context menu. Subclasses overriding this method
+ * should also override {@link #saveContextMenu(String menu) saveContextMenu}.
+ *
+ * @since jEdit 4.3pre13
+ */
+ protected abstract String getContextMenu();
+
+ /**
+ * Saves the context menu configuration.
+ *
+ * @since jEdit 4.3pre13
+ */
+ protected abstract void saveContextMenu(String menu);
+
+ /**
+ * Adds a widget to the "buttons" panel at the bottom. The component
+ * will be added at the very right of the button row (separated from
+ * the normal buttons).
+ *
+ * @since jEdit 4.3pre13
+ */
+ protected void addButton(JComponent c)
+ {
+ buttons.add(c);
+ }
+
+ static class MenuItemCompare implements Comparator<MenuItem>
+ {
+ public int compare(MenuItem obj1, MenuItem obj2)
+ {
+ return StandardUtilities.compareStrings(obj1.label, obj2.label, false);
+ }
+ }
+
+ protected void _save()
+ {
+ StringBuilder buf = new StringBuilder();
+ for(int i = 0; i < listModel.getSize(); i++)
+ {
+ if(i != 0)
+ buf.append(' ');
+ buf.append(((MenuItem)listModel.elementAt(i)).actionName);
+ }
+ saveContextMenu(buf.toString());
+ }
+
+ // private members
+ private DefaultListModel listModel;
+ private JList list;
+ private JButton add;
+ private JButton remove;
+ private JButton moveUp, moveDown;
+ private JButton reset;
+ private JLabel caption;
+ private JPanel buttons;
+
+ private void updateButtons()
+ {
+ int index = list.getSelectedIndex();
+ remove.setEnabled(index != -1 && listModel.getSize() != 0);
+ moveUp.setEnabled(index > 0);
+ moveDown.setEnabled(index != -1 && index != listModel.getSize() - 1);
+ }
+
+ private void reloadContextList(String contextMenu)
+ {
+ listModel.clear();
+ StringTokenizer st = new StringTokenizer(contextMenu);
+ while(st.hasMoreTokens())
+ {
+ String actionName = st.nextToken();
+ if(actionName.equals("-"))
+ listModel.addElement(new AbstractContextOptionPane.MenuItem("-","-"));
+ else
+ {
+ EditAction action = jEdit.getAction(actionName);
+ if(action == null)
+ continue;
+ String label = action.getLabel();
+ if(label == null)
+ continue;
+ listModel.addElement(new AbstractContextOptionPane.MenuItem(actionName,label));
+ }
+ }
+ }
+
+ static class MenuItem
+ {
+ String actionName;
+ String label;
+
+ MenuItem(String actionName, String label)
+ {
+ this.actionName = actionName;
+ this.label = GUIUtilities.prettifyMenuLabel(label);
+ }
+
+ public String toString()
+ {
+ return label;
+ }
+ }
+
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+
+ if(source == add)
+ {
+ ContextAddDialog dialog = new ContextAddDialog(
+ AbstractContextOptionPane.this);
+ String selection = dialog.getSelection();
+ if(selection == null)
+ return;
+
+ int index = list.getSelectedIndex();
+ if(index == -1)
+ index = listModel.getSize();
+ else
+ index++;
+
+ MenuItem menuItem;
+ if(selection.equals("-"))
+ menuItem = new AbstractContextOptionPane.MenuItem("-","-");
+ else
+ {
+ menuItem = new AbstractContextOptionPane.MenuItem(selection,
+ jEdit.getAction(selection)
+ .getLabel());
+ }
+
+ listModel.insertElementAt(menuItem,index);
+ list.setSelectedIndex(index);
+ list.ensureIndexIsVisible(index);
+ }
+ else if(source == remove)
+ {
+ int index = list.getSelectedIndex();
+ listModel.removeElementAt(index);
+ if(listModel.getSize() != 0)
+ {
+ list.setSelectedIndex(
+ Math.min(listModel.getSize()-1,
+ index));
+ }
+ updateButtons();
+ }
+ else if(source == moveUp)
+ {
+ int index = list.getSelectedIndex();
+ Object selected = list.getSelectedValue();
+ listModel.removeElementAt(index);
+ listModel.insertElementAt(selected,index-1);
+ list.setSelectedIndex(index-1);
+ list.ensureIndexIsVisible(index - 1);
+ }
+ else if(source == moveDown)
+ {
+ int index = list.getSelectedIndex();
+ Object selected = list.getSelectedValue();
+ listModel.removeElementAt(index);
+ listModel.insertElementAt(selected,index+1);
+ list.setSelectedIndex(index+1);
+ list.ensureIndexIsVisible(index+1);
+ }
+ else if(source == reset)
+ {
+ String dialogType = "options.context.reset.dialog";
+ int result = GUIUtilities.confirm(list,dialogType,null,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+
+ if(result == JOptionPane.YES_OPTION)
+ {
+ // the user should be able to cancel the options dialog
+ // so we need to modify the list, not the actual property
+ // since the default value is not available,
+ // we reset, fetch default value and re-set to original
+ String orgContext = jEdit.getProperty("view.context");
+ jEdit.resetProperty("view.context");
+ String defaultContext = jEdit.getProperty("view.context");
+ jEdit.setProperty("view.context", orgContext);
+ reloadContextList(defaultContext);
+
+ // reset selection if user had more buttons than default
+ list.setSelectedIndex(0);
+ list.ensureIndexIsVisible(0);
+ updateButtons();
+ }
+ }
+ }
+ }
+
+ class ListHandler implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent evt)
+ {
+ updateButtons();
+ }
+ }
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/gui/ActionBar.java b/jEdit/org/gjt/sp/jedit/gui/ActionBar.java
index 8fe3978..f1f93ab 100644
--- a/jEdit/org/gjt/sp/jedit/gui/ActionBar.java
+++ b/jEdit/org/gjt/sp/jedit/gui/ActionBar.java
@@ -1,564 +1,548 @@
-/*
- * ActionBar.java - For invoking actions directly
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import org.gjt.sp.jedit.bsh.NameSpace;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.ArrayList;
-import javax.swing.event.*;
-import javax.swing.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * Action invocation bar.
- */
-public class ActionBar extends JToolBar
-{
- //{{{ ActionBar constructor
- public ActionBar(View view, boolean temp)
- {
- this.view = view;
- this.temp = temp;
-
- setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
- setFloatable(false);
- add(Box.createHorizontalStrut(2));
-
- JLabel label = new JLabel(jEdit.getProperty("view.action.prompt"));
- add(label);
- add(Box.createHorizontalStrut(12));
- add(action = new ActionTextField());
- action.setEnterAddsToHistory(false);
- Dimension max = action.getPreferredSize();
- max.width = Integer.MAX_VALUE;
- action.setMaximumSize(max);
- action.addActionListener(new ActionHandler());
- action.getDocument().addDocumentListener(new DocumentHandler());
-
- if(temp)
- {
- close = new RolloverButton(GUIUtilities.loadIcon("closebox.gif"));
- close.addActionListener(new ActionHandler());
- close.setToolTipText(jEdit.getProperty(
- "view.action.close-tooltip"));
- add(close);
- }
-
- // if 'temp' is true, hide search bar after user is done with it
- this.temp = temp;
- } //}}}
-
- //{{{ getField() method
- public HistoryTextField getField()
- {
- return action;
- } //}}}
-
- //{{{ goToActionBar() method
- public void goToActionBar()
- {
- repeatCount = view.getInputHandler().getRepeatCount();
- action.setText(null);
- action.requestFocus();
- } //}}}
-
- //{{{ Private members
-
- private static NameSpace namespace = new NameSpace(
- BeanShell.getNameSpace(),"action bar namespace");
-
- //{{{ Instance variables
- private View view;
- private boolean temp;
- private int repeatCount;
- private HistoryTextField action;
- private CompletionPopup popup;
- private RolloverButton close;
- //}}}
-
- //{{{ invoke() method
- private void invoke()
- {
- String cmd;
- if(popup != null)
- cmd = popup.list.getSelectedValue().toString();
- else
- {
- cmd = action.getText().trim();
- int index = cmd.indexOf('=');
- if(index != -1)
- {
- action.addCurrentToHistory();
- String propName = cmd.substring(0,index).trim();
- String propValue = cmd.substring(index + 1).trim();
- String code;
- /* construct a BeanShell snippet instead of
- * invoking directly so that user can record
- * property changes in macros. */
- if(propName.startsWith("buffer."))
- {
- if(propName.equals("buffer.mode"))
- {
- code = "buffer.setMode(\""
- + StandardUtilities.charsToEscapes(
- propValue) + "\");";
- }
- else
- {
- code = "buffer.setStringProperty(\""
- + StandardUtilities.charsToEscapes(
- propName.substring("buffer.".length())
- ) + "\",\""
- + StandardUtilities.charsToEscapes(
- propValue) + "\");";
- }
-
- code += "\nbuffer.propertiesChanged();";
- }
- else if(propName.startsWith("!buffer."))
- {
- code = "jEdit.setProperty(\""
- + StandardUtilities.charsToEscapes(
- propName.substring(1)) + "\",\""
- + StandardUtilities.charsToEscapes(
- propValue) + "\");\n"
- + "jEdit.propertiesChanged();";
- }
- else
- {
- code = "jEdit.setProperty(\""
- + StandardUtilities.charsToEscapes(
- propName) + "\",\""
- + StandardUtilities.charsToEscapes(
- propValue) + "\");\n"
- + "jEdit.propertiesChanged();";
- }
-
- Macros.Recorder recorder = view.getMacroRecorder();
- if(recorder != null)
- recorder.record(code);
- BeanShell.eval(view,namespace,code);
- cmd = null;
- }
- else if(cmd.length() != 0)
- {
- String[] completions = getCompletions(cmd);
- if(completions.length != 0)
- {
- cmd = completions[0];
- }
- }
- else
- cmd = null;
- }
-
- if(popup != null)
- {
- popup.dispose();
- popup = null;
- }
-
- final String finalCmd = cmd;
- final EditAction act = (finalCmd == null ? null : jEdit.getAction(finalCmd));
- if(temp)
- view.removeToolBar(this);
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- view.getTextArea().requestFocus();
- if(act == null)
- {
- if(finalCmd != null)
- {
- view.getStatus().setMessageAndClear(
- jEdit.getProperty(
- "view.action.no-completions"));
- }
- }
- else
- {
- view.getInputHandler().setRepeatCount(repeatCount);
- view.getInputHandler().invokeAction(act);
- }
- }
- });
- } //}}}
-
- //{{{ getCompletions() method
- private static String[] getCompletions(String str)
- {
- str = str.toLowerCase();
- String[] actions = jEdit.getActionNames();
- ArrayList<String> returnValue = new ArrayList<String>(actions.length);
- for(int i = 0; i < actions.length; i++)
- {
- if(actions[i].toLowerCase().contains(str))
- returnValue.add(actions[i]);
- }
-
- return returnValue.toArray(new String[returnValue.size()]);
- } //}}}
-
- //{{{ complete() method
- private void complete(boolean insertLongestPrefix)
- {
- String text = action.getText().trim();
- String[] completions = getCompletions(text);
- if(completions.length == 1)
- {
- if(insertLongestPrefix)
- action.setText(completions[0]);
- }
- else if(completions.length != 0)
- {
- if(insertLongestPrefix)
- {
- String prefix = MiscUtilities.getLongestPrefix(
- completions,true);
- if(prefix.contains(text))
- action.setText(prefix);
- }
-
- if(popup != null)
- popup.setModel(completions);
- else
- popup = new CompletionPopup(completions);
- return;
- }
-
- if(popup != null)
- {
- popup.dispose();
- popup = null;
- }
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == close)
- view.removeToolBar(ActionBar.this);
- else
- invoke();
- }
- } //}}}
-
- //{{{ DocumentHandler class
- private class DocumentHandler implements DocumentListener
- {
- //{{{ insertUpdate() method
- public void insertUpdate(DocumentEvent evt)
- {
- if(popup != null)
- complete(false);
- } //}}}
-
- //{{{ removeUpdate() method
- public void removeUpdate(DocumentEvent evt)
- {
- if(popup != null)
- complete(false);
- } //}}}
-
- //{{{ changedUpdate() method
- public void changedUpdate(DocumentEvent evt) {}
- //}}}
- } //}}}
-
- //{{{ ActionTextField class
- private class ActionTextField extends HistoryTextField
- {
- boolean repeat;
- boolean nonDigit;
-
- ActionTextField()
- {
- super("action");
- setSelectAllOnFocus(true);
- }
-
- @Override
- public boolean isManagingFocus()
- {
- return false;
- }
-
- @Override
- public boolean getFocusTraversalKeysEnabled()
- {
- return false;
- }
-
- @Override
- public void processKeyEvent(KeyEvent evt)
- {
- evt = KeyEventWorkaround.processKeyEvent(evt);
- if(evt == null)
- return;
-
- switch(evt.getID())
- {
- case KeyEvent.KEY_TYPED:
- char ch = evt.getKeyChar();
- if(!nonDigit && Character.isDigit(ch))
- {
- super.processKeyEvent(evt);
- repeat = true;
- repeatCount = Integer.parseInt(action.getText());
- }
- else
- {
- nonDigit = true;
- if(repeat)
- {
- passToView(evt);
- }
- else
- super.processKeyEvent(evt);
- }
- break;
- case KeyEvent.KEY_PRESSED:
- int keyCode = evt.getKeyCode();
- if(evt.isActionKey()
- || evt.isControlDown()
- || evt.isAltDown()
- || evt.isMetaDown()
- || keyCode == KeyEvent.VK_BACK_SPACE
- || keyCode == KeyEvent.VK_DELETE
- || keyCode == KeyEvent.VK_ENTER
- || keyCode == KeyEvent.VK_TAB
- || keyCode == KeyEvent.VK_ESCAPE)
- {
- nonDigit = true;
- if(repeat)
- {
- passToView(evt);
- break;
- }
- else if(keyCode == KeyEvent.VK_TAB)
- {
- complete(true);
- evt.consume();
- }
- else if(keyCode == KeyEvent.VK_ESCAPE)
- {
- evt.consume();
- if(popup != null)
- {
- popup.dispose();
- popup = null;
- action.requestFocus();
- }
- else
- {
- if(temp)
- view.removeToolBar(ActionBar.this);
- view.getEditPane().focusOnTextArea();
- }
- break;
- }
- else if((keyCode == KeyEvent.VK_UP
- || keyCode == KeyEvent.VK_DOWN)
- && popup != null)
- {
- popup.list.processKeyEvent(evt);
- break;
- }
- }
- super.processKeyEvent(evt);
- break;
- }
- }
-
- private void passToView(final KeyEvent evt)
- {
- if(temp)
- view.removeToolBar(ActionBar.this);
- view.getTextArea().requestFocus();
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- view.getTextArea().requestFocus();
- view.getInputHandler().setRepeatCount(repeatCount);
- view.getInputHandler().processKeyEvent(evt,
- View.ACTION_BAR, false);
- }
- });
- }
-
- @Override
- public void addNotify()
- {
- super.addNotify();
- repeat = nonDigit = false;
- }
- } //}}}
-
- //{{{ CompletionPopup class
- private class CompletionPopup extends JWindow
- {
- CompletionList list;
-
- //{{{ CompletionPopup constructor
- CompletionPopup(String[] actions)
- {
- super(view);
-
- setContentPane(new JPanel(new BorderLayout())
- {
- /**
- * Returns if this component can be traversed by pressing the
- * Tab key. This returns false.
- */
- @Override
- public boolean isManagingFocus()
- {
- return false;
- }
-
- /**
- * Makes the tab key work in Java 1.4.
- */
- @Override
- public boolean getFocusTraversalKeysEnabled()
- {
- return false;
- }
- });
-
- list = new CompletionList(actions);
- list.setVisibleRowCount(8);
- list.addMouseListener(new MouseHandler());
- list.setSelectedIndex(0);
- list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-
- // stupid scrollbar policy is an attempt to work around
- // bugs people have been seeing with IBM's JDK -- 7 Sep 2000
- JScrollPane scroller = new JScrollPane(list,
- ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
- ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
-
- getContentPane().add(scroller, BorderLayout.CENTER);
-
- GUIUtilities.requestFocus(this,list);
-
- pack();
- Point p = new Point(0,-getHeight());
- SwingUtilities.convertPointToScreen(p,action);
- setLocation(p);
- setVisible(true);
-
- KeyHandler keyHandler = new KeyHandler();
- addKeyListener(keyHandler);
- list.addKeyListener(keyHandler);
- } //}}}
-
- //{{{ setModel() method
- void setModel(String[] actions)
- {
- list.setListData(actions);
- list.setSelectedIndex(0);
- } //}}}
-
- //{{{ MouseHandler class
- private class MouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- invoke();
- }
- } //}}}
-
- //{{{ CompletionList class
- class CompletionList extends JList
- {
- CompletionList(Object[] data)
- {
- super(data);
- }
-
- // we need this public not protected
- @Override
- public void processKeyEvent(KeyEvent evt)
- {
- super.processKeyEvent(evt);
- }
- } //}}}
-
- //{{{ KeyHandler class
- private class KeyHandler extends KeyAdapter
- {
- @Override
- public void keyTyped(KeyEvent evt)
- {
- action.processKeyEvent(evt);
- }
-
- @Override
- public void keyPressed(KeyEvent evt)
- {
- int keyCode = evt.getKeyCode();
- if(keyCode == KeyEvent.VK_ESCAPE)
- action.processKeyEvent(evt);
- else if(keyCode == KeyEvent.VK_ENTER)
- invoke();
- else if(keyCode == KeyEvent.VK_UP)
- {
- int selected = list.getSelectedIndex();
- if(selected == 0)
- {
- list.setSelectedIndex(
- list.getModel().getSize()
- - 1);
- evt.consume();
- }
- }
- else if(keyCode == KeyEvent.VK_DOWN)
- {
- int selected = list.getSelectedIndex();
- if(selected == list.getModel().getSize() - 1)
- {
- list.setSelectedIndex(0);
- evt.consume();
- }
- }
- }
- } //}}}
- } //}}}
-
- //}}}
-}
+/*
+ * ActionBar.java - For invoking actions directly
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import org.gjt.sp.jedit.bsh.NameSpace;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.ArrayList;
+import javax.swing.event.*;
+import javax.swing.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * Action invocation bar.
+ */
+public class ActionBar extends JToolBar
+{
+ //{{{ ActionBar constructor
+ public ActionBar(View view, boolean temp)
+ {
+ this.view = view;
+ this.temp = temp;
+
+ setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
+ setFloatable(false);
+ add(Box.createHorizontalStrut(2));
+
+ JLabel label = new JLabel(jEdit.getProperty("view.action.prompt"));
+ add(label);
+ add(Box.createHorizontalStrut(12));
+ add(action = new ActionTextField());
+ action.setEnterAddsToHistory(false);
+ Dimension max = action.getPreferredSize();
+ max.width = Integer.MAX_VALUE;
+ action.setMaximumSize(max);
+ action.addActionListener(new ActionHandler());
+ action.getDocument().addDocumentListener(new DocumentHandler());
+
+ if(temp)
+ {
+ close = new RolloverButton(GUIUtilities.loadIcon("closebox.gif"));
+ close.addActionListener(new ActionHandler());
+ close.setToolTipText(jEdit.getProperty(
+ "view.action.close-tooltip"));
+ add(close);
+ }
+
+ // if 'temp' is true, hide search bar after user is done with it
+ this.temp = temp;
+ } //}}}
+
+ //{{{ getField() method
+ public HistoryTextField getField()
+ {
+ return action;
+ } //}}}
+
+ //{{{ goToActionBar() method
+ public void goToActionBar()
+ {
+ repeatCount = view.getInputHandler().getRepeatCount();
+ action.setText(null);
+ action.requestFocus();
+ } //}}}
+
+ //{{{ Private members
+
+ private static NameSpace namespace = new NameSpace(
+ BeanShell.getNameSpace(),"action bar namespace");
+
+ //{{{ Instance variables
+ private View view;
+ private boolean temp;
+ private int repeatCount;
+ private HistoryTextField action;
+ private CompletionPopup popup;
+ private RolloverButton close;
+ //}}}
+
+ //{{{ invoke() method
+ private void invoke()
+ {
+ String cmd;
+ if(popup != null)
+ cmd = popup.list.getSelectedValue().toString();
+ else
+ {
+ cmd = action.getText().trim();
+ int index = cmd.indexOf('=');
+ if(index != -1)
+ {
+ action.addCurrentToHistory();
+ String propName = cmd.substring(0,index).trim();
+ String propValue = cmd.substring(index + 1).trim();
+ String code;
+ /* construct a BeanShell snippet instead of
+ * invoking directly so that user can record
+ * property changes in macros. */
+ if(propName.startsWith("buffer."))
+ {
+ if(propName.equals("buffer.mode"))
+ {
+ code = "buffer.setMode(\""
+ + StandardUtilities.charsToEscapes(
+ propValue) + "\");";
+ }
+ else
+ {
+ code = "buffer.setStringProperty(\""
+ + StandardUtilities.charsToEscapes(
+ propName.substring("buffer.".length())
+ ) + "\",\""
+ + StandardUtilities.charsToEscapes(
+ propValue) + "\");";
+ }
+
+ code += "\nbuffer.propertiesChanged();";
+ }
+ else if(propName.startsWith("!buffer."))
+ {
+ code = "jEdit.setProperty(\""
+ + StandardUtilities.charsToEscapes(
+ propName.substring(1)) + "\",\""
+ + StandardUtilities.charsToEscapes(
+ propValue) + "\");\n"
+ + "jEdit.propertiesChanged();";
+ }
+ else
+ {
+ code = "jEdit.setProperty(\""
+ + StandardUtilities.charsToEscapes(
+ propName) + "\",\""
+ + StandardUtilities.charsToEscapes(
+ propValue) + "\");\n"
+ + "jEdit.propertiesChanged();";
+ }
+
+ Macros.Recorder recorder = view.getMacroRecorder();
+ if(recorder != null)
+ recorder.record(code);
+ BeanShell.eval(view,namespace,code);
+ cmd = null;
+ }
+ else if(cmd.length() != 0)
+ {
+ String[] completions = getCompletions(cmd);
+ if(completions.length != 0)
+ {
+ cmd = completions[0];
+ }
+ }
+ else
+ cmd = null;
+ }
+
+ if(popup != null)
+ {
+ popup.dispose();
+ popup = null;
+ }
+
+ final String finalCmd = cmd;
+ final EditAction act = (finalCmd == null ? null : jEdit.getAction(finalCmd));
+ if(temp)
+ view.removeToolBar(this);
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ view.getTextArea().requestFocus();
+ if(act == null)
+ {
+ if(finalCmd != null)
+ {
+ view.getStatus().setMessageAndClear(
+ jEdit.getProperty(
+ "view.action.no-completions"));
+ }
+ }
+ else
+ {
+ view.getInputHandler().setRepeatCount(repeatCount);
+ view.getInputHandler().invokeAction(act);
+ }
+ }
+ });
+ } //}}}
+
+ //{{{ getCompletions() method
+ private static String[] getCompletions(String str)
+ {
+ str = str.toLowerCase();
+ String[] actions = jEdit.getActionNames();
+ ArrayList<String> returnValue = new ArrayList<String>(actions.length);
+ for(int i = 0; i < actions.length; i++)
+ {
+ if(actions[i].toLowerCase().contains(str))
+ returnValue.add(actions[i]);
+ }
+
+ return returnValue.toArray(new String[returnValue.size()]);
+ } //}}}
+
+ //{{{ complete() method
+ private void complete(boolean insertLongestPrefix)
+ {
+ String text = action.getText().trim();
+ String[] completions = getCompletions(text);
+ if(completions.length == 1)
+ {
+ if(insertLongestPrefix)
+ action.setText(completions[0]);
+ }
+ else if(completions.length != 0)
+ {
+ if(insertLongestPrefix)
+ {
+ String prefix = MiscUtilities.getLongestPrefix(
+ completions,true);
+ if(prefix.contains(text))
+ action.setText(prefix);
+ }
+
+ if(popup != null)
+ popup.setModel(completions);
+ else
+ popup = new CompletionPopup(completions);
+ return;
+ }
+
+ if(popup != null)
+ {
+ popup.dispose();
+ popup = null;
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == close)
+ view.removeToolBar(ActionBar.this);
+ else
+ invoke();
+ }
+ } //}}}
+
+ //{{{ DocumentHandler class
+ private class DocumentHandler implements DocumentListener
+ {
+ //{{{ insertUpdate() method
+ public void insertUpdate(DocumentEvent evt)
+ {
+ if(popup != null)
+ complete(false);
+ } //}}}
+
+ //{{{ removeUpdate() method
+ public void removeUpdate(DocumentEvent evt)
+ {
+ if(popup != null)
+ complete(false);
+ } //}}}
+
+ //{{{ changedUpdate() method
+ public void changedUpdate(DocumentEvent evt) {}
+ //}}}
+ } //}}}
+
+ //{{{ ActionTextField class
+ private class ActionTextField extends HistoryTextField
+ {
+ boolean repeat;
+ boolean nonDigit;
+
+ ActionTextField()
+ {
+ super("action");
+ setSelectAllOnFocus(true);
+ }
+
+ @Override
+ public boolean getFocusTraversalKeysEnabled()
+ {
+ return false;
+ }
+
+ @Override
+ public void processKeyEvent(KeyEvent evt)
+ {
+ evt = KeyEventWorkaround.processKeyEvent(evt);
+ if(evt == null)
+ return;
+
+ switch(evt.getID())
+ {
+ case KeyEvent.KEY_TYPED:
+ char ch = evt.getKeyChar();
+ if(!nonDigit && Character.isDigit(ch))
+ {
+ super.processKeyEvent(evt);
+ repeat = true;
+ repeatCount = Integer.parseInt(action.getText());
+ }
+ else
+ {
+ nonDigit = true;
+ if(repeat)
+ {
+ passToView(evt);
+ }
+ else
+ super.processKeyEvent(evt);
+ }
+ break;
+ case KeyEvent.KEY_PRESSED:
+ int keyCode = evt.getKeyCode();
+ if(evt.isActionKey()
+ || evt.isControlDown()
+ || evt.isAltDown()
+ || evt.isMetaDown()
+ || keyCode == KeyEvent.VK_BACK_SPACE
+ || keyCode == KeyEvent.VK_DELETE
+ || keyCode == KeyEvent.VK_ENTER
+ || keyCode == KeyEvent.VK_TAB
+ || keyCode == KeyEvent.VK_ESCAPE)
+ {
+ nonDigit = true;
+ if(repeat)
+ {
+ passToView(evt);
+ break;
+ }
+ else if(keyCode == KeyEvent.VK_TAB)
+ {
+ complete(true);
+ evt.consume();
+ }
+ else if(keyCode == KeyEvent.VK_ESCAPE)
+ {
+ evt.consume();
+ if(popup != null)
+ {
+ popup.dispose();
+ popup = null;
+ action.requestFocus();
+ }
+ else
+ {
+ if(temp)
+ view.removeToolBar(ActionBar.this);
+ view.getEditPane().focusOnTextArea();
+ }
+ break;
+ }
+ else if((keyCode == KeyEvent.VK_UP
+ || keyCode == KeyEvent.VK_DOWN)
+ && popup != null)
+ {
+ popup.list.processKeyEvent(evt);
+ break;
+ }
+ }
+ super.processKeyEvent(evt);
+ break;
+ }
+ }
+
+ private void passToView(final KeyEvent evt)
+ {
+ if(temp)
+ view.removeToolBar(ActionBar.this);
+ view.getTextArea().requestFocus();
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ view.getTextArea().requestFocus();
+ view.getInputHandler().setRepeatCount(repeatCount);
+ view.getInputHandler().processKeyEvent(evt,
+ View.ACTION_BAR, false);
+ }
+ });
+ }
+
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ repeat = nonDigit = false;
+ }
+ } //}}}
+
+ //{{{ CompletionPopup class
+ private class CompletionPopup extends JWindow
+ {
+ CompletionList list;
+
+ //{{{ CompletionPopup constructor
+ CompletionPopup(String[] actions)
+ {
+ super(view);
+
+ setContentPane(new JPanel(new BorderLayout())
+ {
+ /**
+ * Makes the tab key work in Java 1.4.
+ */
+ @Override
+ public boolean getFocusTraversalKeysEnabled()
+ {
+ return false;
+ }
+ });
+
+ list = new CompletionList(actions);
+ list.setVisibleRowCount(8);
+ list.addMouseListener(new MouseHandler());
+ list.setSelectedIndex(0);
+ list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+
+ // stupid scrollbar policy is an attempt to work around
+ // bugs people have been seeing with IBM's JDK -- 7 Sep 2000
+ JScrollPane scroller = new JScrollPane(list,
+ ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
+ ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+
+ getContentPane().add(scroller, BorderLayout.CENTER);
+
+ GUIUtilities.requestFocus(this,list);
+
+ pack();
+ Point p = new Point(0,-getHeight());
+ SwingUtilities.convertPointToScreen(p,action);
+ setLocation(p);
+ setVisible(true);
+
+ KeyHandler keyHandler = new KeyHandler();
+ addKeyListener(keyHandler);
+ list.addKeyListener(keyHandler);
+ } //}}}
+
+ //{{{ setModel() method
+ void setModel(String[] actions)
+ {
+ list.setListData(actions);
+ list.setSelectedIndex(0);
+ } //}}}
+
+ //{{{ MouseHandler class
+ private class MouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ invoke();
+ }
+ } //}}}
+
+ //{{{ CompletionList class
+ class CompletionList extends JList
+ {
+ CompletionList(Object[] data)
+ {
+ super(data);
+ }
+
+ // we need this public not protected
+ @Override
+ public void processKeyEvent(KeyEvent evt)
+ {
+ super.processKeyEvent(evt);
+ }
+ } //}}}
+
+ //{{{ KeyHandler class
+ private class KeyHandler extends KeyAdapter
+ {
+ @Override
+ public void keyTyped(KeyEvent evt)
+ {
+ action.processKeyEvent(evt);
+ }
+
+ @Override
+ public void keyPressed(KeyEvent evt)
+ {
+ int keyCode = evt.getKeyCode();
+ if(keyCode == KeyEvent.VK_ESCAPE)
+ action.processKeyEvent(evt);
+ else if(keyCode == KeyEvent.VK_ENTER)
+ invoke();
+ else if(keyCode == KeyEvent.VK_UP)
+ {
+ int selected = list.getSelectedIndex();
+ if(selected == 0)
+ {
+ list.setSelectedIndex(
+ list.getModel().getSize()
+ - 1);
+ evt.consume();
+ }
+ }
+ else if(keyCode == KeyEvent.VK_DOWN)
+ {
+ int selected = list.getSelectedIndex();
+ if(selected == list.getModel().getSize() - 1)
+ {
+ list.setSelectedIndex(0);
+ evt.consume();
+ }
+ }
+ }
+ } //}}}
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/AddAbbrevDialog.java b/jEdit/org/gjt/sp/jedit/gui/AddAbbrevDialog.java
index ba54636..ab61f9a 100644
--- a/jEdit/org/gjt/sp/jedit/gui/AddAbbrevDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/AddAbbrevDialog.java
@@ -1,126 +1,126 @@
-/*
- * AddAbbrevDialog.java - Displayed when expanding unknown abbrev
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-import javax.swing.border.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-
-public class AddAbbrevDialog extends JDialog
-{
- public AddAbbrevDialog(View view, String abbrev)
- {
- super(view,jEdit.getProperty("add-abbrev.title"),true);
-
- this.view = view;
-
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- editor = new AbbrevEditor();
- editor.setAbbrev(abbrev);
- editor.setBorder(new EmptyBorder(6,0,12,0));
- content.add(BorderLayout.CENTER,editor);
-
- Box box = new Box(BoxLayout.X_AXIS);
- box.add(Box.createGlue());
- global = new JButton(jEdit.getProperty("add-abbrev.global"));
- global.addActionListener(new ActionHandler());
- box.add(global);
- box.add(Box.createHorizontalStrut(6));
- modeSpecific = new JButton(jEdit.getProperty("add-abbrev.mode"));
- modeSpecific.addActionListener(new ActionHandler());
- box.add(modeSpecific);
- box.add(Box.createHorizontalStrut(6));
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(new ActionHandler());
- box.add(cancel);
- box.add(Box.createGlue());
- content.add(BorderLayout.SOUTH,box);
-
- KeyListener listener = new KeyHandler();
- addKeyListener(listener);
- editor.getBeforeCaretTextArea().addKeyListener(listener);
- editor.getAfterCaretTextArea().addKeyListener(listener);
-
- setDefaultCloseOperation(DISPOSE_ON_CLOSE);
-
- if(abbrev == null)
- GUIUtilities.requestFocus(this,editor.getAbbrevField());
- else
- GUIUtilities.requestFocus(this,editor.getBeforeCaretTextArea());
-
- pack();
- setLocationRelativeTo(view);
- setVisible(true);
- }
-
- // private members
- private View view;
- private AbbrevEditor editor;
- private JButton global;
- private JButton modeSpecific;
- private JButton cancel;
-
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == global)
- {
- String _abbrev = editor.getAbbrev();
- if(_abbrev == null || _abbrev.length() == 0)
- {
- getToolkit().beep();
- return;
- }
- Abbrevs.addGlobalAbbrev(_abbrev,editor.getExpansion());
- Abbrevs.expandAbbrev(view,false);
- }
- else if(source == modeSpecific)
- {
- String _abbrev = editor.getAbbrev();
- if(_abbrev == null || _abbrev.length() == 0)
- {
- getToolkit().beep();
- return;
- }
- Abbrevs.addModeAbbrev(view.getBuffer().getMode().getName(),
- _abbrev,editor.getExpansion());
- Abbrevs.expandAbbrev(view,false);
- }
-
- dispose();
- }
- }
-
- class KeyHandler extends KeyAdapter
- {
- public void keyPressed(KeyEvent evt)
- {
- if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
- dispose();
- }
- }
-}
+/*
+ * AddAbbrevDialog.java - Displayed when expanding unknown abbrev
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+import javax.swing.border.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+
+public class AddAbbrevDialog extends JDialog
+{
+ public AddAbbrevDialog(View view, String abbrev)
+ {
+ super(view,jEdit.getProperty("add-abbrev.title"),false);
+
+ this.view = view;
+
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ editor = new AbbrevEditor();
+ editor.setAbbrev(abbrev);
+ editor.setBorder(new EmptyBorder(6,0,12,0));
+ content.add(BorderLayout.CENTER,editor);
+
+ Box box = new Box(BoxLayout.X_AXIS);
+ box.add(Box.createGlue());
+ global = new JButton(jEdit.getProperty("add-abbrev.global"));
+ global.addActionListener(new ActionHandler());
+ box.add(global);
+ box.add(Box.createHorizontalStrut(6));
+ modeSpecific = new JButton(jEdit.getProperty("add-abbrev.mode"));
+ modeSpecific.addActionListener(new ActionHandler());
+ box.add(modeSpecific);
+ box.add(Box.createHorizontalStrut(6));
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(new ActionHandler());
+ box.add(cancel);
+ box.add(Box.createGlue());
+ content.add(BorderLayout.SOUTH,box);
+
+ KeyListener listener = new KeyHandler();
+ addKeyListener(listener);
+ editor.getBeforeCaretTextArea().addKeyListener(listener);
+ editor.getAfterCaretTextArea().addKeyListener(listener);
+
+ setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+
+ if(abbrev == null)
+ GUIUtilities.requestFocus(this,editor.getAbbrevField());
+ else
+ GUIUtilities.requestFocus(this,editor.getBeforeCaretTextArea());
+
+ pack();
+ setLocationRelativeTo(view);
+ setVisible(true);
+ }
+
+ // private members
+ private View view;
+ private AbbrevEditor editor;
+ private JButton global;
+ private JButton modeSpecific;
+ private JButton cancel;
+
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == global)
+ {
+ String _abbrev = editor.getAbbrev();
+ if(_abbrev == null || _abbrev.length() == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+ Abbrevs.addGlobalAbbrev(_abbrev,editor.getExpansion());
+ Abbrevs.expandAbbrev(view,false);
+ }
+ else if(source == modeSpecific)
+ {
+ String _abbrev = editor.getAbbrev();
+ if(_abbrev == null || _abbrev.length() == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+ Abbrevs.addModeAbbrev(view.getBuffer().getMode().getName(),
+ _abbrev,editor.getExpansion());
+ Abbrevs.expandAbbrev(view,false);
+ }
+
+ dispose();
+ }
+ }
+
+ class KeyHandler extends KeyAdapter
+ {
+ public void keyPressed(KeyEvent evt)
+ {
+ if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
+ dispose();
+ }
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/AnimatedIcon.java b/jEdit/org/gjt/sp/jedit/gui/AnimatedIcon.java
index bf1f478..69618ab 100644
--- a/jEdit/org/gjt/sp/jedit/gui/AnimatedIcon.java
+++ b/jEdit/org/gjt/sp/jedit/gui/AnimatedIcon.java
@@ -1,136 +1,136 @@
-/*
- * AnimatedIcon.java - Animated version of ImageIcon
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Kris Kopicki
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-//}}}
-
-/**
- * A animated version of ImageIcon. It can be used anywhere an ImageIcon can be.
- */
-public class AnimatedIcon extends ImageIcon
-{
- //{{{ AnimatedIcon constructor
- /**
- * @param frames The frames to be used in the animation
- * @param rate The frame rate of the animation, in frames per second
- * @param host The container that the animation is used in
- */
- public AnimatedIcon(Image icon, Image[] frames, int rate, Component host)
- {
- super(icon);
- this.icon = icon;
- this.frames = frames;
- delay = 1000/rate;
- this.host = host;
- } //}}}
-
- //{{{ getFrames() method
- public Image[] getFrames()
- {
- return frames;
- } //}}}
-
- //{{{ getIcon() method
- public Image getIcon()
- {
- return icon;
- } //}}}
-
- //{{{ getRate() method
- public int getRate()
- {
- return 1000/delay;
- } //}}}
-
- //{{{ setFrames() method
- public void setFrames(Image[] frames)
- {
- this.frames = frames;
- } //}}}
-
- //{{{ setIcon() method
- public void setIcon(Image icon)
- {
- this.icon = icon;
- } //}}}
-
- //{{{ setRate() method
- public void setRate(int rate)
- {
- delay = 1000/rate;
- } //}}}
-
- //{{{ start() method
- /**
- * Starts the animation rolling
- */
- public void start()
- {
- if(timer != null)
- return;
-
- timer = new Timer(delay,new Animator());
- timer.start();
- } //}}}
-
- //{{{ stop() method
- /**
- * Stops the animation, and resets to frame 0
- */
- public void stop()
- {
- current = 0;
- if(timer != null)
- {
- timer.stop();
- timer = null;
- }
-
- setImage(icon);
- host.repaint();
- } //}}}
-
- //{{{ Private members
- private Image[] frames;
- private int current;
- private int delay;
- private Timer timer;
- private Component host;
- private Image icon;
- //}}}
-
- //{{{ Animator class
- class Animator implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- current = (current + 1) % frames.length;
- setImage(frames[current]);
- host.repaint();
- }
- } //}}}
-}
+/*
+ * AnimatedIcon.java - Animated version of ImageIcon
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Kris Kopicki
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+//}}}
+
+/**
+ * A animated version of ImageIcon. It can be used anywhere an ImageIcon can be.
+ */
+public class AnimatedIcon extends ImageIcon
+{
+ //{{{ AnimatedIcon constructor
+ /**
+ * @param frames The frames to be used in the animation
+ * @param rate The frame rate of the animation, in frames per second
+ * @param host The container that the animation is used in
+ */
+ public AnimatedIcon(Image icon, Image[] frames, int rate, Component host)
+ {
+ super(icon);
+ this.icon = icon;
+ this.frames = frames;
+ delay = 1000/rate;
+ this.host = host;
+ } //}}}
+
+ //{{{ getFrames() method
+ public Image[] getFrames()
+ {
+ return frames;
+ } //}}}
+
+ //{{{ getIcon() method
+ public Image getIcon()
+ {
+ return icon;
+ } //}}}
+
+ //{{{ getRate() method
+ public int getRate()
+ {
+ return 1000/delay;
+ } //}}}
+
+ //{{{ setFrames() method
+ public void setFrames(Image[] frames)
+ {
+ this.frames = frames;
+ } //}}}
+
+ //{{{ setIcon() method
+ public void setIcon(Image icon)
+ {
+ this.icon = icon;
+ } //}}}
+
+ //{{{ setRate() method
+ public void setRate(int rate)
+ {
+ delay = 1000/rate;
+ } //}}}
+
+ //{{{ start() method
+ /**
+ * Starts the animation rolling
+ */
+ public void start()
+ {
+ if(timer != null)
+ return;
+
+ timer = new Timer(delay,new Animator());
+ timer.start();
+ } //}}}
+
+ //{{{ stop() method
+ /**
+ * Stops the animation, and resets to frame 0
+ */
+ public void stop()
+ {
+ current = 0;
+ if(timer != null)
+ {
+ timer.stop();
+ timer = null;
+ }
+
+ setImage(icon);
+ host.repaint();
+ } //}}}
+
+ //{{{ Private members
+ private Image[] frames;
+ private int current;
+ private int delay;
+ private Timer timer;
+ private Component host;
+ private Image icon;
+ //}}}
+
+ //{{{ Animator class
+ class Animator implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ current = (current + 1) % frames.length;
+ setImage(frames[current]);
+ host.repaint();
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/BeanShellErrorDialog.java b/jEdit/org/gjt/sp/jedit/gui/BeanShellErrorDialog.java
index 28ce6fd..0ed3845 100644
--- a/jEdit/org/gjt/sp/jedit/gui/BeanShellErrorDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/BeanShellErrorDialog.java
@@ -1,50 +1,50 @@
-/*
- * BeanShellErrorDialog.java - BeanShell execution error dialog box
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * A dialog box showing a stack trace. Perhaps badly named, since any error, not
- * just a BeanShell error can be shown.
- * @author Slava Pestov
- * @version $Id: BeanShellErrorDialog.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class BeanShellErrorDialog extends TextAreaDialog
-{
- public BeanShellErrorDialog(Frame frame, Throwable t)
- {
- super(frame,"beanshell-error",t);
- }
-
- // for ABI compatibility
- public BeanShellErrorDialog(View view, Throwable t)
- {
- this((Frame)view,t);
- }
-}
+/*
+ * BeanShellErrorDialog.java - BeanShell execution error dialog box
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * A dialog box showing a stack trace. Perhaps badly named, since any error, not
+ * just a BeanShell error can be shown.
+ * @author Slava Pestov
+ * @version $Id: BeanShellErrorDialog.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class BeanShellErrorDialog extends TextAreaDialog
+{
+ public BeanShellErrorDialog(Frame frame, Throwable t)
+ {
+ super(frame,"beanshell-error",t);
+ }
+
+ // for ABI compatibility
+ public BeanShellErrorDialog(View view, Throwable t)
+ {
+ this((Frame)view,t);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/BufferOptions.java b/jEdit/org/gjt/sp/jedit/gui/BufferOptions.java
index 20e9501..68f624d 100644
--- a/jEdit/org/gjt/sp/jedit/gui/BufferOptions.java
+++ b/jEdit/org/gjt/sp/jedit/gui/BufferOptions.java
@@ -1,141 +1,141 @@
-/*
- * BufferOptions.java - Buffer-specific options dialog
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-
-//{{{ Imports
-
-import javax.swing.border.EmptyBorder;
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.*;
-
-import java.util.Arrays;
-
-import org.gjt.sp.jedit.buffer.FoldHandler;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.options.BufferOptionPane;
-
-import org.gjt.sp.jedit.*;
-
-//}}}
-
-/**
-
- * Buffer-specific options dialog.
- * @author Slava Pestov
- * @version $Id: BufferOptions.java 12504 2008-04-22 23:12:43Z ezust $
- *
- */
-
-public class BufferOptions extends EnhancedDialog
-{
- //{{{ BufferOptions constructor
-
- public BufferOptions(View view, Buffer buffer)
- {
- super(view,jEdit.getProperty("buffer-options.title"),true);
- this.view = view;
- this.buffer = buffer;
-
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- ActionHandler actionListener = new ActionHandler();
- panel = new BufferOptionPane();
-
- content.add(BorderLayout.NORTH,panel);
-
- //{{{ Buttons
-
- JPanel buttons = new JPanel();
- buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
- buttons.setBorder(new EmptyBorder(12,0,0,0));
- buttons.add(Box.createGlue());
-
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(actionListener);
- getRootPane().setDefaultButton(ok);
- buttons.add(ok);
-
- buttons.add(Box.createHorizontalStrut(6));
-
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(actionListener);
- buttons.add(cancel);
-
- buttons.add(Box.createGlue());
- content.add(BorderLayout.SOUTH,buttons);
-
- //}}}
-
- pack();
- setLocationRelativeTo(view);
- setVisible(true);
- } //}}}
-
-
-
- //{{{ ok() method
-
- public void ok()
- {
- panel.save();
- dispose();
- } //}}}
-
- //{{{ cancel() method
-
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ Private members
-
- private View view;
- private Buffer buffer;
- private BufferOptionPane panel;
- private JButton ok;
- private JButton cancel;
-
- //{{{ ActionHandler class
-
- class ActionHandler implements ActionListener
- {
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == ok)
- ok();
- else if(source == cancel)
- cancel();
- } //}}}
-
- } //}}}
-
- //}}}
-}
-
+/*
+ * BufferOptions.java - Buffer-specific options dialog
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+
+//{{{ Imports
+
+import javax.swing.border.EmptyBorder;
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.*;
+
+import java.util.Arrays;
+
+import org.gjt.sp.jedit.buffer.FoldHandler;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.options.BufferOptionPane;
+
+import org.gjt.sp.jedit.*;
+
+//}}}
+
+/**
+
+ * Buffer-specific options dialog.
+ * @author Slava Pestov
+ * @version $Id: BufferOptions.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ */
+
+public class BufferOptions extends EnhancedDialog
+{
+ //{{{ BufferOptions constructor
+
+ public BufferOptions(View view, Buffer buffer)
+ {
+ super(view,jEdit.getProperty("buffer-options.title"),true);
+ this.view = view;
+ this.buffer = buffer;
+
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ ActionHandler actionListener = new ActionHandler();
+ panel = new BufferOptionPane();
+
+ content.add(BorderLayout.NORTH,panel);
+
+ //{{{ Buttons
+
+ JPanel buttons = new JPanel();
+ buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
+ buttons.setBorder(new EmptyBorder(12,0,0,0));
+ buttons.add(Box.createGlue());
+
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(actionListener);
+ getRootPane().setDefaultButton(ok);
+ buttons.add(ok);
+
+ buttons.add(Box.createHorizontalStrut(6));
+
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(actionListener);
+ buttons.add(cancel);
+
+ buttons.add(Box.createGlue());
+ content.add(BorderLayout.SOUTH,buttons);
+
+ //}}}
+
+ pack();
+ setLocationRelativeTo(view);
+ setVisible(true);
+ } //}}}
+
+
+
+ //{{{ ok() method
+
+ public void ok()
+ {
+ panel.save();
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ Private members
+
+ private View view;
+ private Buffer buffer;
+ private BufferOptionPane panel;
+ private JButton ok;
+ private JButton cancel;
+
+ //{{{ ActionHandler class
+
+ class ActionHandler implements ActionListener
+ {
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == ok)
+ ok();
+ else if(source == cancel)
+ cancel();
+ } //}}}
+
+ } //}}}
+
+ //}}}
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/gui/BufferSwitcher.java b/jEdit/org/gjt/sp/jedit/gui/BufferSwitcher.java
index beaca36..f8ceaac 100644
--- a/jEdit/org/gjt/sp/jedit/gui/BufferSwitcher.java
+++ b/jEdit/org/gjt/sp/jedit/gui/BufferSwitcher.java
@@ -1,114 +1,125 @@
-/*
- * BufferSwitcher.java - Status bar
- * Copyright (C) 2000, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-import javax.swing.event.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.bufferset.BufferSet;
-
-
-/** BufferSwitcher class
- @version $Id: BufferSwitcher.java 16348 2009-10-14 10:40:15Z kpouer $
-*/
-public class BufferSwitcher extends JComboBox
-{
- // private members
- private EditPane editPane;
- private boolean updating;
-
- public BufferSwitcher(final EditPane editPane)
- {
- this.editPane = editPane;
-
- //setFont(new Font("Dialog",Font.BOLD,10));
- setRenderer(new BufferCellRenderer());
- setMaximumRowCount(jEdit.getIntegerProperty("bufferSwitcher.maxRowCount",10));
- addActionListener(new ActionHandler());
- addPopupMenuListener(new PopupMenuListener()
- {
- public void popupMenuWillBecomeVisible(
- PopupMenuEvent e) {}
-
- public void popupMenuWillBecomeInvisible(
- PopupMenuEvent e)
- {
- editPane.getTextArea().requestFocus();
- }
-
- public void popupMenuCanceled(PopupMenuEvent e)
- {
- editPane.getTextArea().requestFocus();
- }
- });
- }
-
- public void updateBufferList()
- {
- // if the buffer count becomes 0, then it is guaranteed to
- // become 1 very soon, so don't do anything in that case.
- BufferSet bufferSet = editPane.getBufferSet();
- if(bufferSet.size() == 0)
- return;
-
- updating = true;
- setMaximumRowCount(jEdit.getIntegerProperty("bufferSwitcher.maxRowCount",10));
- setModel(new DefaultComboBoxModel(bufferSet.getAllBuffers()));
- setSelectedItem(editPane.getBuffer());
- setToolTipText(editPane.getBuffer().getPath(true));
- updating = false;
- }
-
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(!updating)
- {
- Buffer buffer = (Buffer)getSelectedItem();
- if(buffer != null)
- editPane.setBuffer(buffer);
- }
- }
- }
-
- class BufferCellRenderer extends DefaultListCellRenderer
- {
- public Component getListCellRendererComponent(
- JList list, Object value, int index,
- boolean isSelected, boolean cellHasFocus)
- {
- super.getListCellRendererComponent(list,value,index,
- isSelected,cellHasFocus);
- Buffer buffer = (Buffer)value;
-
- if(buffer == null)
- setIcon(null);
- else
- {
- setIcon(buffer.getIcon());
- setToolTipText(buffer.getPath());
- }
- return this;
- }
- }
-}
+/*
+ * BufferSwitcher.java - Status bar
+ * Copyright (C) 2000, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.event.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.bufferset.BufferSet;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.util.ThreadUtilities;
+//}}}
+
+/** BufferSwitcher class
+ @version $Id: BufferSwitcher.java 17534 2010-03-25 23:07:15Z kpouer $
+*/
+public class BufferSwitcher extends JComboBox
+{
+ // private members
+ private final EditPane editPane;
+ private boolean updating;
+
+ public BufferSwitcher(final EditPane editPane)
+ {
+ this.editPane = editPane;
+
+ //setFont(new Font("Dialog",Font.BOLD,10));
+ setRenderer(new BufferCellRenderer());
+ setMaximumRowCount(jEdit.getIntegerProperty("bufferSwitcher.maxRowCount",10));
+ addActionListener(new ActionHandler());
+ addPopupMenuListener(new PopupMenuListener()
+ {
+ public void popupMenuWillBecomeVisible(
+ PopupMenuEvent e) {}
+
+ public void popupMenuWillBecomeInvisible(
+ PopupMenuEvent e)
+ {
+ editPane.getTextArea().requestFocus();
+ }
+
+ public void popupMenuCanceled(PopupMenuEvent e)
+ {
+ editPane.getTextArea().requestFocus();
+ }
+ });
+ }
+
+ public void updateBufferList()
+ {
+ // if the buffer count becomes 0, then it is guaranteed to
+ // become 1 very soon, so don't do anything in that case.
+ final BufferSet bufferSet = editPane.getBufferSet();
+ if(bufferSet.size() == 0)
+ return;
+
+ Runnable runnable = new Runnable()
+ {
+ public void run()
+ {
+ updating = true;
+ setMaximumRowCount(jEdit.getIntegerProperty("bufferSwitcher.maxRowCount",10));
+ setModel(new DefaultComboBoxModel(bufferSet.getAllBuffers()));
+ setSelectedItem(editPane.getBuffer());
+ setToolTipText(editPane.getBuffer().getPath(true));
+ updating = false;
+ }
+ };
+ ThreadUtilities.runInDispatchThread(runnable);
+ }
+
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(!updating)
+ {
+ Buffer buffer = (Buffer)getSelectedItem();
+ if(buffer != null)
+ editPane.setBuffer(buffer);
+ }
+ }
+ }
+
+ static class BufferCellRenderer extends DefaultListCellRenderer
+ {
+ @Override
+ public Component getListCellRendererComponent(
+ JList list, Object value, int index,
+ boolean isSelected, boolean cellHasFocus)
+ {
+ super.getListCellRendererComponent(list,value,index,
+ isSelected,cellHasFocus);
+ Buffer buffer = (Buffer)value;
+
+ if(buffer == null)
+ setIcon(null);
+ else
+ {
+ setIcon(buffer.getIcon());
+ setToolTipText(buffer.getPath());
+ }
+ return this;
+ }
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/CloseDialog.java b/jEdit/org/gjt/sp/jedit/gui/CloseDialog.java
index 79758e4..01d92dc 100644
--- a/jEdit/org/gjt/sp/jedit/gui/CloseDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/CloseDialog.java
@@ -1,261 +1,261 @@
-/*
- * CloseDialog.java - Close all buffers dialog
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.util.Collection;
-import java.util.Arrays;
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.bufferio.BufferIORequest;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * @author Slava Pestov
- */
-public class CloseDialog extends EnhancedDialog
-{
- //{{{ CloseDialog constructor
- public CloseDialog(View view)
- {
- this(view, Arrays.asList(jEdit.getBuffers()));
- }
-
- public CloseDialog(View view, Collection<Buffer> buffers)
- {
- super(view,jEdit.getProperty("close.title"),true);
-
- this.view = view;
-
- JPanel content = new JPanel(new BorderLayout(12,12));
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- Box iconBox = new Box(BoxLayout.Y_AXIS);
- iconBox.add(new JLabel(UIManager.getIcon("OptionPane.warningIcon")));
- iconBox.add(Box.createGlue());
- content.add(BorderLayout.WEST,iconBox);
-
- JPanel centerPanel = new JPanel(new BorderLayout());
-
- JLabel label = new JLabel(jEdit.getProperty("close.caption"));
- label.setBorder(new EmptyBorder(0,0,6,0));
- centerPanel.add(BorderLayout.NORTH,label);
-
- bufferList = new JList(bufferModel = new DefaultListModel());
- bufferList.setVisibleRowCount(10);
- bufferList.addListSelectionListener(new ListHandler());
-
- for(Buffer buffer: buffers)
- {
- if(buffer.isDirty())
- bufferModel.addElement(buffer.getPath());
- }
-
- centerPanel.add(BorderLayout.CENTER,new JScrollPane(bufferList));
-
- content.add(BorderLayout.CENTER,centerPanel);
-
- ActionHandler actionListener = new ActionHandler();
-
- Box buttons = new Box(BoxLayout.X_AXIS);
- buttons.add(Box.createGlue());
- buttons.add(selectAll = new JButton(jEdit.getProperty("close.selectAll")));
- selectAll.setMnemonic(jEdit.getProperty("close.selectAll.mnemonic").charAt(0));
- selectAll.addActionListener(actionListener);
- buttons.add(Box.createHorizontalStrut(6));
- buttons.add(save = new JButton(jEdit.getProperty("close.save")));
- save.setMnemonic(jEdit.getProperty("close.save.mnemonic").charAt(0));
- save.addActionListener(actionListener);
- buttons.add(Box.createHorizontalStrut(6));
- buttons.add(discard = new JButton(jEdit.getProperty("close.discard")));
- discard.setMnemonic(jEdit.getProperty("close.discard.mnemonic").charAt(0));
- discard.addActionListener(actionListener);
- buttons.add(Box.createHorizontalStrut(6));
- buttons.add(cancel = new JButton(jEdit.getProperty("common.cancel")));
- cancel.addActionListener(actionListener);
- buttons.add(Box.createGlue());
- bufferList.setSelectedIndex(0);
- content.add(BorderLayout.SOUTH,buttons);
- content.getRootPane().setDefaultButton(cancel);
- GUIUtilities.requestFocus(this,bufferList);
- pack();
- setLocationRelativeTo(view);
- setVisible(true);
- } //}}}
-
- //{{{ isOK() method
- public boolean isOK()
- {
- return ok;
- } //}}}
-
- //{{{ ok() method
- @Override
- public void ok()
- {
- // do nothing
- } //}}}
-
- //{{{ cancel() method
- @Override
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ Private members
- private final View view;
- private final JList bufferList;
- private final DefaultListModel bufferModel;
- private final JButton selectAll;
- private final JButton save;
- private final JButton discard;
- private final JButton cancel;
-
- private boolean ok; // only set if all buffers saved/closed
-
- boolean selectAllFlag;
-
- private void updateButtons()
- {
- int index = bufferList.getSelectedIndex();
- save.getModel().setEnabled(index != -1);
- discard.getModel().setEnabled(index != -1);
- } //}}}
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == selectAll)
- {
- // I'm too tired to think of a better way
- // to handle this right now.
- try
- {
- selectAllFlag = true;
-
- bufferList.setSelectionInterval(0,
- bufferModel.getSize() - 1);
- }
- finally
- {
- selectAllFlag = false;
- }
- bufferList.requestFocus();
- }
- else if(source == save)
- {
- Object[] paths = bufferList.getSelectedValues();
-
- for(int i = 0; i < paths.length; i++)
- {
- String path = (String)paths[i];
- Buffer buffer = jEdit.getBuffer(path);
- if(!buffer.save(view,null,true,true))
- return;
- VFSManager.waitForRequests();
- if(buffer.getBooleanProperty(BufferIORequest
- .ERROR_OCCURRED))
- return;
- jEdit._closeBuffer(view,buffer);
- bufferModel.removeElement(path);
- }
-
- if(bufferModel.getSize() == 0)
- {
- ok = true;
- dispose();
- }
- else
- {
- bufferList.setSelectedIndex(0);
- bufferList.requestFocus();
- }
- }
- else if(source == discard)
- {
- Object[] paths = bufferList.getSelectedValues();
-
- for(int i = 0; i < paths.length; i++)
- {
- String path = (String)paths[i];
- Buffer buffer = jEdit.getBuffer(path);
- jEdit._closeBuffer(view,buffer);
- bufferModel.removeElement(path);
- }
-
- if(bufferModel.getSize() == 0)
- {
- ok = true;
- dispose();
- }
- else
- {
- bufferList.setSelectedIndex(0);
- bufferList.requestFocus();
- }
- }
- else if(source == cancel)
- cancel();
- }
- } //}}}
-
- //{{{ ListHandler class
- private class ListHandler implements ListSelectionListener
- {
- public void valueChanged(ListSelectionEvent evt)
- {
- if(selectAllFlag)
- return;
-
- int index = bufferList.getSelectedIndex();
- if(index != -1)
- {
- String path = (String) bufferModel.getElementAt(index);
- Buffer buffer = jEdit.getBuffer(path);
- if (buffer == null)
- {
- // it seems this buffer was already closed
- Log.log(Log.DEBUG, this, "Buffer " + path + " is already closed");
- bufferModel.removeElementAt(index);
- }
- else
- {
- view.showBuffer(buffer);
- }
- }
-
- updateButtons();
- }
- } //}}}
-}
+/*
+ * CloseDialog.java - Close all buffers dialog
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.util.Collection;
+import java.util.Arrays;
+import javax.swing.border.*;
+import javax.swing.event.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.bufferio.BufferIORequest;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * @author Slava Pestov
+ */
+public class CloseDialog extends EnhancedDialog
+{
+ //{{{ CloseDialog constructor
+ public CloseDialog(View view)
+ {
+ this(view, Arrays.asList(jEdit.getBuffers()));
+ }
+
+ public CloseDialog(View view, Collection<Buffer> buffers)
+ {
+ super(view,jEdit.getProperty("close.title"),true);
+
+ this.view = view;
+
+ JPanel content = new JPanel(new BorderLayout(12,12));
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ Box iconBox = new Box(BoxLayout.Y_AXIS);
+ iconBox.add(new JLabel(UIManager.getIcon("OptionPane.warningIcon")));
+ iconBox.add(Box.createGlue());
+ content.add(BorderLayout.WEST,iconBox);
+
+ JPanel centerPanel = new JPanel(new BorderLayout());
+
+ JLabel label = new JLabel(jEdit.getProperty("close.caption"));
+ label.setBorder(new EmptyBorder(0,0,6,0));
+ centerPanel.add(BorderLayout.NORTH,label);
+
+ bufferList = new JList(bufferModel = new DefaultListModel());
+ bufferList.setVisibleRowCount(10);
+ bufferList.addListSelectionListener(new ListHandler());
+
+ for(Buffer buffer: buffers)
+ {
+ if(buffer.isDirty())
+ bufferModel.addElement(buffer.getPath());
+ }
+
+ centerPanel.add(BorderLayout.CENTER,new JScrollPane(bufferList));
+
+ content.add(BorderLayout.CENTER,centerPanel);
+
+ ActionHandler actionListener = new ActionHandler();
+
+ Box buttons = new Box(BoxLayout.X_AXIS);
+ buttons.add(Box.createGlue());
+ buttons.add(selectAll = new JButton(jEdit.getProperty("close.selectAll")));
+ selectAll.setMnemonic(jEdit.getProperty("close.selectAll.mnemonic").charAt(0));
+ selectAll.addActionListener(actionListener);
+ buttons.add(Box.createHorizontalStrut(6));
+ buttons.add(save = new JButton(jEdit.getProperty("close.save")));
+ save.setMnemonic(jEdit.getProperty("close.save.mnemonic").charAt(0));
+ save.addActionListener(actionListener);
+ buttons.add(Box.createHorizontalStrut(6));
+ buttons.add(discard = new JButton(jEdit.getProperty("close.discard")));
+ discard.setMnemonic(jEdit.getProperty("close.discard.mnemonic").charAt(0));
+ discard.addActionListener(actionListener);
+ buttons.add(Box.createHorizontalStrut(6));
+ buttons.add(cancel = new JButton(jEdit.getProperty("common.cancel")));
+ cancel.addActionListener(actionListener);
+ buttons.add(Box.createGlue());
+ bufferList.setSelectedIndex(0);
+ content.add(BorderLayout.SOUTH,buttons);
+ content.getRootPane().setDefaultButton(cancel);
+ GUIUtilities.requestFocus(this,bufferList);
+ pack();
+ setLocationRelativeTo(view);
+ setVisible(true);
+ } //}}}
+
+ //{{{ isOK() method
+ public boolean isOK()
+ {
+ return ok;
+ } //}}}
+
+ //{{{ ok() method
+ @Override
+ public void ok()
+ {
+ // do nothing
+ } //}}}
+
+ //{{{ cancel() method
+ @Override
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ Private members
+ private final View view;
+ private final JList bufferList;
+ private final DefaultListModel bufferModel;
+ private final JButton selectAll;
+ private final JButton save;
+ private final JButton discard;
+ private final JButton cancel;
+
+ private boolean ok; // only set if all buffers saved/closed
+
+ boolean selectAllFlag;
+
+ private void updateButtons()
+ {
+ int index = bufferList.getSelectedIndex();
+ save.getModel().setEnabled(index != -1);
+ discard.getModel().setEnabled(index != -1);
+ } //}}}
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == selectAll)
+ {
+ // I'm too tired to think of a better way
+ // to handle this right now.
+ try
+ {
+ selectAllFlag = true;
+
+ bufferList.setSelectionInterval(0,
+ bufferModel.getSize() - 1);
+ }
+ finally
+ {
+ selectAllFlag = false;
+ }
+ bufferList.requestFocus();
+ }
+ else if(source == save)
+ {
+ Object[] paths = bufferList.getSelectedValues();
+
+ for(int i = 0; i < paths.length; i++)
+ {
+ String path = (String)paths[i];
+ Buffer buffer = jEdit.getBuffer(path);
+ if(!buffer.save(view,null,true,true))
+ return;
+ VFSManager.waitForRequests();
+ if(buffer.getBooleanProperty(BufferIORequest
+ .ERROR_OCCURRED))
+ return;
+ jEdit._closeBuffer(view,buffer);
+ bufferModel.removeElement(path);
+ }
+
+ if(bufferModel.getSize() == 0)
+ {
+ ok = true;
+ dispose();
+ }
+ else
+ {
+ bufferList.setSelectedIndex(0);
+ bufferList.requestFocus();
+ }
+ }
+ else if(source == discard)
+ {
+ Object[] paths = bufferList.getSelectedValues();
+
+ for(int i = 0; i < paths.length; i++)
+ {
+ String path = (String)paths[i];
+ Buffer buffer = jEdit.getBuffer(path);
+ jEdit._closeBuffer(view,buffer);
+ bufferModel.removeElement(path);
+ }
+
+ if(bufferModel.getSize() == 0)
+ {
+ ok = true;
+ dispose();
+ }
+ else
+ {
+ bufferList.setSelectedIndex(0);
+ bufferList.requestFocus();
+ }
+ }
+ else if(source == cancel)
+ cancel();
+ }
+ } //}}}
+
+ //{{{ ListHandler class
+ private class ListHandler implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent evt)
+ {
+ if(selectAllFlag)
+ return;
+
+ int index = bufferList.getSelectedIndex();
+ if(index != -1)
+ {
+ String path = (String) bufferModel.getElementAt(index);
+ Buffer buffer = jEdit.getBuffer(path);
+ if (buffer == null)
+ {
+ // it seems this buffer was already closed
+ Log.log(Log.DEBUG, this, "Buffer " + path + " is already closed");
+ bufferModel.removeElementAt(index);
+ }
+ else
+ {
+ view.showBuffer(buffer);
+ }
+ }
+
+ updateButtons();
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/ColorWellButton.java b/jEdit/org/gjt/sp/jedit/gui/ColorWellButton.java
index 08765d5..b0eef36 100644
--- a/jEdit/org/gjt/sp/jedit/gui/ColorWellButton.java
+++ b/jEdit/org/gjt/sp/jedit/gui/ColorWellButton.java
@@ -1,205 +1,205 @@
-/*
- * ColorWellButton.java - Shows color chooser when clicked
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.OperatingSystem;
-//}}}
-
-/**
- * A button that, when clicked, shows a color chooser.
- *
- * You can get and set the currently selected color using
- * {@link #getSelectedColor()} and {@link #setSelectedColor(Color)}.
- * @author Slava Pestov
- * @version $Id: ColorWellButton.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class ColorWellButton extends JButton
-{
- //{{{ ColorWellButton constructor
- public ColorWellButton(Color color)
- {
- setIcon(new ColorWell(color));
- setMargin(new Insets(2,2,2,2));
- addActionListener(new ActionHandler());
-
- // according to krisk this looks better on OS X...
- if(OperatingSystem.isMacOSLF())
- putClientProperty("JButton.buttonType","toolbar");
- } //}}}
-
- //{{{ getSelectedColor() method
- public Color getSelectedColor()
- {
- return ((ColorWell)getIcon()).color;
- } //}}}
-
- //{{{ setSelectedColor() method
- public void setSelectedColor(Color color)
- {
- ((ColorWell)getIcon()).color = color;
- repaint();
- } //}}}
-
- //{{{ ColorWell class
- static class ColorWell implements Icon
- {
- Color color;
-
- ColorWell(Color color)
- {
- this.color = color;
- }
-
- public int getIconWidth()
- {
- return 35;
- }
-
- public int getIconHeight()
- {
- return 10;
- }
-
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- if(color == null)
- return;
-
- g.setColor(color);
- g.fillRect(x,y,getIconWidth(),getIconHeight());
- g.setColor(color.darker());
- g.drawRect(x,y,getIconWidth()-1,getIconHeight()-1);
- }
- } //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- JDialog parent = GUIUtilities.getParentDialog(ColorWellButton.this);
- JDialog dialog;
- if (parent != null)
- {
- dialog = new ColorPickerDialog(parent,
- jEdit.getProperty("colorChooser.title"),
- true);
- }
- else
- {
- dialog = new ColorPickerDialog(
- JOptionPane.getFrameForComponent(
- ColorWellButton.this),
- jEdit.getProperty("colorChooser.title"),
- true);
- }
- dialog.pack();
- dialog.setVisible(true);
- }
- } //}}}
-
- //{{{ ColorPickerDialog class
- /**
- * Replacement for the color picker dialog provided with Swing. This version
- * supports dialog as well as frame parents.
- * @since jEdit 4.1pre7
- */
- private class ColorPickerDialog extends EnhancedDialog implements ActionListener
- {
- public ColorPickerDialog(Frame parent, String title, boolean modal)
- {
- super(parent,title,modal);
-
- init();
- }
-
- public ColorPickerDialog(Dialog parent, String title, boolean modal)
- {
- super(parent,title,modal);
-
- getContentPane().setLayout(new BorderLayout());
-
- init();
- }
-
- public void ok()
- {
- Color c = chooser.getColor();
- if (c != null)
- setSelectedColor(c);
- setVisible(false);
- }
-
- public void cancel()
- {
- setVisible(false);
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- if (evt.getSource() == ok)
- ok();
- else
- cancel();
- }
-
- //{{{ Private members
- private JColorChooser chooser;
- private JButton ok;
- private JButton cancel;
-
- private void init()
- {
- Color c = getSelectedColor();
- if(c == null)
- chooser = new JColorChooser();
- else
- chooser = new JColorChooser(c);
-
- getContentPane().add(BorderLayout.CENTER, chooser);
-
- Box buttons = new Box(BoxLayout.X_AXIS);
- buttons.add(Box.createGlue());
-
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(this);
- buttons.add(ok);
- buttons.add(Box.createHorizontalStrut(6));
- getRootPane().setDefaultButton(ok);
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(this);
- buttons.add(cancel);
- buttons.add(Box.createGlue());
-
- getContentPane().add(BorderLayout.SOUTH, buttons);
- pack();
- setLocationRelativeTo(getParent());
- } //}}}
- } //}}}
-}
+/*
+ * ColorWellButton.java - Shows color chooser when clicked
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.OperatingSystem;
+//}}}
+
+/**
+ * A button that, when clicked, shows a color chooser.
+ *
+ * You can get and set the currently selected color using
+ * {@link #getSelectedColor()} and {@link #setSelectedColor(Color)}.
+ * @author Slava Pestov
+ * @version $Id: ColorWellButton.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class ColorWellButton extends JButton
+{
+ //{{{ ColorWellButton constructor
+ public ColorWellButton(Color color)
+ {
+ setIcon(new ColorWell(color));
+ setMargin(new Insets(2,2,2,2));
+ addActionListener(new ActionHandler());
+
+ // according to krisk this looks better on OS X...
+ if(OperatingSystem.isMacOSLF())
+ putClientProperty("JButton.buttonType","toolbar");
+ } //}}}
+
+ //{{{ getSelectedColor() method
+ public Color getSelectedColor()
+ {
+ return ((ColorWell)getIcon()).color;
+ } //}}}
+
+ //{{{ setSelectedColor() method
+ public void setSelectedColor(Color color)
+ {
+ ((ColorWell)getIcon()).color = color;
+ repaint();
+ } //}}}
+
+ //{{{ ColorWell class
+ static class ColorWell implements Icon
+ {
+ Color color;
+
+ ColorWell(Color color)
+ {
+ this.color = color;
+ }
+
+ public int getIconWidth()
+ {
+ return 35;
+ }
+
+ public int getIconHeight()
+ {
+ return 10;
+ }
+
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ if(color == null)
+ return;
+
+ g.setColor(color);
+ g.fillRect(x,y,getIconWidth(),getIconHeight());
+ g.setColor(color.darker());
+ g.drawRect(x,y,getIconWidth()-1,getIconHeight()-1);
+ }
+ } //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ JDialog parent = GUIUtilities.getParentDialog(ColorWellButton.this);
+ JDialog dialog;
+ if (parent != null)
+ {
+ dialog = new ColorPickerDialog(parent,
+ jEdit.getProperty("colorChooser.title"),
+ true);
+ }
+ else
+ {
+ dialog = new ColorPickerDialog(
+ JOptionPane.getFrameForComponent(
+ ColorWellButton.this),
+ jEdit.getProperty("colorChooser.title"),
+ true);
+ }
+ dialog.pack();
+ dialog.setVisible(true);
+ }
+ } //}}}
+
+ //{{{ ColorPickerDialog class
+ /**
+ * Replacement for the color picker dialog provided with Swing. This version
+ * supports dialog as well as frame parents.
+ * @since jEdit 4.1pre7
+ */
+ private class ColorPickerDialog extends EnhancedDialog implements ActionListener
+ {
+ public ColorPickerDialog(Frame parent, String title, boolean modal)
+ {
+ super(parent,title,modal);
+
+ init();
+ }
+
+ public ColorPickerDialog(Dialog parent, String title, boolean modal)
+ {
+ super(parent,title,modal);
+
+ getContentPane().setLayout(new BorderLayout());
+
+ init();
+ }
+
+ public void ok()
+ {
+ Color c = chooser.getColor();
+ if (c != null)
+ setSelectedColor(c);
+ setVisible(false);
+ }
+
+ public void cancel()
+ {
+ setVisible(false);
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ if (evt.getSource() == ok)
+ ok();
+ else
+ cancel();
+ }
+
+ //{{{ Private members
+ private JColorChooser chooser;
+ private JButton ok;
+ private JButton cancel;
+
+ private void init()
+ {
+ Color c = getSelectedColor();
+ if(c == null)
+ chooser = new JColorChooser();
+ else
+ chooser = new JColorChooser(c);
+
+ getContentPane().add(BorderLayout.CENTER, chooser);
+
+ Box buttons = new Box(BoxLayout.X_AXIS);
+ buttons.add(Box.createGlue());
+
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(this);
+ buttons.add(ok);
+ buttons.add(Box.createHorizontalStrut(6));
+ getRootPane().setDefaultButton(ok);
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(this);
+ buttons.add(cancel);
+ buttons.add(Box.createGlue());
+
+ getContentPane().add(BorderLayout.SOUTH, buttons);
+ pack();
+ setLocationRelativeTo(getParent());
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/CompleteWord.java b/jEdit/org/gjt/sp/jedit/gui/CompleteWord.java
index 73b9e68..a782074 100644
--- a/jEdit/org/gjt/sp/jedit/gui/CompleteWord.java
+++ b/jEdit/org/gjt/sp/jedit/gui/CompleteWord.java
@@ -1,509 +1,509 @@
-/*
- * CompleteWord.java - Complete word dialog
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.Component;
-import java.awt.Font;
-import java.awt.Point;
-
-import java.awt.event.KeyEvent;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.Arrays;
-import java.util.Collection;
-
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.JList;
-import javax.swing.SwingUtilities;
-
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.EditPane;
-import org.gjt.sp.jedit.visitors.JEditVisitorAdapter;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.MiscUtilities;
-import org.gjt.sp.jedit.TextUtilities;
-import org.gjt.sp.jedit.View;
-
-import org.gjt.sp.jedit.syntax.KeywordMap;
-
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * A completion popup class.
- */
-public class CompleteWord extends CompletionPopup
-{
- //{{{ completeWord() method
- public static void completeWord(View view)
- {
- JEditTextArea textArea = view.getTextArea();
- Buffer buffer = view.getBuffer();
- int caretLine = textArea.getCaretLine();
- int caret = textArea.getCaretPosition();
-
- if(!buffer.isEditable())
- {
- textArea.getToolkit().beep();
- return;
- }
-
- KeywordMap keywordMap = buffer.getKeywordMapAtOffset(caret);
- String noWordSep = getNonAlphaNumericWordChars(
- buffer,keywordMap);
- String word = getWordToComplete(buffer,caretLine,
- caret,noWordSep);
- if(word == null)
- {
- textArea.getToolkit().beep();
- return;
- }
-
- Completion[] completions = getCompletions(buffer,word,caret);
-
- if(completions.length == 0)
- {
- textArea.getToolkit().beep();
- }
- //{{{ if there is only one competion, insert in buffer
- else if(completions.length == 1)
- {
- Completion c = completions[0];
-
- if(c.text.equals(word))
- {
- textArea.getToolkit().beep();
- }
- else
- {
- textArea.replaceSelection(c.text.substring(
- word.length()));
- }
- } //}}}
- //{{{ show popup if > 1
- else
- {
- String longestPrefix = MiscUtilities.getLongestPrefix(
- completions,
- keywordMap != null
- ? keywordMap.getIgnoreCase()
- : false);
-
- if (word.length() < longestPrefix.length())
- {
- buffer.insert(caret,longestPrefix.substring(
- word.length()));
- }
-
- textArea.scrollToCaret(false);
- Point location = textArea.offsetToXY(
- caret - word.length());
- location.y += textArea.getPainter().getFontMetrics()
- .getHeight();
-
- SwingUtilities.convertPointToScreen(location,
- textArea.getPainter());
- new CompleteWord(view,longestPrefix,
- completions,location,noWordSep);
- } //}}}
- } //}}}
-
- //{{{ CompleteWord constructor
- public CompleteWord(View view, String word, Completion[] completions,
- Point location, String noWordSep)
- {
- super(view, location);
-
- this.noWordSep = noWordSep;
- this.view = view;
- this.textArea = view.getTextArea();
- this.buffer = view.getBuffer();
- this.word = word;
-
- reset(new Words(completions), true);
- } //}}}
-
- //{{{ Private members
-
- //{{{ getNonAlphaNumericWordChars() method
- private static String getNonAlphaNumericWordChars(Buffer buffer,
- KeywordMap keywordMap)
- {
- // figure out what constitutes a word character and what
- // doesn't
- String noWordSep = buffer.getStringProperty("noWordSep");
- if(noWordSep == null)
- noWordSep = "";
- if(keywordMap != null)
- {
- String keywordNoWordSep = keywordMap.getNonAlphaNumericChars();
- if(keywordNoWordSep != null)
- noWordSep += keywordNoWordSep;
- }
-
- return noWordSep;
- } //}}}
-
- //{{{ getWordToComplete() method
- private static String getWordToComplete(Buffer buffer, int caretLine,
- int caret, String noWordSep)
- {
- CharSequence line = buffer.getLineSegment(caretLine);
- int dot = caret - buffer.getLineStartOffset(caretLine);
- if(dot == 0)
- return null;
-
- char ch = line.charAt(dot-1);
- if(!Character.isLetterOrDigit(ch)
- && noWordSep.indexOf(ch) == -1)
- {
- // attempting to expand non-word char
- return null;
- }
-
- int wordStart = TextUtilities.findWordStart(line,dot-1,noWordSep);
- CharSequence word = line.subSequence(wordStart,dot);
- if(word.length() == 0)
- return null;
-
- return word.toString();
- } //}}}
-
- //{{{ getVisibleBuffers() method
- private static Collection<Buffer> getVisibleBuffers()
- {
- final Set<Buffer> buffers = new HashSet<Buffer>();
- jEdit.visit(new JEditVisitorAdapter()
- {
- @Override
- public void visit(EditPane editPane)
- {
- buffers.add(editPane.getBuffer());
- }
- });
- return buffers;
- } //}}}
-
- //{{{ getCompletions() method
- private static Completion[] getCompletions(final Buffer buffer, final String word,
- final int caret)
- {
- // build a list of unique words in all buffers, or visible buffers,
- // depending on completeFromAllBuffers
- final Set<Completion> completions = new TreeSet<Completion>(new StandardUtilities
- .StringCompare<Completion>());
-
- // only complete current buffer's keyword map
- final KeywordMap keywordMap = buffer.getKeywordMapAtOffset(caret);
- final String noWordSep = getNonAlphaNumericWordChars(
- buffer,keywordMap);
-
- final Collection<Buffer> sourceBuffers =
- jEdit.getBooleanProperty("completeFromAllBuffers") ?
- Arrays.asList(jEdit.getBuffers()) :
- getVisibleBuffers();
-
- for (Buffer b : sourceBuffers)
- {
- // only complete current buffer's keyword map
- KeywordMap _keywordMap;
- if(b == buffer)
- _keywordMap = keywordMap;
- else
- _keywordMap = null;
-
- int offset = (b == buffer ? caret : 0);
-
- getCompletions(b,word,keywordMap,noWordSep,
- offset,completions);
- }
-
- Completion[] completionArray = completions
- .toArray(new Completion[completions.size()]);
-
- return completionArray;
- } //}}}
-
- //{{{ getCompletions() method
- private static void getCompletions(Buffer buffer, String word,
- KeywordMap keywordMap, String noWordSep, int caret,
- Set<Completion> completions)
- {
- int wordLen = word.length();
-
- //{{{ try to find matching keywords
- if(keywordMap != null)
- {
- String[] keywords = keywordMap.getKeywords();
- for(int i = 0; i < keywords.length; i++)
- {
- String _keyword = keywords[i];
- if(_keyword.regionMatches(keywordMap.getIgnoreCase(),
- 0,word,0,wordLen))
- {
- Completion keyword = new Completion(_keyword,true);
- if(!completions.contains(keyword))
- {
- completions.add(keyword);
- }
- }
- }
- } //}}}
-
- //{{{ loop through all lines of current buffer
- for(int i = 0; i < buffer.getLineCount(); i++)
- {
- CharSequence line = buffer.getLineSegment(i);
- int start = buffer.getLineStartOffset(i);
-
- // check for match at start of line
-
- if (StandardUtilities.startsWith(line, word) &&
- caret != start + word.length())
- {
- String _word = completeWord(line,0,noWordSep);
- Completion comp = new Completion(_word,false);
-
- // remove duplicates
- if(!completions.contains(comp))
- {
- completions.add(comp);
- }
- }
-
- // check for match inside line
- int len = line.length() - word.length();
- for(int j = 0; j < len; j++)
- {
- char c = line.charAt(j);
- if(!Character.isLetterOrDigit(c) && noWordSep.indexOf(c) == -1)
- {
- if (StandardUtilities.regionMatches(line,j + 1,word,0,wordLen)
- && caret != start + j + word.length() + 1)
- {
- String _word = completeWord(line,j + 1,noWordSep);
- Completion comp = new Completion(_word,false);
-
- // remove duplicates
- if(!completions.contains(comp))
- {
- completions.add(comp);
- }
- }
- }
- }
- } //}}}
- } //}}}
-
- //{{{ completeWord() method
- private static String completeWord(CharSequence line, int offset, String noWordSep)
- {
- // '+ 1' so that findWordEnd() doesn't pick up the space at the start
- int wordEnd = TextUtilities.findWordEnd(line,offset + 1,noWordSep);
- return line.subSequence(offset,wordEnd).toString();
- } //}}}
-
- //{{{ Instance variables
- private View view;
- private JEditTextArea textArea;
- private Buffer buffer;
- private String word;
- private String noWordSep;
- //}}}
-
- //{{{ Completion class
- private static class Completion
- {
- final String text;
- final boolean keyword;
-
- Completion(String text, boolean keyword)
- {
- this.text = text;
- this.keyword = keyword;
- }
-
- public String toString()
- {
- return text;
- }
-
- public int hashCode()
- {
- return text.hashCode();
- }
-
- public boolean equals(Object obj)
- {
- if(obj instanceof Completion)
- return ((Completion)obj).text.equals(text);
- else
- return false;
- }
- } //}}}
-
- //{{{ Words class
- private class Words implements Candidates
- {
- private final DefaultListCellRenderer renderer;
- private final Completion[] completions;
-
- public Words(Completion[] completions)
- {
- this.renderer = new DefaultListCellRenderer();
- this.completions = completions;
- }
-
- public int getSize()
- {
- return completions.length;
- }
-
- public boolean isValid()
- {
- return true;
- }
-
- public void complete(int index)
- {
- String insertion = completions[index].toString().substring(word.length());
- textArea.replaceSelection(insertion);
- }
-
- public Component getCellRenderer(JList list, int index,
- boolean isSelected, boolean cellHasFocus)
- {
- renderer.getListCellRendererComponent(list,
- null, index, isSelected, cellHasFocus);
-
- Completion comp = completions[index];
-
- String text = comp.text;
- Font font = list.getFont();
-
- if(index < 9)
- text = (index + 1) + ": " + text;
- else if(index == 9)
- text = "0: " + text;
-
- if(comp.keyword)
- font = font.deriveFont(Font.BOLD);
-
- renderer.setText(text);
- renderer.setFont(font);
- return renderer;
- }
-
- public String getDescription(int index)
- {
- return null;
- }
- } //}}}
-
- //{{{ resetWords() method
- private void resetWords(String newWord)
- {
- int caret = textArea.getCaretPosition();
- Completion[] completions = getCompletions(
- buffer,newWord,caret);
- if(completions.length > 0)
- {
- word = newWord;
- reset(new Words(completions), true);
- }
- else
- {
- dispose();
- }
- } //}}}
-
- //}}}
-
- //{{{ keyPressed() medhod
- protected void keyPressed(KeyEvent e)
- {
- if (e.getKeyCode() == KeyEvent.VK_BACK_SPACE)
- {
- textArea.backspace();
- e.consume();
-
- if(word.length() == 1)
- {
- dispose();
- }
- else
- {
- resetWords(word.substring(0,word.length() - 1));
- }
- }
- } //}}}
-
- //{{{ keyTyped() medhod
- protected void keyTyped(KeyEvent e)
- {
- char ch = e.getKeyChar();
- if(Character.isDigit(ch))
- {
- int index = ch - '0';
- if(index == 0)
- index = 9;
- else
- index--;
- if(index < getCandidates().getSize())
- {
- setSelectedIndex(index);
- if(doSelectedCompletion())
- {
- e.consume();
- dispose();
- }
- return;
- }
- else
- /* fall through */;
- }
-
- // \t handled above
- if(ch != '\b' && ch != '\t')
- {
- /* eg, foo<C+b>, will insert foobar, */
- if(!Character.isLetterOrDigit(ch) && noWordSep.indexOf(ch) == -1)
- {
- doSelectedCompletion();
- textArea.userInput(ch);
- e.consume();
- dispose();
- return;
- }
-
- textArea.userInput(ch);
- e.consume();
- resetWords(word + ch);
- }
- } //}}}
-}
+/*
+ * CompleteWord.java - Complete word dialog
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.Component;
+import java.awt.Font;
+import java.awt.Point;
+
+import java.awt.event.KeyEvent;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.Arrays;
+import java.util.Collection;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JList;
+import javax.swing.SwingUtilities;
+
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.EditPane;
+import org.gjt.sp.jedit.visitors.JEditVisitorAdapter;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.TextUtilities;
+import org.gjt.sp.jedit.View;
+
+import org.gjt.sp.jedit.syntax.KeywordMap;
+
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * A completion popup class.
+ */
+public class CompleteWord extends CompletionPopup
+{
+ //{{{ completeWord() method
+ public static void completeWord(View view)
+ {
+ JEditTextArea textArea = view.getTextArea();
+ Buffer buffer = view.getBuffer();
+ int caretLine = textArea.getCaretLine();
+ int caret = textArea.getCaretPosition();
+
+ if(!buffer.isEditable())
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+
+ KeywordMap keywordMap = buffer.getKeywordMapAtOffset(caret);
+ String noWordSep = getNonAlphaNumericWordChars(
+ buffer,keywordMap);
+ String word = getWordToComplete(buffer,caretLine,
+ caret,noWordSep);
+ if(word == null)
+ {
+ textArea.getToolkit().beep();
+ return;
+ }
+
+ Completion[] completions = getCompletions(buffer,word,caret);
+
+ if(completions.length == 0)
+ {
+ textArea.getToolkit().beep();
+ }
+ //{{{ if there is only one competion, insert in buffer
+ else if(completions.length == 1)
+ {
+ Completion c = completions[0];
+
+ if(c.text.equals(word))
+ {
+ textArea.getToolkit().beep();
+ }
+ else
+ {
+ textArea.replaceSelection(c.text.substring(
+ word.length()));
+ }
+ } //}}}
+ //{{{ show popup if > 1
+ else
+ {
+ String longestPrefix = MiscUtilities.getLongestPrefix(
+ completions,
+ keywordMap != null
+ ? keywordMap.getIgnoreCase()
+ : false);
+
+ if (word.length() < longestPrefix.length())
+ {
+ buffer.insert(caret,longestPrefix.substring(
+ word.length()));
+ }
+
+ textArea.scrollToCaret(false);
+ Point location = textArea.offsetToXY(
+ caret - word.length());
+ location.y += textArea.getPainter().getFontMetrics()
+ .getHeight();
+
+ SwingUtilities.convertPointToScreen(location,
+ textArea.getPainter());
+ new CompleteWord(view,longestPrefix,
+ completions,location,noWordSep);
+ } //}}}
+ } //}}}
+
+ //{{{ CompleteWord constructor
+ public CompleteWord(View view, String word, Completion[] completions,
+ Point location, String noWordSep)
+ {
+ super(view, location);
+
+ this.noWordSep = noWordSep;
+ this.view = view;
+ this.textArea = view.getTextArea();
+ this.buffer = view.getBuffer();
+ this.word = word;
+
+ reset(new Words(completions), true);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ getNonAlphaNumericWordChars() method
+ private static String getNonAlphaNumericWordChars(Buffer buffer,
+ KeywordMap keywordMap)
+ {
+ // figure out what constitutes a word character and what
+ // doesn't
+ String noWordSep = buffer.getStringProperty("noWordSep");
+ if(noWordSep == null)
+ noWordSep = "";
+ if(keywordMap != null)
+ {
+ String keywordNoWordSep = keywordMap.getNonAlphaNumericChars();
+ if(keywordNoWordSep != null)
+ noWordSep += keywordNoWordSep;
+ }
+
+ return noWordSep;
+ } //}}}
+
+ //{{{ getWordToComplete() method
+ private static String getWordToComplete(Buffer buffer, int caretLine,
+ int caret, String noWordSep)
+ {
+ CharSequence line = buffer.getLineSegment(caretLine);
+ int dot = caret - buffer.getLineStartOffset(caretLine);
+ if(dot == 0)
+ return null;
+
+ char ch = line.charAt(dot-1);
+ if(!Character.isLetterOrDigit(ch)
+ && noWordSep.indexOf(ch) == -1)
+ {
+ // attempting to expand non-word char
+ return null;
+ }
+
+ int wordStart = TextUtilities.findWordStart(line,dot-1,noWordSep);
+ CharSequence word = line.subSequence(wordStart,dot);
+ if(word.length() == 0)
+ return null;
+
+ return word.toString();
+ } //}}}
+
+ //{{{ getVisibleBuffers() method
+ private static Collection<Buffer> getVisibleBuffers()
+ {
+ final Set<Buffer> buffers = new HashSet<Buffer>();
+ jEdit.visit(new JEditVisitorAdapter()
+ {
+ @Override
+ public void visit(EditPane editPane)
+ {
+ buffers.add(editPane.getBuffer());
+ }
+ });
+ return buffers;
+ } //}}}
+
+ //{{{ getCompletions() method
+ private static Completion[] getCompletions(final Buffer buffer, final String word,
+ final int caret)
+ {
+ // build a list of unique words in all buffers, or visible buffers,
+ // depending on completeFromAllBuffers
+ final Set<Completion> completions = new TreeSet<Completion>(new StandardUtilities
+ .StringCompare<Completion>());
+
+ // only complete current buffer's keyword map
+ final KeywordMap keywordMap = buffer.getKeywordMapAtOffset(caret);
+ final String noWordSep = getNonAlphaNumericWordChars(
+ buffer,keywordMap);
+
+ final Collection<Buffer> sourceBuffers =
+ jEdit.getBooleanProperty("completeFromAllBuffers") ?
+ Arrays.asList(jEdit.getBuffers()) :
+ getVisibleBuffers();
+
+ for (Buffer b : sourceBuffers)
+ {
+ // only complete current buffer's keyword map
+ KeywordMap _keywordMap;
+ if(b == buffer)
+ _keywordMap = keywordMap;
+ else
+ _keywordMap = null;
+
+ int offset = (b == buffer ? caret : 0);
+
+ getCompletions(b,word,keywordMap,noWordSep,
+ offset,completions);
+ }
+
+ Completion[] completionArray = completions
+ .toArray(new Completion[completions.size()]);
+
+ return completionArray;
+ } //}}}
+
+ //{{{ getCompletions() method
+ private static void getCompletions(Buffer buffer, String word,
+ KeywordMap keywordMap, String noWordSep, int caret,
+ Set<Completion> completions)
+ {
+ int wordLen = word.length();
+
+ //{{{ try to find matching keywords
+ if(keywordMap != null)
+ {
+ String[] keywords = keywordMap.getKeywords();
+ for(int i = 0; i < keywords.length; i++)
+ {
+ String _keyword = keywords[i];
+ if(_keyword.regionMatches(keywordMap.getIgnoreCase(),
+ 0,word,0,wordLen))
+ {
+ Completion keyword = new Completion(_keyword,true);
+ if(!completions.contains(keyword))
+ {
+ completions.add(keyword);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ loop through all lines of current buffer
+ for(int i = 0; i < buffer.getLineCount(); i++)
+ {
+ CharSequence line = buffer.getLineSegment(i);
+ int start = buffer.getLineStartOffset(i);
+
+ // check for match at start of line
+
+ if (StandardUtilities.startsWith(line, word) &&
+ caret != start + word.length())
+ {
+ String _word = completeWord(line,0,noWordSep);
+ Completion comp = new Completion(_word,false);
+
+ // remove duplicates
+ if(!completions.contains(comp))
+ {
+ completions.add(comp);
+ }
+ }
+
+ // check for match inside line
+ int len = line.length() - word.length();
+ for(int j = 0; j < len; j++)
+ {
+ char c = line.charAt(j);
+ if(!Character.isLetterOrDigit(c) && noWordSep.indexOf(c) == -1)
+ {
+ if (StandardUtilities.regionMatches(line,j + 1,word,0,wordLen)
+ && caret != start + j + word.length() + 1)
+ {
+ String _word = completeWord(line,j + 1,noWordSep);
+ Completion comp = new Completion(_word,false);
+
+ // remove duplicates
+ if(!completions.contains(comp))
+ {
+ completions.add(comp);
+ }
+ }
+ }
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ completeWord() method
+ private static String completeWord(CharSequence line, int offset, String noWordSep)
+ {
+ // '+ 1' so that findWordEnd() doesn't pick up the space at the start
+ int wordEnd = TextUtilities.findWordEnd(line,offset + 1,noWordSep);
+ return line.subSequence(offset,wordEnd).toString();
+ } //}}}
+
+ //{{{ Instance variables
+ private View view;
+ private JEditTextArea textArea;
+ private Buffer buffer;
+ private String word;
+ private String noWordSep;
+ //}}}
+
+ //{{{ Completion class
+ private static class Completion
+ {
+ final String text;
+ final boolean keyword;
+
+ Completion(String text, boolean keyword)
+ {
+ this.text = text;
+ this.keyword = keyword;
+ }
+
+ public String toString()
+ {
+ return text;
+ }
+
+ public int hashCode()
+ {
+ return text.hashCode();
+ }
+
+ public boolean equals(Object obj)
+ {
+ if(obj instanceof Completion)
+ return ((Completion)obj).text.equals(text);
+ else
+ return false;
+ }
+ } //}}}
+
+ //{{{ Words class
+ private class Words implements Candidates
+ {
+ private final DefaultListCellRenderer renderer;
+ private final Completion[] completions;
+
+ public Words(Completion[] completions)
+ {
+ this.renderer = new DefaultListCellRenderer();
+ this.completions = completions;
+ }
+
+ public int getSize()
+ {
+ return completions.length;
+ }
+
+ public boolean isValid()
+ {
+ return true;
+ }
+
+ public void complete(int index)
+ {
+ String insertion = completions[index].toString().substring(word.length());
+ textArea.replaceSelection(insertion);
+ }
+
+ public Component getCellRenderer(JList list, int index,
+ boolean isSelected, boolean cellHasFocus)
+ {
+ renderer.getListCellRendererComponent(list,
+ null, index, isSelected, cellHasFocus);
+
+ Completion comp = completions[index];
+
+ String text = comp.text;
+ Font font = list.getFont();
+
+ if(index < 9)
+ text = (index + 1) + ": " + text;
+ else if(index == 9)
+ text = "0: " + text;
+
+ if(comp.keyword)
+ font = font.deriveFont(Font.BOLD);
+
+ renderer.setText(text);
+ renderer.setFont(font);
+ return renderer;
+ }
+
+ public String getDescription(int index)
+ {
+ return null;
+ }
+ } //}}}
+
+ //{{{ resetWords() method
+ private void resetWords(String newWord)
+ {
+ int caret = textArea.getCaretPosition();
+ Completion[] completions = getCompletions(
+ buffer,newWord,caret);
+ if(completions.length > 0)
+ {
+ word = newWord;
+ reset(new Words(completions), true);
+ }
+ else
+ {
+ dispose();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ keyPressed() medhod
+ protected void keyPressed(KeyEvent e)
+ {
+ if (e.getKeyCode() == KeyEvent.VK_BACK_SPACE)
+ {
+ textArea.backspace();
+ e.consume();
+
+ if(word.length() == 1)
+ {
+ dispose();
+ }
+ else
+ {
+ resetWords(word.substring(0,word.length() - 1));
+ }
+ }
+ } //}}}
+
+ //{{{ keyTyped() medhod
+ protected void keyTyped(KeyEvent e)
+ {
+ char ch = e.getKeyChar();
+ if(Character.isDigit(ch))
+ {
+ int index = ch - '0';
+ if(index == 0)
+ index = 9;
+ else
+ index--;
+ if(index < getCandidates().getSize())
+ {
+ setSelectedIndex(index);
+ if(doSelectedCompletion())
+ {
+ e.consume();
+ dispose();
+ }
+ return;
+ }
+ else
+ /* fall through */;
+ }
+
+ // \t handled above
+ if(ch != '\b' && ch != '\t')
+ {
+ /* eg, foo<C+b>, will insert foobar, */
+ if(!Character.isLetterOrDigit(ch) && noWordSep.indexOf(ch) == -1)
+ {
+ doSelectedCompletion();
+ textArea.userInput(ch);
+ e.consume();
+ dispose();
+ return;
+ }
+
+ textArea.userInput(ch);
+ e.consume();
+ resetWords(word + ch);
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/CompletionPopup.java b/jEdit/org/gjt/sp/jedit/gui/CompletionPopup.java
index 57a700e..c4513f8 100644
--- a/jEdit/org/gjt/sp/jedit/gui/CompletionPopup.java
+++ b/jEdit/org/gjt/sp/jedit/gui/CompletionPopup.java
@@ -1,490 +1,512 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 KazutoshiSatoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Point;
-import java.awt.Rectangle;
-import java.awt.Window;
-
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.WindowEvent;
-import java.awt.event.WindowFocusListener;
-
-import javax.swing.AbstractListModel;
-import javax.swing.JList;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JWindow;
-import javax.swing.ListSelectionModel;
-import javax.swing.ListCellRenderer;
-import javax.swing.ScrollPaneConstants;
-import javax.swing.SwingUtilities;
-
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.View;
-//}}}
-
-/**
- * Popup window for word completion in text area.
- * This class provides basic UI of completion popup.
- *
- * @since jEdit 4.3pre11
- */
-public class CompletionPopup extends JWindow
-{
- //{{{ interface Candidates
- /**
- * Candidates of completion.
- */
- public interface Candidates
- {
- /**
- * Returns the number of candidates.
- */
- public int getSize();
-
- /**
- * Returns whether this completion is still valid.
- */
- public boolean isValid();
-
- /**
- * Do the completion.
- */
- public void complete(int index);
-
- /**
- * Returns a component to render a cell for the index
- * in the popup.
- */
- public Component getCellRenderer(JList list, int index,
- boolean isSelected, boolean cellHasFocus);
-
- /**
- * Returns a description text shown when the index is
- * selected in the popup, or null if no description is
- * available.
- */
- public String getDescription(int index);
- } //}}}
-
- //{{{ CompletionPopup constructor
- /**
- * Create a completion popup.
- * It is not shown until reset() method is called with valid
- * candidates. All key events for the view are intercepted by
- * this popup untill end of completion.
- * @since jEdit 4.3pre13
- */
- public CompletionPopup(View view)
- {
- super(view);
- this.view = view;
- this.keyHandler = new KeyHandler();
- this.candidates = null;
- this.list = new JList();
-
- list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- list.setCellRenderer(new CellRenderer());
- list.addKeyListener(keyHandler);
- list.addMouseListener(new MouseHandler());
-
- JPanel content = new JPanel(new BorderLayout());
- content.setFocusTraversalKeysEnabled(false);
- // stupid scrollbar policy is an attempt to work around
- // bugs people have been seeing with IBM's JDK -- 7 Sep 2000
- JScrollPane scroller = new JScrollPane(list,
- ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
- ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
- content.add(scroller, BorderLayout.CENTER);
- setContentPane(content);
- addWindowFocusListener(new WindowFocusHandler());
- }
-
- public CompletionPopup(View view, Point location)
- {
- this(view);
- if (location != null)
- {
- setLocation(location);
- }
- } //}}}
-
- //{{{ dispose() method
- /**
- * Quit completion.
- */
- public void dispose()
- {
- if (isDisplayable())
- {
- if (view.getKeyEventInterceptor() == keyHandler)
- {
- view.setKeyEventInterceptor(null);
- }
- super.dispose();
-
- // This is a workaround to ensure setting the
- // focus back to the textArea. Without this, the
- // focus gets lost after closing the popup in
- // some environments. It seems to be a bug in
- // J2SE 1.4 or 5.0. Probably it relates to the
- // following one.
- // "Frame does not receives focus after closing
- // of the owned window"
- // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4810575
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- view.getTextArea().requestFocus();
- }
- });
- }
- } //}}}
-
- //{{{ reset() method
- /**
- * Start completion.
- * @param candidates The candidates of this completion
- * @param active Set focus to the popup
- */
- public void reset(Candidates candidates, boolean active)
- {
- if(candidates == null || !candidates.isValid()
- || candidates.getSize() <= 0)
- {
- dispose();
- return;
- }
-
- this.candidates = candidates;
- list.setModel(new CandidateListModel());
- list.setVisibleRowCount(Math.min(candidates.getSize(),8));
- pack();
- setLocation(fitInScreen(getLocation(null),this,
- view.getTextArea().getPainter().getFontMetrics().getHeight()));
- if (active)
- {
- setSelectedIndex(0);
- GUIUtilities.requestFocus(this,list);
- }
- setVisible(true);
- view.setKeyEventInterceptor(keyHandler);
- } //}}}
-
- //{{{ getCandidates() method
- /**
- * Current candidates of completion.
- */
- public Candidates getCandidates()
- {
- return candidates;
- } //}}}
-
- //{{{ getSelectedIndex() method
- /**
- * Returns index of current selection.
- * Returns -1 if nothing is selected.
- */
- public int getSelectedIndex()
- {
- return list.getSelectedIndex();
- } //}}}
-
- //{{{ setSelectedIndex() method
- /**
- * Set selection.
- */
- public void setSelectedIndex(int index)
- {
- if (candidates != null
- && 0 <= index && index < candidates.getSize())
- {
- list.setSelectedIndex(index);
- list.ensureIndexIsVisible(index);
- String description = candidates.getDescription(index);
- if (description != null)
- {
- view.getStatus().setMessageAndClear(description);
- }
- }
- } //}}}
-
- //{{{ doSelectedCompletion() method
- /**
- * Do completion with current selection and quit.
- */
- public boolean doSelectedCompletion()
- {
- int selected = list.getSelectedIndex();
- if (candidates != null &&
- 0 <= selected && selected < candidates.getSize())
- {
- candidates.complete(selected);
- dispose();
- return true;
- }
- return false;
- } //}}}
-
- //{{{ keyPressed() medhod
- /**
- * Handle key pressed events.
- * Override this method to make additional key handing.
- */
- protected void keyPressed(KeyEvent e)
- {
- } //}}}
-
- //{{{ keyTyped() medhod
- /**
- * Handle key typed events.
- * Override this method to make additional key handing.
- */
- protected void keyTyped(KeyEvent e)
- {
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private final View view;
- private final KeyHandler keyHandler;
- private Candidates candidates;
- private final JList list;
- //}}}
-
- //{{{ fitInScreen() method
- private static Point fitInScreen(Point p, Window w, int lineHeight)
- {
- Rectangle screenSize = w.getGraphicsConfiguration().getBounds();
- if(p.y + w.getHeight() >= screenSize.height)
- p.y = p.y - w.getHeight() - lineHeight;
- return p;
- } //}}}
-
- //{{{ moveRelative method()
- private void moveRelative(int n)
- {
- int selected = list.getSelectedIndex();
-
- int newSelect = selected + n;
- if (newSelect < 0)
- {
- newSelect = 0;
- }
- else
- {
- int numItems = list.getModel().getSize();
- if(numItems < 1)
- {
- return;
- }
- if(newSelect >= numItems)
- {
- newSelect = numItems - 1;
- }
- }
-
- if(newSelect != selected)
- {
- setSelectedIndex(newSelect);
- }
- } //}}}
-
- //{{{ moveRelativePages() method
- private void moveRelativePages(int n)
- {
- int pageSize = list.getVisibleRowCount() - 1;
- moveRelative(pageSize * n);
- } //}}}
-
- //{{{ passKeyEventToView() method
- private void passKeyEventToView(KeyEvent e)
- {
- // Remove intercepter to avoid infinite recursion.
- assert (view.getKeyEventInterceptor() == keyHandler);
- view.setKeyEventInterceptor(null);
-
- // Here depends on an implementation detail.
- // Use ACTION_BAR to force processing KEY_TYPED event in
- // the implementation of gui.InputHandler.processKeyEvent().
- view.getInputHandler().processKeyEvent(e, View.ACTION_BAR, false);
-
- // Restore keyHandler only if this popup is still alive.
- // The key event might trigger dispose() of this popup.
- if (this.isDisplayable())
- {
- view.setKeyEventInterceptor(keyHandler);
- }
- } //}}}
-
- //{{{ CandidateListModel class
- private class CandidateListModel extends AbstractListModel
- {
- public int getSize()
- {
- return candidates.getSize();
- }
-
- public Object getElementAt(int index)
- {
- // This value is not used.
- // The list is only rendered by components
- // returned by getCellRenderer().
- return candidates;
- }
- } //}}}
-
- //{{{ CellRenderer class
- private class CellRenderer implements ListCellRenderer
- {
- public Component getListCellRendererComponent(JList list,
- Object value, int index,
- boolean isSelected, boolean cellHasFocus)
- {
- return candidates.getCellRenderer(list, index,
- isSelected, cellHasFocus);
- }
- } //}}}
-
- //{{{ KeyHandler class
- private class KeyHandler extends KeyAdapter
- {
- //{{{ keyPressed() method
- public void keyPressed(KeyEvent e)
- {
- CompletionPopup.this.keyPressed(e);
-
- if (candidates == null || !candidates.isValid())
- {
- dispose();
- }
- else if (!e.isConsumed())
- {
- switch(e.getKeyCode())
- {
- case KeyEvent.VK_TAB:
- case KeyEvent.VK_ENTER:
- if (doSelectedCompletion())
- {
- e.consume();
- }
- else
- {
- dispose();
- }
- break;
- case KeyEvent.VK_ESCAPE:
- dispose();
- e.consume();
- break;
- case KeyEvent.VK_UP:
- moveRelative(-1);
- e.consume();
- break;
- case KeyEvent.VK_DOWN:
- moveRelative(1);
- e.consume();
- break;
- case KeyEvent.VK_PAGE_UP:
- moveRelativePages(-1);
- e.consume();
- break;
- case KeyEvent.VK_PAGE_DOWN:
- moveRelativePages(1);
- e.consume();
- break;
- default:
- if(e.isActionKey()
- || e.isControlDown()
- || e.isAltDown()
- || e.isMetaDown())
- {
- dispose();
- }
- break;
- }
- }
-
- if (!e.isConsumed())
- {
- passKeyEventToView(e);
- }
- } //}}}
-
- //{{{ keyTyped() method
- public void keyTyped(KeyEvent e)
- {
- CompletionPopup.this.keyTyped(e);
-
- if (candidates == null || !candidates.isValid())
- {
- dispose();
- }
-
- if (!e.isConsumed())
- {
- passKeyEventToView(e);
- }
- } //}}}
- } //}}}
-
- //{{{ MouseHandler class
- private class MouseHandler extends MouseAdapter
- {
- public void mouseClicked(MouseEvent e)
- {
- if (doSelectedCompletion())
- {
- e.consume();
- }
- else
- {
- dispose();
- }
- }
- } //}}}
-
- //{{{ WindowFocusHandler class
- private class WindowFocusHandler implements WindowFocusListener
- {
- public void windowGainedFocus(WindowEvent e)
- {
- }
-
- public void windowLostFocus(WindowEvent e)
- {
- dispose();
- }
- } //}}}
-
- //}}}
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 KazutoshiSatoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Window;
+
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowFocusListener;
+
+import javax.swing.AbstractListModel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JWindow;
+import javax.swing.ListSelectionModel;
+import javax.swing.ListCellRenderer;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.SwingUtilities;
+
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.View;
+//}}}
+
+/**
+ * Popup window for word completion in text area.
+ * This class provides basic UI of completion popup.
+ *
+ * @since jEdit 4.3pre11
+ */
+public class CompletionPopup extends JWindow
+{
+ //{{{ interface Candidates
+ /**
+ * Candidates of completion.
+ */
+ public interface Candidates
+ {
+ /**
+ * Returns the number of candidates.
+ */
+ public int getSize();
+
+ /**
+ * Returns whether this completion is still valid.
+ */
+ public boolean isValid();
+
+ /**
+ * Do the completion.
+ */
+ public void complete(int index);
+
+ /**
+ * Returns a component to render a cell for the index
+ * in the popup.
+ */
+ public Component getCellRenderer(JList list, int index,
+ boolean isSelected, boolean cellHasFocus);
+
+ /**
+ * Returns a description text shown when the index is
+ * selected in the popup, or null if no description is
+ * available.
+ */
+ public String getDescription(int index);
+ } //}}}
+
+ //{{{ CompletionPopup constructor
+ /**
+ * Create a completion popup.
+ * It is not shown until reset() method is called with valid
+ * candidates. All key events for the view are intercepted by
+ * this popup untill end of completion.
+ * @since jEdit 4.3pre13
+ */
+ public CompletionPopup(View view)
+ {
+ super(view);
+ this.view = view;
+ this.keyHandler = new KeyHandler();
+ this.candidates = null;
+ this.list = new JList();
+
+ list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ list.setCellRenderer(new CellRenderer());
+ list.addKeyListener(keyHandler);
+ list.addMouseListener(new MouseHandler());
+
+ JPanel content = new JPanel(new BorderLayout());
+ content.setFocusTraversalKeysEnabled(false);
+ // stupid scrollbar policy is an attempt to work around
+ // bugs people have been seeing with IBM's JDK -- 7 Sep 2000
+ JScrollPane scroller = new JScrollPane(list,
+ ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
+ ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+ content.add(scroller, BorderLayout.CENTER);
+ setContentPane(content);
+ addWindowFocusListener(new WindowFocusHandler());
+ }
+
+ public CompletionPopup(View view, Point location)
+ {
+ this(view);
+ if (location != null)
+ {
+ setLocation(location);
+ }
+ } //}}}
+
+ //{{{ dispose() method
+ /**
+ * Quit completion.
+ */
+ public void dispose()
+ {
+ if (isDisplayable())
+ {
+ if (view.getKeyEventInterceptor() == keyHandler)
+ {
+ view.setKeyEventInterceptor(null);
+ }
+
+ super.dispose();
+
+ // This is a workaround to ensure setting the
+ // focus back to the textArea. Without this, the
+ // focus gets lost after closing the popup in
+ // some environments. It seems to be a bug in
+ // J2SE 1.4 or 5.0. Probably it relates to the
+ // following one.
+ // "Frame does not receives focus after closing
+ // of the owned window"
+ // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4810575
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ view.getTextArea().requestFocus();
+ }
+ });
+ }
+ } //}}}
+
+ //{{{ reset() method
+ /**
+ * Start completion.
+ * @param candidates The candidates of this completion
+ * @param active Set focus to the popup
+ */
+ public void reset(Candidates candidates, boolean active)
+ {
+ if(candidates == null || !candidates.isValid()
+ || candidates.getSize() <= 0)
+ {
+ dispose();
+ return;
+ }
+
+ this.candidates = candidates;
+ list.setModel(new CandidateListModel());
+ list.setVisibleRowCount(Math.min(candidates.getSize(),8));
+ pack();
+ setLocation(fitInScreen(getLocation(null),this,
+ view.getTextArea().getPainter().getFontMetrics().getHeight()));
+ if (active)
+ {
+ setSelectedIndex(0);
+ GUIUtilities.requestFocus(this,list);
+ }
+ setVisible(true);
+ view.setKeyEventInterceptor(keyHandler);
+ } //}}}
+
+ //{{{ getCandidates() method
+ /**
+ * Current candidates of completion.
+ */
+ public Candidates getCandidates()
+ {
+ return candidates;
+ } //}}}
+
+ //{{{ getSelectedIndex() method
+ /**
+ * Returns index of current selection.
+ * Returns -1 if nothing is selected.
+ */
+ public int getSelectedIndex()
+ {
+ return list.getSelectedIndex();
+ } //}}}
+
+ //{{{ setSelectedIndex() method
+ /**
+ * Set selection.
+ */
+ public void setSelectedIndex(int index)
+ {
+ if (candidates != null
+ && 0 <= index && index < candidates.getSize())
+ {
+ list.setSelectedIndex(index);
+ list.ensureIndexIsVisible(index);
+ String description = candidates.getDescription(index);
+ if (description != null)
+ {
+ view.getStatus().setMessageAndClear(description);
+ }
+ }
+ } //}}}
+
+ //{{{ doSelectedCompletion() method
+ /**
+ * Do completion with current selection and quit.
+ */
+ public boolean doSelectedCompletion()
+ {
+ int selected = list.getSelectedIndex();
+ if (candidates != null &&
+ 0 <= selected && selected < candidates.getSize())
+ {
+ candidates.complete(selected);
+ dispose();
+ return true;
+ }
+ return false;
+ } //}}}
+
+ //{{{ keyPressed() medhod
+ /**
+ * Handle key pressed events.
+ * Override this method to make additional key handing.
+ */
+ protected void keyPressed(KeyEvent e)
+ {
+ } //}}}
+
+ //{{{ keyTyped() medhod
+ /**
+ * Handle key typed events.
+ * Override this method to make additional key handing.
+ */
+ protected void keyTyped(KeyEvent e)
+ {
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private final View view;
+ private final KeyHandler keyHandler;
+ private Candidates candidates;
+ private final JList list;
+ //}}}
+
+ //{{{ fitInScreen() method
+ private static Point fitInScreen(Point p, Window w, int lineHeight)
+ {
+ Rectangle screenSize = w.getGraphicsConfiguration().getBounds();
+ if(p.y + w.getHeight() >= screenSize.height)
+ p.y = p.y - w.getHeight() - lineHeight;
+ return p;
+ } //}}}
+
+ //{{{ moveRelative method()
+ private void moveRelative(int n)
+ {
+ int selected = list.getSelectedIndex();
+
+ int newSelect = selected + n;
+ if (newSelect < 0)
+ {
+ newSelect = 0;
+ }
+ else
+ {
+ int numItems = list.getModel().getSize();
+ if(numItems < 1)
+ {
+ return;
+ }
+ if(newSelect >= numItems)
+ {
+ newSelect = numItems - 1;
+ }
+ }
+
+ if(newSelect != selected)
+ {
+ setSelectedIndex(newSelect);
+ }
+ } //}}}
+
+ //{{{ moveRelativePages() method
+ private void moveRelativePages(int n)
+ {
+ int pageSize = list.getVisibleRowCount() - 1;
+ moveRelative(pageSize * n);
+ } //}}}
+
+ //{{{ passKeyEventToView() method
+ private void passKeyEventToView(KeyEvent e)
+ {
+ // Remove intercepter to avoid infinite recursion.
+ assert (view.getKeyEventInterceptor() == keyHandler);
+ view.setKeyEventInterceptor(null);
+
+ // Here depends on an implementation detail.
+ // Use ACTION_BAR to force processing KEY_TYPED event in
+ // the implementation of gui.InputHandler.processKeyEvent().
+ view.getInputHandler().processKeyEvent(e, View.ACTION_BAR, false);
+
+ // Restore keyHandler only if this popup is still alive.
+ // The key event might trigger dispose() of this popup.
+ if (this.isDisplayable())
+ {
+ view.setKeyEventInterceptor(keyHandler);
+ }
+ } //}}}
+
+ //{{{ CandidateListModel class
+ private class CandidateListModel extends AbstractListModel
+ {
+ public int getSize()
+ {
+ return candidates.getSize();
+ }
+
+ public Object getElementAt(int index)
+ {
+ // This value is not used.
+ // The list is only rendered by components
+ // returned by getCellRenderer().
+ return candidates;
+ }
+ } //}}}
+
+ //{{{ CellRenderer class
+ private class CellRenderer implements ListCellRenderer
+ {
+ public Component getListCellRendererComponent(JList list,
+ Object value, int index,
+ boolean isSelected, boolean cellHasFocus)
+ {
+ return candidates.getCellRenderer(list, index,
+ isSelected, cellHasFocus);
+ }
+ } //}}}
+
+ //{{{ KeyHandler class
+ private class KeyHandler extends KeyAdapter
+ {
+ //{{{ keyPressed() method
+ public void keyPressed(KeyEvent e)
+ {
+ CompletionPopup.this.keyPressed(e);
+
+ if (candidates == null || !candidates.isValid())
+ {
+ dispose();
+ }
+ else if (!e.isConsumed())
+ {
+ switch(e.getKeyCode())
+ {
+ case KeyEvent.VK_TAB:
+ case KeyEvent.VK_ENTER:
+ if (doSelectedCompletion())
+ {
+ e.consume();
+ }
+ else
+ {
+ dispose();
+ }
+ break;
+ case KeyEvent.VK_ESCAPE:
+ dispose();
+ e.consume();
+ break;
+ case KeyEvent.VK_UP:
+ moveRelative(-1);
+ e.consume();
+ break;
+ case KeyEvent.VK_DOWN:
+ moveRelative(1);
+ e.consume();
+ break;
+ case KeyEvent.VK_P:
+ if (e.getModifiersEx() == KeyEvent.CTRL_DOWN_MASK) {
+ moveRelative(-1);
+ e.consume();
+ }
+ break;
+ case KeyEvent.VK_N:
+ if (e.getModifiersEx() == KeyEvent.CTRL_DOWN_MASK) {
+ moveRelative(1);
+ e.consume();
+ }
+ break;
+ case KeyEvent.VK_PAGE_UP:
+ moveRelativePages(-1);
+ e.consume();
+ break;
+ case KeyEvent.VK_PAGE_DOWN:
+ moveRelativePages(1);
+ e.consume();
+ break;
+ default:
+ if(e.isActionKey()
+ || e.isAltDown()
+ || e.isMetaDown())
+ {
+ dispose();
+ }
+ else if (e.isControlDown()) {
+ e.consume();
+ }
+ break;
+ }
+ }
+
+ if (!e.isConsumed())
+ {
+ passKeyEventToView(e);
+ }
+ } //}}}
+
+ //{{{ keyTyped() method
+ public void keyTyped(KeyEvent e)
+ {
+ if (e.isControlDown())
+ {
+ e.consume();
+ }
+ else
+ {
+ CompletionPopup.this.keyTyped(e);
+ }
+
+ if (candidates == null || !candidates.isValid())
+ {
+ dispose();
+ }
+
+ if (!e.isConsumed())
+ {
+ passKeyEventToView(e);
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ MouseHandler class
+ private class MouseHandler extends MouseAdapter
+ {
+ public void mouseClicked(MouseEvent e)
+ {
+ if (doSelectedCompletion())
+ {
+ e.consume();
+ }
+ else
+ {
+ dispose();
+ }
+ }
+ } //}}}
+
+ //{{{ WindowFocusHandler class
+ private class WindowFocusHandler implements WindowFocusListener
+ {
+ public void windowGainedFocus(WindowEvent e)
+ {
+ }
+
+ public void windowLostFocus(WindowEvent e)
+ {
+ dispose();
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/ContextAddDialog.java b/jEdit/org/gjt/sp/jedit/gui/ContextAddDialog.java
index 73275bc..249d58d 100644
--- a/jEdit/org/gjt/sp/jedit/gui/ContextAddDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/ContextAddDialog.java
@@ -28,6 +28,7 @@ import java.awt.Component;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.util.Collection;
import java.util.Collections;
import java.util.TreeSet;
import java.util.Vector;
@@ -49,6 +50,7 @@ import org.gjt.sp.jedit.ActionSet;
import org.gjt.sp.jedit.EditAction;
import org.gjt.sp.jedit.GUIUtilities;
import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.gui.AbstractContextOptionPane.MenuItem;
//}}}
@@ -60,6 +62,8 @@ import org.gjt.sp.jedit.jEdit;
*/
public class ContextAddDialog extends EnhancedDialog
{
+ private static final String CONTEXT_ADD_DIALOG_LAST_SELECTION = "contextAddDialog.lastSelection";
+
//{{{ ContextAddDialog constructor
public ContextAddDialog(Component comp)
{
@@ -97,15 +101,28 @@ public class ContextAddDialog extends EnhancedDialog
JPanel actionPanel = new JPanel(new BorderLayout(6,6));
ActionSet[] actionsList = jEdit.getActionSets();
- TreeSet<ActionSet> actionSets = new TreeSet<ActionSet>();
- for(int i = 0; i < actionsList.length; i++)
+ Collection<ActionSet> actionSets = new TreeSet<ActionSet>();
+ String lastSelectionLabel = jEdit.getProperty(CONTEXT_ADD_DIALOG_LAST_SELECTION);
+ for (ActionSet actionSet : actionsList)
{
- ActionSet actionSet = actionsList[i];
- if(actionSet.getActionCount() != 0)
+ if (actionSet.getActionCount() != 0)
+ {
actionSets.add(actionSet);
+ }
+ }
+ int selectionIndex = 0;
+ int i = 0;
+ for (ActionSet actionSet : actionSets)
+ {
+ if (actionSet.getLabel().equals(lastSelectionLabel))
+ {
+ selectionIndex = i;
+ break;
+ }
+ i++;
}
combo = new JComboBox(actionSets.toArray());
- combo.setSelectedIndex(jEdit.getIntegerProperty("contextAddDialog.lastSelection",1));
+ combo.setSelectedIndex(selectionIndex);
combo.addActionListener(actionHandler);
actionPanel.add(BorderLayout.NORTH,combo);
@@ -162,8 +179,9 @@ public class ContextAddDialog extends EnhancedDialog
return "-";
else if(action.isSelected())
{
- return ((AbstractContextOptionPane.MenuItem)list.getSelectedValue())
- .actionName;
+ AbstractContextOptionPane.MenuItem selectedValue =
+ (AbstractContextOptionPane.MenuItem) list.getSelectedValue();
+ return selectedValue == null ? null : selectedValue.actionName;
}
else
throw new InternalError();
@@ -181,10 +199,10 @@ public class ContextAddDialog extends EnhancedDialog
private void updateList()
{
ActionSet actionSet = (ActionSet)combo.getSelectedItem();
- jEdit.setIntegerProperty("contextAddDialog.lastSelection", combo.getSelectedIndex());
+ jEdit.setProperty(CONTEXT_ADD_DIALOG_LAST_SELECTION, actionSet.getLabel());
EditAction[] actions = actionSet.getActions();
- Vector listModel = new Vector(actions.length);
+ Vector<MenuItem> listModel = new Vector<MenuItem>(actions.length);
for(int i = 0; i < actions.length; i++)
{
@@ -193,8 +211,7 @@ public class ContextAddDialog extends EnhancedDialog
if(label == null)
continue;
- listModel.addElement(new AbstractContextOptionPane.MenuItem(
- action.getName(),label));
+ listModel.addElement(new MenuItem(action.getName(),label));
}
Collections.sort(listModel,new AbstractContextOptionPane.MenuItemCompare());
diff --git a/jEdit/org/gjt/sp/jedit/gui/DefaultFocusComponent.java b/jEdit/org/gjt/sp/jedit/gui/DefaultFocusComponent.java
index 8a2ae0b..2f336b4 100644
--- a/jEdit/org/gjt/sp/jedit/gui/DefaultFocusComponent.java
+++ b/jEdit/org/gjt/sp/jedit/gui/DefaultFocusComponent.java
@@ -1,41 +1,41 @@
-/*
- * DefaultFocusComponent.java - Interface for dockable windows
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-/**
- * An interface that provides a method for focusing on the default
- * component. The file system browser implements this in order to
- * focus on the file system view by default, for example.
- *
- * @since jEdit 4.2pre1
- * @author Slava Pestov
- * @version $Id: DefaultFocusComponent.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public interface DefaultFocusComponent
-{
- /**
- * Sets focus on the default component.
- * @since jEdit 4.2pre1
- */
- void focusOnDefaultComponent();
-}
+/*
+ * DefaultFocusComponent.java - Interface for dockable windows
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+/**
+ * An interface that provides a method for focusing on the default
+ * component. The file system browser implements this in order to
+ * focus on the file system view by default, for example.
+ *
+ * @since jEdit 4.2pre1
+ * @author Slava Pestov
+ * @version $Id: DefaultFocusComponent.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public interface DefaultFocusComponent
+{
+ /**
+ * Sets focus on the default component.
+ * @since jEdit 4.2pre1
+ */
+ void focusOnDefaultComponent();
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/DefaultInputHandler.java b/jEdit/org/gjt/sp/jedit/gui/DefaultInputHandler.java
index a9e1c11..b7c5d20 100644
--- a/jEdit/org/gjt/sp/jedit/gui/DefaultInputHandler.java
+++ b/jEdit/org/gjt/sp/jedit/gui/DefaultInputHandler.java
@@ -1,245 +1,245 @@
-/*
- * DefaultInputHandler.java - Default implementation of an input handler
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.event.InputEvent;
-import java.awt.Toolkit;
-import java.util.Hashtable;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * The default input handler. It maps sequences of keystrokes into actions
- * and inserts key typed events into the text area.
- * @author Slava Pestov
- * @version $Id: DefaultInputHandler.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class DefaultInputHandler extends InputHandler
-{
- //{{{ DefaultInputHandler constructor
- /**
- * Creates a new input handler with no key bindings defined.
- * @param view The view
- * @param bindings An explicitly-specified set of key bindings,
- * must not be null.
- * @since jEdit 4.3pre1
- */
- public DefaultInputHandler(View view, Hashtable bindings)
- {
- super(view);
-
- if(bindings == null)
- throw new NullPointerException();
- this.bindings = this.currentBindings = bindings;
- } //}}}
-
- //{{{ DefaultInputHandler constructor
- /**
- * Creates a new input handler with no key bindings defined.
- * @param view The view
- */
- public DefaultInputHandler(View view)
- {
- this(view,new Hashtable());
- } //}}}
-
- //{{{ DefaultInputHandler constructor
- /**
- * Creates a new input handler with the same set of key bindings
- * as the one specified. Note that both input handlers share
- * a pointer to exactly the same key binding table; so adding
- * a key binding in one will also add it to the other.
- * @param copy The input handler to copy key bindings from
- * @param view The view
- */
- public DefaultInputHandler(View view, DefaultInputHandler copy)
- {
- this(view,copy.bindings);
- } //}}}
-
- //{{{ isPrefixActive() method
- /**
- * Returns if a prefix key has been pressed.
- */
- @Override
- public boolean isPrefixActive()
- {
- return bindings != currentBindings
- || super.isPrefixActive();
- } //}}}
-
- //{{{ setCurrentBindings() method
- @Override
- public void setCurrentBindings(Hashtable bindings)
- {
- view.getStatus().setMessage((String)bindings.get(PREFIX_STR));
- currentBindings = bindings;
- } //}}}
-
- //{{{ handleKey() method
- /**
- * Handles the given keystroke.
- * @param keyStroke The key stroke
- * @param dryRun only calculate the return value, do not have any other effect
- * @since jEdit 4.2pre5
- */
- public boolean handleKey(KeyEventTranslator.Key keyStroke,boolean dryRun)
- {
- char input = '\0';
- if(keyStroke.modifiers == null
- || keyStroke.modifiers.equals("S"))
- {
- switch(keyStroke.key)
- {
- case '\n':
- case '\t':
- input = (char)keyStroke.key;
- break;
- default:
- input = keyStroke.input;
- break;
- }
- }
-
- if(readNextChar != null)
- {
- if(input != '\0')
- {
- if (!dryRun)
- {
- setCurrentBindings(bindings);
- invokeReadNextChar(input);
- repeatCount = 1;
- }
- return true;
- }
- else
- {
- if (!dryRun)
- {
- readNextChar = null;
- view.getStatus().setMessage(null);
- }
- }
- }
-
- Object o = currentBindings.get(keyStroke);
- if(o == null)
- {
- if (!dryRun)
- {
- // Don't beep if the user presses some
- // key we don't know about unless a
- // prefix is active. Otherwise it will
- // beep when caps lock is pressed, etc.
- if(currentBindings != bindings)
- {
- Toolkit.getDefaultToolkit().beep();
- // F10 should be passed on, but C+e F10
- // shouldn't
- repeatCount = 1;
- setCurrentBindings(bindings);
- }
- else if(input != '\0')
- {
- if (!keyStroke.isFromGlobalContext())
- { // let user input be only local
- userInput(input);
- }
- }
- else
- {
- // this is retarded. excuse me while I drool
- // and make stupid noises
- if(KeyEventWorkaround.isNumericKeypad(keyStroke.key))
- KeyEventWorkaround.numericKeypadKey();
- }
- sendShortcutPrefixOff();
- }
- }
- else if(o instanceof Hashtable)
- {
- if (!dryRun)
- {
- setCurrentBindings((Hashtable)o);
- ShortcutPrefixActiveEvent.firePrefixStateChange(currentBindings, true);
- shortcutOn = true;
- }
- return true;
- }
- else if(o instanceof String)
- {
- if (!dryRun)
- {
- setCurrentBindings(bindings);
- sendShortcutPrefixOff();
- invokeAction((String)o);
- }
- return true;
- }
- else if(o instanceof EditAction)
- {
- if (!dryRun)
- {
- setCurrentBindings(bindings);
- sendShortcutPrefixOff();
- invokeAction((EditAction)o);
- }
- return true;
- }
- if (!dryRun)
- {
- sendShortcutPrefixOff();
- }
- return false;
- } //}}}
-
- //{{{ getSymbolicModifierName() method
- /**
- * Returns a the symbolic modifier name for the specified Java modifier
- * flag.
- *
- * @param mod A modifier constant from <code>InputEvent</code>
- *
- * @since jEdit 4.1pre3
- */
- public static char getSymbolicModifierName(int mod)
- {
- return KeyEventTranslator.getSymbolicModifierName(mod);
- } //}}}
-
- //{{{ getModifierString() method
- /**
- * Returns a string containing symbolic modifier names set in the
- * specified event.
- *
- * @param evt The event
- *
- * @since jEdit 4.1pre3
- */
- public static String getModifierString(InputEvent evt)
- {
- return KeyEventTranslator.getModifierString(evt);
- } //}}}
-}
+/*
+ * DefaultInputHandler.java - Default implementation of an input handler
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.event.InputEvent;
+import java.awt.Toolkit;
+import java.util.Hashtable;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * The default input handler. It maps sequences of keystrokes into actions
+ * and inserts key typed events into the text area.
+ * @author Slava Pestov
+ * @version $Id: DefaultInputHandler.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class DefaultInputHandler extends InputHandler
+{
+ //{{{ DefaultInputHandler constructor
+ /**
+ * Creates a new input handler with no key bindings defined.
+ * @param view The view
+ * @param bindings An explicitly-specified set of key bindings,
+ * must not be null.
+ * @since jEdit 4.3pre1
+ */
+ public DefaultInputHandler(View view, Hashtable bindings)
+ {
+ super(view);
+
+ if(bindings == null)
+ throw new NullPointerException();
+ this.bindings = this.currentBindings = bindings;
+ } //}}}
+
+ //{{{ DefaultInputHandler constructor
+ /**
+ * Creates a new input handler with no key bindings defined.
+ * @param view The view
+ */
+ public DefaultInputHandler(View view)
+ {
+ this(view,new Hashtable());
+ } //}}}
+
+ //{{{ DefaultInputHandler constructor
+ /**
+ * Creates a new input handler with the same set of key bindings
+ * as the one specified. Note that both input handlers share
+ * a pointer to exactly the same key binding table; so adding
+ * a key binding in one will also add it to the other.
+ * @param copy The input handler to copy key bindings from
+ * @param view The view
+ */
+ public DefaultInputHandler(View view, DefaultInputHandler copy)
+ {
+ this(view,copy.bindings);
+ } //}}}
+
+ //{{{ isPrefixActive() method
+ /**
+ * Returns if a prefix key has been pressed.
+ */
+ @Override
+ public boolean isPrefixActive()
+ {
+ return bindings != currentBindings
+ || super.isPrefixActive();
+ } //}}}
+
+ //{{{ setCurrentBindings() method
+ @Override
+ public void setCurrentBindings(Hashtable bindings)
+ {
+ view.getStatus().setMessage((String)bindings.get(PREFIX_STR));
+ currentBindings = bindings;
+ } //}}}
+
+ //{{{ handleKey() method
+ /**
+ * Handles the given keystroke.
+ * @param keyStroke The key stroke
+ * @param dryRun only calculate the return value, do not have any other effect
+ * @since jEdit 4.2pre5
+ */
+ public boolean handleKey(KeyEventTranslator.Key keyStroke,boolean dryRun)
+ {
+ char input = '\0';
+ if(keyStroke.modifiers == null
+ || keyStroke.modifiers.equals("S"))
+ {
+ switch(keyStroke.key)
+ {
+ case '\n':
+ case '\t':
+ input = (char)keyStroke.key;
+ break;
+ default:
+ input = keyStroke.input;
+ break;
+ }
+ }
+
+ if(readNextChar != null)
+ {
+ if(input != '\0')
+ {
+ if (!dryRun)
+ {
+ setCurrentBindings(bindings);
+ invokeReadNextChar(input);
+ repeatCount = 1;
+ }
+ return true;
+ }
+ else
+ {
+ if (!dryRun)
+ {
+ readNextChar = null;
+ view.getStatus().setMessage(null);
+ }
+ }
+ }
+
+ Object o = currentBindings.get(keyStroke);
+ if(o == null)
+ {
+ if (!dryRun)
+ {
+ // Don't beep if the user presses some
+ // key we don't know about unless a
+ // prefix is active. Otherwise it will
+ // beep when caps lock is pressed, etc.
+ if(currentBindings != bindings)
+ {
+ Toolkit.getDefaultToolkit().beep();
+ // F10 should be passed on, but C+e F10
+ // shouldn't
+ repeatCount = 1;
+ setCurrentBindings(bindings);
+ }
+ else if(input != '\0')
+ {
+ if (!keyStroke.isFromGlobalContext())
+ { // let user input be only local
+ userInput(input);
+ }
+ }
+ else
+ {
+ // this is retarded. excuse me while I drool
+ // and make stupid noises
+ if(KeyEventWorkaround.isNumericKeypad(keyStroke.key))
+ KeyEventWorkaround.numericKeypadKey();
+ }
+ sendShortcutPrefixOff();
+ }
+ }
+ else if(o instanceof Hashtable)
+ {
+ if (!dryRun)
+ {
+ setCurrentBindings((Hashtable)o);
+ ShortcutPrefixActiveEvent.firePrefixStateChange(currentBindings, true);
+ shortcutOn = true;
+ }
+ return true;
+ }
+ else if(o instanceof String)
+ {
+ if (!dryRun)
+ {
+ setCurrentBindings(bindings);
+ sendShortcutPrefixOff();
+ invokeAction((String)o);
+ }
+ return true;
+ }
+ else if(o instanceof EditAction)
+ {
+ if (!dryRun)
+ {
+ setCurrentBindings(bindings);
+ sendShortcutPrefixOff();
+ invokeAction((EditAction)o);
+ }
+ return true;
+ }
+ if (!dryRun)
+ {
+ sendShortcutPrefixOff();
+ }
+ return false;
+ } //}}}
+
+ //{{{ getSymbolicModifierName() method
+ /**
+ * Returns a the symbolic modifier name for the specified Java modifier
+ * flag.
+ *
+ * @param mod A modifier constant from <code>InputEvent</code>
+ *
+ * @since jEdit 4.1pre3
+ */
+ public static char getSymbolicModifierName(int mod)
+ {
+ return KeyEventTranslator.getSymbolicModifierName(mod);
+ } //}}}
+
+ //{{{ getModifierString() method
+ /**
+ * Returns a string containing symbolic modifier names set in the
+ * specified event.
+ *
+ * @param evt The event
+ *
+ * @since jEdit 4.1pre3
+ */
+ public static String getModifierString(InputEvent evt)
+ {
+ return KeyEventTranslator.getModifierString(evt);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/DockableLayout.java b/jEdit/org/gjt/sp/jedit/gui/DockableLayout.java
index 6d5467e..1b7d74f 100644
--- a/jEdit/org/gjt/sp/jedit/gui/DockableLayout.java
+++ b/jEdit/org/gjt/sp/jedit/gui/DockableLayout.java
@@ -1,470 +1,470 @@
-/*
- * DockableLayout.java -- a more flexible BorderLayout
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.*;
-//}}}
-
-public class DockableLayout implements LayoutManager2
-{
- // for backwards compatibility with plugins that fiddle with
- // jEdit's UI layout
- static final String CENTER = BorderLayout.CENTER;
-
- static final String TOP_BUTTONS = "top-buttons";
- static final String LEFT_BUTTONS = "left-buttons";
- static final String BOTTOM_BUTTONS = "bottom-buttons";
- static final String RIGHT_BUTTONS = "right-buttons";
-
- private boolean alternateLayout;
- private Component center;
-
- /* No good */
- private DockablePanel top;
- private DockablePanel left;
- private DockablePanel bottom;
- private DockablePanel right;
-
- private Component topButtons, leftButtons, bottomButtons, rightButtons;
-
- /** @deprecated use isAlternateLayout */
- @Deprecated
- public boolean setAlternateLayout()
- {
- return isAlternateLayout();
- }
-
- //{{{ isAlternateLayout() method
-
- /**
- * jEdit View option: wide horizontal docking areas versus tall vertical docking areas
- * @return true if using the "alternate layout"
- */
- public boolean isAlternateLayout()
- {
- return alternateLayout;
- } //}}}
-
- //{{{ setAlternateLayout() method
- public void setAlternateLayout(boolean alternateLayout)
- {
- this.alternateLayout = alternateLayout;
- } //}}}
-
- //{{{ addLayoutComponent() method
- public void addLayoutComponent(String name, Component comp)
- {
- addLayoutComponent(comp, name);
- } //}}}
-
- //{{{ addLayoutComponent() method
- public void addLayoutComponent(Component comp, Object cons)
- {
- if(cons == null || CENTER.equals(cons))
- center = comp;
- else if(DockableWindowManager.TOP.equals(cons))
- top = (DockablePanel)comp;
- else if(DockableWindowManager.LEFT.equals(cons))
- left = (DockablePanel)comp;
- else if(DockableWindowManager.BOTTOM.equals(cons))
- bottom = (DockablePanel)comp;
- else if(DockableWindowManager.RIGHT.equals(cons))
- right = (DockablePanel)comp;
- else if(TOP_BUTTONS.equals(cons))
- topButtons = comp;
- else if(LEFT_BUTTONS.equals(cons))
- leftButtons = comp;
- else if(BOTTOM_BUTTONS.equals(cons))
- bottomButtons = comp;
- else if(RIGHT_BUTTONS.equals(cons))
- rightButtons = comp;
- } //}}}
-
- //{{{ removeLayoutComponent() method
- public void removeLayoutComponent(Component comp)
- {
- if(center == comp)
- center = null;
- else if(comp == top)
- top = null;
- else if(comp == left)
- left = null;
- else if(comp == bottom)
- bottom = null;
- else if(comp == right)
- right = null;
- } //}}}
-
- //{{{ preferredLayoutSize() method
- public Dimension preferredLayoutSize(Container parent)
- {
- Dimension prefSize = new Dimension(0,0);
- Dimension _top = top.getPreferredSize();
- Dimension _left = left.getPreferredSize();
- Dimension _bottom = bottom.getPreferredSize();
- Dimension _right = right.getPreferredSize();
- Dimension _topButtons = topButtons.getPreferredSize();
- Dimension _leftButtons = leftButtons.getPreferredSize();
- Dimension _bottomButtons = bottomButtons.getPreferredSize();
- Dimension _rightButtons = rightButtons.getPreferredSize();
- Dimension _center = (center == null
- ? new Dimension(0,0)
- : center.getPreferredSize());
- Dimension _topToolbars = new Dimension(0,0);
- Dimension _bottomToolbars = new Dimension(0,0);
-
- prefSize.height = _top.height + _bottom.height + _center.height
- + _topButtons.height + _bottomButtons.height
- + _topToolbars.height + _bottomToolbars.height;
- prefSize.width = _left.width + _right.width
- + Math.max(_center.width,
- Math.max(_topToolbars.width,_bottomToolbars.width))
- + _leftButtons.width + _rightButtons.width;
-
- return prefSize;
- } //}}}
-
- //{{{ minimumLayoutSize() method
- public Dimension minimumLayoutSize(Container parent)
- {
- // I'm lazy
- return preferredLayoutSize(parent);
- } //}}}
-
- //{{{ maximumLayoutSize() method
- public Dimension maximumLayoutSize(Container parent)
- {
- return new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
- } //}}}
-
- //{{{ layoutContainer() method
- public void layoutContainer(Container parent)
- {
- Dimension size = parent.getSize();
-
- Dimension _topToolbars = new Dimension(0,0);
- Dimension _bottomToolbars = new Dimension(0,0);
-
- int topButtonHeight = -1;
- int bottomButtonHeight = -1;
- int leftButtonWidth = -1;
- int rightButtonWidth = -1;
-
- Dimension _top = top.getPreferredSize();
- Dimension _left = left.getPreferredSize();
- Dimension _bottom = bottom.getPreferredSize();
- Dimension _right = right.getPreferredSize();
-
- int topHeight = _top.height;
- int bottomHeight = _bottom.height;
- int leftWidth = _left.width;
- int rightWidth = _right.width;
-
- boolean topEmpty = ((Container)topButtons)
- .getComponentCount() <= 2;
- boolean leftEmpty = ((Container)leftButtons)
- .getComponentCount() <= 2;
- boolean bottomEmpty = ((Container)bottomButtons)
- .getComponentCount() <= 2;
- boolean rightEmpty = ((Container)rightButtons)
- .getComponentCount() <= 2;
-
- Dimension closeBoxSize;
- if(((Container)topButtons).getComponentCount() == 0)
- closeBoxSize = new Dimension(0,0);
- else
- {
- closeBoxSize = ((Container)topButtons)
- .getComponent(0).getPreferredSize();
- }
-
- int closeBoxWidth = Math.max(closeBoxSize.width,
- closeBoxSize.height) + 1;
-
- if(alternateLayout)
- {
- //{{{ Lay out independent buttons
- int _width = size.width;
-
- int padding = (leftEmpty&&rightEmpty)
- ? 0 : closeBoxWidth;
-
- topButtonHeight = top.getWindowContainer()
- .getWrappedDimension(_width
- - closeBoxWidth * 2);
- topButtons.setBounds(
- padding,
- 0,
- size.width - padding * 2,
- topButtonHeight);
-
- bottomButtonHeight = bottom.getWindowContainer()
- .getWrappedDimension(_width);
- bottomButtons.setBounds(
- padding,
- size.height - bottomButtonHeight,
- size.width - padding * 2,
- bottomButtonHeight);
-
- int _height = size.height
- - topButtonHeight
- - bottomButtonHeight;
- //}}}
-
- //{{{ Lay out dependent buttons
- leftButtonWidth = left.getWindowContainer()
- .getWrappedDimension(_height);
- leftButtons.setBounds(
- 0,
- topHeight + topButtonHeight,
- leftButtonWidth,
- _height - topHeight - bottomHeight);
-
- rightButtonWidth = right.getWindowContainer()
- .getWrappedDimension(_height);
- rightButtons.setBounds(
- size.width - rightButtonWidth,
- topHeight + topButtonHeight,
- rightButtonWidth,
- _height - topHeight - bottomHeight);
- //}}}
-
- int[] dimensions = adjustDockingAreasToFit(
- size,
- topHeight,
- leftWidth,
- bottomHeight,
- rightWidth,
- topButtonHeight,
- leftButtonWidth,
- bottomButtonHeight,
- rightButtonWidth,
- _topToolbars,
- _bottomToolbars);
-
- topHeight = dimensions[0];
- leftWidth = dimensions[1];
- bottomHeight = dimensions[2];
- rightWidth = dimensions[3];
-
- //{{{ Lay out docking areas
- top.setBounds(
- 0,
- topButtonHeight,
- size.width,
- topHeight);
-
- bottom.setBounds(
- 0,
- size.height
- - bottomHeight
- - bottomButtonHeight,
- size.width,
- bottomHeight);
-
- left.setBounds(
- leftButtonWidth,
- topButtonHeight + topHeight,
- leftWidth,
- _height - topHeight - bottomHeight);
-
- right.setBounds(
- _width - rightButtonWidth - rightWidth,
- topButtonHeight + topHeight,
- rightWidth,
- _height - topHeight - bottomHeight); //}}}
- }
- else
- {
- //{{{ Lay out independent buttons
- int _height = size.height;
-
- int padding = (topEmpty && bottomEmpty
- ? 0 : closeBoxWidth);
-
- leftButtonWidth = left.getWindowContainer()
- .getWrappedDimension(_height
- - closeBoxWidth * 2);
- leftButtons.setBounds(
- 0,
- padding,
- leftButtonWidth,
- _height - padding * 2);
-
- rightButtonWidth = right.getWindowContainer()
- .getWrappedDimension(_height);
- rightButtons.setBounds(
- size.width - rightButtonWidth,
- padding,
- rightButtonWidth,
- _height - padding * 2);
-
- int _width = size.width
- - leftButtonWidth
- - rightButtonWidth;
- //}}}
-
- //{{{ Lay out dependent buttons
- topButtonHeight = top.getWindowContainer()
- .getWrappedDimension(_width);
- topButtons.setBounds(
- leftButtonWidth + leftWidth,
- 0,
- _width - leftWidth - rightWidth,
- topButtonHeight);
-
- bottomButtonHeight = bottom.getWindowContainer()
- .getWrappedDimension(_width);
- bottomButtons.setBounds(
- leftButtonWidth + leftWidth,
- _height - bottomButtonHeight,
- _width - leftWidth - rightWidth,
- bottomButtonHeight); //}}}
-
- int[] dimensions = adjustDockingAreasToFit(
- size,
- topHeight,
- leftWidth,
- bottomHeight,
- rightWidth,
- topButtonHeight,
- leftButtonWidth,
- bottomButtonHeight,
- rightButtonWidth,
- _topToolbars,
- _bottomToolbars);
-
- topHeight = dimensions[0];
- leftWidth = dimensions[1];
- bottomHeight = dimensions[2];
- rightWidth = dimensions[3];
-
- //{{{ Lay out docking areas
- top.setBounds(
- leftButtonWidth + leftWidth,
- topButtonHeight,
- _width - leftWidth - rightWidth,
- topHeight);
-
- bottom.setBounds(
- leftButtonWidth + leftWidth,
- size.height - bottomHeight - bottomButtonHeight,
- _width - leftWidth - rightWidth,
- bottomHeight);
-
- left.setBounds(
- leftButtonWidth,
- 0,
- leftWidth,
- _height);
-
- right.setBounds(
- size.width - rightWidth - rightButtonWidth,
- 0,
- rightWidth,
- _height); //}}}
- }
-
- //{{{ Position center (edit pane, or split pane)
- if(center != null)
- {
- center.setBounds(
- leftButtonWidth + leftWidth,
- topButtonHeight + topHeight
- + _topToolbars.height,
- size.width
- - leftWidth
- - rightWidth
- - leftButtonWidth
- - rightButtonWidth,
- size.height
- - topHeight
- - topButtonHeight
- - bottomHeight
- - bottomButtonHeight
- - _topToolbars.height
- - _bottomToolbars.height);
- } //}}}
- } //}}}
-
- //{{{ adjustDockingAreasToFit() method
- private int[] adjustDockingAreasToFit(
- Dimension size,
- int topHeight,
- int leftWidth,
- int bottomHeight,
- int rightWidth,
- int topButtonHeight,
- int leftButtonWidth,
- int bottomButtonHeight,
- int rightButtonWidth,
- Dimension _topToolbars,
- Dimension _bottomToolbars)
- {
- int maxTopHeight = size.height - bottomHeight
- - topButtonHeight - bottomButtonHeight
- - _topToolbars.height - _bottomToolbars.height;
- topHeight = Math.min(Math.max(0,maxTopHeight),
- topHeight);
- leftWidth = Math.min(Math.max(0,
- size.width - leftButtonWidth
- - rightButtonWidth - rightWidth),leftWidth);
- int maxBottomHeight = size.height - topHeight
- - topButtonHeight - bottomButtonHeight
- - _topToolbars.height - _bottomToolbars.height;
- bottomHeight = Math.min(Math.max(0,maxBottomHeight),
- bottomHeight);
- rightWidth = Math.min(Math.max(0,
- size.width - leftButtonWidth
- - rightButtonWidth - leftWidth),rightWidth);
-
- top.getWindowContainer().setDimension(topHeight);
- left.getWindowContainer().setDimension(leftWidth);
- bottom.getWindowContainer().setDimension(bottomHeight);
- right.getWindowContainer().setDimension(rightWidth);
-
- return new int[] {
- topHeight,
- leftWidth,
- bottomHeight,
- rightWidth
- };
- } //}}}
-
- //{{{ getLayoutAlignmentX() method
- public float getLayoutAlignmentX(Container target)
- {
- return 0.5f;
- } //}}}
-
- //{{{ getLayoutAlignmentY() method
- public float getLayoutAlignmentY(Container target)
- {
- return 0.5f;
- } //}}}
-
- //{{{ invalidateLayout() method
- public void invalidateLayout(Container target) {}
- //}}}
-}
+/*
+ * DockableLayout.java -- a more flexible BorderLayout
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.*;
+//}}}
+
+public class DockableLayout implements LayoutManager2
+{
+ // for backwards compatibility with plugins that fiddle with
+ // jEdit's UI layout
+ static final String CENTER = BorderLayout.CENTER;
+
+ static final String TOP_BUTTONS = "top-buttons";
+ static final String LEFT_BUTTONS = "left-buttons";
+ static final String BOTTOM_BUTTONS = "bottom-buttons";
+ static final String RIGHT_BUTTONS = "right-buttons";
+
+ private boolean alternateLayout;
+ private Component center;
+
+ /* No good */
+ private DockablePanel top;
+ private DockablePanel left;
+ private DockablePanel bottom;
+ private DockablePanel right;
+
+ private Component topButtons, leftButtons, bottomButtons, rightButtons;
+
+ /** @deprecated use isAlternateLayout */
+ @Deprecated
+ public boolean setAlternateLayout()
+ {
+ return isAlternateLayout();
+ }
+
+ //{{{ isAlternateLayout() method
+
+ /**
+ * jEdit View option: wide horizontal docking areas versus tall vertical docking areas
+ * @return true if using the "alternate layout"
+ */
+ public boolean isAlternateLayout()
+ {
+ return alternateLayout;
+ } //}}}
+
+ //{{{ setAlternateLayout() method
+ public void setAlternateLayout(boolean alternateLayout)
+ {
+ this.alternateLayout = alternateLayout;
+ } //}}}
+
+ //{{{ addLayoutComponent() method
+ public void addLayoutComponent(String name, Component comp)
+ {
+ addLayoutComponent(comp, name);
+ } //}}}
+
+ //{{{ addLayoutComponent() method
+ public void addLayoutComponent(Component comp, Object cons)
+ {
+ if(cons == null || CENTER.equals(cons))
+ center = comp;
+ else if(DockableWindowManager.TOP.equals(cons))
+ top = (DockablePanel)comp;
+ else if(DockableWindowManager.LEFT.equals(cons))
+ left = (DockablePanel)comp;
+ else if(DockableWindowManager.BOTTOM.equals(cons))
+ bottom = (DockablePanel)comp;
+ else if(DockableWindowManager.RIGHT.equals(cons))
+ right = (DockablePanel)comp;
+ else if(TOP_BUTTONS.equals(cons))
+ topButtons = comp;
+ else if(LEFT_BUTTONS.equals(cons))
+ leftButtons = comp;
+ else if(BOTTOM_BUTTONS.equals(cons))
+ bottomButtons = comp;
+ else if(RIGHT_BUTTONS.equals(cons))
+ rightButtons = comp;
+ } //}}}
+
+ //{{{ removeLayoutComponent() method
+ public void removeLayoutComponent(Component comp)
+ {
+ if(center == comp)
+ center = null;
+ else if(comp == top)
+ top = null;
+ else if(comp == left)
+ left = null;
+ else if(comp == bottom)
+ bottom = null;
+ else if(comp == right)
+ right = null;
+ } //}}}
+
+ //{{{ preferredLayoutSize() method
+ public Dimension preferredLayoutSize(Container parent)
+ {
+ Dimension prefSize = new Dimension(0,0);
+ Dimension _top = top.getPreferredSize();
+ Dimension _left = left.getPreferredSize();
+ Dimension _bottom = bottom.getPreferredSize();
+ Dimension _right = right.getPreferredSize();
+ Dimension _topButtons = topButtons.getPreferredSize();
+ Dimension _leftButtons = leftButtons.getPreferredSize();
+ Dimension _bottomButtons = bottomButtons.getPreferredSize();
+ Dimension _rightButtons = rightButtons.getPreferredSize();
+ Dimension _center = (center == null
+ ? new Dimension(0,0)
+ : center.getPreferredSize());
+ Dimension _topToolbars = new Dimension(0,0);
+ Dimension _bottomToolbars = new Dimension(0,0);
+
+ prefSize.height = _top.height + _bottom.height + _center.height
+ + _topButtons.height + _bottomButtons.height
+ + _topToolbars.height + _bottomToolbars.height;
+ prefSize.width = _left.width + _right.width
+ + Math.max(_center.width,
+ Math.max(_topToolbars.width,_bottomToolbars.width))
+ + _leftButtons.width + _rightButtons.width;
+
+ return prefSize;
+ } //}}}
+
+ //{{{ minimumLayoutSize() method
+ public Dimension minimumLayoutSize(Container parent)
+ {
+ // I'm lazy
+ return preferredLayoutSize(parent);
+ } //}}}
+
+ //{{{ maximumLayoutSize() method
+ public Dimension maximumLayoutSize(Container parent)
+ {
+ return new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
+ } //}}}
+
+ //{{{ layoutContainer() method
+ public void layoutContainer(Container parent)
+ {
+ Dimension size = parent.getSize();
+
+ Dimension _topToolbars = new Dimension(0,0);
+ Dimension _bottomToolbars = new Dimension(0,0);
+
+ int topButtonHeight = -1;
+ int bottomButtonHeight = -1;
+ int leftButtonWidth = -1;
+ int rightButtonWidth = -1;
+
+ Dimension _top = top.getPreferredSize();
+ Dimension _left = left.getPreferredSize();
+ Dimension _bottom = bottom.getPreferredSize();
+ Dimension _right = right.getPreferredSize();
+
+ int topHeight = _top.height;
+ int bottomHeight = _bottom.height;
+ int leftWidth = _left.width;
+ int rightWidth = _right.width;
+
+ boolean topEmpty = ((Container)topButtons)
+ .getComponentCount() <= 2;
+ boolean leftEmpty = ((Container)leftButtons)
+ .getComponentCount() <= 2;
+ boolean bottomEmpty = ((Container)bottomButtons)
+ .getComponentCount() <= 2;
+ boolean rightEmpty = ((Container)rightButtons)
+ .getComponentCount() <= 2;
+
+ Dimension closeBoxSize;
+ if(((Container)topButtons).getComponentCount() == 0)
+ closeBoxSize = new Dimension(0,0);
+ else
+ {
+ closeBoxSize = ((Container)topButtons)
+ .getComponent(0).getPreferredSize();
+ }
+
+ int closeBoxWidth = Math.max(closeBoxSize.width,
+ closeBoxSize.height) + 1;
+
+ if(alternateLayout)
+ {
+ //{{{ Lay out independent buttons
+ int _width = size.width;
+
+ int padding = (leftEmpty&&rightEmpty)
+ ? 0 : closeBoxWidth;
+
+ topButtonHeight = top.getWindowContainer()
+ .getWrappedDimension(_width
+ - closeBoxWidth * 2);
+ topButtons.setBounds(
+ padding,
+ 0,
+ size.width - padding * 2,
+ topButtonHeight);
+
+ bottomButtonHeight = bottom.getWindowContainer()
+ .getWrappedDimension(_width);
+ bottomButtons.setBounds(
+ padding,
+ size.height - bottomButtonHeight,
+ size.width - padding * 2,
+ bottomButtonHeight);
+
+ int _height = size.height
+ - topButtonHeight
+ - bottomButtonHeight;
+ //}}}
+
+ //{{{ Lay out dependent buttons
+ leftButtonWidth = left.getWindowContainer()
+ .getWrappedDimension(_height);
+ leftButtons.setBounds(
+ 0,
+ topHeight + topButtonHeight,
+ leftButtonWidth,
+ _height - topHeight - bottomHeight);
+
+ rightButtonWidth = right.getWindowContainer()
+ .getWrappedDimension(_height);
+ rightButtons.setBounds(
+ size.width - rightButtonWidth,
+ topHeight + topButtonHeight,
+ rightButtonWidth,
+ _height - topHeight - bottomHeight);
+ //}}}
+
+ int[] dimensions = adjustDockingAreasToFit(
+ size,
+ topHeight,
+ leftWidth,
+ bottomHeight,
+ rightWidth,
+ topButtonHeight,
+ leftButtonWidth,
+ bottomButtonHeight,
+ rightButtonWidth,
+ _topToolbars,
+ _bottomToolbars);
+
+ topHeight = dimensions[0];
+ leftWidth = dimensions[1];
+ bottomHeight = dimensions[2];
+ rightWidth = dimensions[3];
+
+ //{{{ Lay out docking areas
+ top.setBounds(
+ 0,
+ topButtonHeight,
+ size.width,
+ topHeight);
+
+ bottom.setBounds(
+ 0,
+ size.height
+ - bottomHeight
+ - bottomButtonHeight,
+ size.width,
+ bottomHeight);
+
+ left.setBounds(
+ leftButtonWidth,
+ topButtonHeight + topHeight,
+ leftWidth,
+ _height - topHeight - bottomHeight);
+
+ right.setBounds(
+ _width - rightButtonWidth - rightWidth,
+ topButtonHeight + topHeight,
+ rightWidth,
+ _height - topHeight - bottomHeight); //}}}
+ }
+ else
+ {
+ //{{{ Lay out independent buttons
+ int _height = size.height;
+
+ int padding = (topEmpty && bottomEmpty
+ ? 0 : closeBoxWidth);
+
+ leftButtonWidth = left.getWindowContainer()
+ .getWrappedDimension(_height
+ - closeBoxWidth * 2);
+ leftButtons.setBounds(
+ 0,
+ padding,
+ leftButtonWidth,
+ _height - padding * 2);
+
+ rightButtonWidth = right.getWindowContainer()
+ .getWrappedDimension(_height);
+ rightButtons.setBounds(
+ size.width - rightButtonWidth,
+ padding,
+ rightButtonWidth,
+ _height - padding * 2);
+
+ int _width = size.width
+ - leftButtonWidth
+ - rightButtonWidth;
+ //}}}
+
+ //{{{ Lay out dependent buttons
+ topButtonHeight = top.getWindowContainer()
+ .getWrappedDimension(_width);
+ topButtons.setBounds(
+ leftButtonWidth + leftWidth,
+ 0,
+ _width - leftWidth - rightWidth,
+ topButtonHeight);
+
+ bottomButtonHeight = bottom.getWindowContainer()
+ .getWrappedDimension(_width);
+ bottomButtons.setBounds(
+ leftButtonWidth + leftWidth,
+ _height - bottomButtonHeight,
+ _width - leftWidth - rightWidth,
+ bottomButtonHeight); //}}}
+
+ int[] dimensions = adjustDockingAreasToFit(
+ size,
+ topHeight,
+ leftWidth,
+ bottomHeight,
+ rightWidth,
+ topButtonHeight,
+ leftButtonWidth,
+ bottomButtonHeight,
+ rightButtonWidth,
+ _topToolbars,
+ _bottomToolbars);
+
+ topHeight = dimensions[0];
+ leftWidth = dimensions[1];
+ bottomHeight = dimensions[2];
+ rightWidth = dimensions[3];
+
+ //{{{ Lay out docking areas
+ top.setBounds(
+ leftButtonWidth + leftWidth,
+ topButtonHeight,
+ _width - leftWidth - rightWidth,
+ topHeight);
+
+ bottom.setBounds(
+ leftButtonWidth + leftWidth,
+ size.height - bottomHeight - bottomButtonHeight,
+ _width - leftWidth - rightWidth,
+ bottomHeight);
+
+ left.setBounds(
+ leftButtonWidth,
+ 0,
+ leftWidth,
+ _height);
+
+ right.setBounds(
+ size.width - rightWidth - rightButtonWidth,
+ 0,
+ rightWidth,
+ _height); //}}}
+ }
+
+ //{{{ Position center (edit pane, or split pane)
+ if(center != null)
+ {
+ center.setBounds(
+ leftButtonWidth + leftWidth,
+ topButtonHeight + topHeight
+ + _topToolbars.height,
+ size.width
+ - leftWidth
+ - rightWidth
+ - leftButtonWidth
+ - rightButtonWidth,
+ size.height
+ - topHeight
+ - topButtonHeight
+ - bottomHeight
+ - bottomButtonHeight
+ - _topToolbars.height
+ - _bottomToolbars.height);
+ } //}}}
+ } //}}}
+
+ //{{{ adjustDockingAreasToFit() method
+ private int[] adjustDockingAreasToFit(
+ Dimension size,
+ int topHeight,
+ int leftWidth,
+ int bottomHeight,
+ int rightWidth,
+ int topButtonHeight,
+ int leftButtonWidth,
+ int bottomButtonHeight,
+ int rightButtonWidth,
+ Dimension _topToolbars,
+ Dimension _bottomToolbars)
+ {
+ int maxTopHeight = size.height - bottomHeight
+ - topButtonHeight - bottomButtonHeight
+ - _topToolbars.height - _bottomToolbars.height;
+ topHeight = Math.min(Math.max(0,maxTopHeight),
+ topHeight);
+ leftWidth = Math.min(Math.max(0,
+ size.width - leftButtonWidth
+ - rightButtonWidth - rightWidth),leftWidth);
+ int maxBottomHeight = size.height - topHeight
+ - topButtonHeight - bottomButtonHeight
+ - _topToolbars.height - _bottomToolbars.height;
+ bottomHeight = Math.min(Math.max(0,maxBottomHeight),
+ bottomHeight);
+ rightWidth = Math.min(Math.max(0,
+ size.width - leftButtonWidth
+ - rightButtonWidth - leftWidth),rightWidth);
+
+ top.getWindowContainer().setDimension(topHeight);
+ left.getWindowContainer().setDimension(leftWidth);
+ bottom.getWindowContainer().setDimension(bottomHeight);
+ right.getWindowContainer().setDimension(rightWidth);
+
+ return new int[] {
+ topHeight,
+ leftWidth,
+ bottomHeight,
+ rightWidth
+ };
+ } //}}}
+
+ //{{{ getLayoutAlignmentX() method
+ public float getLayoutAlignmentX(Container target)
+ {
+ return 0.5f;
+ } //}}}
+
+ //{{{ getLayoutAlignmentY() method
+ public float getLayoutAlignmentY(Container target)
+ {
+ return 0.5f;
+ } //}}}
+
+ //{{{ invalidateLayout() method
+ public void invalidateLayout(Container target) {}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/DockablePanel.java b/jEdit/org/gjt/sp/jedit/gui/DockablePanel.java
index ca00712..3b77b22 100644
--- a/jEdit/org/gjt/sp/jedit/gui/DockablePanel.java
+++ b/jEdit/org/gjt/sp/jedit/gui/DockablePanel.java
@@ -1,317 +1,317 @@
-/*
- * PanelWindowContainer.java - holds dockable windows
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import org.gjt.sp.jedit.jEdit;
-
-import java.awt.CardLayout;
-import java.awt.Cursor;
-import java.awt.Dimension;
-import java.awt.Insets;
-import java.awt.Point;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseMotionListener;
-
-import javax.swing.JPanel;
-import javax.swing.border.Border;
-//}}}
-
-/**
- * @version $Id: DockablePanel.java 13259 2008-08-10 20:54:46Z shlomy $
- */
-class DockablePanel extends JPanel
-{
- private PanelWindowContainer panel;
- private DockableWindowManagerImpl wm;
-
- //{{{ DockablePanel constructor
- DockablePanel(PanelWindowContainer panel)
- {
- super(new CardLayout());
-
- this.panel = panel;
- this.wm = panel.getDockableWindowManager();
-
- ResizeMouseHandler resizeMouseHandler = new ResizeMouseHandler();
- addMouseListener(resizeMouseHandler);
- addMouseMotionListener(resizeMouseHandler);
- } //}}}
-
- //{{{ getWindowContainer() method
- PanelWindowContainer getWindowContainer()
- {
- return panel;
- } //}}}
-
- //{{{ showDockable() method
- void showDockable(String name)
- {
- ((CardLayout)getLayout()).show(this,name);
- } //}}}
-
- //{{{ getMinimumSize() method
- public Dimension getMinimumSize()
- {
- return new Dimension(0,0);
- } //}}}
-
- //{{{ getPreferredSize() method
- public Dimension getPreferredSize()
- {
- final String position = panel.getPosition();
- final int dimension = panel.getDimension();
-
- if(panel.getCurrent() == null)
- return new Dimension(0,0);
- else
- {
- if(position.equals(DockableWindowManager.TOP)
- || position.equals(DockableWindowManager.BOTTOM))
- {
- if(dimension <= 0)
- {
- int height = super.getPreferredSize().height;
- panel.setDimension(height);
- }
- return new Dimension(0,
- dimension + PanelWindowContainer
- .SPLITTER_WIDTH);
- }
- else
- {
- if(dimension <= 0)
- {
- int width = super.getPreferredSize().width;
- panel.setDimension(width);
- }
- return new Dimension(dimension +
- PanelWindowContainer.SPLITTER_WIDTH,
- 0);
- }
- }
- } //}}}
-
- //{{{ setBounds() method
- public void setBounds(int x, int y, int width, int height)
- {
- final String position = panel.getPosition();
- final int dimension = panel.getDimension();
-
- if(position.equals(DockableWindowManager.TOP) ||
- position.equals(DockableWindowManager.BOTTOM))
- {
- if(dimension != 0 && height <= PanelWindowContainer.SPLITTER_WIDTH)
- panel.show((DockableWindowManagerImpl.Entry) null);
- else
- panel.setDimension(height);
- }
- else
- {
- if(dimension != 0 && width <= PanelWindowContainer.SPLITTER_WIDTH)
- panel.show((DockableWindowManagerImpl.Entry) null);
- else
- panel.setDimension(width);
- }
-
- super.setBounds(x,y,width,height);
- } //}}}
-
- /** This belong to ResizeMouseHandler but requires to be static. */
- static Point dragStart;
-
- //{{{ ResizeMouseHandler class
- class ResizeMouseHandler extends MouseAdapter implements MouseMotionListener
- {
- /** This is true if the mouse is on the split bar. */
- boolean canDrag;
-
- //{{{ mousePressed() method
- public void mousePressed(MouseEvent evt)
- {
- if(canDrag)
- {
- continuousLayout = jEdit.getBooleanProperty("appearance.continuousLayout");
- wm.setResizePos(panel.getDimension(),panel);
- dragStart = evt.getPoint();
- }
- } //}}}
-
- //{{{ mouseReleased() method
- public void mouseReleased(MouseEvent evt)
- {
- if(canDrag)
- {
- if (!continuousLayout)
- {
- panel.setDimension(wm.resizePos
- + PanelWindowContainer
- .SPLITTER_WIDTH);
- }
- wm.finishResizing();
- dragStart = null;
- wm.revalidate();
- }
- } //}}}
-
- //{{{ mouseMoved() method
- public void mouseMoved(MouseEvent evt)
- {
- Border border = getBorder();
- if(border == null)
- {
- // collapsed
- return;
- }
-
- String position = panel.getPosition();
-
- Insets insets = border.getBorderInsets(DockablePanel.this);
- canDrag = false;
- //{{{ Top...
- if(position.equals(DockableWindowManager.TOP))
- {
- if(evt.getY() >= getHeight() - insets.bottom)
- canDrag = true;
- } //}}}
- //{{{ Left...
- else if(position.equals(DockableWindowManager.LEFT))
- {
- if(evt.getX() >= getWidth() - insets.right)
- canDrag = true;
- } //}}}
- //{{{ Bottom...
- else if(position.equals(DockableWindowManager.BOTTOM))
- {
- if(evt.getY() <= insets.top)
- canDrag = true;
- } //}}}
- //{{{ Right...
- else if(position.equals(DockableWindowManager.RIGHT))
- {
- if(evt.getX() <= insets.left)
- canDrag = true;
- } //}}}
-
- if (dragStart == null)
- {
- if(canDrag)
- {
- wm.setCursor(Cursor.getPredefinedCursor(
- getAppropriateCursor()));
- }
- else
- {
- wm.setCursor(Cursor.getPredefinedCursor(
- Cursor.DEFAULT_CURSOR));
- }
- }
- } //}}}
-
- //{{{ mouseDragged() method
- public void mouseDragged(MouseEvent evt)
- {
- if(!canDrag)
- return;
-
- if(dragStart == null) // can't happen?
- return;
-
- int dimension = panel.getDimension();
-
- String position = panel.getPosition();
-
- int newSize = 0;
- //{{{ Top...
- if(position.equals(DockableWindowManager.TOP))
- {
- newSize = evt.getY();
- wm.setResizePos(
- evt.getY() - dragStart.y
- + dimension,
- panel);
- } //}}}
- //{{{ Left...
- else if(position.equals(DockableWindowManager.LEFT))
- {
- newSize = evt.getX();
- wm.setResizePos(evt.getX() - dragStart.x
- + dimension,
- panel);
- } //}}}
- //{{{ Bottom...
- else if(position.equals(DockableWindowManager.BOTTOM))
- {
- newSize = dimension - evt.getY();
- wm.setResizePos(dimension - evt.getY()
- + dragStart.y,
- panel);
- } //}}}
- //{{{ Right...
- else if(position.equals(DockableWindowManager.RIGHT))
- {
- newSize = dimension - evt.getX();
- wm.setResizePos(dimension - evt.getX()
- + dragStart.x,
- panel);
- } //}}}
-
- if (continuousLayout)
- {
- panel.setDimension(newSize
- + PanelWindowContainer.SPLITTER_WIDTH);
- wm.revalidate();
- }
- } //}}}
-
- //{{{ mouseExited() method
- public void mouseExited(MouseEvent evt)
- {
- if (dragStart == null)
- {
- wm.setCursor(Cursor.getPredefinedCursor(
- Cursor.DEFAULT_CURSOR));
- }
- } //}}}
-
- //{{{ getCursor() method
- private int getAppropriateCursor()
- {
- String position = panel.getPosition();
-
- if(position.equals(DockableWindowManager.TOP))
- return Cursor.N_RESIZE_CURSOR;
- else if(position.equals(DockableWindowManager.LEFT))
- return Cursor.W_RESIZE_CURSOR;
- else if(position.equals(DockableWindowManager.BOTTOM))
- return Cursor.S_RESIZE_CURSOR;
- else if(position.equals(DockableWindowManager.RIGHT))
- return Cursor.E_RESIZE_CURSOR;
- else
- throw new InternalError();
- } //}}}
-
- private boolean continuousLayout;
- } //}}}
-}
+/*
+ * PanelWindowContainer.java - holds dockable windows
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import org.gjt.sp.jedit.jEdit;
+
+import java.awt.CardLayout;
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Insets;
+import java.awt.Point;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseMotionListener;
+
+import javax.swing.JPanel;
+import javax.swing.border.Border;
+//}}}
+
+/**
+ * @version $Id: DockablePanel.java 13259 2008-08-10 20:54:46Z shlomy $
+ */
+class DockablePanel extends JPanel
+{
+ private PanelWindowContainer panel;
+ private DockableWindowManagerImpl wm;
+
+ //{{{ DockablePanel constructor
+ DockablePanel(PanelWindowContainer panel)
+ {
+ super(new CardLayout());
+
+ this.panel = panel;
+ this.wm = panel.getDockableWindowManager();
+
+ ResizeMouseHandler resizeMouseHandler = new ResizeMouseHandler();
+ addMouseListener(resizeMouseHandler);
+ addMouseMotionListener(resizeMouseHandler);
+ } //}}}
+
+ //{{{ getWindowContainer() method
+ PanelWindowContainer getWindowContainer()
+ {
+ return panel;
+ } //}}}
+
+ //{{{ showDockable() method
+ void showDockable(String name)
+ {
+ ((CardLayout)getLayout()).show(this,name);
+ } //}}}
+
+ //{{{ getMinimumSize() method
+ public Dimension getMinimumSize()
+ {
+ return new Dimension(0,0);
+ } //}}}
+
+ //{{{ getPreferredSize() method
+ public Dimension getPreferredSize()
+ {
+ final String position = panel.getPosition();
+ final int dimension = panel.getDimension();
+
+ if(panel.getCurrent() == null)
+ return new Dimension(0,0);
+ else
+ {
+ if(position.equals(DockableWindowManager.TOP)
+ || position.equals(DockableWindowManager.BOTTOM))
+ {
+ if(dimension <= 0)
+ {
+ int height = super.getPreferredSize().height;
+ panel.setDimension(height);
+ }
+ return new Dimension(0,
+ dimension + PanelWindowContainer
+ .SPLITTER_WIDTH);
+ }
+ else
+ {
+ if(dimension <= 0)
+ {
+ int width = super.getPreferredSize().width;
+ panel.setDimension(width);
+ }
+ return new Dimension(dimension +
+ PanelWindowContainer.SPLITTER_WIDTH,
+ 0);
+ }
+ }
+ } //}}}
+
+ //{{{ setBounds() method
+ public void setBounds(int x, int y, int width, int height)
+ {
+ final String position = panel.getPosition();
+ final int dimension = panel.getDimension();
+
+ if(position.equals(DockableWindowManager.TOP) ||
+ position.equals(DockableWindowManager.BOTTOM))
+ {
+ if(dimension != 0 && height <= PanelWindowContainer.SPLITTER_WIDTH)
+ panel.show((DockableWindowManagerImpl.Entry) null);
+ else
+ panel.setDimension(height);
+ }
+ else
+ {
+ if(dimension != 0 && width <= PanelWindowContainer.SPLITTER_WIDTH)
+ panel.show((DockableWindowManagerImpl.Entry) null);
+ else
+ panel.setDimension(width);
+ }
+
+ super.setBounds(x,y,width,height);
+ } //}}}
+
+ /** This belong to ResizeMouseHandler but requires to be static. */
+ static Point dragStart;
+
+ //{{{ ResizeMouseHandler class
+ class ResizeMouseHandler extends MouseAdapter implements MouseMotionListener
+ {
+ /** This is true if the mouse is on the split bar. */
+ boolean canDrag;
+
+ //{{{ mousePressed() method
+ public void mousePressed(MouseEvent evt)
+ {
+ if(canDrag)
+ {
+ continuousLayout = jEdit.getBooleanProperty("appearance.continuousLayout");
+ wm.setResizePos(panel.getDimension(),panel);
+ dragStart = evt.getPoint();
+ }
+ } //}}}
+
+ //{{{ mouseReleased() method
+ public void mouseReleased(MouseEvent evt)
+ {
+ if(canDrag)
+ {
+ if (!continuousLayout)
+ {
+ panel.setDimension(wm.resizePos
+ + PanelWindowContainer
+ .SPLITTER_WIDTH);
+ }
+ wm.finishResizing();
+ dragStart = null;
+ wm.revalidate();
+ }
+ } //}}}
+
+ //{{{ mouseMoved() method
+ public void mouseMoved(MouseEvent evt)
+ {
+ Border border = getBorder();
+ if(border == null)
+ {
+ // collapsed
+ return;
+ }
+
+ String position = panel.getPosition();
+
+ Insets insets = border.getBorderInsets(DockablePanel.this);
+ canDrag = false;
+ //{{{ Top...
+ if(position.equals(DockableWindowManager.TOP))
+ {
+ if(evt.getY() >= getHeight() - insets.bottom)
+ canDrag = true;
+ } //}}}
+ //{{{ Left...
+ else if(position.equals(DockableWindowManager.LEFT))
+ {
+ if(evt.getX() >= getWidth() - insets.right)
+ canDrag = true;
+ } //}}}
+ //{{{ Bottom...
+ else if(position.equals(DockableWindowManager.BOTTOM))
+ {
+ if(evt.getY() <= insets.top)
+ canDrag = true;
+ } //}}}
+ //{{{ Right...
+ else if(position.equals(DockableWindowManager.RIGHT))
+ {
+ if(evt.getX() <= insets.left)
+ canDrag = true;
+ } //}}}
+
+ if (dragStart == null)
+ {
+ if(canDrag)
+ {
+ wm.setCursor(Cursor.getPredefinedCursor(
+ getAppropriateCursor()));
+ }
+ else
+ {
+ wm.setCursor(Cursor.getPredefinedCursor(
+ Cursor.DEFAULT_CURSOR));
+ }
+ }
+ } //}}}
+
+ //{{{ mouseDragged() method
+ public void mouseDragged(MouseEvent evt)
+ {
+ if(!canDrag)
+ return;
+
+ if(dragStart == null) // can't happen?
+ return;
+
+ int dimension = panel.getDimension();
+
+ String position = panel.getPosition();
+
+ int newSize = 0;
+ //{{{ Top...
+ if(position.equals(DockableWindowManager.TOP))
+ {
+ newSize = evt.getY();
+ wm.setResizePos(
+ evt.getY() - dragStart.y
+ + dimension,
+ panel);
+ } //}}}
+ //{{{ Left...
+ else if(position.equals(DockableWindowManager.LEFT))
+ {
+ newSize = evt.getX();
+ wm.setResizePos(evt.getX() - dragStart.x
+ + dimension,
+ panel);
+ } //}}}
+ //{{{ Bottom...
+ else if(position.equals(DockableWindowManager.BOTTOM))
+ {
+ newSize = dimension - evt.getY();
+ wm.setResizePos(dimension - evt.getY()
+ + dragStart.y,
+ panel);
+ } //}}}
+ //{{{ Right...
+ else if(position.equals(DockableWindowManager.RIGHT))
+ {
+ newSize = dimension - evt.getX();
+ wm.setResizePos(dimension - evt.getX()
+ + dragStart.x,
+ panel);
+ } //}}}
+
+ if (continuousLayout)
+ {
+ panel.setDimension(newSize
+ + PanelWindowContainer.SPLITTER_WIDTH);
+ wm.revalidate();
+ }
+ } //}}}
+
+ //{{{ mouseExited() method
+ public void mouseExited(MouseEvent evt)
+ {
+ if (dragStart == null)
+ {
+ wm.setCursor(Cursor.getPredefinedCursor(
+ Cursor.DEFAULT_CURSOR));
+ }
+ } //}}}
+
+ //{{{ getCursor() method
+ private int getAppropriateCursor()
+ {
+ String position = panel.getPosition();
+
+ if(position.equals(DockableWindowManager.TOP))
+ return Cursor.N_RESIZE_CURSOR;
+ else if(position.equals(DockableWindowManager.LEFT))
+ return Cursor.W_RESIZE_CURSOR;
+ else if(position.equals(DockableWindowManager.BOTTOM))
+ return Cursor.S_RESIZE_CURSOR;
+ else if(position.equals(DockableWindowManager.RIGHT))
+ return Cursor.E_RESIZE_CURSOR;
+ else
+ throw new InternalError();
+ } //}}}
+
+ private boolean continuousLayout;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/DockableWindow.java b/jEdit/org/gjt/sp/jedit/gui/DockableWindow.java
index 9a542c2..6269d07 100644
--- a/jEdit/org/gjt/sp/jedit/gui/DockableWindow.java
+++ b/jEdit/org/gjt/sp/jedit/gui/DockableWindow.java
@@ -1,21 +1,21 @@
-package org.gjt.sp.jedit.gui;
-
-/**
- * <p>An interface for notifying MOVABLE dockable windows before their docking
- * position is changed. </p>
- *
- * @author Shlomy Reinstein
- * @version $Id: DockableWindow.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.3pre11
- */
-
-public interface DockableWindow {
- //{{{ Move notification
- /**
- * Notifies a dockable window before its docking position is changed.
- * @param newPosition The docking position to which the window is moving.
- * @since jEdit 4.3pre11
- */
- void move(String newPosition);
- //}}}
-}
+package org.gjt.sp.jedit.gui;
+
+/**
+ * <p>An interface for notifying MOVABLE dockable windows before their docking
+ * position is changed. </p>
+ *
+ * @author Shlomy Reinstein
+ * @version $Id: DockableWindow.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.3pre11
+ */
+
+public interface DockableWindow {
+ //{{{ Move notification
+ /**
+ * Notifies a dockable window before its docking position is changed.
+ * @param newPosition The docking position to which the window is moving.
+ * @since jEdit 4.3pre11
+ */
+ void move(String newPosition);
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/DockableWindowContainer.java b/jEdit/org/gjt/sp/jedit/gui/DockableWindowContainer.java
index b26a8eb..70707bc 100644
--- a/jEdit/org/gjt/sp/jedit/gui/DockableWindowContainer.java
+++ b/jEdit/org/gjt/sp/jedit/gui/DockableWindowContainer.java
@@ -1,36 +1,36 @@
-/*
- * DockableWindowContainer.java - holds dockable windows
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-/**
- * A container for dockable windows. This class should never be used
- * directly.
- * @author Slava Pestov
- * @version $Id: DockableWindowContainer.java 13259 2008-08-10 20:54:46Z shlomy $
- * @since jEdit 2.6pre3
- */
-interface DockableWindowContainer
-{
- void register(DockableWindowManagerImpl.Entry entry);
- void remove(DockableWindowManagerImpl.Entry entry);
- void unregister(DockableWindowManagerImpl.Entry entry);
- void show(DockableWindowManagerImpl.Entry entry);
- boolean isVisible(DockableWindowManagerImpl.Entry entry);
-}
+/*
+ * DockableWindowContainer.java - holds dockable windows
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+/**
+ * A container for dockable windows. This class should never be used
+ * directly.
+ * @author Slava Pestov
+ * @version $Id: DockableWindowContainer.java 13259 2008-08-10 20:54:46Z shlomy $
+ * @since jEdit 2.6pre3
+ */
+interface DockableWindowContainer
+{
+ void register(DockableWindowManagerImpl.Entry entry);
+ void remove(DockableWindowManagerImpl.Entry entry);
+ void unregister(DockableWindowManagerImpl.Entry entry);
+ void show(DockableWindowManagerImpl.Entry entry);
+ boolean isVisible(DockableWindowManagerImpl.Entry entry);
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/DockableWindowFactory.java b/jEdit/org/gjt/sp/jedit/gui/DockableWindowFactory.java
index 728301b..8dadc1d 100644
--- a/jEdit/org/gjt/sp/jedit/gui/DockableWindowFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/DockableWindowFactory.java
@@ -1,570 +1,570 @@
-/*
- * DockableWindowFactory.java - loads dockables.xml, etc
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Stack;
-
-import javax.swing.JComponent;
-
-import org.gjt.sp.jedit.ActionSet;
-import org.gjt.sp.jedit.BeanShell;
-import org.gjt.sp.jedit.EditAction;
-import org.gjt.sp.jedit.MiscUtilities;
-import org.gjt.sp.jedit.PluginJAR;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.jedit.bsh.NameSpace;
-import org.gjt.sp.jedit.bsh.UtilEvalError;
-//}}}
-
-/**
- * Loads <code>dockable.xml</code> files and manages creation
- * of new dockable windows.
- *
- * @see DockableWindowManager
- *
- * @since jEdit 4.3pre2
- */
-public class DockableWindowFactory
-{
- //{{{ getInstance() method
- public static synchronized DockableWindowFactory getInstance()
- {
- if(instance == null)
- instance = new DockableWindowFactory();
- return instance;
- } //}}}
-
- //{{{ DockableWindowFactory constructor
- public DockableWindowFactory()
- {
- dockableWindowFactories = new HashMap<String, Window>();
- } //}}}
-
- //{{{ loadDockableWindows() method
- /**
- * Plugins shouldn't need to call this method.
- * @since jEdit 4.2pre1
- */
- public void loadDockableWindows(PluginJAR plugin, URL uri,
- PluginJAR.PluginCacheEntry cache)
- {
- try
- {
- Log.log(Log.DEBUG,DockableWindowManager.class,
- "Loading dockables from " + uri);
- DockableListHandler dh = new DockableListHandler(plugin,uri);
- boolean failure = XMLUtilities.parseXML(uri.openStream(), dh);
-
- if (!failure && cache != null)
- {
- cache.cachedDockableNames = dh.getCachedDockableNames();
- cache.cachedDockableActionFlags = dh.getCachedDockableActionFlags();
- cache.cachedDockableMovableFlags = dh.getCachedDockableMovableFlags();
- }
- }
- catch(IOException e)
- {
- Log.log(Log.ERROR,DockableWindowManager.class,e);
- }
- } //}}}
-
- //{{{ unloadDockableWindows() method
- /**
- * Plugins shouldn't need to call this method.
- * @since jEdit 4.2pre1
- */
- public void unloadDockableWindows(PluginJAR plugin)
- {
- Iterator entries = dockableWindowFactories.entrySet().iterator();
- while(entries.hasNext())
- {
- Map.Entry entry = (Map.Entry)entries.next();
- Window factory = (Window)entry.getValue();
- if(factory.plugin == plugin)
- entries.remove();
- }
- } //}}}
-
- //{{{ cacheDockableWindows() method
- /**
- * @since jEdit 4.2pre1
- */
- public void cacheDockableWindows(PluginJAR plugin,
- String[] name, boolean[] actions, boolean[] movable)
- {
- for(int i = 0; i < name.length; i++)
- {
- Window factory = new Window(plugin,
- name[i],null,actions[i],movable[i]);
- dockableWindowFactories.put(name[i],factory);
- }
- } //}}}
-
- //{{{ registerDockableWindow() method
- public void registerDockableWindow(PluginJAR plugin,
- String name, String code, boolean actions, boolean movable)
- {
- Window factory = dockableWindowFactories.get(name);
- if(factory != null)
- {
- factory.code = code;
- factory.loaded = true;
- }
- else
- {
- factory = new Window(plugin,name,code,actions, movable);
- dockableWindowFactories.put(name,factory);
- }
- } //}}}
-
- //{{{ getRegisteredDockableWindows() method
- public String[] getRegisteredDockableWindows()
- {
- String[] retVal = new String[dockableWindowFactories.size()];
- Iterator<Window> entries = dockableWindowFactories.values().iterator();
- int i = 0;
- while(entries.hasNext())
- {
- Window factory = entries.next();
- retVal[i++] = factory.name;
- }
-
- return retVal;
- } //}}}
-
- public Window getDockableWindowFactory(String name)
- {
- return dockableWindowFactories.get(name);
- }
-
- public String getDockableWindowPluginClass(String name)
- {
- Window w = getDockableWindowFactory(name);
- if (w == null || w.plugin == null || w.plugin.getPlugin() == null)
- return null;
- return w.plugin.getPlugin().getClassName();
- }
-
- //{{{ getDockableWindowIterator() method
- Iterator<Window> getDockableWindowIterator()
- {
- return dockableWindowFactories.values().iterator();
- } //}}}
-
- //{{{ DockableListHandler class
- class DockableListHandler extends DefaultHandler
- {
- //{{{ DockableListHandler constructor
- /**
- * @param plugin - the pluginJAR for which we are loading the dockables.xml
- * @param uri - the uri of the dockables.xml file?
- */
- DockableListHandler(PluginJAR plugin, URL uri)
- {
- this.plugin = plugin;
- this.uri = uri;
- stateStack = new Stack<String>();
- actions = true;
- movable = MOVABLE_DEFAULT;
-
- code = new StringBuilder();
- cachedDockableNames = new LinkedList<String>();
- cachedDockableActionFlags = new LinkedList<Boolean>();
- cachedDockableMovableFlags = new LinkedList<Boolean>();
- } //}}}
-
- //{{{ resolveEntity() method
- @Override
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "dockables.dtd", MiscUtilities.class);
- } //}}}
-
- //{{{ characters() method
- @Override
- public void characters(char[] c, int off, int len)
- {
- String tag = peekElement();
- if (tag.equals("DOCKABLE"))
- code.append(c, off, len);
- } //}}}
-
- //{{{ startElement() method
- @Override
- public void startElement(String uri, String localName,
- String qName, Attributes attrs)
- {
- String tag = pushElement(qName);
- if (tag.equals("DOCKABLE"))
- {
- dockableName = attrs.getValue("NAME");
- actions = "FALSE".equals(attrs.getValue("NO_ACTIONS"));
- String movableAttr = attrs.getValue("MOVABLE");
- if (movableAttr != null)
- movable = movableAttr.equalsIgnoreCase("TRUE");
- }
- } //}}}
-
- //{{{ endElement() method
- @Override
- public void endElement(String uri, String localName, String name)
- {
- if(name == null)
- return;
-
- String tag = peekElement();
-
- if(name.equals(tag))
- {
- if(tag.equals("DOCKABLE"))
- {
- registerDockableWindow(plugin,
- dockableName,code.toString(),actions, movable);
- cachedDockableNames.add(dockableName);
- cachedDockableActionFlags.add(
- Boolean.valueOf(actions));
- cachedDockableMovableFlags.add(
- Boolean.valueOf(movable));
- // make default be true for the next
- // action
- actions = true;
- movable = MOVABLE_DEFAULT;
- code.setLength(0);
- }
-
- popElement();
- }
- else
- {
- // can't happen
- throw new InternalError();
- }
- } //}}}
-
- //{{{ startDocument() method
- @Override
- public void startDocument()
- {
- try
- {
- pushElement(null);
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, this, e);
- }
- } //}}}
-
- //{{{ getCachedDockableNames() method
- public String[] getCachedDockableNames()
- {
- return cachedDockableNames.toArray(new String[cachedDockableNames.size()]);
- } //}}}
-
- //{{{ getCachedDockableActionFlags() method
- public boolean[] getCachedDockableActionFlags()
- {
- return booleanListToArray(cachedDockableActionFlags);
- } //}}}
-
- //{{{ getCachedDockableMovableFlags() method
- public boolean[] getCachedDockableMovableFlags()
- {
- return booleanListToArray(cachedDockableMovableFlags);
- } //}}}
-
- //{{{ booleanListToArray() method
- /**
- * This method transforms a List<Boolean> into the corresponding
- * boolean[] array
- * @param list the List<Boolean> you want to convert
- * @return a boolean[] array
- */
- private boolean[] booleanListToArray(java.util.List<Boolean> list)
- {
- boolean[] returnValue = new boolean[list.size()];
- int i = 0;
- for (Boolean value : list)
- {
- returnValue[i++] = value.booleanValue();
- }
-
- return returnValue;
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private PluginJAR plugin;
- // What is the purpose of this?
- private URL uri;
-
- private java.util.List<String> cachedDockableNames;
- private java.util.List<Boolean> cachedDockableActionFlags;
- private java.util.List<Boolean> cachedDockableMovableFlags;
-
- private String dockableName;
- private StringBuilder code;
- private boolean actions;
- private boolean movable;
- final boolean MOVABLE_DEFAULT = false;
-
- private Stack<String> stateStack;
- //}}}
-
- //{{{ pushElement() method
- private String pushElement(String name)
- {
- name = (name == null) ? null : name.intern();
-
- stateStack.push(name);
-
- return name;
- } //}}}
-
- //{{{ peekElement() method
- private String peekElement()
- {
- return stateStack.peek();
- } //}}}
-
- //{{{ popElement() method
- private String popElement()
- {
- return stateStack.pop();
- } //}}}
-
- //}}}
- } //}}}
-
- //{{{ Window class
- class Window
- {
- PluginJAR plugin;
- String name;
- String code;
- boolean loaded;
- boolean movable;
- boolean isBeingCreated = false;
-
- //{{{ Window constructor
- Window(PluginJAR plugin, String name, String code,
- boolean actions, boolean movable)
- {
- this.plugin = plugin;
- this.name = name;
- this.code = code;
- this.movable = movable;
-
- if(code != null)
- loaded = true;
-
- if(actions)
- {
- ActionSet actionSet = (plugin == null
- ? jEdit.getBuiltInActionSet()
- : plugin.getActionSet());
- actionSet.addAction(new OpenAction(name));
- actionSet.addAction(new ToggleAction(name));
- actionSet.addAction(new FloatAction(name));
-
- String label = jEdit.getProperty(name
- + ".label");
- if(label == null)
- label = "NO LABEL PROPERTY: " + name;
-
- String[] args = { label };
- jEdit.setTemporaryProperty(name + ".label",
- label);
- jEdit.setTemporaryProperty(name
- + "-toggle.label",
- jEdit.getProperty(
- "view.docking.toggle.label",args));
- jEdit.setTemporaryProperty(name
- + "-toggle.toggle","true");
- jEdit.setTemporaryProperty(name
- + "-float.label",
- jEdit.getProperty(
- "view.docking.float.label",args));
- }
- } //}}}
-
- //{{{ load() method
- void load()
- {
- if(loaded)
- return;
-
- loadDockableWindows(plugin,plugin.getDockablesURI(),null);
- } //}}}
-
- //{{{ createDockableWindow() method
- JComponent createDockableWindow(View view, String position)
- {
- // Avoid infinite recursion
- synchronized(this)
- {
- if (isBeingCreated)
- return null;
- isBeingCreated = true;
- }
-
- load();
-
- if(!loaded)
- {
- Log.log(Log.WARNING,this,"Outdated cache");
- return null;
- }
-
- NameSpace nameSpace = new NameSpace(
- BeanShell.getNameSpace(),
- "DockableWindowManager.Factory"
- + ".createDockableWindow()");
- try
- {
- nameSpace.setVariable(
- "position",position);
- }
- catch(UtilEvalError e)
- {
- Log.log(Log.ERROR,this,e);
- }
- JComponent win = (JComponent)BeanShell.eval(view,
- nameSpace,code);
- synchronized(this)
- {
- isBeingCreated = false;
- }
- return win;
- } //}}}
-
- //{{{ OpenAction class
- class OpenAction extends EditAction
- {
- private String dockable;
-
- //{{{ OpenAction constructor
- OpenAction(String name)
- {
- super(name);
- this.dockable = name;
- } //}}}
-
- //{{{ invoke() method
- public void invoke(View view)
- {
- view.getDockableWindowManager()
- .showDockableWindow(dockable);
- } //}}}
-
- //{{{ getCode() method
- @Override
- public String getCode()
- {
- return "view.getDockableWindowManager()"
- + ".showDockableWindow(\"" + dockable + "\");";
- } //}}}
- } //}}}
-
- //{{{ ToggleAction class
- class ToggleAction extends EditAction
- {
- private String dockable;
-
- //{{{ ToggleAction constructor
- ToggleAction(String name)
- {
- super(name + "-toggle");
- this.dockable = name;
- } //}}}
-
- //{{{ invoke() method
- public void invoke(View view)
- {
- view.getDockableWindowManager()
- .toggleDockableWindow(dockable);
- } //}}}
-
- //{{{ isSelected() method
- public boolean isSelected(View view)
- {
- return view.getDockableWindowManager()
- .isDockableWindowVisible(dockable);
- } //}}}
-
- //{{{ getCode() method
- @Override
- public String getCode()
- {
- return "view.getDockableWindowManager()"
- + ".toggleDockableWindow(\"" + dockable + "\");";
- } //}}}
- } //}}}
-
- //{{{ FloatAction class
- class FloatAction extends EditAction
- {
- private String dockable;
-
- //{{{ FloatAction constructor
- FloatAction(String name)
- {
- super(name + "-float");
- this.dockable = name;
- } //}}}
-
- //{{{ invoke() method
- public void invoke(View view)
- {
- view.getDockableWindowManager()
- .floatDockableWindow(dockable);
- } //}}}
-
- //{{{ getCode() method
- @Override
- public String getCode()
- {
- return "view.getDockableWindowManager()"
- + ".floatDockableWindow(\"" + dockable + "\");";
- } //}}}
- } //}}}
- } //}}}
-
- private static DockableWindowFactory instance;
- private final Map<String, Window> dockableWindowFactories;
-}
+/*
+ * DockableWindowFactory.java - loads dockables.xml, etc
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Stack;
+
+import javax.swing.JComponent;
+
+import org.gjt.sp.jedit.ActionSet;
+import org.gjt.sp.jedit.BeanShell;
+import org.gjt.sp.jedit.EditAction;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.PluginJAR;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.jedit.bsh.NameSpace;
+import org.gjt.sp.jedit.bsh.UtilEvalError;
+//}}}
+
+/**
+ * Loads <code>dockable.xml</code> files and manages creation
+ * of new dockable windows.
+ *
+ * @see DockableWindowManager
+ *
+ * @since jEdit 4.3pre2
+ */
+public class DockableWindowFactory
+{
+ //{{{ getInstance() method
+ public static synchronized DockableWindowFactory getInstance()
+ {
+ if(instance == null)
+ instance = new DockableWindowFactory();
+ return instance;
+ } //}}}
+
+ //{{{ DockableWindowFactory constructor
+ public DockableWindowFactory()
+ {
+ dockableWindowFactories = new HashMap<String, Window>();
+ } //}}}
+
+ //{{{ loadDockableWindows() method
+ /**
+ * Plugins shouldn't need to call this method.
+ * @since jEdit 4.2pre1
+ */
+ public void loadDockableWindows(PluginJAR plugin, URL uri,
+ PluginJAR.PluginCacheEntry cache)
+ {
+ try
+ {
+ Log.log(Log.DEBUG,DockableWindowManager.class,
+ "Loading dockables from " + uri);
+ DockableListHandler dh = new DockableListHandler(plugin,uri);
+ boolean failure = XMLUtilities.parseXML(uri.openStream(), dh);
+
+ if (!failure && cache != null)
+ {
+ cache.cachedDockableNames = dh.getCachedDockableNames();
+ cache.cachedDockableActionFlags = dh.getCachedDockableActionFlags();
+ cache.cachedDockableMovableFlags = dh.getCachedDockableMovableFlags();
+ }
+ }
+ catch(IOException e)
+ {
+ Log.log(Log.ERROR,DockableWindowManager.class,e);
+ }
+ } //}}}
+
+ //{{{ unloadDockableWindows() method
+ /**
+ * Plugins shouldn't need to call this method.
+ * @since jEdit 4.2pre1
+ */
+ public void unloadDockableWindows(PluginJAR plugin)
+ {
+ Iterator entries = dockableWindowFactories.entrySet().iterator();
+ while(entries.hasNext())
+ {
+ Map.Entry entry = (Map.Entry)entries.next();
+ Window factory = (Window)entry.getValue();
+ if(factory.plugin == plugin)
+ entries.remove();
+ }
+ } //}}}
+
+ //{{{ cacheDockableWindows() method
+ /**
+ * @since jEdit 4.2pre1
+ */
+ public void cacheDockableWindows(PluginJAR plugin,
+ String[] name, boolean[] actions, boolean[] movable)
+ {
+ for(int i = 0; i < name.length; i++)
+ {
+ Window factory = new Window(plugin,
+ name[i],null,actions[i],movable[i]);
+ dockableWindowFactories.put(name[i],factory);
+ }
+ } //}}}
+
+ //{{{ registerDockableWindow() method
+ public void registerDockableWindow(PluginJAR plugin,
+ String name, String code, boolean actions, boolean movable)
+ {
+ Window factory = dockableWindowFactories.get(name);
+ if(factory != null)
+ {
+ factory.code = code;
+ factory.loaded = true;
+ }
+ else
+ {
+ factory = new Window(plugin,name,code,actions, movable);
+ dockableWindowFactories.put(name,factory);
+ }
+ } //}}}
+
+ //{{{ getRegisteredDockableWindows() method
+ public String[] getRegisteredDockableWindows()
+ {
+ String[] retVal = new String[dockableWindowFactories.size()];
+ Iterator<Window> entries = dockableWindowFactories.values().iterator();
+ int i = 0;
+ while(entries.hasNext())
+ {
+ Window factory = entries.next();
+ retVal[i++] = factory.name;
+ }
+
+ return retVal;
+ } //}}}
+
+ public Window getDockableWindowFactory(String name)
+ {
+ return dockableWindowFactories.get(name);
+ }
+
+ public String getDockableWindowPluginClass(String name)
+ {
+ Window w = getDockableWindowFactory(name);
+ if (w == null || w.plugin == null || w.plugin.getPlugin() == null)
+ return null;
+ return w.plugin.getPlugin().getClassName();
+ }
+
+ //{{{ getDockableWindowIterator() method
+ Iterator<Window> getDockableWindowIterator()
+ {
+ return dockableWindowFactories.values().iterator();
+ } //}}}
+
+ //{{{ DockableListHandler class
+ class DockableListHandler extends DefaultHandler
+ {
+ //{{{ DockableListHandler constructor
+ /**
+ * @param plugin - the pluginJAR for which we are loading the dockables.xml
+ * @param uri - the uri of the dockables.xml file?
+ */
+ DockableListHandler(PluginJAR plugin, URL uri)
+ {
+ this.plugin = plugin;
+ this.uri = uri;
+ stateStack = new Stack<String>();
+ actions = true;
+ movable = MOVABLE_DEFAULT;
+
+ code = new StringBuilder();
+ cachedDockableNames = new LinkedList<String>();
+ cachedDockableActionFlags = new LinkedList<Boolean>();
+ cachedDockableMovableFlags = new LinkedList<Boolean>();
+ } //}}}
+
+ //{{{ resolveEntity() method
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "dockables.dtd", MiscUtilities.class);
+ } //}}}
+
+ //{{{ characters() method
+ @Override
+ public void characters(char[] c, int off, int len)
+ {
+ String tag = peekElement();
+ if (tag.equals("DOCKABLE"))
+ code.append(c, off, len);
+ } //}}}
+
+ //{{{ startElement() method
+ @Override
+ public void startElement(String uri, String localName,
+ String qName, Attributes attrs)
+ {
+ String tag = pushElement(qName);
+ if (tag.equals("DOCKABLE"))
+ {
+ dockableName = attrs.getValue("NAME");
+ actions = "FALSE".equals(attrs.getValue("NO_ACTIONS"));
+ String movableAttr = attrs.getValue("MOVABLE");
+ if (movableAttr != null)
+ movable = movableAttr.equalsIgnoreCase("TRUE");
+ }
+ } //}}}
+
+ //{{{ endElement() method
+ @Override
+ public void endElement(String uri, String localName, String name)
+ {
+ if(name == null)
+ return;
+
+ String tag = peekElement();
+
+ if(name.equals(tag))
+ {
+ if(tag.equals("DOCKABLE"))
+ {
+ registerDockableWindow(plugin,
+ dockableName,code.toString(),actions, movable);
+ cachedDockableNames.add(dockableName);
+ cachedDockableActionFlags.add(
+ Boolean.valueOf(actions));
+ cachedDockableMovableFlags.add(
+ Boolean.valueOf(movable));
+ // make default be true for the next
+ // action
+ actions = true;
+ movable = MOVABLE_DEFAULT;
+ code.setLength(0);
+ }
+
+ popElement();
+ }
+ else
+ {
+ // can't happen
+ throw new InternalError();
+ }
+ } //}}}
+
+ //{{{ startDocument() method
+ @Override
+ public void startDocument()
+ {
+ try
+ {
+ pushElement(null);
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ } //}}}
+
+ //{{{ getCachedDockableNames() method
+ public String[] getCachedDockableNames()
+ {
+ return cachedDockableNames.toArray(new String[cachedDockableNames.size()]);
+ } //}}}
+
+ //{{{ getCachedDockableActionFlags() method
+ public boolean[] getCachedDockableActionFlags()
+ {
+ return booleanListToArray(cachedDockableActionFlags);
+ } //}}}
+
+ //{{{ getCachedDockableMovableFlags() method
+ public boolean[] getCachedDockableMovableFlags()
+ {
+ return booleanListToArray(cachedDockableMovableFlags);
+ } //}}}
+
+ //{{{ booleanListToArray() method
+ /**
+ * This method transforms a List<Boolean> into the corresponding
+ * boolean[] array
+ * @param list the List<Boolean> you want to convert
+ * @return a boolean[] array
+ */
+ private boolean[] booleanListToArray(java.util.List<Boolean> list)
+ {
+ boolean[] returnValue = new boolean[list.size()];
+ int i = 0;
+ for (Boolean value : list)
+ {
+ returnValue[i++] = value.booleanValue();
+ }
+
+ return returnValue;
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private PluginJAR plugin;
+ // What is the purpose of this?
+ private URL uri;
+
+ private java.util.List<String> cachedDockableNames;
+ private java.util.List<Boolean> cachedDockableActionFlags;
+ private java.util.List<Boolean> cachedDockableMovableFlags;
+
+ private String dockableName;
+ private StringBuilder code;
+ private boolean actions;
+ private boolean movable;
+ static final boolean MOVABLE_DEFAULT = false;
+
+ private Stack<String> stateStack;
+ //}}}
+
+ //{{{ pushElement() method
+ private String pushElement(String name)
+ {
+ name = (name == null) ? null : name.intern();
+
+ stateStack.push(name);
+
+ return name;
+ } //}}}
+
+ //{{{ peekElement() method
+ private String peekElement()
+ {
+ return stateStack.peek();
+ } //}}}
+
+ //{{{ popElement() method
+ private String popElement()
+ {
+ return stateStack.pop();
+ } //}}}
+
+ //}}}
+ } //}}}
+
+ //{{{ Window class
+ class Window
+ {
+ PluginJAR plugin;
+ String name;
+ String code;
+ boolean loaded;
+ boolean movable;
+ boolean isBeingCreated = false;
+
+ //{{{ Window constructor
+ Window(PluginJAR plugin, String name, String code,
+ boolean actions, boolean movable)
+ {
+ this.plugin = plugin;
+ this.name = name;
+ this.code = code;
+ this.movable = movable;
+
+ if(code != null)
+ loaded = true;
+
+ if(actions)
+ {
+ ActionSet actionSet = (plugin == null
+ ? jEdit.getBuiltInActionSet()
+ : plugin.getActionSet());
+ actionSet.addAction(new OpenAction(name));
+ actionSet.addAction(new ToggleAction(name));
+ actionSet.addAction(new FloatAction(name));
+
+ String label = jEdit.getProperty(name
+ + ".label");
+ if(label == null)
+ label = "NO LABEL PROPERTY: " + name;
+
+ String[] args = { label };
+ jEdit.setTemporaryProperty(name + ".label",
+ label);
+ jEdit.setTemporaryProperty(name
+ + "-toggle.label",
+ jEdit.getProperty(
+ "view.docking.toggle.label",args));
+ jEdit.setTemporaryProperty(name
+ + "-toggle.toggle","true");
+ jEdit.setTemporaryProperty(name
+ + "-float.label",
+ jEdit.getProperty(
+ "view.docking.float.label",args));
+ }
+ } //}}}
+
+ //{{{ load() method
+ void load()
+ {
+ if(loaded)
+ return;
+
+ loadDockableWindows(plugin,plugin.getDockablesURI(),null);
+ } //}}}
+
+ //{{{ createDockableWindow() method
+ JComponent createDockableWindow(View view, String position)
+ {
+ // Avoid infinite recursion
+ synchronized(this)
+ {
+ if (isBeingCreated)
+ return null;
+ isBeingCreated = true;
+ }
+
+ load();
+
+ if(!loaded)
+ {
+ Log.log(Log.WARNING,this,"Outdated cache");
+ return null;
+ }
+
+ NameSpace nameSpace = new NameSpace(
+ BeanShell.getNameSpace(),
+ "DockableWindowManager.Factory"
+ + ".createDockableWindow()");
+ try
+ {
+ nameSpace.setVariable(
+ "position",position);
+ }
+ catch(UtilEvalError e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ JComponent win = (JComponent)BeanShell.eval(view,
+ nameSpace,code);
+ synchronized(this)
+ {
+ isBeingCreated = false;
+ }
+ return win;
+ } //}}}
+
+ //{{{ OpenAction class
+ class OpenAction extends EditAction
+ {
+ private String dockable;
+
+ //{{{ OpenAction constructor
+ OpenAction(String name)
+ {
+ super(name);
+ this.dockable = name;
+ } //}}}
+
+ //{{{ invoke() method
+ public void invoke(View view)
+ {
+ view.getDockableWindowManager()
+ .showDockableWindow(dockable);
+ } //}}}
+
+ //{{{ getCode() method
+ @Override
+ public String getCode()
+ {
+ return "view.getDockableWindowManager()"
+ + ".showDockableWindow(\"" + dockable + "\");";
+ } //}}}
+ } //}}}
+
+ //{{{ ToggleAction class
+ class ToggleAction extends EditAction
+ {
+ private String dockable;
+
+ //{{{ ToggleAction constructor
+ ToggleAction(String name)
+ {
+ super(name + "-toggle");
+ this.dockable = name;
+ } //}}}
+
+ //{{{ invoke() method
+ public void invoke(View view)
+ {
+ view.getDockableWindowManager()
+ .toggleDockableWindow(dockable);
+ } //}}}
+
+ //{{{ isSelected() method
+ public boolean isSelected(View view)
+ {
+ return view.getDockableWindowManager()
+ .isDockableWindowVisible(dockable);
+ } //}}}
+
+ //{{{ getCode() method
+ @Override
+ public String getCode()
+ {
+ return "view.getDockableWindowManager()"
+ + ".toggleDockableWindow(\"" + dockable + "\");";
+ } //}}}
+ } //}}}
+
+ //{{{ FloatAction class
+ class FloatAction extends EditAction
+ {
+ private String dockable;
+
+ //{{{ FloatAction constructor
+ FloatAction(String name)
+ {
+ super(name + "-float");
+ this.dockable = name;
+ } //}}}
+
+ //{{{ invoke() method
+ public void invoke(View view)
+ {
+ view.getDockableWindowManager()
+ .floatDockableWindow(dockable);
+ } //}}}
+
+ //{{{ getCode() method
+ @Override
+ public String getCode()
+ {
+ return "view.getDockableWindowManager()"
+ + ".floatDockableWindow(\"" + dockable + "\");";
+ } //}}}
+ } //}}}
+ } //}}}
+
+ private static DockableWindowFactory instance;
+ private final Map<String, Window> dockableWindowFactories;
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/DockableWindowManager.java b/jEdit/org/gjt/sp/jedit/gui/DockableWindowManager.java
index b092d1e..72d85e5 100644
--- a/jEdit/org/gjt/sp/jedit/gui/DockableWindowManager.java
+++ b/jEdit/org/gjt/sp/jedit/gui/DockableWindowManager.java
@@ -1,747 +1,753 @@
-package org.gjt.sp.jedit.gui;
-
-// {{{ imports
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-import java.util.Map.Entry;
-
-import javax.swing.JComponent;
-import javax.swing.JPanel;
-
-import org.gjt.sp.jedit.EBComponent;
-import org.gjt.sp.jedit.EBMessage;
-import org.gjt.sp.jedit.EditBus;
-import org.gjt.sp.jedit.PluginJAR;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.View.ViewConfig;
-import org.gjt.sp.jedit.gui.KeyEventTranslator.Key;
-import org.gjt.sp.jedit.msg.DockableWindowUpdate;
-import org.gjt.sp.jedit.msg.PluginUpdate;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-import org.gjt.sp.util.Log;
-// }}}
-
- at SuppressWarnings("serial")
-// {{{ abstract class DockableWindowManager
-/**
- * <p>Keeps track of all dockable windows for a single View, and provides
- * an API for getting/showing/hiding them. </p>
- *
- * <p>Each {@link org.gjt.sp.jedit.View} has an instance of this class.</p>
- *
- * <p><b>dockables.xml:</b></p>
- *
- * <p>Dockable window definitions are read from <code>dockables.xml</code> files
- * contained inside plugin JARs. A dockable definition file has the following
- * form: </p>
- *
- * <pre><?xml version="1.0"?>
- *<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
- *<DOCKABLES>
- * <DOCKABLE NAME="<i>dockableName</i>" MOVABLE="TRUE|FALSE">
- * // Code to create the dockable
- * </DOCKABLE>
- *</DOCKABLES></pre>
- *
- * <p>The MOVABLE attribute specifies the behavior when the docking position of
- * the dockable window is changed. If MOVABLE is TRUE, the existing instance of
- * the dockable window is moved to the new docking position, and if the dockable
- * window implements the DockableWindow interface (see {@link DockableWindow}),
- * it is also notified about the change in docking position before it is moved.
- * If MOVABLE is FALSE, the BeanShell code is invoked to get the instance of
- * the dockable window to put in the new docking position. Typically, the
- * BeanShell code returns a new instance of the dockable window, and the state
- * of the existing instance is not preserved after the change. It is therefore
- * recommended to set MOVABLE to TRUE for all dockables in order to make them
- * preserve their state when they are moved. For backward compatibility reasons,
- * this attribute is set to FALSE by default.</p>
- * <p>More than one <code><DOCKABLE></code> tag may be present. The code that
- * creates the dockable can reference any BeanShell built-in variable
- * (see {@link org.gjt.sp.jedit.BeanShell}), along with a variable
- * <code>position</code> whose value is one of
- * {@link #FLOATING}, {@link #TOP}, {@link #LEFT}, {@link #BOTTOM},
- * and {@link #RIGHT}. </p>
- *
- * <p>The following properties must be defined for each dockable window: </p>
- *
- * <ul>
- * <li><code><i>dockableName</i>.title</code> - the string to show on the dockable
- * button. </li>
- * <li><code><i>dockableName</i>.label</code> - The string to use for generating
- * menu items and action names. </li>
- * <li><code><i>dockableName</i>.longtitle</code> - (optional) the string to use
- * in the dockable's floating window title (when it is floating).
- * If not specified, the <code><i>dockableName</i>.title</code> property is used. </li>
- * </ul>
- *
- * A number of actions are automatically created for each dockable window:
- *
- * <ul>
- * <li><code><i>dockableName</i></code> - opens the dockable window.</li>
- * <li><code><i>dockableName</i>-toggle</code> - toggles the dockable window's visibility.</li>
- * <li><code><i>dockableName</i>-float</code> - opens the dockable window in a new
- * floating window.</li>
- * </ul>
- *
- * Note that only the first action needs a <code>label</code> property, the
- * rest have automatically-generated labels.
- *
- * <p> <b>Implementation details:</b></p>
- *
- * <p> When an instance of this class is initialized by the {@link org.gjt.sp.jedit.View}
- * class, it
- * iterates through the list of registered dockable windows (from jEdit itself,
- * and any loaded plugins) and
- * examines options supplied by the user in the <b>Global
- * Options</b> dialog box. Any plugins designated for one of the
- * four docking positions are displayed.</p>
- *
- * <p> To create an instance of a dockable window, the <code>DockableWindowManager</code>
- * finds and executes the BeanShell code extracted from the appropriate
- * <code>dockables.xml</code> file. This code will typically consist of a call
- * to the constructor of the dockable window component. The result of the
- * BeanShell expression, typically a newly constructed component, is placed
- * in a window managed by this class. </p>
- *
- * @see org.gjt.sp.jedit.View#getDockableWindowManager()
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @author Shlomy Reinstein (refactoring into a base and an impl)
- * @version $Id: DockableWindowManager.java 16341 2009-10-14 10:05:51Z kpouer $
- * @since jEdit 2.6pre3
- *
- */
- public abstract class DockableWindowManager extends JPanel implements EBComponent
-{
-
- //{{{ Constants
- /**
- * Floating position.
- * @since jEdit 2.6pre3
- */
- public static final String FLOATING = "floating";
-
- /**
- * Top position.
- * @since jEdit 2.6pre3
- */
- public static final String TOP = "top";
-
- /**
- * Left position.
- * @since jEdit 2.6pre3
- */
- public static final String LEFT = "left";
-
- /**
- * Bottom position.
- * @since jEdit 2.6pre3
- */
- public static final String BOTTOM = "bottom";
-
- /**
- * Right position.
- * @since jEdit 2.6pre3
- */
- public static final String RIGHT = "right";
- //}}}
-
- // {{{ data members
- private final Map<PluginJAR, Set<String>> plugins = new HashMap<PluginJAR, Set<String>>();
- private final Map<String, String> positions = new HashMap<String, String>();
- protected View view;
- protected DockableWindowFactory factory;
- protected Map<String, JComponent> windows = new HashMap<String, JComponent>();
-
- // variables for toggling all dock areas
- private boolean tBottom, tTop, tLeft, tRight;
- private boolean closeToggle = true;
-
- private static final String ALTERNATE_LAYOUT_PROP = "view.docking.alternateLayout";
- private boolean alternateLayout;
- // }}}
-
- // {{{ DockableWindowManager constructor
- public DockableWindowManager(View view, DockableWindowFactory instance,
- ViewConfig config)
- {
- this.view = view;
- this.factory = instance;
- alternateLayout = jEdit.getBooleanProperty(ALTERNATE_LAYOUT_PROP);
- } // }}}
-
- // {{{ Abstract methods
- public abstract void setMainPanel(JPanel panel);
- public abstract void showDockableWindow(String name);
- public abstract void hideDockableWindow(String name);
-
- /** Completely dispose of a dockable - called when a plugin is
- unloaded, to remove all references to the its dockables. */
- public abstract void disposeDockableWindow(String name);
- public abstract JComponent floatDockableWindow(String name);
- public abstract boolean isDockableWindowDocked(String name);
- public abstract boolean isDockableWindowVisible(String name);
- public abstract void closeCurrentArea();
- public abstract DockingLayout getDockingLayout(ViewConfig config);
- public abstract DockingArea getLeftDockingArea();
- public abstract DockingArea getRightDockingArea();
- public abstract DockingArea getTopDockingArea();
- public abstract DockingArea getBottomDockingArea();
- // }}}
-
- // {{{ public methods
- // {{{ init()
- public void init()
- {
- EditBus.addToBus(this);
-
- Iterator<DockableWindowFactory.Window> entries = factory.getDockableWindowIterator();
- while(entries.hasNext())
- {
- DockableWindowFactory.Window window = entries.next();
- String dockable = window.name;
- positions.put(dockable, getDockablePosition(dockable));
- addPluginDockable(window.plugin, dockable);
- }
- } // }}}
-
- // {{{ close()
- public void close()
- {
- EditBus.removeFromBus(this);
- } // }}}
-
- // {{{ applyDockingLayout
- public void applyDockingLayout(DockingLayout docking)
- {
- // By default, use the docking positions specified by the jEdit properties
- Iterator<Entry<String, String>> iterator = positions.entrySet().iterator();
- while (iterator.hasNext())
- {
- Entry<String, String> entry = iterator.next();
- String dockable = entry.getKey();
- String position = entry.getValue();
- if (! position.equals(FLOATING))
- showDockableWindow(dockable);
- }
- } //}}}
-
- //{{{ addDockableWindow() method
- /**
- * Opens the specified dockable window. As of jEdit 4.0pre1, has the
- * same effect as calling showDockableWindow().
- * @param name The dockable window name
- * @since jEdit 2.6pre3
- */
- public void addDockableWindow(String name)
- {
- showDockableWindow(name);
- } //}}}
-
- //{{{ removeDockableWindow() method
- /**
- * Hides the specified dockable window. As of jEdit 4.2pre1, has the
- * same effect as calling hideDockableWindow().
- * @param name The dockable window name
- * @since jEdit 4.2pre1
- */
- public void removeDockableWindow(String name)
- {
- hideDockableWindow(name);
- } //}}}
-
- //{{{ toggleDockableWindow() method
- /**
- * Toggles the visibility of the specified dockable window.
- * @param name The dockable window name
- */
- public void toggleDockableWindow(String name)
- {
- if(isDockableWindowVisible(name))
- removeDockableWindow(name);
- else
- addDockableWindow(name);
- } //}}}
-
- //{{{ getDockableWindow() method
- /**
- * Returns the specified dockable window.
- *
- * Note that this method
- * will return null if the dockable has not been added yet.
- * Make sure you call {@link #addDockableWindow(String)} first.
- *
- * @param name The name of the dockable window
- * @since jEdit 4.1pre2
- */
- public JComponent getDockableWindow(String name)
- {
- return getDockable(name);
- } //}}}
-
- // {{{ toggleDockAreas()
- /**
- * Hides all visible dock areas, or shows them again,
- * if the last time it was a hide.
- * @since jEdit 4.3pre16
- *
- */
- public void toggleDockAreas()
- {
- if (closeToggle)
- {
- tTop = getTopDockingArea().getCurrent() != null;
- tLeft = getLeftDockingArea().getCurrent() != null;
- tRight = getRightDockingArea().getCurrent() != null;
- tBottom = getBottomDockingArea().getCurrent() != null;
- getBottomDockingArea().show(null);
- getTopDockingArea().show(null);
- getRightDockingArea().show(null);
- getLeftDockingArea().show(null);
- }
- else
- {
- if (tBottom) getBottomDockingArea().showMostRecent();
- if (tLeft) getLeftDockingArea().showMostRecent();
- if (tRight) getRightDockingArea().showMostRecent();
- if (tTop) getTopDockingArea().showMostRecent();
- }
- closeToggle = !closeToggle;
- view.getTextArea().requestFocus();
- } // }}}
-
- // {{{ dockableTitleChanged
- public void dockableTitleChanged(String dockable, String newTitle)
- {
- } // }}}
-
- // {{{ closeListener() method
- /**
- *
- * The actionEvent "close-docking-area" by default only works on
- * windows that are docked. If you want your floatable plugins to also
- * respond to this event, you need to add key listeners to each component
- * in your plugin that usually has keyboard focus.
- * This function returns a key listener which does exactly that.
- * You should not need to call this method - it is used by FloatingWindowContainer.
- *
- * @param dockableName the name of your dockable
- * @return a KeyListener you can add to that plugin's component.
- * @since jEdit 4.3pre6
- *
- */
- public KeyListener closeListener(String dockableName)
- {
- return new KeyHandler(dockableName);
- }
- // }}}
-
- //{{{ getView() method
- /**
- * Returns this dockable window manager's view.
- * @since jEdit 4.0pre2
- */
- public View getView()
- {
- return view;
- } //}}}
-
- //{{{ getDockable method
- /**
- * @since jEdit 4.3pre2
- */
- public JComponent getDockable(String name)
- {
- return windows.get(name);
- } // }}}
-
- //{{{ getDockableTitle() method
- /**
- * Returns the title of the specified dockable window.
- * @param name The name of the dockable window.
- * @since jEdit 4.1pre5
- */
- public String getDockableTitle(String name)
- {
- return longTitle(name);
- }//}}}
-
- //{{{ setDockableTitle() method
- /**
- * Changes the .longtitle property of a dockable window, which corresponds to the
- * title shown when it is floating (not docked). Fires a change event that makes sure
- * all floating dockables change their title.
- *
- * @param dockable the name of the dockable, as specified in the dockables.xml
- * @param title the new .longtitle you want to see above it.
- * @since 4.3pre5
- *
- */
- public void setDockableTitle(String dockable, String title)
- {
- String propName = getLongTitlePropertyName(dockable);
- String oldTitle = jEdit.getProperty(propName);
- jEdit.setProperty(propName, title);
- firePropertyChange(propName, oldTitle, title);
- dockableTitleChanged(dockable, title);
- }
- // }}}
-
- //{{{ getRegisteredDockableWindows() method
- public static String[] getRegisteredDockableWindows()
- {
- return DockableWindowFactory.getInstance()
- .getRegisteredDockableWindows();
- } //}}}
-
- //{{{ getDockableWindowPluginClassName() method
- public static String getDockableWindowPluginName(String name)
- {
- String pluginClass =
- DockableWindowFactory.getInstance().getDockableWindowPluginClass(name);
- if (pluginClass == null)
- return null;
- return jEdit.getProperty("plugin." + pluginClass + ".name");
- } //}}}
-
- // {{{ setDockingLayout method
- public void setDockingLayout(DockingLayout docking)
- {
- applyDockingLayout(docking);
- applyAlternateLayout(alternateLayout);
- } // }}}
-
- // {{{ addPluginDockable
- private void addPluginDockable(PluginJAR plugin, String name)
- {
- Set<String> dockables = plugins.get(plugin);
- if (dockables == null)
- {
- dockables = new HashSet<String>();
- plugins.put(plugin, dockables);
- }
- dockables.add(name);
- }
- // }}}
-
- // {{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if (msg instanceof DockableWindowUpdate)
- {
- if(((DockableWindowUpdate)msg).getWhat() == DockableWindowUpdate.PROPERTIES_CHANGED)
- propertiesChanged();
- }
- else if (msg instanceof PropertiesChanged)
- propertiesChanged();
- else if(msg instanceof PluginUpdate)
- {
- PluginUpdate pmsg = (PluginUpdate)msg;
- if (pmsg.getWhat() == PluginUpdate.LOADED)
- {
- Iterator<DockableWindowFactory.Window> iter = factory.getDockableWindowIterator();
- while (iter.hasNext())
- {
- DockableWindowFactory.Window w = iter.next();
- if (w.plugin == pmsg.getPluginJAR())
- {
- String position = getDockablePosition(w.name);
- positions.put(w.name, position);
- addPluginDockable(w.plugin, w.name);
- dockableLoaded(w.name, position);
- }
- }
- propertiesChanged();
- }
- else if(pmsg.isExiting())
- {
- // we don't care
- }
- else if(pmsg.getWhat() == PluginUpdate.DEACTIVATED ||
- pmsg.getWhat() == PluginUpdate.UNLOADED)
- {
- Set<String> dockables = plugins.remove(pmsg.getPluginJAR());
- if (dockables != null)
- {
- for (String dockable: dockables)
- {
- disposeDockableWindow(dockable);
- windows.remove(dockable);
- }
- }
- }
- }
- } // }}}
-
- // {{{ longTitle() method
- public String longTitle(String name)
- {
- String title = jEdit.getProperty(getLongTitlePropertyName(name));
- if (title == null)
- return shortTitle(name);
- return title;
- } // }}}
-
- // {{{ shortTitle() method
- public String shortTitle(String name)
- {
- String title = jEdit.getProperty(name + ".title");
- if(title == null)
- return "NO TITLE PROPERTY: " + name;
- return title;
- } // }}}
-
- // }}}
-
- // {{{ protected methods
- // {{{ applyAlternateLayout
- protected void applyAlternateLayout(boolean alternateLayout)
- {
- } //}}}
-
- // {{{
- protected void dockableLoaded(String dockableName, String position)
- {
- }
- // }}}
-
- // {{{
- protected void dockingPositionChanged(String dockableName,
- String oldPosition, String newPosition)
- {
- } //}}}
-
- // {{{ getAlternateLayoutProp()
- protected boolean getAlternateLayoutProp()
- {
- return alternateLayout;
- } // }}}
-
- // {{{ propertiesChanged
- protected void propertiesChanged()
- {
- if(view.isPlainView())
- return;
-
- boolean newAlternateLayout = jEdit.getBooleanProperty(ALTERNATE_LAYOUT_PROP);
- if (newAlternateLayout != alternateLayout)
- {
- alternateLayout = newAlternateLayout;
- applyAlternateLayout(newAlternateLayout);
- }
-
- String[] dockables = factory.getRegisteredDockableWindows();
- for(int i = 0; i < dockables.length; i++)
- {
- String dockable = dockables[i];
- String oldPosition = positions.get(dockable);
- String newPosition = getDockablePosition(dockable);
- if (oldPosition == null || !newPosition.equals(oldPosition))
- {
- positions.put(dockable, newPosition);
- dockingPositionChanged(dockable, oldPosition, newPosition);
- }
- }
-
- } // }}}
-
- // {{{ createDockable()
- protected JComponent createDockable(String name)
- {
- DockableWindowFactory.Window wf = factory.getDockableWindowFactory(name);
- if (wf == null)
- {
- Log.log(Log.ERROR,this,"Unknown dockable window: " + name);
- return null;
- }
- String position = getDockablePosition(name);
- JComponent window = wf.createDockableWindow(view, position);
- if (window != null)
- windows.put(name, window);
- return window;
- } // }}}
-
- // {{{ getDockablePosition()
- protected String getDockablePosition(String name)
- {
- return jEdit.getProperty(name + ".dock-position", FLOATING);
- } // }}}
-
- // {{{ focusDockable
- protected void focusDockable(String name)
- {
- JComponent c = getDockable(name);
- if (c == null)
- return;
- if (c instanceof DefaultFocusComponent)
- ((DefaultFocusComponent)c).focusOnDefaultComponent();
- else
- c.requestFocus();
- } // }}}
-
- // {{{ getLongTitlePropertyName()
- protected String getLongTitlePropertyName(String dockableName)
- {
- return dockableName + ".longtitle";
- } //}}}
- // }}}
-
-
- // {{{ Inner classes
- // {{{ DockingArea interface
- public interface DockingArea
- {
- void showMostRecent();
- String getCurrent();
- void show(String name);
- String [] getDockables();
- }
- // }}}
-
- //{{{ KeyHandler class
- /**
- * This keyhandler responds to only two key events - those corresponding to
- * the close-docking-area action event.
- *
- * @author ezust
- */
- class KeyHandler extends KeyAdapter
- {
- static final String action = "close-docking-area";
- Vector<Key> b1, b2;
- String name;
- int match1, match2;
-
- public KeyHandler(String dockableName)
- {
- String shortcut1=jEdit.getProperty(action + ".shortcut");
- String shortcut2=jEdit.getProperty(action + ".shortcut2");
- if (shortcut1 != null)
- b1 = parseShortcut(shortcut1);
- if (shortcut2 != null)
- b2 = parseShortcut(shortcut2);
- name = dockableName;
- match1 = match2 = 0;
- }
-
- @Override
- public void keyTyped(KeyEvent e)
- {
- if (b1 != null)
- match1 = match(e, b1, match1);
- if (b2 != null)
- match2 = match(e, b2, match2);
- if ((match1 > 0 && match1 == b1.size()) ||
- (match2 > 0 && match2 == b2.size()))
- {
- hideDockableWindow(name);
- match1 = match2 = 0;
- }
- }
-
- private int match(KeyEvent e, Vector<Key> shortcut, int index)
- {
- char c = e.getKeyChar();
- if (shortcut != null && c == shortcut.get(index).key)
- return index + 1;
- return 0;
- }
-
- private Vector<Key> parseShortcut(String shortcut)
- {
- Vector<Key> keys = new Vector<Key>();
- String [] parts = shortcut.split("\\s+");
- for (String part: parts)
- {
- if (part.length() > 0)
- keys.add(KeyEventTranslator.parseKey(part));
- }
- return keys;
- }
- } //}}}
-
- // {{{ DockingLayout class
- /**
- * Objects of DockingLayout class describe which dockables are docked where,
- * which ones are floating, and their sizes/positions for saving/loading perspectives.
- */
- public abstract static class DockingLayout
- {
- public static final int NO_VIEW_INDEX = -1;
- public abstract boolean loadLayout(String baseName, int viewIndex);
- public abstract boolean saveLayout(String baseName, int viewIndex);
- public abstract String getName();
-
- public void setPlainView(boolean plain)
- {
- }
-
- public String [] getSavedLayouts()
- {
- String layoutDir = getLayoutDirectory();
- if (layoutDir == null)
- return null;
- File dir = new File(layoutDir);
- File[] files = dir.listFiles(new FilenameFilter()
- {
- public boolean accept(File dir, String name)
- {
- return name.endsWith(".xml");
- }
- });
- String[] layouts = new String[files.length];
- for (int i = 0; i < files.length; i++)
- layouts[i] = fileToLayout(files[i].getName());
- return layouts;
- }
-
- private static String fileToLayout(String filename)
- {
- return filename.replaceFirst(".xml", "");
- }
-
- private static String layoutToFile(String baseName, int viewIndex)
- {
- StringBuilder name = new StringBuilder(baseName);
- if (viewIndex != NO_VIEW_INDEX)
- name.append("-view").append(viewIndex);
- name.append(".xml");
- return name.toString();
- }
-
- public String getLayoutFilename(String baseName, int viewIndex)
- {
- String dir = getLayoutDirectory();
- if (dir == null)
- return null;
- return dir + File.separator + layoutToFile(baseName, viewIndex);
- }
-
- private String getLayoutDirectory()
- {
- String name = getName();
- if (name == null)
- return null;
- String dir = jEdit.getSettingsDirectory();
- if (dir == null)
- return null;
- dir = dir + File.separator + name;
- File d = new File(dir);
- if (!d.exists())
- d.mkdir();
- return dir;
- }
- } // }}}
-
-} // }}}
+package org.gjt.sp.jedit.gui;
+
+// {{{ imports
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.*;
+import java.util.Map.Entry;
+
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+
+import org.gjt.sp.jedit.EditBus;
+import org.gjt.sp.jedit.PluginJAR;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.View.ViewConfig;
+import org.gjt.sp.jedit.gui.KeyEventTranslator.Key;
+import org.gjt.sp.jedit.msg.DockableWindowUpdate;
+import org.gjt.sp.jedit.msg.PluginUpdate;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.util.Log;
+// }}}
+
+ at SuppressWarnings("serial")
+// {{{ abstract class DockableWindowManager
+/**
+ * <p>Keeps track of all dockable windows for a single View, and provides
+ * an API for getting/showing/hiding them. </p>
+ *
+ * <p>Each {@link org.gjt.sp.jedit.View} has an instance of this class.</p>
+ *
+ * <p><b>dockables.xml:</b></p>
+ *
+ * <p>Dockable window definitions are read from <code>dockables.xml</code> files
+ * contained inside plugin JARs. A dockable definition file has the following
+ * form: </p>
+ *
+ * <pre><?xml version="1.0"?>
+ *<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
+ *<DOCKABLES>
+ * <DOCKABLE NAME="<i>dockableName</i>" MOVABLE="TRUE|FALSE">
+ * // Code to create the dockable
+ * </DOCKABLE>
+ *</DOCKABLES></pre>
+ *
+ * <p>The MOVABLE attribute specifies the behavior when the docking position of
+ * the dockable window is changed. If MOVABLE is TRUE, the existing instance of
+ * the dockable window is moved to the new docking position, and if the dockable
+ * window implements the DockableWindow interface (see {@link DockableWindow}),
+ * it is also notified about the change in docking position before it is moved.
+ * If MOVABLE is FALSE, the BeanShell code is invoked to get the instance of
+ * the dockable window to put in the new docking position. Typically, the
+ * BeanShell code returns a new instance of the dockable window, and the state
+ * of the existing instance is not preserved after the change. It is therefore
+ * recommended to set MOVABLE to TRUE for all dockables in order to make them
+ * preserve their state when they are moved. For backward compatibility reasons,
+ * this attribute is set to FALSE by default.</p>
+ * <p>More than one <code><DOCKABLE></code> tag may be present. The code that
+ * creates the dockable can reference any BeanShell built-in variable
+ * (see {@link org.gjt.sp.jedit.BeanShell}), along with a variable
+ * <code>position</code> whose value is one of
+ * {@link #FLOATING}, {@link #TOP}, {@link #LEFT}, {@link #BOTTOM},
+ * and {@link #RIGHT}. </p>
+ *
+ * <p>The following properties must be defined for each dockable window: </p>
+ *
+ * <ul>
+ * <li><code><i>dockableName</i>.title</code> - the string to show on the dockable
+ * button. </li>
+ * <li><code><i>dockableName</i>.label</code> - The string to use for generating
+ * menu items and action names. </li>
+ * <li><code><i>dockableName</i>.longtitle</code> - (optional) the string to use
+ * in the dockable's floating window title (when it is floating).
+ * If not specified, the <code><i>dockableName</i>.title</code> property is used. </li>
+ * </ul>
+ *
+ * A number of actions are automatically created for each dockable window:
+ *
+ * <ul>
+ * <li><code><i>dockableName</i></code> - opens the dockable window.</li>
+ * <li><code><i>dockableName</i>-toggle</code> - toggles the dockable window's visibility.</li>
+ * <li><code><i>dockableName</i>-float</code> - opens the dockable window in a new
+ * floating window.</li>
+ * </ul>
+ *
+ * Note that only the first action needs a <code>label</code> property, the
+ * rest have automatically-generated labels.
+ *
+ * <p> <b>Implementation details:</b></p>
+ *
+ * <p> When an instance of this class is initialized by the {@link org.gjt.sp.jedit.View}
+ * class, it
+ * iterates through the list of registered dockable windows (from jEdit itself,
+ * and any loaded plugins) and
+ * examines options supplied by the user in the <b>Global
+ * Options</b> dialog box. Any plugins designated for one of the
+ * four docking positions are displayed.</p>
+ *
+ * <p> To create an instance of a dockable window, the <code>DockableWindowManager</code>
+ * finds and executes the BeanShell code extracted from the appropriate
+ * <code>dockables.xml</code> file. This code will typically consist of a call
+ * to the constructor of the dockable window component. The result of the
+ * BeanShell expression, typically a newly constructed component, is placed
+ * in a window managed by this class. </p>
+ *
+ * @see org.gjt.sp.jedit.View#getDockableWindowManager()
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @author Shlomy Reinstein (refactoring into a base and an impl)
+ * @version $Id: DockableWindowManager.java 18578 2010-09-21 19:59:41Z ezust $
+ * @since jEdit 2.6pre3
+ *
+ */
+ public abstract class DockableWindowManager extends JPanel
+{
+
+ //{{{ Constants
+ /**
+ * Floating position.
+ * @since jEdit 2.6pre3
+ */
+ public static final String FLOATING = "floating";
+
+ /**
+ * Top position.
+ * @since jEdit 2.6pre3
+ */
+ public static final String TOP = "top";
+
+ /**
+ * Left position.
+ * @since jEdit 2.6pre3
+ */
+ public static final String LEFT = "left";
+
+ /**
+ * Bottom position.
+ * @since jEdit 2.6pre3
+ */
+ public static final String BOTTOM = "bottom";
+
+ /**
+ * Right position.
+ * @since jEdit 2.6pre3
+ */
+ public static final String RIGHT = "right";
+ //}}}
+
+ // {{{ data members
+ private final Map<PluginJAR, Set<String>> plugins = new HashMap<PluginJAR, Set<String>>();
+ private final Map<String, String> positions = new HashMap<String, String>();
+ protected View view;
+ protected DockableWindowFactory factory;
+ protected Map<String, JComponent> windows = new HashMap<String, JComponent>();
+
+ // variables for toggling all dock areas
+ private boolean tBottom, tTop, tLeft, tRight;
+ private boolean closeToggle = true;
+
+ private static final String ALTERNATE_LAYOUT_PROP = "view.docking.alternateLayout";
+ private boolean alternateLayout;
+ // }}}
+
+ // {{{ DockableWindowManager constructor
+ public DockableWindowManager(View view, DockableWindowFactory instance,
+ ViewConfig config)
+ {
+ this.view = view;
+ this.factory = instance;
+ alternateLayout = jEdit.getBooleanProperty(ALTERNATE_LAYOUT_PROP);
+ } // }}}
+
+ // {{{ Abstract methods
+ public abstract void setMainPanel(JPanel panel);
+ public abstract void showDockableWindow(String name);
+ public abstract void hideDockableWindow(String name);
+
+ /** Completely dispose of a dockable - called when a plugin is
+ unloaded, to remove all references to the its dockables. */
+ public abstract void disposeDockableWindow(String name);
+ public abstract JComponent floatDockableWindow(String name);
+ public abstract boolean isDockableWindowDocked(String name);
+ public abstract boolean isDockableWindowVisible(String name);
+ public abstract void closeCurrentArea();
+ public abstract DockingLayout getDockingLayout(ViewConfig config);
+ public abstract DockingArea getLeftDockingArea();
+ public abstract DockingArea getRightDockingArea();
+ public abstract DockingArea getTopDockingArea();
+ public abstract DockingArea getBottomDockingArea();
+ // }}}
+
+ // {{{ public methods
+ // {{{ init()
+ public void init()
+ {
+ EditBus.addToBus(this);
+
+ Iterator<DockableWindowFactory.Window> entries = factory.getDockableWindowIterator();
+ while(entries.hasNext())
+ {
+ DockableWindowFactory.Window window = entries.next();
+ String dockable = window.name;
+ positions.put(dockable, getDockablePosition(dockable));
+ addPluginDockable(window.plugin, dockable);
+ }
+ } // }}}
+
+ // {{{ close()
+ public void close()
+ {
+ EditBus.removeFromBus(this);
+ } // }}}
+
+ // {{{ applyDockingLayout
+ public void applyDockingLayout(DockingLayout docking)
+ {
+ // By default, use the docking positions specified by the jEdit properties
+ Iterator<Entry<String, String>> iterator = positions.entrySet().iterator();
+ while (iterator.hasNext())
+ {
+ Entry<String, String> entry = iterator.next();
+ String dockable = entry.getKey();
+ String position = entry.getValue();
+ if (! position.equals(FLOATING))
+ showDockableWindow(dockable);
+ }
+ } //}}}
+
+ //{{{ addDockableWindow() method
+ /**
+ * Opens the specified dockable window. As of jEdit 4.0pre1, has the
+ * same effect as calling showDockableWindow().
+ * @param name The dockable window name
+ * @since jEdit 2.6pre3
+ */
+ public void addDockableWindow(String name)
+ {
+ showDockableWindow(name);
+ } //}}}
+
+ //{{{ removeDockableWindow() method
+ /**
+ * Hides the specified dockable window. As of jEdit 4.2pre1, has the
+ * same effect as calling hideDockableWindow().
+ * @param name The dockable window name
+ * @since jEdit 4.2pre1
+ */
+ public void removeDockableWindow(String name)
+ {
+ hideDockableWindow(name);
+ } //}}}
+
+ //{{{ toggleDockableWindow() method
+ /**
+ * Toggles the visibility of the specified dockable window.
+ * @param name The dockable window name
+ */
+ public void toggleDockableWindow(String name)
+ {
+ if(isDockableWindowVisible(name))
+ removeDockableWindow(name);
+ else
+ addDockableWindow(name);
+ } //}}}
+
+ //{{{ getDockableWindow() method
+ /**
+ * Returns the specified dockable window.
+ *
+ * Note that this method
+ * will return null if the dockable has not been added yet.
+ * Make sure you call {@link #addDockableWindow(String)} first.
+ *
+ * @param name The name of the dockable window
+ * @since jEdit 4.1pre2
+ */
+ public JComponent getDockableWindow(String name)
+ {
+ return getDockable(name);
+ } //}}}
+
+ // {{{ toggleDockAreas()
+ /**
+ * Hides all visible dock areas, or shows them again,
+ * if the last time it was a hide.
+ * @since jEdit 4.3pre16
+ *
+ */
+ public void toggleDockAreas()
+ {
+ if (closeToggle)
+ {
+ tTop = getTopDockingArea().getCurrent() != null;
+ tLeft = getLeftDockingArea().getCurrent() != null;
+ tRight = getRightDockingArea().getCurrent() != null;
+ tBottom = getBottomDockingArea().getCurrent() != null;
+ getBottomDockingArea().show(null);
+ getTopDockingArea().show(null);
+ getRightDockingArea().show(null);
+ getLeftDockingArea().show(null);
+ }
+ else
+ {
+ if (tBottom) getBottomDockingArea().showMostRecent();
+ if (tLeft) getLeftDockingArea().showMostRecent();
+ if (tRight) getRightDockingArea().showMostRecent();
+ if (tTop) getTopDockingArea().showMostRecent();
+ }
+ view.closeAllMenus();
+ closeToggle = !closeToggle;
+ view.getTextArea().requestFocus();
+ } // }}}
+
+ // {{{ dockableTitleChanged
+ public void dockableTitleChanged(String dockable, String newTitle)
+ {
+ } // }}}
+
+ // {{{ closeListener() method
+ /**
+ * The actionEvent "close-docking-area" by default only works on
+ * dockable windows that have no special keyboard handling.
+
+ * If you have dockable widgets with input widgets and/or other fancy
+ * keyboard handling, those components may not respond to close docking area.
+
+ * You can add key listeners to each keyboard-handling component
+ * in your dockable that usually has keyboard focus.
+ *
+ * This function creates and returns a key listener which does exactly that.
+ * It is also used by FloatingWindowContainer when creating new floating windows.
+ *
+ * @param dockableName the name of your dockable
+ * @return a KeyListener you can add to that plugin's component.
+ * @since jEdit 4.3pre6
+ *
+ */
+ public KeyListener closeListener(String dockableName)
+ {
+ return new KeyHandler(dockableName);
+ }
+ // }}}
+
+ //{{{ getView() method
+ /**
+ * Returns this dockable window manager's view.
+ * @since jEdit 4.0pre2
+ */
+ public View getView()
+ {
+ return view;
+ } //}}}
+
+ //{{{ getDockable method
+ /**
+ * @since jEdit 4.3pre2
+ */
+ public JComponent getDockable(String name)
+ {
+ return windows.get(name);
+ } // }}}
+
+ //{{{ getDockableTitle() method
+ /**
+ * Returns the title of the specified dockable window.
+ * @param name The name of the dockable window.
+ * @since jEdit 4.1pre5
+ */
+ public String getDockableTitle(String name)
+ {
+ return longTitle(name);
+ }//}}}
+
+ //{{{ setDockableTitle() method
+ /**
+ * Changes the .longtitle property of a dockable window, which corresponds to the
+ * title shown when it is floating (not docked). Fires a change event that makes sure
+ * all floating dockables change their title.
+ *
+ * @param dockable the name of the dockable, as specified in the dockables.xml
+ * @param title the new .longtitle you want to see above it.
+ * @since 4.3pre5
+ *
+ */
+ public void setDockableTitle(String dockable, String title)
+ {
+ String propName = getLongTitlePropertyName(dockable);
+ String oldTitle = jEdit.getProperty(propName);
+ jEdit.setProperty(propName, title);
+ firePropertyChange(propName, oldTitle, title);
+ dockableTitleChanged(dockable, title);
+ }
+ // }}}
+
+ //{{{ getRegisteredDockableWindows() method
+ public static String[] getRegisteredDockableWindows()
+ {
+ return DockableWindowFactory.getInstance()
+ .getRegisteredDockableWindows();
+ } //}}}
+
+ //{{{ getDockableWindowPluginClassName() method
+ public static String getDockableWindowPluginName(String name)
+ {
+ String pluginClass =
+ DockableWindowFactory.getInstance().getDockableWindowPluginClass(name);
+ if (pluginClass == null)
+ return null;
+ return jEdit.getProperty("plugin." + pluginClass + ".name");
+ } //}}}
+
+ // {{{ setDockingLayout method
+ public void setDockingLayout(DockingLayout docking)
+ {
+ applyDockingLayout(docking);
+ applyAlternateLayout(alternateLayout);
+ } // }}}
+
+ // {{{ addPluginDockable
+ private void addPluginDockable(PluginJAR plugin, String name)
+ {
+ Set<String> dockables = plugins.get(plugin);
+ if (dockables == null)
+ {
+ dockables = new HashSet<String>();
+ plugins.put(plugin, dockables);
+ }
+ dockables.add(name);
+ }
+ // }}}
+
+ // {{{ handleDockableWindowUpdate() method
+ @EBHandler
+ public void handleDockableWindowUpdate(DockableWindowUpdate msg)
+ {
+ if(msg.getWhat() == DockableWindowUpdate.PROPERTIES_CHANGED)
+ propertiesChanged();
+ } // }}}
+
+ // {{{ handlePropertiesChanged() method
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
+ {
+ propertiesChanged();
+ } // }}}
+
+ // {{{ handlePluginUpdate() method
+ @EBHandler
+ public void handlePluginUpdate(PluginUpdate pmsg)
+ {
+ if (pmsg.getWhat() == PluginUpdate.LOADED)
+ {
+ Iterator<DockableWindowFactory.Window> iter = factory.getDockableWindowIterator();
+ while (iter.hasNext())
+ {
+ DockableWindowFactory.Window w = iter.next();
+ if (w.plugin == pmsg.getPluginJAR())
+ {
+ String position = getDockablePosition(w.name);
+ positions.put(w.name, position);
+ addPluginDockable(w.plugin, w.name);
+ dockableLoaded(w.name, position);
+ }
+ }
+ propertiesChanged();
+ }
+ else if(pmsg.isExiting())
+ {
+ // we don't care
+ }
+ else if(pmsg.getWhat() == PluginUpdate.DEACTIVATED ||
+ pmsg.getWhat() == PluginUpdate.UNLOADED)
+ {
+ Set<String> dockables = plugins.remove(pmsg.getPluginJAR());
+ if (dockables != null)
+ {
+ for (String dockable: dockables)
+ {
+ disposeDockableWindow(dockable);
+ windows.remove(dockable);
+ }
+ }
+ }
+ } // }}}
+
+ // {{{ longTitle() method
+ public String longTitle(String name)
+ {
+ String title = jEdit.getProperty(getLongTitlePropertyName(name));
+ if (title == null)
+ return shortTitle(name);
+ return title;
+ } // }}}
+
+ // {{{ shortTitle() method
+ public String shortTitle(String name)
+ {
+ String title = jEdit.getProperty(name + ".title");
+ if(title == null)
+ return "NO TITLE PROPERTY: " + name;
+ return title;
+ } // }}}
+
+ // }}}
+
+ // {{{ protected methods
+ // {{{ applyAlternateLayout
+ protected void applyAlternateLayout(boolean alternateLayout)
+ {
+ } //}}}
+
+ // {{{
+ protected void dockableLoaded(String dockableName, String position)
+ {
+ }
+ // }}}
+
+ // {{{
+ protected void dockingPositionChanged(String dockableName,
+ String oldPosition, String newPosition)
+ {
+ } //}}}
+
+ // {{{ getAlternateLayoutProp()
+ protected boolean getAlternateLayoutProp()
+ {
+ return alternateLayout;
+ } // }}}
+
+ // {{{ propertiesChanged
+ protected void propertiesChanged()
+ {
+ if(view.isPlainView())
+ return;
+
+ boolean newAlternateLayout = jEdit.getBooleanProperty(ALTERNATE_LAYOUT_PROP);
+ if (newAlternateLayout != alternateLayout)
+ {
+ alternateLayout = newAlternateLayout;
+ applyAlternateLayout(newAlternateLayout);
+ }
+
+ String[] dockables = factory.getRegisteredDockableWindows();
+ for(int i = 0; i < dockables.length; i++)
+ {
+ String dockable = dockables[i];
+ String oldPosition = positions.get(dockable);
+ String newPosition = getDockablePosition(dockable);
+ if (oldPosition == null || !newPosition.equals(oldPosition))
+ {
+ positions.put(dockable, newPosition);
+ dockingPositionChanged(dockable, oldPosition, newPosition);
+ }
+ }
+
+ } // }}}
+
+ // {{{ createDockable()
+ protected JComponent createDockable(String name)
+ {
+ DockableWindowFactory.Window wf = factory.getDockableWindowFactory(name);
+ if (wf == null)
+ {
+ Log.log(Log.ERROR,this,"Unknown dockable window: " + name);
+ return null;
+ }
+ String position = getDockablePosition(name);
+ JComponent window = wf.createDockableWindow(view, position);
+ if (window != null)
+ windows.put(name, window);
+ return window;
+ } // }}}
+
+ // {{{ getDockablePosition()
+ protected String getDockablePosition(String name)
+ {
+ return jEdit.getProperty(name + ".dock-position", FLOATING);
+ } // }}}
+
+ // {{{ focusDockable
+ protected void focusDockable(String name)
+ {
+ JComponent c = getDockable(name);
+ if (c == null)
+ return;
+ if (c instanceof DefaultFocusComponent)
+ ((DefaultFocusComponent)c).focusOnDefaultComponent();
+ else
+ c.requestFocus();
+ } // }}}
+
+ // {{{ getLongTitlePropertyName()
+ protected String getLongTitlePropertyName(String dockableName)
+ {
+ return dockableName + ".longtitle";
+ } //}}}
+ // }}}
+
+
+ // {{{ Inner classes
+ // {{{ DockingArea interface
+ public interface DockingArea
+ {
+ void showMostRecent();
+ String getCurrent();
+ void show(String name);
+ String [] getDockables();
+ }
+ // }}}
+
+ //{{{ KeyHandler class
+ /**
+ * This keyhandler responds to only two key events - those corresponding to
+ * the close-docking-area action event.
+ *
+ * @author ezust
+ */
+ class KeyHandler extends KeyAdapter
+ {
+ static final String action = "close-docking-area";
+ private List<Key> b1;
+ private List<Key> b2;
+ private final String name;
+ private int match1;
+ private int match2;
+
+ KeyHandler(String dockableName)
+ {
+ String shortcut1=jEdit.getProperty(action + ".shortcut");
+ String shortcut2=jEdit.getProperty(action + ".shortcut2");
+ if (shortcut1 != null)
+ b1 = parseShortcut(shortcut1);
+ if (shortcut2 != null)
+ b2 = parseShortcut(shortcut2);
+ name = dockableName;
+ match1 = match2 = 0;
+ }
+
+ @Override
+ public void keyTyped(KeyEvent e)
+ {
+ if (b1 != null)
+ match1 = match(e, b1, match1);
+ if (b2 != null)
+ match2 = match(e, b2, match2);
+ if ((match1 > 0 && match1 == b1.size()) ||
+ (match2 > 0 && match2 == b2.size()))
+ {
+ hideDockableWindow(name);
+ match1 = match2 = 0;
+ }
+ }
+
+ private int match(KeyEvent e, List<Key> shortcut, int index)
+ {
+ char c = e.getKeyChar();
+ if (shortcut != null && c == shortcut.get(index).key)
+ return index + 1;
+ return 0;
+ }
+
+ private List<Key> parseShortcut(String shortcut)
+ {
+ String [] parts = shortcut.split("\\s+");
+ List<Key> keys = new ArrayList<Key>(parts.length);
+ for (String part: parts)
+ {
+ if (part.length() > 0)
+ keys.add(KeyEventTranslator.parseKey(part));
+ }
+ return keys;
+ }
+ } //}}}
+
+ // {{{ DockingLayout class
+ /**
+ * Objects of DockingLayout class describe which dockables are docked where,
+ * which ones are floating, and their sizes/positions for saving/loading perspectives.
+ */
+ public abstract static class DockingLayout
+ {
+ public static final int NO_VIEW_INDEX = -1;
+ public abstract boolean loadLayout(String baseName, int viewIndex);
+ public abstract boolean saveLayout(String baseName, int viewIndex);
+ public abstract String getName();
+
+ public void setPlainView(boolean plain)
+ {
+ }
+
+ public String [] getSavedLayouts()
+ {
+ String layoutDir = getLayoutDirectory();
+ if (layoutDir == null)
+ return null;
+ File dir = new File(layoutDir);
+ File[] files = dir.listFiles(new FilenameFilter()
+ {
+ public boolean accept(File dir, String name)
+ {
+ return name.endsWith(".xml");
+ }
+ });
+ String[] layouts = new String[files.length];
+ for (int i = 0; i < files.length; i++)
+ layouts[i] = fileToLayout(files[i].getName());
+ return layouts;
+ }
+
+ private static String fileToLayout(String filename)
+ {
+ return filename.replaceFirst(".xml", "");
+ }
+
+ private static String layoutToFile(String baseName, int viewIndex)
+ {
+ StringBuilder name = new StringBuilder(baseName);
+ if (viewIndex != NO_VIEW_INDEX)
+ name.append("-view").append(viewIndex);
+ name.append(".xml");
+ return name.toString();
+ }
+
+ public String getLayoutFilename(String baseName, int viewIndex)
+ {
+ String dir = getLayoutDirectory();
+ if (dir == null)
+ return null;
+ return dir + File.separator + layoutToFile(baseName, viewIndex);
+ }
+
+ private String getLayoutDirectory()
+ {
+ String name = getName();
+ if (name == null)
+ return null;
+ String dir = jEdit.getSettingsDirectory();
+ if (dir == null)
+ return null;
+ dir = dir + File.separator + name;
+ File d = new File(dir);
+ if (!d.exists())
+ d.mkdir();
+ return dir;
+ }
+ } // }}}
+
+} // }}}
diff --git a/jEdit/org/gjt/sp/jedit/gui/DockableWindowManagerImpl.java b/jEdit/org/gjt/sp/jedit/gui/DockableWindowManagerImpl.java
index 20c3728..61b6002 100644
--- a/jEdit/org/gjt/sp/jedit/gui/DockableWindowManagerImpl.java
+++ b/jEdit/org/gjt/sp/jedit/gui/DockableWindowManagerImpl.java
@@ -50,11 +50,11 @@ import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.SwingUtilities;
-import org.gjt.sp.jedit.EBMessage;
import org.gjt.sp.jedit.EditBus;
import org.gjt.sp.jedit.PluginJAR;
import org.gjt.sp.jedit.View;
import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.EditBus.EBHandler;
import org.gjt.sp.jedit.View.ViewConfig;
import org.gjt.sp.jedit.msg.DockableWindowUpdate;
import org.gjt.sp.jedit.msg.PluginUpdate;
@@ -673,61 +673,65 @@ public class DockableWindowManagerImpl extends DockableWindowManager
}
} //}}}
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
+ //{{{ handleDockableWindowUpdate() method
+ @EBHandler
+ public void handleDockableWindowUpdate(DockableWindowUpdate msg)
{
- if(msg instanceof DockableWindowUpdate)
- {
- if(((DockableWindowUpdate)msg).getWhat()
- == DockableWindowUpdate.PROPERTIES_CHANGED)
- propertiesChanged();
- }
- else if(msg instanceof PropertiesChanged)
+ if (msg.getWhat() == DockableWindowUpdate.PROPERTIES_CHANGED)
propertiesChanged();
- else if(msg instanceof PluginUpdate)
- {
- PluginUpdate pmsg = (PluginUpdate)msg;
- if(pmsg.getWhat() == PluginUpdate.LOADED)
- {
- Iterator<DockableWindowFactory.Window> iter = factory.getDockableWindowIterator();
+ } //}}}
- while(iter.hasNext())
- {
- DockableWindowFactory.Window w = iter.next();
- if(w.plugin == pmsg.getPluginJAR())
- addEntry(w);
- }
+ //{{{ handlePropertiesChanged() method
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
+ {
+ propertiesChanged();
+ } //}}}
- propertiesChanged();
- }
- else if(pmsg.isExiting())
+ //{{{ handlePluginUpdate() method
+ @EBHandler
+ public void handlePluginUpdate(PluginUpdate pmsg)
+ {
+ if(pmsg.getWhat() == PluginUpdate.LOADED)
+ {
+ Iterator<DockableWindowFactory.Window> iter = factory.getDockableWindowIterator();
+
+ while(iter.hasNext())
{
- // we don't care
+ DockableWindowFactory.Window w = iter.next();
+ if(w.plugin == pmsg.getPluginJAR())
+ addEntry(w);
}
- else if(pmsg.getWhat() == PluginUpdate.DEACTIVATED)
+
+ propertiesChanged();
+ }
+ else if(pmsg.isExiting())
+ {
+ // we don't care
+ }
+ else if(pmsg.getWhat() == PluginUpdate.DEACTIVATED)
+ {
+ Iterator<Entry> iter = getAllPluginEntries(
+ pmsg.getPluginJAR(),false);
+ while(iter.hasNext())
{
- Iterator<Entry> iter = getAllPluginEntries(
- pmsg.getPluginJAR(),false);
- while(iter.hasNext())
- {
- Entry entry = iter.next();
- if(entry.container != null)
- entry.container.remove(entry);
- }
+ Entry entry = iter.next();
+ if(entry.container != null)
+ entry.container.remove(entry);
}
- else if(pmsg.getWhat() == PluginUpdate.UNLOADED)
+ }
+ else if(pmsg.getWhat() == PluginUpdate.UNLOADED)
+ {
+ Iterator<Entry> iter = getAllPluginEntries(
+ pmsg.getPluginJAR(),true);
+ while(iter.hasNext())
{
- Iterator<Entry> iter = getAllPluginEntries(
- pmsg.getPluginJAR(),true);
- while(iter.hasNext())
+ Entry entry = iter.next();
+ if(entry.container != null)
{
- Entry entry = iter.next();
- if(entry.container != null)
- {
- entry.container.unregister(entry);
- entry.win = null;
- entry.container = null;
- }
+ entry.container.unregister(entry);
+ entry.win = null;
+ entry.container = null;
}
}
}
@@ -965,7 +969,7 @@ public class DockableWindowManagerImpl extends DockableWindowManager
private boolean continuousLayout;
//{{{ Entry class
- class Entry
+ static class Entry
{
DockableWindowFactory.Window factory;
diff --git a/jEdit/org/gjt/sp/jedit/gui/EditAbbrevDialog.java b/jEdit/org/gjt/sp/jedit/gui/EditAbbrevDialog.java
index a682c62..4f61d33 100644
--- a/jEdit/org/gjt/sp/jedit/gui/EditAbbrevDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/EditAbbrevDialog.java
@@ -1,176 +1,176 @@
-/*
- * EditAbbrevDialog.java - Displayed when editing abbrevs
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class EditAbbrevDialog extends JDialog
-{
- //{{{ EditAbbrevDialog constructor
- /**
- * @since jEdit 4.2pre3
- */
- public EditAbbrevDialog(Frame frame, String abbrev, String expansion,
- Map abbrevs)
- {
- super(frame,jEdit.getProperty("edit-abbrev.title"),true);
- init(abbrev, expansion, abbrevs);
- } //}}}
-
- //{{{ EditAbbrevDialog constructor
- public EditAbbrevDialog(Dialog dialog, String abbrev, String expansion,
- Map abbrevs)
- {
- super(dialog,jEdit.getProperty("edit-abbrev.title"),true);
- init(abbrev, expansion, abbrevs);
- } //}}}
-
- //{{{ getAbbrev() method
- public String getAbbrev()
- {
- if(!isOK)
- return null;
-
- return editor.getAbbrev();
- } //}}}
-
- //{{{ getExpansion() method
- public String getExpansion()
- {
- if(!isOK)
- return null;
-
- return editor.getExpansion();
- } //}}}
-
- //{{{ Private members
- private AbbrevEditor editor;
- private JButton ok;
- private JButton cancel;
- private boolean isOK;
- private String originalAbbrev;
- private Map abbrevs;
-
- //{{{ init() method
- private void init(String abbrev, String expansion, Map abbrevs)
- {
- this.abbrevs = abbrevs;
-
- this.originalAbbrev = abbrev;
-
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- editor = new AbbrevEditor();
- editor.setAbbrev(abbrev);
- editor.setExpansion(expansion);
- editor.setBorder(new EmptyBorder(0,0,12,0));
- content.add(BorderLayout.CENTER,editor);
-
- Box box = new Box(BoxLayout.X_AXIS);
- box.add(Box.createGlue());
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(new ActionHandler());
- getRootPane().setDefaultButton(ok);
- box.add(ok);
- box.add(Box.createHorizontalStrut(6));
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(new ActionHandler());
- box.add(cancel);
- box.add(Box.createGlue());
- content.add(BorderLayout.SOUTH,box);
-
- KeyListener listener = new KeyHandler();
- addKeyListener(listener);
- editor.getBeforeCaretTextArea().addKeyListener(listener);
- editor.getAfterCaretTextArea().addKeyListener(listener);
-
- setDefaultCloseOperation(DISPOSE_ON_CLOSE);
- pack();
- setLocationRelativeTo(getParent());
- setVisible(true);
- } //}}}
-
- //{{{ checkForExistingAbbrev() method
- private boolean checkForExistingAbbrev()
- {
- String abbrev = editor.getAbbrev();
- if(abbrevs.get(abbrev) != null)
- {
- if(abbrev.equals(originalAbbrev))
- return true;
-
- int result = GUIUtilities.confirm(this,
- "edit-abbrev.duplicate",null,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
- return (result == JOptionPane.YES_OPTION);
- }
-
- return true;
- } //}}}
-
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == ok)
- {
- if(editor.getAbbrev() == null
- || editor.getAbbrev().length() == 0)
- {
- getToolkit().beep();
- return;
- }
-
- if(!checkForExistingAbbrev())
- return;
-
- isOK = true;
- }
-
- dispose();
- }
- } //}}}
-
- //{{{ KeyHandler class
- class KeyHandler extends KeyAdapter
- {
- public void keyPressed(KeyEvent evt)
- {
- if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
- dispose();
- }
- } //}}}
-}
+/*
+ * EditAbbrevDialog.java - Displayed when editing abbrevs
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class EditAbbrevDialog extends JDialog
+{
+ //{{{ EditAbbrevDialog constructor
+ /**
+ * @since jEdit 4.2pre3
+ */
+ public EditAbbrevDialog(Frame frame, String abbrev, String expansion,
+ Map abbrevs)
+ {
+ super(frame,jEdit.getProperty("edit-abbrev.title"),true);
+ init(abbrev, expansion, abbrevs);
+ } //}}}
+
+ //{{{ EditAbbrevDialog constructor
+ public EditAbbrevDialog(Dialog dialog, String abbrev, String expansion,
+ Map abbrevs)
+ {
+ super(dialog,jEdit.getProperty("edit-abbrev.title"),true);
+ init(abbrev, expansion, abbrevs);
+ } //}}}
+
+ //{{{ getAbbrev() method
+ public String getAbbrev()
+ {
+ if(!isOK)
+ return null;
+
+ return editor.getAbbrev();
+ } //}}}
+
+ //{{{ getExpansion() method
+ public String getExpansion()
+ {
+ if(!isOK)
+ return null;
+
+ return editor.getExpansion();
+ } //}}}
+
+ //{{{ Private members
+ private AbbrevEditor editor;
+ private JButton ok;
+ private JButton cancel;
+ private boolean isOK;
+ private String originalAbbrev;
+ private Map abbrevs;
+
+ //{{{ init() method
+ private void init(String abbrev, String expansion, Map abbrevs)
+ {
+ this.abbrevs = abbrevs;
+
+ this.originalAbbrev = abbrev;
+
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ editor = new AbbrevEditor();
+ editor.setAbbrev(abbrev);
+ editor.setExpansion(expansion);
+ editor.setBorder(new EmptyBorder(0,0,12,0));
+ content.add(BorderLayout.CENTER,editor);
+
+ Box box = new Box(BoxLayout.X_AXIS);
+ box.add(Box.createGlue());
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(new ActionHandler());
+ getRootPane().setDefaultButton(ok);
+ box.add(ok);
+ box.add(Box.createHorizontalStrut(6));
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(new ActionHandler());
+ box.add(cancel);
+ box.add(Box.createGlue());
+ content.add(BorderLayout.SOUTH,box);
+
+ KeyListener listener = new KeyHandler();
+ addKeyListener(listener);
+ editor.getBeforeCaretTextArea().addKeyListener(listener);
+ editor.getAfterCaretTextArea().addKeyListener(listener);
+
+ setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+ pack();
+ setLocationRelativeTo(getParent());
+ setVisible(true);
+ } //}}}
+
+ //{{{ checkForExistingAbbrev() method
+ private boolean checkForExistingAbbrev()
+ {
+ String abbrev = editor.getAbbrev();
+ if(abbrevs.get(abbrev) != null)
+ {
+ if(abbrev.equals(originalAbbrev))
+ return true;
+
+ int result = GUIUtilities.confirm(this,
+ "edit-abbrev.duplicate",null,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ return (result == JOptionPane.YES_OPTION);
+ }
+
+ return true;
+ } //}}}
+
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == ok)
+ {
+ if(editor.getAbbrev() == null
+ || editor.getAbbrev().length() == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ if(!checkForExistingAbbrev())
+ return;
+
+ isOK = true;
+ }
+
+ dispose();
+ }
+ } //}}}
+
+ //{{{ KeyHandler class
+ class KeyHandler extends KeyAdapter
+ {
+ public void keyPressed(KeyEvent evt)
+ {
+ if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
+ dispose();
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/EnhancedButton.java b/jEdit/org/gjt/sp/jedit/gui/EnhancedButton.java
index 9bb6056..414567a 100644
--- a/jEdit/org/gjt/sp/jedit/gui/EnhancedButton.java
+++ b/jEdit/org/gjt/sp/jedit/gui/EnhancedButton.java
@@ -1,114 +1,114 @@
-/*
- * EnhancedButton.java - Tool bar button
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class EnhancedButton extends RolloverButton
-{
- //{{{ EnhancedButton constructor
- public EnhancedButton(Icon icon, String toolTip, String action,
- ActionContext context)
- {
- super(icon);
-
- this.action = action;
-
- if(action != null)
- {
- // set the name of this button :
- // for instance, if the action is 'vfs.browser.previous'
- // the name will be 'previous'
- // this helps greatly in testing the UI with Fest-Swing
- int iSuffix = action.lastIndexOf('.');
- if(iSuffix<0 || iSuffix == action.length()-1)
- {
- setName(action);
- }
- else
- {
- setName(action.substring(iSuffix+1));
- }
-
- setEnabled(true);
- addActionListener(new EditAction.Wrapper(context,action));
- addMouseListener(new MouseHandler());
- }
- else
- setEnabled(false);
-
- setToolTipText(toolTip);
- } //}}}
-
- //{{{ isFocusTraversable() method
- public boolean isFocusTraversable()
- {
- return false;
- } //}}}
-
- //{{{ Private members
- private String action;
- //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- boolean msgSet = false;
-
- public void mouseReleased(MouseEvent evt)
- {
- if(msgSet)
- {
- GUIUtilities.getView((Component)evt.getSource())
- .getStatus().setMessage(null);
- msgSet = false;
- }
- }
-
- public void mouseEntered(MouseEvent evt)
- {
- String msg = jEdit.getProperty(action + ".mouse-over");
- if(msg != null)
- {
- GUIUtilities.getView((Component)evt.getSource())
- .getStatus().setMessage(msg);
- msgSet = true;
- }
- }
-
- public void mouseExited(MouseEvent evt)
- {
- if(msgSet)
- {
- GUIUtilities.getView((Component)evt.getSource())
- .getStatus().setMessage(null);
- msgSet = false;
- }
- }
- } //}}}
-}
+/*
+ * EnhancedButton.java - Tool bar button
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class EnhancedButton extends RolloverButton
+{
+ //{{{ EnhancedButton constructor
+ public EnhancedButton(Icon icon, String toolTip, String action,
+ ActionContext context)
+ {
+ super(icon);
+
+ this.action = action;
+
+ if(action != null)
+ {
+ // set the name of this button :
+ // for instance, if the action is 'vfs.browser.previous'
+ // the name will be 'previous'
+ // this helps greatly in testing the UI with Fest-Swing
+ int iSuffix = action.lastIndexOf('.');
+ if(iSuffix<0 || iSuffix == action.length()-1)
+ {
+ setName(action);
+ }
+ else
+ {
+ setName(action.substring(iSuffix+1));
+ }
+
+ setEnabled(true);
+ addActionListener(new EditAction.Wrapper(context,action));
+ addMouseListener(new MouseHandler());
+ }
+ else
+ setEnabled(false);
+
+ setToolTipText(toolTip);
+ } //}}}
+
+ //{{{ isFocusTraversable() method
+ public boolean isFocusTraversable()
+ {
+ return false;
+ } //}}}
+
+ //{{{ Private members
+ private String action;
+ //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ boolean msgSet = false;
+
+ public void mouseReleased(MouseEvent evt)
+ {
+ if(msgSet)
+ {
+ GUIUtilities.getView((Component)evt.getSource())
+ .getStatus().setMessage(null);
+ msgSet = false;
+ }
+ }
+
+ public void mouseEntered(MouseEvent evt)
+ {
+ String msg = jEdit.getProperty(action + ".mouse-over");
+ if(msg != null)
+ {
+ GUIUtilities.getView((Component)evt.getSource())
+ .getStatus().setMessage(msg);
+ msgSet = true;
+ }
+ }
+
+ public void mouseExited(MouseEvent evt)
+ {
+ if(msgSet)
+ {
+ GUIUtilities.getView((Component)evt.getSource())
+ .getStatus().setMessage(null);
+ msgSet = false;
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/EnhancedDialog.java b/jEdit/org/gjt/sp/jedit/gui/EnhancedDialog.java
index 7be8d24..11cbecd 100644
--- a/jEdit/org/gjt/sp/jedit/gui/EnhancedDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/EnhancedDialog.java
@@ -1,172 +1,172 @@
-/*
- * EnhancedDialog.java - Handles OK/Cancel for you
- * Copyright (C) 1998, 1999, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-
-/**
- * A dialog box that handles window closing, the ENTER key and the ESCAPE
- * key for you. All you have to do is implement ok() (called when
- * Enter is pressed) and cancel() (called when Escape is pressed, or window
- * is closed).
- * @author Slava Pestov
- * @version $Id: EnhancedDialog.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public abstract class EnhancedDialog extends JDialog
-{
- public EnhancedDialog(Frame parent, String title, boolean modal)
- {
- super(parent,title,modal);
- _init();
- }
-
- public EnhancedDialog(Dialog parent, String title, boolean modal)
- {
- super(parent,title,modal);
- _init();
- }
-
- public boolean getEnterEnabled()
- {
- return enterEnabled;
- }
-
- public void setEnterEnabled(boolean enterEnabled)
- {
- this.enterEnabled = enterEnabled;
- }
-
- public abstract void ok();
- public abstract void cancel();
-
- //{{{ Private members
- private void _init()
- {
- ((Container)getLayeredPane()).addContainerListener(
- new ContainerHandler());
- getContentPane().addContainerListener(new ContainerHandler());
-
- keyHandler = new KeyHandler();
- addKeyListener(keyHandler);
- addWindowListener(new WindowHandler());
-
- setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
-
- enterEnabled = true;
- }
- //}}}
-
- // protected members
- protected KeyHandler keyHandler;
- protected boolean enterEnabled;
-
- // Recursively adds our key listener to sub-components
- class ContainerHandler extends ContainerAdapter
- {
- public void componentAdded(ContainerEvent evt)
- {
- componentAdded(evt.getChild());
- }
-
- public void componentRemoved(ContainerEvent evt)
- {
- componentRemoved(evt.getChild());
- }
-
- private void componentAdded(Component comp)
- {
- comp.addKeyListener(keyHandler);
- if(comp instanceof Container)
- {
- Container cont = (Container)comp;
- cont.addContainerListener(this);
- Component[] comps = cont.getComponents();
- for(int i = 0; i < comps.length; i++)
- {
- componentAdded(comps[i]);
- }
- }
- }
-
- private void componentRemoved(Component comp)
- {
- comp.removeKeyListener(keyHandler);
- if(comp instanceof Container)
- {
- Container cont = (Container)comp;
- cont.removeContainerListener(this);
- Component[] comps = cont.getComponents();
- for(int i = 0; i < comps.length; i++)
- {
- componentRemoved(comps[i]);
- }
- }
- }
- }
-
- class KeyHandler extends KeyAdapter
- {
- public void keyPressed(KeyEvent evt)
- {
- if(evt.isConsumed())
- return;
-
- if(evt.getKeyCode() == KeyEvent.VK_ENTER
- && enterEnabled)
- {
- Component comp = getFocusOwner();
- while(comp != null)
- {
- if(comp instanceof JComboBox)
- {
- JComboBox combo = (JComboBox)comp;
- if(combo.isEditable())
- {
- Object selected = combo.getEditor().getItem();
- if(selected != null)
- combo.setSelectedItem(selected);
- }
- break;
- }
-
- comp = comp.getParent();
- }
-
- ok();
- evt.consume();
- }
- else if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
- {
- cancel();
- evt.consume();
- }
- }
- }
-
- class WindowHandler extends WindowAdapter
- {
- public void windowClosing(WindowEvent evt)
- {
- cancel();
- }
- }
-}
+/*
+ * EnhancedDialog.java - Handles OK/Cancel for you
+ * Copyright (C) 1998, 1999, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+
+/**
+ * A dialog box that handles window closing, the ENTER key and the ESCAPE
+ * key for you. All you have to do is implement ok() (called when
+ * Enter is pressed) and cancel() (called when Escape is pressed, or window
+ * is closed).
+ * @author Slava Pestov
+ * @version $Id: EnhancedDialog.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public abstract class EnhancedDialog extends JDialog
+{
+ public EnhancedDialog(Frame parent, String title, boolean modal)
+ {
+ super(parent,title,modal);
+ _init();
+ }
+
+ public EnhancedDialog(Dialog parent, String title, boolean modal)
+ {
+ super(parent,title,modal);
+ _init();
+ }
+
+ public boolean getEnterEnabled()
+ {
+ return enterEnabled;
+ }
+
+ public void setEnterEnabled(boolean enterEnabled)
+ {
+ this.enterEnabled = enterEnabled;
+ }
+
+ public abstract void ok();
+ public abstract void cancel();
+
+ //{{{ Private members
+ private void _init()
+ {
+ ((Container)getLayeredPane()).addContainerListener(
+ new ContainerHandler());
+ getContentPane().addContainerListener(new ContainerHandler());
+
+ keyHandler = new KeyHandler();
+ addKeyListener(keyHandler);
+ addWindowListener(new WindowHandler());
+
+ setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
+
+ enterEnabled = true;
+ }
+ //}}}
+
+ // protected members
+ protected KeyHandler keyHandler;
+ protected boolean enterEnabled;
+
+ // Recursively adds our key listener to sub-components
+ class ContainerHandler extends ContainerAdapter
+ {
+ public void componentAdded(ContainerEvent evt)
+ {
+ componentAdded(evt.getChild());
+ }
+
+ public void componentRemoved(ContainerEvent evt)
+ {
+ componentRemoved(evt.getChild());
+ }
+
+ private void componentAdded(Component comp)
+ {
+ comp.addKeyListener(keyHandler);
+ if(comp instanceof Container)
+ {
+ Container cont = (Container)comp;
+ cont.addContainerListener(this);
+ Component[] comps = cont.getComponents();
+ for(int i = 0; i < comps.length; i++)
+ {
+ componentAdded(comps[i]);
+ }
+ }
+ }
+
+ private void componentRemoved(Component comp)
+ {
+ comp.removeKeyListener(keyHandler);
+ if(comp instanceof Container)
+ {
+ Container cont = (Container)comp;
+ cont.removeContainerListener(this);
+ Component[] comps = cont.getComponents();
+ for(int i = 0; i < comps.length; i++)
+ {
+ componentRemoved(comps[i]);
+ }
+ }
+ }
+ }
+
+ class KeyHandler extends KeyAdapter
+ {
+ public void keyPressed(KeyEvent evt)
+ {
+ if(evt.isConsumed())
+ return;
+
+ if(evt.getKeyCode() == KeyEvent.VK_ENTER
+ && enterEnabled)
+ {
+ Component comp = getFocusOwner();
+ while(comp != null)
+ {
+ if(comp instanceof JComboBox)
+ {
+ JComboBox combo = (JComboBox)comp;
+ if(combo.isEditable())
+ {
+ Object selected = combo.getEditor().getItem();
+ if(selected != null)
+ combo.setSelectedItem(selected);
+ }
+ break;
+ }
+
+ comp = comp.getParent();
+ }
+
+ ok();
+ evt.consume();
+ }
+ else if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
+ {
+ cancel();
+ evt.consume();
+ }
+ }
+ }
+
+ class WindowHandler extends WindowAdapter
+ {
+ public void windowClosing(WindowEvent evt)
+ {
+ cancel();
+ }
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/ErrorListDialog.java b/jEdit/org/gjt/sp/jedit/gui/ErrorListDialog.java
index 0b1e8c2..1fdd738 100644
--- a/jEdit/org/gjt/sp/jedit/gui/ErrorListDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/ErrorListDialog.java
@@ -1,219 +1,219 @@
-/*
- * ErrorListDialog.java - Used to list I/O and plugin load errors
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.*;
-import java.awt.event.*;
-import java.util.Vector;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.text.BadLocationException;
-import javax.swing.text.SimpleAttributeSet;
-import javax.swing.text.StyleConstants;
-import javax.swing.text.StyledDocument;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.pluginmgr.PluginManager;
-import org.gjt.sp.util.Log;
-//}}}
-
-public class ErrorListDialog extends EnhancedDialog
-{
- //{{{ ErrorEntry class
- public static class ErrorEntry
- {
- String path;
- String[] messages;
-
- public ErrorEntry(String path, String messageProp, Object[] args)
- {
- this.path = path;
-
- String message = jEdit.getProperty(messageProp,args);
- if(message == null)
- message = "Undefined property: " + messageProp;
-
- Log.log(Log.ERROR,this,path + ":");
- Log.log(Log.ERROR,this,message);
-
- Vector<String> tokenizedMessage = new Vector<String>();
- int lastIndex = -1;
- for(int i = 0; i < message.length(); i++)
- {
- if(message.charAt(i) == '\n')
- {
- tokenizedMessage.addElement(message.substring(
- lastIndex + 1,i));
- lastIndex = i;
- }
- }
-
- if(lastIndex != message.length())
- {
- tokenizedMessage.addElement(message.substring(
- lastIndex + 1));
- }
-
- messages = new String[tokenizedMessage.size()];
- tokenizedMessage.copyInto(messages);
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ErrorEntry)
- {
- ErrorEntry e = (ErrorEntry)o;
- return e.path.equals(path);
- }
- else
- return false;
- }
-
- // This enables users to copy the error messages to
- // clipboard with Ctrl+C on Windows. But it works only
- // if the entry is selected by a mouse click.
- public String toString()
- {
- return path + ":\n" +
- TextUtilities.join(java.util.Arrays.asList(messages), "\n");
- }
- } //}}}
-
- //{{{ ErrorListDialog constructor
- public ErrorListDialog(Frame frame, String title, String caption,
- Vector<ErrorEntry> messages, boolean pluginError)
- {
- super(frame,title,!pluginError);
-
- JPanel content = new JPanel(new BorderLayout(12,12));
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- Box iconBox = new Box(BoxLayout.Y_AXIS);
- iconBox.add(new JLabel(UIManager.getIcon("OptionPane.errorIcon")));
- iconBox.add(Box.createGlue());
- content.add(BorderLayout.WEST,iconBox);
-
- JPanel centerPanel = new JPanel(new BorderLayout());
-
- JLabel label = new JLabel(caption);
- label.setBorder(new EmptyBorder(0,0,6,0));
- centerPanel.add(BorderLayout.NORTH,label);
-
- JTextPane errors = new JTextPane();
- errors.setEditable(false);
- errors.setForeground(jEdit.getColorProperty("view.fgColor"));
- errors.setBackground(jEdit.getColorProperty("view.bgColor"));
- errors.setCaretColor(jEdit.getColorProperty("view.caretColor"));
- errors.setSelectionColor(jEdit.getColorProperty("view.selectionColor"));
- StyledDocument doc = errors.getStyledDocument();
- Font plainFont = new JLabel().getFont();
- SimpleAttributeSet plainFontAttrSet = new SimpleAttributeSet();
- StyleConstants.setFontFamily(plainFontAttrSet, plainFont.getFamily());
- SimpleAttributeSet boldFontAttrSet = (SimpleAttributeSet) plainFontAttrSet.clone();
- StyleConstants.setBold(boldFontAttrSet, true);
- for (ErrorEntry entry : messages)
- {
- try
- {
- doc.insertString(doc.getLength(), entry.path + ":\n", boldFontAttrSet);
- for (String s: entry.messages)
- doc.insertString(doc.getLength(), s + "\n", plainFontAttrSet);
- }
- catch (BadLocationException e)
- {
- }
- }
-
- // need this bullshit scroll bar policy for the preferred size
- // hack to work
- JScrollPane scrollPane = new JScrollPane(errors,
- JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
- JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
- Dimension size = scrollPane.getPreferredSize();
- size.width = Math.min(size.width,400);
- scrollPane.setPreferredSize(size);
-
- centerPanel.add(BorderLayout.CENTER,scrollPane);
-
- content.add(BorderLayout.CENTER,centerPanel);
-
- Box buttons = new Box(BoxLayout.X_AXIS);
- buttons.add(Box.createGlue());
-
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(new ActionHandler());
-
- if(pluginError)
- {
- pluginMgr = new JButton(jEdit.getProperty("error-list.plugin-manager"));
- pluginMgr.addActionListener(new ActionHandler());
- buttons.add(pluginMgr);
- buttons.add(Box.createHorizontalStrut(6));
- }
-
- buttons.add(ok);
-
- buttons.add(Box.createGlue());
- content.add(BorderLayout.SOUTH,buttons);
-
- getRootPane().setDefaultButton(ok);
-
- pack();
- setLocationRelativeTo(frame);
- setVisible(true);
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ Private members
- private JButton ok, pluginMgr;
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == ok)
- dispose();
- else if(evt.getSource() == pluginMgr)
- {
- PluginManager.showPluginManager(JOptionPane.getFrameForComponent(
- ErrorListDialog.this));
- }
- } //}}}
- } //}}}
-}
+/*
+ * ErrorListDialog.java - Used to list I/O and plugin load errors
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.event.*;
+import java.util.Vector;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.StyleConstants;
+import javax.swing.text.StyledDocument;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.pluginmgr.PluginManager;
+import org.gjt.sp.util.Log;
+//}}}
+
+public class ErrorListDialog extends EnhancedDialog
+{
+ //{{{ ErrorEntry class
+ public static class ErrorEntry
+ {
+ String path;
+ String[] messages;
+
+ public ErrorEntry(String path, String messageProp, Object[] args)
+ {
+ this.path = path;
+
+ String message = jEdit.getProperty(messageProp,args);
+ if(message == null)
+ message = "Undefined property: " + messageProp;
+
+ Log.log(Log.ERROR,this,path + ":");
+ Log.log(Log.ERROR,this,message);
+
+ Vector<String> tokenizedMessage = new Vector<String>();
+ int lastIndex = -1;
+ for(int i = 0; i < message.length(); i++)
+ {
+ if(message.charAt(i) == '\n')
+ {
+ tokenizedMessage.addElement(message.substring(
+ lastIndex + 1,i));
+ lastIndex = i;
+ }
+ }
+
+ if(lastIndex != message.length())
+ {
+ tokenizedMessage.addElement(message.substring(
+ lastIndex + 1));
+ }
+
+ messages = new String[tokenizedMessage.size()];
+ tokenizedMessage.copyInto(messages);
+ }
+
+ public boolean equals(Object o)
+ {
+ if(o instanceof ErrorEntry)
+ {
+ ErrorEntry e = (ErrorEntry)o;
+ return e.path.equals(path);
+ }
+ else
+ return false;
+ }
+
+ // This enables users to copy the error messages to
+ // clipboard with Ctrl+C on Windows. But it works only
+ // if the entry is selected by a mouse click.
+ public String toString()
+ {
+ return path + ":\n" +
+ TextUtilities.join(java.util.Arrays.asList(messages), "\n");
+ }
+ } //}}}
+
+ //{{{ ErrorListDialog constructor
+ public ErrorListDialog(Frame frame, String title, String caption,
+ Vector<ErrorEntry> messages, boolean pluginError)
+ {
+ super(frame,title,!pluginError);
+
+ JPanel content = new JPanel(new BorderLayout(12,12));
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ Box iconBox = new Box(BoxLayout.Y_AXIS);
+ iconBox.add(new JLabel(UIManager.getIcon("OptionPane.errorIcon")));
+ iconBox.add(Box.createGlue());
+ content.add(BorderLayout.WEST,iconBox);
+
+ JPanel centerPanel = new JPanel(new BorderLayout());
+
+ JLabel label = new JLabel(caption);
+ label.setBorder(new EmptyBorder(0,0,6,0));
+ centerPanel.add(BorderLayout.NORTH,label);
+
+ JTextPane errors = new JTextPane();
+ errors.setEditable(false);
+ errors.setForeground(jEdit.getColorProperty("view.fgColor"));
+ errors.setBackground(jEdit.getColorProperty("view.bgColor"));
+ errors.setCaretColor(jEdit.getColorProperty("view.caretColor"));
+ errors.setSelectionColor(jEdit.getColorProperty("view.selectionColor"));
+ StyledDocument doc = errors.getStyledDocument();
+ Font plainFont = new JLabel().getFont();
+ SimpleAttributeSet plainFontAttrSet = new SimpleAttributeSet();
+ StyleConstants.setFontFamily(plainFontAttrSet, plainFont.getFamily());
+ SimpleAttributeSet boldFontAttrSet = (SimpleAttributeSet) plainFontAttrSet.clone();
+ StyleConstants.setBold(boldFontAttrSet, true);
+ for (ErrorEntry entry : messages)
+ {
+ try
+ {
+ doc.insertString(doc.getLength(), entry.path + ":\n", boldFontAttrSet);
+ for (String s: entry.messages)
+ doc.insertString(doc.getLength(), s + "\n", plainFontAttrSet);
+ }
+ catch (BadLocationException e)
+ {
+ }
+ }
+
+ // need this bullshit scroll bar policy for the preferred size
+ // hack to work
+ JScrollPane scrollPane = new JScrollPane(errors,
+ JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
+ JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+ Dimension size = scrollPane.getPreferredSize();
+ size.width = Math.min(size.width,400);
+ scrollPane.setPreferredSize(size);
+
+ centerPanel.add(BorderLayout.CENTER,scrollPane);
+
+ content.add(BorderLayout.CENTER,centerPanel);
+
+ Box buttons = new Box(BoxLayout.X_AXIS);
+ buttons.add(Box.createGlue());
+
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(new ActionHandler());
+
+ if(pluginError)
+ {
+ pluginMgr = new JButton(jEdit.getProperty("error-list.plugin-manager"));
+ pluginMgr.addActionListener(new ActionHandler());
+ buttons.add(pluginMgr);
+ buttons.add(Box.createHorizontalStrut(6));
+ }
+
+ buttons.add(ok);
+
+ buttons.add(Box.createGlue());
+ content.add(BorderLayout.SOUTH,buttons);
+
+ getRootPane().setDefaultButton(ok);
+
+ pack();
+ setLocationRelativeTo(frame);
+ setVisible(true);
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ Private members
+ private JButton ok, pluginMgr;
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == ok)
+ dispose();
+ else if(evt.getSource() == pluginMgr)
+ {
+ PluginManager.showPluginManager(JOptionPane.getFrameForComponent(
+ ErrorListDialog.this));
+ }
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/ExtendedGridLayout.java b/jEdit/org/gjt/sp/jedit/gui/ExtendedGridLayout.java
index 8ed294b..0a3a11d 100644
--- a/jEdit/org/gjt/sp/jedit/gui/ExtendedGridLayout.java
+++ b/jEdit/org/gjt/sp/jedit/gui/ExtendedGridLayout.java
@@ -1,1224 +1,1224 @@
-/*
- * ExtendedGridLayout.java - a grid layout manager with variable cell sizes
- * that supports colspans and rowspans
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Originally written by Björn Kautler for the jEdit project. This work has been
- * placed into the public domain. You may use this work in any way and for any
- * purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package org.gjt.sp.jedit.gui;
-
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Insets;
-import java.awt.LayoutManager2;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-
-import static java.awt.Component.CENTER_ALIGNMENT;
-
-import static org.gjt.sp.jedit.gui.ExtendedGridLayoutConstraints.REMAINDER;
-
-/**
- * A layout manager that places components in a rectangular grid
- * with variable cell sizes that supports colspans and rowspans.
- * <p>
- * The container is divided into rectangles, and each component is placed
- * in a rectangular space defined by its colspan and rowspan.
- * Each row is as large as the largest component in
- * that row, and each column is as wide as the widest component in
- * that column. </p>
- * <p>
- * This behavior is similar to
- * <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/GridLayout.html">{@code java.awt.GridLayout}</a>
- * but it supports different row heights and
- * column widths for each row/column. </p>
- * <p>
- * For example, the following is a Dialog that lays out ten buttons
- * exactly the same as in the example of the JavaDoc of
- * <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/GridBagLayout.html">{@code java.awt.GridBagLayout}</a>
- * with the difference of vertical and horizontal gaps that can be configured:
- * <hr>
- * <blockquote><pre><font color="#000000">
- * <font color="#000000"> 1:</font><font color="#009966"><strong>import</strong></font> java.awt.Button;
- * <font color="#000000"> 2:</font><font color="#009966"><strong>import</strong></font> java.awt.Dimension;
- * <font color="#000000"> 3:</font>
- * <font color="#000000"> 4:</font><font color="#009966"><strong>import</strong></font> javax.swing.JDialog;
- * <font color="#990066"> 5:</font>
- * <font color="#000000"> 6:</font><font color="#009966"><strong>import</strong></font> org.gjt.sp.jedit.gui.ExtendedGridLayout;
- * <font color="#000000"> 7:</font><font color="#009966"><strong>import</strong></font> org.gjt.sp.jedit.gui.ExtendedGridLayoutConstraints;
- * <font color="#000000"> 8:</font>
- * <font color="#000000"> 9:</font><font color="#009966"><strong>import</strong></font> <font color="#006699"><strong>static</strong></font> org.gjt.sp.jedit.gui.ExtendedGridLayoutConstraints.REMAINDER;
- * <font color="#990066"> 10:</font>
- * <font color="#000000"> 11:</font><font color="#006699"><strong>public</strong></font> <font color="#0099ff"><strong>class</strong></font> ExampleDialog <font color="#006699"><strong>extends</strong></font> JDialog <font color="#000000"><strong>{</strong></font>
- * <font color="#000000"> 12:</font> <font color="#006699"><strong>public</strong></font> <font color="#9966ff">ExampleDialog</font>() <font color="#000000"><strong>{</strong></font>
- * <font color="#000000"> 13:</font> <font color="#cc00cc">super</font>(<font color="#cc00cc">null</font>,<font color="#ff00cc">"</font><font color="#ff00cc">Example</font><font color="#ff00cc"> </font><font color="#ff00cc">Dialog</font><font color="#ff00cc">"</font>,<font color="#cc00cc">true</font>);
- * <font color="#000000"> 14:</font> <font color="#9966ff">setLayout</font>(<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayout</font>(<font color="#ff0000">5</font>,<font color="#ff0000">5</font>,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">Insets</font>(<font color="#ff0000">5</font>,<font color="#ff0000">5</font>,<font color="#ff0000">5</font>,<font color="#ff0000">5</font>)));
- * <font color="#990066"> 15:</font>
- * <font color="#000000"> 16:</font> <font color="#9966ff">add</font>(<font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button1</font><font color="#ff00cc">"</font>));
- * <font color="#000000"> 17:</font> <font color="#9966ff">add</font>(<font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button2</font><font color="#ff00cc">"</font>));
- * <font color="#000000"> 18:</font> <font color="#9966ff">add</font>(<font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button3</font><font color="#ff00cc">"</font>));
- * <font color="#000000"> 19:</font> <font color="#9966ff">add</font>(<font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button4</font><font color="#ff00cc">"</font>));
- * <font color="#990066"> 20:</font> Button button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button5</font><font color="#ff00cc">"</font>);
- * <font color="#000000"> 21:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">1</font>,REMAINDER,<font color="#ff0000">1</font>,button));
- * <font color="#000000"> 22:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button6</font><font color="#ff00cc">"</font>);
- * <font color="#000000"> 23:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">2</font>,<font color="#ff0000">3</font>,<font color="#ff0000">1</font>,button));
- * <font color="#000000"> 24:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button7</font><font color="#ff00cc">"</font>);
- * <font color="#990066"> 25:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">2</font>,button));
- * <font color="#000000"> 26:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button8</font><font color="#ff00cc">"</font>);
- * <font color="#000000"> 27:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">3</font>,<font color="#ff0000">1</font>,<font color="#ff0000">2</font>,button));
- * <font color="#000000"> 28:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button9</font><font color="#ff00cc">"</font>);
- * <font color="#000000"> 29:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">3</font>,<font color="#ff0000">3</font>,<font color="#ff0000">1</font>,button));
- * <font color="#990066"> 30:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button10</font><font color="#ff00cc">"</font>);
- * <font color="#000000"> 31:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">4</font>,REMAINDER,<font color="#ff0000">1</font>,button));
- * <font color="#000000"> 32:</font>
- * <font color="#000000"> 33:</font> <font color="#9966ff">pack</font>();
- * <font color="#000000"> 34:</font> <font color="#9966ff">setLocationRelativeTo</font>(<font color="#cc00cc">null</font>);
- * <font color="#990066"> 35:</font> <font color="#9966ff">setVisible</font>(<font color="#cc00cc">true</font>);
- * <font color="#000000"> 36:</font> <font color="#000000"><strong>}</strong></font>
- * <font color="#000000"> 37:</font>
- * <font color="#000000"> 38:</font> <font color="#006699"><strong>private</strong></font> Button <font color="#9966ff">makeButton</font>(String name) <font color="#000000"><strong>{</strong></font>
- * <font color="#000000"> 39:</font> Button button <font color="#000000"><strong>=</strong></font> <font color="#006699"><strong>new</strong></font> <font color="#9966ff">Button</font>(name);
- * <font color="#990066"> 40:</font> button.<font color="#9966ff">setMaximumSize</font>(<font color="#006699"><strong>new</strong></font> <font color="#9966ff">Dimension</font>(Integer.MAX_VALUE,Integer.MAX_VALUE));
- * <font color="#000000"> 41:</font> <font color="#006699"><strong>return</strong></font> button;
- * <font color="#000000"> 42:</font> <font color="#000000"><strong>}</strong></font>
- * <font color="#000000"> 43:</font><font color="#000000"><strong>}</strong></font>
- * </font></pre></blockquote>
- * <hr>
- * If you use {@code REMAINDER} as colspan or rowspan then a component takes
- * up the remaining space in that column or row. Any additional components in
- * a row are ignored and not displayed. Additional components in a column are
- * moved rightside. If a rowspan hits a colspan, the colspan ends and the
- * rowspan takes precedence.
- * <p>
- * Components for which {@code isVisible() == false} are ignored. Because
- * of this, components can be replaced "in-place" by adding two components next to
- * each other, with different {@code isVisible()} values, and toggling the
- * {@code setVisible()} values of both when we wish to swap the currently
- * visible component with the one that is hidden. </p>
- *
- * <p>
- * If you want to reserve free space in a row inbetween components,
- * add a <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/Box.Filler.html">{@code javax.swing.Box.Filler}</a>
- * to the layout if the free space is in the middle of a row,
- * or just don't add components if the free space
- * should be at the end of a row.</p>
- * <p>
- * If a row is taller, or a column is wider than the {@code maximumSize} of a component,
- * the component is resized to its maximum size and aligned according to its
- * {@code alignmentX} and {@code alignmentY} values. </p>
- * <p>
- * One instance of this class can be used to layout multiple
- * containers at the same time. </p>
- *
- * @author Björn "Vampire" Kautler
- * @version 1.0
- * @see ExtendedGridLayoutConstraints
- * @see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Component.html"><code>java.awt.Component</code></a>
- * @see <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/Box.Filler.html"><code>javax.swing.Box.Filler</code></a>
- */
-public class ExtendedGridLayout implements LayoutManager2
-{
- /**
- * This hashtable maintains the association between
- * a component and its ExtendedGridLayoutConstraints.
- * The Keys in {@code comptable} are the components and the
- * values are the instances of {@code ExtendedGridLayoutConstraints}.
- *
- * @see ExtendedGridLayoutConstraints
- */
- private final Hashtable<Component,ExtendedGridLayoutConstraints> comptable;
-
- /**
- * Specifies the horizontal space between two columns.
- * The default value is 0.
- *
- * @see #distanceToBorders
- * @see #vgap
- */
- private final int hgap;
-
- /**
- * Specifies the vertical space between two rows.
- * The default value is 0.
- *
- * @see #distanceToBorders
- * @see #hgap
- */
- private final int vgap;
-
- /**
- * Specifies the gap between the grid and the borders of the parent container.
- * The default value is 0 for all four borders.
- *
- * @see #hgap
- * @see #vgap
- */
- private final Insets distanceToBorders;
-
- /**
- * An enum to tell the {@code getSize()} method which size is requested.
- *
- * @see #getSize()
- */
- private static enum LayoutSize { MINIMUM, PREFERRED, MAXIMUM }
-
- /**
- * Creates an extended grid layout manager with the specified horizontal
- * and vertical gap, and the specified distance to the borders
- * of the parent container.
- *
- * @param hgap The horizontal space between two columns ({@literal >=0})
- * @param vgap The vertical space between two rows ({@literal >=0})
- * @param distanceToBorders The distances to the borders of the parent container
- * @throws IllegalArgumentException if hgap {@literal < 0}
- * @throws IllegalArgumentException if vgap {@literal < 0}
- */
- public ExtendedGridLayout(int hgap, int vgap, Insets distanceToBorders)
- {
- if (hgap < 0)
- {
- throw new IllegalArgumentException("hgap must be non-negative (" + hgap + ')');
- }
- if (vgap < 0)
- {
- throw new IllegalArgumentException("vgap must be non-negative (" + vgap + ')');
- }
- this.hgap = hgap;
- this.vgap = vgap;
- this.distanceToBorders = (Insets)distanceToBorders.clone();
- comptable = new Hashtable<Component,ExtendedGridLayoutConstraints>();
- }
-
- /**
- * Creates an extended grid layout manager with zero horizontal
- * and vertical gap, and zero distance to the borders
- * of the parent container.
- */
- public ExtendedGridLayout()
- {
- this(0,0,new Insets(0,0,0,0));
- }
-
- /**
- * If the layout manager uses a per-component string,
- * adds the component <code>component</code> to the layout,
- * associating it with the string specified by <code>name</code>.
- *
- * @param name The string to be associated with the component.
- * Has to be {@code null}, so that default constraints are used.
- * @param component The component to be added
- * @throws IllegalArgumentException if {@code name} is not {@code null}
- * @see #addLayoutComponent(java.awt.Component, java.lang.Object)
- */
- public void addLayoutComponent(String name, Component component)
- {
- addLayoutComponent(component,name);
- }
-
- /**
- * Adds the specified component to the layout, using the specified
- * constraints object.
- *
- * @param component The component to be added
- * @param constraints Where/how the component is added to the layout.
- * @throws IllegalArgumentException if {@code constraints} is not an ExtendedGridLayoutConstraints object
- * @throws IllegalArgumentException if {@code constraints} is a placeholder
- * @throws IllegalArgumentException if {@code constraints} is not the right one for the component
- * @see ExtendedGridLayoutConstraints
- */
- public void addLayoutComponent(Component component, Object constraints)
- {
- if (null == constraints)
- {
- constraints = new ExtendedGridLayoutConstraints(component);
- }
- if (constraints instanceof ExtendedGridLayoutConstraints)
- {
- ExtendedGridLayoutConstraints eglConstraints = (ExtendedGridLayoutConstraints)constraints;
- if (eglConstraints.isPlaceholder())
- {
- throw new IllegalArgumentException("constraints must not be a placeholder");
- }
- else if (component != eglConstraints.getComponent())
- {
- throw new IllegalArgumentException("constraints is not the right one for this component");
- }
- comptable.put(component,eglConstraints);
- }
- else
- {
- throw new IllegalArgumentException("constraints must not be an ExtendedGridLayoutConstraints object");
- }
- }
-
- /**
- * Retrieves the constraints for the specified {@code component}.
- * If {@code component} is not in the {@code ExtendedGridLayout},
- * a set of default {@code ExtendedGridLayoutConstraints} are returned.
- *
- * @param component the {@code component} to be queried
- * @return the contraints for the specified {@code component}
- * @throws NullPointerException if {@code component} is {@code null}
- * @see ExtendedGridLayoutConstraints
- */
- private ExtendedGridLayoutConstraints lookupConstraints(Component component)
- {
- if (null == component)
- {
- throw new NullPointerException("component must not be null");
- }
- ExtendedGridLayoutConstraints constraints = comptable.get(component);
- if (null == constraints)
- {
- constraints = new ExtendedGridLayoutConstraints(component);
- comptable.put(component,constraints);
- }
- return constraints;
- }
-
- /**
- * Removes the specified component from the layout.
- *
- * @param component The component to be removed
- */
- public void removeLayoutComponent(Component component)
- {
- comptable.remove(component);
- }
-
- /**
- * Returns the alignment along the X axis. This specifies how
- * the component would like to be aligned relative to other
- * components. The value should be a number between 0 and 1
- * where 0 represents alignment along the origin, 1 is aligned
- * the furthest away from the origin, 0.5 is centered, etc.
- *
- * @param container The container for which the alignment should be returned
- * @return {@code java.awt.Component.CENTER_ALIGNMENT}
- */
- public float getLayoutAlignmentX(Container container)
- {
- return CENTER_ALIGNMENT;
- }
-
- /**
- * Returns the alignment along the Y axis. This specifies how
- * the component would like to be aligned relative to other
- * components. The value should be a number between 0 and 1
- * where 0 represents alignment along the origin, 1 is aligned
- * the furthest away from the origin, 0.5 is centered, etc.
- *
- * @param container The container for which the alignment should be returned
- * @return {@code java.awt.Component.CENTER_ALIGNMENT}
- */
- public float getLayoutAlignmentY(Container container)
- {
- return CENTER_ALIGNMENT;
- }
-
- /**
- * Calculates the minimum size dimensions for the specified
- * container, given the components it contains.
- *
- * @param parent The component to be laid out
- * @return The minimum size for the container
- * @see #maximumLayoutSize
- * @see #preferredLayoutSize
- */
- public Dimension minimumLayoutSize(Container parent)
- {
- synchronized (parent.getTreeLock())
- {
- List<List<ExtendedGridLayoutConstraints>> gridRows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
- Set<ExtendedGridLayoutConstraints> colspans = new HashSet<ExtendedGridLayoutConstraints>();
- Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();
- Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);
- return getSize(parent,LayoutSize.MINIMUM,false,gridSize,gridRows,colspans,rowspans,new int[0][0]);
- }
- }
-
- /**
- * Calculates the preferred size dimensions for the specified
- * container, given the components it contains.
- *
- * @param parent The container to be laid out
- * @return The preferred size for the container
- * @see #maximumLayoutSize
- * @see #minimumLayoutSize
- */
- public Dimension preferredLayoutSize(Container parent)
- {
- synchronized (parent.getTreeLock())
- {
- List<List<ExtendedGridLayoutConstraints>> gridRows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
- Set<ExtendedGridLayoutConstraints> colspans = new HashSet<ExtendedGridLayoutConstraints>();
- Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();
- Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);
- return getSize(parent,LayoutSize.PREFERRED,false,gridSize,gridRows,colspans,rowspans,new int[0][0]);
- }
- }
-
- /**
- * Calculates the maximum size dimensions for the specified
- * container, given the components it contains.
- *
- * @param parent The container to be laid out
- * @return The maximum size for the container
- * @see #minimumLayoutSize
- * @see #preferredLayoutSize
- */
- public Dimension maximumLayoutSize(Container parent)
- {
- synchronized (parent.getTreeLock())
- {
- List<List<ExtendedGridLayoutConstraints>> gridRows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
- Set<ExtendedGridLayoutConstraints> colspans = new HashSet<ExtendedGridLayoutConstraints>();
- Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();
- Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);
- return getSize(parent,LayoutSize.MAXIMUM,false,gridSize,gridRows,colspans,rowspans,new int[0][0]);
- }
- }
-
- /**
- * Invalidates the layout, indicating that if the layout manager
- * has cached information it should be discarded.
- *
- * @param container The container for which the cached information should be discarded
- */
- public void invalidateLayout(Container container)
- {
- }
-
- /**
- * Lays out the specified container.
- *
- * @param parent The container to be laid out
- */
- public void layoutContainer(Container parent)
- {
- synchronized (parent.getTreeLock())
- {
- // Pass 1: build the grid
- List<List<ExtendedGridLayoutConstraints>> gridRows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
- Set<ExtendedGridLayoutConstraints> colspans = new HashSet<ExtendedGridLayoutConstraints>();
- Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();
- Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);
-
- // Pass 2: compute minimum, preferred and maximum column widths / row heights
- int[][] layoutSizes = new int[6][];
- Dimension preferredSize = getSize(parent,LayoutSize.PREFERRED,true,gridSize,gridRows,colspans,rowspans,layoutSizes);
- int[] minimumColWidths = layoutSizes[0];
- int[] minimumRowHeights = layoutSizes[1];
- int[] preferredColWidths = layoutSizes[2];
- int[] preferredRowHeights = layoutSizes[3];
- int[] maximumColWidths = layoutSizes[4];
- int[] maximumRowHeights = layoutSizes[5];
-
- // Pass 3: redistribute free space
- Dimension parentSize = parent.getSize();
- Insets insets = parent.getInsets();
- int freeWidth = parentSize.width
- - insets.left - insets.right
- - (gridSize.width - 1) * hgap
- - distanceToBorders.left - distanceToBorders.right;
- int freeHeight = parentSize.height
- - insets.top - insets.bottom
- - (gridSize.height - 1) * vgap
- - distanceToBorders.top - distanceToBorders.bottom;
- redistributeSpace(preferredSize.width,
- freeWidth,
- 0,gridSize.width,
- preferredColWidths,
- minimumColWidths,
- maximumColWidths);
- redistributeSpace(preferredSize.height,
- freeHeight,
- 0,gridSize.height,
- preferredRowHeights,
- minimumRowHeights,
- maximumRowHeights);
-
- // Pass 4: layout components
- for (int row=0, y=insets.top+distanceToBorders.top ; row<gridSize.height ; y+=preferredRowHeights[row]+vgap, row++)
- {
- List<ExtendedGridLayoutConstraints> gridRow = gridRows.get(row);
- for (int col=0, x=insets.left+distanceToBorders.left ; col<gridSize.width; x+=preferredColWidths[col]+hgap, col++)
- {
- ExtendedGridLayoutConstraints cell = gridRow.get(col);
- if ((null != cell) && (null != cell.getComponent()) && !cell.isPlaceholder())
- {
- Component component = cell.getComponent();
- Dimension maxSize = component.getMaximumSize();
- int fromCol = cell.getCol();
- int colspan = cell.getEffectiveColspan();
- int toCol = fromCol + colspan;
- int width = 0;
- for (int col2=fromCol ; col2<toCol ; col2++)
- {
- width += preferredColWidths[col2];
- }
- width += (colspan - 1) * hgap;
- int fromRow = cell.getRow();
- int rowspan = cell.getEffectiveRowspan();
- int toRow = fromRow + rowspan;
- int height = 0;
- for (int row2=fromRow ; row2<toRow ; row2++)
- {
- height += preferredRowHeights[row2];
- }
- height += (rowspan - 1) * vgap;
- int xCorrection = 0;
- int yCorrection = 0;
- if (width > maxSize.width)
- {
- xCorrection = (int)((width - maxSize.width) * component.getAlignmentX());
- width = maxSize.width;
- }
- if (height > maxSize.height)
- {
- yCorrection = (int)((height-maxSize.height) * component.getAlignmentY());
- height = maxSize.height;
- }
-
- component.setBounds(x + xCorrection, y + yCorrection, width, height);
- }
- }
- }
- }
- }
-
- /**
- * Redistributs free space (positive or negative) to all available
- * columns or rows while taking elements maximum and minimum sizes into
- * account if possible.
- *
- * @param totalSize The cumulated preferred sizes of the components
- * @param freeSize The available space for displaying components
- * without any gaps between components or between
- * the grid and the borders of the parent container
- * @param start The start in the arrays of rows or columns inclusive
- * @param stop The stop in the arrays of rows or columns exclusive
- * @param preferredElementSizes The preferredSizes of the rows or columns.
- * After invocation of this method, this array
- * holds the sizes that should be used
- * @param minimumElementSizes The minimumSizes of the rows or columns
- * @param maximumElementSizes The maximumSizes of the rows or columns
- */
- private void redistributeSpace(int totalSize, int freeSize,
- int start, int stop,
- int[] preferredElementSizes,
- int[] minimumElementSizes,
- int[] maximumElementSizes)
- {
- if (totalSize != freeSize)
- {
- boolean grow = totalSize < freeSize;
- // calculate the size that is available for redistribution
- freeSize = (freeSize - totalSize) * (grow ? 1 : -1);
- while (freeSize > 0)
- {
- // calculate the amount of elements that can be resized without violating
- // the minimum and maximum sizes and their current cumulated size
- int modifyableAmount = 0;
- long modifySize = 0;
- for (int i=start ; i<stop ; i++)
- {
- if ((grow && (preferredElementSizes[i] < maximumElementSizes[i])) ||
- (!grow && (preferredElementSizes[i] > minimumElementSizes[i])))
- {
- modifyableAmount++;
- modifySize += preferredElementSizes[i];
- }
- }
- boolean checkBounds = true;
- // if all elements are at their minimum or maximum size, resize all elements
- if (0 == modifyableAmount)
- {
- for (int i=start ; i<stop ; i++)
- {
- modifySize += preferredElementSizes[i];
- }
- checkBounds = false;
- modifyableAmount = stop - start;
- }
- // to prevent an endless loop if the container gets resized to a very small amount
- if (modifySize == 0)
- {
- break;
- }
- // resize the elements
- if (freeSize < modifyableAmount)
- {
- for (int i=start ; i<stop ; i++)
- {
- if ((freeSize != 0) &&
- (!checkBounds ||
- (checkBounds &&
- (grow && (preferredElementSizes[i] < maximumElementSizes[i])) ||
- (!grow && (preferredElementSizes[i] > minimumElementSizes[i])))))
- {
- preferredElementSizes[i] += (grow ? 1 : -1);
- if (0 > preferredElementSizes[i])
- {
- preferredElementSizes[i] = 0;
- }
- freeSize--;
- }
- }
- }
- else
- {
- long modifySizeAddition = 0;
- double factor = (double)(freeSize + modifySize) / (double)modifySize;
- for (int i=start ; i<stop ; i++)
- {
- long modifyableSize = (checkBounds ? (grow ? maximumElementSizes[i] - preferredElementSizes[i] : preferredElementSizes[i] - minimumElementSizes[i]) : Integer.MAX_VALUE - preferredElementSizes[i]);
- long elementModifySize = Math.abs(Math.round((factor * preferredElementSizes[i]) - preferredElementSizes[i]));
- if (elementModifySize <= modifyableSize)
- {
- preferredElementSizes[i] += (grow ? elementModifySize : -elementModifySize);
- modifySizeAddition += (grow ? elementModifySize : -elementModifySize);
- freeSize -= elementModifySize;
- }
- else
- {
- preferredElementSizes[i] += (grow ? modifyableSize : -modifyableSize);
- modifySizeAddition += (grow ? modifyableSize : -modifyableSize);
- freeSize -= modifyableSize;
- }
- if (0 > preferredElementSizes[i])
- {
- preferredElementSizes[i] = 0;
- }
- }
- modifySize += modifySizeAddition;
- }
- }
- }
- }
-
- /**
- * Calculates the minimum, preferred or maximum size dimensions
- * for the specified container, given the components it contains.
- *
- * @param parent The container to be laid out
- * @param layoutSize if {@code LayoutSize.MINIMUM} compute minimum layout size,
- * if {@code LayoutSize.PREFERRED} compute preferred layout size,
- * if {@code LayoutSize.MAXIMUM} compute maximum layout size,
- * if {@code fillRawSizes} is {@code true}, the layout size is computed
- * without applying gaps between components or between
- * the grid and the borders of the parent container
- * @param fillRawSizes Whether to fill the resultArrays with the raw
- * row heights and column widths and whether to apply
- * gaps between components or between
- * the grid and the borders of the parent container
- * when computing the layout size
- * @param gridSize The amount of rows and columns in the grid
- * @param gridRows The grid holding the constraints for the components
- * @param colspans In this {@code Set} the constraints which are part
- * of a colspan are stored
- * @param rowspans In this {@code Set} the constraints which are part
- * of a rowspan are stored
- * @param resultArrays If {@code fillRawSizes} is {@code true}, the first six arrays
- * get filled with the raw row heights and column widths.
- * resultArrays[0] = resultMinimumColWidths;
- * resultArrays[1] = resultMinimumRowHeights;
- * resultArrays[2] = resultPreferredColWidths;
- * resultArrays[3] = resultPreferredRowHeights;
- * resultArrays[4] = resultMaximumColWidths;
- * resultArrays[5] = resultMaximumRowHeights;
- * @return The minimum, preferred or maximum size dimensions for the specified container
- * @throws IllegalArgumentException If {@code fillRawSizes == true} and {@code resultArrays.length < 6}
- */
- private Dimension getSize(Container parent, LayoutSize layoutSize, boolean fillRawSizes,
- Dimension gridSize, List<List<ExtendedGridLayoutConstraints>> gridRows,
- Set<ExtendedGridLayoutConstraints> colspans,
- Set<ExtendedGridLayoutConstraints> rowspans,
- int[][] resultArrays)
- {
- if (fillRawSizes && (resultArrays.length < 6))
- {
- throw new IllegalArgumentException("If fillRawSizes is true, resultArrays.length must be >= 6 (" + resultArrays.length + ')');
- }
- int[] minimumColWidths = new int[gridSize.width];
- int[] minimumRowHeights = new int[gridSize.height];
- int[] preferredColWidths = new int[gridSize.width];
- int[] preferredRowHeights = new int[gridSize.height];
- int[] maximumColWidths = new int[gridSize.width];
- int[] maximumRowHeights = new int[gridSize.height];
- Arrays.fill(minimumColWidths,0);
- Arrays.fill(minimumRowHeights,0);
- Arrays.fill(preferredColWidths,0);
- Arrays.fill(preferredRowHeights,0);
- Arrays.fill(maximumColWidths,0);
- Arrays.fill(maximumRowHeights,0);
-
- // get the maximum of the minimum sizes,
- // the maximum of the preferred sizes and
- // the minimum of the maximum sizes
- // of all rows and columns, not taking
- // rowspans and colspans into account
- for (int row=0 ; row<gridSize.height ; row++)
- {
- List<ExtendedGridLayoutConstraints> gridRow = gridRows.get(row);
- for (int col=0 ; col<gridSize.width ; col++)
- {
- ExtendedGridLayoutConstraints cell = gridRow.get(col);
- if ((null != cell) && (null != cell.getComponent()))
- {
- Component component = cell.getComponent();
- Dimension minimumSize = component.getMinimumSize();
- Dimension preferredSize = component.getPreferredSize();
- Dimension maximumSize = component.getMaximumSize();
- if (!colspans.contains(cell))
- {
- minimumColWidths[col] = Math.max(minimumColWidths[col],minimumSize.width);
- preferredColWidths[col] = Math.max(preferredColWidths[col],preferredSize.width);
- maximumColWidths[col] = Math.max(maximumColWidths[col],maximumSize.width);
- }
- if (!rowspans.contains(cell))
- {
- minimumRowHeights[row] = Math.max(minimumRowHeights[row],minimumSize.height);
- preferredRowHeights[row] = Math.max(preferredRowHeights[row],preferredSize.height);
- maximumRowHeights[row] = Math.max(maximumRowHeights[row],maximumSize.height);
- }
- }
- }
- }
-
- // correct cases where
- // minimumColWidths[col] <= preferredColWidths[col] <= maximumColWidths[col]
- // is not true by clipping to the minimumColWidths and maximumColWidths
- for (int col=0 ; col<gridSize.width ; col++)
- {
- if (minimumColWidths[col] >= maximumColWidths[col])
- {
- maximumColWidths[col] = minimumColWidths[col];
- preferredColWidths[col] = minimumColWidths[col];
- }
- else if (preferredColWidths[col] < minimumColWidths[col])
- {
- preferredColWidths[col] = minimumColWidths[col];
- }
- else if (preferredColWidths[col] > maximumColWidths[col])
- {
- preferredColWidths[col] = maximumColWidths[col];
- }
- }
-
- // plug in the colspans and correct the minimum, preferred and
- // maximum column widths the colspans are part of
- for (ExtendedGridLayoutConstraints cell : colspans)
- {
- int fromCol = cell.getCol();
- int colspan = cell.getEffectiveColspan();
- int toCol = fromCol + colspan;
- int currentMinimumColWidth = 0;
- int currentPreferredColWidth = 0;
- int currentMaximumColWidth = 0;
- for (int col=fromCol ; col<toCol ; col++)
- {
- int minimumColWidth = minimumColWidths[col];
- if ((Integer.MAX_VALUE-minimumColWidth) < currentMinimumColWidth)
- {
- currentMinimumColWidth = Integer.MAX_VALUE;
- }
- else
- {
- currentMinimumColWidth += minimumColWidth;
- }
- int preferredColWidth = preferredColWidths[col];
- if ((Integer.MAX_VALUE-preferredColWidth) < currentPreferredColWidth)
- {
- currentPreferredColWidth = Integer.MAX_VALUE;
- }
- else
- {
- currentPreferredColWidth += preferredColWidth;
- }
- int maximumColWidth = maximumColWidths[col];
- if ((Integer.MAX_VALUE-maximumColWidth) < currentMaximumColWidth)
- {
- currentMaximumColWidth = Integer.MAX_VALUE;
- }
- else
- {
- currentMaximumColWidth += maximumColWidth;
- }
- }
- Component component = cell.getComponent();
- int wantedMaximumColWidth = component.getMaximumSize().width - ((colspan - 1) * hgap);
- if (currentMaximumColWidth < wantedMaximumColWidth)
- {
- redistributeSpace(currentMaximumColWidth,
- wantedMaximumColWidth,
- fromCol,toCol,
- maximumColWidths,
- maximumColWidths,
- maximumColWidths);
- }
- int wantedMinimumColWidth = component.getMinimumSize().width - ((colspan - 1) * hgap);
- if (currentMinimumColWidth < wantedMinimumColWidth)
- {
- redistributeSpace(currentMinimumColWidth,
- wantedMinimumColWidth,
- fromCol,toCol,
- minimumColWidths,
- minimumColWidths,
- maximumColWidths);
- }
- int wantedPreferredColWidth = component.getPreferredSize().width - ((colspan - 1) * hgap);
- if (currentPreferredColWidth < wantedPreferredColWidth)
- {
- redistributeSpace(currentPreferredColWidth,
- wantedPreferredColWidth,
- fromCol,toCol,
- preferredColWidths,
- minimumColWidths,
- maximumColWidths);
- }
- }
-
- // correct cases where
- // minimumColWidths[col] <= preferredColWidths[col] <= maximumColWidths[col]
- // is not true by clipping to the minimumColWidths and maximumColWidths
- for (int col=0 ; col<gridSize.width ; col++)
- {
- if (minimumColWidths[col] >= maximumColWidths[col])
- {
- maximumColWidths[col] = minimumColWidths[col];
- preferredColWidths[col] = minimumColWidths[col];
- }
- else if (preferredColWidths[col] < minimumColWidths[col])
- {
- preferredColWidths[col] = minimumColWidths[col];
- }
- else if (preferredColWidths[col] > maximumColWidths[col])
- {
- preferredColWidths[col] = maximumColWidths[col];
- }
- }
-
- // correct cases where
- // minimumRowHeights[row] <= preferredRowHeights[row] <= maximumRowHeights[row]
- // is not true by clipping to the minimumRowHeights and maximumRowHeights
- for (int row=0 ; row<gridSize.height ; row++)
- {
- if (minimumRowHeights[row] >= maximumRowHeights[row])
- {
- maximumRowHeights[row] = minimumRowHeights[row];
- preferredRowHeights[row] = minimumRowHeights[row];
- }
- else if (preferredRowHeights[row] < minimumRowHeights[row])
- {
- preferredRowHeights[row] = minimumRowHeights[row];
- }
- else if (preferredRowHeights[row] > maximumRowHeights[row])
- {
- preferredRowHeights[row] = maximumRowHeights[row];
- }
- }
-
- // plug in the rowspans and correct the minimum, preferred and
- // maximum row heights the rowspans are part of
- for (ExtendedGridLayoutConstraints cell : rowspans)
- {
- int fromRow = cell.getRow();
- int rowspan = cell.getEffectiveRowspan();
- int toRow = fromRow + rowspan;
- int currentMinimumRowHeight = 0;
- int currentPreferredRowHeight = 0;
- int currentMaximumRowHeight = 0;
- for (int row=fromRow ; row<toRow ; row++)
- {
- int minimumRowHeight = minimumRowHeights[row];
- if ((Integer.MAX_VALUE-minimumRowHeight) < currentMinimumRowHeight)
- {
- currentMinimumRowHeight = Integer.MAX_VALUE;
- }
- else
- {
- currentMinimumRowHeight += minimumRowHeight;
- }
- int preferredRowHeight = preferredRowHeights[row];
- if ((Integer.MAX_VALUE-preferredRowHeight) < currentPreferredRowHeight)
- {
- currentPreferredRowHeight = Integer.MAX_VALUE;
- }
- else
- {
- currentPreferredRowHeight += preferredRowHeight;
- }
- int maximumRowHeight = maximumRowHeights[row];
- if ((Integer.MAX_VALUE-maximumRowHeight) < currentMaximumRowHeight)
- {
- currentMaximumRowHeight = Integer.MAX_VALUE;
- }
- else
- {
- currentMaximumRowHeight += maximumRowHeight;
- }
- }
- Component component = cell.getComponent();
- int wantedMaximumRowHeight = component.getMaximumSize().height - ((rowspan - 1) * vgap);
- if (currentMaximumRowHeight < wantedMaximumRowHeight)
- {
- redistributeSpace(currentMaximumRowHeight,
- wantedMaximumRowHeight,
- fromRow,toRow,
- maximumRowHeights,
- maximumRowHeights,
- maximumRowHeights);
- }
- int wantedMinimumRowHeight = component.getMinimumSize().height - ((rowspan - 1) * vgap);
- if (currentMinimumRowHeight < wantedMinimumRowHeight)
- {
- redistributeSpace(currentMinimumRowHeight,
- wantedMinimumRowHeight,
- fromRow,toRow,
- minimumRowHeights,
- minimumRowHeights,
- maximumRowHeights);
- }
- int wantedPreferredRowHeight = component.getPreferredSize().height - ((rowspan - 1) * vgap);
- if (currentPreferredRowHeight < wantedPreferredRowHeight)
- {
- redistributeSpace(currentPreferredRowHeight,
- wantedPreferredRowHeight,
- fromRow,toRow,
- preferredRowHeights,
- minimumRowHeights,
- maximumRowHeights);
- }
- }
-
- // correct cases where
- // minimumRowHeights[row] <= preferredRowHeights[row] <= maximumRowHeights[row]
- // is not true by clipping to the minimumRowHeights and maximumRowHeights
- for (int row=0 ; row<gridSize.height ; row++)
- {
- if (minimumRowHeights[row] >= maximumRowHeights[row])
- {
- maximumRowHeights[row] = minimumRowHeights[row];
- preferredRowHeights[row] = minimumRowHeights[row];
- }
- else if (preferredRowHeights[row] < minimumRowHeights[row])
- {
- preferredRowHeights[row] = minimumRowHeights[row];
- }
- else if (preferredRowHeights[row] > maximumRowHeights[row])
- {
- preferredRowHeights[row] = maximumRowHeights[row];
- }
- }
-
- // copies the computed sizes to the result arrays
- if (fillRawSizes)
- {
- resultArrays[0] = minimumColWidths;
- resultArrays[1] = minimumRowHeights;
- resultArrays[2] = preferredColWidths;
- resultArrays[3] = preferredRowHeights;
- resultArrays[4] = maximumColWidths;
- resultArrays[5] = maximumRowHeights;
- }
-
- // sums up the sizes for return value
- int[] colWidths;
- int[] rowHeights;
- switch (layoutSize)
- {
- case MINIMUM:
- colWidths = minimumColWidths;
- rowHeights = minimumRowHeights;
- break;
-
- case PREFERRED:
- colWidths = preferredColWidths;
- rowHeights = preferredRowHeights;
- break;
-
- case MAXIMUM:
- colWidths = maximumColWidths;
- rowHeights = maximumRowHeights;
- break;
-
- default:
- throw new InternalError("Missing case branch for LayoutSize: " + layoutSize);
- }
- long totalWidth = 0;
- long totalHeight = 0;
- for (int width : colWidths)
- {
- totalWidth += width;
- }
- for (int height : rowHeights)
- {
- totalHeight += height;
- }
-
- // add space between components or between
- // componetns and the borders of the parent container
- if (!fillRawSizes)
- {
- Insets insets = parent.getInsets();
- totalWidth += insets.left + insets.right + ((gridSize.width - 1) * hgap) + distanceToBorders.left + distanceToBorders.right;
- totalHeight += insets.top + insets.bottom + ((gridSize.height - 1) * vgap) + distanceToBorders.top + distanceToBorders.bottom;
- }
-
- // clip the size to Integer.MAX_VALUE if too big
- if (totalWidth > Integer.MAX_VALUE)
- {
- totalWidth = Integer.MAX_VALUE;
- }
- if (totalHeight > Integer.MAX_VALUE)
- {
- totalHeight = Integer.MAX_VALUE;
- }
-
- return new Dimension((int)totalWidth,(int)totalHeight);
- }
-
- /**
- * Builds up the grid for the specified container,
- * given the components it contains.
- *
- * @param parent The container to be laid out
- * @param gridRows In this {@code List<List>} the grid gets stored
- * @param colspans In this {@code Set} the constraints which are part
- * of a colspan get stored
- * @param rowspans In this {@code Set} the constraints which are part
- * of a rowspan get stored
- * @return The amount of rows and columns in the grid
- */
- private Dimension buildGrid(Container parent, List<List<ExtendedGridLayoutConstraints>> gridRows,
- Set<ExtendedGridLayoutConstraints> colspans, Set<ExtendedGridLayoutConstraints> rowspans)
- {
- // put the parent's components in source rows
- List<List<ExtendedGridLayoutConstraints>> rows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
- Component[] components = parent.getComponents();
- for (Component component : components)
- {
- if (component.isVisible())
- {
- ExtendedGridLayoutConstraints constraints = lookupConstraints(component).getWorkCopy();
- int rowNumber = constraints.getRow();
- for (int i=rowNumber, c=rows.size() ; i>=c ; i--)
- {
- rows.add(new ArrayList<ExtendedGridLayoutConstraints>());
- }
- List<ExtendedGridLayoutConstraints> row = rows.get(rowNumber);
- row.add(constraints);
- }
- }
-
- // initialize the rowIterators, gridRowIterators and gridRows
- List<Iterator<ExtendedGridLayoutConstraints>> rowIterators = new ArrayList<Iterator<ExtendedGridLayoutConstraints>>();
- List<ListIterator<ExtendedGridLayoutConstraints>> gridRowIterators = new ArrayList<ListIterator<ExtendedGridLayoutConstraints>>();
- boolean haveNext = false;
- for (List<ExtendedGridLayoutConstraints> row : rows)
- {
- Iterator<ExtendedGridLayoutConstraints> rowIterator = row.iterator();
- rowIterators.add(rowIterator);
- if (rowIterator.hasNext())
- {
- haveNext = true;
- }
- List<ExtendedGridLayoutConstraints> gridRow = new ArrayList<ExtendedGridLayoutConstraints>();
- gridRows.add(gridRow);
- gridRowIterators.add(gridRow.listIterator());
- }
-
- // build the grid
- int col = -1;
- while (haveNext)
- {
- col++;
- haveNext = false;
- for (int row=0, c=gridRows.size() ; row<c ; row++)
- {
- Iterator<ExtendedGridLayoutConstraints> rowIterator = rowIterators.get(row);
- ListIterator<ExtendedGridLayoutConstraints> gridRowIterator = gridRowIterators.get(row);
-
- // look for a rowspan in the previous row
- if (row > 0)
- {
- ExtendedGridLayoutConstraints rowspanSource = gridRows.get(row-1).get(col);
- if (null != rowspanSource)
- {
- ExtendedGridLayoutConstraints rowspanPlaceholder = rowspanSource.getRowspanPlaceholder(true);
- if (null != rowspanPlaceholder)
- {
- rowspans.add(rowspanSource);
- gridRowIterator.add(rowspanPlaceholder);
- if (null != rowspanPlaceholder.getColspanPlaceholder(false))
- {
- switch (rowspanPlaceholder.getColspan())
- {
- case REMAINDER:
- break;
-
- default:
- haveNext = true;
- }
- }
- else if (rowIterator.hasNext())
- {
- haveNext = true;
- }
- continue;
- }
- }
- }
-
- // look for a colspan in the previous column
- if (gridRowIterator.hasPrevious())
- {
- ExtendedGridLayoutConstraints colspanSource = gridRowIterator.previous();
- gridRowIterator.next();
- if (null != colspanSource)
- {
- ExtendedGridLayoutConstraints colspanPlaceholder = colspanSource.getColspanPlaceholder(true);
- if (null != colspanPlaceholder)
- {
- colspans.add(colspanSource);
- gridRowIterator.add(colspanPlaceholder);
- if (null != colspanPlaceholder.getColspanPlaceholder(false))
- {
- switch (colspanPlaceholder.getColspan())
- {
- case REMAINDER:
- break;
-
- default:
- haveNext = true;
- }
- }
- else if (rowIterator.hasNext())
- {
- haveNext = true;
- }
- continue;
- }
- }
- }
-
- // add a new element or null
- if (rowIterator.hasNext())
- {
- ExtendedGridLayoutConstraints newConstraints = rowIterator.next();
- newConstraints.setCol(col);
- gridRowIterator.add(newConstraints);
- if (null != newConstraints.getColspanPlaceholder(false))
- {
- switch (newConstraints.getColspan())
- {
- case REMAINDER:
- break;
-
- default:
- haveNext = true;
- }
- }
- else if (rowIterator.hasNext())
- {
- haveNext = true;
- }
- }
- else
- {
- gridRowIterator.add(null);
- }
- }
- }
-
- // check the last gridRow for rowspans and probably add rows for these
- haveNext = false;
- int gridRowsSize = gridRows.size();
- if (gridRowsSize > 0)
- {
- ListIterator<ExtendedGridLayoutConstraints> gridRowIterator = gridRows.get(gridRows.size()-1).listIterator();
- while (gridRowIterator.hasNext())
- {
- ExtendedGridLayoutConstraints cell = gridRowIterator.next();
- if ((null != cell) &&
- ((REMAINDER != cell.getRowspan()) &&
- (null != cell.getRowspanPlaceholder(false))))
- {
- haveNext = true;
- break;
- }
- }
- while (haveNext)
- {
- haveNext = false;
- gridRowIterator = gridRows.get(gridRows.size()-1).listIterator();
- List<ExtendedGridLayoutConstraints> gridRow = new ArrayList<ExtendedGridLayoutConstraints>();
- gridRows.add(gridRow);
- ListIterator<ExtendedGridLayoutConstraints> newGridRowIterator = gridRow.listIterator();
- while (gridRowIterator.hasNext())
- {
- ExtendedGridLayoutConstraints cell = gridRowIterator.next();
- if ((null != cell) &&
- (null != cell.getRowspanPlaceholder(false)))
- {
- rowspans.add(cell);
- ExtendedGridLayoutConstraints rowspanPlaceholder = cell.getRowspanPlaceholder(true);
- newGridRowIterator.add(rowspanPlaceholder);
- }
- else
- {
- newGridRowIterator.add(null);
- }
- }
- gridRowIterator = gridRow.listIterator();
- while (gridRowIterator.hasNext())
- {
- ExtendedGridLayoutConstraints cell = gridRowIterator.next();
- if ((null != cell) &&
- ((REMAINDER != cell.getRowspan()) &&
- (null != cell.getRowspanPlaceholder(false))))
- {
- haveNext = true;
- break;
- }
- }
- }
- }
-
- return new Dimension(col+1,gridRows.size());
- }
-
- /**
- * Returns a string representation of the object. In general, the
- * {@code toString} method returns a string that
- * "textually represents" this object. The result should
- * be a concise but informative representation that is easy for a
- * person to read.
- *
- * @return a string representation of the object.
- */
- public String toString()
- {
- return getClass().getName() + "[hgap=" + hgap + ",vgap=" + vgap
- + ",distanceToBorders=" + distanceToBorders
- + ",comptable=" + comptable + "]";
- }
-}
+/*
+ * ExtendedGridLayout.java - a grid layout manager with variable cell sizes
+ * that supports colspans and rowspans
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Originally written by Björn Kautler for the jEdit project. This work has been
+ * placed into the public domain. You may use this work in any way and for any
+ * purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Insets;
+import java.awt.LayoutManager2;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Set;
+
+import static java.awt.Component.CENTER_ALIGNMENT;
+
+import static org.gjt.sp.jedit.gui.ExtendedGridLayoutConstraints.REMAINDER;
+
+/**
+ * A layout manager that places components in a rectangular grid
+ * with variable cell sizes that supports colspans and rowspans.
+ * <p>
+ * The container is divided into rectangles, and each component is placed
+ * in a rectangular space defined by its colspan and rowspan.
+ * Each row is as large as the largest component in
+ * that row, and each column is as wide as the widest component in
+ * that column. </p>
+ * <p>
+ * This behavior is similar to
+ * <a href="http://download.oracle.com/javase/6/docs/api/java/awt/GridLayout.html">{@code java.awt.GridLayout}</a>
+ * but it supports different row heights and
+ * column widths for each row/column. </p>
+ * <p>
+ * For example, the following is a Dialog that lays out ten buttons
+ * exactly the same as in the example of the JavaDoc of
+ * <a href="http://download.oracle.com/javase/6/docs/api/java/awt/GridBagLayout.html">{@code java.awt.GridBagLayout}</a>
+ * with the difference of vertical and horizontal gaps that can be configured:
+ * <hr>
+ * <blockquote><pre><font color="#000000">
+ * <font color="#000000"> 1:</font><font color="#009966"><strong>import</strong></font> java.awt.Button;
+ * <font color="#000000"> 2:</font><font color="#009966"><strong>import</strong></font> java.awt.Dimension;
+ * <font color="#000000"> 3:</font>
+ * <font color="#000000"> 4:</font><font color="#009966"><strong>import</strong></font> javax.swing.JDialog;
+ * <font color="#990066"> 5:</font>
+ * <font color="#000000"> 6:</font><font color="#009966"><strong>import</strong></font> org.gjt.sp.jedit.gui.ExtendedGridLayout;
+ * <font color="#000000"> 7:</font><font color="#009966"><strong>import</strong></font> org.gjt.sp.jedit.gui.ExtendedGridLayoutConstraints;
+ * <font color="#000000"> 8:</font>
+ * <font color="#000000"> 9:</font><font color="#009966"><strong>import</strong></font> <font color="#006699"><strong>static</strong></font> org.gjt.sp.jedit.gui.ExtendedGridLayoutConstraints.REMAINDER;
+ * <font color="#990066"> 10:</font>
+ * <font color="#000000"> 11:</font><font color="#006699"><strong>public</strong></font> <font color="#0099ff"><strong>class</strong></font> ExampleDialog <font color="#006699"><strong>extends</strong></font> JDialog <font color="#000000"><strong>{</strong></font>
+ * <font color="#000000"> 12:</font> <font color="#006699"><strong>public</strong></font> <font color="#9966ff">ExampleDialog</font>() <font color="#000000"><strong>{</strong></font>
+ * <font color="#000000"> 13:</font> <font color="#cc00cc">super</font>(<font color="#cc00cc">null</font>,<font color="#ff00cc">"</font><font color="#ff00cc">Example</font><font color="#ff00cc"> </font><font color="#ff00cc">Dialog</font><font color="#ff00cc">"</font>,<font color="#cc00cc">true</font>);
+ * <font color="#000000"> 14:</font> <font color="#9966ff">setLayout</font>(<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayout</font>(<font color="#ff0000">5</font>,<font color="#ff0000">5</font>,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">Insets</font>(<font color="#ff0000">5</font>,<font color="#ff0000">5</font>,<font color="#ff0000">5</font>,<font color="#ff0000">5</font>)));
+ * <font color="#990066"> 15:</font>
+ * <font color="#000000"> 16:</font> <font color="#9966ff">add</font>(<font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button1</font><font color="#ff00cc">"</font>));
+ * <font color="#000000"> 17:</font> <font color="#9966ff">add</font>(<font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button2</font><font color="#ff00cc">"</font>));
+ * <font color="#000000"> 18:</font> <font color="#9966ff">add</font>(<font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button3</font><font color="#ff00cc">"</font>));
+ * <font color="#000000"> 19:</font> <font color="#9966ff">add</font>(<font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button4</font><font color="#ff00cc">"</font>));
+ * <font color="#990066"> 20:</font> Button button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button5</font><font color="#ff00cc">"</font>);
+ * <font color="#000000"> 21:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">1</font>,REMAINDER,<font color="#ff0000">1</font>,button));
+ * <font color="#000000"> 22:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button6</font><font color="#ff00cc">"</font>);
+ * <font color="#000000"> 23:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">2</font>,<font color="#ff0000">3</font>,<font color="#ff0000">1</font>,button));
+ * <font color="#000000"> 24:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button7</font><font color="#ff00cc">"</font>);
+ * <font color="#990066"> 25:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">2</font>,button));
+ * <font color="#000000"> 26:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button8</font><font color="#ff00cc">"</font>);
+ * <font color="#000000"> 27:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">3</font>,<font color="#ff0000">1</font>,<font color="#ff0000">2</font>,button));
+ * <font color="#000000"> 28:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button9</font><font color="#ff00cc">"</font>);
+ * <font color="#000000"> 29:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">3</font>,<font color="#ff0000">3</font>,<font color="#ff0000">1</font>,button));
+ * <font color="#990066"> 30:</font> button <font color="#000000"><strong>=</strong></font> <font color="#9966ff">makeButton</font>(<font color="#ff00cc">"</font><font color="#ff00cc">Button10</font><font color="#ff00cc">"</font>);
+ * <font color="#000000"> 31:</font> <font color="#9966ff">add</font>(button,<font color="#006699"><strong>new</strong></font> <font color="#9966ff">ExtendedGridLayoutConstraints</font>(<font color="#ff0000">4</font>,REMAINDER,<font color="#ff0000">1</font>,button));
+ * <font color="#000000"> 32:</font>
+ * <font color="#000000"> 33:</font> <font color="#9966ff">pack</font>();
+ * <font color="#000000"> 34:</font> <font color="#9966ff">setLocationRelativeTo</font>(<font color="#cc00cc">null</font>);
+ * <font color="#990066"> 35:</font> <font color="#9966ff">setVisible</font>(<font color="#cc00cc">true</font>);
+ * <font color="#000000"> 36:</font> <font color="#000000"><strong>}</strong></font>
+ * <font color="#000000"> 37:</font>
+ * <font color="#000000"> 38:</font> <font color="#006699"><strong>private</strong></font> Button <font color="#9966ff">makeButton</font>(String name) <font color="#000000"><strong>{</strong></font>
+ * <font color="#000000"> 39:</font> Button button <font color="#000000"><strong>=</strong></font> <font color="#006699"><strong>new</strong></font> <font color="#9966ff">Button</font>(name);
+ * <font color="#990066"> 40:</font> button.<font color="#9966ff">setMaximumSize</font>(<font color="#006699"><strong>new</strong></font> <font color="#9966ff">Dimension</font>(Integer.MAX_VALUE,Integer.MAX_VALUE));
+ * <font color="#000000"> 41:</font> <font color="#006699"><strong>return</strong></font> button;
+ * <font color="#000000"> 42:</font> <font color="#000000"><strong>}</strong></font>
+ * <font color="#000000"> 43:</font><font color="#000000"><strong>}</strong></font>
+ * </font></pre></blockquote>
+ * <hr>
+ * If you use {@code REMAINDER} as colspan or rowspan then a component takes
+ * up the remaining space in that column or row. Any additional components in
+ * a row are ignored and not displayed. Additional components in a column are
+ * moved rightside. If a rowspan hits a colspan, the colspan ends and the
+ * rowspan takes precedence.
+ * <p>
+ * Components for which {@code isVisible() == false} are ignored. Because
+ * of this, components can be replaced "in-place" by adding two components next to
+ * each other, with different {@code isVisible()} values, and toggling the
+ * {@code setVisible()} values of both when we wish to swap the currently
+ * visible component with the one that is hidden. </p>
+ *
+ * <p>
+ * If you want to reserve free space in a row inbetween components,
+ * add a <a href="http://download.oracle.com/javase/6/docs/api/javax/swing/Box.Filler.html">{@code javax.swing.Box.Filler}</a>
+ * to the layout if the free space is in the middle of a row,
+ * or just don't add components if the free space
+ * should be at the end of a row.</p>
+ * <p>
+ * If a row is taller, or a column is wider than the {@code maximumSize} of a component,
+ * the component is resized to its maximum size and aligned according to its
+ * {@code alignmentX} and {@code alignmentY} values. </p>
+ * <p>
+ * One instance of this class can be used to layout multiple
+ * containers at the same time. </p>
+ *
+ * @author Björn "Vampire" Kautler
+ * @version 1.0
+ * @see ExtendedGridLayoutConstraints
+ * @see <a href="http://download.oracle.com/javase/6/docs/api/java/awt/Component.html"><code>java.awt.Component</code></a>
+ * @see <a href="http://download.oracle.com/javase/6/docs/api/javax/swing/Box.Filler.html"><code>javax.swing.Box.Filler</code></a>
+ */
+public class ExtendedGridLayout implements LayoutManager2
+{
+ /**
+ * This hashtable maintains the association between
+ * a component and its ExtendedGridLayoutConstraints.
+ * The Keys in {@code comptable} are the components and the
+ * values are the instances of {@code ExtendedGridLayoutConstraints}.
+ *
+ * @see ExtendedGridLayoutConstraints
+ */
+ private final Hashtable<Component,ExtendedGridLayoutConstraints> comptable;
+
+ /**
+ * Specifies the horizontal space between two columns.
+ * The default value is 0.
+ *
+ * @see #distanceToBorders
+ * @see #vgap
+ */
+ private final int hgap;
+
+ /**
+ * Specifies the vertical space between two rows.
+ * The default value is 0.
+ *
+ * @see #distanceToBorders
+ * @see #hgap
+ */
+ private final int vgap;
+
+ /**
+ * Specifies the gap between the grid and the borders of the parent container.
+ * The default value is 0 for all four borders.
+ *
+ * @see #hgap
+ * @see #vgap
+ */
+ private final Insets distanceToBorders;
+
+ /**
+ * An enum to tell the {@code getSize()} method which size is requested.
+ *
+ * @see #getSize()
+ */
+ private static enum LayoutSize { MINIMUM, PREFERRED, MAXIMUM }
+
+ /**
+ * Creates an extended grid layout manager with the specified horizontal
+ * and vertical gap, and the specified distance to the borders
+ * of the parent container.
+ *
+ * @param hgap The horizontal space between two columns ({@literal >=0})
+ * @param vgap The vertical space between two rows ({@literal >=0})
+ * @param distanceToBorders The distances to the borders of the parent container
+ * @throws IllegalArgumentException if hgap {@literal < 0}
+ * @throws IllegalArgumentException if vgap {@literal < 0}
+ */
+ public ExtendedGridLayout(int hgap, int vgap, Insets distanceToBorders)
+ {
+ if (hgap < 0)
+ {
+ throw new IllegalArgumentException("hgap must be non-negative (" + hgap + ')');
+ }
+ if (vgap < 0)
+ {
+ throw new IllegalArgumentException("vgap must be non-negative (" + vgap + ')');
+ }
+ this.hgap = hgap;
+ this.vgap = vgap;
+ this.distanceToBorders = (Insets)distanceToBorders.clone();
+ comptable = new Hashtable<Component,ExtendedGridLayoutConstraints>();
+ }
+
+ /**
+ * Creates an extended grid layout manager with zero horizontal
+ * and vertical gap, and zero distance to the borders
+ * of the parent container.
+ */
+ public ExtendedGridLayout()
+ {
+ this(0,0,new Insets(0,0,0,0));
+ }
+
+ /**
+ * If the layout manager uses a per-component string,
+ * adds the component <code>component</code> to the layout,
+ * associating it with the string specified by <code>name</code>.
+ *
+ * @param name The string to be associated with the component.
+ * Has to be {@code null}, so that default constraints are used.
+ * @param component The component to be added
+ * @throws IllegalArgumentException if {@code name} is not {@code null}
+ * @see #addLayoutComponent(java.awt.Component, java.lang.Object)
+ */
+ public void addLayoutComponent(String name, Component component)
+ {
+ addLayoutComponent(component,name);
+ }
+
+ /**
+ * Adds the specified component to the layout, using the specified
+ * constraints object.
+ *
+ * @param component The component to be added
+ * @param constraints Where/how the component is added to the layout.
+ * @throws IllegalArgumentException if {@code constraints} is not an ExtendedGridLayoutConstraints object
+ * @throws IllegalArgumentException if {@code constraints} is a placeholder
+ * @throws IllegalArgumentException if {@code constraints} is not the right one for the component
+ * @see ExtendedGridLayoutConstraints
+ */
+ public void addLayoutComponent(Component component, Object constraints)
+ {
+ if (null == constraints)
+ {
+ constraints = new ExtendedGridLayoutConstraints(component);
+ }
+ if (constraints instanceof ExtendedGridLayoutConstraints)
+ {
+ ExtendedGridLayoutConstraints eglConstraints = (ExtendedGridLayoutConstraints)constraints;
+ if (eglConstraints.isPlaceholder())
+ {
+ throw new IllegalArgumentException("constraints must not be a placeholder");
+ }
+ else if (component != eglConstraints.getComponent())
+ {
+ throw new IllegalArgumentException("constraints is not the right one for this component");
+ }
+ comptable.put(component,eglConstraints);
+ }
+ else
+ {
+ throw new IllegalArgumentException("constraints must not be an ExtendedGridLayoutConstraints object");
+ }
+ }
+
+ /**
+ * Retrieves the constraints for the specified {@code component}.
+ * If {@code component} is not in the {@code ExtendedGridLayout},
+ * a set of default {@code ExtendedGridLayoutConstraints} are returned.
+ *
+ * @param component the {@code component} to be queried
+ * @return the contraints for the specified {@code component}
+ * @throws NullPointerException if {@code component} is {@code null}
+ * @see ExtendedGridLayoutConstraints
+ */
+ private ExtendedGridLayoutConstraints lookupConstraints(Component component)
+ {
+ if (null == component)
+ {
+ throw new NullPointerException("component must not be null");
+ }
+ ExtendedGridLayoutConstraints constraints = comptable.get(component);
+ if (null == constraints)
+ {
+ constraints = new ExtendedGridLayoutConstraints(component);
+ comptable.put(component,constraints);
+ }
+ return constraints;
+ }
+
+ /**
+ * Removes the specified component from the layout.
+ *
+ * @param component The component to be removed
+ */
+ public void removeLayoutComponent(Component component)
+ {
+ comptable.remove(component);
+ }
+
+ /**
+ * Returns the alignment along the X axis. This specifies how
+ * the component would like to be aligned relative to other
+ * components. The value should be a number between 0 and 1
+ * where 0 represents alignment along the origin, 1 is aligned
+ * the furthest away from the origin, 0.5 is centered, etc.
+ *
+ * @param container The container for which the alignment should be returned
+ * @return {@code java.awt.Component.CENTER_ALIGNMENT}
+ */
+ public float getLayoutAlignmentX(Container container)
+ {
+ return CENTER_ALIGNMENT;
+ }
+
+ /**
+ * Returns the alignment along the Y axis. This specifies how
+ * the component would like to be aligned relative to other
+ * components. The value should be a number between 0 and 1
+ * where 0 represents alignment along the origin, 1 is aligned
+ * the furthest away from the origin, 0.5 is centered, etc.
+ *
+ * @param container The container for which the alignment should be returned
+ * @return {@code java.awt.Component.CENTER_ALIGNMENT}
+ */
+ public float getLayoutAlignmentY(Container container)
+ {
+ return CENTER_ALIGNMENT;
+ }
+
+ /**
+ * Calculates the minimum size dimensions for the specified
+ * container, given the components it contains.
+ *
+ * @param parent The component to be laid out
+ * @return The minimum size for the container
+ * @see #maximumLayoutSize
+ * @see #preferredLayoutSize
+ */
+ public Dimension minimumLayoutSize(Container parent)
+ {
+ synchronized (parent.getTreeLock())
+ {
+ List<List<ExtendedGridLayoutConstraints>> gridRows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
+ Set<ExtendedGridLayoutConstraints> colspans = new HashSet<ExtendedGridLayoutConstraints>();
+ Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();
+ Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);
+ return getSize(parent,LayoutSize.MINIMUM,false,gridSize,gridRows,colspans,rowspans,new int[0][0]);
+ }
+ }
+
+ /**
+ * Calculates the preferred size dimensions for the specified
+ * container, given the components it contains.
+ *
+ * @param parent The container to be laid out
+ * @return The preferred size for the container
+ * @see #maximumLayoutSize
+ * @see #minimumLayoutSize
+ */
+ public Dimension preferredLayoutSize(Container parent)
+ {
+ synchronized (parent.getTreeLock())
+ {
+ List<List<ExtendedGridLayoutConstraints>> gridRows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
+ Set<ExtendedGridLayoutConstraints> colspans = new HashSet<ExtendedGridLayoutConstraints>();
+ Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();
+ Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);
+ return getSize(parent,LayoutSize.PREFERRED,false,gridSize,gridRows,colspans,rowspans,new int[0][0]);
+ }
+ }
+
+ /**
+ * Calculates the maximum size dimensions for the specified
+ * container, given the components it contains.
+ *
+ * @param parent The container to be laid out
+ * @return The maximum size for the container
+ * @see #minimumLayoutSize
+ * @see #preferredLayoutSize
+ */
+ public Dimension maximumLayoutSize(Container parent)
+ {
+ synchronized (parent.getTreeLock())
+ {
+ List<List<ExtendedGridLayoutConstraints>> gridRows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
+ Set<ExtendedGridLayoutConstraints> colspans = new HashSet<ExtendedGridLayoutConstraints>();
+ Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();
+ Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);
+ return getSize(parent,LayoutSize.MAXIMUM,false,gridSize,gridRows,colspans,rowspans,new int[0][0]);
+ }
+ }
+
+ /**
+ * Invalidates the layout, indicating that if the layout manager
+ * has cached information it should be discarded.
+ *
+ * @param container The container for which the cached information should be discarded
+ */
+ public void invalidateLayout(Container container)
+ {
+ }
+
+ /**
+ * Lays out the specified container.
+ *
+ * @param parent The container to be laid out
+ */
+ public void layoutContainer(Container parent)
+ {
+ synchronized (parent.getTreeLock())
+ {
+ // Pass 1: build the grid
+ List<List<ExtendedGridLayoutConstraints>> gridRows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
+ Set<ExtendedGridLayoutConstraints> colspans = new HashSet<ExtendedGridLayoutConstraints>();
+ Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();
+ Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);
+
+ // Pass 2: compute minimum, preferred and maximum column widths / row heights
+ int[][] layoutSizes = new int[6][];
+ Dimension preferredSize = getSize(parent,LayoutSize.PREFERRED,true,gridSize,gridRows,colspans,rowspans,layoutSizes);
+ int[] minimumColWidths = layoutSizes[0];
+ int[] minimumRowHeights = layoutSizes[1];
+ int[] preferredColWidths = layoutSizes[2];
+ int[] preferredRowHeights = layoutSizes[3];
+ int[] maximumColWidths = layoutSizes[4];
+ int[] maximumRowHeights = layoutSizes[5];
+
+ // Pass 3: redistribute free space
+ Dimension parentSize = parent.getSize();
+ Insets insets = parent.getInsets();
+ int freeWidth = parentSize.width
+ - insets.left - insets.right
+ - (gridSize.width - 1) * hgap
+ - distanceToBorders.left - distanceToBorders.right;
+ int freeHeight = parentSize.height
+ - insets.top - insets.bottom
+ - (gridSize.height - 1) * vgap
+ - distanceToBorders.top - distanceToBorders.bottom;
+ redistributeSpace(preferredSize.width,
+ freeWidth,
+ 0,gridSize.width,
+ preferredColWidths,
+ minimumColWidths,
+ maximumColWidths);
+ redistributeSpace(preferredSize.height,
+ freeHeight,
+ 0,gridSize.height,
+ preferredRowHeights,
+ minimumRowHeights,
+ maximumRowHeights);
+
+ // Pass 4: layout components
+ for (int row=0, y=insets.top+distanceToBorders.top ; row<gridSize.height ; y+=preferredRowHeights[row]+vgap, row++)
+ {
+ List<ExtendedGridLayoutConstraints> gridRow = gridRows.get(row);
+ for (int col=0, x=insets.left+distanceToBorders.left ; col<gridSize.width; x+=preferredColWidths[col]+hgap, col++)
+ {
+ ExtendedGridLayoutConstraints cell = gridRow.get(col);
+ if ((null != cell) && (null != cell.getComponent()) && !cell.isPlaceholder())
+ {
+ Component component = cell.getComponent();
+ Dimension maxSize = component.getMaximumSize();
+ int fromCol = cell.getCol();
+ int colspan = cell.getEffectiveColspan();
+ int toCol = fromCol + colspan;
+ int width = 0;
+ for (int col2=fromCol ; col2<toCol ; col2++)
+ {
+ width += preferredColWidths[col2];
+ }
+ width += (colspan - 1) * hgap;
+ int fromRow = cell.getRow();
+ int rowspan = cell.getEffectiveRowspan();
+ int toRow = fromRow + rowspan;
+ int height = 0;
+ for (int row2=fromRow ; row2<toRow ; row2++)
+ {
+ height += preferredRowHeights[row2];
+ }
+ height += (rowspan - 1) * vgap;
+ int xCorrection = 0;
+ int yCorrection = 0;
+ if (width > maxSize.width)
+ {
+ xCorrection = (int)((width - maxSize.width) * component.getAlignmentX());
+ width = maxSize.width;
+ }
+ if (height > maxSize.height)
+ {
+ yCorrection = (int)((height-maxSize.height) * component.getAlignmentY());
+ height = maxSize.height;
+ }
+
+ component.setBounds(x + xCorrection, y + yCorrection, width, height);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Redistributs free space (positive or negative) to all available
+ * columns or rows while taking elements maximum and minimum sizes into
+ * account if possible.
+ *
+ * @param totalSize The cumulated preferred sizes of the components
+ * @param freeSize The available space for displaying components
+ * without any gaps between components or between
+ * the grid and the borders of the parent container
+ * @param start The start in the arrays of rows or columns inclusive
+ * @param stop The stop in the arrays of rows or columns exclusive
+ * @param preferredElementSizes The preferredSizes of the rows or columns.
+ * After invocation of this method, this array
+ * holds the sizes that should be used
+ * @param minimumElementSizes The minimumSizes of the rows or columns
+ * @param maximumElementSizes The maximumSizes of the rows or columns
+ */
+ private void redistributeSpace(int totalSize, int freeSize,
+ int start, int stop,
+ int[] preferredElementSizes,
+ int[] minimumElementSizes,
+ int[] maximumElementSizes)
+ {
+ if (totalSize != freeSize)
+ {
+ boolean grow = totalSize < freeSize;
+ // calculate the size that is available for redistribution
+ freeSize = (freeSize - totalSize) * (grow ? 1 : -1);
+ while (freeSize > 0)
+ {
+ // calculate the amount of elements that can be resized without violating
+ // the minimum and maximum sizes and their current cumulated size
+ int modifyableAmount = 0;
+ long modifySize = 0;
+ for (int i=start ; i<stop ; i++)
+ {
+ if ((grow && (preferredElementSizes[i] < maximumElementSizes[i])) ||
+ (!grow && (preferredElementSizes[i] > minimumElementSizes[i])))
+ {
+ modifyableAmount++;
+ modifySize += preferredElementSizes[i];
+ }
+ }
+ boolean checkBounds = true;
+ // if all elements are at their minimum or maximum size, resize all elements
+ if (0 == modifyableAmount)
+ {
+ for (int i=start ; i<stop ; i++)
+ {
+ modifySize += preferredElementSizes[i];
+ }
+ checkBounds = false;
+ modifyableAmount = stop - start;
+ }
+ // to prevent an endless loop if the container gets resized to a very small amount
+ if (modifySize == 0)
+ {
+ break;
+ }
+ // resize the elements
+ if (freeSize < modifyableAmount)
+ {
+ for (int i=start ; i<stop ; i++)
+ {
+ if ((freeSize != 0) &&
+ (!checkBounds ||
+ (checkBounds &&
+ (grow && (preferredElementSizes[i] < maximumElementSizes[i])) ||
+ (!grow && (preferredElementSizes[i] > minimumElementSizes[i])))))
+ {
+ preferredElementSizes[i] += (grow ? 1 : -1);
+ if (0 > preferredElementSizes[i])
+ {
+ preferredElementSizes[i] = 0;
+ }
+ freeSize--;
+ }
+ }
+ }
+ else
+ {
+ long modifySizeAddition = 0;
+ double factor = (double)(freeSize + modifySize) / (double)modifySize;
+ for (int i=start ; i<stop ; i++)
+ {
+ long modifyableSize = (checkBounds ? (grow ? maximumElementSizes[i] - preferredElementSizes[i] : preferredElementSizes[i] - minimumElementSizes[i]) : Integer.MAX_VALUE - preferredElementSizes[i]);
+ long elementModifySize = Math.abs(Math.round((factor * preferredElementSizes[i]) - preferredElementSizes[i]));
+ if (elementModifySize <= modifyableSize)
+ {
+ preferredElementSizes[i] += (grow ? elementModifySize : -elementModifySize);
+ modifySizeAddition += (grow ? elementModifySize : -elementModifySize);
+ freeSize -= elementModifySize;
+ }
+ else
+ {
+ preferredElementSizes[i] += (grow ? modifyableSize : -modifyableSize);
+ modifySizeAddition += (grow ? modifyableSize : -modifyableSize);
+ freeSize -= modifyableSize;
+ }
+ if (0 > preferredElementSizes[i])
+ {
+ preferredElementSizes[i] = 0;
+ }
+ }
+ modifySize += modifySizeAddition;
+ }
+ }
+ }
+ }
+
+ /**
+ * Calculates the minimum, preferred or maximum size dimensions
+ * for the specified container, given the components it contains.
+ *
+ * @param parent The container to be laid out
+ * @param layoutSize if {@code LayoutSize.MINIMUM} compute minimum layout size,
+ * if {@code LayoutSize.PREFERRED} compute preferred layout size,
+ * if {@code LayoutSize.MAXIMUM} compute maximum layout size,
+ * if {@code fillRawSizes} is {@code true}, the layout size is computed
+ * without applying gaps between components or between
+ * the grid and the borders of the parent container
+ * @param fillRawSizes Whether to fill the resultArrays with the raw
+ * row heights and column widths and whether to apply
+ * gaps between components or between
+ * the grid and the borders of the parent container
+ * when computing the layout size
+ * @param gridSize The amount of rows and columns in the grid
+ * @param gridRows The grid holding the constraints for the components
+ * @param colspans In this {@code Set} the constraints which are part
+ * of a colspan are stored
+ * @param rowspans In this {@code Set} the constraints which are part
+ * of a rowspan are stored
+ * @param resultArrays If {@code fillRawSizes} is {@code true}, the first six arrays
+ * get filled with the raw row heights and column widths.
+ * resultArrays[0] = resultMinimumColWidths;
+ * resultArrays[1] = resultMinimumRowHeights;
+ * resultArrays[2] = resultPreferredColWidths;
+ * resultArrays[3] = resultPreferredRowHeights;
+ * resultArrays[4] = resultMaximumColWidths;
+ * resultArrays[5] = resultMaximumRowHeights;
+ * @return The minimum, preferred or maximum size dimensions for the specified container
+ * @throws IllegalArgumentException If {@code fillRawSizes == true} and {@code resultArrays.length < 6}
+ */
+ private Dimension getSize(Container parent, LayoutSize layoutSize, boolean fillRawSizes,
+ Dimension gridSize, List<List<ExtendedGridLayoutConstraints>> gridRows,
+ Set<ExtendedGridLayoutConstraints> colspans,
+ Set<ExtendedGridLayoutConstraints> rowspans,
+ int[][] resultArrays)
+ {
+ if (fillRawSizes && (resultArrays.length < 6))
+ {
+ throw new IllegalArgumentException("If fillRawSizes is true, resultArrays.length must be >= 6 (" + resultArrays.length + ')');
+ }
+ int[] minimumColWidths = new int[gridSize.width];
+ int[] minimumRowHeights = new int[gridSize.height];
+ int[] preferredColWidths = new int[gridSize.width];
+ int[] preferredRowHeights = new int[gridSize.height];
+ int[] maximumColWidths = new int[gridSize.width];
+ int[] maximumRowHeights = new int[gridSize.height];
+ Arrays.fill(minimumColWidths,0);
+ Arrays.fill(minimumRowHeights,0);
+ Arrays.fill(preferredColWidths,0);
+ Arrays.fill(preferredRowHeights,0);
+ Arrays.fill(maximumColWidths,0);
+ Arrays.fill(maximumRowHeights,0);
+
+ // get the maximum of the minimum sizes,
+ // the maximum of the preferred sizes and
+ // the minimum of the maximum sizes
+ // of all rows and columns, not taking
+ // rowspans and colspans into account
+ for (int row=0 ; row<gridSize.height ; row++)
+ {
+ List<ExtendedGridLayoutConstraints> gridRow = gridRows.get(row);
+ for (int col=0 ; col<gridSize.width ; col++)
+ {
+ ExtendedGridLayoutConstraints cell = gridRow.get(col);
+ if ((null != cell) && (null != cell.getComponent()))
+ {
+ Component component = cell.getComponent();
+ Dimension minimumSize = component.getMinimumSize();
+ Dimension preferredSize = component.getPreferredSize();
+ Dimension maximumSize = component.getMaximumSize();
+ if (!colspans.contains(cell))
+ {
+ minimumColWidths[col] = Math.max(minimumColWidths[col],minimumSize.width);
+ preferredColWidths[col] = Math.max(preferredColWidths[col],preferredSize.width);
+ maximumColWidths[col] = Math.max(maximumColWidths[col],maximumSize.width);
+ }
+ if (!rowspans.contains(cell))
+ {
+ minimumRowHeights[row] = Math.max(minimumRowHeights[row],minimumSize.height);
+ preferredRowHeights[row] = Math.max(preferredRowHeights[row],preferredSize.height);
+ maximumRowHeights[row] = Math.max(maximumRowHeights[row],maximumSize.height);
+ }
+ }
+ }
+ }
+
+ // correct cases where
+ // minimumColWidths[col] <= preferredColWidths[col] <= maximumColWidths[col]
+ // is not true by clipping to the minimumColWidths and maximumColWidths
+ for (int col=0 ; col<gridSize.width ; col++)
+ {
+ if (minimumColWidths[col] >= maximumColWidths[col])
+ {
+ maximumColWidths[col] = minimumColWidths[col];
+ preferredColWidths[col] = minimumColWidths[col];
+ }
+ else if (preferredColWidths[col] < minimumColWidths[col])
+ {
+ preferredColWidths[col] = minimumColWidths[col];
+ }
+ else if (preferredColWidths[col] > maximumColWidths[col])
+ {
+ preferredColWidths[col] = maximumColWidths[col];
+ }
+ }
+
+ // plug in the colspans and correct the minimum, preferred and
+ // maximum column widths the colspans are part of
+ for (ExtendedGridLayoutConstraints cell : colspans)
+ {
+ int fromCol = cell.getCol();
+ int colspan = cell.getEffectiveColspan();
+ int toCol = fromCol + colspan;
+ int currentMinimumColWidth = 0;
+ int currentPreferredColWidth = 0;
+ int currentMaximumColWidth = 0;
+ for (int col=fromCol ; col<toCol ; col++)
+ {
+ int minimumColWidth = minimumColWidths[col];
+ if ((Integer.MAX_VALUE-minimumColWidth) < currentMinimumColWidth)
+ {
+ currentMinimumColWidth = Integer.MAX_VALUE;
+ }
+ else
+ {
+ currentMinimumColWidth += minimumColWidth;
+ }
+ int preferredColWidth = preferredColWidths[col];
+ if ((Integer.MAX_VALUE-preferredColWidth) < currentPreferredColWidth)
+ {
+ currentPreferredColWidth = Integer.MAX_VALUE;
+ }
+ else
+ {
+ currentPreferredColWidth += preferredColWidth;
+ }
+ int maximumColWidth = maximumColWidths[col];
+ if ((Integer.MAX_VALUE-maximumColWidth) < currentMaximumColWidth)
+ {
+ currentMaximumColWidth = Integer.MAX_VALUE;
+ }
+ else
+ {
+ currentMaximumColWidth += maximumColWidth;
+ }
+ }
+ Component component = cell.getComponent();
+ int wantedMaximumColWidth = component.getMaximumSize().width - ((colspan - 1) * hgap);
+ if (currentMaximumColWidth < wantedMaximumColWidth)
+ {
+ redistributeSpace(currentMaximumColWidth,
+ wantedMaximumColWidth,
+ fromCol,toCol,
+ maximumColWidths,
+ maximumColWidths,
+ maximumColWidths);
+ }
+ int wantedMinimumColWidth = component.getMinimumSize().width - ((colspan - 1) * hgap);
+ if (currentMinimumColWidth < wantedMinimumColWidth)
+ {
+ redistributeSpace(currentMinimumColWidth,
+ wantedMinimumColWidth,
+ fromCol,toCol,
+ minimumColWidths,
+ minimumColWidths,
+ maximumColWidths);
+ }
+ int wantedPreferredColWidth = component.getPreferredSize().width - ((colspan - 1) * hgap);
+ if (currentPreferredColWidth < wantedPreferredColWidth)
+ {
+ redistributeSpace(currentPreferredColWidth,
+ wantedPreferredColWidth,
+ fromCol,toCol,
+ preferredColWidths,
+ minimumColWidths,
+ maximumColWidths);
+ }
+ }
+
+ // correct cases where
+ // minimumColWidths[col] <= preferredColWidths[col] <= maximumColWidths[col]
+ // is not true by clipping to the minimumColWidths and maximumColWidths
+ for (int col=0 ; col<gridSize.width ; col++)
+ {
+ if (minimumColWidths[col] >= maximumColWidths[col])
+ {
+ maximumColWidths[col] = minimumColWidths[col];
+ preferredColWidths[col] = minimumColWidths[col];
+ }
+ else if (preferredColWidths[col] < minimumColWidths[col])
+ {
+ preferredColWidths[col] = minimumColWidths[col];
+ }
+ else if (preferredColWidths[col] > maximumColWidths[col])
+ {
+ preferredColWidths[col] = maximumColWidths[col];
+ }
+ }
+
+ // correct cases where
+ // minimumRowHeights[row] <= preferredRowHeights[row] <= maximumRowHeights[row]
+ // is not true by clipping to the minimumRowHeights and maximumRowHeights
+ for (int row=0 ; row<gridSize.height ; row++)
+ {
+ if (minimumRowHeights[row] >= maximumRowHeights[row])
+ {
+ maximumRowHeights[row] = minimumRowHeights[row];
+ preferredRowHeights[row] = minimumRowHeights[row];
+ }
+ else if (preferredRowHeights[row] < minimumRowHeights[row])
+ {
+ preferredRowHeights[row] = minimumRowHeights[row];
+ }
+ else if (preferredRowHeights[row] > maximumRowHeights[row])
+ {
+ preferredRowHeights[row] = maximumRowHeights[row];
+ }
+ }
+
+ // plug in the rowspans and correct the minimum, preferred and
+ // maximum row heights the rowspans are part of
+ for (ExtendedGridLayoutConstraints cell : rowspans)
+ {
+ int fromRow = cell.getRow();
+ int rowspan = cell.getEffectiveRowspan();
+ int toRow = fromRow + rowspan;
+ int currentMinimumRowHeight = 0;
+ int currentPreferredRowHeight = 0;
+ int currentMaximumRowHeight = 0;
+ for (int row=fromRow ; row<toRow ; row++)
+ {
+ int minimumRowHeight = minimumRowHeights[row];
+ if ((Integer.MAX_VALUE-minimumRowHeight) < currentMinimumRowHeight)
+ {
+ currentMinimumRowHeight = Integer.MAX_VALUE;
+ }
+ else
+ {
+ currentMinimumRowHeight += minimumRowHeight;
+ }
+ int preferredRowHeight = preferredRowHeights[row];
+ if ((Integer.MAX_VALUE-preferredRowHeight) < currentPreferredRowHeight)
+ {
+ currentPreferredRowHeight = Integer.MAX_VALUE;
+ }
+ else
+ {
+ currentPreferredRowHeight += preferredRowHeight;
+ }
+ int maximumRowHeight = maximumRowHeights[row];
+ if ((Integer.MAX_VALUE-maximumRowHeight) < currentMaximumRowHeight)
+ {
+ currentMaximumRowHeight = Integer.MAX_VALUE;
+ }
+ else
+ {
+ currentMaximumRowHeight += maximumRowHeight;
+ }
+ }
+ Component component = cell.getComponent();
+ int wantedMaximumRowHeight = component.getMaximumSize().height - ((rowspan - 1) * vgap);
+ if (currentMaximumRowHeight < wantedMaximumRowHeight)
+ {
+ redistributeSpace(currentMaximumRowHeight,
+ wantedMaximumRowHeight,
+ fromRow,toRow,
+ maximumRowHeights,
+ maximumRowHeights,
+ maximumRowHeights);
+ }
+ int wantedMinimumRowHeight = component.getMinimumSize().height - ((rowspan - 1) * vgap);
+ if (currentMinimumRowHeight < wantedMinimumRowHeight)
+ {
+ redistributeSpace(currentMinimumRowHeight,
+ wantedMinimumRowHeight,
+ fromRow,toRow,
+ minimumRowHeights,
+ minimumRowHeights,
+ maximumRowHeights);
+ }
+ int wantedPreferredRowHeight = component.getPreferredSize().height - ((rowspan - 1) * vgap);
+ if (currentPreferredRowHeight < wantedPreferredRowHeight)
+ {
+ redistributeSpace(currentPreferredRowHeight,
+ wantedPreferredRowHeight,
+ fromRow,toRow,
+ preferredRowHeights,
+ minimumRowHeights,
+ maximumRowHeights);
+ }
+ }
+
+ // correct cases where
+ // minimumRowHeights[row] <= preferredRowHeights[row] <= maximumRowHeights[row]
+ // is not true by clipping to the minimumRowHeights and maximumRowHeights
+ for (int row=0 ; row<gridSize.height ; row++)
+ {
+ if (minimumRowHeights[row] >= maximumRowHeights[row])
+ {
+ maximumRowHeights[row] = minimumRowHeights[row];
+ preferredRowHeights[row] = minimumRowHeights[row];
+ }
+ else if (preferredRowHeights[row] < minimumRowHeights[row])
+ {
+ preferredRowHeights[row] = minimumRowHeights[row];
+ }
+ else if (preferredRowHeights[row] > maximumRowHeights[row])
+ {
+ preferredRowHeights[row] = maximumRowHeights[row];
+ }
+ }
+
+ // copies the computed sizes to the result arrays
+ if (fillRawSizes)
+ {
+ resultArrays[0] = minimumColWidths;
+ resultArrays[1] = minimumRowHeights;
+ resultArrays[2] = preferredColWidths;
+ resultArrays[3] = preferredRowHeights;
+ resultArrays[4] = maximumColWidths;
+ resultArrays[5] = maximumRowHeights;
+ }
+
+ // sums up the sizes for return value
+ int[] colWidths;
+ int[] rowHeights;
+ switch (layoutSize)
+ {
+ case MINIMUM:
+ colWidths = minimumColWidths;
+ rowHeights = minimumRowHeights;
+ break;
+
+ case PREFERRED:
+ colWidths = preferredColWidths;
+ rowHeights = preferredRowHeights;
+ break;
+
+ case MAXIMUM:
+ colWidths = maximumColWidths;
+ rowHeights = maximumRowHeights;
+ break;
+
+ default:
+ throw new InternalError("Missing case branch for LayoutSize: " + layoutSize);
+ }
+ long totalWidth = 0;
+ long totalHeight = 0;
+ for (int width : colWidths)
+ {
+ totalWidth += width;
+ }
+ for (int height : rowHeights)
+ {
+ totalHeight += height;
+ }
+
+ // add space between components or between
+ // componetns and the borders of the parent container
+ if (!fillRawSizes)
+ {
+ Insets insets = parent.getInsets();
+ totalWidth += insets.left + insets.right + ((gridSize.width - 1) * hgap) + distanceToBorders.left + distanceToBorders.right;
+ totalHeight += insets.top + insets.bottom + ((gridSize.height - 1) * vgap) + distanceToBorders.top + distanceToBorders.bottom;
+ }
+
+ // clip the size to Integer.MAX_VALUE if too big
+ if (totalWidth > Integer.MAX_VALUE)
+ {
+ totalWidth = Integer.MAX_VALUE;
+ }
+ if (totalHeight > Integer.MAX_VALUE)
+ {
+ totalHeight = Integer.MAX_VALUE;
+ }
+
+ return new Dimension((int)totalWidth,(int)totalHeight);
+ }
+
+ /**
+ * Builds up the grid for the specified container,
+ * given the components it contains.
+ *
+ * @param parent The container to be laid out
+ * @param gridRows In this {@code List<List>} the grid gets stored
+ * @param colspans In this {@code Set} the constraints which are part
+ * of a colspan get stored
+ * @param rowspans In this {@code Set} the constraints which are part
+ * of a rowspan get stored
+ * @return The amount of rows and columns in the grid
+ */
+ private Dimension buildGrid(Container parent, List<List<ExtendedGridLayoutConstraints>> gridRows,
+ Set<ExtendedGridLayoutConstraints> colspans, Set<ExtendedGridLayoutConstraints> rowspans)
+ {
+ // put the parent's components in source rows
+ List<List<ExtendedGridLayoutConstraints>> rows = new ArrayList<List<ExtendedGridLayoutConstraints>>();
+ Component[] components = parent.getComponents();
+ for (Component component : components)
+ {
+ if (component.isVisible())
+ {
+ ExtendedGridLayoutConstraints constraints = lookupConstraints(component).getWorkCopy();
+ int rowNumber = constraints.getRow();
+ for (int i=rowNumber, c=rows.size() ; i>=c ; i--)
+ {
+ rows.add(new ArrayList<ExtendedGridLayoutConstraints>());
+ }
+ List<ExtendedGridLayoutConstraints> row = rows.get(rowNumber);
+ row.add(constraints);
+ }
+ }
+
+ // initialize the rowIterators, gridRowIterators and gridRows
+ List<Iterator<ExtendedGridLayoutConstraints>> rowIterators = new ArrayList<Iterator<ExtendedGridLayoutConstraints>>();
+ List<ListIterator<ExtendedGridLayoutConstraints>> gridRowIterators = new ArrayList<ListIterator<ExtendedGridLayoutConstraints>>();
+ boolean haveNext = false;
+ for (List<ExtendedGridLayoutConstraints> row : rows)
+ {
+ Iterator<ExtendedGridLayoutConstraints> rowIterator = row.iterator();
+ rowIterators.add(rowIterator);
+ if (rowIterator.hasNext())
+ {
+ haveNext = true;
+ }
+ List<ExtendedGridLayoutConstraints> gridRow = new ArrayList<ExtendedGridLayoutConstraints>();
+ gridRows.add(gridRow);
+ gridRowIterators.add(gridRow.listIterator());
+ }
+
+ // build the grid
+ int col = -1;
+ while (haveNext)
+ {
+ col++;
+ haveNext = false;
+ for (int row=0, c=gridRows.size() ; row<c ; row++)
+ {
+ Iterator<ExtendedGridLayoutConstraints> rowIterator = rowIterators.get(row);
+ ListIterator<ExtendedGridLayoutConstraints> gridRowIterator = gridRowIterators.get(row);
+
+ // look for a rowspan in the previous row
+ if (row > 0)
+ {
+ ExtendedGridLayoutConstraints rowspanSource = gridRows.get(row-1).get(col);
+ if (null != rowspanSource)
+ {
+ ExtendedGridLayoutConstraints rowspanPlaceholder = rowspanSource.getRowspanPlaceholder(true);
+ if (null != rowspanPlaceholder)
+ {
+ rowspans.add(rowspanSource);
+ gridRowIterator.add(rowspanPlaceholder);
+ if (null != rowspanPlaceholder.getColspanPlaceholder(false))
+ {
+ switch (rowspanPlaceholder.getColspan())
+ {
+ case REMAINDER:
+ break;
+
+ default:
+ haveNext = true;
+ }
+ }
+ else if (rowIterator.hasNext())
+ {
+ haveNext = true;
+ }
+ continue;
+ }
+ }
+ }
+
+ // look for a colspan in the previous column
+ if (gridRowIterator.hasPrevious())
+ {
+ ExtendedGridLayoutConstraints colspanSource = gridRowIterator.previous();
+ gridRowIterator.next();
+ if (null != colspanSource)
+ {
+ ExtendedGridLayoutConstraints colspanPlaceholder = colspanSource.getColspanPlaceholder(true);
+ if (null != colspanPlaceholder)
+ {
+ colspans.add(colspanSource);
+ gridRowIterator.add(colspanPlaceholder);
+ if (null != colspanPlaceholder.getColspanPlaceholder(false))
+ {
+ switch (colspanPlaceholder.getColspan())
+ {
+ case REMAINDER:
+ break;
+
+ default:
+ haveNext = true;
+ }
+ }
+ else if (rowIterator.hasNext())
+ {
+ haveNext = true;
+ }
+ continue;
+ }
+ }
+ }
+
+ // add a new element or null
+ if (rowIterator.hasNext())
+ {
+ ExtendedGridLayoutConstraints newConstraints = rowIterator.next();
+ newConstraints.setCol(col);
+ gridRowIterator.add(newConstraints);
+ if (null != newConstraints.getColspanPlaceholder(false))
+ {
+ switch (newConstraints.getColspan())
+ {
+ case REMAINDER:
+ break;
+
+ default:
+ haveNext = true;
+ }
+ }
+ else if (rowIterator.hasNext())
+ {
+ haveNext = true;
+ }
+ }
+ else
+ {
+ gridRowIterator.add(null);
+ }
+ }
+ }
+
+ // check the last gridRow for rowspans and probably add rows for these
+ haveNext = false;
+ int gridRowsSize = gridRows.size();
+ if (gridRowsSize > 0)
+ {
+ ListIterator<ExtendedGridLayoutConstraints> gridRowIterator = gridRows.get(gridRows.size()-1).listIterator();
+ while (gridRowIterator.hasNext())
+ {
+ ExtendedGridLayoutConstraints cell = gridRowIterator.next();
+ if ((null != cell) &&
+ ((REMAINDER != cell.getRowspan()) &&
+ (null != cell.getRowspanPlaceholder(false))))
+ {
+ haveNext = true;
+ break;
+ }
+ }
+ while (haveNext)
+ {
+ haveNext = false;
+ gridRowIterator = gridRows.get(gridRows.size()-1).listIterator();
+ List<ExtendedGridLayoutConstraints> gridRow = new ArrayList<ExtendedGridLayoutConstraints>();
+ gridRows.add(gridRow);
+ ListIterator<ExtendedGridLayoutConstraints> newGridRowIterator = gridRow.listIterator();
+ while (gridRowIterator.hasNext())
+ {
+ ExtendedGridLayoutConstraints cell = gridRowIterator.next();
+ if ((null != cell) &&
+ (null != cell.getRowspanPlaceholder(false)))
+ {
+ rowspans.add(cell);
+ ExtendedGridLayoutConstraints rowspanPlaceholder = cell.getRowspanPlaceholder(true);
+ newGridRowIterator.add(rowspanPlaceholder);
+ }
+ else
+ {
+ newGridRowIterator.add(null);
+ }
+ }
+ gridRowIterator = gridRow.listIterator();
+ while (gridRowIterator.hasNext())
+ {
+ ExtendedGridLayoutConstraints cell = gridRowIterator.next();
+ if ((null != cell) &&
+ ((REMAINDER != cell.getRowspan()) &&
+ (null != cell.getRowspanPlaceholder(false))))
+ {
+ haveNext = true;
+ break;
+ }
+ }
+ }
+ }
+
+ return new Dimension(col+1,gridRows.size());
+ }
+
+ /**
+ * Returns a string representation of the object. In general, the
+ * {@code toString} method returns a string that
+ * "textually represents" this object. The result should
+ * be a concise but informative representation that is easy for a
+ * person to read.
+ *
+ * @return a string representation of the object.
+ */
+ public String toString()
+ {
+ return getClass().getName() + "[hgap=" + hgap + ",vgap=" + vgap
+ + ",distanceToBorders=" + distanceToBorders
+ + ",comptable=" + comptable + "]";
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/ExtendedGridLayoutConstraints.java b/jEdit/org/gjt/sp/jedit/gui/ExtendedGridLayoutConstraints.java
index 9c5db95..437afc1 100644
--- a/jEdit/org/gjt/sp/jedit/gui/ExtendedGridLayoutConstraints.java
+++ b/jEdit/org/gjt/sp/jedit/gui/ExtendedGridLayoutConstraints.java
@@ -1,476 +1,476 @@
-/*
- * ExtendedGridLayoutConstraints.java - a constraints clss for the ExtendedGridLayout
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Originally written by Björn Kautler for the jEdit project. This work has been
- * placed into the public domain. You may use this work in any way and for any
- * purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package org.gjt.sp.jedit.gui;
-
-import java.awt.Component;
-
-/**
- * Specifies constraints for components
- * that are laid out using the {@code ExtendedGridLayout} class.
- *
- * @version 1.0
- * @author Björn "Vampire" Kautler
- * @see ExtendedGridLayout
- * @since jEdit 4.3pre10
- */
-public class ExtendedGridLayoutConstraints
-{
- /**
- * Specifies that this component is the
- * last component in its column or row
- * and takes up the remaining space.
- */
- public static final int REMAINDER = Integer.MAX_VALUE;
-
- /**
- * Specifies the row in which a component starts its display area.
- * {@code row} has to be non-negative and the default
- * value is 0.
- */
- private int row;
-
- /**
- * Specifies the column in which a component starts its display area.
- * {@code col} has to be non-negative.
- */
- private int col;
-
- /**
- * Specifies the number of cells in a row for the
- * component's display area.
- * <p>
- * Use {@code REMAINDER} to specify that the component's
- * display area will be from its grid position to the last
- * cell in the row.
- * <p>
- * {@code colspan} has to be {@literal >= 1} and the default
- * value is 1.
- *
- * @see #REMAINDER
- * @see #rowspan
- */
- private int colspan;
-
- /**
- * Specifies the effective number of cells in a row for the
- * component's display area. This is used internally
- * to get the effective number of cells in a row in cases
- * where {@code REMAINDER} is used for colspan.
- *
- * @see #REMAINDER
- * @see #colspan
- */
- private int effectiveColspan;
-
- /**
- * Specifies the number of cells in a column for the
- * component's display area.
- * <p>
- * Use {@code REMAINDER} to specify that the component's
- * display area will be from its grid position to the last
- * cell in the column.
- * <p>
- * {@code rowspan} has to be {@literal >= 1} and the default
- * value is 1.
- *
- * @see #REMAINDER
- * @see #colspan
- */
- private int rowspan;
-
- /**
- * Specifies the effective number of cells in a column for the
- * component's display area. This is used internally
- * to get the effective number of cells in a column in cases
- * where {@code REMAINDER} is used for rowspan.
- *
- * @see #REMAINDER
- * @see #rowspan
- */
- private int effectiveRowspan;
-
- /**
- * Specifies if this Constraint is used as placeholder to build the grid.
- * This is used internally and the default value is {@code false}.
- */
- private boolean placeholder;
-
- /**
- * Specifies the mainConstraints object for which this constraints
- * object is a placeholder. If this constraints object is no placeholder,
- * mainConstraints is set to {@code null}.
- */
- private ExtendedGridLayoutConstraints mainConstraints;
-
- /**
- * Specifies the {@code Component} this constraints object describes.
- */
- private Component component;
-
- /**
- * Creates an {@code ExtendedGridLayoutConstraints} object with
- * all of its fields set to their default value. For further information
- * about the default values see
- * {@link #ExtendedGridLayoutConstraints(int, int, int, java.awt.Component)}.
- *
- * @param component The {@code Component} this constraints object describes
- */
- public ExtendedGridLayoutConstraints(Component component)
- {
- this(0,0,1,1,component,false,null);
- }
-
- /**
- * Creates an {@code ExtendedGridLayoutConstraints} object with
- * all of its fields set to their default value
- * except of the row which is specified. For further information
- * about the default values see
- * {@link #ExtendedGridLayoutConstraints(int, int, int, java.awt.Component)}.
- *
- * @param row The row in which a component starts its display area. First row is 0
- * @param component The {@code Component} this constraints object d describes
- * @throws IllegalArgumentException If row {@literal < 0}
- */
- public ExtendedGridLayoutConstraints(int row, Component component)
- {
- this(row,0,1,1,component,false,null);
- }
-
- /**
- * Creates an {@code ExtendedGridLayoutConstraints} object with
- * all of its fields set to the passed-in arguments.
- *
- * @param row The row in which a component starts its display area.
- * First row is 0. Default value is 0.
- * @param colspan The number of cells in a row for the component's display area.
- * Use {@code REMAINDER} to specify that the component's
- * display area will be from its grid position to the last
- * cell in the row. Default value is 1.
- * @param rowspan The number of cells in a column for the component's display area.
- * Use {@code REMAINDER} to specify that the component's
- * display area will be from its grid position to the last
- * cell in the column. Default value is 1.
- * @param component The {@code Component} this constraints object describes
- * @throws IllegalArgumentException If row {@literal < 0}
- * @throws IllegalArgumentException If colspan {@literal < 1}
- * @throws IllegalArgumentException If rowspan {@literal < 1}
- */
- public ExtendedGridLayoutConstraints(int row, int colspan, int rowspan, Component component)
- {
- this(row,0,colspan,rowspan,component,false,null);
- }
-
- /**
- * Creates an {@code ExtendedGridLayoutConstraints} object with
- * all of its fields set to the passed-in arguments.
- *
- * @param row The row in which a component starts its display area.
- * First row is 0.
- * @param col The col in which a component starts its display area.
- * First col is 0.
- * @param colspan The number of cells in a row for the component's display area.
- * Use {@code REMAINDER} to specify that the component's
- * display area will be from its grid position to the last
- * cell in the row.
- * @param rowspan The number of cells in a column for the component's display area.
- * Use {@code REMAINDER} to specify that the component's
- * display area will be from its grid position to the last
- * cell in the column.
- * @param component The {@code Component} this constraints object describes
- * @param placeholder If this constraints are used as placeholder to build the grid
- * @param mainConstraints The mainConstraints object for which this constraints
- * object is a placeholder
- * @throws IllegalArgumentException If row {@literal < 0}
- * @throws IllegalArgumentException If col {@literal < 0}
- * @throws IllegalArgumentException If colspan {@literal < 1}
- * @throws IllegalArgumentException If rowspan {@literal < 1}
- */
- private ExtendedGridLayoutConstraints(int row, int col, int colspan, int rowspan, Component component, boolean placeholder, ExtendedGridLayoutConstraints mainConstraints)
- {
- if (row < 0)
- {
- throw new IllegalArgumentException("row must be non-negative (" + row + ')');
- }
- if (col < 0)
- {
- throw new IllegalArgumentException("col must be non-negative (" + col + ')');
- }
- if (colspan < 1)
- {
- throw new IllegalArgumentException("colspan must be at least 1 (" + colspan + ')');
- }
- if (rowspan < 1)
- {
- throw new IllegalArgumentException("rowspan must be at least 1 (" + rowspan + ')');
- }
- this.row = row;
- this.col = col;
- this.colspan = colspan;
- effectiveColspan = 1;
- this.rowspan = rowspan;
- effectiveRowspan = 1;
- this.component = component;
- this.placeholder = placeholder;
- this.mainConstraints = mainConstraints;
- }
-
- /**
- * Creates an {@code ExtendedGridLayoutConstraints} object which can be
- * used as placeholder for building a grid with colspans.
- *
- * @param forUsage If the returned object will be used in the grid
- * and therefor the effectiveColspan should be raised by one
- * @return The newly created {@code ExtendedGridLayoutConstraints}
- * object or {@code null} if no colspan is applicable
- * @see #getRowspanPlaceholder(boolean)
- */
- ExtendedGridLayoutConstraints getColspanPlaceholder(boolean forUsage)
- {
- if (1 == colspan)
- {
- return null;
- }
- ExtendedGridLayoutConstraints result = new ExtendedGridLayoutConstraints(row,col+1,colspan==REMAINDER ? REMAINDER : colspan-1,rowspan,component,true,null == mainConstraints ? this : mainConstraints);
- if (forUsage && (result.mainConstraints.row == row))
- {
- result.mainConstraints.effectiveColspan++;
- }
- return result;
- }
-
- /**
- * Creates an {@code ExtendedGridLayoutConstraints} object which can be
- * used as placeholder for building a grid with rowspans.
- *
- * @param forUsage If the returned object will be used in the grid
- * and therefor the effectiveRowspan should be raised by one
- * @return The newly created {@code ExtendedGridLayoutConstraints}
- * object or {@code null} if no rowspan is applicable
- * @see #getColspanPlaceholder(boolean)
- */
- ExtendedGridLayoutConstraints getRowspanPlaceholder(boolean forUsage)
- {
- if (1 == rowspan)
- {
- return null;
- }
- ExtendedGridLayoutConstraints result = new ExtendedGridLayoutConstraints(row+1,col,colspan,rowspan==REMAINDER ? REMAINDER : rowspan-1,component,true,null == mainConstraints ? this : mainConstraints);
- if (forUsage && (result.mainConstraints.col == col))
- {
- result.mainConstraints.effectiveRowspan++;
- }
- return result;
- }
-
- /**
- * @return The row in which the component starts its display area.
- */
- public int getRow()
- {
- return row;
- }
-
- /**
- * @return The column in which the component starts its display area.
- */
- public int getCol()
- {
- return col;
- }
-
- /**
- * @param col The column in which the component starts its display area.
- */
- void setCol(int col)
- {
- if (col < 0)
- {
- throw new IllegalArgumentException("col must be non-negative (" + col + ')');
- }
- this.col = col;
- }
-
- /**
- * @return The number of cells in a row for the component's display area
- * or {@code REMAINDER} if the component's display area will be
- * from its grid position to the last cell in the row.
- */
- public int getColspan()
- {
- return colspan;
- }
-
- /**
- * @return The effective number of cells in a row for the component's display area.
- */
- int getEffectiveColspan()
- {
- return null == mainConstraints ? effectiveColspan : mainConstraints.effectiveColspan;
- }
-
- /**
- * @return The number of cells in a column for the component's display area
- * or {@code REMAINDER} if the component's display area will be
- * from its grid position to the last cell in the column.
- */
- public int getRowspan()
- {
- return rowspan;
- }
-
- /**
- * @return The effective number of cells in a column for the component's display area.
- */
- int getEffectiveRowspan()
- {
- return null == mainConstraints ? effectiveRowspan : mainConstraints.effectiveRowspan;
- }
-
- /**
- * @return The {@code Component} this constraints object describes
- */
- Component getComponent()
- {
- return component;
- }
-
- /**
- * @return Whether this constraints object is a placeholder or not
- */
- public boolean isPlaceholder()
- {
- return placeholder;
- }
-
- /**
- * @return A work copy if this constraints object. This is a flat copy
- * which means that the reference to the component stays the same.
- * The returned object could be used without modifying this
- * constraints object.
- */
- ExtendedGridLayoutConstraints getWorkCopy()
- {
- return new ExtendedGridLayoutConstraints(row,col,colspan,rowspan,component,placeholder,(null == mainConstraints ? null : mainConstraints.getWorkCopy()));
- }
-
- /**
- * Indicates whether some other object is "equal to" this one.
- * <p>
- * The {@code equals} method implements an equivalence relation
- * on non-null object references:
- * <ul>
- * <li>It is <i>reflexive</i>: for any non-null reference value
- * {@code x}, {@code x.equals(x)} returns
- * {@code true}.
- * <li>It is <i>symmetric</i>: for any non-null reference values
- * {@code x} and {@code y}, {@code x.equals(y)}
- * returns {@code true} if and only if
- * {@code y.equals(x)} returns {@code true}.
- * <li>It is <i>transitive</i>: for any non-null reference values
- * {@code x}, {@code y}, and {@code z}, if
- * {@code x.equals(y)} returns {@code true} and
- * {@code y.equals(z)} returns {@code true}, then
- * {@code x.equals(z)} returns {@code true}.
- * <li>It is <i>consistent</i>: for any non-null reference values
- * {@code x} and {@code y}, multiple invocations of
- * <tt>x.equals(y)</tt> consistently return {@code true}
- * or consistently return {@code false}, provided no
- * information used in {@code equals} comparisons on the
- * objects is modified.
- * <li>For any non-null reference value {@code x},
- * {@code x.equals(null)} returns {@code false}.
- * </ul>
- * <p>
- * The <tt>equals</tt> method for class
- * {@code ExtendedGridLayoutConstraints} returns {@code true}
- * if and only if the constraints objects describe the same {@code Component}
- *
- * @param o the reference object with which to compare.
- * @return {@code true} if this object is the same as the o
- * argument; {@code false} otherwise.
- * @see #hashCode()
- * @see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Hashtable.html"><code>java.util.Hashtable</code></a>
- */
- public boolean equals(Object o)
- {
- if ((o == null) ||
- (!(o instanceof ExtendedGridLayoutConstraints)))
- {
- return false;
- }
- if (component == null)
- {
- return ((ExtendedGridLayoutConstraints)o).component == null;
- }
- return component.equals(((ExtendedGridLayoutConstraints)o).component);
- }
-
- /**
- * Returns a hash code value for the object. This method is
- * supported for the benefit of hashtables such as those provided by
- * {@code java.util.Hashtable}.
- * <p>
- * The general contract of {@code hashCode} is:
- * <ul>
- * <li>Whenever it is invoked on the same object more than once during
- * an execution of a Java application, the <tt>hashCode</tt> method
- * must consistently return the same integer, provided no information
- * used in <tt>equals</tt> comparisons on the object is modified.
- * This integer need not remain consistent from one execution of an
- * application to another execution of the same application.
- * <li>If two objects are equal according to the <tt>equals(Object)</tt>
- * method, then calling the {@code hashCode} method on each of
- * the two objects must produce the same integer result.
- * <li>It is <em>not</em> required that if two objects are unequal
- * according to the
- * <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)">{@code java.lang.Object#equals(java.lang.Object)}</a>
- * method, then calling the <tt>hashCode</tt> method on each of the
- * two objects must produce distinct integer results. However, the
- * programmer should be aware that producing distinct integer results
- * for unequal objects may improve the performance of hashtables.
- * </ul>
- *
- * @return a hash code value for this object.
- * @see #equals(java.lang.Object)
- * @see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Hashtable.html"><code>java.util.Hashtable</code></a>
- */
- public int hashCode()
- {
- if (null == component)
- {
- return 0;
- }
- return component.hashCode();
- }
-
- /**
- * Returns a string representation of the object. In general, the
- * {@code toString} method returns a string that
- * "textually represents" this object. The result should
- * be a concise but informative representation that is easy for a
- * person to read.
- *
- * @return a string representation of the object.
- */
- public String toString()
- {
- return getClass().getName() + "[row=" + row + ",col=" + col
- + ",colspan=" + colspan + ",effectiveColspan=" + effectiveColspan
- + ",rowspan=" + rowspan + ",effectiveRowspan=" + effectiveRowspan
- + ",placeholder=" + placeholder + ",component=" + component
- + ",mainConstraints=" + mainConstraints + "]";
- }
-}
+/*
+ * ExtendedGridLayoutConstraints.java - a constraints clss for the ExtendedGridLayout
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Originally written by Björn Kautler for the jEdit project. This work has been
+ * placed into the public domain. You may use this work in any way and for any
+ * purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+import java.awt.Component;
+
+/**
+ * Specifies constraints for components
+ * that are laid out using the {@code ExtendedGridLayout} class.
+ *
+ * @version 1.0
+ * @author Björn "Vampire" Kautler
+ * @see ExtendedGridLayout
+ * @since jEdit 4.3pre10
+ */
+public class ExtendedGridLayoutConstraints
+{
+ /**
+ * Specifies that this component is the
+ * last component in its column or row
+ * and takes up the remaining space.
+ */
+ public static final int REMAINDER = Integer.MAX_VALUE;
+
+ /**
+ * Specifies the row in which a component starts its display area.
+ * {@code row} has to be non-negative and the default
+ * value is 0.
+ */
+ private int row;
+
+ /**
+ * Specifies the column in which a component starts its display area.
+ * {@code col} has to be non-negative.
+ */
+ private int col;
+
+ /**
+ * Specifies the number of cells in a row for the
+ * component's display area.
+ * <p>
+ * Use {@code REMAINDER} to specify that the component's
+ * display area will be from its grid position to the last
+ * cell in the row.
+ * <p>
+ * {@code colspan} has to be {@literal >= 1} and the default
+ * value is 1.
+ *
+ * @see #REMAINDER
+ * @see #rowspan
+ */
+ private int colspan;
+
+ /**
+ * Specifies the effective number of cells in a row for the
+ * component's display area. This is used internally
+ * to get the effective number of cells in a row in cases
+ * where {@code REMAINDER} is used for colspan.
+ *
+ * @see #REMAINDER
+ * @see #colspan
+ */
+ private int effectiveColspan;
+
+ /**
+ * Specifies the number of cells in a column for the
+ * component's display area.
+ * <p>
+ * Use {@code REMAINDER} to specify that the component's
+ * display area will be from its grid position to the last
+ * cell in the column.
+ * <p>
+ * {@code rowspan} has to be {@literal >= 1} and the default
+ * value is 1.
+ *
+ * @see #REMAINDER
+ * @see #colspan
+ */
+ private int rowspan;
+
+ /**
+ * Specifies the effective number of cells in a column for the
+ * component's display area. This is used internally
+ * to get the effective number of cells in a column in cases
+ * where {@code REMAINDER} is used for rowspan.
+ *
+ * @see #REMAINDER
+ * @see #rowspan
+ */
+ private int effectiveRowspan;
+
+ /**
+ * Specifies if this Constraint is used as placeholder to build the grid.
+ * This is used internally and the default value is {@code false}.
+ */
+ private boolean placeholder;
+
+ /**
+ * Specifies the mainConstraints object for which this constraints
+ * object is a placeholder. If this constraints object is no placeholder,
+ * mainConstraints is set to {@code null}.
+ */
+ private ExtendedGridLayoutConstraints mainConstraints;
+
+ /**
+ * Specifies the {@code Component} this constraints object describes.
+ */
+ private Component component;
+
+ /**
+ * Creates an {@code ExtendedGridLayoutConstraints} object with
+ * all of its fields set to their default value. For further information
+ * about the default values see
+ * {@link #ExtendedGridLayoutConstraints(int, int, int, java.awt.Component)}.
+ *
+ * @param component The {@code Component} this constraints object describes
+ */
+ public ExtendedGridLayoutConstraints(Component component)
+ {
+ this(0,0,1,1,component,false,null);
+ }
+
+ /**
+ * Creates an {@code ExtendedGridLayoutConstraints} object with
+ * all of its fields set to their default value
+ * except of the row which is specified. For further information
+ * about the default values see
+ * {@link #ExtendedGridLayoutConstraints(int, int, int, java.awt.Component)}.
+ *
+ * @param row The row in which a component starts its display area. First row is 0
+ * @param component The {@code Component} this constraints object d describes
+ * @throws IllegalArgumentException If row {@literal < 0}
+ */
+ public ExtendedGridLayoutConstraints(int row, Component component)
+ {
+ this(row,0,1,1,component,false,null);
+ }
+
+ /**
+ * Creates an {@code ExtendedGridLayoutConstraints} object with
+ * all of its fields set to the passed-in arguments.
+ *
+ * @param row The row in which a component starts its display area.
+ * First row is 0. Default value is 0.
+ * @param colspan The number of cells in a row for the component's display area.
+ * Use {@code REMAINDER} to specify that the component's
+ * display area will be from its grid position to the last
+ * cell in the row. Default value is 1.
+ * @param rowspan The number of cells in a column for the component's display area.
+ * Use {@code REMAINDER} to specify that the component's
+ * display area will be from its grid position to the last
+ * cell in the column. Default value is 1.
+ * @param component The {@code Component} this constraints object describes
+ * @throws IllegalArgumentException If row {@literal < 0}
+ * @throws IllegalArgumentException If colspan {@literal < 1}
+ * @throws IllegalArgumentException If rowspan {@literal < 1}
+ */
+ public ExtendedGridLayoutConstraints(int row, int colspan, int rowspan, Component component)
+ {
+ this(row,0,colspan,rowspan,component,false,null);
+ }
+
+ /**
+ * Creates an {@code ExtendedGridLayoutConstraints} object with
+ * all of its fields set to the passed-in arguments.
+ *
+ * @param row The row in which a component starts its display area.
+ * First row is 0.
+ * @param col The col in which a component starts its display area.
+ * First col is 0.
+ * @param colspan The number of cells in a row for the component's display area.
+ * Use {@code REMAINDER} to specify that the component's
+ * display area will be from its grid position to the last
+ * cell in the row.
+ * @param rowspan The number of cells in a column for the component's display area.
+ * Use {@code REMAINDER} to specify that the component's
+ * display area will be from its grid position to the last
+ * cell in the column.
+ * @param component The {@code Component} this constraints object describes
+ * @param placeholder If this constraints are used as placeholder to build the grid
+ * @param mainConstraints The mainConstraints object for which this constraints
+ * object is a placeholder
+ * @throws IllegalArgumentException If row {@literal < 0}
+ * @throws IllegalArgumentException If col {@literal < 0}
+ * @throws IllegalArgumentException If colspan {@literal < 1}
+ * @throws IllegalArgumentException If rowspan {@literal < 1}
+ */
+ private ExtendedGridLayoutConstraints(int row, int col, int colspan, int rowspan, Component component, boolean placeholder, ExtendedGridLayoutConstraints mainConstraints)
+ {
+ if (row < 0)
+ {
+ throw new IllegalArgumentException("row must be non-negative (" + row + ')');
+ }
+ if (col < 0)
+ {
+ throw new IllegalArgumentException("col must be non-negative (" + col + ')');
+ }
+ if (colspan < 1)
+ {
+ throw new IllegalArgumentException("colspan must be at least 1 (" + colspan + ')');
+ }
+ if (rowspan < 1)
+ {
+ throw new IllegalArgumentException("rowspan must be at least 1 (" + rowspan + ')');
+ }
+ this.row = row;
+ this.col = col;
+ this.colspan = colspan;
+ effectiveColspan = 1;
+ this.rowspan = rowspan;
+ effectiveRowspan = 1;
+ this.component = component;
+ this.placeholder = placeholder;
+ this.mainConstraints = mainConstraints;
+ }
+
+ /**
+ * Creates an {@code ExtendedGridLayoutConstraints} object which can be
+ * used as placeholder for building a grid with colspans.
+ *
+ * @param forUsage If the returned object will be used in the grid
+ * and therefor the effectiveColspan should be raised by one
+ * @return The newly created {@code ExtendedGridLayoutConstraints}
+ * object or {@code null} if no colspan is applicable
+ * @see #getRowspanPlaceholder(boolean)
+ */
+ ExtendedGridLayoutConstraints getColspanPlaceholder(boolean forUsage)
+ {
+ if (1 == colspan)
+ {
+ return null;
+ }
+ ExtendedGridLayoutConstraints result = new ExtendedGridLayoutConstraints(row,col+1,colspan==REMAINDER ? REMAINDER : colspan-1,rowspan,component,true,null == mainConstraints ? this : mainConstraints);
+ if (forUsage && (result.mainConstraints.row == row))
+ {
+ result.mainConstraints.effectiveColspan++;
+ }
+ return result;
+ }
+
+ /**
+ * Creates an {@code ExtendedGridLayoutConstraints} object which can be
+ * used as placeholder for building a grid with rowspans.
+ *
+ * @param forUsage If the returned object will be used in the grid
+ * and therefor the effectiveRowspan should be raised by one
+ * @return The newly created {@code ExtendedGridLayoutConstraints}
+ * object or {@code null} if no rowspan is applicable
+ * @see #getColspanPlaceholder(boolean)
+ */
+ ExtendedGridLayoutConstraints getRowspanPlaceholder(boolean forUsage)
+ {
+ if (1 == rowspan)
+ {
+ return null;
+ }
+ ExtendedGridLayoutConstraints result = new ExtendedGridLayoutConstraints(row+1,col,colspan,rowspan==REMAINDER ? REMAINDER : rowspan-1,component,true,null == mainConstraints ? this : mainConstraints);
+ if (forUsage && (result.mainConstraints.col == col))
+ {
+ result.mainConstraints.effectiveRowspan++;
+ }
+ return result;
+ }
+
+ /**
+ * @return The row in which the component starts its display area.
+ */
+ public int getRow()
+ {
+ return row;
+ }
+
+ /**
+ * @return The column in which the component starts its display area.
+ */
+ public int getCol()
+ {
+ return col;
+ }
+
+ /**
+ * @param col The column in which the component starts its display area.
+ */
+ void setCol(int col)
+ {
+ if (col < 0)
+ {
+ throw new IllegalArgumentException("col must be non-negative (" + col + ')');
+ }
+ this.col = col;
+ }
+
+ /**
+ * @return The number of cells in a row for the component's display area
+ * or {@code REMAINDER} if the component's display area will be
+ * from its grid position to the last cell in the row.
+ */
+ public int getColspan()
+ {
+ return colspan;
+ }
+
+ /**
+ * @return The effective number of cells in a row for the component's display area.
+ */
+ int getEffectiveColspan()
+ {
+ return null == mainConstraints ? effectiveColspan : mainConstraints.effectiveColspan;
+ }
+
+ /**
+ * @return The number of cells in a column for the component's display area
+ * or {@code REMAINDER} if the component's display area will be
+ * from its grid position to the last cell in the column.
+ */
+ public int getRowspan()
+ {
+ return rowspan;
+ }
+
+ /**
+ * @return The effective number of cells in a column for the component's display area.
+ */
+ int getEffectiveRowspan()
+ {
+ return null == mainConstraints ? effectiveRowspan : mainConstraints.effectiveRowspan;
+ }
+
+ /**
+ * @return The {@code Component} this constraints object describes
+ */
+ Component getComponent()
+ {
+ return component;
+ }
+
+ /**
+ * @return Whether this constraints object is a placeholder or not
+ */
+ public boolean isPlaceholder()
+ {
+ return placeholder;
+ }
+
+ /**
+ * @return A work copy if this constraints object. This is a flat copy
+ * which means that the reference to the component stays the same.
+ * The returned object could be used without modifying this
+ * constraints object.
+ */
+ ExtendedGridLayoutConstraints getWorkCopy()
+ {
+ return new ExtendedGridLayoutConstraints(row,col,colspan,rowspan,component,placeholder,(null == mainConstraints ? null : mainConstraints.getWorkCopy()));
+ }
+
+ /**
+ * Indicates whether some other object is "equal to" this one.
+ * <p>
+ * The {@code equals} method implements an equivalence relation
+ * on non-null object references:
+ * <ul>
+ * <li>It is <i>reflexive</i>: for any non-null reference value
+ * {@code x}, {@code x.equals(x)} returns
+ * {@code true}.
+ * <li>It is <i>symmetric</i>: for any non-null reference values
+ * {@code x} and {@code y}, {@code x.equals(y)}
+ * returns {@code true} if and only if
+ * {@code y.equals(x)} returns {@code true}.
+ * <li>It is <i>transitive</i>: for any non-null reference values
+ * {@code x}, {@code y}, and {@code z}, if
+ * {@code x.equals(y)} returns {@code true} and
+ * {@code y.equals(z)} returns {@code true}, then
+ * {@code x.equals(z)} returns {@code true}.
+ * <li>It is <i>consistent</i>: for any non-null reference values
+ * {@code x} and {@code y}, multiple invocations of
+ * <tt>x.equals(y)</tt> consistently return {@code true}
+ * or consistently return {@code false}, provided no
+ * information used in {@code equals} comparisons on the
+ * objects is modified.
+ * <li>For any non-null reference value {@code x},
+ * {@code x.equals(null)} returns {@code false}.
+ * </ul>
+ * <p>
+ * The <tt>equals</tt> method for class
+ * {@code ExtendedGridLayoutConstraints} returns {@code true}
+ * if and only if the constraints objects describe the same {@code Component}
+ *
+ * @param o the reference object with which to compare.
+ * @return {@code true} if this object is the same as the o
+ * argument; {@code false} otherwise.
+ * @see #hashCode()
+ * @see <a href="http://download.oracle.com/javase/6/docs/api/java/util/Hashtable.html"><code>java.util.Hashtable</code></a>
+ */
+ public boolean equals(Object o)
+ {
+ if ((o == null) ||
+ (!(o instanceof ExtendedGridLayoutConstraints)))
+ {
+ return false;
+ }
+ if (component == null)
+ {
+ return ((ExtendedGridLayoutConstraints)o).component == null;
+ }
+ return component.equals(((ExtendedGridLayoutConstraints)o).component);
+ }
+
+ /**
+ * Returns a hash code value for the object. This method is
+ * supported for the benefit of hashtables such as those provided by
+ * {@code java.util.Hashtable}.
+ * <p>
+ * The general contract of {@code hashCode} is:
+ * <ul>
+ * <li>Whenever it is invoked on the same object more than once during
+ * an execution of a Java application, the <tt>hashCode</tt> method
+ * must consistently return the same integer, provided no information
+ * used in <tt>equals</tt> comparisons on the object is modified.
+ * This integer need not remain consistent from one execution of an
+ * application to another execution of the same application.
+ * <li>If two objects are equal according to the <tt>equals(Object)</tt>
+ * method, then calling the {@code hashCode} method on each of
+ * the two objects must produce the same integer result.
+ * <li>It is <em>not</em> required that if two objects are unequal
+ * according to the
+ * <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#equals(java.lang.Object)">{@code java.lang.Object#equals(java.lang.Object)}</a>
+ * method, then calling the <tt>hashCode</tt> method on each of the
+ * two objects must produce distinct integer results. However, the
+ * programmer should be aware that producing distinct integer results
+ * for unequal objects may improve the performance of hashtables.
+ * </ul>
+ *
+ * @return a hash code value for this object.
+ * @see #equals(java.lang.Object)
+ * @see <a href="http://download.oracle.com/javase/6/docs/api/java/util/Hashtable.html"><code>java.util.Hashtable</code></a>
+ */
+ public int hashCode()
+ {
+ if (null == component)
+ {
+ return 0;
+ }
+ return component.hashCode();
+ }
+
+ /**
+ * Returns a string representation of the object. In general, the
+ * {@code toString} method returns a string that
+ * "textually represents" this object. The result should
+ * be a concise but informative representation that is easy for a
+ * person to read.
+ *
+ * @return a string representation of the object.
+ */
+ public String toString()
+ {
+ return getClass().getName() + "[row=" + row + ",col=" + col
+ + ",colspan=" + colspan + ",effectiveColspan=" + effectiveColspan
+ + ",rowspan=" + rowspan + ",effectiveRowspan=" + effectiveRowspan
+ + ",placeholder=" + placeholder + ",component=" + component
+ + ",mainConstraints=" + mainConstraints + "]";
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/FilePropertiesDialog.java b/jEdit/org/gjt/sp/jedit/gui/FilePropertiesDialog.java
index df9611f..773c26e 100644
--- a/jEdit/org/gjt/sp/jedit/gui/FilePropertiesDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/FilePropertiesDialog.java
@@ -42,8 +42,8 @@ import org.gjt.sp.jedit.View;
import org.gjt.sp.jedit.browser.VFSBrowser;
import org.gjt.sp.jedit.io.VFSFile;
import org.gjt.sp.jedit.io.FileVFS.LocalFile;
-import org.gjt.sp.jedit.MiscUtilities;
import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.StandardUtilities;
//}}}
/**
@@ -53,7 +53,7 @@ public class FilePropertiesDialog extends EnhancedDialog
{
private final VFSBrowser browser;
private final VFSFile[] selectedFiles;
- private final LocalFile local;
+ private final VFSFile local;
//{{{ FilePropertiesDialog(View view, VFSBrowser browser) constructor
/**
@@ -72,7 +72,7 @@ public class FilePropertiesDialog extends EnhancedDialog
selectedFiles = files;
else
selectedFiles = browser.getSelectedFiles();
- local = (LocalFile) selectedFiles[0];
+ local = selectedFiles[0];
createAndShowGUI();
} //}}}
@@ -160,7 +160,8 @@ public class FilePropertiesDialog extends EnhancedDialog
path = path.substring(0, path.lastIndexOf('/'));
}
propField.add(new JLabel(jEdit.getProperty("fileprop.path")+": "+path));
- propField.add(new JLabel(jEdit.getProperty("fileprop.size")+": "+MiscUtilities.formatFileSize(filesSize)));
+ propField.add(new JLabel(jEdit.getProperty("fileprop.size")+": "+
+ StandardUtilities.formatFileSize(filesSize)));
Border etch = BorderFactory.createEtchedBorder();
propField.setBorder(BorderFactory.createTitledBorder(etch, jEdit.getProperty("fileprop.properties")));
centerPanel.add(BorderLayout.CENTER, propField);
@@ -217,15 +218,23 @@ public class FilePropertiesDialog extends EnhancedDialog
propField.setLayout(new GridLayout(4, 1));
propField.add(new JLabel(jEdit.getProperty("fileprop.name")+": "+local.getName()));
propField.add(new JLabel(jEdit.getProperty("fileprop.path")+": "+local.getPath()));
- propField.add(new JLabel(jEdit.getProperty("fileprop.lastmod")+": "+sdf.format(new Date(local.getModified()))));
+
+ // Show last modified property only for LocalFile
+ if (local instanceof LocalFile)
+ {
+ propField.add(new JLabel(jEdit.getProperty("fileprop.lastmod")+": "+
+ sdf.format(new Date(((LocalFile)local).getModified()))));
+ }
if(local.getType() == VFSFile.DIRECTORY)
{
File ioFile = new File(local.getPath());
- propField.add(new JLabel(jEdit.getProperty("fileprop.size")+": "+MiscUtilities.formatFileSize(IOUtilities.fileLength(ioFile))));
+ propField.add(new JLabel(jEdit.getProperty("fileprop.size")+": "+
+ StandardUtilities.formatFileSize(IOUtilities.fileLength(ioFile))));
}
else
{
- propField.add(new JLabel(jEdit.getProperty("fileprop.size")+": "+MiscUtilities.formatFileSize(local.getLength())));
+ propField.add(new JLabel(jEdit.getProperty("fileprop.size")+": "+
+ StandardUtilities.formatFileSize(local.getLength())));
}
Border etch = BorderFactory.createEtchedBorder();
propField.setBorder(BorderFactory.createTitledBorder(etch, jEdit.getProperty("fileprop.properties")));
diff --git a/jEdit/org/gjt/sp/jedit/gui/FilesChangedDialog.java b/jEdit/org/gjt/sp/jedit/gui/FilesChangedDialog.java
index f7e4a0f..3db10ef 100644
--- a/jEdit/org/gjt/sp/jedit/gui/FilesChangedDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/FilesChangedDialog.java
@@ -1,437 +1,437 @@
-/*
- * FilesChangedDialog.java - Files changed on disk
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.tree.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * Files changed on disk dialog.
- *
- * @author Slava Pestov
- * @version $Id: FilesChangedDialog.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class FilesChangedDialog extends EnhancedDialog
-{
- //{{{ FilesChangedDialog constructor
- public FilesChangedDialog(View view, int[] states,
- boolean alreadyReloaded)
- {
- super(view,jEdit.getProperty("files-changed.title"),false);
-
- this.view = view;
-
- JPanel content = new JPanel(new BorderLayout(12,12));
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- Box iconBox = new Box(BoxLayout.Y_AXIS);
- iconBox.add(new JLabel(UIManager.getIcon("OptionPane.warningIcon")));
- iconBox.add(Box.createGlue());
- content.add(BorderLayout.WEST,iconBox);
-
- JPanel centerPanel = new JPanel(new BorderLayout());
-
- JLabel label = new JLabel(jEdit.getProperty("files-changed.caption"));
- label.setBorder(new EmptyBorder(0,0,6,0));
- centerPanel.add(BorderLayout.NORTH,label);
-
- DefaultMutableTreeNode deleted = new DefaultMutableTreeNode(
- jEdit.getProperty("files-changed.deleted"),true);
- DefaultMutableTreeNode changed = new DefaultMutableTreeNode(
- jEdit.getProperty("files-changed.changed"
- + (alreadyReloaded ? "-auto" : "")),true);
- DefaultMutableTreeNode changedDirty = new DefaultMutableTreeNode(
- jEdit.getProperty("files-changed.changed-dirty"
- + (alreadyReloaded ? "-auto" : "")),true);
- Buffer[] buffers = jEdit.getBuffers();
- for(int i = 0; i < states.length; i++)
- {
- Buffer buffer = buffers[i];
- DefaultMutableTreeNode addTo;
- switch(states[i])
- {
- case Buffer.FILE_DELETED:
- addTo = deleted;
- break;
- case Buffer.FILE_CHANGED:
- addTo = buffer.isDirty() ? changedDirty : changed;
- break;
- default:
- addTo = null;
- break;
- }
-
- if(addTo != null)
- {
- addTo.add(new DefaultMutableTreeNode(
- buffer.getPath()));
- }
- }
-
- root = new DefaultMutableTreeNode("",true);
- if(deleted.getChildCount() != 0)
- {
- root.add(deleted);
- }
- if(changed.getChildCount() != 0)
- {
- root.add(changed);
- }
- if(changedDirty.getChildCount() != 0)
- {
- root.add(changedDirty);
- }
-
- bufferTreeModel = new DefaultTreeModel(root);
- bufferTree = new JTree(bufferTreeModel);
- bufferTree.setRootVisible(false);
- bufferTree.setVisibleRowCount(10);
- bufferTree.setCellRenderer(new Renderer());
- bufferTree.getSelectionModel().addTreeSelectionListener(new TreeHandler());
- bufferTree.getSelectionModel().setSelectionMode(
- TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
-
- centerPanel.add(BorderLayout.CENTER,new JScrollPane(bufferTree));
-
- content.add(BorderLayout.CENTER,centerPanel);
-
- Box buttons = new Box(BoxLayout.X_AXIS);
- buttons.add(Box.createGlue());
-
- if(!alreadyReloaded)
- {
- selectAll = new JButton(jEdit.getProperty(
- "files-changed.select-all"));
- selectAll.setMnemonic(jEdit.getProperty(
- "files-changed.select-all.mnemonic").charAt(0));
- buttons.add(selectAll);
- selectAll.addActionListener(new ActionHandler());
-
- buttons.add(Box.createHorizontalStrut(12));
-
- reload = new JButton(jEdit.getProperty(
- "files-changed.reload"));
- reload.setMnemonic(jEdit.getProperty(
- "files-changed.reload.mnemonic").charAt(0));
- buttons.add(reload);
- reload.addActionListener(new ActionHandler());
-
- buttons.add(Box.createHorizontalStrut(12));
-
- ignore = new JButton(jEdit.getProperty("files-changed.ignore"));
- ignore.setMnemonic(jEdit.getProperty(
- "files-changed.ignore.mnemonic").charAt(0));
- buttons.add(ignore);
- ignore.addActionListener(new ActionHandler());
-
- buttons.add(Box.createHorizontalStrut(12));
- }
-
- close = new JButton(jEdit.getProperty("common.close"));
- getRootPane().setDefaultButton(close);
- buttons.add(close);
- close.addActionListener(new ActionHandler());
-
- buttons.add(Box.createGlue());
-
- content.add(BorderLayout.SOUTH,buttons);
-
- bufferTree.expandPath(new TreePath(
- new Object[] {
- root,
- deleted
- }));
- bufferTree.expandPath(new TreePath(
- new Object[] {
- root,
- changed
- }));
- bufferTree.expandPath(new TreePath(
- new Object[] {
- root,
- changedDirty
- }));
-
- GUIUtilities.requestFocus(this,bufferTree);
-
- updateEnabled();
-
- pack();
- setLocationRelativeTo(view);
- setVisible(true);
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ Private members
- private View view;
- private JTree bufferTree;
- private DefaultTreeModel bufferTreeModel;
- private DefaultMutableTreeNode root;
- private JButton selectAll;
-
- // hack so that 'select all' does not change current buffer
- private boolean selectAllInProgress;
-
- private JButton reload;
- private JButton ignore;
- private JButton close;
-
- //{{{ updateEnabled() method
- private void updateEnabled()
- {
- TreePath[] paths = bufferTree
- .getSelectionPaths();
- boolean enabled = false;
- if(paths != null)
- {
- for(int i = 0; i < paths.length; i++)
- {
- Object[] path = paths[i].getPath();
- if(path.length == 3)
- enabled = true;
- }
- }
-
- if(reload != null)
- reload.setEnabled(enabled);
-
- if (ignore != null)
- ignore.setEnabled(enabled);
- } //}}}
-
- //{{{ selectAll() method
- private void selectAll()
- {
- selectAllInProgress = true;
-
- TreeNode[] path = new TreeNode[3];
- path[0] = root;
- for(int i = 0; i < root.getChildCount(); i++)
- {
- DefaultMutableTreeNode node =
- (DefaultMutableTreeNode)
- root.getChildAt(i);
- path[1] = node;
- for(int j = 0; j < node.getChildCount(); j++)
- {
- DefaultMutableTreeNode node2 =
- (DefaultMutableTreeNode)
- node.getChildAt(j);
- path[2] = node2;
- bufferTree.getSelectionModel()
- .addSelectionPath(
- new TreePath(path));
- }
- }
-
- selectAllInProgress = false;
-
- updateEnabled();
- } //}}}
-
- //{{{ reload() method
- private void action(String action)
- {
- TreePath[] paths = bufferTree
- .getSelectionPaths();
- if(paths == null || paths.length == 0)
- return;
-
- int row = bufferTree.getRowForPath(paths[0]);
-
- for(int i = 0; i < paths.length; i++)
- {
- TreePath path = paths[i];
-
- // is it a header?
- if(path.getPathCount() == 2)
- continue;
-
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)
- path.getLastPathComponent();
- if(!(node.getUserObject() instanceof String))
- {
- return;
- }
-
- Buffer buffer = jEdit.getBuffer(
- (String)node.getUserObject());
- if(buffer == null)
- return;
-
- if ("RELOAD".equals(action))
- buffer.reload(view);
- else
- {
- buffer.setAutoReload(false);
- buffer.setAutoReloadDialog(false);
- }
-
- DefaultMutableTreeNode parent =
- (DefaultMutableTreeNode)
- node.getParent();
- parent.remove(node);
- }
-
- bufferTreeModel.reload(root);
-
- // we expand those that are non-empty, and
- // remove those that are empty
- TreeNode[] nodes = { root, null };
-
- // remove empty category branches
- for(int j = 0; j < root.getChildCount(); j++)
- {
- DefaultMutableTreeNode node
- = (DefaultMutableTreeNode)
- root.getChildAt(j);
- if(root.getChildAt(j)
- .getChildCount() == 0)
- {
- root.remove(j);
- j--;
- }
- else
- {
- nodes[1] = node;
- bufferTree.expandPath(
- new TreePath(nodes));
- }
- }
-
- if(root.getChildCount() == 0)
- dispose();
- else
- {
- if(row >= bufferTree.getRowCount())
- row = bufferTree.getRowCount() - 1;
- TreePath path = bufferTree.getPathForRow(row);
- if(path.getPathCount() == 2)
- {
- // selected a header; skip to the next row
- bufferTree.setSelectionRow(row + 1);
- }
- else
- bufferTree.setSelectionPath(path);
- }
- } //}}}
-
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == selectAll)
- selectAll();
- else if(source == reload)
- action("RELOAD");
- else if(source == close)
- dispose();
- else if (source == ignore)
- action("IGNORE");
- }
- } //}}}
-
- //{{{ TreeHandler class
- class TreeHandler implements TreeSelectionListener
- {
- public void valueChanged(TreeSelectionEvent evt)
- {
- if(selectAllInProgress)
- return;
-
- updateEnabled();
-
- TreePath[] paths = bufferTree
- .getSelectionPaths();
- if(paths == null || paths.length == 0)
- return;
- TreePath path = paths[paths.length - 1];
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)
- path.getLastPathComponent();
- if(node.getUserObject() instanceof String)
- {
- Buffer buffer = jEdit.getBuffer(
- (String)node.getUserObject());
- if(buffer != null)
- view.showBuffer(buffer);
- }
- }
- } //}}}
-
- //{{{ Renderer class
- static class Renderer extends DefaultTreeCellRenderer
- {
- Renderer()
- {
- entryFont = UIManager.getFont("Tree.font");
- if(entryFont == null)
- entryFont = jEdit.getFontProperty("metal.secondary.font");
- groupFont = entryFont.deriveFont(Font.BOLD);
- }
-
- public Component getTreeCellRendererComponent(JTree tree,
- Object value, boolean selected, boolean expanded,
- boolean leaf, int row, boolean hasFocus)
- {
- super.getTreeCellRendererComponent(tree,value,
- selected,expanded,leaf,row,hasFocus);
-
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
-
- if(node.getParent() == tree.getModel().getRoot())
- setFont(groupFont);
- else
- setFont(entryFont);
-
- setIcon(null);
-
- return this;
- }
-
- private Font entryFont;
- private Font groupFont;
- } //}}}
-}
+/*
+ * FilesChangedDialog.java - Files changed on disk
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.event.*;
+import javax.swing.tree.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * Files changed on disk dialog.
+ *
+ * @author Slava Pestov
+ * @version $Id: FilesChangedDialog.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class FilesChangedDialog extends EnhancedDialog
+{
+ //{{{ FilesChangedDialog constructor
+ public FilesChangedDialog(View view, int[] states,
+ boolean alreadyReloaded)
+ {
+ super(view,jEdit.getProperty("files-changed.title"),false);
+
+ this.view = view;
+
+ JPanel content = new JPanel(new BorderLayout(12,12));
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ Box iconBox = new Box(BoxLayout.Y_AXIS);
+ iconBox.add(new JLabel(UIManager.getIcon("OptionPane.warningIcon")));
+ iconBox.add(Box.createGlue());
+ content.add(BorderLayout.WEST,iconBox);
+
+ JPanel centerPanel = new JPanel(new BorderLayout());
+
+ JLabel label = new JLabel(jEdit.getProperty("files-changed.caption"));
+ label.setBorder(new EmptyBorder(0,0,6,0));
+ centerPanel.add(BorderLayout.NORTH,label);
+
+ DefaultMutableTreeNode deleted = new DefaultMutableTreeNode(
+ jEdit.getProperty("files-changed.deleted"),true);
+ DefaultMutableTreeNode changed = new DefaultMutableTreeNode(
+ jEdit.getProperty("files-changed.changed"
+ + (alreadyReloaded ? "-auto" : "")),true);
+ DefaultMutableTreeNode changedDirty = new DefaultMutableTreeNode(
+ jEdit.getProperty("files-changed.changed-dirty"
+ + (alreadyReloaded ? "-auto" : "")),true);
+ Buffer[] buffers = jEdit.getBuffers();
+ for(int i = 0; i < states.length; i++)
+ {
+ Buffer buffer = buffers[i];
+ DefaultMutableTreeNode addTo;
+ switch(states[i])
+ {
+ case Buffer.FILE_DELETED:
+ addTo = deleted;
+ break;
+ case Buffer.FILE_CHANGED:
+ addTo = buffer.isDirty() ? changedDirty : changed;
+ break;
+ default:
+ addTo = null;
+ break;
+ }
+
+ if(addTo != null)
+ {
+ addTo.add(new DefaultMutableTreeNode(
+ buffer.getPath()));
+ }
+ }
+
+ root = new DefaultMutableTreeNode("",true);
+ if(deleted.getChildCount() != 0)
+ {
+ root.add(deleted);
+ }
+ if(changed.getChildCount() != 0)
+ {
+ root.add(changed);
+ }
+ if(changedDirty.getChildCount() != 0)
+ {
+ root.add(changedDirty);
+ }
+
+ bufferTreeModel = new DefaultTreeModel(root);
+ bufferTree = new JTree(bufferTreeModel);
+ bufferTree.setRootVisible(false);
+ bufferTree.setVisibleRowCount(10);
+ bufferTree.setCellRenderer(new Renderer());
+ bufferTree.getSelectionModel().addTreeSelectionListener(new TreeHandler());
+ bufferTree.getSelectionModel().setSelectionMode(
+ TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
+
+ centerPanel.add(BorderLayout.CENTER,new JScrollPane(bufferTree));
+
+ content.add(BorderLayout.CENTER,centerPanel);
+
+ Box buttons = new Box(BoxLayout.X_AXIS);
+ buttons.add(Box.createGlue());
+
+ if(!alreadyReloaded)
+ {
+ selectAll = new JButton(jEdit.getProperty(
+ "files-changed.select-all"));
+ selectAll.setMnemonic(jEdit.getProperty(
+ "files-changed.select-all.mnemonic").charAt(0));
+ buttons.add(selectAll);
+ selectAll.addActionListener(new ActionHandler());
+
+ buttons.add(Box.createHorizontalStrut(12));
+
+ reload = new JButton(jEdit.getProperty(
+ "files-changed.reload"));
+ reload.setMnemonic(jEdit.getProperty(
+ "files-changed.reload.mnemonic").charAt(0));
+ buttons.add(reload);
+ reload.addActionListener(new ActionHandler());
+
+ buttons.add(Box.createHorizontalStrut(12));
+
+ ignore = new JButton(jEdit.getProperty("files-changed.ignore"));
+ ignore.setMnemonic(jEdit.getProperty(
+ "files-changed.ignore.mnemonic").charAt(0));
+ buttons.add(ignore);
+ ignore.addActionListener(new ActionHandler());
+
+ buttons.add(Box.createHorizontalStrut(12));
+ }
+
+ close = new JButton(jEdit.getProperty("common.close"));
+ getRootPane().setDefaultButton(close);
+ buttons.add(close);
+ close.addActionListener(new ActionHandler());
+
+ buttons.add(Box.createGlue());
+
+ content.add(BorderLayout.SOUTH,buttons);
+
+ bufferTree.expandPath(new TreePath(
+ new Object[] {
+ root,
+ deleted
+ }));
+ bufferTree.expandPath(new TreePath(
+ new Object[] {
+ root,
+ changed
+ }));
+ bufferTree.expandPath(new TreePath(
+ new Object[] {
+ root,
+ changedDirty
+ }));
+
+ GUIUtilities.requestFocus(this,bufferTree);
+
+ updateEnabled();
+
+ pack();
+ setLocationRelativeTo(view);
+ setVisible(true);
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ Private members
+ private View view;
+ private JTree bufferTree;
+ private DefaultTreeModel bufferTreeModel;
+ private DefaultMutableTreeNode root;
+ private JButton selectAll;
+
+ // hack so that 'select all' does not change current buffer
+ private boolean selectAllInProgress;
+
+ private JButton reload;
+ private JButton ignore;
+ private JButton close;
+
+ //{{{ updateEnabled() method
+ private void updateEnabled()
+ {
+ TreePath[] paths = bufferTree
+ .getSelectionPaths();
+ boolean enabled = false;
+ if(paths != null)
+ {
+ for(int i = 0; i < paths.length; i++)
+ {
+ Object[] path = paths[i].getPath();
+ if(path.length == 3)
+ enabled = true;
+ }
+ }
+
+ if(reload != null)
+ reload.setEnabled(enabled);
+
+ if (ignore != null)
+ ignore.setEnabled(enabled);
+ } //}}}
+
+ //{{{ selectAll() method
+ private void selectAll()
+ {
+ selectAllInProgress = true;
+
+ TreeNode[] path = new TreeNode[3];
+ path[0] = root;
+ for(int i = 0; i < root.getChildCount(); i++)
+ {
+ DefaultMutableTreeNode node =
+ (DefaultMutableTreeNode)
+ root.getChildAt(i);
+ path[1] = node;
+ for(int j = 0; j < node.getChildCount(); j++)
+ {
+ DefaultMutableTreeNode node2 =
+ (DefaultMutableTreeNode)
+ node.getChildAt(j);
+ path[2] = node2;
+ bufferTree.getSelectionModel()
+ .addSelectionPath(
+ new TreePath(path));
+ }
+ }
+
+ selectAllInProgress = false;
+
+ updateEnabled();
+ } //}}}
+
+ //{{{ reload() method
+ private void action(String action)
+ {
+ TreePath[] paths = bufferTree
+ .getSelectionPaths();
+ if(paths == null || paths.length == 0)
+ return;
+
+ int row = bufferTree.getRowForPath(paths[0]);
+
+ for(int i = 0; i < paths.length; i++)
+ {
+ TreePath path = paths[i];
+
+ // is it a header?
+ if(path.getPathCount() == 2)
+ continue;
+
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)
+ path.getLastPathComponent();
+ if(!(node.getUserObject() instanceof String))
+ {
+ return;
+ }
+
+ Buffer buffer = jEdit.getBuffer(
+ (String)node.getUserObject());
+ if(buffer == null)
+ return;
+
+ if ("RELOAD".equals(action))
+ buffer.reload(view);
+ else
+ {
+ buffer.setAutoReload(false);
+ buffer.setAutoReloadDialog(false);
+ }
+
+ DefaultMutableTreeNode parent =
+ (DefaultMutableTreeNode)
+ node.getParent();
+ parent.remove(node);
+ }
+
+ bufferTreeModel.reload(root);
+
+ // we expand those that are non-empty, and
+ // remove those that are empty
+ TreeNode[] nodes = { root, null };
+
+ // remove empty category branches
+ for(int j = 0; j < root.getChildCount(); j++)
+ {
+ DefaultMutableTreeNode node
+ = (DefaultMutableTreeNode)
+ root.getChildAt(j);
+ if(root.getChildAt(j)
+ .getChildCount() == 0)
+ {
+ root.remove(j);
+ j--;
+ }
+ else
+ {
+ nodes[1] = node;
+ bufferTree.expandPath(
+ new TreePath(nodes));
+ }
+ }
+
+ if(root.getChildCount() == 0)
+ dispose();
+ else
+ {
+ if(row >= bufferTree.getRowCount())
+ row = bufferTree.getRowCount() - 1;
+ TreePath path = bufferTree.getPathForRow(row);
+ if(path.getPathCount() == 2)
+ {
+ // selected a header; skip to the next row
+ bufferTree.setSelectionRow(row + 1);
+ }
+ else
+ bufferTree.setSelectionPath(path);
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == selectAll)
+ selectAll();
+ else if(source == reload)
+ action("RELOAD");
+ else if(source == close)
+ dispose();
+ else if (source == ignore)
+ action("IGNORE");
+ }
+ } //}}}
+
+ //{{{ TreeHandler class
+ class TreeHandler implements TreeSelectionListener
+ {
+ public void valueChanged(TreeSelectionEvent evt)
+ {
+ if(selectAllInProgress)
+ return;
+
+ updateEnabled();
+
+ TreePath[] paths = bufferTree
+ .getSelectionPaths();
+ if(paths == null || paths.length == 0)
+ return;
+ TreePath path = paths[paths.length - 1];
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)
+ path.getLastPathComponent();
+ if(node.getUserObject() instanceof String)
+ {
+ Buffer buffer = jEdit.getBuffer(
+ (String)node.getUserObject());
+ if(buffer != null)
+ view.showBuffer(buffer);
+ }
+ }
+ } //}}}
+
+ //{{{ Renderer class
+ static class Renderer extends DefaultTreeCellRenderer
+ {
+ Renderer()
+ {
+ entryFont = UIManager.getFont("Tree.font");
+ if(entryFont == null)
+ entryFont = jEdit.getFontProperty("metal.secondary.font");
+ groupFont = entryFont.deriveFont(Font.BOLD);
+ }
+
+ public Component getTreeCellRendererComponent(JTree tree,
+ Object value, boolean selected, boolean expanded,
+ boolean leaf, int row, boolean hasFocus)
+ {
+ super.getTreeCellRendererComponent(tree,value,
+ selected,expanded,leaf,row,hasFocus);
+
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
+
+ if(node.getParent() == tree.getModel().getRoot())
+ setFont(groupFont);
+ else
+ setFont(entryFont);
+
+ setIcon(null);
+
+ return this;
+ }
+
+ private Font entryFont;
+ private Font groupFont;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/FilteredListModel.java b/jEdit/org/gjt/sp/jedit/gui/FilteredListModel.java
index 8f9d10d..2d1d97b 100644
--- a/jEdit/org/gjt/sp/jedit/gui/FilteredListModel.java
+++ b/jEdit/org/gjt/sp/jedit/gui/FilteredListModel.java
@@ -1,278 +1,278 @@
-/*
- * FilteredTableModel.java - A Filtered table model decorator
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.gui;
-
-import javax.swing.*;
-import javax.swing.event.*;
-import java.util.*;
-
-/**
- * This ListModel delegates another model to add some filtering features to any
- * JList.
- * To use it you must implement the abstract method passFilter().
- * This method is called for each row, and must return true if the row should be
- * visible, and false otherwise.
- * It is also possible to override the method prepareFilter() that allow you to
- * transform the filter String. Usually you can return it as lowercase
- * It is not mandatory but highly recommended to give the JList instance to the
- * model in order to keep the selection after the filter has been updated
- *
- * @author Matthieu Casanova
- * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
- * @since jEdit 4.3pre11
- */
-public abstract class FilteredListModel<E extends ListModel> extends AbstractListModel implements ListDataListener
-{
- /**
- * The delegated table model.
- */
- protected E delegated;
-
- private Vector<Integer> filteredIndices;
-
- /**
- * This map contains the delegated indices as key and true indices as values.
- */
- private Map<Integer, Integer> invertedIndices;
-
- private String filter;
-
- private JList list;
-
- //{{{ FilteredTableModel() constructor
- protected FilteredListModel(E delegated)
- {
- this.delegated = delegated;
- delegated.addListDataListener(this);
- resetFilter();
- } //}}}
-
- //{{{ setList() method
- /**
- * Set the JList that uses this model.
- * It is used to restore the selection after the filter has been applied
- * If it is null,
- *
- * @param list the list that uses the model
- */
- public void setList(JList list)
- {
- if (list.getModel() != this)
- throw new IllegalArgumentException("The given list " + list + " doesn't use this model " + this);
- this.list = list;
- } //}}}
-
- //{{{ getDelegated() method
- public E getDelegated()
- {
- return delegated;
- } //}}}
-
- //{{{ setDelegated() method
- public void setDelegated(E delegated)
- {
- this.delegated.removeListDataListener(this);
- delegated.addListDataListener(this);
- this.delegated = delegated;
- } //}}}
-
- //{{{ resetFilter() method
- private void resetFilter()
- {
- filteredIndices = null;
- } //}}}
-
- //{{{ setFilter() method
- public void setFilter(final String filter)
- {
- Runnable runner = new Runnable()
- {
- public void run()
- {
- Set<Integer> selectedIndices = saveSelection();
- list.clearSelection();
- FilteredListModel.this.filter = filter;
- if (filter != null && filter.length() > 0)
- {
- int size = delegated.getSize();
- String prepped_filter = prepareFilter(filter);
- Vector<Integer> indices = new Vector<Integer>(size);
- Map<Integer, Integer> invertedIndices = new HashMap<Integer, Integer>();
- for (int i = 0; i < size; i++)
- {
- if (passFilter(i, prepped_filter))
- {
- Integer delegatedIndice = Integer.valueOf(i);
- indices.add(delegatedIndice);
-
- invertedIndices.put(delegatedIndice, indices.size() - 1);
- }
- }
- FilteredListModel.this.invertedIndices = invertedIndices;
- filteredIndices = indices;
- }
- else
- resetFilter();
-
- fireContentsChanged(this, 0, getSize() - 1);
- restoreSelection(selectedIndices);
- }
- };
- SwingUtilities.invokeLater(runner);
- } //}}}
-
- //{{{ prepareFilter() method
- public String prepareFilter(String filter)
- {
- return filter;
- } //}}}
-
- //{{{ passFilter() method
- /**
- * This callback indicates if a row passes the filter.
- *
- * @param row the row number the delegate row count
- * @param filter the filter string
- * @return true if the row must be visible
- */
- public abstract boolean passFilter(int row, String filter);
- //}}}
-
- //{{{ saveSelection()
- protected Set<Integer> saveSelection()
- {
- if (list == null)
- return null;
- int[] rows = list.getSelectedIndices();
- if (rows.length == 0)
- return null;
-
- Set<Integer> selectedRows = new HashSet<Integer>(rows.length);
- for (int row : rows)
- {
- selectedRows.add(getTrueRow(row));
- }
- return selectedRows;
- } //}}}
-
- //{{{ restoreSelection() method
- protected void restoreSelection(Set<Integer> selectedIndices)
- {
- if (selectedIndices == null || getSize() == 0)
- return;
-
- // To correctly handle "single interval" selection mode,
- // each interval has to be selected using a single call to
- // setSelectionInterval; calling setSelectionInterval on
- // each item cancels the previous selection.
- // Sort the list of selected indices to simplify interval
- // identification.
- Vector<Integer> sel = new Vector<Integer>(selectedIndices);
- Collections.sort(sel);
- int from = -1;
- int to = -1;
- for (Integer selectedIndex : sel)
- {
- int i = getInternal2ExternalRow(selectedIndex.intValue());
- if (i != -1)
- {
- if (from == -1)
- from = to = i;
- else if (i == to + 1)
- to = i;
- else
- {
- list.setSelectionInterval(from, to);
- from = to = i;
- }
- }
- }
- if (from != -1)
- list.setSelectionInterval(from, to);
- } //}}}
-
- //{{{ getTrueRow() method
- /**
- * Converts a row index from the JTable to an internal row index from the delegated model.
- *
- * @param rowIndex the row index
- * @return the row index in the delegated model
- */
- public int getTrueRow(int rowIndex)
- {
- if (filteredIndices == null)
- return rowIndex;
- return filteredIndices.get(rowIndex).intValue();
- } //}}}
-
- //{{{ getInternal2ExternalRow() method
- /**
- * Converts a row index from the delegated table model into a row index of the JTable.
- *
- * @param internalRowIndex the internal row index
- * @return the table row index or -1 if this row is not visible
- */
- public int getInternal2ExternalRow(int internalRowIndex)
- {
- if (invertedIndices == null)
- return internalRowIndex;
-
- Integer externalRowIndex = invertedIndices.get(internalRowIndex);
- if (externalRowIndex == null)
- return -1;
-
- return externalRowIndex.intValue();
- } //}}}
-
- //{{{ getElementAt() method
- public Object getElementAt(int index)
- {
- int trueRowIndex = getTrueRow(index);
- return delegated.getElementAt(trueRowIndex);
- } //}}}
-
- //{{{ getSize() method
- public int getSize()
- {
- if (filteredIndices == null)
- return delegated.getSize();
- return filteredIndices.size();
- } //}}}
-
- //{{{ contentsChanged() method
- public void contentsChanged(ListDataEvent e)
- {
- setFilter(filter);
- } //}}}
-
- //{{{ intervalAdded() method
- public void intervalAdded(ListDataEvent e)
- {
- setFilter(filter);
- } //}}}
-
- //{{{ intervalRemoved() method
- public void intervalRemoved(ListDataEvent e)
- {
- setFilter(filter);
- } //}}}
-}
+/*
+ * FilteredTableModel.java - A Filtered table model decorator
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.gui;
+
+import javax.swing.*;
+import javax.swing.event.*;
+import java.util.*;
+
+/**
+ * This ListModel delegates another model to add some filtering features to any
+ * JList.
+ * To use it you must implement the abstract method passFilter().
+ * This method is called for each row, and must return true if the row should be
+ * visible, and false otherwise.
+ * It is also possible to override the method prepareFilter() that allow you to
+ * transform the filter String. Usually you can return it as lowercase
+ * It is not mandatory but highly recommended to give the JList instance to the
+ * model in order to keep the selection after the filter has been updated
+ *
+ * @author Matthieu Casanova
+ * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
+ * @since jEdit 4.3pre11
+ */
+public abstract class FilteredListModel<E extends ListModel> extends AbstractListModel implements ListDataListener
+{
+ /**
+ * The delegated table model.
+ */
+ protected E delegated;
+
+ private Vector<Integer> filteredIndices;
+
+ /**
+ * This map contains the delegated indices as key and true indices as values.
+ */
+ private Map<Integer, Integer> invertedIndices;
+
+ private String filter;
+
+ private JList list;
+
+ //{{{ FilteredTableModel() constructor
+ protected FilteredListModel(E delegated)
+ {
+ this.delegated = delegated;
+ delegated.addListDataListener(this);
+ resetFilter();
+ } //}}}
+
+ //{{{ setList() method
+ /**
+ * Set the JList that uses this model.
+ * It is used to restore the selection after the filter has been applied
+ * If it is null,
+ *
+ * @param list the list that uses the model
+ */
+ public void setList(JList list)
+ {
+ if (list.getModel() != this)
+ throw new IllegalArgumentException("The given list " + list + " doesn't use this model " + this);
+ this.list = list;
+ } //}}}
+
+ //{{{ getDelegated() method
+ public E getDelegated()
+ {
+ return delegated;
+ } //}}}
+
+ //{{{ setDelegated() method
+ public void setDelegated(E delegated)
+ {
+ this.delegated.removeListDataListener(this);
+ delegated.addListDataListener(this);
+ this.delegated = delegated;
+ } //}}}
+
+ //{{{ resetFilter() method
+ private void resetFilter()
+ {
+ filteredIndices = null;
+ } //}}}
+
+ //{{{ setFilter() method
+ public void setFilter(final String filter)
+ {
+ Runnable runner = new Runnable()
+ {
+ public void run()
+ {
+ Set<Integer> selectedIndices = saveSelection();
+ list.clearSelection();
+ FilteredListModel.this.filter = filter;
+ if (filter != null && filter.length() > 0)
+ {
+ int size = delegated.getSize();
+ String prepped_filter = prepareFilter(filter);
+ Vector<Integer> indices = new Vector<Integer>(size);
+ Map<Integer, Integer> invertedIndices = new HashMap<Integer, Integer>();
+ for (int i = 0; i < size; i++)
+ {
+ if (passFilter(i, prepped_filter))
+ {
+ Integer delegatedIndice = Integer.valueOf(i);
+ indices.add(delegatedIndice);
+
+ invertedIndices.put(delegatedIndice, indices.size() - 1);
+ }
+ }
+ FilteredListModel.this.invertedIndices = invertedIndices;
+ filteredIndices = indices;
+ }
+ else
+ resetFilter();
+
+ fireContentsChanged(this, 0, getSize() - 1);
+ restoreSelection(selectedIndices);
+ }
+ };
+ SwingUtilities.invokeLater(runner);
+ } //}}}
+
+ //{{{ prepareFilter() method
+ public String prepareFilter(String filter)
+ {
+ return filter;
+ } //}}}
+
+ //{{{ passFilter() method
+ /**
+ * This callback indicates if a row passes the filter.
+ *
+ * @param row the row number the delegate row count
+ * @param filter the filter string
+ * @return true if the row must be visible
+ */
+ public abstract boolean passFilter(int row, String filter);
+ //}}}
+
+ //{{{ saveSelection()
+ protected Set<Integer> saveSelection()
+ {
+ if (list == null)
+ return null;
+ int[] rows = list.getSelectedIndices();
+ if (rows.length == 0)
+ return null;
+
+ Set<Integer> selectedRows = new HashSet<Integer>(rows.length);
+ for (int row : rows)
+ {
+ selectedRows.add(getTrueRow(row));
+ }
+ return selectedRows;
+ } //}}}
+
+ //{{{ restoreSelection() method
+ protected void restoreSelection(Set<Integer> selectedIndices)
+ {
+ if (selectedIndices == null || getSize() == 0)
+ return;
+
+ // To correctly handle "single interval" selection mode,
+ // each interval has to be selected using a single call to
+ // setSelectionInterval; calling setSelectionInterval on
+ // each item cancels the previous selection.
+ // Sort the list of selected indices to simplify interval
+ // identification.
+ Vector<Integer> sel = new Vector<Integer>(selectedIndices);
+ Collections.sort(sel);
+ int from = -1;
+ int to = -1;
+ for (Integer selectedIndex : sel)
+ {
+ int i = getInternal2ExternalRow(selectedIndex.intValue());
+ if (i != -1)
+ {
+ if (from == -1)
+ from = to = i;
+ else if (i == to + 1)
+ to = i;
+ else
+ {
+ list.setSelectionInterval(from, to);
+ from = to = i;
+ }
+ }
+ }
+ if (from != -1)
+ list.setSelectionInterval(from, to);
+ } //}}}
+
+ //{{{ getTrueRow() method
+ /**
+ * Converts a row index from the JTable to an internal row index from the delegated model.
+ *
+ * @param rowIndex the row index
+ * @return the row index in the delegated model
+ */
+ public int getTrueRow(int rowIndex)
+ {
+ if (filteredIndices == null)
+ return rowIndex;
+ return filteredIndices.get(rowIndex).intValue();
+ } //}}}
+
+ //{{{ getInternal2ExternalRow() method
+ /**
+ * Converts a row index from the delegated table model into a row index of the JTable.
+ *
+ * @param internalRowIndex the internal row index
+ * @return the table row index or -1 if this row is not visible
+ */
+ public int getInternal2ExternalRow(int internalRowIndex)
+ {
+ if (invertedIndices == null)
+ return internalRowIndex;
+
+ Integer externalRowIndex = invertedIndices.get(internalRowIndex);
+ if (externalRowIndex == null)
+ return -1;
+
+ return externalRowIndex.intValue();
+ } //}}}
+
+ //{{{ getElementAt() method
+ public Object getElementAt(int index)
+ {
+ int trueRowIndex = getTrueRow(index);
+ return delegated.getElementAt(trueRowIndex);
+ } //}}}
+
+ //{{{ getSize() method
+ public int getSize()
+ {
+ if (filteredIndices == null)
+ return delegated.getSize();
+ return filteredIndices.size();
+ } //}}}
+
+ //{{{ contentsChanged() method
+ public void contentsChanged(ListDataEvent e)
+ {
+ setFilter(filter);
+ } //}}}
+
+ //{{{ intervalAdded() method
+ public void intervalAdded(ListDataEvent e)
+ {
+ setFilter(filter);
+ } //}}}
+
+ //{{{ intervalRemoved() method
+ public void intervalRemoved(ListDataEvent e)
+ {
+ setFilter(filter);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/FilteredTableModel.java b/jEdit/org/gjt/sp/jedit/gui/FilteredTableModel.java
index 4f4355a..76b0ea0 100644
--- a/jEdit/org/gjt/sp/jedit/gui/FilteredTableModel.java
+++ b/jEdit/org/gjt/sp/jedit/gui/FilteredTableModel.java
@@ -1,298 +1,298 @@
-/*
- * FilteredTableModel.java - A Filtered table model decorator
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Shlomy Reinstein
- * Copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.gui;
-
-import javax.swing.*;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
-import javax.swing.table.AbstractTableModel;
-import javax.swing.table.TableModel;
-import java.util.*;
-
-/**
- * This TableModel delegates another model to add some filtering features to any
- * JTable.
- * To use it you must implement the abstract method passFilter().
- * This method is called for each row, and must return true if the row should be
- * visible, and false otherwise.
- * It is also possible to override the method prepareFilter() that allow you to
- * transform the filter String. Usually you can return it as lowercase
- * <p/>
- * Here is an example of how to use it extracted from the InstallPanel
- * <code>
- * PluginTableModel tableModel = new PluginTableModel();
- * filteredTableModel = new FilteredTableModel<PluginTableModel>(tableModel)
- * {
- * public String prepareFilter(String filter)
- * {
- * return filter.toLowerCase();
- * }
- * <p/>
- * public boolean passFilter(int row, String filter)
- * {
- * String pluginName = (String) delegated.getValueAt(row, 1);
- * return pluginName.toLowerCase().contains(filter);
- * }
- * };
- * table = new JTable(filteredTableModel);
- * filteredTableModel.setTable(table);
- * </code>
- * It is not mandatory but highly recommended to give the JTable instance to the
- * model in order to keep the selection after the filter has been updated
- *
- * @author Shlomy Reinstein
- * @author Matthieu Casanova
- * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
- * @since jEdit 4.3pre11
- */
-public abstract class FilteredTableModel<E extends TableModel> extends AbstractTableModel implements TableModelListener
-{
- /**
- * The delegated table model.
- */
- protected E delegated;
-
- private Vector<Integer> filteredIndices;
-
- /**
- * This map contains the delegated indices as key and true indices as values.
- */
- private Map<Integer, Integer> invertedIndices;
-
- private String filter;
-
- private JTable table;
-
- //{{{ FilteredTableModel() constructor
- protected FilteredTableModel(E delegated)
- {
- this.delegated = delegated;
- delegated.addTableModelListener(this);
- resetFilter();
- } //}}}
-
- //{{{ setTable() method
- /**
- * Set the JTable that uses this model.
- * It is used to restore the selection after the filter has been applied
- * If it is null,
- *
- * @param table the table that uses the model
- */
- public void setTable(JTable table)
- {
- if (table.getModel() != this)
- throw new IllegalArgumentException("The given table " + table + " doesn't use this model " + this);
- this.table = table;
- } //}}}
-
-
- //{{{ getDelegated() method
- public E getDelegated()
- {
- return delegated;
- } //}}}
-
- //{{{ setDelegated() method
- public void setDelegated(E delegated)
- {
- this.delegated.removeTableModelListener(this);
- delegated.addTableModelListener(this);
- this.delegated = delegated;
- } //}}}
-
- //{{{ resetFilter() method
- private void resetFilter()
- {
- filteredIndices = null;
- } //}}}
-
- //{{{ setFilter() method
- public void setFilter(String filter)
- {
- Set<Integer> selectedIndices = saveSelection();
- this.filter = filter;
- if (filter != null && filter.length() > 0)
- {
- int size = delegated.getRowCount();
- filter = prepareFilter(filter);
- Vector<Integer> indices = new Vector<Integer>(size);
- Map<Integer, Integer> invertedIndices = new HashMap<Integer, Integer>();
- for (int i = 0; i < size; i++)
- {
- if (passFilter(i, filter))
- {
- Integer delegatedIndice = Integer.valueOf(i);
- indices.add(delegatedIndice);
-
- invertedIndices.put(delegatedIndice, indices.size() - 1);
- }
- }
- this.invertedIndices = invertedIndices;
- filteredIndices = indices;
- }
- else
- resetFilter();
-
- fireTableDataChanged();
- restoreSelection(selectedIndices);
- } //}}}
-
- //{{{ prepareFilter() method
- public String prepareFilter(String filter)
- {
- return filter;
- } //}}}
-
- //{{{ passFilter() method
- /**
- * This callback indicates if a row passes the filter.
- *
- * @param row the row number the delegate row count
- * @param filter the filter string
- * @return true if the row must be visible
- */
- public abstract boolean passFilter(int row, String filter);
- //}}}
-
- //{{{ saveSelection()
-
- private Set<Integer> saveSelection()
- {
- if (table == null)
- return null;
- int[] rows = table.getSelectedRows();
- if (rows.length == 0)
- return null;
-
- Set<Integer> selectedRows = new HashSet<Integer>(rows.length);
- for (int row : rows)
- {
- selectedRows.add(getTrueRow(row));
- }
- return selectedRows;
- } //}}}
-
- //{{{ restoreSelection() method
- private void restoreSelection(Set<Integer> selectedIndices)
- {
- if (selectedIndices == null || getRowCount() == 0)
- return;
-
- for (Integer selectedIndex : selectedIndices)
- {
- int i = getInternal2ExternalRow(selectedIndex.intValue());
- if (i != -1)
- table.getSelectionModel().setSelectionInterval(i, i);
- }
- } //}}}
-
- //{{{ getRowCount() method
- public int getRowCount()
- {
- if (filteredIndices == null)
- return delegated.getRowCount();
- return filteredIndices.size();
- } //}}}
-
- //{{{ getColumnCount() method
- public int getColumnCount()
- {
- return delegated.getColumnCount();
- } //}}}
-
- //{{{ getColumnName() method
- public String getColumnName(int columnIndex)
- {
- return delegated.getColumnName(columnIndex);
- } //}}}
-
- //{{{ getColumnClass() method
- public Class<?> getColumnClass(int columnIndex)
- {
- return delegated.getColumnClass(columnIndex);
- } //}}}
-
- //{{{ isCellEditable() method
- public boolean isCellEditable(int rowIndex, int columnIndex)
- {
- int trueRowIndex = getTrueRow(rowIndex);
- return delegated.isCellEditable(trueRowIndex, columnIndex);
- } //}}}
-
- //{{{ getValueAt() method
- public Object getValueAt(int rowIndex, int columnIndex)
- {
- int trueRowIndex = getTrueRow(rowIndex);
- return delegated.getValueAt(trueRowIndex, columnIndex);
- } //}}}
-
- //{{{ setValueAt() method
- public void setValueAt(Object aValue, int rowIndex, int columnIndex)
- {
- int trueRowIndex = getTrueRow(rowIndex);
- delegated.setValueAt(aValue, trueRowIndex, columnIndex);
- } //}}}
-
- //{{{ getTrueRow() method
- /**
- * Converts a row index from the JTable to an internal row index from the delegated model.
- *
- * @param rowIndex the row index
- * @return the row index in the delegated model
- */
- public int getTrueRow(int rowIndex)
- {
- if (filteredIndices == null)
- return rowIndex;
- return filteredIndices.get(rowIndex).intValue();
- } //}}}
-
- //{{{ getInternal2ExternalRow() method
- /**
- * Converts a row index from the delegated table model into a row index of the JTable.
- *
- * @param internalRowIndex the internal row index
- * @return the table row index or -1 if this row is not visible
- */
- public int getInternal2ExternalRow(int internalRowIndex)
- {
- if (invertedIndices == null)
- return internalRowIndex;
-
- Integer externalRowIndex = invertedIndices.get(internalRowIndex);
- if (externalRowIndex == null)
- return -1;
-
- return externalRowIndex.intValue();
- } //}}}
-
- /**
- * This fine grain notification tells listeners the exact range
- * of cells, rows, or columns that changed.
- */
- public void tableChanged(TableModelEvent e)
- {
- setFilter(filter);
- }
-}
+/*
+ * FilteredTableModel.java - A Filtered table model decorator
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Shlomy Reinstein
+ * Copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.gui;
+
+import javax.swing.*;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.TableModel;
+import java.util.*;
+
+/**
+ * This TableModel delegates another model to add some filtering features to any
+ * JTable.
+ * To use it you must implement the abstract method passFilter().
+ * This method is called for each row, and must return true if the row should be
+ * visible, and false otherwise.
+ * It is also possible to override the method prepareFilter() that allow you to
+ * transform the filter String. Usually you can return it as lowercase
+ * <p/>
+ * Here is an example of how to use it extracted from the InstallPanel
+ * <code>
+ * PluginTableModel tableModel = new PluginTableModel();
+ * filteredTableModel = new FilteredTableModel<PluginTableModel>(tableModel)
+ * {
+ * public String prepareFilter(String filter)
+ * {
+ * return filter.toLowerCase();
+ * }
+ * <p/>
+ * public boolean passFilter(int row, String filter)
+ * {
+ * String pluginName = (String) delegated.getValueAt(row, 1);
+ * return pluginName.toLowerCase().contains(filter);
+ * }
+ * };
+ * table = new JTable(filteredTableModel);
+ * filteredTableModel.setTable(table);
+ * </code>
+ * It is not mandatory but highly recommended to give the JTable instance to the
+ * model in order to keep the selection after the filter has been updated
+ *
+ * @author Shlomy Reinstein
+ * @author Matthieu Casanova
+ * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
+ * @since jEdit 4.3pre11
+ */
+public abstract class FilteredTableModel<E extends TableModel> extends AbstractTableModel implements TableModelListener
+{
+ /**
+ * The delegated table model.
+ */
+ protected E delegated;
+
+ private Vector<Integer> filteredIndices;
+
+ /**
+ * This map contains the delegated indices as key and true indices as values.
+ */
+ private Map<Integer, Integer> invertedIndices;
+
+ private String filter;
+
+ private JTable table;
+
+ //{{{ FilteredTableModel() constructor
+ protected FilteredTableModel(E delegated)
+ {
+ this.delegated = delegated;
+ delegated.addTableModelListener(this);
+ resetFilter();
+ } //}}}
+
+ //{{{ setTable() method
+ /**
+ * Set the JTable that uses this model.
+ * It is used to restore the selection after the filter has been applied
+ * If it is null,
+ *
+ * @param table the table that uses the model
+ */
+ public void setTable(JTable table)
+ {
+ if (table.getModel() != this)
+ throw new IllegalArgumentException("The given table " + table + " doesn't use this model " + this);
+ this.table = table;
+ } //}}}
+
+
+ //{{{ getDelegated() method
+ public E getDelegated()
+ {
+ return delegated;
+ } //}}}
+
+ //{{{ setDelegated() method
+ public void setDelegated(E delegated)
+ {
+ this.delegated.removeTableModelListener(this);
+ delegated.addTableModelListener(this);
+ this.delegated = delegated;
+ } //}}}
+
+ //{{{ resetFilter() method
+ private void resetFilter()
+ {
+ filteredIndices = null;
+ } //}}}
+
+ //{{{ setFilter() method
+ public void setFilter(String filter)
+ {
+ Set<Integer> selectedIndices = saveSelection();
+ this.filter = filter;
+ if (filter != null && filter.length() > 0)
+ {
+ int size = delegated.getRowCount();
+ filter = prepareFilter(filter);
+ Vector<Integer> indices = new Vector<Integer>(size);
+ Map<Integer, Integer> invertedIndices = new HashMap<Integer, Integer>();
+ for (int i = 0; i < size; i++)
+ {
+ if (passFilter(i, filter))
+ {
+ Integer delegatedIndice = Integer.valueOf(i);
+ indices.add(delegatedIndice);
+
+ invertedIndices.put(delegatedIndice, indices.size() - 1);
+ }
+ }
+ this.invertedIndices = invertedIndices;
+ filteredIndices = indices;
+ }
+ else
+ resetFilter();
+
+ fireTableDataChanged();
+ restoreSelection(selectedIndices);
+ } //}}}
+
+ //{{{ prepareFilter() method
+ public String prepareFilter(String filter)
+ {
+ return filter;
+ } //}}}
+
+ //{{{ passFilter() method
+ /**
+ * This callback indicates if a row passes the filter.
+ *
+ * @param row the row number the delegate row count
+ * @param filter the filter string
+ * @return true if the row must be visible
+ */
+ public abstract boolean passFilter(int row, String filter);
+ //}}}
+
+ //{{{ saveSelection()
+
+ private Set<Integer> saveSelection()
+ {
+ if (table == null)
+ return null;
+ int[] rows = table.getSelectedRows();
+ if (rows.length == 0)
+ return null;
+
+ Set<Integer> selectedRows = new HashSet<Integer>(rows.length);
+ for (int row : rows)
+ {
+ selectedRows.add(getTrueRow(row));
+ }
+ return selectedRows;
+ } //}}}
+
+ //{{{ restoreSelection() method
+ private void restoreSelection(Set<Integer> selectedIndices)
+ {
+ if (selectedIndices == null || getRowCount() == 0)
+ return;
+
+ for (Integer selectedIndex : selectedIndices)
+ {
+ int i = getInternal2ExternalRow(selectedIndex.intValue());
+ if (i != -1)
+ table.getSelectionModel().setSelectionInterval(i, i);
+ }
+ } //}}}
+
+ //{{{ getRowCount() method
+ public int getRowCount()
+ {
+ if (filteredIndices == null)
+ return delegated.getRowCount();
+ return filteredIndices.size();
+ } //}}}
+
+ //{{{ getColumnCount() method
+ public int getColumnCount()
+ {
+ return delegated.getColumnCount();
+ } //}}}
+
+ //{{{ getColumnName() method
+ public String getColumnName(int columnIndex)
+ {
+ return delegated.getColumnName(columnIndex);
+ } //}}}
+
+ //{{{ getColumnClass() method
+ public Class<?> getColumnClass(int columnIndex)
+ {
+ return delegated.getColumnClass(columnIndex);
+ } //}}}
+
+ //{{{ isCellEditable() method
+ public boolean isCellEditable(int rowIndex, int columnIndex)
+ {
+ int trueRowIndex = getTrueRow(rowIndex);
+ return delegated.isCellEditable(trueRowIndex, columnIndex);
+ } //}}}
+
+ //{{{ getValueAt() method
+ public Object getValueAt(int rowIndex, int columnIndex)
+ {
+ int trueRowIndex = getTrueRow(rowIndex);
+ return delegated.getValueAt(trueRowIndex, columnIndex);
+ } //}}}
+
+ //{{{ setValueAt() method
+ public void setValueAt(Object aValue, int rowIndex, int columnIndex)
+ {
+ int trueRowIndex = getTrueRow(rowIndex);
+ delegated.setValueAt(aValue, trueRowIndex, columnIndex);
+ } //}}}
+
+ //{{{ getTrueRow() method
+ /**
+ * Converts a row index from the JTable to an internal row index from the delegated model.
+ *
+ * @param rowIndex the row index
+ * @return the row index in the delegated model
+ */
+ public int getTrueRow(int rowIndex)
+ {
+ if (filteredIndices == null)
+ return rowIndex;
+ return filteredIndices.get(rowIndex).intValue();
+ } //}}}
+
+ //{{{ getInternal2ExternalRow() method
+ /**
+ * Converts a row index from the delegated table model into a row index of the JTable.
+ *
+ * @param internalRowIndex the internal row index
+ * @return the table row index or -1 if this row is not visible
+ */
+ public int getInternal2ExternalRow(int internalRowIndex)
+ {
+ if (invertedIndices == null)
+ return internalRowIndex;
+
+ Integer externalRowIndex = invertedIndices.get(internalRowIndex);
+ if (externalRowIndex == null)
+ return -1;
+
+ return externalRowIndex.intValue();
+ } //}}}
+
+ /**
+ * This fine grain notification tells listeners the exact range
+ * of cells, rows, or columns that changed.
+ */
+ public void tableChanged(TableModelEvent e)
+ {
+ setFilter(filter);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/FloatingWindowContainer.java b/jEdit/org/gjt/sp/jedit/gui/FloatingWindowContainer.java
index abbc7cd..8b9c910 100644
--- a/jEdit/org/gjt/sp/jedit/gui/FloatingWindowContainer.java
+++ b/jEdit/org/gjt/sp/jedit/gui/FloatingWindowContainer.java
@@ -1,218 +1,218 @@
-/*
- * FloatingWindowContainer.java - holds dockable windows
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.BorderLayout;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.event.KeyListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JPopupMenu;
-import javax.swing.JSeparator;
-import javax.swing.SwingUtilities;
-
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.jEdit;
-//}}}
-
-/**
- * A container for dockable windows. This class should never be used
- * directly.
- * @version $Id: FloatingWindowContainer.java 13259 2008-08-10 20:54:46Z shlomy $
- * @since jEdit 4.0pre1
- */
-public class FloatingWindowContainer extends JFrame implements DockableWindowContainer,
- PropertyChangeListener
-{
- String dockableName = null;
- //{{{ FloatingWindowContainer constructor
- public FloatingWindowContainer(DockableWindowManagerImpl dockableWindowManager,
- boolean clone)
- {
- this.dockableWindowManager = dockableWindowManager;
-
- dockableWindowManager.addPropertyChangeListener(this);
- this.clone = clone;
- setIconImage(GUIUtilities.getPluginIcon());
- setDefaultCloseOperation(DISPOSE_ON_CLOSE);
-
- Box caption = new Box(BoxLayout.X_AXIS);
- caption.add(menu = new RolloverButton(GUIUtilities
- .loadIcon(jEdit.getProperty("dropdown-arrow.icon"))));
- menu.addMouseListener(new MouseHandler());
- menu.setToolTipText(jEdit.getProperty("docking.menu.label"));
- Box separatorBox = new Box(BoxLayout.Y_AXIS);
- separatorBox.add(Box.createVerticalStrut(3));
- separatorBox.add(new JSeparator(JSeparator.HORIZONTAL));
- separatorBox.add(Box.createVerticalStrut(3));
- caption.add(separatorBox);
- getContentPane().add(BorderLayout.NORTH,caption);
-
-
- } //}}}
-
- //{{{ register() method
- public void register(DockableWindowManagerImpl.Entry entry)
- {
- this.entry = entry;
- dockableName = entry.factory.name;
-
- setTitle(entry.shortTitle());
-
- getContentPane().add(BorderLayout.CENTER,entry.win);
-
- pack();
- Container parent = dockableWindowManager.getView();
- GUIUtilities.loadGeometry(this, parent, dockableName);
- GUIUtilities.addSizeSaver(this, parent, dockableName);
- KeyListener listener = dockableWindowManager.closeListener(dockableName);
- addKeyListener(listener);
- getContentPane().addKeyListener(listener);
- menu.addKeyListener(listener);
- entry.win.addKeyListener(listener);
- setVisible(true);
- if (! entry.win.isVisible())
- entry.win.setVisible(true);
- } //}}}
-
- //{{{ remove() method
- public void remove(DockableWindowManagerImpl.Entry entry)
- {
- dispose();
- } //}}}
-
- //{{{ unregister() method
- public void unregister(DockableWindowManagerImpl.Entry entry)
- {
- this.entry = null;
- entry.btn = null;
- entry.container = null;
- // Note: entry.win must not be reset, to enable the dockable
- // instance to be moved instead of recreated if it uses the
- // MOVABLE attribute.
- super.dispose();
- } //}}}
-
- //{{{ show() method
- public void show(final DockableWindowManagerImpl.Entry entry)
- {
- if(entry == null)
- dispose();
- else
- {
- setTitle(entry.longTitle());
- toFront();
- requestFocus();
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- if(entry.win instanceof DefaultFocusComponent)
- {
- ((DefaultFocusComponent)entry.win)
- .focusOnDefaultComponent();
- }
- else
- {
- entry.win.requestFocus();
- }
- }
- });
- }
- } //}}}
-
- //{{{ isVisible() method
- public boolean isVisible(DockableWindowManagerImpl.Entry entry)
- {
- return true;
- } //}}}
-
- //{{{ dispose() method
- @Override
- public void dispose()
- {
- entry.container = null;
- entry.win = null;
- super.dispose();
- } //}}}
-
- //{{{ getDockableWindowManager() method
- public DockableWindowManagerImpl getDockableWindowManager()
- {
- return dockableWindowManager;
- } //}}}
-
- //{{{ getMinimumSize() method
- @Override
- public Dimension getMinimumSize()
- {
- return new Dimension(0,0);
- } //}}}
-
- //{{{ Private members
- private final DockableWindowManagerImpl dockableWindowManager;
- private final boolean clone;
- private DockableWindowManagerImpl.Entry entry;
- private final JButton menu;
- //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- JPopupMenu popup;
-
- @Override
- public void mousePressed(MouseEvent evt)
- {
- if(popup != null && popup.isVisible())
- popup.setVisible(false);
- else
- {
- popup = dockableWindowManager.createPopupMenu(
- FloatingWindowContainer.this,
- entry.factory.name,clone);
- GUIUtilities.showPopupMenu(popup,
- menu,menu.getX(),menu.getY() + menu.getHeight(),
- false);
- }
- }
- } //}}}
- public void propertyChange(PropertyChangeEvent evt)
- {
- if (dockableName == null) return;
- String pn = evt.getPropertyName();
- if (pn.startsWith(dockableName) && pn.endsWith("title"))
- setTitle(evt.getNewValue().toString());
- }
-
-}
-
+/*
+ * FloatingWindowContainer.java - holds dockable windows
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.BorderLayout;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JPopupMenu;
+import javax.swing.JSeparator;
+import javax.swing.SwingUtilities;
+
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+//}}}
+
+/**
+ * A container for dockable windows. This class should never be used
+ * directly.
+ * @version $Id: FloatingWindowContainer.java 13259 2008-08-10 20:54:46Z shlomy $
+ * @since jEdit 4.0pre1
+ */
+public class FloatingWindowContainer extends JFrame implements DockableWindowContainer,
+ PropertyChangeListener
+{
+ String dockableName = null;
+ //{{{ FloatingWindowContainer constructor
+ public FloatingWindowContainer(DockableWindowManagerImpl dockableWindowManager,
+ boolean clone)
+ {
+ this.dockableWindowManager = dockableWindowManager;
+
+ dockableWindowManager.addPropertyChangeListener(this);
+ this.clone = clone;
+ setIconImage(GUIUtilities.getPluginIcon());
+ setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+
+ Box caption = new Box(BoxLayout.X_AXIS);
+ caption.add(menu = new RolloverButton(GUIUtilities
+ .loadIcon(jEdit.getProperty("dropdown-arrow.icon"))));
+ menu.addMouseListener(new MouseHandler());
+ menu.setToolTipText(jEdit.getProperty("docking.menu.label"));
+ Box separatorBox = new Box(BoxLayout.Y_AXIS);
+ separatorBox.add(Box.createVerticalStrut(3));
+ separatorBox.add(new JSeparator(JSeparator.HORIZONTAL));
+ separatorBox.add(Box.createVerticalStrut(3));
+ caption.add(separatorBox);
+ getContentPane().add(BorderLayout.NORTH,caption);
+
+
+ } //}}}
+
+ //{{{ register() method
+ public void register(DockableWindowManagerImpl.Entry entry)
+ {
+ this.entry = entry;
+ dockableName = entry.factory.name;
+
+ setTitle(entry.shortTitle());
+
+ getContentPane().add(BorderLayout.CENTER,entry.win);
+
+ pack();
+ Container parent = dockableWindowManager.getView();
+ GUIUtilities.loadGeometry(this, parent, dockableName);
+ GUIUtilities.addSizeSaver(this, parent, dockableName);
+ KeyListener listener = dockableWindowManager.closeListener(dockableName);
+ addKeyListener(listener);
+ getContentPane().addKeyListener(listener);
+ menu.addKeyListener(listener);
+ entry.win.addKeyListener(listener);
+ setVisible(true);
+ if (! entry.win.isVisible())
+ entry.win.setVisible(true);
+ } //}}}
+
+ //{{{ remove() method
+ public void remove(DockableWindowManagerImpl.Entry entry)
+ {
+ dispose();
+ } //}}}
+
+ //{{{ unregister() method
+ public void unregister(DockableWindowManagerImpl.Entry entry)
+ {
+ this.entry = null;
+ entry.btn = null;
+ entry.container = null;
+ // Note: entry.win must not be reset, to enable the dockable
+ // instance to be moved instead of recreated if it uses the
+ // MOVABLE attribute.
+ super.dispose();
+ } //}}}
+
+ //{{{ show() method
+ public void show(final DockableWindowManagerImpl.Entry entry)
+ {
+ if(entry == null)
+ dispose();
+ else
+ {
+ setTitle(entry.longTitle());
+ toFront();
+ requestFocus();
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ if(entry.win instanceof DefaultFocusComponent)
+ {
+ ((DefaultFocusComponent)entry.win)
+ .focusOnDefaultComponent();
+ }
+ else
+ {
+ entry.win.requestFocus();
+ }
+ }
+ });
+ }
+ } //}}}
+
+ //{{{ isVisible() method
+ public boolean isVisible(DockableWindowManagerImpl.Entry entry)
+ {
+ return true;
+ } //}}}
+
+ //{{{ dispose() method
+ @Override
+ public void dispose()
+ {
+ entry.container = null;
+ entry.win = null;
+ super.dispose();
+ } //}}}
+
+ //{{{ getDockableWindowManager() method
+ public DockableWindowManagerImpl getDockableWindowManager()
+ {
+ return dockableWindowManager;
+ } //}}}
+
+ //{{{ getMinimumSize() method
+ @Override
+ public Dimension getMinimumSize()
+ {
+ return new Dimension(0,0);
+ } //}}}
+
+ //{{{ Private members
+ private final DockableWindowManagerImpl dockableWindowManager;
+ private final boolean clone;
+ private DockableWindowManagerImpl.Entry entry;
+ private final JButton menu;
+ //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ JPopupMenu popup;
+
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ if(popup != null && popup.isVisible())
+ popup.setVisible(false);
+ else
+ {
+ popup = dockableWindowManager.createPopupMenu(
+ FloatingWindowContainer.this,
+ entry.factory.name,clone);
+ GUIUtilities.showPopupMenu(popup,
+ menu,menu.getX(),menu.getY() + menu.getHeight(),
+ false);
+ }
+ }
+ } //}}}
+ public void propertyChange(PropertyChangeEvent evt)
+ {
+ if (dockableName == null) return;
+ String pn = evt.getPropertyName();
+ if (pn.startsWith(dockableName) && pn.endsWith("title"))
+ setTitle(evt.getNewValue().toString());
+ }
+
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/gui/FontSelector.java b/jEdit/org/gjt/sp/jedit/gui/FontSelector.java
index 9b935b2..658292e 100644
--- a/jEdit/org/gjt/sp/jedit/gui/FontSelector.java
+++ b/jEdit/org/gjt/sp/jedit/gui/FontSelector.java
@@ -1,495 +1,166 @@
-/*
- * FontSelector.java - Font selector
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- * Portions copyright (C) 1999 Jason Ginchereau
- * Portions copyright (C) 2003 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.event.*;
-import java.awt.*;
-import java.util.ArrayList;
-import java.util.List;
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-//{{{ FontSelector class
-/**
- * A font chooser widget.
- * @author Slava Pestov
- * @version $Id: FontSelector.java 16341 2009-10-14 10:05:51Z kpouer $
- */
-public class FontSelector extends JButton
-{
- //{{{ FontSelector constructor
- /**
- * Creates a new font selector control.
- * @param font The font
- */
- public FontSelector(Font font)
- {
- this(font,false);
- } //}}}
-
- //{{{ FontSelector constructor
- /**
- * Creates a new font selector control.
- * @param font The font
- * @param antiAlias Is anti-aliasing enabled?
- * @since jEdit 4.2pre7
- */
- public FontSelector(Font font, boolean antiAlias)
- {
- setFont(font);
- this.antiAlias = antiAlias;
-
- updateText();
-
- setRequestFocusEnabled(false);
-
- addActionListener(new ActionHandler());
- } //}}}
-
- //{{{ paintComponent() method
- public void paintComponent(Graphics g)
- {
- setAntiAliasEnabled(g);
- super.paintComponent(g);
- } //}}}
-
- //{{{ isAntiAliasEnabled() method
- public boolean isAntiAliasEnabled()
- {
- return antiAlias;
- } //}}}
-
- //{{{ setAntiAliasEnabled() method
- public void setAntiAliasEnabled(boolean antiAlias)
- {
- this.antiAlias = antiAlias;
- } //}}}
-
- //{{{ updateText() method
- private void updateText()
- {
- Font font = getFont();
- String styleString;
- switch(font.getStyle())
- {
- case Font.PLAIN:
- styleString = jEdit.getProperty("font-selector.plain");
- break;
- case Font.BOLD:
- styleString = jEdit.getProperty("font-selector.bold");
- break;
- case Font.ITALIC:
- styleString = jEdit.getProperty("font-selector.italic");
- break;
- case Font.BOLD | Font.ITALIC:
- styleString = jEdit.getProperty("font-selector.bolditalic");
- break;
- default:
- styleString = "UNKNOWN!!!???";
- break;
- }
-
- setText(font.getName() + ' ' + font.getSize() + ' ' + styleString);
- } //}}}
-
- //{{{ setAntiAliasEnabled() method
- void setAntiAliasEnabled(Graphics g)
- {
- if (antiAlias)
- {
- Graphics2D g2 = (Graphics2D)g;
- g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
- RenderingHints.VALUE_ANTIALIAS_ON);
- }
- } //}}}
-
- private boolean antiAlias;
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Font font;
-
- JDialog dialog = GUIUtilities.getParentDialog(FontSelector.this);
- if(dialog == null)
- {
- font = new FontSelectorDialog(
- JOptionPane.getFrameForComponent(
- FontSelector.this),getFont(),
- FontSelector.this)
- .getSelectedFont();
- }
- else
- {
- font = new FontSelectorDialog(dialog,getFont(),
- FontSelector.this)
- .getSelectedFont();
- }
-
- if(font != null)
- {
- setFont(font);
- updateText();
- }
- }
- } //}}}
-} //}}}
-
-//{{{ FontSelectorDialog class
-class FontSelectorDialog extends EnhancedDialog
-{
- //{{{ FontSelectorDialog constructor
- FontSelectorDialog(Frame parent, Font font)
- {
- super(parent,jEdit.getProperty("font-selector.title"),true);
- init(font);
- } //}}}
-
- //{{{ FontSelectorDialog constructor
- FontSelectorDialog(Dialog parent, Font font)
- {
- super(parent,jEdit.getProperty("font-selector.title"),true);
- init(font);
- } //}}}
-
- //{{{ FontSelectorDialog constructor
- FontSelectorDialog(Frame parent, Font font,
- FontSelector fontSelector)
- {
- super(parent,jEdit.getProperty("font-selector.title"),true);
- this.fontSelector = fontSelector;
- init(font);
- } //}}}
-
- //{{{ FontSelectorDialog constructor
- FontSelectorDialog(Dialog parent, Font font,
- FontSelector fontSelector)
- {
- super(parent,jEdit.getProperty("font-selector.title"),true);
- this.fontSelector = fontSelector;
- init(font);
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- isOK = true;
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ getSelectedFont() method
- public Font getSelectedFont()
- {
- if(!isOK)
- return null;
-
- int size;
- try
- {
- size = Integer.parseInt(sizeField.getText());
- }
- catch(Exception e)
- {
- size = 12;
- }
-
- return new Font(familyField.getText(),styleList
- .getSelectedIndex(),size);
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private FontSelector fontSelector;
- private boolean isOK;
- private JTextField familyField;
- private JList familyList;
- private JTextField sizeField;
- private JList sizeList;
- private JTextField styleField;
- private JList styleList;
- private JLabel preview;
- private JButton ok;
- private JButton cancel;
- //}}}
-
- /**
- * For some reason the default Java fonts show up in the
- * list with .bold, .bolditalic, and .italic extensions.
- */
- private static final String[] HIDEFONTS = {
- ".bold",
- ".italic"
- };
-
- //{{{ init() method
- private void init(Font font)
- {
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- JPanel listPanel = new JPanel(new GridLayout(1,3,6,6));
-
- String[] fonts;
- try
- {
- fonts = getFontList();
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,"Broken Java implementation!");
- /* Log.log(Log.ERROR,this,"Using deprecated Toolkit.getFontList()"); */
- Log.log(Log.ERROR,this,e);
-
- /* fonts = getToolkit().getFontList(); */
- fonts = new String[] { "Broken Java implementation!" };
- }
-
- JPanel familyPanel = createTextFieldAndListPanel(
- "font-selector.family",
- familyField = new JTextField(),
- familyList = new JList(fonts));
- listPanel.add(familyPanel);
-
- String[] sizes = { "9", "10", "12", "14", "16", "18", "24" };
- JPanel sizePanel = createTextFieldAndListPanel(
- "font-selector.size",
- sizeField = new JTextField(),
- sizeList = new JList(sizes));
- listPanel.add(sizePanel);
-
- String[] styles = {
- jEdit.getProperty("font-selector.plain"),
- jEdit.getProperty("font-selector.bold"),
- jEdit.getProperty("font-selector.italic"),
- jEdit.getProperty("font-selector.bolditalic")
- };
-
- JPanel stylePanel = createTextFieldAndListPanel(
- "font-selector.style",
- styleField = new JTextField(),
- styleList = new JList(styles));
- styleField.setEditable(false);
- listPanel.add(stylePanel);
-
- familyList.setSelectedValue(font.getFamily(),true);
- familyField.setText(font.getFamily());
- sizeList.setSelectedValue(String.valueOf(font.getSize()),true);
- sizeField.setText(String.valueOf(font.getSize()));
- styleList.setSelectedIndex(font.getStyle());
- styleField.setText((String)styleList.getSelectedValue());
-
- ListHandler listHandler = new ListHandler();
- familyList.addListSelectionListener(listHandler);
- sizeList.addListSelectionListener(listHandler);
- styleList.addListSelectionListener(listHandler);
-
- content.add(BorderLayout.NORTH,listPanel);
-
- preview = new JLabel(jEdit.getProperty("font-selector.long-text"))
- {
- public void paintComponent(Graphics g)
- {
- if(fontSelector != null)
- fontSelector.setAntiAliasEnabled(g);
- super.paintComponent(g);
- }
- };
- preview.setBorder(new TitledBorder(jEdit.getProperty(
- "font-selector.preview")));
-
- updatePreview();
-
- Dimension prefSize = preview.getPreferredSize();
- prefSize.height = 50;
- preview.setPreferredSize(prefSize);
-
- content.add(BorderLayout.CENTER,preview);
-
- JPanel buttons = new JPanel();
- buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
- buttons.setBorder(new EmptyBorder(12,0,0,0));
- buttons.add(Box.createGlue());
-
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(new ActionHandler());
- getRootPane().setDefaultButton(ok);
- buttons.add(ok);
-
- buttons.add(Box.createHorizontalStrut(6));
-
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(new ActionHandler());
- buttons.add(cancel);
-
- buttons.add(Box.createGlue());
-
- content.add(BorderLayout.SOUTH,buttons);
-
- pack();
- setLocationRelativeTo(getParent());
- setVisible(true);
- } //}}}
-
- //{{{ getFontList() method
- private static String[] getFontList()
- {
- String[] nameArray = GraphicsEnvironment
- .getLocalGraphicsEnvironment()
- .getAvailableFontFamilyNames();
- List<String> nameVector = new ArrayList<String>(nameArray.length);
-
- for(int i = 0, j; i < nameArray.length; i++)
- {
- for(j = 0; j < HIDEFONTS.length; j++)
- {
- if(nameArray[i].contains(HIDEFONTS[j]))
- break;
- }
-
- if(j == HIDEFONTS.length)
- nameVector.add(nameArray[i]);
- }
-
- String[] _array = new String[nameVector.size()];
- return nameVector.toArray(_array);
- } //}}}
-
- //{{{ createTextFieldAndListPanel() method
- private static JPanel createTextFieldAndListPanel(String label,
- JTextField textField, JList list)
- {
- GridBagLayout layout = new GridBagLayout();
- JPanel panel = new JPanel(layout);
-
- GridBagConstraints cons = new GridBagConstraints();
- cons.gridx = cons.gridy = 0;
- cons.gridwidth = cons.gridheight = 1;
- cons.fill = GridBagConstraints.BOTH;
- cons.weightx = 1.0f;
-
- JLabel _label = new JLabel(jEdit.getProperty(label));
- layout.setConstraints(_label,cons);
- panel.add(_label);
-
- cons.gridy = 1;
- Component vs = Box.createVerticalStrut(6);
- layout.setConstraints(vs,cons);
- panel.add(vs);
-
- cons.gridy = 2;
- layout.setConstraints(textField,cons);
- panel.add(textField);
-
- cons.gridy = 3;
- vs = Box.createVerticalStrut(6);
- layout.setConstraints(vs,cons);
- panel.add(vs);
-
- cons.gridy = 4;
- cons.gridheight = GridBagConstraints.REMAINDER;
- cons.weighty = 1.0f;
- JScrollPane scroller = new JScrollPane(list);
- layout.setConstraints(scroller,cons);
- panel.add(scroller);
-
- return panel;
- } //}}}
-
- //{{{ updatePreview() method
- private void updatePreview()
- {
- String family = familyField.getText();
- int size;
- try
- {
- size = Integer.parseInt(sizeField.getText());
- }
- catch(Exception e)
- {
- size = 12;
- }
- int style = styleList.getSelectedIndex();
-
- preview.setFont(new Font(family,style,size));
- } //}}}
-
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == ok)
- ok();
- else if(evt.getSource() == cancel)
- cancel();
- }
- } //}}}
-
- //{{{ ListHandler class
- class ListHandler implements ListSelectionListener
- {
- public void valueChanged(ListSelectionEvent evt)
- {
- Object source = evt.getSource();
- if(source == familyList)
- {
- String family = (String)familyList.getSelectedValue();
- if(family != null)
- familyField.setText(family);
- }
- else if(source == sizeList)
- {
- String size = (String)sizeList.getSelectedValue();
- if(size != null)
- sizeField.setText(size);
- }
- else if(source == styleList)
- {
- String style = (String)styleList.getSelectedValue();
- if(style != null)
- styleField.setText(style);
- }
-
- updatePreview();
- }
- } //}}}
-} //}}}
+/*
+ * FontSelector.java - Font selector
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ * Portions copyright (C) 1999 Jason Ginchereau
+ * Portions copyright (C) 2003 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.event.*;
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.border.*;
+import javax.swing.event.*;
+import javax.swing.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+//{{{ FontSelector class
+/**
+ * A font chooser widget.
+ * @author Slava Pestov
+ * @version $Id: FontSelector.java 17430 2010-03-07 03:16:20Z vanza $
+ */
+public class FontSelector extends JButton
+{
+ //{{{ FontSelector constructor
+ /**
+ * Creates a new font selector control.
+ * @param font The font
+ */
+ public FontSelector(Font font)
+ {
+ this(font,false);
+ } //}}}
+
+ //{{{ FontSelector constructor
+ /**
+ * Creates a new font selector control.
+ * @param font The font
+ * @param antiAlias Is anti-aliasing enabled?
+ * @since jEdit 4.2pre7
+ */
+ public FontSelector(Font font, boolean antiAlias)
+ {
+ setFont(font);
+ this.antiAlias = antiAlias;
+
+ updateText();
+
+ setRequestFocusEnabled(false);
+
+ addActionListener(new ActionHandler());
+ } //}}}
+
+ //{{{ paintComponent() method
+ public void paintComponent(Graphics g)
+ {
+ setAntiAliasEnabled(g);
+ super.paintComponent(g);
+ } //}}}
+
+ //{{{ isAntiAliasEnabled() method
+ public boolean isAntiAliasEnabled()
+ {
+ return antiAlias;
+ } //}}}
+
+ //{{{ setAntiAliasEnabled() method
+ public void setAntiAliasEnabled(boolean antiAlias)
+ {
+ this.antiAlias = antiAlias;
+ } //}}}
+
+ //{{{ updateText() method
+ private void updateText()
+ {
+ Font font = getFont();
+ String styleString;
+ switch(font.getStyle())
+ {
+ case Font.PLAIN:
+ styleString = jEdit.getProperty("font-selector.plain");
+ break;
+ case Font.BOLD:
+ styleString = jEdit.getProperty("font-selector.bold");
+ break;
+ case Font.ITALIC:
+ styleString = jEdit.getProperty("font-selector.italic");
+ break;
+ case Font.BOLD | Font.ITALIC:
+ styleString = jEdit.getProperty("font-selector.bolditalic");
+ break;
+ default:
+ styleString = "UNKNOWN!!!???";
+ break;
+ }
+
+ setText(font.getName() + ' ' + font.getSize() + ' ' + styleString);
+ } //}}}
+
+ //{{{ setAntiAliasEnabled() method
+ void setAntiAliasEnabled(Graphics g)
+ {
+ if (antiAlias)
+ {
+ Graphics2D g2 = (Graphics2D)g;
+ g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.VALUE_ANTIALIAS_ON);
+ }
+ } //}}}
+
+ private boolean antiAlias;
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Font font;
+
+ JDialog dialog = GUIUtilities.getParentDialog(FontSelector.this);
+ if(dialog == null)
+ {
+ font = new FontSelectorDialog(
+ JOptionPane.getFrameForComponent(
+ FontSelector.this),getFont(),
+ FontSelector.this)
+ .getSelectedFont();
+ }
+ else
+ {
+ font = new FontSelectorDialog(dialog,getFont(),
+ FontSelector.this)
+ .getSelectedFont();
+ }
+
+ if(font != null)
+ {
+ setFont(font);
+ updateText();
+ }
+ }
+ } //}}}
+} //}}}
+
diff --git a/jEdit/org/gjt/sp/jedit/gui/FontSelectorDialog.java b/jEdit/org/gjt/sp/jedit/gui/FontSelectorDialog.java
new file mode 100644
index 0000000..f14cada
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/gui/FontSelectorDialog.java
@@ -0,0 +1,386 @@
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ * Portions copyright (C) 1999 Jason Ginchereau
+ * Portions copyright (C) 2003 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.event.*;
+import java.util.ArrayList;
+import java.util.List;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+
+
+/**
+ * A dialog for choosing fonts.
+ *
+ * @author Slava Pestov
+ * @version $Id: FontSelectorDialog.java 17430 2010-03-07 03:16:20Z vanza $
+ * @since jEdit 4.4pre1
+ */
+
+public class FontSelectorDialog extends EnhancedDialog
+{
+ //{{{ FontSelectorDialog constructor
+ public FontSelectorDialog(Frame parent,
+ Font font)
+ {
+ super(parent,jEdit.getProperty("font-selector.title"),true);
+ init(font);
+ } //}}}
+
+ //{{{ FontSelectorDialog constructor
+ public FontSelectorDialog(Dialog parent,
+ Font font)
+ {
+ super(parent,jEdit.getProperty("font-selector.title"),true);
+ init(font);
+ } //}}}
+
+ //{{{ FontSelectorDialog constructor
+ FontSelectorDialog(Frame parent,
+ Font font,
+ FontSelector fontSelector)
+ {
+ super(parent,jEdit.getProperty("font-selector.title"),true);
+ this.fontSelector = fontSelector;
+ init(font);
+ } //}}}
+
+ //{{{ FontSelectorDialog constructor
+ FontSelectorDialog(Dialog parent,
+ Font font,
+ FontSelector fontSelector)
+ {
+ super(parent,jEdit.getProperty("font-selector.title"),true);
+ this.fontSelector = fontSelector;
+ init(font);
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ isOK = true;
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ getSelectedFont() method
+ public Font getSelectedFont()
+ {
+ if(!isOK)
+ return null;
+
+ int size;
+ try
+ {
+ size = Integer.parseInt(sizeField.getText());
+ }
+ catch(Exception e)
+ {
+ size = 12;
+ }
+
+ return new Font(familyField.getText(),styleList
+ .getSelectedIndex(),size);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private FontSelector fontSelector;
+ private boolean isOK;
+ private JTextField familyField;
+ private JList familyList;
+ private JTextField sizeField;
+ private JList sizeList;
+ private JTextField styleField;
+ private JList styleList;
+ private JLabel preview;
+ private JButton ok;
+ private JButton cancel;
+ //}}}
+
+ /**
+ * For some reason the default Java fonts show up in the
+ * list with .bold, .bolditalic, and .italic extensions.
+ */
+ private static final String[] HIDEFONTS = {
+ ".bold",
+ ".italic"
+ };
+
+ //{{{ init() method
+ private void init(Font font)
+ {
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ JPanel listPanel = new JPanel(new GridLayout(1,3,6,6));
+
+ String[] fonts;
+ try
+ {
+ fonts = getFontList();
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,"Broken Java implementation!");
+ /* Log.log(Log.ERROR,this,"Using deprecated Toolkit.getFontList()"); */
+ Log.log(Log.ERROR,this,e);
+
+ /* fonts = getToolkit().getFontList(); */
+ fonts = new String[] { "Broken Java implementation!" };
+ }
+
+ JPanel familyPanel = createTextFieldAndListPanel(
+ "font-selector.family",
+ familyField = new JTextField(),
+ familyList = new JList(fonts));
+ listPanel.add(familyPanel);
+
+ String[] sizes = { "9", "10", "12", "14", "16", "18", "24" };
+ JPanel sizePanel = createTextFieldAndListPanel(
+ "font-selector.size",
+ sizeField = new JTextField(),
+ sizeList = new JList(sizes));
+ listPanel.add(sizePanel);
+
+ String[] styles = {
+ jEdit.getProperty("font-selector.plain"),
+ jEdit.getProperty("font-selector.bold"),
+ jEdit.getProperty("font-selector.italic"),
+ jEdit.getProperty("font-selector.bolditalic")
+ };
+
+ JPanel stylePanel = createTextFieldAndListPanel(
+ "font-selector.style",
+ styleField = new JTextField(),
+ styleList = new JList(styles));
+ styleField.setEditable(false);
+ listPanel.add(stylePanel);
+
+ if (font != null)
+ {
+ familyList.setSelectedValue(font.getFamily(),true);
+ familyField.setText(font.getFamily());
+ sizeList.setSelectedValue(String.valueOf(font.getSize()),true);
+ sizeField.setText(String.valueOf(font.getSize()));
+ styleList.setSelectedIndex(font.getStyle());
+ }
+ else
+ {
+ sizeList.setSelectedValue("12", true);
+ styleList.setSelectedIndex(Font.PLAIN);
+ }
+
+ styleField.setText((String)styleList.getSelectedValue());
+
+ ListHandler listHandler = new ListHandler();
+ familyList.addListSelectionListener(listHandler);
+ sizeList.addListSelectionListener(listHandler);
+ styleList.addListSelectionListener(listHandler);
+
+ content.add(BorderLayout.NORTH,listPanel);
+
+ preview = new JLabel(jEdit.getProperty("font-selector.long-text"))
+ {
+ public void paintComponent(Graphics g)
+ {
+ if(fontSelector != null)
+ fontSelector.setAntiAliasEnabled(g);
+ super.paintComponent(g);
+ }
+ };
+ preview.setBorder(new TitledBorder(jEdit.getProperty(
+ "font-selector.preview")));
+
+ updatePreview();
+
+ Dimension prefSize = preview.getPreferredSize();
+ prefSize.height = 50;
+ preview.setPreferredSize(prefSize);
+
+ content.add(BorderLayout.CENTER,preview);
+
+ JPanel buttons = new JPanel();
+ buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
+ buttons.setBorder(new EmptyBorder(12,0,0,0));
+ buttons.add(Box.createGlue());
+
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(new ActionHandler());
+ getRootPane().setDefaultButton(ok);
+ buttons.add(ok);
+
+ buttons.add(Box.createHorizontalStrut(6));
+
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(new ActionHandler());
+ buttons.add(cancel);
+
+ buttons.add(Box.createGlue());
+
+ content.add(BorderLayout.SOUTH,buttons);
+
+ pack();
+ setLocationRelativeTo(getParent());
+ setVisible(true);
+ } //}}}
+
+ //{{{ getFontList() method
+ private static String[] getFontList()
+ {
+ String[] nameArray = GraphicsEnvironment
+ .getLocalGraphicsEnvironment()
+ .getAvailableFontFamilyNames();
+ List<String> nameVector = new ArrayList<String>(nameArray.length);
+
+ for(int i = 0, j; i < nameArray.length; i++)
+ {
+ for(j = 0; j < HIDEFONTS.length; j++)
+ {
+ if(nameArray[i].contains(HIDEFONTS[j]))
+ break;
+ }
+
+ if(j == HIDEFONTS.length)
+ nameVector.add(nameArray[i]);
+ }
+
+ String[] _array = new String[nameVector.size()];
+ return nameVector.toArray(_array);
+ } //}}}
+
+ //{{{ createTextFieldAndListPanel() method
+ private static JPanel createTextFieldAndListPanel(String label,
+ JTextField textField, JList list)
+ {
+ GridBagLayout layout = new GridBagLayout();
+ JPanel panel = new JPanel(layout);
+
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.gridx = cons.gridy = 0;
+ cons.gridwidth = cons.gridheight = 1;
+ cons.fill = GridBagConstraints.BOTH;
+ cons.weightx = 1.0f;
+
+ JLabel _label = new JLabel(jEdit.getProperty(label));
+ layout.setConstraints(_label,cons);
+ panel.add(_label);
+
+ cons.gridy = 1;
+ Component vs = Box.createVerticalStrut(6);
+ layout.setConstraints(vs,cons);
+ panel.add(vs);
+
+ cons.gridy = 2;
+ layout.setConstraints(textField,cons);
+ panel.add(textField);
+
+ cons.gridy = 3;
+ vs = Box.createVerticalStrut(6);
+ layout.setConstraints(vs,cons);
+ panel.add(vs);
+
+ cons.gridy = 4;
+ cons.gridheight = GridBagConstraints.REMAINDER;
+ cons.weighty = 1.0f;
+ JScrollPane scroller = new JScrollPane(list);
+ layout.setConstraints(scroller,cons);
+ panel.add(scroller);
+
+ return panel;
+ } //}}}
+
+ //{{{ updatePreview() method
+ private void updatePreview()
+ {
+ String family = familyField.getText();
+ int size;
+ try
+ {
+ size = Integer.parseInt(sizeField.getText());
+ }
+ catch(Exception e)
+ {
+ size = 12;
+ }
+ int style = styleList.getSelectedIndex();
+
+ preview.setFont(new Font(family,style,size));
+ } //}}}
+
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == ok)
+ ok();
+ else if(evt.getSource() == cancel)
+ cancel();
+ }
+ } //}}}
+
+ //{{{ ListHandler class
+ class ListHandler implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == familyList)
+ {
+ String family = (String)familyList.getSelectedValue();
+ if(family != null)
+ familyField.setText(family);
+ }
+ else if(source == sizeList)
+ {
+ String size = (String)sizeList.getSelectedValue();
+ if(size != null)
+ sizeField.setText(size);
+ }
+ else if(source == styleList)
+ {
+ String style = (String)styleList.getSelectedValue();
+ if(style != null)
+ styleField.setText(style);
+ }
+
+ updatePreview();
+ }
+ } //}}}
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/gui/GrabKeyDialog.java b/jEdit/org/gjt/sp/jedit/gui/GrabKeyDialog.java
index 539ef1f..5990024 100644
--- a/jEdit/org/gjt/sp/jedit/gui/GrabKeyDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/GrabKeyDialog.java
@@ -1,560 +1,550 @@
-/*
- * GrabKeyDialog.java - Grabs keys from the keyboard
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.lang.reflect.Field;
-import java.util.List;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.input.AbstractInputHandler;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * A dialog for getting shortcut keys.
- */
-public class GrabKeyDialog extends JDialog
-{
- //{{{ toString() method
- /**
- * @deprecated use {@link org.gjt.sp.jedit.input.AbstractInputHandler#toString(java.awt.event.KeyEvent)}
- */
- @Deprecated
- public static String toString(KeyEvent evt)
- {
- return AbstractInputHandler.toString(evt);
- } //}}}
-
- //{{{ GrabKeyDialog constructor
- /**
- * Create and show a new modal dialog.
- *
- * @param parent center dialog on this component.
- * @param binding the action/macro that should get a binding.
- * @param allBindings all other key bindings.
- * @param debugBuffer debug info will be dumped to this buffer
- * (may be null)
- * @since jEdit 4.1pre7
- */
- public GrabKeyDialog(Dialog parent, KeyBinding binding,
- List<KeyBinding> allBindings, Buffer debugBuffer)
- {
- super(parent,jEdit.getProperty("grab-key.title"),true);
-
- init(binding,allBindings,debugBuffer);
- } //}}}
-
- //{{{ GrabKeyDialog constructor
- /**
- * Create and show a new modal dialog.
- *
- * @param parent center dialog on this component.
- * @param binding the action/macro that should get a binding.
- * @param allBindings all other key bindings.
- * @param debugBuffer debug info will be dumped to this buffer
- * (may be null)
- * @since jEdit 4.1pre7
- */
- public GrabKeyDialog(Frame parent, KeyBinding binding,
- List<KeyBinding> allBindings, Buffer debugBuffer)
- {
- super(parent,jEdit.getProperty("grab-key.title"),true);
-
- init(binding,allBindings,debugBuffer);
- } //}}}
-
- //{{{ getShortcut() method
- /**
- * Returns the shortcut, or null if the current shortcut should be
- * removed or the dialog either has been cancelled. Use isOK()
- * to determine if the latter is true.
- */
- public String getShortcut()
- {
- if(isOK)
- return shortcut.getText();
- else
- return null;
- } //}}}
-
- //{{{ isOK() method
- /**
- * Returns true, if the dialog has not been cancelled.
- * @since jEdit 3.2pre9
- */
- public boolean isOK()
- {
- return isOK;
- } //}}}
-
- //{{{ isManagingFocus() method
- /**
- * Returns if this component can be traversed by pressing the
- * Tab key. This returns false.
- */
- public boolean isManagingFocus()
- {
- return false;
- } //}}}
-
- //{{{ getFocusTraversalKeysEnabled() method
- /**
- * Makes the tab key work in Java 1.4.
- * @since jEdit 3.2pre4
- */
- @Override
- public boolean getFocusTraversalKeysEnabled()
- {
- return false;
- } //}}}
-
- //{{{ processKeyEvent() method
- @Override
- protected void processKeyEvent(KeyEvent evt)
- {
- shortcut.processKeyEvent(evt);
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private InputPane shortcut; // this is a bad hack
- private JLabel assignedTo;
- private JButton ok;
- private JButton remove;
- private JButton cancel;
- private JButton clear;
- private boolean isOK;
- private KeyBinding binding;
- private List<KeyBinding> allBindings;
- private Buffer debugBuffer;
- //}}}
-
- //{{{ init() method
- private void init(KeyBinding binding, List<KeyBinding> allBindings, Buffer debugBuffer)
- {
- this.binding = binding;
- this.allBindings = allBindings;
- this.debugBuffer = debugBuffer;
-
- enableEvents(AWTEvent.KEY_EVENT_MASK);
-
- // create a panel with a BoxLayout. Can't use Box here
- // because Box doesn't have setBorder().
- JPanel content = new JPanel(new GridLayout(0,1,0,6))
- {
- /**
- * Makes the tab key work in Java 1.4.
- * @since jEdit 3.2pre4
- */
- @Override
- public boolean getFocusTraversalKeysEnabled()
- {
- return false;
- }
- };
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- JLabel label = new JLabel(
- debugBuffer == null ? jEdit.getProperty(
- "grab-key.caption",new String[] { binding.label })
- : jEdit.getProperty("grab-key.keyboard-test"));
-
- Box input = Box.createHorizontalBox();
-
- shortcut = new InputPane();
- Dimension size = shortcut.getPreferredSize();
- size.width = Integer.MAX_VALUE;
- shortcut.setMaximumSize(size);
- input.add(shortcut);
- input.add(Box.createHorizontalStrut(12));
-
- clear = new JButton(jEdit.getProperty("grab-key.clear"));
- clear.addActionListener(new ActionHandler());
- input.add(clear);
-
- assignedTo = new JLabel();
- if(debugBuffer == null)
- updateAssignedTo(null);
-
- Box buttons = Box.createHorizontalBox();
- buttons.add(Box.createGlue());
-
- if(debugBuffer == null)
- {
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(new ActionHandler());
- buttons.add(ok);
- buttons.add(Box.createHorizontalStrut(12));
-
- if(binding.isAssigned())
- {
- // show "remove" button
- remove = new JButton(jEdit.getProperty("grab-key.remove"));
- remove.addActionListener(new ActionHandler());
- buttons.add(remove);
- buttons.add(Box.createHorizontalStrut(12));
- }
- }
-
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(new ActionHandler());
- buttons.add(cancel);
- buttons.add(Box.createGlue());
-
- content.add(label);
- content.add(input);
- if(debugBuffer == null)
- content.add(assignedTo);
- content.add(buttons);
-
- setDefaultCloseOperation(DISPOSE_ON_CLOSE);
-
- pack();
- setLocationRelativeTo(getParent());
- setResizable(false);
- setVisible(true);
- } //}}}
-
- //{{{ getSymbolicName() method
- public static String getSymbolicName(int keyCode)
- {
- if (Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,GrabKeyDialog.class,"getSymbolicName("+keyCode+").");
- }
-
- if(keyCode == KeyEvent.VK_UNDEFINED)
- return null;
- /* else if(keyCode == KeyEvent.VK_OPEN_BRACKET)
- return "[";
- else if(keyCode == KeyEvent.VK_CLOSE_BRACKET)
- return "]"; */
-
- if(keyCode >= KeyEvent.VK_A && keyCode <= KeyEvent.VK_Z)
- return String.valueOf(Character.toLowerCase((char)keyCode));
-
- try
- {
- Field[] fields = KeyEvent.class.getFields();
- for(int i = 0; i < fields.length; i++)
- {
- Field field = fields[i];
- String name = field.getName();
- if(name.startsWith("VK_")
- && field.getInt(null) == keyCode)
- {
- return name.substring(3);
- }
- }
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,GrabKeyDialog.class,e);
- }
-
- return null;
- } //}}}
-
- //{{{ updateAssignedTo() method
- private void updateAssignedTo(String shortcut)
- {
- String text = jEdit.getProperty("grab-key.assigned-to.none");
- KeyBinding kb = getKeyBinding(shortcut);
-
- if(kb != null)
- if(kb.isPrefix)
- text = jEdit.getProperty(
- "grab-key.assigned-to.prefix",
- new String[] { shortcut });
- else
- text = kb.label;
-
- if(ok != null)
- ok.setEnabled(kb == null || !kb.isPrefix);
-
- assignedTo.setText(
- jEdit.getProperty("grab-key.assigned-to",
- new String[] { text }));
- } //}}}
-
- //{{{ getKeyBinding() method
- private KeyBinding getKeyBinding(String shortcut)
- {
- if(shortcut == null || shortcut.length() == 0)
- return null;
-
- String spacedShortcut = shortcut + ' ';
-
- for (KeyBinding kb : allBindings)
- {
- if (!kb.isAssigned())
- continue;
-
- String spacedKbShortcut = kb.shortcut + ' ';
-
- // eg, trying to bind C+n C+p if C+n already bound
- if (spacedShortcut.startsWith(spacedKbShortcut))
- return kb;
-
- // eg, trying to bind C+e if C+e is a prefix
- if (spacedKbShortcut.startsWith(spacedShortcut))
- {
- // create a temporary (synthetic) prefix
- // KeyBinding, that won't be saved
- return new KeyBinding(kb.name, kb.label,
- shortcut, true);
- }
- }
-
- return null;
- } //}}}
-
- //}}}
-
- //{{{ KeyBinding class
- /**
- * A jEdit action or macro with its two possible shortcuts.
- * @since jEdit 3.2pre8
- */
- public static class KeyBinding
- {
- public KeyBinding(String name, String label,
- String shortcut, boolean isPrefix)
- {
- this.name = name;
- this.label = label;
- this.shortcut = shortcut;
- this.isPrefix = isPrefix;
- }
-
- public String name;
- public String label;
- public String shortcut;
- public boolean isPrefix;
-
- public boolean isAssigned()
- {
- return shortcut != null && shortcut.length() > 0;
- }
- } //}}}
-
- //{{{ InputPane class
- private class InputPane extends JTextField
- {
- //{{{ getFocusTraversalKeysEnabled() method
- /**
- * Makes the tab key work in Java 1.4.
- * @since jEdit 3.2pre4
- */
- @Override
- public boolean getFocusTraversalKeysEnabled()
- {
- return false;
- } //}}}
-
- //{{{ processKeyEvent() method
- @Override
- protected void processKeyEvent(KeyEvent _evt)
- {
- KeyEvent evt = KeyEventWorkaround.processKeyEvent(_evt);
- if(!KeyEventWorkaround.isBindable(_evt.getKeyCode()))
- evt = null;
-
- if(debugBuffer != null)
- {
- debugBuffer.insert(debugBuffer.getLength(),
- "Event " + AbstractInputHandler.toString(_evt)
- + (evt == null ? " filtered\n"
- : " passed\n"));
- }
-
- if(evt == null)
- return;
-
- evt.consume();
-
- KeyEventTranslator.Key key = KeyEventTranslator
- .translateKeyEvent(evt);
-
- if (Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,GrabKeyDialog.class,"processKeyEvent() key="+key+", _evt="+_evt+'.');
- }
-
- if(key == null)
- return;
-
- if(debugBuffer != null)
- {
- debugBuffer.insert(debugBuffer.getLength(),
- "==> Translated to " + key + '\n');
- }
-
- StringBuilder keyString = new StringBuilder(getText());
-
- if(getDocument().getLength() != 0)
- keyString.append(' ');
-
- if(key.modifiers != null)
- {
- keyString.append(key.modifiers).append('+');
- }
-
- String symbolicName = getSymbolicName(key.key);
-
- if(symbolicName != null)
- {
- keyString.append(symbolicName);
- }
- else
- {
- if (key.input != '\0')
- {
- if (key.input == ' ')
- {
- keyString.append("SPACE");
- }
- else
- {
- keyString.append(key.input);
- }
- }
- else
- {
- return;
- }
- }
-
- setText(keyString.toString());
- if(debugBuffer == null)
- updateAssignedTo(keyString.toString());
- } //}}}
- } //}}}
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == ok)
- {
- if(canClose())
- dispose();
- }
- else if(evt.getSource() == remove)
- {
- shortcut.setText(null);
- isOK = true;
- dispose();
- }
- else if(evt.getSource() == cancel)
- dispose();
- else if(evt.getSource() == clear)
- {
- shortcut.setText(null);
- if(debugBuffer == null)
- updateAssignedTo(null);
- shortcut.requestFocus();
- }
- } //}}}
-
- //{{{ canClose() method
- private boolean canClose()
- {
- String shortcutString = shortcut.getText();
- if(shortcutString.length() == 0
- && binding.isAssigned())
- {
- // ask whether to remove the old shortcut
- int answer = GUIUtilities.confirm(
- GrabKeyDialog.this,
- "grab-key.remove-ask",
- null,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- if(answer == JOptionPane.YES_OPTION)
- {
- shortcut.setText(null);
- isOK = true;
- }
- else
- return false;
- }
-
- // check whether this shortcut already exists
- KeyBinding other = getKeyBinding(shortcutString);
- if(other == null || other == binding)
- {
- isOK = true;
- return true;
- }
-
- // check whether the other shortcut is the alt. shortcut
- if(other.name == binding.name)
- {
- // we don't need two identical shortcuts
- GUIUtilities.error(GrabKeyDialog.this,
- "grab-key.duplicate-alt-shortcut",
- null);
- return false;
- }
-
- // check whether shortcut is a prefix to others
- if(other.isPrefix)
- {
- // can't override prefix shortcuts
- GUIUtilities.error(GrabKeyDialog.this,
- "grab-key.prefix-shortcut",
- null);
- return false;
- }
-
- // ask whether to override that other shortcut
- int answer = GUIUtilities.confirm(GrabKeyDialog.this,
- "grab-key.duplicate-shortcut",
- new Object[] { other.label },
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- if(answer == JOptionPane.YES_OPTION)
- {
- if(other.shortcut != null
- && shortcutString.startsWith(other.shortcut))
- {
- other.shortcut = null;
- }
- isOK = true;
- return true;
- }
- else
- return false;
- } //}}}
- } //}}}
-}
+/*
+ * GrabKeyDialog.java - Grabs keys from the keyboard
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.lang.reflect.Field;
+import java.util.List;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.input.AbstractInputHandler;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * A dialog for getting shortcut keys.
+ */
+public class GrabKeyDialog extends JDialog
+{
+ //{{{ toString() method
+ /**
+ * @deprecated use {@link org.gjt.sp.jedit.input.AbstractInputHandler#toString(java.awt.event.KeyEvent)}
+ */
+ @Deprecated
+ public static String toString(KeyEvent evt)
+ {
+ return AbstractInputHandler.toString(evt);
+ } //}}}
+
+ //{{{ GrabKeyDialog constructor
+ /**
+ * Create and show a new modal dialog.
+ *
+ * @param parent center dialog on this component.
+ * @param binding the action/macro that should get a binding.
+ * @param allBindings all other key bindings.
+ * @param debugBuffer debug info will be dumped to this buffer
+ * (may be null)
+ * @since jEdit 4.1pre7
+ */
+ public GrabKeyDialog(Dialog parent, KeyBinding binding,
+ List<KeyBinding> allBindings, Buffer debugBuffer)
+ {
+ super(parent,jEdit.getProperty("grab-key.title"),true);
+
+ init(binding,allBindings,debugBuffer);
+ } //}}}
+
+ //{{{ GrabKeyDialog constructor
+ /**
+ * Create and show a new modal dialog.
+ *
+ * @param parent center dialog on this component.
+ * @param binding the action/macro that should get a binding.
+ * @param allBindings all other key bindings.
+ * @param debugBuffer debug info will be dumped to this buffer
+ * (may be null)
+ * @since jEdit 4.1pre7
+ */
+ public GrabKeyDialog(Frame parent, KeyBinding binding,
+ List<KeyBinding> allBindings, Buffer debugBuffer)
+ {
+ super(parent,jEdit.getProperty("grab-key.title"),true);
+
+ init(binding,allBindings,debugBuffer);
+ } //}}}
+
+ //{{{ getShortcut() method
+ /**
+ * Returns the shortcut, or null if the current shortcut should be
+ * removed or the dialog either has been cancelled. Use isOK()
+ * to determine if the latter is true.
+ */
+ public String getShortcut()
+ {
+ if(isOK)
+ return shortcut.getText();
+ else
+ return null;
+ } //}}}
+
+ //{{{ isOK() method
+ /**
+ * Returns true, if the dialog has not been cancelled.
+ * @since jEdit 3.2pre9
+ */
+ public boolean isOK()
+ {
+ return isOK;
+ } //}}}
+
+ //{{{ getFocusTraversalKeysEnabled() method
+ /**
+ * Makes the tab key work in Java 1.4.
+ * @since jEdit 3.2pre4
+ */
+ @Override
+ public boolean getFocusTraversalKeysEnabled()
+ {
+ return false;
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ @Override
+ protected void processKeyEvent(KeyEvent evt)
+ {
+ shortcut.processKeyEvent(evt);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private InputPane shortcut; // this is a bad hack
+ private JLabel assignedTo;
+ private JButton ok;
+ private JButton remove;
+ private JButton cancel;
+ private JButton clear;
+ private boolean isOK;
+ private KeyBinding binding;
+ private List<KeyBinding> allBindings;
+ private Buffer debugBuffer;
+ //}}}
+
+ //{{{ init() method
+ private void init(KeyBinding binding, List<KeyBinding> allBindings, Buffer debugBuffer)
+ {
+ this.binding = binding;
+ this.allBindings = allBindings;
+ this.debugBuffer = debugBuffer;
+
+ enableEvents(AWTEvent.KEY_EVENT_MASK);
+
+ // create a panel with a BoxLayout. Can't use Box here
+ // because Box doesn't have setBorder().
+ JPanel content = new JPanel(new GridLayout(0,1,0,6))
+ {
+ /**
+ * Makes the tab key work in Java 1.4.
+ * @since jEdit 3.2pre4
+ */
+ @Override
+ public boolean getFocusTraversalKeysEnabled()
+ {
+ return false;
+ }
+ };
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ JLabel label = new JLabel(
+ debugBuffer == null ? jEdit.getProperty(
+ "grab-key.caption",new String[] { binding.label })
+ : jEdit.getProperty("grab-key.keyboard-test"));
+
+ Box input = Box.createHorizontalBox();
+
+ shortcut = new InputPane();
+ Dimension size = shortcut.getPreferredSize();
+ size.width = Integer.MAX_VALUE;
+ shortcut.setMaximumSize(size);
+ input.add(shortcut);
+ input.add(Box.createHorizontalStrut(12));
+
+ clear = new JButton(jEdit.getProperty("grab-key.clear"));
+ clear.addActionListener(new ActionHandler());
+ input.add(clear);
+
+ assignedTo = new JLabel();
+ if(debugBuffer == null)
+ updateAssignedTo(null);
+
+ Box buttons = Box.createHorizontalBox();
+ buttons.add(Box.createGlue());
+
+ if(debugBuffer == null)
+ {
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(new ActionHandler());
+ buttons.add(ok);
+ buttons.add(Box.createHorizontalStrut(12));
+
+ if(binding.isAssigned())
+ {
+ // show "remove" button
+ remove = new JButton(jEdit.getProperty("grab-key.remove"));
+ remove.addActionListener(new ActionHandler());
+ buttons.add(remove);
+ buttons.add(Box.createHorizontalStrut(12));
+ }
+ }
+
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(new ActionHandler());
+ buttons.add(cancel);
+ buttons.add(Box.createGlue());
+
+ content.add(label);
+ content.add(input);
+ if(debugBuffer == null)
+ content.add(assignedTo);
+ content.add(buttons);
+
+ setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+
+ pack();
+ setLocationRelativeTo(getParent());
+ setResizable(false);
+ setVisible(true);
+ } //}}}
+
+ //{{{ getSymbolicName() method
+ public static String getSymbolicName(int keyCode)
+ {
+ if (Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,GrabKeyDialog.class,"getSymbolicName("+keyCode+").");
+ }
+
+ if(keyCode == KeyEvent.VK_UNDEFINED)
+ return null;
+ /* else if(keyCode == KeyEvent.VK_OPEN_BRACKET)
+ return "[";
+ else if(keyCode == KeyEvent.VK_CLOSE_BRACKET)
+ return "]"; */
+
+ if(keyCode >= KeyEvent.VK_A && keyCode <= KeyEvent.VK_Z)
+ return String.valueOf(Character.toLowerCase((char)keyCode));
+
+ try
+ {
+ Field[] fields = KeyEvent.class.getFields();
+ for(int i = 0; i < fields.length; i++)
+ {
+ Field field = fields[i];
+ String name = field.getName();
+ if(name.startsWith("VK_")
+ && field.getInt(null) == keyCode)
+ {
+ return name.substring(3);
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,GrabKeyDialog.class,e);
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ updateAssignedTo() method
+ private void updateAssignedTo(String shortcut)
+ {
+ String text = jEdit.getProperty("grab-key.assigned-to.none");
+ KeyBinding kb = getKeyBinding(shortcut);
+
+ if(kb != null)
+ if(kb.isPrefix)
+ text = jEdit.getProperty(
+ "grab-key.assigned-to.prefix",
+ new String[] { shortcut });
+ else
+ text = kb.label;
+
+ if(ok != null)
+ ok.setEnabled(kb == null || !kb.isPrefix);
+
+ assignedTo.setText(
+ jEdit.getProperty("grab-key.assigned-to",
+ new String[] { text }));
+ } //}}}
+
+ //{{{ getKeyBinding() method
+ private KeyBinding getKeyBinding(String shortcut)
+ {
+ if(shortcut == null || shortcut.length() == 0)
+ return null;
+
+ String spacedShortcut = shortcut + ' ';
+
+ for (KeyBinding kb : allBindings)
+ {
+ if (!kb.isAssigned())
+ continue;
+
+ String spacedKbShortcut = kb.shortcut + ' ';
+
+ // eg, trying to bind C+n C+p if C+n already bound
+ if (spacedShortcut.startsWith(spacedKbShortcut))
+ return kb;
+
+ // eg, trying to bind C+e if C+e is a prefix
+ if (spacedKbShortcut.startsWith(spacedShortcut))
+ {
+ // create a temporary (synthetic) prefix
+ // KeyBinding, that won't be saved
+ return new KeyBinding(kb.name, kb.label,
+ shortcut, true);
+ }
+ }
+
+ return null;
+ } //}}}
+
+ //}}}
+
+ //{{{ KeyBinding class
+ /**
+ * A jEdit action or macro with its two possible shortcuts.
+ * @since jEdit 3.2pre8
+ */
+ public static class KeyBinding
+ {
+ public KeyBinding(String name, String label,
+ String shortcut, boolean isPrefix)
+ {
+ this.name = name;
+ this.label = label;
+ this.shortcut = shortcut;
+ this.isPrefix = isPrefix;
+ }
+
+ public String name;
+ public String label;
+ public String shortcut;
+ public boolean isPrefix;
+
+ public boolean isAssigned()
+ {
+ return shortcut != null && shortcut.length() > 0;
+ }
+ } //}}}
+
+ //{{{ InputPane class
+ private class InputPane extends JTextField
+ {
+ //{{{ getFocusTraversalKeysEnabled() method
+ /**
+ * Makes the tab key work in Java 1.4.
+ * @since jEdit 3.2pre4
+ */
+ @Override
+ public boolean getFocusTraversalKeysEnabled()
+ {
+ return false;
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ @Override
+ protected void processKeyEvent(KeyEvent _evt)
+ {
+ KeyEvent evt = KeyEventWorkaround.processKeyEvent(_evt);
+ if(!KeyEventWorkaround.isBindable(_evt.getKeyCode()))
+ evt = null;
+
+ if(debugBuffer != null)
+ {
+ debugBuffer.insert(debugBuffer.getLength(),
+ "Event " + AbstractInputHandler.toString(_evt)
+ + (evt == null ? " filtered\n"
+ : " passed\n"));
+ }
+
+ if(evt == null)
+ return;
+
+ evt.consume();
+
+ KeyEventTranslator.Key key = KeyEventTranslator
+ .translateKeyEvent(evt);
+
+ if (Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,GrabKeyDialog.class,"processKeyEvent() key="+key+", _evt="+_evt+'.');
+ }
+
+ if(key == null)
+ return;
+
+ if(debugBuffer != null)
+ {
+ debugBuffer.insert(debugBuffer.getLength(),
+ "==> Translated to " + key + '\n');
+ }
+
+ StringBuilder keyString = new StringBuilder(getText());
+
+ if(getDocument().getLength() != 0)
+ keyString.append(' ');
+
+ if(key.modifiers != null)
+ {
+ keyString.append(key.modifiers).append('+');
+ }
+
+ String symbolicName = getSymbolicName(key.key);
+
+ if(symbolicName != null)
+ {
+ keyString.append(symbolicName);
+ }
+ else
+ {
+ if (key.input != '\0')
+ {
+ if (key.input == ' ')
+ {
+ keyString.append("SPACE");
+ }
+ else
+ {
+ keyString.append(key.input);
+ }
+ }
+ else
+ {
+ return;
+ }
+ }
+
+ setText(keyString.toString());
+ if(debugBuffer == null)
+ updateAssignedTo(keyString.toString());
+ } //}}}
+ } //}}}
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == ok)
+ {
+ if(canClose())
+ dispose();
+ }
+ else if(evt.getSource() == remove)
+ {
+ shortcut.setText(null);
+ isOK = true;
+ dispose();
+ }
+ else if(evt.getSource() == cancel)
+ dispose();
+ else if(evt.getSource() == clear)
+ {
+ shortcut.setText(null);
+ if(debugBuffer == null)
+ updateAssignedTo(null);
+ shortcut.requestFocus();
+ }
+ } //}}}
+
+ //{{{ canClose() method
+ private boolean canClose()
+ {
+ String shortcutString = shortcut.getText();
+ if(shortcutString.length() == 0
+ && binding.isAssigned())
+ {
+ // ask whether to remove the old shortcut
+ int answer = GUIUtilities.confirm(
+ GrabKeyDialog.this,
+ "grab-key.remove-ask",
+ null,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ if(answer == JOptionPane.YES_OPTION)
+ {
+ shortcut.setText(null);
+ isOK = true;
+ }
+ else
+ return false;
+ }
+
+ // check whether this shortcut already exists
+ KeyBinding other = getKeyBinding(shortcutString);
+ if(other == null || other == binding)
+ {
+ isOK = true;
+ return true;
+ }
+
+ // check whether the other shortcut is the alt. shortcut
+ if(other.name == binding.name)
+ {
+ // we don't need two identical shortcuts
+ GUIUtilities.error(GrabKeyDialog.this,
+ "grab-key.duplicate-alt-shortcut",
+ null);
+ return false;
+ }
+
+ // check whether shortcut is a prefix to others
+ if(other.isPrefix)
+ {
+ // can't override prefix shortcuts
+ GUIUtilities.error(GrabKeyDialog.this,
+ "grab-key.prefix-shortcut",
+ null);
+ return false;
+ }
+
+ // ask whether to override that other shortcut
+ int answer = GUIUtilities.confirm(GrabKeyDialog.this,
+ "grab-key.duplicate-shortcut",
+ new Object[] { other.label },
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ if(answer == JOptionPane.YES_OPTION)
+ {
+ if(other.shortcut != null
+ && shortcutString.startsWith(other.shortcut))
+ {
+ other.shortcut = null;
+ }
+ isOK = true;
+ return true;
+ }
+ else
+ return false;
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/HistoryModel.java b/jEdit/org/gjt/sp/jedit/gui/HistoryModel.java
index 949c7a8..38a28ca 100644
--- a/jEdit/org/gjt/sp/jedit/gui/HistoryModel.java
+++ b/jEdit/org/gjt/sp/jedit/gui/HistoryModel.java
@@ -1,178 +1,226 @@
-/*
- * HistoryModel.java - History list model
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.DefaultListModel;
-import java.util.*;
-//}}}
-
-/**
- * A history list. One history list can be used by several history text
- * fields. Note that the list model implementation is incomplete; no events
- * are fired when the history model changes.
- *
- * @author Slava Pestov
- * @version $Id: HistoryModel.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class HistoryModel extends DefaultListModel
- implements MutableListModel
-{
- //{{{ HistoryModel constructor
- /**
- * Creates a new history list. Calling this is normally not
- * necessary.
- */
- public HistoryModel(String name)
- {
- this.name = name;
- } //}}}
-
- //{{{ addItem() method
- /**
- * Adds an item to the end of this history list, trimming the list
- * to the maximum number of items if necessary.
- * @param text The item
- */
- public void addItem(String text)
- {
- if(text == null || text.length() == 0)
- return;
-
- int index = indexOf(text);
- if(index != -1)
- removeElementAt(index);
-
- insertElementAt(text,0);
-
- while(getSize() > max)
- removeElementAt(getSize() - 1);
- } //}}}
-
- //{{{ insertElementAt() method
- public void insertElementAt(Object obj, int index)
- {
- modified = true;
- super.insertElementAt(obj,index);
- } //}}}
-
- //{{{ getItem() method
- /**
- * Returns an item from the history list.
- * @param index The index
- */
- public String getItem(int index)
- {
- return (String)elementAt(index);
- } //}}}
-
- //{{{ removeElement() method
- public boolean removeElement(Object obj)
- {
- modified = true;
- return super.removeElement(obj);
- } //}}}
-
- //{{{ clear() method
- /**
- * @deprecated Call <code>removeAllElements()</code> instead.
- */
- public void clear()
- {
- removeAllElements();
- } //}}}
-
- //{{{ removeAllElements() method
- public void removeAllElements()
- {
- modified = true;
- super.removeAllElements();
- } //}}}
-
- //{{{ getName() method
- /**
- * Returns the name of this history list. This can be passed
- * to the HistoryTextField constructor.
- */
- public String getName()
- {
- return name;
- } //}}}
-
- //{{{ getModel() method
- /**
- * Returns a named model. If the specified model does not
- * already exist, it will be created.
- * @param name The model name
- */
- public static HistoryModel getModel(String name)
- {
- if(models == null)
- models = Collections.synchronizedMap(new HashMap<String, HistoryModel>());
-
- HistoryModel model = models.get(name);
- if(model == null)
- {
- model = new HistoryModel(name);
- models.put(name,model);
- }
-
- return model;
- } //}}}
-
- //{{{ loadHistory() method
- public static void loadHistory()
- {
- if (saver != null)
- models = saver.load(models);
- } //}}}
-
- //{{{ saveHistory() method
- public static void saveHistory()
- {
- if (saver != null && modified && saver.save(models))
- modified = false;
- } //}}}
-
- //{{{ setMax() method
- public static void setMax(int max)
- {
- HistoryModel.max = max;
- } //}}}
-
- //{{{ setSaver() method
- public static void setSaver(HistoryModelSaver saver)
- {
- HistoryModel.saver = saver;
- } //}}}
-
- //{{{ Private members
- private static int max;
-
- private String name;
- private static Map<String, HistoryModel> models;
-
- private static boolean modified;
- private static HistoryModelSaver saver;
- //}}}
-}
+/*
+ * HistoryModel.java - History list model
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2005 Slava Pestov
+ * Copyright (C) 2010 Eric Le Lay
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.DefaultListModel;
+import java.util.*;
+//}}}
+
+/**
+ * A history list. One history list can be used by several history text
+ * fields. Note that the list model implementation is incomplete; no events
+ * are fired when the history model changes.
+ * The max size of the history is defined globally via setDefaultMax(),
+ * see jEdit.java for instance.
+ * It may be locally overriden by calling setMax() on a HistoryModel instance.
+ *
+ * @author Slava Pestov
+ * @author Eric Le Lay
+ * @version $Id: HistoryModel.java 18200 2010-07-13 19:38:43Z daleanson $
+ */
+public class HistoryModel extends DefaultListModel
+ implements MutableListModel
+{
+ //{{{ HistoryModel constructor
+ /**
+ * Creates a new history list. Calling this is normally not
+ * necessary.
+ */
+ public HistoryModel(String name)
+ {
+ this.name = name;
+ this.max = -1;
+ } //}}}
+
+ //{{{ addItem() method
+ /**
+ * Adds an item to the end of this history list, trimming the list
+ * to the maximum number of items if necessary.
+ * @param text The item
+ */
+ public void addItem(String text)
+ {
+ if(text == null || text.length() == 0)
+ return;
+
+ int index = indexOf(text);
+ if(index != -1)
+ removeElementAt(index);
+
+ insertElementAt(text,0);
+
+ // use the local max unless it's not set
+ int myMax = max>=0 ? max : defaultMax;
+ while(getSize() > myMax)
+ removeElementAt(getSize() - 1);
+ } //}}}
+
+ //{{{ insertElementAt() method
+ @Override
+ public void insertElementAt(Object obj, int index)
+ {
+ modified = true;
+ super.insertElementAt(obj,index);
+ } //}}}
+
+ //{{{ getItem() method
+ /**
+ * Returns an item from the history list.
+ * @param index The index
+ */
+ public String getItem(int index)
+ {
+ return (String)elementAt(index);
+ } //}}}
+
+ //{{{ removeElement() method
+ @Override
+ public boolean removeElement(Object obj)
+ {
+ modified = true;
+ return super.removeElement(obj);
+ } //}}}
+
+ //{{{ clear() method
+ /**
+ * @deprecated Call <code>removeAllElements()</code> instead.
+ */
+ @Override
+ @Deprecated
+ public void clear()
+ {
+ removeAllElements();
+ } //}}}
+
+ //{{{ removeAllElements() method
+ @Override
+ public void removeAllElements()
+ {
+ modified = true;
+ super.removeAllElements();
+ } //}}}
+
+ //{{{ getName() method
+ /**
+ * Returns the name of this history list. This can be passed
+ * to the HistoryTextField constructor.
+ */
+ public String getName()
+ {
+ return name;
+ } //}}}
+
+ //{{{ getModel() method
+ /**
+ * Returns a named model. If the specified model does not
+ * already exist, it will be created.
+ * @param name The model name
+ */
+ public static HistoryModel getModel(String name)
+ {
+ if(models == null)
+ models = Collections.synchronizedMap(new HashMap<String, HistoryModel>());
+
+ HistoryModel model = models.get(name);
+ if(model == null)
+ {
+ model = new HistoryModel(name);
+ models.put(name,model);
+ }
+
+ return model;
+ } //}}}
+
+ //{{{ loadHistory() method
+ public static void loadHistory()
+ {
+ if (saver != null)
+ models = saver.load(models);
+ } //}}}
+
+ //{{{ saveHistory() method
+ public static void saveHistory()
+ {
+ if (saver != null && modified && saver.save(models))
+ modified = false;
+ } //}}}
+
+ //{{{ setMax() method
+ /**
+ * sets the maximum size of this history
+ * @param max the new maximum size of this history of -1 to restore default
+ */
+ public void setMax(int max)
+ {
+ this.max = max;
+ } //}}}
+
+ //{{{ getMax() method
+ /**
+ * @return maximum size of this history or -1 is it's the default size
+ */
+ public int getMax()
+ {
+ return max;
+ } //}}}
+
+ //{{{ setDefaultMax() method
+ /**
+ * Sets the default size of all HistoryModels.
+ * Affects the VFS path history, the hypersearch history, etc..
+ * To change the max size of one history, call setMax() instead.
+ */
+ public static void setDefaultMax(int max)
+ {
+ HistoryModel.defaultMax = max;
+ } //}}}
+
+ //{{{ getDefaultMax() method
+ /**
+ * Gets the default size of all HistoryModels.
+ * @return default size limit for HistoryModels
+ */
+ public static int getDefaultMax()
+ {
+ return HistoryModel.defaultMax;
+ } //}}}
+
+ //{{{ setSaver() method
+ public static void setSaver(HistoryModelSaver saver)
+ {
+ HistoryModel.saver = saver;
+ } //}}}
+
+ //{{{ Private members
+ private int max;
+ private static int defaultMax;
+
+ private final String name;
+ private static Map<String, HistoryModel> models;
+
+ private static boolean modified;
+ private static HistoryModelSaver saver;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/HistoryModelSaver.java b/jEdit/org/gjt/sp/jedit/gui/HistoryModelSaver.java
index f24f4c5..dd0e7cc 100644
--- a/jEdit/org/gjt/sp/jedit/gui/HistoryModelSaver.java
+++ b/jEdit/org/gjt/sp/jedit/gui/HistoryModelSaver.java
@@ -1,35 +1,35 @@
-/*
- * HistoryModelSaver.java - Handles services.xml files in plugins
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.gui;
-
-import java.util.Map;
-
-/**
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-public interface HistoryModelSaver
-{
- Map<String, HistoryModel> load(Map<String, HistoryModel> models);
-
- boolean save(Map<String, HistoryModel> models);
-}
+/*
+ * HistoryModelSaver.java - Handles services.xml files in plugins
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.gui;
+
+import java.util.Map;
+
+/**
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+public interface HistoryModelSaver
+{
+ Map<String, HistoryModel> load(Map<String, HistoryModel> models);
+
+ boolean save(Map<String, HistoryModel> models);
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/HistoryText.java b/jEdit/org/gjt/sp/jedit/gui/HistoryText.java
index 1f44c6a..0816314 100644
--- a/jEdit/org/gjt/sp/jedit/gui/HistoryText.java
+++ b/jEdit/org/gjt/sp/jedit/gui/HistoryText.java
@@ -1,370 +1,370 @@
-/*
- * HistoryText.java - Common code for text components with a history
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.text.*;
-import javax.swing.event.MouseInputAdapter;
-import java.awt.*;
-import java.awt.event.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * Controller (manager of models) for HistoryTextArea.
- * @author Slava Pestov
- * @version $Id: HistoryText.java 16341 2009-10-14 10:05:51Z kpouer $
- */
-public class HistoryText
-{
- //{{{ HistoryText constructor
- public HistoryText(JTextComponent text, String name)
- {
- this.text = text;
- setModel(name);
- index = -1;
- } //}}}
-
- //{{{ fireActionPerformed() method
- public void fireActionPerformed()
- {
- } //}}}
-
- //{{{ getIndex() mehtod
- public int getIndex()
- {
- return index;
- } //}}}
-
- //{{{ setIndex() mehtod
- public void setIndex(int index)
- {
- this.index = index;
- } //}}}
-
- //{{{ getModel() method
- /**
- * Returns the underlying history controller.
- * @since jEdit 4.3pre1
- */
- public HistoryModel getModel()
- {
- return historyModel;
- } //}}}
-
- //{{{ setModel() method
- /**
- * Sets the history list controller.
- * @param name The model name
- * @since jEdit 4.3pre1
- */
- public void setModel(String name)
- {
- if(name == null)
- historyModel = null;
- else
- historyModel = HistoryModel.getModel(name);
- index = -1;
- } //}}}
-
- //{{{ setInstantPopups() method
- /**
- * Sets if selecting a value from the popup should immediately fire
- * an ActionEvent.
- */
- public void setInstantPopups(boolean instantPopups)
- {
- this.instantPopups = instantPopups;
- } //}}}
-
- //{{{ getInstantPopups() method
- /**
- * Returns if selecting a value from the popup should immediately fire
- * an ActionEvent.
- */
- public boolean getInstantPopups()
- {
- return instantPopups;
- } //}}}
-
- //{{{ addCurrentToHistory() method
- /**
- * Adds the currently entered item to the history.
- */
- public void addCurrentToHistory()
- {
- if(historyModel != null)
- historyModel.addItem(getText());
- index = 0;
- } //}}}
-
- //{{{ doBackwardSearch() method
- public void doBackwardSearch()
- {
- if(historyModel == null)
- return;
-
- if(text.getSelectionEnd() != getDocument().getLength())
- {
- text.setCaretPosition(getDocument().getLength());
- }
-
- int start = getInputStart();
- String t = getText().substring(0,
- text.getSelectionStart() - start);
- if(t == null)
- {
- historyPrevious();
- return;
- }
-
- for(int i = index + 1; i < historyModel.getSize(); i++)
- {
- String item = historyModel.getItem(i);
- if(item.startsWith(t))
- {
- text.replaceSelection(item.substring(t.length()));
- text.select(getInputStart() + t.length(),
- getDocument().getLength());
- index = i;
- return;
- }
- }
-
- text.getToolkit().beep();
- } //}}}
-
- //{{{ doForwardSearch() method
- public void doForwardSearch()
- {
- if(historyModel == null)
- return;
-
- if(text.getSelectionEnd() != getDocument().getLength())
- {
- text.setCaretPosition(getDocument().getLength());
- }
-
- int start = getInputStart();
- String t = getText().substring(0,
- text.getSelectionStart() - start);
- if(t == null)
- {
- historyNext();
- return;
- }
-
- for(int i = index - 1; i >= 0; i--)
- {
- String item = historyModel.getItem(i);
- if(item.startsWith(t))
- {
- text.replaceSelection(item.substring(t.length()));
- text.select(getInputStart() + t.length(),
- getDocument().getLength());
- index = i;
- return;
- }
- }
-
- text.getToolkit().beep();
- } //}}}
-
- //{{{ historyPrevious() method
- public void historyPrevious()
- {
- if(historyModel == null)
- return;
-
- if(index == historyModel.getSize() - 1)
- text.getToolkit().beep();
- else if(index == -1)
- {
- current = getText();
- setText(historyModel.getItem(0));
- index = 0;
- }
- else
- {
- // have to do this because setText() sets index to -1
- int newIndex = index + 1;
- setText(historyModel.getItem(newIndex));
- index = newIndex;
- }
- } //}}}
-
- //{{{ historyNext() method
- public void historyNext()
- {
- if(historyModel == null)
- return;
-
- if(index == -1)
- text.getToolkit().beep();
- else if(index == 0)
- setText(current);
- else
- {
- // have to do this because setText() sets index to -1
- int newIndex = index - 1;
- setText(historyModel.getItem(newIndex));
- index = newIndex;
- }
- } //}}}
-
- //{{{ getDocument() method
- public Document getDocument()
- {
- return text.getDocument();
- } //}}}
-
- //{{{ getText() method
- /**
- * Subclasses can override this to provide funky history behavior,
- * for JTextPanes and such.
- */
- public String getText()
- {
- return text.getText();
- } //}}}
-
- //{{{ setText() method
- /**
- * Subclasses can override this to provide funky history behavior,
- * for JTextPanes and such.
- */
- public void setText(String text)
- {
- this.index = -1;
- this.text.setText(text);
- } //}}}
-
- //{{{ getInputStart() method
- /**
- * Subclasses can override this to provide funky history behavior,
- * for JTextPanes and such.
- */
- public int getInputStart()
- {
- return 0;
- } //}}}
-
- //{{{ showPopupMenu() method
- public void showPopupMenu(String t, int x, int y)
- {
- if(historyModel == null)
- return;
-
- text.requestFocus();
-
- if(popup != null && popup.isVisible())
- {
- popup.setVisible(false);
- popup = null;
- return;
- }
-
- popup = new JPopupMenu()
- {
- @Override
- public void setVisible(boolean b)
- {
- if (!b)
- {
- popup = null;
- }
- super.setVisible(b);
- }
- };
- JMenuItem caption = new JMenuItem(jEdit.getProperty(
- "history.caption"));
- caption.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- new ListModelEditor().open(historyModel);
- }
- });
- popup.add(caption);
- popup.addSeparator();
-
- for(int i = 0; i < historyModel.getSize(); i++)
- {
- String item = historyModel.getItem(i);
- if(item.startsWith(t))
- {
- JMenuItem menuItem = new JMenuItem(item);
- menuItem.setActionCommand(String.valueOf(i));
- menuItem.addActionListener(
- new ActionHandler());
- popup.add(menuItem);
- }
- }
-
- GUIUtilities.showPopupMenu(popup,text,x,y,false);
- } //}}}
-
- //{{{ showPopupMenu() method
- public void showPopupMenu(boolean search)
- {
- if(search)
- showPopupMenu(getText().substring(getInputStart(),
- text.getSelectionStart()),0,text.getHeight());
- else
- showPopupMenu("",0,text.getHeight());
- } //}}}
-
- //{{{ Private members
- private JTextComponent text;
- private HistoryModel historyModel;
- private int index;
- private String current;
- private JPopupMenu popup;
- private boolean instantPopups;
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- int ind = Integer.parseInt(evt.getActionCommand());
- if(ind == -1)
- {
- if(index != -1)
- setText(current);
- }
- else
- {
- setText(historyModel.getItem(ind));
- index = ind;
- }
- if(instantPopups)
- {
- addCurrentToHistory();
- fireActionPerformed();
- }
- }
- } //}}}
-}
+/*
+ * HistoryText.java - Common code for text components with a history
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.text.*;
+import javax.swing.event.MouseInputAdapter;
+import java.awt.*;
+import java.awt.event.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * Controller (manager of models) for HistoryTextArea.
+ * @author Slava Pestov
+ * @version $Id: HistoryText.java 16341 2009-10-14 10:05:51Z kpouer $
+ */
+public class HistoryText
+{
+ //{{{ HistoryText constructor
+ public HistoryText(JTextComponent text, String name)
+ {
+ this.text = text;
+ setModel(name);
+ index = -1;
+ } //}}}
+
+ //{{{ fireActionPerformed() method
+ public void fireActionPerformed()
+ {
+ } //}}}
+
+ //{{{ getIndex() mehtod
+ public int getIndex()
+ {
+ return index;
+ } //}}}
+
+ //{{{ setIndex() mehtod
+ public void setIndex(int index)
+ {
+ this.index = index;
+ } //}}}
+
+ //{{{ getModel() method
+ /**
+ * Returns the underlying history controller.
+ * @since jEdit 4.3pre1
+ */
+ public HistoryModel getModel()
+ {
+ return historyModel;
+ } //}}}
+
+ //{{{ setModel() method
+ /**
+ * Sets the history list controller.
+ * @param name The model name
+ * @since jEdit 4.3pre1
+ */
+ public void setModel(String name)
+ {
+ if(name == null)
+ historyModel = null;
+ else
+ historyModel = HistoryModel.getModel(name);
+ index = -1;
+ } //}}}
+
+ //{{{ setInstantPopups() method
+ /**
+ * Sets if selecting a value from the popup should immediately fire
+ * an ActionEvent.
+ */
+ public void setInstantPopups(boolean instantPopups)
+ {
+ this.instantPopups = instantPopups;
+ } //}}}
+
+ //{{{ getInstantPopups() method
+ /**
+ * Returns if selecting a value from the popup should immediately fire
+ * an ActionEvent.
+ */
+ public boolean getInstantPopups()
+ {
+ return instantPopups;
+ } //}}}
+
+ //{{{ addCurrentToHistory() method
+ /**
+ * Adds the currently entered item to the history.
+ */
+ public void addCurrentToHistory()
+ {
+ if(historyModel != null)
+ historyModel.addItem(getText());
+ index = 0;
+ } //}}}
+
+ //{{{ doBackwardSearch() method
+ public void doBackwardSearch()
+ {
+ if(historyModel == null)
+ return;
+
+ if(text.getSelectionEnd() != getDocument().getLength())
+ {
+ text.setCaretPosition(getDocument().getLength());
+ }
+
+ int start = getInputStart();
+ String t = getText().substring(0,
+ text.getSelectionStart() - start);
+ if(t == null)
+ {
+ historyPrevious();
+ return;
+ }
+
+ for(int i = index + 1; i < historyModel.getSize(); i++)
+ {
+ String item = historyModel.getItem(i);
+ if(item.startsWith(t))
+ {
+ text.replaceSelection(item.substring(t.length()));
+ text.select(getInputStart() + t.length(),
+ getDocument().getLength());
+ index = i;
+ return;
+ }
+ }
+
+ text.getToolkit().beep();
+ } //}}}
+
+ //{{{ doForwardSearch() method
+ public void doForwardSearch()
+ {
+ if(historyModel == null)
+ return;
+
+ if(text.getSelectionEnd() != getDocument().getLength())
+ {
+ text.setCaretPosition(getDocument().getLength());
+ }
+
+ int start = getInputStart();
+ String t = getText().substring(0,
+ text.getSelectionStart() - start);
+ if(t == null)
+ {
+ historyNext();
+ return;
+ }
+
+ for(int i = index - 1; i >= 0; i--)
+ {
+ String item = historyModel.getItem(i);
+ if(item.startsWith(t))
+ {
+ text.replaceSelection(item.substring(t.length()));
+ text.select(getInputStart() + t.length(),
+ getDocument().getLength());
+ index = i;
+ return;
+ }
+ }
+
+ text.getToolkit().beep();
+ } //}}}
+
+ //{{{ historyPrevious() method
+ public void historyPrevious()
+ {
+ if(historyModel == null)
+ return;
+
+ if(index == historyModel.getSize() - 1)
+ text.getToolkit().beep();
+ else if(index == -1)
+ {
+ current = getText();
+ setText(historyModel.getItem(0));
+ index = 0;
+ }
+ else
+ {
+ // have to do this because setText() sets index to -1
+ int newIndex = index + 1;
+ setText(historyModel.getItem(newIndex));
+ index = newIndex;
+ }
+ } //}}}
+
+ //{{{ historyNext() method
+ public void historyNext()
+ {
+ if(historyModel == null)
+ return;
+
+ if(index == -1)
+ text.getToolkit().beep();
+ else if(index == 0)
+ setText(current);
+ else
+ {
+ // have to do this because setText() sets index to -1
+ int newIndex = index - 1;
+ setText(historyModel.getItem(newIndex));
+ index = newIndex;
+ }
+ } //}}}
+
+ //{{{ getDocument() method
+ public Document getDocument()
+ {
+ return text.getDocument();
+ } //}}}
+
+ //{{{ getText() method
+ /**
+ * Subclasses can override this to provide funky history behavior,
+ * for JTextPanes and such.
+ */
+ public String getText()
+ {
+ return text.getText();
+ } //}}}
+
+ //{{{ setText() method
+ /**
+ * Subclasses can override this to provide funky history behavior,
+ * for JTextPanes and such.
+ */
+ public void setText(String text)
+ {
+ this.index = -1;
+ this.text.setText(text);
+ } //}}}
+
+ //{{{ getInputStart() method
+ /**
+ * Subclasses can override this to provide funky history behavior,
+ * for JTextPanes and such.
+ */
+ public int getInputStart()
+ {
+ return 0;
+ } //}}}
+
+ //{{{ showPopupMenu() method
+ public void showPopupMenu(String t, int x, int y)
+ {
+ if(historyModel == null)
+ return;
+
+ text.requestFocus();
+
+ if(popup != null && popup.isVisible())
+ {
+ popup.setVisible(false);
+ popup = null;
+ return;
+ }
+
+ popup = new JPopupMenu()
+ {
+ @Override
+ public void setVisible(boolean b)
+ {
+ if (!b)
+ {
+ popup = null;
+ }
+ super.setVisible(b);
+ }
+ };
+ JMenuItem caption = new JMenuItem(jEdit.getProperty(
+ "history.caption"));
+ caption.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ new ListModelEditor().open(historyModel);
+ }
+ });
+ popup.add(caption);
+ popup.addSeparator();
+
+ for(int i = 0; i < historyModel.getSize(); i++)
+ {
+ String item = historyModel.getItem(i);
+ if(item.startsWith(t))
+ {
+ JMenuItem menuItem = new JMenuItem(item);
+ menuItem.setActionCommand(String.valueOf(i));
+ menuItem.addActionListener(
+ new ActionHandler());
+ popup.add(menuItem);
+ }
+ }
+
+ GUIUtilities.showPopupMenu(popup,text,x,y,false);
+ } //}}}
+
+ //{{{ showPopupMenu() method
+ public void showPopupMenu(boolean search)
+ {
+ if(search)
+ showPopupMenu(getText().substring(getInputStart(),
+ text.getSelectionStart()),0,text.getHeight());
+ else
+ showPopupMenu("",0,text.getHeight());
+ } //}}}
+
+ //{{{ Private members
+ private JTextComponent text;
+ private HistoryModel historyModel;
+ private int index;
+ private String current;
+ private JPopupMenu popup;
+ private boolean instantPopups;
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ int ind = Integer.parseInt(evt.getActionCommand());
+ if(ind == -1)
+ {
+ if(index != -1)
+ setText(current);
+ }
+ else
+ {
+ setText(historyModel.getItem(ind));
+ index = ind;
+ }
+ if(instantPopups)
+ {
+ addCurrentToHistory();
+ fireActionPerformed();
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/HistoryTextArea.java b/jEdit/org/gjt/sp/jedit/gui/HistoryTextArea.java
index 12e403e..ebc791f 100644
--- a/jEdit/org/gjt/sp/jedit/gui/HistoryTextArea.java
+++ b/jEdit/org/gjt/sp/jedit/gui/HistoryTextArea.java
@@ -1,201 +1,201 @@
-/*
- * HistoryTextArea.java - Text area with a history
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.border.Border;
-import javax.swing.border.AbstractBorder;
-import javax.swing.border.CompoundBorder;
-import javax.swing.event.MouseInputAdapter;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.Collections;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * Text area with a history.
- * @author Slava Pestov
- * @version $Id: HistoryTextArea.java 13415 2008-08-24 09:03:09Z k_satoda $
- */
-public class HistoryTextArea extends JTextArea
-{
- //{{{ HistoryTextArea constructor
- public HistoryTextArea(String name)
- {
- super(3,15);
- controller = new HistoryText(this,name);
- setFocusTraversalKeys(
- KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
- Collections.singleton(
- KeyStroke.getKeyStroke(KeyEvent.VK_TAB,0)));
- setFocusTraversalKeys(
- KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
- Collections.singleton(
- KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
- InputEvent.SHIFT_MASK)));
- } //}}}
-
- //{{{ getModel() method
- /**
- * Returns the underlying history controller.
- * @since jEdit 4.3pre1
- */
- public HistoryModel getModel()
- {
- return controller.getModel();
- } //}}}
-
- //{{{ setModel() method
- /**
- * Sets the history list controller.
- * @param name The model name
- * @since jEdit 4.3pre1
- */
- public void setModel(String name)
- {
- controller.setModel(name);
- } //}}}
-
- //{{{ setInstantPopups() method
- /**
- * Sets if selecting a value from the popup should immediately fire
- * an ActionEvent.
- */
- public void setInstantPopups(boolean instantPopups)
- {
- controller.setInstantPopups(instantPopups);
- } //}}}
-
- //{{{ getInstantPopups() method
- /**
- * Returns if selecting a value from the popup should immediately fire
- * an ActionEvent.
- */
- public boolean getInstantPopups()
- {
- return controller.getInstantPopups();
- } //}}}
-
- //{{{ addCurrentToHistory() method
- /**
- * Adds the currently entered item to the history.
- */
- public void addCurrentToHistory()
- {
- controller.addCurrentToHistory();
- } //}}}
-
- //{{{ setText() method
- /**
- * Sets the displayed text.
- */
- public void setText(String text)
- {
- super.setText(text);
- controller.setIndex(-1);
- } //}}}
-
- //{{{ Protected members
-
- //{{{ processKeyEvent() method
- protected void processKeyEvent(KeyEvent evt)
- {
- if(!isEnabled())
- return;
-
- if(evt.getID() == KeyEvent.KEY_PRESSED)
- {
- switch(evt.getKeyCode())
- {
- case KeyEvent.VK_ENTER:
- if(evt.isControlDown())
- {
- replaceSelection("\n");
- evt.consume();
- }
- break;
- case KeyEvent.VK_TAB:
- if(evt.isControlDown())
- {
- replaceSelection("\t");
- evt.consume();
- }
- break;
- case KeyEvent.VK_PAGE_UP:
- if(evt.isShiftDown())
- controller.doBackwardSearch();
- else
- controller.historyPrevious();
- evt.consume();
- break;
- case KeyEvent.VK_PAGE_DOWN:
- if(evt.isShiftDown())
- controller.doForwardSearch();
- else
- controller.historyNext();
- evt.consume();
- break;
- case KeyEvent.VK_UP:
- if(evt.isAltDown())
- {
- controller.showPopupMenu(
- evt.isShiftDown());
- evt.consume();
- }
- break;
- }
- }
-
- if(!evt.isConsumed())
- super.processKeyEvent(evt);
- } //}}}
-
- //{{{ processMouseEvent() method
- protected void processMouseEvent(MouseEvent evt)
- {
- if(!isEnabled())
- return;
-
- switch(evt.getID())
- {
- case MouseEvent.MOUSE_PRESSED:
- if(GUIUtilities.isPopupTrigger(evt))
- controller.showPopupMenu(evt.isShiftDown());
- else
- super.processMouseEvent(evt);
-
- break;
- default:
- super.processMouseEvent(evt);
- break;
- }
- } //}}}
-
- //}}}
-
- //{{{ Private variables
- private HistoryText controller;
- //}}}
-}
+/*
+ * HistoryTextArea.java - Text area with a history
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.border.Border;
+import javax.swing.border.AbstractBorder;
+import javax.swing.border.CompoundBorder;
+import javax.swing.event.MouseInputAdapter;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.Collections;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * Text area with a history.
+ * @author Slava Pestov
+ * @version $Id: HistoryTextArea.java 13415 2008-08-24 09:03:09Z k_satoda $
+ */
+public class HistoryTextArea extends JTextArea
+{
+ //{{{ HistoryTextArea constructor
+ public HistoryTextArea(String name)
+ {
+ super(3,15);
+ controller = new HistoryText(this,name);
+ setFocusTraversalKeys(
+ KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
+ Collections.singleton(
+ KeyStroke.getKeyStroke(KeyEvent.VK_TAB,0)));
+ setFocusTraversalKeys(
+ KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
+ Collections.singleton(
+ KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
+ InputEvent.SHIFT_MASK)));
+ } //}}}
+
+ //{{{ getModel() method
+ /**
+ * Returns the underlying history controller.
+ * @since jEdit 4.3pre1
+ */
+ public HistoryModel getModel()
+ {
+ return controller.getModel();
+ } //}}}
+
+ //{{{ setModel() method
+ /**
+ * Sets the history list controller.
+ * @param name The model name
+ * @since jEdit 4.3pre1
+ */
+ public void setModel(String name)
+ {
+ controller.setModel(name);
+ } //}}}
+
+ //{{{ setInstantPopups() method
+ /**
+ * Sets if selecting a value from the popup should immediately fire
+ * an ActionEvent.
+ */
+ public void setInstantPopups(boolean instantPopups)
+ {
+ controller.setInstantPopups(instantPopups);
+ } //}}}
+
+ //{{{ getInstantPopups() method
+ /**
+ * Returns if selecting a value from the popup should immediately fire
+ * an ActionEvent.
+ */
+ public boolean getInstantPopups()
+ {
+ return controller.getInstantPopups();
+ } //}}}
+
+ //{{{ addCurrentToHistory() method
+ /**
+ * Adds the currently entered item to the history.
+ */
+ public void addCurrentToHistory()
+ {
+ controller.addCurrentToHistory();
+ } //}}}
+
+ //{{{ setText() method
+ /**
+ * Sets the displayed text.
+ */
+ public void setText(String text)
+ {
+ super.setText(text);
+ controller.setIndex(-1);
+ } //}}}
+
+ //{{{ Protected members
+
+ //{{{ processKeyEvent() method
+ protected void processKeyEvent(KeyEvent evt)
+ {
+ if(!isEnabled())
+ return;
+
+ if(evt.getID() == KeyEvent.KEY_PRESSED)
+ {
+ switch(evt.getKeyCode())
+ {
+ case KeyEvent.VK_ENTER:
+ if(evt.isControlDown())
+ {
+ replaceSelection("\n");
+ evt.consume();
+ }
+ break;
+ case KeyEvent.VK_TAB:
+ if(evt.isControlDown())
+ {
+ replaceSelection("\t");
+ evt.consume();
+ }
+ break;
+ case KeyEvent.VK_PAGE_UP:
+ if(evt.isShiftDown())
+ controller.doBackwardSearch();
+ else
+ controller.historyPrevious();
+ evt.consume();
+ break;
+ case KeyEvent.VK_PAGE_DOWN:
+ if(evt.isShiftDown())
+ controller.doForwardSearch();
+ else
+ controller.historyNext();
+ evt.consume();
+ break;
+ case KeyEvent.VK_UP:
+ if(evt.isAltDown())
+ {
+ controller.showPopupMenu(
+ evt.isShiftDown());
+ evt.consume();
+ }
+ break;
+ }
+ }
+
+ if(!evt.isConsumed())
+ super.processKeyEvent(evt);
+ } //}}}
+
+ //{{{ processMouseEvent() method
+ protected void processMouseEvent(MouseEvent evt)
+ {
+ if(!isEnabled())
+ return;
+
+ switch(evt.getID())
+ {
+ case MouseEvent.MOUSE_PRESSED:
+ if(GUIUtilities.isPopupTrigger(evt))
+ controller.showPopupMenu(evt.isShiftDown());
+ else
+ super.processMouseEvent(evt);
+
+ break;
+ default:
+ super.processMouseEvent(evt);
+ break;
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Private variables
+ private HistoryText controller;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/HistoryTextField.java b/jEdit/org/gjt/sp/jedit/gui/HistoryTextField.java
index 3995b9b..a40559e 100644
--- a/jEdit/org/gjt/sp/jedit/gui/HistoryTextField.java
+++ b/jEdit/org/gjt/sp/jedit/gui/HistoryTextField.java
@@ -1,412 +1,414 @@
-/*
- * HistoryTextField.java - Text field with a history
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.border.Border;
-import javax.swing.border.AbstractBorder;
-import javax.swing.border.CompoundBorder;
-import javax.swing.event.MouseInputAdapter;
-import java.awt.*;
-import java.awt.event.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * Text field with an arrow-key accessable history.
- * @author Slava Pestov
- * @version $Id: HistoryTextField.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class HistoryTextField extends JTextField
-{
- //{{{ HistoryTextField constructor
- /**
- * Creates a new history text field.
- * @since jEdit 3.2pre5
- */
- public HistoryTextField()
- {
- this(null);
- } //}}}
-
- //{{{ HistoryTextField constructor
- /**
- * Creates a new history text field.
- * @param name The history model name
- */
- public HistoryTextField(String name)
- {
- this(name,false,true);
- } //}}}
-
- //{{{ HistoryTextField constructor
- /**
- * Creates a new history text field.
- * @param name The history model name
- * @param instantPopups If true, selecting a value from the history
- * popup will immediately fire an ActionEvent. If false, the user
- * will have to press 'Enter' first
- *
- * @since jEdit 2.2pre5
- */
- public HistoryTextField(String name, boolean instantPopups)
- {
- this(name,instantPopups,true);
- } //}}}
-
- //{{{ HistoryTextField constructor
- /**
- * Creates a new history text field.
- * @param name The history model name
- * @param instantPopups If true, selecting a value from the history
- * popup will immediately fire an ActionEvent. If false, the user
- * will have to press 'Enter' first
- * @param enterAddsToHistory If true, pressing the Enter key will
- * automatically add the currently entered text to the history.
- *
- * @since jEdit 2.6pre5
- */
- public HistoryTextField(String name, boolean instantPopups,
- boolean enterAddsToHistory)
- {
- controller = new HistoryText(this,null)
- {
- public void fireActionPerformed()
- {
- HistoryTextField.this.fireActionPerformed();
- }
- };
-
- setModel(name);
- MouseHandler mouseHandler = new MouseHandler();
- addMouseListener(mouseHandler);
- addMouseMotionListener(mouseHandler);
-
- setInstantPopups(instantPopups);
- setEnterAddsToHistory(enterAddsToHistory);
- } //}}}
-
- //{{{ setInstantPopups() method
- /**
- * Sets if selecting a value from the popup should immediately fire
- * an ActionEvent.
- * @since jEdit 4.0pre3
- */
- public void setInstantPopups(boolean instantPopups)
- {
- controller.setInstantPopups(instantPopups);
- } //}}}
-
- //{{{ getInstantPopups() method
- /**
- * Returns if selecting a value from the popup should immediately fire
- * an ActionEvent.
- * @since jEdit 4.0pre3
- */
- public boolean getInstantPopups()
- {
- return controller.getInstantPopups();
- } //}}}
-
- //{{{ setEnterAddsToHistory() method
- /**
- * Sets if pressing Enter should automatically add the currently
- * entered text to the history.
- * @since jEdit 4.0pre3
- */
- public void setEnterAddsToHistory(boolean enterAddsToHistory)
- {
- this.enterAddsToHistory = enterAddsToHistory;
- } //}}}
-
- //{{{ getEnterAddsToHistory() method
- /**
- * Returns if pressing Enter should automatically add the currently
- * entered text to the history.
- * @since jEdit 4.0pre3
- */
- public boolean setEnterAddsToHistory()
- {
- return enterAddsToHistory;
- } //}}}
-
- //{{{ setSelectAllOnFocus() method
- /**
- * Sets if all text should be selected when the field gets focus.
- * @since jEdit 4.0pre3
- */
- public void setSelectAllOnFocus(boolean selectAllOnFocus)
- {
- this.selectAllOnFocus = selectAllOnFocus;
- } //}}}
-
- //{{{ getSelectAllOnFocus() method
- /**
- * Returns if all text should be selected when the field gets focus.
- * @since jEdit 4.0pre3
- */
- public boolean setSelectAllOnFocus()
- {
- return selectAllOnFocus;
- } //}}}
-
- //{{{ getModel() method
- /**
- * Returns the underlying history model.
- */
- public HistoryModel getModel()
- {
- return controller.getModel();
- } //}}}
-
- //{{{ setModel() method
- /**
- * Sets the history list model.
- * @param name The model name
- * @since jEdit 2.3pre3
- */
- public void setModel(String name)
- {
- controller.setModel(name);
-
- if(name != null)
- {
- setBorder(new CompoundBorder(this.getBorder(), new HistoryBorder()));
- }
-
- repaint();
- } //}}}
-
- //{{{ addCurrentToHistory() method
- /**
- * Adds the currently entered item to the history.
- */
- public void addCurrentToHistory()
- {
- controller.addCurrentToHistory();
- } //}}}
-
- //{{{ setText() method
- /**
- * Sets the displayed text.
- */
- public void setText(String text)
- {
- super.setText(text);
- controller.setIndex(-1);
- } //}}}
-
- //{{{ fireActionPerformed() method
- /**
- * Make it public.
- */
- public void fireActionPerformed()
- {
- super.fireActionPerformed();
- } //}}}
-
- //{{{ Protected members
-
- //{{{ processKeyEvent() method
- protected void processKeyEvent(KeyEvent evt)
- {
- if(!isEnabled())
- return;
-
- if(evt.getID() == KeyEvent.KEY_PRESSED)
- {
- switch(evt.getKeyCode())
- {
- case KeyEvent.VK_ENTER:
- if(enterAddsToHistory)
- addCurrentToHistory();
-
- if(evt.getModifiers() == 0)
- {
- fireActionPerformed();
- evt.consume();
- }
- break;
- case KeyEvent.VK_UP:
- if(evt.isShiftDown())
- controller.doBackwardSearch();
- else
- controller.historyPrevious();
- evt.consume();
- break;
- case KeyEvent.VK_DOWN:
- if(evt.isShiftDown())
- controller.doForwardSearch();
- else if(evt.isAltDown())
- {
- controller.showPopupMenu(
- evt.isShiftDown());
- }
- else
- controller.historyNext();
- evt.consume();
- break;
- case KeyEvent.VK_TAB:
- if(evt.isControlDown())
- {
- controller.doBackwardSearch();
- evt.consume();
- }
- break;
- }
- }
-
- if(!evt.isConsumed())
- super.processKeyEvent(evt);
- } //}}}
-
- //{{{ processMouseEvent() method
- protected void processMouseEvent(MouseEvent evt)
- {
- if(!isEnabled())
- return;
-
- switch(evt.getID())
- {
- case MouseEvent.MOUSE_PRESSED:
- Border border = getBorder();
- Insets insets = border.getBorderInsets(HistoryTextField.this);
-
- if(evt.getX() >= getWidth() - insets.right
- || GUIUtilities.isPopupTrigger(evt))
- {
- controller.showPopupMenu(evt.isShiftDown());
- }
- else
- super.processMouseEvent(evt);
-
- break;
- case MouseEvent.MOUSE_EXITED:
- setCursor(Cursor.getDefaultCursor());
- super.processMouseEvent(evt);
- break;
- default:
- super.processMouseEvent(evt);
- break;
- }
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private HistoryText controller;
- private boolean enterAddsToHistory;
- private boolean selectAllOnFocus;
- //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseInputAdapter
- {
- boolean selectAll;
-
- //{{{ mousePressed() method
- public void mousePressed(MouseEvent evt)
- {
- selectAll = (!hasFocus() && selectAllOnFocus);
- } //}}}
-
- //{{{ mouseReleased() method
- public void mouseReleased(MouseEvent evt)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- if(selectAll)
- selectAll();
- }
- });
- } //}}}
-
- //{{{ mouseMoved() method
- public void mouseMoved(MouseEvent evt)
- {
- Border border = getBorder();
- Insets insets = border.getBorderInsets(HistoryTextField.this);
-
- if(evt.getX() >= getWidth() - insets.right)
- setCursor(Cursor.getDefaultCursor());
- else
- setCursor(Cursor.getPredefinedCursor(
- Cursor.TEXT_CURSOR));
- } //}}}
-
- //{{{ mouseDragged() method
- public void mouseDragged(MouseEvent evt)
- {
- selectAll = false;
- } //}}}
- } //}}}
-
- //{{{ HistoryBorder class
- static class HistoryBorder extends AbstractBorder
- {
- static final int WIDTH = 16;
-
- public void paintBorder(Component c, Graphics g,
- int x, int y, int w, int h)
- {
- g.translate(x+w-WIDTH,y-1);
-
- //if(c.isEnabled())
- //{
- // // vertical separation line
- // g.setColor(UIManager.getColor("controlDkShadow"));
- // g.drawLine(0,0,0,h);
- //}
-
- // down arrow
- int w2 = WIDTH/2;
- int h2 = h/2;
- g.setColor(UIManager.getColor(c.isEnabled()
- && ((HistoryTextField)c).getModel() != null
- ? "TextField.foreground" : "TextField.disabledForeground"));
- g.drawLine(w2-5,h2-2,w2+4,h2-2);
- g.drawLine(w2-4,h2-1,w2+3,h2-1);
- g.drawLine(w2-3,h2 ,w2+2,h2 );
- g.drawLine(w2-2,h2+1,w2+1,h2+1);
- g.drawLine(w2-1,h2+2,w2 ,h2+2);
-
- g.translate(-(x+w-WIDTH),-(y-1));
- }
-
- public Insets getBorderInsets(Component c)
- {
- return new Insets(0,0,0,WIDTH);
- }
- } //}}}
-
- //}}}
-}
+/*
+ * HistoryTextField.java - Text field with a history
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.border.Border;
+import javax.swing.border.AbstractBorder;
+import javax.swing.border.CompoundBorder;
+import javax.swing.event.MouseInputAdapter;
+import java.awt.*;
+import java.awt.event.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * Text field with an arrow-key accessable history.
+ * @author Slava Pestov
+ * @version $Id: HistoryTextField.java 17625 2010-04-12 23:10:57Z ezust $
+ */
+public class HistoryTextField extends JTextField
+{
+ //{{{ HistoryTextField constructor
+ /**
+ * Creates a new history text field.
+ * @since jEdit 3.2pre5
+ */
+ public HistoryTextField()
+ {
+ this(null);
+ } //}}}
+
+ //{{{ HistoryTextField constructor
+ /**
+ * Creates a new history text field.
+ * @param name The history model name
+ */
+ public HistoryTextField(String name)
+ {
+ this(name,false,true);
+ } //}}}
+
+ //{{{ HistoryTextField constructor
+ /**
+ * Creates a new history text field.
+ * @param name The history model name
+ * @param instantPopups If true, selecting a value from the history
+ * popup will immediately fire an ActionEvent. If false, the user
+ * will have to press 'Enter' first
+ *
+ * @since jEdit 2.2pre5
+ */
+ public HistoryTextField(String name, boolean instantPopups)
+ {
+ this(name,instantPopups,true);
+ } //}}}
+
+ //{{{ HistoryTextField constructor
+ /**
+ * Creates a new history text field.
+ * @param name The history model name
+ * @param instantPopups If true, selecting a value from the history
+ * popup will immediately fire an ActionEvent. If false, the user
+ * will have to press 'Enter' first
+ * @param enterAddsToHistory If true, pressing the Enter key will
+ * automatically add the currently entered text to the history.
+ *
+ * @since jEdit 2.6pre5
+ */
+ public HistoryTextField(String name, boolean instantPopups,
+ boolean enterAddsToHistory)
+ {
+ // set sane minumum number of columns
+ super(4);
+ controller = new HistoryText(this,null)
+ {
+ public void fireActionPerformed()
+ {
+ HistoryTextField.this.fireActionPerformed();
+ }
+ };
+
+ setModel(name);
+ MouseHandler mouseHandler = new MouseHandler();
+ addMouseListener(mouseHandler);
+ addMouseMotionListener(mouseHandler);
+
+ setInstantPopups(instantPopups);
+ setEnterAddsToHistory(enterAddsToHistory);
+ } //}}}
+
+ //{{{ setInstantPopups() method
+ /**
+ * Sets if selecting a value from the popup should immediately fire
+ * an ActionEvent.
+ * @since jEdit 4.0pre3
+ */
+ public void setInstantPopups(boolean instantPopups)
+ {
+ controller.setInstantPopups(instantPopups);
+ } //}}}
+
+ //{{{ getInstantPopups() method
+ /**
+ * Returns if selecting a value from the popup should immediately fire
+ * an ActionEvent.
+ * @since jEdit 4.0pre3
+ */
+ public boolean getInstantPopups()
+ {
+ return controller.getInstantPopups();
+ } //}}}
+
+ //{{{ setEnterAddsToHistory() method
+ /**
+ * Sets if pressing Enter should automatically add the currently
+ * entered text to the history.
+ * @since jEdit 4.0pre3
+ */
+ public void setEnterAddsToHistory(boolean enterAddsToHistory)
+ {
+ this.enterAddsToHistory = enterAddsToHistory;
+ } //}}}
+
+ //{{{ getEnterAddsToHistory() method
+ /**
+ * Returns if pressing Enter should automatically add the currently
+ * entered text to the history.
+ * @since jEdit 4.0pre3
+ */
+ public boolean setEnterAddsToHistory()
+ {
+ return enterAddsToHistory;
+ } //}}}
+
+ //{{{ setSelectAllOnFocus() method
+ /**
+ * Sets if all text should be selected when the field gets focus.
+ * @since jEdit 4.0pre3
+ */
+ public void setSelectAllOnFocus(boolean selectAllOnFocus)
+ {
+ this.selectAllOnFocus = selectAllOnFocus;
+ } //}}}
+
+ //{{{ getSelectAllOnFocus() method
+ /**
+ * Returns if all text should be selected when the field gets focus.
+ * @since jEdit 4.0pre3
+ */
+ public boolean setSelectAllOnFocus()
+ {
+ return selectAllOnFocus;
+ } //}}}
+
+ //{{{ getModel() method
+ /**
+ * Returns the underlying history model.
+ */
+ public HistoryModel getModel()
+ {
+ return controller.getModel();
+ } //}}}
+
+ //{{{ setModel() method
+ /**
+ * Sets the history list model.
+ * @param name The model name
+ * @since jEdit 2.3pre3
+ */
+ public void setModel(String name)
+ {
+ controller.setModel(name);
+
+ if(name != null)
+ {
+ setBorder(new CompoundBorder(this.getBorder(), new HistoryBorder()));
+ }
+
+ repaint();
+ } //}}}
+
+ //{{{ addCurrentToHistory() method
+ /**
+ * Adds the currently entered item to the history.
+ */
+ public void addCurrentToHistory()
+ {
+ controller.addCurrentToHistory();
+ } //}}}
+
+ //{{{ setText() method
+ /**
+ * Sets the displayed text.
+ */
+ public void setText(String text)
+ {
+ super.setText(text);
+ controller.setIndex(-1);
+ } //}}}
+
+ //{{{ fireActionPerformed() method
+ /**
+ * Make it public.
+ */
+ public void fireActionPerformed()
+ {
+ super.fireActionPerformed();
+ } //}}}
+
+ //{{{ Protected members
+
+ //{{{ processKeyEvent() method
+ protected void processKeyEvent(KeyEvent evt)
+ {
+ if(!isEnabled())
+ return;
+
+ if(evt.getID() == KeyEvent.KEY_PRESSED)
+ {
+ switch(evt.getKeyCode())
+ {
+ case KeyEvent.VK_ENTER:
+ if(enterAddsToHistory)
+ addCurrentToHistory();
+
+ if(evt.getModifiers() == 0)
+ {
+ fireActionPerformed();
+ evt.consume();
+ }
+ break;
+ case KeyEvent.VK_UP:
+ if(evt.isShiftDown())
+ controller.doBackwardSearch();
+ else
+ controller.historyPrevious();
+ evt.consume();
+ break;
+ case KeyEvent.VK_DOWN:
+ if(evt.isShiftDown())
+ controller.doForwardSearch();
+ else if(evt.isAltDown())
+ {
+ controller.showPopupMenu(
+ evt.isShiftDown());
+ }
+ else
+ controller.historyNext();
+ evt.consume();
+ break;
+ case KeyEvent.VK_TAB:
+ if(evt.isControlDown())
+ {
+ controller.doBackwardSearch();
+ evt.consume();
+ }
+ break;
+ }
+ }
+
+ if(!evt.isConsumed())
+ super.processKeyEvent(evt);
+ } //}}}
+
+ //{{{ processMouseEvent() method
+ protected void processMouseEvent(MouseEvent evt)
+ {
+ if(!isEnabled())
+ return;
+
+ switch(evt.getID())
+ {
+ case MouseEvent.MOUSE_PRESSED:
+ Border border = getBorder();
+ Insets insets = border.getBorderInsets(HistoryTextField.this);
+
+ if(evt.getX() >= getWidth() - insets.right
+ || GUIUtilities.isPopupTrigger(evt))
+ {
+ controller.showPopupMenu(evt.isShiftDown());
+ }
+ else
+ super.processMouseEvent(evt);
+
+ break;
+ case MouseEvent.MOUSE_EXITED:
+ setCursor(Cursor.getDefaultCursor());
+ super.processMouseEvent(evt);
+ break;
+ default:
+ super.processMouseEvent(evt);
+ break;
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private HistoryText controller;
+ private boolean enterAddsToHistory;
+ private boolean selectAllOnFocus;
+ //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseInputAdapter
+ {
+ boolean selectAll;
+
+ //{{{ mousePressed() method
+ public void mousePressed(MouseEvent evt)
+ {
+ selectAll = (!hasFocus() && selectAllOnFocus);
+ } //}}}
+
+ //{{{ mouseReleased() method
+ public void mouseReleased(MouseEvent evt)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ if(selectAll)
+ selectAll();
+ }
+ });
+ } //}}}
+
+ //{{{ mouseMoved() method
+ public void mouseMoved(MouseEvent evt)
+ {
+ Border border = getBorder();
+ Insets insets = border.getBorderInsets(HistoryTextField.this);
+
+ if(evt.getX() >= getWidth() - insets.right)
+ setCursor(Cursor.getDefaultCursor());
+ else
+ setCursor(Cursor.getPredefinedCursor(
+ Cursor.TEXT_CURSOR));
+ } //}}}
+
+ //{{{ mouseDragged() method
+ public void mouseDragged(MouseEvent evt)
+ {
+ selectAll = false;
+ } //}}}
+ } //}}}
+
+ //{{{ HistoryBorder class
+ static class HistoryBorder extends AbstractBorder
+ {
+ static final int WIDTH = 16;
+
+ public void paintBorder(Component c, Graphics g,
+ int x, int y, int w, int h)
+ {
+ g.translate(x+w-WIDTH,y-1);
+
+ //if(c.isEnabled())
+ //{
+ // // vertical separation line
+ // g.setColor(UIManager.getColor("controlDkShadow"));
+ // g.drawLine(0,0,0,h);
+ //}
+
+ // down arrow
+ int w2 = WIDTH/2;
+ int h2 = h/2;
+ g.setColor(UIManager.getColor(c.isEnabled()
+ && ((HistoryTextField)c).getModel() != null
+ ? "TextField.foreground" : "TextField.disabledForeground"));
+ g.drawLine(w2-5,h2-2,w2+4,h2-2);
+ g.drawLine(w2-4,h2-1,w2+3,h2-1);
+ g.drawLine(w2-3,h2 ,w2+2,h2 );
+ g.drawLine(w2-2,h2+1,w2+1,h2+1);
+ g.drawLine(w2-1,h2+2,w2 ,h2+2);
+
+ g.translate(-(x+w-WIDTH),-(y-1));
+ }
+
+ public Insets getBorderInsets(Component c)
+ {
+ return new Insets(0,0,0,WIDTH);
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/IOProgressMonitor.java b/jEdit/org/gjt/sp/jedit/gui/IOProgressMonitor.java
index c986be4..dc6f946 100644
--- a/jEdit/org/gjt/sp/jedit/gui/IOProgressMonitor.java
+++ b/jEdit/org/gjt/sp/jedit/gui/IOProgressMonitor.java
@@ -1,216 +1,218 @@
-/*
- * IOProgressMonitor.java - I/O progress monitor
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * The IO progressMonitor is the panel that will show JProgressBar for
- * IO threads.
- *
- * @version $Id: IOProgressMonitor.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class IOProgressMonitor extends JPanel
-{
- //{{{ IOProgressMonitor constructor
- public IOProgressMonitor()
- {
- super(new BorderLayout());
- caption = new JLabel();
- updateCaption();
- add(BorderLayout.NORTH,caption);
-
- threads = new ThreadProgress[VFSManager.getIOThreadPool()
- .getThreadCount()];
-
- Box box = new Box(BoxLayout.Y_AXIS);
- for(int i = 0; i < threads.length; i++)
- {
- if(i != 0)
- box.add(Box.createVerticalStrut(6));
-
- threads[i] = new ThreadProgress(i);
- box.add(threads[i]);
- }
-
- JPanel threadPanel = new JPanel(new BorderLayout());
- threadPanel.setBorder(new EmptyBorder(6,6,6,6));
- threadPanel.add(BorderLayout.NORTH,box);
-
- add(BorderLayout.CENTER,new JScrollPane(threadPanel));
-
- workThreadHandler = new WorkThreadHandler();
- } //}}}
-
- //{{{ addNotify() method
- public void addNotify()
- {
- VFSManager.getIOThreadPool().addProgressListener(workThreadHandler);
- super.addNotify();
- } //}}}
-
- //{{{ removeNotify() method
- public void removeNotify()
- {
- VFSManager.getIOThreadPool().removeProgressListener(workThreadHandler);
- super.removeNotify();
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private JLabel caption;
- private ThreadProgress[] threads;
- private WorkThreadHandler workThreadHandler;
- //}}}
-
- //{{{ updateCaption() method
- private void updateCaption()
- {
- String[] args = { String.valueOf(VFSManager.getIOThreadPool()
- .getRequestCount()) };
- caption.setText(jEdit.getProperty("io-progress-monitor.caption",args));
- } //}}}
-
- //}}}
-
- //{{{ WorkThreadHandler class
- class WorkThreadHandler implements WorkThreadProgressListener
- {
- public void statusUpdate(final WorkThreadPool threadPool, final int threadIndex)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- updateCaption();
- threads[threadIndex].update();
- }
- });
- }
-
- public void progressUpdate(final WorkThreadPool threadPool, final int threadIndex)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- updateCaption();
- threads[threadIndex].update();
- }
- });
- }
- } //}}}
-
- //{{{ ThreadProgress class
- class ThreadProgress extends JPanel
- {
- //{{{ ThreadProgress constructor
- public ThreadProgress(int index)
- {
- super(new BorderLayout(12,12));
-
- this.index = index;
-
- Box box = new Box(BoxLayout.Y_AXIS);
- box.add(Box.createGlue());
- box.add(progress = new JProgressBar());
- progress.setStringPainted(true);
- box.add(Box.createGlue());
- ThreadProgress.this.add(BorderLayout.CENTER,box);
-
- abort = new JButton(jEdit.getProperty("io-progress-monitor.abort"));
- abort.addActionListener(new ActionHandler());
- ThreadProgress.this.add(BorderLayout.EAST,abort);
-
- update();
- } //}}}
-
- //{{{ update() method
- public void update()
- {
- WorkThread thread = VFSManager.getIOThreadPool().getThread(index);
- if(thread.isRequestRunning())
- {
- if (progress.isIndeterminate())
- {
- if (thread.getProgressMaximum() != 0)
- progress.setIndeterminate(false);
- }
- else if (thread.getProgressMaximum() == 0)
- progress.setIndeterminate(true);
-
- abort.setEnabled(true);
- String status = thread.getStatus();
- if(status == null)
- status = "";
- progress.setString(status);
- progress.setMaximum(thread.getProgressMaximum());
- //System.err.println("value: " + thread.getProgressValue());
- progress.setValue(thread.getProgressValue());
- }
- else
- {
- abort.setEnabled(false);
- progress.setString(jEdit.getProperty("io-progress-monitor"
- + ".idle"));
- progress.setIndeterminate(false);
- progress.setValue(0);
- }
- } //}}}
-
- //{{{ Private members
- private int index;
- private JProgressBar progress;
- private JButton abort;
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == abort)
- {
- int result = GUIUtilities.confirm(
- IOProgressMonitor.this,"abort",null,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- if(result == JOptionPane.YES_OPTION)
- {
- VFSManager.getIOThreadPool().getThread(index)
- .abortCurrentRequest();
- }
- }
- }
- } //}}}
- } //}}}
-}
+/*
+ * IOProgressMonitor.java - I/O progress monitor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * The IO progressMonitor is the panel that will show JProgressBar for
+ * IO threads.
+ *
+ * @version $Id: IOProgressMonitor.java 17758 2010-05-07 13:20:28Z kpouer $
+ */
+public class IOProgressMonitor extends JPanel
+{
+ //{{{ IOProgressMonitor constructor
+ public IOProgressMonitor()
+ {
+ super(new BorderLayout());
+ caption = new JLabel();
+ updateCaption();
+ add(BorderLayout.NORTH,caption);
+
+ threads = new ThreadProgress[VFSManager.getIOThreadPool()
+ .getThreadCount()];
+
+ Box box = new Box(BoxLayout.Y_AXIS);
+ for(int i = 0; i < threads.length; i++)
+ {
+ if(i != 0)
+ box.add(Box.createVerticalStrut(6));
+
+ threads[i] = new ThreadProgress(i);
+ box.add(threads[i]);
+ }
+
+ JPanel threadPanel = new JPanel(new BorderLayout());
+ threadPanel.setBorder(new EmptyBorder(6,6,6,6));
+ threadPanel.add(BorderLayout.NORTH,box);
+
+ add(BorderLayout.CENTER,new JScrollPane(threadPanel));
+
+ workThreadHandler = new WorkThreadHandler();
+ } //}}}
+
+ //{{{ addNotify() method
+ @Override
+ public void addNotify()
+ {
+ VFSManager.getIOThreadPool().addProgressListener(workThreadHandler);
+ super.addNotify();
+ } //}}}
+
+ //{{{ removeNotify() method
+ @Override
+ public void removeNotify()
+ {
+ VFSManager.getIOThreadPool().removeProgressListener(workThreadHandler);
+ super.removeNotify();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private final JLabel caption;
+ private final ThreadProgress[] threads;
+ private final WorkThreadHandler workThreadHandler;
+ //}}}
+
+ //{{{ updateCaption() method
+ private void updateCaption()
+ {
+ String[] args = { String.valueOf(VFSManager.getIOThreadPool()
+ .getRequestCount()) };
+ caption.setText(jEdit.getProperty("io-progress-monitor.caption",args));
+ } //}}}
+
+ //}}}
+
+ //{{{ WorkThreadHandler class
+ class WorkThreadHandler implements WorkThreadProgressListener
+ {
+ public void statusUpdate(WorkThreadPool threadPool, final int threadIndex)
+ {
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ updateCaption();
+ threads[threadIndex].update();
+ }
+ });
+ }
+
+ public void progressUpdate(WorkThreadPool threadPool, final int threadIndex)
+ {
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ updateCaption();
+ threads[threadIndex].update();
+ }
+ });
+ }
+ } //}}}
+
+ //{{{ ThreadProgress class
+ class ThreadProgress extends JPanel
+ {
+ //{{{ ThreadProgress constructor
+ ThreadProgress(int index)
+ {
+ super(new BorderLayout(12,12));
+
+ this.index = index;
+
+ Box box = new Box(BoxLayout.Y_AXIS);
+ box.add(Box.createGlue());
+ box.add(progress = new JProgressBar());
+ progress.setStringPainted(true);
+ box.add(Box.createGlue());
+ add(BorderLayout.CENTER,box);
+
+ abort = new JButton(jEdit.getProperty("io-progress-monitor.abort"));
+ abort.addActionListener(new ActionHandler());
+ add(BorderLayout.EAST,abort);
+
+ update();
+ } //}}}
+
+ //{{{ update() method
+ public void update()
+ {
+ WorkThread thread = VFSManager.getIOThreadPool().getThread(index);
+ if(thread.isRequestRunning())
+ {
+ if (progress.isIndeterminate())
+ {
+ if (thread.getProgressMaximum() != 0)
+ progress.setIndeterminate(false);
+ }
+ else if (thread.getProgressMaximum() == 0)
+ progress.setIndeterminate(true);
+
+ abort.setEnabled(true);
+ String status = thread.getStatus();
+ if(status == null)
+ status = "";
+ progress.setString(status);
+ progress.setMaximum(thread.getProgressMaximum());
+ //System.err.println("value: " + thread.getProgressValue());
+ progress.setValue(thread.getProgressValue());
+ }
+ else
+ {
+ abort.setEnabled(false);
+ progress.setString(jEdit.getProperty("io-progress-monitor"
+ + ".idle"));
+ progress.setIndeterminate(false);
+ progress.setValue(0);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private final int index;
+ private final JProgressBar progress;
+ private final JButton abort;
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == abort)
+ {
+ int result = GUIUtilities.confirm(
+ IOProgressMonitor.this,"abort",null,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ if(result == JOptionPane.YES_OPTION)
+ {
+ VFSManager.getIOThreadPool().getThread(index)
+ .abortCurrentRequest();
+ }
+ }
+ }
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/InputHandler.java b/jEdit/org/gjt/sp/jedit/gui/InputHandler.java
index 28bb0c7..ff6f8b9 100644
--- a/jEdit/org/gjt/sp/jedit/gui/InputHandler.java
+++ b/jEdit/org/gjt/sp/jedit/gui/InputHandler.java
@@ -1,528 +1,528 @@
-/*
- * InputHandler.java - Manages key bindings and executes actions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.text.JTextComponent;
-
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.input.AbstractInputHandler;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-
-import java.awt.event.KeyEvent;
-import java.awt.*;
-//}}}
-
-/**
- * An input handler converts the user's key strokes into concrete actions.
- * It also takes care of macro recording and action repetition.<p>
- *
- * This class provides all the necessary support code for an input
- * handler, but doesn't actually do any key binding logic. It is up
- * to the implementations of this class to do so.
- *
- * @author Slava Pestov
- * @version $Id: InputHandler.java 12942 2008-06-27 08:33:55Z kpouer $
- * @see org.gjt.sp.jedit.gui.DefaultInputHandler
- */
-public abstract class InputHandler extends AbstractInputHandler<EditAction>
-{
- //{{{ InputHandler constructor
- /**
- * Creates a new input handler.
- * @param view The view
- */
- protected InputHandler(View view)
- {
- this.view = view;
- } //}}}
-
- //{{{ handleKey() method
- /**
- * Handles a keystroke.
- * @param keyStroke The key stroke.
- * @return true if the input could be handled.
- * @since jEdit 4.2pre5
- */
- public final boolean handleKey(KeyEventTranslator.Key keyStroke)
- {
- return handleKey(keyStroke, false);
- } //}}}
-
- //{{{ processKeyEvent() method
- /**
- * Forwards key events directly to the input handler.
- * This is slightly faster than using a KeyListener
- * because some Swing overhead is avoided.
- * @since 4.3pre7
- */
- @Override
- public void processKeyEvent(KeyEvent evt, int from, boolean global)
- {
- if(Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,this,"Key event : "
- + AbstractInputHandler.toString(evt) + " from " + from);
- Log.log(Log.DEBUG,this,view+".isFocused()="+view.isFocused()+'.',new Exception());
- }
-
- if(view.getTextArea().hasFocus() && from == View.VIEW)
- return;
-
- evt = _preprocessKeyEvent(evt);
- if(evt == null)
- return;
-
- if(Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,this,"Key event after workaround: "
- + AbstractInputHandler.toString(evt) + " from " + from);
- }
-
- Component prefixFocusOwner = view.getPrefixFocusOwner();
- boolean focusOnTextArea = false;
- switch(evt.getID())
- {
- case KeyEvent.KEY_TYPED:
- // if the user pressed eg C+e n n in the
- // search bar we want focus to go back there
- // after the prefix is done
- if(prefixFocusOwner != null)
- {
- if(prefixFocusOwner.isShowing())
- {
- prefixFocusOwner.requestFocus();
- focusOnTextArea = true;
- }
- }
-
- if(keyEventInterceptor != null)
- keyEventInterceptor.keyTyped(evt);
- else if(from == View.ACTION_BAR
- || isPrefixActive()
- || view.getTextArea().hasFocus())
- {
- processKeyEventKeyStrokeHandling(evt,from,"type ",global);
- }
-
-
- processKeyEventSub(focusOnTextArea);
-
- break;
- case KeyEvent.KEY_PRESSED:
- if(keyEventInterceptor != null)
- keyEventInterceptor.keyPressed(evt);
- else if(KeyEventWorkaround.isBindable(evt.getKeyCode()))
- {
- if(prefixFocusOwner != null)
- {
- if(prefixFocusOwner.isShowing())
- {
- prefixFocusOwner.requestFocus();
- focusOnTextArea = true;
- }
- view.setPrefixFocusOwner(null);
- }
-
- processKeyEventKeyStrokeHandling(evt,from,"press",global);
-
- processKeyEventSub(focusOnTextArea);
-
- }
- break;
- case KeyEvent.KEY_RELEASED:
- if(keyEventInterceptor != null)
- keyEventInterceptor.keyReleased(evt);
- break;
- }
- } //}}}
-
- //{{{ _preprocessKeyEvent() method
- private KeyEvent _preprocessKeyEvent(KeyEvent evt)
- {
- if(view.isClosed())
- return null;
- Component focusOwner = view.getFocusOwner();
- if(focusOwner instanceof JComponent)
- {
- JComponent comp = (JComponent)focusOwner;
- InputMap map = comp.getInputMap();
- ActionMap am = comp.getActionMap();
-
- if(map != null && am != null && comp.isEnabled())
- {
- KeyStroke keyStroke = KeyStroke.getKeyStrokeForEvent(evt);
- Object binding = map.get(keyStroke);
- if(binding != null && am.get(binding) != null)
- {
- return null;
- }
- }
- }
-
- if(focusOwner instanceof JTextComponent)
- {
- // fix for the bug where key events in JTextComponents
- // inside views are also handled by the input handler
- if(evt.getID() == KeyEvent.KEY_PRESSED)
- {
- switch(evt.getKeyCode())
- {
- case KeyEvent.VK_ENTER:
- case KeyEvent.VK_TAB:
- case KeyEvent.VK_BACK_SPACE:
- case KeyEvent.VK_SPACE:
- return null;
- }
- }
- }
-
- if(evt.isConsumed())
- return null;
-
- if(Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,this,"Key event (preprocessing) : "
- + AbstractInputHandler.toString(evt));
- }
-
- return KeyEventWorkaround.processKeyEvent(evt);
- } //}}}
-
- //{{{ processKeyEventSub() method
- private void processKeyEventSub(boolean focusOnTextArea)
- {
- // we might have been closed as a result of
- // the above
- if(view.isClosed())
- return;
-
- // this is a weird hack.
- // we don't want C+e a to insert 'a' in the
- // search bar if the search bar has focus...
- if(isPrefixActive())
- {
- Component focusOwner = view.getFocusOwner();
- if(focusOwner instanceof JTextComponent)
- {
- view.setPrefixFocusOwner(focusOwner);
- view.getTextArea().requestFocus();
- }
- else if(focusOnTextArea)
- {
- view.getTextArea().requestFocus();
- }
- else
- {
- view.setPrefixFocusOwner(null);
- }
- }
- else
- {
- view.setPrefixFocusOwner(null);
- }
- }
- //}}}
-
- //{{{ getRepeatCount() method
- /**
- * Returns the number of times the next action will be repeated.
- */
- public int getRepeatCount()
- {
- return repeatCount;
- } //}}}
-
- //{{{ setRepeatCount() method
- /**
- * Sets the number of times the next action will be repeated.
- * @param repeatCount The repeat count
- */
- public void setRepeatCount(int repeatCount)
- {
- int oldRepeatCount = this.repeatCount;
- this.repeatCount = repeatCount;
- if(oldRepeatCount != repeatCount)
- view.getStatus().setMessage(null);
- } //}}}
-
- //{{{ getLastAction() method
- /**
- * Returns the last executed action.
- * @since jEdit 2.5pre5
- */
- public EditAction getLastAction()
- {
- return lastAction;
- } //}}}
-
- //{{{ readNextChar() method
- /**
- * Invokes the specified BeanShell code, replacing __char__ in the
- * code with the next input character.
- * @param msg The prompt to display in the status bar
- * @param code The code
- * @since jEdit 3.2pre2
- */
- public void readNextChar(String msg, String code)
- {
- view.getStatus().setMessage(msg);
- readNextChar = code;
- } //}}}
-
- //{{{ readNextChar() method
- /**
- * @deprecated Use the other form of this method instead
- */
- @Deprecated
- public void readNextChar(String code)
- {
- readNextChar = code;
- } //}}}
-
- //{{{ invokeAction() method
- /**
- * Invokes the specified action, repeating and recording it as
- * necessary.
- * @param action The action
- * @since jEdit 4.2pre1
- */
- @Override
- public void invokeAction(String action)
- {
- invokeAction(jEdit.getAction(action));
- } //}}}
-
- //{{{ invokeAction() method
- /**
- * Invokes the specified action, repeating and recording it as
- * necessary.
- * @param action The action
- */
- @Override
- public void invokeAction(EditAction action)
- {
- JEditBuffer buffer = view.getBuffer();
-
- /* if(buffer.insideCompoundEdit())
- buffer.endCompoundEdit(); */
-
- // remember the last executed action
- if(!action.noRememberLast())
- {
- HistoryModel.getModel("action").addItem(action.getName());
- if(lastAction == action)
- lastActionCount++;
- else
- {
- lastAction = action;
- lastActionCount = 1;
- }
- }
-
- // remember old values, in case action changes them
- int _repeatCount = repeatCount;
-
- // execute the action
- if(action.noRepeat() || _repeatCount == 1)
- action.invoke(view);
- else
- {
- // stop people doing dumb stuff like C+ENTER 100 C+n
- if(_repeatCount > REPEAT_COUNT_THRESHOLD)
- {
- String label = action.getLabel();
- if(label == null)
- label = action.getName();
- else
- label = GUIUtilities.prettifyMenuLabel(label);
-
- Object[] pp = { label, _repeatCount };
-
- if(GUIUtilities.confirm(view,"large-repeat-count",pp,
- JOptionPane.WARNING_MESSAGE,
- JOptionPane.YES_NO_OPTION)
- != JOptionPane.YES_OPTION)
- {
- repeatCount = 1;
- view.getStatus().setMessage(null);
- return;
- }
- }
-
- try
- {
- buffer.beginCompoundEdit();
-
- for(int i = 0; i < _repeatCount; i++)
- action.invoke(view);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- }
-
- Macros.Recorder recorder = view.getMacroRecorder();
-
- if(recorder != null && !action.noRecord())
- recorder.record(_repeatCount,action.getCode());
-
- // If repeat was true originally, clear it
- // Otherwise it might have been set by the action, etc
- if(_repeatCount != 1)
- {
- // first of all, if this action set a
- // readNextChar, do not clear the repeat
- if(readNextChar != null)
- return;
-
- repeatCount = 1;
- view.getStatus().setMessage(null);
- }
- } //}}}
-
- //{{{ invokeLastAction() method
- public void invokeLastAction()
- {
- if(lastAction == null)
- view.getToolkit().beep();
- else
- invokeAction(lastAction);
- } //}}}
-
- //{{{ Instance variables
- protected final View view;
-
- //}}}
-
- //{{{ userInput() method
- protected void userInput(char ch)
- {
- lastActionCount = 0;
-
- JEditTextArea textArea = view.getTextArea();
-
- /* Buffer buffer = view.getBuffer();
- if(!buffer.insideCompoundEdit())
- buffer.beginCompoundEdit(); */
-
- if(repeatCount == 1)
- textArea.userInput(ch);
- else
- {
- // stop people doing dumb stuff like C+ENTER 100 C+n
- if(repeatCount > REPEAT_COUNT_THRESHOLD)
- {
- Object[] pp = { String.valueOf(ch),
- repeatCount };
-
- if(GUIUtilities.confirm(view,
- "large-repeat-count.user-input",pp,
- JOptionPane.WARNING_MESSAGE,
- JOptionPane.YES_NO_OPTION)
- != JOptionPane.YES_OPTION)
- {
- repeatCount = 1;
- view.getStatus().setMessage(null);
- return;
- }
- }
-
- JEditBuffer buffer = view.getBuffer();
- try
- {
- if(repeatCount != 1)
- buffer.beginCompoundEdit();
- for(int i = 0; i < repeatCount; i++)
- textArea.userInput(ch);
- }
- finally
- {
- if(repeatCount != 1)
- buffer.endCompoundEdit();
- }
- }
-
- Macros.Recorder recorder = view.getMacroRecorder();
-
- if(recorder != null)
- {
- recorder.recordInput(repeatCount,ch,
- textArea.isOverwriteEnabled());
- }
-
- repeatCount = 1;
- } //}}}
-
- //{{{ invokeReadNextChar() method
- protected void invokeReadNextChar(char ch)
- {
- JEditBuffer buffer = view.getBuffer();
-
- /* if(buffer.insideCompoundEdit())
- buffer.endCompoundEdit(); */
-
- String charStr = StandardUtilities.charsToEscapes(String.valueOf(ch));
-
- // this might be a bit slow if __char__ occurs a lot
- int index;
- while((index = readNextChar.indexOf("__char__")) != -1)
- {
- readNextChar = readNextChar.substring(0,index)
- + '\'' + charStr + '\''
- + readNextChar.substring(index + 8);
- }
-
- Macros.Recorder recorder = view.getMacroRecorder();
- if(recorder != null)
- recorder.record(getRepeatCount(),readNextChar);
-
- view.getStatus().setMessage(null);
-
- if(getRepeatCount() != 1)
- {
- try
- {
- buffer.beginCompoundEdit();
-
- BeanShell.eval(view,BeanShell.getNameSpace(),
- "for(int i = 1; i < "
- + getRepeatCount() + "; i++)\n{\n"
- + readNextChar + "\n}");
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- }
- else
- BeanShell.eval(view,BeanShell.getNameSpace(),readNextChar);
-
- readNextChar = null;
- } //}}}
-}
+/*
+ * InputHandler.java - Manages key bindings and executes actions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.text.JTextComponent;
+
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.input.AbstractInputHandler;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+
+import java.awt.event.KeyEvent;
+import java.awt.*;
+//}}}
+
+/**
+ * An input handler converts the user's key strokes into concrete actions.
+ * It also takes care of macro recording and action repetition.<p>
+ *
+ * This class provides all the necessary support code for an input
+ * handler, but doesn't actually do any key binding logic. It is up
+ * to the implementations of this class to do so.
+ *
+ * @author Slava Pestov
+ * @version $Id: InputHandler.java 12942 2008-06-27 08:33:55Z kpouer $
+ * @see org.gjt.sp.jedit.gui.DefaultInputHandler
+ */
+public abstract class InputHandler extends AbstractInputHandler<EditAction>
+{
+ //{{{ InputHandler constructor
+ /**
+ * Creates a new input handler.
+ * @param view The view
+ */
+ protected InputHandler(View view)
+ {
+ this.view = view;
+ } //}}}
+
+ //{{{ handleKey() method
+ /**
+ * Handles a keystroke.
+ * @param keyStroke The key stroke.
+ * @return true if the input could be handled.
+ * @since jEdit 4.2pre5
+ */
+ public final boolean handleKey(KeyEventTranslator.Key keyStroke)
+ {
+ return handleKey(keyStroke, false);
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ /**
+ * Forwards key events directly to the input handler.
+ * This is slightly faster than using a KeyListener
+ * because some Swing overhead is avoided.
+ * @since 4.3pre7
+ */
+ @Override
+ public void processKeyEvent(KeyEvent evt, int from, boolean global)
+ {
+ if(Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,this,"Key event : "
+ + AbstractInputHandler.toString(evt) + " from " + from);
+ Log.log(Log.DEBUG,this,view+".isFocused()="+view.isFocused()+'.',new Exception());
+ }
+
+ if(view.getTextArea().hasFocus() && from == View.VIEW)
+ return;
+
+ evt = _preprocessKeyEvent(evt);
+ if(evt == null)
+ return;
+
+ if(Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,this,"Key event after workaround: "
+ + AbstractInputHandler.toString(evt) + " from " + from);
+ }
+
+ Component prefixFocusOwner = view.getPrefixFocusOwner();
+ boolean focusOnTextArea = false;
+ switch(evt.getID())
+ {
+ case KeyEvent.KEY_TYPED:
+ // if the user pressed eg C+e n n in the
+ // search bar we want focus to go back there
+ // after the prefix is done
+ if(prefixFocusOwner != null)
+ {
+ if(prefixFocusOwner.isShowing())
+ {
+ prefixFocusOwner.requestFocus();
+ focusOnTextArea = true;
+ }
+ }
+
+ if(keyEventInterceptor != null)
+ keyEventInterceptor.keyTyped(evt);
+ else if(from == View.ACTION_BAR
+ || isPrefixActive()
+ || view.getTextArea().hasFocus())
+ {
+ processKeyEventKeyStrokeHandling(evt,from,"type ",global);
+ }
+
+
+ processKeyEventSub(focusOnTextArea);
+
+ break;
+ case KeyEvent.KEY_PRESSED:
+ if(keyEventInterceptor != null)
+ keyEventInterceptor.keyPressed(evt);
+ else if(KeyEventWorkaround.isBindable(evt.getKeyCode()))
+ {
+ if(prefixFocusOwner != null)
+ {
+ if(prefixFocusOwner.isShowing())
+ {
+ prefixFocusOwner.requestFocus();
+ focusOnTextArea = true;
+ }
+ view.setPrefixFocusOwner(null);
+ }
+
+ processKeyEventKeyStrokeHandling(evt,from,"press",global);
+
+ processKeyEventSub(focusOnTextArea);
+
+ }
+ break;
+ case KeyEvent.KEY_RELEASED:
+ if(keyEventInterceptor != null)
+ keyEventInterceptor.keyReleased(evt);
+ break;
+ }
+ } //}}}
+
+ //{{{ _preprocessKeyEvent() method
+ private KeyEvent _preprocessKeyEvent(KeyEvent evt)
+ {
+ if(view.isClosed())
+ return null;
+ Component focusOwner = view.getFocusOwner();
+ if(focusOwner instanceof JComponent)
+ {
+ JComponent comp = (JComponent)focusOwner;
+ InputMap map = comp.getInputMap();
+ ActionMap am = comp.getActionMap();
+
+ if(map != null && am != null && comp.isEnabled())
+ {
+ KeyStroke keyStroke = KeyStroke.getKeyStrokeForEvent(evt);
+ Object binding = map.get(keyStroke);
+ if(binding != null && am.get(binding) != null)
+ {
+ return null;
+ }
+ }
+ }
+
+ if(focusOwner instanceof JTextComponent)
+ {
+ // fix for the bug where key events in JTextComponents
+ // inside views are also handled by the input handler
+ if(evt.getID() == KeyEvent.KEY_PRESSED)
+ {
+ switch(evt.getKeyCode())
+ {
+ case KeyEvent.VK_ENTER:
+ case KeyEvent.VK_TAB:
+ case KeyEvent.VK_BACK_SPACE:
+ case KeyEvent.VK_SPACE:
+ return null;
+ }
+ }
+ }
+
+ if(evt.isConsumed())
+ return null;
+
+ if(Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,this,"Key event (preprocessing) : "
+ + AbstractInputHandler.toString(evt));
+ }
+
+ return KeyEventWorkaround.processKeyEvent(evt);
+ } //}}}
+
+ //{{{ processKeyEventSub() method
+ private void processKeyEventSub(boolean focusOnTextArea)
+ {
+ // we might have been closed as a result of
+ // the above
+ if(view.isClosed())
+ return;
+
+ // this is a weird hack.
+ // we don't want C+e a to insert 'a' in the
+ // search bar if the search bar has focus...
+ if(isPrefixActive())
+ {
+ Component focusOwner = view.getFocusOwner();
+ if(focusOwner instanceof JTextComponent)
+ {
+ view.setPrefixFocusOwner(focusOwner);
+ view.getTextArea().requestFocus();
+ }
+ else if(focusOnTextArea)
+ {
+ view.getTextArea().requestFocus();
+ }
+ else
+ {
+ view.setPrefixFocusOwner(null);
+ }
+ }
+ else
+ {
+ view.setPrefixFocusOwner(null);
+ }
+ }
+ //}}}
+
+ //{{{ getRepeatCount() method
+ /**
+ * Returns the number of times the next action will be repeated.
+ */
+ public int getRepeatCount()
+ {
+ return repeatCount;
+ } //}}}
+
+ //{{{ setRepeatCount() method
+ /**
+ * Sets the number of times the next action will be repeated.
+ * @param repeatCount The repeat count
+ */
+ public void setRepeatCount(int repeatCount)
+ {
+ int oldRepeatCount = this.repeatCount;
+ this.repeatCount = repeatCount;
+ if(oldRepeatCount != repeatCount)
+ view.getStatus().setMessage(null);
+ } //}}}
+
+ //{{{ getLastAction() method
+ /**
+ * Returns the last executed action.
+ * @since jEdit 2.5pre5
+ */
+ public EditAction getLastAction()
+ {
+ return lastAction;
+ } //}}}
+
+ //{{{ readNextChar() method
+ /**
+ * Invokes the specified BeanShell code, replacing __char__ in the
+ * code with the next input character.
+ * @param msg The prompt to display in the status bar
+ * @param code The code
+ * @since jEdit 3.2pre2
+ */
+ public void readNextChar(String msg, String code)
+ {
+ view.getStatus().setMessage(msg);
+ readNextChar = code;
+ } //}}}
+
+ //{{{ readNextChar() method
+ /**
+ * @deprecated Use the other form of this method instead
+ */
+ @Deprecated
+ public void readNextChar(String code)
+ {
+ readNextChar = code;
+ } //}}}
+
+ //{{{ invokeAction() method
+ /**
+ * Invokes the specified action, repeating and recording it as
+ * necessary.
+ * @param action The action
+ * @since jEdit 4.2pre1
+ */
+ @Override
+ public void invokeAction(String action)
+ {
+ invokeAction(jEdit.getAction(action));
+ } //}}}
+
+ //{{{ invokeAction() method
+ /**
+ * Invokes the specified action, repeating and recording it as
+ * necessary.
+ * @param action The action
+ */
+ @Override
+ public void invokeAction(EditAction action)
+ {
+ JEditBuffer buffer = view.getBuffer();
+
+ /* if(buffer.insideCompoundEdit())
+ buffer.endCompoundEdit(); */
+
+ // remember the last executed action
+ if(!action.noRememberLast())
+ {
+ HistoryModel.getModel("action").addItem(action.getName());
+ if(lastAction == action)
+ lastActionCount++;
+ else
+ {
+ lastAction = action;
+ lastActionCount = 1;
+ }
+ }
+
+ // remember old values, in case action changes them
+ int _repeatCount = repeatCount;
+
+ // execute the action
+ if(action.noRepeat() || _repeatCount == 1)
+ action.invoke(view);
+ else
+ {
+ // stop people doing dumb stuff like C+ENTER 100 C+n
+ if(_repeatCount > REPEAT_COUNT_THRESHOLD)
+ {
+ String label = action.getLabel();
+ if(label == null)
+ label = action.getName();
+ else
+ label = GUIUtilities.prettifyMenuLabel(label);
+
+ Object[] pp = { label, _repeatCount };
+
+ if(GUIUtilities.confirm(view,"large-repeat-count",pp,
+ JOptionPane.WARNING_MESSAGE,
+ JOptionPane.YES_NO_OPTION)
+ != JOptionPane.YES_OPTION)
+ {
+ repeatCount = 1;
+ view.getStatus().setMessage(null);
+ return;
+ }
+ }
+
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ for(int i = 0; i < _repeatCount; i++)
+ action.invoke(view);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ }
+
+ Macros.Recorder recorder = view.getMacroRecorder();
+
+ if(recorder != null && !action.noRecord())
+ recorder.record(_repeatCount,action.getCode());
+
+ // If repeat was true originally, clear it
+ // Otherwise it might have been set by the action, etc
+ if(_repeatCount != 1)
+ {
+ // first of all, if this action set a
+ // readNextChar, do not clear the repeat
+ if(readNextChar != null)
+ return;
+
+ repeatCount = 1;
+ view.getStatus().setMessage(null);
+ }
+ } //}}}
+
+ //{{{ invokeLastAction() method
+ public void invokeLastAction()
+ {
+ if(lastAction == null)
+ view.getToolkit().beep();
+ else
+ invokeAction(lastAction);
+ } //}}}
+
+ //{{{ Instance variables
+ protected final View view;
+
+ //}}}
+
+ //{{{ userInput() method
+ protected void userInput(char ch)
+ {
+ lastActionCount = 0;
+
+ JEditTextArea textArea = view.getTextArea();
+
+ /* Buffer buffer = view.getBuffer();
+ if(!buffer.insideCompoundEdit())
+ buffer.beginCompoundEdit(); */
+
+ if(repeatCount == 1)
+ textArea.userInput(ch);
+ else
+ {
+ // stop people doing dumb stuff like C+ENTER 100 C+n
+ if(repeatCount > REPEAT_COUNT_THRESHOLD)
+ {
+ Object[] pp = { String.valueOf(ch),
+ repeatCount };
+
+ if(GUIUtilities.confirm(view,
+ "large-repeat-count.user-input",pp,
+ JOptionPane.WARNING_MESSAGE,
+ JOptionPane.YES_NO_OPTION)
+ != JOptionPane.YES_OPTION)
+ {
+ repeatCount = 1;
+ view.getStatus().setMessage(null);
+ return;
+ }
+ }
+
+ JEditBuffer buffer = view.getBuffer();
+ try
+ {
+ if(repeatCount != 1)
+ buffer.beginCompoundEdit();
+ for(int i = 0; i < repeatCount; i++)
+ textArea.userInput(ch);
+ }
+ finally
+ {
+ if(repeatCount != 1)
+ buffer.endCompoundEdit();
+ }
+ }
+
+ Macros.Recorder recorder = view.getMacroRecorder();
+
+ if(recorder != null)
+ {
+ recorder.recordInput(repeatCount,ch,
+ textArea.isOverwriteEnabled());
+ }
+
+ repeatCount = 1;
+ } //}}}
+
+ //{{{ invokeReadNextChar() method
+ protected void invokeReadNextChar(char ch)
+ {
+ JEditBuffer buffer = view.getBuffer();
+
+ /* if(buffer.insideCompoundEdit())
+ buffer.endCompoundEdit(); */
+
+ String charStr = StandardUtilities.charsToEscapes(String.valueOf(ch));
+
+ // this might be a bit slow if __char__ occurs a lot
+ int index;
+ while((index = readNextChar.indexOf("__char__")) != -1)
+ {
+ readNextChar = readNextChar.substring(0,index)
+ + '\'' + charStr + '\''
+ + readNextChar.substring(index + 8);
+ }
+
+ Macros.Recorder recorder = view.getMacroRecorder();
+ if(recorder != null)
+ recorder.record(getRepeatCount(),readNextChar);
+
+ view.getStatus().setMessage(null);
+
+ if(getRepeatCount() != 1)
+ {
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ BeanShell.eval(view,BeanShell.getNameSpace(),
+ "for(int i = 1; i < "
+ + getRepeatCount() + "; i++)\n{\n"
+ + readNextChar + "\n}");
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ }
+ else
+ BeanShell.eval(view,BeanShell.getNameSpace(),readNextChar);
+
+ readNextChar = null;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/JCheckBoxList.java b/jEdit/org/gjt/sp/jedit/gui/JCheckBoxList.java
index 47e3120..5ddefd9 100644
--- a/jEdit/org/gjt/sp/jedit/gui/JCheckBoxList.java
+++ b/jEdit/org/gjt/sp/jedit/gui/JCheckBoxList.java
@@ -1,350 +1,350 @@
-/*
- * JCheckBoxList.java - A list, each item can be checked or unchecked
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.Component;
-import java.awt.Font;
-import java.util.Vector;
-import java.util.List;
-import java.util.ArrayList;
-import javax.swing.*;
-import javax.swing.table.*;
-//}}}
-
-/**
- * A list where items can be selected and checked off independently.
- * @since jEdit 3.2pre9
- */
-public class JCheckBoxList extends JTable
-{
- //{{{ JCheckBoxList constructor
- /**
- * Creates a checkbox list with the given list of objects. The elements
- * of this array can either be Entry instances, or other objects (if the
- * latter, they will default to being unchecked).
- */
- public JCheckBoxList(Object[] items)
- {
- setModel(items);
- } //}}}
-
- //{{{ JCheckBoxList constructor
- /**
- * Creates a checkbox list with the given list of objects. The elements
- * of this vector can either be Entry instances, or other objects (if the
- * latter, they will default to being unchecked).
- */
- public JCheckBoxList(Vector items)
- {
- setModel(items);
- } //}}}
-
- //{{{ setModel() method
- /**
- * Sets the model to the given list of objects. The elements of this
- * array can either be Entry instances, or other objects (if the
- * latter, they will default to being unchecked).
- */
- public void setModel(Object[] items)
- {
- setModel(new CheckBoxListModel(items));
- init();
- } //}}}
-
- //{{{ setModel() method
- /**
- * Sets the model to the given list of objects. The elements of this
- * vector can either be Entry instances, or other objects (if the
- * latter, they will default to being unchecked).
- */
- public void setModel(Vector items)
- {
- setModel(new CheckBoxListModel(items));
- init();
- } //}}}
-
- //{{{ getCheckedValues() method
- public Object[] getCheckedValues()
- {
- List<Object> values = new ArrayList<Object>();
- CheckBoxListModel model = (CheckBoxListModel)getModel();
- for(int i = 0; i < model.items.size(); i++)
- {
- Entry entry = model.items.get(i);
- if(entry.checked && !entry.caption)
- {
- values.add(entry.value);
- }
- }
-
- Object[] retVal = new Object[values.size()];
- return values.toArray(retVal);
- } //}}}
-
- //{{{ selectAll() method
- @Override
- public void selectAll()
- {
- CheckBoxListModel model = (CheckBoxListModel)getModel();
- for(int i = 0; i < model.items.size(); i++)
- {
- Entry entry = model.items.elementAt(i);
- if(!entry.caption)
- entry.checked = true;
- }
-
- model.fireTableRowsUpdated(0,model.getRowCount());
- } //}}}
-
- //{{{ getValues() method
- public Entry[] getValues()
- {
- CheckBoxListModel model = (CheckBoxListModel)getModel();
- Entry[] retVal = new Entry[model.items.size()];
- model.items.copyInto(retVal);
- return retVal;
- } //}}}
-
- //{{{ getSelectedValue() method
- public Object getSelectedValue()
- {
- int row = getSelectedRow();
- if(row == -1)
- {
- return null;
- }
- else
- {
- return getModel().getValueAt(row,1);
- }
- } //}}}
-
- //{{{ getCellRenderer() method
- @Override
- public TableCellRenderer getCellRenderer(int row, int column)
- {
- if(column == 0)
- {
- Entry entry = ((CheckBoxListModel)getModel()).items.get(row);
- if(entry.caption)
- return dummy;
- }
-
- return super.getCellRenderer(row,column);
- } //}}}
-
- //{{{ Private members
- private TableCellRenderer dummy;
-
- //{{{ init() method
- private void init()
- {
- dummy = new DummyRenderer();
- getSelectionModel().setSelectionMode(ListSelectionModel
- .SINGLE_SELECTION);
- setShowGrid(false);
- setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
- TableColumn column = getColumnModel().getColumn(0);
- int checkBoxWidth = new JCheckBox().getPreferredSize().width;
- column.setPreferredWidth(checkBoxWidth);
- column.setMinWidth(checkBoxWidth);
- column.setWidth(checkBoxWidth);
- column.setMaxWidth(checkBoxWidth);
- column.setResizable(false);
-
- column = getColumnModel().getColumn(1);
- column.setCellRenderer(new LabelRenderer());
- } //}}}
-
- //}}}
-
- //{{{ Entry class
- /**
- * A check box list entry.
- */
- public static class Entry
- {
- boolean checked;
- boolean caption;
- Object value;
-
- public Entry(Object value)
- {
- this.caption = true;
- this.value = value;
- }
-
- public Entry(boolean checked, Object value)
- {
- this.checked = checked;
- this.value = value;
- }
-
- public boolean isChecked()
- {
- return checked;
- }
-
- public Object getValue()
- {
- return value;
- }
- } //}}}
-
- //{{{ DummyRenderer class
- private static class DummyRenderer extends DefaultTableCellRenderer
- {
- @Override
- public Component getTableCellRendererComponent(JTable table, Object value,
- boolean isSelected, boolean hasFocus, int row, int column)
- {
- return super.getTableCellRendererComponent(table,null /* value */,
- isSelected,false /* hasFocus */,row,column);
- }
- } //}}}
-
- //{{{ LabelRenderer class
- private class LabelRenderer extends DefaultTableCellRenderer
- {
- Font plainFont, boldFont;
-
- LabelRenderer()
- {
- plainFont = UIManager.getFont("Tree.font");
- boldFont = plainFont.deriveFont(Font.BOLD);
- }
-
- @Override
- public Component getTableCellRendererComponent(JTable table, Object value,
- boolean isSelected, boolean hasFocus, int row, int column)
- {
- super.getTableCellRendererComponent(table,value,isSelected,
- hasFocus,row,column);
-
- Entry entry = ((CheckBoxListModel)getModel()).items.get(row);
- if(entry.caption)
- setFont(boldFont);
- else
- setFont(plainFont);
- return this;
- }
- } //}}}
-}
-
-//{{{ CheckBoxListModel class
-class CheckBoxListModel extends AbstractTableModel
-{
- Vector<JCheckBoxList.Entry> items;
-
- CheckBoxListModel(Vector _items)
- {
- items = new Vector<JCheckBoxList.Entry>(_items.size());
- for(int i = 0; i < _items.size(); i++)
- {
- items.add(createEntry(_items.elementAt(i)));
- }
- }
-
- CheckBoxListModel(Object[] _items)
- {
- items = new Vector<JCheckBoxList.Entry>(_items.length);
- for(int i = 0; i < _items.length; i++)
- {
- items.add(createEntry(_items[i]));
- }
- }
-
- private static JCheckBoxList.Entry createEntry(Object obj)
- {
- if(obj instanceof JCheckBoxList.Entry)
- return (JCheckBoxList.Entry)obj;
- else
- return new JCheckBoxList.Entry(false,obj);
- }
-
- public int getRowCount()
- {
- return items.size();
- }
-
- public int getColumnCount()
- {
- return 2;
- }
-
- @Override
- public String getColumnName(int col)
- {
- return null;
- }
-
- public Object getValueAt(int row, int col)
- {
- JCheckBoxList.Entry entry = items.get(row);
- switch(col)
- {
- case 0:
- return Boolean.valueOf(entry.checked);
- case 1:
- return entry.value;
- default:
- throw new InternalError();
- }
- }
-
- @Override
- public Class getColumnClass(int col)
- {
- switch(col)
- {
- case 0:
- return Boolean.class;
- case 1:
- return String.class;
- default:
- throw new InternalError();
- }
- }
-
- @Override
- public boolean isCellEditable(int row, int col)
- {
- JCheckBoxList.Entry entry = items.get(row);
- return col == 0 && !entry.caption;
- }
-
- @Override
- public void setValueAt(Object value, int row, int col)
- {
- if(col == 0)
- {
- JCheckBoxList.Entry entry = items.get(row);
- if(!entry.caption)
- {
- entry.checked = value.equals(Boolean.TRUE);
- fireTableRowsUpdated(row,row);
- }
- }
- }
-} //}}}
+/*
+ * JCheckBoxList.java - A list, each item can be checked or unchecked
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.Component;
+import java.awt.Font;
+import java.util.Vector;
+import java.util.List;
+import java.util.ArrayList;
+import javax.swing.*;
+import javax.swing.table.*;
+//}}}
+
+/**
+ * A list where items can be selected and checked off independently.
+ * @since jEdit 3.2pre9
+ */
+public class JCheckBoxList extends JTable
+{
+ //{{{ JCheckBoxList constructor
+ /**
+ * Creates a checkbox list with the given list of objects. The elements
+ * of this array can either be Entry instances, or other objects (if the
+ * latter, they will default to being unchecked).
+ */
+ public JCheckBoxList(Object[] items)
+ {
+ setModel(items);
+ } //}}}
+
+ //{{{ JCheckBoxList constructor
+ /**
+ * Creates a checkbox list with the given list of objects. The elements
+ * of this vector can either be Entry instances, or other objects (if the
+ * latter, they will default to being unchecked).
+ */
+ public JCheckBoxList(Vector items)
+ {
+ setModel(items);
+ } //}}}
+
+ //{{{ setModel() method
+ /**
+ * Sets the model to the given list of objects. The elements of this
+ * array can either be Entry instances, or other objects (if the
+ * latter, they will default to being unchecked).
+ */
+ public void setModel(Object[] items)
+ {
+ setModel(new CheckBoxListModel(items));
+ init();
+ } //}}}
+
+ //{{{ setModel() method
+ /**
+ * Sets the model to the given list of objects. The elements of this
+ * vector can either be Entry instances, or other objects (if the
+ * latter, they will default to being unchecked).
+ */
+ public void setModel(Vector items)
+ {
+ setModel(new CheckBoxListModel(items));
+ init();
+ } //}}}
+
+ //{{{ getCheckedValues() method
+ public Object[] getCheckedValues()
+ {
+ List<Object> values = new ArrayList<Object>();
+ CheckBoxListModel model = (CheckBoxListModel)getModel();
+ for(int i = 0; i < model.items.size(); i++)
+ {
+ Entry entry = model.items.get(i);
+ if(entry.checked && !entry.caption)
+ {
+ values.add(entry.value);
+ }
+ }
+
+ Object[] retVal = new Object[values.size()];
+ return values.toArray(retVal);
+ } //}}}
+
+ //{{{ selectAll() method
+ @Override
+ public void selectAll()
+ {
+ CheckBoxListModel model = (CheckBoxListModel)getModel();
+ for(int i = 0; i < model.items.size(); i++)
+ {
+ Entry entry = model.items.elementAt(i);
+ if(!entry.caption)
+ entry.checked = true;
+ }
+
+ model.fireTableRowsUpdated(0,model.getRowCount());
+ } //}}}
+
+ //{{{ getValues() method
+ public Entry[] getValues()
+ {
+ CheckBoxListModel model = (CheckBoxListModel)getModel();
+ Entry[] retVal = new Entry[model.items.size()];
+ model.items.copyInto(retVal);
+ return retVal;
+ } //}}}
+
+ //{{{ getSelectedValue() method
+ public Object getSelectedValue()
+ {
+ int row = getSelectedRow();
+ if(row == -1)
+ {
+ return null;
+ }
+ else
+ {
+ return getModel().getValueAt(row,1);
+ }
+ } //}}}
+
+ //{{{ getCellRenderer() method
+ @Override
+ public TableCellRenderer getCellRenderer(int row, int column)
+ {
+ if(column == 0)
+ {
+ Entry entry = ((CheckBoxListModel)getModel()).items.get(row);
+ if(entry.caption)
+ return dummy;
+ }
+
+ return super.getCellRenderer(row,column);
+ } //}}}
+
+ //{{{ Private members
+ private TableCellRenderer dummy;
+
+ //{{{ init() method
+ private void init()
+ {
+ dummy = new DummyRenderer();
+ getSelectionModel().setSelectionMode(ListSelectionModel
+ .SINGLE_SELECTION);
+ setShowGrid(false);
+ setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
+ TableColumn column = getColumnModel().getColumn(0);
+ int checkBoxWidth = new JCheckBox().getPreferredSize().width;
+ column.setPreferredWidth(checkBoxWidth);
+ column.setMinWidth(checkBoxWidth);
+ column.setWidth(checkBoxWidth);
+ column.setMaxWidth(checkBoxWidth);
+ column.setResizable(false);
+
+ column = getColumnModel().getColumn(1);
+ column.setCellRenderer(new LabelRenderer());
+ } //}}}
+
+ //}}}
+
+ //{{{ Entry class
+ /**
+ * A check box list entry.
+ */
+ public static class Entry
+ {
+ boolean checked;
+ boolean caption;
+ Object value;
+
+ public Entry(Object value)
+ {
+ this.caption = true;
+ this.value = value;
+ }
+
+ public Entry(boolean checked, Object value)
+ {
+ this.checked = checked;
+ this.value = value;
+ }
+
+ public boolean isChecked()
+ {
+ return checked;
+ }
+
+ public Object getValue()
+ {
+ return value;
+ }
+ } //}}}
+
+ //{{{ DummyRenderer class
+ private static class DummyRenderer extends DefaultTableCellRenderer
+ {
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object value,
+ boolean isSelected, boolean hasFocus, int row, int column)
+ {
+ return super.getTableCellRendererComponent(table,null /* value */,
+ isSelected,false /* hasFocus */,row,column);
+ }
+ } //}}}
+
+ //{{{ LabelRenderer class
+ private class LabelRenderer extends DefaultTableCellRenderer
+ {
+ Font plainFont, boldFont;
+
+ LabelRenderer()
+ {
+ plainFont = UIManager.getFont("Tree.font");
+ boldFont = plainFont.deriveFont(Font.BOLD);
+ }
+
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object value,
+ boolean isSelected, boolean hasFocus, int row, int column)
+ {
+ super.getTableCellRendererComponent(table,value,isSelected,
+ hasFocus,row,column);
+
+ Entry entry = ((CheckBoxListModel)getModel()).items.get(row);
+ if(entry.caption)
+ setFont(boldFont);
+ else
+ setFont(plainFont);
+ return this;
+ }
+ } //}}}
+}
+
+//{{{ CheckBoxListModel class
+class CheckBoxListModel extends AbstractTableModel
+{
+ Vector<JCheckBoxList.Entry> items;
+
+ CheckBoxListModel(Vector _items)
+ {
+ items = new Vector<JCheckBoxList.Entry>(_items.size());
+ for(int i = 0; i < _items.size(); i++)
+ {
+ items.add(createEntry(_items.elementAt(i)));
+ }
+ }
+
+ CheckBoxListModel(Object[] _items)
+ {
+ items = new Vector<JCheckBoxList.Entry>(_items.length);
+ for(int i = 0; i < _items.length; i++)
+ {
+ items.add(createEntry(_items[i]));
+ }
+ }
+
+ private static JCheckBoxList.Entry createEntry(Object obj)
+ {
+ if(obj instanceof JCheckBoxList.Entry)
+ return (JCheckBoxList.Entry)obj;
+ else
+ return new JCheckBoxList.Entry(false,obj);
+ }
+
+ public int getRowCount()
+ {
+ return items.size();
+ }
+
+ public int getColumnCount()
+ {
+ return 2;
+ }
+
+ @Override
+ public String getColumnName(int col)
+ {
+ return null;
+ }
+
+ public Object getValueAt(int row, int col)
+ {
+ JCheckBoxList.Entry entry = items.get(row);
+ switch(col)
+ {
+ case 0:
+ return Boolean.valueOf(entry.checked);
+ case 1:
+ return entry.value;
+ default:
+ throw new InternalError();
+ }
+ }
+
+ @Override
+ public Class getColumnClass(int col)
+ {
+ switch(col)
+ {
+ case 0:
+ return Boolean.class;
+ case 1:
+ return String.class;
+ default:
+ throw new InternalError();
+ }
+ }
+
+ @Override
+ public boolean isCellEditable(int row, int col)
+ {
+ JCheckBoxList.Entry entry = items.get(row);
+ return col == 0 && !entry.caption;
+ }
+
+ @Override
+ public void setValueAt(Object value, int row, int col)
+ {
+ if(col == 0)
+ {
+ JCheckBoxList.Entry entry = items.get(row);
+ if(!entry.caption)
+ {
+ entry.checked = value.equals(Boolean.TRUE);
+ fireTableRowsUpdated(row,row);
+ }
+ }
+ }
+} //}}}
diff --git a/jEdit/org/gjt/sp/jedit/gui/JEditHistoryModelSaver.java b/jEdit/org/gjt/sp/jedit/gui/JEditHistoryModelSaver.java
index 213f20c..27078f9 100644
--- a/jEdit/org/gjt/sp/jedit/gui/JEditHistoryModelSaver.java
+++ b/jEdit/org/gjt/sp/jedit/gui/JEditHistoryModelSaver.java
@@ -1,224 +1,224 @@
-/*
- * JEditHistoryModelSaver.java - Handles services.xml files in plugins
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.gui;
-
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.IOUtilities;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.jedit.MiscUtilities;
-import org.gjt.sp.jedit.jEdit;
-
-import java.io.*;
-import java.nio.charset.Charset;
-import java.nio.charset.CharacterCodingException;
-import java.util.*;
-
-/**
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-public class JEditHistoryModelSaver implements HistoryModelSaver
-{
- //{{{ load() method
- public Map<String, HistoryModel> load(Map<String, HistoryModel> models)
- {
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory == null)
- return models;
-
- history = new File(MiscUtilities.constructPath(
- settingsDirectory,"history"));
- if(!history.exists())
- return models;
-
- historyModTime = history.lastModified();
-
- Log.log(Log.MESSAGE,HistoryModel.class,"Loading history");
-
- if(models == null)
- models = Collections.synchronizedMap(new HashMap<String, HistoryModel>());
-
- BufferedReader in = null;
- try
- {
- // Try loading with UTF-8 and fallback to the system
- // default encoding to load a history which was made by
- // an old version as well.
- try
- {
- // Pass the decoder explicitly to report a decode error
- // as an exception instead of replacing with \xFFFD.
- in = new BufferedReader(new InputStreamReader(
- new FileInputStream(history),
- Charset.forName("UTF-8").newDecoder()));
- models.putAll(loadFromReader(in));
- }
- catch(CharacterCodingException e)
- {
- // It seems to be made by an old version of jEdit.
- in.close();
- Log.log(Log.MESSAGE,HistoryModel.class,
- "Failed to load history with UTF-8." +
- " Fallbacking to the system default encoding.");
-
- in = new BufferedReader(new FileReader(history));
- models.putAll(loadFromReader(in));
- }
- }
- catch(FileNotFoundException fnf)
- {
- //Log.log(Log.DEBUG,HistoryModel.class,fnf);
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,HistoryModel.class,io);
- }
- finally
- {
- IOUtilities.closeQuietly(in);
- }
- return models;
- } //}}}
-
- //{{{ save() method
- public boolean save(Map<String, HistoryModel> models)
- {
- Log.log(Log.MESSAGE,HistoryModel.class,"Saving history");
- File file1 = new File(MiscUtilities.constructPath(
- jEdit.getSettingsDirectory(), "#history#save#"));
- File file2 = new File(MiscUtilities.constructPath(
- jEdit.getSettingsDirectory(), "history"));
- if(file2.exists() && file2.lastModified() != historyModTime)
- {
- Log.log(Log.WARNING,HistoryModel.class,file2
- + " changed on disk; will not save history");
- return false;
- }
-
- jEdit.backupSettingsFile(file2);
-
- String lineSep = System.getProperty("line.separator");
-
- BufferedWriter out = null;
-
- try
- {
- out = new BufferedWriter(new OutputStreamWriter(
- new FileOutputStream(file1), "UTF-8"));
-
- if(models != null)
- {
- Collection<HistoryModel> values = models.values();
- for (HistoryModel model : values)
- {
- if(model.getSize() == 0)
- continue;
-
- out.write('[');
- out.write(StandardUtilities.charsToEscapes(
- model.getName(),TO_ESCAPE));
- out.write(']');
- out.write(lineSep);
-
- for(int i = 0; i < model.getSize(); i++)
- {
- out.write(StandardUtilities.charsToEscapes(
- model.getItem(i),
- TO_ESCAPE));
- out.write(lineSep);
- }
- }
- }
-
- out.close();
-
- /* to avoid data loss, only do this if the above
- * completed successfully */
- file2.delete();
- file1.renameTo(file2);
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,HistoryModel.class,io);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
-
- historyModTime = file2.lastModified();
- return true;
- } //}}}
-
- //{{{ Private members
- private static final String TO_ESCAPE = "\r\n\t\\\"'[]";
- private static File history;
- private static long historyModTime;
-
- //{{{ loadFromReader() method
- private static Map<String, HistoryModel> loadFromReader(BufferedReader in)
- throws IOException
- {
- Map<String, HistoryModel> result = new HashMap<String, HistoryModel>();
-
- HistoryModel currentModel = null;
- String line;
-
- while((line = in.readLine()) != null)
- {
- if(line.length() > 0 && line.charAt(0) == '[' && line.charAt(line.length() - 1) == ']')
- {
- if(currentModel != null)
- {
- result.put(currentModel.getName(),
- currentModel);
- }
-
- String modelName = MiscUtilities
- .escapesToChars(line.substring(
- 1,line.length() - 1));
- currentModel = new HistoryModel(
- modelName);
- }
- else if(currentModel == null)
- {
- throw new IOException("History data starts"
- + " before model name");
- }
- else
- {
- currentModel.addElement(MiscUtilities
- .escapesToChars(line));
- }
- }
-
- if(currentModel != null)
- {
- result.put(currentModel.getName(),currentModel);
- }
-
- return result;
- } //}}}
-
- //}}}
-
-}
+/*
+ * JEditHistoryModelSaver.java - Handles services.xml files in plugins
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.gui;
+
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.jEdit;
+
+import java.io.*;
+import java.nio.charset.Charset;
+import java.nio.charset.CharacterCodingException;
+import java.util.*;
+
+/**
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+public class JEditHistoryModelSaver implements HistoryModelSaver
+{
+ //{{{ load() method
+ public Map<String, HistoryModel> load(Map<String, HistoryModel> models)
+ {
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory == null)
+ return models;
+
+ history = new File(MiscUtilities.constructPath(
+ settingsDirectory,"history"));
+ if(!history.exists())
+ return models;
+
+ historyModTime = history.lastModified();
+
+ Log.log(Log.MESSAGE,HistoryModel.class,"Loading history");
+
+ if(models == null)
+ models = Collections.synchronizedMap(new HashMap<String, HistoryModel>());
+
+ BufferedReader in = null;
+ try
+ {
+ // Try loading with UTF-8 and fallback to the system
+ // default encoding to load a history which was made by
+ // an old version as well.
+ try
+ {
+ // Pass the decoder explicitly to report a decode error
+ // as an exception instead of replacing with \xFFFD.
+ in = new BufferedReader(new InputStreamReader(
+ new FileInputStream(history),
+ Charset.forName("UTF-8").newDecoder()));
+ models.putAll(loadFromReader(in));
+ }
+ catch(CharacterCodingException e)
+ {
+ // It seems to be made by an old version of jEdit.
+ in.close();
+ Log.log(Log.MESSAGE,HistoryModel.class,
+ "Failed to load history with UTF-8." +
+ " Fallbacking to the system default encoding.");
+
+ in = new BufferedReader(new FileReader(history));
+ models.putAll(loadFromReader(in));
+ }
+ }
+ catch(FileNotFoundException fnf)
+ {
+ //Log.log(Log.DEBUG,HistoryModel.class,fnf);
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,HistoryModel.class,io);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(in);
+ }
+ return models;
+ } //}}}
+
+ //{{{ save() method
+ public boolean save(Map<String, HistoryModel> models)
+ {
+ Log.log(Log.MESSAGE,HistoryModel.class,"Saving history");
+ File file1 = new File(MiscUtilities.constructPath(
+ jEdit.getSettingsDirectory(), "#history#save#"));
+ File file2 = new File(MiscUtilities.constructPath(
+ jEdit.getSettingsDirectory(), "history"));
+ if(file2.exists() && file2.lastModified() != historyModTime)
+ {
+ Log.log(Log.WARNING,HistoryModel.class,file2
+ + " changed on disk; will not save history");
+ return false;
+ }
+
+ jEdit.backupSettingsFile(file2);
+
+ String lineSep = System.getProperty("line.separator");
+
+ BufferedWriter out = null;
+
+ try
+ {
+ out = new BufferedWriter(new OutputStreamWriter(
+ new FileOutputStream(file1), "UTF-8"));
+
+ if(models != null)
+ {
+ Collection<HistoryModel> values = models.values();
+ for (HistoryModel model : values)
+ {
+ if(model.getSize() == 0)
+ continue;
+
+ out.write('[');
+ out.write(StandardUtilities.charsToEscapes(
+ model.getName(),TO_ESCAPE));
+ out.write(']');
+ out.write(lineSep);
+
+ for(int i = 0; i < model.getSize(); i++)
+ {
+ out.write(StandardUtilities.charsToEscapes(
+ model.getItem(i),
+ TO_ESCAPE));
+ out.write(lineSep);
+ }
+ }
+ }
+
+ out.close();
+
+ /* to avoid data loss, only do this if the above
+ * completed successfully */
+ file2.delete();
+ file1.renameTo(file2);
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,HistoryModel.class,io);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+
+ historyModTime = file2.lastModified();
+ return true;
+ } //}}}
+
+ //{{{ Private members
+ private static final String TO_ESCAPE = "\r\n\t\\\"'[]";
+ private static File history;
+ private static long historyModTime;
+
+ //{{{ loadFromReader() method
+ private static Map<String, HistoryModel> loadFromReader(BufferedReader in)
+ throws IOException
+ {
+ Map<String, HistoryModel> result = new HashMap<String, HistoryModel>();
+
+ HistoryModel currentModel = null;
+ String line;
+
+ while((line = in.readLine()) != null)
+ {
+ if(line.length() > 0 && line.charAt(0) == '[' && line.charAt(line.length() - 1) == ']')
+ {
+ if(currentModel != null)
+ {
+ result.put(currentModel.getName(),
+ currentModel);
+ }
+
+ String modelName = MiscUtilities
+ .escapesToChars(line.substring(
+ 1,line.length() - 1));
+ currentModel = new HistoryModel(
+ modelName);
+ }
+ else if(currentModel == null)
+ {
+ throw new IOException("History data starts"
+ + " before model name");
+ }
+ else
+ {
+ currentModel.addElement(MiscUtilities
+ .escapesToChars(line));
+ }
+ }
+
+ if(currentModel != null)
+ {
+ result.put(currentModel.getName(),currentModel);
+ }
+
+ return result;
+ } //}}}
+
+ //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/KeyEventTranslator.java b/jEdit/org/gjt/sp/jedit/gui/KeyEventTranslator.java
index be54c6a..60163de 100644
--- a/jEdit/org/gjt/sp/jedit/gui/KeyEventTranslator.java
+++ b/jEdit/org/gjt/sp/jedit/gui/KeyEventTranslator.java
@@ -1,544 +1,532 @@
-/*
- * KeyEventTranslator.java - Hides some warts of AWT event API
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.event.*;
-import java.util.HashMap;
-import java.util.Map;
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.jedit.OperatingSystem;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * In conjunction with the <code>KeyEventWorkaround</code>, hides some
- * warts in the AWT key event API.
- *
- * @author Slava Pestov
- * @version $Id: KeyEventTranslator.java 16341 2009-10-14 10:05:51Z kpouer $
- */
-public class KeyEventTranslator
-{
- //{{{ addTranslation() method
- /**
- * Adds a keyboard translation.
- * @param key1 Translate this key
- * @param key2 Into this key
- * @since jEdit 4.2pre3
- */
- public static void addTranslation(Key key1, Key key2)
- {
- transMap.put(key1,key2);
- } //}}}
-
- //{{{ translateKeyEvent() method
-
- protected static KeyEvent lastKeyPressEvent;
-
- protected static boolean lastKeyPressAccepted;
-
- /**
- * Pass this an event from {@link
- * KeyEventWorkaround#processKeyEvent(java.awt.event.KeyEvent)}.
- * @param evt the KeyEvent to translate
- * @since jEdit 4.2pre3
- */
- public static Key translateKeyEvent(KeyEvent evt)
- {
- Key key = translateKeyEvent2(evt);
-
- if (key!=null)
- {
- if (key.isPhantom())
- {
- key = null;
- }
- }
-
- return key;
- }
-
- /**
- * Pass this an event from {@link
- * KeyEventWorkaround#processKeyEvent(java.awt.event.KeyEvent)}.
- * @param evt the KeyEvent to translate
- * @since jEdit 4.2pre3
- */
- public static Key translateKeyEvent2(KeyEvent evt)
- {
- int modifiers = evt.getModifiers();
- Key returnValue;
-
- switch(evt.getID())
- {
- case KeyEvent.KEY_PRESSED:
- int keyCode = evt.getKeyCode();
- if((keyCode >= KeyEvent.VK_0
- && keyCode <= KeyEvent.VK_9)
- || (keyCode >= KeyEvent.VK_A
- && keyCode <= KeyEvent.VK_Z))
- {
- if(Debug.ALTERNATIVE_DISPATCHER)
- return null;
- else
- {
- returnValue = new Key(
- modifiersToString(modifiers),
- '\0',Character.toLowerCase(
- (char)keyCode));
- }
- }
- else
- {
- if(keyCode == KeyEvent.VK_TAB)
- {
- evt.consume();
- returnValue = new Key(
- modifiersToString(modifiers),
- keyCode,'\0');
- }
- else if(keyCode == KeyEvent.VK_SPACE)
- {
- // for SPACE or S+SPACE we pass the
- // key typed since international
- // keyboards sometimes produce a
- // KEY_PRESSED SPACE but not a
- // KEY_TYPED SPACE, eg if you have to
- // do a "<space> to insert ".
- if((modifiers & ~InputEvent.SHIFT_MASK) == 0)
- returnValue = null;
- else
- {
- returnValue = new Key(
- modifiersToString(modifiers),
- 0,' ');
- }
- }
- else
- {
- returnValue = new Key(
- modifiersToString(modifiers),
- keyCode,'\0');
- }
- }
- break;
- case KeyEvent.KEY_TYPED:
- char ch = evt.getKeyChar();
-
- if(KeyEventWorkaround.isMacControl(evt))
- ch |= 0x60;
-
- switch(ch)
- {
- case '\n':
- case '\t':
- case '\b':
- return null;
- case ' ':
- if((modifiers & ~InputEvent.SHIFT_MASK) != 0)
- return null;
- }
-
- int ignoreMods;
- if(Debug.ALT_KEY_PRESSED_DISABLED)
- {
- /* on MacOS, A+ can be user input */
- ignoreMods = InputEvent.SHIFT_MASK
- | InputEvent.ALT_GRAPH_MASK
- | InputEvent.ALT_MASK;
- }
- else
- {
- /* on MacOS, A+ can be user input */
- ignoreMods = InputEvent.SHIFT_MASK
- | InputEvent.ALT_GRAPH_MASK;
- }
-
- if((modifiers & InputEvent.ALT_GRAPH_MASK) == 0
- && (modifiers & ~ignoreMods) != 0)
- {
- if(Debug.ALTERNATIVE_DISPATCHER)
- {
- returnValue = new Key(
- modifiersToString(modifiers),
- 0,ch);
- }
- else
- return null;
- }
- else
- {
- if(ch == ' ')
- {
- returnValue = new Key(
- modifiersToString(modifiers),
- 0,ch);
- }
- else
- returnValue = new Key(null,0,ch);
- }
- break;
- default:
- return null;
- }
-
- /* I guess translated events do not have the 'evt' field set
- so consuming won't work. I don't think this is a problem as
- nothing uses translation anyway */
- Key trans = transMap.get(returnValue);
- if(trans == null)
- return returnValue;
- else
- return trans;
- } //}}}
-
- //{{{ parseKey() method
- /**
- * Converts a string to a keystroke. The string should be of the
- * form <i>modifiers</i>+<i>shortcut</i> where <i>modifiers</i>
- * is any combination of A for Alt, C for Control, S for Shift
- * or M for Meta, and <i>shortcut</i> is either a single character,
- * or a keycode name from the <code>KeyEvent</code> class, without
- * the <code>VK_</code> prefix.
- * @param keyStroke A string description of the key stroke
- * @since jEdit 4.2pre3
- */
- public static Key parseKey(String keyStroke)
- {
- if(keyStroke == null)
- return null;
- int modifiers = 0;
- String key;
- int endOfModifiers = keyStroke.indexOf('+');
- if(endOfModifiers <= 0) // not found or found at first
- {
- key = keyStroke;
- }
- else
- {
- for(int i = 0; i < endOfModifiers; i++)
- {
- switch(Character.toUpperCase(keyStroke
- .charAt(i)))
- {
- case 'A':
- modifiers |= a;
- break;
- case 'C':
- modifiers |= c;
- break;
- case 'M':
- modifiers |= m;
- break;
- case 'S':
- modifiers |= s;
- break;
- }
- }
- key = keyStroke.substring(endOfModifiers + 1);
- }
- if(key.length() == 1)
- {
- return new Key(modifiersToString(modifiers),0,key.charAt(0));
- }
- else if(key.length() == 0)
- {
- Log.log(Log.ERROR,KeyEventTranslator.class,
- "Invalid key stroke: " + keyStroke);
- return null;
- }
- else if(key.equals("SPACE"))
- {
- return new Key(modifiersToString(modifiers),0,' ');
- }
- else
- {
- int ch;
-
- try
- {
- ch = KeyEvent.class.getField("VK_".concat(key))
- .getInt(null);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,KeyEventTranslator.class,
- "Invalid key stroke: "
- + keyStroke);
- return null;
- }
-
- return new Key(modifiersToString(modifiers),ch,'\0');
- }
- } //}}}
-
- //{{{ setModifierMapping() method
- /**
- * Changes the mapping between symbolic modifier key names
- * (<code>C</code>, <code>A</code>, <code>M</code>, <code>S</code>) and
- * Java modifier flags.
- *
- * You can map more than one Java modifier to a symobolic modifier, for
- * example :
- * <p><code><pre>
- * setModifierMapping(
- * InputEvent.CTRL_MASK,
- * InputEvent.ALT_MASK | InputEvent.META_MASK,
- * 0,
- * InputEvent.SHIFT_MASK);
- *<pre></code></p>
- *
- * You cannot map a Java modifer to more than one symbolic modifier.
- *
- * @param c The modifier(s) to map the <code>C</code> modifier to
- * @param a The modifier(s) to map the <code>A</code> modifier to
- * @param m The modifier(s) to map the <code>M</code> modifier to
- * @param s The modifier(s) to map the <code>S</code> modifier to
- *
- * @since jEdit 4.2pre3
- */
- public static void setModifierMapping(int c, int a, int m, int s)
- {
-
- int duplicateMapping =
- (c & a) | (c & m) | (c & s) | (a & m) | (a & s) | (m & s);
-
- if((duplicateMapping & InputEvent.CTRL_MASK) != 0)
- {
- throw new IllegalArgumentException(
- "CTRL is mapped to more than one modifier");
- }
- if((duplicateMapping & InputEvent.ALT_MASK) != 0)
- {
- throw new IllegalArgumentException(
- "ALT is mapped to more than one modifier");
- }
- if((duplicateMapping & InputEvent.META_MASK) != 0)
- {
- throw new IllegalArgumentException(
- "META is mapped to more than one modifier");
- }
- if((duplicateMapping & InputEvent.SHIFT_MASK) != 0)
- {
- throw new IllegalArgumentException(
- "SHIFT is mapped to more than one modifier");
- }
-
- KeyEventTranslator.c = c;
- KeyEventTranslator.a = a;
- KeyEventTranslator.m = m;
- KeyEventTranslator.s = s;
- } //}}}
-
- //{{{ getSymbolicModifierName() method
- /**
- * Returns a the symbolic modifier name for the specified Java modifier
- * flag.
- *
- * @param mod A modifier constant from <code>InputEvent</code>
- *
- * @since jEdit 4.2pre3
- */
- public static char getSymbolicModifierName(int mod)
- {
- if((mod & c) != 0)
- return 'C';
- else if((mod & a) != 0)
- return 'A';
- else if((mod & m) != 0)
- return 'M';
- else if((mod & s) != 0)
- return 'S';
- else
- return '\0';
- } //}}}
-
- //{{{ modifiersToString() method
- private static final int[] MODS = {
- InputEvent.CTRL_MASK,
- InputEvent.ALT_MASK,
- InputEvent.META_MASK,
- InputEvent.SHIFT_MASK
- };
-
- public static String modifiersToString(int mods)
- {
- StringBuilder buf = null;
-
- for(int i = 0; i < MODS.length; i++)
- {
- if((mods & MODS[i]) != 0)
- buf = lazyAppend(buf,getSymbolicModifierName(MODS[i]));
- }
-
- if(buf == null)
- return null;
- else
- return buf.toString();
- } //}}}
-
- //{{{ getModifierString() method
- /**
- * Returns a string containing symbolic modifier names set in the
- * specified event.
- *
- * @param evt The event
- *
- * @since jEdit 4.2pre3
- */
- public static String getModifierString(InputEvent evt)
- {
- StringBuilder buf = new StringBuilder();
- if(evt.isControlDown())
- buf.append(getSymbolicModifierName(InputEvent.CTRL_MASK));
- if(evt.isAltDown())
- buf.append(getSymbolicModifierName(InputEvent.ALT_MASK));
- if(evt.isMetaDown())
- buf.append(getSymbolicModifierName(InputEvent.META_MASK));
- if(evt.isShiftDown())
- buf.append(getSymbolicModifierName(InputEvent.SHIFT_MASK));
- return buf.length() == 0 ? null : buf.toString();
- } //}}}
-
- static int c, a, m, s;
-
- //{{{ Private members
- /** This map is a pool of Key. */
- private static final Map<Key, Key> transMap = new HashMap<Key, Key>();
-
- private static StringBuilder lazyAppend(StringBuilder buf, char ch)
- {
- if(buf == null)
- buf = new StringBuilder();
- if(buf.indexOf(String.valueOf(ch)) == -1)
- buf.append(ch);
- return buf;
- } //}}}
-
- static
- {
- if(OperatingSystem.isMacOS())
- {
- setModifierMapping(
- InputEvent.META_MASK, /* == C+ */
- InputEvent.CTRL_MASK, /* == A+ */
- /* M+ discarded by key event workaround! */
- InputEvent.ALT_MASK, /* == M+ */
- InputEvent.SHIFT_MASK /* == S+ */);
- }
- else
- {
- setModifierMapping(
- InputEvent.CTRL_MASK,
- InputEvent.ALT_MASK,
- InputEvent.META_MASK,
- InputEvent.SHIFT_MASK);
- }
- } //}}}
-
- //{{{ Key class
- public static class Key
- {
- public final String modifiers;
- public final int key;
- public final char input;
-
- private final int hashCode;
- /**
- Wether this Key event applies to all jEdit windows (and not only a specific jEdit GUI component).
- */
- protected boolean isFromGlobalContext;
-
- /**
- Wether this Key event is a phantom key event. A phantom key event is a kind of duplicate key event which
- should not - due to its nature of being a duplicate - generate any action on data.
- However, phantom key events may be necessary to notify the rest of the GUI that the key event, if it was not a phantom key event but a real key event,
- would generate any action and thus would be consumed.
- */
- protected boolean isPhantom;
-
- public Key(String modifiers, int key, char input)
- {
- this.modifiers = modifiers;
- this.key = key;
- this.input = input;
- hashCode = key + input;
- }
-
- @Override
- public int hashCode()
- {
- return hashCode;
- }
-
- @Override
- public boolean equals(Object o)
- {
- if(o instanceof Key)
- {
- Key k = (Key)o;
- if(StandardUtilities.objectsEqual(modifiers,
- k.modifiers) && key == k.key
- && input == k.input)
- {
- return true;
- }
- }
-
- return false;
- }
-
- @Override
- public String toString()
- {
- return (modifiers == null ? "" : modifiers)
- + '<'
- + Integer.toString(key,16)
- + ','
- + Integer.toString(input,16)
- + '>';
- }
-
- public void setIsFromGlobalContext(boolean to)
- {
- isFromGlobalContext = to;
- }
-
- public boolean isFromGlobalContext()
- {
- return isFromGlobalContext;
- }
-
- public void setIsPhantom(boolean to)
- {
- isPhantom = to;
- }
-
- public boolean isPhantom()
- {
- return isPhantom;
- }
- } //}}}
-}
+/*
+ * KeyEventTranslator.java - Hides some warts of AWT event API
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.event.*;
+import java.util.HashMap;
+import java.util.Map;
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.jedit.OperatingSystem;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * In conjunction with the <code>KeyEventWorkaround</code>, hides some
+ * warts in the AWT key event API.
+ *
+ * @author Slava Pestov
+ * @version $Id: KeyEventTranslator.java 17816 2010-05-12 15:00:13Z k_satoda $
+ */
+public class KeyEventTranslator
+{
+ //{{{ addTranslation() method
+ /**
+ * Adds a keyboard translation.
+ * @param key1 Translate this key
+ * @param key2 Into this key
+ * @since jEdit 4.2pre3
+ */
+ public static void addTranslation(Key key1, Key key2)
+ {
+ transMap.put(key1,key2);
+ } //}}}
+
+ //{{{ translateKeyEvent() method
+
+ protected static KeyEvent lastKeyPressEvent;
+
+ protected static boolean lastKeyPressAccepted;
+
+ /**
+ * Pass this an event from {@link
+ * KeyEventWorkaround#processKeyEvent(java.awt.event.KeyEvent)}.
+ * @param evt the KeyEvent to translate
+ * @since jEdit 4.2pre3
+ */
+ public static Key translateKeyEvent(KeyEvent evt)
+ {
+ int modifiers = evt.getModifiers();
+ Key returnValue;
+
+ switch(evt.getID())
+ {
+ case KeyEvent.KEY_PRESSED:
+ int keyCode = evt.getKeyCode();
+ if((keyCode >= KeyEvent.VK_0
+ && keyCode <= KeyEvent.VK_9)
+ || (keyCode >= KeyEvent.VK_A
+ && keyCode <= KeyEvent.VK_Z))
+ {
+ if(Debug.ALTERNATIVE_DISPATCHER)
+ return null;
+ else
+ {
+ returnValue = new Key(
+ modifiersToString(modifiers),
+ '\0',Character.toLowerCase(
+ (char)keyCode));
+ }
+ }
+ else
+ {
+ if(keyCode == KeyEvent.VK_TAB)
+ {
+ evt.consume();
+ returnValue = new Key(
+ modifiersToString(modifiers),
+ keyCode,'\0');
+ }
+ else if(keyCode == KeyEvent.VK_SPACE)
+ {
+ // for SPACE or S+SPACE we pass the
+ // key typed since international
+ // keyboards sometimes produce a
+ // KEY_PRESSED SPACE but not a
+ // KEY_TYPED SPACE, eg if you have to
+ // do a "<space> to insert ".
+ if((modifiers & ~InputEvent.SHIFT_MASK) == 0)
+ returnValue = null;
+ else if (Debug.ALTERNATIVE_DISPATCHER && (modifiers & ~InputEvent.META_MASK) == 0)
+ returnValue = null;
+ else
+ {
+ returnValue = new Key(
+ modifiersToString(modifiers),
+ 0,' ');
+ }
+ }
+ else
+ {
+ returnValue = new Key(
+ modifiersToString(modifiers),
+ keyCode,'\0');
+ }
+ }
+ break;
+ case KeyEvent.KEY_TYPED:
+ char ch = evt.getKeyChar();
+
+ if(KeyEventWorkaround.isMacControl(evt))
+ ch |= 0x60;
+
+ switch(ch)
+ {
+ case '\n':
+ case '\t':
+ case '\b':
+ return null;
+ case ' ':
+ if (Debug.ALTERNATIVE_DISPATCHER && (modifiers & ~InputEvent.META_MASK) == 0)
+ returnValue = new Key(
+ modifiersToString(modifiers),
+ 0,' ');
+ else if((modifiers & ~InputEvent.SHIFT_MASK) != 0)
+ return null;
+ }
+
+ int ignoreMods;
+ if(Debug.ALT_KEY_PRESSED_DISABLED)
+ {
+ /* on MacOS, A+ can be user input */
+ ignoreMods = InputEvent.SHIFT_MASK
+ | InputEvent.ALT_GRAPH_MASK
+ | InputEvent.ALT_MASK;
+ }
+ else
+ {
+ /* on MacOS, A+ can be user input */
+ ignoreMods = InputEvent.SHIFT_MASK
+ | InputEvent.ALT_GRAPH_MASK;
+ }
+
+ if((modifiers & InputEvent.ALT_GRAPH_MASK) == 0
+ && (modifiers & ~ignoreMods) != 0)
+ {
+ if(Debug.ALTERNATIVE_DISPATCHER)
+ {
+ returnValue = new Key(
+ modifiersToString(modifiers),
+ 0,ch);
+ }
+ else
+ return null;
+ }
+ else
+ {
+ if(ch == ' ')
+ {
+ returnValue = new Key(
+ modifiersToString(modifiers),
+ 0,ch);
+ }
+ else
+ returnValue = new Key(null,0,ch);
+ }
+ break;
+ default:
+ return null;
+ }
+
+ /* I guess translated events do not have the 'evt' field set
+ so consuming won't work. I don't think this is a problem as
+ nothing uses translation anyway */
+ Key trans = transMap.get(returnValue);
+ if(trans == null)
+ return returnValue;
+ else
+ return trans;
+ }
+
+ /**
+ * Pass this an event from {@link
+ * KeyEventWorkaround#processKeyEvent(java.awt.event.KeyEvent)}.
+ * @param evt the KeyEvent to translate
+ * @since jEdit 4.2pre3
+ * @deprecated
+ * This gives completely same result with translateKeyEvent()
+ * since jEdit 4.4pre1.
+ */
+ @Deprecated
+ public static Key translateKeyEvent2(KeyEvent evt)
+ {
+ return translateKeyEvent(evt);
+ } //}}}
+
+ //{{{ parseKey() method
+ /**
+ * Converts a string to a keystroke. The string should be of the
+ * form <i>modifiers</i>+<i>shortcut</i> where <i>modifiers</i>
+ * is any combination of A for Alt, C for Control, S for Shift
+ * or M for Meta, and <i>shortcut</i> is either a single character,
+ * or a keycode name from the <code>KeyEvent</code> class, without
+ * the <code>VK_</code> prefix.
+ * @param keyStroke A string description of the key stroke
+ * @since jEdit 4.2pre3
+ */
+ public static Key parseKey(String keyStroke)
+ {
+ if(keyStroke == null)
+ return null;
+ int modifiers = 0;
+ String key;
+ int endOfModifiers = keyStroke.indexOf('+');
+ if(endOfModifiers <= 0) // not found or found at first
+ {
+ key = keyStroke;
+ }
+ else
+ {
+ for(int i = 0; i < endOfModifiers; i++)
+ {
+ switch(Character.toUpperCase(keyStroke
+ .charAt(i)))
+ {
+ case 'A':
+ modifiers |= a;
+ break;
+ case 'C':
+ modifiers |= c;
+ break;
+ case 'M':
+ modifiers |= m;
+ break;
+ case 'S':
+ modifiers |= s;
+ break;
+ }
+ }
+ key = keyStroke.substring(endOfModifiers + 1);
+ }
+ if(key.length() == 1)
+ {
+ return new Key(modifiersToString(modifiers),0,key.charAt(0));
+ }
+ else if(key.length() == 0)
+ {
+ Log.log(Log.ERROR,KeyEventTranslator.class,
+ "Invalid key stroke: " + keyStroke);
+ return null;
+ }
+ else if(key.equals("SPACE"))
+ {
+ return new Key(modifiersToString(modifiers),0,' ');
+ }
+ else
+ {
+ int ch;
+
+ try
+ {
+ ch = KeyEvent.class.getField("VK_".concat(key))
+ .getInt(null);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,KeyEventTranslator.class,
+ "Invalid key stroke: "
+ + keyStroke);
+ return null;
+ }
+
+ return new Key(modifiersToString(modifiers),ch,'\0');
+ }
+ } //}}}
+
+ //{{{ setModifierMapping() method
+ /**
+ * Changes the mapping between symbolic modifier key names
+ * (<code>C</code>, <code>A</code>, <code>M</code>, <code>S</code>) and
+ * Java modifier flags.
+ *
+ * You can map more than one Java modifier to a symobolic modifier, for
+ * example :
+ * <p><code><pre>
+ * setModifierMapping(
+ * InputEvent.CTRL_MASK,
+ * InputEvent.ALT_MASK | InputEvent.META_MASK,
+ * 0,
+ * InputEvent.SHIFT_MASK);
+ *<pre></code></p>
+ *
+ * You cannot map a Java modifer to more than one symbolic modifier.
+ *
+ * @param c The modifier(s) to map the <code>C</code> modifier to
+ * @param a The modifier(s) to map the <code>A</code> modifier to
+ * @param m The modifier(s) to map the <code>M</code> modifier to
+ * @param s The modifier(s) to map the <code>S</code> modifier to
+ *
+ * @since jEdit 4.2pre3
+ */
+ public static void setModifierMapping(int c, int a, int m, int s)
+ {
+
+ int duplicateMapping =
+ (c & a) | (c & m) | (c & s) | (a & m) | (a & s) | (m & s);
+
+ if((duplicateMapping & InputEvent.CTRL_MASK) != 0)
+ {
+ throw new IllegalArgumentException(
+ "CTRL is mapped to more than one modifier");
+ }
+ if((duplicateMapping & InputEvent.ALT_MASK) != 0)
+ {
+ throw new IllegalArgumentException(
+ "ALT is mapped to more than one modifier");
+ }
+ if((duplicateMapping & InputEvent.META_MASK) != 0)
+ {
+ throw new IllegalArgumentException(
+ "META is mapped to more than one modifier");
+ }
+ if((duplicateMapping & InputEvent.SHIFT_MASK) != 0)
+ {
+ throw new IllegalArgumentException(
+ "SHIFT is mapped to more than one modifier");
+ }
+
+ KeyEventTranslator.c = c;
+ KeyEventTranslator.a = a;
+ KeyEventTranslator.m = m;
+ KeyEventTranslator.s = s;
+ } //}}}
+
+ //{{{ getSymbolicModifierName() method
+ /**
+ * Returns a the symbolic modifier name for the specified Java modifier
+ * flag.
+ *
+ * @param mod A modifier constant from <code>InputEvent</code>
+ *
+ * @since jEdit 4.2pre3
+ */
+ public static char getSymbolicModifierName(int mod)
+ {
+ if((mod & c) != 0)
+ return 'C';
+ else if((mod & a) != 0)
+ return 'A';
+ else if((mod & m) != 0)
+ return 'M';
+ else if((mod & s) != 0)
+ return 'S';
+ else
+ return '\0';
+ } //}}}
+
+ //{{{ modifiersToString() method
+ private static final int[] MODS = {
+ InputEvent.CTRL_MASK,
+ InputEvent.ALT_MASK,
+ InputEvent.META_MASK,
+ InputEvent.SHIFT_MASK
+ };
+
+ public static String modifiersToString(int mods)
+ {
+ StringBuilder buf = null;
+
+ for(int i = 0; i < MODS.length; i++)
+ {
+ if((mods & MODS[i]) != 0)
+ buf = lazyAppend(buf,getSymbolicModifierName(MODS[i]));
+ }
+
+ if(buf == null)
+ return null;
+ else
+ return buf.toString();
+ } //}}}
+
+ //{{{ getModifierString() method
+ /**
+ * Returns a string containing symbolic modifier names set in the
+ * specified event.
+ *
+ * @param evt The event
+ *
+ * @since jEdit 4.2pre3
+ */
+ public static String getModifierString(InputEvent evt)
+ {
+ StringBuilder buf = new StringBuilder();
+ if(evt.isControlDown())
+ buf.append(getSymbolicModifierName(InputEvent.CTRL_MASK));
+ if(evt.isAltDown())
+ buf.append(getSymbolicModifierName(InputEvent.ALT_MASK));
+ if(evt.isMetaDown())
+ buf.append(getSymbolicModifierName(InputEvent.META_MASK));
+ if(evt.isShiftDown())
+ buf.append(getSymbolicModifierName(InputEvent.SHIFT_MASK));
+ return buf.length() == 0 ? null : buf.toString();
+ } //}}}
+
+ static int c, a, m, s;
+
+ //{{{ Private members
+ /** This map is a pool of Key. */
+ private static final Map<Key, Key> transMap = new HashMap<Key, Key>();
+
+ private static StringBuilder lazyAppend(StringBuilder buf, char ch)
+ {
+ if(buf == null)
+ buf = new StringBuilder();
+ if(buf.indexOf(String.valueOf(ch)) == -1)
+ buf.append(ch);
+ return buf;
+ } //}}}
+
+ static
+ {
+ if(OperatingSystem.isMacOS())
+ {
+ setModifierMapping(
+ InputEvent.META_MASK, /* == C+ */
+ InputEvent.CTRL_MASK, /* == A+ */
+ /* M+ discarded by key event workaround! */
+ InputEvent.ALT_MASK, /* == M+ */
+ InputEvent.SHIFT_MASK /* == S+ */);
+ }
+ else
+ {
+ setModifierMapping(
+ InputEvent.CTRL_MASK,
+ InputEvent.ALT_MASK,
+ InputEvent.META_MASK,
+ InputEvent.SHIFT_MASK);
+ }
+ } //}}}
+
+ //{{{ Key class
+ public static class Key
+ {
+ public final String modifiers;
+ public final int key;
+ public final char input;
+
+ private final int hashCode;
+ /**
+ Wether this Key event applies to all jEdit windows (and not only a specific jEdit GUI component).
+ */
+ protected boolean isFromGlobalContext;
+
+ public Key(String modifiers, int key, char input)
+ {
+ this.modifiers = modifiers;
+ this.key = key;
+ this.input = input;
+ hashCode = key + input;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return hashCode;
+ }
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if(o instanceof Key)
+ {
+ Key k = (Key)o;
+ if(StandardUtilities.objectsEqual(modifiers,
+ k.modifiers) && key == k.key
+ && input == k.input)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ public String toString()
+ {
+ return (modifiers == null ? "" : modifiers)
+ + '<'
+ + Integer.toString(key,16)
+ + ','
+ + Integer.toString(input,16)
+ + '>';
+ }
+
+ public void setIsFromGlobalContext(boolean to)
+ {
+ isFromGlobalContext = to;
+ }
+
+ public boolean isFromGlobalContext()
+ {
+ return isFromGlobalContext;
+ }
+
+ @Deprecated
+ public boolean isPhantom()
+ {
+ return false;
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/KeyEventWorkaround.java b/jEdit/org/gjt/sp/jedit/gui/KeyEventWorkaround.java
index 813465a..aee1be1 100644
--- a/jEdit/org/gjt/sp/jedit/gui/KeyEventWorkaround.java
+++ b/jEdit/org/gjt/sp/jedit/gui/KeyEventWorkaround.java
@@ -1,390 +1,395 @@
-/*
- * KeyEventWorkaround.java - Works around bugs in Java event handling
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.event.*;
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.jedit.OperatingSystem;
-import org.gjt.sp.jedit.input.AbstractInputHandler;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Various hacks to get keyboard event handling to behave in a consistent manner
- * across Java implementations. This type of stuff should not be necessary, but
- * Java's keyboard handling is crap, to put it mildly.
- *
- * @author Slava Pestov
- * @version $Id: KeyEventWorkaround.java 13655 2008-09-12 20:33:30Z k_satoda $
- */
-public class KeyEventWorkaround
-{
- //{{{ isBindable() method
- public static boolean isBindable(int keyCode)
- {
- switch(keyCode)
- {
- case KeyEvent.VK_ALT:
- case KeyEvent.VK_ALT_GRAPH:
- case KeyEvent.VK_CONTROL:
- case KeyEvent.VK_SHIFT:
- case KeyEvent.VK_META:
- case KeyEvent.VK_DEAD_GRAVE:
- case KeyEvent.VK_DEAD_ACUTE:
- case KeyEvent.VK_DEAD_CIRCUMFLEX:
- case KeyEvent.VK_DEAD_TILDE:
- case KeyEvent.VK_DEAD_MACRON:
- case KeyEvent.VK_DEAD_BREVE:
- case KeyEvent.VK_DEAD_ABOVEDOT:
- case KeyEvent.VK_DEAD_DIAERESIS:
- case KeyEvent.VK_DEAD_ABOVERING:
- case KeyEvent.VK_DEAD_DOUBLEACUTE:
- case KeyEvent.VK_DEAD_CARON:
- case KeyEvent.VK_DEAD_CEDILLA:
- case KeyEvent.VK_DEAD_OGONEK:
- case KeyEvent.VK_DEAD_IOTA:
- case KeyEvent.VK_DEAD_VOICED_SOUND:
- case KeyEvent.VK_DEAD_SEMIVOICED_SOUND:
- return false;
- default:
- return true;
- }
- } //}}}
-
- //{{{ isPrintable() method
- /**
- * We need to know if a keycode can potentially result in a
- * keytyped.
- * @since jEdit 4.3pre2
- */
- public static boolean isPrintable(int keyCode)
- {
- switch(keyCode)
- {
- /* case KeyEvent.VK_ENTER:
- case KeyEvent.VK_TAB: */
- case KeyEvent.VK_SPACE:
- case KeyEvent.VK_COMMA:
- case KeyEvent.VK_MINUS:
- case KeyEvent.VK_PERIOD:
- case KeyEvent.VK_SLASH:
- case KeyEvent.VK_0:
- case KeyEvent.VK_1:
- case KeyEvent.VK_2:
- case KeyEvent.VK_3:
- case KeyEvent.VK_4:
- case KeyEvent.VK_5:
- case KeyEvent.VK_6:
- case KeyEvent.VK_7:
- case KeyEvent.VK_8:
- case KeyEvent.VK_9:
- case KeyEvent.VK_SEMICOLON:
- case KeyEvent.VK_EQUALS :
- case KeyEvent.VK_A:
- case KeyEvent.VK_B:
- case KeyEvent.VK_C:
- case KeyEvent.VK_D:
- case KeyEvent.VK_E:
- case KeyEvent.VK_F:
- case KeyEvent.VK_G:
- case KeyEvent.VK_H:
- case KeyEvent.VK_I:
- case KeyEvent.VK_J:
- case KeyEvent.VK_K:
- case KeyEvent.VK_L:
- case KeyEvent.VK_M:
- case KeyEvent.VK_N:
- case KeyEvent.VK_O:
- case KeyEvent.VK_P:
- case KeyEvent.VK_Q:
- case KeyEvent.VK_R:
- case KeyEvent.VK_S:
- case KeyEvent.VK_T:
- case KeyEvent.VK_U:
- case KeyEvent.VK_V:
- case KeyEvent.VK_W:
- case KeyEvent.VK_X:
- case KeyEvent.VK_Y:
- case KeyEvent.VK_Z:
- case KeyEvent.VK_OPEN_BRACKET :
- case KeyEvent.VK_BACK_SLASH :
- case KeyEvent.VK_CLOSE_BRACKET:
- /* case KeyEvent.VK_NUMPAD0 :
- case KeyEvent.VK_NUMPAD1 :
- case KeyEvent.VK_NUMPAD2 :
- case KeyEvent.VK_NUMPAD3 :
- case KeyEvent.VK_NUMPAD4 :
- case KeyEvent.VK_NUMPAD5 :
- case KeyEvent.VK_NUMPAD6 :
- case KeyEvent.VK_NUMPAD7 :
- case KeyEvent.VK_NUMPAD8 :
- case KeyEvent.VK_NUMPAD9 :
- case KeyEvent.VK_MULTIPLY:
- case KeyEvent.VK_ADD :
- case KeyEvent.VK_SEPARATOR:
- case KeyEvent.VK_SUBTRACT :
- case KeyEvent.VK_DECIMAL :
- case KeyEvent.VK_DIVIDE :*/
- case KeyEvent.VK_BACK_QUOTE:
- case KeyEvent.VK_QUOTE:
- case KeyEvent.VK_DEAD_GRAVE:
- case KeyEvent.VK_DEAD_ACUTE:
- case KeyEvent.VK_DEAD_CIRCUMFLEX:
- case KeyEvent.VK_DEAD_TILDE:
- case KeyEvent.VK_DEAD_MACRON:
- case KeyEvent.VK_DEAD_BREVE:
- case KeyEvent.VK_DEAD_ABOVEDOT:
- case KeyEvent.VK_DEAD_DIAERESIS:
- case KeyEvent.VK_DEAD_ABOVERING:
- case KeyEvent.VK_DEAD_DOUBLEACUTE:
- case KeyEvent.VK_DEAD_CARON:
- case KeyEvent.VK_DEAD_CEDILLA:
- case KeyEvent.VK_DEAD_OGONEK:
- case KeyEvent.VK_DEAD_IOTA:
- case KeyEvent.VK_DEAD_VOICED_SOUND:
- case KeyEvent.VK_DEAD_SEMIVOICED_SOUND:
- case KeyEvent.VK_AMPERSAND:
- case KeyEvent.VK_ASTERISK:
- case KeyEvent.VK_QUOTEDBL:
- case KeyEvent.VK_LESS:
- case KeyEvent.VK_GREATER:
- case KeyEvent.VK_BRACELEFT:
- case KeyEvent.VK_BRACERIGHT:
- case KeyEvent.VK_AT:
- case KeyEvent.VK_COLON:
- case KeyEvent.VK_CIRCUMFLEX:
- case KeyEvent.VK_DOLLAR:
- case KeyEvent.VK_EURO_SIGN:
- case KeyEvent.VK_EXCLAMATION_MARK:
- case KeyEvent.VK_INVERTED_EXCLAMATION_MARK:
- case KeyEvent.VK_LEFT_PARENTHESIS:
- case KeyEvent.VK_NUMBER_SIGN:
- case KeyEvent.VK_PLUS:
- case KeyEvent.VK_RIGHT_PARENTHESIS:
- case KeyEvent.VK_UNDERSCORE:
- return true;
- default:
- return false;
- }
- } //}}}
-
- //{{{ isMacControl() method
- /**
- * Apple sucks.
- */
- public static boolean isMacControl(KeyEvent evt)
- {
- return (OperatingSystem.isMacOS() &&
- (evt.getModifiers() & InputEvent.CTRL_MASK) != 0
- && evt.getKeyChar() <= 0x2B);
- } //}}}
-
- //{{{ isNumericKeypad() method
- public static boolean isNumericKeypad(int keyCode)
- {
- switch(keyCode)
- {
- case KeyEvent.VK_NUMPAD0:
- case KeyEvent.VK_NUMPAD1:
- case KeyEvent.VK_NUMPAD2:
- case KeyEvent.VK_NUMPAD3:
- case KeyEvent.VK_NUMPAD4:
- case KeyEvent.VK_NUMPAD5:
- case KeyEvent.VK_NUMPAD6:
- case KeyEvent.VK_NUMPAD7:
- case KeyEvent.VK_NUMPAD8:
- case KeyEvent.VK_NUMPAD9:
- case KeyEvent.VK_MULTIPLY:
- case KeyEvent.VK_ADD:
- /* case KeyEvent.VK_SEPARATOR: */
- case KeyEvent.VK_SUBTRACT:
- case KeyEvent.VK_DECIMAL:
- case KeyEvent.VK_DIVIDE:
- return true;
- default:
- return false;
- }
- } //}}}
-
- //{{{ processKeyEvent() method
- public static KeyEvent processKeyEvent(KeyEvent evt)
- {
- int keyCode = evt.getKeyCode();
- char ch = evt.getKeyChar();
- int modifiers = evt.getModifiers();
-
- switch(evt.getID())
- {
- //{{{ KEY_PRESSED...
- case KeyEvent.KEY_PRESSED:
- // get rid of keys we never need to handle
- switch(keyCode)
- {
- case '\0':
- return null;
- case KeyEvent.VK_ALT:
- case KeyEvent.VK_ALT_GRAPH:
- case KeyEvent.VK_CONTROL:
- case KeyEvent.VK_SHIFT:
- case KeyEvent.VK_META:
- break;
- default:
- if(!evt.isMetaDown())
- {
- if(!evt.isControlDown()
- && !evt.isAltDown())
- {
- if(isPrintable(keyCode))
- {
- return null;
- }
- }
- }
-
- if(Debug.ALT_KEY_PRESSED_DISABLED)
- {
- /* we don't handle key pressed A+ */
- /* they're too troublesome */
- if((modifiers & InputEvent.ALT_MASK) != 0)
- return null;
- }
-
- if(isNumericKeypad(keyCode))
- last = LAST_NUMKEYPAD;
- else
- last = LAST_NOTHING;
-
- break;
- }
- break;
- //}}}
- //{{{ KEY_TYPED...
- case KeyEvent.KEY_TYPED:
- // need to let \b through so that backspace will work
- // in HistoryTextFields
- if(!isMacControl(evt)
- && (ch < 0x20 || ch == 0x7f || ch == 0xff)
- && ch != '\b' && ch != '\t' && ch != '\n')
- {
- return null;
- }
-
- if(Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,"KEWa","Key event (working around): "
- + AbstractInputHandler.toString(evt)+": last="+last+".");
- }
-
- if(!Debug.ALTERNATIVE_DISPATCHER)
- {
- if(((modifiers & InputEvent.CTRL_MASK) != 0
- ^ (modifiers & InputEvent.ALT_MASK) != 0)
- || (modifiers & InputEvent.META_MASK) != 0)
- {
- return null;
- }
- }
-
- // if the last key was a numeric keypad key
- // and NumLock is off, filter it out
- if(last == LAST_NUMKEYPAD)
- {
- last = LAST_NOTHING;
- if((ch >= '0' && ch <= '9') || ch == '.'
- || ch == '/' || ch == '*'
- || ch == '-' || ch == '+')
- {
- return null;
- }
- }
- // Windows JDK workaround
- else if(last == LAST_ALT)
- {
- last = LAST_NOTHING;
- switch(ch)
- {
- case 'B':
- case 'M':
- case 'X':
- case 'c':
- case '!':
- case ',':
- case '?':
- return null;
- }
- }
- break;
- //}}}
- //{{{ KEY_RELEASED...
- case KeyEvent.KEY_RELEASED:
- switch(keyCode)
- {
- case KeyEvent.VK_ALT:
- // we consume this to work around the bug
- // where A+TAB window switching activates
- // the menu bar on Windows.
- evt.consume();
- break;
- case KeyEvent.VK_ALT_GRAPH:
- case KeyEvent.VK_CONTROL:
- case KeyEvent.VK_SHIFT:
- case KeyEvent.VK_META:
- break;
- case KeyEvent.VK_LEFT:
- case KeyEvent.VK_RIGHT:
- case KeyEvent.VK_UP:
- case KeyEvent.VK_DOWN:
- case KeyEvent.VK_PAGE_UP:
- case KeyEvent.VK_PAGE_DOWN:
- case KeyEvent.VK_END:
- case KeyEvent.VK_HOME:
- /* workaround for A+keys producing
- * garbage on Windows */
- if(modifiers == InputEvent.ALT_MASK)
- last = LAST_ALT;
- break;
- }
- break;
- //}}}
- }
- return evt;
- } //}}}
-
- //{{{ numericKeypadKey() method
- /**
- * A workaround for non-working NumLock status in some Java versions.
- * @since jEdit 4.0pre8
- */
- public static void numericKeypadKey()
- {
- last = LAST_NOTHING;
- } //}}}
-
- //{{{ Private members
- private static int last;
- private static final int LAST_NOTHING = 0;
- private static final int LAST_NUMKEYPAD = 1;
- private static final int LAST_ALT = 2;
- //}}}
-}
+/*
+ * KeyEventWorkaround.java - Works around bugs in Java event handling
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.event.*;
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.jedit.OperatingSystem;
+import org.gjt.sp.jedit.input.AbstractInputHandler;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Various hacks to get keyboard event handling to behave in a consistent manner
+ * across Java implementations. This type of stuff should not be necessary, but
+ * Java's keyboard handling is crap, to put it mildly.
+ *
+ * @author Slava Pestov
+ * @version $Id: KeyEventWorkaround.java 17503 2010-03-20 09:47:18Z k_satoda $
+ */
+public class KeyEventWorkaround
+{
+ //{{{ isBindable() method
+ public static boolean isBindable(int keyCode)
+ {
+ switch(keyCode)
+ {
+ case KeyEvent.VK_ALT:
+ case KeyEvent.VK_ALT_GRAPH:
+ case KeyEvent.VK_CONTROL:
+ case KeyEvent.VK_SHIFT:
+ case KeyEvent.VK_META:
+ case KeyEvent.VK_DEAD_GRAVE:
+ case KeyEvent.VK_DEAD_ACUTE:
+ case KeyEvent.VK_DEAD_CIRCUMFLEX:
+ case KeyEvent.VK_DEAD_TILDE:
+ case KeyEvent.VK_DEAD_MACRON:
+ case KeyEvent.VK_DEAD_BREVE:
+ case KeyEvent.VK_DEAD_ABOVEDOT:
+ case KeyEvent.VK_DEAD_DIAERESIS:
+ case KeyEvent.VK_DEAD_ABOVERING:
+ case KeyEvent.VK_DEAD_DOUBLEACUTE:
+ case KeyEvent.VK_DEAD_CARON:
+ case KeyEvent.VK_DEAD_CEDILLA:
+ case KeyEvent.VK_DEAD_OGONEK:
+ case KeyEvent.VK_DEAD_IOTA:
+ case KeyEvent.VK_DEAD_VOICED_SOUND:
+ case KeyEvent.VK_DEAD_SEMIVOICED_SOUND:
+ return false;
+ default:
+ return true;
+ }
+ } //}}}
+
+ //{{{ isPrintable() method
+ /**
+ * We need to know if a keycode can potentially result in a
+ * keytyped.
+ * @since jEdit 4.3pre2
+ */
+ public static boolean isPrintable(int keyCode)
+ {
+ switch(keyCode)
+ {
+ /* case KeyEvent.VK_ENTER:
+ case KeyEvent.VK_TAB: */
+ case KeyEvent.VK_SPACE:
+ case KeyEvent.VK_COMMA:
+ case KeyEvent.VK_MINUS:
+ case KeyEvent.VK_PERIOD:
+ case KeyEvent.VK_SLASH:
+ case KeyEvent.VK_0:
+ case KeyEvent.VK_1:
+ case KeyEvent.VK_2:
+ case KeyEvent.VK_3:
+ case KeyEvent.VK_4:
+ case KeyEvent.VK_5:
+ case KeyEvent.VK_6:
+ case KeyEvent.VK_7:
+ case KeyEvent.VK_8:
+ case KeyEvent.VK_9:
+ case KeyEvent.VK_SEMICOLON:
+ case KeyEvent.VK_EQUALS :
+ case KeyEvent.VK_A:
+ case KeyEvent.VK_B:
+ case KeyEvent.VK_C:
+ case KeyEvent.VK_D:
+ case KeyEvent.VK_E:
+ case KeyEvent.VK_F:
+ case KeyEvent.VK_G:
+ case KeyEvent.VK_H:
+ case KeyEvent.VK_I:
+ case KeyEvent.VK_J:
+ case KeyEvent.VK_K:
+ case KeyEvent.VK_L:
+ case KeyEvent.VK_M:
+ case KeyEvent.VK_N:
+ case KeyEvent.VK_O:
+ case KeyEvent.VK_P:
+ case KeyEvent.VK_Q:
+ case KeyEvent.VK_R:
+ case KeyEvent.VK_S:
+ case KeyEvent.VK_T:
+ case KeyEvent.VK_U:
+ case KeyEvent.VK_V:
+ case KeyEvent.VK_W:
+ case KeyEvent.VK_X:
+ case KeyEvent.VK_Y:
+ case KeyEvent.VK_Z:
+ case KeyEvent.VK_OPEN_BRACKET :
+ case KeyEvent.VK_BACK_SLASH :
+ case KeyEvent.VK_CLOSE_BRACKET:
+ /* case KeyEvent.VK_NUMPAD0 :
+ case KeyEvent.VK_NUMPAD1 :
+ case KeyEvent.VK_NUMPAD2 :
+ case KeyEvent.VK_NUMPAD3 :
+ case KeyEvent.VK_NUMPAD4 :
+ case KeyEvent.VK_NUMPAD5 :
+ case KeyEvent.VK_NUMPAD6 :
+ case KeyEvent.VK_NUMPAD7 :
+ case KeyEvent.VK_NUMPAD8 :
+ case KeyEvent.VK_NUMPAD9 :
+ case KeyEvent.VK_MULTIPLY:
+ case KeyEvent.VK_ADD :
+ case KeyEvent.VK_SEPARATOR:
+ case KeyEvent.VK_SUBTRACT :
+ case KeyEvent.VK_DECIMAL :
+ case KeyEvent.VK_DIVIDE :*/
+ case KeyEvent.VK_BACK_QUOTE:
+ case KeyEvent.VK_QUOTE:
+ case KeyEvent.VK_DEAD_GRAVE:
+ case KeyEvent.VK_DEAD_ACUTE:
+ case KeyEvent.VK_DEAD_CIRCUMFLEX:
+ case KeyEvent.VK_DEAD_TILDE:
+ case KeyEvent.VK_DEAD_MACRON:
+ case KeyEvent.VK_DEAD_BREVE:
+ case KeyEvent.VK_DEAD_ABOVEDOT:
+ case KeyEvent.VK_DEAD_DIAERESIS:
+ case KeyEvent.VK_DEAD_ABOVERING:
+ case KeyEvent.VK_DEAD_DOUBLEACUTE:
+ case KeyEvent.VK_DEAD_CARON:
+ case KeyEvent.VK_DEAD_CEDILLA:
+ case KeyEvent.VK_DEAD_OGONEK:
+ case KeyEvent.VK_DEAD_IOTA:
+ case KeyEvent.VK_DEAD_VOICED_SOUND:
+ case KeyEvent.VK_DEAD_SEMIVOICED_SOUND:
+ case KeyEvent.VK_AMPERSAND:
+ case KeyEvent.VK_ASTERISK:
+ case KeyEvent.VK_QUOTEDBL:
+ case KeyEvent.VK_LESS:
+ case KeyEvent.VK_GREATER:
+ case KeyEvent.VK_BRACELEFT:
+ case KeyEvent.VK_BRACERIGHT:
+ case KeyEvent.VK_AT:
+ case KeyEvent.VK_COLON:
+ case KeyEvent.VK_CIRCUMFLEX:
+ case KeyEvent.VK_DOLLAR:
+ case KeyEvent.VK_EURO_SIGN:
+ case KeyEvent.VK_EXCLAMATION_MARK:
+ case KeyEvent.VK_INVERTED_EXCLAMATION_MARK:
+ case KeyEvent.VK_LEFT_PARENTHESIS:
+ case KeyEvent.VK_NUMBER_SIGN:
+ case KeyEvent.VK_PLUS:
+ case KeyEvent.VK_RIGHT_PARENTHESIS:
+ case KeyEvent.VK_UNDERSCORE:
+ return true;
+ default:
+ return false;
+ }
+ } //}}}
+
+ //{{{ isMacControl() method
+ /**
+ * Apple sucks.
+ */
+ public static boolean isMacControl(KeyEvent evt)
+ {
+ return (OperatingSystem.isMacOS() &&
+ (evt.getModifiers() & InputEvent.CTRL_MASK) != 0
+ && evt.getKeyChar() <= 0x2B);
+ } //}}}
+
+ //{{{ isNumericKeypad() method
+ public static boolean isNumericKeypad(int keyCode)
+ {
+ switch(keyCode)
+ {
+ case KeyEvent.VK_NUMPAD0:
+ case KeyEvent.VK_NUMPAD1:
+ case KeyEvent.VK_NUMPAD2:
+ case KeyEvent.VK_NUMPAD3:
+ case KeyEvent.VK_NUMPAD4:
+ case KeyEvent.VK_NUMPAD5:
+ case KeyEvent.VK_NUMPAD6:
+ case KeyEvent.VK_NUMPAD7:
+ case KeyEvent.VK_NUMPAD8:
+ case KeyEvent.VK_NUMPAD9:
+ case KeyEvent.VK_MULTIPLY:
+ case KeyEvent.VK_ADD:
+ /* case KeyEvent.VK_SEPARATOR: */
+ case KeyEvent.VK_SUBTRACT:
+ case KeyEvent.VK_DECIMAL:
+ case KeyEvent.VK_DIVIDE:
+ return true;
+ default:
+ return false;
+ }
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ public static KeyEvent processKeyEvent(KeyEvent evt)
+ {
+ int keyCode = evt.getKeyCode();
+ char ch = evt.getKeyChar();
+ int modifiers = evt.getModifiers();
+
+ switch(evt.getID())
+ {
+ //{{{ KEY_PRESSED...
+ case KeyEvent.KEY_PRESSED:
+ // get rid of keys we never need to handle
+ switch(keyCode)
+ {
+ case '\0':
+ return null;
+ case KeyEvent.VK_ALT:
+ case KeyEvent.VK_ALT_GRAPH:
+ case KeyEvent.VK_CONTROL:
+ case KeyEvent.VK_SHIFT:
+ case KeyEvent.VK_META:
+ break;
+ default:
+ if(!evt.isMetaDown())
+ {
+ if(!evt.isControlDown()
+ && !evt.isAltDown())
+ {
+ if(isPrintable(keyCode))
+ {
+ return null;
+ }
+ }
+ }
+
+ if(Debug.ALT_KEY_PRESSED_DISABLED)
+ {
+ /* we don't handle key pressed A+ */
+ /* they're too troublesome */
+ if((modifiers & InputEvent.ALT_MASK) != 0)
+ return null;
+ }
+
+ if(isNumericKeypad(keyCode))
+ last = LAST_NUMKEYPAD;
+ else
+ last = LAST_NOTHING;
+
+ break;
+ }
+ break;
+ //}}}
+ //{{{ KEY_TYPED...
+ case KeyEvent.KEY_TYPED:
+ // need to let \b through so that backspace will work
+ // in HistoryTextFields
+ if(!isMacControl(evt)
+ && (ch < 0x20 || ch == 0x7f || ch == 0xff)
+ && ch != '\b' && ch != '\t' && ch != '\n')
+ {
+ return null;
+ }
+
+ if(Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,"KEWa","Key event (working around): "
+ + AbstractInputHandler.toString(evt)+": last="+last+".");
+ }
+
+ if(!Debug.ALTERNATIVE_DISPATCHER)
+ {
+ if(((modifiers & InputEvent.CTRL_MASK) != 0
+ ^ (modifiers & InputEvent.ALT_MASK) != 0)
+ || (modifiers & InputEvent.META_MASK) != 0)
+ {
+ return null;
+ }
+ }
+
+ // if the last key was a numeric keypad key
+ // and NumLock is off, filter it out
+ if(last == LAST_NUMKEYPAD)
+ {
+ last = LAST_NOTHING;
+ if((ch >= '0' && ch <= '9') || ch == '.'
+ || ch == '/' || ch == '*'
+ || ch == '-' || ch == '+')
+ {
+ return null;
+ }
+ }
+ // Windows JDK workaround
+ else if(last == LAST_ALT)
+ {
+ last = LAST_NOTHING;
+ switch(ch)
+ {
+ case 'B':
+ case 'M':
+ case 'X':
+ case 'c':
+ case '!':
+ case ',':
+ case '?':
+ return null;
+ }
+ }
+ break;
+ //}}}
+ //{{{ KEY_RELEASED...
+ case KeyEvent.KEY_RELEASED:
+ switch(keyCode)
+ {
+ case KeyEvent.VK_ALT:
+ // we consume this to work around the bug
+ // where A+TAB window switching activates
+ // the menu bar on Windows.
+ // http://bugs.sun.com/view_bug.do?bug_id=6458497
+ //
+ // This should be removed if the fix for the
+ // above problem became widely available, to
+ // allow the menu bar activation.
+ evt.consume();
+ break;
+ case KeyEvent.VK_ALT_GRAPH:
+ case KeyEvent.VK_CONTROL:
+ case KeyEvent.VK_SHIFT:
+ case KeyEvent.VK_META:
+ break;
+ case KeyEvent.VK_LEFT:
+ case KeyEvent.VK_RIGHT:
+ case KeyEvent.VK_UP:
+ case KeyEvent.VK_DOWN:
+ case KeyEvent.VK_PAGE_UP:
+ case KeyEvent.VK_PAGE_DOWN:
+ case KeyEvent.VK_END:
+ case KeyEvent.VK_HOME:
+ /* workaround for A+keys producing
+ * garbage on Windows */
+ if(modifiers == InputEvent.ALT_MASK)
+ last = LAST_ALT;
+ break;
+ }
+ break;
+ //}}}
+ }
+ return evt;
+ } //}}}
+
+ //{{{ numericKeypadKey() method
+ /**
+ * A workaround for non-working NumLock status in some Java versions.
+ * @since jEdit 4.0pre8
+ */
+ public static void numericKeypadKey()
+ {
+ last = LAST_NOTHING;
+ } //}}}
+
+ //{{{ Private members
+ private static int last;
+ private static final int LAST_NOTHING = 0;
+ private static final int LAST_NUMKEYPAD = 1;
+ private static final int LAST_ALT = 2;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/LogViewer.java b/jEdit/org/gjt/sp/jedit/gui/LogViewer.java
index f1a49c2..dea8a35 100644
--- a/jEdit/org/gjt/sp/jedit/gui/LogViewer.java
+++ b/jEdit/org/gjt/sp/jedit/gui/LogViewer.java
@@ -1,387 +1,541 @@
-/*
- * LogViewer.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * @version $Id: LogViewer.java 13903 2008-10-18 05:19:28Z k_satoda $
- */
-public class LogViewer extends JPanel implements DefaultFocusComponent,
-EBComponent
-{
- //{{{ LogViewer constructor
- public LogViewer()
- {
- super(new BorderLayout());
-
- JPanel caption = new JPanel();
- caption.setLayout(new BoxLayout(caption,BoxLayout.X_AXIS));
- caption.setBorder(new EmptyBorder(6,6,6,6));
-
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory != null)
- {
- String[] args = { MiscUtilities.constructPath(
- settingsDirectory, "activity.log") };
- JLabel label = new JLabel(jEdit.getProperty(
- "log-viewer.caption",args));
- caption.add(label);
- }
-
- caption.add(Box.createHorizontalGlue());
-
- tailIsOn = jEdit.getBooleanProperty("log-viewer.tail", false);
- tail = new JCheckBox(
- jEdit.getProperty("log-viewer.tail.label"),tailIsOn);
- tail.addActionListener(new ActionHandler());
-
-
- filter = new JTextField();
- filter.getDocument().addDocumentListener(new DocumentListener()
- {
- public void changedUpdate(DocumentEvent e)
- {
- setFilter();
- }
-
- public void insertUpdate(DocumentEvent e)
- {
- setFilter();
- }
-
- public void removeUpdate(DocumentEvent e)
- {
- setFilter();
- }
- });
- caption.add(filter);
- caption.add(tail);
-
- caption.add(Box.createHorizontalStrut(12));
-
- copy = new JButton(jEdit.getProperty("log-viewer.copy"));
- copy.addActionListener(new ActionHandler());
- caption.add(copy);
-
- ListModel model = Log.getLogListModel();
- listModel = new MyFilteredListModel(model);
- // without this, listModel is held permanently in model.
- // See addNotify() and removeNotify(), and constructor of
- // FilteredListModel.
- model.removeListDataListener(listModel);
-
- list = new LogList(listModel);
- listModel.setList(list);
- add(BorderLayout.NORTH,caption);
- JScrollPane scroller = new JScrollPane(list);
- Dimension dim = scroller.getPreferredSize();
- dim.width = Math.min(600,dim.width);
- scroller.setPreferredSize(dim);
- add(BorderLayout.CENTER,scroller);
-
- propertiesChanged();
- } //}}}
-
- //{{{ setBounds() method
- @Override
- public void setBounds(int x, int y, int width, int height)
- {
- list.setCellRenderer( new ColorizerCellRenderer() );
- super.setBounds(x, y, width, height);
- scrollLaterIfRequired();
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof PropertiesChanged)
- propertiesChanged();
- } //}}}
-
- //{{{ addNotify() method
- @Override
- public void addNotify()
- {
- super.addNotify();
- ListModel model = Log.getLogListModel();
- model.addListDataListener(listModel);
- model.addListDataListener(listHandler = new ListHandler());
- if(tailIsOn)
- scrollToTail();
-
- EditBus.addToBus(this);
- } //}}}
-
- //{{{ removeNotify() method
- @Override
- public void removeNotify()
- {
- super.removeNotify();
- ListModel model = Log.getLogListModel();
- model.removeListDataListener(listModel);
- model.removeListDataListener(listHandler);
- listHandler = null;
- EditBus.removeFromBus(this);
- } //}}}
-
- //{{{ focusOnDefaultComponent() method
- public void focusOnDefaultComponent()
- {
- list.requestFocus();
- } //}}}
-
- //{{{ Private members
- private ListHandler listHandler;
- private final FilteredListModel listModel;
- private final JList list;
- private final JButton copy;
- private final JCheckBox tail;
- private final JTextField filter;
- private boolean tailIsOn;
-
- //{{{ setFilter() method
- private void setFilter()
- {
- listModel.setFilter(filter.getText());
- scrollLaterIfRequired();
- } //}}}
-
- //{{{ propertiesChanged() method
- private void propertiesChanged()
- {
- list.setFont(jEdit.getFontProperty("view.font"));
- list.setFixedCellHeight(list.getFontMetrics(list.getFont())
- .getHeight());
- } //}}}
-
- //{{{ scrollToTail() method
- /** Scroll to the tail of the logs. */
- private void scrollToTail()
- {
- int index = list.getModel().getSize();
- if(index != 0)
- list.ensureIndexIsVisible(index - 1);
- } //}}}
-
- //{{{ scrollLaterIfRequired() method
- private void scrollLaterIfRequired()
- {
- if (tailIsOn)
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- scrollToTail();
- }
- });
- } //}}}
-
- //}}}
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent e)
- {
- Object src = e.getSource();
- if(src == tail)
- {
- tailIsOn = !tailIsOn;
- jEdit.setBooleanProperty("log-viewer.tail",tailIsOn);
- if(tailIsOn)
- {
- scrollToTail();
- }
- }
- else if(src == copy)
- {
- StringBuilder buf = new StringBuilder();
- Object[] selected = list.getSelectedValues();
- if(selected != null && selected.length != 0)
- {
- for(int i = 0; i < selected.length; i++)
- {
- buf.append(selected[i]);
- buf.append('\n');
- }
- }
- else
- {
- ListModel model = list.getModel();
- for(int i = 0; i < model.getSize(); i++)
- {
- buf.append(model.getElementAt(i));
- buf.append('\n');
- }
- }
- Registers.setRegister('$',buf.toString());
- }
- }
- } //}}}
-
- //{{{ ListHandler class
- private class ListHandler implements ListDataListener
- {
- public void intervalAdded(ListDataEvent e)
- {
- contentsChanged(e);
- }
-
- public void intervalRemoved(ListDataEvent e)
- {
- contentsChanged(e);
- }
-
- public void contentsChanged(ListDataEvent e)
- {
- scrollLaterIfRequired();
- }
- } //}}}
-
- //{{{ LogList class
- private class LogList extends JList
- {
- LogList(ListModel model)
- {
- super(model);
- setVisibleRowCount(24);
- getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
- setAutoscrolls(true);
- }
-
- @Override
- public void processMouseEvent(MouseEvent evt)
- {
- if(evt.getID() == MouseEvent.MOUSE_PRESSED)
- {
- startIndex = list.locationToIndex(
- evt.getPoint());
- }
- super.processMouseEvent(evt);
- }
-
- @Override
- public void processMouseMotionEvent(MouseEvent evt)
- {
- if(evt.getID() == MouseEvent.MOUSE_DRAGGED)
- {
- int row = list.locationToIndex(evt.getPoint());
- if(row != -1)
- {
- if(startIndex == -1)
- {
- list.setSelectionInterval(row,row);
- startIndex = row;
- }
- else
- list.setSelectionInterval(startIndex,row);
- list.ensureIndexIsVisible(row);
- evt.consume();
- }
- }
- else
- super.processMouseMotionEvent(evt);
- }
-
- private int startIndex;
- } //}}}
-
- private static class ColorizerCellRenderer extends JLabel implements ListCellRenderer
- {
-
- // This is the only method defined by ListCellRenderer.
- // We just reconfigure the JLabel each time we're called.
- public Component getListCellRendererComponent(
- JList list,
- Object value, // value to display
- int index, // cell index
- boolean isSelected, // is the cell selected
- boolean cellHasFocus ) // the list and the cell have the focus
- {
- String s = value.toString();
- setText(s);
- if (isSelected)
- {
- setBackground(list.getSelectionBackground());
- setForeground(list.getSelectionForeground());
- }
- else
- {
- setBackground(list.getBackground());
- Color color = list.getForeground();
- if (s.contains("[debug]"))
- {
- color = Color.BLUE;
- }
- else if (s.contains("[notice]"))
- {
- color = Color.GREEN;
- }
- else if (s.contains("[warning]"))
- {
- color = Color.ORANGE;
- }
- else if (s.contains("[error]"))
- {
- color = Color.RED;
- }
- setForeground( color );
- }
- setEnabled( list.isEnabled() );
- setFont( list.getFont() );
- setOpaque( true );
- return this;
- }
- }
-
- private static class MyFilteredListModel extends FilteredListModel
- {
- MyFilteredListModel(ListModel model)
- {
- super(model);
- }
-
- @Override
- public String prepareFilter(String filter)
- {
- return filter.toLowerCase();
- }
-
- @Override
- public boolean passFilter(int row, String filter)
- {
- return delegated.getElementAt(row).toString().toLowerCase().contains(filter);
- }
- }
-}
-
+/*
+ * LogViewer.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * @version $Id: LogViewer.java 18221 2010-07-19 16:19:45Z daleanson $
+ */
+public class LogViewer extends JPanel implements DefaultFocusComponent
+{
+ //{{{ LogViewer constructor
+ public LogViewer()
+ {
+ super(new BorderLayout());
+ setBorder(BorderFactory.createEmptyBorder(0, 3, 0, 0));
+ JPanel caption = new JPanel();
+ caption.setLayout(new BoxLayout(caption,BoxLayout.X_AXIS));
+ caption.setBorder(new EmptyBorder(6, 0, 6, 0));
+
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory != null)
+ {
+ String[] args = { MiscUtilities.constructPath(
+ settingsDirectory, "activity.log") };
+ JLabel label = new JLabel(jEdit.getProperty(
+ "log-viewer.caption",args));
+ caption.add(label);
+ }
+
+ caption.add(Box.createHorizontalGlue());
+
+ tailIsOn = jEdit.getBooleanProperty("log-viewer.tail", false);
+ tail = new JCheckBox(
+ jEdit.getProperty("log-viewer.tail.label"),tailIsOn);
+ tail.addActionListener(new ActionHandler());
+
+
+ filter = new JTextField();
+ filter.getDocument().addDocumentListener(new DocumentListener()
+ {
+ public void changedUpdate(DocumentEvent e)
+ {
+ setFilter();
+ }
+
+ public void insertUpdate(DocumentEvent e)
+ {
+ setFilter();
+ }
+
+ public void removeUpdate(DocumentEvent e)
+ {
+ setFilter();
+ }
+ });
+ caption.add(filter);
+ caption.add(tail);
+
+ caption.add(Box.createHorizontalStrut(12));
+
+ copy = new JButton(jEdit.getProperty("log-viewer.copy"));
+ copy.addActionListener(new ActionHandler());
+ caption.add(copy);
+
+ caption.add(Box.createHorizontalStrut(6));
+
+ JButton settings = new JButton(jEdit.getProperty("log-viewer.settings.label"));
+ settings.addActionListener(
+ new ActionListener(){
+ public void actionPerformed(ActionEvent ae) {
+ new LogSettings();
+ }
+ });
+ caption.add(settings);
+
+ ListModel model = Log.getLogListModel();
+ listModel = new MyFilteredListModel(model);
+ // without this, listModel is held permanently in model.
+ // See addNotify() and removeNotify(), and constructor of
+ // FilteredListModel.
+ model.removeListDataListener(listModel);
+ setFilter();
+
+ list = new LogList(listModel);
+ listModel.setList(list);
+ add(BorderLayout.NORTH,caption);
+ JScrollPane scroller = new JScrollPane(list);
+ Dimension dim = scroller.getPreferredSize();
+ dim.width = Math.min(600,dim.width);
+ scroller.setPreferredSize(dim);
+ add(BorderLayout.CENTER,scroller);
+
+ propertiesChanged();
+ } //}}}
+
+ //{{{ setBounds() method
+ @Override
+ public void setBounds(int x, int y, int width, int height)
+ {
+ list.setCellRenderer( new ColorizerCellRenderer() );
+ super.setBounds(x, y, width, height);
+ scrollLaterIfRequired();
+ } //}}}
+
+ //{{{ handlePropertiesChanged() method
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
+ {
+ propertiesChanged();
+ } //}}}
+
+ //{{{ addNotify() method
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ ListModel model = Log.getLogListModel();
+ model.addListDataListener(listModel);
+ model.addListDataListener(listHandler = new ListHandler());
+ if(tailIsOn)
+ scrollToTail();
+
+ EditBus.addToBus(this);
+ } //}}}
+
+ //{{{ removeNotify() method
+ @Override
+ public void removeNotify()
+ {
+ super.removeNotify();
+ ListModel model = Log.getLogListModel();
+ model.removeListDataListener(listModel);
+ model.removeListDataListener(listHandler);
+ listHandler = null;
+ EditBus.removeFromBus(this);
+ } //}}}
+
+ //{{{ focusOnDefaultComponent() method
+ public void focusOnDefaultComponent()
+ {
+ list.requestFocus();
+ } //}}}
+
+ //{{{ Private members
+ private ListHandler listHandler;
+ private final FilteredListModel listModel;
+ private final JList list;
+ private final JButton copy;
+ private final JCheckBox tail;
+ private final JTextField filter;
+ private boolean tailIsOn;
+ private static boolean showDebug = jEdit.getBooleanProperty("log-viewer.message.debug", true);
+ private static boolean showMessage = jEdit.getBooleanProperty("log-viewer.message.message", true);
+ private static boolean showNotice = jEdit.getBooleanProperty("log-viewer.message.notice", true);
+ private static boolean showWarning = jEdit.getBooleanProperty("log-viewer.message.warning", true);
+ private static boolean showError = jEdit.getBooleanProperty("log-viewer.message.error", true);
+
+ //{{{ setFilter() method
+ private void setFilter()
+ {
+ String toFilter = filter.getText();
+ listModel.setFilter(toFilter.length() == 0 ? " " : toFilter);
+ scrollLaterIfRequired();
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ private void propertiesChanged()
+ {
+ list.setFont(jEdit.getFontProperty("view.font"));
+ list.setFixedCellHeight(list.getFontMetrics(list.getFont())
+ .getHeight());
+ } //}}}
+
+ //{{{ scrollToTail() method
+ /** Scroll to the tail of the logs. */
+ private void scrollToTail()
+ {
+ int index = list.getModel().getSize();
+ if(index != 0)
+ list.ensureIndexIsVisible(index - 1);
+ } //}}}
+
+ //{{{ scrollLaterIfRequired() method
+ private void scrollLaterIfRequired()
+ {
+ if (tailIsOn)
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ scrollToTail();
+ }
+ });
+ } //}}}
+
+ //}}}
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ Object src = e.getSource();
+ if(src == tail)
+ {
+ tailIsOn = !tailIsOn;
+ jEdit.setBooleanProperty("log-viewer.tail",tailIsOn);
+ if(tailIsOn)
+ {
+ scrollToTail();
+ }
+ }
+ else if(src == copy)
+ {
+ StringBuilder buf = new StringBuilder();
+ Object[] selected = list.getSelectedValues();
+ if(selected != null && selected.length != 0)
+ {
+ for(int i = 0; i < selected.length; i++)
+ {
+ buf.append(selected[i]);
+ buf.append('\n');
+ }
+ }
+ else
+ {
+ ListModel model = list.getModel();
+ for(int i = 0; i < model.getSize(); i++)
+ {
+ buf.append(model.getElementAt(i));
+ buf.append('\n');
+ }
+ }
+ Registers.setRegister('$',buf.toString());
+ }
+ }
+ } //}}}
+
+ //{{{ ListHandler class
+ private class ListHandler implements ListDataListener
+ {
+ public void intervalAdded(ListDataEvent e)
+ {
+ contentsChanged(e);
+ }
+
+ public void intervalRemoved(ListDataEvent e)
+ {
+ contentsChanged(e);
+ }
+
+ public void contentsChanged(ListDataEvent e)
+ {
+ scrollLaterIfRequired();
+ }
+ } //}}}
+
+ //{{{ LogList class
+ private class LogList extends JList
+ {
+ LogList(ListModel model)
+ {
+ super(model);
+ setVisibleRowCount(24);
+ getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
+ setAutoscrolls(true);
+ }
+
+ @Override
+ public void processMouseEvent(MouseEvent evt)
+ {
+ if(evt.getID() == MouseEvent.MOUSE_PRESSED)
+ {
+ startIndex = list.locationToIndex(
+ evt.getPoint());
+ }
+ super.processMouseEvent(evt);
+ }
+
+ @Override
+ public void processMouseMotionEvent(MouseEvent evt)
+ {
+ if(evt.getID() == MouseEvent.MOUSE_DRAGGED)
+ {
+ int row = list.locationToIndex(evt.getPoint());
+ if(row != -1)
+ {
+ if(startIndex == -1)
+ {
+ list.setSelectionInterval(row,row);
+ startIndex = row;
+ }
+ else
+ list.setSelectionInterval(startIndex,row);
+ list.ensureIndexIsVisible(row);
+ evt.consume();
+ }
+ }
+ else
+ super.processMouseMotionEvent(evt);
+ }
+
+ private int startIndex;
+ } //}}}
+
+ //{{{ ColorizerCellRenderer class
+ private static class ColorizerCellRenderer extends JLabel implements ListCellRenderer
+ {
+
+ // This is the only method defined by ListCellRenderer.
+ // We just reconfigure the JLabel each time we're called.
+ public Component getListCellRendererComponent(
+ JList list,
+ Object value, // value to display
+ int index, // cell index
+ boolean isSelected, // is the cell selected
+ boolean cellHasFocus ) // the list and the cell have the focus
+ {
+ String s = value.toString();
+ setText(s);
+ if (isSelected)
+ {
+ setBackground(list.getSelectionBackground());
+ setForeground(list.getSelectionForeground());
+ }
+ else
+ {
+ setBackground(list.getBackground());
+ Color color = list.getForeground();
+ if (s.contains("[debug]"))
+ {
+ color = jEdit.getColorProperty("log-viewer.message.debug.color", Color.BLUE);
+ }
+ else if (s.contains("[message]"))
+ {
+ color = jEdit.getColorProperty("log-viewer.message.message.color", Color.BLACK);
+ }
+ else if (s.contains("[notice]"))
+ {
+ color = jEdit.getColorProperty("log-viewer.message.notice.color", Color.GREEN);
+ }
+ else if (s.contains("[warning]"))
+ {
+ color = jEdit.getColorProperty("log-viewer.message.warning.color", Color.ORANGE);
+ }
+ else if (s.contains("[error]"))
+ {
+ color = jEdit.getColorProperty("log-viewer.message.error.color", Color.RED);
+ }
+ setForeground( color );
+ }
+ setEnabled( list.isEnabled() );
+ setFont( list.getFont() );
+ setOpaque( true );
+ return this;
+ }
+ } //}}}
+
+ //{{{ MyFilteredListModel
+ private static class MyFilteredListModel extends FilteredListModel
+ {
+ MyFilteredListModel(ListModel model)
+ {
+ super(model);
+ }
+
+ @Override
+ public String prepareFilter(String filter)
+ {
+ return filter.toLowerCase();
+ }
+
+ @Override
+ public boolean passFilter(int row, String filter)
+ {
+ String text = delegated.getElementAt(row).toString().toLowerCase();
+ if (text.contains("[debug]") && !showDebug)
+ return false;
+ if (text.contains("[message]") && !showMessage)
+ return false;
+ if (text.contains("[notice]") && !showNotice)
+ return false;
+ if (text.contains("[warning]") && !showWarning)
+ return false;
+ if (text.contains("[error]") && !showError)
+ return false;
+ return filter.length() == 0 || text.contains(filter);
+ }
+ } //}}}
+
+ //{{{ LogSettings dialog
+ private class LogSettings extends JDialog
+ {
+ LogSettings()
+ {
+ super(jEdit.getActiveView(), jEdit.getProperty("log-viewer.dialog.title"));
+ AbstractOptionPane pane = new AbstractOptionPane(jEdit.getProperty("log-viewer.settings.label"))
+ {
+ protected void _init()
+ {
+ setBorder(BorderFactory.createEmptyBorder(11, 11, 12, 12));
+ maxLines = new JSpinner(new SpinnerNumberModel(jEdit.getIntegerProperty("log-viewer.maxlines", 500), 500, Integer.MAX_VALUE, 1));
+ addComponent(jEdit.getProperty("log-viewer.maxlines.label", "Max lines"),
+ maxLines,
+ GridBagConstraints.REMAINDER);
+ addComponent(Box.createVerticalStrut(11));
+ debug = new JCheckBox(jEdit.getProperty("log-viewer.message.debug.label", "Debug"),
+ jEdit.getBooleanProperty("log-viewer.message.debug", true));
+ message = new JCheckBox(jEdit.getProperty("log-viewer.message.message.label", "Message"),
+ jEdit.getBooleanProperty("log-viewer.message.message", true));
+ notice = new JCheckBox(jEdit.getProperty("log-viewer.message.notice.label", "Notice"),
+ jEdit.getBooleanProperty("log-viewer.message.notice", true));
+ warning = new JCheckBox(jEdit.getProperty("log-viewer.message.warning.label", "Warning"),
+ jEdit.getBooleanProperty("log-viewer.message.warning", true));
+ error = new JCheckBox(jEdit.getProperty("log-viewer.message.error.label", "Error"),
+ jEdit.getBooleanProperty("log-viewer.message.error", true));
+
+ addComponent(new JLabel(jEdit.getProperty("log-viewer.message.label", "Message Display:")));
+ addComponent(debug,
+ debugColor = new ColorWellButton(
+ jEdit.getColorProperty("log-viewer.message.debug.color", Color.BLUE)),
+ GridBagConstraints.REMAINDER);
+ addComponent(message,
+ messageColor = new ColorWellButton(
+ jEdit.getColorProperty("log-viewer.message.message.color", Color.GREEN)),
+ GridBagConstraints.REMAINDER);
+ addComponent(notice,
+ noticeColor = new ColorWellButton(
+ jEdit.getColorProperty("log-viewer.message.notice.color", Color.GREEN)),
+ GridBagConstraints.REMAINDER);
+ addComponent(warning,
+ warningColor = new ColorWellButton(
+ jEdit.getColorProperty("log-viewer.message.warning.color", Color.ORANGE)),
+ GridBagConstraints.REMAINDER);
+ addComponent(error,
+ errorColor = new ColorWellButton(
+ jEdit.getColorProperty("log-viewer.message.error.color", Color.RED)),
+ GridBagConstraints.REMAINDER);
+
+ addComponent(Box.createVerticalStrut(11));
+
+ JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
+ JButton okButton = new JButton(jEdit.getProperty("common.ok"));
+ okButton.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent ae) {
+ save();
+ LogSettings.this.setVisible(false);
+ LogSettings.this.dispose();
+ }
+ });
+ JButton cancelButton = new JButton(jEdit.getProperty("common.cancel"));
+ cancelButton.addActionListener(
+ new ActionListener() {
+ public void actionPerformed(ActionEvent ae) {
+ LogSettings.this.setVisible(false);
+ LogSettings.this.dispose();
+ }
+ });
+ buttonPanel.add(okButton);
+ buttonPanel.add(cancelButton);
+ addComponent(buttonPanel, GridBagConstraints.HORIZONTAL);
+ }
+
+ protected void _save()
+ {
+ jEdit.setIntegerProperty("log-viewer.maxlines", ((SpinnerNumberModel)maxLines.getModel()).getNumber().intValue());
+
+ showDebug = debug.isSelected();
+ jEdit.setBooleanProperty("log-viewer.message.debug", showDebug);
+ showMessage = message.isSelected();
+ jEdit.setBooleanProperty("log-viewer.message.message", showMessage);
+ showNotice = notice.isSelected();
+ jEdit.setBooleanProperty("log-viewer.message.notice", showNotice);
+ showWarning = warning.isSelected();
+ jEdit.setBooleanProperty("log-viewer.message.warning", showWarning);
+ showError = error.isSelected();
+ jEdit.setBooleanProperty("log-viewer.message.error", showError);
+
+ jEdit.setColorProperty("log-viewer.message.debug.color", debugColor.getSelectedColor());
+ jEdit.setColorProperty("log-viewer.message.message.color", messageColor.getSelectedColor());
+ jEdit.setColorProperty("log-viewer.message.notice.color", noticeColor.getSelectedColor());
+ jEdit.setColorProperty("log-viewer.message.warning.color", warningColor.getSelectedColor());
+ jEdit.setColorProperty("log-viewer.message.error.color", errorColor.getSelectedColor());
+
+ setFilter();
+ }
+ };
+ setContentPane(pane);
+ pane.init();
+ pack();
+ setLocationRelativeTo(LogViewer.this);
+ setVisible(true);
+ }
+
+ private JSpinner maxLines;
+ private JCheckBox debug;
+ private JCheckBox message;
+ private JCheckBox notice;
+ private JCheckBox warning;
+ private JCheckBox error;
+ private ColorWellButton debugColor;
+ private ColorWellButton messageColor;
+ private ColorWellButton noticeColor;
+ private ColorWellButton warningColor;
+ private ColorWellButton errorColor;
+
+ } //}}}
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/gui/MarkerViewer.java b/jEdit/org/gjt/sp/jedit/gui/MarkerViewer.java
index 3cd0b98..5752b44 100644
--- a/jEdit/org/gjt/sp/jedit/gui/MarkerViewer.java
+++ b/jEdit/org/gjt/sp/jedit/gui/MarkerViewer.java
@@ -1,282 +1,286 @@
-/*
- * MarkerViewer.java - Dockable view of markers in the current buffer
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Nicholas O'Leary
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.RolloverButton;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-import org.gjt.sp.jedit.msg.BufferUpdate;
-import org.gjt.sp.jedit.msg.EditPaneUpdate;
-import org.gjt.sp.jedit.msg.ViewUpdate;
-import org.gjt.sp.util.Log;
-//}}}
-
-public class MarkerViewer extends JPanel implements EBComponent, ActionListener
-{
- //{{{ MarkerViewer constructor
- public MarkerViewer(View view)
- {
- super(new BorderLayout());
- this.view = view;
- Box toolBar = new Box(BoxLayout.X_AXIS);
-
- toolBar.add(new JLabel(GUIUtilities.prettifyMenuLabel(
- jEdit.getProperty("markers.label"))));
-
- toolBar.add(Box.createGlue());
-
- RolloverButton addMarker = new RolloverButton(
- GUIUtilities.loadIcon("Plus.png"));
- addMarker.setToolTipText(GUIUtilities.prettifyMenuLabel(
- jEdit.getProperty("add-marker.label")));
- addMarker.addActionListener(this);
- addMarker.setActionCommand("add-marker");
- toolBar.add(addMarker);
-
- previous = new RolloverButton(GUIUtilities.loadIcon("ArrowL.png"));
- previous.setToolTipText(GUIUtilities.prettifyMenuLabel(
- jEdit.getProperty("prev-marker.label")));
- previous.addActionListener(this);
- previous.setActionCommand("prev-marker");
- toolBar.add(previous);
-
- next = new RolloverButton(GUIUtilities.loadIcon("ArrowR.png"));
- next.setToolTipText(GUIUtilities.prettifyMenuLabel(
- jEdit.getProperty("next-marker.label")));
- next.addActionListener(this);
- next.setActionCommand("next-marker");
- toolBar.add(next);
-
- clear = new RolloverButton(GUIUtilities.loadIcon("Clear.png"));
- clear.setToolTipText(GUIUtilities.prettifyMenuLabel(
- jEdit.getProperty("remove-all-markers.label")));
- clear.addActionListener(this);
- clear.setActionCommand("clear");
- toolBar.add(clear);
-
-
- add(BorderLayout.NORTH, toolBar);
-
- markerList = new JList();
- markerList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- markerList.setCellRenderer(new Renderer());
- markerList.addMouseListener(new MouseHandler());
-
- add(BorderLayout.CENTER,new JScrollPane(markerList));
-
- refreshList();
- } //}}}
-
- //{{{ requestDefaultFocus() method
- public boolean requestDefaultFocus()
- {
- markerList.requestFocus();
- return true;
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- String cmd = evt.getActionCommand();
- if (cmd.equals("clear"))
- view.getBuffer().removeAllMarkers();
- else if (cmd.equals("add-marker"))
- view.getEditPane().addMarker();
- else if (cmd.equals("next-marker"))
- {
- view.getEditPane().goToNextMarker(false);
- updateSelection();
- }
- else if (cmd.equals("prev-marker"))
- {
- view.getEditPane().goToPrevMarker(false);
- updateSelection();
- }
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if (msg instanceof EditPaneUpdate)
- {
- EditPaneUpdate epu = (EditPaneUpdate)msg;
- if (epu.getEditPane().getView().equals(view) &&
- epu.getWhat().equals(EditPaneUpdate.BUFFER_CHANGED))
- refreshList();
- }
- if (msg instanceof ViewUpdate)
- {
- ViewUpdate vu = (ViewUpdate)msg;
- if (vu.getView().equals(view) &&
- vu.getWhat().equals(ViewUpdate.EDIT_PANE_CHANGED))
- refreshList();
- }
- if (msg instanceof BufferUpdate)
- {
- BufferUpdate bu = (BufferUpdate)msg;
- if (view.getBuffer().equals(bu.getBuffer())
- &&
- (bu.getWhat().equals(BufferUpdate.MARKERS_CHANGED) || bu.getWhat().equals(BufferUpdate.LOADED)))
- refreshList();
- }
- }//}}}
-
- //{{{ addNotify() method
- public void addNotify()
- {
- super.addNotify();
- EditBus.addToBus(this);
- } //}}}
-
- //{{{ removeNotify() method
- public void removeNotify()
- {
- super.removeNotify();
- EditBus.removeFromBus(this);
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private JList markerList;
- private View view;
- private RolloverButton previous;
- private RolloverButton next;
- private RolloverButton clear;
- //}}}
-
- //{{{ refreshList() method
- private void refreshList()
- {
- java.util.Vector markers = view.getBuffer().getMarkers();
- if (markers.size() > 0)
- {
- markerList.setListData(markers);
- markerList.setEnabled(true);
- next.setEnabled(true);
- previous.setEnabled(true);
- clear.setEnabled(true);
- }
- else
- {
- markerList.setListData(new Object[] {
- jEdit.getProperty("no-markers.label") });
- markerList.setEnabled(false);
- next.setEnabled(false);
- previous.setEnabled(false);
- clear.setEnabled(false);
- }
-
- } //}}}
-
- //{{{ goToSelectedMarker() method
- private void goToSelectedMarker()
- {
- Object value = markerList.getSelectedValue();
- if(!(value instanceof Marker))
- return;
-
- Marker mark = (Marker)value;
- view.getTextArea().setCaretPosition(mark.getPosition());
- view.toFront();
- view.requestFocus();
- view.getTextArea().requestFocus();
- } //}}}
-
- //{{{ updateSelection() method
- private void updateSelection()
- {
- ListModel model = markerList.getModel();
- int currentLine = view.getTextArea().getCaretLine();
- Buffer buffer = view.getBuffer();
- for (int i = 0; i < model.getSize(); i++)
- {
- Object o = model.getElementAt(i);
- if (o instanceof Marker)
- {
- Marker mark = (Marker)model.getElementAt(i);
- if (buffer.getLineOfOffset(mark.getPosition()) == currentLine)
- {
- markerList.setSelectedIndex(i);
- break;
- }
- }
- }
-
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ Renderer Class
- class Renderer extends DefaultListCellRenderer
- {
- public Component getListCellRendererComponent(
- JList list, Object value, int index,
- boolean isSelected, boolean cellHasFocus)
- {
- super.getListCellRendererComponent(list,value,
- index,isSelected,cellHasFocus);
-
- if(value instanceof Marker)
- {
- Marker mark = (Marker)value;
- JEditTextArea textArea = view.getTextArea();
- int pos = textArea.getLineOfOffset(mark.getPosition());
- String txt = view.getTextArea().getLineText(pos);
- if (txt.equals(""))
- txt = jEdit.getProperty("markers.blank-line");
- char shortcut_char = mark.getShortcut();
- String shortcut = "";
- if (shortcut_char > 0)
- shortcut = "["+shortcut_char+"]";
- setText((pos+1)+" "+shortcut+": "+txt);
- }
- return this;
- }
- } //}}}
-
- //{{{ MouseHandler Class
- class MouseHandler extends MouseAdapter
- {
- public void mousePressed(MouseEvent evt)
- {
- if(evt.isConsumed())
- return;
-
- int index = markerList.locationToIndex(evt.getPoint());
- markerList.setSelectedIndex(index);
-
- goToSelectedMarker();
- }
- } //}}}
-
- //}}}
-}
+/*
+ * MarkerViewer.java - Dockable view of markers in the current buffer
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Nicholas O'Leary
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.gui.RolloverButton;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+import org.gjt.sp.jedit.msg.BufferUpdate;
+import org.gjt.sp.jedit.msg.EditPaneUpdate;
+import org.gjt.sp.jedit.msg.ViewUpdate;
+//}}}
+
+public class MarkerViewer extends JPanel implements ActionListener
+{
+ //{{{ MarkerViewer constructor
+ public MarkerViewer(View view)
+ {
+ super(new BorderLayout());
+ this.view = view;
+ Box toolBar = new Box(BoxLayout.X_AXIS);
+
+ toolBar.add(new JLabel(GUIUtilities.prettifyMenuLabel(
+ jEdit.getProperty("markers.label"))));
+
+ toolBar.add(Box.createGlue());
+
+ RolloverButton addMarker = new RolloverButton(
+ GUIUtilities.loadIcon("Plus.png"));
+ addMarker.setToolTipText(GUIUtilities.prettifyMenuLabel(
+ jEdit.getProperty("add-marker.label")));
+ addMarker.addActionListener(this);
+ addMarker.setActionCommand("add-marker");
+ toolBar.add(addMarker);
+
+ previous = new RolloverButton(GUIUtilities.loadIcon("ArrowL.png"));
+ previous.setToolTipText(GUIUtilities.prettifyMenuLabel(
+ jEdit.getProperty("prev-marker.label")));
+ previous.addActionListener(this);
+ previous.setActionCommand("prev-marker");
+ toolBar.add(previous);
+
+ next = new RolloverButton(GUIUtilities.loadIcon("ArrowR.png"));
+ next.setToolTipText(GUIUtilities.prettifyMenuLabel(
+ jEdit.getProperty("next-marker.label")));
+ next.addActionListener(this);
+ next.setActionCommand("next-marker");
+ toolBar.add(next);
+
+ clear = new RolloverButton(GUIUtilities.loadIcon("Clear.png"));
+ clear.setToolTipText(GUIUtilities.prettifyMenuLabel(
+ jEdit.getProperty("remove-all-markers.label")));
+ clear.addActionListener(this);
+ clear.setActionCommand("clear");
+ toolBar.add(clear);
+
+
+ add(BorderLayout.NORTH, toolBar);
+
+ markerList = new JList();
+ markerList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ markerList.setCellRenderer(new Renderer());
+ markerList.addMouseListener(new MouseHandler());
+
+ add(BorderLayout.CENTER,new JScrollPane(markerList));
+
+ refreshList();
+ } //}}}
+
+ //{{{ requestDefaultFocus() method
+ public boolean requestDefaultFocus()
+ {
+ markerList.requestFocus();
+ return true;
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ String cmd = evt.getActionCommand();
+ if (cmd.equals("clear"))
+ view.getBuffer().removeAllMarkers();
+ else if (cmd.equals("add-marker"))
+ view.getEditPane().addMarker();
+ else if (cmd.equals("next-marker"))
+ {
+ view.getEditPane().goToNextMarker(false);
+ updateSelection();
+ }
+ else if (cmd.equals("prev-marker"))
+ {
+ view.getEditPane().goToPrevMarker(false);
+ updateSelection();
+ }
+ } //}}}
+
+ //{{{ handleEditPaneUpdate() method
+ @EBHandler
+ public void handleEditPaneUpdate(EditPaneUpdate epu)
+ {
+ if (epu.getEditPane().getView().equals(view) &&
+ epu.getWhat().equals(EditPaneUpdate.BUFFER_CHANGED))
+ {
+ refreshList();
+ }
+ } //}}}
+
+ //{{{ handleViewUpdate() method
+ @EBHandler
+ public void handleViewUpdate(ViewUpdate vu)
+ {
+ if (vu.getView().equals(view) &&
+ vu.getWhat().equals(ViewUpdate.EDIT_PANE_CHANGED))
+ {
+ refreshList();
+ }
+ } //}}}
+
+ //{{{ handleBufferUpdate() method
+ @EBHandler
+ public void handleBufferUpdate(BufferUpdate bu)
+ {
+ if (view.getBuffer().equals(bu.getBuffer()) &&
+ (bu.getWhat().equals(BufferUpdate.MARKERS_CHANGED) || bu.getWhat().equals(BufferUpdate.LOADED)))
+ {
+ refreshList();
+ }
+ }//}}}
+
+ //{{{ addNotify() method
+ public void addNotify()
+ {
+ super.addNotify();
+ EditBus.addToBus(this);
+ } //}}}
+
+ //{{{ removeNotify() method
+ public void removeNotify()
+ {
+ super.removeNotify();
+ EditBus.removeFromBus(this);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private JList markerList;
+ private View view;
+ private RolloverButton previous;
+ private RolloverButton next;
+ private RolloverButton clear;
+ //}}}
+
+ //{{{ refreshList() method
+ private void refreshList()
+ {
+ java.util.Vector markers = view.getBuffer().getMarkers();
+ if (markers.size() > 0)
+ {
+ markerList.setListData(markers);
+ markerList.setEnabled(true);
+ next.setEnabled(true);
+ previous.setEnabled(true);
+ clear.setEnabled(true);
+ }
+ else
+ {
+ markerList.setListData(new Object[] {
+ jEdit.getProperty("no-markers.label") });
+ markerList.setEnabled(false);
+ next.setEnabled(false);
+ previous.setEnabled(false);
+ clear.setEnabled(false);
+ }
+
+ } //}}}
+
+ //{{{ goToSelectedMarker() method
+ private void goToSelectedMarker()
+ {
+ Object value = markerList.getSelectedValue();
+ if(!(value instanceof Marker))
+ return;
+
+ Marker mark = (Marker)value;
+ view.getTextArea().setCaretPosition(mark.getPosition());
+ view.toFront();
+ view.requestFocus();
+ view.getTextArea().requestFocus();
+ } //}}}
+
+ //{{{ updateSelection() method
+ private void updateSelection()
+ {
+ ListModel model = markerList.getModel();
+ int currentLine = view.getTextArea().getCaretLine();
+ Buffer buffer = view.getBuffer();
+ for (int i = 0; i < model.getSize(); i++)
+ {
+ Object o = model.getElementAt(i);
+ if (o instanceof Marker)
+ {
+ Marker mark = (Marker)model.getElementAt(i);
+ if (buffer.getLineOfOffset(mark.getPosition()) == currentLine)
+ {
+ markerList.setSelectedIndex(i);
+ break;
+ }
+ }
+ }
+
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ Renderer Class
+ class Renderer extends DefaultListCellRenderer
+ {
+ public Component getListCellRendererComponent(
+ JList list, Object value, int index,
+ boolean isSelected, boolean cellHasFocus)
+ {
+ super.getListCellRendererComponent(list,value,
+ index,isSelected,cellHasFocus);
+
+ if(value instanceof Marker)
+ {
+ Marker mark = (Marker)value;
+ JEditTextArea textArea = view.getTextArea();
+ int pos = textArea.getLineOfOffset(mark.getPosition());
+ String txt = view.getTextArea().getLineText(pos);
+ if (txt.equals(""))
+ txt = jEdit.getProperty("markers.blank-line");
+ char shortcut_char = mark.getShortcut();
+ String shortcut = "";
+ if (shortcut_char > 0)
+ shortcut = "["+shortcut_char+"]";
+ setText((pos+1)+" "+shortcut+": "+txt);
+ }
+ return this;
+ }
+ } //}}}
+
+ //{{{ MouseHandler Class
+ class MouseHandler extends MouseAdapter
+ {
+ public void mousePressed(MouseEvent evt)
+ {
+ if(evt.isConsumed())
+ return;
+
+ int index = markerList.locationToIndex(evt.getPoint());
+ markerList.setSelectedIndex(index);
+
+ goToSelectedMarker();
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/MutableListModel.java b/jEdit/org/gjt/sp/jedit/gui/MutableListModel.java
index 6aa9d2e..2e6d710 100644
--- a/jEdit/org/gjt/sp/jedit/gui/MutableListModel.java
+++ b/jEdit/org/gjt/sp/jedit/gui/MutableListModel.java
@@ -1,29 +1,29 @@
-/*
- * MutableListModel.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-public interface MutableListModel extends javax.swing.ListModel
-{
- public boolean removeElement(Object elem);
- public void insertElementAt(Object elem, int index);
-}
+/*
+ * MutableListModel.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+public interface MutableListModel extends javax.swing.ListModel
+{
+ public boolean removeElement(Object elem);
+ public void insertElementAt(Object elem, int index);
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/OptionsDialog.java b/jEdit/org/gjt/sp/jedit/gui/OptionsDialog.java
index 320489f..cc81972 100644
--- a/jEdit/org/gjt/sp/jedit/gui/OptionsDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/OptionsDialog.java
@@ -1,719 +1,719 @@
-/*
- * OptionsDialog.java - Tree options dialog
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2003 Slava Pestov
- * Portions copyright (C) 1999 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.tree.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import java.util.List;
-
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * An abstract options dialog box.
- * @author Slava Pestov
- * @version $Id: OptionsDialog.java 14832 2009-03-22 23:34:45Z vanza $
- */
-public abstract class OptionsDialog extends EnhancedDialog
- implements ActionListener, TreeSelectionListener
-{
- //{{{ Instance variables
- private String name;
- private JSplitPane splitter;
- protected JTree paneTree;
- private JScrollPane stage;
- private JButton ok;
- private JButton cancel;
- private JButton apply;
- protected OptionPane currentPane;
- private Map<Object, OptionPane> deferredOptionPanes;
- //}}}
-
- //{{{ OptionsDialog constructor
- /**
- * @param frame - the parent frame for dialogs created
- * @param name the name of an option pane - it must have a .title and .code
- * property defined in order to instantiate.
- * @param pane the initial pane to show when this is created.
- */
- protected OptionsDialog(Frame frame, String name, String pane)
- {
- super(frame, jEdit.getProperty(name + ".title"), true);
- init(name,pane);
- } //}}}
-
- //{{{ OptionsDialog constructor
- protected OptionsDialog(Dialog dialog, String name, String pane)
- {
- super(dialog, jEdit.getProperty(name + ".title"), true);
- init(name,pane);
- } //}}}
-
- //{{{ addOptionGroup() method
- public void addOptionGroup(OptionGroup group)
- {
- getDefaultGroup().addOptionGroup(group);
- } //}}}
-
- //{{{ addOptionPane() method
- public void addOptionPane(OptionPane pane)
- {
- getDefaultGroup().addOptionPane(pane);
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- if(currentPane != null)
- jEdit.setProperty(name + ".last",currentPane.getName());
- ok(true);
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- if(currentPane != null)
- jEdit.setProperty(name + ".last",currentPane.getName());
- dispose();
- } //}}}
-
- //{{{ ok() method
- public void ok(boolean dispose)
- {
- OptionTreeModel m = (OptionTreeModel) paneTree
- .getModel();
- save(m.getRoot());
-
- /* This will fire the PROPERTIES_CHANGED event */
- jEdit.propertiesChanged();
-
- // Save settings to disk
- jEdit.saveSettings();
-
- // get rid of this dialog if necessary
- if(dispose)
- dispose();
- } //}}}
-
- //{{{ dispose() method
- public void dispose()
- {
- GUIUtilities.saveGeometry(this,name);
- jEdit.setIntegerProperty(name + ".splitter",splitter.getDividerLocation());
- super.dispose();
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
-
- if(source == ok)
- {
- ok();
- }
- else if(source == cancel)
- {
- cancel();
- }
- else if(source == apply)
- {
- ok(false);
- }
- } //}}}
-
- //{{{ valueChanged() method
- public void valueChanged(TreeSelectionEvent evt)
- {
- TreePath path = evt.getPath();
-
- if(path == null)
- return;
-
- Object lastPathComponent = path.getLastPathComponent();
- if(!(lastPathComponent instanceof String
- || lastPathComponent instanceof OptionPane))
- {
- return;
- }
-
- Object[] nodes = path.getPath();
-
- StringBuilder buf = new StringBuilder();
-
- OptionPane optionPane = null;
-
- int lastIdx = nodes.length - 1;
-
- for (int i = paneTree.isRootVisible() ? 0 : 1;
- i <= lastIdx; i++)
- {
- String label;
- Object node = nodes[i];
- if (node instanceof OptionPane)
- {
- optionPane = (OptionPane)node;
- label = jEdit.getProperty("options."
- + optionPane.getName()
- + ".label");
- }
- else if (node instanceof OptionGroup)
- {
- label = ((OptionGroup)node).getLabel();
- }
- else if (node instanceof String)
- {
- label = jEdit.getProperty("options."
- + node + ".label");
- optionPane = deferredOptionPanes.get(node);
- if(optionPane == null)
- {
- String propName = "options." + node + ".code";
- String code = jEdit.getProperty(propName);
- if(code != null)
- {
- optionPane = (OptionPane)
- BeanShell.eval(
- jEdit.getActiveView(),
- BeanShell.getNameSpace(),
- code
- );
-
- if(optionPane != null)
- {
- deferredOptionPanes.put(
- node,optionPane);
- }
- else
- continue;
- }
- else
- {
- Log.log(Log.ERROR,this,propName
- + " not defined");
- continue;
- }
- }
- }
- else
- {
- continue;
- }
-
- buf.append(label);
-
- if (i != lastIdx)
- buf.append(": ");
- }
-
- if(optionPane == null)
- return;
-
- setTitle(jEdit.getProperty("options.title-template",
- new Object[] { jEdit.getProperty(name + ".title"),
- buf.toString() }));
-
- try
- {
- optionPane.init();
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Error initializing options:");
- Log.log(Log.ERROR,this,t);
- }
-
- currentPane = optionPane;
- stage.setViewportView(currentPane.getComponent());
- stage.revalidate();
- stage.repaint();
-
- if(!isShowing())
- addNotify();
-
- updateSize();
-
- currentPane = optionPane;
- } //}}}
-
- //{{{ Protected members
- // {{{ createOptionTreeModel
- /**
- * Creates the tree model that goes on the left of the option pane,
- * loading all the items that are needed.
- */
- protected abstract OptionTreeModel createOptionTreeModel();
- // }}}
-
- protected abstract OptionGroup getDefaultGroup();
- //}}}
-
- //{{{ init() method
- /**
- * @param name the name of this pane
- * @param pane - a sub-pane name to select (?)
- * Could someone please write better docs for this function?
- * Creates buttons, adds listeners, and makes the pane visible.
- * This method is called automatically from the constructor,
- *
- * and also calls init on each of the optionPanes?
- *
- * @since jEdit 4.3pre9 (was private before)
- */
- protected void init(String name, String pane)
- {
- this.name = name;
-
- deferredOptionPanes = new HashMap<Object, OptionPane>();
-
- JPanel content = new JPanel(new BorderLayout(12,12));
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
- stage = new JScrollPane();
-
- paneTree = new JTree(createOptionTreeModel());
- paneTree.setVisibleRowCount(1);
- paneTree.setCellRenderer(new PaneNameRenderer());
-
- // looks bad with the OS X L&F, apparently...
- if(!OperatingSystem.isMacOSLF())
- paneTree.putClientProperty("JTree.lineStyle", "Angled");
-
- paneTree.setShowsRootHandles(true);
- paneTree.setRootVisible(false);
-
- JScrollPane scroller = new JScrollPane(paneTree,
- ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
- ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
- scroller.setMinimumSize(new Dimension(100, 0));
- splitter = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
- jEdit.getBooleanProperty("appearance.continuousLayout"),
- scroller,
- stage);
- content.add(splitter, BorderLayout.CENTER);
-
- Box buttons = new Box(BoxLayout.X_AXIS);
- buttons.add(Box.createGlue());
-
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(this);
- buttons.add(ok);
- buttons.add(Box.createHorizontalStrut(6));
- getRootPane().setDefaultButton(ok);
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(this);
- buttons.add(cancel);
- buttons.add(Box.createHorizontalStrut(6));
- apply = new JButton(jEdit.getProperty("common.apply"));
- apply.addActionListener(this);
- buttons.add(apply);
-
- buttons.add(Box.createGlue());
-
- content.add(buttons, BorderLayout.SOUTH);
-
- // register the Options dialog as a TreeSelectionListener.
- // this is done before the initial selection to ensure that the
- // first selected OptionPane is displayed on startup.
- paneTree.getSelectionModel().addTreeSelectionListener(this);
-
- OptionGroup rootNode = (OptionGroup)paneTree.getModel().getRoot();
- for(int i = 0; i < rootNode.getMemberCount(); i++)
- {
- paneTree.expandPath(new TreePath(
- new Object[] { rootNode, rootNode.getMember(i) }));
- }
-
- // returns false if no such pane exists; calling with null
- // param selects first option pane found
- if(!selectPane(rootNode, pane))
- selectPane(rootNode,null);
-
- splitter.setDividerLocation(paneTree.getPreferredSize().width
- + scroller.getVerticalScrollBar().getPreferredSize()
- .width);
-
- GUIUtilities.loadGeometry(this,name);
- int dividerLocation = jEdit.getIntegerProperty(name + ".splitter",-1);
- if(dividerLocation != -1)
- splitter.setDividerLocation(dividerLocation);
-
- // in case saved geometry is too small
- updateSize();
-
- setVisible(true);
- } //}}}
-
- //{{{ Private members
-
- //{{{ selectPane() method
- private boolean selectPane(OptionGroup node, String name)
- {
- return selectPane(node,name,new ArrayList<Object>());
- } //}}}
-
- //{{{ selectPane() method
- private boolean selectPane(OptionGroup node, String name, List<Object> path)
- {
- path.add(node);
-
- Enumeration<Object> e = node.getMembers();
- while(e.hasMoreElements())
- {
- Object obj = e.nextElement();
- if(obj instanceof OptionGroup)
- {
- OptionGroup grp = (OptionGroup)obj;
- if(grp.getName().equals(name))
- {
- path.add(grp);
- path.add(grp.getMember(0));
- TreePath treePath = new TreePath(
- path.toArray());
- paneTree.scrollPathToVisible(treePath);
- paneTree.setSelectionPath(treePath);
- return true;
- }
- else if(selectPane((OptionGroup)obj,name,path))
- return true;
- }
- else if(obj instanceof OptionPane)
- {
- OptionPane pane = (OptionPane)obj;
- if(pane.getName().equals(name)
- || name == null)
- {
- path.add(pane);
- TreePath treePath = new TreePath(
- path.toArray());
- paneTree.scrollPathToVisible(treePath);
- paneTree.setSelectionPath(treePath);
- return true;
- }
- }
- else if(obj instanceof String)
- {
- String pane = (String)obj;
- if(pane.equals(name)
- || name == null)
- {
- path.add(pane);
- TreePath treePath = new TreePath(
- path.toArray());
- paneTree.scrollPathToVisible(treePath);
- paneTree.setSelectionPath(treePath);
- return true;
- }
- }
- }
-
- path.remove(node);
-
- return false;
- } //}}}
-
- //{{{ save() method
- private void save(Object obj)
- {
- if(obj instanceof OptionGroup)
- {
- OptionGroup grp = (OptionGroup)obj;
- Enumeration<Object> members = grp.getMembers();
- while(members.hasMoreElements())
- {
- save(members.nextElement());
- }
- }
- else if(obj instanceof OptionPane)
- {
- try
- {
- ((OptionPane)obj).save();
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,"Error saving options:");
- Log.log(Log.ERROR,this,t);
- }
- }
- else if(obj instanceof String)
- {
- save(deferredOptionPanes.get(obj));
- }
- } //}}}
-
- //{{{ updateSize() method
- private void updateSize()
- {
- Dimension currentSize = getSize();
- Dimension requestedSize = getPreferredSize();
- Dimension newSize = new Dimension(
- Math.max(currentSize.width,requestedSize.width),
- Math.max(currentSize.height,requestedSize.height)
- );
- if(newSize.width < 300)
- newSize.width = 300;
- if(newSize.height < 200)
- newSize.height = 200;
- setSize(newSize);
- validate();
- } //}}}
-
- //}}}
-
- //{{{ PaneNameRenderer class
- public static class PaneNameRenderer extends DefaultTreeCellRenderer
- {
- public PaneNameRenderer()
- {
- paneFont = UIManager.getFont("Tree.font");
- if(paneFont == null)
- paneFont = jEdit.getFontProperty("metal.secondary.font");
- groupFont = paneFont.deriveFont(Font.BOLD);
- }
-
- public Component getTreeCellRendererComponent(JTree tree,
- Object value, boolean selected, boolean expanded,
- boolean leaf, int row, boolean hasFocus)
- {
- super.getTreeCellRendererComponent(tree,value,
- selected,expanded,leaf,row,hasFocus);
-
- String name = null;
-
- if (value instanceof OptionGroup)
- {
- setText(((OptionGroup)value).getLabel());
- setFont(groupFont);
- }
- else if (value instanceof OptionPane)
- {
- name = ((OptionPane)value).getName();
- setFont(paneFont);
- }
- else if (value instanceof String)
- {
- name = (String) value;
- setFont(paneFont);
- }
-
- if (name != null)
- {
- String label = jEdit.getProperty("options." +
- name + ".label");
-
- if (label == null)
- {
- setText("NO LABEL PROPERTY: " + name);
- }
- else
- {
- setText(label);
- }
- }
-
- setIcon(null);
-
- return this;
- }
-
- private Font paneFont;
- private final Font groupFont;
- } //}}}
-
- //{{{ OptionTreeModel class
- public class OptionTreeModel implements TreeModel
- {
- public OptionTreeModel()
- {
- this(new OptionGroup(null));
- }
-
- public OptionTreeModel(OptionGroup root)
- {
- this.root = root;
- }
-
- public void addTreeModelListener(TreeModelListener l)
- {
- listenerList.add(TreeModelListener.class, l);
- }
-
- public void removeTreeModelListener(TreeModelListener l)
- {
- listenerList.remove(TreeModelListener.class, l);
- }
-
- public Object getChild(Object parent, int index)
- {
- if (parent instanceof OptionGroup)
- {
- return ((OptionGroup)parent).getMember(index);
- }
- else
- {
- return null;
- }
- }
-
- public int getChildCount(Object parent)
- {
- if (parent instanceof OptionGroup)
- {
- return ((OptionGroup)parent).getMemberCount();
- }
- else
- {
- return 0;
- }
- }
-
- public int getIndexOfChild(Object parent, Object child)
- {
- if (parent instanceof OptionGroup)
- {
- return ((OptionGroup)parent)
- .getMemberIndex(child);
- }
- else
- {
- return -1;
- }
- }
-
- public Object getRoot()
- {
- return root;
- }
-
- public boolean isLeaf(Object node)
- {
- return !(node instanceof OptionGroup);
- }
-
- public void valueForPathChanged(TreePath path, Object newValue)
- {
- // this model may not be changed by the TableCellEditor
- }
-
- protected void fireNodesChanged(Object source, Object[] path,
- int[] childIndices, Object[] children)
- {
- Object[] listeners = listenerList.getListenerList();
-
- TreeModelEvent modelEvent = null;
- for (int i = listeners.length - 2; i >= 0; i -= 2)
- {
- if (listeners[i] != TreeModelListener.class)
- continue;
-
- if (modelEvent == null)
- {
- modelEvent = new TreeModelEvent(source,
- path, childIndices, children);
- }
-
- ((TreeModelListener)listeners[i + 1])
- .treeNodesChanged(modelEvent);
- }
- }
-
- protected void fireNodesInserted(Object source, Object[] path,
- int[] childIndices, Object[] children)
- {
- Object[] listeners = listenerList.getListenerList();
-
- TreeModelEvent modelEvent = null;
- for (int i = listeners.length - 2; i >= 0; i -= 2)
- {
- if (listeners[i] != TreeModelListener.class)
- continue;
-
- if (modelEvent == null)
- {
- modelEvent = new TreeModelEvent(source,
- path, childIndices, children);
- }
-
- ((TreeModelListener)listeners[i + 1])
- .treeNodesInserted(modelEvent);
- }
- }
-
- protected void fireNodesRemoved(Object source, Object[] path,
- int[] childIndices, Object[] children)
- {
- Object[] listeners = listenerList.getListenerList();
-
- TreeModelEvent modelEvent = null;
- for (int i = listeners.length - 2; i >= 0; i -= 2)
- {
- if (listeners[i] != TreeModelListener.class)
- continue;
-
- if (modelEvent == null)
- {
- modelEvent = new TreeModelEvent(source,
- path, childIndices, children);
- }
-
- ((TreeModelListener)listeners[i + 1])
- .treeNodesRemoved(modelEvent);
- }
- }
-
- protected void fireTreeStructureChanged(Object source,
- Object[] path, int[] childIndices, Object[] children)
- {
- Object[] listeners = listenerList.getListenerList();
-
- TreeModelEvent modelEvent = null;
- for (int i = listeners.length - 2; i >= 0; i -= 2)
- {
- if (listeners[i] != TreeModelListener.class)
- continue;
-
- if (modelEvent == null)
- {
- modelEvent = new TreeModelEvent(source,
- path, childIndices, children);
- }
-
- ((TreeModelListener)listeners[i + 1])
- .treeStructureChanged(modelEvent);
- }
- }
-
- private final OptionGroup root;
- private final EventListenerList listenerList = new EventListenerList();
- } //}}}
-}
+/*
+ * OptionsDialog.java - Tree options dialog
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2003 Slava Pestov
+ * Portions copyright (C) 1999 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.event.*;
+import javax.swing.tree.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+import java.util.List;
+
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * An abstract options dialog box.
+ * @author Slava Pestov
+ * @version $Id: OptionsDialog.java 16686 2009-12-20 14:16:58Z daleanson $
+ */
+public abstract class OptionsDialog extends EnhancedDialog
+ implements ActionListener, TreeSelectionListener
+{
+ //{{{ Instance variables
+ private String name;
+ private JSplitPane splitter;
+ protected JTree paneTree;
+ private JScrollPane stage;
+ private JButton ok;
+ private JButton cancel;
+ private JButton apply;
+ protected OptionPane currentPane;
+ private Map<Object, OptionPane> deferredOptionPanes;
+ //}}}
+
+ //{{{ OptionsDialog constructor
+ /**
+ * @param frame - the parent frame for dialogs created
+ * @param name the name of an option pane - it must have a .title and .code
+ * property defined in order to instantiate.
+ * @param pane the initial pane to show when this is created.
+ */
+ protected OptionsDialog(Frame frame, String name, String pane)
+ {
+ super(frame, jEdit.getProperty(name + ".title"), true);
+ init(name,pane);
+ } //}}}
+
+ //{{{ OptionsDialog constructor
+ protected OptionsDialog(Dialog dialog, String name, String pane)
+ {
+ super(dialog, jEdit.getProperty(name + ".title"), true);
+ init(name,pane);
+ } //}}}
+
+ //{{{ addOptionGroup() method
+ public void addOptionGroup(OptionGroup group)
+ {
+ getDefaultGroup().addOptionGroup(group);
+ } //}}}
+
+ //{{{ addOptionPane() method
+ public void addOptionPane(OptionPane pane)
+ {
+ getDefaultGroup().addOptionPane(pane);
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ if(currentPane != null)
+ jEdit.setProperty(name + ".last",currentPane.getName());
+ ok(true);
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ if(currentPane != null)
+ jEdit.setProperty(name + ".last",currentPane.getName());
+ dispose();
+ } //}}}
+
+ //{{{ ok() method
+ public void ok(boolean dispose)
+ {
+ OptionTreeModel m = (OptionTreeModel) paneTree
+ .getModel();
+ save(m.getRoot());
+
+ /* This will fire the PROPERTIES_CHANGED event */
+ jEdit.propertiesChanged();
+
+ // Save settings to disk
+ jEdit.saveSettings();
+
+ // get rid of this dialog if necessary
+ if(dispose)
+ dispose();
+ } //}}}
+
+ //{{{ dispose() method
+ public void dispose()
+ {
+ GUIUtilities.saveGeometry(this,name);
+ jEdit.setIntegerProperty(name + ".splitter",splitter.getDividerLocation());
+ super.dispose();
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+
+ if(source == ok)
+ {
+ ok();
+ }
+ else if(source == cancel)
+ {
+ cancel();
+ }
+ else if(source == apply)
+ {
+ ok(false);
+ }
+ } //}}}
+
+ //{{{ valueChanged() method
+ public void valueChanged(TreeSelectionEvent evt)
+ {
+ TreePath path = evt.getPath();
+
+ if(path == null)
+ return;
+
+ Object lastPathComponent = path.getLastPathComponent();
+ if(!(lastPathComponent instanceof String
+ || lastPathComponent instanceof OptionPane))
+ {
+ return;
+ }
+
+ Object[] nodes = path.getPath();
+
+ StringBuilder buf = new StringBuilder();
+
+ OptionPane optionPane = null;
+
+ int lastIdx = nodes.length - 1;
+
+ for (int i = paneTree.isRootVisible() ? 0 : 1;
+ i <= lastIdx; i++)
+ {
+ String label;
+ Object node = nodes[i];
+ if (node instanceof OptionPane)
+ {
+ optionPane = (OptionPane)node;
+ label = jEdit.getProperty("options."
+ + optionPane.getName()
+ + ".label");
+ }
+ else if (node instanceof OptionGroup)
+ {
+ label = ((OptionGroup)node).getLabel();
+ }
+ else if (node instanceof String)
+ {
+ label = jEdit.getProperty("options."
+ + node + ".label");
+ optionPane = deferredOptionPanes.get(node);
+ if(optionPane == null)
+ {
+ String propName = "options." + node + ".code";
+ String code = jEdit.getProperty(propName);
+ if(code != null)
+ {
+ optionPane = (OptionPane)
+ BeanShell.eval(
+ jEdit.getActiveView(),
+ BeanShell.getNameSpace(),
+ code
+ );
+
+ if(optionPane != null)
+ {
+ deferredOptionPanes.put(
+ node,optionPane);
+ }
+ else
+ continue;
+ }
+ else
+ {
+ Log.log(Log.ERROR,this,propName
+ + " not defined");
+ continue;
+ }
+ }
+ }
+ else
+ {
+ continue;
+ }
+
+ buf.append(label);
+
+ if (i != lastIdx)
+ buf.append(": ");
+ }
+
+ if(optionPane == null)
+ return;
+
+ setTitle(jEdit.getProperty("options.title-template",
+ new Object[] { jEdit.getProperty(name + ".title"),
+ buf.toString() }));
+
+ try
+ {
+ optionPane.init();
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Error initializing options:");
+ Log.log(Log.ERROR,this,t);
+ }
+
+ currentPane = optionPane;
+ stage.setViewportView(currentPane.getComponent());
+ stage.revalidate();
+ stage.repaint();
+
+ if(!isShowing())
+ addNotify();
+
+ updateSize();
+
+ currentPane = optionPane;
+ } //}}}
+
+ //{{{ Protected members
+ // {{{ createOptionTreeModel
+ /**
+ * Creates the tree model that goes on the left of the option pane,
+ * loading all the items that are needed.
+ */
+ protected abstract OptionTreeModel createOptionTreeModel();
+ // }}}
+
+ protected abstract OptionGroup getDefaultGroup();
+ //}}}
+
+ //{{{ init() method
+ /**
+ * @param name the name of this pane
+ * @param pane - a sub-pane name to select (?)
+ * Could someone please write better docs for this function?
+ * Creates buttons, adds listeners, and makes the pane visible.
+ * This method is called automatically from the constructor,
+ *
+ * and also calls init on each of the optionPanes?
+ *
+ * @since jEdit 4.3pre9 (was private before)
+ */
+ protected void init(String name, String pane)
+ {
+ this.name = name;
+
+ deferredOptionPanes = new HashMap<Object, OptionPane>();
+
+ JPanel content = new JPanel(new BorderLayout(12,12));
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+ stage = new JScrollPane();
+
+ paneTree = new JTree(createOptionTreeModel());
+ paneTree.setVisibleRowCount(1);
+ paneTree.setCellRenderer(new PaneNameRenderer());
+
+ // looks bad with the OS X L&F, apparently...
+ if(!OperatingSystem.isMacOSLF())
+ paneTree.putClientProperty("JTree.lineStyle", "Angled");
+
+ paneTree.setShowsRootHandles(true);
+ paneTree.setRootVisible(false);
+
+ JScrollPane scroller = new JScrollPane(paneTree,
+ ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
+ ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+ scroller.setMinimumSize(new Dimension(100, 0));
+ splitter = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
+ jEdit.getBooleanProperty("appearance.continuousLayout"),
+ scroller,
+ stage);
+ content.add(splitter, BorderLayout.CENTER);
+
+ Box buttons = new Box(BoxLayout.X_AXIS);
+ buttons.add(Box.createGlue());
+
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(this);
+ buttons.add(ok);
+ buttons.add(Box.createHorizontalStrut(6));
+ getRootPane().setDefaultButton(ok);
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(this);
+ buttons.add(cancel);
+ buttons.add(Box.createHorizontalStrut(6));
+ apply = new JButton(jEdit.getProperty("common.apply"));
+ apply.addActionListener(this);
+ buttons.add(apply);
+
+ buttons.add(Box.createGlue());
+
+ content.add(buttons, BorderLayout.SOUTH);
+
+ // register the Options dialog as a TreeSelectionListener.
+ // this is done before the initial selection to ensure that the
+ // first selected OptionPane is displayed on startup.
+ paneTree.getSelectionModel().addTreeSelectionListener(this);
+
+ OptionGroup rootNode = (OptionGroup)paneTree.getModel().getRoot();
+ for(int i = 0; i < rootNode.getMemberCount(); i++)
+ {
+ paneTree.expandPath(new TreePath(
+ new Object[] { rootNode, rootNode.getMember(i) }));
+ }
+
+ // returns false if no such pane exists; calling with null
+ // param selects first option pane found
+ if(!selectPane(rootNode, pane))
+ selectPane(rootNode,null);
+
+ splitter.setDividerLocation(paneTree.getPreferredSize().width
+ + scroller.getVerticalScrollBar().getPreferredSize()
+ .width);
+
+ GUIUtilities.loadGeometry(this,name);
+ int dividerLocation = jEdit.getIntegerProperty(name + ".splitter",-1);
+ if(dividerLocation != -1)
+ splitter.setDividerLocation(dividerLocation);
+
+ // in case saved geometry is too small
+ updateSize();
+
+ setVisible(true);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ selectPane() method
+ private boolean selectPane(OptionGroup node, String name)
+ {
+ return selectPane(node,name,new ArrayList<Object>());
+ } //}}}
+
+ //{{{ selectPane() method
+ private boolean selectPane(OptionGroup node, String name, List<Object> path)
+ {
+ path.add(node);
+
+ Enumeration<Object> e = node.getMembers();
+ while(e.hasMoreElements())
+ {
+ Object obj = e.nextElement();
+ if(obj instanceof OptionGroup)
+ {
+ OptionGroup grp = (OptionGroup)obj;
+ if(grp.getName().equals(name))
+ {
+ path.add(grp);
+ path.add(grp.getMember(0));
+ TreePath treePath = new TreePath(
+ path.toArray());
+ paneTree.scrollPathToVisible(treePath);
+ paneTree.setSelectionPath(treePath);
+ return true;
+ }
+ else if(selectPane((OptionGroup)obj,name,path))
+ return true;
+ }
+ else if(obj instanceof OptionPane)
+ {
+ OptionPane pane = (OptionPane)obj;
+ if(pane.getName().equals(name)
+ || name == null)
+ {
+ path.add(pane);
+ TreePath treePath = new TreePath(
+ path.toArray());
+ paneTree.scrollPathToVisible(treePath);
+ paneTree.setSelectionPath(treePath);
+ return true;
+ }
+ }
+ else if(obj instanceof String)
+ {
+ String pane = (String)obj;
+ if(pane.equals(name)
+ || name == null)
+ {
+ path.add(pane);
+ TreePath treePath = new TreePath(
+ path.toArray());
+ paneTree.scrollPathToVisible(treePath);
+ paneTree.setSelectionPath(treePath);
+ return true;
+ }
+ }
+ }
+
+ path.remove(node);
+
+ return false;
+ } //}}}
+
+ //{{{ save() method
+ private void save(Object obj)
+ {
+ if(obj instanceof OptionGroup)
+ {
+ OptionGroup grp = (OptionGroup)obj;
+ Enumeration<Object> members = grp.getMembers();
+ while(members.hasMoreElements())
+ {
+ save(members.nextElement());
+ }
+ }
+ else if(obj instanceof OptionPane)
+ {
+ try
+ {
+ ((OptionPane)obj).save();
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,"Error saving options:");
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ else if(obj instanceof String)
+ {
+ save(deferredOptionPanes.get(obj));
+ }
+ } //}}}
+
+ //{{{ updateSize() method
+ private void updateSize()
+ {
+ Dimension currentSize = getSize();
+ Dimension requestedSize = getPreferredSize();
+ Dimension newSize = new Dimension(
+ Math.max(currentSize.width,requestedSize.width),
+ Math.max(currentSize.height,requestedSize.height)
+ );
+ if(newSize.width < 300)
+ newSize.width = 300;
+ if(newSize.height < 200)
+ newSize.height = 200;
+ setSize(newSize);
+ validate();
+ } //}}}
+
+ //}}}
+
+ //{{{ PaneNameRenderer class
+ public static class PaneNameRenderer extends DefaultTreeCellRenderer
+ {
+ public PaneNameRenderer()
+ {
+ paneFont = UIManager.getFont("Tree.font");
+ if(paneFont == null)
+ paneFont = jEdit.getFontProperty("metal.secondary.font");
+ groupFont = paneFont.deriveFont(Font.BOLD);
+ }
+
+ public Component getTreeCellRendererComponent(JTree tree,
+ Object value, boolean selected, boolean expanded,
+ boolean leaf, int row, boolean hasFocus)
+ {
+ super.getTreeCellRendererComponent(tree,value,
+ selected,expanded,leaf,row,hasFocus);
+
+ String name = null;
+
+ if (value instanceof OptionGroup)
+ {
+ setText(((OptionGroup)value).getLabel());
+ setFont(groupFont);
+ }
+ else if (value instanceof OptionPane)
+ {
+ name = ((OptionPane)value).getName();
+ setFont(paneFont);
+ }
+ else if (value instanceof String)
+ {
+ name = (String) value;
+ setFont(paneFont);
+ }
+
+ if (name != null)
+ {
+ String label = jEdit.getProperty("options." +
+ name + ".label");
+
+ if (label == null)
+ {
+ setText("NO LABEL PROPERTY: " + name);
+ }
+ else
+ {
+ setText(label);
+ }
+ }
+
+ setIcon(null);
+
+ return this;
+ }
+
+ private Font paneFont;
+ private final Font groupFont;
+ } //}}}
+
+ //{{{ OptionTreeModel class
+ public class OptionTreeModel implements TreeModel
+ {
+ public OptionTreeModel()
+ {
+ this(new OptionGroup(null));
+ }
+
+ public OptionTreeModel(OptionGroup root)
+ {
+ this.root = root;
+ }
+
+ public void addTreeModelListener(TreeModelListener l)
+ {
+ listenerList.add(TreeModelListener.class, l);
+ }
+
+ public void removeTreeModelListener(TreeModelListener l)
+ {
+ listenerList.remove(TreeModelListener.class, l);
+ }
+
+ public Object getChild(Object parent, int index)
+ {
+ if (parent instanceof OptionGroup)
+ {
+ return ((OptionGroup)parent).getMember(index);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public int getChildCount(Object parent)
+ {
+ if (parent instanceof OptionGroup)
+ {
+ return ((OptionGroup)parent).getMemberCount();
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ public int getIndexOfChild(Object parent, Object child)
+ {
+ if (parent instanceof OptionGroup)
+ {
+ return ((OptionGroup)parent)
+ .getMemberIndex(child);
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ public Object getRoot()
+ {
+ return root;
+ }
+
+ public boolean isLeaf(Object node)
+ {
+ return !(node instanceof OptionGroup);
+ }
+
+ public void valueForPathChanged(TreePath path, Object newValue)
+ {
+ // this model may not be changed by the TableCellEditor
+ }
+
+ protected void fireNodesChanged(Object source, Object[] path,
+ int[] childIndices, Object[] children)
+ {
+ Object[] listeners = listenerList.getListenerList();
+
+ TreeModelEvent modelEvent = null;
+ for (int i = listeners.length - 2; i >= 0; i -= 2)
+ {
+ if (listeners[i] != TreeModelListener.class)
+ continue;
+
+ if (modelEvent == null)
+ {
+ modelEvent = new TreeModelEvent(source,
+ path, childIndices, children);
+ }
+
+ ((TreeModelListener)listeners[i + 1])
+ .treeNodesChanged(modelEvent);
+ }
+ }
+
+ protected void fireNodesInserted(Object source, Object[] path,
+ int[] childIndices, Object[] children)
+ {
+ Object[] listeners = listenerList.getListenerList();
+
+ TreeModelEvent modelEvent = null;
+ for (int i = listeners.length - 2; i >= 0; i -= 2)
+ {
+ if (listeners[i] != TreeModelListener.class)
+ continue;
+
+ if (modelEvent == null)
+ {
+ modelEvent = new TreeModelEvent(source,
+ path, childIndices, children);
+ }
+
+ ((TreeModelListener)listeners[i + 1])
+ .treeNodesInserted(modelEvent);
+ }
+ }
+
+ protected void fireNodesRemoved(Object source, Object[] path,
+ int[] childIndices, Object[] children)
+ {
+ Object[] listeners = listenerList.getListenerList();
+
+ TreeModelEvent modelEvent = null;
+ for (int i = listeners.length - 2; i >= 0; i -= 2)
+ {
+ if (listeners[i] != TreeModelListener.class)
+ continue;
+
+ if (modelEvent == null)
+ {
+ modelEvent = new TreeModelEvent(source,
+ path, childIndices, children);
+ }
+
+ ((TreeModelListener)listeners[i + 1])
+ .treeNodesRemoved(modelEvent);
+ }
+ }
+
+ protected void fireTreeStructureChanged(Object source,
+ Object[] path, int[] childIndices, Object[] children)
+ {
+ Object[] listeners = listenerList.getListenerList();
+
+ TreeModelEvent modelEvent = null;
+ for (int i = listeners.length - 2; i >= 0; i -= 2)
+ {
+ if (listeners[i] != TreeModelListener.class)
+ continue;
+
+ if (modelEvent == null)
+ {
+ modelEvent = new TreeModelEvent(source,
+ path, childIndices, children);
+ }
+
+ ((TreeModelListener)listeners[i + 1])
+ .treeStructureChanged(modelEvent);
+ }
+ }
+
+ private final OptionGroup root;
+ private final EventListenerList listenerList = new EventListenerList();
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/PanelWindowContainer.java b/jEdit/org/gjt/sp/jedit/gui/PanelWindowContainer.java
index 73fb196..c7ca845 100644
--- a/jEdit/org/gjt/sp/jedit/gui/PanelWindowContainer.java
+++ b/jEdit/org/gjt/sp/jedit/gui/PanelWindowContainer.java
@@ -1,953 +1,953 @@
-/*
- * PanelWindowContainer.java - holds dockable windows
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.LayoutManager;
-import java.awt.RenderingHints;
-import java.awt.Toolkit;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.font.FontRenderContext;
-import java.awt.font.GlyphVector;
-import java.awt.font.LineMetrics;
-import java.awt.geom.AffineTransform;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import javax.swing.AbstractButton;
-import javax.swing.ButtonGroup;
-import javax.swing.Icon;
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JPanel;
-import javax.swing.JPopupMenu;
-import javax.swing.JToggleButton;
-import javax.swing.UIManager;
-import javax.swing.border.Border;
-import javax.swing.border.EmptyBorder;
-import javax.swing.plaf.metal.MetalLookAndFeel;
-
-import org.gjt.sp.jedit.EditBus;
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.OperatingSystem;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.gui.DockableWindowManager.DockingArea;
-import org.gjt.sp.jedit.msg.DockableWindowUpdate;
-import org.gjt.sp.util.StandardUtilities;
-
-/**
- * A container for dockable windows. This class should never be used
- * directly.
- * @author Slava Pestov
- * @version $Id: PanelWindowContainer.java 16341 2009-10-14 10:05:51Z kpouer $
- * @since jEdit 4.0pre1
- */
-public class PanelWindowContainer implements DockableWindowContainer, DockingArea
-{
- //{{{ PanelWindowContainer constructor
- public PanelWindowContainer(DockableWindowManagerImpl wm, String position,
- int dimension)
- {
- this.wm = wm;
- this.position = position;
-
- //{{{ Button box setup
- buttonPanel = new JPanel(new ButtonLayout());
- buttonPanel.setBorder(new EmptyBorder(1,1,1,1));
-
- closeBox = new JButton(GUIUtilities.loadIcon("closebox.gif"));
- closeBox.setRequestFocusEnabled(false);
- closeBox.setToolTipText(jEdit.getProperty("view.docking.close-tooltip"));
- if(OperatingSystem.isMacOSLF())
- closeBox.putClientProperty("JButton.buttonType","toolbar");
-
- closeBox.setMargin(new Insets(0,0,0,0));
-
- closeBox.addActionListener(new ActionHandler());
-
- menuBtn = new JButton(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
- menuBtn.setRequestFocusEnabled(false);
- menuBtn.setToolTipText(jEdit.getProperty("view.docking.menu-tooltip"));
- if(OperatingSystem.isMacOSLF())
- menuBtn.putClientProperty("JButton.buttonType","toolbar");
-
- menuBtn.setMargin(new Insets(0,0,0,0));
-
- menuBtn.addMouseListener(new MenuMouseHandler());
-
- buttonGroup = new ButtonGroup();
- // JDK 1.4 workaround
- buttonGroup.add(nullButton = new JToggleButton());
- //}}}
-
- dockables = new ArrayList<DockableWindowManagerImpl.Entry>();
- buttons = new ArrayList<AbstractButton>();
- dockablePanel = new DockablePanel(this);
-
- this.dimension = dimension;
- } //}}}
-
- //{{{ getDockableWindowManager() method
- /**
- * @since jEdit 4.3pre2
- */
- public DockableWindowManagerImpl getDockableWindowManager()
- {
- return wm;
- } //}}}
-
- //{{{ register() method
- public void register(DockableWindowManagerImpl.Entry entry)
- {
- dockables.add(entry);
-
- //{{{ Create button
- int rotation;
- if(position.equals(DockableWindowManagerImpl.TOP)
- || position.equals(DockableWindowManagerImpl.BOTTOM))
- rotation = RotatedTextIcon.NONE;
- else if(position.equals(DockableWindowManagerImpl.LEFT))
- rotation = RotatedTextIcon.CCW;
- else if(position.equals(DockableWindowManagerImpl.RIGHT))
- rotation = RotatedTextIcon.CW;
- else
- throw new InternalError("Invalid position: " + position);
-
- JToggleButton button = new JToggleButton();
- button.setMargin(new Insets(1,1,1,1));
- button.setRequestFocusEnabled(false);
- button.setIcon(new RotatedTextIcon(rotation,button.getFont(),
- entry.shortTitle()));
- button.setActionCommand(entry.factory.name);
- button.addActionListener(new ActionHandler());
- button.addMouseListener(new MenuMouseHandler());
- if(OperatingSystem.isMacOSLF())
- button.putClientProperty("JButton.buttonType","toolbar");
- //}}}
-
- buttonGroup.add(button);
- buttons.add(button);
- entry.btn = button;
-
- wm.revalidate();
- } //}}}
-
- //{{{ unregister() method
- public void unregister(DockableWindowManagerImpl.Entry entry)
- {
- if(entry.factory.name.equals(mostRecent))
- mostRecent = null;
-
- if(entry.btn != null)
- {
- buttonPanel.remove(entry.btn);
- buttons.remove(entry.btn);
- entry.btn = null;
- }
-
- dockables.remove(entry);
- if(entry.win != null)
- dockablePanel.remove(entry.win);
-
- if(current == entry)
- {
- current = null;
- show(current);
- }
- else
- {
- wm.revalidate();
- dockablePanel.repaint();
- buttonPanel.repaint();
- }
- } //}}}
-
- //{{{ remove() method
- public void remove(DockableWindowManagerImpl.Entry entry)
- {
- if(entry.factory.name.equals(mostRecent))
- mostRecent = null;
-
- if(entry.win != null)
- {
- dockablePanel.remove(entry.win);
- entry.win = null;
- }
-
- if(current == entry)
- {
- current = null;
- show(current);
- }
- else
- {
- wm.revalidate();
- dockablePanel.repaint();
- }
- } //}}}
-
- //{{{ showMostRecent() method
- public void showMostRecent()
- {
- if(dockables.isEmpty())
- {
- Toolkit.getDefaultToolkit().beep();
- return;
- }
-
- if(mostRecent == null)
- {
- mostRecent = dockables.get(0).factory.name;
- }
-
- wm.showDockableWindow(mostRecent);
- } //}}}
-
- //{{{ show() method
- public void show(DockableWindowManagerImpl.Entry entry)
- {
- if(current == entry)
- {
- if(entry != null)
- {
- if(entry.win instanceof DefaultFocusComponent)
- {
- ((DefaultFocusComponent)entry.win)
- .focusOnDefaultComponent();
- }
- else
- {
- entry.win.requestDefaultFocus();
- }
- }
- return;
- }
-
- if(entry != null)
- {
- if(current == null)
- {
- // we didn't have a component previously, so
- // create a border
- dockablePanel.setBorder(new DockBorder(position));
- }
-
- mostRecent = entry.factory.name;
- this.current = entry;
-
- if(entry.win.getParent() != dockablePanel)
- dockablePanel.add(entry.factory.name,entry.win);
-
- dockablePanel.showDockable(entry.factory.name);
-
- entry.btn.setSelected(true);
-
- if(entry.win instanceof DefaultFocusComponent)
- {
- ((DefaultFocusComponent)entry.win)
- .focusOnDefaultComponent();
- }
- else
- {
- entry.win.requestDefaultFocus();
- }
- }
- else
- {
- if (current != null)
- {
-
- Object reason = DockableWindowUpdate.DEACTIVATED;
- EditBus.send(new DockableWindowUpdate(wm, reason, current.factory.name));
- }
- current = null;
- nullButton.setSelected(true);
- // removing last component, so remove border
- dockablePanel.setBorder(null);
-
- wm.getView().getTextArea().requestFocus();
- }
-
- wm.revalidate();
- dockablePanel.repaint();
- } //}}}
-
- //{{{ isVisible() method
- public boolean isVisible(DockableWindowManagerImpl.Entry entry)
- {
- return current == entry;
- } //}}}
-
- //{{{ getCurrent() method
- /**
- * Returns the name of the dockable in this container.
- * @since jEdit 4.2pre1
- */
- public String getCurrent()
- {
- if(current == null)
- return null;
- else
- return current.factory.name;
- } //}}}
-
- //{{{ getDimension() method
- /**
- * Returns the width or height (depending on position) of the dockable
- * window container.
- * @since jEdit 4.2pre1
- */
- public int getDimension()
- {
- return dimension;
- } //}}}
-
- //{{{ getPosition() method
- /**
- * @since jEdit 4.3pre2
- */
- public String getPosition()
- {
- return position;
- } //}}}
-
- //{{{ getDockables() method
- public String[] getDockables()
- {
- String[] retVal = new String[dockables.size()];
- for(int i = 0; i < dockables.size(); i++)
- {
- DockableWindowManagerImpl.Entry entry = dockables.get(i);
- retVal[i] = entry.factory.name;
- }
- return retVal;
- } //}}}
-
- //{{{ Package-private members
- static final int SPLITTER_WIDTH = 10;
- DockablePanel dockablePanel;
- JPanel buttonPanel;
-
- //{{{ save() method
- void save()
- {
- jEdit.setIntegerProperty("view.dock." + position + ".dimension",
- dimension);
- if(current == null)
- jEdit.unsetProperty("view.dock." + position + ".last");
- else
- {
- jEdit.setProperty("view.dock." + position + ".last",
- current.factory.name);
- }
- } //}}}
-
- //{{{ setDimension() method
- void setDimension(int dimension)
- {
- if(dimension > SPLITTER_WIDTH)
- this.dimension = dimension - SPLITTER_WIDTH;
- } //}}}
-
- //{{{ sortDockables() method
- void sortDockables()
- {
- buttonPanel.removeAll();
- buttonPanel.add(closeBox);
- buttonPanel.add(menuBtn);
- Collections.sort(buttons,new DockableWindowCompare());
- for(int i = 0; i < buttons.size(); i++)
- {
- buttonPanel.add(buttons.get(i));
- }
- } //}}}
-
- //{{{ getWrappedDimension() method
- /**
- * Returns the width or height of wrapped rows or columns.
- */
- int getWrappedDimension(int dimension)
- {
- return ((ButtonLayout)buttonPanel.getLayout())
- .getWrappedDimension(buttonPanel,dimension);
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private final DockableWindowManagerImpl wm;
- private final String position;
- private final JButton closeBox;
- private final JButton menuBtn;
- private final ButtonGroup buttonGroup;
- private final JToggleButton nullButton;
- private int dimension;
- private final List<DockableWindowManagerImpl.Entry> dockables;
- private final List<AbstractButton> buttons;
- private DockableWindowManagerImpl.Entry current;
- private JPopupMenu popup;
-
- // remember the most recent dockable
- private String mostRecent;
- //}}}
-
- //{{{ Inner classes
-
- //{{{ DockableWindowCompare class
- static class DockableWindowCompare implements Comparator<AbstractButton>
- {
- public int compare(AbstractButton o1, AbstractButton o2)
- {
- String name1 = o1.getActionCommand();
- String name2 = o2.getActionCommand();
- return StandardUtilities.compareStrings(
- jEdit.getProperty(name1 + ".title",""),
- jEdit.getProperty(name2 + ".title",""),
- true);
- }
- } //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(popup != null && popup.isVisible())
- popup.setVisible(false);
-
- if(evt.getSource() == closeBox)
- show((DockableWindowManagerImpl.Entry)null);
- else
- {
- if(wm.isDockableWindowVisible(evt.getActionCommand()))
- show((DockableWindowManagerImpl.Entry)null);
- else
- wm.showDockableWindow(evt.getActionCommand());
- }
- }
- } //}}}
-
- //{{{ MenuMouseHandler class
- class MenuMouseHandler extends MouseAdapter
- {
- public void mousePressed(MouseEvent evt)
- {
- if(popup != null && popup.isVisible())
- {
- popup.setVisible(false);
- return;
- }
-
- Component comp = (Component)evt.getSource();
- String dockable;
- if(comp instanceof JToggleButton)
- dockable = ((JToggleButton)comp).getActionCommand();
- else
- dockable = getCurrent();
-
- if(comp == menuBtn || GUIUtilities.isPopupTrigger(evt))
- {
- if(dockable == null)
- {
- popup = wm.createPopupMenu(PanelWindowContainer.this,null,false);
- }
- else
- {
- popup = wm.createPopupMenu(PanelWindowContainer.this,dockable,false);
- }
-
- int x, y;
- boolean point;
- if(comp == menuBtn)
- {
- x = 0;
- y = menuBtn.getHeight();
- point = false;
- }
- else
- {
- x = evt.getX();
- y = evt.getY();
- point = true;
- }
- GUIUtilities.showPopupMenu(popup,
- comp,x,y,point);
- }
- }
- } //}}}
-
- //{{{ DockBorder class
- static class DockBorder implements Border
- {
- String position;
- Insets insets;
- Color color1;
- Color color2;
- Color color3;
-
- //{{{ DockBorder constructor
- DockBorder(String position)
- {
- this.position = position;
- insets = new Insets(
- position.equals(DockableWindowManagerImpl.BOTTOM)
- ? SPLITTER_WIDTH : 0,
- position.equals(DockableWindowManagerImpl.RIGHT)
- ? SPLITTER_WIDTH : 0,
- position.equals(DockableWindowManagerImpl.TOP)
- ? SPLITTER_WIDTH : 0,
- position.equals(DockableWindowManagerImpl.LEFT)
- ? SPLITTER_WIDTH : 0);
- } //}}}
-
- //{{{ paintBorder() method
- public void paintBorder(Component c, Graphics g,
- int x, int y, int width, int height)
- {
- updateColors();
-
- if(color1 == null || color2 == null || color3 == null)
- return;
-
- if(position.equals(DockableWindowManagerImpl.BOTTOM))
- paintHorizBorder(g,x,y,width);
- else if(position.equals(DockableWindowManagerImpl.RIGHT))
- paintVertBorder(g,x,y,height);
- else if(position.equals(DockableWindowManagerImpl.TOP))
- {
- paintHorizBorder(g,x,y + height
- - SPLITTER_WIDTH,width);
- }
- else if(position.equals(DockableWindowManagerImpl.LEFT))
- {
- paintVertBorder(g,x + width
- - SPLITTER_WIDTH,y,height);
- }
- } //}}}
-
- //{{{ getBorderInsets() method
- public Insets getBorderInsets(Component c)
- {
- return insets;
- } //}}}
-
- //{{{ isBorderOpaque() method
- public boolean isBorderOpaque()
- {
- return false;
- } //}}}
-
- //{{{ paintHorizBorder() method
- private void paintHorizBorder(Graphics g, int x, int y, int width)
- {
- g.setColor(color3);
- g.fillRect(x,y,width,SPLITTER_WIDTH);
-
- for(int i = 0; i < width / 4 - 1; i++)
- {
- g.setColor(color1);
- g.drawLine(x + (i << 2) + 2,y + 3,
- x + (i << 2) + 2,y + 3);
- g.setColor(color2);
- g.drawLine(x + (i << 2) + 3,y + 4,
- x + (i << 2) + 3,y + 4);
- g.setColor(color1);
- g.drawLine(x + (i << 2) + 4,y + 5,
- x + (i << 2) + 4,y + 5);
- g.setColor(color2);
- g.drawLine(x + (i << 2) + 5,y + 6,
- x + (i << 2) + 5,y + 6);
- }
- } //}}}
-
- //{{{ paintVertBorder() method
- private void paintVertBorder(Graphics g, int x, int y, int height)
- {
- g.setColor(color3);
- g.fillRect(x,y,SPLITTER_WIDTH,height);
-
- for(int i = 0; i < height / 4 - 1; i++)
- {
- g.setColor(color1);
- g.drawLine(x + 3,y + (i << 2) + 2,
- x + 3,y + (i << 2) + 2);
- g.setColor(color2);
- g.drawLine(x + 4,y + (i << 2) + 3,
- x + 4,y + (i << 2) + 3);
- g.setColor(color1);
- g.drawLine(x + 5,y + (i << 2) + 4,
- x + 5,y + (i << 2) + 4);
- g.setColor(color2);
- g.drawLine(x + 6,y + (i << 2) + 5,
- x + 6,y + (i << 2) + 5);
- }
- } //}}}
-
- //{{{ updateColors() method
- private void updateColors()
- {
- if(UIManager.getLookAndFeel() instanceof MetalLookAndFeel)
- {
- color1 = MetalLookAndFeel.getControlHighlight();
- color2 = MetalLookAndFeel.getControlDarkShadow();
- color3 = MetalLookAndFeel.getControl();
- }
- else
- {
- color1 = color2 = color3 = null;
- }
- } //}}}
- } //}}}
-
- //{{{ RotatedTextIcon class
- public static class RotatedTextIcon implements Icon
- {
- public static final int NONE = 0;
- public static final int CW = 1;
- public static final int CCW = 2;
-
- //{{{ RotatedTextIcon constructor
- public RotatedTextIcon(int rotate, Font font, String text)
- {
- this.rotate = rotate;
- this.font = font;
-
- FontRenderContext fontRenderContext
- = new FontRenderContext(null,true,true);
- glyphs = font.createGlyphVector(fontRenderContext,text);
- width = (int)glyphs.getLogicalBounds().getWidth() + 4;
- //height = (int)glyphs.getLogicalBounds().getHeight();
-
- LineMetrics lineMetrics = font.getLineMetrics(text,fontRenderContext);
- ascent = lineMetrics.getAscent();
- height = (int)lineMetrics.getHeight();
-
- renderHints = new RenderingHints(
- RenderingHints.KEY_ANTIALIASING,
- RenderingHints.VALUE_ANTIALIAS_ON);
- renderHints.put(RenderingHints.KEY_FRACTIONALMETRICS,
- RenderingHints.VALUE_FRACTIONALMETRICS_ON);
- renderHints.put(RenderingHints.KEY_RENDERING,
- RenderingHints.VALUE_RENDER_QUALITY);
- } //}}}
-
- //{{{ getIconWidth() method
- public int getIconWidth()
- {
- return (int)(rotate == RotatedTextIcon.CW
- || rotate == RotatedTextIcon.CCW
- ? height : width);
- } //}}}
-
- //{{{ getIconHeight() method
- public int getIconHeight()
- {
- return (int)(rotate == RotatedTextIcon.CW
- || rotate == RotatedTextIcon.CCW
- ? width : height);
- } //}}}
-
- //{{{ paintIcon() method
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- Graphics2D g2d = (Graphics2D)g;
- g2d.setFont(font);
- AffineTransform oldTransform = g2d.getTransform();
- RenderingHints oldHints = g2d.getRenderingHints();
-
- g2d.setRenderingHints(renderHints);
- g2d.setColor(c.getForeground());
-
- //{{{ No rotation
- if(rotate == RotatedTextIcon.NONE)
- {
- g2d.drawGlyphVector(glyphs,x + 2,y + ascent);
- } //}}}
- //{{{ Clockwise rotation
- else if(rotate == RotatedTextIcon.CW)
- {
- AffineTransform trans = new AffineTransform();
- trans.concatenate(oldTransform);
- trans.translate(x,y + 2);
- trans.rotate(Math.PI / 2,
- height / 2, width / 2);
- g2d.setTransform(trans);
- g2d.drawGlyphVector(glyphs,(height - width) / 2,
- (width - height) / 2
- + ascent);
- } //}}}
- //{{{ Counterclockwise rotation
- else if(rotate == RotatedTextIcon.CCW)
- {
- AffineTransform trans = new AffineTransform();
- trans.concatenate(oldTransform);
- trans.translate(x,y - 2);
- trans.rotate(Math.PI * 3 / 2,
- height / 2, width / 2);
- g2d.setTransform(trans);
- g2d.drawGlyphVector(glyphs,(height - width) / 2,
- (width - height) / 2
- + ascent);
- } //}}}
-
- g2d.setTransform(oldTransform);
- g2d.setRenderingHints(oldHints);
- } //}}}
-
- //{{{ Private members
- private final int rotate;
- private final Font font;
- private final GlyphVector glyphs;
- private final float width;
- private final float height;
- private final float ascent;
- private final RenderingHints renderHints;
- //}}}
- } //}}}
-
- //{{{ ButtonLayout class
- class ButtonLayout implements LayoutManager
- {
- //{{{ addLayoutComponent() method
- public void addLayoutComponent(String name, Component comp) {} //}}}
-
- //{{{ removeLayoutComponent() method
- public void removeLayoutComponent(Component comp) {} //}}}
-
- //{{{ getWrappedDimension() method
- /**
- * Returns the width or height of wrapped rows or columns.
- */
- int getWrappedDimension(JComponent parent, int dimension)
- {
- Insets insets = parent.getBorder()
- .getBorderInsets(parent);
-
- Component[] comp = parent.getComponents();
- if(comp.length <= 2)
- return 0;
-
- Dimension dim = comp[2].getPreferredSize();
-
- if(position.equals(DockableWindowManagerImpl.TOP)
- || position.equals(DockableWindowManagerImpl.BOTTOM))
- {
- int width = dimension - insets.right;
- Dimension returnValue = preferredLayoutSizeLR(insets, comp, dim, width);
- return returnValue.height;
- }
- else
- {
- Dimension returnValue = preferredLayoutSizeTB(dimension, insets, comp, dim);
- return returnValue.width;
- }
- } //}}}
-
- //{{{ preferredLayoutSize() method
- public Dimension preferredLayoutSize(Container parent)
- {
- Insets insets = ((JComponent)parent).getBorder()
- .getBorderInsets(parent);
-
- Component[] comp = parent.getComponents();
- if(comp.length <= 2)
- {
- // nothing 'cept close box
- return new Dimension(0,0);
- }
-
- Dimension dim = comp[2].getPreferredSize();
-
- if(position.equals(DockableWindowManagerImpl.TOP)
- || position.equals(DockableWindowManagerImpl.BOTTOM))
- {
- int width = parent.getWidth() - insets.right;
- Dimension returnValue = preferredLayoutSizeLR(insets, comp, dim, width);
- return returnValue;
- }
- else
- {
- Dimension returnValue = preferredLayoutSizeTB(parent.getHeight(), insets, comp, dim);
- return returnValue;
- }
- } //}}}
-
- //{{{ minimumLayoutSize() method
- public Dimension minimumLayoutSize(Container parent)
- {
- return preferredLayoutSize(parent);
- } //}}}
-
- //{{{ layoutContainer() method
- public void layoutContainer(Container parent)
- {
- Insets insets = ((JComponent)parent).getBorder()
- .getBorderInsets(parent);
-
- Component[] comp = parent.getComponents();
- if(comp.length <= 2)
- {
- for(int i = 0; i < comp.length; i++)
- {
- comp[i].setVisible(false);
- }
- return;
- }
-
- comp[0].setVisible(true);
- comp[1].setVisible(true);
-
- Dimension dim = comp[2].getPreferredSize();
-
- if(position.equals(DockableWindowManagerImpl.TOP)
- || position.equals(DockableWindowManagerImpl.BOTTOM))
- {
- int width = parent.getWidth() - insets.right;
- int rowHeight = Math.max(dim.height,closeBox.getPreferredSize().width);
- int x = (rowHeight << 1) + insets.left;
- int y = insets.top;
- closeBox.setBounds(insets.left,insets.top,rowHeight,rowHeight);
- menuBtn.setBounds(insets.left + rowHeight,insets.top,rowHeight,rowHeight);
-
- for(int i = 2; i < comp.length; i++)
- {
- int btnWidth = comp[i].getPreferredSize().width;
- if(btnWidth + x > width)
- {
- x = insets.left;
- y += rowHeight;
- }
- comp[i].setBounds(x,y,btnWidth,rowHeight);
- x += btnWidth;
- }
-
- /* if(y + rowHeight != parent.getHeight())
- {
- parent.setSize(
- parent.getWidth(),
- y + rowHeight);
- ((JComponent)parent).revalidate();
- } */
- }
- else
- {
- int height = parent.getHeight() - insets.bottom;
- int colWidth = Math.max(dim.width,closeBox.getPreferredSize().height);
- int x = insets.left;
- int y = (colWidth << 1) + insets.top;
- closeBox.setBounds(insets.left,insets.top,colWidth,colWidth);
- menuBtn.setBounds(insets.left,insets.top + colWidth,colWidth,colWidth);
-
- for(int i = 2; i < comp.length; i++)
- {
- int btnHeight = comp[i].getPreferredSize().height;
- if(btnHeight + y > height)
- {
- x += colWidth;
- y = insets.top;
- }
- comp[i].setBounds(x,y,colWidth,btnHeight);
- y += btnHeight;
- }
-
- /* if(x + colWidth != parent.getWidth())
- {
- parent.setSize(x + colWidth,
- parent.getHeight());
- ((JComponent)parent).revalidate();
- } */
- }
- } //}}}
-
- //{{{ preferredLayoutSizeLR() method
- private Dimension preferredLayoutSizeLR(Insets insets, Component[] comp, Dimension dim, int width)
- {
- int rowHeight = Math.max(dim.height,closeBox.getPreferredSize().width);
- int x = (rowHeight << 1) + insets.left;
- Dimension returnValue = new Dimension(0,rowHeight
- + insets.top + insets.bottom);
-
- for(int i = 2; i < comp.length; i++)
- {
- int btnWidth = comp[i].getPreferredSize().width;
- if(btnWidth + x > width)
- {
- returnValue.height += rowHeight;
- x = insets.left;
- }
-
- x += btnWidth;
- }
- return returnValue;
- } //}}}
-
- //{{{ preferredLayoutSizeTB() method
- private Dimension preferredLayoutSizeTB(int dimension, Insets insets, Component[] comp, Dimension dim)
- {
- int height = dimension - insets.bottom;
- int colWidth = Math.max(dim.width,closeBox.getPreferredSize().height);
- int y = (colWidth << 1) + insets.top;
- Dimension returnValue = new Dimension(colWidth
- + insets.left + insets.right,0);
-
- for(int i = 2; i < comp.length; i++)
- {
- int btnHeight = comp[i].getPreferredSize().height;
- if(btnHeight + y > height)
- {
- returnValue.width += colWidth;
- y = insets.top;
- }
-
- y += btnHeight;
- }
- return returnValue;
- } //}}}
- } //}}}
-
- public void show(String name)
- {
- DockableWindowManagerImpl.Entry entry = null;
- if (name != null)
- {
- wm.showDockableWindow(name);
- wm.hideDockableWindow(name);
- }
- show(entry);
- }
-
- //}}}
-}
+/*
+ * PanelWindowContainer.java - holds dockable windows
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Insets;
+import java.awt.LayoutManager;
+import java.awt.RenderingHints;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.font.LineMetrics;
+import java.awt.geom.AffineTransform;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import javax.swing.AbstractButton;
+import javax.swing.ButtonGroup;
+import javax.swing.Icon;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JToggleButton;
+import javax.swing.UIManager;
+import javax.swing.border.Border;
+import javax.swing.border.EmptyBorder;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+
+import org.gjt.sp.jedit.EditBus;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.OperatingSystem;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.gui.DockableWindowManager.DockingArea;
+import org.gjt.sp.jedit.msg.DockableWindowUpdate;
+import org.gjt.sp.util.StandardUtilities;
+
+/**
+ * A container for dockable windows. This class should never be used
+ * directly.
+ * @author Slava Pestov
+ * @version $Id: PanelWindowContainer.java 16341 2009-10-14 10:05:51Z kpouer $
+ * @since jEdit 4.0pre1
+ */
+public class PanelWindowContainer implements DockableWindowContainer, DockingArea
+{
+ //{{{ PanelWindowContainer constructor
+ public PanelWindowContainer(DockableWindowManagerImpl wm, String position,
+ int dimension)
+ {
+ this.wm = wm;
+ this.position = position;
+
+ //{{{ Button box setup
+ buttonPanel = new JPanel(new ButtonLayout());
+ buttonPanel.setBorder(new EmptyBorder(1,1,1,1));
+
+ closeBox = new JButton(GUIUtilities.loadIcon("closebox.gif"));
+ closeBox.setRequestFocusEnabled(false);
+ closeBox.setToolTipText(jEdit.getProperty("view.docking.close-tooltip"));
+ if(OperatingSystem.isMacOSLF())
+ closeBox.putClientProperty("JButton.buttonType","toolbar");
+
+ closeBox.setMargin(new Insets(0,0,0,0));
+
+ closeBox.addActionListener(new ActionHandler());
+
+ menuBtn = new JButton(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
+ menuBtn.setRequestFocusEnabled(false);
+ menuBtn.setToolTipText(jEdit.getProperty("view.docking.menu-tooltip"));
+ if(OperatingSystem.isMacOSLF())
+ menuBtn.putClientProperty("JButton.buttonType","toolbar");
+
+ menuBtn.setMargin(new Insets(0,0,0,0));
+
+ menuBtn.addMouseListener(new MenuMouseHandler());
+
+ buttonGroup = new ButtonGroup();
+ // JDK 1.4 workaround
+ buttonGroup.add(nullButton = new JToggleButton());
+ //}}}
+
+ dockables = new ArrayList<DockableWindowManagerImpl.Entry>();
+ buttons = new ArrayList<AbstractButton>();
+ dockablePanel = new DockablePanel(this);
+
+ this.dimension = dimension;
+ } //}}}
+
+ //{{{ getDockableWindowManager() method
+ /**
+ * @since jEdit 4.3pre2
+ */
+ public DockableWindowManagerImpl getDockableWindowManager()
+ {
+ return wm;
+ } //}}}
+
+ //{{{ register() method
+ public void register(DockableWindowManagerImpl.Entry entry)
+ {
+ dockables.add(entry);
+
+ //{{{ Create button
+ int rotation;
+ if(position.equals(DockableWindowManagerImpl.TOP)
+ || position.equals(DockableWindowManagerImpl.BOTTOM))
+ rotation = RotatedTextIcon.NONE;
+ else if(position.equals(DockableWindowManagerImpl.LEFT))
+ rotation = RotatedTextIcon.CCW;
+ else if(position.equals(DockableWindowManagerImpl.RIGHT))
+ rotation = RotatedTextIcon.CW;
+ else
+ throw new InternalError("Invalid position: " + position);
+
+ JToggleButton button = new JToggleButton();
+ button.setMargin(new Insets(1,1,1,1));
+ button.setRequestFocusEnabled(false);
+ button.setIcon(new RotatedTextIcon(rotation,button.getFont(),
+ entry.shortTitle()));
+ button.setActionCommand(entry.factory.name);
+ button.addActionListener(new ActionHandler());
+ button.addMouseListener(new MenuMouseHandler());
+ if(OperatingSystem.isMacOSLF())
+ button.putClientProperty("JButton.buttonType","toolbar");
+ //}}}
+
+ buttonGroup.add(button);
+ buttons.add(button);
+ entry.btn = button;
+
+ wm.revalidate();
+ } //}}}
+
+ //{{{ unregister() method
+ public void unregister(DockableWindowManagerImpl.Entry entry)
+ {
+ if(entry.factory.name.equals(mostRecent))
+ mostRecent = null;
+
+ if(entry.btn != null)
+ {
+ buttonPanel.remove(entry.btn);
+ buttons.remove(entry.btn);
+ entry.btn = null;
+ }
+
+ dockables.remove(entry);
+ if(entry.win != null)
+ dockablePanel.remove(entry.win);
+
+ if(current == entry)
+ {
+ current = null;
+ show(current);
+ }
+ else
+ {
+ wm.revalidate();
+ dockablePanel.repaint();
+ buttonPanel.repaint();
+ }
+ } //}}}
+
+ //{{{ remove() method
+ public void remove(DockableWindowManagerImpl.Entry entry)
+ {
+ if(entry.factory.name.equals(mostRecent))
+ mostRecent = null;
+
+ if(entry.win != null)
+ {
+ dockablePanel.remove(entry.win);
+ entry.win = null;
+ }
+
+ if(current == entry)
+ {
+ current = null;
+ show(current);
+ }
+ else
+ {
+ wm.revalidate();
+ dockablePanel.repaint();
+ }
+ } //}}}
+
+ //{{{ showMostRecent() method
+ public void showMostRecent()
+ {
+ if(dockables.isEmpty())
+ {
+ Toolkit.getDefaultToolkit().beep();
+ return;
+ }
+
+ if(mostRecent == null)
+ {
+ mostRecent = dockables.get(0).factory.name;
+ }
+
+ wm.showDockableWindow(mostRecent);
+ } //}}}
+
+ //{{{ show() method
+ public void show(DockableWindowManagerImpl.Entry entry)
+ {
+ if(current == entry)
+ {
+ if(entry != null)
+ {
+ if(entry.win instanceof DefaultFocusComponent)
+ {
+ ((DefaultFocusComponent)entry.win)
+ .focusOnDefaultComponent();
+ }
+ else
+ {
+ entry.win.requestDefaultFocus();
+ }
+ }
+ return;
+ }
+
+ if(entry != null)
+ {
+ if(current == null)
+ {
+ // we didn't have a component previously, so
+ // create a border
+ dockablePanel.setBorder(new DockBorder(position));
+ }
+
+ mostRecent = entry.factory.name;
+ this.current = entry;
+
+ if(entry.win.getParent() != dockablePanel)
+ dockablePanel.add(entry.factory.name,entry.win);
+
+ dockablePanel.showDockable(entry.factory.name);
+
+ entry.btn.setSelected(true);
+
+ if(entry.win instanceof DefaultFocusComponent)
+ {
+ ((DefaultFocusComponent)entry.win)
+ .focusOnDefaultComponent();
+ }
+ else
+ {
+ entry.win.requestDefaultFocus();
+ }
+ }
+ else
+ {
+ if (current != null)
+ {
+
+ Object reason = DockableWindowUpdate.DEACTIVATED;
+ EditBus.send(new DockableWindowUpdate(wm, reason, current.factory.name));
+ }
+ current = null;
+ nullButton.setSelected(true);
+ // removing last component, so remove border
+ dockablePanel.setBorder(null);
+
+ wm.getView().getTextArea().requestFocus();
+ }
+
+ wm.revalidate();
+ dockablePanel.repaint();
+ } //}}}
+
+ //{{{ isVisible() method
+ public boolean isVisible(DockableWindowManagerImpl.Entry entry)
+ {
+ return current == entry;
+ } //}}}
+
+ //{{{ getCurrent() method
+ /**
+ * Returns the name of the dockable in this container.
+ * @since jEdit 4.2pre1
+ */
+ public String getCurrent()
+ {
+ if(current == null)
+ return null;
+ else
+ return current.factory.name;
+ } //}}}
+
+ //{{{ getDimension() method
+ /**
+ * Returns the width or height (depending on position) of the dockable
+ * window container.
+ * @since jEdit 4.2pre1
+ */
+ public int getDimension()
+ {
+ return dimension;
+ } //}}}
+
+ //{{{ getPosition() method
+ /**
+ * @since jEdit 4.3pre2
+ */
+ public String getPosition()
+ {
+ return position;
+ } //}}}
+
+ //{{{ getDockables() method
+ public String[] getDockables()
+ {
+ String[] retVal = new String[dockables.size()];
+ for(int i = 0; i < dockables.size(); i++)
+ {
+ DockableWindowManagerImpl.Entry entry = dockables.get(i);
+ retVal[i] = entry.factory.name;
+ }
+ return retVal;
+ } //}}}
+
+ //{{{ Package-private members
+ static final int SPLITTER_WIDTH = 10;
+ DockablePanel dockablePanel;
+ JPanel buttonPanel;
+
+ //{{{ save() method
+ void save()
+ {
+ jEdit.setIntegerProperty("view.dock." + position + ".dimension",
+ dimension);
+ if(current == null)
+ jEdit.unsetProperty("view.dock." + position + ".last");
+ else
+ {
+ jEdit.setProperty("view.dock." + position + ".last",
+ current.factory.name);
+ }
+ } //}}}
+
+ //{{{ setDimension() method
+ void setDimension(int dimension)
+ {
+ if(dimension > SPLITTER_WIDTH)
+ this.dimension = dimension - SPLITTER_WIDTH;
+ } //}}}
+
+ //{{{ sortDockables() method
+ void sortDockables()
+ {
+ buttonPanel.removeAll();
+ buttonPanel.add(closeBox);
+ buttonPanel.add(menuBtn);
+ Collections.sort(buttons,new DockableWindowCompare());
+ for(int i = 0; i < buttons.size(); i++)
+ {
+ buttonPanel.add(buttons.get(i));
+ }
+ } //}}}
+
+ //{{{ getWrappedDimension() method
+ /**
+ * Returns the width or height of wrapped rows or columns.
+ */
+ int getWrappedDimension(int dimension)
+ {
+ return ((ButtonLayout)buttonPanel.getLayout())
+ .getWrappedDimension(buttonPanel,dimension);
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private final DockableWindowManagerImpl wm;
+ private final String position;
+ private final JButton closeBox;
+ private final JButton menuBtn;
+ private final ButtonGroup buttonGroup;
+ private final JToggleButton nullButton;
+ private int dimension;
+ private final List<DockableWindowManagerImpl.Entry> dockables;
+ private final List<AbstractButton> buttons;
+ private DockableWindowManagerImpl.Entry current;
+ private JPopupMenu popup;
+
+ // remember the most recent dockable
+ private String mostRecent;
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ DockableWindowCompare class
+ static class DockableWindowCompare implements Comparator<AbstractButton>
+ {
+ public int compare(AbstractButton o1, AbstractButton o2)
+ {
+ String name1 = o1.getActionCommand();
+ String name2 = o2.getActionCommand();
+ return StandardUtilities.compareStrings(
+ jEdit.getProperty(name1 + ".title",""),
+ jEdit.getProperty(name2 + ".title",""),
+ true);
+ }
+ } //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(popup != null && popup.isVisible())
+ popup.setVisible(false);
+
+ if(evt.getSource() == closeBox)
+ show((DockableWindowManagerImpl.Entry)null);
+ else
+ {
+ if(wm.isDockableWindowVisible(evt.getActionCommand()))
+ show((DockableWindowManagerImpl.Entry)null);
+ else
+ wm.showDockableWindow(evt.getActionCommand());
+ }
+ }
+ } //}}}
+
+ //{{{ MenuMouseHandler class
+ class MenuMouseHandler extends MouseAdapter
+ {
+ public void mousePressed(MouseEvent evt)
+ {
+ if(popup != null && popup.isVisible())
+ {
+ popup.setVisible(false);
+ return;
+ }
+
+ Component comp = (Component)evt.getSource();
+ String dockable;
+ if(comp instanceof JToggleButton)
+ dockable = ((JToggleButton)comp).getActionCommand();
+ else
+ dockable = getCurrent();
+
+ if(comp == menuBtn || GUIUtilities.isPopupTrigger(evt))
+ {
+ if(dockable == null)
+ {
+ popup = wm.createPopupMenu(PanelWindowContainer.this,null,false);
+ }
+ else
+ {
+ popup = wm.createPopupMenu(PanelWindowContainer.this,dockable,false);
+ }
+
+ int x, y;
+ boolean point;
+ if(comp == menuBtn)
+ {
+ x = 0;
+ y = menuBtn.getHeight();
+ point = false;
+ }
+ else
+ {
+ x = evt.getX();
+ y = evt.getY();
+ point = true;
+ }
+ GUIUtilities.showPopupMenu(popup,
+ comp,x,y,point);
+ }
+ }
+ } //}}}
+
+ //{{{ DockBorder class
+ static class DockBorder implements Border
+ {
+ String position;
+ Insets insets;
+ Color color1;
+ Color color2;
+ Color color3;
+
+ //{{{ DockBorder constructor
+ DockBorder(String position)
+ {
+ this.position = position;
+ insets = new Insets(
+ position.equals(DockableWindowManagerImpl.BOTTOM)
+ ? SPLITTER_WIDTH : 0,
+ position.equals(DockableWindowManagerImpl.RIGHT)
+ ? SPLITTER_WIDTH : 0,
+ position.equals(DockableWindowManagerImpl.TOP)
+ ? SPLITTER_WIDTH : 0,
+ position.equals(DockableWindowManagerImpl.LEFT)
+ ? SPLITTER_WIDTH : 0);
+ } //}}}
+
+ //{{{ paintBorder() method
+ public void paintBorder(Component c, Graphics g,
+ int x, int y, int width, int height)
+ {
+ updateColors();
+
+ if(color1 == null || color2 == null || color3 == null)
+ return;
+
+ if(position.equals(DockableWindowManagerImpl.BOTTOM))
+ paintHorizBorder(g,x,y,width);
+ else if(position.equals(DockableWindowManagerImpl.RIGHT))
+ paintVertBorder(g,x,y,height);
+ else if(position.equals(DockableWindowManagerImpl.TOP))
+ {
+ paintHorizBorder(g,x,y + height
+ - SPLITTER_WIDTH,width);
+ }
+ else if(position.equals(DockableWindowManagerImpl.LEFT))
+ {
+ paintVertBorder(g,x + width
+ - SPLITTER_WIDTH,y,height);
+ }
+ } //}}}
+
+ //{{{ getBorderInsets() method
+ public Insets getBorderInsets(Component c)
+ {
+ return insets;
+ } //}}}
+
+ //{{{ isBorderOpaque() method
+ public boolean isBorderOpaque()
+ {
+ return false;
+ } //}}}
+
+ //{{{ paintHorizBorder() method
+ private void paintHorizBorder(Graphics g, int x, int y, int width)
+ {
+ g.setColor(color3);
+ g.fillRect(x,y,width,SPLITTER_WIDTH);
+
+ for(int i = 0; i < width / 4 - 1; i++)
+ {
+ g.setColor(color1);
+ g.drawLine(x + (i << 2) + 2,y + 3,
+ x + (i << 2) + 2,y + 3);
+ g.setColor(color2);
+ g.drawLine(x + (i << 2) + 3,y + 4,
+ x + (i << 2) + 3,y + 4);
+ g.setColor(color1);
+ g.drawLine(x + (i << 2) + 4,y + 5,
+ x + (i << 2) + 4,y + 5);
+ g.setColor(color2);
+ g.drawLine(x + (i << 2) + 5,y + 6,
+ x + (i << 2) + 5,y + 6);
+ }
+ } //}}}
+
+ //{{{ paintVertBorder() method
+ private void paintVertBorder(Graphics g, int x, int y, int height)
+ {
+ g.setColor(color3);
+ g.fillRect(x,y,SPLITTER_WIDTH,height);
+
+ for(int i = 0; i < height / 4 - 1; i++)
+ {
+ g.setColor(color1);
+ g.drawLine(x + 3,y + (i << 2) + 2,
+ x + 3,y + (i << 2) + 2);
+ g.setColor(color2);
+ g.drawLine(x + 4,y + (i << 2) + 3,
+ x + 4,y + (i << 2) + 3);
+ g.setColor(color1);
+ g.drawLine(x + 5,y + (i << 2) + 4,
+ x + 5,y + (i << 2) + 4);
+ g.setColor(color2);
+ g.drawLine(x + 6,y + (i << 2) + 5,
+ x + 6,y + (i << 2) + 5);
+ }
+ } //}}}
+
+ //{{{ updateColors() method
+ private void updateColors()
+ {
+ if(UIManager.getLookAndFeel() instanceof MetalLookAndFeel)
+ {
+ color1 = MetalLookAndFeel.getControlHighlight();
+ color2 = MetalLookAndFeel.getControlDarkShadow();
+ color3 = MetalLookAndFeel.getControl();
+ }
+ else
+ {
+ color1 = color2 = color3 = null;
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ RotatedTextIcon class
+ public static class RotatedTextIcon implements Icon
+ {
+ public static final int NONE = 0;
+ public static final int CW = 1;
+ public static final int CCW = 2;
+
+ //{{{ RotatedTextIcon constructor
+ public RotatedTextIcon(int rotate, Font font, String text)
+ {
+ this.rotate = rotate;
+ this.font = font;
+
+ FontRenderContext fontRenderContext
+ = new FontRenderContext(null,true,true);
+ glyphs = font.createGlyphVector(fontRenderContext,text);
+ width = (int)glyphs.getLogicalBounds().getWidth() + 4;
+ //height = (int)glyphs.getLogicalBounds().getHeight();
+
+ LineMetrics lineMetrics = font.getLineMetrics(text,fontRenderContext);
+ ascent = lineMetrics.getAscent();
+ height = (int)lineMetrics.getHeight();
+
+ renderHints = new RenderingHints(
+ RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.VALUE_ANTIALIAS_ON);
+ renderHints.put(RenderingHints.KEY_FRACTIONALMETRICS,
+ RenderingHints.VALUE_FRACTIONALMETRICS_ON);
+ renderHints.put(RenderingHints.KEY_RENDERING,
+ RenderingHints.VALUE_RENDER_QUALITY);
+ } //}}}
+
+ //{{{ getIconWidth() method
+ public int getIconWidth()
+ {
+ return (int)(rotate == RotatedTextIcon.CW
+ || rotate == RotatedTextIcon.CCW
+ ? height : width);
+ } //}}}
+
+ //{{{ getIconHeight() method
+ public int getIconHeight()
+ {
+ return (int)(rotate == RotatedTextIcon.CW
+ || rotate == RotatedTextIcon.CCW
+ ? width : height);
+ } //}}}
+
+ //{{{ paintIcon() method
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ Graphics2D g2d = (Graphics2D)g;
+ g2d.setFont(font);
+ AffineTransform oldTransform = g2d.getTransform();
+ RenderingHints oldHints = g2d.getRenderingHints();
+
+ g2d.setRenderingHints(renderHints);
+ g2d.setColor(c.getForeground());
+
+ //{{{ No rotation
+ if(rotate == RotatedTextIcon.NONE)
+ {
+ g2d.drawGlyphVector(glyphs,x + 2,y + ascent);
+ } //}}}
+ //{{{ Clockwise rotation
+ else if(rotate == RotatedTextIcon.CW)
+ {
+ AffineTransform trans = new AffineTransform();
+ trans.concatenate(oldTransform);
+ trans.translate(x,y + 2);
+ trans.rotate(Math.PI / 2,
+ height / 2, width / 2);
+ g2d.setTransform(trans);
+ g2d.drawGlyphVector(glyphs,(height - width) / 2,
+ (width - height) / 2
+ + ascent);
+ } //}}}
+ //{{{ Counterclockwise rotation
+ else if(rotate == RotatedTextIcon.CCW)
+ {
+ AffineTransform trans = new AffineTransform();
+ trans.concatenate(oldTransform);
+ trans.translate(x,y - 2);
+ trans.rotate(Math.PI * 3 / 2,
+ height / 2, width / 2);
+ g2d.setTransform(trans);
+ g2d.drawGlyphVector(glyphs,(height - width) / 2,
+ (width - height) / 2
+ + ascent);
+ } //}}}
+
+ g2d.setTransform(oldTransform);
+ g2d.setRenderingHints(oldHints);
+ } //}}}
+
+ //{{{ Private members
+ private final int rotate;
+ private final Font font;
+ private final GlyphVector glyphs;
+ private final float width;
+ private final float height;
+ private final float ascent;
+ private final RenderingHints renderHints;
+ //}}}
+ } //}}}
+
+ //{{{ ButtonLayout class
+ class ButtonLayout implements LayoutManager
+ {
+ //{{{ addLayoutComponent() method
+ public void addLayoutComponent(String name, Component comp) {} //}}}
+
+ //{{{ removeLayoutComponent() method
+ public void removeLayoutComponent(Component comp) {} //}}}
+
+ //{{{ getWrappedDimension() method
+ /**
+ * Returns the width or height of wrapped rows or columns.
+ */
+ int getWrappedDimension(JComponent parent, int dimension)
+ {
+ Insets insets = parent.getBorder()
+ .getBorderInsets(parent);
+
+ Component[] comp = parent.getComponents();
+ if(comp.length <= 2)
+ return 0;
+
+ Dimension dim = comp[2].getPreferredSize();
+
+ if(position.equals(DockableWindowManagerImpl.TOP)
+ || position.equals(DockableWindowManagerImpl.BOTTOM))
+ {
+ int width = dimension - insets.right;
+ Dimension returnValue = preferredLayoutSizeLR(insets, comp, dim, width);
+ return returnValue.height;
+ }
+ else
+ {
+ Dimension returnValue = preferredLayoutSizeTB(dimension, insets, comp, dim);
+ return returnValue.width;
+ }
+ } //}}}
+
+ //{{{ preferredLayoutSize() method
+ public Dimension preferredLayoutSize(Container parent)
+ {
+ Insets insets = ((JComponent)parent).getBorder()
+ .getBorderInsets(parent);
+
+ Component[] comp = parent.getComponents();
+ if(comp.length <= 2)
+ {
+ // nothing 'cept close box
+ return new Dimension(0,0);
+ }
+
+ Dimension dim = comp[2].getPreferredSize();
+
+ if(position.equals(DockableWindowManagerImpl.TOP)
+ || position.equals(DockableWindowManagerImpl.BOTTOM))
+ {
+ int width = parent.getWidth() - insets.right;
+ Dimension returnValue = preferredLayoutSizeLR(insets, comp, dim, width);
+ return returnValue;
+ }
+ else
+ {
+ Dimension returnValue = preferredLayoutSizeTB(parent.getHeight(), insets, comp, dim);
+ return returnValue;
+ }
+ } //}}}
+
+ //{{{ minimumLayoutSize() method
+ public Dimension minimumLayoutSize(Container parent)
+ {
+ return preferredLayoutSize(parent);
+ } //}}}
+
+ //{{{ layoutContainer() method
+ public void layoutContainer(Container parent)
+ {
+ Insets insets = ((JComponent)parent).getBorder()
+ .getBorderInsets(parent);
+
+ Component[] comp = parent.getComponents();
+ if(comp.length <= 2)
+ {
+ for(int i = 0; i < comp.length; i++)
+ {
+ comp[i].setVisible(false);
+ }
+ return;
+ }
+
+ comp[0].setVisible(true);
+ comp[1].setVisible(true);
+
+ Dimension dim = comp[2].getPreferredSize();
+
+ if(position.equals(DockableWindowManagerImpl.TOP)
+ || position.equals(DockableWindowManagerImpl.BOTTOM))
+ {
+ int width = parent.getWidth() - insets.right;
+ int rowHeight = Math.max(dim.height,closeBox.getPreferredSize().width);
+ int x = (rowHeight << 1) + insets.left;
+ int y = insets.top;
+ closeBox.setBounds(insets.left,insets.top,rowHeight,rowHeight);
+ menuBtn.setBounds(insets.left + rowHeight,insets.top,rowHeight,rowHeight);
+
+ for(int i = 2; i < comp.length; i++)
+ {
+ int btnWidth = comp[i].getPreferredSize().width;
+ if(btnWidth + x > width)
+ {
+ x = insets.left;
+ y += rowHeight;
+ }
+ comp[i].setBounds(x,y,btnWidth,rowHeight);
+ x += btnWidth;
+ }
+
+ /* if(y + rowHeight != parent.getHeight())
+ {
+ parent.setSize(
+ parent.getWidth(),
+ y + rowHeight);
+ ((JComponent)parent).revalidate();
+ } */
+ }
+ else
+ {
+ int height = parent.getHeight() - insets.bottom;
+ int colWidth = Math.max(dim.width,closeBox.getPreferredSize().height);
+ int x = insets.left;
+ int y = (colWidth << 1) + insets.top;
+ closeBox.setBounds(insets.left,insets.top,colWidth,colWidth);
+ menuBtn.setBounds(insets.left,insets.top + colWidth,colWidth,colWidth);
+
+ for(int i = 2; i < comp.length; i++)
+ {
+ int btnHeight = comp[i].getPreferredSize().height;
+ if(btnHeight + y > height)
+ {
+ x += colWidth;
+ y = insets.top;
+ }
+ comp[i].setBounds(x,y,colWidth,btnHeight);
+ y += btnHeight;
+ }
+
+ /* if(x + colWidth != parent.getWidth())
+ {
+ parent.setSize(x + colWidth,
+ parent.getHeight());
+ ((JComponent)parent).revalidate();
+ } */
+ }
+ } //}}}
+
+ //{{{ preferredLayoutSizeLR() method
+ private Dimension preferredLayoutSizeLR(Insets insets, Component[] comp, Dimension dim, int width)
+ {
+ int rowHeight = Math.max(dim.height,closeBox.getPreferredSize().width);
+ int x = (rowHeight << 1) + insets.left;
+ Dimension returnValue = new Dimension(0,rowHeight
+ + insets.top + insets.bottom);
+
+ for(int i = 2; i < comp.length; i++)
+ {
+ int btnWidth = comp[i].getPreferredSize().width;
+ if(btnWidth + x > width)
+ {
+ returnValue.height += rowHeight;
+ x = insets.left;
+ }
+
+ x += btnWidth;
+ }
+ return returnValue;
+ } //}}}
+
+ //{{{ preferredLayoutSizeTB() method
+ private Dimension preferredLayoutSizeTB(int dimension, Insets insets, Component[] comp, Dimension dim)
+ {
+ int height = dimension - insets.bottom;
+ int colWidth = Math.max(dim.width,closeBox.getPreferredSize().height);
+ int y = (colWidth << 1) + insets.top;
+ Dimension returnValue = new Dimension(colWidth
+ + insets.left + insets.right,0);
+
+ for(int i = 2; i < comp.length; i++)
+ {
+ int btnHeight = comp[i].getPreferredSize().height;
+ if(btnHeight + y > height)
+ {
+ returnValue.width += colWidth;
+ y = insets.top;
+ }
+
+ y += btnHeight;
+ }
+ return returnValue;
+ } //}}}
+ } //}}}
+
+ public void show(String name)
+ {
+ DockableWindowManagerImpl.Entry entry = null;
+ if (name != null)
+ {
+ wm.showDockableWindow(name);
+ wm.hideDockableWindow(name);
+ }
+ show(entry);
+ }
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/PasteFromListDialog.java b/jEdit/org/gjt/sp/jedit/gui/PasteFromListDialog.java
index 7454e4d..93f0ed2 100644
--- a/jEdit/org/gjt/sp/jedit/gui/PasteFromListDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/PasteFromListDialog.java
@@ -1,262 +1,262 @@
-/*
- * PasteFromListDialog.java - Paste previous/paste deleted dialog
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.event.*;
-import java.awt.*;
-import java.awt.event.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class PasteFromListDialog extends EnhancedDialog
-{
- //{{{ PasteFromListDialog constructor
- public PasteFromListDialog(String name, View view, MutableListModel model)
- {
- super(view,jEdit.getProperty(name + ".title"),true);
- this.view = view;
- this.listModel = model;
-
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
- JPanel center = new JPanel(new GridLayout(2,1,2,12));
-
- clips = new JList(model);
- clips.setCellRenderer(new Renderer());
- clips.setVisibleRowCount(12);
-
- clips.addMouseListener(new MouseHandler());
- clips.addListSelectionListener(new ListHandler());
-
- insert = new JButton(jEdit.getProperty("common.insert"));
- cancel = new JButton(jEdit.getProperty("common.cancel"));
-
- JLabel label = new JLabel(jEdit.getProperty(name + ".caption"));
- label.setBorder(new EmptyBorder(0,0,6,0));
- content.add(BorderLayout.NORTH,label);
-
- JScrollPane scroller = new JScrollPane(clips);
- scroller.setPreferredSize(new Dimension(500,150));
- center.add(scroller);
-
- clipText = new JTextArea();
- clipText.setEditable(false);
- scroller = new JScrollPane(clipText);
- scroller.setPreferredSize(new Dimension(500,150));
- center.add(scroller);
-
- content.add(center, BorderLayout.CENTER);
-
- JPanel panel = new JPanel();
- panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
- panel.setBorder(new EmptyBorder(12,0,0,0));
- panel.add(Box.createGlue());
- panel.add(insert);
- panel.add(Box.createHorizontalStrut(6));
- panel.add(cancel);
- panel.add(Box.createGlue());
- content.add(panel, BorderLayout.SOUTH);
-
- if(model.getSize() >= 1)
- clips.setSelectedIndex(0);
- updateButtons();
-
- getRootPane().setDefaultButton(insert);
- insert.addActionListener(new ActionHandler());
- cancel.addActionListener(new ActionHandler());
-
- GUIUtilities.requestFocus(this,clips);
-
- pack();
- setLocationRelativeTo(view);
- setVisible(true);
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- Object[] selected = clips.getSelectedValues();
- if(selected == null || selected.length == 0)
- {
- getToolkit().beep();
- return;
- }
-
- String text = getSelectedClipText();
-
- /**
- * For each selected clip, we remove it, then add it back
- * to the model. This has the effect of moving it to the
- * top of the list.
- */
- for(int i = 0; i < selected.length; i++)
- {
- listModel.removeElement(selected[i]);
- listModel.insertElementAt(selected[i],0);
- }
-
- view.getTextArea().setSelectedText(text);
-
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private View view;
- private MutableListModel listModel;
- private JList clips;
- private JTextArea clipText;
- private JButton insert;
- private JButton cancel;
- //}}}
-
- //{{{ getSelectedClipText()
- private String getSelectedClipText()
- {
- Object[] selected = clips.getSelectedValues();
- StringBuilder clip = new StringBuilder();
- for(int i = 0; i < selected.length; i++)
- {
- if(i != 0)
- clip.append('\n');
- clip.append(selected[i]);
- }
- return clip.toString();
- }
- //}}}
-
- //{{{ updateButtons() method
- private void updateButtons()
- {
- int selected = clips.getSelectedIndex();
- insert.setEnabled(selected != -1);
- } //}}}
-
- //{{{ showClipText() method
- private void showClipText()
- {
- Object[] selected = clips.getSelectedValues();
- if(selected == null || selected.length == 0)
- clipText.setText("");
- else
- clipText.setText(getSelectedClipText());
- clipText.setCaretPosition(0);
- }
- //}}}
-
- //}}}
-
- //{{{ Renderer class
- class Renderer extends DefaultListCellRenderer
- {
- String shorten(String item)
- {
- StringBuilder buf = new StringBuilder();
- // workaround for Swing rendering labels starting
- // with <html> using the HTML engine
- if(item.toLowerCase().startsWith("<html>"))
- buf.append(' ');
- boolean ws = true;
- for(int i = 0; i < item.length(); i++)
- {
- char ch = item.charAt(i);
- if(Character.isWhitespace(ch))
- {
- if(ws)
- /* do nothing */;
- else
- {
- buf.append(' ');
- ws = true;
- }
- }
- else
- {
- ws = false;
- buf.append(ch);
- }
- }
-
- if(buf.length() == 0)
- return jEdit.getProperty("paste-from-list.whitespace");
- return buf.toString();
- }
-
- public Component getListCellRendererComponent(
- JList list, Object value, int index,
- boolean isSelected, boolean cellHasFocus)
- {
- super.getListCellRendererComponent(list,value,index,
- isSelected,cellHasFocus);
-
- setText(shorten(value.toString()));
-
- return this;
- }
- } //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == insert)
- ok();
- else if(source == cancel)
- cancel();
- }
- } //}}}
-
- //{{{ ListHandler class
- class ListHandler implements ListSelectionListener
- {
- //{{{ valueChanged() method
- public void valueChanged(ListSelectionEvent evt)
- {
- showClipText();
- updateButtons();
- } //}}}
- } //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- public void mouseClicked(MouseEvent evt)
- {
- if(evt.getClickCount() == 2)
- ok();
- }
- } //}}}
-}
+/*
+ * PasteFromListDialog.java - Paste previous/paste deleted dialog
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.event.*;
+import java.awt.*;
+import java.awt.event.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class PasteFromListDialog extends EnhancedDialog
+{
+ //{{{ PasteFromListDialog constructor
+ public PasteFromListDialog(String name, View view, MutableListModel model)
+ {
+ super(view,jEdit.getProperty(name + ".title"),true);
+ this.view = view;
+ this.listModel = model;
+
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+ JPanel center = new JPanel(new GridLayout(2,1,2,12));
+
+ clips = new JList(model);
+ clips.setCellRenderer(new Renderer());
+ clips.setVisibleRowCount(12);
+
+ clips.addMouseListener(new MouseHandler());
+ clips.addListSelectionListener(new ListHandler());
+
+ insert = new JButton(jEdit.getProperty("common.insert"));
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+
+ JLabel label = new JLabel(jEdit.getProperty(name + ".caption"));
+ label.setBorder(new EmptyBorder(0,0,6,0));
+ content.add(BorderLayout.NORTH,label);
+
+ JScrollPane scroller = new JScrollPane(clips);
+ scroller.setPreferredSize(new Dimension(500,150));
+ center.add(scroller);
+
+ clipText = new JTextArea();
+ clipText.setEditable(false);
+ scroller = new JScrollPane(clipText);
+ scroller.setPreferredSize(new Dimension(500,150));
+ center.add(scroller);
+
+ content.add(center, BorderLayout.CENTER);
+
+ JPanel panel = new JPanel();
+ panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
+ panel.setBorder(new EmptyBorder(12,0,0,0));
+ panel.add(Box.createGlue());
+ panel.add(insert);
+ panel.add(Box.createHorizontalStrut(6));
+ panel.add(cancel);
+ panel.add(Box.createGlue());
+ content.add(panel, BorderLayout.SOUTH);
+
+ if(model.getSize() >= 1)
+ clips.setSelectedIndex(0);
+ updateButtons();
+
+ getRootPane().setDefaultButton(insert);
+ insert.addActionListener(new ActionHandler());
+ cancel.addActionListener(new ActionHandler());
+
+ GUIUtilities.requestFocus(this,clips);
+
+ pack();
+ setLocationRelativeTo(view);
+ setVisible(true);
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ Object[] selected = clips.getSelectedValues();
+ if(selected == null || selected.length == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ String text = getSelectedClipText();
+
+ /**
+ * For each selected clip, we remove it, then add it back
+ * to the model. This has the effect of moving it to the
+ * top of the list.
+ */
+ for(int i = 0; i < selected.length; i++)
+ {
+ listModel.removeElement(selected[i]);
+ listModel.insertElementAt(selected[i],0);
+ }
+
+ view.getTextArea().setSelectedText(text);
+
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private View view;
+ private MutableListModel listModel;
+ private JList clips;
+ private JTextArea clipText;
+ private JButton insert;
+ private JButton cancel;
+ //}}}
+
+ //{{{ getSelectedClipText()
+ private String getSelectedClipText()
+ {
+ Object[] selected = clips.getSelectedValues();
+ StringBuilder clip = new StringBuilder();
+ for(int i = 0; i < selected.length; i++)
+ {
+ if(i != 0)
+ clip.append('\n');
+ clip.append(selected[i]);
+ }
+ return clip.toString();
+ }
+ //}}}
+
+ //{{{ updateButtons() method
+ private void updateButtons()
+ {
+ int selected = clips.getSelectedIndex();
+ insert.setEnabled(selected != -1);
+ } //}}}
+
+ //{{{ showClipText() method
+ private void showClipText()
+ {
+ Object[] selected = clips.getSelectedValues();
+ if(selected == null || selected.length == 0)
+ clipText.setText("");
+ else
+ clipText.setText(getSelectedClipText());
+ clipText.setCaretPosition(0);
+ }
+ //}}}
+
+ //}}}
+
+ //{{{ Renderer class
+ static class Renderer extends DefaultListCellRenderer
+ {
+ String shorten(String item)
+ {
+ StringBuilder buf = new StringBuilder();
+ // workaround for Swing rendering labels starting
+ // with <html> using the HTML engine
+ if(item.toLowerCase().startsWith("<html>"))
+ buf.append(' ');
+ boolean ws = true;
+ for(int i = 0; i < item.length(); i++)
+ {
+ char ch = item.charAt(i);
+ if(Character.isWhitespace(ch))
+ {
+ if(ws)
+ /* do nothing */;
+ else
+ {
+ buf.append(' ');
+ ws = true;
+ }
+ }
+ else
+ {
+ ws = false;
+ buf.append(ch);
+ }
+ }
+
+ if(buf.length() == 0)
+ return jEdit.getProperty("paste-from-list.whitespace");
+ return buf.toString();
+ }
+
+ public Component getListCellRendererComponent(
+ JList list, Object value, int index,
+ boolean isSelected, boolean cellHasFocus)
+ {
+ super.getListCellRendererComponent(list,value,index,
+ isSelected,cellHasFocus);
+
+ setText(shorten(value.toString()));
+
+ return this;
+ }
+ } //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == insert)
+ ok();
+ else if(source == cancel)
+ cancel();
+ }
+ } //}}}
+
+ //{{{ ListHandler class
+ class ListHandler implements ListSelectionListener
+ {
+ //{{{ valueChanged() method
+ public void valueChanged(ListSelectionEvent evt)
+ {
+ showClipText();
+ updateButtons();
+ } //}}}
+ } //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ public void mouseClicked(MouseEvent evt)
+ {
+ if(evt.getClickCount() == 2)
+ ok();
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/PasteSpecialDialog.java b/jEdit/org/gjt/sp/jedit/gui/PasteSpecialDialog.java
new file mode 100644
index 0000000..4ae430d
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/gui/PasteSpecialDialog.java
@@ -0,0 +1,154 @@
+/*
+ * jEdit - Programmer's Text Editor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 jEdit contributors
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+import org.gjt.sp.jedit.Registers;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.datatransfer.JEditDataFlavor;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.textarea.TextArea;
+
+import javax.swing.*;
+import javax.swing.border.EmptyBorder;
+import java.awt.*;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.*;
+import java.util.List;
+
+/**
+ * @author Matthieu Casanova
+ */
+public class PasteSpecialDialog extends EnhancedDialog
+{
+ private static final DataFlavor[] flavors = {DataFlavor.stringFlavor,
+ JEditDataFlavor.jEditRichTextDataFlavor, JEditDataFlavor.html};
+
+ private final TextArea textArea;
+ private final JButton ok;
+
+ private final JButton cancel;
+ private JList flavorList;
+
+ public PasteSpecialDialog(View view, TextArea textArea)
+ {
+ super(view, jEdit.getProperty("paste-special.title"), true);
+ this.textArea = textArea;
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+ Registers.Register register = Registers.getRegister('$');
+ Transferable transferable = register.getTransferable();
+ DataFlavor[] flavors = transferable.getTransferDataFlavors();
+ List<DataFlavor> flavorList = Arrays.asList(flavors);
+ Vector<DataFlavor> supportedFlavors = new Vector<DataFlavor>(this.flavors.length);
+ for (DataFlavor flavor : this.flavors)
+ {
+ if (flavorList.contains(flavor))
+ {
+ supportedFlavors.add(flavor);
+ }
+ }
+ this.flavorList = new JList(supportedFlavors);
+ this.flavorList.setCellRenderer(new DefaultListCellRenderer()
+ {
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
+ {
+ super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+ if (value.equals(DataFlavor.stringFlavor))
+ {
+ setText("Plain text");
+ }
+ else if (value.equals(JEditDataFlavor.jEditRichTextDataFlavor))
+ {
+ setText("jEdit rich text");
+ }
+ else if (value.equals(JEditDataFlavor.html))
+ {
+ setText("html");
+ }
+ return this;
+ }
+ });
+ getContentPane().add(new JScrollPane(this.flavorList));
+
+ //{{{ Buttons
+
+ JPanel buttons = new JPanel();
+ buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
+ buttons.setBorder(new EmptyBorder(12,0,0,0));
+ buttons.add(Box.createGlue());
+
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ ok();
+ }
+ });
+ getRootPane().setDefaultButton(ok);
+ buttons.add(ok);
+
+ buttons.add(Box.createHorizontalStrut(6));
+
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ cancel();
+ }
+ });
+ buttons.add(cancel);
+
+ buttons.add(Box.createGlue());
+ content.add(BorderLayout.SOUTH,buttons);
+
+ //}}}
+
+ pack();
+ setLocationRelativeTo(view);
+ setVisible(true);
+ }
+
+ @Override
+ public void ok()
+ {
+ DataFlavor flavor = (DataFlavor) flavorList.getSelectedValue();
+ if (flavor == null)
+ {
+ flavor = DataFlavor.stringFlavor;
+ }
+ Registers.paste(textArea, '$', flavor);
+ dispose();
+ }
+
+ @Override
+ public void cancel()
+ {
+ dispose();
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/PingPongList.java b/jEdit/org/gjt/sp/jedit/gui/PingPongList.java
new file mode 100644
index 0000000..19f5467
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/gui/PingPongList.java
@@ -0,0 +1,342 @@
+/*
+ * EncodingsOptionPane.java - Encodings options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.gui;
+
+import org.gjt.sp.util.Log;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.4pre1
+ */
+public class PingPongList<E> extends JSplitPane
+{
+ private final MyListModel<E> leftModel;
+ private final MyListModel<E> rightModel;
+ private JList left;
+ private JList right;
+ private JLabel leftLabel;
+ private JLabel rightLabel;
+ private JPanel leftPanel;
+ private JPanel rightPanel;
+
+ public PingPongList(List<E> leftData, List<E> rightData)
+ {
+ this(JSplitPane.HORIZONTAL_SPLIT, leftData, rightData);
+ }
+
+ public PingPongList(int newOrientation, List<E> leftData, List<E> rightData)
+ {
+ super(newOrientation);
+ leftModel = new MyListModel<E>(leftData);
+ left = new JList(leftModel);
+ rightModel = new MyListModel<E>(rightData);
+ right = new JList(rightModel);
+ leftPanel = new JPanel(new BorderLayout());
+ rightPanel = new JPanel(new BorderLayout());
+ JScrollPane leftScroll = new JScrollPane(left);
+ JScrollPane rightScroll = new JScrollPane(right);
+ leftPanel.add(leftScroll);
+ rightPanel.add(rightScroll);
+ setLeftComponent(leftPanel);
+ setRightComponent(rightPanel);
+ left.setDragEnabled(true);
+ right.setDragEnabled(true);
+
+ MyTransferHandler myTransferHandler = new MyTransferHandler();
+ left.setTransferHandler(myTransferHandler);
+ right.setTransferHandler(myTransferHandler);
+ setDividerLocation(0.5);
+ }
+
+ public void setLeftTooltip(String leftTooltip)
+ {
+ left.setToolTipText(leftTooltip);
+ }
+
+ public void setRightTooltip(String rightTooltip)
+ {
+ right.setToolTipText(rightTooltip);
+ }
+
+ public void setLeftTitle(String leftTitle)
+ {
+ if (leftTitle == null)
+ {
+ removeLeftTitle();
+ return;
+ }
+ if (leftLabel == null)
+ {
+ leftLabel = new JLabel();
+ }
+ leftLabel.setText(leftTitle);
+ leftPanel.add(leftLabel, BorderLayout.NORTH);
+ }
+
+ public void setRightTitle(String rightTitle)
+ {
+ if (rightTitle == null)
+ {
+ removeRightTitle();
+ return;
+ }
+ if (rightLabel == null)
+ {
+ rightLabel = new JLabel();
+ }
+ rightLabel.setText(rightTitle);
+ rightPanel.add(rightLabel, BorderLayout.NORTH);
+ }
+
+ public void removeLeftTitle()
+ {
+ if (leftLabel != null)
+ {
+ leftPanel.remove(leftLabel);
+ leftLabel = null;
+ }
+ }
+
+ public void removeRightTitle()
+ {
+ if (rightLabel != null)
+ {
+ rightPanel.remove(rightLabel);
+ rightLabel = null;
+ }
+ }
+
+ public int getLeftSize()
+ {
+ return leftModel.getSize();
+ }
+
+ public int getRightSize()
+ {
+ return rightModel.getSize();
+ }
+
+ public Iterator<E> getLeftDataIterator()
+ {
+ return leftModel.iterator();
+ }
+
+ public Iterator<E> getRightDataIterator()
+ {
+ return rightModel.iterator();
+ }
+
+ public void moveAllToLeft()
+ {
+ leftModel.addAll(rightModel.data);
+ rightModel.clear();
+ }
+
+ public void moveAllToRight()
+ {
+ rightModel.addAll(leftModel.data);
+ leftModel.clear();
+ }
+
+ private static class MyListModel<E> extends AbstractListModel implements Iterable<E>
+ {
+ private List<E> data;
+
+ private MyListModel(List<E> data)
+ {
+ this.data = data;
+ }
+
+ public int getSize()
+ {
+ return data.size();
+ }
+
+ public Object getElementAt(int index)
+ {
+ return data.get(index);
+ }
+
+ public Iterator<E> iterator()
+ {
+ return data.iterator();
+ }
+
+ public void clear()
+ {
+ if (data.isEmpty())
+ return;
+ int i = data.size();
+ data.clear();
+ fireIntervalRemoved(this, 0, i - 1);
+ }
+
+ public void addAll(Collection<E> newData)
+ {
+ int i = data.size();
+ data.addAll(newData);
+ fireIntervalAdded(this, i, i + newData.size() - 1);
+ }
+
+ public void remove(int index)
+ {
+ data.remove(index);
+
+ fireContentsChanged(this, index, index);
+ }
+
+ public void add(int pos, E[] addedDatas)
+ {
+ for (int i = addedDatas.length - 1; i >= 0; i--)
+ data.add(pos, addedDatas[i]);
+
+ fireContentsChanged(this, pos, pos + addedDatas.length - 1);
+ }
+ }
+
+ private class MyTransferHandler extends TransferHandler
+ {
+ private JList sourceList;
+ private int[]indices;
+
+ @Override
+ public int getSourceActions(JComponent c)
+ {
+ return MOVE;
+ }
+
+ @Override
+ public boolean importData(JComponent comp, Transferable t)
+ {
+ try
+ {
+ @SuppressWarnings({"unchecked"})
+ E[] transferData = (E[]) t.getTransferData(MyTransferable.javaListFlavor);
+ JList targetList = (JList) comp;
+ @SuppressWarnings({"unchecked"})
+ MyListModel<E> targetModel = (MyListModel<E>) targetList.getModel();
+ @SuppressWarnings({"unchecked"})
+ MyListModel<E> sourceModel = (MyListModel<E>) sourceList.getModel();
+ int dropLocation = targetList.getSelectedIndex();
+ if(dropLocation == -1)dropLocation=0;
+ targetModel.add(dropLocation, transferData);
+ int dropStart = dropLocation;
+ if (targetList == sourceList)
+ {
+ // we are moving inside the same list
+ for (int i = indices.length - 1; i >= 0; i--)
+ {
+ int index = indices[i];
+ if (indices[i] >= dropLocation)
+ {
+ index += transferData.length;
+ }
+ else
+ {
+ dropStart--;
+ }
+ sourceModel.remove(index);
+ }
+ for (int i = indices.length - 1; i >= 0; i--)
+ {
+ indices[i] = dropStart + i;
+ }
+ }
+ else
+ {
+ // we are moving to another list
+ sourceList.clearSelection();
+ for (int i = indices.length - 1; i >= 0; i--)
+ {
+ sourceModel.remove(indices[i]);
+ indices[i] = dropLocation + i;
+ }
+ }
+ targetList.setSelectedIndices(indices);
+ return true;
+ }
+ catch (UnsupportedFlavorException e)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ catch (IOException e)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ return false;
+ }
+
+ @Override
+ protected Transferable createTransferable(JComponent c)
+ {
+ sourceList = (JList) c;
+ indices = sourceList.getSelectedIndices();
+
+ @SuppressWarnings({"unchecked"})
+ E[] objects = (E[]) sourceList.getSelectedValues();
+ return new MyTransferable<E>(objects);
+ }
+
+ @Override
+ public boolean canImport(JComponent comp, DataFlavor[] transferFlavors)
+ {
+ return comp == left || comp == right;
+ }
+ }
+
+ private static class MyTransferable<E> implements Transferable
+ {
+ public static final DataFlavor javaListFlavor = new DataFlavor(Collection.class, "java.util.Collection");
+
+ private final E[] data;
+
+ private MyTransferable(E[] data)
+ {
+ this.data = data;
+ }
+
+ public DataFlavor[] getTransferDataFlavors()
+ {
+ return new DataFlavor[]{javaListFlavor};
+ }
+
+ public boolean isDataFlavorSupported(DataFlavor flavor)
+ {
+ return flavor.equals(javaListFlavor);
+ }
+
+ public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
+ {
+ return data;
+ }
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/RegisterViewer.java b/jEdit/org/gjt/sp/jedit/gui/RegisterViewer.java
index 6de5713..0db4b15 100644
--- a/jEdit/org/gjt/sp/jedit/gui/RegisterViewer.java
+++ b/jEdit/org/gjt/sp/jedit/gui/RegisterViewer.java
@@ -1,405 +1,406 @@
-/*
- * RegisterViewer.java - Dockable view of register contents
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004, 2005 Nicholas O'Leary
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.Registers.Register;
-import org.gjt.sp.jedit.msg.RegisterChanged;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-//}}}
-
-public class RegisterViewer extends JPanel implements EBComponent, ActionListener,
- DockableWindow
-{
- //{{{ RegisterViewer constructor
- public RegisterViewer(View view, String position)
- {
- super(new BorderLayout());
- this.view = view;
- Box toolBar = new Box(BoxLayout.X_AXIS);
- JLabel label = new JLabel(
- jEdit.getProperty("view-registers.title"));
- label.setBorder(new EmptyBorder(0,0,3,0));
- toolBar.add(label);
-
- toolBar.add(Box.createGlue());
-
- RolloverButton pasteRegister = new RolloverButton(
- GUIUtilities.loadIcon("Paste.png"));
- pasteRegister.setToolTipText(GUIUtilities.prettifyMenuLabel(
- jEdit.getProperty("paste-string-register.label")));
- pasteRegister.addActionListener(this);
- pasteRegister.setActionCommand("paste-string-register");
- toolBar.add(pasteRegister);
-
- RolloverButton clearRegister = new RolloverButton(
- GUIUtilities.loadIcon("Clear.png"));
- clearRegister.setToolTipText(GUIUtilities.prettifyMenuLabel(
- jEdit.getProperty("clear-string-register.label")));
- clearRegister.addActionListener(this);
- clearRegister.setActionCommand("clear-string-register");
- toolBar.add(clearRegister);
-
-
- add(BorderLayout.NORTH,toolBar);
-
- DefaultListModel registerModel = new DefaultListModel();
- registerList = new JList(registerModel);
- registerList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- registerList.setCellRenderer(new Renderer());
- registerList.addListSelectionListener(new ListHandler());
- registerList.addMouseListener(new MouseHandler());
-
- contentTextArea = new JTextArea(10,20);
- contentTextArea.setEditable(true);
- documentHandler = new DocumentHandler();
- //contentTextArea.getDocument().addDocumentListener(documentHandler);
- contentTextArea.addFocusListener(new FocusHandler());
-
- int orientation = JSplitPane.HORIZONTAL_SPLIT;
- if (position.equals(DockableWindowManager.LEFT) ||
- position.equals(DockableWindowManager.RIGHT))
- orientation = JSplitPane.VERTICAL_SPLIT;
-
- add(BorderLayout.CENTER,splitPane = new JSplitPane(orientation,
- jEdit.getBooleanProperty("appearance.continuousLayout"),
- new JScrollPane(registerList),
- new JScrollPane(contentTextArea)));
-
- refreshList();
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- String cmd = evt.getActionCommand();
- if (cmd.equals("paste-string-register"))
- insertRegister();
- else if (cmd.equals("clear-string-register"))
- clearSelectedIndex();
- } //}}}
-
- //{{{ handleMessage
- public void handleMessage(EBMessage msg)
- {
- if (msg instanceof RegisterChanged)
- {
- if (((RegisterChanged)msg).getRegisterName() != '%')
- refreshList();
- }
- else if (msg instanceof PropertiesChanged)
- {
- GUIUtilities.initContinuousLayout(splitPane);
- }
-
- }//}}}
-
- //{{{ addNotify() method
- @Override
- public void addNotify()
- {
- super.addNotify();
- EditBus.addToBus(this);
- } //}}}
-
- //{{{ removeNotify() method
- @Override
- public void removeNotify()
- {
- super.removeNotify();
- EditBus.removeFromBus(this);
- } //}}}
-
- //{{{ move() method
- public void move(String newPosition)
- {
- int orientation = JSplitPane.HORIZONTAL_SPLIT;
- if (newPosition.equals(DockableWindowManager.LEFT) ||
- newPosition.equals(DockableWindowManager.RIGHT))
- orientation = JSplitPane.VERTICAL_SPLIT;
- splitPane.setOrientation(orientation);
- revalidate();
- } //}}}
-
- //{{{ Private members
-
- //{{{ clearSelectedIndex() method
- private void clearSelectedIndex()
- {
- Object o = registerList.getSelectedValue();
- if (o != null && o instanceof Character)
- {
- Registers.clearRegister(((Character)o).charValue());
- refreshList();
- }
- } //}}}
-
- //{{{ Instance variables
- private JList registerList;
- private JTextArea contentTextArea;
- private DocumentHandler documentHandler;
- private View view;
- private boolean editing;
- private JSplitPane splitPane;
- private JPopupMenu popup;
- //}}}
-
- //{{{ refreshList
- private void refreshList()
- {
- DefaultListModel registerModel = (DefaultListModel)registerList.getModel();
- Object o = registerList.getSelectedValue();
- int selected = -1;
- if (o != null && o instanceof Character)
- selected = ((Character)o).charValue();
-
- registerModel.removeAllElements();
- Registers.Register[] registers = Registers.getRegisters();
-
- int index = 0;
- for(int i = 0; i < registers.length; i++)
- {
- Registers.Register reg = registers[i];
- if(reg == null)
- continue;
- if (i == '%')
- continue;
-
- String value = reg.toString();
- if(value == null) // || value.length() == 0)
- continue;
- if (i == selected)
- index = registerModel.size();
- registerModel.addElement(Character.valueOf((char)i));
- }
-
- if(registerModel.getSize() == 0)
- {
- registerModel.addElement(jEdit.getProperty("view-registers.none"));
- registerList.setEnabled(false);
- }
- else
- registerList.setEnabled(true);
- registerList.setSelectedIndex(index);
- } //}}}
-
- //{{{ insertRegister
- private void insertRegister()
- {
- Object o = registerList.getSelectedValue();
- if (o == null || !(o instanceof Character))
- return;
- Registers.Register reg = Registers.getRegister(((Character)o).charValue());
- view.getTextArea().setSelectedText(reg.toString());
- view.getTextArea().requestFocus();
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ Renderer Class
- static class Renderer extends DefaultListCellRenderer
- {
- @Override
- public Component getListCellRendererComponent(
- JList list, Object value, int index,
- boolean isSelected, boolean cellHasFocus)
- {
- super.getListCellRendererComponent(list,value,
- index,isSelected,cellHasFocus);
-
- if(value instanceof Character)
- {
- char name = ((Character)value).charValue();
-
- String label;
-
- if(name == '\n')
- label = "\n";
- else if(name == '\t')
- label = "\t";
- else if(name == '$')
- label = jEdit.getProperty("view-registers.clipboard");
- else if(name == '%')
- label = jEdit.getProperty("view-registers.selection");
- else
- label = String.valueOf(name);
- Register register = Registers.getRegister(name);
- String registerValue;
- if (register == null)
- {
- // The register is not defined anymore, it has been removed before
- // the painting event
- registerValue = jEdit.getProperty("view-registers.undefined");
- }
- else
- {
- registerValue = register.toString();
- if (registerValue.length() > 100)
- registerValue = registerValue.substring(0,100)+"...";
- registerValue = registerValue.replaceAll("\n"," ");
- registerValue = registerValue.replaceAll("\t"," ");
- }
- setText(label + " : " + registerValue);
- }
-
- return this;
-
- }
- } //}}}
-
- //{{{ ListHandler Class
- class ListHandler implements ListSelectionListener
- {
- public void valueChanged(ListSelectionEvent evt)
- {
- Object value = registerList.getSelectedValue();
- if(!(value instanceof Character))
- {
- if (!editing)
- {
- contentTextArea.setText("");
- contentTextArea.setEditable(false);
- }
- return;
- }
-
- char name = ((Character)value).charValue();
-
- Registers.Register reg = Registers.getRegister(name);
- if(reg == null)
- {
- if (!editing)
- {
- contentTextArea.setText("");
- contentTextArea.setEditable(false);
- }
- return;
- }
-
-
- if (!editing)
- {
- contentTextArea.setText(reg.toString());
- contentTextArea.setEditable(true);
- contentTextArea.setCaretPosition(0);
- }
- }
- } //}}}
-
- //{{{ MouseHandler Class
- class MouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- int i = registerList.locationToIndex(evt.getPoint());
- if (i != -1)
- registerList.setSelectedIndex(i);
- if (GUIUtilities.isPopupTrigger(evt))
- {
- if (popup == null)
- {
- popup = new JPopupMenu();
- JMenuItem item = GUIUtilities.loadMenuItem("paste");
- popup.add(item);
- item = new JMenuItem(jEdit.getProperty("clear-string-register.label"));
- item.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- clearSelectedIndex();
- }
- });
- popup.add(item);
- }
- GUIUtilities.showPopupMenu(popup, registerList, evt.getX(), evt.getY(), false);
- }
- else if (evt.getClickCount() % 2 == 0)
- insertRegister();
- }
- } //}}}
-
- //{{{ DocumentHandler Class
- class DocumentHandler implements DocumentListener
- {
- public void changedUpdate(DocumentEvent e)
- {
- updateRegisterSafely();
- }
-
- public void insertUpdate(DocumentEvent e)
- {
- updateRegisterSafely();
- }
-
- public void removeUpdate(DocumentEvent e)
- {
- updateRegisterSafely();
- }
-
- private void updateRegisterSafely()
- {
- try
- {
- editing = true;
- updateRegister();
- }
- finally
- {
- editing = false;
- }
- }
-
- private void updateRegister()
- {
- Object value = registerList.getSelectedValue();
- if(!(value instanceof Character))
- return;
- char name = ((Character)value).charValue();
- Registers.setRegister(name,contentTextArea.getText());
- }
- } //}}}
-
- //{{{ FocusHandler Class
- class FocusHandler implements FocusListener
- {
- public void focusGained(FocusEvent e)
- {
- contentTextArea.getDocument().addDocumentListener(documentHandler);
- }
- public void focusLost(FocusEvent e)
- {
- contentTextArea.getDocument().removeDocumentListener(documentHandler);
- }
- }//}}}
-
- //}}}
-}
+/*
+ * RegisterViewer.java - Dockable view of register contents
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004, 2005 Nicholas O'Leary
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.Registers.Register;
+import org.gjt.sp.jedit.msg.RegisterChanged;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+//}}}
+
+public class RegisterViewer extends JPanel implements ActionListener,
+ DockableWindow
+{
+ //{{{ RegisterViewer constructor
+ public RegisterViewer(View view, String position)
+ {
+ super(new BorderLayout());
+ this.view = view;
+ Box toolBar = new Box(BoxLayout.X_AXIS);
+ JLabel label = new JLabel(
+ jEdit.getProperty("view-registers.title"));
+ label.setBorder(new EmptyBorder(0,0,3,0));
+ toolBar.add(label);
+
+ toolBar.add(Box.createGlue());
+
+ RolloverButton pasteRegister = new RolloverButton(
+ GUIUtilities.loadIcon("Paste.png"));
+ pasteRegister.setToolTipText(GUIUtilities.prettifyMenuLabel(
+ jEdit.getProperty("paste-string-register.label")));
+ pasteRegister.addActionListener(this);
+ pasteRegister.setActionCommand("paste-string-register");
+ toolBar.add(pasteRegister);
+
+ RolloverButton clearRegister = new RolloverButton(
+ GUIUtilities.loadIcon("Clear.png"));
+ clearRegister.setToolTipText(GUIUtilities.prettifyMenuLabel(
+ jEdit.getProperty("clear-string-register.label")));
+ clearRegister.addActionListener(this);
+ clearRegister.setActionCommand("clear-string-register");
+ toolBar.add(clearRegister);
+
+
+ add(BorderLayout.NORTH,toolBar);
+
+ DefaultListModel registerModel = new DefaultListModel();
+ registerList = new JList(registerModel);
+ registerList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ registerList.setCellRenderer(new Renderer());
+ registerList.addListSelectionListener(new ListHandler());
+ registerList.addMouseListener(new MouseHandler());
+
+ contentTextArea = new JTextArea(10,20);
+ contentTextArea.setEditable(true);
+ documentHandler = new DocumentHandler();
+ //contentTextArea.getDocument().addDocumentListener(documentHandler);
+ contentTextArea.addFocusListener(new FocusHandler());
+
+ int orientation = JSplitPane.HORIZONTAL_SPLIT;
+ if (position.equals(DockableWindowManager.LEFT) ||
+ position.equals(DockableWindowManager.RIGHT))
+ orientation = JSplitPane.VERTICAL_SPLIT;
+
+ add(BorderLayout.CENTER,splitPane = new JSplitPane(orientation,
+ jEdit.getBooleanProperty("appearance.continuousLayout"),
+ new JScrollPane(registerList),
+ new JScrollPane(contentTextArea)));
+
+ refreshList();
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ String cmd = evt.getActionCommand();
+ if (cmd.equals("paste-string-register"))
+ insertRegister();
+ else if (cmd.equals("clear-string-register"))
+ clearSelectedIndex();
+ } //}}}
+
+ //{{{ handleRegisterChanged() method
+ @EBHandler
+ public void handleRegisterChanged(RegisterChanged msg)
+ {
+ if (msg.getRegisterName() != '%')
+ refreshList();
+ } //}}}
+
+ //{{{ handlePropertiesChanged
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
+ {
+ GUIUtilities.initContinuousLayout(splitPane);
+ } //}}}
+
+ //{{{ addNotify() method
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ EditBus.addToBus(this);
+ } //}}}
+
+ //{{{ removeNotify() method
+ @Override
+ public void removeNotify()
+ {
+ super.removeNotify();
+ EditBus.removeFromBus(this);
+ } //}}}
+
+ //{{{ move() method
+ public void move(String newPosition)
+ {
+ int orientation = JSplitPane.HORIZONTAL_SPLIT;
+ if (newPosition.equals(DockableWindowManager.LEFT) ||
+ newPosition.equals(DockableWindowManager.RIGHT))
+ orientation = JSplitPane.VERTICAL_SPLIT;
+ splitPane.setOrientation(orientation);
+ revalidate();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ clearSelectedIndex() method
+ private void clearSelectedIndex()
+ {
+ Object o = registerList.getSelectedValue();
+ if (o != null && o instanceof Character)
+ {
+ Registers.clearRegister(((Character)o).charValue());
+ refreshList();
+ }
+ } //}}}
+
+ //{{{ Instance variables
+ private JList registerList;
+ private JTextArea contentTextArea;
+ private DocumentHandler documentHandler;
+ private View view;
+ private boolean editing;
+ private JSplitPane splitPane;
+ private JPopupMenu popup;
+ //}}}
+
+ //{{{ refreshList
+ private void refreshList()
+ {
+ DefaultListModel registerModel = (DefaultListModel)registerList.getModel();
+ Object o = registerList.getSelectedValue();
+ int selected = -1;
+ if (o != null && o instanceof Character)
+ selected = ((Character)o).charValue();
+
+ registerModel.removeAllElements();
+ Registers.Register[] registers = Registers.getRegisters();
+
+ int index = 0;
+ for(int i = 0; i < registers.length; i++)
+ {
+ Registers.Register reg = registers[i];
+ if(reg == null)
+ continue;
+ if (i == '%')
+ continue;
+
+ String value = reg.toString();
+ if(value == null) // || value.length() == 0)
+ continue;
+ if (i == selected)
+ index = registerModel.size();
+ registerModel.addElement(Character.valueOf((char)i));
+ }
+
+ if(registerModel.getSize() == 0)
+ {
+ registerModel.addElement(jEdit.getProperty("view-registers.none"));
+ registerList.setEnabled(false);
+ }
+ else
+ registerList.setEnabled(true);
+ registerList.setSelectedIndex(index);
+ } //}}}
+
+ //{{{ insertRegister
+ private void insertRegister()
+ {
+ Object o = registerList.getSelectedValue();
+ if (o == null || !(o instanceof Character))
+ return;
+ Registers.Register reg = Registers.getRegister(((Character)o).charValue());
+ view.getTextArea().setSelectedText(reg.toString());
+ view.getTextArea().requestFocus();
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ Renderer Class
+ static class Renderer extends DefaultListCellRenderer
+ {
+ @Override
+ public Component getListCellRendererComponent(
+ JList list, Object value, int index,
+ boolean isSelected, boolean cellHasFocus)
+ {
+ super.getListCellRendererComponent(list,value,
+ index,isSelected,cellHasFocus);
+
+ if(value instanceof Character)
+ {
+ char name = ((Character)value).charValue();
+
+ String label;
+
+ if(name == '\n')
+ label = "\n";
+ else if(name == '\t')
+ label = "\t";
+ else if(name == '$')
+ label = jEdit.getProperty("view-registers.clipboard");
+ else if(name == '%')
+ label = jEdit.getProperty("view-registers.selection");
+ else
+ label = String.valueOf(name);
+ Register register = Registers.getRegister(name);
+ String registerValue;
+ if (register == null)
+ {
+ // The register is not defined anymore, it has been removed before
+ // the painting event
+ registerValue = jEdit.getProperty("view-registers.undefined");
+ }
+ else
+ {
+ registerValue = register.toString();
+ if (registerValue.length() > 100)
+ registerValue = registerValue.substring(0,100)+"...";
+ registerValue = registerValue.replaceAll("\n"," ");
+ registerValue = registerValue.replaceAll("\t"," ");
+ }
+ setText(label + " : " + registerValue);
+ }
+
+ return this;
+
+ }
+ } //}}}
+
+ //{{{ ListHandler Class
+ class ListHandler implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent evt)
+ {
+ Object value = registerList.getSelectedValue();
+ if(!(value instanceof Character))
+ {
+ if (!editing)
+ {
+ contentTextArea.setText("");
+ contentTextArea.setEditable(false);
+ }
+ return;
+ }
+
+ char name = ((Character)value).charValue();
+
+ Registers.Register reg = Registers.getRegister(name);
+ if(reg == null)
+ {
+ if (!editing)
+ {
+ contentTextArea.setText("");
+ contentTextArea.setEditable(false);
+ }
+ return;
+ }
+
+
+ if (!editing)
+ {
+ contentTextArea.setText(reg.toString());
+ contentTextArea.setEditable(true);
+ contentTextArea.setCaretPosition(0);
+ }
+ }
+ } //}}}
+
+ //{{{ MouseHandler Class
+ class MouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ int i = registerList.locationToIndex(evt.getPoint());
+ if (i != -1)
+ registerList.setSelectedIndex(i);
+ if (GUIUtilities.isPopupTrigger(evt))
+ {
+ if (popup == null)
+ {
+ popup = new JPopupMenu();
+ JMenuItem item = GUIUtilities.loadMenuItem("paste");
+ popup.add(item);
+ item = new JMenuItem(jEdit.getProperty("clear-string-register.label"));
+ item.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ clearSelectedIndex();
+ }
+ });
+ popup.add(item);
+ }
+ GUIUtilities.showPopupMenu(popup, registerList, evt.getX(), evt.getY(), false);
+ }
+ else if (evt.getClickCount() % 2 == 0)
+ insertRegister();
+ }
+ } //}}}
+
+ //{{{ DocumentHandler Class
+ class DocumentHandler implements DocumentListener
+ {
+ public void changedUpdate(DocumentEvent e)
+ {
+ updateRegisterSafely();
+ }
+
+ public void insertUpdate(DocumentEvent e)
+ {
+ updateRegisterSafely();
+ }
+
+ public void removeUpdate(DocumentEvent e)
+ {
+ updateRegisterSafely();
+ }
+
+ private void updateRegisterSafely()
+ {
+ try
+ {
+ editing = true;
+ updateRegister();
+ }
+ finally
+ {
+ editing = false;
+ }
+ }
+
+ private void updateRegister()
+ {
+ Object value = registerList.getSelectedValue();
+ if(!(value instanceof Character))
+ return;
+ char name = ((Character)value).charValue();
+ Registers.setRegister(name,contentTextArea.getText());
+ }
+ } //}}}
+
+ //{{{ FocusHandler Class
+ class FocusHandler implements FocusListener
+ {
+ public void focusGained(FocusEvent e)
+ {
+ contentTextArea.getDocument().addDocumentListener(documentHandler);
+ }
+ public void focusLost(FocusEvent e)
+ {
+ contentTextArea.getDocument().removeDocumentListener(documentHandler);
+ }
+ }//}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/RolloverButton.java b/jEdit/org/gjt/sp/jedit/gui/RolloverButton.java
index 4e5f08c..a8490ef 100644
--- a/jEdit/org/gjt/sp/jedit/gui/RolloverButton.java
+++ b/jEdit/org/gjt/sp/jedit/gui/RolloverButton.java
@@ -1,155 +1,155 @@
-/*
- * RolloverButton.java - Class for buttons that implement rollovers
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Kris Kopicki
- * Portions copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.plaf.basic.BasicButtonUI;
-import javax.swing.plaf.basic.BasicBorders.ButtonBorder;
-import org.gjt.sp.jedit.OperatingSystem;
-
-//}}}
-
-/**
- * If you wish to have rollovers on your buttons, use this class.
- *
- * Unlike the Swing rollover support, this class works outside of
- * <code>JToolBar</code>s, and does not require undocumented client
- * property hacks or JDK1.4-specific API calls.<p>
- *
- * Note: You should not call <code>setBorder()</code> on your buttons,
- * as they probably won't work properly.
- * @version $Id: RolloverButton.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class RolloverButton extends JButton
-{
- //{{{ RolloverButton constructor
- /**
- * Setup the border (invisible initially)
- */
- public RolloverButton()
- {
- //setContentAreaFilled(true);
- addMouseListener(new MouseOverHandler());
- } //}}}
-
- //{{{ RolloverButton constructor
- /**
- * Setup the border (invisible initially)
- *
- * @param icon the icon of this button
- */
- public RolloverButton(Icon icon)
- {
- this();
-
- setIcon(icon);
- } //}}}
-
- //{{{ updateUI() method
- public void updateUI()
- {
- super.updateUI();
- //setBorder(originalBorder);
- setBorderPainted(false);
- setRequestFocusEnabled(false);
- setMargin(new Insets(1,1,1,1));
- } //}}}
-
- //{{{ setEnabled() method
- public void setEnabled(boolean b)
- {
- super.setEnabled(b);
- setBorderPainted(false);
- repaint();
- } //}}}
-
- //{{{ setBorderPainted() method
- public void setBorderPainted(boolean b)
- {
- try
- {
- revalidateBlocked = true;
- super.setBorderPainted(b);
- setContentAreaFilled(b);
- }
- finally
- {
- revalidateBlocked = false;
- }
- } //}}}
-
- //{{{ revalidate() method
- /**
- * We block calls to revalidate() from a setBorderPainted(), for
- * performance reasons.
- */
- public void revalidate()
- {
- if(!revalidateBlocked)
- super.revalidate();
- } //}}}
-
- //{{{ paint() method
- public void paint(Graphics g)
- {
- if(isEnabled())
- super.paint(g);
- else
- {
- Graphics2D g2 = (Graphics2D)g;
- g2.setComposite(c);
- super.paint(g2);
- }
- } //}}}
-
- //{{{ Private members
- private static final AlphaComposite c = AlphaComposite.getInstance(
- AlphaComposite.SRC_OVER, 0.5f);
-
- private boolean revalidateBlocked;
-
- //{{{ MouseHandler class
- /**
- * Make the border visible/invisible on rollovers
- */
- class MouseOverHandler extends MouseAdapter
- {
- public void mouseEntered(MouseEvent e)
- {
- setContentAreaFilled(true);
- setBorderPainted(isEnabled());
- }
-
- public void mouseExited(MouseEvent e)
- {
- setContentAreaFilled(false);
- setBorderPainted(false);
- }
- } //}}}
- //}}}
-}
+/*
+ * RolloverButton.java - Class for buttons that implement rollovers
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Kris Kopicki
+ * Portions copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.plaf.basic.BasicButtonUI;
+import javax.swing.plaf.basic.BasicBorders.ButtonBorder;
+import org.gjt.sp.jedit.OperatingSystem;
+
+//}}}
+
+/**
+ * If you wish to have rollovers on your buttons, use this class.
+ *
+ * Unlike the Swing rollover support, this class works outside of
+ * <code>JToolBar</code>s, and does not require undocumented client
+ * property hacks or JDK1.4-specific API calls.<p>
+ *
+ * Note: You should not call <code>setBorder()</code> on your buttons,
+ * as they probably won't work properly.
+ * @version $Id: RolloverButton.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class RolloverButton extends JButton
+{
+ //{{{ RolloverButton constructor
+ /**
+ * Setup the border (invisible initially)
+ */
+ public RolloverButton()
+ {
+ //setContentAreaFilled(true);
+ addMouseListener(new MouseOverHandler());
+ } //}}}
+
+ //{{{ RolloverButton constructor
+ /**
+ * Setup the border (invisible initially)
+ *
+ * @param icon the icon of this button
+ */
+ public RolloverButton(Icon icon)
+ {
+ this();
+
+ setIcon(icon);
+ } //}}}
+
+ //{{{ updateUI() method
+ public void updateUI()
+ {
+ super.updateUI();
+ //setBorder(originalBorder);
+ setBorderPainted(false);
+ setRequestFocusEnabled(false);
+ setMargin(new Insets(1,1,1,1));
+ } //}}}
+
+ //{{{ setEnabled() method
+ public void setEnabled(boolean b)
+ {
+ super.setEnabled(b);
+ setBorderPainted(false);
+ repaint();
+ } //}}}
+
+ //{{{ setBorderPainted() method
+ public void setBorderPainted(boolean b)
+ {
+ try
+ {
+ revalidateBlocked = true;
+ super.setBorderPainted(b);
+ setContentAreaFilled(b);
+ }
+ finally
+ {
+ revalidateBlocked = false;
+ }
+ } //}}}
+
+ //{{{ revalidate() method
+ /**
+ * We block calls to revalidate() from a setBorderPainted(), for
+ * performance reasons.
+ */
+ public void revalidate()
+ {
+ if(!revalidateBlocked)
+ super.revalidate();
+ } //}}}
+
+ //{{{ paint() method
+ public void paint(Graphics g)
+ {
+ if(isEnabled())
+ super.paint(g);
+ else
+ {
+ Graphics2D g2 = (Graphics2D)g;
+ g2.setComposite(c);
+ super.paint(g2);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private static final AlphaComposite c = AlphaComposite.getInstance(
+ AlphaComposite.SRC_OVER, 0.5f);
+
+ private boolean revalidateBlocked;
+
+ //{{{ MouseHandler class
+ /**
+ * Make the border visible/invisible on rollovers
+ */
+ class MouseOverHandler extends MouseAdapter
+ {
+ public void mouseEntered(MouseEvent e)
+ {
+ setContentAreaFilled(true);
+ setBorderPainted(isEnabled());
+ }
+
+ public void mouseExited(MouseEvent e)
+ {
+ setContentAreaFilled(false);
+ setBorderPainted(false);
+ }
+ } //}}}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/SelectLineRange.java b/jEdit/org/gjt/sp/jedit/gui/SelectLineRange.java
index 7378986..68fe3e4 100644
--- a/jEdit/org/gjt/sp/jedit/gui/SelectLineRange.java
+++ b/jEdit/org/gjt/sp/jedit/gui/SelectLineRange.java
@@ -1,184 +1,184 @@
-/*
- * SelectLineRange.java - Selects a range of lines
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.border.*;
-import java.awt.*;
-import java.awt.event.*;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class SelectLineRange extends EnhancedDialog implements ActionListener
-{
- //{{{ SelectLineRange constructor
- public SelectLineRange(View view)
- {
- super(view,jEdit.getProperty("selectlinerange.title"),true);
- this.view = view;
-
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,0));
- setContentPane(content);
-
- JLabel label = new JLabel(jEdit.getProperty(
- "selectlinerange.caption"));
- label.setBorder(new EmptyBorder(0,0,6,12));
- content.add(BorderLayout.NORTH,label);
-
- JPanel panel = createFieldPanel();
-
- content.add(BorderLayout.CENTER,panel);
-
- panel = new JPanel();
- panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
- panel.setBorder(new EmptyBorder(6,0,0,12));
- panel.add(Box.createGlue());
- panel.add(Box.createGlue());
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(this);
- getRootPane().setDefaultButton(ok);
- panel.add(ok);
- panel.add(Box.createHorizontalStrut(6));
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(this);
- panel.add(cancel);
- panel.add(Box.createGlue());
-
- content.add(panel,BorderLayout.SOUTH);
-
- GUIUtilities.requestFocus(this,startField);
-
- pack();
- setLocationRelativeTo(view);
- setVisible(true);
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- int startLine;
- int endLine;
-
- try
- {
- startLine = Integer.parseInt(startField.getText()) - 1;
- endLine = Integer.parseInt(endField.getText()) - 1;
- }
- catch(NumberFormatException nf)
- {
- getToolkit().beep();
- return;
- }
-
- Buffer buffer = view.getBuffer();
-
- if(startLine < 0 || endLine >= buffer.getLineCount()
- || startLine > endLine)
- {
- getToolkit().beep();
- return;
- }
-
- JEditTextArea textArea = view.getTextArea();
- Selection s = new Selection.Range(
- buffer.getLineStartOffset(startLine),
- buffer.getLineEndOffset(endLine) - 1);
- if(textArea.isMultipleSelectionEnabled())
- textArea.addToSelection(s);
- else
- textArea.setSelection(s);
- textArea.moveCaretPosition(buffer.getLineEndOffset(endLine) - 1);
-
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == ok)
- ok();
- else if(source == cancel)
- cancel();
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private View view;
- private JTextField startField;
- private JTextField endField;
- private JButton ok;
- private JButton cancel;
- //}}}
-
- //{{{ createFieldPanel() method
- private JPanel createFieldPanel()
- {
- GridBagLayout layout = new GridBagLayout();
- JPanel panel = new JPanel(layout);
-
- GridBagConstraints cons = new GridBagConstraints();
- cons.insets = new Insets(0,0,6,12);
- cons.gridwidth = cons.gridheight = 1;
- cons.gridx = cons.gridy = 0;
- cons.fill = GridBagConstraints.BOTH;
- JLabel label = new JLabel(jEdit.getProperty("selectlinerange.start"),
- SwingConstants.RIGHT);
- layout.setConstraints(label,cons);
- panel.add(label);
-
- startField = new JTextField(10);
- cons.gridx = 1;
- cons.weightx = 1.0f;
- layout.setConstraints(startField,cons);
- panel.add(startField);
-
- label = new JLabel(jEdit.getProperty("selectlinerange.end"),
- SwingConstants.RIGHT);
- cons.gridx = 0;
- cons.weightx = 0.0f;
- cons.gridy = 1;
- layout.setConstraints(label,cons);
- panel.add(label);
-
- endField = new JTextField(10);
- cons.gridx = 1;
- cons.weightx = 1.0f;
- layout.setConstraints(endField,cons);
- panel.add(endField);
-
- return panel;
- } //}}}
-
- //}}}
-}
+/*
+ * SelectLineRange.java - Selects a range of lines
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.border.*;
+import java.awt.*;
+import java.awt.event.*;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class SelectLineRange extends EnhancedDialog implements ActionListener
+{
+ //{{{ SelectLineRange constructor
+ public SelectLineRange(View view)
+ {
+ super(view,jEdit.getProperty("selectlinerange.title"),true);
+ this.view = view;
+
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,0));
+ setContentPane(content);
+
+ JLabel label = new JLabel(jEdit.getProperty(
+ "selectlinerange.caption"));
+ label.setBorder(new EmptyBorder(0,0,6,12));
+ content.add(BorderLayout.NORTH,label);
+
+ JPanel panel = createFieldPanel();
+
+ content.add(BorderLayout.CENTER,panel);
+
+ panel = new JPanel();
+ panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
+ panel.setBorder(new EmptyBorder(6,0,0,12));
+ panel.add(Box.createGlue());
+ panel.add(Box.createGlue());
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(this);
+ getRootPane().setDefaultButton(ok);
+ panel.add(ok);
+ panel.add(Box.createHorizontalStrut(6));
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(this);
+ panel.add(cancel);
+ panel.add(Box.createGlue());
+
+ content.add(panel,BorderLayout.SOUTH);
+
+ GUIUtilities.requestFocus(this,startField);
+
+ pack();
+ setLocationRelativeTo(view);
+ setVisible(true);
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ int startLine;
+ int endLine;
+
+ try
+ {
+ startLine = Integer.parseInt(startField.getText()) - 1;
+ endLine = Integer.parseInt(endField.getText()) - 1;
+ }
+ catch(NumberFormatException nf)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ Buffer buffer = view.getBuffer();
+
+ if(startLine < 0 || endLine >= buffer.getLineCount()
+ || startLine > endLine)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ JEditTextArea textArea = view.getTextArea();
+ Selection s = new Selection.Range(
+ buffer.getLineStartOffset(startLine),
+ buffer.getLineEndOffset(endLine) - 1);
+ if(textArea.isMultipleSelectionEnabled())
+ textArea.addToSelection(s);
+ else
+ textArea.setSelection(s);
+ textArea.moveCaretPosition(buffer.getLineEndOffset(endLine) - 1);
+
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == ok)
+ ok();
+ else if(source == cancel)
+ cancel();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private View view;
+ private JTextField startField;
+ private JTextField endField;
+ private JButton ok;
+ private JButton cancel;
+ //}}}
+
+ //{{{ createFieldPanel() method
+ private JPanel createFieldPanel()
+ {
+ GridBagLayout layout = new GridBagLayout();
+ JPanel panel = new JPanel(layout);
+
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.insets = new Insets(0,0,6,12);
+ cons.gridwidth = cons.gridheight = 1;
+ cons.gridx = cons.gridy = 0;
+ cons.fill = GridBagConstraints.BOTH;
+ JLabel label = new JLabel(jEdit.getProperty("selectlinerange.start"),
+ SwingConstants.RIGHT);
+ layout.setConstraints(label,cons);
+ panel.add(label);
+
+ startField = new JTextField(10);
+ cons.gridx = 1;
+ cons.weightx = 1.0f;
+ layout.setConstraints(startField,cons);
+ panel.add(startField);
+
+ label = new JLabel(jEdit.getProperty("selectlinerange.end"),
+ SwingConstants.RIGHT);
+ cons.gridx = 0;
+ cons.weightx = 0.0f;
+ cons.gridy = 1;
+ layout.setConstraints(label,cons);
+ panel.add(label);
+
+ endField = new JTextField(10);
+ cons.gridx = 1;
+ cons.weightx = 1.0f;
+ layout.setConstraints(endField,cons);
+ panel.add(endField);
+
+ return panel;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/ShortcutPrefixActiveEvent.java b/jEdit/org/gjt/sp/jedit/gui/ShortcutPrefixActiveEvent.java
index e6cf32d..d8fd61d 100644
--- a/jEdit/org/gjt/sp/jedit/gui/ShortcutPrefixActiveEvent.java
+++ b/jEdit/org/gjt/sp/jedit/gui/ShortcutPrefixActiveEvent.java
@@ -1,144 +1,144 @@
-/*
- * ShortcutPrefixActiveEvent.java - Event fired when jEdit starts and stops
- * listening for shortcut completions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Jeffrey Hoyt
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.util.Hashtable;
-
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-import javax.swing.event.EventListenerList;
-
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Description of the Class
- *
- * @author jchoyt
- * created December 17, 2005
- */
-public class ShortcutPrefixActiveEvent extends ChangeEvent
-{
-
- /**
- * Description of the Field
- */
- protected Hashtable bindings;
- /**
- * Description of the Field
- */
- protected boolean active;
-
- /**
- * Description of the Field
- */
- protected static EventListenerList listenerList = new EventListenerList();
-
- //{{{ Constructor
- /**
- * Constructor for the ShortcutPrefixActiveEvent object
- *
- * @param bindings Description of the Parameter
- * @param active Description of the Parameter
- */
- public ShortcutPrefixActiveEvent(Hashtable bindings, boolean active)
- {
- super(new Object());
- this.bindings = bindings;
- this.active = active;
- } //}}}
-
- //{{{ addChangeEventListener() method
- /**
- * Adds a feature to the ChangeEventListener attribute of the
- * ShortcutPrefixActiveEvent class
- *
- * @param l The feature to be added to the ChangeEventListener attribute
- */
- public static void addChangeEventListener(ChangeListener l)
- {
- listenerList.add(ChangeListener.class, l);
- Log.log(Log.DEBUG, ShortcutPrefixActiveEvent.class, "Listener added. " + listenerList.getListenerList().length + " left.");
- }//}}}
-
- //{{{ removeChangeEventListener() method
- /**
- * Description of the Method
- *
- * @param l Description of the Parameter
- */
- public static void removeChangeEventListener(ChangeListener l)
- {
- listenerList.remove(ChangeListener.class, l);
- Log.log(Log.DEBUG, ShortcutPrefixActiveEvent.class, "Listener removed. " + listenerList.getListenerList().length + " left.");
- }//}}}
-
- //{{{ firePrefixStateChange() method
- /**
- * Description of the Method
- *
- * @param bindings Description of the Parameter
- * @param listeningForShortcutCompletion Description of the Parameter
- */
- public static void firePrefixStateChange(Hashtable bindings, boolean listeningForShortcutCompletion)
- {
- //Log.log( Log.DEBUG, ShortcutPrefixActiveEvent.class, "firePrefixStateChange() called, listening? " + listeningForShortcutCompletion );
- // Guaranteed to return a non-null array
- Object[] listeners = listenerList.getListenerList();
- //Log.log( Log.DEBUG, ShortcutPrefixActiveEvent.class, listeners.length + " listeners." );
- // Process the listeners last to first, notifying
- // those that are interested in this event
- for (int i = listeners.length - 2; i >= 0; i -= 2)
- {
- //Log.log( Log.DEBUG, ShortcutPrefixActiveEvent.class, "firePrefixStateChange() called, listening? " + listeningForShortcutCompletion );
- ChangeEvent event = new ShortcutPrefixActiveEvent(bindings, listeningForShortcutCompletion);
- ((ChangeListener) listeners[i + 1]).stateChanged(event);
- }
- }//}}}
-
-
- //{{{ getBindings()
- /**
- * Gets the bindings attribute of the ShortcutPrefixActiveEvent object
- *
- * @return The bindings value
- */
- public Hashtable getBindings()
- {
- return bindings;
- }//}}}
-
- //{{{ getActive()
- /**
- * Gets the active attribute of the ShortcutPrefixActiveEvent object
- *
- * @return The active value
- */
- public boolean getActive()
- {
- return active;
- }
- //}}}
-}
-
+/*
+ * ShortcutPrefixActiveEvent.java - Event fired when jEdit starts and stops
+ * listening for shortcut completions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Jeffrey Hoyt
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.util.Hashtable;
+
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.EventListenerList;
+
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Description of the Class
+ *
+ * @author jchoyt
+ * created December 17, 2005
+ */
+public class ShortcutPrefixActiveEvent extends ChangeEvent
+{
+
+ /**
+ * Description of the Field
+ */
+ protected Hashtable bindings;
+ /**
+ * Description of the Field
+ */
+ protected boolean active;
+
+ /**
+ * Description of the Field
+ */
+ protected static EventListenerList listenerList = new EventListenerList();
+
+ //{{{ Constructor
+ /**
+ * Constructor for the ShortcutPrefixActiveEvent object
+ *
+ * @param bindings Description of the Parameter
+ * @param active Description of the Parameter
+ */
+ public ShortcutPrefixActiveEvent(Hashtable bindings, boolean active)
+ {
+ super(new Object());
+ this.bindings = bindings;
+ this.active = active;
+ } //}}}
+
+ //{{{ addChangeEventListener() method
+ /**
+ * Adds a feature to the ChangeEventListener attribute of the
+ * ShortcutPrefixActiveEvent class
+ *
+ * @param l The feature to be added to the ChangeEventListener attribute
+ */
+ public static void addChangeEventListener(ChangeListener l)
+ {
+ listenerList.add(ChangeListener.class, l);
+ Log.log(Log.DEBUG, ShortcutPrefixActiveEvent.class, "Listener added. " + listenerList.getListenerList().length + " left.");
+ }//}}}
+
+ //{{{ removeChangeEventListener() method
+ /**
+ * Description of the Method
+ *
+ * @param l Description of the Parameter
+ */
+ public static void removeChangeEventListener(ChangeListener l)
+ {
+ listenerList.remove(ChangeListener.class, l);
+ Log.log(Log.DEBUG, ShortcutPrefixActiveEvent.class, "Listener removed. " + listenerList.getListenerList().length + " left.");
+ }//}}}
+
+ //{{{ firePrefixStateChange() method
+ /**
+ * Description of the Method
+ *
+ * @param bindings Description of the Parameter
+ * @param listeningForShortcutCompletion Description of the Parameter
+ */
+ public static void firePrefixStateChange(Hashtable bindings, boolean listeningForShortcutCompletion)
+ {
+ //Log.log( Log.DEBUG, ShortcutPrefixActiveEvent.class, "firePrefixStateChange() called, listening? " + listeningForShortcutCompletion );
+ // Guaranteed to return a non-null array
+ Object[] listeners = listenerList.getListenerList();
+ //Log.log( Log.DEBUG, ShortcutPrefixActiveEvent.class, listeners.length + " listeners." );
+ // Process the listeners last to first, notifying
+ // those that are interested in this event
+ for (int i = listeners.length - 2; i >= 0; i -= 2)
+ {
+ //Log.log( Log.DEBUG, ShortcutPrefixActiveEvent.class, "firePrefixStateChange() called, listening? " + listeningForShortcutCompletion );
+ ChangeEvent event = new ShortcutPrefixActiveEvent(bindings, listeningForShortcutCompletion);
+ ((ChangeListener) listeners[i + 1]).stateChanged(event);
+ }
+ }//}}}
+
+
+ //{{{ getBindings()
+ /**
+ * Gets the bindings attribute of the ShortcutPrefixActiveEvent object
+ *
+ * @return The bindings value
+ */
+ public Hashtable getBindings()
+ {
+ return bindings;
+ }//}}}
+
+ //{{{ getActive()
+ /**
+ * Gets the active attribute of the ShortcutPrefixActiveEvent object
+ *
+ * @return The active value
+ */
+ public boolean getActive()
+ {
+ return active;
+ }
+ //}}}
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/gui/SplashScreen.java b/jEdit/org/gjt/sp/jedit/gui/SplashScreen.java
index e86dfa8..4e99736 100644
--- a/jEdit/org/gjt/sp/jedit/gui/SplashScreen.java
+++ b/jEdit/org/gjt/sp/jedit/gui/SplashScreen.java
@@ -1,209 +1,209 @@
-/*
- * SplashScreen.java - Splash screen
- * Copyright (C) 1998, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.*;
-
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * The splash screen displayed on startup.
- * @version $Id: SplashScreen.java 13029 2008-07-08 08:43:48Z kpouer $
- */
-public class SplashScreen extends JComponent
-{
- //{{{ SplashScreen constructor
- public SplashScreen()
- {
- setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
- setBackground(Color.white);
-
- setFont(defaultFont);
- fm = getFontMetrics(defaultFont);
- image = getToolkit().getImage(
- getClass().getResource("/org/gjt/sp/jedit/icons/splash.png"));
- MediaTracker tracker = new MediaTracker(this);
- tracker.addImage(image,0);
-
- try
- {
- tracker.waitForAll();
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- }
- Dimension screen = getToolkit().getScreenSize(); // sane default
- win = new JWindow();
- GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
- GraphicsDevice[] gs = ge.getScreenDevices();
- GraphicsDevice gd = gs[0];
- if (gd != null)
- {
- GraphicsConfiguration gconf = gd.getDefaultConfiguration();
- if (gconf != null)
- {
- Rectangle bounds = gconf.getBounds();
- screen = new Dimension(bounds.width, bounds.height);
- }
- }
- Dimension size = new Dimension(image.getWidth(this) + 2,
- image.getHeight(this) + 2 + PROGRESS_HEIGHT);
- win.setSize(size);
-
- win.getContentPane().add(this, BorderLayout.CENTER);
-
- win.setLocation((screen.width - size.width) / 2,
- (screen.height - size.height) / 2);
- win.validate();
- win.setVisible(true);
- } //}}}
-
- //{{{ dispose() method
- public void dispose()
- {
- win.dispose();
- } //}}}
-
- //{{{ advance() methods
- public synchronized void advance()
- {
- logAdvanceTime(null);
- progress++;
- repaint();
-
- // wait for it to be painted to ensure progress is updated
- // continuously
- try
- {
- wait();
- }
- catch(InterruptedException ie)
- {
- Log.log(Log.ERROR,this,ie);
- }
- }
-
- public synchronized void advance(String label)
- {
- logAdvanceTime(label);
- progress++;
- this.label = label;
- repaint();
-
- // wait for it to be painted to ensure progress is updated
- // continuously
- try
- {
- wait();
- }
- catch(InterruptedException ie)
- {
- Log.log(Log.ERROR,this,ie);
- }
- } //}}}
-
- //{{{ logAdvanceTime() method
- private void logAdvanceTime(String label)
- {
- long currentTime = System.currentTimeMillis();
- if (lastLabel != null)
- {
- Log.log(Log.DEBUG, SplashScreen.class,
- lastLabel +':'+(currentTime - lastAdvanceTime) + "ms");
- }
- if (label != null)
- {
- lastLabel = label;
- lastAdvanceTime = currentTime;
-
- }
- } //}}}
-
- //{{{ paintComponent() method
- @Override
- public synchronized void paintComponent(Graphics g)
- {
- Dimension size = getSize();
-
- g.setColor(Color.black);
- g.drawRect(0,0,size.width - 1,size.height - 1);
-
- g.drawImage(image,1,1,this);
-
- // XXX: This should not be hardcoded
- g.setColor(Color.white);
- g.fillRect(1,image.getHeight(this) + 1,
- ((win.getWidth() - 2) * progress) / PROGRESS_COUNT, PROGRESS_HEIGHT);
-
- g.setColor(Color.black);
-
- if (label != null)
- {
- int drawOffsetX = (getWidth() - fm.stringWidth(label)) / 2;
- int drawOffsetY = image.getHeight(this) + (PROGRESS_HEIGHT
- + fm.getAscent() + fm.getDescent()) / 2;
-
- paintString(g, label, drawOffsetX, drawOffsetY);
- }
-
- String version = "version " + jEdit.getVersion();
-
- int drawOffsetX = (getWidth() / 2) - (fm.stringWidth(version) / 2);
- int drawOffsetY = image.getHeight(this) - fm.getDescent() - 2;
-
- paintString(g, version, drawOffsetX, drawOffsetY);
-
- notify();
- } //}}}
-
- //{{{ paintString() method
- private void paintString(Graphics g, String version, int drawOffsetX,
- int drawOffsetY)
- {
- g.setFont( labelFont );
-
- g.setColor( versionColor1 );
- g.drawString( version, drawOffsetX, drawOffsetY );
- // Draw a highlight effect
- g.setColor( versionColor2 );
- g.drawString( version, drawOffsetX + 1, drawOffsetY + 1 );
- } //}}}
-
- //{{{ private members
- private final FontMetrics fm;
- private final JWindow win;
- private final Image image;
- private int progress;
- private static final int PROGRESS_HEIGHT = 20;
- private static final int PROGRESS_COUNT = 28;
- private String label;
- private String lastLabel;
- private long lastAdvanceTime = System.currentTimeMillis();
- private Font defaultFont = new Font("Dialog",Font.PLAIN,10);
- private Font labelFont = UIManager.getFont("Label.font").deriveFont(9.8f);
- private Color versionColor1 = new Color(55, 55, 55);
- private Color versionColor2 = new Color(255, 255, 255, 50);
- //}}}
-}
+/*
+ * SplashScreen.java - Splash screen
+ * Copyright (C) 1998, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.*;
+
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * The splash screen displayed on startup.
+ * @version $Id: SplashScreen.java 13029 2008-07-08 08:43:48Z kpouer $
+ */
+public class SplashScreen extends JComponent
+{
+ //{{{ SplashScreen constructor
+ public SplashScreen()
+ {
+ setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ setBackground(Color.white);
+
+ setFont(defaultFont);
+ fm = getFontMetrics(defaultFont);
+ image = getToolkit().getImage(
+ getClass().getResource("/org/gjt/sp/jedit/icons/splash.png"));
+ MediaTracker tracker = new MediaTracker(this);
+ tracker.addImage(image,0);
+
+ try
+ {
+ tracker.waitForAll();
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ Dimension screen = getToolkit().getScreenSize(); // sane default
+ win = new JWindow();
+ GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+ GraphicsDevice[] gs = ge.getScreenDevices();
+ GraphicsDevice gd = gs[0];
+ if (gd != null)
+ {
+ GraphicsConfiguration gconf = gd.getDefaultConfiguration();
+ if (gconf != null)
+ {
+ Rectangle bounds = gconf.getBounds();
+ screen = new Dimension(bounds.width, bounds.height);
+ }
+ }
+ Dimension size = new Dimension(image.getWidth(this) + 2,
+ image.getHeight(this) + 2 + PROGRESS_HEIGHT);
+ win.setSize(size);
+
+ win.getContentPane().add(this, BorderLayout.CENTER);
+
+ win.setLocation((screen.width - size.width) / 2,
+ (screen.height - size.height) / 2);
+ win.validate();
+ win.setVisible(true);
+ } //}}}
+
+ //{{{ dispose() method
+ public void dispose()
+ {
+ win.dispose();
+ } //}}}
+
+ //{{{ advance() methods
+ public synchronized void advance()
+ {
+ logAdvanceTime(null);
+ progress++;
+ repaint();
+
+ // wait for it to be painted to ensure progress is updated
+ // continuously
+ try
+ {
+ wait();
+ }
+ catch(InterruptedException ie)
+ {
+ Log.log(Log.ERROR,this,ie);
+ }
+ }
+
+ public synchronized void advance(String label)
+ {
+ logAdvanceTime(label);
+ progress++;
+ this.label = label;
+ repaint();
+
+ // wait for it to be painted to ensure progress is updated
+ // continuously
+ try
+ {
+ wait();
+ }
+ catch(InterruptedException ie)
+ {
+ Log.log(Log.ERROR,this,ie);
+ }
+ } //}}}
+
+ //{{{ logAdvanceTime() method
+ private void logAdvanceTime(String label)
+ {
+ long currentTime = System.currentTimeMillis();
+ if (lastLabel != null)
+ {
+ Log.log(Log.DEBUG, SplashScreen.class,
+ lastLabel +':'+(currentTime - lastAdvanceTime) + "ms");
+ }
+ if (label != null)
+ {
+ lastLabel = label;
+ lastAdvanceTime = currentTime;
+
+ }
+ } //}}}
+
+ //{{{ paintComponent() method
+ @Override
+ public synchronized void paintComponent(Graphics g)
+ {
+ Dimension size = getSize();
+
+ g.setColor(Color.black);
+ g.drawRect(0,0,size.width - 1,size.height - 1);
+
+ g.drawImage(image,1,1,this);
+
+ // XXX: This should not be hardcoded
+ g.setColor(Color.white);
+ g.fillRect(1,image.getHeight(this) + 1,
+ ((win.getWidth() - 2) * progress) / PROGRESS_COUNT, PROGRESS_HEIGHT);
+
+ g.setColor(Color.black);
+
+ if (label != null)
+ {
+ int drawOffsetX = (getWidth() - fm.stringWidth(label)) / 2;
+ int drawOffsetY = image.getHeight(this) + (PROGRESS_HEIGHT
+ + fm.getAscent() + fm.getDescent()) / 2;
+
+ paintString(g, label, drawOffsetX, drawOffsetY);
+ }
+
+ String version = "version " + jEdit.getVersion();
+
+ int drawOffsetX = (getWidth() / 2) - (fm.stringWidth(version) / 2);
+ int drawOffsetY = image.getHeight(this) - fm.getDescent() - 2;
+
+ paintString(g, version, drawOffsetX, drawOffsetY);
+
+ notify();
+ } //}}}
+
+ //{{{ paintString() method
+ private void paintString(Graphics g, String version, int drawOffsetX,
+ int drawOffsetY)
+ {
+ g.setFont( labelFont );
+
+ g.setColor( versionColor1 );
+ g.drawString( version, drawOffsetX, drawOffsetY );
+ // Draw a highlight effect
+ g.setColor( versionColor2 );
+ g.drawString( version, drawOffsetX + 1, drawOffsetY + 1 );
+ } //}}}
+
+ //{{{ private members
+ private final FontMetrics fm;
+ private final JWindow win;
+ private final Image image;
+ private int progress;
+ private static final int PROGRESS_HEIGHT = 20;
+ private static final int PROGRESS_COUNT = 28;
+ private String label;
+ private String lastLabel;
+ private long lastAdvanceTime = System.currentTimeMillis();
+ private Font defaultFont = new Font("Dialog",Font.PLAIN,10);
+ private Font labelFont = UIManager.getFont("Label.font").deriveFont(9.8f);
+ private Color versionColor1 = new Color(55, 55, 55);
+ private Color versionColor2 = new Color(255, 255, 255, 50);
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/StatusBar.java b/jEdit/org/gjt/sp/jedit/gui/StatusBar.java
index 2ee8268..cc103ca 100644
--- a/jEdit/org/gjt/sp/jedit/gui/StatusBar.java
+++ b/jEdit/org/gjt/sp/jedit/gui/StatusBar.java
@@ -1,494 +1,492 @@
-/*
- * StatusBar.java - The status bar displayed at the bottom of views
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- * Portions copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.text.Segment;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.StringTokenizer;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.statusbar.StatusWidgetFactory;
-import org.gjt.sp.jedit.gui.statusbar.Widget;
-import org.gjt.sp.jedit.gui.statusbar.ToolTipLabel;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * The status bar used to display various information to the user.<p>
- *
- * Currently, it is used for the following:
- * <ul>
- * <li>Displaying caret position information
- * <li>Displaying {@link InputHandler#readNextChar(String,String)} prompts
- * <li>Displaying {@link #setMessage(String)} messages
- * <li>Displaying I/O progress
- * <li>Displaying various editor settings
- * <li>Displaying memory status
- * </ul>
- *
- * @version $Id: StatusBar.java 17692 2010-04-24 15:51:12Z k_satoda $
- * @author Slava Pestov
- * @since jEdit 3.2pre2
- */
-public class StatusBar extends JPanel implements WorkThreadProgressListener
-{
- //{{{ StatusBar constructor
- public StatusBar(View view)
- {
- super(new BorderLayout());
- setName("StatusBar");
- setBorder(new CompoundBorder(new EmptyBorder(4,0,0,
- (OperatingSystem.isMacOS() ? 18 : 0)),
- UIManager.getBorder("TextField.border")));
-
- this.view = view;
-
- panel = new JPanel(new BorderLayout());
- box = new Box(BoxLayout.X_AXIS);
- panel.add(BorderLayout.EAST,box);
- add(BorderLayout.CENTER,panel);
-
- MouseHandler mouseHandler = new MouseHandler();
-
- caretStatus = new ToolTipLabel();
- caretStatus.setName("caretStatus");
- caretStatus.setToolTipText(jEdit.getProperty("view.status.caret-tooltip"));
- caretStatus.addMouseListener(mouseHandler);
-
- message = new JLabel(" ");
- setMessageComponent(message);
-
- modeWidget = _getWidget("mode");
- foldWidget = _getWidget("fold");
- encodingWidget = _getWidget("encoding");
- wrapWidget = _getWidget("wrap");
- multiSelectWidget = _getWidget("multiSelect");
- rectSelectWidget = _getWidget("rectSelect");
- overwriteWidget = _getWidget("overwrite");
- lineSepWidget = _getWidget("lineSep");
- } //}}}
-
- //{{{ propertiesChanged() method
- public void propertiesChanged()
- {
- Color fg = jEdit.getColorProperty("view.status.foreground");
- Color bg = jEdit.getColorProperty("view.status.background");
-
- showCaretStatus = jEdit.getBooleanProperty("view.status.show-caret-status");
-
- panel.setBackground(bg);
- panel.setForeground(fg);
- caretStatus.setBackground(bg);
- caretStatus.setForeground(fg);
- message.setBackground(bg);
- message.setForeground(fg);
-
- // retarded GTK look and feel!
- Font font = new JLabel().getFont();
- //UIManager.getFont("Label.font");
- FontMetrics fm = getFontMetrics(font);
-
- if (showCaretStatus)
- {
- panel.add(BorderLayout.WEST,caretStatus);
-
- caretStatus.setFont(font);
-
- Dimension dim = new Dimension(fm.stringWidth(caretTestStr),
- fm.getHeight());
- caretStatus.setPreferredSize(dim);
- updateCaretStatus();
- }
- else
- panel.remove(caretStatus);
-
- String statusBar = jEdit.getProperty("view.status");
- if (!StandardUtilities.objectsEqual(currentBar, statusBar))
- {
- box.removeAll();
- StringTokenizer tokenizer = new StringTokenizer(statusBar);
- while (tokenizer.hasMoreTokens())
- {
- String token = tokenizer.nextToken();
- if (Character.isLetter(token.charAt(0)))
- {
- Widget widget = getWidget(token);
- if (widget == null)
- {
- Log.log(Log.WARNING, this, "Widget " + token + " doesn't exist");
- continue;
- }
- Component c = widget.getComponent();
- c.setBackground(bg);
- c.setForeground(fg);
- box.add(c);
- widget.update();
- widget.propertiesChanged();
- }
- else
- {
- JLabel label = new JLabel(token);
- label.setBackground(bg);
- label.setForeground(fg);
- box.add(label);
- }
- }
- currentBar = statusBar;
- }
- updateBufferStatus();
- updateMiscStatus();
- } //}}}
-
- //{{{ addNotify() method
- @Override
- public void addNotify()
- {
- super.addNotify();
- VFSManager.getIOThreadPool().addProgressListener(this);
- } //}}}
-
- //{{{ removeNotify() method
- @Override
- public void removeNotify()
- {
- super.removeNotify();
- VFSManager.getIOThreadPool().removeProgressListener(this);
- } //}}}
-
- //{{{ WorkThreadListener implementation
-
- //{{{ statusUpdate() method
- public void statusUpdate(final WorkThreadPool threadPool, int threadIndex)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- // don't obscure existing message
- if(message != null && !"".equals(message.getText().trim())
- && !currentMessageIsIO)
- return;
-
- int requestCount = threadPool.getRequestCount();
- if(requestCount == 0)
- {
- setMessageAndClear(jEdit.getProperty(
- "view.status.io.done"));
- currentMessageIsIO = true;
- }
- else if(requestCount == 1)
- {
- setMessage(jEdit.getProperty(
- "view.status.io-1"));
- currentMessageIsIO = true;
- }
- else
- {
- Object[] args = {Integer.valueOf(requestCount)};
- setMessage(jEdit.getProperty(
- "view.status.io",args));
- currentMessageIsIO = true;
- }
- }
- });
- } //}}}
-
- //{{{ progressUpdate() method
- public void progressUpdate(WorkThreadPool threadPool, int threadIndex)
- {
- } //}}}
-
- //}}}
-
- //{{{ getMessage() method
- /**
- * Returns the current message.
- *
- * @return the current message
- * @since jEdit 4.4pre1
- */
- public String getMessage()
- {
- return message.getText();
- } //}}}
-
- //{{{ setMessageAndClear() method
- /**
- * Show a message for a short period of time.
- * @param message The message
- * @since jEdit 3.2pre5
- */
- public void setMessageAndClear(String message)
- {
- setMessage(message);
-
- tempTimer = new Timer(0,new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- // so if view is closed in the meantime...
- if(isShowing())
- setMessage(null);
- }
- });
-
- tempTimer.setInitialDelay(10000);
- tempTimer.setRepeats(false);
- tempTimer.start();
- } //}}}
-
- //{{{ setMessage() method
- /**
- * Displays a status message.
- * @param message the message to display, it can be null
- */
- public void setMessage(String message)
- {
- if(tempTimer != null)
- {
- tempTimer.stop();
- tempTimer = null;
- }
-
- setMessageComponent(this.message);
-
- if(message == null)
- {
- if(view.getMacroRecorder() != null)
- this.message.setText(jEdit.getProperty("view.status.recording"));
- else
- this.message.setText(" ");
- }
- else
- this.message.setText(message);
- } //}}}
-
- //{{{ setMessageComponent() method
- public void setMessageComponent(Component comp)
- {
- currentMessageIsIO = false;
-
- if (comp == null || messageComp == comp)
- {
- return;
- }
-
- messageComp = comp;
- panel.add(BorderLayout.CENTER, messageComp);
- } //}}}
-
- //{{{ updateCaretStatus() method
- public void updateCaretStatus()
- {
- if (showCaretStatus)
- {
- Buffer buffer = view.getBuffer();
-
- if(!buffer.isLoaded() ||
- /* can happen when switching buffers sometimes */
- buffer != view.getTextArea().getBuffer())
- {
- caretStatus.setText(" ");
- return;
- }
-
- JEditTextArea textArea = view.getTextArea();
-
- int caretPosition = textArea.getCaretPosition();
- int currLine = textArea.getCaretLine();
-
- // there must be a better way of fixing this...
- // the problem is that this method can sometimes
- // be called as a result of a text area scroll
- // event, in which case the caret position has
- // not been updated yet.
- if(currLine >= buffer.getLineCount())
- return; // hopefully another caret update will come?
-
- int start = textArea.getLineStartOffset(currLine);
- int dot = caretPosition - start;
-
- if(dot < 0)
- return;
-
- int bufferLength = buffer.getLength();
-
- buffer.getText(start,dot,seg);
- int virtualPosition = StandardUtilities.getVirtualWidth(seg,
- buffer.getTabSize());
- // for GC
- seg.array = null;
- seg.count = 0;
-
- // per lengthy discussion on dev list, format for caret
- // position is lineno,dot-virtual (caret/total) e.g.
- // 388,10-31 (8835/13414). No more "Top" nor "Bottom".
- if (jEdit.getBooleanProperty("view.status.show-caret-linenumber", true))
- {
- buf.append(currLine + 1);
- buf.append(',');
- }
- if (jEdit.getBooleanProperty("view.status.show-caret-dot", true))
- {
- buf.append(dot + 1);
- }
- if (jEdit.getBooleanProperty("view.status.show-caret-virtual", true) &&
- virtualPosition != dot)
- {
- buf.append('-');
- buf.append(virtualPosition + 1);
- }
- if (buf.length() > 0)
- {
- buf.append(' ');
- }
- if (jEdit.getBooleanProperty("view.status.show-caret-offset", true) &&
- jEdit.getBooleanProperty("view.status.show-caret-bufferlength", true))
- {
- buf.append('(');
- buf.append(caretPosition);
- buf.append('/');
- buf.append(bufferLength);
- buf.append(')');
- }
- else if (jEdit.getBooleanProperty("view.status.show-caret-offset", true))
- {
- buf.append('(');
- buf.append(caretPosition);
- buf.append(')');
- }
- else if (jEdit.getBooleanProperty("view.status.show-caret-bufferlength", true))
- {
- buf.append('(');
- buf.append(bufferLength);
- buf.append(')');
- }
-
- caretStatus.setText(buf.toString());
- buf.setLength(0);
- }
- } //}}}
-
- //{{{ updateBufferStatus() method
- public void updateBufferStatus()
- {
- wrapWidget.update();
- lineSepWidget.update();
- modeWidget.update();
- foldWidget.update();
- encodingWidget.update();
- } //}}}
-
- //{{{ updateMiscStatus() method
- public void updateMiscStatus()
- {
- multiSelectWidget.update();
- rectSelectWidget.update();
- overwriteWidget.update();
- } //}}}
-
- //{{{ Private members
- private String currentBar;
- private final View view;
- private final JPanel panel;
- private final Box box;
- private final ToolTipLabel caretStatus;
- private Component messageComp;
- private final JLabel message;
- private final Widget modeWidget;
- private final Widget foldWidget;
- private final Widget encodingWidget;
- private final Widget wrapWidget;
- private final Widget multiSelectWidget;
- private final Widget rectSelectWidget;
- private final Widget overwriteWidget;
- private final Widget lineSepWidget;
- /* package-private for speed */ StringBuilder buf = new StringBuilder();
- private Timer tempTimer;
- private boolean currentMessageIsIO;
-
- private final Segment seg = new Segment();
-
- private boolean showCaretStatus;
- //}}}
-
- //static final String caretTestStr = "99999999,9999,999-999 99%";
- static final String caretTestStr = "9999,999-999 (99999999/99999999)";
-
- //{{{ getWidget() method
- private Widget getWidget(String name)
- {
- if ("mode".equals(name))
- return modeWidget;
- if ("fold".equals(name))
- return foldWidget;
- if ("encoding".equals(name))
- return encodingWidget;
- if ("wrap".equals(name))
- return wrapWidget;
- if ("multiSelect".equals(name))
- return multiSelectWidget;
- if ("rectSelect".equals(name))
- return rectSelectWidget;
- if ("overwrite".equals(name))
- return overwriteWidget;
- if ("lineSep".equals(name))
- return lineSepWidget;
-
- return _getWidget(name);
- } //}}}
-
- //{{{ _getWidget() method
- private Widget _getWidget(String name)
- {
- StatusWidgetFactory widgetFactory =
- (StatusWidgetFactory) ServiceManager.getService("org.gjt.sp.jedit.gui.statusbar.StatusWidget", name);
- if (widgetFactory == null)
- {
- Log.log(Log.ERROR, this, "Widget " + name + " doesn't exist");
- return null;
- }
- return widgetFactory.getWidget(view);
- } //}}}
-
- //{{{ MouseHandler class
- private class MouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- Object source = evt.getSource();
- if(source == caretStatus && evt.getClickCount() == 2)
- {
- view.getTextArea().showGoToLineDialog();
- }
- }
- } //}}}
-}
+/*
+ * StatusBar.java - The status bar displayed at the bottom of views
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ * Portions copyright (C) 2008 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.text.Segment;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.StringTokenizer;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.gui.statusbar.StatusWidgetFactory;
+import org.gjt.sp.jedit.gui.statusbar.Widget;
+import org.gjt.sp.jedit.gui.statusbar.ToolTipLabel;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * The status bar used to display various information to the user.<p>
+ *
+ * Currently, it is used for the following:
+ * <ul>
+ * <li>Displaying caret position information
+ * <li>Displaying {@link InputHandler#readNextChar(String,String)} prompts
+ * <li>Displaying {@link #setMessage(String)} messages
+ * <li>Displaying I/O progress
+ * <li>Displaying various editor settings
+ * <li>Displaying memory status
+ * </ul>
+ *
+ * @version $Id: StatusBar.java 17443 2010-03-09 19:53:40Z kpouer $
+ * @author Slava Pestov
+ * @since jEdit 3.2pre2
+ */
+public class StatusBar extends JPanel implements WorkThreadProgressListener
+{
+ //{{{ StatusBar constructor
+ public StatusBar(View view)
+ {
+ super(new BorderLayout());
+ setName("StatusBar");
+ setBorder(new CompoundBorder(new EmptyBorder(4,0,0,
+ (OperatingSystem.isMacOS() ? 18 : 0)),
+ UIManager.getBorder("TextField.border")));
+
+ this.view = view;
+
+ panel = new JPanel(new BorderLayout());
+ box = new Box(BoxLayout.X_AXIS);
+ panel.add(BorderLayout.EAST,box);
+ add(BorderLayout.CENTER,panel);
+
+ MouseHandler mouseHandler = new MouseHandler();
+
+ caretStatus = new ToolTipLabel();
+ caretStatus.setName("caretStatus");
+ caretStatus.setToolTipText(jEdit.getProperty("view.status.caret-tooltip"));
+ caretStatus.addMouseListener(mouseHandler);
+
+ message = new JLabel(" ");
+ setMessageComponent(message);
+
+ modeWidget = _getWidget("mode");
+ foldWidget = _getWidget("fold");
+ encodingWidget = _getWidget("encoding");
+ wrapWidget = _getWidget("wrap");
+ multiSelectWidget = _getWidget("multiSelect");
+ rectSelectWidget = _getWidget("rectSelect");
+ overwriteWidget = _getWidget("overwrite");
+ lineSepWidget = _getWidget("lineSep");
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ public void propertiesChanged()
+ {
+ Color fg = jEdit.getColorProperty("view.status.foreground");
+ Color bg = jEdit.getColorProperty("view.status.background");
+
+ showCaretStatus = jEdit.getBooleanProperty("view.status.show-caret-status");
+
+ panel.setBackground(bg);
+ panel.setForeground(fg);
+ caretStatus.setBackground(bg);
+ caretStatus.setForeground(fg);
+ message.setBackground(bg);
+ message.setForeground(fg);
+
+ // retarded GTK look and feel!
+ Font font = new JLabel().getFont();
+ //UIManager.getFont("Label.font");
+ FontMetrics fm = getFontMetrics(font);
+
+ if (showCaretStatus)
+ {
+ panel.add(BorderLayout.WEST,caretStatus);
+
+ caretStatus.setFont(font);
+
+ Dimension dim = new Dimension(fm.stringWidth(caretTestStr),
+ fm.getHeight());
+ caretStatus.setPreferredSize(dim);
+ updateCaretStatus();
+ }
+ else
+ panel.remove(caretStatus);
+
+ String statusBar = jEdit.getProperty("view.status");
+ if (!StandardUtilities.objectsEqual(currentBar, statusBar))
+ {
+ box.removeAll();
+ StringTokenizer tokenizer = new StringTokenizer(statusBar);
+ while (tokenizer.hasMoreTokens())
+ {
+ String token = tokenizer.nextToken();
+ if (Character.isLetter(token.charAt(0)))
+ {
+ Widget widget = getWidget(token);
+ if (widget == null)
+ {
+ JLabel label = new JLabel(token);
+ label.setBackground(bg);
+ label.setForeground(fg);
+ box.add(label);
+ continue;
+ }
+ Component c = widget.getComponent();
+ c.setBackground(bg);
+ c.setForeground(fg);
+ box.add(c);
+ widget.update();
+ widget.propertiesChanged();
+ }
+ else
+ {
+ JLabel label = new JLabel(token);
+ label.setBackground(bg);
+ label.setForeground(fg);
+ box.add(label);
+ }
+ }
+ currentBar = statusBar;
+ }
+ updateBufferStatus();
+ updateMiscStatus();
+ } //}}}
+
+ //{{{ addNotify() method
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ VFSManager.getIOThreadPool().addProgressListener(this);
+ } //}}}
+
+ //{{{ removeNotify() method
+ @Override
+ public void removeNotify()
+ {
+ super.removeNotify();
+ VFSManager.getIOThreadPool().removeProgressListener(this);
+ } //}}}
+
+ //{{{ WorkThreadListener implementation
+
+ //{{{ statusUpdate() method
+ public void statusUpdate(final WorkThreadPool threadPool, int threadIndex)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ // don't obscure existing message
+ if(message != null && !"".equals(message.getText().trim())
+ && !currentMessageIsIO)
+ return;
+
+ int requestCount = threadPool.getRequestCount();
+ if(requestCount == 0)
+ {
+ setMessageAndClear(jEdit.getProperty(
+ "view.status.io.done"));
+ currentMessageIsIO = true;
+ }
+ else if(requestCount == 1)
+ {
+ setMessage(jEdit.getProperty(
+ "view.status.io-1"));
+ currentMessageIsIO = true;
+ }
+ else
+ {
+ Object[] args = {requestCount};
+ setMessage(jEdit.getProperty(
+ "view.status.io",args));
+ currentMessageIsIO = true;
+ }
+ }
+ });
+ } //}}}
+
+ //{{{ progressUpdate() method
+ public void progressUpdate(WorkThreadPool threadPool, int threadIndex)
+ {
+ } //}}}
+
+ //}}}
+
+ //{{{ getMessage() method
+ /**
+ * Returns the current message.
+ *
+ * @return the current message
+ * @since jEdit 4.4pre1
+ */
+ public String getMessage()
+ {
+ return message.getText();
+ } //}}}
+
+ //{{{ setMessageAndClear() method
+ /**
+ * Show a message for a short period of time.
+ * @param message The message
+ * @since jEdit 3.2pre5
+ */
+ public void setMessageAndClear(String message)
+ {
+ setMessage(message);
+
+ tempTimer = new Timer(0,new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ // so if view is closed in the meantime...
+ if(isShowing())
+ setMessage(null);
+ }
+ });
+
+ tempTimer.setInitialDelay(10000);
+ tempTimer.setRepeats(false);
+ tempTimer.start();
+ } //}}}
+
+ //{{{ setMessage() method
+ /**
+ * Displays a status message.
+ * @param message the message to display, it can be null
+ */
+ public void setMessage(String message)
+ {
+ if(tempTimer != null)
+ {
+ tempTimer.stop();
+ tempTimer = null;
+ }
+
+ setMessageComponent(this.message);
+
+ if(message == null)
+ {
+ if(view.getMacroRecorder() != null)
+ this.message.setText(jEdit.getProperty("view.status.recording"));
+ else
+ this.message.setText(" ");
+ }
+ else
+ this.message.setText(message);
+ } //}}}
+
+ //{{{ setMessageComponent() method
+ public void setMessageComponent(Component comp)
+ {
+ currentMessageIsIO = false;
+
+ if (comp == null || messageComp == comp)
+ {
+ return;
+ }
+
+ messageComp = comp;
+ panel.add(BorderLayout.CENTER, messageComp);
+ } //}}}
+
+ //{{{ updateCaretStatus() method
+ public void updateCaretStatus()
+ {
+ if (showCaretStatus)
+ {
+ Buffer buffer = view.getBuffer();
+
+ if(!buffer.isLoaded() ||
+ /* can happen when switching buffers sometimes */
+ buffer != view.getTextArea().getBuffer())
+ {
+ caretStatus.setText(" ");
+ return;
+ }
+
+ JEditTextArea textArea = view.getTextArea();
+
+ int caretPosition = textArea.getCaretPosition();
+ int currLine = textArea.getCaretLine();
+
+ // there must be a better way of fixing this...
+ // the problem is that this method can sometimes
+ // be called as a result of a text area scroll
+ // event, in which case the caret position has
+ // not been updated yet.
+ if(currLine >= buffer.getLineCount())
+ return; // hopefully another caret update will come?
+
+ int start = textArea.getLineStartOffset(currLine);
+ int dot = caretPosition - start;
+
+ if(dot < 0)
+ return;
+
+ int bufferLength = buffer.getLength();
+
+ buffer.getText(start,dot,seg);
+ int virtualPosition = StandardUtilities.getVirtualWidth(seg,
+ buffer.getTabSize());
+ // for GC
+ seg.array = null;
+ seg.count = 0;
+
+ if (jEdit.getBooleanProperty("view.status.show-caret-linenumber", true))
+ {
+ buf.append(currLine + 1);
+ buf.append(',');
+ }
+ if (jEdit.getBooleanProperty("view.status.show-caret-dot", true))
+ {
+ buf.append(dot + 1);
+ }
+ if (jEdit.getBooleanProperty("view.status.show-caret-virtual", true) &&
+ virtualPosition != dot)
+ {
+ buf.append('-');
+ buf.append(virtualPosition + 1);
+ }
+ if (buf.length() > 0)
+ {
+ buf.append(' ');
+ }
+ if (jEdit.getBooleanProperty("view.status.show-caret-offset", true) &&
+ jEdit.getBooleanProperty("view.status.show-caret-bufferlength", true))
+ {
+ buf.append('(');
+ buf.append(caretPosition);
+ buf.append('/');
+ buf.append(bufferLength);
+ buf.append(')');
+ }
+ else if (jEdit.getBooleanProperty("view.status.show-caret-offset", true))
+ {
+ buf.append('(');
+ buf.append(caretPosition);
+ buf.append(')');
+ }
+ else if (jEdit.getBooleanProperty("view.status.show-caret-bufferlength", true))
+ {
+ buf.append('(');
+ buf.append(bufferLength);
+ buf.append(')');
+ }
+
+ caretStatus.setText(buf.toString());
+ buf.setLength(0);
+ }
+ } //}}}
+
+ //{{{ updateBufferStatus() method
+ public void updateBufferStatus()
+ {
+ wrapWidget.update();
+ lineSepWidget.update();
+ modeWidget.update();
+ foldWidget.update();
+ encodingWidget.update();
+ } //}}}
+
+ //{{{ updateMiscStatus() method
+ public void updateMiscStatus()
+ {
+ multiSelectWidget.update();
+ rectSelectWidget.update();
+ overwriteWidget.update();
+ } //}}}
+
+ //{{{ Private members
+ private String currentBar;
+ private final View view;
+ private final JPanel panel;
+ private final Box box;
+ private final ToolTipLabel caretStatus;
+ private Component messageComp;
+ private final JLabel message;
+ private final Widget modeWidget;
+ private final Widget foldWidget;
+ private final Widget encodingWidget;
+ private final Widget wrapWidget;
+ private final Widget multiSelectWidget;
+ private final Widget rectSelectWidget;
+ private final Widget overwriteWidget;
+ private final Widget lineSepWidget;
+ /* package-private for speed */ StringBuilder buf = new StringBuilder();
+ private Timer tempTimer;
+ private boolean currentMessageIsIO;
+
+ private final Segment seg = new Segment();
+
+ private boolean showCaretStatus;
+ //}}}
+
+ static final String caretTestStr = "9999,999-999 (99999999/99999999)";
+
+ //{{{ getWidget() method
+ private Widget getWidget(String name)
+ {
+ if ("mode".equals(name))
+ return modeWidget;
+ if ("fold".equals(name))
+ return foldWidget;
+ if ("encoding".equals(name))
+ return encodingWidget;
+ if ("wrap".equals(name))
+ return wrapWidget;
+ if ("multiSelect".equals(name))
+ return multiSelectWidget;
+ if ("rectSelect".equals(name))
+ return rectSelectWidget;
+ if ("overwrite".equals(name))
+ return overwriteWidget;
+ if ("lineSep".equals(name))
+ return lineSepWidget;
+
+ return _getWidget(name);
+ } //}}}
+
+ //{{{ _getWidget() method
+ private Widget _getWidget(String name)
+ {
+ StatusWidgetFactory widgetFactory =
+ (StatusWidgetFactory) ServiceManager.getService("org.gjt.sp.jedit.gui.statusbar.StatusWidget", name);
+ if (widgetFactory == null)
+ {
+ return null;
+ }
+ return widgetFactory.getWidget(view);
+ } //}}}
+
+ //{{{ MouseHandler class
+ private class MouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == caretStatus && evt.getClickCount() == 2)
+ {
+ view.getTextArea().showGoToLineDialog();
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/StyleEditor.java b/jEdit/org/gjt/sp/jedit/gui/StyleEditor.java
index 435e72b..a9c5265 100644
--- a/jEdit/org/gjt/sp/jedit/gui/StyleEditor.java
+++ b/jEdit/org/gjt/sp/jedit/gui/StyleEditor.java
@@ -1,182 +1,235 @@
-/*
- * StyleEditor.java - Style editor dialog
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000, 2001 Slava Pestov
- * Portions copyright (C) 1999 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.gui;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Font;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JDialog;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.border.EmptyBorder;
-
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.syntax.SyntaxStyle;
-
-//{{{ StyleEditor class
-public class StyleEditor extends EnhancedDialog implements ActionListener
-{
- //{{{ StyleEditor constructor
- public StyleEditor(JDialog parent, SyntaxStyle style, String styleName)
- {
- super(parent, jEdit.getProperty("style-editor.title"),true);
- initialize(parent, style, styleName);
- }
- public StyleEditor(JFrame parent, SyntaxStyle style, String styleName)
- {
- super(parent, jEdit.getProperty("style-editor.title"),true);
- initialize(parent, style, styleName);
- }
- private void initialize(Component comp, SyntaxStyle style, String styleName)
- {
- JPanel content = new JPanel(new BorderLayout(12,12));
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- JPanel panel = new JPanel(new GridLayout(5,2,12,12));
-
- panel.add(new JLabel(jEdit.getProperty("style-editor.tokenType")));
- panel.add(new JLabel(styleName));
-
- italics = new JCheckBox(jEdit.getProperty("style-editor.italics"));
- italics.setSelected(style.getFont().isItalic());
- panel.add(italics);
- panel.add(new JLabel());
-
- bold = new JCheckBox(jEdit.getProperty("style-editor.bold"));
- bold.setSelected(style.getFont().isBold());
- panel.add(bold);
- panel.add(new JLabel());
-
- Color fg = style.getForegroundColor();
-
- fgColorCheckBox = new JCheckBox(jEdit.getProperty("style-editor.fgColor"));
- fgColorCheckBox.setSelected(fg != null);
- fgColorCheckBox.addActionListener(this);
- panel.add(fgColorCheckBox);
-
- fgColor = new ColorWellButton(fg);
- fgColor.setEnabled(fg != null);
- panel.add(fgColor);
-
- Color bg = style.getBackgroundColor();
- bgColorCheckBox = new JCheckBox(jEdit.getProperty("style-editor.bgColor"));
- bgColorCheckBox.setSelected(bg != null);
- bgColorCheckBox.addActionListener(this);
- panel.add(bgColorCheckBox);
-
- bgColor = new ColorWellButton(bg);
- bgColor.setEnabled(bg != null);
- panel.add(bgColor);
-
- content.add(BorderLayout.CENTER,panel);
-
- Box box = new Box(BoxLayout.X_AXIS);
- box.add(Box.createGlue());
- box.add(ok = new JButton(jEdit.getProperty("common.ok")));
- getRootPane().setDefaultButton(ok);
- ok.addActionListener(this);
- box.add(Box.createHorizontalStrut(6));
- box.add(cancel = new JButton(jEdit.getProperty("common.cancel")));
- cancel.addActionListener(this);
- box.add(Box.createGlue());
-
- content.add(BorderLayout.SOUTH,box);
-
- pack();
- setLocationRelativeTo(comp);
-
- setResizable(false);
- setVisible(true);
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == ok)
- ok();
- else if(source == cancel)
- cancel();
- else if(source == fgColorCheckBox)
- fgColor.setEnabled(fgColorCheckBox.isSelected());
- else if(source == bgColorCheckBox)
- bgColor.setEnabled(bgColorCheckBox.isSelected());
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- okClicked = true;
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ getStyle() method
- public SyntaxStyle getStyle()
- {
- if(!okClicked)
- return null;
-
- Color foreground = (fgColorCheckBox.isSelected()
- ? fgColor.getSelectedColor()
- : null);
-
- Color background = (bgColorCheckBox.isSelected()
- ? bgColor.getSelectedColor()
- : null);
-
- return new SyntaxStyle(foreground,background,
- new Font("Dialog",
- (italics.isSelected() ? Font.ITALIC : 0)
- | (bold.isSelected() ? Font.BOLD : 0),
- 12));
- } //}}}
-
- //{{{ Private members
- private JCheckBox italics;
- private JCheckBox bold;
- private JCheckBox fgColorCheckBox;
- private ColorWellButton fgColor;
- private JCheckBox bgColorCheckBox;
- private ColorWellButton bgColor;
- private JButton ok;
- private JButton cancel;
- private boolean okClicked;
- //}}}
-} //}}}
+/*
+ * StyleEditor.java - Style editor dialog
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000, 2001 Slava Pestov
+ * Portions copyright (C) 1999 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.gui;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Font;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.border.EmptyBorder;
+import javax.swing.JOptionPane;
+
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.syntax.SyntaxStyle;
+import org.gjt.sp.jedit.syntax.DefaultTokenHandler;
+import org.gjt.sp.jedit.syntax.Token;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+
+//{{{ StyleEditor class
+public class StyleEditor extends EnhancedDialog implements ActionListener
+{
+ //{{{ invokeForCaret() method
+ /**
+ * Edit the syntax style of the token under the caret.
+ *
+ * @param textArea the textarea where your caret is
+ * @since jEdit 4.4pre1
+ */
+ public static void invokeForCaret(JEditTextArea textArea)
+ {
+ JEditBuffer buffer = textArea.getBuffer();
+ int lineNum = textArea.getCaretLine();
+ int start = buffer.getLineStartOffset(lineNum);
+ int position = textArea.getCaretPosition();
+
+ DefaultTokenHandler tokenHandler = new DefaultTokenHandler();
+ buffer.markTokens(lineNum,tokenHandler);
+ Token token = tokenHandler.getTokens();
+
+ while(token.id != Token.END)
+ {
+ int next = start + token.length;
+ if (start <= position && next > position)
+ break;
+ start = next;
+ token = token.next;
+ }
+ if (token.id == Token.END || token.id == Token.NULL)
+ {
+ JOptionPane.showMessageDialog(textArea.getView(),
+ jEdit.getProperty("syntax-style-no-token.message"),
+ jEdit.getProperty("syntax-style-no-token.title"),
+ JOptionPane.PLAIN_MESSAGE);
+ return;
+ }
+ String typeName = Token.tokenToString(token.id);
+ String property = "view.style." + typeName.toLowerCase();
+ SyntaxStyle currentStyle = GUIUtilities.parseStyle(
+ jEdit.getProperty(property), "Dialog",12);
+ SyntaxStyle style = new StyleEditor(textArea.getView(),
+ currentStyle, typeName).getStyle();
+ if(style != null)
+ {
+ jEdit.setProperty(property, GUIUtilities.getStyleString(style));
+ jEdit.propertiesChanged();
+ }
+ } //}}}
+
+ //{{{ StyleEditor constructor
+ public StyleEditor(JDialog parent, SyntaxStyle style, String styleName)
+ {
+ super(parent, jEdit.getProperty("style-editor.title"),true);
+ initialize(parent, style, styleName);
+ }
+ public StyleEditor(JFrame parent, SyntaxStyle style, String styleName)
+ {
+ super(parent, jEdit.getProperty("style-editor.title"),true);
+ initialize(parent, style, styleName);
+ }
+ private void initialize(Component comp, SyntaxStyle style, String styleName)
+ {
+ JPanel content = new JPanel(new BorderLayout(12,12));
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ JPanel panel = new JPanel(new GridLayout(5,2,12,12));
+
+ panel.add(new JLabel(jEdit.getProperty("style-editor.tokenType")));
+ panel.add(new JLabel(styleName));
+
+ italics = new JCheckBox(jEdit.getProperty("style-editor.italics"));
+ italics.setSelected(style.getFont().isItalic());
+ panel.add(italics);
+ panel.add(new JLabel());
+
+ bold = new JCheckBox(jEdit.getProperty("style-editor.bold"));
+ bold.setSelected(style.getFont().isBold());
+ panel.add(bold);
+ panel.add(new JLabel());
+
+ Color fg = style.getForegroundColor();
+
+ fgColorCheckBox = new JCheckBox(jEdit.getProperty("style-editor.fgColor"));
+ fgColorCheckBox.setSelected(fg != null);
+ fgColorCheckBox.addActionListener(this);
+ panel.add(fgColorCheckBox);
+
+ fgColor = new ColorWellButton(fg);
+ fgColor.setEnabled(fg != null);
+ panel.add(fgColor);
+
+ Color bg = style.getBackgroundColor();
+ bgColorCheckBox = new JCheckBox(jEdit.getProperty("style-editor.bgColor"));
+ bgColorCheckBox.setSelected(bg != null);
+ bgColorCheckBox.addActionListener(this);
+ panel.add(bgColorCheckBox);
+
+ bgColor = new ColorWellButton(bg);
+ bgColor.setEnabled(bg != null);
+ panel.add(bgColor);
+
+ content.add(BorderLayout.CENTER,panel);
+
+ Box box = new Box(BoxLayout.X_AXIS);
+ box.add(Box.createGlue());
+ box.add(ok = new JButton(jEdit.getProperty("common.ok")));
+ getRootPane().setDefaultButton(ok);
+ ok.addActionListener(this);
+ box.add(Box.createHorizontalStrut(6));
+ box.add(cancel = new JButton(jEdit.getProperty("common.cancel")));
+ cancel.addActionListener(this);
+ box.add(Box.createGlue());
+
+ content.add(BorderLayout.SOUTH,box);
+
+ pack();
+ setLocationRelativeTo(comp);
+
+ setResizable(false);
+ setVisible(true);
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == ok)
+ ok();
+ else if(source == cancel)
+ cancel();
+ else if(source == fgColorCheckBox)
+ fgColor.setEnabled(fgColorCheckBox.isSelected());
+ else if(source == bgColorCheckBox)
+ bgColor.setEnabled(bgColorCheckBox.isSelected());
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ okClicked = true;
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ getStyle() method
+ public SyntaxStyle getStyle()
+ {
+ if(!okClicked)
+ return null;
+
+ Color foreground = (fgColorCheckBox.isSelected()
+ ? fgColor.getSelectedColor()
+ : null);
+
+ Color background = (bgColorCheckBox.isSelected()
+ ? bgColor.getSelectedColor()
+ : null);
+
+ return new SyntaxStyle(foreground,background,
+ new Font("Dialog",
+ (italics.isSelected() ? Font.ITALIC : 0)
+ | (bold.isSelected() ? Font.BOLD : 0),
+ 12));
+ } //}}}
+
+ //{{{ Private members
+ private JCheckBox italics;
+ private JCheckBox bold;
+ private JCheckBox fgColorCheckBox;
+ private ColorWellButton fgColor;
+ private JCheckBox bgColorCheckBox;
+ private ColorWellButton bgColor;
+ private JButton ok;
+ private JButton cancel;
+ private boolean okClicked;
+ //}}}
+} //}}}
diff --git a/jEdit/org/gjt/sp/jedit/gui/TaskMonitor.java b/jEdit/org/gjt/sp/jedit/gui/TaskMonitor.java
new file mode 100644
index 0000000..91c55b5
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/gui/TaskMonitor.java
@@ -0,0 +1,278 @@
+/*
+ * TaskMonitor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright © 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.util.Task;
+import org.gjt.sp.util.TaskListener;
+import org.gjt.sp.util.TaskManager;
+import org.gjt.sp.util.ThreadUtilities;
+
+import javax.swing.*;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.TableCellEditor;
+import javax.swing.table.TableCellRenderer;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+
+/**
+ * @author Matthieu Casanova
+ */
+public class TaskMonitor extends JPanel implements TaskListener
+{
+ private final TaskTableModel model;
+ private final JTable table;
+ private final JLabel remainingCount;
+
+ public TaskMonitor()
+ {
+ super(new BorderLayout());
+ remainingCount = new JLabel();
+ add(remainingCount, BorderLayout.NORTH);
+
+ model = new TaskTableModel();
+ model.addTableModelListener(new TableModelListener()
+ {
+ public void tableChanged(TableModelEvent e)
+ {
+ if (e.getType() == TableModelEvent.INSERT ||
+ e.getType() == TableModelEvent.DELETE)
+ {
+ updateTasksCount();
+ }
+ }
+ });
+ table = new JTable(model);
+ table.setDefaultRenderer(Object.class, new TaskCellRenderer());
+ table.getTableHeader().setVisible(false);
+ table.setDefaultEditor(Object.class, new TaskTableEditor());
+ table.getColumnModel().getColumn(1).setMaxWidth(16);
+ table.getColumnModel().getColumn(1).setMinWidth(16);
+ JScrollPane scroll = new JScrollPane(table);
+ add(scroll);
+ updateTasksCount();
+ }
+
+ @Override
+ public void addNotify()
+ {
+ TaskManager.instance.visit(new TaskManager.TaskVisitor()
+ {
+ public void visit(Task task)
+ {
+ model.addTask(task);
+ }
+ });
+ TaskManager.instance.addTaskListener(this);
+ super.addNotify();
+ }
+
+ @Override
+ public void removeNotify()
+ {
+ TaskManager.instance.removeTaskListener(this);
+ super.removeNotify();
+ model.removeAll();
+ }
+
+ public void waiting(Task task)
+ {
+ model.addTask(task);
+ }
+
+ public void running(Task task)
+ {
+ repaint();
+ }
+
+ public void done(Task task)
+ {
+ model.removeTask(task);
+ }
+
+ public void statusUpdated(Task task)
+ {
+ repaint();
+ }
+
+ public void maximumUpdated(Task task)
+ {
+ repaint();
+ }
+
+ public void valueUpdated(Task task)
+ {
+ repaint();
+ }
+
+ private void updateTasksCount()
+ {
+ remainingCount.setText(jEdit.getProperty("taskmanager.remainingtasks.label",
+ new Object[]{model.getRowCount()}));
+ }
+
+ private static class TaskCellRenderer implements TableCellRenderer
+ {
+ private final JProgressBar progress;
+ private final JButton button;
+ private TaskCellRenderer()
+ {
+ progress = new JProgressBar();
+ button = new JButton(GUIUtilities.loadIcon(jEdit.getProperty("close-buffer.icon")));
+ progress.setStringPainted(true);
+ }
+
+ public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
+ boolean hasFocus, int row, int column)
+ {
+ Task task = (Task) value;
+ if (column == 0)
+ {
+ if (task.getMaximum() == 0L)
+ {
+ progress.setIndeterminate(true);
+ }
+ else
+ {
+ progress.setIndeterminate(false);
+ long max = task.getMaximum();
+ long val = task.getValue();
+ if (max > Integer.MAX_VALUE)
+ {
+ max >>= 10L;
+ val >>= 10L;
+
+ }
+ progress.setMaximum((int) max);
+ progress.setValue((int) val);
+ }
+ progress.setToolTipText(task.getLabel());
+ progress.setString(task.getStatus());
+ return progress;
+ }
+
+ return button;
+ }
+ }
+
+ private class TaskTableEditor extends AbstractCellEditor implements TableCellEditor
+ {
+ private final JButton button;
+
+ private Task task;
+
+ private TaskTableEditor()
+ {
+ button = new JButton(GUIUtilities.loadIcon(jEdit.getProperty("close-buffer.icon")));
+ button.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ task.cancel();
+ stopCellEditing();
+ }
+ });
+ }
+
+ public Object getCellEditorValue()
+ {
+ return null;
+ }
+
+ //{{{ getTableCellEditorComponent() method
+ public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
+ {
+ task = (Task) value;
+ return button;
+ } //}}}
+ }
+
+ private static class TaskTableModel extends AbstractTableModel
+ {
+ private final java.util.List<Task> tasks;
+
+ private TaskTableModel()
+ {
+ tasks = new ArrayList<Task>();
+ }
+
+ public int getRowCount()
+ {
+ return tasks.size();
+ }
+
+ public int getColumnCount()
+ {
+ return 2;
+ }
+
+ @Override
+ public boolean isCellEditable(int rowIndex, int columnIndex)
+ {
+ return columnIndex == 1;
+ }
+
+ public Object getValueAt(int rowIndex, int columnIndex)
+ {
+ return tasks.get(rowIndex);
+ }
+
+ void addTask(final Task task)
+ {
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ tasks.add(task);
+ fireTableRowsInserted(tasks.size()-1, tasks.size()-1);
+ }
+ });
+ }
+
+ void removeTask(final Task task)
+ {
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ int index = tasks.indexOf(task);
+ if (index != -1)
+ {
+ tasks.remove(index);
+ fireTableRowsDeleted(index,index);
+ }
+ }
+ });
+ }
+
+ public void removeAll()
+ {
+ tasks.clear();
+ fireTableDataChanged();
+ }
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/TextAreaDialog.java b/jEdit/org/gjt/sp/jedit/gui/TextAreaDialog.java
index 008ba02..a62620d 100644
--- a/jEdit/org/gjt/sp/jedit/gui/TextAreaDialog.java
+++ b/jEdit/org/gjt/sp/jedit/gui/TextAreaDialog.java
@@ -1,134 +1,134 @@
-/*
- * TextAreaDialog.java - A dialog box with a text area
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.border.*;
-import java.awt.*;
-import java.awt.event.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class TextAreaDialog extends EnhancedDialog
-{
- //{{{ TextAreaDialog constructor
- public TextAreaDialog(Frame frame, String title, String caption,
- Icon icon, String text)
- {
- super(frame,title,true);
-
- init(caption,icon,text);
- } //}}}
-
- //{{{ TextAreaDialog constructor
- public TextAreaDialog(Frame frame, String name, Throwable t)
- {
- this(frame,jEdit.getProperty(name + ".title"),
- jEdit.getProperty(name + ".message"),
- UIManager.getIcon("OptionPane.errorIcon"),
- MiscUtilities.throwableToString(t));
- } //}}}
-
- //{{{ TextAreaDialog constructor
- public TextAreaDialog(Dialog frame, String title, String caption,
- Icon icon, String text)
- {
- super(frame,title,true);
-
- init(caption,icon,text);
- } //}}}
-
- //{{{ TextAreaDialog constructor
- public TextAreaDialog(Dialog frame, String name, Throwable t)
- {
- this(frame,jEdit.getProperty(name + ".title"),
- jEdit.getProperty(name + ".message"),
- UIManager.getIcon("OptionPane.errorIcon"),
- MiscUtilities.throwableToString(t));
- } //}}}
-
- //{{{ init() method
- private void init(String caption,
- Icon icon, String text)
- {
- JPanel content = new JPanel(new BorderLayout(12,12));
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- Box iconBox = new Box(BoxLayout.Y_AXIS);
- iconBox.add(new JLabel(icon));
- iconBox.add(Box.createGlue());
- content.add(BorderLayout.WEST,iconBox);
-
- JPanel centerPanel = new JPanel(new BorderLayout(6,6));
-
- centerPanel.add(BorderLayout.NORTH,
- GUIUtilities.createMultilineLabel(caption));
-
- JTextArea textArea = new JTextArea(10,80);
-
- textArea.setText(text);
- textArea.setLineWrap(true);
- textArea.setCaretPosition(0);
- centerPanel.add(BorderLayout.CENTER,new JScrollPane(textArea));
-
- content.add(BorderLayout.CENTER,centerPanel);
-
- Box buttons = new Box(BoxLayout.X_AXIS);
- buttons.add(Box.createGlue());
- JButton ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(new ActionHandler());
- buttons.add(ok);
- buttons.add(Box.createGlue());
- content.add(BorderLayout.SOUTH,buttons);
-
- getRootPane().setDefaultButton(ok);
-
- pack();
- setLocationRelativeTo(getParent());
- setVisible(true);
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- dispose();
- } //}}}
- } //}}}
-}
+/*
+ * TextAreaDialog.java - A dialog box with a text area
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.border.*;
+import java.awt.*;
+import java.awt.event.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class TextAreaDialog extends EnhancedDialog
+{
+ //{{{ TextAreaDialog constructor
+ public TextAreaDialog(Frame frame, String title, String caption,
+ Icon icon, String text)
+ {
+ super(frame,title,true);
+
+ init(caption,icon,text);
+ } //}}}
+
+ //{{{ TextAreaDialog constructor
+ public TextAreaDialog(Frame frame, String name, Throwable t)
+ {
+ this(frame,jEdit.getProperty(name + ".title"),
+ jEdit.getProperty(name + ".message"),
+ UIManager.getIcon("OptionPane.errorIcon"),
+ MiscUtilities.throwableToString(t));
+ } //}}}
+
+ //{{{ TextAreaDialog constructor
+ public TextAreaDialog(Dialog frame, String title, String caption,
+ Icon icon, String text)
+ {
+ super(frame,title,true);
+
+ init(caption,icon,text);
+ } //}}}
+
+ //{{{ TextAreaDialog constructor
+ public TextAreaDialog(Dialog frame, String name, Throwable t)
+ {
+ this(frame,jEdit.getProperty(name + ".title"),
+ jEdit.getProperty(name + ".message"),
+ UIManager.getIcon("OptionPane.errorIcon"),
+ MiscUtilities.throwableToString(t));
+ } //}}}
+
+ //{{{ init() method
+ private void init(String caption,
+ Icon icon, String text)
+ {
+ JPanel content = new JPanel(new BorderLayout(12,12));
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ Box iconBox = new Box(BoxLayout.Y_AXIS);
+ iconBox.add(new JLabel(icon));
+ iconBox.add(Box.createGlue());
+ content.add(BorderLayout.WEST,iconBox);
+
+ JPanel centerPanel = new JPanel(new BorderLayout(6,6));
+
+ centerPanel.add(BorderLayout.NORTH,
+ GUIUtilities.createMultilineLabel(caption));
+
+ JTextArea textArea = new JTextArea(10,80);
+
+ textArea.setText(text);
+ textArea.setLineWrap(true);
+ textArea.setCaretPosition(0);
+ centerPanel.add(BorderLayout.CENTER,new JScrollPane(textArea));
+
+ content.add(BorderLayout.CENTER,centerPanel);
+
+ Box buttons = new Box(BoxLayout.X_AXIS);
+ buttons.add(Box.createGlue());
+ JButton ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(new ActionHandler());
+ buttons.add(ok);
+ buttons.add(Box.createGlue());
+ content.add(BorderLayout.SOUTH,buttons);
+
+ getRootPane().setDefaultButton(ok);
+
+ pack();
+ setLocationRelativeTo(getParent());
+ setVisible(true);
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ dispose();
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/TipOfTheDay.java b/jEdit/org/gjt/sp/jedit/gui/TipOfTheDay.java
index f8ef1aa..2847f37 100644
--- a/jEdit/org/gjt/sp/jedit/gui/TipOfTheDay.java
+++ b/jEdit/org/gjt/sp/jedit/gui/TipOfTheDay.java
@@ -1,167 +1,167 @@
-/*
- * TipOfTheDay.java - Tip of the day window
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import javax.swing.border.EmptyBorder;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.io.*;
-import java.util.Random;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-public class TipOfTheDay extends EnhancedDialog
-{
- //{{{ TipOfTheDay constructor
- public TipOfTheDay(View view)
- {
- super(view,jEdit.getProperty("tip.title"),false);
-
- JPanel content = new JPanel(new BorderLayout(12,12));
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- JLabel label = new JLabel(jEdit.getProperty("tip.caption"));
- label.setFont(new Font("SansSerif",Font.PLAIN,24));
- label.setForeground(UIManager.getColor("Button.foreground"));
- content.add(BorderLayout.NORTH,label);
-
- tipText = new JEditorPane();
- tipText.setEditable(false);
- tipText.setContentType("text/html");
-
- nextTip();
-
- JScrollPane scroller = new JScrollPane(tipText);
- scroller.setPreferredSize(new Dimension(150,150));
- content.add(BorderLayout.CENTER,scroller);
-
- ActionHandler actionHandler = new ActionHandler();
-
- Box buttons = new Box(BoxLayout.X_AXIS);
-
- showNextTime = new JCheckBox(jEdit.getProperty("tip.show-next-time"),
- jEdit.getBooleanProperty("tip.show"));
- showNextTime.addActionListener(actionHandler);
- buttons.add(showNextTime);
-
- buttons.add(Box.createHorizontalStrut(6));
- buttons.add(Box.createGlue());
-
- nextTip = new JButton(jEdit.getProperty("tip.next-tip"));
- nextTip.addActionListener(actionHandler);
- buttons.add(nextTip);
-
- buttons.add(Box.createHorizontalStrut(6));
-
- close = new JButton(jEdit.getProperty("common.close"));
- close.addActionListener(actionHandler);
- buttons.add(close);
- content.getRootPane().setDefaultButton(close);
-
- Dimension dim = nextTip.getPreferredSize();
- dim.width = Math.max(dim.width,close.getPreferredSize().width);
- nextTip.setPreferredSize(dim);
- close.setPreferredSize(dim);
-
- content.add(BorderLayout.SOUTH,buttons);
-
- setDefaultCloseOperation(DISPOSE_ON_CLOSE);
- pack();
- setLocationRelativeTo(view);
- setVisible(true);
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private JCheckBox showNextTime;
- private JButton nextTip, close;
- private JEditorPane tipText;
- private int currentTip = -1;
- //}}}
-
- //{{{ nextTip() method
- private void nextTip()
- {
- File[] tips = new File(MiscUtilities.constructPath(
- jEdit.getJEditHome(),"doc","tips")).listFiles();
- if(tips == null || tips.length == 0)
- {
- tipText.setText(jEdit.getProperty("tip.not-found"));
- return;
- }
-
- int count = tips.length;
-
- // so that we don't see the same tip again if the user
- // clicks 'Next Tip'
- int tipToShow = currentTip;
- while(tipToShow == currentTip || !tips[tipToShow].getName().endsWith(".html"))
- tipToShow = (new Random().nextInt(Integer.MAX_VALUE)) % count;
- try
- {
- tipText.setPage(tips[tipToShow].toURI().toURL());
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- }
- } //}}}
-
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == showNextTime)
- {
- jEdit.setBooleanProperty("tip.show",showNextTime
- .isSelected());
- }
- else if(source == nextTip)
- nextTip();
- else if(source == close)
- dispose();
- }
- } //}}}
-}
+/*
+ * TipOfTheDay.java - Tip of the day window
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import javax.swing.border.EmptyBorder;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.io.*;
+import java.util.Random;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+public class TipOfTheDay extends EnhancedDialog
+{
+ //{{{ TipOfTheDay constructor
+ public TipOfTheDay(View view)
+ {
+ super(view,jEdit.getProperty("tip.title"),false);
+
+ JPanel content = new JPanel(new BorderLayout(12,12));
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ JLabel label = new JLabel(jEdit.getProperty("tip.caption"));
+ label.setFont(new Font("SansSerif",Font.PLAIN,24));
+ label.setForeground(UIManager.getColor("Button.foreground"));
+ content.add(BorderLayout.NORTH,label);
+
+ tipText = new JEditorPane();
+ tipText.setEditable(false);
+ tipText.setContentType("text/html");
+
+ nextTip();
+
+ JScrollPane scroller = new JScrollPane(tipText);
+ scroller.setPreferredSize(new Dimension(150,150));
+ content.add(BorderLayout.CENTER,scroller);
+
+ ActionHandler actionHandler = new ActionHandler();
+
+ Box buttons = new Box(BoxLayout.X_AXIS);
+
+ showNextTime = new JCheckBox(jEdit.getProperty("tip.show-next-time"),
+ jEdit.getBooleanProperty("tip.show"));
+ showNextTime.addActionListener(actionHandler);
+ buttons.add(showNextTime);
+
+ buttons.add(Box.createHorizontalStrut(6));
+ buttons.add(Box.createGlue());
+
+ nextTip = new JButton(jEdit.getProperty("tip.next-tip"));
+ nextTip.addActionListener(actionHandler);
+ buttons.add(nextTip);
+
+ buttons.add(Box.createHorizontalStrut(6));
+
+ close = new JButton(jEdit.getProperty("common.close"));
+ close.addActionListener(actionHandler);
+ buttons.add(close);
+ content.getRootPane().setDefaultButton(close);
+
+ Dimension dim = nextTip.getPreferredSize();
+ dim.width = Math.max(dim.width,close.getPreferredSize().width);
+ nextTip.setPreferredSize(dim);
+ close.setPreferredSize(dim);
+
+ content.add(BorderLayout.SOUTH,buttons);
+
+ setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+ pack();
+ setLocationRelativeTo(view);
+ setVisible(true);
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private JCheckBox showNextTime;
+ private JButton nextTip, close;
+ private JEditorPane tipText;
+ private int currentTip = -1;
+ //}}}
+
+ //{{{ nextTip() method
+ private void nextTip()
+ {
+ File[] tips = new File(MiscUtilities.constructPath(
+ jEdit.getJEditHome(),"doc","tips")).listFiles();
+ if(tips == null || tips.length == 0)
+ {
+ tipText.setText(jEdit.getProperty("tip.not-found"));
+ return;
+ }
+
+ int count = tips.length;
+
+ // so that we don't see the same tip again if the user
+ // clicks 'Next Tip'
+ int tipToShow = currentTip;
+ while(tipToShow == currentTip || !tips[tipToShow].getName().endsWith(".html"))
+ tipToShow = (new Random().nextInt(Integer.MAX_VALUE)) % count;
+ try
+ {
+ tipText.setPage(tips[tipToShow].toURI().toURL());
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == showNextTime)
+ {
+ jEdit.setBooleanProperty("tip.show",showNextTime
+ .isSelected());
+ }
+ else if(source == nextTip)
+ nextTip();
+ else if(source == close)
+ dispose();
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/ToolBarManager.java b/jEdit/org/gjt/sp/jedit/gui/ToolBarManager.java
index 81ff885..ad72ef6 100644
--- a/jEdit/org/gjt/sp/jedit/gui/ToolBarManager.java
+++ b/jEdit/org/gjt/sp/jedit/gui/ToolBarManager.java
@@ -1,122 +1,122 @@
-/*
- * ToolBarManager.java - Handles tool bars for the View
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui;
-
-//{{{ Imports
-import java.awt.*;
-import java.util.*;
-import java.util.List;
-
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class ToolBarManager
-{
- //{{{ ToolBarManager constructor
- public ToolBarManager(Container top, Container bottom)
- {
- this.top = top;
- this.bottom = bottom;
- } //}}}
-
- //{{{ addToolBar() method
- public void addToolBar(int group, int layer, Component toolbar)
- {
- Entry entry = new Entry(layer, toolbar);
-
- if (group == View.TOP_GROUP)
- addToolBar(top, topToolBars, entry);
- else if (group == View.BOTTOM_GROUP)
- addToolBar(bottom, bottomToolBars, entry);
- else
- throw new InternalError("Invalid tool bar group");
- } //}}}
-
- //{{{ removeToolBar() method
- public void removeToolBar(Component toolbar)
- {
- removeToolBar(top, topToolBars, toolbar);
- removeToolBar(bottom, bottomToolBars, toolbar);
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private Container top;
- private Container bottom;
-
- private List<Entry> topToolBars = new ArrayList<Entry>();
- private List<Entry> bottomToolBars = new ArrayList<Entry>();
- //}}}
-
- //{{{ addToolBar() method
- private static void addToolBar(Container group, List<Entry> toolbars,
- Entry entry)
- {
- // See if we should place this toolbar before any others
- for(int i = 0; i < toolbars.size(); i++)
- {
- if(entry.layer > toolbars.get(i).layer)
- {
- toolbars.add(i,entry);
- group.add(entry.toolbar,i);
- return;
- }
- }
-
- // Place the toolbar at the bottom of the group
- toolbars.add(entry);
- group.add(entry.toolbar);
- } //}}}
-
- //{{{ removeToolBar() method
- private static void removeToolBar(Container group, List<Entry> toolbars,
- Component toolbar)
- {
- for(int i = 0; i < toolbars.size(); i++)
- {
- if(toolbar == toolbars.get(i).toolbar)
- {
- group.remove(toolbar);
- toolbars.remove(i);
-
- return;
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Entry class
- private static class Entry
- {
- int layer;
- Component toolbar;
-
- Entry(int layer, Component toolbar)
- {
- this.layer = layer;
- this.toolbar = toolbar;
- }
- } //}}}
-}
+/*
+ * ToolBarManager.java - Handles tool bars for the View
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+//{{{ Imports
+import java.awt.*;
+import java.util.*;
+import java.util.List;
+
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class ToolBarManager
+{
+ //{{{ ToolBarManager constructor
+ public ToolBarManager(Container top, Container bottom)
+ {
+ this.top = top;
+ this.bottom = bottom;
+ } //}}}
+
+ //{{{ addToolBar() method
+ public void addToolBar(int group, int layer, Component toolbar)
+ {
+ Entry entry = new Entry(layer, toolbar);
+
+ if (group == View.TOP_GROUP)
+ addToolBar(top, topToolBars, entry);
+ else if (group == View.BOTTOM_GROUP)
+ addToolBar(bottom, bottomToolBars, entry);
+ else
+ throw new InternalError("Invalid tool bar group");
+ } //}}}
+
+ //{{{ removeToolBar() method
+ public void removeToolBar(Component toolbar)
+ {
+ removeToolBar(top, topToolBars, toolbar);
+ removeToolBar(bottom, bottomToolBars, toolbar);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private Container top;
+ private Container bottom;
+
+ private List<Entry> topToolBars = new ArrayList<Entry>();
+ private List<Entry> bottomToolBars = new ArrayList<Entry>();
+ //}}}
+
+ //{{{ addToolBar() method
+ private static void addToolBar(Container group, List<Entry> toolbars,
+ Entry entry)
+ {
+ // See if we should place this toolbar before any others
+ for(int i = 0; i < toolbars.size(); i++)
+ {
+ if(entry.layer > toolbars.get(i).layer)
+ {
+ toolbars.add(i,entry);
+ group.add(entry.toolbar,i);
+ return;
+ }
+ }
+
+ // Place the toolbar at the bottom of the group
+ toolbars.add(entry);
+ group.add(entry.toolbar);
+ } //}}}
+
+ //{{{ removeToolBar() method
+ private static void removeToolBar(Container group, List<Entry> toolbars,
+ Component toolbar)
+ {
+ for(int i = 0; i < toolbars.size(); i++)
+ {
+ if(toolbar == toolbars.get(i).toolbar)
+ {
+ group.remove(toolbar);
+ toolbars.remove(i);
+
+ return;
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Entry class
+ private static class Entry
+ {
+ int layer;
+ Component toolbar;
+
+ Entry(int layer, Component toolbar)
+ {
+ this.layer = layer;
+ this.toolbar = toolbar;
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/VariableGridLayout.java b/jEdit/org/gjt/sp/jedit/gui/VariableGridLayout.java
index efee70f..5f13de9 100644
--- a/jEdit/org/gjt/sp/jedit/gui/VariableGridLayout.java
+++ b/jEdit/org/gjt/sp/jedit/gui/VariableGridLayout.java
@@ -1,643 +1,643 @@
-/*
- * VariableGridLayout.java - a grid layout manager with variable cell sizes
- * :tabSize=8:indentSize=8:noTabs=false:
- *
- * Originally written by Dirk Moebius for the jEdit project. This work has been
- * placed into the public domain. You may use this work in any way and for any
- * purpose you wish.
- *
- * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
- * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
- * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
- * OR REDISTRIBUTION OF THIS SOFTWARE.
- */
-
-package org.gjt.sp.jedit.gui;
-
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Insets;
-import java.awt.LayoutManager2;
-
-import java.util.Arrays;
-
-/**
- * The <code>VariableGridLayout</code> class is a layout manager
- * that lays out a container's components in a rectangular grid
- * with variable cell sizes.<p>
- *
- * The container is divided into rectangles, and one component is placed
- * in each rectangle. Each row is as large as the largest component in
- * that row, and each column is as wide as the widest component in
- * that column.<p>
- *
- * This behavior is basically the same as in
- * <code>java.awt.GridLayout</code>, but with different row heights and
- * column widths for each row/column.<p>
- *
- * For example, the following is an applet that lays out six buttons
- * into three rows and two columns:<p>
- *
- * <blockquote><pre>
- * import java.awt.*;
- * import java.applet.Applet;
- * public class ButtonGrid extends Applet {
- * public void init() {
- * setLayout(new VariableGridLayout(VariableGridLayout.FIXED_NUM_COLUMNS, 2));
- * add(new Button("1"));
- * add(new Button("2"));
- * add(new Button("3"));
- * add(new Button("4"));
- * add(new Button("5"));
- * add(new Button("6"));
- * }
- * }
- * </pre></blockquote><p>
- *
- * <b>Programmer's remark:</b> VariableGridLayout could be faster, if it would
- * reside in the package java.awt, because then it could access some
- * package private fields of <code>Container</code> or
- * <code>Component</code>. Instead, it has to call
- * <code>Component.getSize()</code>,
- * which allocates memory on the heap.<p>
- *
- * <b>Todo:</b>
- * <ul>
- * <li>Ability to span components over more than one cell horizontally and vertically.
- * </ul>
- *
- * @author Dirk Moebius, Björn "Vampire" Kautler
- * @version 1.5
- * @see java.awt.GridLayout
- */
-public class VariableGridLayout implements LayoutManager2, java.io.Serializable
-{
- public static final int FIXED_NUM_ROWS = 1;
- public static final int FIXED_NUM_COLUMNS = 2;
-
- private static enum LayoutSize { MINIMUM, MAXIMUM, PREFERRED }
-
- /**
- * Creates a variable grid layout manager with the specified mode,
- * size, horizontal and vertical gap, eventually taking minimum and maximum
- * sizes into account when distributing free space, depending on takeSizesIntoAccount
- * and the specified distance to the borders.
- *
- * @param mode The mode in which to operate. Either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS
- * @param size The amount of rows for mode FIXED_NUM_ROWS or the amount of columns for mode FIXED_NUM_COLUMNS (>0)
- * @param hgap The horizontal space between cells (>=0)
- * @param vgap The vertical space between cells (>=0)
- * @param takeSizesIntoAccount Whether to take minimum and maximum sizes into account when distributing free space
- * @param distanceToBorders The distances to the borders
- * @throws IllegalArgumentException if mode is not either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS or size is <= 0 or hgap or vgap is < 0
- */
- public VariableGridLayout(int mode, int size, int hgap, int vgap, boolean takeSizesIntoAccount, Insets distanceToBorders)
- {
- if (mode != FIXED_NUM_ROWS && mode != FIXED_NUM_COLUMNS)
- {
- throw new IllegalArgumentException("illegal mode; value is " + mode);
- }
- if (size <= 0)
- {
- throw new IllegalArgumentException("size cannot be zero or less; value is " + size);
- }
- if (hgap < 0)
- {
- throw new IllegalArgumentException("hgap cannot be negative; value is " + hgap);
- }
- if (vgap < 0)
- {
- throw new IllegalArgumentException("vgap cannot be negative; value is " + vgap);
- }
- this.mode = mode;
- this.size = size;
- this.hgap = hgap;
- this.vgap = vgap;
- this.takeSizesIntoAccount = takeSizesIntoAccount;
- this.distanceToBorders = (Insets)distanceToBorders.clone();
- }
-
- /**
- * Creates a variable grid layout manager with the specified mode,
- * size, horizontal and vertical gap, eventually taking minimum and maximum
- * sizes into account when distributing free space, depending on takeSizesIntoAccount
- * and zero distance to borders.
- *
- * @param mode The mode in which to operate. Either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS
- * @param size The amount of rows for mode FIXED_NUM_ROWS or the amount of columns for mode FIXED_NUM_COLUMNS (>0)
- * @param hgap The horizontal space between cells (>=0)
- * @param vgap The vertical space between cells (>=0)
- * @param takeSizesIntoAccount Whether to take minimum and maximum sizes into account when distributing free space
- * @throws IllegalArgumentException if mode is not either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS or size is <= 0 or hgap or vgap is < 0
- */
- public VariableGridLayout(int mode, int size, int hgap, int vgap, boolean takeSizesIntoAccount)
- {
- this(mode, size, hgap, vgap, takeSizesIntoAccount, new Insets(0,0,0,0));
- }
-
- /**
- * Creates a variable grid layout manager with the specified mode,
- * size, horizontal and vertical gap, and zero distance to borders.
- * The minimum and maximum Component sizes are not taken into account
- * when distributing free space.
- *
- * @param mode The mode in which to operate. Either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS
- * @param size The amount of rows for mode FIXED_NUM_ROWS or the amount of columns for mode FIXED_NUM_COLUMNS
- * @param hgap The horizontal space between cells
- * @param vgap The vertical space between cells
- * @throws IllegalArgumentException if mode is not either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS or size is <= 0 or hgap or vgap is < 0
- */
- public VariableGridLayout(int mode, int size, int hgap, int vgap)
- {
- this(mode, size, hgap, vgap, false, new Insets(0,0,0,0));
- }
-
- /**
- * Creates a variable grid layout manager with the specified mode
- * and size, zero horizontal and vertical gap, and zero distance to borders.
- * Does not take minimum and maximum Component sizes into account when distributing
- * free space.
- *
- * @param mode The mode in which to operate. Either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS
- * @param size The amount of rows for mode FIXED_NUM_ROWS or the amount of columns for mode FIXED_NUM_COLUMNS
- * @throws IllegalArgumentException if mode is not either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS or size is <= 0
- */
- public VariableGridLayout(int mode, int size)
- {
- this(mode, size, 0, 0, false, new Insets(0,0,0,0));
- }
-
- /**
- * Creates a variable grid layout manager with mode FIXED_NUM_ROWS,
- * number of rows == 1, zero horizontal and vertical gap, and zero distance to borders.
- * Does not take minimum and maximum Component sizes into account when
- * distributing free space.
- */
- public VariableGridLayout()
- {
- this(FIXED_NUM_ROWS, 1, 0, 0, false, new Insets(0,0,0,0));
- }
-
- /**
- * Not used in this class.
- */
- public void addLayoutComponent(String name, Component component)
- {
- }
-
- /**
- * Not used in this class.
- */
- public void addLayoutComponent(Component component, Object constraints)
- {
- }
-
- /**
- * Not used in this class.
- */
- public void removeLayoutComponent(Component component)
- {
- }
-
- /**
- * Always returns 0.5.
- */
- public float getLayoutAlignmentX(Container container)
- {
- return 0.5f;
- }
-
- /**
- * Always returns 0.5.
- */
- public float getLayoutAlignmentY(Container container)
- {
- return 0.5f;
- }
-
- public Dimension preferredLayoutSize(Container parent)
- {
- return getLayoutSize(parent,LayoutSize.PREFERRED);
- }
-
- public Dimension minimumLayoutSize(Container parent)
- {
- return getLayoutSize(parent,LayoutSize.MINIMUM);
- }
-
- public Dimension maximumLayoutSize(Container parent)
- {
- return getLayoutSize(parent,LayoutSize.MAXIMUM);
- }
-
- public void layoutContainer(Container parent)
- {
- synchronized (parent.getTreeLock())
- {
- update(parent);
-
- int ncomponents = parent.getComponentCount();
-
- if (ncomponents == 0)
- {
- return;
- }
-
- // Pass 1: compute minimum, preferred and maximum row heights / column widths
- int total_height = 0;
- Arrays.fill(row_heights,0);
- Arrays.fill(col_widths,0);
- if (takeSizesIntoAccount)
- {
- Arrays.fill(minimum_row_heights,0);
- Arrays.fill(minimum_col_widths,0);
- Arrays.fill(maximum_row_heights,Integer.MAX_VALUE);
- Arrays.fill(maximum_col_widths,Integer.MAX_VALUE);
- }
- for (int r = 0, i = 0; r < nrows; r++)
- {
- for (int c = 0; c < ncols; c++, i++)
- {
- if (i < ncomponents)
- {
- Component comp = parent.getComponent(i);
- Dimension d = comp.getPreferredSize();
- row_heights[r] = Math.max(row_heights[r], d.height);
- col_widths[c] = Math.max(col_widths[c], d.width);
- if (takeSizesIntoAccount)
- {
- d = comp.getMinimumSize();
- minimum_row_heights[r] = Math.max(minimum_row_heights[r], d.height);
- minimum_col_widths[c] = Math.max(minimum_col_widths[c], d.width);
- d = comp.getMaximumSize();
- maximum_row_heights[r] = Math.min(maximum_row_heights[r], d.height);
- maximum_col_widths[c] = Math.min(maximum_col_widths[c], d.width);
- }
- }
- else
- {
- break;
- }
- }
- if (takeSizesIntoAccount)
- {
- // correct cases where
- // minimum_row_heights[row] <= row_heights[row] <= maximum_row_heights[row]
- // is not true by clipping to the minimum_row_heights and maximum_row_heights
- if (minimum_row_heights[r] >= maximum_row_heights[r])
- {
- maximum_row_heights[r] = minimum_row_heights[r];
- row_heights[r] = minimum_row_heights[r];
- }
- else if (row_heights[r] < minimum_row_heights[r])
- {
- row_heights[r] = minimum_row_heights[r];
- }
- else if (row_heights[r] > maximum_row_heights[r])
- {
- row_heights[r] = maximum_row_heights[r];
- }
- }
- total_height += row_heights[r];
- }
-
- int total_width = 0;
- for (int c = 0; c < ncols; c++)
- {
- if (takeSizesIntoAccount)
- {
- // correct cases where
- // minimum_col_widths[col] <= col_widths[col] <= maximum_col_widths[col]
- // is not true by clipping to the minimum_col_widths and maximum_col_widths
- if (minimum_col_widths[c] >= maximum_col_widths[c])
- {
- maximum_col_widths[c] = minimum_col_widths[c];
- col_widths[c] = minimum_col_widths[c];
- }
- else if (col_widths[c] < minimum_col_widths[c])
- {
- col_widths[c] = minimum_col_widths[c];
- }
- else if (col_widths[c] > maximum_col_widths[c])
- {
- col_widths[c] = maximum_col_widths[c];
- }
- }
- total_width += col_widths[c];
- }
-
- // Pass 2: redistribute free space
- Dimension parent_size = parent.getSize();
- Insets insets = parent.getInsets();
- int free_height = parent_size.height
- - insets.top - insets.bottom
- - (nrows - 1) * vgap
- - distanceToBorders.top - distanceToBorders.bottom;
- int free_width = parent_size.width
- - insets.left - insets.right
- - (ncols - 1) * hgap
- - distanceToBorders.left - distanceToBorders.right;
-
- redistributeSpace(total_height,free_height,
- takeSizesIntoAccount,
- nrows,row_heights,
- minimum_row_heights,
- maximum_row_heights);
-
- redistributeSpace(total_width,free_width,
- takeSizesIntoAccount,
- ncols,col_widths,
- minimum_col_widths,
- maximum_col_widths);
-
- // Pass 3: layout components
- for (int r = 0, y = insets.top + distanceToBorders.top, i = 0; r < nrows; y += row_heights[r] + vgap, r++)
- {
- for (int c = 0, x = insets.left + distanceToBorders.left; c < ncols; x += col_widths[c] + hgap, c++, i++)
- {
- if (i < ncomponents)
- {
- Component comp = parent.getComponent(i);
- Dimension d = comp.getMaximumSize();
- int width = col_widths[c];
- int height = row_heights[r];
- int xCorrection = 0;
- int yCorrection = 0;
- if (width > d.width)
- {
- xCorrection = (int)((width - d.width) * comp.getAlignmentX());
- width = d.width;
- }
- if (height > d.height)
- {
- yCorrection = (int)((height-d.height) * comp.getAlignmentY());
- height = d.height;
- }
-
- comp.setBounds(x + xCorrection, y + yCorrection, width, height);
- }
- }
- }
- } // synchronized
- }
-
- public void invalidateLayout(Container container)
- {
- }
-
- /**
- * Returns the string representation of this variable grid layout's values.
- * @return a string representation of this variable grid layout.
- */
- public String toString()
- {
- return getClass().getName() + "[mode="
- + ((FIXED_NUM_ROWS == mode) ? "FIXED_NUM_ROWS"
- : ((FIXED_NUM_COLUMNS == mode) ? "FIXED_NUM_COLUMNS"
- : "UNKNOWN(" + mode + ")")) + ",size=" + size
- + ",hgap=" + hgap + ",vgap=" + vgap
- + ",takeSizesIntoAccount=" + takeSizesIntoAccount
- + ",distanceToBorders=" + distanceToBorders + "]";
- }
-
- /**
- * @param which if LayoutSize.MINIMUM compute minimum layout size,
- * if LayoutSize.MAXIMUM compute maximum layout size,
- * if LayoutSize.PREFERRED compute preferred layout size.
- */
- private Dimension getLayoutSize(Container parent, LayoutSize which)
- {
- synchronized (parent.getTreeLock())
- {
- update(parent);
-
- int ncomponents = parent.getComponentCount();
- long h = 0;
- long w = 0;
-
- for (int r = 0, i = 0; r < nrows; r++)
- {
- int row_height = 0;
- for (int c = 0; c < ncols; c++, i++)
- {
- if (i < ncomponents)
- {
- switch (which)
- {
- case MINIMUM:
- row_height = Math.max(row_height, parent.getComponent(i).getMinimumSize().height);
- break;
-
- case MAXIMUM:
- row_height = Math.max(row_height, parent.getComponent(i).getMaximumSize().height);
- break;
-
- case PREFERRED:
- row_height = Math.max(row_height, parent.getComponent(i).getPreferredSize().height);
- break;
-
- default:
- throw new InternalError("Missing case branch for LayoutSize: " + which);
- }
- }
- }
- h += row_height;
- }
-
- for (int c = 0; c < ncols; c++)
- {
- int col_width = 0;
- for (int r = 0; r < nrows; r++)
- {
- int i = r * ncols + c;
- if (i < ncomponents)
- {
- switch (which)
- {
- case MINIMUM:
- col_width = Math.max(col_width, parent.getComponent(i).getMinimumSize().width);
- break;
-
- case MAXIMUM:
- col_width = Math.max(col_width, parent.getComponent(i).getMaximumSize().width);
- break;
-
- case PREFERRED:
- col_width = Math.max(col_width, parent.getComponent(i).getPreferredSize().width);
- break;
-
- default:
- throw new InternalError("Missing case branch for LayoutSize: " + which);
- }
- }
- }
- w += col_width;
- }
-
- Insets insets = parent.getInsets();
- w += insets.left + insets.right + ((ncols - 1) * hgap) + distanceToBorders.left + distanceToBorders.right;
- h += insets.top + insets.bottom + ((nrows - 1) * vgap) + distanceToBorders.top + distanceToBorders.bottom;
- if (w > Integer.MAX_VALUE)
- {
- w = Integer.MAX_VALUE;
- }
- if (h > Integer.MAX_VALUE)
- {
- h = Integer.MAX_VALUE;
- }
- return new Dimension((int)w,(int)h);
- }
- }
-
- private void update(Container container)
- {
- int ncomponents = container.getComponentCount();
- int old_nrows = nrows;
- int old_ncols = ncols;
- if (this.mode == FIXED_NUM_ROWS)
- {
- nrows = this.size;
- ncols = (ncomponents + nrows - 1) / nrows;
- }
- else
- {
- ncols = this.size;
- nrows = (ncomponents + ncols - 1) / ncols;
- }
- if (old_nrows != nrows)
- {
- row_heights = new int[nrows];
- if (takeSizesIntoAccount)
- {
- minimum_row_heights = new int[nrows];
- maximum_row_heights = new int[nrows];
- }
- }
- if (old_ncols != ncols)
- {
- col_widths = new int[ncols];
- if (takeSizesIntoAccount)
- {
- minimum_col_widths = new int[ncols];
- maximum_col_widths = new int[ncols];
- }
- }
- }
-
- private void redistributeSpace(int total_size, int free_size, boolean takeSizesIntoAccount,
- int nelements, int[] element_sizes,
- int[] minimum_element_sizes, int[] maximum_element_sizes)
- {
- if (total_size != free_size)
- {
- if (takeSizesIntoAccount)
- {
- boolean grow = total_size < free_size;
- // calculate the size that is available for redistribution
- free_size = (free_size - total_size) * (grow ? 1 : -1);
- while (free_size != 0)
- {
- // calculate the amount of elements that can be resized without violating
- // the minimum and maximum sizes and their current cumulated size
- int modifyableAmount = 0;
- int modifySize = 0;
- for (int i = 0 ; i < nelements ; i++)
- {
- if ((grow && (element_sizes[i] < maximum_element_sizes[i])) ||
- (!grow && (element_sizes[i] > minimum_element_sizes[i])))
- {
- modifyableAmount++;
- modifySize += element_sizes[i];
- }
- }
- boolean checkBounds = true;
- // if all elements are at their minimum or maximum size, resize all elements
- if (0 == modifyableAmount)
- {
- for (int i = 0 ; i < nelements ; i++)
- {
- modifySize += element_sizes[i];
- }
- checkBounds = false;
- modifyableAmount = nelements;
- }
- // to prevent an endless loop if the container gets resized to a very small amount
- if (modifySize == 0)
- {
- break;
- }
- // resize the elements
- if (free_size < modifyableAmount)
- {
- for (int i = 0 ; i < nelements ; i++)
- {
- if ((free_size != 0) &&
- (!checkBounds ||
- (checkBounds &&
- (grow && (element_sizes[i] < maximum_element_sizes[i])) ||
- (!grow && (element_sizes[i] > minimum_element_sizes[i])))))
- {
- element_sizes[i] += (grow ? 1 : -1);
- if (0 > element_sizes[i])
- {
- element_sizes[i] = 0;
- }
- free_size--;
- }
- }
- }
- else
- {
- int modifySizeAddition = 0;
- for (int i = 0 ; i < nelements ; i++)
- {
- int modifyableSize = (checkBounds ? (grow ? maximum_element_sizes[i] - element_sizes[i] : element_sizes[i] - minimum_element_sizes[i]) : Integer.MAX_VALUE - element_sizes[i]);
- int elementModifySize = (int)((double)free_size / (double)modifySize * (double)element_sizes[i]);
- if (elementModifySize <= modifyableSize)
- {
- element_sizes[i] += (grow ? elementModifySize : -elementModifySize);
- modifySizeAddition += (grow ? elementModifySize : -elementModifySize);
- free_size -= elementModifySize;
- }
- else
- {
- element_sizes[i] += (grow ? modifyableSize : -modifyableSize);
- modifySizeAddition += (grow ? modifyableSize : -modifyableSize);
- free_size -= modifyableSize;
- }
- if (0 > element_sizes[i])
- {
- element_sizes[i] = 0;
- }
- }
- modifySize += modifySizeAddition;
- }
- }
- }
- else
- {
- double d = (double)free_size / (double)total_size;
- for (int i = 0; i < nelements; i++)
- {
- element_sizes[i] = (int)(element_sizes[i] * d);
- }
- }
- }
- }
-
- private int mode;
- private int size;
- private int hgap;
- private int vgap;
- private boolean takeSizesIntoAccount;
- private Insets distanceToBorders;
- private transient int nrows = -1;
- private transient int ncols = -1;
- private transient int[] minimum_row_heights = null;
- private transient int[] minimum_col_widths = null;
- private transient int[] row_heights = null;
- private transient int[] col_widths = null;
- private transient int[] maximum_row_heights = null;
- private transient int[] maximum_col_widths = null;
-}
+/*
+ * VariableGridLayout.java - a grid layout manager with variable cell sizes
+ * :tabSize=8:indentSize=8:noTabs=false:
+ *
+ * Originally written by Dirk Moebius for the jEdit project. This work has been
+ * placed into the public domain. You may use this work in any way and for any
+ * purpose you wish.
+ *
+ * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
+ * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
+ * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
+ * OR REDISTRIBUTION OF THIS SOFTWARE.
+ */
+
+package org.gjt.sp.jedit.gui;
+
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Insets;
+import java.awt.LayoutManager2;
+
+import java.util.Arrays;
+
+/**
+ * The <code>VariableGridLayout</code> class is a layout manager
+ * that lays out a container's components in a rectangular grid
+ * with variable cell sizes.<p>
+ *
+ * The container is divided into rectangles, and one component is placed
+ * in each rectangle. Each row is as large as the largest component in
+ * that row, and each column is as wide as the widest component in
+ * that column.<p>
+ *
+ * This behavior is basically the same as in
+ * <code>java.awt.GridLayout</code>, but with different row heights and
+ * column widths for each row/column.<p>
+ *
+ * For example, the following is an applet that lays out six buttons
+ * into three rows and two columns:<p>
+ *
+ * <blockquote><pre>
+ * import java.awt.*;
+ * import java.applet.Applet;
+ * public class ButtonGrid extends Applet {
+ * public void init() {
+ * setLayout(new VariableGridLayout(VariableGridLayout.FIXED_NUM_COLUMNS, 2));
+ * add(new Button("1"));
+ * add(new Button("2"));
+ * add(new Button("3"));
+ * add(new Button("4"));
+ * add(new Button("5"));
+ * add(new Button("6"));
+ * }
+ * }
+ * </pre></blockquote><p>
+ *
+ * <b>Programmer's remark:</b> VariableGridLayout could be faster, if it would
+ * reside in the package java.awt, because then it could access some
+ * package private fields of <code>Container</code> or
+ * <code>Component</code>. Instead, it has to call
+ * <code>Component.getSize()</code>,
+ * which allocates memory on the heap.<p>
+ *
+ * <b>Todo:</b>
+ * <ul>
+ * <li>Ability to span components over more than one cell horizontally and vertically.
+ * </ul>
+ *
+ * @author Dirk Moebius, Björn "Vampire" Kautler
+ * @version 1.5
+ * @see java.awt.GridLayout
+ */
+public class VariableGridLayout implements LayoutManager2, java.io.Serializable
+{
+ public static final int FIXED_NUM_ROWS = 1;
+ public static final int FIXED_NUM_COLUMNS = 2;
+
+ private static enum LayoutSize { MINIMUM, MAXIMUM, PREFERRED }
+
+ /**
+ * Creates a variable grid layout manager with the specified mode,
+ * size, horizontal and vertical gap, eventually taking minimum and maximum
+ * sizes into account when distributing free space, depending on takeSizesIntoAccount
+ * and the specified distance to the borders.
+ *
+ * @param mode The mode in which to operate. Either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS
+ * @param size The amount of rows for mode FIXED_NUM_ROWS or the amount of columns for mode FIXED_NUM_COLUMNS (>0)
+ * @param hgap The horizontal space between cells (>=0)
+ * @param vgap The vertical space between cells (>=0)
+ * @param takeSizesIntoAccount Whether to take minimum and maximum sizes into account when distributing free space
+ * @param distanceToBorders The distances to the borders
+ * @throws IllegalArgumentException if mode is not either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS or size is <= 0 or hgap or vgap is < 0
+ */
+ public VariableGridLayout(int mode, int size, int hgap, int vgap, boolean takeSizesIntoAccount, Insets distanceToBorders)
+ {
+ if (mode != FIXED_NUM_ROWS && mode != FIXED_NUM_COLUMNS)
+ {
+ throw new IllegalArgumentException("illegal mode; value is " + mode);
+ }
+ if (size <= 0)
+ {
+ throw new IllegalArgumentException("size cannot be zero or less; value is " + size);
+ }
+ if (hgap < 0)
+ {
+ throw new IllegalArgumentException("hgap cannot be negative; value is " + hgap);
+ }
+ if (vgap < 0)
+ {
+ throw new IllegalArgumentException("vgap cannot be negative; value is " + vgap);
+ }
+ this.mode = mode;
+ this.size = size;
+ this.hgap = hgap;
+ this.vgap = vgap;
+ this.takeSizesIntoAccount = takeSizesIntoAccount;
+ this.distanceToBorders = (Insets)distanceToBorders.clone();
+ }
+
+ /**
+ * Creates a variable grid layout manager with the specified mode,
+ * size, horizontal and vertical gap, eventually taking minimum and maximum
+ * sizes into account when distributing free space, depending on takeSizesIntoAccount
+ * and zero distance to borders.
+ *
+ * @param mode The mode in which to operate. Either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS
+ * @param size The amount of rows for mode FIXED_NUM_ROWS or the amount of columns for mode FIXED_NUM_COLUMNS (>0)
+ * @param hgap The horizontal space between cells (>=0)
+ * @param vgap The vertical space between cells (>=0)
+ * @param takeSizesIntoAccount Whether to take minimum and maximum sizes into account when distributing free space
+ * @throws IllegalArgumentException if mode is not either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS or size is <= 0 or hgap or vgap is < 0
+ */
+ public VariableGridLayout(int mode, int size, int hgap, int vgap, boolean takeSizesIntoAccount)
+ {
+ this(mode, size, hgap, vgap, takeSizesIntoAccount, new Insets(0,0,0,0));
+ }
+
+ /**
+ * Creates a variable grid layout manager with the specified mode,
+ * size, horizontal and vertical gap, and zero distance to borders.
+ * The minimum and maximum Component sizes are not taken into account
+ * when distributing free space.
+ *
+ * @param mode The mode in which to operate. Either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS
+ * @param size The amount of rows for mode FIXED_NUM_ROWS or the amount of columns for mode FIXED_NUM_COLUMNS
+ * @param hgap The horizontal space between cells
+ * @param vgap The vertical space between cells
+ * @throws IllegalArgumentException if mode is not either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS or size is <= 0 or hgap or vgap is < 0
+ */
+ public VariableGridLayout(int mode, int size, int hgap, int vgap)
+ {
+ this(mode, size, hgap, vgap, false, new Insets(0,0,0,0));
+ }
+
+ /**
+ * Creates a variable grid layout manager with the specified mode
+ * and size, zero horizontal and vertical gap, and zero distance to borders.
+ * Does not take minimum and maximum Component sizes into account when distributing
+ * free space.
+ *
+ * @param mode The mode in which to operate. Either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS
+ * @param size The amount of rows for mode FIXED_NUM_ROWS or the amount of columns for mode FIXED_NUM_COLUMNS
+ * @throws IllegalArgumentException if mode is not either FIXED_NUM_ROWS or FIXED_NUM_COLUMNS or size is <= 0
+ */
+ public VariableGridLayout(int mode, int size)
+ {
+ this(mode, size, 0, 0, false, new Insets(0,0,0,0));
+ }
+
+ /**
+ * Creates a variable grid layout manager with mode FIXED_NUM_ROWS,
+ * number of rows == 1, zero horizontal and vertical gap, and zero distance to borders.
+ * Does not take minimum and maximum Component sizes into account when
+ * distributing free space.
+ */
+ public VariableGridLayout()
+ {
+ this(FIXED_NUM_ROWS, 1, 0, 0, false, new Insets(0,0,0,0));
+ }
+
+ /**
+ * Not used in this class.
+ */
+ public void addLayoutComponent(String name, Component component)
+ {
+ }
+
+ /**
+ * Not used in this class.
+ */
+ public void addLayoutComponent(Component component, Object constraints)
+ {
+ }
+
+ /**
+ * Not used in this class.
+ */
+ public void removeLayoutComponent(Component component)
+ {
+ }
+
+ /**
+ * Always returns 0.5.
+ */
+ public float getLayoutAlignmentX(Container container)
+ {
+ return 0.5f;
+ }
+
+ /**
+ * Always returns 0.5.
+ */
+ public float getLayoutAlignmentY(Container container)
+ {
+ return 0.5f;
+ }
+
+ public Dimension preferredLayoutSize(Container parent)
+ {
+ return getLayoutSize(parent,LayoutSize.PREFERRED);
+ }
+
+ public Dimension minimumLayoutSize(Container parent)
+ {
+ return getLayoutSize(parent,LayoutSize.MINIMUM);
+ }
+
+ public Dimension maximumLayoutSize(Container parent)
+ {
+ return getLayoutSize(parent,LayoutSize.MAXIMUM);
+ }
+
+ public void layoutContainer(Container parent)
+ {
+ synchronized (parent.getTreeLock())
+ {
+ update(parent);
+
+ int ncomponents = parent.getComponentCount();
+
+ if (ncomponents == 0)
+ {
+ return;
+ }
+
+ // Pass 1: compute minimum, preferred and maximum row heights / column widths
+ int total_height = 0;
+ Arrays.fill(row_heights,0);
+ Arrays.fill(col_widths,0);
+ if (takeSizesIntoAccount)
+ {
+ Arrays.fill(minimum_row_heights,0);
+ Arrays.fill(minimum_col_widths,0);
+ Arrays.fill(maximum_row_heights,Integer.MAX_VALUE);
+ Arrays.fill(maximum_col_widths,Integer.MAX_VALUE);
+ }
+ for (int r = 0, i = 0; r < nrows; r++)
+ {
+ for (int c = 0; c < ncols; c++, i++)
+ {
+ if (i < ncomponents)
+ {
+ Component comp = parent.getComponent(i);
+ Dimension d = comp.getPreferredSize();
+ row_heights[r] = Math.max(row_heights[r], d.height);
+ col_widths[c] = Math.max(col_widths[c], d.width);
+ if (takeSizesIntoAccount)
+ {
+ d = comp.getMinimumSize();
+ minimum_row_heights[r] = Math.max(minimum_row_heights[r], d.height);
+ minimum_col_widths[c] = Math.max(minimum_col_widths[c], d.width);
+ d = comp.getMaximumSize();
+ maximum_row_heights[r] = Math.min(maximum_row_heights[r], d.height);
+ maximum_col_widths[c] = Math.min(maximum_col_widths[c], d.width);
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+ if (takeSizesIntoAccount)
+ {
+ // correct cases where
+ // minimum_row_heights[row] <= row_heights[row] <= maximum_row_heights[row]
+ // is not true by clipping to the minimum_row_heights and maximum_row_heights
+ if (minimum_row_heights[r] >= maximum_row_heights[r])
+ {
+ maximum_row_heights[r] = minimum_row_heights[r];
+ row_heights[r] = minimum_row_heights[r];
+ }
+ else if (row_heights[r] < minimum_row_heights[r])
+ {
+ row_heights[r] = minimum_row_heights[r];
+ }
+ else if (row_heights[r] > maximum_row_heights[r])
+ {
+ row_heights[r] = maximum_row_heights[r];
+ }
+ }
+ total_height += row_heights[r];
+ }
+
+ int total_width = 0;
+ for (int c = 0; c < ncols; c++)
+ {
+ if (takeSizesIntoAccount)
+ {
+ // correct cases where
+ // minimum_col_widths[col] <= col_widths[col] <= maximum_col_widths[col]
+ // is not true by clipping to the minimum_col_widths and maximum_col_widths
+ if (minimum_col_widths[c] >= maximum_col_widths[c])
+ {
+ maximum_col_widths[c] = minimum_col_widths[c];
+ col_widths[c] = minimum_col_widths[c];
+ }
+ else if (col_widths[c] < minimum_col_widths[c])
+ {
+ col_widths[c] = minimum_col_widths[c];
+ }
+ else if (col_widths[c] > maximum_col_widths[c])
+ {
+ col_widths[c] = maximum_col_widths[c];
+ }
+ }
+ total_width += col_widths[c];
+ }
+
+ // Pass 2: redistribute free space
+ Dimension parent_size = parent.getSize();
+ Insets insets = parent.getInsets();
+ int free_height = parent_size.height
+ - insets.top - insets.bottom
+ - (nrows - 1) * vgap
+ - distanceToBorders.top - distanceToBorders.bottom;
+ int free_width = parent_size.width
+ - insets.left - insets.right
+ - (ncols - 1) * hgap
+ - distanceToBorders.left - distanceToBorders.right;
+
+ redistributeSpace(total_height,free_height,
+ takeSizesIntoAccount,
+ nrows,row_heights,
+ minimum_row_heights,
+ maximum_row_heights);
+
+ redistributeSpace(total_width,free_width,
+ takeSizesIntoAccount,
+ ncols,col_widths,
+ minimum_col_widths,
+ maximum_col_widths);
+
+ // Pass 3: layout components
+ for (int r = 0, y = insets.top + distanceToBorders.top, i = 0; r < nrows; y += row_heights[r] + vgap, r++)
+ {
+ for (int c = 0, x = insets.left + distanceToBorders.left; c < ncols; x += col_widths[c] + hgap, c++, i++)
+ {
+ if (i < ncomponents)
+ {
+ Component comp = parent.getComponent(i);
+ Dimension d = comp.getMaximumSize();
+ int width = col_widths[c];
+ int height = row_heights[r];
+ int xCorrection = 0;
+ int yCorrection = 0;
+ if (width > d.width)
+ {
+ xCorrection = (int)((width - d.width) * comp.getAlignmentX());
+ width = d.width;
+ }
+ if (height > d.height)
+ {
+ yCorrection = (int)((height-d.height) * comp.getAlignmentY());
+ height = d.height;
+ }
+
+ comp.setBounds(x + xCorrection, y + yCorrection, width, height);
+ }
+ }
+ }
+ } // synchronized
+ }
+
+ public void invalidateLayout(Container container)
+ {
+ }
+
+ /**
+ * Returns the string representation of this variable grid layout's values.
+ * @return a string representation of this variable grid layout.
+ */
+ public String toString()
+ {
+ return getClass().getName() + "[mode="
+ + ((FIXED_NUM_ROWS == mode) ? "FIXED_NUM_ROWS"
+ : ((FIXED_NUM_COLUMNS == mode) ? "FIXED_NUM_COLUMNS"
+ : "UNKNOWN(" + mode + ")")) + ",size=" + size
+ + ",hgap=" + hgap + ",vgap=" + vgap
+ + ",takeSizesIntoAccount=" + takeSizesIntoAccount
+ + ",distanceToBorders=" + distanceToBorders + "]";
+ }
+
+ /**
+ * @param which if LayoutSize.MINIMUM compute minimum layout size,
+ * if LayoutSize.MAXIMUM compute maximum layout size,
+ * if LayoutSize.PREFERRED compute preferred layout size.
+ */
+ private Dimension getLayoutSize(Container parent, LayoutSize which)
+ {
+ synchronized (parent.getTreeLock())
+ {
+ update(parent);
+
+ int ncomponents = parent.getComponentCount();
+ long h = 0;
+ long w = 0;
+
+ for (int r = 0, i = 0; r < nrows; r++)
+ {
+ int row_height = 0;
+ for (int c = 0; c < ncols; c++, i++)
+ {
+ if (i < ncomponents)
+ {
+ switch (which)
+ {
+ case MINIMUM:
+ row_height = Math.max(row_height, parent.getComponent(i).getMinimumSize().height);
+ break;
+
+ case MAXIMUM:
+ row_height = Math.max(row_height, parent.getComponent(i).getMaximumSize().height);
+ break;
+
+ case PREFERRED:
+ row_height = Math.max(row_height, parent.getComponent(i).getPreferredSize().height);
+ break;
+
+ default:
+ throw new InternalError("Missing case branch for LayoutSize: " + which);
+ }
+ }
+ }
+ h += row_height;
+ }
+
+ for (int c = 0; c < ncols; c++)
+ {
+ int col_width = 0;
+ for (int r = 0; r < nrows; r++)
+ {
+ int i = r * ncols + c;
+ if (i < ncomponents)
+ {
+ switch (which)
+ {
+ case MINIMUM:
+ col_width = Math.max(col_width, parent.getComponent(i).getMinimumSize().width);
+ break;
+
+ case MAXIMUM:
+ col_width = Math.max(col_width, parent.getComponent(i).getMaximumSize().width);
+ break;
+
+ case PREFERRED:
+ col_width = Math.max(col_width, parent.getComponent(i).getPreferredSize().width);
+ break;
+
+ default:
+ throw new InternalError("Missing case branch for LayoutSize: " + which);
+ }
+ }
+ }
+ w += col_width;
+ }
+
+ Insets insets = parent.getInsets();
+ w += insets.left + insets.right + ((ncols - 1) * hgap) + distanceToBorders.left + distanceToBorders.right;
+ h += insets.top + insets.bottom + ((nrows - 1) * vgap) + distanceToBorders.top + distanceToBorders.bottom;
+ if (w > Integer.MAX_VALUE)
+ {
+ w = Integer.MAX_VALUE;
+ }
+ if (h > Integer.MAX_VALUE)
+ {
+ h = Integer.MAX_VALUE;
+ }
+ return new Dimension((int)w,(int)h);
+ }
+ }
+
+ private void update(Container container)
+ {
+ int ncomponents = container.getComponentCount();
+ int old_nrows = nrows;
+ int old_ncols = ncols;
+ if (this.mode == FIXED_NUM_ROWS)
+ {
+ nrows = this.size;
+ ncols = (ncomponents + nrows - 1) / nrows;
+ }
+ else
+ {
+ ncols = this.size;
+ nrows = (ncomponents + ncols - 1) / ncols;
+ }
+ if (old_nrows != nrows)
+ {
+ row_heights = new int[nrows];
+ if (takeSizesIntoAccount)
+ {
+ minimum_row_heights = new int[nrows];
+ maximum_row_heights = new int[nrows];
+ }
+ }
+ if (old_ncols != ncols)
+ {
+ col_widths = new int[ncols];
+ if (takeSizesIntoAccount)
+ {
+ minimum_col_widths = new int[ncols];
+ maximum_col_widths = new int[ncols];
+ }
+ }
+ }
+
+ private void redistributeSpace(int total_size, int free_size, boolean takeSizesIntoAccount,
+ int nelements, int[] element_sizes,
+ int[] minimum_element_sizes, int[] maximum_element_sizes)
+ {
+ if (total_size != free_size)
+ {
+ if (takeSizesIntoAccount)
+ {
+ boolean grow = total_size < free_size;
+ // calculate the size that is available for redistribution
+ free_size = (free_size - total_size) * (grow ? 1 : -1);
+ while (free_size != 0)
+ {
+ // calculate the amount of elements that can be resized without violating
+ // the minimum and maximum sizes and their current cumulated size
+ int modifyableAmount = 0;
+ int modifySize = 0;
+ for (int i = 0 ; i < nelements ; i++)
+ {
+ if ((grow && (element_sizes[i] < maximum_element_sizes[i])) ||
+ (!grow && (element_sizes[i] > minimum_element_sizes[i])))
+ {
+ modifyableAmount++;
+ modifySize += element_sizes[i];
+ }
+ }
+ boolean checkBounds = true;
+ // if all elements are at their minimum or maximum size, resize all elements
+ if (0 == modifyableAmount)
+ {
+ for (int i = 0 ; i < nelements ; i++)
+ {
+ modifySize += element_sizes[i];
+ }
+ checkBounds = false;
+ modifyableAmount = nelements;
+ }
+ // to prevent an endless loop if the container gets resized to a very small amount
+ if (modifySize == 0)
+ {
+ break;
+ }
+ // resize the elements
+ if (free_size < modifyableAmount)
+ {
+ for (int i = 0 ; i < nelements ; i++)
+ {
+ if ((free_size != 0) &&
+ (!checkBounds ||
+ (checkBounds &&
+ (grow && (element_sizes[i] < maximum_element_sizes[i])) ||
+ (!grow && (element_sizes[i] > minimum_element_sizes[i])))))
+ {
+ element_sizes[i] += (grow ? 1 : -1);
+ if (0 > element_sizes[i])
+ {
+ element_sizes[i] = 0;
+ }
+ free_size--;
+ }
+ }
+ }
+ else
+ {
+ int modifySizeAddition = 0;
+ for (int i = 0 ; i < nelements ; i++)
+ {
+ int modifyableSize = (checkBounds ? (grow ? maximum_element_sizes[i] - element_sizes[i] : element_sizes[i] - minimum_element_sizes[i]) : Integer.MAX_VALUE - element_sizes[i]);
+ int elementModifySize = (int)((double)free_size / (double)modifySize * (double)element_sizes[i]);
+ if (elementModifySize <= modifyableSize)
+ {
+ element_sizes[i] += (grow ? elementModifySize : -elementModifySize);
+ modifySizeAddition += (grow ? elementModifySize : -elementModifySize);
+ free_size -= elementModifySize;
+ }
+ else
+ {
+ element_sizes[i] += (grow ? modifyableSize : -modifyableSize);
+ modifySizeAddition += (grow ? modifyableSize : -modifyableSize);
+ free_size -= modifyableSize;
+ }
+ if (0 > element_sizes[i])
+ {
+ element_sizes[i] = 0;
+ }
+ }
+ modifySize += modifySizeAddition;
+ }
+ }
+ }
+ else
+ {
+ double d = (double)free_size / (double)total_size;
+ for (int i = 0; i < nelements; i++)
+ {
+ element_sizes[i] = (int)(element_sizes[i] * d);
+ }
+ }
+ }
+ }
+
+ private int mode;
+ private int size;
+ private int hgap;
+ private int vgap;
+ private boolean takeSizesIntoAccount;
+ private Insets distanceToBorders;
+ private transient int nrows = -1;
+ private transient int ncols = -1;
+ private transient int[] minimum_row_heights = null;
+ private transient int[] minimum_col_widths = null;
+ private transient int[] row_heights = null;
+ private transient int[] col_widths = null;
+ private transient int[] maximum_row_heights = null;
+ private transient int[] maximum_col_widths = null;
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/package.html b/jEdit/org/gjt/sp/jedit/gui/package.html
index fdc50b2..93d3814 100644
--- a/jEdit/org/gjt/sp/jedit/gui/package.html
+++ b/jEdit/org/gjt/sp/jedit/gui/package.html
@@ -1 +1 @@
-<html><body>Various GUI controls and dialog boxes.</body></html>
+<html><body>Various GUI controls and dialog boxes.</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/BufferSetWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/BufferSetWidgetFactory.java
index 1426fff..eb7d013 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/BufferSetWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/BufferSetWidgetFactory.java
@@ -1,163 +1,154 @@
-/*
- * BufferSetWidgetFactory.java - The bufferSet widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.*;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.msg.ViewUpdate;
-import org.gjt.sp.jedit.msg.EditPaneUpdate;
-import org.gjt.sp.jedit.bufferset.BufferSet;
-//}}}
-
-/**
- * A Statusbar widget that show the bufferSet's scope of the current edit pane.
- *
- * @author Matthieu Casanova
- * @since jEdit 4.3pre15
- */
-public class BufferSetWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() method
- public Widget getWidget(View view)
- {
- Widget bufferSetWidget = new BufferSetWidget(view);
- return bufferSetWidget;
- } //}}}
-
- //{{{ BufferSetWidget class
- private static class BufferSetWidget implements Widget, EBComponent
- {
- private final JLabel bufferSetLabel;
- private final View view;
- private BufferSet.Scope currentScope;
-
- BufferSetWidget(final View view)
- {
- bufferSetLabel = new ToolTipLabel()
- {
- @Override
- public void addNotify()
- {
- super.addNotify();
- EditBus.addToBus(BufferSetWidget.this);
- }
-
- @Override
- public void removeNotify()
- {
- super.removeNotify();
- EditBus.removeFromBus(BufferSetWidget.this);
- }
- };
- this.view = view;
- update();
- bufferSetLabel.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- if (evt.getClickCount() == 2)
- {
- EditPane editPane = view.getEditPane();
- BufferSet.Scope scope = editPane.getBufferSetScope();
- switch (scope)
- {
- case global:
- scope = BufferSet.Scope.view;
- break;
- case view:
- scope = BufferSet.Scope.editpane;
- break;
- case editpane:
- scope = BufferSet.Scope.global;
- break;
- }
- editPane.setBufferSetScope(scope);
- }
- }
- });
- }
-
- //{{{ getComponent() method
- public JComponent getComponent()
- {
- return bufferSetLabel;
- } //}}}
-
- //{{{ update() method
- public void update()
- {
- BufferSet.Scope scope = view.getEditPane().getBufferSetScope();
- if (currentScope == null || !currentScope.equals(scope))
- {
- bufferSetLabel.setText(scope.toString().substring(0,1).toUpperCase());
- bufferSetLabel.setToolTipText(jEdit.getProperty("view.status.bufferset-tooltip", new Object[] {scope}));
- currentScope = scope;
- }
- } //}}}
-
- //{{{ propertiesChanged() method
- public void propertiesChanged()
- {
- // retarded GTK look and feel!
- Font font = new JLabel().getFont();
- //UIManager.getFont("Label.font");
- FontMetrics fm = bufferSetLabel.getFontMetrics(font);
- Dimension dim = new Dimension(Math.max(fm.charWidth('E'),Math.max(fm.charWidth('V'),
- fm.charWidth('G'))),
- fm.getHeight());
- bufferSetLabel.setPreferredSize(dim);
- bufferSetLabel.setMaximumSize(dim);
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage message)
- {
- if (message instanceof ViewUpdate)
- {
- ViewUpdate viewUpdate = (ViewUpdate) message;
- if (viewUpdate.getWhat() == ViewUpdate.EDIT_PANE_CHANGED)
- {
- update();
- }
- }
- else if (message instanceof EditPaneUpdate)
- {
- EditPaneUpdate editPaneUpdate = (EditPaneUpdate) message;
- if (editPaneUpdate.getEditPane() == view.getEditPane() &&
- editPaneUpdate.getWhat() == EditPaneUpdate.BUFFERSET_CHANGED)
- {
- update();
- }
- }
- } //}}}
-
- } //}}}
-
+/*
+ * BufferSetWidgetFactory.java - The bufferSet widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008, 2009 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.*;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.bufferset.BufferSetManager;
+import org.gjt.sp.jedit.msg.EditPaneUpdate;
+import org.gjt.sp.jedit.bufferset.BufferSet;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+//}}}
+
+/**
+ * A Statusbar widget that show the bufferSet's scope of the current edit pane.
+ *
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre15
+ */
+public class BufferSetWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() method
+ public Widget getWidget(View view)
+ {
+ Widget bufferSetWidget = new BufferSetWidget();
+ return bufferSetWidget;
+ } //}}}
+
+ //{{{ BufferSetWidget class
+ private static class BufferSetWidget implements Widget, EBComponent
+ {
+ private final JLabel bufferSetLabel;
+ private BufferSet.Scope currentScope;
+
+ BufferSetWidget()
+ {
+ bufferSetLabel = new ToolTipLabel()
+ {
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ BufferSetWidget.this.update();
+ EditBus.addToBus(BufferSetWidget.this);
+ }
+
+ @Override
+ public void removeNotify()
+ {
+ super.removeNotify();
+ EditBus.removeFromBus(BufferSetWidget.this);
+ }
+ };
+ update();
+ bufferSetLabel.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ if (evt.getClickCount() == 2)
+ {
+ BufferSetManager bufferSetManager = jEdit.getBufferSetManager();
+ BufferSet.Scope scope = bufferSetManager.getScope();
+ switch (scope)
+ {
+ case global:
+ scope = BufferSet.Scope.view;
+ break;
+ case view:
+ scope = BufferSet.Scope.editpane;
+ break;
+ case editpane:
+ scope = BufferSet.Scope.global;
+ break;
+ }
+ bufferSetManager.setScope(scope);
+ }
+ }
+ });
+ }
+
+ //{{{ getComponent() method
+ public JComponent getComponent()
+ {
+ return bufferSetLabel;
+ } //}}}
+
+ //{{{ update() method
+ public void update()
+ {
+ BufferSet.Scope scope = jEdit.getBufferSetManager().getScope();
+ if (currentScope == null || !currentScope.equals(scope))
+ {
+ bufferSetLabel.setText(scope.toString().substring(0,1).toUpperCase());
+ bufferSetLabel.setToolTipText(jEdit.getProperty("view.status.bufferset-tooltip", new Object[] {scope}));
+ currentScope = scope;
+ }
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ public void propertiesChanged()
+ {
+ // retarded GTK look and feel!
+ Font font = new JLabel().getFont();
+ //UIManager.getFont("Label.font");
+ FontMetrics fm = bufferSetLabel.getFontMetrics(font);
+ Dimension dim = new Dimension(Math.max(fm.charWidth('E'),Math.max(fm.charWidth('V'),
+ fm.charWidth('G'))),
+ fm.getHeight());
+ bufferSetLabel.setPreferredSize(dim);
+ bufferSetLabel.setMaximumSize(dim);
+ } //}}}
+
+ //{{{ handleMessage() method
+ public void handleMessage(EBMessage message)
+ {
+ if (message instanceof PropertiesChanged)
+ {
+ PropertiesChanged propertiesChanged = (PropertiesChanged) message;
+ if (propertiesChanged.getSource() instanceof BufferSetManager)
+ {
+ update();
+ }
+ }
+ } //}}}
+
+ } //}}}
+
}
\ No newline at end of file
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/ClockWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/ClockWidgetFactory.java
index 431be02..50c4e4d 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/ClockWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/ClockWidgetFactory.java
@@ -1,153 +1,153 @@
-/*
- * ClockWidgetFactory.java - The clock widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.Point;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseEvent;
-import java.text.DateFormat;
-import java.util.Date;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.Timer;
-import javax.swing.ToolTipManager;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-//}}}
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class ClockWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() method
- public Widget getWidget(View view)
- {
- Widget clock = new ClockWidget();
- return clock;
- } //}}}
-
- //{{{ ClockWidget class
- private static class ClockWidget implements Widget
- {
- private final Clock clock;
- ClockWidget()
- {
- clock = new Clock();
- }
-
- public JComponent getComponent()
- {
- return clock;
- }
-
- public void update()
- {
- }
-
- public void propertiesChanged()
- {
- }
- } //}}}
-
- //{{{ Clock class
- private static class Clock extends JLabel implements ActionListener
- {
- //{{{ Clock constructor
- Clock()
- {
- setForeground(jEdit.getColorProperty("view.status.foreground"));
- setBackground(jEdit.getColorProperty("view.status.background"));
- } //}}}
-
- //{{{ addNotify() method
- @Override
- public void addNotify()
- {
- super.addNotify();
- update();
-
- int millisecondsPerMinute = 1000 * 60;
-
- timer = new Timer(millisecondsPerMinute,this);
- timer.setInitialDelay((int)(
- millisecondsPerMinute
- - System.currentTimeMillis()
- % millisecondsPerMinute) + 500);
- timer.start();
- ToolTipManager.sharedInstance().registerComponent(this);
- } //}}}
-
- //{{{ removeNotify() method
- @Override
- public void removeNotify()
- {
- timer.stop();
- ToolTipManager.sharedInstance().unregisterComponent(this);
- super.removeNotify();
- } //}}}
-
- //{{{ getToolTipText() method
- @Override
- public String getToolTipText()
- {
- return new Date().toString();
- } //}}}
-
- //{{{ getToolTipLocation() method
- @Override
- public Point getToolTipLocation(MouseEvent event)
- {
- return new Point(event.getX(),-20);
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent e)
- {
- update();
- } //}}}
-
- //{{{ Private members
- private Timer timer;
-
- //{{{ getTime() method
- private static String getTime()
- {
- return DateFormat.getTimeInstance(
- DateFormat.SHORT).format(new Date());
- } //}}}
-
- //{{{ update() method
- private void update()
- {
- setText(getTime());
- } //}}}
-
- //}}}
- } //}}}
-}
+/*
+ * ClockWidgetFactory.java - The clock widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.text.DateFormat;
+import java.util.Date;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.Timer;
+import javax.swing.ToolTipManager;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class ClockWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() method
+ public Widget getWidget(View view)
+ {
+ Widget clock = new ClockWidget();
+ return clock;
+ } //}}}
+
+ //{{{ ClockWidget class
+ private static class ClockWidget implements Widget
+ {
+ private final Clock clock;
+ ClockWidget()
+ {
+ clock = new Clock();
+ }
+
+ public JComponent getComponent()
+ {
+ return clock;
+ }
+
+ public void update()
+ {
+ }
+
+ public void propertiesChanged()
+ {
+ }
+ } //}}}
+
+ //{{{ Clock class
+ private static class Clock extends JLabel implements ActionListener
+ {
+ //{{{ Clock constructor
+ Clock()
+ {
+ setForeground(jEdit.getColorProperty("view.status.foreground"));
+ setBackground(jEdit.getColorProperty("view.status.background"));
+ } //}}}
+
+ //{{{ addNotify() method
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ update();
+
+ int millisecondsPerMinute = 1000 * 60;
+
+ timer = new Timer(millisecondsPerMinute,this);
+ timer.setInitialDelay((int)(
+ millisecondsPerMinute
+ - System.currentTimeMillis()
+ % millisecondsPerMinute) + 500);
+ timer.start();
+ ToolTipManager.sharedInstance().registerComponent(this);
+ } //}}}
+
+ //{{{ removeNotify() method
+ @Override
+ public void removeNotify()
+ {
+ timer.stop();
+ ToolTipManager.sharedInstance().unregisterComponent(this);
+ super.removeNotify();
+ } //}}}
+
+ //{{{ getToolTipText() method
+ @Override
+ public String getToolTipText()
+ {
+ return new Date().toString();
+ } //}}}
+
+ //{{{ getToolTipLocation() method
+ @Override
+ public Point getToolTipLocation(MouseEvent event)
+ {
+ return new Point(event.getX(),-20);
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent e)
+ {
+ update();
+ } //}}}
+
+ //{{{ Private members
+ private Timer timer;
+
+ //{{{ getTime() method
+ private static String getTime()
+ {
+ return DateFormat.getTimeInstance(
+ DateFormat.SHORT).format(new Date());
+ } //}}}
+
+ //{{{ update() method
+ private void update()
+ {
+ setText(getTime());
+ } //}}}
+
+ //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/EncodingWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/EncodingWidgetFactory.java
index 2331db5..74d8a4a 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/EncodingWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/EncodingWidgetFactory.java
@@ -1,89 +1,89 @@
-/*
- * EncodingWidgetFactory.java - The encoding widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.gui.BufferOptions;
-import org.gjt.sp.jedit.jEdit;
-//}}}
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class EncodingWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() method
- public Widget getWidget(View view)
- {
- EncodingWidget mode = new EncodingWidget(view);
- return mode;
- } //}}}
-
- //{{{ EncodingWidget class
- private static class EncodingWidget implements Widget
- {
- private final JLabel encoding;
- private final View view;
- public EncodingWidget(final View view)
- {
- encoding = new ToolTipLabel();
- this.view = view;
- encoding.setToolTipText(jEdit.getProperty("view.status.mode-tooltip"));
- encoding.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- if(evt.getClickCount() == 2)
- new BufferOptions(view,view.getBuffer());
- }
- });
- }
-
- public JComponent getComponent()
- {
- return encoding;
- }
-
- public void update()
- {
- Buffer buffer = view.getBuffer();
- if (buffer.isLoaded())
- encoding.setText(buffer.getStringProperty("encoding"));
- }
-
- public void propertiesChanged()
- {
- }
-
- } //}}}
-}
+/*
+ * EncodingWidgetFactory.java - The encoding widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.gui.BufferOptions;
+import org.gjt.sp.jedit.jEdit;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class EncodingWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() method
+ public Widget getWidget(View view)
+ {
+ EncodingWidget mode = new EncodingWidget(view);
+ return mode;
+ } //}}}
+
+ //{{{ EncodingWidget class
+ private static class EncodingWidget implements Widget
+ {
+ private final JLabel encoding;
+ private final View view;
+ public EncodingWidget(final View view)
+ {
+ encoding = new ToolTipLabel();
+ this.view = view;
+ encoding.setToolTipText(jEdit.getProperty("view.status.mode-tooltip"));
+ encoding.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ if(evt.getClickCount() == 2)
+ new BufferOptions(view,view.getBuffer());
+ }
+ });
+ }
+
+ public JComponent getComponent()
+ {
+ return encoding;
+ }
+
+ public void update()
+ {
+ Buffer buffer = view.getBuffer();
+ if (buffer.isLoaded())
+ encoding.setText(buffer.getStringProperty("encoding"));
+ }
+
+ public void propertiesChanged()
+ {
+ }
+
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/FoldWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/FoldWidgetFactory.java
index 714dc83..6558ce1 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/FoldWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/FoldWidgetFactory.java
@@ -1,89 +1,89 @@
-/*
- * FoldWidgetFactory.java - The fold widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.gui.BufferOptions;
-import org.gjt.sp.jedit.jEdit;
-//}}}
-
-/**
- *
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class FoldWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() method
- public Widget getWidget(View view)
- {
- Widget fold = new FoldWidget(view);
- return fold;
- } //}}}
-
- //{{{ FoldWidget class
- private static class FoldWidget implements Widget
- {
- private final JLabel fold;
- private final View view;
- public FoldWidget(final View view)
- {
- fold = new ToolTipLabel();
- this.view = view;
- fold.setToolTipText(jEdit.getProperty("view.status.mode-tooltip"));
- fold.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- if(evt.getClickCount() == 2)
- new BufferOptions(view,view.getBuffer());
- }
- });
- }
-
- public JComponent getComponent()
- {
- return fold;
- }
-
- public void update()
- {
- Buffer buffer = view.getBuffer();
- if (buffer.isLoaded())
- fold.setText((String)view.getBuffer().getProperty("folding"));
- }
-
- public void propertiesChanged()
- {
- }
- } //}}}
-}
+/*
+ * FoldWidgetFactory.java - The fold widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.gui.BufferOptions;
+import org.gjt.sp.jedit.jEdit;
+//}}}
+
+/**
+ *
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class FoldWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() method
+ public Widget getWidget(View view)
+ {
+ Widget fold = new FoldWidget(view);
+ return fold;
+ } //}}}
+
+ //{{{ FoldWidget class
+ private static class FoldWidget implements Widget
+ {
+ private final JLabel fold;
+ private final View view;
+ public FoldWidget(final View view)
+ {
+ fold = new ToolTipLabel();
+ this.view = view;
+ fold.setToolTipText(jEdit.getProperty("view.status.mode-tooltip"));
+ fold.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ if(evt.getClickCount() == 2)
+ new BufferOptions(view,view.getBuffer());
+ }
+ });
+ }
+
+ public JComponent getComponent()
+ {
+ return fold;
+ }
+
+ public void update()
+ {
+ Buffer buffer = view.getBuffer();
+ if (buffer.isLoaded())
+ fold.setText((String)view.getBuffer().getProperty("folding"));
+ }
+
+ public void propertiesChanged()
+ {
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/LineSepWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/LineSepWidgetFactory.java
index 7c2424c..3688e01 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/LineSepWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/LineSepWidgetFactory.java
@@ -1,115 +1,115 @@
-/*
- * LineSepWidgetFactory.java - The line separator widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.SwingConstants;
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class LineSepWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() method
- public Widget getWidget(View view)
- {
- Widget lineSep = new LineSepWidget(view);
- return lineSep;
- } //}}}
-
- //{{{ LineSepWidget class
- private static class LineSepWidget implements Widget
- {
- private final JLabel lineSep;
- private final View view;
-
- //{{{ LineSepWidget constructor
- LineSepWidget(final View view)
- {
- lineSep = new ToolTipLabel();
- lineSep.setHorizontalAlignment(SwingConstants.CENTER);
- lineSep.setToolTipText(jEdit.getProperty("view.status.linesep-tooltip"));
- this.view = view;
- lineSep.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- view.getBuffer().toggleLineSeparator(view);
- }
- });
- } //}}}
-
-
- //{{{ getComponent() method
- public JComponent getComponent()
- {
- return lineSep;
- } //}}}
-
-
- //{{{ update() method
- public void update()
- {
- Buffer buffer = view.getBuffer();
- String lineSep = buffer.getStringProperty(JEditBuffer.LINESEP);
- if("\n".equals(lineSep))
- this.lineSep.setText("U");
- else if("\r\n".equals(lineSep))
- this.lineSep.setText("W");
- else if("\r".equals(lineSep))
- this.lineSep.setText("M");
- } //}}}
-
-
- //{{{ propertiesChanged() method
- public void propertiesChanged()
- {
- // retarded GTK look and feel!
- Font font = new JLabel().getFont();
- //UIManager.getFont("Label.font");
- FontMetrics fm = lineSep.getFontMetrics(font);
- Dimension dim = new Dimension(Math.max(
- Math.max(fm.charWidth('U'),
- fm.charWidth('W')),
- fm.charWidth('M')) + 1,
- fm.getHeight());
- lineSep.setPreferredSize(dim);
- lineSep.setMaximumSize(dim);
- } //}}}
- } //}}}
-
-}
+/*
+ * LineSepWidgetFactory.java - The line separator widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.SwingConstants;
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class LineSepWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() method
+ public Widget getWidget(View view)
+ {
+ Widget lineSep = new LineSepWidget(view);
+ return lineSep;
+ } //}}}
+
+ //{{{ LineSepWidget class
+ private static class LineSepWidget implements Widget
+ {
+ private final JLabel lineSep;
+ private final View view;
+
+ //{{{ LineSepWidget constructor
+ LineSepWidget(final View view)
+ {
+ lineSep = new ToolTipLabel();
+ lineSep.setHorizontalAlignment(SwingConstants.CENTER);
+ lineSep.setToolTipText(jEdit.getProperty("view.status.linesep-tooltip"));
+ this.view = view;
+ lineSep.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ view.getBuffer().toggleLineSeparator(view);
+ }
+ });
+ } //}}}
+
+
+ //{{{ getComponent() method
+ public JComponent getComponent()
+ {
+ return lineSep;
+ } //}}}
+
+
+ //{{{ update() method
+ public void update()
+ {
+ Buffer buffer = view.getBuffer();
+ String lineSep = buffer.getStringProperty(JEditBuffer.LINESEP);
+ if("\n".equals(lineSep))
+ this.lineSep.setText("U");
+ else if("\r\n".equals(lineSep))
+ this.lineSep.setText("W");
+ else if("\r".equals(lineSep))
+ this.lineSep.setText("M");
+ } //}}}
+
+
+ //{{{ propertiesChanged() method
+ public void propertiesChanged()
+ {
+ // retarded GTK look and feel!
+ Font font = new JLabel().getFont();
+ //UIManager.getFont("Label.font");
+ FontMetrics fm = lineSep.getFontMetrics(font);
+ Dimension dim = new Dimension(Math.max(
+ Math.max(fm.charWidth('U'),
+ fm.charWidth('W')),
+ fm.charWidth('M')) + 1,
+ fm.getHeight());
+ lineSep.setPreferredSize(dim);
+ lineSep.setMaximumSize(dim);
+ } //}}}
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java
index 035e929..aad55c9 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java
@@ -1,251 +1,251 @@
-/*
- * MemoryStatusWidgetFactory.java - The memory status widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.awt.Insets;
-import java.awt.Point;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.font.FontRenderContext;
-import java.awt.font.LineMetrics;
-import java.awt.geom.Rectangle2D;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.Timer;
-import javax.swing.ToolTipManager;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-//}}}
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class MemoryStatusWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() constructor
- public Widget getWidget(View view)
- {
- Widget memory = new MemoryStatusWidget(view);
- return memory;
- } //}}}
-
- //{{{ MemoryStatusWidget class
- private static class MemoryStatusWidget implements Widget
- {
- private final MemoryStatus memoryStatus;
- public MemoryStatusWidget(View view)
- {
- memoryStatus = new MemoryStatus(view);
- }
-
- public JComponent getComponent()
- {
- return memoryStatus;
- }
-
- public void update()
- {
- }
-
- public void propertiesChanged()
- {
- }
- } //}}}
-
- //{{{ MemoryStatus class
- private static class MemoryStatus extends JComponent implements ActionListener
- {
- private View view;
- //{{{ MemoryStatus constructor
- MemoryStatus(View view)
- {
- this.view = view;
- // fucking GTK look and feel
- Font font = new JLabel().getFont();
- //Font font = UIManager.getFont("Label.font");
- MemoryStatus.this.setFont(font);
-
- FontRenderContext frc = new FontRenderContext(
- null,false,false);
- Rectangle2D bounds = font.getStringBounds(
- memoryTestStr,frc);
- Dimension dim = new Dimension((int)bounds.getWidth(),
- (int)bounds.getHeight());
- setPreferredSize(dim);
- setMaximumSize(dim);
- lm = font.getLineMetrics(memoryTestStr,frc);
-
- setForeground(jEdit.getColorProperty("view.status.foreground"));
- setBackground(jEdit.getColorProperty("view.status.background"));
-
- progressForeground = jEdit.getColorProperty(
- "view.status.memory.foreground");
- progressBackground = jEdit.getColorProperty(
- "view.status.memory.background");
-
- addMouseListener(new MouseHandler());
- } //}}}
-
- //{{{ addNotify() method
- @Override
- public void addNotify()
- {
- super.addNotify();
- timer = new Timer(2000,this);
- timer.start();
- ToolTipManager.sharedInstance().registerComponent(this);
- } //}}}
-
- //{{{ removeNotify() method
- @Override
- public void removeNotify()
- {
- timer.stop();
- ToolTipManager.sharedInstance().unregisterComponent(this);
- super.removeNotify();
- } //}}}
-
- //{{{ getToolTipText() method
- @Override
- public String getToolTipText()
- {
- Runtime runtime = Runtime.getRuntime();
- long free = runtime.freeMemory();
- long total = runtime.totalMemory();
- long used = total - free;
- args[0] = (int) (used / 1024);
- args[1] = (int) (total / 1024);
- return jEdit.getProperty("view.status.memory-tooltip",args);
- } //}}}
-
- //{{{ getToolTipLocation() method
- @Override
- public Point getToolTipLocation(MouseEvent event)
- {
- return new Point(event.getX(),-20);
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- MemoryStatus.this.repaint();
- } //}}}
-
- //{{{ paintComponent() method
- @Override
- public void paintComponent(Graphics g)
- {
- Insets insets = new Insets(0,0,0,0);//MemoryStatus.this.getBorder().getBorderInsets(this);
-
- Runtime runtime = Runtime.getRuntime();
- long free = runtime.freeMemory();
- long total = runtime.totalMemory();
- long used = total - free;
-
- int width = MemoryStatus.this.getWidth()
- - insets.left - insets.right;
- int height = MemoryStatus.this.getHeight()
- - insets.top - insets.bottom - 1;
-
- float fraction = ((float)used) / total;
-
- g.setColor(progressBackground);
-
- g.fillRect(insets.left,insets.top,
- (int)(width * fraction),
- height);
-
- String str = (used / 1024 / 1024) + "/"
- + (total / 1024 / 1024) + "Mb";
-
- FontRenderContext frc = new FontRenderContext(null,false,false);
-
- Rectangle2D bounds = g.getFont().getStringBounds(str,frc);
-
- Graphics g2 = g.create();
- g2.setClip(insets.left,insets.top,
- (int)(width * fraction),
- height);
-
- g2.setColor(progressForeground);
-
- g2.drawString(str,
- insets.left + ((int) (width - bounds.getWidth()) / 2),
- (int)(insets.top + lm.getAscent()));
-
- g2.dispose();
-
- g2 = g.create();
-
- g2.setClip(insets.left + (int)(width * fraction),
- insets.top,MemoryStatus.this.getWidth()
- - insets.left - (int)(width * fraction),
- height);
-
- g2.setColor(MemoryStatus.this.getForeground());
-
- g2.drawString(str,
- insets.left + ((int) (width - bounds.getWidth()) >> 1),
- (int)(insets.top + lm.getAscent()));
-
- g2.dispose();
- } //}}}
-
- //{{{ Private members
- private static final String memoryTestStr = "999/999Mb";
-
- private final LineMetrics lm;
- private final Color progressForeground;
- private final Color progressBackground;
-
- private final Integer[] args = new Integer[2];
-
-
- private Timer timer;
- //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- @Override
- public void mousePressed(MouseEvent evt)
- {
- if(evt.getClickCount() == 2)
- {
- jEdit.showMemoryDialog(view);
- repaint();
- }
- }
- } //}}}
- } //}}}
-}
+/*
+ * MemoryStatusWidgetFactory.java - The memory status widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Insets;
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.font.FontRenderContext;
+import java.awt.font.LineMetrics;
+import java.awt.geom.Rectangle2D;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.Timer;
+import javax.swing.ToolTipManager;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class MemoryStatusWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() constructor
+ public Widget getWidget(View view)
+ {
+ Widget memory = new MemoryStatusWidget(view);
+ return memory;
+ } //}}}
+
+ //{{{ MemoryStatusWidget class
+ private static class MemoryStatusWidget implements Widget
+ {
+ private final MemoryStatus memoryStatus;
+ public MemoryStatusWidget(View view)
+ {
+ memoryStatus = new MemoryStatus(view);
+ }
+
+ public JComponent getComponent()
+ {
+ return memoryStatus;
+ }
+
+ public void update()
+ {
+ }
+
+ public void propertiesChanged()
+ {
+ }
+ } //}}}
+
+ //{{{ MemoryStatus class
+ private static class MemoryStatus extends JComponent implements ActionListener
+ {
+ private View view;
+ //{{{ MemoryStatus constructor
+ MemoryStatus(View view)
+ {
+ this.view = view;
+ // fucking GTK look and feel
+ Font font = new JLabel().getFont();
+ //Font font = UIManager.getFont("Label.font");
+ MemoryStatus.this.setFont(font);
+
+ FontRenderContext frc = new FontRenderContext(
+ null,false,false);
+ Rectangle2D bounds = font.getStringBounds(
+ memoryTestStr,frc);
+ Dimension dim = new Dimension((int)bounds.getWidth(),
+ (int)bounds.getHeight());
+ setPreferredSize(dim);
+ setMaximumSize(dim);
+ lm = font.getLineMetrics(memoryTestStr,frc);
+
+ setForeground(jEdit.getColorProperty("view.status.foreground"));
+ setBackground(jEdit.getColorProperty("view.status.background"));
+
+ progressForeground = jEdit.getColorProperty(
+ "view.status.memory.foreground");
+ progressBackground = jEdit.getColorProperty(
+ "view.status.memory.background");
+
+ addMouseListener(new MouseHandler());
+ } //}}}
+
+ //{{{ addNotify() method
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ timer = new Timer(2000,this);
+ timer.start();
+ ToolTipManager.sharedInstance().registerComponent(this);
+ } //}}}
+
+ //{{{ removeNotify() method
+ @Override
+ public void removeNotify()
+ {
+ timer.stop();
+ ToolTipManager.sharedInstance().unregisterComponent(this);
+ super.removeNotify();
+ } //}}}
+
+ //{{{ getToolTipText() method
+ @Override
+ public String getToolTipText()
+ {
+ Runtime runtime = Runtime.getRuntime();
+ long free = runtime.freeMemory();
+ long total = runtime.totalMemory();
+ long used = total - free;
+ args[0] = (int) (used / 1024);
+ args[1] = (int) (total / 1024);
+ return jEdit.getProperty("view.status.memory-tooltip",args);
+ } //}}}
+
+ //{{{ getToolTipLocation() method
+ @Override
+ public Point getToolTipLocation(MouseEvent event)
+ {
+ return new Point(event.getX(),-20);
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ MemoryStatus.this.repaint();
+ } //}}}
+
+ //{{{ paintComponent() method
+ @Override
+ public void paintComponent(Graphics g)
+ {
+ Insets insets = new Insets(0,0,0,0);//MemoryStatus.this.getBorder().getBorderInsets(this);
+
+ Runtime runtime = Runtime.getRuntime();
+ long free = runtime.freeMemory();
+ long total = runtime.totalMemory();
+ long used = total - free;
+
+ int width = MemoryStatus.this.getWidth()
+ - insets.left - insets.right;
+ int height = MemoryStatus.this.getHeight()
+ - insets.top - insets.bottom - 1;
+
+ float fraction = ((float)used) / total;
+
+ g.setColor(progressBackground);
+
+ g.fillRect(insets.left,insets.top,
+ (int)(width * fraction),
+ height);
+
+ String str = (used / 1024 / 1024) + "/"
+ + (total / 1024 / 1024) + "Mb";
+
+ FontRenderContext frc = new FontRenderContext(null,false,false);
+
+ Rectangle2D bounds = g.getFont().getStringBounds(str,frc);
+
+ Graphics g2 = g.create();
+ g2.setClip(insets.left,insets.top,
+ (int)(width * fraction),
+ height);
+
+ g2.setColor(progressForeground);
+
+ g2.drawString(str,
+ insets.left + ((int) (width - bounds.getWidth()) / 2),
+ (int)(insets.top + lm.getAscent()));
+
+ g2.dispose();
+
+ g2 = g.create();
+
+ g2.setClip(insets.left + (int)(width * fraction),
+ insets.top,MemoryStatus.this.getWidth()
+ - insets.left - (int)(width * fraction),
+ height);
+
+ g2.setColor(MemoryStatus.this.getForeground());
+
+ g2.drawString(str,
+ insets.left + ((int) (width - bounds.getWidth()) >> 1),
+ (int)(insets.top + lm.getAscent()));
+
+ g2.dispose();
+ } //}}}
+
+ //{{{ Private members
+ private static final String memoryTestStr = "999/999Mb";
+
+ private final LineMetrics lm;
+ private final Color progressForeground;
+ private final Color progressBackground;
+
+ private final Integer[] args = new Integer[2];
+
+
+ private Timer timer;
+ //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ if(evt.getClickCount() == 2)
+ {
+ jEdit.showMemoryDialog(view);
+ repaint();
+ }
+ }
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/ModeWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/ModeWidgetFactory.java
index 82e4d5c..7730c2b 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/ModeWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/ModeWidgetFactory.java
@@ -1,90 +1,90 @@
-/*
- * ModeWidgetFactory.java - The mode widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.gui.BufferOptions;
-import org.gjt.sp.jedit.jEdit;
-//}}}
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class ModeWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() method
- public Widget getWidget(View view)
- {
- ModeWidget mode = new ModeWidget(view);
- return mode;
- } //}}}
-
- //{{{ ModeWidget class
- private static class ModeWidget implements Widget
- {
- private final JLabel mode;
- private final View view;
- public ModeWidget(final View view)
- {
- mode = new ToolTipLabel();
- this.view = view;
- mode.setToolTipText(jEdit.getProperty("view.status.mode-tooltip"));
- mode.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- if(evt.getClickCount() == 2)
- new BufferOptions(view,view.getBuffer());
- }
- });
- }
-
- public JComponent getComponent()
- {
- return mode;
- }
-
- public void update()
- {
- Buffer buffer = view.getBuffer();
- if (buffer.isLoaded())
- mode.setText(buffer.getMode().toString());
- }
-
- public void propertiesChanged()
- {
- }
-
- } //}}}
-
-}
+/*
+ * ModeWidgetFactory.java - The mode widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.gui.BufferOptions;
+import org.gjt.sp.jedit.jEdit;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class ModeWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() method
+ public Widget getWidget(View view)
+ {
+ ModeWidget mode = new ModeWidget(view);
+ return mode;
+ } //}}}
+
+ //{{{ ModeWidget class
+ private static class ModeWidget implements Widget
+ {
+ private final JLabel mode;
+ private final View view;
+ public ModeWidget(final View view)
+ {
+ mode = new ToolTipLabel();
+ this.view = view;
+ mode.setToolTipText(jEdit.getProperty("view.status.mode-tooltip"));
+ mode.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ if(evt.getClickCount() == 2)
+ new BufferOptions(view,view.getBuffer());
+ }
+ });
+ }
+
+ public JComponent getComponent()
+ {
+ return mode;
+ }
+
+ public void update()
+ {
+ Buffer buffer = view.getBuffer();
+ if (buffer.isLoaded())
+ mode.setText(buffer.getMode().toString());
+ }
+
+ public void propertiesChanged()
+ {
+ }
+
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/MultiSelectWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/MultiSelectWidgetFactory.java
index 5b9e6f9..95e24d4 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/MultiSelectWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/MultiSelectWidgetFactory.java
@@ -1,106 +1,113 @@
-/*
- * MultiSelectWidgetFactory.java - The clock widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.SwingConstants;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-//}}}
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class MultiSelectWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() method
- public Widget getWidget(View view)
- {
- Widget multiSelect = new MultiSelectWidget(view);
- return multiSelect;
- } //}}}
-
- //{{{ MultiSelectWidget class
- private static class MultiSelectWidget implements Widget
- {
- private final JLabel multiSelect;
- private final View view;
- MultiSelectWidget(final View view)
- {
- multiSelect = new ToolTipLabel();
- multiSelect.setHorizontalAlignment(SwingConstants.CENTER);
- multiSelect.setToolTipText(jEdit.getProperty("view.status.multi-tooltip"));
- this.view = view;
- multiSelect.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent e)
- {
- JEditTextArea textArea = view.getTextArea();
- if (textArea != null)
- textArea.toggleMultipleSelectionEnabled();
- }
- });
- }
-
- public JComponent getComponent()
- {
- return multiSelect;
- }
-
- public void update()
- {
- JEditTextArea textArea = view.getTextArea();
- if (textArea != null)
- {
- multiSelect.setText(textArea.isMultipleSelectionEnabled()
- ? "M" : "-");
- }
- }
-
- public void propertiesChanged()
- {
- // retarded GTK look and feel!
- Font font = new JLabel().getFont();
- //UIManager.getFont("Label.font");
- FontMetrics fm = multiSelect.getFontMetrics(font);
- Dimension dim = new Dimension(
- Math.max(fm.charWidth('-'),fm.charWidth('M')) + 1,
- fm.getHeight());
- multiSelect.setPreferredSize(dim);
- multiSelect.setMaximumSize(dim);
- }
- } //}}}
-
-}
+/*
+ * MultiSelectWidgetFactory.java - The clock widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.*;
+
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.gui.CompletionPopup;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class MultiSelectWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() method
+ public Widget getWidget(View view)
+ {
+ Widget multiSelect = new MultiSelectWidget(view);
+ return multiSelect;
+ } //}}}
+
+ //{{{ MultiSelectWidget class
+ private static class MultiSelectWidget implements Widget
+ {
+ private final JLabel multiSelect;
+ private final View view;
+ MultiSelectWidget(final View view)
+ {
+ multiSelect = new ToolTipLabel();
+ multiSelect.setHorizontalAlignment(SwingConstants.CENTER);
+ multiSelect.setToolTipText(jEdit.getProperty("view.status.multi-tooltip"));
+ this.view = view;
+ multiSelect.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent e)
+ {
+ JEditTextArea textArea = view.getTextArea();
+ if (textArea != null)
+ textArea.toggleMultipleSelectionEnabled();
+ }
+ });
+ }
+
+ public JComponent getComponent()
+ {
+ return multiSelect;
+ }
+
+ public void update()
+ {
+ JEditTextArea textArea = view.getTextArea();
+ if (textArea != null)
+ {
+ if (textArea.isMultipleSelectionEnabled())
+ {
+ multiSelect.setText("M");
+ multiSelect.setEnabled(true);
+ }
+ else
+ {
+ multiSelect.setText("m");
+ multiSelect.setEnabled(false);
+ }
+ }
+ }
+
+ public void propertiesChanged()
+ {
+ // retarded GTK look and feel!
+ Font font = new JLabel().getFont();
+ //UIManager.getFont("Label.font");
+ FontMetrics fm = multiSelect.getFontMetrics(font);
+ Dimension dim = new Dimension(
+ Math.max(fm.charWidth('m'),fm.charWidth('M')) + 1,
+ fm.getHeight());
+ multiSelect.setPreferredSize(dim);
+ multiSelect.setMaximumSize(dim);
+ }
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/OverwriteWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/OverwriteWidgetFactory.java
index a8a286f..02967d3 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/OverwriteWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/OverwriteWidgetFactory.java
@@ -1,110 +1,120 @@
-/*
- * OverwriteWidgetFactory.java - The overwrite widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.SwingConstants;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-//}}}
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class OverwriteWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() method
- public Widget getWidget(View view)
- {
- Widget overwrite = new OverwriteWidget(view);
- return overwrite;
- } //}}}
-
- //{{{ OverwriteWidget constructor
- private static class OverwriteWidget implements Widget
- {
- private final JLabel overwrite;
- private final View view;
-
- OverwriteWidget(final View view)
- {
- overwrite = new ToolTipLabel();
- overwrite.setHorizontalAlignment(SwingConstants.CENTER);
- overwrite.setToolTipText(jEdit.getProperty("view.status.overwrite-tooltip"));
- this.view = view;
- overwrite.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- JEditTextArea textArea = view.getTextArea();
- if (textArea != null)
- textArea.toggleOverwriteEnabled();
- }
- });
- }
-
- //{{{ getComponent() method
- public JComponent getComponent()
- {
- return overwrite;
- } //}}}
-
-
- //{{{ update() method
- public void update()
- {
- JEditTextArea textArea = view.getTextArea();
- if (textArea != null)
- overwrite.setText(textArea.isOverwriteEnabled()
- ? "O" : "-");
- } //}}}
-
-
- //{{{ propertiesChanged() method
- public void propertiesChanged()
- {
- // retarded GTK look and feel!
- Font font = new JLabel().getFont();
- //UIManager.getFont("Label.font");
- FontMetrics fm = overwrite.getFontMetrics(font);
- Dimension dim = new Dimension(
- Math.max(fm.charWidth('-'),fm.charWidth('O')) + 1,
- fm.getHeight());
- overwrite.setPreferredSize(dim);
- overwrite.setMaximumSize(dim);
- } //}}}
-
- } //}}}
-}
+/*
+ * OverwriteWidgetFactory.java - The overwrite widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.SwingConstants;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class OverwriteWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() method
+ public Widget getWidget(View view)
+ {
+ Widget overwrite = new OverwriteWidget(view);
+ return overwrite;
+ } //}}}
+
+ //{{{ OverwriteWidget constructor
+ private static class OverwriteWidget implements Widget
+ {
+ private final JLabel overwrite;
+ private final View view;
+
+ OverwriteWidget(final View view)
+ {
+ overwrite = new ToolTipLabel();
+ overwrite.setHorizontalAlignment(SwingConstants.CENTER);
+ overwrite.setToolTipText(jEdit.getProperty("view.status.overwrite-tooltip"));
+ this.view = view;
+ overwrite.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ JEditTextArea textArea = view.getTextArea();
+ if (textArea != null)
+ textArea.toggleOverwriteEnabled();
+ }
+ });
+ }
+
+ //{{{ getComponent() method
+ public JComponent getComponent()
+ {
+ return overwrite;
+ } //}}}
+
+
+ //{{{ update() method
+ public void update()
+ {
+ JEditTextArea textArea = view.getTextArea();
+ if (textArea != null)
+ {
+ if (textArea.isOverwriteEnabled())
+ {
+ overwrite.setText("O");
+ overwrite.setEnabled(true);
+ }
+ else
+ {
+ overwrite.setText("o");
+ overwrite.setEnabled(false);
+ }
+ }
+ } //}}}
+
+
+ //{{{ propertiesChanged() method
+ public void propertiesChanged()
+ {
+ // retarded GTK look and feel!
+ Font font = new JLabel().getFont();
+ //UIManager.getFont("Label.font");
+ FontMetrics fm = overwrite.getFontMetrics(font);
+ Dimension dim = new Dimension(
+ Math.max(fm.charWidth('o'),fm.charWidth('O')) + 1,
+ fm.getHeight());
+ overwrite.setPreferredSize(dim);
+ overwrite.setMaximumSize(dim);
+ } //}}}
+
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/RectSelectWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/RectSelectWidgetFactory.java
index ddf0eb2..d157c4a 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/RectSelectWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/RectSelectWidgetFactory.java
@@ -1,107 +1,115 @@
-/*
- * RectSelectWidgetFactory.java - The rectangular selection widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.SwingConstants;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-//}}}
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class RectSelectWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() class
- public Widget getWidget(View view)
- {
- Widget rect = new RectSelectWidget(view);
- return rect;
- } //}}}
-
- //{{{ RectSelectWidget class
- private static class RectSelectWidget implements Widget
- {
- private final JLabel rectSelect;
- private final View view;
- RectSelectWidget(final View view)
- {
- rectSelect = new ToolTipLabel();
- rectSelect.setHorizontalAlignment(SwingConstants.CENTER);
- rectSelect.setToolTipText(jEdit.getProperty("view.status.rect-tooltip"));
- this.view = view;
- rectSelect.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- JEditTextArea textArea = view.getTextArea();
- if (textArea != null)
- textArea.toggleRectangularSelectionEnabled();
- }
- });
- }
-
- public JComponent getComponent()
- {
- return rectSelect;
- }
-
- public void update()
- {
- JEditTextArea textArea = view.getTextArea();
- if (textArea != null)
- {
- rectSelect.setText(textArea.isRectangularSelectionEnabled()
- ? "R" : "-");
- }
- }
-
- public void propertiesChanged()
- {
- // retarded GTK look and feel!
- Font font = new JLabel().getFont();
- //UIManager.getFont("Label.font");
- FontMetrics fm = rectSelect.getFontMetrics(font);
- Dimension dim = new Dimension(
- Math.max(fm.charWidth('-'),fm.charWidth('R')) + 1,
- fm.getHeight());
- rectSelect.setPreferredSize(dim);
- rectSelect.setMaximumSize(dim);
-
- }
- } //}}}
-
-}
+/*
+ * RectSelectWidgetFactory.java - The rectangular selection widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.SwingConstants;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class RectSelectWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() class
+ public Widget getWidget(View view)
+ {
+ Widget rect = new RectSelectWidget(view);
+ return rect;
+ } //}}}
+
+ //{{{ RectSelectWidget class
+ private static class RectSelectWidget implements Widget
+ {
+ private final JLabel rectSelect;
+ private final View view;
+ RectSelectWidget(final View view)
+ {
+ rectSelect = new ToolTipLabel();
+ rectSelect.setHorizontalAlignment(SwingConstants.CENTER);
+ rectSelect.setToolTipText(jEdit.getProperty("view.status.rect-tooltip"));
+ this.view = view;
+ rectSelect.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ JEditTextArea textArea = view.getTextArea();
+ if (textArea != null)
+ textArea.toggleRectangularSelectionEnabled();
+ }
+ });
+ }
+
+ public JComponent getComponent()
+ {
+ return rectSelect;
+ }
+
+ public void update()
+ {
+ JEditTextArea textArea = view.getTextArea();
+ if (textArea != null)
+ {
+ if (textArea.isRectangularSelectionEnabled())
+ {
+ rectSelect.setText("R");
+ rectSelect.setEnabled(true);
+ }
+ else
+ {
+ rectSelect.setText("r");
+ rectSelect.setEnabled(false);
+ }
+ }
+ }
+
+ public void propertiesChanged()
+ {
+ // retarded GTK look and feel!
+ Font font = new JLabel().getFont();
+ //UIManager.getFont("Label.font");
+ FontMetrics fm = rectSelect.getFontMetrics(font);
+ Dimension dim = new Dimension(
+ Math.max(fm.charWidth('r'),fm.charWidth('R')) + 1,
+ fm.getHeight());
+ rectSelect.setPreferredSize(dim);
+ rectSelect.setMaximumSize(dim);
+
+ }
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/SelectionLengthWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/SelectionLengthWidgetFactory.java
index 1e24e62..39d58ef 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/SelectionLengthWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/SelectionLengthWidgetFactory.java
@@ -25,6 +25,7 @@ package org.gjt.sp.jedit.gui.statusbar;
//{{{ Imports
import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.EditBus.EBHandler;
import org.gjt.sp.jedit.msg.ViewUpdate;
import org.gjt.sp.jedit.textarea.JEditTextArea;
import org.gjt.sp.jedit.textarea.TextArea;
@@ -49,7 +50,7 @@ public class SelectionLengthWidgetFactory implements StatusWidgetFactory
} //}}}
//{{{ SelectionLengthWidget class
- private static class SelectionLengthWidget implements Widget, EBComponent
+ public static class SelectionLengthWidget implements Widget
{
private final SelectionLength selectionLength;
private final View view;
@@ -62,6 +63,7 @@ public class SelectionLengthWidgetFactory implements StatusWidgetFactory
selectionLength = new SelectionLength();
selectionLength.setForeground(jEdit.getColorProperty("view.status.foreground"));
selectionLength.setBackground(jEdit.getColorProperty("view.status.background"));
+ EditBus.addToBus(this);
}
public JComponent getComponent()
@@ -77,21 +79,18 @@ public class SelectionLengthWidgetFactory implements StatusWidgetFactory
{
}
- public void handleMessage(EBMessage message)
+ @EBHandler
+ public void handleViewUpdate(ViewUpdate viewUpdate)
{
- if (message instanceof ViewUpdate)
+ if (viewUpdate.getView() == view && viewUpdate.getWhat() == ViewUpdate.EDIT_PANE_CHANGED)
{
- ViewUpdate viewUpdate = (ViewUpdate) message;
- if (viewUpdate.getView() == view && viewUpdate.getWhat() == ViewUpdate.EDIT_PANE_CHANGED)
+ if (textArea != null)
{
- if (textArea != null)
- {
- textArea.removeCaretListener(selectionLength);
- }
- textArea = view.getTextArea();
- if (selectionLength.visible)
- textArea.addCaretListener(selectionLength);
+ textArea.removeCaretListener(selectionLength);
}
+ textArea = view.getTextArea();
+ if (selectionLength.visible)
+ textArea.addCaretListener(selectionLength);
}
}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/StatusWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/StatusWidgetFactory.java
index 8c700ce..9526002 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/StatusWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/StatusWidgetFactory.java
@@ -1,41 +1,41 @@
-/*
- * StatusWidgetFactory.java - The service for widget of the status bar
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-import org.gjt.sp.jedit.View;
-
-/**
- * A widget factory for the status bar.
- *
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public interface StatusWidgetFactory
-{
- /**
- * returns an instance of Widget for the given view
- * @param view the view to which the created widget will belong
- * @return a widget instance
- */
- Widget getWidget(View view);
-}
+/*
+ * StatusWidgetFactory.java - The service for widget of the status bar
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+import org.gjt.sp.jedit.View;
+
+/**
+ * A widget factory for the status bar.
+ *
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public interface StatusWidgetFactory
+{
+ /**
+ * returns an instance of Widget for the given view
+ * @param view the view to which the created widget will belong
+ * @return a widget instance
+ */
+ Widget getWidget(View view);
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/ToolTipLabel.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/ToolTipLabel.java
index 09e6c6e..08e1dbf 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/ToolTipLabel.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/ToolTipLabel.java
@@ -1,41 +1,41 @@
-/*
- * ToolTipLabel.java - a label that has his tooltip on the top
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-import java.awt.Point;
-import java.awt.event.MouseEvent;
-import javax.swing.JLabel;
-
-/**
- * @author Slava Pestov
- */
-public class ToolTipLabel extends JLabel
-{
- //{{{ getToolTipLocation() method
- @Override
- public Point getToolTipLocation(MouseEvent event)
- {
- return new Point(event.getX(),-20);
- } //}}}
-}
+/*
+ * ToolTipLabel.java - a label that has his tooltip on the top
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+import java.awt.Point;
+import java.awt.event.MouseEvent;
+import javax.swing.JLabel;
+
+/**
+ * @author Slava Pestov
+ */
+public class ToolTipLabel extends JLabel
+{
+ //{{{ getToolTipLocation() method
+ @Override
+ public Point getToolTipLocation(MouseEvent event)
+ {
+ return new Point(event.getX(),-20);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/Widget.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/Widget.java
index c79883b..ad99e74 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/Widget.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/Widget.java
@@ -1,47 +1,47 @@
-/*
- * Widget.java - The status bar widget interface
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-import javax.swing.JComponent;
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public interface Widget
-{
- /**
- * Returns the component that will be inserted in the status bar
- * @return a JComponent
- */
- JComponent getComponent();
-
- /**
- * a callback telling that the properties have been changed, the widget
- * can update itself if needed
- */
- void propertiesChanged();
-
- /** A refresh is asked to the widget */
- void update();
-}
+/*
+ * Widget.java - The status bar widget interface
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+import javax.swing.JComponent;
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public interface Widget
+{
+ /**
+ * Returns the component that will be inserted in the status bar
+ * @return a JComponent
+ */
+ JComponent getComponent();
+
+ /**
+ * a callback telling that the properties have been changed, the widget
+ * can update itself if needed
+ */
+ void propertiesChanged();
+
+ /** A refresh is asked to the widget */
+ void update();
+}
diff --git a/jEdit/org/gjt/sp/jedit/gui/statusbar/WrapWidgetFactory.java b/jEdit/org/gjt/sp/jedit/gui/statusbar/WrapWidgetFactory.java
index 00e7838..9b6de22 100644
--- a/jEdit/org/gjt/sp/jedit/gui/statusbar/WrapWidgetFactory.java
+++ b/jEdit/org/gjt/sp/jedit/gui/statusbar/WrapWidgetFactory.java
@@ -1,107 +1,116 @@
-/*
- * WrapWidgetFactory.java - The wrap widget service
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2001, 2004 Slava Pestov
- * Portions copyright (C) 2001 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.gui.statusbar;
-
-//{{{ Imports
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.SwingConstants;
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-//}}}
-
-/**
- * @author Matthieu Casanova
- * @since jEdit 4.3pre14
- */
-public class WrapWidgetFactory implements StatusWidgetFactory
-{
- //{{{ getWidget() method
- public Widget getWidget(View view)
- {
- Widget wrap = new WrapWidget(view);
- return wrap;
- } //}}}
-
- //{{{ WrapWidget class
- private static class WrapWidget implements Widget
- {
- private final JLabel wrap;
- private final View view;
- public WrapWidget(final View view)
- {
- wrap = new ToolTipLabel();
- wrap.setHorizontalAlignment(SwingConstants.CENTER);
- wrap.setToolTipText(jEdit.getProperty("view.status.wrap-tooltip"));
- this.view = view;
- wrap.addMouseListener(new MouseAdapter()
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- view.getBuffer().toggleWordWrap(view);
- }
- });
- }
-
- public JComponent getComponent()
- {
- return wrap;
- }
-
- public void update()
- {
- Buffer buffer = view.getBuffer();
- String wrap = buffer.getStringProperty("wrap");
- if(wrap.equals("none"))
- this.wrap.setText("-");
- else if(wrap.equals("hard"))
- this.wrap.setText("H");
- else if(wrap.equals("soft"))
- this.wrap.setText("S");
- }
-
- public void propertiesChanged()
- {
- // retarded GTK look and feel!
- Font font = new JLabel().getFont();
- //UIManager.getFont("Label.font");
- FontMetrics fm = wrap.getFontMetrics(font);
- Dimension dim = new Dimension(Math.max(Math.max(fm.charWidth('-'),
- fm.charWidth('H')),
- fm.charWidth('S')) + 1,
- fm.getHeight());
- wrap.setPreferredSize(dim);
- wrap.setMaximumSize(dim);
- }
- } //}}}
-
-}
+/*
+ * WrapWidgetFactory.java - The wrap widget service
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ * Portions Copyright (C) 2001, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.gui.statusbar;
+
+//{{{ Imports
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.SwingConstants;
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre14
+ */
+public class WrapWidgetFactory implements StatusWidgetFactory
+{
+ //{{{ getWidget() method
+ public Widget getWidget(View view)
+ {
+ Widget wrap = new WrapWidget(view);
+ return wrap;
+ } //}}}
+
+ //{{{ WrapWidget class
+ private static class WrapWidget implements Widget
+ {
+ private final JLabel wrap;
+ private final View view;
+ public WrapWidget(final View view)
+ {
+ wrap = new ToolTipLabel();
+ wrap.setHorizontalAlignment(SwingConstants.CENTER);
+
+ this.view = view;
+ wrap.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ view.getBuffer().toggleWordWrap(view);
+ }
+ });
+ }
+
+ public JComponent getComponent()
+ {
+ return wrap;
+ }
+
+ public void update()
+ {
+ Buffer buffer = view.getBuffer();
+ String wrap = buffer.getStringProperty("wrap");
+ this.wrap.setToolTipText(jEdit.getProperty("view.status.wrap-tooltip",
+ new String[]{jEdit.getProperty("wrap." + wrap)}));
+ if("none".equals(wrap))
+ {
+ this.wrap.setEnabled(false);
+ this.wrap.setText("N");
+ }
+ else
+ {
+ this.wrap.setEnabled(true);
+ if ("hard".equals(wrap))
+ this.wrap.setText("H");
+ else if ("soft".equals(wrap))
+ this.wrap.setText("S");
+ }
+ }
+
+ public void propertiesChanged()
+ {
+ // retarded GTK look and feel!
+ Font font = new JLabel().getFont();
+ //UIManager.getFont("Label.font");
+ FontMetrics fm = wrap.getFontMetrics(font);
+ Dimension dim = new Dimension(Math.max(Math.max(fm.charWidth('N'),
+ fm.charWidth('H')),
+ fm.charWidth('S')) + 1,
+ fm.getHeight());
+ wrap.setPreferredSize(dim);
+ wrap.setMaximumSize(dim);
+ }
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/help/HelpHistoryModel.java b/jEdit/org/gjt/sp/jedit/help/HelpHistoryModel.java
index 837109f..bb79aa4 100644
--- a/jEdit/org/gjt/sp/jedit/help/HelpHistoryModel.java
+++ b/jEdit/org/gjt/sp/jedit/help/HelpHistoryModel.java
@@ -1,247 +1,247 @@
-/*
- * HelpHistoryModel.java - History Model for Help GUI
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Nicholas O'Leary
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.help;
-
-import java.net.URL;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * History model used by the help browser
- * @author Nicholas O'Leary
- * @version $Id: HelpHistoryModel.java 14598 2009-02-07 18:52:28Z kpouer $
- */
-public class HelpHistoryModel
-{
- //{{{ HelpHistoryModel constructor
- public HelpHistoryModel(int size)
- {
- history = new HistoryEntry[size];
- listeners = new ArrayList<HelpHistoryModelListener>();
- } //}}}
-
- //{{{ forward() method
- HistoryEntry forward(HelpViewer helpViewer)
- {
- if(history.length - historyPos <= 1)
- {
- return null;
- }
- if (history[historyPos] == null)
- {
- return null;
- }
- setCurrentScrollPosition(helpViewer.getCurrentPage(),helpViewer.getCurrentScrollPosition());
- HistoryEntry result = new HistoryEntry(history[historyPos]);
- historyPos++;
- fireUpdate();
- return result;
- } //}}}
-
- //{{{ hasNext() method
- public boolean hasNext()
- {
- return !((history.length - historyPos <= 1) ||
- (history[historyPos] == null));
- } //}}}
-
- //{{{ back() method
- HistoryEntry back(HelpViewer helpViewer)
- {
- if (historyPos <= 1)
- {
- return null;
- }
- setCurrentScrollPosition(helpViewer.getCurrentPage(),helpViewer.getCurrentScrollPosition());
- HistoryEntry result = new HistoryEntry(history[--historyPos - 1]);
- fireUpdate();
- return result;
- } //}}}
-
- //{{{ hasPrevious() method
- public boolean hasPrevious()
- {
- return (historyPos>1);
- } //}}}
-
- //{{{ addToHistory() method
- public void addToHistory(String url)
- {
- history[historyPos] = new HistoryEntry(url,url,0);
- if(historyPos + 1 == history.length)
- {
- System.arraycopy(history,1,history,
- 0,history.length - 1);
- history[historyPos] = null;
- }
- else
- {
- historyPos++;
- for (int i = historyPos ; i<history.length ; i++)
- {
- history[i] = null;
- }
- }
- fireUpdate();
- } //}}}
-
- //{{{ setCurrentScrollPosition() method
- public void setCurrentScrollPosition(URL currentPage, int scrollPosition)
- {
- if ((null != currentPage) && (historyPos >= 1) &&
- (currentPage.toString().equals(history[historyPos-1].url)))
- {
- history[historyPos-1].scrollPosition = scrollPosition;
- }
- } //}}}
-
- //{{{ setCurrentEntry() method
- public void setCurrentEntry(HistoryEntry entry)
- {
- for (int i=0 ; i<history.length ; i++)
- {
- if ((history[i] != null) && (history[i].equals(entry)))
- {
- historyPos = i+1;
- fireUpdate();
- break;
- }
- }
- // Do nothing?
- } //}}}
-
- //{{{ updateTitle() method
- public void updateTitle(String url, String title)
- {
- for (int i=0;i<history.length;i++)
- {
- if ((history[i] != null) && history[i].url.equals(url))
- {
- history[i].title = title;
- }
- }
- fireUpdate();
- }//}}}
-
- //{{{ getPreviousURLs() method
- HistoryEntry[] getPreviousURLs()
- {
- if (historyPos<=1)
- {
- return new HelpHistoryModel.HistoryEntry[0];
- }
- HistoryEntry[] previous = new HistoryEntry[historyPos-1];
- System.arraycopy(history,0,previous,0,historyPos-1);
- return previous;
- } //}}}
-
- //{{{ getNextURLs() method
- HistoryEntry[] getNextURLs()
- {
- if (history.length - historyPos <= 1)
- {
- return new HelpHistoryModel.HistoryEntry[0];
- }
- if (history[historyPos] == null)
- {
- return new HelpHistoryModel.HistoryEntry[0];
- }
- HistoryEntry[] next = new HistoryEntry[history.length-historyPos];
- System.arraycopy(history,historyPos,next,0,history.length-historyPos);
- return next;
- } //}}}
-
- //{{{ addHelpHistoryModelListener() method
- public void addHelpHistoryModelListener(HelpHistoryModelListener hhml)
- {
- listeners.add(hhml);
- } //}}}
-
- //{{{ removeHelpHistoryModelListener() method
- public void removeHelpHistoryModelListener(HelpHistoryModelListener hhml)
- {
- listeners.remove(hhml);
- } //}}}
-
- //{{{ fireUpdate() method
- public void fireUpdate()
- {
- for (int i=0 ; i<listeners.size() ; i++)
- {
- listeners.get(i).historyUpdated();
- }
- } //}}}
-
- //{{{ Private members
- private int historyPos;
- private HistoryEntry[] history;
- private List<HelpHistoryModelListener> listeners;
- //}}}
-
- //{{{ Inner Classes
-
- //{{{ HistoryEntry class
- static class HistoryEntry
- {
- String url;
- String title;
- int scrollPosition;
-
- //{{{ HistoryEntry constructor
- HistoryEntry(String url, String title)
- {
- this(url,title,0);
- } //}}}
-
- //{{{ HistoryEntry constructor
- HistoryEntry(HistoryEntry original)
- {
- this(original.url,original.title,original.scrollPosition);
- } //}}}
-
- //{{{ HistoryEntry constructor
- HistoryEntry(String url, String title, int scrollPosition)
- {
- this.url = url;
- this.title = title;
- this.scrollPosition = scrollPosition;
- } //}}}
-
- //{{{ equals() method
- public boolean equals(HistoryEntry he)
- {
- return he.url.equals(this.url) &&
- he.title.equals(this.title) &&
- (he.scrollPosition == scrollPosition);
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- return getClass().getName() + "[url=" + url + ",title=" + title
- + ",scrollPosition=" + scrollPosition + ']';
- } //}}}
- } //}}}
-
- //}}}
-}
+/*
+ * HelpHistoryModel.java - History Model for Help GUI
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Nicholas O'Leary
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.help;
+
+import java.net.URL;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * History model used by the help browser
+ * @author Nicholas O'Leary
+ * @version $Id: HelpHistoryModel.java 14598 2009-02-07 18:52:28Z kpouer $
+ */
+public class HelpHistoryModel
+{
+ //{{{ HelpHistoryModel constructor
+ public HelpHistoryModel(int size)
+ {
+ history = new HistoryEntry[size];
+ listeners = new ArrayList<HelpHistoryModelListener>();
+ } //}}}
+
+ //{{{ forward() method
+ HistoryEntry forward(HelpViewer helpViewer)
+ {
+ if(history.length - historyPos <= 1)
+ {
+ return null;
+ }
+ if (history[historyPos] == null)
+ {
+ return null;
+ }
+ setCurrentScrollPosition(helpViewer.getCurrentPage(),helpViewer.getCurrentScrollPosition());
+ HistoryEntry result = new HistoryEntry(history[historyPos]);
+ historyPos++;
+ fireUpdate();
+ return result;
+ } //}}}
+
+ //{{{ hasNext() method
+ public boolean hasNext()
+ {
+ return !((history.length - historyPos <= 1) ||
+ (history[historyPos] == null));
+ } //}}}
+
+ //{{{ back() method
+ HistoryEntry back(HelpViewer helpViewer)
+ {
+ if (historyPos <= 1)
+ {
+ return null;
+ }
+ setCurrentScrollPosition(helpViewer.getCurrentPage(),helpViewer.getCurrentScrollPosition());
+ HistoryEntry result = new HistoryEntry(history[--historyPos - 1]);
+ fireUpdate();
+ return result;
+ } //}}}
+
+ //{{{ hasPrevious() method
+ public boolean hasPrevious()
+ {
+ return (historyPos>1);
+ } //}}}
+
+ //{{{ addToHistory() method
+ public void addToHistory(String url)
+ {
+ history[historyPos] = new HistoryEntry(url,url,0);
+ if(historyPos + 1 == history.length)
+ {
+ System.arraycopy(history,1,history,
+ 0,history.length - 1);
+ history[historyPos] = null;
+ }
+ else
+ {
+ historyPos++;
+ for (int i = historyPos ; i<history.length ; i++)
+ {
+ history[i] = null;
+ }
+ }
+ fireUpdate();
+ } //}}}
+
+ //{{{ setCurrentScrollPosition() method
+ public void setCurrentScrollPosition(URL currentPage, int scrollPosition)
+ {
+ if ((null != currentPage) && (historyPos >= 1) &&
+ (currentPage.toString().equals(history[historyPos-1].url)))
+ {
+ history[historyPos-1].scrollPosition = scrollPosition;
+ }
+ } //}}}
+
+ //{{{ setCurrentEntry() method
+ public void setCurrentEntry(HistoryEntry entry)
+ {
+ for (int i=0 ; i<history.length ; i++)
+ {
+ if ((history[i] != null) && (history[i].equals(entry)))
+ {
+ historyPos = i+1;
+ fireUpdate();
+ break;
+ }
+ }
+ // Do nothing?
+ } //}}}
+
+ //{{{ updateTitle() method
+ public void updateTitle(String url, String title)
+ {
+ for (int i=0;i<history.length;i++)
+ {
+ if ((history[i] != null) && history[i].url.equals(url))
+ {
+ history[i].title = title;
+ }
+ }
+ fireUpdate();
+ }//}}}
+
+ //{{{ getPreviousURLs() method
+ HistoryEntry[] getPreviousURLs()
+ {
+ if (historyPos<=1)
+ {
+ return new HelpHistoryModel.HistoryEntry[0];
+ }
+ HistoryEntry[] previous = new HistoryEntry[historyPos-1];
+ System.arraycopy(history,0,previous,0,historyPos-1);
+ return previous;
+ } //}}}
+
+ //{{{ getNextURLs() method
+ HistoryEntry[] getNextURLs()
+ {
+ if (history.length - historyPos <= 1)
+ {
+ return new HelpHistoryModel.HistoryEntry[0];
+ }
+ if (history[historyPos] == null)
+ {
+ return new HelpHistoryModel.HistoryEntry[0];
+ }
+ HistoryEntry[] next = new HistoryEntry[history.length-historyPos];
+ System.arraycopy(history,historyPos,next,0,history.length-historyPos);
+ return next;
+ } //}}}
+
+ //{{{ addHelpHistoryModelListener() method
+ public void addHelpHistoryModelListener(HelpHistoryModelListener hhml)
+ {
+ listeners.add(hhml);
+ } //}}}
+
+ //{{{ removeHelpHistoryModelListener() method
+ public void removeHelpHistoryModelListener(HelpHistoryModelListener hhml)
+ {
+ listeners.remove(hhml);
+ } //}}}
+
+ //{{{ fireUpdate() method
+ public void fireUpdate()
+ {
+ for (int i=0 ; i<listeners.size() ; i++)
+ {
+ listeners.get(i).historyUpdated();
+ }
+ } //}}}
+
+ //{{{ Private members
+ private int historyPos;
+ private HistoryEntry[] history;
+ private List<HelpHistoryModelListener> listeners;
+ //}}}
+
+ //{{{ Inner Classes
+
+ //{{{ HistoryEntry class
+ static class HistoryEntry
+ {
+ String url;
+ String title;
+ int scrollPosition;
+
+ //{{{ HistoryEntry constructor
+ HistoryEntry(String url, String title)
+ {
+ this(url,title,0);
+ } //}}}
+
+ //{{{ HistoryEntry constructor
+ HistoryEntry(HistoryEntry original)
+ {
+ this(original.url,original.title,original.scrollPosition);
+ } //}}}
+
+ //{{{ HistoryEntry constructor
+ HistoryEntry(String url, String title, int scrollPosition)
+ {
+ this.url = url;
+ this.title = title;
+ this.scrollPosition = scrollPosition;
+ } //}}}
+
+ //{{{ equals() method
+ public boolean equals(HistoryEntry he)
+ {
+ return he.url.equals(this.url) &&
+ he.title.equals(this.title) &&
+ (he.scrollPosition == scrollPosition);
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return getClass().getName() + "[url=" + url + ",title=" + title
+ + ",scrollPosition=" + scrollPosition + ']';
+ } //}}}
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/help/HelpHistoryModelListener.java b/jEdit/org/gjt/sp/jedit/help/HelpHistoryModelListener.java
index 92cd181..579493f 100644
--- a/jEdit/org/gjt/sp/jedit/help/HelpHistoryModelListener.java
+++ b/jEdit/org/gjt/sp/jedit/help/HelpHistoryModelListener.java
@@ -1,33 +1,33 @@
-/*
- * HelpHistoryModelListener.java - History Model Listener for Help GUI
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Nicholas O'Leary
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.help;
-
-/**
- * Listener interface to montior changes to a HelpHistoryModel
- * @author Nicholas O'Leary
- * @version $Id: HelpHistoryModelListener.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public interface HelpHistoryModelListener
-{
- public void historyUpdated();
-}
+/*
+ * HelpHistoryModelListener.java - History Model Listener for Help GUI
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Nicholas O'Leary
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.help;
+
+/**
+ * Listener interface to montior changes to a HelpHistoryModel
+ * @author Nicholas O'Leary
+ * @version $Id: HelpHistoryModelListener.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public interface HelpHistoryModelListener
+{
+ public void historyUpdated();
+}
diff --git a/jEdit/org/gjt/sp/jedit/help/HelpIndex.java b/jEdit/org/gjt/sp/jedit/help/HelpIndex.java
index c5e60c4..8983002 100644
--- a/jEdit/org/gjt/sp/jedit/help/HelpIndex.java
+++ b/jEdit/org/gjt/sp/jedit/help/HelpIndex.java
@@ -1,395 +1,395 @@
-/*
- * HelpIndex.java - Index for help searching feature
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.help;
-
-//{{{ Imports
-import java.io.*;
-import java.net.*;
-import java.util.zip.*;
-import java.util.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-class HelpIndex
-{
- //{{{ HelpIndex constructor
- public HelpIndex()
- {
- words = new HashMap<String, Object>();
- files = new ArrayList<HelpFile>();
-
- ignoreWord("a");
- ignoreWord("an");
- ignoreWord("and");
- ignoreWord("are");
- ignoreWord("as");
- ignoreWord("be");
- ignoreWord("by");
- ignoreWord("can");
- ignoreWord("do");
- ignoreWord("for");
- ignoreWord("from");
- ignoreWord("how");
- ignoreWord("i");
- ignoreWord("if");
- ignoreWord("in");
- ignoreWord("is");
- ignoreWord("it");
- ignoreWord("not");
- ignoreWord("of");
- ignoreWord("on");
- ignoreWord("or");
- ignoreWord("s");
- ignoreWord("that");
- ignoreWord("the");
- ignoreWord("this");
- ignoreWord("to");
- ignoreWord("will");
- ignoreWord("with");
- ignoreWord("you");
- } //}}}
-
- /* //{{{ HelpIndex constructor
- public HelpIndex(String fileListPath, String wordIndexPath)
- {
- this();
- } //}}} */
-
- //{{{ indexEditorHelp() method
- /**
- * Indexes all available help, including the jEdit user's guide, FAQ,]
- * and plugin documentation.
- */
- public void indexEditorHelp()
- {
- try
- {
- String jEditHome = jEdit.getJEditHome();
- if(jEditHome != null)
- {
- indexDirectory(MiscUtilities.constructPath(jEditHome,"doc","users-guide"));
- indexDirectory(MiscUtilities.constructPath(jEditHome,"doc","FAQ"));
- indexDirectory(MiscUtilities.constructPath(jEditHome,"doc","news43"));
- }
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,this,"Error indexing editor help");
- Log.log(Log.ERROR,this,e);
- }
-
- PluginJAR[] jars = jEdit.getPluginJARs();
- for(int i = 0; i < jars.length; i++)
- {
- try
- {
- indexJAR(jars[i].getZipFile());
- }
- catch(Throwable e)
- {
- Log.log(Log.ERROR,this,"Error indexing JAR: "
- + jars[i].getPath());
- Log.log(Log.ERROR,this,e);
- }
- }
-
- Log.log(Log.DEBUG,this,"Indexed " + words.size() + " words");
- } //}}}
-
- //{{{ indexDirectory() method
- /**
- * Indexes all HTML and text files in the specified directory.
- * @param dir The directory
- */
- public void indexDirectory(String dir) throws Exception
- {
- String[] files = VFSManager.getFileVFS()
- ._listDirectory(null,dir,"*.{html,txt}",true,null);
-
- for(int i = 0; i < files.length; i++)
- {
- indexURL(files[i]);
- }
- } //}}}
-
- //{{{ indexJAR() method
- /**
- * Indexes all HTML and text files in the specified JAR file.
- * @param jar The JAR file
- */
- public void indexJAR(ZipFile jar) throws Exception
- {
- Enumeration e = jar.entries();
- while(e.hasMoreElements())
- {
- ZipEntry entry = (ZipEntry)e.nextElement();
- String name = entry.getName();
- String lname = name.toLowerCase();
- if(lname.endsWith(".html")/* || lname.endsWith(".txt") */)
- {
- // only works for jEdit plugins
- String url = "jeditresource:/" +
- MiscUtilities.getFileName(jar.getName())
- + "!/" + name;
- Log.log(Log.DEBUG,this,url);
- indexStream(jar.getInputStream(entry),url);
- }
- }
- } //}}}
-
- //{{{ indexURL() method
- /**
- * Reads the specified HTML file and adds all words defined therein to the
- * index.
- * @param url The HTML file's URL
- */
- public void indexURL(String url) throws Exception
- {
- InputStream _in;
-
- if(MiscUtilities.isURL(url))
- _in = new URL(url).openStream();
- else
- {
- _in = new FileInputStream(url);
- // hack since HelpViewer needs a URL...
- url = "file:" + url;
- }
-
- indexStream(_in,url);
- } //}}}
-
- //{{{ lookupWord() method
- public Word lookupWord(String word)
- {
- Object o = words.get(word);
- if(o == IGNORE)
- return null;
- else
- return (Word)o;
- } //}}}
-
- //{{{ getFile() method
- public HelpFile getFile(int index)
- {
- return files.get(index);
- } //}}}
-
- //{{{ Private members
- // used to mark words to ignore (see constructor for the list)
- private static Object IGNORE = new Object();
- private Map<String, Object> words;
- private List<HelpFile> files;
-
- //{{{ ignoreWord() method
- private void ignoreWord(String word)
- {
- words.put(word,IGNORE);
- } //}}}
-
- //{{{ indexStream() method
- /**
- * Reads the specified HTML file and adds all words defined therein to the
- * index.
- * @param _in The input stream
- * @param fileName The file
- */
- private void indexStream(InputStream _in, String fileName)
- throws Exception
- {
- HelpFile file = new HelpFile(fileName);
- files.add(file);
- int index = files.size() - 1;
-
- StringBuilder titleText = new StringBuilder();
-
- BufferedReader in = new BufferedReader(
- new InputStreamReader(_in));
-
- try
- {
- StringBuilder word = new StringBuilder();
- boolean insideTag = false;
- boolean insideEntity = false;
-
- boolean title = false;
-
- int c;
- while((c = in.read()) != -1)
- {
- char ch = (char)c;
- if(insideTag)
- {
- if(ch == '>')
- {
- if(word.toString().equals("title"))
- title = true;
- insideTag = false;
- word.setLength(0);
- }
- else
- word.append(ch);
- }
- else if(insideEntity)
- {
- if(ch == ';')
- insideEntity = false;
- }
- else if(ch == '<')
- {
- if(title)
- title = false;
-
- if(word.length() != 0)
- {
- addWord(word.toString(),index,title);
- word.setLength(0);
- }
-
- insideTag = true;
- }
- else if(ch == '&')
- insideEntity = true;
- else if(title)
- titleText.append(ch);
- else if(!Character.isLetterOrDigit(ch))
- {
- if(word.length() != 0)
- {
- addWord(word.toString(),index,title);
- word.setLength(0);
- }
- }
- else
- word.append(ch);
- }
- }
- finally
- {
- in.close();
- }
-
- if(titleText.length() == 0)
- file.title = fileName;
- else
- file.title = titleText.toString();
- } //}}}
-
- //{{{ addWord() method
- private void addWord(String word, int file, boolean title)
- {
- word = word.toLowerCase();
-
- Object o = words.get(word);
- if(o == IGNORE)
- return;
-
- if(o == null)
- words.put(word,new Word(word,file,title));
- else
- ((Word)o).addOccurrence(file,title);
- } //}}}
-
- //}}}
-
- //{{{ Word class
- static class Word
- {
- // how much an occurrence in the title is worth
- static final int TITLE_OCCUR = 10;
-
- // the word
- String word;
-
- // files it occurs in
- int occurCount = 0;
- Occurrence[] occurrences;
-
- Word(String word, int file, boolean title)
- {
- this.word = word;
- occurrences = new Occurrence[5];
- addOccurrence(file,title);
- }
-
- void addOccurrence(int file, boolean title)
- {
- for(int i = 0; i < occurCount; i++)
- {
- if(occurrences[i].file == file)
- {
- occurrences[i].count += (title ? TITLE_OCCUR : 1);
- return;
- }
- }
-
- if(occurCount >= occurrences.length)
- {
- Occurrence[] newOccur = new Occurrence[occurrences.length * 2];
- System.arraycopy(occurrences,0,newOccur,0,occurCount);
- occurrences = newOccur;
- }
-
- occurrences[occurCount++] = new Occurrence(file,title);
- }
-
- static class Occurrence
- {
- int file;
- int count;
-
- Occurrence(int file, boolean title)
- {
- this.file = file;
- this.count = (title ? TITLE_OCCUR : 1);
- }
- }
- } //}}}
-
- //{{{ HelpFile class
- static class HelpFile
- {
- String file;
- String title;
-
- HelpFile(String file)
- {
- this.file = file;
- }
-
- public String toString()
- {
- return title;
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof HelpFile)
- return ((HelpFile)o).file.equals(file);
- else
- return false;
- }
- } //}}}
+/*
+ * HelpIndex.java - Index for help searching feature
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.help;
+
+//{{{ Imports
+import java.io.*;
+import java.net.*;
+import java.util.zip.*;
+import java.util.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+class HelpIndex
+{
+ //{{{ HelpIndex constructor
+ public HelpIndex()
+ {
+ words = new HashMap<String, Object>();
+ files = new ArrayList<HelpFile>();
+
+ ignoreWord("a");
+ ignoreWord("an");
+ ignoreWord("and");
+ ignoreWord("are");
+ ignoreWord("as");
+ ignoreWord("be");
+ ignoreWord("by");
+ ignoreWord("can");
+ ignoreWord("do");
+ ignoreWord("for");
+ ignoreWord("from");
+ ignoreWord("how");
+ ignoreWord("i");
+ ignoreWord("if");
+ ignoreWord("in");
+ ignoreWord("is");
+ ignoreWord("it");
+ ignoreWord("not");
+ ignoreWord("of");
+ ignoreWord("on");
+ ignoreWord("or");
+ ignoreWord("s");
+ ignoreWord("that");
+ ignoreWord("the");
+ ignoreWord("this");
+ ignoreWord("to");
+ ignoreWord("will");
+ ignoreWord("with");
+ ignoreWord("you");
+ } //}}}
+
+ /* //{{{ HelpIndex constructor
+ public HelpIndex(String fileListPath, String wordIndexPath)
+ {
+ this();
+ } //}}} */
+
+ //{{{ indexEditorHelp() method
+ /**
+ * Indexes all available help, including the jEdit user's guide, FAQ,]
+ * and plugin documentation.
+ */
+ public void indexEditorHelp()
+ {
+ try
+ {
+ String jEditHome = jEdit.getJEditHome();
+ if(jEditHome != null)
+ {
+ indexDirectory(MiscUtilities.constructPath(jEditHome,"doc","users-guide"));
+ indexDirectory(MiscUtilities.constructPath(jEditHome,"doc","FAQ"));
+ indexDirectory(MiscUtilities.constructPath(jEditHome,"doc","news44"));
+ }
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,this,"Error indexing editor help");
+ Log.log(Log.ERROR,this,e);
+ }
+
+ PluginJAR[] jars = jEdit.getPluginJARs();
+ for(int i = 0; i < jars.length; i++)
+ {
+ try
+ {
+ indexJAR(jars[i].getZipFile());
+ }
+ catch(Throwable e)
+ {
+ Log.log(Log.ERROR,this,"Error indexing JAR: "
+ + jars[i].getPath());
+ Log.log(Log.ERROR,this,e);
+ }
+ }
+
+ Log.log(Log.DEBUG,this,"Indexed " + words.size() + " words");
+ } //}}}
+
+ //{{{ indexDirectory() method
+ /**
+ * Indexes all HTML and text files in the specified directory.
+ * @param dir The directory
+ */
+ public void indexDirectory(String dir) throws Exception
+ {
+ String[] files = VFSManager.getFileVFS()
+ ._listDirectory(null,dir,"*.{html,txt}",true,null);
+
+ for(int i = 0; i < files.length; i++)
+ {
+ indexURL(files[i]);
+ }
+ } //}}}
+
+ //{{{ indexJAR() method
+ /**
+ * Indexes all HTML and text files in the specified JAR file.
+ * @param jar The JAR file
+ */
+ public void indexJAR(ZipFile jar) throws Exception
+ {
+ Enumeration e = jar.entries();
+ while(e.hasMoreElements())
+ {
+ ZipEntry entry = (ZipEntry)e.nextElement();
+ String name = entry.getName();
+ String lname = name.toLowerCase();
+ if(lname.endsWith(".html")/* || lname.endsWith(".txt") */)
+ {
+ // only works for jEdit plugins
+ String url = "jeditresource:/" +
+ MiscUtilities.getFileName(jar.getName())
+ + "!/" + name;
+ Log.log(Log.DEBUG,this,url);
+ indexStream(jar.getInputStream(entry),url);
+ }
+ }
+ } //}}}
+
+ //{{{ indexURL() method
+ /**
+ * Reads the specified HTML file and adds all words defined therein to the
+ * index.
+ * @param url The HTML file's URL
+ */
+ public void indexURL(String url) throws Exception
+ {
+ InputStream _in;
+
+ if(MiscUtilities.isURL(url))
+ _in = new URL(url).openStream();
+ else
+ {
+ _in = new FileInputStream(url);
+ // hack since HelpViewer needs a URL...
+ url = "file:" + url;
+ }
+
+ indexStream(_in,url);
+ } //}}}
+
+ //{{{ lookupWord() method
+ public Word lookupWord(String word)
+ {
+ Object o = words.get(word);
+ if(o == IGNORE)
+ return null;
+ else
+ return (Word)o;
+ } //}}}
+
+ //{{{ getFile() method
+ public HelpFile getFile(int index)
+ {
+ return files.get(index);
+ } //}}}
+
+ //{{{ Private members
+ // used to mark words to ignore (see constructor for the list)
+ private static Object IGNORE = new Object();
+ private Map<String, Object> words;
+ private List<HelpFile> files;
+
+ //{{{ ignoreWord() method
+ private void ignoreWord(String word)
+ {
+ words.put(word,IGNORE);
+ } //}}}
+
+ //{{{ indexStream() method
+ /**
+ * Reads the specified HTML file and adds all words defined therein to the
+ * index.
+ * @param _in The input stream
+ * @param fileName The file
+ */
+ private void indexStream(InputStream _in, String fileName)
+ throws Exception
+ {
+ HelpFile file = new HelpFile(fileName);
+ files.add(file);
+ int index = files.size() - 1;
+
+ StringBuilder titleText = new StringBuilder();
+
+ BufferedReader in = new BufferedReader(
+ new InputStreamReader(_in));
+
+ try
+ {
+ StringBuilder word = new StringBuilder();
+ boolean insideTag = false;
+ boolean insideEntity = false;
+
+ boolean title = false;
+
+ int c;
+ while((c = in.read()) != -1)
+ {
+ char ch = (char)c;
+ if(insideTag)
+ {
+ if(ch == '>')
+ {
+ if(word.toString().equals("title"))
+ title = true;
+ insideTag = false;
+ word.setLength(0);
+ }
+ else
+ word.append(ch);
+ }
+ else if(insideEntity)
+ {
+ if(ch == ';')
+ insideEntity = false;
+ }
+ else if(ch == '<')
+ {
+ if(title)
+ title = false;
+
+ if(word.length() != 0)
+ {
+ addWord(word.toString(),index,title);
+ word.setLength(0);
+ }
+
+ insideTag = true;
+ }
+ else if(ch == '&')
+ insideEntity = true;
+ else if(title)
+ titleText.append(ch);
+ else if(!Character.isLetterOrDigit(ch))
+ {
+ if(word.length() != 0)
+ {
+ addWord(word.toString(),index,title);
+ word.setLength(0);
+ }
+ }
+ else
+ word.append(ch);
+ }
+ }
+ finally
+ {
+ in.close();
+ }
+
+ if(titleText.length() == 0)
+ file.title = fileName;
+ else
+ file.title = titleText.toString();
+ } //}}}
+
+ //{{{ addWord() method
+ private void addWord(String word, int file, boolean title)
+ {
+ word = word.toLowerCase();
+
+ Object o = words.get(word);
+ if(o == IGNORE)
+ return;
+
+ if(o == null)
+ words.put(word,new Word(word,file,title));
+ else
+ ((Word)o).addOccurrence(file,title);
+ } //}}}
+
+ //}}}
+
+ //{{{ Word class
+ static class Word
+ {
+ // how much an occurrence in the title is worth
+ static final int TITLE_OCCUR = 10;
+
+ // the word
+ String word;
+
+ // files it occurs in
+ int occurCount = 0;
+ Occurrence[] occurrences;
+
+ Word(String word, int file, boolean title)
+ {
+ this.word = word;
+ occurrences = new Occurrence[5];
+ addOccurrence(file,title);
+ }
+
+ void addOccurrence(int file, boolean title)
+ {
+ for(int i = 0; i < occurCount; i++)
+ {
+ if(occurrences[i].file == file)
+ {
+ occurrences[i].count += (title ? TITLE_OCCUR : 1);
+ return;
+ }
+ }
+
+ if(occurCount >= occurrences.length)
+ {
+ Occurrence[] newOccur = new Occurrence[occurrences.length * 2];
+ System.arraycopy(occurrences,0,newOccur,0,occurCount);
+ occurrences = newOccur;
+ }
+
+ occurrences[occurCount++] = new Occurrence(file,title);
+ }
+
+ static class Occurrence
+ {
+ int file;
+ int count;
+
+ Occurrence(int file, boolean title)
+ {
+ this.file = file;
+ this.count = (title ? TITLE_OCCUR : 1);
+ }
+ }
+ } //}}}
+
+ //{{{ HelpFile class
+ static class HelpFile
+ {
+ String file;
+ String title;
+
+ HelpFile(String file)
+ {
+ this.file = file;
+ }
+
+ public String toString()
+ {
+ return title;
+ }
+
+ public boolean equals(Object o)
+ {
+ if(o instanceof HelpFile)
+ return ((HelpFile)o).file.equals(file);
+ else
+ return false;
+ }
+ } //}}}
}
\ No newline at end of file
diff --git a/jEdit/org/gjt/sp/jedit/help/HelpSearchPanel.java b/jEdit/org/gjt/sp/jedit/help/HelpSearchPanel.java
index b69ff6b..4661d45 100644
--- a/jEdit/org/gjt/sp/jedit/help/HelpSearchPanel.java
+++ b/jEdit/org/gjt/sp/jedit/help/HelpSearchPanel.java
@@ -1,298 +1,300 @@
-/*
- * HelpSearchPanel.java - Help search GUI
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.help;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.*;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-public class HelpSearchPanel extends JPanel
-{
- //{{{ HelpSearchPanel constructor
- public HelpSearchPanel(HelpViewerInterface helpViewer)
- {
- super(new BorderLayout(6,6));
-
- this.helpViewer = helpViewer;
-
- Box box = new Box(BoxLayout.X_AXIS);
- box.add(new JLabel(jEdit.getProperty("helpviewer.search.caption")));
- box.add(Box.createHorizontalStrut(6));
- box.add(searchField = new HistoryTextField("helpviewer.search"));
- searchField.addActionListener(new ActionHandler());
-
- add(BorderLayout.NORTH,box);
-
- results = new JList();
- results.addMouseListener(new MouseHandler());
- results.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- results.setCellRenderer(new ResultRenderer());
- add(BorderLayout.CENTER,new JScrollPane(results));
- } //}}}
-
- //{{{ Private members
- private HelpViewerInterface helpViewer;
- private HistoryTextField searchField;
- private JList results;
- private HelpIndex index;
-
- private HelpIndex getHelpIndex()
- {
- if(index == null)
- {
- index = new HelpIndex();
- try
- {
- index.indexEditorHelp();
- }
- catch(Exception e)
- {
- index = null;
- Log.log(Log.ERROR,this,e);
- GUIUtilities.error(helpViewer.getComponent(),"helpviewer.search.error",
- new String[] { e.toString() });
- }
- }
-
- return index;
- } //}}}
-
- //{{{ ResultIcon class
- static class ResultIcon implements Icon
- {
- private static RenderingHints renderingHints;
-
- static
- {
- Map<RenderingHints.Key, Object> hints = new HashMap<RenderingHints.Key, Object>();
-
- hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
- hints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-
- renderingHints = new RenderingHints(hints);
- }
-
- private int rank;
-
- ResultIcon(int rank)
- {
- this.rank = rank;
- }
-
- public int getIconWidth()
- {
- return 40;
- }
-
- public int getIconHeight()
- {
- return 9;
- }
-
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- Graphics2D g2d = (Graphics2D)g.create();
- g2d.setRenderingHints(renderingHints);
-
- for(int i = 0; i < 4; i++)
- {
- if(rank > i)
- g2d.setColor(UIManager.getColor("Label.foreground"));
- else
- g2d.setColor(UIManager.getColor("Label.disabledForeground"));
- g2d.fillOval(x+i*10,y,9,9);
- }
- }
- } //}}}
-
- //{{{ ResultRenderer class
- static class ResultRenderer extends DefaultListCellRenderer
- {
- public Component getListCellRendererComponent(
- JList list,
- Object value,
- int index,
- boolean isSelected,
- boolean cellHasFocus)
- {
- super.getListCellRendererComponent(list,null,index,
- isSelected,cellHasFocus);
-
- if(value instanceof String)
- {
- setIcon(null);
- setText((String)value);
- }
- else
- {
- Result result = (Result)value;
- setIcon(new ResultIcon(result.rank));
- setText(result.title);
- }
-
- return this;
- }
- } //}}}
-
- //{{{ Result class
- static class Result
- {
- String file;
- String title;
- int rank;
-
- Result(HelpIndex.HelpFile file, int count)
- {
- this.file = file.file;
- this.title = file.title;
- rank = count;
- }
- } //}}}
-
- //{{{ ResultCompare class
- static class ResultCompare implements Comparator<Result>
- {
- public int compare(Result r1, Result r2)
- {
- if(r1.rank == r2.rank)
- return r1.title.compareTo(r2.title);
- else
- return r2.rank - r1.rank;
- }
- } //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- final HelpIndex index = getHelpIndex();
- if(index == null)
- return;
-
- results.setListData(new String[] { jEdit.getProperty(
- "helpviewer.searching") });
-
- final String text = searchField.getText();
- final Vector<Result> resultModel = new Vector<Result>();
-
- VFSManager.runInWorkThread(new Runnable()
- {
- public void run()
- {
- StringTokenizer st = new StringTokenizer(text,",.;:-? ");
-
- // we later use this to compute a relative ranking
- int maxRank = 0;
-
- while(st.hasMoreTokens())
- {
- String word = st.nextToken().toLowerCase();
- HelpIndex.Word lookup = index.lookupWord(word);
- if(lookup == null)
- continue;
-
- for(int i = 0; i < lookup.occurCount; i++)
- {
- HelpIndex.Word.Occurrence occur = lookup.occurrences[i];
-
- boolean ok = false;
-
- HelpIndex.HelpFile file = index.getFile(occur.file);
- for(int j = 0; j < resultModel.size(); j++)
- {
- Result result = resultModel.elementAt(j);
- if(result.file.equals(file.file))
- {
- result.rank += occur.count;
- result.rank += 20; // multiple files w/ word bonus
- maxRank = Math.max(result.rank,maxRank);
- ok = true;
- break;
- }
- }
-
- if(!ok)
- {
- maxRank = Math.max(occur.count,maxRank);
- resultModel.addElement(new Result(file,occur.count));
- }
- }
- }
-
- if(maxRank != 0)
- {
- // turn the rankings into relative rankings, from 1 to 4
- for(int i = 0; i < resultModel.size(); i++)
- {
- Result result = resultModel.elementAt(i);
- result.rank = (int)Math.ceil((double)result.rank * 4 / maxRank);
- }
-
- Collections.sort(resultModel,new ResultCompare());
- }
- }
- });
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- if(resultModel.isEmpty())
- {
- results.setListData(new String[] {
- jEdit.getProperty(
- "helpviewer.no-results") });
-
- getToolkit().beep();
- }
- else
- results.setListData(resultModel);
- }
- });
-
- }
- } //}}}
-
- //{{{ MouseHandler class
- public class MouseHandler extends MouseAdapter
- {
- public void mouseReleased(MouseEvent evt)
- {
- int row = results.locationToIndex(evt.getPoint());
- if(row != -1)
- {
- Result result = (Result)results.getModel()
- .getElementAt(row);
- helpViewer.gotoURL(result.file,true, 0);
- }
- }
- } //}}}
-}
+/*
+ * HelpSearchPanel.java - Help search GUI
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.help;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.*;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.ThreadUtilities;
+//}}}
+
+public class HelpSearchPanel extends JPanel
+{
+ //{{{ HelpSearchPanel constructor
+ public HelpSearchPanel(HelpViewerInterface helpViewer)
+ {
+ super(new BorderLayout(6,6));
+
+ this.helpViewer = helpViewer;
+
+ Box box = new Box(BoxLayout.X_AXIS);
+ box.add(new JLabel(jEdit.getProperty("helpviewer.search.caption")));
+ box.add(Box.createHorizontalStrut(6));
+ box.add(searchField = new HistoryTextField("helpviewer.search"));
+ searchField.addActionListener(new ActionHandler());
+
+ add(BorderLayout.NORTH,box);
+
+ results = new JList();
+ results.addMouseListener(new MouseHandler());
+ results.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ results.setCellRenderer(new ResultRenderer());
+ add(BorderLayout.CENTER,new JScrollPane(results));
+ } //}}}
+
+ //{{{ Private members
+ private HelpViewerInterface helpViewer;
+ private HistoryTextField searchField;
+ private JList results;
+ private HelpIndex index;
+
+ private HelpIndex getHelpIndex()
+ {
+ if(index == null)
+ {
+ index = new HelpIndex();
+ try
+ {
+ index.indexEditorHelp();
+ }
+ catch(Exception e)
+ {
+ index = null;
+ Log.log(Log.ERROR,this,e);
+ GUIUtilities.error(helpViewer.getComponent(),"helpviewer.search.error",
+ new String[] { e.toString() });
+ }
+ }
+
+ return index;
+ } //}}}
+
+ //{{{ ResultIcon class
+ static class ResultIcon implements Icon
+ {
+ private static RenderingHints renderingHints;
+
+ static
+ {
+ Map<RenderingHints.Key, Object> hints = new HashMap<RenderingHints.Key, Object>();
+
+ hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+ hints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+
+ renderingHints = new RenderingHints(hints);
+ }
+
+ private int rank;
+
+ ResultIcon(int rank)
+ {
+ this.rank = rank;
+ }
+
+ public int getIconWidth()
+ {
+ return 40;
+ }
+
+ public int getIconHeight()
+ {
+ return 9;
+ }
+
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ Graphics2D g2d = (Graphics2D)g.create();
+ g2d.setRenderingHints(renderingHints);
+
+ for(int i = 0; i < 4; i++)
+ {
+ if(rank > i)
+ g2d.setColor(UIManager.getColor("Label.foreground"));
+ else
+ g2d.setColor(UIManager.getColor("Label.disabledForeground"));
+ g2d.fillOval(x+i*10,y,9,9);
+ }
+ }
+ } //}}}
+
+ //{{{ ResultRenderer class
+ static class ResultRenderer extends DefaultListCellRenderer
+ {
+ public Component getListCellRendererComponent(
+ JList list,
+ Object value,
+ int index,
+ boolean isSelected,
+ boolean cellHasFocus)
+ {
+ super.getListCellRendererComponent(list,null,index,
+ isSelected,cellHasFocus);
+
+ if(value instanceof String)
+ {
+ setIcon(null);
+ setText((String)value);
+ }
+ else
+ {
+ Result result = (Result)value;
+ setIcon(new ResultIcon(result.rank));
+ setText(result.title);
+ }
+
+ return this;
+ }
+ } //}}}
+
+ //{{{ Result class
+ static class Result
+ {
+ String file;
+ String title;
+ int rank;
+
+ Result(HelpIndex.HelpFile file, int count)
+ {
+ this.file = file.file;
+ this.title = file.title;
+ rank = count;
+ }
+ } //}}}
+
+ //{{{ ResultCompare class
+ static class ResultCompare implements Comparator<Result>
+ {
+ public int compare(Result r1, Result r2)
+ {
+ if(r1.rank == r2.rank)
+ return r1.title.compareTo(r2.title);
+ else
+ return r2.rank - r1.rank;
+ }
+ } //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ final HelpIndex index = getHelpIndex();
+ if(index == null)
+ return;
+
+ results.setListData(new String[] { jEdit.getProperty(
+ "helpviewer.searching") });
+
+ final String text = searchField.getText();
+ final Vector<Result> resultModel = new Vector<Result>();
+
+ ThreadUtilities.runInBackground(new Runnable()
+ {
+ public void run()
+ {
+ StringTokenizer st = new StringTokenizer(text,",.;:-? ");
+
+ // we later use this to compute a relative ranking
+ int maxRank = 0;
+
+ while(st.hasMoreTokens())
+ {
+ String word = st.nextToken().toLowerCase();
+ HelpIndex.Word lookup = index.lookupWord(word);
+ if(lookup == null)
+ continue;
+
+ for(int i = 0; i < lookup.occurCount; i++)
+ {
+ HelpIndex.Word.Occurrence occur = lookup.occurrences[i];
+
+ boolean ok = false;
+
+ HelpIndex.HelpFile file = index.getFile(occur.file);
+ for(int j = 0; j < resultModel.size(); j++)
+ {
+ Result result = resultModel.elementAt(j);
+ if(result.file.equals(file.file))
+ {
+ result.rank += occur.count;
+ result.rank += 20; // multiple files w/ word bonus
+ maxRank = Math.max(result.rank,maxRank);
+ ok = true;
+ break;
+ }
+ }
+
+ if(!ok)
+ {
+ maxRank = Math.max(occur.count,maxRank);
+ resultModel.addElement(new Result(file,occur.count));
+ }
+ }
+ }
+
+ if(maxRank != 0)
+ {
+ // turn the rankings into relative rankings, from 1 to 4
+ for(int i = 0; i < resultModel.size(); i++)
+ {
+ Result result = resultModel.elementAt(i);
+ result.rank = (int)Math.ceil((double)result.rank * 4 / maxRank);
+ }
+
+ Collections.sort(resultModel,new ResultCompare());
+ }
+
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ if(resultModel.isEmpty())
+ {
+ results.setListData(new String[] {
+ jEdit.getProperty(
+ "helpviewer.no-results") });
+
+ getToolkit().beep();
+ }
+ else
+ results.setListData(resultModel);
+ }
+ });
+ }
+ });
+
+
+
+ }
+ } //}}}
+
+ //{{{ MouseHandler class
+ public class MouseHandler extends MouseAdapter
+ {
+ public void mouseReleased(MouseEvent evt)
+ {
+ int row = results.locationToIndex(evt.getPoint());
+ if(row != -1)
+ {
+ Result result = (Result)results.getModel()
+ .getElementAt(row);
+ helpViewer.gotoURL(result.file,true, 0);
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/help/HelpTOCPanel.java b/jEdit/org/gjt/sp/jedit/help/HelpTOCPanel.java
index 2eed81c..4dc0bdd 100644
--- a/jEdit/org/gjt/sp/jedit/help/HelpTOCPanel.java
+++ b/jEdit/org/gjt/sp/jedit/help/HelpTOCPanel.java
@@ -1,486 +1,488 @@
-/*
- * HelpTOCPanel.java - Help table of contents
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.help;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.tree.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.jedit.browser.FileCellRenderer; // for icons
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.util.XMLUtilities;
-
-import static javax.swing.tree.TreeSelectionModel.SINGLE_TREE_SELECTION;
-//}}}
-
-public class HelpTOCPanel extends JPanel
-{
- //{{{ HelpTOCPanel constructor
- public HelpTOCPanel(HelpViewerInterface helpViewer)
- {
- super(new BorderLayout());
-
- this.helpViewer = helpViewer;
- nodes = new Hashtable();
-
- toc = new TOCTree();
-
- // looks bad with the OS X L&F, apparently...
- if(!OperatingSystem.isMacOSLF())
- toc.putClientProperty("JTree.lineStyle", "Angled");
-
- toc.setCellRenderer(new TOCCellRenderer());
- toc.setEditable(false);
- toc.setShowsRootHandles(true);
-
- add(BorderLayout.CENTER,new JScrollPane(toc));
-
- load();
- } //}}}
-
- //{{{ selectNode() method
- public void selectNode(String shortURL)
- {
- if(tocModel == null)
- return;
-
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)nodes.get(shortURL);
-
- if(node == null)
- return;
-
- TreePath path = new TreePath(tocModel.getPathToRoot(node));
- toc.expandPath(path);
- toc.setSelectionPath(path);
- toc.scrollPathToVisible(path);
- } //}}}
-
- //{{{ load() method
- public void load()
- {
- DefaultTreeModel empty = new DefaultTreeModel(
- new DefaultMutableTreeNode(
- jEdit.getProperty("helpviewer.toc.loading")));
- toc.setModel(empty);
- toc.setRootVisible(true);
-
- VFSManager.runInWorkThread(new Runnable()
- {
- public void run()
- {
- createTOC();
- tocModel.reload(tocRoot);
- toc.setModel(tocModel);
- toc.setRootVisible(false);
- for(int i = 0; i <tocRoot.getChildCount(); i++)
- {
- DefaultMutableTreeNode node =
- (DefaultMutableTreeNode)
- tocRoot.getChildAt(i);
- toc.expandPath(new TreePath(
- node.getPath()));
- }
- if(helpViewer.getShortURL() != null)
- selectNode(helpViewer.getShortURL());
- }
- });
- } //}}}
-
- //{{{ Private members
- private HelpViewerInterface helpViewer;
- private DefaultTreeModel tocModel;
- private DefaultMutableTreeNode tocRoot;
- private JTree toc;
- private Hashtable nodes;
-
- //{{{ createNode() method
- private DefaultMutableTreeNode createNode(String href, String title)
- {
- DefaultMutableTreeNode node = new DefaultMutableTreeNode(
- new HelpNode(href,title),true);
- nodes.put(href,node);
- return node;
- } //}}}
-
- //{{{ createTOC() method
- private void createTOC()
- {
- EditPlugin[] plugins = jEdit.getPlugins();
- Arrays.sort(plugins,new PluginCompare());
- tocRoot = new DefaultMutableTreeNode();
-
- tocRoot.add(createNode("welcome.html",
- jEdit.getProperty("helpviewer.toc.welcome")));
-
- tocRoot.add(createNode("README.txt",
- jEdit.getProperty("helpviewer.toc.readme")));
- tocRoot.add(createNode("CHANGES.txt",
- jEdit.getProperty("helpviewer.toc.changes")));
- tocRoot.add(createNode("TODO.txt",
- jEdit.getProperty("helpviewer.toc.todo")));
- tocRoot.add(createNode("COPYING.txt",
- jEdit.getProperty("helpviewer.toc.copying")));
- tocRoot.add(createNode("COPYING.DOC.txt",
- jEdit.getProperty("helpviewer.toc.copying-doc")));
- tocRoot.add(createNode("Apache.LICENSE.txt",
- jEdit.getProperty("helpviewer.toc.copying-apache")));
- tocRoot.add(createNode("COPYING.PLUGINS.txt",
- jEdit.getProperty("helpviewer.toc.copying-plugins")));
-
- loadTOC(tocRoot,"news43/toc.xml");
- loadTOC(tocRoot,"users-guide/toc.xml");
- loadTOC(tocRoot,"FAQ/toc.xml");
-
-
- DefaultMutableTreeNode pluginTree = new DefaultMutableTreeNode(
- jEdit.getProperty("helpviewer.toc.plugins"),true);
-
- for(int i = 0; i < plugins.length; i++)
- {
- EditPlugin plugin = plugins[i];
-
- String name = plugin.getClassName();
-
- String docs = jEdit.getProperty("plugin." + name + ".docs");
- String label = jEdit.getProperty("plugin." + name + ".name");
- if(docs != null)
- {
- if(label != null && docs != null)
- {
- String path = plugin.getPluginJAR()
- .getClassLoader()
- .getResourceAsPath(docs);
- pluginTree.add(createNode(
- path,label));
- }
- }
- }
-
- if(pluginTree.getChildCount() != 0)
- tocRoot.add(pluginTree);
- else
- {
- // so that HelpViewer constructor doesn't try to expand
- pluginTree = null;
- }
- loadTOC(tocRoot,"api/toc.xml");
- tocModel = new DefaultTreeModel(tocRoot);
- } //}}}
-
- //{{{ loadTOC() method
- private void loadTOC(DefaultMutableTreeNode root, String path)
- {
- TOCHandler h = new TOCHandler(root,MiscUtilities.getParentOfPath(path));
- try
- {
- XMLUtilities.parseXML(
- new URL(helpViewer.getBaseURL()
- + '/' + path).openStream(), h);
- }
- catch(FileNotFoundException e)
- {
- /* it is acceptable only for the API TOC :
- the user can choose not to install them
- */
- if("api/toc.xml".equals(path))
- {
- Log.log(Log.NOTICE,this,
- "The API docs for jEdit will not be available (reinstall jEdit if you want them)");
- root.add(
- createNode("http://www.jedit.org/api/overview-summary.html",
- jEdit.getProperty("helpviewer.toc.online-apidocs")));
- }
- else
- {
- Log.log(Log.ERROR,this,e);
- }
- }
- catch(IOException e)
- {
- Log.log(Log.ERROR,this,e);
- }
- } //}}}
-
- //}}}
-
- //{{{ HelpNode class
- static class HelpNode
- {
- String href, title;
-
- //{{{ HelpNode constructor
- HelpNode(String href, String title)
- {
- this.href = href;
- this.title = title;
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- return title;
- } //}}}
- } //}}}
-
- //{{{ TOCHandler class
- class TOCHandler extends DefaultHandler
- {
- String dir;
-
- //{{{ TOCHandler constructor
- TOCHandler(DefaultMutableTreeNode root, String dir)
- {
- nodes = new Stack();
- node = root;
- this.dir = dir;
- } //}}}
-
- //{{{ characters() method
- public void characters(char[] c, int off, int len)
- {
- if(tag.equals("TITLE"))
- {
- boolean firstNonWhitespace = false;
- for(int i = 0; i < len; i++)
- {
- char ch = c[off + i];
- if (!firstNonWhitespace && Character.isWhitespace(ch)) continue;
- firstNonWhitespace = true;
- title.append(ch);
- }
- }
-
-
- } //}}}
-
- //{{{ startElement() method
- public void startElement(String uri, String localName,
- String name, Attributes attrs)
- {
- tag = name;
- if (name.equals("ENTRY"))
- href = attrs.getValue("HREF");
- } //}}}
-
- //{{{ endElement() method
- public void endElement(String uri, String localName, String name)
- {
- if(name == null)
- return;
-
- if(name.equals("TITLE"))
- {
- DefaultMutableTreeNode newNode = createNode(
- dir + href,title.toString());
- node.add(newNode);
- nodes.push(node);
- node = newNode;
- title.setLength(0);
- }
- else if(name.equals("ENTRY"))
- {
- node = (DefaultMutableTreeNode)nodes.pop();
- href = null;
- }
- } //}}}
-
- //{{{ Private members
- private String tag;
- private StringBuilder title = new StringBuilder();
- private String href;
- private DefaultMutableTreeNode node;
- private Stack nodes;
- //}}}
- } //}}}
-
- //{{{ TOCTree class
- class TOCTree extends JTree
- {
- //{{{ TOCTree constructor
- TOCTree()
- {
- ToolTipManager.sharedInstance().registerComponent(this);
- selectionModel.setSelectionMode(SINGLE_TREE_SELECTION);
- } //}}}
-
- //{{{ getToolTipText() method
- public final String getToolTipText(MouseEvent evt)
- {
- TreePath path = getPathForLocation(evt.getX(), evt.getY());
- if(path != null)
- {
- Rectangle cellRect = getPathBounds(path);
- if(cellRect != null && !cellRectIsVisible(cellRect))
- return path.getLastPathComponent().toString();
- }
- return null;
- } //}}}
-
- //{{{ getToolTipLocation() method
- /* public final Point getToolTipLocation(MouseEvent evt)
- {
- TreePath path = getPathForLocation(evt.getX(), evt.getY());
- if(path != null)
- {
- Rectangle cellRect = getPathBounds(path);
- if(cellRect != null && !cellRectIsVisible(cellRect))
- {
- return new Point(cellRect.x + 14, cellRect.y);
- }
- }
- return null;
- } */ //}}}
-
- //{{{ processKeyEvent() method
- public void processKeyEvent(KeyEvent evt)
- {
- if ((KeyEvent.KEY_PRESSED == evt.getID()) &&
- (KeyEvent.VK_ENTER == evt.getKeyCode()))
- {
- TreePath path = getSelectionPath();
- if(path != null)
- {
- Object obj = ((DefaultMutableTreeNode)
- path.getLastPathComponent())
- .getUserObject();
- if(!(obj instanceof HelpNode))
- {
- this.expandPath(path);
- return;
- }
-
- HelpNode node = (HelpNode)obj;
- helpViewer.gotoURL(node.href,true,0);
- }
- evt.consume();
- }
- else
- {
- super.processKeyEvent(evt);
- }
- } //}}}
-
- //{{{ processMouseEvent() method
- protected void processMouseEvent(MouseEvent evt)
- {
- //ToolTipManager ttm = ToolTipManager.sharedInstance();
-
- switch(evt.getID())
- {
- /* case MouseEvent.MOUSE_ENTERED:
- toolTipInitialDelay = ttm.getInitialDelay();
- toolTipReshowDelay = ttm.getReshowDelay();
- ttm.setInitialDelay(200);
- ttm.setReshowDelay(0);
- super.processMouseEvent(evt);
- break;
- case MouseEvent.MOUSE_EXITED:
- ttm.setInitialDelay(toolTipInitialDelay);
- ttm.setReshowDelay(toolTipReshowDelay);
- super.processMouseEvent(evt);
- break; */
- case MouseEvent.MOUSE_CLICKED:
- TreePath path = getPathForLocation(evt.getX(),evt.getY());
- if(path != null)
- {
- if(!isPathSelected(path))
- setSelectionPath(path);
-
- Object obj = ((DefaultMutableTreeNode)
- path.getLastPathComponent())
- .getUserObject();
- if(!(obj instanceof HelpNode))
- {
- this.expandPath(path);
- return;
- }
-
- HelpNode node = (HelpNode)obj;
-
- helpViewer.gotoURL(node.href,true,0);
- }
-
- super.processMouseEvent(evt);
- break;
- default:
- super.processMouseEvent(evt);
- break;
- }
- } //}}}
-
- //{{{ cellRectIsVisible() method
- private boolean cellRectIsVisible(Rectangle cellRect)
- {
- Rectangle vr = TOCTree.this.getVisibleRect();
- return vr.contains(cellRect.x,cellRect.y) &&
- vr.contains(cellRect.x + cellRect.width,
- cellRect.y + cellRect.height);
- } //}}}
- } //}}}
-
- //{{{ TOCCellRenderer class
- class TOCCellRenderer extends DefaultTreeCellRenderer
- {
- EmptyBorder border = new EmptyBorder(1,0,1,1);
-
- public Component getTreeCellRendererComponent(JTree tree,
- Object value, boolean sel, boolean expanded,
- boolean leaf, int row, boolean focus)
- {
- super.getTreeCellRendererComponent(tree,value,sel,
- expanded,leaf,row,focus);
- setIcon(leaf ? FileCellRenderer.fileIcon
- : (expanded ? FileCellRenderer.openDirIcon
- : FileCellRenderer.dirIcon));
- setBorder(border);
-
- return this;
- }
- } //}}}
-
- //{{{ PluginCompare class
- static class PluginCompare implements Comparator
- {
- public int compare(Object o1, Object o2)
- {
- EditPlugin p1 = (EditPlugin)o1;
- EditPlugin p2 = (EditPlugin)o2;
- return StandardUtilities.compareStrings(
- jEdit.getProperty("plugin." + p1.getClassName() + ".name"),
- jEdit.getProperty("plugin." + p2.getClassName() + ".name"),
- true);
- }
- } //}}}
+/*
+ * HelpTOCPanel.java - Help table of contents
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.help;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.tree.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+import org.gjt.sp.util.ThreadUtilities;
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.jedit.browser.FileCellRenderer; // for icons
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.util.XMLUtilities;
+
+import static javax.swing.tree.TreeSelectionModel.SINGLE_TREE_SELECTION;
+//}}}
+
+public class HelpTOCPanel extends JPanel
+{
+ //{{{ HelpTOCPanel constructor
+ public HelpTOCPanel(HelpViewerInterface helpViewer)
+ {
+ super(new BorderLayout());
+
+ this.helpViewer = helpViewer;
+ nodes = new HashMap<String,DefaultMutableTreeNode>();
+
+ toc = new TOCTree();
+
+ // looks bad with the OS X L&F, apparently...
+ if(!OperatingSystem.isMacOSLF())
+ toc.putClientProperty("JTree.lineStyle", "Angled");
+
+ toc.setCellRenderer(new TOCCellRenderer());
+ toc.setEditable(false);
+ toc.setShowsRootHandles(true);
+
+ add(BorderLayout.CENTER,new JScrollPane(toc));
+
+ load();
+ } //}}}
+
+ //{{{ selectNode() method
+ public void selectNode(String shortURL)
+ {
+ if(tocModel == null)
+ return;
+
+ final DefaultMutableTreeNode node =
+ nodes.get(shortURL);
+
+ if(node == null)
+ return;
+
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ TreePath path = new TreePath(tocModel.getPathToRoot(node));
+ toc.expandPath(path);
+ toc.setSelectionPath(path);
+ toc.scrollPathToVisible(path);
+ }
+ });
+ } //}}}
+
+ //{{{ load() method
+ public void load()
+ {
+ DefaultTreeModel empty = new DefaultTreeModel(
+ new DefaultMutableTreeNode(
+ jEdit.getProperty("helpviewer.toc.loading")));
+ toc.setModel(empty);
+ toc.setRootVisible(true);
+
+ ThreadUtilities.runInBackground(new Runnable()
+ {
+ public void run()
+ {
+ createTOC();
+ tocModel.reload(tocRoot);
+ toc.setModel(tocModel);
+ toc.setRootVisible(false);
+ for(int i = 0; i <tocRoot.getChildCount(); i++)
+ {
+ DefaultMutableTreeNode node =
+ (DefaultMutableTreeNode)
+ tocRoot.getChildAt(i);
+ toc.expandPath(new TreePath(
+ node.getPath()));
+ }
+ if(helpViewer.getShortURL() != null)
+ selectNode(helpViewer.getShortURL());
+ }
+ });
+ } //}}}
+
+ //{{{ Private members
+ private HelpViewerInterface helpViewer;
+ private DefaultTreeModel tocModel;
+ private DefaultMutableTreeNode tocRoot;
+ private JTree toc;
+ private Map<String, DefaultMutableTreeNode> nodes;
+
+ //{{{ createNode() method
+ private DefaultMutableTreeNode createNode(String href, String title)
+ {
+ DefaultMutableTreeNode node = new DefaultMutableTreeNode(
+ new HelpNode(href,title),true);
+ nodes.put(href,node);
+ return node;
+ } //}}}
+
+ //{{{ createTOC() method
+ private void createTOC()
+ {
+ EditPlugin[] plugins = jEdit.getPlugins();
+ Arrays.sort(plugins,new PluginCompare());
+ tocRoot = new DefaultMutableTreeNode();
+
+ tocRoot.add(createNode("welcome.html",
+ jEdit.getProperty("helpviewer.toc.welcome")));
+
+ tocRoot.add(createNode("README.txt",
+ jEdit.getProperty("helpviewer.toc.readme")));
+ tocRoot.add(createNode("CHANGES.txt",
+ jEdit.getProperty("helpviewer.toc.changes")));
+ tocRoot.add(createNode("TODO.txt",
+ jEdit.getProperty("helpviewer.toc.todo")));
+ tocRoot.add(createNode("COPYING.txt",
+ jEdit.getProperty("helpviewer.toc.copying")));
+ tocRoot.add(createNode("COPYING.DOC.txt",
+ jEdit.getProperty("helpviewer.toc.copying-doc")));
+ tocRoot.add(createNode("Apache.LICENSE.txt",
+ jEdit.getProperty("helpviewer.toc.copying-apache")));
+ tocRoot.add(createNode("COPYING.PLUGINS.txt",
+ jEdit.getProperty("helpviewer.toc.copying-plugins")));
+
+ loadTOC(tocRoot,"news44/toc.xml");
+ loadTOC(tocRoot,"users-guide/toc.xml");
+ loadTOC(tocRoot,"FAQ/toc.xml");
+
+
+ DefaultMutableTreeNode pluginTree = new DefaultMutableTreeNode(
+ jEdit.getProperty("helpviewer.toc.plugins"),true);
+
+ for(int i = 0; i < plugins.length; i++)
+ {
+ EditPlugin plugin = plugins[i];
+
+ String name = plugin.getClassName();
+
+ String docs = jEdit.getProperty("plugin." + name + ".docs");
+ String label = jEdit.getProperty("plugin." + name + ".name");
+ if(label != null && docs != null)
+ {
+ String path = plugin.getPluginJAR()
+ .getClassLoader()
+ .getResourceAsPath(docs);
+ pluginTree.add(createNode(
+ path,label));
+ }
+ }
+
+ if(pluginTree.getChildCount() != 0)
+ tocRoot.add(pluginTree);
+ else
+ {
+ // so that HelpViewer constructor doesn't try to expand
+ pluginTree = null;
+ }
+ loadTOC(tocRoot,"api/toc.xml");
+ tocModel = new DefaultTreeModel(tocRoot);
+ } //}}}
+
+ //{{{ loadTOC() method
+ private void loadTOC(DefaultMutableTreeNode root, String path)
+ {
+ TOCHandler h = new TOCHandler(root,MiscUtilities.getParentOfPath(path));
+ try
+ {
+ XMLUtilities.parseXML(
+ new URL(helpViewer.getBaseURL()
+ + '/' + path).openStream(), h);
+ }
+ catch(FileNotFoundException e)
+ {
+ /* it is acceptable only for the API TOC :
+ the user can choose not to install them
+ */
+ if("api/toc.xml".equals(path))
+ {
+ Log.log(Log.NOTICE,this,
+ "The API docs for jEdit will not be available (reinstall jEdit if you want them)");
+ root.add(
+ createNode("http://www.jedit.org/api/overview-summary.html",
+ jEdit.getProperty("helpviewer.toc.online-apidocs")));
+ }
+ else
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ }
+ catch(IOException e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ HelpNode class
+ static class HelpNode
+ {
+ String href, title;
+
+ //{{{ HelpNode constructor
+ HelpNode(String href, String title)
+ {
+ this.href = href;
+ this.title = title;
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return title;
+ } //}}}
+ } //}}}
+
+ //{{{ TOCHandler class
+ class TOCHandler extends DefaultHandler
+ {
+ String dir;
+
+ //{{{ TOCHandler constructor
+ TOCHandler(DefaultMutableTreeNode root, String dir)
+ {
+ nodes = new Stack<DefaultMutableTreeNode>();
+ node = root;
+ this.dir = dir;
+ } //}}}
+
+ //{{{ characters() method
+ public void characters(char[] c, int off, int len)
+ {
+ if(tag.equals("TITLE"))
+ {
+ boolean firstNonWhitespace = false;
+ for(int i = 0; i < len; i++)
+ {
+ char ch = c[off + i];
+ if (!firstNonWhitespace && Character.isWhitespace(ch)) continue;
+ firstNonWhitespace = true;
+ title.append(ch);
+ }
+ }
+
+
+ } //}}}
+
+ //{{{ startElement() method
+ public void startElement(String uri, String localName,
+ String name, Attributes attrs)
+ {
+ tag = name;
+ if (name.equals("ENTRY"))
+ href = attrs.getValue("HREF");
+ } //}}}
+
+ //{{{ endElement() method
+ public void endElement(String uri, String localName, String name)
+ {
+ if(name == null)
+ return;
+
+ if(name.equals("TITLE"))
+ {
+ DefaultMutableTreeNode newNode = createNode(
+ dir + href,title.toString());
+ node.add(newNode);
+ nodes.push(node);
+ node = newNode;
+ title.setLength(0);
+ }
+ else if(name.equals("ENTRY"))
+ {
+ node = nodes.pop();
+ href = null;
+ }
+ } //}}}
+
+ //{{{ Private members
+ private String tag;
+ private StringBuilder title = new StringBuilder();
+ private String href;
+ private DefaultMutableTreeNode node;
+ private Stack<DefaultMutableTreeNode> nodes;
+ //}}}
+ } //}}}
+
+ //{{{ TOCTree class
+ class TOCTree extends JTree
+ {
+ //{{{ TOCTree constructor
+ TOCTree()
+ {
+ ToolTipManager.sharedInstance().registerComponent(this);
+ selectionModel.setSelectionMode(SINGLE_TREE_SELECTION);
+ } //}}}
+
+ //{{{ getToolTipText() method
+ public final String getToolTipText(MouseEvent evt)
+ {
+ TreePath path = getPathForLocation(evt.getX(), evt.getY());
+ if(path != null)
+ {
+ Rectangle cellRect = getPathBounds(path);
+ if(cellRect != null && !cellRectIsVisible(cellRect))
+ return path.getLastPathComponent().toString();
+ }
+ return null;
+ } //}}}
+
+ //{{{ getToolTipLocation() method
+ /* public final Point getToolTipLocation(MouseEvent evt)
+ {
+ TreePath path = getPathForLocation(evt.getX(), evt.getY());
+ if(path != null)
+ {
+ Rectangle cellRect = getPathBounds(path);
+ if(cellRect != null && !cellRectIsVisible(cellRect))
+ {
+ return new Point(cellRect.x + 14, cellRect.y);
+ }
+ }
+ return null;
+ } */ //}}}
+
+ //{{{ processKeyEvent() method
+ public void processKeyEvent(KeyEvent evt)
+ {
+ if ((KeyEvent.KEY_PRESSED == evt.getID()) &&
+ (KeyEvent.VK_ENTER == evt.getKeyCode()))
+ {
+ TreePath path = getSelectionPath();
+ if(path != null)
+ {
+ Object obj = ((DefaultMutableTreeNode)
+ path.getLastPathComponent())
+ .getUserObject();
+ if(!(obj instanceof HelpNode))
+ {
+ this.expandPath(path);
+ return;
+ }
+
+ HelpNode node = (HelpNode)obj;
+ helpViewer.gotoURL(node.href,true,0);
+ }
+ evt.consume();
+ }
+ else
+ {
+ super.processKeyEvent(evt);
+ }
+ } //}}}
+
+ //{{{ processMouseEvent() method
+ protected void processMouseEvent(MouseEvent evt)
+ {
+ //ToolTipManager ttm = ToolTipManager.sharedInstance();
+
+ switch(evt.getID())
+ {
+ /* case MouseEvent.MOUSE_ENTERED:
+ toolTipInitialDelay = ttm.getInitialDelay();
+ toolTipReshowDelay = ttm.getReshowDelay();
+ ttm.setInitialDelay(200);
+ ttm.setReshowDelay(0);
+ super.processMouseEvent(evt);
+ break;
+ case MouseEvent.MOUSE_EXITED:
+ ttm.setInitialDelay(toolTipInitialDelay);
+ ttm.setReshowDelay(toolTipReshowDelay);
+ super.processMouseEvent(evt);
+ break; */
+ case MouseEvent.MOUSE_CLICKED:
+ TreePath path = getPathForLocation(evt.getX(),evt.getY());
+ if(path != null)
+ {
+ if(!isPathSelected(path))
+ setSelectionPath(path);
+
+ Object obj = ((DefaultMutableTreeNode)
+ path.getLastPathComponent())
+ .getUserObject();
+ if(!(obj instanceof HelpNode))
+ {
+ this.expandPath(path);
+ return;
+ }
+
+ HelpNode node = (HelpNode)obj;
+
+ helpViewer.gotoURL(node.href,true,0);
+ }
+
+ super.processMouseEvent(evt);
+ break;
+ default:
+ super.processMouseEvent(evt);
+ break;
+ }
+ } //}}}
+
+ //{{{ cellRectIsVisible() method
+ private boolean cellRectIsVisible(Rectangle cellRect)
+ {
+ Rectangle vr = TOCTree.this.getVisibleRect();
+ return vr.contains(cellRect.x,cellRect.y) &&
+ vr.contains(cellRect.x + cellRect.width,
+ cellRect.y + cellRect.height);
+ } //}}}
+ } //}}}
+
+ //{{{ TOCCellRenderer class
+ static class TOCCellRenderer extends DefaultTreeCellRenderer
+ {
+ EmptyBorder border = new EmptyBorder(1,0,1,1);
+
+ public Component getTreeCellRendererComponent(JTree tree,
+ Object value, boolean sel, boolean expanded,
+ boolean leaf, int row, boolean focus)
+ {
+ super.getTreeCellRendererComponent(tree,value,sel,
+ expanded,leaf,row,focus);
+ setIcon(leaf ? FileCellRenderer.fileIcon
+ : (expanded ? FileCellRenderer.openDirIcon
+ : FileCellRenderer.dirIcon));
+ setBorder(border);
+
+ return this;
+ }
+ } //}}}
+
+ //{{{ PluginCompare class
+ static class PluginCompare implements Comparator<EditPlugin>
+ {
+ public int compare(EditPlugin p1, EditPlugin p2)
+ {
+ return StandardUtilities.compareStrings(
+ jEdit.getProperty("plugin." + p1.getClassName() + ".name"),
+ jEdit.getProperty("plugin." + p2.getClassName() + ".name"),
+ true);
+ }
+ } //}}}
}
\ No newline at end of file
diff --git a/jEdit/org/gjt/sp/jedit/help/HelpViewer.java b/jEdit/org/gjt/sp/jedit/help/HelpViewer.java
index 108b387..b44ac57 100644
--- a/jEdit/org/gjt/sp/jedit/help/HelpViewer.java
+++ b/jEdit/org/gjt/sp/jedit/help/HelpViewer.java
@@ -1,548 +1,572 @@
-/*
- * HelpViewerDialog.java - HTML Help viewer
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2005 Slava Pestov, Nicholas O'Leary
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.help;
-
-//{{{ Imports
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Cursor;
-import java.awt.Dimension;
-import java.awt.Font;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-import java.io.File;
-import java.io.IOException;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JEditorPane;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollBar;
-import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
-import javax.swing.JTabbedPane;
-import javax.swing.SwingUtilities;
-
-import javax.swing.event.HyperlinkEvent;
-import javax.swing.event.HyperlinkListener;
-
-import javax.swing.text.html.HTMLDocument;
-import javax.swing.text.html.HTMLFrameHyperlinkEvent;
-
-import org.gjt.sp.jedit.EBComponent;
-import org.gjt.sp.jedit.EBMessage;
-import org.gjt.sp.jedit.EditBus;
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.MiscUtilities;
-
-import org.gjt.sp.jedit.msg.PluginUpdate;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-
-import org.gjt.sp.util.Log;
-
-import static org.gjt.sp.jedit.help.HelpHistoryModel.HistoryEntry;
-//}}}
-
-/**
- * jEdit's searchable help viewer. It uses a Swing JEditorPane to display the HTML,
- * and implements a URL history.
- * @author Slava Pestov
- * @version $Id: HelpViewer.java 15433 2009-06-12 15:19:27Z Kpouer $
- */
-public class HelpViewer extends JFrame implements HelpViewerInterface, EBComponent, HelpHistoryModelListener
-{
- //{{{ HelpViewer constructor
- /**
- * Creates a new help viewer with the default help page.
- * @since jEdit 4.0pre4
- */
- public HelpViewer()
- {
- this("welcome.html");
- } //}}}
-
- //{{{ HelpViewer constructor
- /**
- * Creates a new help viewer for the specified URL.
- * @param url The URL
- */
- public HelpViewer(URL url)
- {
- this(url.toString());
- } //}}}
-
- //{{{ HelpViewer constructor
- /**
- * Creates a new help viewer for the specified URL.
- * @param url The URL
- */
- public HelpViewer(String url)
- {
- super(jEdit.getProperty("helpviewer.title"));
-
- setIconImage(GUIUtilities.getEditorIcon());
-
- try
- {
- baseURL = new File(MiscUtilities.constructPath(
- jEdit.getJEditHome(),"doc")).toURL().toString();
- }
- catch(MalformedURLException mu)
- {
- Log.log(Log.ERROR,this,mu);
- // what to do?
- }
-
- ActionHandler actionListener = new ActionHandler();
-
- JTabbedPane tabs = new JTabbedPane();
- tabs.addTab(jEdit.getProperty("helpviewer.toc.label"),
- toc = new HelpTOCPanel(this));
- tabs.addTab(jEdit.getProperty("helpviewer.search.label"),
- new HelpSearchPanel(this));
- tabs.setMinimumSize(new Dimension(0,0));
-
- JPanel rightPanel = new JPanel(new BorderLayout());
-
- Box toolBar = new Box(BoxLayout.X_AXIS);
- //toolBar.setFloatable(false);
-
- toolBar.add(title = new JLabel());
- toolBar.add(Box.createGlue());
- historyModel = new HelpHistoryModel(25);
- back = new HistoryButton(HistoryButton.BACK,historyModel);
- back.addActionListener(actionListener);
- toolBar.add(back);
- forward = new HistoryButton(HistoryButton.FORWARD,historyModel);
- forward.addActionListener(actionListener);
- toolBar.add(forward);
- back.setPreferredSize(forward.getPreferredSize());
- rightPanel.add(BorderLayout.NORTH,toolBar);
-
- viewer = new JEditorPane();
- viewer.setEditable(false);
- viewer.addHyperlinkListener(new LinkHandler());
- viewer.setFont(new Font("Monospaced",Font.PLAIN,12));
- viewer.addPropertyChangeListener(new PropertyChangeHandler());
- viewer.addKeyListener(new KeyHandler());
-
- viewerScrollPane = new JScrollPane(viewer);
-
- rightPanel.add(BorderLayout.CENTER,viewerScrollPane);
-
- splitter = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
- jEdit.getBooleanProperty("appearance.continuousLayout"),
- tabs,
- rightPanel);
- splitter.setBorder(null);
-
-
- getContentPane().add(BorderLayout.CENTER,splitter);
-
- historyModel.addHelpHistoryModelListener(this);
- historyUpdated();
-
- gotoURL(url,true,0);
-
- setDefaultCloseOperation(DISPOSE_ON_CLOSE);
-
- getRootPane().setPreferredSize(new Dimension(750,500));
-
- pack();
- GUIUtilities.loadGeometry(this,"helpviewer");
- GUIUtilities.addSizeSaver(this,"helpviewer");
-
- EditBus.addToBus(this);
-
- setVisible(true);
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- splitter.setDividerLocation(jEdit.getIntegerProperty(
- "helpviewer.splitter",250));
- viewer.requestFocus();
- }
- });
- } //}}}
-
- //{{{ gotoURL() method
- /**
- * Displays the specified URL in the HTML component.
- *
- * @param url The URL
- * @param addToHistory Should the URL be added to the back/forward
- * history?
- * @param scrollPosition The vertical scrollPosition
- */
- public void gotoURL(String url, boolean addToHistory, final int scrollPosition)
- {
- // the TOC pane looks up user's guide URLs relative to the
- // doc directory...
- String shortURL;
- if (MiscUtilities.isURL(url))
- {
- if (url.startsWith(baseURL))
- {
- shortURL = url.substring(baseURL.length());
- if(shortURL.startsWith("/"))
- {
- shortURL = shortURL.substring(1);
- }
- }
- else
- {
- shortURL = url;
- }
- }
- else
- {
- shortURL = url;
- if(baseURL.endsWith("/"))
- {
- url = baseURL + url;
- }
- else
- {
- url = baseURL + '/' + url;
- }
- }
-
- // reset default cursor so that the hand cursor doesn't
- // stick around
- viewer.setCursor(Cursor.getDefaultCursor());
-
- try
- {
- URL _url = new URL(url);
-
- if(!_url.equals(viewer.getPage()))
- {
- title.setText(jEdit.getProperty("helpviewer.loading"));
- }
- else
- {
- /* don't show loading msg because we won't
- receive a propertyChanged */
- }
-
- historyModel.setCurrentScrollPosition(viewer.getPage(),getCurrentScrollPosition());
- viewer.setPage(_url);
- if (0 != scrollPosition)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- viewerScrollPane.getVerticalScrollBar().setValue(scrollPosition);
- }
- });
- }
- if(addToHistory)
- {
- historyModel.addToHistory(url);
- }
- }
- catch(MalformedURLException mf)
- {
- Log.log(Log.ERROR,this,mf);
- String[] args = { url, mf.getMessage() };
- GUIUtilities.error(this,"badurl",args);
- return;
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
- String[] args = { url, io.toString() };
- GUIUtilities.error(this,"read-error",args);
- return;
- }
-
- this.shortURL = shortURL;
-
- // select the appropriate tree node.
- if(shortURL != null)
- {
- toc.selectNode(shortURL);
- }
-
- viewer.requestFocus();
- } //}}}
-
- //{{{ getCurrentScrollPosition() method
- int getCurrentScrollPosition() {
- return viewerScrollPane.getVerticalScrollBar().getValue();
- } //}}}
-
- //{{{ getCurrentPage() method
- URL getCurrentPage() {
- return viewer.getPage();
- } //}}}
-
- //{{{ dispose() method
- public void dispose()
- {
- EditBus.removeFromBus(this);
- jEdit.setIntegerProperty("helpviewer.splitter",
- splitter.getDividerLocation());
- super.dispose();
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof PluginUpdate)
- {
- PluginUpdate pmsg = (PluginUpdate)msg;
- if(pmsg.getWhat() == PluginUpdate.LOADED
- || pmsg.getWhat() == PluginUpdate.UNLOADED)
- {
- if(!pmsg.isExiting())
- {
- if(!queuedTOCReload)
- queueTOCReload();
- queuedTOCReload = true;
- }
- }
- }
- else if (msg instanceof PropertiesChanged)
- {
- GUIUtilities.initContinuousLayout(splitter);
- }
- } //}}}
-
- //{{{ getBaseURL() method
- public String getBaseURL()
- {
- return baseURL;
- } //}}}
-
- //{{{ getShortURL() method
- public String getShortURL()
- {
- return shortURL;
- } //}}}
-
- //{{{ historyUpdated() method
- public void historyUpdated()
- {
- back.setEnabled(historyModel.hasPrevious());
- forward.setEnabled(historyModel.hasNext());
- } //}}}
-
- //{{{ getComponent method
- public Component getComponent()
- {
- return getRootPane();
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance members
- private String baseURL;
- private String shortURL;
- private HistoryButton back;
- private HistoryButton forward;
- private JEditorPane viewer;
- private JScrollPane viewerScrollPane;
- private JLabel title;
- private JSplitPane splitter;
- private HelpHistoryModel historyModel;
- private HelpTOCPanel toc;
- private boolean queuedTOCReload;
- //}}}
-
- //{{{ queueTOCReload() method
- public void queueTOCReload()
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- queuedTOCReload = false;
- toc.load();
- }
- });
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- //{{{ actionPerformed() class
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- String actionCommand = evt.getActionCommand();
- int separatorPosition = actionCommand.lastIndexOf(':');
- String url;
- int scrollPosition;
- if (-1 == separatorPosition)
- {
- url = actionCommand;
- scrollPosition = 0;
- }
- else
- {
- url = actionCommand.substring(0,separatorPosition);
- scrollPosition = Integer.parseInt(actionCommand.substring(separatorPosition+1));
- }
- if (url.length() != 0)
- {
- gotoURL(url,false,scrollPosition);
- return;
- }
-
- if(source == back)
- {
- HistoryEntry entry = historyModel.back(HelpViewer.this);
- if(entry == null)
- {
- getToolkit().beep();
- }
- else
- {
- gotoURL(entry.url,false,entry.scrollPosition);
- }
- }
- else if(source == forward)
- {
- HistoryEntry entry = historyModel.forward(HelpViewer.this);
- if(entry == null)
- {
- getToolkit().beep();
- }
- else
- {
- gotoURL(entry.url,false,entry.scrollPosition);
- }
- }
- } //}}}
- } //}}}
-
- //{{{ LinkHandler class
- class LinkHandler implements HyperlinkListener
- {
- //{{{ hyperlinkUpdate() method
- public void hyperlinkUpdate(HyperlinkEvent evt)
- {
- if(evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
- {
- if(evt instanceof HTMLFrameHyperlinkEvent)
- {
- ((HTMLDocument)viewer.getDocument())
- .processHTMLFrameHyperlinkEvent(
- (HTMLFrameHyperlinkEvent)evt);
- historyUpdated();
- }
- else
- {
- URL url = evt.getURL();
- if(url != null)
- {
- gotoURL(url.toString(),true,0);
- }
- }
- }
- else if (evt.getEventType() == HyperlinkEvent.EventType.ENTERED)
- {
- viewer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
- }
- else if (evt.getEventType() == HyperlinkEvent.EventType.EXITED)
- {
- viewer.setCursor(Cursor.getDefaultCursor());
- }
- } //}}}
- } //}}}
-
- //{{{ PropertyChangeHandler class
- class PropertyChangeHandler implements PropertyChangeListener
- {
- public void propertyChange(PropertyChangeEvent evt)
- {
- if("page".equals(evt.getPropertyName()))
- {
- String titleStr = (String)viewer.getDocument()
- .getProperty("title");
- if(titleStr == null)
- {
- titleStr = MiscUtilities.getFileName(
- viewer.getPage().toString());
- }
- title.setText(titleStr);
- historyModel.updateTitle(viewer.getPage().toString(),
- titleStr);
- }
- }
- } //}}}
-
- //{{{ KeyHandler class
- private class KeyHandler extends KeyAdapter
- {
- public void keyPressed(KeyEvent ke)
- {
- switch (ke.getKeyCode())
- {
- case KeyEvent.VK_UP:
- JScrollBar scrollBar = viewerScrollPane.getVerticalScrollBar();
- scrollBar.setValue(scrollBar.getValue()-scrollBar.getUnitIncrement(-1));
- ke.consume();
- break;
- case KeyEvent.VK_DOWN:
- scrollBar = viewerScrollPane.getVerticalScrollBar();
- scrollBar.setValue(scrollBar.getValue()+scrollBar.getUnitIncrement(1));
- ke.consume();
- break;
- case KeyEvent.VK_LEFT:
- scrollBar = viewerScrollPane.getHorizontalScrollBar();
- scrollBar.setValue(scrollBar.getValue()-scrollBar.getUnitIncrement(-1));
- ke.consume();
- break;
- case KeyEvent.VK_RIGHT:
- scrollBar = viewerScrollPane.getHorizontalScrollBar();
- scrollBar.setValue(scrollBar.getValue()+scrollBar.getUnitIncrement(1));
- ke.consume();
- break;
- }
- }
- } //}}}
-
- //}}}
-}
+/*
+ * HelpViewerDialog.java - HTML Help viewer
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2005 Slava Pestov, Nicholas O'Leary
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.help;
+
+//{{{ Imports
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Font;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import java.io.File;
+import java.io.IOException;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.JEditorPane;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollBar;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTabbedPane;
+import javax.swing.SwingUtilities;
+
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+
+import javax.swing.text.html.HTMLDocument;
+import javax.swing.text.html.HTMLFrameHyperlinkEvent;
+
+import org.gjt.sp.jedit.EditBus;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.MiscUtilities;
+
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.msg.PluginUpdate;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+
+import org.gjt.sp.util.Log;
+
+import static org.gjt.sp.jedit.help.HelpHistoryModel.HistoryEntry;
+//}}}
+
+/**
+ * jEdit's searchable help viewer. It uses a Swing JEditorPane to display the HTML,
+ * and implements a URL history.
+ * @author Slava Pestov
+ * @version $Id: HelpViewer.java 18419 2010-08-26 09:21:29Z kerik-sf $
+ */
+public class HelpViewer extends JFrame implements HelpViewerInterface, HelpHistoryModelListener
+{
+ //{{{ HelpViewer constructor
+ /**
+ * Creates a new help viewer with the default help page.
+ * @since jEdit 4.0pre4
+ */
+ public HelpViewer()
+ {
+ this("welcome.html");
+ } //}}}
+
+ //{{{ HelpViewer constructor
+ /**
+ * Creates a new help viewer for the specified URL.
+ * @param url The URL
+ */
+ public HelpViewer(URL url)
+ {
+ this(url.toString());
+ } //}}}
+
+ //{{{ HelpViewer constructor
+ /**
+ * Creates a new help viewer for the specified URL.
+ * @param url The URL
+ */
+ public HelpViewer(String url)
+ {
+ super(jEdit.getProperty("helpviewer.title"));
+
+ setIconImage(GUIUtilities.getEditorIcon());
+
+ try
+ {
+ baseURL = new File(MiscUtilities.constructPath(
+ jEdit.getJEditHome(),"doc")).toURL().toString();
+ }
+ catch(MalformedURLException mu)
+ {
+ Log.log(Log.ERROR,this,mu);
+ // what to do?
+ }
+
+ ActionHandler actionListener = new ActionHandler();
+
+ JTabbedPane tabs = new JTabbedPane();
+ tabs.addTab(jEdit.getProperty("helpviewer.toc.label"),
+ toc = new HelpTOCPanel(this));
+ tabs.addTab(jEdit.getProperty("helpviewer.search.label"),
+ new HelpSearchPanel(this));
+ tabs.setMinimumSize(new Dimension(0,0));
+
+ JPanel rightPanel = new JPanel(new BorderLayout());
+
+ Box toolBar = new Box(BoxLayout.X_AXIS);
+ //toolBar.setFloatable(false);
+
+ toolBar.add(title = new JLabel());
+ toolBar.add(Box.createGlue());
+ historyModel = new HelpHistoryModel(25);
+ back = new HistoryButton(HistoryButton.BACK,historyModel);
+ back.addActionListener(actionListener);
+ toolBar.add(back);
+ forward = new HistoryButton(HistoryButton.FORWARD,historyModel);
+ forward.addActionListener(actionListener);
+ toolBar.add(forward);
+ back.setPreferredSize(forward.getPreferredSize());
+ rightPanel.add(BorderLayout.NORTH,toolBar);
+
+ viewer = new JEditorPane();
+ viewer.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES,
+ Boolean.TRUE);
+
+ viewer.setEditable(false);
+ viewer.addHyperlinkListener(new LinkHandler());
+
+ viewer.setFont(jEdit.getFontProperty("helpviewer.font"));
+ viewer.addPropertyChangeListener(new PropertyChangeHandler());
+ viewer.addKeyListener(new KeyHandler());
+
+ viewerScrollPane = new JScrollPane(viewer);
+
+ rightPanel.add(BorderLayout.CENTER,viewerScrollPane);
+
+ splitter = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
+ jEdit.getBooleanProperty("appearance.continuousLayout"),
+ tabs,
+ rightPanel);
+ splitter.setBorder(null);
+
+
+ getContentPane().add(BorderLayout.CENTER,splitter);
+
+ historyModel.addHelpHistoryModelListener(this);
+ historyUpdated();
+
+ gotoURL(url,true,0);
+
+ setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+
+ getRootPane().setPreferredSize(new Dimension(750,500));
+
+ pack();
+ GUIUtilities.loadGeometry(this,"helpviewer");
+ GUIUtilities.addSizeSaver(this,"helpviewer");
+
+ EditBus.addToBus(this);
+
+ setVisible(true);
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ splitter.setDividerLocation(jEdit.getIntegerProperty(
+ "helpviewer.splitter",250));
+ viewer.requestFocus();
+ }
+ });
+ } //}}}
+
+ //{{{ gotoURL() method
+ /**
+ * Displays the specified URL in the HTML component.
+ *
+ * @param url The URL
+ * @param addToHistory Should the URL be added to the back/forward
+ * history?
+ * @param scrollPosition The vertical scrollPosition
+ */
+ public void gotoURL(String url, final boolean addToHistory, final int scrollPosition)
+ {
+ // the TOC pane looks up user's guide URLs relative to the
+ // doc directory...
+ String shortURL;
+ if (MiscUtilities.isURL(url))
+ {
+ if (url.startsWith(baseURL))
+ {
+ shortURL = url.substring(baseURL.length());
+ if(shortURL.startsWith("/"))
+ {
+ shortURL = shortURL.substring(1);
+ }
+ }
+ else
+ {
+ shortURL = url;
+ }
+ }
+ else
+ {
+ shortURL = url;
+ if(baseURL.endsWith("/"))
+ {
+ url = baseURL + url;
+ }
+ else
+ {
+ url = baseURL + '/' + url;
+ }
+ }
+
+ // reset default cursor so that the hand cursor doesn't
+ // stick around
+ viewer.setCursor(Cursor.getDefaultCursor());
+
+ try
+ {
+ final URL _url = new URL(url);
+ final String _shortURL = shortURL;
+ if(!_url.equals(viewer.getPage()))
+ {
+ title.setText(jEdit.getProperty("helpviewer.loading"));
+ }
+ else
+ {
+ /* don't show loading msg because we won't
+ receive a propertyChanged */
+ }
+
+ historyModel.setCurrentScrollPosition(viewer.getPage(),getCurrentScrollPosition());
+
+ /* call setPage asynchronously, because it can block when
+ one can't connect to host.
+ Calling setPage outside from the EDT violates
+ the single-tread rule of Swing, but it's an experienced workaround
+ (see merge request #2984022 - fix blocking HelpViewer
+ https://sourceforge.net/tracker/?func=detail&aid=2984022&group_id=588&atid=1235750
+ for discussion).
+ Once jEdit sets JDK 7 as dependency, all this should be
+ reverted to synchronous code.
+ */
+ Thread t = new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ viewer.setPage(_url);
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ if (0 != scrollPosition)
+ {
+ viewerScrollPane.getVerticalScrollBar().setValue(scrollPosition);
+ }
+ if(addToHistory)
+ {
+ historyModel.addToHistory(_url.toString());
+ }
+
+ HelpViewer.this.shortURL = _shortURL;
+
+ // select the appropriate tree node.
+ if(_shortURL != null)
+ {
+ toc.selectNode(_shortURL);
+ }
+
+ viewer.requestFocus();
+ }
+ });
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+ String[] args = { _url.toString(), io.toString() };
+ GUIUtilities.error(HelpViewer.this,"read-error",args);
+ return;
+ }
+ }
+ };
+ t.start();
+ }
+ catch(MalformedURLException mf)
+ {
+ Log.log(Log.ERROR,this,mf);
+ String[] args = { url, mf.getMessage() };
+ GUIUtilities.error(this,"badurl",args);
+ return;
+ }
+ } //}}}
+
+ //{{{ getCurrentScrollPosition() method
+ int getCurrentScrollPosition() {
+ return viewerScrollPane.getVerticalScrollBar().getValue();
+ } //}}}
+
+ //{{{ getCurrentPage() method
+ URL getCurrentPage() {
+ return viewer.getPage();
+ } //}}}
+
+ //{{{ dispose() method
+ public void dispose()
+ {
+ EditBus.removeFromBus(this);
+ jEdit.setIntegerProperty("helpviewer.splitter",
+ splitter.getDividerLocation());
+ super.dispose();
+ } //}}}
+
+ //{{{ handlePluginUpdate() method
+ @EBHandler
+ public void handlePluginUpdate(PluginUpdate pmsg)
+ {
+ if(pmsg.getWhat() == PluginUpdate.LOADED
+ || pmsg.getWhat() == PluginUpdate.UNLOADED)
+ {
+ if(!pmsg.isExiting())
+ {
+ if(!queuedTOCReload)
+ queueTOCReload();
+ queuedTOCReload = true;
+ }
+ }
+ } //}}}
+
+ //{{{ handlePropertiesChanged() method
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
+ {
+ GUIUtilities.initContinuousLayout(splitter);
+ } //}}}
+
+ //{{{ getBaseURL() method
+ public String getBaseURL()
+ {
+ return baseURL;
+ } //}}}
+
+ //{{{ getShortURL() method
+ public String getShortURL()
+ {
+ return shortURL;
+ } //}}}
+
+ //{{{ historyUpdated() method
+ public void historyUpdated()
+ {
+ back.setEnabled(historyModel.hasPrevious());
+ forward.setEnabled(historyModel.hasNext());
+ } //}}}
+
+ //{{{ getComponent method
+ public Component getComponent()
+ {
+ return getRootPane();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance members
+ private String baseURL;
+ private String shortURL;
+ private HistoryButton back;
+ private HistoryButton forward;
+ private JEditorPane viewer;
+ private JScrollPane viewerScrollPane;
+ private JLabel title;
+ private JSplitPane splitter;
+ private HelpHistoryModel historyModel;
+ private HelpTOCPanel toc;
+ private boolean queuedTOCReload;
+ //}}}
+
+ //{{{ queueTOCReload() method
+ public void queueTOCReload()
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ queuedTOCReload = false;
+ toc.load();
+ }
+ });
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ //{{{ actionPerformed() class
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ String actionCommand = evt.getActionCommand();
+ int separatorPosition = actionCommand.lastIndexOf(':');
+ String url;
+ int scrollPosition;
+ if (-1 == separatorPosition)
+ {
+ url = actionCommand;
+ scrollPosition = 0;
+ }
+ else
+ {
+ url = actionCommand.substring(0,separatorPosition);
+ scrollPosition = Integer.parseInt(actionCommand.substring(separatorPosition+1));
+ }
+ if (url.length() != 0)
+ {
+ gotoURL(url,false,scrollPosition);
+ return;
+ }
+
+ if(source == back)
+ {
+ HistoryEntry entry = historyModel.back(HelpViewer.this);
+ if(entry == null)
+ {
+ getToolkit().beep();
+ }
+ else
+ {
+ gotoURL(entry.url,false,entry.scrollPosition);
+ }
+ }
+ else if(source == forward)
+ {
+ HistoryEntry entry = historyModel.forward(HelpViewer.this);
+ if(entry == null)
+ {
+ getToolkit().beep();
+ }
+ else
+ {
+ gotoURL(entry.url,false,entry.scrollPosition);
+ }
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ LinkHandler class
+ class LinkHandler implements HyperlinkListener
+ {
+ //{{{ hyperlinkUpdate() method
+ public void hyperlinkUpdate(HyperlinkEvent evt)
+ {
+ if(evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
+ {
+ if(evt instanceof HTMLFrameHyperlinkEvent)
+ {
+ ((HTMLDocument)viewer.getDocument())
+ .processHTMLFrameHyperlinkEvent(
+ (HTMLFrameHyperlinkEvent)evt);
+ historyUpdated();
+ }
+ else
+ {
+ URL url = evt.getURL();
+ if(url != null)
+ {
+ gotoURL(url.toString(),true,0);
+ }
+ }
+ }
+ else if (evt.getEventType() == HyperlinkEvent.EventType.ENTERED)
+ {
+ viewer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+ }
+ else if (evt.getEventType() == HyperlinkEvent.EventType.EXITED)
+ {
+ viewer.setCursor(Cursor.getDefaultCursor());
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ PropertyChangeHandler class
+ class PropertyChangeHandler implements PropertyChangeListener
+ {
+ public void propertyChange(PropertyChangeEvent evt)
+ {
+ if("page".equals(evt.getPropertyName()))
+ {
+ String titleStr = (String)viewer.getDocument()
+ .getProperty("title");
+ if(titleStr == null)
+ {
+ titleStr = MiscUtilities.getFileName(
+ viewer.getPage().toString());
+ }
+ title.setText(titleStr);
+ historyModel.updateTitle(viewer.getPage().toString(),
+ titleStr);
+ }
+ }
+ } //}}}
+
+ //{{{ KeyHandler class
+ private class KeyHandler extends KeyAdapter
+ {
+ public void keyPressed(KeyEvent ke)
+ {
+ switch (ke.getKeyCode())
+ {
+ case KeyEvent.VK_UP:
+ JScrollBar scrollBar = viewerScrollPane.getVerticalScrollBar();
+ scrollBar.setValue(scrollBar.getValue()-scrollBar.getUnitIncrement(-1));
+ ke.consume();
+ break;
+ case KeyEvent.VK_DOWN:
+ scrollBar = viewerScrollPane.getVerticalScrollBar();
+ scrollBar.setValue(scrollBar.getValue()+scrollBar.getUnitIncrement(1));
+ ke.consume();
+ break;
+ case KeyEvent.VK_LEFT:
+ scrollBar = viewerScrollPane.getHorizontalScrollBar();
+ scrollBar.setValue(scrollBar.getValue()-scrollBar.getUnitIncrement(-1));
+ ke.consume();
+ break;
+ case KeyEvent.VK_RIGHT:
+ scrollBar = viewerScrollPane.getHorizontalScrollBar();
+ scrollBar.setValue(scrollBar.getValue()+scrollBar.getUnitIncrement(1));
+ ke.consume();
+ break;
+ }
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/help/HelpViewerInterface.java b/jEdit/org/gjt/sp/jedit/help/HelpViewerInterface.java
index 1a397bd..b54fb83 100644
--- a/jEdit/org/gjt/sp/jedit/help/HelpViewerInterface.java
+++ b/jEdit/org/gjt/sp/jedit/help/HelpViewerInterface.java
@@ -1,40 +1,40 @@
-package org.gjt.sp.jedit.help;
-
-import java.awt.Component;
-import java.beans.PropertyChangeListener;
-
-/**
- * Interface supported by all HelpViewer classes.
- * Currently used by @ref infoviewer.InfoViewerPlugin and @ref HelpViewer
- *
- * @since Jedit 4.2pre5
- * @version $Id: HelpViewerInterface.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public interface HelpViewerInterface
-{
-
- /**
- *
- * @param url
- * @param addToHistory
- * @param scrollPos desired vertical scrollbar position after we go there
- */
- public void gotoURL(String url, boolean addToHistory, int scrollPos);
-
- public String getBaseURL();
-
- public void addPropertyChangeListener(PropertyChangeListener l);
-
- /**
- * Called when the helpviewer is closed
- */
- public void dispose();
- /**
- * @return the root pane of this help viewer
- */
- public Component getComponent();
- public String getShortURL();
-
- public void queueTOCReload();
- public void setTitle(String newTitle);
-}
+package org.gjt.sp.jedit.help;
+
+import java.awt.Component;
+import java.beans.PropertyChangeListener;
+
+/**
+ * Interface supported by all HelpViewer classes.
+ * Currently used by @ref infoviewer.InfoViewerPlugin and @ref HelpViewer
+ *
+ * @since Jedit 4.2pre5
+ * @version $Id: HelpViewerInterface.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public interface HelpViewerInterface
+{
+
+ /**
+ *
+ * @param url
+ * @param addToHistory
+ * @param scrollPos desired vertical scrollbar position after we go there
+ */
+ public void gotoURL(String url, boolean addToHistory, int scrollPos);
+
+ public String getBaseURL();
+
+ public void addPropertyChangeListener(PropertyChangeListener l);
+
+ /**
+ * Called when the helpviewer is closed
+ */
+ public void dispose();
+ /**
+ * @return the root pane of this help viewer
+ */
+ public Component getComponent();
+ public String getShortURL();
+
+ public void queueTOCReload();
+ public void setTitle(String newTitle);
+}
diff --git a/jEdit/org/gjt/sp/jedit/help/HistoryButton.java b/jEdit/org/gjt/sp/jedit/help/HistoryButton.java
index 67c004d..ccdb2a9 100644
--- a/jEdit/org/gjt/sp/jedit/help/HistoryButton.java
+++ b/jEdit/org/gjt/sp/jedit/help/HistoryButton.java
@@ -1,182 +1,182 @@
-/*
- * HistoryButton.java - History Button
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Nicholas O'Leary
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.help;
-
-//{{{ Imports
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.RolloverButton;
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.event.*;
-//}}}
-
-/**
- * History Button
- * @author Nicholas O'Leary
- * @version $Id: HistoryButton.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class HistoryButton extends JPanel implements ActionListener
-{
- public static final int BACK = 0;
- public static final int FORWARD = 1;
-
- //{{{ Private Members
- private int type;
- private HelpHistoryModel history;
- private RolloverButton arrow_button;
- private RolloverButton drop_button;
- private JPopupMenu historyList;
- private ActionListener arrowActionListener;
- //}}}
-
- //{{{ HistoryButton constructor
- public HistoryButton(int type, HelpHistoryModel model)
- {
- super();
- arrow_button = new RolloverButton(GUIUtilities.loadIcon(
- jEdit.getProperty(type==BACK
- ? "helpviewer.back.icon"
- : "helpviewer.forward.icon")));
- arrow_button.setToolTipText(
- jEdit.getProperty(type==BACK
- ? "helpviewer.back.label"
- : "helpviewer.forward.label"));
- Box box = new Box(BoxLayout.X_AXIS);
- drop_button = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
- drop_button.addActionListener(new DropActionHandler());
- box.add(arrow_button);
- box.add(drop_button);
- this.setMaximumSize(new Dimension(
- drop_button.getPreferredSize().width +
- arrow_button.getPreferredSize().width +
- 5,
- arrow_button.getPreferredSize().height + 10)
- );
- this.add(box);
- this.type = type;
- this.history = model;
- } //}}}
-
- //{{{ setEnabled() method
- public void setEnabled(boolean state)
- {
- super.setEnabled(state);
- drop_button.setEnabled(state);
- arrow_button.setEnabled(state);
- } //}}}
-
- //{{{ addActionListener() method
- public void addActionListener(ActionListener al)
- {
- arrow_button.addActionListener(this);
- arrowActionListener = al;
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- arrowActionListener.actionPerformed(
- new ActionEvent(this,
- ActionEvent.ACTION_PERFORMED,
- evt.getActionCommand(),
- evt.getWhen(),
- evt.getModifiers()
- )
- );
- } //}}}
-
- //{{{ getParentHistoryButton() method
- private HistoryButton getParentHistoryButton()
- {
- return this;
- } //}}}
-
- //{{{ Inner Classes
-
- //{{{ DropActionHandler class
- class DropActionHandler implements ActionListener
- {
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- historyList = new JPopupMenu();
- HelpHistoryModel.HistoryEntry[] urls;
- if (type == BACK)
- {
- urls = history.getPreviousURLs();
- }
- else
- {
- urls = history.getNextURLs();
- }
- if (urls != null)
- {
- if (type == BACK) {
- for (int i=urls.length-1 ; i>=0 ; i--)
- {
- if (urls[i] != null)
- {
- historyList.add(new HistoryListActionHandler(urls[i]));
- }
- }
- }
- else
- {
- for (int i=0 ; i<urls.length ; i++)
- {
- if (urls[i] != null)
- {
- historyList.add(new HistoryListActionHandler(urls[i]));
- }
- }
- }
-
- historyList.show((JComponent)evt.getSource(),0,0);
- }
- } //}}}
- } //}}}
-
- //{{{ HistoryListActionHandler class
- class HistoryListActionHandler extends AbstractAction
- {
- HelpHistoryModel.HistoryEntry entry;
-
- //{{{ HistoryListActionHandler constructor
- HistoryListActionHandler(HelpHistoryModel.HistoryEntry entry)
- {
- super(entry.title);
- this.entry = entry;
- this.putValue(Action.ACTION_COMMAND_KEY,entry.url + ':' + entry.scrollPosition);
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent ae)
- {
- getParentHistoryButton().actionPerformed(ae);
- history.setCurrentEntry(entry);
- } //}}}
- } //}}}
-
- //}}}
-}
+/*
+ * HistoryButton.java - History Button
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Nicholas O'Leary
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.help;
+
+//{{{ Imports
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.gui.RolloverButton;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.event.*;
+//}}}
+
+/**
+ * History Button
+ * @author Nicholas O'Leary
+ * @version $Id: HistoryButton.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class HistoryButton extends JPanel implements ActionListener
+{
+ public static final int BACK = 0;
+ public static final int FORWARD = 1;
+
+ //{{{ Private Members
+ private int type;
+ private HelpHistoryModel history;
+ private RolloverButton arrow_button;
+ private RolloverButton drop_button;
+ private JPopupMenu historyList;
+ private ActionListener arrowActionListener;
+ //}}}
+
+ //{{{ HistoryButton constructor
+ public HistoryButton(int type, HelpHistoryModel model)
+ {
+ super();
+ arrow_button = new RolloverButton(GUIUtilities.loadIcon(
+ jEdit.getProperty(type==BACK
+ ? "helpviewer.back.icon"
+ : "helpviewer.forward.icon")));
+ arrow_button.setToolTipText(
+ jEdit.getProperty(type==BACK
+ ? "helpviewer.back.label"
+ : "helpviewer.forward.label"));
+ Box box = new Box(BoxLayout.X_AXIS);
+ drop_button = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("dropdown-arrow.icon")));
+ drop_button.addActionListener(new DropActionHandler());
+ box.add(arrow_button);
+ box.add(drop_button);
+ this.setMaximumSize(new Dimension(
+ drop_button.getPreferredSize().width +
+ arrow_button.getPreferredSize().width +
+ 5,
+ arrow_button.getPreferredSize().height + 10)
+ );
+ this.add(box);
+ this.type = type;
+ this.history = model;
+ } //}}}
+
+ //{{{ setEnabled() method
+ public void setEnabled(boolean state)
+ {
+ super.setEnabled(state);
+ drop_button.setEnabled(state);
+ arrow_button.setEnabled(state);
+ } //}}}
+
+ //{{{ addActionListener() method
+ public void addActionListener(ActionListener al)
+ {
+ arrow_button.addActionListener(this);
+ arrowActionListener = al;
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ arrowActionListener.actionPerformed(
+ new ActionEvent(this,
+ ActionEvent.ACTION_PERFORMED,
+ evt.getActionCommand(),
+ evt.getWhen(),
+ evt.getModifiers()
+ )
+ );
+ } //}}}
+
+ //{{{ getParentHistoryButton() method
+ private HistoryButton getParentHistoryButton()
+ {
+ return this;
+ } //}}}
+
+ //{{{ Inner Classes
+
+ //{{{ DropActionHandler class
+ class DropActionHandler implements ActionListener
+ {
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ historyList = new JPopupMenu();
+ HelpHistoryModel.HistoryEntry[] urls;
+ if (type == BACK)
+ {
+ urls = history.getPreviousURLs();
+ }
+ else
+ {
+ urls = history.getNextURLs();
+ }
+ if (urls != null)
+ {
+ if (type == BACK) {
+ for (int i=urls.length-1 ; i>=0 ; i--)
+ {
+ if (urls[i] != null)
+ {
+ historyList.add(new HistoryListActionHandler(urls[i]));
+ }
+ }
+ }
+ else
+ {
+ for (int i=0 ; i<urls.length ; i++)
+ {
+ if (urls[i] != null)
+ {
+ historyList.add(new HistoryListActionHandler(urls[i]));
+ }
+ }
+ }
+
+ historyList.show((JComponent)evt.getSource(),0,0);
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ HistoryListActionHandler class
+ class HistoryListActionHandler extends AbstractAction
+ {
+ HelpHistoryModel.HistoryEntry entry;
+
+ //{{{ HistoryListActionHandler constructor
+ HistoryListActionHandler(HelpHistoryModel.HistoryEntry entry)
+ {
+ super(entry.title);
+ this.entry = entry;
+ this.putValue(Action.ACTION_COMMAND_KEY,entry.url + ':' + entry.scrollPosition);
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent ae)
+ {
+ getParentHistoryButton().actionPerformed(ae);
+ history.setCurrentEntry(entry);
+ } //}}}
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/help/package.html b/jEdit/org/gjt/sp/jedit/help/package.html
index e7afc96..0a86200 100644
--- a/jEdit/org/gjt/sp/jedit/help/package.html
+++ b/jEdit/org/gjt/sp/jedit/help/package.html
@@ -1,8 +1,8 @@
-<html><body>
-<p>The jEdit help viewer.
-</p>
-<p>
-Plugins can create instances of the <code>HelpViewer</code> class to
-display help in response to a user action.
-</p>
-</body></html>
+<html><body>
+<p>The jEdit help viewer.
+</p>
+<p>
+Plugins can create instances of the <code>HelpViewer</code> class to
+display help in response to a user action.
+</p>
+</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/indent/BracketIndentRule.java b/jEdit/org/gjt/sp/jedit/indent/BracketIndentRule.java
index 290efb1..f3cc002 100644
--- a/jEdit/org/gjt/sp/jedit/indent/BracketIndentRule.java
+++ b/jEdit/org/gjt/sp/jedit/indent/BracketIndentRule.java
@@ -1,209 +1,209 @@
-/*
- * BracketIndentRule.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.indent;
-
-import javax.swing.text.Segment;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.syntax.Token;
-import org.gjt.sp.jedit.syntax.TokenHandler;
-import org.gjt.sp.jedit.syntax.TokenMarker;
-
-/**
- * @author Slava Pestov
- * @version $Id: BracketIndentRule.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public abstract class BracketIndentRule implements IndentRule
-{
- //{{{ BracketIndentRule constructor
- public BracketIndentRule(char openBracket, char closeBracket)
- {
- this.openBracket = openBracket;
- this.closeBracket = closeBracket;
- } //}}}
-
- //{{{ Brackets class
- public static class Brackets
- {
- int openCount;
- int closeCount;
- } //}}}
-
- //{{{ getBrackets() method
- /**
- * @deprecated
- * Use {@link #getBrackets(JEditBuffer,int,int,int)} instead.
- * Brackets in comments or literals should be ignored for indent.
- * But it can't be done without syntax parsing of a buffer.
- */
- @Deprecated
- public Brackets getBrackets(String line)
- {
- Brackets brackets = new Brackets();
-
- for(int i = 0; i < line.length(); i++)
- {
- char ch = line.charAt(i);
- if(ch == openBracket)
- {
- /* Don't increase indent when we see
- an explicit fold. */
- if(line.length() - i >= 3)
- {
- if(line.substring(i,i+3).equals("{{{")) /* }}} */
- {
- i += 2;
- continue;
- }
- }
- brackets.openCount++;
- }
- else if(ch == closeBracket)
- {
- if(brackets.openCount != 0)
- brackets.openCount--;
- else
- brackets.closeCount++;
- }
- }
-
- return brackets;
- } //}}}
-
- //{{{ getBrackets() method
- public Brackets getBrackets(JEditBuffer buffer, int lineIndex)
- {
- return getBrackets(buffer, lineIndex,
- 0, buffer.getLineLength(lineIndex));
- } //}}}
-
- //{{{ getBrackets() method
- public Brackets getBrackets(JEditBuffer buffer, int lineIndex,
- int begin, int end)
- {
- LineScanner scanner = new LineScanner(begin, end);
- buffer.markTokens(lineIndex, scanner);
- return scanner.result;
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- return getClass().getName() + "[" + openBracket + ","
- + closeBracket + "]";
- } //}}}
-
- protected char openBracket, closeBracket;
-
- //{{{ class LineScanner
- private class LineScanner implements TokenHandler
- {
- public final Brackets result;
-
- private int scannedIndex;
- private final int beginIndex;
- private final int endIndex;
-
- public LineScanner(int begin, int end)
- {
- this.result = new Brackets();
- this.scannedIndex = 0;
- this.beginIndex = begin;
- this.endIndex = end;
- }
-
- boolean rejectsToken(byte id)
- {
- // Rejects comments and literals.
- // Accepts all others.
- switch (id)
- {
- case Token.COMMENT1:
- case Token.COMMENT2:
- case Token.COMMENT3:
- case Token.COMMENT4:
- case Token.LITERAL1:
- case Token.LITERAL2:
- case Token.LITERAL3:
- case Token.LITERAL4:
- return true;
- default:
- return false;
- }
- }
-
- private void scan(Segment seg, int offset, int length)
- {
- int index = scannedIndex;
- if (index >= endIndex)
- {
- return;
- }
- if (index < beginIndex)
- {
- int numToSkip = beginIndex - index;
- if (numToSkip >= length)
- {
- return;
- }
- offset += numToSkip;
- length -= numToSkip;
- index = beginIndex;
- }
- if (index + length > endIndex)
- {
- length = endIndex - index;
- }
-
- for (int i = 0; i < length; ++i)
- {
- char c = seg.array[seg.offset + offset + i];
- if(c == openBracket)
- {
- result.openCount++;
- }
- else if(c == closeBracket)
- {
- if(result.openCount != 0)
- result.openCount--;
- else
- result.closeCount++;
- }
- }
- }
-
- public void handleToken(Segment seg
- , byte id, int offset, int length
- , TokenMarker.LineContext context)
- {
- if (!rejectsToken(id))
- {
- scan(seg, offset, length);
- }
- scannedIndex += length;
- }
-
- public void setLineContext(TokenMarker.LineContext lineContext)
- {
- }
- } //}}}
-}
+/*
+ * BracketIndentRule.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.indent;
+
+import javax.swing.text.Segment;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.syntax.Token;
+import org.gjt.sp.jedit.syntax.TokenHandler;
+import org.gjt.sp.jedit.syntax.TokenMarker;
+
+/**
+ * @author Slava Pestov
+ * @version $Id: BracketIndentRule.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public abstract class BracketIndentRule implements IndentRule
+{
+ //{{{ BracketIndentRule constructor
+ public BracketIndentRule(char openBracket, char closeBracket)
+ {
+ this.openBracket = openBracket;
+ this.closeBracket = closeBracket;
+ } //}}}
+
+ //{{{ Brackets class
+ public static class Brackets
+ {
+ int openCount;
+ int closeCount;
+ } //}}}
+
+ //{{{ getBrackets() method
+ /**
+ * @deprecated
+ * Use {@link #getBrackets(JEditBuffer,int,int,int)} instead.
+ * Brackets in comments or literals should be ignored for indent.
+ * But it can't be done without syntax parsing of a buffer.
+ */
+ @Deprecated
+ public Brackets getBrackets(String line)
+ {
+ Brackets brackets = new Brackets();
+
+ for(int i = 0; i < line.length(); i++)
+ {
+ char ch = line.charAt(i);
+ if(ch == openBracket)
+ {
+ /* Don't increase indent when we see
+ an explicit fold. */
+ if(line.length() - i >= 3)
+ {
+ if(line.substring(i,i+3).equals("{{{")) /* }}} */
+ {
+ i += 2;
+ continue;
+ }
+ }
+ brackets.openCount++;
+ }
+ else if(ch == closeBracket)
+ {
+ if(brackets.openCount != 0)
+ brackets.openCount--;
+ else
+ brackets.closeCount++;
+ }
+ }
+
+ return brackets;
+ } //}}}
+
+ //{{{ getBrackets() method
+ public Brackets getBrackets(JEditBuffer buffer, int lineIndex)
+ {
+ return getBrackets(buffer, lineIndex,
+ 0, buffer.getLineLength(lineIndex));
+ } //}}}
+
+ //{{{ getBrackets() method
+ public Brackets getBrackets(JEditBuffer buffer, int lineIndex,
+ int begin, int end)
+ {
+ LineScanner scanner = new LineScanner(begin, end);
+ buffer.markTokens(lineIndex, scanner);
+ return scanner.result;
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return getClass().getName() + "[" + openBracket + ","
+ + closeBracket + "]";
+ } //}}}
+
+ protected char openBracket, closeBracket;
+
+ //{{{ class LineScanner
+ private class LineScanner implements TokenHandler
+ {
+ public final Brackets result;
+
+ private int scannedIndex;
+ private final int beginIndex;
+ private final int endIndex;
+
+ public LineScanner(int begin, int end)
+ {
+ this.result = new Brackets();
+ this.scannedIndex = 0;
+ this.beginIndex = begin;
+ this.endIndex = end;
+ }
+
+ boolean rejectsToken(byte id)
+ {
+ // Rejects comments and literals.
+ // Accepts all others.
+ switch (id)
+ {
+ case Token.COMMENT1:
+ case Token.COMMENT2:
+ case Token.COMMENT3:
+ case Token.COMMENT4:
+ case Token.LITERAL1:
+ case Token.LITERAL2:
+ case Token.LITERAL3:
+ case Token.LITERAL4:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ private void scan(Segment seg, int offset, int length)
+ {
+ int index = scannedIndex;
+ if (index >= endIndex)
+ {
+ return;
+ }
+ if (index < beginIndex)
+ {
+ int numToSkip = beginIndex - index;
+ if (numToSkip >= length)
+ {
+ return;
+ }
+ offset += numToSkip;
+ length -= numToSkip;
+ index = beginIndex;
+ }
+ if (index + length > endIndex)
+ {
+ length = endIndex - index;
+ }
+
+ for (int i = 0; i < length; ++i)
+ {
+ char c = seg.array[seg.offset + offset + i];
+ if(c == openBracket)
+ {
+ result.openCount++;
+ }
+ else if(c == closeBracket)
+ {
+ if(result.openCount != 0)
+ result.openCount--;
+ else
+ result.closeCount++;
+ }
+ }
+ }
+
+ public void handleToken(Segment seg
+ , byte id, int offset, int length
+ , TokenMarker.LineContext context)
+ {
+ if (!rejectsToken(id))
+ {
+ scan(seg, offset, length);
+ }
+ scannedIndex += length;
+ }
+
+ public void setLineContext(TokenMarker.LineContext lineContext)
+ {
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/indent/CloseBracketIndentRule.java b/jEdit/org/gjt/sp/jedit/indent/CloseBracketIndentRule.java
index 2d5eb77..02f91d1 100644
--- a/jEdit/org/gjt/sp/jedit/indent/CloseBracketIndentRule.java
+++ b/jEdit/org/gjt/sp/jedit/indent/CloseBracketIndentRule.java
@@ -1,179 +1,179 @@
-/*
- * CloseBracketIndentRule.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.indent;
-
-import java.util.List;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.TextUtilities;
-import org.gjt.sp.util.StandardUtilities;
-
-/**
- * @author Slava Pestov
- * @version $Id: CloseBracketIndentRule.java 12529 2008-05-01 04:47:58Z vanza $
- */
-public class CloseBracketIndentRule extends BracketIndentRule
-{
- //{{{ CloseBracketIndentRule constructor
- public CloseBracketIndentRule(char closeBracket, boolean aligned)
- {
- super(TextUtilities.getComplementaryBracket(closeBracket,null),
- closeBracket);
- this.aligned = aligned;
- } //}}}
-
- //{{{ apply() method
- public void apply(JEditBuffer buffer, int thisLineIndex,
- int prevLineIndex, int prevPrevLineIndex,
- List<IndentAction> indentActions)
- {
- int index;
- if(aligned)
- index = thisLineIndex;
- else
- index = prevLineIndex;
-
- if(index == -1)
- return;
-
- CharSequence lineText = buffer.getLineSegment(index);
- int offset;
- for (offset = lineText.length() - 1; offset >= 0; offset--)
- {
- if (lineText.charAt(offset) == closeBracket)
- break;
- }
- if(offset == -1)
- return;
-
- int closeCount = getBrackets(buffer, index).closeCount;
- if(closeCount != 0)
- {
- AlignBracket alignBracket
- = new AlignBracket(buffer,index,offset);
- /*
- Consider the following Common Lisp code (with one more opening
- bracket than closing):
-
- (defun emit-push-long (arg)
- (cond ((eql arg 0)
- (emit 'lconst_0))
- ((eql arg 1)
- (emit 'lconst_1)))
-
- even though we have a closing bracket match on line 3,
- the next line must be indented relative to the
- corresponding opening bracket from line 1.
- */
- int openLine = alignBracket.getOpenBracketLine();
- if(openLine != -1)
- {
- int column = alignBracket.getOpenBracketColumn();
- alignBracket.setExtraIndent(
- getBrackets(buffer, openLine,
- 0, column).openCount);
- }
-
- indentActions.add(alignBracket);
- }
- } //}}}
-
- //{{{ isMatch() method
- /**
- * @deprecated
- * This method calls BracketIndentRule#getBrackets(String)
- * which has been deprecated.
- */
- @Deprecated
- public boolean isMatch(String line)
- {
- return getBrackets(line).closeCount != 0;
- } //}}}
-
- private boolean aligned;
-
- //{{{ AlignBracket class
- private static class AlignBracket implements IndentAction
- {
- private int line, offset;
- private int openBracketLine;
- private int openBracketColumn;
- private CharSequence openBracketLineText;
- private int extraIndent;
-
- public AlignBracket(JEditBuffer buffer, int line, int offset)
- {
- this.line = line;
- this.offset = offset;
-
- int openBracketIndex = TextUtilities.findMatchingBracket(
- buffer,this.line,this.offset);
- if(openBracketIndex == -1)
- openBracketLine = -1;
- else
- {
- openBracketLine = buffer.getLineOfOffset(openBracketIndex);
- openBracketColumn = openBracketIndex -
- buffer.getLineStartOffset(openBracketLine);
- openBracketLineText = buffer.getLineSegment(openBracketLine);
- }
- }
-
- public int getExtraIndent()
- {
- return extraIndent;
- }
-
- public void setExtraIndent(int extraIndent)
- {
- this.extraIndent = extraIndent;
- }
-
- public int getOpenBracketColumn()
- {
- return openBracketColumn;
- }
-
- public int getOpenBracketLine()
- {
- return openBracketLine;
- }
-
- public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
- int newIndent)
- {
- if(openBracketLineText == null)
- return newIndent;
- else
- {
- return StandardUtilities.getLeadingWhiteSpaceWidth(
- openBracketLineText,buffer.getTabSize())
- + (extraIndent * buffer.getIndentSize());
- }
- }
-
- public boolean keepChecking()
- {
- return false;
- }
- } //}}}
-}
+/*
+ * CloseBracketIndentRule.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.indent;
+
+import java.util.List;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.TextUtilities;
+import org.gjt.sp.util.StandardUtilities;
+
+/**
+ * @author Slava Pestov
+ * @version $Id: CloseBracketIndentRule.java 12529 2008-05-01 04:47:58Z vanza $
+ */
+public class CloseBracketIndentRule extends BracketIndentRule
+{
+ //{{{ CloseBracketIndentRule constructor
+ public CloseBracketIndentRule(char closeBracket, boolean aligned)
+ {
+ super(TextUtilities.getComplementaryBracket(closeBracket,null),
+ closeBracket);
+ this.aligned = aligned;
+ } //}}}
+
+ //{{{ apply() method
+ public void apply(JEditBuffer buffer, int thisLineIndex,
+ int prevLineIndex, int prevPrevLineIndex,
+ List<IndentAction> indentActions)
+ {
+ int index;
+ if(aligned)
+ index = thisLineIndex;
+ else
+ index = prevLineIndex;
+
+ if(index == -1)
+ return;
+
+ CharSequence lineText = buffer.getLineSegment(index);
+ int offset;
+ for (offset = lineText.length() - 1; offset >= 0; offset--)
+ {
+ if (lineText.charAt(offset) == closeBracket)
+ break;
+ }
+ if(offset == -1)
+ return;
+
+ int closeCount = getBrackets(buffer, index).closeCount;
+ if(closeCount != 0)
+ {
+ AlignBracket alignBracket
+ = new AlignBracket(buffer,index,offset);
+ /*
+ Consider the following Common Lisp code (with one more opening
+ bracket than closing):
+
+ (defun emit-push-long (arg)
+ (cond ((eql arg 0)
+ (emit 'lconst_0))
+ ((eql arg 1)
+ (emit 'lconst_1)))
+
+ even though we have a closing bracket match on line 3,
+ the next line must be indented relative to the
+ corresponding opening bracket from line 1.
+ */
+ int openLine = alignBracket.getOpenBracketLine();
+ if(openLine != -1)
+ {
+ int column = alignBracket.getOpenBracketColumn();
+ alignBracket.setExtraIndent(
+ getBrackets(buffer, openLine,
+ 0, column).openCount);
+ }
+
+ indentActions.add(alignBracket);
+ }
+ } //}}}
+
+ //{{{ isMatch() method
+ /**
+ * @deprecated
+ * This method calls BracketIndentRule#getBrackets(String)
+ * which has been deprecated.
+ */
+ @Deprecated
+ public boolean isMatch(String line)
+ {
+ return getBrackets(line).closeCount != 0;
+ } //}}}
+
+ private boolean aligned;
+
+ //{{{ AlignBracket class
+ private static class AlignBracket implements IndentAction
+ {
+ private int line, offset;
+ private int openBracketLine;
+ private int openBracketColumn;
+ private CharSequence openBracketLineText;
+ private int extraIndent;
+
+ public AlignBracket(JEditBuffer buffer, int line, int offset)
+ {
+ this.line = line;
+ this.offset = offset;
+
+ int openBracketIndex = TextUtilities.findMatchingBracket(
+ buffer,this.line,this.offset);
+ if(openBracketIndex == -1)
+ openBracketLine = -1;
+ else
+ {
+ openBracketLine = buffer.getLineOfOffset(openBracketIndex);
+ openBracketColumn = openBracketIndex -
+ buffer.getLineStartOffset(openBracketLine);
+ openBracketLineText = buffer.getLineSegment(openBracketLine);
+ }
+ }
+
+ public int getExtraIndent()
+ {
+ return extraIndent;
+ }
+
+ public void setExtraIndent(int extraIndent)
+ {
+ this.extraIndent = extraIndent;
+ }
+
+ public int getOpenBracketColumn()
+ {
+ return openBracketColumn;
+ }
+
+ public int getOpenBracketLine()
+ {
+ return openBracketLine;
+ }
+
+ public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
+ int newIndent)
+ {
+ if(openBracketLineText == null)
+ return newIndent;
+ else
+ {
+ return StandardUtilities.getLeadingWhiteSpaceWidth(
+ openBracketLineText,buffer.getTabSize())
+ + (extraIndent * buffer.getIndentSize());
+ }
+ }
+
+ public boolean keepChecking()
+ {
+ return false;
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/indent/DeepIndentRule.java b/jEdit/org/gjt/sp/jedit/indent/DeepIndentRule.java
index 28a2939..e61c1d6 100644
--- a/jEdit/org/gjt/sp/jedit/indent/DeepIndentRule.java
+++ b/jEdit/org/gjt/sp/jedit/indent/DeepIndentRule.java
@@ -1,231 +1,231 @@
-/*
- * DeepIndentRule.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.indent;
-
-import org.gjt.sp.jedit.TextUtilities;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-
-import org.gjt.sp.jedit.syntax.Token;
-import org.gjt.sp.jedit.syntax.TokenHandler;
-import org.gjt.sp.jedit.syntax.TokenMarker;
-
-import java.util.List;
-import java.util.Stack;
-import javax.swing.text.Segment;
-
-/**
- * Deep indent rule.
- *
- * @author Matthieu Casanova
- * @version $Id: DeepIndentRule.java 13045 2008-07-11 06:48:37Z vanza $
- */
-public class DeepIndentRule implements IndentRule
-{
- private final char openChar;
- private final char closeChar;
-
- public DeepIndentRule(char openChar, char closeChar)
- {
- this.openChar = openChar;
- this.closeChar = closeChar;
- }
-
- //{{{ apply() method
- public void apply(JEditBuffer buffer, int thisLineIndex,
- int prevLineIndex, int prevPrevLineIndex,
- List<IndentAction> indentActions)
- {
- if (prevLineIndex == -1)
- return;
-
- int lineIndex = prevLineIndex;
- int oldLineIndex = lineIndex;
- CharSequence lineText = buffer.getLineSegment(lineIndex);
- int searchPos = -1;
- while (true)
- {
- if (lineIndex != oldLineIndex)
- {
- lineText = buffer.getLineSegment(lineIndex);
- oldLineIndex = lineIndex;
- }
- Parens parens = new Parens(buffer, lineIndex, searchPos);
-
- // No unmatched parens on prev line.
- if (parens.openOffset == -1 && parens.closeOffset == -1)
- {
- // Try prev-prev line if present.
- if (prevPrevLineIndex != -1) {
- searchPos = -1;
- lineIndex = prevPrevLineIndex;
- prevPrevLineIndex = -1;
- continue;
- }
- return;
- }
-
- // There's an unmatched open parenthesis - we want to
- // align according to its position.
- if (parens.closeOffset == -1)
- {
- // recalculate column (when using tabs instead of spaces)
- int indent = parens.openOffset + getIndent(lineText, buffer.getTabSize()) - lineText.length();
- indentActions.clear();
- indentActions.add(new IndentAction.AlignParameter(indent));
- return;
- }
-
- // There's an unmatched closed parenthesis - find the
- // matching parenthesis and start looking from there again.
- int openParenOffset = TextUtilities.findMatchingBracket(buffer, lineIndex, parens.closeOffset);
- if (openParenOffset >= 0)
- {
- // Avoid falling back to the prev-prev line in this case.
- prevPrevLineIndex = -1;
- lineIndex = buffer.getLineOfOffset(openParenOffset);
- searchPos = openParenOffset - buffer.getLineStartOffset(lineIndex) - 1;
- if (searchPos < 0)
- break;
- }
- else
- break;
- }
- } //}}}
-
-
- /**
- * Returns the length of the string as if it were indented with
- * spaces instead of tabs.
- */
- private int getIndent(CharSequence line, int tabSize)
- {
- int cnt = 0;
- for (int i = 0; i < line.length(); i++)
- {
- if (line.charAt(i) == '\t')
- {
- cnt += tabSize;
- }
- else
- {
- if (!Character.isWhitespace(line.charAt(i)))
- {
- cnt += (line.length() - i);
- break;
- }
- cnt++;
- }
- }
- return cnt;
- }
-
-
- /**
- * A token filter that looks for the position of the open and
- * close characters in the line being parsed. Characters inside
- * literals and comments are ignored.
- */
- private class Parens implements TokenHandler
- {
- int openOffset;
- int closeOffset;
-
- private int searchPos;
- private Stack<Integer> open;
- private Stack<Integer> close;
-
- Parens(JEditBuffer b, int line, int pos)
- {
- this.searchPos = pos;
- this.open = new Stack<Integer>();
- this.close = new Stack<Integer>();
- b.markTokens(line, this);
- openOffset = (open.isEmpty()) ? -1 : open.pop();
- closeOffset = (close.isEmpty()) ? -1 : close.pop();
- }
-
- public void handleToken(Segment seg,
- byte id,
- int offset,
- int length,
- TokenMarker.LineContext context)
- {
- if (length <= 0 ||
- (searchPos != -1 && searchPos < offset))
- {
- return;
- }
-
- if (searchPos != -1 && offset + length > searchPos)
- {
- length = searchPos - offset + 1;
- }
-
- switch (id)
- {
- case Token.COMMENT1:
- case Token.COMMENT2:
- case Token.COMMENT3:
- case Token.COMMENT4:
- case Token.LITERAL1:
- case Token.LITERAL2:
- case Token.LITERAL3:
- case Token.LITERAL4:
- /* Ignore comments and literals. */
- break;
- default:
- for (int i = offset; i < offset + length; i++)
- {
- if (seg.array[seg.offset + i] == openChar)
- {
- if (open.isEmpty() && !close.isEmpty())
- close.pop();
- else
- open.push(i);
- }
- else if (seg.array[seg.offset + i] == closeChar)
- {
- if (close.isEmpty() && !open.isEmpty())
- open.pop();
- else
- close.push(i);
- }
- }
- break;
- }
- }
-
- public void setLineContext(TokenMarker.LineContext lineContext)
- {
- /* Do nothing. */
- }
-
- @Override
- public String toString()
- {
- return "Parens(" + openOffset + ',' + closeOffset + ')';
- }
- } //}}}
-
-}
-
+/*
+ * DeepIndentRule.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.indent;
+
+import org.gjt.sp.jedit.TextUtilities;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+
+import org.gjt.sp.jedit.syntax.Token;
+import org.gjt.sp.jedit.syntax.TokenHandler;
+import org.gjt.sp.jedit.syntax.TokenMarker;
+
+import java.util.List;
+import java.util.Stack;
+import javax.swing.text.Segment;
+
+/**
+ * Deep indent rule.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: DeepIndentRule.java 13045 2008-07-11 06:48:37Z vanza $
+ */
+public class DeepIndentRule implements IndentRule
+{
+ private final char openChar;
+ private final char closeChar;
+
+ public DeepIndentRule(char openChar, char closeChar)
+ {
+ this.openChar = openChar;
+ this.closeChar = closeChar;
+ }
+
+ //{{{ apply() method
+ public void apply(JEditBuffer buffer, int thisLineIndex,
+ int prevLineIndex, int prevPrevLineIndex,
+ List<IndentAction> indentActions)
+ {
+ if (prevLineIndex == -1)
+ return;
+
+ int lineIndex = prevLineIndex;
+ int oldLineIndex = lineIndex;
+ CharSequence lineText = buffer.getLineSegment(lineIndex);
+ int searchPos = -1;
+ while (true)
+ {
+ if (lineIndex != oldLineIndex)
+ {
+ lineText = buffer.getLineSegment(lineIndex);
+ oldLineIndex = lineIndex;
+ }
+ Parens parens = new Parens(buffer, lineIndex, searchPos);
+
+ // No unmatched parens on prev line.
+ if (parens.openOffset == -1 && parens.closeOffset == -1)
+ {
+ // Try prev-prev line if present.
+ if (prevPrevLineIndex != -1) {
+ searchPos = -1;
+ lineIndex = prevPrevLineIndex;
+ prevPrevLineIndex = -1;
+ continue;
+ }
+ return;
+ }
+
+ // There's an unmatched open parenthesis - we want to
+ // align according to its position.
+ if (parens.closeOffset == -1)
+ {
+ // recalculate column (when using tabs instead of spaces)
+ int indent = parens.openOffset + getIndent(lineText, buffer.getTabSize()) - lineText.length();
+ indentActions.clear();
+ indentActions.add(new IndentAction.AlignParameter(indent));
+ return;
+ }
+
+ // There's an unmatched closed parenthesis - find the
+ // matching parenthesis and start looking from there again.
+ int openParenOffset = TextUtilities.findMatchingBracket(buffer, lineIndex, parens.closeOffset);
+ if (openParenOffset >= 0)
+ {
+ // Avoid falling back to the prev-prev line in this case.
+ prevPrevLineIndex = -1;
+ lineIndex = buffer.getLineOfOffset(openParenOffset);
+ searchPos = openParenOffset - buffer.getLineStartOffset(lineIndex) - 1;
+ if (searchPos < 0)
+ break;
+ }
+ else
+ break;
+ }
+ } //}}}
+
+
+ /**
+ * Returns the length of the string as if it were indented with
+ * spaces instead of tabs.
+ */
+ private int getIndent(CharSequence line, int tabSize)
+ {
+ int cnt = 0;
+ for (int i = 0; i < line.length(); i++)
+ {
+ if (line.charAt(i) == '\t')
+ {
+ cnt += tabSize;
+ }
+ else
+ {
+ if (!Character.isWhitespace(line.charAt(i)))
+ {
+ cnt += (line.length() - i);
+ break;
+ }
+ cnt++;
+ }
+ }
+ return cnt;
+ }
+
+
+ /**
+ * A token filter that looks for the position of the open and
+ * close characters in the line being parsed. Characters inside
+ * literals and comments are ignored.
+ */
+ private class Parens implements TokenHandler
+ {
+ int openOffset;
+ int closeOffset;
+
+ private int searchPos;
+ private Stack<Integer> open;
+ private Stack<Integer> close;
+
+ Parens(JEditBuffer b, int line, int pos)
+ {
+ this.searchPos = pos;
+ this.open = new Stack<Integer>();
+ this.close = new Stack<Integer>();
+ b.markTokens(line, this);
+ openOffset = (open.isEmpty()) ? -1 : open.pop();
+ closeOffset = (close.isEmpty()) ? -1 : close.pop();
+ }
+
+ public void handleToken(Segment seg,
+ byte id,
+ int offset,
+ int length,
+ TokenMarker.LineContext context)
+ {
+ if (length <= 0 ||
+ (searchPos != -1 && searchPos < offset))
+ {
+ return;
+ }
+
+ if (searchPos != -1 && offset + length > searchPos)
+ {
+ length = searchPos - offset + 1;
+ }
+
+ switch (id)
+ {
+ case Token.COMMENT1:
+ case Token.COMMENT2:
+ case Token.COMMENT3:
+ case Token.COMMENT4:
+ case Token.LITERAL1:
+ case Token.LITERAL2:
+ case Token.LITERAL3:
+ case Token.LITERAL4:
+ /* Ignore comments and literals. */
+ break;
+ default:
+ for (int i = offset; i < offset + length; i++)
+ {
+ if (seg.array[seg.offset + i] == openChar)
+ {
+ if (open.isEmpty() && !close.isEmpty())
+ close.pop();
+ else
+ open.push(i);
+ }
+ else if (seg.array[seg.offset + i] == closeChar)
+ {
+ if (close.isEmpty() && !open.isEmpty())
+ open.pop();
+ else
+ close.push(i);
+ }
+ }
+ break;
+ }
+ }
+
+ public void setLineContext(TokenMarker.LineContext lineContext)
+ {
+ /* Do nothing. */
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Parens(" + openOffset + ',' + closeOffset + ')';
+ }
+ } //}}}
+
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/indent/IndentAction.java b/jEdit/org/gjt/sp/jedit/indent/IndentAction.java
index c58f027..6e87ec6 100644
--- a/jEdit/org/gjt/sp/jedit/indent/IndentAction.java
+++ b/jEdit/org/gjt/sp/jedit/indent/IndentAction.java
@@ -1,222 +1,222 @@
-/*
- * IndentAction.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.indent;
-
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.util.StandardUtilities;
-
-/**
- * @author Slava Pestov
- * @version $Id: IndentAction.java 15614 2009-06-30 07:21:56Z voituk $
- */
-public interface IndentAction
-{
- /**
- * @param buffer The buffer
- * @param line The line number that matched the rule; not necessarily
- * the line being indented.
- * @param oldIndent Original indent.
- * @param newIndent The new indent -- ie, indent returned by previous
- * indent action.
- */
- int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
- int newIndent);
-
- /**
- * @return true if the indent engine should keep processing after
- * this rule.
- */
- boolean keepChecking();
-
- /** See comments for each instance of this class below. */
- class Collapse implements IndentAction
- {
- /**
- * This does nothing; it is merely a sentinel for the
- * <code>OpenBracketIndentRule</code>.
- */
- public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
- int newIndent)
- {
- return newIndent;
- }
-
- public boolean keepChecking()
- {
- return true;
- }
-
- private Collapse()
- {
- }
- }
-
- class Reset implements IndentAction
- {
- public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
- int newIndent)
- {
- return oldIndent;
- }
-
- public boolean keepChecking()
- {
- return true;
- }
- }
-
- class Increase implements IndentAction
- {
- private int amount;
-
- public Increase()
- {
- amount = 1;
- }
-
- public Increase(int amount)
- {
- this.amount = amount;
- }
-
- public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
- int newIndent)
- {
- return newIndent + buffer.getIndentSize() * amount;
- }
-
- public boolean keepChecking()
- {
- return true;
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof Increase)
- return ((Increase)o).amount == amount;
- else
- return false;
- }
- }
-
- class Decrease implements IndentAction
- {
- public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
- int newIndent)
- {
- return newIndent - buffer.getIndentSize();
- }
-
- public boolean keepChecking()
- {
- return true;
- }
- }
-
- /**
- * @author Matthieu Casanova
- */
- class AlignOffset implements IndentAction
- {
- private int offset;
-
- public AlignOffset(int offset)
- {
- this.offset = offset;
- }
-
- public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
- int newIndent)
- {
- return offset;
- }
-
- public boolean keepChecking()
- {
- return false;
- }
- }
-
- /**
- * Indent action used for deep indent.
- * @author Matthieu Casanova
- */
- class AlignParameter implements IndentAction
- {
- private int openParensColumn;
-
- public AlignParameter(int openParensColumn)
- {
- this.openParensColumn = openParensColumn;
- }
-
- public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
- int newIndent)
- {
- return openParensColumn + 1;
- }
-
- public boolean keepChecking()
- {
- return false;
- }
- }
-
- /**
- * Used to cancel increases in indentation.
- *
- * @author Marcelo Vanzin
- */
- class NoIncrease implements IndentAction
- {
- public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
- int newIndent)
- {
- int current = StandardUtilities.getLeadingWhiteSpaceWidth(
- buffer.getLineSegment(line),buffer.getTabSize());
- return (current < newIndent) ? current : newIndent;
- }
-
- public boolean keepChecking()
- {
- return true;
- }
- }
-
- /**
- * This handles the following Java code:
- * if(something)
- * { // no indentation on this line, even though previous matches a rule
- */
- Collapse PrevCollapse = new Collapse();
- /**
- * This handles cases like:
- * if (foo)
- * bar;
- * for (something; condition; action) {
- * }
- * Without this the "for" line would be incorrectly indented.
- */
- Collapse PrevPrevCollapse = new Collapse();
-}
-
+/*
+ * IndentAction.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.indent;
+
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.StandardUtilities;
+
+/**
+ * @author Slava Pestov
+ * @version $Id: IndentAction.java 15614 2009-06-30 07:21:56Z voituk $
+ */
+public interface IndentAction
+{
+ /**
+ * @param buffer The buffer
+ * @param line The line number that matched the rule; not necessarily
+ * the line being indented.
+ * @param oldIndent Original indent.
+ * @param newIndent The new indent -- ie, indent returned by previous
+ * indent action.
+ */
+ int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
+ int newIndent);
+
+ /**
+ * @return true if the indent engine should keep processing after
+ * this rule.
+ */
+ boolean keepChecking();
+
+ /** See comments for each instance of this class below. */
+ class Collapse implements IndentAction
+ {
+ /**
+ * This does nothing; it is merely a sentinel for the
+ * <code>OpenBracketIndentRule</code>.
+ */
+ public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
+ int newIndent)
+ {
+ return newIndent;
+ }
+
+ public boolean keepChecking()
+ {
+ return true;
+ }
+
+ private Collapse()
+ {
+ }
+ }
+
+ class Reset implements IndentAction
+ {
+ public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
+ int newIndent)
+ {
+ return oldIndent;
+ }
+
+ public boolean keepChecking()
+ {
+ return true;
+ }
+ }
+
+ class Increase implements IndentAction
+ {
+ private int amount;
+
+ public Increase()
+ {
+ amount = 1;
+ }
+
+ public Increase(int amount)
+ {
+ this.amount = amount;
+ }
+
+ public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
+ int newIndent)
+ {
+ return newIndent + buffer.getIndentSize() * amount;
+ }
+
+ public boolean keepChecking()
+ {
+ return true;
+ }
+
+ public boolean equals(Object o)
+ {
+ if(o instanceof Increase)
+ return ((Increase)o).amount == amount;
+ else
+ return false;
+ }
+ }
+
+ class Decrease implements IndentAction
+ {
+ public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
+ int newIndent)
+ {
+ return newIndent - buffer.getIndentSize();
+ }
+
+ public boolean keepChecking()
+ {
+ return true;
+ }
+ }
+
+ /**
+ * @author Matthieu Casanova
+ */
+ class AlignOffset implements IndentAction
+ {
+ private int offset;
+
+ public AlignOffset(int offset)
+ {
+ this.offset = offset;
+ }
+
+ public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
+ int newIndent)
+ {
+ return offset;
+ }
+
+ public boolean keepChecking()
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Indent action used for deep indent.
+ * @author Matthieu Casanova
+ */
+ class AlignParameter implements IndentAction
+ {
+ private int openParensColumn;
+
+ public AlignParameter(int openParensColumn)
+ {
+ this.openParensColumn = openParensColumn;
+ }
+
+ public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
+ int newIndent)
+ {
+ return openParensColumn + 1;
+ }
+
+ public boolean keepChecking()
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Used to cancel increases in indentation.
+ *
+ * @author Marcelo Vanzin
+ */
+ class NoIncrease implements IndentAction
+ {
+ public int calculateIndent(JEditBuffer buffer, int line, int oldIndent,
+ int newIndent)
+ {
+ int current = StandardUtilities.getLeadingWhiteSpaceWidth(
+ buffer.getLineSegment(line),buffer.getTabSize());
+ return (current < newIndent) ? current : newIndent;
+ }
+
+ public boolean keepChecking()
+ {
+ return true;
+ }
+ }
+
+ /**
+ * This handles the following Java code:
+ * if(something)
+ * { // no indentation on this line, even though previous matches a rule
+ */
+ Collapse PrevCollapse = new Collapse();
+ /**
+ * This handles cases like:
+ * if (foo)
+ * bar;
+ * for (something; condition; action) {
+ * }
+ * Without this the "for" line would be incorrectly indented.
+ */
+ Collapse PrevPrevCollapse = new Collapse();
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/indent/IndentRule.java b/jEdit/org/gjt/sp/jedit/indent/IndentRule.java
index 0106786..8a692ba 100644
--- a/jEdit/org/gjt/sp/jedit/indent/IndentRule.java
+++ b/jEdit/org/gjt/sp/jedit/indent/IndentRule.java
@@ -1,49 +1,49 @@
-/*
- * IndentRule.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.indent;
-
-import java.util.List;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-
-/**
- * @author Slava Pestov
- * @version $Id: IndentRule.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public interface IndentRule
-{
- /**
- * Apply the indent rule to this line, and return an indent action.
- *
- * @param buffer the buffer
- * @param thisLineIndex the line index
- * @param prevLineIndex the prior non empty line index
- * (or -1 if there is no prior non empty line)
- * @param prevPrevLineIndex the prior non empty line index before the prevLineIndex
- * (or -1 if there is no prior non empty line)
- * @param indentActions the indent actions list. The rule can add an action in it if
- * it is necessary
- */
- void apply(JEditBuffer buffer, int thisLineIndex,
- int prevLineIndex, int prevPrevLineIndex,
- List<IndentAction> indentActions);
-}
+/*
+ * IndentRule.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.indent;
+
+import java.util.List;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+
+/**
+ * @author Slava Pestov
+ * @version $Id: IndentRule.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public interface IndentRule
+{
+ /**
+ * Apply the indent rule to this line, and return an indent action.
+ *
+ * @param buffer the buffer
+ * @param thisLineIndex the line index
+ * @param prevLineIndex the prior non empty line index
+ * (or -1 if there is no prior non empty line)
+ * @param prevPrevLineIndex the prior non empty line index before the prevLineIndex
+ * (or -1 if there is no prior non empty line)
+ * @param indentActions the indent actions list. The rule can add an action in it if
+ * it is necessary
+ */
+ void apply(JEditBuffer buffer, int thisLineIndex,
+ int prevLineIndex, int prevPrevLineIndex,
+ List<IndentAction> indentActions);
+}
diff --git a/jEdit/org/gjt/sp/jedit/indent/IndentRuleFactory.java b/jEdit/org/gjt/sp/jedit/indent/IndentRuleFactory.java
index 14a3b04..0f92d80 100644
--- a/jEdit/org/gjt/sp/jedit/indent/IndentRuleFactory.java
+++ b/jEdit/org/gjt/sp/jedit/indent/IndentRuleFactory.java
@@ -1,90 +1,90 @@
-/*
- * IndentRuleFactory.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.indent;
-
-import java.util.regex.PatternSyntaxException;
-
-public class IndentRuleFactory
-{
- public static IndentRule indentNextLines(String regexp)
- throws PatternSyntaxException
- {
- return new RegexpIndentRule(regexp,
- null,
- new IndentAction.Increase(),
- null,false);
- }
-
- public static IndentRule indentNextLine(String regexp)
- throws PatternSyntaxException
- {
- return new RegexpIndentRule(regexp,
- new IndentAction.Decrease(),
- new IndentAction.Increase(),
- null,true);
- }
-
- public static IndentRule unindentThisLine(String regexp)
- throws PatternSyntaxException
- {
- return new RegexpIndentRule(regexp,
- null,
- new IndentAction.Increase(),
- new IndentAction.Decrease(),
- false);
- }
-
- public static IndentRule unindentNextLines(String regexp)
- throws PatternSyntaxException
- {
- return new RegexpIndentRule(regexp,
- null,
- new IndentAction.Decrease(),
- null,
- false);
- }
-
- public static IndentRule indentOpenBracket(char bracket)
- throws PatternSyntaxException
- {
- return new OpenBracketIndentRule(bracket,true);
- }
-
- public static IndentRule indentCloseBracket(char bracket)
- throws PatternSyntaxException
- {
- return new CloseBracketIndentRule(bracket,true);
- }
-
- public static IndentRule unalignedOpenBracket(char bracket)
- throws PatternSyntaxException
- {
- return new OpenBracketIndentRule(bracket,false);
- }
-
- public static IndentRule unalignedCloseBracket(char bracket)
- throws PatternSyntaxException
- {
- return new CloseBracketIndentRule(bracket,false);
- }
-}
+/*
+ * IndentRuleFactory.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.indent;
+
+import java.util.regex.PatternSyntaxException;
+
+public class IndentRuleFactory
+{
+ public static IndentRule indentNextLines(String regexp)
+ throws PatternSyntaxException
+ {
+ return new RegexpIndentRule(regexp,
+ null,
+ new IndentAction.Increase(),
+ null,false);
+ }
+
+ public static IndentRule indentNextLine(String regexp)
+ throws PatternSyntaxException
+ {
+ return new RegexpIndentRule(regexp,
+ new IndentAction.Decrease(),
+ new IndentAction.Increase(),
+ null,true);
+ }
+
+ public static IndentRule unindentThisLine(String regexp)
+ throws PatternSyntaxException
+ {
+ return new RegexpIndentRule(regexp,
+ null,
+ new IndentAction.Increase(),
+ new IndentAction.Decrease(),
+ false);
+ }
+
+ public static IndentRule unindentNextLines(String regexp)
+ throws PatternSyntaxException
+ {
+ return new RegexpIndentRule(regexp,
+ null,
+ new IndentAction.Decrease(),
+ null,
+ false);
+ }
+
+ public static IndentRule indentOpenBracket(char bracket)
+ throws PatternSyntaxException
+ {
+ return new OpenBracketIndentRule(bracket,true);
+ }
+
+ public static IndentRule indentCloseBracket(char bracket)
+ throws PatternSyntaxException
+ {
+ return new CloseBracketIndentRule(bracket,true);
+ }
+
+ public static IndentRule unalignedOpenBracket(char bracket)
+ throws PatternSyntaxException
+ {
+ return new OpenBracketIndentRule(bracket,false);
+ }
+
+ public static IndentRule unalignedCloseBracket(char bracket)
+ throws PatternSyntaxException
+ {
+ return new CloseBracketIndentRule(bracket,false);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/indent/OpenBracketIndentRule.java b/jEdit/org/gjt/sp/jedit/indent/OpenBracketIndentRule.java
index 8655093..1cbc60e 100644
--- a/jEdit/org/gjt/sp/jedit/indent/OpenBracketIndentRule.java
+++ b/jEdit/org/gjt/sp/jedit/indent/OpenBracketIndentRule.java
@@ -1,91 +1,91 @@
-/*
- * OpenBracketIndentRule.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.indent;
-
-import java.util.List;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.TextUtilities;
-
-/**
- * @author Slava Pestov
- * @version $Id: OpenBracketIndentRule.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class OpenBracketIndentRule extends BracketIndentRule
-{
- //{{{ OpenBracketIndentRule constructor
- public OpenBracketIndentRule(char openBracket, boolean aligned)
- {
- super(openBracket,
- TextUtilities.getComplementaryBracket(openBracket,null));
- this.aligned = aligned;
- } //}}}
-
- //{{{ apply() method
- public void apply(JEditBuffer buffer, int thisLineIndex,
- int prevLineIndex, int prevPrevLineIndex,
- List<IndentAction> indentActions)
- {
- int prevOpenBracketCount = getOpenBracketCount(buffer,prevLineIndex);
- if(prevOpenBracketCount != 0)
- {
- handleCollapse(indentActions, true);
- boolean multiple = buffer.getBooleanProperty(
- "multipleBracketIndent");
- IndentAction increase = new IndentAction.Increase(
- multiple ? prevOpenBracketCount : 1);
- indentActions.add(increase);
- }
- else if(getOpenBracketCount(buffer,thisLineIndex) != 0)
- {
- handleCollapse(indentActions, false);
- }
- } //}}}
-
- //{{{ getOpenBracketCount() method
- private int getOpenBracketCount(JEditBuffer buffer, int line)
- {
- if(line == -1)
- return 0;
- else
- return getBrackets(buffer, line).openCount;
- } //}}}
-
- //{{{ handleCollapse() method
- private static void handleCollapse(List<IndentAction> indentActions,
- boolean delPrevPrevCollapse)
- {
- if (indentActions.contains(IndentAction.PrevCollapse))
- {
- indentActions.clear();
- return;
- }
-
- if (delPrevPrevCollapse && indentActions.contains(IndentAction.PrevPrevCollapse))
- {
- indentActions.clear();
- return;
- }
- } //}}}
-
- private boolean aligned;
-}
+/*
+ * OpenBracketIndentRule.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.indent;
+
+import java.util.List;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.TextUtilities;
+
+/**
+ * @author Slava Pestov
+ * @version $Id: OpenBracketIndentRule.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class OpenBracketIndentRule extends BracketIndentRule
+{
+ //{{{ OpenBracketIndentRule constructor
+ public OpenBracketIndentRule(char openBracket, boolean aligned)
+ {
+ super(openBracket,
+ TextUtilities.getComplementaryBracket(openBracket,null));
+ this.aligned = aligned;
+ } //}}}
+
+ //{{{ apply() method
+ public void apply(JEditBuffer buffer, int thisLineIndex,
+ int prevLineIndex, int prevPrevLineIndex,
+ List<IndentAction> indentActions)
+ {
+ int prevOpenBracketCount = getOpenBracketCount(buffer,prevLineIndex);
+ if(prevOpenBracketCount != 0)
+ {
+ handleCollapse(indentActions, true);
+ boolean multiple = buffer.getBooleanProperty(
+ "multipleBracketIndent");
+ IndentAction increase = new IndentAction.Increase(
+ multiple ? prevOpenBracketCount : 1);
+ indentActions.add(increase);
+ }
+ else if(getOpenBracketCount(buffer,thisLineIndex) != 0)
+ {
+ handleCollapse(indentActions, false);
+ }
+ } //}}}
+
+ //{{{ getOpenBracketCount() method
+ private int getOpenBracketCount(JEditBuffer buffer, int line)
+ {
+ if(line == -1)
+ return 0;
+ else
+ return getBrackets(buffer, line).openCount;
+ } //}}}
+
+ //{{{ handleCollapse() method
+ private static void handleCollapse(List<IndentAction> indentActions,
+ boolean delPrevPrevCollapse)
+ {
+ if (indentActions.contains(IndentAction.PrevCollapse))
+ {
+ indentActions.clear();
+ return;
+ }
+
+ if (delPrevPrevCollapse && indentActions.contains(IndentAction.PrevPrevCollapse))
+ {
+ indentActions.clear();
+ return;
+ }
+ } //}}}
+
+ private boolean aligned;
+}
diff --git a/jEdit/org/gjt/sp/jedit/indent/RegexpIndentRule.java b/jEdit/org/gjt/sp/jedit/indent/RegexpIndentRule.java
index f1c9963..35b83f2 100644
--- a/jEdit/org/gjt/sp/jedit/indent/RegexpIndentRule.java
+++ b/jEdit/org/gjt/sp/jedit/indent/RegexpIndentRule.java
@@ -1,175 +1,175 @@
-/*
- * RegexpIndentRule.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.indent;
-
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import javax.swing.text.Segment;
-
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.syntax.Token;
-import org.gjt.sp.jedit.syntax.TokenHandler;
-import org.gjt.sp.jedit.syntax.TokenMarker;
-
-/**
- * @author Slava Pestov
- * @version $Id: RegexpIndentRule.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class RegexpIndentRule implements IndentRule
-{
- //{{{ RegexpIndentRule constructor
- /**
- * @param collapse If true, then if the next indent rule is
- * an opening bracket, this rule will not increase indent.
- */
- public RegexpIndentRule(String regexp, IndentAction prevPrev,
- IndentAction prev, IndentAction thisLine, boolean collapse)
- throws PatternSyntaxException
- {
- prevPrevAction = prevPrev;
- prevAction = prev;
- thisAction = thisLine;
- this.regexp = Pattern.compile(regexp, Pattern.CASE_INSENSITIVE );
- this.collapse = collapse;
- } //}}}
-
- //{{{ apply() method
- public void apply(JEditBuffer buffer, int thisLineIndex,
- int prevLineIndex, int prevPrevLineIndex,
- List<IndentAction> indentActions)
- {
- if(thisAction != null
- && lineMatches(buffer, thisLineIndex))
- {
- indentActions.add(thisAction);
- }
- if(prevAction != null
- && prevLineIndex != -1
- && lineMatches(buffer, prevLineIndex))
- {
- indentActions.add(prevAction);
- if (collapse)
- indentActions.add(IndentAction.PrevCollapse);
- }
- if(prevPrevAction != null
- && prevPrevLineIndex != -1
- && lineMatches(buffer, prevPrevLineIndex))
- {
- indentActions.add(prevPrevAction);
- if (collapse)
- indentActions.add(IndentAction.PrevPrevCollapse);
- }
- } //}}}
-
- //{{{ isMatch() method
- /**
- * @deprecated
- * Do not use this. This is here only for compatibility.
- */
- @Deprecated
- public boolean isMatch(String line)
- {
- Matcher m = regexp.matcher(line);
-// return regexp.isMatch(line);
- return m.matches();
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- return getClass().getName() + '[' + regexp + ']';
- } //}}}
-
- private IndentAction prevPrevAction, prevAction, thisAction;
- private Pattern regexp;
- private boolean collapse;
-
- //{{{ class TokenFilter
- /**
- * A filter which removes non syntactic characters in comments
- * or literals which might confuse regexp matchings for indent.
- */
- private static class TokenFilter implements TokenHandler
- {
- public StringBuilder result;
-
- public TokenFilter(int originalLength)
- {
- result = new StringBuilder(originalLength);
- }
-
- public void handleToken(Segment seg
- , byte id, int offset, int length
- , TokenMarker.LineContext context)
- {
- // Avoid replacing an empty token into a non empty
- // string.
- if (length <= 0)
- {
- return;
- }
-
- switch (id)
- {
- case Token.COMMENT1:
- case Token.COMMENT2:
- case Token.COMMENT3:
- case Token.COMMENT4:
- // Replace any comments to a white space
- // so that they are simply ignored.
- result.append(' ');
- break;
- case Token.LITERAL1:
- case Token.LITERAL2:
- case Token.LITERAL3:
- case Token.LITERAL4:
- // Replace any literals to a '0' which means
- // a simple integer literal in most programming
- // languages.
- result.append('0');
- break;
- default:
- result.append(seg.array
- , seg.offset + offset
- , length);
- break;
- }
- }
-
- public void setLineContext(TokenMarker.LineContext lineContext)
- {
- }
- } //}}}
-
- //{{{ lineMatches() method
- private boolean lineMatches(JEditBuffer buffer, int lineIndex)
- {
- TokenFilter filter
- = new TokenFilter(buffer.getLineLength(lineIndex));
- buffer.markTokens(lineIndex, filter);
- return regexp.matcher(filter.result).matches();
- } //}}}
-}
+/*
+ * RegexpIndentRule.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.indent;
+
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import javax.swing.text.Segment;
+
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.syntax.Token;
+import org.gjt.sp.jedit.syntax.TokenHandler;
+import org.gjt.sp.jedit.syntax.TokenMarker;
+
+/**
+ * @author Slava Pestov
+ * @version $Id: RegexpIndentRule.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class RegexpIndentRule implements IndentRule
+{
+ //{{{ RegexpIndentRule constructor
+ /**
+ * @param collapse If true, then if the next indent rule is
+ * an opening bracket, this rule will not increase indent.
+ */
+ public RegexpIndentRule(String regexp, IndentAction prevPrev,
+ IndentAction prev, IndentAction thisLine, boolean collapse)
+ throws PatternSyntaxException
+ {
+ prevPrevAction = prevPrev;
+ prevAction = prev;
+ thisAction = thisLine;
+ this.regexp = Pattern.compile(regexp, Pattern.CASE_INSENSITIVE );
+ this.collapse = collapse;
+ } //}}}
+
+ //{{{ apply() method
+ public void apply(JEditBuffer buffer, int thisLineIndex,
+ int prevLineIndex, int prevPrevLineIndex,
+ List<IndentAction> indentActions)
+ {
+ if(thisAction != null
+ && lineMatches(buffer, thisLineIndex))
+ {
+ indentActions.add(thisAction);
+ }
+ if(prevAction != null
+ && prevLineIndex != -1
+ && lineMatches(buffer, prevLineIndex))
+ {
+ indentActions.add(prevAction);
+ if (collapse)
+ indentActions.add(IndentAction.PrevCollapse);
+ }
+ if(prevPrevAction != null
+ && prevPrevLineIndex != -1
+ && lineMatches(buffer, prevPrevLineIndex))
+ {
+ indentActions.add(prevPrevAction);
+ if (collapse)
+ indentActions.add(IndentAction.PrevPrevCollapse);
+ }
+ } //}}}
+
+ //{{{ isMatch() method
+ /**
+ * @deprecated
+ * Do not use this. This is here only for compatibility.
+ */
+ @Deprecated
+ public boolean isMatch(String line)
+ {
+ Matcher m = regexp.matcher(line);
+// return regexp.isMatch(line);
+ return m.matches();
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return getClass().getName() + '[' + regexp + ']';
+ } //}}}
+
+ private IndentAction prevPrevAction, prevAction, thisAction;
+ private Pattern regexp;
+ private boolean collapse;
+
+ //{{{ class TokenFilter
+ /**
+ * A filter which removes non syntactic characters in comments
+ * or literals which might confuse regexp matchings for indent.
+ */
+ private static class TokenFilter implements TokenHandler
+ {
+ public StringBuilder result;
+
+ public TokenFilter(int originalLength)
+ {
+ result = new StringBuilder(originalLength);
+ }
+
+ public void handleToken(Segment seg
+ , byte id, int offset, int length
+ , TokenMarker.LineContext context)
+ {
+ // Avoid replacing an empty token into a non empty
+ // string.
+ if (length <= 0)
+ {
+ return;
+ }
+
+ switch (id)
+ {
+ case Token.COMMENT1:
+ case Token.COMMENT2:
+ case Token.COMMENT3:
+ case Token.COMMENT4:
+ // Replace any comments to a white space
+ // so that they are simply ignored.
+ result.append(' ');
+ break;
+ case Token.LITERAL1:
+ case Token.LITERAL2:
+ case Token.LITERAL3:
+ case Token.LITERAL4:
+ // Replace any literals to a '0' which means
+ // a simple integer literal in most programming
+ // languages.
+ result.append('0');
+ break;
+ default:
+ result.append(seg.array
+ , seg.offset + offset
+ , length);
+ break;
+ }
+ }
+
+ public void setLineContext(TokenMarker.LineContext lineContext)
+ {
+ }
+ } //}}}
+
+ //{{{ lineMatches() method
+ private boolean lineMatches(JEditBuffer buffer, int lineIndex)
+ {
+ TokenFilter filter
+ = new TokenFilter(buffer.getLineLength(lineIndex));
+ buffer.markTokens(lineIndex, filter);
+ return regexp.matcher(filter.result).matches();
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/indent/WhitespaceRule.java b/jEdit/org/gjt/sp/jedit/indent/WhitespaceRule.java
index f77d35d..0e3cf8e 100644
--- a/jEdit/org/gjt/sp/jedit/indent/WhitespaceRule.java
+++ b/jEdit/org/gjt/sp/jedit/indent/WhitespaceRule.java
@@ -1,80 +1,80 @@
-/*
- * WhitespaceRule.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Marcelo Vanzin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.indent;
-
-import java.util.List;
-
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-
-/**
- * Whitespace rule. This rule cancels all indent actions in the
- * following case:
- *
- * <ul>
- * <li>The previous line is all whitespace</li>
- * <li>The current line is not empty</li>
- * </ul>
- *
- * <p>The result is that this rule won't allow the indentation to be
- * increased, only decreased (by rules triggered by unindentThisLine).
- * If the requirements above do not apply, this rule does nothing.</p>
- *
- * @author Marcelo Vanzin
- * @version $Id: WhitespaceRule.java 15614 2009-06-30 07:21:56Z voituk $
- * @since jEdit 4.3pre10
- */
-public class WhitespaceRule implements IndentRule
-{
-
- public void apply(JEditBuffer buffer, int thisLineIndex,
- int prevLineIndex, int prevPrevLineIndex,
- List<IndentAction> indentActions)
- {
- /* Don't apply this rule if the current line is empty. */
- CharSequence current = buffer.getLineSegment(thisLineIndex);
- boolean found = false;
- for (int i = 0; i < current.length(); i++)
- {
- if (!Character.isWhitespace(current.charAt(i)))
- {
- found = true;
- break;
- }
- }
- if (!found)
- return;
-
- /* Check if the previous line is empty. */
- if (prevLineIndex >= 0) {
- CharSequence previous = buffer.getLineSegment(prevLineIndex);
- for (int i = 0; i < previous.length(); i++)
- {
- if (!Character.isWhitespace(previous.charAt(i)))
- return;
- }
- }
- indentActions.add(new IndentAction.NoIncrease());
- }
-
-}
-
+/*
+ * WhitespaceRule.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Marcelo Vanzin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.indent;
+
+import java.util.List;
+
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+
+/**
+ * Whitespace rule. This rule cancels all indent actions in the
+ * following case:
+ *
+ * <ul>
+ * <li>The previous line is all whitespace</li>
+ * <li>The current line is not empty</li>
+ * </ul>
+ *
+ * <p>The result is that this rule won't allow the indentation to be
+ * increased, only decreased (by rules triggered by unindentThisLine).
+ * If the requirements above do not apply, this rule does nothing.</p>
+ *
+ * @author Marcelo Vanzin
+ * @version $Id: WhitespaceRule.java 15614 2009-06-30 07:21:56Z voituk $
+ * @since jEdit 4.3pre10
+ */
+public class WhitespaceRule implements IndentRule
+{
+
+ public void apply(JEditBuffer buffer, int thisLineIndex,
+ int prevLineIndex, int prevPrevLineIndex,
+ List<IndentAction> indentActions)
+ {
+ /* Don't apply this rule if the current line is empty. */
+ CharSequence current = buffer.getLineSegment(thisLineIndex);
+ boolean found = false;
+ for (int i = 0; i < current.length(); i++)
+ {
+ if (!Character.isWhitespace(current.charAt(i)))
+ {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ return;
+
+ /* Check if the previous line is empty. */
+ if (prevLineIndex >= 0) {
+ CharSequence previous = buffer.getLineSegment(prevLineIndex);
+ for (int i = 0; i < previous.length(); i++)
+ {
+ if (!Character.isWhitespace(previous.charAt(i)))
+ return;
+ }
+ }
+ indentActions.add(new IndentAction.NoIncrease());
+ }
+
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/input/AbstractInputHandler.java b/jEdit/org/gjt/sp/jedit/input/AbstractInputHandler.java
index a2c6ea9..d27f4b8 100644
--- a/jEdit/org/gjt/sp/jedit/input/AbstractInputHandler.java
+++ b/jEdit/org/gjt/sp/jedit/input/AbstractInputHandler.java
@@ -1,428 +1,424 @@
-/*
- * AbstractInputHandler.java - Manages key bindings and executes actions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.input;
-
-import org.gjt.sp.jedit.gui.KeyEventTranslator;
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.util.Log;
-
-import java.awt.event.KeyListener;
-import java.awt.event.KeyEvent;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
-import org.gjt.sp.jedit.JEditAbstractEditAction;
-import org.gjt.sp.jedit.gui.ShortcutPrefixActiveEvent;
-
-/**
- * The abstract input handler manage the keyboard handling.
- * The entry point is
- * {@link #processKeyEvent(java.awt.event.KeyEvent, int, boolean)}
- *
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-public abstract class AbstractInputHandler<E extends JEditAbstractEditAction>
-{
- protected int lastActionCount;
- /** This listener will receive keyboard events if it is not null. */
- protected KeyListener keyEventInterceptor;
- protected String readNextChar;
- protected int repeatCount;
- protected E lastAction;
-
-
- protected static final int REPEAT_COUNT_THRESHOLD = 20;
-
- //{{{ AbstractInputHandler constructor
- public AbstractInputHandler()
- {
- repeatCount = 1;
- } //}}}
-
- //{{{ addKeyBinding() method
- /**
- * Adds a key binding to this input handler. The key binding is
- * a list of white space separated key strokes of the form
- * <i>[modifiers+]key</i> where modifier is C for Control, A for Alt,
- * or S for Shift, and key is either a character (a-z) or a field
- * name in the KeyEvent class prefixed with VK_ (e.g., BACK_SPACE)
- * @param keyBinding The key binding
- * @param action The action
- * @since jEdit 4.2pre1
- */
- public void addKeyBinding(String keyBinding, String action)
- {
- addKeyBinding(keyBinding,(Object)action);
- } //}}}
-
- //{{{ addKeyBinding() method
- /**
- * Adds a key binding to this input handler. The key binding is
- * a list of white space separated key strokes of the form
- * <i>[modifiers+]key</i> where modifier is C for Control, A for Alt,
- * or S for Shift, and key is either a character (a-z) or a field
- * name in the KeyEvent class prefixed with VK_ (e.g., BACK_SPACE)
- * @param keyBinding The key binding
- * @param action The action
- */
- public void addKeyBinding(String keyBinding, E action)
- {
- addKeyBinding(keyBinding,(Object)action);
- } //}}}
-
- //{{{ addKeyBinding() method
- /**
- * Adds a key binding to this input handler. The key binding is
- * a list of white space separated key strokes of the form
- * <i>[modifiers+]key</i> where modifier is C for Control, A for Alt,
- * or S for Shift, and key is either a character (a-z) or a field
- * name in the KeyEvent class prefixed with VK_ (e.g., BACK_SPACE)
- * @param keyBinding The key binding
- * @param action The action
- * @since jEdit 4.3pre1
- */
- public void addKeyBinding(String keyBinding, Object action)
- {
- Hashtable current = bindings;
-
- String prefixStr = null;
-
- StringTokenizer st = new StringTokenizer(keyBinding);
- while(st.hasMoreTokens())
- {
- String keyCodeStr = st.nextToken();
- if(prefixStr == null)
- prefixStr = keyCodeStr;
- else
- prefixStr = prefixStr + " " + keyCodeStr;
-
- KeyEventTranslator.Key keyStroke = KeyEventTranslator.parseKey(keyCodeStr);
- if(keyStroke == null)
- return;
-
- if(st.hasMoreTokens())
- {
- Object o = current.get(keyStroke);
- if(o instanceof Hashtable)
- current = (Hashtable)o;
- else
- {
- Hashtable hash = new Hashtable();
- hash.put(PREFIX_STR,prefixStr);
- o = hash;
- current.put(keyStroke,o);
- current = (Hashtable)o;
- }
- }
- else
- current.put(keyStroke,action);
- }
- } //}}}
-
- //{{{ removeKeyBinding() method
- /**
- * Removes a key binding from this input handler. This is not yet
- * implemented.
- * @param keyBinding The key binding
- */
- public void removeKeyBinding(String keyBinding)
- {
- Hashtable current = bindings;
-
- StringTokenizer st = new StringTokenizer(keyBinding);
- while(st.hasMoreTokens())
- {
- String keyCodeStr = st.nextToken();
- KeyEventTranslator.Key keyStroke = KeyEventTranslator.parseKey(keyCodeStr);
- if(keyStroke == null)
- return;
-
- if(st.hasMoreTokens())
- {
- Object o = current.get(keyStroke);
- if(o instanceof Hashtable)
- current = ((Hashtable)o);
- else if(o != null)
- {
- // we have binding foo
- // but user asks to remove foo bar?
- current.remove(keyStroke);
- return;
- }
- else
- {
- // user asks to remove non-existent
- return;
- }
- }
- else
- current.remove(keyStroke);
- }
- } //}}}
-
- //{{{ removeAllKeyBindings() method
- /**
- * Removes all key bindings from this input handler.
- */
- public void removeAllKeyBindings()
- {
- bindings.clear();
- } //}}}
-
- //{{{ getKeyBinding() method
- /**
- * Returns either an edit action, or a hashtable if the specified key
- * is a prefix.
- * @param keyBinding The key binding
- * @since jEdit 3.2pre5
- */
- public Object getKeyBinding(String keyBinding)
- {
- Hashtable current = bindings;
- StringTokenizer st = new StringTokenizer(keyBinding);
-
- while(st.hasMoreTokens())
- {
- KeyEventTranslator.Key keyStroke = KeyEventTranslator.parseKey(
- st.nextToken());
- if(keyStroke == null)
- return null;
-
- if(st.hasMoreTokens())
- {
- Object o = current.get(keyStroke);
- if(o instanceof Hashtable)
- {
- if(!st.hasMoreTokens())
- return o;
- else
- current = (Hashtable)o;
- }
- else
- return o;
- }
- else
- {
- return current.get(keyStroke);
- }
- }
-
- return null;
- } //}}}
-
- //{{{ getLastActionCount() method
- /**
- * Returns the number of times the last action was executed.
- * It can be used with smartHome and smartEnd
- * @return the number of times the last action was executed
- * @since jEdit 2.5pre5
- */
- public int getLastActionCount()
- {
- return lastActionCount;
- } //}}}
-
- //{{{ resetLastActionCount() method
- /**
- * Resets the last action count. This should be called when an
- * editing operation that is not an action is invoked, for example
- * a mouse click.
- * @since jEdit 4.0pre1
- */
- public void resetLastActionCount()
- {
- lastActionCount = 0;
- } //}}}
-
- //{{{ getKeyEventInterceptor() method
- public KeyListener getKeyEventInterceptor()
- {
- return keyEventInterceptor;
- } //}}}
-
- //{{{ setKeyEventInterceptor() method
- /**
- * Sets the listener that will handle all key events in this
- * view. For example, the complete word command uses this so
- * that all key events are passed to the word list popup while
- * it is visible.
- * @param keyEventInterceptor the KeyListener that will receive the events
- */
- public void setKeyEventInterceptor(KeyListener keyEventInterceptor)
- {
- this.keyEventInterceptor = keyEventInterceptor;
- } //}}}
-
- //{{{ isPrefixActive() method
- /**
- * Returns if a prefix key has been pressed.
- */
- public boolean isPrefixActive()
- {
- return readNextChar != null;
- } //}}}
-
- //{{{ setBindings() method
- /**
- * Replace the set of key bindings.
- * @since jEdit 4.3pre1
- */
- public void setBindings(Hashtable bindings)
- {
- this.bindings = this.currentBindings = bindings;
- } //}}}
-
- //{{{ setCurrentBindings() method
- public void setCurrentBindings(Hashtable bindings)
- {
- currentBindings = bindings;
- } //}}}
-
- //{{{ handleKey() method
- /**
- * Handles a keystroke.
- * @param keyStroke The key stroke.
- * @param dryRun only calculate the return value, do not have any other effect
- * @return true if the input could be handled.
- * @since jEdit 4.3pre7
- */
- public abstract boolean handleKey(KeyEventTranslator.Key keyStroke,boolean dryRun);
- //}}}
-
- //{{{ processKeyEvent() method
-
- /**
- * Process a keyboard event.
- * This is the entry point of the keyboard handling
- *
- * @param evt the keyboard event
- * @param from the source, it can be {@link org.gjt.sp.jedit.View#VIEW},
- * {@link org.gjt.sp.jedit.View#ACTION_BAR} or {@link org.gjt.sp.jedit.View#TEXT_AREA}
- * @param global tell if the event comes from the DefaultKeyboardFocusManager or not
- */
- public abstract void processKeyEvent(KeyEvent evt, int from, boolean global);
- //}}}
-
- //{{{ processKeyEventKeyStrokeHandling() method
-
- //{{{ handleKey() methodprotected void sendShortcutPrefixOff()
- /**
- * If
- */
- protected void sendShortcutPrefixOff()
- {
- if(shortcutOn)
- {
- ShortcutPrefixActiveEvent.firePrefixStateChange(null, false);
- shortcutOn = false;
- }
- } //}}}
-
- public abstract void invokeAction(String action);
-
- public abstract void invokeAction(E action);
-
- //{{{ toString() method
- /**
- * Return a String representation of the keyboard event for
- * debugging purpose.
- *
- * @param evt the keyboard event
- * @return a String representation for this keyboard event
- * @since jEdit 4.3pre15
- */
- public static String toString(KeyEvent evt)
- {
- String id;
- switch(evt.getID())
- {
- case KeyEvent.KEY_PRESSED:
- id = "KEY_PRESSED";
- break;
- case KeyEvent.KEY_RELEASED:
- id = "KEY_RELEASED";
- break;
- case KeyEvent.KEY_TYPED:
- id = "KEY_TYPED";
- break;
- default:
- id = "unknown type";
- break;
- }
-
- StringBuilder b = new StringBuilder(50);
-
- b.append(id);
- b.append(",keyCode=0x").append(Integer.toString(evt.getKeyCode(), 16));
- b.append(",keyChar=0x").append(Integer.toString(evt.getKeyChar(), 16));
- b.append(",modifiers=0x").append(Integer.toString(evt.getModifiers(), 16));
-
- b.append(",consumed=");
- b.append(evt.isConsumed()?'1':'0');
-
- return b.toString();
- } //}}}
-
- /**
- *
- * @param evt the keyboard event
- * @param from the source, it can be {@link org.gjt.sp.jedit.View#VIEW},
- * {@link org.gjt.sp.jedit.View#ACTION_BAR} or {@link org.gjt.sp.jedit.View#TEXT_AREA}
- * @param mode the mode is "press" or "type" and is used for debug only
- * @param global tell if the event comes from the DefaultKeyboardFocusManager or not
- */
- protected void processKeyEventKeyStrokeHandling(KeyEvent evt, int from, String mode, boolean global)
- {
- KeyEventTranslator.Key keyStroke = KeyEventTranslator.translateKeyEvent2(evt);
-
- if(keyStroke != null)
- {
- keyStroke.setIsFromGlobalContext(global);
- if(Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,this,"Translated (key "+mode+"): "+keyStroke+" from "+from);
- }
- boolean consumed = false;
- if(handleKey(keyStroke,keyStroke.isPhantom()))
- {
- evt.consume();
-
- consumed = true;
- }
- if(Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,this,"Translated (key "+mode+"): "+keyStroke+" from "+from+": consumed="+consumed+'.');
- }
- }
- } //}}}
-
- //{{{ Private members
-
- // Stores prefix name in bindings hashtable
- public static Object PREFIX_STR = "PREFIX_STR";
- protected boolean shortcutOn = false;
-
-
- protected Hashtable bindings;
- protected Hashtable currentBindings;
- //}}}
-}
+/*
+ * AbstractInputHandler.java - Manages key bindings and executes actions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.input;
+
+import org.gjt.sp.jedit.gui.KeyEventTranslator;
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.util.Log;
+
+import java.awt.event.KeyListener;
+import java.awt.event.KeyEvent;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+import org.gjt.sp.jedit.JEditAbstractEditAction;
+import org.gjt.sp.jedit.gui.ShortcutPrefixActiveEvent;
+
+/**
+ * The abstract input handler manage the keyboard handling.
+ * The entry point is
+ * {@link #processKeyEvent(java.awt.event.KeyEvent, int, boolean)}
+ *
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+public abstract class AbstractInputHandler<E extends JEditAbstractEditAction>
+{
+ protected int lastActionCount;
+ /** This listener will receive keyboard events if it is not null. */
+ protected KeyListener keyEventInterceptor;
+ protected String readNextChar;
+ protected int repeatCount;
+ protected E lastAction;
+
+
+ protected static final int REPEAT_COUNT_THRESHOLD = 20;
+
+ //{{{ AbstractInputHandler constructor
+ public AbstractInputHandler()
+ {
+ repeatCount = 1;
+ } //}}}
+
+ //{{{ addKeyBinding() method
+ /**
+ * Adds a key binding to this input handler. The key binding is
+ * a list of white space separated key strokes of the form
+ * <i>[modifiers+]key</i> where modifier is C for Control, A for Alt,
+ * or S for Shift, and key is either a character (a-z) or a field
+ * name in the KeyEvent class prefixed with VK_ (e.g., BACK_SPACE)
+ * @param keyBinding The key binding
+ * @param action The action
+ * @since jEdit 4.2pre1
+ */
+ public void addKeyBinding(String keyBinding, String action)
+ {
+ addKeyBinding(keyBinding,(Object)action);
+ } //}}}
+
+ //{{{ addKeyBinding() method
+ /**
+ * Adds a key binding to this input handler. The key binding is
+ * a list of white space separated key strokes of the form
+ * <i>[modifiers+]key</i> where modifier is C for Control, A for Alt,
+ * or S for Shift, and key is either a character (a-z) or a field
+ * name in the KeyEvent class prefixed with VK_ (e.g., BACK_SPACE)
+ * @param keyBinding The key binding
+ * @param action The action
+ */
+ public void addKeyBinding(String keyBinding, E action)
+ {
+ addKeyBinding(keyBinding,(Object)action);
+ } //}}}
+
+ //{{{ addKeyBinding() method
+ /**
+ * Adds a key binding to this input handler. The key binding is
+ * a list of white space separated key strokes of the form
+ * <i>[modifiers+]key</i> where modifier is C for Control, A for Alt,
+ * or S for Shift, and key is either a character (a-z) or a field
+ * name in the KeyEvent class prefixed with VK_ (e.g., BACK_SPACE)
+ * @param keyBinding The key binding
+ * @param action The action
+ * @since jEdit 4.3pre1
+ */
+ public void addKeyBinding(String keyBinding, Object action)
+ {
+ Hashtable current = bindings;
+
+ String prefixStr = null;
+
+ StringTokenizer st = new StringTokenizer(keyBinding);
+ while(st.hasMoreTokens())
+ {
+ String keyCodeStr = st.nextToken();
+ if(prefixStr == null)
+ prefixStr = keyCodeStr;
+ else
+ prefixStr = prefixStr + " " + keyCodeStr;
+
+ KeyEventTranslator.Key keyStroke = KeyEventTranslator.parseKey(keyCodeStr);
+ if(keyStroke == null)
+ return;
+
+ if(st.hasMoreTokens())
+ {
+ Object o = current.get(keyStroke);
+ if(o instanceof Hashtable)
+ current = (Hashtable)o;
+ else
+ {
+ Hashtable hash = new Hashtable();
+ hash.put(PREFIX_STR,prefixStr);
+ o = hash;
+ current.put(keyStroke,o);
+ current = (Hashtable)o;
+ }
+ }
+ else
+ current.put(keyStroke,action);
+ }
+ } //}}}
+
+ //{{{ removeKeyBinding() method
+ /**
+ * Removes a key binding from this input handler. This is not yet
+ * implemented.
+ * @param keyBinding The key binding
+ */
+ public void removeKeyBinding(String keyBinding)
+ {
+ Hashtable current = bindings;
+
+ StringTokenizer st = new StringTokenizer(keyBinding);
+ while(st.hasMoreTokens())
+ {
+ String keyCodeStr = st.nextToken();
+ KeyEventTranslator.Key keyStroke = KeyEventTranslator.parseKey(keyCodeStr);
+ if(keyStroke == null)
+ return;
+
+ if(st.hasMoreTokens())
+ {
+ Object o = current.get(keyStroke);
+ if(o instanceof Hashtable)
+ current = ((Hashtable)o);
+ else if(o != null)
+ {
+ // we have binding foo
+ // but user asks to remove foo bar?
+ current.remove(keyStroke);
+ return;
+ }
+ else
+ {
+ // user asks to remove non-existent
+ return;
+ }
+ }
+ else
+ current.remove(keyStroke);
+ }
+ } //}}}
+
+ //{{{ removeAllKeyBindings() method
+ /**
+ * Removes all key bindings from this input handler.
+ */
+ public void removeAllKeyBindings()
+ {
+ bindings.clear();
+ } //}}}
+
+ //{{{ getKeyBinding() method
+ /**
+ * Returns either an edit action, or a hashtable if the specified key
+ * is a prefix.
+ * @param keyBinding The key binding
+ * @since jEdit 3.2pre5
+ */
+ public Object getKeyBinding(String keyBinding)
+ {
+ Hashtable current = bindings;
+ StringTokenizer st = new StringTokenizer(keyBinding);
+
+ while(st.hasMoreTokens())
+ {
+ KeyEventTranslator.Key keyStroke = KeyEventTranslator.parseKey(
+ st.nextToken());
+ if(keyStroke == null)
+ return null;
+
+ if(st.hasMoreTokens())
+ {
+ Object o = current.get(keyStroke);
+ if(o instanceof Hashtable)
+ {
+ if(!st.hasMoreTokens())
+ return o;
+ else
+ current = (Hashtable)o;
+ }
+ else
+ return o;
+ }
+ else
+ {
+ return current.get(keyStroke);
+ }
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ getLastActionCount() method
+ /**
+ * Returns the number of times the last action was executed.
+ * It can be used with smartHome and smartEnd
+ * @return the number of times the last action was executed
+ * @since jEdit 2.5pre5
+ */
+ public int getLastActionCount()
+ {
+ return lastActionCount;
+ } //}}}
+
+ //{{{ resetLastActionCount() method
+ /**
+ * Resets the last action count. This should be called when an
+ * editing operation that is not an action is invoked, for example
+ * a mouse click.
+ * @since jEdit 4.0pre1
+ */
+ public void resetLastActionCount()
+ {
+ lastActionCount = 0;
+ } //}}}
+
+ //{{{ getKeyEventInterceptor() method
+ public KeyListener getKeyEventInterceptor()
+ {
+ return keyEventInterceptor;
+ } //}}}
+
+ //{{{ setKeyEventInterceptor() method
+ /**
+ * Sets the listener that will handle all key events in this
+ * view. For example, the complete word command uses this so
+ * that all key events are passed to the word list popup while
+ * it is visible.
+ * @param keyEventInterceptor the KeyListener that will receive the events
+ */
+ public void setKeyEventInterceptor(KeyListener keyEventInterceptor)
+ {
+ this.keyEventInterceptor = keyEventInterceptor;
+ } //}}}
+
+ //{{{ isPrefixActive() method
+ /**
+ * Returns if a prefix key has been pressed.
+ */
+ public boolean isPrefixActive()
+ {
+ return readNextChar != null;
+ } //}}}
+
+ //{{{ setBindings() method
+ /**
+ * Replace the set of key bindings.
+ * @since jEdit 4.3pre1
+ */
+ public void setBindings(Hashtable bindings)
+ {
+ this.bindings = this.currentBindings = bindings;
+ } //}}}
+
+ //{{{ setCurrentBindings() method
+ public void setCurrentBindings(Hashtable bindings)
+ {
+ currentBindings = bindings;
+ } //}}}
+
+ //{{{ handleKey() method
+ /**
+ * Handles a keystroke.
+ * @param keyStroke The key stroke.
+ * @param dryRun only calculate the return value, do not have any other effect
+ * @return true if the input could be handled.
+ * @since jEdit 4.3pre7
+ */
+ public abstract boolean handleKey(KeyEventTranslator.Key keyStroke,boolean dryRun);
+ //}}}
+
+ //{{{ processKeyEvent() method
+
+ /**
+ * Process a keyboard event.
+ * This is the entry point of the keyboard handling
+ *
+ * @param evt the keyboard event
+ * @param from the source, it can be {@link org.gjt.sp.jedit.View#VIEW},
+ * {@link org.gjt.sp.jedit.View#ACTION_BAR} or {@link org.gjt.sp.jedit.View#TEXT_AREA}
+ * @param global tell if the event comes from the DefaultKeyboardFocusManager or not
+ */
+ public abstract void processKeyEvent(KeyEvent evt, int from, boolean global);
+ //}}}
+
+ //{{{ sendShortcutPrefixOff() method
+ protected void sendShortcutPrefixOff()
+ {
+ if(shortcutOn)
+ {
+ ShortcutPrefixActiveEvent.firePrefixStateChange(null, false);
+ shortcutOn = false;
+ }
+ } //}}}
+
+ public abstract void invokeAction(String action);
+
+ public abstract void invokeAction(E action);
+
+ //{{{ toString() method
+ /**
+ * Return a String representation of the keyboard event for
+ * debugging purpose.
+ *
+ * @param evt the keyboard event
+ * @return a String representation for this keyboard event
+ * @since jEdit 4.3pre15
+ */
+ public static String toString(KeyEvent evt)
+ {
+ String id;
+ switch(evt.getID())
+ {
+ case KeyEvent.KEY_PRESSED:
+ id = "KEY_PRESSED";
+ break;
+ case KeyEvent.KEY_RELEASED:
+ id = "KEY_RELEASED";
+ break;
+ case KeyEvent.KEY_TYPED:
+ id = "KEY_TYPED";
+ break;
+ default:
+ id = "unknown type";
+ break;
+ }
+
+ StringBuilder b = new StringBuilder(50);
+
+ b.append(id);
+ b.append(",keyCode=0x").append(Integer.toString(evt.getKeyCode(), 16));
+ b.append(",keyChar=0x").append(Integer.toString(evt.getKeyChar(), 16));
+ b.append(",modifiers=0x").append(Integer.toString(evt.getModifiers(), 16));
+
+ b.append(",consumed=");
+ b.append(evt.isConsumed()?'1':'0');
+
+ return b.toString();
+ } //}}}
+
+ //{{{ processKeyEventKeyStrokeHandling() method
+ /**
+ *
+ * @param evt the keyboard event
+ * @param from the source, it can be {@link org.gjt.sp.jedit.View#VIEW},
+ * {@link org.gjt.sp.jedit.View#ACTION_BAR} or {@link org.gjt.sp.jedit.View#TEXT_AREA}
+ * @param mode the mode is "press" or "type" and is used for debug only
+ * @param global tell if the event comes from the DefaultKeyboardFocusManager or not
+ */
+ protected void processKeyEventKeyStrokeHandling(KeyEvent evt, int from, String mode, boolean global)
+ {
+ KeyEventTranslator.Key keyStroke = KeyEventTranslator.translateKeyEvent(evt);
+
+ if(keyStroke != null)
+ {
+ keyStroke.setIsFromGlobalContext(global);
+ if(Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,this,"Translated (key "+mode+"): "+keyStroke+" from "+from);
+ }
+ boolean consumed = false;
+ if(handleKey(keyStroke, false))
+ {
+ evt.consume();
+
+ consumed = true;
+ }
+ if(Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,this,"Translated (key "+mode+"): "+keyStroke+" from "+from+": consumed="+consumed+'.');
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ // Stores prefix name in bindings hashtable
+ public static Object PREFIX_STR = "PREFIX_STR";
+ protected boolean shortcutOn = false;
+
+
+ protected Hashtable bindings;
+ protected Hashtable currentBindings;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/input/DefaultInputHandlerProvider.java b/jEdit/org/gjt/sp/jedit/input/DefaultInputHandlerProvider.java
index d4b0e8c..6322f9f 100644
--- a/jEdit/org/gjt/sp/jedit/input/DefaultInputHandlerProvider.java
+++ b/jEdit/org/gjt/sp/jedit/input/DefaultInputHandlerProvider.java
@@ -1,43 +1,43 @@
-/*
- * DefaultInputHandlerProvider.java - This class provide the input handler
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.input;
-
-/**
- * This class provide the input handler used by the textarea.
- *
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-public class DefaultInputHandlerProvider implements InputHandlerProvider
-{
-
- private AbstractInputHandler inputHandler;
- public DefaultInputHandlerProvider(AbstractInputHandler inputHandler)
- {
- this.inputHandler = inputHandler;
- }
-
- public AbstractInputHandler getInputHandler()
- {
- return inputHandler;
- }
-}
+/*
+ * DefaultInputHandlerProvider.java - This class provide the input handler
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.input;
+
+/**
+ * This class provide the input handler used by the textarea.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+public class DefaultInputHandlerProvider implements InputHandlerProvider
+{
+
+ private AbstractInputHandler inputHandler;
+ public DefaultInputHandlerProvider(AbstractInputHandler inputHandler)
+ {
+ this.inputHandler = inputHandler;
+ }
+
+ public AbstractInputHandler getInputHandler()
+ {
+ return inputHandler;
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/input/InputHandlerProvider.java b/jEdit/org/gjt/sp/jedit/input/InputHandlerProvider.java
index 707301e..f50cdcf 100644
--- a/jEdit/org/gjt/sp/jedit/input/InputHandlerProvider.java
+++ b/jEdit/org/gjt/sp/jedit/input/InputHandlerProvider.java
@@ -1,31 +1,31 @@
-/*
- * InputHandlerProvider.java - The input handler provider
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.input;
-
-/**
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-public interface InputHandlerProvider
-{
- AbstractInputHandler getInputHandler();
-}
+/*
+ * InputHandlerProvider.java - The input handler provider
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.input;
+
+/**
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+public interface InputHandlerProvider
+{
+ AbstractInputHandler getInputHandler();
+}
diff --git a/jEdit/org/gjt/sp/jedit/input/TextAreaInputHandler.java b/jEdit/org/gjt/sp/jedit/input/TextAreaInputHandler.java
index 65fda74..6ada78c 100644
--- a/jEdit/org/gjt/sp/jedit/input/TextAreaInputHandler.java
+++ b/jEdit/org/gjt/sp/jedit/input/TextAreaInputHandler.java
@@ -1,382 +1,382 @@
-/*
- * TextAreaInputHandler.java - Manages key bindings and executes actions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.input;
-
-//{{{ Imports
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.jedit.gui.KeyEventTranslator;
-import org.gjt.sp.jedit.gui.KeyEventWorkaround;
-import org.gjt.sp.jedit.textarea.TextArea;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-
-import java.awt.*;
-import java.awt.event.KeyEvent;
-import java.util.Hashtable;
-import org.gjt.sp.jedit.JEditBeanShellAction;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.gui.ShortcutPrefixActiveEvent;
-//}}}
-
-/**
- * This class manage the key bindings and execute the actions binded on the
- * keyboard events for the standalone textarea.
- *
- * @author Matthieu Casanova
- * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
- */
-public abstract class TextAreaInputHandler extends AbstractInputHandler<JEditBeanShellAction>
-{
- private final TextArea textArea;
-
- //{{{ TextAreaInputHandler constructor
- protected TextAreaInputHandler(TextArea textArea)
- {
- this.textArea = textArea;
- bindings = currentBindings = new Hashtable();
- } //}}}
-
- //{{{ processKeyEvent() method
- /**
- * Forwards key events directly to the input handler.
- * This is slightly faster than using a KeyListener
- * because some Swing overhead is avoided.
- * @param evt the keyboard event
- * @param from the source of the event. Since this is the input handler of the textarea, it should always be 1
- * @param global it is only true if the event comes from the DefaultKeyboardFocusManager
- * @since 4.3pre7
- */
- @Override
- public void processKeyEvent(KeyEvent evt, int from, boolean global)
- {
- if(Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,this,"Key event : "
- + toString(evt) + " from " + from);
- // Log.log(Log.DEBUG,this,view+".isFocused()="+view.isFocused()+'.',new Exception());
- }
-
- evt = _preprocessKeyEvent(evt);
- if(evt == null)
- return;
-
- if(Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,this,"Key event after workaround: "
- + toString(evt) + " from " + from);
- }
-
- boolean focusOnTextArea = false;
- switch(evt.getID())
- {
- case KeyEvent.KEY_TYPED:
- // if the user pressed eg C+e n n in the
- // search bar we want focus to go back there
- // after the prefix is done
-
-
- if(keyEventInterceptor != null)
- keyEventInterceptor.keyTyped(evt);
- else if(isPrefixActive() || textArea.hasFocus())
- {
- processKeyEventKeyStrokeHandling(evt,from,"type ",global);
- }
-
-
- processKeyEventSub(focusOnTextArea);
-
- break;
- case KeyEvent.KEY_PRESSED:
- if(keyEventInterceptor != null)
- keyEventInterceptor.keyPressed(evt);
- else if(KeyEventWorkaround.isBindable(evt.getKeyCode()))
- {
- processKeyEventKeyStrokeHandling(evt,from,"press",global);
-
- processKeyEventSub(focusOnTextArea);
-
- }
- break;
- case KeyEvent.KEY_RELEASED:
- if(keyEventInterceptor != null)
- keyEventInterceptor.keyReleased(evt);
- break;
- }
- } //}}}
-
- //{{{ _preprocessKeyEvent() method
- /**
- * This method returns if the keyboard event can be handled or not.
- *
- * @param evt the keyboard event
- * @return null if the keyboard event cannot be handled, or the keyboard event itself
- * otherwise
- */
- private KeyEvent _preprocessKeyEvent(KeyEvent evt)
- {
- if(evt.isConsumed())
- return null;
-
- if(Debug.DUMP_KEY_EVENTS)
- {
- Log.log(Log.DEBUG,this,"Key event (preprocessing) : "
- + toString(evt));
- }
-
- return KeyEventWorkaround.processKeyEvent(evt);
- } //}}}
-
- //{{{ processKeyEventSub() method
- private void processKeyEventSub(boolean focusOnTextArea)
- {
- // this is a weird hack.
- // we don't want C+e a to insert 'a' in the
- // search bar if the search bar has focus...
- if (isPrefixActive() && focusOnTextArea)
- {
- textArea.requestFocus();
- }
- } //}}}
-
- //{{{ getAction() method
- protected abstract JEditBeanShellAction getAction(String action);
- //}}}
-
- //{{{ invokeAction() method
- /**
- * Invokes the specified action, repeating and recording it as
- * necessary.
- * @param action The action
- * @since jEdit 4.2pre1
- */
- @Override
- public void invokeAction(String action)
- {
- invokeAction(getAction(action));
- } //}}}
-
- //{{{ invokeAction() method
- /**
- * Invokes the specified action, repeating and recording it as
- * necessary.
- * @param action The action
- */
- @Override
- public void invokeAction(JEditBeanShellAction action)
- {
- JEditBuffer buffer = textArea.getBuffer();
-
- /* if(buffer.insideCompoundEdit())
- buffer.endCompoundEdit(); */
-
- // remember the last executed action
- if(!action.noRememberLast())
- {
- if(lastAction == action)
- lastActionCount++;
- else
- {
- lastAction = action;
- lastActionCount = 1;
- }
- }
-
- // remember old values, in case action changes them
- int _repeatCount = repeatCount;
-
- // execute the action
- if(action.noRepeat() || _repeatCount == 1)
- action.invoke(textArea);
- else
- {
- try
- {
- buffer.beginCompoundEdit();
-
- for(int i = 0; i < _repeatCount; i++)
- action.invoke(textArea);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- }
-
- // If repeat was true originally, clear it
- // Otherwise it might have been set by the action, etc
- if(_repeatCount != 1)
- {
- // first of all, if this action set a
- // readNextChar, do not clear the repeat
- if(readNextChar != null)
- return;
-
- repeatCount = 1;
- }
- } //}}}
-
- //{{{ handleKey() method
- /**
- * Handles the given keystroke.
- * @param keyStroke The key stroke
- * @param dryRun only calculate the return value, do not have any other effect
- * @since jEdit 4.2pre5
- */
- @Override
- public boolean handleKey(KeyEventTranslator.Key keyStroke,boolean dryRun)
- {
- char input = '\0';
- if(keyStroke.modifiers == null
- || keyStroke.modifiers.equals("S"))
- {
- switch(keyStroke.key)
- {
- case '\n':
- case '\t':
- input = (char)keyStroke.key;
- break;
- default:
- input = keyStroke.input;
- break;
- }
- }
-
- if(readNextChar != null)
- {
- if(input != '\0')
- {
- if (!dryRun)
- {
- setCurrentBindings(bindings);
- invokeReadNextChar(input);
- repeatCount = 1;
- }
- return true;
- }
- else
- {
- if (!dryRun)
- {
- readNextChar = null;
- }
- }
- }
-
- Object o = currentBindings.get(keyStroke);
- if(o == null)
- {
- if (!dryRun)
- {
- // Don't beep if the user presses some
- // key we don't know about unless a
- // prefix is active. Otherwise it will
- // beep when caps lock is pressed, etc.
- if(currentBindings != bindings)
- {
- Toolkit.getDefaultToolkit().beep();
- // F10 should be passed on, but C+e F10
- // shouldn't
- repeatCount = 1;
- setCurrentBindings(bindings);
- }
- else if(input != '\0')
- {
- if (!keyStroke.isFromGlobalContext())
- { // let user input be only local
- userInput(input);
- }
- }
- else
- {
- // this is retarded. excuse me while I drool
- // and make stupid noises
- if(KeyEventWorkaround.isNumericKeypad(keyStroke.key))
- KeyEventWorkaround.numericKeypadKey();
- }
- sendShortcutPrefixOff();
- }
- }
- else if(o instanceof Hashtable)
- {
- if (!dryRun)
- {
- setCurrentBindings((Hashtable)o);
- ShortcutPrefixActiveEvent.firePrefixStateChange(currentBindings, true);
- shortcutOn = true;
- }
- return true;
- }
- else if(o instanceof String)
- {
- if (!dryRun)
- {
- setCurrentBindings(bindings);
- sendShortcutPrefixOff();
- invokeAction((String)o);
- }
- return true;
- }
- else if(o instanceof JEditBeanShellAction)
- {
- if (!dryRun)
- {
- setCurrentBindings(bindings);
- sendShortcutPrefixOff();
- invokeAction((JEditBeanShellAction)o);
- }
- return true;
- }
- if (!dryRun)
- {
- sendShortcutPrefixOff();
- }
- return false;
- } //}}}
-
- //{{{ userInput() method
- protected void userInput(char ch)
- {
- lastActionCount = 0;
-
-
- if(repeatCount == 1)
- textArea.userInput(ch);
-
- repeatCount = 1;
- } //}}}
-
- //{{{ invokeReadNextChar() method
- protected void invokeReadNextChar(char ch)
- {
- String charStr = StandardUtilities.charsToEscapes(String.valueOf(ch));
-
- // this might be a bit slow if __char__ occurs a lot
- int index;
- while((index = readNextChar.indexOf("__char__")) != -1)
- {
- readNextChar = readNextChar.substring(0,index)
- + '\'' + charStr + '\''
- + readNextChar.substring(index + 8);
- }
- readNextChar = null;
- } //}}}
-}
+/*
+ * TextAreaInputHandler.java - Manages key bindings and executes actions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.input;
+
+//{{{ Imports
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.jedit.gui.KeyEventTranslator;
+import org.gjt.sp.jedit.gui.KeyEventWorkaround;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+
+import java.awt.*;
+import java.awt.event.KeyEvent;
+import java.util.Hashtable;
+import org.gjt.sp.jedit.JEditBeanShellAction;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.gui.ShortcutPrefixActiveEvent;
+//}}}
+
+/**
+ * This class manage the key bindings and execute the actions binded on the
+ * keyboard events for the standalone textarea.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: FoldHandler.java 5568 2006-07-10 20:52:23Z kpouer $
+ */
+public abstract class TextAreaInputHandler extends AbstractInputHandler<JEditBeanShellAction>
+{
+ private final TextArea textArea;
+
+ //{{{ TextAreaInputHandler constructor
+ protected TextAreaInputHandler(TextArea textArea)
+ {
+ this.textArea = textArea;
+ bindings = currentBindings = new Hashtable();
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ /**
+ * Forwards key events directly to the input handler.
+ * This is slightly faster than using a KeyListener
+ * because some Swing overhead is avoided.
+ * @param evt the keyboard event
+ * @param from the source of the event. Since this is the input handler of the textarea, it should always be 1
+ * @param global it is only true if the event comes from the DefaultKeyboardFocusManager
+ * @since 4.3pre7
+ */
+ @Override
+ public void processKeyEvent(KeyEvent evt, int from, boolean global)
+ {
+ if(Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,this,"Key event : "
+ + toString(evt) + " from " + from);
+ // Log.log(Log.DEBUG,this,view+".isFocused()="+view.isFocused()+'.',new Exception());
+ }
+
+ evt = _preprocessKeyEvent(evt);
+ if(evt == null)
+ return;
+
+ if(Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,this,"Key event after workaround: "
+ + toString(evt) + " from " + from);
+ }
+
+ boolean focusOnTextArea = false;
+ switch(evt.getID())
+ {
+ case KeyEvent.KEY_TYPED:
+ // if the user pressed eg C+e n n in the
+ // search bar we want focus to go back there
+ // after the prefix is done
+
+
+ if(keyEventInterceptor != null)
+ keyEventInterceptor.keyTyped(evt);
+ else if(isPrefixActive() || textArea.hasFocus())
+ {
+ processKeyEventKeyStrokeHandling(evt,from,"type ",global);
+ }
+
+
+ processKeyEventSub(focusOnTextArea);
+
+ break;
+ case KeyEvent.KEY_PRESSED:
+ if(keyEventInterceptor != null)
+ keyEventInterceptor.keyPressed(evt);
+ else if(KeyEventWorkaround.isBindable(evt.getKeyCode()))
+ {
+ processKeyEventKeyStrokeHandling(evt,from,"press",global);
+
+ processKeyEventSub(focusOnTextArea);
+
+ }
+ break;
+ case KeyEvent.KEY_RELEASED:
+ if(keyEventInterceptor != null)
+ keyEventInterceptor.keyReleased(evt);
+ break;
+ }
+ } //}}}
+
+ //{{{ _preprocessKeyEvent() method
+ /**
+ * This method returns if the keyboard event can be handled or not.
+ *
+ * @param evt the keyboard event
+ * @return null if the keyboard event cannot be handled, or the keyboard event itself
+ * otherwise
+ */
+ private KeyEvent _preprocessKeyEvent(KeyEvent evt)
+ {
+ if(evt.isConsumed())
+ return null;
+
+ if(Debug.DUMP_KEY_EVENTS)
+ {
+ Log.log(Log.DEBUG,this,"Key event (preprocessing) : "
+ + toString(evt));
+ }
+
+ return KeyEventWorkaround.processKeyEvent(evt);
+ } //}}}
+
+ //{{{ processKeyEventSub() method
+ private void processKeyEventSub(boolean focusOnTextArea)
+ {
+ // this is a weird hack.
+ // we don't want C+e a to insert 'a' in the
+ // search bar if the search bar has focus...
+ if (isPrefixActive() && focusOnTextArea)
+ {
+ textArea.requestFocus();
+ }
+ } //}}}
+
+ //{{{ getAction() method
+ protected abstract JEditBeanShellAction getAction(String action);
+ //}}}
+
+ //{{{ invokeAction() method
+ /**
+ * Invokes the specified action, repeating and recording it as
+ * necessary.
+ * @param action The action
+ * @since jEdit 4.2pre1
+ */
+ @Override
+ public void invokeAction(String action)
+ {
+ invokeAction(getAction(action));
+ } //}}}
+
+ //{{{ invokeAction() method
+ /**
+ * Invokes the specified action, repeating and recording it as
+ * necessary.
+ * @param action The action
+ */
+ @Override
+ public void invokeAction(JEditBeanShellAction action)
+ {
+ JEditBuffer buffer = textArea.getBuffer();
+
+ /* if(buffer.insideCompoundEdit())
+ buffer.endCompoundEdit(); */
+
+ // remember the last executed action
+ if(!action.noRememberLast())
+ {
+ if(lastAction == action)
+ lastActionCount++;
+ else
+ {
+ lastAction = action;
+ lastActionCount = 1;
+ }
+ }
+
+ // remember old values, in case action changes them
+ int _repeatCount = repeatCount;
+
+ // execute the action
+ if(action.noRepeat() || _repeatCount == 1)
+ action.invoke(textArea);
+ else
+ {
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ for(int i = 0; i < _repeatCount; i++)
+ action.invoke(textArea);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ }
+
+ // If repeat was true originally, clear it
+ // Otherwise it might have been set by the action, etc
+ if(_repeatCount != 1)
+ {
+ // first of all, if this action set a
+ // readNextChar, do not clear the repeat
+ if(readNextChar != null)
+ return;
+
+ repeatCount = 1;
+ }
+ } //}}}
+
+ //{{{ handleKey() method
+ /**
+ * Handles the given keystroke.
+ * @param keyStroke The key stroke
+ * @param dryRun only calculate the return value, do not have any other effect
+ * @since jEdit 4.2pre5
+ */
+ @Override
+ public boolean handleKey(KeyEventTranslator.Key keyStroke,boolean dryRun)
+ {
+ char input = '\0';
+ if(keyStroke.modifiers == null
+ || keyStroke.modifiers.equals("S"))
+ {
+ switch(keyStroke.key)
+ {
+ case '\n':
+ case '\t':
+ input = (char)keyStroke.key;
+ break;
+ default:
+ input = keyStroke.input;
+ break;
+ }
+ }
+
+ if(readNextChar != null)
+ {
+ if(input != '\0')
+ {
+ if (!dryRun)
+ {
+ setCurrentBindings(bindings);
+ invokeReadNextChar(input);
+ repeatCount = 1;
+ }
+ return true;
+ }
+ else
+ {
+ if (!dryRun)
+ {
+ readNextChar = null;
+ }
+ }
+ }
+
+ Object o = currentBindings.get(keyStroke);
+ if(o == null)
+ {
+ if (!dryRun)
+ {
+ // Don't beep if the user presses some
+ // key we don't know about unless a
+ // prefix is active. Otherwise it will
+ // beep when caps lock is pressed, etc.
+ if(currentBindings != bindings)
+ {
+ Toolkit.getDefaultToolkit().beep();
+ // F10 should be passed on, but C+e F10
+ // shouldn't
+ repeatCount = 1;
+ setCurrentBindings(bindings);
+ }
+ else if(input != '\0')
+ {
+ if (!keyStroke.isFromGlobalContext())
+ { // let user input be only local
+ userInput(input);
+ }
+ }
+ else
+ {
+ // this is retarded. excuse me while I drool
+ // and make stupid noises
+ if(KeyEventWorkaround.isNumericKeypad(keyStroke.key))
+ KeyEventWorkaround.numericKeypadKey();
+ }
+ sendShortcutPrefixOff();
+ }
+ }
+ else if(o instanceof Hashtable)
+ {
+ if (!dryRun)
+ {
+ setCurrentBindings((Hashtable)o);
+ ShortcutPrefixActiveEvent.firePrefixStateChange(currentBindings, true);
+ shortcutOn = true;
+ }
+ return true;
+ }
+ else if(o instanceof String)
+ {
+ if (!dryRun)
+ {
+ setCurrentBindings(bindings);
+ sendShortcutPrefixOff();
+ invokeAction((String)o);
+ }
+ return true;
+ }
+ else if(o instanceof JEditBeanShellAction)
+ {
+ if (!dryRun)
+ {
+ setCurrentBindings(bindings);
+ sendShortcutPrefixOff();
+ invokeAction((JEditBeanShellAction)o);
+ }
+ return true;
+ }
+ if (!dryRun)
+ {
+ sendShortcutPrefixOff();
+ }
+ return false;
+ } //}}}
+
+ //{{{ userInput() method
+ protected void userInput(char ch)
+ {
+ lastActionCount = 0;
+
+
+ if(repeatCount == 1)
+ textArea.userInput(ch);
+
+ repeatCount = 1;
+ } //}}}
+
+ //{{{ invokeReadNextChar() method
+ protected void invokeReadNextChar(char ch)
+ {
+ String charStr = StandardUtilities.charsToEscapes(String.valueOf(ch));
+
+ // this might be a bit slow if __char__ occurs a lot
+ int index;
+ while((index = readNextChar.indexOf("__char__")) != -1)
+ {
+ readNextChar = readNextChar.substring(0,index)
+ + '\'' + charStr + '\''
+ + readNextChar.substring(index + 8);
+ }
+ readNextChar = null;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/AutoDetection.java b/jEdit/org/gjt/sp/jedit/io/AutoDetection.java
index 2c9b15b..14c3f0b 100644
--- a/jEdit/org/gjt/sp/jedit/io/AutoDetection.java
+++ b/jEdit/org/gjt/sp/jedit/io/AutoDetection.java
@@ -1,227 +1,227 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.io.InputStream;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.zip.GZIPInputStream;
-
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.ServiceManager;
-import org.gjt.sp.jedit.bufferio.BufferIORequest;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Some functions for auto detection of I/O stream properties.
- */
-public class AutoDetection
-{
- //{{{ getMarkedStream() method
- /**
- * Returns a marked, rewindable stream.
- * Calling reset() method rewinds the stream to its beginning.
- * But reset() can fail if too long bytes were read.
- */
- public static BufferedInputStream getMarkedStream(InputStream in)
- {
- int bufferSize = BufferIORequest.getByteIOBufferSize();
- BufferedInputStream markable
- = new BufferedInputStream(in, bufferSize);
- assert(markable.markSupported());
- markable.mark(bufferSize);
- return markable;
- } //}}}
-
- //{{{ isGzipped() method
- /**
- * Returns wheather the stream is gzipped.
- * This method reads a few bytes from the sample. So a caller
- * must take care of mark() to reuse the contents. Wraping the
- * stream by getMarkedStream() is suitable.
- */
- public static boolean isGzipped(InputStream sample)
- throws IOException
- {
- int magic1 = GZIPInputStream.GZIP_MAGIC & 0xff;
- int magic2 = (GZIPInputStream.GZIP_MAGIC >> 8) & 0xff;
- return sample.read() == magic1
- && sample.read() == magic2;
- } //}}}
-
- //{{{ getEncodingDetectors() method
- /**
- * Returns the user configured ordered list of encoding detectors.
- * This method reads property "encodingDetectors".
- */
- public static List<EncodingDetector> getEncodingDetectors()
- {
- List<EncodingDetector> detectors
- = new ArrayList<EncodingDetector>();
- String propName = "encodingDetectors";
- String selectedDetectors
- = jEdit.getProperty(propName, "BOM XML-PI");
- if (selectedDetectors != null
- && selectedDetectors.length() > 0)
- {
- for (String name: selectedDetectors.split("\\s+"))
- {
- EncodingDetector service
- = getEncodingDetectorService(name);
- if (service != null)
- {
- detectors.add(service);
- }
- else
- {
- Log.log(Log.ERROR, AutoDetection.class
- , "getEncodingDetectors():"
- + " No EncodingDetector for the name"
- + " \"" + name + "\"");
- }
- }
- }
- return detectors;
- } //}}}
-
- //{{{ getDetectedEncoding() method
- /**
- * Returns an auto detected encoding from content of markedStream.
- * This method assumes that markedStream is wrapped by
- * getMarkedStream() method.
- */
- public static String getDetectedEncoding(BufferedInputStream markedStream)
- throws IOException
- {
- List<EncodingDetector> detectors = getEncodingDetectors();
- for (EncodingDetector detector: detectors)
- {
- // FIXME: Here the method reset() can fail if the
- // previous detector read more than buffer size of
- // markedStream.
- markedStream.reset();
- // Wrap once more so that calling mark()
- // or reset() in detectEncoding() don't
- // alter the mark position of markedStream.
- String detected = detector.detectEncoding(
- new BufferedInputStream(markedStream));
- if (detected != null)
- {
- return detected;
- }
- }
- return null;
- } //}}}
-
- //{{{ class Result
- /**
- * An utility class to hold the result of some auto detections.
- */
- public static class Result
- {
- //{{{ Constructor
- /**
- * Do some auto detection for a stream and hold the
- * result in this instance.
- * @param in the stream
- */
- public Result(InputStream in) throws IOException
- {
- BufferedInputStream marked = getMarkedStream(in);
-
- gzipped = isGzipped(marked);
- if (gzipped)
- {
- marked.reset();
- marked = getMarkedStream(
- new GZIPInputStream(marked));
- }
-
- marked.reset();
- encoding = AutoDetection.getDetectedEncoding(marked);
-
- markedStream = marked;
- } //}}}
-
- //{{{ getRewindedStream()
- /**
- * Returns the stream which can be read the contents of
- * the original stream.
- * Some bytes ware read from original stream for auto
- * detections. But they are rewinded at this method.
- */
- public BufferedInputStream getRewindedStream()
- throws IOException
- {
- markedStream.reset();
- return markedStream;
- } //}}}
-
- //{{{ streamIsGzipped()
- /**
- * Returns true if the stream is gzipped.
- */
- public boolean streamIsGzipped()
- {
- return gzipped;
- } //}}}
-
- //{{{ getDetectedEncoding()
- /**
- * Returns the auto detected encoding.
- * Returns null if no encoding was detected.
- */
- public String getDetectedEncoding()
- {
- return encoding;
- } //}}}
-
- //{{{ Private members
- private final BufferedInputStream markedStream;
- private final boolean gzipped;
- private final String encoding;
- //}}}
- } //}}}
-
- //{{{ Private members
- /**
- * Returns a service of EncodingDetector for name.
- */
- private static EncodingDetector getEncodingDetectorService(String name)
- {
- String serviceClass = "org.gjt.sp.jedit.io.EncodingDetector";
- Object service = ServiceManager.getService(serviceClass, name);
- if (service != null && service instanceof EncodingDetector)
- {
- return (EncodingDetector)service;
- }
- else
- {
- return null;
- }
- }
- //}}}
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import java.io.InputStream;
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.zip.GZIPInputStream;
+
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.ServiceManager;
+import org.gjt.sp.jedit.bufferio.BufferIORequest;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Some functions for auto detection of I/O stream properties.
+ */
+public class AutoDetection
+{
+ //{{{ getMarkedStream() method
+ /**
+ * Returns a marked, rewindable stream.
+ * Calling reset() method rewinds the stream to its beginning.
+ * But reset() can fail if too long bytes were read.
+ */
+ public static BufferedInputStream getMarkedStream(InputStream in)
+ {
+ int bufferSize = BufferIORequest.getByteIOBufferSize();
+ BufferedInputStream markable
+ = new BufferedInputStream(in, bufferSize);
+ assert(markable.markSupported());
+ markable.mark(bufferSize);
+ return markable;
+ } //}}}
+
+ //{{{ isGzipped() method
+ /**
+ * Returns wheather the stream is gzipped.
+ * This method reads a few bytes from the sample. So a caller
+ * must take care of mark() to reuse the contents. Wraping the
+ * stream by getMarkedStream() is suitable.
+ */
+ public static boolean isGzipped(InputStream sample)
+ throws IOException
+ {
+ int magic1 = GZIPInputStream.GZIP_MAGIC & 0xff;
+ int magic2 = (GZIPInputStream.GZIP_MAGIC >> 8) & 0xff;
+ return sample.read() == magic1
+ && sample.read() == magic2;
+ } //}}}
+
+ //{{{ getEncodingDetectors() method
+ /**
+ * Returns the user configured ordered list of encoding detectors.
+ * This method reads property "encodingDetectors".
+ */
+ public static List<EncodingDetector> getEncodingDetectors()
+ {
+ List<EncodingDetector> detectors
+ = new ArrayList<EncodingDetector>();
+ String propName = "encodingDetectors";
+ String selectedDetectors
+ = jEdit.getProperty(propName);
+ if (selectedDetectors != null
+ && selectedDetectors.length() > 0)
+ {
+ for (String name: selectedDetectors.split("\\s+"))
+ {
+ EncodingDetector service
+ = getEncodingDetectorService(name);
+ if (service != null)
+ {
+ detectors.add(service);
+ }
+ else
+ {
+ Log.log(Log.ERROR, AutoDetection.class
+ , "getEncodingDetectors():"
+ + " No EncodingDetector for the name"
+ + " \"" + name + "\"");
+ }
+ }
+ }
+ return detectors;
+ } //}}}
+
+ //{{{ getDetectedEncoding() method
+ /**
+ * Returns an auto detected encoding from content of markedStream.
+ * This method assumes that markedStream is wrapped by
+ * getMarkedStream() method.
+ */
+ public static String getDetectedEncoding(BufferedInputStream markedStream)
+ throws IOException
+ {
+ List<EncodingDetector> detectors = getEncodingDetectors();
+ for (EncodingDetector detector: detectors)
+ {
+ // FIXME: Here the method reset() can fail if the
+ // previous detector read more than buffer size of
+ // markedStream.
+ markedStream.reset();
+ // Wrap once more so that calling mark()
+ // or reset() in detectEncoding() don't
+ // alter the mark position of markedStream.
+ String detected = detector.detectEncoding(
+ new BufferedInputStream(markedStream));
+ if (detected != null)
+ {
+ return detected;
+ }
+ }
+ return null;
+ } //}}}
+
+ //{{{ class Result
+ /**
+ * An utility class to hold the result of some auto detections.
+ */
+ public static class Result
+ {
+ //{{{ Constructor
+ /**
+ * Do some auto detection for a stream and hold the
+ * result in this instance.
+ * @param in the stream
+ */
+ public Result(InputStream in) throws IOException
+ {
+ BufferedInputStream marked = getMarkedStream(in);
+
+ gzipped = isGzipped(marked);
+ if (gzipped)
+ {
+ marked.reset();
+ marked = getMarkedStream(
+ new GZIPInputStream(marked));
+ }
+
+ marked.reset();
+ encoding = AutoDetection.getDetectedEncoding(marked);
+
+ markedStream = marked;
+ } //}}}
+
+ //{{{ getRewindedStream()
+ /**
+ * Returns the stream which can be read the contents of
+ * the original stream.
+ * Some bytes ware read from original stream for auto
+ * detections. But they are rewinded at this method.
+ */
+ public BufferedInputStream getRewindedStream()
+ throws IOException
+ {
+ markedStream.reset();
+ return markedStream;
+ } //}}}
+
+ //{{{ streamIsGzipped()
+ /**
+ * Returns true if the stream is gzipped.
+ */
+ public boolean streamIsGzipped()
+ {
+ return gzipped;
+ } //}}}
+
+ //{{{ getDetectedEncoding()
+ /**
+ * Returns the auto detected encoding.
+ * Returns null if no encoding was detected.
+ */
+ public String getDetectedEncoding()
+ {
+ return encoding;
+ } //}}}
+
+ //{{{ Private members
+ private final BufferedInputStream markedStream;
+ private final boolean gzipped;
+ private final String encoding;
+ //}}}
+ } //}}}
+
+ //{{{ Private members
+ /**
+ * Returns a service of EncodingDetector for name.
+ */
+ private static EncodingDetector getEncodingDetectorService(String name)
+ {
+ String serviceClass = "org.gjt.sp.jedit.io.EncodingDetector";
+ Object service = ServiceManager.getService(serviceClass, name);
+ if (service != null && service instanceof EncodingDetector)
+ {
+ return (EncodingDetector)service;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/CharsetEncoding.java b/jEdit/org/gjt/sp/jedit/io/CharsetEncoding.java
index a71c698..edcac86 100644
--- a/jEdit/org/gjt/sp/jedit/io/CharsetEncoding.java
+++ b/jEdit/org/gjt/sp/jedit/io/CharsetEncoding.java
@@ -1,81 +1,81 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
-import java.nio.charset.CodingErrorAction;
-//}}}
-
-/**
- * Encodings which are provided by java.nio.charset.Charset.
- *
- * @since 4.3pre10
- * @author Kazutoshi Satoda
- */
-public class CharsetEncoding implements Encoding
-{
- //{{{ Constructor
- public CharsetEncoding(String name)
- {
- body = Charset.forName(name);
- } //}}}
-
- //{{{ implements Encoding
- public Reader getTextReader(InputStream in) throws IOException
- {
- // Pass the decoder explicitly to report a decode error
- // as an exception instead of replacing with "\uFFFD".
- // The form "InputStreamReader(in, encoding)" seemed to use
- // CodingErrorAction.REPLACE internally.
- return new InputStreamReader(in, body.newDecoder());
- }
-
- public Writer getTextWriter(OutputStream out) throws IOException
- {
- // Pass the encoder explicitly because of same reason
- // in getTextReader();
- return new OutputStreamWriter(out, body.newEncoder());
- }
-
- public Reader getPermissiveTextReader(InputStream in) throws IOException
- {
- // Use REPLACE action to indicate where the coding error
- // happened by the replacement character "\uFFFD".
- CharsetDecoder permissive = body.newDecoder();
- permissive.onMalformedInput(CodingErrorAction.REPLACE);
- permissive.onUnmappableCharacter(CodingErrorAction.REPLACE);
- return new InputStreamReader(in, permissive);
- }
- //}}}
-
- //{{{ Private members
- private final Charset body;
- //}}}
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CodingErrorAction;
+//}}}
+
+/**
+ * Encodings which are provided by java.nio.charset.Charset.
+ *
+ * @since 4.3pre10
+ * @author Kazutoshi Satoda
+ */
+public class CharsetEncoding implements Encoding
+{
+ //{{{ Constructor
+ public CharsetEncoding(String name)
+ {
+ body = Charset.forName(name);
+ } //}}}
+
+ //{{{ implements Encoding
+ public Reader getTextReader(InputStream in) throws IOException
+ {
+ // Pass the decoder explicitly to report a decode error
+ // as an exception instead of replacing with "\uFFFD".
+ // The form "InputStreamReader(in, encoding)" seemed to use
+ // CodingErrorAction.REPLACE internally.
+ return new InputStreamReader(in, body.newDecoder());
+ }
+
+ public Writer getTextWriter(OutputStream out) throws IOException
+ {
+ // Pass the encoder explicitly because of same reason
+ // in getTextReader();
+ return new OutputStreamWriter(out, body.newEncoder());
+ }
+
+ public Reader getPermissiveTextReader(InputStream in) throws IOException
+ {
+ // Use REPLACE action to indicate where the coding error
+ // happened by the replacement character "\uFFFD".
+ CharsetDecoder permissive = body.newDecoder();
+ permissive.onMalformedInput(CodingErrorAction.REPLACE);
+ permissive.onUnmappableCharacter(CodingErrorAction.REPLACE);
+ return new InputStreamReader(in, permissive);
+ }
+ //}}}
+
+ //{{{ Private members
+ private final Charset body;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/CopyFileWorker.java b/jEdit/org/gjt/sp/jedit/io/CopyFileWorker.java
index 80ea88a..ba434ff 100644
--- a/jEdit/org/gjt/sp/jedit/io/CopyFileWorker.java
+++ b/jEdit/org/gjt/sp/jedit/io/CopyFileWorker.java
@@ -1,73 +1,88 @@
-/*
- * CopyFileWorker.java - a worker that will copy a file
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.awt.Component;
-import java.io.IOException;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.WorkRequest;
-//}}}
-
-/**
- * This worker will copy a file. Be careful it override files if the target
- * already exists
- * @author Matthieu Casanova
- * @since jEdit 4.3pre13
- */
-public class CopyFileWorker extends WorkRequest
-{
- private final Component comp;
- private final String source;
-
- private final String target;
-
-
- //{{{ CopyFileWorker constructor
- /**
- * @param comp the component that will be used as parent in case of error
- * @param source the source VFS
- * @param target the target VFS
- */
- public CopyFileWorker(Component comp, String source, String target)
- {
- if (source == null || target == null)
- throw new NullPointerException("The source and target cannot be null");
- this.comp = comp;
- this.source = source;
- this.target = target;
- } //}}}
-
- //{{{ run() method
- public void run()
- {
- try
- {
- VFS.copy(this, source, target, comp, false);
- }
- catch (IOException e)
- {
- Log.log(Log.ERROR,this, e, e);
- }
- } //}}}
-}
+/*
+ * CopyFileWorker.java - a worker that will copy a file
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+
+import java.awt.Component;
+import java.io.IOException;
+
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.Task;
+//}}}
+
+/**
+ * This worker will copy a file. Be careful it override files if the target
+ * already exists
+ *
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre13
+ */
+public class CopyFileWorker extends Task
+{
+ private final Component comp;
+ private final String source;
+
+ private final String target;
+
+ //{{{ CopyFileWorker constructor
+ /**
+ * @param comp the component that will be used as parent in case of error
+ * @param source the source VFS
+ * @param target the target VFS
+ */
+ public CopyFileWorker(Component comp, String source, String target)
+ {
+ if (source == null || target == null)
+ throw new NullPointerException("The source and target cannot be null");
+ if (source.equals(target))
+ {
+ throw new IllegalArgumentException("The source and target must not be the same");
+ }
+ this.comp = comp;
+ this.source = source;
+ this.target = target;
+ setLabel("Copy " + source + " to " + target);
+ } //}}}
+
+ //{{{ run() method
+ @Override
+ public void _run()
+ {
+ Log.log(Log.DEBUG, this, this + ".run()");
+ try
+ {
+ VFS.copy(this, source, target, comp, true);
+ }
+ catch (IOException e)
+ {
+ Log.log(Log.ERROR, this, e, e);
+ }
+ } //}}}
+
+ @Override
+ public String toString()
+ {
+ return "CopyFileWorker[" + source + ',' + target + ']';
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/Encoding.java b/jEdit/org/gjt/sp/jedit/io/Encoding.java
index 5671357..871af5a 100644
--- a/jEdit/org/gjt/sp/jedit/io/Encoding.java
+++ b/jEdit/org/gjt/sp/jedit/io/Encoding.java
@@ -1,64 +1,64 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import java.io.IOException;
-
-/**
- * An interface to represent an encoding.
- * An encoding is a mapping between a character stream and a byte
- * stream. It is like java.nio.charset.Charset but has slightly
- * different form. This can represents some extended encodings like
- * UTF-8Y which drops (inserts) the BOM bytes before actual decoding
- * (encoding). This also enables to add some extended encodings such
- * as ASCII representation used by Java property files.
- *
- * @since 4.3pre10
- * @author Kazutoshi Satoda
- */
-public interface Encoding
-{
- /**
- * Map an InputStream to a Reader.
- * Decode-error while reading from this Reader should be reported
- * by throwing an IOException.
- */
- public Reader getTextReader(InputStream in) throws IOException;
-
- /**
- * Map an OutputStream to a Writer.
- * Encode-error while writing to this Writer should be reported
- * by throwing an IOException.
- */
- public Writer getTextWriter(OutputStream out) throws IOException;
-
- /**
- * Map an InputStream to a Reader.
- * Decode-error while reading from this Reader should be ignored
- * or replaced.
- */
- public Reader getPermissiveTextReader(InputStream in)
- throws IOException;
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.io.IOException;
+
+/**
+ * An interface to represent an encoding.
+ * An encoding is a mapping between a character stream and a byte
+ * stream. It is like java.nio.charset.Charset but has slightly
+ * different form. This can represents some extended encodings like
+ * UTF-8Y which drops (inserts) the BOM bytes before actual decoding
+ * (encoding). This also enables to add some extended encodings such
+ * as ASCII representation used by Java property files.
+ *
+ * @since 4.3pre10
+ * @author Kazutoshi Satoda
+ */
+public interface Encoding
+{
+ /**
+ * Map an InputStream to a Reader.
+ * Decode-error while reading from this Reader should be reported
+ * by throwing an IOException.
+ */
+ Reader getTextReader(InputStream in) throws IOException;
+
+ /**
+ * Map an OutputStream to a Writer.
+ * Encode-error while writing to this Writer should be reported
+ * by throwing an IOException.
+ */
+ Writer getTextWriter(OutputStream out) throws IOException;
+
+ /**
+ * Map an InputStream to a Reader.
+ * Decode-error while reading from this Reader should be ignored
+ * or replaced.
+ */
+ Reader getPermissiveTextReader(InputStream in)
+ throws IOException;
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/EncodingDetector.java b/jEdit/org/gjt/sp/jedit/io/EncodingDetector.java
index d47db17..3b730f2 100644
--- a/jEdit/org/gjt/sp/jedit/io/EncodingDetector.java
+++ b/jEdit/org/gjt/sp/jedit/io/EncodingDetector.java
@@ -1,45 +1,45 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * An interface to detect a reasonable encoding from some bytes at the
- * beginning of a file. To offer your own EncodingDetector, implement this
- * interface and define a service in your <tt>services.xml</tt> file.
- * For example:<pre>
-<SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="XML-PI">
- new XMLEncodingDetector();
-</SERVICE> </pre>
- *
- * @since 4.3pre10
- * @author Kazutoshi Satoda
- */
-public interface EncodingDetector
-{
- /**
- * Returns the name of a detected encoding for the bytes in sample.
- * Returns null if this instance could not detect reasonable one.
- */
- public String detectEncoding(InputStream sample) throws IOException;
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * An interface to detect a reasonable encoding from some bytes at the
+ * beginning of a file. To offer your own EncodingDetector, implement this
+ * interface and define a service in your <tt>services.xml</tt> file.
+ * For example:<pre>
+<SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="XML-PI">
+ new XMLEncodingDetector();
+</SERVICE> </pre>
+ *
+ * @since 4.3pre10
+ * @author Kazutoshi Satoda
+ */
+public interface EncodingDetector
+{
+ /**
+ * Returns the name of a detected encoding for the bytes in sample.
+ * Returns null if this instance could not detect reasonable one.
+ */
+ public String detectEncoding(InputStream sample) throws IOException;
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/EncodingServer.java b/jEdit/org/gjt/sp/jedit/io/EncodingServer.java
index 86d1ae0..a57dabf 100644
--- a/jEdit/org/gjt/sp/jedit/io/EncodingServer.java
+++ b/jEdit/org/gjt/sp/jedit/io/EncodingServer.java
@@ -1,164 +1,164 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import java.io.IOException;
-import java.nio.charset.Charset;
-import java.nio.charset.IllegalCharsetNameException;
-import java.nio.charset.UnsupportedCharsetException;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Arrays;
-
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.ServiceManager;
-//}}}
-
-/**
- * A class for some static methods to deal with encodings.
- *
- * @since 4.3pre10
- * @author Kazutoshi Satoda
- */
-public class EncodingServer
-{
- //{{{ getEncoding() method
- /**
- * Returns an instance of Encoding for specified name.
- * The name is used for search the following domains in the
- * listed order.
- * - java.nio.charset.Charset
- * - jEdit ServiceManager
- */
- public static Encoding getEncoding(String name)
- {
- try
- {
- return new CharsetEncoding(name);
- }
- catch (IllegalCharsetNameException e)
- {
- // just failed
- }
- catch (UnsupportedCharsetException e)
- {
- // just failed
- }
-
- Object namedService = ServiceManager.getService(serviceClass, name);
- if (namedService != null && namedService instanceof Encoding)
- {
- return (Encoding)namedService;
- }
-
- // UnsupportedCharsetException is for java.nio.charset,
- // but throw this here too so that this can be caught as
- // an encoding error by catch clause for general I/O code.
- throw new UnsupportedCharsetException("No such encoding: \"" + name + "\"");
- } //}}}
-
- //{{{ getAvailableNames() method
- /**
- * Returns the set of all available encoding names.
- */
- public static Set<String> getAvailableNames()
- {
- Set<String> set = new HashSet<String>();
- set.addAll(Charset.availableCharsets().keySet());
- set.addAll(Arrays.asList(ServiceManager.getServiceNames(serviceClass)));
- return set;
- } //}}}
-
- //{{{ getSelectedNames() method
- /**
- * Returns the set of user selected encoding names.
- */
- public static Set<String> getSelectedNames()
- {
- Set<String> set = getAvailableNames();
- Iterator<String> i = set.iterator();
- while (i.hasNext())
- {
- String name = i.next();
- if (jEdit.getBooleanProperty("encoding.opt-out." + name, false))
- {
- i.remove();
- }
- }
- return set;
- } //}}}
-
- //{{{ getTextReader() method
- /**
- * Returns a Reader object that reads the InputStream with
- * the encoding. This method is same with
- * "getEncoding(encoding).getTextReader(in)".
- */
- public static Reader getTextReader(InputStream in, String encoding)
- throws IOException
- {
- return getEncoding(encoding).getTextReader(in);
- } //}}}
-
- //{{{ getTextWriter() method
- /**
- * Returns a Writer object that writes to the OutputStream with
- * the encoding. This method is same with
- * "getEncoding(encoding).getTextWriter(out)".
- */
- public static Writer getTextWriter(OutputStream out, String encoding)
- throws IOException
- {
- return getEncoding(encoding).getTextWriter(out);
- } //}}}
-
- //{{{ hasEncoding() method
- /**
- * Returns if the specified name is supported as a name for an Encoding.
- */
- public static boolean hasEncoding(String name)
- {
- try
- {
- if (Charset.isSupported(name))
- {
- return true;
- }
- }
- catch (IllegalCharsetNameException e)
- {
- // The name is illegal for java.nio.charset.Charset.
- // But it may be legal for service name.
- }
-
- return Arrays.asList(ServiceManager.getServiceNames(serviceClass)).contains(name);
- } //}}}
-
- //{{{ Private members
- private static final String serviceClass = "org.gjt.sp.jedit.io.Encoding";
- //}}}
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.IllegalCharsetNameException;
+import java.nio.charset.UnsupportedCharsetException;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Arrays;
+
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.ServiceManager;
+//}}}
+
+/**
+ * A class for some static methods to deal with encodings.
+ *
+ * @since 4.3pre10
+ * @author Kazutoshi Satoda
+ */
+public class EncodingServer
+{
+ //{{{ getEncoding() method
+ /**
+ * Returns an instance of Encoding for specified name.
+ * The name is used for search the following domains in the
+ * listed order.
+ * - java.nio.charset.Charset
+ * - jEdit ServiceManager
+ */
+ public static Encoding getEncoding(String name)
+ {
+ try
+ {
+ return new CharsetEncoding(name);
+ }
+ catch (IllegalCharsetNameException e)
+ {
+ // just failed
+ }
+ catch (UnsupportedCharsetException e)
+ {
+ // just failed
+ }
+
+ Object namedService = ServiceManager.getService(serviceClass, name);
+ if (namedService != null && namedService instanceof Encoding)
+ {
+ return (Encoding)namedService;
+ }
+
+ // UnsupportedCharsetException is for java.nio.charset,
+ // but throw this here too so that this can be caught as
+ // an encoding error by catch clause for general I/O code.
+ throw new UnsupportedCharsetException("No such encoding: \"" + name + "\"");
+ } //}}}
+
+ //{{{ getAvailableNames() method
+ /**
+ * Returns the set of all available encoding names.
+ */
+ public static Set<String> getAvailableNames()
+ {
+ Set<String> set = new HashSet<String>();
+ set.addAll(Charset.availableCharsets().keySet());
+ set.addAll(Arrays.asList(ServiceManager.getServiceNames(serviceClass)));
+ return set;
+ } //}}}
+
+ //{{{ getSelectedNames() method
+ /**
+ * Returns the set of user selected encoding names.
+ */
+ public static Set<String> getSelectedNames()
+ {
+ Set<String> set = getAvailableNames();
+ Iterator<String> i = set.iterator();
+ while (i.hasNext())
+ {
+ String name = i.next();
+ if (jEdit.getBooleanProperty("encoding.opt-out." + name, false))
+ {
+ i.remove();
+ }
+ }
+ return set;
+ } //}}}
+
+ //{{{ getTextReader() method
+ /**
+ * Returns a Reader object that reads the InputStream with
+ * the encoding. This method is same with
+ * "getEncoding(encoding).getTextReader(in)".
+ */
+ public static Reader getTextReader(InputStream in, String encoding)
+ throws IOException
+ {
+ return getEncoding(encoding).getTextReader(in);
+ } //}}}
+
+ //{{{ getTextWriter() method
+ /**
+ * Returns a Writer object that writes to the OutputStream with
+ * the encoding. This method is same with
+ * "getEncoding(encoding).getTextWriter(out)".
+ */
+ public static Writer getTextWriter(OutputStream out, String encoding)
+ throws IOException
+ {
+ return getEncoding(encoding).getTextWriter(out);
+ } //}}}
+
+ //{{{ hasEncoding() method
+ /**
+ * Returns if the specified name is supported as a name for an Encoding.
+ */
+ public static boolean hasEncoding(String name)
+ {
+ try
+ {
+ if (Charset.isSupported(name))
+ {
+ return true;
+ }
+ }
+ catch (IllegalCharsetNameException e)
+ {
+ // The name is illegal for java.nio.charset.Charset.
+ // But it may be legal for service name.
+ }
+
+ return Arrays.asList(ServiceManager.getServiceNames(serviceClass)).contains(name);
+ } //}}}
+
+ //{{{ Private members
+ private static final String serviceClass = "org.gjt.sp.jedit.io.Encoding";
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/EncodingWithBOM.java b/jEdit/org/gjt/sp/jedit/io/EncodingWithBOM.java
index c94301b..f128aca 100644
--- a/jEdit/org/gjt/sp/jedit/io/EncodingWithBOM.java
+++ b/jEdit/org/gjt/sp/jedit/io/EncodingWithBOM.java
@@ -1,182 +1,182 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.io.InputStream;
-import java.io.SequenceInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import java.io.IOException;
-import java.nio.charset.UnsupportedCharsetException;
-import java.nio.charset.MalformedInputException;
-import java.util.Arrays;
-import java.util.Map;
-import java.util.HashMap;
-//}}}
-
-/**
- * Encodings which have BOM at the beginning of byte stream.
- *
- * @since 4.3pre10
- * @author Kazutoshi Satoda
- */
-public class EncodingWithBOM implements Encoding
-{
- //{{{ Constructor
- public EncodingWithBOM(String plain)
- {
- byte[] bom = bomMap.get(plain);
- if (bom == null)
- {
- throw new UnsupportedCharsetException(plain + " with BOM");
- }
- this.plain = new CharsetEncoding(plain);
- this.bom = bom;
- } //}}}
-
- //{{{ implements Encoding
- public Reader getTextReader(InputStream in) throws IOException
- {
- byte[] actualMark = new byte[bom.length];
- int count = in.read(actualMark);
- if (count < bom.length || !Arrays.equals(actualMark, bom))
- {
- throw new MalformedInputException(0);
- }
- return plain.getTextReader(in);
- }
-
- public Writer getTextWriter(OutputStream out) throws IOException
- {
- out.write(bom);
- return plain.getTextWriter(out);
- }
-
- public Reader getPermissiveTextReader(InputStream in) throws IOException
- {
- byte[] actualMark = new byte[bom.length];
- int count = in.read(actualMark);
- if (count < bom.length || !Arrays.equals(actualMark, bom))
- {
- // Concatenate the non-BOM bytes and the rest of
- // input so that the non-BOM bytes are reinterepreted
- // as some characters.
- in = new SequenceInputStream(
- new ByteArrayInputStream(actualMark, 0, count),
- in);
- }
- return plain.getPermissiveTextReader(in);
- }
- //}}}
-
- //{{{ class Detector
- public static class Detector implements EncodingDetector
- {
- public String detectEncoding(InputStream sample) throws IOException
- {
- byte[] mark = new byte[4];
- int count = sample.read(mark);
-
- byte low = (byte)(BOM16 & 0xff);
- byte high = (byte)((BOM16 >> 8) & 0xff);
- if (count >= 4)
- {
- if (mark[0] == low && mark[1] == high
- && mark[2] == 0x00 && mark[3] == 0x00)
- {
- return "X-UTF-32LE-BOM";
- }
- else if (mark[0] == 0x00 && mark[1] == 0x00
- && mark[2] == high && mark[3] == low)
- {
- return "X-UTF-32BE-BOM";
- }
- }
- if (count >= 2)
- {
- if (mark[0] == low && mark[1] == high)
- {
- return "x-UTF-16LE-BOM";
- }
- else if (mark[0] == high && mark[1] == low)
- {
- // "x-UTF-16BE-BOM" does not available.
- // But an encoder for "UTF-16" actually uses
- // big endian with corresponding BOM. It just
- // works as "UTF-16BE with BOM".
- return "UTF-16";
- }
- }
-
- if (count >= UTF8BOM.length)
- {
- int i = 0;
- while (i < UTF8BOM.length)
- {
- if (mark[i] != UTF8BOM[i])
- {
- break;
- }
- ++i;
- }
- if (i == UTF8BOM.length)
- {
- return "UTF-8Y";
- }
- }
-
- return null;
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Statics
- private static final int BOM16 = 0xfeff;
- private static final byte[] UTF8BOM
- = { (byte)0xef, (byte)0xbb, (byte)0xbf };
-
- private static final Map<String, byte[]> bomMap
- = new HashMap<String, byte[]>();
-
- static
- {
- bomMap.put("UTF-8", UTF8BOM);
-
- byte low = (byte)(BOM16 & 0xff);
- byte high = (byte)((BOM16 >> 8) & 0xff);
- bomMap.put("UTF-16LE", new byte[] { low, high });
- bomMap.put("UTF-16BE", new byte[] { high, low });
- bomMap.put("UTF-32LE", new byte[] { low, high, 0x00, 0x00 });
- bomMap.put("UTF-32BE", new byte[] { 0x00, 0x00, high, low });
- }
- //}}}
-
- //{{{ Instance variables
- private final CharsetEncoding plain;
- private final byte[] bom;
- //}}}
-
- //}}}
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import java.io.InputStream;
+import java.io.SequenceInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.io.IOException;
+import java.nio.charset.UnsupportedCharsetException;
+import java.nio.charset.MalformedInputException;
+import java.util.Arrays;
+import java.util.Map;
+import java.util.HashMap;
+//}}}
+
+/**
+ * Encodings which have BOM at the beginning of byte stream.
+ *
+ * @since 4.3pre10
+ * @author Kazutoshi Satoda
+ */
+public class EncodingWithBOM implements Encoding
+{
+ //{{{ Constructor
+ public EncodingWithBOM(String plain)
+ {
+ byte[] bom = bomMap.get(plain);
+ if (bom == null)
+ {
+ throw new UnsupportedCharsetException(plain + " with BOM");
+ }
+ this.plain = new CharsetEncoding(plain);
+ this.bom = bom;
+ } //}}}
+
+ //{{{ implements Encoding
+ public Reader getTextReader(InputStream in) throws IOException
+ {
+ byte[] actualMark = new byte[bom.length];
+ int count = in.read(actualMark);
+ if (count < bom.length || !Arrays.equals(actualMark, bom))
+ {
+ throw new MalformedInputException(0);
+ }
+ return plain.getTextReader(in);
+ }
+
+ public Writer getTextWriter(OutputStream out) throws IOException
+ {
+ out.write(bom);
+ return plain.getTextWriter(out);
+ }
+
+ public Reader getPermissiveTextReader(InputStream in) throws IOException
+ {
+ byte[] actualMark = new byte[bom.length];
+ int count = in.read(actualMark);
+ if (count < bom.length || !Arrays.equals(actualMark, bom))
+ {
+ // Concatenate the non-BOM bytes and the rest of
+ // input so that the non-BOM bytes are reinterepreted
+ // as some characters.
+ in = new SequenceInputStream(
+ new ByteArrayInputStream(actualMark, 0, count),
+ in);
+ }
+ return plain.getPermissiveTextReader(in);
+ }
+ //}}}
+
+ //{{{ class Detector
+ public static class Detector implements EncodingDetector
+ {
+ public String detectEncoding(InputStream sample) throws IOException
+ {
+ byte[] mark = new byte[4];
+ int count = sample.read(mark);
+
+ byte low = (byte)(BOM16 & 0xff);
+ byte high = (byte)((BOM16 >> 8) & 0xff);
+ if (count >= 4)
+ {
+ if (mark[0] == low && mark[1] == high
+ && mark[2] == 0x00 && mark[3] == 0x00)
+ {
+ return "X-UTF-32LE-BOM";
+ }
+ else if (mark[0] == 0x00 && mark[1] == 0x00
+ && mark[2] == high && mark[3] == low)
+ {
+ return "X-UTF-32BE-BOM";
+ }
+ }
+ if (count >= 2)
+ {
+ if (mark[0] == low && mark[1] == high)
+ {
+ return "x-UTF-16LE-BOM";
+ }
+ else if (mark[0] == high && mark[1] == low)
+ {
+ // "x-UTF-16BE-BOM" does not available.
+ // But an encoder for "UTF-16" actually uses
+ // big endian with corresponding BOM. It just
+ // works as "UTF-16BE with BOM".
+ return "UTF-16";
+ }
+ }
+
+ if (count >= UTF8BOM.length)
+ {
+ int i = 0;
+ while (i < UTF8BOM.length)
+ {
+ if (mark[i] != UTF8BOM[i])
+ {
+ break;
+ }
+ ++i;
+ }
+ if (i == UTF8BOM.length)
+ {
+ return "UTF-8Y";
+ }
+ }
+
+ return null;
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Statics
+ private static final int BOM16 = 0xfeff;
+ private static final byte[] UTF8BOM
+ = { (byte)0xef, (byte)0xbb, (byte)0xbf };
+
+ private static final Map<String, byte[]> bomMap
+ = new HashMap<String, byte[]>();
+
+ static
+ {
+ bomMap.put("UTF-8", UTF8BOM);
+
+ byte low = (byte)(BOM16 & 0xff);
+ byte high = (byte)((BOM16 >> 8) & 0xff);
+ bomMap.put("UTF-16LE", new byte[] { low, high });
+ bomMap.put("UTF-16BE", new byte[] { high, low });
+ bomMap.put("UTF-32LE", new byte[] { low, high, 0x00, 0x00 });
+ bomMap.put("UTF-32BE", new byte[] { 0x00, 0x00, high, low });
+ }
+ //}}}
+
+ //{{{ Instance variables
+ private final CharsetEncoding plain;
+ private final byte[] bom;
+ //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/FavoritesVFS.java b/jEdit/org/gjt/sp/jedit/io/FavoritesVFS.java
index ace7c12..f3acb71 100644
--- a/jEdit/org/gjt/sp/jedit/io/FavoritesVFS.java
+++ b/jEdit/org/gjt/sp/jedit/io/FavoritesVFS.java
@@ -1,208 +1,208 @@
-/*
- * FavoritesVFS.java - Stores frequently-visited directory locations
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.awt.Component;
-import java.util.*;
-import org.gjt.sp.jedit.msg.DynamicMenuChanged;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * A VFS used for remembering frequently-visited directories. Listing it
- * returns the favorites list. The deletePath of each entry is the
- * directory prefixed with "favorites:" so that right-clicking on a
- * favorite and clicking 'delete' in the browser just deletes the
- * favorite, and not the directory itself.
- * @author Slava Pestov
- * @version $Id: FavoritesVFS.java 14466 2009-01-25 12:49:34Z kpouer $
- */
-public class FavoritesVFS extends VFS
-{
- public static final String PROTOCOL = "favorites";
-
- //{{{ FavoritesVFS constructor
- public FavoritesVFS()
- {
- super("favorites",DELETE_CAP | LOW_LATENCY_CAP,
- new String[] { EA_TYPE });
-
- /* addToFavorites(), which is a static method
- * (for convinience) needs an instance of the
- * VFS to pass to VFSManager.sendVFSUpdate(),
- * hence this hack. */
- instance = this;
- } //}}}
-
- //{{{ getParentOfPath() method
- public String getParentOfPath(String path)
- {
- return PROTOCOL + ":";
- } //}}}
-
- //{{{ _listFiles() method
- public VFSFile[] _listFiles(Object session, String url,
- Component comp)
- {
- return getFavorites();
- } //}}}
-
- //{{{ _getFile() method
- public VFSFile _getFile(Object session, String path,
- Component comp)
- {
- // does it matter that this doesn't set the type correctly?
- return new Favorite(path,VFSFile.DIRECTORY);
- } //}}}
-
- //{{{ _delete() method
- public boolean _delete(Object session, String path, Component comp)
- {
- synchronized(lock)
- {
- path = path.substring(PROTOCOL.length() + 1);
-
- Iterator<Favorite> iter = favorites.iterator();
- while(iter.hasNext())
- {
- if(iter.next().getPath().equals(path))
- {
- iter.remove();
- VFSManager.sendVFSUpdate(this,PROTOCOL
- + ':',false);
- EditBus.send(new DynamicMenuChanged(
- "favorites"));
- return true;
- }
- }
- }
-
- return false;
- } //}}}
-
- //{{{ loadFavorites() method
- public static void loadFavorites()
- {
- synchronized(lock)
- {
- favorites = new LinkedList<Favorite>();
-
- String favorite;
- int i = 0;
- while((favorite = jEdit.getProperty("vfs.favorite." + i)) != null)
- {
- favorites.add(new Favorite(favorite,
- jEdit.getIntegerProperty("vfs.favorite."
- + i + ".type",
- VFSFile.DIRECTORY)));
- i++;
- }
- }
- } //}}}
-
- //{{{ addToFavorites() method
- public static void addToFavorites(String path, int type)
- {
- synchronized(lock)
- {
- if(favorites == null)
- loadFavorites();
-
- for (Favorite favorite : favorites)
- {
- if (favorite.getPath().equals(path))
- return;
- }
-
- favorites.add(new Favorite(path,type));
-
- VFSManager.sendVFSUpdate(instance,PROTOCOL + ':',false);
- EditBus.send(new DynamicMenuChanged("favorites"));
- }
- } //}}}
-
- //{{{ saveFavorites() method
- public static void saveFavorites()
- {
- synchronized(lock)
- {
- if(favorites == null)
- return;
-
- int i = 0;
- for (Favorite favorite : favorites)
- {
- jEdit.setProperty("vfs.favorite." + i,
- favorite.getPath());
- jEdit.setIntegerProperty("vfs.favorite." + i
- + ".type", favorite.getType());
-
- i++;
- }
- jEdit.unsetProperty("vfs.favorite." + favorites.size());
- jEdit.unsetProperty("vfs.favorite." + favorites.size()
- + ".type");
- }
- } //}}}
-
- //{{{ getFavorites() method
- public static VFSFile[] getFavorites()
- {
- synchronized(lock)
- {
- if(favorites == null)
- loadFavorites();
-
- return favorites.toArray(
- new VFSFile[favorites.size()]);
- }
- } //}}}
-
- //{{{ Private members
- private static FavoritesVFS instance;
- private static final Object lock = new Object();
- private static List<Favorite> favorites;
- //}}}
-
- //{{{ Favorite class
- static class Favorite extends VFSFile
- {
- Favorite(String path, int type)
- {
- super(path,path,PROTOCOL + ':' + path,type,0,false);
- }
-
- public String getExtendedAttribute(String name)
- {
- if(name.equals(EA_TYPE))
- return super.getExtendedAttribute(name);
- else
- {
- // don't want it to show "0 bytes" for size,
- // etc.
- return null;
- }
- }
- } //}}}
-}
+/*
+ * FavoritesVFS.java - Stores frequently-visited directory locations
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import java.awt.Component;
+import java.util.*;
+import org.gjt.sp.jedit.msg.DynamicMenuChanged;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * A VFS used for remembering frequently-visited directories. Listing it
+ * returns the favorites list. The deletePath of each entry is the
+ * directory prefixed with "favorites:" so that right-clicking on a
+ * favorite and clicking 'delete' in the browser just deletes the
+ * favorite, and not the directory itself.
+ * @author Slava Pestov
+ * @version $Id: FavoritesVFS.java 14466 2009-01-25 12:49:34Z kpouer $
+ */
+public class FavoritesVFS extends VFS
+{
+ public static final String PROTOCOL = "favorites";
+
+ //{{{ FavoritesVFS constructor
+ public FavoritesVFS()
+ {
+ super("favorites",DELETE_CAP | LOW_LATENCY_CAP,
+ new String[] { EA_TYPE });
+
+ /* addToFavorites(), which is a static method
+ * (for convinience) needs an instance of the
+ * VFS to pass to VFSManager.sendVFSUpdate(),
+ * hence this hack. */
+ instance = this;
+ } //}}}
+
+ //{{{ getParentOfPath() method
+ public String getParentOfPath(String path)
+ {
+ return PROTOCOL + ":";
+ } //}}}
+
+ //{{{ _listFiles() method
+ public VFSFile[] _listFiles(Object session, String url,
+ Component comp)
+ {
+ return getFavorites();
+ } //}}}
+
+ //{{{ _getFile() method
+ public VFSFile _getFile(Object session, String path,
+ Component comp)
+ {
+ // does it matter that this doesn't set the type correctly?
+ return new Favorite(path,VFSFile.DIRECTORY);
+ } //}}}
+
+ //{{{ _delete() method
+ public boolean _delete(Object session, String path, Component comp)
+ {
+ synchronized(lock)
+ {
+ path = path.substring(PROTOCOL.length() + 1);
+
+ Iterator<Favorite> iter = favorites.iterator();
+ while(iter.hasNext())
+ {
+ if(iter.next().getPath().equals(path))
+ {
+ iter.remove();
+ VFSManager.sendVFSUpdate(this,PROTOCOL
+ + ':',false);
+ EditBus.send(new DynamicMenuChanged(
+ "favorites"));
+ return true;
+ }
+ }
+ }
+
+ return false;
+ } //}}}
+
+ //{{{ loadFavorites() method
+ public static void loadFavorites()
+ {
+ synchronized(lock)
+ {
+ favorites = new LinkedList<Favorite>();
+
+ String favorite;
+ int i = 0;
+ while((favorite = jEdit.getProperty("vfs.favorite." + i)) != null)
+ {
+ favorites.add(new Favorite(favorite,
+ jEdit.getIntegerProperty("vfs.favorite."
+ + i + ".type",
+ VFSFile.DIRECTORY)));
+ i++;
+ }
+ }
+ } //}}}
+
+ //{{{ addToFavorites() method
+ public static void addToFavorites(String path, int type)
+ {
+ synchronized(lock)
+ {
+ if(favorites == null)
+ loadFavorites();
+
+ for (Favorite favorite : favorites)
+ {
+ if (favorite.getPath().equals(path))
+ return;
+ }
+
+ favorites.add(new Favorite(path,type));
+
+ VFSManager.sendVFSUpdate(instance,PROTOCOL + ':',false);
+ EditBus.send(new DynamicMenuChanged("favorites"));
+ }
+ } //}}}
+
+ //{{{ saveFavorites() method
+ public static void saveFavorites()
+ {
+ synchronized(lock)
+ {
+ if(favorites == null)
+ return;
+
+ int i = 0;
+ for (Favorite favorite : favorites)
+ {
+ jEdit.setProperty("vfs.favorite." + i,
+ favorite.getPath());
+ jEdit.setIntegerProperty("vfs.favorite." + i
+ + ".type", favorite.getType());
+
+ i++;
+ }
+ jEdit.unsetProperty("vfs.favorite." + favorites.size());
+ jEdit.unsetProperty("vfs.favorite." + favorites.size()
+ + ".type");
+ }
+ } //}}}
+
+ //{{{ getFavorites() method
+ public static VFSFile[] getFavorites()
+ {
+ synchronized(lock)
+ {
+ if(favorites == null)
+ loadFavorites();
+
+ return favorites.toArray(
+ new VFSFile[favorites.size()]);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private static FavoritesVFS instance;
+ private static final Object lock = new Object();
+ private static List<Favorite> favorites;
+ //}}}
+
+ //{{{ Favorite class
+ static class Favorite extends VFSFile
+ {
+ Favorite(String path, int type)
+ {
+ super(path,path,PROTOCOL + ':' + path,type,0,false);
+ }
+
+ public String getExtendedAttribute(String name)
+ {
+ if(name.equals(EA_TYPE))
+ return super.getExtendedAttribute(name);
+ else
+ {
+ // don't want it to show "0 bytes" for size,
+ // etc.
+ return null;
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/FileRootsVFS.java b/jEdit/org/gjt/sp/jedit/io/FileRootsVFS.java
index 704b5c0..90282be 100644
--- a/jEdit/org/gjt/sp/jedit/io/FileRootsVFS.java
+++ b/jEdit/org/gjt/sp/jedit/io/FileRootsVFS.java
@@ -1,173 +1,173 @@
-/*
- * FileRootsVFS.java - Local root filesystems VFS
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- * Portions copyright (C) 2002 Kris Kopicki
- * Portions copyright (C) 2002 Carmine Lucarelli
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import javax.swing.filechooser.FileSystemView;
-import java.awt.Component;
-import java.io.File;
-import java.util.LinkedList;
-import org.gjt.sp.jedit.MiscUtilities;
-import org.gjt.sp.jedit.OperatingSystem;
-//}}}
-
-/**
- * A VFS that lists local root filesystems.
- * @author Slava Pestov
- * @version $Id: FileRootsVFS.java 14617 2009-02-09 09:42:52Z kpouer $
- */
-public class FileRootsVFS extends VFS
-{
- public static final String PROTOCOL = "roots";
-
- //{{{ FileRootsVFS constructor
- public FileRootsVFS()
- {
- super("roots",LOW_LATENCY_CAP | BROWSE_CAP, new String[] {
- EA_TYPE });
- } //}}}
-
- //{{{ getParentOfPath() method
- public String getParentOfPath(String path)
- {
- return PROTOCOL + ':';
- } //}}}
-
- //{{{ _listFiles() method
- public VFSFile[] _listFiles(Object session, String url,
- Component comp)
- {
- File[] roots = listRoots();
-
- if(roots == null)
- return null;
-
- VFSFile[] rootDE = new VFSFile[roots.length];
- for(int i = 0; i < roots.length; i++)
- rootDE[i] = new Root(roots[i]);
-
- return rootDE;
- } //}}}
-
- //{{{ _getFile() method
- public VFSFile _getFile(Object session, String path,
- Component comp)
- {
- return new Root(new File(path));
- } //}}}
-
- //{{{ Private members
- private static FileSystemView fsView = FileSystemView.getFileSystemView();
-
- //{{{ listRoots() method
- private static File[] listRoots()
- {
- if (OperatingSystem.isMacOS())
- {
- // Nasty hardcoded values
- File[] volumes = new File("/Volumes").listFiles();
- LinkedList<File> roots = new LinkedList<File>();
-
- roots.add(new File("/"));
-
- for (int i=0; i<volumes.length; i++)
- {
- // Make sure people don't do stupid things like putting files in /Volumes
- if (volumes[i].isDirectory())
- roots.add(volumes[i]);
- }
-
- return roots.toArray(new File[roots.size()]);
- }
- else
- {
- File[] roots = File.listRoots();
- File[] desktop = fsView.getRoots();
-
- if(desktop == null)
- return roots;
-
- File[] rootsPlus = new File[roots.length + desktop.length];
- System.arraycopy(desktop, 0, rootsPlus, 0, desktop.length);
- System.arraycopy(roots, 0, rootsPlus, 1, roots.length);
- return rootsPlus;
- }
- } //}}}
-
- //}}}
-
- //{{{ Root class
- static class Root extends VFSFile
- {
- Root(File file)
- {
- // REMIND: calling isDirectory() on a floppy drive
- // displays stupid I/O error dialog box on Windows
-
- String path = file.getPath();
- setPath(path);
- setDeletePath(path);
- setSymlinkPath(path);
-
- if(fsView.isFloppyDrive(file))
- {
- setType(VFSFile.FILESYSTEM);
- setName(path);
- }
- else if(fsView.isDrive(file))
- {
- setType(VFSFile.FILESYSTEM);
- setName(path + ' '
- + fsView.getSystemDisplayName(file));
- }
- else if(file.isDirectory())
- {
- if(fsView.isFileSystemRoot(file))
- setType(VFSFile.DIRECTORY);
- else
- setType(VFSFile.FILESYSTEM);
-
- if(OperatingSystem.isMacOS())
- setName(MiscUtilities.getFileName(path));
- else
- setName(path);
- }
- else
- setType(VFSFile.FILE);
- }
-
- public String getExtendedAttribute(String name)
- {
- if(name.equals(EA_TYPE))
- return super.getExtendedAttribute(name);
- else
- {
- // don't want it to show "0 bytes" for size,
- // etc.
- return null;
- }
- }
- } //}}}
-}
+/*
+ * FileRootsVFS.java - Local root filesystems VFS
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ * Portions copyright (C) 2002 Kris Kopicki
+ * Portions copyright (C) 2002 Carmine Lucarelli
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import javax.swing.filechooser.FileSystemView;
+import java.awt.Component;
+import java.io.File;
+import java.util.LinkedList;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.OperatingSystem;
+//}}}
+
+/**
+ * A VFS that lists local root filesystems.
+ * @author Slava Pestov
+ * @version $Id: FileRootsVFS.java 14617 2009-02-09 09:42:52Z kpouer $
+ */
+public class FileRootsVFS extends VFS
+{
+ public static final String PROTOCOL = "roots";
+
+ //{{{ FileRootsVFS constructor
+ public FileRootsVFS()
+ {
+ super("roots",LOW_LATENCY_CAP | BROWSE_CAP, new String[] {
+ EA_TYPE });
+ } //}}}
+
+ //{{{ getParentOfPath() method
+ public String getParentOfPath(String path)
+ {
+ return PROTOCOL + ':';
+ } //}}}
+
+ //{{{ _listFiles() method
+ public VFSFile[] _listFiles(Object session, String url,
+ Component comp)
+ {
+ File[] roots = listRoots();
+
+ if(roots == null)
+ return null;
+
+ VFSFile[] rootDE = new VFSFile[roots.length];
+ for(int i = 0; i < roots.length; i++)
+ rootDE[i] = new Root(roots[i]);
+
+ return rootDE;
+ } //}}}
+
+ //{{{ _getFile() method
+ public VFSFile _getFile(Object session, String path,
+ Component comp)
+ {
+ return new Root(new File(path));
+ } //}}}
+
+ //{{{ Private members
+ private static FileSystemView fsView = FileSystemView.getFileSystemView();
+
+ //{{{ listRoots() method
+ private static File[] listRoots()
+ {
+ if (OperatingSystem.isMacOS())
+ {
+ // Nasty hardcoded values
+ File[] volumes = new File("/Volumes").listFiles();
+ LinkedList<File> roots = new LinkedList<File>();
+
+ roots.add(new File("/"));
+
+ for (int i=0; i<volumes.length; i++)
+ {
+ // Make sure people don't do stupid things like putting files in /Volumes
+ if (volumes[i].isDirectory())
+ roots.add(volumes[i]);
+ }
+
+ return roots.toArray(new File[roots.size()]);
+ }
+ else
+ {
+ File[] roots = File.listRoots();
+ File[] desktop = fsView.getRoots();
+
+ if(desktop == null)
+ return roots;
+
+ File[] rootsPlus = new File[roots.length + desktop.length];
+ System.arraycopy(desktop, 0, rootsPlus, 0, desktop.length);
+ System.arraycopy(roots, 0, rootsPlus, 1, roots.length);
+ return rootsPlus;
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Root class
+ static class Root extends VFSFile
+ {
+ Root(File file)
+ {
+ // REMIND: calling isDirectory() on a floppy drive
+ // displays stupid I/O error dialog box on Windows
+
+ String path = file.getPath();
+ setPath(path);
+ setDeletePath(path);
+ setSymlinkPath(path);
+
+ if(fsView.isFloppyDrive(file))
+ {
+ setType(VFSFile.FILESYSTEM);
+ setName(path);
+ }
+ else if(fsView.isDrive(file))
+ {
+ setType(VFSFile.FILESYSTEM);
+ setName(path + ' '
+ + fsView.getSystemDisplayName(file));
+ }
+ else if(file.isDirectory())
+ {
+ if(fsView.isFileSystemRoot(file))
+ setType(VFSFile.DIRECTORY);
+ else
+ setType(VFSFile.FILESYSTEM);
+
+ if(OperatingSystem.isMacOS())
+ setName(MiscUtilities.getFileName(path));
+ else
+ setName(path);
+ }
+ else
+ setType(VFSFile.FILE);
+ }
+
+ public String getExtendedAttribute(String name)
+ {
+ if(name.equals(EA_TYPE))
+ return super.getExtendedAttribute(name);
+ else
+ {
+ // don't want it to show "0 bytes" for size,
+ // etc.
+ return null;
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/FileVFS.java b/jEdit/org/gjt/sp/jedit/io/FileVFS.java
index 82fd3c7..fa82be4 100644
--- a/jEdit/org/gjt/sp/jedit/io/FileVFS.java
+++ b/jEdit/org/gjt/sp/jedit/io/FileVFS.java
@@ -1,686 +1,689 @@
-/*
- * FileVFS.java - Local filesystem VFS
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2005 Slava Pestov
- * Portions copyright (C) 1998, 1999, 2000 Peter Graves
- * Portions copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import javax.swing.filechooser.FileSystemView;
-import javax.swing.*;
-import java.awt.Component;
-import java.io.*;
-import java.text.*;
-import java.util.Date;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Local filesystem VFS.
- * @author Slava Pestov
- * @version $Id: FileVFS.java 15384 2009-06-03 13:49:06Z kpouer $
- */
-public class FileVFS extends VFS
-{
- public static final String PERMISSIONS_PROPERTY = "FileVFS__perms";
-
- //{{{ FileVFS constructor
- public FileVFS()
- {
- super("file",READ_CAP | WRITE_CAP | BROWSE_CAP | DELETE_CAP
- | RENAME_CAP | MKDIR_CAP | LOW_LATENCY_CAP
- | (OperatingSystem.isCaseInsensitiveFS()
- ? CASE_INSENSITIVE_CAP : 0),
- new String[] { EA_TYPE, EA_SIZE, EA_STATUS,
- EA_MODIFIED });
- } //}}}
-
- //{{{ getParentOfPath() method
- @Override
- public String getParentOfPath(String path)
- {
- if(OperatingSystem.isDOSDerived())
- {
- if(path.length() == 2 && path.charAt(1) == ':')
- return FileRootsVFS.PROTOCOL + ':';
- else if(path.length() == 3 && path.endsWith(":\\"))
- return FileRootsVFS.PROTOCOL + ':';
- else if(path.startsWith("\\\\") && path.indexOf('\\',2) == -1)
- return path;
- }
-
- return super.getParentOfPath(path);
- } //}}}
-
- //{{{ constructPath() method
- @Override
- public String constructPath(String parent, String path)
- {
- if(parent.endsWith(File.separator)
- || parent.endsWith("/"))
- return parent + path;
- else
- return parent + File.separator + path;
- } //}}}
-
- //{{{ getFileSeparator() method
- @Override
- public char getFileSeparator()
- {
- return File.separatorChar;
- } //}}}
-
- //{{{ getTwoStageSaveName() method
- /**
- * Returns a temporary file name based on the given path.
- *
- * <p>If the directory where the file would be created cannot be
- * written (i.e., no new files can be created in that directory),
- * this method returns <code>null</code>.</p>
- *
- * @param path The path name
- */
- @Override
- public String getTwoStageSaveName(String path)
- {
- File parent = new File(getParentOfPath(path));
- // the ignorance of the canWrite() method for windows
- // is, because the read-only flag on windows has
- // not the effect of preventing the creation of new files.
- // The only way to make a directory read-only in this means
- // the ACL of the directory has to be set to read-only,
- // which is not checkable by java.
- // The " || OperatingSystem.isWindows()" can be removed
- // if the canWrite() method gives back the right value.
- return (parent.canWrite() || OperatingSystem.isWindows())
- ? super.getTwoStageSaveName(path)
- : null;
- } //}}}
-
- //{{{ save() method
- @Override
- public boolean save(View view, Buffer buffer, String path)
- {
- if(OperatingSystem.isUnix())
- {
- int permissions = getPermissions(buffer.getPath());
- Log.log(Log.DEBUG,this,buffer.getPath() + " has permissions 0"
- + Integer.toString(permissions,8));
- buffer.setIntegerProperty(PERMISSIONS_PROPERTY,permissions);
- }
-
- return super.save(view,buffer,path);
- } //}}}
-
- //{{{ insert() method
- @Override
- public boolean insert(View view, Buffer buffer, String path)
- {
- File file = new File(path);
-
- //{{{ Check if file is valid
- if(!file.exists())
- return false;
-
- if(file.isDirectory())
- {
- VFSManager.error(view,file.getPath(),
- "ioerror.open-directory",null);
- return false;
- }
-
- if(!file.canRead())
- {
- VFSManager.error(view,file.getPath(),
- "ioerror.no-read",null);
- return false;
- } //}}}
-
- return super.insert(view,buffer,path);
- } //}}}
-
- //{{{ recursiveDelete() method
- /**
- * #
- * @param path the directory path to recursive delete
- * @return true if successful, else false
- */
- public static boolean recursiveDelete(File path)
- {
- if (path.exists())
- {
- File[] files = path.listFiles();
- for (int i = 0; i < files.length; i++)
- {
- if (files[i].isDirectory())
- {
- recursiveDelete(files[i]);
- }
- else
- {
- files[i].delete();
- }
- }
- }
- return path.delete();
- } //}}}
-
- //{{{ _canonPath() method
- /**
- * Returns the canonical form if the specified path name. For example,
- * <code>~</code> might be expanded to the user's home directory.
- * @param session The session
- * @param path The path
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurred
- * @since jEdit 4.0pre2
- */
- @Override
- public String _canonPath(Object session, String path, Component comp)
- throws IOException
- {
- return MiscUtilities.canonPath(path);
- } //}}}
-
- //{{{ LocalFile class
- public static class LocalFile extends VFSFile
- {
- private File file;
-
- // use system default short format
- public static DateFormat DATE_FORMAT
- = DateFormat.getInstance();
-
- /**
- * @deprecated Call getModified() instead.
- */
- @Deprecated
- public long modified;
-
- //{{{ LocalFile() class
- public LocalFile(File file)
- {
- this.file = file;
-
- /* These attributes are fetched relatively
- quickly. The rest are lazily filled in. */
- setName(file.getName());
- String path = file.getPath();
- setPath(path);
- setDeletePath(path);
- setHidden(file.isHidden());
- setType(file.isDirectory()
- ? VFSFile.DIRECTORY
- : VFSFile.FILE);
- } //}}}
-
- //{{{ getExtendedAttribute() method
- @Override
- public String getExtendedAttribute(String name)
- {
- fetchAttrs();
- if (name.equals(EA_MODIFIED))
- {
- return DATE_FORMAT.format(new Date(modified));
- }
- else
- {
- return super.getExtendedAttribute(name);
- }
- } //}}}
-
- //{{{ fetchAttrs() method
- /** Fetch the attributes of the local file. */
- @Override
- protected void fetchAttrs()
- {
- if(fetchedAttrs())
- return;
-
- super.fetchAttrs();
-
- setSymlinkPath(MiscUtilities.resolveSymlinks(
- file.getPath()));
- setReadable(file.canRead());
- setWriteable(file.canWrite());
- setLength(file.length());
- setModified(file.lastModified());
- } //}}}
-
- //{{{ getIcon() method
- /**
- * Returns the file system icon for the file.
- *
- * @param expanded not used here
- * @param openBuffer not used here
- * @return the file system icon
- * @since 4.3pre9
- */
- @Override
- public Icon getIcon(boolean expanded, boolean openBuffer)
- {
- if (icon == null)
- {
- if (fsView == null)
- fsView = FileSystemView.getFileSystemView();
-
- icon = fsView.getSystemIcon(file);
- }
- return icon;
- } //}}}
-
- //{{{ getSymlinkPath() method
- @Override
- public String getSymlinkPath()
- {
- fetchAttrs();
- return super.getSymlinkPath();
- } //}}}
-
- //{{{ getLength() method
- @Override
- public long getLength()
- {
- fetchAttrs();
- return super.getLength();
- } //}}}
-
- //{{{ isReadable() method
- @Override
- public boolean isReadable()
- {
- fetchAttrs();
- return super.isReadable();
- } //}}}
-
- //{{{ isWriteable() method
- @Override
- public boolean isWriteable()
- {
- fetchAttrs();
- return super.isWriteable();
- } //}}}
-
- //{{{ getModified() method
- public long getModified()
- {
- fetchAttrs();
- return modified;
- } //}}}
-
- //{{{ setModified() method
- public void setModified(long modified)
- {
- this.modified = modified;
- } //}}}
-
- private transient FileSystemView fsView;
- private transient Icon icon;
- } //}}}
-
- //{{{ _listFiles() method
- @Override
- public VFSFile[] _listFiles(Object session, String path,
- Component comp)
- {
- //{{{ Windows work around
- /* On Windows, paths of the form X: list the last *working
- * directory* on that drive. To list the root of the drive,
- * you must use X:\.
- *
- * However, the VFS browser and friends strip off trailing
- * path separators, for various reasons. So to work around
- * that, we add a '\' to drive letter paths on Windows.
- */
- if(OperatingSystem.isWindows())
- {
- if(path.length() == 2 && path.charAt(1) == ':')
- path = path.concat(File.separator);
- } //}}}
-
- File directory = new File(path);
- File[] list = null;
- if(directory.exists())
- list = fsView.getFiles(directory,false);
-
- if(list == null)
- {
- VFSManager.error(comp,path,"ioerror.directory-error-nomsg",null);
- return null;
- }
-
- VFSFile[] list2 = new VFSFile[list.length];
- for(int i = 0; i < list.length; i++)
- list2[i] = new LocalFile(list[i]);
-
- return list2;
- } //}}}
-
- //{{{ _getFile() method
- @Override
- public VFSFile _getFile(Object session, String path,
- Component comp)
- {
- if(path.equals("/") && OperatingSystem.isUnix())
- {
- return new VFS.DirectoryEntry(path,path,path,
- VFSFile.DIRECTORY,0L,false);
- }
-
- File file = new File(path);
- if(!file.exists())
- return null;
-
- return new LocalFile(file);
- } //}}}
-
- //{{{ _delete() method
- @Override
- public boolean _delete(Object session, String path, Component comp)
- {
- File file = new File(path);
- // do some platforms throw exceptions if the file does not exist
- // when we ask for the canonical path?
- String canonPath;
- try
- {
- canonPath = file.getCanonicalPath();
- }
- catch(IOException io)
- {
- canonPath = path;
- }
- // if directory, do recursive delete
- boolean retVal;
- if (!file.isDirectory())
- {
- retVal = file.delete();
- }
- else
- {
- retVal = recursiveDelete(file);
- }
- if(retVal)
- VFSManager.sendVFSUpdate(this,canonPath,true);
- return retVal;
- } //}}}
-
- //{{{ _rename() method
- @Override
- public boolean _rename(Object session, String from, String to,
- Component comp)
- {
- File _to = new File(to);
-
- String toCanonPath;
- try
- {
- toCanonPath = _to.getCanonicalPath();
- }
- catch(IOException io)
- {
- toCanonPath = to;
- }
-
- // this is needed because on OS X renaming to a non-existent
- // directory causes problems
- File parent = new File(_to.getParent());
- if(parent.exists())
- {
- if(!parent.isDirectory())
- return false;
- }
- else
- {
- parent.mkdirs();
- if(!parent.exists())
- return false;
- }
-
- File _from = new File(from);
-
- String fromCanonPath;
- try
- {
- fromCanonPath = _from.getCanonicalPath();
- }
- catch(IOException io)
- {
- fromCanonPath = from;
- }
-
- // Case-insensitive fs workaround
- if(!fromCanonPath.equalsIgnoreCase(toCanonPath))
- _to.delete();
-
- boolean retVal = _from.renameTo(_to);
- VFSManager.sendVFSUpdate(this,fromCanonPath,true);
- VFSManager.sendVFSUpdate(this,toCanonPath,true);
- return retVal;
- } //}}}
-
- //{{{ _mkdir() method
- @Override
- public boolean _mkdir(Object session, String directory, Component comp)
- {
- String parent = getParentOfPath(directory);
- if(!new File(parent).exists())
- {
- if(!_mkdir(session,parent,comp))
- return false;
- }
-
- File file = new File(directory);
-
- boolean retVal = file.mkdir();
- String canonPath;
- try
- {
- canonPath = file.getCanonicalPath();
- }
- catch(IOException io)
- {
- canonPath = directory;
- }
- VFSManager.sendVFSUpdate(this,canonPath,true);
- return retVal;
- } //}}}
-
- //{{{ _backup() method
- @Override
- public void _backup(Object session, String path, Component comp)
- throws IOException
- {
- // Fetch properties
- int backups = jEdit.getIntegerProperty("backups",1);
-
- if(backups == 0)
- return;
-
- String backupPrefix = jEdit.getProperty("backup.prefix");
- String backupSuffix = jEdit.getProperty("backup.suffix");
-
- String backupDirectory = jEdit.getProperty("backup.directory");
-
- int backupTimeDistance = jEdit.getIntegerProperty("backup.minTime",0);
- File file = new File(path);
-
- if (!file.exists())
- return;
-
- // Check for backup.directory, and create that
- // directory if it doesn't exist
- if(backupDirectory == null || backupDirectory.length() == 0)
- backupDirectory = file.getParent();
- else
- {
- backupDirectory = MiscUtilities.constructPath(
- System.getProperty("user.home"),backupDirectory);
-
- // Perhaps here we would want to guard with
- // a property for parallel backups or not.
- backupDirectory = MiscUtilities.concatPath(
- backupDirectory,file.getParent());
-
- File dir = new File(backupDirectory);
-
- if (!dir.exists())
- dir.mkdirs();
- }
-
- MiscUtilities.saveBackup(file,backups,backupPrefix,
- backupSuffix,backupDirectory,backupTimeDistance);
- } //}}}
-
- //{{{ _createInputStream() method
- @Override
- public InputStream _createInputStream(Object session, String path,
- boolean ignoreErrors, Component comp) throws IOException
- {
- try
- {
- return new FileInputStream(path);
- }
- catch(IOException io)
- {
- if(ignoreErrors)
- return null;
- else
- throw io;
- }
- } //}}}
-
- //{{{ _createOutputStream() method
- @Override
- public OutputStream _createOutputStream(Object session, String path,
- Component comp) throws IOException
- {
- return new FileOutputStream(path);
- } //}}}
-
- //{{{ _saveComplete() method
- @Override
- public void _saveComplete(Object session, Buffer buffer, String path,
- Component comp)
- {
- int permissions = buffer.getIntegerProperty(PERMISSIONS_PROPERTY,0);
- setPermissions(path,permissions);
- } //}}}
-
- //{{{ Permission preservation code
-
- /** Code borrowed from j text editor (http://www.armedbear.org) */
- /** I made some changes to make it support suid, sgid and sticky files */
-
- //{{{ getPermissions() method
- /**
- * Returns numeric permissions of a file. On non-Unix systems, always
- * returns zero.
- * @since jEdit 3.2pre9
- */
- public static int getPermissions(String path)
- {
- int permissions = 0;
-
- if(jEdit.getBooleanProperty("chmodDisabled"))
- return permissions;
-
- if(OperatingSystem.isUnix())
- {
- String[] cmdarray = { "ls", "-ld", path };
-
- try
- {
- Process process = Runtime.getRuntime().exec(cmdarray);
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
-
- String output = reader.readLine();
-
- if(output != null)
- {
- String s = output.substring(1, 10);
-
- permissions = MiscUtilities
- .parsePermissions(s);
- }
- }
-
- // Feb 4 2000 5:30 PM
- // Catch Throwable here rather than Exception.
- // Kaffe's implementation of Runtime.exec throws java.lang.InternalError.
- catch (Throwable t)
- {
- }
- }
-
- return permissions;
- } //}}}
-
- //{{{ setPermissions() method
- /**
- * Sets numeric permissions of a file. On non-Unix platforms,
- * does nothing.
- * @since jEdit 3.2pre9
- */
- public static void setPermissions(String path, int permissions)
- {
- if(jEdit.getBooleanProperty("chmodDisabled"))
- return;
-
- if(permissions != 0)
- {
- if(OperatingSystem.isUnix())
- {
- String[] cmdarray = { "chmod", Integer.toString(permissions, 8), path };
-
- try
- {
- Process process = Runtime.getRuntime().exec(cmdarray);
- process.getInputStream().close();
- process.getOutputStream().close();
- process.getErrorStream().close();
- // Jun 9 2004 12:40 PM
- // waitFor() hangs on some Java
- // implementations.
- /* int exitCode = process.waitFor();
- if(exitCode != 0)
- Log.log(Log.NOTICE,FileVFS.class,"chmod exited with code " + exitCode); */
- }
-
- // Feb 4 2000 5:30 PM
- // Catch Throwable here rather than Exception.
- // Kaffe's implementation of Runtime.exec throws java.lang.InternalError.
- catch (Throwable t)
- {
- }
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private static final FileSystemView fsView = FileSystemView.getFileSystemView();
- //}}}
-}
+/*
+ * FileVFS.java - Local filesystem VFS
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2005 Slava Pestov
+ * Portions copyright (C) 1998, 1999, 2000 Peter Graves
+ * Portions copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import javax.swing.filechooser.FileSystemView;
+import javax.swing.*;
+import java.awt.Component;
+import java.io.*;
+import java.text.*;
+import java.util.Date;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Local filesystem VFS.
+ * @author Slava Pestov
+ * @version $Id: FileVFS.java 17540 2010-03-27 01:09:11Z kpouer $
+ */
+public class FileVFS extends VFS
+{
+ public static final String PERMISSIONS_PROPERTY = "FileVFS__perms";
+
+ //{{{ FileVFS constructor
+ public FileVFS()
+ {
+ super("file",READ_CAP | WRITE_CAP | BROWSE_CAP | DELETE_CAP
+ | RENAME_CAP | MKDIR_CAP | LOW_LATENCY_CAP
+ | (OperatingSystem.isCaseInsensitiveFS()
+ ? CASE_INSENSITIVE_CAP : 0),
+ new String[] { EA_TYPE, EA_SIZE, EA_STATUS,
+ EA_MODIFIED });
+ } //}}}
+
+ //{{{ getParentOfPath() method
+ @Override
+ public String getParentOfPath(String path)
+ {
+ if(OperatingSystem.isDOSDerived())
+ {
+ if(path.length() == 2 && path.charAt(1) == ':')
+ return FileRootsVFS.PROTOCOL + ':';
+ else if(path.length() == 3 && path.endsWith(":\\"))
+ return FileRootsVFS.PROTOCOL + ':';
+ else if(path.startsWith("\\\\") && path.indexOf('\\',2) == -1)
+ return path;
+ }
+
+ return super.getParentOfPath(path);
+ } //}}}
+
+ //{{{ constructPath() method
+ @Override
+ public String constructPath(String parent, String path)
+ {
+ if(parent.endsWith(File.separator)
+ || parent.endsWith("/"))
+ return parent + path;
+ else
+ return parent + File.separator + path;
+ } //}}}
+
+ //{{{ getFileSeparator() method
+ @Override
+ public char getFileSeparator()
+ {
+ return File.separatorChar;
+ } //}}}
+
+ //{{{ getTwoStageSaveName() method
+ /**
+ * Returns a temporary file name based on the given path.
+ *
+ * <p>If the directory where the file would be created cannot be
+ * written (i.e., no new files can be created in that directory),
+ * this method returns <code>null</code>.</p>
+ *
+ * @param path The path name
+ */
+ @Override
+ public String getTwoStageSaveName(String path)
+ {
+ File parent = new File(getParentOfPath(path));
+ // the ignorance of the canWrite() method for windows
+ // is, because the read-only flag on windows has
+ // not the effect of preventing the creation of new files.
+ // The only way to make a directory read-only in this means
+ // the ACL of the directory has to be set to read-only,
+ // which is not checkable by java.
+ // The " || OperatingSystem.isWindows()" can be removed
+ // if the canWrite() method gives back the right value.
+ return (parent.canWrite() || OperatingSystem.isWindows())
+ ? super.getTwoStageSaveName(path)
+ : null;
+ } //}}}
+
+ //{{{ save() method
+ @Override
+ public boolean save(View view, Buffer buffer, String path)
+ {
+ if(OperatingSystem.isUnix())
+ {
+ int permissions = getPermissions(buffer.getPath());
+ Log.log(Log.DEBUG,this,buffer.getPath() + " has permissions 0"
+ + Integer.toString(permissions,8));
+ buffer.setIntegerProperty(PERMISSIONS_PROPERTY,permissions);
+ }
+
+ return super.save(view,buffer,path);
+ } //}}}
+
+ //{{{ insert() method
+ @Override
+ public boolean insert(View view, Buffer buffer, String path)
+ {
+ File file = new File(path);
+
+ //{{{ Check if file is valid
+ if(!file.exists())
+ return false;
+
+ if(file.isDirectory())
+ {
+ VFSManager.error(view,file.getPath(),
+ "ioerror.open-directory",null);
+ return false;
+ }
+
+ if(!file.canRead())
+ {
+ VFSManager.error(view,file.getPath(),
+ "ioerror.no-read",null);
+ return false;
+ } //}}}
+
+ return super.insert(view,buffer,path);
+ } //}}}
+
+ //{{{ recursiveDelete() method
+ /**
+ * #
+ * @param path the directory path to recursive delete
+ * @return true if successful, else false
+ */
+ public static boolean recursiveDelete(File path)
+ {
+ if (path.exists())
+ {
+ File[] files = path.listFiles();
+ for (int i = 0; i < files.length; i++)
+ {
+ if (files[i].isDirectory())
+ {
+ recursiveDelete(files[i]);
+ }
+ else
+ {
+ files[i].delete();
+ }
+ }
+ }
+ return path.delete();
+ } //}}}
+
+ //{{{ _canonPath() method
+ /**
+ * Returns the canonical form if the specified path name. For example,
+ * <code>~</code> might be expanded to the user's home directory.
+ * @param session The session
+ * @param path The path
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurred
+ * @since jEdit 4.0pre2
+ */
+ @Override
+ public String _canonPath(Object session, String path, Component comp)
+ throws IOException
+ {
+ return MiscUtilities.canonPath(path);
+ } //}}}
+
+ //{{{ LocalFile class
+ public static class LocalFile extends VFSFile
+ {
+ private File file;
+
+ // use system default short format
+ public static DateFormat DATE_FORMAT
+ = DateFormat.getInstance();
+
+ /**
+ * @deprecated Call getModified() instead.
+ */
+ @Deprecated
+ public long modified;
+
+ //{{{ LocalFile() class
+ public LocalFile(File file)
+ {
+ this.file = file;
+
+ /* These attributes are fetched relatively
+ quickly. The rest are lazily filled in. */
+ setName(file.getName());
+ String path = file.getPath();
+ setPath(path);
+ setDeletePath(path);
+ setHidden(file.isHidden());
+ setType(file.isDirectory()
+ ? VFSFile.DIRECTORY
+ : VFSFile.FILE);
+ } //}}}
+
+ //{{{ getExtendedAttribute() method
+ @Override
+ public String getExtendedAttribute(String name)
+ {
+ fetchAttrs();
+ if (name.equals(EA_MODIFIED))
+ {
+ return DATE_FORMAT.format(new Date(modified));
+ }
+ else
+ {
+ return super.getExtendedAttribute(name);
+ }
+ } //}}}
+
+ //{{{ fetchAttrs() method
+ /** Fetch the attributes of the local file. */
+ @Override
+ protected void fetchAttrs()
+ {
+ if(fetchedAttrs())
+ return;
+
+ super.fetchAttrs();
+
+ setSymlinkPath(MiscUtilities.resolveSymlinks(
+ file.getPath()));
+ setReadable(file.canRead());
+ setWriteable(file.canWrite());
+ setLength(file.length());
+ setModified(file.lastModified());
+ } //}}}
+
+ //{{{ getIcon() method
+ /**
+ * Returns the file system icon for the file.
+ *
+ * @param expanded not used here
+ * @param openBuffer not used here
+ * @return the file system icon
+ * @since 4.3pre9
+ */
+ @Override
+ public Icon getIcon(boolean expanded, boolean openBuffer)
+ {
+ if (icon == null)
+ {
+ if (fsView == null)
+ fsView = FileSystemView.getFileSystemView();
+
+ icon = fsView.getSystemIcon(file);
+ }
+ return icon;
+ } //}}}
+
+ //{{{ getSymlinkPath() method
+ @Override
+ public String getSymlinkPath()
+ {
+ fetchAttrs();
+ return super.getSymlinkPath();
+ } //}}}
+
+ //{{{ getLength() method
+ @Override
+ public long getLength()
+ {
+ fetchAttrs();
+ return super.getLength();
+ } //}}}
+
+ //{{{ isReadable() method
+ @Override
+ public boolean isReadable()
+ {
+ fetchAttrs();
+ return super.isReadable();
+ } //}}}
+
+ //{{{ isWriteable() method
+ @Override
+ public boolean isWriteable()
+ {
+ fetchAttrs();
+ return super.isWriteable();
+ } //}}}
+
+ //{{{ getModified() method
+ public long getModified()
+ {
+ fetchAttrs();
+ return modified;
+ } //}}}
+
+ //{{{ setModified() method
+ public void setModified(long modified)
+ {
+ this.modified = modified;
+ } //}}}
+
+ private transient FileSystemView fsView;
+ private transient Icon icon;
+ } //}}}
+
+ //{{{ _listFiles() method
+ @Override
+ public VFSFile[] _listFiles(Object session, String path,
+ Component comp)
+ {
+ //{{{ Windows work around
+ /* On Windows, paths of the form X: list the last *working
+ * directory* on that drive. To list the root of the drive,
+ * you must use X:\.
+ *
+ * However, the VFS browser and friends strip off trailing
+ * path separators, for various reasons. So to work around
+ * that, we add a '\' to drive letter paths on Windows.
+ */
+ if(OperatingSystem.isWindows())
+ {
+ if(path.length() == 2 && path.charAt(1) == ':')
+ path = path.concat(File.separator);
+ } //}}}
+
+ File directory = new File(path);
+ File[] list = null;
+ if(directory.exists())
+ list = fsView.getFiles(directory,false);
+
+ if(list == null)
+ {
+ VFSManager.error(comp,path,"ioerror.directory-error-nomsg",null);
+ return null;
+ }
+
+ VFSFile[] list2 = new VFSFile[list.length];
+ for(int i = 0; i < list.length; i++)
+ list2[i] = new LocalFile(list[i]);
+
+ return list2;
+ } //}}}
+
+ //{{{ _getFile() method
+ @Override
+ public VFSFile _getFile(Object session, String path,
+ Component comp)
+ {
+ if(path.equals("/") && OperatingSystem.isUnix())
+ {
+ return new VFS.DirectoryEntry(path,path,path,
+ VFSFile.DIRECTORY,0L,false);
+ }
+
+ File file = new File(path);
+ if(!file.exists())
+ return null;
+
+ return new LocalFile(file);
+ } //}}}
+
+ //{{{ _delete() method
+ @Override
+ public boolean _delete(Object session, String path, Component comp)
+ {
+ File file = new File(path);
+ // do some platforms throw exceptions if the file does not exist
+ // when we ask for the canonical path?
+ String canonPath;
+ try
+ {
+ canonPath = file.getCanonicalPath();
+ }
+ catch(IOException io)
+ {
+ canonPath = path;
+ }
+ // if directory, do recursive delete
+ boolean retVal;
+ if (!file.isDirectory())
+ {
+ retVal = file.delete();
+ }
+ else
+ {
+ retVal = recursiveDelete(file);
+ }
+ if(retVal)
+ VFSManager.sendVFSUpdate(this,canonPath,true);
+ return retVal;
+ } //}}}
+
+ //{{{ _rename() method
+ @Override
+ public boolean _rename(Object session, String from, String to,
+ Component comp)
+ {
+ File _to = new File(to);
+
+ String toCanonPath;
+ try
+ {
+ toCanonPath = _to.getCanonicalPath();
+ }
+ catch(IOException io)
+ {
+ toCanonPath = to;
+ }
+
+ // this is needed because on OS X renaming to a non-existent
+ // directory causes problems
+ File parent = new File(_to.getParent());
+ if(parent.exists())
+ {
+ if(!parent.isDirectory())
+ return false;
+ }
+ else
+ {
+ parent.mkdirs();
+ if(!parent.exists())
+ return false;
+ }
+
+ File _from = new File(from);
+
+ String fromCanonPath;
+ try
+ {
+ fromCanonPath = _from.getCanonicalPath();
+ }
+ catch(IOException io)
+ {
+ fromCanonPath = from;
+ }
+
+ // Case-insensitive fs workaround
+ if(!fromCanonPath.equalsIgnoreCase(toCanonPath))
+ _to.delete();
+
+ boolean retVal = _from.renameTo(_to);
+ VFSManager.sendVFSUpdate(this,fromCanonPath,true);
+ VFSManager.sendVFSUpdate(this,toCanonPath,true);
+ return retVal;
+ } //}}}
+
+ //{{{ _mkdir() method
+ @Override
+ public boolean _mkdir(Object session, String directory, Component comp)
+ {
+ String parent = getParentOfPath(directory);
+ if(!new File(parent).exists())
+ {
+ if(!_mkdir(session,parent,comp))
+ return false;
+ }
+
+ File file = new File(directory);
+
+ boolean retVal = file.mkdir();
+ String canonPath;
+ try
+ {
+ canonPath = file.getCanonicalPath();
+ }
+ catch(IOException io)
+ {
+ canonPath = directory;
+ }
+ VFSManager.sendVFSUpdate(this,canonPath,true);
+ return retVal;
+ } //}}}
+
+ //{{{ _backup() method
+ @Override
+ public void _backup(Object session, String path, Component comp)
+ throws IOException
+ {
+ // Fetch properties
+
+ String backupPrefix = jEdit.getProperty("backup.prefix");
+ String backupSuffix = jEdit.getProperty("backup.suffix");
+
+ String backupDirectory = jEdit.getProperty("backup.directory");
+
+ int backupTimeDistance = jEdit.getIntegerProperty("backup.minTime",0);
+ File file = new File(path);
+
+ if (!file.exists())
+ return;
+
+ // Check for backup.directory, and create that
+ // directory if it doesn't exist
+ if(backupDirectory == null || backupDirectory.length() == 0)
+ backupDirectory = file.getParent();
+ else
+ {
+ backupDirectory = MiscUtilities.constructPath(
+ System.getProperty("user.home"), backupDirectory);
+
+ // Perhaps here we would want to guard with
+ // a property for parallel backups or not.
+ backupDirectory = MiscUtilities.concatPath(
+ backupDirectory,file.getParent());
+
+ File dir = new File(backupDirectory);
+
+ if (!dir.exists())
+ dir.mkdirs();
+ }
+
+ MiscUtilities.saveBackup(file, jEdit.getIntegerProperty("backups",1), backupPrefix,
+ backupSuffix,backupDirectory,backupTimeDistance);
+ } //}}}
+
+ //{{{ _createInputStream() method
+ @Override
+ public InputStream _createInputStream(Object session, String path,
+ boolean ignoreErrors, Component comp) throws IOException
+ {
+ try
+ {
+ return new FileInputStream(path);
+ }
+ catch(IOException io)
+ {
+ if(ignoreErrors)
+ return null;
+ else
+ throw io;
+ }
+ } //}}}
+
+ //{{{ _createOutputStream() method
+ @Override
+ public OutputStream _createOutputStream(Object session, String path,
+ Component comp) throws IOException
+ {
+ return new FileOutputStream(path);
+ } //}}}
+
+ //{{{ _saveComplete() method
+ @Override
+ public void _saveComplete(Object session, Buffer buffer, String path,
+ Component comp)
+ {
+ int permissions = buffer.getIntegerProperty(PERMISSIONS_PROPERTY,0);
+ setPermissions(path,permissions);
+ } //}}}
+
+ //{{{ Permission preservation code
+
+ /** Code borrowed from j text editor (http://www.armedbear.org) */
+ /** I made some changes to make it support suid, sgid and sticky files */
+
+ //{{{ getPermissions() method
+ /**
+ * Returns numeric permissions of a file. On non-Unix systems, always
+ * returns zero.
+ * @since jEdit 3.2pre9
+ */
+ public static int getPermissions(String path)
+ {
+ int permissions = 0;
+
+ if(jEdit.getBooleanProperty("chmodDisabled"))
+ return permissions;
+
+ if(OperatingSystem.isUnix())
+ {
+ String[] cmdarray = { "ls", "-ld", path };
+
+ InputStreamReader isr = null;
+ BufferedReader reader = null;
+ try
+ {
+ Process process = Runtime.getRuntime().exec(cmdarray);
+ isr = new InputStreamReader(process.getInputStream());
+ reader = new BufferedReader(isr);
+
+ String output = reader.readLine();
+
+ if(output != null)
+ {
+ String s = output.substring(1, 10);
+
+ permissions = MiscUtilities
+ .parsePermissions(s);
+ }
+ }
+
+ // Feb 4 2000 5:30 PM
+ // Catch Throwable here rather than Exception.
+ // Kaffe's implementation of Runtime.exec throws java.lang.InternalError.
+ catch (Throwable t)
+ {
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(reader);
+ }
+ }
+
+ return permissions;
+ } //}}}
+
+ //{{{ setPermissions() method
+ /**
+ * Sets numeric permissions of a file. On non-Unix platforms,
+ * does nothing.
+ * @since jEdit 3.2pre9
+ */
+ public static void setPermissions(String path, int permissions)
+ {
+ if(jEdit.getBooleanProperty("chmodDisabled"))
+ return;
+
+ if(permissions != 0)
+ {
+ if(OperatingSystem.isUnix())
+ {
+ String[] cmdarray = { "chmod", Integer.toString(permissions, 8), path };
+
+ try
+ {
+ Process process = Runtime.getRuntime().exec(cmdarray);
+ process.getInputStream().close();
+ process.getOutputStream().close();
+ process.getErrorStream().close();
+ // Jun 9 2004 12:40 PM
+ // waitFor() hangs on some Java
+ // implementations.
+ /* int exitCode = process.waitFor();
+ if(exitCode != 0)
+ Log.log(Log.NOTICE,FileVFS.class,"chmod exited with code " + exitCode); */
+ }
+
+ // Feb 4 2000 5:30 PM
+ // Catch Throwable here rather than Exception.
+ // Kaffe's implementation of Runtime.exec throws java.lang.InternalError.
+ catch (Throwable t)
+ {
+ }
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private static final FileSystemView fsView = FileSystemView.getFileSystemView();
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/GlobVFSFileFilter.java b/jEdit/org/gjt/sp/jedit/io/GlobVFSFileFilter.java
index 2d9d0f5..db17c30 100644
--- a/jEdit/org/gjt/sp/jedit/io/GlobVFSFileFilter.java
+++ b/jEdit/org/gjt/sp/jedit/io/GlobVFSFileFilter.java
@@ -1,93 +1,93 @@
-/*
- * VFSFileFilter.java - VFSFileFilter that uses Unix-style globs.
- * :tabSize=4:indentSize=4:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Marcelo Vanzin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-import java.util.regex.Pattern;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.util.StandardUtilities;
-
-/**
- * Implementation of {@link VFSFileFilter} that uses Unix-style globs
- * to filter files. This doesn't filter directories - just files.
- *
- * @author Marcelo Vanzin
- * @version $Id$
- * @since jEdit 4.3pre7
- */
-public class GlobVFSFileFilter implements VFSFileFilter
-{
-
- public GlobVFSFileFilter(String glob)
- {
- this.glob = glob;
- }
-
- public boolean accept(VFSFile file)
- {
- if (file.getType() == VFSFile.DIRECTORY
- || file.getType() == VFSFile.FILESYSTEM)
- {
- return true;
- }
- else
- {
- return accept(file.getName());
- }
- }
-
- public boolean accept(String url)
- {
- if (pattern == null)
- {
- pattern = Pattern.compile(StandardUtilities.globToRE(glob),
- Pattern.CASE_INSENSITIVE);
- }
- return pattern.matcher(url).matches();
- }
-
- public String getDescription()
- {
- return jEdit.getProperty("vfs.browser.file_filter.glob");
- }
-
- public String toString()
- {
- return glob;
- }
-
- public void setGlob(String glob)
- {
- this.glob = glob;
- pattern = null;
- }
-
- public String getGlob()
- {
- return glob;
- }
-
- private String glob;
- private Pattern pattern;
-
-}
-
+/*
+ * VFSFileFilter.java - VFSFileFilter that uses Unix-style globs.
+ * :tabSize=4:indentSize=4:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Marcelo Vanzin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+import java.util.regex.Pattern;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.util.StandardUtilities;
+
+/**
+ * Implementation of {@link VFSFileFilter} that uses Unix-style globs
+ * to filter files. This doesn't filter directories - just files.
+ *
+ * @author Marcelo Vanzin
+ * @version $Id$
+ * @since jEdit 4.3pre7
+ */
+public class GlobVFSFileFilter implements VFSFileFilter
+{
+
+ public GlobVFSFileFilter(String glob)
+ {
+ this.glob = glob;
+ }
+
+ public boolean accept(VFSFile file)
+ {
+ if (file.getType() == VFSFile.DIRECTORY
+ || file.getType() == VFSFile.FILESYSTEM)
+ {
+ return true;
+ }
+ else
+ {
+ return accept(file.getName());
+ }
+ }
+
+ public boolean accept(String url)
+ {
+ if (pattern == null)
+ {
+ pattern = Pattern.compile(StandardUtilities.globToRE(glob),
+ Pattern.CASE_INSENSITIVE);
+ }
+ return pattern.matcher(url).matches();
+ }
+
+ public String getDescription()
+ {
+ return jEdit.getProperty("vfs.browser.file_filter.glob");
+ }
+
+ public String toString()
+ {
+ return glob;
+ }
+
+ public void setGlob(String glob)
+ {
+ this.glob = glob;
+ pattern = null;
+ }
+
+ public String getGlob()
+ {
+ return glob;
+ }
+
+ private String glob;
+ private Pattern pattern;
+
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/io/RegexEncodingDetector.java b/jEdit/org/gjt/sp/jedit/io/RegexEncodingDetector.java
index e54ea2e..434d9e9 100644
--- a/jEdit/org/gjt/sp/jedit/io/RegexEncodingDetector.java
+++ b/jEdit/org/gjt/sp/jedit/io/RegexEncodingDetector.java
@@ -1,100 +1,110 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import java.nio.CharBuffer;
-
-/**
- * An encoding detector which finds regex pattern.
- *
- * This reads the sample in the system default encoding for first some
- * lines and look for a regex pattern. This can fail if the
- * stream cannot be read in the system default encoding or the
- * pattern is not found at near the top of the stream.
- *
- * @since 4.3pre16
- * @author Kazutoshi Satoda
- */
-public class RegexEncodingDetector implements EncodingDetector
-{
- /**
- * A regex pattern matches to "Charset names" specified for
- * java.nio.charset.Charset.
- * @see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/Charset.html#names">Charset names</a>
- */
- public static final String VALID_ENCODING_PATTERN
- = "\\p{Alnum}[\\p{Alnum}\\-.:_]*";
-
- private final Pattern pattern;
- private final String replacement;
-
- public RegexEncodingDetector(String pattern, String replacement)
- {
- this.pattern = Pattern.compile(pattern);
- this.replacement = replacement;
- }
-
- public String detectEncoding(InputStream sample) throws IOException
- {
- InputStreamReader reader = new InputStreamReader(sample);
- final int bufferSize = 1024;
- char[] buffer = new char[bufferSize];
- int readSize = reader.read(buffer, 0, bufferSize);
- if (readSize > 0)
- {
- Matcher matcher = pattern.matcher(
- CharBuffer.wrap(buffer, 0, readSize));
- while (matcher.find())
- {
- String extracted = extractReplacement(
- matcher, replacement);
- if (EncodingServer.hasEncoding(extracted))
- {
- return extracted;
- }
- }
- }
- return null;
- }
-
- /**
- * Returns a replaced string for a Matcher which has been matched
- * by find() method.
- */
- private static String extractReplacement(Matcher found, String replacement)
- {
- /*
- * It doesn't make sense to read before start, but
- * appendReplacement() requires to to it.
- */
- int found_start = found.start();
- int found_end = found.end();
- int source_length = found_end - found_start;
- StringBuffer replaced = new StringBuffer(found_start + (source_length * 2));
- found.appendReplacement(replaced, replacement);
- return replaced.substring(found_start);
- }
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+import java.nio.CharBuffer;
+
+/**
+ * An encoding detector which finds regex pattern.
+ *
+ * This reads the sample in the system default encoding for first some
+ * lines and look for a regex pattern. This can fail if the
+ * stream cannot be read in the system default encoding or the
+ * pattern is not found at near the top of the stream.
+ *
+ * @since 4.3pre16
+ * @author Kazutoshi Satoda
+ */
+public class RegexEncodingDetector implements EncodingDetector
+{
+ /**
+ * A regex pattern matches to "Charset names" specified for
+ * java.nio.charset.Charset.
+ * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html#names">Charset names</a>
+ */
+ public static final String VALID_ENCODING_PATTERN
+ = "\\p{Alnum}[\\p{Alnum}\\-.:_]*";
+
+ private final Pattern pattern;
+ private final String replacement;
+
+ public RegexEncodingDetector(String pattern, String replacement)
+ {
+ this.pattern = Pattern.compile(pattern);
+ this.replacement = replacement;
+ }
+
+ public String detectEncoding(InputStream sample) throws IOException
+ {
+ InputStreamReader reader = new InputStreamReader(sample);
+ final int bufferSize = 1024;
+ char[] buffer = new char[bufferSize];
+ int readSize = reader.read(buffer, 0, bufferSize);
+ if (readSize > 0)
+ {
+ Matcher matcher = pattern.matcher(
+ CharBuffer.wrap(buffer, 0, readSize));
+
+ // Tracking of this implicit state within Matcher
+ // is required to know where is the start of
+ // replacement after calling appendReplacement().
+ int appendPosition = 0;
+
+ while (matcher.find())
+ {
+ String extracted = extractReplacement(
+ matcher, appendPosition, replacement);
+ if (EncodingServer.hasEncoding(extracted))
+ {
+ return extracted;
+ }
+ appendPosition = matcher.end();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns a replaced string for a Matcher which has been matched
+ * by find() method.
+ */
+ private static String extractReplacement(
+ Matcher found, int appendPosition, String replacement)
+ {
+ /*
+ * It doesn't make sense to read before start, but
+ * appendReplacement() requires to to it.
+ */
+ int found_start = found.start();
+ int found_end = found.end();
+ int source_length = found_end - found_start;
+ int length_before_match = found_start - appendPosition;
+ StringBuffer replaced = new StringBuffer(
+ length_before_match + (source_length * 2));
+ found.appendReplacement(replaced, replacement);
+ return replaced.substring(length_before_match);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/UrlVFS.java b/jEdit/org/gjt/sp/jedit/io/UrlVFS.java
index f41d8f6..d6cbc8b 100644
--- a/jEdit/org/gjt/sp/jedit/io/UrlVFS.java
+++ b/jEdit/org/gjt/sp/jedit/io/UrlVFS.java
@@ -1,89 +1,89 @@
-/*
- * UrlVFS.java - URL VFS
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.awt.Component;
-import java.io.*;
-import java.net.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * URL VFS.
- * @author Slava Pestov
- * @version $Id: UrlVFS.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class UrlVFS extends VFS
-{
- //{{{ UrlVFS constructor
- public UrlVFS()
- {
- super("url",READ_CAP | WRITE_CAP);
- } //}}}
-
- //{{{ constructPath() method
- public String constructPath(String parent, String path)
- {
- if(parent.endsWith("/"))
- return parent + path;
- else
- return parent + '/' + path;
- } //}}}
-
- //{{{ _createInputStream() method
- public InputStream _createInputStream(Object session,
- String path, boolean ignoreErrors, Component comp)
- throws IOException
- {
- try
- {
- return new URL(path).openStream();
- }
- catch(MalformedURLException mu)
- {
- Log.log(Log.ERROR,this,mu);
- String[] args = { mu.getMessage() };
- VFSManager.error(comp,path,"ioerror.badurl",args);
- return null;
- }
- } //}}}
-
- //{{{ _createOutputStream() method
- public OutputStream _createOutputStream(Object session, String path,
- Component comp) throws IOException
- {
- try
- {
- return new URL(path).openConnection()
- .getOutputStream();
- }
- catch(MalformedURLException mu)
- {
- Log.log(Log.ERROR,this,mu);
- String[] args = { mu.getMessage() };
- VFSManager.error(comp,path,"ioerror.badurl",args);
- return null;
- }
- } //}}}
-}
+/*
+ * UrlVFS.java - URL VFS
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import java.awt.Component;
+import java.io.*;
+import java.net.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * URL VFS.
+ * @author Slava Pestov
+ * @version $Id: UrlVFS.java 17062 2010-01-24 17:20:22Z ezust $
+ */
+public class UrlVFS extends VFS
+{
+ //{{{ UrlVFS constructor
+ public UrlVFS()
+ {
+ super("url", READ_CAP);
+ } //}}}
+
+ //{{{ constructPath() method
+ public String constructPath(String parent, String path)
+ {
+ if(parent.endsWith("/"))
+ return parent + path;
+ else
+ return parent + '/' + path;
+ } //}}}
+
+ //{{{ _createInputStream() method
+ public InputStream _createInputStream(Object session,
+ String path, boolean ignoreErrors, Component comp)
+ throws IOException
+ {
+ try
+ {
+ return new URL(path).openStream();
+ }
+ catch(MalformedURLException mu)
+ {
+ Log.log(Log.ERROR,this,mu);
+ String[] args = { mu.getMessage() };
+ VFSManager.error(comp,path,"ioerror.badurl",args);
+ return null;
+ }
+ } //}}}
+
+ //{{{ _createOutputStream() method
+ public OutputStream _createOutputStream(Object session, String path,
+ Component comp) throws IOException
+ {
+ try
+ {
+ return new URL(path).openConnection()
+ .getOutputStream();
+ }
+ catch(MalformedURLException mu)
+ {
+ Log.log(Log.ERROR,this,mu);
+ String[] args = { mu.getMessage() };
+ VFSManager.error(comp,path,"ioerror.badurl",args);
+ return null;
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/VFS.java b/jEdit/org/gjt/sp/jedit/io/VFS.java
index a2d60a9..2d3479a 100644
--- a/jEdit/org/gjt/sp/jedit/io/VFS.java
+++ b/jEdit/org/gjt/sp/jedit/io/VFS.java
@@ -1,1198 +1,1221 @@
-/*
- * VFS.java - Virtual filesystem implementation
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.awt.Color;
-import java.awt.Component;
-import java.io.*;
-import java.util.*;
-
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.bufferio.BufferLoadRequest;
-import org.gjt.sp.jedit.bufferio.BufferSaveRequest;
-import org.gjt.sp.jedit.bufferio.BufferInsertRequest;
-import org.gjt.sp.jedit.bufferio.BufferIORequest;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.ProgressObserver;
-import org.gjt.sp.util.IOUtilities;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.util.WorkThread;
-//}}}
-
-/**
- * A virtual filesystem implementation.<p>
- *
- * Plugins can provide virtual file systems by defining entries in their
- * <code>services.xml</code> files like so:
- *
- * <pre><SERVICE CLASS="org.gjt.sp.jedit.io.VFS" NAME="<i>name</i>">
- * new <i>MyVFS</i>();
- *</SERVICE></pre>
- *
- * URLs of the form <code><i>name</i>:<i>path</i></code> will then be handled
- * by the VFS named <code><i>name</i></code>.<p>
- *
- * See {@link org.gjt.sp.jedit.ServiceManager} for details.<p>
- *
- * <h3>Session objects:</h3>
- *
- * A session is used to persist things like login information, any network
- * sockets, etc. File system implementations that do not need this kind of
- * persistence return a dummy object as a session.<p>
- *
- * Methods whose names are prefixed with "_" expect to be given a
- * previously-obtained session object. A session must be obtained from the AWT
- * thread in one of two ways:
- *
- * <ul>
- * <li>{@link #createVFSSession(String,Component)}</li>
- * <li>{@link #showBrowseDialog(Object[],Component)}</li>
- * </ul>
- *
- * When done, the session must be disposed of using
- * {@link #_endVFSSession(Object,Component)}.<p>
- *
- * <h3>Thread safety:</h3>
- *
- * The following methods cannot be called from an I/O thread:
- *
- * <ul>
- * <li>{@link #createVFSSession(String,Component)}</li>
- * <li>{@link #insert(View,Buffer,String)}</li>
- * <li>{@link #load(View,Buffer,String)}</li>
- * <li>{@link #save(View,Buffer,String)}</li>
- * <li>{@link #showBrowseDialog(Object[],Component)}</li>
- * </ul>
- *
- * All remaining methods are required to be thread-safe in subclasses.
- *
- * <h3>Implementing a VFS</h3>
- *
- * You can override as many or as few methods as you want. Make sure
- * {@link #getCapabilities()} returns a value reflecting the functionality
- * implemented by your VFS.
- *
- * @see VFSManager#getVFSForPath(String)
- * @see VFSManager#getVFSForProtocol(String)
- *
- * @author Slava Pestov
- * @author $Id: VFS.java 15834 2009-08-01 05:35:05Z shlomy $
- */
-public abstract class VFS
-{
- //{{{ Capabilities
-
- /**
- * Read capability.
- * @since jEdit 2.6pre2
- */
- public static final int READ_CAP = 1 << 0;
-
- /**
- * Write capability.
- * @since jEdit 2.6pre2
- */
- public static final int WRITE_CAP = 1 << 1;
-
- /**
- * Browse capability
- * @since jEdit 4.3pre11
- *
- * This was the official API for adding items to a file
- * system browser's <b>Plugins</b> menu in jEdit 4.1 and earlier. In
- * jEdit 4.2, there is a different way of doing this, you must provide
- * a <code>browser.actions.xml</code> file in your plugin JAR, and
- * define <code>plugin.<i>class</i>.browser-menu-item</code>
- * or <code>plugin.<i>class</i>.browser-menu</code> properties.
- * See {@link org.gjt.sp.jedit.EditPlugin} for details.
- */
- public static final int BROWSE_CAP = 1 << 2;
-
- /**
- * Delete file capability.
- * @since jEdit 2.6pre2
- */
- public static final int DELETE_CAP = 1 << 3;
-
- /**
- * Rename file capability.
- * @since jEdit 2.6pre2
- */
- public static final int RENAME_CAP = 1 << 4;
-
- /**
- * Make directory capability.
- * @since jEdit 2.6pre2
- */
- public static final int MKDIR_CAP = 1 << 5;
-
- /**
- * Low latency capability. If this is not set, then a confirm dialog
- * will be shown before doing a directory search in this VFS.
- * @since jEdit 4.1pre1
- */
- public static final int LOW_LATENCY_CAP = 1 << 6;
-
- /**
- * Case insensitive file system capability.
- * @since jEdit 4.1pre1
- */
- public static final int CASE_INSENSITIVE_CAP = 1 << 7;
-
- //}}}
-
- //{{{ Extended attributes
- /**
- * File type.
- * @since jEdit 4.2pre1
- */
- public static final String EA_TYPE = "type";
-
- /**
- * File status (read only, read write, etc).
- * @since jEdit 4.2pre1
- */
- public static final String EA_STATUS = "status";
-
- /**
- * File size.
- * @since jEdit 4.2pre1
- */
- public static final String EA_SIZE = "size";
-
- /**
- * File last modified date.
- * @since jEdit 4.2pre1
- */
- public static final String EA_MODIFIED = "modified";
- //}}}
-
- public static int IOBUFSIZE = 32678;
-
- //{{{ VFS constructors
- /**
- * @deprecated Use the form where the constructor takes a capability
- * list.
- */
- @Deprecated
- protected VFS(String name)
- {
- this(name,0);
- }
-
- /**
- * Creates a new virtual filesystem.
- * @param name The name
- * @param caps The capabilities
- */
- protected VFS(String name, int caps)
- {
- this.name = name;
- this.caps = caps;
- // reasonable defaults (?)
- this.extAttrs = new String[] { EA_SIZE, EA_TYPE };
- }
-
- /**
- * Creates a new virtual filesystem.
- * @param name The name
- * @param caps The capabilities
- * @param extAttrs The extended attributes
- * @since jEdit 4.2pre1
- */
- protected VFS(String name, int caps, String[] extAttrs)
- {
- this.name = name;
- this.caps = caps;
- this.extAttrs = extAttrs;
- } //}}}
-
- //{{{ getName() method
- /**
- * Returns this VFS's name. The name is used to obtain the
- * label stored in the <code>vfs.<i>name</i>.label</code>
- * property.
- */
- public String getName()
- {
- return name;
- } //}}}
-
- //{{{ getCapabilities() method
- /**
- * Returns the capabilities of this VFS.
- * @since jEdit 2.6pre2
- */
- public int getCapabilities()
- {
- return caps;
- } //}}}
-
- //{{{ isMarkersFileSupported() method
- /**
- * Returns if an additional markers file can be saved by this VFS.
- * Default is {@code true}.
- *
- * @since jEdit 4.3pre10
- */
- public boolean isMarkersFileSupported()
- {
- return true;
- } //}}}
-
- //{{{ getExtendedAttributes() method
- /**
- * Returns the extended attributes supported by this VFS.
- * @since jEdit 4.2pre1
- */
- public String[] getExtendedAttributes()
- {
- return extAttrs;
- } //}}}
-
- //{{{ showBrowseDialog() method
- /**
- * Displays a dialog box that should set up a session and return
- * the initial URL to browse.
- * @param session Where the VFS session will be stored
- * @param comp The component that will parent error dialog boxes
- * @return The URL
- * @since jEdit 2.7pre1
- * @deprecated This function is not used in the jEdit core anymore,
- * so it doesn't have to be provided anymore. If you want
- * to use it for another purpose like in the FTP plugin,
- * feel free to do so.
- */
- @Deprecated
- public String showBrowseDialog(Object[] session, Component comp)
- {
- return null;
- } //}}}
-
- //{{{ getFileName() method
- /**
- * Returns the file name component of the specified path.
- * @param path The path
- * @since jEdit 3.1pre4
- */
- public String getFileName(String path)
- {
- if(path.equals("/"))
- return path;
-
- while(path.endsWith("/") || path.endsWith(File.separator))
- path = path.substring(0,path.length() - 1);
-
- int index = Math.max(path.lastIndexOf('/'),
- path.lastIndexOf(File.separatorChar));
- if(index == -1)
- index = path.indexOf(':');
-
- // don't want getFileName("roots:") to return ""
- if(index == -1 || index == path.length() - 1)
- return path;
-
- return path.substring(index + 1);
- } //}}}
-
- //{{{ getParentOfPath() method
- /**
- * Returns the parent of the specified path. This must be
- * overridden to return a non-null value for browsing of this
- * filesystem to work.
- * @param path The path
- * @since jEdit 2.6pre5
- */
- public String getParentOfPath(String path)
- {
- // ignore last character of path to properly handle
- // paths like /foo/bar/
- int lastIndex = path.length() - 1;
- while(lastIndex > 0
- && (path.charAt(lastIndex) == File.separatorChar
- || path.charAt(lastIndex) == '/'))
- {
- lastIndex--;
- }
-
- int count = Math.max(0,lastIndex);
- int index = path.lastIndexOf(File.separatorChar,count);
- if(index == -1)
- index = path.lastIndexOf('/',count);
- if(index == -1)
- {
- // this ensures that getFileParent("protocol:"), for
- // example, is "protocol:" and not "".
- index = path.lastIndexOf(':');
- }
-
- return path.substring(0,index + 1);
- } //}}}
-
- //{{{ constructPath() method
- /**
- * Constructs a path from the specified directory and
- * file name component. This must be overridden to return a
- * non-null value, otherwise browsing this filesystem will
- * not work.<p>
- *
- * Unless you are writing a VFS, this method should not be called
- * directly. To ensure correct behavior, you <b>must</b> call
- * {@link org.gjt.sp.jedit.MiscUtilities#constructPath(String,String)}
- * instead.
- *
- * @param parent The parent directory
- * @param path The path
- * @since jEdit 2.6pre2
- */
- public String constructPath(String parent, String path)
- {
- return parent + path;
- } //}}}
-
- //{{{ getFileSeparator() method
- /**
- * Returns the file separator used by this VFS.
- * @since jEdit 2.6pre9
- */
- public char getFileSeparator()
- {
- return '/';
- } //}}}
-
- //{{{ getTwoStageSaveName() method
- /**
- * Returns a temporary file name based on the given path.
- *
- * By default jEdit first saves a file to <code>#<i>name</i>#save#</code>
- * and then renames it to the original file. However some virtual file
- * systems might not support the <code>#</code> character in filenames,
- * so this method permits the VFS to override this behavior.
- *
- * If this method returns <code>null</code>, two stage save will not
- * be used for that particular file (introduced in jEdit 4.3pre1).
- *
- * @param path The path name
- * @since jEdit 4.1pre7
- */
- public String getTwoStageSaveName(String path)
- {
- return MiscUtilities.constructPath(getParentOfPath(path),
- '#' + getFileName(path) + "#save#");
- } //}}}
-
- //{{{ reloadDirectory() method
- /**
- * Called before a directory is reloaded by the file system browser.
- * Can be used to flush a cache, etc.
- * @since jEdit 4.0pre3
- */
- public void reloadDirectory(String path) {} //}}}
-
- //{{{ createVFSSession() method
- /**
- * Creates a VFS session. This method is called from the AWT thread,
- * so it should not do any I/O. It could, however, prompt for
- * a login name and password, for example.
- * @param path The path in question
- * @param comp The component that will parent any dialog boxes shown
- * @return The session. The session can be null if there were errors
- * @since jEdit 2.6pre3
- */
- public Object createVFSSession(String path, Component comp)
- {
- return new Object();
- } //}}}
-
- //{{{ load() method
- /**
- * Loads the specified buffer. The default implementation posts
- * an I/O request to the I/O thread.
- * @param view The view
- * @param buffer The buffer
- * @param path The path
- */
- public boolean load(View view, Buffer buffer, String path)
- {
- if((getCapabilities() & READ_CAP) == 0)
- {
- VFSManager.error(view,path,"vfs.not-supported.load",new String[] { name });
- return false;
- }
-
- Object session = createVFSSession(path,view);
- if(session == null)
- return false;
-
- if((getCapabilities() & WRITE_CAP) == 0)
- buffer.setReadOnly(true);
-
- BufferIORequest request = new BufferLoadRequest(
- view,buffer,session,this,path);
- if(buffer.isTemporary())
- // this makes HyperSearch much faster
- request.run();
- else
- VFSManager.runInWorkThread(request);
-
- return true;
- } //}}}
-
- //{{{ save() method
- /**
- * Saves the specifies buffer. The default implementation posts
- * an I/O request to the I/O thread.
- * @param view The view
- * @param buffer The buffer
- * @param path The path
- */
- public boolean save(View view, Buffer buffer, String path)
- {
- if((getCapabilities() & WRITE_CAP) == 0)
- {
- VFSManager.error(view,path,"vfs.not-supported.save",new String[] { name });
- return false;
- }
-
- Object session = createVFSSession(path,view);
- if(session == null)
- return false;
-
- /* When doing a 'save as', the path to save to (path)
- * will not be the same as the buffer's previous path
- * (buffer.getPath()). In that case, we want to create
- * a backup of the new path, even if the old path was
- * backed up as well (BACKED_UP property set) */
- if(!path.equals(buffer.getPath()))
- buffer.unsetProperty(Buffer.BACKED_UP);
-
- VFSManager.runInWorkThread(new BufferSaveRequest(
- view,buffer,session,this,path));
- return true;
- } //}}}
-
- //{{{ copy() methods
- /**
- * Copy a file to another using VFS.
- *
- * @param progress the progress observer. It could be null if you don't want to monitor progress. If not null
- * you should probably launch this command in a WorkThread
- * @param sourceVFS the source VFS
- * @param sourceSession the VFS session
- * @param sourcePath the source path
- * @param targetVFS the target VFS
- * @param targetSession the target session
- * @param targetPath the target path
- * @param comp comp The component that will parent error dialog boxes
- * @param canStop could this copy be stopped ?
- * @return true if the copy was successful
- * @throws IOException IOException If an I/O error occurs
- * @since jEdit 4.3pre3
- */
- public static boolean copy(ProgressObserver progress, VFS sourceVFS, Object sourceSession,String sourcePath,
- VFS targetVFS, Object targetSession,String targetPath, Component comp, boolean canStop)
- throws IOException
- {
- if (progress != null)
- progress.setStatus("Initializing");
-
- InputStream in = null;
- OutputStream out = null;
- try
- {
- VFSFile sourceVFSFile = sourceVFS._getFile(sourceSession, sourcePath, comp);
- if (sourceVFSFile == null)
- throw new FileNotFoundException(sourcePath);
- if (progress != null)
- {
- progress.setMaximum(sourceVFSFile.getLength());
- }
- VFSFile targetVFSFile = targetVFS._getFile(targetSession, targetPath, comp);
- if (targetVFSFile.getType() == VFSFile.DIRECTORY)
- {
- if (targetVFSFile.getPath().equals(sourceVFSFile.getPath()))
- return false;
- targetPath = MiscUtilities.constructPath(targetPath, sourceVFSFile.getName());
- }
- in = new BufferedInputStream(sourceVFS._createInputStream(sourceSession, sourcePath, false, comp));
- out = new BufferedOutputStream(targetVFS._createOutputStream(targetSession, targetPath, comp));
- boolean copyResult = IOUtilities.copyStream(IOBUFSIZE, progress, in, out, canStop);
- VFSManager.sendVFSUpdate(targetVFS, targetPath, true);
- return copyResult;
- }
- finally
- {
- IOUtilities.closeQuietly(in);
- IOUtilities.closeQuietly(out);
- }
- }
-
- /**
- * Copy a file to another using VFS.
- *
- * @param progress the progress observer. It could be null if you don't want to monitor progress. If not null
- * you should probably launch this command in a WorkThread
- * @param sourcePath the source path
- * @param targetPath the target path
- * @param comp comp The component that will parent error dialog boxes
- * @param canStop if true the copy can be stopped
- * @return true if the copy was successful
- * @throws IOException IOException If an I/O error occurs
- * @since jEdit 4.3pre3
- */
- public static boolean copy(ProgressObserver progress, String sourcePath,String targetPath, Component comp, boolean canStop)
- throws IOException
- {
- VFS sourceVFS = VFSManager.getVFSForPath(sourcePath);
- Object sourceSession = sourceVFS.createVFSSession(sourcePath, comp);
- if (sourceSession == null)
- {
- Log.log(Log.WARNING, VFS.class, "Unable to get a valid session from " + sourceVFS + " for path " + sourcePath);
- return false;
- }
- VFS targetVFS = VFSManager.getVFSForPath(targetPath);
- Object targetSession = targetVFS.createVFSSession(targetPath, comp);
- if (targetSession == null)
- {
- Log.log(Log.WARNING, VFS.class, "Unable to get a valid session from " + targetVFS + " for path " + targetPath);
- return false;
- }
- return copy(progress, sourceVFS, sourceSession, sourcePath, targetVFS, targetSession, targetPath, comp,canStop);
- } //}}}
-
- //{{{ insert() method
- /**
- * Inserts a file into the specified buffer. The default implementation
- * posts an I/O request to the I/O thread.
- * @param view The view
- * @param buffer The buffer
- * @param path The path
- */
- public boolean insert(View view, Buffer buffer, String path)
- {
- if((getCapabilities() & READ_CAP) == 0)
- {
- VFSManager.error(view,path,"vfs.not-supported.load",new String[] { name });
- return false;
- }
-
- Object session = createVFSSession(path,view);
- if(session == null)
- return false;
-
- VFSManager.runInWorkThread(new BufferInsertRequest(
- view,buffer,session,this,path));
- return true;
- } //}}}
-
- // A method name that starts with _ requires a session object
-
- //{{{ _canonPath() method
- /**
- * Returns the canonical form of the specified path name. For example,
- * <code>~</code> might be expanded to the user's home directory.
- * @param session The session
- * @param path The path
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurred
- * @since jEdit 4.0pre2
- */
- public String _canonPath(Object session, String path, Component comp)
- throws IOException
- {
- return path;
- } //}}}
-
- //{{{ _listDirectory() method
- /**
- * A convinience method that matches file names against globs, and can
- * optionally list the directory recursively.
- * @param session The session
- * @param directory The directory. Note that this must be a full
- * URL, including the host name, path name, and so on. The
- * username and password (if needed by the VFS) is obtained from the
- * session instance.
- * @param glob Only file names matching this glob will be returned
- * @param recursive If true, subdirectories will also be listed.
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurred
- * @since jEdit 4.1pre1
- */
- public String[] _listDirectory(Object session, String directory,
- String glob, boolean recursive, Component comp )
- throws IOException
- {
- String[] retval = _listDirectory(session, directory, glob, recursive, comp, true, false);
- return retval;
- } //}}}
-
-
- //{{{ _listDirectory() method
- /**
- * A convenience method that matches file names against globs, and can
- * optionally list the directory recursively.
- * @param session The session
- * @param directory The directory. Note that this must be a full
- * URL, including the host name, path name, and so on. The
- * username and password (if needed by the VFS) is obtained from the
- * session instance.
- * @param glob Only file names matching this glob will be returned
- * @param recursive If true, subdirectories will also be listed.
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurred
- * @param skipBinary ignore binary files (do not return them).
- * This will slow down the process since it will open the files
- * @param skipHidden skips hidden files, directories, and
- * backup files. Ignores any file beginning with . or #, or ending with ~
- * or .bak
- *
- *
- * @since jEdit 4.3pre5
- */
- public String[] _listDirectory(Object session, String directory,
- String glob, boolean recursive, Component comp,
- boolean skipBinary, boolean skipHidden)
- throws IOException
- {
- VFSFileFilter filter = new GlobVFSFileFilter(glob);
- return _listDirectory(session, directory, filter,
- recursive, comp, skipBinary,
- skipHidden);
- } //}}}
-
- //{{{ _listDirectory() method
- /**
- * A convenience method that filters the directory listing
- * according to a filter, and can optionally list the directory
- * recursively.
- * @param session The session
- * @param directory The directory. Note that this must be a full
- * URL, including the host name, path name, and so on. The
- * username and password (if needed by the VFS) is obtained from the
- * session instance.
- * @param filter The {@link VFSFileFilter} to use for filtering.
- * @param recursive If true, subdirectories will also be listed.
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurred
- * @param skipBinary ignore binary files (do not return them).
- * This will slow down the process since it will open the files
- * @param skipHidden skips hidden files, directories, and
- * backup files. Ignores any file beginning with . or #, or ending with ~
- * or .bak
- *
- * @since jEdit 4.3pre7
- */
- public String[] _listDirectory(Object session, String directory,
- VFSFileFilter filter, boolean recursive, Component comp,
- boolean skipBinary, boolean skipHidden)
- throws IOException
- {
- List<String> files = new ArrayList<String>(100);
-
- listFiles(session,new HashSet<String>(), files,directory,filter,
- recursive, comp, skipBinary, skipHidden);
-
- String[] retVal = files.toArray(new String[files.size()]);
-
- Arrays.sort(retVal,new StandardUtilities.StringCompare<String>(true));
-
- return retVal;
- } //}}}
-
- //{{{ _listFiles() method
- /**
- * Lists the specified directory.
- * @param session The session
- * @param directory The directory. Note that this must be a full
- * URL, including the host name, path name, and so on. The
- * username and password (if needed by the VFS) is obtained from the
- * session instance.
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurred
- * @since jEdit 4.3pre2
- */
- public VFSFile[] _listFiles(Object session, String directory,
- Component comp)
- throws IOException
- {
- return _listDirectory(session,directory,comp);
- } //}}}
-
- //{{{ _listDirectory() method
- /**
- * @deprecated Use <code>_listFiles()</code> instead.
- */
- @Deprecated
- public DirectoryEntry[] _listDirectory(Object session, String directory,
- Component comp)
- throws IOException
- {
- VFSManager.error(comp,directory,"vfs.not-supported.list",new String[] { name });
- return null;
- } //}}}
-
- //{{{ _getFile() method
- /**
- * Returns the specified directory entry.
- * @param session The session get it with {@link VFS#createVFSSession(String, Component)}
- * @param path The path
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurred
- * @return The specified directory entry, or null if it doesn't exist.
- * @since jEdit 4.3pre2
- */
- public VFSFile _getFile(Object session, String path,
- Component comp)
- throws IOException
- {
- return _getDirectoryEntry(session,path,comp);
- } //}}}
-
- //{{{ _getDirectoryEntry() method
- /**
- * Returns the specified directory entry.
- * @param session The session get it with {@link VFS#createVFSSession(String, Component)}
- * @param path The path
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurred
- * @return The specified directory entry, or null if it doesn't exist.
- * @since jEdit 2.7pre1
- * @deprecated Use <code>_getFile()</code> instead.
- */
- @Deprecated
- public DirectoryEntry _getDirectoryEntry(Object session, String path,
- Component comp)
- throws IOException
- {
- return null;
- } //}}}
-
- //{{{ DirectoryEntry class
- /**
- * @deprecated Use <code>VFSFile</code> instead.
- */
- @Deprecated
- public static class DirectoryEntry extends VFSFile
- {
- //{{{ DirectoryEntry constructor
- /**
- * @since jEdit 4.2pre2
- */
- public DirectoryEntry()
- {
- } //}}}
-
- //{{{ DirectoryEntry constructor
- public DirectoryEntry(String name, String path, String deletePath,
- int type, long length, boolean hidden)
- {
- this.name = name;
- this.path = path;
- this.deletePath = deletePath;
- this.symlinkPath = path;
- this.type = type;
- this.length = length;
- this.hidden = hidden;
- if(path != null)
- {
- // maintain backwards compatibility
- VFS vfs = VFSManager.getVFSForPath(path);
- canRead = ((vfs.getCapabilities() & READ_CAP) != 0);
- canWrite = ((vfs.getCapabilities() & WRITE_CAP) != 0);
- }
- } //}}}
- } //}}}
-
- //{{{ _delete() method
- /**
- * Deletes the specified URL.
- * @param session The VFS session
- * @param path The path
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurs
- * @since jEdit 2.7pre1
- */
- public boolean _delete(Object session, String path, Component comp)
- throws IOException
- {
- return false;
- } //}}}
-
- //{{{ _rename() method
- /**
- * Renames the specified URL. Some filesystems might support moving
- * URLs between directories, however others may not. Do not rely on
- * this behavior.
- * @param session The VFS session
- * @param from The old path
- * @param to The new path
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurs
- * @since jEdit 2.7pre1
- */
- public boolean _rename(Object session, String from, String to,
- Component comp) throws IOException
- {
- return false;
- } //}}}
-
- //{{{ _mkdir() method
- /**
- * Creates a new directory with the specified URL.
- * @param session The VFS session
- * @param directory The directory
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurs
- * @since jEdit 2.7pre1
- */
- public boolean _mkdir(Object session, String directory, Component comp)
- throws IOException
- {
- return false;
- } //}}}
-
- //{{{ _backup() method
- /**
- * Backs up the specified file. This should only be overriden by
- * the local filesystem VFS.
- * @param session The VFS session
- * @param path The path
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurs
- * @since jEdit 3.2pre2
- */
- public void _backup(Object session, String path, Component comp)
- throws IOException
- {
- } //}}}
-
- //{{{ _createInputStream() method
- /**
- * Creates an input stream. This method is called from the I/O
- * thread.
- * @param session the VFS session
- * @param path The path
- * @param ignoreErrors If true, file not found errors should be
- * ignored
- * @param comp The component that will parent error dialog boxes
- * @return an inputstream or <code>null</code> if there was a problem
- * @exception IOException If an I/O error occurs
- * @since jEdit 2.7pre1
- */
- public InputStream _createInputStream(Object session,
- String path, boolean ignoreErrors, Component comp)
- throws IOException
- {
- VFSManager.error(comp,path,"vfs.not-supported.load",new String[] { name });
- return null;
- } //}}}
-
- //{{{ _createOutputStream() method
- /**
- * Creates an output stream. This method is called from the I/O
- * thread.
- * @param session the VFS session
- * @param path The path
- * @param comp The component that will parent error dialog boxes
- * @exception IOException If an I/O error occurs
- * @since jEdit 2.7pre1
- */
- public OutputStream _createOutputStream(Object session,
- String path, Component comp)
- throws IOException
- {
- VFSManager.error(comp,path,"vfs.not-supported.save",new String[] { name });
- return null;
- } //}}}
-
- //{{{ _saveComplete() method
- /**
- * Called after a file has been saved.
- * @param session The VFS session
- * @param buffer The buffer
- * @param path The path the buffer was saved to (can be different from
- * {@link org.gjt.sp.jedit.Buffer#getPath()} if the user invoked the
- * <b>Save a Copy As</b> command, for example).
- * @param comp The component that will parent error dialog boxes
- * @exception IOException If an I/O error occurs
- * @since jEdit 4.1pre9
- */
- public void _saveComplete(Object session, Buffer buffer, String path,
- Component comp) throws IOException {} //}}}
-
- //{{{ _finishTwoStageSave() method
- /**
- * Called after a file has been saved and we use twoStageSave (first saving to
- * another file). This should re-apply permissions for example.
-
- * @param session The VFS session
- * @param buffer The buffer
- * @param path The path the buffer was saved to (can be different from
- * {@link org.gjt.sp.jedit.Buffer#getPath()} if the user invoked the
- * <b>Save a Copy As</b> command, for example).
- * @param comp The component that will parent error dialog boxes
- * @exception IOException If an I/O error occurs
- * @since jEdit 4.3pre4
- */
- public void _finishTwoStageSave(Object session, Buffer buffer, String path,
- Component comp) throws IOException
- {
- } //}}}
-
- //{{{ _endVFSSession() method
- /**
- * Finishes the specified VFS session. This must be called
- * after all I/O with this VFS is complete, to avoid leaving
- * stale network connections and such.
- * @param session The VFS session
- * @param comp The component that will parent error dialog boxes
- * @exception IOException if an I/O error occurred
- * @since jEdit 2.7pre1
- */
- public void _endVFSSession(Object session, Component comp)
- throws IOException
- {
- } //}}}
-
- //{{{ getDefaultColorFor() method
- /**
- * Returns color of the specified file name, by matching it against
- * user-specified regular expressions.
- * @since jEdit 4.0pre1
- */
- public static Color getDefaultColorFor(String name)
- {
- synchronized(lock)
- {
- if(colors == null)
- loadColors();
-
- for(int i = 0; i < colors.size(); i++)
- {
- ColorEntry entry = colors.get(i);
- if(entry.re.matcher(name).matches())
- return entry.color;
- }
-
- return null;
- }
- } //}}}
-
- //{{{ DirectoryEntryCompare class
- /**
- * Implementation of {@link Comparator}
- * interface that compares {@link VFS.DirectoryEntry} instances.
- * @since jEdit 4.2pre1
- */
- public static class DirectoryEntryCompare implements Comparator<VFSFile>
- {
- private boolean sortIgnoreCase, sortMixFilesAndDirs;
-
- /**
- * Creates a new <code>DirectoryEntryCompare</code>.
- * @param sortMixFilesAndDirs If false, directories are
- * put at the top of the listing.
- * @param sortIgnoreCase If false, upper case comes before
- * lower case.
- */
- public DirectoryEntryCompare(boolean sortMixFilesAndDirs,
- boolean sortIgnoreCase)
- {
- this.sortMixFilesAndDirs = sortMixFilesAndDirs;
- this.sortIgnoreCase = sortIgnoreCase;
- }
-
- public int compare(VFSFile file1, VFSFile file2)
- {
- if(!sortMixFilesAndDirs)
- {
- if(file1.getType() != file2.getType())
- return file2.getType() - file1.getType();
- }
-
- return StandardUtilities.compareStrings(file1.getName(),
- file2.getName(),sortIgnoreCase);
- }
- } //}}}
-
- //{{{ Private members
- private String name;
- private int caps;
- private String[] extAttrs;
- private static List<ColorEntry> colors;
- private static final Object lock = new Object();
-
- //{{{ Class initializer
- static
- {
- EditBus.addToBus(new EBComponent()
- {
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof PropertiesChanged)
- {
- synchronized(lock)
- {
- colors = null;
- }
- }
- }
- });
- } //}}}
-
- //{{{ recursive listFiles() method
- private void listFiles(Object session, Collection<String> stack,
- List<String> files, String directory, VFSFileFilter filter, boolean recursive,
- Component comp, boolean skipBinary, boolean skipHidden) throws IOException
- {
- String resolvedPath = directory;
- if (recursive && !MiscUtilities.isURL(directory))
- {
- resolvedPath = MiscUtilities.resolveSymlinks(directory);
- /*
- * If looking at a symlink, do not traverse the
- * resolved path more than once.
- */
- if (!directory.equals(resolvedPath))
- {
- if (stack.contains(resolvedPath))
- {
- Log.log(Log.ERROR,this,
- "Recursion in listFiles(): "
- + directory);
- return;
- }
- stack.add(resolvedPath);
- }
- }
-
- Thread ct = Thread.currentThread();
- WorkThread wt = null;
- if (ct instanceof WorkThread) {
- wt = (WorkThread) ct;
- }
-
-
- VFSFile[] _files = _listFiles(session,directory,
- comp);
- if(_files == null || _files.length == 0)
- return;
-
- for(int i = 0; i < _files.length; i++)
- {
- if (wt != null && wt.isAborted()) break;
- VFSFile file = _files[i];
- if (skipHidden && (file.isHidden() || MiscUtilities.isBackup(file.getName())))
- continue;
- if(!filter.accept(file))
- continue;
- if(file.getType() == VFSFile.DIRECTORY
- || file.getType() == VFSFile.FILESYSTEM)
- {
- if(recursive)
- {
- String canonPath = _canonPath(session,
- file.getPath(),comp);
- listFiles(session,stack,files,
- canonPath,filter,recursive,
- comp, skipBinary, skipHidden);
- }
- }
- else // It's a regular file
- {
- if (skipBinary)
- {
- try
- {
- if (file.isBinary(session))
- {
- Log.log(Log.NOTICE,this
- ,file.getPath() + ": skipped as a binary file");
- continue;
- }
- }
- catch(IOException e)
- {
- Log.log(Log.ERROR,this,e);
- // may be not binary...
- }
- }
- files.add(file.getPath());
- }
- }
- } //}}}
-
- //{{{ loadColors() method
- private static void loadColors()
- {
- synchronized(lock)
- {
- colors = new ArrayList<ColorEntry>();
-
- if(!jEdit.getBooleanProperty("vfs.browser.colorize"))
- return;
-
- String glob;
- int i = 0;
- while((glob = jEdit.getProperty("vfs.browser.colors." + i + ".glob")) != null)
- {
- try
- {
- colors.add(new ColorEntry(
- Pattern.compile(StandardUtilities.globToRE(glob)),
- jEdit.getColorProperty(
- "vfs.browser.colors." + i + ".color",
- Color.black)));
- }
- catch(PatternSyntaxException e)
- {
- Log.log(Log.ERROR,VFS.class,"Invalid regular expression: "
- + glob);
- Log.log(Log.ERROR,VFS.class,e);
- }
-
- i++;
- }
- }
- } //}}}
-
- //{{{ ColorEntry class
- private static class ColorEntry
- {
- Pattern re;
- Color color;
-
- ColorEntry(Pattern re, Color color)
- {
- this.re = re;
- this.color = color;
- }
- } //}}}
-
- //}}}
-}
+/*
+ * VFS.java - Virtual filesystem implementation
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import java.awt.Color;
+import java.awt.Component;
+import java.io.*;
+import java.util.*;
+
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.bufferio.BufferLoadRequest;
+import org.gjt.sp.jedit.bufferio.BufferSaveRequest;
+import org.gjt.sp.jedit.bufferio.BufferInsertRequest;
+import org.gjt.sp.jedit.bufferio.BufferIORequest;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.ProgressObserver;
+import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.util.ThreadUtilities;
+import org.gjt.sp.util.WorkThread;
+//}}}
+
+/**
+ * A virtual filesystem implementation.<p>
+ *
+ * Plugins can provide virtual file systems by defining entries in their
+ * <code>services.xml</code> files like so:
+ *
+ * <pre><SERVICE CLASS="org.gjt.sp.jedit.io.VFS" NAME="<i>name</i>">
+ * new <i>MyVFS</i>();
+ *</SERVICE></pre>
+ *
+ * URLs of the form <code><i>name</i>:<i>path</i></code> will then be handled
+ * by the VFS named <code><i>name</i></code>.<p>
+ *
+ * See {@link org.gjt.sp.jedit.ServiceManager} for details.<p>
+ *
+ * <h3>Session objects:</h3>
+ *
+ * A session is used to persist things like login information, any network
+ * sockets, etc. File system implementations that do not need this kind of
+ * persistence return a dummy object as a session.<p>
+ *
+ * Methods whose names are prefixed with "_" expect to be given a
+ * previously-obtained session object. A session must be obtained from the AWT
+ * thread in one of two ways:
+ *
+ * <ul>
+ * <li>{@link #createVFSSession(String,Component)}</li>
+ * <li>{@link #showBrowseDialog(Object[],Component)}</li>
+ * </ul>
+ *
+ * When done, the session must be disposed of using
+ * {@link #_endVFSSession(Object,Component)}.<p>
+ *
+ * <h3>Thread safety:</h3>
+ *
+ * The following methods cannot be called from an I/O thread:
+ *
+ * <ul>
+ * <li>{@link #createVFSSession(String,Component)}</li>
+ * <li>{@link #insert(View,Buffer,String)}</li>
+ * <li>{@link #load(View,Buffer,String)}</li>
+ * <li>{@link #save(View,Buffer,String)}</li>
+ * <li>{@link #showBrowseDialog(Object[],Component)}</li>
+ * </ul>
+ *
+ * All remaining methods are required to be thread-safe in subclasses.
+ *
+ * <h3>Implementing a VFS</h3>
+ *
+ * You can override as many or as few methods as you want. Make sure
+ * {@link #getCapabilities()} returns a value reflecting the functionality
+ * implemented by your VFS.
+ *
+ * @see VFSManager#getVFSForPath(String)
+ * @see VFSManager#getVFSForProtocol(String)
+ *
+ * @author Slava Pestov
+ * @author $Id: VFS.java 18758 2010-10-10 12:19:07Z voituk $
+ */
+public abstract class VFS
+{
+ //{{{ Capabilities
+
+ /**
+ * Read capability.
+ * @since jEdit 2.6pre2
+ */
+ public static final int READ_CAP = 1 << 0;
+
+ /**
+ * Write capability.
+ * @since jEdit 2.6pre2
+ */
+ public static final int WRITE_CAP = 1 << 1;
+
+ /**
+ * Browse capability
+ * @since jEdit 4.3pre11
+ *
+ * This was the official API for adding items to a file
+ * system browser's <b>Plugins</b> menu in jEdit 4.1 and earlier. In
+ * jEdit 4.2, there is a different way of doing this, you must provide
+ * a <code>browser.actions.xml</code> file in your plugin JAR, and
+ * define <code>plugin.<i>class</i>.browser-menu-item</code>
+ * or <code>plugin.<i>class</i>.browser-menu</code> properties.
+ * See {@link org.gjt.sp.jedit.EditPlugin} for details.
+ */
+ public static final int BROWSE_CAP = 1 << 2;
+
+ /**
+ * Delete file capability.
+ * @since jEdit 2.6pre2
+ */
+ public static final int DELETE_CAP = 1 << 3;
+
+ /**
+ * Rename file capability.
+ * @since jEdit 2.6pre2
+ */
+ public static final int RENAME_CAP = 1 << 4;
+
+ /**
+ * Make directory capability.
+ * @since jEdit 2.6pre2
+ */
+ public static final int MKDIR_CAP = 1 << 5;
+
+ /**
+ * Low latency capability. If this is not set, then a confirm dialog
+ * will be shown before doing a directory search in this VFS.
+ * @since jEdit 4.1pre1
+ */
+ public static final int LOW_LATENCY_CAP = 1 << 6;
+
+ /**
+ * Case insensitive file system capability.
+ * @since jEdit 4.1pre1
+ */
+ public static final int CASE_INSENSITIVE_CAP = 1 << 7;
+
+ //}}}
+
+ //{{{ Extended attributes
+ /**
+ * File type.
+ * @since jEdit 4.2pre1
+ */
+ public static final String EA_TYPE = "type";
+
+ /**
+ * File status (read only, read write, etc).
+ * @since jEdit 4.2pre1
+ */
+ public static final String EA_STATUS = "status";
+
+ /**
+ * File size.
+ * @since jEdit 4.2pre1
+ */
+ public static final String EA_SIZE = "size";
+
+ /**
+ * File last modified date.
+ * @since jEdit 4.2pre1
+ */
+ public static final String EA_MODIFIED = "modified";
+ //}}}
+
+ public static int IOBUFSIZE = 32678;
+
+ //{{{ VFS constructors
+ /**
+ * @deprecated Use the form where the constructor takes a capability
+ * list.
+ */
+ @Deprecated
+ protected VFS(String name)
+ {
+ this(name,0);
+ }
+
+ /**
+ * Creates a new virtual filesystem.
+ * @param name The name
+ * @param caps The capabilities
+ */
+ protected VFS(String name, int caps)
+ {
+ this.name = name;
+ this.caps = caps;
+ // reasonable defaults (?)
+ this.extAttrs = new String[] { EA_SIZE, EA_TYPE };
+ }
+
+ /**
+ * Creates a new virtual filesystem.
+ * @param name The name
+ * @param caps The capabilities
+ * @param extAttrs The extended attributes
+ * @since jEdit 4.2pre1
+ */
+ protected VFS(String name, int caps, String[] extAttrs)
+ {
+ this.name = name;
+ this.caps = caps;
+ this.extAttrs = extAttrs;
+ } //}}}
+
+ //{{{ getName() method
+ /**
+ * Returns this VFS's name. The name is used to obtain the
+ * label stored in the <code>vfs.<i>name</i>.label</code>
+ * property.
+ */
+ public String getName()
+ {
+ return name;
+ } //}}}
+
+ //{{{ getCapabilities() method
+ /**
+ * Returns the capabilities of this VFS.
+ * @since jEdit 2.6pre2
+ */
+ public int getCapabilities()
+ {
+ return caps;
+ } //}}}
+
+ //{{{ isMarkersFileSupported() method
+ /**
+ * Returns if an additional markers file can be saved by this VFS.
+ * Default is {@code true}.
+ *
+ * @since jEdit 4.3pre10
+ */
+ public boolean isMarkersFileSupported()
+ {
+ return true;
+ } //}}}
+
+ //{{{ getExtendedAttributes() method
+ /**
+ * Returns the extended attributes supported by this VFS.
+ * @since jEdit 4.2pre1
+ */
+ public String[] getExtendedAttributes()
+ {
+ return extAttrs;
+ } //}}}
+
+ //{{{ showBrowseDialog() method
+ /**
+ * Displays a dialog box that should set up a session and return
+ * the initial URL to browse.
+ * @param session Where the VFS session will be stored
+ * @param comp The component that will parent error dialog boxes
+ * @return The URL
+ * @since jEdit 2.7pre1
+ * @deprecated This function is not used in the jEdit core anymore,
+ * so it doesn't have to be provided anymore. If you want
+ * to use it for another purpose like in the FTP plugin,
+ * feel free to do so.
+ */
+ @Deprecated
+ public String showBrowseDialog(Object[] session, Component comp)
+ {
+ return null;
+ } //}}}
+
+ //{{{ getFileName() method
+ /**
+ * Returns the file name component of the specified path.
+ * @param path The path
+ * @since jEdit 3.1pre4
+ */
+ public String getFileName(String path)
+ {
+ if(path.equals("/"))
+ return path;
+
+ while(path.endsWith("/") || path.endsWith(File.separator))
+ path = path.substring(0,path.length() - 1);
+
+ int index = Math.max(path.lastIndexOf('/'),
+ path.lastIndexOf(File.separatorChar));
+ if(index == -1)
+ index = path.indexOf(':');
+
+ // don't want getFileName("roots:") to return ""
+ if(index == -1 || index == path.length() - 1)
+ return path;
+
+ return path.substring(index + 1);
+ } //}}}
+
+ //{{{ getParentOfPath() method
+ /**
+ * Returns the parent of the specified path. This must be
+ * overridden to return a non-null value for browsing of this
+ * filesystem to work.
+ * @param path The path
+ * @since jEdit 2.6pre5
+ */
+ public String getParentOfPath(String path)
+ {
+ // ignore last character of path to properly handle
+ // paths like /foo/bar/
+ int lastIndex = path.length() - 1;
+ while(lastIndex > 0
+ && (path.charAt(lastIndex) == File.separatorChar
+ || path.charAt(lastIndex) == '/'))
+ {
+ lastIndex--;
+ }
+
+ int count = Math.max(0,lastIndex);
+ int index = path.lastIndexOf(File.separatorChar,count);
+ if(index == -1)
+ index = path.lastIndexOf('/',count);
+ if(index == -1)
+ {
+ // this ensures that getFileParent("protocol:"), for
+ // example, is "protocol:" and not "".
+ index = path.lastIndexOf(':');
+ }
+
+ return path.substring(0,index + 1);
+ } //}}}
+
+ //{{{ constructPath() method
+ /**
+ * Constructs a path from the specified directory and
+ * file name component. This must be overridden to return a
+ * non-null value, otherwise browsing this filesystem will
+ * not work.<p>
+ *
+ * Unless you are writing a VFS, this method should not be called
+ * directly. To ensure correct behavior, you <b>must</b> call
+ * {@link org.gjt.sp.jedit.MiscUtilities#constructPath(String,String)}
+ * instead.
+ *
+ * @param parent The parent directory
+ * @param path The path
+ * @since jEdit 2.6pre2
+ */
+ public String constructPath(String parent, String path)
+ {
+ return parent + path;
+ } //}}}
+
+ //{{{ getFileSeparator() method
+ /**
+ * Returns the file separator used by this VFS.
+ * @since jEdit 2.6pre9
+ */
+ public char getFileSeparator()
+ {
+ return '/';
+ } //}}}
+
+ //{{{ getTwoStageSaveName() method
+ /**
+ * Returns a temporary file name based on the given path.
+ *
+ * By default jEdit first saves a file to <code>#<i>name</i>#save#</code>
+ * and then renames it to the original file. However some virtual file
+ * systems might not support the <code>#</code> character in filenames,
+ * so this method permits the VFS to override this behavior.
+ *
+ * If this method returns <code>null</code>, two stage save will not
+ * be used for that particular file (introduced in jEdit 4.3pre1).
+ *
+ * @param path The path name
+ * @since jEdit 4.1pre7
+ */
+ public String getTwoStageSaveName(String path)
+ {
+ return MiscUtilities.constructPath(getParentOfPath(path),
+ '#' + getFileName(path) + "#save#");
+ } //}}}
+
+ //{{{ reloadDirectory() method
+ /**
+ * Called before a directory is reloaded by the file system browser.
+ * Can be used to flush a cache, etc.
+ * @since jEdit 4.0pre3
+ */
+ public void reloadDirectory(String path) {} //}}}
+
+ //{{{ createVFSSession() method
+ /**
+ * Creates a VFS session. This method is called from the AWT thread,
+ * so it should not do any I/O. It could, however, prompt for
+ * a login name and password, for example.
+ * @param path The path in question
+ * @param comp The component that will parent any dialog boxes shown
+ * @return The session. The session can be null if there were errors
+ * @since jEdit 2.6pre3
+ */
+ public Object createVFSSession(String path, Component comp)
+ {
+ return new Object();
+ } //}}}
+
+ //{{{ load() method
+ /**
+ * Loads the specified buffer. The default implementation posts
+ * an I/O request to the I/O thread.
+ * @param view The view
+ * @param buffer The buffer
+ * @param path The path
+ */
+ public boolean load(View view, Buffer buffer, String path)
+ {
+ if((getCapabilities() & READ_CAP) == 0)
+ {
+ VFSManager.error(view,path,"vfs.not-supported.load",new String[] { name });
+ return false;
+ }
+
+ Object session = createVFSSession(path,view);
+ if(session == null)
+ return false;
+
+ if((getCapabilities() & WRITE_CAP) == 0)
+ buffer.setReadOnly(true);
+
+ BufferIORequest request = new BufferLoadRequest(view, buffer, session, this, path);
+ if(buffer.isTemporary())
+ // this makes HyperSearch much faster
+ request.run();
+ else
+ // BufferLoadRequest can cause UI interations (for example FTP connection dialog),
+ // so it should be runned in Dispatch thread
+ //ThreadUtilities.runInDispatchThread(request);
+ VFSManager.runInWorkThread(request);
+
+ return true;
+ } //}}}
+
+ //{{{ save() method
+ /**
+ * Saves the specifies buffer. The default implementation posts
+ * an I/O request to the I/O thread.
+ * @param view The view
+ * @param buffer The buffer
+ * @param path The path
+ */
+ public boolean save(View view, Buffer buffer, String path)
+ {
+ if((getCapabilities() & WRITE_CAP) == 0)
+ {
+ VFSManager.error(view,path,"vfs.not-supported.save",new String[] { name });
+ return false;
+ }
+
+ Object session = createVFSSession(path,view);
+ if(session == null)
+ return false;
+
+ /* When doing a 'save as', the path to save to (path)
+ * will not be the same as the buffer's previous path
+ * (buffer.getPath()). In that case, we want to create
+ * a backup of the new path, even if the old path was
+ * backed up as well (BACKED_UP property set) */
+ if(!path.equals(buffer.getPath()))
+ buffer.unsetProperty(Buffer.BACKED_UP);
+
+ VFSManager.runInWorkThread(new BufferSaveRequest(
+ view,buffer,session,this,path));
+ return true;
+ } //}}}
+
+ //{{{ copy() methods
+ /**
+ * Copy a file to another using VFS.
+ *
+ * @param progress the progress observer. It could be null if you don't want to monitor progress. If not null
+ * you should probably launch this command in a WorkThread
+ * @param sourceVFS the source VFS
+ * @param sourceSession the VFS session
+ * @param sourcePath the source path. It must be a file and must exists
+ * @param targetVFS the target VFS
+ * @param targetSession the target session
+ * @param targetPath the target path.
+ * If it is a path, it must exists, if it is a file, the parent must
+ * exists
+ * @param comp comp The component that will parent error dialog boxes
+ * @param canStop could this copy be stopped ?
+ * @return true if the copy was successful
+ * @throws IOException IOException If an I/O error occurs
+ * @since jEdit 4.3pre3
+ */
+ public static boolean copy(ProgressObserver progress, VFS sourceVFS, Object sourceSession,String sourcePath,
+ VFS targetVFS, Object targetSession,String targetPath, Component comp, boolean canStop)
+ throws IOException
+ {
+ if (progress != null)
+ progress.setStatus("Initializing");
+
+ InputStream in = null;
+ OutputStream out = null;
+ try
+ {
+ VFSFile sourceVFSFile = sourceVFS._getFile(sourceSession, sourcePath, comp);
+ if (sourceVFSFile == null)
+ throw new FileNotFoundException("source path " + sourcePath + " doesn't exists");
+ if (progress != null)
+ {
+ progress.setMaximum(sourceVFSFile.getLength());
+ }
+ VFSFile targetVFSFile = targetVFS._getFile(targetSession, targetPath, comp);
+ if (targetVFSFile == null)
+ {
+ String parentTargetPath = MiscUtilities.getParentOfPath(targetPath);
+ VFSFile parentTargetVFSFile = targetVFS._getFile(targetSession, parentTargetPath, comp);
+ if (parentTargetVFSFile == null)
+ throw new FileNotFoundException("target path " + parentTargetPath +
+ " doesn't exists");
+ if (parentTargetVFSFile.getType() == VFSFile.DIRECTORY)
+ {
+ String targetFilename = MiscUtilities.getFileName(targetPath);
+ targetPath = MiscUtilities.constructPath(parentTargetPath, targetFilename);
+ }
+ else
+ {
+ throw new IOException("The parent of target path is a file");
+ }
+ }
+ else if (targetVFSFile.getType() == VFSFile.DIRECTORY)
+ {
+ if (targetVFSFile.getPath().equals(sourceVFSFile.getPath()))
+ return false;
+ targetPath = MiscUtilities.constructPath(targetPath, sourceVFSFile.getName());
+ }
+ in = new BufferedInputStream(sourceVFS._createInputStream(sourceSession, sourcePath, false, comp));
+ out = new BufferedOutputStream(targetVFS._createOutputStream(targetSession, targetPath, comp));
+ boolean copyResult = IOUtilities.copyStream(IOBUFSIZE, progress, in, out, canStop);
+ VFSManager.sendVFSUpdate(targetVFS, targetPath, true);
+ return copyResult;
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(in);
+ IOUtilities.closeQuietly(out);
+ }
+ }
+
+ /**
+ * Copy a file to another using VFS.
+ *
+ * @param progress the progress observer. It could be null if you don't want to monitor progress. If not null
+ * you should probably launch this command in a WorkThread
+ * @param sourcePath the source path
+ * @param targetPath the target path
+ * @param comp comp The component that will parent error dialog boxes
+ * @param canStop if true the copy can be stopped
+ * @return true if the copy was successful
+ * @throws IOException IOException If an I/O error occurs
+ * @since jEdit 4.3pre3
+ */
+ public static boolean copy(ProgressObserver progress, String sourcePath,String targetPath, Component comp, boolean canStop)
+ throws IOException
+ {
+ VFS sourceVFS = VFSManager.getVFSForPath(sourcePath);
+ Object sourceSession = sourceVFS.createVFSSession(sourcePath, comp);
+ if (sourceSession == null)
+ {
+ Log.log(Log.WARNING, VFS.class, "Unable to get a valid session from " + sourceVFS + " for path " + sourcePath);
+ return false;
+ }
+ VFS targetVFS = VFSManager.getVFSForPath(targetPath);
+ Object targetSession = targetVFS.createVFSSession(targetPath, comp);
+ if (targetSession == null)
+ {
+ Log.log(Log.WARNING, VFS.class, "Unable to get a valid session from " + targetVFS + " for path " + targetPath);
+ return false;
+ }
+ return copy(progress, sourceVFS, sourceSession, sourcePath, targetVFS, targetSession, targetPath, comp,canStop);
+ } //}}}
+
+ //{{{ insert() method
+ /**
+ * Inserts a file into the specified buffer. The default implementation
+ * posts an I/O request to the I/O thread.
+ * @param view The view
+ * @param buffer The buffer
+ * @param path The path
+ */
+ public boolean insert(View view, Buffer buffer, String path)
+ {
+ if((getCapabilities() & READ_CAP) == 0)
+ {
+ VFSManager.error(view,path,"vfs.not-supported.load",new String[] { name });
+ return false;
+ }
+
+ Object session = createVFSSession(path,view);
+ if(session == null)
+ return false;
+
+ VFSManager.runInWorkThread(new BufferInsertRequest(
+ view,buffer,session,this,path));
+ return true;
+ } //}}}
+
+ // A method name that starts with _ requires a session object
+
+ //{{{ _canonPath() method
+ /**
+ * Returns the canonical form of the specified path name. For example,
+ * <code>~</code> might be expanded to the user's home directory.
+ * @param session The session
+ * @param path The path
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurred
+ * @since jEdit 4.0pre2
+ */
+ public String _canonPath(Object session, String path, Component comp)
+ throws IOException
+ {
+ return path;
+ } //}}}
+
+ //{{{ _listDirectory() method
+ /**
+ * A convinience method that matches file names against globs, and can
+ * optionally list the directory recursively.
+ * @param session The session
+ * @param directory The directory. Note that this must be a full
+ * URL, including the host name, path name, and so on. The
+ * username and password (if needed by the VFS) is obtained from the
+ * session instance.
+ * @param glob Only file names matching this glob will be returned
+ * @param recursive If true, subdirectories will also be listed.
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurred
+ * @since jEdit 4.1pre1
+ */
+ public String[] _listDirectory(Object session, String directory,
+ String glob, boolean recursive, Component comp )
+ throws IOException
+ {
+ String[] retval = _listDirectory(session, directory, glob, recursive, comp, true, false);
+ return retval;
+ } //}}}
+
+
+ //{{{ _listDirectory() method
+ /**
+ * A convenience method that matches file names against globs, and can
+ * optionally list the directory recursively.
+ * @param session The session
+ * @param directory The directory. Note that this must be a full
+ * URL, including the host name, path name, and so on. The
+ * username and password (if needed by the VFS) is obtained from the
+ * session instance.
+ * @param glob Only file names matching this glob will be returned
+ * @param recursive If true, subdirectories will also be listed.
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurred
+ * @param skipBinary ignore binary files (do not return them).
+ * This will slow down the process since it will open the files
+ * @param skipHidden skips hidden files, directories, and
+ * backup files. Ignores any file beginning with . or #, or ending with ~
+ * or .bak
+ *
+ *
+ * @since jEdit 4.3pre5
+ */
+ public String[] _listDirectory(Object session, String directory,
+ String glob, boolean recursive, Component comp,
+ boolean skipBinary, boolean skipHidden)
+ throws IOException
+ {
+ VFSFileFilter filter = new GlobVFSFileFilter(glob);
+ return _listDirectory(session, directory, filter,
+ recursive, comp, skipBinary,
+ skipHidden);
+ } //}}}
+
+ //{{{ _listDirectory() method
+ /**
+ * A convenience method that filters the directory listing
+ * according to a filter, and can optionally list the directory
+ * recursively.
+ * @param session The session
+ * @param directory The directory. Note that this must be a full
+ * URL, including the host name, path name, and so on. The
+ * username and password (if needed by the VFS) is obtained from the
+ * session instance.
+ * @param filter The {@link VFSFileFilter} to use for filtering.
+ * @param recursive If true, subdirectories will also be listed.
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurred
+ * @param skipBinary ignore binary files (do not return them).
+ * This will slow down the process since it will open the files
+ * @param skipHidden skips hidden files, directories, and
+ * backup files. Ignores any file beginning with . or #, or ending with ~
+ * or .bak
+ *
+ * @since jEdit 4.3pre7
+ */
+ public String[] _listDirectory(Object session, String directory,
+ VFSFileFilter filter, boolean recursive, Component comp,
+ boolean skipBinary, boolean skipHidden)
+ throws IOException
+ {
+ List<String> files = new ArrayList<String>(100);
+
+ listFiles(session,new HashSet<String>(), files,directory,filter,
+ recursive, comp, skipBinary, skipHidden);
+
+ String[] retVal = files.toArray(new String[files.size()]);
+
+ Arrays.sort(retVal,new StandardUtilities.StringCompare<String>(true));
+
+ return retVal;
+ } //}}}
+
+ //{{{ _listFiles() method
+ /**
+ * Lists the specified directory.
+ * @param session The session
+ * @param directory The directory. Note that this must be a full
+ * URL, including the host name, path name, and so on. The
+ * username and password (if needed by the VFS) is obtained from the
+ * session instance.
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurred
+ * @since jEdit 4.3pre2
+ */
+ public VFSFile[] _listFiles(Object session, String directory,
+ Component comp)
+ throws IOException
+ {
+ return _listDirectory(session,directory,comp);
+ } //}}}
+
+ //{{{ _listDirectory() method
+ /**
+ * @deprecated Use <code>_listFiles()</code> instead.
+ */
+ @Deprecated
+ public DirectoryEntry[] _listDirectory(Object session, String directory,
+ Component comp)
+ throws IOException
+ {
+ VFSManager.error(comp,directory,"vfs.not-supported.list",new String[] { name });
+ return null;
+ } //}}}
+
+ //{{{ _getFile() method
+ /**
+ * Returns the specified directory entry.
+ * @param session The session get it with {@link VFS#createVFSSession(String, Component)}
+ * @param path The path
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurred
+ * @return The specified directory entry, or null if it doesn't exist.
+ * @since jEdit 4.3pre2
+ */
+ public VFSFile _getFile(Object session, String path,
+ Component comp)
+ throws IOException
+ {
+ return _getDirectoryEntry(session,path,comp);
+ } //}}}
+
+ //{{{ _getDirectoryEntry() method
+ /**
+ * Returns the specified directory entry.
+ * @param session The session get it with {@link VFS#createVFSSession(String, Component)}
+ * @param path The path
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurred
+ * @return The specified directory entry, or null if it doesn't exist.
+ * @since jEdit 2.7pre1
+ * @deprecated Use <code>_getFile()</code> instead.
+ */
+ @Deprecated
+ public DirectoryEntry _getDirectoryEntry(Object session, String path,
+ Component comp)
+ throws IOException
+ {
+ return null;
+ } //}}}
+
+ //{{{ DirectoryEntry class
+ /**
+ * @deprecated Use <code>VFSFile</code> instead.
+ */
+ @Deprecated
+ public static class DirectoryEntry extends VFSFile
+ {
+ //{{{ DirectoryEntry constructor
+ /**
+ * @since jEdit 4.2pre2
+ */
+ public DirectoryEntry()
+ {
+ } //}}}
+
+ //{{{ DirectoryEntry constructor
+ public DirectoryEntry(String name, String path, String deletePath,
+ int type, long length, boolean hidden)
+ {
+ this.name = name;
+ this.path = path;
+ this.deletePath = deletePath;
+ this.symlinkPath = path;
+ this.type = type;
+ this.length = length;
+ this.hidden = hidden;
+ if(path != null)
+ {
+ // maintain backwards compatibility
+ VFS vfs = VFSManager.getVFSForPath(path);
+ canRead = ((vfs.getCapabilities() & READ_CAP) != 0);
+ canWrite = ((vfs.getCapabilities() & WRITE_CAP) != 0);
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ _delete() method
+ /**
+ * Deletes the specified URL.
+ * @param session The VFS session
+ * @param path The path
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurs
+ * @since jEdit 2.7pre1
+ */
+ public boolean _delete(Object session, String path, Component comp)
+ throws IOException
+ {
+ return false;
+ } //}}}
+
+ //{{{ _rename() method
+ /**
+ * Renames the specified URL. Some filesystems might support moving
+ * URLs between directories, however others may not. Do not rely on
+ * this behavior.
+ * @param session The VFS session
+ * @param from The old path
+ * @param to The new path
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurs
+ * @since jEdit 2.7pre1
+ */
+ public boolean _rename(Object session, String from, String to,
+ Component comp) throws IOException
+ {
+ return false;
+ } //}}}
+
+ //{{{ _mkdir() method
+ /**
+ * Creates a new directory with the specified URL.
+ * @param session The VFS session
+ * @param directory The directory
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurs
+ * @since jEdit 2.7pre1
+ */
+ public boolean _mkdir(Object session, String directory, Component comp)
+ throws IOException
+ {
+ return false;
+ } //}}}
+
+ //{{{ _backup() method
+ /**
+ * Backs up the specified file. This should only be overriden by
+ * the local filesystem VFS.
+ * @param session The VFS session
+ * @param path The path
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurs
+ * @since jEdit 3.2pre2
+ */
+ public void _backup(Object session, String path, Component comp)
+ throws IOException
+ {
+ } //}}}
+
+ //{{{ _createInputStream() method
+ /**
+ * Creates an input stream. This method is called from the I/O
+ * thread.
+ * @param session the VFS session
+ * @param path The path
+ * @param ignoreErrors If true, file not found errors should be
+ * ignored
+ * @param comp The component that will parent error dialog boxes
+ * @return an inputstream or <code>null</code> if there was a problem
+ * @exception IOException If an I/O error occurs
+ * @since jEdit 2.7pre1
+ */
+ public InputStream _createInputStream(Object session,
+ String path, boolean ignoreErrors, Component comp)
+ throws IOException
+ {
+ VFSManager.error(comp,path,"vfs.not-supported.load",new String[] { name });
+ return null;
+ } //}}}
+
+ //{{{ _createOutputStream() method
+ /**
+ * Creates an output stream. This method is called from the I/O
+ * thread.
+ * @param session the VFS session
+ * @param path The path
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException If an I/O error occurs
+ * @since jEdit 2.7pre1
+ */
+ public OutputStream _createOutputStream(Object session,
+ String path, Component comp)
+ throws IOException
+ {
+ VFSManager.error(comp,path,"vfs.not-supported.save",new String[] { name });
+ return null;
+ } //}}}
+
+ //{{{ _saveComplete() method
+ /**
+ * Called after a file has been saved.
+ * @param session The VFS session
+ * @param buffer The buffer
+ * @param path The path the buffer was saved to (can be different from
+ * {@link org.gjt.sp.jedit.Buffer#getPath()} if the user invoked the
+ * <b>Save a Copy As</b> command, for example).
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException If an I/O error occurs
+ * @since jEdit 4.1pre9
+ */
+ public void _saveComplete(Object session, Buffer buffer, String path,
+ Component comp) throws IOException {} //}}}
+
+ //{{{ _finishTwoStageSave() method
+ /**
+ * Called after a file has been saved and we use twoStageSave (first saving to
+ * another file). This should re-apply permissions for example.
+
+ * @param session The VFS session
+ * @param buffer The buffer
+ * @param path The path the buffer was saved to (can be different from
+ * {@link org.gjt.sp.jedit.Buffer#getPath()} if the user invoked the
+ * <b>Save a Copy As</b> command, for example).
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException If an I/O error occurs
+ * @since jEdit 4.3pre4
+ */
+ public void _finishTwoStageSave(Object session, Buffer buffer, String path,
+ Component comp) throws IOException
+ {
+ } //}}}
+
+ //{{{ _endVFSSession() method
+ /**
+ * Finishes the specified VFS session. This must be called
+ * after all I/O with this VFS is complete, to avoid leaving
+ * stale network connections and such.
+ * @param session The VFS session
+ * @param comp The component that will parent error dialog boxes
+ * @exception IOException if an I/O error occurred
+ * @since jEdit 2.7pre1
+ */
+ public void _endVFSSession(Object session, Component comp)
+ throws IOException
+ {
+ } //}}}
+
+ //{{{ getDefaultColorFor() method
+ /**
+ * Returns color of the specified file name, by matching it against
+ * user-specified regular expressions.
+ * @since jEdit 4.0pre1
+ */
+ public static Color getDefaultColorFor(String name)
+ {
+ synchronized(lock)
+ {
+ if(colors == null)
+ loadColors();
+
+ for(int i = 0; i < colors.size(); i++)
+ {
+ ColorEntry entry = colors.get(i);
+ if(entry.re.matcher(name).matches())
+ return entry.color;
+ }
+
+ return null;
+ }
+ } //}}}
+
+ //{{{ DirectoryEntryCompare class
+ /**
+ * Implementation of {@link Comparator}
+ * interface that compares {@link VFS.DirectoryEntry} instances.
+ * @since jEdit 4.2pre1
+ */
+ public static class DirectoryEntryCompare implements Comparator<VFSFile>
+ {
+ private boolean sortIgnoreCase, sortMixFilesAndDirs;
+
+ /**
+ * Creates a new <code>DirectoryEntryCompare</code>.
+ * @param sortMixFilesAndDirs If false, directories are
+ * put at the top of the listing.
+ * @param sortIgnoreCase If false, upper case comes before
+ * lower case.
+ */
+ public DirectoryEntryCompare(boolean sortMixFilesAndDirs,
+ boolean sortIgnoreCase)
+ {
+ this.sortMixFilesAndDirs = sortMixFilesAndDirs;
+ this.sortIgnoreCase = sortIgnoreCase;
+ }
+
+ public int compare(VFSFile file1, VFSFile file2)
+ {
+ if(!sortMixFilesAndDirs)
+ {
+ if(file1.getType() != file2.getType())
+ return file2.getType() - file1.getType();
+ }
+
+ return StandardUtilities.compareStrings(file1.getName(),
+ file2.getName(),sortIgnoreCase);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private String name;
+ private int caps;
+ private String[] extAttrs;
+ private static List<ColorEntry> colors;
+ private static final Object lock = new Object();
+
+ //{{{ Class initializer
+ static
+ {
+ EditBus.addToBus(new EBComponent()
+ {
+ public void handleMessage(EBMessage msg)
+ {
+ if(msg instanceof PropertiesChanged)
+ {
+ synchronized(lock)
+ {
+ colors = null;
+ }
+ }
+ }
+ });
+ } //}}}
+
+ //{{{ recursive listFiles() method
+ private void listFiles(Object session, Collection<String> stack,
+ List<String> files, String directory, VFSFileFilter filter, boolean recursive,
+ Component comp, boolean skipBinary, boolean skipHidden) throws IOException
+ {
+ String resolvedPath = directory;
+ if (recursive && !MiscUtilities.isURL(directory))
+ {
+ resolvedPath = MiscUtilities.resolveSymlinks(directory);
+ /*
+ * If looking at a symlink, do not traverse the
+ * resolved path more than once.
+ */
+ if (!directory.equals(resolvedPath))
+ {
+ if (stack.contains(resolvedPath))
+ {
+ Log.log(Log.ERROR,this,
+ "Recursion in listFiles(): "
+ + directory);
+ return;
+ }
+ stack.add(resolvedPath);
+ }
+ }
+
+ Thread ct = Thread.currentThread();
+ WorkThread wt = null;
+ if (ct instanceof WorkThread)
+ {
+ wt = (WorkThread) ct;
+ }
+
+
+ VFSFile[] _files = _listFiles(session,directory,
+ comp);
+ if(_files == null || _files.length == 0)
+ return;
+
+ for(int i = 0; i < _files.length; i++)
+ {
+ if (wt != null && wt.isAborted() || ct.isInterrupted())
+ break;
+ VFSFile file = _files[i];
+ if (skipHidden && (file.isHidden() || MiscUtilities.isBackup(file.getName())))
+ continue;
+ if(!filter.accept(file))
+ continue;
+ if(file.getType() == VFSFile.DIRECTORY
+ || file.getType() == VFSFile.FILESYSTEM)
+ {
+ if(recursive)
+ {
+ String canonPath = _canonPath(session,
+ file.getPath(),comp);
+ listFiles(session,stack,files,
+ canonPath,filter,recursive,
+ comp, skipBinary, skipHidden);
+ }
+ }
+ else // It's a regular file
+ {
+ if (skipBinary)
+ {
+ try
+ {
+ if (file.isBinary(session))
+ {
+ Log.log(Log.NOTICE,this
+ ,file.getPath() + ": skipped as a binary file");
+ continue;
+ }
+ }
+ catch(IOException e)
+ {
+ Log.log(Log.ERROR,this,e);
+ // may be not binary...
+ }
+ }
+ files.add(file.getPath());
+ }
+ }
+ } //}}}
+
+ //{{{ loadColors() method
+ private static void loadColors()
+ {
+ synchronized(lock)
+ {
+ colors = new ArrayList<ColorEntry>();
+
+ if(!jEdit.getBooleanProperty("vfs.browser.colorize"))
+ return;
+
+ String glob;
+ int i = 0;
+ while((glob = jEdit.getProperty("vfs.browser.colors." + i + ".glob")) != null)
+ {
+ try
+ {
+ colors.add(new ColorEntry(
+ Pattern.compile(StandardUtilities.globToRE(glob)),
+ jEdit.getColorProperty(
+ "vfs.browser.colors." + i + ".color",
+ Color.black)));
+ }
+ catch(PatternSyntaxException e)
+ {
+ Log.log(Log.ERROR,VFS.class,"Invalid regular expression: " + glob);
+ Log.log(Log.ERROR,VFS.class,e);
+ }
+
+ i++;
+ }
+ }
+ } //}}}
+
+ //{{{ ColorEntry class
+ private static class ColorEntry
+ {
+ Pattern re;
+ Color color;
+
+ ColorEntry(Pattern re, Color color)
+ {
+ this.re = re;
+ this.color = color;
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/VFSFile.java b/jEdit/org/gjt/sp/jedit/io/VFSFile.java
index e9407a5..135db6b 100644
--- a/jEdit/org/gjt/sp/jedit/io/VFSFile.java
+++ b/jEdit/org/gjt/sp/jedit/io/VFSFile.java
@@ -1,507 +1,517 @@
-/*
- * VFSFile.java - A file residing on a virtual file system
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2005 Slava Pestov
- * Portions copyright (C) 2007 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.awt.Color;
-import java.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.browser.VFSBrowser;
-import org.gjt.sp.jedit.browser.FileCellRenderer;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.IOUtilities;
-
-import javax.swing.*;
-//}}}
-
-/**
- * A directory entry returned from a file listing.
- * @since jEdit 4.3pre2
- */
-public class VFSFile implements Serializable
-{
- //{{{ findCompletion() method
- /**
- * Return the index of a file whose name matches the given string,
- * in a case-insensitive manner. Exact matches are preferred.
- * @param files The list of files
- * @param start The start index, inclusive
- * @param end The end index, exclusive
- * @param str The string to match
- * @param dirsOnly Only match directories?
- * @since jEdit 4.3pre3
- */
- public static int findCompletion(VFSFile[] files, int start, int end,
- String str, boolean dirsOnly)
- {
- for(int i = start; i < end; i++)
- {
- VFSFile file = files[i];
- String matchAgainst = (MiscUtilities.isAbsolutePath(str)
- ? file.getPath() : file.getName());
-
- if(dirsOnly && file.getType() == FILE)
- continue;
- /* try exact match first */
- else if(matchAgainst.equals(str))
- return i;
- else if(matchAgainst.regionMatches(true,0,str,0,str.length()))
- return i;
- }
-
- return -1;
- } //}}}
-
- //{{{ findCompletion() method
- public static String findCompletion(String path, String complete,
- VFSBrowser browser, boolean dirsOnly)
- {
- Log.log(Log.DEBUG,VFSFile.class,"findCompletion(" + path + ',' + complete
- + ',' + dirsOnly + ')');
-
- if(complete.equals("~"))
- return System.getProperty("user.home");
- else if(complete.equals("-"))
- return browser.getView().getBuffer().getDirectory();
- else if(complete.equals(".."))
- return MiscUtilities.getParentOfPath(path);
-
- if(MiscUtilities.isAbsolutePath(complete))
- {
- if(MiscUtilities.isURL(complete))
- return complete;
- else
- path = "roots:";
- }
-
- VFS vfs = VFSManager.getVFSForPath(path);
- if((vfs.getCapabilities() & VFS.LOW_LATENCY_CAP) == 0)
- return null;
- Object session = vfs.createVFSSession(path,browser);
- if(session == null)
- return null;
-
- try
- {
- VFSFile[] files = vfs._listFiles(session,path,browser);
- int index = findCompletion(files,0,files.length,complete,dirsOnly);
- if(index != -1)
- return files[index].path;
- }
- catch(IOException e)
- {
- VFSManager.error(e,path,browser);
- }
- finally
- {
- try
- {
- vfs._endVFSSession(session,browser);
- }
- catch(IOException e)
- {
- VFSManager.error(e,path,browser);
- }
- }
-
- return null;
- } //}}}
-
- //{{{ getIcon() method
- /**
- * Returns the icon for the file.
- *
- * @since jEdit 4.3pre9
- */
- public final Icon getIcon(boolean expanded)
- {
- return getIcon(expanded, jEdit._getBuffer(getSymlinkPath()) != null);
- } //}}}
-
- //{{{ getIcon() method
- /**
- * Returns the icon for the file.
- * Implementations of File system browsers can override this method
- *
- * @since jEdit 4.3pre9
- */
- public Icon getIcon(boolean expanded, boolean openBuffer)
- {
- return getDefaultIcon(expanded, openBuffer);
- } //}}}
-
- //{{{ getDefaultIcon() method
- /**
- * Returns the default icon for the file.
- *
- * @since jEdit 4.3pre9
- */
- public final Icon getDefaultIcon(boolean expanded, boolean openBuffer)
- {
- if(getType() == DIRECTORY)
- return expanded ? FileCellRenderer.openDirIcon : FileCellRenderer.dirIcon;
- else if(getType() == FILESYSTEM)
- return FileCellRenderer.filesystemIcon;
- else if(openBuffer)
- return FileCellRenderer.openFileIcon;
- else
- return FileCellRenderer.fileIcon;
- } //}}}
-
- //{{{ getDefaultIcon() method
- /**
- * Returns the default icon of the file.
- *
- * @return the default icon of the file
- * @since jEdit 4.3pre9
- */
- public final Icon getDefaultIcon(boolean expanded)
- {
- return getDefaultIcon(expanded, jEdit._getBuffer(getSymlinkPath()) != null);
- } //}}}
-
- //{{{ File types
- public static final int FILE = 0;
- public static final int DIRECTORY = 1;
- public static final int FILESYSTEM = 2;
- //}}}
-
- //{{{ Instance variables
- /**
- * @deprecated Use the accessor/mutator methods instead.
- */
- public String name;
- /**
- * @deprecated Use the accessor/mutator methods instead.
- */
- public String path;
- /**
- * @deprecated Use the accessor/mutator methods instead.
- */
- public String symlinkPath;
- /**
- * @deprecated Use the accessor/mutator methods instead.
- */
- public String deletePath;
- /**
- * @deprecated Use the accessor/mutator methods instead.
- */
- public int type;
- /**
- * @deprecated Use the accessor/mutator methods instead.
- */
- public long length;
- /**
- * @deprecated Use the accessor/mutator methods instead.
- */
- public boolean hidden;
- /**
- * @deprecated Use the accessor/mutator methods instead.
- */
- public boolean canRead;
- /**
- * @deprecated Use the accessor/mutator methods instead.
- */
- public boolean canWrite;
- //}}}
-
- //{{{ VFSFile constructor
- /**
- * @since jEdit 4.3pre2
- */
- public VFSFile()
- {
- } //}}}
-
- //{{{ VFSFile constructor
- public VFSFile(String name, String path, String deletePath,
- int type, long length, boolean hidden)
- {
- this.name = name;
- this.path = path;
- this.deletePath = deletePath;
- this.symlinkPath = path;
- this.type = type;
- this.length = length;
- this.hidden = hidden;
- if(path != null)
- {
- // maintain backwards compatibility
- VFS vfs = VFSManager.getVFSForPath(path);
- canRead = ((vfs.getCapabilities() & VFS.READ_CAP) != 0);
- canWrite = ((vfs.getCapabilities() & VFS.WRITE_CAP) != 0);
- }
- } //}}}
-
- //{{{ getVFS() method
- /**
- * @return The originating virtual file system of this file.
- */
- public VFS getVFS()
- {
- return VFSManager.getVFSForPath(path);
- } //}}}
-
- //{{{ getName() method
- public String getName()
- {
- return name;
- } //}}}
-
- //{{{ setName() method
- public void setName(String name)
- {
- this.name = name;
- } //}}}
-
- //{{{ isBinary() method
- /**
- * Check if a file is binary file.
- *
- * @param session the VFS session
- * @return <code>true</code> if the file was detected as binary
- * @throws IOException IOException If an I/O error occurs
- * @since jEdit 4.3pre5
- */
- public boolean isBinary(Object session)
- throws IOException
- {
- InputStream in = getVFS()._createInputStream(session,getPath(),
- false,jEdit.getActiveView());
- if(in == null)
- throw new IOException("Unable to get a Stream for this file "+this);
-
- try
- {
- return MiscUtilities.isBinary(in);
- }
- finally
- {
- IOUtilities.closeQuietly(in);
- }
- } //}}}
-
- //{{{ getPath() method
- public String getPath()
- {
- return path;
- } //}}}
-
- //{{{ setPath() method
- public void setPath(String path)
- {
- this.path = path;
- } //}}}
-
- //{{{ getSymlinkPath() method
- public String getSymlinkPath()
- {
- return symlinkPath;
- } //}}}
-
- //{{{ setSymlinkPath() method
- public void setSymlinkPath(String symlinkPath)
- {
- this.symlinkPath = symlinkPath;
- } //}}}
-
- //{{{ getDeletePath() method
- public String getDeletePath()
- {
- return deletePath;
- } //}}}
-
- //{{{ setDeletePath() method
- public void setDeletePath(String deletePath)
- {
- this.deletePath = deletePath;
- } //}}}
-
- //{{{ getType() method
- public int getType()
- {
- return type;
- } //}}}
-
- //{{{ setType() method
- public void setType(int type)
- {
- this.type = type;
- } //}}}
-
- //{{{ getLength() method
- public long getLength()
- {
- return length;
- } //}}}
-
- //{{{ setLength() method
- public void setLength(long length)
- {
- this.length = length;
- } //}}}
-
- //{{{ isHidden() method
- public boolean isHidden()
- {
- return hidden;
- } //}}}
-
- //{{{ setHidden() method
- public void setHidden(boolean hidden)
- {
- this.hidden = hidden;
- } //}}}
-
- //{{{ isReadable() method
- public boolean isReadable()
- {
- return canRead;
- } //}}}
-
- //{{{ setReadable() method
- public void setReadable(boolean canRead)
- {
- this.canRead = canRead;
- } //}}}
-
- //{{{ isWriteable() method
- public boolean isWriteable()
- {
- return canWrite;
- } //}}}
-
- //{{{ setWriteable() method
- public void setWriteable(boolean canWrite)
- {
- this.canWrite = canWrite;
- } //}}}
-
- protected boolean colorCalculated;
- protected Color color;
-
- //{{{ getExtendedAttribute() method
- /**
- * Returns the value of an extended attribute. Note that this
- * returns formatted strings (eg, "10 Mb" for a file size of
- * 1048576 bytes). If you need access to the raw data, access
- * fields and methods of this class.
- * @param name The extended attribute name
- * @since jEdit 4.2pre1
- */
- public String getExtendedAttribute(String name)
- {
- if(name.equals(VFS.EA_TYPE))
- {
- switch(getType())
- {
- case FILE:
- return jEdit.getProperty("vfs.browser.type.file");
- case DIRECTORY:
- return jEdit.getProperty("vfs.browser.type.directory");
- case FILESYSTEM:
- return jEdit.getProperty("vfs.browser.type.filesystem");
- default:
- throw new IllegalArgumentException();
- }
- }
- else if(name.equals(VFS.EA_STATUS))
- {
- if(isReadable())
- {
- if(isWriteable())
- return jEdit.getProperty("vfs.browser.status.rw");
- else
- return jEdit.getProperty("vfs.browser.status.ro");
- }
- else
- {
- if(isWriteable())
- return jEdit.getProperty("vfs.browser.status.append");
- else
- return jEdit.getProperty("vfs.browser.status.no");
- }
- }
- else if(name.equals(VFS.EA_SIZE))
- {
- if(getType() != FILE)
- return null;
- else
- return MiscUtilities.formatFileSize(getLength());
- }
- else
- return null;
- } //}}}
-
- //{{{ getColor() method
- /**
- * Returns the color that will be used to display the file.
- *
- * @return the color of the file
- */
- public Color getColor()
- {
- if(!colorCalculated)
- {
- colorCalculated = true;
- color = VFS.getDefaultColorFor(name);
- }
-
- return color;
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- return name;
- } //}}}
-
- //{{{ fetchedAttrs() method
- /**
- * Returns true if the attributes are already fetched.
- *
- * @see #fetchAttrs()
- * @return <code>true</code> if the attributes are already fetched
- */
- protected boolean fetchedAttrs()
- {
- return fetchedAttrs;
- } //}}}
-
- //{{{ fetchAttrs() method
- /**
- * Fetch some attributes of the file.
- * Some attributes are not fetched during
- * file initialization because it takes time.
- * They are fetched here.
- * VFS implementation should overwrite this
- */
- protected void fetchAttrs()
- {
- fetchedAttrs = true;
- } //}}}
-
- /** This is true if the attributes are already fetched. */
- private boolean fetchedAttrs;
-}
+/*
+ * VFSFile.java - A file residing on a virtual file system
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2005 Slava Pestov
+ * Portions copyright (C) 2007 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import java.awt.Color;
+import java.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.browser.VFSBrowser;
+import org.gjt.sp.jedit.browser.FileCellRenderer;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.StandardUtilities;
+
+import javax.swing.*;
+//}}}
+
+/**
+ * A directory entry returned from a file listing.
+ * @since jEdit 4.3pre2
+ */
+public class VFSFile implements Serializable
+{
+ //{{{ findCompletion() method
+ /**
+ * Return the index of a file whose name matches the given string,
+ * in a case-insensitive manner. Exact matches are preferred.
+ * @param files The list of files
+ * @param start The start index, inclusive
+ * @param end The end index, exclusive
+ * @param str The string to match
+ * @param dirsOnly Only match directories?
+ * @since jEdit 4.3pre3
+ */
+ public static int findCompletion(VFSFile[] files, int start, int end,
+ String str, boolean dirsOnly)
+ {
+ for(int i = start; i < end; i++)
+ {
+ VFSFile file = files[i];
+ String matchAgainst = (MiscUtilities.isAbsolutePath(str)
+ ? file.getPath() : file.getName());
+
+ if(dirsOnly && file.getType() == FILE)
+ continue;
+ /* try exact match first */
+ else if(matchAgainst.equals(str))
+ return i;
+ else if(matchAgainst.regionMatches(true,0,str,0,str.length()))
+ return i;
+ }
+
+ return -1;
+ } //}}}
+
+ //{{{ findCompletion() method
+ public static String findCompletion(String path, String complete,
+ VFSBrowser browser, boolean dirsOnly)
+ {
+ Log.log(Log.DEBUG,VFSFile.class,"findCompletion(" + path + ',' + complete
+ + ',' + dirsOnly + ')');
+
+ if(complete.equals("~"))
+ return System.getProperty("user.home");
+ else if(complete.equals("-"))
+ return browser.getView().getBuffer().getDirectory();
+ else if(complete.equals(".."))
+ return MiscUtilities.getParentOfPath(path);
+
+ if(MiscUtilities.isAbsolutePath(complete))
+ {
+ if(MiscUtilities.isURL(complete))
+ return complete;
+ else
+ path = "roots:";
+ }
+
+ VFS vfs = VFSManager.getVFSForPath(path);
+ if((vfs.getCapabilities() & VFS.LOW_LATENCY_CAP) == 0)
+ return null;
+ Object session = vfs.createVFSSession(path,browser);
+ if(session == null)
+ return null;
+
+ try
+ {
+ VFSFile[] files = vfs._listFiles(session,path,browser);
+ int index = findCompletion(files,0,files.length,complete,dirsOnly);
+ if(index != -1)
+ return files[index].path;
+ }
+ catch(IOException e)
+ {
+ VFSManager.error(e,path,browser);
+ }
+ finally
+ {
+ try
+ {
+ vfs._endVFSSession(session,browser);
+ }
+ catch(IOException e)
+ {
+ VFSManager.error(e,path,browser);
+ }
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ getIcon() method
+ /**
+ * Returns the icon for the file.
+ *
+ * @since jEdit 4.3pre9
+ */
+ public final Icon getIcon(boolean expanded)
+ {
+ return getIcon(expanded, jEdit._getBuffer(getSymlinkPath()) != null);
+ } //}}}
+
+ //{{{ getIcon() method
+ /**
+ * Returns the icon for the file.
+ * Implementations of File system browsers can override this method
+ *
+ * @since jEdit 4.3pre9
+ */
+ public Icon getIcon(boolean expanded, boolean openBuffer)
+ {
+ return getDefaultIcon(expanded, openBuffer);
+ } //}}}
+
+ //{{{ getDefaultIcon() method
+ /**
+ * Returns the default icon for the file.
+ *
+ * @since jEdit 4.3pre9
+ */
+ public final Icon getDefaultIcon(boolean expanded, boolean openBuffer)
+ {
+ if(getType() == DIRECTORY)
+ return expanded ? FileCellRenderer.openDirIcon : FileCellRenderer.dirIcon;
+ else if(getType() == FILESYSTEM)
+ return FileCellRenderer.filesystemIcon;
+ else if(openBuffer)
+ return FileCellRenderer.openFileIcon;
+ else
+ return FileCellRenderer.fileIcon;
+ } //}}}
+
+ //{{{ getDefaultIcon() method
+ /**
+ * Returns the default icon of the file.
+ *
+ * @return the default icon of the file
+ * @since jEdit 4.3pre9
+ */
+ public final Icon getDefaultIcon(boolean expanded)
+ {
+ return getDefaultIcon(expanded, jEdit._getBuffer(getSymlinkPath()) != null);
+ } //}}}
+
+ //{{{ File types
+ public static final int FILE = 0;
+ public static final int DIRECTORY = 1;
+ public static final int FILESYSTEM = 2;
+ //}}}
+
+ //{{{ Instance variables
+ /**
+ * @deprecated Use the accessor/mutator methods instead.
+ */
+ @Deprecated
+ public String name;
+ /**
+ * @deprecated Use the accessor/mutator methods instead.
+ */
+ @Deprecated
+ public String path;
+ /**
+ * @deprecated Use the accessor/mutator methods instead.
+ */
+ @Deprecated
+ public String symlinkPath;
+ /**
+ * @deprecated Use the accessor/mutator methods instead.
+ */
+ @Deprecated
+ public String deletePath;
+ /**
+ * @deprecated Use the accessor/mutator methods instead.
+ */
+ @Deprecated
+ public int type;
+ /**
+ * @deprecated Use the accessor/mutator methods instead.
+ */
+ @Deprecated
+ public long length;
+ /**
+ * @deprecated Use the accessor/mutator methods instead.
+ */
+ @Deprecated
+ public boolean hidden;
+ /**
+ * @deprecated Use the accessor/mutator methods instead.
+ */
+ @Deprecated
+ public boolean canRead;
+ /**
+ * @deprecated Use the accessor/mutator methods instead.
+ */
+ @Deprecated
+ public boolean canWrite;
+ //}}}
+
+ //{{{ VFSFile constructor
+ /**
+ * @since jEdit 4.3pre2
+ */
+ public VFSFile()
+ {
+ } //}}}
+
+ //{{{ VFSFile constructor
+ public VFSFile(String name, String path, String deletePath,
+ int type, long length, boolean hidden)
+ {
+ this.name = name;
+ this.path = path;
+ this.deletePath = deletePath;
+ this.symlinkPath = path;
+ this.type = type;
+ this.length = length;
+ this.hidden = hidden;
+ if(path != null)
+ {
+ // maintain backwards compatibility
+ VFS vfs = VFSManager.getVFSForPath(path);
+ canRead = ((vfs.getCapabilities() & VFS.READ_CAP) != 0);
+ canWrite = ((vfs.getCapabilities() & VFS.WRITE_CAP) != 0);
+ }
+ } //}}}
+
+ //{{{ getVFS() method
+ /**
+ * @return The originating virtual file system of this file.
+ */
+ public VFS getVFS()
+ {
+ return VFSManager.getVFSForPath(path);
+ } //}}}
+
+ //{{{ getName() method
+ public String getName()
+ {
+ return name;
+ } //}}}
+
+ //{{{ setName() method
+ public void setName(String name)
+ {
+ this.name = name;
+ } //}}}
+
+ //{{{ isBinary() method
+ /**
+ * Check if a file is binary file.
+ *
+ * @param session the VFS session
+ * @return <code>true</code> if the file was detected as binary
+ * @throws IOException IOException If an I/O error occurs
+ * @since jEdit 4.3pre5
+ */
+ public boolean isBinary(Object session)
+ throws IOException
+ {
+ InputStream in = getVFS()._createInputStream(session,getPath(),
+ false,jEdit.getActiveView());
+ if(in == null)
+ throw new IOException("Unable to get a Stream for this file "+this);
+
+ try
+ {
+ return MiscUtilities.isBinary(in);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(in);
+ }
+ } //}}}
+
+ //{{{ getPath() method
+ public String getPath()
+ {
+ return path;
+ } //}}}
+
+ //{{{ setPath() method
+ public void setPath(String path)
+ {
+ this.path = path;
+ } //}}}
+
+ //{{{ getSymlinkPath() method
+ public String getSymlinkPath()
+ {
+ return symlinkPath;
+ } //}}}
+
+ //{{{ setSymlinkPath() method
+ public void setSymlinkPath(String symlinkPath)
+ {
+ this.symlinkPath = symlinkPath;
+ } //}}}
+
+ //{{{ getDeletePath() method
+ public String getDeletePath()
+ {
+ return deletePath;
+ } //}}}
+
+ //{{{ setDeletePath() method
+ public void setDeletePath(String deletePath)
+ {
+ this.deletePath = deletePath;
+ } //}}}
+
+ //{{{ getType() method
+ public int getType()
+ {
+ return type;
+ } //}}}
+
+ //{{{ setType() method
+ public void setType(int type)
+ {
+ this.type = type;
+ } //}}}
+
+ //{{{ getLength() method
+ public long getLength()
+ {
+ return length;
+ } //}}}
+
+ //{{{ setLength() method
+ public void setLength(long length)
+ {
+ this.length = length;
+ } //}}}
+
+ //{{{ isHidden() method
+ public boolean isHidden()
+ {
+ return hidden;
+ } //}}}
+
+ //{{{ setHidden() method
+ public void setHidden(boolean hidden)
+ {
+ this.hidden = hidden;
+ } //}}}
+
+ //{{{ isReadable() method
+ public boolean isReadable()
+ {
+ return canRead;
+ } //}}}
+
+ //{{{ setReadable() method
+ public void setReadable(boolean canRead)
+ {
+ this.canRead = canRead;
+ } //}}}
+
+ //{{{ isWriteable() method
+ public boolean isWriteable()
+ {
+ return canWrite;
+ } //}}}
+
+ //{{{ setWriteable() method
+ public void setWriteable(boolean canWrite)
+ {
+ this.canWrite = canWrite;
+ } //}}}
+
+ protected boolean colorCalculated;
+ protected Color color;
+
+ //{{{ getExtendedAttribute() method
+ /**
+ * Returns the value of an extended attribute. Note that this
+ * returns formatted strings (eg, "10 Mb" for a file size of
+ * 1048576 bytes). If you need access to the raw data, access
+ * fields and methods of this class.
+ * @param name The extended attribute name
+ * @since jEdit 4.2pre1
+ */
+ public String getExtendedAttribute(String name)
+ {
+ if(name.equals(VFS.EA_TYPE))
+ {
+ switch(getType())
+ {
+ case FILE:
+ return jEdit.getProperty("vfs.browser.type.file");
+ case DIRECTORY:
+ return jEdit.getProperty("vfs.browser.type.directory");
+ case FILESYSTEM:
+ return jEdit.getProperty("vfs.browser.type.filesystem");
+ default:
+ throw new IllegalArgumentException();
+ }
+ }
+ else if(name.equals(VFS.EA_STATUS))
+ {
+ if(isReadable())
+ {
+ if(isWriteable())
+ return jEdit.getProperty("vfs.browser.status.rw");
+ else
+ return jEdit.getProperty("vfs.browser.status.ro");
+ }
+ else
+ {
+ if(isWriteable())
+ return jEdit.getProperty("vfs.browser.status.append");
+ else
+ return jEdit.getProperty("vfs.browser.status.no");
+ }
+ }
+ else if(name.equals(VFS.EA_SIZE))
+ {
+ if(getType() != FILE)
+ return null;
+ else
+ return StandardUtilities.formatFileSize(getLength());
+ }
+ else
+ return null;
+ } //}}}
+
+ //{{{ getColor() method
+ /**
+ * Returns the color that will be used to display the file.
+ *
+ * @return the color of the file
+ */
+ public Color getColor()
+ {
+ if(!colorCalculated)
+ {
+ colorCalculated = true;
+ color = VFS.getDefaultColorFor(name);
+ }
+
+ return color;
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return name;
+ } //}}}
+
+ //{{{ fetchedAttrs() method
+ /**
+ * Returns true if the attributes are already fetched.
+ *
+ * @see #fetchAttrs()
+ * @return <code>true</code> if the attributes are already fetched
+ */
+ protected boolean fetchedAttrs()
+ {
+ return fetchedAttrs;
+ } //}}}
+
+ //{{{ fetchAttrs() method
+ /**
+ * Fetch some attributes of the file.
+ * Some attributes are not fetched during
+ * file initialization because it takes time.
+ * They are fetched here.
+ * VFS implementation should overwrite this
+ */
+ protected void fetchAttrs()
+ {
+ fetchedAttrs = true;
+ } //}}}
+
+ /** This is true if the attributes are already fetched. */
+ private boolean fetchedAttrs;
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/VFSFileFilter.java b/jEdit/org/gjt/sp/jedit/io/VFSFileFilter.java
index 51138c9..78dfaa4 100644
--- a/jEdit/org/gjt/sp/jedit/io/VFSFileFilter.java
+++ b/jEdit/org/gjt/sp/jedit/io/VFSFileFilter.java
@@ -1,57 +1,57 @@
-/*
- * VFSFileFilter.java - A file filter for the VFS Browser.
- * :tabSize=4:indentSize=4:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Marcelo Vanzin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-/**
- * An interface similar to <code>java.io.FilenameFilter</code>, that
- * is used by {@link org.gjt.sp.jedit.browser.VFSBrowser} to define what
- * files to show in the directory view.
- *
- * @author Marcelo Vanzin
- * @version $Id$
- * @since jEdit 4.3pre7
- */
-public interface VFSFileFilter
-{
- public static final String SERVICE_NAME = VFSFileFilter.class.getName();
-
- /**
- * Should return whether the entry represented by the given URL
- * should be listed in the browser view.
- */
- public boolean accept(VFSFile file);
-
- /**
- * Same thing as {@link #accept(VFSFile)} above, but operates on
- * the raw URL instead of a VFSFile object.
- */
- public boolean accept(String url);
-
- /**
- * Returns the description of the filter, to be used in the
- * VFSBrowser window.
- */
- public String getDescription();
-
-}
-
+/*
+ * VFSFileFilter.java - A file filter for the VFS Browser.
+ * :tabSize=4:indentSize=4:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Marcelo Vanzin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+/**
+ * An interface similar to <code>java.io.FilenameFilter</code>, that
+ * is used by {@link org.gjt.sp.jedit.browser.VFSBrowser} to define what
+ * files to show in the directory view.
+ *
+ * @author Marcelo Vanzin
+ * @version $Id$
+ * @since jEdit 4.3pre7
+ */
+public interface VFSFileFilter
+{
+ public static final String SERVICE_NAME = VFSFileFilter.class.getName();
+
+ /**
+ * Should return whether the entry represented by the given URL
+ * should be listed in the browser view.
+ */
+ public boolean accept(VFSFile file);
+
+ /**
+ * Same thing as {@link #accept(VFSFile)} above, but operates on
+ * the raw URL instead of a VFSFile object.
+ */
+ public boolean accept(String url);
+
+ /**
+ * Returns the description of the filter, to be used in the
+ * VFSBrowser window.
+ */
+ public String getDescription();
+
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/io/VFSManager.java b/jEdit/org/gjt/sp/jedit/io/VFSManager.java
index 1da3e24..67d0398 100644
--- a/jEdit/org/gjt/sp/jedit/io/VFSManager.java
+++ b/jEdit/org/gjt/sp/jedit/io/VFSManager.java
@@ -1,470 +1,476 @@
-/*
- * VFSManager.java - Main class of virtual filesystem
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import javax.swing.JOptionPane;
-import javax.swing.SwingUtilities;
-import java.awt.Component;
-import java.awt.Frame;
-import java.io.IOException;
-import java.util.*;
-
-import org.gjt.sp.jedit.gui.ErrorListDialog;
-import org.gjt.sp.jedit.msg.VFSUpdate;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.WorkThreadPool;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * jEdit's virtual filesystem allows it to transparently edit files
- * stored elsewhere than the local filesystem, for example on an FTP
- * site. See the {@link VFS} class for implementation details.<p>
- *
- * Note that most of the jEdit API is not thread-safe, so special care
- * must be taken when making jEdit API calls. Also, it is not safe to
- * call <code>SwingUtilities.invokeAndWait()</code> from a work request;
- * it can cause a deadlock if the given runnable then later calls
- * {@link #waitForRequests()}.
- *
- * @author Slava Pestov
- * @version $Id: VFSManager.java 14125 2008-12-01 10:06:24Z kpouer $
- */
-public class VFSManager
-{
- /**
- * The service type. See {@link org.gjt.sp.jedit.ServiceManager}.
- * @since jEdit 4.2pre1
- */
- public static final String SERVICE = "org.gjt.sp.jedit.io.VFS";
-
- //{{{ init() method
- /**
- * Do not call.
- */
- public static void init()
- {
- int count = jEdit.getIntegerProperty("ioThreadCount",4);
- ioThreadPool = new WorkThreadPool("jEdit I/O",count);
- JARClassLoader classLoader = new JARClassLoader();
- for(int i = 0; i < ioThreadPool.getThreadCount(); i++)
- {
- ioThreadPool.getThread(i).setContextClassLoader(
- classLoader);
- }
- } //}}}
-
- //{{{ start() method
- /**
- * Do not call.
- */
- public static void start()
- {
- ioThreadPool.start();
- } //}}}
-
- //{{{ VFS methods
-
- //{{{ getFileVFS() method
- /**
- * Returns the local filesystem VFS.
- * @since jEdit 2.5pre1
- */
- public static VFS getFileVFS()
- {
- return fileVFS;
- } //}}}
-
- //{{{ getUrlVFS() method
- /**
- * Returns the URL VFS.
- * @since jEdit 2.5pre1
- */
- public static VFS getUrlVFS()
- {
- return urlVFS;
- } //}}}
-
- //{{{ getVFSByName() method
- /**
- * @deprecated Use <code>getVFSForProtocol()</code> instead.
- */
- public static VFS getVFSByName(String name)
- {
- // in new api, protocol always equals name
- VFS vfs = (VFS)ServiceManager.getService(SERVICE,name);
- if(vfs == null)
- return vfsHash.get(name);
- else
- return vfs;
- } //}}}
-
- //{{{ getVFSForProtocol() method
- /**
- * Returns the VFS for the specified protocol.
- * @param protocol The protocol
- * @since jEdit 2.5pre1
- */
- public static VFS getVFSForProtocol(String protocol)
- {
- if(protocol.equals("file"))
- return fileVFS;
- else
- {
- VFS vfs = (VFS)ServiceManager.getService(SERVICE,protocol);
- if(vfs == null)
- vfs = protocolHash.get(protocol);
-
- if(vfs != null)
- return vfs;
- else
- return urlVFS;
- }
- } //}}}
-
- //{{{ getVFSForPath() method
- /**
- * Returns the VFS for the specified path.
- * @param path The path
- * @since jEdit 2.6pre4
- */
- public static VFS getVFSForPath(String path)
- {
- if(MiscUtilities.isURL(path))
- return getVFSForProtocol(MiscUtilities.getProtocolOfURL(path));
- else
- return fileVFS;
- } //}}}
-
- //{{{ registerVFS() method
- /**
- * @deprecated Write a <code>services.xml</code> file instead;
- * see {@link org.gjt.sp.jedit.ServiceManager}.
- */
- public static void registerVFS(String protocol, VFS vfs)
- {
- Log.log(Log.DEBUG,VFSManager.class,"Registered "
- + vfs.getName() + " filesystem for "
- + protocol + " protocol");
- vfsHash.put(vfs.getName(),vfs);
- protocolHash.put(protocol,vfs);
- } //}}}
-
- //{{{ getFilesystems() method
- /**
- * @deprecated Use <code>getVFSs()</code> instead.
- */
- public static Enumeration<VFS> getFilesystems()
- {
- return vfsHash.elements();
- } //}}}
-
- //{{{ getVFSs() method
- /**
- * Returns a list of all registered filesystems.
- * @since jEdit 4.2pre1
- */
- public static String[] getVFSs()
- {
- // the sooner ppl move to the new api, the less we'll need
- // crap like this
- List<String> returnValue = new LinkedList<String>();
- String[] newAPI = ServiceManager.getServiceNames(SERVICE);
- if(newAPI != null)
- {
- for(int i = 0; i < newAPI.length; i++)
- {
- returnValue.add(newAPI[i]);
- }
- }
- Enumeration<String> oldAPI = vfsHash.keys();
- while(oldAPI.hasMoreElements())
- returnValue.add(oldAPI.nextElement());
- return returnValue.toArray(new String[returnValue.size()]);
- } //}}}
-
- //}}}
-
- //{{{ I/O request methods
-
- //{{{ getIOThreadPool() method
- /**
- * Returns the I/O thread pool.
- */
- public static WorkThreadPool getIOThreadPool()
- {
- return ioThreadPool;
- } //}}}
-
- //{{{ waitForRequests() method
- /**
- * Returns when all pending requests are complete.
- * @since jEdit 2.5pre1
- */
- public static void waitForRequests()
- {
- ioThreadPool.waitForRequests();
- } //}}}
-
- //{{{ errorOccurred() method
- /**
- * Returns if the last request caused an error.
- */
- public static boolean errorOccurred()
- {
- return error;
- } //}}}
-
- //{{{ getRequestCount() method
- /**
- * Returns the number of pending I/O requests.
- */
- public static int getRequestCount()
- {
- return ioThreadPool.getRequestCount();
- } //}}}
-
- //{{{ runInAWTThread() method
- /**
- * Executes the specified runnable in the AWT thread once all
- * pending I/O requests are complete.
- * @since jEdit 2.5pre1
- */
- public static void runInAWTThread(Runnable run)
- {
- ioThreadPool.addWorkRequest(run,true);
- } //}}}
-
- //{{{ runInWorkThread() method
- /**
- * Executes the specified runnable in one of the I/O threads.
- * @since jEdit 2.6pre2
- */
- public static void runInWorkThread(Runnable run)
- {
- ioThreadPool.addWorkRequest(run,false);
- } //}}}
-
- //}}}
-
- //{{{ error() method
- /**
- * Handle an I/O error.
- * @since jEdit 4.3pre3
- */
- public static void error(IOException e, String path, Component comp)
- {
- Log.log(Log.ERROR,VFSManager.class,e);
- VFSManager.error(comp,path,"ioerror",new String[] { e.toString() });
- } //}}}
-
- //{{{ error() method
- /**
- * @deprecated Call the other <code>error()</code> method instead.
- */
- public static void error(final Component comp, final String error, final Object[] args)
- {
- // if we are already in the AWT thread, take a shortcut
- if(SwingUtilities.isEventDispatchThread())
- {
- GUIUtilities.error(comp,error,args);
- return;
- }
-
- // the 'error' chicanery ensures that stuff like:
- // VFSManager.waitForRequests()
- // if(VFSManager.errorOccurred())
- // ...
- // will work (because the below runnable will only be
- // executed in the next event)
- VFSManager.error = true;
-
- runInAWTThread(new Runnable()
- {
- public void run()
- {
- VFSManager.error = false;
-
- if(comp == null || !comp.isShowing())
- GUIUtilities.error(null,error,args);
- else
- GUIUtilities.error(comp,error,args);
- }
- });
- } //}}}
-
- //{{{ error() method
- /**
- * Reports an I/O error.
- *
- * @param comp The component
- * @param path The path name that caused the error
- * @param messageProp The error message property name
- * @param args Positional parameters
- * @since jEdit 4.0pre3
- */
- public static void error(Component comp,
- final String path,
- String messageProp,
- Object[] args)
- {
- final Frame frame = JOptionPane.getFrameForComponent(comp);
-
- synchronized(errorLock)
- {
- error = true;
-
- errors.add(new ErrorListDialog.ErrorEntry(
- path,messageProp,args));
-
- if(errors.size() == 1)
- {
-
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- String caption = jEdit.getProperty(
- "ioerror.caption" + (errors.size() == 1
- ? "-1" : ""),new Integer[] {
- Integer.valueOf(errors.size())});
- new ErrorListDialog(
- frame.isShowing()
- ? frame
- : jEdit.getFirstView(),
- jEdit.getProperty("ioerror.title"),
- caption,errors,false);
- errors.clear();
- error = false;
- }
- });
- }
- }
- } //}}}
-
- //{{{ sendVFSUpdate() method
- /**
- * Sends a VFS update message.
- * @param vfs The VFS
- * @param path The path that changed
- * @param parent True if an update should be sent for the path's
- * parent too
- * @since jEdit 2.6pre4
- */
- public static void sendVFSUpdate(VFS vfs, String path, boolean parent)
- {
- if(parent)
- {
- sendVFSUpdate(vfs,vfs.getParentOfPath(path),false);
- sendVFSUpdate(vfs,path,false);
- }
- else
- {
- // have to do this hack until VFSPath class is written
- if(path.length() != 1 && (path.endsWith("/")
- || path.endsWith(java.io.File.separator)))
- path = path.substring(0,path.length() - 1);
-
- synchronized(vfsUpdateLock)
- {
- for(int i = 0; i < vfsUpdates.size(); i++)
- {
- VFSUpdate msg = vfsUpdates.get(i);
- if(msg.getPath().equals(path))
- {
- // don't send two updates
- // for the same path
- return;
- }
- }
-
- vfsUpdates.add(new VFSUpdate(path));
-
- if(vfsUpdates.size() == 1)
- {
- // we were the first to add an update;
- // add update sending runnable to AWT
- // thread
- VFSManager.runInAWTThread(new SendVFSUpdatesSafely());
- }
- }
- }
- } //}}}
-
- //{{{ SendVFSUpdatesSafely class
- static class SendVFSUpdatesSafely implements Runnable
- {
- public void run()
- {
- synchronized(vfsUpdateLock)
- {
- // the vfs browser has what you might call
- // a design flaw, it doesn't update properly
- // unless the vfs update for a parent arrives
- // before any updates for the children. sorting
- // the list alphanumerically guarantees this.
- Collections.sort(vfsUpdates,
- new StandardUtilities.StringCompare<VFSUpdate>()
- );
- for(int i = 0; i < vfsUpdates.size(); i++)
- {
- EditBus.send(vfsUpdates.get(i));
- }
-
- vfsUpdates.clear();
- }
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Static variables
- private static WorkThreadPool ioThreadPool;
- private static VFS fileVFS;
- private static VFS urlVFS;
- private static final Hashtable<String, VFS> vfsHash;
- private static final Map<String, VFS> protocolHash;
- private static boolean error;
- private static final Object errorLock = new Object();
- private static final Vector<ErrorListDialog.ErrorEntry> errors;
- private static final Object vfsUpdateLock = new Object();
- private static final List<VFSUpdate> vfsUpdates;
- //}}}
-
- //{{{ Class initializer
- static
- {
- errors = new Vector<ErrorListDialog.ErrorEntry>();
- fileVFS = new FileVFS();
- urlVFS = new UrlVFS();
- vfsHash = new Hashtable<String, VFS>();
- protocolHash = new Hashtable<String, VFS>();
- vfsUpdates = new ArrayList<VFSUpdate>(10);
- } //}}}
-
- private VFSManager() {}
- //}}}
-}
+/*
+ * VFSManager.java - Main class of virtual filesystem
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
+import java.awt.Component;
+import java.awt.Frame;
+import java.io.IOException;
+import java.util.*;
+
+import org.gjt.sp.jedit.gui.ErrorListDialog;
+import org.gjt.sp.jedit.msg.VFSUpdate;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.WorkThreadPool;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * jEdit's virtual filesystem allows it to transparently edit files
+ * stored elsewhere than the local filesystem, for example on an FTP
+ * site. See the {@link VFS} class for implementation details.<p>
+ *
+ * Note that most of the jEdit API is not thread-safe, so special care
+ * must be taken when making jEdit API calls. Also, it is not safe to
+ * call <code>SwingUtilities.invokeAndWait()</code> from a work request;
+ * it can cause a deadlock if the given runnable then later calls
+ * {@link #waitForRequests()}.
+ *
+ * @author Slava Pestov
+ * @version $Id: VFSManager.java 18333 2010-08-12 08:44:46Z kpouer $
+ */
+public class VFSManager
+{
+ /**
+ * The service type. See {@link org.gjt.sp.jedit.ServiceManager}.
+ * @since jEdit 4.2pre1
+ */
+ public static final String SERVICE = "org.gjt.sp.jedit.io.VFS";
+
+ //{{{ init() method
+ /**
+ * Do not call.
+ */
+ public static void init()
+ {
+ int count = jEdit.getIntegerProperty("ioThreadCount",4);
+ ioThreadPool = new WorkThreadPool("jEdit I/O",count);
+ JARClassLoader classLoader = new JARClassLoader();
+ for(int i = 0; i < ioThreadPool.getThreadCount(); i++)
+ {
+ ioThreadPool.getThread(i).setContextClassLoader(
+ classLoader);
+ }
+ } //}}}
+
+ //{{{ start() method
+ /**
+ * Do not call.
+ */
+ public static void start()
+ {
+ ioThreadPool.start();
+ } //}}}
+
+ //{{{ VFS methods
+
+ //{{{ getFileVFS() method
+ /**
+ * Returns the local filesystem VFS.
+ * @since jEdit 2.5pre1
+ */
+ public static VFS getFileVFS()
+ {
+ return fileVFS;
+ } //}}}
+
+ //{{{ getUrlVFS() method
+ /**
+ * Returns the URL VFS.
+ * @since jEdit 2.5pre1
+ */
+ public static VFS getUrlVFS()
+ {
+ return urlVFS;
+ } //}}}
+
+ //{{{ getVFSByName() method
+ /**
+ * @deprecated Use <code>getVFSForProtocol()</code> instead.
+ */
+ @Deprecated
+ public static VFS getVFSByName(String name)
+ {
+ // in new api, protocol always equals name
+ VFS vfs = (VFS)ServiceManager.getService(SERVICE,name);
+ if(vfs == null)
+ return vfsHash.get(name);
+ else
+ return vfs;
+ } //}}}
+
+ //{{{ getVFSForProtocol() method
+ /**
+ * Returns the VFS for the specified protocol.
+ * @param protocol The protocol
+ * @since jEdit 2.5pre1
+ */
+ public static VFS getVFSForProtocol(String protocol)
+ {
+ if(protocol.equals("file"))
+ return fileVFS;
+ else
+ {
+ VFS vfs = (VFS)ServiceManager.getService(SERVICE,protocol);
+ if(vfs == null)
+ vfs = protocolHash.get(protocol);
+
+ if(vfs != null)
+ return vfs;
+ else
+ return urlVFS;
+ }
+ } //}}}
+
+ //{{{ getVFSForPath() method
+ /**
+ * Returns the VFS for the specified path.
+ * @param path The path
+ * @since jEdit 2.6pre4
+ */
+ public static VFS getVFSForPath(String path)
+ {
+ if(MiscUtilities.isURL(path))
+ return getVFSForProtocol(MiscUtilities.getProtocolOfURL(path));
+ else
+ return fileVFS;
+ } //}}}
+
+ //{{{ registerVFS() method
+ /**
+ * @deprecated Write a <code>services.xml</code> file instead;
+ * see {@link org.gjt.sp.jedit.ServiceManager}.
+ */
+ @Deprecated
+ public static void registerVFS(String protocol, VFS vfs)
+ {
+ Log.log(Log.DEBUG,VFSManager.class,"Registered "
+ + vfs.getName() + " filesystem for "
+ + protocol + " protocol");
+ vfsHash.put(vfs.getName(),vfs);
+ protocolHash.put(protocol,vfs);
+ } //}}}
+
+ //{{{ getFilesystems() method
+ /**
+ * @deprecated Use <code>getVFSs()</code> instead.
+ */
+ @Deprecated
+ public static Enumeration<VFS> getFilesystems()
+ {
+ return vfsHash.elements();
+ } //}}}
+
+ //{{{ getVFSs() method
+ /**
+ * Returns a list of all registered filesystems.
+ * @since jEdit 4.2pre1
+ */
+ public static String[] getVFSs()
+ {
+ // the sooner ppl move to the new api, the less we'll need
+ // crap like this
+ List<String> returnValue = new LinkedList<String>();
+ String[] newAPI = ServiceManager.getServiceNames(SERVICE);
+ if(newAPI != null)
+ {
+ for(int i = 0; i < newAPI.length; i++)
+ {
+ returnValue.add(newAPI[i]);
+ }
+ }
+ Enumeration<String> oldAPI = vfsHash.keys();
+ while(oldAPI.hasMoreElements())
+ returnValue.add(oldAPI.nextElement());
+ return returnValue.toArray(new String[returnValue.size()]);
+ } //}}}
+
+ //}}}
+
+ //{{{ I/O request methods
+
+ //{{{ getIOThreadPool() method
+ /**
+ * Returns the I/O thread pool.
+ */
+ public static WorkThreadPool getIOThreadPool()
+ {
+ return ioThreadPool;
+ } //}}}
+
+ //{{{ waitForRequests() method
+ /**
+ * Returns when all pending requests are complete.
+ * @since jEdit 2.5pre1
+ */
+ public static void waitForRequests()
+ {
+ ioThreadPool.waitForRequests();
+ } //}}}
+
+ //{{{ errorOccurred() method
+ /**
+ * Returns if the last request caused an error.
+ */
+ public static boolean errorOccurred()
+ {
+ return error;
+ } //}}}
+
+ //{{{ getRequestCount() method
+ /**
+ * Returns the number of pending I/O requests.
+ */
+ public static int getRequestCount()
+ {
+ return ioThreadPool.getRequestCount();
+ } //}}}
+
+ //{{{ runInAWTThread() method
+ /**
+ * Executes the specified runnable in the AWT thread once all
+ * pending I/O requests are complete.
+ * @since jEdit 2.5pre1
+ */
+ @Deprecated
+ public static void runInAWTThread(Runnable run)
+ {
+ ioThreadPool.addWorkRequest(run,true);
+ } //}}}
+
+ //{{{ runInWorkThread() method
+ /**
+ * Executes the specified runnable in one of the I/O threads.
+ * @since jEdit 2.6pre2
+ */
+ @Deprecated
+ public static void runInWorkThread(Runnable run)
+ {
+ ioThreadPool.addWorkRequest(run,false);
+ } //}}}
+
+ //}}}
+
+ //{{{ error() method
+ /**
+ * Handle an I/O error.
+ * @since jEdit 4.3pre3
+ */
+ public static void error(IOException e, String path, Component comp)
+ {
+ Log.log(Log.ERROR,VFSManager.class,e);
+ VFSManager.error(comp,path,"ioerror",new String[] { e.toString() });
+ } //}}}
+
+ //{{{ error() method
+ /**
+ * @deprecated Call the other <code>error()</code> method instead.
+ */
+ @Deprecated
+ public static void error(final Component comp, final String error, final Object[] args)
+ {
+ // if we are already in the AWT thread, take a shortcut
+ if(SwingUtilities.isEventDispatchThread())
+ {
+ GUIUtilities.error(comp,error,args);
+ return;
+ }
+
+ // the 'error' chicanery ensures that stuff like:
+ // VFSManager.waitForRequests()
+ // if(VFSManager.errorOccurred())
+ // ...
+ // will work (because the below runnable will only be
+ // executed in the next event)
+ VFSManager.error = true;
+
+ runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ VFSManager.error = false;
+
+ if(comp == null || !comp.isShowing())
+ GUIUtilities.error(null,error,args);
+ else
+ GUIUtilities.error(comp,error,args);
+ }
+ });
+ } //}}}
+
+ //{{{ error() method
+ /**
+ * Reports an I/O error.
+ *
+ * @param comp The component
+ * @param path The path name that caused the error
+ * @param messageProp The error message property name
+ * @param args Positional parameters
+ * @since jEdit 4.0pre3
+ */
+ public static void error(Component comp,
+ final String path,
+ String messageProp,
+ Object[] args)
+ {
+ final Frame frame = JOptionPane.getFrameForComponent(comp);
+
+ synchronized(errorLock)
+ {
+ error = true;
+
+ errors.add(new ErrorListDialog.ErrorEntry(
+ path,messageProp,args));
+
+ if(errors.size() == 1)
+ {
+
+
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ String caption = jEdit.getProperty(
+ "ioerror.caption" + (errors.size() == 1
+ ? "-1" : ""),new Integer[] {
+ Integer.valueOf(errors.size())});
+ new ErrorListDialog(
+ frame.isShowing()
+ ? frame
+ : jEdit.getFirstView(),
+ jEdit.getProperty("ioerror.title"),
+ caption,errors,false);
+ errors.clear();
+ error = false;
+ }
+ });
+ }
+ }
+ } //}}}
+
+ //{{{ sendVFSUpdate() method
+ /**
+ * Sends a VFS update message.
+ * @param vfs The VFS
+ * @param path The path that changed
+ * @param parent True if an update should be sent for the path's
+ * parent too
+ * @since jEdit 2.6pre4
+ */
+ public static void sendVFSUpdate(VFS vfs, String path, boolean parent)
+ {
+ if(parent)
+ {
+ sendVFSUpdate(vfs,vfs.getParentOfPath(path),false);
+ sendVFSUpdate(vfs,path,false);
+ }
+ else
+ {
+ // have to do this hack until VFSPath class is written
+ if(path.length() != 1 && (path.endsWith("/")
+ || path.endsWith(java.io.File.separator)))
+ path = path.substring(0,path.length() - 1);
+
+ synchronized(vfsUpdateLock)
+ {
+ for(int i = 0; i < vfsUpdates.size(); i++)
+ {
+ VFSUpdate msg = vfsUpdates.get(i);
+ if(msg.getPath().equals(path))
+ {
+ // don't send two updates
+ // for the same path
+ return;
+ }
+ }
+
+ vfsUpdates.add(new VFSUpdate(path));
+
+ if(vfsUpdates.size() == 1)
+ {
+ // we were the first to add an update;
+ // add update sending runnable to AWT
+ // thread
+ VFSManager.runInAWTThread(new SendVFSUpdatesSafely());
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ SendVFSUpdatesSafely class
+ static class SendVFSUpdatesSafely implements Runnable
+ {
+ public void run()
+ {
+ synchronized(vfsUpdateLock)
+ {
+ // the vfs browser has what you might call
+ // a design flaw, it doesn't update properly
+ // unless the vfs update for a parent arrives
+ // before any updates for the children. sorting
+ // the list alphanumerically guarantees this.
+ Collections.sort(vfsUpdates,
+ new StandardUtilities.StringCompare<VFSUpdate>()
+ );
+ for(int i = 0; i < vfsUpdates.size(); i++)
+ {
+ EditBus.send(vfsUpdates.get(i));
+ }
+
+ vfsUpdates.clear();
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Static variables
+ private static WorkThreadPool ioThreadPool;
+ private static VFS fileVFS;
+ private static VFS urlVFS;
+ private static final Hashtable<String, VFS> vfsHash;
+ private static final Map<String, VFS> protocolHash;
+ private static boolean error;
+ private static final Object errorLock = new Object();
+ private static final Vector<ErrorListDialog.ErrorEntry> errors;
+ private static final Object vfsUpdateLock = new Object();
+ private static final List<VFSUpdate> vfsUpdates;
+ //}}}
+
+ //{{{ Class initializer
+ static
+ {
+ errors = new Vector<ErrorListDialog.ErrorEntry>();
+ fileVFS = new FileVFS();
+ urlVFS = new UrlVFS();
+ vfsHash = new Hashtable<String, VFS>();
+ protocolHash = new Hashtable<String, VFS>();
+ vfsUpdates = new ArrayList<VFSUpdate>(10);
+ } //}}}
+
+ private VFSManager() {}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/XMLEncodingDetector.java b/jEdit/org/gjt/sp/jedit/io/XMLEncodingDetector.java
index a327761..0fadab7 100644
--- a/jEdit/org/gjt/sp/jedit/io/XMLEncodingDetector.java
+++ b/jEdit/org/gjt/sp/jedit/io/XMLEncodingDetector.java
@@ -1,101 +1,101 @@
-/*
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2007 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.io;
-
-//{{{ Imports
-import java.io.InputStream;
-import java.io.IOException;
-import java.nio.charset.Charset;
-import java.nio.charset.IllegalCharsetNameException;
-
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * An encoding detector which extracts encoding from XML declaration.
- *
- * @since 4.3pre10
- * @author Kazutoshi Satoda
- */
-public class XMLEncodingDetector implements EncodingDetector
-{
- //{{{ implements EncodingDetector
- public String detectEncoding(InputStream sample) throws IOException
- {
- // Length of longest XML PI used for encoding detection.
- // <?xml version="1.0" encoding="................"?>
- final int XML_PI_LENGTH = 50;
-
- byte[] _xmlPI = new byte[XML_PI_LENGTH];
- int offset = 0;
- int count;
- while((count = sample.read(_xmlPI,offset,
- XML_PI_LENGTH - offset)) != -1)
- {
- offset += count;
- if(offset == XML_PI_LENGTH)
- break;
- }
- return getXMLEncoding(new String(_xmlPI,0,offset,"ASCII"));
- } //}}}
-
- //{{{ Private members
- /**
- * Extract XML encoding name from PI.
- */
- private static String getXMLEncoding(String xmlPI)
- {
- if(!xmlPI.startsWith("<?xml"))
- return null;
-
- int index = xmlPI.indexOf("encoding=");
- if(index == -1 || index + 9 == xmlPI.length())
- return null;
-
- char ch = xmlPI.charAt(index + 9);
- int endIndex = xmlPI.indexOf(ch,index + 10);
- if(endIndex == -1)
- return null;
-
- String encoding = xmlPI.substring(index + 10,endIndex);
-
- try
- {
- if(Charset.isSupported(encoding))
- {
- return encoding;
- }
- else
- {
- Log.log(Log.WARNING, XMLEncodingDetector.class,
- "XML PI specifies unsupported encoding: " + encoding);
- }
- }
- catch(IllegalCharsetNameException e)
- {
- Log.log(Log.WARNING, XMLEncodingDetector.class,
- "XML PI specifies illegal encoding: " + encoding,
- e);
- }
- return null;
- }
- //}}}
-}
+/*
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2007 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+//{{{ Imports
+import java.io.InputStream;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.charset.IllegalCharsetNameException;
+
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * An encoding detector which extracts encoding from XML declaration.
+ *
+ * @since 4.3pre10
+ * @author Kazutoshi Satoda
+ */
+public class XMLEncodingDetector implements EncodingDetector
+{
+ //{{{ implements EncodingDetector
+ public String detectEncoding(InputStream sample) throws IOException
+ {
+ // Length of longest XML PI used for encoding detection.
+ // <?xml version="1.0" encoding="................"?>
+ final int XML_PI_LENGTH = 50;
+
+ byte[] _xmlPI = new byte[XML_PI_LENGTH];
+ int offset = 0;
+ int count;
+ while((count = sample.read(_xmlPI,offset,
+ XML_PI_LENGTH - offset)) != -1)
+ {
+ offset += count;
+ if(offset == XML_PI_LENGTH)
+ break;
+ }
+ return getXMLEncoding(new String(_xmlPI,0,offset,"ASCII"));
+ } //}}}
+
+ //{{{ Private members
+ /**
+ * Extract XML encoding name from PI.
+ */
+ private static String getXMLEncoding(String xmlPI)
+ {
+ if(!xmlPI.startsWith("<?xml"))
+ return null;
+
+ int index = xmlPI.indexOf("encoding=");
+ if(index == -1 || index + 9 == xmlPI.length())
+ return null;
+
+ char ch = xmlPI.charAt(index + 9);
+ int endIndex = xmlPI.indexOf(ch,index + 10);
+ if(endIndex == -1)
+ return null;
+
+ String encoding = xmlPI.substring(index + 10,endIndex);
+
+ try
+ {
+ if(Charset.isSupported(encoding))
+ {
+ return encoding;
+ }
+ else
+ {
+ Log.log(Log.WARNING, XMLEncodingDetector.class,
+ "XML PI specifies unsupported encoding: " + encoding);
+ }
+ }
+ catch(IllegalCharsetNameException e)
+ {
+ Log.log(Log.WARNING, XMLEncodingDetector.class,
+ "XML PI specifies illegal encoding: " + encoding,
+ e);
+ }
+ return null;
+ }
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/io/package.html b/jEdit/org/gjt/sp/jedit/io/package.html
index edcbc48..a97ef4b 100644
--- a/jEdit/org/gjt/sp/jedit/io/package.html
+++ b/jEdit/org/gjt/sp/jedit/io/package.html
@@ -1 +1 @@
-<html><body>Virtual file system and multi-threaded I/O.</body></html>
+<html><body>Virtual file system and multi-threaded I/O.</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/jEdit.java b/jEdit/org/gjt/sp/jedit/jEdit.java
index 53ec748..fb9928a 100644
--- a/jEdit/org/gjt/sp/jedit/jEdit.java
+++ b/jEdit/org/gjt/sp/jedit/jEdit.java
@@ -1,4372 +1,4388 @@
-/*
- * jEdit.java - Main class of the jEdit editor
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit;
-
-//{{{ Imports
-import org.gjt.sp.jedit.visitors.JEditVisitor;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.DefaultKeyboardFocusManager;
-import java.awt.Font;
-import java.awt.Frame;
-import java.awt.KeyboardFocusManager;
-import java.awt.Toolkit;
-import java.awt.Window;
-
-import org.gjt.sp.jedit.View.ViewConfig;
-import org.gjt.sp.jedit.bsh.UtilEvalError;
-import javax.swing.*;
-import java.awt.event.KeyEvent;
-import java.io.*;
-import java.net.*;
-import java.text.MessageFormat;
-import java.util.*;
-
-import org.xml.sax.SAXParseException;
-
-import org.gjt.sp.jedit.bufferio.BufferIORequest;
-import org.gjt.sp.jedit.buffer.KillRing;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.buffer.FoldHandler;
-import org.gjt.sp.jedit.msg.*;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.help.HelpViewer;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.pluginmgr.PluginManager;
-import org.gjt.sp.jedit.search.SearchAndReplace;
-import org.gjt.sp.jedit.syntax.ModeProvider;
-import org.gjt.sp.jedit.syntax.TokenMarker;
-import org.gjt.sp.jedit.syntax.XModeHandler;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.jedit.visitors.SaveCaretInfoVisitor;
-import org.gjt.sp.jedit.bufferset.BufferSetManager;
-import org.gjt.sp.jedit.bufferset.BufferSet;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.util.XMLUtilities;
-import org.gjt.sp.util.IOUtilities;
-import org.gjt.sp.util.SyntaxUtilities;
-//}}}
-
-/**
- * The main class of the jEdit text editor.
- * @author Slava Pestov
- * @version $Id: jEdit.java 17128 2010-01-28 23:26:49Z Vampire0 $
- */
-public class jEdit
-{
- //{{{ getVersion() method
- /**
- * Returns the jEdit version as a human-readable string.
- */
- public static String getVersion()
- {
- return MiscUtilities.buildToVersion(getBuild());
- } //}}}
-
- //{{{ getBuild() method
- /**
- * Returns the internal version. MiscUtilities.compareStrings() can be used
- * to compare different internal versions.
- */
- public static String getBuild()
- {
- // (major).(minor).(<99 = preX, 99 = "final").(bug fix)
- return "04.03.99.02";
- } //}}}
-
- //{{{ main() method
- /**
- * The main method of the jEdit application.
- * This should never be invoked directly.
- * @param args The command line arguments
- */
- public static void main(String[] args)
- {
- //{{{ Check for Java 1.5 or later
- String javaVersion = System.getProperty("java.version");
- if(javaVersion.compareTo("1.5") < 0)
- {
- System.err.println("You are running Java version "
- + javaVersion + '.');
- System.err.println("jEdit requires Java 1.5 or later.");
- System.exit(1);
- } //}}}
-
- startupDone.add(false);
-
- // later on we need to know if certain code is called from
- // the main thread
- mainThread = Thread.currentThread();
-
- settingsDirectory = ".jedit";
- // On mac, different rules (should) apply
- if(OperatingSystem.isMacOS())
- settingsDirectory = "Library/jEdit";
-
- // MacOS users expect the app to keep running after all windows
- // are closed
- background = OperatingSystem.isMacOS();
-
- //{{{ Parse command line
- boolean endOpts = false;
- int level = Log.WARNING;
- String portFile = "server";
- boolean restore = true;
- boolean newView = true;
- boolean newPlainView = false;
- boolean gui = true; // open initial view?
- boolean loadPlugins = true;
- boolean runStartupScripts = true;
- boolean quit = false;
- boolean wait = false;
- boolean shouldRelocateSettings = true;
- String userDir = System.getProperty("user.dir");
-
- // script to run
- String scriptFile = null;
-
- for(int i = 0; i < args.length; i++)
- {
- String arg = args[i];
- if(arg == null)
- continue;
- else if(arg.length() == 0)
- args[i] = null;
- else if(arg.startsWith("-") && !endOpts)
- {
- if(arg.equals("--"))
- endOpts = true;
- else if(arg.equals("-usage"))
- {
- version();
- System.err.println();
- usage();
- System.exit(1);
- }
- else if(arg.equals("-version"))
- {
- version();
- System.exit(1);
- }
- else if(arg.startsWith("-log="))
- {
- try
- {
- level = Integer.parseInt(arg.substring("-log=".length()));
- }
- catch(NumberFormatException nf)
- {
- System.err.println("Malformed option: " + arg);
- }
- }
- else if(arg.equals("-nosettings"))
- settingsDirectory = null;
- else if(arg.startsWith("-settings="))
- {
- settingsDirectory = arg.substring(10);
- shouldRelocateSettings = false;
- }
- else if(arg.startsWith("-noserver"))
- portFile = null;
- else if(arg.equals("-server"))
- portFile = "server";
- else if(arg.startsWith("-server="))
- portFile = arg.substring(8);
- else if(arg.startsWith("-background"))
- background = true;
- else if(arg.startsWith("-nobackground"))
- background = false;
- else if(arg.equals("-gui"))
- gui = true;
- else if(arg.equals("-nogui"))
- gui = false;
- else if(arg.equals("-newview"))
- newView = true;
- else if(arg.equals("-newplainview"))
- newPlainView = true;
- else if(arg.equals("-reuseview"))
- newPlainView = newView = false;
- else if(arg.equals("-restore"))
- restore = true;
- else if(arg.equals("-norestore"))
- restore = false;
- else if(arg.equals("-plugins"))
- loadPlugins = true;
- else if(arg.equals("-noplugins"))
- loadPlugins = false;
- else if(arg.equals("-startupscripts"))
- runStartupScripts = true;
- else if(arg.equals("-nostartupscripts"))
- runStartupScripts = false;
- else if(arg.startsWith("-run="))
- scriptFile = arg.substring(5);
- else if(arg.equals("-wait"))
- wait = true;
- else if(arg.equals("-quit"))
- quit = true;
- else
- {
- System.err.println("Unknown option: "
- + arg);
- usage();
- System.exit(1);
- }
- args[i] = null;
- }
- } //}}}
-
- //{{{ We need these initializations very early on
- if(settingsDirectory != null)
- {
- settingsDirectory = MiscUtilities.constructPath(
- System.getProperty("user.home"),
- settingsDirectory);
- settingsDirectory = MiscUtilities.resolveSymlinks(
- settingsDirectory);
- }
-
- if(settingsDirectory != null && portFile != null)
- portFile = MiscUtilities.constructPath(settingsDirectory,portFile);
- else
- portFile = null;
-
- Log.init(true,level);
- //}}}
-
- //{{{ Try connecting to another running jEdit instance
- if(portFile != null && new File(portFile).exists())
- {
- try
- {
- BufferedReader in = new BufferedReader(new FileReader(portFile));
- String check = in.readLine();
- if(!check.equals("b"))
- throw new Exception("Wrong port file format");
-
- int port = Integer.parseInt(in.readLine());
- int key = Integer.parseInt(in.readLine());
-
- Socket socket = new Socket(InetAddress.getByName("127.0.0.1"),port);
- DataOutputStream out = new DataOutputStream(
- socket.getOutputStream());
- out.writeInt(key);
-
- String script;
- if(quit)
- {
- script = "socket.close();\n"
- + "jEdit.exit(null,true);\n";
- }
- else
- {
- script = makeServerScript(wait,restore,
- newView,newPlainView,args,
- scriptFile);
- }
-
- out.writeUTF(script);
-
- Log.log(Log.DEBUG,jEdit.class,"Waiting for server");
- // block until its closed
- try
- {
- socket.getInputStream().read();
- }
- catch(Exception e)
- {
- }
-
- in.close();
- out.close();
-
- System.exit(0);
- }
- catch(Exception e)
- {
- // ok, this one seems to confuse newbies
- // endlessly, so log it as NOTICE, not
- // ERROR
- Log.log(Log.NOTICE,jEdit.class,"An error occurred"
- + " while connecting to the jEdit server instance.");
- Log.log(Log.NOTICE,jEdit.class,"This probably means that"
- + " jEdit crashed and/or exited abnormally");
- Log.log(Log.NOTICE,jEdit.class,"the last time it was run.");
- Log.log(Log.NOTICE,jEdit.class,"If you don't"
- + " know what this means, don't worry.");
- Log.log(Log.NOTICE,jEdit.class,e);
- }
- }
-
- if(quit)
- {
- // if no server running and user runs jedit -quit,
- // just exit
- System.exit(0);
- } //}}}
-
- // don't show splash screen if there is a file named
- // 'nosplash' in the settings directory
- if(!new File(settingsDirectory,"nosplash").exists())
- GUIUtilities.showSplashScreen();
-
- //{{{ Mac settings migration code. Should eventually be removed
- if(OperatingSystem.isMacOS() && shouldRelocateSettings && settingsDirectory != null)
- {
- relocateSettings();
- }
- // }}}
-
- //{{{ Initialize settings directory
- Writer stream;
- if(settingsDirectory != null)
- {
- File _settingsDirectory = new File(settingsDirectory);
- if(!_settingsDirectory.exists())
- _settingsDirectory.mkdirs();
- File _macrosDirectory = new File(settingsDirectory,"macros");
- if(!_macrosDirectory.exists())
- _macrosDirectory.mkdir();
-
- String logPath = MiscUtilities.constructPath(
- settingsDirectory,"activity.log");
-
- backupSettingsFile(new File(logPath));
-
- try
- {
- stream = new BufferedWriter(new FileWriter(logPath));
-
- // Write a warning message:
- String lineSep = System.getProperty("line.separator");
- stream.write("Log file created on " + new Date());
- stream.write(lineSep);
- stream.write("IMPORTANT:");
- stream.write(lineSep);
- stream.write("Because updating this file after "
- + "every log message would kill");
- stream.write(lineSep);
- stream.write("performance, it will be *incomplete* "
- + "unless you invoke the");
- stream.write(lineSep);
- stream.write("Utilities->Troubleshooting->Update "
- + "Activity Log on Disk command!");
- stream.write(lineSep);
- }
- catch(Exception e)
- {
- e.printStackTrace();
- stream = null;
- }
- }
- else
- {
- stream = null;
- } //}}}
-
- Log.setLogWriter(stream);
-
- Log.log(Log.NOTICE,jEdit.class,"jEdit version " + getVersion());
- Log.log(Log.MESSAGE,jEdit.class,"Settings directory is "
- + settingsDirectory);
-
- //{{{ Get things rolling
- GUIUtilities.advanceSplashProgress("init");
- initMisc();
- GUIUtilities.advanceSplashProgress("init system properties");
- initSystemProperties();
-
- GUIUtilities.advanceSplashProgress("init beanshell");
- BeanShell.init();
-
- GUIUtilities.advanceSplashProgress("loading site properties");
- if(jEditHome != null)
- initSiteProperties();
-
- GUIUtilities.advanceSplashProgress("loading user properties");
- initUserProperties();
-
- GUIUtilities.advanceSplashProgress("init GUI");
- GUIUtilities.init();
-
- globalBufferSet = new BufferSet();
- bufferSetManager = new BufferSetManager();
-
- ///Options.SIMPLIFIED_KEY_HANDLING = jEdit.getBooleanProperty("newkeyhandling");
- //}}}
-
- //{{{ Initialize server
- if(portFile != null)
- {
- GUIUtilities.advanceSplashProgress("init server");
- server = new EditServer(portFile);
- if(!server.isOK())
- server = null;
- }
- else
- {
- GUIUtilities.advanceSplashProgress();
- if(background)
- {
- background = false;
- Log.log(Log.WARNING,jEdit.class,"You cannot specify both the"
- + " -background and -noserver switches");
- }
- } //}}}
-
- //{{{ Do more stuff
- GUIUtilities.advanceSplashProgress("init look and feel");
- initPLAF();
- GUIUtilities.advanceSplashProgress("init VFS Manager");
- VFSManager.init();
- GUIUtilities.advanceSplashProgress("init resources");
- initResources();
- SearchAndReplace.load();
-
-
-
- if(loadPlugins)
- {
- GUIUtilities.advanceSplashProgress("init plugins");
- initPlugins();
- }
- else
- GUIUtilities.advanceSplashProgress();
-
- Registers.setSaver(new JEditRegisterSaver());
- Registers.setListener(new JEditRegistersListener());
- GUIUtilities.advanceSplashProgress("init history model");
- HistoryModel.setSaver(new JEditHistoryModelSaver());
- HistoryModel.loadHistory();
- GUIUtilities.advanceSplashProgress("init buffer history");
- BufferHistory.load();
- GUIUtilities.advanceSplashProgress("init killring");
- KillRing.setInstance(new JEditKillRing());
- KillRing.getInstance().load();
- GUIUtilities.advanceSplashProgress("init various properties");
- propertiesChanged();
-
- GUIUtilities.advanceSplashProgress("init modes");
-
- // Buffer sort
- sortBuffers = getBooleanProperty("sortBuffers");
- sortByName = getBooleanProperty("sortByName");
-
- reloadModes();
-
- GUIUtilities.advanceSplashProgress("activate plugins");
- //}}}
-
- //{{{ Activate plugins that must be activated at startup
- for(int i = 0; i < jars.size(); i++)
- {
- jars.elementAt(i).activatePluginIfNecessary();
- } //}}}
-
- //{{{ Load macros and run startup scripts, after plugins and settings are loaded
- GUIUtilities.advanceSplashProgress("init macros");
- Macros.loadMacros();
- Macros.getMacroActionSet().initKeyBindings();
-
- if(runStartupScripts && jEditHome != null)
- {
- String path = MiscUtilities.constructPath(jEditHome,"startup");
- File file = new File(path);
- if(file.exists())
- {
- runStartupScripts(file);
- }
- else
- GUIUtilities.advanceSplashProgress();
- }
- else
- GUIUtilities.advanceSplashProgress("run startup scripts");
-
- if(runStartupScripts && settingsDirectory != null)
- {
- String path = MiscUtilities.constructPath(settingsDirectory,"startup");
- File file = new File(path);
- if (file.exists())
- {
- GUIUtilities.advanceSplashProgress("run startup scripts");
- runStartupScripts(file);
- }
- else
- {
- GUIUtilities.advanceSplashProgress();
- file.mkdirs();
- }
- }
- else
- {
- GUIUtilities.advanceSplashProgress();
- } //}}}
-
- //{{{ Run script specified with -run= parameter
- if(scriptFile != null)
- {
- GUIUtilities.advanceSplashProgress("run script file");
- scriptFile = MiscUtilities.constructPath(userDir,scriptFile);
- try
- {
- BeanShell.getNameSpace().setVariable("args",args);
- }
- catch(UtilEvalError e)
- {
- Log.log(Log.ERROR,jEdit.class,e);
- }
- BeanShell.runScript(null,scriptFile,null,false);
- }
- else
- {
- GUIUtilities.advanceSplashProgress();
- }
- //}}}
-
- GUIUtilities.advanceSplashProgress();
-
- // Create dynamic actions for switching to saved layouts.
- // The list of saved layouts is retrieved from the docking framework,
- // which can be provided by a plugin, so this must be called only after
- // the plugins are loaded.
- DockingLayoutManager.init();
-
- // Open files, create the view and hide the splash screen.
- SyntaxUtilities.propertyManager = jEdit.propertyManager;
- finishStartup(gui,restore,newPlainView,userDir,args);
- } //}}}
-
- //{{{ Property methods
-
- //{{{ getProperties() method
- /**
- * Returns the properties object which contains all known
- * jEdit properties. Note that as of jEdit 4.2pre10, this returns a
- * new collection, not the existing properties instance.
- * @since jEdit 3.1pre4
- */
- public static Properties getProperties()
- {
- return propMgr.getProperties();
- } //}}}
-
- //{{{ getProperty() method
- /**
- * Fetches a property, returning null if it's not defined.
- * @param name The property
- */
- public static String getProperty(String name)
- {
- return propMgr.getProperty(name);
- } //}}}
-
- //{{{ getProperty() method
- /**
- * Fetches a property, returning the default value if it's not
- * defined.
- * @param name The property
- * @param def The default value
- */
- public static String getProperty(String name, String def)
- {
- String value = propMgr.getProperty(name);
- if(value == null)
- return def;
- else
- return value;
- } //}}}
-
- //{{{ getProperty() method
- /**
- * Returns the property with the specified name.<p>
- *
- * The elements of the <code>args</code> array are substituted
- * into the value of the property in place of strings of the
- * form <code>{<i>n</i>}</code>, where <code><i>n</i></code> is an index
- * in the array.<p>
- *
- * You can find out more about this feature by reading the
- * documentation for the <code>format</code> method of the
- * <code>java.text.MessageFormat</code> class.
- *
- * @param name The property
- * @param args The positional parameters
- */
- public static String getProperty(String name, Object[] args)
- {
- if(name == null)
- return null;
- if(args == null)
- return getProperty(name);
- else
- {
- String value = getProperty(name);
- if(value == null)
- return null;
- else
- return MessageFormat.format(value,args);
- }
- } //}}}
-
- //{{{ getBooleanProperty() method
- /**
- * Returns the value of a boolean property.
- * @param name The property
- */
- public static boolean getBooleanProperty(String name)
- {
- return getBooleanProperty(name,false);
- } //}}}
-
- //{{{ getBooleanProperty() method
- /**
- * Returns the value of a boolean property.
- * @param name The property
- * @param def The default value
- */
- public static boolean getBooleanProperty(String name, boolean def)
- {
- String value = getProperty(name);
- return StandardUtilities.getBoolean(value, def);
- } //}}}
-
- //{{{ getIntegerProperty() method
- /**
- * Returns the value of an integer property.
- * @param name The property
- */
- public static int getIntegerProperty(String name)
- {
- return getIntegerProperty(name,0);
- } //}}}
-
- //{{{ getIntegerProperty() method
- /**
- * Returns the value of an integer property.
- * @param name The property
- * @param def The default value
- * @since jEdit 4.0pre1
- */
- public static int getIntegerProperty(String name, int def)
- {
- String value = getProperty(name);
- if(value == null)
- return def;
- else
- {
- try
- {
- return Integer.parseInt(value.trim());
- }
- catch(NumberFormatException nf)
- {
- return def;
- }
- }
- } //}}}
-
- //{{{ getDoubleProperty() method
- public static double getDoubleProperty(String name, double def)
- {
- String value = getProperty(name);
- if(value == null)
- return def;
- else
- {
- try
- {
- return Double.parseDouble(value.trim());
- }
- catch(NumberFormatException nf)
- {
- return def;
- }
- }
- }
- //}}}
-
- //{{{ getFontProperty() method
- /**
- * Returns the value of a font property. The family is stored
- * in the <code><i>name</i></code> property, the font size is stored
- * in the <code><i>name</i>size</code> property, and the font style is
- * stored in <code><i>name</i>style</code>. For example, if
- * <code><i>name</i></code> is <code>view.gutter.font</code>, the
- * properties will be named <code>view.gutter.font</code>,
- * <code>view.gutter.fontsize</code>, and
- * <code>view.gutter.fontstyle</code>.
- *
- * @param name The property
- * @since jEdit 4.0pre1
- */
- public static Font getFontProperty(String name)
- {
- return getFontProperty(name,null);
- } //}}}
-
- //{{{ getFontProperty() method
- /**
- * Returns the value of a font property. The family is stored
- * in the <code><i>name</i></code> property, the font size is stored
- * in the <code><i>name</i>size</code> property, and the font style is
- * stored in <code><i>name</i>style</code>. For example, if
- * <code><i>name</i></code> is <code>view.gutter.font</code>, the
- * properties will be named <code>view.gutter.font</code>,
- * <code>view.gutter.fontsize</code>, and
- * <code>view.gutter.fontstyle</code>.
- *
- * @param name The property
- * @param def The default value
- * @since jEdit 4.0pre1
- */
- public static Font getFontProperty(String name, Font def)
- {
- String family = getProperty(name);
- String sizeString = getProperty(name + "size");
- String styleString = getProperty(name + "style");
-
- if(family == null || sizeString == null || styleString == null)
- return def;
- else
- {
- int size, style;
-
- try
- {
- size = Integer.parseInt(sizeString);
- }
- catch(NumberFormatException nf)
- {
- return def;
- }
-
- try
- {
- style = Integer.parseInt(styleString);
- }
- catch(NumberFormatException nf)
- {
- return def;
- }
-
- return new Font(family,style,size);
- }
- } //}}}
-
- //{{{ getColorProperty() method
- /**
- * Returns the value of a color property.
- * @param name The property name
- * @since jEdit 4.0pre1
- */
- public static Color getColorProperty(String name)
- {
- return getColorProperty(name,Color.black);
- } //}}}
-
- //{{{ getColorProperty() method
- /**
- * Returns the value of a color property.
- * @param name The property name
- * @param def The default value
- * @since jEdit 4.0pre1
- */
- public static Color getColorProperty(String name, Color def)
- {
- String value = getProperty(name);
- if(value == null)
- return def;
- else
- return SyntaxUtilities.parseColor(value, def);
- } //}}}
-
- //{{{ setColorProperty() method
- /**
- * Sets the value of a color property.
- * @param name The property name
- * @param value The value
- * @since jEdit 4.0pre1
- */
- public static void setColorProperty(String name, Color value)
- {
- setProperty(name, SyntaxUtilities.getColorHexString(value));
- } //}}}
-
- //{{{ setProperty() method
- /**
- * Sets a property to a new value.
- * @param name The property
- * @param value The new value
- */
- public static void setProperty(String name, String value)
- {
- propMgr.setProperty(name,value);
- } //}}}
-
- //{{{ setTemporaryProperty() method
- /**
- * Sets a property to a new value. Properties set using this
- * method are not saved to the user properties list.
- * @param name The property
- * @param value The new value
- * @since jEdit 2.3final
- */
- public static void setTemporaryProperty(String name, String value)
- {
- propMgr.setTemporaryProperty(name,value);
- } //}}}
-
- //{{{ setBooleanProperty() method
- /**
- * Sets a boolean property.
- * @param name The property
- * @param value The value
- */
- public static void setBooleanProperty(String name, boolean value)
- {
- setProperty(name,value ? "true" : "false");
- } //}}}
-
- //{{{ setIntegerProperty() method
- /**
- * Sets the value of an integer property.
- * @param name The property
- * @param value The value
- * @since jEdit 4.0pre1
- */
- public static void setIntegerProperty(String name, int value)
- {
- setProperty(name,String.valueOf(value));
- } //}}}
-
- //{{{ setDoubleProperty() method
- public static void setDoubleProperty(String name, double value)
- {
- setProperty(name,String.valueOf(value));
- }
- //}}}
-
- //{{{ setFontProperty() method
- /**
- * Sets the value of a font property. The family is stored
- * in the <code><i>name</i></code> property, the font size is stored
- * in the <code><i>name</i>size</code> property, and the font style is
- * stored in <code><i>name</i>style</code>. For example, if
- * <code><i>name</i></code> is <code>view.gutter.font</code>, the
- * properties will be named <code>view.gutter.font</code>,
- * <code>view.gutter.fontsize</code>, and
- * <code>view.gutter.fontstyle</code>.
- *
- * @param name The property
- * @param value The value
- * @since jEdit 4.0pre1
- */
- public static void setFontProperty(String name, Font value)
- {
- setProperty(name,value.getFamily());
- setIntegerProperty(name + "size",value.getSize());
- setIntegerProperty(name + "style",value.getStyle());
- } //}}}
-
- //{{{ unsetProperty() method
- /**
- * Unsets (clears) a property.
- * @param name The property
- */
- public static void unsetProperty(String name)
- {
- propMgr.unsetProperty(name);
- } //}}}
-
- //{{{ resetProperty() method
- /**
- * Resets a property to its default value.
- * @param name The property
- *
- * @since jEdit 2.5pre3
- */
- public static void resetProperty(String name)
- {
- propMgr.resetProperty(name);
- } //}}}
-
- //{{{ propertiesChanged() method
- /**
- * Reloads various settings from the properties.
- */
- public static void propertiesChanged()
- {
- initKeyBindings();
-
- Autosave.setInterval(getIntegerProperty("autosave",30));
-
- saveCaret = getBooleanProperty("saveCaret");
-
- UIDefaults defaults = UIManager.getDefaults();
-
- // give all text areas the same font
- Font font = getFontProperty("view.font");
-
- //defaults.put("TextField.font",font);
- defaults.put("TextArea.font",font);
- defaults.put("TextPane.font",font);
-
- // Enable/Disable tooltips
- ToolTipManager.sharedInstance().setEnabled(
- jEdit.getBooleanProperty("showTooltips"));
-
- initProxy();
-
- // we do this here instead of adding buffers to the bus.
- Buffer buffer = buffersFirst;
- while(buffer != null)
- {
- buffer.resetCachedProperties();
- buffer.propertiesChanged();
- buffer = buffer.next;
- }
-
- HistoryModel.setMax(getIntegerProperty("history",25));
- KillRing.getInstance().propertiesChanged(getIntegerProperty("history",25));
-
- EditBus.send(new PropertiesChanged(null));
- } //}}}
-
- //}}}
-
- //{{{ Plugin management methods
-
- //{{{ getNotLoadedPluginJARs() method
- /**
- * Returns a list of plugin JARs pathnames that are not currently loaded
- * by examining the user and system plugin directories.
- * @since jEdit 3.2pre1
- */
- public static String[] getNotLoadedPluginJARs()
- {
- List<String> returnValue = new ArrayList<String>();
-
- if(jEditHome != null)
- {
- String systemPluginDir = MiscUtilities
- .constructPath(jEditHome,"jars");
-
- String[] list = new File(systemPluginDir).list();
- if(list != null)
- getNotLoadedPluginJARs(returnValue,systemPluginDir,list);
- }
-
- if(settingsDirectory != null)
- {
- String userPluginDir = MiscUtilities
- .constructPath(settingsDirectory,"jars");
- String[] list = new File(userPluginDir).list();
- if(list != null)
- {
- getNotLoadedPluginJARs(returnValue,
- userPluginDir,list);
- }
- }
-
- String[] _returnValue = new String[returnValue.size()];
- returnValue.toArray(_returnValue);
- return _returnValue;
- } //}}}
-
- //{{{ getPlugin() method
- /**
- * Returns the plugin with the specified class name.
- * Only works for plugins that were loaded.
- */
- public static EditPlugin getPlugin(String name)
- {
- return getPlugin(name, false);
- } //}}}
-
- //{{{ getPlugin(String, boolean) method
- /**
- * Returns the plugin with the specified class name.
- * If * <code>loadIfNecessary</code> is true, the plugin will be searched for,
- * loaded, and activated in case it has not yet been loaded.
- *
- * @param name the classname of the main Plugin class.
- * @param loadIfNecessary - loads plugin + dependencies if it is not loaded yet.
- * @since jEdit 4.2pre4
- */
- public static EditPlugin getPlugin(String name, boolean loadIfNecessary)
- {
- EditPlugin[] plugins = getPlugins();
- EditPlugin plugin = null;
- for(int i = 0; i < plugins.length; i++)
- {
- if(plugins[i].getClassName().equals(name))
- plugin = plugins[i];
- if(loadIfNecessary)
- {
- if(plugin instanceof EditPlugin.Deferred)
- {
- plugin.getPluginJAR().activatePlugin();
- plugin = plugin.getPluginJAR().getPlugin();
- break;
- }
- }
- }
- if (!loadIfNecessary) return plugin;
- String jarPath = PluginJAR.findPlugin(name);
- PluginJAR pjar = PluginJAR.load(jarPath, true);
- return pjar.getPlugin();
- } //}}}
-
- //{{{ getPlugins() method
- /**
- * Returns an array of installed plugins.
- */
- public static EditPlugin[] getPlugins()
- {
- List<EditPlugin> pluginList = new ArrayList<EditPlugin>();
- for(int i = 0; i < jars.size(); i++)
- {
- EditPlugin plugin = jars.elementAt(i).getPlugin();
- if(plugin != null)
- pluginList.add(plugin);
- }
-
- EditPlugin[] array = new EditPlugin[pluginList.size()];
- pluginList.toArray(array);
- return array;
- } //}}}
-
- //{{{ getPluginJARs() method
- /**
- * Returns an array of installed plugins.
- * @since jEdit 4.2pre1
- */
- public static PluginJAR[] getPluginJARs()
- {
- PluginJAR[] array = new PluginJAR[jars.size()];
- jars.copyInto(array);
- return array;
- } //}}}
-
- //{{{ getPluginJAR() method
- /**
- * Returns the JAR with the specified path name.
- * @param path The path name
- * @since jEdit 4.2pre1
- */
- public static PluginJAR getPluginJAR(String path)
- {
- for(int i = 0; i < jars.size(); i++)
- {
- PluginJAR jar = jars.elementAt(i);
- if(jar.getPath().equals(path))
- return jar;
- }
-
- return null;
- } //}}}
-
- //{{{ addPluginJAR() method
- /**
- * Loads the plugin JAR with the specified path. Some notes about this
- * method:
- *
- * <ul>
- * <li>Calling this at a time other than jEdit startup can have
- * unpredictable results if the plugin has not been updated for the
- * jEdit 4.2 plugin API.
- * <li>You must make sure yourself the plugin is not already loaded.
- * <li>After loading, you just make sure all the plugin's dependencies
- * are satisified before activating the plugin, using the
- * {@link PluginJAR#checkDependencies()} method.
- * </ul>
- *
- * @param path The JAR file path
- * @since jEdit 4.2pre1
- */
- public static void addPluginJAR(String path)
- {
- PluginJAR jar = new PluginJAR(new File(path));
- jars.addElement(jar);
- jar.init();
- jEdit.unsetProperty("plugin-blacklist."+MiscUtilities.getFileName(path));
- EditBus.send(new PluginUpdate(jar,PluginUpdate.LOADED,false));
- if(!isMainThread())
- {
- EditBus.send(new DynamicMenuChanged("plugins"));
- initKeyBindings();
- }
- } //}}}
-
- //{{{ addPluginJARsFromDirectory() method
- /**
- * Loads all plugins in a directory.
- * @param directory The directory
- * @since jEdit 4.2pre1
- */
- private static void addPluginJARsFromDirectory(String directory)
- {
- Log.log(Log.NOTICE,jEdit.class,"Loading plugins from "
- + directory);
-
- File file = new File(directory);
- if(!(file.exists() && file.isDirectory()))
- return;
- String[] plugins = file.list();
- if(plugins == null)
- return;
-
- for(int i = 0; i < plugins.length; i++)
- {
- String plugin = plugins[i];
- if(!plugin.toLowerCase().endsWith(".jar"))
- continue;
-
- String path = MiscUtilities.constructPath(directory,plugin);
- if (jEdit.getBooleanProperty("plugin-blacklist."+plugin))
- continue;
- // remove this when 4.1 plugin API is deprecated
- if(plugin.equals("EditBuddy.jar")
- || plugin.equals("PluginManager.jar")
- || plugin.equals("Firewall.jar")
- || plugin.equals("Tidy.jar")
- || plugin.equals("DragAndDrop.jar"))
- {
- pluginError(path,"plugin-error.obsolete",null);
- continue;
- }
-
- addPluginJAR(path);
- }
- } //}}}
-
- //{{{ removePluginJAR() method
- /**
- * Unloads the given plugin JAR with the specified path. Note that
- * calling this at a time other than jEdit shutdown can have
- * unpredictable results if the plugin has not been updated for the
- * jEdit 4.2 plugin API.
- *
- * @param jar The <code>PluginJAR</code> instance
- * @param exit Set to true if jEdit is exiting; enables some
- * shortcuts so the editor can close faster.
- * @since jEdit 4.2pre1
- */
- public static void removePluginJAR(PluginJAR jar, boolean exit)
- {
- if(exit)
- {
- jar.uninit(true);
- }
- else
- {
- jar.uninit(false);
- jars.removeElement(jar);
- initKeyBindings();
- }
-
- EditBus.send(new PluginUpdate(jar,PluginUpdate.UNLOADED,exit));
- if(!isMainThread() && !exit)
- EditBus.send(new DynamicMenuChanged("plugins"));
- } //}}}
-
- //}}}
-
- //{{{ Action methods
-
- //{{{ getActionContext() method
- /**
- * Returns the action context used to store editor actions.
- * @since jEdit 4.2pre1
- */
- public static ActionContext getActionContext()
- {
- return actionContext;
- } //}}}
-
- //{{{ addActionSet() method
- /**
- * Adds a new action set to jEdit's list of ActionSets (viewable from the shortcuts
- * option pane). By default, each plugin has one ActionSet,
- * but some plugins may create dynamic action sets, such as ProjectViewer and Console.
- * These plugins must call removeActionSet() when the plugin is unloaded.
- *
- * @since jEdit 4.0pre1
- * @see #removeActionSet(ActionSet)
- */
- public static void addActionSet(ActionSet actionSet)
- {
- actionContext.addActionSet(actionSet);
- } //}}}
-
- //{{{ removeActionSet() method
- /**
- * Removes an action set from jEdit's list.
- * Plugins that add a dynamic action set must call this method at plugin
- * unload time.
- * @since jEdit 4.2pre1
- */
- public static void removeActionSet(ActionSet actionSet)
- {
- actionContext.removeActionSet(actionSet);
- } //}}}
-
- //{{{ getBuiltInActionSet() method
- /**
- * Returns the set of commands built into jEdit.
- * @since jEdit 4.2pre1
- */
- public static ActionSet getBuiltInActionSet()
- {
- return builtInActionSet;
- } //}}}
-
- // {{{ getActionSets() method
- /**
- * Returns all registered action sets.
- *
- * @return the ActionSet(s)
- * @since jEdit 4.0pre1
- */
- public static ActionSet[] getActionSets()
- {
- return actionContext.getActionSets();
- } // }}}
-
- //{{{ getAction() method
- /**
- * Returns the specified action.
- * @param name The action name
- */
- public static EditAction getAction(String name)
- {
- return actionContext.getAction(name);
- } //}}}
-
- //{{{ getActionSetForAction() method
- /**
- * Returns the action set that contains the specified action.
- *
- * @param action The action
- * @since jEdit 4.2pre1
- */
- public static ActionSet getActionSetForAction(String action)
- {
- return actionContext.getActionSetForAction(action);
- } //}}}
-
- //{{{ getActionSetForAction() method
- /**
- * @deprecated Use the form that takes a String instead
- */
- @Deprecated
- public static ActionSet getActionSetForAction(EditAction action)
- {
- return actionContext.getActionSetForAction(action.getName());
- } //}}}
-
- //{{{ getActions() method
- /**
- * @deprecated Call getActionNames() instead
- */
- @Deprecated
- public static EditAction[] getActions()
- {
- String[] names = actionContext.getActionNames();
- EditAction[] actions = new EditAction[names.length];
- for(int i = 0; i < actions.length; i++)
- {
- actions[i] = actionContext.getAction(names[i]);
- if(actions[i] == null)
- Log.log(Log.ERROR,jEdit.class,"wtf: " + names[i]);
- }
- return actions;
- } //}}}
-
- //{{{ getActionNames() method
- /**
- * Returns all registered action names.
- */
- public static String[] getActionNames()
- {
- return actionContext.getActionNames();
- } //}}}
-
- //}}}
-
- //{{{ Edit mode methods
-
- //{{{ reloadModes() method
- /**
- * Reloads all edit modes.
- * @since jEdit 3.2pre2
- */
- public static void reloadModes()
- {
- /* Try to guess the eventual size to avoid unnecessary
- * copying */
- ModeProvider.instance.removeAll();
-
- //{{{ Load the global catalog
- if(jEditHome == null)
- loadModeCatalog("/modes/catalog",true);
- else
- {
- loadModeCatalog(MiscUtilities.constructPath(jEditHome,
- "modes","catalog"),false);
- } //}}}
-
- //{{{ Load user catalog
- if(settingsDirectory != null)
- {
- File userModeDir = new File(MiscUtilities.constructPath(
- settingsDirectory,"modes"));
- if(!userModeDir.exists())
- userModeDir.mkdirs();
-
- File userCatalog = new File(MiscUtilities.constructPath(
- settingsDirectory,"modes","catalog"));
- if(!userCatalog.exists())
- {
- // create dummy catalog
- FileWriter out = null;
- try
- {
- out = new FileWriter(userCatalog);
- out.write(jEdit.getProperty("defaultCatalog"));
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,jEdit.class,io);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
- }
-
- loadModeCatalog(userCatalog.getPath(),false);
- } //}}}
-
- Buffer buffer = buffersFirst;
- while(buffer != null)
- {
- // This reloads the token marker and sends a message
- // which causes edit panes to repaint their text areas
- buffer.setMode();
-
- buffer = buffer.next;
- }
- } //}}}
-
- //{{{ getMode() method
- /**
- * Returns the edit mode with the specified name.
- * @param name The edit mode
- */
- public static Mode getMode(String name)
- {
- return ModeProvider.instance.getMode(name);
- } //}}}
-
- //{{{ getModes() method
- /**
- * Returns an array of installed edit modes.
- */
- public static Mode[] getModes()
- {
- return ModeProvider.instance.getModes();
- } //}}}
-
- //}}}
-
- //{{{ Buffer creation methods
-
- //{{{ openFiles() method
- /**
- * Opens the file names specified in the argument array. This
- * handles +line and +marker arguments just like the command
- * line parser.
- * @param parent The parent directory
- * @param args The file names to open
- * @since jEdit 3.2pre4
- */
- public static Buffer openFiles(View view, String parent, String[] args)
- {
- Buffer retVal = null;
- Buffer lastBuffer = null;
-
- for(int i = 0; i < args.length; i++)
- {
- String arg = args[i];
- if(arg == null)
- continue;
- else if(arg.startsWith("+line:") || arg.startsWith("+marker:"))
- {
- if(lastBuffer != null)
- gotoMarker(view,lastBuffer,arg);
- continue;
- }
-
- lastBuffer = openFile((View)null,parent,arg,false,null);
-
- if(retVal == null && lastBuffer != null)
- retVal = lastBuffer;
- }
-
- if(view != null && retVal != null)
- view.setBuffer(retVal,true);
-
- return retVal;
- } //}}}
-
- //{{{ openFile() methods
- /**
- * Opens a file. Note that as of jEdit 2.5pre1, this may return
- * null if the buffer could not be opened.
- * @param view The view to open the file in
- * @param path The file path
- *
- * @return the buffer, or null if jEdit was unable to load it
- *
- * @since jEdit 2.4pre1
- */
- public static Buffer openFile(View view, String path)
- {
- return openFile(view,null,path,false,new Hashtable());
- }
- /**
- * @deprecated The openFile() forms with the readOnly parameter
- * should not be used. The readOnly prameter is no longer supported.
- */
- @Deprecated
- public static Buffer openFile(View view, String parent,
- String path, boolean readOnly, boolean newFile)
- {
- return openFile(view,parent,path,newFile,new Hashtable());
- }
- /**
- * @deprecated The openFile() forms with the readOnly parameter
- * should not be used. The readOnly prameter is no longer supported.
- */
- @Deprecated
- public static Buffer openFile(View view, String parent,
- String path, boolean readOnly, boolean newFile,
- Hashtable props)
- {
- return openFile(view,parent,path,newFile,props);
- }
-
- /**
- * Opens a file. This may return null if the buffer could not be
- * opened for some reason.
- * @param view The view to open the file in. If it is null, the file
- * will be opened and added to the bufferSet of the current edit pane,
- * but not selected
- * @param parent The parent directory of the file
- * @param path The path name of the file
- * @param newFile True if the file should not be loaded from disk
- * be prompted if it should be reloaded
- * @param props Buffer-local properties to set in the buffer
- *
- * @return the buffer, or null if jEdit was unable to load it
- *
- * @since jEdit 3.2pre10
- */
- public static Buffer openFile(View view, String parent,
- String path, boolean newFile, Hashtable props)
- {
- return openFile(view == null ? null : view.getEditPane(), parent, path, newFile, props);
- }
-
- /**
- * Opens a file. Note that as of jEdit 2.5pre1, this may return
- * null if the buffer could not be opened.
- * @param editPane the EditPane to open the file in.
- * @param path The file path
- *
- * @return the buffer, or null if jEdit was unable to load it
- *
- * @since jEdit 4.3pre17
- */
- public static Buffer openFile(EditPane editPane, String path)
- {
- return openFile(editPane,null,path,false,new Hashtable());
- }
-
- /**
- * Opens a file. This may return null if the buffer could not be
- * opened for some reason.
- * @param editPane the EditPane to open the file in.
- * @param parent The parent directory of the file
- * @param path The path name of the file
- * @param newFile True if the file should not be loaded from disk
- * be prompted if it should be reloaded
- * @param props Buffer-local properties to set in the buffer
- *
- * @return the buffer, or null if jEdit was unable to load it
- *
- * @since jEdit 4.3pre17
- */
- public static Buffer openFile(EditPane editPane, String parent,
- String path, boolean newFile, Hashtable props)
- {
- PerspectiveManager.setPerspectiveDirty(true);
-
- if(editPane != null && parent == null && editPane.getBuffer() != null)
- parent = editPane.getBuffer().getDirectory();
-
- try
- {
- URL u = new URL(path);
- if (u.getProtocol().equals("file"))
- path = URLDecoder.decode(u.getPath());
- }
- catch (MalformedURLException mue)
- {
- path = MiscUtilities.constructPath(parent,path);
- }
-
-
- if(props == null)
- props = new Hashtable();
- composeBufferPropsFromHistory(props, path);
-
- Buffer newBuffer;
-
- synchronized (editBusOrderingLock)
- {
- View view = editPane == null ? null : editPane.getView();
- synchronized(bufferListLock)
- {
- Buffer buffer = getBuffer(path);
- if(buffer != null)
- {
- if(editPane != null)
- editPane.setBuffer(buffer,true);
-
- return buffer;
- }
-
- newBuffer = new Buffer(path,newFile,false,props);
-
- if(!newBuffer.load(view,false))
- return null;
- addBufferToList(newBuffer);
- if (editPane != null)
- bufferSetManager.addBuffer(editPane.getBufferSet(), newBuffer);
- else
- bufferSetManager.addBuffer(jEdit.getActiveView(), newBuffer);
- }
-
- EditBus.send(new BufferUpdate(newBuffer,view,BufferUpdate.CREATED));
- }
-
- if(editPane != null)
- editPane.setBuffer(newBuffer,true);
-
- return newBuffer;
- } //}}}
-
- //{{{ openTemporary() methods
- /**
- * Opens a temporary buffer. A temporary buffer is like a normal
- * buffer, except that an event is not fired, the the buffer is
- * not added to the buffers list.
- *
- * @param view The view to open the file in
- * @param parent The parent directory of the file
- * @param path The path name of the file
- * @param newFile True if the file should not be loaded from disk
- *
- * @return the buffer, or null if jEdit was unable to load it
- *
- * @since jEdit 3.2pre10
- */
- public static Buffer openTemporary(View view, String parent,
- String path, boolean newFile)
- {
- return openTemporary(view, parent, path, newFile, null);
- }
- /**
- * Opens a temporary buffer. A temporary buffer is like a normal
- * buffer, except that an event is not fired, the the buffer is
- * not added to the buffers list.
- *
- * @param view The view to open the file in
- * @param parent The parent directory of the file
- * @param path The path name of the file
- * @param newFile True if the file should not be loaded from disk
- * @param props Buffer-local properties to set in the buffer
- *
- * @return the buffer, or null if jEdit was unable to load it
- *
- * @since jEdit 4.3pre10
- */
- public static Buffer openTemporary(View view, String parent,
- String path, boolean newFile, Hashtable props)
- {
- if(view != null && parent == null)
- parent = view.getBuffer().getDirectory();
-
- if(MiscUtilities.isURL(path))
- {
- if(MiscUtilities.getProtocolOfURL(path).equals("file"))
- path = path.substring(5);
- }
-
- path = MiscUtilities.constructPath(parent,path);
-
- if(props == null)
- props = new Hashtable();
- composeBufferPropsFromHistory(props, path);
-
- synchronized(bufferListLock)
- {
- Buffer buffer = getBuffer(path);
- if(buffer != null)
- return buffer;
-
- buffer = new Buffer(path,newFile,true,props);
- buffer.setBooleanProperty(Buffer.ENCODING_AUTODETECT, true);
- if(!buffer.load(view,false))
- return null;
- else
- return buffer;
- }
- } //}}}
-
- //{{{ commitTemporary() method
- /**
- * Adds a temporary buffer to the buffer list. This must be done
- * before allowing the user to interact with the buffer in any
- * way.
- * @param buffer The buffer
- */
- public static void commitTemporary(Buffer buffer)
- {
- if(!buffer.isTemporary())
- return;
-
- PerspectiveManager.setPerspectiveDirty(true);
-
- addBufferToList(buffer);
- buffer.commitTemporary();
-
- // send full range of events to avoid breaking plugins
- EditBus.send(new BufferUpdate(buffer,null,BufferUpdate.CREATED));
- EditBus.send(new BufferUpdate(buffer,null,BufferUpdate.LOAD_STARTED));
- EditBus.send(new BufferUpdate(buffer,null,BufferUpdate.LOADED));
- } //}}}
-
- //{{{ newFile() methods
- /**
- * Creates a new `untitled' file.
- *
- * @param view The view to create the file in
- *
- * @return the new buffer
- */
- public static Buffer newFile(View view)
- {
- return newFile(view == null ? null : view.getEditPane());
- }
-
- /**
- * Creates a new `untitled' file.
- * @param view The view to create the file in
- * @param dir The directory to create the file in
- *
- * @return the new buffer
- *
- * @since jEdit 3.1pre2
- */
- public static Buffer newFile(View view, String dir)
- {
- EditPane editPane = null;
- if (view != null)
- {
- editPane = view.getEditPane();
- }
- else
- {
- View v = getActiveView();
- if (v != null)
- {
- editPane = v.getEditPane();
- }
- }
- return newFile(editPane, dir);
- }
-
- /**
- * Creates a new `untitled' file.
- *
- * @param editPane The editPane to create the file in
- *
- * @return the new buffer
- * @since jEdit 4.3pre17
- */
- public static Buffer newFile(EditPane editPane)
- {
- String path;
-
- if(editPane != null && editPane.getBuffer() != null)
- {
- path = editPane.getBuffer().getDirectory();
- VFS vfs = VFSManager.getVFSForPath(path);
- // don't want 'New File' to create a read only buffer
- // if current file is on SQL VFS or something
- if((vfs.getCapabilities() & VFS.WRITE_CAP) == 0)
- path = System.getProperty("user.home");
- }
- else
- path = null;
-
- return newFile(editPane,path);
- }
-
- /**
- * Creates a new `untitled' file.
- *
- * @param editPane The editPane to create the file in
- * @param dir The directory to create the file in
- *
- * @return the new buffer
- *
- * @since jEdit 4.3pre17
- */
- public static Buffer newFile(EditPane editPane, String dir)
- {
- if (editPane != null)
- {
- BufferSet bufferSet = editPane.getBufferSet();
- Buffer[] buffers = bufferSet.getAllBuffers();
- for (Buffer buf:buffers)
- {
- if (buf.isUntitled() && !buf.isDirty())
- {
-
- if (!MiscUtilities.getParentOfPath(buf.getPath()).equals(dir))
- {
- // Find the highest Untitled-n file
- int untitledCount = getNextUntitledBufferId();
-
- Buffer newBuffer = openFile(editPane,dir,"Untitled-" + untitledCount,true,null);
- jEdit.closeBuffer(editPane, buf);
- return newBuffer;
- }
- /* if "never mark untitled buffers dirty"
- * is selected, we might have contents in non-dirty
- * untitled buffers. We must clear those contents
- * if user requested new file.
- */
- int l = buf.getLength();
- if (l > 0)
- buf.remove(0, l);
- editPane.setBuffer(buf);
- return buf;
- }
- }
- }
-
- // Find the highest Untitled-n file
- int untitledCount = getNextUntitledBufferId();
-
- return openFile(editPane,dir,"Untitled-" + untitledCount,true,null);
- } //}}}
-
- //}}}
-
- //{{{ Buffer management methods
-
- //{{{ closeBuffer() method
- /**
- * Closes a buffer. If there are unsaved changes, the user is
- * prompted if they should be saved first.
- * @param view The view
- * @param buffer The buffer
- * @return True if the buffer was really closed, false otherwise
- */
- public static boolean closeBuffer(View view, Buffer buffer)
- {
- // Wait for pending I/O requests
- if(buffer.isPerformingIO())
- {
- VFSManager.waitForRequests();
- if(VFSManager.errorOccurred())
- return false;
- }
-
- if(buffer.isDirty())
- {
- Object[] args = { buffer.getName() };
- int result = GUIUtilities.confirm(view,"notsaved",args,
- JOptionPane.YES_NO_CANCEL_OPTION,
- JOptionPane.WARNING_MESSAGE);
- if(result == JOptionPane.YES_OPTION)
- {
- if(!buffer.save(view,null,true))
- return false;
-
- VFSManager.waitForRequests();
- if(buffer.getBooleanProperty(BufferIORequest
- .ERROR_OCCURRED))
- {
- return false;
- }
- }
- else if(result != JOptionPane.NO_OPTION)
- return false;
- }
-
- _closeBuffer(view,buffer);
-
- return true;
- } //}}}
-
- //{{{ closeBuffer() method
- /**
- * Close a buffer.
- * The buffer is first removed from the EditPane's bufferSet.
- * If the buffer is not in any bufferSet after that, it is closed
- * @param editPane the edit pane (it cannot be null)
- * @param buffer the buffer (it cannot be null)
- * @since jEdit 4.3pre15
- */
- public static void closeBuffer(EditPane editPane, Buffer buffer)
- {
- int bufferSetsCount = bufferSetManager.countBufferSets(buffer);
- if (bufferSetsCount < 2)
- {
- closeBuffer(editPane.getView(), buffer);
- }
- else
- {
- bufferSetManager.removeBuffer(editPane, buffer);
- }
- } //}}}
-
- //{{{ _closeBuffer() method
- /**
- * Closes the buffer, even if it has unsaved changes.
- * @param view The view, may be null
- * @param buffer The buffer
- *
- * @exception NullPointerException if the buffer is null
- *
- * @since jEdit 2.2pre1
- */
- public static void _closeBuffer(View view, Buffer buffer)
- {
- if(buffer.isClosed())
- {
- // can happen if the user presses C+w twice real
- // quick and the buffer has unsaved changes
- return;
- }
-
- PerspectiveManager.setPerspectiveDirty(true);
-
- if(!buffer.isNewFile())
- {
- if(view != null)
- view.getEditPane().saveCaretInfo();
- Integer _caret = (Integer)buffer.getProperty(Buffer.CARET);
- int caret = _caret == null ? 0 : _caret.intValue();
-
- BufferHistory.setEntry(buffer.getPath(),caret,
- (Selection[])buffer.getProperty(Buffer.SELECTION),
- buffer.getStringProperty(JEditBuffer.ENCODING),
- buffer.getMode().getName());
- }
-
- String path = buffer.getSymlinkPath();
- if((VFSManager.getVFSForPath(path).getCapabilities()
- & VFS.CASE_INSENSITIVE_CAP) != 0)
- {
- path = path.toLowerCase();
- }
- EditBus.send(new BufferUpdate(buffer,view,BufferUpdate.CLOSING));
- bufferHash.remove(path);
- removeBufferFromList(buffer);
- buffer.close();
- DisplayManager.bufferClosed(buffer);
- bufferSetManager.removeBuffer(buffer);
- EditBus.send(new BufferUpdate(buffer,view,BufferUpdate.CLOSED));
- if(jEdit.getBooleanProperty("persistentMarkers"))
- buffer.updateMarkersFile(view);
- } //}}}
-
- //{{{ closeAllBuffers() methods
- /**
- * Closes all open buffers.
- * @param view The view
- *
- * @return true if all buffers were closed, false otherwise
- */
- public static boolean closeAllBuffers(View view)
- {
- return closeAllBuffers(view,false);
- }
- /**
- * Closes all open buffers.
- * @param view The view
- * @param isExiting This must be false unless this method is
- * being called by the exit() method
- *
- * @return true if all buffers were closed, false otherwise
- */
- public static boolean closeAllBuffers(View view, boolean isExiting)
- {
- if(view != null)
- view.getEditPane().saveCaretInfo();
-
- boolean dirty = false;
-
- boolean saveRecent = !(isExiting && jEdit.getBooleanProperty("restore"));
-
- Buffer buffer = buffersFirst;
- while(buffer != null)
- {
- if(buffer.isDirty())
- {
- dirty = true;
- break;
- }
- buffer = buffer.next;
- }
-
- if(dirty)
- {
- boolean ok = new CloseDialog(view).isOK();
- if(!ok)
- return false;
- }
-
- // Wait for pending I/O requests
- VFSManager.waitForRequests();
- if(VFSManager.errorOccurred())
- return false;
-
- // close remaining buffers (the close dialog only deals with
- // dirty ones)
-
- buffer = buffersFirst;
-
- // zero it here so that BufferTabs doesn't have any problems
- buffersFirst = buffersLast = null;
- bufferHash.clear();
- bufferCount = 0;
-
- while(buffer != null)
- {
- if(!buffer.isNewFile() && saveRecent)
- {
- Integer _caret = (Integer)buffer.getProperty(Buffer.CARET);
- int caret = _caret == null ? 0 : _caret.intValue();
- BufferHistory.setEntry(buffer.getPath(),caret,
- (Selection[])buffer.getProperty(Buffer.SELECTION),
- buffer.getStringProperty(JEditBuffer.ENCODING),
- buffer.getMode().getName());
- }
-
- buffer.close();
- DisplayManager.bufferClosed(buffer);
- if(!isExiting)
- {
- bufferSetManager.removeBuffer(buffer);
- EditBus.send(new BufferUpdate(buffer,view,
- BufferUpdate.CLOSED));
- }
- if(jEdit.getBooleanProperty("persistentMarkers"))
- buffer.updateMarkersFile(view);
- buffer = buffer.next;
- }
-
- PerspectiveManager.setPerspectiveDirty(true);
-
- return true;
- } //}}}
-
- //{{{ saveAllBuffers() method
- /**
- * Saves all open buffers.
- * @param view The view
- * @since jEdit 4.2pre1
- */
- public static void saveAllBuffers(View view)
- {
- saveAllBuffers(view,jEdit.getBooleanProperty("confirmSaveAll"));
- } //}}}
-
- //{{{ saveAllBuffers() method
- /**
- * Saves all open buffers.
- * @param view The view
- * @param confirm If true, a confirmation dialog will be shown first
- * @since jEdit 2.7pre2
- */
- public static void saveAllBuffers(View view, boolean confirm)
- {
- if(confirm)
- {
- int result = GUIUtilities.confirm(view,"saveall",null,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- if(result != JOptionPane.YES_OPTION)
- return;
- }
-
- Buffer current = view.getBuffer();
-
- Buffer buffer = buffersFirst;
- while(buffer != null)
- {
- if(buffer.isDirty())
- {
- if(buffer.isNewFile())
- view.setBuffer(buffer,true);
- buffer.save(view,null,true,true);
- }
-
- buffer = buffer.next;
- }
-
- view.setBuffer(current,true);
- } //}}}
-
- //{{{ reloadAllBuffers() method
- /**
- * Reloads all open buffers.
- * @param view The view
- * @param confirm If true, a confirmation dialog will be shown first
- * if any buffers are dirty
- * @since jEdit 2.7pre2
- */
- public static void reloadAllBuffers(View view, boolean confirm)
- {
- boolean hasDirty = false;
- Buffer[] buffers = jEdit.getBuffers();
-
- for(int i = 0; i < buffers.length && !hasDirty; i++)
- hasDirty = !buffers[i].isUntitled() && buffers[i].isDirty();
-
- if(confirm && hasDirty)
- {
- int result = GUIUtilities.confirm(view,"reload-all",null,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- if(result != JOptionPane.YES_OPTION)
- return;
- }
-
- // save caret info. Buffer.load() will load it.
- visit(new SaveCaretInfoVisitor());
-
-
- for(int i = 0; i < buffers.length; i++)
- {
- Buffer buffer = buffers[i];
- if (buffer.isUntitled())
- continue;
- buffer.load(view,true);
- }
- } //}}}
-
- //{{{ _getBuffer() method
- /**
- * Returns the buffer with the specified path name. The path name
- * must be an absolute, canonical, path.
- *
- * @param path The path name
- *
- * @return the searched buffer, or null if it is not already open
- *
- * @see MiscUtilities#constructPath(String,String)
- * @see MiscUtilities#resolveSymlinks(String)
- * @see #getBuffer(String)
- *
- * @since jEdit 4.2pre7
- */
- public static Buffer _getBuffer(String path)
- {
- // paths on case-insensitive filesystems are stored as lower
- // case in the hash.
- if((VFSManager.getVFSForPath(path).getCapabilities()
- & VFS.CASE_INSENSITIVE_CAP) != 0)
- {
- path = path.toLowerCase();
- }
-
- synchronized(bufferListLock)
- {
- return bufferHash.get(path);
- }
- } //}}}
-
- //{{{ getBuffer() method
- /**
- * Returns the buffer with the specified path name. The path name
- * must be an absolute path. This method automatically resolves
- * symbolic links. If performance is critical, cache the canonical
- * path and call {@link #_getBuffer(String)} instead.
- *
- * @param path The path name
- *
- * @return the searched buffer, or null if it is not already open
- *
- * @see MiscUtilities#constructPath(String,String)
- * @see MiscUtilities#resolveSymlinks(String)
- */
- public static Buffer getBuffer(String path)
- {
- return _getBuffer(MiscUtilities.resolveSymlinks(path));
- } //}}}
-
- //{{{ getBuffers() method
- /**
- * Returns an array of open buffers.
- * @return an array of all open buffers
- */
- public static Buffer[] getBuffers()
- {
- synchronized(bufferListLock)
- {
- Buffer[] buffers = new Buffer[bufferCount];
- Buffer buffer = buffersFirst;
- for(int i = 0; i < bufferCount; i++)
- {
- buffers[i] = buffer;
- buffer = buffer.next;
- }
- return buffers;
- }
- } //}}}
-
- //{{{ getBufferCount() method
- /**
- * Returns the number of open buffers.
- */
- public static int getBufferCount()
- {
- return bufferCount;
- } //}}}
-
- //{{{ getFirstBuffer() method
- /**
- * Returns the first buffer.
- */
- public static Buffer getFirstBuffer()
- {
- return buffersFirst;
- } //}}}
-
- //{{{ getLastBuffer() method
- /**
- * Returns the last buffer.
- * @return the last buffer
- */
- public static Buffer getLastBuffer()
- {
- return buffersLast;
- } //}}}
-
- //{{{ moveBuffer() method
- /**
- * Moves a buffer from a old position to a new position in the
- * BufferSet used in an EditPane.
- * @param editPane The EditPane in which a buffer is moved
- * @param oldPosition The position before the move
- * @param newPosition The position after the move
- */
- public static void moveBuffer(EditPane editPane,
- int oldPosition, int newPosition)
- {
- bufferSetManager.moveBuffer(editPane, oldPosition, newPosition);
- } //}}}
-
- //{{{ getGlobalBufferSet() method
- /**
- * Returns the global buffer set, which can be shared by several
- * views/editpanes.
- * @return the global buffer set
- * @since jEdit 4.3pre17
- */
- public static BufferSet getGlobalBufferSet()
- {
- return globalBufferSet;
- } //}}}
-
- //{{{ getBufferSetManager() method
- /**
- * Returns the bufferSet manager.
- * @return the bufferSetManager
- * @since jEdit 4.3pre15
- */
- public static BufferSetManager getBufferSetManager()
- {
- return bufferSetManager;
- } //}}}
-
- //{{{ getPropertyManager() method
- /**
- * @return the propertyManager
- * @since jEdit 4.3pre15
- */
- public static JEditPropertyManager getPropertyManager()
- {
- return propertyManager;
- } //}}}
-
- //{{{ checkBufferStatus() methods
- /**
- * Checks each buffer's status on disk and shows the dialog box
- * informing the user that buffers changed on disk, if necessary.
- * @param view The view
- * @since jEdit 4.2pre1
- */
- public static void checkBufferStatus(View view)
- {
- checkBufferStatus(view,false);
- }
-
- /**
- * Checks buffer status on disk and shows the dialog box
- * informing the user that buffers changed on disk, if necessary.
- * @param view The view
- * @param currentBuffer indicates whether to check only the current buffer
- * @since jEdit 4.2pre1
- */
- public static void checkBufferStatus(View view, boolean currentBuffer)
- {
- // still need to call the status check even if the option is
- // off, so that the write protection is updated if it changes
- // on disk
-
- // auto reload changed buffers?
- boolean autoReload = getBooleanProperty("autoReload");
-
- // the problem with this is that if we have two edit panes
- // looking at the same buffer and the file is reloaded both
- // will jump to the same location
- visit(new SaveCaretInfoVisitor());
-
- Buffer buffer;
- buffer = buffersFirst;
-
- int[] states = new int[bufferCount];
- int i = 0;
- boolean notifyFileChanged = false;
- while(buffer != null)
- {
- if(currentBuffer && buffer != view.getBuffer())
- {
- buffer = buffer.next;
- i++;
- continue;
- }
-
- states[i] = buffer.checkFileStatus(view);
-
- switch(states[i])
- {
- case Buffer.FILE_CHANGED:
- if(buffer.getAutoReload())
- {
- if(buffer.isDirty())
- notifyFileChanged = true;
- else
- buffer.load(view,true);
- }
- else // no automatic reload even if general setting is true
- autoReload = false;
- // don't notify user if "do nothing" was chosen
- if(buffer.getAutoReloadDialog())
- notifyFileChanged = true;
- break;
- case Buffer.FILE_DELETED:
- notifyFileChanged = true;
- break;
- }
-
- buffer = buffer.next;
- i++;
- }
-
- if(notifyFileChanged)
- new FilesChangedDialog(view,states,autoReload);
- } //}}}
-
- //}}}
-
- //{{{ View methods
-
- //{{{ getInputHandler() method
- /**
- * Returns the current input handler (key binding to action mapping)
- * @see org.gjt.sp.jedit.gui.InputHandler
- */
- public static InputHandler getInputHandler()
- {
- return inputHandler;
- } //}}}
-
- /* public static void newViewTest()
- {
- long time = System.currentTimeMillis();
- for(int i = 0; i < 30; i++)
- {
- Buffer b = newFile(null);
- b.insert(0,"x");
- new View(b,null,false);
- }
- System.err.println(System.currentTimeMillis() - time);
- } */
-
- //{{{ newView() methods
- /**
- * Creates a new view.
- * @param view An existing view
- * @since jEdit 3.2pre2
- */
- public static View newView(View view)
- {
- return newView(view,null,false);
- }
- /**
- * Creates a new view of a buffer.
- * @param view An existing view
- * @param buffer The buffer
- */
- public static View newView(View view, Buffer buffer)
- {
- return newView(view,buffer,false);
- }
- /**
- * Creates a new view of a buffer.
- * @param view An existing view
- * @param buffer The buffer
- * @param plainView If true, the view will not have dockable windows or
- * tool bars.
- *
- * @since 4.1pre2
- */
- public static View newView(View view, Buffer buffer, boolean plainView)
- {
- View.ViewConfig config;
- if(view != null && (plainView == view.isPlainView()))
- {
- config = view.getViewConfig();
- config.x -= 20;
- config.y += 20;
- }
- else
- {
- config = new View.ViewConfig(plainView);
- }
- return newView(view,buffer,config);
- }
-
- /**
- * Creates a new view.
- * @param view An existing view
- * @param buffer A buffer to display, or null
- * @param config Encapsulates the view geometry, split configuration
- * and if the view is a plain view
- * @since jEdit 4.2pre1
- */
- public static View newView(View view, Buffer buffer, View.ViewConfig config)
- {
- // Mark the perspective as dirty, unless the new view is created
- // during jEdit startup, by the loading of the perspective.
- if (isStartupDone())
- PerspectiveManager.setPerspectiveDirty(true);
-
- try
- {
- if(view != null)
- {
- view.showWaitCursor();
- view.getEditPane().saveCaretInfo();
- }
-
- View newView = new View(buffer,config);
- addViewToList(newView);
-
- newView.pack();
- newView.adjust(view, config);
-
- EditBus.send(new ViewUpdate(newView,ViewUpdate.CREATED));
-
- newView.setVisible(true);
-
- if(!config.plainView)
- {
- int index;
- synchronized (startupDone)
- {
- index = startupDone.size();
- startupDone.add(false);
- }
- SwingUtilities.invokeLater(new DockingLayoutSetter(
- newView, config, index));
- }
-
- // show tip of the day
- if(newView == viewsFirst)
- {
- newView.getTextArea().requestFocus();
-
- // Don't show the welcome message if jEdit was started
- // with the -nosettings switch
- if(settingsDirectory != null && getBooleanProperty("firstTime"))
- new HelpViewer("welcome.html");
- else if(jEdit.getBooleanProperty("tip.show"))
- new TipOfTheDay(newView);
-
- setBooleanProperty("firstTime",false);
- }
- else
- GUIUtilities.requestFocus(newView,newView.getTextArea());
-
- return newView;
- }
- finally
- {
- if(view != null)
- view.hideWaitCursor();
- }
- } //}}}
-
- //{{{ closeView() method
- /**
- * Closes a view.
- *
- * jEdit will exit if this was the last open view.
- */
- public static void closeView(View view)
- {
- closeView(view,true);
- } //}}}
-
- //{{{ getViews() method
- /**
- * Returns an array of all open views.
- */
- public static View[] getViews()
- {
- View[] views = new View[viewCount];
- View view = viewsFirst;
- for(int i = 0; i < viewCount; i++)
- {
- views[i] = view;
- view = view.next;
- }
- return views;
- } //}}}
-
- //{{{ getViewCount() method
- /**
- * Returns the number of open views.
- */
- public static int getViewCount()
- {
- return viewCount;
- } //}}}
-
- //{{{ getFirstView() method
- /**
- * Returns the first view.
- */
- public static View getFirstView()
- {
- return viewsFirst;
- } //}}}
-
- //{{{ getLastView() method
- /**
- * Returns the last view.
- */
- public static View getLastView()
- {
- return viewsLast;
- } //}}}
-
- //{{{ getActiveView() method
- /**
- * Returns the currently focused view.
- * @since jEdit 4.1pre1
- */
- public static View getActiveView()
- {
- if(activeView == null)
- {
- // eg user just closed a view and didn't focus another
- return viewsFirst;
- }
- else
- return activeView;
- } //}}}
-
- //}}}
-
- //{{{ Miscellaneous methods
-
- //{{{ relocateSettings() method
- public static void relocateSettings()
- {
- String oldSettingsPath = MiscUtilities.constructPath(
- System.getProperty("user.home"),
- ".jedit");
- File oldSettingsDir = new File(oldSettingsPath);
- File newSettingsDir = new File(settingsDirectory);
- if(oldSettingsDir.exists() && !newSettingsDir.exists())
- {
- Log.log(Log.NOTICE,jEdit.class,"Old settings directory found (HOME/.jedit). Moving to new location ("+newSettingsDir+")");
- try
- {
- oldSettingsDir.renameTo(newSettingsDir);
- }
- catch(SecurityException se)
- {
- Log.log(Log.ERROR,jEdit.class,se);
- }
- }
- }
- //}}}
-
- //{{{ isStartupDone() method
- /**
- * Whether jEdit startup is over.
- * @since jEdit 4.3pre17
- */
- public static boolean isStartupDone()
- {
- return (! startupDone.contains(false));
- } //}}}
-
- //{{{ isMainThread() method
- /**
- * Returns true if the currently running thread is the main thread.
- * @since jEdit 4.2pre1
- */
- public static boolean isMainThread()
- {
- return Thread.currentThread() == mainThread;
- } //}}}
-
- //{{{ isBackgroundMode() method
- /**
- * Returns true if jEdit was started with the <code>-background</code>
- * command-line switch.
- * @since jEdit 4.0pre4
- */
- public static boolean isBackgroundModeEnabled()
- {
- return background;
- } //}}}
-
- //{{{ showMemoryDialog() method
- /**
- * Performs garbage collection and displays a dialog box showing
- * memory status.
- * @param view The view
- * @since jEdit 4.0pre1
- */
- public static void showMemoryDialog(View view)
- {
- Runtime rt = Runtime.getRuntime();
- long usedBefore = rt.totalMemory() - rt.freeMemory();
- System.gc();
- long free = rt.freeMemory();
- long total = rt.totalMemory();
- long used = total - free;
-
- int totalKb = (int) (total / 1024);
- int usedKb = (int) (used / 1024);
- JProgressBar progress = new JProgressBar(0,totalKb);
- progress.setValue(usedKb);
- progress.setStringPainted(true);
- progress.setString(jEdit.getProperty("memory-status.use",
- new Object[] { usedKb, totalKb }));
-
- Object[] message = new Object[4];
- message[0] = getProperty("memory-status.gc",
- new Object[] { (usedBefore - used) / 1024 });
- message[1] = Box.createVerticalStrut(12);
- message[2] = progress;
- message[3] = Box.createVerticalStrut(6);
-
- JOptionPane.showMessageDialog(view,message,
- jEdit.getProperty("memory-status.title"),
- JOptionPane.INFORMATION_MESSAGE);
- } //}}}
-
- //{{{ getJEditHome() method
- /**
- * Returns the jEdit install directory.
- */
- public static String getJEditHome()
- {
- return jEditHome;
- } //}}}
-
- //{{{ getSettingsDirectory() method
- /**
- * Returns the path of the directory where user-specific settings
- * are stored. This will be <code>null</code> if jEdit was
- * started with the <code>-nosettings</code> command-line switch; do not
- * blindly use this method without checking for a <code>null</code>
- * return value first.
- */
- public static String getSettingsDirectory()
- {
- return settingsDirectory;
- } //}}}
-
- //{{{ getJARCacheDirectory() method
- /**
- * Returns the directory where plugin cache files are stored.
- * @since jEdit 4.2pre1
- */
- public static String getJARCacheDirectory()
- {
- return jarCacheDirectory;
- } //}}}
-
- //{{{ backupSettingsFile() method
- /**
- * Backs up the specified file in the settings directory.
- * You should call this on any settings files your plugin
- * writes.
- * @param file The file
- * @since jEdit 4.0pre1
- */
- public static void backupSettingsFile(File file)
- {
- if(settingsDirectory == null || !file.exists())
- return;
-
- String backupDir = MiscUtilities.constructPath(
- settingsDirectory,"settings-backup");
- File dir = new File(backupDir);
- if(!dir.exists())
- dir.mkdirs();
-
- // ... sweet. saveBackup() will create backupDir if it
- // doesn't exist.
-
- MiscUtilities.saveBackup(file,5,null,"~",backupDir);
- } //}}}
-
- //{{{ saveSettings() method
- /**
- * Saves all user preferences to disk.
- */
- public static void saveSettings()
- {
- if(settingsDirectory == null)
- return;
-
- Abbrevs.save();
- FavoritesVFS.saveFavorites();
- HistoryModel.saveHistory();
- Registers.saveRegisters();
- SearchAndReplace.save();
- BufferHistory.save();
- KillRing.getInstance().save();
-
- File file1 = new File(MiscUtilities.constructPath(
- settingsDirectory,"#properties#save#"));
- File file2 = new File(MiscUtilities.constructPath(
- settingsDirectory,"properties"));
- if(file2.exists() && file2.lastModified() != propsModTime)
- {
- Log.log(Log.WARNING,jEdit.class,file2 + " changed"
- + " on disk; will not save user properties");
- }
- else
- {
- backupSettingsFile(file2);
- OutputStream out = null;
- try
- {
- out = new FileOutputStream(file1);
- propMgr.saveUserProps(out);
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,jEdit.class,io);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
- file2.delete();
- if (! file1.renameTo(file2))
- {
- Log.log(Log.ERROR,jEdit.class,"Failed to rename \"" + file1 +
- "\" to the user properties file \"" + file2 + "\".");
- }
- propsModTime = file2.lastModified();
- }
- } //}}}
-
- // {{{ createTextArea() method
- /**
- * Create a standalone TextArea.
- *
- * @return a textarea
- * @since 4.3pre13
- * @deprecated use new JEditEmbeddedTextArea() instead
- */
- @Deprecated
- public static TextArea createTextArea()
- {
- return new JEditEmbeddedTextArea();
- } // }}}
-
- //{{{ exit() method
- /**
- * Exits cleanly from jEdit, prompting the user if any unsaved files
- * should be saved first.
- * @param view The view from which this exit was called
- * @param reallyExit If background mode is enabled and this parameter
- * is true, then jEdit will close all open views instead of exiting
- * entirely.
- */
- public static void exit(View view, boolean reallyExit)
- {
- // Close dialog, view.close() call need a view...
- if(view == null)
- view = activeView;
-
- // Wait for pending I/O requests
- VFSManager.waitForRequests();
-
- // Create a new EditorExitRequested
- EditorExitRequested eer = new EditorExitRequested(view);
-
- // Send EditorExitRequested
- EditBus.send(eer);
-
- // Check if the ExitRequest has been cancelled
- // if so, do not proceed anymore in the exiting
- if (eer.hasBeenExitCancelled())
- {
- Log.log(Log.MESSAGE, jEdit.class, "Exit has been cancelled");
- return;
- }
-
- // Even if reallyExit is false, we still exit properly
- // if background mode is off
- reallyExit |= !background;
-
- PerspectiveManager.savePerspective(false);
-
- try
- {
- PerspectiveManager.setPerspectiveEnabled(false);
-
- // Close all buffers
- if(!closeAllBuffers(view,reallyExit))
- return;
- }
- finally
- {
- PerspectiveManager.setPerspectiveEnabled(true);
- }
-
- // If we are running in background mode and
- // reallyExit was not specified, then return here.
- if(!reallyExit)
- {
- // in this case, we can't directly call
- // view.close(); we have to call closeView()
- // for all open views
- view = viewsFirst;
- while(view != null)
- {
- closeView(view,false);
- view = view.next;
- }
-
- // Save settings in case user kills the backgrounded
- // jEdit process
- saveSettings();
- }
- else
- {
-
- // Send EditorExiting
- EditBus.send(new EditorExiting(null));
-
- // Save view properties here
- if(view != null)
- {
- view.close();
- removeViewFromList(view);
- }
-
- // Stop autosave timer
- Autosave.stop();
-
- // Stop server
- if(server != null)
- server.stopServer();
-
- // Stop all plugins
- PluginJAR[] plugins = getPluginJARs();
- for(int i = 0; i < plugins.length; i++)
- {
- removePluginJAR(plugins[i],true);
- }
-
-
- // Save settings
- saveSettings();
-
- // Close activity log stream
- Log.closeStream();
-
- // Byebye...
- System.exit(0);
- }
- } //}}}
-
- //{{{ getEditServer() method
- /**
- * Returns the edit server instance. You can use this to find out the
- * port number jEdit is listening on.
- * @since jEdit 4.2pre10
- */
- public static EditServer getEditServer()
- {
- return server;
- } //}}}
-
- //{{{ visit() method
- /**
- * Visit the views, editpanes and textareas
- * @param visitor the visitor
- * @since jEdit 4.3pre13
- */
- public static void visit(JEditVisitor visitor)
- {
- View view = jEdit.getFirstView();
- while (view != null)
- {
- visitor.visit(view);
- view.visit(visitor);
- view = view.getNext();
- }
- } //}}}
-
- //{{{ getRegisterStatusPrompt() method
- /**
- * Returns the status prompt for the given register action. Only
- * intended to be called from <code>actions.xml</code>.
- * @since jEdit 4.3pre16
- */
- public static String getRegisterStatusPrompt(String action)
- {
- String registerNameString = Registers.getRegisterNameString();
- return jEdit.getProperty("view.status." + action,
- new String[] {registerNameString == null ?
- jEdit.getProperty("view.status.no-registers") :
- registerNameString});
- } //}}}
-
- //}}}
-
- //{{{ Package-private members
-
- //{{{ updatePosition() method
- /**
- * If buffer sorting is enabled, this repositions the buffer.
- */
- static void updatePosition(String oldPath, Buffer buffer)
- {
- if((VFSManager.getVFSForPath(oldPath).getCapabilities()
- & VFS.CASE_INSENSITIVE_CAP) != 0)
- {
- oldPath = oldPath.toLowerCase();
- }
-
- bufferHash.remove(oldPath);
-
- String path = buffer.getSymlinkPath();
- if((VFSManager.getVFSForPath(path).getCapabilities()
- & VFS.CASE_INSENSITIVE_CAP) != 0)
- {
- path = path.toLowerCase();
- }
-
- bufferHash.put(path,buffer);
-
- if(sortBuffers)
- {
- removeBufferFromList(buffer);
- addBufferToList(buffer);
- }
- } //}}}
-
- //{{{ loadMode() method
- /**
- * Loads an XML-defined edit mode from the specified reader.
- * @param mode The edit mode
- */
- /* package-private */ static void loadMode(Mode mode)
- {
- final String fileName = (String)mode.getProperty("file");
- XModeHandler xmh = new XModeHandler(mode.getName())
- {
- @Override
- public void error(String what, Object subst)
- {
- String msg;
-
- Object line = "<unknown>";
- if(subst == null)
- msg = jEdit.getProperty("xmode-error." + what);
- else
- {
- msg = jEdit.getProperty("xmode-error." + what,
- new String[] { subst.toString() });
- if(subst instanceof Throwable)
- Log.log(Log.ERROR,this,subst);
- if (subst instanceof SAXParseException)
- {
- line = ((SAXParseException)subst).getLineNumber();
- }
- }
-
- Object[] args = { fileName, line, null, msg };
- GUIUtilities.error(null,"xmode-error",args);
- }
-
- @Override
- public TokenMarker getTokenMarker(String modeName)
- {
- Mode mode = getMode(modeName);
- if(mode == null)
- return null;
- else
- return mode.getTokenMarker();
- }
- };
- ModeProvider.instance.loadMode(mode, xmh);
- } //}}}
-
- //{{{ addPluginProps() method
- static void addPluginProps(Properties map)
- {
- propMgr.addPluginProps(map);
- } //}}}
-
- //{{{ removePluginProps() method
- static void removePluginProps(Properties map)
- {
- propMgr.removePluginProps(map);
- } //}}}
-
- //{{{ pluginError() method
- /**
- *
- * @param messageProp - a property of a message to print
- * @param args a list of arguments whch correspond to {0} and {1} in the string to print.
- */
- static void pluginError(String path, String messageProp,
- Object[] args)
- {
- synchronized(pluginErrorLock)
- {
- if(pluginErrors == null)
- pluginErrors = new Vector<ErrorListDialog.ErrorEntry>();
-
- ErrorListDialog.ErrorEntry newEntry =
- new ErrorListDialog.ErrorEntry(
- path,messageProp,args);
-
- for(int i = 0; i < pluginErrors.size(); i++)
- {
- if(pluginErrors.get(i).equals(newEntry))
- return;
- }
- pluginErrors.addElement(newEntry);
-
- if(isStartupDone())
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- showPluginErrorDialog();
- }
- });
- }
- }
- } //}}}
-
- //{{{ setActiveView() method
- static void setActiveView(View view)
- {
- jEdit.activeView = view;
- } //}}}
-
- //{{{ getActiveViewInternal() method
- /**
- * Returns the internal active view, which might be null.
- *
- * @since 4.3pre10
- */
- public static View getActiveViewInternal()
- {
- return activeView;
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Static variables
- private static String jEditHome;
- private static String settingsDirectory;
- private static String jarCacheDirectory;
- private static long propsModTime;
- private static PropertyManager propMgr;
- private static EditServer server;
- private static boolean background;
- private static ActionContext actionContext;
- private static ActionSet builtInActionSet;
- private static Vector<ErrorListDialog.ErrorEntry> pluginErrors;
- private static final Object pluginErrorLock = new Object();
- private static Vector<PluginJAR> jars;
-
- private static boolean saveCaret;
- private static InputHandler inputHandler;
-
- private static BufferSet globalBufferSet;
- private static BufferSetManager bufferSetManager;
-
- // buffer link list
- private static boolean sortBuffers;
- private static boolean sortByName;
- private static int bufferCount;
- private static Buffer buffersFirst;
- private static Buffer buffersLast;
- private static Map<String, Buffer> bufferHash;
-
- // makes openTemporary() thread-safe
- private static final Object bufferListLock = new Object();
-
- private static final Object editBusOrderingLock = new Object();
-
- // view link list
- private static int viewCount;
- private static View viewsFirst;
- private static View viewsLast;
- private static View activeView;
-
- private static Vector<Boolean> startupDone = new Vector<Boolean>();
-
- private static Thread mainThread;
- //}}}
-
- private jEdit() {}
-
- //{{{ usage() method
- private static void usage()
- {
- System.out.println("Usage: jedit [<options>] [<files>]");
-
- System.out.println(" <file> +marker:<marker>: Positions caret"
- + " at marker <marker>");
- System.out.println(" <file> +line:<line>: Positions caret"
- + " at line number <line>");
- System.out.println(" <file> +line:<line>,<column>: Positions caret"
- + " at line number <line> and column number <column>");
- System.out.println(" --: End of options");
- System.out.println(" -background: Run in background mode");
- System.out.println(" -nobackground: Disable background mode (default)");
- System.out.println(" -gui: Only if running in background mode; open initial view (default)");
- System.out.println(" -nogui: Only if running in background mode; don't open initial view");
- System.out.println(" -log=<level>: Log messages with level equal to or higher than this to");
- System.out.println(" standard error. <level> must be between 1 and 9. Default is 7.");
- System.out.println(" -newplainview: Client instance opens a new plain view");
- System.out.println(" -newview: Client instance opens a new view (default)");
- System.out.println(" -plugins: Load plugins (default)");
- System.out.println(" -noplugins: Don't load any plugins");
- System.out.println(" -restore: Restore previously open files (default)");
- System.out.println(" -norestore: Don't restore previously open files");
- System.out.println(" -reuseview: Client instance reuses existing view");
- System.out.println(" -quit: Quit a running instance");
- System.out.println(" -run=<script>: Run the specified BeanShell script");
- System.out.println(" -server: Read/write server info from/to $HOME/.jedit/server (default)");
- System.out.println(" -server=<name>: Read/write server info from/to $HOME/.jedit/<name>");
- System.out.println(" -noserver: Don't start edit server");
- System.out.println(" -settings=<path>: Load user-specific settings from <path>");
- System.out.println(" -nosettings: Don't load user-specific settings");
- System.out.println(" -startupscripts: Run startup scripts (default)");
- System.out.println(" -nostartupscripts: Don't run startup scripts");
- System.out.println(" -usage: Print this message and exit");
- System.out.println(" -version: Print jEdit version and exit");
- System.out.println(" -wait: Wait until the user closes the specified buffer in the server");
- System.out.println(" instance. Does nothing if passed to the initial jEdit instance.");
- System.out.println();
- System.out.println("Report bugs to http://sourceforge.net/tracker/?group_id=588&atid=100588");
- } //}}}
-
- //{{{ version() method
- private static void version()
- {
- System.out.println("jEdit " + getVersion());
- } //}}}
-
- //{{{ makeServerScript() method
- /**
- * Creates a BeanShell script that can be sent to a running edit server.
- */
- private static String makeServerScript(boolean wait,
- boolean restore, boolean newView,
- boolean newPlainView, String[] args,
- String scriptFile)
- {
- StringBuilder script = new StringBuilder();
-
- String userDir = System.getProperty("user.dir");
-
- script.append("parent = \"");
- script.append(StandardUtilities.charsToEscapes(userDir));
- script.append("\";\n");
-
- script.append("args = new String[");
- script.append(args.length);
- script.append("];\n");
-
- for(int i = 0; i < args.length; i++)
- {
- script.append("args[");
- script.append(i);
- script.append("] = ");
-
- if(args[i] == null)
- script.append("null");
- else
- {
- script.append('"');
- script.append(StandardUtilities.charsToEscapes(args[i]));
- script.append('"');
- }
-
- script.append(";\n");
- }
-
- script.append("view = jEdit.getLastView();\n");
- script.append("buffer = EditServer.handleClient(");
- script.append(restore).append(',').append(newView).append(',').append(newPlainView);
- script.append(",parent,args);\n");
- script.append("if(buffer != null && ").append(wait).append(") {\n");
- script.append("\tbuffer.setWaitSocket(socket);\n");
- script.append("\tdoNotCloseSocket = true;\n");
- script.append("}\n");
- script.append("if(view != jEdit.getLastView() && ").append(wait).append(") {\n");
- script.append("\tjEdit.getLastView().setWaitSocket(socket);\n");
- script.append("\tdoNotCloseSocket = true;\n");
- script.append("}\n");
- script.append("if(doNotCloseSocket == void)\n");
- script.append("\tsocket.close();\n");
-
- if(scriptFile != null)
- {
- scriptFile = MiscUtilities.constructPath(userDir,scriptFile);
- script.append("BeanShell.runScript(view,\"")
- .append(StandardUtilities.charsToEscapes(scriptFile))
- .append("\",null,this.namespace);\n");
- }
-
- return script.toString();
- } //}}}
-
- //{{{ initMisc() method
- /**
- * Initialise various objects, register protocol handlers.
- */
- private static void initMisc()
- {
- ModeProvider.instance = new ModeProvider()
- {
- @Override
- protected void error(String fileName, Throwable e)
- {
- Log.log(Log.ERROR, this, e);
- if (e instanceof SAXParseException)
- {
- String message = e.getMessage();
- int line = ((SAXParseException)e).getLineNumber();
- int col = ((SAXParseException)e).getColumnNumber();
-
- Object[] args = { fileName, line, col, message };
- GUIUtilities.error(null,"xmode-error",args);
- }
- }
- };
- jars = new Vector<PluginJAR>();
- FoldHandler.foldHandlerProvider = new ServiceManager.ServiceFoldHandlerProvider();
- actionContext = new ActionContext()
- {
- @Override
- public void invokeAction(EventObject evt,
- EditAction action)
- {
- View view = GUIUtilities.getView(
- (Component)evt.getSource());
-
- boolean actionBarVisible;
- if(view.getActionBar() == null
- || !view.getActionBar().isShowing())
- actionBarVisible = false;
- else
- {
- actionBarVisible = view.getActionBar()
- .isVisible();
- }
-
- view.getInputHandler().invokeAction(action);
-
- if(actionBarVisible)
- {
- // XXX: action bar might not be 'temp'
- ActionBar actionBar = view
- .getActionBar();
- if(actionBar != null)
- view.removeToolBar(actionBar);
- }
- }
- };
-
- bufferHash = new HashMap<String, Buffer>();
-
- inputHandler = new DefaultInputHandler(null);
- // Add our protocols to java.net.URL's list
- System.getProperties().put("java.protocol.handler.pkgs",
- "org.gjt.sp.jedit.proto|" +
- System.getProperty("java.protocol.handler.pkgs",""));
-
- // Set the User-Agent string used by the java.net HTTP handler
- String userAgent = "jEdit/" + getVersion()
- + " (Java " + System.getProperty("java.version")
- + ". " + System.getProperty("java.vendor")
- + "; " + System.getProperty("os.arch") + ')';
- System.getProperties().put("http.agent",userAgent);
-
- /* Determine installation directory.
- * If the jedit.home property is set, use that.
- * Then, look for jedit.jar in the classpath.
- * If that fails, assume this is the web start version. */
- jEditHome = System.getProperty("jedit.home");
- if(jEditHome == null)
- {
- String classpath = System
- .getProperty("java.class.path");
- int index = classpath.toLowerCase()
- .indexOf("jedit.jar");
- int start = classpath.lastIndexOf(File
- .pathSeparator,index) + 1;
- // if started with java -jar jedit.jar
- if(start == index)
- {
- jEditHome = System.getProperty("user.dir");
- }
- else if(index > start)
- {
- jEditHome = classpath.substring(start,
- index - 1);
- }
- else
- {
- // check if web start
- /* if(jEdit.class.getResource("/modes/catalog") != null)
- {
- // modes bundled in; hence web start
- jEditHome = null;
- }
- else */
- {
- // use user.dir as last resort
- jEditHome = System.getProperty("user.dir");
-
- Log.log(Log.WARNING,jEdit.class,"jedit.jar not in class path!");
- Log.log(Log.WARNING,jEdit.class,"Assuming jEdit is installed in "
- + jEditHome + '.');
- Log.log(Log.WARNING,jEdit.class,"Override with jedit.home "
- + "system property.");
- }
- }
- }
-
- jEditHome = MiscUtilities.resolveSymlinks(jEditHome);
-
- Log.log(Log.MESSAGE,jEdit.class,"jEdit home directory is " + jEditHome);
-
- if(settingsDirectory != null)
- {
- jarCacheDirectory = MiscUtilities.constructPath(
- settingsDirectory,"jars-cache");
- new File(jarCacheDirectory).mkdirs();
- }
-
- //if(jEditHome == null)
- // Log.log(Log.DEBUG,jEdit.class,"Web start mode");
-
- // Add an EditBus component that will reload edit modes and
- // macros if they are changed from within the editor
- EditBus.addToBus(new SettingsReloader());
-
- // Perhaps if Xerces wasn't slightly brain-damaged, we would
- // not need this
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- Thread.currentThread().setContextClassLoader(
- new JARClassLoader());
- }
- });
- // Also set the ContextClassLoader for the main jEdit thread.
- // This way, the ContextClassLoader will be a JARClassLoader
- // even at plugin activation.
- Thread.currentThread().setContextClassLoader(new JARClassLoader());
- } //}}}
-
- //{{{ initSystemProperties() method
- /**
- * Load system properties.
- */
- private static void initSystemProperties()
- {
- propMgr = new PropertyManager();
-
- try
- {
- propMgr.loadSystemProps(jEdit.class.getResourceAsStream(
- "/org/gjt/sp/jedit/jedit.props"));
- propMgr.loadSystemProps(jEdit.class.getResourceAsStream(
- "/org/gjt/sp/jedit/jedit_gui.props"));
- propMgr.loadSystemProps(jEdit.class.getResourceAsStream(
- "/org/gjt/sp/jedit/jedit_keys.props"));
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,jEdit.class,
- "Error while loading system properties!");
- Log.log(Log.ERROR,jEdit.class,
- "One of the following property files could not be loaded:\n"
- + "- jedit.props\n"
- + "- jedit_gui.props\n"
- + "- jedit_keys.props\n"
- + "jedit.jar is probably corrupt.");
- Log.log(Log.ERROR,jEdit.class,e);
- System.exit(1);
- }
- } //}}}
-
- //{{{ initSiteProperties() method
- /**
- * Load site properties.
- */
- private static void initSiteProperties()
- {
- // site properties are loaded as default properties, overwriting
- // jEdit's system properties
-
- String siteSettingsDirectory = MiscUtilities.constructPath(
- jEditHome, "properties");
- File siteSettings = new File(siteSettingsDirectory);
-
- if (!(siteSettings.exists() && siteSettings.isDirectory()))
- return;
-
- String[] snippets = siteSettings.list();
- if (snippets == null)
- return;
-
- Arrays.sort(snippets,
- new StandardUtilities.StringCompare<String>(true));
-
- for (int i = 0; i < snippets.length; ++i)
- {
- String snippet = snippets[i];
- if(!snippet.toLowerCase().endsWith(".props"))
- continue;
-
- try
- {
- String path = MiscUtilities.constructPath(
- siteSettingsDirectory,snippet);
- Log.log(Log.DEBUG,jEdit.class,
- "Loading site snippet: " + path);
-
- propMgr.loadSiteProps(new FileInputStream(new File(path)));
- }
- catch(FileNotFoundException fnf)
- {
- Log.log(Log.DEBUG,jEdit.class,fnf);
- }
- catch(IOException e)
- {
- Log.log(Log.ERROR,jEdit.class,"Cannot load site snippet "
- + snippet);
- Log.log(Log.ERROR,jEdit.class,e);
- }
- }
- } //}}}
-
- //{{{ initResources() method
- private static void initResources()
- {
- builtInActionSet = new ActionSet(null,null,null,
- jEdit.class.getResource("actions.xml"));
- builtInActionSet.setLabel(getProperty("action-set.jEdit"));
- builtInActionSet.load();
-
- actionContext.addActionSet(builtInActionSet);
-
- DockableWindowFactory.getInstance()
- .loadDockableWindows(null,
- jEdit.class.getResource("dockables.xml"),
- null);
-
- ServiceManager.loadServices(null,
- jEdit.class.getResource("services.xml"),
- null);
- } //}}}
-
- //{{{ initPlugins() method
- /**
- * Loads plugins.
- */
- private static void initPlugins()
- {
- if(jEditHome != null)
- {
- addPluginJARsFromDirectory(MiscUtilities.constructPath(
- jEditHome,"jars"));
- }
-
- if(settingsDirectory != null)
- {
- File jarsDirectory = new File(settingsDirectory,"jars");
- if(!jarsDirectory.exists())
- jarsDirectory.mkdir();
- addPluginJARsFromDirectory(jarsDirectory.getPath());
- }
-
- PluginJAR[] jars = getPluginJARs();
- for(int i = 0; i < jars.length; i++)
- {
- jars[i].checkDependencies();
- }
- } //}}}
-
- //{{{ initUserProperties() method
- /**
- * Loads user properties.
- */
- private static void initUserProperties()
- {
- if(settingsDirectory != null)
- {
- File file = new File(MiscUtilities.constructPath(
- settingsDirectory,"properties"));
- propsModTime = file.lastModified();
-
- try
- {
- propMgr.loadUserProps(
- new FileInputStream(file));
- }
- catch(FileNotFoundException fnf)
- {
- //Log.log(Log.DEBUG,jEdit.class,fnf);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,jEdit.class,e);
- }
- }
- } //}}}
-
- //{{{ fontStyleToString() method
- private static String fontStyleToString(int style)
- {
- if(style == 0)
- return "PLAIN";
- else if(style == Font.BOLD)
- return "BOLD";
- else if(style == Font.ITALIC)
- return "ITALIC";
- else if(style == (Font.BOLD | Font.ITALIC))
- return "BOLDITALIC";
- else
- throw new RuntimeException("Invalid style: " + style);
- } //}}}
-
- //{{{ fontToString() method
- private static String fontToString(Font font)
- {
- return font.getFamily()
- + '-'
- + fontStyleToString(font.getStyle())
- + '-'
- + font.getSize();
- } //}}}
-
- //{{{ initPLAF() method
- /**
- * Sets the Swing look and feel.
- */
- private static void initPLAF()
- {
- Font primaryFont = jEdit.getFontProperty(
- "metal.primary.font");
- if(primaryFont != null)
- {
- String primaryFontString =
- fontToString(primaryFont);
-
- System.getProperties().put(
- "swing.plaf.metal.controlFont",
- primaryFontString);
- System.getProperties().put(
- "swing.plaf.metal.menuFont",
- primaryFontString);
- }
-
- Font secondaryFont = jEdit.getFontProperty(
- "metal.secondary.font");
- if(secondaryFont != null)
- {
- String secondaryFontString =
- fontToString(secondaryFont);
-
- System.getProperties().put(
- "swing.plaf.metal.systemFont",
- secondaryFontString);
- System.getProperties().put(
- "swing.plaf.metal.userFont",
- secondaryFontString);
- }
-
- try
- {
- String lf = getProperty("lookAndFeel");
- if(lf != null && lf.length() != 0)
- UIManager.setLookAndFeel(lf);
- else if(OperatingSystem.isMacOS())
- {
- UIManager.setLookAndFeel(UIManager
- .getSystemLookAndFeelClassName());
- }
- else
- {
- UIManager.setLookAndFeel(UIManager
- .getCrossPlatformLookAndFeelClassName());
- }
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,jEdit.class,e);
- }
-
- UIDefaults defaults = UIManager.getDefaults();
-
- // give all Swing components our colors
- if(jEdit.getBooleanProperty("textColors"))
- {
- Color background = new javax.swing.plaf.ColorUIResource(
- jEdit.getColorProperty("view.bgColor"));
- Color foreground = new javax.swing.plaf.ColorUIResource(
- jEdit.getColorProperty("view.fgColor"));
- Color caretColor = new javax.swing.plaf.ColorUIResource(
- jEdit.getColorProperty("view.caretColor"));
- Color selectionColor = new javax.swing.plaf.ColorUIResource(
- jEdit.getColorProperty("view.selectionColor"));
-
- String[] prefixes = { "PasswordField", "TextField", "TextArea", "List", "Table" };
- for(int i = 0; i < prefixes.length; i++)
- {
- String prefix = prefixes[i];
- defaults.put(prefix + ".foreground",foreground);
- defaults.put(prefix + ".background",background);
- defaults.put(prefix + ".disabledForeground",foreground);
- defaults.put(prefix + ".disabledBackground",background);
- defaults.put(prefix + ".caretForeground",caretColor);
- defaults.put(prefix + ".selectionForeground",foreground);
- defaults.put(prefix + ".selectionBackground",selectionColor);
- }
-
- defaults.put("ComboBox.foreground",foreground);
- defaults.put("ComboBox.background",background);
- defaults.put("ComboBox.disabledForeground",foreground);
- defaults.put("ComboBox.disabledBackground",background);
- defaults.put("ComboBox.selectedForeground",foreground);
- defaults.put("ComboBox.selectedBackground",selectionColor);
-
- defaults.put("Tree.background",background);
- defaults.put("Tree.foreground",foreground);
- defaults.put("Tree.textBackground",background);
- defaults.put("Tree.textForeground",foreground);
- defaults.put("Tree.selectionForeground",foreground);
- defaults.put("Tree.selectionBackground",selectionColor);
- }
-
- defaults.remove("SplitPane.border");
- defaults.remove("SplitPaneDivider.border");
-
- JFrame.setDefaultLookAndFeelDecorated(
- getBooleanProperty("decorate.frames"));
- JDialog.setDefaultLookAndFeelDecorated(
- getBooleanProperty("decorate.dialogs"));
-
- KeyboardFocusManager.setCurrentKeyboardFocusManager(
- new MyFocusManager());
- } //}}}
-
- //{{{ getNextUntitledBufferId() method
- public static int getNextUntitledBufferId()
- {
- int untitledCount = 0;
- Buffer buffer = buffersFirst;
- while(buffer != null)
- {
- if(buffer.getName().startsWith("Untitled-"))
- {
- try
- {
- untitledCount = Math.max(untitledCount,
- Integer.parseInt(buffer.getName()
- .substring(9)));
- }
- catch(NumberFormatException nf)
- {
- }
- }
- buffer = buffer.next;
- }
- return untitledCount + 1;
- } //}}}
-
- //{{{ runStartupScripts() method
- /**
- * Runs scripts in a directory.
- */
- private static void runStartupScripts(File directory)
- {
- if (!directory.isDirectory())
- return;
-
- File[] snippets = directory.listFiles();
- if (snippets == null)
- return;
-
- Arrays.sort(snippets,
- new StandardUtilities.StringCompare<File>(true));
-
- /*
- * Force the default encoding to UTF-8 temporarily.
- * The shipped scripts use that encoding, so we need
- * to make sure we can load them correctly. If users
- * want to write script with a different encoding,
- * they can use buffer-local properties on the
- * script to set it.
- */
- String defaultEncoding = getProperty("buffer.encoding");
- setProperty("buffer.encoding", "UTF-8");
-
- for(int i = 0; i < snippets.length; ++i)
- {
- File snippet = snippets[i];
-
- Macros.Handler handler = Macros.getHandlerForPathName(
- snippet.getPath());
- if(handler == null)
- continue;
-
- try
- {
- Macros.Macro newMacro = handler.createMacro(
- snippet.getName(),
- snippet.getPath());
- handler.runMacro(null,newMacro,false);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,jEdit.class,e);
- }
- }
-
- setProperty("buffer.encoding", defaultEncoding);
- } //}}}
-
- //{{{ initProxy() method
- private static void initProxy()
- {
- boolean socksEnabled = jEdit.getBooleanProperty("socks.enabled");
- if(!socksEnabled)
- {
- Log.log(Log.DEBUG,jEdit.class,"SOCKS proxy disabled");
- System.getProperties().remove("socksProxyHost");
- System.getProperties().remove("socksProxyPort");
- }
- else
- {
- String socksHost = jEdit.getProperty("firewall.socks.host");
- if( socksHost != null )
- {
- System.setProperty("socksProxyHost", socksHost);
- Log.log(Log.DEBUG, jEdit.class,
- "SOCKS proxy enabled: " + socksHost);
- }
-
- String socksPort = jEdit.getProperty("firewall.socks.port");
- if(socksPort != null)
- System.setProperty("socksProxyPort", socksPort);
- }
-
- boolean httpEnabled = jEdit.getBooleanProperty("firewall.enabled");
- if (!httpEnabled)
- {
- Log.log(Log.DEBUG, jEdit.class, "HTTP proxy disabled");
- System.getProperties().remove("proxySet");
- System.getProperties().remove("proxyHost");
- System.getProperties().remove("proxyPort");
- System.getProperties().remove("http.proxyHost");
- System.getProperties().remove("http.proxyPort");
- System.getProperties().remove("http.nonProxyHosts");
- Authenticator.setDefault(null);
- }
- else
- {
- // set proxy host
- String host = jEdit.getProperty("firewall.host");
- if (host == null)
- return;
-
- System.setProperty("http.proxyHost", host);
- Log.log(Log.DEBUG, jEdit.class, "HTTP proxy enabled: " + host);
- // set proxy port
- String port = jEdit.getProperty("firewall.port");
- if (port != null)
- System.setProperty("http.proxyPort", port);
-
- // set non proxy hosts list
- String nonProxyHosts = jEdit.getProperty("firewall.nonProxyHosts");
- if (nonProxyHosts != null)
- System.setProperty("http.nonProxyHosts", nonProxyHosts);
-
- // set proxy authentication
- String username = jEdit.getProperty("firewall.user");
- String password = jEdit.getProperty("firewall.password");
-
- // null not supported?
- if(password == null)
- password = "";
-
- if(username == null || username.length()==0)
- {
- Log.log(Log.DEBUG, jEdit.class, "HTTP proxy without user");
- Authenticator.setDefault(new FirewallAuthenticator(null));
- }
- else
- {
- Log.log(Log.DEBUG, jEdit.class, "HTTP proxy user: " + username);
- PasswordAuthentication pw = new PasswordAuthentication(
- username,password.toCharArray()
- );
- Authenticator.setDefault(new FirewallAuthenticator(pw));
- }
- }
- } //}}}
-
- //{{{ FirewallAuthenticator class
- static class FirewallAuthenticator extends Authenticator
- {
- PasswordAuthentication pw;
-
- FirewallAuthenticator(PasswordAuthentication pw)
- {
- this.pw = pw;
- }
-
- @Override
- protected PasswordAuthentication getPasswordAuthentication()
- {
- return pw;
- }
- } //}}}
-
- //{{{ finishStartup() method
- private static void finishStartup(final boolean gui, final boolean restore,
- final boolean newPlainView, final String userDir, final String[] args)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- int count = getBufferCount();
-
- boolean restoreFiles = restore
- && jEdit.getBooleanProperty("restore")
- && (count == 0 ||
- jEdit.getBooleanProperty("restore.cli"));
-
- if(gui || count != 0)
- {
- View view;
- if (newPlainView)
- view = newView(null,null,true);
- else
- view = PerspectiveManager.loadPerspective(restoreFiles);
-
- if(view == null)
- view = newView(null,null);
-
- Buffer buffer = openFiles(null,userDir,args);
- if(buffer != null)
- view.setBuffer(buffer,true);
- }
- else
- {
- openFiles(null,userDir,args);
- }
-
- // Start I/O threads
- EditBus.send(new EditorStarted(null));
-
- VFSManager.start();
-
- // Start edit server
- if(server != null)
- server.start();
-
- GUIUtilities.hideSplashScreen();
-
- Log.log(Log.MESSAGE,jEdit.class,"Startup "
- + "complete");
-
- //{{{ Report any plugin errors
- if(pluginErrors != null)
- {
- showPluginErrorDialog();
- } //}}}
-
- startupDone.set(0, true);
-
- // in one case not a single AWT class will
- // have been touched (splash screen off +
- // -nogui -nobackground switches on command
- // line)
- Toolkit.getDefaultToolkit();
- }
- });
- } //}}}
-
- //{{{ showPluginErrorDialog() method
- private static void showPluginErrorDialog()
- {
- if(pluginErrors == null)
- return;
-
- String caption = getProperty(
- "plugin-error.caption" + (pluginErrors.size() == 1
- ? "-1" : ""));
-
- Frame frame = (PluginManager.getInstance() == null
- ? viewsFirst
- : PluginManager.getInstance());
-
- new ErrorListDialog(frame,
- getProperty("plugin-error.title"),
- caption,pluginErrors,true);
- pluginErrors = null;
- } //}}}
-
- //{{{ getNotLoadedPluginJARs() method
- private static void getNotLoadedPluginJARs(List<String> returnValue,
- String dir, String[] list)
- {
-loop: for(int i = 0; i < list.length; i++)
- {
- String name = list[i];
- if(!name.toLowerCase().endsWith(".jar"))
- continue loop;
-
- String path = MiscUtilities.constructPath(dir,name);
-
- for(int j = 0; j < jars.size(); j++)
- {
- PluginJAR jar = jars.elementAt(j);
- String jarPath = jar.getPath();
- String jarName = MiscUtilities.getFileName(jarPath);
-
- if(path.equals(jarPath))
- continue loop;
- else if(!new File(jarPath).exists()
- && name.equals(jarName))
- continue loop;
- }
-
- returnValue.add(path);
- }
- } //}}}
-
- //{{{ gotoMarker() method
- private static void gotoMarker(final View view, final Buffer buffer,
- final String marker)
- {
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- int pos;
-
- // Handle line number
- if(marker.startsWith("+line:"))
- {
- try
- {
- String arg = marker.substring(6);
- String[] lineCol = arg.split(",");
- int line, col;
- if(lineCol.length > 1)
- {
- line = Integer.parseInt(lineCol[0]);
- col = Integer.parseInt(lineCol[1]);
- }
- else
- {
- line = Integer.parseInt(marker.substring(6));
- col = 1;
- }
- pos = buffer.getLineStartOffset(line - 1) + (col - 1);
- }
- catch(Exception e)
- {
- return;
- }
- }
- // Handle marker
- else if(marker.startsWith("+marker:"))
- {
- if(marker.length() != 9)
- return;
-
- Marker m = buffer.getMarker(marker.charAt(8));
- if(m == null)
- return;
- pos = m.getPosition();
- }
- // Can't happen
- else
- throw new InternalError();
-
- if(view != null && view.getBuffer() == buffer)
- {
- view.getTextArea().setCaretPosition(pos);
- buffer.setIntegerProperty(Buffer.CARET,pos);
- buffer.setBooleanProperty(Buffer.CARET_POSITIONED,true);
- }
- else
- {
- buffer.setIntegerProperty(Buffer.CARET,pos);
- buffer.setBooleanProperty(Buffer.CARET_POSITIONED,true);
- buffer.unsetProperty(Buffer.SCROLL_VERT);
- }
- }
- });
- } //}}}
-
- //{{{ addBufferToList() method
- private static void addBufferToList(Buffer buffer)
- {
- synchronized(bufferListLock)
- {
- String symlinkPath = buffer.getSymlinkPath();
- if((VFSManager.getVFSForPath(symlinkPath).getCapabilities()
- & VFS.CASE_INSENSITIVE_CAP) != 0)
- {
- symlinkPath = symlinkPath.toLowerCase();
- }
-
- bufferCount++;
-
- bufferHash.put(symlinkPath,buffer);
-
- if(buffersFirst == null)
- {
- buffersFirst = buffersLast = buffer;
- return;
- }
- //{{{ Sort buffer list
- else if(sortBuffers)
- {
- String str11, str12;
- if(sortByName)
- {
- str11 = buffer.getName();
- str12 = buffer.getDirectory();
- }
- else
- {
- str11 = buffer.getDirectory();
- str12 = buffer.getName();
- }
-
- Buffer _buffer = buffersFirst;
- while(_buffer != null)
- {
- String str21, str22;
- if(sortByName)
- {
- str21 = _buffer.getName();
- str22 = _buffer.getDirectory();
- }
- else
- {
- str21 = _buffer.getDirectory();
- str22 = _buffer.getName();
- }
-
- int comp = StandardUtilities.compareStrings(str11,str21,true);
- if(comp < 0 || (comp == 0 && StandardUtilities.compareStrings(str12,str22,true) < 0))
- {
- buffer.next = _buffer;
- buffer.prev = _buffer.prev;
- _buffer.prev = buffer;
- if(_buffer != buffersFirst)
- buffer.prev.next = buffer;
- else
- buffersFirst = buffer;
- return;
- }
-
- _buffer = _buffer.next;
- }
- } //}}}
-
- buffer.prev = buffersLast;
- // fixes the hang that can occur if we 'save as' to a
- // new filename which requires re-sorting
- buffer.next = null;
- buffersLast.next = buffer;
- buffersLast = buffer;
- }
- } //}}}
-
- //{{{ removeBufferFromList() method
- private static void removeBufferFromList(Buffer buffer)
- {
- synchronized(bufferListLock)
- {
- bufferCount--;
-
- String path = buffer.getPath();
- if(OperatingSystem.isCaseInsensitiveFS())
- path = path.toLowerCase();
-
- bufferHash.remove(path);
-
- if(buffer == buffersFirst && buffer == buffersLast)
- {
- buffersFirst = buffersLast = null;
- return;
- }
-
- if(buffer == buffersFirst)
- {
- buffersFirst = buffer.next;
- buffer.next.prev = null;
- }
- else
- {
- if (buffer.prev != null)
- buffer.prev.next = buffer.next;
- }
-
- if(buffer == buffersLast)
- {
- buffersLast = buffersLast.prev;
- buffer.prev.next = null;
- }
- else
- {
- if (buffer.next != null)
- buffer.next.prev = buffer.prev;
- }
-
- // fixes the hang that can occur if we 'save as' to a new
- // filename which requires re-sorting
- buffer.next = buffer.prev = null;
- }
- } //}}}
-
- //{{{ addViewToList() method
- private static void addViewToList(View view)
- {
- viewCount++;
-
- if(viewsFirst == null)
- viewsFirst = viewsLast = view;
- else
- {
- view.prev = viewsLast;
- viewsLast.next = view;
- viewsLast = view;
- }
- } //}}}
-
- //{{{ removeViewFromList() method
- private static void removeViewFromList(View view)
- {
- viewCount--;
-
- if(viewsFirst == viewsLast)
- {
- viewsFirst = viewsLast = null;
- return;
- }
-
- if(view == viewsFirst)
- {
- viewsFirst = view.next;
- view.next.prev = null;
- }
- else
- {
- view.prev.next = view.next;
- }
-
- if(view == viewsLast)
- {
- viewsLast = viewsLast.prev;
- view.prev.next = null;
- }
- else
- {
- view.next.prev = view.prev;
- }
- } //}}}
-
- //{{{ closeView() method
- /**
- * closeView() used by exit().
- */
- private static boolean closeView(View view, boolean callExit)
- {
- PerspectiveManager.setPerspectiveDirty(true);
-
- if(viewsFirst == viewsLast && callExit)
- {
- exit(view,false); /* exit does editor event & save */
- // Coming here means the request has been canceled.
- return false;
- }
- else
- {
- if (!view.confirmToCloseDirty())
- return false;
-
- view.close();
- view.dispose();
- removeViewFromList(view);
-
- if(view == activeView)
- activeView = null;
-
- return true;
- }
- } //}}}
-
- //{{{ loadModeCatalog() method
- /**
- * Loads a mode catalog file.
- * @since jEdit 3.2pre2
- */
- private static void loadModeCatalog(String path, boolean resource)
- {
- Log.log(Log.MESSAGE,jEdit.class,"Loading mode catalog file " + path);
-
- ModeCatalogHandler handler = new ModeCatalogHandler(
- MiscUtilities.getParentOfPath(path),resource)
- {
- @Override
- protected Mode instantiateMode(String modeName)
- {
- return new JEditMode(modeName);
- }
- };
- try
- {
- InputStream _in;
- if(resource)
- _in = jEdit.class.getResourceAsStream(path);
- else
- _in = new FileInputStream(path);
- XMLUtilities.parseXML(_in, handler);
- }
- catch(IOException e)
- {
- Log.log(Log.ERROR,jEdit.class,e);
- }
- } //}}}
-
- //{{{ initKeyBindings() method
- /**
- * Loads all key bindings from the properties.
- *
- * @since 3.1pre1
- */
- private static void initKeyBindings()
- {
- inputHandler.removeAllKeyBindings();
-
- ActionSet[] actionSets = getActionSets();
- for (int i = 0; i < actionSets.length; i++)
- {
- actionSets[i].initKeyBindings();
- }
- } //}}}
-
- //{{{ composeBufferPropsFromHistory() method
- /**
- * Compose buffer-local properties which can be got from history.
- * @since 4.3pre10
- */
- private static void composeBufferPropsFromHistory(Map props, String path)
- {
- BufferHistory.Entry entry = BufferHistory.getEntry(path);
-
- if(entry != null && saveCaret && props.get(Buffer.CARET) == null)
- {
- props.put(Buffer.CARET, entry.caret);
- /* if(entry.selection != null)
- {
- // getSelection() converts from string to
- // Selection[]
- props.put(Buffer.SELECTION,entry.getSelection());
- } */
- }
-
- if(entry != null && props.get(JEditBuffer.ENCODING) == null)
- {
- if(entry.encoding != null)
- props.put(JEditBuffer.ENCODING,entry.encoding);
- }
-
- if (entry != null && props.get("mode") == null)
- {
- if (entry.mode != null)
- props.put("mode", entry.mode);
- }
- } //}}}
-
- //}}}
-
- //{{{ MyFocusManager class
- private static class MyFocusManager extends DefaultKeyboardFocusManager
- {
- MyFocusManager()
- {
- setDefaultFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
- }
-
- @Override
- public boolean postProcessKeyEvent(KeyEvent evt)
- {
- if(!evt.isConsumed())
- {
- Component comp = (Component)evt.getSource();
- if(!comp.isShowing())
- return true;
-
- for(;;)
- {
- if(comp instanceof View)
- {
- ((View)comp).getInputHandler().processKeyEvent(evt,
- View.VIEW, false);
- return true;
- }
- else if(comp == null || comp instanceof Window
- || comp instanceof JEditTextArea)
- {
- if (comp instanceof PluginManager)
- {
- evt.setSource(comp);
- ((PluginManager)comp).processKeyEvents(evt);
- }
- break;
- }
- else
- comp = comp.getParent();
- }
- }
-
- return super.postProcessKeyEvent(evt);
- }
- } //}}}
-
- //{{{ JEditPropertyManager class
- public static class JEditPropertyManager implements IPropertyManager
- {
- public String getProperty(String name)
- {
- return jEdit.getProperty(name);
- }
- } //}}}
-
- //{{{ DockingLayoutSetter class
- private static class DockingLayoutSetter implements Runnable
- {
- private View view;
- private ViewConfig config;
- private int startupDoneIndex;
-
- DockingLayoutSetter(View view, ViewConfig config, int startupDoneIndex)
- {
- this.view = view;
- this.config = config;
- this.startupDoneIndex = startupDoneIndex;
- }
-
- public void run()
- {
- DockableWindowManager wm = view.getDockableWindowManager();
- wm.setDockingLayout(config.docking);
- startupDone.set(startupDoneIndex, true);
- }
- } //}}}
-
- private static final JEditPropertyManager propertyManager = new JEditPropertyManager();
-}
+/*
+ * jEdit.java - Main class of the jEdit editor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit;
+
+//{{{ Imports
+import org.gjt.sp.jedit.datatransfer.JEditTransferableService;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.jedit.visitors.JEditVisitor;
+
+import java.awt.*;
+
+import org.gjt.sp.jedit.View.ViewConfig;
+import org.gjt.sp.jedit.bsh.UtilEvalError;
+import javax.swing.*;
+import java.awt.event.KeyEvent;
+import java.io.*;
+import java.net.*;
+import java.text.MessageFormat;
+import java.util.*;
+import java.util.List;
+
+import org.xml.sax.SAXParseException;
+
+import org.gjt.sp.jedit.bufferio.BufferIORequest;
+import org.gjt.sp.jedit.buffer.KillRing;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.buffer.FoldHandler;
+import org.gjt.sp.jedit.msg.*;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.help.HelpViewer;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.pluginmgr.PluginManager;
+import org.gjt.sp.jedit.search.SearchAndReplace;
+import org.gjt.sp.jedit.syntax.Chunk;
+import org.gjt.sp.jedit.syntax.ModeProvider;
+import org.gjt.sp.jedit.syntax.TokenMarker;
+import org.gjt.sp.jedit.syntax.XModeHandler;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.jedit.visitors.SaveCaretInfoVisitor;
+import org.gjt.sp.jedit.bufferset.BufferSetManager;
+import org.gjt.sp.jedit.bufferset.BufferSet;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.util.XMLUtilities;
+import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.SyntaxUtilities;
+//}}}
+
+/**
+ * The main class of the jEdit text editor.
+ * @author Slava Pestov
+ * @version $Id: jEdit.java 19611 2011-06-20 22:54:04Z Vampire0 $
+ */
+public class jEdit
+{
+ //{{{ getVersion() method
+ /**
+ * Returns the jEdit version as a human-readable string.
+ */
+ public static String getVersion()
+ {
+ return MiscUtilities.buildToVersion(getBuild());
+ } //}}}
+
+ //{{{ getBuild() method
+ /**
+ * Returns the internal version. MiscUtilities.compareStrings() can be used
+ * to compare different internal versions.
+ */
+ public static String getBuild()
+ {
+ // (major).(minor).(<99 = preX, 99 = "final").(bug fix)
+ return "04.04.99.01";
+ } //}}}
+
+ //{{{ main() method
+ /**
+ * The main method of the jEdit application.
+ * This should never be invoked directly.
+ * @param args The command line arguments
+ */
+ public static void main(String[] args)
+ {
+ //{{{ Check for Java 1.6 or later
+ String javaVersion = System.getProperty("java.version");
+ if(javaVersion.compareTo("1.6") < 0)
+ {
+ System.err.println("You are running Java version "
+ + javaVersion + '.');
+ System.err.println("jEdit requires Java 1.6 or later.");
+ System.exit(1);
+ } //}}}
+
+ startupDone.add(false);
+
+ // later on we need to know if certain code is called from
+ // the main thread
+ mainThread = Thread.currentThread();
+
+ settingsDirectory = ".jedit";
+ // On mac, different rules (should) apply
+ if(OperatingSystem.isMacOS())
+ settingsDirectory = "Library/jEdit";
+
+ // MacOS users expect the app to keep running after all windows
+ // are closed
+ background = OperatingSystem.isMacOS();
+
+ //{{{ Parse command line
+ boolean endOpts = false;
+ int level = Log.WARNING;
+ String portFile = "server";
+ boolean restore = true;
+ boolean newView = true;
+ boolean newPlainView = false;
+ boolean gui = true; // open initial view?
+ boolean loadPlugins = true;
+ boolean runStartupScripts = true;
+ boolean quit = false;
+ boolean wait = false;
+ boolean shouldRelocateSettings = true;
+ String userDir = System.getProperty("user.dir");
+
+ // script to run
+ String scriptFile = null;
+
+ for(int i = 0; i < args.length; i++)
+ {
+ String arg = args[i];
+ if(arg == null)
+ continue;
+ else if(arg.length() == 0)
+ args[i] = null;
+ else if(arg.startsWith("-") && !endOpts)
+ {
+ if(arg.equals("--"))
+ endOpts = true;
+ else if(arg.equals("-usage"))
+ {
+ version();
+ System.err.println();
+ usage();
+ System.exit(1);
+ }
+ else if(arg.equals("-version"))
+ {
+ version();
+ System.exit(1);
+ }
+ else if(arg.startsWith("-log="))
+ {
+ try
+ {
+ level = Integer.parseInt(arg.substring("-log=".length()));
+ }
+ catch(NumberFormatException nf)
+ {
+ System.err.println("Malformed option: " + arg);
+ }
+ }
+ else if(arg.equals("-nosettings"))
+ settingsDirectory = null;
+ else if(arg.startsWith("-settings="))
+ {
+ settingsDirectory = arg.substring(10);
+ shouldRelocateSettings = false;
+ }
+ else if(arg.startsWith("-noserver"))
+ portFile = null;
+ else if(arg.equals("-server"))
+ portFile = "server";
+ else if(arg.startsWith("-server="))
+ portFile = arg.substring(8);
+ else if(arg.startsWith("-background"))
+ background = true;
+ else if(arg.startsWith("-nobackground"))
+ background = false;
+ else if(arg.equals("-gui"))
+ gui = true;
+ else if(arg.equals("-nogui"))
+ gui = false;
+ else if(arg.equals("-newview"))
+ newView = true;
+ else if(arg.equals("-newplainview"))
+ newPlainView = true;
+ else if(arg.equals("-reuseview"))
+ newPlainView = newView = false;
+ else if(arg.equals("-restore"))
+ restore = true;
+ else if(arg.equals("-norestore"))
+ restore = false;
+ else if(arg.equals("-plugins"))
+ loadPlugins = true;
+ else if(arg.equals("-noplugins"))
+ loadPlugins = false;
+ else if(arg.equals("-startupscripts"))
+ runStartupScripts = true;
+ else if(arg.equals("-nostartupscripts"))
+ runStartupScripts = false;
+ else if(arg.startsWith("-run="))
+ scriptFile = arg.substring(5);
+ else if(arg.equals("-wait"))
+ wait = true;
+ else if(arg.equals("-quit"))
+ quit = true;
+ else
+ {
+ System.err.println("Unknown option: "
+ + arg);
+ usage();
+ System.exit(1);
+ }
+ args[i] = null;
+ }
+ } //}}}
+
+ //{{{ We need these initializations very early on
+ if(settingsDirectory != null)
+ {
+ settingsDirectory = MiscUtilities.constructPath(
+ System.getProperty("user.home"),
+ settingsDirectory);
+ settingsDirectory = MiscUtilities.resolveSymlinks(
+ settingsDirectory);
+ }
+
+ if(settingsDirectory != null && portFile != null)
+ portFile = MiscUtilities.constructPath(settingsDirectory,portFile);
+ else
+ portFile = null;
+
+ Log.init(true,level);
+ //}}}
+
+ //{{{ Try connecting to another running jEdit instance
+ if(portFile != null && new File(portFile).exists())
+ {
+ try
+ {
+ BufferedReader in = new BufferedReader(new FileReader(portFile));
+ String check = in.readLine();
+ if(!check.equals("b"))
+ throw new Exception("Wrong port file format");
+
+ int port = Integer.parseInt(in.readLine());
+ int key = Integer.parseInt(in.readLine());
+
+ Socket socket = new Socket(InetAddress.getByName("127.0.0.1"),port);
+ DataOutputStream out = new DataOutputStream(
+ socket.getOutputStream());
+ out.writeInt(key);
+
+ String script;
+ if(quit)
+ {
+ script = "socket.close();\n"
+ + "jEdit.exit(null,true);\n";
+ }
+ else
+ {
+ script = makeServerScript(wait,restore,
+ newView,newPlainView,args,
+ scriptFile);
+ }
+
+ out.writeUTF(script);
+
+ Log.log(Log.DEBUG,jEdit.class,"Waiting for server");
+ // block until its closed
+ try
+ {
+ socket.getInputStream().read();
+ }
+ catch(Exception e)
+ {
+ }
+
+ in.close();
+ out.close();
+
+ System.exit(0);
+ }
+ catch(Exception e)
+ {
+ // ok, this one seems to confuse newbies
+ // endlessly, so log it as NOTICE, not
+ // ERROR
+ Log.log(Log.NOTICE,jEdit.class,"An error occurred"
+ + " while connecting to the jEdit server instance.");
+ Log.log(Log.NOTICE,jEdit.class,"This probably means that"
+ + " jEdit crashed and/or exited abnormally");
+ Log.log(Log.NOTICE,jEdit.class,"the last time it was run.");
+ Log.log(Log.NOTICE,jEdit.class,"If you don't"
+ + " know what this means, don't worry.");
+ Log.log(Log.NOTICE,jEdit.class,e);
+ }
+ }
+
+ if(quit)
+ {
+ // if no server running and user runs jedit -quit,
+ // just exit
+ System.exit(0);
+ } //}}}
+
+ // don't show splash screen if there is a file named
+ // 'nosplash' in the settings directory
+ if(!new File(settingsDirectory,"nosplash").exists())
+ GUIUtilities.showSplashScreen();
+
+ //{{{ Mac settings migration code. Should eventually be removed
+ if(OperatingSystem.isMacOS() && shouldRelocateSettings && settingsDirectory != null)
+ {
+ relocateSettings();
+ }
+ // }}}
+
+ //{{{ Initialize settings directory
+ Writer stream;
+ if(settingsDirectory != null)
+ {
+ File _settingsDirectory = new File(settingsDirectory);
+ if(!_settingsDirectory.exists())
+ _settingsDirectory.mkdirs();
+ File _macrosDirectory = new File(settingsDirectory,"macros");
+ if(!_macrosDirectory.exists())
+ _macrosDirectory.mkdir();
+
+ String logPath = MiscUtilities.constructPath(
+ settingsDirectory,"activity.log");
+
+ backupSettingsFile(new File(logPath));
+
+ try
+ {
+ stream = new BufferedWriter(new FileWriter(logPath));
+
+ // Write a warning message:
+ String lineSep = System.getProperty("line.separator");
+ stream.write("Log file created on " + new Date());
+ stream.write(lineSep);
+ stream.write("IMPORTANT:");
+ stream.write(lineSep);
+ stream.write("Because updating this file after "
+ + "every log message would kill");
+ stream.write(lineSep);
+ stream.write("performance, it will be *incomplete* "
+ + "unless you invoke the");
+ stream.write(lineSep);
+ stream.write("Utilities->Troubleshooting->Update "
+ + "Activity Log on Disk command!");
+ stream.write(lineSep);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ stream = null;
+ }
+ }
+ else
+ {
+ stream = null;
+ } //}}}
+
+ Log.setLogWriter(stream);
+
+ Log.log(Log.NOTICE,jEdit.class,"jEdit version " + getVersion());
+ Log.log(Log.MESSAGE,jEdit.class,"Settings directory is "
+ + settingsDirectory);
+
+ //{{{ Get things rolling
+ GUIUtilities.advanceSplashProgress("init");
+ initMisc();
+ GUIUtilities.advanceSplashProgress("init system properties");
+ initSystemProperties();
+
+ GUIUtilities.advanceSplashProgress("init beanshell");
+ BeanShell.init();
+
+ GUIUtilities.advanceSplashProgress("loading site properties");
+ if(jEditHome != null)
+ initSiteProperties();
+
+ GUIUtilities.advanceSplashProgress("loading user properties");
+ initUserProperties();
+
+ GUIUtilities.advanceSplashProgress("init GUI");
+ GUIUtilities.init();
+
+ bufferSetManager = new BufferSetManager();
+ //}}}
+
+ //{{{ Initialize server
+ if(portFile != null)
+ {
+ GUIUtilities.advanceSplashProgress("init server");
+ server = new EditServer(portFile);
+ if(!server.isOK())
+ server = null;
+ }
+ else
+ {
+ GUIUtilities.advanceSplashProgress();
+ if(background)
+ {
+ background = false;
+ Log.log(Log.WARNING,jEdit.class,"You cannot specify both the"
+ + " -background and -noserver switches");
+ }
+ } //}}}
+
+ //{{{ Do more stuff
+ GUIUtilities.advanceSplashProgress("init look and feel");
+ initPLAF();
+ GUIUtilities.advanceSplashProgress("init VFS Manager");
+ VFSManager.init();
+ GUIUtilities.advanceSplashProgress("init resources");
+ initResources();
+ SearchAndReplace.load();
+
+ if(loadPlugins)
+ {
+ GUIUtilities.advanceSplashProgress("init plugins");
+ initPlugins();
+ }
+ else
+ GUIUtilities.advanceSplashProgress();
+
+ Registers.setSaver(new JEditRegisterSaver());
+ Registers.setListener(new JEditRegistersListener());
+ GUIUtilities.advanceSplashProgress("init history model");
+ HistoryModel.setSaver(new JEditHistoryModelSaver());
+ HistoryModel.loadHistory();
+ GUIUtilities.advanceSplashProgress("init buffer history");
+ BufferHistory.load();
+ GUIUtilities.advanceSplashProgress("init killring");
+ KillRing.setInstance(new JEditKillRing());
+ KillRing.getInstance().load();
+ GUIUtilities.advanceSplashProgress("init various properties");
+ propertiesChanged();
+
+ GUIUtilities.advanceSplashProgress("init modes");
+
+ // Buffer sort
+ sortBuffers = getBooleanProperty("sortBuffers");
+ sortByName = getBooleanProperty("sortByName");
+
+ reloadModes();
+
+ GUIUtilities.advanceSplashProgress("activate plugins");
+ //}}}
+
+ //{{{ Activate plugins that must be activated at startup
+ for(int i = 0; i < jars.size(); i++)
+ {
+ jars.elementAt(i).activatePluginIfNecessary();
+ } //}}}
+
+ String[] serviceNames = ServiceManager.getServiceNames(JEditTransferableService.class);
+ for (String serviceName : serviceNames)
+ {
+ JEditTransferableService service = ServiceManager.getService(JEditTransferableService.class, serviceName);
+ org.gjt.sp.jedit.datatransfer.TransferHandler.getInstance().registerTransferableService(service);
+ }
+
+ //{{{ Load macros and run startup scripts, after plugins and settings are loaded
+ GUIUtilities.advanceSplashProgress("init macros");
+ Macros.loadMacros();
+ Macros.getMacroActionSet().initKeyBindings();
+
+ if(runStartupScripts && jEditHome != null)
+ {
+ String path = MiscUtilities.constructPath(jEditHome,"startup");
+ File file = new File(path);
+ if(file.exists())
+ {
+ runStartupScripts(file);
+ }
+ else
+ GUIUtilities.advanceSplashProgress();
+ }
+ else
+ GUIUtilities.advanceSplashProgress("run startup scripts");
+
+ if(runStartupScripts && settingsDirectory != null)
+ {
+ String path = MiscUtilities.constructPath(settingsDirectory,"startup");
+ File file = new File(path);
+ if (file.exists())
+ {
+ GUIUtilities.advanceSplashProgress("run startup scripts");
+ runStartupScripts(file);
+ }
+ else
+ {
+ GUIUtilities.advanceSplashProgress();
+ file.mkdirs();
+ }
+ }
+ else
+ {
+ GUIUtilities.advanceSplashProgress();
+ } //}}}
+
+ //{{{ Run script specified with -run= parameter
+ if(scriptFile != null)
+ {
+ GUIUtilities.advanceSplashProgress("run script file");
+ scriptFile = MiscUtilities.constructPath(userDir,scriptFile);
+ try
+ {
+ BeanShell.getNameSpace().setVariable("args",args);
+ }
+ catch(UtilEvalError e)
+ {
+ Log.log(Log.ERROR,jEdit.class,e);
+ }
+ BeanShell.runScript(null,scriptFile,null,false);
+ }
+ else
+ {
+ GUIUtilities.advanceSplashProgress();
+ }
+ //}}}
+
+ GUIUtilities.advanceSplashProgress();
+
+ // Create dynamic actions for switching to saved layouts.
+ // The list of saved layouts is retrieved from the docking framework,
+ // which can be provided by a plugin, so this must be called only after
+ // the plugins are loaded.
+ DockingLayoutManager.init();
+
+ // Open files, create the view and hide the splash screen.
+ SyntaxUtilities.propertyManager = jEdit.propertyManager;
+ finishStartup(gui,restore,newPlainView,userDir,args);
+ } //}}}
+
+ //{{{ Property methods
+
+ //{{{ getProperties() method
+ /**
+ * Returns the properties object which contains all known
+ * jEdit properties. Note that as of jEdit 4.2pre10, this returns a
+ * new collection, not the existing properties instance.
+ * @since jEdit 3.1pre4
+ */
+ public static Properties getProperties()
+ {
+ return propMgr.getProperties();
+ } //}}}
+
+ //{{{ getProperty() method
+ /**
+ * Fetches a property, returning null if it's not defined.
+ * @param name The property
+ */
+ public static String getProperty(String name)
+ {
+ return propMgr.getProperty(name);
+ } //}}}
+
+ //{{{ getProperty() method
+ /**
+ * Fetches a property, returning the default value if it's not
+ * defined.
+ * @param name The property
+ * @param def The default value
+ */
+ public static String getProperty(String name, String def)
+ {
+ String value = propMgr.getProperty(name);
+ if(value == null)
+ return def;
+ else
+ return value;
+ } //}}}
+
+ //{{{ getProperty() method
+ /**
+ * Returns the property with the specified name.<p>
+ *
+ * The elements of the <code>args</code> array are substituted
+ * into the value of the property in place of strings of the
+ * form <code>{<i>n</i>}</code>, where <code><i>n</i></code> is an index
+ * in the array.<p>
+ *
+ * You can find out more about this feature by reading the
+ * documentation for the <code>format</code> method of the
+ * <code>java.text.MessageFormat</code> class.
+ *
+ * @param name The property
+ * @param args The positional parameters
+ */
+ public static String getProperty(String name, Object[] args)
+ {
+ if(name == null)
+ return null;
+ if(args == null)
+ return getProperty(name);
+ else
+ {
+ String value = getProperty(name);
+ if(value == null)
+ return null;
+ else
+ return MessageFormat.format(value,args);
+ }
+ } //}}}
+
+ //{{{ getBooleanProperty() method
+ /**
+ * Returns the value of a boolean property.
+ * @param name The property
+ */
+ public static boolean getBooleanProperty(String name)
+ {
+ return getBooleanProperty(name,false);
+ } //}}}
+
+ //{{{ getBooleanProperty() method
+ /**
+ * Returns the value of a boolean property.
+ * @param name The property
+ * @param def The default value
+ */
+ public static boolean getBooleanProperty(String name, boolean def)
+ {
+ String value = getProperty(name);
+ return StandardUtilities.getBoolean(value, def);
+ } //}}}
+
+ //{{{ getIntegerProperty() method
+ /**
+ * Returns the value of an integer property.
+ * @param name The property
+ */
+ public static int getIntegerProperty(String name)
+ {
+ return getIntegerProperty(name,0);
+ } //}}}
+
+ //{{{ getIntegerProperty() method
+ /**
+ * Returns the value of an integer property.
+ * @param name The property
+ * @param def The default value
+ * @since jEdit 4.0pre1
+ */
+ public static int getIntegerProperty(String name, int def)
+ {
+ String value = getProperty(name);
+ if(value == null)
+ return def;
+ else
+ {
+ try
+ {
+ return Integer.parseInt(value.trim());
+ }
+ catch(NumberFormatException nf)
+ {
+ return def;
+ }
+ }
+ } //}}}
+
+ //{{{ getDoubleProperty() method
+ public static double getDoubleProperty(String name, double def)
+ {
+ String value = getProperty(name);
+ if(value == null)
+ return def;
+ else
+ {
+ try
+ {
+ return Double.parseDouble(value.trim());
+ }
+ catch(NumberFormatException nf)
+ {
+ return def;
+ }
+ }
+ }
+ //}}}
+
+ //{{{ getFontProperty() method
+ /**
+ * Returns the value of a font property. The family is stored
+ * in the <code><i>name</i></code> property, the font size is stored
+ * in the <code><i>name</i>size</code> property, and the font style is
+ * stored in <code><i>name</i>style</code>. For example, if
+ * <code><i>name</i></code> is <code>view.gutter.font</code>, the
+ * properties will be named <code>view.gutter.font</code>,
+ * <code>view.gutter.fontsize</code>, and
+ * <code>view.gutter.fontstyle</code>.
+ *
+ * @param name The property
+ * @since jEdit 4.0pre1
+ */
+ public static Font getFontProperty(String name)
+ {
+ return getFontProperty(name,null);
+ } //}}}
+
+ //{{{ getFontProperty() method
+ /**
+ * Returns the value of a font property. The family is stored
+ * in the <code><i>name</i></code> property, the font size is stored
+ * in the <code><i>name</i>size</code> property, and the font style is
+ * stored in <code><i>name</i>style</code>. For example, if
+ * <code><i>name</i></code> is <code>view.gutter.font</code>, the
+ * properties will be named <code>view.gutter.font</code>,
+ * <code>view.gutter.fontsize</code>, and
+ * <code>view.gutter.fontstyle</code>.
+ *
+ * @param name The property
+ * @param def The default value
+ * @since jEdit 4.0pre1
+ */
+ public static Font getFontProperty(String name, Font def)
+ {
+ String family = getProperty(name);
+ String sizeString = getProperty(name + "size");
+ String styleString = getProperty(name + "style");
+
+ if(family == null || sizeString == null || styleString == null)
+ return def;
+ else
+ {
+ int size, style;
+
+ try
+ {
+ size = Integer.parseInt(sizeString);
+ }
+ catch(NumberFormatException nf)
+ {
+ return def;
+ }
+
+ try
+ {
+ style = Integer.parseInt(styleString);
+ }
+ catch(NumberFormatException nf)
+ {
+ return def;
+ }
+
+ return new Font(family,style,size);
+ }
+ } //}}}
+
+ //{{{ getColorProperty() method
+ /**
+ * Returns the value of a color property.
+ * @param name The property name
+ * @since jEdit 4.0pre1
+ */
+ public static Color getColorProperty(String name)
+ {
+ return getColorProperty(name,Color.black);
+ } //}}}
+
+ //{{{ getColorProperty() method
+ /**
+ * Returns the value of a color property.
+ * @param name The property name
+ * @param def The default value
+ * @since jEdit 4.0pre1
+ */
+ public static Color getColorProperty(String name, Color def)
+ {
+ String value = getProperty(name);
+ if(value == null)
+ return def;
+ else
+ return SyntaxUtilities.parseColor(value, def);
+ } //}}}
+
+ //{{{ setColorProperty() method
+ /**
+ * Sets the value of a color property.
+ * @param name The property name
+ * @param value The value
+ * @since jEdit 4.0pre1
+ */
+ public static void setColorProperty(String name, Color value)
+ {
+ setProperty(name, SyntaxUtilities.getColorHexString(value));
+ } //}}}
+
+ //{{{ setProperty() method
+ /**
+ * Sets a property to a new value.
+ * @param name The property
+ * @param value The new value
+ */
+ public static void setProperty(String name, String value)
+ {
+ propMgr.setProperty(name,value);
+ } //}}}
+
+ //{{{ setTemporaryProperty() method
+ /**
+ * Sets a property to a new value. Properties set using this
+ * method are not saved to the user properties list.
+ * @param name The property
+ * @param value The new value
+ * @since jEdit 2.3final
+ */
+ public static void setTemporaryProperty(String name, String value)
+ {
+ propMgr.setTemporaryProperty(name,value);
+ } //}}}
+
+ //{{{ setBooleanProperty() method
+ /**
+ * Sets a boolean property.
+ * @param name The property
+ * @param value The value
+ */
+ public static void setBooleanProperty(String name, boolean value)
+ {
+ setProperty(name,value ? "true" : "false");
+ } //}}}
+
+ //{{{ setIntegerProperty() method
+ /**
+ * Sets the value of an integer property.
+ * @param name The property
+ * @param value The value
+ * @since jEdit 4.0pre1
+ */
+ public static void setIntegerProperty(String name, int value)
+ {
+ setProperty(name,String.valueOf(value));
+ } //}}}
+
+ //{{{ setDoubleProperty() method
+ public static void setDoubleProperty(String name, double value)
+ {
+ setProperty(name,String.valueOf(value));
+ }
+ //}}}
+
+ //{{{ setFontProperty() method
+ /**
+ * Sets the value of a font property. The family is stored
+ * in the <code><i>name</i></code> property, the font size is stored
+ * in the <code><i>name</i>size</code> property, and the font style is
+ * stored in <code><i>name</i>style</code>. For example, if
+ * <code><i>name</i></code> is <code>view.gutter.font</code>, the
+ * properties will be named <code>view.gutter.font</code>,
+ * <code>view.gutter.fontsize</code>, and
+ * <code>view.gutter.fontstyle</code>.
+ *
+ * @param name The property
+ * @param value The value
+ * @since jEdit 4.0pre1
+ */
+ public static void setFontProperty(String name, Font value)
+ {
+ setProperty(name,value.getFamily());
+ setIntegerProperty(name + "size",value.getSize());
+ setIntegerProperty(name + "style",value.getStyle());
+ } //}}}
+
+ //{{{ unsetProperty() method
+ /**
+ * Unsets (clears) a property.
+ * @param name The property
+ */
+ public static void unsetProperty(String name)
+ {
+ propMgr.unsetProperty(name);
+ } //}}}
+
+ //{{{ resetProperty() method
+ /**
+ * Resets a property to its default value.
+ * @param name The property
+ *
+ * @since jEdit 2.5pre3
+ */
+ public static void resetProperty(String name)
+ {
+ propMgr.resetProperty(name);
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ /**
+ * Reloads various settings from the properties.
+ */
+ public static void propertiesChanged()
+ {
+ initKeyBindings();
+
+ Autosave.setInterval(getIntegerProperty("autosave",30));
+
+ saveCaret = getBooleanProperty("saveCaret");
+
+ UIDefaults defaults = UIManager.getDefaults();
+
+ // give all text areas the same font
+ Font font = getFontProperty("view.font");
+
+ //defaults.put("TextField.font",font);
+ defaults.put("TextArea.font",font);
+ defaults.put("TextPane.font",font);
+
+ // Enable/Disable tooltips
+ ToolTipManager.sharedInstance().setEnabled(
+ jEdit.getBooleanProperty("showTooltips"));
+
+ initProxy();
+
+ // we do this here instead of adding buffers to the bus.
+ Buffer buffer = buffersFirst;
+ while(buffer != null)
+ {
+ buffer.resetCachedProperties();
+ buffer.propertiesChanged();
+ buffer = buffer.next;
+ }
+
+ HistoryModel.setDefaultMax(getIntegerProperty("history",25));
+ KillRing.getInstance().propertiesChanged(getIntegerProperty("history",25));
+ Chunk.propertiesChanged(propertyManager);
+
+ EditBus.send(new PropertiesChanged(null));
+ } //}}}
+
+ //}}}
+
+ //{{{ Plugin management methods
+
+ //{{{ getNotLoadedPluginJARs() method
+ /**
+ * Returns a list of plugin JARs pathnames that are not currently loaded
+ * by examining the user and system plugin directories.
+ * @since jEdit 3.2pre1
+ */
+ public static String[] getNotLoadedPluginJARs()
+ {
+ List<String> returnValue = new ArrayList<String>();
+
+ if(jEditHome != null)
+ {
+ String systemPluginDir = MiscUtilities
+ .constructPath(jEditHome,"jars");
+
+ String[] list = new File(systemPluginDir).list();
+ if(list != null)
+ getNotLoadedPluginJARs(returnValue,systemPluginDir,list);
+ }
+
+ if(settingsDirectory != null)
+ {
+ String userPluginDir = MiscUtilities
+ .constructPath(settingsDirectory,"jars");
+ String[] list = new File(userPluginDir).list();
+ if(list != null)
+ {
+ getNotLoadedPluginJARs(returnValue,
+ userPluginDir,list);
+ }
+ }
+
+ String[] _returnValue = new String[returnValue.size()];
+ returnValue.toArray(_returnValue);
+ return _returnValue;
+ } //}}}
+
+ //{{{ getPlugin() method
+ /**
+ * Returns the plugin with the specified class name.
+ * Only works for plugins that were loaded.
+ */
+ public static EditPlugin getPlugin(String name)
+ {
+ return getPlugin(name, false);
+ } //}}}
+
+ //{{{ getPlugin(String, boolean) method
+ /**
+ * Returns the plugin with the specified class name.
+ * If * <code>loadIfNecessary</code> is true, the plugin will be searched for,
+ * loaded, and activated in case it has not yet been loaded.
+ *
+ * @param name the classname of the main Plugin class.
+ * @param loadIfNecessary - loads plugin + dependencies if it is not loaded yet.
+ * @since jEdit 4.2pre4
+ */
+ public static EditPlugin getPlugin(String name, boolean loadIfNecessary)
+ {
+ EditPlugin[] plugins = getPlugins();
+ EditPlugin plugin = null;
+ for(int i = 0; i < plugins.length; i++)
+ {
+ if(plugins[i].getClassName().equals(name))
+ plugin = plugins[i];
+ if(loadIfNecessary)
+ {
+ if(plugin instanceof EditPlugin.Deferred)
+ {
+ plugin.getPluginJAR().activatePlugin();
+ plugin = plugin.getPluginJAR().getPlugin();
+ break;
+ }
+ }
+ }
+ if (!loadIfNecessary) return plugin;
+ String jarPath = PluginJAR.findPlugin(name);
+ PluginJAR pjar = PluginJAR.load(jarPath, true);
+ return pjar.getPlugin();
+ } //}}}
+
+ //{{{ getPlugins() method
+ /**
+ * Returns an array of installed plugins.
+ */
+ public static EditPlugin[] getPlugins()
+ {
+ List<EditPlugin> pluginList = new ArrayList<EditPlugin>();
+ for(int i = 0; i < jars.size(); i++)
+ {
+ EditPlugin plugin = jars.elementAt(i).getPlugin();
+ if(plugin != null)
+ pluginList.add(plugin);
+ }
+
+ EditPlugin[] array = new EditPlugin[pluginList.size()];
+ pluginList.toArray(array);
+ return array;
+ } //}}}
+
+ //{{{ getPluginJARs() method
+ /**
+ * Returns an array of installed plugins.
+ * @since jEdit 4.2pre1
+ */
+ public static PluginJAR[] getPluginJARs()
+ {
+ PluginJAR[] array = new PluginJAR[jars.size()];
+ jars.copyInto(array);
+ return array;
+ } //}}}
+
+ //{{{ getPluginJAR() method
+ /**
+ * Returns the JAR with the specified path name.
+ * @param path The path name
+ * @since jEdit 4.2pre1
+ */
+ public static PluginJAR getPluginJAR(String path)
+ {
+ for(int i = 0; i < jars.size(); i++)
+ {
+ PluginJAR jar = jars.elementAt(i);
+ if(jar.getPath().equals(path))
+ return jar;
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ addPluginJAR() method
+ /**
+ * Loads the plugin JAR with the specified path. Some notes about this
+ * method:
+ *
+ * <ul>
+ * <li>Calling this at a time other than jEdit startup can have
+ * unpredictable results if the plugin has not been updated for the
+ * jEdit 4.2 plugin API.
+ * <li>You must make sure yourself the plugin is not already loaded.
+ * <li>After loading, you just make sure all the plugin's dependencies
+ * are satisified before activating the plugin, using the
+ * {@link PluginJAR#checkDependencies()} method.
+ * </ul>
+ *
+ * @param path The JAR file path
+ * @since jEdit 4.2pre1
+ */
+ public static void addPluginJAR(String path)
+ {
+ PluginJAR jar = new PluginJAR(new File(path));
+ jars.addElement(jar);
+ jar.init();
+ jEdit.unsetProperty("plugin-blacklist."+MiscUtilities.getFileName(path));
+ EditBus.send(new PluginUpdate(jar,PluginUpdate.LOADED,false));
+ if(!isMainThread())
+ {
+ EditBus.send(new DynamicMenuChanged("plugins"));
+ initKeyBindings();
+ }
+ } //}}}
+
+ //{{{ addPluginJARsFromDirectory() method
+ /**
+ * Loads all plugins in a directory.
+ * @param directory The directory
+ * @since jEdit 4.2pre1
+ */
+ private static void addPluginJARsFromDirectory(String directory)
+ {
+ Log.log(Log.NOTICE,jEdit.class,"Loading plugins from "
+ + directory);
+
+ File file = new File(directory);
+ if(!(file.exists() && file.isDirectory()))
+ return;
+ String[] plugins = file.list();
+ if(plugins == null)
+ return;
+
+ for(int i = 0; i < plugins.length; i++)
+ {
+ String plugin = plugins[i];
+ if(!plugin.toLowerCase().endsWith(".jar"))
+ continue;
+
+ String path = MiscUtilities.constructPath(directory,plugin);
+ if (jEdit.getBooleanProperty("plugin-blacklist."+plugin))
+ continue;
+
+ addPluginJAR(path);
+ }
+ } //}}}
+
+ //{{{ removePluginJAR() method
+ /**
+ * Unloads the given plugin JAR with the specified path. Note that
+ * calling this at a time other than jEdit shutdown can have
+ * unpredictable results if the plugin has not been updated for the
+ * jEdit 4.2 plugin API.
+ *
+ * @param jar The <code>PluginJAR</code> instance
+ * @param exit Set to true if jEdit is exiting; enables some
+ * shortcuts so the editor can close faster.
+ * @since jEdit 4.2pre1
+ */
+ public static void removePluginJAR(PluginJAR jar, boolean exit)
+ {
+ if(exit)
+ {
+ jar.uninit(true);
+ }
+ else
+ {
+ jar.uninit(false);
+ jars.removeElement(jar);
+ initKeyBindings();
+ }
+
+ EditBus.send(new PluginUpdate(jar,PluginUpdate.UNLOADED,exit));
+ if(!isMainThread() && !exit)
+ EditBus.send(new DynamicMenuChanged("plugins"));
+ } //}}}
+
+ //}}}
+
+ //{{{ Action methods
+
+ //{{{ getActionContext() method
+ /**
+ * Returns the action context used to store editor actions.
+ * @since jEdit 4.2pre1
+ */
+ public static ActionContext getActionContext()
+ {
+ return actionContext;
+ } //}}}
+
+ //{{{ addActionSet() method
+ /**
+ * Adds a new action set to jEdit's list of ActionSets (viewable from the shortcuts
+ * option pane). By default, each plugin has one ActionSet,
+ * but some plugins may create dynamic action sets, such as ProjectViewer and Console.
+ * These plugins must call removeActionSet() when the plugin is unloaded.
+ *
+ * @since jEdit 4.0pre1
+ * @see #removeActionSet(ActionSet)
+ */
+ public static void addActionSet(ActionSet actionSet)
+ {
+ actionContext.addActionSet(actionSet);
+ } //}}}
+
+ //{{{ removeActionSet() method
+ /**
+ * Removes an action set from jEdit's list.
+ * Plugins that add a dynamic action set must call this method at plugin
+ * unload time.
+ * @since jEdit 4.2pre1
+ */
+ public static void removeActionSet(ActionSet actionSet)
+ {
+ actionContext.removeActionSet(actionSet);
+ } //}}}
+
+ //{{{ getBuiltInActionSet() method
+ /**
+ * Returns the set of commands built into jEdit.
+ * @since jEdit 4.2pre1
+ */
+ public static ActionSet getBuiltInActionSet()
+ {
+ return builtInActionSet;
+ } //}}}
+
+ // {{{ getActionSets() method
+ /**
+ * Returns all registered action sets.
+ *
+ * @return the ActionSet(s)
+ * @since jEdit 4.0pre1
+ */
+ public static ActionSet[] getActionSets()
+ {
+ return actionContext.getActionSets();
+ } // }}}
+
+ //{{{ getAction() method
+ /**
+ * Returns the specified action.
+ * @param name The action name
+ */
+ public static EditAction getAction(String name)
+ {
+ return actionContext.getAction(name);
+ } //}}}
+
+ //{{{ getActionSetForAction() method
+ /**
+ * Returns the action set that contains the specified action.
+ *
+ * @param action The action
+ * @since jEdit 4.2pre1
+ */
+ public static ActionSet getActionSetForAction(String action)
+ {
+ return actionContext.getActionSetForAction(action);
+ } //}}}
+
+ //{{{ getActionSetForAction() method
+ /**
+ * @deprecated Use the form that takes a String instead
+ */
+ @Deprecated
+ public static ActionSet getActionSetForAction(EditAction action)
+ {
+ return actionContext.getActionSetForAction(action.getName());
+ } //}}}
+
+ //{{{ getActions() method
+ /**
+ * @deprecated Call getActionNames() instead
+ */
+ @Deprecated
+ public static EditAction[] getActions()
+ {
+ String[] names = actionContext.getActionNames();
+ EditAction[] actions = new EditAction[names.length];
+ for(int i = 0; i < actions.length; i++)
+ {
+ actions[i] = actionContext.getAction(names[i]);
+ if(actions[i] == null)
+ Log.log(Log.ERROR,jEdit.class,"wtf: " + names[i]);
+ }
+ return actions;
+ } //}}}
+
+ //{{{ getActionNames() method
+ /**
+ * Returns all registered action names.
+ */
+ public static String[] getActionNames()
+ {
+ return actionContext.getActionNames();
+ } //}}}
+
+ //}}}
+
+ //{{{ Edit mode methods
+
+ //{{{ reloadModes() method
+ /**
+ * Reloads all edit modes. User defined edit modes are loaded after
+ * global modes so that user modes supercede global modes.
+ * @since jEdit 3.2pre2
+ */
+ public static void reloadModes()
+ {
+ ModeProvider.instance.removeAll();
+
+ //{{{ Load the global catalog first
+ if(jEditHome == null)
+ loadModeCatalog("/modes/catalog",true);
+ else
+ {
+ loadModeCatalog(MiscUtilities.constructPath(jEditHome,
+ "modes","catalog"),false);
+ } //}}}
+
+ //{{{ Load user catalog second so user modes override global modes.
+ if(settingsDirectory != null)
+ {
+ File userModeDir = new File(MiscUtilities.constructPath(
+ settingsDirectory,"modes"));
+ if(!userModeDir.exists())
+ userModeDir.mkdirs();
+
+ File userCatalog = new File(MiscUtilities.constructPath(
+ settingsDirectory,"modes","catalog"));
+ if(!userCatalog.exists())
+ {
+ // create dummy catalog
+ FileWriter out = null;
+ try
+ {
+ out = new FileWriter(userCatalog);
+ out.write(jEdit.getProperty("defaultCatalog"));
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,jEdit.class,io);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ }
+
+ loadModeCatalog(userCatalog.getPath(),false);
+ } //}}}
+
+ Buffer buffer = buffersFirst;
+ while(buffer != null)
+ {
+ // This reloads the token marker and sends a message
+ // which causes edit panes to repaint their text areas
+ buffer.setMode();
+
+ buffer = buffer.next;
+ }
+ } //}}}
+
+ //{{{ getMode() method
+ /**
+ * Returns the edit mode with the specified name.
+ * @param name The edit mode
+ */
+ public static Mode getMode(String name)
+ {
+ return ModeProvider.instance.getMode(name);
+ } //}}}
+
+ //{{{ getModes() method
+ /**
+ * Returns an array of installed edit modes.
+ */
+ public static Mode[] getModes()
+ {
+ return ModeProvider.instance.getModes();
+ } //}}}
+
+ //}}}
+
+ //{{{ Buffer creation methods
+
+ //{{{ openFiles() method
+ /**
+ * Opens the file names specified in the argument array. This
+ * handles +line and +marker arguments just like the command
+ * line parser.
+ * @param parent The parent directory
+ * @param args The file names to open
+ * @since jEdit 3.2pre4
+ */
+ public static Buffer openFiles(View view, String parent, String[] args)
+ {
+ Buffer retVal = null;
+ Buffer lastBuffer = null;
+
+ for(int i = 0; i < args.length; i++)
+ {
+ String arg = args[i];
+ if(arg == null)
+ continue;
+ else if(arg.startsWith("+line:") || arg.startsWith("+marker:"))
+ {
+ if(lastBuffer != null)
+ gotoMarker(view,lastBuffer,arg);
+ continue;
+ }
+
+ lastBuffer = openFile((View)null,parent,arg,false,null);
+
+ if(retVal == null && lastBuffer != null)
+ retVal = lastBuffer;
+ }
+
+ if(view != null && retVal != null)
+ view.setBuffer(retVal,true);
+
+ return retVal;
+ } //}}}
+
+ //{{{ openFile() methods
+ /**
+ * Opens a file. Note that as of jEdit 2.5pre1, this may return
+ * null if the buffer could not be opened.
+ * @param view The view to open the file in
+ * @param path The file path
+ *
+ * @return the buffer, or null if jEdit was unable to load it
+ *
+ * @since jEdit 2.4pre1
+ */
+ public static Buffer openFile(View view, String path)
+ {
+ return openFile(view,null,path,false,new Hashtable());
+ }
+ /**
+ * @deprecated The openFile() forms with the readOnly parameter
+ * should not be used. The readOnly prameter is no longer supported.
+ */
+ @Deprecated
+ public static Buffer openFile(View view, String parent,
+ String path, boolean readOnly, boolean newFile)
+ {
+ return openFile(view,parent,path,newFile,new Hashtable());
+ }
+ /**
+ * @deprecated The openFile() forms with the readOnly parameter
+ * should not be used. The readOnly prameter is no longer supported.
+ */
+ @Deprecated
+ public static Buffer openFile(View view, String parent,
+ String path, boolean readOnly, boolean newFile,
+ Hashtable props)
+ {
+ return openFile(view,parent,path,newFile,props);
+ }
+
+ /**
+ * Opens a file. This may return null if the buffer could not be
+ * opened for some reason.
+ * @param view The view to open the file in. If it is null, the file
+ * will be opened and added to the bufferSet of the current edit pane,
+ * but not selected
+ * @param parent The parent directory of the file
+ * @param path The path name of the file
+ * @param newFile True if the file should not be loaded from disk
+ * be prompted if it should be reloaded
+ * @param props Buffer-local properties to set in the buffer
+ *
+ * @return the buffer, or null if jEdit was unable to load it
+ *
+ * @since jEdit 3.2pre10
+ */
+ public static Buffer openFile(View view, String parent,
+ String path, boolean newFile, Hashtable props)
+ {
+ return openFile(view == null ? null : view.getEditPane(), parent, path, newFile, props);
+ }
+
+ /**
+ * Opens a file. Note that as of jEdit 2.5pre1, this may return
+ * null if the buffer could not be opened.
+ * @param editPane the EditPane to open the file in.
+ * @param path The file path
+ *
+ * @return the buffer, or null if jEdit was unable to load it
+ *
+ * @since jEdit 4.3pre17
+ */
+ public static Buffer openFile(EditPane editPane, String path)
+ {
+ return openFile(editPane,null,path,false,new Hashtable());
+ }
+
+ /**
+ * Opens a file. This may return null if the buffer could not be
+ * opened for some reason.
+ * @param editPane the EditPane to open the file in.
+ * @param parent The parent directory of the file
+ * @param path The path name of the file
+ * @param newFile True if the file should not be loaded from disk
+ * be prompted if it should be reloaded
+ * @param props Buffer-local properties to set in the buffer
+ *
+ * @return the buffer, or null if jEdit was unable to load it
+ *
+ * @since jEdit 4.3pre17
+ */
+ public static Buffer openFile(EditPane editPane, String parent,
+ String path, boolean newFile, Hashtable props)
+ {
+ PerspectiveManager.setPerspectiveDirty(true);
+
+ if(editPane != null && parent == null && editPane.getBuffer() != null)
+ parent = editPane.getBuffer().getDirectory();
+
+ try
+ {
+ URL u = new URL(path);
+ if (u.getProtocol().equals("file"))
+ path = URLDecoder.decode(u.getPath());
+ }
+ catch (MalformedURLException mue)
+ {
+ path = MiscUtilities.constructPath(parent,path);
+ }
+
+
+ if(props == null)
+ props = new Hashtable();
+ composeBufferPropsFromHistory(props, path);
+
+ Buffer newBuffer;
+
+ synchronized (editBusOrderingLock)
+ {
+ View view = editPane == null ? null : editPane.getView();
+ synchronized(bufferListLock)
+ {
+ Buffer buffer = getBuffer(path);
+ if(buffer != null)
+ {
+ if(editPane != null)
+ editPane.setBuffer(buffer,true);
+
+ return buffer;
+ }
+
+ newBuffer = new Buffer(path,newFile,false,props);
+
+ if(!newBuffer.load(view,false))
+ return null;
+ addBufferToList(newBuffer);
+ if (editPane != null)
+ bufferSetManager.addBuffer(editPane, newBuffer);
+ else
+ bufferSetManager.addBuffer(jEdit.getActiveView(), newBuffer);
+ }
+
+ EditBus.send(new BufferUpdate(newBuffer,view,BufferUpdate.CREATED));
+ }
+
+ if(editPane != null)
+ editPane.setBuffer(newBuffer,true);
+
+ return newBuffer;
+ } //}}}
+
+ //{{{ openTemporary() methods
+ /**
+ * Opens a temporary buffer. A temporary buffer is like a normal
+ * buffer, except that an event is not fired, the the buffer is
+ * not added to the buffers list.
+ *
+ * @param view The view to open the file in
+ * @param parent The parent directory of the file
+ * @param path The path name of the file
+ * @param newFile True if the file should not be loaded from disk
+ *
+ * @return the buffer, or null if jEdit was unable to load it
+ *
+ * @since jEdit 3.2pre10
+ */
+ public static Buffer openTemporary(View view, String parent,
+ String path, boolean newFile)
+ {
+ return openTemporary(view, parent, path, newFile, null);
+ }
+ /**
+ * Opens a temporary buffer. A temporary buffer is like a normal
+ * buffer, except that an event is not fired, the the buffer is
+ * not added to the buffers list.
+ *
+ * @param view The view to open the file in
+ * @param parent The parent directory of the file
+ * @param path The path name of the file
+ * @param newFile True if the file should not be loaded from disk
+ * @param props Buffer-local properties to set in the buffer
+ *
+ * @return the buffer, or null if jEdit was unable to load it
+ *
+ * @since jEdit 4.3pre10
+ */
+ public static Buffer openTemporary(View view, String parent,
+ String path, boolean newFile, Hashtable props)
+ {
+ if(view != null && parent == null)
+ parent = view.getBuffer().getDirectory();
+
+ if(MiscUtilities.isURL(path))
+ {
+ if(MiscUtilities.getProtocolOfURL(path).equals("file"))
+ path = path.substring(5);
+ }
+
+ path = MiscUtilities.constructPath(parent,path);
+
+ if(props == null)
+ props = new Hashtable();
+ composeBufferPropsFromHistory(props, path);
+
+ synchronized(bufferListLock)
+ {
+ Buffer buffer = getBuffer(path);
+ if(buffer != null)
+ return buffer;
+
+ buffer = new Buffer(path,newFile,true,props);
+ buffer.setBooleanProperty(Buffer.ENCODING_AUTODETECT, true);
+ if(!buffer.load(view,false))
+ return null;
+ else
+ return buffer;
+ }
+ } //}}}
+
+ //{{{ commitTemporary() method
+ /**
+ * Adds a temporary buffer to the buffer list. This must be done
+ * before allowing the user to interact with the buffer in any
+ * way.
+ * @param buffer The buffer
+ */
+ public static void commitTemporary(Buffer buffer)
+ {
+ if(!buffer.isTemporary())
+ return;
+
+ PerspectiveManager.setPerspectiveDirty(true);
+
+ addBufferToList(buffer);
+ buffer.commitTemporary();
+
+ // send full range of events to avoid breaking plugins
+ EditBus.send(new BufferUpdate(buffer,null,BufferUpdate.CREATED));
+ EditBus.send(new BufferUpdate(buffer,null,BufferUpdate.LOAD_STARTED));
+ EditBus.send(new BufferUpdate(buffer,null,BufferUpdate.LOADED));
+ } //}}}
+
+ //{{{ newFile() methods
+ /**
+ * Creates a new `untitled' file.
+ *
+ * @param view The view to create the file in
+ *
+ * @return the new buffer
+ */
+ public static Buffer newFile(View view)
+ {
+ return newFile(view == null ? null : view.getEditPane());
+ }
+
+ /**
+ * Creates a new `untitled' file.
+ * @param view The view to create the file in
+ * @param dir The directory to create the file in
+ *
+ * @return the new buffer
+ *
+ * @since jEdit 3.1pre2
+ */
+ public static Buffer newFile(View view, String dir)
+ {
+ EditPane editPane = null;
+ if (view != null)
+ {
+ editPane = view.getEditPane();
+ }
+ else
+ {
+ View v = getActiveView();
+ if (v != null)
+ {
+ editPane = v.getEditPane();
+ }
+ }
+ return newFile(editPane, dir);
+ }
+
+ /**
+ * Creates a new `untitled' file.
+ *
+ * @param editPane The editPane to create the file in
+ *
+ * @return the new buffer
+ * @since jEdit 4.3pre17
+ */
+ public static Buffer newFile(EditPane editPane)
+ {
+ String path;
+
+ if(editPane != null && editPane.getBuffer() != null)
+ {
+ path = editPane.getBuffer().getDirectory();
+ VFS vfs = VFSManager.getVFSForPath(path);
+ // don't want 'New File' to create a read only buffer
+ // if current file is on SQL VFS or something
+ if((vfs.getCapabilities() & VFS.WRITE_CAP) == 0)
+ path = System.getProperty("user.home");
+ }
+ else
+ path = null;
+
+ return newFile(editPane,path);
+ }
+
+ /**
+ * Creates a new `untitled' file.
+ *
+ * @param editPane The editPane to create the file in
+ * @param dir The directory to create the file in
+ *
+ * @return the new buffer
+ *
+ * @since jEdit 4.3pre17
+ */
+ public static Buffer newFile(EditPane editPane, String dir)
+ {
+ if (editPane != null)
+ {
+ BufferSet bufferSet = editPane.getBufferSet();
+ Buffer[] buffers = bufferSet.getAllBuffers();
+ for (Buffer buf:buffers)
+ {
+ if (buf.isUntitled() && !buf.isDirty())
+ {
+
+ if (!MiscUtilities.getParentOfPath(buf.getPath()).equals(dir))
+ {
+ // Find the highest Untitled-n file
+ int untitledCount = getNextUntitledBufferId();
+
+ Buffer newBuffer = openFile(editPane,dir,"Untitled-" + untitledCount,true,null);
+ jEdit.closeBuffer(editPane, buf);
+ return newBuffer;
+ }
+ /* if "never mark untitled buffers dirty"
+ * is selected, we might have contents in non-dirty
+ * untitled buffers. We must clear those contents
+ * if user requested new file.
+ */
+ int l = buf.getLength();
+ if (l > 0)
+ buf.remove(0, l);
+ editPane.setBuffer(buf);
+ return buf;
+ }
+ }
+ }
+
+ // Find the highest Untitled-n file
+ int untitledCount = getNextUntitledBufferId();
+
+ return openFile(editPane,dir,"Untitled-" + untitledCount,true,null);
+ } //}}}
+
+ //}}}
+
+ //{{{ Buffer management methods
+
+ //{{{ closeBuffer() method
+ /**
+ * Closes a buffer. If there are unsaved changes, the user is
+ * prompted if they should be saved first.
+ * @param view The view
+ * @param buffer The buffer
+ * @return True if the buffer was really closed, false otherwise
+ */
+ public static boolean closeBuffer(View view, Buffer buffer)
+ {
+ // Wait for pending I/O requests
+ if(buffer.isPerformingIO())
+ {
+ VFSManager.waitForRequests();
+ if(VFSManager.errorOccurred())
+ return false;
+ }
+
+ if(buffer.isDirty())
+ {
+ Object[] args = { buffer.getName() };
+ int result = GUIUtilities.confirm(view,"notsaved",args,
+ JOptionPane.YES_NO_CANCEL_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if(result == JOptionPane.YES_OPTION)
+ {
+ if(!buffer.save(view,null,true))
+ return false;
+
+ VFSManager.waitForRequests();
+ if(buffer.getBooleanProperty(BufferIORequest
+ .ERROR_OCCURRED))
+ {
+ return false;
+ }
+ }
+ else if(result != JOptionPane.NO_OPTION)
+ return false;
+ }
+
+ _closeBuffer(view,buffer);
+
+ return true;
+ } //}}}
+
+ //{{{ closeBuffer() method
+ /**
+ * Close a buffer.
+ * The buffer is first removed from the EditPane's bufferSet.
+ * If the buffer is not in any bufferSet after that, it is closed
+ * @param editPane the edit pane (it cannot be null)
+ * @param buffer the buffer (it cannot be null)
+ * @since jEdit 4.3pre15
+ */
+ public static void closeBuffer(EditPane editPane, Buffer buffer)
+ {
+ switch (bufferSetManager.getScope())
+ {
+ case global:
+ closeBuffer(editPane.getView(), buffer);
+ break;
+ case view:
+ View[] views = jEdit.getViews();
+ int viewOwner = 0;
+ for (View view : views)
+ {
+ BufferSet bufferSet = view.getEditPane().getBufferSet();
+ // no need to check every bufferSet since it's view scope
+ if (bufferSet.indexOf(buffer) != -1)
+ {
+ viewOwner++;
+ if (viewOwner > 1)
+ break;
+ }
+ }
+ if (viewOwner > 1)
+ {
+ // the buffer is in several view, we can remove it from bufferSet
+ bufferSetManager.removeBuffer(editPane, buffer);
+ }
+ else
+ {
+ closeBuffer(editPane.getView(), buffer);
+ }
+ break;
+ case editpane:
+ int bufferSetsCount = bufferSetManager.countBufferSets(buffer);
+ if (bufferSetsCount < 2)
+ {
+ closeBuffer(editPane.getView(), buffer);
+ }
+ else
+ {
+ bufferSetManager.removeBuffer(editPane, buffer);
+ }
+ break;
+ }
+ } //}}}
+
+ //{{{ _closeBuffer() method
+ /**
+ * Closes the buffer, even if it has unsaved changes.
+ * @param view The view, may be null
+ * @param buffer The buffer
+ *
+ * @exception NullPointerException if the buffer is null
+ *
+ * @since jEdit 2.2pre1
+ */
+ public static void _closeBuffer(View view, Buffer buffer)
+ {
+ if(buffer.isClosed())
+ {
+ // can happen if the user presses C+w twice real
+ // quick and the buffer has unsaved changes
+ return;
+ }
+
+ PerspectiveManager.setPerspectiveDirty(true);
+
+ if(!buffer.isNewFile())
+ {
+ if(view != null)
+ view.getEditPane().saveCaretInfo();
+ Integer _caret = (Integer)buffer.getProperty(Buffer.CARET);
+ int caret = _caret == null ? 0 : _caret.intValue();
+
+ BufferHistory.setEntry(buffer.getPath(),caret,
+ (Selection[])buffer.getProperty(Buffer.SELECTION),
+ buffer.getStringProperty(JEditBuffer.ENCODING),
+ buffer.getMode().getName());
+ }
+
+ String path = buffer.getSymlinkPath();
+ if((VFSManager.getVFSForPath(path).getCapabilities()
+ & VFS.CASE_INSENSITIVE_CAP) != 0)
+ {
+ path = path.toLowerCase();
+ }
+ EditBus.send(new BufferUpdate(buffer,view,BufferUpdate.CLOSING));
+ bufferHash.remove(path);
+ removeBufferFromList(buffer);
+ buffer.close();
+ DisplayManager.bufferClosed(buffer);
+ bufferSetManager.removeBuffer(buffer);
+ EditBus.send(new BufferUpdate(buffer,view,BufferUpdate.CLOSED));
+ if(jEdit.getBooleanProperty("persistentMarkers"))
+ buffer.updateMarkersFile(view);
+ } //}}}
+
+ //{{{ closeAllBuffers() methods
+ /**
+ * Closes all open buffers.
+ * @param view The view
+ *
+ * @return true if all buffers were closed, false otherwise
+ */
+ public static boolean closeAllBuffers(View view)
+ {
+ return closeAllBuffers(view,false);
+ }
+ /**
+ * Closes all open buffers.
+ * @param view The view
+ * @param isExiting This must be false unless this method is
+ * being called by the exit() method
+ *
+ * @return true if all buffers were closed, false otherwise
+ */
+ public static boolean closeAllBuffers(View view, boolean isExiting)
+ {
+ if(view != null)
+ view.getEditPane().saveCaretInfo();
+
+ boolean dirty = false;
+
+ boolean saveRecent = !(isExiting && jEdit.getBooleanProperty("restore"));
+
+ Buffer buffer = buffersFirst;
+ while(buffer != null)
+ {
+ if(buffer.isDirty())
+ {
+ dirty = true;
+ break;
+ }
+ buffer = buffer.next;
+ }
+
+ if(dirty)
+ {
+ boolean ok = new CloseDialog(view).isOK();
+ if(!ok)
+ return false;
+ }
+
+ // Wait for pending I/O requests
+ VFSManager.waitForRequests();
+ if(VFSManager.errorOccurred())
+ return false;
+
+ // close remaining buffers (the close dialog only deals with
+ // dirty ones)
+
+ buffer = buffersFirst;
+
+ // zero it here so that BufferTabs doesn't have any problems
+ buffersFirst = buffersLast = null;
+ bufferHash.clear();
+ bufferCount = 0;
+
+ while(buffer != null)
+ {
+ if(!buffer.isNewFile() && saveRecent)
+ {
+ Integer _caret = (Integer)buffer.getProperty(Buffer.CARET);
+ int caret = _caret == null ? 0 : _caret.intValue();
+ BufferHistory.setEntry(buffer.getPath(),caret,
+ (Selection[])buffer.getProperty(Buffer.SELECTION),
+ buffer.getStringProperty(JEditBuffer.ENCODING),
+ buffer.getMode().getName());
+ }
+
+ buffer.close();
+ DisplayManager.bufferClosed(buffer);
+ if(!isExiting)
+ {
+ bufferSetManager.removeBuffer(buffer);
+ EditBus.send(new BufferUpdate(buffer,view,
+ BufferUpdate.CLOSED));
+ }
+ if(jEdit.getBooleanProperty("persistentMarkers"))
+ buffer.updateMarkersFile(view);
+ buffer = buffer.next;
+ }
+
+ PerspectiveManager.setPerspectiveDirty(true);
+
+ return true;
+ } //}}}
+
+ //{{{ saveAllBuffers() method
+ /**
+ * Saves all open buffers.
+ * @param view The view
+ * @since jEdit 4.2pre1
+ */
+ public static void saveAllBuffers(View view)
+ {
+ saveAllBuffers(view,jEdit.getBooleanProperty("confirmSaveAll"));
+ } //}}}
+
+ //{{{ saveAllBuffers() method
+ /**
+ * Saves all open buffers.
+ * @param view The view
+ * @param confirm If true, a confirmation dialog will be shown first
+ * @since jEdit 2.7pre2
+ */
+ public static void saveAllBuffers(View view, boolean confirm)
+ {
+ if(confirm)
+ {
+ int result = GUIUtilities.confirm(view,"saveall",null,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ if(result != JOptionPane.YES_OPTION)
+ return;
+ }
+
+ Buffer current = view.getBuffer();
+
+ Buffer buffer = buffersFirst;
+ while(buffer != null)
+ {
+ if(buffer.isDirty())
+ {
+ if(buffer.isNewFile())
+ view.setBuffer(buffer,true);
+ buffer.save(view,null,true,true);
+ }
+
+ buffer = buffer.next;
+ }
+
+ view.setBuffer(current,true);
+ } //}}}
+
+ //{{{ reloadAllBuffers() method
+ /**
+ * Reloads all open buffers.
+ * @param view The view
+ * @param confirm If true, a confirmation dialog will be shown first
+ * if any buffers are dirty
+ * @since jEdit 2.7pre2
+ */
+ public static void reloadAllBuffers(View view, boolean confirm)
+ {
+ boolean hasDirty = false;
+ Buffer[] buffers = jEdit.getBuffers();
+
+ for(int i = 0; i < buffers.length && !hasDirty; i++)
+ hasDirty = !buffers[i].isUntitled() && buffers[i].isDirty();
+
+ if(confirm && hasDirty)
+ {
+ int result = GUIUtilities.confirm(view,"reload-all",null,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ if(result != JOptionPane.YES_OPTION)
+ return;
+ }
+
+ // save caret info. Buffer.load() will load it.
+ visit(new SaveCaretInfoVisitor());
+
+
+ for(int i = 0; i < buffers.length; i++)
+ {
+ Buffer buffer = buffers[i];
+ if (buffer.isUntitled())
+ continue;
+ buffer.load(view,true);
+ }
+ } //}}}
+
+ //{{{ _getBuffer() method
+ /**
+ * Returns the buffer with the specified path name. The path name
+ * must be an absolute, canonical, path.
+ *
+ * @param path The path name
+ *
+ * @return the searched buffer, or null if it is not already open
+ *
+ * @see MiscUtilities#constructPath(String,String)
+ * @see MiscUtilities#resolveSymlinks(String)
+ * @see #getBuffer(String)
+ *
+ * @since jEdit 4.2pre7
+ */
+ public static Buffer _getBuffer(String path)
+ {
+ // paths on case-insensitive filesystems are stored as lower
+ // case in the hash.
+ if((VFSManager.getVFSForPath(path).getCapabilities()
+ & VFS.CASE_INSENSITIVE_CAP) != 0)
+ {
+ path = path.toLowerCase();
+ }
+
+ synchronized(bufferListLock)
+ {
+ return bufferHash.get(path);
+ }
+ } //}}}
+
+ //{{{ getBuffer() method
+ /**
+ * Returns the buffer with the specified path name. The path name
+ * must be an absolute path. This method automatically resolves
+ * symbolic links. If performance is critical, cache the canonical
+ * path and call {@link #_getBuffer(String)} instead.
+ *
+ * @param path The path name
+ *
+ * @return the searched buffer, or null if it is not already open
+ *
+ * @see MiscUtilities#constructPath(String,String)
+ * @see MiscUtilities#resolveSymlinks(String)
+ */
+ public static Buffer getBuffer(String path)
+ {
+ return _getBuffer(MiscUtilities.resolveSymlinks(path));
+ } //}}}
+
+ //{{{ getBuffers() method
+ /**
+ * Returns an array of open buffers.
+ * @return an array of all open buffers
+ */
+ public static Buffer[] getBuffers()
+ {
+ synchronized(bufferListLock)
+ {
+ Buffer[] buffers = new Buffer[bufferCount];
+ Buffer buffer = buffersFirst;
+ for(int i = 0; i < bufferCount; i++)
+ {
+ buffers[i] = buffer;
+ buffer = buffer.next;
+ }
+ return buffers;
+ }
+ } //}}}
+
+ //{{{ getBufferCount() method
+ /**
+ * Returns the number of open buffers.
+ */
+ public static int getBufferCount()
+ {
+ return bufferCount;
+ } //}}}
+
+ //{{{ getFirstBuffer() method
+ /**
+ * Returns the first buffer.
+ */
+ public static Buffer getFirstBuffer()
+ {
+ return buffersFirst;
+ } //}}}
+
+ //{{{ getLastBuffer() method
+ /**
+ * Returns the last buffer.
+ * @return the last buffer
+ */
+ public static Buffer getLastBuffer()
+ {
+ return buffersLast;
+ } //}}}
+
+ //{{{ moveBuffer() method
+ /**
+ * Moves a buffer from a old position to a new position in the
+ * BufferSet used in an EditPane.
+ * @param editPane The EditPane in which a buffer is moved
+ * @param oldPosition The position before the move
+ * @param newPosition The position after the move
+ */
+ public static void moveBuffer(EditPane editPane,
+ int oldPosition, int newPosition)
+ {
+ bufferSetManager.moveBuffer(editPane, oldPosition, newPosition);
+ } //}}}
+
+ //{{{ getBufferSetManager() method
+ /**
+ * Returns the bufferSet manager.
+ * @return the bufferSetManager
+ * @since jEdit 4.3pre15
+ */
+ public static BufferSetManager getBufferSetManager()
+ {
+ return bufferSetManager;
+ } //}}}
+
+ //{{{ getPropertyManager() method
+ /**
+ * @return the propertyManager
+ * @since jEdit 4.3pre15
+ */
+ public static JEditPropertyManager getPropertyManager()
+ {
+ return propertyManager;
+ } //}}}
+
+ //{{{ checkBufferStatus() methods
+ /**
+ * Checks each buffer's status on disk and shows the dialog box
+ * informing the user that buffers changed on disk, if necessary.
+ * @param view The view
+ * @since jEdit 4.2pre1
+ */
+ public static void checkBufferStatus(View view)
+ {
+ checkBufferStatus(view,false);
+ }
+
+ /**
+ * Checks buffer status on disk and shows the dialog box
+ * informing the user that buffers changed on disk, if necessary.
+ * @param view The view
+ * @param currentBuffer indicates whether to check only the current buffer
+ * @since jEdit 4.2pre1
+ */
+ public static void checkBufferStatus(View view, boolean currentBuffer)
+ {
+ // still need to call the status check even if the option is
+ // off, so that the write protection is updated if it changes
+ // on disk
+
+ // auto reload changed buffers?
+ boolean autoReload = getBooleanProperty("autoReload");
+
+ // the problem with this is that if we have two edit panes
+ // looking at the same buffer and the file is reloaded both
+ // will jump to the same location
+ visit(new SaveCaretInfoVisitor());
+
+ Buffer buffer;
+ buffer = buffersFirst;
+
+ int[] states = new int[bufferCount];
+ int i = 0;
+ boolean notifyFileChanged = false;
+ while(buffer != null)
+ {
+ if(currentBuffer && buffer != view.getBuffer())
+ {
+ buffer = buffer.next;
+ i++;
+ continue;
+ }
+
+ states[i] = buffer.checkFileStatus(view);
+
+ switch(states[i])
+ {
+ case Buffer.FILE_CHANGED:
+ if(buffer.getAutoReload())
+ {
+ if(buffer.isDirty())
+ notifyFileChanged = true;
+ else
+ buffer.load(view,true);
+ }
+ else // no automatic reload even if general setting is true
+ autoReload = false;
+ // don't notify user if "do nothing" was chosen
+ if(buffer.getAutoReloadDialog())
+ notifyFileChanged = true;
+ break;
+ case Buffer.FILE_DELETED:
+ notifyFileChanged = true;
+ break;
+ }
+
+ buffer = buffer.next;
+ i++;
+ }
+
+ if(notifyFileChanged)
+ new FilesChangedDialog(view,states,autoReload);
+ } //}}}
+
+ //}}}
+
+ //{{{ View methods
+
+ //{{{ getInputHandler() method
+ /**
+ * Returns the current input handler (key binding to action mapping)
+ * @see org.gjt.sp.jedit.gui.InputHandler
+ */
+ public static InputHandler getInputHandler()
+ {
+ return inputHandler;
+ } //}}}
+
+ /* public static void newViewTest()
+ {
+ long time = System.currentTimeMillis();
+ for(int i = 0; i < 30; i++)
+ {
+ Buffer b = newFile(null);
+ b.insert(0,"x");
+ new View(b,null,false);
+ }
+ System.err.println(System.currentTimeMillis() - time);
+ } */
+
+ //{{{ newView() methods
+ /**
+ * Creates a new view.
+ * @param view An existing view
+ * @since jEdit 3.2pre2
+ */
+ public static View newView(View view)
+ {
+ return newView(view,null,false);
+ }
+ /**
+ * Creates a new view of a buffer.
+ * @param view An existing view
+ * @param buffer The buffer
+ */
+ public static View newView(View view, Buffer buffer)
+ {
+ return newView(view,buffer,false);
+ }
+ /**
+ * Creates a new view of a buffer.
+ * @param view An existing view
+ * @param buffer The buffer
+ * @param plainView If true, the view will not have dockable windows or
+ * tool bars.
+ *
+ * @since 4.1pre2
+ */
+ public static View newView(View view, Buffer buffer, boolean plainView)
+ {
+ View.ViewConfig config;
+ if(view != null && (plainView == view.isPlainView()))
+ {
+ config = view.getViewConfig();
+ config.x -= 20;
+ config.y += 20;
+ }
+ else
+ {
+ config = new View.ViewConfig(plainView);
+ }
+ return newView(view,buffer,config);
+ }
+
+ /**
+ * Creates a new view.
+ * @param view An existing view
+ * @param buffer A buffer to display, or null
+ * @param config Encapsulates the view geometry, split configuration
+ * and if the view is a plain view
+ * @since jEdit 4.2pre1
+ */
+ public static View newView(View view, Buffer buffer, View.ViewConfig config)
+ {
+ // Mark the perspective as dirty, unless the new view is created
+ // during jEdit startup, by the loading of the perspective.
+ if (isStartupDone())
+ PerspectiveManager.setPerspectiveDirty(true);
+
+ try
+ {
+ if(view != null)
+ {
+ view.showWaitCursor();
+ view.getEditPane().saveCaretInfo();
+ }
+
+ View newView = new View(buffer,config);
+ addViewToList(newView);
+
+ newView.pack();
+ newView.adjust(view, config);
+
+ EditBus.send(new ViewUpdate(newView,ViewUpdate.CREATED));
+
+ newView.setVisible(true);
+
+ if(!config.plainView)
+ {
+ int index;
+ synchronized (startupDone)
+ {
+ index = startupDone.size();
+ startupDone.add(false);
+ }
+ EventQueue.invokeLater(new DockingLayoutSetter(
+ newView, config, index));
+ }
+
+ // show tip of the day
+ if(newView == viewsFirst)
+ {
+ newView.getTextArea().requestFocus();
+
+ // Don't show the welcome message if jEdit was started
+ // with the -nosettings switch
+ if(settingsDirectory != null && getBooleanProperty("firstTime"))
+ new HelpViewer("welcome.html");
+ else if(jEdit.getBooleanProperty("tip.show"))
+ new TipOfTheDay(newView);
+
+ setBooleanProperty("firstTime",false);
+ }
+ else
+ GUIUtilities.requestFocus(newView,newView.getTextArea());
+
+ return newView;
+ }
+ finally
+ {
+ if(view != null)
+ view.hideWaitCursor();
+ }
+ } //}}}
+
+ //{{{ closeView() method
+ /**
+ * Closes a view.
+ *
+ * jEdit will exit if this was the last open view.
+ */
+ public static void closeView(View view)
+ {
+ closeView(view,true);
+ } //}}}
+
+ //{{{ getViews() method
+ /**
+ * Returns an array of all open views.
+ */
+ public static View[] getViews()
+ {
+ View[] views = new View[viewCount];
+ View view = viewsFirst;
+ for(int i = 0; i < viewCount; i++)
+ {
+ views[i] = view;
+ view = view.next;
+ }
+ return views;
+ } //}}}
+
+ //{{{ getViewCount() method
+ /**
+ * Returns the number of open views.
+ */
+ public static int getViewCount()
+ {
+ return viewCount;
+ } //}}}
+
+ //{{{ getFirstView() method
+ /**
+ * Returns the first view.
+ */
+ public static View getFirstView()
+ {
+ return viewsFirst;
+ } //}}}
+
+ //{{{ getLastView() method
+ /**
+ * Returns the last view.
+ */
+ public static View getLastView()
+ {
+ return viewsLast;
+ } //}}}
+
+ //{{{ getActiveView() method
+ /**
+ * Returns the currently focused view.
+ * @since jEdit 4.1pre1
+ */
+ public static View getActiveView()
+ {
+ if(activeView == null)
+ {
+ // eg user just closed a view and didn't focus another
+ return viewsFirst;
+ }
+ else
+ return activeView;
+ } //}}}
+
+ //}}}
+
+ //{{{ Miscellaneous methods
+
+ //{{{ relocateSettings() method
+ public static void relocateSettings()
+ {
+ String oldSettingsPath = MiscUtilities.constructPath(
+ System.getProperty("user.home"),
+ ".jedit");
+ File oldSettingsDir = new File(oldSettingsPath);
+ File newSettingsDir = new File(settingsDirectory);
+ if(oldSettingsDir.exists() && !newSettingsDir.exists())
+ {
+ Log.log(Log.NOTICE,jEdit.class,"Old settings directory found (HOME/.jedit). Moving to new location ("+newSettingsDir+")");
+ try
+ {
+ oldSettingsDir.renameTo(newSettingsDir);
+ }
+ catch(SecurityException se)
+ {
+ Log.log(Log.ERROR,jEdit.class,se);
+ }
+ }
+ }
+ //}}}
+
+ //{{{ isStartupDone() method
+ /**
+ * Whether jEdit startup is over.
+ * @since jEdit 4.3pre17
+ */
+ public static boolean isStartupDone()
+ {
+ return (! startupDone.contains(false));
+ } //}}}
+
+ //{{{ isMainThread() method
+ /**
+ * Returns true if the currently running thread is the main thread.
+ * @since jEdit 4.2pre1
+ */
+ public static boolean isMainThread()
+ {
+ return Thread.currentThread() == mainThread;
+ } //}}}
+
+ //{{{ isBackgroundMode() method
+ /**
+ * Returns true if jEdit was started with the <code>-background</code>
+ * command-line switch.
+ * @since jEdit 4.0pre4
+ */
+ public static boolean isBackgroundModeEnabled()
+ {
+ return background;
+ } //}}}
+
+ //{{{ showMemoryDialog() method
+ /**
+ * Performs garbage collection and displays a dialog box showing
+ * memory status.
+ * @param view The view
+ * @since jEdit 4.0pre1
+ */
+ public static void showMemoryDialog(View view)
+ {
+ Runtime rt = Runtime.getRuntime();
+ long usedBefore = rt.totalMemory() - rt.freeMemory();
+ System.gc();
+ long free = rt.freeMemory();
+ long total = rt.totalMemory();
+ long used = total - free;
+
+ int totalKb = (int) (total / 1024);
+ int usedKb = (int) (used / 1024);
+ JProgressBar progress = new JProgressBar(0,totalKb);
+ progress.setValue(usedKb);
+ progress.setStringPainted(true);
+ progress.setString(jEdit.getProperty("memory-status.use",
+ new Object[] { usedKb, totalKb }));
+
+ Object[] message = new Object[4];
+ message[0] = getProperty("memory-status.gc",
+ new Object[] { (usedBefore - used) / 1024 });
+ message[1] = Box.createVerticalStrut(12);
+ message[2] = progress;
+ message[3] = Box.createVerticalStrut(6);
+
+ JOptionPane.showMessageDialog(view,message,
+ jEdit.getProperty("memory-status.title"),
+ JOptionPane.INFORMATION_MESSAGE);
+ } //}}}
+
+ //{{{ getJEditHome() method
+ /**
+ * Returns the jEdit install directory.
+ */
+ public static String getJEditHome()
+ {
+ return jEditHome;
+ } //}}}
+
+ //{{{ getSettingsDirectory() method
+ /**
+ * Returns the path of the directory where user-specific settings
+ * are stored. This will be <code>null</code> if jEdit was
+ * started with the <code>-nosettings</code> command-line switch; do not
+ * blindly use this method without checking for a <code>null</code>
+ * return value first.
+ */
+ public static String getSettingsDirectory()
+ {
+ return settingsDirectory;
+ } //}}}
+
+ //{{{ getJARCacheDirectory() method
+ /**
+ * Returns the directory where plugin cache files are stored.
+ * @since jEdit 4.2pre1
+ */
+ public static String getJARCacheDirectory()
+ {
+ return jarCacheDirectory;
+ } //}}}
+
+ //{{{ backupSettingsFile() method
+ /**
+ * Backs up the specified file in the settings directory.
+ * You should call this on any settings files your plugin
+ * writes.
+ * @param file The file
+ * @since jEdit 4.0pre1
+ */
+ public static void backupSettingsFile(File file)
+ {
+ if(settingsDirectory == null || !file.exists())
+ return;
+
+ String backupDir = MiscUtilities.constructPath(
+ settingsDirectory,"settings-backup");
+ File dir = new File(backupDir);
+ if(!dir.exists())
+ dir.mkdirs();
+
+ // ... sweet. saveBackup() will create backupDir if it
+ // doesn't exist.
+
+ MiscUtilities.saveBackup(file,5,null,"~",backupDir);
+ } //}}}
+
+ //{{{ saveSettings() method
+ /**
+ * Saves all user preferences to disk.
+ */
+ public static void saveSettings()
+ {
+ if(settingsDirectory == null)
+ return;
+
+ Abbrevs.save();
+ FavoritesVFS.saveFavorites();
+ HistoryModel.saveHistory();
+ Registers.saveRegisters();
+ SearchAndReplace.save();
+ BufferHistory.save();
+ KillRing.getInstance().save();
+
+ File file1 = new File(MiscUtilities.constructPath(
+ settingsDirectory,"#properties#save#"));
+ File file2 = new File(MiscUtilities.constructPath(
+ settingsDirectory,"properties"));
+ if(file2.exists() && file2.lastModified() != propsModTime)
+ {
+ Log.log(Log.WARNING,jEdit.class,file2 + " changed"
+ + " on disk; will not save user properties");
+ }
+ else
+ {
+ backupSettingsFile(file2);
+ OutputStream out = null;
+ try
+ {
+ out = new FileOutputStream(file1);
+ propMgr.saveUserProps(out);
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,jEdit.class,io);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ file2.delete();
+ if (! file1.renameTo(file2))
+ {
+ Log.log(Log.ERROR,jEdit.class,"Failed to rename \"" + file1 +
+ "\" to the user properties file \"" + file2 + "\".");
+ }
+ propsModTime = file2.lastModified();
+ }
+ } //}}}
+
+ // {{{ createTextArea() method
+ /**
+ * Create a standalone TextArea.
+ *
+ * @return a textarea
+ * @since 4.3pre13
+ * @deprecated use new JEditEmbeddedTextArea() instead
+ */
+ @Deprecated
+ public static TextArea createTextArea()
+ {
+ return new JEditEmbeddedTextArea();
+ } // }}}
+
+ //{{{ exit() method
+ /**
+ * Exits cleanly from jEdit, prompting the user if any unsaved files
+ * should be saved first.
+ * @param view The view from which this exit was called
+ * @param reallyExit If background mode is enabled and this parameter
+ * is true, then jEdit will close all open views instead of exiting
+ * entirely.
+ */
+ public static void exit(View view, boolean reallyExit)
+ {
+ // Close dialog, view.close() call need a view...
+ if(view == null)
+ view = activeView;
+
+ // Wait for pending I/O requests
+ VFSManager.waitForRequests();
+
+ // Create a new EditorExitRequested
+ EditorExitRequested eer = new EditorExitRequested(view);
+
+ // Send EditorExitRequested
+ EditBus.send(eer);
+
+ // Check if the ExitRequest has been cancelled
+ // if so, do not proceed anymore in the exiting
+ if (eer.hasBeenExitCancelled())
+ {
+ Log.log(Log.MESSAGE, jEdit.class, "Exit has been cancelled");
+ return;
+ }
+
+ // Even if reallyExit is false, we still exit properly
+ // if background mode is off
+ reallyExit |= !background;
+
+ PerspectiveManager.savePerspective(false);
+
+ try
+ {
+ PerspectiveManager.setPerspectiveEnabled(false);
+
+ // Close all buffers
+ if(!closeAllBuffers(view,reallyExit))
+ return;
+ }
+ finally
+ {
+ PerspectiveManager.setPerspectiveEnabled(true);
+ }
+
+ // If we are running in background mode and
+ // reallyExit was not specified, then return here.
+ if(!reallyExit)
+ {
+ // in this case, we can't directly call
+ // view.close(); we have to call closeView()
+ // for all open views
+ view = viewsFirst;
+ while(view != null)
+ {
+ closeView(view,false);
+ view = view.next;
+ }
+
+ // Save settings in case user kills the backgrounded
+ // jEdit process
+ saveSettings();
+ }
+ else
+ {
+
+ // Send EditorExiting
+ EditBus.send(new EditorExiting(null));
+
+ // Save view properties here
+ if(view != null)
+ {
+ view.close();
+ removeViewFromList(view);
+ }
+
+ // Stop autosave timer
+ Autosave.stop();
+
+ // Stop server
+ if(server != null)
+ server.stopServer();
+
+ // Stop all plugins
+ PluginJAR[] plugins = getPluginJARs();
+ for(int i = 0; i < plugins.length; i++)
+ {
+ removePluginJAR(plugins[i],true);
+ }
+
+
+ // Save settings
+ saveSettings();
+
+ // Close activity log stream
+ Log.closeStream();
+
+ // Byebye...
+ System.exit(0);
+ }
+ } //}}}
+
+ //{{{ getEditServer() method
+ /**
+ * Returns the edit server instance. You can use this to find out the
+ * port number jEdit is listening on.
+ * @since jEdit 4.2pre10
+ */
+ public static EditServer getEditServer()
+ {
+ return server;
+ } //}}}
+
+ //{{{ visit() method
+ /**
+ * Visit the views, editpanes and textareas
+ * @param visitor the visitor
+ * @since jEdit 4.3pre13
+ */
+ public static void visit(JEditVisitor visitor)
+ {
+ View view = jEdit.getFirstView();
+ while (view != null)
+ {
+ visitor.visit(view);
+ view.visit(visitor);
+ view = view.getNext();
+ }
+ } //}}}
+
+ //{{{ getRegisterStatusPrompt() method
+ /**
+ * Returns the status prompt for the given register action. Only
+ * intended to be called from <code>actions.xml</code>.
+ * @since jEdit 4.3pre16
+ */
+ public static String getRegisterStatusPrompt(String action)
+ {
+ String registerNameString = Registers.getRegisterNameString();
+ return jEdit.getProperty("view.status." + action,
+ new String[] {registerNameString == null ?
+ jEdit.getProperty("view.status.no-registers") :
+ registerNameString});
+ } //}}}
+
+ //}}}
+
+ //{{{ Package-private members
+
+ //{{{ updatePosition() method
+ /**
+ * If buffer sorting is enabled, this repositions the buffer.
+ */
+ static void updatePosition(String oldPath, Buffer buffer)
+ {
+ if((VFSManager.getVFSForPath(oldPath).getCapabilities()
+ & VFS.CASE_INSENSITIVE_CAP) != 0)
+ {
+ oldPath = oldPath.toLowerCase();
+ }
+
+ bufferHash.remove(oldPath);
+
+ String path = buffer.getSymlinkPath();
+ if((VFSManager.getVFSForPath(path).getCapabilities()
+ & VFS.CASE_INSENSITIVE_CAP) != 0)
+ {
+ path = path.toLowerCase();
+ }
+
+ bufferHash.put(path,buffer);
+
+ if(sortBuffers)
+ {
+ removeBufferFromList(buffer);
+ addBufferToList(buffer);
+ }
+ } //}}}
+
+ //{{{ loadMode() method
+ /**
+ * Loads an XML-defined edit mode from the specified reader.
+ * @param mode The edit mode
+ */
+ /* package-private */ static void loadMode(Mode mode)
+ {
+ final String fileName = (String)mode.getProperty("file");
+ XModeHandler xmh = new XModeHandler(mode.getName())
+ {
+ @Override
+ public void error(String what, Object subst)
+ {
+ String msg;
+
+ Object line = "<unknown>";
+ if(subst == null)
+ msg = jEdit.getProperty("xmode-error." + what);
+ else
+ {
+ msg = jEdit.getProperty("xmode-error." + what,
+ new String[] { subst.toString() });
+ if(subst instanceof Throwable)
+ Log.log(Log.ERROR,this,subst);
+ if (subst instanceof SAXParseException)
+ {
+ line = ((SAXParseException)subst).getLineNumber();
+ }
+ }
+
+ Object[] args = { fileName, line, null, msg };
+ GUIUtilities.error(null,"xmode-error",args);
+ }
+
+ @Override
+ public TokenMarker getTokenMarker(String modeName)
+ {
+ Mode mode = getMode(modeName);
+ if(mode == null)
+ return null;
+ else
+ return mode.getTokenMarker();
+ }
+ };
+ ModeProvider.instance.loadMode(mode, xmh);
+ } //}}}
+
+ //{{{ addPluginProps() method
+ static void addPluginProps(Properties map)
+ {
+ propMgr.addPluginProps(map);
+ } //}}}
+
+ //{{{ removePluginProps() method
+ static void removePluginProps(Properties map)
+ {
+ propMgr.removePluginProps(map);
+ } //}}}
+
+ //{{{ pluginError() method
+ /**
+ * @param path
+ * @param messageProp - a property of a message to print
+ * @param args a list of arguments which correspond to {0} and {1} in the string to print.
+ */
+ static void pluginError(String path, String messageProp,
+ Object[] args)
+ {
+ synchronized(pluginErrorLock)
+ {
+ if(pluginErrors == null)
+ pluginErrors = new Vector<ErrorListDialog.ErrorEntry>();
+
+ ErrorListDialog.ErrorEntry newEntry =
+ new ErrorListDialog.ErrorEntry(
+ path,messageProp,args);
+
+ for (ErrorListDialog.ErrorEntry pluginError : pluginErrors)
+ {
+ if (pluginError.equals(newEntry))
+ return;
+ }
+ pluginErrors.addElement(newEntry);
+
+ if(isStartupDone())
+ {
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ showPluginErrorDialog();
+ }
+ });
+ }
+ }
+ } //}}}
+
+ //{{{ setActiveView() method
+ static void setActiveView(View view)
+ {
+ jEdit.activeView = view;
+ } //}}}
+
+ //{{{ getActiveViewInternal() method
+ /**
+ * Returns the internal active view, which might be null.
+ *
+ * @since 4.3pre10
+ */
+ public static View getActiveViewInternal()
+ {
+ return activeView;
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Static variables
+ private static String jEditHome;
+ private static String settingsDirectory;
+ private static String jarCacheDirectory;
+ private static long propsModTime;
+ private static PropertyManager propMgr;
+ private static EditServer server;
+ private static boolean background;
+ private static ActionContext actionContext;
+ private static ActionSet builtInActionSet;
+ private static Vector<ErrorListDialog.ErrorEntry> pluginErrors;
+ private static final Object pluginErrorLock = new Object();
+ private static Vector<PluginJAR> jars;
+
+ private static boolean saveCaret;
+ private static InputHandler inputHandler;
+
+ private static BufferSetManager bufferSetManager;
+
+ // buffer link list
+ private static boolean sortBuffers;
+ private static boolean sortByName;
+ private static int bufferCount;
+ private static Buffer buffersFirst;
+ private static Buffer buffersLast;
+ private static Map<String, Buffer> bufferHash;
+
+ // makes openTemporary() thread-safe
+ private static final Object bufferListLock = new Object();
+
+ private static final Object editBusOrderingLock = new Object();
+
+ // view link list
+ private static int viewCount;
+ private static View viewsFirst;
+ private static View viewsLast;
+ private static View activeView;
+
+ private static Vector<Boolean> startupDone = new Vector<Boolean>();
+
+ private static Thread mainThread;
+ //}}}
+
+ private jEdit() {}
+
+ //{{{ usage() method
+ private static void usage()
+ {
+ System.out.println("Usage: jedit [<options>] [<files>]");
+
+ System.out.println(" <file> +marker:<marker>: Positions caret"
+ + " at marker <marker>");
+ System.out.println(" <file> +line:<line>: Positions caret"
+ + " at line number <line>");
+ System.out.println(" <file> +line:<line>,<column>: Positions caret"
+ + " at line number <line> and column number <column>");
+ System.out.println(" --: End of options");
+ System.out.println(" -background: Run in background mode");
+ System.out.println(" -nobackground: Disable background mode (default)");
+ System.out.println(" -gui: Only if running in background mode; open initial view (default)");
+ System.out.println(" -nogui: Only if running in background mode; don't open initial view");
+ System.out.println(" -log=<level>: Log messages with level equal to or higher than this to");
+ System.out.println(" standard error. <level> must be between 1 and 9. Default is 7.");
+ System.out.println(" -newplainview: Client instance opens a new plain view");
+ System.out.println(" -newview: Client instance opens a new view (default)");
+ System.out.println(" -plugins: Load plugins (default)");
+ System.out.println(" -noplugins: Don't load any plugins");
+ System.out.println(" -restore: Restore previously open files (default)");
+ System.out.println(" -norestore: Don't restore previously open files");
+ System.out.println(" -reuseview: Client instance reuses existing view");
+ System.out.println(" -quit: Quit a running instance");
+ System.out.println(" -run=<script>: Run the specified BeanShell script");
+ System.out.println(" -server: Read/write server info from/to $HOME/.jedit/server (default)");
+ System.out.println(" -server=<name>: Read/write server info from/to $HOME/.jedit/<name>");
+ System.out.println(" -noserver: Don't start edit server");
+ System.out.println(" -settings=<path>: Load user-specific settings from <path>");
+ System.out.println(" -nosettings: Don't load user-specific settings");
+ System.out.println(" -startupscripts: Run startup scripts (default)");
+ System.out.println(" -nostartupscripts: Don't run startup scripts");
+ System.out.println(" -usage: Print this message and exit");
+ System.out.println(" -version: Print jEdit version and exit");
+ System.out.println(" -wait: Wait until the user closes the specified buffer in the server");
+ System.out.println(" instance. Does nothing if passed to the initial jEdit instance.");
+ System.out.println();
+ System.out.println("Report bugs to http://sourceforge.net/tracker/?group_id=588&atid=100588");
+ } //}}}
+
+ //{{{ version() method
+ private static void version()
+ {
+ System.out.println("jEdit " + getVersion());
+ } //}}}
+
+ //{{{ makeServerScript() method
+ /**
+ * Creates a BeanShell script that can be sent to a running edit server.
+ */
+ private static String makeServerScript(boolean wait,
+ boolean restore, boolean newView,
+ boolean newPlainView, String[] args,
+ String scriptFile)
+ {
+ StringBuilder script = new StringBuilder();
+
+ String userDir = System.getProperty("user.dir");
+
+ script.append("parent = \"");
+ script.append(StandardUtilities.charsToEscapes(userDir));
+ script.append("\";\n");
+
+ script.append("args = new String[");
+ script.append(args.length);
+ script.append("];\n");
+
+ for(int i = 0; i < args.length; i++)
+ {
+ script.append("args[");
+ script.append(i);
+ script.append("] = ");
+
+ if(args[i] == null)
+ script.append("null");
+ else
+ {
+ script.append('"');
+ script.append(StandardUtilities.charsToEscapes(args[i]));
+ script.append('"');
+ }
+
+ script.append(";\n");
+ }
+
+ script.append("view = jEdit.getLastView();\n");
+ script.append("buffer = EditServer.handleClient(");
+ script.append(restore).append(',').append(newView).append(',').append(newPlainView);
+ script.append(",parent,args);\n");
+ script.append("if(buffer != null && ").append(wait).append(") {\n");
+ script.append("\tbuffer.setWaitSocket(socket);\n");
+ script.append("\tdoNotCloseSocket = true;\n");
+ script.append("}\n");
+ script.append("if(view != jEdit.getLastView() && ").append(wait).append(") {\n");
+ script.append("\tjEdit.getLastView().setWaitSocket(socket);\n");
+ script.append("\tdoNotCloseSocket = true;\n");
+ script.append("}\n");
+ script.append("if(doNotCloseSocket == void)\n");
+ script.append("\tsocket.close();\n");
+
+ if(scriptFile != null)
+ {
+ scriptFile = MiscUtilities.constructPath(userDir,scriptFile);
+ script.append("BeanShell.runScript(view,\"")
+ .append(StandardUtilities.charsToEscapes(scriptFile))
+ .append("\",null,this.namespace);\n");
+ }
+
+ return script.toString();
+ } //}}}
+
+ //{{{ initMisc() method
+ /**
+ * Initialise various objects, register protocol handlers.
+ */
+ private static void initMisc()
+ {
+ ModeProvider.instance = new ModeProvider()
+ {
+ @Override
+ protected void error(String fileName, Throwable e)
+ {
+ Log.log(Log.ERROR, this, e);
+ if (e instanceof SAXParseException)
+ {
+ String message = e.getMessage();
+ int line = ((SAXParseException)e).getLineNumber();
+ int col = ((SAXParseException)e).getColumnNumber();
+
+ Object[] args = { fileName, line, col, message };
+ GUIUtilities.error(null,"xmode-error",args);
+ }
+ }
+ };
+ jars = new Vector<PluginJAR>();
+ FoldHandler.foldHandlerProvider = new ServiceManager.ServiceFoldHandlerProvider();
+ actionContext = new ActionContext()
+ {
+ @Override
+ public void invokeAction(EventObject evt,
+ EditAction action)
+ {
+ View view = GUIUtilities.getView(
+ (Component)evt.getSource());
+
+ boolean actionBarVisible;
+ if(view.getActionBar() == null
+ || !view.getActionBar().isShowing())
+ actionBarVisible = false;
+ else
+ {
+ actionBarVisible = view.getActionBar()
+ .isVisible();
+ }
+
+ view.getInputHandler().invokeAction(action);
+
+ if(actionBarVisible)
+ {
+ // XXX: action bar might not be 'temp'
+ ActionBar actionBar = view
+ .getActionBar();
+ if(actionBar != null)
+ view.removeToolBar(actionBar);
+ }
+ }
+ };
+
+ bufferHash = new HashMap<String, Buffer>();
+
+ inputHandler = new DefaultInputHandler(null);
+ // Add our protocols to java.net.URL's list
+ System.getProperties().put("java.protocol.handler.pkgs",
+ "org.gjt.sp.jedit.proto|" +
+ System.getProperty("java.protocol.handler.pkgs",""));
+
+ // Set the User-Agent string used by the java.net HTTP handler
+ String userAgent = "jEdit/" + getVersion()
+ + " (Java " + System.getProperty("java.version")
+ + ". " + System.getProperty("java.vendor")
+ + "; " + System.getProperty("os.arch") + ')';
+ System.getProperties().put("http.agent",userAgent);
+
+ /* Determine installation directory.
+ * If the jedit.home property is set, use that.
+ * Then, look for jedit.jar in the classpath.
+ * If that fails, assume this is the web start version. */
+ jEditHome = System.getProperty("jedit.home");
+ if(jEditHome == null)
+ {
+ String classpath = System
+ .getProperty("java.class.path");
+ int index = classpath.toLowerCase()
+ .indexOf("jedit.jar");
+ int start = classpath.lastIndexOf(File
+ .pathSeparator,index) + 1;
+ // if started with java -jar jedit.jar
+ if(start == index)
+ {
+ jEditHome = System.getProperty("user.dir");
+ }
+ else if(index > start)
+ {
+ jEditHome = classpath.substring(start,
+ index - 1);
+ }
+ else
+ {
+ // check if web start
+ /* if(jEdit.class.getResource("/modes/catalog") != null)
+ {
+ // modes bundled in; hence web start
+ jEditHome = null;
+ }
+ else */
+ {
+ // use user.dir as last resort
+ jEditHome = System.getProperty("user.dir");
+
+ Log.log(Log.WARNING,jEdit.class,"jedit.jar not in class path!");
+ Log.log(Log.WARNING,jEdit.class,"Assuming jEdit is installed in "
+ + jEditHome + '.');
+ Log.log(Log.WARNING,jEdit.class,"Override with jedit.home "
+ + "system property.");
+ }
+ }
+ }
+
+ jEditHome = MiscUtilities.resolveSymlinks(jEditHome);
+
+ Log.log(Log.MESSAGE,jEdit.class,"jEdit home directory is " + jEditHome);
+
+ if(settingsDirectory != null)
+ {
+ jarCacheDirectory = MiscUtilities.constructPath(
+ settingsDirectory,"jars-cache");
+ new File(jarCacheDirectory).mkdirs();
+ }
+
+ //if(jEditHome == null)
+ // Log.log(Log.DEBUG,jEdit.class,"Web start mode");
+
+ // Add an EditBus component that will reload edit modes and
+ // macros if they are changed from within the editor
+ EditBus.addToBus(new SettingsReloader());
+
+ // Perhaps if Xerces wasn't slightly brain-damaged, we would
+ // not need this
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ Thread.currentThread().setContextClassLoader(
+ new JARClassLoader());
+ }
+ });
+ // Also set the ContextClassLoader for the main jEdit thread.
+ // This way, the ContextClassLoader will be a JARClassLoader
+ // even at plugin activation.
+ Thread.currentThread().setContextClassLoader(new JARClassLoader());
+ } //}}}
+
+ //{{{ initSystemProperties() method
+ /**
+ * Load system properties.
+ */
+ private static void initSystemProperties()
+ {
+ propMgr = new PropertyManager();
+
+ try
+ {
+ propMgr.loadSystemProps(jEdit.class.getResourceAsStream(
+ "/org/gjt/sp/jedit/jedit.props"));
+ propMgr.loadSystemProps(jEdit.class.getResourceAsStream(
+ "/org/gjt/sp/jedit/jedit_gui.props"));
+ propMgr.loadSystemProps(jEdit.class.getResourceAsStream(
+ "/org/gjt/sp/jedit/jedit_keys.props"));
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,jEdit.class,
+ "Error while loading system properties!");
+ Log.log(Log.ERROR,jEdit.class,
+ "One of the following property files could not be loaded:\n"
+ + "- jedit.props\n"
+ + "- jedit_gui.props\n"
+ + "- jedit_keys.props\n"
+ + "jedit.jar is probably corrupt.");
+ Log.log(Log.ERROR,jEdit.class,e);
+ System.exit(1);
+ }
+ } //}}}
+
+ //{{{ initSiteProperties() method
+ /**
+ * Load site properties.
+ */
+ private static void initSiteProperties()
+ {
+ // site properties are loaded as default properties, overwriting
+ // jEdit's system properties
+
+ String siteSettingsDirectory = MiscUtilities.constructPath(
+ jEditHome, "properties");
+ File siteSettings = new File(siteSettingsDirectory);
+
+ if (!(siteSettings.exists() && siteSettings.isDirectory()))
+ return;
+
+ String[] snippets = siteSettings.list();
+ if (snippets == null)
+ return;
+
+ Arrays.sort(snippets,
+ new StandardUtilities.StringCompare<String>(true));
+
+ for (int i = 0; i < snippets.length; ++i)
+ {
+ String snippet = snippets[i];
+ if(!snippet.toLowerCase().endsWith(".props"))
+ continue;
+
+ try
+ {
+ String path = MiscUtilities.constructPath(
+ siteSettingsDirectory,snippet);
+ Log.log(Log.DEBUG,jEdit.class,
+ "Loading site snippet: " + path);
+
+ propMgr.loadSiteProps(new FileInputStream(new File(path)));
+ }
+ catch(FileNotFoundException fnf)
+ {
+ Log.log(Log.DEBUG,jEdit.class,fnf);
+ }
+ catch(IOException e)
+ {
+ Log.log(Log.ERROR,jEdit.class,"Cannot load site snippet "
+ + snippet);
+ Log.log(Log.ERROR,jEdit.class,e);
+ }
+ }
+ } //}}}
+
+ //{{{ initResources() method
+ private static void initResources()
+ {
+ builtInActionSet = new ActionSet(null,null,null,
+ jEdit.class.getResource("actions.xml"));
+ builtInActionSet.setLabel(getProperty("action-set.jEdit"));
+ builtInActionSet.load();
+
+ actionContext.addActionSet(builtInActionSet);
+
+ DockableWindowFactory.getInstance()
+ .loadDockableWindows(null,
+ jEdit.class.getResource("dockables.xml"),
+ null);
+
+ ServiceManager.loadServices(null,
+ jEdit.class.getResource("services.xml"),
+ null);
+ } //}}}
+
+ //{{{ initPlugins() method
+ /**
+ * Loads plugins.
+ */
+ private static void initPlugins()
+ {
+ if(jEditHome != null)
+ {
+ addPluginJARsFromDirectory(MiscUtilities.constructPath(
+ jEditHome,"jars"));
+ }
+
+ if(settingsDirectory != null)
+ {
+ File jarsDirectory = new File(settingsDirectory,"jars");
+ if(!jarsDirectory.exists())
+ jarsDirectory.mkdir();
+ addPluginJARsFromDirectory(jarsDirectory.getPath());
+ }
+
+ PluginJAR[] jars = getPluginJARs();
+ for(int i = 0; i < jars.length; i++)
+ {
+ jars[i].checkDependencies();
+ }
+ } //}}}
+
+ //{{{ initUserProperties() method
+ /**
+ * Loads user properties.
+ */
+ private static void initUserProperties()
+ {
+ if(settingsDirectory != null)
+ {
+ File file = new File(MiscUtilities.constructPath(
+ settingsDirectory,"properties"));
+ propsModTime = file.lastModified();
+
+ try
+ {
+ propMgr.loadUserProps(
+ new FileInputStream(file));
+ }
+ catch(FileNotFoundException fnf)
+ {
+ //Log.log(Log.DEBUG,jEdit.class,fnf);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,jEdit.class,e);
+ }
+ }
+ } //}}}
+
+ //{{{ fontStyleToString() method
+ private static String fontStyleToString(int style)
+ {
+ if(style == 0)
+ return "PLAIN";
+ else if(style == Font.BOLD)
+ return "BOLD";
+ else if(style == Font.ITALIC)
+ return "ITALIC";
+ else if(style == (Font.BOLD | Font.ITALIC))
+ return "BOLDITALIC";
+ else
+ throw new RuntimeException("Invalid style: " + style);
+ } //}}}
+
+ //{{{ fontToString() method
+ private static String fontToString(Font font)
+ {
+ return font.getFamily()
+ + '-'
+ + fontStyleToString(font.getStyle())
+ + '-'
+ + font.getSize();
+ } //}}}
+
+ //{{{ initPLAF() method
+ /**
+ * Sets the Swing look and feel.
+ */
+ private static void initPLAF()
+ {
+ Font primaryFont = jEdit.getFontProperty(
+ "metal.primary.font");
+ if(primaryFont != null)
+ {
+ String primaryFontString =
+ fontToString(primaryFont);
+
+ System.getProperties().put(
+ "swing.plaf.metal.controlFont",
+ primaryFontString);
+ System.getProperties().put(
+ "swing.plaf.metal.menuFont",
+ primaryFontString);
+ }
+
+ Font secondaryFont = jEdit.getFontProperty(
+ "metal.secondary.font");
+ if(secondaryFont != null)
+ {
+ String secondaryFontString =
+ fontToString(secondaryFont);
+
+ System.getProperties().put(
+ "swing.plaf.metal.systemFont",
+ secondaryFontString);
+ System.getProperties().put(
+ "swing.plaf.metal.userFont",
+ secondaryFontString);
+ }
+
+ // Though the cause is not known, this must precede
+ // UIManager.setLookAndFeel(), so that menu bar
+ // interaction by ALT key interacts with swing.JMenuBar
+ // (which uses L&F) instead of awt.MenuBar which we
+ // don't use (and doesn't use L&F).
+ // The difference of the behavior was seen on Sun JRE
+ // 6u16 on Windows XP and Windows L&F.
+ KeyboardFocusManager.setCurrentKeyboardFocusManager(
+ new MyFocusManager());
+
+ try
+ {
+ String lf = getProperty("lookAndFeel");
+ if(lf != null && lf.length() != 0)
+ UIManager.setLookAndFeel(lf);
+ else if(OperatingSystem.isMacOS())
+ {
+ UIManager.setLookAndFeel(UIManager
+ .getSystemLookAndFeelClassName());
+ }
+ else
+ {
+ UIManager.setLookAndFeel(UIManager
+ .getCrossPlatformLookAndFeelClassName());
+ }
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,jEdit.class,e);
+ }
+
+ UIDefaults defaults = UIManager.getDefaults();
+
+ // give all Swing components our colors
+ if(jEdit.getBooleanProperty("textColors"))
+ {
+ Color background = new javax.swing.plaf.ColorUIResource(
+ jEdit.getColorProperty("view.bgColor"));
+ Color foreground = new javax.swing.plaf.ColorUIResource(
+ jEdit.getColorProperty("view.fgColor"));
+ Color caretColor = new javax.swing.plaf.ColorUIResource(
+ jEdit.getColorProperty("view.caretColor"));
+ Color selectionColor = new javax.swing.plaf.ColorUIResource(
+ jEdit.getColorProperty("view.selectionColor"));
+
+ String[] prefixes = { "PasswordField", "TextField", "TextArea", "List", "Table" };
+ for(int i = 0; i < prefixes.length; i++)
+ {
+ String prefix = prefixes[i];
+ defaults.put(prefix + ".foreground",foreground);
+ defaults.put(prefix + ".background",background);
+ defaults.put(prefix + ".disabledForeground",foreground);
+ defaults.put(prefix + ".disabledBackground",background);
+ defaults.put(prefix + ".caretForeground",caretColor);
+ defaults.put(prefix + ".selectionForeground",foreground);
+ defaults.put(prefix + ".selectionBackground",selectionColor);
+ }
+
+ defaults.put("ComboBox.foreground",foreground);
+ defaults.put("ComboBox.background",background);
+ defaults.put("ComboBox.disabledForeground",foreground);
+ defaults.put("ComboBox.disabledBackground",background);
+ defaults.put("ComboBox.selectedForeground",foreground);
+ defaults.put("ComboBox.selectedBackground",selectionColor);
+
+ defaults.put("Tree.background",background);
+ defaults.put("Tree.foreground",foreground);
+ defaults.put("Tree.textBackground",background);
+ defaults.put("Tree.textForeground",foreground);
+ defaults.put("Tree.selectionForeground",foreground);
+ defaults.put("Tree.selectionBackground",selectionColor);
+ }
+
+ defaults.remove("SplitPane.border");
+ defaults.remove("SplitPaneDivider.border");
+
+ JFrame.setDefaultLookAndFeelDecorated(
+ getBooleanProperty("decorate.frames"));
+ JDialog.setDefaultLookAndFeelDecorated(
+ getBooleanProperty("decorate.dialogs"));
+ } //}}}
+
+ //{{{ getNextUntitledBufferId() method
+ public static int getNextUntitledBufferId()
+ {
+ int untitledCount = 0;
+ Buffer buffer = buffersFirst;
+ while(buffer != null)
+ {
+ if(buffer.getName().startsWith("Untitled-"))
+ {
+ try
+ {
+ untitledCount = Math.max(untitledCount,
+ Integer.parseInt(buffer.getName()
+ .substring(9)));
+ }
+ catch(NumberFormatException nf)
+ {
+ }
+ }
+ buffer = buffer.next;
+ }
+ return untitledCount + 1;
+ } //}}}
+
+ //{{{ runStartupScripts() method
+ /**
+ * Runs scripts in a directory.
+ */
+ private static void runStartupScripts(File directory)
+ {
+ if (!directory.isDirectory())
+ return;
+
+ File[] snippets = directory.listFiles();
+ if (snippets == null)
+ return;
+
+ Arrays.sort(snippets,
+ new StandardUtilities.StringCompare<File>(true));
+
+ /*
+ * Force the default encoding to UTF-8 temporarily.
+ * The shipped scripts use that encoding, so we need
+ * to make sure we can load them correctly. If users
+ * want to write script with a different encoding,
+ * they can use buffer-local properties on the
+ * script to set it.
+ */
+ String defaultEncoding = getProperty("buffer.encoding");
+ setProperty("buffer.encoding", "UTF-8");
+
+ for(int i = 0; i < snippets.length; ++i)
+ {
+ File snippet = snippets[i];
+
+ Macros.Handler handler = Macros.getHandlerForPathName(
+ snippet.getPath());
+ if(handler == null)
+ continue;
+
+ try
+ {
+ Macros.Macro newMacro = handler.createMacro(
+ snippet.getName(),
+ snippet.getPath());
+ handler.runMacro(null,newMacro,false);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,jEdit.class,e);
+ }
+ }
+
+ setProperty("buffer.encoding", defaultEncoding);
+ } //}}}
+
+ //{{{ initProxy() method
+ private static void initProxy()
+ {
+ boolean socksEnabled = jEdit.getBooleanProperty("firewall.socks.enabled");
+ if(!socksEnabled)
+ {
+ Log.log(Log.DEBUG,jEdit.class,"SOCKS proxy disabled");
+ System.getProperties().remove("socksProxyHost");
+ System.getProperties().remove("socksProxyPort");
+ }
+ else
+ {
+ String socksHost = jEdit.getProperty("firewall.socks.host");
+ if( socksHost != null )
+ {
+ System.setProperty("socksProxyHost", socksHost);
+ Log.log(Log.DEBUG, jEdit.class,
+ "SOCKS proxy enabled: " + socksHost);
+ }
+
+ String socksPort = jEdit.getProperty("firewall.socks.port");
+ if(socksPort != null)
+ System.setProperty("socksProxyPort", socksPort);
+ }
+
+ boolean httpEnabled = jEdit.getBooleanProperty("firewall.enabled");
+ if (!httpEnabled)
+ {
+ Log.log(Log.DEBUG, jEdit.class, "HTTP proxy disabled");
+ System.getProperties().remove("proxySet");
+ System.getProperties().remove("proxyHost");
+ System.getProperties().remove("proxyPort");
+ System.getProperties().remove("http.proxyHost");
+ System.getProperties().remove("http.proxyPort");
+ System.getProperties().remove("http.nonProxyHosts");
+ Authenticator.setDefault(null);
+ }
+ else
+ {
+ // set proxy host
+ String host = jEdit.getProperty("firewall.host");
+ if (host == null)
+ return;
+
+ System.setProperty("http.proxyHost", host);
+ Log.log(Log.DEBUG, jEdit.class, "HTTP proxy enabled: " + host);
+ // set proxy port
+ String port = jEdit.getProperty("firewall.port");
+ if (port != null)
+ System.setProperty("http.proxyPort", port);
+
+ // set non proxy hosts list
+ String nonProxyHosts = jEdit.getProperty("firewall.nonProxyHosts");
+ if (nonProxyHosts != null)
+ System.setProperty("http.nonProxyHosts", nonProxyHosts);
+
+ // set proxy authentication
+ String username = jEdit.getProperty("firewall.user");
+ String password = jEdit.getProperty("firewall.password");
+
+ // null not supported?
+ if(password == null)
+ password = "";
+
+ if(username == null || username.length()==0)
+ {
+ Log.log(Log.DEBUG, jEdit.class, "HTTP proxy without user");
+ Authenticator.setDefault(new FirewallAuthenticator(null));
+ }
+ else
+ {
+ Log.log(Log.DEBUG, jEdit.class, "HTTP proxy user: " + username);
+ PasswordAuthentication pw = new PasswordAuthentication(
+ username,password.toCharArray()
+ );
+ Authenticator.setDefault(new FirewallAuthenticator(pw));
+ }
+ }
+ } //}}}
+
+ //{{{ FirewallAuthenticator class
+ static class FirewallAuthenticator extends Authenticator
+ {
+ PasswordAuthentication pw;
+
+ FirewallAuthenticator(PasswordAuthentication pw)
+ {
+ this.pw = pw;
+ }
+
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication()
+ {
+ return pw;
+ }
+ } //}}}
+
+ //{{{ finishStartup() method
+ private static void finishStartup(final boolean gui, final boolean restore,
+ final boolean newPlainView, final String userDir, final String[] args)
+ {
+ EventQueue.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ int count = getBufferCount();
+
+ boolean restoreFiles = restore
+ && jEdit.getBooleanProperty("restore")
+ && (count == 0 ||
+ jEdit.getBooleanProperty("restore.cli"));
+
+ if(gui || count != 0)
+ {
+ View view;
+ if (newPlainView)
+ view = newView(null,null,true);
+ else
+ view = PerspectiveManager.loadPerspective(restoreFiles);
+
+ if(view == null)
+ view = newView(null,null);
+
+ Buffer buffer = openFiles(null,userDir,args);
+ if(buffer != null)
+ view.setBuffer(buffer,true);
+ }
+ else
+ {
+ openFiles(null,userDir,args);
+ }
+
+ // Start I/O threads
+ EditBus.send(new EditorStarted(null));
+
+ VFSManager.start();
+
+ // Start edit server
+ if(server != null)
+ server.start();
+
+ GUIUtilities.hideSplashScreen();
+
+ Log.log(Log.MESSAGE,jEdit.class,"Startup "
+ + "complete");
+
+ //{{{ Report any plugin errors
+ if(pluginErrors != null)
+ {
+ showPluginErrorDialog();
+ } //}}}
+
+ startupDone.set(0, true);
+
+ // in one case not a single AWT class will
+ // have been touched (splash screen off +
+ // -nogui -nobackground switches on command
+ // line)
+ Toolkit.getDefaultToolkit();
+ }
+ });
+ } //}}}
+
+ //{{{ showPluginErrorDialog() method
+ private static void showPluginErrorDialog()
+ {
+ if(pluginErrors == null)
+ return;
+
+ String caption = getProperty(
+ "plugin-error.caption" + (pluginErrors.size() == 1
+ ? "-1" : ""));
+
+ Frame frame = (PluginManager.getInstance() == null
+ ? viewsFirst
+ : PluginManager.getInstance());
+
+ new ErrorListDialog(frame,
+ getProperty("plugin-error.title"),
+ caption,pluginErrors,true);
+ pluginErrors = null;
+ } //}}}
+
+ //{{{ getNotLoadedPluginJARs() method
+ private static void getNotLoadedPluginJARs(List<String> returnValue,
+ String dir, String[] list)
+ {
+loop: for(int i = 0; i < list.length; i++)
+ {
+ String name = list[i];
+ if(!name.toLowerCase().endsWith(".jar"))
+ continue loop;
+
+ String path = MiscUtilities.constructPath(dir,name);
+
+ for(int j = 0; j < jars.size(); j++)
+ {
+ PluginJAR jar = jars.elementAt(j);
+ String jarPath = jar.getPath();
+ String jarName = MiscUtilities.getFileName(jarPath);
+
+ if(path.equals(jarPath))
+ continue loop;
+ else if(!new File(jarPath).exists()
+ && name.equals(jarName))
+ continue loop;
+ }
+
+ returnValue.add(path);
+ }
+ } //}}}
+
+ //{{{ gotoMarker() method
+ private static void gotoMarker(final View view, final Buffer buffer,
+ final String marker)
+ {
+ VFSManager.runInAWTThread(new Runnable()
+ {
+ public void run()
+ {
+ int pos;
+
+ // Handle line number
+ if(marker.startsWith("+line:"))
+ {
+ try
+ {
+ String arg = marker.substring(6);
+ String[] lineCol = arg.split(",");
+ int line, col;
+ if(lineCol.length > 1)
+ {
+ line = Integer.parseInt(lineCol[0]);
+ col = Integer.parseInt(lineCol[1]);
+ }
+ else
+ {
+ line = Integer.parseInt(marker.substring(6));
+ col = 1;
+ }
+ pos = buffer.getLineStartOffset(line - 1) + (col - 1);
+ }
+ catch(Exception e)
+ {
+ return;
+ }
+ }
+ // Handle marker
+ else if(marker.startsWith("+marker:"))
+ {
+ if(marker.length() != 9)
+ return;
+
+ Marker m = buffer.getMarker(marker.charAt(8));
+ if(m == null)
+ return;
+ pos = m.getPosition();
+ }
+ // Can't happen
+ else
+ throw new InternalError();
+
+ if(view != null && view.getBuffer() == buffer)
+ {
+ view.getTextArea().setCaretPosition(pos);
+ buffer.setIntegerProperty(Buffer.CARET,pos);
+ buffer.setBooleanProperty(Buffer.CARET_POSITIONED,true);
+ }
+ else
+ {
+ buffer.setIntegerProperty(Buffer.CARET,pos);
+ buffer.setBooleanProperty(Buffer.CARET_POSITIONED,true);
+ buffer.unsetProperty(Buffer.SCROLL_VERT);
+ }
+ }
+ });
+ } //}}}
+
+ //{{{ addBufferToList() method
+ private static void addBufferToList(Buffer buffer)
+ {
+ synchronized(bufferListLock)
+ {
+ String symlinkPath = buffer.getSymlinkPath();
+ if((VFSManager.getVFSForPath(symlinkPath).getCapabilities()
+ & VFS.CASE_INSENSITIVE_CAP) != 0)
+ {
+ symlinkPath = symlinkPath.toLowerCase();
+ }
+
+ bufferCount++;
+
+ bufferHash.put(symlinkPath,buffer);
+
+ if(buffersFirst == null)
+ {
+ buffersFirst = buffersLast = buffer;
+ return;
+ }
+ //{{{ Sort buffer list
+ else if(sortBuffers)
+ {
+ String str11, str12;
+ if(sortByName)
+ {
+ str11 = buffer.getName();
+ str12 = buffer.getDirectory();
+ }
+ else
+ {
+ str11 = buffer.getDirectory();
+ str12 = buffer.getName();
+ }
+
+ Buffer _buffer = buffersFirst;
+ while(_buffer != null)
+ {
+ String str21, str22;
+ if(sortByName)
+ {
+ str21 = _buffer.getName();
+ str22 = _buffer.getDirectory();
+ }
+ else
+ {
+ str21 = _buffer.getDirectory();
+ str22 = _buffer.getName();
+ }
+
+ int comp = StandardUtilities.compareStrings(str11,str21,true);
+ if(comp < 0 || (comp == 0 && StandardUtilities.compareStrings(str12,str22,true) < 0))
+ {
+ buffer.next = _buffer;
+ buffer.prev = _buffer.prev;
+ _buffer.prev = buffer;
+ if(_buffer != buffersFirst)
+ buffer.prev.next = buffer;
+ else
+ buffersFirst = buffer;
+ return;
+ }
+
+ _buffer = _buffer.next;
+ }
+ } //}}}
+
+ buffer.prev = buffersLast;
+ // fixes the hang that can occur if we 'save as' to a
+ // new filename which requires re-sorting
+ buffer.next = null;
+ buffersLast.next = buffer;
+ buffersLast = buffer;
+ }
+ } //}}}
+
+ //{{{ removeBufferFromList() method
+ private static void removeBufferFromList(Buffer buffer)
+ {
+ synchronized(bufferListLock)
+ {
+ bufferCount--;
+
+ String path = buffer.getPath();
+ if(OperatingSystem.isCaseInsensitiveFS())
+ path = path.toLowerCase();
+
+ bufferHash.remove(path);
+
+ if(buffer == buffersFirst && buffer == buffersLast)
+ {
+ buffersFirst = buffersLast = null;
+ return;
+ }
+
+ if(buffer == buffersFirst)
+ {
+ buffersFirst = buffer.next;
+ buffer.next.prev = null;
+ }
+ else
+ {
+ if (buffer.prev != null)
+ buffer.prev.next = buffer.next;
+ }
+
+ if(buffer == buffersLast)
+ {
+ buffersLast = buffersLast.prev;
+ buffer.prev.next = null;
+ }
+ else
+ {
+ if (buffer.next != null)
+ buffer.next.prev = buffer.prev;
+ }
+
+ // fixes the hang that can occur if we 'save as' to a new
+ // filename which requires re-sorting
+ buffer.next = buffer.prev = null;
+ }
+ } //}}}
+
+ //{{{ addViewToList() method
+ private static void addViewToList(View view)
+ {
+ viewCount++;
+
+ if(viewsFirst == null)
+ viewsFirst = viewsLast = view;
+ else
+ {
+ view.prev = viewsLast;
+ viewsLast.next = view;
+ viewsLast = view;
+ }
+ } //}}}
+
+ //{{{ removeViewFromList() method
+ private static void removeViewFromList(View view)
+ {
+ viewCount--;
+
+ if(viewsFirst == viewsLast)
+ {
+ viewsFirst = viewsLast = null;
+ return;
+ }
+
+ if(view == viewsFirst)
+ {
+ viewsFirst = view.next;
+ view.next.prev = null;
+ }
+ else
+ {
+ view.prev.next = view.next;
+ }
+
+ if(view == viewsLast)
+ {
+ viewsLast = viewsLast.prev;
+ view.prev.next = null;
+ }
+ else
+ {
+ view.next.prev = view.prev;
+ }
+ } //}}}
+
+ //{{{ closeView() method
+ /**
+ * closeView() used by exit().
+ */
+ private static boolean closeView(View view, boolean callExit)
+ {
+ PerspectiveManager.setPerspectiveDirty(true);
+
+ if(viewsFirst == viewsLast && callExit)
+ {
+ exit(view,false); /* exit does editor event & save */
+ // Coming here means the request has been canceled.
+ return false;
+ }
+ else
+ {
+ if (!view.confirmToCloseDirty())
+ return false;
+
+ view.close();
+ view.dispose();
+ removeViewFromList(view);
+
+ if(view == activeView)
+ activeView = null;
+
+ return true;
+ }
+ } //}}}
+
+ //{{{ loadModeCatalog() method
+ /**
+ * Loads a mode catalog file.
+ * @since jEdit 3.2pre2
+ */
+ private static void loadModeCatalog(String path, boolean resource)
+ {
+ Log.log(Log.MESSAGE,jEdit.class,"Loading mode catalog file " + path);
+
+ ModeCatalogHandler handler = new ModeCatalogHandler(
+ MiscUtilities.getParentOfPath(path),resource)
+ {
+ @Override
+ protected Mode instantiateMode(String modeName)
+ {
+ return new JEditMode(modeName);
+ }
+ };
+ try
+ {
+ InputStream _in;
+ if(resource)
+ _in = jEdit.class.getResourceAsStream(path);
+ else
+ _in = new FileInputStream(path);
+ XMLUtilities.parseXML(_in, handler);
+ }
+ catch(IOException e)
+ {
+ Log.log(Log.ERROR,jEdit.class,e);
+ }
+ } //}}}
+
+ //{{{ initKeyBindings() method
+ /**
+ * Loads all key bindings from the properties.
+ *
+ * @since 3.1pre1
+ */
+ private static void initKeyBindings()
+ {
+ inputHandler.removeAllKeyBindings();
+
+ ActionSet[] actionSets = getActionSets();
+ for (int i = 0; i < actionSets.length; i++)
+ {
+ actionSets[i].initKeyBindings();
+ }
+ } //}}}
+
+ //{{{ composeBufferPropsFromHistory() method
+ /**
+ * Compose buffer-local properties which can be got from history.
+ * @since 4.3pre10
+ */
+ private static void composeBufferPropsFromHistory(Map props, String path)
+ {
+ BufferHistory.Entry entry = BufferHistory.getEntry(path);
+
+ if(entry != null && saveCaret && props.get(Buffer.CARET) == null)
+ {
+ props.put(Buffer.CARET, entry.caret);
+ /* if(entry.selection != null)
+ {
+ // getSelection() converts from string to
+ // Selection[]
+ props.put(Buffer.SELECTION,entry.getSelection());
+ } */
+ }
+
+ if(entry != null && props.get(JEditBuffer.ENCODING) == null)
+ {
+ if(entry.encoding != null)
+ props.put(JEditBuffer.ENCODING,entry.encoding);
+ }
+
+ if (entry != null && props.get("mode") == null)
+ {
+ if (entry.mode != null)
+ props.put("mode", entry.mode);
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ MyFocusManager class
+ private static class MyFocusManager extends DefaultKeyboardFocusManager
+ {
+ MyFocusManager()
+ {
+ setDefaultFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
+ }
+
+ @Override
+ public boolean postProcessKeyEvent(KeyEvent evt)
+ {
+ if(!evt.isConsumed())
+ {
+ Component comp = (Component)evt.getSource();
+ if(!comp.isShowing())
+ return true;
+
+ for(;;)
+ {
+ if(comp instanceof View)
+ {
+ ((View)comp).getInputHandler().processKeyEvent(evt,
+ View.VIEW, false);
+ return true;
+ }
+ else if(comp == null || comp instanceof Window
+ || comp instanceof JEditTextArea)
+ {
+ if (comp instanceof PluginManager)
+ {
+ evt.setSource(comp);
+ ((PluginManager)comp).processKeyEvents(evt);
+ }
+ break;
+ }
+ else
+ comp = comp.getParent();
+ }
+ }
+
+ return super.postProcessKeyEvent(evt);
+ }
+ } //}}}
+
+ //{{{ JEditPropertyManager class
+ public static class JEditPropertyManager implements IPropertyManager
+ {
+ public String getProperty(String name)
+ {
+ return jEdit.getProperty(name);
+ }
+ } //}}}
+
+ //{{{ DockingLayoutSetter class
+ private static class DockingLayoutSetter implements Runnable
+ {
+ private View view;
+ private ViewConfig config;
+ private int startupDoneIndex;
+
+ DockingLayoutSetter(View view, ViewConfig config, int startupDoneIndex)
+ {
+ this.view = view;
+ this.config = config;
+ this.startupDoneIndex = startupDoneIndex;
+ }
+
+ public void run()
+ {
+ DockableWindowManager wm = view.getDockableWindowManager();
+ wm.setDockingLayout(config.docking);
+ startupDone.set(startupDoneIndex, true);
+ }
+ } //}}}
+
+ private static final JEditPropertyManager propertyManager = new JEditPropertyManager();
+}
diff --git a/jEdit/org/gjt/sp/jedit/jedit.manifest b/jEdit/org/gjt/sp/jedit/jedit.manifest
index b3c0c1f..61b3516 100644
--- a/jEdit/org/gjt/sp/jedit/jedit.manifest
+++ b/jEdit/org/gjt/sp/jedit/jedit.manifest
@@ -1 +1 @@
-Main-Class: org.gjt.sp.jedit.jEdit
+Main-Class: org.gjt.sp.jedit.jEdit
diff --git a/jEdit/org/gjt/sp/jedit/jedit.props b/jEdit/org/gjt/sp/jedit/jedit.props
index fd80b1f..db6c015 100644
--- a/jEdit/org/gjt/sp/jedit/jedit.props
+++ b/jEdit/org/gjt/sp/jedit/jedit.props
@@ -1,475 +1,480 @@
-###
-### jEdit global properties
-### :tabSize=8:indentSize=8:noTabs=false:
-### :folding=explicit:collapseFolds=1:
-### :encoding=ISO-8859-1:
-###
-### Copyright (C) 1998, 2003 Slava Pestov
-###
-
-#{{{ Global settings
-
-# Swing look and feel
-#lookAndFeel=javax.swing.plaf.metal.MetalLookAndFeel
-
-#{{{ Metal control and menu font
-metal.primary.font=Dialog
-metal.primary.fontsize=12
-metal.primary.fontstyle=0
-#}}}
-
-#{{{ Metal system and user text font
-metal.secondary.font=Dialog
-metal.secondary.fontsize=12
-metal.secondary.fontstyle=0
-#}}}
-
-# Decorate frames and dialogs using Swing L&F? (JDK 1.4 only)
-decorate.frames=false
-decorate.dialogs=false
-
-# If true, welcome screen will be displayed.
-# Set to false after initial startup.
-firstTime=true
-
-# Autosave interval in seconds, 0=off
-autosave=30
-
-# Autosave untitled buffers
-autosaveUntitled=true
-
-
-# Maximum number of elements in a history list
-history=20
-
-# Number of recent files
-recentFiles=40
-
-# Restore open files on startup?
-restore=true
-
-# Restore even if file names specified on command line?
-restore.cli=true
-
-# Persistent markers
-persistentMarkers=true
-
-# Two-stage save (save to #filename#save# first, then filename)
-twoStageSave=true
-
-# Strip trailing EOL
-stripTrailingEOL=true
-
-# Complete words from all open buffers
-completeFromAllBuffers=false
-
-# Need this so that new files have a trailing EOL
-buffer.trailingEOL=true
-
-# Caret saving toggle
-saveCaret=true
-
-# Backup on every save
-backupEverySave=false
-
-# Number of backups to make, 0=no backups
-backups=1
-
-# Backup directory
-backup.directory=
-
-# Backup filename prefix and suffix
-backup.prefix=
-backup.suffix=~
-
-# Min time between backups (0 = always backup)
-backup.minTime=0
-
-# Sort buffer list
-sortBuffers=true
-sortByName=true
-
-# Sort recent file list
-sortRecent=false
-
-# Default firewall properties
-firewall.enabled=false
-
-# Keep dialog on by default
-search.keepDialog.toggle=true
-
-# When this limit is reached a dialog appears to cancel the search
-hypersearch.maxWarningResults=1000
-
-# Style for highlighting matches in hypersearch results
-hypersearch.results.highlight=bgColor:#ccccff
-
-# Confirm dialogs
-confirmSaveAll=true
-
-# Check modification status on focus?
-
-# if false and autoReload == false, do nothing
-# if false and autoReload == true, autoreload silently
-# If true and autoReload == false, prompt for reloading
-# if true and autoReload == true, reload and notify user (message box)
-autoReloadDialog=true
-
-# If this is true, auto reload; if false, use 'reload' button in dialog
-autoReload=true
-
-# When to check file status on disk (0 = upon app focus; 1 = upon app focus, visiting the buffer or saving any buffer; 2 = upon visiting the buffer or saving any buffer; 3 = visiting the buffer; 4 = upon saving the buffer)
-checkFileStatus=0
-
-#}}}
-
-#{{{ Buffer settings
-# These can also be specified as buffer-local properties
-
-# Line separator
-# The OS default will be used if this is not specified
-# Unix=\n
-# Windows=\r\n
-# MacOS=\r
-#buffer.lineSeparator=\n
-
-# Encoding
-# The OS default will be used if this is not specified
-#buffer.encoding=ISO8859_1
-
-# Auto-detect GZIP, UTF16, UTF8 and XML encodings?
-buffer.encodingAutodetect=true
-
-# Tab width
-buffer.tabSize=8
-
-# Indent width
-buffer.indentSize=8
-
-# Soft tabs
-buffer.noTabs=false
-
-# Default edit mode
-buffer.defaultMode=text
-
-# Undo queue size
-buffer.undoCount=100
-
-# Wrap mode (none, soft, hard)
-buffer.wrap=none
-
-# Wrap column
-buffer.maxLineLen=80
-
-# Word break characters
-buffer.wordBreakChars=
-
-# Non-alphanumeric word characters
-buffer.noWordSep=_
-
-# Whether to separate "CamelCased" words
-buffer.camelCasedWords=false
-
-# Fold mode (explicit, indent, or none)
-buffer.folding=none
-
-# Folds with a level equal to or higher than this will be collapsed
-buffer.collapseFolds=0
-#}}}
-
-#{{{ View settings
-
-# Apply jEdit colors to Swing text fields, text areas, lists, tables and trees?
-textColors=false
-
-# Show toolbar?
-view.showToolbar=true
-
-# Show searchbar?
-view.showSearchbar=false
-
-# Show buffer switcher?
-view.showBufferSwitcher=true
-
-# Show full path in title bar?
-view.showFullPath=false
-
-# Font
-view.font=Monospaced
-view.fontsize=12
-# 0=plain, 1=bold, 2=italic, 3=boldItalic
-view.fontstyle=0
-
-# Background and foreground colors (for the text area)
-view.bgColor=#ffffff
-view.fgColor=#000000
-
-# Line highlighting
-view.lineHighlight=true
-view.lineHighlightColor=#ffffe0
-
-# Bracket highlighting
-view.structureHighlight=true
-view.structureHighlightColor=#000000
-
-# EOL markers
-view.eolMarkers=false
-view.eolMarkerColor=#ff6633
-
-# Wrap guide
-view.wrapGuide=true
-view.wrapGuideColor=#8080ff
-
-# Caret color
-view.caretColor=#ff0000
-
-# Selection color
-view.selectionColor=#ccccff
-view.multipleSelectionColor=#ccffcc
-
-# Caret blinking
-view.caretBlink=true
-
-# Block caret
-view.blockCaret=false
-
-# Electric borders
-view.electricBorders=3
-
-# Drag and drop of text
-view.dragAndDrop=true
-
-# Treat consecutive non-alphanumeric characters as one word
-view.joinNonWordChars=true
-
-# Middle mouse button pastes % register
-view.middleMousePaste=false
-
-# Pressing Ctrl while mouse actions makes them
-# as if selection mode were rectangular mode
-view.ctrlForRectangularSelection=true
-
-# Minimal view size that is considered "valid" when loading perspective
-view.minStartupWidth=200
-view.minStartupHeight=200
-
-# The default bufferSet scope
-editpane.bufferset.default=global
-
-# Copy the current bufferSet content when creating a new bufferSet for an
-# EditPane
-editpane.bufferset.new=copy
-
-#{{{ Gutter
-
-# Gutter background color
-view.gutter.bgColor=#dbdbdb
-
-# Gutter foreground color
-view.gutter.fgColor=#000000
-
-# Gutter highlight color
-view.gutter.highlightColor=#990066
-
-# Gutter current line highlight color
-view.gutter.currentLineColor=#ff0033
-
-# Gutter bracket highlighting
-view.gutter.structureHighlight=true
-view.gutter.structureHighlightColor=#666699
-
-# Gutter marker highlight color
-view.gutter.markerColor=#ccffcc
-
-# Gutter border colors
-view.gutter.focusBorderColor=#990099
-view.gutter.noFocusBorderColor=#ffffff
-
-# Fold triangle color
-view.gutter.foldColor=#838383
-
-# Gutter font name
-view.gutter.font=Monospaced
-
-# Gutter font style
-# 0=plain, 1=bold, 2=italic, 3=boldItalic
-view.gutter.fontstyle=0
-
-# Gutter font size
-view.gutter.fontsize=10
-
-# Gutter border width
-view.gutter.borderWidth=2
-
-# Gutter displays line numbers
-view.gutter.lineNumbers=false
-
-# Line numbers are drawn with this alignment (left, center, right)
-view.gutter.numberAlignment=right
-
-# Gutter line numbers are highlighted at this interval
-view.gutter.highlightInterval=5
-
-# Gutter current line highlighting
-view.gutter.highlightCurrentLine=true
-
-# Marker highlight
-view.gutter.markerHighlight=true
-
-# Click behavior
-view.gutter.foldClick=toggle-fold
-view.gutter.SfoldClick=toggle-fold-fully
-view.gutter.CfoldClick=select-fold
-view.gutter.AfoldClick=narrow-fold
-view.gutter.structClick=match-struct
-view.gutter.CstructClick=select-struct
-view.gutter.AstructClick=narrow-struct
-
-# Show gutter?
-view.gutter.enabled=true
-
-# Gutter minimal number of digits to reserve for line numbers
-view.gutter.minDigitCount=2
-
-# Show selection area in gutter?
-view.gutter.selectionAreaEnabled=true
-# Gutter selection area background color
-# - leave out so by default it is the same as the gutter's
-#view.gutter.selectionAreaBgColor=#dbdbdb
-#}}}
-
-# Expand abbrevs when space bar pressed
-view.expandOnInput=false
-
-#{{{ Syntax styles
-view.style.comment1=color:#cc0000
-view.style.comment2=color:#ff8400
-view.style.comment3=color:#6600cc
-view.style.comment4=color:#cc6600
-view.style.digit=color:#ff0000
-view.style.foldLine.0=color:#000000 bgColor:#dafeda style:b
-view.style.foldLine.1=color:#000000 bgColor:#fff0cc style:b
-view.style.foldLine.2=color:#000000 bgColor:#e7e7ff style:b
-view.style.foldLine.3=color:#000000 bgColor:#ffe0f0 style:b
-view.style.function=color:#9966ff
-view.style.invalid=color:#ff0066 bgColor:#ffffcc
-view.style.keyword1=color:#006699 style:b
-view.style.keyword2=color:#009966 style:b
-view.style.keyword3=color:#0099ff style:b
-view.style.keyword4=color:#66ccff style:b
-view.style.label=color:#02b902
-view.style.literal1=color:#ff00cc
-view.style.literal2=color:#cc00cc
-view.style.literal3=color:#9900cc
-view.style.literal4=color:#6600cc
-view.style.markup=color:#0000ff
-view.style.operator=color:#000000 style:b
-#}}}
-
-# Fancy Java2D stuff
-view.antiAlias=false
-view.fracFontMetrics=false
-
-# Docking and tool bar positioning
-view.docking.alternateLayout=false
-view.toolbar.alternateLayout=false
-
-#{{{ Status bar
-view.status.foreground=black
-view.status.background=white
-view.status.visible=true
-view.status.plainview.visible=false
-view.status.show-caret-status=true
-view.status.memory.foreground=#cccccc
-view.status.memory.background=#666699a
-#}}}
-
-#}}}
-
-#{{{ Printing settings
-
-# Font
-print.font=Monospaced
-print.fontsize=9
-print.fontstyle=0
-
-# Print header?
-print.header=true
-
-# Print footer?
-print.footer=true
-
-# Print line numbers?
-print.lineNumbers=true
-
-# Print in color, or black and white?
-print.color=false
-
-# Print tab size
-print.tabSize=2
-
-# Force JDK 1.3 API even on 1.4
-print.force13=false
-
-# Force use of glyph vectors to work around spacing problems
-print.glyphVector=false
-#}}}
-
-#{{{ File system browser settings
-vfs.browser.showMenubar=true
-vfs.browser.showToolbar=true
-vfs.browser.showIcons=true
-vfs.browser.showHiddenFiles=false
-vfs.browser.sortMixFilesAndDirs=false
-vfs.browser.sortIgnoreCase=true
-vfs.browser.doubleClickClose=false
-vfs.browser.currentBufferFilter=false
-vfs.browser.useDefaultIcons=true
-
-# Can be one of: buffer, home, favorites, last
-vfs.browser.defaultPath=buffer
-
-# File list coloring
-vfs.browser.colorize=true
-
-vfs.browser.colors.0.glob={CVS,#*,*~,\\.*}
-vfs.browser.colors.0.color=#a0a0a0
-vfs.browser.colors.1.glob=*.class
-vfs.browser.colors.1.color=#660066
-vfs.browser.colors.2.glob={build.xml,makefile*}
-vfs.browser.colors.2.color=#666600
-vfs.browser.colors.3.glob=*.{gif,jpg,jpeg,png,bmp,xpm,svg}
-vfs.browser.colors.3.color=#009933
-vfs.browser.colors.4.glob=*.{gz,jar,zip,tgz,z,war,ear}
-vfs.browser.colors.4.color=#990000
-vfs.browser.colors.5.glob=tags
-vfs.browser.colors.5.color=#003366
-vfs.browser.colors.6.glob=*.{sh,bat,cmd}
-vfs.browser.colors.6.color=#006666
-vfs.browser.colors.7.glob={CHANGELOG,CHANGES,INSTALL,LICENSE,NEWS,README,TODO}{,.txt}
-vfs.browser.colors.7.color=#330066
-vfs.browser.colors.8.glob=*.{props,properties}
-vfs.browser.colors.8.color=#666666
-
-#}}}
-
-#{{{ Plugin manager settings
-plugin-manager.downloadSource=false
-plugin-manager.installUser=true
-plugin-manager.showAll=true
-plugin-manager.mirror.id=switch
-plugin-manager.deleteDownloads=true
-plugin-manager.hide-libraries.toggle=true
-plugin-blacklist.MacOS.jar=true
-#}}}
-
-#{{{ Hidden settings
-menu.spillover=20
-bufferSwitcher.maxRowCount=10
-showTooltips=true
-ioThreadCount=4
-server.brokenToFront=false
-#}}}
-
-# restore remote VFS files by default (new option)
-options.general.restore.remote=true
+###
+### jEdit global properties
+### :tabSize=8:indentSize=8:noTabs=false:
+### :folding=explicit:collapseFolds=1:
+### :encoding=ISO-8859-1:
+###
+### Copyright (C) 1998, 2003 Slava Pestov
+###
+
+#{{{ Global settings
+
+# Swing look and feel
+#lookAndFeel=javax.swing.plaf.metal.MetalLookAndFeel
+
+#{{{ Metal control and menu font
+metal.primary.font=Dialog
+metal.primary.fontsize=12
+metal.primary.fontstyle=0
+#}}}
+
+#{{{ Metal system and user text font
+metal.secondary.font=Dialog
+metal.secondary.fontsize=12
+metal.secondary.fontstyle=0
+#}}}
+
+# Decorate frames and dialogs using Swing L&F? (JDK 1.4 only)
+decorate.frames=false
+decorate.dialogs=false
+
+# If true, welcome screen will be displayed.
+# Set to false after initial startup.
+firstTime=true
+
+# Autosave interval in seconds, 0=off
+autosave=30
+
+# Autosave untitled buffers
+autosaveUntitled=true
+
+
+# Maximum number of elements in a history list
+history=20
+
+# Number of recent files
+recentFiles=40
+
+# Restore open files on startup?
+restore=true
+
+# Restore even if file names specified on command line?
+restore.cli=true
+
+# Persistent markers
+persistentMarkers=true
+
+# Two-stage save (save to #filename#save# first, then filename)
+twoStageSave=true
+
+# Strip trailing EOL
+stripTrailingEOL=true
+
+# Complete words from all open buffers
+completeFromAllBuffers=false
+
+# Need this so that new files have a trailing EOL
+buffer.trailingEOL=true
+
+# Caret saving toggle
+saveCaret=true
+
+# Backup on every save
+backupEverySave=false
+
+# Number of backups to make, 0=no backups
+backups=1
+
+# Backup directory
+backup.directory=
+
+# Backup filename prefix and suffix
+backup.prefix=
+backup.suffix=~
+
+# Min time between backups (0 = always backup)
+backup.minTime=0
+
+# Sort buffer list
+sortBuffers=true
+sortByName=true
+
+# Sort recent file list
+sortRecent=false
+
+# Default firewall properties
+firewall.enabled=false
+
+# Keep dialog on by default
+search.keepDialog.toggle=true
+
+# When this limit is reached a dialog appears to cancel the search
+hypersearch.maxWarningResults=1000
+
+# If the hypersearch query is longer than this value it will be truncated
+# on display in the results
+hypersearch.displayQueryLength=100
+
+# Style for highlighting matches in hypersearch results
+hypersearch.results.highlight=bgColor:#ccccff
+
+# Confirm dialogs
+confirmSaveAll=true
+
+# Check modification status on focus?
+
+# if false and autoReload == false, do nothing
+# if false and autoReload == true, autoreload silently
+# If true and autoReload == false, prompt for reloading
+# if true and autoReload == true, reload and notify user (message box)
+autoReloadDialog=true
+
+# If this is true, auto reload; if false, use 'reload' button in dialog
+autoReload=true
+
+# When to check file status on disk (0 = upon app focus; 1 = upon app focus, visiting the buffer or saving any buffer; 2 = upon visiting the buffer or saving any buffer; 3 = visiting the buffer; 4 = upon saving the buffer)
+checkFileStatus=0
+
+# Encoding detectors
+encodingDetectors=BOM XML-PI html python
+
+#}}}
+
+#{{{ Buffer settings
+# These can also be specified as buffer-local properties
+
+# Line separator
+# The OS default will be used if this is not specified
+# Unix=\n
+# Windows=\r\n
+# MacOS=\r
+#buffer.lineSeparator=\n
+
+# Encoding
+# The OS default will be used if this is not specified
+#buffer.encoding=ISO8859_1
+
+# Auto-detect GZIP, UTF16, UTF8 and XML encodings?
+buffer.encodingAutodetect=true
+
+# Tab width
+buffer.tabSize=8
+
+# Indent width
+buffer.indentSize=8
+
+# Soft tabs
+buffer.noTabs=false
+
+# Default edit mode
+buffer.defaultMode=text
+
+# Undo queue size
+buffer.undoCount=100
+
+# Wrap mode (none, soft, hard)
+buffer.wrap=none
+
+# Wrap column
+buffer.maxLineLen=80
+
+# Word break characters
+buffer.wordBreakChars=
+
+# Non-alphanumeric word characters
+buffer.noWordSep=_
+
+# Whether to separate "CamelCased" words
+buffer.camelCasedWords=false
+
+# Fold mode (explicit, indent, or none)
+buffer.folding=none
+
+# Folds with a level equal to or higher than this will be collapsed
+buffer.collapseFolds=0
+#}}}
+
+#{{{ View settings
+
+# Apply jEdit colors to Swing text fields, text areas, lists, tables and trees?
+textColors=false
+
+# Show toolbar?
+view.showToolbar=true
+
+# Show searchbar?
+view.showSearchbar=false
+
+# Show buffer switcher?
+view.showBufferSwitcher=true
+
+# Show full path in title bar?
+view.showFullPath=false
+
+# Font
+view.font=Monospaced
+view.fontsize=12
+# 0=plain, 1=bold, 2=italic, 3=boldItalic
+view.fontstyle=0
+
+# Background and foreground colors (for the text area)
+view.bgColor=#ffffff
+view.fgColor=#000000
+
+# Line highlighting
+view.lineHighlight=true
+view.lineHighlightColor=#ffffe0
+
+# Bracket highlighting
+view.structureHighlight=true
+view.structureHighlightColor=#000000
+
+# EOL markers
+view.eolMarkers=false
+view.eolMarkerColor=#ff6633
+
+# Wrap guide
+view.wrapGuide=true
+view.wrapGuideColor=#8080ff
+
+# Caret color
+view.caretColor=#ff0000
+
+# Selection color
+view.selectionColor=#ccccff
+view.multipleSelectionColor=#ccffcc
+
+# Caret blinking
+view.caretBlink=true
+
+# Block caret
+view.blockCaret=false
+
+# Electric borders
+view.electricBorders=3
+
+# Drag and drop of text
+view.dragAndDrop=true
+
+# Treat consecutive non-alphanumeric characters as one word
+view.joinNonWordChars=true
+
+# Middle mouse button pastes % register
+view.middleMousePaste=false
+
+# Pressing Ctrl while mouse actions makes them
+# as if selection mode were rectangular mode
+view.ctrlForRectangularSelection=true
+
+# Minimal view size that is considered "valid" when loading perspective
+view.minStartupWidth=200
+view.minStartupHeight=200
+
+# The default bufferSet scope
+editpane.bufferset.default=global
+
+#{{{ Gutter
+
+# Gutter background color
+view.gutter.bgColor=#dbdbdb
+
+# Gutter foreground color
+view.gutter.fgColor=#000000
+
+# Gutter highlight color
+view.gutter.highlightColor=#990066
+
+# Gutter current line highlight color
+view.gutter.currentLineColor=#ff0033
+
+# Gutter bracket highlighting
+view.gutter.structureHighlight=true
+view.gutter.structureHighlightColor=#666699
+
+# Gutter marker highlight color
+view.gutter.markerColor=#ccffcc
+
+# Gutter border colors
+view.gutter.focusBorderColor=#990099
+view.gutter.noFocusBorderColor=#ffffff
+
+# Fold triangle color
+view.gutter.foldColor=#838383
+
+# Gutter font name
+view.gutter.font=Monospaced
+
+# Gutter font style
+# 0=plain, 1=bold, 2=italic, 3=boldItalic
+view.gutter.fontstyle=0
+
+# Gutter font size
+view.gutter.fontsize=10
+
+# Gutter border width
+view.gutter.borderWidth=2
+
+# Gutter displays line numbers
+view.gutter.lineNumbers=false
+
+# Line numbers are drawn with this alignment (left, center, right)
+view.gutter.numberAlignment=right
+
+# Gutter line numbers are highlighted at this interval
+view.gutter.highlightInterval=5
+
+# Gutter current line highlighting
+view.gutter.highlightCurrentLine=true
+
+# Marker highlight
+view.gutter.markerHighlight=true
+
+# Click behavior
+view.gutter.foldClick=toggle-fold
+view.gutter.SfoldClick=toggle-fold-fully
+view.gutter.CfoldClick=select-fold
+view.gutter.AfoldClick=narrow-fold
+view.gutter.structClick=match-struct
+view.gutter.CstructClick=select-struct
+view.gutter.AstructClick=narrow-struct
+
+# Show gutter?
+view.gutter.enabled=true
+
+# Gutter minimal number of digits to reserve for line numbers
+view.gutter.minDigitCount=2
+
+# Show selection area in gutter?
+view.gutter.selectionAreaEnabled=true
+# Gutter selection area background color
+# - leave out so by default it is the same as the gutter's
+#view.gutter.selectionAreaBgColor=#dbdbdb
+#}}}
+
+# Expand abbrevs when space bar pressed
+view.expandOnInput=false
+
+#{{{ Syntax styles
+view.style.comment1=color:#cc0000
+view.style.comment2=color:#ff8400
+view.style.comment3=color:#6600cc
+view.style.comment4=color:#cc6600
+view.style.digit=color:#ff0000
+view.style.foldLine.0=color:#000000 bgColor:#dafeda style:b
+view.style.foldLine.1=color:#000000 bgColor:#fff0cc style:b
+view.style.foldLine.2=color:#000000 bgColor:#e7e7ff style:b
+view.style.foldLine.3=color:#000000 bgColor:#ffe0f0 style:b
+view.style.function=color:#9966ff
+view.style.invalid=color:#ff0066 bgColor:#ffffcc
+view.style.keyword1=color:#006699 style:b
+view.style.keyword2=color:#009966 style:b
+view.style.keyword3=color:#0099ff style:b
+view.style.keyword4=color:#66ccff style:b
+view.style.label=color:#02b902
+view.style.literal1=color:#ff00cc
+view.style.literal2=color:#cc00cc
+view.style.literal3=color:#9900cc
+view.style.literal4=color:#6600cc
+view.style.markup=color:#0000ff
+view.style.operator=color:#000000 style:b
+#}}}
+
+# Fancy Java2D stuff
+view.antiAlias=false
+view.fracFontMetrics=false
+
+# Docking and tool bar positioning
+view.docking.alternateLayout=false
+view.toolbar.alternateLayout=false
+
+#{{{ Status bar
+view.status.foreground=black
+view.status.background=white
+view.status.visible=true
+view.status.plainview.visible=false
+view.status.show-caret-status=true
+view.status.memory.foreground=#cccccc
+view.status.memory.background=#666699a
+#}}}
+
+#}}}
+
+#{{{ Printing settings
+
+# Font
+print.font=Monospaced
+print.fontsize=9
+print.fontstyle=0
+
+# Print header?
+print.header=true
+
+# Print footer?
+print.footer=true
+
+# Print line numbers?
+print.lineNumbers=true
+
+# Print in color, or black and white?
+print.color=false
+
+# Print tab size
+print.tabSize=2
+
+# Force JDK 1.3 API even on 1.4
+print.force13=false
+
+# Force use of glyph vectors to work around spacing problems
+print.glyphVector=false
+#}}}
+
+#{{{ File system browser settings
+vfs.browser.showMenubar=true
+vfs.browser.showToolbar=true
+vfs.browser.showIcons=true
+vfs.browser.showHiddenFiles=false
+vfs.browser.sortMixFilesAndDirs=false
+vfs.browser.sortIgnoreCase=true
+vfs.browser.doubleClickClose=false
+vfs.browser.currentBufferFilter=false
+vfs.browser.useDefaultIcons=true
+
+# Can be one of: buffer, home, favorites, last
+vfs.browser.defaultPath=buffer
+
+# File list coloring
+vfs.browser.colorize=true
+
+vfs.browser.colors.0.glob={CVS,#*,*~,\\.*}
+vfs.browser.colors.0.color=#a0a0a0
+vfs.browser.colors.1.glob=*.class
+vfs.browser.colors.1.color=#660066
+vfs.browser.colors.2.glob={build.xml,makefile*,*.hxml}
+vfs.browser.colors.2.color=#666600
+vfs.browser.colors.3.glob=*.{gif,jpg,jpeg,png,bmp,xpm,svg}
+vfs.browser.colors.3.color=#009933
+vfs.browser.colors.4.glob=*.{gz,jar,zip,tgz,z,war,ear}
+vfs.browser.colors.4.color=#990000
+vfs.browser.colors.5.glob=tags
+vfs.browser.colors.5.color=#003366
+vfs.browser.colors.6.glob=*.{sh,bat,cmd}
+vfs.browser.colors.6.color=#006666
+vfs.browser.colors.7.glob={CHANGELOG,CHANGES,INSTALL,LICENSE,NEWS,README,TODO}{,.txt}
+vfs.browser.colors.7.color=#330066
+vfs.browser.colors.8.glob=*.{props,properties}
+vfs.browser.colors.8.color=#666666
+
+#}}}
+
+#{{{ Plugin manager settings
+plugin-manager.downloadSource=false
+plugin-manager.installUser=true
+plugin-manager.showAll=true
+plugin-manager.mirror.id=switch
+plugin-manager.deleteDownloads=true
+plugin-manager.hide-libraries.toggle=true
+plugin-blacklist.MacOS.jar=true
+#}}}
+
+#{{{ Hidden settings
+menu.spillover=20
+bufferSwitcher.maxRowCount=10
+showTooltips=true
+ioThreadCount=4
+server.brokenToFront=false
+#}}}
+
+# restore remote VFS files by default (new option)
+options.general.restore.remote=true
+
+mime2mode.text/html=html
\ No newline at end of file
diff --git a/jEdit/org/gjt/sp/jedit/jedit_gui.props b/jEdit/org/gjt/sp/jedit/jedit_gui.props
index 10f9e67..2ff69d6 100644
--- a/jEdit/org/gjt/sp/jedit/jedit_gui.props
+++ b/jEdit/org/gjt/sp/jedit/jedit_gui.props
@@ -1,2605 +1,2643 @@
-###
-### jEdit user interface definitions,
-### :tabSize=8:indentSize=8:noTabs=false:
-### :folding=explicit:collapseFolds=1:
-### :encoding=ISO-8859-1:
-###
-### Copyright (C) 1998, 2005 Slava Pestov
-###
-
-#{{{ Default user catalog file
-defaultCatalog=<?xml version="1.0"?>\n\
- <!DOCTYPE MODES SYSTEM "catalog.dtd">\n\
- \n\
- <MODES>\n\
- \n\
- <!-- Add lines like the following, one for each edit mode you add: -->\n\
- <!-- <MODE NAME="foo" FILE="foo.xml" FILE_NAME_GLOB="*.foo" /> -->\n\
- \n\
- </MODES>
-#}}}
-
-#{{{ Common strings
-
-common.ok=OK
-common.cancel=Cancel
-common.close=Close
-common.error=Error
-common.apply=Apply
-common.more=More
-common.insert=Insert
-common.add=Add
-common.add.icon=22x22/actions/list-add.png
-common.remove=Remove
-common.remove.icon=22x22/actions/list-remove.png
-common.moveUp=Move Up
-common.moveUp.icon=22x22/actions/go-up.png
-common.moveDown=Move Down
-common.moveDown.icon=22x22/actions/go-down.png
-common.clearAll=Clear All
-common.clearAll.icon=22x22/actions/edit-clear.png
-
-lineSep.unix=Unix (\\n)
-lineSep.windows=DOS/Windows (\\r\\n)
-lineSep.mac=MacOS (\\r)
-
-logo.icon.small=16x16/apps/jedit.png
-logo.icon.medium=32x32/apps/jedit.png
-
-#}}}
-
-#{{{ Miscellaneous
-encodings=ASCII Cp850 Cp1251 Cp1252 ISO8859_1 ISO8859_2 ISO8859_15 \
- MacRoman Big5 GBK KOI8_R SJIS UTF-16 UTF-8 UTF-8Y
-
-history.caption=Previously entered strings:
-
-action-set.jEdit=Built-in Commands
-action-set.browser=File System Browser
-action-set.macros=Macros
-action-set.plugin=Plugin: {0}
-
-macro-handler.beanshell.label=BeanShell script
-macro-handler.beanshell.glob=*.bsh
-
-save-layout-failed.message=Failed to save the docking layout.
-load-layout.title=Load Docking Layout
-load-layout.message=Docking layout to load:
-save-layout.title=Save Docking Layout
-save-layout.message=Docking layout to save:
-
-# Plugin activation hooks
-defer=false
-startup=true
-
-broken-image.icon=22x22/status/image-missing.png
-dropdown-arrow.icon=ToolbarMenu.gif
-#}}}
-
-#{{{ Tool bar
-view.toolbar=new-file open-file save close-buffer - print - \
- undo redo - cut copy paste - find find-next - \
- new-view unsplit split-horizontal split-vertical - \
- buffer-options global-options - \
- plugin-manager - help
-
-new-file.icon=22x22/actions/document-new.png
-open-file.icon=22x22/actions/document-open.png
-save.icon=22x22/actions/document-save.png
-close-buffer.icon=22x22/actions/document-close.png
-global-close-buffer.icon=22x22/actions/document-close.png
-print.icon=22x22/actions/document-print.png
-page-setup.icon=22x22/actions/printer-setup.png
-undo.icon=22x22/actions/edit-undo.png
-redo.icon=22x22/actions/edit-redo.png
-cut.icon=22x22/actions/edit-cut.png
-copy.icon=22x22/actions/edit-copy.png
-paste.icon=22x22/actions/edit-paste.png
-find.icon=22x22/actions/edit-find.png
-find-next.icon=22x22/actions/edit-find-next.png
-new-view.icon=22x22/actions/window-new.png
-unsplit.icon=22x22/actions/window-unsplit.png
-split-horizontal.icon=22x22/actions/window-split-horizontal.png
-split-vertical.icon=22x22/actions/window-split-vertical.png
-buffer-options.icon=22x22/actions/document-properties.png
-global-options.icon=22x22/categories/preferences-system.png
-
-plugin-manager.icon=22x22/places/plugins.png
-help.icon=22x22/apps/help-browser.png
-
-#{{{ Icon list for tool bar editor
-icons=22x22/actions/resize-horisontal.png \
- 22x22/actions/go-down.png \
- 22x22/actions/go-previous.png \
- 22x22/actions/go-next.png \
- 22x22/actions/go-home.png \
- 22x22/actions/go-up.png \
- 22x22/actions/go-first.png \
- 22x22/actions/go-last.png \
- 22x22/actions/go-parent.png \
- 22x22/actions/document-close.png \
- 22x22/actions/edit-undo.png \
- 22x22/actions/edit-redo.png \
- 22x22/actions/edit-cut.png \
- 22x22/actions/edit-paste.png \
- 22x22/actions/edit-delete.png \
- 22x22/actions/edit-clear.png \
- 22x22/actions/edit-find-next.png \
- 22x22/actions/edit-find-in-folder.png \
- 22x22/actions/edit-find.png \
- 22x22/actions/edit-copy.png \
- 22x22/actions/copy-to-buffer.png \
- 22x22/actions/list-remove.png \
- 22x22/actions/list-add.png \
- 22x22/actions/folder-new.png \
- 22x22/actions/window-new.png \
- 22x22/actions/document-new.png \
- 22x22/actions/document-open.png \
- 22x22/actions/document-reload2.png \
- 22x22/actions/document-properties.png \
- 22x22/actions/document-save.png \
- 22x22/actions/document-save-all.png \
- 22x22/actions/document-save-as.png \
- 22x22/actions/printer-setup.png \
- 22x22/actions/process-stop.png \
- 22x22/actions/media-playback-pause.png \
- 22x22/actions/media-playback-start.png \
- 22x22/actions/view-refresh.png \
- 22x22/actions/application-run.png \
- 22x22/actions/edit-find-multiple.png \
- 22x22/actions/edit-find-single.png \
- 22x22/actions/window-split-horizontal.png \
- 22x22/actions/window-split-vertical.png \
- 22x22/actions/window-unsplit.png \
- 22x22/actions/zoom-in.png \
- 22x22/actions/zoom-out.png \
- 22x22/apps/utilities-terminal.png \
- 22x22/apps/system-file-manager.png \
- 22x22/apps/internet-web-browser.png \
- 22x22/apps/help-browser.png \
- 22x22/apps/system-installer.png \
- 22x22/status/image-missing.png \
- 22x22/status/folder-visiting.png \
- 22x22/devices/drive-harddisk.png \
- 22x22/devices/media-floppy.png \
- 22x22/devices/printer.png \
- 22x22/places/plugins.png \
- 22x22/categories/preferences-system.png \
- Blank24.gif
-#}}}
-
-view.search.find=Search for:
-view.search.close-tooltip=Hide search bar
-
-view.action.prompt=Action:
-view.action.no-completions=No matching actions found
-view.action.close-tooltip=Hide action bar
-#}}}
-
-#{{{ Context menu
-view.context=cut copy paste paste-previous paste-deleted - \
- select-block to-upper to-lower - hypersearch-word - \
- add-marker - collapse-fold expand-fold narrow-to-fold
-view.context.customize=Customize This Menu...
-#}}}
-
-#{{{ Menu bar
-view.mbar=file edit search markers folds view utils macros plugins help-menu
-
-#{{{ File menu
-file=new-file \
- new-file-in-mode \
- open-file \
- %recent-files \
- - \
- reload \
- reload-all \
- %reload-encoding \
- - \
- close-buffer \
- global-close-buffer \
- close-all \
- - \
- save \
- save-as \
- save-a-copy-as \
- save-all \
- - \
- print \
- page-setup \
- - \
- exit
-file.label=$File
-new-file.label=$New
-new-file.icon.small=16x16/actions/document-new.png
-new-file-in-mode.label=New in $Mode
-new-file-in-mode.icon.small=16x16/actions/document-new.png
-new-file-in-mode.dialog.title=New File
-new-file-in-mode.dialog.message=With Edit Mode:
-open-file.label=$Open...
-open-file.icon.small=16x16/actions/document-open.png
-reload.label=$Reload
-reload.icon.small=16x16/actions/view-refresh.png
-reload-all.label=Reloa$d All...
-close-buffer.label=$Close
-close-buffer.icon.small=16x16/actions/document-close.png
-global-close-buffer.label=Close (global)
-closeall-except-active.label=Clear BufferSet except active
-bufferset-toggle-exclusive.label=Toggle E$xclusive BufferSets
-closeall-except-active.icon.small=16x16/actions/document-close.png
-global-close-buffer.icon.small=16x16/actions/document-close.png
-close-all.label=Clos$e All
-close-all.icon.small=16x16/actions/document-close.png
-save.label=$Save
-save.icon.small=16x16/actions/document-save.png
-save-as.label=S$ave As...
-save-a-copy-as.label=Save a Cop$y As...
-save-all.label=Save A$ll...
-print.label=$Print...
-print.icon.small=16x16/actions/document-print.png
-page-setup.label=Pa$ge Setup...
-# Print selection not yet implemented
-#print-selection.label=Prin$t Selection...
-exit.label=E$xit
-
-#{{{ Recent Files menu
-recent-files.code=new RecentFilesProvider();
-recent-files.label=Recent $Files
-recent-files.textfield.tooltip=a filter prefix can be entered here
-no-recent-files.label=No Recent Files
-clear-recent-files.label=Clear Recent Files
-#}}}
-
-reload-encoding.code=new ReloadWithEncodingProvider();
-reload-encoding.label=Reload with $Encoding
-reload-encoding.error={0} is not a valid encoding
-#}}}
-
-#{{{ Edit menu
-edit=undo \
- redo \
- - \
- cut \
- copy \
- paste \
- %clipboard \
- - \
- select-all \
- %selection \
- - \
- word-count \
- complete-word \
- expand-abbrev \
- - \
- goto-line \
- - \
- %text \
- %indent \
- %source
-edit.label=$Edit
-undo.label=$Undo
-undo.icon.small=16x16/actions/edit-undo.png
-redo.label=$Redo
-redo.icon.small=16x16/actions/edit-redo.png
-cut.label=$Cut
-cut.icon.small=16x16/actions/edit-cut.png
-copy.label=C$opy
-copy.icon.small=16x16/actions/edit-copy.png
-paste.label=$Paste
-paste.icon.small=16x16/actions/edit-paste.png
-select-all.label=Select $All
-word-count.label=$Word Count...
-complete-word.label=Co$mplete Word
-expand-abbrev.label=E$xpand Abbreviation
-goto-line.label=$Go to Line...
-
-#{{{ More Clipboard menu
-clipboard=cut-append \
- copy-append \
- vertical-paste \
- - \
- paste-previous \
- paste-deleted \
- - \
- cut-string-register \
- copy-string-register \
- paste-string-register \
- - \
- cut-append-string-register \
- copy-append-string-register \
- vertical-paste-string-register \
- - \
- view-registers
-
-clipboard.label=More Clip$board
-cut-append.label=$Cut Append
-copy-append.label=C$opy Append
-vertical-paste.label=$Vertical Paste
-paste-previous.label=Paste Previo$us...
-paste-deleted.label=Paste $Deleted...
-cut-string-register.label=Cu$t to Register
-copy-string-register.label=Co$py to Register
-paste-string-register.label=Paste $Register
-clear-string-register.label=Clear Register
-cut-append-string-register.label=Cut Appe$nd to Register
-copy-append-string-register.label=Copy $Append to Register
-vertical-paste-string-register.label=V$ertical Paste Register
-view-registers.label=Vie$w Registers
-#}}}
-
-#{{{ More Selection menu
-selection=select-none \
- select-word \
- select-line \
- select-paragraph \
- - \
- invert-selection \
- toggle-multi-select \
- toggle-rect-select \
- - \
- select-line-range
-selection.label=More $Selection
-select-none.label=Select $None
-select-word.label=Select $Word
-select-line.label=Select $Line
-select-paragraph.label=Select $Paragraph
-invert-selection.label=$Invert Selection
-toggle-multi-select.label=$Multiple Selection
-toggle-rect-select.label=$Rectangular Selection
-select-line-range.label=Sele$ct Line Range...
-#}}}
-
-#{{{ Text menu
-text=delete-line \
- delete-start-line \
- delete-end-line \
- join-lines \
- - \
- format-paragraph \
- delete-paragraph \
- - \
- to-lower \
- to-upper
-text.label=$Text
-delete-line.label=$Delete Lines
-delete-start-line.label=Delete to $Start of Line
-delete-end-line.label=Delete to $End of Line
-join-lines.label=$Join Lines
-delete-paragraph.label=Delete $Paragraph
-format-paragraph.label=$Format Paragraph
-to-lower.label=To $Lower Case
-to-upper.label=To $Upper Case
-#}}}
-
-#{{{ Indent menu
-indent=indent-lines \
- shift-left \
- shift-right \
- - \
- remove-trailing-ws \
- spaces-to-tabs \
- tabs-to-spaces
-
-indent.label=$Indent
-indent-lines.label=$Indent Lines
-shift-left.label=Shift Indent $Left
-shift-right.label=Shift Indent $Right
-remove-trailing-ws.label=Remove Trailing $Whitespace
-spaces-to-tabs.label=$Spaces to Tabs
-tabs-to-spaces.label=$Tabs to Spaces
-#}}}
-
-#{{{ Source menu
-source=range-comment \
- line-comment \
- - \
- select-block \
- match-bracket \
- prev-bracket \
- next-bracket
-
-source.label=Sourc$e
-range-comment.label=$Range Comment
-line-comment.label=$Line Comment
-select-block.label=$Select Code Block
-match-bracket.label=Go to $Matching Bracket
-prev-bracket.label=Go to $Previous Bracket
-next-bracket.label=Go to $Next Bracket
-#}}}
-
-#}}}
-
-#{{{ Search menu
-search=find \
- find-next \
- find-prev \
- - \
- search-in-open-buffers \
- search-in-directory \
- - \
- replace-in-selection \
- replace-and-find-next \
- replace-all \
- - \
- quick-search \
- hypersearch \
- quick-search-word \
- hypersearch-word \
- - \
- ignore-case \
- regexp \
- - \
- hypersearch-results
-search.label=$Search
-find.label=$Find...
-find.icon.small=16x16/actions/edit-find.png
-find-next.label=Fi$nd Next
-find-prev.label=Find Pre$vious
-search-in-open-buffers.label=Search in Open $Buffers...
-search-in-directory.label=Search in $Directory...
-replace-in-selection.label=$Replace in Selection
-replace-and-find-next.label=Re$place and Find Next
-replace-all.label=Replace $All
-quick-search.label=$Incremental Search Bar
-hypersearch.label=$HyperSearch Bar
-quick-search-word.label=Incremental Search for $Word
-hypersearch-word.label=H$yperSearch for Word
-ignore-case.label=Ignore $Case
-regexp.label=Regular E$xpressions
-hypersearch-results.label=HyperSearch Results
-#}}}
-
-#{{{ Markers menu
-markers=add-marker \
- add-marker-shortcut \
- - \
- remove-all-markers \
- - \
- goto-marker \
- select-marker \
- swap-marker \
- - \
- prev-marker \
- next-marker \
- - \
- view-markers \
- -
-markers.code=new MarkersProvider();
-markers.label=$Markers
-add-marker.label=$Add/Remove Marker
-add-marker-shortcut.label=Add Marker $With Shortcut
-remove-all-markers.label=Re$move All Markers
-goto-marker.label=$Go to Marker
-select-marker.label=$Select to Marker
-swap-marker.label=Swa$p Caret and Marker
-prev-marker.label=Go to $Previous Marker
-next-marker.label=Go to $Next Marker
-no-markers.label=No Markers
-markers.blank-line=[Blank line]
-#}}}
-
-#{{{ Folding menu
-folds=collapse-fold \
- expand-one-level \
- expand-fold \
- - \
- collapse-all-folds \
- expand-folds \
- expand-all-folds \
- - \
- select-fold \
- - \
- add-explicit-fold \
- - \
- narrow-to-fold \
- narrow-to-selection \
- - \
- parent-fold \
- prev-fold \
- next-fold
-folds.label=F$olding
-collapse-fold.label=$Collapse Fold
-expand-one-level.label=$Expand Fold One Level
-expand-fold.label=Expand $Fold Fully
-collapse-all-folds.label=Collapse $All Folds
-expand-folds.label=Expand Fo$lds With Level
-expand-all-folds.label=E$xpand All Folds
-select-fold.label=$Select Fold
-add-explicit-fold.label=A$dd Explicit Fold
-narrow-to-fold.label=Na$rrow to Fold
-narrow-to-selection.label=Narro$w to Selection
-parent-fold.label=$Go to Parent Fold
-prev-fold.label=Go to $Previous Fold
-next-fold.label=Go to $Next Fold
-#}}}
-
-#{{{ View menu
-view=new-view \
- new-plain-view \
- close-view \
- - \
- prev-buffer \
- next-buffer \
- recent-buffer \
- focus-buffer-switcher \
- - \
- toggle-line-numbers \
- toggle-statusbar \
- toggle-gutter \
- toggle-buffer-switcher \
- - \
- %scrolling \
- %splitting \
- %docking \
- %buffersets \
- - \
- toggle-full-screen
-view.label=$View
-new-view.label=New $View
-new-view.icon.small=16x16/actions/window-new.png
-new-plain-view.label=Ne$w Plain View
-close-view.label=$Close View
-close-view.icon.small=16x16/actions/document-close.png
-prev-buffer.label=Go to $Previous Buffer
-next-buffer.label=Go to $Next Buffer
-recent-buffer.label=Go to $Recent Buffer
-toggle-buffer-switcher.label=Toggle $Buffer Switcher
-focus-buffer-switcher.label=Focus Buffer S$witcher
-toggle-line-numbers.label=$Line Numbers
-toggle-statusbar.label=Toggle S$tatus Bar
-toggle-gutter.label=Toggle $Gutter
-show-context-menu.label=Show Context Menu
-toggle-full-screen.label=Toggle $full-screen mode
-
-#{{{ Scrolling menu
-scrolling=scroll-to-current-line \
- center-caret \
- scroll-and-center \
- - \
- scroll-up-line \
- scroll-down-line \
- - \
- scroll-up-page \
- scroll-down-page
-scrolling.label=Scrollin$g
-scroll-to-current-line.label=Scroll $to Current Line
-scroll-and-center.label=$Scroll and Center Caret
-center-caret.label=$Center Caret on Screen
-scroll-up-line.label=Line Scroll $Up
-scroll-down-line.label=Line Scroll $Down
-scroll-up-page.label=Page Scroll U$p
-scroll-down-page.label=Page Scroll D$own
-#}}}
-
-#{{{ Splitting menu
-splitting=unsplit-current \
- unsplit \
- split-horizontal \
- split-vertical \
- resplit \
- - \
- prev-textarea \
- next-textarea
-splitting.label=$Splitting
-split-horizontal.label=Split $Horizontally
-split-vertical.label=Split $Vertically
-unsplit-current.label=$Unsplit Current
-unsplit.label=Unsplit $All
-resplit.label=$Restore Split
-prev-textarea.label=Go to $Previous Text Area
-next-textarea.label=Go to $Next Text Area
-buffersets.label=$Buffer Sets
-buffersets=global-bufferset view-bufferset editpane-bufferset bufferset-toggle-exclusive - closeall-except-active
-global-bufferset.label=$Global Scope
-view-bufferset.label=$View Scope
-editpane-bufferset.label=$EditPane Scope
-
-
-#}}}
-
-#{{{ Docking menu
-docking=left-docking-area \
- top-docking-area \
- right-docking-area \
- bottom-docking-area \
- - \
- toggle-dock-areas \
- close-docking-area \
- - \
- layout-load \
- layout-save \
- layout-load-current-mode \
- layout-save-current-mode
-docking.label=$Docking
-docking.menu.label=Dockable Menu
-toggle-dock-areas.label=Toggle Docked $Areas
-left-docking-area.label=Go to $Left Docking Area
-top-docking-area.label=Go to $Top Docking Area
-right-docking-area.label=Go to $Right Docking Area
-bottom-docking-area.label=Go to $Bottom Docking Area
-close-docking-area.label=$Close Current Docking Area
-layout-load.label=$Load docking layout ...
-layout-save.label=$Save docking layout ...
-layout-load-current-mode.label=Load docking layout of current mode
-layout-save-current-mode.label=Save docking layout of current mode
-
-#}}}
-
-#}}}
-
-#{{{ Utilities menu
-utils=vfs.browser \
- %recent-directories \
- - \
- %favorites \
- %current-directory \
- %jedit-directory \
- %settings-directory \
- - \
- %beanshell \
- %troubleshooting \
- - \
- action-bar \
- last-action \
- - \
- buffer-options \
- global-options \
- - \
- %quick-options
-utils.label=$Utilities
-vfs.browser.label=$File System Browser
-vfs.browser.icon.small=16x16/apps/system-file-manager.png
-action-bar.label=$Action Bar
-last-action.label=Re$peat Last Action
-buffer-options.label=$Buffer Options...
-buffer-options.icon.small=16x16/actions/document-properties.png
-global-options.label=$Global Options...
-global-options.icon.small=16x16/categories/preferences-system.png
-
-#{{{ Recent Directories menu
-recent-directories.label=$Recent Directories
-recent-directories.code=new RecentDirectoriesProvider();
-no-recent-dirs.label=No Recent Directories
-#}}}
-
-#{{{ Favorites menu
-favorites=add-buffer-to-favorites add-dir-to-favorites edit-favorites -
-favorites.label=Fa$vorites
-favorites.code=new FavoritesProvider();
-add-buffer-to-favorites.label=Add Buffer to Favorites
-add-dir-to-favorites.label=Add Directory to Favorites
-edit-favorites.label=Edit Favorites
-#}}}
-
-#{{{ Current Directory menu
-current-directory.label=$Current Directory
-current-directory.code=new DirectoryProvider(null)
-#}}}
-
-#{{{ jEdit Home Directory menu
-jedit-directory.label=$jEdit Home Directory
-jedit-directory.code=new DirectoryProvider(jEdit.getJEditHome())
-#}}}
-
-#{{{ Settings Directory menu
-settings-directory.label=$Settings Directory
-settings-directory.code=settings = jEdit.getSettingsDirectory(); \
- if(settings == null) settings = jEdit.getJEditHome(); \
- new DirectoryProvider(settings);
-#}}}
-
-#{{{ BeanShell menu
-beanshell=eval \
- eval-for-selected-lines \
- eval-selection
-beanshell.label=B$eanShell
-eval.label=$Evaluate BeanShell Expression...
-eval-for-selected-lines.label=Evaluate $For Selected Lines...
-eval-selection.label=Evaluate $Selection
-#}}}
-
-#{{{ Troubleshooting menu
-troubleshooting=log-viewer \
- update-log \
- - \
- io-progress-monitor \
- keyboard-tester \
- memory-status \
- reload-modes
-troubleshooting.label=$Troubleshooting
-log-viewer.label=$Activity Log
-update-log.label=$Update Activity Log on Disk
-io-progress-monitor.label=$I/O Progress
-keyboard-tester.label=$Keyboard Tester...
-memory-status.label=$Memory Status...
-reload-modes.label=$Reload Edit Modes
-#}}}
-
-#{{{ Quick options menu
-quick-options=edit-syntax-style
-quick-options.label=$Quick settings
-edit-syntax-style.label=Edit syntax style of token under caret
-
-#}}}
-
-#}}}
-
-#{{{ Macros menu
-macros=record-macro \
- stop-recording \
- - \
- last-macro \
- - \
- record-temp-macro \
- run-temp-macro \
- - \
- run-other-macro \
- rescan-macros \
- -
-macros.code=new MacrosProvider();
-macros.label=Ma$cros
-record-macro.label=$Record Macro...
-record-macro.icon.small=16x16/actions/media-record.png
-stop-recording.label=$Stop Recording
-stop-recording.icon.small=16x16/actions/media-playback-stop.png
-last-macro.label=Repeat Last Macro
-record-temp-macro.label=Record $Temporary Macro
-run-temp-macro.label=Run Tem$porary Macro
-run-other-macro.label=Run $Other Macro...
-rescan-macros.label=Resca$n Macros
-no-macros.label=No Macros
-#}}}
-
-#{{{ Plugins menu
-plugins=plugin-manager plugin-options -
-plugins.label=$Plugins
-plugins.code=new PluginsProvider();
-plugin-manager.label=Plugin $Manager...
-plugin-options.label=Plugin $Options...
-no-plugins.label=No Plugins Installed
-#}}}
-
-#{{{ Help menu
-help-menu=about \
- help \
- tip-of-the-day
-help-menu.label=$Help
-about.label=$About jEdit...
-help.label=jEdit $Help
-tip-of-the-day.label=$Tip of the Day
-#}}}
-
-#}}}
-
-#{{{ Macro strings
-
-macro.temp.header=// This is a temporary macro. First, check over the\n\
- // commands to make sure this is what you intended.\n\
- // Then, to run this macro, switch to the buffer\n\
- // where you would like to execute it and press C+m C+p.
-
-macro.header=// This is a recorded macro. First, check over the\n\
- // commands to make sure this is what you intended. Then,\n\
- // save this buffer, and the macro should appear in the\n\
- // Macros menu.
-
-#}}}
-
-#{{{ Commands that don't appear in menus
-backspace-word.label=Delete Previous Word
-backspace-word-std.label=Delete Previous Word (Eat Whitespace)
-backspace.label=Delete Previous Character
-delete-word.label=Delete Next Word
-delete-word-std.label=Delete Next Word (Eat Whitespace)
-delete.label=Delete Next Character
-document-end.label=Go to End of Buffer
-document-home.label=Go to Start of Buffer
-end.label=End
-home.label=Home
-smart-end.label=Smart End
-smart-home.label=Smart Home
-insert-literal.label=Insert Next Character Literally
-insert-newline.label=Insert Newline
-insert-newline-indent.label=Insert Newline and Indent
-insert-tab.label=Insert Tab
-insert-tab-indent.label=Insert Tab and Indent
-line-end.label=Go to End of Line
-line-home.label=Go to Start of Line
-next-char.label=Go to Next Character
-next-line.label=Go to Next Line
-next-page.label=Go to Next Page
-next-paragraph.label=Go to Next Paragraph
-next-word.label=Go to Next Word
-next-word-std.label=Go to Next Word (Eat Whitespace)
-overwrite.label=Overwrite Mode
-prev-char.label=Go to Previous Character
-prev-line.label=Go to Previous Line
-prev-page.label=Go to Previous Page
-prev-paragraph.label=Go to Previous Paragraph
-prev-word.label=Go to Previous Word
-prev-word-std.label=Go to Previous Word (Eat Whitespace)
-select-document-end.label=Select to End of Buffer
-select-document-home.label=Select to Start of Buffer
-select-end.label=Select to Smart End Position
-select-home.label=Select to Smart Home Position
-select-line-end.label=Select to End of Line
-select-line-home.label=Select to Start of Line
-select-next-char.label=Select Next Character
-select-next-line.label=Select Next Line
-select-next-page.label=Select Next Page
-select-next-paragraph.label=Select Next Paragraph
-select-next-word.label=Select Next Word
-select-next-word-std.label=Select Next Word (Eat Whitespace)
-select-prev-char.label=Select Previous Character
-select-prev-line.label=Select Previous Line
-select-prev-page.label=Select Previous Page
-select-prev-paragraph.label=Select Previous Paragraph
-select-prev-word.label=Select Previous Word
-select-prev-word-std.label=Select Previous Word (Eat Whitespace)
-select-visible-end.label=Select to Last Visible Line
-select-visible-home.label=Select to First Visible Line
-select-whitespace-end.label=Select to End of White Space
-select-whitespace-home.label=Select to Start of White Space
-toggle-line-separator.label=Toggle Line Separator
-toggle-word-wrap.label=Toggle Word Wrap
-visible-end.label=Go to Last Visible Line
-visible-home.label=Go to First Visible Line
-whitespace-end.label=Go to End of White Space
-whitespace-home.label=Go to Start of White Space
-#}}}
-
-#{{{ View stuff
-
-# Title
-view.title=jEdit -\
-view.title.dirty=\ (modified)
-
-view.docking.close-tooltip=Hides the current docked window
-view.docking.menu-tooltip=Docking options
-view.docking.menu-floating=Float
-view.docking.menu-top=Dock at Top
-view.docking.menu-left=Dock at Left
-view.docking.menu-bottom=Dock at Bottom
-view.docking.menu-right=Dock at Right
-view.docking.menu-clone=New Floating Instance
-view.docking.menu-close=Close
-view.docking.menu-undock=Undock
-
-view.docking.toggle.label={0} (Toggle)
-view.docking.float.label={0} (New Floating Instance)
-
-directory.not-local=Cannot list directories on remote filesystems
-directory.no-files=No Files
-
-#{{{ Gutter highlight
-view.gutter.marker.no-name=Marker
-view.gutter.marker=Marker: {0}
-#}}}
-
-#{{{ Status messages
-view.status.add-marker=Shortcut for new marker? [{0}]
-view.status.auto-wrap=Search string not found; wrapping around!
-view.status.bracket=Matches line {0}: {1}
-view.status.caret-tooltip=Offset, line and column number (offset,line,column[-virtual] relative%)
-view.status.copy-append-string-register=Register name to copy append to? [{0}]
-view.status.copy-string-register=Register to copy to? [{0}]
-view.status.cut-append-string-register=Register to cut append to? [{0}]
-view.status.cut-string-register=Register to cut to? [{0}]
-view.status.expand-folds=Fold level? [1-9]
-view.status.goto-marker=Shortcut of marker to go to? [{0}]
-view.status.incomplete-abbrev={0} parameter(s) specified, but {1} required!
-view.status.insert-literal=Key to insert literally?
-view.status.io-1=I/O: 1 operation in progress
-view.status.io.done=Input/output complete
-view.status.io=I/O: {0} operations in progress
-view.status.linesep-changed=Line separator set to {0}
-view.status.linesep-tooltip=Line separator (click to change)
-view.status.memory-tooltip=Java heap memory: {0}Kb/{1}Kb
-view.status.mode-tooltip=Current edit mode, fold mode, and encoding
-view.status.multi-changed=Multiple selection mode is {0,choice,0#off|1#on}
-view.status.multi-tooltip=Multiple selection mode (click to change)
-view.status.narrow=Invoke "Expand All Folds" to make all text visible again
-view.status.no-markers=no markers set
-view.status.no-registers=no registers defined
-view.status.overwrite-changed=Overwrite mode is {0,choice,0#off|1#on}
-view.status.overwrite-tooltip=Overwrite/insert mode indicator (click to change)
-view.status.paste-string-register=Register to paste from? [{0}]
-view.status.print=Printing page {0}
-view.status.quick-copy=Quick copy mode - marked text will replace selection
-view.status.recording=Macro recording
-view.status.rect-select-changed=Rectangular selection is {0,choice,0#off|1#on}
-view.status.rect-tooltip=Rectangular selection mode (click to change)
-view.status.replace-all=Replaced {0} occurrence(s) in {1} file(s)
-view.status.search-not-found=Search string not found!
-view.status.select-marker=Shortcut of marker to select to? [{0}]
-view.status.swap-marker=Shortcut of marker to swap caret position with? \
- [{0}]
-view.status.vertical-paste-string-register=Register to vertical paste \
- from? [{0}]
-view.status.wrap-changed=Word wrap mode is now "{0}"
-view.status.wrap-tooltip=Word wrap mode (click to change)
-view.status.bufferset-tooltip=BufferSet scope is {0}
-#}}}
-
-#{{{ Status bar component visibility
-view.status=( mode , fold , encoding ) wrap multiSelect rectSelect overwrite lineSep buffersets memory-status errors clock
-
-view.status.show-caret-status=true
-#}}}
-
-#}}}
-
-#{{{ Printing
-
-print.headerText=jEdit - {0}
-print.footerText={0} :: page {1}
-
-print-error.title=Print Error
-print-error.message=An error occurred while trying to print:\n\
- {0}
-#}}}
-
-#{{{ Various dialog boxes
-
-#{{{ About dialog
-about.title=About jEdit
-about.version=jEdit {0} {1} mode, using Java {2}
-about.mode.standalone=standalone
-about.mode.server=server
-about.mode.server-background=server-background
-about.navigate=Press arrow keys to navigate about text
-
-# This text scrolls by in the about dialog box.
-# Hack: Since StringTokenizer treats two consequent \n as one token, we
-# insert a space by itself in the text to create blank lines.
-about.text=jEdit is brought to you by\n\
- \n\
- Slava Pestov\n\
- Aaron Bell\n\
- Adam Sawicki\n\
- Adrian Baker\n\
- Alan Ezust\n\
- Alessandro Falappa\n\
- Alex Levin\n\
- Alexander Maryanovsky\n\
- Alfonso Garcia\n\
- Alwyn Barry\n\
- Amedeo Farello\n\
- Andre Kaplan\n\
- Andrey Khalyavin\n\
- Anthony Roy\n\
- Artur Biesiadowski\n\
- Aziz Sharif\n\
- Barry Carr\n\
- Beau Tateyama\n\
- Ben Glazer\n\
- Ben Sarsgard\n\
- Ben Williams\n\
- Bernhard Walle\n\
- Bertalan Fodor\n\
- Bill McMilleon\n\
- Bj\u00f6rn "Vampire" Kautler\n\
- Brad Mace\n\
- Brant Langer Gurganus\n\
- Brett Smith\n\
- Bruno Tatibouet\n\
- Calvin Yu\n\
- Carlos Quiroz\n\
- Carmine Lucarelli\n\
- Chris Grindstaff\n\
- Chris Kent\n\
- Chris Petersen\n\
- Chris Scott\n\
- Christoph Daniel Schulze\n\
- Claude Eisenhut\n\
- Cullen Linn\n\
- Dakshinamurthy Karra\n\
- Dale Anson\n\
- Daniel Hahler\n\
- Daniel Johnson\n\
- Danny Dig\n\
- Dante Fabrizio\n\
- David Askew\n\
- David Moss\n\
- David Taylor\n\
- Denis Lambot\n\
- Dirk Moebius\n\
- Dominic Stolerman\n\
- Dusty Phillips\n\
- Ed Stewart\n\
- Eric Benoit\n\
- Eric Berry\n\
- Eric Ladner\n\
- Fan Ho Yin\n\
- Francesc Roses\n\
- George Hovey\n\
- George Latkiewicz\n\
- Gerd Knops\n\
- Gili Tzabari\n\
- Giulio Piancastelli\n\
- Greg Cooper\n\
- Greg Merrill\n\
- Horst Eff\n\
- Ian Maclean\n\
- Igor Lesik\n\
- Israel Olalla\n\
- Jakub Rozto\u010dil\n\
- Jamie LaScolea\n\
- Jason Ginchereau\n\
- Jean-Francois Larvoire\n\
- Jeffrey Hoyt\n\
- Jeff Robertson\n\
- Jerry McBride\n\
- Jiger Patel\n\
- Jim Lawton\n\
- Jim Morris\n\
- Jim Wissner\n\
- J\u00f6rg Spieler\n\
- John Gellene\n\
- John Perry\n\
- Jonathan Revusky\n\
- Jorg Winter\n\
- Joseph Erickson\n\
- Joseph Schroer\n\
- Juha Lindfors\n\
- Justin Dieters\n\
- Justin Hagstrom\n\
- Kasper Graversen\n\
- Kazutoshi Satoda\n\
- Kenrick Drew\n\
- Kevin Burton\n\
- Kevin Hunter\n\
- Kevin McWhirter\n\
- Ken Gentry\n\
- Ken Turner\n\
- Klaus Hartlage\n\
- Konstantin Pribluda\n\
- Krassimir Berov\n\
- Kris Kopicki\n\
- Kristian Ovaska\n\
- Krzysztof Krzyzaniak\n\
- Lionel Fiol\n\
- Magnus Henriksson\n\
- Maik Schreiber\n\
- Marc Rummel\n\
- Marcelo Vanzin\n\
- Marcio Marchini\n\
- Marco Hunsicker\n\
- Marco Gotze\n\
- Marcus Jonason\n\
- Martin Raspe\n\
- Matija Kejzar\n\
- Matt Albrecht\n\
- Matt Price\n\
- Matthew Flower\n\
- Matthew Payne\n\
- Matthew Price\n\
- Matthias Schneider\n\
- Matthieu Casanova\n\
- Michael Jacobson\n\
- Michael Taft\n\
- Michael Schlotter\n\
- Mike Dillon\n\
- Mike Gorski\n\
- Mike Hansen\n\
- Mirco Bova\n\
- Nahuel Foronda\n\
- Neil Bertram\n\
- Nicholas O'Leary\n\
- Nils Krahnstoever\n\
- Nils Nordman\n\
- Nitsan Vardi\n\
- Ollie Rutherfurd\n\
- Orhan Alkan\n\
- Patrick Tingen\n\
- Paul Libbrecht\n\
- Peter Cox\n\
- Peter Graves\n\
- Philipp Janda\n\
- Phillip Mateescu\n\
- Ralf Engels\n\
- Randolf Mock\n\
- Randy Hudson\n\
- Rex Young\n\
- Richard Ashwell\n\
- Richard Beton\n\
- Rick Gibbs\n\
- Rick Owen\n\
- Rob Watson\n\
- Robert McKinnon\n\
- Robert Schwenn\n\
- Robert Swarr\n\
- Romain Guy\n\
- Rudolf Widmann\n\
- Ryan Fowler\n\
- Ryan Grove\n\
- Saimon Moore\n\
- Satguru Srivastava\n\
- Scott Allen\n\
- Scott Willy\n\
- Scott Wyatt\n\
- Sebastien Pierre\n\
- Seph Soliman\n\
- Sergey Udaltsov\n\
- Shlomy Reinstein\n\
- Silas Smith\n\
- Stefan Kost\n\
- Stefano Maestri\n\
- Stephen Bartlett\n\
- Steve Jakob\n\
- Stuart Barlow\n\
- Tal Davidson\n\
- Thomas Alspaugh\n\
- Thomas Bock\n\
- Thomas Dilts\n\
- Thomas Galvin\n\
- Todd Papaioannou\n\
- Tom Copeland\n\
- Tom Locke\n\
- Trevor Harmon\n\
- Vicente Salvador\n\
- Vinod Kiran\n\
- Will Sargent\n\
- Will Varfar\n\
- Wiktor Adamski\n\
- Wojciech Stryjewski\n\
- Wolfgang Chico-T\u00f6pfer\n\
- \n\
- I'd also like to thank the users for their\n\
- comments, feedback and bug reports.
-#}}}
-
-#{{{ Error list dialog, used to report I/O and plugin load errors
-error-list.plugin-manager=Plugin Manager
-#}}}
-
-#{{{ I/O error dialog box
-ioerror.title=I/O Error
-ioerror.caption=The following {0} I/O operations could not be completed:
-ioerror.caption-1=The following I/O operation could not be completed:
-
-ioerror={0}
-ioerror.directory-error=Cannot list directory: {0}
-ioerror.directory-error-nomsg=Cannot list directory.
-ioerror.encoding-error=The file could not be loaded correctly (some data might be lost) with\n\
- the encoding "{0}".\n\
- ({1})\n\
- Try selecting a different encoding.\n\
- It can be selected with the menu File->Reload with Encoding.\n\
- If you want it to be done automatically, add the candidates into\n\
- "List of fallback encodings" in Encodings pane of Global Options.
-ioerror.write-encoding-error=Failed to encode the character\n\
- {3} at column {2} in line {1} with the encoding "{0}".
-ioerror.read-error=Cannot load: {0}
-ioerror.write-error=Cannot save: {0}
-ioerror.unsupported-encoding-error={0} charset is not supported by your JVM
-ioerror.open-directory=Cannot open directory as a buffer.
-ioerror.save-directory=Cannot save buffer over a directory.
-ioerror.no-read=Insufficent permissions to load file.
-ioerror.no-write=Insufficent permissions to save file.
-ioerror.write-error-readonly=Unable to save, the file is readonly.
-ioerror.save-readonly-twostagefail=Unable to save, the file is readonly and it two stage save is impossible.
-ioerror.badurl=Malformed URL: {0}
-ioerror.delete-error=Cannot delete file.
-ioerror.rename-exists=Cannot overwrite existing file {0}.
-ioerror.rename-error=Cannot rename to {0}.
-ioerror.mkdir-error=Cannot create directory.
-
-vfs.not-supported.list=Directories on the "{0}" filesystem cannot be browsed.
-vfs.not-supported.load=Files on the "{0}" filesystem cannot be opened.
-vfs.not-supported.save=Files cannot be saved to the "{0}" filesystem.
-
-vfs.overwrite-readonly.title=File is readonly
-vfs.overwrite-readonly.message=The file {0} is readonly.\n\
- Would you like to save it anyway, resetting the readonly flag\n\
- it will use two stage save (resets file owner on Unix)
-
-vfs.twostageimpossible.title=Two stage save cannot be used
-vfs.twostageimpossible.message=Two stage save cannot be used, do you want to\n\
- save anyway ?
-
-out-of-memory-error=There was insufficent Java heap memory to complete\n\
- this request. Try increasing the maximum heap size.\n\
- \n\
- Documentation on changing the Java heap size can be found in\n\
- the "Buffers" section of the "jEdit Basics" chapter of the\n\
- user guide.
-#}}}
-
-#{{{ Old I/O error dialog boxes
-ioerror.message=An I/O error occurred ({0})
-
-read-error.title=Read Error
-# {0} - the path name {1} - the error message
-read-error.message=The file {0}\n\
- could not be loaded due to an I/O error.\n\
- ({1})
-
-write-error.title=Write Error
-# {0} - the path name {1} - the error message
-write-error.message=The file {0}\n\
- could not be saved due to an I/O error.\n\
- ({1})
-
-directory-error.title=Directory Error
-# {0} - the path name {1} - the error message
-directory-error.message=The directory {0}\n\
- could not be listed due to an I/O error.\n\
- ({1})
-
-directory-error-nomsg.title=Directory Error
-# {0} - the path name
-directory-error-nomsg.message=The directory {0}\n\
- could not be listed due to an I/O error.
-
-encoding-error.title=Incompatible Encoding
-encoding-error.message=The file {0}\n\
- could not be loaded with the "{1}" encoding.\n\
- ({2})\n\
- \n\
- To use a different encoding, try the commands in the\n\
- File->Open With Encoding menu.\n\
- \n\
- If you are really stuck and do not know which encoding\n\
- to use, try "ASCII" or "8859_1".
-
-open-directory.title=Cannot Open Directory
-open-directory.message={0} is a directory.\n\
- Directories cannot be opened for editing.
-
-save-directory.title=Cannot Save Directory
-save-directory.message={0} is a directory.\n\
- Buffers cannot be saved over directories.
-
-no-read.title=Cannot Open File
-no-read.message=Cannot read from {0}.\n\
- This probably means you have insufficent permissions.
-
-no-write.title=Cannot Save File
-no-write.message=Cannot save to {0}.\n\
- This probably means you have insufficent permissions.
-
-badurl.title=Invalid URL
-# {0} - the URL
-# {1} - the error
-badurl.message=The following URL is invalid: {0}\n\
- ({1})
-#}}}
-
-#{{{ Go to line dialog
-goto-line.title=Go To Line
-goto-line.message=Go to line:
-#}}}
-
-#{{{ Word count dialog
-wordcount.title=Word Count
-# {0} - characters
-# {1} - words
-# {2} - lines
-wordcount.message=Characters: {0}\nWords: {1}\nLines: {2}
-#}}}
-
-#{{{ Set marker dialog
-setmarker.title=Set Marker
-setmarker.message=Marker name:
-#}}}
-
-#{{{ File not saved dialog
-notsaved.title=File Not Saved
-# {0} - file name
-notsaved.message=Save changes to {0}?
-#}}}
-
-#{{{ File changed, still reload dialog
-changedreload.title=File Modified
-changedreload.message=The file {0}\n\
- has been modified since last save; if you reload,\n\
- the changes will be lost. Continue?
-#}}}
-
-#{{{ Autosave file exists dialog
-autosave-found.title=Autosave File Found
-# {0} - autosave file name
-autosave-found.message=An autosave file {0}\n\
- was found! This probably means that jEdit crashed before you could\n\
- save. Would you like to open the autosave file?
-
-autosave-loaded.title=Autosave File Loaded
-autosave-loaded.message=The autosave file {0}\n\
- has been loaded. You should now check if it contains your unsaved\n\
- data. If you would like to keep the autosaved changes, save the file.\n\
- If you would like to discard them, select File->Reload.
-#}}}
-
-#{{{ Save all confirm dialog
-saveall.title=Save All Buffers
-saveall.message=Are you sure you want to save all modified buffers?
-#}}}
-
-#{{{ Reload all confirm dialog
-reload-all.title=Reload All Buffers
-reload-all.message=Are you sure you want to reload all buffers from disk?\n\
- Unsaved changes in any open buffers WILL BE LOST!
-#}}}
-
-#{{{ Encoding prompt
-encoding-prompt.title=Open With Other Encoding
-encoding-prompt.message=Character encoding to use:
-#}}}
-
-#{{{ Macro recording already in progress dialog
-already-recording.title=Already Recording
-already-recording.message=A macro recording is already in progress.
-#}}}
-
-#{{{ No temporary macro dialog
-no-temp-macro.title=No Temporary Macro
-no-temp-macro.message=No temporary macro has been recorded.
-#}}}
-
-#{{{ Record macro dialog
-record.title=Record Macro
-record.message=Macro name:
-#}}}
-
-#{{{ Some features don't work with -nosettings dialog
-no-settings.title=Feature Disabled
-no-settings.message=jEdit was started with the -nosettings switch.\n\
- To use this feature, you must start jEdit without that switch.
-#}}}
-
-#{{{ Some features don't work with the web start version
-no-webstart.title=Feature Disabled
-no-webstart.message=This feature is not available in the WebStart version\n\
- of jEdit.
-#}}}
-
-#{{{ Search and replace dialog
-search.title=Search And Replace
-
-search.find=Search for:
-search.find.tooltip=PgUp/PgDown or right-click to recall previous
-search.find.mnemonic=s
-search.replace=Replace with:
-search.replace.mnemonic=w
-search.string-replace-btn=Text
-search.beanshell-replace-btn=Return value of a BeanShell snippet
-
-search.settings=Settings:
-search.keep=Keep dialog
-search.keep.mnemonic=k
-search.case=Ignore case
-search.case.mnemonic=i
-search.regexp=Regular expressions
-search.regexp.mnemonic=x
-search.hypersearch=HyperSearch
-search.hypersearch.mnemonic=h
-search.wrap=Auto wrap
-search.wrap.mnemonic=t
-
-search.direction=Direction:
-search.back=Backward
-search.back.mnemonic=b
-search.forward=Forward
-search.forward.mnemonic=o
-
-search.fileset=Search in:
-search.selection=Selection
-search.selection.mnemonic=n
-search.current=Current buffer
-search.current.mnemonic=c
-search.all=All buffers
-search.all.mnemonic=l
-search.directory=Directory:
-search.directory.mnemonic=d
-search.skipHidden=Skip hiddens/backups
-search.skipBinary=Skip binary files
-search.skipHidden.mnemonic=h
-search.skipBinary.mnemonic=b
-
-search.directoryField=Directory:
-search.directoryField.mnemonic=y
-search.filterField=Filter:
-search.filterField.mnemonic=f
-glob.tooltip={*.c,*.h} for multiple extensions
-search.subdirs=Search subdirectories
-search.subdirs.mnemonic=u
-search.choose=Choose...
-search.choose.mnemonic=e
-search.synchronize=Synchronize
-search.synchronize.mnemonic=z
-search.synchronize.tooltip=Sets filter and directory to current buffer's extension/location.
-search.findBtn=Find
-search.findBtn.mnemonic=f
-search.replaceAndFindBtn=Replace & Find
-search.replaceAndFindBtn.mnemonic=r
-search.replaceAllBtn=Replace All
-search.replaceAllBtn.mnemonic=a
-
-# Beep when searching automatically wraps?
-search.beepOnSearchAutoWrap=false
-#}}}
-
-#{{{ Keep searching dialog
-keepsearching.title=No More Matches Found
-keepsearching.message=No more matches were found. Continue search from\n\
- {0,choice,0#beginning|1#end}?
-#}}}
-
-#{{{ HyperSearch results dialog
-hypersearch-results.title=HyperSearch Results
-hypersearch-results.result-caption={0} ({1,choice,1#1 occurrence|1<{1,number,integer} occurrences in '{2,choice,1#1 file|1<{2,number,integer} files}'})
-hypersearch-results.open=Open
-hypersearch-results.open-view=Open in New View
-hypersearch-results.open-plain-view=Open in New Plain View
-hypersearch-results.open-split=Open in New Split
-hypersearch-results.remove-node=Remove Node
-hypersearch-results.new-search=New Search From Here
-hypersearch-results.expand-child-nodes=Expand Child Nodes
-hypersearch-results.collapse-child-nodes=Collapse Child Nodes
-hypersearch-results.copy-to-clipboard=Copy to clipboard
-hypersearch-results.redo=Redo HyperSearch
-hypersearch-results.tree-view=Toggle Tree View
-hypersearch-results.clear.label=Remove All Nodes
-hypersearch-results.clear.icon=22x22/actions/edit-clear.png
-hypersearch-results.stop.label=Stop HyperSearch and show current results
-hypersearch-results.stop.icon=22x22/actions/process-stop.png
-hypersearch-results.multi.label=Toggle Multiple Results
-hypersearch-results.multi.multiple.icon=22x22/actions/edit-find-multiple.png
-hypersearch-results.multi.single.icon=22x22/actions/edit-find-single.png
-hypersearch-results.highlight.label=Set Match Highlight Style
-hypersearch-results.match.highlight.icon=22x22/actions/edit-find-highlight-match.png
-hypersearch-results.match.normal.icon=22x22/actions/edit-find-normal-match.png
-hypersearch-results.file-caption={0} ({1,choice,1#1 occurrence|1<{1,number,integer} occurrences in '{2,choice,1#1 line|1<{2,number,integer} lines}'})
-hypersearch-results.searching=Searching for "{0}"...
-hypersearch-results.no-results=No results found for "{0}".
-hypersearch-results.done=Results for "{0}":
-
-hypersearch-status=Searching
-#}}}
-
-#{{{ HyperSearch too many results
-hypersearch.tooManyResults.label=Too many results
-hypersearch.tooManyResults.title=Too many results
-hypersearch.tooManyResults.message=The search you asked returned {0} \
- results and is not yet finished. Do you want to stop it ?
-#}}}
-
-
-#{{{ Search and replace error dialog
-searcherror.title=Search and Replace Error
-# {0} - error message
-searcherror.message=An error occurred while performing this operation.
-#}}}
-
-#{{{ Search and replace error dialog
-searcherror-bsh.title=Search and Replace Error
-# {0} - error message
-searcherror-bsh.message=An error occurred while performing this operation.\n\
- \n\
- Make sure the replace mode is set to "Text" if you did not intend\n\
- the replace string to be interpreted as a BeanShell expression.
-#}}}
-
-#{{{ Empty fileset error dialog
-empty-fileset.title=Empty File Set
-empty-fileset.message=The specified search file set contains no files.\n\
- Please ensure that the file name filter and directory to search\n\
- (if applicable) are set correctly.
-#}}}
-
-#{{{ Can only search local directories dialog
-remote-dir-search.title=Non-Local Directory Chosen
-remote-dir-search.message=You have elected to search a non-local directory.\n\
- This can be very slow due to network latency and so on.\n\
- Are you sure you want to continue?
-#}}}
-
-#{{{ "Search in selection" active but nothing selected in text area
-search-no-selection.title=Nothing Selected
-search-no-selection.message=Please select some text or deactivate the\n\
- "search in selection" option first.
-#}}}
-
-#{{{ Paste previous and paste deleted dialogs
-paste-from-list.whitespace=<whitespace>
-paste-previous.title=Paste Previous
-paste-previous.caption=Recently copied and pasted text:
-paste-deleted.title=Paste Deleted
-paste-deleted.caption=Recently deleted text:
-#}}}
-
-#{{{ File changed on disk dialog
-filechanged-save.title=File Changed on Disk
-filechanged-save.message=The file {0}\n\
- has been modified on disk by another program. Are you sure\n\
- you want to continue saving it?
-#}}}
-
-#{{{ File exists dialog
-fileexists.title=File Exists
-fileexists.message=The file {0} already exists. Are you sure you want\n\
- to overwrite it?
-#}}}
-
-#{{{ Select line range dialog
-selectlinerange.title=Select Line Range
-selectlinerange.caption=Select line range:
-selectlinerange.start=Start line:
-selectlinerange.end=End line:
-#}}}
-
-#{{{ View registers dialog
-view-registers.title=Registers
-view-registers.caption=Register:
-view-registers.clipboard=$ (clipboard)
-view-registers.selection=% (selection)
-view-registers.none=No registers defined
-view-registers.register=Register:
-view-registers.contents=Contents:
-view-registers.undefined=__UNDEFINED__
-#}}}
-
-#{{{ Close all buffers dialog
-close.title=Unsaved Changes
-close.caption=The following buffers have unsaved changes:
-close.selectAll=Select All
-close.selectAll.mnemonic=a
-close.save=Save Selected
-close.save.mnemonic=s
-close.discard=Discard Selected
-close.discard.mnemonic=d
-#}}}
-
-#{{{ Files changed on disk dialog
-files-changed.title=Files Changed on Disk
-files-changed.caption=The following files were changed on disk by another program:
-files-changed.deleted=Deleted on disk; save to recreate:
-files-changed.changed-auto=Automatically reloaded:
-files-changed.changed=Changed on disk:
-files-changed.changed-dirty-auto=Buffer dirty; not reloaded:
-files-changed.changed-dirty=Buffer dirty, and file changed on disk:
-files-changed.select-all=Select All
-files-changed.select-all.mnemonic=a
-files-changed.reload=Reload
-files-changed.reload.mnemonic=r
-files-changed.ignore=Ignore
-files-changed.ignore.mnemonic=i
-#}}}
-
-#{{{ Abbrev dialogs
-add-abbrev.title=Add Abbreviation
-add-abbrev.mode=Add mode-specific
-add-abbrev.global=Add global
-
-edit-abbrev.title=Edit Abbreviation
-
-edit-abbrev.duplicate.title=Duplicate Abbreviation
-edit-abbrev.duplicate.message=\
- Another expansion already exists with this abbreviation.\n\
- \n\
- Do you want to override the existing expansion?
-
-abbrev-editor.abbrev=Abbreviation:
-abbrev-editor.before=Text to insert before caret:
-abbrev-editor.after=Text to insert after caret:
-#}}}
-
-#{{{ XMode errors
-xmode-error.title=XML Parse Error
-# {2} is the column number, but it's not too useful so we don't show it
-xmode-error.message=An error occurred while parsing {0}, line {1}:\n\
- {3}
-xmode-error.dtd=The DTD could not be loaded\n({0})
-xmode-error.termchar-invalid=The value of the AT_CHAR attribute is invalid ({0})
-xmode-error.doctype-invalid=Expected a document type of MODE, found {0}
-xmode-error.empty-tag=The {0} tag cannot be empty
-xmode-error.token-invalid=The token type {0} is invalid
-xmode-error.empty-keyword=The keyword text cannot be empty
-xmode-error.regexp=Invalid regular expression\n({0})
-xmode-error.hash-char-and-hash-chars-mutually-exclusive=HASH_CHAR and HASH_CHARS may not be specified both
-xmode-error.delegate-invalid=Invalid delegate: {0}
-#}}}
-
-#{{{ JARClassLoader errors
-plugin-error.title=Plugin Error
-plugin-error.caption=The following plugins could not be loaded:
-plugin-error.caption-1=The following plugin could not be loaded:
-
-plugin-error.load-error=Cannot load: {0}\n\
- The most likely reason is that the JAR file is corrupt; try\n\
- reinstalling it. See Utilities->Troubleshooting->Activity Log\n\
- for a full stack trace.
-plugin-error.start-error=Cannot start: {0}\n\
- Try updating to a newer version of the plugin.
-plugin-error.already-loaded=Two copies installed. Please remove one of the \
- two copies.
-plugin-error.dep-jdk=Requires Java {0} or later, but you only have version {1}.
-plugin-error.dep-jedit=Requires jEdit {0} or later, but you only have version {1}.\n\
- Download new jEdit versions from <http://www.jedit.org>.
-plugin-error.dep-plugin.no-version=Requires version {0} \
- or later of {1},\n\
- but {1} is not installed.
-plugin-error.dep-plugin.broken=Requires {0}, but {0}\n\
- could not be loaded.
-plugin-error.dep-plugin=Requires version {0} or later of {1}, \
- but you only have {1} version {2}.
-plugin-error.dep-class=Requires the class {0}.\n\
- Try installing the appropriate plugin or class library.
-plugin-error.missing-jar=Requires JAR file {0}.\n\
- This JAR file is part of this plugin, but it cannot be found.\n\
- Try reinstalling this plugin.
-plugin-error.obsolete=This plugin is obsolete. Please remove it.
-plugin-error.not-42=This plugin does not support dynamic loading.\n\
- You must restart jEdit after removing or installing this plugin.
-
-plugin-error-download.title=Plugin error
-plugin-error-download.message=Error while downloading the plugin, please try another mirror\n{0}
-#}}}
-
-#{{{ Macro dialogs
-macro-input.title=Macro Input
-macro-error.title=Macro Error
-macro-message.title=Macro Message
-macro-confirm.title=Macro Confirmation
-#}}}
-
-#{{{ BeanShell stuff
-beanshell-error.title=BeanShell Error
-beanshell-error.message=A BeanShell error occurred.
-
-beanshell-eval-input.title=Evaluate BeanShell Expression
-beanshell-eval-input.message=BeanShell expression:\n\
- \n\
- Variables:\n\
- view - The current view instance\n\
- editPane - The current edit pane instance\n\
- textArea - The current text area instance\n\
- buffer - The current buffer
-
-beanshell-eval.title=BeanShell Evaluation
-beanshell-eval.message={0}
-
-beanshell-eval-line.title=Evaluate BeanShell Expression
-beanshell-eval-line.message=BeanShell expression to evaluate for each \
- selected line:\n\
- \n\
- Variables:\n\
- line - The index of the line, from the start of the buffer\n\
- index - The index of the line, from the start of the selection\n\
- text - The text of the line\n\
- view - The current view instance\n\
- editPane - The current edit pane instance\n\
- textArea - The current text area instance\n\
- buffer - The current buffer
-#}}}
-
-#{{{ Macro not recording dialog
-macro-not-recording.title=Not Recording
-macro-not-recording.message=A macro is not currently being recorded.
-#}}}
-
-#{{{ Large repeat count warning
-large-repeat-count.title=Large Repeat Count
-large-repeat-count.message=Are you sure you want to invoke "{0}" {1} times?
-
-large-repeat-count.user-input.title=Large Repeat Count
-large-repeat-count.user-input.message=Are you sure you want to insert "{0}" \
- {1} times?
-#}}}
-
-#{{{ Wrong fold mode dialog
-folding-not-explicit.title=Wrong Fold Mode
-folding-not-explicit.message=This command can only be used in explicit fold mode.
-#}}}
-
-#{{{ Memory status dialog box
-memory-status.title=Java Heap Memory
-memory-status.gc=Garbage collection released {0} Kb.
-memory-status.use={0} Kb used, {1} Kb total
-#}}}
-
-#{{{ Multiple I/O request errors
-buffer-multiple-io.title=I/O Error
-buffer-multiple-io.message=Each buffer can only execute one input/output\n\
- operation at a time. Please wait until the current\n\
- operation finishes (or abort it in the I/O progress monitor)\n\
- before starting another one.
-
-browser-multiple-io.title=I/O Error
-browser-multiple-io.message=Each file system browser can only execute one input/output\n\
- operation at a time. Please wait until the current operation\n\
- finishes (or abort it in the I/O progress monitor) before starting\n\
- another one.
-#}}}
-
-#{{{ maxLineLen=0 warning
-format-maxlinelen.title=Wrap Margin
-format-maxlinelen.message=The wrap margin must be set to a non-zero value\n\
- for this command to work.
-#}}}
-
-#{{{ Text under caret does not have a syntax style (token type)
-syntax-style-no-token.title=Syntax Style Configuration
-syntax-style-no-token.message=The text under the caret has no associated \
- syntax style to configure.
-#}}}
-
-#}}}
-
-#{{{ Buffer options dialog
-buffer-options.title=Buffer Options
-buffer-options.caption=This dialog box changes settings for the current buffer\n\
- only. To change the default settings for an edit mode, see\n\
- the Utilities->Global Options->Editing dialog.
-buffer-options.loading-saving=Loading and Saving
-buffer-options.lineSeparator=Line separator:
-buffer-options.encoding=Character encoding:
-buffer-options.gzipped=GZIP (compress) file on disk
-buffer-options.editing=Editing
-buffer-options.mode=Edit mode:
-#}}}
-
-#{{{ Global options dialog
-options.title=Options
-options.title-template={0}: {1}
-options.jedit.label=jEdit
-
-# Option pane to show by default
-options.last=editing
-
-#{{{ General pane
-options.general.label=General
-options.general.code=new GeneralOptionPane();
-options.general.lineSeparator=Default line separator:
-options.general.encoding=Default character encoding:
-options.general.encodingAutodetect=Auto-detect file encoding when possible
-options.general.checkModStatus=If open files are changed on disk:
-options.general.checkModStatus.nothing=do nothing
-options.general.checkModStatus.prompt=prompt
-options.general.checkModStatus.reload=automatically reload and notify user
-options.general.checkModStatus.silentReload=autoreload without notification
-options.general.checkModStatusUpon=Check for file change upon:
-options.general.checkModStatusUpon.focus=application focus
-options.general.checkModStatusUpon.all=application focus, visiting the buffer or saving any buffer
-options.general.checkModStatusUpon.operations=visiting the buffer or saving any buffer
-options.general.checkModStatusUpon.focusBuffer=visiting or saving the buffer
-options.general.checkModStatusUpon.none=saving the buffer
-options.general.recentFiles=Recent files to remember:
-options.general.hypersearch.maxWarningResults=Max Hypersearch Results:
-options.general.sortRecent=Sort recent file list
-options.general.saveCaret=Save caret positions in recent file list
-options.general.persistentMarkers=Save marker positions
-options.general.resetUndo=Reset undo history on save
-options.general.restore=Restore previously open files on startup
-options.general.restore.remote=... including remote files over VFS
-options.general.restore.cli=... including file names specified on the command line
-options.general.newkeyhandling=Use simplified keyboard handling
-options.general.newkeyhandling.tooltip=(Experimental) some international Linux users prefer this mode, but it may go away soon since regular keyboard handling works better.
-options.general.encodingDetectors=List of encoding autodetectors:
-options.general.fallbackEncodings=List of fallback encodings:
-options.general.fallbackEncodings.tooltip=(Experimental) A whitespace-separated list of encodings to try against encoding errors on loading
-#}}}
-
-#{{{ Abbreviations pane
-options.abbrevs.label=Abbreviations
-options.abbrevs.code=new AbbrevsOptionPane();
-options.abbrevs.set=Abbrev set:
-options.abbrevs.expandOnInput=Space bar expands abbrevs
-options.abbrevs.abbrev=Abbrev
-options.abbrevs.expand=Expansion
-options.abbrevs.add=Add...
-options.abbrevs.edit=Edit...
-options.abbrevs.remove=Remove
-options.abbrevs.add.icon=22x22/actions/list-add.png
-options.abbrevs.edit.icon=22x22/actions/document-properties.png
-options.abbrevs.remove.icon=22x22/actions/list-remove.png
-#}}}
-
-#{{{ Appearance pane
-options.appearance.label=Appearance
-options.appearance.code=new AppearanceOptionPane();
-options.appearance.iconTheme=Icon Theme:
-options.appearance.fonts.antialias=Anti-alias Non-TextArea fonts
-options.appearance.lf.note=Restart jEdit for look & feel changes to take effect
-options.appearance.lf=Swing look & feel:
-options.appearance.primaryFont=Button, menu and label font:
-options.appearance.secondaryFont=List and text field font:
-options.appearance.history=History text field entries to remember:
-options.appearance.menuSpillover=Number of items before menus spill over:
-options.appearance.startup.label=Startup options
-options.appearance.showSplash=Show splash screen on startup
-options.appearance.showTips=Show tips on startup
-options.appearance.experimental.label=Experimental options
-options.appearance.experimental.caption=The below three options might not work \
- correctly with some\n\
- Java versions. If you experience problems, switch them off.
-
-options.appearance.textColors=Use jEdit text area colors in all text \
- components
-options.appearance.decorateFrames=Draw window borders using Swing look & feel
-options.appearance.decorateDialogs=Draw dialog box borders using Swing look & feel
-options.appearance.continuousLayout.label=Use continuous layout in split panes
-#}}}
-
-#{{{ Context Menu pane
-options.context.label=Context Menu
-options.context.code=new ContextOptionPane();
-options.context.caption=Items in text area right click menu:
-options.context.add=Add...
-options.context.add.icon=22x22/actions/list-add.png
-options.context.remove=Remove
-options.context.remove.icon=22x22/actions/list-remove.png
-options.context.moveUp=Move Up
-options.context.moveUp.icon=22x22/actions/go-up.png
-options.context.moveDown=Move Down
-options.context.moveDown.icon=22x22/actions/go-down.png
-options.context.reset=Reset to Default
-options.context.reset.icon=22x22/actions/edit-clear.png
-options.context.add.title=Add to Context Menu
-options.context.add.caption=Add to context menu:
-options.context.add.separator=Separator
-options.context.add.action=Command or macro:
-
-options.context.reset.dialog.title=Reset to Default
-options.context.reset.dialog.message=Are you sure you want to reset the context menu to the installation default?
-#}}}
-
-#{{{ Docking pane
-options.docking.label=Docking
-options.docking.code=new DockingOptionPane();
-options.docking.title=Window
-options.docking.dockPosition=Docking position
-options.appearance.selectFramework.label=Docking framework:
-options.docking.autoSaveModeLayout.label=Automatically save mode-specific docking layout
-options.docking.autoLoadModeLayout.label=Automatically load mode-specific docking layout
-options.docking.selectSet.label=Dockable set:
-#}}}
-
-#{{{ Editing pane
-options.editing.label=Editing
-options.editing.code=new EditingOptionPane();
-options.editing.defaultMode=Default edit mode:
-options.editing.undoCount=Number of undos:
-options.editing.caption-0=\
- To customize mode-specific settings, select an edit mode\n\
- from the below menu. Currently, global defaults are being\n\
- shown.
-options.editing.caption-1=\
- Uncheck "use default settings" to customize mode-specific\n\
- settings. Otherwise, settings from the <global defaults>\n\
- section will be used.
-options.editing.mode=Change settings for mode:
-options.editing.global=<global defaults>
-options.editing.useDefaults=Use default settings
-options.editing.filenameGlob=File name glob:
-options.editing.firstlineGlob=First line glob:
-options.editing.folding=Folding mode:
-options.editing.collapseFolds=Initially collapse folds with level:
-options.editing.wrap=Word wrap:
-options.editing.maxLineLen=Wrap margin:
-options.editing.maxLineLen.tooltip=Select 0 for text area width (soft wrap only)
-options.editing.tabSize=Tab width:
-options.editing.indentSize=Indent width:
-options.editing.noWordSep=Extra word characters:
-options.editing.camelCasedWords=Separate "CamelCased" words
-options.editing.noTabs=Soft (emulated with spaces) tabs
-options.editing.deepIndent=Deep indent
-#}}}
-
-#{{{ Encodings pane
-options.encodings.label=Encodings
-options.encodings.code=new EncodingsOptionPane();
-options.encodings.selectEncodings=Select the encodings that should be shown in encoding dialogs:
-options.encodings.selectAll=Select All
-options.encodings.selectNone=Select None
-#}}}
-
-#{{{ Gutter pane
-options.gutter.label=Gutter
-options.gutter.code=new GutterOptionPane();
-options.gutter.enabled=Show gutter
-options.gutter.optionalComponents=Optional gutter components
-options.gutter.lineNumbers=Line numbers
-options.gutter.minLineNumberDigits=Minimal number of digits to reserve for line numbers:
-options.gutter.selectionAreaEnabled=Line selection area when line numbers are not shown
-options.gutter.selectionAreaBgColor=Selection area background color:
-options.gutter.selectionAreaWidth=Selection area width (in pixels):
-options.gutter.font=Gutter font:
-options.gutter.foreground=Line number color:
-options.gutter.background=Background color:
-options.gutter.borderWidth=Gutter border width:
-options.gutter.numberAlignment=Line number alignment:
-options.gutter.interval-1=Highlight every\u0020
-options.gutter.interval-2=lines:
-options.gutter.currentLineHighlight=Highlight current line:
-options.gutter.structureHighlight=Show structure scope:
-options.gutter.markerHighlight=Show marker positions:
-options.gutter.foldColor=Fold markers:
-options.gutter.focusBorderColor=Focused gutter border:
-options.gutter.noFocusBorderColor=Unfocused gutter border:
-options.gutter.foldStyle.label=Fold style:
-options.gutter.foldStyleNames.Triangle=Triangle
-options.gutter.foldStyleNames.Square=Square
-options.gutter.foldStyleNames.Circle=Circle
-#}}}
-
-#{{{ Mouse pane
-options.mouse.label=Mouse
-options.mouse.code=new MouseOptionPane();
-options.mouse.dragAndDrop=Drag and drop in text area
-options.mouse.joinNonWordChars=Double-click drag joins non-alphanumeric characters
-options.mouse.middleMousePaste=Quick copy using middle mouse button
-options.mouse.ctrlForRectangularSelection=Switch to rectangular selection while Ctrl is pressed
-options.mouse.gutter.foldClick=Click in gutter:
-options.mouse.gutter.SfoldClick=Shift-click in gutter:
-options.mouse.gutter.toggle-fold=Collapse/expand fold
-options.mouse.gutter.toggle-fold-fully=Collapse/expand fold fully
-#}}}
-
-#{{{ Plugin Manager pane
-options.plugin-manager.label=Plugin Manager
-options.plugin-manager.code=new PluginManagerOptionPane();
-options.plugin-manager.updateMirrors=Update mirror list
-options.plugin-manager.workthread=Updating mirror list ...
-options.plugin-manager.downloadSource=Download plugin source code
-options.plugin-manager.deleteDownloads=Delete archives from download \
- directory after install
-options.plugin-manager.mirror=Preferred download mirror:
-options.plugin-manager.location=Install plugins in:
-options.plugin-manager.settings-dir=jEdit settings directory
-options.plugin-manager.app-dir=jEdit application directory
-options.plugin-manager.none=Plugin Central default
-#}}}
-
-#{{{ Printing pane
-options.print.label=Printing
-options.print.code=new PrintOptionPane();
-options.print.font=Print font:
-options.print.fontstyle=Print font style:
-options.print.fontsize=Print font size:
-options.print.header=Print a header with the file name
-options.print.footer=Print a footer with the date, time and page number
-options.print.lineNumbers=Print line numbers
-options.print.color=Color printing
-options.print.tabSize=Tab width when printing:
-options.print.workarounds=Workarounds for Java bugs
-options.print.glyphVector=Print spacing workaround (increases spool file size)
-options.print.force13=Use old printing API (enable this if jEdit hangs when \
- printing)
-options.print.folds=Print folded regions
-#}}}
-
-#{{{ Proxy pane
-options.firewall.label=Proxy Servers
-options.firewall.code=new FirewallOptionPane();
-options.firewall.http.enabled=Use HTTP proxy server
-options.firewall.http.host=HTTP proxy host:
-options.firewall.http.port=HTTP proxy port:
-options.firewall.http.user=Username:
-options.firewall.http.password=Password:
-options.firewall.http.nonProxy=Connect directly to:
-options.firewall.socks.enabled=Use SOCKS proxy server
-options.firewall.socks.host=SOCKS proxy host:
-options.firewall.socks.port=SOCKS proxy port:
-#}}}
-
-#{{{ Save & Backup pane
-options.save-back.label=Saving & Backup
-options.save-back.code=new SaveBackupOptionPane();
-options.save-back.autosave=Autosave frequency (secs):
-options.save-back.backups=Max number of backups:
-options.save-back.backupDirectory=Backup directory:
-options.save-back.backupPrefix=Backup filename prefix:
-options.save-back.backupSuffix=Backup filename suffix:
-options.save-back.backupEverySave=Backup on every save
-options.save-back.twoStageSave=Two-stage save (safer but resets file owner on Unix)
-options.save-back.twoStageSave.tooltip=Stage 1: Rename the old file. Stage 2: create a new file in its place.
-options.save-back.confirmSaveAll="Save All Buffers" asks for confirmation
-options.save-back.autosaveUntitled=Autosave untitled buffers
-options.save-back.suppressNotSavedConfirmUntitled=Never mark Untitled buffers dirty.
-options.save-back.useMD5forDirtyCalculation=Never mark buffers dirty if contents are unchanged.
-options.save-back.useMD5forDirtyCalculation.tooltip=Compare with length and MD5 hash of buffer at load time, to decide if an edited buffer is still dirty.
-#}}}
-
-#{{{ Shortcuts pane
-options.shortcuts.label=Shortcuts
-options.shortcuts.code=new ShortcutsOptionPane();
-options.shortcuts.select.label=Edit Shortcuts:
-options.shortcuts.select.tooltip=You can select globals, macros, or plugin shortcuts
-options.shortcuts.name=Command
-options.shortcuts.shortcut1=Primary shortcut
-options.shortcuts.shortcut2=Alternative shortcut
-options.shortcuts.filter.label=Filter:
-options.shortcuts.filter.tooltip=Show only actions whose name contains this text
-options.shortcuts.clear.label=Clear
-
-grab-key.title=Specify Shortcut
-grab-key.caption=Press the desired shortcut for "{0}", then click OK.
-grab-key.keyboard-test=Input the key strokes that are causing problems.
-grab-key.assigned-to=Currently assigned to: {0}
-grab-key.assigned-to.none=<none>
-grab-key.assigned-to.prefix={0} prefix
-grab-key.clear=Clear
-grab-key.remove=Remove Current
-
-grab-key.remove-ask.title=Remove Shortcut?
-grab-key.remove-ask.message=\
- You didn't specify a new shortcut.\n\
- Do you want to remove the current shortcut?
-
-grab-key.duplicate-alt-shortcut.title=Duplicate Shortcut
-grab-key.duplicate-alt-shortcut.message=\
- The shortcut you selected duplicates the other\n\
- shortcut for this item. Please choose another.
-
-grab-key.duplicate-shortcut.title=Duplicate Shortcut
-grab-key.duplicate-shortcut.message=\
- This shortcut is already assigned to\n\
- "{0}".\n\
- \n\
- Do you want to override this assignment?
-
-grab-key.prefix-shortcut.title=Invalid Shortcut
-grab-key.prefix-shortcut.message=\
- You cannot use this shortcut, because\n\
- it is a prefix to other shortcuts.\n\
- Please choose another.
-#}}}
-
-#{{{ Status bar pane
-options.status.label=Status Bar
-options.status.code=new StatusBarOptionPane();
-options.status.visible=Show status bar
-options.status.plainview.visible=Show status bar in plain views
-options.status.foreground=Status bar text:
-options.status.background=Status bar background:
-options.status.memory.foreground=Memory indicator foreground:
-options.status.memory.background=Memory indicator background:
-options.status.edit.title=Edit Status Bar Entry
-options.status.edit.labelRadioButton=label
-options.status.edit.widgetRadioButton=widget
-options.status.edit.labelLabel=Type a label:
-options.status.edit.widgetLabel=Choose a widget:
-options.status.caret.linenumber=Show caret line number
-options.status.caret.dot=Show caret offset from start of line
-options.status.caret.virtual=Show caret virtual offset from start of line
-options.status.caret.offset=Show caret offset from start of file
-options.status.caret.bufferlength=Show length of file
-#}}}
-
-#{{{ Syntax Highlighting pane
-options.syntax.label=Syntax Highlighting
-options.syntax.code=new SyntaxHiliteOptionPane();
-options.syntax.object=Token type
-options.syntax.style=Text style
-options.syntax.foldLine.1=Collapsed fold line, level 1
-options.syntax.foldLine.2=Collapsed fold line, level 2
-options.syntax.foldLine.3=Collapsed fold line, level 3
-options.syntax.foldLine.0=Collapsed fold line, level > 3
-#}}}
-
-#{{{ Text Area pane
-options.textarea.label=Text Area
-options.textarea.code=new TextAreaOptionPane();
-options.textarea.font=Text font:
-options.textarea.foreground=Text color:
-options.textarea.background=Background color:
-options.textarea.caret=Caret:
-options.textarea.blinkCaret=blinking
-options.textarea.blockCaret=block
-options.textarea.thickCaret=thick
-options.textarea.selection=Single selection:
-options.textarea.multipleSelection=Multiple selection:
-options.textarea.lineHighlight=Highlight current line:
-options.textarea.structureHighlight=Highlight matching elements:
-options.textarea.eolMarkers=End of line markers:
-options.textarea.wrapGuide=Wrap guide:
-options.textarea.electricBorders=Electric (auto scroll) borders
-options.textarea.stdNextPrevWord=Go to next/previous word commands eat whitespace
-options.textarea.antiAlias=Anti Aliased smooth text
-options.textarea.antiAlias.tooltip=Anti-aliased fonts slow down display on some systems. \
-Subpixel supported in JDK 1.6 and later.
-options.textarea.fracFontMetrics=Fractional font metrics (for better smooth \
- text display)
-options.textArea.stripTrailingEOL=Hide final end of line (if any)
-options.textArea.completeFromAllBuffers=Complete words from all open buffers (default is \
- to limit search to currently visible buffers)
-#}}}
-
-#{{{ Tool Bar pane
-options.toolbar.label=Tool Bar
-options.toolbar.code=new ToolBarOptionPane();
-options.toolbar.showToolbar=Show tool bar
-options.toolbar.caption=Buttons to display on tool bar:
-options.toolbar.add.icon=22x22/actions/list-add.png
-options.toolbar.add=Add...
-options.toolbar.edit=Edit...
-options.toolbar.remove=Remove
-options.toolbar.remove.icon=22x22/actions/list-remove.png
-options.toolbar.moveUp=Move Up
-options.toolbar.moveUp.icon=22x22/actions/go-up.png
-options.toolbar.moveDown=Move Down
-options.toolbar.moveDown.icon=22x22/actions/go-down.png
-options.toolbar.reset=Reset to Default
-options.toolbar.reset.icon=22x22/actions/edit-clear.png
-options.toolbar.edit.title=Edit Tool Bar Entry
-options.toolbar.edit.caption=Type:
-options.toolbar.edit.separator=Separator
-options.toolbar.edit.action=Command or macro:
-options.toolbar.edit.icon=22x22/actions/document-properties.png
-options.toolbar.edit.builtin=Use built-in icon:
-options.toolbar.edit.file=Load icon from file:
-options.toolbar.edit.choose=Choose
-options.toolbar.edit.no-icon=No icon selected
-
-options.toolbar.reset.dialog.title=Reset to Default
-options.toolbar.reset.dialog.message=Are you sure you want to reset the toolbar to the installation default?
-#}}}
-
-#{{{ View pane
-options.view.label=View
-options.view.code=new ViewOptionPane();
-options.view.viewLayout=View layout
-options.view.alternateDockingLayout=Alternate docked window placement
-options.view.alternateToolBarLayout=Alternate tool bar placement
-options.view.showFullPath=Show full path of buffer in title bar
-options.view.showSearchbar=Always show search bar
-options.view.beepOnSearchAutoWrap=Beep when searching automatically wraps
-options.view.showBufferSwitcher=Show buffer switcher
-options.view.bufferSwitcherMaxRowsCount=Visible rows in buffer switcher:
-options.view.sortBuffers=Sort buffer sets
-options.view.sortByName=Sort buffer sets by file name, instead of path name
-options.view.fullScreenIncludesMenu=Show the menu bar in full-screen mode
-options.view.fullScreenIncludesToolbar=Show the toolbars in full-screen mode
-options.view.fullScreenIncludesStatus=Show the status bar in full-screen mode
-options.editpane.bufferset.default=BufferSet scope for new EditPanes:
-options.editpane.bufferset.contain=New BufferSets contain:
-options.editpane.bufferset.newbufferset.copy=copy of current BufferSet
-options.editpane.bufferset.newbufferset.empty=an empty buffer
-options.editpane.bufferset.newbufferset.currentbuffer=current buffer only
-
-fullScreenIncludesMenu=true
-fullScreenIncludesToolbars=true
-fullScreenIncludesStatus=true
-#}}}
-
-
-
-#{{{ File System Browser panes
-options.browser.label=File System Browser
-
-options.browser.colors.label=Colors
-options.browser.colors.code=new BrowserColorsOptionPane();
-options.browser.colors.glob=File name glob
-options.browser.colors.color=Color
-options.browser.colors.add=Add
-options.browser.colors.remove=Remove
-
-options.browser.general.label=General
-options.browser.general.code=new BrowserOptionPane();
-options.browser.general.defaultPath=Default path:
-options.browser.general.defaultPath.favorites=Favorites
-options.browser.general.defaultPath.home=Home directory
-options.browser.general.defaultPath.last=Most recently visited directory
-options.browser.general.defaultPath.buffer=Parent directory of current buffer
-options.browser.general.defaultPath.working=Working directory of jEdit process
-options.browser.general.showMenubar=Show menu bar
-options.browser.general.showToolbar=Show tool bar
-options.browser.general.showIcons=Show icons
-options.browser.general.showHiddenFiles=Show hidden files
-options.browser.general.sortIgnoreCase=Ignore case when sorting
-options.browser.general.sortMixFilesAndDirs=Mix files and directories
-options.browser.general.doubleClickClose=Double-clicking an open file closes it
-options.browser.general.currentBufferFilter=Filter in file dialogs is \
- current buffer extension
-options.browser.general.useDefaultIcons=Use default icons
-#}}}
-
-#{{{ Font selector
-font-selector.title=Font Selector
-font-selector.family=Font family:
-font-selector.size=Font size:
-font-selector.style=Font style:
-font-selector.plain=Plain
-font-selector.bold=Bold
-font-selector.italic=Italic
-font-selector.bolditalic=Bold italic
-font-selector.preview=Preview
-font-selector.long-text=The quick brown fox jumps over the lazy dog.
-#}}}
-
-#{{{ Color chooser, used by options.syntaxs
-colorChooser.title=Pick a Color
-#}}}
-
-#{{{ Style editor, used by options.syntaxs
-style-editor.title=Style Editor
-style-editor.tokenType=Token type:
-style-editor.italics=Italics
-style-editor.bold=Bold
-style-editor.fgColor=Text color:
-style-editor.bgColor=Background color:
-#}}}
-
-#}}}
-
-#{{{ Plugin options dialog
-plugin-options.title=Options
-options.plugins.label=Plugins
-options.no-plugins.label=No Plugin Options
-#}}}
-
-#{{{ Help viewer
-helpviewer.title=jEdit Help
-helpviewer.loading=Loading...
-helpviewer.back.label=Back
-helpviewer.back.icon=ArrowL.png
-helpviewer.forward.label=Forward
-helpviewer.forward.icon=ArrowR.png
-
-helpviewer.toc.loading=Loading...
-helpviewer.toc.label=Contents
-helpviewer.toc.welcome=Welcome to jEdit
-helpviewer.toc.readme=General Information
-helpviewer.toc.changes=Detailed Change Log
-helpviewer.toc.todo=To Do List and Known Bugs
-helpviewer.toc.copying=GNU General Public License
-helpviewer.toc.copying-doc=GNU Free Documentation License
-helpviewer.toc.copying-apache=Apache License
-helpviewer.toc.copying-plugins=Plugin Licensing Amendment
-helpviewer.toc.plugins=Plugins
-helpviewer.toc.online-apidocs=jEdit API Reference (Online)
-
-helpviewer.search.label=Search
-helpviewer.search.caption=Search for:
-helpviewer.searching=Searching...
-helpviewer.no-results=No results
-#}}}
-
-#{{{ Tip of the day window
-tip.title=Tip of the Day
-tip.caption=Did you know...
-tip.show-next-time=Show tips on startup
-tip.next-tip=Next Tip
-
-tip.not-found=doc/tips directory not found
-# Show on startup?
-tip.show=true
-#}}}
-
-#{{{ Activity log
-log-viewer.title=Activity Log
-log-viewer.caption=Full text of log is stored in {0}.
-log-viewer.copy=Copy
-log-viewer.tail.label=Tail
-#}}}
-
-#{{{ Marker Viewer
-view-markers.label=Vie$w Markers
-view-markers.title=Markers
-#}}}
-
-#{{{ I/O progress monitor
-io-progress-monitor.title=I/O Progress Monitor
-io-progress-monitor.caption={0} pending request(s).
-io-progress-monitor.idle=Thread idle
-io-progress-monitor.abort=Abort
-
-#{{{ I/O abort dialog box
-abort.title=Abort I/O
-abort.message=Are you sure you want to abort the currently executing\n\
- input/output request? If you are aborting a file save, this may\n\
- result in data loss.
-#}}}
-
-#}}}
-
-#{{{ VFS browser
-vfs.browser.title=File Browser
-vfs.browser.longtitle=File System Browser
-vfs.browser.path=Path:
-vfs.browser.path.mnemonic=p
-vfs.browser.filter=Filter:
-vfs.browser.default-filter=*[^~#]
-vfs.browser.filter-enabled=true
-vfs.browser.tree.loading=Loading...
-vfs.browser.file.icon=16x16/mimetypes/text-x-generic.png
-vfs.browser.open-file.icon=16x16/actions/edit-select-all.png
-vfs.browser.dir.icon=16x16/places/folder.png
-vfs.browser.open-dir.icon=16x16/status/folder-open.png
-vfs.browser.filesystem.icon=16x16/devices/drive-harddisk.png
-vfs.browser.loading.icon=16x16/status/image-loading.png
-vfs.browser.expand.icon=16x16/actions/group-expand.png
-vfs.browser.collapse.icon=16x16/actions/group-collapse.png
-
-vfs.browser.name=Name
-vfs.browser.type=Type
-vfs.browser.type.file=File
-vfs.browser.type.directory=Directory
-vfs.browser.type.filesystem=File system
-vfs.browser.status=Status
-vfs.browser.status.no=No access
-vfs.browser.status.ro=Read only
-vfs.browser.status.append=Append only
-vfs.browser.status.rw=Read/write
-vfs.browser.size=Size
-vfs.browser.modified=Last modified
-
-vfs.browser.file_filter.glob=Glob File Filter
-vfs.browser.file_filter.dir_only=Directories Only
-
-#{{{ Actions
-vfs.browser.browse-window.label=Browse in New Window
-vfs.browser.browse.label=Browse
-vfs.browser.close.label=Close
-vfs.browser.copy-path.label=Copy Path Name
-vfs.browser.delete.label=Delete...
-vfs.browser.delete.shortcut=DELETE
-vfs.browser.home.icon=22x22/actions/go-home.png
-vfs.browser.home.label=Home Directory
-vfs.browser.home.shortcut=~
-vfs.browser.properties.label=Properties
-vfs.browser.properties.title=File/Directory Properties
-vfs.browser.insert.label=Insert
-vfs.browser.new-directory.icon=22x22/actions/folder-new.png
-vfs.browser.new-directory.label=New Directory...
-vfs.browser.new-directory.shortcut=INSERT
-vfs.browser.new-file.icon=22x22/actions/document-new.png
-vfs.browser.new-file.label=New File
-vfs.browser.new-file.shortcut=C+n
-vfs.browser.open.label=Open
-vfs.browser.other-encoding-2.label=Other ({0})...
-vfs.browser.other-encoding.label=Other...
-vfs.browser.reload.icon=22x22/actions/view-refresh.png
-vfs.browser.reload.label=Reload Directory
-vfs.browser.reload.shortcut=F5
-vfs.browser.rename.label=Rename...
-vfs.browser.rename.shortcut=F2
-vfs.browser.roots.icon=22x22/devices/drive-harddisk.png
-vfs.browser.roots.label=Root Directory
-vfs.browser.roots.shortcut=/
-vfs.browser.search-directory.icon=22x22/actions/edit-find-in-folder.png
-vfs.browser.search-directory.label=Search in Directory...
-vfs.browser.show-hidden-files.label=Show Hidden Files
-vfs.browser.synchronize.icon=22x22/status/folder-visiting.png
-vfs.browser.synchronize.label=Directory of Current Buffer
-vfs.browser.synchronize.shortcut=-
-vfs.browser.up.icon=22x22/actions/go-parent.png
-vfs.browser.up.label=Parent Directory
-vfs.browser.up.shortcut=A+Up
-vfs.browser.paste.label=Paste File Here
-vfs.browser.previous.label=Previous Directory
-vfs.browser.previous.shortcut=A+Left
-vfs.browser.next.label=Next Directory
-vfs.browser.next.shortcut=A+Right
-vfs.browser.next.icon=22x22/actions/go-next.png
-vfs.browser.previous.icon=22x22/actions/go-previous.png
-#}}}
-
-#{{{ Tool bar
-vfs.browser.toolbar-browser=vfs.browser.previous \
- vfs.browser.next \
- vfs.browser.up \
- vfs.browser.reload \
- vfs.browser.home \
- vfs.browser.roots \
- vfs.browser.synchronize \
- vfs.browser.new-file \
- vfs.browser.new-directory \
- vfs.browser.search-directory
-
-vfs.browser.toolbar-dialog=vfs.browser.previous \
- vfs.browser.next \
- vfs.browser.up \
- vfs.browser.reload \
- vfs.browser.home \
- vfs.browser.roots \
- vfs.browser.synchronize \
- vfs.browser.new-directory
-#}}}
-
-#{{{ Commands menu
-vfs.browser.commands.label=Commands
-vfs.browser.commands.encoding.label=Encoding
-vfs.browser.commands.encoding.auto-detect=Auto-detect
-
-vfs.browser.open-in.label=Open in
-vfs.browser.open-in=vfs.browser.open-view \
- vfs.browser.open-plain-view \
- vfs.browser.open-split
-vfs.browser.open-view.label=New View
-vfs.browser.open-plain-view.label=New Plain View
-vfs.browser.open-split.label=New Split
-#}}}
-
-#{{{ Plugins menu
-vfs.browser.plugins.label=Plugins
-vfs.browser.plugins.plugin-manager.label=Plugin Manager...
-vfs.browser.plugins.plugin-options.label=Plugin Options...
-vfs.browser.plugins.no-plugins.label=No Plugins
-#}}}
-
-#{{{ Favorites menu
-vfs.browser.favorites.label=Favorites
-vfs.browser.favorites.add-to-favorites.label=Add to Favorites
-vfs.browser.favorites.edit-favorites.label=Edit Favorites
-vfs.browser.favorites.no-favorites.label=No Favorites
-#}}}
-
-vfs.browser.dialog.open=Open
-vfs.browser.dialog.save=Save
-vfs.browser.dialog.choose-dir=Choose
-vfs.browser.dialog.filename=File name:
-vfs.browser.dialog.filename.mnemonic=f
-
-#{{{ Dialogs
-vfs.browser.bad-filter.title=Invalid Filter
-vfs.browser.bad-filter.message=The filter {0} is invalid ({1})
-
-vfs.browser.recurse-favorites.title=Cannot Add Favorites to Itself
-vfs.browser.recurse-favorites.message=The favorites list cannot be added to itself.
-
-vfs.browser.delete-confirm.title=Delete File Confirmation
-vfs.browser.delete-confirm.message=Are you sure you want to delete the following {1}?\n\n\
- {0}
-
-vfs.browser.delete-favorites.title=Delete From Favorites
-vfs.browser.delete-favorites.message=Are you sure you want to remove the following files \
- from the favorites?\n\n\
- {0}
-
-vfs.browser.rename.title=Rename File
-vfs.browser.rename.message=Enter a new name for {0}:
-
-vfs.browser.mkdir.title=New Directory
-vfs.browser.mkdir.message=Name (or path) of new directory:
-#}}}
-
-#}}}
-
-#{{{ I/O status messages
-vfs.status.load=Loading {0}
-vfs.status.load-markers=Loading markers for {0}
-vfs.status.save=Saving {0}
-vfs.status.save-markers=Saving markers for {0}
-vfs.status.autosave=Autosaving {0}
-vfs.status.listing-directory=Listing {0}
-vfs.status.deleting=Deleting {0}
-vfs.status.renaming=Renaming {0} to {1}
-#}}}
-
-#{{{ Plugin manager
-
-plugin-manager.title=Plugin Manager
-
-plugin-manager.export-url=http://plugins.jedit.org/export/gzip_plugin_manager.php
-plugin-manager.mirror-url=http://plugins.jedit.org/export/mirror_list.php
-
-plugin-manager.hide-libraries=Hide libraries
-
-plugin-manager.mgr-options=Download Options...
-plugin-manager.plugin-options=Plugin Options...
-plugin-manager.done=Close
-
-plugin-manager.remove-confirm.title=Remove Plugins
-plugin-manager.remove-confirm.message=Are you sure you want to remove the \
- following plugins?
-
-plugin-manager.dependency.title=Plugin Dependency
-plugin-manager.dependency.message={0} is required by the following plugins.\n\
- Deselecting {0} will also deselect the below plugins:
-
-plugin-manager.remove-dependencies.title=Plugin Dependency
-plugin-manager.remove-dependencies.message=The removed plugins are required by the following plugins.\n\
- Removing them will also deselect the below plugins:
-
-plugin-manager.cleanup.label=Cleanup
-plugin-manager.cleanup.title=Cleanup plugin data
-plugin-manager.cleanup.message=Remove the data of the following plugins:
-
-plugin-manager.noOrphan.label=Find orphan
-plugin-manager.noOrphan.title=No orphan jars found
-plugin-manager.noOrphan.message=There was no orphan jars in your jEdit installation
-
-plugin-manager.findOrphan.label=Find orphan
-plugin-manager.findOrphan.title=Find orphan jars
-plugin-manager.findOrphan.message=The following jars do not belong to any plugin\n\
- remove them ?\n (be careful, they can be declared dynamically in some \n\
- plugins like JDBC drivers):
-
-install-plugins.depend.title=Dependency Required
-install-plugins.depend.message=One or more of the plugins you are installing\n\
- require additional plugins. They will be automatically\n\
- installed if you continue.
-
-plugin-manager.status.loaded=Loaded
-plugin-manager.status.not-loaded=Not loaded
-plugin-manager.status.error=Error
-
-plugin-manager.list-download-connect=Connecting to plugins.jedit.org
-plugin-manager.list-download=Downloading plugin list from plugins.jedit.org
-plugin-manager.filterField=Show only plugins whose name contains this text
-
-#{{{ Error while loading plugin list
-plugin-list.ioerror.title=I/O Error
-plugin-list.ioerror.message=Could not download the plugin list.\n\
- ({0})\n\
- \n\
- If you are behind an HTTP or SOCKS proxy, click\n\
- "Proxy Servers" to configure proxy server settings\n\
- and try again.
-plugin-list.ioerror.proxy-servers=Proxy Servers...
-
-plugin-list.xmlerror.title=XML Parser Error
-plugin-list.xmlerror.message=An error occurred while parsing {0}, line {1}:\n\
- {2}
-#}}}
-
-#{{{ Plugin management
-manage-plugins.title=Manage
-
-manage-plugins.info.name=Name
-manage-plugins.info.version=Version
-manage-plugins.info.status=Status
-manage-plugins.info.data=Data
-
-manage-plugins.data-size.unknown=<unknown>
-
-manage-plugins.remove=Remove...
-manage-plugins.help=Help...
-manage-plugins.restore.icon=22x22/actions/document-open.png
-manage-plugins.save.icon=22x22/actions/document-save.png
-#}}}
-
-#{{{ Plugin installation
-install-plugins.title=Install
-
-install-plugins.info.name=Name
-install-plugins.info.size=Size
-install-plugins.info.version=Version
-install-plugins.info.category=Category
-
-install-plugins.totalSize=Total Size:\
-install-plugins.select-all=Select All
-install-plugins.install=Install
-install-plugins.show-updates=Show Updates
-install-plugins.choose-plugin-set.icon=22x22/actions/document-open.png
-install-plugins.clear-plugin-set.icon=22x22/actions/edit-clear.png
-
-install-plugins.info=Author: {0}\n\
- Released: {1}\n\
- {2}
-
-update-plugins.title=Update
-
-plugin-manager.progress=Downloading {0} from mirror {1}
-plugin-manager.progress.stop=Stop
-#}}}
-
-#{{{ Plugin remove error
-plugin-manager.remove-failed.title=Remove Failed
-plugin-manager.remove-failed.message=The plugin {0}\n\
- could not be removed.
-#}}}
-
-#}}}
-
-#{{{ File Properties Dialog
-fileprop.name=Name
-fileprop.path=Path
-fileprop.lastmod=Last Modified
-fileprop.size=Size
-fileprop.properties=Properties
-fileprop.readable=Readable
-fileprop.writeable=Writeable
-fileprop.attribute=Attribute
-fileprop.okBtn=OK
-fileprop.cancelBtn=Cancel
-fileprop.selectedFiles=Selected files
-fileprop.selectedDirectories=Selected directories
-#}}}
-
-errorwidget.popupmenu=logs-remove-all-errors
-logs-remove-all-errors.label=Remove all errors
-
+###
+### jEdit user interface definitions,
+### :tabSize=8:indentSize=8:noTabs=false:
+### :folding=explicit:collapseFolds=1:
+### :encoding=ISO-8859-1:
+###
+### Copyright (C) 1998, 2005 Slava Pestov
+###
+
+#{{{ Default user catalog file
+defaultCatalog=<?xml version="1.0"?>\n\
+ <!DOCTYPE MODES SYSTEM "catalog.dtd">\n\
+ \n\
+ <MODES>\n\
+ \n\
+ <!-- Add lines like the following, one for each edit mode you add: -->\n\
+ <!-- <MODE NAME="foo" FILE="foo.xml" FILE_NAME_GLOB="*.foo" /> -->\n\
+ \n\
+ </MODES>
+#}}}
+
+#{{{ Common strings
+
+common.ok=OK
+common.cancel=Cancel
+common.close=Close
+common.error=Error
+common.apply=Apply
+common.more=More
+common.insert=Insert
+common.add=Add
+common.add.icon=22x22/actions/list-add.png
+common.remove=Remove
+common.remove.icon=22x22/actions/list-remove.png
+common.moveUp=Move Up
+common.moveUp.icon=22x22/actions/go-up.png
+common.moveDown=Move Down
+common.moveDown.icon=22x22/actions/go-down.png
+common.clearAll=Clear All
+common.clearAll.icon=22x22/actions/edit-clear.png
+
+lineSep.unix=Unix (\\n)
+lineSep.windows=DOS/Windows (\\r\\n)
+lineSep.mac=MacOS (\\r)
+
+logo.icon.small=16x16/apps/jedit.png
+logo.icon.medium=32x32/apps/jedit.png
+
+#}}}
+
+#{{{ Miscellaneous
+encodings=ASCII Cp850 Cp1251 Cp1252 ISO8859_1 ISO8859_2 ISO8859_15 \
+ MacRoman Big5 GBK KOI8_R SJIS UTF-16 UTF-8 UTF-8Y
+
+history.caption=Previously entered strings:
+
+action-set.jEdit=Built-in Commands
+action-set.browser=File System Browser
+action-set.macros=Macros
+action-set.plugin=Plugin: {0}
+
+macro-handler.beanshell.label=BeanShell script
+macro-handler.beanshell.glob=*.bsh
+
+save-layout-failed.message=Failed to save the docking layout.
+load-layout.title=Load Docking Layout
+load-layout.message=Docking layout to load:
+save-layout.title=Save Docking Layout
+save-layout.message=Docking layout to save:
+
+# Plugin activation hooks
+defer=false
+startup=true
+
+broken-image.icon=22x22/status/image-missing.png
+dropdown-arrow.icon=ToolbarMenu.gif
+#}}}
+
+#{{{ Tool bar
+view.toolbar=new-file open-file save close-buffer - print - \
+ undo redo - cut copy paste - find find-next - \
+ new-view unsplit split-horizontal split-vertical - \
+ buffer-options global-options - \
+ plugin-manager - help
+
+new-file.icon=22x22/actions/document-new.png
+open-file.icon=22x22/actions/document-open.png
+save.icon=22x22/actions/document-save.png
+close-buffer.icon=22x22/actions/document-close.png
+global-close-buffer.icon=22x22/actions/document-close.png
+print.icon=22x22/actions/document-print.png
+page-setup.icon=22x22/actions/printer-setup.png
+undo.icon=22x22/actions/edit-undo.png
+redo.icon=22x22/actions/edit-redo.png
+cut.icon=22x22/actions/edit-cut.png
+copy.icon=22x22/actions/edit-copy.png
+paste.icon=22x22/actions/edit-paste.png
+find.icon=22x22/actions/edit-find.png
+find-next.icon=22x22/actions/edit-find-next.png
+new-view.icon=22x22/actions/window-new.png
+unsplit.icon=22x22/actions/window-unsplit.png
+split-horizontal.icon=22x22/actions/window-split-horizontal.png
+split-vertical.icon=22x22/actions/window-split-vertical.png
+buffer-options.icon=22x22/actions/document-properties.png
+global-options.icon=22x22/categories/preferences-system.png
+
+plugin-manager.icon=22x22/places/plugins.png
+help.icon=22x22/apps/help-browser.png
+
+#{{{ Icon list for tool bar editor
+icons=22x22/actions/resize-horisontal.png \
+ 22x22/actions/go-down.png \
+ 22x22/actions/go-previous.png \
+ 22x22/actions/go-next.png \
+ 22x22/actions/go-home.png \
+ 22x22/actions/go-up.png \
+ 22x22/actions/go-first.png \
+ 22x22/actions/go-last.png \
+ 22x22/actions/go-parent.png \
+ 22x22/actions/document-close.png \
+ 22x22/actions/edit-undo.png \
+ 22x22/actions/edit-redo.png \
+ 22x22/actions/edit-cut.png \
+ 22x22/actions/edit-paste.png \
+ 22x22/actions/edit-delete.png \
+ 22x22/actions/edit-clear.png \
+ 22x22/actions/edit-find-next.png \
+ 22x22/actions/edit-find-in-folder.png \
+ 22x22/actions/edit-find.png \
+ 22x22/actions/edit-copy.png \
+ 22x22/actions/copy-to-buffer.png \
+ 22x22/actions/list-remove.png \
+ 22x22/actions/list-add.png \
+ 22x22/actions/folder-new.png \
+ 22x22/actions/window-new.png \
+ 22x22/actions/document-new.png \
+ 22x22/actions/document-open.png \
+ 22x22/actions/document-reload2.png \
+ 22x22/actions/document-properties.png \
+ 22x22/actions/document-save.png \
+ 22x22/actions/document-save-all.png \
+ 22x22/actions/document-save-as.png \
+ 22x22/actions/printer-setup.png \
+ 22x22/actions/process-stop.png \
+ 22x22/actions/media-playback-pause.png \
+ 22x22/actions/media-playback-start.png \
+ 22x22/actions/view-refresh.png \
+ 22x22/actions/application-run.png \
+ 22x22/actions/edit-find-multiple.png \
+ 22x22/actions/edit-find-single.png \
+ 22x22/actions/window-split-horizontal.png \
+ 22x22/actions/window-split-vertical.png \
+ 22x22/actions/window-unsplit.png \
+ 22x22/actions/zoom-in.png \
+ 22x22/actions/zoom-out.png \
+ 22x22/apps/utilities-terminal.png \
+ 22x22/apps/system-file-manager.png \
+ 22x22/apps/internet-web-browser.png \
+ 22x22/apps/help-browser.png \
+ 22x22/apps/system-installer.png \
+ 22x22/status/image-missing.png \
+ 22x22/status/folder-visiting.png \
+ 22x22/devices/drive-harddisk.png \
+ 22x22/devices/media-floppy.png \
+ 22x22/devices/printer.png \
+ 22x22/places/plugins.png \
+ 22x22/categories/preferences-system.png \
+ Blank24.gif
+#}}}
+
+view.search.find=Search for:
+view.search.close-tooltip=Hide search bar
+
+view.action.prompt=Action:
+view.action.no-completions=No matching actions found
+view.action.close-tooltip=Hide action bar
+#}}}
+
+#{{{ Context menu
+view.context=cut copy paste paste-previous paste-deleted - \
+ select-block to-upper to-lower - hypersearch-word - \
+ add-marker - collapse-fold expand-fold narrow-to-fold
+view.context.customize=Customize This Menu...
+#}}}
+
+#{{{ Menu bar
+view.mbar=file edit search markers folds view utils macros plugins help-menu
+
+#{{{ File menu
+file=new-file \
+ new-file-in-mode \
+ open-file \
+ %recent-files \
+ - \
+ reload \
+ reload-all \
+ %reload-encoding \
+ - \
+ close-buffer \
+ global-close-buffer \
+ closeall-except-active \
+ close-all \
+ - \
+ save \
+ save-as \
+ save-a-copy-as \
+ save-all \
+ - \
+ print \
+ page-setup \
+ - \
+ exit
+file.label=$File
+new-file.label=$New
+new-file.icon.small=16x16/actions/document-new.png
+new-file-in-mode.label=New in $Mode
+new-file-in-mode.icon.small=16x16/actions/document-new.png
+new-file-in-mode.dialog.title=New File
+new-file-in-mode.dialog.message=With Edit Mode:
+open-file.label=$Open...
+open-file.icon.small=16x16/actions/document-open.png
+reload.label=$Reload
+reload.icon.small=16x16/actions/view-refresh.png
+reload-all.label=Reloa$d All
+close-buffer.label=$Close
+close-buffer.tooltip=Close buffer in EditPane's BufferSet only.
+close-buffer.icon.small=16x16/actions/document-close.png
+global-close-buffer.label=Close (global)
+global-close-buffer.tooltip=Close buffer in all editpanes and views
+closeall-except-active.tooltip=Clear current editpane's BufferSet except for buffer(s) currently showing
+closeall-except-active.label=Close O$thers
+bufferset-toggle-exclusive.label=Toggle E$xclusive BufferSets
+bufferset-toggle-exclusive.tooltip=When a buffer is opened, close it in other non-intersecting buffersets.
+closeall-except-active.icon.small=16x16/actions/document-close.png
+global-close-buffer.icon.small=16x16/actions/document-close.png
+close-all.label=Clos$e All
+close-all.icon.small=16x16/actions/document-close.png
+save.label=$Save
+save.icon.small=16x16/actions/document-save.png
+save-as.label=S$ave As...
+save-a-copy-as.label=Save a Cop$y As...
+save-a-copy-as.tooltip=Does not change the current buffer's path
+save-all.label=Save A$ll...
+print.label=$Print...
+print.icon.small=16x16/actions/document-print.png
+page-setup.label=Pa$ge Setup...
+# Print selection not yet implemented
+#print-selection.label=Prin$t Selection...
+exit.label=E$xit
+
+#{{{ Recent Files menu
+recent-files.code=new RecentFilesProvider();
+recent-files.label=Recent $Files
+recent-files.textfield.tooltip=a filter prefix or glob-pattern can be entered here
+no-recent-files.label=No Recent Files
+clear-recent-files.label=Clear Recent Files
+#}}}
+
+reload-encoding.code=new ReloadWithEncodingProvider();
+reload-encoding.label=Reload with $Encoding
+reload-encoding.error={0} is not a valid encoding
+#}}}
+
+#{{{ Edit menu
+edit=undo \
+ redo \
+ - \
+ cut \
+ copy \
+ paste \
+ %clipboard \
+ - \
+ select-all \
+ %selection \
+ - \
+ word-count \
+ complete-word \
+ expand-abbrev \
+ - \
+ goto-line \
+ - \
+ %text \
+ %indent \
+ %source
+edit.label=$Edit
+undo.label=$Undo
+undo.icon.small=16x16/actions/edit-undo.png
+redo.label=$Redo
+redo.icon.small=16x16/actions/edit-redo.png
+cut.label=$Cut
+cut.icon.small=16x16/actions/edit-cut.png
+copy.label=C$opy
+copy.icon.small=16x16/actions/edit-copy.png
+paste.label=$Paste
+paste.icon.small=16x16/actions/edit-paste.png
+select-all.label=Select $All
+word-count.label=$Word Count...
+complete-word.label=Co$mplete Word
+expand-abbrev.label=E$xpand Abbreviation
+goto-line.label=$Go to Line...
+
+#{{{ More Clipboard menu
+clipboard=cut-append \
+ copy-append \
+ vertical-paste \
+ paste-special \
+ - \
+ paste-previous \
+ paste-deleted \
+ - \
+ cut-string-register \
+ copy-string-register \
+ paste-string-register \
+ - \
+ cut-append-string-register \
+ copy-append-string-register \
+ vertical-paste-string-register \
+ - \
+ view-registers
+
+clipboard.label=More Clip$board
+cut-append.label=$Cut Append
+copy-append.label=C$opy Append
+vertical-paste.label=$Vertical Paste
+paste-previous.label=Paste Previo$us...
+paste-deleted.label=Paste $Deleted...
+paste-special.label=Paste Special...
+cut-string-register.label=Cu$t to Register
+copy-string-register.label=Co$py to Register
+paste-string-register.label=Paste $Register
+clear-string-register.label=Clear Register
+cut-append-string-register.label=Cut Appe$nd to Register
+copy-append-string-register.label=Copy $Append to Register
+vertical-paste-string-register.label=V$ertical Paste Register
+view-registers.label=Vie$w Registers
+#}}}
+
+#{{{ More Selection menu
+selection=select-none \
+ select-word \
+ select-line \
+ select-paragraph \
+ - \
+ invert-selection \
+ toggle-multi-select \
+ toggle-rect-select \
+ - \
+ select-line-range
+selection.label=More $Selection
+select-none.label=Select $None
+select-word.label=Select $Word
+select-line.label=Select $Line
+select-paragraph.label=Select $Paragraph
+invert-selection.label=$Invert Selection
+toggle-multi-select.label=$Multiple Selection
+toggle-rect-select.label=$Rectangular Selection
+select-line-range.label=Sele$ct Line Range...
+#}}}
+
+#{{{ Text menu
+text=delete-line \
+ delete-start-line \
+ delete-end-line \
+ join-lines \
+ - \
+ format-paragraph \
+ delete-paragraph \
+ - \
+ to-lower \
+ to-upper
+text.label=$Text
+delete-line.label=$Delete Lines
+delete-start-line.label=Delete to $Start of Line
+delete-end-line.label=Delete to $End of Line
+join-lines.label=$Join Lines
+delete-paragraph.label=Delete $Paragraph
+format-paragraph.label=$Format Paragraph
+to-lower.label=To $Lower Case
+to-upper.label=To $Upper Case
+#}}}
+
+#{{{ Indent menu
+indent=indent-lines \
+ shift-left \
+ shift-right \
+ - \
+ remove-trailing-ws \
+ spaces-to-tabs \
+ tabs-to-spaces
+
+indent.label=$Indent
+indent-lines.label=$Indent Lines
+shift-left.label=Shift Indent $Left
+shift-right.label=Shift Indent $Right
+remove-trailing-ws.label=Remove Trailing $Whitespace
+spaces-to-tabs.label=$Spaces to Tabs
+tabs-to-spaces.label=$Tabs to Spaces
+#}}}
+
+#{{{ Source menu
+source=range-comment \
+ line-comment \
+ - \
+ select-block \
+ match-bracket \
+ prev-bracket \
+ next-bracket
+
+source.label=Sourc$e
+range-comment.label=$Range Comment
+line-comment.label=$Line Comment
+select-block.label=$Select Code Block
+match-bracket.label=Go to $Matching Bracket
+prev-bracket.label=Go to $Previous Bracket
+next-bracket.label=Go to $Next Bracket
+#}}}
+
+#}}}
+
+#{{{ Search menu
+search=find \
+ find-next \
+ find-prev \
+ - \
+ search-in-open-buffers \
+ search-in-directory \
+ - \
+ replace-in-selection \
+ replace-and-find-next \
+ replace-all \
+ - \
+ quick-search \
+ hypersearch \
+ quick-search-word \
+ hypersearch-word \
+ - \
+ ignore-case \
+ regexp \
+ - \
+ hypersearch-results
+search.label=$Search
+find.label=$Find...
+find.icon.small=16x16/actions/edit-find.png
+find-next.label=Fi$nd Next
+find-prev.label=Find Pre$vious
+search-in-open-buffers.label=Search in Open $Buffers...
+search-in-directory.label=Search in $Directory...
+replace-in-selection.label=$Replace in Selection
+replace-and-find-next.label=Re$place and Find Next
+replace-all.label=Replace $All
+quick-search.label=$Incremental Search Bar
+hypersearch.label=$HyperSearch Bar
+quick-search-word.label=Incremental Search for $Word
+hypersearch-word.label=H$yperSearch for Word
+ignore-case.label=Ignore $Case
+regexp.label=Regular E$xpressions
+hypersearch-results.label=HyperSearch Results
+#}}}
+
+#{{{ Markers menu
+markers=add-marker \
+ add-marker-shortcut \
+ - \
+ remove-all-markers \
+ - \
+ goto-marker \
+ select-marker \
+ swap-marker \
+ - \
+ prev-marker \
+ next-marker \
+ - \
+ view-markers \
+ -
+markers.code=new MarkersProvider();
+markers.label=$Markers
+add-marker.label=$Add/Remove Marker
+add-marker-shortcut.label=Add Marker $With Shortcut
+remove-all-markers.label=Re$move All Markers
+goto-marker.label=$Go to Marker
+select-marker.label=$Select to Marker
+swap-marker.label=Swa$p Caret and Marker
+prev-marker.label=Go to $Previous Marker
+next-marker.label=Go to $Next Marker
+no-markers.label=No Markers
+markers.blank-line=[Blank line]
+#}}}
+
+#{{{ Folding menu
+folds=collapse-fold \
+ expand-one-level \
+ expand-fold \
+ - \
+ collapse-all-folds \
+ expand-folds \
+ expand-all-folds \
+ - \
+ select-fold \
+ - \
+ add-explicit-fold \
+ - \
+ narrow-to-fold \
+ narrow-to-selection \
+ - \
+ parent-fold \
+ prev-fold \
+ next-fold
+folds.label=F$olding
+collapse-fold.label=$Collapse Fold
+expand-one-level.label=$Expand Fold One Level
+expand-fold.label=Expand $Fold Fully
+collapse-all-folds.label=Collapse $All Folds
+expand-folds.label=Expand Fo$lds With Level
+expand-all-folds.label=E$xpand All Folds
+select-fold.label=$Select Fold
+add-explicit-fold.label=A$dd Explicit Fold
+narrow-to-fold.label=Na$rrow to Fold
+narrow-to-selection.label=Narro$w to Selection
+parent-fold.label=$Go to Parent Fold
+prev-fold.label=Go to $Previous Fold
+next-fold.label=Go to $Next Fold
+#}}}
+
+#{{{ View menu
+view=new-view \
+ new-plain-view \
+ close-view \
+ - \
+ prev-buffer \
+ next-buffer \
+ recent-buffer \
+ focus-buffer-switcher \
+ - \
+ toggle-line-numbers \
+ toggle-statusbar \
+ toggle-gutter \
+ toggle-buffer-switcher \
+ - \
+ %scrolling \
+ %splitting \
+ %docking \
+ %buffersets \
+ - \
+ set-view-title \
+ toggle-full-screen
+view.label=$View
+new-view.label=New $View
+new-view.icon.small=16x16/actions/window-new.png
+new-plain-view.label=Ne$w Plain View
+close-view.label=$Close View
+close-view.icon.small=16x16/actions/document-close.png
+prev-buffer.label=Go to $Previous Buffer
+next-buffer.label=Go to $Next Buffer
+recent-buffer.label=Go to $Recent Buffer
+toggle-buffer-switcher.label=Toggle $Buffer Switcher
+focus-buffer-switcher.label=Focus on Buffer S$witcher
+toggle-line-numbers.label=Toggle $Line Numbers
+toggle-statusbar.label=Toggle S$tatus Bar
+toggle-gutter.label=Toggle $Gutter
+show-context-menu.label=Show Context Menu
+set-view-title.label=Set view title...
+set-view-title.tooltip=Set the title of the main window for easy identification from your desktop.
+toggle-full-screen.label=Toggle $full-screen mode
+
+#{{{ Scrolling menu
+scrolling=scroll-to-current-line \
+ center-caret \
+ scroll-and-center \
+ - \
+ scroll-up-line \
+ scroll-down-line \
+ - \
+ scroll-up-page \
+ scroll-down-page
+scrolling.label=Scrollin$g
+scroll-to-current-line.label=Scroll $to Current Line
+scroll-and-center.label=$Scroll and Center Caret
+center-caret.label=$Center Caret on Screen
+scroll-up-line.label=Line Scroll $Up
+scroll-down-line.label=Line Scroll $Down
+scroll-up-page.label=Page Scroll U$p
+scroll-down-page.label=Page Scroll D$own
+#}}}
+
+#{{{ Splitting menu
+splitting=unsplit-current \
+ unsplit \
+ split-horizontal \
+ split-vertical \
+ resplit \
+ - \
+ prev-textarea \
+ next-textarea
+splitting.label=$Splitting
+split-horizontal.label=Split $Horizontally
+split-vertical.label=Split $Vertically
+unsplit-current.label=$Unsplit Current
+unsplit.label=Unsplit $All
+resplit.label=$Restore Split
+prev-textarea.label=Go to $Previous Text Area
+next-textarea.label=Go to $Next Text Area
+buffersets.label=$Buffer Sets
+buffersets=global-bufferset view-bufferset editpane-bufferset bufferset-toggle-exclusive
+global-bufferset.label=$Global Scope
+global-bufferset.tooltip=All EditPanes share the same BufferSet.
+view-bufferset.label=$View Scope
+view-bufferset.tooltip=EditPanes in the same View share the same BufferSet.
+editpane-bufferset.label=$EditPane Scope
+editpane-bufferset.tooltip=Each Editpane has its own BufferSet.
+
+
+#}}}
+
+#{{{ Docking menu
+docking=left-docking-area \
+ top-docking-area \
+ right-docking-area \
+ bottom-docking-area \
+ - \
+ toggle-dock-areas \
+ close-docking-area \
+ - \
+ layout-load \
+ layout-save \
+ layout-load-current-mode \
+ layout-save-current-mode
+docking.label=$Docking
+docking.menu.label=Dockable Menu
+toggle-dock-areas.label=Toggle Docked $Areas
+left-docking-area.label=Go to $Left Docking Area
+top-docking-area.label=Go to $Top Docking Area
+right-docking-area.label=Go to $Right Docking Area
+bottom-docking-area.label=Go to $Bottom Docking Area
+close-docking-area.label=$Close Current Docking Area
+layout-load.label=$Load docking layout ...
+layout-save.label=$Save docking layout ...
+layout-load-current-mode.label=Load docking layout of current mode
+layout-save-current-mode.label=Save docking layout of current mode
+
+#}}}
+
+#}}}
+
+#{{{ Utilities menu
+utils=vfs.browser \
+ %recent-directories \
+ - \
+ %favorites \
+ %current-directory \
+ %jedit-directory \
+ %settings-directory \
+ - \
+ %beanshell \
+ %troubleshooting \
+ - \
+ action-bar \
+ last-action \
+ - \
+ buffer-options \
+ global-options \
+ - \
+ %quick-options
+utils.label=$Utilities
+vfs.browser.label=$File System Browser
+vfs.browser.icon.small=16x16/apps/system-file-manager.png
+action-bar.label=$Action Bar
+last-action.label=Re$peat Last Action
+buffer-options.label=$Buffer Options...
+buffer-options.icon.small=16x16/actions/document-properties.png
+global-options.label=$Global Options...
+global-options.icon.small=16x16/categories/preferences-system.png
+
+#{{{ Recent Directories menu
+recent-directories.label=$Recent Directories
+recent-directories.code=new RecentDirectoriesProvider();
+no-recent-dirs.label=No Recent Directories
+#}}}
+
+#{{{ Favorites menu
+favorites=add-buffer-to-favorites add-dir-to-favorites edit-favorites -
+favorites.label=Fa$vorites
+favorites.code=new FavoritesProvider();
+add-buffer-to-favorites.label=Add Buffer to Favorites
+add-dir-to-favorites.label=Add Directory to Favorites
+edit-favorites.label=Edit Favorites
+#}}}
+
+#{{{ Current Directory menu
+current-directory.label=$Current Directory
+current-directory.code=new DirectoryProvider(null)
+#}}}
+
+#{{{ jEdit Home Directory menu
+jedit-directory.label=$jEdit Home Directory
+jedit-directory.code=new DirectoryProvider(jEdit.getJEditHome())
+#}}}
+
+#{{{ Settings Directory menu
+settings-directory.label=$Settings Directory
+settings-directory.code=settings = jEdit.getSettingsDirectory(); \
+ if(settings == null) settings = jEdit.getJEditHome(); \
+ new DirectoryProvider(settings);
+#}}}
+
+#{{{ BeanShell menu
+beanshell=eval \
+ eval-for-selected-lines \
+ eval-selection
+beanshell.label=B$eanShell
+eval.label=$Evaluate BeanShell Expression...
+eval-for-selected-lines.label=Evaluate $For Selected Lines...
+eval-selection.label=Evaluate $Selection
+#}}}
+
+#{{{ Troubleshooting menu
+troubleshooting=log-viewer \
+ update-log \
+ - \
+ io-progress-monitor \
+ task-monitor \
+ keyboard-tester \
+ memory-status \
+ reload-modes
+troubleshooting.label=$Troubleshooting
+log-viewer.label=$Activity Log
+update-log.label=$Update Activity Log on Disk
+io-progress-monitor.label=$I/O Progress
+task-monitor.label=$Task Monitor
+keyboard-tester.label=$Keyboard Tester...
+memory-status.label=$Memory Status...
+reload-modes.label=$Reload Edit Modes
+#}}}
+
+#{{{ Quick options menu
+quick-options=edit-syntax-style
+quick-options.label=$Quick settings
+edit-syntax-style.label=Edit syntax style of token under caret
+
+#}}}
+
+#}}}
+
+#{{{ Macros menu
+macros=record-macro \
+ stop-recording \
+ - \
+ last-macro \
+ - \
+ record-temp-macro \
+ run-temp-macro \
+ - \
+ run-other-macro \
+ rescan-macros \
+ -
+macros.code=new MacrosProvider();
+macros.label=Ma$cros
+record-macro.label=$Record Macro...
+record-macro.icon.small=16x16/actions/media-record.png
+stop-recording.label=$Stop Recording
+stop-recording.icon.small=16x16/actions/media-playback-stop.png
+last-macro.label=Repeat Last Macro
+record-temp-macro.label=Record $Temporary Macro
+run-temp-macro.label=Run Tem$porary Macro
+run-other-macro.label=Run $Other Macro...
+rescan-macros.label=Resca$n Macros
+no-macros.label=No Macros
+#}}}
+
+#{{{ Plugins menu
+plugins=plugin-manager plugin-options -
+plugins.label=$Plugins
+plugins.code=new PluginsProvider();
+plugin-manager.label=Plugin $Manager...
+plugin-options.label=Plugin $Options...
+no-plugins.label=No Plugins Installed
+#}}}
+
+#{{{ Help menu
+help-menu=about \
+ help \
+ tip-of-the-day
+help-menu.label=$Help
+about.label=$About jEdit...
+help.label=jEdit $Help
+tip-of-the-day.label=$Tip of the Day
+#}}}
+
+#}}}
+
+#{{{ Macro strings
+
+macro.temp.header=// This is a temporary macro. First, check over the\n\
+ // commands to make sure this is what you intended.\n\
+ // Then, to run this macro, switch to the buffer\n\
+ // where you would like to execute it and press C+m C+p.
+
+macro.header=// This is a recorded macro. First, check over the\n\
+ // commands to make sure this is what you intended. Then,\n\
+ // save this buffer, and the macro should appear in the\n\
+ // Macros menu.
+
+#}}}
+
+#{{{ Commands that don't appear in menus
+backspace-word.label=Delete Previous Word
+backspace-word-std.label=Delete Previous Word (Eat Whitespace)
+backspace-word-std-after.label=Delete Previous Word (Eat Whitespace after word)
+backspace.label=Delete Previous Character
+delete-word.label=Delete Next Word
+delete-word-std.label=Delete Next Word (Eat Whitespace)
+delete.label=Delete Next Character
+document-end.label=Go to End of Buffer
+document-home.label=Go to Start of Buffer
+end.label=End
+home.label=Home
+smart-end.label=Smart End
+smart-home.label=Smart Home
+insert-literal.label=Insert Next Character Literally
+insert-newline.label=Insert Newline
+insert-newline-indent.label=Insert Newline and Indent
+insert-tab.label=Insert Tab
+insert-tab-indent.label=Insert Tab and Indent
+line-end.label=Go to End of Line
+line-home.label=Go to Start of Line
+next-char.label=Go to Next Character
+next-line.label=Go to Next Line
+next-page.label=Go to Next Page
+next-paragraph.label=Go to Next Paragraph
+next-word.label=Go to Next Word
+next-word-std.label=Go to Next Word (Eat Whitespace)
+overwrite.label=Overwrite Mode
+prev-char.label=Go to Previous Character
+prev-line.label=Go to Previous Line
+prev-page.label=Go to Previous Page
+prev-paragraph.label=Go to Previous Paragraph
+prev-word.label=Go to Previous Word
+prev-word-std.label=Go to Previous Word (Eat Whitespace)
+prev-word-std-after.label=Go to Previous Word (Eat Whitespace after word)
+select-document-end.label=Select to End of Buffer
+select-document-home.label=Select to Start of Buffer
+select-end.label=Select to Smart End Position
+select-home.label=Select to Smart Home Position
+select-line-end.label=Select to End of Line
+select-line-home.label=Select to Start of Line
+select-next-char.label=Select Next Character
+select-next-line.label=Select Next Line
+select-next-page.label=Select Next Page
+select-next-paragraph.label=Select Next Paragraph
+select-next-word.label=Select Next Word
+select-next-word-std.label=Select Next Word (Eat Whitespace)
+select-prev-char.label=Select Previous Character
+select-prev-line.label=Select Previous Line
+select-prev-page.label=Select Previous Page
+select-prev-paragraph.label=Select Previous Paragraph
+select-prev-word.label=Select Previous Word
+select-prev-word-std.label=Select Previous Word (Eat Whitespace)
+select-prev-word-std-after.label=Select Previous Word (Eat Whitespace after word)
+select-visible-end.label=Select to Last Visible Line
+select-visible-home.label=Select to First Visible Line
+select-whitespace-end.label=Select to End of White Space
+select-whitespace-home.label=Select to Start of White Space
+toggle-line-separator.label=Toggle Line Separator
+toggle-word-wrap.label=Toggle Word Wrap
+visible-end.label=Go to Last Visible Line
+visible-home.label=Go to First Visible Line
+whitespace-end.label=Go to End of White Space
+whitespace-home.label=Go to Start of White Space
+#}}}
+
+#{{{ View stuff
+
+# Title
+view.title=jEdit -\
+view.title.dirty=\ (modified)
+
+view.docking.close-tooltip=Hides the current docked window
+view.docking.menu-tooltip=Docking options
+view.docking.menu-floating=Float
+view.docking.menu-top=Dock at Top
+view.docking.menu-left=Dock at Left
+view.docking.menu-bottom=Dock at Bottom
+view.docking.menu-right=Dock at Right
+view.docking.menu-clone=New Floating Instance
+view.docking.menu-close=Close
+view.docking.menu-undock=Undock
+
+view.docking.toggle.label={0} (Toggle)
+view.docking.float.label={0} (New Floating Instance)
+
+directory.not-local=Cannot list directories on remote filesystems
+directory.no-files=No Files
+
+#{{{ Gutter highlight
+view.gutter.marker.no-name=Marker
+view.gutter.marker=Marker: {0}
+#}}}
+
+#{{{ Status messages
+view.status.add-marker=Shortcut for new marker? [{0}]
+view.status.auto-wrap=Search string not found; wrapping around!
+view.status.bracket=Matches line {0}: {1}
+view.status.caret-tooltip=Offset, line and column number (offset,line,column[-virtual] relative%)
+view.status.copy-append-string-register=Register name to copy append to? [{0}]
+view.status.copy-string-register=Register to copy to? [{0}]
+view.status.cut-append-string-register=Register to cut append to? [{0}]
+view.status.cut-string-register=Register to cut to? [{0}]
+view.status.expand-folds=Fold level? [1-9]
+view.status.goto-marker=Shortcut of marker to go to? [{0}]
+view.status.incomplete-abbrev={0} parameter(s) specified, but {1} required!
+view.status.insert-literal=Key to insert literally?
+view.status.io-1=I/O: 1 operation in progress
+view.status.io.done=Input/output complete
+view.status.io=I/O: {0} operations in progress
+view.status.linesep-changed=Line separator set to {0}
+view.status.linesep-tooltip=Line separator (click to change)
+view.status.memory-tooltip=Java heap memory: {0}Kb/{1}Kb
+view.status.mode-tooltip=Current edit mode, fold mode, and encoding
+view.status.multi-changed=Multiple selection mode is {0,choice,0#off|1#on}
+view.status.multi-tooltip=Multiple selection mode (click to change)
+view.status.narrow=Invoke "Expand All Folds" to make all text visible again
+view.status.no-markers=no markers set
+view.status.no-registers=no registers defined
+view.status.overwrite-changed=Overwrite mode is {0,choice,0#off|1#on}
+view.status.overwrite-tooltip=Overwrite/insert mode indicator (click to change)
+view.status.paste-string-register=Register to paste from? [{0}]
+view.status.print=Printing page {0}
+view.status.quick-copy=Quick copy mode - marked text will replace selection
+view.status.recording=Macro recording
+view.status.rect-select-changed=Rectangular selection is {0,choice,0#off|1#on}
+view.status.rect-tooltip=Rectangular selection mode (click to change)
+view.status.replace-all=Replaced {0} occurrence(s) in {1} file(s)
+view.status.search-not-found=Search string not found!
+view.status.select-marker=Shortcut of marker to select to? [{0}]
+view.status.swap-marker=Shortcut of marker to swap caret position with? \
+ [{0}]
+view.status.vertical-paste-string-register=Register to vertical paste \
+ from? [{0}]
+view.status.wrap-changed=Word wrap mode is now "{0}"
+view.status.wrap-tooltip=<html>Word wrap mode is {0} (click to change)</html>
+view.status.bufferset-tooltip=BufferSet scope is {0}
+wrap.none=disabled
+wrap.hard=hard
+wrap.soft=soft
+#}}}
+
+#{{{ Status bar component visibility
+view.status=( mode , fold , encoding ) wrap multiSelect rectSelect overwrite lineSep buffersets memory-status errors clock
+
+view.status.show-caret-status=true
+#}}}
+
+#}}}
+
+#{{{ Printing
+
+print.headerText=jEdit - {0}
+print.footerText={0} :: page {1}
+
+print-error.title=Print Error
+print-error.message=An error occurred while trying to print:\n\
+ {0}
+#}}}
+
+#{{{ Various dialog boxes
+
+#{{{ About dialog
+about.title=About jEdit
+about.version=jEdit {0} {1} mode, using {2} Java {3}
+about.mode.standalone=standalone
+about.mode.server=server
+about.mode.server-background=server-background
+about.navigate=Press arrow keys to navigate about text
+
+# This text scrolls by in the about dialog box.
+# Hack: Since StringTokenizer treats two consequent \n as one token, we
+# insert a space by itself in the text to create blank lines.
+about.text=jEdit is brought to you by\n\
+ \n\
+ Slava Pestov\n\
+ Aaron Bell\n\
+ Adam Sawicki\n\
+ Adrian Baker\n\
+ Alan Ezust\n\
+ Alessandro Falappa\n\
+ Alex Levin\n\
+ Alexander Maryanovsky\n\
+ Alfonso Garcia\n\
+ Alwyn Barry\n\
+ Amedeo Farello\n\
+ Andre Kaplan\n\
+ Andrey Khalyavin\n\
+ Anthony Roy\n\
+ Artur Biesiadowski\n\
+ Aziz Sharif\n\
+ Barry Carr\n\
+ Beau Tateyama\n\
+ Ben Glazer\n\
+ Ben Sarsgard\n\
+ Ben Williams\n\
+ Bernhard Walle\n\
+ Bertalan Fodor\n\
+ Bill McMilleon\n\
+ Bj\u00f6rn "Vampire" Kautler\n\
+ Brad Mace\n\
+ Brant Langer Gurganus\n\
+ Brett Smith\n\
+ Bruno Tatibouet\n\
+ Calvin Yu\n\
+ Carlos Quiroz\n\
+ Carmine Lucarelli\n\
+ Chris Grindstaff\n\
+ Chris Kent\n\
+ Chris Petersen\n\
+ Chris Scott\n\
+ Christoph Daniel Schulze\n\
+ Claude Eisenhut\n\
+ Cullen Linn\n\
+ Dakshinamurthy Karra\n\
+ Dale Anson\n\
+ Daniel Hahler\n\
+ Daniel Johnson\n\
+ Danny Dig\n\
+ Dante Fabrizio\n\
+ David Askew\n\
+ David Moss\n\
+ David Taylor\n\
+ Denis Lambot\n\
+ Dirk Moebius\n\
+ Dominic Stolerman\n\
+ Dusty Phillips\n\
+ Ed Stewart\n\
+ Eric Benoit\n\
+ Eric Berry\n\
+ Eric Ladner\n\
+ Fan Ho Yin\n\
+ Francesc Roses\n\
+ George Hovey\n\
+ George Latkiewicz\n\
+ Gerd Knops\n\
+ Gili Tzabari\n\
+ Giulio Piancastelli\n\
+ Greg Cooper\n\
+ Greg Merrill\n\
+ Horst Eff\n\
+ Ian Maclean\n\
+ Igor Lesik\n\
+ Israel Olalla\n\
+ Jakub Rozto\u010dil\n\
+ Jamie LaScolea\n\
+ Jason Ginchereau\n\
+ Jean-Francois Larvoire\n\
+ Jeffrey Hoyt\n\
+ Jeff Robertson\n\
+ Jerry McBride\n\
+ Jiger Patel\n\
+ Jim Lawton\n\
+ Jim Morris\n\
+ Jim Wissner\n\
+ J\u00f6rg Spieler\n\
+ John Gellene\n\
+ John Perry\n\
+ Jonathan Revusky\n\
+ Jorg Winter\n\
+ Joseph Erickson\n\
+ Joseph Schroer\n\
+ Juha Lindfors\n\
+ Justin Dieters\n\
+ Justin Hagstrom\n\
+ Kasper Graversen\n\
+ Kazutoshi Satoda\n\
+ Kenrick Drew\n\
+ Kevin Burton\n\
+ Kevin Hunter\n\
+ Kevin McWhirter\n\
+ Ken Gentry\n\
+ Ken Turner\n\
+ Klaus Hartlage\n\
+ Konstantin Pribluda\n\
+ Krassimir Berov\n\
+ Kris Kopicki\n\
+ Kristian Ovaska\n\
+ Krzysztof Krzyzaniak\n\
+ Lionel Fiol\n\
+ Magnus Henriksson\n\
+ Maik Schreiber\n\
+ Marc Rummel\n\
+ Marcelo Vanzin\n\
+ Marcio Marchini\n\
+ Marco Hunsicker\n\
+ Marco Gotze\n\
+ Marcus Jonason\n\
+ Martin Raspe\n\
+ Matija Kejzar\n\
+ Matt Albrecht\n\
+ Matt Price\n\
+ Matthew Flower\n\
+ Matthew Payne\n\
+ Matthew Price\n\
+ Matthias Schneider\n\
+ Matthieu Casanova\n\
+ Michael Jacobson\n\
+ Michael Taft\n\
+ Michael Schlotter\n\
+ Mike Dillon\n\
+ Mike Gorski\n\
+ Mike Hansen\n\
+ Mirco Bova\n\
+ Nahuel Foronda\n\
+ Neil Bertram\n\
+ Nicholas O'Leary\n\
+ Nils Krahnstoever\n\
+ Nils Nordman\n\
+ Nitsan Vardi\n\
+ Ollie Rutherfurd\n\
+ Orhan Alkan\n\
+ Patrick Tingen\n\
+ Paul Libbrecht\n\
+ Peter Cox\n\
+ Peter Graves\n\
+ Philipp Janda\n\
+ Phillip Mateescu\n\
+ Ralf Engels\n\
+ Randolf Mock\n\
+ Randy Hudson\n\
+ Rex Young\n\
+ Richard Ashwell\n\
+ Richard Beton\n\
+ Rick Gibbs\n\
+ Rick Owen\n\
+ Rob Watson\n\
+ Robert McKinnon\n\
+ Robert Schwenn\n\
+ Robert Swarr\n\
+ Romain Guy\n\
+ Rudolf Widmann\n\
+ Ryan Fowler\n\
+ Ryan Grove\n\
+ Saimon Moore\n\
+ Satguru Srivastava\n\
+ Scott Allen\n\
+ Scott Willy\n\
+ Scott Wyatt\n\
+ Sebastien Pierre\n\
+ Seph Soliman\n\
+ Sergey Udaltsov\n\
+ Shlomy Reinstein\n\
+ Silas Smith\n\
+ Stefan Kost\n\
+ Stefano Maestri\n\
+ Stephen Bartlett\n\
+ Steve Jakob\n\
+ Stuart Barlow\n\
+ Tal Davidson\n\
+ Thomas Alspaugh\n\
+ Thomas Bock\n\
+ Thomas Dilts\n\
+ Thomas Galvin\n\
+ Todd Papaioannou\n\
+ Tom Copeland\n\
+ Tom Locke\n\
+ Trevor Harmon\n\
+ Vicente Salvador\n\
+ Vinod Kiran\n\
+ Will Sargent\n\
+ Will Varfar\n\
+ Wiktor Adamski\n\
+ Wojciech Stryjewski\n\
+ Wolfgang Chico-T\u00f6pfer\n\
+ \n\
+ I'd also like to thank the users for their\n\
+ comments, feedback and bug reports.
+#}}}
+
+#{{{ Error list dialog, used to report I/O and plugin load errors
+error-list.plugin-manager=Plugin Manager
+#}}}
+
+#{{{ I/O error dialog box
+ioerror.title=I/O Error
+ioerror.caption=The following {0} I/O operations could not be completed:
+ioerror.caption-1=The following I/O operation could not be completed:
+
+ioerror={0}
+ioerror.directory-error=Cannot list directory: {0}
+ioerror.directory-error-nomsg=Cannot list directory.
+ioerror.encoding-error=The file could not be loaded correctly (some data might be lost) with\n\
+ the encoding "{0}".\n\
+ ({1})\n\
+ Try selecting a different encoding.\n\
+ It can be selected with the menu File->Reload with Encoding.\n\
+ If you want it to be done automatically, add the candidates into\n\
+ "List of fallback encodings" in Encodings pane of Global Options.
+ioerror.write-encoding-error=Failed to encode the character\n\
+ {3} at column {2} in line {1} with the encoding "{0}".
+ioerror.read-error=Cannot load: {0}
+ioerror.write-error=Cannot save: {0}
+ioerror.unsupported-encoding-error={0} charset is not supported by your JVM
+ioerror.open-directory=Cannot open directory as a buffer.
+ioerror.save-directory=Cannot save buffer over a directory.
+ioerror.no-read=Insufficent permissions to load file.
+ioerror.no-write=Insufficent permissions to save file.
+ioerror.write-error-readonly=Unable to save, the file is readonly.
+ioerror.save-readonly-twostagefail=Unable to save, the file is readonly and it two stage save is impossible.
+ioerror.badurl=Malformed URL: {0}
+ioerror.delete-error=Cannot delete file.
+ioerror.rename-exists=Cannot overwrite existing file {0}.
+ioerror.rename-error=Cannot rename to {0}.
+ioerror.mkdir-error=Cannot create directory.
+
+vfs.not-supported.list=Directories on the "{0}" filesystem cannot be browsed.
+vfs.not-supported.load=Files on the "{0}" filesystem cannot be opened.
+vfs.not-supported.save=Files cannot be saved to the "{0}" filesystem.
+
+vfs.overwrite-readonly.title=File is readonly
+vfs.overwrite-readonly.message=The file {0} is readonly.\n\
+ Would you like to save it anyway, resetting the readonly flag\n\
+ it will use two stage save (resets file owner on Unix)
+
+vfs.twostageimpossible.title=Two stage save cannot be used
+vfs.twostageimpossible.message=Two stage save cannot be used, do you want to\n\
+ save anyway ?
+
+out-of-memory-error=There was insufficent Java heap memory to complete\n\
+ this request. Try increasing the maximum heap size.\n\
+ \n\
+ Documentation on changing the Java heap size can be found in\n\
+ the "Buffers" section of the "jEdit Basics" chapter of the\n\
+ user guide.
+#}}}
+
+#{{{ Old I/O error dialog boxes
+ioerror.message=An I/O error occurred ({0})
+
+read-error.title=Read Error
+# {0} - the path name {1} - the error message
+read-error.message=The file {0}\n\
+ could not be loaded due to an I/O error.\n\
+ ({1})
+
+write-error.title=Write Error
+# {0} - the path name {1} - the error message
+write-error.message=The file {0}\n\
+ could not be saved due to an I/O error.\n\
+ ({1})
+
+directory-error.title=Directory Error
+# {0} - the path name {1} - the error message
+directory-error.message=The directory {0}\n\
+ could not be listed due to an I/O error.\n\
+ ({1})
+
+directory-error-nomsg.title=Directory Error
+# {0} - the path name
+directory-error-nomsg.message=The directory {0}\n\
+ could not be listed due to an I/O error.
+
+encoding-error.title=Incompatible Encoding
+encoding-error.message=The file {0}\n\
+ could not be loaded with the "{1}" encoding.\n\
+ ({2})\n\
+ \n\
+ To use a different encoding, try the commands in the\n\
+ File->Open With Encoding menu.\n\
+ \n\
+ If you are really stuck and do not know which encoding\n\
+ to use, try "ASCII" or "8859_1".
+
+open-directory.title=Cannot Open Directory
+open-directory.message={0} is a directory.\n\
+ Directories cannot be opened for editing.
+
+save-directory.title=Cannot Save Directory
+save-directory.message={0} is a directory.\n\
+ Buffers cannot be saved over directories.
+
+no-read.title=Cannot Open File
+no-read.message=Cannot read from {0}.\n\
+ This probably means you have insufficent permissions.
+
+no-write.title=Cannot Save File
+no-write.message=Cannot save to {0}.\n\
+ This probably means you have insufficent permissions.
+
+badurl.title=Invalid URL
+# {0} - the URL
+# {1} - the error
+badurl.message=The following URL is invalid: {0}\n\
+ ({1})
+#}}}
+
+#{{{ Go to line dialog
+goto-line.title=Go To Line
+goto-line.message=Go to line:
+#}}}
+
+#{{{ Word count dialog
+wordcount.title=Word Count
+# {0} - characters
+# {1} - words
+# {2} - lines
+wordcount.message=Characters: {0}\nWords: {1}\nLines: {2}
+#}}}
+
+#{{{ Set marker dialog
+setmarker.title=Set Marker
+setmarker.message=Marker name:
+#}}}
+
+#{{{ File not saved dialog
+notsaved.title=File Not Saved
+# {0} - file name
+notsaved.message=Save changes to {0}?
+#}}}
+
+#{{{ File changed, still reload dialog
+changedreload.title=File Modified
+changedreload.message=The file {0}\n\
+ has been modified since last save; if you reload,\n\
+ the changes will be lost. Continue?
+#}}}
+
+#{{{ Autosave file exists dialog
+autosave-found.title=Autosave File Found
+# {0} - autosave file name
+autosave-found.message=An autosave file {0}\n\
+ was found! This probably means that jEdit crashed before you could\n\
+ save. Would you like to open the autosave file?
+
+autosave-loaded.title=Autosave File Loaded
+autosave-loaded.message=The autosave file {0}\n\
+ has been loaded. You should now check if it contains your unsaved\n\
+ data. If you would like to keep the autosaved changes, save the file.\n\
+ If you would like to discard them, select File->Reload.
+#}}}
+
+#{{{ Save all confirm dialog
+saveall.title=Save All Buffers
+saveall.message=Are you sure you want to save all modified buffers?
+#}}}
+
+#{{{ Reload all confirm dialog
+reload-all.title=Reload All Buffers
+reload-all.message=Are you sure you want to reload all buffers from disk?\n\
+ Unsaved changes in any open buffers WILL BE LOST!
+#}}}
+
+#{{{ Encoding prompt
+encoding-prompt.title=Open With Other Encoding
+encoding-prompt.message=Character encoding to use:
+#}}}
+
+#{{{ Macro recording already in progress dialog
+already-recording.title=Already Recording
+already-recording.message=A macro recording is already in progress.
+#}}}
+
+#{{{ No temporary macro dialog
+no-temp-macro.title=No Temporary Macro
+no-temp-macro.message=No temporary macro has been recorded.
+#}}}
+
+#{{{ Record macro dialog
+record.title=Record Macro
+record.message=Macro name:
+#}}}
+
+#{{{ Some features don't work with -nosettings dialog
+no-settings.title=Feature Disabled
+no-settings.message=jEdit was started with the -nosettings switch.\n\
+ To use this feature, you must start jEdit without that switch.
+#}}}
+
+#{{{ Some features don't work with the web start version
+no-webstart.title=Feature Disabled
+no-webstart.message=This feature is not available in the WebStart version\n\
+ of jEdit.
+#}}}
+
+#{{{ Search and replace dialog
+search.title=Search And Replace
+
+search.find=Search for:
+search.find.tooltip=PgUp/PgDown or right-click to recall previous
+search.find.mnemonic=s
+search.replace=Replace with:
+search.replace.mnemonic=w
+search.string-replace-btn=Text
+search.beanshell-replace-btn=Return value of a BeanShell snippet
+
+search.settings=Settings:
+search.keep=Keep dialog
+search.keep.mnemonic=k
+search.case=Ignore case
+search.case.mnemonic=i
+search.regexp=Regular expressions
+search.regexp.mnemonic=x
+search.hypersearch=HyperSearch
+search.hypersearch.mnemonic=h
+search.wrap=Auto wrap
+search.wrap.mnemonic=t
+
+search.direction=Direction:
+search.back=Backward
+search.back.mnemonic=b
+search.forward=Forward
+search.forward.mnemonic=o
+
+search.fileset=Search in:
+search.selection=Selection
+search.selection.mnemonic=n
+search.current=Current buffer
+search.current.mnemonic=c
+search.all=All buffers
+search.all.mnemonic=l
+search.directory=Directory:
+search.directory.mnemonic=d
+search.skipHidden=Skip hiddens/backups
+search.skipBinary=Skip binary files
+search.skipHidden.mnemonic=h
+search.skipBinary.mnemonic=b
+
+search.directoryField=Directory:
+search.directoryField.mnemonic=y
+search.filterField=Filter:
+search.filterField.mnemonic=f
+glob.tooltip={*.c,*.h} for multiple extensions
+search.subdirs=Search subdirectories
+search.subdirs.mnemonic=u
+search.choose=Choose...
+search.choose.mnemonic=e
+search.synchronize=Synchronize
+search.synchronize.mnemonic=z
+search.synchronize.tooltip=Sets filter and directory to current buffer's extension/location.
+search.findBtn=Find
+search.findBtn.mnemonic=f
+search.replaceBtn=Replace
+search.replaceAndFindBtn=Replace & Find
+search.replaceAndFindBtn.mnemonic=r
+search.replaceAllBtn=Replace All
+search.replaceAllBtn.mnemonic=a
+
+# Beep when searching automatically wraps?
+search.beepOnSearchAutoWrap=false
+#}}}
+
+#{{{ Keep searching dialog
+keepsearching.title=No More Matches Found
+keepsearching.message=No more matches were found. Continue search from\n\
+ {0,choice,0#beginning|1#end}?
+#}}}
+
+#{{{ HyperSearch results dialog
+hypersearch-results.title=HyperSearch Results
+hypersearch-results.result-caption={0} ({1,choice,1#1 occurrence|1<{1,number,integer} occurrences in '{2,choice,1#1 file|1<{2,number,integer} files}'})
+hypersearch-results.open=Open
+hypersearch-results.open-view=Open in New View
+hypersearch-results.open-plain-view=Open in New Plain View
+hypersearch-results.open-split=Open in New Split
+hypersearch-results.remove-node=Remove Node
+hypersearch-results.new-search=New Search From Here
+hypersearch-results.expand-child-nodes=Expand Child Nodes
+hypersearch-results.collapse-child-nodes=Collapse Child Nodes
+hypersearch-results.copy-to-clipboard=Copy to clipboard
+hypersearch-results.redo=Redo HyperSearch
+hypersearch-results.tree-view=Toggle Tree View
+hypersearch-results.clear.label=Remove All Nodes
+hypersearch-results.clear.icon=22x22/actions/edit-clear.png
+hypersearch-results.stop.label=Stop HyperSearch and show current results
+hypersearch-results.stop.icon=22x22/actions/process-stop.png
+hypersearch-results.multi.label=Toggle Multiple Results
+hypersearch-results.multi.multiple.icon=22x22/actions/edit-find-multiple.png
+hypersearch-results.multi.single.icon=22x22/actions/edit-find-single.png
+hypersearch-results.highlight.label=Set Match Highlight Style
+hypersearch-results.match.highlight.icon=22x22/actions/edit-find-highlight-match.png
+hypersearch-results.match.normal.icon=22x22/actions/edit-find-normal-match.png
+hypersearch-results.file-caption={0} ({1,choice,1#1 occurrence|1<{1,number,integer} occurrences in '{2,choice,1#1 line|1<{2,number,integer} lines}'})
+hypersearch-results.searching=Searching for "{0}"...
+hypersearch-results.no-results=No results found for "{0}".
+hypersearch-results.done=Results for "{0}":
+
+hypersearch-status=Searching
+#}}}
+
+#{{{ HyperSearch too many results
+hypersearch.tooManyResults.label=Too many results
+hypersearch.tooManyResults.title=Too many results
+hypersearch.tooManyResults.message=The search you asked returned {0} \
+ results and is not yet finished. Do you want to stop it ?
+#}}}
+
+
+#{{{ Search and replace error dialog
+searcherror.title=Search and Replace Error
+# {0} - error message
+searcherror.message=An error occurred while performing this operation.
+#}}}
+
+#{{{ Search and replace error dialog
+searcherror-bsh.title=Search and Replace Error
+# {0} - error message
+searcherror-bsh.message=An error occurred while performing this operation.\n\
+ \n\
+ Make sure the replace mode is set to "Text" if you did not intend\n\
+ the replace string to be interpreted as a BeanShell expression.
+#}}}
+
+#{{{ Empty fileset error dialog
+empty-fileset.title=Empty File Set
+empty-fileset.message=The specified search file set contains no files.\n\
+ Please ensure that the file name filter and directory to search\n\
+ (if applicable) are set correctly.
+#}}}
+
+#{{{ Can only search local directories dialog
+remote-dir-search.title=Non-Local Directory Chosen
+remote-dir-search.message=You have elected to search a non-local directory.\n\
+ This can be very slow due to network latency and so on.\n\
+ Are you sure you want to continue?
+#}}}
+
+#{{{ "Search in selection" active but nothing selected in text area
+search-no-selection.title=Nothing Selected
+search-no-selection.message=Please select some text or deactivate the\n\
+ "search in selection" option first.
+#}}}
+
+#{{{ Paste previous and paste deleted dialogs
+paste-from-list.whitespace=<whitespace>
+paste-previous.title=Paste Previous
+paste-previous.caption=Recently copied and pasted text:
+paste-deleted.title=Paste Deleted
+paste-deleted.caption=Recently deleted text:
+#}}}
+
+#{{{ File changed on disk dialog
+filechanged-save.title=File Changed on Disk
+filechanged-save.message=The file {0}\n\
+ has been modified on disk by another program. Are you sure\n\
+ you want to continue saving it?
+#}}}
+
+#{{{ File exists dialog
+fileexists.title=File Exists
+fileexists.message=The file {0} already exists. Are you sure you want\n\
+ to overwrite it?
+#}}}
+
+#{{{ Select line range dialog
+selectlinerange.title=Select Line Range
+selectlinerange.caption=Select line range:
+selectlinerange.start=Start line:
+selectlinerange.end=End line:
+#}}}
+
+#{{{ View registers dialog
+view-registers.title=Registers
+view-registers.caption=Register:
+view-registers.clipboard=$ (clipboard)
+view-registers.selection=% (selection)
+view-registers.none=No registers defined
+view-registers.register=Register:
+view-registers.contents=Contents:
+view-registers.undefined=__UNDEFINED__
+#}}}
+
+#{{{ Close all buffers dialog
+close.title=Unsaved Changes
+close.caption=The following buffers have unsaved changes:
+close.selectAll=Select All
+close.selectAll.mnemonic=a
+close.save=Save Selected
+close.save.mnemonic=s
+close.discard=Discard Selected
+close.discard.mnemonic=d
+#}}}
+
+#{{{ Files changed on disk dialog
+files-changed.title=Files Changed on Disk
+files-changed.caption=The following files were changed on disk by another program:
+files-changed.deleted=Deleted on disk; save to recreate:
+files-changed.changed-auto=Automatically reloaded:
+files-changed.changed=Changed on disk:
+files-changed.changed-dirty-auto=Buffer dirty; not reloaded:
+files-changed.changed-dirty=Buffer dirty, and file changed on disk:
+files-changed.select-all=Select All
+files-changed.select-all.mnemonic=a
+files-changed.reload=Reload
+files-changed.reload.mnemonic=r
+files-changed.ignore=Ignore
+files-changed.ignore.mnemonic=i
+#}}}
+
+#{{{ Abbrev dialogs
+add-abbrev.title=Add Abbreviation
+add-abbrev.mode=Add mode-specific
+add-abbrev.global=Add global
+
+edit-abbrev.title=Edit Abbreviation
+
+edit-abbrev.duplicate.title=Duplicate Abbreviation
+edit-abbrev.duplicate.message=\
+ Another expansion already exists with this abbreviation.\n\
+ \n\
+ Do you want to override the existing expansion?
+
+abbrev-editor.abbrev=Abbreviation:
+abbrev-editor.before=Text to insert before caret:
+abbrev-editor.after=Text to insert after caret:
+#}}}
+
+#{{{ XMode errors
+xmode-error.title=XML Parse Error
+# {2} is the column number, but it's not too useful so we don't show it
+xmode-error.message=An error occurred while parsing {0}, line {1}:\n\
+ {3}
+xmode-error.dtd=The DTD could not be loaded\n({0})
+xmode-error.termchar-invalid=The value of the AT_CHAR attribute is invalid ({0})
+xmode-error.doctype-invalid=Expected a document type of MODE, found {0}
+xmode-error.empty-tag=The {0} tag cannot be empty
+xmode-error.token-invalid=The token type {0} is invalid
+xmode-error.empty-keyword=The keyword text cannot be empty
+xmode-error.regexp=Invalid regular expression\n({0})
+xmode-error.hash-char-and-hash-chars-mutually-exclusive=HASH_CHAR and HASH_CHARS may not be specified both
+xmode-error.delegate-invalid=Invalid delegate: {0}
+#}}}
+
+#{{{ JARClassLoader errors
+plugin-error.title=Plugin Error
+plugin-error.caption=The following plugins could not be loaded:
+plugin-error.caption-1=The following plugin could not be loaded:
+
+plugin-error.load-error=Cannot load: {0}\n\
+ The most likely reason is that the JAR file is corrupt; try\n\
+ reinstalling it. See Utilities->Troubleshooting->Activity Log\n\
+ for a full stack trace.
+plugin-error.start-error=Cannot start: {0}\n\
+ Try updating to a newer version of the plugin.
+plugin-error.already-loaded=Two copies installed. Please remove one of the \
+ two copies.
+plugin-error.dep-jdk=Requires Java {0} or later, but you only have version {1}.
+plugin-error.dep-jedit=Requires jEdit {0} or later, but you only have version {1}.\n\
+ Download new jEdit versions from <http://www.jedit.org>.
+plugin-error.dep-plugin.no-version=Requires version {0} \
+ or later of {1},\n\
+ but {1} is not installed.
+plugin-error.dep-plugin.broken=Requires {0}, but {0}\n\
+ could not be loaded.
+plugin-error.dep-plugin=Requires version {0} or later of {1}, \
+ but you only have {1} version {2}.
+plugin-error.dep-class=Requires the class {0}.\n\
+ Try installing the appropriate plugin or class library.
+plugin-error.missing-jar=Requires JAR file {0}.\n\
+ This JAR file is part of this plugin, but it cannot be found.\n\
+ Try reinstalling this plugin.
+plugin-error.not-42=This plugin does not support dynamic loading.\n\
+ You must restart jEdit after removing or installing this plugin.
+
+plugin-error-download.title=Plugin error
+plugin-error-download.message=Error while downloading the plugin, please try another mirror\n{0}
+#}}}
+
+#{{{ Macro dialogs
+macro-input.title=Macro Input
+macro-error.title=Macro Error
+macro-message.title=Macro Message
+macro-confirm.title=Macro Confirmation
+#}}}
+
+#{{{ BeanShell stuff
+beanshell-error.title=BeanShell Error
+beanshell-error.message=A BeanShell error occurred.
+
+beanshell-eval-input.title=Evaluate BeanShell Expression
+beanshell-eval-input.message=BeanShell expression:\n\
+ \n\
+ Variables:\n\
+ view - The current view instance\n\
+ editPane - The current edit pane instance\n\
+ textArea - The current text area instance\n\
+ buffer - The current buffer
+
+beanshell-eval.title=BeanShell Evaluation
+beanshell-eval.message={0}
+
+beanshell-eval-line.title=Evaluate BeanShell Expression
+beanshell-eval-line.message=BeanShell expression to evaluate for each \
+ selected line:\n\
+ \n\
+ Variables:\n\
+ line - The index of the line, from the start of the buffer\n\
+ index - The index of the line, from the start of the selection\n\
+ text - The text of the line\n\
+ view - The current view instance\n\
+ editPane - The current edit pane instance\n\
+ textArea - The current text area instance\n\
+ buffer - The current buffer
+#}}}
+
+#{{{ Macro not recording dialog
+macro-not-recording.title=Not Recording
+macro-not-recording.message=A macro is not currently being recorded.
+#}}}
+
+#{{{ Large repeat count warning
+large-repeat-count.title=Large Repeat Count
+large-repeat-count.message=Are you sure you want to invoke "{0}" {1} times?
+
+large-repeat-count.user-input.title=Large Repeat Count
+large-repeat-count.user-input.message=Are you sure you want to insert "{0}" \
+ {1} times?
+#}}}
+
+#{{{ Wrong fold mode dialog
+folding-not-explicit.title=Wrong Fold Mode
+folding-not-explicit.message=This command can only be used in explicit fold mode.
+#}}}
+
+#{{{ Memory status dialog box
+memory-status.title=Java Heap Memory
+memory-status.gc=Garbage collection released {0} Kb.
+memory-status.use={0} Kb used, {1} Kb total
+#}}}
+
+#{{{ Multiple I/O request errors
+buffer-multiple-io.title=I/O Error
+buffer-multiple-io.message=Each buffer can only execute one input/output\n\
+ operation at a time. Please wait until the current\n\
+ operation finishes (or abort it in the I/O progress monitor)\n\
+ before starting another one.
+
+browser-multiple-io.title=I/O Error
+browser-multiple-io.message=Each file system browser can only execute one input/output\n\
+ operation at a time. Please wait until the current operation\n\
+ finishes (or abort it in the I/O progress monitor) before starting\n\
+ another one.
+#}}}
+
+#{{{ maxLineLen=0 warning
+format-maxlinelen.title=Wrap Margin
+format-maxlinelen.message=The wrap margin must be set to a non-zero value\n\
+ for this command to work.
+#}}}
+
+#{{{ Text under caret does not have a syntax style (token type)
+syntax-style-no-token.title=Syntax Style Configuration
+syntax-style-no-token.message=The text under the caret has no associated \
+ syntax style to configure.
+#}}}
+
+#{{{ View title dialog
+view.title.select=Please enter a title for this view:
+#}}}
+#}}}
+
+#{{{ Buffer options dialog
+buffer-options.title=Buffer Options
+buffer-options.caption=This dialog box changes settings for the current buffer\n\
+ only. To change the default settings for an edit mode, see\n\
+ the Utilities->Global Options->Editing dialog.
+buffer-options.loading-saving=Loading and Saving
+buffer-options.lineSeparator=Line separator:
+buffer-options.encoding=Character encoding:
+buffer-options.gzipped=GZIP (compress) file on disk
+buffer-options.editing=Editing
+buffer-options.mode=Edit mode:
+#}}}
+
+#{{{ Global options dialog
+options.title=Options
+options.title-template={0}: {1}
+options.jedit.label=jEdit
+
+# Option pane to show by default
+options.last=editing
+
+#{{{ General pane
+options.general.label=General
+options.general.code=new GeneralOptionPane();
+options.general.lineSeparator=Default line separator:
+options.general.encoding=Default character encoding:
+options.general.encodingAutodetect=Auto-detect file encoding when possible
+options.general.checkModStatus=If open files are changed on disk:
+options.general.checkModStatus.nothing=do nothing
+options.general.checkModStatus.prompt=prompt
+options.general.checkModStatus.reload=automatically reload and notify user
+options.general.checkModStatus.silentReload=autoreload without notification
+options.general.checkModStatusUpon=Check for file change upon:
+options.general.checkModStatusUpon.focus=application focus
+options.general.checkModStatusUpon.all=application focus, visiting the buffer or saving any buffer
+options.general.checkModStatusUpon.operations=visiting the buffer or saving any buffer
+options.general.checkModStatusUpon.focusBuffer=visiting or saving the buffer
+options.general.checkModStatusUpon.none=saving the buffer
+options.general.recentFiles=Recent files to remember:
+options.general.hypersearch.maxWarningResults=Max Hypersearch Results:
+options.general.sortRecent=Sort recent file list
+options.general.saveCaret=Save caret positions in recent file list
+options.general.persistentMarkers=Save marker positions
+options.general.resetUndo=Reset undo history on save
+options.general.restore=Restore previously open files on startup
+options.general.restore.remote=... including remote files over VFS
+options.general.restore.cli=... including file names specified on the command line
+options.general.encodingDetectors=List of encoding autodetectors:
+options.general.fallbackEncodings=List of fallback encodings:
+options.general.fallbackEncodings.tooltip=A whitespace-separated list of encodings to try against encoding errors on loading
+#}}}
+
+#{{{ Abbreviations pane
+options.abbrevs.label=Abbreviations
+options.abbrevs.code=new AbbrevsOptionPane();
+options.abbrevs.set=Abbrev set:
+options.abbrevs.expandOnInput=Space bar expands abbrevs
+options.abbrevs.abbrev=Abbrev
+options.abbrevs.expand=Expansion
+options.abbrevs.add=Add...
+options.abbrevs.edit=Edit...
+options.abbrevs.remove=Remove
+options.abbrevs.add.icon=22x22/actions/list-add.png
+options.abbrevs.edit.icon=22x22/actions/document-properties.png
+options.abbrevs.remove.icon=22x22/actions/list-remove.png
+#}}}
+
+#{{{ Appearance pane
+options.appearance.label=Appearance
+options.appearance.code=new AppearanceOptionPane();
+options.appearance.iconTheme=Icon Theme:
+options.appearance.fonts.antialias=Anti-alias Non-TextArea fonts
+options.appearance.lf.note=Restart jEdit for look & feel changes to take effect
+options.appearance.lf=Swing look & feel:
+options.appearance.primaryFont=Button, menu and label font:
+options.appearance.secondaryFont=List and text field font:
+options.appearance.helpViewerFont=HelpViewer/Browser Text font:
+options.appearance.history=History text field entries to remember:
+options.appearance.menuSpillover=Number of items before menus spill over:
+options.appearance.startup.label=Startup options
+options.appearance.showSplash=Show splash screen on startup
+options.appearance.showTips=Show tips on startup
+options.appearance.experimental.label=Experimental options
+options.appearance.experimental.caption=The below three options might not work \
+ correctly with some\n\
+ Java versions. If you experience problems, switch them off.
+
+options.appearance.textColors=Use jEdit text area colors in all text \
+ components
+options.appearance.decorateFrames=Draw window borders using Swing look & feel
+options.appearance.decorateDialogs=Draw dialog box borders using Swing look & feel
+options.appearance.continuousLayout.label=Use continuous layout in split panes
+#}}}
+
+#{{{ Context Menu pane
+options.context.label=Context Menu
+options.context.code=new ContextOptionPane();
+options.context.caption=Items in text area right click menu:
+options.context.add=Add...
+options.context.add.icon=22x22/actions/list-add.png
+options.context.remove=Remove
+options.context.remove.icon=22x22/actions/list-remove.png
+options.context.moveUp=Move Up
+options.context.moveUp.icon=22x22/actions/go-up.png
+options.context.moveDown=Move Down
+options.context.moveDown.icon=22x22/actions/go-down.png
+options.context.reset=Reset to Default
+options.context.reset.icon=22x22/actions/edit-clear.png
+options.context.add.title=Add to Context Menu
+options.context.add.caption=Add to context menu:
+options.context.add.separator=Separator
+options.context.add.action=Command or macro:
+
+options.context.reset.dialog.title=Reset to Default
+options.context.reset.dialog.message=Are you sure you want to reset the context menu to the installation default?
+#}}}
+
+#{{{ Docking pane
+options.docking.label=Docking
+options.docking.code=new DockingOptionPane();
+options.docking.title=Window
+options.docking.dockPosition=Docking position
+options.appearance.selectFramework.label=Docking framework:
+options.docking.autoSaveModeLayout.label=Automatically save mode-specific docking layout
+options.docking.autoLoadModeLayout.label=Automatically load mode-specific docking layout
+options.docking.selectSet.label=Dockable set:
+#}}}
+
+#{{{ Editing pane
+options.editing.label=Editing
+options.editing.code=new EditingOptionPane();
+options.editing.defaultMode=Default edit mode:
+options.editing.undoCount=Number of undos:
+options.editing.caption-0=\
+ To customize mode-specific settings, select an edit mode\n\
+ from the below menu. Currently, global defaults are being\n\
+ shown.
+options.editing.caption-1=\
+ Uncheck "use default settings" to customize mode-specific\n\
+ settings. Otherwise, settings from the <global defaults>\n\
+ section will be used.
+options.editing.mode=Change settings for mode:
+options.editing.global=<global defaults>
+options.editing.useDefaults=Use default settings
+options.editing.filenameGlob=File name glob:
+options.editing.firstlineGlob=First line glob:
+options.editing.folding=Folding mode:
+options.editing.collapseFolds=Initially collapse folds with level:
+options.editing.wrap=Word wrap:
+options.editing.maxLineLen=Wrap margin:
+options.editing.maxLineLen.tooltip=Select 0 for text area width (soft wrap only)
+options.editing.tabSize=Tab width:
+options.editing.indentSize=Indent width:
+options.editing.noWordSep=Extra word characters:
+options.editing.camelCasedWords=Separate "CamelCased" words
+options.editing.noTabs=Soft (emulated with spaces) tabs
+options.editing.deepIndent=Deep indent
+#}}}
+
+#{{{ Encodings pane
+options.encodings.label=Encodings
+options.encodings.code=new EncodingsOptionPane();
+options.encodings.selectEncodings=Select the encodings that should be shown in encoding dialogs:
+options.encodings.available=Available encoding(s)
+options.encodings.selected=Selected encoding(s)
+options.encodings.available.tooltip=<html>Encodings in this column will <b>not</b> be listed in encoding dialogs.\
+ Drag them to the right column to activate them</html>
+options.encodings.selected.tooltip=Encodings in this column be shown in encoding dialogs.\
+ Drag them to the left column to hide them
+options.encodings.selectAll=Select All
+options.encodings.selectNone=Select None
+#}}}
+
+#{{{ Gutter pane
+options.gutter.label=Gutter
+options.gutter.code=new GutterOptionPane();
+options.gutter.enabled=Show gutter
+options.gutter.optionalComponents=Optional gutter components
+options.gutter.lineNumbers=Line numbers
+options.gutter.minLineNumberDigits=Minimal number of digits to reserve for line numbers:
+options.gutter.selectionAreaEnabled=Line selection area when line numbers are not shown
+options.gutter.selectionAreaBgColor=Selection area background color:
+options.gutter.selectionAreaWidth=Selection area width (in pixels):
+options.gutter.font=Gutter font:
+options.gutter.foreground=Line number color:
+options.gutter.background=Background color:
+options.gutter.borderWidth=Gutter border width:
+options.gutter.numberAlignment=Line number alignment:
+options.gutter.interval-1=Highlight every\u0020
+options.gutter.interval-2=lines:
+options.gutter.currentLineHighlight=Highlight current line:
+options.gutter.structureHighlight=Show structure scope:
+options.gutter.markerHighlight=Show marker positions:
+options.gutter.foldColor=Fold markers:
+options.gutter.focusBorderColor=Focused gutter border:
+options.gutter.noFocusBorderColor=Unfocused gutter border:
+options.gutter.foldStyle.label=Fold style:
+options.gutter.foldStyleNames.Triangle=Triangle
+options.gutter.foldStyleNames.Square=Square
+options.gutter.foldStyleNames.Circle=Circle
+#}}}
+
+#{{{ Mouse pane
+options.mouse.label=Mouse
+options.mouse.code=new MouseOptionPane();
+options.mouse.dragAndDrop=Drag and drop in text area
+options.mouse.joinNonWordChars=Double-click drag joins non-alphanumeric characters
+options.mouse.middleMousePaste=Quick copy using middle mouse button
+options.mouse.ctrlForRectangularSelection=Switch to rectangular selection while Ctrl is pressed
+options.mouse.gutter.foldClick=Click in gutter:
+options.mouse.gutter.SfoldClick=Shift-click in gutter:
+options.mouse.gutter.toggle-fold=Collapse/expand fold
+options.mouse.gutter.toggle-fold-fully=Collapse/expand fold fully
+#}}}
+
+#{{{ Plugin Manager pane
+options.plugin-manager.label=Plugin Manager
+options.plugin-manager.code=new PluginManagerOptionPane();
+options.plugin-manager.updateMirrors=Update mirror list
+options.plugin-manager.workthread=Updating mirror list ...
+options.plugin-manager.downloadSource=Download plugin source code
+options.plugin-manager.deleteDownloads=Delete archives from download \
+ directory after install
+options.plugin-manager.mirror=Preferred download mirror:
+options.plugin-manager.location=Install plugins in:
+options.plugin-manager.settings-dir=jEdit settings directory
+options.plugin-manager.app-dir=jEdit application directory
+options.plugin-manager.none=Plugin Central default
+#}}}
+
+#{{{ Printing pane
+options.print.label=Printing
+options.print.code=new PrintOptionPane();
+options.print.font=Print font:
+options.print.fontstyle=Print font style:
+options.print.fontsize=Print font size:
+options.print.header=Print a header with the file name
+options.print.footer=Print a footer with the date, time and page number
+options.print.lineNumbers=Print line numbers
+options.print.color=Color printing
+options.print.tabSize=Tab width when printing:
+options.print.workarounds=Workarounds for Java bugs
+options.print.glyphVector=Print spacing workaround (increases spool file size)
+options.print.force13=Use old printing API (enable this if jEdit hangs when \
+ printing)
+options.print.folds=Print folded regions
+#}}}
+
+#{{{ Proxy pane
+options.firewall.label=Proxy Servers
+options.firewall.code=new FirewallOptionPane();
+options.firewall.http.enabled=Use HTTP proxy server
+options.firewall.http.host=HTTP proxy host:
+options.firewall.http.port=HTTP proxy port:
+options.firewall.http.user=Username:
+options.firewall.http.password=Password:
+options.firewall.http.nonProxy=Connect directly to:
+options.firewall.socks.enabled=Use SOCKS proxy server
+options.firewall.socks.host=SOCKS proxy host:
+options.firewall.socks.port=SOCKS proxy port:
+#}}}
+
+#{{{ Save & Backup pane
+options.save-back.label=Saving & Backup
+options.save-back.code=new SaveBackupOptionPane();
+options.save-back.autosave=Autosave frequency (secs):
+options.save-back.backups=Max number of backups:
+options.save-back.backupDirectory=Backup directory:
+options.save-back.backupPrefix=Backup filename prefix:
+options.save-back.backupSuffix=Backup filename suffix:
+options.save-back.backupEverySave=Backup on every save
+options.save-back.backupEverySave.tooltip=Resets file permissions on some file systems
+options.save-back.twoStageSave=Two-stage save (safer but resets file permissions owner on some filesystems)
+options.save-back.twoStageSave.tooltip=Stage 1: Create a temporary file and save to it. Stage 2: Rename the temporary file to the real name.
+options.save-back.confirmSaveAll="Save All Buffers" asks for confirmation
+options.save-back.autosaveUntitled=Autosave untitled buffers
+options.save-back.suppressNotSavedConfirmUntitled=Never mark Untitled buffers dirty.
+options.save-back.useMD5forDirtyCalculation=Never mark buffers dirty if contents are unchanged.
+options.save-back.useMD5forDirtyCalculation.tooltip=Compare with length and MD5 hash of buffer at load time, to decide if an edited buffer is still dirty.
+#}}}
+
+#{{{ Shortcuts pane
+options.shortcuts.label=Shortcuts
+options.shortcuts.code=new ShortcutsOptionPane();
+options.shortcuts.select.label=Edit Shortcuts:
+options.shortcuts.select.tooltip=You can select globals, macros, or plugin shortcuts
+options.shortcuts.name=Command
+options.shortcuts.shortcut1=Primary shortcut
+options.shortcuts.shortcut2=Alternative shortcut
+options.shortcuts.filter.label=Filter:
+options.shortcuts.filter.tooltip=Show only actions whose name contains this text
+options.shortcuts.clear.label=Clear
+
+grab-key.title=Specify Shortcut
+grab-key.caption=Press the desired shortcut for "{0}", then click OK.
+grab-key.keyboard-test=Input the key strokes that are causing problems.
+grab-key.assigned-to=Currently assigned to: {0}
+grab-key.assigned-to.none=<none>
+grab-key.assigned-to.prefix={0} prefix
+grab-key.clear=Clear
+grab-key.remove=Remove Current
+
+grab-key.remove-ask.title=Remove Shortcut?
+grab-key.remove-ask.message=\
+ You didn't specify a new shortcut.\n\
+ Do you want to remove the current shortcut?
+
+grab-key.duplicate-alt-shortcut.title=Duplicate Shortcut
+grab-key.duplicate-alt-shortcut.message=\
+ The shortcut you selected duplicates the other\n\
+ shortcut for this item. Please choose another.
+
+grab-key.duplicate-shortcut.title=Duplicate Shortcut
+grab-key.duplicate-shortcut.message=\
+ This shortcut is already assigned to\n\
+ "{0}".\n\
+ \n\
+ Do you want to override this assignment?
+
+grab-key.prefix-shortcut.title=Invalid Shortcut
+grab-key.prefix-shortcut.message=\
+ You cannot use this shortcut, because\n\
+ it is a prefix to other shortcuts.\n\
+ Please choose another.
+#}}}
+
+#{{{ Status bar pane
+options.status.label=Status Bar
+options.status.code=new StatusBarOptionPane();
+options.status.visible=Show status bar
+options.status.plainview.visible=Show status bar in plain views
+options.status.foreground=Status bar text:
+options.status.background=Status bar background:
+options.status.memory.foreground=Memory indicator foreground:
+options.status.memory.background=Memory indicator background:
+options.status.edit.title=Edit Status Bar Entry
+options.status.edit.labelRadioButton=label
+options.status.edit.widgetRadioButton=widget
+options.status.edit.labelLabel=Type a label:
+options.status.edit.widgetLabel=Choose a widget:
+options.status.caret.linenumber=Show caret line number
+options.status.caret.dot=Show caret offset from start of line
+options.status.caret.virtual=Show caret virtual offset from start of line
+options.status.caret.offset=Show caret offset from start of file
+options.status.caret.bufferlength=Show length of file
+#}}}
+
+#{{{ Syntax Highlighting pane
+options.syntax.label=Syntax Highlighting
+options.syntax.code=new SyntaxHiliteOptionPane();
+options.syntax.object=Token type
+options.syntax.style=Text style
+options.syntax.foldLine.1=Collapsed fold line, level 1
+options.syntax.foldLine.2=Collapsed fold line, level 2
+options.syntax.foldLine.3=Collapsed fold line, level 3
+options.syntax.foldLine.0=Collapsed fold line, level > 3
+#}}}
+
+#{{{ Text Area pane
+options.textarea.label=Text Area
+options.textarea.code=new TextAreaOptionPane();
+options.textarea.font=Text font:
+options.textarea.fontsubst=Automatic font substitution
+options.textarea.fontsubst.tooltip=Automatically select the appropriate font \
+if the chosen one can't display characters.
+options.textarea.fontsubstlist=Preferred fonts:
+options.textarea.foreground=Text color:
+options.textarea.background=Background color:
+options.textarea.caret=Caret:
+options.textarea.blinkCaret=blinking
+options.textarea.blockCaret=block
+options.textarea.thickCaret=thick
+options.textarea.selection=Single selection:
+options.textarea.multipleSelection=Multiple selection:
+options.textarea.selectionFg=Selection foreground:
+options.textarea.lineHighlight=Highlight current line:
+options.textarea.structureHighlight=Highlight matching elements:
+options.textarea.eolMarkers=End of line markers:
+options.textarea.wrapGuide=Wrap guide:
+options.textarea.electricBorders=Electric (auto scroll) borders
+options.textarea.stdNextPrevWord=Go to next/previous word commands eat whitespace
+options.textarea.antiAlias=Anti Aliased smooth text
+options.textarea.antiAlias.tooltip=Slows down display on some systems.
+options.textarea.fracFontMetrics=Fractional font metrics (for better smooth \
+ text display)
+options.textarea.fracFontMetrics.tooltip=Not recommended with subpixel antialiasing
+options.textArea.stripTrailingEOL=Hide final end of line (if any)
+options.textArea.completeFromAllBuffers=Complete words from all open buffers (default is \
+ to limit search to currently visible buffers)
+#}}}
+
+#{{{ Tool Bar pane
+options.toolbar.label=Tool Bar
+options.toolbar.code=new ToolBarOptionPane();
+options.toolbar.showToolbar=Show tool bar
+options.toolbar.caption=Buttons to display on tool bar:
+options.toolbar.add.icon=22x22/actions/list-add.png
+options.toolbar.add=Add...
+options.toolbar.edit=Edit...
+options.toolbar.remove=Remove
+options.toolbar.remove.icon=22x22/actions/list-remove.png
+options.toolbar.moveUp=Move Up
+options.toolbar.moveUp.icon=22x22/actions/go-up.png
+options.toolbar.moveDown=Move Down
+options.toolbar.moveDown.icon=22x22/actions/go-down.png
+options.toolbar.reset=Reset to Default
+options.toolbar.reset.icon=22x22/actions/edit-clear.png
+options.toolbar.edit.title=Edit Tool Bar Entry
+options.toolbar.edit.caption=Type:
+options.toolbar.edit.separator=Separator
+options.toolbar.edit.action=Command or macro:
+options.toolbar.edit.icon=22x22/actions/document-properties.png
+options.toolbar.edit.builtin=Use built-in icon:
+options.toolbar.edit.file=Load icon from file:
+options.toolbar.edit.choose=Choose
+options.toolbar.edit.no-icon=No icon selected
+
+options.toolbar.reset.dialog.title=Reset to Default
+options.toolbar.reset.dialog.message=Are you sure you want to reset the toolbar to the installation default?
+#}}}
+
+#{{{ View pane
+options.view.label=View
+options.view.code=new ViewOptionPane();
+options.view.viewLayout=View layout
+options.view.alternateDockingLayout=Alternate docked window placement
+options.view.alternateToolBarLayout=Alternate tool bar placement
+options.view.showFullPath=Show full path of buffer in title bar
+options.view.showSearchbar=Always show search bar
+options.view.beepOnSearchAutoWrap=Beep when searching automatically wraps
+options.view.showBufferSwitcher=Show buffer switcher
+options.view.bufferSwitcherMaxRowsCount=Visible rows in buffer switcher:
+options.view.sortBuffers=Sort buffer sets
+options.view.sortByName=Sort buffer sets by file name, instead of path name
+options.view.fullScreenIncludesMenu=Show the menu bar in full-screen mode
+options.view.fullScreenIncludesToolbar=Show the toolbars in full-screen mode
+options.view.fullScreenIncludesStatus=Show the status bar in full-screen mode
+options.bufferset.scope=BufferSet scope:
+options.editpane.bufferset.contain=New BufferSets contain:
+options.editpane.bufferset.newbufferset.copy=copy of current BufferSet
+options.editpane.bufferset.newbufferset.empty=an empty buffer
+options.editpane.bufferset.newbufferset.currentbuffer=current buffer only
+
+fullScreenIncludesMenu=true
+fullScreenIncludesToolbars=true
+fullScreenIncludesStatus=true
+#}}}
+
+
+
+#{{{ File System Browser panes
+options.browser.label=File System Browser
+
+options.browser.colors.label=Colors
+options.browser.colors.code=new BrowserColorsOptionPane();
+options.browser.colors.glob=File name glob
+options.browser.colors.color=Color
+options.browser.colors.add=Add
+options.browser.colors.remove=Remove
+
+options.browser.general.label=General
+options.browser.general.code=new BrowserOptionPane();
+options.browser.general.defaultPath=Default path:
+options.browser.general.defaultPath.favorites=Favorites
+options.browser.general.defaultPath.home=Home directory
+options.browser.general.defaultPath.last=Most recently visited directory
+options.browser.general.defaultPath.buffer=Parent directory of current buffer
+options.browser.general.defaultPath.working=Working directory of jEdit process
+options.browser.general.showMenubar=Show menu bar
+options.browser.general.showToolbar=Show tool bar
+options.browser.general.showIcons=Show icons
+options.browser.general.showHiddenFiles=Show hidden files
+options.browser.general.sortIgnoreCase=Ignore case when sorting
+options.browser.general.sortMixFilesAndDirs=Mix files and directories
+options.browser.general.doubleClickClose=Double-clicking an open file closes it
+options.browser.general.currentBufferFilter=Filter in file dialogs is \
+ current buffer extension
+options.browser.general.useDefaultIcons=Use default icons
+#}}}
+
+#{{{ Font selector
+font-selector.title=Font Selector
+font-selector.family=Font family:
+font-selector.size=Font size:
+font-selector.style=Font style:
+font-selector.plain=Plain
+font-selector.bold=Bold
+font-selector.italic=Italic
+font-selector.bolditalic=Bold italic
+font-selector.preview=Preview
+font-selector.long-text=The quick brown fox jumps over the lazy dog.
+#}}}
+
+#{{{ Color chooser, used by options.syntaxs
+colorChooser.title=Pick a Color
+#}}}
+
+#{{{ Style editor, used by options.syntaxs
+style-editor.title=Style Editor
+style-editor.tokenType=Token type:
+style-editor.italics=Italics
+style-editor.bold=Bold
+style-editor.fgColor=Text color:
+style-editor.bgColor=Background color:
+#}}}
+
+#}}}
+
+#{{{ Plugin options dialog
+plugin-options.title=Options
+options.plugins.label=Plugins
+options.no-plugins.label=No Plugin Options
+#}}}
+
+#{{{ Help viewer
+helpviewer.title=jEdit Help
+helpviewer.loading=Loading...
+helpviewer.back.label=Back
+helpviewer.back.icon=ArrowL.png
+helpviewer.forward.label=Forward
+helpviewer.forward.icon=ArrowR.png
+
+helpviewer.toc.loading=Loading...
+helpviewer.toc.label=Contents
+helpviewer.toc.welcome=Welcome to jEdit
+helpviewer.toc.readme=General Information
+helpviewer.toc.changes=Detailed Change Log
+helpviewer.toc.todo=To Do List and Known Bugs
+helpviewer.toc.copying=GNU General Public License
+helpviewer.toc.copying-doc=GNU Free Documentation License
+helpviewer.toc.copying-apache=Apache License
+helpviewer.toc.copying-plugins=Plugin Licensing Amendment
+helpviewer.toc.plugins=Plugins
+helpviewer.toc.online-apidocs=jEdit API Reference (Online)
+
+helpviewer.search.label=Search
+helpviewer.search.caption=Search for:
+helpviewer.searching=Searching...
+helpviewer.no-results=No results
+#}}}
+
+#{{{ Tip of the day window
+tip.title=Tip of the Day
+tip.caption=Did you know...
+tip.show-next-time=Show tips on startup
+tip.next-tip=Next Tip
+
+tip.not-found=doc/tips directory not found
+# Show on startup?
+tip.show=true
+#}}}
+
+#{{{ Activity log
+log-viewer.title=Activity Log
+log-viewer.caption=Full text of log is stored in {0}.
+log-viewer.copy=Copy
+log-viewer.tail.label=Tail
+#}}}
+
+#{{{ Marker Viewer
+view-markers.label=Vie$w Markers
+view-markers.title=Markers
+#}}}
+
+#{{{ I/O progress monitor
+io-progress-monitor.title=I/O Progress Monitor
+io-progress-monitor.caption={0} pending request(s).
+io-progress-monitor.idle=Thread idle
+io-progress-monitor.abort=Abort
+
+#{{{ I/O abort dialog box
+abort.title=Abort I/O
+abort.message=Are you sure you want to abort the currently executing\n\
+ input/output request? If you are aborting a file save, this may\n\
+ result in data loss.
+#}}}
+
+#}}}
+
+#{{{ Task monitor
+task-monitor.title=Task Monitor
+#}}}
+
+#{{{ VFS browser
+vfs.browser.title=File Browser
+vfs.browser.longtitle=File System Browser
+vfs.browser.path=Path:
+vfs.browser.path.mnemonic=p
+vfs.browser.filter=Filter:
+vfs.browser.default-filter=*[^~#]
+vfs.browser.filter-enabled=true
+vfs.browser.tree.loading=Loading...
+vfs.browser.file.icon=16x16/mimetypes/text-x-generic.png
+vfs.browser.open-file.icon=16x16/actions/edit-select-all.png
+vfs.browser.dir.icon=16x16/places/folder.png
+vfs.browser.open-dir.icon=16x16/status/folder-open.png
+vfs.browser.filesystem.icon=16x16/devices/drive-harddisk.png
+vfs.browser.loading.icon=16x16/status/image-loading.png
+vfs.browser.expand.icon=16x16/actions/group-expand.png
+vfs.browser.collapse.icon=16x16/actions/group-collapse.png
+
+vfs.browser.name=Name
+vfs.browser.type=Type
+vfs.browser.type.file=File
+vfs.browser.type.directory=Directory
+vfs.browser.type.filesystem=File system
+vfs.browser.status=Status
+vfs.browser.status.no=No access
+vfs.browser.status.ro=Read only
+vfs.browser.status.append=Append only
+vfs.browser.status.rw=Read/write
+vfs.browser.size=Size
+vfs.browser.modified=Last modified
+
+vfs.browser.file_filter.glob=Glob File Filter
+vfs.browser.file_filter.dir_only=Directories Only
+
+#{{{ Actions
+vfs.browser.browse-window.label=Browse in New Window
+vfs.browser.browse.label=Browse
+vfs.browser.close.label=Close
+vfs.browser.copy-path.label=Copy
+vfs.browser.delete.label=Delete...
+vfs.browser.delete.shortcut=DELETE
+vfs.browser.home.icon=22x22/actions/go-home.png
+vfs.browser.home.label=Home Directory
+vfs.browser.home.shortcut=~
+vfs.browser.properties.label=Properties
+vfs.browser.properties.title=File/Directory Properties
+vfs.browser.insert.label=Insert
+vfs.browser.new-directory.icon=22x22/actions/folder-new.png
+vfs.browser.new-directory.label=New Directory...
+vfs.browser.new-directory.shortcut=INSERT
+vfs.browser.new-file.icon=22x22/actions/document-new.png
+vfs.browser.new-file.label=New File
+vfs.browser.new-file.shortcut=C+n
+vfs.browser.open.label=Open
+vfs.browser.other-encoding-2.label=Other ({0})...
+vfs.browser.other-encoding.label=Other...
+vfs.browser.reload.icon=22x22/actions/view-refresh.png
+vfs.browser.reload.label=Reload Directory
+vfs.browser.reload.shortcut=F5
+vfs.browser.rename.label=Rename...
+vfs.browser.rename.shortcut=F2
+vfs.browser.roots.icon=22x22/devices/drive-harddisk.png
+vfs.browser.roots.label=Root Directory
+vfs.browser.roots.shortcut=/
+vfs.browser.search-directory.icon=22x22/actions/edit-find-in-folder.png
+vfs.browser.search-directory.label=Search in Directory...
+vfs.browser.show-hidden-files.label=Show Hidden Files
+vfs.browser.synchronize.icon=22x22/status/folder-visiting.png
+vfs.browser.synchronize.label=Directory of Current Buffer
+vfs.browser.synchronize.shortcut=-
+vfs.browser.up.icon=22x22/actions/go-parent.png
+vfs.browser.up.label=Parent Directory
+vfs.browser.up.shortcut=A+Up
+vfs.browser.paste.label=Paste
+vfs.browser.previous.label=Previous Directory
+vfs.browser.previous.shortcut=A+Left
+vfs.browser.next.label=Next Directory
+vfs.browser.next.shortcut=A+Right
+vfs.browser.next.icon=22x22/actions/go-next.png
+vfs.browser.previous.icon=22x22/actions/go-previous.png
+#}}}
+
+#{{{ Tool bar
+vfs.browser.toolbar-browser=vfs.browser.previous \
+ vfs.browser.next \
+ vfs.browser.up \
+ vfs.browser.reload \
+ vfs.browser.home \
+ vfs.browser.roots \
+ vfs.browser.synchronize \
+ vfs.browser.new-file \
+ vfs.browser.new-directory \
+ vfs.browser.search-directory
+
+vfs.browser.toolbar-dialog=vfs.browser.previous \
+ vfs.browser.next \
+ vfs.browser.up \
+ vfs.browser.reload \
+ vfs.browser.home \
+ vfs.browser.roots \
+ vfs.browser.synchronize \
+ vfs.browser.new-directory
+#}}}
+
+#{{{ Commands menu
+vfs.browser.commands.label=Commands
+vfs.browser.commands.encoding.label=Encoding
+vfs.browser.commands.encoding.auto-detect=Auto-detect
+
+vfs.browser.open-in.label=Open in
+vfs.browser.open-in=vfs.browser.open-view \
+ vfs.browser.open-plain-view \
+ vfs.browser.open-split
+vfs.browser.open-view.label=New View
+vfs.browser.open-plain-view.label=New Plain View
+vfs.browser.open-split.label=New Split
+#}}}
+
+#{{{ Plugins menu
+vfs.browser.plugins.label=Plugins
+vfs.browser.plugins.plugin-manager.label=Plugin Manager...
+vfs.browser.plugins.plugin-options.label=Plugin Options...
+vfs.browser.plugins.no-plugins.label=No Plugins
+#}}}
+
+#{{{ Favorites menu
+vfs.browser.favorites.label=Favorites
+vfs.browser.favorites.add-to-favorites.label=Add to Favorites
+vfs.browser.favorites.edit-favorites.label=Edit Favorites
+vfs.browser.favorites.no-favorites.label=No Favorites
+#}}}
+
+vfs.browser.dialog.open=Open
+vfs.browser.dialog.save=Save
+vfs.browser.dialog.choose-dir=Choose
+vfs.browser.dialog.filename=File name:
+vfs.browser.dialog.filename.mnemonic=f
+
+#{{{ Dialogs
+vfs.browser.bad-filter.title=Invalid Filter
+vfs.browser.bad-filter.message=The filter {0} is invalid ({1})
+
+vfs.browser.recurse-favorites.title=Cannot Add Favorites to Itself
+vfs.browser.recurse-favorites.message=The favorites list cannot be added to itself.
+
+vfs.browser.delete-confirm.title=Delete File Confirmation
+vfs.browser.delete-confirm.message=Are you sure you want to delete the following {1}?\n\n\
+ {0}
+
+vfs.browser.delete-favorites.title=Delete From Favorites
+vfs.browser.delete-favorites.message=Are you sure you want to remove the following files \
+ from the favorites?\n\n\
+ {0}
+
+vfs.browser.rename.title=Rename File
+vfs.browser.rename.message=Enter a new name for {0}:
+
+vfs.browser.mkdir.title=New Directory
+vfs.browser.mkdir.message=Name (or path) of new directory:
+#}}}
+
+#}}}
+
+#{{{ I/O status messages
+vfs.status.load=Loading {0}
+vfs.status.load-markers=Loading markers for {0}
+vfs.status.save=Saving {0}
+vfs.status.save-markers=Saving markers for {0}
+vfs.status.autosave=Autosaving {0}
+vfs.status.listing-directory=Listing {0}
+vfs.status.deleting=Deleting {0}
+vfs.status.renaming=Renaming {0} to {1}
+#}}}
+
+#{{{ Plugin manager
+
+plugin-manager.title=Plugin Manager
+
+plugin-manager.export-url=http://plugins.jedit.org/export/gzip_plugin_manager.php
+plugin-manager.mirror-url=http://plugins.jedit.org/export/mirror_list.php
+
+plugin-manager.hide-libraries=Hide libraries
+
+plugin-manager.mgr-options=Download Options...
+plugin-manager.plugin-options=Plugin Options...
+plugin-manager.done=Close
+
+plugin-manager.remove-confirm.title=Remove Plugins
+plugin-manager.remove-confirm.message=Are you sure you want to remove the \
+ following plugins?
+
+plugin-manager.dependency.title=Plugin Dependency
+plugin-manager.dependency.message={0} is required by the following plugins.\n\
+ Deselecting {0} will also deselect the below plugins:
+
+plugin-manager.remove-dependencies.title=Plugin Dependency
+plugin-manager.remove-dependencies.message=The removed plugins are required by the following plugins.\n\
+ Removing them will also deselect the below plugins:
+
+plugin-manager.cleanup.label=Cleanup
+plugin-manager.cleanup.title=Cleanup plugin data
+plugin-manager.cleanup.message=Remove the data of the following plugins:
+
+plugin-manager.noOrphan.label=Find orphan
+plugin-manager.noOrphan.title=No orphan jars found
+plugin-manager.noOrphan.message=There was no orphan jars in your jEdit installation
+
+plugin-manager.findOrphan.label=Find orphan
+plugin-manager.findOrphan.title=Find orphan jars
+plugin-manager.findOrphan.message=The following jars do not belong to any plugin\n\
+ remove them ?\n (be careful, they can be declared dynamically in some \n\
+ plugins like JDBC drivers):
+
+install-plugins.depend.title=Dependency Required
+install-plugins.depend.message=One or more of the plugins you are installing\n\
+ require additional plugins. They will be automatically\n\
+ installed if you continue.
+
+plugin-manager.status.loaded=Loaded
+plugin-manager.status.not-loaded=Not loaded
+plugin-manager.status.error=Error
+
+plugin-manager.list-download-connect=Connecting to plugins.jedit.org
+plugin-manager.list-download=Downloading plugin list from plugins.jedit.org
+plugin-manager.filterField=Show only plugins whose name contains this text
+
+#{{{ Plugin management
+manage-plugins.title=Manage
+
+manage-plugins.info.name=Name
+manage-plugins.info.version=Version
+manage-plugins.info.status=Status
+manage-plugins.info.data=Data
+
+manage-plugins.data-size.unknown=<unknown>
+
+manage-plugins.remove=Remove...
+manage-plugins.help=Help...
+manage-plugins.restore.icon=22x22/actions/document-open.png
+manage-plugins.save.icon=22x22/actions/document-save.png
+#}}}
+
+#{{{ Plugin installation
+install-plugins.title=Install
+
+install-plugins.info.name=Name
+install-plugins.info.size=Size
+install-plugins.info.releaseDate=Release date
+install-plugins.info.version=Version
+install-plugins.info.category=Category
+
+install-plugins.totalSize=Total Size:\
+install-plugins.select-all=Select All
+install-plugins.install=Install
+install-plugins.show-updates=Show Updates
+install-plugins.choose-plugin-set.icon=22x22/actions/document-open.png
+install-plugins.clear-plugin-set.icon=22x22/actions/edit-clear.png
+
+install-plugins.info=Author: {0}\n\
+ Released: {1}\n\
+ {2}
+
+update-plugins.title=Update
+
+plugin-manager.progress=Downloading {0} from mirror {1}
+plugin-manager.progress.stop=Stop
+#}}}
+
+#{{{ Plugin remove error
+plugin-manager.remove-failed.title=Remove Failed
+plugin-manager.remove-failed.message=The plugin {0}\n\
+ could not be removed.
+#}}}
+
+#}}}
+
+#{{{ File Properties Dialog
+fileprop.name=Name
+fileprop.path=Path
+fileprop.lastmod=Last Modified
+fileprop.size=Size
+fileprop.properties=Properties
+fileprop.readable=Readable
+fileprop.writeable=Writeable
+fileprop.attribute=Attribute
+fileprop.okBtn=OK
+fileprop.cancelBtn=Cancel
+fileprop.selectedFiles=Selected files
+fileprop.selectedDirectories=Selected directories
+#}}}
+
+#{{{ Activity log viewer
+log-viewer.dialog.title=Activity Log Settings
+log-viewer.settings.label=Settings
+log-viewer.message.label=Message Display:
+log-viewer.message.debug.label=Debug
+log-viewer.message.message.label=Message
+log-viewer.message.notice.label=Notice
+log-viewer.message.warning.label=Warning
+log-viewer.message.error.label=Error
+#}}}
+
+errorwidget.popupmenu=logs-remove-all-errors
+logs-remove-all-errors.label=Remove all errors
+
+taskmanager.remainingtasks.label={0} remaining task(s)
\ No newline at end of file
diff --git a/jEdit/org/gjt/sp/jedit/jedit_keys.props b/jEdit/org/gjt/sp/jedit/jedit_keys.props
index e224e76..8b57c22 100644
--- a/jEdit/org/gjt/sp/jedit/jedit_keys.props
+++ b/jEdit/org/gjt/sp/jedit/jedit_keys.props
@@ -1,234 +1,234 @@
-###
-### jEdit keyboard shortcuts
-### :tabSize=8:indentSize=8:noTabs=false:
-### :folding=explicit:collapseFolds=1:
-### :encoding=ISO-8859-1:
-###
-### Copyright (C) 1998, 2003 Slava Pestov
-###
-
-#{{{ Function keys
-help.shortcut=F1
-show-context-menu.shortcut=CONTEXT_MENU
-#}}}
-
-#{{{ C+X
-select-all.shortcut=C+a
-complete-word.shortcut=C+b
-copy.shortcut=C+c
-delete-line.shortcut=C+d
-# C+e is a prefix
-find.shortcut=C+f
-find-next.shortcut=F3
-# C+h is not usable on MacOS X
-indent-lines.shortcut=C+i
-join-lines.shortcut=C+j
-swap-marker.shortcut=C+k
-goto-line.shortcut=C+g
-# C+m is a prefix
-new-file.shortcut=C+n
-new-file-in-mode.shortcut=CS+n
-open-file.shortcut=C+o
-print.shortcut=C+p
-exit.shortcut=C+q
-# C+r is a prefix
-save.shortcut=C+s
-add-marker-shortcut.shortcut=C+t
-select-marker.shortcut=C+u
-paste.shortcut=C+v
-close-buffer.shortcut=C+w
-cut.shortcut=C+x
-goto-marker.shortcut=C+y
-undo.shortcut=C+z
-unsplit-current.shortcut=C+0
-unsplit.shortcut=C+1
-split-horizontal.shortcut=C+2
-split-vertical.shortcut=C+3
-resplit.shortcut=C+4
-#}}}
-
-#{{{ C+non-alpha
-delete-start-line.shortcut=CS+BACK_SPACE
-delete-end-line.shortcut=CS+DELETE
-prev-paragraph.shortcut=C+UP
-next-paragraph.shortcut=C+DOWN
-select-prev-paragraph.shortcut=CS+UP
-select-next-paragraph.shortcut=CS+DOWN
-backspace-word.shortcut=C+BACK_SPACE
-delete-word.shortcut=C+DELETE
-document-home.shortcut=C+HOME
-document-end.shortcut=C+END
-select-document-home.shortcut=CS+HOME
-select-document-end.shortcut=CS+END
-prev-word.shortcut=C+LEFT
-select-prev-word.shortcut=CS+LEFT
-next-word.shortcut=C+RIGHT
-select-next-word.shortcut=CS+RIGHT
-action-bar.shortcut=C+ENTER
-prev-buffer.shortcut=C+PAGE_UP
-next-buffer.shortcut=C+PAGE_DOWN
-last-action.shortcut=C+SPACE
-
-recent-buffer.shortcut=C+BACK_QUOTE
-select-block.shortcut=C+OPEN_BRACKET
-match-bracket.shortcut=C+CLOSE_BRACKET
-expand-abbrev.shortcut=C+SEMICOLON
-quick-search.shortcut=C+COMMA
-hypersearch.shortcut=C+PERIOD
-scroll-up-line.shortcut=C+QUOTE
-scroll-down-line.shortcut=C+SLASH
-toggle-multi-select.shortcut=C+BACK_SLASH
-#}}}
-
-#{{{ C+e C+X
-# Unused: f, h, q, y
-copy-append.shortcut=C+e C+a
-search-in-open-buffers.shortcut=C+e C+b
-range-comment.shortcut=C+e C+c
-search-in-directory.shortcut=C+e C+d
-replace-and-find-next.shortcut=C+e C+g
-ignore-case.shortcut=C+e C+i
-scroll-to-current-line.shortcut=C+e C+j
-line-comment.shortcut=C+e C+k
-select-line-range.shortcut=C+e C+l
-add-marker.shortcut=C+e C+m
-center-caret.shortcut=C+e C+n
-scroll-and-center=C+l
-open-path.shortcut=C+e C+o
-vertical-paste.shortcut=C+e C+p
-replace-in-selection.shortcut=C+e C+r
-save-all.shortcut=C+e C+s
-toggle-line-numbers.shortcut=C+e C+t
-cut-append.shortcut=C+e C+u
-paste-previous.shortcut=C+e C+v
-close-all.shortcut=C+e C+w
-regexp.shortcut=C+e C+x
-paste-deleted.shortcut=C+e C+y
-redo.shortcut=C+e C+z
-#}}}
-
-#{{{ C+e C+non-alpha
-left-docking-area.shortcut=C+e C+LEFT
-top-docking-area.shortcut=C+e C+UP
-right-docking-area.shortcut=C+e C+RIGHT
-bottom-docking-area.shortcut=C+e C+DOWN
-toggle-full-screen.shortcut=F11
-toggle-dock-areas.shortcut=F12
-global-options.shortcut=C+F12
-
-prev-marker.shortcut=C+e C+COMMA
-next-marker.shortcut=C+e C+PERIOD
-prev-bracket.shortcut=C+e C+OPEN_BRACKET
-next-bracket.shortcut=C+e C+CLOSE_BRACKET
-close-docking-area.shortcut=C+e C+BACK_QUOTE
-#}}}
-
-#{{{ C+e X
-# Unused: b e g h j k m o q t y z
-add-explicit-fold.shortcut=C+e a
-collapse-all-folds.shortcut=C+e c
-delete-paragraph.shortcut=C+e d
-format-paragraph.shortcut=C+e f
-find-previous.shortcut=C+e g
-invert-selection.shortcut=C+e i
-select-line.shortcut=C+e l
-narrow-to-fold.shortcut=C+e n n
-narrow-to-selection.shortcut=C+e n s
-select-paragraph.shortcut=C+e p
-remove-trailing-ws.shortcut=C+e r
-select-fold.shortcut=C+e s
-insert-literal.shortcut=C+e v
-select-word.shortcut=C+e w
-parent-fold.shortcut=C+e u
-expand-all-folds.shortcut=C+e x
-#}}}
-
-#{{{ C+e non-alpha
-expand-folds.shortcut=C+e ENTER
-#}}}
-
-#{{{ C+m C+X
-record-temp-macro.shortcut=C+m C+m
-run-temp-macro.shortcut=C+m C+p
-record-macro.shortcut=C+m C+r
-stop-recording.shortcut=C+m C+s
-last-macro.shortuct=C+m C+l
-#}}}
-
-#{{{ C+r C+X
-copy-append-string-register.shortcut=C+r C+a
-copy-string-register.shortcut=C+r C+c
-clear-register.shortcut=C+r C+l
-vertical-paste-string-register.shortcut=C+r C+p
-cut-append-string-register.shortcut=C+r C+u
-paste-string-register.shortcut=C+r C+v
-cut-string-register.shortcut=C+r C+x
-#}}}
-
-#{{{ A+non-alpha
-prev-fold.shortcut=A+UP
-next-fold.shortcut=A+DOWN
-shift-left.shortcut=A+LEFT
-shift-right.shortcut=A+RIGHT
-collapse-fold.shortcut=A+BACK_SPACE
-expand-fold.shortcut=AS+ENTER
-expand-one-level.shortcut=A+ENTER
-quick-search-word.shortcut=A+COMMA
-hypersearch-word.shortcut=A+PERIOD
-scroll-up-page.shortcut=A+QUOTE
-scroll-down-page.shortcut=A+SLASH
-prev-textarea.shortcut=A+PAGE_UP
-next-textarea.shortcut=A+PAGE_DOWN
-
-focus-buffer-switcher.shortcut=A+BACK_QUOTE
-toggle-rect-select.shortcut=A+BACK_SLASH
-#}}}
-
-#{{{ Other keys
-shift-left.shortcut2=S+TAB
-select-none.shortcut=ESCAPE
-backspace.shortcut=BACK_SPACE
-delete.shortcut=DELETE
-overwrite.shortcut=INSERT
-home.shortcut=HOME
-end.shortcut=END
-select-home.shortcut=S+HOME
-select-end.shortcut=S+END
-prev-page.shortcut=PAGE_UP
-next-page.shortcut=PAGE_DOWN
-select-prev-page.shortcut=S+PAGE_UP
-select-next-page.shortcut=S+PAGE_DOWN
-prev-char.shortcut=LEFT
-select-prev-char.shortcut=S+LEFT
-next-char.shortcut=RIGHT
-select-next-char.shortcut=S+RIGHT
-prev-line.shortcut=UP
-select-prev-line.shortcut=S+UP
-next-line.shortcut=DOWN
-select-next-line.shortcut=S+DOWN
-insert-newline-indent.shortcut=ENTER
-insert-tab-indent.shortcut=TAB
-#}}}
-
-#{{{ Alternative shortcuts for frequently-used commands
-next-page.shortcut2=A+a
-select-next-page.shortcut2=AS+a
-delete.shortcut2=A+d
-prev-line.shortcut2=A+i
-select-prev-line.shortcut2=AS+i
-prev-char.shortcut2=A+j
-select-prev-char.shortcut2=AS+j
-next-line.shortcut2=A+k
-select-next-line.shortcut2=AS+k
-next-char.shortcut2=A+l
-select-next-char.shortcut2=AS+l
-prev-page.shortcut2=A+q
-select-prev-page.shortcut2=AS+q
-end.shortcut2=A+x
-select-end.shortcut2=AS+x
-home.shortcut2=A+z
-select-home.shortcut2=AS+z
-copy.shortcut2=C+INSERT
-paste.shortcut2=S+INSERT
-cut.shortcut2=S+DELETE
-#}}}
+###
+### jEdit keyboard shortcuts
+### :tabSize=8:indentSize=8:noTabs=false:
+### :folding=explicit:collapseFolds=1:
+### :encoding=ISO-8859-1:
+###
+### Copyright (C) 1998, 2003 Slava Pestov
+###
+
+#{{{ Function keys
+help.shortcut=F1
+show-context-menu.shortcut=CONTEXT_MENU
+#}}}
+
+#{{{ C+X
+select-all.shortcut=C+a
+complete-word.shortcut=C+b
+copy.shortcut=C+c
+delete-line.shortcut=C+d
+# C+e is a prefix
+find.shortcut=C+f
+find-next.shortcut=F3
+# C+h is not usable on MacOS X
+indent-lines.shortcut=C+i
+join-lines.shortcut=C+j
+swap-marker.shortcut=C+k
+goto-line.shortcut=C+g
+# C+m is a prefix
+new-file.shortcut=C+n
+new-file-in-mode.shortcut=CS+n
+open-file.shortcut=C+o
+print.shortcut=C+p
+exit.shortcut=C+q
+# C+r is a prefix
+save.shortcut=C+s
+add-marker-shortcut.shortcut=C+t
+select-marker.shortcut=C+u
+paste.shortcut=C+v
+close-buffer.shortcut=C+w
+cut.shortcut=C+x
+goto-marker.shortcut=C+y
+undo.shortcut=C+z
+unsplit-current.shortcut=C+0
+unsplit.shortcut=C+1
+split-horizontal.shortcut=C+2
+split-vertical.shortcut=C+3
+resplit.shortcut=C+4
+#}}}
+
+#{{{ C+non-alpha
+delete-start-line.shortcut=CS+BACK_SPACE
+delete-end-line.shortcut=CS+DELETE
+prev-paragraph.shortcut=C+UP
+next-paragraph.shortcut=C+DOWN
+select-prev-paragraph.shortcut=CS+UP
+select-next-paragraph.shortcut=CS+DOWN
+backspace-word.shortcut=C+BACK_SPACE
+delete-word.shortcut=C+DELETE
+document-home.shortcut=C+HOME
+document-end.shortcut=C+END
+select-document-home.shortcut=CS+HOME
+select-document-end.shortcut=CS+END
+prev-word.shortcut=C+LEFT
+select-prev-word.shortcut=CS+LEFT
+next-word.shortcut=C+RIGHT
+select-next-word.shortcut=CS+RIGHT
+action-bar.shortcut=C+ENTER
+prev-buffer.shortcut=C+PAGE_UP
+next-buffer.shortcut=C+PAGE_DOWN
+last-action.shortcut=C+SPACE
+
+recent-buffer.shortcut=C+BACK_QUOTE
+select-block.shortcut=C+OPEN_BRACKET
+match-bracket.shortcut=C+CLOSE_BRACKET
+expand-abbrev.shortcut=C+SEMICOLON
+quick-search.shortcut=C+COMMA
+hypersearch.shortcut=C+PERIOD
+scroll-up-line.shortcut=C+QUOTE
+scroll-down-line.shortcut=C+SLASH
+toggle-multi-select.shortcut=C+BACK_SLASH
+#}}}
+
+#{{{ C+e C+X
+# Unused: f, h, q, y
+copy-append.shortcut=C+e C+a
+search-in-open-buffers.shortcut=C+e C+b
+range-comment.shortcut=C+e C+c
+search-in-directory.shortcut=C+e C+d
+replace-and-find-next.shortcut=C+e C+g
+ignore-case.shortcut=C+e C+i
+scroll-to-current-line.shortcut=C+e C+j
+line-comment.shortcut=C+e C+k
+select-line-range.shortcut=C+e C+l
+add-marker.shortcut=C+e C+m
+center-caret.shortcut=C+e C+n
+scroll-and-center=C+l
+open-path.shortcut=C+e C+o
+vertical-paste.shortcut=C+e C+p
+replace-in-selection.shortcut=C+e C+r
+save-all.shortcut=C+e C+s
+toggle-line-numbers.shortcut=C+e C+t
+cut-append.shortcut=C+e C+u
+paste-previous.shortcut=C+e C+v
+close-all.shortcut=C+e C+w
+regexp.shortcut=C+e C+x
+paste-deleted.shortcut=C+e C+y
+redo.shortcut=C+e C+z
+#}}}
+
+#{{{ C+e C+non-alpha
+left-docking-area.shortcut=C+e C+LEFT
+top-docking-area.shortcut=C+e C+UP
+right-docking-area.shortcut=C+e C+RIGHT
+bottom-docking-area.shortcut=C+e C+DOWN
+toggle-full-screen.shortcut=F11
+toggle-dock-areas.shortcut=F12
+global-options.shortcut=C+F12
+
+prev-marker.shortcut=C+e C+COMMA
+next-marker.shortcut=C+e C+PERIOD
+prev-bracket.shortcut=C+e C+OPEN_BRACKET
+next-bracket.shortcut=C+e C+CLOSE_BRACKET
+close-docking-area.shortcut=C+e C+BACK_QUOTE
+#}}}
+
+#{{{ C+e X
+# Unused: b e g h j k m o q t y z
+add-explicit-fold.shortcut=C+e a
+collapse-all-folds.shortcut=C+e c
+delete-paragraph.shortcut=C+e d
+format-paragraph.shortcut=C+e f
+find-previous.shortcut=C+e g
+invert-selection.shortcut=C+e i
+select-line.shortcut=C+e l
+narrow-to-fold.shortcut=C+e n n
+narrow-to-selection.shortcut=C+e n s
+select-paragraph.shortcut=C+e p
+remove-trailing-ws.shortcut=C+e r
+select-fold.shortcut=C+e s
+insert-literal.shortcut=C+e v
+select-word.shortcut=C+e w
+parent-fold.shortcut=C+e u
+expand-all-folds.shortcut=C+e x
+#}}}
+
+#{{{ C+e non-alpha
+expand-folds.shortcut=C+e ENTER
+#}}}
+
+#{{{ C+m C+X
+record-temp-macro.shortcut=C+m C+m
+run-temp-macro.shortcut=C+m C+p
+record-macro.shortcut=C+m C+r
+stop-recording.shortcut=C+m C+s
+last-macro.shortuct=C+m C+l
+#}}}
+
+#{{{ C+r C+X
+copy-append-string-register.shortcut=C+r C+a
+copy-string-register.shortcut=C+r C+c
+clear-register.shortcut=C+r C+l
+vertical-paste-string-register.shortcut=C+r C+p
+cut-append-string-register.shortcut=C+r C+u
+paste-string-register.shortcut=C+r C+v
+cut-string-register.shortcut=C+r C+x
+#}}}
+
+#{{{ A+non-alpha
+prev-fold.shortcut=A+UP
+next-fold.shortcut=A+DOWN
+shift-left.shortcut=A+LEFT
+shift-right.shortcut=A+RIGHT
+collapse-fold.shortcut=A+BACK_SPACE
+expand-fold.shortcut=AS+ENTER
+expand-one-level.shortcut=A+ENTER
+quick-search-word.shortcut=A+COMMA
+hypersearch-word.shortcut=A+PERIOD
+scroll-up-page.shortcut=A+QUOTE
+scroll-down-page.shortcut=A+SLASH
+prev-textarea.shortcut=A+PAGE_UP
+next-textarea.shortcut=A+PAGE_DOWN
+
+focus-buffer-switcher.shortcut=A+BACK_QUOTE
+toggle-rect-select.shortcut=A+BACK_SLASH
+#}}}
+
+#{{{ Other keys
+shift-left.shortcut2=S+TAB
+select-none.shortcut=ESCAPE
+backspace.shortcut=BACK_SPACE
+delete.shortcut=DELETE
+overwrite.shortcut=INSERT
+home.shortcut=HOME
+end.shortcut=END
+select-home.shortcut=S+HOME
+select-end.shortcut=S+END
+prev-page.shortcut=PAGE_UP
+next-page.shortcut=PAGE_DOWN
+select-prev-page.shortcut=S+PAGE_UP
+select-next-page.shortcut=S+PAGE_DOWN
+prev-char.shortcut=LEFT
+select-prev-char.shortcut=S+LEFT
+next-char.shortcut=RIGHT
+select-next-char.shortcut=S+RIGHT
+prev-line.shortcut=UP
+select-prev-line.shortcut=S+UP
+next-line.shortcut=DOWN
+select-next-line.shortcut=S+DOWN
+insert-newline-indent.shortcut=ENTER
+insert-tab-indent.shortcut=TAB
+#}}}
+
+#{{{ Alternative shortcuts for frequently-used commands
+next-page.shortcut2=A+a
+select-next-page.shortcut2=AS+a
+delete.shortcut2=A+d
+prev-line.shortcut2=A+i
+select-prev-line.shortcut2=AS+i
+prev-char.shortcut2=A+j
+select-prev-char.shortcut2=AS+j
+next-line.shortcut2=A+k
+select-next-line.shortcut2=AS+k
+next-char.shortcut2=A+l
+select-next-char.shortcut2=AS+l
+prev-page.shortcut2=A+q
+select-prev-page.shortcut2=AS+q
+end.shortcut2=A+x
+select-end.shortcut2=AS+x
+home.shortcut2=A+z
+select-home.shortcut2=AS+z
+copy.shortcut2=C+INSERT
+paste.shortcut2=S+INSERT
+cut.shortcut2=S+DELETE
+#}}}
diff --git a/jEdit/org/gjt/sp/jedit/killring.dtd b/jEdit/org/gjt/sp/jedit/killring.dtd
index afe73ff..dce96ff 100644
--- a/jEdit/org/gjt/sp/jedit/killring.dtd
+++ b/jEdit/org/gjt/sp/jedit/killring.dtd
@@ -1,5 +1,5 @@
-<!-- KILLRING element -->
-<!ELEMENT KILLRING ( ENTRY+ ) >
-
-<!-- ENTRY element -->
-<!ELEMENT ENTRY ( #PCDATA ) >
+<!-- KILLRING element -->
+<!ELEMENT KILLRING ( ENTRY+ ) >
+
+<!-- ENTRY element -->
+<!ELEMENT ENTRY ( #PCDATA ) >
diff --git a/jEdit/org/gjt/sp/jedit/menu/DirectoryProvider.java b/jEdit/org/gjt/sp/jedit/menu/DirectoryProvider.java
index 612a3b1..126cb6a 100644
--- a/jEdit/org/gjt/sp/jedit/menu/DirectoryProvider.java
+++ b/jEdit/org/gjt/sp/jedit/menu/DirectoryProvider.java
@@ -1,177 +1,177 @@
-/*
- * DirectoryProvider.java - File list menu
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.io.File;
-import java.util.Arrays;
-
-import org.gjt.sp.jedit.browser.*;
-import org.gjt.sp.jedit.io.FileVFS;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: DirectoryProvider.java 16207 2009-09-17 17:54:14Z shlomy $
- */
-public class DirectoryProvider implements DynamicMenuProvider
-{
- //{{{ DirectoryProvider constructor
- public DirectoryProvider(String dir)
- {
- this.dir = dir;
- } //}}}
-
- //{{{ updateEveryTime() method
- public boolean updateEveryTime()
- {
- return true;
- } //}}}
-
- //{{{ update() method
- public void update(JMenu menu)
- {
- final View view = GUIUtilities.getView(menu);
-
- String path;
- if(dir == null)
- {
- path = view.getBuffer().getDirectory();
- }
- else
- path = dir;
-
- JMenuItem mi = new JMenuItem(path + ':');
- mi.setActionCommand(path);
- mi.setIcon(FileCellRenderer.openDirIcon);
-
- //{{{ ActionListeners
- ActionListener fileListener = new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- jEdit.openFile(view,evt.getActionCommand());
- }
- };
-
- ActionListener dirListener = new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- VFSBrowser.browseDirectory(view,
- evt.getActionCommand());
- }
- }; //}}}
-
- mi.addActionListener(dirListener);
-
- menu.add(mi);
- menu.addSeparator();
-
- if(dir == null && !(view.getBuffer().getVFS() instanceof FileVFS))
- {
- mi = new JMenuItem(jEdit.getProperty(
- "directory.not-local"));
- mi.setEnabled(false);
- menu.add(mi);
- return;
- }
-
- File directory = new File(path);
-
- JMenu current = menu;
-
- // for filtering out backups
- String backupPrefix = jEdit.getProperty("backup.prefix");
- String backupSuffix = jEdit.getProperty("backup.suffix");
-
- File[] list = directory.listFiles();
- if(list == null || list.length == 0)
- {
- mi = new JMenuItem(jEdit.getProperty(
- "directory.no-files"));
- mi.setEnabled(false);
- menu.add(mi);
- }
- else
- {
- int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
-
- Arrays.sort(list,
- new StandardUtilities.StringCompare<File>(true));
- for(int i = 0; i < list.length; i++)
- {
- File file = list[i];
-
- String name = file.getName();
-
- // skip marker files
- if(name.endsWith(".marks"))
- continue;
-
- // skip autosave files
- if(name.startsWith("#") && name.endsWith("#"))
- continue;
-
- // skip backup files
- if((backupPrefix.length() != 0
- && name.startsWith(backupPrefix))
- || (backupSuffix.length() != 0
- && name.endsWith(backupSuffix)))
- continue;
-
- // skip directories
- //if(file.isDirectory())
- // continue;
-
- mi = new JMenuItem(name);
- mi.setActionCommand(file.getPath());
- mi.addActionListener(file.isDirectory()
- ? dirListener
- : fileListener);
- mi.setIcon(file.isDirectory()
- ? FileCellRenderer.dirIcon
- : FileCellRenderer.fileIcon);
-
- if(current.getItemCount() >= maxItems && i != list.length - 1)
- {
- //current.addSeparator();
- JMenu newCurrent = new JMenu(
- jEdit.getProperty(
- "common.more"));
- current.add(newCurrent);
- current = newCurrent;
- }
- current.add(mi);
- }
- }
- } //}}}
-
- //{{{ Private members
- private final String dir;
- //}}}
-}
+/*
+ * DirectoryProvider.java - File list menu
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.io.File;
+import java.util.Arrays;
+
+import org.gjt.sp.jedit.browser.*;
+import org.gjt.sp.jedit.io.FileVFS;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: DirectoryProvider.java 16207 2009-09-17 17:54:14Z shlomy $
+ */
+public class DirectoryProvider implements DynamicMenuProvider
+{
+ //{{{ DirectoryProvider constructor
+ public DirectoryProvider(String dir)
+ {
+ this.dir = dir;
+ } //}}}
+
+ //{{{ updateEveryTime() method
+ public boolean updateEveryTime()
+ {
+ return true;
+ } //}}}
+
+ //{{{ update() method
+ public void update(JMenu menu)
+ {
+ final View view = GUIUtilities.getView(menu);
+
+ String path;
+ if(dir == null)
+ {
+ path = view.getBuffer().getDirectory();
+ }
+ else
+ path = dir;
+
+ JMenuItem mi = new JMenuItem(path + ':');
+ mi.setActionCommand(path);
+ mi.setIcon(FileCellRenderer.openDirIcon);
+
+ //{{{ ActionListeners
+ ActionListener fileListener = new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ jEdit.openFile(view,evt.getActionCommand());
+ }
+ };
+
+ ActionListener dirListener = new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ VFSBrowser.browseDirectory(view,
+ evt.getActionCommand());
+ }
+ }; //}}}
+
+ mi.addActionListener(dirListener);
+
+ menu.add(mi);
+ menu.addSeparator();
+
+ if(dir == null && !(view.getBuffer().getVFS() instanceof FileVFS))
+ {
+ mi = new JMenuItem(jEdit.getProperty(
+ "directory.not-local"));
+ mi.setEnabled(false);
+ menu.add(mi);
+ return;
+ }
+
+ File directory = new File(path);
+
+ JMenu current = menu;
+
+ // for filtering out backups
+ String backupPrefix = jEdit.getProperty("backup.prefix");
+ String backupSuffix = jEdit.getProperty("backup.suffix");
+
+ File[] list = directory.listFiles();
+ if(list == null || list.length == 0)
+ {
+ mi = new JMenuItem(jEdit.getProperty(
+ "directory.no-files"));
+ mi.setEnabled(false);
+ menu.add(mi);
+ }
+ else
+ {
+ int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
+
+ Arrays.sort(list,
+ new StandardUtilities.StringCompare<File>(true));
+ for(int i = 0; i < list.length; i++)
+ {
+ File file = list[i];
+
+ String name = file.getName();
+
+ // skip marker files
+ if(name.endsWith(".marks"))
+ continue;
+
+ // skip autosave files
+ if(name.startsWith("#") && name.endsWith("#"))
+ continue;
+
+ // skip backup files
+ if((backupPrefix.length() != 0
+ && name.startsWith(backupPrefix))
+ || (backupSuffix.length() != 0
+ && name.endsWith(backupSuffix)))
+ continue;
+
+ // skip directories
+ //if(file.isDirectory())
+ // continue;
+
+ mi = new JMenuItem(name);
+ mi.setActionCommand(file.getPath());
+ mi.addActionListener(file.isDirectory()
+ ? dirListener
+ : fileListener);
+ mi.setIcon(file.isDirectory()
+ ? FileCellRenderer.dirIcon
+ : FileCellRenderer.fileIcon);
+
+ if(current.getItemCount() >= maxItems && i != list.length - 1)
+ {
+ //current.addSeparator();
+ JMenu newCurrent = new JMenu(
+ jEdit.getProperty(
+ "common.more"));
+ current.add(newCurrent);
+ current = newCurrent;
+ }
+ current.add(mi);
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+ private final String dir;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/DynamicMenuProvider.java b/jEdit/org/gjt/sp/jedit/menu/DynamicMenuProvider.java
index e541601..073a0ce 100644
--- a/jEdit/org/gjt/sp/jedit/menu/DynamicMenuProvider.java
+++ b/jEdit/org/gjt/sp/jedit/menu/DynamicMenuProvider.java
@@ -1,52 +1,52 @@
-/*
- * DynamicMenuProvider.java - API for dynamic plugin menus
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-import javax.swing.JMenu;
-
-/**
- * Interface for a pull-down menu whose contents are determined at runtime.<p>
- *
- * See {@link org.gjt.sp.jedit.EditPlugin} for properties you need to define to
- * have your plugin provide a dynamic menu.
- *
- * @since jEdit 4.2pre2
- * @author Slava Pestov
- * @version $Id: DynamicMenuProvider.java 13060 2008-07-17 18:22:42Z ezust $
- */
-public interface DynamicMenuProvider
-{
- /**
- * Returns true if the menu should be updated each time it is shown.
- * Otherwise, it will only be updated when the menu is first created,
- * and if the menu receives a {@link
- * org.gjt.sp.jedit.msg.DynamicMenuChanged} message.
- */
- boolean updateEveryTime();
-
- /**
- * Adds the menu items to the given menu.
- * @param menu The menu
- */
- void update(JMenu menu);
-}
+/*
+ * DynamicMenuProvider.java - API for dynamic plugin menus
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+import javax.swing.JMenu;
+
+/**
+ * Interface for a pull-down menu whose contents are determined at runtime.<p>
+ *
+ * See {@link org.gjt.sp.jedit.EditPlugin} for properties you need to define to
+ * have your plugin provide a dynamic menu.
+ *
+ * @since jEdit 4.2pre2
+ * @author Slava Pestov
+ * @version $Id: DynamicMenuProvider.java 13060 2008-07-17 18:22:42Z ezust $
+ */
+public interface DynamicMenuProvider
+{
+ /**
+ * Returns true if the menu should be updated each time it is shown.
+ * Otherwise, it will only be updated when the menu is first created,
+ * and if the menu receives a {@link
+ * org.gjt.sp.jedit.msg.DynamicMenuChanged} message.
+ */
+ boolean updateEveryTime();
+
+ /**
+ * Adds the menu items to the given menu.
+ * @param menu The menu
+ */
+ void update(JMenu menu);
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/EnhancedCheckBoxMenuItem.java b/jEdit/org/gjt/sp/jedit/menu/EnhancedCheckBoxMenuItem.java
index a6940d6..38af96d 100644
--- a/jEdit/org/gjt/sp/jedit/menu/EnhancedCheckBoxMenuItem.java
+++ b/jEdit/org/gjt/sp/jedit/menu/EnhancedCheckBoxMenuItem.java
@@ -1,184 +1,196 @@
-/*
- * EnhancedCheckBoxMenuItem.java - Check box menu item
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * jEdit's custom menu item. It adds support for multi-key shortcuts.
- */
-public class EnhancedCheckBoxMenuItem extends JCheckBoxMenuItem
-{
- //{{{ EnhancedCheckBoxMenuItem constructor
- /**
- * Creates a new menu item. Most plugins should call
- * GUIUtilities.loadMenuItem() instead.
- * @param label The menu item label
- * @param action The edit action
- * @param context An action context
- * @since jEdit 4.2pre1
- */
- public EnhancedCheckBoxMenuItem(String label, String action,
- ActionContext context)
- {
- this.context = context;
- this.action = action;
- this.shortcut = GUIUtilities.getShortcutLabel(action);
- if(OperatingSystem.hasScreenMenuBar() && shortcut != null)
- {
- setText(label + " (" + shortcut + ")");
- shortcut = null;
- }
- else
- setText(label);
-
- if(action != null)
- {
- setEnabled(true);
- addActionListener(new EditAction.Wrapper(context,action));
-
- addMouseListener(new MouseHandler());
- }
- else
- setEnabled(false);
-
- setModel(new Model());
- } //}}}
-
- //{{{ getPreferredSize() method
- public Dimension getPreferredSize()
- {
- Dimension d = super.getPreferredSize();
-
- if(shortcut != null)
- {
- d.width += (getFontMetrics(EnhancedMenuItem.acceleratorFont)
- .stringWidth(shortcut) + 15);
- }
- return d;
- } //}}}
-
- //{{{ paint() method
- public void paint(Graphics g)
- {
- super.paint(g);
-
- if(shortcut != null)
- {
- g.setFont(EnhancedMenuItem.acceleratorFont);
- g.setColor(getModel().isArmed() ?
- EnhancedMenuItem.acceleratorSelectionForeground :
- EnhancedMenuItem.acceleratorForeground);
- FontMetrics fm = g.getFontMetrics();
- Insets insets = getInsets();
- g.drawString(shortcut,getWidth() - (fm.stringWidth(
- shortcut) + insets.right + insets.left + 5),
- getFont().getSize() + (insets.top -
- (OperatingSystem.isMacOSLF() ? 0 : 1))
- /* XXX magic number */);
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private ActionContext context;
- private String shortcut;
- private String action;
- //}}}
-
- //}}}
-
- //{{{ Model class
- class Model extends DefaultButtonModel
- {
- public boolean isSelected()
- {
- if(!isShowing())
- return false;
-
- EditAction a = context.getAction(action);
- if(a == null)
- {
- Log.log(Log.WARNING,this,"Unknown action: "
- + action);
- return false;
- }
-
- try
- {
- return a.isSelected(EnhancedCheckBoxMenuItem.this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,t);
- return false;
- }
- }
-
- public void setSelected(boolean b) {}
- } //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- boolean msgSet = false;
-
- public void mouseReleased(MouseEvent evt)
- {
- if(msgSet)
- {
- GUIUtilities.getView((Component)evt.getSource())
- .getStatus().setMessage(null);
- msgSet = false;
- }
- }
-
- public void mouseEntered(MouseEvent evt)
- {
- String msg = jEdit.getProperty(action + ".mouse-over");
- if(msg != null)
- {
- GUIUtilities.getView((Component)evt.getSource())
- .getStatus().setMessage(msg);
- msgSet = true;
- }
- }
-
- public void mouseExited(MouseEvent evt)
- {
- if(msgSet)
- {
- GUIUtilities.getView((Component)evt.getSource())
- .getStatus().setMessage(null);
- msgSet = false;
- }
- }
- } //}}}
-}
+/*
+ * EnhancedCheckBoxMenuItem.java - Check box menu item
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * jEdit's custom menu item. It adds support for multi-key shortcuts.
+ */
+public class EnhancedCheckBoxMenuItem extends JCheckBoxMenuItem
+{
+ //{{{ EnhancedCheckBoxMenuItem constructor
+ /**
+ * Creates a new menu item. Most plugins should call
+ * GUIUtilities.loadMenuItem() instead.
+ * @param label The menu item label
+ * @param action The edit action
+ * @param context An action context
+ * @since jEdit 4.2pre1
+ */
+ public EnhancedCheckBoxMenuItem(String label, String action,
+ ActionContext context)
+ {
+ this.context = context;
+ this.action = action;
+ this.shortcut = GUIUtilities.getShortcutLabel(action);
+ String toolTip = jEdit.getProperty(action+ ".tooltip");
+ if (toolTip != null) {
+ setToolTipText(toolTip);
+ }
+
+ if(OperatingSystem.hasScreenMenuBar() && shortcut != null)
+ {
+ setText(label + " (" + shortcut + ')');
+ shortcut = null;
+ }
+ else
+ setText(label);
+
+ if(action != null)
+ {
+ setEnabled(true);
+ addActionListener(new EditAction.Wrapper(context,action));
+
+ addMouseListener(new MouseHandler());
+ }
+ else
+ setEnabled(false);
+
+ setModel(new Model());
+ } //}}}
+
+ //{{{ getPreferredSize() method
+ @Override
+ public Dimension getPreferredSize()
+ {
+ Dimension d = super.getPreferredSize();
+
+ if(shortcut != null)
+ {
+ d.width += (getFontMetrics(EnhancedMenuItem.acceleratorFont)
+ .stringWidth(shortcut) + 15);
+ }
+ return d;
+ } //}}}
+
+ //{{{ paint() method
+ @Override
+ public void paint(Graphics g)
+ {
+ super.paint(g);
+
+ if(shortcut != null)
+ {
+ g.setFont(EnhancedMenuItem.acceleratorFont);
+ g.setColor(getModel().isArmed() ?
+ EnhancedMenuItem.acceleratorSelectionForeground :
+ EnhancedMenuItem.acceleratorForeground);
+ FontMetrics fm = g.getFontMetrics();
+ Insets insets = getInsets();
+ g.drawString(shortcut,getWidth() - (fm.stringWidth(
+ shortcut) + insets.right + insets.left + 5),
+ getFont().getSize() + (insets.top -
+ (OperatingSystem.isMacOSLF() ? 0 : 1))
+ /* XXX magic number */);
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private final ActionContext context;
+ private String shortcut;
+ private final String action;
+ //}}}
+
+ //}}}
+
+ //{{{ Model class
+ class Model extends DefaultButtonModel
+ {
+ @Override
+ public boolean isSelected()
+ {
+ if(!isShowing())
+ return false;
+
+ EditAction a = context.getAction(action);
+ if(a == null)
+ {
+ Log.log(Log.WARNING,this,"Unknown action: "
+ + action);
+ return false;
+ }
+
+ try
+ {
+ return a.isSelected(EnhancedCheckBoxMenuItem.this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,t);
+ return false;
+ }
+ }
+
+ @Override
+ public void setSelected(boolean b) {}
+ } //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ boolean msgSet = false;
+
+ @Override
+ public void mouseReleased(MouseEvent evt)
+ {
+ if(msgSet)
+ {
+ GUIUtilities.getView((Component)evt.getSource())
+ .getStatus().setMessage(null);
+ msgSet = false;
+ }
+ }
+
+ @Override
+ public void mouseEntered(MouseEvent evt)
+ {
+ String msg = jEdit.getProperty(action + ".mouse-over");
+ if(msg != null)
+ {
+ GUIUtilities.getView((Component)evt.getSource())
+ .getStatus().setMessage(msg);
+ msgSet = true;
+ }
+ }
+
+ @Override
+ public void mouseExited(MouseEvent evt)
+ {
+ if(msgSet)
+ {
+ GUIUtilities.getView((Component)evt.getSource())
+ .getStatus().setMessage(null);
+ msgSet = false;
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/EnhancedMenu.java b/jEdit/org/gjt/sp/jedit/menu/EnhancedMenu.java
index 6bf9c02..4335479 100644
--- a/jEdit/org/gjt/sp/jedit/menu/EnhancedMenu.java
+++ b/jEdit/org/gjt/sp/jedit/menu/EnhancedMenu.java
@@ -1,188 +1,189 @@
-/*
- * EnhancedMenu.java - jEdit menu
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-import javax.swing.event.*;
-import javax.swing.*;
-import java.util.StringTokenizer;
-import org.gjt.sp.jedit.msg.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class EnhancedMenu extends JMenu implements MenuListener
-{
- //{{{ EnhancedMenu constructor
- public EnhancedMenu(String name)
- {
- this(name,jEdit.getProperty(name.concat(".label")),
- jEdit.getActionContext());
- } //}}}
-
- //{{{ EnhancedMenu constructor
- public EnhancedMenu(String name, String label)
- {
- this(name,label,jEdit.getActionContext());
- } //}}}
-
- //{{{ EnhancedMenu constructor
- public EnhancedMenu(String name, String label, ActionContext context)
- {
- this.context = context;
- if(label == null)
- label = name;
-
- char mnemonic;
- int index = label.indexOf('$');
- if(index != -1 && label.length() - index > 1)
- {
- mnemonic = Character.toLowerCase(label.charAt(index + 1));
- label = label.substring(0,index).concat(label.substring(++index));
- }
- else
- mnemonic = '\0';
-
- setText(label);
- if(!OperatingSystem.isMacOS())
- setMnemonic(mnemonic);
-
- String menuItems = jEdit.getProperty(name);
- if(menuItems != null)
- {
- StringTokenizer st = new StringTokenizer(menuItems);
- while(st.hasMoreTokens())
- {
- String menuItemName = st.nextToken();
- if(menuItemName.equals("-"))
- addSeparator();
- else
- add(GUIUtilities.loadMenuItem(context,menuItemName,true));
- }
- }
-
- initialComponentCount = getMenuComponentCount();
-
- providerCode = jEdit.getProperty(name + ".code");
-
- ebStub = new EditBusStub(name);
- ebStub.menuOutOfDate = true;
-
- addMenuListener(this);
-
- if(providerCode != null)
- EditBus.addToBus(ebStub);
- } //}}}
-
- //{{{ menuSelected() method
- public void menuSelected(MenuEvent evt)
- {
- init();
- } //}}}
-
- public void menuDeselected(MenuEvent e) {}
-
- public void menuCanceled(MenuEvent e) {}
-
- //{{{ init() method
- public void init()
- {
- if(providerCode == null)
- return;
-
- if(provider == null)
- {
- Object obj = BeanShell.eval(null,
- BeanShell.getNameSpace(),
- providerCode);
- provider = (DynamicMenuProvider)obj;
- }
-
- if(provider == null)
- {
- // error
- providerCode = null;
- return;
- }
-
- if(ebStub.menuOutOfDate || provider.updateEveryTime())
- {
- ebStub.menuOutOfDate = false;
-
- while(getMenuComponentCount() != initialComponentCount)
- remove(getMenuComponentCount() - 1);
-
- if(provider != null)
- provider.update(this);
- }
- } //}}}
-
- //{{{ Protected members
- protected int initialComponentCount;
- protected ActionContext context;
-
- protected String providerCode;
- protected DynamicMenuProvider provider;
-
- protected EditBusStub ebStub;
-
- //{{{ finalize() method
- protected void finalize() throws Exception
- {
- if(ebStub != null)
- EditBus.removeFromBus(ebStub);
- } //}}}
-
- //}}}
-
- //{{{ EditBusStub class
- /* EnhancedMenu has a reference to EditBusStub, but not the other
- * way around. So when the EnhancedMenu is being garbage collected
- * its finalize() method removes the EditBusStub from the edit bus. */
- static class EditBusStub implements EBComponent
- {
- String name;
- boolean menuOutOfDate;
-
- EditBusStub(String name)
- {
- this.name = name;
- menuOutOfDate = true;
- }
-
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof DynamicMenuChanged
- && name.equals(((DynamicMenuChanged)msg)
- .getMenuName()))
- {
- menuOutOfDate = true;
- }
- else if(msg instanceof PropertiesChanged)
- {
- // while this might be questionable, some
- // menus depend on properties
- menuOutOfDate = true;
- }
- }
- } //}}}
-}
+/*
+ * EnhancedMenu.java - jEdit menu
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+import javax.swing.event.*;
+import javax.swing.*;
+import java.util.StringTokenizer;
+
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.msg.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class EnhancedMenu extends JMenu implements MenuListener
+{
+ //{{{ EnhancedMenu constructor
+ public EnhancedMenu(String name)
+ {
+ this(name,jEdit.getProperty(name.concat(".label")),
+ jEdit.getActionContext());
+ } //}}}
+
+ //{{{ EnhancedMenu constructor
+ public EnhancedMenu(String name, String label)
+ {
+ this(name,label,jEdit.getActionContext());
+ } //}}}
+
+ //{{{ EnhancedMenu constructor
+ public EnhancedMenu(String name, String label, ActionContext context)
+ {
+ this.context = context;
+ if(label == null)
+ label = name;
+
+ char mnemonic;
+ int index = label.indexOf('$');
+ if(index != -1 && label.length() - index > 1)
+ {
+ mnemonic = Character.toLowerCase(label.charAt(index + 1));
+ label = label.substring(0,index).concat(label.substring(++index));
+ }
+ else
+ mnemonic = '\0';
+
+ setText(label);
+ if(!OperatingSystem.isMacOS())
+ setMnemonic(mnemonic);
+
+ String menuItems = jEdit.getProperty(name);
+ if(menuItems != null)
+ {
+ StringTokenizer st = new StringTokenizer(menuItems);
+ while(st.hasMoreTokens())
+ {
+ String menuItemName = st.nextToken();
+ if(menuItemName.equals("-"))
+ addSeparator();
+ else
+ add(GUIUtilities.loadMenuItem(context,menuItemName,true));
+ }
+ }
+
+ initialComponentCount = getMenuComponentCount();
+
+ providerCode = jEdit.getProperty(name + ".code");
+
+ ebStub = new EditBusStub(name);
+ ebStub.menuOutOfDate = true;
+
+ addMenuListener(this);
+
+ if(providerCode != null)
+ EditBus.addToBus(ebStub);
+ } //}}}
+
+ //{{{ menuSelected() method
+ public void menuSelected(MenuEvent evt)
+ {
+ init();
+ } //}}}
+
+ public void menuDeselected(MenuEvent e) {}
+
+ public void menuCanceled(MenuEvent e) {}
+
+ //{{{ init() method
+ public void init()
+ {
+ if(providerCode == null)
+ return;
+
+ if(provider == null)
+ {
+ Object obj = BeanShell.eval(null,
+ BeanShell.getNameSpace(),
+ providerCode);
+ provider = (DynamicMenuProvider)obj;
+ }
+
+ if(provider == null)
+ {
+ // error
+ providerCode = null;
+ return;
+ }
+
+ if(ebStub.menuOutOfDate || provider.updateEveryTime())
+ {
+ ebStub.menuOutOfDate = false;
+
+ while(getMenuComponentCount() != initialComponentCount)
+ remove(getMenuComponentCount() - 1);
+
+ if(provider != null)
+ provider.update(this);
+ }
+ } //}}}
+
+ //{{{ Protected members
+ protected int initialComponentCount;
+ protected ActionContext context;
+
+ protected String providerCode;
+ protected DynamicMenuProvider provider;
+
+ protected EditBusStub ebStub;
+
+ //{{{ finalize() method
+ protected void finalize() throws Exception
+ {
+ if(ebStub != null)
+ EditBus.removeFromBus(ebStub);
+ } //}}}
+
+ //}}}
+
+ //{{{ EditBusStub class
+ /* EnhancedMenu has a reference to EditBusStub, but not the other
+ * way around. So when the EnhancedMenu is being garbage collected
+ * its finalize() method removes the EditBusStub from the edit bus. */
+ public static class EditBusStub
+ {
+ String name;
+ boolean menuOutOfDate;
+
+ EditBusStub(String name)
+ {
+ this.name = name;
+ menuOutOfDate = true;
+ }
+
+ @EBHandler
+ public void handleDynamicMenuChanged(DynamicMenuChanged msg)
+ {
+ if (name.equals(msg.getMenuName()))
+ menuOutOfDate = true;
+ }
+
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged msg)
+ {
+ // while this might be questionable, some
+ // menus depend on properties
+ menuOutOfDate = true;
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/EnhancedMenuItem.java b/jEdit/org/gjt/sp/jedit/menu/EnhancedMenuItem.java
index 650a151..17c6d27 100644
--- a/jEdit/org/gjt/sp/jedit/menu/EnhancedMenuItem.java
+++ b/jEdit/org/gjt/sp/jedit/menu/EnhancedMenuItem.java
@@ -1,193 +1,198 @@
-/*
- * EnhancedMenuItem.java - Menu item with user-specified accelerator string
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.StatusBar;
-//}}}
-
-/**
- * jEdit's custom menu item. It adds support for multi-key shortcuts.
- */
-public class EnhancedMenuItem extends JMenuItem
-{
- //{{{ EnhancedMenuItem constructor
- /**
- * Creates a new menu item. Most plugins should call
- * GUIUtilities.loadMenuItem() instead.
- * @param label The menu item label
- * @param action The edit action
- * @param context An action context
- * @since jEdit 4.2pre1
- */
- public EnhancedMenuItem(String label, String action, ActionContext context)
- {
- this.action = action;
- this.shortcut = GUIUtilities.getShortcutLabel(action);
- if(OperatingSystem.hasScreenMenuBar() && shortcut != null)
- {
- setText(label + " (" + shortcut + ")");
- shortcut = null;
- }
- else
- setText(label);
-
- if(action != null)
- {
- setEnabled(true);
- addActionListener(new EditAction.Wrapper(context,action));
- addMouseListener(new MouseHandler());
- }
- else
- setEnabled(false);
- } //}}}
-
- //{{{ getPreferredSize() method
- public Dimension getPreferredSize()
- {
- Dimension d = super.getPreferredSize();
-
- if(shortcut != null)
- {
- d.width += (getFontMetrics(acceleratorFont)
- .stringWidth(shortcut) + 15);
- }
- return d;
- } //}}}
-
- //{{{ paint() method
- public void paint(Graphics g)
- {
- super.paint(g);
-
- if(shortcut != null)
- {
- g.setFont(acceleratorFont);
- g.setColor(getModel().isArmed() ?
- acceleratorSelectionForeground :
- acceleratorForeground);
- FontMetrics fm = g.getFontMetrics();
- Insets insets = getInsets();
- g.drawString(shortcut,getWidth() - (fm.stringWidth(
- shortcut) + insets.right + insets.left + 5),
- getFont().getSize() + (insets.top -
- (OperatingSystem.isMacOSLF() ? 0 : 1))
- /* XXX magic number */);
- }
- } //}}}
-
- //{{{ Package-private members
- static Font acceleratorFont;
- static Color acceleratorForeground;
- static Color acceleratorSelectionForeground;
- //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private String shortcut;
- private String action;
- //}}}
-
- //{{{ Class initializer
- static
- {
- String shortcutFont;
- if (OperatingSystem.isMacOSLF())
- {
- shortcutFont = "Lucida Grande";
- }
- else
- {
- shortcutFont = "Monospaced";
- }
-
- acceleratorFont = UIManager.getFont("MenuItem.acceleratorFont");
- if(acceleratorFont == null)
- {
- acceleratorFont = new Font(shortcutFont,Font.PLAIN,12);
- }
- acceleratorForeground = UIManager
- .getColor("MenuItem.acceleratorForeground");
- if(acceleratorForeground == null)
- {
- acceleratorForeground = Color.black;
- }
-
- acceleratorSelectionForeground = UIManager
- .getColor("MenuItem.acceleratorSelectionForeground");
- if(acceleratorSelectionForeground == null)
- {
- acceleratorSelectionForeground = Color.black;
- }
- } //}}}
-
- //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- boolean msgSet = false;
- private String msg;
-
- public void mouseReleased(MouseEvent evt)
- {
- cleanupStatusBar(evt);
- }
-
- public void mouseEntered(MouseEvent evt)
- {
- msg = jEdit.getProperty(action + ".mouse-over");
- if(msg != null)
- {
- GUIUtilities.getView((Component)evt.getSource())
- .getStatus().setMessage(msg);
- msgSet = true;
- }
- }
-
- public void mouseExited(MouseEvent evt)
- {
- cleanupStatusBar(evt);
- }
-
- private void cleanupStatusBar(MouseEvent evt)
- {
- if(msgSet)
- {
- StatusBar statusBar = GUIUtilities.getView((Component) evt.getSource())
- .getStatus();
- if (msg == statusBar.getMessage())
- {
- statusBar.setMessage(null);
- }
- msgSet = false;
- msg = null;
- }
- }
- } //}}}
-}
+/*
+ * EnhancedMenuItem.java - Menu item with user-specified accelerator string
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.gui.StatusBar;
+//}}}
+
+/**
+ * jEdit's custom menu item. It adds support for multi-key shortcuts.
+ */
+public class EnhancedMenuItem extends JMenuItem
+{
+ //{{{ EnhancedMenuItem constructor
+ /**
+ * Creates a new menu item. Most plugins should call
+ * GUIUtilities.loadMenuItem() instead.
+ * @param label The menu item label
+ * @param action The edit action
+ * @param context An action context
+ * @since jEdit 4.2pre1
+ */
+ public EnhancedMenuItem(String label, String action, ActionContext context)
+ {
+ this.action = action;
+ this.shortcut = GUIUtilities.getShortcutLabel(action);
+ String toolTip = jEdit.getProperty(action+ ".tooltip");
+ if (toolTip != null) {
+ setToolTipText(toolTip);
+ }
+
+ if(OperatingSystem.hasScreenMenuBar() && shortcut != null)
+ {
+ setText(label + " (" + shortcut + ")");
+ shortcut = null;
+ }
+ else
+ setText(label);
+
+ if(action != null)
+ {
+ setEnabled(true);
+ addActionListener(new EditAction.Wrapper(context,action));
+ addMouseListener(new MouseHandler());
+ }
+ else
+ setEnabled(false);
+ } //}}}
+
+ //{{{ getPreferredSize() method
+ public Dimension getPreferredSize()
+ {
+ Dimension d = super.getPreferredSize();
+
+ if(shortcut != null)
+ {
+ d.width += (getFontMetrics(acceleratorFont)
+ .stringWidth(shortcut) + 15);
+ }
+ return d;
+ } //}}}
+
+ //{{{ paint() method
+ public void paint(Graphics g)
+ {
+ super.paint(g);
+
+ if(shortcut != null)
+ {
+ g.setFont(acceleratorFont);
+ g.setColor(getModel().isArmed() ?
+ acceleratorSelectionForeground :
+ acceleratorForeground);
+ FontMetrics fm = g.getFontMetrics();
+ Insets insets = getInsets();
+ g.drawString(shortcut,getWidth() - (fm.stringWidth(
+ shortcut) + insets.right + insets.left + 5),
+ getFont().getSize() + (insets.top -
+ (OperatingSystem.isMacOSLF() ? 0 : 1))
+ /* XXX magic number */);
+ }
+ } //}}}
+
+ //{{{ Package-private members
+ static Font acceleratorFont;
+ static Color acceleratorForeground;
+ static Color acceleratorSelectionForeground;
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private String shortcut;
+ private String action;
+ //}}}
+
+ //{{{ Class initializer
+ static
+ {
+ String shortcutFont;
+ if (OperatingSystem.isMacOSLF())
+ {
+ shortcutFont = "Lucida Grande";
+ }
+ else
+ {
+ shortcutFont = "Monospaced";
+ }
+
+ acceleratorFont = UIManager.getFont("MenuItem.acceleratorFont");
+ if(acceleratorFont == null)
+ {
+ acceleratorFont = new Font(shortcutFont,Font.PLAIN,12);
+ }
+ acceleratorForeground = UIManager
+ .getColor("MenuItem.acceleratorForeground");
+ if(acceleratorForeground == null)
+ {
+ acceleratorForeground = Color.black;
+ }
+
+ acceleratorSelectionForeground = UIManager
+ .getColor("MenuItem.acceleratorSelectionForeground");
+ if(acceleratorSelectionForeground == null)
+ {
+ acceleratorSelectionForeground = Color.black;
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ boolean msgSet = false;
+ private String msg;
+
+ public void mouseReleased(MouseEvent evt)
+ {
+ cleanupStatusBar(evt);
+ }
+
+ public void mouseEntered(MouseEvent evt)
+ {
+ msg = jEdit.getProperty(action + ".mouse-over");
+ if(msg != null)
+ {
+ GUIUtilities.getView((Component)evt.getSource())
+ .getStatus().setMessage(msg);
+ msgSet = true;
+ }
+ }
+
+ public void mouseExited(MouseEvent evt)
+ {
+ cleanupStatusBar(evt);
+ }
+
+ private void cleanupStatusBar(MouseEvent evt)
+ {
+ if(msgSet)
+ {
+ StatusBar statusBar = GUIUtilities.getView((Component) evt.getSource())
+ .getStatus();
+ if (msg == statusBar.getMessage())
+ {
+ statusBar.setMessage(null);
+ }
+ msgSet = false;
+ msg = null;
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/FavoritesProvider.java b/jEdit/org/gjt/sp/jedit/menu/FavoritesProvider.java
index c6674db..fc4827c 100644
--- a/jEdit/org/gjt/sp/jedit/menu/FavoritesProvider.java
+++ b/jEdit/org/gjt/sp/jedit/menu/FavoritesProvider.java
@@ -1,102 +1,102 @@
-/*
- * FavoritesProvider.java - Favorites list menu
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.util.Arrays;
-
-import org.gjt.sp.jedit.browser.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class FavoritesProvider implements DynamicMenuProvider
-{
- //{{{ updateEveryTime() method
- public boolean updateEveryTime()
- {
- return false;
- } //}}}
-
- //{{{ update() method
- public void update(JMenu menu)
- {
- final View view = GUIUtilities.getView(menu);
-
- //{{{ ActionListeners
- ActionListener fileListener = new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- jEdit.openFile(view,evt.getActionCommand());
- }
- };
-
- ActionListener dirListener = new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- VFSBrowser.browseDirectory(view,
- evt.getActionCommand());
- }
- }; //}}}
-
- VFSFile[] favorites = FavoritesVFS.getFavorites();
- if(favorites.length == 0)
- {
- JMenuItem mi = new JMenuItem(
- jEdit.getProperty(
- "vfs.browser.favorites"
- + ".no-favorites.label"));
- mi.setEnabled(false);
- menu.add(mi);
- }
- else
- {
- Arrays.sort(favorites,
- new VFS.DirectoryEntryCompare(
- jEdit.getBooleanProperty("vfs.browser.sortMixFilesAndDirs"),
- jEdit.getBooleanProperty("vfs.browser.sortIgnoreCase")));
- for(int i = 0; i < favorites.length; i++)
- {
- VFSFile favorite = favorites[i];
- JMenuItem mi = new JMenuItem(
- favorite.getPath());
- mi.setIcon(FileCellRenderer
- .getIconForFile(
- favorite,false));
- if(favorite.getType() == VFSFile.FILE)
- {
- mi.addActionListener(fileListener);
- }
- else
- {
- mi.addActionListener(dirListener);
- }
- menu.add(mi);
- }
- }
- } //}}}
-}
+/*
+ * FavoritesProvider.java - Favorites list menu
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.util.Arrays;
+
+import org.gjt.sp.jedit.browser.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class FavoritesProvider implements DynamicMenuProvider
+{
+ //{{{ updateEveryTime() method
+ public boolean updateEveryTime()
+ {
+ return false;
+ } //}}}
+
+ //{{{ update() method
+ public void update(JMenu menu)
+ {
+ final View view = GUIUtilities.getView(menu);
+
+ //{{{ ActionListeners
+ ActionListener fileListener = new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ jEdit.openFile(view,evt.getActionCommand());
+ }
+ };
+
+ ActionListener dirListener = new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ VFSBrowser.browseDirectory(view,
+ evt.getActionCommand());
+ }
+ }; //}}}
+
+ VFSFile[] favorites = FavoritesVFS.getFavorites();
+ if(favorites.length == 0)
+ {
+ JMenuItem mi = new JMenuItem(
+ jEdit.getProperty(
+ "vfs.browser.favorites"
+ + ".no-favorites.label"));
+ mi.setEnabled(false);
+ menu.add(mi);
+ }
+ else
+ {
+ Arrays.sort(favorites,
+ new VFS.DirectoryEntryCompare(
+ jEdit.getBooleanProperty("vfs.browser.sortMixFilesAndDirs"),
+ jEdit.getBooleanProperty("vfs.browser.sortIgnoreCase")));
+ for(int i = 0; i < favorites.length; i++)
+ {
+ VFSFile favorite = favorites[i];
+ JMenuItem mi = new JMenuItem(
+ favorite.getPath());
+ mi.setIcon(FileCellRenderer
+ .getIconForFile(
+ favorite,false));
+ if(favorite.getType() == VFSFile.FILE)
+ {
+ mi.addActionListener(fileListener);
+ }
+ else
+ {
+ mi.addActionListener(dirListener);
+ }
+ menu.add(mi);
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/MacrosProvider.java b/jEdit/org/gjt/sp/jedit/menu/MacrosProvider.java
index 20772de..7b6025e 100644
--- a/jEdit/org/gjt/sp/jedit/menu/MacrosProvider.java
+++ b/jEdit/org/gjt/sp/jedit/menu/MacrosProvider.java
@@ -1,89 +1,89 @@
-/*
- * MacrosProvider.java - Macros menu
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-import javax.swing.*;
-import java.util.Collections;
-import java.util.Vector;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class MacrosProvider implements DynamicMenuProvider
-{
- //{{{ updateEveryTime() method
- public boolean updateEveryTime()
- {
- return false;
- } //}}}
-
- //{{{ update() method
- public void update(JMenu menu)
- {
- Vector macroVector = Macros.getMacroHierarchy();
-
- int count = menu.getMenuComponentCount();
-
- createMacrosMenu(menu,macroVector,0);
-
- if(count == menu.getMenuComponentCount())
- {
- JMenuItem mi = new JMenuItem(jEdit.getProperty(
- "no-macros.label"));
- mi.setEnabled(false);
- menu.add(mi);
- }
- } //}}}
-
- //{{{ createMacrosMenu() method
- private void createMacrosMenu(JMenu menu, Vector vector, int start)
- {
- Vector<JMenuItem> menuItems = new Vector<JMenuItem>();
-
- for(int i = start; i < vector.size(); i++)
- {
- Object obj = vector.elementAt(i);
- if(obj instanceof String)
- {
- menuItems.add(new EnhancedMenuItem(
- jEdit.getProperty(obj + ".label"),
- (String)obj,jEdit.getActionContext()));
- }
- else if(obj instanceof Vector)
- {
- Vector subvector = (Vector)obj;
- String name = (String)subvector.elementAt(0);
- JMenu submenu = new JMenu(name);
- createMacrosMenu(submenu,subvector,1);
- if(submenu.getMenuComponentCount() != 0)
- menuItems.add(submenu);
- }
- }
-
- Collections.sort(menuItems, new MenuItemTextComparator());
- for(int i = 0; i < menuItems.size(); i++)
- {
- menu.add(menuItems.get(i));
- }
- } //}}}
-}
+/*
+ * MacrosProvider.java - Macros menu
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+import javax.swing.*;
+import java.util.Collections;
+import java.util.Vector;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class MacrosProvider implements DynamicMenuProvider
+{
+ //{{{ updateEveryTime() method
+ public boolean updateEveryTime()
+ {
+ return false;
+ } //}}}
+
+ //{{{ update() method
+ public void update(JMenu menu)
+ {
+ Vector macroVector = Macros.getMacroHierarchy();
+
+ int count = menu.getMenuComponentCount();
+
+ createMacrosMenu(menu,macroVector,0);
+
+ if(count == menu.getMenuComponentCount())
+ {
+ JMenuItem mi = new JMenuItem(jEdit.getProperty(
+ "no-macros.label"));
+ mi.setEnabled(false);
+ menu.add(mi);
+ }
+ } //}}}
+
+ //{{{ createMacrosMenu() method
+ private void createMacrosMenu(JMenu menu, Vector vector, int start)
+ {
+ Vector<JMenuItem> menuItems = new Vector<JMenuItem>();
+
+ for(int i = start; i < vector.size(); i++)
+ {
+ Object obj = vector.elementAt(i);
+ if(obj instanceof String)
+ {
+ menuItems.add(new EnhancedMenuItem(
+ jEdit.getProperty(obj + ".label"),
+ (String)obj,jEdit.getActionContext()));
+ }
+ else if(obj instanceof Vector)
+ {
+ Vector subvector = (Vector)obj;
+ String name = (String)subvector.elementAt(0);
+ JMenu submenu = new JMenu(name);
+ createMacrosMenu(submenu,subvector,1);
+ if(submenu.getMenuComponentCount() != 0)
+ menuItems.add(submenu);
+ }
+ }
+
+ Collections.sort(menuItems, new MenuItemTextComparator());
+ for(int i = 0; i < menuItems.size(); i++)
+ {
+ menu.add(menuItems.get(i));
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/MarkersProvider.java b/jEdit/org/gjt/sp/jedit/menu/MarkersProvider.java
index 9639f5c..35686ae 100644
--- a/jEdit/org/gjt/sp/jedit/menu/MarkersProvider.java
+++ b/jEdit/org/gjt/sp/jedit/menu/MarkersProvider.java
@@ -1,184 +1,184 @@
-/*
- * MarkersProvider.java - Markers menu
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.List;
-
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class MarkersProvider implements DynamicMenuProvider
-{
- //{{{ updateEveryTime() method
- public boolean updateEveryTime()
- {
- return true;
- } //}}}
-
- //{{{ update() method
- public void update(JMenu menu)
- {
- final View view = GUIUtilities.getView(menu);
- Buffer buffer = view.getBuffer();
-
- List<Marker> markers = buffer.getMarkers();
-
- if(markers.isEmpty())
- {
- JMenuItem mi = new JMenuItem(jEdit.getProperty(
- "no-markers.label"));
- mi.setEnabled(false);
- menu.add(mi);
- return;
- }
-
- int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
-
- JMenu current = menu;
-
- for(int i = 0; i < markers.size(); i++)
- {
- final Marker marker = markers.get(i);
- int lineNo = buffer.getLineOfOffset(marker.getPosition());
-
- if(current.getItemCount() >= maxItems && i != markers.size() - 1)
- {
- //current.addSeparator();
- JMenu newCurrent = new JMenu(
- jEdit.getProperty(
- "common.more"));
- current.add(newCurrent);
- current = newCurrent;
- }
-
- JMenuItem mi = new MarkersMenuItem(buffer,
- lineNo,marker.getShortcut());
- mi.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- view.getTextArea().setCaretPosition(
- marker.getPosition());
- }
- });
- current.add(mi);
- }
- } //}}}
-
- //{{{ MarkersMenuItem class
- static class MarkersMenuItem extends JMenuItem
- {
- //{{{ MarkersMenuItem constructor
- MarkersMenuItem(Buffer buffer, int lineNo, char shortcut)
- {
- String text = buffer.getLineText(lineNo).trim();
- if(text.length() == 0)
- text = jEdit.getProperty("markers.blank-line");
- setText((lineNo + 1) + ": " + text);
-
- shortcutProp = "goto-marker.shortcut";
- MarkersMenuItem.this.shortcut = shortcut;
- } //}}}
-
- //{{{ getPreferredSize() method
- public Dimension getPreferredSize()
- {
- Dimension d = super.getPreferredSize();
-
- String shortcut = getShortcut();
-
- if(shortcut != null)
- {
- d.width += (getFontMetrics(acceleratorFont)
- .stringWidth(shortcut) + 15);
- }
- return d;
- } //}}}
-
- //{{{ paint() method
- public void paint(Graphics g)
- {
- super.paint(g);
-
- String shortcut = getShortcut();
-
- if(shortcut != null)
- {
- g.setFont(acceleratorFont);
- g.setColor(getModel().isArmed() ?
- acceleratorSelectionForeground :
- acceleratorForeground);
- FontMetrics fm = g.getFontMetrics();
- Insets insets = getInsets();
- g.drawString(shortcut,getWidth() - (fm.stringWidth(
- shortcut) + insets.right + insets.left + 5),
- getFont().getSize() + (insets.top - 1)
- /* XXX magic number */);
- }
- } //}}}
-
- //{{{ Private members
- private String shortcutProp;
- private char shortcut;
- private static Font acceleratorFont;
- private static Color acceleratorForeground;
- private static Color acceleratorSelectionForeground;
-
- //{{{ getShortcut() method
- private String getShortcut()
- {
- if(shortcut == '\0')
- return null;
- else
- {
- String shortcutPrefix = jEdit.getProperty(shortcutProp);
-
- if(shortcutPrefix == null)
- return null;
- else
- {
- return shortcutPrefix + ' ' + shortcut;
- }
- }
- } //}}}
-
- //{{{ Class initializer
- static
- {
- acceleratorFont = UIManager.getFont("MenuItem.acceleratorFont");
- acceleratorFont = new Font("Monospaced",
- acceleratorFont.getStyle(),
- acceleratorFont.getSize());
- acceleratorForeground = UIManager
- .getColor("MenuItem.acceleratorForeground");
- acceleratorSelectionForeground = UIManager
- .getColor("MenuItem.acceleratorSelectionForeground");
- } //}}}
-
- //}}}
- } //}}}
-}
+/*
+ * MarkersProvider.java - Markers menu
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.List;
+
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class MarkersProvider implements DynamicMenuProvider
+{
+ //{{{ updateEveryTime() method
+ public boolean updateEveryTime()
+ {
+ return true;
+ } //}}}
+
+ //{{{ update() method
+ public void update(JMenu menu)
+ {
+ final View view = GUIUtilities.getView(menu);
+ Buffer buffer = view.getBuffer();
+
+ List<Marker> markers = buffer.getMarkers();
+
+ if(markers.isEmpty())
+ {
+ JMenuItem mi = new JMenuItem(jEdit.getProperty(
+ "no-markers.label"));
+ mi.setEnabled(false);
+ menu.add(mi);
+ return;
+ }
+
+ int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
+
+ JMenu current = menu;
+
+ for(int i = 0; i < markers.size(); i++)
+ {
+ final Marker marker = markers.get(i);
+ int lineNo = buffer.getLineOfOffset(marker.getPosition());
+
+ if(current.getItemCount() >= maxItems && i != markers.size() - 1)
+ {
+ //current.addSeparator();
+ JMenu newCurrent = new JMenu(
+ jEdit.getProperty(
+ "common.more"));
+ current.add(newCurrent);
+ current = newCurrent;
+ }
+
+ JMenuItem mi = new MarkersMenuItem(buffer,
+ lineNo,marker.getShortcut());
+ mi.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ view.getTextArea().setCaretPosition(
+ marker.getPosition());
+ }
+ });
+ current.add(mi);
+ }
+ } //}}}
+
+ //{{{ MarkersMenuItem class
+ static class MarkersMenuItem extends JMenuItem
+ {
+ //{{{ MarkersMenuItem constructor
+ MarkersMenuItem(Buffer buffer, int lineNo, char shortcut)
+ {
+ String text = buffer.getLineText(lineNo).trim();
+ if(text.length() == 0)
+ text = jEdit.getProperty("markers.blank-line");
+ setText((lineNo + 1) + ": " + text);
+
+ shortcutProp = "goto-marker.shortcut";
+ MarkersMenuItem.this.shortcut = shortcut;
+ } //}}}
+
+ //{{{ getPreferredSize() method
+ public Dimension getPreferredSize()
+ {
+ Dimension d = super.getPreferredSize();
+
+ String shortcut = getShortcut();
+
+ if(shortcut != null)
+ {
+ d.width += (getFontMetrics(acceleratorFont)
+ .stringWidth(shortcut) + 15);
+ }
+ return d;
+ } //}}}
+
+ //{{{ paint() method
+ public void paint(Graphics g)
+ {
+ super.paint(g);
+
+ String shortcut = getShortcut();
+
+ if(shortcut != null)
+ {
+ g.setFont(acceleratorFont);
+ g.setColor(getModel().isArmed() ?
+ acceleratorSelectionForeground :
+ acceleratorForeground);
+ FontMetrics fm = g.getFontMetrics();
+ Insets insets = getInsets();
+ g.drawString(shortcut,getWidth() - (fm.stringWidth(
+ shortcut) + insets.right + insets.left + 5),
+ getFont().getSize() + (insets.top - 1)
+ /* XXX magic number */);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private String shortcutProp;
+ private char shortcut;
+ private static Font acceleratorFont;
+ private static Color acceleratorForeground;
+ private static Color acceleratorSelectionForeground;
+
+ //{{{ getShortcut() method
+ private String getShortcut()
+ {
+ if(shortcut == '\0')
+ return null;
+ else
+ {
+ String shortcutPrefix = jEdit.getProperty(shortcutProp);
+
+ if(shortcutPrefix == null)
+ return null;
+ else
+ {
+ return shortcutPrefix + ' ' + shortcut;
+ }
+ }
+ } //}}}
+
+ //{{{ Class initializer
+ static
+ {
+ acceleratorFont = UIManager.getFont("MenuItem.acceleratorFont");
+ acceleratorFont = new Font("Monospaced",
+ acceleratorFont.getStyle(),
+ acceleratorFont.getSize());
+ acceleratorForeground = UIManager
+ .getColor("MenuItem.acceleratorForeground");
+ acceleratorSelectionForeground = UIManager
+ .getColor("MenuItem.acceleratorSelectionForeground");
+ } //}}}
+
+ //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/PluginsProvider.java b/jEdit/org/gjt/sp/jedit/menu/PluginsProvider.java
index 0e0ce00..5100169 100644
--- a/jEdit/org/gjt/sp/jedit/menu/PluginsProvider.java
+++ b/jEdit/org/gjt/sp/jedit/menu/PluginsProvider.java
@@ -1,189 +1,189 @@
-/*
- * PluginsProvider.java - Plugins menu
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-import javax.swing.*;
-import java.util.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-
-public class PluginsProvider implements DynamicMenuProvider
-{
- //{{{ updateEveryTime() method
- public boolean updateEveryTime()
- {
- return false;
- } //}}}
-
- //{{{ update() method
- public void update(JMenu menu)
- {
- // We build a set of lists, each list contains plugin menu
- // items that begin with a given letter.
- int count = 0;
-
- List<JMenuItem>[] letters = (List<JMenuItem>[])new List[26];
- for(int i = 0; i < letters.length; i++)
- {
- letters[i] = new ArrayList<JMenuItem>();
- }
-
- Vector<JMenuItem> pluginMenuItems = new Vector<JMenuItem>();
-
- PluginJAR[] pluginArray = jEdit.getPluginJARs();
- for(int i = 0; i < pluginArray.length; i++)
- {
- PluginJAR jar = pluginArray[i];
- EditPlugin plugin = jar.getPlugin();
- if(plugin == null)
- continue;
-
- JMenuItem menuItem = plugin.createMenuItems();
- if(menuItem != null)
- {
- addToLetterMap(letters,menuItem);
- count++;
- }
- //{{{ old API
- else if(jEdit.getProperty("plugin."
- + plugin.getClassName()
- + ".activate") == null)
- {
- try
- {
- pluginMenuItems.clear();
- plugin.createMenuItems(pluginMenuItems);
-
- Iterator<JMenuItem> iter
- = pluginMenuItems.iterator();
- while(iter.hasNext())
- {
- addToLetterMap(letters,
- iter.next());
- count++;
- }
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,
- "Error creating menu items"
- + " for plugin");
- Log.log(Log.ERROR,this,t);
- }
- } //}}}
- }
-
- if(count == 0)
- {
- JMenuItem menuItem = new JMenuItem(
- jEdit.getProperty("no-plugins.label"));
- menuItem.setEnabled(false);
- menu.add(menuItem);
- return;
- }
-
- // Sort each letter
- for(int i = 0; i < letters.length; i++)
- {
- Collections.sort(letters[i],new MenuItemTextComparator());
- }
-
- int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
-
- // if less than 20 items, put them directly in the menu
- if(count <= maxItems)
- {
- for(int i = 0; i < letters.length; i++)
- {
- Iterator<JMenuItem> iter
- = letters[i].iterator();
- while(iter.hasNext())
- {
- menu.add(iter.next());
- }
- }
-
- return;
- }
-
- // Collect blocks of up to maxItems of consecutive letters
- count = 0;
- char first = 'A';
- JMenu submenu = new JMenu();
- menu.add(submenu);
-
- for(int i = 0; i < letters.length; i++)
- {
- List<JMenuItem> letter = letters[i];
-
- if(count + letter.size() > maxItems && count != 0)
- {
- char last = (char)(i + 'A' - 1);
- if(last == first)
- submenu.setText(String.valueOf(first));
- else
- submenu.setText(first + " - " + last);
- first = (char)(i + 'A');
- count = 0;
- submenu = null;
- }
-
- Iterator<JMenuItem> iter = letter.iterator();
- while(iter.hasNext())
- {
- if(submenu == null)
- {
- submenu = new JMenu();
- menu.add(submenu);
- }
- submenu.add(iter.next());
- }
-
- count += letter.size();
- }
-
- if(submenu != null)
- {
- char last = 'Z';
- if(last == first)
- submenu.setText(String.valueOf(first));
- else
- submenu.setText(first + " - " + last);
- }
- } //}}}
-
- //{{{ addToLetterMap() method
- private void addToLetterMap(List<JMenuItem>[] letters, JMenuItem item)
- {
- char ch = item.getText().charAt(0);
- ch = Character.toUpperCase(ch);
- if(ch < 'A' || ch > 'Z')
- {
- Log.log(Log.ERROR,this,"Plugin menu item label must "
- + "begin with A - Z, or a - z: "
- + item.getText());
- }
- else
- letters[ch - 'A'].add(item);
- } //}}}
-}
+/*
+ * PluginsProvider.java - Plugins menu
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+import javax.swing.*;
+import java.util.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+
+public class PluginsProvider implements DynamicMenuProvider
+{
+ //{{{ updateEveryTime() method
+ public boolean updateEveryTime()
+ {
+ return false;
+ } //}}}
+
+ //{{{ update() method
+ public void update(JMenu menu)
+ {
+ // We build a set of lists, each list contains plugin menu
+ // items that begin with a given letter.
+ int count = 0;
+
+ List<JMenuItem>[] letters = (List<JMenuItem>[])new List[26];
+ for(int i = 0; i < letters.length; i++)
+ {
+ letters[i] = new ArrayList<JMenuItem>();
+ }
+
+ Vector<JMenuItem> pluginMenuItems = new Vector<JMenuItem>();
+
+ PluginJAR[] pluginArray = jEdit.getPluginJARs();
+ for(int i = 0; i < pluginArray.length; i++)
+ {
+ PluginJAR jar = pluginArray[i];
+ EditPlugin plugin = jar.getPlugin();
+ if(plugin == null)
+ continue;
+
+ JMenuItem menuItem = plugin.createMenuItems();
+ if(menuItem != null)
+ {
+ addToLetterMap(letters,menuItem);
+ count++;
+ }
+ //{{{ old API
+ else if(jEdit.getProperty("plugin."
+ + plugin.getClassName()
+ + ".activate") == null)
+ {
+ try
+ {
+ pluginMenuItems.clear();
+ plugin.createMenuItems(pluginMenuItems);
+
+ Iterator<JMenuItem> iter
+ = pluginMenuItems.iterator();
+ while(iter.hasNext())
+ {
+ addToLetterMap(letters,
+ iter.next());
+ count++;
+ }
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,
+ "Error creating menu items"
+ + " for plugin");
+ Log.log(Log.ERROR,this,t);
+ }
+ } //}}}
+ }
+
+ if(count == 0)
+ {
+ JMenuItem menuItem = new JMenuItem(
+ jEdit.getProperty("no-plugins.label"));
+ menuItem.setEnabled(false);
+ menu.add(menuItem);
+ return;
+ }
+
+ // Sort each letter
+ for(int i = 0; i < letters.length; i++)
+ {
+ Collections.sort(letters[i],new MenuItemTextComparator());
+ }
+
+ int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
+
+ // if less than 20 items, put them directly in the menu
+ if(count <= maxItems)
+ {
+ for(int i = 0; i < letters.length; i++)
+ {
+ Iterator<JMenuItem> iter
+ = letters[i].iterator();
+ while(iter.hasNext())
+ {
+ menu.add(iter.next());
+ }
+ }
+
+ return;
+ }
+
+ // Collect blocks of up to maxItems of consecutive letters
+ count = 0;
+ char first = 'A';
+ JMenu submenu = new JMenu();
+ menu.add(submenu);
+
+ for(int i = 0; i < letters.length; i++)
+ {
+ List<JMenuItem> letter = letters[i];
+
+ if(count + letter.size() > maxItems && count != 0)
+ {
+ char last = (char)(i + 'A' - 1);
+ if(last == first)
+ submenu.setText(String.valueOf(first));
+ else
+ submenu.setText(first + " - " + last);
+ first = (char)(i + 'A');
+ count = 0;
+ submenu = null;
+ }
+
+ Iterator<JMenuItem> iter = letter.iterator();
+ while(iter.hasNext())
+ {
+ if(submenu == null)
+ {
+ submenu = new JMenu();
+ menu.add(submenu);
+ }
+ submenu.add(iter.next());
+ }
+
+ count += letter.size();
+ }
+
+ if(submenu != null)
+ {
+ char last = 'Z';
+ if(last == first)
+ submenu.setText(String.valueOf(first));
+ else
+ submenu.setText(first + " - " + last);
+ }
+ } //}}}
+
+ //{{{ addToLetterMap() method
+ private void addToLetterMap(List<JMenuItem>[] letters, JMenuItem item)
+ {
+ char ch = item.getText().charAt(0);
+ ch = Character.toUpperCase(ch);
+ if(ch < 'A' || ch > 'Z')
+ {
+ Log.log(Log.ERROR,this,"Plugin menu item label must "
+ + "begin with A - Z, or a - z: "
+ + item.getText());
+ }
+ else
+ letters[ch - 'A'].add(item);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/RecentDirectoriesProvider.java b/jEdit/org/gjt/sp/jedit/menu/RecentDirectoriesProvider.java
index eea79d7..ed2f79f 100644
--- a/jEdit/org/gjt/sp/jedit/menu/RecentDirectoriesProvider.java
+++ b/jEdit/org/gjt/sp/jedit/menu/RecentDirectoriesProvider.java
@@ -1,137 +1,137 @@
-/*
- * RecentDirectoriesProvider.java - Recent directory list menu
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.util.Vector;
-import java.util.Collections;
-
-import org.gjt.sp.jedit.browser.*;
-import org.gjt.sp.jedit.gui.HistoryModel;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class RecentDirectoriesProvider implements DynamicMenuProvider
-{
- //{{{ updateEveryTime() method
- public boolean updateEveryTime()
- {
- return true;
- } //}}}
-
- //{{{ update() method
- public void update(JMenu menu)
- {
- final View view = GUIUtilities.getView(menu);
-
- //{{{ ActionListener...
- ActionListener actionListener = new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- VFSBrowser.browseDirectory(view,evt.getActionCommand());
-
- view.getStatus().setMessage(null);
- }
- }; //}}}
-
- //{{{ MouseListener...
- MouseListener mouseListener = new MouseAdapter()
- {
- public void mouseEntered(MouseEvent evt)
- {
- view.getStatus().setMessage(
- ((JMenuItem)evt.getSource())
- .getActionCommand());
- }
-
- public void mouseExited(MouseEvent evt)
- {
- view.getStatus().setMessage(null);
- }
- }; //}}}
-
- HistoryModel model = HistoryModel.getModel("vfs.browser.path");
- if(model.getSize() == 0)
- {
- JMenuItem menuItem = new JMenuItem(
- jEdit.getProperty("no-recent-dirs.label"));
- menuItem.setEnabled(false);
- menu.add(menuItem);
- return;
- }
-
- boolean sort = jEdit.getBooleanProperty("sortRecent");
-
- int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
-
- Vector<JMenuItem> menuItems = new Vector<JMenuItem>();
-
- for(int i = 0; i < model.getSize(); i++)
- {
- String path = model.getItem(i);
- JMenuItem menuItem = new JMenuItem(MiscUtilities.getFileName(path));
- menuItem.setActionCommand(path);
- menuItem.addActionListener(actionListener);
- menuItem.addMouseListener(mouseListener);
- menuItem.setIcon(FileCellRenderer.dirIcon);
-
- if(sort)
- menuItems.addElement(menuItem);
- else
- {
- if(menu.getMenuComponentCount() >= maxItems
- && i != model.getSize() - 1)
- {
- JMenu newMenu = new JMenu(
- jEdit.getProperty("common.more"));
- menu.add(newMenu);
- menu = newMenu;
- }
-
- menu.add(menuItem);
- }
- }
-
- if(sort)
- {
- Collections.sort(menuItems,
- new MenuItemTextComparator());
- for(int i = 0; i < menuItems.size(); i++)
- {
- if(menu.getMenuComponentCount() >= maxItems
- && i != 0)
- {
- JMenu newMenu = new JMenu(
- jEdit.getProperty("common.more"));
- menu.add(newMenu);
- menu = newMenu;
- }
-
- menu.add(menuItems.elementAt(i));
- }
- }
- } //}}}
-}
+/*
+ * RecentDirectoriesProvider.java - Recent directory list menu
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.util.Vector;
+import java.util.Collections;
+
+import org.gjt.sp.jedit.browser.*;
+import org.gjt.sp.jedit.gui.HistoryModel;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class RecentDirectoriesProvider implements DynamicMenuProvider
+{
+ //{{{ updateEveryTime() method
+ public boolean updateEveryTime()
+ {
+ return true;
+ } //}}}
+
+ //{{{ update() method
+ public void update(JMenu menu)
+ {
+ final View view = GUIUtilities.getView(menu);
+
+ //{{{ ActionListener...
+ ActionListener actionListener = new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ VFSBrowser.browseDirectory(view,evt.getActionCommand());
+
+ view.getStatus().setMessage(null);
+ }
+ }; //}}}
+
+ //{{{ MouseListener...
+ MouseListener mouseListener = new MouseAdapter()
+ {
+ public void mouseEntered(MouseEvent evt)
+ {
+ view.getStatus().setMessage(
+ ((JMenuItem)evt.getSource())
+ .getActionCommand());
+ }
+
+ public void mouseExited(MouseEvent evt)
+ {
+ view.getStatus().setMessage(null);
+ }
+ }; //}}}
+
+ HistoryModel model = HistoryModel.getModel("vfs.browser.path");
+ if(model.getSize() == 0)
+ {
+ JMenuItem menuItem = new JMenuItem(
+ jEdit.getProperty("no-recent-dirs.label"));
+ menuItem.setEnabled(false);
+ menu.add(menuItem);
+ return;
+ }
+
+ boolean sort = jEdit.getBooleanProperty("sortRecent");
+
+ int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
+
+ Vector<JMenuItem> menuItems = new Vector<JMenuItem>();
+
+ for(int i = 0; i < model.getSize(); i++)
+ {
+ String path = model.getItem(i);
+ JMenuItem menuItem = new JMenuItem(MiscUtilities.getFileName(path));
+ menuItem.setActionCommand(path);
+ menuItem.addActionListener(actionListener);
+ menuItem.addMouseListener(mouseListener);
+ menuItem.setIcon(FileCellRenderer.dirIcon);
+
+ if(sort)
+ menuItems.addElement(menuItem);
+ else
+ {
+ if(menu.getMenuComponentCount() >= maxItems
+ && i != model.getSize() - 1)
+ {
+ JMenu newMenu = new JMenu(
+ jEdit.getProperty("common.more"));
+ menu.add(newMenu);
+ menu = newMenu;
+ }
+
+ menu.add(menuItem);
+ }
+ }
+
+ if(sort)
+ {
+ Collections.sort(menuItems,
+ new MenuItemTextComparator());
+ for(int i = 0; i < menuItems.size(); i++)
+ {
+ if(menu.getMenuComponentCount() >= maxItems
+ && i != 0)
+ {
+ JMenu newMenu = new JMenu(
+ jEdit.getProperty("common.more"));
+ menu.add(newMenu);
+ menu = newMenu;
+ }
+
+ menu.add(menuItems.elementAt(i));
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/RecentFilesProvider.java b/jEdit/org/gjt/sp/jedit/menu/RecentFilesProvider.java
index 8e8f646..d6537a8 100644
--- a/jEdit/org/gjt/sp/jedit/menu/RecentFilesProvider.java
+++ b/jEdit/org/gjt/sp/jedit/menu/RecentFilesProvider.java
@@ -1,193 +1,210 @@
-/*
- * RecentFilesProvider.java - Recent file list menu
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.browser.FileCellRenderer;
-
-import javax.swing.*;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-//}}}
-
-public class RecentFilesProvider implements DynamicMenuProvider
-{
- //{{{ updateEveryTime() method
- public boolean updateEveryTime()
- {
- return false;
- } //}}}
-
- //{{{ update() method
- public void update(JMenu menu)
- {
- final View view = GUIUtilities.getView(menu);
-
- //{{{ ActionListener...
- ActionListener actionListener = new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- jEdit.openFile(view,evt.getActionCommand());
- view.getStatus().setMessage(null);
- }
- }; //}}}
-
- //{{{ MouseListener...
- /*
- MouseListener mouseListener = new MouseAdapter()
- {
- public void mouseEntered(MouseEvent evt)
- {
- view.getStatus().setMessage(
- ((JMenuItem)evt.getSource())
- .getActionCommand());
- }
-
- public void mouseExited(MouseEvent evt)
- {
- view.getStatus().setMessage(null);
- }
- };
- */
- //}}}
-
- //{{{ ChangeListener...
- ChangeListener changeListener = new ChangeListener()
- {
- public void stateChanged(ChangeEvent e)
- {
- JMenuItem menuItem = (JMenuItem) e.getSource();
-
- view.getStatus().setMessage(menuItem.isArmed()?menuItem.getActionCommand():null);
- }
- }; //}}}
-
- List<BufferHistory.Entry> recentVector = BufferHistory.getHistory();
-
- if(recentVector.isEmpty())
- {
- JMenuItem menuItem = new JMenuItem(
- jEdit.getProperty("no-recent-files.label"));
- menuItem.setEnabled(false);
- menu.add(menuItem);
- return;
- }
-
- final List<JMenuItem> menuItems = new ArrayList<JMenuItem>();
- final JTextField text = new JTextField();
- text.setToolTipText(jEdit.getProperty("recent-files.textfield.tooltip"));
- menu.add(text);
- text.addKeyListener(new KeyAdapter()
- {
- public void keyReleased(KeyEvent e)
- {
- String typedText = text.getText();
- for (JMenuItem tempMenuItem : menuItems)
- {
- if (typedText.length() == 0)
- {
- tempMenuItem.setEnabled(true);
- }
- else
- {
- String fileName = tempMenuItem.getText();
- boolean matchesStart = fileName.toLowerCase().startsWith(typedText.toLowerCase());
- tempMenuItem.setEnabled(matchesStart);
- }
- }
- }
- });
-
- boolean sort = jEdit.getBooleanProperty("sortRecent");
-
- int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
-
- Iterator<BufferHistory.Entry> iter = recentVector.iterator();
- while(iter.hasNext())
- {
- String path = iter.next().path;
- JMenuItem menuItem = new JMenuItem(MiscUtilities
- .getFileName(path));
- menuItem.setActionCommand(path);
- menuItem.addActionListener(actionListener);
-// menuItem.addMouseListener(mouseListener);
- menuItem.addChangeListener(changeListener);
-
- menuItem.setIcon(FileCellRenderer.fileIcon);
-
- menuItems.add(menuItem);
- if (!sort)
- {
- if (menu.getMenuComponentCount() >= maxItems
- && iter.hasNext())
- {
- JMenu newMenu = new JMenu(
- jEdit.getProperty("common.more"));
- menu.add(newMenu);
- menu = newMenu;
- }
-
- menu.add(menuItem);
- }
- }
-
- if(sort)
- {
- Collections.sort(menuItems, new MenuItemTextComparator());
- for(int i = 0; i < menuItems.size(); i++)
- {
- if(menu.getMenuComponentCount() >= maxItems
- && i != 0)
- {
- JMenu newMenu = new JMenu(
- jEdit.getProperty("common.more"));
- menu.add(newMenu);
- menu = newMenu;
- }
-
- menu.add(menuItems.get(i));
- }
- }
- JMenuItem menuItem = new JMenuItem(jEdit.getProperty("clear-recent-files.label"));
- menuItem.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- BufferHistory.clear();
- }
- });
- menu.addSeparator();
- menu.add(menuItem);
- } //}}}
-}
+/*
+ * RecentFilesProvider.java - Recent file list menu
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.browser.FileCellRenderer;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+//}}}
+
+public class RecentFilesProvider implements DynamicMenuProvider
+{
+ //{{{ updateEveryTime() method
+ public boolean updateEveryTime()
+ {
+ return false;
+ } //}}}
+
+ //{{{ update() method
+ public void update(JMenu menu)
+ {
+ final View view = GUIUtilities.getView(menu);
+
+ //{{{ ActionListener...
+ ActionListener actionListener = new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ jEdit.openFile(view,evt.getActionCommand());
+ view.getStatus().setMessage(null);
+ }
+ }; //}}}
+
+ //{{{ MouseListener...
+ /*
+ MouseListener mouseListener = new MouseAdapter()
+ {
+ public void mouseEntered(MouseEvent evt)
+ {
+ view.getStatus().setMessage(
+ ((JMenuItem)evt.getSource())
+ .getActionCommand());
+ }
+
+ public void mouseExited(MouseEvent evt)
+ {
+ view.getStatus().setMessage(null);
+ }
+ };
+ */
+ //}}}
+
+ //{{{ ChangeListener...
+ ChangeListener changeListener = new ChangeListener()
+ {
+ public void stateChanged(ChangeEvent e)
+ {
+ JMenuItem menuItem = (JMenuItem) e.getSource();
+
+ view.getStatus().setMessage(menuItem.isArmed()?menuItem.getActionCommand():null);
+ }
+ }; //}}}
+
+ List<BufferHistory.Entry> recentVector = BufferHistory.getHistory();
+
+ if(recentVector.isEmpty())
+ {
+ JMenuItem menuItem = new JMenuItem(
+ jEdit.getProperty("no-recent-files.label"));
+ menuItem.setEnabled(false);
+ menu.add(menuItem);
+ return;
+ }
+
+ final List<JMenuItem> menuItems = new ArrayList<JMenuItem>();
+ final JTextField text = new JTextField();
+ text.setToolTipText(jEdit.getProperty("recent-files.textfield.tooltip") +
+ ": " + jEdit.getProperty("glob.tooltip"));
+ menu.add(text);
+ text.addKeyListener(new KeyAdapter()
+ {
+ public void keyReleased(KeyEvent e)
+ {
+ String typedText = text.getText();
+ boolean filter = (typedText.length() > 0);
+ Pattern pattern = null;
+ if (filter)
+ {
+ String regex = typedText;
+ if ((! typedText.contains("*")) && (! typedText.contains("?")))
+ {
+ // Old style (before jEdit 4.3pre18): Match start of file name
+ regex = regex + "*";
+ }
+ pattern = Pattern.compile(StandardUtilities.globToRE(regex),
+ Pattern.CASE_INSENSITIVE);
+ }
+ try
+ {
+ for (JMenuItem recent : menuItems)
+ {
+ recent.setEnabled(filter ?
+ pattern.matcher(recent.getText()).matches() : true);
+ }
+ }
+ catch(PatternSyntaxException re)
+ {
+ Log.log(Log.ERROR,this,re.getMessage());
+ }
+ }
+ });
+
+ boolean sort = jEdit.getBooleanProperty("sortRecent");
+
+ int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
+
+ Iterator<BufferHistory.Entry> iter = recentVector.iterator();
+ while(iter.hasNext())
+ {
+ String path = iter.next().path;
+ JMenuItem menuItem = new JMenuItem(MiscUtilities
+ .getFileName(path));
+ menuItem.setActionCommand(path);
+ menuItem.addActionListener(actionListener);
+// menuItem.addMouseListener(mouseListener);
+ menuItem.addChangeListener(changeListener);
+
+ menuItem.setIcon(FileCellRenderer.fileIcon);
+
+ menuItems.add(menuItem);
+ if (!sort)
+ {
+ if (menu.getMenuComponentCount() >= maxItems
+ && iter.hasNext())
+ {
+ JMenu newMenu = new JMenu(
+ jEdit.getProperty("common.more"));
+ menu.add(newMenu);
+ menu = newMenu;
+ }
+
+ menu.add(menuItem);
+ }
+ }
+
+ if(sort)
+ {
+ Collections.sort(menuItems, new MenuItemTextComparator());
+ for(int i = 0; i < menuItems.size(); i++)
+ {
+ if(menu.getMenuComponentCount() >= maxItems
+ && i != 0)
+ {
+ JMenu newMenu = new JMenu(
+ jEdit.getProperty("common.more"));
+ menu.add(newMenu);
+ menu = newMenu;
+ }
+
+ menu.add(menuItems.get(i));
+ }
+ }
+ JMenuItem menuItem = new JMenuItem(jEdit.getProperty("clear-recent-files.label"));
+ menuItem.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ BufferHistory.clear();
+ }
+ });
+ menu.addSeparator();
+ menu.add(menuItem);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/menu/ReloadWithEncodingProvider.java b/jEdit/org/gjt/sp/jedit/menu/ReloadWithEncodingProvider.java
index 25d08d8..b650ed7 100644
--- a/jEdit/org/gjt/sp/jedit/menu/ReloadWithEncodingProvider.java
+++ b/jEdit/org/gjt/sp/jedit/menu/ReloadWithEncodingProvider.java
@@ -1,159 +1,159 @@
-/*
- * ReloadWithEncodingProvider.java - Recent file list menu
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Marcelo Vanzin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.menu;
-
-//{{{ Imports
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import java.util.Arrays;
-import java.util.Hashtable;
-
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
-
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.MiscUtilities;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.io.EncodingServer;
-//}}}
-
-/**
- * Menu provider for actions to reload the current buffer with a
- * specific encoding.
- *
- * @version $Id: ReloadWithEncodingProvider.java 16814 2010-01-02 08:09:17Z ezust $
- */
-public class ReloadWithEncodingProvider implements ActionListener, DynamicMenuProvider
-{
- private View view;
-
- //{{{ updateEveryTime() method
- public boolean updateEveryTime()
- {
- return false;
- } //}}}
-
- //{{{ update() method
- public void update(JMenu menu)
- {
- view = GUIUtilities.getView(menu);
-
- // auto detect
- JMenuItem auto = new JMenuItem(
- jEdit.getProperty("vfs.browser.commands.encoding.auto-detect"));
- auto.setActionCommand("auto-detect");
- auto.addActionListener(this);
- menu.add(auto);
- menu.addSeparator();
- // all the enabled encodings + the system encoding
- String[] encodings = MiscUtilities.getEncodings(true);
- String systemEncoding = System.getProperty("file.encoding");
-
- if (Arrays.binarySearch(encodings, systemEncoding) < 0)
- {
- String[] tmp_a = new String[encodings.length + 1];
- System.arraycopy(encodings, 0, tmp_a, 0, encodings.length);
- tmp_a[encodings.length] = systemEncoding;
- encodings = tmp_a;
- }
-
- Arrays.sort(encodings);
-
- int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
- for (int i = 0; i < encodings.length; i++)
- {
- JMenuItem mi = new JMenuItem(encodings[i]);
- mi.setActionCommand("encoding@" + encodings[i]);
- mi.addActionListener(this);
- if ((menu.getMenuComponentCount() >= maxItems) && (i < encodings.length))
- {
- JMenu newMenu = new JMenu(jEdit.getProperty("common.more"));
- menu.add(newMenu);
- menu = newMenu;
- }
- menu.add(mi);
- }
-
- menu.addSeparator();
-
- // option to prompt for the encoding
- JMenuItem other = new JMenuItem(
- jEdit.getProperty("vfs.browser.other-encoding.label"));
- other.setActionCommand("other-encoding");
- other.addActionListener(this);
- menu.add(other);
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent ae)
- {
- JMenuItem mi = (JMenuItem) ae.getSource();
- String action = mi.getActionCommand();
- String encoding = null;
- Hashtable props = null;
-
- if (action.startsWith("encoding@"))
- {
- encoding = action.substring(9);
- }
- else if (action.equals("other-encoding"))
- {
- encoding = JOptionPane.showInputDialog(view,
- jEdit.getProperty("encoding-prompt.message"),
- jEdit.getProperty("encoding-prompt.title"),
- JOptionPane.QUESTION_MESSAGE);
- if (encoding == null)
- return;
-
- if (!EncodingServer.hasEncoding(encoding))
- {
- String msg = jEdit.getProperty("reload-encoding.error",
- new Object[] { encoding });
- JOptionPane.showMessageDialog(view,
- msg,
- jEdit.getProperty("common.error"),
- JOptionPane.ERROR_MESSAGE);
- return;
- }
- }
-
- if (encoding != null)
- {
- props = new Hashtable();
- props.put(Buffer.ENCODING, encoding);
- // Disable auto-detect because user explicitly
- // specify an encoding.
- props.put(Buffer.ENCODING_AUTODETECT, false);
- view.getBuffer().setStringProperty(Buffer.ENCODING, encoding);
- }
-
- String path = view.getBuffer().getPath();
- jEdit.closeBuffer(view, view.getBuffer());
- jEdit.openFile(view,null,path,false,props);
- } //}}}
-}
-
+/*
+ * ReloadWithEncodingProvider.java - Recent file list menu
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Marcelo Vanzin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.menu;
+
+//{{{ Imports
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import java.util.Arrays;
+import java.util.Hashtable;
+
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.io.EncodingServer;
+//}}}
+
+/**
+ * Menu provider for actions to reload the current buffer with a
+ * specific encoding.
+ *
+ * @version $Id: ReloadWithEncodingProvider.java 16805 2010-01-01 19:33:37Z daleanson $
+ */
+public class ReloadWithEncodingProvider implements ActionListener, DynamicMenuProvider
+{
+ private View view;
+
+ //{{{ updateEveryTime() method
+ public boolean updateEveryTime()
+ {
+ return false;
+ } //}}}
+
+ //{{{ update() method
+ public void update(JMenu menu)
+ {
+ view = GUIUtilities.getView(menu);
+
+ // auto detect
+ JMenuItem auto = new JMenuItem(
+ jEdit.getProperty("vfs.browser.commands.encoding.auto-detect"));
+ auto.setActionCommand("auto-detect");
+ auto.addActionListener(this);
+ menu.add(auto);
+ menu.addSeparator();
+ // all the enabled encodings + the system encoding
+ String[] encodings = MiscUtilities.getEncodings(true);
+ String systemEncoding = System.getProperty("file.encoding");
+
+ if (Arrays.binarySearch(encodings, systemEncoding) < 0)
+ {
+ String[] tmp_a = new String[encodings.length + 1];
+ System.arraycopy(encodings, 0, tmp_a, 0, encodings.length);
+ tmp_a[encodings.length] = systemEncoding;
+ encodings = tmp_a;
+ }
+
+ Arrays.sort(encodings);
+
+ int maxItems = jEdit.getIntegerProperty("menu.spillover",20);
+ for (int i = 0; i < encodings.length; i++)
+ {
+ JMenuItem mi = new JMenuItem(encodings[i]);
+ mi.setActionCommand("encoding@" + encodings[i]);
+ mi.addActionListener(this);
+ if ((menu.getMenuComponentCount() >= maxItems) && (i < encodings.length))
+ {
+ JMenu newMenu = new JMenu(jEdit.getProperty("common.more"));
+ menu.add(newMenu);
+ menu = newMenu;
+ }
+ menu.add(mi);
+ }
+
+ menu.addSeparator();
+
+ // option to prompt for the encoding
+ JMenuItem other = new JMenuItem(
+ jEdit.getProperty("vfs.browser.other-encoding.label"));
+ other.setActionCommand("other-encoding");
+ other.addActionListener(this);
+ menu.add(other);
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent ae)
+ {
+ JMenuItem mi = (JMenuItem) ae.getSource();
+ String action = mi.getActionCommand();
+ String encoding = null;
+ Hashtable props = null;
+
+ if (action.startsWith("encoding@"))
+ {
+ encoding = action.substring(9);
+ }
+ else if (action.equals("other-encoding"))
+ {
+ encoding = JOptionPane.showInputDialog(view,
+ jEdit.getProperty("encoding-prompt.message"),
+ jEdit.getProperty("encoding-prompt.title"),
+ JOptionPane.QUESTION_MESSAGE);
+ if (encoding == null)
+ return;
+
+ if (!EncodingServer.hasEncoding(encoding))
+ {
+ String msg = jEdit.getProperty("reload-encoding.error",
+ new Object[] { encoding });
+ JOptionPane.showMessageDialog(view,
+ msg,
+ jEdit.getProperty("common.error"),
+ JOptionPane.ERROR_MESSAGE);
+ return;
+ }
+ }
+
+ if (encoding != null)
+ {
+ props = new Hashtable();
+ props.put(Buffer.ENCODING, encoding);
+ // Disable auto-detect because user explicitly
+ // specify an encoding.
+ props.put(Buffer.ENCODING_AUTODETECT, false);
+ view.getBuffer().setStringProperty(Buffer.ENCODING, encoding);
+ }
+
+ String path = view.getBuffer().getPath();
+ jEdit.closeBuffer(view, view.getBuffer());
+ jEdit.openFile(view,null,path,false,props);
+ } //}}}
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/msg/BufferChanging.java b/jEdit/org/gjt/sp/jedit/msg/BufferChanging.java
index 296c34a..6d98e83 100644
--- a/jEdit/org/gjt/sp/jedit/msg/BufferChanging.java
+++ b/jEdit/org/gjt/sp/jedit/msg/BufferChanging.java
@@ -1,66 +1,66 @@
-/*
- * BufferChanging.java - Buffer changing (specialized Edit Pane update message)
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Alan Ezust
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import java.util.Arrays;
-
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.EditPane;
-import org.gjt.sp.util.Log;
-
-/** An EBMessage sent by the EditPane just before the buffer changes.
- *
- * jEdit core emits this whenever the EditPane's buffer changes.
- *
- * Known plugins to be using this: BufferLocal, Navigator.
- *
- * @since jEdit 4.3pre4
- * @version $Id: BufferChanging.java 16342 2009-10-14 10:07:18Z kpouer $
- */
-public class BufferChanging extends PositionChanging
-{
- /**
- * @param editPane the editPane that sent the message
- * @param newBuffer the buffer that will soon be displayed.
- */
- public BufferChanging(EditPane editPane, Buffer newBuffer)
- {
- super(editPane, EditPaneUpdate.BUFFER_CHANGING);
- if (newBuffer == null)
- {
- String s = Arrays.toString(Thread.currentThread().getStackTrace());
- Log.log (Log.ERROR, this, "BufferChanging to null Buffer? Emit PositionChanging instead." + s);
- }
- m_buffer = newBuffer;
- }
-
- /**
- * @return the new buffer that is about to be displayed
- */
- public Buffer getBuffer()
- {
- return m_buffer;
- }
-
- private Buffer m_buffer;
-}
+/*
+ * BufferChanging.java - Buffer changing (specialized Edit Pane update message)
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Alan Ezust
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import java.util.Arrays;
+
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.EditPane;
+import org.gjt.sp.util.Log;
+
+/** An EBMessage sent by the EditPane just before the buffer changes.
+ *
+ * jEdit core emits this whenever the EditPane's buffer changes.
+ *
+ * Known plugins to be using this: BufferLocal, Navigator.
+ *
+ * @since jEdit 4.3pre4
+ * @version $Id: BufferChanging.java 16342 2009-10-14 10:07:18Z kpouer $
+ */
+public class BufferChanging extends PositionChanging
+{
+ /**
+ * @param editPane the editPane that sent the message
+ * @param newBuffer the buffer that will soon be displayed.
+ */
+ public BufferChanging(EditPane editPane, Buffer newBuffer)
+ {
+ super(editPane, EditPaneUpdate.BUFFER_CHANGING);
+ if (newBuffer == null)
+ {
+ String s = Arrays.toString(Thread.currentThread().getStackTrace());
+ Log.log (Log.ERROR, this, "BufferChanging to null Buffer? Emit PositionChanging instead." + s);
+ }
+ m_buffer = newBuffer;
+ }
+
+ /**
+ * @return the new buffer that is about to be displayed
+ */
+ public Buffer getBuffer()
+ {
+ return m_buffer;
+ }
+
+ private Buffer m_buffer;
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/BufferUpdate.java b/jEdit/org/gjt/sp/jedit/msg/BufferUpdate.java
index 639d3ab..813e307 100644
--- a/jEdit/org/gjt/sp/jedit/msg/BufferUpdate.java
+++ b/jEdit/org/gjt/sp/jedit/msg/BufferUpdate.java
@@ -1,147 +1,147 @@
-/*
- * BufferUpdate.java - Buffer update message
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.*;
-
-/**
- * Message sent when a buffer-related change occurs.
- * @author Slava Pestov
- * @version $Id: BufferUpdate.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 2.2pre6
- */
-public class BufferUpdate extends EBMessage
-{
- //{{{ Message types
- /**
- * Buffer created.
- */
- public static final Object CREATED = "CREATED";
-
- /**
- * About to be closed
- * @since jEdit 4.2pre3
- */
- public static final Object CLOSING = "CLOSING";
- /**
- * Buffer load started.
- * @since jEdit 2.6pre1
- */
- public static final Object LOAD_STARTED = "LOAD_STARTED";
-
- /**
- * Buffer loaded.
- */
- public static final Object LOADED = "LOADED";
-
- /**
- * Buffer closed.
- */
- public static final Object CLOSED = "CLOSED";
-
- /**
- * Buffer dirty changed.
- */
- public static final Object DIRTY_CHANGED = "DIRTY_CHANGED";
-
- /**
- * Buffer markers changed.
- */
- public static final Object MARKERS_CHANGED = "MARKERS_CHANGED";
-
- /**
- * Buffer saving.
- */
- public static final Object SAVING = "SAVING";
-
- /**
- * Buffer saved.
- * @since jEdit 4.0pre4
- */
- public static final Object SAVED = "SAVED";
-
- /**
- * Properties changed.
- * @since jEdit 4.1pre1
- */
- public static final Object PROPERTIES_CHANGED = "PROPERTIES_CHANGED";
- //}}}
-
- //{{{ BufferUpdate constructor
- /**
- * Creates a new buffer update message.
- * @param buffer The buffer
- * @param what What happened
- */
- public BufferUpdate(Buffer buffer, View view, Object what)
- {
- super(buffer);
-
- this.view = view;
-
- if(what == null)
- throw new NullPointerException("What must be non-null");
-
- this.what = what;
- } //}}}
-
- //{{{ getWhat() method
- /**
- * Returns what caused this buffer update.
- */
- public Object getWhat()
- {
- return what;
- } //}}}
-
- //{{{ getBuffer() method
- /**
- * Returns the buffer involved.
- */
- public Buffer getBuffer()
- {
- return (Buffer)getSource();
- } //}}}
-
- //{{{ getView() method
- /**
- * Returns the view involved, which may be null.
- */
- public View getView()
- {
- return view;
- } //}}}
-
- //{{{ paramString() method
- public String paramString()
- {
- return "what=" + what + ",view=" + view + ","
- + super.paramString();
- } //}}}
-
- //{{{ Private members
- private Object what;
- private View view;
- //}}}
-}
+/*
+ * BufferUpdate.java - Buffer update message
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.*;
+
+/**
+ * Message sent when a buffer-related change occurs.
+ * @author Slava Pestov
+ * @version $Id: BufferUpdate.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 2.2pre6
+ */
+public class BufferUpdate extends EBMessage
+{
+ //{{{ Message types
+ /**
+ * Buffer created.
+ */
+ public static final Object CREATED = "CREATED";
+
+ /**
+ * About to be closed
+ * @since jEdit 4.2pre3
+ */
+ public static final Object CLOSING = "CLOSING";
+ /**
+ * Buffer load started.
+ * @since jEdit 2.6pre1
+ */
+ public static final Object LOAD_STARTED = "LOAD_STARTED";
+
+ /**
+ * Buffer loaded.
+ */
+ public static final Object LOADED = "LOADED";
+
+ /**
+ * Buffer closed.
+ */
+ public static final Object CLOSED = "CLOSED";
+
+ /**
+ * Buffer dirty changed.
+ */
+ public static final Object DIRTY_CHANGED = "DIRTY_CHANGED";
+
+ /**
+ * Buffer markers changed.
+ */
+ public static final Object MARKERS_CHANGED = "MARKERS_CHANGED";
+
+ /**
+ * Buffer saving.
+ */
+ public static final Object SAVING = "SAVING";
+
+ /**
+ * Buffer saved.
+ * @since jEdit 4.0pre4
+ */
+ public static final Object SAVED = "SAVED";
+
+ /**
+ * Properties changed.
+ * @since jEdit 4.1pre1
+ */
+ public static final Object PROPERTIES_CHANGED = "PROPERTIES_CHANGED";
+ //}}}
+
+ //{{{ BufferUpdate constructor
+ /**
+ * Creates a new buffer update message.
+ * @param buffer The buffer
+ * @param what What happened
+ */
+ public BufferUpdate(Buffer buffer, View view, Object what)
+ {
+ super(buffer);
+
+ this.view = view;
+
+ if(what == null)
+ throw new NullPointerException("What must be non-null");
+
+ this.what = what;
+ } //}}}
+
+ //{{{ getWhat() method
+ /**
+ * Returns what caused this buffer update.
+ */
+ public Object getWhat()
+ {
+ return what;
+ } //}}}
+
+ //{{{ getBuffer() method
+ /**
+ * Returns the buffer involved.
+ */
+ public Buffer getBuffer()
+ {
+ return (Buffer)getSource();
+ } //}}}
+
+ //{{{ getView() method
+ /**
+ * Returns the view involved, which may be null.
+ */
+ public View getView()
+ {
+ return view;
+ } //}}}
+
+ //{{{ paramString() method
+ public String paramString()
+ {
+ return "what=" + what + ",view=" + view + ","
+ + super.paramString();
+ } //}}}
+
+ //{{{ Private members
+ private Object what;
+ private View view;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/DockableWindowUpdate.java b/jEdit/org/gjt/sp/jedit/msg/DockableWindowUpdate.java
index b9f6b6d..cf8a095 100644
--- a/jEdit/org/gjt/sp/jedit/msg/DockableWindowUpdate.java
+++ b/jEdit/org/gjt/sp/jedit/msg/DockableWindowUpdate.java
@@ -1,108 +1,108 @@
-/*
- * DockableWindowUpdate.java - Dockable window update message
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.gui.DockableWindowManager;
-import org.gjt.sp.jedit.*;
-
-/**
- * Message sent when dockable window state changes.
- * @author Slava Pestov
- * @version $Id: DockableWindowUpdate.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 4.2pre1
- */
-public class DockableWindowUpdate extends EBMessage
-{
- //{{{ Message types
- /**
- * Properties changed. Fired instead of global
- * <code>PropertiesChanged</code> for improved performance.
- * @since jEdit 4.2pre1
- */
- public static final Object PROPERTIES_CHANGED = "PROPERTIES_CHANGED";
-
- /**
- * Dockable activated. This is sent when the dockable is made visible.
- * @since jEdit 4.2pre1
- */
- public static final Object ACTIVATED = "ACTIVATED";
-
- /**
- * Dockable deactivated. This is sent when the dockable is hidden.
- * @since jEdit 4.2pre1
- */
- public static final Object DEACTIVATED = "DEACTIVATED";
- //}}}
-
- //{{{ DockableWindowUpdate constructor
- /**
- * Creates a new dockable window update message.
- * @param wm The dockable window manager
- * @param what What happened
- * @param dockable The dockable window in question
- */
- public DockableWindowUpdate(DockableWindowManager wm, Object what,
- String dockable)
- {
- super(wm);
-
- if(what == null)
- throw new NullPointerException("What must be non-null");
-
- this.what = what;
- this.dockable = dockable;
- } //}}}
-
- //{{{ getWhat() method
- /**
- * Returns what caused this dockable update.
- */
- public Object getWhat()
- {
- return what;
- } //}}}
-
- //{{{ getDockable() method
- /**
- * Returns the dockable in question, or null if the message type is
- * <code>PROPERTIES_CHANGED</code>.
- */
- public String getDockable()
- {
- return dockable;
- } //}}}
-
- //{{{ paramString() method
- public String paramString()
- {
- return "what=" + what
- + ",dockable=" + dockable
- + "," + super.paramString();
- } //}}}
-
- //{{{ Private members
- private Object what;
- private String dockable;
- //}}}
-}
+/*
+ * DockableWindowUpdate.java - Dockable window update message
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.gui.DockableWindowManager;
+import org.gjt.sp.jedit.*;
+
+/**
+ * Message sent when dockable window state changes.
+ * @author Slava Pestov
+ * @version $Id: DockableWindowUpdate.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 4.2pre1
+ */
+public class DockableWindowUpdate extends EBMessage
+{
+ //{{{ Message types
+ /**
+ * Properties changed. Fired instead of global
+ * <code>PropertiesChanged</code> for improved performance.
+ * @since jEdit 4.2pre1
+ */
+ public static final Object PROPERTIES_CHANGED = "PROPERTIES_CHANGED";
+
+ /**
+ * Dockable activated. This is sent when the dockable is made visible.
+ * @since jEdit 4.2pre1
+ */
+ public static final Object ACTIVATED = "ACTIVATED";
+
+ /**
+ * Dockable deactivated. This is sent when the dockable is hidden.
+ * @since jEdit 4.2pre1
+ */
+ public static final Object DEACTIVATED = "DEACTIVATED";
+ //}}}
+
+ //{{{ DockableWindowUpdate constructor
+ /**
+ * Creates a new dockable window update message.
+ * @param wm The dockable window manager
+ * @param what What happened
+ * @param dockable The dockable window in question
+ */
+ public DockableWindowUpdate(DockableWindowManager wm, Object what,
+ String dockable)
+ {
+ super(wm);
+
+ if(what == null)
+ throw new NullPointerException("What must be non-null");
+
+ this.what = what;
+ this.dockable = dockable;
+ } //}}}
+
+ //{{{ getWhat() method
+ /**
+ * Returns what caused this dockable update.
+ */
+ public Object getWhat()
+ {
+ return what;
+ } //}}}
+
+ //{{{ getDockable() method
+ /**
+ * Returns the dockable in question, or null if the message type is
+ * <code>PROPERTIES_CHANGED</code>.
+ */
+ public String getDockable()
+ {
+ return dockable;
+ } //}}}
+
+ //{{{ paramString() method
+ public String paramString()
+ {
+ return "what=" + what
+ + ",dockable=" + dockable
+ + "," + super.paramString();
+ } //}}}
+
+ //{{{ Private members
+ private Object what;
+ private String dockable;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/DynamicMenuChanged.java b/jEdit/org/gjt/sp/jedit/msg/DynamicMenuChanged.java
index ef14ee2..03186b5 100644
--- a/jEdit/org/gjt/sp/jedit/msg/DynamicMenuChanged.java
+++ b/jEdit/org/gjt/sp/jedit/msg/DynamicMenuChanged.java
@@ -1,69 +1,69 @@
-/*
- * DynamicMenuChanged.java - Message that causes dynamic menus to be
- * reconstructed
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.*;
-
-/**
- * Sending this message will cause the specified dynamic menu to be recreated.
- *
- * @author Slava Pestov
- * @version $Id: DynamicMenuChanged.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 4.2pre2
- */
-public class DynamicMenuChanged extends EBMessage
-{
- //{{{ DynamicMenuChanged constructor
- /**
- * Creates a new dynamic menu changed message.
- * @param name The menu name. All dynamic menus with this name will be
- * recreated next time they are displayed.
- */
- public DynamicMenuChanged(String name)
- {
- super(null);
-
- this.name = name;
- } //}}}
-
- //{{{ getMenuName() method
- /**
- * Returns the name of the menu in question.
- */
- public String getMenuName()
- {
- return name;
- } //}}}
-
- //{{{ paramString() method
- public String paramString()
- {
- return "menu=" + name + "," + super.paramString();
- } //}}}
-
- //{{{ Private members
- private String name;
- //}}}
-}
+/*
+ * DynamicMenuChanged.java - Message that causes dynamic menus to be
+ * reconstructed
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.*;
+
+/**
+ * Sending this message will cause the specified dynamic menu to be recreated.
+ *
+ * @author Slava Pestov
+ * @version $Id: DynamicMenuChanged.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 4.2pre2
+ */
+public class DynamicMenuChanged extends EBMessage
+{
+ //{{{ DynamicMenuChanged constructor
+ /**
+ * Creates a new dynamic menu changed message.
+ * @param name The menu name. All dynamic menus with this name will be
+ * recreated next time they are displayed.
+ */
+ public DynamicMenuChanged(String name)
+ {
+ super(null);
+
+ this.name = name;
+ } //}}}
+
+ //{{{ getMenuName() method
+ /**
+ * Returns the name of the menu in question.
+ */
+ public String getMenuName()
+ {
+ return name;
+ } //}}}
+
+ //{{{ paramString() method
+ public String paramString()
+ {
+ return "menu=" + name + "," + super.paramString();
+ } //}}}
+
+ //{{{ Private members
+ private String name;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/EditPaneUpdate.java b/jEdit/org/gjt/sp/jedit/msg/EditPaneUpdate.java
index 86e349c..0b28ca5 100644
--- a/jEdit/org/gjt/sp/jedit/msg/EditPaneUpdate.java
+++ b/jEdit/org/gjt/sp/jedit/msg/EditPaneUpdate.java
@@ -1,101 +1,101 @@
-/*
- * EditPaneUpdate.java - Edit pane update message
- * Copyright (C) 1999, 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.*;
-
-/**
- * Message sent when an edit pane-related change occurs.
- * @author Slava Pestov
- * @version $Id: EditPaneUpdate.java 14916 2009-04-12 15:49:33Z ezust $
- *
- * @since jEdit 2.5pre1
- */
-public class EditPaneUpdate extends EBMessage
-{
- /**
- * Edit pane created.
- */
- public static final Object CREATED = "CREATED";
-
- /**
- * Edit pane destroyed.
- */
- public static final Object DESTROYED = "DESTROYED";
- /**
- * The current buffer in the EditPane has changed to show a different buffer. This
- * happens when an action results in a call to EditPane.setBuffer().
- */
- public static final Object BUFFER_CHANGED = "BUFFER_CHANGED";
- /**
- * Edit pane caret position is about to change in a major way
- */
- public static final Object POSITION_CHANGING = "POSITION_CHANGING";
- /**
- * Edit pane buffer is about to change. You should see this before BUFFER_CHANGED.
- * @since 4.3pre3
- */
- public static final Object BUFFER_CHANGING = "BUFFER_CHANGING";
-
- /**
- * The bufferSet scope of the EditPane was changed.
- * @since 4.3pre15
- */
- public static final Object BUFFERSET_CHANGED = "BUFFERSET_CHANGED";
-
- /**
- * Creates a new edit pane update message.
- * @param editPane The edit pane
- * @param what What happened
- */
- public EditPaneUpdate(EditPane editPane, Object what)
- {
- super(editPane);
- if(what == null)
- throw new NullPointerException("What must be non-null");
-
- this.what = what;
- }
-
- /**
- * Returns what caused this edit pane update.
- */
- public Object getWhat()
- {
- return what;
- }
-
- /**
- * Returns the edit pane involved.
- */
- public EditPane getEditPane()
- {
- return (EditPane)getSource();
- }
-
- public String paramString()
- {
- return "what=" + what + "," + super.paramString();
- }
-
- // private members
- private Object what;
-
-}
+/*
+ * EditPaneUpdate.java - Edit pane update message
+ * Copyright (C) 1999, 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.*;
+
+/**
+ * Message sent when an edit pane-related change occurs.
+ * @author Slava Pestov
+ * @version $Id: EditPaneUpdate.java 14916 2009-04-12 15:49:33Z ezust $
+ *
+ * @since jEdit 2.5pre1
+ */
+public class EditPaneUpdate extends EBMessage
+{
+ /**
+ * Edit pane created.
+ */
+ public static final Object CREATED = "CREATED";
+
+ /**
+ * Edit pane destroyed.
+ */
+ public static final Object DESTROYED = "DESTROYED";
+ /**
+ * The current buffer in the EditPane has changed to show a different buffer. This
+ * happens when an action results in a call to EditPane.setBuffer().
+ */
+ public static final Object BUFFER_CHANGED = "BUFFER_CHANGED";
+ /**
+ * Edit pane caret position is about to change in a major way
+ */
+ public static final Object POSITION_CHANGING = "POSITION_CHANGING";
+ /**
+ * Edit pane buffer is about to change. You should see this before BUFFER_CHANGED.
+ * @since 4.3pre3
+ */
+ public static final Object BUFFER_CHANGING = "BUFFER_CHANGING";
+
+ /**
+ * The bufferSet scope of the EditPane was changed.
+ * @since 4.3pre15
+ */
+ public static final Object BUFFERSET_CHANGED = "BUFFERSET_CHANGED";
+
+ /**
+ * Creates a new edit pane update message.
+ * @param editPane The edit pane
+ * @param what What happened
+ */
+ public EditPaneUpdate(EditPane editPane, Object what)
+ {
+ super(editPane);
+ if(what == null)
+ throw new NullPointerException("What must be non-null");
+
+ this.what = what;
+ }
+
+ /**
+ * Returns what caused this edit pane update.
+ */
+ public Object getWhat()
+ {
+ return what;
+ }
+
+ /**
+ * Returns the edit pane involved.
+ */
+ public EditPane getEditPane()
+ {
+ return (EditPane)getSource();
+ }
+
+ public String paramString()
+ {
+ return "what=" + what + "," + super.paramString();
+ }
+
+ // private members
+ private Object what;
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/EditorExitRequested.java b/jEdit/org/gjt/sp/jedit/msg/EditorExitRequested.java
index 7a8e99a..5f8eda5 100644
--- a/jEdit/org/gjt/sp/jedit/msg/EditorExitRequested.java
+++ b/jEdit/org/gjt/sp/jedit/msg/EditorExitRequested.java
@@ -1,74 +1,74 @@
-/*
- * EditorExitRequested.java - Message sent before jEdit starts exiting
- * Copyright (C) 2000 Dirk Moebius
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.EBMessage;
-import org.gjt.sp.jedit.View;
-
-/**
- * Message sent when jEdit starts the exit process. It is send before
- * the settings are saved and the buffers are closed. Listeners of this
- * message should be aware that jEdit might not exit truely, maybe because
- * of errors, or the user cancelled the "Save unsaved changed" dialog, or
- * jEdit is in background mode.
- *
- * @author Dirk Moebius
- * @version $Id: EditorExitRequested.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 3.1pre4
- */
-public class EditorExitRequested extends EBMessage
-{
- private boolean hasBeenExitCancelled;
-
- /**
- * Creates a new editor exiting started message.
- * @param view The view from which this exit was called
- */
- public EditorExitRequested(View view)
- {
- super(view);
- }
-
- /**
- * Returns the view involved.
- */
- public View getView()
- {
- return (View)getSource();
- }
-
- /**
- * Cancels the exit process. If a plugin calls this method, jEdit will not
- * exit anymore
- */
- public void cancelExit()
- {
- hasBeenExitCancelled = true;
- }
-
- /**
- * Check if the exit process has been cancelled.
- */
- public boolean hasBeenExitCancelled()
- {
- return hasBeenExitCancelled;
- }
-}
+/*
+ * EditorExitRequested.java - Message sent before jEdit starts exiting
+ * Copyright (C) 2000 Dirk Moebius
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.EBMessage;
+import org.gjt.sp.jedit.View;
+
+/**
+ * Message sent when jEdit starts the exit process. It is send before
+ * the settings are saved and the buffers are closed. Listeners of this
+ * message should be aware that jEdit might not exit truely, maybe because
+ * of errors, or the user cancelled the "Save unsaved changed" dialog, or
+ * jEdit is in background mode.
+ *
+ * @author Dirk Moebius
+ * @version $Id: EditorExitRequested.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 3.1pre4
+ */
+public class EditorExitRequested extends EBMessage
+{
+ private boolean hasBeenExitCancelled;
+
+ /**
+ * Creates a new editor exiting started message.
+ * @param view The view from which this exit was called
+ */
+ public EditorExitRequested(View view)
+ {
+ super(view);
+ }
+
+ /**
+ * Returns the view involved.
+ */
+ public View getView()
+ {
+ return (View)getSource();
+ }
+
+ /**
+ * Cancels the exit process. If a plugin calls this method, jEdit will not
+ * exit anymore
+ */
+ public void cancelExit()
+ {
+ hasBeenExitCancelled = true;
+ }
+
+ /**
+ * Check if the exit process has been cancelled.
+ */
+ public boolean hasBeenExitCancelled()
+ {
+ return hasBeenExitCancelled;
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/EditorExiting.java b/jEdit/org/gjt/sp/jedit/msg/EditorExiting.java
index 64dd40f..2bcb723 100644
--- a/jEdit/org/gjt/sp/jedit/msg/EditorExiting.java
+++ b/jEdit/org/gjt/sp/jedit/msg/EditorExiting.java
@@ -1,42 +1,42 @@
-/*
- * EditorExiting.java - Message sent before the editor exits
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.EBComponent;
-import org.gjt.sp.jedit.EBMessage;
-
-/**
- * Message sent just before jEdit exits.
- * @author Slava Pestov
- * @version $Id: EditorExiting.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 2.3pre2
- */
-public class EditorExiting extends EBMessage
-{
- /**
- * Creates a new editor exiting message.
- * @param source The message source
- */
- public EditorExiting(EBComponent source)
- {
- super(source);
- }
-}
+/*
+ * EditorExiting.java - Message sent before the editor exits
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.EBComponent;
+import org.gjt.sp.jedit.EBMessage;
+
+/**
+ * Message sent just before jEdit exits.
+ * @author Slava Pestov
+ * @version $Id: EditorExiting.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 2.3pre2
+ */
+public class EditorExiting extends EBMessage
+{
+ /**
+ * Creates a new editor exiting message.
+ * @param source The message source
+ */
+ public EditorExiting(EBComponent source)
+ {
+ super(source);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/EditorStarted.java b/jEdit/org/gjt/sp/jedit/msg/EditorStarted.java
index 3c2cc04..44d5d0c 100644
--- a/jEdit/org/gjt/sp/jedit/msg/EditorStarted.java
+++ b/jEdit/org/gjt/sp/jedit/msg/EditorStarted.java
@@ -1,44 +1,44 @@
-/*
- * EditorStarted.java - Message sent after editor is started, but before
- * initial view is created
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.EBComponent;
-import org.gjt.sp.jedit.EBMessage;
-
-/**
- * Message sent after jEdit has finished starting up, but before the initial
- * view is created.
- * @author Slava Pestov
- * @version $Id: EditorStarted.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 2.3pre2
- */
-public class EditorStarted extends EBMessage
-{
- /**
- * Creates a new editor started message.
- * @param source The message source
- */
- public EditorStarted(EBComponent source)
- {
- super(source);
- }
-}
+/*
+ * EditorStarted.java - Message sent after editor is started, but before
+ * initial view is created
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.EBComponent;
+import org.gjt.sp.jedit.EBMessage;
+
+/**
+ * Message sent after jEdit has finished starting up, but before the initial
+ * view is created.
+ * @author Slava Pestov
+ * @version $Id: EditorStarted.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 2.3pre2
+ */
+public class EditorStarted extends EBMessage
+{
+ /**
+ * Creates a new editor started message.
+ * @param source The message source
+ */
+ public EditorStarted(EBComponent source)
+ {
+ super(source);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/PluginUpdate.java b/jEdit/org/gjt/sp/jedit/msg/PluginUpdate.java
index a458211..a61da52 100644
--- a/jEdit/org/gjt/sp/jedit/msg/PluginUpdate.java
+++ b/jEdit/org/gjt/sp/jedit/msg/PluginUpdate.java
@@ -1,125 +1,144 @@
-/*
- * PluginUpdate.java - Plugin update message
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.*;
-
-/**
- * Message sent when plugins are loaded and unloaded.
- * @author Slava Pestov
- * @version $Id: PluginUpdate.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 4.2pre1
- */
-public class PluginUpdate extends EBMessage
-{
- //{{{ Message types
- /**
- * Plugin loaded. This is sent after a JAR file is added to the
- * list and scanned.
- * @since jEdit 4.2pre1
- */
- public static final Object LOADED = "LOADED";
-
- /**
- * Plugin activated. This is sent after the plugin core class
- * is loaded and its <code>start()</code> method is called.
- * @since jEdit 4.2pre1
- */
- public static final Object ACTIVATED = "ACTIVATED";
-
- /**
- * Plugin deactivated. This is sent after the plugin core class
- * <code>stop()</code> method is called.
- * @since jEdit 4.2pre2
- */
- public static final Object DEACTIVATED = "DEACTIVATED";
-
- /**
- * Plugin unloaded.
- * @since jEdit 4.2pre1
- */
- public static final Object UNLOADED = "UNLOADED";
- //}}}
-
- //{{{ PluginUpdate constructor
- /**
- * Creates a new plugin update message.
- * @param jar The plugin
- * @param what What happened
- * @param exit Is the editor exiting?
- * @since jEdit 4.2pre3
- */
- public PluginUpdate(PluginJAR jar, Object what, boolean exit)
- {
- super(jar);
-
- if(what == null)
- throw new NullPointerException("What must be non-null");
-
- this.what = what;
- this.exit = exit;
- } //}}}
-
- //{{{ getWhat() method
- /**
- * Returns what caused this plugin update.
- */
- public Object getWhat()
- {
- return what;
- } //}}}
-
- //{{{ isExiting() method
- /**
- * Returns true if this plugin is being unloaded as part of the
- * shutdown process, in which case some components like the help
- * viewer and plugin manager ignore the event.
- * @since jEdit 4.2pre3
- */
- public boolean isExiting()
- {
- return exit;
- } //}}}
-
- //{{{ getPluginJAR() method
- /**
- * Returns the plugin involved.
- */
- public PluginJAR getPluginJAR()
- {
- return (PluginJAR)getSource();
- } //}}}
-
- //{{{ paramString() method
- public String paramString()
- {
- return "what=" + what + ",exit=" + exit + ","
- + super.paramString();
- } //}}}
-
- //{{{ Private members
- private Object what;
- private boolean exit;
- //}}}
-}
+/*
+ * PluginUpdate.java - Plugin update message
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.*;
+
+/**
+ * Message sent when plugins are loaded and unloaded.
+ * @author Slava Pestov
+ * @version $Id: PluginUpdate.java 17313 2010-02-17 22:32:09Z kpouer $
+ *
+ * @since jEdit 4.2pre1
+ */
+public class PluginUpdate extends EBMessage
+{
+ //{{{ Message types
+ /**
+ * Plugin loaded. This is sent after a JAR file is added to the
+ * list and scanned.
+ * @since jEdit 4.2pre1
+ */
+ public static final Object LOADED = "LOADED";
+
+ /**
+ * Plugin activated. This is sent after the plugin core class
+ * is loaded and its <code>start()</code> method is called.
+ * @since jEdit 4.2pre1
+ */
+ public static final Object ACTIVATED = "ACTIVATED";
+
+ /**
+ * Plugin deactivated. This is sent after the plugin core class
+ * <code>stop()</code> method is called.
+ * @since jEdit 4.2pre2
+ */
+ public static final Object DEACTIVATED = "DEACTIVATED";
+
+ /**
+ * Plugin unloaded.
+ * @since jEdit 4.2pre1
+ */
+ public static final Object UNLOADED = "UNLOADED";
+ //}}}
+
+ //{{{ PluginUpdate constructor
+ /**
+ * Creates a new plugin update message.
+ * @param jar The plugin
+ * @param what What happened
+ * @param exit Is the editor exiting?
+ * @since jEdit 4.2pre3
+ */
+ public PluginUpdate(PluginJAR jar, Object what, boolean exit)
+ {
+ super(jar);
+
+ if(what == null)
+ throw new NullPointerException("What must be non-null");
+
+ EditPlugin plugin = jar.getPlugin();
+ if (plugin != null)
+ {
+ String clazz = plugin.getClassName();
+ version = jEdit.getProperty("plugin."+clazz+".version");
+ }
+ this.what = what;
+ this.exit = exit;
+ } //}}}
+
+ //{{{ getWhat() method
+ /**
+ * Returns what caused this plugin update.
+ */
+ public Object getWhat()
+ {
+ return what;
+ } //}}}
+
+ //{{{ isExiting() method
+ /**
+ * Returns true if this plugin is being unloaded as part of the
+ * shutdown process, in which case some components like the help
+ * viewer and plugin manager ignore the event.
+ * @since jEdit 4.2pre3
+ */
+ public boolean isExiting()
+ {
+ return exit;
+ } //}}}
+
+ //{{{ getPluginJAR() method
+ /**
+ * Returns the plugin involved.
+ */
+ public PluginJAR getPluginJAR()
+ {
+ return (PluginJAR)getSource();
+ } //}}}
+
+ //{{{ getPluginVersion() method
+ /**
+ * Returns the plugin version.
+ *
+ * @return the plugin version. It may be null in some case like for the libraries
+ * @since 4.4pre1
+ */
+ public String getPluginVersion()
+ {
+ return version;
+ } //}}}
+
+ //{{{ paramString() method
+ public String paramString()
+ {
+ return "what=" + what + ",exit=" + exit + ",version=" + version + ","
+ + super.paramString();
+ } //}}}
+
+ //{{{ Private members
+ private Object what;
+ private boolean exit;
+ private String version;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/PositionChanging.java b/jEdit/org/gjt/sp/jedit/msg/PositionChanging.java
index c96c375..0e9210c 100644
--- a/jEdit/org/gjt/sp/jedit/msg/PositionChanging.java
+++ b/jEdit/org/gjt/sp/jedit/msg/PositionChanging.java
@@ -1,45 +1,45 @@
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.EditPane;
-import org.gjt.sp.jedit.textarea.TextArea;
-
-
-/**
- * An EBMessage associated with an EditPane that is sent just before its caret
- * position changes in a "major way" to another location in the same Buffer.
- * These messages are tracked by the Navigator plugin,
- * and other interested plugins.
- *
- * jEdit plugins such as SideKick, Tags, Jump, CscopeFinder, etc, should
- * emit this message whenever the user wants to jump from one position
- * to another in the same buffer.
- *
- * For jumps to a different buffer entirely, it is not necessary for plugins
- * to send any message, since BufferChanging is sent by jEdit whenever
- * EditPane.setBuffer() is called, and it serves as a PositionChanging message
- * also.
- *
- *
- * @see org.gjt.sp.jedit.msg.BufferChanging
- * @author ezust
- * @since jEdit 4.3pre15
- *
- */
-public class PositionChanging extends EditPaneUpdate
-{
-
- protected PositionChanging(EditPane editPane, Object whatt)
- {
- super(editPane, whatt);
- }
-
- public PositionChanging(TextArea textArea)
- {
- super(EditPane.get(textArea), EditPaneUpdate.POSITION_CHANGING);
- }
-
- public PositionChanging(EditPane editPane)
- {
- super (editPane, EditPaneUpdate.POSITION_CHANGING);
- }
-}
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.EditPane;
+import org.gjt.sp.jedit.textarea.TextArea;
+
+
+/**
+ * An EBMessage associated with an EditPane that is sent just before its caret
+ * position changes in a "major way" to another location in the same Buffer.
+ * These messages are tracked by the Navigator plugin,
+ * and other interested plugins.
+ *
+ * jEdit plugins such as SideKick, Tags, Jump, CscopeFinder, etc, should
+ * emit this message whenever the user wants to jump from one position
+ * to another in the same buffer.
+ *
+ * For jumps to a different buffer entirely, it is not necessary for plugins
+ * to send any message, since BufferChanging is sent by jEdit whenever
+ * EditPane.setBuffer() is called, and it serves as a PositionChanging message
+ * also.
+ *
+ *
+ * @see org.gjt.sp.jedit.msg.BufferChanging
+ * @author ezust
+ * @since jEdit 4.3pre15
+ *
+ */
+public class PositionChanging extends EditPaneUpdate
+{
+
+ protected PositionChanging(EditPane editPane, Object whatt)
+ {
+ super(editPane, whatt);
+ }
+
+ public PositionChanging(TextArea textArea)
+ {
+ super(EditPane.get(textArea), EditPaneUpdate.POSITION_CHANGING);
+ }
+
+ public PositionChanging(EditPane editPane)
+ {
+ super (editPane, EditPaneUpdate.POSITION_CHANGING);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/PropertiesChanged.java b/jEdit/org/gjt/sp/jedit/msg/PropertiesChanged.java
index cdf87c0..1a7e81e 100644
--- a/jEdit/org/gjt/sp/jedit/msg/PropertiesChanged.java
+++ b/jEdit/org/gjt/sp/jedit/msg/PropertiesChanged.java
@@ -1,43 +1,52 @@
-/*
- * PropertiesChanged.java - Properties changed message
- * Copyright (C) 1999 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.EBComponent;
-import org.gjt.sp.jedit.EBMessage;
-
-/**
- * Message sent when properties are changed using the global options or
- * plugin options dialog box.
- * @author Slava Pestov
- * @version $Id: PropertiesChanged.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 2.2pre6
- */
-public class PropertiesChanged extends EBMessage
-{
- /**
- * Creates a new properties changed message.
- * @param source The message source
- */
- public PropertiesChanged(EBComponent source)
- {
- super(source);
- }
-}
+/*
+ * PropertiesChanged.java - Properties changed message
+ * Copyright (C) 1999 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.EBComponent;
+import org.gjt.sp.jedit.EBMessage;
+
+/**
+ * Message sent when properties are changed using the global options or
+ * plugin options dialog box.
+ * @author Slava Pestov
+ * @version $Id: PropertiesChanged.java 16730 2009-12-25 16:53:12Z shlomy $
+ *
+ * @since jEdit 2.2pre6
+ */
+public class PropertiesChanged extends EBMessage
+{
+ /**
+ * Creates a new properties changed message.
+ * @param source The message source
+ */
+ public PropertiesChanged(EBComponent source)
+ {
+ super(source);
+ }
+
+ /**
+ * Creates a new properties changed message.
+ * @param source The message source
+ */
+ public PropertiesChanged(Object source)
+ {
+ super(source);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/PropertiesChanging.java b/jEdit/org/gjt/sp/jedit/msg/PropertiesChanging.java
index 03a34fd..2d64778 100644
--- a/jEdit/org/gjt/sp/jedit/msg/PropertiesChanging.java
+++ b/jEdit/org/gjt/sp/jedit/msg/PropertiesChanging.java
@@ -1,62 +1,62 @@
-/*
- * PropertiesChanging.java - Properties changing message
- * Copyright (C) 2007 Marcelo Vanzin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.EBComponent;
-import org.gjt.sp.jedit.EBMessage;
-
-/**
- * Message sent right before the global options dialog is shown. This
- * allows plugins to flush any state before the options pane is loaded
- * and the properties are read by the panes.
- *
- * @author Marcelo Vanzin
- * @version $Id$
- *
- * @since jEdit 4.3pre9
- */
-public class PropertiesChanging extends EBMessage
-{
-
- public enum State {
- LOADING,
- CANCELED
- }
-
- /**
- * Creates a new properties changing message.
- * @param source The message source
- * @param state An enum describing what is happening.
- */
- public PropertiesChanging(EBComponent source, State state)
- {
- super(source);
- assert (state != null) : "state shouldn't be null";
- this.state = state;
- }
-
- public State getState()
- {
- return state;
- }
-
- private final State state;
-
-}
+/*
+ * PropertiesChanging.java - Properties changing message
+ * Copyright (C) 2007 Marcelo Vanzin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.EBComponent;
+import org.gjt.sp.jedit.EBMessage;
+
+/**
+ * Message sent right before the global options dialog is shown. This
+ * allows plugins to flush any state before the options pane is loaded
+ * and the properties are read by the panes.
+ *
+ * @author Marcelo Vanzin
+ * @version $Id$
+ *
+ * @since jEdit 4.3pre9
+ */
+public class PropertiesChanging extends EBMessage
+{
+
+ public enum State {
+ LOADING,
+ CANCELED
+ }
+
+ /**
+ * Creates a new properties changing message.
+ * @param source The message source
+ * @param state An enum describing what is happening.
+ */
+ public PropertiesChanging(EBComponent source, State state)
+ {
+ super(source);
+ assert (state != null) : "state shouldn't be null";
+ this.state = state;
+ }
+
+ public State getState()
+ {
+ return state;
+ }
+
+ private final State state;
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/RegisterChanged.java b/jEdit/org/gjt/sp/jedit/msg/RegisterChanged.java
index e4a5934..fa17fea 100644
--- a/jEdit/org/gjt/sp/jedit/msg/RegisterChanged.java
+++ b/jEdit/org/gjt/sp/jedit/msg/RegisterChanged.java
@@ -1,61 +1,61 @@
-/*
- * RegisterChanged.java - Register changed message
- * Copyright (C) 2004 Nicholas O'Leary
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.EBComponent;
-import org.gjt.sp.jedit.EBMessage;
-import org.gjt.sp.jedit.Registers;
-
-/**
- * Message sent when a register is updated.
- * @author Nicholas O'Leary
- * @version $Id: RegisterChanged.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 4.3pre1
- */
-public class RegisterChanged extends EBMessage
-{
- private char registerName;
-
- /**
- * Creates a new registers changed message.
- * @param source The message source
- */
- public RegisterChanged(EBComponent source, char name)
- {
- super(source);
- registerName = name;
- }
-
- public char getRegisterName()
- {
- return registerName;
- }
-
- public String getRegisterValue()
- {
- return Registers.getRegister(registerName).toString();
- }
-
- public String paramString()
- {
- return "register=" + registerName + "," + super.paramString();
- }
-}
+/*
+ * RegisterChanged.java - Register changed message
+ * Copyright (C) 2004 Nicholas O'Leary
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.EBComponent;
+import org.gjt.sp.jedit.EBMessage;
+import org.gjt.sp.jedit.Registers;
+
+/**
+ * Message sent when a register is updated.
+ * @author Nicholas O'Leary
+ * @version $Id: RegisterChanged.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 4.3pre1
+ */
+public class RegisterChanged extends EBMessage
+{
+ private char registerName;
+
+ /**
+ * Creates a new registers changed message.
+ * @param source The message source
+ */
+ public RegisterChanged(EBComponent source, char name)
+ {
+ super(source);
+ registerName = name;
+ }
+
+ public char getRegisterName()
+ {
+ return registerName;
+ }
+
+ public String getRegisterValue()
+ {
+ return Registers.getRegister(registerName).toString();
+ }
+
+ public String paramString()
+ {
+ return "register=" + registerName + "," + super.paramString();
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/SearchSettingsChanged.java b/jEdit/org/gjt/sp/jedit/msg/SearchSettingsChanged.java
index db54824..213edc5 100644
--- a/jEdit/org/gjt/sp/jedit/msg/SearchSettingsChanged.java
+++ b/jEdit/org/gjt/sp/jedit/msg/SearchSettingsChanged.java
@@ -1,42 +1,42 @@
-/*
- * SearchSettingsChanged.java - Search and replace settings changed message
- * Copyright (C) 1999 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.EBComponent;
-import org.gjt.sp.jedit.EBMessage;
-
-/**
- * Message sent when search and replace settings change.
- * @author Slava Pestov
- * @version $Id: SearchSettingsChanged.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 2.3pre1
- */
-public class SearchSettingsChanged extends EBMessage
-{
- /**
- * Creates a new search and replace settings changed message.
- * @param source The message source
- */
- public SearchSettingsChanged(EBComponent source)
- {
- super(source);
- }
-}
+/*
+ * SearchSettingsChanged.java - Search and replace settings changed message
+ * Copyright (C) 1999 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.EBComponent;
+import org.gjt.sp.jedit.EBMessage;
+
+/**
+ * Message sent when search and replace settings change.
+ * @author Slava Pestov
+ * @version $Id: SearchSettingsChanged.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 2.3pre1
+ */
+public class SearchSettingsChanged extends EBMessage
+{
+ /**
+ * Creates a new search and replace settings changed message.
+ * @param source The message source
+ */
+ public SearchSettingsChanged(EBComponent source)
+ {
+ super(source);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/VFSPathSelected.java b/jEdit/org/gjt/sp/jedit/msg/VFSPathSelected.java
index 788cf8f..d6f3963 100644
--- a/jEdit/org/gjt/sp/jedit/msg/VFSPathSelected.java
+++ b/jEdit/org/gjt/sp/jedit/msg/VFSPathSelected.java
@@ -1,49 +1,49 @@
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.EBMessage;
-import org.gjt.sp.jedit.View;
-
-/** Message sent when a file system tree node,
- * or a ProjectViewer tree node, is selected.
- * @since jEdit 4.3pre11
- */
-public class VFSPathSelected extends EBMessage
-{
- /**
- * @param source the View that is considered the "source" of this event
- * @param isDirectory true if the path is pointing to a folder, false if it's a regular file
- * @param path The selected path.
- */
- public VFSPathSelected(View source, String path, boolean isDirectory)
- {
- super(source);
- this.path = path;
- this.isDir = isDirectory;
- }
-
- public View getView()
- {
- return (View) getSource();
- }
-
- /**
- * @return The selected URL (or file path).
- */
- public String getPath()
- {
- return path;
- }
-
- /**
- *
- * @return true if this is a directory node
- */
- public boolean isDirectory()
- {
- return isDir;
- }
-
- private final String path;
- private boolean isDir;
-}
-
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.EBMessage;
+import org.gjt.sp.jedit.View;
+
+/** Message sent when a file system tree node,
+ * or a ProjectViewer tree node, is selected.
+ * @since jEdit 4.3pre11
+ */
+public class VFSPathSelected extends EBMessage
+{
+ /**
+ * @param source the View that is considered the "source" of this event
+ * @param isDirectory true if the path is pointing to a folder, false if it's a regular file
+ * @param path The selected path.
+ */
+ public VFSPathSelected(View source, String path, boolean isDirectory)
+ {
+ super(source);
+ this.path = path;
+ this.isDir = isDirectory;
+ }
+
+ public View getView()
+ {
+ return (View) getSource();
+ }
+
+ /**
+ * @return The selected URL (or file path).
+ */
+ public String getPath()
+ {
+ return path;
+ }
+
+ /**
+ *
+ * @return true if this is a directory node
+ */
+ public boolean isDirectory()
+ {
+ return isDir;
+ }
+
+ private final String path;
+ private boolean isDir;
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/msg/VFSUpdate.java b/jEdit/org/gjt/sp/jedit/msg/VFSUpdate.java
index 3fc2be1..10e7908 100644
--- a/jEdit/org/gjt/sp/jedit/msg/VFSUpdate.java
+++ b/jEdit/org/gjt/sp/jedit/msg/VFSUpdate.java
@@ -1,62 +1,62 @@
-/*
- * VFSUpdate.java - A path has changed
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.*;
-
-/**
- * Message sent when a file or directory changes.
- * @author Slava Pestov
- * @version $Id: VFSUpdate.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 2.6pre4
- */
-public class VFSUpdate extends EBMessage
-{
- /**
- * Creates a VFS update message.
- * @param path The path in question
- */
- public VFSUpdate(String path)
- {
- super(null);
-
- if(path == null)
- throw new NullPointerException("Path must be non-null");
-
- this.path = path;
- }
-
- /**
- * Returns the path that changed.
- */
- public String getPath()
- {
- return path;
- }
-
- public String paramString()
- {
- return "path=" + path + "," + super.paramString();
- }
-
- // private members
- private String path;
-}
+/*
+ * VFSUpdate.java - A path has changed
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.*;
+
+/**
+ * Message sent when a file or directory changes.
+ * @author Slava Pestov
+ * @version $Id: VFSUpdate.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 2.6pre4
+ */
+public class VFSUpdate extends EBMessage
+{
+ /**
+ * Creates a VFS update message.
+ * @param path The path in question
+ */
+ public VFSUpdate(String path)
+ {
+ super(null);
+
+ if(path == null)
+ throw new NullPointerException("Path must be non-null");
+
+ this.path = path;
+ }
+
+ /**
+ * Returns the path that changed.
+ */
+ public String getPath()
+ {
+ return path;
+ }
+
+ public String paramString()
+ {
+ return "path=" + path + "," + super.paramString();
+ }
+
+ // private members
+ private String path;
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/ViewUpdate.java b/jEdit/org/gjt/sp/jedit/msg/ViewUpdate.java
index 8472bc7..405f7cf 100644
--- a/jEdit/org/gjt/sp/jedit/msg/ViewUpdate.java
+++ b/jEdit/org/gjt/sp/jedit/msg/ViewUpdate.java
@@ -1,101 +1,101 @@
-/*
- * ViewUpdate.java - View update message
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.msg;
-
-import org.gjt.sp.jedit.*;
-
-/**
- * Message sent when a view-related change occurs.
- * @author Slava Pestov
- * @version $Id: ViewUpdate.java 12504 2008-04-22 23:12:43Z ezust $
- *
- * @since jEdit 2.2pre6
- */
-public class ViewUpdate extends EBMessage
-{
- /**
- * View created.
- */
- public static final Object CREATED = "CREATED";
-
- /**
- * View closed.
- */
- public static final Object CLOSED = "CLOSED";
-
- /**
- * Active edit pane changed.
- * @since jEdit 4.1pre1
- */
- public static final Object EDIT_PANE_CHANGED = "EDIT_PANE_CHANGED";
-
- /**
- * Active view changed.
- * @since jEdit 4.3pre4
- */
- public static final Object ACTIVATED = "VIEW_ACTIVATED";
-
- //{{{ ViewUpdate constructor
- /**
- * Creates a new view update message.
- * @param view The view
- * @param what What happened
- */
- public ViewUpdate(View view, Object what)
- {
- super(view);
-
- if(what == null)
- throw new NullPointerException("What must be non-null");
-
- this.what = what;
- } //}}}
-
- //{{{ getWhat() method
- /**
- * Returns what caused this view update.
- */
- public Object getWhat()
- {
- return what;
- } //}}}
-
- //{{{ getView() method
- /**
- * Returns the view involved.
- */
- public View getView()
- {
- return (View)getSource();
- } //}}}
-
- //{{{ paramString() method
- public String paramString()
- {
- return "what=" + what + "," + super.paramString();
- } //}}}
-
- //{{{ Private members
- private Object what;
- //}}}
-}
+/*
+ * ViewUpdate.java - View update message
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.msg;
+
+import org.gjt.sp.jedit.*;
+
+/**
+ * Message sent when a view-related change occurs.
+ * @author Slava Pestov
+ * @version $Id: ViewUpdate.java 12504 2008-04-22 23:12:43Z ezust $
+ *
+ * @since jEdit 2.2pre6
+ */
+public class ViewUpdate extends EBMessage
+{
+ /**
+ * View created.
+ */
+ public static final Object CREATED = "CREATED";
+
+ /**
+ * View closed.
+ */
+ public static final Object CLOSED = "CLOSED";
+
+ /**
+ * Active edit pane changed.
+ * @since jEdit 4.1pre1
+ */
+ public static final Object EDIT_PANE_CHANGED = "EDIT_PANE_CHANGED";
+
+ /**
+ * Active view changed.
+ * @since jEdit 4.3pre4
+ */
+ public static final Object ACTIVATED = "VIEW_ACTIVATED";
+
+ //{{{ ViewUpdate constructor
+ /**
+ * Creates a new view update message.
+ * @param view The view
+ * @param what What happened
+ */
+ public ViewUpdate(View view, Object what)
+ {
+ super(view);
+
+ if(what == null)
+ throw new NullPointerException("What must be non-null");
+
+ this.what = what;
+ } //}}}
+
+ //{{{ getWhat() method
+ /**
+ * Returns what caused this view update.
+ */
+ public Object getWhat()
+ {
+ return what;
+ } //}}}
+
+ //{{{ getView() method
+ /**
+ * Returns the view involved.
+ */
+ public View getView()
+ {
+ return (View)getSource();
+ } //}}}
+
+ //{{{ paramString() method
+ public String paramString()
+ {
+ return "what=" + what + "," + super.paramString();
+ } //}}}
+
+ //{{{ Private members
+ private Object what;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/msg/package.html b/jEdit/org/gjt/sp/jedit/msg/package.html
index 6741f13..d7fdfc9 100644
--- a/jEdit/org/gjt/sp/jedit/msg/package.html
+++ b/jEdit/org/gjt/sp/jedit/msg/package.html
@@ -1 +1 @@
-<html><body>EditBus messages.</body></html>
+<html><body>EditBus messages.</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/options/AbbrevsOptionPane.java b/jEdit/org/gjt/sp/jedit/options/AbbrevsOptionPane.java
index 545b4a6..fa07d5e 100644
--- a/jEdit/org/gjt/sp/jedit/options/AbbrevsOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/AbbrevsOptionPane.java
@@ -1,507 +1,507 @@
-/*
- * AbbrevsOptionPane.java - Abbrevs options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.*;
-import javax.swing.table.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.*;
-import java.util.List;
-
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-//{{{ AbbrevsOptionPane class
-/**
- * Abbrev editor.
- * @author Slava Pestov
- * @version $Id: AbbrevsOptionPane.java 14126 2008-12-01 10:09:52Z kpouer $
- */
-public class AbbrevsOptionPane extends AbstractOptionPane
-{
- //{{{ AbbrevsOptionPane constructor
- public AbbrevsOptionPane()
- {
- super("abbrevs");
- } //}}}
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- setLayout(new BorderLayout());
-
- JPanel panel = new JPanel(new BorderLayout(6,6));
-
- expandOnInput = new JCheckBox(jEdit.getProperty("options.abbrevs"
- + ".expandOnInput"),Abbrevs.getExpandOnInput());
-
- panel.add(expandOnInput,BorderLayout.NORTH);
-
- JPanel panel2 = new JPanel();
- panel2.setLayout(new BoxLayout(panel2,BoxLayout.X_AXIS));
- panel2.setBorder(new EmptyBorder(0,0,6,0));
- panel2.add(Box.createGlue());
- JLabel label = new JLabel(jEdit.getProperty("options.abbrevs.set"));
- label.setBorder(new EmptyBorder(0,0,0,12));
- panel2.add(label);
-
- Map<String,Hashtable<String,String>> _modeAbbrevs = Abbrevs.getModeAbbrevs();
- modeAbbrevs = new HashMap<String,AbbrevsModel>();
- Mode[] modes = jEdit.getModes();
- Arrays.sort(modes,new StandardUtilities.StringCompare<Mode>(true));
- String[] sets = new String[modes.length + 1];
- sets[0] = "global";
- for(int i = 0; i < modes.length; i++)
- {
- String name = modes[i].getName();
- sets[i+1] = name;
- modeAbbrevs.put(name,new AbbrevsModel(_modeAbbrevs.get(name)));
- }
-
- setsComboBox = new JComboBox(sets);
- ActionHandler actionHandler = new ActionHandler();
- setsComboBox.addActionListener(actionHandler);
- panel2.add(setsComboBox);
- panel2.add(Box.createGlue());
- panel.add(panel2,BorderLayout.SOUTH);
-
- add(BorderLayout.NORTH,panel);
-
- globalAbbrevs = new AbbrevsModel(Abbrevs.getGlobalAbbrevs());
- abbrevsTable = new JTable(globalAbbrevs);
- abbrevsTable.getColumnModel().getColumn(1).setCellRenderer(
- new Renderer());
- abbrevsTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
- abbrevsTable.getTableHeader().setReorderingAllowed(false);
- abbrevsTable.getTableHeader().addMouseListener(new HeaderMouseHandler());
- abbrevsTable.getSelectionModel().addListSelectionListener(
- new SelectionHandler());
- abbrevsTable.getSelectionModel().setSelectionMode(
- ListSelectionModel.SINGLE_SELECTION);
- abbrevsTable.addMouseListener(new TableMouseHandler());
- Dimension d = abbrevsTable.getPreferredSize();
- d.height = Math.min(d.height,200);
- JScrollPane scroller = new JScrollPane(abbrevsTable);
- scroller.setPreferredSize(d);
- add(BorderLayout.CENTER,scroller);
-
- JPanel buttons = new JPanel();
- buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
- buttons.setBorder(new EmptyBorder(6,0,0,0));
-
- add = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.abbrevs.add.icon")));
- add.setToolTipText(jEdit.getProperty("options.abbrevs.add"));
- add.addActionListener(actionHandler);
- buttons.add(add);
- remove = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.abbrevs.remove.icon")));
- remove.setToolTipText(jEdit.getProperty("options.abbrevs.remove"));
- remove.addActionListener(actionHandler);
- buttons.add(remove);
- edit = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.abbrevs.edit.icon")));
- edit.setToolTipText(jEdit.getProperty("options.abbrevs.edit"));
- edit.addActionListener(actionHandler);
- buttons.add(edit);
- buttons.add(Box.createGlue());
-
- add(BorderLayout.SOUTH,buttons);
- setsComboBox.setSelectedIndex(jEdit.getIntegerProperty("options.abbrevs.combobox.index", 0));
- updateEnabled();
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
- if(abbrevsTable.getCellEditor() != null)
- abbrevsTable.getCellEditor().stopCellEditing();
-
- Abbrevs.setExpandOnInput(expandOnInput.isSelected());
-
- Abbrevs.setGlobalAbbrevs(globalAbbrevs.toHashtable());
-
- Hashtable<String,Hashtable<String,String>> modeHash = new Hashtable<String,Hashtable<String,String>>();
- Set<Map.Entry<String,AbbrevsModel>> entrySet = modeAbbrevs.entrySet();
- for (Map.Entry<String,AbbrevsModel> entry : entrySet)
- {
- modeHash.put(entry.getKey(),entry.getValue().toHashtable());
- }
- Abbrevs.setModeAbbrevs(modeHash);
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private JComboBox setsComboBox;
- private JCheckBox expandOnInput;
- private JTable abbrevsTable;
- private AbbrevsModel globalAbbrevs;
- private Map<String,AbbrevsModel> modeAbbrevs;
- private JButton add;
- private JButton edit;
- private JButton remove;
- //}}}
-
- //{{{ updateEnabled() method
- private void updateEnabled()
- {
- int selectedRow = abbrevsTable.getSelectedRow();
- edit.setEnabled(selectedRow != -1);
- remove.setEnabled(selectedRow != -1);
- } //}}}
-
- //{{{ edit() method
- private void edit()
- {
- AbbrevsModel abbrevsModel = (AbbrevsModel)abbrevsTable.getModel();
-
- int row = abbrevsTable.getSelectedRow();
-
- String abbrev = (String)abbrevsModel.getValueAt(row,0);
- String expansion = (String)abbrevsModel.getValueAt(row,1);
- String oldAbbrev = abbrev;
-
- EditAbbrevDialog dialog = new EditAbbrevDialog(
- GUIUtilities.getParentDialog(AbbrevsOptionPane.this),
- abbrev,expansion,abbrevsModel.toHashtable());
- abbrev = dialog.getAbbrev();
- expansion = dialog.getExpansion();
- if(abbrev != null && expansion != null)
- {
- for(int i = 0; i < abbrevsModel.getRowCount(); i++)
- {
- if(abbrevsModel.getValueAt(i,0).equals(oldAbbrev))
- {
- abbrevsModel.remove(i);
- break;
- }
- }
-
- add(abbrevsModel,abbrev,expansion);
- }
- } //}}}
-
- //{{{ add() method
- private void add(AbbrevsModel abbrevsModel, String abbrev,
- String expansion)
- {
- for(int i = 0; i < abbrevsModel.getRowCount(); i++)
- {
- if(abbrevsModel.getValueAt(i,0).equals(abbrev))
- {
- abbrevsModel.remove(i);
- break;
- }
- }
-
- abbrevsModel.add(abbrev,expansion);
- updateEnabled();
- } //}}}
-
- //}}}
-
- //{{{ HeaderMouseHandler class
- private class HeaderMouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- switch(abbrevsTable.getTableHeader().columnAtPoint(evt.getPoint()))
- {
- case 0:
- ((AbbrevsModel)abbrevsTable.getModel()).sort(0);
- break;
- case 1:
- ((AbbrevsModel)abbrevsTable.getModel()).sort(1);
- break;
- }
- }
- } //}}}
-
- //{{{ TableMouseHandler class
- private class TableMouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- if(evt.getClickCount() == 2)
- edit();
- }
- } //}}}
-
- //{{{ SelectionHandler class
- private class SelectionHandler implements ListSelectionListener
- {
- public void valueChanged(ListSelectionEvent evt)
- {
- updateEnabled();
- }
- } //}}}
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- AbbrevsModel abbrevsModel = (AbbrevsModel)abbrevsTable.getModel();
-
- Object source = evt.getSource();
- if(source == setsComboBox)
- {
- jEdit.setIntegerProperty("options.abbrevs.combobox.index", setsComboBox.getSelectedIndex());
- String selected = (String)setsComboBox.getSelectedItem();
- if(selected.equals("global"))
- {
- abbrevsTable.setModel(globalAbbrevs);
- }
- else
- {
- abbrevsTable.setModel(modeAbbrevs.get(selected));
- }
- updateEnabled();
- }
- else if(source == add)
- {
- EditAbbrevDialog dialog = new EditAbbrevDialog(
- GUIUtilities.getParentDialog(AbbrevsOptionPane.this),
- null,null,abbrevsModel.toHashtable());
- String abbrev = dialog.getAbbrev();
- String expansion = dialog.getExpansion();
- if(abbrev != null && abbrev.length() != 0
- && expansion != null
- && expansion.length() != 0)
- {
- add(abbrevsModel,abbrev,expansion);
- }
- }
- else if(source == edit)
- {
- edit();
- }
- else if(source == remove)
- {
- int selectedRow = abbrevsTable.getSelectedRow();
- abbrevsModel.remove(selectedRow);
- updateEnabled();
- }
- }
- } //}}}
-
- //{{{ Renderer class
- private static class Renderer extends DefaultTableCellRenderer
- {
- @Override
- public Component getTableCellRendererComponent(
- JTable table,
- Object value,
- boolean isSelected,
- boolean cellHasFocus,
- int row,
- int col)
- {
- String valueStr = value.toString();
-
- // workaround for Swing's annoying processing of
- // labels starting with <html>, which often breaks
- if(valueStr.toLowerCase().startsWith("<html>"))
- valueStr = ' ' + valueStr;
- return super.getTableCellRendererComponent(table,valueStr,
- isSelected,cellHasFocus,row,col);
- }
- } //}}}
-
- //{{{ AbbrevsModel class
- private static class AbbrevsModel extends AbstractTableModel
- {
- List<Abbrev> abbrevs;
- int lastSort;
-
- //{{{ AbbrevsModel constructor
- AbbrevsModel(Map<String,String> abbrevHash)
- {
- abbrevs = new Vector<Abbrev>();
-
- if(abbrevHash != null)
- {
- Set<Map.Entry<String,String>> entrySet = abbrevHash.entrySet();
- for (Map.Entry<String,String> entry : entrySet)
- {
- abbrevs.add(new Abbrev(entry.getKey(),
- entry.getValue()));
- }
- sort(0);
- }
- } //}}}
-
- //{{{ sort() method
- void sort(int col)
- {
- lastSort = col;
- Collections.sort(abbrevs,new AbbrevCompare(col));
- fireTableDataChanged();
- } //}}}
-
- //{{{ add() method
- void add(String abbrev, String expansion)
- {
- abbrevs.add(new Abbrev(abbrev,expansion));
- sort(lastSort);
- } //}}}
-
- //{{{ remove() method
- void remove(int index)
- {
- abbrevs.remove(index);
- fireTableStructureChanged();
- } //}}}
-
- //{{{ toHashtable() method
- public Hashtable<String,String> toHashtable()
- {
- Hashtable<String,String> hash = new Hashtable<String,String>();
- for(int i = 0; i < abbrevs.size(); i++)
- {
- Abbrev abbrev = abbrevs.get(i);
- if(abbrev.abbrev.length() > 0
- && abbrev.expand.length() > 0)
- {
- hash.put(abbrev.abbrev,abbrev.expand);
- }
- }
- return hash;
- } //}}}
-
- //{{{ getColumnCount() method
- public int getColumnCount()
- {
- return 2;
- } //}}}
-
- //{{{ getRowCount() method
- public int getRowCount()
- {
- return abbrevs.size();
- } //}}}
-
- //{{{ getValueAt() method
- public Object getValueAt(int row, int col)
- {
- Abbrev abbrev = abbrevs.get(row);
- switch(col)
- {
- case 0:
- return abbrev.abbrev;
- case 1:
- return abbrev.expand;
- default:
- return null;
- }
- } //}}}
-
- //{{{ setValueAt() method
- @Override
- public void setValueAt(Object value, int row, int col)
- {
- if(value == null)
- value = "";
-
- Abbrev abbrev = abbrevs.get(row);
-
- if(col == 0)
- abbrev.abbrev = (String)value;
- else
- abbrev.expand = (String)value;
-
- fireTableRowsUpdated(row,row);
- } //}}}
-
- //{{{ getColumnName() method
- @Override
- public String getColumnName(int index)
- {
- switch(index)
- {
- case 0:
- return jEdit.getProperty("options.abbrevs.abbrev");
- case 1:
- return jEdit.getProperty("options.abbrevs.expand");
- default:
- return null;
- }
- } //}}}
-
- //{{{ AbbrevCompare class
- private static class AbbrevCompare implements Comparator<Abbrev>
- {
- private int col;
-
- AbbrevCompare(int col)
- {
- this.col = col;
- }
-
- public int compare(Abbrev a1, Abbrev a2)
- {
- if(col == 0)
- {
- String abbrev1 = a1.abbrev.toLowerCase();
- String abbrev2 = a2.abbrev.toLowerCase();
-
- return StandardUtilities.compareStrings(
- abbrev1,abbrev2,true);
- }
- else
- {
- String expand1 = a1.expand.toLowerCase();
- String expand2 = a2.expand.toLowerCase();
-
- return StandardUtilities.compareStrings(
- expand1,expand2,true);
- }
- }
- } //}}}
-
- //{{{ Abbrev class
- private static class Abbrev
- {
- Abbrev() {}
-
- Abbrev(String abbrev, String expand)
- {
- this.abbrev = abbrev;
- this.expand = expand;
- }
-
- String abbrev;
- String expand;
- } //}}}
-
- } //}}}
-
-} //}}}
+/*
+ * AbbrevsOptionPane.java - Abbrevs options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.*;
+import javax.swing.table.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.*;
+import java.util.List;
+
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+//{{{ AbbrevsOptionPane class
+/**
+ * Abbrev editor.
+ * @author Slava Pestov
+ * @version $Id: AbbrevsOptionPane.java 14126 2008-12-01 10:09:52Z kpouer $
+ */
+public class AbbrevsOptionPane extends AbstractOptionPane
+{
+ //{{{ AbbrevsOptionPane constructor
+ public AbbrevsOptionPane()
+ {
+ super("abbrevs");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ setLayout(new BorderLayout());
+
+ JPanel panel = new JPanel(new BorderLayout(6,6));
+
+ expandOnInput = new JCheckBox(jEdit.getProperty("options.abbrevs"
+ + ".expandOnInput"),Abbrevs.getExpandOnInput());
+
+ panel.add(expandOnInput,BorderLayout.NORTH);
+
+ JPanel panel2 = new JPanel();
+ panel2.setLayout(new BoxLayout(panel2,BoxLayout.X_AXIS));
+ panel2.setBorder(new EmptyBorder(0,0,6,0));
+ panel2.add(Box.createGlue());
+ JLabel label = new JLabel(jEdit.getProperty("options.abbrevs.set"));
+ label.setBorder(new EmptyBorder(0,0,0,12));
+ panel2.add(label);
+
+ Map<String,Hashtable<String,String>> _modeAbbrevs = Abbrevs.getModeAbbrevs();
+ modeAbbrevs = new HashMap<String,AbbrevsModel>();
+ Mode[] modes = jEdit.getModes();
+ Arrays.sort(modes,new StandardUtilities.StringCompare<Mode>(true));
+ String[] sets = new String[modes.length + 1];
+ sets[0] = "global";
+ for(int i = 0; i < modes.length; i++)
+ {
+ String name = modes[i].getName();
+ sets[i+1] = name;
+ modeAbbrevs.put(name,new AbbrevsModel(_modeAbbrevs.get(name)));
+ }
+
+ setsComboBox = new JComboBox(sets);
+ ActionHandler actionHandler = new ActionHandler();
+ setsComboBox.addActionListener(actionHandler);
+ panel2.add(setsComboBox);
+ panel2.add(Box.createGlue());
+ panel.add(panel2,BorderLayout.SOUTH);
+
+ add(BorderLayout.NORTH,panel);
+
+ globalAbbrevs = new AbbrevsModel(Abbrevs.getGlobalAbbrevs());
+ abbrevsTable = new JTable(globalAbbrevs);
+ abbrevsTable.getColumnModel().getColumn(1).setCellRenderer(
+ new Renderer());
+ abbrevsTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
+ abbrevsTable.getTableHeader().setReorderingAllowed(false);
+ abbrevsTable.getTableHeader().addMouseListener(new HeaderMouseHandler());
+ abbrevsTable.getSelectionModel().addListSelectionListener(
+ new SelectionHandler());
+ abbrevsTable.getSelectionModel().setSelectionMode(
+ ListSelectionModel.SINGLE_SELECTION);
+ abbrevsTable.addMouseListener(new TableMouseHandler());
+ Dimension d = abbrevsTable.getPreferredSize();
+ d.height = Math.min(d.height,200);
+ JScrollPane scroller = new JScrollPane(abbrevsTable);
+ scroller.setPreferredSize(d);
+ add(BorderLayout.CENTER,scroller);
+
+ JPanel buttons = new JPanel();
+ buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
+ buttons.setBorder(new EmptyBorder(6,0,0,0));
+
+ add = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.abbrevs.add.icon")));
+ add.setToolTipText(jEdit.getProperty("options.abbrevs.add"));
+ add.addActionListener(actionHandler);
+ buttons.add(add);
+ remove = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.abbrevs.remove.icon")));
+ remove.setToolTipText(jEdit.getProperty("options.abbrevs.remove"));
+ remove.addActionListener(actionHandler);
+ buttons.add(remove);
+ edit = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.abbrevs.edit.icon")));
+ edit.setToolTipText(jEdit.getProperty("options.abbrevs.edit"));
+ edit.addActionListener(actionHandler);
+ buttons.add(edit);
+ buttons.add(Box.createGlue());
+
+ add(BorderLayout.SOUTH,buttons);
+ setsComboBox.setSelectedIndex(jEdit.getIntegerProperty("options.abbrevs.combobox.index", 0));
+ updateEnabled();
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ if(abbrevsTable.getCellEditor() != null)
+ abbrevsTable.getCellEditor().stopCellEditing();
+
+ Abbrevs.setExpandOnInput(expandOnInput.isSelected());
+
+ Abbrevs.setGlobalAbbrevs(globalAbbrevs.toHashtable());
+
+ Hashtable<String,Hashtable<String,String>> modeHash = new Hashtable<String,Hashtable<String,String>>();
+ Set<Map.Entry<String,AbbrevsModel>> entrySet = modeAbbrevs.entrySet();
+ for (Map.Entry<String,AbbrevsModel> entry : entrySet)
+ {
+ modeHash.put(entry.getKey(),entry.getValue().toHashtable());
+ }
+ Abbrevs.setModeAbbrevs(modeHash);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private JComboBox setsComboBox;
+ private JCheckBox expandOnInput;
+ private JTable abbrevsTable;
+ private AbbrevsModel globalAbbrevs;
+ private Map<String,AbbrevsModel> modeAbbrevs;
+ private JButton add;
+ private JButton edit;
+ private JButton remove;
+ //}}}
+
+ //{{{ updateEnabled() method
+ private void updateEnabled()
+ {
+ int selectedRow = abbrevsTable.getSelectedRow();
+ edit.setEnabled(selectedRow != -1);
+ remove.setEnabled(selectedRow != -1);
+ } //}}}
+
+ //{{{ edit() method
+ private void edit()
+ {
+ AbbrevsModel abbrevsModel = (AbbrevsModel)abbrevsTable.getModel();
+
+ int row = abbrevsTable.getSelectedRow();
+
+ String abbrev = (String)abbrevsModel.getValueAt(row,0);
+ String expansion = (String)abbrevsModel.getValueAt(row,1);
+ String oldAbbrev = abbrev;
+
+ EditAbbrevDialog dialog = new EditAbbrevDialog(
+ GUIUtilities.getParentDialog(AbbrevsOptionPane.this),
+ abbrev,expansion,abbrevsModel.toHashtable());
+ abbrev = dialog.getAbbrev();
+ expansion = dialog.getExpansion();
+ if(abbrev != null && expansion != null)
+ {
+ for(int i = 0; i < abbrevsModel.getRowCount(); i++)
+ {
+ if(abbrevsModel.getValueAt(i,0).equals(oldAbbrev))
+ {
+ abbrevsModel.remove(i);
+ break;
+ }
+ }
+
+ add(abbrevsModel,abbrev,expansion);
+ }
+ } //}}}
+
+ //{{{ add() method
+ private void add(AbbrevsModel abbrevsModel, String abbrev,
+ String expansion)
+ {
+ for(int i = 0; i < abbrevsModel.getRowCount(); i++)
+ {
+ if(abbrevsModel.getValueAt(i,0).equals(abbrev))
+ {
+ abbrevsModel.remove(i);
+ break;
+ }
+ }
+
+ abbrevsModel.add(abbrev,expansion);
+ updateEnabled();
+ } //}}}
+
+ //}}}
+
+ //{{{ HeaderMouseHandler class
+ private class HeaderMouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ switch(abbrevsTable.getTableHeader().columnAtPoint(evt.getPoint()))
+ {
+ case 0:
+ ((AbbrevsModel)abbrevsTable.getModel()).sort(0);
+ break;
+ case 1:
+ ((AbbrevsModel)abbrevsTable.getModel()).sort(1);
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ TableMouseHandler class
+ private class TableMouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ if(evt.getClickCount() == 2)
+ edit();
+ }
+ } //}}}
+
+ //{{{ SelectionHandler class
+ private class SelectionHandler implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent evt)
+ {
+ updateEnabled();
+ }
+ } //}}}
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ AbbrevsModel abbrevsModel = (AbbrevsModel)abbrevsTable.getModel();
+
+ Object source = evt.getSource();
+ if(source == setsComboBox)
+ {
+ jEdit.setIntegerProperty("options.abbrevs.combobox.index", setsComboBox.getSelectedIndex());
+ String selected = (String)setsComboBox.getSelectedItem();
+ if(selected.equals("global"))
+ {
+ abbrevsTable.setModel(globalAbbrevs);
+ }
+ else
+ {
+ abbrevsTable.setModel(modeAbbrevs.get(selected));
+ }
+ updateEnabled();
+ }
+ else if(source == add)
+ {
+ EditAbbrevDialog dialog = new EditAbbrevDialog(
+ GUIUtilities.getParentDialog(AbbrevsOptionPane.this),
+ null,null,abbrevsModel.toHashtable());
+ String abbrev = dialog.getAbbrev();
+ String expansion = dialog.getExpansion();
+ if(abbrev != null && abbrev.length() != 0
+ && expansion != null
+ && expansion.length() != 0)
+ {
+ add(abbrevsModel,abbrev,expansion);
+ }
+ }
+ else if(source == edit)
+ {
+ edit();
+ }
+ else if(source == remove)
+ {
+ int selectedRow = abbrevsTable.getSelectedRow();
+ abbrevsModel.remove(selectedRow);
+ updateEnabled();
+ }
+ }
+ } //}}}
+
+ //{{{ Renderer class
+ private static class Renderer extends DefaultTableCellRenderer
+ {
+ @Override
+ public Component getTableCellRendererComponent(
+ JTable table,
+ Object value,
+ boolean isSelected,
+ boolean cellHasFocus,
+ int row,
+ int col)
+ {
+ String valueStr = value.toString();
+
+ // workaround for Swing's annoying processing of
+ // labels starting with <html>, which often breaks
+ if(valueStr.toLowerCase().startsWith("<html>"))
+ valueStr = ' ' + valueStr;
+ return super.getTableCellRendererComponent(table,valueStr,
+ isSelected,cellHasFocus,row,col);
+ }
+ } //}}}
+
+ //{{{ AbbrevsModel class
+ private static class AbbrevsModel extends AbstractTableModel
+ {
+ List<Abbrev> abbrevs;
+ int lastSort;
+
+ //{{{ AbbrevsModel constructor
+ AbbrevsModel(Map<String,String> abbrevHash)
+ {
+ abbrevs = new Vector<Abbrev>();
+
+ if(abbrevHash != null)
+ {
+ Set<Map.Entry<String,String>> entrySet = abbrevHash.entrySet();
+ for (Map.Entry<String,String> entry : entrySet)
+ {
+ abbrevs.add(new Abbrev(entry.getKey(),
+ entry.getValue()));
+ }
+ sort(0);
+ }
+ } //}}}
+
+ //{{{ sort() method
+ void sort(int col)
+ {
+ lastSort = col;
+ Collections.sort(abbrevs,new AbbrevCompare(col));
+ fireTableDataChanged();
+ } //}}}
+
+ //{{{ add() method
+ void add(String abbrev, String expansion)
+ {
+ abbrevs.add(new Abbrev(abbrev,expansion));
+ sort(lastSort);
+ } //}}}
+
+ //{{{ remove() method
+ void remove(int index)
+ {
+ abbrevs.remove(index);
+ fireTableStructureChanged();
+ } //}}}
+
+ //{{{ toHashtable() method
+ public Hashtable<String,String> toHashtable()
+ {
+ Hashtable<String,String> hash = new Hashtable<String,String>();
+ for(int i = 0; i < abbrevs.size(); i++)
+ {
+ Abbrev abbrev = abbrevs.get(i);
+ if(abbrev.abbrev.length() > 0
+ && abbrev.expand.length() > 0)
+ {
+ hash.put(abbrev.abbrev,abbrev.expand);
+ }
+ }
+ return hash;
+ } //}}}
+
+ //{{{ getColumnCount() method
+ public int getColumnCount()
+ {
+ return 2;
+ } //}}}
+
+ //{{{ getRowCount() method
+ public int getRowCount()
+ {
+ return abbrevs.size();
+ } //}}}
+
+ //{{{ getValueAt() method
+ public Object getValueAt(int row, int col)
+ {
+ Abbrev abbrev = abbrevs.get(row);
+ switch(col)
+ {
+ case 0:
+ return abbrev.abbrev;
+ case 1:
+ return abbrev.expand;
+ default:
+ return null;
+ }
+ } //}}}
+
+ //{{{ setValueAt() method
+ @Override
+ public void setValueAt(Object value, int row, int col)
+ {
+ if(value == null)
+ value = "";
+
+ Abbrev abbrev = abbrevs.get(row);
+
+ if(col == 0)
+ abbrev.abbrev = (String)value;
+ else
+ abbrev.expand = (String)value;
+
+ fireTableRowsUpdated(row,row);
+ } //}}}
+
+ //{{{ getColumnName() method
+ @Override
+ public String getColumnName(int index)
+ {
+ switch(index)
+ {
+ case 0:
+ return jEdit.getProperty("options.abbrevs.abbrev");
+ case 1:
+ return jEdit.getProperty("options.abbrevs.expand");
+ default:
+ return null;
+ }
+ } //}}}
+
+ //{{{ AbbrevCompare class
+ private static class AbbrevCompare implements Comparator<Abbrev>
+ {
+ private int col;
+
+ AbbrevCompare(int col)
+ {
+ this.col = col;
+ }
+
+ public int compare(Abbrev a1, Abbrev a2)
+ {
+ if(col == 0)
+ {
+ String abbrev1 = a1.abbrev.toLowerCase();
+ String abbrev2 = a2.abbrev.toLowerCase();
+
+ return StandardUtilities.compareStrings(
+ abbrev1,abbrev2,true);
+ }
+ else
+ {
+ String expand1 = a1.expand.toLowerCase();
+ String expand2 = a2.expand.toLowerCase();
+
+ return StandardUtilities.compareStrings(
+ expand1,expand2,true);
+ }
+ }
+ } //}}}
+
+ //{{{ Abbrev class
+ private static class Abbrev
+ {
+ Abbrev() {}
+
+ Abbrev(String abbrev, String expand)
+ {
+ this.abbrev = abbrev;
+ this.expand = expand;
+ }
+
+ String abbrev;
+ String expand;
+ } //}}}
+
+ } //}}}
+
+} //}}}
diff --git a/jEdit/org/gjt/sp/jedit/options/AppearanceOptionPane.java b/jEdit/org/gjt/sp/jedit/options/AppearanceOptionPane.java
index ff094e3..2ae385b 100644
--- a/jEdit/org/gjt/sp/jedit/options/AppearanceOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/AppearanceOptionPane.java
@@ -1,287 +1,296 @@
-/*
- * AppearanceOptionPane.java - Appearance options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.*;
-
-import java.awt.event.*;
-import java.io.*;
-import org.gjt.sp.jedit.gui.FontSelector;
-import org.gjt.sp.jedit.gui.NumericTextField;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.IOUtilities;
-//}}}
-
-public class AppearanceOptionPane extends AbstractOptionPane
-{
- /**
- * List of icon themes that are supported in jEdit core.
- * Possible values of the jedit property 'icon-theme'
- */
- public static final String[] builtInIconThemes = {"tango", "old"};
-
- //{{{ AppearanceOptionPane constructor
- public AppearanceOptionPane()
- {
- super("appearance");
- } //}}}
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- /* Look and feel */
- addComponent(new JLabel(jEdit.getProperty("options.appearance.lf.note")));
-
- lfs = UIManager.getInstalledLookAndFeels();
- String[] names = new String[lfs.length];
- String lf = UIManager.getLookAndFeel().getClass().getName();
- int index = 0;
- for(int i = 0; i < names.length; i++)
- {
- names[i] = lfs[i].getName();
- if(lf.equals(lfs[i].getClassName()))
- index = i;
- }
-
- lookAndFeel = new JComboBox(names);
- lookAndFeel.setSelectedIndex(index);
- lookAndFeel.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- updateEnabled();
- }
- });
-
-
- addComponent(jEdit.getProperty("options.appearance.lf"),
- lookAndFeel);
- addDockingFrameworkChooser();
-
- /* Icon Theme */
- String[] themes = IconTheme.builtInNames();
- iconThemes = new JComboBox(themes);
- addComponent(jEdit.getProperty("options.appearance.iconTheme"), iconThemes);
- oldTheme = IconTheme.get();
- for (int i=0; i<themes.length; ++i)
- {
- if (themes[i].equals(oldTheme))
- {
- iconThemes.setSelectedIndex(i);
- break;
- }
- }
-
- /* Primary Metal L&F font */
- primaryFont = new FontSelector(jEdit.getFontProperty(
- "metal.primary.font"));
- addComponent(jEdit.getProperty("options.appearance.primaryFont"),
- primaryFont);
-
- /* Secondary Metal L&F font */
- secondaryFont = new FontSelector(jEdit.getFontProperty(
- "metal.secondary.font"));
- addComponent(jEdit.getProperty("options.appearance.secondaryFont"),
- secondaryFont);
-
- /*
- antiAliasExtras = new JComboBox(AntiAlias.comboChoices);
- antiAliasExtras.setSelectedIndex(AntiAlias.appearance().val());
- antiAliasExtras.setToolTipText(jEdit.getProperty("options.textarea.antiAlias.tooltip"));
- addComponent(jEdit.getProperty("options.appearance.fonts.antialias"), antiAliasExtras);
- */
- updateEnabled();
-
- /* History count */
- history = new NumericTextField(jEdit.getProperty("history"), true);
- addComponent(jEdit.getProperty("options.appearance.history"),history);
-
- /* Menu spillover count */
- menuSpillover = new NumericTextField(jEdit.getProperty("menu.spillover"), true);
- addComponent(jEdit.getProperty("options.appearance.menuSpillover"),menuSpillover);
-
- continuousLayout = new JCheckBox(jEdit.getProperty(
- "options.appearance.continuousLayout.label"));
- continuousLayout.setSelected(jEdit.getBooleanProperty("appearance.continuousLayout"));
- addComponent(continuousLayout);
-
- addSeparator("options.appearance.startup.label");
-
- /* Show splash screen */
- showSplash = new JCheckBox(jEdit.getProperty(
- "options.appearance.showSplash"));
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory == null)
- showSplash.setSelected(true);
- else
- showSplash.setSelected(!new File(settingsDirectory,"nosplash").exists());
- addComponent(showSplash);
-
- /* Show tip of the day */
- showTips = new JCheckBox(jEdit.getProperty(
- "options.appearance.showTips"));
- showTips.setSelected(jEdit.getBooleanProperty("tip.show"));
- addComponent(showTips);
-
- addSeparator("options.appearance.experimental.label");
- addComponent(GUIUtilities.createMultilineLabel(
- jEdit.getProperty("options.appearance.experimental.caption")));
-
- /* Use jEdit colors in all text components */
- textColors = new JCheckBox(jEdit.getProperty(
- "options.appearance.textColors"));
- textColors.setSelected(jEdit.getBooleanProperty("textColors"));
- addComponent(textColors);
-
- /* Decorate frames with look and feel (JDK 1.4 only) */
- decorateFrames = new JCheckBox(jEdit.getProperty(
- "options.appearance.decorateFrames"));
- decorateFrames.setSelected(jEdit.getBooleanProperty("decorate.frames"));
- addComponent(decorateFrames);
-
- /* Decorate dialogs with look and feel (JDK 1.4 only) */
- decorateDialogs = new JCheckBox(jEdit.getProperty(
- "options.appearance.decorateDialogs"));
- decorateDialogs.setSelected(jEdit.getBooleanProperty("decorate.dialogs"));
- addComponent(decorateDialogs);
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
- String lf = lfs[lookAndFeel.getSelectedIndex()].getClassName();
- jEdit.setProperty("lookAndFeel",lf);
- jEdit.setFontProperty("metal.primary.font",primaryFont.getFont());
- jEdit.setFontProperty("metal.secondary.font",secondaryFont.getFont());
- jEdit.setProperty("history",history.getText());
- jEdit.setProperty("menu.spillover",menuSpillover.getText());
- jEdit.setBooleanProperty("tip.show",showTips.isSelected());
- jEdit.setBooleanProperty("appearance.continuousLayout",continuousLayout.isSelected());
- IconTheme.set(iconThemes.getSelectedItem().toString());
-
- jEdit.setProperty(View.VIEW_DOCKING_FRAMEWORK_PROPERTY,
- (String) dockingFramework.getSelectedItem());
-
- /* AntiAlias nv = AntiAlias.appearance();
- int idx = antiAliasExtras.getSelectedIndex();
- nv.set(idx);
- primaryFont.setAntiAliasEnabled(idx > 0);
- secondaryFont.setAntiAliasEnabled(idx > 0);
- primaryFont.repaint();
- secondaryFont.repaint(); */
-
- // this is handled a little differently from other jEdit settings
- // as the splash screen flag needs to be known very early in the
- // startup sequence, before the user properties have been loaded
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory != null)
- {
- File file = new File(settingsDirectory,"nosplash");
- if(showSplash.isSelected())
- file.delete();
- else
- {
- FileOutputStream out = null;
- try
- {
- out = new FileOutputStream(file);
- out.write('\n');
- out.close();
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
- }
- }
- jEdit.setBooleanProperty("textColors",textColors.isSelected());
- jEdit.setBooleanProperty("decorate.frames",decorateFrames.isSelected());
- jEdit.setBooleanProperty("decorate.dialogs",decorateDialogs.isSelected());
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private String oldTheme;
- private UIManager.LookAndFeelInfo[] lfs;
- private JComboBox lookAndFeel;
- private FontSelector primaryFont;
- private FontSelector secondaryFont;
- private JComboBox dockingFramework;
- private JTextField history;
- private JTextField menuSpillover;
- private JCheckBox showTips;
- private JCheckBox continuousLayout;
- private JCheckBox showSplash;
- private JCheckBox textColors;
- private JCheckBox decorateFrames;
- private JCheckBox decorateDialogs;
- private JComboBox antiAliasExtras;
- private JComboBox iconThemes;
- //}}}
-
- //{{{ updateEnabled() method
- private void updateEnabled()
- {
- String className = lfs[lookAndFeel.getSelectedIndex()]
- .getClassName();
-
- if(className.equals("javax.swing.plaf.metal.MetalLookAndFeel")
- || className.equals("com.incors.plaf.kunststoff.KunststoffLookAndFeel"))
- {
- primaryFont.setEnabled(true);
- secondaryFont.setEnabled(true);
- }
- else
- {
- primaryFont.setEnabled(false);
- secondaryFont.setEnabled(false);
- }
- } //}}}
- private void addDockingFrameworkChooser()
- {
- String [] frameworks =
- ServiceManager.getServiceNames(View.DOCKING_FRAMEWORK_PROVIDER_SERVICE);
- dockingFramework = new JComboBox(frameworks);
- String framework = View.getDockingFrameworkName();
- for (int i = 0; i < frameworks.length; i++)
- {
- if (frameworks[i].equals(framework))
- {
- dockingFramework.setSelectedIndex(i);
- break;
- }
- }
- addComponent(new JLabel(jEdit.getProperty("options.appearance.selectFramework.label")), dockingFramework);
- }
-
- //}}}
-}
+/*
+ * AppearanceOptionPane.java - Appearance options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.*;
+
+import java.awt.Font;
+import java.awt.event.*;
+import java.io.*;
+import org.gjt.sp.jedit.gui.FontSelector;
+import org.gjt.sp.jedit.gui.NumericTextField;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.IOUtilities;
+//}}}
+
+public class AppearanceOptionPane extends AbstractOptionPane
+{
+ /**
+ * List of icon themes that are supported in jEdit core.
+ * Possible values of the jedit property 'icon-theme'
+ */
+ public static final String[] builtInIconThemes = {"tango", "old"};
+
+ //{{{ AppearanceOptionPane constructor
+ public AppearanceOptionPane()
+ {
+ super("appearance");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ /* Look and feel */
+ addComponent(new JLabel(jEdit.getProperty("options.appearance.lf.note")));
+
+ lfs = UIManager.getInstalledLookAndFeels();
+ String[] names = new String[lfs.length];
+ String lf = UIManager.getLookAndFeel().getClass().getName();
+ int index = 0;
+ for(int i = 0; i < names.length; i++)
+ {
+ names[i] = lfs[i].getName();
+ if(lf.equals(lfs[i].getClassName()))
+ index = i;
+ }
+
+ lookAndFeel = new JComboBox(names);
+ lookAndFeel.setSelectedIndex(index);
+ lookAndFeel.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ updateEnabled();
+ }
+ });
+
+
+ addComponent(jEdit.getProperty("options.appearance.lf"),
+ lookAndFeel);
+ addDockingFrameworkChooser();
+
+ /* Icon Theme */
+ String[] themes = IconTheme.builtInNames();
+ iconThemes = new JComboBox(themes);
+ addComponent(jEdit.getProperty("options.appearance.iconTheme"), iconThemes);
+ oldTheme = IconTheme.get();
+ for (int i=0; i<themes.length; ++i)
+ {
+ if (themes[i].equals(oldTheme))
+ {
+ iconThemes.setSelectedIndex(i);
+ break;
+ }
+ }
+
+ /* Primary Metal L&F font */
+ Font pf = jEdit.getFontProperty("metal.primary.font");
+ primaryFont = new FontSelector(pf);
+ addComponent(jEdit.getProperty("options.appearance.primaryFont"),
+ primaryFont);
+
+ /* Secondary Metal L&F font */
+ secondaryFont = new FontSelector(jEdit.getFontProperty(
+ "metal.secondary.font"));
+ addComponent(jEdit.getProperty("options.appearance.secondaryFont"),
+ secondaryFont);
+
+ /* HelpViewer font */
+ helpViewerFont = new FontSelector(jEdit.getFontProperty(
+ "helpviewer.font", pf));
+ addComponent(jEdit.getProperty("options.appearance.helpViewerFont"),
+ helpViewerFont);
+
+ /*
+ antiAliasExtras = new JComboBox(AntiAlias.comboChoices);
+ antiAliasExtras.setSelectedIndex(AntiAlias.appearance().val());
+ antiAliasExtras.setToolTipText(jEdit.getProperty("options.textarea.antiAlias.tooltip"));
+ addComponent(jEdit.getProperty("options.appearance.fonts.antialias"), antiAliasExtras);
+ */
+ updateEnabled();
+
+ /* History count */
+ history = new NumericTextField(jEdit.getProperty("history"), true);
+ addComponent(jEdit.getProperty("options.appearance.history"),history);
+
+ /* Menu spillover count */
+ menuSpillover = new NumericTextField(jEdit.getProperty("menu.spillover"), true);
+ addComponent(jEdit.getProperty("options.appearance.menuSpillover"),menuSpillover);
+
+ continuousLayout = new JCheckBox(jEdit.getProperty(
+ "options.appearance.continuousLayout.label"));
+ continuousLayout.setSelected(jEdit.getBooleanProperty("appearance.continuousLayout"));
+ addComponent(continuousLayout);
+
+ addSeparator("options.appearance.startup.label");
+
+ /* Show splash screen */
+ showSplash = new JCheckBox(jEdit.getProperty(
+ "options.appearance.showSplash"));
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory == null)
+ showSplash.setSelected(true);
+ else
+ showSplash.setSelected(!new File(settingsDirectory,"nosplash").exists());
+ addComponent(showSplash);
+
+ /* Show tip of the day */
+ showTips = new JCheckBox(jEdit.getProperty(
+ "options.appearance.showTips"));
+ showTips.setSelected(jEdit.getBooleanProperty("tip.show"));
+ addComponent(showTips);
+
+ addSeparator("options.appearance.experimental.label");
+ addComponent(GUIUtilities.createMultilineLabel(
+ jEdit.getProperty("options.appearance.experimental.caption")));
+
+ /* Use jEdit colors in all text components */
+ textColors = new JCheckBox(jEdit.getProperty(
+ "options.appearance.textColors"));
+ textColors.setSelected(jEdit.getBooleanProperty("textColors"));
+ addComponent(textColors);
+
+ /* Decorate frames with look and feel (JDK 1.4 only) */
+ decorateFrames = new JCheckBox(jEdit.getProperty(
+ "options.appearance.decorateFrames"));
+ decorateFrames.setSelected(jEdit.getBooleanProperty("decorate.frames"));
+ addComponent(decorateFrames);
+
+ /* Decorate dialogs with look and feel (JDK 1.4 only) */
+ decorateDialogs = new JCheckBox(jEdit.getProperty(
+ "options.appearance.decorateDialogs"));
+ decorateDialogs.setSelected(jEdit.getBooleanProperty("decorate.dialogs"));
+ addComponent(decorateDialogs);
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ String lf = lfs[lookAndFeel.getSelectedIndex()].getClassName();
+ jEdit.setProperty("lookAndFeel",lf);
+ jEdit.setFontProperty("metal.primary.font",primaryFont.getFont());
+ jEdit.setFontProperty("metal.secondary.font",secondaryFont.getFont());
+ jEdit.setFontProperty("helpviewer.font", helpViewerFont.getFont());
+ jEdit.setProperty("history",history.getText());
+ jEdit.setProperty("menu.spillover",menuSpillover.getText());
+ jEdit.setBooleanProperty("tip.show",showTips.isSelected());
+ jEdit.setBooleanProperty("appearance.continuousLayout",continuousLayout.isSelected());
+ IconTheme.set(iconThemes.getSelectedItem().toString());
+
+ jEdit.setProperty(View.VIEW_DOCKING_FRAMEWORK_PROPERTY,
+ (String) dockingFramework.getSelectedItem());
+
+ /* AntiAlias nv = AntiAlias.appearance();
+ int idx = antiAliasExtras.getSelectedIndex();
+ nv.set(idx);
+ primaryFont.setAntiAliasEnabled(idx > 0);
+ secondaryFont.setAntiAliasEnabled(idx > 0);
+ primaryFont.repaint();
+ secondaryFont.repaint(); */
+
+ // this is handled a little differently from other jEdit settings
+ // as the splash screen flag needs to be known very early in the
+ // startup sequence, before the user properties have been loaded
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory != null)
+ {
+ File file = new File(settingsDirectory,"nosplash");
+ if(showSplash.isSelected())
+ file.delete();
+ else
+ {
+ FileOutputStream out = null;
+ try
+ {
+ out = new FileOutputStream(file);
+ out.write('\n');
+ out.close();
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ }
+ }
+ jEdit.setBooleanProperty("textColors",textColors.isSelected());
+ jEdit.setBooleanProperty("decorate.frames",decorateFrames.isSelected());
+ jEdit.setBooleanProperty("decorate.dialogs",decorateDialogs.isSelected());
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private String oldTheme;
+ private UIManager.LookAndFeelInfo[] lfs;
+ private JComboBox lookAndFeel;
+ private FontSelector primaryFont;
+ private FontSelector secondaryFont;
+ private FontSelector helpViewerFont;
+ private JComboBox dockingFramework;
+ private JTextField history;
+ private JTextField menuSpillover;
+ private JCheckBox showTips;
+ private JCheckBox continuousLayout;
+ private JCheckBox showSplash;
+ private JCheckBox textColors;
+ private JCheckBox decorateFrames;
+ private JCheckBox decorateDialogs;
+ private JComboBox antiAliasExtras;
+ private JComboBox iconThemes;
+ //}}}
+
+ //{{{ updateEnabled() method
+ private void updateEnabled()
+ {
+ String className = lfs[lookAndFeel.getSelectedIndex()]
+ .getClassName();
+
+ if(className.equals("javax.swing.plaf.metal.MetalLookAndFeel")
+ || className.equals("com.incors.plaf.kunststoff.KunststoffLookAndFeel"))
+ {
+ primaryFont.setEnabled(true);
+ secondaryFont.setEnabled(true);
+ }
+ else
+ {
+ primaryFont.setEnabled(false);
+ secondaryFont.setEnabled(false);
+ }
+ } //}}}
+ private void addDockingFrameworkChooser()
+ {
+ String [] frameworks =
+ ServiceManager.getServiceNames(View.DOCKING_FRAMEWORK_PROVIDER_SERVICE);
+ dockingFramework = new JComboBox(frameworks);
+ String framework = View.getDockingFrameworkName();
+ for (int i = 0; i < frameworks.length; i++)
+ {
+ if (frameworks[i].equals(framework))
+ {
+ dockingFramework.setSelectedIndex(i);
+ break;
+ }
+ }
+ addComponent(new JLabel(jEdit.getProperty("options.appearance.selectFramework.label")), dockingFramework);
+ }
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/BrowserColorsOptionPane.java b/jEdit/org/gjt/sp/jedit/options/BrowserColorsOptionPane.java
index ce09f4b..8d5389b 100644
--- a/jEdit/org/gjt/sp/jedit/options/BrowserColorsOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/BrowserColorsOptionPane.java
@@ -1,407 +1,407 @@
-/*
- * BrowserColorsOptionPane.java - Browser colors options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.*;
-import javax.swing.table.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.*;
-import java.util.List;
-
-import org.gjt.sp.jedit.gui.RolloverButton;
-import org.gjt.sp.jedit.*;
-//}}}
-
-//{{{ BrowserColorsOptionPane class
-/**
- * Browser color editor.
- * @author Slava Pestov
- * @version $Id: BrowserColorsOptionPane.java 14468 2009-01-25 13:26:51Z kpouer $
- */
-public class BrowserColorsOptionPane extends AbstractOptionPane
-{
- //{{{ BrowserColorsOptionPane constructor
- public BrowserColorsOptionPane()
- {
- super("browser.colors");
- } //}}}
-
- //{{{ Protected members
-
- //{{{ _init() method
- protected void _init()
- {
- setLayout(new BorderLayout());
-
- colorsModel = new BrowserColorsModel();
- colorsTable = new JTable(colorsModel);
- colorsTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
- colorsTable.getTableHeader().setReorderingAllowed(false);
- colorsTable.addMouseListener(new MouseHandler());
- colorsTable.getSelectionModel().addListSelectionListener(
- new SelectionHandler());
- TableColumnModel tcm = colorsTable.getColumnModel();
- tcm.getColumn(1).setCellRenderer(new BrowserColorsModel.ColorRenderer());
- Dimension d = colorsTable.getPreferredSize();
- d.height = Math.min(d.height,200);
- JScrollPane scroller = new JScrollPane(colorsTable);
- scroller.setPreferredSize(d);
- add(BorderLayout.CENTER,scroller);
-
- JPanel buttons = new JPanel();
- buttons.setBorder(new EmptyBorder(3,0,0,0));
- buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
- ActionHandler actionHandler = new ActionHandler();
- add = new RolloverButton(GUIUtilities.loadIcon("Plus.png"));
- add.setToolTipText(jEdit.getProperty("common.add"));
- add.addActionListener(actionHandler);
- buttons.add(add);
- buttons.add(Box.createHorizontalStrut(6));
- remove = new RolloverButton(GUIUtilities.loadIcon("Minus.png"));
- remove.setToolTipText(jEdit.getProperty("common.remove"));
- remove.addActionListener(actionHandler);
- buttons.add(remove);
- buttons.add(Box.createHorizontalStrut(6));
- moveUp = new RolloverButton(GUIUtilities.loadIcon("ArrowU.png"));
- moveUp.setToolTipText(jEdit.getProperty("common.moveUp"));
- moveUp.addActionListener(actionHandler);
- buttons.add(moveUp);
- buttons.add(Box.createHorizontalStrut(6));
- moveDown = new RolloverButton(GUIUtilities.loadIcon("ArrowD.png"));
- moveDown.setToolTipText(jEdit.getProperty("common.moveDown"));
- moveDown.addActionListener(actionHandler);
- buttons.add(moveDown);
- buttons.add(Box.createGlue());
-
- add(BorderLayout.SOUTH,buttons);
-
- updateEnabled();
- } //}}}
-
- //{{{ _save() method
- protected void _save()
- {
- colorsModel.save();
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private BrowserColorsModel colorsModel;
- private JTable colorsTable;
- private JButton add;
- private JButton remove;
- private JButton moveUp;
- private JButton moveDown;
-
- //{{{ updateEnabled() method
- private void updateEnabled()
- {
- int selectedRow = colorsTable.getSelectedRow();
- remove.setEnabled(selectedRow != -1);
- moveUp.setEnabled(selectedRow > 0);
- moveUp.setEnabled(selectedRow != -1 && selectedRow !=
- colorsModel.getRowCount());
- } //}}}
-
- //{{{ setSelectedRow() method
- private void setSelectedRow(int row)
- {
- colorsTable.getSelectionModel().setSelectionInterval(row,row);
- colorsTable.scrollRectToVisible(colorsTable.getCellRect(row,0,true));
- } //}}}
-
- //}}}
-
- //{{{ SelectionHandler class
- class SelectionHandler implements ListSelectionListener
- {
- public void valueChanged(ListSelectionEvent evt)
- {
- updateEnabled();
- }
- } //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == add)
- {
- colorsModel.add();
- }
- else if(source == remove)
- {
- int selectedRow = colorsTable.getSelectedRow();
- colorsModel.remove(selectedRow);
- updateEnabled();
- }
- else if(source == moveUp)
- {
- int selectedRow = colorsTable.getSelectedRow();
- if(selectedRow != 0)
- {
- colorsModel.moveUp(selectedRow);
- setSelectedRow(selectedRow - 1);
- }
- updateEnabled();
- }
- else if(source == moveDown)
- {
- int selectedRow = colorsTable.getSelectedRow();
- if(selectedRow != colorsTable.getRowCount() - 1)
- {
- colorsModel.moveDown(selectedRow);
- setSelectedRow(selectedRow + 1);
- }
- updateEnabled();
- }
- }
- } //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- public void mouseClicked(MouseEvent evt)
- {
- Point p = evt.getPoint();
- int row = colorsTable.rowAtPoint(p);
- int column = colorsTable.columnAtPoint(p);
- if(row == -1 || column != 1)
- return;
-
- Color color = JColorChooser.showDialog(
- BrowserColorsOptionPane.this,
- jEdit.getProperty("colorChooser.title"),
- (Color)colorsModel.getValueAt(row,1));
- if(color != null)
- colorsModel.setValueAt(color,row,1);
- }
- } //}}}
-} //}}}
-
-//{{{ BrowserColorsModel class
-class BrowserColorsModel extends AbstractTableModel
-{
- //{{{ BrowserColorsModel constructor
- BrowserColorsModel()
- {
- entries = new ArrayList<Entry>();
-
- int i = 0;
- String glob;
- while((glob = jEdit.getProperty("vfs.browser.colors." + i + ".glob")) != null)
- {
- entries.add(new Entry(glob,
- jEdit.getColorProperty(
- "vfs.browser.colors." + i + ".color",
- Color.black)));
- i++;
- }
- } //}}}
-
- //{{{ add() method
- void add()
- {
- entries.add(new Entry("",UIManager.getColor("Tree.foreground")));
- fireTableRowsInserted(entries.size() - 1,entries.size() - 1);
- } //}}}
-
- //{{{ remove() method
- void remove(int index)
- {
- entries.remove(index);
- fireTableRowsDeleted(entries.size(),entries.size());
- } //}}}
-
- //{{{ moveUp() method
- public void moveUp(int index)
- {
- Entry entry = entries.get(index);
- entries.remove(index);
- entries.add(index - 1,entry);
- fireTableRowsUpdated(index - 1,index);
- } //}}}
-
- //{{{ moveDown() method
- public void moveDown(int index)
- {
- Entry entry = entries.get(index);
- entries.remove(index);
- entries.add(index + 1,entry);
- fireTableRowsUpdated(index,index + 1);
- } //}}}
-
- //{{{ save() method
- void save()
- {
- int i;
- for(i = 0; i < entries.size(); i++)
- {
- Entry entry = entries.get(i);
- jEdit.setProperty("vfs.browser.colors." + i + ".glob",
- entry.glob);
- jEdit.setColorProperty("vfs.browser.colors." + i + ".color",
- entry.color);
- }
- jEdit.unsetProperty("vfs.browser.colors." + i + ".glob");
- jEdit.unsetProperty("vfs.browser.colors." + i + ".color");
- } //}}}
-
- //{{{ getColumnCount() method
- public int getColumnCount()
- {
- return 2;
- } //}}}
-
- //{{{ getRowCount() method
- public int getRowCount()
- {
- return entries.size();
- } //}}}
-
- //{{{ getValueAt() method
- public Object getValueAt(int row, int col)
- {
- Entry entry = entries.get(row);
-
- switch(col)
- {
- case 0:
- return entry.glob;
- case 1:
- return entry.color;
- default:
- return null;
- }
- } //}}}
-
- //{{{ isCellEditable() method
- public boolean isCellEditable(int row, int col)
- {
- return col == 0;
- } //}}}
-
- //{{{ setValueAt() method
- public void setValueAt(Object value, int row, int col)
- {
- Entry entry = entries.get(row);
-
- if(col == 0)
- entry.glob = (String)value;
- else
- entry.color = (Color)value;
-
- fireTableRowsUpdated(row,row);
- } //}}}
-
- //{{{ getColumnName() method
- public String getColumnName(int index)
- {
- switch(index)
- {
- case 0:
- return jEdit.getProperty("options.browser.colors.glob");
- case 1:
- return jEdit.getProperty("options.browser.colors.color");
- default:
- return null;
- }
- } //}}}
-
- //{{{ getColumnClass() method
- public Class getColumnClass(int col)
- {
- switch(col)
- {
- case 0:
- return String.class;
- case 1:
- return Color.class;
- default:
- throw new InternalError();
- }
- } //}}}
-
- private List<Entry> entries;
-
- //{{{ Entry class
- private static class Entry
- {
- String glob;
- Color color;
-
- Entry(String glob, Color color)
- {
- this.glob = glob;
- this.color = color;
- }
- } //}}}
-
- //{{{ ColorRenderer class
- static class ColorRenderer extends JLabel
- implements TableCellRenderer
- {
- //{{{ ColorRenderer constructor
- ColorRenderer()
- {
- setOpaque(true);
- setBorder(SyntaxHiliteOptionPane.noFocusBorder);
- } //}}}
-
- //{{{ getTableCellRendererComponent() method
- public Component getTableCellRendererComponent(
- JTable table,
- Object value,
- boolean isSelected,
- boolean cellHasFocus,
- int row,
- int col)
- {
- if (isSelected)
- {
- setBackground(table.getSelectionBackground());
- setForeground(table.getSelectionForeground());
- }
- else
- {
- setBackground(table.getBackground());
- setForeground(table.getForeground());
- }
-
- if (value != null)
- setBackground((Color)value);
-
- setBorder(cellHasFocus ? UIManager.getBorder(
- "Table.focusCellHighlightBorder")
- : SyntaxHiliteOptionPane.noFocusBorder);
- return this;
- } //}}}
- } //}}}
-} //}}}
+/*
+ * BrowserColorsOptionPane.java - Browser colors options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.*;
+import javax.swing.table.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.*;
+import java.util.List;
+
+import org.gjt.sp.jedit.gui.RolloverButton;
+import org.gjt.sp.jedit.*;
+//}}}
+
+//{{{ BrowserColorsOptionPane class
+/**
+ * Browser color editor.
+ * @author Slava Pestov
+ * @version $Id: BrowserColorsOptionPane.java 14468 2009-01-25 13:26:51Z kpouer $
+ */
+public class BrowserColorsOptionPane extends AbstractOptionPane
+{
+ //{{{ BrowserColorsOptionPane constructor
+ public BrowserColorsOptionPane()
+ {
+ super("browser.colors");
+ } //}}}
+
+ //{{{ Protected members
+
+ //{{{ _init() method
+ protected void _init()
+ {
+ setLayout(new BorderLayout());
+
+ colorsModel = new BrowserColorsModel();
+ colorsTable = new JTable(colorsModel);
+ colorsTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
+ colorsTable.getTableHeader().setReorderingAllowed(false);
+ colorsTable.addMouseListener(new MouseHandler());
+ colorsTable.getSelectionModel().addListSelectionListener(
+ new SelectionHandler());
+ TableColumnModel tcm = colorsTable.getColumnModel();
+ tcm.getColumn(1).setCellRenderer(new BrowserColorsModel.ColorRenderer());
+ Dimension d = colorsTable.getPreferredSize();
+ d.height = Math.min(d.height,200);
+ JScrollPane scroller = new JScrollPane(colorsTable);
+ scroller.setPreferredSize(d);
+ add(BorderLayout.CENTER,scroller);
+
+ JPanel buttons = new JPanel();
+ buttons.setBorder(new EmptyBorder(3,0,0,0));
+ buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
+ ActionHandler actionHandler = new ActionHandler();
+ add = new RolloverButton(GUIUtilities.loadIcon("Plus.png"));
+ add.setToolTipText(jEdit.getProperty("common.add"));
+ add.addActionListener(actionHandler);
+ buttons.add(add);
+ buttons.add(Box.createHorizontalStrut(6));
+ remove = new RolloverButton(GUIUtilities.loadIcon("Minus.png"));
+ remove.setToolTipText(jEdit.getProperty("common.remove"));
+ remove.addActionListener(actionHandler);
+ buttons.add(remove);
+ buttons.add(Box.createHorizontalStrut(6));
+ moveUp = new RolloverButton(GUIUtilities.loadIcon("ArrowU.png"));
+ moveUp.setToolTipText(jEdit.getProperty("common.moveUp"));
+ moveUp.addActionListener(actionHandler);
+ buttons.add(moveUp);
+ buttons.add(Box.createHorizontalStrut(6));
+ moveDown = new RolloverButton(GUIUtilities.loadIcon("ArrowD.png"));
+ moveDown.setToolTipText(jEdit.getProperty("common.moveDown"));
+ moveDown.addActionListener(actionHandler);
+ buttons.add(moveDown);
+ buttons.add(Box.createGlue());
+
+ add(BorderLayout.SOUTH,buttons);
+
+ updateEnabled();
+ } //}}}
+
+ //{{{ _save() method
+ protected void _save()
+ {
+ colorsModel.save();
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private BrowserColorsModel colorsModel;
+ private JTable colorsTable;
+ private JButton add;
+ private JButton remove;
+ private JButton moveUp;
+ private JButton moveDown;
+
+ //{{{ updateEnabled() method
+ private void updateEnabled()
+ {
+ int selectedRow = colorsTable.getSelectedRow();
+ remove.setEnabled(selectedRow != -1);
+ moveUp.setEnabled(selectedRow > 0);
+ moveUp.setEnabled(selectedRow != -1 && selectedRow !=
+ colorsModel.getRowCount());
+ } //}}}
+
+ //{{{ setSelectedRow() method
+ private void setSelectedRow(int row)
+ {
+ colorsTable.getSelectionModel().setSelectionInterval(row,row);
+ colorsTable.scrollRectToVisible(colorsTable.getCellRect(row,0,true));
+ } //}}}
+
+ //}}}
+
+ //{{{ SelectionHandler class
+ class SelectionHandler implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent evt)
+ {
+ updateEnabled();
+ }
+ } //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == add)
+ {
+ colorsModel.add();
+ }
+ else if(source == remove)
+ {
+ int selectedRow = colorsTable.getSelectedRow();
+ colorsModel.remove(selectedRow);
+ updateEnabled();
+ }
+ else if(source == moveUp)
+ {
+ int selectedRow = colorsTable.getSelectedRow();
+ if(selectedRow != 0)
+ {
+ colorsModel.moveUp(selectedRow);
+ setSelectedRow(selectedRow - 1);
+ }
+ updateEnabled();
+ }
+ else if(source == moveDown)
+ {
+ int selectedRow = colorsTable.getSelectedRow();
+ if(selectedRow != colorsTable.getRowCount() - 1)
+ {
+ colorsModel.moveDown(selectedRow);
+ setSelectedRow(selectedRow + 1);
+ }
+ updateEnabled();
+ }
+ }
+ } //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ public void mouseClicked(MouseEvent evt)
+ {
+ Point p = evt.getPoint();
+ int row = colorsTable.rowAtPoint(p);
+ int column = colorsTable.columnAtPoint(p);
+ if(row == -1 || column != 1)
+ return;
+
+ Color color = JColorChooser.showDialog(
+ BrowserColorsOptionPane.this,
+ jEdit.getProperty("colorChooser.title"),
+ (Color)colorsModel.getValueAt(row,1));
+ if(color != null)
+ colorsModel.setValueAt(color,row,1);
+ }
+ } //}}}
+} //}}}
+
+//{{{ BrowserColorsModel class
+class BrowserColorsModel extends AbstractTableModel
+{
+ //{{{ BrowserColorsModel constructor
+ BrowserColorsModel()
+ {
+ entries = new ArrayList<Entry>();
+
+ int i = 0;
+ String glob;
+ while((glob = jEdit.getProperty("vfs.browser.colors." + i + ".glob")) != null)
+ {
+ entries.add(new Entry(glob,
+ jEdit.getColorProperty(
+ "vfs.browser.colors." + i + ".color",
+ Color.black)));
+ i++;
+ }
+ } //}}}
+
+ //{{{ add() method
+ void add()
+ {
+ entries.add(new Entry("",UIManager.getColor("Tree.foreground")));
+ fireTableRowsInserted(entries.size() - 1,entries.size() - 1);
+ } //}}}
+
+ //{{{ remove() method
+ void remove(int index)
+ {
+ entries.remove(index);
+ fireTableRowsDeleted(entries.size(),entries.size());
+ } //}}}
+
+ //{{{ moveUp() method
+ public void moveUp(int index)
+ {
+ Entry entry = entries.get(index);
+ entries.remove(index);
+ entries.add(index - 1,entry);
+ fireTableRowsUpdated(index - 1,index);
+ } //}}}
+
+ //{{{ moveDown() method
+ public void moveDown(int index)
+ {
+ Entry entry = entries.get(index);
+ entries.remove(index);
+ entries.add(index + 1,entry);
+ fireTableRowsUpdated(index,index + 1);
+ } //}}}
+
+ //{{{ save() method
+ void save()
+ {
+ int i;
+ for(i = 0; i < entries.size(); i++)
+ {
+ Entry entry = entries.get(i);
+ jEdit.setProperty("vfs.browser.colors." + i + ".glob",
+ entry.glob);
+ jEdit.setColorProperty("vfs.browser.colors." + i + ".color",
+ entry.color);
+ }
+ jEdit.unsetProperty("vfs.browser.colors." + i + ".glob");
+ jEdit.unsetProperty("vfs.browser.colors." + i + ".color");
+ } //}}}
+
+ //{{{ getColumnCount() method
+ public int getColumnCount()
+ {
+ return 2;
+ } //}}}
+
+ //{{{ getRowCount() method
+ public int getRowCount()
+ {
+ return entries.size();
+ } //}}}
+
+ //{{{ getValueAt() method
+ public Object getValueAt(int row, int col)
+ {
+ Entry entry = entries.get(row);
+
+ switch(col)
+ {
+ case 0:
+ return entry.glob;
+ case 1:
+ return entry.color;
+ default:
+ return null;
+ }
+ } //}}}
+
+ //{{{ isCellEditable() method
+ public boolean isCellEditable(int row, int col)
+ {
+ return col == 0;
+ } //}}}
+
+ //{{{ setValueAt() method
+ public void setValueAt(Object value, int row, int col)
+ {
+ Entry entry = entries.get(row);
+
+ if(col == 0)
+ entry.glob = (String)value;
+ else
+ entry.color = (Color)value;
+
+ fireTableRowsUpdated(row,row);
+ } //}}}
+
+ //{{{ getColumnName() method
+ public String getColumnName(int index)
+ {
+ switch(index)
+ {
+ case 0:
+ return jEdit.getProperty("options.browser.colors.glob");
+ case 1:
+ return jEdit.getProperty("options.browser.colors.color");
+ default:
+ return null;
+ }
+ } //}}}
+
+ //{{{ getColumnClass() method
+ public Class getColumnClass(int col)
+ {
+ switch(col)
+ {
+ case 0:
+ return String.class;
+ case 1:
+ return Color.class;
+ default:
+ throw new InternalError();
+ }
+ } //}}}
+
+ private List<Entry> entries;
+
+ //{{{ Entry class
+ private static class Entry
+ {
+ String glob;
+ Color color;
+
+ Entry(String glob, Color color)
+ {
+ this.glob = glob;
+ this.color = color;
+ }
+ } //}}}
+
+ //{{{ ColorRenderer class
+ static class ColorRenderer extends JLabel
+ implements TableCellRenderer
+ {
+ //{{{ ColorRenderer constructor
+ ColorRenderer()
+ {
+ setOpaque(true);
+ setBorder(SyntaxHiliteOptionPane.noFocusBorder);
+ } //}}}
+
+ //{{{ getTableCellRendererComponent() method
+ public Component getTableCellRendererComponent(
+ JTable table,
+ Object value,
+ boolean isSelected,
+ boolean cellHasFocus,
+ int row,
+ int col)
+ {
+ if (isSelected)
+ {
+ setBackground(table.getSelectionBackground());
+ setForeground(table.getSelectionForeground());
+ }
+ else
+ {
+ setBackground(table.getBackground());
+ setForeground(table.getForeground());
+ }
+
+ if (value != null)
+ setBackground((Color)value);
+
+ setBorder(cellHasFocus ? UIManager.getBorder(
+ "Table.focusCellHighlightBorder")
+ : SyntaxHiliteOptionPane.noFocusBorder);
+ return this;
+ } //}}}
+ } //}}}
+} //}}}
diff --git a/jEdit/org/gjt/sp/jedit/options/BrowserOptionPane.java b/jEdit/org/gjt/sp/jedit/options/BrowserOptionPane.java
index 005010f..f70dafc 100644
--- a/jEdit/org/gjt/sp/jedit/options/BrowserOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/BrowserOptionPane.java
@@ -1,170 +1,170 @@
-/*
- * BrowserOptionPane.java - Browser options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-//{{{ BrowserOptionPane class
-/**
- * @author Slava Pestov
- * @version $Id: BrowserOptionPane.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class BrowserOptionPane extends AbstractOptionPane
-{
- //{{{ BrowserOptionPane constructor
- public BrowserOptionPane()
- {
- super("browser.general");
- } //}}}
-
- //{{{ _init() method
- public void _init()
- {
- /* Default directory */
- String[] dirs = {
- jEdit.getProperty("options.browser.general.defaultPath.favorites"),
- jEdit.getProperty("options.browser.general.defaultPath.home"),
- jEdit.getProperty("options.browser.general.defaultPath.last"),
- jEdit.getProperty("options.browser.general.defaultPath.buffer"),
- jEdit.getProperty("options.browser.general.defaultPath.working")
- };
-
- defaultDirectory = new JComboBox(dirs);
- String defaultDir = jEdit.getProperty("vfs.browser.defaultPath");
- if("favorites".equals(defaultDir))
- defaultDirectory.setSelectedIndex(0);
- else if("home".equals(defaultDir))
- defaultDirectory.setSelectedIndex(1);
- else if("last".equals(defaultDir))
- defaultDirectory.setSelectedIndex(2);
- else if("buffer".equals(defaultDir))
- defaultDirectory.setSelectedIndex(3);
- else if("working".equals(defaultDir))
- defaultDirectory.setSelectedIndex(4);
- addComponent(jEdit.getProperty("options.browser.general.defaultPath"),
- defaultDirectory);
-
- /* Show tool bar */
- showToolbar = new JCheckBox(jEdit.getProperty("options.browser"
- + ".general.showToolbar"));
- showToolbar.setSelected(jEdit.getBooleanProperty("vfs.browser"
- + ".showToolbar"));
- addComponent(showToolbar);
-
- /* Show menu bar */
- showMenubar = new JCheckBox(jEdit.getProperty("options.browser"
- + ".general.showMenubar"));
- showMenubar.setSelected(jEdit.getBooleanProperty("vfs.browser"
- + ".showMenubar"));
- addComponent(showMenubar);
-
- /* Show icons */
- showIcons = new JCheckBox(jEdit.getProperty("options.browser"
- + ".general.showIcons"));
- showIcons.setSelected(jEdit.getBooleanProperty("vfs.browser"
- + ".showIcons"));
- addComponent(showIcons);
-
- /* Show hidden files */
- showHiddenFiles = new JCheckBox(jEdit.getProperty("options.browser"
- + ".general.showHiddenFiles"));
- showHiddenFiles.setSelected(jEdit.getBooleanProperty("vfs.browser"
- + ".showHiddenFiles"));
- addComponent(showHiddenFiles);
-
- /* Ignore case when sorting */
- sortIgnoreCase = new JCheckBox(jEdit.getProperty("options.browser"
- + ".general.sortIgnoreCase"));
- sortIgnoreCase.setSelected(jEdit.getBooleanProperty("vfs.browser"
- + ".sortIgnoreCase"));
- addComponent(sortIgnoreCase);
-
- /* Mix files and directories */
- sortMixFilesAndDirs = new JCheckBox(jEdit.getProperty("options.browser"
- + ".general.sortMixFilesAndDirs"));
- sortMixFilesAndDirs.setSelected(jEdit.getBooleanProperty("vfs.browser"
- + ".sortMixFilesAndDirs"));
- addComponent(sortMixFilesAndDirs);
-
- /* Double-click close */
- doubleClickClose = new JCheckBox(jEdit.getProperty("options.browser"
- + ".general.doubleClickClose"));
- doubleClickClose.setSelected(jEdit.getBooleanProperty("vfs.browser"
- + ".doubleClickClose"));
- addComponent(doubleClickClose);
-
- /* split VFSFileDialog horizontally */
- currentBufferFilter = new JCheckBox(jEdit.getProperty("options.browser"
- + ".general.currentBufferFilter"));
- currentBufferFilter.setSelected(jEdit.getBooleanProperty("vfs.browser"
- + ".currentBufferFilter"));
- addComponent(currentBufferFilter);
-
- /* use default icons. */
- useDefaultIcons = new JCheckBox(jEdit.getProperty("options.browser.general.useDefaultIcons"));
- useDefaultIcons.setSelected(jEdit.getBooleanProperty("vfs.browser.useDefaultIcons"));
- addComponent(useDefaultIcons);
- } //}}}
-
- //{{{ _save() method
- public void _save()
- {
- String[] dirs = { "favorites", "home", "last", "buffer", "working"};
- jEdit.setProperty("vfs.browser.defaultPath",dirs[defaultDirectory
- .getSelectedIndex()]);
- jEdit.setBooleanProperty("vfs.browser.showToolbar",
- showToolbar.isSelected());
- jEdit.setBooleanProperty("vfs.browser.showMenubar",
- showMenubar.isSelected());
- jEdit.setBooleanProperty("vfs.browser.showIcons",
- showIcons.isSelected());
- jEdit.setBooleanProperty("vfs.browser.showHiddenFiles",
- showHiddenFiles.isSelected());
- jEdit.setBooleanProperty("vfs.browser.sortIgnoreCase",
- sortIgnoreCase.isSelected());
- jEdit.setBooleanProperty("vfs.browser.sortMixFilesAndDirs",
- sortMixFilesAndDirs.isSelected());
- jEdit.setBooleanProperty("vfs.browser.doubleClickClose",
- doubleClickClose.isSelected());
- jEdit.setBooleanProperty("vfs.browser.currentBufferFilter",
- currentBufferFilter.isSelected());
- jEdit.setBooleanProperty("vfs.browser.useDefaultIcons",
- useDefaultIcons.isSelected());
- } //}}}
-
- //{{{ Private members
- private JComboBox defaultDirectory;
- private JCheckBox showToolbar;
- private JCheckBox showMenubar;
- private JCheckBox showIcons;
- private JCheckBox showHiddenFiles;
- private JCheckBox sortIgnoreCase;
- private JCheckBox sortMixFilesAndDirs;
- private JCheckBox doubleClickClose;
- private JCheckBox currentBufferFilter;
- private JCheckBox useDefaultIcons;
- //}}}
-} //}}}
+/*
+ * BrowserOptionPane.java - Browser options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+//{{{ BrowserOptionPane class
+/**
+ * @author Slava Pestov
+ * @version $Id: BrowserOptionPane.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class BrowserOptionPane extends AbstractOptionPane
+{
+ //{{{ BrowserOptionPane constructor
+ public BrowserOptionPane()
+ {
+ super("browser.general");
+ } //}}}
+
+ //{{{ _init() method
+ public void _init()
+ {
+ /* Default directory */
+ String[] dirs = {
+ jEdit.getProperty("options.browser.general.defaultPath.favorites"),
+ jEdit.getProperty("options.browser.general.defaultPath.home"),
+ jEdit.getProperty("options.browser.general.defaultPath.last"),
+ jEdit.getProperty("options.browser.general.defaultPath.buffer"),
+ jEdit.getProperty("options.browser.general.defaultPath.working")
+ };
+
+ defaultDirectory = new JComboBox(dirs);
+ String defaultDir = jEdit.getProperty("vfs.browser.defaultPath");
+ if("favorites".equals(defaultDir))
+ defaultDirectory.setSelectedIndex(0);
+ else if("home".equals(defaultDir))
+ defaultDirectory.setSelectedIndex(1);
+ else if("last".equals(defaultDir))
+ defaultDirectory.setSelectedIndex(2);
+ else if("buffer".equals(defaultDir))
+ defaultDirectory.setSelectedIndex(3);
+ else if("working".equals(defaultDir))
+ defaultDirectory.setSelectedIndex(4);
+ addComponent(jEdit.getProperty("options.browser.general.defaultPath"),
+ defaultDirectory);
+
+ /* Show tool bar */
+ showToolbar = new JCheckBox(jEdit.getProperty("options.browser"
+ + ".general.showToolbar"));
+ showToolbar.setSelected(jEdit.getBooleanProperty("vfs.browser"
+ + ".showToolbar"));
+ addComponent(showToolbar);
+
+ /* Show menu bar */
+ showMenubar = new JCheckBox(jEdit.getProperty("options.browser"
+ + ".general.showMenubar"));
+ showMenubar.setSelected(jEdit.getBooleanProperty("vfs.browser"
+ + ".showMenubar"));
+ addComponent(showMenubar);
+
+ /* Show icons */
+ showIcons = new JCheckBox(jEdit.getProperty("options.browser"
+ + ".general.showIcons"));
+ showIcons.setSelected(jEdit.getBooleanProperty("vfs.browser"
+ + ".showIcons"));
+ addComponent(showIcons);
+
+ /* Show hidden files */
+ showHiddenFiles = new JCheckBox(jEdit.getProperty("options.browser"
+ + ".general.showHiddenFiles"));
+ showHiddenFiles.setSelected(jEdit.getBooleanProperty("vfs.browser"
+ + ".showHiddenFiles"));
+ addComponent(showHiddenFiles);
+
+ /* Ignore case when sorting */
+ sortIgnoreCase = new JCheckBox(jEdit.getProperty("options.browser"
+ + ".general.sortIgnoreCase"));
+ sortIgnoreCase.setSelected(jEdit.getBooleanProperty("vfs.browser"
+ + ".sortIgnoreCase"));
+ addComponent(sortIgnoreCase);
+
+ /* Mix files and directories */
+ sortMixFilesAndDirs = new JCheckBox(jEdit.getProperty("options.browser"
+ + ".general.sortMixFilesAndDirs"));
+ sortMixFilesAndDirs.setSelected(jEdit.getBooleanProperty("vfs.browser"
+ + ".sortMixFilesAndDirs"));
+ addComponent(sortMixFilesAndDirs);
+
+ /* Double-click close */
+ doubleClickClose = new JCheckBox(jEdit.getProperty("options.browser"
+ + ".general.doubleClickClose"));
+ doubleClickClose.setSelected(jEdit.getBooleanProperty("vfs.browser"
+ + ".doubleClickClose"));
+ addComponent(doubleClickClose);
+
+ /* split VFSFileDialog horizontally */
+ currentBufferFilter = new JCheckBox(jEdit.getProperty("options.browser"
+ + ".general.currentBufferFilter"));
+ currentBufferFilter.setSelected(jEdit.getBooleanProperty("vfs.browser"
+ + ".currentBufferFilter"));
+ addComponent(currentBufferFilter);
+
+ /* use default icons. */
+ useDefaultIcons = new JCheckBox(jEdit.getProperty("options.browser.general.useDefaultIcons"));
+ useDefaultIcons.setSelected(jEdit.getBooleanProperty("vfs.browser.useDefaultIcons"));
+ addComponent(useDefaultIcons);
+ } //}}}
+
+ //{{{ _save() method
+ public void _save()
+ {
+ String[] dirs = { "favorites", "home", "last", "buffer", "working"};
+ jEdit.setProperty("vfs.browser.defaultPath",dirs[defaultDirectory
+ .getSelectedIndex()]);
+ jEdit.setBooleanProperty("vfs.browser.showToolbar",
+ showToolbar.isSelected());
+ jEdit.setBooleanProperty("vfs.browser.showMenubar",
+ showMenubar.isSelected());
+ jEdit.setBooleanProperty("vfs.browser.showIcons",
+ showIcons.isSelected());
+ jEdit.setBooleanProperty("vfs.browser.showHiddenFiles",
+ showHiddenFiles.isSelected());
+ jEdit.setBooleanProperty("vfs.browser.sortIgnoreCase",
+ sortIgnoreCase.isSelected());
+ jEdit.setBooleanProperty("vfs.browser.sortMixFilesAndDirs",
+ sortMixFilesAndDirs.isSelected());
+ jEdit.setBooleanProperty("vfs.browser.doubleClickClose",
+ doubleClickClose.isSelected());
+ jEdit.setBooleanProperty("vfs.browser.currentBufferFilter",
+ currentBufferFilter.isSelected());
+ jEdit.setBooleanProperty("vfs.browser.useDefaultIcons",
+ useDefaultIcons.isSelected());
+ } //}}}
+
+ //{{{ Private members
+ private JComboBox defaultDirectory;
+ private JCheckBox showToolbar;
+ private JCheckBox showMenubar;
+ private JCheckBox showIcons;
+ private JCheckBox showHiddenFiles;
+ private JCheckBox sortIgnoreCase;
+ private JCheckBox sortMixFilesAndDirs;
+ private JCheckBox doubleClickClose;
+ private JCheckBox currentBufferFilter;
+ private JCheckBox useDefaultIcons;
+ //}}}
+} //}}}
diff --git a/jEdit/org/gjt/sp/jedit/options/BufferOptionPane.java b/jEdit/org/gjt/sp/jedit/options/BufferOptionPane.java
index 21cc8f8..2359cce 100644
--- a/jEdit/org/gjt/sp/jedit/options/BufferOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/BufferOptionPane.java
@@ -1,338 +1,338 @@
-/*
- * BufferOptionPane.java -
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2003 Slava Pestov
- * Portions copyright (C) 1999 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Arrays;
-
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
-
-import org.gjt.sp.jedit.AbstractOptionPane;
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.MiscUtilities;
-import org.gjt.sp.jedit.Mode;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.buffer.FoldHandler;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.util.StandardUtilities;
-
-
-public class BufferOptionPane extends AbstractOptionPane
-{
- private JComboBox encoding;
- private JComboBox lineSeparator;
- private JCheckBox gzipped;
- private Mode[] modes;
- private JComboBox mode;
- private JComboBox folding;
- private JComboBox wrap;
- private JComboBox maxLineLen;
- private JComboBox tabSize;
- private JComboBox indentSize;
- private JComboBox checkModStatus;
- private JCheckBox noTabs;
- private Buffer buffer;
-
-
- public BufferOptionPane()
- {
- super("Buffer Options");
- init();
- }
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- buffer = jEdit.getActiveView().getBuffer();
- String filename = buffer.getName();
- setName("Buffer: " + filename);
- addComponent(GUIUtilities.createMultilineLabel(
- jEdit.getProperty("buffer-options.caption")));
-
- addSeparator("buffer-options.loading-saving");
-
- //{{{ Line separator
- String[] lineSeps = { jEdit.getProperty("lineSep.unix"),
- jEdit.getProperty("lineSep.windows"),
- jEdit.getProperty("lineSep.mac") };
- lineSeparator = new JComboBox(lineSeps);
- String lineSep = buffer.getStringProperty(JEditBuffer.LINESEP);
- if(lineSep == null)
- lineSep = System.getProperty("line.separator");
- if("\n".equals(lineSep))
- lineSeparator.setSelectedIndex(0);
- else if("\r\n".equals(lineSep))
- lineSeparator.setSelectedIndex(1);
- else if("\r".equals(lineSep))
- lineSeparator.setSelectedIndex(2);
- addComponent(jEdit.getProperty("buffer-options.lineSeparator"),
- lineSeparator);
- //}}}
-
- //{{{ Encoding
- String[] encodings = MiscUtilities.getEncodings(true);
- Arrays.sort(encodings,new StandardUtilities.StringCompare<String>(true));
- encoding = new JComboBox(encodings);
- encoding.setEditable(true);
- encoding.setSelectedItem(buffer.getStringProperty(JEditBuffer.ENCODING));
- addComponent(jEdit.getProperty("buffer-options.encoding"),
- encoding);
- //}}}
-
- //{{{ GZipped setting
- gzipped = new JCheckBox(jEdit.getProperty(
- "buffer-options.gzipped"));
- gzipped.setSelected(buffer.getBooleanProperty(Buffer.GZIPPED));
- addComponent(gzipped);
- //}}}
-
- //{{{ Autoreload settings
- /* Check mod status on focus */
- String[] modCheckOptions = {
- jEdit.getProperty("options.general.checkModStatus.nothing"),
- jEdit.getProperty("options.general.checkModStatus.prompt"),
- jEdit.getProperty("options.general.checkModStatus.reload"),
- jEdit.getProperty("options.general.checkModStatus.silentReload")
- };
- checkModStatus = new JComboBox(modCheckOptions);
- if(buffer.getAutoReload())
- {
- if(buffer.getAutoReloadDialog())
- // reload and notify
- checkModStatus.setSelectedIndex(2);
- else // reload silently
- checkModStatus.setSelectedIndex(3);
- }
- else
- {
- if(buffer.getAutoReloadDialog())
- // prompt
- checkModStatus.setSelectedIndex(1);
- else // do nothing
- checkModStatus.setSelectedIndex(0);
- }
- addComponent(jEdit.getProperty("options.general.checkModStatus"),
- checkModStatus);
-
- // }}}
-
- addSeparator("buffer-options.editing");
-
- //{{{ Edit mode
- modes = jEdit.getModes();
- Arrays.sort(modes,new StandardUtilities.StringCompare<Mode>(true));
- mode = new JComboBox(modes);
- mode.setSelectedItem(buffer.getMode());
- ActionHandler actionListener = new ActionHandler();
- mode.addActionListener(actionListener);
- addComponent(jEdit.getProperty("buffer-options.mode"),mode);
- //}}}
-
- //{{{ Fold mode
- String[] foldModes = FoldHandler.getFoldModes();
-
- folding = new JComboBox(foldModes);
- folding.setSelectedItem(buffer.getStringProperty("folding"));
- addComponent(jEdit.getProperty("options.editing.folding"),
- folding);
- //}}}
-
- //{{{ Wrap mode
- String[] wrapModes = {
- "none",
- "soft",
- "hard"
- };
-
- wrap = new JComboBox(wrapModes);
- wrap.setSelectedItem(buffer.getStringProperty("wrap"));
- addComponent(jEdit.getProperty("options.editing.wrap"),
- wrap);
- //}}}
-
- //{{{ Max line length
- String[] lineLengths = { "0", "72", "76", "80" };
-
- maxLineLen = new JComboBox(lineLengths);
- maxLineLen.setEditable(true);
- maxLineLen.setSelectedItem(buffer.getStringProperty("maxLineLen"));
- addComponent(jEdit.getProperty("options.editing.maxLineLen"),
- maxLineLen);
- //}}}
-
- //{{{ Tab size
- String[] tabSizes = { "2", "4", "8" };
- tabSize = new JComboBox(tabSizes);
- tabSize.setEditable(true);
- tabSize.setSelectedItem(buffer.getStringProperty("tabSize"));
- addComponent(jEdit.getProperty("options.editing.tabSize"),tabSize);
- //}}}
-
- //{{{ Indent size
- indentSize = new JComboBox(tabSizes);
- indentSize.setEditable(true);
- indentSize.setSelectedItem(buffer.getStringProperty("indentSize"));
- addComponent(jEdit.getProperty("options.editing.indentSize"),
- indentSize);
- //}}}
-
- //{{{ Soft tabs
- noTabs = new JCheckBox(jEdit.getProperty(
- "options.editing.noTabs"));
- noTabs.setSelected(buffer.getBooleanProperty("noTabs"));
- addComponent(noTabs);
- //}}}
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
- int index = lineSeparator.getSelectedIndex();
- String lineSep;
- if(index == 0)
- lineSep = "\n";
- else if(index == 1)
- lineSep = "\r\n";
- else if(index == 2)
- lineSep = "\r";
- else
- throw new InternalError();
-
- String oldLineSep = buffer.getStringProperty(JEditBuffer.LINESEP);
- if(oldLineSep == null)
- oldLineSep = System.getProperty("line.separator");
- if(!oldLineSep.equals(lineSep))
- {
- buffer.setStringProperty(JEditBuffer.LINESEP, lineSep);
- buffer.setDirty(true);
- }
-
- String encoding = (String)this.encoding.getSelectedItem();
- String oldEncoding = buffer.getStringProperty(JEditBuffer.ENCODING);
- if(!oldEncoding.equals(encoding))
- {
- buffer.setStringProperty(JEditBuffer.ENCODING,encoding);
- buffer.setDirty(true);
- // Disable auto-detect because user explicitly
- // specify an encoding.
- buffer.setBooleanProperty(Buffer.ENCODING_AUTODETECT,false);
- }
-
- boolean gzippedValue = gzipped.isSelected();
- boolean oldGzipped = buffer.getBooleanProperty(
- Buffer.GZIPPED);
- if(gzippedValue != oldGzipped)
- {
- buffer.setBooleanProperty(Buffer.GZIPPED,gzippedValue);
- buffer.setDirty(true);
- }
-
- buffer.setStringProperty("folding",(String)folding.getSelectedItem());
-
- buffer.setStringProperty("wrap",(String)wrap.getSelectedItem());
-
- try
- {
- buffer.setProperty("maxLineLen",new Integer(
- maxLineLen.getSelectedItem().toString()));
- }
- catch(NumberFormatException nf)
- {
- }
-
- try
- {
- buffer.setProperty("tabSize",new Integer(
- tabSize.getSelectedItem().toString()));
- }
- catch(NumberFormatException nf)
- {
- }
-
- try
- {
- buffer.setProperty("indentSize",new Integer(
- indentSize.getSelectedItem().toString()));
- }
- catch(NumberFormatException nf)
- {
- }
-
- buffer.setBooleanProperty("noTabs",noTabs.isSelected());
-
- index = mode.getSelectedIndex();
- buffer.setMode(modes[index]);
- switch(checkModStatus.getSelectedIndex())
- {
- case 0:
- buffer.setAutoReloadDialog(false);
- buffer.setAutoReload(false);
- break;
- case 1:
- buffer.setAutoReloadDialog(true);
- buffer.setAutoReload(false);
- break;
- case 2:
- buffer.setAutoReloadDialog(true);
- buffer.setAutoReload(true);
- break;
- case 3:
- buffer.setAutoReloadDialog(false);
- buffer.setAutoReload(true);
- break;
- }
- } //}}}
-
- //{{{ ActionHandler() class
- private class ActionHandler implements ActionListener
- {
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == mode)
- {
- Mode _mode = (Mode)mode.getSelectedItem();
- folding.setSelectedItem(_mode.getProperty(
- "folding"));
- wrap.setSelectedItem(_mode.getProperty(
- "wrap"));
- maxLineLen.setSelectedItem(_mode.getProperty(
- "maxLineLen"));
- tabSize.setSelectedItem(_mode.getProperty(
- "tabSize"));
- indentSize.setSelectedItem(_mode.getProperty(
- "indentSize"));
- noTabs.setSelected(_mode.getBooleanProperty(
- "noTabs"));
- }
- } //}}}
- } //}}}
-
-}
+/*
+ * BufferOptionPane.java -
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2003 Slava Pestov
+ * Portions copyright (C) 1999 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Arrays;
+
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+
+import org.gjt.sp.jedit.AbstractOptionPane;
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.Mode;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.buffer.FoldHandler;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.StandardUtilities;
+
+
+public class BufferOptionPane extends AbstractOptionPane
+{
+ private JComboBox encoding;
+ private JComboBox lineSeparator;
+ private JCheckBox gzipped;
+ private Mode[] modes;
+ private JComboBox mode;
+ private JComboBox folding;
+ private JComboBox wrap;
+ private JComboBox maxLineLen;
+ private JComboBox tabSize;
+ private JComboBox indentSize;
+ private JComboBox checkModStatus;
+ private JCheckBox noTabs;
+ private Buffer buffer;
+
+
+ public BufferOptionPane()
+ {
+ super("Buffer Options");
+ init();
+ }
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ buffer = jEdit.getActiveView().getBuffer();
+ String filename = buffer.getName();
+ setName("Buffer: " + filename);
+ addComponent(GUIUtilities.createMultilineLabel(
+ jEdit.getProperty("buffer-options.caption")));
+
+ addSeparator("buffer-options.loading-saving");
+
+ //{{{ Line separator
+ String[] lineSeps = { jEdit.getProperty("lineSep.unix"),
+ jEdit.getProperty("lineSep.windows"),
+ jEdit.getProperty("lineSep.mac") };
+ lineSeparator = new JComboBox(lineSeps);
+ String lineSep = buffer.getStringProperty(JEditBuffer.LINESEP);
+ if(lineSep == null)
+ lineSep = System.getProperty("line.separator");
+ if("\n".equals(lineSep))
+ lineSeparator.setSelectedIndex(0);
+ else if("\r\n".equals(lineSep))
+ lineSeparator.setSelectedIndex(1);
+ else if("\r".equals(lineSep))
+ lineSeparator.setSelectedIndex(2);
+ addComponent(jEdit.getProperty("buffer-options.lineSeparator"),
+ lineSeparator);
+ //}}}
+
+ //{{{ Encoding
+ String[] encodings = MiscUtilities.getEncodings(true);
+ Arrays.sort(encodings,new StandardUtilities.StringCompare<String>(true));
+ encoding = new JComboBox(encodings);
+ encoding.setEditable(true);
+ encoding.setSelectedItem(buffer.getStringProperty(JEditBuffer.ENCODING));
+ addComponent(jEdit.getProperty("buffer-options.encoding"),
+ encoding);
+ //}}}
+
+ //{{{ GZipped setting
+ gzipped = new JCheckBox(jEdit.getProperty(
+ "buffer-options.gzipped"));
+ gzipped.setSelected(buffer.getBooleanProperty(Buffer.GZIPPED));
+ addComponent(gzipped);
+ //}}}
+
+ //{{{ Autoreload settings
+ /* Check mod status on focus */
+ String[] modCheckOptions = {
+ jEdit.getProperty("options.general.checkModStatus.nothing"),
+ jEdit.getProperty("options.general.checkModStatus.prompt"),
+ jEdit.getProperty("options.general.checkModStatus.reload"),
+ jEdit.getProperty("options.general.checkModStatus.silentReload")
+ };
+ checkModStatus = new JComboBox(modCheckOptions);
+ if(buffer.getAutoReload())
+ {
+ if(buffer.getAutoReloadDialog())
+ // reload and notify
+ checkModStatus.setSelectedIndex(2);
+ else // reload silently
+ checkModStatus.setSelectedIndex(3);
+ }
+ else
+ {
+ if(buffer.getAutoReloadDialog())
+ // prompt
+ checkModStatus.setSelectedIndex(1);
+ else // do nothing
+ checkModStatus.setSelectedIndex(0);
+ }
+ addComponent(jEdit.getProperty("options.general.checkModStatus"),
+ checkModStatus);
+
+ // }}}
+
+ addSeparator("buffer-options.editing");
+
+ //{{{ Edit mode
+ modes = jEdit.getModes();
+ Arrays.sort(modes,new StandardUtilities.StringCompare<Mode>(true));
+ mode = new JComboBox(modes);
+ mode.setSelectedItem(buffer.getMode());
+ ActionHandler actionListener = new ActionHandler();
+ mode.addActionListener(actionListener);
+ addComponent(jEdit.getProperty("buffer-options.mode"),mode);
+ //}}}
+
+ //{{{ Fold mode
+ String[] foldModes = FoldHandler.getFoldModes();
+
+ folding = new JComboBox(foldModes);
+ folding.setSelectedItem(buffer.getStringProperty("folding"));
+ addComponent(jEdit.getProperty("options.editing.folding"),
+ folding);
+ //}}}
+
+ //{{{ Wrap mode
+ String[] wrapModes = {
+ "none",
+ "soft",
+ "hard"
+ };
+
+ wrap = new JComboBox(wrapModes);
+ wrap.setSelectedItem(buffer.getStringProperty("wrap"));
+ addComponent(jEdit.getProperty("options.editing.wrap"),
+ wrap);
+ //}}}
+
+ //{{{ Max line length
+ String[] lineLengths = { "0", "72", "76", "80" };
+
+ maxLineLen = new JComboBox(lineLengths);
+ maxLineLen.setEditable(true);
+ maxLineLen.setSelectedItem(buffer.getStringProperty("maxLineLen"));
+ addComponent(jEdit.getProperty("options.editing.maxLineLen"),
+ maxLineLen);
+ //}}}
+
+ //{{{ Tab size
+ String[] tabSizes = { "2", "4", "8" };
+ tabSize = new JComboBox(tabSizes);
+ tabSize.setEditable(true);
+ tabSize.setSelectedItem(buffer.getStringProperty("tabSize"));
+ addComponent(jEdit.getProperty("options.editing.tabSize"),tabSize);
+ //}}}
+
+ //{{{ Indent size
+ indentSize = new JComboBox(tabSizes);
+ indentSize.setEditable(true);
+ indentSize.setSelectedItem(buffer.getStringProperty("indentSize"));
+ addComponent(jEdit.getProperty("options.editing.indentSize"),
+ indentSize);
+ //}}}
+
+ //{{{ Soft tabs
+ noTabs = new JCheckBox(jEdit.getProperty(
+ "options.editing.noTabs"));
+ noTabs.setSelected(buffer.getBooleanProperty("noTabs"));
+ addComponent(noTabs);
+ //}}}
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ int index = lineSeparator.getSelectedIndex();
+ String lineSep;
+ if(index == 0)
+ lineSep = "\n";
+ else if(index == 1)
+ lineSep = "\r\n";
+ else if(index == 2)
+ lineSep = "\r";
+ else
+ throw new InternalError();
+
+ String oldLineSep = buffer.getStringProperty(JEditBuffer.LINESEP);
+ if(oldLineSep == null)
+ oldLineSep = System.getProperty("line.separator");
+ if(!oldLineSep.equals(lineSep))
+ {
+ buffer.setStringProperty(JEditBuffer.LINESEP, lineSep);
+ buffer.setDirty(true);
+ }
+
+ String encoding = (String)this.encoding.getSelectedItem();
+ String oldEncoding = buffer.getStringProperty(JEditBuffer.ENCODING);
+ if(!oldEncoding.equals(encoding))
+ {
+ buffer.setStringProperty(JEditBuffer.ENCODING,encoding);
+ buffer.setDirty(true);
+ // Disable auto-detect because user explicitly
+ // specify an encoding.
+ buffer.setBooleanProperty(Buffer.ENCODING_AUTODETECT,false);
+ }
+
+ boolean gzippedValue = gzipped.isSelected();
+ boolean oldGzipped = buffer.getBooleanProperty(
+ Buffer.GZIPPED);
+ if(gzippedValue != oldGzipped)
+ {
+ buffer.setBooleanProperty(Buffer.GZIPPED,gzippedValue);
+ buffer.setDirty(true);
+ }
+
+ buffer.setStringProperty("folding",(String)folding.getSelectedItem());
+
+ buffer.setStringProperty("wrap",(String)wrap.getSelectedItem());
+
+ try
+ {
+ buffer.setProperty("maxLineLen",new Integer(
+ maxLineLen.getSelectedItem().toString()));
+ }
+ catch(NumberFormatException nf)
+ {
+ }
+
+ try
+ {
+ buffer.setProperty("tabSize",new Integer(
+ tabSize.getSelectedItem().toString()));
+ }
+ catch(NumberFormatException nf)
+ {
+ }
+
+ try
+ {
+ buffer.setProperty("indentSize",new Integer(
+ indentSize.getSelectedItem().toString()));
+ }
+ catch(NumberFormatException nf)
+ {
+ }
+
+ buffer.setBooleanProperty("noTabs",noTabs.isSelected());
+
+ index = mode.getSelectedIndex();
+ buffer.setMode(modes[index]);
+ switch(checkModStatus.getSelectedIndex())
+ {
+ case 0:
+ buffer.setAutoReloadDialog(false);
+ buffer.setAutoReload(false);
+ break;
+ case 1:
+ buffer.setAutoReloadDialog(true);
+ buffer.setAutoReload(false);
+ break;
+ case 2:
+ buffer.setAutoReloadDialog(true);
+ buffer.setAutoReload(true);
+ break;
+ case 3:
+ buffer.setAutoReloadDialog(false);
+ buffer.setAutoReload(true);
+ break;
+ }
+ } //}}}
+
+ //{{{ ActionHandler() class
+ private class ActionHandler implements ActionListener
+ {
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == mode)
+ {
+ Mode _mode = (Mode)mode.getSelectedItem();
+ folding.setSelectedItem(_mode.getProperty(
+ "folding"));
+ wrap.setSelectedItem(_mode.getProperty(
+ "wrap"));
+ maxLineLen.setSelectedItem(_mode.getProperty(
+ "maxLineLen"));
+ tabSize.setSelectedItem(_mode.getProperty(
+ "tabSize"));
+ indentSize.setSelectedItem(_mode.getProperty(
+ "indentSize"));
+ noTabs.setSelected(_mode.getBooleanProperty(
+ "noTabs"));
+ }
+ } //}}}
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/ContextOptionPane.java b/jEdit/org/gjt/sp/jedit/options/ContextOptionPane.java
index 2c41217..a6170fe 100644
--- a/jEdit/org/gjt/sp/jedit/options/ContextOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/ContextOptionPane.java
@@ -1,65 +1,58 @@
-/*
- * ContextOptionPane.java - Context menu options panel
- * Copyright (C) 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.*;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.StandardUtilities;
-
-/**
- * Right-click context menu editor.
- * @author Slava Pestov
- * @version $Id: ContextOptionPane.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class ContextOptionPane extends AbstractContextOptionPane
-{
-
- public ContextOptionPane()
- {
- super("context", jEdit.getProperty("options.context.caption"));
- }
-
- /**
- * Returns jEdit's context menu configuration.
- *
- * @since jEdit 4.3pre13
- */
- protected String getContextMenu()
- {
- return jEdit.getProperty("view.context");
- }
-
- /**
- * Saves jEdit's context menu configuration.
- *
- * @since jEdit 4.3pre13
- */
- protected void saveContextMenu(String menu)
- {
- jEdit.setProperty("view.context", menu);
- }
-
-}
+/*
+ * ContextOptionPane.java - Context menu options panel
+ * Copyright (C) 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.*;
+
+/**
+ * Right-click context menu editor.
+ * @author Slava Pestov
+ * @version $Id: ContextOptionPane.java 18968 2010-11-15 23:31:24Z ezust $
+ */
+public class ContextOptionPane extends AbstractContextOptionPane
+{
+
+ public ContextOptionPane()
+ {
+ super("context", jEdit.getProperty("options.context.caption"));
+ }
+
+ /**
+ * Returns jEdit's context menu configuration.
+ *
+ * @since jEdit 4.3pre13
+ */
+ protected String getContextMenu()
+ {
+ return jEdit.getProperty("view.context");
+ }
+
+ /**
+ * Saves jEdit's context menu configuration.
+ *
+ * @since jEdit 4.3pre13
+ */
+ protected void saveContextMenu(String menu)
+ {
+ jEdit.setProperty("view.context", menu);
+ }
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/DockingOptionPane.java b/jEdit/org/gjt/sp/jedit/options/DockingOptionPane.java
index b25f871..e47d466 100644
--- a/jEdit/org/gjt/sp/jedit/options/DockingOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/DockingOptionPane.java
@@ -1,387 +1,387 @@
-/*
- * DockingOptionPane.java - Dockable window options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.ItemEvent;
-import java.awt.event.ItemListener;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Vector;
-
-import javax.swing.Box;
-import javax.swing.DefaultCellEditor;
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.table.AbstractTableModel;
-import javax.swing.table.TableCellRenderer;
-import javax.swing.table.TableColumn;
-
-import org.gjt.sp.jedit.AbstractOptionPane;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.gui.DockableWindowManager;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-//{{{ DockingOptionPane class
- at SuppressWarnings("serial")
-public class DockingOptionPane extends AbstractOptionPane
-{
- //{{{ DockingOptionPane constructor
- public DockingOptionPane()
- {
- super("docking");
- } //}}}
-
- //{{{ _init() method
- public void _init()
- {
- setLayout(new BorderLayout());
- add(BorderLayout.NORTH,createDockingOptionsPanel());
- add(BorderLayout.CENTER,createWindowTableScroller());
- dockableSetSelection.setModel(
- new DefaultComboBoxModel(windowModel.getDockableSets()));
- } //}}}
-
- //{{{ _save() method
- public void _save()
- {
- jEdit.setBooleanProperty(AUTO_LOAD_MODE_LAYOUT_PROP, autoLoadModeLayout.isSelected());
- jEdit.setBooleanProperty(AUTO_SAVE_MODE_LAYOUT_PROP, autoSaveModeLayout.isSelected());
- windowModel.save();
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private JTable windowTable;
- private WindowTableModel windowModel;
- private JCheckBox autoLoadModeLayout;
- private JCheckBox autoSaveModeLayout;
- private JComboBox dockableSetSelection;
- //}}}
-
- private static final String DOCKING_OPTIONS_PREFIX = "options.docking.";
- public static final String AUTO_LOAD_MODE_LAYOUT_PROP = DOCKING_OPTIONS_PREFIX + "autoLoadModeLayout";
- private static final String AUTO_LOAD_MODE_LAYOUT_LABEL = AUTO_LOAD_MODE_LAYOUT_PROP + ".label";
- public static final String AUTO_SAVE_MODE_LAYOUT_PROP = DOCKING_OPTIONS_PREFIX + "autoSaveModeLayout";
- private static final String AUTO_SAVE_MODE_LAYOUT_LABEL = AUTO_SAVE_MODE_LAYOUT_PROP + ".label";
-
- private JPanel createDockingOptionsPanel()
- {
- JPanel p = new JPanel();
- p.setLayout(new GridLayout(0, 1));
- boolean autoLoadModeLayoutProp = jEdit.getBooleanProperty(
- AUTO_LOAD_MODE_LAYOUT_PROP, false);
- autoLoadModeLayout = new JCheckBox(
- jEdit.getProperty(AUTO_LOAD_MODE_LAYOUT_LABEL),
- autoLoadModeLayoutProp);
- p.add(autoLoadModeLayout);
- autoSaveModeLayout = new JCheckBox(
- jEdit.getProperty(AUTO_SAVE_MODE_LAYOUT_LABEL),
- jEdit.getBooleanProperty(AUTO_SAVE_MODE_LAYOUT_PROP, false));
- p.add(autoSaveModeLayout);
- autoSaveModeLayout.setEnabled(autoLoadModeLayoutProp);
- autoLoadModeLayout.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- autoSaveModeLayout.setEnabled(autoLoadModeLayout.isSelected());
- }
- });
- Box vSetSelection = Box.createVerticalBox();
- p.add(vSetSelection);
- Box setSelection = Box.createHorizontalBox();
- vSetSelection.add(setSelection);
- setSelection.add(Box.createHorizontalStrut(6));
- setSelection.add(new JLabel(jEdit.getProperty(
- "options.docking.selectSet.label")));
- setSelection.add(Box.createHorizontalStrut(6));
- dockableSetSelection = new JComboBox();
- setSelection.add(dockableSetSelection);
- dockableSetSelection.addItemListener(new ItemListener()
- {
- public void itemStateChanged(ItemEvent e)
- {
- windowModel.showSet((String) dockableSetSelection.getSelectedItem());
- }
- });
- setSelection.add(Box.createHorizontalStrut(6));
- vSetSelection.add(Box.createVerticalStrut(6));
- return p;
- }
- //{{{ createWindowTableScroller() method
- private JScrollPane createWindowTableScroller()
- {
- windowModel = createWindowModel();
- windowTable = new JTable(windowModel);
- windowTable.getTableHeader().setReorderingAllowed(false);
- windowTable.setColumnSelectionAllowed(false);
- windowTable.setRowSelectionAllowed(false);
- windowTable.setCellSelectionEnabled(false);
-
- DockPositionCellRenderer comboBox = new DockPositionCellRenderer();
- windowTable.setRowHeight(comboBox.getPreferredSize().height);
- TableColumn column = windowTable.getColumnModel().getColumn(1);
- column.setCellRenderer(comboBox);
- column.setCellEditor(new DefaultCellEditor(new DockPositionCellRenderer()));
-
- Dimension d = windowTable.getPreferredSize();
- d.height = Math.min(d.height,50);
- JScrollPane scroller = new JScrollPane(windowTable);
- scroller.setPreferredSize(d);
- return scroller;
- } //}}}
-
- //{{{ createWindowModel() method
- private static WindowTableModel createWindowModel()
- {
- return new WindowTableModel();
- } //}}}
-
- //}}}
-
- //{{{ DockPositionCellRenderer class
- static class DockPositionCellRenderer extends JComboBox
- implements TableCellRenderer
- {
- DockPositionCellRenderer()
- {
- super(new String[] {
- DockableWindowManager.FLOATING,
- DockableWindowManager.TOP,
- DockableWindowManager.LEFT,
- DockableWindowManager.BOTTOM,
- DockableWindowManager.RIGHT
- });
- DockPositionCellRenderer.this.setRequestFocusEnabled(false);
- }
-
- public Component getTableCellRendererComponent(JTable table,
- Object value, boolean isSelected, boolean hasFocus,
- int row, int column)
- {
- setSelectedItem(value);
- return this;
- }
- } //}}}
-} //}}}
-
-//{{{ WindowTableModel class
- at SuppressWarnings("serial")
-class WindowTableModel extends AbstractTableModel
-{
- private static final String PLUGIN_SET_PREFIX = "Plugin: ";
- private static final String CORE_DOCKABLE_SET = "Core";
- private static final String ALL_DOCKABLE_SET = "All";
- private HashMap<String, Vector<Entry>> dockableSets;
- private Vector<Entry> windows;
-
- //{{{ WindowTableModel constructor
- WindowTableModel()
- {
- dockableSets = new HashMap<String, Vector<Entry>>();
- Vector<Entry> all = new Vector<Entry>();
- dockableSets.put(ALL_DOCKABLE_SET, all);
- windows = new Vector<Entry>();
- String[] dockables = DockableWindowManager.getRegisteredDockableWindows();
- for (String dockable: dockables)
- {
- String plugin = DockableWindowManager.
- getDockableWindowPluginName(dockable);
- String set;
- if (plugin != null)
- set = PLUGIN_SET_PREFIX + plugin;
- else
- set = CORE_DOCKABLE_SET;
- Vector<Entry> currentSetDockables = dockableSets.get(set);
- if (currentSetDockables == null)
- {
- currentSetDockables = new Vector<Entry>();
- dockableSets.put(set, currentSetDockables);
- }
- Entry entry = new Entry(dockable);
- currentSetDockables.add(entry);
- all.add(entry);
- }
- showSet(ALL_DOCKABLE_SET);
- } //}}}
-
- public Vector<String> getDockableSets()
- {
- Vector<String> sets = new Vector<String>();
- for (String set: dockableSets.keySet())
- sets.add(set);
- sets.remove(ALL_DOCKABLE_SET);
- sets.remove(CORE_DOCKABLE_SET);
- Collections.sort(sets);
- sets.insertElementAt(CORE_DOCKABLE_SET, 0);
- sets.insertElementAt(ALL_DOCKABLE_SET, 0);
- return sets;
- }
-
- //{{{ showSet() method
- public void showSet(String set)
- {
- windows = dockableSets.get(set);
- Collections.sort(windows,new WindowCompare());
- fireTableDataChanged();
- } //}}}
-
- //{{{ getColumnCount() method
- public int getColumnCount()
- {
- return 2;
- } //}}}
-
- //{{{ getRowCount() method
- public int getRowCount()
- {
- return windows.size();
- } //}}}
-
- //{{{ getColumnClass() method
- public Class getColumnClass(int col)
- {
- switch(col)
- {
- case 0:
- case 1:
- return String.class;
- default:
- throw new InternalError();
- }
- } //}}}
-
- //{{{ getValueAt() method
- public Object getValueAt(int row, int col)
- {
- Entry window = (Entry)windows.elementAt(row);
- switch(col)
- {
- case 0:
- return window.title;
- case 1:
- return window.dockPosition;
- default:
- throw new InternalError();
- }
- } //}}}
-
- //{{{ isCellEditable() method
- public boolean isCellEditable(int row, int col)
- {
- return col != 0;
- } //}}}
-
- //{{{ setValueAt() method
- public void setValueAt(Object value, int row, int col)
- {
- if(col == 0)
- return;
-
- Entry window = (Entry)windows.elementAt(row);
- switch(col)
- {
- case 1:
- window.dockPosition = (String)value;
- break;
- default:
- throw new InternalError();
- }
-
- fireTableRowsUpdated(row,row);
- } //}}}
-
- //{{{ getColumnName() method
- public String getColumnName(int index)
- {
- switch(index)
- {
- case 0:
- return jEdit.getProperty("options.docking.title");
- case 1:
- return jEdit.getProperty("options.docking.dockPosition");
- default:
- throw new InternalError();
- }
- } //}}}
-
- //{{{ save() method
- public void save()
- {
- for(int i = 0; i < windows.size(); i++)
- {
- ((Entry)windows.elementAt(i)).save();
- }
- } //}}}
-
- //{{{ Entry class
- static class Entry
- {
- String name;
- String title;
- String dockPosition;
-
- Entry(String name)
- {
- this.name = name;
- title = jEdit.getProperty(name + ".title");
- if(title == null)
- title = name;
-
- dockPosition = jEdit.getProperty(name + ".dock-position");
- if(dockPosition == null)
- dockPosition = DockableWindowManager.FLOATING;
- }
-
- void save()
- {
- jEdit.setProperty(name + ".dock-position",dockPosition);
- }
- } //}}}
-
- //{{{ WindowCompare class
- static class WindowCompare implements Comparator<Object>
- {
- public int compare(Object obj1, Object obj2)
- {
- Entry e1 = (Entry)obj1;
- Entry e2 = (Entry)obj2;
-
- return StandardUtilities.compareStrings(
- e1.title,e2.title,true);
- }
- } //}}}
-} //}}}
+/*
+ * DockingOptionPane.java - Dockable window options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Vector;
+
+import javax.swing.Box;
+import javax.swing.DefaultCellEditor;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.TableCellRenderer;
+import javax.swing.table.TableColumn;
+
+import org.gjt.sp.jedit.AbstractOptionPane;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.gui.DockableWindowManager;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+//{{{ DockingOptionPane class
+ at SuppressWarnings("serial")
+public class DockingOptionPane extends AbstractOptionPane
+{
+ //{{{ DockingOptionPane constructor
+ public DockingOptionPane()
+ {
+ super("docking");
+ } //}}}
+
+ //{{{ _init() method
+ public void _init()
+ {
+ setLayout(new BorderLayout());
+ add(BorderLayout.NORTH,createDockingOptionsPanel());
+ add(BorderLayout.CENTER,createWindowTableScroller());
+ dockableSetSelection.setModel(
+ new DefaultComboBoxModel(windowModel.getDockableSets()));
+ } //}}}
+
+ //{{{ _save() method
+ public void _save()
+ {
+ jEdit.setBooleanProperty(AUTO_LOAD_MODE_LAYOUT_PROP, autoLoadModeLayout.isSelected());
+ jEdit.setBooleanProperty(AUTO_SAVE_MODE_LAYOUT_PROP, autoSaveModeLayout.isSelected());
+ windowModel.save();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private JTable windowTable;
+ private WindowTableModel windowModel;
+ private JCheckBox autoLoadModeLayout;
+ private JCheckBox autoSaveModeLayout;
+ private JComboBox dockableSetSelection;
+ //}}}
+
+ private static final String DOCKING_OPTIONS_PREFIX = "options.docking.";
+ public static final String AUTO_LOAD_MODE_LAYOUT_PROP = DOCKING_OPTIONS_PREFIX + "autoLoadModeLayout";
+ private static final String AUTO_LOAD_MODE_LAYOUT_LABEL = AUTO_LOAD_MODE_LAYOUT_PROP + ".label";
+ public static final String AUTO_SAVE_MODE_LAYOUT_PROP = DOCKING_OPTIONS_PREFIX + "autoSaveModeLayout";
+ private static final String AUTO_SAVE_MODE_LAYOUT_LABEL = AUTO_SAVE_MODE_LAYOUT_PROP + ".label";
+
+ private JPanel createDockingOptionsPanel()
+ {
+ JPanel p = new JPanel();
+ p.setLayout(new GridLayout(0, 1));
+ boolean autoLoadModeLayoutProp = jEdit.getBooleanProperty(
+ AUTO_LOAD_MODE_LAYOUT_PROP, false);
+ autoLoadModeLayout = new JCheckBox(
+ jEdit.getProperty(AUTO_LOAD_MODE_LAYOUT_LABEL),
+ autoLoadModeLayoutProp);
+ p.add(autoLoadModeLayout);
+ autoSaveModeLayout = new JCheckBox(
+ jEdit.getProperty(AUTO_SAVE_MODE_LAYOUT_LABEL),
+ jEdit.getBooleanProperty(AUTO_SAVE_MODE_LAYOUT_PROP, false));
+ p.add(autoSaveModeLayout);
+ autoSaveModeLayout.setEnabled(autoLoadModeLayoutProp);
+ autoLoadModeLayout.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ autoSaveModeLayout.setEnabled(autoLoadModeLayout.isSelected());
+ }
+ });
+ Box vSetSelection = Box.createVerticalBox();
+ p.add(vSetSelection);
+ Box setSelection = Box.createHorizontalBox();
+ vSetSelection.add(setSelection);
+ setSelection.add(Box.createHorizontalStrut(6));
+ setSelection.add(new JLabel(jEdit.getProperty(
+ "options.docking.selectSet.label")));
+ setSelection.add(Box.createHorizontalStrut(6));
+ dockableSetSelection = new JComboBox();
+ setSelection.add(dockableSetSelection);
+ dockableSetSelection.addItemListener(new ItemListener()
+ {
+ public void itemStateChanged(ItemEvent e)
+ {
+ windowModel.showSet((String) dockableSetSelection.getSelectedItem());
+ }
+ });
+ setSelection.add(Box.createHorizontalStrut(6));
+ vSetSelection.add(Box.createVerticalStrut(6));
+ return p;
+ }
+ //{{{ createWindowTableScroller() method
+ private JScrollPane createWindowTableScroller()
+ {
+ windowModel = createWindowModel();
+ windowTable = new JTable(windowModel);
+ windowTable.getTableHeader().setReorderingAllowed(false);
+ windowTable.setColumnSelectionAllowed(false);
+ windowTable.setRowSelectionAllowed(false);
+ windowTable.setCellSelectionEnabled(false);
+
+ DockPositionCellRenderer comboBox = new DockPositionCellRenderer();
+ windowTable.setRowHeight(comboBox.getPreferredSize().height);
+ TableColumn column = windowTable.getColumnModel().getColumn(1);
+ column.setCellRenderer(comboBox);
+ column.setCellEditor(new DefaultCellEditor(new DockPositionCellRenderer()));
+
+ Dimension d = windowTable.getPreferredSize();
+ d.height = Math.min(d.height,50);
+ JScrollPane scroller = new JScrollPane(windowTable);
+ scroller.setPreferredSize(d);
+ return scroller;
+ } //}}}
+
+ //{{{ createWindowModel() method
+ private static WindowTableModel createWindowModel()
+ {
+ return new WindowTableModel();
+ } //}}}
+
+ //}}}
+
+ //{{{ DockPositionCellRenderer class
+ static class DockPositionCellRenderer extends JComboBox
+ implements TableCellRenderer
+ {
+ DockPositionCellRenderer()
+ {
+ super(new String[] {
+ DockableWindowManager.FLOATING,
+ DockableWindowManager.TOP,
+ DockableWindowManager.LEFT,
+ DockableWindowManager.BOTTOM,
+ DockableWindowManager.RIGHT
+ });
+ DockPositionCellRenderer.this.setRequestFocusEnabled(false);
+ }
+
+ public Component getTableCellRendererComponent(JTable table,
+ Object value, boolean isSelected, boolean hasFocus,
+ int row, int column)
+ {
+ setSelectedItem(value);
+ return this;
+ }
+ } //}}}
+} //}}}
+
+//{{{ WindowTableModel class
+ at SuppressWarnings("serial")
+class WindowTableModel extends AbstractTableModel
+{
+ private static final String PLUGIN_SET_PREFIX = "Plugin: ";
+ private static final String CORE_DOCKABLE_SET = "Core";
+ private static final String ALL_DOCKABLE_SET = "All";
+ private HashMap<String, Vector<Entry>> dockableSets;
+ private Vector<Entry> windows;
+
+ //{{{ WindowTableModel constructor
+ WindowTableModel()
+ {
+ dockableSets = new HashMap<String, Vector<Entry>>();
+ Vector<Entry> all = new Vector<Entry>();
+ dockableSets.put(ALL_DOCKABLE_SET, all);
+ windows = new Vector<Entry>();
+ String[] dockables = DockableWindowManager.getRegisteredDockableWindows();
+ for (String dockable: dockables)
+ {
+ String plugin = DockableWindowManager.
+ getDockableWindowPluginName(dockable);
+ String set;
+ if (plugin != null)
+ set = PLUGIN_SET_PREFIX + plugin;
+ else
+ set = CORE_DOCKABLE_SET;
+ Vector<Entry> currentSetDockables = dockableSets.get(set);
+ if (currentSetDockables == null)
+ {
+ currentSetDockables = new Vector<Entry>();
+ dockableSets.put(set, currentSetDockables);
+ }
+ Entry entry = new Entry(dockable);
+ currentSetDockables.add(entry);
+ all.add(entry);
+ }
+ showSet(ALL_DOCKABLE_SET);
+ } //}}}
+
+ public Vector<String> getDockableSets()
+ {
+ Vector<String> sets = new Vector<String>();
+ for (String set: dockableSets.keySet())
+ sets.add(set);
+ sets.remove(ALL_DOCKABLE_SET);
+ sets.remove(CORE_DOCKABLE_SET);
+ Collections.sort(sets);
+ sets.insertElementAt(CORE_DOCKABLE_SET, 0);
+ sets.insertElementAt(ALL_DOCKABLE_SET, 0);
+ return sets;
+ }
+
+ //{{{ showSet() method
+ public void showSet(String set)
+ {
+ windows = dockableSets.get(set);
+ Collections.sort(windows,new WindowCompare());
+ fireTableDataChanged();
+ } //}}}
+
+ //{{{ getColumnCount() method
+ public int getColumnCount()
+ {
+ return 2;
+ } //}}}
+
+ //{{{ getRowCount() method
+ public int getRowCount()
+ {
+ return windows.size();
+ } //}}}
+
+ //{{{ getColumnClass() method
+ public Class getColumnClass(int col)
+ {
+ switch(col)
+ {
+ case 0:
+ case 1:
+ return String.class;
+ default:
+ throw new InternalError();
+ }
+ } //}}}
+
+ //{{{ getValueAt() method
+ public Object getValueAt(int row, int col)
+ {
+ Entry window = (Entry)windows.elementAt(row);
+ switch(col)
+ {
+ case 0:
+ return window.title;
+ case 1:
+ return window.dockPosition;
+ default:
+ throw new InternalError();
+ }
+ } //}}}
+
+ //{{{ isCellEditable() method
+ public boolean isCellEditable(int row, int col)
+ {
+ return col != 0;
+ } //}}}
+
+ //{{{ setValueAt() method
+ public void setValueAt(Object value, int row, int col)
+ {
+ if(col == 0)
+ return;
+
+ Entry window = (Entry)windows.elementAt(row);
+ switch(col)
+ {
+ case 1:
+ window.dockPosition = (String)value;
+ break;
+ default:
+ throw new InternalError();
+ }
+
+ fireTableRowsUpdated(row,row);
+ } //}}}
+
+ //{{{ getColumnName() method
+ public String getColumnName(int index)
+ {
+ switch(index)
+ {
+ case 0:
+ return jEdit.getProperty("options.docking.title");
+ case 1:
+ return jEdit.getProperty("options.docking.dockPosition");
+ default:
+ throw new InternalError();
+ }
+ } //}}}
+
+ //{{{ save() method
+ public void save()
+ {
+ for(int i = 0; i < windows.size(); i++)
+ {
+ ((Entry)windows.elementAt(i)).save();
+ }
+ } //}}}
+
+ //{{{ Entry class
+ static class Entry
+ {
+ String name;
+ String title;
+ String dockPosition;
+
+ Entry(String name)
+ {
+ this.name = name;
+ title = jEdit.getProperty(name + ".title");
+ if(title == null)
+ title = name;
+
+ dockPosition = jEdit.getProperty(name + ".dock-position");
+ if(dockPosition == null)
+ dockPosition = DockableWindowManager.FLOATING;
+ }
+
+ void save()
+ {
+ jEdit.setProperty(name + ".dock-position",dockPosition);
+ }
+ } //}}}
+
+ //{{{ WindowCompare class
+ static class WindowCompare implements Comparator<Object>
+ {
+ public int compare(Object obj1, Object obj2)
+ {
+ Entry e1 = (Entry)obj1;
+ Entry e2 = (Entry)obj2;
+
+ return StandardUtilities.compareStrings(
+ e1.title,e2.title,true);
+ }
+ } //}}}
+} //}}}
diff --git a/jEdit/org/gjt/sp/jedit/options/EditingOptionPane.java b/jEdit/org/gjt/sp/jedit/options/EditingOptionPane.java
index 6a793f3..c1799a0 100644
--- a/jEdit/org/gjt/sp/jedit/options/EditingOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/EditingOptionPane.java
@@ -1,448 +1,448 @@
-/*
- * EditingOptionPane.java - Mode-specific options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.*;
-
-import java.awt.event.*;
-import java.util.Arrays;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.buffer.FoldHandler;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: EditingOptionPane.java 14125 2008-12-01 10:06:24Z kpouer $
- */
-public class EditingOptionPane extends AbstractOptionPane
-{
- //{{{ EditingOptionPane constructor
- public EditingOptionPane()
- {
- super("editing");
- } //}}}
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- Mode[] modes = jEdit.getModes();
- Arrays.sort(modes,new StandardUtilities.StringCompare<Mode>(true));
-
- global = new ModeProperties();
- modeProps = new ModeProperties[modes.length];
-
- String[] modeNames = new String[modes.length + 1];
- modeNames[0] = jEdit.getProperty("options.editing.global");
-
- for(int i = 0; i < modes.length; i++)
- {
- modeProps[i] = new ModeProperties(modes[i]);
- modeNames[i + 1] = modes[i].getName();
- }
-
- mode = new JComboBox(modeNames);
- mode.addActionListener(new ActionHandler());
-
- captionBox = new Box(BoxLayout.X_AXIS);
- addComponent(captionBox);
-
- addComponent(jEdit.getProperty("options.editing.mode"),mode);
-
- useDefaults = new JCheckBox(jEdit.getProperty("options.editing.useDefaults"));
- useDefaults.addActionListener(new ActionHandler());
- addComponent(useDefaults);
-
- addComponent(jEdit.getProperty("options.editing.noWordSep"),
- noWordSep = new JTextField());
-
- addComponent(camelCasedWords = new JCheckBox(jEdit.getProperty(
- "options.editing.camelCasedWords")));
-
- String[] foldModes = FoldHandler.getFoldModes();
- addComponent(jEdit.getProperty("options.editing.folding"),
- folding = new JComboBox(foldModes));
-
- addComponent(jEdit.getProperty("options.editing.collapseFolds"),
- collapseFolds = new JTextField());
-
- String[] wrapModes = {
- "none",
- "soft",
- "hard"
- };
- addComponent(jEdit.getProperty("options.editing.wrap"),
- wrap = new JComboBox(wrapModes));
-
- String[] lineLens = { "0", "72", "76", "80" };
- maxLineLen = new JComboBox(lineLens);
- maxLineLen.setToolTipText(jEdit.getProperty("options.editing.maxLineLen.tooltip"));
- addComponent(jEdit.getProperty("options.editing.maxLineLen"), maxLineLen);
- maxLineLen.setEditable(true);
-
- String[] tabSizes = { "2", "4", "8" };
- addComponent(jEdit.getProperty("options.editing.tabSize"),
- tabSize = new JComboBox(tabSizes));
- tabSize.setEditable(true);
-
- addComponent(jEdit.getProperty("options.editing.indentSize"),
- indentSize = new JComboBox(tabSizes));
- indentSize.setEditable(true);
-
- addComponent(noTabs = new JCheckBox(jEdit.getProperty(
- "options.editing.noTabs")));
-
- addComponent(deepIndent = new JCheckBox(jEdit.getProperty(
- "options.editing.deepIndent")));
-
- filenameGlob = new JTextField();
- filenameGlob.setToolTipText(jEdit.getProperty("glob.tooltip"));
- addComponent(jEdit.getProperty("options.editing.filenameGlob"),
- filenameGlob);
-
- addComponent(jEdit.getProperty("options.editing.firstlineGlob"),
- firstlineGlob = new JTextField());
-
- selectMode();
-
- addSeparator();
-
- defaultMode = new JComboBox(modes);
- defaultMode.setSelectedItem(jEdit.getMode(
- jEdit.getProperty("buffer.defaultMode")));
- addComponent(jEdit.getProperty("options.editing.defaultMode"),
- defaultMode);
-
- undoCount = new JTextField(jEdit.getProperty("buffer.undoCount"));
- addComponent(jEdit.getProperty("options.editing.undoCount"),undoCount);
-
- //{{{ Reset Undo Manager On Save
- resetUndoOnSave = new JCheckBox(jEdit.getProperty("options.general.resetUndo"));
- resetUndoOnSave.setSelected(jEdit.getBooleanProperty("resetUndoOnSave"));
- addComponent(resetUndoOnSave);
- //}}}
-
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
- jEdit.setProperty("buffer.defaultMode",
- ((Mode)defaultMode.getSelectedItem()).getName());
- jEdit.setProperty("buffer.undoCount",undoCount.getText());
- jEdit.setBooleanProperty("resetUndoOnSave", resetUndoOnSave.isSelected());
-
- saveMode();
-
- global.save();
-
- for(int i = 0; i < modeProps.length; i++)
- {
- modeProps[i].save();
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private JComboBox defaultMode;
- private JTextField undoCount;
- private JCheckBox resetUndoOnSave;
- private ModeProperties global;
- private ModeProperties[] modeProps;
- private ModeProperties current;
- private Box captionBox;
- private JComboBox mode;
- private JCheckBox useDefaults;
- private JTextField filenameGlob;
- private JTextField firstlineGlob;
- private JTextField noWordSep;
- private JCheckBox camelCasedWords;
- private JComboBox folding;
- private JTextField collapseFolds;
- private JComboBox wrap;
- private JComboBox maxLineLen;
- private JComboBox tabSize;
- private JComboBox indentSize;
- private JCheckBox noTabs;
- private JCheckBox deepIndent;
- //}}}
-
- //{{{ saveMode() method
- private void saveMode()
- {
- current.useDefaults = useDefaults.isSelected();
- current.filenameGlob = filenameGlob.getText();
- current.firstlineGlob = firstlineGlob.getText();
- current.noWordSep = noWordSep.getText();
- current.camelCasedWords = camelCasedWords.isSelected();
- current.folding = (String)folding.getSelectedItem();
- current.collapseFolds = collapseFolds.getText();
- current.wrap = (String)wrap.getSelectedItem();
- current.maxLineLen = (String)maxLineLen.getSelectedItem();
- current.tabSize = (String)tabSize.getSelectedItem();
- current.indentSize = (String)indentSize.getSelectedItem();
- current.noTabs = noTabs.isSelected();
- current.deepIndent = deepIndent.isSelected();
- } //}}}
-
- //{{{ selectMode() method
- private void selectMode()
- {
- int index = mode.getSelectedIndex();
- current = index == 0 ? global : modeProps[index - 1];
- current.edited = true;
- current.load();
-
- captionBox.removeAll();
- captionBox.add(GUIUtilities.createMultilineLabel(
- jEdit.getProperty("options.editing.caption-"
- + (index == 0 ? "0" : "1"))));
-
- useDefaults.setSelected(current.useDefaults);
- filenameGlob.setText(current.filenameGlob);
- firstlineGlob.setText(current.firstlineGlob);
- noWordSep.setText(current.noWordSep);
- camelCasedWords.setSelected(current.camelCasedWords);
- folding.setSelectedItem(current.folding);
- collapseFolds.setText(current.collapseFolds);
- wrap.setSelectedItem(current.wrap);
- maxLineLen.setSelectedItem(current.maxLineLen);
- tabSize.setSelectedItem(current.tabSize);
- indentSize.setSelectedItem(current.indentSize);
- noTabs.setSelected(current.noTabs);
- deepIndent.setSelected(current.deepIndent);
-
- updateEnabled();
- revalidate();
- } //}}}
-
- //{{{ updateEnabled() method
- private void updateEnabled()
- {
- boolean enabled;
- if(current == global)
- {
- enabled = true;
- useDefaults.setEnabled(false);
- filenameGlob.setEnabled(false);
- firstlineGlob.setEnabled(false);
- }
- else
- {
- enabled = !modeProps[mode.getSelectedIndex() - 1]
- .useDefaults;
- useDefaults.setEnabled(true);
- filenameGlob.setEnabled(enabled);
- firstlineGlob.setEnabled(enabled);
- }
-
- noWordSep.setEnabled(enabled);
- camelCasedWords.setEnabled(enabled);
- folding.setEnabled(enabled);
- collapseFolds.setEnabled(enabled);
- wrap.setEnabled(enabled);
- maxLineLen.setEnabled(enabled);
- tabSize.setEnabled(enabled);
- indentSize.setEnabled(enabled);
- noTabs.setEnabled(enabled);
- deepIndent.setEnabled(enabled);
- } //}}}
-
- //}}}
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == mode)
- {
- saveMode();
- selectMode();
- }
- else if(source == useDefaults)
- {
- modeProps[mode.getSelectedIndex() - 1].useDefaults =
- useDefaults.isSelected();
- updateEnabled();
- }
- }
- } //}}}
-
- //{{{ ModeProperties class
- private static class ModeProperties
- {
- //{{{ Instance variables
- Mode mode;
- boolean edited;
- boolean loaded;
-
- boolean useDefaults;
- String filenameGlob;
- String firstlineGlob;
- String noWordSep;
- boolean camelCasedWords;
- String folding;
- String collapseFolds;
- String wrap;
- String maxLineLen;
- String tabSize;
- String indentSize;
- boolean noTabs;
- boolean deepIndent;
- //}}}
-
- //{{{ ModeProperties constructor
- ModeProperties()
- {
- } //}}}
-
- //{{{ ModeProperties constructor
- ModeProperties(Mode mode)
- {
- this.mode = mode;
- } //}}}
-
- //{{{ load() method
- void load()
- {
- if(loaded)
- return;
-
- loaded = true;
-
- if(mode != null)
- {
- mode.loadIfNecessary();
-
- useDefaults = !jEdit.getBooleanProperty("mode."
- + mode.getName() + ".customSettings");
- filenameGlob = (String)mode.getProperty("filenameGlob");
- firstlineGlob = (String)mode.getProperty("firstlineGlob");
- noWordSep = (String)mode.getProperty("noWordSep");
- camelCasedWords = mode.getBooleanProperty("camelCasedWords");
- folding = mode.getProperty("folding").toString();
- collapseFolds = mode.getProperty("collapseFolds").toString();
- wrap = mode.getProperty("wrap").toString();
- maxLineLen = mode.getProperty("maxLineLen").toString();
- tabSize = mode.getProperty("tabSize").toString();
- indentSize = mode.getProperty("indentSize").toString();
- noTabs = mode.getBooleanProperty("noTabs");
- deepIndent = mode.getBooleanProperty("deepIndent");
- }
- else
- {
- noWordSep = jEdit.getProperty("buffer.noWordSep");
- camelCasedWords = jEdit.getBooleanProperty("buffer.camelCasedWords");
- folding = jEdit.getProperty("buffer.folding");
- collapseFolds = jEdit.getProperty("buffer.collapseFolds");
- wrap = jEdit.getProperty("buffer.wrap");
- maxLineLen = jEdit.getProperty("buffer.maxLineLen");
- tabSize = jEdit.getProperty("buffer.tabSize");
- indentSize = jEdit.getProperty("buffer.indentSize");
- noTabs = jEdit.getBooleanProperty("buffer.noTabs");
- deepIndent = jEdit.getBooleanProperty("buffer.deepIndent");
- }
- } //}}}
-
- //{{{ save() method
- void save()
- {
- // don't do anything if the user didn't change
- // any settings
- if(!edited)
- return;
-
- String prefix;
- if(mode != null)
- {
- prefix = "mode." + mode.getName() + '.';
- jEdit.setBooleanProperty(prefix + "customSettings",!useDefaults);
-
- // need to call Mode.init() if the file name or first line
- // globs change
- String oldFilenameGlob = (String)mode.getProperty("filenameGlob");
- String oldFirstlineGlob = (String)mode.getProperty("firstlineGlob");
- if(useDefaults)
- {
- jEdit.resetProperty(prefix + "filenameGlob");
- jEdit.resetProperty(prefix + "firstlineGlob");
- jEdit.resetProperty(prefix + "noWordSep");
- jEdit.resetProperty(prefix + "camelCasedWords");
- jEdit.resetProperty(prefix + "folding");
- jEdit.resetProperty(prefix + "collapseFolds");
- jEdit.resetProperty(prefix + "wrap");
- jEdit.resetProperty(prefix + "maxLineLen");
- jEdit.resetProperty(prefix + "tabSize");
- jEdit.resetProperty(prefix + "indentSize");
- jEdit.resetProperty(prefix + "noTabs");
- jEdit.resetProperty(prefix + "deepIndent");
-
- if(!(StandardUtilities.objectsEqual(oldFilenameGlob,
- mode.getProperty("filenameGlob"))
- && StandardUtilities.objectsEqual(oldFirstlineGlob,
- mode.getProperty("firstlineGlob"))))
- {
- mode.init();
- }
-
- return;
- }
- else
- {
- jEdit.setProperty(prefix + "filenameGlob",filenameGlob);
- jEdit.setProperty(prefix + "firstlineGlob",firstlineGlob);
-
- if(!(StandardUtilities.objectsEqual(oldFilenameGlob,
- filenameGlob)
- && StandardUtilities.objectsEqual(oldFirstlineGlob,
- firstlineGlob)))
- {
- mode.init();
- }
- }
- }
- else
- {
- prefix = "buffer.";
- }
-
- jEdit.setProperty(prefix + "noWordSep",noWordSep);
- jEdit.setBooleanProperty(prefix + "camelCasedWords",camelCasedWords);
- jEdit.setProperty(prefix + "folding",folding);
- jEdit.setProperty(prefix + "collapseFolds",collapseFolds);
- jEdit.setProperty(prefix + "wrap",wrap);
- jEdit.setProperty(prefix + "maxLineLen",maxLineLen);
- jEdit.setProperty(prefix + "tabSize",tabSize);
- jEdit.setProperty(prefix + "indentSize",indentSize);
- jEdit.setBooleanProperty(prefix + "noTabs",noTabs);
- jEdit.setBooleanProperty(prefix + "deepIndent",deepIndent);
- } //}}}
- } //}}}
-}
+/*
+ * EditingOptionPane.java - Mode-specific options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.*;
+
+import java.awt.event.*;
+import java.util.Arrays;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.buffer.FoldHandler;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: EditingOptionPane.java 14125 2008-12-01 10:06:24Z kpouer $
+ */
+public class EditingOptionPane extends AbstractOptionPane
+{
+ //{{{ EditingOptionPane constructor
+ public EditingOptionPane()
+ {
+ super("editing");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ Mode[] modes = jEdit.getModes();
+ Arrays.sort(modes,new StandardUtilities.StringCompare<Mode>(true));
+
+ global = new ModeProperties();
+ modeProps = new ModeProperties[modes.length];
+
+ String[] modeNames = new String[modes.length + 1];
+ modeNames[0] = jEdit.getProperty("options.editing.global");
+
+ for(int i = 0; i < modes.length; i++)
+ {
+ modeProps[i] = new ModeProperties(modes[i]);
+ modeNames[i + 1] = modes[i].getName();
+ }
+
+ mode = new JComboBox(modeNames);
+ mode.addActionListener(new ActionHandler());
+
+ captionBox = new Box(BoxLayout.X_AXIS);
+ addComponent(captionBox);
+
+ addComponent(jEdit.getProperty("options.editing.mode"),mode);
+
+ useDefaults = new JCheckBox(jEdit.getProperty("options.editing.useDefaults"));
+ useDefaults.addActionListener(new ActionHandler());
+ addComponent(useDefaults);
+
+ addComponent(jEdit.getProperty("options.editing.noWordSep"),
+ noWordSep = new JTextField());
+
+ addComponent(camelCasedWords = new JCheckBox(jEdit.getProperty(
+ "options.editing.camelCasedWords")));
+
+ String[] foldModes = FoldHandler.getFoldModes();
+ addComponent(jEdit.getProperty("options.editing.folding"),
+ folding = new JComboBox(foldModes));
+
+ addComponent(jEdit.getProperty("options.editing.collapseFolds"),
+ collapseFolds = new JTextField());
+
+ String[] wrapModes = {
+ "none",
+ "soft",
+ "hard"
+ };
+ addComponent(jEdit.getProperty("options.editing.wrap"),
+ wrap = new JComboBox(wrapModes));
+
+ String[] lineLens = { "0", "72", "76", "80" };
+ maxLineLen = new JComboBox(lineLens);
+ maxLineLen.setToolTipText(jEdit.getProperty("options.editing.maxLineLen.tooltip"));
+ addComponent(jEdit.getProperty("options.editing.maxLineLen"), maxLineLen);
+ maxLineLen.setEditable(true);
+
+ String[] tabSizes = { "2", "4", "8" };
+ addComponent(jEdit.getProperty("options.editing.tabSize"),
+ tabSize = new JComboBox(tabSizes));
+ tabSize.setEditable(true);
+
+ addComponent(jEdit.getProperty("options.editing.indentSize"),
+ indentSize = new JComboBox(tabSizes));
+ indentSize.setEditable(true);
+
+ addComponent(noTabs = new JCheckBox(jEdit.getProperty(
+ "options.editing.noTabs")));
+
+ addComponent(deepIndent = new JCheckBox(jEdit.getProperty(
+ "options.editing.deepIndent")));
+
+ filenameGlob = new JTextField();
+ filenameGlob.setToolTipText(jEdit.getProperty("glob.tooltip"));
+ addComponent(jEdit.getProperty("options.editing.filenameGlob"),
+ filenameGlob);
+
+ addComponent(jEdit.getProperty("options.editing.firstlineGlob"),
+ firstlineGlob = new JTextField());
+
+ selectMode();
+
+ addSeparator();
+
+ defaultMode = new JComboBox(modes);
+ defaultMode.setSelectedItem(jEdit.getMode(
+ jEdit.getProperty("buffer.defaultMode")));
+ addComponent(jEdit.getProperty("options.editing.defaultMode"),
+ defaultMode);
+
+ undoCount = new JTextField(jEdit.getProperty("buffer.undoCount"));
+ addComponent(jEdit.getProperty("options.editing.undoCount"),undoCount);
+
+ //{{{ Reset Undo Manager On Save
+ resetUndoOnSave = new JCheckBox(jEdit.getProperty("options.general.resetUndo"));
+ resetUndoOnSave.setSelected(jEdit.getBooleanProperty("resetUndoOnSave"));
+ addComponent(resetUndoOnSave);
+ //}}}
+
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ jEdit.setProperty("buffer.defaultMode",
+ ((Mode)defaultMode.getSelectedItem()).getName());
+ jEdit.setProperty("buffer.undoCount",undoCount.getText());
+ jEdit.setBooleanProperty("resetUndoOnSave", resetUndoOnSave.isSelected());
+
+ saveMode();
+
+ global.save();
+
+ for(int i = 0; i < modeProps.length; i++)
+ {
+ modeProps[i].save();
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private JComboBox defaultMode;
+ private JTextField undoCount;
+ private JCheckBox resetUndoOnSave;
+ private ModeProperties global;
+ private ModeProperties[] modeProps;
+ private ModeProperties current;
+ private Box captionBox;
+ private JComboBox mode;
+ private JCheckBox useDefaults;
+ private JTextField filenameGlob;
+ private JTextField firstlineGlob;
+ private JTextField noWordSep;
+ private JCheckBox camelCasedWords;
+ private JComboBox folding;
+ private JTextField collapseFolds;
+ private JComboBox wrap;
+ private JComboBox maxLineLen;
+ private JComboBox tabSize;
+ private JComboBox indentSize;
+ private JCheckBox noTabs;
+ private JCheckBox deepIndent;
+ //}}}
+
+ //{{{ saveMode() method
+ private void saveMode()
+ {
+ current.useDefaults = useDefaults.isSelected();
+ current.filenameGlob = filenameGlob.getText();
+ current.firstlineGlob = firstlineGlob.getText();
+ current.noWordSep = noWordSep.getText();
+ current.camelCasedWords = camelCasedWords.isSelected();
+ current.folding = (String)folding.getSelectedItem();
+ current.collapseFolds = collapseFolds.getText();
+ current.wrap = (String)wrap.getSelectedItem();
+ current.maxLineLen = (String)maxLineLen.getSelectedItem();
+ current.tabSize = (String)tabSize.getSelectedItem();
+ current.indentSize = (String)indentSize.getSelectedItem();
+ current.noTabs = noTabs.isSelected();
+ current.deepIndent = deepIndent.isSelected();
+ } //}}}
+
+ //{{{ selectMode() method
+ private void selectMode()
+ {
+ int index = mode.getSelectedIndex();
+ current = index == 0 ? global : modeProps[index - 1];
+ current.edited = true;
+ current.load();
+
+ captionBox.removeAll();
+ captionBox.add(GUIUtilities.createMultilineLabel(
+ jEdit.getProperty("options.editing.caption-"
+ + (index == 0 ? "0" : "1"))));
+
+ useDefaults.setSelected(current.useDefaults);
+ filenameGlob.setText(current.filenameGlob);
+ firstlineGlob.setText(current.firstlineGlob);
+ noWordSep.setText(current.noWordSep);
+ camelCasedWords.setSelected(current.camelCasedWords);
+ folding.setSelectedItem(current.folding);
+ collapseFolds.setText(current.collapseFolds);
+ wrap.setSelectedItem(current.wrap);
+ maxLineLen.setSelectedItem(current.maxLineLen);
+ tabSize.setSelectedItem(current.tabSize);
+ indentSize.setSelectedItem(current.indentSize);
+ noTabs.setSelected(current.noTabs);
+ deepIndent.setSelected(current.deepIndent);
+
+ updateEnabled();
+ revalidate();
+ } //}}}
+
+ //{{{ updateEnabled() method
+ private void updateEnabled()
+ {
+ boolean enabled;
+ if(current == global)
+ {
+ enabled = true;
+ useDefaults.setEnabled(false);
+ filenameGlob.setEnabled(false);
+ firstlineGlob.setEnabled(false);
+ }
+ else
+ {
+ enabled = !modeProps[mode.getSelectedIndex() - 1]
+ .useDefaults;
+ useDefaults.setEnabled(true);
+ filenameGlob.setEnabled(enabled);
+ firstlineGlob.setEnabled(enabled);
+ }
+
+ noWordSep.setEnabled(enabled);
+ camelCasedWords.setEnabled(enabled);
+ folding.setEnabled(enabled);
+ collapseFolds.setEnabled(enabled);
+ wrap.setEnabled(enabled);
+ maxLineLen.setEnabled(enabled);
+ tabSize.setEnabled(enabled);
+ indentSize.setEnabled(enabled);
+ noTabs.setEnabled(enabled);
+ deepIndent.setEnabled(enabled);
+ } //}}}
+
+ //}}}
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == mode)
+ {
+ saveMode();
+ selectMode();
+ }
+ else if(source == useDefaults)
+ {
+ modeProps[mode.getSelectedIndex() - 1].useDefaults =
+ useDefaults.isSelected();
+ updateEnabled();
+ }
+ }
+ } //}}}
+
+ //{{{ ModeProperties class
+ private static class ModeProperties
+ {
+ //{{{ Instance variables
+ Mode mode;
+ boolean edited;
+ boolean loaded;
+
+ boolean useDefaults;
+ String filenameGlob;
+ String firstlineGlob;
+ String noWordSep;
+ boolean camelCasedWords;
+ String folding;
+ String collapseFolds;
+ String wrap;
+ String maxLineLen;
+ String tabSize;
+ String indentSize;
+ boolean noTabs;
+ boolean deepIndent;
+ //}}}
+
+ //{{{ ModeProperties constructor
+ ModeProperties()
+ {
+ } //}}}
+
+ //{{{ ModeProperties constructor
+ ModeProperties(Mode mode)
+ {
+ this.mode = mode;
+ } //}}}
+
+ //{{{ load() method
+ void load()
+ {
+ if(loaded)
+ return;
+
+ loaded = true;
+
+ if(mode != null)
+ {
+ mode.loadIfNecessary();
+
+ useDefaults = !jEdit.getBooleanProperty("mode."
+ + mode.getName() + ".customSettings");
+ filenameGlob = (String)mode.getProperty("filenameGlob");
+ firstlineGlob = (String)mode.getProperty("firstlineGlob");
+ noWordSep = (String)mode.getProperty("noWordSep");
+ camelCasedWords = mode.getBooleanProperty("camelCasedWords");
+ folding = mode.getProperty("folding").toString();
+ collapseFolds = mode.getProperty("collapseFolds").toString();
+ wrap = mode.getProperty("wrap").toString();
+ maxLineLen = mode.getProperty("maxLineLen").toString();
+ tabSize = mode.getProperty("tabSize").toString();
+ indentSize = mode.getProperty("indentSize").toString();
+ noTabs = mode.getBooleanProperty("noTabs");
+ deepIndent = mode.getBooleanProperty("deepIndent");
+ }
+ else
+ {
+ noWordSep = jEdit.getProperty("buffer.noWordSep");
+ camelCasedWords = jEdit.getBooleanProperty("buffer.camelCasedWords");
+ folding = jEdit.getProperty("buffer.folding");
+ collapseFolds = jEdit.getProperty("buffer.collapseFolds");
+ wrap = jEdit.getProperty("buffer.wrap");
+ maxLineLen = jEdit.getProperty("buffer.maxLineLen");
+ tabSize = jEdit.getProperty("buffer.tabSize");
+ indentSize = jEdit.getProperty("buffer.indentSize");
+ noTabs = jEdit.getBooleanProperty("buffer.noTabs");
+ deepIndent = jEdit.getBooleanProperty("buffer.deepIndent");
+ }
+ } //}}}
+
+ //{{{ save() method
+ void save()
+ {
+ // don't do anything if the user didn't change
+ // any settings
+ if(!edited)
+ return;
+
+ String prefix;
+ if(mode != null)
+ {
+ prefix = "mode." + mode.getName() + '.';
+ jEdit.setBooleanProperty(prefix + "customSettings",!useDefaults);
+
+ // need to call Mode.init() if the file name or first line
+ // globs change
+ String oldFilenameGlob = (String)mode.getProperty("filenameGlob");
+ String oldFirstlineGlob = (String)mode.getProperty("firstlineGlob");
+ if(useDefaults)
+ {
+ jEdit.resetProperty(prefix + "filenameGlob");
+ jEdit.resetProperty(prefix + "firstlineGlob");
+ jEdit.resetProperty(prefix + "noWordSep");
+ jEdit.resetProperty(prefix + "camelCasedWords");
+ jEdit.resetProperty(prefix + "folding");
+ jEdit.resetProperty(prefix + "collapseFolds");
+ jEdit.resetProperty(prefix + "wrap");
+ jEdit.resetProperty(prefix + "maxLineLen");
+ jEdit.resetProperty(prefix + "tabSize");
+ jEdit.resetProperty(prefix + "indentSize");
+ jEdit.resetProperty(prefix + "noTabs");
+ jEdit.resetProperty(prefix + "deepIndent");
+
+ if(!(StandardUtilities.objectsEqual(oldFilenameGlob,
+ mode.getProperty("filenameGlob"))
+ && StandardUtilities.objectsEqual(oldFirstlineGlob,
+ mode.getProperty("firstlineGlob"))))
+ {
+ mode.init();
+ }
+
+ return;
+ }
+ else
+ {
+ jEdit.setProperty(prefix + "filenameGlob",filenameGlob);
+ jEdit.setProperty(prefix + "firstlineGlob",firstlineGlob);
+
+ if(!(StandardUtilities.objectsEqual(oldFilenameGlob,
+ filenameGlob)
+ && StandardUtilities.objectsEqual(oldFirstlineGlob,
+ firstlineGlob)))
+ {
+ mode.init();
+ }
+ }
+ }
+ else
+ {
+ prefix = "buffer.";
+ }
+
+ jEdit.setProperty(prefix + "noWordSep",noWordSep);
+ jEdit.setBooleanProperty(prefix + "camelCasedWords",camelCasedWords);
+ jEdit.setProperty(prefix + "folding",folding);
+ jEdit.setProperty(prefix + "collapseFolds",collapseFolds);
+ jEdit.setProperty(prefix + "wrap",wrap);
+ jEdit.setProperty(prefix + "maxLineLen",maxLineLen);
+ jEdit.setProperty(prefix + "tabSize",tabSize);
+ jEdit.setProperty(prefix + "indentSize",indentSize);
+ jEdit.setBooleanProperty(prefix + "noTabs",noTabs);
+ jEdit.setBooleanProperty(prefix + "deepIndent",deepIndent);
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/EncodingsOptionPane.java b/jEdit/org/gjt/sp/jedit/options/EncodingsOptionPane.java
index d968b34..4734a75 100644
--- a/jEdit/org/gjt/sp/jedit/options/EncodingsOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/EncodingsOptionPane.java
@@ -1,232 +1,197 @@
-/*
- * EncodingsOptionPane.java - Encodings options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Björn Kautler
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import java.awt.Dimension;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Vector;
-import javax.swing.Box;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
-import javax.swing.JScrollPane;
-import javax.swing.JTextField;
-import javax.swing.border.TitledBorder;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
-import org.gjt.sp.jedit.AbstractOptionPane;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.gui.JCheckBoxList;
-import org.gjt.sp.jedit.gui.JCheckBoxList.Entry;
-import org.gjt.sp.util.StandardUtilities;
-import static java.awt.GridBagConstraints.BOTH;
-import static java.util.Arrays.sort;
-import static javax.swing.Box.createHorizontalBox;
-import static javax.swing.Box.createHorizontalStrut;
-import static org.gjt.sp.jedit.jEdit.getBooleanProperty;
-import static org.gjt.sp.jedit.jEdit.getProperty;
-import static org.gjt.sp.jedit.jEdit.setBooleanProperty;
-import static org.gjt.sp.jedit.jEdit.unsetProperty;
-import static org.gjt.sp.jedit.MiscUtilities.getEncodings;
-//}}}
-
-//{{{ EncodingsOptionPane class
-/**
- * Encodings options.
- *
- * @author Björn Kautler
- * @since jEdit 4.3pre6
- * @version $Id: EncodingsOptionPane.java 16347 2009-10-14 10:37:09Z kpouer $
- */
-public class EncodingsOptionPane extends AbstractOptionPane
-{
- //{{{ Instance variables
- private JComboBox defaultEncoding;
- private JCheckBox encodingAutodetect;
- private JTextField encodingDetectors;
- private JTextField fallbackEncodings;
-
- private JCheckBoxList encodingsList;
- private JButton selectAllButton;
- private JButton selectNoneButton;
- //}}}
-
- //{{{ EncodingsOptionPane constructor
- public EncodingsOptionPane()
- {
- super("encodings");
- } //}}}
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- // Default file encoding
- String[] encodings = getEncodings(true);
- sort(encodings,new StandardUtilities.StringCompare<String>(true));
- defaultEncoding = new JComboBox(encodings);
- defaultEncoding.setEditable(true);
- defaultEncoding.setSelectedItem(jEdit.getProperty("buffer."+JEditBuffer.ENCODING,
- System.getProperty("file.encoding")));
- addComponent(jEdit.getProperty("options.general.encoding"),defaultEncoding);
-
- // Auto detect encoding
- encodingAutodetect = new JCheckBox(jEdit.getProperty(
- "options.general.encodingAutodetect"));
- encodingAutodetect.setSelected(jEdit.getBooleanProperty(
- "buffer.encodingAutodetect"));
- addComponent(encodingAutodetect,BOTH);
-
- // Encoding detectors
- encodingDetectors = new JTextField(jEdit.getProperty(
- "encodingDetectors","BOM XML-PI"));
- addComponent(jEdit.getProperty("options.general.encodingDetectors"),encodingDetectors);
-
- // Fallback Encodings
- fallbackEncodings = new JTextField(jEdit.getProperty(
- "fallbackEncodings",""));
- fallbackEncodings.setToolTipText(jEdit.getProperty(
- "options.general.fallbackEncodings.tooltip"));
- addComponent(jEdit.getProperty("options.general.fallbackEncodings"),fallbackEncodings);
-
- // Encodings to display
- encodings = getEncodings(false);
- sort(encodings,new StandardUtilities.StringCompare<String>(true));
- Vector<Entry> encodingEntriesVector = new Vector<Entry>();
- boolean enableSelectAll = false;
- boolean enableSelectNone = false;
- for (String encoding : encodings)
- {
- boolean selected = !getBooleanProperty("encoding.opt-out."+encoding,false);
- enableSelectAll = enableSelectAll || !selected;
- enableSelectNone = enableSelectNone || selected;
- encodingEntriesVector.add(new Entry(selected,encoding));
- }
- encodingsList = new JCheckBoxList(encodingEntriesVector);
- encodingsList.getModel().addTableModelListener(new TableModelHandler());
- JScrollPane encodingsScrollPane = new JScrollPane(encodingsList);
- encodingsScrollPane.setBorder(
- new TitledBorder(getProperty("options.encodings.selectEncodings")));
- Dimension d = encodingsList.getPreferredSize();
- d.height = Math.min(d.height,200);
- encodingsScrollPane.setPreferredSize(d);
- addComponent(encodingsScrollPane,BOTH);
-
- // Select All/None Buttons
- Box buttonsBox = createHorizontalBox();
- buttonsBox.add(createHorizontalStrut(12));
-
- ActionHandler actionHandler = new ActionHandler();
- selectAllButton = new JButton(getProperty("options.encodings.selectAll"));
- selectAllButton.addActionListener(actionHandler);
- selectAllButton.setEnabled(enableSelectAll);
- buttonsBox.add(selectAllButton);
- buttonsBox.add(createHorizontalStrut(12));
-
- selectNoneButton = new JButton(getProperty("options.encodings.selectNone"));
- selectNoneButton.addActionListener(actionHandler);
- selectNoneButton.setEnabled(enableSelectNone);
- buttonsBox.add(selectNoneButton);
- buttonsBox.add(createHorizontalStrut(12));
-
- addComponent(buttonsBox);
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
-
- jEdit.setProperty("buffer."+ JEditBuffer.ENCODING,(String)
- defaultEncoding.getSelectedItem());
- jEdit.setBooleanProperty("buffer.encodingAutodetect",
- encodingAutodetect.isSelected());
- jEdit.setProperty("encodingDetectors",encodingDetectors.getText());
- jEdit.setProperty("fallbackEncodings",fallbackEncodings.getText());
-
- for (Entry entry : encodingsList.getValues())
- {
- if (entry.isChecked())
- {
- unsetProperty("encoding.opt-out."+entry.getValue());
- }
- else
- {
- setBooleanProperty("encoding.opt-out."+entry.getValue(),true);
- }
- }
- } //}}}
-
- //{{{ Inner classes
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent ae)
- {
- Object source = ae.getSource();
- if (source == selectAllButton)
- {
- encodingsList.selectAll();
- }
- else if (source == selectNoneButton)
- {
- for (int i=0, c=encodingsList.getRowCount() ; i<c ; i++)
- {
- encodingsList.setValueAt(false,i,0);
- }
- }
- }
- } //}}}
-
- //{{{ TableModelHandler class
- private class TableModelHandler implements TableModelListener
- {
- public void tableChanged(TableModelEvent tme)
- {
- int checkedAmount = encodingsList.getCheckedValues().length;
- if (checkedAmount == 0)
- {
- selectNoneButton.setEnabled(false);
- }
- else
- {
- selectNoneButton.setEnabled(true);
- }
- if (encodingsList.getValues().length == checkedAmount)
- {
- selectAllButton.setEnabled(false);
- }
- else
- {
- selectAllButton.setEnabled(true);
- }
- }
- } //}}}
-
- //}}}
-
-} //}}}
+/*
+ * EncodingsOptionPane.java - Encodings options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Björn Kautler
+ * Portions copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import javax.swing.Box;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JTextField;
+import org.gjt.sp.jedit.AbstractOptionPane;
+import org.gjt.sp.jedit.gui.PingPongList;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.StandardUtilities;
+import static java.awt.GridBagConstraints.BOTH;
+import static java.util.Arrays.sort;
+import static javax.swing.Box.createHorizontalBox;
+import static javax.swing.Box.createHorizontalStrut;
+import static org.gjt.sp.jedit.jEdit.getBooleanProperty;
+import static org.gjt.sp.jedit.jEdit.getProperty;
+import static org.gjt.sp.jedit.jEdit.setBooleanProperty;
+import static org.gjt.sp.jedit.jEdit.unsetProperty;
+import static org.gjt.sp.jedit.MiscUtilities.getEncodings;
+//}}}
+
+//{{{ EncodingsOptionPane class
+/**
+ * Encodings options.
+ *
+ * @author Björn Kautler
+ * @author Matthieu Casanova
+ * @since jEdit 4.3pre6
+ * @version $Id: EncodingsOptionPane.java 17766 2010-05-08 12:39:07Z k_satoda $
+ */
+public class EncodingsOptionPane extends AbstractOptionPane
+{
+ //{{{ Instance variables
+ private JComboBox defaultEncoding;
+ private JCheckBox encodingAutodetect;
+ private JTextField encodingDetectors;
+ private JTextField fallbackEncodings;
+
+ private JButton selectAllButton;
+ private JButton selectNoneButton;
+ private PingPongList<String> pingPongList;
+ //}}}
+
+ //{{{ EncodingsOptionPane constructor
+ public EncodingsOptionPane()
+ {
+ super("encodings");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ // Default file encoding
+ String[] encodings = getEncodings(true);
+ sort(encodings,new StandardUtilities.StringCompare<String>(true));
+ defaultEncoding = new JComboBox(encodings);
+ defaultEncoding.setEditable(true);
+ defaultEncoding.setSelectedItem(jEdit.getProperty("buffer."+JEditBuffer.ENCODING,
+ System.getProperty("file.encoding")));
+ addComponent(jEdit.getProperty("options.general.encoding"),defaultEncoding);
+
+ // Auto detect encoding
+ encodingAutodetect = new JCheckBox(jEdit.getProperty(
+ "options.general.encodingAutodetect"));
+ encodingAutodetect.setSelected(jEdit.getBooleanProperty(
+ "buffer.encodingAutodetect"));
+ addComponent(encodingAutodetect,BOTH);
+
+ // Encoding detectors
+ encodingDetectors = new JTextField(jEdit.getProperty(
+ "encodingDetectors",""));
+ addComponent(jEdit.getProperty("options.general.encodingDetectors"),encodingDetectors);
+
+ // Fallback Encodings
+ fallbackEncodings = new JTextField(jEdit.getProperty(
+ "fallbackEncodings",""));
+ fallbackEncodings.setToolTipText(jEdit.getProperty(
+ "options.general.fallbackEncodings.tooltip"));
+ addComponent(jEdit.getProperty("options.general.fallbackEncodings"),fallbackEncodings);
+
+ // Encodings to display
+ encodings = getEncodings(false);
+ sort(encodings,new StandardUtilities.StringCompare<String>(true));
+ List<String> availableEncodings = new ArrayList<String>();
+ List<String> selectedEncodings = new ArrayList<String>();
+ for (String encoding : encodings)
+ {
+ boolean selected = !getBooleanProperty("encoding.opt-out."+encoding,false);
+ if (selected)
+ selectedEncodings.add(encoding);
+ else
+ availableEncodings.add(encoding);
+ }
+ pingPongList = new PingPongList<String>(availableEncodings, selectedEncodings);
+ pingPongList.setLeftTitle(getProperty("options.encodings.available"));
+ pingPongList.setRightTitle(getProperty("options.encodings.selected"));
+ pingPongList.setLeftTooltip(getProperty("options.encodings.available.tooltip"));
+ pingPongList.setRightTooltip(getProperty("options.encodings.selected.tooltip"));
+ addComponent(pingPongList,BOTH);
+
+ // Select All/None Buttons
+ Box buttonsBox = createHorizontalBox();
+ buttonsBox.add(createHorizontalStrut(12));
+
+ ActionHandler actionHandler = new ActionHandler();
+ selectAllButton = new JButton(getProperty("options.encodings.selectAll"));
+ selectAllButton.addActionListener(actionHandler);
+ selectAllButton.setEnabled(pingPongList.getLeftSize() != 0);
+ buttonsBox.add(selectAllButton);
+ buttonsBox.add(createHorizontalStrut(12));
+
+ selectNoneButton = new JButton(getProperty("options.encodings.selectNone"));
+ selectNoneButton.addActionListener(actionHandler);
+ selectNoneButton.setEnabled(pingPongList.getRightSize() != 0);
+ buttonsBox.add(selectNoneButton);
+ buttonsBox.add(createHorizontalStrut(12));
+
+ addComponent(buttonsBox);
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ jEdit.setProperty("buffer."+ JEditBuffer.ENCODING,(String)
+ defaultEncoding.getSelectedItem());
+ jEdit.setBooleanProperty("buffer.encodingAutodetect",
+ encodingAutodetect.isSelected());
+ jEdit.setProperty("encodingDetectors",encodingDetectors.getText());
+ jEdit.setProperty("fallbackEncodings",fallbackEncodings.getText());
+ Iterator<String> available = pingPongList.getLeftDataIterator();
+ while (available.hasNext())
+ {
+ String encoding = available.next();
+ setBooleanProperty("encoding.opt-out."+encoding,true);
+
+ }
+ Iterator<String> selected = pingPongList.getRightDataIterator();
+ while (selected.hasNext())
+ {
+ String encoding = selected.next();
+ unsetProperty("encoding.opt-out."+encoding);
+ }
+ } //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent ae)
+ {
+ Object source = ae.getSource();
+ if (source == selectAllButton)
+ {
+ pingPongList.moveAllToRight();
+ }
+ else if (source == selectNoneButton)
+ {
+ pingPongList.moveAllToLeft();
+ }
+ }
+ } //}}}
+ //}}}
+} //}}}
diff --git a/jEdit/org/gjt/sp/jedit/options/FirewallOptionPane.java b/jEdit/org/gjt/sp/jedit/options/FirewallOptionPane.java
index 447aabd..ed2b9b3 100644
--- a/jEdit/org/gjt/sp/jedit/options/FirewallOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/FirewallOptionPane.java
@@ -1,131 +1,131 @@
-/*
- * FirewallOptionPane.java - Firewall options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999 Dirk Moebius
- * Portions copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
- //{{{ Imports
-import java.awt.event.*;
-import javax.swing.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class FirewallOptionPane extends AbstractOptionPane {
-
- //{{{ FirewallOptionPane constructor
- public FirewallOptionPane()
- {
- super("firewall");
- } //}}}
-
- //{{{ _init() method
- public void _init()
- {
- // checkbox
- addComponent(httpEnabled = new JCheckBox(jEdit.getProperty(
- "options.firewall.http.enabled")));
- // proxy host
- addComponent(jEdit.getProperty("options.firewall.http.host"),
- httpHost = new JTextField(jEdit.getProperty("firewall.host"), 15));
- // proxy port
- addComponent(jEdit.getProperty("options.firewall.http.port"),
- httpPort = new JTextField(jEdit.getProperty("firewall.port"), 15));
- // proxy username
- addComponent(jEdit.getProperty("options.firewall.http.user"),
- httpUser = new JTextField(jEdit.getProperty("firewall.user"), 15));
- // proxy password
- addComponent(jEdit.getProperty("options.firewall.http.password"),
- httpPass = new JPasswordField(jEdit.getProperty("firewall.password"), 15));
- // no proxy for
- addComponent(jEdit.getProperty("options.firewall.http.nonProxy"),
- httpNonProxy = new JTextField(jEdit.getProperty("firewall.nonProxyHosts"), 15));
-
- boolean enabled = jEdit.getBooleanProperty("firewall.enabled");
- httpEnabled.setSelected(enabled);
- httpHost.setEnabled(enabled);
- httpPort.setEnabled(enabled);
- httpUser.setEnabled(enabled);
- httpPass.setEnabled(enabled);
- httpNonProxy.setEnabled(enabled);
-
- httpEnabled.addActionListener(new ActionHandler());
-
- // checkbox
- addComponent(socksEnabled = new JCheckBox(jEdit.getProperty(
- "options.firewall.socks.enabled")));
- // proxy host
- addComponent(jEdit.getProperty("options.firewall.socks.host"),
- socksHost = new JTextField(jEdit.getProperty("firewall.socks.host"), 15));
- // proxy port
- addComponent(jEdit.getProperty("options.firewall.socks.port"),
- socksPort = new JTextField(jEdit.getProperty("firewall.socks.port"), 15));
-
- enabled = jEdit.getBooleanProperty("firewall.socks.enabled");
- socksEnabled.setSelected(enabled);
- socksHost.setEnabled(enabled);
- socksPort.setEnabled(enabled);
-
- socksEnabled.addActionListener(new ActionHandler());
- } //}}}
-
- //{{{ _save() method
- public void _save()
- {
- jEdit.setBooleanProperty("firewall.enabled", httpEnabled.isSelected());
- jEdit.setProperty("firewall.host", httpHost.getText());
- jEdit.setProperty("firewall.port", httpPort.getText());
- jEdit.setProperty("firewall.user", httpUser.getText());
- jEdit.setProperty("firewall.password", new String(httpPass.getPassword()));
- jEdit.setProperty("firewall.nonProxyHosts", httpNonProxy.getText());
-
- jEdit.setBooleanProperty("firewall.socks.enabled", socksEnabled.isSelected());
- jEdit.setProperty("firewall.socks.host", socksHost.getText());
- jEdit.setProperty("firewall.socks.port", socksPort.getText());
- } //}}}
-
- //{{{ Private members
- private JCheckBox httpEnabled;
- private JTextField httpHost;
- private JTextField httpPort;
- private JTextField httpUser;
- private JPasswordField httpPass;
- private JTextField httpNonProxy;
- private JCheckBox socksEnabled;
- private JTextField socksHost;
- private JTextField socksPort;
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- httpHost.setEnabled(httpEnabled.isSelected());
- httpPort.setEnabled(httpEnabled.isSelected());
- httpUser.setEnabled(httpEnabled.isSelected());
- httpPass.setEnabled(httpEnabled.isSelected());
- httpNonProxy.setEnabled(httpEnabled.isSelected());
- socksHost.setEnabled(socksEnabled.isSelected());
- socksPort.setEnabled(socksEnabled.isSelected());
- }
- } //}}}
-}
+/*
+ * FirewallOptionPane.java - Firewall options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999 Dirk Moebius
+ * Portions copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+ //{{{ Imports
+import java.awt.event.*;
+import javax.swing.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class FirewallOptionPane extends AbstractOptionPane {
+
+ //{{{ FirewallOptionPane constructor
+ public FirewallOptionPane()
+ {
+ super("firewall");
+ } //}}}
+
+ //{{{ _init() method
+ public void _init()
+ {
+ // checkbox
+ addComponent(httpEnabled = new JCheckBox(jEdit.getProperty(
+ "options.firewall.http.enabled")));
+ // proxy host
+ addComponent(jEdit.getProperty("options.firewall.http.host"),
+ httpHost = new JTextField(jEdit.getProperty("firewall.host"), 15));
+ // proxy port
+ addComponent(jEdit.getProperty("options.firewall.http.port"),
+ httpPort = new JTextField(jEdit.getProperty("firewall.port"), 15));
+ // proxy username
+ addComponent(jEdit.getProperty("options.firewall.http.user"),
+ httpUser = new JTextField(jEdit.getProperty("firewall.user"), 15));
+ // proxy password
+ addComponent(jEdit.getProperty("options.firewall.http.password"),
+ httpPass = new JPasswordField(jEdit.getProperty("firewall.password"), 15));
+ // no proxy for
+ addComponent(jEdit.getProperty("options.firewall.http.nonProxy"),
+ httpNonProxy = new JTextField(jEdit.getProperty("firewall.nonProxyHosts"), 15));
+
+ boolean enabled = jEdit.getBooleanProperty("firewall.enabled");
+ httpEnabled.setSelected(enabled);
+ httpHost.setEnabled(enabled);
+ httpPort.setEnabled(enabled);
+ httpUser.setEnabled(enabled);
+ httpPass.setEnabled(enabled);
+ httpNonProxy.setEnabled(enabled);
+
+ httpEnabled.addActionListener(new ActionHandler());
+
+ // checkbox
+ addComponent(socksEnabled = new JCheckBox(jEdit.getProperty(
+ "options.firewall.socks.enabled")));
+ // proxy host
+ addComponent(jEdit.getProperty("options.firewall.socks.host"),
+ socksHost = new JTextField(jEdit.getProperty("firewall.socks.host"), 15));
+ // proxy port
+ addComponent(jEdit.getProperty("options.firewall.socks.port"),
+ socksPort = new JTextField(jEdit.getProperty("firewall.socks.port"), 15));
+
+ enabled = jEdit.getBooleanProperty("firewall.socks.enabled");
+ socksEnabled.setSelected(enabled);
+ socksHost.setEnabled(enabled);
+ socksPort.setEnabled(enabled);
+
+ socksEnabled.addActionListener(new ActionHandler());
+ } //}}}
+
+ //{{{ _save() method
+ public void _save()
+ {
+ jEdit.setBooleanProperty("firewall.enabled", httpEnabled.isSelected());
+ jEdit.setProperty("firewall.host", httpHost.getText());
+ jEdit.setProperty("firewall.port", httpPort.getText());
+ jEdit.setProperty("firewall.user", httpUser.getText());
+ jEdit.setProperty("firewall.password", new String(httpPass.getPassword()));
+ jEdit.setProperty("firewall.nonProxyHosts", httpNonProxy.getText());
+
+ jEdit.setBooleanProperty("firewall.socks.enabled", socksEnabled.isSelected());
+ jEdit.setProperty("firewall.socks.host", socksHost.getText());
+ jEdit.setProperty("firewall.socks.port", socksPort.getText());
+ } //}}}
+
+ //{{{ Private members
+ private JCheckBox httpEnabled;
+ private JTextField httpHost;
+ private JTextField httpPort;
+ private JTextField httpUser;
+ private JPasswordField httpPass;
+ private JTextField httpNonProxy;
+ private JCheckBox socksEnabled;
+ private JTextField socksHost;
+ private JTextField socksPort;
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ httpHost.setEnabled(httpEnabled.isSelected());
+ httpPort.setEnabled(httpEnabled.isSelected());
+ httpUser.setEnabled(httpEnabled.isSelected());
+ httpPass.setEnabled(httpEnabled.isSelected());
+ httpNonProxy.setEnabled(httpEnabled.isSelected());
+ socksHost.setEnabled(socksEnabled.isSelected());
+ socksPort.setEnabled(socksEnabled.isSelected());
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/GeneralOptionPane.java b/jEdit/org/gjt/sp/jedit/options/GeneralOptionPane.java
index bb4fa35..9efd7b9 100644
--- a/jEdit/org/gjt/sp/jedit/options/GeneralOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/GeneralOptionPane.java
@@ -1,260 +1,260 @@
-/*
- * GeneralOptionPane.java - General options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-
-import org.gjt.sp.jedit.AbstractOptionPane;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.util.Log;
-
-import javax.swing.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-//}}}
-
-/**
- * jEdit's General Options Pane
- */
-
-public class GeneralOptionPane extends AbstractOptionPane
-{
- //{{{ checkFileStatus options
- // Check the buffer status when the view got the focus
- public static final int checkFileStatus_focus = 0;
- // Check the file status when the view got the status
- // or when saving or visiting the buffer
- public static final int checkFileStatus_all = 1;
- // Check the file status when visiting or saving <b>any</b> buffer
- public static final int checkFileStatus_operations = 2;
- // Check the file status when visiting or saving the buffer
- public static final int checkFileStatus_focusBuffer = 3;
- // Check the file status when saving the buffer
- public static final int checkFileStatus_none = 4;
- //}}}
-
- //{{{ Private members
- private JComboBox lineSeparator;
- private JComboBox checkModStatus;
- private JComboBox checkModStatusUpon;
- private JTextField recentFiles;
- private JTextField hypersearchResultsWarning;
- private JCheckBox saveCaret;
- private JCheckBox sortRecent;
- private JCheckBox persistentMarkers;
- private JCheckBox restore;
- private JCheckBox restoreRemote;
- private JCheckBox restoreCLI;
- //}}}
-
- //{{{ GeneralOptionPane constructor
- public GeneralOptionPane()
- {
- super("general");
- } //}}}
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
-
- /* Line separator */
- String[] lineSeps = { jEdit.getProperty("lineSep.unix"),
- jEdit.getProperty("lineSep.windows"),
- jEdit.getProperty("lineSep.mac") };
- lineSeparator = new JComboBox(lineSeps);
- String lineSep = jEdit.getProperty("buffer."+ JEditBuffer.LINESEP,
- System.getProperty("line.separator"));
- if("\n".equals(lineSep))
- lineSeparator.setSelectedIndex(0);
- else if("\r\n".equals(lineSep))
- lineSeparator.setSelectedIndex(1);
- else if("\r".equals(lineSep))
- lineSeparator.setSelectedIndex(2);
- addComponent(jEdit.getProperty("options.general.lineSeparator"),
- lineSeparator);
-
-
- /* Check mod status */
- String[] modCheckOptions = {
- jEdit.getProperty("options.general.checkModStatus.nothing"),
- jEdit.getProperty("options.general.checkModStatus.prompt"),
- jEdit.getProperty("options.general.checkModStatus.reload"),
- jEdit.getProperty("options.general.checkModStatus.silentReload")
- };
- checkModStatus = new JComboBox(modCheckOptions);
- if(jEdit.getBooleanProperty("autoReload"))
- {
- if (jEdit.getBooleanProperty("autoReloadDialog"))
- // reload and notify
- checkModStatus.setSelectedIndex(2);
- else // reload silently
- checkModStatus.setSelectedIndex(3);
- }
- else
- {
- if (jEdit.getBooleanProperty("autoReloadDialog"))
- // prompt
- checkModStatus.setSelectedIndex(1);
- else // do nothing
- checkModStatus.setSelectedIndex(0);
- }
- addComponent(jEdit.getProperty("options.general.checkModStatus"),
- checkModStatus);
-
- /* Check mod status upon */
- String[] modCheckUponOptions = {
- jEdit.getProperty("options.general.checkModStatusUpon.focus"),
- jEdit.getProperty("options.general.checkModStatusUpon.all"),
- jEdit.getProperty("options.general.checkModStatusUpon.operations"),
- jEdit.getProperty("options.general.checkModStatusUpon.focusBuffer"),
- jEdit.getProperty("options.general.checkModStatusUpon.none")
- };
- checkModStatusUpon = new JComboBox(modCheckUponOptions);
- checkModStatusUpon.setSelectedIndex(jEdit.getIntegerProperty("checkFileStatus"));
- addComponent(jEdit.getProperty("options.general.checkModStatusUpon"),
- checkModStatusUpon);
-
- /* Recent file list size */
- recentFiles = new JTextField(jEdit.getProperty(
- "options.general.recentFiles"));
- recentFiles.setText(jEdit.getProperty("recentFiles"));
- addComponent(jEdit.getProperty("options.general.recentFiles"),
- recentFiles);
-
- /* Sort recent file list */
- sortRecent = new JCheckBox(jEdit.getProperty(
- "options.general.sortRecent"));
- sortRecent.setSelected(jEdit.getBooleanProperty("sortRecent"));
- addComponent(sortRecent);
-
- /* Save caret positions */
- saveCaret = new JCheckBox(jEdit.getProperty(
- "options.general.saveCaret"));
- saveCaret.setSelected(jEdit.getBooleanProperty("saveCaret"));
- addComponent(saveCaret);
-
- /* Persistent markers */
- persistentMarkers = new JCheckBox(jEdit.getProperty(
- "options.general.persistentMarkers"));
- persistentMarkers.setSelected(jEdit.getBooleanProperty(
- "persistentMarkers"));
- addComponent(persistentMarkers);
-
- /* Session management */
- restore = new JCheckBox(jEdit.getProperty(
- "options.general.restore"));
-
- restore.setSelected(jEdit.getBooleanProperty("restore"));
- restore.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- restoreCLI.setEnabled(restore.isSelected());
- restoreRemote.setEnabled(restore.isSelected());
- }
- });
-
- addComponent(restore);
-
- restoreRemote = new JCheckBox(jEdit.getProperty(
- "options.general.restore.remote"));
- restoreRemote.setSelected(jEdit.getBooleanProperty("restore.remote", false));
- restoreRemote.setEnabled(restore.isSelected());
- addComponent(restoreRemote);
-
- restoreCLI = new JCheckBox(jEdit.getProperty(
- "options.general.restore.cli"));
- restoreCLI.setSelected(jEdit.getBooleanProperty("restore.cli"));
- restoreCLI.setEnabled(restore.isSelected());
- addComponent(restoreCLI);
-
-
- hypersearchResultsWarning = new JTextField(jEdit.getProperty("hypersearch.maxWarningResults"));
- addComponent(jEdit.getProperty("options.general.hypersearch.maxWarningResults"),
- hypersearchResultsWarning);
-
-
-
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
-
- String lineSep = null;
- switch(lineSeparator.getSelectedIndex())
- {
- case 0:
- lineSep = "\n";
- break;
- case 1:
- lineSep = "\r\n";
- break;
- case 2:
- lineSep = "\r";
- break;
- }
- jEdit.setProperty("buffer."+ JEditBuffer.LINESEP,lineSep);
- switch(checkModStatus.getSelectedIndex())
- {
- case 0:
- jEdit.setBooleanProperty("autoReloadDialog",false);
- jEdit.setBooleanProperty("autoReload",false);
- break;
- case 1:
- jEdit.setBooleanProperty("autoReloadDialog",true);
- jEdit.setBooleanProperty("autoReload",false);
- break;
- case 2:
- jEdit.setBooleanProperty("autoReloadDialog",true);
- jEdit.setBooleanProperty("autoReload",true);
- break;
- case 3:
- jEdit.setBooleanProperty("autoReloadDialog",false);
- jEdit.setBooleanProperty("autoReload",true);
- break;
- }
- jEdit.setIntegerProperty("checkFileStatus",checkModStatusUpon.getSelectedIndex());
- jEdit.setProperty("recentFiles",recentFiles.getText());
- jEdit.setBooleanProperty("sortRecent",sortRecent.isSelected());
- jEdit.setBooleanProperty("saveCaret",saveCaret.isSelected());
- jEdit.setBooleanProperty("persistentMarkers",
- persistentMarkers.isSelected());
- jEdit.setBooleanProperty("restore",restore.isSelected());
- jEdit.setBooleanProperty("restore.cli",restoreCLI.isSelected());
- jEdit.setBooleanProperty("restore.remote", restoreRemote.isSelected());
- try
- {
- jEdit.setIntegerProperty("hypersearch.maxWarningResults", Integer.parseInt(hypersearchResultsWarning.getText()));
- }
- catch (NumberFormatException e)
- {
- Log.log(Log.WARNING, this, "hypersearchResultsWarning: " + hypersearchResultsWarning.getText() + " is not a valid value for this option");
- }
- } //}}}
-
-
-}
+/*
+ * GeneralOptionPane.java - General options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+
+import org.gjt.sp.jedit.AbstractOptionPane;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.Log;
+
+import javax.swing.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+//}}}
+
+/**
+ * jEdit's General Options Pane
+ */
+
+public class GeneralOptionPane extends AbstractOptionPane
+{
+ //{{{ checkFileStatus options
+ // Check the buffer status when the view got the focus
+ public static final int checkFileStatus_focus = 0;
+ // Check the file status when the view got the status
+ // or when saving or visiting the buffer
+ public static final int checkFileStatus_all = 1;
+ // Check the file status when visiting or saving <b>any</b> buffer
+ public static final int checkFileStatus_operations = 2;
+ // Check the file status when visiting or saving the buffer
+ public static final int checkFileStatus_focusBuffer = 3;
+ // Check the file status when saving the buffer
+ public static final int checkFileStatus_none = 4;
+ //}}}
+
+ //{{{ Private members
+ private JComboBox lineSeparator;
+ private JComboBox checkModStatus;
+ private JComboBox checkModStatusUpon;
+ private JTextField recentFiles;
+ private JTextField hypersearchResultsWarning;
+ private JCheckBox saveCaret;
+ private JCheckBox sortRecent;
+ private JCheckBox persistentMarkers;
+ private JCheckBox restore;
+ private JCheckBox restoreRemote;
+ private JCheckBox restoreCLI;
+ //}}}
+
+ //{{{ GeneralOptionPane constructor
+ public GeneralOptionPane()
+ {
+ super("general");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+
+ /* Line separator */
+ String[] lineSeps = { jEdit.getProperty("lineSep.unix"),
+ jEdit.getProperty("lineSep.windows"),
+ jEdit.getProperty("lineSep.mac") };
+ lineSeparator = new JComboBox(lineSeps);
+ String lineSep = jEdit.getProperty("buffer."+ JEditBuffer.LINESEP,
+ System.getProperty("line.separator"));
+ if("\n".equals(lineSep))
+ lineSeparator.setSelectedIndex(0);
+ else if("\r\n".equals(lineSep))
+ lineSeparator.setSelectedIndex(1);
+ else if("\r".equals(lineSep))
+ lineSeparator.setSelectedIndex(2);
+ addComponent(jEdit.getProperty("options.general.lineSeparator"),
+ lineSeparator);
+
+
+ /* Check mod status */
+ String[] modCheckOptions = {
+ jEdit.getProperty("options.general.checkModStatus.nothing"),
+ jEdit.getProperty("options.general.checkModStatus.prompt"),
+ jEdit.getProperty("options.general.checkModStatus.reload"),
+ jEdit.getProperty("options.general.checkModStatus.silentReload")
+ };
+ checkModStatus = new JComboBox(modCheckOptions);
+ if(jEdit.getBooleanProperty("autoReload"))
+ {
+ if (jEdit.getBooleanProperty("autoReloadDialog"))
+ // reload and notify
+ checkModStatus.setSelectedIndex(2);
+ else // reload silently
+ checkModStatus.setSelectedIndex(3);
+ }
+ else
+ {
+ if (jEdit.getBooleanProperty("autoReloadDialog"))
+ // prompt
+ checkModStatus.setSelectedIndex(1);
+ else // do nothing
+ checkModStatus.setSelectedIndex(0);
+ }
+ addComponent(jEdit.getProperty("options.general.checkModStatus"),
+ checkModStatus);
+
+ /* Check mod status upon */
+ String[] modCheckUponOptions = {
+ jEdit.getProperty("options.general.checkModStatusUpon.focus"),
+ jEdit.getProperty("options.general.checkModStatusUpon.all"),
+ jEdit.getProperty("options.general.checkModStatusUpon.operations"),
+ jEdit.getProperty("options.general.checkModStatusUpon.focusBuffer"),
+ jEdit.getProperty("options.general.checkModStatusUpon.none")
+ };
+ checkModStatusUpon = new JComboBox(modCheckUponOptions);
+ checkModStatusUpon.setSelectedIndex(jEdit.getIntegerProperty("checkFileStatus"));
+ addComponent(jEdit.getProperty("options.general.checkModStatusUpon"),
+ checkModStatusUpon);
+
+ /* Recent file list size */
+ recentFiles = new JTextField(jEdit.getProperty(
+ "options.general.recentFiles"));
+ recentFiles.setText(jEdit.getProperty("recentFiles"));
+ addComponent(jEdit.getProperty("options.general.recentFiles"),
+ recentFiles);
+
+ /* Sort recent file list */
+ sortRecent = new JCheckBox(jEdit.getProperty(
+ "options.general.sortRecent"));
+ sortRecent.setSelected(jEdit.getBooleanProperty("sortRecent"));
+ addComponent(sortRecent);
+
+ /* Save caret positions */
+ saveCaret = new JCheckBox(jEdit.getProperty(
+ "options.general.saveCaret"));
+ saveCaret.setSelected(jEdit.getBooleanProperty("saveCaret"));
+ addComponent(saveCaret);
+
+ /* Persistent markers */
+ persistentMarkers = new JCheckBox(jEdit.getProperty(
+ "options.general.persistentMarkers"));
+ persistentMarkers.setSelected(jEdit.getBooleanProperty(
+ "persistentMarkers"));
+ addComponent(persistentMarkers);
+
+ /* Session management */
+ restore = new JCheckBox(jEdit.getProperty(
+ "options.general.restore"));
+
+ restore.setSelected(jEdit.getBooleanProperty("restore"));
+ restore.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ restoreCLI.setEnabled(restore.isSelected());
+ restoreRemote.setEnabled(restore.isSelected());
+ }
+ });
+
+ addComponent(restore);
+
+ restoreRemote = new JCheckBox(jEdit.getProperty(
+ "options.general.restore.remote"));
+ restoreRemote.setSelected(jEdit.getBooleanProperty("restore.remote", false));
+ restoreRemote.setEnabled(restore.isSelected());
+ addComponent(restoreRemote);
+
+ restoreCLI = new JCheckBox(jEdit.getProperty(
+ "options.general.restore.cli"));
+ restoreCLI.setSelected(jEdit.getBooleanProperty("restore.cli"));
+ restoreCLI.setEnabled(restore.isSelected());
+ addComponent(restoreCLI);
+
+
+ hypersearchResultsWarning = new JTextField(jEdit.getProperty("hypersearch.maxWarningResults"));
+ addComponent(jEdit.getProperty("options.general.hypersearch.maxWarningResults"),
+ hypersearchResultsWarning);
+
+
+
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+
+ String lineSep = null;
+ switch(lineSeparator.getSelectedIndex())
+ {
+ case 0:
+ lineSep = "\n";
+ break;
+ case 1:
+ lineSep = "\r\n";
+ break;
+ case 2:
+ lineSep = "\r";
+ break;
+ }
+ jEdit.setProperty("buffer."+ JEditBuffer.LINESEP,lineSep);
+ switch(checkModStatus.getSelectedIndex())
+ {
+ case 0:
+ jEdit.setBooleanProperty("autoReloadDialog",false);
+ jEdit.setBooleanProperty("autoReload",false);
+ break;
+ case 1:
+ jEdit.setBooleanProperty("autoReloadDialog",true);
+ jEdit.setBooleanProperty("autoReload",false);
+ break;
+ case 2:
+ jEdit.setBooleanProperty("autoReloadDialog",true);
+ jEdit.setBooleanProperty("autoReload",true);
+ break;
+ case 3:
+ jEdit.setBooleanProperty("autoReloadDialog",false);
+ jEdit.setBooleanProperty("autoReload",true);
+ break;
+ }
+ jEdit.setIntegerProperty("checkFileStatus",checkModStatusUpon.getSelectedIndex());
+ jEdit.setProperty("recentFiles",recentFiles.getText());
+ jEdit.setBooleanProperty("sortRecent",sortRecent.isSelected());
+ jEdit.setBooleanProperty("saveCaret",saveCaret.isSelected());
+ jEdit.setBooleanProperty("persistentMarkers",
+ persistentMarkers.isSelected());
+ jEdit.setBooleanProperty("restore",restore.isSelected());
+ jEdit.setBooleanProperty("restore.cli",restoreCLI.isSelected());
+ jEdit.setBooleanProperty("restore.remote", restoreRemote.isSelected());
+ try
+ {
+ jEdit.setIntegerProperty("hypersearch.maxWarningResults", Integer.parseInt(hypersearchResultsWarning.getText()));
+ }
+ catch (NumberFormatException e)
+ {
+ Log.log(Log.WARNING, this, "hypersearchResultsWarning: " + hypersearchResultsWarning.getText() + " is not a valid value for this option");
+ }
+ } //}}}
+
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/GlobalOptions.java b/jEdit/org/gjt/sp/jedit/options/GlobalOptions.java
index d171671..77fa6c2 100644
--- a/jEdit/org/gjt/sp/jedit/options/GlobalOptions.java
+++ b/jEdit/org/gjt/sp/jedit/options/GlobalOptions.java
@@ -1,122 +1,122 @@
-/*
- * GlobalOptions.java - Global options dialog
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import java.awt.Dialog;
-import java.awt.Frame;
-import org.gjt.sp.jedit.gui.OptionsDialog;
-import org.gjt.sp.jedit.msg.PropertiesChanging;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class GlobalOptions extends OptionsDialog
-{
- //{{{ GlobalOptions constructor
- public GlobalOptions(Frame frame)
- {
- super(frame,"options",jEdit.getProperty("options.last"));
- } //}}}
-
- //{{{ GlobalOptions constructor
- public GlobalOptions(Frame frame, String pane)
- {
- super(frame,"options",pane);
- } //}}}
-
- //{{{ GlobalOptions constructor
- public GlobalOptions(Dialog dialog)
- {
- super(dialog,"options",jEdit.getProperty("options.last"));
- } //}}}
-
- //{{{ GlobalOptions constructor
- public GlobalOptions(Dialog dialog, String pane)
- {
- super(dialog,"options",pane);
- } //}}}
-
- //{{{ createOptionTreeModel() method
- protected OptionTreeModel createOptionTreeModel()
- {
- OptionTreeModel paneTreeModel = new OptionTreeModel();
- OptionGroup rootGroup = (OptionGroup) paneTreeModel.getRoot();
-
- // initialize the jEdit branch of the options tree
- OptionGroup jEditGroup = new OptionGroup("jedit");
-
- jEditGroup.addOptionPane("general");
- jEditGroup.addOptionPane("abbrevs");
- jEditGroup.addOptionPane("appearance");
- jEditGroup.addOptionPane("context");
- jEditGroup.addOptionPane("docking");
- jEditGroup.addOptionPane("editing");
- jEditGroup.addOptionPane("encodings");
- jEditGroup.addOptionPane("gutter");
- jEditGroup.addOptionPane("mouse");
- jEditGroup.addOptionPane("plugin-manager");
- jEditGroup.addOptionPane("print");
- jEditGroup.addOptionPane("firewall");
- jEditGroup.addOptionPane("save-back");
- jEditGroup.addOptionPane("shortcuts");
- jEditGroup.addOptionPane("status");
- jEditGroup.addOptionPane("syntax");
- jEditGroup.addOptionPane("textarea");
- jEditGroup.addOptionPane("toolbar");
- jEditGroup.addOptionPane("view");
- rootGroup.addOptionGroup(jEditGroup);
-
- OptionGroup browserGroup = new OptionGroup("browser");
- browserGroup.addOptionPane("browser.general");
- browserGroup.addOptionPane("browser.colors");
- rootGroup.addOptionGroup(browserGroup);
-
- return paneTreeModel;
- } //}}}
-
- //{{{ cancel() method
- @Override
- public void cancel()
- {
- EditBus.send(
- new PropertiesChanging(null,
- PropertiesChanging.State.CANCELED));
- super.cancel();
- } //}}}
-
- //{{{ init() method
- @Override
- protected void init(String name, String pane)
- {
- EditBus.send(
- new PropertiesChanging(null,
- PropertiesChanging.State.LOADING));
- super.init(name, pane);
- } //}}}
-
- //{{{ getDefaultGroup() method
- protected OptionGroup getDefaultGroup()
- {
- return null;
- } //}}}
-}
+/*
+ * GlobalOptions.java - Global options dialog
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import java.awt.Dialog;
+import java.awt.Frame;
+import org.gjt.sp.jedit.gui.OptionsDialog;
+import org.gjt.sp.jedit.msg.PropertiesChanging;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class GlobalOptions extends OptionsDialog
+{
+ //{{{ GlobalOptions constructor
+ public GlobalOptions(Frame frame)
+ {
+ super(frame,"options",jEdit.getProperty("options.last"));
+ } //}}}
+
+ //{{{ GlobalOptions constructor
+ public GlobalOptions(Frame frame, String pane)
+ {
+ super(frame,"options",pane);
+ } //}}}
+
+ //{{{ GlobalOptions constructor
+ public GlobalOptions(Dialog dialog)
+ {
+ super(dialog,"options",jEdit.getProperty("options.last"));
+ } //}}}
+
+ //{{{ GlobalOptions constructor
+ public GlobalOptions(Dialog dialog, String pane)
+ {
+ super(dialog,"options",pane);
+ } //}}}
+
+ //{{{ createOptionTreeModel() method
+ protected OptionTreeModel createOptionTreeModel()
+ {
+ OptionTreeModel paneTreeModel = new OptionTreeModel();
+ OptionGroup rootGroup = (OptionGroup) paneTreeModel.getRoot();
+
+ // initialize the jEdit branch of the options tree
+ OptionGroup jEditGroup = new OptionGroup("jedit");
+
+ jEditGroup.addOptionPane("general");
+ jEditGroup.addOptionPane("abbrevs");
+ jEditGroup.addOptionPane("appearance");
+ jEditGroup.addOptionPane("context");
+ jEditGroup.addOptionPane("docking");
+ jEditGroup.addOptionPane("editing");
+ jEditGroup.addOptionPane("encodings");
+ jEditGroup.addOptionPane("gutter");
+ jEditGroup.addOptionPane("mouse");
+ jEditGroup.addOptionPane("plugin-manager");
+ jEditGroup.addOptionPane("print");
+ jEditGroup.addOptionPane("firewall");
+ jEditGroup.addOptionPane("save-back");
+ jEditGroup.addOptionPane("shortcuts");
+ jEditGroup.addOptionPane("status");
+ jEditGroup.addOptionPane("syntax");
+ jEditGroup.addOptionPane("textarea");
+ jEditGroup.addOptionPane("toolbar");
+ jEditGroup.addOptionPane("view");
+ rootGroup.addOptionGroup(jEditGroup);
+
+ OptionGroup browserGroup = new OptionGroup("browser");
+ browserGroup.addOptionPane("browser.general");
+ browserGroup.addOptionPane("browser.colors");
+ rootGroup.addOptionGroup(browserGroup);
+
+ return paneTreeModel;
+ } //}}}
+
+ //{{{ cancel() method
+ @Override
+ public void cancel()
+ {
+ EditBus.send(
+ new PropertiesChanging(null,
+ PropertiesChanging.State.CANCELED));
+ super.cancel();
+ } //}}}
+
+ //{{{ init() method
+ @Override
+ protected void init(String name, String pane)
+ {
+ EditBus.send(
+ new PropertiesChanging(null,
+ PropertiesChanging.State.LOADING));
+ super.init(name, pane);
+ } //}}}
+
+ //{{{ getDefaultGroup() method
+ protected OptionGroup getDefaultGroup()
+ {
+ return null;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/GutterOptionPane.java b/jEdit/org/gjt/sp/jedit/options/GutterOptionPane.java
index b69eff5..74a90a8 100644
--- a/jEdit/org/gjt/sp/jedit/options/GutterOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/GutterOptionPane.java
@@ -1,412 +1,412 @@
-/*
- * GutterOptionPane.java - Gutter options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000 mike dillon
- * Portions copyright (C) 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-
-import java.awt.*;
-
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-import org.gjt.sp.jedit.*;
-//}}}
-import org.gjt.sp.util.SyntaxUtilities;
-
-public class GutterOptionPane extends AbstractOptionPane
-{
- //{{{ GutterOptionPane constructor
- public GutterOptionPane()
- {
- super("gutter");
- } //}}}
-
- //{{{ _init() method
- public void _init()
- {
- /* Gutter enable */
- gutterEnabled = new JCheckBox(jEdit.getProperty(
- "options.gutter.enabled"));
- gutterEnabled.setSelected(isGutterEnabled());
- addComponent(gutterEnabled);
-
- /* Gutter components frame */
- GridBagConstraints cons = new GridBagConstraints();
- cons.gridheight = 1;
- cons.gridwidth = GridBagConstraints.REMAINDER;
- cons.fill = GridBagConstraints.HORIZONTAL;
- cons.anchor = GridBagConstraints.WEST;
- cons.weightx = 1.0f;
- cons.ipadx = 0;
- cons.ipady = 0;
- cons.insets = new Insets(0,0,0,0);
- gutterComponents = new JPanel(new GridBagLayout());
- gutterComponents.setBorder(BorderFactory.createTitledBorder(
- jEdit.getProperty("options.gutter.optionalComponents")));
-
- /* Line numbering */
- lineNumbersEnabled = new JCheckBox(jEdit.getProperty(
- "options.gutter.lineNumbers"));
- lineNumbersEnabled.setSelected(jEdit.getBooleanProperty(
- "view.gutter.lineNumbers"));
- gutterComponents.add(lineNumbersEnabled, cons);
-
- InputVerifier integerInputVerifier = new InputVerifier()
- {
- @Override
- public boolean verify(JComponent input)
- {
- if (! (input instanceof JTextField))
- return true;
- JTextField tf = (JTextField) input;
- int i;
- try
- {
- i = Integer.valueOf(tf.getText()).intValue();
- }
- catch (Exception e)
- {
- return false;
- }
- return (i >= 0);
- }
- };
- minLineNumberDigits = new JTextField(String.valueOf(
- getMinLineNumberDigits()),1);
- minLineNumberDigits.setInputVerifier(integerInputVerifier);
- JPanel minLineNumberDigitsPanel = new JPanel();
- minLineNumberDigitsPanel.add(new JLabel(
- jEdit.getProperty("options.gutter.minLineNumberDigits")));
- minLineNumberDigitsPanel.add(minLineNumberDigits);
- cons.gridy = 1;
- gutterComponents.add(minLineNumberDigitsPanel, cons);
-
- /* Selection area enable */
- selectionAreaEnabled = new JCheckBox(jEdit.getProperty(
- "options.gutter.selectionAreaEnabled"));
- selectionAreaEnabled.setSelected(isSelectionAreaEnabled());
- cons.gridy = 2;
- gutterComponents.add(selectionAreaEnabled, cons);
-
- addComponent(gutterComponents);
- // Disable gutter components when 'show gutter' is unchecked
- setGutterComponentsEnabledState();
- gutterEnabled.addChangeListener(new ChangeListener()
- {
- public void stateChanged(ChangeEvent e)
- {
- setGutterComponentsEnabledState();
- }
- });
-
- /* Selection area background color */
- addComponent(jEdit.getProperty("options.gutter.selectionAreaBgColor"),
- selectionAreaBgColor = new ColorWellButton(
- getSelectionAreaBackground()), GridBagConstraints.VERTICAL);
-
- /* Selection area width */
- selectionAreaWidth = new JTextField(String.valueOf(
- getSelectionAreaWidth()),DEFAULT_SELECTION_GUTTER_WIDTH);
- selectionAreaWidth.setInputVerifier(integerInputVerifier);
- addComponent(jEdit.getProperty("options.gutter.selectionAreaWidth"),
- selectionAreaWidth);
-
- /* Text font */
- gutterFont = new FontSelector(
- jEdit.getFontProperty("view.gutter.font",
- new Font("Monospaced",Font.PLAIN,10)));
-
- addComponent(jEdit.getProperty("options.gutter.font"),gutterFont);
-
- /* Text color */
- addComponent(jEdit.getProperty("options.gutter.foreground"),
- gutterForeground = new ColorWellButton(
- jEdit.getColorProperty("view.gutter.fgColor")),
- GridBagConstraints.VERTICAL);
-
- /* Background color */
- addComponent(jEdit.getProperty("options.gutter.background"),
- gutterBackground = new ColorWellButton(
- jEdit.getColorProperty("view.gutter.bgColor")),
- GridBagConstraints.VERTICAL);
-
- /* Border width */
- /* gutterBorderWidth = new JTextField(jEdit.getProperty(
- "view.gutter.borderWidth"));
- addComponent(jEdit.getProperty("options.gutter.borderWidth"),
- gutterBorderWidth); */
-
- /* Number alignment */
- /* String[] alignments = new String[] {
- "Left", "Center", "Right"
- };
- gutterNumberAlignment = new JComboBox(alignments);
- String alignment = jEdit.getProperty("view.gutter.numberAlignment");
- if("right".equals(alignment))
- gutterNumberAlignment.setSelectedIndex(2);
- else if("center".equals(alignment))
- gutterNumberAlignment.setSelectedIndex(1);
- else
- gutterNumberAlignment.setSelectedIndex(0);
- addComponent(jEdit.getProperty("options.gutter.numberAlignment"),
- gutterNumberAlignment); */
-
- /* Current line highlight */
- gutterCurrentLineHighlightEnabled = new JCheckBox(jEdit.getProperty(
- "options.gutter.currentLineHighlight"));
- gutterCurrentLineHighlightEnabled.setSelected(jEdit.getBooleanProperty(
- "view.gutter.highlightCurrentLine"));
- addComponent(gutterCurrentLineHighlightEnabled,
- gutterCurrentLineHighlight = new ColorWellButton(
- jEdit.getColorProperty("view.gutter.currentLineColor")),
- GridBagConstraints.VERTICAL);
-
- /* Highlight interval and color */
- gutterHighlightInterval = new JTextField(jEdit.getProperty(
- "view.gutter.highlightInterval"),3);
-
- Box gutterHighlightBox = new Box(BoxLayout.X_AXIS);
- gutterHighlightBox.add(new JLabel(jEdit.getProperty(
- "options.gutter.interval-1")));
- gutterHighlightBox.add(Box.createHorizontalStrut(3));
- gutterHighlightBox.add(gutterHighlightInterval);
- gutterHighlightBox.add(Box.createHorizontalStrut(3));
- gutterHighlightBox.add(new JLabel(jEdit.getProperty(
- "options.gutter.interval-2")));
- gutterHighlightBox.add(Box.createHorizontalStrut(12));
-
- addComponent(gutterHighlightBox,gutterHighlightColor
- = new ColorWellButton(jEdit.getColorProperty(
- "view.gutter.highlightColor")),
- GridBagConstraints.VERTICAL);
-
- /* Structure highlight */
- gutterStructureHighlightEnabled = new JCheckBox(jEdit.getProperty(
- "options.gutter.structureHighlight"));
- gutterStructureHighlightEnabled.setSelected(jEdit.getBooleanProperty(
- "view.gutter.structureHighlight"));
- addComponent(gutterStructureHighlightEnabled,
- gutterStructureHighlight = new ColorWellButton(
- jEdit.getColorProperty("view.gutter.structureHighlightColor")),
- GridBagConstraints.VERTICAL);
-
- /* Marker highlight */
- gutterMarkerHighlightEnabled = new JCheckBox(jEdit.getProperty(
- "options.gutter.markerHighlight"));
- gutterMarkerHighlightEnabled.setSelected(jEdit.getBooleanProperty(
- "view.gutter.markerHighlight"));
- addComponent(gutterMarkerHighlightEnabled,
- gutterMarkerHighlight = new ColorWellButton(
- jEdit.getColorProperty("view.gutter.markerColor")),
- GridBagConstraints.VERTICAL);
-
- /* Fold marker color */
- addComponent(jEdit.getProperty("options.gutter.foldColor"),
- gutterFoldMarkers = new ColorWellButton(
- jEdit.getColorProperty("view.gutter.foldColor")),
- GridBagConstraints.VERTICAL);
-
- /* Focused border color */
- addComponent(jEdit.getProperty("options.gutter.focusBorderColor"),
- gutterFocusBorder = new ColorWellButton(
- jEdit.getColorProperty("view.gutter.focusBorderColor")),
- GridBagConstraints.VERTICAL);
-
- /* unfocused border color */
- addComponent(jEdit.getProperty("options.gutter.noFocusBorderColor"),
- gutterNoFocusBorder = new ColorWellButton(
- jEdit.getColorProperty("view.gutter.noFocusBorderColor")),
- GridBagConstraints.VERTICAL);
-
- addFoldStyleChooser();
- } //}}}
-
- //{{{ _save() method
- public void _save()
- {
- jEdit.setBooleanProperty("view.gutter.lineNumbers", lineNumbersEnabled
- .isSelected());
- jEdit.setIntegerProperty("view.gutter.minDigitCount",
- Integer.valueOf(minLineNumberDigits.getText()));
-
- jEdit.setFontProperty("view.gutter.font",gutterFont.getFont());
- jEdit.setColorProperty("view.gutter.fgColor",gutterForeground
- .getSelectedColor());
- jEdit.setColorProperty("view.gutter.bgColor",gutterBackground
- .getSelectedColor());
-
- /* jEdit.setProperty("view.gutter.borderWidth",
- gutterBorderWidth.getText());
-
- String alignment = null;
- switch(gutterNumberAlignment.getSelectedIndex())
- {
- case 2:
- alignment = "right";
- break;
- case 1:
- alignment = "center";
- break;
- case 0: default:
- alignment = "left";
- }
- jEdit.setProperty("view.gutter.numberAlignment", alignment); */
-
- jEdit.setBooleanProperty("view.gutter.highlightCurrentLine",
- gutterCurrentLineHighlightEnabled.isSelected());
- jEdit.setColorProperty("view.gutter.currentLineColor",
- gutterCurrentLineHighlight.getSelectedColor());
- jEdit.setProperty("view.gutter.highlightInterval",
- gutterHighlightInterval.getText());
- jEdit.setColorProperty("view.gutter.highlightColor",
- gutterHighlightColor.getSelectedColor());
-
- jEdit.setBooleanProperty("view.gutter.structureHighlight",
- gutterStructureHighlightEnabled.isSelected());
- jEdit.setColorProperty("view.gutter.structureHighlightColor",
- gutterStructureHighlight.getSelectedColor());
- jEdit.setBooleanProperty("view.gutter.markerHighlight",
- gutterMarkerHighlightEnabled.isSelected());
- jEdit.setColorProperty("view.gutter.markerColor",
- gutterMarkerHighlight.getSelectedColor());
- jEdit.setColorProperty("view.gutter.foldColor",
- gutterFoldMarkers.getSelectedColor());
- jEdit.setProperty(JEditTextArea.FOLD_PAINTER_PROPERTY,
- painters[foldPainter.getSelectedIndex()]);
- jEdit.setColorProperty("view.gutter.focusBorderColor",
- gutterFocusBorder.getSelectedColor());
- jEdit.setColorProperty("view.gutter.noFocusBorderColor",
- gutterNoFocusBorder.getSelectedColor());
- jEdit.setBooleanProperty(GUTTER_ENABLED_PROPERTY,
- gutterEnabled.isSelected());
- jEdit.setBooleanProperty(SELECTION_AREA_ENABLED_PROPERTY,
- selectionAreaEnabled.isSelected());
- jEdit.setColorProperty(SELECTION_AREA_BGCOLOR_PROPERTY,
- selectionAreaBgColor.getSelectedColor());
- jEdit.setIntegerProperty("view.gutter.selectionAreaWidth",
- Integer.valueOf(selectionAreaWidth.getText()));
- } //}}}
-
- //{{{ setGutterComponentsEnabledState
- private void setGutterComponentsEnabledState()
- {
- GUIUtilities.setEnabledRecursively(gutterComponents,
- gutterEnabled.isSelected());
- } //}}}
-
- //{{{ addFoldStyleChooser() method
- private void addFoldStyleChooser()
- {
- painters = ServiceManager.getServiceNames(JEditTextArea.FOLD_PAINTER_SERVICE);
- foldPainter = new JComboBox();
- String current = JEditTextArea.getFoldPainterName();
- int selected = 0;
- for (int i = 0; i < painters.length; i++)
- {
- String painter = painters[i];
- foldPainter.addItem(jEdit.getProperty(
- "options.gutter.foldStyleNames." + painter, painter));
- if (painter.equals(current))
- selected = i;
- }
- foldPainter.setSelectedIndex(selected);
- addComponent(new JLabel(jEdit.getProperty("options.gutter.foldStyle.label")), foldPainter);
- } //}}}
-
- //{{{ isGutterEnabled() method
- public static boolean isGutterEnabled()
- {
- return jEdit.getBooleanProperty(GUTTER_ENABLED_PROPERTY);
- } //}}}
-
- //{{{ getMinLineNumberDigits() method
- public static int getMinLineNumberDigits()
- {
- int n = jEdit.getIntegerProperty("view.gutter.minDigitCount", 2);
- if (n < 0)
- n = 2;
- return n;
- } //}}}
-
- //{{{ isSelectionAreaEnabled() method
- public static boolean isSelectionAreaEnabled()
- {
- return jEdit.getBooleanProperty(SELECTION_AREA_ENABLED_PROPERTY);
- } //}}}
-
- //{{{ getSelectionAreaBgColor() method
- public static Color getSelectionAreaBackground()
- {
- String color = jEdit.getProperty(SELECTION_AREA_BGCOLOR_PROPERTY);
- if (color == null)
- return jEdit.getColorProperty("view.gutter.bgColor");
- return SyntaxUtilities.parseColor(color, Color.black);
- } //}}}
-
- //{{{ getSelectionAreaWidth() method
- public static int getSelectionAreaWidth()
- {
- int n = jEdit.getIntegerProperty("view.gutter.selectionAreaWidth",
- DEFAULT_SELECTION_GUTTER_WIDTH);
- if (n < 0)
- n = DEFAULT_SELECTION_GUTTER_WIDTH;
- return n;
- } //}}}
-
- //{{{ Private members
- private static final String GUTTER_ENABLED_PROPERTY =
- "view.gutter.enabled";
- private static final String SELECTION_AREA_ENABLED_PROPERTY =
- "view.gutter.selectionAreaEnabled";
- private static final String SELECTION_AREA_BGCOLOR_PROPERTY =
- "view.gutter.selectionAreaBgColor";
- private static final int DEFAULT_SELECTION_GUTTER_WIDTH = 12;
-
- private FontSelector gutterFont;
- private ColorWellButton gutterForeground;
- private ColorWellButton gutterBackground;
- private JTextField gutterHighlightInterval;
- private ColorWellButton gutterHighlightColor;
- private JCheckBox lineNumbersEnabled;
- private JCheckBox gutterCurrentLineHighlightEnabled;
- private ColorWellButton gutterCurrentLineHighlight;
- private JCheckBox gutterStructureHighlightEnabled;
- private ColorWellButton gutterStructureHighlight;
- private JCheckBox gutterMarkerHighlightEnabled;
- private ColorWellButton gutterMarkerHighlight;
- private ColorWellButton gutterFoldMarkers;
- private JComboBox foldPainter;
- private ColorWellButton gutterFocusBorder;
- private ColorWellButton gutterNoFocusBorder;
- private String [] painters;
- private JCheckBox gutterEnabled;
- private JPanel gutterComponents;
- private JTextField minLineNumberDigits;
- private JCheckBox selectionAreaEnabled;
- private ColorWellButton selectionAreaBgColor;
- private JTextField selectionAreaWidth;
- //}}}
-}
+/*
+ * GutterOptionPane.java - Gutter options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000 mike dillon
+ * Portions copyright (C) 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import java.awt.*;
+
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+import org.gjt.sp.jedit.*;
+//}}}
+import org.gjt.sp.util.SyntaxUtilities;
+
+public class GutterOptionPane extends AbstractOptionPane
+{
+ //{{{ GutterOptionPane constructor
+ public GutterOptionPane()
+ {
+ super("gutter");
+ } //}}}
+
+ //{{{ _init() method
+ public void _init()
+ {
+ /* Gutter enable */
+ gutterEnabled = new JCheckBox(jEdit.getProperty(
+ "options.gutter.enabled"));
+ gutterEnabled.setSelected(isGutterEnabled());
+ addComponent(gutterEnabled);
+
+ /* Gutter components frame */
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.gridheight = 1;
+ cons.gridwidth = GridBagConstraints.REMAINDER;
+ cons.fill = GridBagConstraints.HORIZONTAL;
+ cons.anchor = GridBagConstraints.WEST;
+ cons.weightx = 1.0f;
+ cons.ipadx = 0;
+ cons.ipady = 0;
+ cons.insets = new Insets(0,0,0,0);
+ gutterComponents = new JPanel(new GridBagLayout());
+ gutterComponents.setBorder(BorderFactory.createTitledBorder(
+ jEdit.getProperty("options.gutter.optionalComponents")));
+
+ /* Line numbering */
+ lineNumbersEnabled = new JCheckBox(jEdit.getProperty(
+ "options.gutter.lineNumbers"));
+ lineNumbersEnabled.setSelected(jEdit.getBooleanProperty(
+ "view.gutter.lineNumbers"));
+ gutterComponents.add(lineNumbersEnabled, cons);
+
+ InputVerifier integerInputVerifier = new InputVerifier()
+ {
+ @Override
+ public boolean verify(JComponent input)
+ {
+ if (! (input instanceof JTextField))
+ return true;
+ JTextField tf = (JTextField) input;
+ int i;
+ try
+ {
+ i = Integer.valueOf(tf.getText()).intValue();
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ return (i >= 0);
+ }
+ };
+ minLineNumberDigits = new JTextField(String.valueOf(
+ getMinLineNumberDigits()),1);
+ minLineNumberDigits.setInputVerifier(integerInputVerifier);
+ JPanel minLineNumberDigitsPanel = new JPanel();
+ minLineNumberDigitsPanel.add(new JLabel(
+ jEdit.getProperty("options.gutter.minLineNumberDigits")));
+ minLineNumberDigitsPanel.add(minLineNumberDigits);
+ cons.gridy = 1;
+ gutterComponents.add(minLineNumberDigitsPanel, cons);
+
+ /* Selection area enable */
+ selectionAreaEnabled = new JCheckBox(jEdit.getProperty(
+ "options.gutter.selectionAreaEnabled"));
+ selectionAreaEnabled.setSelected(isSelectionAreaEnabled());
+ cons.gridy = 2;
+ gutterComponents.add(selectionAreaEnabled, cons);
+
+ addComponent(gutterComponents);
+ // Disable gutter components when 'show gutter' is unchecked
+ setGutterComponentsEnabledState();
+ gutterEnabled.addChangeListener(new ChangeListener()
+ {
+ public void stateChanged(ChangeEvent e)
+ {
+ setGutterComponentsEnabledState();
+ }
+ });
+
+ /* Selection area background color */
+ addComponent(jEdit.getProperty("options.gutter.selectionAreaBgColor"),
+ selectionAreaBgColor = new ColorWellButton(
+ getSelectionAreaBackground()), GridBagConstraints.VERTICAL);
+
+ /* Selection area width */
+ selectionAreaWidth = new JTextField(String.valueOf(
+ getSelectionAreaWidth()),DEFAULT_SELECTION_GUTTER_WIDTH);
+ selectionAreaWidth.setInputVerifier(integerInputVerifier);
+ addComponent(jEdit.getProperty("options.gutter.selectionAreaWidth"),
+ selectionAreaWidth);
+
+ /* Text font */
+ gutterFont = new FontSelector(
+ jEdit.getFontProperty("view.gutter.font",
+ new Font("Monospaced",Font.PLAIN,10)));
+
+ addComponent(jEdit.getProperty("options.gutter.font"),gutterFont);
+
+ /* Text color */
+ addComponent(jEdit.getProperty("options.gutter.foreground"),
+ gutterForeground = new ColorWellButton(
+ jEdit.getColorProperty("view.gutter.fgColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Background color */
+ addComponent(jEdit.getProperty("options.gutter.background"),
+ gutterBackground = new ColorWellButton(
+ jEdit.getColorProperty("view.gutter.bgColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Border width */
+ /* gutterBorderWidth = new JTextField(jEdit.getProperty(
+ "view.gutter.borderWidth"));
+ addComponent(jEdit.getProperty("options.gutter.borderWidth"),
+ gutterBorderWidth); */
+
+ /* Number alignment */
+ /* String[] alignments = new String[] {
+ "Left", "Center", "Right"
+ };
+ gutterNumberAlignment = new JComboBox(alignments);
+ String alignment = jEdit.getProperty("view.gutter.numberAlignment");
+ if("right".equals(alignment))
+ gutterNumberAlignment.setSelectedIndex(2);
+ else if("center".equals(alignment))
+ gutterNumberAlignment.setSelectedIndex(1);
+ else
+ gutterNumberAlignment.setSelectedIndex(0);
+ addComponent(jEdit.getProperty("options.gutter.numberAlignment"),
+ gutterNumberAlignment); */
+
+ /* Current line highlight */
+ gutterCurrentLineHighlightEnabled = new JCheckBox(jEdit.getProperty(
+ "options.gutter.currentLineHighlight"));
+ gutterCurrentLineHighlightEnabled.setSelected(jEdit.getBooleanProperty(
+ "view.gutter.highlightCurrentLine"));
+ addComponent(gutterCurrentLineHighlightEnabled,
+ gutterCurrentLineHighlight = new ColorWellButton(
+ jEdit.getColorProperty("view.gutter.currentLineColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Highlight interval and color */
+ gutterHighlightInterval = new JTextField(jEdit.getProperty(
+ "view.gutter.highlightInterval"),3);
+
+ Box gutterHighlightBox = new Box(BoxLayout.X_AXIS);
+ gutterHighlightBox.add(new JLabel(jEdit.getProperty(
+ "options.gutter.interval-1")));
+ gutterHighlightBox.add(Box.createHorizontalStrut(3));
+ gutterHighlightBox.add(gutterHighlightInterval);
+ gutterHighlightBox.add(Box.createHorizontalStrut(3));
+ gutterHighlightBox.add(new JLabel(jEdit.getProperty(
+ "options.gutter.interval-2")));
+ gutterHighlightBox.add(Box.createHorizontalStrut(12));
+
+ addComponent(gutterHighlightBox,gutterHighlightColor
+ = new ColorWellButton(jEdit.getColorProperty(
+ "view.gutter.highlightColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Structure highlight */
+ gutterStructureHighlightEnabled = new JCheckBox(jEdit.getProperty(
+ "options.gutter.structureHighlight"));
+ gutterStructureHighlightEnabled.setSelected(jEdit.getBooleanProperty(
+ "view.gutter.structureHighlight"));
+ addComponent(gutterStructureHighlightEnabled,
+ gutterStructureHighlight = new ColorWellButton(
+ jEdit.getColorProperty("view.gutter.structureHighlightColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Marker highlight */
+ gutterMarkerHighlightEnabled = new JCheckBox(jEdit.getProperty(
+ "options.gutter.markerHighlight"));
+ gutterMarkerHighlightEnabled.setSelected(jEdit.getBooleanProperty(
+ "view.gutter.markerHighlight"));
+ addComponent(gutterMarkerHighlightEnabled,
+ gutterMarkerHighlight = new ColorWellButton(
+ jEdit.getColorProperty("view.gutter.markerColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Fold marker color */
+ addComponent(jEdit.getProperty("options.gutter.foldColor"),
+ gutterFoldMarkers = new ColorWellButton(
+ jEdit.getColorProperty("view.gutter.foldColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Focused border color */
+ addComponent(jEdit.getProperty("options.gutter.focusBorderColor"),
+ gutterFocusBorder = new ColorWellButton(
+ jEdit.getColorProperty("view.gutter.focusBorderColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* unfocused border color */
+ addComponent(jEdit.getProperty("options.gutter.noFocusBorderColor"),
+ gutterNoFocusBorder = new ColorWellButton(
+ jEdit.getColorProperty("view.gutter.noFocusBorderColor")),
+ GridBagConstraints.VERTICAL);
+
+ addFoldStyleChooser();
+ } //}}}
+
+ //{{{ _save() method
+ public void _save()
+ {
+ jEdit.setBooleanProperty("view.gutter.lineNumbers", lineNumbersEnabled
+ .isSelected());
+ jEdit.setIntegerProperty("view.gutter.minDigitCount",
+ Integer.valueOf(minLineNumberDigits.getText()));
+
+ jEdit.setFontProperty("view.gutter.font",gutterFont.getFont());
+ jEdit.setColorProperty("view.gutter.fgColor",gutterForeground
+ .getSelectedColor());
+ jEdit.setColorProperty("view.gutter.bgColor",gutterBackground
+ .getSelectedColor());
+
+ /* jEdit.setProperty("view.gutter.borderWidth",
+ gutterBorderWidth.getText());
+
+ String alignment = null;
+ switch(gutterNumberAlignment.getSelectedIndex())
+ {
+ case 2:
+ alignment = "right";
+ break;
+ case 1:
+ alignment = "center";
+ break;
+ case 0: default:
+ alignment = "left";
+ }
+ jEdit.setProperty("view.gutter.numberAlignment", alignment); */
+
+ jEdit.setBooleanProperty("view.gutter.highlightCurrentLine",
+ gutterCurrentLineHighlightEnabled.isSelected());
+ jEdit.setColorProperty("view.gutter.currentLineColor",
+ gutterCurrentLineHighlight.getSelectedColor());
+ jEdit.setProperty("view.gutter.highlightInterval",
+ gutterHighlightInterval.getText());
+ jEdit.setColorProperty("view.gutter.highlightColor",
+ gutterHighlightColor.getSelectedColor());
+
+ jEdit.setBooleanProperty("view.gutter.structureHighlight",
+ gutterStructureHighlightEnabled.isSelected());
+ jEdit.setColorProperty("view.gutter.structureHighlightColor",
+ gutterStructureHighlight.getSelectedColor());
+ jEdit.setBooleanProperty("view.gutter.markerHighlight",
+ gutterMarkerHighlightEnabled.isSelected());
+ jEdit.setColorProperty("view.gutter.markerColor",
+ gutterMarkerHighlight.getSelectedColor());
+ jEdit.setColorProperty("view.gutter.foldColor",
+ gutterFoldMarkers.getSelectedColor());
+ jEdit.setProperty(JEditTextArea.FOLD_PAINTER_PROPERTY,
+ painters[foldPainter.getSelectedIndex()]);
+ jEdit.setColorProperty("view.gutter.focusBorderColor",
+ gutterFocusBorder.getSelectedColor());
+ jEdit.setColorProperty("view.gutter.noFocusBorderColor",
+ gutterNoFocusBorder.getSelectedColor());
+ jEdit.setBooleanProperty(GUTTER_ENABLED_PROPERTY,
+ gutterEnabled.isSelected());
+ jEdit.setBooleanProperty(SELECTION_AREA_ENABLED_PROPERTY,
+ selectionAreaEnabled.isSelected());
+ jEdit.setColorProperty(SELECTION_AREA_BGCOLOR_PROPERTY,
+ selectionAreaBgColor.getSelectedColor());
+ jEdit.setIntegerProperty("view.gutter.selectionAreaWidth",
+ Integer.valueOf(selectionAreaWidth.getText()));
+ } //}}}
+
+ //{{{ setGutterComponentsEnabledState
+ private void setGutterComponentsEnabledState()
+ {
+ GUIUtilities.setEnabledRecursively(gutterComponents,
+ gutterEnabled.isSelected());
+ } //}}}
+
+ //{{{ addFoldStyleChooser() method
+ private void addFoldStyleChooser()
+ {
+ painters = ServiceManager.getServiceNames(JEditTextArea.FOLD_PAINTER_SERVICE);
+ foldPainter = new JComboBox();
+ String current = JEditTextArea.getFoldPainterName();
+ int selected = 0;
+ for (int i = 0; i < painters.length; i++)
+ {
+ String painter = painters[i];
+ foldPainter.addItem(jEdit.getProperty(
+ "options.gutter.foldStyleNames." + painter, painter));
+ if (painter.equals(current))
+ selected = i;
+ }
+ foldPainter.setSelectedIndex(selected);
+ addComponent(new JLabel(jEdit.getProperty("options.gutter.foldStyle.label")), foldPainter);
+ } //}}}
+
+ //{{{ isGutterEnabled() method
+ public static boolean isGutterEnabled()
+ {
+ return jEdit.getBooleanProperty(GUTTER_ENABLED_PROPERTY);
+ } //}}}
+
+ //{{{ getMinLineNumberDigits() method
+ public static int getMinLineNumberDigits()
+ {
+ int n = jEdit.getIntegerProperty("view.gutter.minDigitCount", 2);
+ if (n < 0)
+ n = 2;
+ return n;
+ } //}}}
+
+ //{{{ isSelectionAreaEnabled() method
+ public static boolean isSelectionAreaEnabled()
+ {
+ return jEdit.getBooleanProperty(SELECTION_AREA_ENABLED_PROPERTY);
+ } //}}}
+
+ //{{{ getSelectionAreaBgColor() method
+ public static Color getSelectionAreaBackground()
+ {
+ String color = jEdit.getProperty(SELECTION_AREA_BGCOLOR_PROPERTY);
+ if (color == null)
+ return jEdit.getColorProperty("view.gutter.bgColor");
+ return SyntaxUtilities.parseColor(color, Color.black);
+ } //}}}
+
+ //{{{ getSelectionAreaWidth() method
+ public static int getSelectionAreaWidth()
+ {
+ int n = jEdit.getIntegerProperty("view.gutter.selectionAreaWidth",
+ DEFAULT_SELECTION_GUTTER_WIDTH);
+ if (n < 0)
+ n = DEFAULT_SELECTION_GUTTER_WIDTH;
+ return n;
+ } //}}}
+
+ //{{{ Private members
+ private static final String GUTTER_ENABLED_PROPERTY =
+ "view.gutter.enabled";
+ private static final String SELECTION_AREA_ENABLED_PROPERTY =
+ "view.gutter.selectionAreaEnabled";
+ private static final String SELECTION_AREA_BGCOLOR_PROPERTY =
+ "view.gutter.selectionAreaBgColor";
+ private static final int DEFAULT_SELECTION_GUTTER_WIDTH = 12;
+
+ private FontSelector gutterFont;
+ private ColorWellButton gutterForeground;
+ private ColorWellButton gutterBackground;
+ private JTextField gutterHighlightInterval;
+ private ColorWellButton gutterHighlightColor;
+ private JCheckBox lineNumbersEnabled;
+ private JCheckBox gutterCurrentLineHighlightEnabled;
+ private ColorWellButton gutterCurrentLineHighlight;
+ private JCheckBox gutterStructureHighlightEnabled;
+ private ColorWellButton gutterStructureHighlight;
+ private JCheckBox gutterMarkerHighlightEnabled;
+ private ColorWellButton gutterMarkerHighlight;
+ private ColorWellButton gutterFoldMarkers;
+ private JComboBox foldPainter;
+ private ColorWellButton gutterFocusBorder;
+ private ColorWellButton gutterNoFocusBorder;
+ private String [] painters;
+ private JCheckBox gutterEnabled;
+ private JPanel gutterComponents;
+ private JTextField minLineNumberDigits;
+ private JCheckBox selectionAreaEnabled;
+ private ColorWellButton selectionAreaBgColor;
+ private JTextField selectionAreaWidth;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/IconTheme.java b/jEdit/org/gjt/sp/jedit/options/IconTheme.java
index 119afbc..82ec6fe 100644
--- a/jEdit/org/gjt/sp/jedit/options/IconTheme.java
+++ b/jEdit/org/gjt/sp/jedit/options/IconTheme.java
@@ -1,26 +1,26 @@
-package org.gjt.sp.jedit.options;
-
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.jEdit;
-
-public class IconTheme extends Object
-{
- static final String[] builtIn = new String[] { "tango", "classic" };
-
- public static String[] builtInNames()
- {
- return builtIn;
- }
-
- public static String get()
- {
- return jEdit.getProperty("icon-theme", "tango");
- }
-
- public static void set(String name)
- {
- GUIUtilities.setIconPath("jeditresource:/org/gjt/sp/jedit/icons/themes/" + name + "/");
- jEdit.setProperty("icon-theme", name);
- }
-
-}
+package org.gjt.sp.jedit.options;
+
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+
+public class IconTheme extends Object
+{
+ static final String[] builtIn = new String[] { "tango", "classic" };
+
+ public static String[] builtInNames()
+ {
+ return builtIn;
+ }
+
+ public static String get()
+ {
+ return jEdit.getProperty("icon-theme", "tango");
+ }
+
+ public static void set(String name)
+ {
+ GUIUtilities.setIconPath("jeditresource:/org/gjt/sp/jedit/icons/themes/" + name + "/");
+ jEdit.setProperty("icon-theme", name);
+ }
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/MouseOptionPane.java b/jEdit/org/gjt/sp/jedit/options/MouseOptionPane.java
index e3bd798..6136feb 100644
--- a/jEdit/org/gjt/sp/jedit/options/MouseOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/MouseOptionPane.java
@@ -1,153 +1,153 @@
-/*
- * MouseOptionPane.java - Editor window options
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-public class MouseOptionPane extends AbstractOptionPane
-{
- //{{{ MouseOptionPane constructor
- public MouseOptionPane()
- {
- super("mouse");
- } //}}}
-
- //{{{ _init() method
- protected void _init()
- {
- /* Text drag and drop */
- dragAndDrop = new JCheckBox(jEdit.getProperty(
- "options.mouse.dragAndDrop"));
- dragAndDrop.setSelected(jEdit.getBooleanProperty(
- "view.dragAndDrop"));
- addComponent(dragAndDrop);
-
- /* Non word character selection behavior */
- joinNonWordChars = new JCheckBox(jEdit.getProperty(
- "options.mouse.joinNonWordChars"));
- joinNonWordChars.setSelected(jEdit.getBooleanProperty(
- "view.joinNonWordChars"));
- addComponent(joinNonWordChars);
-
- /* Middle mouse button click pastes % register */
- middleMousePaste = new JCheckBox(jEdit.getProperty("options.mouse"
- + ".middleMousePaste"));
- middleMousePaste.setSelected(jEdit.getBooleanProperty(
- "view.middleMousePaste"));
- addComponent(middleMousePaste);
-
- /*
- * Pressing Ctrl while mouse actions makes them as if
- * selection mode were rectangular mode
- */
- ctrlForRectangularSelection = new JCheckBox(jEdit.getProperty(
- "options.mouse.ctrlForRectangularSelection"));
- ctrlForRectangularSelection.setSelected(jEdit.getBooleanProperty(
- "view.ctrlForRectangularSelection"));
- addComponent(ctrlForRectangularSelection);
-
- /* Gutter mouse actions */
- int c = clickActionKeys.length;
- String[] clickActionNames = new String[c];
- for(int i = 0; i < c; i++)
- {
- clickActionNames[i] = jEdit.getProperty(
- "options.mouse.gutter."+clickActionKeys[i]);
- }
-
- c = clickModifierKeys.length;
- String[] clickModifierNames = new String[c];
- for(int i = 0; i < c; i++)
- {
- clickModifierNames[i] = jEdit.getProperty(
- "options.mouse.gutter."+clickModifierKeys[i]);
- }
-
- gutterClickActions = new JComboBox[c];
-
- for(int i = 0; i < c; i++)
- {
- JComboBox cb = new JComboBox(clickActionNames);
- gutterClickActions[i] = cb;
-
- String val = jEdit.getProperty("view.gutter."+clickModifierKeys[i]);
- for(int j = 0; j < clickActionKeys.length; j++)
- {
- if(val.equals(clickActionKeys[j]))
- {
- cb.setSelectedIndex(j);
- }
- }
-
- addComponent(clickModifierNames[i],cb);
- }
- } //}}}
-
- //{{{ _save() method
- public void _save()
- {
- jEdit.setBooleanProperty("view.dragAndDrop",
- dragAndDrop.isSelected());
- jEdit.setBooleanProperty("view.joinNonWordChars",
- joinNonWordChars.isSelected());
- jEdit.setBooleanProperty("view.middleMousePaste",
- middleMousePaste.isSelected());
- jEdit.setBooleanProperty("view.ctrlForRectangularSelection",
- ctrlForRectangularSelection.isSelected());
-
- int c = clickModifierKeys.length;
- for(int i = 0; i < c; i++)
- {
- int idx = gutterClickActions[i].getSelectedIndex();
- jEdit.setProperty("view.gutter."+clickModifierKeys[i],
- clickActionKeys[idx]);
- }
- } //}}}
-
- //{{{ Private members
- private JCheckBox dragAndDrop;
- private JCheckBox joinNonWordChars;
- private JCheckBox middleMousePaste;
- private JCheckBox ctrlForRectangularSelection;
-
- private JComboBox[] gutterClickActions;
-
- // simplified these settings a little...
- private static final String[] clickActionKeys = new String[] {
- "toggle-fold",
- "toggle-fold-fully"
- };
-
- private static final String[] clickModifierKeys = new String[] {
- "foldClick",
- "SfoldClick"
- }; //}}}
-}
+/*
+ * MouseOptionPane.java - Editor window options
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+public class MouseOptionPane extends AbstractOptionPane
+{
+ //{{{ MouseOptionPane constructor
+ public MouseOptionPane()
+ {
+ super("mouse");
+ } //}}}
+
+ //{{{ _init() method
+ protected void _init()
+ {
+ /* Text drag and drop */
+ dragAndDrop = new JCheckBox(jEdit.getProperty(
+ "options.mouse.dragAndDrop"));
+ dragAndDrop.setSelected(jEdit.getBooleanProperty(
+ "view.dragAndDrop"));
+ addComponent(dragAndDrop);
+
+ /* Non word character selection behavior */
+ joinNonWordChars = new JCheckBox(jEdit.getProperty(
+ "options.mouse.joinNonWordChars"));
+ joinNonWordChars.setSelected(jEdit.getBooleanProperty(
+ "view.joinNonWordChars"));
+ addComponent(joinNonWordChars);
+
+ /* Middle mouse button click pastes % register */
+ middleMousePaste = new JCheckBox(jEdit.getProperty("options.mouse"
+ + ".middleMousePaste"));
+ middleMousePaste.setSelected(jEdit.getBooleanProperty(
+ "view.middleMousePaste"));
+ addComponent(middleMousePaste);
+
+ /*
+ * Pressing Ctrl while mouse actions makes them as if
+ * selection mode were rectangular mode
+ */
+ ctrlForRectangularSelection = new JCheckBox(jEdit.getProperty(
+ "options.mouse.ctrlForRectangularSelection"));
+ ctrlForRectangularSelection.setSelected(jEdit.getBooleanProperty(
+ "view.ctrlForRectangularSelection"));
+ addComponent(ctrlForRectangularSelection);
+
+ /* Gutter mouse actions */
+ int c = clickActionKeys.length;
+ String[] clickActionNames = new String[c];
+ for(int i = 0; i < c; i++)
+ {
+ clickActionNames[i] = jEdit.getProperty(
+ "options.mouse.gutter."+clickActionKeys[i]);
+ }
+
+ c = clickModifierKeys.length;
+ String[] clickModifierNames = new String[c];
+ for(int i = 0; i < c; i++)
+ {
+ clickModifierNames[i] = jEdit.getProperty(
+ "options.mouse.gutter."+clickModifierKeys[i]);
+ }
+
+ gutterClickActions = new JComboBox[c];
+
+ for(int i = 0; i < c; i++)
+ {
+ JComboBox cb = new JComboBox(clickActionNames);
+ gutterClickActions[i] = cb;
+
+ String val = jEdit.getProperty("view.gutter."+clickModifierKeys[i]);
+ for(int j = 0; j < clickActionKeys.length; j++)
+ {
+ if(val.equals(clickActionKeys[j]))
+ {
+ cb.setSelectedIndex(j);
+ }
+ }
+
+ addComponent(clickModifierNames[i],cb);
+ }
+ } //}}}
+
+ //{{{ _save() method
+ public void _save()
+ {
+ jEdit.setBooleanProperty("view.dragAndDrop",
+ dragAndDrop.isSelected());
+ jEdit.setBooleanProperty("view.joinNonWordChars",
+ joinNonWordChars.isSelected());
+ jEdit.setBooleanProperty("view.middleMousePaste",
+ middleMousePaste.isSelected());
+ jEdit.setBooleanProperty("view.ctrlForRectangularSelection",
+ ctrlForRectangularSelection.isSelected());
+
+ int c = clickModifierKeys.length;
+ for(int i = 0; i < c; i++)
+ {
+ int idx = gutterClickActions[i].getSelectedIndex();
+ jEdit.setProperty("view.gutter."+clickModifierKeys[i],
+ clickActionKeys[idx]);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private JCheckBox dragAndDrop;
+ private JCheckBox joinNonWordChars;
+ private JCheckBox middleMousePaste;
+ private JCheckBox ctrlForRectangularSelection;
+
+ private JComboBox[] gutterClickActions;
+
+ // simplified these settings a little...
+ private static final String[] clickActionKeys = new String[] {
+ "toggle-fold",
+ "toggle-fold-fully"
+ };
+
+ private static final String[] clickModifierKeys = new String[] {
+ "foldClick",
+ "SfoldClick"
+ }; //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/PluginManagerOptionPane.java b/jEdit/org/gjt/sp/jedit/options/PluginManagerOptionPane.java
index 3d594f5..19fe74e 100644
--- a/jEdit/org/gjt/sp/jedit/options/PluginManagerOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/PluginManagerOptionPane.java
@@ -1,376 +1,395 @@
-/*
- * PluginManagerOptionPane.java - Plugin options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Kris Kopicki
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-import javax.swing.*;
-import javax.swing.border.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import java.util.List;
-import java.io.*;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.pluginmgr.*;
-import org.gjt.sp.util.*;
-
-/**
- * The plugin manager option pane.
- *
- * @version $Id: PluginManagerOptionPane.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class PluginManagerOptionPane extends AbstractOptionPane
-{
- //{{{ Constructor
- public PluginManagerOptionPane()
- {
- super("plugin-manager");
- } //}}}
-
- //{{{ _init() method
- protected void _init()
- {
- setLayout(new BorderLayout());
-
-
- mirrorLabel = new JLabel();
- updateMirrorLabel();
- JPanel buttonPanel = new JPanel();
- buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.Y_AXIS));
- JPanel spinnerPanel = null;
- if(jEdit.getSettingsDirectory() != null)
- {
- settingsDir = new JRadioButton(jEdit.getProperty(
- "options.plugin-manager.settings-dir"));
- settingsDir.setToolTipText(MiscUtilities.constructPath(
- jEdit.getSettingsDirectory(),"jars"));
- int delay = jEdit.getIntegerProperty("plugin-manager.list-cache.minutes", 10);
- spinnerModel = new SpinnerNumberModel(delay, 0, 240, 5);
- cacheForSpinner = new JSpinner(spinnerModel);
- spinnerPanel = new JPanel();
- spinnerPanel.setLayout(new BoxLayout(spinnerPanel, BoxLayout.X_AXIS));
- spinnerPanel.add(new JLabel("Cache plugin list for: (minutes)"));
- spinnerPanel.add(cacheForSpinner);
- spinnerPanel.add(Box.createGlue());
-
- }
- JRadioButton appDir = new JRadioButton(jEdit.getProperty(
- "options.plugin-manager.app-dir"));
- appDir.setToolTipText(MiscUtilities.constructPath(
- jEdit.getJEditHome(),"jars"));
-
- miraList = new JList(miraModel = new MirrorModel());
- miraList.setSelectionModel(new SingleSelectionModel());
-
- /* Download mirror */
- add(BorderLayout.NORTH,mirrorLabel);
- add(BorderLayout.CENTER,new JScrollPane(miraList));
-
-
- buttonPanel.add(Box.createVerticalStrut(6));
-
- /* Update mirror list */
- updateMirrors = new JButton(jEdit.getProperty(
- "options.plugin-manager.updateMirrors"));
- updateMirrors.addActionListener(new ActionHandler());
- updateMirrors.setEnabled(false);
- VFSManager.runInWorkThread(new UpdateMirrorsThread(false));
- JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
- panel.add(updateMirrors);
- if (spinnerPanel != null) panel.add(spinnerPanel);
- panel.add(updateStatus);
- panel.setAlignmentX(Component.LEFT_ALIGNMENT);
- buttonPanel.add(panel);
-
- buttonPanel.add(Box.createVerticalStrut(6));
-
- /* Download source */
- downloadSource = new JCheckBox(jEdit.getProperty(
- "options.plugin-manager.downloadSource"));
- downloadSource.setSelected(jEdit.getBooleanProperty("plugin-manager.downloadSource"));
- downloadSource.setAlignmentX(Component.LEFT_ALIGNMENT);
- buttonPanel.add(downloadSource);
-
- buttonPanel.add(Box.createVerticalStrut(6));
-
- /* Delete downloaded files */
- deleteDownloads = new JCheckBox(jEdit.getProperty(
- "options.plugin-manager.deleteDownloads"));
- deleteDownloads.setSelected(jEdit.getBooleanProperty("plugin-manager.deleteDownloads"));
- deleteDownloads.setAlignmentX(Component.LEFT_ALIGNMENT);
- buttonPanel.add(deleteDownloads);
-
- buttonPanel.add(Box.createVerticalStrut(6));
-
- /* Install location */
- ButtonGroup locGrp = new ButtonGroup();
- if(jEdit.getSettingsDirectory() != null)
- locGrp.add(settingsDir);
- locGrp.add(appDir);
- JPanel locPanel = new JPanel();
- locPanel.setLayout(new BoxLayout(locPanel,BoxLayout.Y_AXIS));
-
- if(jEdit.getSettingsDirectory() != null)
- {
- locPanel.add(settingsDir);
- locPanel.add(Box.createVerticalStrut(3));
- }
- locPanel.setBorder(new TitledBorder(
- jEdit.getProperty("options.plugin-manager.location")));
- locPanel.add(appDir);
- locPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
- buttonPanel.add(locPanel);
-
- buttonPanel.add(Box.createGlue());
- add(BorderLayout.SOUTH,buttonPanel);
-
- if (jEdit.getBooleanProperty("plugin-manager.installUser")
- && jEdit.getSettingsDirectory() != null)
- settingsDir.setSelected(true);
- else
- appDir.setSelected(true);
- } //}}}
-
- //{{{ _save() method
- protected void _save()
- {
- jEdit.setBooleanProperty("plugin-manager.installUser",
- settingsDir != null && settingsDir.isSelected());
- jEdit.setBooleanProperty("plugin-manager.downloadSource",downloadSource.isSelected());
- jEdit.setBooleanProperty("plugin-manager.deleteDownloads",deleteDownloads.isSelected());
- jEdit.setIntegerProperty("plugin-manager.list-cache.minutes", spinnerModel.getNumber().intValue());
- if(miraList.getSelectedIndex() != -1)
- {
- String currentMirror = miraModel.getID(miraList.getSelectedIndex());
- String previousMirror = jEdit.getProperty("plugin-manager.mirror.id");
-
- if (!previousMirror.equals(currentMirror))
- {
- jEdit.setProperty("plugin-manager.mirror.id",currentMirror);
- jEdit.setProperty("plugin-manager.mirror.name",(String) miraModel.getElementAt(miraList.getSelectedIndex()));
- updateMirrorLabel();
- // Insert code to update the plugin managers list here later
- }
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private JLabel mirrorLabel;
-
- private JRadioButton settingsDir;
- private JCheckBox downloadSource;
- private JCheckBox deleteDownloads;
- private JSpinner cacheForSpinner;
- private SpinnerNumberModel spinnerModel;
-
- private MirrorModel miraModel;
- private JList miraList;
- /** The button to update mirror list. */
- private JButton updateMirrors;
- /** A label telling if the mirror list is being updated. */
- private final JLabel updateStatus = new JLabel();
- //}}}
-
- //{{{ updateMirrorLabel method
- private void updateMirrorLabel()
- {
- String currentMirror = jEdit.getProperty("plugin-manager.mirror.id");
- String mirrorName;
- if (currentMirror.equals(MirrorList.Mirror.NONE))
- {
- mirrorName = "Plugin Central default";
- }
- else
- {
- mirrorName = jEdit.getProperty("plugin-manager.mirror.name");
- if (mirrorName == null) mirrorName = currentMirror;
- }
- mirrorLabel.setText(jEdit.getProperty(
- "options.plugin-manager.mirror") + ' ' + mirrorName);
- } //}}}
-
- //}}}
-
- //{{{ MirrorModel class
- static class MirrorModel extends AbstractListModel
- {
- private List<MirrorList.Mirror> mirrors;
-
- MirrorModel()
- {
- mirrors = new ArrayList<MirrorList.Mirror>();
- }
-
- public String getID(int index)
- {
- return mirrors.get(index).id;
- }
-
- public int getSize()
- {
- return mirrors.size();
- }
-
- public Object getElementAt(int index)
- {
- MirrorList.Mirror mirror = mirrors.get(index);
- if(mirror.id.equals(MirrorList.Mirror.NONE))
- return jEdit.getProperty("options.plugin-manager.none");
- else
- return mirror.continent+": "+mirror.description+" ("+mirror.location+')';
- }
-
- public void setList(List<MirrorList.Mirror> mirrors)
- {
- this.mirrors = mirrors;
- fireContentsChanged(this,0,mirrors.size() - 1);
- }
- } //}}}
-
- //{{{ SingleSelectionModel class
- static class SingleSelectionModel extends DefaultListSelectionModel
- {
- SingleSelectionModel()
- {
- setSelectionMode(SINGLE_SELECTION);
- }
-
- public void removeSelectionInterval(int index0, int index1) {}
- } //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- updateMirrors.setEnabled(false);
- updateStatus.setText(jEdit.getProperty("options.plugin-manager.workthread"));
- VFSManager.runInWorkThread(new UpdateMirrorsThread(true));
- }
- } //}}}
-
- //{{{ UpdateMirrorsThread class
- /**
- * The thread that will update the mirror list.
- * It will read them from the cache or from the web.
- * It has 4 states :
- * 0 : started
- * 1 : xml downloaded
- * 2 : xml parsed
- * 3 : list updated
- */
- class UpdateMirrorsThread extends WorkRequest
- {
- private boolean download;
-
- UpdateMirrorsThread(boolean download)
- {
- this.download = download;
- }
-
- //{{{ run() method
- public void run()
- {
- try
- {
- setStatus(jEdit.getProperty("options.plugin-manager.workthread"));
- setMaximum(3);
- setValue(0);
-
- final List<MirrorList.Mirror> mirrors = new ArrayList<MirrorList.Mirror>();
- try
- {
- MirrorList mirrorList = new MirrorList(download, this);
- if (download)
- saveMirrorList(mirrorList.xml);
-
- mirrors.addAll(mirrorList.mirrors);
- }
- catch (Exception ex)
- {
- if (download)
- {
- Log.log(Log.ERROR,this,ex);
- GUIUtilities.error(PluginManagerOptionPane.this,
- "ioerror",new String[] { ex.toString() });
- }
- }
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- miraModel.setList(mirrors);
-
- String id = jEdit.getProperty("plugin-manager.mirror.id");
- int size = miraModel.getSize();
- for (int i=0; i < size; i++)
- {
- if (size == 1 || miraModel.getID(i).equals(id))
- {
- miraList.setSelectedIndex(i);
- break;
- }
- }
- }
- });
-
- setValue(3);
- }
- finally
- {
- updateMirrors.setEnabled(true);
- updateStatus.setText(null);
- }
- } //}}}
-
- //{{{ saveMirrorList() method
- private void saveMirrorList(String xml)
- {
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory == null)
- return;
-
- File mirrorList = new File(MiscUtilities.constructPath(
- settingsDirectory,"mirrorList.xml"));
- OutputStream out = null;
-
- try
- {
- out = new BufferedOutputStream(new FileOutputStream(mirrorList));
- IOUtilities.copyStream(null, new ByteArrayInputStream(xml.getBytes()), out, false);
- }
- catch (IOException e)
- {
- Log.log(Log.ERROR,this, "Unable to write cached mirror list : " + mirrorList);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- }
- } //}}}
- } //}}}
-}
+/*
+ * PluginManagerOptionPane.java - Plugin options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Kris Kopicki
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+import javax.swing.*;
+import javax.swing.border.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+import java.util.List;
+import java.io.*;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.pluginmgr.*;
+import org.gjt.sp.util.*;
+
+/**
+ * The plugin manager option pane.
+ *
+ * @version $Id: PluginManagerOptionPane.java 17941 2010-06-01 14:22:58Z kpouer $
+ */
+public class PluginManagerOptionPane extends AbstractOptionPane
+{
+ //{{{ Constructor
+ public PluginManagerOptionPane()
+ {
+ super("plugin-manager");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ setLayout(new BorderLayout());
+
+
+ mirrorLabel = new JLabel();
+ updateMirrorLabel();
+ JPanel buttonPanel = new JPanel();
+ buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.Y_AXIS));
+ JPanel spinnerPanel = null;
+ if(jEdit.getSettingsDirectory() != null)
+ {
+ settingsDir = new JRadioButton(jEdit.getProperty(
+ "options.plugin-manager.settings-dir"));
+ settingsDir.setToolTipText(MiscUtilities.constructPath(
+ jEdit.getSettingsDirectory(),"jars"));
+ int delay = jEdit.getIntegerProperty("plugin-manager.list-cache.minutes", 10);
+ spinnerModel = new SpinnerNumberModel(delay, 0, 240, 5);
+ cacheForSpinner = new JSpinner(spinnerModel);
+ spinnerPanel = new JPanel();
+ spinnerPanel.setLayout(new BoxLayout(spinnerPanel, BoxLayout.X_AXIS));
+ spinnerPanel.add(new JLabel("Cache plugin list for: (minutes)"));
+ spinnerPanel.add(cacheForSpinner);
+ spinnerPanel.add(Box.createGlue());
+
+ }
+ JRadioButton appDir = new JRadioButton(jEdit.getProperty(
+ "options.plugin-manager.app-dir"));
+ appDir.setToolTipText(MiscUtilities.constructPath(
+ jEdit.getJEditHome(),"jars"));
+
+ miraList = new JList(miraModel = new MirrorModel());
+ miraList.setSelectionModel(new SingleSelectionModel());
+
+ /* Download mirror */
+ add(BorderLayout.NORTH,mirrorLabel);
+ add(BorderLayout.CENTER,new JScrollPane(miraList));
+
+
+ buttonPanel.add(Box.createVerticalStrut(6));
+
+ /* Update mirror list */
+ updateMirrors = new JButton(jEdit.getProperty(
+ "options.plugin-manager.updateMirrors"));
+ updateMirrors.addActionListener(new ActionHandler());
+ updateMirrors.setEnabled(false);
+ ThreadUtilities.runInBackground(new UpdateMirrorsThread(false));
+ JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+ panel.add(updateMirrors);
+ if (spinnerPanel != null) panel.add(spinnerPanel);
+ panel.add(updateStatus);
+ panel.setAlignmentX(Component.LEFT_ALIGNMENT);
+ buttonPanel.add(panel);
+
+ buttonPanel.add(Box.createVerticalStrut(6));
+
+ /* Download source */
+ downloadSource = new JCheckBox(jEdit.getProperty(
+ "options.plugin-manager.downloadSource"));
+ downloadSource.setSelected(jEdit.getBooleanProperty("plugin-manager.downloadSource"));
+ downloadSource.setAlignmentX(Component.LEFT_ALIGNMENT);
+ buttonPanel.add(downloadSource);
+
+ buttonPanel.add(Box.createVerticalStrut(6));
+
+ /* Delete downloaded files */
+ deleteDownloads = new JCheckBox(jEdit.getProperty(
+ "options.plugin-manager.deleteDownloads"));
+ deleteDownloads.setSelected(jEdit.getBooleanProperty("plugin-manager.deleteDownloads"));
+ deleteDownloads.setAlignmentX(Component.LEFT_ALIGNMENT);
+ buttonPanel.add(deleteDownloads);
+
+ buttonPanel.add(Box.createVerticalStrut(6));
+
+ /* Install location */
+ ButtonGroup locGrp = new ButtonGroup();
+ if(jEdit.getSettingsDirectory() != null)
+ locGrp.add(settingsDir);
+ locGrp.add(appDir);
+ JPanel locPanel = new JPanel();
+ locPanel.setLayout(new BoxLayout(locPanel,BoxLayout.Y_AXIS));
+
+ if(jEdit.getSettingsDirectory() != null)
+ {
+ locPanel.add(settingsDir);
+ locPanel.add(Box.createVerticalStrut(3));
+ }
+ locPanel.setBorder(new TitledBorder(
+ jEdit.getProperty("options.plugin-manager.location")));
+ locPanel.add(appDir);
+ locPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
+ buttonPanel.add(locPanel);
+
+ buttonPanel.add(Box.createGlue());
+ add(BorderLayout.SOUTH,buttonPanel);
+
+ if (jEdit.getBooleanProperty("plugin-manager.installUser")
+ && jEdit.getSettingsDirectory() != null)
+ settingsDir.setSelected(true);
+ else
+ appDir.setSelected(true);
+ } //}}}
+
+ //{{{ _save() method
+ protected void _save()
+ {
+ jEdit.setBooleanProperty("plugin-manager.installUser",
+ settingsDir != null && settingsDir.isSelected());
+ jEdit.setBooleanProperty("plugin-manager.downloadSource",downloadSource.isSelected());
+ jEdit.setBooleanProperty("plugin-manager.deleteDownloads",deleteDownloads.isSelected());
+ jEdit.setIntegerProperty("plugin-manager.list-cache.minutes", spinnerModel.getNumber().intValue());
+ if(miraList.getSelectedIndex() != -1)
+ {
+ String currentMirror = miraModel.getID(miraList.getSelectedIndex());
+ String previousMirror = jEdit.getProperty("plugin-manager.mirror.id");
+
+ if (!previousMirror.equals(currentMirror))
+ {
+ jEdit.setProperty("plugin-manager.mirror.id",currentMirror);
+ jEdit.setProperty("plugin-manager.mirror.name",(String) miraModel.getElementAt(miraList.getSelectedIndex()));
+ updateMirrorLabel();
+ // Insert code to update the plugin managers list here later
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private JLabel mirrorLabel;
+
+ private JRadioButton settingsDir;
+ private JCheckBox downloadSource;
+ private JCheckBox deleteDownloads;
+ private JSpinner cacheForSpinner;
+ private SpinnerNumberModel spinnerModel;
+
+ private MirrorModel miraModel;
+ private JList miraList;
+ /** The button to update mirror list. */
+ private JButton updateMirrors;
+ /** A label telling if the mirror list is being updated. */
+ private final JLabel updateStatus = new JLabel();
+ //}}}
+
+ //{{{ updateMirrorLabel method
+ private void updateMirrorLabel()
+ {
+ String currentMirror = jEdit.getProperty("plugin-manager.mirror.id");
+ String mirrorName;
+ if (currentMirror.equals(MirrorList.Mirror.NONE))
+ {
+ mirrorName = "Plugin Central default";
+ }
+ else
+ {
+ mirrorName = jEdit.getProperty("plugin-manager.mirror.name");
+ if (mirrorName == null) mirrorName = currentMirror;
+ }
+ mirrorLabel.setText(jEdit.getProperty(
+ "options.plugin-manager.mirror") + ' ' + mirrorName);
+ } //}}}
+
+ //}}}
+
+ //{{{ MirrorModel class
+ static class MirrorModel extends AbstractListModel
+ {
+ private List<MirrorList.Mirror> mirrors;
+
+ MirrorModel()
+ {
+ mirrors = new ArrayList<MirrorList.Mirror>();
+ }
+
+ public String getID(int index)
+ {
+ return mirrors.get(index).id;
+ }
+
+ public int getSize()
+ {
+ return mirrors.size();
+ }
+
+ public Object getElementAt(int index)
+ {
+ MirrorList.Mirror mirror = mirrors.get(index);
+ if(mirror.id.equals(MirrorList.Mirror.NONE))
+ return jEdit.getProperty("options.plugin-manager.none");
+ else
+ return mirror.continent+": "+mirror.description+" ("+mirror.location+')';
+ }
+
+ public void setList(List<MirrorList.Mirror> mirrors)
+ {
+ this.mirrors = mirrors;
+ fireContentsChanged(this,0,mirrors.size() - 1);
+ }
+ } //}}}
+
+ //{{{ SingleSelectionModel class
+ static class SingleSelectionModel extends DefaultListSelectionModel
+ {
+ SingleSelectionModel()
+ {
+ setSelectionMode(SINGLE_SELECTION);
+ }
+
+ @Override
+ public void removeSelectionInterval(int index0, int index1) {}
+ } //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ updateMirrors.setEnabled(false);
+ updateStatus.setText(jEdit.getProperty("options.plugin-manager.workthread"));
+ ThreadUtilities.runInBackground(new UpdateMirrorsThread(true));
+ }
+ } //}}}
+
+ //{{{ UpdateMirrorsThread class
+ /**
+ * The thread that will update the mirror list.
+ * It will read them from the cache or from the web.
+ * It has 4 states :
+ * 0 : started
+ * 1 : xml downloaded
+ * 2 : xml parsed
+ * 3 : list updated
+ */
+ class UpdateMirrorsThread extends Task
+ {
+ private final boolean download;
+
+ UpdateMirrorsThread(boolean download)
+ {
+ this.download = download;
+ }
+
+ //{{{ run() method
+ @Override
+ public void _run()
+ {
+ try
+ {
+ setStatus(jEdit.getProperty("options.plugin-manager.workthread"));
+ setMaximum(3L);
+ setValue(0L);
+
+ final List<MirrorList.Mirror> mirrors = new ArrayList<MirrorList.Mirror>();
+ try
+ {
+ MirrorList mirrorList = new MirrorList(download, this);
+ if (download)
+ saveMirrorList(mirrorList.getXml());
+
+ mirrors.addAll(mirrorList.getMirrors());
+ }
+ catch (final Exception ex)
+ {
+ if (download)
+ {
+ Log.log(Log.ERROR,this,ex);
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ GUIUtilities.error(PluginManagerOptionPane.this,
+ "ioerror",new String[] { ex.toString() });
+ }
+ });
+
+ }
+ }
+
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ miraModel.setList(mirrors);
+
+ String id = jEdit.getProperty("plugin-manager.mirror.id");
+ int size = miraModel.getSize();
+ for (int i=0; i < size; i++)
+ {
+ if (size == 1 || miraModel.getID(i).equals(id))
+ {
+ miraList.setSelectedIndex(i);
+ break;
+ }
+ }
+ if (size == 0)
+ {
+ miraList.clearSelection();
+ }
+ }
+ });
+
+ setValue(3L);
+ }
+ finally
+ {
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ updateMirrors.setEnabled(true);
+ updateStatus.setText(null);
+ }
+ });
+ }
+ } //}}}
+
+ //{{{ saveMirrorList() method
+ private void saveMirrorList(String xml)
+ {
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory == null)
+ return;
+
+ File mirrorList = new File(MiscUtilities.constructPath(
+ settingsDirectory,"mirrorList.xml"));
+ OutputStream out = null;
+
+ try
+ {
+ out = new BufferedOutputStream(new FileOutputStream(mirrorList));
+ IOUtilities.copyStream(null, new ByteArrayInputStream(xml.getBytes()), out, false);
+ }
+ catch (IOException e)
+ {
+ Log.log(Log.ERROR,this, "Unable to write cached mirror list : " + mirrorList);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ }
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/PluginOptions.java b/jEdit/org/gjt/sp/jedit/options/PluginOptions.java
index d6c0af6..3c4d8fc 100644
--- a/jEdit/org/gjt/sp/jedit/options/PluginOptions.java
+++ b/jEdit/org/gjt/sp/jedit/options/PluginOptions.java
@@ -1,145 +1,145 @@
-/*
- * PluginOptions.java - Plugin options dialog
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import java.awt.Dialog;
-import java.awt.Frame;
-import org.gjt.sp.jedit.gui.OptionsDialog;
-import org.gjt.sp.jedit.options.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-public class PluginOptions extends OptionsDialog
-{
- //{{{ PluginOptions constructor
- public PluginOptions(Frame frame)
- {
- super(frame,"plugin-options",jEdit.getProperty("plugin-options.last"));
- } //}}}
-
- //{{{ PluginOptions constructor
- public PluginOptions(Frame frame, String pane)
- {
- super(frame,"plugin-options",pane);
- } //}}}
-
- //{{{ PluginOptions constructor
- public PluginOptions(Dialog dialog)
- {
- super(dialog,"plugin-options",jEdit.getProperty("plugin-options.last"));
- } //}}}
-
- //{{{ PluginOptions constructor
- public PluginOptions(Dialog dialog, String pane)
- {
- super(dialog,"plugin-options",pane);
- } //}}}
-
- //{{{ createOptionTreeModel() method
- protected OptionTreeModel createOptionTreeModel()
- {
- OptionTreeModel paneTreeModel = new OptionTreeModel();
- OptionGroup rootGroup = (OptionGroup) paneTreeModel.getRoot();
-
- // initialize the Plugins branch of the options tree
- pluginsGroup = new OptionGroup("plugins");
- pluginsGroup.setSort(true);
-
- // Query plugins for option panes
- EditPlugin[] plugins = jEdit.getPlugins();
- for(int i = 0; i < plugins.length; i++)
- {
- EditPlugin ep = plugins[i];
- if(ep instanceof EditPlugin.Broken)
- continue;
-
- String className = ep.getClassName();
- if(jEdit.getProperty("plugin." + className + ".activate") == null)
- {
- // Old API
- try
- {
- ep.createOptionPanes(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR, ep,
- "Error creating option pane");
- Log.log(Log.ERROR, ep, t);
- }
- }
- else
- {
- String optionPane = jEdit.getProperty(
- "plugin." + className + ".option-pane");
- if(optionPane != null)
- pluginsGroup.addOptionPane(optionPane);
- else
- {
- String options = jEdit.getProperty(
- "plugin." + className
- + ".option-group");
- if(options != null)
- {
- pluginsGroup.addOptionGroup(
- new OptionGroup(
- "plugin." + className,
- jEdit.getProperty("plugin."
- + className + ".name"),
- options)
- );
- }
- }
- }
- }
-
- // only add the Plugins branch if there are OptionPanes
- if (pluginsGroup.getMemberCount() == 0)
- pluginsGroup.addOptionPane(new NoPluginsPane());
-
- rootGroup.addOptionGroup(pluginsGroup);
-
- return paneTreeModel;
- } //}}}
-
- //{{{ getDefaultGroup() method
- protected OptionGroup getDefaultGroup()
- {
- return pluginsGroup;
- } //}}}
-
- //{{{ Private members
- private OptionGroup pluginsGroup;
- //}}}
-
- //{{{ NoPluginsPane class
- public static class NoPluginsPane extends AbstractOptionPane
- {
- public NoPluginsPane()
- {
- super("no-plugins");
- }
- } //}}}
-}
+/*
+ * PluginOptions.java - Plugin options dialog
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import java.awt.Dialog;
+import java.awt.Frame;
+import org.gjt.sp.jedit.gui.OptionsDialog;
+import org.gjt.sp.jedit.options.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+public class PluginOptions extends OptionsDialog
+{
+ //{{{ PluginOptions constructor
+ public PluginOptions(Frame frame)
+ {
+ super(frame,"plugin-options",jEdit.getProperty("plugin-options.last"));
+ } //}}}
+
+ //{{{ PluginOptions constructor
+ public PluginOptions(Frame frame, String pane)
+ {
+ super(frame,"plugin-options",pane);
+ } //}}}
+
+ //{{{ PluginOptions constructor
+ public PluginOptions(Dialog dialog)
+ {
+ super(dialog,"plugin-options",jEdit.getProperty("plugin-options.last"));
+ } //}}}
+
+ //{{{ PluginOptions constructor
+ public PluginOptions(Dialog dialog, String pane)
+ {
+ super(dialog,"plugin-options",pane);
+ } //}}}
+
+ //{{{ createOptionTreeModel() method
+ protected OptionTreeModel createOptionTreeModel()
+ {
+ OptionTreeModel paneTreeModel = new OptionTreeModel();
+ OptionGroup rootGroup = (OptionGroup) paneTreeModel.getRoot();
+
+ // initialize the Plugins branch of the options tree
+ pluginsGroup = new OptionGroup("plugins");
+ pluginsGroup.setSort(true);
+
+ // Query plugins for option panes
+ EditPlugin[] plugins = jEdit.getPlugins();
+ for(int i = 0; i < plugins.length; i++)
+ {
+ EditPlugin ep = plugins[i];
+ if(ep instanceof EditPlugin.Broken)
+ continue;
+
+ String className = ep.getClassName();
+ if(jEdit.getProperty("plugin." + className + ".activate") == null)
+ {
+ // Old API
+ try
+ {
+ ep.createOptionPanes(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR, ep,
+ "Error creating option pane");
+ Log.log(Log.ERROR, ep, t);
+ }
+ }
+ else
+ {
+ String optionPane = jEdit.getProperty(
+ "plugin." + className + ".option-pane");
+ if(optionPane != null)
+ pluginsGroup.addOptionPane(optionPane);
+ else
+ {
+ String options = jEdit.getProperty(
+ "plugin." + className
+ + ".option-group");
+ if(options != null)
+ {
+ pluginsGroup.addOptionGroup(
+ new OptionGroup(
+ "plugin." + className,
+ jEdit.getProperty("plugin."
+ + className + ".name"),
+ options)
+ );
+ }
+ }
+ }
+ }
+
+ // only add the Plugins branch if there are OptionPanes
+ if (pluginsGroup.getMemberCount() == 0)
+ pluginsGroup.addOptionPane(new NoPluginsPane());
+
+ rootGroup.addOptionGroup(pluginsGroup);
+
+ return paneTreeModel;
+ } //}}}
+
+ //{{{ getDefaultGroup() method
+ protected OptionGroup getDefaultGroup()
+ {
+ return pluginsGroup;
+ } //}}}
+
+ //{{{ Private members
+ private OptionGroup pluginsGroup;
+ //}}}
+
+ //{{{ NoPluginsPane class
+ public static class NoPluginsPane extends AbstractOptionPane
+ {
+ public NoPluginsPane()
+ {
+ super("no-plugins");
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/PrintOptionPane.java b/jEdit/org/gjt/sp/jedit/options/PrintOptionPane.java
index 5fbf030..a9adeaa 100644
--- a/jEdit/org/gjt/sp/jedit/options/PrintOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/PrintOptionPane.java
@@ -1,124 +1,124 @@
-/*
- * PrintOptionPane.java - Printing options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.*;
-import org.gjt.sp.jedit.gui.FontSelector;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class PrintOptionPane extends AbstractOptionPane
-{
- //{{{ PrintOptionPane constructor
- public PrintOptionPane()
- {
- super("print");
- } //}}}
-
- //{{{ _init() method
- protected void _init()
- {
- /* Font */
- font = new FontSelector(jEdit.getFontProperty("print.font"));
- addComponent(jEdit.getProperty("options.print.font"),font);
-
- /* Header */
- printHeader = new JCheckBox(jEdit.getProperty("options.print"
- + ".header"));
- printHeader.setSelected(jEdit.getBooleanProperty("print.header"));
- addComponent(printHeader);
-
- /* Footer */
- printFooter = new JCheckBox(jEdit.getProperty("options.print"
- + ".footer"));
- printFooter.setSelected(jEdit.getBooleanProperty("print.footer"));
- addComponent(printFooter);
-
- /* Line numbering */
- printLineNumbers = new JCheckBox(jEdit.getProperty("options.print"
- + ".lineNumbers"));
- printLineNumbers.setSelected(jEdit.getBooleanProperty("print.lineNumbers"));
- addComponent(printLineNumbers);
-
- /* Color */
- color = new JCheckBox(jEdit.getProperty("options.print"
- + ".color"));
- color.setSelected(jEdit.getBooleanProperty("print.color"));
- addComponent(color);
-
- /* Tab size */
- String[] tabSizes = { "2", "4", "8" };
- tabSize = new JComboBox(tabSizes);
- tabSize.setEditable(true);
- tabSize.setSelectedItem(jEdit.getProperty("print.tabSize"));
- addComponent(jEdit.getProperty("options.print.tabSize"),tabSize);
-
-
- /* Print Folds */
- printFolds = new JCheckBox(jEdit.getProperty("options.print"
- + ".folds"));
- printFolds.setSelected(jEdit.getBooleanProperty("print.folds",true));
- addComponent(printFolds);
-
- addSeparator("options.print.workarounds");
-
- /* Spacing workaround */
- glyphVector = new JCheckBox(jEdit.getProperty(
- "options.print.glyphVector"));
- glyphVector.setSelected(jEdit.getBooleanProperty("print.glyphVector"));
- addComponent(glyphVector);
-
- /* Force 1.3 print dialog */
- force13 = new JCheckBox(jEdit.getProperty(
- "options.print.force13"));
- force13.setSelected(jEdit.getBooleanProperty("print.force13"));
- addComponent(force13);
- } //}}}
-
- //{{{ _save() method
- protected void _save()
- {
- jEdit.setFontProperty("print.font",font.getFont());
- jEdit.setBooleanProperty("print.header",printHeader.isSelected());
- jEdit.setBooleanProperty("print.footer",printFooter.isSelected());
- jEdit.setBooleanProperty("print.lineNumbers",printLineNumbers.isSelected());
- jEdit.setBooleanProperty("print.color",color.isSelected());
- jEdit.setProperty("print.tabSize",(String)tabSize.getSelectedItem());
- jEdit.setBooleanProperty("print.glyphVector",glyphVector.isSelected());
- jEdit.setBooleanProperty("print.force13",force13.isSelected());
- jEdit.setBooleanProperty("print.folds",printFolds.isSelected());
- } //}}}
-
- //{{{ Private members
- private FontSelector font;
- private JCheckBox printHeader;
- private JCheckBox printFooter;
- private JCheckBox printLineNumbers;
- private JCheckBox printFolds;
- private JCheckBox color;
- private JComboBox tabSize;
- private JCheckBox glyphVector;
- private JCheckBox force13;
- //}}}
-}
+/*
+ * PrintOptionPane.java - Printing options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.*;
+import org.gjt.sp.jedit.gui.FontSelector;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class PrintOptionPane extends AbstractOptionPane
+{
+ //{{{ PrintOptionPane constructor
+ public PrintOptionPane()
+ {
+ super("print");
+ } //}}}
+
+ //{{{ _init() method
+ protected void _init()
+ {
+ /* Font */
+ font = new FontSelector(jEdit.getFontProperty("print.font"));
+ addComponent(jEdit.getProperty("options.print.font"),font);
+
+ /* Header */
+ printHeader = new JCheckBox(jEdit.getProperty("options.print"
+ + ".header"));
+ printHeader.setSelected(jEdit.getBooleanProperty("print.header"));
+ addComponent(printHeader);
+
+ /* Footer */
+ printFooter = new JCheckBox(jEdit.getProperty("options.print"
+ + ".footer"));
+ printFooter.setSelected(jEdit.getBooleanProperty("print.footer"));
+ addComponent(printFooter);
+
+ /* Line numbering */
+ printLineNumbers = new JCheckBox(jEdit.getProperty("options.print"
+ + ".lineNumbers"));
+ printLineNumbers.setSelected(jEdit.getBooleanProperty("print.lineNumbers"));
+ addComponent(printLineNumbers);
+
+ /* Color */
+ color = new JCheckBox(jEdit.getProperty("options.print"
+ + ".color"));
+ color.setSelected(jEdit.getBooleanProperty("print.color"));
+ addComponent(color);
+
+ /* Tab size */
+ String[] tabSizes = { "2", "4", "8" };
+ tabSize = new JComboBox(tabSizes);
+ tabSize.setEditable(true);
+ tabSize.setSelectedItem(jEdit.getProperty("print.tabSize"));
+ addComponent(jEdit.getProperty("options.print.tabSize"),tabSize);
+
+
+ /* Print Folds */
+ printFolds = new JCheckBox(jEdit.getProperty("options.print"
+ + ".folds"));
+ printFolds.setSelected(jEdit.getBooleanProperty("print.folds",true));
+ addComponent(printFolds);
+
+ addSeparator("options.print.workarounds");
+
+ /* Spacing workaround */
+ glyphVector = new JCheckBox(jEdit.getProperty(
+ "options.print.glyphVector"));
+ glyphVector.setSelected(jEdit.getBooleanProperty("print.glyphVector"));
+ addComponent(glyphVector);
+
+ /* Force 1.3 print dialog */
+ force13 = new JCheckBox(jEdit.getProperty(
+ "options.print.force13"));
+ force13.setSelected(jEdit.getBooleanProperty("print.force13"));
+ addComponent(force13);
+ } //}}}
+
+ //{{{ _save() method
+ protected void _save()
+ {
+ jEdit.setFontProperty("print.font",font.getFont());
+ jEdit.setBooleanProperty("print.header",printHeader.isSelected());
+ jEdit.setBooleanProperty("print.footer",printFooter.isSelected());
+ jEdit.setBooleanProperty("print.lineNumbers",printLineNumbers.isSelected());
+ jEdit.setBooleanProperty("print.color",color.isSelected());
+ jEdit.setProperty("print.tabSize",(String)tabSize.getSelectedItem());
+ jEdit.setBooleanProperty("print.glyphVector",glyphVector.isSelected());
+ jEdit.setBooleanProperty("print.force13",force13.isSelected());
+ jEdit.setBooleanProperty("print.folds",printFolds.isSelected());
+ } //}}}
+
+ //{{{ Private members
+ private FontSelector font;
+ private JCheckBox printHeader;
+ private JCheckBox printFooter;
+ private JCheckBox printLineNumbers;
+ private JCheckBox printFolds;
+ private JCheckBox color;
+ private JComboBox tabSize;
+ private JCheckBox glyphVector;
+ private JCheckBox force13;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/SaveBackupOptionPane.java b/jEdit/org/gjt/sp/jedit/options/SaveBackupOptionPane.java
index 73e8940..4079ab7 100644
--- a/jEdit/org/gjt/sp/jedit/options/SaveBackupOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/SaveBackupOptionPane.java
@@ -1,189 +1,191 @@
-/*
- * AutosaveBackupOptionPane.java - Autosave & backup options
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.NumericTextField;
-import org.gjt.sp.jedit.browser.VFSBrowser;
-//}}}
-
-/**
- * The Save and Backup option panel.
- *
- * @author Slava Pestov
- * @author $Id: SaveBackupOptionPane.java 16244 2009-09-28 18:39:41Z ezust $
- */
-public class SaveBackupOptionPane extends AbstractOptionPane
-{
- //{{{ SaveBackupOptionPane constructor
- public SaveBackupOptionPane()
- {
- super("save-back");
- } //}}}
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- /* Two-stage save */
- twoStageSave = new JCheckBox(jEdit.getProperty(
- "options.save-back.twoStageSave"));
- twoStageSave.setSelected(jEdit.getBooleanProperty(
- "twoStageSave"));
- twoStageSave.setToolTipText(jEdit.getProperty(
- "options.save-back.twoStageSave.tooltip"));
- addComponent(twoStageSave);
-
- /* Confirm save all */
- confirmSaveAll = new JCheckBox(jEdit.getProperty(
- "options.save-back.confirmSaveAll"));
- confirmSaveAll.setSelected(jEdit.getBooleanProperty(
- "confirmSaveAll"));
- addComponent(confirmSaveAll);
-
- /* Autosave interval */
- autosave = new NumericTextField(jEdit.getProperty("autosave"), true);
- addComponent(jEdit.getProperty("options.save-back.autosave"),autosave);
-
- /* Autosave untitled buffers */
- autosaveUntitled = new JCheckBox(jEdit.getProperty(
- "options.save-back.autosaveUntitled"));
- autosaveUntitled.setSelected(jEdit.getBooleanProperty("autosaveUntitled"));
- addComponent(autosaveUntitled);
-
- suppressNotSavedConfirmUntitled = new JCheckBox(jEdit.getProperty(
- "options.save-back.suppressNotSavedConfirmUntitled"));
- suppressNotSavedConfirmUntitled.setSelected(
- jEdit.getBooleanProperty("suppressNotSavedConfirmUntitled"));
- addComponent(suppressNotSavedConfirmUntitled);
-
- useMD5forDirtyCalculation = new JCheckBox(jEdit.getProperty(
- "options.save-back.useMD5forDirtyCalculation"));
- useMD5forDirtyCalculation.setToolTipText(jEdit.getProperty(
- "options.save-back.useMD5forDirtyCalculation.tooltip"));
- useMD5forDirtyCalculation.setSelected(
- jEdit.getBooleanProperty("useMD5forDirtyCalculation"));
- addComponent(useMD5forDirtyCalculation);
-
-
-
-
- /* Backup count */
- backups = new NumericTextField(jEdit.getProperty("backups"), true);
- addComponent(jEdit.getProperty("options.save-back.backups"),backups);
-
- /* Backup directory */
- backupDirectory = new JTextField(jEdit.getProperty(
- "backup.directory"));
- JButton browseBackupDirectory = new JButton("...");
- browseBackupDirectory.addActionListener(new MyActionListener());
- JPanel panel = new JPanel(new BorderLayout());
- panel.add(backupDirectory);
- panel.add(browseBackupDirectory, BorderLayout.EAST);
- addComponent(jEdit.getProperty("options.save-back.backupDirectory"),
- panel);
-
- /* Backup filename prefix */
- backupPrefix = new JTextField(jEdit.getProperty("backup.prefix"));
- addComponent(jEdit.getProperty("options.save-back.backupPrefix"),
- backupPrefix);
-
- /* Backup suffix */
- backupSuffix = new JTextField(jEdit.getProperty(
- "backup.suffix"));
- addComponent(jEdit.getProperty("options.save-back.backupSuffix"),
- backupSuffix);
-
- /* Backup on every save */
- backupEverySave = new JCheckBox(jEdit.getProperty(
- "options.save-back.backupEverySave"));
- backupEverySave.setSelected(jEdit.getBooleanProperty("backupEverySave"));
- addComponent(backupEverySave);
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
- jEdit.setBooleanProperty("twoStageSave",twoStageSave.isSelected());
- jEdit.setBooleanProperty("confirmSaveAll",confirmSaveAll.isSelected());
- jEdit.setProperty("autosave", this.autosave.getText());
- jEdit.setProperty("backups",backups.getText());
- jEdit.setProperty("backup.directory",backupDirectory.getText());
- jEdit.setProperty("backup.prefix",backupPrefix.getText());
- jEdit.setProperty("backup.suffix",backupSuffix.getText());
- jEdit.setBooleanProperty("backupEverySave", backupEverySave.isSelected());
- boolean newAutosave = autosaveUntitled.isSelected();
- boolean oldAutosave = jEdit.getBooleanProperty("autosaveUntitled");
- jEdit.setBooleanProperty("autosaveUntitled", newAutosave);
- jEdit.setBooleanProperty("suppressNotSavedConfirmUntitled",
- suppressNotSavedConfirmUntitled.isSelected());
- jEdit.setBooleanProperty("useMD5forDirtyCalculation",
- useMD5forDirtyCalculation.isSelected());
- if ((!newAutosave || jEdit.getIntegerProperty("autosave",0) == 0) && oldAutosave)
- {
- Buffer[] buffers = jEdit.getBuffers();
- for (Buffer buffer : buffers)
- {
- if (buffer.isUntitled())
- {
- buffer.removeAutosaveFile();
- }
- }
- }
- } //}}}
-
- //{{{ Private members
- private JCheckBox twoStageSave;
- private JCheckBox confirmSaveAll;
- private JTextField autosave;
- private JCheckBox autosaveUntitled;
- private JCheckBox suppressNotSavedConfirmUntitled;
- private JCheckBox useMD5forDirtyCalculation;
- private JTextField backups;
- private JTextField backupDirectory;
- private JTextField backupPrefix;
- private JTextField backupSuffix;
- private JCheckBox backupEverySave;
- //}}}
-
- //{{{ MyActionListener class
- private class MyActionListener implements ActionListener
- {
- public void actionPerformed(ActionEvent e)
- {
- String[] choosenFolder =
- GUIUtilities.showVFSFileDialog(null,
- backupDirectory.getText(),
- VFSBrowser.CHOOSE_DIRECTORY_DIALOG,
- false);
- if (choosenFolder != null)
- backupDirectory.setText(choosenFolder[0]);
- }
- } //}}}
-
-}
+/*
+ * AutosaveBackupOptionPane.java - Autosave & backup options
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.gui.NumericTextField;
+import org.gjt.sp.jedit.browser.VFSBrowser;
+//}}}
+
+/**
+ * The Save and Backup option panel.
+ *
+ * @author Slava Pestov
+ * @author $Id: SaveBackupOptionPane.java 18147 2010-06-25 20:39:03Z ezust $
+ */
+public class SaveBackupOptionPane extends AbstractOptionPane
+{
+ //{{{ SaveBackupOptionPane constructor
+ public SaveBackupOptionPane()
+ {
+ super("save-back");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ /* Two-stage save */
+ twoStageSave = new JCheckBox(jEdit.getProperty(
+ "options.save-back.twoStageSave"));
+ twoStageSave.setSelected(jEdit.getBooleanProperty(
+ "twoStageSave"));
+ twoStageSave.setToolTipText(jEdit.getProperty(
+ "options.save-back.twoStageSave.tooltip"));
+ addComponent(twoStageSave);
+
+ /* Confirm save all */
+ confirmSaveAll = new JCheckBox(jEdit.getProperty(
+ "options.save-back.confirmSaveAll"));
+ confirmSaveAll.setSelected(jEdit.getBooleanProperty(
+ "confirmSaveAll"));
+ addComponent(confirmSaveAll);
+
+ /* Autosave interval */
+ autosave = new NumericTextField(jEdit.getProperty("autosave"), true);
+ addComponent(jEdit.getProperty("options.save-back.autosave"),autosave);
+
+ /* Autosave untitled buffers */
+ autosaveUntitled = new JCheckBox(jEdit.getProperty(
+ "options.save-back.autosaveUntitled"));
+ autosaveUntitled.setSelected(jEdit.getBooleanProperty("autosaveUntitled"));
+ addComponent(autosaveUntitled);
+
+ suppressNotSavedConfirmUntitled = new JCheckBox(jEdit.getProperty(
+ "options.save-back.suppressNotSavedConfirmUntitled"));
+ suppressNotSavedConfirmUntitled.setSelected(
+ jEdit.getBooleanProperty("suppressNotSavedConfirmUntitled"));
+ addComponent(suppressNotSavedConfirmUntitled);
+
+ useMD5forDirtyCalculation = new JCheckBox(jEdit.getProperty(
+ "options.save-back.useMD5forDirtyCalculation"));
+ useMD5forDirtyCalculation.setToolTipText(jEdit.getProperty(
+ "options.save-back.useMD5forDirtyCalculation.tooltip"));
+ useMD5forDirtyCalculation.setSelected(
+ jEdit.getBooleanProperty("useMD5forDirtyCalculation"));
+ addComponent(useMD5forDirtyCalculation);
+
+
+
+
+ /* Backup count */
+ backups = new NumericTextField(jEdit.getProperty("backups"), true);
+ addComponent(jEdit.getProperty("options.save-back.backups"),backups);
+
+ /* Backup directory */
+ backupDirectory = new JTextField(jEdit.getProperty(
+ "backup.directory"));
+ JButton browseBackupDirectory = new JButton("...");
+ browseBackupDirectory.addActionListener(new MyActionListener());
+ JPanel panel = new JPanel(new BorderLayout());
+ panel.add(backupDirectory);
+ panel.add(browseBackupDirectory, BorderLayout.EAST);
+ addComponent(jEdit.getProperty("options.save-back.backupDirectory"),
+ panel);
+
+ /* Backup filename prefix */
+ backupPrefix = new JTextField(jEdit.getProperty("backup.prefix"));
+ addComponent(jEdit.getProperty("options.save-back.backupPrefix"),
+ backupPrefix);
+
+ /* Backup suffix */
+ backupSuffix = new JTextField(jEdit.getProperty(
+ "backup.suffix"));
+ addComponent(jEdit.getProperty("options.save-back.backupSuffix"),
+ backupSuffix);
+
+ /* Backup on every save */
+ backupEverySave = new JCheckBox(jEdit.getProperty(
+ "options.save-back.backupEverySave"));
+ backupEverySave.setToolTipText(jEdit.getProperty(
+ "options.save-back.backupEverySave.tooltip"));
+ backupEverySave.setSelected(jEdit.getBooleanProperty("backupEverySave"));
+ addComponent(backupEverySave);
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ jEdit.setBooleanProperty("twoStageSave",twoStageSave.isSelected());
+ jEdit.setBooleanProperty("confirmSaveAll",confirmSaveAll.isSelected());
+ jEdit.setProperty("autosave", this.autosave.getText());
+ jEdit.setProperty("backups",backups.getText());
+ jEdit.setProperty("backup.directory",backupDirectory.getText());
+ jEdit.setProperty("backup.prefix",backupPrefix.getText());
+ jEdit.setProperty("backup.suffix",backupSuffix.getText());
+ jEdit.setBooleanProperty("backupEverySave", backupEverySave.isSelected());
+ boolean newAutosave = autosaveUntitled.isSelected();
+ boolean oldAutosave = jEdit.getBooleanProperty("autosaveUntitled");
+ jEdit.setBooleanProperty("autosaveUntitled", newAutosave);
+ jEdit.setBooleanProperty("suppressNotSavedConfirmUntitled",
+ suppressNotSavedConfirmUntitled.isSelected());
+ jEdit.setBooleanProperty("useMD5forDirtyCalculation",
+ useMD5forDirtyCalculation.isSelected());
+ if ((!newAutosave || jEdit.getIntegerProperty("autosave",0) == 0) && oldAutosave)
+ {
+ Buffer[] buffers = jEdit.getBuffers();
+ for (Buffer buffer : buffers)
+ {
+ if (buffer.isUntitled())
+ {
+ buffer.removeAutosaveFile();
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+ private JCheckBox twoStageSave;
+ private JCheckBox confirmSaveAll;
+ private JTextField autosave;
+ private JCheckBox autosaveUntitled;
+ private JCheckBox suppressNotSavedConfirmUntitled;
+ private JCheckBox useMD5forDirtyCalculation;
+ private JTextField backups;
+ private JTextField backupDirectory;
+ private JTextField backupPrefix;
+ private JTextField backupSuffix;
+ private JCheckBox backupEverySave;
+ //}}}
+
+ //{{{ MyActionListener class
+ private class MyActionListener implements ActionListener
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ String[] choosenFolder =
+ GUIUtilities.showVFSFileDialog(null,
+ backupDirectory.getText(),
+ VFSBrowser.CHOOSE_DIRECTORY_DIALOG,
+ false);
+ if (choosenFolder != null)
+ backupDirectory.setText(choosenFolder[0]);
+ }
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/ShortcutsOptionPane.java b/jEdit/org/gjt/sp/jedit/options/ShortcutsOptionPane.java
index 550b133..4435bbf 100644
--- a/jEdit/org/gjt/sp/jedit/options/ShortcutsOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/ShortcutsOptionPane.java
@@ -1,467 +1,467 @@
-/*
- * ShortcutsOptionPane.java - Shortcuts options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000, 2001 Slava Pestov
- * Copyright (C) 2001 Dirk Moebius
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.FilteredTableModel;
-import org.gjt.sp.jedit.gui.GrabKeyDialog;
-import org.gjt.sp.jedit.gui.GrabKeyDialog.KeyBinding;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-
-import javax.swing.*;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-import javax.swing.table.AbstractTableModel;
-import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Vector;
-//}}}
-
-/**
- * Key binding editor.
- * @author Slava Pestov
- * @version $Id: ShortcutsOptionPane.java 16348 2009-10-14 10:40:15Z kpouer $
- */
-public class ShortcutsOptionPane extends AbstractOptionPane
-{
- //{{{ ShortcutsOptionPane constructor
- public ShortcutsOptionPane()
- {
- super("shortcuts");
- } //}}}
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- allBindings = new Vector<KeyBinding>();
-
- setLayout(new BorderLayout(12,12));
-
- initModels();
-
- selectModel = new JComboBox(models);
- selectModel.addActionListener(new ActionHandler());
- selectModel.setToolTipText(jEdit.getProperty("options.shortcuts.select.tooltip"));
- Box north = Box.createHorizontalBox();
- north.add(new JLabel(jEdit.getProperty(
- "options.shortcuts.select.label")));
- north.add(Box.createHorizontalStrut(6));
- north.add(selectModel);
-
- filterTF = new JTextField(40);
- filterTF.setToolTipText(jEdit.getProperty("options.shortcuts.filter.tooltip"));
- filterTF.getDocument().addDocumentListener(new DocumentListener()
- {
- public void changedUpdate(DocumentEvent e)
- {
- setFilter();
- }
-
- public void insertUpdate(DocumentEvent e)
- {
- setFilter();
- }
-
- public void removeUpdate(DocumentEvent e)
- {
- setFilter();
- }
- });
- JButton clearButton = new JButton(jEdit.getProperty(
- "options.shortcuts.clear.label"));
- clearButton.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent arg0)
- {
- filterTF.setText("");
- filterTF.requestFocus();
- }
- });
-
- JPanel filterPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
- filterPanel.add(new JLabel(jEdit.getProperty("options.shortcuts.filter.label")));
- filterPanel.add(filterTF);
- filterPanel.add(clearButton);
-
- keyTable = new JTable(filteredModel);
- filteredModel.setTable(keyTable);
- keyTable.getTableHeader().setReorderingAllowed(false);
- keyTable.getTableHeader().addMouseListener(new HeaderMouseHandler());
- keyTable.addMouseListener(new TableMouseHandler());
- Dimension d = keyTable.getPreferredSize();
- d.height = Math.min(d.height,200);
- JScrollPane scroller = new JScrollPane(keyTable);
- scroller.setPreferredSize(d);
- JPanel tableFilterPanel = new JPanel(new BorderLayout());
- tableFilterPanel.add(BorderLayout.NORTH,filterPanel);
- tableFilterPanel.add(BorderLayout.CENTER,scroller);
-
- add(BorderLayout.NORTH,north);
- add(BorderLayout.CENTER,tableFilterPanel);
- try
- {
- selectModel.setSelectedIndex(jEdit.getIntegerProperty("options.shortcuts.select.index", 0));
- }
- catch (IllegalArgumentException eae) {}
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
- if(keyTable.getCellEditor() != null)
- keyTable.getCellEditor().stopCellEditing();
-
- for (ShortcutsModel model : models)
- model.save();
-
- Macros.loadMacros();
- } //}}}
-
- //{{{ Private members
- private JTable keyTable;
- private Vector<ShortcutsModel> models;
- private FilteredTableModel<ShortcutsModel> filteredModel;
- private JComboBox selectModel;
- private List<KeyBinding> allBindings;
- private JTextField filterTF;
-
- //{{{ setFilter() method
- private void setFilter()
- {
- filteredModel.setFilter(filterTF.getText());
- } //}}}
-
- //{{{ initModels() method
- private void initModels()
- {
- List<KeyBinding[]> allBindings = new Vector<KeyBinding[]>();
- models = new Vector<ShortcutsModel>();
- ActionSet[] actionSets = jEdit.getActionSets();
- for(int i = 0; i < actionSets.length; i++)
- {
- ActionSet actionSet = actionSets[i];
- if(actionSet.getActionCount() != 0)
- {
- String modelLabel = actionSet.getLabel();
- if(modelLabel == null)
- {
- Log.log(Log.ERROR,this,"Empty action set: "
- + actionSet.getPluginJAR());
- }
- ShortcutsModel model = createModel(modelLabel,
- actionSet.getActionNames());
- models.addElement(model);
- allBindings.addAll(model.getBindings());
- }
- }
- if (models.size() > 1)
- models.addElement(new ShortcutsModel("All", allBindings));
- Collections.sort(models,new StandardUtilities.StringCompare<ShortcutsModel>(true));
- ShortcutsModel currentModel = models.elementAt(0);
- filteredModel = new FilteredTableModel<ShortcutsModel>(currentModel)
- {
- @Override
- public String prepareFilter(String filter)
- {
- return filter.toLowerCase();
- }
-
- @Override
- public boolean passFilter(int row, String filter)
- {
- String name = delegated.getBindingAt(row, 0).label.toLowerCase();
- return name.contains(filter);
- }
- };
- } //}}}
-
- //{{{ createModel() method
- private ShortcutsModel createModel(String modelLabel, String[] actions)
- {
- List<GrabKeyDialog.KeyBinding[]> bindings = new Vector<GrabKeyDialog.KeyBinding[]>(actions.length);
-
- for(int i = 0; i < actions.length; i++)
- {
- String name = actions[i];
- EditAction ea = jEdit.getAction(name);
- String label = ea.getLabel();
- // Skip certain actions this way
- if(label == null)
- continue;
-
- label = GUIUtilities.prettifyMenuLabel(label);
- addBindings(name,label,bindings);
- }
-
- return new ShortcutsModel(modelLabel,bindings);
- } //}}}
-
- //{{{ addBindings() method
- private void addBindings(String name, String label, List<GrabKeyDialog.KeyBinding[]> bindings)
- {
- GrabKeyDialog.KeyBinding[] b = new GrabKeyDialog.KeyBinding[2];
-
- b[0] = createBinding(name,label,
- jEdit.getProperty(name + ".shortcut"));
- b[1] = createBinding(name,label,
- jEdit.getProperty(name + ".shortcut2"));
-
- bindings.add(b);
- } //}}}
-
- //{{{ createBinding() method
- private GrabKeyDialog.KeyBinding createBinding(String name,
- String label, String shortcut)
- {
- if(shortcut != null && shortcut.length() == 0)
- shortcut = null;
-
- GrabKeyDialog.KeyBinding binding
- = new GrabKeyDialog.KeyBinding(name,label,shortcut,false);
-
- allBindings.add(binding);
- return binding;
- } //}}}
-
- //{{{ Inner classes
-
- //{{{ HeaderMouseHandler class
- private class HeaderMouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- ShortcutsModel shortcutsModel = filteredModel.getDelegated();
- switch(keyTable.getTableHeader().columnAtPoint(evt.getPoint()))
- {
- case 0:
- shortcutsModel.sort(0);
- break;
- case 1:
- shortcutsModel.sort(1);
- break;
- case 2:
- shortcutsModel.sort(2);
- break;
- }
- setFilter();
- }
- } //}}}
-
- //{{{ TableMouseHandler class
- private class TableMouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- int row = keyTable.getSelectedRow();
- int col = keyTable.getSelectedColumn();
- if(col != 0 && row != -1)
- {
- GrabKeyDialog gkd = new GrabKeyDialog(
- GUIUtilities.getParentDialog(
- ShortcutsOptionPane.this),
- filteredModel.getDelegated().getBindingAt(filteredModel.getTrueRow(row), col - 1),
- allBindings,null);
- if(gkd.isOK())
- filteredModel.setValueAt(
- gkd.getShortcut(),row,col);
- }
- }
- } //}}}
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- ShortcutsModel newModel
- = (ShortcutsModel)selectModel.getSelectedItem();
- if(filteredModel.getDelegated() != newModel)
- {
- jEdit.setIntegerProperty("options.shortcuts.select.index", selectModel.getSelectedIndex());
- filteredModel.setDelegated(newModel);
- setFilter();
- }
- }
- } //}}}
-
- //{{{ ShortcutsModel class
- private class ShortcutsModel extends AbstractTableModel
- {
- private List<GrabKeyDialog.KeyBinding[]> bindings;
- private String name;
-
- ShortcutsModel(String name, List<GrabKeyDialog.KeyBinding[]> bindings)
- {
- this.name = name;
- this.bindings = bindings;
- sort(0);
- }
-
- public List<GrabKeyDialog.KeyBinding[]> getBindings()
- {
- return bindings;
- }
-
- public void sort(int col)
- {
- Collections.sort(bindings,new KeyCompare(col));
- }
-
- public int getColumnCount()
- {
- return 3;
- }
-
- public int getRowCount()
- {
- return bindings.size();
- }
-
- public Object getValueAt(int row, int col)
- {
- switch(col)
- {
- case 0:
- return getBindingAt(row,0).label;
- case 1:
- return getBindingAt(row,0).shortcut;
- case 2:
- return getBindingAt(row,1).shortcut;
- default:
- return null;
- }
- }
-
- @Override
- public void setValueAt(Object value, int row, int col)
- {
- if(col == 0)
- return;
-
- getBindingAt(row,col-1).shortcut = (String)value;
-
- // redraw the whole table because a second shortcut
- // might have changed, too
- fireTableDataChanged();
- }
-
- @Override
- public String getColumnName(int index)
- {
- switch(index)
- {
- case 0:
- return jEdit.getProperty("options.shortcuts.name");
- case 1:
- return jEdit.getProperty("options.shortcuts.shortcut1");
- case 2:
- return jEdit.getProperty("options.shortcuts.shortcut2");
- default:
- return null;
- }
- }
-
- public void save()
- {
- for (GrabKeyDialog.KeyBinding[] binding : bindings)
- {
- jEdit.setProperty(
- binding[0].name + ".shortcut",
- binding[0].shortcut);
- jEdit.setProperty(
- binding[1].name + ".shortcut2",
- binding[1].shortcut);
- }
- }
-
- public GrabKeyDialog.KeyBinding getBindingAt(int row, int nr)
- {
- GrabKeyDialog.KeyBinding[] binding = bindings.get(row);
- return binding[nr];
- }
-
- @Override
- public String toString()
- {
- return name;
- }
-
- private class KeyCompare implements Comparator<GrabKeyDialog.KeyBinding[]>
- {
- private int col;
-
- KeyCompare(int col)
- {
- this.col = col;
- }
-
- public int compare(GrabKeyDialog.KeyBinding[] k1, GrabKeyDialog.KeyBinding[] k2)
- {
- String label1 = k1[0].label.toLowerCase();
- String label2 = k2[0].label.toLowerCase();
-
- if(col == 0)
- return StandardUtilities.compareStrings(
- label1,label2,true);
- else
- {
- String shortcut1, shortcut2;
- if(col == 1)
- {
- shortcut1 = k1[0].shortcut;
- shortcut2 = k2[0].shortcut;
- }
- else
- {
- shortcut1 = k1[1].shortcut;
- shortcut2 = k2[1].shortcut;
- }
-
- if(shortcut1 == null && shortcut2 != null)
- return 1;
- else if(shortcut2 == null && shortcut1 != null)
- return -1;
- else if(shortcut1 == null)
- return StandardUtilities.compareStrings(label1,label2,true);
- else
- return StandardUtilities.compareStrings(shortcut1,shortcut2,true);
- }
- }
- }
- } //}}}
- //}}}
- //}}}
-}
+/*
+ * ShortcutsOptionPane.java - Shortcuts options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000, 2001 Slava Pestov
+ * Copyright (C) 2001 Dirk Moebius
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.gui.FilteredTableModel;
+import org.gjt.sp.jedit.gui.GrabKeyDialog;
+import org.gjt.sp.jedit.gui.GrabKeyDialog.KeyBinding;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+
+import javax.swing.*;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.table.AbstractTableModel;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Vector;
+//}}}
+
+/**
+ * Key binding editor.
+ * @author Slava Pestov
+ * @version $Id: ShortcutsOptionPane.java 16676 2009-12-18 14:44:32Z shlomy $
+ */
+public class ShortcutsOptionPane extends AbstractOptionPane
+{
+ //{{{ ShortcutsOptionPane constructor
+ public ShortcutsOptionPane()
+ {
+ super("shortcuts");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ allBindings = new Vector<KeyBinding>();
+
+ setLayout(new BorderLayout(12,12));
+
+ initModels();
+
+ selectModel = new JComboBox(models);
+ selectModel.addActionListener(new ActionHandler());
+ selectModel.setToolTipText(jEdit.getProperty("options.shortcuts.select.tooltip"));
+ Box north = Box.createHorizontalBox();
+ north.add(new JLabel(jEdit.getProperty(
+ "options.shortcuts.select.label")));
+ north.add(Box.createHorizontalStrut(6));
+ north.add(selectModel);
+
+ filterTF = new JTextField(40);
+ filterTF.setToolTipText(jEdit.getProperty("options.shortcuts.filter.tooltip"));
+ filterTF.getDocument().addDocumentListener(new DocumentListener()
+ {
+ public void changedUpdate(DocumentEvent e)
+ {
+ setFilter();
+ }
+
+ public void insertUpdate(DocumentEvent e)
+ {
+ setFilter();
+ }
+
+ public void removeUpdate(DocumentEvent e)
+ {
+ setFilter();
+ }
+ });
+ JButton clearButton = new JButton(jEdit.getProperty(
+ "options.shortcuts.clear.label"));
+ clearButton.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent arg0)
+ {
+ filterTF.setText("");
+ filterTF.requestFocus();
+ }
+ });
+
+ JPanel filterPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+ filterPanel.add(new JLabel(jEdit.getProperty("options.shortcuts.filter.label")));
+ filterPanel.add(filterTF);
+ filterPanel.add(clearButton);
+
+ keyTable = new JTable(filteredModel);
+ filteredModel.setTable(keyTable);
+ keyTable.getTableHeader().setReorderingAllowed(false);
+ keyTable.getTableHeader().addMouseListener(new HeaderMouseHandler());
+ keyTable.addMouseListener(new TableMouseHandler());
+ Dimension d = keyTable.getPreferredSize();
+ d.height = Math.min(d.height,200);
+ JScrollPane scroller = new JScrollPane(keyTable);
+ scroller.setPreferredSize(d);
+ JPanel tableFilterPanel = new JPanel(new BorderLayout());
+ tableFilterPanel.add(BorderLayout.NORTH,filterPanel);
+ tableFilterPanel.add(BorderLayout.CENTER,scroller);
+
+ add(BorderLayout.NORTH,north);
+ add(BorderLayout.CENTER,tableFilterPanel);
+ try
+ {
+ selectModel.setSelectedIndex(jEdit.getIntegerProperty("options.shortcuts.select.index", 0));
+ }
+ catch (IllegalArgumentException eae) {}
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ if(keyTable.getCellEditor() != null)
+ keyTable.getCellEditor().stopCellEditing();
+
+ for (ShortcutsModel model : models)
+ model.save();
+
+ Macros.loadMacros();
+ } //}}}
+
+ //{{{ Private members
+ private JTable keyTable;
+ private Vector<ShortcutsModel> models;
+ private FilteredTableModel<ShortcutsModel> filteredModel;
+ private JComboBox selectModel;
+ private List<KeyBinding> allBindings;
+ private JTextField filterTF;
+
+ //{{{ setFilter() method
+ private void setFilter()
+ {
+ filteredModel.setFilter(filterTF.getText());
+ } //}}}
+
+ //{{{ initModels() method
+ private void initModels()
+ {
+ List<KeyBinding[]> allBindings = new Vector<KeyBinding[]>();
+ models = new Vector<ShortcutsModel>();
+ ActionSet[] actionSets = jEdit.getActionSets();
+ for(int i = 0; i < actionSets.length; i++)
+ {
+ ActionSet actionSet = actionSets[i];
+ if(actionSet.getActionCount() != 0)
+ {
+ String modelLabel = actionSet.getLabel();
+ if(modelLabel == null)
+ {
+ Log.log(Log.ERROR,this,"Empty action set: "
+ + actionSet.getPluginJAR());
+ }
+ ShortcutsModel model = createModel(modelLabel,
+ actionSet.getActionNames());
+ models.addElement(model);
+ allBindings.addAll(model.getBindings());
+ }
+ }
+ if (models.size() > 1)
+ models.addElement(new ShortcutsModel("All", allBindings));
+ Collections.sort(models,new StandardUtilities.StringCompare<ShortcutsModel>(true));
+ ShortcutsModel currentModel = models.elementAt(0);
+ filteredModel = new FilteredTableModel<ShortcutsModel>(currentModel)
+ {
+ @Override
+ public String prepareFilter(String filter)
+ {
+ return filter.toLowerCase();
+ }
+
+ @Override
+ public boolean passFilter(int row, String filter)
+ {
+ String name = delegated.getBindingAt(row, 0).label.toLowerCase();
+ return name.contains(filter);
+ }
+ };
+ } //}}}
+
+ //{{{ createModel() method
+ private ShortcutsModel createModel(String modelLabel, String[] actions)
+ {
+ List<GrabKeyDialog.KeyBinding[]> bindings = new Vector<GrabKeyDialog.KeyBinding[]>(actions.length);
+
+ for(int i = 0; i < actions.length; i++)
+ {
+ String name = actions[i];
+ EditAction ea = jEdit.getAction(name);
+ String label = ea.getLabel();
+ // Skip certain actions this way
+ if(label == null)
+ continue;
+
+ label = GUIUtilities.prettifyMenuLabel(label);
+ addBindings(name,label,bindings);
+ }
+
+ return new ShortcutsModel(modelLabel,bindings);
+ } //}}}
+
+ //{{{ addBindings() method
+ private void addBindings(String name, String label, List<GrabKeyDialog.KeyBinding[]> bindings)
+ {
+ GrabKeyDialog.KeyBinding[] b = new GrabKeyDialog.KeyBinding[2];
+
+ b[0] = createBinding(name,label,
+ jEdit.getProperty(name + ".shortcut"));
+ b[1] = createBinding(name,label,
+ jEdit.getProperty(name + ".shortcut2"));
+
+ bindings.add(b);
+ } //}}}
+
+ //{{{ createBinding() method
+ private GrabKeyDialog.KeyBinding createBinding(String name,
+ String label, String shortcut)
+ {
+ if(shortcut != null && shortcut.length() == 0)
+ shortcut = null;
+
+ GrabKeyDialog.KeyBinding binding
+ = new GrabKeyDialog.KeyBinding(name,label,shortcut,false);
+
+ allBindings.add(binding);
+ return binding;
+ } //}}}
+
+ //{{{ Inner classes
+
+ //{{{ HeaderMouseHandler class
+ private class HeaderMouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ ShortcutsModel shortcutsModel = filteredModel.getDelegated();
+ switch(keyTable.getTableHeader().columnAtPoint(evt.getPoint()))
+ {
+ case 0:
+ shortcutsModel.sort(0);
+ break;
+ case 1:
+ shortcutsModel.sort(1);
+ break;
+ case 2:
+ shortcutsModel.sort(2);
+ break;
+ }
+ setFilter();
+ }
+ } //}}}
+
+ //{{{ TableMouseHandler class
+ private class TableMouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ int row = keyTable.getSelectedRow();
+ int col = keyTable.getSelectedColumn();
+ if(col != 0 && row != -1)
+ {
+ GrabKeyDialog gkd = new GrabKeyDialog(
+ GUIUtilities.getParentDialog(
+ ShortcutsOptionPane.this),
+ filteredModel.getDelegated().getBindingAt(filteredModel.getTrueRow(row), col - 1),
+ allBindings,null);
+ if(gkd.isOK())
+ filteredModel.setValueAt(
+ gkd.getShortcut(),row,col);
+ }
+ }
+ } //}}}
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ ShortcutsModel newModel
+ = (ShortcutsModel)selectModel.getSelectedItem();
+ if(filteredModel.getDelegated() != newModel)
+ {
+ jEdit.setIntegerProperty("options.shortcuts.select.index", selectModel.getSelectedIndex());
+ filteredModel.setDelegated(newModel);
+ setFilter();
+ }
+ }
+ } //}}}
+
+ //{{{ ShortcutsModel class
+ static private class ShortcutsModel extends AbstractTableModel
+ {
+ private List<GrabKeyDialog.KeyBinding[]> bindings;
+ private String name;
+
+ ShortcutsModel(String name, List<GrabKeyDialog.KeyBinding[]> bindings)
+ {
+ this.name = name;
+ this.bindings = bindings;
+ sort(0);
+ }
+
+ public List<GrabKeyDialog.KeyBinding[]> getBindings()
+ {
+ return bindings;
+ }
+
+ public void sort(int col)
+ {
+ Collections.sort(bindings,new KeyCompare(col));
+ }
+
+ public int getColumnCount()
+ {
+ return 3;
+ }
+
+ public int getRowCount()
+ {
+ return bindings.size();
+ }
+
+ public Object getValueAt(int row, int col)
+ {
+ switch(col)
+ {
+ case 0:
+ return getBindingAt(row,0).label;
+ case 1:
+ return getBindingAt(row,0).shortcut;
+ case 2:
+ return getBindingAt(row,1).shortcut;
+ default:
+ return null;
+ }
+ }
+
+ @Override
+ public void setValueAt(Object value, int row, int col)
+ {
+ if(col == 0)
+ return;
+
+ getBindingAt(row,col-1).shortcut = (String)value;
+
+ // redraw the whole table because a second shortcut
+ // might have changed, too
+ fireTableDataChanged();
+ }
+
+ @Override
+ public String getColumnName(int index)
+ {
+ switch(index)
+ {
+ case 0:
+ return jEdit.getProperty("options.shortcuts.name");
+ case 1:
+ return jEdit.getProperty("options.shortcuts.shortcut1");
+ case 2:
+ return jEdit.getProperty("options.shortcuts.shortcut2");
+ default:
+ return null;
+ }
+ }
+
+ public void save()
+ {
+ for (GrabKeyDialog.KeyBinding[] binding : bindings)
+ {
+ jEdit.setProperty(
+ binding[0].name + ".shortcut",
+ binding[0].shortcut);
+ jEdit.setProperty(
+ binding[1].name + ".shortcut2",
+ binding[1].shortcut);
+ }
+ }
+
+ public GrabKeyDialog.KeyBinding getBindingAt(int row, int nr)
+ {
+ GrabKeyDialog.KeyBinding[] binding = bindings.get(row);
+ return binding[nr];
+ }
+
+ @Override
+ public String toString()
+ {
+ return name;
+ }
+
+ static private class KeyCompare implements Comparator<GrabKeyDialog.KeyBinding[]>
+ {
+ private int col;
+
+ KeyCompare(int col)
+ {
+ this.col = col;
+ }
+
+ public int compare(GrabKeyDialog.KeyBinding[] k1, GrabKeyDialog.KeyBinding[] k2)
+ {
+ String label1 = k1[0].label.toLowerCase();
+ String label2 = k2[0].label.toLowerCase();
+
+ if(col == 0)
+ return StandardUtilities.compareStrings(
+ label1,label2,true);
+ else
+ {
+ String shortcut1, shortcut2;
+ if(col == 1)
+ {
+ shortcut1 = k1[0].shortcut;
+ shortcut2 = k2[0].shortcut;
+ }
+ else
+ {
+ shortcut1 = k1[1].shortcut;
+ shortcut2 = k2[1].shortcut;
+ }
+
+ if(shortcut1 == null && shortcut2 != null)
+ return 1;
+ else if(shortcut2 == null && shortcut1 != null)
+ return -1;
+ else if(shortcut1 == null)
+ return StandardUtilities.compareStrings(label1,label2,true);
+ else
+ return StandardUtilities.compareStrings(shortcut1,shortcut2,true);
+ }
+ }
+ }
+ } //}}}
+ //}}}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/StatusBarOptionPane.java b/jEdit/org/gjt/sp/jedit/options/StatusBarOptionPane.java
index 5d4bdcf..5c4ef1d 100644
--- a/jEdit/org/gjt/sp/jedit/options/StatusBarOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/StatusBarOptionPane.java
@@ -1,502 +1,514 @@
-/*
- * StatusBarOptionPane.java - Tool bar options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- * Portions Copyright (C) 2000-2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.*;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * Status bar editor.
- * @author Matthieu Casanova
- * @version $Id: StatusBarOptionPane.java 15589 2009-06-26 15:26:42Z daleanson $
- */
-public class StatusBarOptionPane extends AbstractOptionPane
-{
- //{{{ StatusBarOptionPane constructor
- public StatusBarOptionPane()
- {
- super("status");
- } //}}}
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- setLayout(new BorderLayout());
-
- //{{{ North
- JPanel panel = new JPanel(new GridLayout(2,1));
- showStatusbar = new JCheckBox(jEdit.getProperty(
- "options.status.visible"));
- showStatusbar.setSelected(jEdit.getBooleanProperty("view.status.visible"));
- panel.add(showStatusbar);
- showStatusbarPlain = new JCheckBox(jEdit.getProperty(
- "options.status.plainview.visible"));
- showStatusbarPlain.setSelected(jEdit.getBooleanProperty("view.status.plainview.visible"));
- panel.add(showStatusbarPlain);
- panel.add(new JLabel(jEdit.getProperty(
- "options.status.caption")));
- add(panel, BorderLayout.NORTH);
- //}}}
-
- //{{{ Options panel
- AbstractOptionPane optionsPanel = new AbstractOptionPane("Status Options");
- /* Foreground color */
- optionsPanel.addComponent(jEdit.getProperty("options.status.foreground"),
- foregroundColor = new ColorWellButton(
- jEdit.getColorProperty("view.status.foreground")),
- GridBagConstraints.VERTICAL);
-
- /* Background color */
- optionsPanel.addComponent(jEdit.getProperty("options.status.background"),
- backgroundColor = new ColorWellButton(
- jEdit.getColorProperty("view.status.background")),
- GridBagConstraints.VERTICAL);
-
- /* Memory foreground color */
- optionsPanel.addComponent(jEdit.getProperty("options.status.memory.foreground"),
- memForegroundColor = new ColorWellButton(
- jEdit.getColorProperty("view.status.memory.foreground")),
- GridBagConstraints.VERTICAL);
-
- /* Memory background color */
- optionsPanel.addComponent(jEdit.getProperty("options.status.memory.background"),
- memBackgroundColor = new ColorWellButton(
- jEdit.getColorProperty("view.status.memory.background")),
- GridBagConstraints.VERTICAL);
-
- optionsPanel.addSeparator();
- optionsPanel.addComponent(new JLabel(jEdit.getProperty("options.status.caret.title", "Caret position display options:")));
-
- /*
- Caret position format: lineno,dot-virtual (caretpos/bufferlength)
- view.status.show-caret-linenumber -- true shows line number for caret (lineno)
- view.status.show-caret-dot -- true shows offset in line for caret (dot)
- view.status.show-caret-virtual -- true shows virtual offset in line for caret (virtual)
- view.status.show-caret-offset -- true shows caret offset from start of buffer (caretpos)
- view.status.show-caret-bufferlength -- true shows length of buffer (bufferlength)
- */
- showCaretLineNumber = new JCheckBox(jEdit.getProperty("options.status.caret.linenumber", "Show caret line number"),
- jEdit.getBooleanProperty("view.status.show-caret-linenumber", true));
- showCaretLineNumber.setName("showCaretLineNumber");
- showCaretDot = new JCheckBox(jEdit.getProperty("options.status.caret.dot", "Show caret offset from start of line"),
- jEdit.getBooleanProperty("view.status.show-caret-dot", true));
- showCaretDot.setName("showCaretDot");
- showCaretVirtual = new JCheckBox(jEdit.getProperty("options.status.caret.virtual", "Show caret virtual offset from start of line"),
- jEdit.getBooleanProperty("view.status.show-caret-virtual", true));
- showCaretVirtual.setName("showCaretVirtual");
- showCaretOffset = new JCheckBox(jEdit.getProperty("options.status.caret.offset", "Show caret offset from start of file"),
- jEdit.getBooleanProperty("view.status.show-caret-offset", true));
- showCaretOffset.setName("showCaretOffset");
- showCaretBufferLength = new JCheckBox(jEdit.getProperty("options.status.caret.bufferlength", "Show length of file"),
- jEdit.getBooleanProperty("view.status.show-caret-bufferlength", true));
- showCaretBufferLength.setName("showCaretBufferLength");
- optionsPanel.addComponent(showCaretLineNumber);
- optionsPanel.addComponent(showCaretDot);
- optionsPanel.addComponent(showCaretVirtual);
- optionsPanel.addComponent(showCaretOffset);
- optionsPanel.addComponent(showCaretBufferLength);
-
- //}}}
-
-
- //{{{ widgets panel
- String statusbar = jEdit.getProperty("view.status");
- StringTokenizer st = new StringTokenizer(statusbar);
- listModel = new DefaultListModel();
- while (st.hasMoreTokens())
- {
- String token = st.nextToken();
- listModel.addElement(token);
- }
-
-
- list = new JList(listModel);
- list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- list.addListSelectionListener(new ListHandler());
-
- JPanel widgetsPanel = new JPanel(new BorderLayout());
- widgetsPanel.add(new JScrollPane(list), BorderLayout.CENTER);
- //}}}
-
- //{{{ Create buttons
- JPanel buttons = new JPanel();
- buttons.setBorder(new EmptyBorder(3,0,0,0));
- buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
- ActionHandler actionHandler = new ActionHandler();
- add = new RolloverButton(GUIUtilities.loadIcon("Plus.png"));
- add.setToolTipText(jEdit.getProperty("options.status.add"));
- add.addActionListener(actionHandler);
- buttons.add(add);
- buttons.add(Box.createHorizontalStrut(6));
- remove = new RolloverButton(GUIUtilities.loadIcon("Minus.png"));
- remove.setToolTipText(jEdit.getProperty("options.status.remove"));
- remove.addActionListener(actionHandler);
- buttons.add(remove);
- buttons.add(Box.createHorizontalStrut(6));
- moveUp = new RolloverButton(GUIUtilities.loadIcon("ArrowU.png"));
- moveUp.setToolTipText(jEdit.getProperty("options.status.moveUp"));
- moveUp.addActionListener(actionHandler);
- buttons.add(moveUp);
- buttons.add(Box.createHorizontalStrut(6));
- moveDown = new RolloverButton(GUIUtilities.loadIcon("ArrowD.png"));
- moveDown.setToolTipText(jEdit.getProperty("options.status.moveDown"));
- moveDown.addActionListener(actionHandler);
- buttons.add(moveDown);
- buttons.add(Box.createHorizontalStrut(6));
- edit = new RolloverButton(GUIUtilities.loadIcon("ButtonProperties.png"));
- edit.setToolTipText(jEdit.getProperty("options.status.edit"));
- edit.addActionListener(actionHandler);
- buttons.add(edit);
- buttons.add(Box.createGlue());
- //}}}
-
- updateButtons();
- widgetsPanel.add(buttons, BorderLayout.SOUTH);
-
-
- JTabbedPane tabs = new JTabbedPane();
- tabs.addTab("Options",optionsPanel);
- tabs.add("Widgets", widgetsPanel);
-
- add(tabs, BorderLayout.CENTER);
- } ///}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
- jEdit.setColorProperty("view.status.foreground",foregroundColor
- .getSelectedColor());
- jEdit.setColorProperty("view.status.background",backgroundColor
- .getSelectedColor());
- jEdit.setColorProperty("view.status.memory.foreground",memForegroundColor
- .getSelectedColor());
- jEdit.setColorProperty("view.status.memory.background",memBackgroundColor
- .getSelectedColor());
-
- jEdit.setBooleanProperty("view.status.visible",showStatusbar
- .isSelected());
-
- jEdit.setBooleanProperty("view.status.plainview.visible",showStatusbarPlain
- .isSelected());
-
- StringBuilder buf = new StringBuilder();
- for(int i = 0; i < listModel.getSize(); i++)
- {
- if(i != 0)
- buf.append(' ');
-
- String widgetName = (String) listModel.elementAt(i);
- buf.append(widgetName);
- }
- jEdit.setProperty("view.status",buf.toString());
-
- jEdit.setBooleanProperty("view.status.show-caret-linenumber", showCaretLineNumber.isSelected());
- jEdit.setBooleanProperty("view.status.show-caret-dot", showCaretDot.isSelected());
- jEdit.setBooleanProperty("view.status.show-caret-virtual", showCaretVirtual.isSelected());
- jEdit.setBooleanProperty("view.status.show-caret-offset", showCaretOffset.isSelected());
- jEdit.setBooleanProperty("view.status.show-caret-bufferlength", showCaretBufferLength.isSelected());
-
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private ColorWellButton foregroundColor;
- private ColorWellButton backgroundColor;
- private ColorWellButton memForegroundColor;
- private ColorWellButton memBackgroundColor;
- private JCheckBox showStatusbar;
- private JCheckBox showStatusbarPlain;
- private DefaultListModel listModel;
- private JList list;
- private RolloverButton add;
- private RolloverButton remove;
- private RolloverButton moveUp, moveDown;
- private RolloverButton edit;
-
- private JCheckBox showCaretLineNumber;
- private JCheckBox showCaretDot;
- private JCheckBox showCaretVirtual;
- private JCheckBox showCaretOffset;
- private JCheckBox showCaretBufferLength;
- //}}}
-
- //{{{ updateButtons() method
- private void updateButtons()
- {
- int index = list.getSelectedIndex();
- remove.setEnabled(index != -1 && listModel.getSize() != 0);
- moveUp.setEnabled(index > 0);
- moveDown.setEnabled(index != -1 && index != listModel.getSize() - 1);
- edit.setEnabled(index != -1);
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
-
- if(source == add)
- {
- String value = selectWidget();
- if (value == null)
- return;
-
-
- int index = list.getSelectedIndex();
- if(index == -1)
- index = listModel.getSize();
- else
- index++;
-
- listModel.insertElementAt(value,index);
- list.setSelectedIndex(index);
- list.ensureIndexIsVisible(index);
- }
- else if(source == remove)
- {
- int index = list.getSelectedIndex();
- listModel.removeElementAt(index);
- if(listModel.getSize() != 0)
- {
- if(listModel.getSize() == index)
- list.setSelectedIndex(index-1);
- else
- list.setSelectedIndex(index);
- }
- updateButtons();
- }
- else if(source == moveUp)
- {
- int index = list.getSelectedIndex();
- Object selected = list.getSelectedValue();
- listModel.removeElementAt(index);
- listModel.insertElementAt(selected,index-1);
- list.setSelectedIndex(index-1);
- list.ensureIndexIsVisible(index-1);
- }
- else if(source == moveDown)
- {
- int index = list.getSelectedIndex();
- Object selected = list.getSelectedValue();
- listModel.removeElementAt(index);
- listModel.insertElementAt(selected,index+1);
- list.setSelectedIndex(index+1);
- list.ensureIndexIsVisible(index+1);
- }
- else if(source == edit)
- {
- String value = selectWidget();
- if (value == null)
- return;
-
- int index = list.getSelectedIndex();
-
- listModel.insertElementAt(value,index);
- list.setSelectedIndex(index);
- list.ensureIndexIsVisible(index);
- }
- }
-
- private String selectWidget()
- {
- WidgetSelectionDialog dialog = new WidgetSelectionDialog(StatusBarOptionPane.this);
- String value = dialog.getValue();
- if (value != null && value.length() == 0)
- value = null;
- return value;
- }
- } //}}}
-
- //{{{ ListHandler class
- private class ListHandler implements ListSelectionListener
- {
- public void valueChanged(ListSelectionEvent evt)
- {
- updateButtons();
- }
- } //}}}
-
- //}}}
-
- //{{{ WidgetSelectionDialog class
- private class WidgetSelectionDialog extends EnhancedDialog
- {
- private JButton ok;
- private JButton cancel;
- private JTextField labelField;
- private JLabel labelLabel;
- private JRadioButton labelRadio;
- private JComboBox widgetCombo;
- private JLabel widgetLabel;
- private JRadioButton widgetRadio;
- private String value;
-
- //{{{ WidgetSelectionDialog constructor
- WidgetSelectionDialog(Component comp)
- {
- super(GUIUtilities.getParentDialog(comp),
- jEdit.getProperty("options.status.edit.title"),
- true);
- ButtonGroup buttonGroup = new ButtonGroup();
- labelRadio = new JRadioButton(jEdit.getProperty("options.status.edit.labelRadioButton"));
- widgetRadio = new JRadioButton(jEdit.getProperty("options.status.edit.widgetRadioButton"));
- buttonGroup.add(labelRadio);
- buttonGroup.add(widgetRadio);
-
- labelLabel = new JLabel(jEdit.getProperty("options.status.edit.labelLabel"));
- labelField = new JTextField();
-
- widgetLabel = new JLabel(jEdit.getProperty("options.status.edit.widgetLabel"));
- widgetCombo = new JComboBox(ServiceManager.getServiceNames("org.gjt.sp.jedit.gui.statusbar.StatusWidget"));
-
- ActionHandler actionHandler = new ActionHandler();
- labelRadio.addActionListener(actionHandler);
- widgetRadio.addActionListener(actionHandler);
- //{{{ south panel
- JPanel southPanel = new JPanel();
- southPanel.setLayout(new BoxLayout(southPanel,BoxLayout.X_AXIS));
- southPanel.setBorder(new EmptyBorder(12,0,0,0));
- southPanel.add(Box.createGlue());
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(actionHandler);
- getRootPane().setDefaultButton(ok);
- southPanel.add(ok);
- southPanel.add(Box.createHorizontalStrut(6));
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(actionHandler);
- southPanel.add(cancel);
- southPanel.add(Box.createGlue());
- //}}}
-
- labelField.setEnabled(false);
- widgetRadio.setSelected(true);
-
-
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
- JPanel center = new JPanel();
- center.setLayout(new BoxLayout(center,BoxLayout.Y_AXIS));
-
- center.add(labelRadio);
- JPanel p = new JPanel(new BorderLayout());
- p.add(labelLabel, BorderLayout.WEST);
- p.add(labelField);
- center.add(p);
- center.add(widgetRadio);
- p = new JPanel(new BorderLayout());
- p.add(widgetLabel, BorderLayout.WEST);
- p.add(widgetCombo);
- center.add(p);
-
-
-
- getContentPane().add(center, BorderLayout.CENTER);
- getContentPane().add(southPanel, BorderLayout.SOUTH);
- pack();
- setLocationRelativeTo(GUIUtilities.getParentDialog(comp));
- setVisible(true);
- } //}}}
-
- //{{{ ok() method
- @Override
- public void ok()
- {
- if (widgetRadio.isSelected())
- {
- value = (String) widgetCombo.getSelectedItem();
- }
- else
- {
- value = labelField.getText().trim();
- }
- dispose();
- } //}}}
-
- //{{{ cancel() method
- @Override
- public void cancel()
- {
- value = null;
- dispose();
- } //}}}
-
- //{{{ getValue() method
- public String getValue()
- {
- return value;
- } //}}}
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if (source == ok)
- {
- ok();
- }
- else if (source == cancel)
- {
- cancel();
- }
- else if (source == labelRadio)
- {
- labelField.setEnabled(true);
- widgetCombo.setEnabled(false);
- validate();
- }
- else if (source == widgetRadio)
- {
- labelField.setEnabled(false);
- widgetCombo.setEnabled(true);
- validate();
- }
- } //}}}
-
- } //}}}
-
- } //}}}
-
-}
-
+/*
+ * StatusBarOptionPane.java - Tool bar options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008-2010 Matthieu Casanova
+ * Portions Copyright (C) 2000-2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.event.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.*;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * Status bar editor.
+ * @author Matthieu Casanova
+ * @version $Id: StatusBarOptionPane.java 17501 2010-03-19 21:30:21Z kpouer $
+ */
+public class StatusBarOptionPane extends AbstractOptionPane
+{
+ //{{{ StatusBarOptionPane constructor
+ public StatusBarOptionPane()
+ {
+ super("status");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ setLayout(new BorderLayout());
+
+ //{{{ North
+ JPanel panel = new JPanel(new GridLayout(2,1));
+ showStatusbar = new JCheckBox(jEdit.getProperty(
+ "options.status.visible"));
+ showStatusbar.setSelected(jEdit.getBooleanProperty("view.status.visible"));
+ panel.add(showStatusbar);
+ showStatusbarPlain = new JCheckBox(jEdit.getProperty(
+ "options.status.plainview.visible"));
+ showStatusbarPlain.setSelected(jEdit.getBooleanProperty("view.status.plainview.visible"));
+ panel.add(showStatusbarPlain);
+ panel.add(new JLabel(jEdit.getProperty(
+ "options.status.caption")));
+ add(panel, BorderLayout.NORTH);
+ //}}}
+
+ //{{{ Options panel
+ AbstractOptionPane optionsPanel = new AbstractOptionPane("Status Options");
+ /* Foreground color */
+ optionsPanel.addComponent(jEdit.getProperty("options.status.foreground"),
+ foregroundColor = new ColorWellButton(
+ jEdit.getColorProperty("view.status.foreground")),
+ GridBagConstraints.VERTICAL);
+
+ /* Background color */
+ optionsPanel.addComponent(jEdit.getProperty("options.status.background"),
+ backgroundColor = new ColorWellButton(
+ jEdit.getColorProperty("view.status.background")),
+ GridBagConstraints.VERTICAL);
+
+ /* Memory foreground color */
+ optionsPanel.addComponent(jEdit.getProperty("options.status.memory.foreground"),
+ memForegroundColor = new ColorWellButton(
+ jEdit.getColorProperty("view.status.memory.foreground")),
+ GridBagConstraints.VERTICAL);
+
+ /* Memory background color */
+ optionsPanel.addComponent(jEdit.getProperty("options.status.memory.background"),
+ memBackgroundColor = new ColorWellButton(
+ jEdit.getColorProperty("view.status.memory.background")),
+ GridBagConstraints.VERTICAL);
+
+ optionsPanel.addSeparator();
+ optionsPanel.addComponent(new JLabel(jEdit.getProperty("options.status.caret.title", "Caret position display options:")));
+
+ /*
+ Caret position format: lineno,dot-virtual (caretpos/bufferlength)
+ view.status.show-caret-linenumber -- true shows line number for caret (lineno)
+ view.status.show-caret-dot -- true shows offset in line for caret (dot)
+ view.status.show-caret-virtual -- true shows virtual offset in line for caret (virtual)
+ view.status.show-caret-offset -- true shows caret offset from start of buffer (caretpos)
+ view.status.show-caret-bufferlength -- true shows length of buffer (bufferlength)
+ */
+ showCaretLineNumber = new JCheckBox(jEdit.getProperty("options.status.caret.linenumber", "Show caret line number"),
+ jEdit.getBooleanProperty("view.status.show-caret-linenumber", true));
+ showCaretLineNumber.setName("showCaretLineNumber");
+ showCaretDot = new JCheckBox(jEdit.getProperty("options.status.caret.dot", "Show caret offset from start of line"),
+ jEdit.getBooleanProperty("view.status.show-caret-dot", true));
+ showCaretDot.setName("showCaretDot");
+ showCaretVirtual = new JCheckBox(jEdit.getProperty("options.status.caret.virtual", "Show caret virtual offset from start of line"),
+ jEdit.getBooleanProperty("view.status.show-caret-virtual", true));
+ showCaretVirtual.setName("showCaretVirtual");
+ showCaretOffset = new JCheckBox(jEdit.getProperty("options.status.caret.offset", "Show caret offset from start of file"),
+ jEdit.getBooleanProperty("view.status.show-caret-offset", true));
+ showCaretOffset.setName("showCaretOffset");
+ showCaretBufferLength = new JCheckBox(jEdit.getProperty("options.status.caret.bufferlength", "Show length of file"),
+ jEdit.getBooleanProperty("view.status.show-caret-bufferlength", true));
+ showCaretBufferLength.setName("showCaretBufferLength");
+ optionsPanel.addComponent(showCaretLineNumber);
+ optionsPanel.addComponent(showCaretDot);
+ optionsPanel.addComponent(showCaretVirtual);
+ optionsPanel.addComponent(showCaretOffset);
+ optionsPanel.addComponent(showCaretBufferLength);
+
+ //}}}
+
+
+ //{{{ widgets panel
+ String statusbar = jEdit.getProperty("view.status");
+ StringTokenizer st = new StringTokenizer(statusbar);
+ listModel = new DefaultListModel();
+ while (st.hasMoreTokens())
+ {
+ String token = st.nextToken();
+ listModel.addElement(token);
+ }
+
+
+ list = new JList(listModel);
+ list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ list.addListSelectionListener(new ListHandler());
+
+ JPanel widgetsPanel = new JPanel(new BorderLayout());
+ widgetsPanel.add(new JScrollPane(list), BorderLayout.CENTER);
+ //}}}
+
+ //{{{ Create buttons
+ JPanel buttons = new JPanel();
+ buttons.setBorder(new EmptyBorder(3,0,0,0));
+ buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
+ ActionHandler actionHandler = new ActionHandler();
+ add = new RolloverButton(GUIUtilities.loadIcon("Plus.png"));
+ add.setToolTipText(jEdit.getProperty("options.status.add"));
+ add.addActionListener(actionHandler);
+ buttons.add(add);
+ buttons.add(Box.createHorizontalStrut(6));
+ remove = new RolloverButton(GUIUtilities.loadIcon("Minus.png"));
+ remove.setToolTipText(jEdit.getProperty("options.status.remove"));
+ remove.addActionListener(actionHandler);
+ buttons.add(remove);
+ buttons.add(Box.createHorizontalStrut(6));
+ moveUp = new RolloverButton(GUIUtilities.loadIcon("ArrowU.png"));
+ moveUp.setToolTipText(jEdit.getProperty("options.status.moveUp"));
+ moveUp.addActionListener(actionHandler);
+ buttons.add(moveUp);
+ buttons.add(Box.createHorizontalStrut(6));
+ moveDown = new RolloverButton(GUIUtilities.loadIcon("ArrowD.png"));
+ moveDown.setToolTipText(jEdit.getProperty("options.status.moveDown"));
+ moveDown.addActionListener(actionHandler);
+ buttons.add(moveDown);
+ buttons.add(Box.createHorizontalStrut(6));
+ edit = new RolloverButton(GUIUtilities.loadIcon("ButtonProperties.png"));
+ edit.setToolTipText(jEdit.getProperty("options.status.edit"));
+ edit.addActionListener(actionHandler);
+ buttons.add(edit);
+ buttons.add(Box.createGlue());
+ //}}}
+
+ updateButtons();
+ widgetsPanel.add(buttons, BorderLayout.SOUTH);
+
+
+ JTabbedPane tabs = new JTabbedPane();
+ tabs.addTab("Options",optionsPanel);
+ tabs.add("Widgets", widgetsPanel);
+
+ add(tabs, BorderLayout.CENTER);
+ } ///}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ jEdit.setColorProperty("view.status.foreground",foregroundColor
+ .getSelectedColor());
+ jEdit.setColorProperty("view.status.background",backgroundColor
+ .getSelectedColor());
+ jEdit.setColorProperty("view.status.memory.foreground",memForegroundColor
+ .getSelectedColor());
+ jEdit.setColorProperty("view.status.memory.background",memBackgroundColor
+ .getSelectedColor());
+
+ jEdit.setBooleanProperty("view.status.visible",showStatusbar
+ .isSelected());
+
+ jEdit.setBooleanProperty("view.status.plainview.visible",showStatusbarPlain
+ .isSelected());
+
+ StringBuilder buf = new StringBuilder();
+ for(int i = 0; i < listModel.getSize(); i++)
+ {
+ if(i != 0)
+ buf.append(' ');
+
+ String widgetName = (String) listModel.elementAt(i);
+ buf.append(widgetName);
+ }
+ jEdit.setProperty("view.status",buf.toString());
+
+ jEdit.setBooleanProperty("view.status.show-caret-linenumber", showCaretLineNumber.isSelected());
+ jEdit.setBooleanProperty("view.status.show-caret-dot", showCaretDot.isSelected());
+ jEdit.setBooleanProperty("view.status.show-caret-virtual", showCaretVirtual.isSelected());
+ jEdit.setBooleanProperty("view.status.show-caret-offset", showCaretOffset.isSelected());
+ jEdit.setBooleanProperty("view.status.show-caret-bufferlength", showCaretBufferLength.isSelected());
+
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private ColorWellButton foregroundColor;
+ private ColorWellButton backgroundColor;
+ private ColorWellButton memForegroundColor;
+ private ColorWellButton memBackgroundColor;
+ private JCheckBox showStatusbar;
+ private JCheckBox showStatusbarPlain;
+ private DefaultListModel listModel;
+ private JList list;
+ private RolloverButton add;
+ private RolloverButton remove;
+ private RolloverButton moveUp, moveDown;
+ private RolloverButton edit;
+
+ private JCheckBox showCaretLineNumber;
+ private JCheckBox showCaretDot;
+ private JCheckBox showCaretVirtual;
+ private JCheckBox showCaretOffset;
+ private JCheckBox showCaretBufferLength;
+ //}}}
+
+ //{{{ updateButtons() method
+ private void updateButtons()
+ {
+ int index = list.getSelectedIndex();
+ remove.setEnabled(index != -1 && listModel.getSize() != 0);
+ moveUp.setEnabled(index > 0);
+ moveDown.setEnabled(index != -1 && index != listModel.getSize() - 1);
+ edit.setEnabled(index != -1);
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+
+ if(source == add)
+ {
+ String value = selectWidget();
+ if (value == null)
+ return;
+
+
+ int index = list.getSelectedIndex();
+ if(index == -1)
+ index = listModel.getSize();
+ else
+ index++;
+
+ listModel.insertElementAt(value,index);
+ list.setSelectedIndex(index);
+ list.ensureIndexIsVisible(index);
+ }
+ else if(source == remove)
+ {
+ int index = list.getSelectedIndex();
+ listModel.removeElementAt(index);
+ if(listModel.getSize() != 0)
+ {
+ if(listModel.getSize() == index)
+ list.setSelectedIndex(index-1);
+ else
+ list.setSelectedIndex(index);
+ }
+ updateButtons();
+ }
+ else if(source == moveUp)
+ {
+ int index = list.getSelectedIndex();
+ Object selected = list.getSelectedValue();
+ listModel.removeElementAt(index);
+ listModel.insertElementAt(selected,index-1);
+ list.setSelectedIndex(index-1);
+ list.ensureIndexIsVisible(index-1);
+ }
+ else if(source == moveDown)
+ {
+ int index = list.getSelectedIndex();
+ Object selected = list.getSelectedValue();
+ listModel.removeElementAt(index);
+ listModel.insertElementAt(selected,index+1);
+ list.setSelectedIndex(index+1);
+ list.ensureIndexIsVisible(index+1);
+ }
+ else if(source == edit)
+ {
+ String value = selectWidget();
+ if (value == null)
+ return;
+
+ int index = list.getSelectedIndex();
+
+ listModel.insertElementAt(value,index);
+ list.setSelectedIndex(index);
+ list.ensureIndexIsVisible(index);
+ }
+ }
+
+ private String selectWidget()
+ {
+ WidgetSelectionDialog dialog = new WidgetSelectionDialog(StatusBarOptionPane.this);
+ String value = dialog.getValue();
+ if (value != null && value.length() == 0)
+ value = null;
+ return value;
+ }
+ } //}}}
+
+ //{{{ ListHandler class
+ private class ListHandler implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent evt)
+ {
+ updateButtons();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ WidgetSelectionDialog class
+ private class WidgetSelectionDialog extends EnhancedDialog
+ {
+ private JButton ok;
+ private JButton cancel;
+ private JTextField labelField;
+ private JLabel labelLabel;
+ private JRadioButton labelRadio;
+ private JComboBox widgetCombo;
+ private JLabel widgetLabel;
+ private JRadioButton widgetRadio;
+ private String value;
+
+ //{{{ WidgetSelectionDialog constructor
+ WidgetSelectionDialog(Component comp)
+ {
+ super(GUIUtilities.getParentDialog(comp),
+ jEdit.getProperty("options.status.edit.title"),
+ true);
+ ButtonGroup buttonGroup = new ButtonGroup();
+ labelRadio = new JRadioButton(jEdit.getProperty("options.status.edit.labelRadioButton"));
+ widgetRadio = new JRadioButton(jEdit.getProperty("options.status.edit.widgetRadioButton"));
+ buttonGroup.add(labelRadio);
+ buttonGroup.add(widgetRadio);
+
+ labelLabel = new JLabel(jEdit.getProperty("options.status.edit.labelLabel"));
+ labelField = new JTextField();
+
+ widgetLabel = new JLabel(jEdit.getProperty("options.status.edit.widgetLabel"));
+
+ String[] allWidgets = ServiceManager.getServiceNames("org.gjt.sp.jedit.gui.statusbar.StatusWidget");
+ Vector<String> widgets = new Vector<String>(allWidgets.length);
+ Set<String> usedWidget = new HashSet<String>(listModel.getSize());
+ for (int i = 0; i < listModel.getSize(); i++)
+ {
+ usedWidget.add((String) listModel.get(i));
+ }
+ for (String widget : allWidgets)
+ {
+ if (!usedWidget.contains(widget))
+ widgets.add(widget);
+ }
+ widgetCombo = new JComboBox(widgets);
+ ActionHandler actionHandler = new ActionHandler();
+ labelRadio.addActionListener(actionHandler);
+ widgetRadio.addActionListener(actionHandler);
+ //{{{ south panel
+ JPanel southPanel = new JPanel();
+ southPanel.setLayout(new BoxLayout(southPanel,BoxLayout.X_AXIS));
+ southPanel.setBorder(new EmptyBorder(12,0,0,0));
+ southPanel.add(Box.createGlue());
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(actionHandler);
+ getRootPane().setDefaultButton(ok);
+ southPanel.add(ok);
+ southPanel.add(Box.createHorizontalStrut(6));
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(actionHandler);
+ southPanel.add(cancel);
+ southPanel.add(Box.createGlue());
+ //}}}
+
+ labelField.setEnabled(false);
+ widgetRadio.setSelected(true);
+
+
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+ JPanel center = new JPanel();
+ center.setLayout(new BoxLayout(center,BoxLayout.Y_AXIS));
+
+ center.add(labelRadio);
+ JPanel p = new JPanel(new BorderLayout());
+ p.add(labelLabel, BorderLayout.WEST);
+ p.add(labelField);
+ center.add(p);
+ center.add(widgetRadio);
+ p = new JPanel(new BorderLayout());
+ p.add(widgetLabel, BorderLayout.WEST);
+ p.add(widgetCombo);
+ center.add(p);
+
+
+
+ getContentPane().add(center, BorderLayout.CENTER);
+ getContentPane().add(southPanel, BorderLayout.SOUTH);
+ pack();
+ setLocationRelativeTo(GUIUtilities.getParentDialog(comp));
+ setVisible(true);
+ } //}}}
+
+ //{{{ ok() method
+ @Override
+ public void ok()
+ {
+ if (widgetRadio.isSelected())
+ {
+ value = (String) widgetCombo.getSelectedItem();
+ }
+ else
+ {
+ value = labelField.getText().trim();
+ }
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ @Override
+ public void cancel()
+ {
+ value = null;
+ dispose();
+ } //}}}
+
+ //{{{ getValue() method
+ public String getValue()
+ {
+ return value;
+ } //}}}
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if (source == ok)
+ {
+ ok();
+ }
+ else if (source == cancel)
+ {
+ cancel();
+ }
+ else if (source == labelRadio)
+ {
+ labelField.setEnabled(true);
+ widgetCombo.setEnabled(false);
+ validate();
+ }
+ else if (source == widgetRadio)
+ {
+ labelField.setEnabled(false);
+ widgetCombo.setEnabled(true);
+ validate();
+ }
+ } //}}}
+
+ } //}}}
+
+ } //}}}
+
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/options/SyntaxHiliteOptionPane.java b/jEdit/org/gjt/sp/jedit/options/SyntaxHiliteOptionPane.java
index b72b96f..59d1ead 100644
--- a/jEdit/org/gjt/sp/jedit/options/SyntaxHiliteOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/SyntaxHiliteOptionPane.java
@@ -1,305 +1,305 @@
-/*
- * SyntaxHiliteOptionPane.java - Syntax highlighting option pane
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000, 2001 Slava Pestov
- * Portions copyright (C) 1999 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.border.EmptyBorder;
-import javax.swing.table.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.util.Vector;
-import java.util.Collections;
-
-import org.gjt.sp.jedit.syntax.*;
-import org.gjt.sp.jedit.gui.StyleEditor;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-//{{{ SyntaxHiliteOptionPane class
-/**
- * Style option pane.
- * @author Slava Pestov
- * @version $Id: SyntaxHiliteOptionPane.java 14127 2008-12-01 10:10:57Z kpouer $
- */
-public class SyntaxHiliteOptionPane extends AbstractOptionPane
-{
- public static final EmptyBorder noFocusBorder = new EmptyBorder(1,1,1,1);
-
- //{{{ StyleOptionPane constructor
- public SyntaxHiliteOptionPane()
- {
- super("syntax");
- }
- //}}}
-
- //{{{ Protected members
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- setLayout(new BorderLayout(6,6));
-
- add(BorderLayout.CENTER,createStyleTableScroller());
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
- styleModel.save();
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private StyleTableModel styleModel;
- private JTable styleTable;
-
- //{{{ createStyleTableScroller() method
- private JScrollPane createStyleTableScroller()
- {
- styleModel = createStyleTableModel();
- styleTable = new JTable(styleModel);
- styleTable.setRowSelectionAllowed(false);
- styleTable.setColumnSelectionAllowed(false);
- styleTable.setCellSelectionEnabled(false);
- styleTable.getTableHeader().setReorderingAllowed(false);
- styleTable.addMouseListener(new MouseHandler());
- TableColumnModel tcm = styleTable.getColumnModel();
- TableColumn styleColumn = tcm.getColumn(1);
- styleColumn.setCellRenderer(new StyleTableModel.StyleRenderer());
- Dimension d = styleTable.getPreferredSize();
- d.height = Math.min(d.height,100);
- JScrollPane scroller = new JScrollPane(styleTable);
- scroller.setPreferredSize(d);
- return scroller;
- } //}}}
-
- //{{{ createStyleTableModel() method
- private static StyleTableModel createStyleTableModel()
- {
- return new StyleTableModel();
- } //}}}
-
- //}}}
-
- //{{{ MouseHandler class
- private class MouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- int row = styleTable.rowAtPoint(evt.getPoint());
- if(row == -1)
- return;
-
- SyntaxStyle style;
- SyntaxStyle current = (SyntaxStyle)styleModel.getValueAt(row,1);
- String token = (String) styleModel.getValueAt(row, 0);
- JDialog dialog = GUIUtilities.getParentDialog(
- SyntaxHiliteOptionPane.this);
- if (dialog != null)
- style = new StyleEditor(dialog, current, token).getStyle();
- else
- {
- View view = GUIUtilities.getView(SyntaxHiliteOptionPane.this);
- style = new StyleEditor(view, current, token).getStyle();
- }
- if(style != null)
- styleModel.setValueAt(style,row,1);
- }
- } //}}}
-
- //{{{ StyleTableModel class
- private static class StyleTableModel extends AbstractTableModel
- {
- private final java.util.List<StyleChoice> styleChoices;
-
- //{{{ StyleTableModel constructor
- StyleTableModel()
- {
- styleChoices = new Vector<StyleChoice>(Token.ID_COUNT + 4);
- // start at 1 not 0 to skip Token.NULL
- for(int i = 1; i < Token.ID_COUNT; i++)
- {
- String tokenName = Token.tokenToString((byte)i);
- addStyleChoice(tokenName,"view.style." + tokenName.toLowerCase());
- }
-
- addStyleChoice(jEdit.getProperty("options.syntax.foldLine.1"),
- "view.style.foldLine.1");
- addStyleChoice(jEdit.getProperty("options.syntax.foldLine.2"),
- "view.style.foldLine.2");
- addStyleChoice(jEdit.getProperty("options.syntax.foldLine.3"),
- "view.style.foldLine.3");
- addStyleChoice(jEdit.getProperty("options.syntax.foldLine.0"),
- "view.style.foldLine.0");
-
- Collections.sort(styleChoices,new StandardUtilities.StringCompare<StyleChoice>(true));
- } //}}}
-
- //{{{ getColumnCount() method
- public int getColumnCount()
- {
- return 2;
- } //}}}
-
- //{{{ getRowCount() method
- public int getRowCount()
- {
- return styleChoices.size();
- } //}}}
-
- //{{{ getValueAt() method
- public Object getValueAt(int row, int col)
- {
- StyleChoice ch = styleChoices.get(row);
- switch(col)
- {
- case 0:
- return ch.label;
- case 1:
- return ch.style;
- default:
- return null;
- }
- } //}}}
-
- //{{{ setValueAt() method
- @Override
- public void setValueAt(Object value, int row, int col)
- {
- StyleChoice ch = styleChoices.get(row);
- if(col == 1)
- ch.style = (SyntaxStyle)value;
- fireTableRowsUpdated(row,row);
- } //}}}
-
- //{{{ getColumnName() method
- @Override
- public String getColumnName(int index)
- {
- switch(index)
- {
- case 0:
- return jEdit.getProperty("options.syntax.object");
- case 1:
- return jEdit.getProperty("options.syntax.style");
- default:
- return null;
- }
- } //}}}
-
- //{{{ save() method
- public void save()
- {
- for(int i = 0; i < styleChoices.size(); i++)
- {
- StyleChoice ch = styleChoices
- .get(i);
- jEdit.setProperty(ch.property,
- GUIUtilities.getStyleString(ch.style));
- }
- } //}}}
-
- //{{{ addStyleChoice() method
- private void addStyleChoice(String label, String property)
- {
- styleChoices.add(new StyleChoice(label,
- property,
- GUIUtilities.parseStyle(jEdit.getProperty(property),
- "Dialog",12)));
- } //}}}
-
- //{{{ StyleChoice class
- private static class StyleChoice
- {
- private String label;
- private String property;
- private SyntaxStyle style;
-
- StyleChoice(String label, String property, SyntaxStyle style)
- {
- this.label = label;
- this.property = property;
- this.style = style;
- }
-
- // for sorting
- @Override
- public String toString()
- {
- return label;
- }
- } //}}}
-
- //{{{ StyleRenderer class
- static class StyleRenderer extends JLabel
- implements TableCellRenderer
- {
- //{{{ StyleRenderer constructor
- StyleRenderer()
- {
- setOpaque(true);
- setBorder(SyntaxHiliteOptionPane.noFocusBorder);
- setText("Hello World");
- } //}}}
-
- //{{{ getTableCellRendererComponent() method
- public Component getTableCellRendererComponent(
- JTable table,
- Object value,
- boolean isSelected,
- boolean cellHasFocus,
- int row,
- int col)
- {
- if (value != null)
- {
- SyntaxStyle style = (SyntaxStyle)value;
- setForeground(style.getForegroundColor());
- if (style.getBackgroundColor() != null)
- setBackground(style.getBackgroundColor());
- else
- {
- // this part sucks
- setBackground(jEdit.getColorProperty(
- "view.bgColor"));
- }
- setFont(style.getFont());
- }
-
- setBorder(cellHasFocus ? UIManager.getBorder(
- "Table.focusCellHighlightBorder")
- : SyntaxHiliteOptionPane.noFocusBorder);
- return this;
- } //}}}
- } //}}}
- } //}}}
-
-} //}}}
-
+/*
+ * SyntaxHiliteOptionPane.java - Syntax highlighting option pane
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000, 2001 Slava Pestov
+ * Portions copyright (C) 1999 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.border.EmptyBorder;
+import javax.swing.table.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.Vector;
+import java.util.Collections;
+
+import org.gjt.sp.jedit.syntax.*;
+import org.gjt.sp.jedit.gui.StyleEditor;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+//{{{ SyntaxHiliteOptionPane class
+/**
+ * Style option pane.
+ * @author Slava Pestov
+ * @version $Id: SyntaxHiliteOptionPane.java 14127 2008-12-01 10:10:57Z kpouer $
+ */
+public class SyntaxHiliteOptionPane extends AbstractOptionPane
+{
+ public static final EmptyBorder noFocusBorder = new EmptyBorder(1,1,1,1);
+
+ //{{{ StyleOptionPane constructor
+ public SyntaxHiliteOptionPane()
+ {
+ super("syntax");
+ }
+ //}}}
+
+ //{{{ Protected members
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ setLayout(new BorderLayout(6,6));
+
+ add(BorderLayout.CENTER,createStyleTableScroller());
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ styleModel.save();
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private StyleTableModel styleModel;
+ private JTable styleTable;
+
+ //{{{ createStyleTableScroller() method
+ private JScrollPane createStyleTableScroller()
+ {
+ styleModel = createStyleTableModel();
+ styleTable = new JTable(styleModel);
+ styleTable.setRowSelectionAllowed(false);
+ styleTable.setColumnSelectionAllowed(false);
+ styleTable.setCellSelectionEnabled(false);
+ styleTable.getTableHeader().setReorderingAllowed(false);
+ styleTable.addMouseListener(new MouseHandler());
+ TableColumnModel tcm = styleTable.getColumnModel();
+ TableColumn styleColumn = tcm.getColumn(1);
+ styleColumn.setCellRenderer(new StyleTableModel.StyleRenderer());
+ Dimension d = styleTable.getPreferredSize();
+ d.height = Math.min(d.height,100);
+ JScrollPane scroller = new JScrollPane(styleTable);
+ scroller.setPreferredSize(d);
+ return scroller;
+ } //}}}
+
+ //{{{ createStyleTableModel() method
+ private static StyleTableModel createStyleTableModel()
+ {
+ return new StyleTableModel();
+ } //}}}
+
+ //}}}
+
+ //{{{ MouseHandler class
+ private class MouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ int row = styleTable.rowAtPoint(evt.getPoint());
+ if(row == -1)
+ return;
+
+ SyntaxStyle style;
+ SyntaxStyle current = (SyntaxStyle)styleModel.getValueAt(row,1);
+ String token = (String) styleModel.getValueAt(row, 0);
+ JDialog dialog = GUIUtilities.getParentDialog(
+ SyntaxHiliteOptionPane.this);
+ if (dialog != null)
+ style = new StyleEditor(dialog, current, token).getStyle();
+ else
+ {
+ View view = GUIUtilities.getView(SyntaxHiliteOptionPane.this);
+ style = new StyleEditor(view, current, token).getStyle();
+ }
+ if(style != null)
+ styleModel.setValueAt(style,row,1);
+ }
+ } //}}}
+
+ //{{{ StyleTableModel class
+ private static class StyleTableModel extends AbstractTableModel
+ {
+ private final java.util.List<StyleChoice> styleChoices;
+
+ //{{{ StyleTableModel constructor
+ StyleTableModel()
+ {
+ styleChoices = new Vector<StyleChoice>(Token.ID_COUNT + 4);
+ // start at 1 not 0 to skip Token.NULL
+ for(int i = 1; i < Token.ID_COUNT; i++)
+ {
+ String tokenName = Token.tokenToString((byte)i);
+ addStyleChoice(tokenName,"view.style." + tokenName.toLowerCase());
+ }
+
+ addStyleChoice(jEdit.getProperty("options.syntax.foldLine.1"),
+ "view.style.foldLine.1");
+ addStyleChoice(jEdit.getProperty("options.syntax.foldLine.2"),
+ "view.style.foldLine.2");
+ addStyleChoice(jEdit.getProperty("options.syntax.foldLine.3"),
+ "view.style.foldLine.3");
+ addStyleChoice(jEdit.getProperty("options.syntax.foldLine.0"),
+ "view.style.foldLine.0");
+
+ Collections.sort(styleChoices,new StandardUtilities.StringCompare<StyleChoice>(true));
+ } //}}}
+
+ //{{{ getColumnCount() method
+ public int getColumnCount()
+ {
+ return 2;
+ } //}}}
+
+ //{{{ getRowCount() method
+ public int getRowCount()
+ {
+ return styleChoices.size();
+ } //}}}
+
+ //{{{ getValueAt() method
+ public Object getValueAt(int row, int col)
+ {
+ StyleChoice ch = styleChoices.get(row);
+ switch(col)
+ {
+ case 0:
+ return ch.label;
+ case 1:
+ return ch.style;
+ default:
+ return null;
+ }
+ } //}}}
+
+ //{{{ setValueAt() method
+ @Override
+ public void setValueAt(Object value, int row, int col)
+ {
+ StyleChoice ch = styleChoices.get(row);
+ if(col == 1)
+ ch.style = (SyntaxStyle)value;
+ fireTableRowsUpdated(row,row);
+ } //}}}
+
+ //{{{ getColumnName() method
+ @Override
+ public String getColumnName(int index)
+ {
+ switch(index)
+ {
+ case 0:
+ return jEdit.getProperty("options.syntax.object");
+ case 1:
+ return jEdit.getProperty("options.syntax.style");
+ default:
+ return null;
+ }
+ } //}}}
+
+ //{{{ save() method
+ public void save()
+ {
+ for(int i = 0; i < styleChoices.size(); i++)
+ {
+ StyleChoice ch = styleChoices
+ .get(i);
+ jEdit.setProperty(ch.property,
+ GUIUtilities.getStyleString(ch.style));
+ }
+ } //}}}
+
+ //{{{ addStyleChoice() method
+ private void addStyleChoice(String label, String property)
+ {
+ styleChoices.add(new StyleChoice(label,
+ property,
+ GUIUtilities.parseStyle(jEdit.getProperty(property),
+ "Dialog",12)));
+ } //}}}
+
+ //{{{ StyleChoice class
+ private static class StyleChoice
+ {
+ private String label;
+ private String property;
+ private SyntaxStyle style;
+
+ StyleChoice(String label, String property, SyntaxStyle style)
+ {
+ this.label = label;
+ this.property = property;
+ this.style = style;
+ }
+
+ // for sorting
+ @Override
+ public String toString()
+ {
+ return label;
+ }
+ } //}}}
+
+ //{{{ StyleRenderer class
+ static class StyleRenderer extends JLabel
+ implements TableCellRenderer
+ {
+ //{{{ StyleRenderer constructor
+ StyleRenderer()
+ {
+ setOpaque(true);
+ setBorder(SyntaxHiliteOptionPane.noFocusBorder);
+ setText("Hello World");
+ } //}}}
+
+ //{{{ getTableCellRendererComponent() method
+ public Component getTableCellRendererComponent(
+ JTable table,
+ Object value,
+ boolean isSelected,
+ boolean cellHasFocus,
+ int row,
+ int col)
+ {
+ if (value != null)
+ {
+ SyntaxStyle style = (SyntaxStyle)value;
+ setForeground(style.getForegroundColor());
+ if (style.getBackgroundColor() != null)
+ setBackground(style.getBackgroundColor());
+ else
+ {
+ // this part sucks
+ setBackground(jEdit.getColorProperty(
+ "view.bgColor"));
+ }
+ setFont(style.getFont());
+ }
+
+ setBorder(cellHasFocus ? UIManager.getBorder(
+ "Table.focusCellHighlightBorder")
+ : SyntaxHiliteOptionPane.noFocusBorder);
+ return this;
+ } //}}}
+ } //}}}
+ } //}}}
+
+} //}}}
+
diff --git a/jEdit/org/gjt/sp/jedit/options/TextAreaOptionPane.java b/jEdit/org/gjt/sp/jedit/options/TextAreaOptionPane.java
index 2caddd6..142d3a6 100644
--- a/jEdit/org/gjt/sp/jedit/options/TextAreaOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/TextAreaOptionPane.java
@@ -1,252 +1,449 @@
-/*
- * TextAreaOptionPane.java - Text area options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 1999, 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.*;
-import org.gjt.sp.jedit.textarea.AntiAlias;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.AbstractOptionPane;
-import org.gjt.sp.jedit.gui.FontSelector;
-import org.gjt.sp.jedit.gui.ColorWellButton;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: TextAreaOptionPane.java 15360 2009-05-28 23:16:42Z k_satoda $
- */
-public class TextAreaOptionPane extends AbstractOptionPane
-{
- //{{{ TextAreaOptionPane constructor
- public TextAreaOptionPane()
- {
- super("textarea");
- } //}}}
-
- //{{{ _init() method
- public void _init()
- {
- /* Font */
- font = new FontSelector(jEdit.getFontProperty("view.font"));
-
- addComponent(jEdit.getProperty("options.textarea.font"),font);
-
- /* Text color */
- addComponent(jEdit.getProperty("options.textarea.foreground"),
- foregroundColor = new ColorWellButton(
- jEdit.getColorProperty("view.fgColor")),
- GridBagConstraints.VERTICAL);
-
- /* Background color */
- addComponent(jEdit.getProperty("options.textarea.background"),
- backgroundColor = new ColorWellButton(
- jEdit.getColorProperty("view.bgColor")),
- GridBagConstraints.VERTICAL);
-
- /* Caret color, caret blink, block caret */
- blinkCaret = new JCheckBox(jEdit.getProperty("options.textarea"
- + ".blinkCaret"));
- blinkCaret.setSelected(jEdit.getBooleanProperty("view.caretBlink"));
-
- blockCaret = new JCheckBox(jEdit.getProperty("options.textarea"
- + ".blockCaret"));
- blockCaret.setSelected(jEdit.getBooleanProperty("view.blockCaret"));
-
- thickCaret = new JCheckBox(jEdit.getProperty("options.textarea"
- + ".thickCaret"));
- thickCaret.setSelected(jEdit.getBooleanProperty("view.thickCaret"));
-
- Box caretSettings = new Box(BoxLayout.X_AXIS);
- caretSettings.add(new JLabel(jEdit.getProperty(
- "options.textarea.caret")));
- caretSettings.add(Box.createHorizontalStrut(6));
- caretSettings.add(blinkCaret);
- caretSettings.add(blockCaret);
- caretSettings.add(thickCaret);
-
- addComponent(caretSettings,caretColor = new ColorWellButton(
- jEdit.getColorProperty("view.caretColor")),
- GridBagConstraints.VERTICAL);
-
- /* Selection color */
- addComponent(jEdit.getProperty("options.textarea.selection"),
- selectionColor = new ColorWellButton(
- jEdit.getColorProperty("view.selectionColor")),
- GridBagConstraints.VERTICAL);
-
- /* Multiple selection color */
- addComponent(jEdit.getProperty("options.textarea.multipleSelection"),
- multipleSelectionColor = new ColorWellButton(
- jEdit.getColorProperty("view.multipleSelectionColor")),
- GridBagConstraints.VERTICAL);
-
- /* Line highlight */
- lineHighlight = new JCheckBox(jEdit.getProperty("options.textarea"
- + ".lineHighlight"));
- lineHighlight.setSelected(jEdit.getBooleanProperty("view.lineHighlight"));
- addComponent(lineHighlight,lineHighlightColor = new ColorWellButton(
- jEdit.getColorProperty("view.lineHighlightColor")),
- GridBagConstraints.VERTICAL);
-
- /* Structure highlight */
- structureHighlight = new JCheckBox(jEdit.getProperty("options.textarea"
- + ".structureHighlight"));
- structureHighlight.setSelected(jEdit.getBooleanProperty(
- "view.structureHighlight"));
- addComponent(structureHighlight,structureHighlightColor = new ColorWellButton(
- jEdit.getColorProperty("view.structureHighlightColor")),
- GridBagConstraints.VERTICAL);
-
- /* EOL markers */
- eolMarkers = new JCheckBox(jEdit.getProperty("options.textarea"
- + ".eolMarkers"));
- eolMarkers.setSelected(jEdit.getBooleanProperty("view.eolMarkers"));
- addComponent(eolMarkers,eolMarkerColor =new ColorWellButton(
- jEdit.getColorProperty("view.eolMarkerColor")),
- GridBagConstraints.VERTICAL);
-
- /* Wrap guide */
- wrapGuide = new JCheckBox(jEdit.getProperty("options.textarea"
- + ".wrapGuide"));
- wrapGuide.setSelected(jEdit.getBooleanProperty("view.wrapGuide"));
- addComponent(wrapGuide,wrapGuideColor = new ColorWellButton(
- jEdit.getColorProperty("view.wrapGuideColor")),
- GridBagConstraints.VERTICAL);
-
- /* Electric borders */
- electricBorders = new JCheckBox(jEdit.getProperty("options.textarea"
- + ".electricBorders"));
- electricBorders.setSelected(!"0".equals(jEdit.getProperty(
- "view.electricBorders")));
- addComponent(electricBorders);
-
- /* Anti-aliasing */
-
- antiAlias = new JComboBox(AntiAlias.comboChoices);
- antiAlias.setToolTipText(jEdit.getProperty("options.textarea.antiAlias.tooltip"));
- AntiAlias antiAliasValue = new AntiAlias(jEdit.getProperty("view.antiAlias"));
- font.setAntiAliasEnabled(antiAliasValue.val()>0);
- antiAlias.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- int idx = antiAlias.getSelectedIndex();
- font.setAntiAliasEnabled(idx > 0);
- font.repaint();
- }
- });
- antiAlias.setSelectedIndex(antiAliasValue.val());
- addComponent(jEdit.getProperty("options.textarea"+ ".antiAlias"), antiAlias);
-
- /* Fractional font metrics */
- fracFontMetrics = new JCheckBox(jEdit.getProperty("options.textarea"
- + ".fracFontMetrics"));
- fracFontMetrics.setSelected(jEdit.getBooleanProperty("view.fracFontMetrics"));
- addComponent(fracFontMetrics);
-
- /* Strip trailing EOL */
- stripTrailingEOL = new JCheckBox(jEdit.getProperty(
- "options.textArea.stripTrailingEOL"));
- stripTrailingEOL.setSelected(jEdit.getBooleanProperty("stripTrailingEOL"));
- addComponent(stripTrailingEOL);
-
- completeFromAllBuffers = new JCheckBox(jEdit.getProperty(
- "options.textArea.completeFromAllBuffers"));
- completeFromAllBuffers.setSelected(jEdit.getBooleanProperty("completeFromAllBuffers"));
- addComponent(completeFromAllBuffers);
-
- } //}}}
-
- //{{{ _save() method
- public void _save()
- {
- jEdit.setFontProperty("view.font",font.getFont());
-
- jEdit.setColorProperty("view.fgColor",foregroundColor
- .getSelectedColor());
- jEdit.setColorProperty("view.bgColor",backgroundColor
- .getSelectedColor());
- jEdit.setBooleanProperty("view.caretBlink",blinkCaret.isSelected());
- jEdit.setBooleanProperty("view.blockCaret",blockCaret.isSelected());
- jEdit.setBooleanProperty("view.thickCaret",thickCaret.isSelected());
- jEdit.setColorProperty("view.caretColor",caretColor
- .getSelectedColor());
- jEdit.setColorProperty("view.selectionColor",selectionColor
- .getSelectedColor());
- jEdit.setColorProperty("view.multipleSelectionColor",multipleSelectionColor
- .getSelectedColor());
- jEdit.setBooleanProperty("view.lineHighlight",lineHighlight
- .isSelected());
- jEdit.setColorProperty("view.lineHighlightColor",
- lineHighlightColor.getSelectedColor());
- jEdit.setBooleanProperty("view.structureHighlight",structureHighlight
- .isSelected());
- jEdit.setColorProperty("view.structureHighlightColor",
- structureHighlightColor.getSelectedColor());
- jEdit.setBooleanProperty("view.eolMarkers",eolMarkers
- .isSelected());
- jEdit.setColorProperty("view.eolMarkerColor",
- eolMarkerColor.getSelectedColor());
- jEdit.setBooleanProperty("view.wrapGuide",wrapGuide
- .isSelected());
- jEdit.setColorProperty("view.wrapGuideColor",
- wrapGuideColor.getSelectedColor());
- jEdit.setIntegerProperty("view.electricBorders",electricBorders
- .isSelected() ? 3 : 0);
- AntiAlias nv = new AntiAlias(jEdit.getProperty("view.antiAlias"));
- nv.set(antiAlias.getSelectedIndex());
- jEdit.setProperty("view.antiAlias", nv.toString());
- jEdit.setBooleanProperty("view.fracFontMetrics",fracFontMetrics.isSelected());
- jEdit.setBooleanProperty("stripTrailingEOL", stripTrailingEOL.isSelected());
- jEdit.setBooleanProperty("completeFromAllBuffers", completeFromAllBuffers.isSelected());
- } //}}}
-
- //{{{ Private members
- private FontSelector font;
- private ColorWellButton foregroundColor;
- private ColorWellButton backgroundColor;
- private JCheckBox blinkCaret;
- private JCheckBox blockCaret;
- private JCheckBox thickCaret;
- private ColorWellButton caretColor;
- private ColorWellButton selectionColor;
- private ColorWellButton multipleSelectionColor;
- private JCheckBox lineHighlight;
- private ColorWellButton lineHighlightColor;
- private JCheckBox structureHighlight;
- private ColorWellButton structureHighlightColor;
- private JCheckBox eolMarkers;
- private ColorWellButton eolMarkerColor;
- private JCheckBox wrapGuide;
- private ColorWellButton wrapGuideColor;
- private JCheckBox electricBorders;
- // private JCheckBox antiAlias;
- private JComboBox antiAlias;
- private JCheckBox fracFontMetrics;
- private JCheckBox stripTrailingEOL;
- private JCheckBox completeFromAllBuffers;
- //}}}
-}
+/*
+ * TextAreaOptionPane.java - Text area options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 1999, 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.*;
+import org.gjt.sp.jedit.textarea.AntiAlias;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.AbstractOptionPane;
+import org.gjt.sp.jedit.gui.FontSelector;
+import org.gjt.sp.jedit.gui.FontSelectorDialog;
+import org.gjt.sp.jedit.gui.ColorWellButton;
+import org.gjt.sp.jedit.gui.RolloverButton;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: TextAreaOptionPane.java 17431 2010-03-07 03:43:57Z vanza $
+ */
+public class TextAreaOptionPane extends AbstractOptionPane
+{
+ //{{{ TextAreaOptionPane constructor
+ public TextAreaOptionPane()
+ {
+ super("textarea");
+ } //}}}
+
+ //{{{ _init() method
+ public void _init()
+ {
+ /* Font */
+ font = new FontSelector(jEdit.getFontProperty("view.font"));
+
+ addComponent(jEdit.getProperty("options.textarea.font"),font);
+
+ fontSubst = new JCheckBox(jEdit.getProperty("options.textarea.fontsubst"));
+ fontSubst.setToolTipText(jEdit.getProperty("options.textarea.fontsubst.tooltip"));
+ fontSubst.setSelected(jEdit.getBooleanProperty("view.enableFontSubst"));
+ fontSubst.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ fontSubstList.setVisible(fontSubst.isSelected());
+ }
+ });
+ addComponent(fontSubst);
+
+ fontSubstList = new FontList();
+ fontSubstList.setVisible(fontSubst.isSelected());
+ addComponent(fontSubstList, GridBagConstraints.HORIZONTAL);
+
+ /* Text color */
+ addComponent(jEdit.getProperty("options.textarea.foreground"),
+ foregroundColor = new ColorWellButton(
+ jEdit.getColorProperty("view.fgColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Background color */
+ addComponent(jEdit.getProperty("options.textarea.background"),
+ backgroundColor = new ColorWellButton(
+ jEdit.getColorProperty("view.bgColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Caret color, caret blink, block caret */
+ blinkCaret = new JCheckBox(jEdit.getProperty("options.textarea"
+ + ".blinkCaret"));
+ blinkCaret.setSelected(jEdit.getBooleanProperty("view.caretBlink"));
+
+ blockCaret = new JCheckBox(jEdit.getProperty("options.textarea"
+ + ".blockCaret"));
+ blockCaret.setSelected(jEdit.getBooleanProperty("view.blockCaret"));
+
+ thickCaret = new JCheckBox(jEdit.getProperty("options.textarea"
+ + ".thickCaret"));
+ thickCaret.setSelected(jEdit.getBooleanProperty("view.thickCaret"));
+
+ Box caretSettings = new Box(BoxLayout.X_AXIS);
+ caretSettings.add(new JLabel(jEdit.getProperty(
+ "options.textarea.caret")));
+ caretSettings.add(Box.createHorizontalStrut(6));
+ caretSettings.add(blinkCaret);
+ caretSettings.add(blockCaret);
+ caretSettings.add(thickCaret);
+
+ addComponent(caretSettings,caretColor = new ColorWellButton(
+ jEdit.getColorProperty("view.caretColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Selection color */
+ addComponent(jEdit.getProperty("options.textarea.selection"),
+ selectionColor = new ColorWellButton(
+ jEdit.getColorProperty("view.selectionColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Multiple selection color */
+ addComponent(jEdit.getProperty("options.textarea.multipleSelection"),
+ multipleSelectionColor = new ColorWellButton(
+ jEdit.getColorProperty("view.multipleSelectionColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Selection foreground color */
+ selectionFg = new JCheckBox(jEdit.getProperty("options.textarea.selectionFg"));
+ selectionFg.setName("selectionFg");
+ selectionFg.setSelected(jEdit.getBooleanProperty("view.selectionFg"));
+ addComponent(selectionFg, selectionFgColor = new ColorWellButton(
+ jEdit.getColorProperty("view.selectionFgColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Line highlight */
+ lineHighlight = new JCheckBox(jEdit.getProperty("options.textarea"
+ + ".lineHighlight"));
+ lineHighlight.setSelected(jEdit.getBooleanProperty("view.lineHighlight"));
+ addComponent(lineHighlight,lineHighlightColor = new ColorWellButton(
+ jEdit.getColorProperty("view.lineHighlightColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Structure highlight */
+ structureHighlight = new JCheckBox(jEdit.getProperty("options.textarea"
+ + ".structureHighlight"));
+ structureHighlight.setSelected(jEdit.getBooleanProperty(
+ "view.structureHighlight"));
+ addComponent(structureHighlight,structureHighlightColor = new ColorWellButton(
+ jEdit.getColorProperty("view.structureHighlightColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* EOL markers */
+ eolMarkers = new JCheckBox(jEdit.getProperty("options.textarea"
+ + ".eolMarkers"));
+ eolMarkers.setSelected(jEdit.getBooleanProperty("view.eolMarkers"));
+ addComponent(eolMarkers,eolMarkerColor =new ColorWellButton(
+ jEdit.getColorProperty("view.eolMarkerColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Wrap guide */
+ wrapGuide = new JCheckBox(jEdit.getProperty("options.textarea"
+ + ".wrapGuide"));
+ wrapGuide.setSelected(jEdit.getBooleanProperty("view.wrapGuide"));
+ addComponent(wrapGuide,wrapGuideColor = new ColorWellButton(
+ jEdit.getColorProperty("view.wrapGuideColor")),
+ GridBagConstraints.VERTICAL);
+
+ /* Electric borders */
+ electricBorders = new JCheckBox(jEdit.getProperty("options.textarea"
+ + ".electricBorders"));
+ electricBorders.setSelected(!"0".equals(jEdit.getProperty(
+ "view.electricBorders")));
+ addComponent(electricBorders);
+
+ /* Anti-aliasing */
+
+ antiAlias = new JComboBox(AntiAlias.comboChoices);
+ antiAlias.setToolTipText(jEdit.getProperty("options.textarea.antiAlias.tooltip"));
+ AntiAlias antiAliasValue = new AntiAlias(jEdit.getProperty("view.antiAlias"));
+ font.setAntiAliasEnabled(antiAliasValue.val()>0);
+ antiAlias.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ int idx = antiAlias.getSelectedIndex();
+ font.setAntiAliasEnabled(idx > 0);
+ font.repaint();
+ }
+ });
+ antiAlias.setSelectedIndex(antiAliasValue.val());
+ addComponent(jEdit.getProperty("options.textarea"+ ".antiAlias"), antiAlias);
+
+ /* Fractional font metrics */
+ fracFontMetrics = new JCheckBox(jEdit.getProperty("options.textarea"
+ + ".fracFontMetrics"));
+ fracFontMetrics.setToolTipText(jEdit.getProperty("options.textarea.fracFontMetrics.tooltip"));
+ fracFontMetrics.setSelected(jEdit.getBooleanProperty("view.fracFontMetrics"));
+ addComponent(fracFontMetrics);
+
+ /* Strip trailing EOL */
+ stripTrailingEOL = new JCheckBox(jEdit.getProperty(
+ "options.textArea.stripTrailingEOL"));
+ stripTrailingEOL.setSelected(jEdit.getBooleanProperty("stripTrailingEOL"));
+ addComponent(stripTrailingEOL);
+
+ completeFromAllBuffers = new JCheckBox(jEdit.getProperty(
+ "options.textArea.completeFromAllBuffers"));
+ completeFromAllBuffers.setSelected(jEdit.getBooleanProperty("completeFromAllBuffers"));
+ addComponent(completeFromAllBuffers);
+
+ } //}}}
+
+ //{{{ _save() method
+ public void _save()
+ {
+ jEdit.setFontProperty("view.font",font.getFont());
+ jEdit.setBooleanProperty("view.enableFontSubst",fontSubst.isSelected());
+ fontSubstList.save();
+
+ jEdit.setColorProperty("view.fgColor",foregroundColor
+ .getSelectedColor());
+ jEdit.setColorProperty("view.bgColor",backgroundColor
+ .getSelectedColor());
+ jEdit.setBooleanProperty("view.caretBlink",blinkCaret.isSelected());
+ jEdit.setBooleanProperty("view.blockCaret",blockCaret.isSelected());
+ jEdit.setBooleanProperty("view.thickCaret",thickCaret.isSelected());
+ jEdit.setColorProperty("view.caretColor",caretColor
+ .getSelectedColor());
+ jEdit.setColorProperty("view.selectionColor",selectionColor
+ .getSelectedColor());
+ jEdit.setColorProperty("view.multipleSelectionColor",multipleSelectionColor
+ .getSelectedColor());
+ jEdit.setBooleanProperty("view.selectionFg",selectionFg.isSelected());
+ jEdit.setColorProperty("view.selectionFgColor",selectionFgColor
+ .getSelectedColor());
+ jEdit.setBooleanProperty("view.lineHighlight",lineHighlight
+ .isSelected());
+ jEdit.setColorProperty("view.lineHighlightColor",
+ lineHighlightColor.getSelectedColor());
+ jEdit.setBooleanProperty("view.structureHighlight",structureHighlight
+ .isSelected());
+ jEdit.setColorProperty("view.structureHighlightColor",
+ structureHighlightColor.getSelectedColor());
+ jEdit.setBooleanProperty("view.eolMarkers",eolMarkers
+ .isSelected());
+ jEdit.setColorProperty("view.eolMarkerColor",
+ eolMarkerColor.getSelectedColor());
+ jEdit.setBooleanProperty("view.wrapGuide",wrapGuide
+ .isSelected());
+ jEdit.setColorProperty("view.wrapGuideColor",
+ wrapGuideColor.getSelectedColor());
+ jEdit.setIntegerProperty("view.electricBorders",electricBorders
+ .isSelected() ? 3 : 0);
+ AntiAlias nv = new AntiAlias(jEdit.getProperty("view.antiAlias"));
+ nv.set(antiAlias.getSelectedIndex());
+ jEdit.setProperty("view.antiAlias", nv.toString());
+ jEdit.setBooleanProperty("view.fracFontMetrics",fracFontMetrics.isSelected());
+ jEdit.setBooleanProperty("stripTrailingEOL", stripTrailingEOL.isSelected());
+ jEdit.setBooleanProperty("completeFromAllBuffers", completeFromAllBuffers.isSelected());
+ } //}}}
+
+ //{{{ Private members
+ private FontSelector font;
+ private JCheckBox fontSubst;
+ private FontList fontSubstList;
+ private ColorWellButton foregroundColor;
+ private ColorWellButton backgroundColor;
+ private JCheckBox blinkCaret;
+ private JCheckBox blockCaret;
+ private JCheckBox thickCaret;
+ private ColorWellButton caretColor;
+ private ColorWellButton selectionColor;
+ private JCheckBox selectionFg;
+ private ColorWellButton selectionFgColor;
+ private ColorWellButton multipleSelectionColor;
+ private JCheckBox lineHighlight;
+ private ColorWellButton lineHighlightColor;
+ private JCheckBox structureHighlight;
+ private ColorWellButton structureHighlightColor;
+ private JCheckBox eolMarkers;
+ private ColorWellButton eolMarkerColor;
+ private JCheckBox wrapGuide;
+ private ColorWellButton wrapGuideColor;
+ private JCheckBox electricBorders;
+ // private JCheckBox antiAlias;
+ private JComboBox antiAlias;
+ private JCheckBox fracFontMetrics;
+ private JCheckBox stripTrailingEOL;
+ private JCheckBox completeFromAllBuffers;
+ //}}}
+
+ //{{{ FontList class
+ /**
+ * The substitution font list widget. Shows a JList with the
+ * list of fonts and buttons that allow the user to manipulate
+ * the list.
+ */
+ private static class FontList
+ extends JPanel
+ implements ActionListener
+ {
+
+ public FontList()
+ {
+ int i = 0;
+
+ setLayout(new BorderLayout());
+
+ /* Label. */
+ JLabel l = new JLabel(jEdit.getProperty("options.textarea.fontsubstlist"));
+
+ /* Substitution font list. */
+ Font f;
+ fontsModel = new DefaultListModel();
+ fonts = new JList(fontsModel);
+ fonts.setCellRenderer(new FontItemRenderer());
+ while ((f = jEdit.getFontProperty("view.fontSubstList." + i)) != null)
+ {
+ fontsModel.addElement(f);
+ i++;
+ }
+
+ /* Right-side button box. */
+ Box buttons = new Box(BoxLayout.Y_AXIS);
+
+ add = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.add.icon")));
+ add.setToolTipText(jEdit.getProperty("common.add"));
+ add.addActionListener(this);
+ buttons.add(add);
+ buttons.add(Box.createVerticalStrut(2));
+
+ remove = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.remove.icon")));
+ remove.setToolTipText(jEdit.getProperty("common.remove"));
+ remove.addActionListener(this);
+ buttons.add(remove);
+ buttons.add(Box.createVerticalStrut(2));
+
+ up = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.moveUp.icon")));
+ up.setToolTipText(jEdit.getProperty("common.moveUp"));
+ up.addActionListener(this);
+ buttons.add(up);
+ buttons.add(Box.createVerticalStrut(2));
+
+ down = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.context.moveDown.icon")));
+ down.setToolTipText(jEdit.getProperty("common.moveDown"));
+ down.addActionListener(this);
+ buttons.add(down);
+ buttons.add(Box.createGlue());
+
+
+ add(BorderLayout.NORTH, l);
+ add(BorderLayout.CENTER, new JScrollPane(fonts));
+ add(BorderLayout.EAST, buttons);
+ }
+
+
+ public void actionPerformed(ActionEvent ae)
+ {
+ if (ae.getSource() == add)
+ {
+ JDialog parent = GUIUtilities.getParentDialog(this);
+ Font selected =
+ new FontSelectorDialog(parent, null).getSelectedFont();
+
+ if (selected != null)
+ {
+ selected = selected.deriveFont(Font.PLAIN, 12);
+ fontsModel.addElement(selected);
+ fonts.setSelectedIndex(fontsModel.size() - 1);
+ }
+ }
+ else if (ae.getSource() == remove)
+ {
+ int idx = fonts.getSelectedIndex();
+ if (idx != -1)
+ fontsModel.removeElementAt(idx);
+ }
+ else if (ae.getSource() == up)
+ {
+ int idx = fonts.getSelectedIndex();
+ if (idx > 0)
+ {
+ Object o = fontsModel.getElementAt(idx);
+ fontsModel.removeElementAt(idx);
+ fontsModel.add(idx - 1, o);
+ fonts.setSelectedIndex(idx - 1);
+ }
+ }
+ else if (ae.getSource() == down)
+ {
+ int idx = fonts.getSelectedIndex();
+ if (idx != -1 && idx < fontsModel.size() - 1)
+ {
+ Object o = fontsModel.getElementAt(idx);
+ fontsModel.removeElementAt(idx);
+ fontsModel.add(idx + 1, o);
+ fonts.setSelectedIndex(idx + 1);
+ }
+ }
+ }
+
+
+ public void save()
+ {
+ Font f;
+ int i = 0;
+ while ((f = jEdit.getFontProperty("view.fontSubstList." + i)) != null)
+ {
+ jEdit.unsetProperty("view.fontSubstList." + i);
+ i++;
+ }
+ for (i = 0; i < fontsModel.size(); i++)
+ {
+ f = (Font) fontsModel.getElementAt(i);
+ jEdit.setFontProperty("view.fontSubstList." + i, f);
+ }
+ }
+
+
+ private DefaultListModel fontsModel;
+ private JList fonts;
+ private JButton add;
+ private JButton remove;
+ private JButton up;
+ private JButton down;
+
+
+ private static class FontItemRenderer extends DefaultListCellRenderer
+ {
+
+ public Component getListCellRendererComponent(JList list,
+ Object value,
+ int index,
+ boolean isSelected,
+ boolean cellHasFocus)
+ {
+ Font f = (Font) value;
+ super.getListCellRendererComponent(list,
+ value,
+ index,
+ isSelected,
+ cellHasFocus);
+ setText(f.getFamily());
+ return this;
+ }
+
+ }
+
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/ToolBarOptionPane.java b/jEdit/org/gjt/sp/jedit/options/ToolBarOptionPane.java
index a4cb3e0..f0c6b75 100644
--- a/jEdit/org/gjt/sp/jedit/options/ToolBarOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/ToolBarOptionPane.java
@@ -1,764 +1,775 @@
-/*
- * ToolBarOptionPane.java - Tool bar options panel
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.net.*;
-import java.util.*;
-import org.gjt.sp.jedit.browser.VFSBrowser;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-//{{{ ToolBarOptionPane class
-/**
- * Tool bar editor.
- * @author Slava Pestov
- * @version $Id: ToolBarOptionPane.java 14665 2009-02-17 20:21:54Z scarlac $
- */
-public class ToolBarOptionPane extends AbstractOptionPane
-{
- //{{{ ToolBarOptionPane constructor
- public ToolBarOptionPane()
- {
- super("toolbar");
- } //}}}
-
- //{{{ _init() method
- protected void _init()
- {
- setLayout(new BorderLayout());
-
- JPanel panel = new JPanel(new GridLayout(2,1));
-
- /* Show toolbar */
- showToolbar = new JCheckBox(jEdit.getProperty(
- "options.toolbar.showToolbar"));
- showToolbar.setSelected(jEdit.getBooleanProperty("view.showToolbar"));
- panel.add(showToolbar);
-
- panel.add(new JLabel(jEdit.getProperty(
- "options.toolbar.caption")));
-
- add(BorderLayout.NORTH,panel);
-
- listModel = new DefaultListModel();
- reloadButtonList(jEdit.getProperty("view.toolbar"));
-
- list = new JList(listModel);
- list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- list.addListSelectionListener(new ListHandler());
- list.setCellRenderer(new ButtonCellRenderer());
-
- add(BorderLayout.CENTER,new JScrollPane(list));
-
- //{{{ Create buttons
- JPanel buttons = new JPanel();
- buttons.setBorder(new EmptyBorder(3,0,0,0));
- buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
- ActionHandler actionHandler = new ActionHandler();
- add = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.add.icon")));
- add.setToolTipText(jEdit.getProperty("options.toolbar.add"));
- add.addActionListener(actionHandler);
- buttons.add(add);
- buttons.add(Box.createHorizontalStrut(6));
- remove = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.remove.icon")));
- remove.setToolTipText(jEdit.getProperty("options.toolbar.remove"));
- remove.addActionListener(actionHandler);
- buttons.add(remove);
- buttons.add(Box.createHorizontalStrut(6));
- moveUp = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.moveUp.icon")));
- moveUp.setToolTipText(jEdit.getProperty("options.toolbar.moveUp"));
- moveUp.addActionListener(actionHandler);
- buttons.add(moveUp);
- buttons.add(Box.createHorizontalStrut(6));
- moveDown = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.moveDown.icon")));
- moveDown.setToolTipText(jEdit.getProperty("options.toolbar.moveDown"));
- moveDown.addActionListener(actionHandler);
- buttons.add(moveDown);
- buttons.add(Box.createHorizontalStrut(6));
- edit = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.edit.icon")));
- edit.setToolTipText(jEdit.getProperty("options.toolbar.edit"));
- edit.addActionListener(actionHandler);
- buttons.add(edit);
- buttons.add(Box.createGlue());
-
- // add "reset to defaults" button
- reset = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.reset.icon")));
- reset.setToolTipText(jEdit.getProperty("options.toolbar.reset"));
- reset.addActionListener(actionHandler);
- buttons.add(reset);
- //}}}
-
- updateButtons();
- add(BorderLayout.SOUTH,buttons);
-
- //{{{ Ceate icons list
- iconList = new DefaultComboBoxModel();
- StringTokenizer st = new StringTokenizer(jEdit.getProperty("icons"));
- while(st.hasMoreElements())
- {
- String icon = st.nextToken();
- iconList.addElement(new IconListEntry(
- GUIUtilities.loadIcon(icon),icon));
- } //}}}
- } ///}}}
-
- //{{{ _save() method
- protected void _save()
- {
- jEdit.setBooleanProperty("view.showToolbar",showToolbar
- .isSelected());
-
- StringBuilder buf = new StringBuilder();
- for(int i = 0; i < listModel.getSize(); i++)
- {
- if(i != 0)
- buf.append(' ');
- Button button = (Button)listModel.elementAt(i);
- buf.append(button.actionName);
- jEdit.setProperty(button.actionName + ".icon",button.iconName);
- }
- jEdit.setProperty("view.toolbar",buf.toString());
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private JCheckBox showToolbar;
- private DefaultListModel listModel;
- private JList list;
- private RolloverButton add;
- private RolloverButton remove;
- private RolloverButton moveUp, moveDown;
- private RolloverButton edit;
- private RolloverButton reset;
-
- private DefaultComboBoxModel iconList;
- //}}}
-
- //{{{ updateButtons() method
- private void updateButtons()
- {
- int index = list.getSelectedIndex();
- remove.setEnabled(index != -1 && listModel.getSize() != 0);
- moveUp.setEnabled(index > 0);
- moveDown.setEnabled(index != -1 && index != listModel.getSize() - 1);
- edit.setEnabled(index != -1);
- } //}}}
-
- //{{{ reloadButtonList() method
- private void reloadButtonList(String toolbar)
- {
- StringTokenizer st = new StringTokenizer(toolbar);
- listModel.clear();
-
- while(st.hasMoreTokens())
- {
- String actionName = st.nextToken();
- if(actionName.equals("-"))
- listModel.addElement(new ToolBarOptionPane.Button("-",null,null,"-"));
- else
- {
- EditAction action = jEdit.getAction(actionName);
- if(action == null)
- continue;
- String label = action.getLabel();
- if(label == null)
- continue;
-
- Icon icon;
- String iconName;
- if(actionName.equals("-"))
- {
- iconName = null;
- icon = null;
- }
- else
- {
- iconName = jEdit.getProperty(actionName + ".icon");
- if(iconName == null)
- icon = GUIUtilities.loadIcon(jEdit.getProperty("broken-image.icon"));
- else
- {
- icon = GUIUtilities.loadIcon(iconName);
- if(icon == null)
- icon = GUIUtilities.loadIcon(jEdit.getProperty("broken-image.icon"));
- }
- }
- listModel.addElement(new Button(actionName,iconName,icon,label));
- }
- }
- }
- //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ ButtonCompare class
- static class ButtonCompare implements Comparator<Button>
- {
- public int compare(Button button1, Button button2)
- {
- return StandardUtilities.compareStrings(
- button1.label,
- button2.label,
- true);
- }
- } //}}}
-
- //{{{ Button class
- static class Button
- {
- String actionName;
- String iconName;
- Icon icon;
- String label;
-
- Button(String actionName, String iconName, Icon icon, String label)
- {
- this.actionName = actionName;
- this.iconName = iconName;
- this.icon = icon;
- this.label = GUIUtilities.prettifyMenuLabel(label);
- }
-
- public String toString()
- {
- return label;
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof Button)
- return ((Button)o).actionName.equals(actionName);
- else
- return false;
- }
- } //}}}
-
- //{{{ IconListEntry class
- static class IconListEntry
- {
- Icon icon;
- String name;
-
- IconListEntry(Icon icon, String name)
- {
- this.icon = icon;
- this.name = name;
- }
-
- public String toString()
- {
- return name;
- }
- } //}}}
-
- //{{{ ButtonCellRenderer class
- static class ButtonCellRenderer extends DefaultListCellRenderer
- {
- public Component getListCellRendererComponent(JList list,
- Object value, int index, boolean isSelected,
- boolean cellHasFocus)
- {
- super.getListCellRendererComponent(list,value,index,
- isSelected,cellHasFocus);
-
- Button button = (Button)value;
- setIcon(button.icon);
-
- return this;
- }
- } //}}}
-
- //{{{ IconCellRenderer class
- static class IconCellRenderer extends DefaultListCellRenderer
- {
- public Component getListCellRendererComponent(JList list,
- Object value, int index, boolean isSelected,
- boolean cellHasFocus)
- {
- super.getListCellRendererComponent(list,value,index,
- isSelected,cellHasFocus);
-
- IconListEntry icon = (IconListEntry)value;
- setIcon(icon.icon);
-
- return this;
- }
- } //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
-
- if(source == add)
- {
- ToolBarEditDialog dialog = new ToolBarEditDialog(
- ToolBarOptionPane.this,iconList,null);
- Button selection = dialog.getSelection();
- if(selection == null)
- return;
-
- int index = list.getSelectedIndex();
- if(index == -1)
- index = listModel.getSize();
- else
- index++;
-
- listModel.insertElementAt(selection,index);
- list.setSelectedIndex(index);
- list.ensureIndexIsVisible(index);
- }
- else if(source == remove)
- {
- int index = list.getSelectedIndex();
- listModel.removeElementAt(index);
- if(listModel.getSize() != 0)
- {
- if(listModel.getSize() == index)
- list.setSelectedIndex(index-1);
- else
- list.setSelectedIndex(index);
- }
- updateButtons();
- }
- else if(source == moveUp)
- {
- int index = list.getSelectedIndex();
- Object selected = list.getSelectedValue();
- listModel.removeElementAt(index);
- listModel.insertElementAt(selected,index-1);
- list.setSelectedIndex(index-1);
- list.ensureIndexIsVisible(index-1);
- }
- else if(source == moveDown)
- {
- int index = list.getSelectedIndex();
- Object selected = list.getSelectedValue();
- listModel.removeElementAt(index);
- listModel.insertElementAt(selected,index+1);
- list.setSelectedIndex(index+1);
- list.ensureIndexIsVisible(index+1);
- }
- else if(source == edit)
- {
- ToolBarEditDialog dialog = new ToolBarEditDialog(
- ToolBarOptionPane.this,iconList,
- (Button)list.getSelectedValue());
- Button selection = dialog.getSelection();
- if(selection == null)
- return;
-
- int index = list.getSelectedIndex();
-
- listModel.setElementAt(selection,index);
- list.setSelectedIndex(index);
- list.ensureIndexIsVisible(index);
- }
- else if(source == reset)
- {
- String dialogType = "options.toolbar.reset.dialog";
- int result = GUIUtilities.confirm(list,dialogType,null,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
-
- if(result == JOptionPane.YES_OPTION)
- {
- // the user should be able to cancel the options dialog
- // so we need to modify the list, not the actual property
- // since the default value is not available,
- // we reset, fetch default value and re-set to original
- String orgToolbar = jEdit.getProperty("view.toolbar");
- jEdit.resetProperty("view.toolbar");
- String defaultToolbar = jEdit.getProperty("view.toolbar");
- jEdit.setProperty("view.toolbar", orgToolbar);
- reloadButtonList(defaultToolbar);
-
- // reset selection if user had more buttons than default
- list.setSelectedIndex(0);
- list.ensureIndexIsVisible(0);
- updateButtons();
- }
- }
- }
- } //}}}
-
- //{{{ ListHandler class
- class ListHandler implements ListSelectionListener
- {
- public void valueChanged(ListSelectionEvent evt)
- {
- updateButtons();
- }
- } //}}}
-
- //}}}
-} //}}}
-
-//{{{ ToolBarEditDialog class
-class ToolBarEditDialog extends EnhancedDialog
-{
- //{{{ ToolBarEditDialog constructor
- public ToolBarEditDialog(Component comp,
- DefaultComboBoxModel iconListModel,
- ToolBarOptionPane.Button current)
- {
- super(GUIUtilities.getParentDialog(comp),
- jEdit.getProperty("options.toolbar.edit.title"),
- true);
-
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- ActionHandler actionHandler = new ActionHandler();
- ButtonGroup grp = new ButtonGroup();
-
- JPanel typePanel = new JPanel(new GridLayout(3,1,6,6));
- typePanel.setBorder(new EmptyBorder(0,0,6,0));
- typePanel.add(new JLabel(
- jEdit.getProperty("options.toolbar.edit.caption")));
-
- separator = new JRadioButton(jEdit.getProperty("options.toolbar"
- + ".edit.separator"));
- separator.addActionListener(actionHandler);
- grp.add(separator);
- typePanel.add(separator);
-
- action = new JRadioButton(jEdit.getProperty("options.toolbar"
- + ".edit.action"));
- action.addActionListener(actionHandler);
- grp.add(action);
- typePanel.add(action);
-
- content.add(BorderLayout.NORTH,typePanel);
-
- JPanel actionPanel = new JPanel(new BorderLayout(6,6));
-
- ActionSet[] actionsList = jEdit.getActionSets();
- String selectedActionSet = jEdit.getProperty("options.toolbar.selectedActionSet");
- ActionSet selectedItem = null;
- Vector<ActionSet> vec = new Vector<ActionSet>(actionsList.length);
- for(int i = 0; i < actionsList.length; i++)
- {
- ActionSet actionSet = actionsList[i];
- if(actionSet.getActionCount() != 0)
- {
- vec.add(actionSet);
- if (actionSet.getLabel().equals(selectedActionSet))
- {
- selectedItem = actionSet;
- }
- }
- }
- combo = new JComboBox(vec);
- if (selectedItem != null)
- combo.setSelectedItem(selectedItem);
- else
- jEdit.unsetProperty("options.toolbar.selectedActionSet");
- combo.addActionListener(actionHandler);
-
- actionPanel.add(BorderLayout.NORTH,combo);
-
- list = new JList();
- list.setVisibleRowCount(8);
- list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- actionPanel.add(BorderLayout.CENTER,new JScrollPane(list));
-
- // Icon selection
- JPanel iconPanel = new JPanel(new BorderLayout(0,3));
- JPanel labelPanel = new JPanel(new GridLayout(2,1));
- labelPanel.setBorder(new EmptyBorder(0,0,0,12));
- JPanel compPanel = new JPanel(new GridLayout(2,1));
- grp = new ButtonGroup();
- labelPanel.add(builtin = new JRadioButton(jEdit.getProperty(
- "options.toolbar.edit.builtin")));
- builtin.addActionListener(actionHandler);
- grp.add(builtin);
- labelPanel.add(file = new JRadioButton(jEdit.getProperty(
- "options.toolbar.edit.file")));
- grp.add(file);
- file.addActionListener(actionHandler);
- iconPanel.add(BorderLayout.WEST,labelPanel);
- builtinCombo = new JComboBox(iconListModel);
- builtinCombo.setRenderer(new ToolBarOptionPane.IconCellRenderer());
- compPanel.add(builtinCombo);
-
- fileButton = new JButton(jEdit.getProperty("options.toolbar.edit.no-icon"));
- fileButton.setMargin(new Insets(1,1,1,1));
- fileButton.setIcon(GUIUtilities.loadIcon("Blank24.gif"));
- fileButton.setHorizontalAlignment(SwingConstants.LEFT);
- fileButton.addActionListener(actionHandler);
- compPanel.add(fileButton);
- iconPanel.add(BorderLayout.CENTER,compPanel);
- actionPanel.add(BorderLayout.SOUTH,iconPanel);
-
- content.add(BorderLayout.CENTER,actionPanel);
-
- JPanel southPanel = new JPanel();
- southPanel.setLayout(new BoxLayout(southPanel,BoxLayout.X_AXIS));
- southPanel.setBorder(new EmptyBorder(12,0,0,0));
- southPanel.add(Box.createGlue());
- ok = new JButton(jEdit.getProperty("common.ok"));
- ok.addActionListener(actionHandler);
- getRootPane().setDefaultButton(ok);
- southPanel.add(ok);
- southPanel.add(Box.createHorizontalStrut(6));
- cancel = new JButton(jEdit.getProperty("common.cancel"));
- cancel.addActionListener(actionHandler);
- southPanel.add(cancel);
- southPanel.add(Box.createGlue());
-
- content.add(BorderLayout.SOUTH,southPanel);
-
- if(current == null)
- {
- action.setSelected(true);
- builtin.setSelected(true);
- updateList();
- }
- else
- {
- if(current.actionName.equals("-"))
- {
- separator.setSelected(true);
- builtin.setSelected(true);
- }
- else
- {
- action.setSelected(true);
- ActionSet set = jEdit.getActionSetForAction(
- current.actionName);
- combo.setSelectedItem(set);
- updateList();
- list.setSelectedValue(current,true);
-
- if(MiscUtilities.isURL(current.iconName))
- {
- file.setSelected(true);
- fileIcon = current.iconName;
- try
- {
- fileButton.setIcon(new ImageIcon(new URL(
- fileIcon)));
- }
- catch(MalformedURLException mf)
- {
- Log.log(Log.ERROR,this,mf);
- }
- fileButton.setText(MiscUtilities.getFileName(fileIcon));
- }
- else
- {
- builtin.setSelected(true);
- ListModel model = builtinCombo.getModel();
- for(int i = 0; i < model.getSize(); i++)
- {
- ToolBarOptionPane.IconListEntry entry
- = (ToolBarOptionPane.IconListEntry)
- model.getElementAt(i);
- if(entry.name.equals(current.iconName))
- {
- builtinCombo.setSelectedIndex(i);
- break;
- }
- }
- }
- }
- }
-
- updateEnabled();
-
- pack();
- setLocationRelativeTo(GUIUtilities.getParentDialog(comp));
- setVisible(true);
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- isOK = true;
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ getSelection() method
- public ToolBarOptionPane.Button getSelection()
- {
- if(!isOK)
- return null;
-
- if(separator.isSelected())
- return new ToolBarOptionPane.Button("-",null,null,"-");
- else
- {
- Icon icon;
- String iconName;
- if(builtin.isSelected())
- {
- ToolBarOptionPane.IconListEntry selectedIcon =
- (ToolBarOptionPane.IconListEntry)
- builtinCombo.getSelectedItem();
- icon = selectedIcon.icon;
- iconName = selectedIcon.name;
- }
- else
- {
- icon = fileButton.getIcon();
- iconName = fileIcon;
- if(iconName == null)
- iconName = "Blank24.gif";
- }
-
- String label;
- String actionName;
- if(action.isSelected())
- {
- ToolBarOptionPane.Button button =
- (ToolBarOptionPane.Button)list
- .getSelectedValue();
- label = button.label;
- actionName = button.actionName;
- }
- else
- throw new InternalError();
-
- return new ToolBarOptionPane.Button(actionName,
- iconName,icon,label);
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private boolean isOK;
- private JRadioButton separator, action;
- private JComboBox combo;
- private JList list;
- private JRadioButton builtin;
- private JComboBox builtinCombo;
- private JRadioButton file;
- private JButton fileButton;
- private String fileIcon;
- private JButton ok, cancel;
- //}}}
-
- //{{{ updateEnabled() method
- private void updateEnabled()
- {
- combo.setEnabled(action.isSelected());
- list.setEnabled(action.isSelected());
-
- boolean iconControlsEnabled = !separator.isSelected();
- builtin.setEnabled(iconControlsEnabled);
- file.setEnabled(iconControlsEnabled);
- builtinCombo.setEnabled(iconControlsEnabled && builtin.isSelected());
- fileButton.setEnabled(iconControlsEnabled && file.isSelected());
- } //}}}
-
- //{{{ updateList() method
- private void updateList()
- {
- ActionSet actionSet = (ActionSet)combo.getSelectedItem();
- String actionSetLabel = actionSet.getLabel();
- jEdit.setProperty("options.toolbar.selectedActionSet", actionSetLabel);
- EditAction[] actions = actionSet.getActions();
- Vector<ToolBarOptionPane.Button> listModel = new Vector<ToolBarOptionPane.Button>(actions.length);
-
- for(int i = 0; i < actions.length; i++)
- {
- EditAction action = actions[i];
- String label = action.getLabel();
- if(label == null)
- continue;
-
- listModel.add(new ToolBarOptionPane.Button(
- action.getName(),null,null,label));
- }
-
- Collections.sort(listModel,new ToolBarOptionPane.ButtonCompare());
- list.setListData(listModel);
- } //}}}
-
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source instanceof JRadioButton)
- updateEnabled();
- if(source == ok)
- ok();
- else if(source == cancel)
- cancel();
- else if(source == combo)
- updateList();
- else if(source == fileButton)
- {
- String directory;
- if(fileIcon == null)
- directory = null;
- else
- directory = MiscUtilities.getParentOfPath(fileIcon);
- String[] paths = GUIUtilities.showVFSFileDialog(null,directory,
- VFSBrowser.OPEN_DIALOG,false);
- if(paths == null)
- return;
-
- fileIcon = "file:" + paths[0];
-
- try
- {
- fileButton.setIcon(new ImageIcon(new URL(
- fileIcon)));
- }
- catch(MalformedURLException mf)
- {
- Log.log(Log.ERROR,this,mf);
- }
- fileButton.setText(MiscUtilities.getFileName(fileIcon));
- }
- }
- } //}}}
-} //}}}
+/*
+ * ToolBarOptionPane.java - Tool bar options panel
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.event.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.net.*;
+import java.util.*;
+
+import org.gjt.sp.jedit.browser.VFSBrowser;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+//{{{ ToolBarOptionPane class
+/**
+ * Tool bar editor.
+ * @author Slava Pestov
+ * @version $Id: ToolBarOptionPane.java 18968 2010-11-15 23:31:24Z ezust $
+ */
+public class ToolBarOptionPane extends AbstractOptionPane
+{
+ //{{{ ToolBarOptionPane constructor
+ public ToolBarOptionPane()
+ {
+ super("toolbar");
+ } //}}}
+
+ //{{{ _init() method
+ protected void _init()
+ {
+ setLayout(new BorderLayout());
+
+ JPanel panel = new JPanel(new GridLayout(2,1));
+
+ /* Show toolbar */
+ showToolbar = new JCheckBox(jEdit.getProperty(
+ "options.toolbar.showToolbar"));
+ showToolbar.setSelected(jEdit.getBooleanProperty("view.showToolbar"));
+ panel.add(showToolbar);
+
+ panel.add(new JLabel(jEdit.getProperty(
+ "options.toolbar.caption")));
+
+ add(BorderLayout.NORTH,panel);
+
+ listModel = new DefaultListModel();
+ reloadButtonList(jEdit.getProperty("view.toolbar"));
+
+ list = new JList(listModel);
+ list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ list.addListSelectionListener(new ListHandler());
+ list.setCellRenderer(new ButtonCellRenderer());
+
+ add(BorderLayout.CENTER,new JScrollPane(list));
+
+ //{{{ Create buttons
+ JPanel buttons = new JPanel();
+ buttons.setBorder(new EmptyBorder(3,0,0,0));
+ buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
+ ActionHandler actionHandler = new ActionHandler();
+ add = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.add.icon")));
+ add.setToolTipText(jEdit.getProperty("options.toolbar.add"));
+ add.addActionListener(actionHandler);
+ buttons.add(add);
+ buttons.add(Box.createHorizontalStrut(6));
+ remove = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.remove.icon")));
+ remove.setToolTipText(jEdit.getProperty("options.toolbar.remove"));
+ remove.addActionListener(actionHandler);
+ buttons.add(remove);
+ buttons.add(Box.createHorizontalStrut(6));
+ moveUp = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.moveUp.icon")));
+ moveUp.setToolTipText(jEdit.getProperty("options.toolbar.moveUp"));
+ moveUp.addActionListener(actionHandler);
+ buttons.add(moveUp);
+ buttons.add(Box.createHorizontalStrut(6));
+ moveDown = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.moveDown.icon")));
+ moveDown.setToolTipText(jEdit.getProperty("options.toolbar.moveDown"));
+ moveDown.addActionListener(actionHandler);
+ buttons.add(moveDown);
+ buttons.add(Box.createHorizontalStrut(6));
+ edit = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.edit.icon")));
+ edit.setToolTipText(jEdit.getProperty("options.toolbar.edit"));
+ edit.addActionListener(actionHandler);
+ buttons.add(edit);
+ buttons.add(Box.createGlue());
+
+ // add "reset to defaults" button
+ reset = new RolloverButton(GUIUtilities.loadIcon(jEdit.getProperty("options.toolbar.reset.icon")));
+ reset.setToolTipText(jEdit.getProperty("options.toolbar.reset"));
+ reset.addActionListener(actionHandler);
+ buttons.add(reset);
+ //}}}
+
+ updateButtons();
+ add(BorderLayout.SOUTH,buttons);
+
+ //{{{ Ceate icons list
+ iconList = new DefaultComboBoxModel();
+ StringTokenizer st = new StringTokenizer(jEdit.getProperty("icons"));
+ while(st.hasMoreElements())
+ {
+ String icon = st.nextToken();
+ iconList.addElement(new IconListEntry(
+ GUIUtilities.loadIcon(icon),icon));
+ } //}}}
+ } ///}}}
+
+ //{{{ _save() method
+ protected void _save()
+ {
+ jEdit.setBooleanProperty("view.showToolbar",showToolbar
+ .isSelected());
+
+ StringBuilder buf = new StringBuilder();
+ for(int i = 0; i < listModel.getSize(); i++)
+ {
+ if(i != 0)
+ buf.append(' ');
+ Button button = (Button)listModel.elementAt(i);
+ buf.append(button.actionName);
+ jEdit.setProperty(button.actionName + ".icon",button.iconName);
+ }
+ jEdit.setProperty("view.toolbar",buf.toString());
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private JCheckBox showToolbar;
+ private DefaultListModel listModel;
+ private JList list;
+ private RolloverButton add;
+ private RolloverButton remove;
+ private RolloverButton moveUp, moveDown;
+ private RolloverButton edit;
+ private RolloverButton reset;
+
+ private DefaultComboBoxModel iconList;
+ //}}}
+
+ //{{{ updateButtons() method
+ private void updateButtons()
+ {
+ int index = list.getSelectedIndex();
+ remove.setEnabled(index != -1 && listModel.getSize() != 0);
+ moveUp.setEnabled(index > 0);
+ moveDown.setEnabled(index != -1 && index != listModel.getSize() - 1);
+ edit.setEnabled(index != -1);
+ } //}}}
+
+ //{{{ reloadButtonList() method
+ private void reloadButtonList(String toolbar)
+ {
+ StringTokenizer st = new StringTokenizer(toolbar);
+ listModel.clear();
+
+ while(st.hasMoreTokens())
+ {
+ String actionName = st.nextToken();
+ if(actionName.equals("-"))
+ listModel.addElement(new ToolBarOptionPane.Button("-",null,null,"-"));
+ else
+ {
+ EditAction action = jEdit.getAction(actionName);
+ if(action == null)
+ continue;
+ String label = action.getLabel();
+ if(label == null)
+ continue;
+
+ Icon icon;
+ String iconName;
+ if(actionName.equals("-"))
+ {
+ iconName = null;
+ icon = null;
+ }
+ else
+ {
+ iconName = jEdit.getProperty(actionName + ".icon");
+ if(iconName == null)
+ icon = GUIUtilities.loadIcon(jEdit.getProperty("broken-image.icon"));
+ else
+ {
+ icon = GUIUtilities.loadIcon(iconName);
+ if(icon == null)
+ icon = GUIUtilities.loadIcon(jEdit.getProperty("broken-image.icon"));
+ }
+ }
+ listModel.addElement(new Button(actionName,iconName,icon,label));
+ }
+ }
+ }
+ //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ButtonCompare class
+ static class ButtonCompare implements Comparator<Button>
+ {
+ public int compare(Button button1, Button button2)
+ {
+ return StandardUtilities.compareStrings(
+ button1.label,
+ button2.label,
+ true);
+ }
+ } //}}}
+
+ //{{{ Button class
+ static class Button
+ {
+ String actionName;
+ String iconName;
+ Icon icon;
+ String label;
+
+ Button(String actionName, String iconName, Icon icon, String label)
+ {
+ this.actionName = actionName;
+ this.iconName = iconName;
+ this.icon = icon;
+ this.label = GUIUtilities.prettifyMenuLabel(label);
+ }
+
+ public String toString()
+ {
+ return label;
+ }
+
+ public boolean equals(Object o)
+ {
+ if(o instanceof Button)
+ return ((Button)o).actionName.equals(actionName);
+ else
+ return false;
+ }
+ } //}}}
+
+ //{{{ IconListEntry class
+ static class IconListEntry
+ {
+ Icon icon;
+ String name;
+
+ IconListEntry(Icon icon, String name)
+ {
+ this.icon = icon;
+ this.name = name;
+ }
+
+ public String toString()
+ {
+ return name;
+ }
+ } //}}}
+
+ //{{{ ButtonCellRenderer class
+ static class ButtonCellRenderer extends DefaultListCellRenderer
+ {
+ public Component getListCellRendererComponent(JList list,
+ Object value, int index, boolean isSelected,
+ boolean cellHasFocus)
+ {
+ super.getListCellRendererComponent(list,value,index,
+ isSelected,cellHasFocus);
+
+ Button button = (Button)value;
+ setIcon(button.icon);
+
+ return this;
+ }
+ } //}}}
+
+ //{{{ IconCellRenderer class
+ static class IconCellRenderer extends DefaultListCellRenderer
+ {
+ public Component getListCellRendererComponent(JList list,
+ Object value, int index, boolean isSelected,
+ boolean cellHasFocus)
+ {
+ super.getListCellRendererComponent(list,value,index,
+ isSelected,cellHasFocus);
+
+ IconListEntry icon = (IconListEntry)value;
+ setIcon(icon.icon);
+
+ return this;
+ }
+ } //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+
+ if(source == add)
+ {
+ ToolBarEditDialog dialog = new ToolBarEditDialog(
+ ToolBarOptionPane.this,iconList,null);
+ Button selection = dialog.getSelection();
+ if(selection == null)
+ return;
+
+ int index = list.getSelectedIndex();
+ if(index == -1)
+ index = listModel.getSize();
+ else
+ index++;
+
+ listModel.insertElementAt(selection,index);
+ list.setSelectedIndex(index);
+ list.ensureIndexIsVisible(index);
+ }
+ else if(source == remove)
+ {
+ int index = list.getSelectedIndex();
+ listModel.removeElementAt(index);
+ if(listModel.getSize() != 0)
+ {
+ if(listModel.getSize() == index)
+ list.setSelectedIndex(index-1);
+ else
+ list.setSelectedIndex(index);
+ }
+ updateButtons();
+ }
+ else if(source == moveUp)
+ {
+ int index = list.getSelectedIndex();
+ Object selected = list.getSelectedValue();
+ listModel.removeElementAt(index);
+ listModel.insertElementAt(selected,index-1);
+ list.setSelectedIndex(index-1);
+ list.ensureIndexIsVisible(index-1);
+ }
+ else if(source == moveDown)
+ {
+ int index = list.getSelectedIndex();
+ Object selected = list.getSelectedValue();
+ listModel.removeElementAt(index);
+ listModel.insertElementAt(selected,index+1);
+ list.setSelectedIndex(index+1);
+ list.ensureIndexIsVisible(index+1);
+ }
+ else if(source == edit)
+ {
+ ToolBarEditDialog dialog = new ToolBarEditDialog(
+ ToolBarOptionPane.this,iconList,
+ (Button)list.getSelectedValue());
+ Button selection = dialog.getSelection();
+ if(selection == null)
+ return;
+
+ int index = list.getSelectedIndex();
+
+ listModel.setElementAt(selection,index);
+ list.setSelectedIndex(index);
+ list.ensureIndexIsVisible(index);
+ }
+ else if(source == reset)
+ {
+ String dialogType = "options.toolbar.reset.dialog";
+ int result = GUIUtilities.confirm(list,dialogType,null,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+
+ if(result == JOptionPane.YES_OPTION)
+ {
+ // the user should be able to cancel the options dialog
+ // so we need to modify the list, not the actual property
+ // since the default value is not available,
+ // we reset, fetch default value and re-set to original
+ String orgToolbar = jEdit.getProperty("view.toolbar");
+ jEdit.resetProperty("view.toolbar");
+ String defaultToolbar = jEdit.getProperty("view.toolbar");
+ jEdit.setProperty("view.toolbar", orgToolbar);
+ reloadButtonList(defaultToolbar);
+
+ // reset selection if user had more buttons than default
+ list.setSelectedIndex(0);
+ list.ensureIndexIsVisible(0);
+ updateButtons();
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ ListHandler class
+ class ListHandler implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent evt)
+ {
+ updateButtons();
+ }
+ } //}}}
+
+ //}}}
+} //}}}
+
+//{{{ ToolBarEditDialog class
+class ToolBarEditDialog extends EnhancedDialog
+{
+ //{{{ ToolBarEditDialog constructor
+ public ToolBarEditDialog(Component comp,
+ DefaultComboBoxModel iconListModel,
+ ToolBarOptionPane.Button current)
+ {
+ super(GUIUtilities.getParentDialog(comp),
+ jEdit.getProperty("options.toolbar.edit.title"),
+ true);
+
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ ActionHandler actionHandler = new ActionHandler();
+ ButtonGroup grp = new ButtonGroup();
+
+ JPanel typePanel = new JPanel(new GridLayout(3,1,6,6));
+ typePanel.setBorder(new EmptyBorder(0,0,6,0));
+ typePanel.add(new JLabel(
+ jEdit.getProperty("options.toolbar.edit.caption")));
+
+ separator = new JRadioButton(jEdit.getProperty("options.toolbar"
+ + ".edit.separator"));
+ separator.addActionListener(actionHandler);
+ grp.add(separator);
+ typePanel.add(separator);
+
+ action = new JRadioButton(jEdit.getProperty("options.toolbar"
+ + ".edit.action"));
+ action.addActionListener(actionHandler);
+ grp.add(action);
+ typePanel.add(action);
+
+ content.add(BorderLayout.NORTH,typePanel);
+
+ JPanel actionPanel = new JPanel(new BorderLayout(6,6));
+
+ ActionSet[] actionsList = jEdit.getActionSets();
+ String selectedActionSet = jEdit.getProperty("options.toolbar.selectedActionSet");
+ ActionSet selectedItem = null;
+ Vector<ActionSet> vec = new Vector<ActionSet>(actionsList.length);
+ for(int i = 0; i < actionsList.length; i++)
+ {
+ ActionSet actionSet = actionsList[i];
+ if(actionSet.getActionCount() != 0)
+ {
+ vec.add(actionSet);
+ if (actionSet.getLabel().equals(selectedActionSet))
+ {
+ selectedItem = actionSet;
+ }
+ }
+ }
+ Collections.sort(vec, new ActionSetCompare());
+ combo = new JComboBox(vec);
+ if (selectedItem != null)
+ combo.setSelectedItem(selectedItem);
+ else
+ jEdit.unsetProperty("options.toolbar.selectedActionSet");
+ combo.addActionListener(actionHandler);
+
+ actionPanel.add(BorderLayout.NORTH,combo);
+
+ list = new JList();
+ list.setVisibleRowCount(8);
+ list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ actionPanel.add(BorderLayout.CENTER,new JScrollPane(list));
+
+ // Icon selection
+ JPanel iconPanel = new JPanel(new BorderLayout(0,3));
+ JPanel labelPanel = new JPanel(new GridLayout(2,1));
+ labelPanel.setBorder(new EmptyBorder(0,0,0,12));
+ JPanel compPanel = new JPanel(new GridLayout(2,1));
+ grp = new ButtonGroup();
+ labelPanel.add(builtin = new JRadioButton(jEdit.getProperty(
+ "options.toolbar.edit.builtin")));
+ builtin.addActionListener(actionHandler);
+ grp.add(builtin);
+ labelPanel.add(file = new JRadioButton(jEdit.getProperty(
+ "options.toolbar.edit.file")));
+ grp.add(file);
+ file.addActionListener(actionHandler);
+ iconPanel.add(BorderLayout.WEST,labelPanel);
+ builtinCombo = new JComboBox(iconListModel);
+ builtinCombo.setRenderer(new ToolBarOptionPane.IconCellRenderer());
+ compPanel.add(builtinCombo);
+
+ fileButton = new JButton(jEdit.getProperty("options.toolbar.edit.no-icon"));
+ fileButton.setMargin(new Insets(1,1,1,1));
+ fileButton.setIcon(GUIUtilities.loadIcon("Blank24.gif"));
+ fileButton.setHorizontalAlignment(SwingConstants.LEFT);
+ fileButton.addActionListener(actionHandler);
+ compPanel.add(fileButton);
+ iconPanel.add(BorderLayout.CENTER,compPanel);
+ actionPanel.add(BorderLayout.SOUTH,iconPanel);
+
+ content.add(BorderLayout.CENTER,actionPanel);
+
+ JPanel southPanel = new JPanel();
+ southPanel.setLayout(new BoxLayout(southPanel,BoxLayout.X_AXIS));
+ southPanel.setBorder(new EmptyBorder(12,0,0,0));
+ southPanel.add(Box.createGlue());
+ ok = new JButton(jEdit.getProperty("common.ok"));
+ ok.addActionListener(actionHandler);
+ getRootPane().setDefaultButton(ok);
+ southPanel.add(ok);
+ southPanel.add(Box.createHorizontalStrut(6));
+ cancel = new JButton(jEdit.getProperty("common.cancel"));
+ cancel.addActionListener(actionHandler);
+ southPanel.add(cancel);
+ southPanel.add(Box.createGlue());
+
+ content.add(BorderLayout.SOUTH,southPanel);
+
+ if(current == null)
+ {
+ action.setSelected(true);
+ builtin.setSelected(true);
+ updateList();
+ }
+ else
+ {
+ if(current.actionName.equals("-"))
+ {
+ separator.setSelected(true);
+ builtin.setSelected(true);
+ }
+ else
+ {
+ action.setSelected(true);
+ ActionSet set = jEdit.getActionSetForAction(
+ current.actionName);
+ combo.setSelectedItem(set);
+ updateList();
+ list.setSelectedValue(current,true);
+
+ if(MiscUtilities.isURL(current.iconName))
+ {
+ file.setSelected(true);
+ fileIcon = current.iconName;
+ try
+ {
+ fileButton.setIcon(new ImageIcon(new URL(
+ fileIcon)));
+ }
+ catch(MalformedURLException mf)
+ {
+ Log.log(Log.ERROR,this,mf);
+ }
+ fileButton.setText(MiscUtilities.getFileName(fileIcon));
+ }
+ else
+ {
+ builtin.setSelected(true);
+ ListModel model = builtinCombo.getModel();
+ for(int i = 0; i < model.getSize(); i++)
+ {
+ ToolBarOptionPane.IconListEntry entry
+ = (ToolBarOptionPane.IconListEntry)
+ model.getElementAt(i);
+ if(entry.name.equals(current.iconName))
+ {
+ builtinCombo.setSelectedIndex(i);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ updateEnabled();
+
+ pack();
+ setLocationRelativeTo(GUIUtilities.getParentDialog(comp));
+ setVisible(true);
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ isOK = true;
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ getSelection() method
+ public ToolBarOptionPane.Button getSelection()
+ {
+ if(!isOK)
+ return null;
+
+ if(separator.isSelected())
+ return new ToolBarOptionPane.Button("-",null,null,"-");
+ else
+ {
+ Icon icon;
+ String iconName;
+ if(builtin.isSelected())
+ {
+ ToolBarOptionPane.IconListEntry selectedIcon =
+ (ToolBarOptionPane.IconListEntry)
+ builtinCombo.getSelectedItem();
+ icon = selectedIcon.icon;
+ iconName = selectedIcon.name;
+ }
+ else
+ {
+ icon = fileButton.getIcon();
+ iconName = fileIcon;
+ if(iconName == null)
+ iconName = "Blank24.gif";
+ }
+
+ String label;
+ String actionName;
+ if(action.isSelected())
+ {
+ ToolBarOptionPane.Button button =
+ (ToolBarOptionPane.Button)list
+ .getSelectedValue();
+ label = button.label;
+ actionName = button.actionName;
+ }
+ else
+ throw new InternalError();
+
+ return new ToolBarOptionPane.Button(actionName,
+ iconName,icon,label);
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private boolean isOK;
+ private JRadioButton separator, action;
+ private JComboBox combo;
+ private JList list;
+ private JRadioButton builtin;
+ private JComboBox builtinCombo;
+ private JRadioButton file;
+ private JButton fileButton;
+ private String fileIcon;
+ private JButton ok, cancel;
+ //}}}
+
+ //{{{ updateEnabled() method
+ private void updateEnabled()
+ {
+ combo.setEnabled(action.isSelected());
+ list.setEnabled(action.isSelected());
+
+ boolean iconControlsEnabled = !separator.isSelected();
+ builtin.setEnabled(iconControlsEnabled);
+ file.setEnabled(iconControlsEnabled);
+ builtinCombo.setEnabled(iconControlsEnabled && builtin.isSelected());
+ fileButton.setEnabled(iconControlsEnabled && file.isSelected());
+ } //}}}
+
+ //{{{ updateList() method
+ private void updateList()
+ {
+ ActionSet actionSet = (ActionSet)combo.getSelectedItem();
+ String actionSetLabel = actionSet.getLabel();
+ jEdit.setProperty("options.toolbar.selectedActionSet", actionSetLabel);
+ EditAction[] actions = actionSet.getActions();
+ Vector<ToolBarOptionPane.Button> listModel = new Vector<ToolBarOptionPane.Button>(actions.length);
+
+ for(int i = 0; i < actions.length; i++)
+ {
+ EditAction action = actions[i];
+ String label = action.getLabel();
+ if(label == null)
+ continue;
+
+ listModel.add(new ToolBarOptionPane.Button(
+ action.getName(),null,null,label));
+ }
+
+ Collections.sort(listModel,new ToolBarOptionPane.ButtonCompare());
+ list.setListData(listModel);
+ } //}}}
+
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source instanceof JRadioButton)
+ updateEnabled();
+ if(source == ok)
+ ok();
+ else if(source == cancel)
+ cancel();
+ else if(source == combo)
+ updateList();
+ else if(source == fileButton)
+ {
+ String directory;
+ if(fileIcon == null)
+ directory = null;
+ else
+ directory = MiscUtilities.getParentOfPath(fileIcon);
+ String[] paths = GUIUtilities.showVFSFileDialog(null,directory,
+ VFSBrowser.OPEN_DIALOG,false);
+ if(paths == null)
+ return;
+
+ fileIcon = "file:" + paths[0];
+
+ try
+ {
+ fileButton.setIcon(new ImageIcon(new URL(
+ fileIcon)));
+ }
+ catch(MalformedURLException mf)
+ {
+ Log.log(Log.ERROR,this,mf);
+ }
+ fileButton.setText(MiscUtilities.getFileName(fileIcon));
+ }
+ }
+ } //}}}
+ class ActionSetCompare implements Comparator<ActionSet> {
+
+ @Override
+ public int compare(ActionSet o1, ActionSet o2)
+ {
+ return StandardUtilities.compareStrings(o1.getLabel(), o2.getLabel(), false);
+ }
+
+ }
+} //}}}
diff --git a/jEdit/org/gjt/sp/jedit/options/ViewOptionPane.java b/jEdit/org/gjt/sp/jedit/options/ViewOptionPane.java
index 5b99e89..c2ed566 100644
--- a/jEdit/org/gjt/sp/jedit/options/ViewOptionPane.java
+++ b/jEdit/org/gjt/sp/jedit/options/ViewOptionPane.java
@@ -1,265 +1,266 @@
-/*
- * ViewOptionPane.java - Editor window options
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.options;
-
-import javax.swing.border.*;
-import javax.swing.*;
-
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.bufferset.BufferSet;
-import org.gjt.sp.jedit.bufferset.BufferSetManager;
-
-public class ViewOptionPane extends AbstractOptionPane
-{
- //{{{ ViewOptionPane constructor
- public ViewOptionPane()
- {
- super("view");
- } //}}}
-
- //{{{ _init() method
- @Override
- protected void _init()
- {
- /* View dock layout */
- layoutIcon1 = GUIUtilities.loadIcon("dock_layout1.png");
- layoutIcon2 = GUIUtilities.loadIcon("dock_layout2.png");
- layoutIcon3 = GUIUtilities.loadIcon("dock_layout3.png");
- layoutIcon4 = GUIUtilities.loadIcon("dock_layout4.png");
-
- JPanel layoutPanel = new JPanel(new BorderLayout(12,12));
-
- if(jEdit.getBooleanProperty("view.docking.alternateLayout"))
- {
- layout = new JLabel(jEdit.getBooleanProperty(
- "view.toolbar.alternateLayout")
- ? layoutIcon4 : layoutIcon2);
- }
- else
- {
- layout = new JLabel(jEdit.getBooleanProperty(
- "view.toolbar.alternateLayout")
- ? layoutIcon3 : layoutIcon1);
- }
-
- layout.setBorder(new EmptyBorder(12,12,12,12));
- layoutPanel.add(BorderLayout.CENTER,layout);
-
- JPanel buttons = new JPanel(new GridLayout(2,1,12,12));
- buttons.setBorder(new EmptyBorder(0,12,12,12));
- buttons.add(alternateDockingLayout = new JButton(jEdit.getProperty(
- "options.view.alternateDockingLayout")));
- ActionHandler actionHandler = new ActionHandler();
- alternateDockingLayout.addActionListener(actionHandler);
- buttons.add(alternateToolBarLayout = new JButton(jEdit.getProperty(
- "options.view.alternateToolBarLayout")));
- alternateToolBarLayout.addActionListener(actionHandler);
- layoutPanel.add(BorderLayout.SOUTH,buttons);
-
- TitledBorder border = new TitledBorder(jEdit.getProperty(
- "options.view.viewLayout"));
- border.setTitleJustification(TitledBorder.CENTER);
- layoutPanel.setBorder(border);
-
- addComponent(layoutPanel);
-
- /* Show full path */
- showFullPath = new JCheckBox(jEdit.getProperty(
- "options.view.showFullPath"));
- showFullPath.setSelected(jEdit.getBooleanProperty(
- "view.showFullPath"));
- addComponent(showFullPath);
-
- /* Show search bar */
- showSearchbar = new JCheckBox(jEdit.getProperty(
- "options.view.showSearchbar"));
- showSearchbar.setSelected(jEdit.getBooleanProperty(
- "view.showSearchbar"));
- addComponent(showSearchbar);
-
- /* Beep on search auto wrap */
- beepOnSearchAutoWrap = new JCheckBox(jEdit.getProperty(
- "options.view.beepOnSearchAutoWrap"));
- beepOnSearchAutoWrap.setSelected(jEdit.getBooleanProperty(
- "search.beepOnSearchAutoWrap"));
- addComponent(beepOnSearchAutoWrap);
-
- /* Show buffer switcher */
- showBufferSwitcher = new JCheckBox(jEdit.getProperty(
- "options.view.showBufferSwitcher"));
-
- showBufferSwitcher.setSelected(jEdit.getBooleanProperty(
- "view.showBufferSwitcher"));
- addComponent(showBufferSwitcher);
- showBufferSwitcher.addActionListener(actionHandler);
-
-
- /* Buffer switcher max row count */
- bufferSwitcherMaxRowCount = new JTextField(jEdit.getProperty("bufferSwitcher.maxRowCount"));
- addComponent(jEdit.getProperty("options.view.bufferSwitcherMaxRowsCount"),
- bufferSwitcherMaxRowCount);
- bufferSwitcherMaxRowCount.setEditable(showBufferSwitcher.isSelected());
-
- defaultBufferSet = new JComboBox();
- defaultBufferSet.addItem(BufferSet.Scope.global);
- defaultBufferSet.addItem(BufferSet.Scope.view);
- defaultBufferSet.addItem(BufferSet.Scope.editpane);
- defaultBufferSet.setSelectedItem(BufferSet.Scope.fromString(jEdit.getProperty("editpane.bufferset.default")));
- addComponent(jEdit.getProperty("options.editpane.bufferset.default"), defaultBufferSet);
-
- newBufferSetBehavior = new JComboBox();
- newBufferSetBehavior.addItem(BufferSetManager.NewBufferSetAction.copy);
- newBufferSetBehavior.addItem(BufferSetManager.NewBufferSetAction.empty);
- newBufferSetBehavior.addItem(BufferSetManager.NewBufferSetAction.currentbuffer);
- newBufferSetBehavior.setSelectedItem(BufferSetManager.NewBufferSetAction.fromString(jEdit.getProperty("editpane.bufferset.new")));
- addComponent(new JLabel(jEdit.getProperty("options.editpane.bufferset.contain")),
- newBufferSetBehavior);
-
-
- /* Sort buffers */
- sortBuffers = new JCheckBox(jEdit.getProperty(
- "options.view.sortBuffers"));
- sortBuffers.setSelected(jEdit.getBooleanProperty("sortBuffers"));
- sortBuffers.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- sortByName.setEnabled(sortBuffers.isSelected());
- }
- });
-
- addComponent(sortBuffers);
-
- /* Sort buffers by names */
- sortByName = new JCheckBox(jEdit.getProperty(
- "options.view.sortByName"));
- sortByName.setSelected(jEdit.getBooleanProperty("sortByName"));
- sortByName.setEnabled(sortBuffers.isSelected());
- addComponent(sortByName);
-
- fullScreenIncludesMenu = new JCheckBox(jEdit.getProperty(
- "options.view.fullScreenIncludesMenu"));
- fullScreenIncludesMenu.setSelected(
- jEdit.getBooleanProperty("fullScreenIncludesMenu"));
- addComponent(fullScreenIncludesMenu);
-
- fullScreenIncludesToolbar = new JCheckBox(jEdit.getProperty(
- "options.view.fullScreenIncludesToolbar"));
- fullScreenIncludesToolbar.setSelected(
- jEdit.getBooleanProperty("fullScreenIncludesToolbar"));
- addComponent(fullScreenIncludesToolbar);
-
- fullScreenIncludesStatus = new JCheckBox(jEdit.getProperty(
- "options.view.fullScreenIncludesStatus"));
- fullScreenIncludesStatus.setSelected(
- jEdit.getBooleanProperty("fullScreenIncludesStatus"));
- addComponent(fullScreenIncludesStatus);
-
- } //}}}
-
- //{{{ _save() method
- @Override
- protected void _save()
- {
- jEdit.setBooleanProperty("view.docking.alternateLayout",
- layout.getIcon() == layoutIcon2
- || layout.getIcon() == layoutIcon4);
- jEdit.setBooleanProperty("view.toolbar.alternateLayout",
- layout.getIcon() == layoutIcon3
- || layout.getIcon() == layoutIcon4);
- jEdit.setBooleanProperty("view.showFullPath",showFullPath
- .isSelected());
- jEdit.setBooleanProperty("view.showSearchbar",showSearchbar
- .isSelected());
- jEdit.setBooleanProperty("search.beepOnSearchAutoWrap",beepOnSearchAutoWrap
- .isSelected());
- jEdit.setBooleanProperty("view.showBufferSwitcher",
- showBufferSwitcher.isSelected());
- jEdit.setProperty("bufferSwitcher.maxRowCount",
- bufferSwitcherMaxRowCount.getText());
- jEdit.setProperty("editpane.bufferset.default", defaultBufferSet.getSelectedItem().toString());
- jEdit.setProperty("editpane.bufferset.new",
- ((BufferSetManager.NewBufferSetAction)newBufferSetBehavior.getSelectedItem()).getName());
- jEdit.setBooleanProperty("sortBuffers",sortBuffers.isSelected());
- jEdit.setBooleanProperty("sortByName",sortByName.isSelected());
- jEdit.setBooleanProperty("fullScreenIncludesMenu",fullScreenIncludesMenu.isSelected());
- jEdit.setBooleanProperty("fullScreenIncludesToolbar",fullScreenIncludesToolbar.isSelected());
- jEdit.setBooleanProperty("fullScreenIncludesStatus",fullScreenIncludesStatus.isSelected());
-
- } //}}}
-
- //{{{ Private members
- private JLabel layout;
- private Icon layoutIcon1, layoutIcon2, layoutIcon3, layoutIcon4;
- private JButton alternateDockingLayout, alternateToolBarLayout;
- private JCheckBox showFullPath;
- private JCheckBox showSearchbar;
- private JCheckBox beepOnSearchAutoWrap;
- private JCheckBox showBufferSwitcher;
- private JTextField bufferSwitcherMaxRowCount;
- private JComboBox defaultBufferSet;
- private JComboBox newBufferSetBehavior;
- private JCheckBox sortBuffers;
- private JCheckBox sortByName;
- private JCheckBox fullScreenIncludesMenu;
- private JCheckBox fullScreenIncludesToolbar;
- private JCheckBox fullScreenIncludesStatus;
-
- //}}}
-
- //{{{ ActionHandler class
- private class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == alternateDockingLayout)
- {
- if(layout.getIcon() == layoutIcon1)
- layout.setIcon(layoutIcon2);
- else if(layout.getIcon() == layoutIcon2)
- layout.setIcon(layoutIcon1);
- else if(layout.getIcon() == layoutIcon3)
- layout.setIcon(layoutIcon4);
- else if(layout.getIcon() == layoutIcon4)
- layout.setIcon(layoutIcon3);
- }
- else if(evt.getSource() == alternateToolBarLayout)
- {
- if(layout.getIcon() == layoutIcon1)
- layout.setIcon(layoutIcon3);
- else if(layout.getIcon() == layoutIcon3)
- layout.setIcon(layoutIcon1);
- else if(layout.getIcon() == layoutIcon2)
- layout.setIcon(layoutIcon4);
- else if(layout.getIcon() == layoutIcon4)
- layout.setIcon(layoutIcon2);
- }
- else if (evt.getSource() == showBufferSwitcher)
- {
- bufferSwitcherMaxRowCount.setEditable(showBufferSwitcher.isSelected());
- }
- }
- } //}}}
-}
+/*
+ * ViewOptionPane.java - Editor window options
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ * Portions Copyright (C) 2009 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.options;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.*;
+
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.bufferset.BufferSet;
+import org.gjt.sp.util.Log;
+//}}}
+
+public class ViewOptionPane extends AbstractOptionPane
+{
+ //{{{ ViewOptionPane constructor
+ public ViewOptionPane()
+ {
+ super("view");
+ } //}}}
+
+ //{{{ _init() method
+ @Override
+ protected void _init()
+ {
+ /* View dock layout */
+ layoutIcon1 = GUIUtilities.loadIcon("dock_layout1.png");
+ layoutIcon2 = GUIUtilities.loadIcon("dock_layout2.png");
+ layoutIcon3 = GUIUtilities.loadIcon("dock_layout3.png");
+ layoutIcon4 = GUIUtilities.loadIcon("dock_layout4.png");
+
+ JPanel layoutPanel = new JPanel(new BorderLayout(12,12));
+
+ if(jEdit.getBooleanProperty("view.docking.alternateLayout"))
+ {
+ layout = new JLabel(jEdit.getBooleanProperty(
+ "view.toolbar.alternateLayout")
+ ? layoutIcon4 : layoutIcon2);
+ }
+ else
+ {
+ layout = new JLabel(jEdit.getBooleanProperty(
+ "view.toolbar.alternateLayout")
+ ? layoutIcon3 : layoutIcon1);
+ }
+
+ layout.setBorder(new EmptyBorder(12,12,12,12));
+ layoutPanel.add(BorderLayout.CENTER,layout);
+
+ JPanel buttons = new JPanel(new GridLayout(2,1,12,12));
+ buttons.setBorder(new EmptyBorder(0,12,12,12));
+ buttons.add(alternateDockingLayout = new JButton(jEdit.getProperty(
+ "options.view.alternateDockingLayout")));
+ ActionHandler actionHandler = new ActionHandler();
+ alternateDockingLayout.addActionListener(actionHandler);
+ buttons.add(alternateToolBarLayout = new JButton(jEdit.getProperty(
+ "options.view.alternateToolBarLayout")));
+ alternateToolBarLayout.addActionListener(actionHandler);
+ layoutPanel.add(BorderLayout.SOUTH,buttons);
+
+ TitledBorder border = new TitledBorder(jEdit.getProperty(
+ "options.view.viewLayout"));
+ border.setTitleJustification(TitledBorder.CENTER);
+ layoutPanel.setBorder(border);
+
+ addComponent(layoutPanel);
+
+ /* Show full path */
+ showFullPath = new JCheckBox(jEdit.getProperty(
+ "options.view.showFullPath"));
+ showFullPath.setSelected(jEdit.getBooleanProperty(
+ "view.showFullPath"));
+ addComponent(showFullPath);
+
+ /* Show search bar */
+ showSearchbar = new JCheckBox(jEdit.getProperty(
+ "options.view.showSearchbar"));
+ showSearchbar.setSelected(jEdit.getBooleanProperty(
+ "view.showSearchbar"));
+ addComponent(showSearchbar);
+
+ /* Beep on search auto wrap */
+ beepOnSearchAutoWrap = new JCheckBox(jEdit.getProperty(
+ "options.view.beepOnSearchAutoWrap"));
+ beepOnSearchAutoWrap.setSelected(jEdit.getBooleanProperty(
+ "search.beepOnSearchAutoWrap"));
+ addComponent(beepOnSearchAutoWrap);
+
+ /* Show buffer switcher */
+ showBufferSwitcher = new JCheckBox(jEdit.getProperty(
+ "options.view.showBufferSwitcher"));
+
+ showBufferSwitcher.setSelected(jEdit.getBooleanProperty(
+ "view.showBufferSwitcher"));
+ addComponent(showBufferSwitcher);
+ showBufferSwitcher.addActionListener(actionHandler);
+
+
+ /* Buffer switcher max row count */
+ bufferSwitcherMaxRowCount = new JTextField(jEdit.getProperty("bufferSwitcher.maxRowCount"));
+ addComponent(jEdit.getProperty("options.view.bufferSwitcherMaxRowsCount"),
+ bufferSwitcherMaxRowCount);
+ bufferSwitcherMaxRowCount.setEditable(showBufferSwitcher.isSelected());
+
+ buffersetScope = new JComboBox();
+ buffersetScope.addItem(BufferSet.Scope.global);
+ buffersetScope.addItem(BufferSet.Scope.view);
+ buffersetScope.addItem(BufferSet.Scope.editpane);
+ BufferSet.Scope scope = null;
+ try
+ {
+ scope = BufferSet.Scope.valueOf(jEdit.getProperty("bufferset.scope"));
+ }
+ catch (IllegalArgumentException e)
+ {
+ Log.log(Log.ERROR, this, e);
+ scope = BufferSet.Scope.global;
+ }
+ buffersetScope.setSelectedItem(scope);
+ addComponent(jEdit.getProperty("options.bufferset.scope"), buffersetScope);
+
+ /* Sort buffers */
+ sortBuffers = new JCheckBox(jEdit.getProperty(
+ "options.view.sortBuffers"));
+ sortBuffers.setSelected(jEdit.getBooleanProperty("sortBuffers"));
+ sortBuffers.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ sortByName.setEnabled(sortBuffers.isSelected());
+ }
+ });
+
+ addComponent(sortBuffers);
+
+ /* Sort buffers by names */
+ sortByName = new JCheckBox(jEdit.getProperty(
+ "options.view.sortByName"));
+ sortByName.setSelected(jEdit.getBooleanProperty("sortByName"));
+ sortByName.setEnabled(sortBuffers.isSelected());
+ addComponent(sortByName);
+
+ fullScreenIncludesMenu = new JCheckBox(jEdit.getProperty(
+ "options.view.fullScreenIncludesMenu"));
+ fullScreenIncludesMenu.setSelected(
+ jEdit.getBooleanProperty("fullScreenIncludesMenu"));
+ addComponent(fullScreenIncludesMenu);
+
+ fullScreenIncludesToolbar = new JCheckBox(jEdit.getProperty(
+ "options.view.fullScreenIncludesToolbar"));
+ fullScreenIncludesToolbar.setSelected(
+ jEdit.getBooleanProperty("fullScreenIncludesToolbar"));
+ addComponent(fullScreenIncludesToolbar);
+
+ fullScreenIncludesStatus = new JCheckBox(jEdit.getProperty(
+ "options.view.fullScreenIncludesStatus"));
+ fullScreenIncludesStatus.setSelected(
+ jEdit.getBooleanProperty("fullScreenIncludesStatus"));
+ addComponent(fullScreenIncludesStatus);
+
+ } //}}}
+
+ //{{{ _save() method
+ @Override
+ protected void _save()
+ {
+ jEdit.setBooleanProperty("view.docking.alternateLayout",
+ layout.getIcon() == layoutIcon2
+ || layout.getIcon() == layoutIcon4);
+ jEdit.setBooleanProperty("view.toolbar.alternateLayout",
+ layout.getIcon() == layoutIcon3
+ || layout.getIcon() == layoutIcon4);
+ jEdit.setBooleanProperty("view.showFullPath",showFullPath
+ .isSelected());
+ jEdit.setBooleanProperty("view.showSearchbar",showSearchbar
+ .isSelected());
+ jEdit.setBooleanProperty("search.beepOnSearchAutoWrap",beepOnSearchAutoWrap
+ .isSelected());
+ jEdit.setBooleanProperty("view.showBufferSwitcher",
+ showBufferSwitcher.isSelected());
+ jEdit.setProperty("bufferSwitcher.maxRowCount",
+ bufferSwitcherMaxRowCount.getText());
+ jEdit.setProperty("bufferset.scope", buffersetScope.getSelectedItem().toString());
+ jEdit.setBooleanProperty("sortBuffers",sortBuffers.isSelected());
+ jEdit.setBooleanProperty("sortByName",sortByName.isSelected());
+ jEdit.setBooleanProperty("fullScreenIncludesMenu",fullScreenIncludesMenu.isSelected());
+ jEdit.setBooleanProperty("fullScreenIncludesToolbar",fullScreenIncludesToolbar.isSelected());
+ jEdit.setBooleanProperty("fullScreenIncludesStatus",fullScreenIncludesStatus.isSelected());
+
+ } //}}}
+
+ //{{{ Private members
+ private JLabel layout;
+ private Icon layoutIcon1, layoutIcon2, layoutIcon3, layoutIcon4;
+ private JButton alternateDockingLayout, alternateToolBarLayout;
+ private JCheckBox showFullPath;
+ private JCheckBox showSearchbar;
+ private JCheckBox beepOnSearchAutoWrap;
+ private JCheckBox showBufferSwitcher;
+ private JTextField bufferSwitcherMaxRowCount;
+ private JComboBox buffersetScope;
+ private JCheckBox sortBuffers;
+ private JCheckBox sortByName;
+ private JCheckBox fullScreenIncludesMenu;
+ private JCheckBox fullScreenIncludesToolbar;
+ private JCheckBox fullScreenIncludesStatus;
+
+ //}}}
+
+ //{{{ ActionHandler class
+ private class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == alternateDockingLayout)
+ {
+ if(layout.getIcon() == layoutIcon1)
+ layout.setIcon(layoutIcon2);
+ else if(layout.getIcon() == layoutIcon2)
+ layout.setIcon(layoutIcon1);
+ else if(layout.getIcon() == layoutIcon3)
+ layout.setIcon(layoutIcon4);
+ else if(layout.getIcon() == layoutIcon4)
+ layout.setIcon(layoutIcon3);
+ }
+ else if(evt.getSource() == alternateToolBarLayout)
+ {
+ if(layout.getIcon() == layoutIcon1)
+ layout.setIcon(layoutIcon3);
+ else if(layout.getIcon() == layoutIcon3)
+ layout.setIcon(layoutIcon1);
+ else if(layout.getIcon() == layoutIcon2)
+ layout.setIcon(layoutIcon4);
+ else if(layout.getIcon() == layoutIcon4)
+ layout.setIcon(layoutIcon2);
+ }
+ else if (evt.getSource() == showBufferSwitcher)
+ {
+ bufferSwitcherMaxRowCount.setEditable(showBufferSwitcher.isSelected());
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/options/mirrors.dtd b/jEdit/org/gjt/sp/jedit/options/mirrors.dtd
index c1a0524..19f5f0b 100644
--- a/jEdit/org/gjt/sp/jedit/options/mirrors.dtd
+++ b/jEdit/org/gjt/sp/jedit/options/mirrors.dtd
@@ -1,15 +1,15 @@
-<!-- DTD used to validate the mirror list XML file from Plugin Central -->
-
-<!ELEMENT MIRRORS ( MIRROR )+ >
-
-<!ELEMENT MIRROR ( DESCRIPTION, LOCATION, COUNTRY, CONTINENT ) >
-<!ATTLIST MIRROR
- ID CDATA #REQUIRED >
-
-<!ELEMENT DESCRIPTION ( #PCDATA ) >
-
-<!ELEMENT LOCATION ( #PCDATA ) >
-
-<!ELEMENT COUNTRY ( #PCDATA ) >
-
-<!ELEMENT CONTINENT ( #PCDATA ) >
+<!-- DTD used to validate the mirror list XML file from Plugin Central -->
+
+<!ELEMENT MIRRORS ( MIRROR )+ >
+
+<!ELEMENT MIRROR ( DESCRIPTION, LOCATION, COUNTRY, CONTINENT ) >
+<!ATTLIST MIRROR
+ ID CDATA #REQUIRED >
+
+<!ELEMENT DESCRIPTION ( #PCDATA ) >
+
+<!ELEMENT LOCATION ( #PCDATA ) >
+
+<!ELEMENT COUNTRY ( #PCDATA ) >
+
+<!ELEMENT CONTINENT ( #PCDATA ) >
diff --git a/jEdit/org/gjt/sp/jedit/options/package.html b/jEdit/org/gjt/sp/jedit/options/package.html
index ecdb7a7..c1977c8 100644
--- a/jEdit/org/gjt/sp/jedit/options/package.html
+++ b/jEdit/org/gjt/sp/jedit/options/package.html
@@ -1 +1 @@
-<html><body>Global Options dialog box panes.</body></html>
+<html><body>Global Options dialog box panes.</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/package.html b/jEdit/org/gjt/sp/jedit/package.html
index 815aa19..240b3e9 100644
--- a/jEdit/org/gjt/sp/jedit/package.html
+++ b/jEdit/org/gjt/sp/jedit/package.html
@@ -1,31 +1,31 @@
-<html><body>This package contains jEdit's core classes.<p>
-
-For plugin development, start by looking at
-<a href="PluginJAR.html">PluginJAR</a> and
-<a href="EditPlugin.html">EditPlugin</a>, which describe the basics of jEdit's
-plugin API. Then, browse the following classes:
-
-<ul>
-<li></li>
-<li><a href="jEdit.html">jEdit</a></li>
-<li><a href="Buffer.html">Buffer</a></li>
-<li><a href="EditPane.html">EditPane</a></li>
-<li><a href="GUIUtilities.html">GUIUtilities</a></li>
-<li><a href="textarea/JEditTextArea.html">JEditTextArea</a></li>
-<li><a href="MiscUtilities.html">MiscUtilities</a></li>
-<li><a href="io/VFSManager.html">VFSManager</a></li>
-<li><a href="View.html">View</a></li>
-</ul>
-
-The EditBus framework is used to receive notification of various
-editor state changes:
-
-<ul>
-<li><a href="EditBus.html">EditBus</a></li>
-<li><a href="EBComponent.html">EBComponent</a></li>
-<li><a href="EBMessage.html">EBMessage</a></li>
-<li><a href="EBPlugin.html">EBPlugin</a></li>
-<li><a href="msg/package-summary.html">org.gjt.sp.jedit.msg package</a></li>
-</ul>
-
-</body></html>
+<html><body>This package contains jEdit's core classes.<p>
+
+For plugin development, start by looking at
+<a href="PluginJAR.html">PluginJAR</a> and
+<a href="EditPlugin.html">EditPlugin</a>, which describe the basics of jEdit's
+plugin API. Then, browse the following classes:
+
+<ul>
+<li></li>
+<li><a href="jEdit.html">jEdit</a></li>
+<li><a href="Buffer.html">Buffer</a></li>
+<li><a href="EditPane.html">EditPane</a></li>
+<li><a href="GUIUtilities.html">GUIUtilities</a></li>
+<li><a href="textarea/JEditTextArea.html">JEditTextArea</a></li>
+<li><a href="MiscUtilities.html">MiscUtilities</a></li>
+<li><a href="io/VFSManager.html">VFSManager</a></li>
+<li><a href="View.html">View</a></li>
+</ul>
+
+The EditBus framework is used to receive notification of various
+editor state changes:
+
+<ul>
+<li><a href="EditBus.html">EditBus</a></li>
+<li><a href="EBComponent.html">EBComponent</a></li>
+<li><a href="EBMessage.html">EBMessage</a></li>
+<li><a href="EBPlugin.html">EBPlugin</a></li>
+<li><a href="msg/package-summary.html">org.gjt.sp.jedit.msg package</a></li>
+</ul>
+
+</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/perspective.dtd b/jEdit/org/gjt/sp/jedit/perspective.dtd
index 585711d..c3e431e 100644
--- a/jEdit/org/gjt/sp/jedit/perspective.dtd
+++ b/jEdit/org/gjt/sp/jedit/perspective.dtd
@@ -1,39 +1,39 @@
-<!ENTITY % att-bool '( TRUE | FALSE )' >
-
-<!-- PERSPECTIVE element -->
-<!ELEMENT PERSPECTIVE ( BUFFER*, VIEW* ) >
-
-<!-- BUFFER element -->
-<!ELEMENT BUFFER ( #PCDATA ) >
-<!ATTLIST BUFFER
- AUTORELOAD %att-bool; "TRUE"
- AUTORELOAD_DIALOG %att-bool; "TRUE" >
-
-<!-- VIEW element -->
-<!ELEMENT VIEW ( PANES, GEOMETRY, DOCKING? ) >
-<!ATTLIST VIEW
- PLAIN %att-bool; "FALSE" >
-
-<!-- PANES element -->
-<!ELEMENT PANES ( #PCDATA ) >
-
-<!-- GEOMETRY element -->
-<!ELEMENT GEOMETRY EMPTY >
-<!ATTLIST GEOMETRY
- X CDATA #IMPLIED
- Y CDATA #IMPLIED
- WIDTH CDATA #IMPLIED
- HEIGHT CDATA #IMPLIED
- EXT_STATE CDATA #IMPLIED >
-
-<!-- DOCKING element -->
-<!ELEMENT DOCKING EMPTY >
-<!ATTLIST DOCKING
- LEFT CDATA #IMPLIED
- TOP CDATA #IMPLIED
- BOTTOM CDATA #IMPLIED
- RIGHT CDATA #IMPLIED
- LEFT_POS CDATA #IMPLIED
- TOP_POS CDATA #IMPLIED
- BOTTOM_POS CDATA #IMPLIED
- RIGHT_POS CDATA #IMPLIED >
+<!ENTITY % att-bool '( TRUE | FALSE )' >
+
+<!-- PERSPECTIVE element -->
+<!ELEMENT PERSPECTIVE ( BUFFER*, VIEW* ) >
+
+<!-- BUFFER element -->
+<!ELEMENT BUFFER ( #PCDATA ) >
+<!ATTLIST BUFFER
+ AUTORELOAD %att-bool; "TRUE"
+ AUTORELOAD_DIALOG %att-bool; "TRUE" >
+
+<!-- VIEW element -->
+<!ELEMENT VIEW ( PANES, GEOMETRY, DOCKING? ) >
+<!ATTLIST VIEW
+ PLAIN %att-bool; "FALSE" >
+
+<!-- PANES element -->
+<!ELEMENT PANES ( #PCDATA ) >
+
+<!-- GEOMETRY element -->
+<!ELEMENT GEOMETRY EMPTY >
+<!ATTLIST GEOMETRY
+ X CDATA #IMPLIED
+ Y CDATA #IMPLIED
+ WIDTH CDATA #IMPLIED
+ HEIGHT CDATA #IMPLIED
+ EXT_STATE CDATA #IMPLIED >
+
+<!-- DOCKING element -->
+<!ELEMENT DOCKING EMPTY >
+<!ATTLIST DOCKING
+ LEFT CDATA #IMPLIED
+ TOP CDATA #IMPLIED
+ BOTTOM CDATA #IMPLIED
+ RIGHT CDATA #IMPLIED
+ LEFT_POS CDATA #IMPLIED
+ TOP_POS CDATA #IMPLIED
+ BOTTOM_POS CDATA #IMPLIED
+ RIGHT_POS CDATA #IMPLIED >
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/InstallPanel.java b/jEdit/org/gjt/sp/jedit/pluginmgr/InstallPanel.java
index 53d5609..f089b9d 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/InstallPanel.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/InstallPanel.java
@@ -1,1156 +1,1154 @@
-/*
- * InstallPanel.java - For installing plugins
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Kris Kopicki
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-//{{{ Imports
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.browser.VFSBrowser;
-import org.gjt.sp.jedit.gui.RolloverButton;
-import org.gjt.sp.jedit.io.VFS;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.util.XMLUtilities;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import javax.swing.*;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import javax.swing.event.TableModelEvent;
-import javax.swing.event.TableModelListener;
-import javax.swing.table.AbstractTableModel;
-import javax.swing.table.DefaultTableCellRenderer;
-import javax.swing.table.JTableHeader;
-import javax.swing.table.TableColumn;
-import javax.swing.text.html.HTMLEditorKit;
-import java.awt.*;
-import java.awt.event.*;
-import java.io.File;
-import java.io.InputStream;
-import java.text.NumberFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.List;
-//}}}
-
-/**
- * @version $Id: InstallPanel.java 14125 2008-12-01 10:06:24Z kpouer $
- */
-class InstallPanel extends JPanel implements EBComponent
-{
-
- //{{{ Variables
- private final JTable table;
- private JScrollPane scrollpane;
- private PluginTableModel pluginModel;
- private PluginManager window;
- private PluginInfoBox infoBox;
- private ChoosePluginSet chooseButton;
- private boolean updates;
-
- private final Set<String> pluginSet = new HashSet<String>();
- //}}}
-
- //{{{ InstallPanel constructor
- InstallPanel(PluginManager window, boolean updates)
- {
- super(new BorderLayout(12,12));
-
- this.window = window;
- this.updates = updates;
-
- setBorder(new EmptyBorder(12,12,12,12));
-
- final JSplitPane split = new JSplitPane(
- JSplitPane.VERTICAL_SPLIT, jEdit.getBooleanProperty("appearance.continuousLayout"));
- split.setResizeWeight(0.75);
- /* Setup the table */
- table = new JTable(pluginModel = new PluginTableModel());
- table.setShowGrid(false);
- table.setIntercellSpacing(new Dimension(0,0));
- table.setRowHeight(table.getRowHeight() + 2);
- table.setPreferredScrollableViewportSize(new Dimension(500,200));
- table.setDefaultRenderer(Object.class, new TextRenderer(
- (DefaultTableCellRenderer)table.getDefaultRenderer(Object.class)));
- table.addFocusListener(new TableFocusHandler());
- InputMap tableInputMap = table.getInputMap(JComponent.WHEN_FOCUSED);
- ActionMap tableActionMap = table.getActionMap();
- tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,0),"tabOutForward");
- tableActionMap.put("tabOutForward",new KeyboardAction(KeyboardCommand.TAB_OUT_FORWARD));
- tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,InputEvent.SHIFT_MASK),"tabOutBack");
- tableActionMap.put("tabOutBack",new KeyboardAction(KeyboardCommand.TAB_OUT_BACK));
- tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE,0),"editPlugin");
- tableActionMap.put("editPlugin",new KeyboardAction(KeyboardCommand.EDIT_PLUGIN));
- tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"closePluginManager");
- tableActionMap.put("closePluginManager",new KeyboardAction(KeyboardCommand.CLOSE_PLUGIN_MANAGER));
-
- TableColumn col1 = table.getColumnModel().getColumn(0);
- TableColumn col2 = table.getColumnModel().getColumn(1);
- TableColumn col3 = table.getColumnModel().getColumn(2);
- TableColumn col4 = table.getColumnModel().getColumn(3);
- TableColumn col5 = table.getColumnModel().getColumn(4);
-
- col1.setPreferredWidth(30);
- col1.setMinWidth(30);
- col1.setMaxWidth(30);
- col1.setResizable(false);
-
- col2.setPreferredWidth(180);
- col3.setPreferredWidth(130);
- col4.setPreferredWidth(70);
- col5.setPreferredWidth(70);
-
- JTableHeader header = table.getTableHeader();
- header.setReorderingAllowed(false);
- header.addMouseListener(new HeaderMouseHandler());
- header.setDefaultRenderer(new HeaderRenderer(
- (DefaultTableCellRenderer)header.getDefaultRenderer()));
-
- scrollpane = new JScrollPane(table);
- scrollpane.getViewport().setBackground(table.getBackground());
- split.setTopComponent(scrollpane);
-
- /* Create description */
- JScrollPane infoPane = new JScrollPane(
- infoBox = new PluginInfoBox());
- infoPane.setPreferredSize(new Dimension(500,100));
- split.setBottomComponent(infoPane);
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- split.setDividerLocation(0.75);
- }
- });
-
- add(BorderLayout.CENTER,split);
-
- /* Create buttons */
- Box buttons = new Box(BoxLayout.X_AXIS);
-
- buttons.add(new InstallButton());
- buttons.add(Box.createHorizontalStrut(12));
- buttons.add(new SelectallButton());
- buttons.add(chooseButton = new ChoosePluginSet());
- buttons.add(new ClearPluginSet());
- buttons.add(Box.createGlue());
- buttons.add(new SizeLabel());
-
-
- add(BorderLayout.SOUTH,buttons);
- String path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET, "");
- if (!path.equals(""))
- {
- loadPluginSet(path);
- }
- } //}}}
-
- //{{{ loadPluginSet() method
- /** loads a pluginSet xml file and updates the model to reflect
- certain checked selections
- @since jEdit 4.3pre10
- @author Alan Ezust
- */
- boolean loadPluginSet(String path)
- {
- VFS vfs = VFSManager.getVFSForPath(path);
- Object session = vfs.createVFSSession(path, InstallPanel.this);
- try
- {
- InputStream is = vfs._createInputStream(session, path, false, InstallPanel.this);
- XMLUtilities.parseXML(is, new StringMapHandler());
- }
- catch (Exception e)
- {
- Log.log(Log.WARNING, this, "Loading Pluginset failed:" + e.getMessage());
- return false;
- }
- pluginModel.update();
- return true;
- } //}}}
-
- //{{{ updateModel() method
- public void updateModel()
- {
- final Set<String> savedChecked = new HashSet<String>();
- final Set<String> savedSelection = new HashSet<String>();
- pluginModel.saveSelection(savedChecked, savedSelection);
- pluginModel.clear();
- infoBox.setText(jEdit.getProperty("plugin-manager.list-download"));
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- infoBox.setText(null);
- pluginModel.update();
- pluginModel.restoreSelection(savedChecked, savedSelection);
- }
- });
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage message)
- {
- if (message.getSource() == PluginManager.getInstance())
- {
- chooseButton.path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET, "");
- if (chooseButton.path.length() > 0)
- {
- loadPluginSet(chooseButton.path);
- pluginModel.restoreSelection(new HashSet<String>(), new HashSet<String>());
- chooseButton.updateUI();
- }
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ formatSize() method
- private static String formatSize(int size)
- {
- NumberFormat df = NumberFormat.getInstance();
- df.setMaximumFractionDigits(1);
- df.setMinimumFractionDigits(0);
- String sizeText;
- if (size < 1048576)
- sizeText = (size >> 10) + "KB";
- else
- sizeText = df.format(size/ 1048576.0d) + "MB";
- return sizeText;
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ KeyboardCommand enum
- public enum KeyboardCommand
- {
- NONE,
- TAB_OUT_FORWARD,
- TAB_OUT_BACK,
- EDIT_PLUGIN,
- CLOSE_PLUGIN_MANAGER
- } //}}}
-
- //{{{ PluginTableModel class
- private class PluginTableModel extends AbstractTableModel
- {
- /** This List can contain String or Entry. */
- private List entries = new ArrayList();
- private int sortType = EntryCompare.COLUMN_NAME;
- int sortDirection = 1;
-
- //{{{ getColumnClass() method
- @Override
- public Class getColumnClass(int columnIndex)
- {
- switch (columnIndex)
- {
- case 0: return Boolean.class;
- case 1:
- case 2:
- case 3:
- case 4:
- case 5: return Object.class;
- default: throw new Error("Column out of range");
- }
- } //}}}
-
- //{{{ getColumnCount() method
- public int getColumnCount()
- {
- return 6;
- } //}}}
-
- //{{{ getColumnName() method
- @Override
- public String getColumnName(int column)
- {
- switch (column)
- {
- case 0: return " ";
- case 1: return ' '+jEdit.getProperty("install-plugins.info.name");
- case 2: return ' '+jEdit.getProperty("install-plugins.info.category");
- case 3: return ' '+jEdit.getProperty("install-plugins.info.version");
- case 4: return ' '+jEdit.getProperty("install-plugins.info.size");
- case 5: return ' '+"Release date";
- default: throw new Error("Column out of range");
- }
- } //}}}
-
- //{{{ getRowCount() method
- public int getRowCount()
- {
- return entries.size();
- } //}}}
-
- //{{{ getValueAt() method
- public Object getValueAt(int rowIndex,int columnIndex)
- {
- Object obj = entries.get(rowIndex);
- if(obj instanceof String)
- {
- if(columnIndex == 1)
- return obj;
- else
- return null;
- }
- else
- {
- Entry entry = (Entry)obj;
-
- switch (columnIndex)
- {
- case 0:
- return entry.install;
- case 1:
- return entry.name;
- case 2:
- return entry.set;
- case 3:
- if (updates)
- return entry.installedVersion + "->" + entry.version;
- return entry.version;
- case 4:
- return formatSize(entry.size);
- case 5:
- return entry.date;
- default:
- throw new Error("Column out of range");
- }
- }
- } //}}}
-
- //{{{ isCellEditable() method
- @Override
- public boolean isCellEditable(int rowIndex, int columnIndex)
- {
- return columnIndex == 0;
- } //}}}
-
- //{{{ setSelectAll() method
- public void setSelectAll(boolean b)
- {
- if(isDownloadingList())
- return;
-
- int length = getRowCount();
- for (int i = 0; i < length; i++)
- {
- if (b)
- setValueAt(Boolean.TRUE,i,0);
- else
- {
- Entry entry = (Entry)entries.get(i);
- entry.parents = new LinkedList<Entry>();
- entry.install = false;
- }
- }
- fireTableChanged(new TableModelEvent(this));
- } //}}}
-
- //{{{ setSortType() method
- public void setSortType(int type)
- {
- sortType = type;
- sort(type);
- } //}}}
-
- //{{{ deselectParents() method
- private void deselectParents(Entry entry)
- {
- Entry[] parents = entry.getParents();
-
- if (parents.length == 0)
- return;
-
- String[] args = { entry.name };
-
- int result = GUIUtilities.listConfirm(
- window,"plugin-manager.dependency",
- args,parents);
- if (result != JOptionPane.OK_OPTION)
- {
- entry.install = true;
- return;
- }
-
- for(int i = 0; i < parents.length; i++)
- parents[i].install = false;
-
- fireTableRowsUpdated(0,getRowCount() - 1);
- } //}}}
-
- //{{{ setValueAt() method
- @Override
- public void setValueAt(Object aValue, int row, int column)
- {
- if (column != 0) return;
-
- Object obj = entries.get(row);
- if(obj instanceof String)
- return;
-
- Entry entry = (Entry)obj;
- entry.install = Boolean.TRUE.equals(aValue);
-
- if (!entry.install)
- deselectParents(entry);
-
- List<PluginList.Dependency> deps = entry.plugin.getCompatibleBranch().deps;
-
- for (int i = 0; i < deps.size(); i++)
- {
- PluginList.Dependency dep = deps.get(i);
- if (dep.what.equals("plugin"))
- {
- for (int j = 0; j < entries.size(); j++)
- {
- Entry temp = (Entry)entries.get(j);
- if (temp.plugin == dep.plugin)
- {
- if (entry.install)
- {
- temp.parents.add(entry);
- setValueAt(Boolean.TRUE,j,0);
- }
- else
- temp.parents.remove(entry);
- }
- }
- }
- }
-
- fireTableCellUpdated(row,column);
- } //}}}
-
- //{{{ sort() method
- public void sort(int type)
- {
- Set<String> savedChecked = new HashSet<String>();
- Set<String> savedSelection = new HashSet<String>();
- saveSelection(savedChecked,savedSelection);
-
- if (sortType != type)
- {
- sortDirection = 1;
- }
- sortType = type;
-
- if(isDownloadingList())
- return;
-
- Collections.sort(entries,new EntryCompare(type, sortDirection));
- fireTableChanged(new TableModelEvent(this));
- restoreSelection(savedChecked,savedSelection);
- table.getTableHeader().repaint();
- }
- //}}}
-
- //{{{ isDownloadingList() method
- private boolean isDownloadingList()
- {
- return entries.size() == 1 && entries.get(0) instanceof String;
- } //}}}
-
- //{{{ clear() method
- public void clear()
- {
- entries = new ArrayList();
- fireTableChanged(new TableModelEvent(this));
- } //}}}
-
- //{{{ update() method
- public void update()
- {
- Set<String> savedChecked = new HashSet<String>();
- Set<String> savedSelection = new HashSet<String>();
- saveSelection(savedChecked,savedSelection);
-
- PluginList pluginList = window.getPluginList();
-
- if (pluginList == null) return;
-
- entries = new ArrayList();
-
- for(int i = 0; i < pluginList.pluginSets.size(); i++)
- {
- PluginList.PluginSet set = pluginList.pluginSets.get(i);
- for(int j = 0; j < set.plugins.size(); j++)
- {
- PluginList.Plugin plugin = pluginList.pluginHash.get(set.plugins.get(j));
- PluginList.Branch branch = plugin.getCompatibleBranch();
- String installedVersion =
- plugin.getInstalledVersion();
- if (updates)
- {
- if(branch != null
- && branch.canSatisfyDependencies()
- && installedVersion != null
- && StandardUtilities.compareStrings(branch.version,
- installedVersion,false) > 0)
- {
- entries.add(new Entry(plugin, set.name));
- }
- }
- else
- {
- if(installedVersion == null && plugin.canBeInstalled())
- entries.add(new Entry(plugin,set.name));
- }
- }
- }
-
- sort(sortType);
-
- fireTableChanged(new TableModelEvent(this));
- restoreSelection(savedChecked, savedSelection);
- } //}}}
-
- //{{{ saveSelection() method
- public void saveSelection(Set<String> savedChecked, Set<String> savedSelection)
- {
- if (entries.isEmpty())
- return;
- for (int i=0, c=getRowCount() ; i<c ; i++)
- {
- if ((Boolean)getValueAt(i,0))
- {
- savedChecked.add(entries.get(i).toString());
- }
- }
- int[] rows = table.getSelectedRows();
- for (int i=0 ; i<rows.length ; i++)
- {
- savedSelection.add(entries.get(rows[i]).toString());
- }
- } //}}}
-
- //{{{ restoreSelection() method
- public void restoreSelection(Set<String> savedChecked, Set<String> savedSelection)
- {
- for (int i=0, c=getRowCount() ; i<c ; i++)
- {
- String name = entries.get(i).toString();
- if (pluginSet.contains(name))
- setValueAt(true, i, 0);
- else setValueAt(savedChecked.contains(name), i, 0);
- }
-
- if (null != table)
- {
- table.setColumnSelectionInterval(0,0);
- if (!savedSelection.isEmpty())
- {
- int i = 0;
- int rowCount = getRowCount();
- for ( ; i<rowCount ; i++)
- {
- String name = entries.get(i).toString();
- if (savedSelection.contains(name))
- {
- table.setRowSelectionInterval(i,i);
- break;
- }
- }
- ListSelectionModel lsm = table.getSelectionModel();
- for ( ; i<rowCount ; i++)
- {
- String name = entries.get(i).toString();
- if (savedSelection.contains(name))
- {
- lsm.addSelectionInterval(i,i);
- }
- }
- }
- else
- {
- if (table.getRowCount() != 0)
- table.setRowSelectionInterval(0,0);
- JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
- scrollbar.setValue(scrollbar.getMinimum());
- }
- }
- } //}}}
- } //}}}
-
- //{{{ Entry class
- private class Entry
- {
- String name, installedVersion, version, author, date, description, set;
-
- long timestamp;
- int size;
- boolean install;
- PluginList.Plugin plugin;
- List<Entry> parents = new LinkedList<Entry>();
-
- Entry(PluginList.Plugin plugin, String set)
- {
- PluginList.Branch branch = plugin.getCompatibleBranch();
- boolean downloadSource = jEdit.getBooleanProperty("plugin-manager.downloadSource");
- int size = downloadSource ? branch.downloadSourceSize : branch.downloadSize;
-
- this.name = plugin.name;
- this.author = plugin.author;
- this.installedVersion = plugin.getInstalledVersion();
- this.version = branch.version;
- this.size = size;
- this.date = branch.date;
- this.description = plugin.description;
- this.set = set;
- this.install = false;
- this.plugin = plugin;
- SimpleDateFormat format = new SimpleDateFormat("d MMMM yyyy", Locale.ENGLISH);
- try
- {
- timestamp = format.parse(date).getTime();
- }
- catch (ParseException e)
- {
- Log.log(Log.ERROR, this, e);
- }
- }
-
- private void getParents(List<Entry> list)
- {
- for (Entry entry : parents)
- {
- if (entry.install && !list.contains(entry))
- {
- list.add(entry);
- entry.getParents(list);
- }
- }
- }
-
- Entry[] getParents()
- {
- List<Entry> list = new ArrayList<Entry>();
- getParents(list);
- Entry[] array = list.toArray(new Entry[list.size()]);
- Arrays.sort(array,new StandardUtilities.StringCompare<Entry>(true));
- return array;
- }
-
- @Override
- public String toString()
- {
- return name;
- }
- } //}}}
-
- //{{{ PluginInfoBox class
- /**
- * @TODO refactor to use the PluginDetailPanel?
- */
- private class PluginInfoBox extends JTextPane implements ListSelectionListener
- {
- private final String[] params;
- PluginInfoBox()
- {
- setBackground(jEdit.getColorProperty("view.bgColor"));
- setForeground(jEdit.getColorProperty("view.fgColor"));
- putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true);
- setEditable(false);
- setEditorKit(new HTMLEditorKit());
-// setLineWrap(true);
-// setWrapStyleWord(true);
- params = new String[3];
- table.getSelectionModel().addListSelectionListener(this);
- }
-
-
- public void valueChanged(ListSelectionEvent e)
- {
- String text = "";
- if (table.getSelectedRowCount() == 1)
- {
- Entry entry = (Entry) pluginModel.entries
- .get(table.getSelectedRow());
- params[0] = entry.author;
- params[1] = entry.date;
- params[2] = entry.description;
- text = jEdit.getProperty("install-plugins.info", params);
- text = text.replace("\n", "<br>");
- text = "<html>" + text + "</html>";
- }
- setText(text);
- setCaretPosition(0);
- }
- } //}}}
-
- //{{{ SizeLabel class
- private class SizeLabel extends JLabel implements TableModelListener
- {
- private int size;
-
- SizeLabel()
- {
- size = 0;
- setText(jEdit.getProperty("install-plugins.totalSize")+formatSize(size));
- pluginModel.addTableModelListener(this);
- }
-
- public void tableChanged(TableModelEvent e)
- {
- if (e.getType() == TableModelEvent.UPDATE)
- {
- if(pluginModel.isDownloadingList())
- return;
-
- size = 0;
- int length = pluginModel.getRowCount();
- for (int i = 0; i < length; i++)
- {
- Entry entry = (Entry)pluginModel
- .entries.get(i);
- if (entry.install)
- size += entry.size;
- }
- setText(jEdit.getProperty("install-plugins.totalSize")+formatSize(size));
- }
- }
- } //}}}
-
- //{{{ SelectallButton class
- private class SelectallButton extends JCheckBox implements ActionListener, TableModelListener
- {
- SelectallButton()
- {
- super(jEdit.getProperty("install-plugins.select-all"));
- addActionListener(this);
- pluginModel.addTableModelListener(this);
- setEnabled(false);
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- pluginModel.setSelectAll(isSelected());
- }
-
- public void tableChanged(TableModelEvent e)
- {
- if(pluginModel.isDownloadingList())
- return;
-
- setEnabled(pluginModel.getRowCount() != 0);
- if (e.getType() == TableModelEvent.UPDATE)
- {
- int length = pluginModel.getRowCount();
- for (int i = 0; i < length; i++)
- if (!((Boolean)pluginModel.getValueAt(i,0)).booleanValue())
- {
- setSelected(false);
- return;
- }
- if (length > 0)
- setSelected(true);
- }
- }
- } //}}}
-
- //{{{ StringMapHandler class
- /** For parsing the pluginset xml files into pluginSet */
- private class StringMapHandler extends DefaultHandler
- {
- StringMapHandler()
- {
- pluginSet.clear();
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException
- {
- if (localName.equals("plugin"))
- {
- pluginSet.add(attrs.getValue("name"));
- }
- }
- } //}}}
-
- //{{{ ChoosePluginSet class
- private class ChoosePluginSet extends RolloverButton implements ActionListener
- {
- private String path;
-
- //{{{ ChoosePluginSet constructor
- ChoosePluginSet()
- {
- setIcon(GUIUtilities.loadIcon(jEdit.getProperty("install-plugins.choose-plugin-set.icon")));
- addActionListener(this);
- updateUI();
- } //}}}
-
- //{{{ updateUI method
- @Override
- public void updateUI()
- {
- path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET, "");
- if (path.length()<1) setToolTipText ("Click here to choose a predefined plugin set");
- else setToolTipText ("Choose pluginset (" + path + ')');
- super.updateUI();
- }//}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent ae)
- {
- path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET,
- jEdit.getSettingsDirectory() + File.separator);
- String[] selectedFiles = GUIUtilities.showVFSFileDialog(InstallPanel.this.window,
- jEdit.getActiveView(), path, VFSBrowser.OPEN_DIALOG, false);
- if (selectedFiles == null || selectedFiles.length != 1) return;
- path = selectedFiles[0];
- boolean success = loadPluginSet(path);
- if (success)
- {
- jEdit.setProperty(PluginManager.PROPERTY_PLUGINSET, path);
- }
- updateUI();
- } //}}}
- }//}}}
-
- //{{{ ClearPluginSet class
- private class ClearPluginSet extends RolloverButton implements ActionListener
- {
- //{{{ ClearPluginSet constructor
- ClearPluginSet()
- {
- setIcon(GUIUtilities.loadIcon(jEdit.getProperty("install-plugins.clear-plugin-set.icon")));
- setToolTipText("clear plugin set");
- addActionListener(this);
- } //}}}
-
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent e)
- {
- pluginSet.clear();
- pluginModel.restoreSelection(new HashSet<String>(), new HashSet<String>());
- jEdit.unsetProperty(PluginManager.PROPERTY_PLUGINSET);
- chooseButton.updateUI();
- } //}}}
- } //}}}
-
- //{{{ InstallButton class
- private class InstallButton extends JButton implements ActionListener, TableModelListener
- {
- InstallButton()
- {
- super(jEdit.getProperty("install-plugins.install"));
- pluginModel.addTableModelListener(this);
- addActionListener(this);
- setEnabled(false);
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- if(pluginModel.isDownloadingList())
- return;
-
- boolean downloadSource = jEdit.getBooleanProperty(
- "plugin-manager.downloadSource");
- boolean installUser = jEdit.getBooleanProperty(
- "plugin-manager.installUser");
- Roster roster = new Roster();
- String installDirectory;
- if(installUser)
- {
- installDirectory = MiscUtilities.constructPath(
- jEdit.getSettingsDirectory(),"jars");
- }
- else
- {
- installDirectory = MiscUtilities.constructPath(
- jEdit.getJEditHome(),"jars");
- }
-
- int length = pluginModel.getRowCount();
- int instcount = 0;
- for (int i = 0; i < length; i++)
- {
- Entry entry = (Entry)pluginModel.entries.get(i);
- if (entry.install)
- {
- entry.plugin.install(roster,installDirectory,downloadSource);
- if (updates)
- entry.plugin.getCompatibleBranch().satisfyDependencies(
- roster,installDirectory,downloadSource);
- instcount++;
- }
- }
-
- if(roster.isEmpty())
- return;
-
- boolean cancel = false;
- if (updates && roster.getOperationCount() > instcount)
- if (GUIUtilities.confirm(window,
- "install-plugins.depend",
- null,
- JOptionPane.OK_CANCEL_OPTION,
- JOptionPane.WARNING_MESSAGE) == JOptionPane.CANCEL_OPTION)
- cancel = true;
-
- if (!cancel)
- {
- new PluginManagerProgress(window,roster);
-
- roster.performOperationsInAWTThread(window);
- pluginModel.update();
- }
- }
-
- public void tableChanged(TableModelEvent e)
- {
- if(pluginModel.isDownloadingList())
- return;
-
- if (e.getType() == TableModelEvent.UPDATE)
- {
- int length = pluginModel.getRowCount();
- for (int i = 0; i < length; i++)
- if (((Boolean)pluginModel.getValueAt(i,0)).booleanValue())
- {
- setEnabled(true);
- return;
- }
- setEnabled(false);
- }
- }
- } //}}}
-
- //{{{ EntryCompare class
- private static class EntryCompare implements Comparator<Entry>
- {
- private static final int COLUMN_INSTALL = 0;
- private static final int COLUMN_NAME = 1;
- private static final int COLUMN_CATEGORY = 2;
- private static final int COLUMN_VERSION = 3;
- private static final int COLUMN_SIZE = 4;
- private static final int COLUMN_RELEASE = 5;
-
- private int type;
-
- /** 1=up, -1=down */
- private int sortDirection;
-
- EntryCompare(int type, int sortDirection)
- {
- this.type = type;
- this.sortDirection = sortDirection;
- }
-
- public int compare(Entry e1, Entry e2)
- {
- int result;
-
- switch (type)
- {
- case COLUMN_INSTALL:
- result = (e1.install == e2.install) ? 0 : (e1.install ? 1 : -1);
- break;
- case COLUMN_NAME:
- result = e1.name.compareToIgnoreCase(e2.name);
- break;
- case COLUMN_CATEGORY:
- result = e1.set.compareToIgnoreCase(e2.set);
- if (result == 0)
- {
- result = e1.name.compareToIgnoreCase(e2.name);
- }
- break;
- case COLUMN_VERSION:
- // lets avoid NPE. Maybe we should move
- // this code to StandardUtilities.compareStrings
- if (e1.version == e2.version)
- {
- result = 0;
- }
- else if (e1.version == null)
- {
- result = -1;
- }
- else if(e2.version == null)
- {
- result = 1;
- }
- else
- {
- result = StandardUtilities.compareStrings(e1.version,
- e2.version,
- true);
- }
- break;
- case COLUMN_SIZE:
- result = (e1.size < e2.size)
- ? -1
- : ((e1.size == e2.size)
- ? 0
- : 1);
- break;
- case COLUMN_RELEASE:
- result = (e1.timestamp < e2.timestamp)
- ? -1
- : ((e1.timestamp == e2.timestamp)
- ? 0
- : 1);
- break;
- default:
- result = 0;
- }
- return result * sortDirection;
- }
- } //}}}
-
- //{{{ HeaderMouseHandler class
- private class HeaderMouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- int column = table.getTableHeader().columnAtPoint(evt.getPoint());
- pluginModel.sortDirection *= -1;
- pluginModel.sort(column);
- }
- } //}}}
-
- //{{{ TextRenderer
- private static class TextRenderer extends DefaultTableCellRenderer
- {
- private DefaultTableCellRenderer tcr;
-
- TextRenderer(DefaultTableCellRenderer tcr)
- {
- this.tcr = tcr;
- }
-
- @Override
- public Component getTableCellRendererComponent(JTable table, Object value,
- boolean isSelected, boolean hasFocus, int row, int column)
- {
- if (column == 5)
- tcr.setHorizontalAlignment(TRAILING);
- else
- tcr.setHorizontalAlignment(LEADING);
- return tcr.getTableCellRendererComponent(table,value,isSelected,false,row,column);
- }
- } //}}}
-
- //{{{ KeyboardAction class
- private class KeyboardAction extends AbstractAction
- {
- private KeyboardCommand command = KeyboardCommand.NONE;
-
- KeyboardAction(KeyboardCommand command)
- {
- this.command = command;
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- switch (command)
- {
- case TAB_OUT_FORWARD:
- KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();
- break;
- case TAB_OUT_BACK:
- KeyboardFocusManager.getCurrentKeyboardFocusManager().focusPreviousComponent();
- break;
- case EDIT_PLUGIN:
- int[] rows = table.getSelectedRows();
- Object[] state = new Object[rows.length];
- for (int i=0 ; i<rows.length ; i++)
- {
- state[i] = pluginModel.getValueAt(rows[i],0);
- }
- for (int i=0 ; i<rows.length ; i++)
- {
- pluginModel.setValueAt(state[i].equals(Boolean.FALSE),rows[i],0);
- }
- break;
- case CLOSE_PLUGIN_MANAGER:
- window.ok();
- break;
- default:
- throw new InternalError();
- }
- }
- } //}}}
-
- //{{{ TableFocusHandler class
- private class TableFocusHandler extends FocusAdapter
- {
- @Override
- public void focusGained(FocusEvent fe)
- {
- if (-1 == table.getSelectedRow() && table.getRowCount() > 0)
- {
- table.setRowSelectionInterval(0,0);
- JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
- scrollbar.setValue(scrollbar.getMinimum());
- }
- if (-1 == table.getSelectedColumn())
- {
- table.setColumnSelectionInterval(0,0);
- }
- }
- } //}}}
-
- //{{{ HeaderRenderer
- private static class HeaderRenderer extends DefaultTableCellRenderer
- {
- private DefaultTableCellRenderer tcr;
-
- HeaderRenderer(DefaultTableCellRenderer tcr)
- {
- this.tcr = tcr;
- }
-
- @Override
- public Component getTableCellRendererComponent(JTable table, Object value,
- boolean isSelected, boolean hasFocus,
- int row, int column)
- {
- JLabel l = (JLabel)tcr.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
- PluginTableModel model = (PluginTableModel) table.getModel();
- Icon icon = (column == model.sortType)
- ? (model.sortDirection == 1) ? ASC_ICON : DESC_ICON
- : null;
- l.setIcon(icon);
- // l.setHorizontalTextPosition(l.LEADING);
- return l;
- }
- } //}}}
-
- //}}}
-
- static final Icon ASC_ICON = GUIUtilities.loadIcon("arrow-asc.png");
- static final Icon DESC_ICON = GUIUtilities.loadIcon("arrow-desc.png");
-}
+/*
+ * InstallPanel.java - For installing plugins
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Kris Kopicki
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+//{{{ Imports
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.browser.VFSBrowser;
+import org.gjt.sp.jedit.gui.RolloverButton;
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.util.ThreadUtilities;
+import org.gjt.sp.util.XMLUtilities;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import javax.swing.*;
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.event.TableModelEvent;
+import javax.swing.event.TableModelListener;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.DefaultTableCellRenderer;
+import javax.swing.table.JTableHeader;
+import javax.swing.table.TableColumn;
+import javax.swing.text.html.HTMLEditorKit;
+import java.awt.*;
+import java.awt.event.*;
+import java.io.File;
+import java.io.InputStream;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.List;
+//}}}
+
+/**
+ * @version $Id: InstallPanel.java 18335 2010-08-12 09:25:34Z kpouer $
+ */
+class InstallPanel extends JPanel implements EBComponent
+{
+
+ //{{{ Variables
+ private final JTable table;
+ private JScrollPane scrollpane;
+ private PluginTableModel pluginModel;
+ private PluginManager window;
+ private PluginInfoBox infoBox;
+ private ChoosePluginSet chooseButton;
+ private boolean updates;
+
+ private final Set<String> pluginSet = new HashSet<String>();
+ //}}}
+
+ //{{{ InstallPanel constructor
+ InstallPanel(PluginManager window, boolean updates)
+ {
+ super(new BorderLayout(12,12));
+
+ this.window = window;
+ this.updates = updates;
+
+ setBorder(new EmptyBorder(12,12,12,12));
+
+ final JSplitPane split = new JSplitPane(
+ JSplitPane.VERTICAL_SPLIT, jEdit.getBooleanProperty("appearance.continuousLayout"));
+ split.setResizeWeight(0.75);
+ /* Setup the table */
+ table = new JTable(pluginModel = new PluginTableModel());
+ table.setShowGrid(false);
+ table.setIntercellSpacing(new Dimension(0,0));
+ table.setRowHeight(table.getRowHeight() + 2);
+ table.setPreferredScrollableViewportSize(new Dimension(500,200));
+ table.setDefaultRenderer(Object.class, new TextRenderer(
+ (DefaultTableCellRenderer)table.getDefaultRenderer(Object.class)));
+ table.addFocusListener(new TableFocusHandler());
+ InputMap tableInputMap = table.getInputMap(JComponent.WHEN_FOCUSED);
+ ActionMap tableActionMap = table.getActionMap();
+ tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,0),"tabOutForward");
+ tableActionMap.put("tabOutForward",new KeyboardAction(KeyboardCommand.TAB_OUT_FORWARD));
+ tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,InputEvent.SHIFT_MASK),"tabOutBack");
+ tableActionMap.put("tabOutBack",new KeyboardAction(KeyboardCommand.TAB_OUT_BACK));
+ tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE,0),"editPlugin");
+ tableActionMap.put("editPlugin",new KeyboardAction(KeyboardCommand.EDIT_PLUGIN));
+ tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"closePluginManager");
+ tableActionMap.put("closePluginManager",new KeyboardAction(KeyboardCommand.CLOSE_PLUGIN_MANAGER));
+
+ TableColumn col1 = table.getColumnModel().getColumn(0);
+ TableColumn col2 = table.getColumnModel().getColumn(1);
+ TableColumn col3 = table.getColumnModel().getColumn(2);
+ TableColumn col4 = table.getColumnModel().getColumn(3);
+ TableColumn col5 = table.getColumnModel().getColumn(4);
+
+ col1.setPreferredWidth(30);
+ col1.setMinWidth(30);
+ col1.setMaxWidth(30);
+ col1.setResizable(false);
+
+ col2.setPreferredWidth(180);
+ col3.setPreferredWidth(130);
+ col4.setPreferredWidth(70);
+ col5.setPreferredWidth(70);
+
+ JTableHeader header = table.getTableHeader();
+ header.setReorderingAllowed(false);
+ header.addMouseListener(new HeaderMouseHandler());
+ header.setDefaultRenderer(new HeaderRenderer(
+ (DefaultTableCellRenderer)header.getDefaultRenderer()));
+
+ scrollpane = new JScrollPane(table);
+ scrollpane.getViewport().setBackground(table.getBackground());
+ split.setTopComponent(scrollpane);
+
+ /* Create description */
+ JScrollPane infoPane = new JScrollPane(
+ infoBox = new PluginInfoBox());
+ infoPane.setPreferredSize(new Dimension(500,100));
+ split.setBottomComponent(infoPane);
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ split.setDividerLocation(0.75);
+ }
+ });
+
+ add(BorderLayout.CENTER,split);
+
+ /* Create buttons */
+ Box buttons = new Box(BoxLayout.X_AXIS);
+
+ buttons.add(new InstallButton());
+ buttons.add(Box.createHorizontalStrut(12));
+ buttons.add(new SelectallButton());
+ buttons.add(chooseButton = new ChoosePluginSet());
+ buttons.add(new ClearPluginSet());
+ buttons.add(Box.createGlue());
+ buttons.add(new SizeLabel());
+
+
+ add(BorderLayout.SOUTH,buttons);
+ String path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET, "");
+ if (!path.equals(""))
+ {
+ loadPluginSet(path);
+ }
+ } //}}}
+
+ //{{{ loadPluginSet() method
+ /** loads a pluginSet xml file and updates the model to reflect
+ certain checked selections
+ @since jEdit 4.3pre10
+ @author Alan Ezust
+ */
+ boolean loadPluginSet(String path)
+ {
+ pluginSet.clear();
+ pluginModel.restoreSelection(new HashSet<String>(), new HashSet<String>());
+
+ VFS vfs = VFSManager.getVFSForPath(path);
+ Object session = vfs.createVFSSession(path, InstallPanel.this);
+ try
+ {
+ InputStream is = vfs._createInputStream(session, path, false, InstallPanel.this);
+ XMLUtilities.parseXML(is, new StringMapHandler());
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.WARNING, this, "Loading Pluginset failed:" + e.getMessage());
+ return false;
+ }
+ pluginModel.update();
+ return true;
+ } //}}}
+
+ //{{{ updateModel() method
+ public void updateModel()
+ {
+ final Set<String> savedChecked = new HashSet<String>();
+ final Set<String> savedSelection = new HashSet<String>();
+ pluginModel.saveSelection(savedChecked, savedSelection);
+ pluginModel.clear();
+ infoBox.setText(jEdit.getProperty("plugin-manager.list-download"));
+
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ infoBox.setText(null);
+ pluginModel.update();
+ pluginModel.restoreSelection(savedChecked, savedSelection);
+ }
+ });
+ } //}}}
+
+ //{{{ handleMessage() method
+ public void handleMessage(EBMessage message)
+ {
+ if (message.getSource() == PluginManager.getInstance())
+ {
+ chooseButton.path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET, "");
+ if (chooseButton.path.length() > 0)
+ {
+ loadPluginSet(chooseButton.path);
+ pluginModel.restoreSelection(new HashSet<String>(), new HashSet<String>());
+ chooseButton.updateUI();
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ formatSize() method
+ private static String formatSize(int size)
+ {
+ NumberFormat df = NumberFormat.getInstance();
+ df.setMaximumFractionDigits(1);
+ df.setMinimumFractionDigits(0);
+ String sizeText;
+ if (size < 1048576)
+ sizeText = (size >> 10) + "KB";
+ else
+ sizeText = df.format(size/ 1048576.0d) + "MB";
+ return sizeText;
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ PluginTableModel class
+ private class PluginTableModel extends AbstractTableModel
+ {
+ /** This List can contain String or Entry. */
+ private List entries = new ArrayList();
+ private int sortType = EntryCompare.COLUMN_NAME;
+ int sortDirection = 1;
+
+ //{{{ getColumnClass() method
+ @Override
+ public Class getColumnClass(int columnIndex)
+ {
+ switch (columnIndex)
+ {
+ case 0: return Boolean.class;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5: return Object.class;
+ default: throw new Error("Column out of range");
+ }
+ } //}}}
+
+ //{{{ getColumnCount() method
+ public int getColumnCount()
+ {
+ return 6;
+ } //}}}
+
+ //{{{ getColumnName() method
+ @Override
+ public String getColumnName(int column)
+ {
+ switch (column)
+ {
+ case 0: return " ";
+ case 1: return ' '+jEdit.getProperty("install-plugins.info.name");
+ case 2: return ' '+jEdit.getProperty("install-plugins.info.category");
+ case 3: return ' '+jEdit.getProperty("install-plugins.info.version");
+ case 4: return ' '+jEdit.getProperty("install-plugins.info.size");
+ case 5: return ' '+jEdit.getProperty("install-plugins.info.releaseDate");
+ default: throw new Error("Column out of range");
+ }
+ } //}}}
+
+ //{{{ getRowCount() method
+ public int getRowCount()
+ {
+ return entries.size();
+ } //}}}
+
+ //{{{ getValueAt() method
+ public Object getValueAt(int rowIndex,int columnIndex)
+ {
+ Object obj = entries.get(rowIndex);
+ if(obj instanceof String)
+ {
+ if(columnIndex == 1)
+ return obj;
+ else
+ return null;
+ }
+ else
+ {
+ Entry entry = (Entry)obj;
+
+ switch (columnIndex)
+ {
+ case 0:
+ return entry.install;
+ case 1:
+ return entry.name;
+ case 2:
+ return entry.set;
+ case 3:
+ if (updates)
+ return entry.installedVersion + "->" + entry.version;
+ return entry.version;
+ case 4:
+ return formatSize(entry.size);
+ case 5:
+ return entry.date;
+ default:
+ throw new Error("Column out of range");
+ }
+ }
+ } //}}}
+
+ //{{{ isCellEditable() method
+ @Override
+ public boolean isCellEditable(int rowIndex, int columnIndex)
+ {
+ return columnIndex == 0;
+ } //}}}
+
+ //{{{ setSelectAll() method
+ public void setSelectAll(boolean b)
+ {
+ if(isDownloadingList())
+ return;
+
+ int length = getRowCount();
+ for (int i = 0; i < length; i++)
+ {
+ if (b)
+ setValueAt(Boolean.TRUE,i,0);
+ else
+ {
+ Entry entry = (Entry)entries.get(i);
+ entry.parents = new LinkedList<Entry>();
+ entry.install = false;
+ }
+ }
+ fireTableChanged(new TableModelEvent(this));
+ } //}}}
+
+ //{{{ setSortType() method
+ public void setSortType(int type)
+ {
+ sortType = type;
+ sort(type);
+ } //}}}
+
+ //{{{ deselectParents() method
+ private void deselectParents(Entry entry)
+ {
+ Entry[] parents = entry.getParents();
+
+ if (parents.length == 0)
+ return;
+
+ String[] args = { entry.name };
+ int result = GUIUtilities.listConfirm(
+ window,"plugin-manager.dependency",
+ args,parents);
+ if (result != JOptionPane.OK_OPTION)
+ {
+ entry.install = true;
+ return;
+ }
+
+ for(int i = 0; i < parents.length; i++)
+ parents[i].install = false;
+
+ fireTableRowsUpdated(0,getRowCount() - 1);
+ } //}}}
+
+ //{{{ setValueAt() method
+ @Override
+ public void setValueAt(Object aValue, int row, int column)
+ {
+ if (column != 0) return;
+
+ Object obj = entries.get(row);
+ if(obj instanceof String)
+ return;
+
+ Entry entry = (Entry)obj;
+ boolean before = entry.install;
+ entry.install = Boolean.TRUE.equals(aValue);
+ if (before == entry.install) return;
+ if (!entry.install)
+ deselectParents(entry);
+
+ List<PluginList.Dependency> deps = entry.plugin.getCompatibleBranch().deps;
+
+ for (int i = 0; i < deps.size(); i++)
+ {
+ PluginList.Dependency dep = deps.get(i);
+ if (dep.what.equals("plugin"))
+ {
+ for (int j = 0; j < entries.size(); j++)
+ {
+ Entry temp = (Entry)entries.get(j);
+ if (temp.plugin == dep.plugin)
+ {
+ if (entry.install)
+ {
+ temp.parents.add(entry);
+ setValueAt(Boolean.TRUE,j,0);
+ }
+ else
+ temp.parents.remove(entry);
+ }
+ }
+ }
+ }
+
+ fireTableCellUpdated(row,column);
+ } //}}}
+
+ //{{{ sort() method
+ public void sort(int type)
+ {
+ Set<String> savedChecked = new HashSet<String>();
+ Set<String> savedSelection = new HashSet<String>();
+ saveSelection(savedChecked,savedSelection);
+
+ if (sortType != type)
+ {
+ sortDirection = 1;
+ }
+ sortType = type;
+
+ if(isDownloadingList())
+ return;
+
+ Collections.sort(entries,new EntryCompare(type, sortDirection));
+ fireTableChanged(new TableModelEvent(this));
+ restoreSelection(savedChecked,savedSelection);
+ table.getTableHeader().repaint();
+ }
+ //}}}
+
+ //{{{ isDownloadingList() method
+ private boolean isDownloadingList()
+ {
+ return entries.size() == 1 && entries.get(0) instanceof String;
+ } //}}}
+
+ //{{{ clear() method
+ public void clear()
+ {
+ entries = new ArrayList();
+ fireTableChanged(new TableModelEvent(this));
+ } //}}}
+
+ //{{{ update() method
+ public void update()
+ {
+ Set<String> savedChecked = new HashSet<String>();
+ Set<String> savedSelection = new HashSet<String>();
+ saveSelection(savedChecked,savedSelection);
+
+ PluginList pluginList = window.getPluginList();
+
+ if (pluginList == null) return;
+
+ entries = new ArrayList();
+
+ for(int i = 0; i < pluginList.pluginSets.size(); i++)
+ {
+ PluginList.PluginSet set = pluginList.pluginSets.get(i);
+ for(int j = 0; j < set.plugins.size(); j++)
+ {
+ PluginList.Plugin plugin = pluginList.pluginHash.get(set.plugins.get(j));
+ PluginList.Branch branch = plugin.getCompatibleBranch();
+ String installedVersion =
+ plugin.getInstalledVersion();
+ if (updates)
+ {
+ if(branch != null
+ && branch.canSatisfyDependencies()
+ && installedVersion != null
+ && StandardUtilities.compareStrings(branch.version,
+ installedVersion,false) > 0)
+ {
+ entries.add(new Entry(plugin, set.name));
+ }
+ }
+ else
+ {
+ if(installedVersion == null && plugin.canBeInstalled())
+ entries.add(new Entry(plugin,set.name));
+ }
+ }
+ }
+
+ sort(sortType);
+
+ fireTableChanged(new TableModelEvent(this));
+ restoreSelection(savedChecked, savedSelection);
+ } //}}}
+
+ //{{{ saveSelection() method
+ public void saveSelection(Set<String> savedChecked, Set<String> savedSelection)
+ {
+ if (entries.isEmpty())
+ return;
+ for (int i=0, c=getRowCount() ; i<c ; i++)
+ {
+ if ((Boolean)getValueAt(i,0))
+ {
+ savedChecked.add(entries.get(i).toString());
+ }
+ }
+ int[] rows = table.getSelectedRows();
+ for (int i=0 ; i<rows.length ; i++)
+ {
+ savedSelection.add(entries.get(rows[i]).toString());
+ }
+ } //}}}
+
+ //{{{ restoreSelection() method
+ public void restoreSelection(Set<String> savedChecked, Set<String> savedSelection)
+ {
+ for (int i=0, c=getRowCount() ; i<c ; i++)
+ {
+ Object obj = entries.get(i);
+ String name = obj.toString();
+ if (obj instanceof Entry) {
+ name = ((Entry)obj).plugin.jar;
+ }
+ if (pluginSet.contains(name))
+ setValueAt(true, i, 0);
+ else setValueAt(savedChecked.contains(name), i, 0);
+ }
+ if (table == null) return;
+
+ table.setColumnSelectionInterval(0,0);
+ if (!savedSelection.isEmpty())
+ {
+ int i = 0;
+ int rowCount = getRowCount();
+ for ( ; i<rowCount ; i++)
+ {
+ String name = entries.get(i).toString();
+ if (savedSelection.contains(name))
+ {
+ table.setRowSelectionInterval(i,i);
+ break;
+ }
+ }
+ ListSelectionModel lsm = table.getSelectionModel();
+ for ( ; i<rowCount ; i++)
+ {
+ String name = entries.get(i).toString();
+ if (savedSelection.contains(name))
+ {
+ lsm.addSelectionInterval(i,i);
+ }
+ }
+ }
+ else
+ {
+ if (table.getRowCount() != 0)
+ table.setRowSelectionInterval(0,0);
+ JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
+ scrollbar.setValue(scrollbar.getMinimum());
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ Entry class
+ private static class Entry
+ {
+ String name, installedVersion, version, author, date, description, set;
+
+ long timestamp;
+ int size;
+ boolean install;
+ PluginList.Plugin plugin;
+ List<Entry> parents = new LinkedList<Entry>();
+
+ Entry(PluginList.Plugin plugin, String set)
+ {
+ PluginList.Branch branch = plugin.getCompatibleBranch();
+ boolean downloadSource = jEdit.getBooleanProperty("plugin-manager.downloadSource");
+ int size = downloadSource ? branch.downloadSourceSize : branch.downloadSize;
+
+ this.name = plugin.name;
+ this.author = plugin.author;
+ this.installedVersion = plugin.getInstalledVersion();
+ this.version = branch.version;
+ this.size = size;
+ this.date = branch.date;
+ this.description = plugin.description;
+ this.set = set;
+ this.install = false;
+ this.plugin = plugin;
+ SimpleDateFormat format = new SimpleDateFormat("d MMMM yyyy", Locale.ENGLISH);
+ try
+ {
+ timestamp = format.parse(date).getTime();
+ }
+ catch (ParseException e)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ }
+
+ private void getParents(List<Entry> list)
+ {
+ for (Entry entry : parents)
+ {
+ if (entry.install && !list.contains(entry))
+ {
+ list.add(entry);
+ entry.getParents(list);
+ }
+ }
+ }
+
+ Entry[] getParents()
+ {
+ List<Entry> list = new ArrayList<Entry>();
+ getParents(list);
+ Entry[] array = list.toArray(new Entry[list.size()]);
+ Arrays.sort(array,new StandardUtilities.StringCompare<Entry>(true));
+ return array;
+ }
+
+ @Override
+ public String toString()
+ {
+ return name;
+ }
+ } //}}}
+
+ //{{{ PluginInfoBox class
+ /**
+ * @TODO refactor to use the PluginDetailPanel?
+ */
+ private class PluginInfoBox extends JTextPane implements ListSelectionListener
+ {
+ private final String[] params;
+ PluginInfoBox()
+ {
+ setBackground(jEdit.getColorProperty("view.bgColor"));
+ setForeground(jEdit.getColorProperty("view.fgColor"));
+ putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true);
+ setEditable(false);
+ setEditorKit(new HTMLEditorKit());
+// setLineWrap(true);
+// setWrapStyleWord(true);
+ params = new String[3];
+ table.getSelectionModel().addListSelectionListener(this);
+ }
+
+
+ public void valueChanged(ListSelectionEvent e)
+ {
+ String text = "";
+ if (table.getSelectedRowCount() == 1)
+ {
+ Entry entry = (Entry) pluginModel.entries
+ .get(table.getSelectedRow());
+ params[0] = entry.author;
+ params[1] = entry.date;
+ params[2] = entry.description;
+ text = jEdit.getProperty("install-plugins.info", params);
+ text = text.replace("\n", "<br>");
+ text = "<html>" + text + "</html>";
+ }
+ setText(text);
+ setCaretPosition(0);
+ }
+ } //}}}
+
+ //{{{ SizeLabel class
+ private class SizeLabel extends JLabel implements TableModelListener
+ {
+ private int size;
+
+ SizeLabel()
+ {
+ size = 0;
+ setText(jEdit.getProperty("install-plugins.totalSize")+formatSize(size));
+ pluginModel.addTableModelListener(this);
+ }
+
+ public void tableChanged(TableModelEvent e)
+ {
+ if (e.getType() == TableModelEvent.UPDATE)
+ {
+ if(pluginModel.isDownloadingList())
+ return;
+
+ size = 0;
+ int length = pluginModel.getRowCount();
+ for (int i = 0; i < length; i++)
+ {
+ Entry entry = (Entry)pluginModel
+ .entries.get(i);
+ if (entry.install)
+ size += entry.size;
+ }
+ setText(jEdit.getProperty("install-plugins.totalSize")+formatSize(size));
+ }
+ }
+ } //}}}
+
+ //{{{ SelectallButton class
+ private class SelectallButton extends JCheckBox implements ActionListener, TableModelListener
+ {
+ SelectallButton()
+ {
+ super(jEdit.getProperty("install-plugins.select-all"));
+ addActionListener(this);
+ pluginModel.addTableModelListener(this);
+ setEnabled(false);
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ pluginModel.setSelectAll(isSelected());
+ }
+
+ public void tableChanged(TableModelEvent e)
+ {
+ if(pluginModel.isDownloadingList())
+ return;
+
+ setEnabled(pluginModel.getRowCount() != 0);
+ if (e.getType() == TableModelEvent.UPDATE)
+ {
+ int length = pluginModel.getRowCount();
+ for (int i = 0; i < length; i++)
+ if (!((Boolean)pluginModel.getValueAt(i,0)).booleanValue())
+ {
+ setSelected(false);
+ return;
+ }
+ if (length > 0)
+ setSelected(true);
+ }
+ }
+ } //}}}
+
+ //{{{ StringMapHandler class
+ /** For parsing the pluginset xml files into pluginSet */
+ private class StringMapHandler extends DefaultHandler
+ {
+ StringMapHandler()
+ {
+ pluginSet.clear();
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException
+ {
+ if (localName.equals("plugin"))
+ {
+ pluginSet.add(attrs.getValue("jar"));
+ }
+ }
+ } //}}}
+
+ //{{{ ChoosePluginSet class
+ private class ChoosePluginSet extends RolloverButton implements ActionListener
+ {
+ private String path;
+
+ //{{{ ChoosePluginSet constructor
+ ChoosePluginSet()
+ {
+ setIcon(GUIUtilities.loadIcon(jEdit.getProperty("install-plugins.choose-plugin-set.icon")));
+ addActionListener(this);
+ updateUI();
+ } //}}}
+
+ //{{{ updateUI method
+ @Override
+ public void updateUI()
+ {
+ path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET, "");
+ if (path.length()<1) setToolTipText ("Click here to choose a predefined plugin set");
+ else setToolTipText ("Choose pluginset (" + path + ')');
+ super.updateUI();
+ }//}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent ae)
+ {
+
+ path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET,
+ jEdit.getSettingsDirectory() + File.separator);
+ String[] selectedFiles = GUIUtilities.showVFSFileDialog(InstallPanel.this.window,
+ jEdit.getActiveView(), path, VFSBrowser.OPEN_DIALOG, false);
+ if (selectedFiles == null || selectedFiles.length != 1) return;
+
+ path = selectedFiles[0];
+ boolean success = loadPluginSet(path);
+ if (success)
+ {
+ jEdit.setProperty(PluginManager.PROPERTY_PLUGINSET, path);
+ }
+ updateUI();
+ } //}}}
+ }//}}}
+
+ //{{{ ClearPluginSet class
+ private class ClearPluginSet extends RolloverButton implements ActionListener
+ {
+ //{{{ ClearPluginSet constructor
+ ClearPluginSet()
+ {
+ setIcon(GUIUtilities.loadIcon(jEdit.getProperty("install-plugins.clear-plugin-set.icon")));
+ setToolTipText("clear plugin set");
+ addActionListener(this);
+ } //}}}
+
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent e)
+ {
+ pluginSet.clear();
+ pluginModel.restoreSelection(new HashSet<String>(), new HashSet<String>());
+ jEdit.unsetProperty(PluginManager.PROPERTY_PLUGINSET);
+ chooseButton.updateUI();
+ } //}}}
+ } //}}}
+
+ //{{{ InstallButton class
+ private class InstallButton extends JButton implements ActionListener, TableModelListener
+ {
+ InstallButton()
+ {
+ super(jEdit.getProperty("install-plugins.install"));
+ pluginModel.addTableModelListener(this);
+ addActionListener(this);
+ setEnabled(false);
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(pluginModel.isDownloadingList())
+ return;
+
+ boolean downloadSource = jEdit.getBooleanProperty(
+ "plugin-manager.downloadSource");
+ boolean installUser = jEdit.getBooleanProperty(
+ "plugin-manager.installUser");
+ Roster roster = new Roster();
+ String installDirectory;
+ if(installUser)
+ {
+ installDirectory = MiscUtilities.constructPath(
+ jEdit.getSettingsDirectory(),"jars");
+ }
+ else
+ {
+ installDirectory = MiscUtilities.constructPath(
+ jEdit.getJEditHome(),"jars");
+ }
+
+ int length = pluginModel.getRowCount();
+ int instcount = 0;
+ for (int i = 0; i < length; i++)
+ {
+ Entry entry = (Entry)pluginModel.entries.get(i);
+ if (entry.install)
+ {
+ entry.plugin.install(roster,installDirectory,downloadSource);
+ if (updates)
+ entry.plugin.getCompatibleBranch().satisfyDependencies(
+ roster,installDirectory,downloadSource);
+ instcount++;
+ }
+ }
+
+ if(roster.isEmpty())
+ return;
+
+ boolean cancel = false;
+ if (updates && roster.getOperationCount() > instcount)
+ if (GUIUtilities.confirm(window,
+ "install-plugins.depend",
+ null,
+ JOptionPane.OK_CANCEL_OPTION,
+ JOptionPane.WARNING_MESSAGE) == JOptionPane.CANCEL_OPTION)
+ cancel = true;
+
+ if (!cancel)
+ {
+ new PluginManagerProgress(window,roster);
+
+ roster.performOperationsInAWTThread(window);
+ pluginModel.update();
+ }
+ }
+
+ public void tableChanged(TableModelEvent e)
+ {
+ if(pluginModel.isDownloadingList())
+ return;
+
+ if (e.getType() == TableModelEvent.UPDATE)
+ {
+ int length = pluginModel.getRowCount();
+ for (int i = 0; i < length; i++)
+ if (((Boolean)pluginModel.getValueAt(i,0)).booleanValue())
+ {
+ setEnabled(true);
+ return;
+ }
+ setEnabled(false);
+ }
+ }
+ } //}}}
+
+ //{{{ EntryCompare class
+ private static class EntryCompare implements Comparator<Entry>
+ {
+ private static final int COLUMN_INSTALL = 0;
+ private static final int COLUMN_NAME = 1;
+ private static final int COLUMN_CATEGORY = 2;
+ private static final int COLUMN_VERSION = 3;
+ private static final int COLUMN_SIZE = 4;
+ private static final int COLUMN_RELEASE = 5;
+
+ private int type;
+
+ /** 1=up, -1=down */
+ private int sortDirection;
+
+ EntryCompare(int type, int sortDirection)
+ {
+ this.type = type;
+ this.sortDirection = sortDirection;
+ }
+
+ public int compare(Entry e1, Entry e2)
+ {
+ int result;
+
+ switch (type)
+ {
+ case COLUMN_INSTALL:
+ result = (e1.install == e2.install) ? 0 : (e1.install ? 1 : -1);
+ break;
+ case COLUMN_NAME:
+ result = e1.name.compareToIgnoreCase(e2.name);
+ break;
+ case COLUMN_CATEGORY:
+ result = e1.set.compareToIgnoreCase(e2.set);
+ if (result == 0)
+ {
+ result = e1.name.compareToIgnoreCase(e2.name);
+ }
+ break;
+ case COLUMN_VERSION:
+ // lets avoid NPE. Maybe we should move
+ // this code to StandardUtilities.compareStrings
+ if (e1.version == e2.version)
+ {
+ result = 0;
+ }
+ else if (e1.version == null)
+ {
+ result = -1;
+ }
+ else if(e2.version == null)
+ {
+ result = 1;
+ }
+ else
+ {
+ result = StandardUtilities.compareStrings(e1.version,
+ e2.version,
+ true);
+ }
+ break;
+ case COLUMN_SIZE:
+ result = (e1.size < e2.size)
+ ? -1
+ : ((e1.size == e2.size)
+ ? 0
+ : 1);
+ break;
+ case COLUMN_RELEASE:
+ result = (e1.timestamp < e2.timestamp)
+ ? -1
+ : ((e1.timestamp == e2.timestamp)
+ ? 0
+ : 1);
+ break;
+ default:
+ result = 0;
+ }
+ return result * sortDirection;
+ }
+ } //}}}
+
+ //{{{ HeaderMouseHandler class
+ private class HeaderMouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ int column = table.getTableHeader().columnAtPoint(evt.getPoint());
+ pluginModel.sortDirection *= -1;
+ pluginModel.sort(column);
+ }
+ } //}}}
+
+ //{{{ TextRenderer
+ private static class TextRenderer extends DefaultTableCellRenderer
+ {
+ private DefaultTableCellRenderer tcr;
+
+ TextRenderer(DefaultTableCellRenderer tcr)
+ {
+ this.tcr = tcr;
+ }
+
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object value,
+ boolean isSelected, boolean hasFocus, int row, int column)
+ {
+ if (column == 5)
+ tcr.setHorizontalAlignment(TRAILING);
+ else
+ tcr.setHorizontalAlignment(LEADING);
+ return tcr.getTableCellRendererComponent(table,value,isSelected,false,row,column);
+ }
+ } //}}}
+
+ //{{{ KeyboardAction class
+ private class KeyboardAction extends AbstractAction
+ {
+ private KeyboardCommand command = KeyboardCommand.NONE;
+
+ KeyboardAction(KeyboardCommand command)
+ {
+ this.command = command;
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ switch (command)
+ {
+ case TAB_OUT_FORWARD:
+ KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();
+ break;
+ case TAB_OUT_BACK:
+ KeyboardFocusManager.getCurrentKeyboardFocusManager().focusPreviousComponent();
+ break;
+ case EDIT_PLUGIN:
+ int[] rows = table.getSelectedRows();
+ Object[] state = new Object[rows.length];
+ for (int i=0 ; i<rows.length ; i++)
+ {
+ state[i] = pluginModel.getValueAt(rows[i],0);
+ }
+ for (int i=0 ; i<rows.length ; i++)
+ {
+ pluginModel.setValueAt(state[i].equals(Boolean.FALSE),rows[i],0);
+ }
+ break;
+ case CLOSE_PLUGIN_MANAGER:
+ window.ok();
+ break;
+ default:
+ throw new InternalError();
+ }
+ }
+ } //}}}
+
+ //{{{ TableFocusHandler class
+ private class TableFocusHandler extends FocusAdapter
+ {
+ @Override
+ public void focusGained(FocusEvent fe)
+ {
+ if (-1 == table.getSelectedRow() && table.getRowCount() > 0)
+ {
+ table.setRowSelectionInterval(0,0);
+ JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
+ scrollbar.setValue(scrollbar.getMinimum());
+ }
+ if (-1 == table.getSelectedColumn())
+ {
+ table.setColumnSelectionInterval(0,0);
+ }
+ }
+ } //}}}
+
+ //{{{ HeaderRenderer
+ private static class HeaderRenderer extends DefaultTableCellRenderer
+ {
+ private DefaultTableCellRenderer tcr;
+
+ HeaderRenderer(DefaultTableCellRenderer tcr)
+ {
+ this.tcr = tcr;
+ }
+
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object value,
+ boolean isSelected, boolean hasFocus,
+ int row, int column)
+ {
+ JLabel l = (JLabel)tcr.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
+ PluginTableModel model = (PluginTableModel) table.getModel();
+ Icon icon = (column == model.sortType)
+ ? (model.sortDirection == 1) ? ASC_ICON : DESC_ICON
+ : null;
+ l.setIcon(icon);
+ // l.setHorizontalTextPosition(l.LEADING);
+ return l;
+ }
+ } //}}}
+
+ //}}}
+
+ static final Icon ASC_ICON = GUIUtilities.loadIcon("arrow-asc.png");
+ static final Icon DESC_ICON = GUIUtilities.loadIcon("arrow-desc.png");
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/KeyboardCommand.java b/jEdit/org/gjt/sp/jedit/pluginmgr/KeyboardCommand.java
new file mode 100644
index 0000000..2417c5d
--- /dev/null
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/KeyboardCommand.java
@@ -0,0 +1,31 @@
+/*
+ * jEdit - Programmer's Text Editor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright © 2010 jEdit contributors
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+enum KeyboardCommand
+{
+ NONE,
+ TAB_OUT_FORWARD,
+ TAB_OUT_BACK,
+ EDIT_PLUGIN,
+ CLOSE_PLUGIN_MANAGER
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/ManagePanel.java b/jEdit/org/gjt/sp/jedit/pluginmgr/ManagePanel.java
index 4165388..d58d405 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/ManagePanel.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/ManagePanel.java
@@ -1,1345 +1,1333 @@
-/*
- * ManagePanel.java - Manages plugins
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Kris Kopicki
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-//{{{ Imports
-import java.awt.*;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.FocusAdapter;
-import java.awt.event.FocusEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-
-import java.net.URL;
-
-import java.util.*;
-import java.util.List;
-
-import javax.swing.*;
-
-import javax.swing.border.EmptyBorder;
-
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import javax.swing.event.TableModelEvent;
-
-import javax.swing.table.AbstractTableModel;
-import javax.swing.table.DefaultTableCellRenderer;
-import javax.swing.table.JTableHeader;
-import javax.swing.table.TableColumn;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.io.FileVFS;
-import org.gjt.sp.jedit.io.VFS;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.io.*;
-
-import org.gjt.sp.jedit.browser.VFSBrowser;
-import org.gjt.sp.jedit.browser.VFSFileChooserDialog;
-import org.gjt.sp.jedit.gui.RolloverButton;
-import org.gjt.sp.jedit.help.*;
-
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.IOUtilities;
-import org.gjt.sp.util.XMLUtilities;
-import org.gjt.sp.util.StandardUtilities;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-//}}}
-
-/**
- * The ManagePanel is the JPanel that shows the installed plugins.
- */
-public class ManagePanel extends JPanel
-{
- //{{{ Private members
- private final JCheckBox hideLibraries;
- private final JTable table;
- private final JScrollPane scrollpane;
- private final PluginDetailPanel pluginDetailPanel;
- private final PluginTableModel pluginModel;
- private final PluginManager window;
- private JPopupMenu popup;
- private Set<String> selectedPlugins;
- private Set<String> jarNames;
- //}}}
-
- //{{{ ManagePanel constructor
- public ManagePanel(PluginManager window)
- {
- super(new BorderLayout(12,12));
-
- this.window = window;
-
- setBorder(new EmptyBorder(12,12,12,12));
-
- Box topBox = new Box(BoxLayout.X_AXIS);
- topBox.add(hideLibraries = new HideLibrariesButton());
- add(BorderLayout.NORTH,topBox);
-
- /* Create the plugin table */
- table = new JTable(pluginModel = new PluginTableModel());
- table.setShowGrid(false);
- table.setIntercellSpacing(new Dimension(0,0));
- table.setRowHeight(table.getRowHeight() + 2);
- table.setPreferredScrollableViewportSize(new Dimension(500,300));
- table.setDefaultRenderer(Object.class, new TextRenderer(
- (DefaultTableCellRenderer)table.getDefaultRenderer(Object.class)));
- table.addFocusListener(new TableFocusHandler());
- table.getSelectionModel().addListSelectionListener(new TableSelectionListener());
- InputMap tableInputMap = table.getInputMap(JComponent.WHEN_FOCUSED);
- ActionMap tableActionMap = table.getActionMap();
- tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,0),"tabOutForward");
- tableActionMap.put("tabOutForward",new KeyboardAction(KeyboardCommand.TAB_OUT_FORWARD));
- tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,InputEvent.SHIFT_MASK),"tabOutBack");
- tableActionMap.put("tabOutBack",new KeyboardAction(KeyboardCommand.TAB_OUT_BACK));
- tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE,0),"editPlugin");
- tableActionMap.put("editPlugin",new KeyboardAction(KeyboardCommand.EDIT_PLUGIN));
- tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"closePluginManager");
- tableActionMap.put("closePluginManager",new KeyboardAction(KeyboardCommand.CLOSE_PLUGIN_MANAGER));
-
- TableColumn col1 = table.getColumnModel().getColumn(0);
- TableColumn col2 = table.getColumnModel().getColumn(1);
- TableColumn col3 = table.getColumnModel().getColumn(2);
- TableColumn col4 = table.getColumnModel().getColumn(3);
-
- col1.setPreferredWidth(30);
- col1.setMinWidth(30);
- col1.setMaxWidth(30);
- col1.setResizable(false);
-
- col2.setPreferredWidth(300);
- col3.setPreferredWidth(100);
- col4.setPreferredWidth(100);
-
- JTableHeader header = table.getTableHeader();
- header.setReorderingAllowed(false);
- HeaderMouseHandler mouseHandler = new HeaderMouseHandler();
- header.addMouseListener(mouseHandler);
- table.addMouseListener(mouseHandler);
- scrollpane = new JScrollPane(table);
- scrollpane.getViewport().setBackground(table.getBackground());
- pluginDetailPanel = new PluginDetailPanel();
- scrollpane.setPreferredSize(new Dimension(400,400));
- JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
- true, scrollpane, pluginDetailPanel);
- add(BorderLayout.CENTER, split);
- split.setResizeWeight(0.75);
- /* Create button panel */
- Box buttons = new Box(BoxLayout.X_AXIS);
-
- buttons.add(new RemoveButton());
- buttons.add(new SaveButton());
- buttons.add(new RestoreButton());
- buttons.add(new FindOrphan());
- buttons.add(Box.createGlue());
- buttons.add(new HelpButton());
-
- add(BorderLayout.SOUTH,buttons);
-
- pluginModel.update();
- } //}}}
-
- //{{{ update() method
- public void update()
- {
- pluginModel.update();
- } //}}}
-
- // {{{ class ManagePanelRestoreHandler
- /**
- * For handling the XML parse events of a plugin set.
- * Selects the same plugins that are in that set.
- * @since jEdit 4.3pre10
- */
- private class ManagePanelRestoreHandler extends DefaultHandler
- {
- ManagePanelRestoreHandler()
- {
- selectedPlugins = new HashSet<String>();
- jarNames = new HashSet<String>();
- }
-
-
-
- @Override
- public void startElement(String uri, String localName,
- String qName, Attributes attrs) throws SAXException
- {
- if (localName.equals("plugin"))
- {
- String jarName = attrs.getValue("jar");
- String name = attrs.getValue("name");
- Entry e = new Entry(jarName);
- e.name=name;
- selectedPlugins.add(name);
- jarNames.add(jarName);
- }
- }
- }//}}}
-
- //{{{ loadPluginSet() method
- boolean loadPluginSet(String path)
- {
- VFS vfs = VFSManager.getVFSForPath(path);
- Object session = vfs.createVFSSession(path, this);
- try
- {
- InputStream is = vfs._createInputStream(session, path, false, this);
- XMLUtilities.parseXML(is, new ManagePanelRestoreHandler());
- is.close();
- int rowCount = pluginModel.getRowCount();
- for (int i=0 ; i<rowCount ; i++)
- {
- Entry ent = pluginModel.getEntry(i);
- String name = ent.name;
- if (name != null)
- {
- pluginModel.setValueAt(selectedPlugins.contains(name), i, 0);
- }
- else
- {
- String jarPath = ent.jar;
- String jarName = jarPath.substring(1 + jarPath.lastIndexOf(File.separatorChar));
- try
- {
- pluginModel.setValueAt(jarNames.contains(jarName), i, 0);
- }
- catch (Exception e)
- {
- Log.log(Log.WARNING, this, "Exception thrown loading: " + jarName);
- }
- }
- }
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, this, "Loading Pluginset Error", e);
- return false;
- }
- pluginModel.update();
- return true;
- }//}}}
-
- //{{{ getDeclaredJars() method
- /**
- * Returns a collection of declared jars in the plugin.
- * If the plugin is loaded use {@link org.gjt.sp.jedit.PluginJAR#getRequiredJars()}
- * instead
- *
- * @param jarName the jar name of the plugin
- * @return a collection containing jars path
- * @throws IOException if jEdit cannot generate cache
- * @since jEdit 4.3pre12
- */
- private static Collection<String> getDeclaredJars(String jarName) throws IOException
- {
- Collection<String> jarList = new ArrayList<String>();
- PluginJAR pluginJAR = new PluginJAR(new File(jarName));
- PluginJAR.PluginCacheEntry pluginCacheEntry = PluginJAR.getPluginCache(pluginJAR);
- if (pluginCacheEntry == null)
- {
- pluginCacheEntry = pluginJAR.generateCache();
- }
- Properties cachedProperties = pluginCacheEntry.cachedProperties;
-
- String jars = cachedProperties.getProperty("plugin." + pluginCacheEntry.pluginClass + ".jars");
-
- if (jars != null)
- {
- String dir = MiscUtilities.getParentOfPath(pluginJAR.getPath());
- StringTokenizer st = new StringTokenizer(jars);
- while (st.hasMoreTokens())
- {
- String _jarPath = MiscUtilities.constructPath(dir, st.nextToken());
- if (new File(_jarPath).exists())
- jarList.add(_jarPath);
- }
- }
- jarList.add(jarName);
- return jarList;
- }//}}}
-
- //{{{ Inner classes
-
- //{{{ KeyboardCommand enum
- private enum KeyboardCommand
- {
- NONE,
- TAB_OUT_FORWARD,
- TAB_OUT_BACK,
- EDIT_PLUGIN,
- CLOSE_PLUGIN_MANAGER
- } //}}}
-
- //{{{ Entry class
- static class Entry
- {
- static final String ERROR = "error";
- static final String LOADED = "loaded";
- static final String NOT_LOADED = "not-loaded";
-
- final String status;
- /** The jar path. */
- final String jar;
-
- String clazz, name, version, author, docs;
- /** The description property of the plugin. */
- String description;
- EditPlugin plugin;
- /**
- * The jars referenced in the props file of the plugin.
- * plugin.clazz.jars property and
- * plugin.clazz.files property
- */
- final List<String> jars;
-
- /** The data size. */
- String dataSize;
-
- /**
- * Constructor used for jars that aren't loaded.
- *
- * @param jar jar file name
- */
- Entry(String jar)
- {
- jars = new LinkedList<String>();
- this.jar = jar;
- jars.add(this.jar);
- status = NOT_LOADED;
- }
-
- /**
- * Constructor used for loaded jars.
- *
- * @param jar the pluginJar
- */
- Entry(PluginJAR jar)
- {
- jars = new LinkedList<String>();
- this.jar = jar.getPath();
- jars.add(this.jar);
-
- plugin = jar.getPlugin();
- if(plugin != null)
- {
- status = plugin instanceof EditPlugin.Broken
- ? ERROR : LOADED;
- clazz = plugin.getClassName();
- name = jEdit.getProperty("plugin."+clazz+".name");
- version = jEdit.getProperty("plugin."+clazz+".version");
- author = jEdit.getProperty("plugin."+clazz+".author");
- docs = jEdit.getProperty("plugin."+clazz+".docs");
- description = jEdit.getProperty("plugin."+clazz+".description");
- String jarsProp = jEdit.getProperty("plugin."+clazz+".jars");
-
- if(jarsProp != null)
- {
- String directory = MiscUtilities.getParentOfPath(this.jar);
-
- StringTokenizer st = new StringTokenizer(jarsProp);
- while(st.hasMoreElements())
- {
- jars.add(MiscUtilities.constructPath(
- directory,st.nextToken()));
- }
- }
-
- String filesProp = jEdit.getProperty("plugin."+clazz+".files");
-
- if(filesProp != null)
- {
- String directory = MiscUtilities.getParentOfPath(this.jar);
-
- StringTokenizer st = new StringTokenizer(filesProp);
- while(st.hasMoreElements())
- {
- jars.add(MiscUtilities.constructPath(
- directory,st.nextToken()));
- }
- }
- }
- else
- {
- status = LOADED;
- }
- }
- } //}}}
-
- //{{{ PluginTableModel class
- private class PluginTableModel extends AbstractTableModel
- {
- private final List<Entry> entries;
- private int sortType = EntryCompare.NAME;
- private ConcurrentHashMap<String, Object> unloaded;
- // private HashSet<String> unloaded;
-
- //{{{ Constructor
- PluginTableModel()
- {
- entries = new ArrayList<Entry>();
- } //}}}
-
- //{{{ getColumnCount() method
- public int getColumnCount()
- {
- return 5;
- } //}}}
-
- //{{{ getColumnClass() method
- @Override
- public Class getColumnClass(int columnIndex)
- {
- switch (columnIndex)
- {
- case 0: return Boolean.class;
- default: return Object.class;
- }
- } //}}}
-
- //{{{ getColumnName() method
- @Override
- public String getColumnName(int column)
- {
- switch (column)
- {
- case 0:
- return " ";
- case 1:
- return jEdit.getProperty("manage-plugins.info.name");
- case 2:
- return jEdit.getProperty("manage-plugins.info.version");
- case 3:
- return jEdit.getProperty("manage-plugins.info.status");
- case 4:
- return jEdit.getProperty("manage-plugins.info.data");
- default:
- throw new Error("Column out of range");
- }
- } //}}}
-
- //{{{ getEntry() method
- public Entry getEntry(int rowIndex)
- {
- return entries.get(rowIndex);
- } //}}}
-
- //{{{ getRowCount() method
- public int getRowCount()
- {
- return entries.size();
- } //}}}
-
- //{{{ getValueAt() method
- public Object getValueAt(int rowIndex,int columnIndex)
- {
- Entry entry = entries.get(rowIndex);
- switch (columnIndex)
- {
- case 0:
- return Boolean.valueOf(!entry.status.equals(Entry.NOT_LOADED));
- case 1:
- if(entry.name == null)
- {
- return MiscUtilities.getFileName(entry.jar);
- }
- else
- {
- return entry.name;
- }
- case 2:
- return entry.version;
- case 3:
- return jEdit.getProperty("plugin-manager.status." + entry.status);
- case 4:
- if (entry.dataSize == null && entry.plugin != null)
- {
- File pluginDirectory = entry.plugin.getPluginHome();
- if (null == pluginDirectory)
- {
- return null;
- }
- if (pluginDirectory.exists())
- {
- entry.dataSize = MiscUtilities.formatFileSize(IOUtilities.fileLength(pluginDirectory));
- }
- else
- {
- if (jEdit.getBooleanProperty("plugin." + entry.clazz + ".usePluginHome"))
- {
- entry.dataSize = MiscUtilities.formatFileSize(0);
- }
- else
- {
- entry.dataSize = jEdit.getProperty("manage-plugins.data-size.unknown");
- }
-
- }
- }
- return entry.dataSize;
- default:
- throw new Error("Column out of range");
- }
- } //}}}
-
- //{{{ isCellEditable() method
- @Override
- public boolean isCellEditable(int rowIndex, int columnIndex)
- {
- return columnIndex == 0;
- } //}}}
-
- //{{{ setValueAt() method
- @Override
- public void setValueAt(Object value, int rowIndex,
- int columnIndex)
- {
- Entry entry = entries.get(rowIndex);
- if(columnIndex == 0)
- {
- PluginJAR jar = jEdit.getPluginJAR(entry.jar);
- if(jar == null)
- {
- if(value.equals(Boolean.FALSE))
- return;
-
- PluginJAR.load(entry.jar, true);
- }
- else
- {
- if(value.equals(Boolean.TRUE))
- return;
-
- unloadPluginJARWithDialog(jar);
- }
- }
-
- update();
- } //}}}
-
- //{{{ setSortType() method
- public void setSortType(int type)
- {
- sortType = type;
- sort(type);
- } //}}}
-
- //{{{ sort() method
- public void sort(int type)
- {
- List<String> savedSelection = new ArrayList<String>();
- saveSelection(savedSelection);
- Collections.sort(entries,new EntryCompare(type));
- fireTableChanged(new TableModelEvent(this));
- restoreSelection(savedSelection);
- }
- //}}}
-
- //{{{ update() method
- public void update()
- {
- List<String> savedSelection = new ArrayList<String>();
- saveSelection(savedSelection);
- entries.clear();
-
- String systemJarDir = MiscUtilities.constructPath(
- jEdit.getJEditHome(),"jars");
- String userJarDir;
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory == null)
- userJarDir = null;
- else
- {
- userJarDir = MiscUtilities.constructPath(
- settingsDirectory,"jars");
- }
-
- PluginJAR[] plugins = jEdit.getPluginJARs();
- for(int i = 0; i < plugins.length; i++)
- {
- String path = plugins[i].getPath();
- if(path.startsWith(systemJarDir)
- || (userJarDir != null
- && path.startsWith(userJarDir)))
- {
- Entry e = new Entry(plugins[i]);
- if(!hideLibraries.isSelected()
- || e.clazz != null)
- {
- entries.add(e);
- }
- }
- }
-
- String[] newPlugins = jEdit.getNotLoadedPluginJARs();
- for(int i = 0; i < newPlugins.length; i++)
- {
- Entry e = new Entry(newPlugins[i]);
- entries.add(e);
- }
-
- sort(sortType);
- restoreSelection(savedSelection);
- } //}}}
-
- //{{{ unloadPluginJARWithDialog() method
- // Perhaps this should also be moved to PluginJAR class?
- private void unloadPluginJARWithDialog(PluginJAR jar)
- {
- // unloaded = new HashSet<String>();
- unloaded = new ConcurrentHashMap<String, Object>();
- String[] dependents = jar.getDependentPlugins();
- if(dependents.length == 0)
- unloadPluginJAR(jar);
- else
- {
- List<String> closureSet = new LinkedList<String>();
- PluginJAR.transitiveClosure(dependents, closureSet);
- List<String> listModel = new ArrayList<String>();
- listModel.addAll(closureSet);
- Collections.sort(listModel, new StandardUtilities.StringCompare<String>(true));
-
- int button = GUIUtilities.listConfirm(window,"plugin-manager.dependency",
- new String[] { jar.getFile().getName() }, listModel.toArray());
- if(button == JOptionPane.YES_OPTION)
- unloadPluginJAR(jar);
- }
- } //}}}
-
- //{{{ unloadPluginJAR() method
- private void unloadPluginJAR(PluginJAR jar)
- {
- String[] dependents = jar.getDependentPlugins();
- for (String dependent : dependents)
- {
- if (!unloaded.containsKey(dependent))
- {
- unloaded.put(dependent, Boolean.TRUE);
- PluginJAR _jar = jEdit.getPluginJAR(dependent);
- if(_jar != null)
- unloadPluginJAR(_jar);
- }
- }
- jEdit.removePluginJAR(jar,false);
- jEdit.setBooleanProperty("plugin-blacklist."+MiscUtilities.getFileName(jar.getPath()),true);
- } //}}}
-
- //{{{ saveSelection() method
- /**
- * Save the selection in the given list.
- * The list will be filled with the jar names of the selected entries
- *
- * @param savedSelection the list where to save the selection
- */
- public void saveSelection(List<String> savedSelection)
- {
- if (table != null)
- {
- int[] rows = table.getSelectedRows();
- for (int i=0 ; i<rows.length ; i++)
- {
- savedSelection.add(entries.get(rows[i]).jar);
- }
- }
- } //}}}
-
- //{{{ restoreSelection() method
- /**
- * Restore the selection.
- *
- * @param savedSelection the selection list that contains the jar names of the selected items
- */
- public void restoreSelection(List<String> savedSelection)
- {
- if (null != table)
- {
- table.setColumnSelectionInterval(0,0);
- if (!savedSelection.isEmpty())
- {
- int i = 0;
- int rowCount = getRowCount();
- for ( ; i<rowCount ; i++)
- {
- if (savedSelection.contains(entries.get(i).jar))
- {
- table.setRowSelectionInterval(i,i);
- break;
- }
- }
- ListSelectionModel lsm = table.getSelectionModel();
- for ( ; i<rowCount ; i++)
- {
- if (savedSelection.contains(entries.get(i).jar))
- {
- lsm.addSelectionInterval(i,i);
- }
- }
- }
- else
- {
- if (table.getRowCount() != 0)
- table.setRowSelectionInterval(0,0);
- JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
- scrollbar.setValue(scrollbar.getMinimum());
- }
- }
- } //}}}
- } //}}}
-
- //{{{ TextRenderer class
- private class TextRenderer extends DefaultTableCellRenderer
- {
- private final DefaultTableCellRenderer tcr;
-
- TextRenderer(DefaultTableCellRenderer tcr)
- {
- this.tcr = tcr;
- }
-
- @Override
- public Component getTableCellRendererComponent(JTable table, Object value,
- boolean isSelected, boolean hasFocus, int row, int column)
- {
- Entry entry = pluginModel.getEntry(row);
- if (entry.status.equals(Entry.ERROR))
- tcr.setForeground(Color.red);
- else
- tcr.setForeground(UIManager.getColor("Table.foreground"));
- return tcr.getTableCellRendererComponent(table,value,isSelected,false,row,column);
- }
- } //}}}
-
- //{{{ HideLibrariesButton class
- private class HideLibrariesButton extends JCheckBox implements ActionListener
- {
- HideLibrariesButton()
- {
- super(jEdit.getProperty("plugin-manager.hide-libraries"));
- setSelected(jEdit.getBooleanProperty(
- "plugin-manager.hide-libraries.toggle"));
- addActionListener(this);
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- jEdit.setBooleanProperty(
- "plugin-manager.hide-libraries.toggle",
- isSelected());
- ManagePanel.this.update();
- }
- } //}}}
-
- //{{{ RestoreButton class
- /**
- * Permits the user to restore the state of the ManagePanel
- * based on a PluginSet.
- *
- * Selects all loaded plugins that appear in an .XML file, and deselects
- * all others, and also sets the pluginset to that .XML file. Does not install any plugins
- * that were not previously installed.
- *
- * @since jEdit 4.3pre10
- * @author Alan Ezust
- */
- private class RestoreButton extends RolloverButton implements ActionListener
- {
- RestoreButton()
- {
- setIcon(GUIUtilities.loadIcon(jEdit.getProperty("manage-plugins.restore.icon")));
- addActionListener(this);
- setToolTipText("Choose a PluginSet, select/deselect plugins based on set.");
- }
-
- public void actionPerformed(ActionEvent e)
- {
- String path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET,
- jEdit.getSettingsDirectory() + File.separator);
- String[] selectedFiles = GUIUtilities.showVFSFileDialog(ManagePanel.this.window,
- jEdit.getActiveView(), path, VFSBrowser.OPEN_DIALOG, false);
- if (selectedFiles == null || selectedFiles.length != 1) return;
- path = selectedFiles[0];
- boolean success = loadPluginSet(path);
- if (success)
- {
- jEdit.setProperty(PluginManager.PROPERTY_PLUGINSET, path);
- EditBus.send(new PropertiesChanged(PluginManager.getInstance()));
- }
-
- }
- }//}}}
-
- //{{{ SaveButton class
- /**
- * Permits the user to save the state of the ManagePanel,
- * which in this case, is nothing more than a list of
- * all plugins currently loaded.
- * @since jEdit 4.3pre10
- * @author Alan Ezust
- */
- private class SaveButton extends RolloverButton implements ActionListener
- {
- SaveButton()
- {
- setIcon(GUIUtilities.loadIcon(jEdit.getProperty("manage-plugins.save.icon")));
- setToolTipText("Save Currently Checked Plugins Set");
- addActionListener(this);
- setEnabled(true);
- }
-
- void saveState(String vfsURL, List<Entry> pluginList)
- {
- StringBuilder sb = new StringBuilder("<pluginset>\n ");
-
- for (Entry entry: pluginList)
- {
- String jarName = entry.jar.substring(1+entry.jar.lastIndexOf(File.separatorChar));
- sb.append(" <plugin name=\"").append(entry.name).append("\" jar=\"");
- sb.append(jarName).append("\" />\n ");
- }
- sb.append("</pluginset>\n");
-
- VFS vfs = VFSManager.getVFSForPath(vfsURL);
- Object session = vfs.createVFSSession(vfsURL, ManagePanel.this);
- Writer writer = null;
- try
- {
- OutputStream os = vfs._createOutputStream(session, vfsURL, ManagePanel.this);
- writer = new BufferedWriter(new OutputStreamWriter(os));
- writer.write(sb.toString());
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, this, "Saving State Error", e);
- }
- finally
- {
- IOUtilities.closeQuietly(writer);
- }
-
- }
-
- public void actionPerformed(ActionEvent e)
- {
- String path = jEdit.getProperty("plugin-manager.pluginset.path", jEdit.getSettingsDirectory() + File.separator);
- VFSFileChooserDialog fileChooser = new VFSFileChooserDialog(
- ManagePanel.this.window, jEdit.getActiveView(),
- path, VFSBrowser.SAVE_DIALOG, false , true);
- String[] fileselections = fileChooser.getSelectedFiles();
- List<Entry> pluginSelections = new ArrayList<Entry>();
- if (fileselections == null || fileselections.length != 1) return;
-
- PluginJAR[] jars = jEdit.getPluginJARs();
- for (PluginJAR jar : jars)
- {
- if (jar.getPlugin() != null)
- {
- Entry entry = new Entry (jar);
- pluginSelections.add(entry);
- }
- }
- saveState(fileselections[0], pluginSelections);
- jEdit.setProperty("plugin-manager.pluginset.path", fileselections[0]);
- EditBus.send(new PropertiesChanged(PluginManager.getInstance()));
- }
- }//}}}
-
- //{{{ RemoveButton class
- /**
- * The Remove button is the button pressed to remove the selected
- * plugin.
- */
- private class RemoveButton extends JButton implements ListSelectionListener, ActionListener
- {
- RemoveButton()
- {
- super(jEdit.getProperty("manage-plugins.remove"));
- table.getSelectionModel().addListSelectionListener(this);
- addActionListener(this);
- setEnabled(false);
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- int[] selected = table.getSelectedRows();
-
- List<String> listModel = new LinkedList<String>();
- Roster roster = new Roster();
- Set<String> jarsToRemove = new HashSet<String>();
- // this one will contains the loaded jars to remove. They
- // are the only one we need to check to unload plugins
- // that depends on them
- Set<String> loadedJarsToRemove = new HashSet<String>();
- for(int i = 0; i < selected.length; i++)
- {
- Entry entry = pluginModel.getEntry(selected[i]);
- if (entry.status.equals(Entry.NOT_LOADED))
- {
- if (entry.jar != null)
- {
- try
- {
- Collection<String> jarList = getDeclaredJars(entry.jar);
- jarsToRemove.addAll(jarList);
- }
- catch (IOException e)
- {
- Log.log(Log.ERROR, this, e);
- }
- }
- }
- else
- {
- jarsToRemove.addAll(entry.jars);
- loadedJarsToRemove.addAll(entry.jars);
- }
- table.getSelectionModel().removeSelectionInterval(selected[i], selected[i]);
- }
-
- for (String jar : jarsToRemove)
- {
- listModel.add(jar);
- roster.addRemove(jar);
- }
-
- int button = GUIUtilities.listConfirm(window,
- "plugin-manager.remove-confirm",
- null,listModel.toArray());
- if(button == JOptionPane.YES_OPTION)
- {
-
- List<String> closureSet = new ArrayList<String>();
- PluginJAR.transitiveClosure(loadedJarsToRemove.toArray(new String[loadedJarsToRemove.size()]), closureSet);
- closureSet.removeAll(listModel);
- if (closureSet.isEmpty())
- {
- button = JOptionPane.YES_OPTION;
- }
- else
- {
- button = GUIUtilities.listConfirm(window,"plugin-manager.remove-dependencies",
- null, closureSet.toArray());
- Collections.sort(closureSet, new StandardUtilities.StringCompare<String>(true));
- }
- if(button == JOptionPane.YES_OPTION)
- {
- for (String jarName:closureSet)
- {
- PluginJAR pluginJAR = jEdit.getPluginJAR(jarName);
- jEdit.removePluginJAR(pluginJAR, false);
- }
- roster.performOperationsInAWTThread(window);
- pluginModel.update();
- if (table.getRowCount() != 0)
- {
- table.setRowSelectionInterval(0,0);
- }
- table.setColumnSelectionInterval(0,0);
- JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
- scrollbar.setValue(scrollbar.getMinimum());
- }
- }
- }
-
- public void valueChanged(ListSelectionEvent e)
- {
- if (table.getSelectedRowCount() == 0)
- setEnabled(false);
- else
- setEnabled(true);
- }
- } //}}}
-
- //{{{ FindOrphanActionListener class
- private class FindOrphan extends JButton implements ActionListener
- {
- private FindOrphan()
- {
- super(jEdit.getProperty("plugin-manager.findOrphan.label"));
- addActionListener(this);
- }
-
- public void actionPerformed(ActionEvent e)
- {
- PluginJAR[] pluginJARs = jEdit.getPluginJARs();
- Set<String> neededJars = new HashSet<String>();
-
- Map<String, String> jarlibs = new HashMap<String, String>();
- for (PluginJAR pluginJAR : pluginJARs)
- {
- EditPlugin plugin = pluginJAR.getPlugin();
- if (plugin == null)
- {
- jarlibs.put(new File(pluginJAR.getPath()).getName(), pluginJAR.getPath());
- }
- else
- {
- Set<String> strings = plugin.getPluginJAR().getRequiredJars();
- for (String string : strings)
- {
- neededJars.add(new File(string).getName());
- }
- }
- }
-
- String[] notLoadedJars = jEdit.getNotLoadedPluginJARs();
- for (int i = 0; i < notLoadedJars.length; i++)
- {
- PluginJAR pluginJAR = new PluginJAR(new File(notLoadedJars[i]));
- PluginJAR.PluginCacheEntry pluginCacheEntry = PluginJAR.getPluginCache(pluginJAR);
- try
- {
- if (pluginCacheEntry == null)
- {
- pluginCacheEntry = pluginJAR.generateCache();
- }
- if (pluginCacheEntry.pluginClass == null)
- {
- // Not a plugin
- jarlibs.put(new File(notLoadedJars[i]).getName(), notLoadedJars[i]);
- continue;
- }
-
-
- Properties cachedProperties = pluginCacheEntry.cachedProperties;
-
- String jars = cachedProperties.getProperty("plugin." + pluginCacheEntry.pluginClass + ".jars");
-
- if (jars != null)
- {
- StringTokenizer st = new StringTokenizer(jars);
- while (st.hasMoreTokens())
- {
- neededJars.add(st.nextToken());
- }
- }
- }
- catch (IOException e1)
- {
- Log.log(Log.ERROR, this, e);
- }
- }
-
- List<String> removingJars = new ArrayList<String>();
- Set<String> jarlibsKeys = jarlibs.keySet();
- for (String jar : jarlibsKeys)
- {
- if (!neededJars.contains(jar))
- {
- removingJars.add(jar);
- Log.log(Log.MESSAGE, this, "It seems that this jar do not belong to any plugin " +jar);
- }
- }
- if(removingJars.isEmpty())
- {
- GUIUtilities.message(ManagePanel.this, "plugin-manager.noOrphan", null);
- return;
- }
-
- String[] strings = removingJars.toArray(new String[removingJars.size()]);
- List<String> mustRemove = new ArrayList<String>();
- int ret = GUIUtilities.listConfirm(ManagePanel.this,
- "plugin-manager.findOrphan",
- null,
- strings,
- mustRemove);
- if (ret != JOptionPane.OK_OPTION || mustRemove.isEmpty())
- return;
-
- Roster roster = new Roster();
- for (int i = 0; i < mustRemove.size(); i++)
- {
- String entry = mustRemove.get(i);
- roster.addRemove(jarlibs.get(entry));
- }
-
- roster.performOperationsInAWTThread(window);
- pluginModel.update();
- if (table.getRowCount() != 0)
- {
- table.setRowSelectionInterval(0,0);
- }
- table.setColumnSelectionInterval(0,0);
- JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
- scrollbar.setValue(scrollbar.getMinimum());
- table.repaint();
- }
- } //}}}
-
- //{{{ HelpButton class
- private class HelpButton extends JButton implements ListSelectionListener, ActionListener
- {
- private URL docURL;
-
- HelpButton()
- {
- super(jEdit.getProperty("manage-plugins.help"));
- table.getSelectionModel().addListSelectionListener(this);
- addActionListener(this);
- setEnabled(false);
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- new HelpViewer(docURL);
- }
-
- public void valueChanged(ListSelectionEvent e)
- {
- if (table.getSelectedRowCount() == 1)
- {
- try
- {
- Entry entry = pluginModel.getEntry(table.getSelectedRow());
- String label = entry.clazz;
- String docs = entry.docs;
- if (label != null)
- {
- EditPlugin plug = jEdit.getPlugin(label, false);
- PluginJAR jar = null;
- if (plug != null) jar = plug.getPluginJAR();
- if(jar != null && docs != null)
- {
- URL url = jar.getClassLoader().getResource(docs);
- if(url != null)
- {
- docURL = url;
- setEnabled(true);
- return;
- }
- }
- }
- }
- catch (Exception ex)
- {
- Log.log(Log.ERROR, this, "ManagePanel HelpButton Update", ex);
- }
- }
- setEnabled(false);
- }
- } //}}}
-
- //{{{ EntryCompare class
- private static class EntryCompare implements Comparator<Entry>
- {
- public static final int NAME = 1;
- public static final int STATUS = 2;
-
- private final int type;
-
- EntryCompare(int type)
- {
- this.type = type;
- }
-
- public int compare(Entry e1, Entry e2)
- {
- if (type == NAME)
- return compareNames(e1,e2);
- else
- {
- int result;
- if ((result = e1.status.compareToIgnoreCase(e2.status)) == 0)
- return compareNames(e1,e2);
- return result;
- }
- }
-
- private static int compareNames(Entry e1, Entry e2)
- {
- String s1;
- if(e1.name == null)
- s1 = MiscUtilities.getFileName(e1.jar);
- else
- s1 = e1.name;
- String s2;
- if(e2.name == null)
- s2 = MiscUtilities.getFileName(e2.jar);
- else
- s2 = e2.name;
-
- return s1.compareToIgnoreCase(s2);
- }
- } //}}}
-
- //{{{ HeaderMouseHandler class
- private class HeaderMouseHandler extends MouseAdapter
- {
- @Override
- public void mouseClicked(MouseEvent evt)
- {
- if (evt.getSource() == table.getTableHeader())
- {
- switch(table.getTableHeader().columnAtPoint(evt.getPoint()))
- {
- case 1:
- pluginModel.setSortType(EntryCompare.NAME);
- break;
- case 3:
- pluginModel.setSortType(EntryCompare.STATUS);
- break;
- default:
- break;
- }
- }
- else
- {
- if (GUIUtilities.isPopupTrigger(evt))
- {
- int row = table.rowAtPoint(evt.getPoint());
- if (row != -1 &&
- !table.isRowSelected(row))
- {
- table.setRowSelectionInterval(row,row);
- }
- if (popup == null)
- {
- popup = new JPopupMenu();
- JMenuItem item = GUIUtilities.loadMenuItem("plugin-manager.cleanup");
- item.addActionListener(new CleanupActionListener());
- popup.add(item);
- }
- GUIUtilities.showPopupMenu(popup, table, evt.getX(), evt.getY());
- }
- }
- }
-
- //{{{ CleanupActionListener class
- private class CleanupActionListener implements ActionListener
- {
- public void actionPerformed(ActionEvent e)
- {
-
- int[] ints = table.getSelectedRows();
- List<String> list = new ArrayList<String>(ints.length);
- List<Entry> entries = new ArrayList<Entry>(ints.length);
- for (int i = 0; i < ints.length; i++)
- {
- Entry entry = pluginModel.getEntry(ints[i]);
- if (entry.plugin != null)
- {
- list.add(entry.name);
- entries.add(entry);
- }
- }
-
- String[] strings = list.toArray(new String[list.size()]);
- int ret = GUIUtilities.listConfirm(ManagePanel.this,
- "plugin-manager.cleanup",
- null,
- strings);
- if (ret != JOptionPane.OK_OPTION)
- return;
-
- for (int i = 0; i < entries.size(); i++)
- {
- Entry entry = entries.get(i);
- File path = entry.plugin.getPluginHome();
- Log.log(Log.NOTICE, this, "Removing data of plugin " + entry.name + " home="+path);
- FileVFS.recursiveDelete(path);
- entry.dataSize = null;
- }
- table.repaint();
- }
- } //}}}
- } //}}}
-
- //{{{ KeyboardAction class
- private class KeyboardAction extends AbstractAction
- {
- private KeyboardCommand command = KeyboardCommand.NONE;
-
- KeyboardAction(KeyboardCommand command)
- {
- this.command = command;
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- switch (command)
- {
- case TAB_OUT_FORWARD:
- KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();
- break;
- case TAB_OUT_BACK:
- KeyboardFocusManager.getCurrentKeyboardFocusManager().focusPreviousComponent();
- break;
- case EDIT_PLUGIN:
- int[] rows = table.getSelectedRows();
- for (int i = 0; i < rows.length; i++)
- {
- Object st = pluginModel.getValueAt(rows[i], 0);
- pluginModel.setValueAt(st.equals(Boolean.FALSE), rows[i], 0);
- }
- break;
- case CLOSE_PLUGIN_MANAGER:
- window.ok();
- break;
- default:
- throw new InternalError();
- }
- }
- } //}}}
-
- //{{{ TableFocusHandler class
- private class TableFocusHandler extends FocusAdapter
- {
- @Override
- public void focusGained(FocusEvent fe)
- {
- if (table.getSelectedRow() == -1)
- {
- table.setRowSelectionInterval(0,0);
- JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
- scrollbar.setValue(scrollbar.getMinimum());
- }
- if (table.getSelectedColumn() == -1)
- {
- table.setColumnSelectionInterval(0,0);
- }
- }
- } //}}}
-
- //{{{ TableSelectionListener class
- private class TableSelectionListener implements ListSelectionListener
- {
- public void valueChanged(ListSelectionEvent e)
- {
- int row = table.getSelectedRow();
- if (row != -1)
- {
- Entry entry = pluginModel.getEntry(row);
- pluginDetailPanel.setPlugin(entry);
- }
- }
- } //}}}
- //}}}
-}
+/*
+ * ManagePanel.java - Manages plugins
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Kris Kopicki
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+//{{{ Imports
+import java.awt.*;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+import java.net.URL;
+
+import java.util.*;
+import java.util.List;
+
+import javax.swing.*;
+
+import javax.swing.border.EmptyBorder;
+
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.event.TableModelEvent;
+
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.DefaultTableCellRenderer;
+import javax.swing.table.JTableHeader;
+import javax.swing.table.TableColumn;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.io.FileVFS;
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.io.*;
+
+import org.gjt.sp.jedit.browser.VFSBrowser;
+import org.gjt.sp.jedit.browser.VFSFileChooserDialog;
+import org.gjt.sp.jedit.gui.RolloverButton;
+import org.gjt.sp.jedit.help.*;
+
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.XMLUtilities;
+import org.gjt.sp.util.StandardUtilities;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+//}}}
+
+/**
+ * The ManagePanel is the JPanel that shows the installed plugins.
+ */
+public class ManagePanel extends JPanel
+{
+ //{{{ Private members
+ private final JCheckBox hideLibraries;
+ private final JTable table;
+ private final JScrollPane scrollpane;
+ private final PluginDetailPanel pluginDetailPanel;
+ private final PluginTableModel pluginModel;
+ private final PluginManager window;
+ private JPopupMenu popup;
+ private Set<String> selectedPlugins;
+ private Set<String> jarNames;
+ //}}}
+
+ //{{{ ManagePanel constructor
+ public ManagePanel(PluginManager window)
+ {
+ super(new BorderLayout(12,12));
+
+ this.window = window;
+
+ setBorder(new EmptyBorder(12,12,12,12));
+
+ Box topBox = new Box(BoxLayout.X_AXIS);
+ topBox.add(hideLibraries = new HideLibrariesButton());
+ add(BorderLayout.NORTH,topBox);
+
+ /* Create the plugin table */
+ table = new JTable(pluginModel = new PluginTableModel());
+ table.setShowGrid(false);
+ table.setIntercellSpacing(new Dimension(0,0));
+ table.setRowHeight(table.getRowHeight() + 2);
+ table.setPreferredScrollableViewportSize(new Dimension(500,300));
+ table.setDefaultRenderer(Object.class, new TextRenderer(
+ (DefaultTableCellRenderer)table.getDefaultRenderer(Object.class)));
+ table.addFocusListener(new TableFocusHandler());
+ table.getSelectionModel().addListSelectionListener(new TableSelectionListener());
+ InputMap tableInputMap = table.getInputMap(JComponent.WHEN_FOCUSED);
+ ActionMap tableActionMap = table.getActionMap();
+ tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,0),"tabOutForward");
+ tableActionMap.put("tabOutForward",new KeyboardAction(KeyboardCommand.TAB_OUT_FORWARD));
+ tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,InputEvent.SHIFT_MASK),"tabOutBack");
+ tableActionMap.put("tabOutBack",new KeyboardAction(KeyboardCommand.TAB_OUT_BACK));
+ tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE,0),"editPlugin");
+ tableActionMap.put("editPlugin",new KeyboardAction(KeyboardCommand.EDIT_PLUGIN));
+ tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0),"closePluginManager");
+ tableActionMap.put("closePluginManager",new KeyboardAction(KeyboardCommand.CLOSE_PLUGIN_MANAGER));
+
+ TableColumn col1 = table.getColumnModel().getColumn(0);
+ TableColumn col2 = table.getColumnModel().getColumn(1);
+ TableColumn col3 = table.getColumnModel().getColumn(2);
+ TableColumn col4 = table.getColumnModel().getColumn(3);
+
+ col1.setPreferredWidth(30);
+ col1.setMinWidth(30);
+ col1.setMaxWidth(30);
+ col1.setResizable(false);
+
+ col2.setPreferredWidth(300);
+ col3.setPreferredWidth(100);
+ col4.setPreferredWidth(100);
+
+ JTableHeader header = table.getTableHeader();
+ header.setReorderingAllowed(false);
+ HeaderMouseHandler mouseHandler = new HeaderMouseHandler();
+ header.addMouseListener(mouseHandler);
+ table.addMouseListener(mouseHandler);
+ scrollpane = new JScrollPane(table);
+ scrollpane.getViewport().setBackground(table.getBackground());
+ pluginDetailPanel = new PluginDetailPanel();
+ scrollpane.setPreferredSize(new Dimension(400,400));
+ JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
+ true, scrollpane, pluginDetailPanel);
+ add(BorderLayout.CENTER, split);
+ split.setResizeWeight(0.75);
+ /* Create button panel */
+ Box buttons = new Box(BoxLayout.X_AXIS);
+
+ buttons.add(new RemoveButton());
+ buttons.add(new SaveButton());
+ buttons.add(new RestoreButton());
+ buttons.add(new FindOrphan());
+ buttons.add(Box.createGlue());
+ buttons.add(new HelpButton());
+
+ add(BorderLayout.SOUTH,buttons);
+
+ pluginModel.update();
+ } //}}}
+
+ //{{{ update() method
+ public void update()
+ {
+ pluginModel.update();
+ } //}}}
+
+ // {{{ class ManagePanelRestoreHandler
+ /**
+ * For handling the XML parse events of a plugin set.
+ * Selects the same plugins that are in that set.
+ * @since jEdit 4.3pre10
+ */
+ private class ManagePanelRestoreHandler extends DefaultHandler
+ {
+ ManagePanelRestoreHandler()
+ {
+ selectedPlugins = new HashSet<String>();
+ jarNames = new HashSet<String>();
+ }
+
+
+
+ @Override
+ public void startElement(String uri, String localName,
+ String qName, Attributes attrs) throws SAXException
+ {
+ if (localName.equals("plugin"))
+ {
+ String jarName = attrs.getValue("jar");
+ String name = attrs.getValue("name");
+ selectedPlugins.add(name);
+ jarNames.add(jarName);
+ }
+ }
+ }//}}}
+
+ //{{{ loadPluginSet() method
+ boolean loadPluginSet(String path)
+ {
+ VFS vfs = VFSManager.getVFSForPath(path);
+ Object session = vfs.createVFSSession(path, this);
+ try
+ {
+ InputStream is = vfs._createInputStream(session, path, false, this);
+ XMLUtilities.parseXML(is, new ManagePanelRestoreHandler());
+ is.close();
+ int rowCount = pluginModel.getRowCount();
+ for (int i=0 ; i<rowCount ; i++)
+ {
+ Entry ent = pluginModel.getEntry(i);
+ String name = ent.name;
+ if (name != null)
+ {
+ pluginModel.setValueAt(selectedPlugins.contains(name), i, 0);
+ }
+ else
+ {
+ String jarPath = ent.jar;
+ String jarName = jarPath.substring(1 + jarPath.lastIndexOf(File.separatorChar));
+ try
+ {
+ pluginModel.setValueAt(jarNames.contains(jarName), i, 0);
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.WARNING, this, "Exception thrown loading: " + jarName, e);
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, this, "Loading Pluginset Error", e);
+ return false;
+ }
+ pluginModel.update();
+ return true;
+ }//}}}
+
+ //{{{ getDeclaredJars() method
+ /**
+ * Returns a collection of declared jars in the plugin.
+ * If the plugin is loaded use {@link org.gjt.sp.jedit.PluginJAR#getRequiredJars()}
+ * instead
+ *
+ * @param jarName the jar name of the plugin
+ * @return a collection containing jars path
+ * @throws IOException if jEdit cannot generate cache
+ * @since jEdit 4.3pre12
+ */
+ private static Collection<String> getDeclaredJars(String jarName) throws IOException
+ {
+ Collection<String> jarList = new ArrayList<String>();
+ PluginJAR pluginJAR = new PluginJAR(new File(jarName));
+ PluginJAR.PluginCacheEntry pluginCacheEntry = PluginJAR.getPluginCache(pluginJAR);
+ if (pluginCacheEntry == null)
+ {
+ pluginCacheEntry = pluginJAR.generateCache();
+ }
+ Properties cachedProperties = pluginCacheEntry.cachedProperties;
+
+ String jars = cachedProperties.getProperty("plugin." + pluginCacheEntry.pluginClass + ".jars");
+
+ if (jars != null)
+ {
+ String dir = MiscUtilities.getParentOfPath(pluginJAR.getPath());
+ StringTokenizer st = new StringTokenizer(jars);
+ while (st.hasMoreTokens())
+ {
+ String _jarPath = MiscUtilities.constructPath(dir, st.nextToken());
+ if (new File(_jarPath).exists())
+ jarList.add(_jarPath);
+ }
+ }
+ jarList.add(jarName);
+ return jarList;
+ }//}}}
+
+ //{{{ Inner classes
+
+ //{{{ Entry class
+ static class Entry
+ {
+ static final String ERROR = "error";
+ static final String LOADED = "loaded";
+ static final String NOT_LOADED = "not-loaded";
+
+ final String status;
+ /** The jar path. */
+ final String jar;
+
+ String clazz, name, version, author, docs;
+ /** The description property of the plugin. */
+ String description;
+ EditPlugin plugin;
+ /**
+ * The jars referenced in the props file of the plugin.
+ * plugin.clazz.jars property and
+ * plugin.clazz.files property
+ */
+ final List<String> jars;
+
+ /** The data size. */
+ String dataSize;
+
+ /**
+ * Constructor used for jars that aren't loaded.
+ *
+ * @param jar jar file name
+ */
+ Entry(String jar)
+ {
+ jars = new LinkedList<String>();
+ this.jar = jar;
+ jars.add(this.jar);
+ status = NOT_LOADED;
+ }
+
+ /**
+ * Constructor used for loaded jars.
+ *
+ * @param jar the pluginJar
+ */
+ Entry(PluginJAR jar)
+ {
+ jars = new LinkedList<String>();
+ this.jar = jar.getPath();
+ jars.add(this.jar);
+
+ plugin = jar.getPlugin();
+ if(plugin != null)
+ {
+ status = plugin instanceof EditPlugin.Broken
+ ? ERROR : LOADED;
+ clazz = plugin.getClassName();
+ name = jEdit.getProperty("plugin."+clazz+".name");
+ version = jEdit.getProperty("plugin."+clazz+".version");
+ author = jEdit.getProperty("plugin."+clazz+".author");
+ docs = jEdit.getProperty("plugin."+clazz+".docs");
+ description = jEdit.getProperty("plugin."+clazz+".description");
+ String jarsProp = jEdit.getProperty("plugin."+clazz+".jars");
+
+ if(jarsProp != null)
+ {
+ String directory = MiscUtilities.getParentOfPath(this.jar);
+
+ StringTokenizer st = new StringTokenizer(jarsProp);
+ while(st.hasMoreElements())
+ {
+ jars.add(MiscUtilities.constructPath(
+ directory,st.nextToken()));
+ }
+ }
+
+ String filesProp = jEdit.getProperty("plugin."+clazz+".files");
+
+ if(filesProp != null)
+ {
+ String directory = MiscUtilities.getParentOfPath(this.jar);
+
+ StringTokenizer st = new StringTokenizer(filesProp);
+ while(st.hasMoreElements())
+ {
+ jars.add(MiscUtilities.constructPath(
+ directory,st.nextToken()));
+ }
+ }
+ }
+ else
+ {
+ status = LOADED;
+ }
+ }
+ } //}}}
+
+ //{{{ PluginTableModel class
+ private class PluginTableModel extends AbstractTableModel
+ {
+ private final List<Entry> entries;
+ private int sortType = EntryCompare.NAME;
+ private ConcurrentHashMap<String, Object> unloaded;
+ // private HashSet<String> unloaded;
+
+ //{{{ Constructor
+ PluginTableModel()
+ {
+ entries = new ArrayList<Entry>();
+ } //}}}
+
+ //{{{ getColumnCount() method
+ public int getColumnCount()
+ {
+ return 5;
+ } //}}}
+
+ //{{{ getColumnClass() method
+ @Override
+ public Class getColumnClass(int columnIndex)
+ {
+ switch (columnIndex)
+ {
+ case 0: return Boolean.class;
+ default: return Object.class;
+ }
+ } //}}}
+
+ //{{{ getColumnName() method
+ @Override
+ public String getColumnName(int column)
+ {
+ switch (column)
+ {
+ case 0:
+ return " ";
+ case 1:
+ return jEdit.getProperty("manage-plugins.info.name");
+ case 2:
+ return jEdit.getProperty("manage-plugins.info.version");
+ case 3:
+ return jEdit.getProperty("manage-plugins.info.status");
+ case 4:
+ return jEdit.getProperty("manage-plugins.info.data");
+ default:
+ throw new Error("Column out of range");
+ }
+ } //}}}
+
+ //{{{ getEntry() method
+ public Entry getEntry(int rowIndex)
+ {
+ return entries.get(rowIndex);
+ } //}}}
+
+ //{{{ getRowCount() method
+ public int getRowCount()
+ {
+ return entries.size();
+ } //}}}
+
+ //{{{ getValueAt() method
+ public Object getValueAt(int rowIndex,int columnIndex)
+ {
+ Entry entry = entries.get(rowIndex);
+ switch (columnIndex)
+ {
+ case 0:
+ return Boolean.valueOf(!entry.status.equals(Entry.NOT_LOADED));
+ case 1:
+ if(entry.name == null)
+ {
+ return MiscUtilities.getFileName(entry.jar);
+ }
+ else
+ {
+ return entry.name;
+ }
+ case 2:
+ return entry.version;
+ case 3:
+ return jEdit.getProperty("plugin-manager.status." + entry.status);
+ case 4:
+ if (entry.dataSize == null && entry.plugin != null)
+ {
+ File pluginDirectory = entry.plugin.getPluginHome();
+ if (null == pluginDirectory)
+ {
+ return null;
+ }
+ if (pluginDirectory.exists())
+ {
+ entry.dataSize = StandardUtilities.formatFileSize(IOUtilities.fileLength(pluginDirectory));
+ }
+ else
+ {
+ if (jEdit.getBooleanProperty("plugin." + entry.clazz + ".usePluginHome"))
+ {
+ entry.dataSize = StandardUtilities.formatFileSize(0);
+ }
+ else
+ {
+ entry.dataSize = jEdit.getProperty("manage-plugins.data-size.unknown");
+ }
+
+ }
+ }
+ return entry.dataSize;
+ default:
+ throw new Error("Column out of range");
+ }
+ } //}}}
+
+ //{{{ isCellEditable() method
+ @Override
+ public boolean isCellEditable(int rowIndex, int columnIndex)
+ {
+ return columnIndex == 0;
+ } //}}}
+
+ //{{{ setValueAt() method
+ @Override
+ public void setValueAt(Object value, int rowIndex,
+ int columnIndex)
+ {
+ Entry entry = entries.get(rowIndex);
+ if(columnIndex == 0)
+ {
+ PluginJAR jar = jEdit.getPluginJAR(entry.jar);
+ if(jar == null)
+ {
+ if(value.equals(Boolean.FALSE))
+ return;
+
+ PluginJAR.load(entry.jar, true);
+ }
+ else
+ {
+ if(value.equals(Boolean.TRUE))
+ return;
+
+ unloadPluginJARWithDialog(jar);
+ }
+ }
+
+ update();
+ } //}}}
+
+ //{{{ setSortType() method
+ public void setSortType(int type)
+ {
+ sortType = type;
+ sort(type);
+ } //}}}
+
+ //{{{ sort() method
+ public void sort(int type)
+ {
+ List<String> savedSelection = new ArrayList<String>();
+ saveSelection(savedSelection);
+ Collections.sort(entries,new EntryCompare(type));
+ fireTableChanged(new TableModelEvent(this));
+ restoreSelection(savedSelection);
+ }
+ //}}}
+
+ //{{{ update() method
+ public void update()
+ {
+ List<String> savedSelection = new ArrayList<String>();
+ saveSelection(savedSelection);
+ entries.clear();
+
+ String systemJarDir = MiscUtilities.constructPath(
+ jEdit.getJEditHome(),"jars");
+ String userJarDir;
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory == null)
+ userJarDir = null;
+ else
+ {
+ userJarDir = MiscUtilities.constructPath(
+ settingsDirectory,"jars");
+ }
+
+ PluginJAR[] plugins = jEdit.getPluginJARs();
+ for(int i = 0; i < plugins.length; i++)
+ {
+ String path = plugins[i].getPath();
+ if(path.startsWith(systemJarDir)
+ || (userJarDir != null
+ && path.startsWith(userJarDir)))
+ {
+ Entry e = new Entry(plugins[i]);
+ if(!hideLibraries.isSelected()
+ || e.clazz != null)
+ {
+ entries.add(e);
+ }
+ }
+ }
+
+ String[] newPlugins = jEdit.getNotLoadedPluginJARs();
+ for(int i = 0; i < newPlugins.length; i++)
+ {
+ Entry e = new Entry(newPlugins[i]);
+ entries.add(e);
+ }
+
+ sort(sortType);
+ restoreSelection(savedSelection);
+ } //}}}
+
+ //{{{ unloadPluginJARWithDialog() method
+ // Perhaps this should also be moved to PluginJAR class?
+ private void unloadPluginJARWithDialog(PluginJAR jar)
+ {
+ // unloaded = new HashSet<String>();
+ unloaded = new ConcurrentHashMap<String, Object>();
+ String[] dependents = jar.getDependentPlugins();
+ if(dependents.length == 0)
+ unloadPluginJAR(jar);
+ else
+ {
+ List<String> closureSet = new LinkedList<String>();
+ PluginJAR.transitiveClosure(dependents, closureSet);
+ List<String> listModel = new ArrayList<String>();
+ listModel.addAll(closureSet);
+ Collections.sort(listModel, new StandardUtilities.StringCompare<String>(true));
+
+ int button = GUIUtilities.listConfirm(window,"plugin-manager.dependency",
+ new String[] { jar.getFile().getName() }, listModel.toArray());
+ if(button == JOptionPane.YES_OPTION)
+ unloadPluginJAR(jar);
+ }
+ } //}}}
+
+ //{{{ unloadPluginJAR() method
+ private void unloadPluginJAR(PluginJAR jar)
+ {
+ String[] dependents = jar.getDependentPlugins();
+ for (String dependent : dependents)
+ {
+ if (!unloaded.containsKey(dependent))
+ {
+ unloaded.put(dependent, Boolean.TRUE);
+ PluginJAR _jar = jEdit.getPluginJAR(dependent);
+ if(_jar != null)
+ unloadPluginJAR(_jar);
+ }
+ }
+ jEdit.removePluginJAR(jar,false);
+ jEdit.setBooleanProperty("plugin-blacklist."+MiscUtilities.getFileName(jar.getPath()),true);
+ } //}}}
+
+ //{{{ saveSelection() method
+ /**
+ * Save the selection in the given list.
+ * The list will be filled with the jar names of the selected entries
+ *
+ * @param savedSelection the list where to save the selection
+ */
+ public void saveSelection(List<String> savedSelection)
+ {
+ if (table != null)
+ {
+ int[] rows = table.getSelectedRows();
+ for (int i=0 ; i<rows.length ; i++)
+ {
+ savedSelection.add(entries.get(rows[i]).jar);
+ }
+ }
+ } //}}}
+
+ //{{{ restoreSelection() method
+ /**
+ * Restore the selection.
+ *
+ * @param savedSelection the selection list that contains the jar names of the selected items
+ */
+ public void restoreSelection(List<String> savedSelection)
+ {
+ if (null != table)
+ {
+ table.setColumnSelectionInterval(0,0);
+ if (!savedSelection.isEmpty())
+ {
+ int i = 0;
+ int rowCount = getRowCount();
+ for ( ; i<rowCount ; i++)
+ {
+ if (savedSelection.contains(entries.get(i).jar))
+ {
+ table.setRowSelectionInterval(i,i);
+ break;
+ }
+ }
+ ListSelectionModel lsm = table.getSelectionModel();
+ for ( ; i<rowCount ; i++)
+ {
+ if (savedSelection.contains(entries.get(i).jar))
+ {
+ lsm.addSelectionInterval(i,i);
+ }
+ }
+ }
+ else
+ {
+ if (table.getRowCount() != 0)
+ table.setRowSelectionInterval(0,0);
+ JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
+ scrollbar.setValue(scrollbar.getMinimum());
+ }
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ TextRenderer class
+ private class TextRenderer extends DefaultTableCellRenderer
+ {
+ private final DefaultTableCellRenderer tcr;
+
+ TextRenderer(DefaultTableCellRenderer tcr)
+ {
+ this.tcr = tcr;
+ }
+
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object value,
+ boolean isSelected, boolean hasFocus, int row, int column)
+ {
+ Entry entry = pluginModel.getEntry(row);
+ if (entry.status.equals(Entry.ERROR))
+ tcr.setForeground(Color.red);
+ else
+ tcr.setForeground(UIManager.getColor("Table.foreground"));
+ return tcr.getTableCellRendererComponent(table,value,isSelected,false,row,column);
+ }
+ } //}}}
+
+ //{{{ HideLibrariesButton class
+ private class HideLibrariesButton extends JCheckBox implements ActionListener
+ {
+ HideLibrariesButton()
+ {
+ super(jEdit.getProperty("plugin-manager.hide-libraries"));
+ setSelected(jEdit.getBooleanProperty(
+ "plugin-manager.hide-libraries.toggle"));
+ addActionListener(this);
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ jEdit.setBooleanProperty(
+ "plugin-manager.hide-libraries.toggle",
+ isSelected());
+ ManagePanel.this.update();
+ }
+ } //}}}
+
+ //{{{ RestoreButton class
+ /**
+ * Permits the user to restore the state of the ManagePanel
+ * based on a PluginSet.
+ *
+ * Selects all loaded plugins that appear in an .XML file, and deselects
+ * all others, and also sets the pluginset to that .XML file. Does not install any plugins
+ * that were not previously installed.
+ *
+ * @since jEdit 4.3pre10
+ * @author Alan Ezust
+ */
+ private class RestoreButton extends RolloverButton implements ActionListener
+ {
+ RestoreButton()
+ {
+ setIcon(GUIUtilities.loadIcon(jEdit.getProperty("manage-plugins.restore.icon")));
+ addActionListener(this);
+ setToolTipText("Choose a PluginSet, select/deselect plugins based on set.");
+ }
+
+ public void actionPerformed(ActionEvent e)
+ {
+ String path = jEdit.getProperty(PluginManager.PROPERTY_PLUGINSET,
+ jEdit.getSettingsDirectory() + File.separator);
+ String[] selectedFiles = GUIUtilities.showVFSFileDialog(ManagePanel.this.window,
+ jEdit.getActiveView(), path, VFSBrowser.OPEN_DIALOG, false);
+ if (selectedFiles == null || selectedFiles.length != 1) return;
+ path = selectedFiles[0];
+ boolean success = loadPluginSet(path);
+ if (success)
+ {
+ jEdit.setProperty(PluginManager.PROPERTY_PLUGINSET, path);
+ EditBus.send(new PropertiesChanged(PluginManager.getInstance()));
+ }
+
+ }
+ }//}}}
+
+ //{{{ SaveButton class
+ /**
+ * Permits the user to save the state of the ManagePanel,
+ * which in this case, is nothing more than a list of
+ * all plugins currently loaded.
+ * @since jEdit 4.3pre10
+ * @author Alan Ezust
+ */
+ private class SaveButton extends RolloverButton implements ActionListener
+ {
+ SaveButton()
+ {
+ setIcon(GUIUtilities.loadIcon(jEdit.getProperty("manage-plugins.save.icon")));
+ setToolTipText("Save Currently Checked Plugins Set");
+ addActionListener(this);
+ setEnabled(true);
+ }
+
+ void saveState(String vfsURL, List<Entry> pluginList)
+ {
+ StringBuilder sb = new StringBuilder("<pluginset>\n ");
+
+ for (Entry entry: pluginList)
+ {
+ String jarName = entry.jar.substring(1+entry.jar.lastIndexOf(File.separatorChar));
+ sb.append(" <plugin name=\"").append(entry.name).append("\" jar=\"");
+ sb.append(jarName).append("\" />\n ");
+ }
+ sb.append("</pluginset>\n");
+
+ VFS vfs = VFSManager.getVFSForPath(vfsURL);
+ Object session = vfs.createVFSSession(vfsURL, ManagePanel.this);
+ Writer writer = null;
+ try
+ {
+ OutputStream os = vfs._createOutputStream(session, vfsURL, ManagePanel.this);
+ writer = new BufferedWriter(new OutputStreamWriter(os));
+ writer.write(sb.toString());
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, this, "Saving State Error", e);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(writer);
+ }
+
+ }
+
+ public void actionPerformed(ActionEvent e)
+ {
+ String path = jEdit.getProperty("plugin-manager.pluginset.path", jEdit.getSettingsDirectory() + File.separator);
+ VFSFileChooserDialog fileChooser = new VFSFileChooserDialog(
+ ManagePanel.this.window, jEdit.getActiveView(),
+ path, VFSBrowser.SAVE_DIALOG, false , true);
+ String[] fileselections = fileChooser.getSelectedFiles();
+ List<Entry> pluginSelections = new ArrayList<Entry>();
+ if (fileselections == null || fileselections.length != 1) return;
+
+ PluginJAR[] jars = jEdit.getPluginJARs();
+ for (PluginJAR jar : jars)
+ {
+ if (jar.getPlugin() != null)
+ {
+ Entry entry = new Entry (jar);
+ pluginSelections.add(entry);
+ }
+ }
+ saveState(fileselections[0], pluginSelections);
+ jEdit.setProperty("plugin-manager.pluginset.path", fileselections[0]);
+ EditBus.send(new PropertiesChanged(PluginManager.getInstance()));
+ }
+ }//}}}
+
+ //{{{ RemoveButton class
+ /**
+ * The Remove button is the button pressed to remove the selected
+ * plugin.
+ */
+ private class RemoveButton extends JButton implements ListSelectionListener, ActionListener
+ {
+ RemoveButton()
+ {
+ super(jEdit.getProperty("manage-plugins.remove"));
+ table.getSelectionModel().addListSelectionListener(this);
+ addActionListener(this);
+ setEnabled(false);
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ int[] selected = table.getSelectedRows();
+
+ List<String> listModel = new LinkedList<String>();
+ Roster roster = new Roster();
+ Set<String> jarsToRemove = new HashSet<String>();
+ // this one will contains the loaded jars to remove. They
+ // are the only one we need to check to unload plugins
+ // that depends on them
+ Set<String> loadedJarsToRemove = new HashSet<String>();
+ for(int i = 0; i < selected.length; i++)
+ {
+ Entry entry = pluginModel.getEntry(selected[i]);
+ if (entry.status.equals(Entry.NOT_LOADED))
+ {
+ if (entry.jar != null)
+ {
+ try
+ {
+ Collection<String> jarList = getDeclaredJars(entry.jar);
+ jarsToRemove.addAll(jarList);
+ }
+ catch (IOException e)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ }
+ }
+ else
+ {
+ jarsToRemove.addAll(entry.jars);
+ loadedJarsToRemove.addAll(entry.jars);
+ }
+ table.getSelectionModel().removeSelectionInterval(selected[i], selected[i]);
+ }
+
+ for (String jar : jarsToRemove)
+ {
+ listModel.add(jar);
+ roster.addRemove(jar);
+ }
+
+ int button = GUIUtilities.listConfirm(window,
+ "plugin-manager.remove-confirm",
+ null,listModel.toArray());
+ if(button == JOptionPane.YES_OPTION)
+ {
+
+ List<String> closureSet = new ArrayList<String>();
+ PluginJAR.transitiveClosure(loadedJarsToRemove.toArray(new String[loadedJarsToRemove.size()]), closureSet);
+ closureSet.removeAll(listModel);
+ if (closureSet.isEmpty())
+ {
+ button = JOptionPane.YES_OPTION;
+ }
+ else
+ {
+ button = GUIUtilities.listConfirm(window,"plugin-manager.remove-dependencies",
+ null, closureSet.toArray());
+ Collections.sort(closureSet, new StandardUtilities.StringCompare<String>(true));
+ }
+ if(button == JOptionPane.YES_OPTION)
+ {
+ for (String jarName:closureSet)
+ {
+ PluginJAR pluginJAR = jEdit.getPluginJAR(jarName);
+ jEdit.removePluginJAR(pluginJAR, false);
+ }
+ roster.performOperationsInAWTThread(window);
+ pluginModel.update();
+ if (table.getRowCount() != 0)
+ {
+ table.setRowSelectionInterval(0,0);
+ }
+ table.setColumnSelectionInterval(0,0);
+ JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
+ scrollbar.setValue(scrollbar.getMinimum());
+ }
+ }
+ }
+
+ public void valueChanged(ListSelectionEvent e)
+ {
+ if (table.getSelectedRowCount() == 0)
+ setEnabled(false);
+ else
+ setEnabled(true);
+ }
+ } //}}}
+
+ //{{{ FindOrphanActionListener class
+ private class FindOrphan extends JButton implements ActionListener
+ {
+ private FindOrphan()
+ {
+ super(jEdit.getProperty("plugin-manager.findOrphan.label"));
+ addActionListener(this);
+ }
+
+ public void actionPerformed(ActionEvent e)
+ {
+ PluginJAR[] pluginJARs = jEdit.getPluginJARs();
+ Set<String> neededJars = new HashSet<String>();
+
+ Map<String, String> jarlibs = new HashMap<String, String>();
+ for (PluginJAR pluginJAR : pluginJARs)
+ {
+ EditPlugin plugin = pluginJAR.getPlugin();
+ if (plugin == null)
+ {
+ jarlibs.put(new File(pluginJAR.getPath()).getName(), pluginJAR.getPath());
+ }
+ else
+ {
+ Set<String> strings = plugin.getPluginJAR().getRequiredJars();
+ for (String string : strings)
+ {
+ neededJars.add(new File(string).getName());
+ }
+ }
+ }
+
+ String[] notLoadedJars = jEdit.getNotLoadedPluginJARs();
+ for (int i = 0; i < notLoadedJars.length; i++)
+ {
+ PluginJAR pluginJAR = new PluginJAR(new File(notLoadedJars[i]));
+ PluginJAR.PluginCacheEntry pluginCacheEntry = PluginJAR.getPluginCache(pluginJAR);
+ try
+ {
+ if (pluginCacheEntry == null)
+ {
+ pluginCacheEntry = pluginJAR.generateCache();
+ }
+ if (pluginCacheEntry.pluginClass == null)
+ {
+ // Not a plugin
+ jarlibs.put(new File(notLoadedJars[i]).getName(), notLoadedJars[i]);
+ continue;
+ }
+
+
+ Properties cachedProperties = pluginCacheEntry.cachedProperties;
+
+ String jars = cachedProperties.getProperty("plugin." + pluginCacheEntry.pluginClass + ".jars");
+
+ if (jars != null)
+ {
+ StringTokenizer st = new StringTokenizer(jars);
+ while (st.hasMoreTokens())
+ {
+ neededJars.add(st.nextToken());
+ }
+ }
+ }
+ catch (IOException e1)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ }
+
+ List<String> removingJars = new ArrayList<String>();
+ Set<String> jarlibsKeys = jarlibs.keySet();
+ for (String jar : jarlibsKeys)
+ {
+ if (!neededJars.contains(jar))
+ {
+ removingJars.add(jar);
+ Log.log(Log.MESSAGE, this, "It seems that this jar do not belong to any plugin " +jar);
+ }
+ }
+ if(removingJars.isEmpty())
+ {
+ GUIUtilities.message(ManagePanel.this, "plugin-manager.noOrphan", null);
+ return;
+ }
+
+ String[] strings = removingJars.toArray(new String[removingJars.size()]);
+ List<String> mustRemove = new ArrayList<String>();
+ int ret = GUIUtilities.listConfirm(ManagePanel.this,
+ "plugin-manager.findOrphan",
+ null,
+ strings,
+ mustRemove);
+ if (ret != JOptionPane.OK_OPTION || mustRemove.isEmpty())
+ return;
+
+ Roster roster = new Roster();
+ for (int i = 0; i < mustRemove.size(); i++)
+ {
+ String entry = mustRemove.get(i);
+ roster.addRemove(jarlibs.get(entry));
+ }
+
+ roster.performOperationsInAWTThread(window);
+ pluginModel.update();
+ if (table.getRowCount() != 0)
+ {
+ table.setRowSelectionInterval(0,0);
+ }
+ table.setColumnSelectionInterval(0,0);
+ JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
+ scrollbar.setValue(scrollbar.getMinimum());
+ table.repaint();
+ }
+ } //}}}
+
+ //{{{ HelpButton class
+ private class HelpButton extends JButton implements ListSelectionListener, ActionListener
+ {
+ private URL docURL;
+
+ HelpButton()
+ {
+ super(jEdit.getProperty("manage-plugins.help"));
+ table.getSelectionModel().addListSelectionListener(this);
+ addActionListener(this);
+ setEnabled(false);
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ new HelpViewer(docURL);
+ }
+
+ public void valueChanged(ListSelectionEvent e)
+ {
+ if (table.getSelectedRowCount() == 1)
+ {
+ try
+ {
+ Entry entry = pluginModel.getEntry(table.getSelectedRow());
+ String label = entry.clazz;
+ String docs = entry.docs;
+ if (label != null)
+ {
+ EditPlugin plug = jEdit.getPlugin(label, false);
+ PluginJAR jar = null;
+ if (plug != null) jar = plug.getPluginJAR();
+ if(jar != null && docs != null)
+ {
+ URL url = jar.getClassLoader().getResource(docs);
+ if(url != null)
+ {
+ docURL = url;
+ setEnabled(true);
+ return;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Log.log(Log.ERROR, this, "ManagePanel HelpButton Update", ex);
+ }
+ }
+ setEnabled(false);
+ }
+ } //}}}
+
+ //{{{ EntryCompare class
+ private static class EntryCompare implements Comparator<Entry>
+ {
+ public static final int NAME = 1;
+ public static final int STATUS = 2;
+
+ private final int type;
+
+ EntryCompare(int type)
+ {
+ this.type = type;
+ }
+
+ public int compare(Entry e1, Entry e2)
+ {
+ if (type == NAME)
+ return compareNames(e1,e2);
+ else
+ {
+ int result;
+ if ((result = e1.status.compareToIgnoreCase(e2.status)) == 0)
+ return compareNames(e1,e2);
+ return result;
+ }
+ }
+
+ private static int compareNames(Entry e1, Entry e2)
+ {
+ String s1;
+ if(e1.name == null)
+ s1 = MiscUtilities.getFileName(e1.jar);
+ else
+ s1 = e1.name;
+ String s2;
+ if(e2.name == null)
+ s2 = MiscUtilities.getFileName(e2.jar);
+ else
+ s2 = e2.name;
+
+ return s1.compareToIgnoreCase(s2);
+ }
+ } //}}}
+
+ //{{{ HeaderMouseHandler class
+ private class HeaderMouseHandler extends MouseAdapter
+ {
+ @Override
+ public void mouseClicked(MouseEvent evt)
+ {
+ if (evt.getSource() == table.getTableHeader())
+ {
+ switch(table.getTableHeader().columnAtPoint(evt.getPoint()))
+ {
+ case 1:
+ pluginModel.setSortType(EntryCompare.NAME);
+ break;
+ case 3:
+ pluginModel.setSortType(EntryCompare.STATUS);
+ break;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ if (GUIUtilities.isPopupTrigger(evt))
+ {
+ int row = table.rowAtPoint(evt.getPoint());
+ if (row != -1 &&
+ !table.isRowSelected(row))
+ {
+ table.setRowSelectionInterval(row,row);
+ }
+ if (popup == null)
+ {
+ popup = new JPopupMenu();
+ JMenuItem item = GUIUtilities.loadMenuItem("plugin-manager.cleanup");
+ item.addActionListener(new CleanupActionListener());
+ popup.add(item);
+ }
+ GUIUtilities.showPopupMenu(popup, table, evt.getX(), evt.getY());
+ }
+ }
+ }
+
+ //{{{ CleanupActionListener class
+ private class CleanupActionListener implements ActionListener
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+
+ int[] ints = table.getSelectedRows();
+ List<String> list = new ArrayList<String>(ints.length);
+ List<Entry> entries = new ArrayList<Entry>(ints.length);
+ for (int i = 0; i < ints.length; i++)
+ {
+ Entry entry = pluginModel.getEntry(ints[i]);
+ if (entry.plugin != null)
+ {
+ list.add(entry.name);
+ entries.add(entry);
+ }
+ }
+
+ String[] strings = list.toArray(new String[list.size()]);
+ int ret = GUIUtilities.listConfirm(ManagePanel.this,
+ "plugin-manager.cleanup",
+ null,
+ strings);
+ if (ret != JOptionPane.OK_OPTION)
+ return;
+
+ for (int i = 0; i < entries.size(); i++)
+ {
+ Entry entry = entries.get(i);
+ File path = entry.plugin.getPluginHome();
+ Log.log(Log.NOTICE, this, "Removing data of plugin " + entry.name + " home="+path);
+ FileVFS.recursiveDelete(path);
+ entry.dataSize = null;
+ }
+ table.repaint();
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ KeyboardAction class
+ private class KeyboardAction extends AbstractAction
+ {
+ private KeyboardCommand command = KeyboardCommand.NONE;
+
+ KeyboardAction(KeyboardCommand command)
+ {
+ this.command = command;
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ switch (command)
+ {
+ case TAB_OUT_FORWARD:
+ KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();
+ break;
+ case TAB_OUT_BACK:
+ KeyboardFocusManager.getCurrentKeyboardFocusManager().focusPreviousComponent();
+ break;
+ case EDIT_PLUGIN:
+ int[] rows = table.getSelectedRows();
+ for (int i = 0; i < rows.length; i++)
+ {
+ Object st = pluginModel.getValueAt(rows[i], 0);
+ pluginModel.setValueAt(st.equals(Boolean.FALSE), rows[i], 0);
+ }
+ break;
+ case CLOSE_PLUGIN_MANAGER:
+ window.ok();
+ break;
+ default:
+ throw new InternalError();
+ }
+ }
+ } //}}}
+
+ //{{{ TableFocusHandler class
+ private class TableFocusHandler extends FocusAdapter
+ {
+ @Override
+ public void focusGained(FocusEvent fe)
+ {
+ if (table.getSelectedRow() == -1)
+ {
+ table.setRowSelectionInterval(0,0);
+ JScrollBar scrollbar = scrollpane.getVerticalScrollBar();
+ scrollbar.setValue(scrollbar.getMinimum());
+ }
+ if (table.getSelectedColumn() == -1)
+ {
+ table.setColumnSelectionInterval(0,0);
+ }
+ }
+ } //}}}
+
+ //{{{ TableSelectionListener class
+ private class TableSelectionListener implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent e)
+ {
+ int row = table.getSelectedRow();
+ if (row != -1)
+ {
+ Entry entry = pluginModel.getEntry(row);
+ pluginDetailPanel.setPlugin(entry);
+ }
+ }
+ } //}}}
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/MirrorList.java b/jEdit/org/gjt/sp/jedit/pluginmgr/MirrorList.java
index d46b441..182b8bd 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/MirrorList.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/MirrorList.java
@@ -1,189 +1,206 @@
-/*
- * MirrorList.java - Mirrors list
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Kris Kopicki
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-import org.xml.sax.XMLReader;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.IOUtilities;
-import org.gjt.sp.util.ProgressObserver;
-import org.gjt.sp.util.Log;
-
-/**
- * @version $Id: MirrorList.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class MirrorList
-{
- public List<Mirror> mirrors;
- /** The xml mirror list. */
- public String xml;
-
- //{{{ MirrorList constructor
- public MirrorList(boolean download, ProgressObserver observer) throws Exception
- {
- mirrors = new ArrayList<Mirror>();
-
- Mirror none = new Mirror();
- none.id = Mirror.NONE;
- none.description = none.location = none.country = none.continent = "";
- mirrors.add(none);
-
- String path = jEdit.getProperty("plugin-manager.mirror-url");
- MirrorListHandler handler = new MirrorListHandler(this,path);
- if (download)
- {
- Log.log(Log.NOTICE, this, "Loading mirror list from internet");
- downloadXml(path);
- }
- else
- {
- Log.log(Log.NOTICE, this, "Loading mirror list from cache");
- readXml();
- }
- observer.setValue(1);
- Reader in = new BufferedReader(new StringReader(xml));
-
- InputSource isrc = new InputSource(in);
- isrc.setSystemId("jedit.jar");
- XMLReader parser = XMLReaderFactory.createXMLReader();
- parser.setContentHandler(handler);
- parser.setDTDHandler(handler);
- parser.setEntityResolver(handler);
- parser.setErrorHandler(handler);
- parser.parse(isrc);
- observer.setValue(2);
- } //}}}
-
- //{{{ Private members
-
- //{{{ readXml() method
- /**
- * Read and store the mirror list xml.
- * @throws IOException exception if it was not possible to read the
- * xml or if the url was invalid
- */
- private void readXml() throws IOException
- {
- String settingsDirectory = jEdit.getSettingsDirectory();
- if(settingsDirectory == null)
- return;
-
- File mirrorList = new File(MiscUtilities.constructPath(
- settingsDirectory,"mirrorList.xml"));
- if(!mirrorList.exists())
- return;
- InputStream inputStream = null;
- try
- {
- inputStream = new BufferedInputStream(new FileInputStream(mirrorList));
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- IOUtilities.copyStream(null,inputStream,out, false);
- xml = out.toString();
- }
- finally
- {
- IOUtilities.closeQuietly(inputStream);
- }
- } //}}}
-
- //{{{ downloadXml() method
- /**
- * Read and store the mirror list xml.
- *
- * @param path the url
- * @throws IOException exception if it was not possible to read the
- * xml or if the url was invalid
- */
- private void downloadXml(String path) throws IOException
- {
- InputStream inputStream = null;
- try
- {
- inputStream = new URL(path).openStream();
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- IOUtilities.copyStream(null,inputStream,out, false);
- xml = out.toString();
- }
- finally
- {
- IOUtilities.closeQuietly(inputStream);
- }
- } //}}}
-
- //{{{ add() method
- void add(Mirror mirror)
- {
- mirrors.add(mirror);
- } //}}}
-
- //{{{ finished() method
- void finished()
- {
- Collections.sort(mirrors,new MirrorCompare());
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ Mirror class
- public static class Mirror
- {
- public static final String NONE = "NONE";
-
- public String id;
- public String description;
- public String location;
- public String country;
- public String continent;
- } //}}}
-
- //{{{ MirrorCompare class
- private class MirrorCompare implements Comparator<Mirror>
- {
- public int compare(Mirror m1,Mirror m2)
- {
- int result;
- if ((result = m1.continent.compareToIgnoreCase(m2.continent)) == 0)
- if ((result = m1.country.compareToIgnoreCase(m2.country)) == 0)
- if ((result = m1.location.compareToIgnoreCase(m2.location)) == 0)
- return m1.description.compareToIgnoreCase(m2.description);
- return result;
- }
-
- public boolean equals(Object obj)
- {
- return obj instanceof MirrorCompare;
- }
- } //}}}
-
- //}}}
-}
+/*
+ * MirrorList.java - Mirrors list
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Kris Kopicki
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+//{{{ Imports
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+import org.xml.sax.XMLReader;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.ProgressObserver;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * @version $Id: MirrorList.java 17940 2010-06-01 13:27:24Z kpouer $
+ */
+public class MirrorList
+{
+ //{{{ MirrorList constructor
+ public MirrorList(boolean download, ProgressObserver observer) throws Exception
+ {
+ mirrors = new ArrayList<Mirror>();
+
+ Mirror none = new Mirror();
+ none.id = Mirror.NONE;
+ none.description = none.location = none.country = none.continent = "";
+ mirrors.add(none);
+
+ String path = jEdit.getProperty("plugin-manager.mirror-url");
+ MirrorListHandler handler = new MirrorListHandler(this,path);
+ if (download)
+ {
+ Log.log(Log.NOTICE, this, "Loading mirror list from internet");
+ downloadXml(path);
+ }
+ else
+ {
+ Log.log(Log.NOTICE, this, "Loading mirror list from cache");
+ readXml();
+ }
+ if (xml == null)
+ return;
+ observer.setValue(1L);
+ Reader in = new BufferedReader(new StringReader(xml));
+
+ InputSource isrc = new InputSource(in);
+ isrc.setSystemId("jedit.jar");
+ XMLReader parser = XMLReaderFactory.createXMLReader();
+ parser.setContentHandler(handler);
+ parser.setDTDHandler(handler);
+ parser.setEntityResolver(handler);
+ parser.setErrorHandler(handler);
+ parser.parse(isrc);
+ observer.setValue(2L);
+ } //}}}
+
+ //{{{ getXml() method
+ public String getXml()
+ {
+ return xml;
+ } //}}}
+
+ //{{{ getMirrors() method
+ public List<Mirror> getMirrors()
+ {
+ return mirrors;
+ } //}}}
+
+ //{{{ Private members
+
+ /** The xml mirror list. */
+ private String xml;
+ private final List<Mirror> mirrors;
+
+
+ //{{{ readXml() method
+ /**
+ * Read and store the mirror list xml.
+ * @throws IOException exception if it was not possible to read the
+ * xml or if the url was invalid
+ */
+ private void readXml() throws IOException
+ {
+ String settingsDirectory = jEdit.getSettingsDirectory();
+ if(settingsDirectory == null)
+ return;
+
+ File mirrorList = new File(MiscUtilities.constructPath(
+ settingsDirectory,"mirrorList.xml"));
+ if(!mirrorList.exists())
+ return;
+ InputStream inputStream = null;
+ try
+ {
+ inputStream = new BufferedInputStream(new FileInputStream(mirrorList));
+
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ IOUtilities.copyStream(null,inputStream,out, false);
+ xml = out.toString();
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(inputStream);
+ }
+ } //}}}
+
+ //{{{ downloadXml() method
+ /**
+ * Read and store the mirror list xml.
+ *
+ * @param path the url
+ * @throws IOException exception if it was not possible to read the
+ * xml or if the url was invalid
+ */
+ private void downloadXml(String path) throws IOException
+ {
+ InputStream inputStream = null;
+ try
+ {
+ inputStream = new URL(path).openStream();
+
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ IOUtilities.copyStream(null,inputStream,out, false);
+ xml = out.toString();
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(inputStream);
+ }
+ } //}}}
+
+ //{{{ add() method
+ void add(Mirror mirror)
+ {
+ mirrors.add(mirror);
+ } //}}}
+
+ //{{{ finished() method
+ void finished()
+ {
+ Collections.sort(mirrors,new MirrorCompare());
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ Mirror class
+ public static class Mirror
+ {
+ public static final String NONE = "NONE";
+
+ public String id;
+ public String description;
+ public String location;
+ public String country;
+ public String continent;
+ } //}}}
+
+ //{{{ MirrorCompare class
+ private static class MirrorCompare implements Comparator<Mirror>
+ {
+ public int compare(Mirror m1,Mirror m2)
+ {
+ int result;
+ if ((result = m1.continent.compareToIgnoreCase(m2.continent)) == 0)
+ if ((result = m1.country.compareToIgnoreCase(m2.country)) == 0)
+ if ((result = m1.location.compareToIgnoreCase(m2.location)) == 0)
+ return m1.description.compareToIgnoreCase(m2.description);
+ return result;
+ }
+
+ public boolean equals(Object obj)
+ {
+ return obj instanceof MirrorCompare;
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/MirrorListHandler.java b/jEdit/org/gjt/sp/jedit/pluginmgr/MirrorListHandler.java
index 9b637d2..879c3e4 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/MirrorListHandler.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/MirrorListHandler.java
@@ -1,155 +1,155 @@
-/*
- * MirrorListHandler.java - XML handler for the mirrors list
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Kris Kopicki (parts copied from Slava Pestov :) )
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-import java.util.*;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.util.XMLUtilities;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.jedit.options.PluginOptions;
-
-/**
- * @version $Id: MirrorListHandler.java 12504 2008-04-22 23:12:43Z ezust $
- */
-class MirrorListHandler extends DefaultHandler
-{
- //{{{ Constructor
- MirrorListHandler(MirrorList mirrors, String path)
- {
- this.mirrors = mirrors;
- this.path = path;
- } //}}}
-
- //{{{ resolveEntity() method
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "mirrors.dtd",
- PluginOptions.class);
- } //}}}
-
- //{{{ characters() method
- public void characters(char[] c, int off, int len)
- {
- String tag = peekElement();
-
- if(tag == "DESCRIPTION")
- description.append(c, off, len);
- else if(tag == "LOCATION")
- location.append(c, off, len);
- else if(tag == "COUNTRY")
- country.append(c, off, len);
- else if(tag == "CONTINENT")
- continent.append(c, off, len);
- } //}}}
-
- //{{{ startElement() method
- public void startElement(String uri, String localName,
- String tag, Attributes attrs)
- {
- tag = pushElement(tag);
-
- if (tag.equals("MIRROR"))
- {
- mirror = new MirrorList.Mirror();
- id = attrs.getValue("ID");
- }
- } //}}}
-
- //{{{ endElement() method
- public void endElement(String uri, String localName, String tag)
- {
- popElement();
-
- if(tag.equals("MIRROR"))
- {
- mirror.id = id;
- mirror.description = description.toString();
- mirror.location = location.toString();
- mirror.country = country.toString();
- mirror.continent = continent.toString();
- mirrors.add(mirror);
- description.setLength(0);
- location.setLength(0);
- country.setLength(0);
- continent.setLength(0);
- }
- } //}}}
-
- //{{{ startDocument() method
- public void startDocument()
- {
- try
- {
- pushElement(null);
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, this, e);
- }
- } //}}}
-
- //{{{ endDocument() method
- public void endDocument()
- {
- mirrors.finished();
- } //}}}
-
- //{{{ Private members
-
- //{{{ Variables
- private String id;
- private final StringBuilder description = new StringBuilder();
- private final StringBuilder location = new StringBuilder();
- private final StringBuilder country = new StringBuilder();
- private final StringBuilder continent = new StringBuilder();
-
- private final MirrorList mirrors;
- private MirrorList.Mirror mirror;
-
- private final Stack<String> stateStack = new Stack<String>();
- private final String path;
- //}}}
-
- private String pushElement(String name)
- {
- name = name == null ? null : name.intern();
- stateStack.push(name);
- return name;
- }
-
- private String peekElement()
- {
- return stateStack.peek();
- }
-
- private void popElement()
- {
- stateStack.pop();
- }
-
- //}}}
-}
+/*
+ * MirrorListHandler.java - XML handler for the mirrors list
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Kris Kopicki (parts copied from Slava Pestov :) )
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+import java.util.*;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.util.XMLUtilities;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.jedit.options.PluginOptions;
+
+/**
+ * @version $Id: MirrorListHandler.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+class MirrorListHandler extends DefaultHandler
+{
+ //{{{ Constructor
+ MirrorListHandler(MirrorList mirrors, String path)
+ {
+ this.mirrors = mirrors;
+ this.path = path;
+ } //}}}
+
+ //{{{ resolveEntity() method
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "mirrors.dtd",
+ PluginOptions.class);
+ } //}}}
+
+ //{{{ characters() method
+ public void characters(char[] c, int off, int len)
+ {
+ String tag = peekElement();
+
+ if(tag == "DESCRIPTION")
+ description.append(c, off, len);
+ else if(tag == "LOCATION")
+ location.append(c, off, len);
+ else if(tag == "COUNTRY")
+ country.append(c, off, len);
+ else if(tag == "CONTINENT")
+ continent.append(c, off, len);
+ } //}}}
+
+ //{{{ startElement() method
+ public void startElement(String uri, String localName,
+ String tag, Attributes attrs)
+ {
+ tag = pushElement(tag);
+
+ if (tag.equals("MIRROR"))
+ {
+ mirror = new MirrorList.Mirror();
+ id = attrs.getValue("ID");
+ }
+ } //}}}
+
+ //{{{ endElement() method
+ public void endElement(String uri, String localName, String tag)
+ {
+ popElement();
+
+ if(tag.equals("MIRROR"))
+ {
+ mirror.id = id;
+ mirror.description = description.toString();
+ mirror.location = location.toString();
+ mirror.country = country.toString();
+ mirror.continent = continent.toString();
+ mirrors.add(mirror);
+ description.setLength(0);
+ location.setLength(0);
+ country.setLength(0);
+ continent.setLength(0);
+ }
+ } //}}}
+
+ //{{{ startDocument() method
+ public void startDocument()
+ {
+ try
+ {
+ pushElement(null);
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ } //}}}
+
+ //{{{ endDocument() method
+ public void endDocument()
+ {
+ mirrors.finished();
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Variables
+ private String id;
+ private final StringBuilder description = new StringBuilder();
+ private final StringBuilder location = new StringBuilder();
+ private final StringBuilder country = new StringBuilder();
+ private final StringBuilder continent = new StringBuilder();
+
+ private final MirrorList mirrors;
+ private MirrorList.Mirror mirror;
+
+ private final Stack<String> stateStack = new Stack<String>();
+ private final String path;
+ //}}}
+
+ private String pushElement(String name)
+ {
+ name = name == null ? null : name.intern();
+ stateStack.push(name);
+ return name;
+ }
+
+ private String peekElement()
+ {
+ return stateStack.peek();
+ }
+
+ private void popElement()
+ {
+ stateStack.pop();
+ }
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginDetailPanel.java b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginDetailPanel.java
index 7564359..ab55a94 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginDetailPanel.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginDetailPanel.java
@@ -1,93 +1,101 @@
-/*
- * PluginDetailPanel.java - Displays the details of a plugin
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-//{{{ Imports
-import java.awt.BorderLayout;
-
-import javax.swing.JEditorPane;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.pluginmgr.ManagePanel.Entry;
-//}}}
-
-/**
- * @author Matthieu Casanova
- *
- */
-class PluginDetailPanel extends JPanel
-{
- private final JEditorPane pluginDetail;
- private final JLabel title;
-
- /** The current entry. */
- private Entry entry;
-
- //{{{ PluginDetailPanel constructor
- PluginDetailPanel()
- {
- setLayout(new BorderLayout());
- pluginDetail = new JEditorPane();
- pluginDetail.setEditable(false);
- pluginDetail.setContentType("text/html");
- pluginDetail.setBackground(jEdit.getColorProperty("view.bgColor"));
- pluginDetail.setForeground(jEdit.getColorProperty("view.fgColor"));
- pluginDetail.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true);
- title = new JLabel();
- add(title, BorderLayout.NORTH);
- JScrollPane scroll = new JScrollPane(pluginDetail);
- scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
- add(scroll);
- } //}}}
-
- //{{{ setPlugin() method
- void setPlugin(Entry entry)
- {
- if (entry != this.entry)
- {
- if (entry.status.equals(Entry.LOADED))
- {
- title.setText("<html><b>"+entry.name+"</b></html>");
- StringBuilder builder = new StringBuilder();
-
- builder.append("<b>Version</b>: ").append(entry.version).append("<br/>");
- builder.append("<b>Author</b>: ").append(entry.author).append("<br/>");
- if (entry.description != null)
- {
- builder.append("<br/>").append(entry.description);
- }
- pluginDetail.setText(builder.toString());
- }
- else
- {
- title.setText("<html><b>"+entry.jar+"</b></html>");
- pluginDetail.setText(null);
- }
- this.entry = entry;
- }
- } //}}}
-
-}
+/*
+ * PluginDetailPanel.java - Displays the details of a plugin
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+//{{{ Imports
+import java.awt.BorderLayout;
+
+import javax.swing.JEditorPane;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.pluginmgr.ManagePanel.Entry;
+//}}}
+
+/**
+ * @author Matthieu Casanova
+ *
+ */
+class PluginDetailPanel extends JPanel
+{
+ private final JEditorPane pluginDetail;
+ private final JLabel title;
+
+ /** The current entry. */
+ private Entry entry;
+
+ //{{{ PluginDetailPanel constructor
+ PluginDetailPanel()
+ {
+ setLayout(new BorderLayout());
+ pluginDetail = new JEditorPane();
+ pluginDetail.setEditable(false);
+ pluginDetail.setContentType("text/html");
+ pluginDetail.setBackground(jEdit.getColorProperty("view.bgColor"));
+ pluginDetail.setForeground(jEdit.getColorProperty("view.fgColor"));
+ pluginDetail.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true);
+ title = new JLabel();
+ add(title, BorderLayout.NORTH);
+ JScrollPane scroll = new JScrollPane(pluginDetail);
+ scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+ add(scroll);
+ } //}}}
+
+ //{{{ setPlugin() method
+ void setPlugin(Entry entry)
+ {
+ if (entry != this.entry)
+ {
+ if (entry.status.equals(Entry.LOADED))
+ {
+ if (entry.name == null)
+ title.setText("<html><b>"+entry.jar+"</b></html>");
+ else
+ title.setText("<html><b>"+entry.name+"</b></html>");
+
+ StringBuilder builder = new StringBuilder();
+
+ // <br> instead of <br/> because Sun's Java 5 HTML parser can't digest them.
+ // No problem on Sun's Java 6 JVM.
+ if (entry.version != null)
+ builder.append("<b>Version</b>: ").append(entry.version).append("<br>");
+ if (entry.author != null)
+ builder.append("<b>Author</b>: ").append(entry.author).append("<br>");
+ if (entry.description != null)
+ {
+ builder.append("<br>").append(entry.description);
+ }
+ pluginDetail.setText(builder.toString());
+ }
+ else
+ {
+ title.setText("<html><b>"+entry.jar+"</b></html>");
+ pluginDetail.setText(null);
+ }
+ this.entry = entry;
+ }
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginList.java b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginList.java
index ae8e06a..86167ae 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginList.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginList.java
@@ -1,569 +1,567 @@
-/*
- * PluginList.java - Plugin list downloaded from server
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-//{{{ Imports
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-import java.util.zip.GZIPInputStream;
-import org.xml.sax.XMLReader;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.XMLReaderFactory;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-import org.gjt.sp.util.WorkRequest;
-import org.gjt.sp.util.IOUtilities;
-import org.gjt.sp.jedit.*;
-//}}}
-
-
-/**
- * Plugin list downloaded from server.
- * @since jEdit 3.2pre2
- * @version $Id: PluginList.java 12504 2008-04-22 23:12:43Z ezust $
- */
-class PluginList
-{
- /**
- * Magic numbers used for auto-detecting GZIP files.
- */
- public static final int GZIP_MAGIC_1 = 0x1f;
- public static final int GZIP_MAGIC_2 = 0x8b;
-
- final List<Plugin> plugins = new ArrayList<Plugin>();
- final Map<String, Plugin> pluginHash = new HashMap<String, Plugin>();
- final List<PluginSet> pluginSets = new ArrayList<PluginSet>();
-
- /**
- * The mirror id.
- * @since jEdit 4.3pre3
- */
- private final String id;
- private String cachedURL;
- private WorkRequest workRequest;
- String gzipURL;
- //{{{ PluginList constructor
- PluginList(WorkRequest workRequest)
- {
- id = jEdit.getProperty("plugin-manager.mirror.id");
- this.workRequest = workRequest;
- readPluginList(true);
- }
-
- void readPluginList(boolean allowRetry)
- {
- gzipURL = jEdit.getProperty("plugin-manager.export-url");
- if (!id.equals(MirrorList.Mirror.NONE))
- gzipURL += "?mirror="+id;
- String path = null;
- if (jEdit.getSettingsDirectory() == null)
- {
- cachedURL = gzipURL;
- }
- else
- {
- path = jEdit.getSettingsDirectory() + File.separator + "pluginMgr-Cached.xml.gz";
- cachedURL = "file:///" + path;
- }
- boolean downloadIt = !id.equals(jEdit.getProperty("plugin-manager.mirror.cached-id"));
- if (path != null)
- {
- try
- {
-
- File f = new File(path);
- if (!f.canRead()) downloadIt = true;
- long currentTime = System.currentTimeMillis();
- long age = currentTime - f.lastModified();
- /* By default only download plugin lists every 5 minutes */
- long interval = jEdit.getIntegerProperty("plugin-manager.list-cache.minutes", 5) * 60 * 1000;
- if (age > interval)
- {
- Log.log(Log.MESSAGE, this, "PluginList cached copy too old. Downloading from mirror. ");
- downloadIt = true;
- }
- }
- catch (Exception e)
- {
- Log.log(Log.MESSAGE, this, "No cached copy. Downloading from mirror. ");
- downloadIt = true;
- }
- }
- if (downloadIt && cachedURL != gzipURL)
- {
- downloadPluginList();
- }
- InputStream in = null, inputStream = null;
- try
- {
- if (cachedURL != gzipURL)
- Log.log(Log.MESSAGE, this, "Using cached pluginlist");
- inputStream = new URL(cachedURL).openStream();
- XMLReader parser = XMLReaderFactory.createXMLReader();
- PluginListHandler handler = new PluginListHandler(this, cachedURL);
- in = new BufferedInputStream(inputStream);
- if(in.markSupported())
- {
- in.mark(2);
- int b1 = in.read();
- int b2 = in.read();
- in.reset();
-
- if(b1 == GZIP_MAGIC_1 && b2 == GZIP_MAGIC_2)
- in = new GZIPInputStream(in);
- }
- InputSource isrc = new InputSource(new InputStreamReader(in,"UTF8"));
- isrc.setSystemId("jedit.jar");
- parser.setContentHandler(handler);
- parser.setDTDHandler(handler);
- parser.setEntityResolver(handler);
- parser.setErrorHandler(handler);
- parser.parse(isrc);
-
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, this, "readpluginlist: error", e);
- if (cachedURL.startsWith("file:///"))
- {
- Log.log(Log.DEBUG, this, "Unable to read plugin list, deleting cached file and try again");
- new File(cachedURL.substring(8)).delete();
- if (allowRetry)
- {
- plugins.clear();
- pluginHash.clear();
- pluginSets.clear();
- readPluginList(false);
- }
- }
- }
- finally
- {
- IOUtilities.closeQuietly(in);
- IOUtilities.closeQuietly(inputStream);
- }
-
- }
-
- /** Caches it locally */
- void downloadPluginList()
- {
- BufferedInputStream is = null;
- BufferedOutputStream out = null;
- try
- {
-
- workRequest.setStatus(jEdit.getProperty("plugin-manager.list-download"));
- InputStream inputStream = new URL(gzipURL).openStream();
- String fileName = cachedURL.replaceFirst("file:///", "");
- out = new BufferedOutputStream(new FileOutputStream(fileName));
- long start = System.currentTimeMillis();
- is = new BufferedInputStream(inputStream);
- IOUtilities.copyStream(4096, null, is, out, false);
- jEdit.setProperty("plugin-manager.mirror.cached-id", id);
- Log.log(Log.MESSAGE, this, "Updated cached pluginlist " + (System.currentTimeMillis() - start));
- }
- catch (Exception e)
- {
- Log.log (Log.ERROR, this, "CacheRemotePluginList: error", e);
- }
- finally
- {
- IOUtilities.closeQuietly(out);
- IOUtilities.closeQuietly(is);
- }
- }
-
- //{{{ addPlugin() method
- void addPlugin(Plugin plugin)
- {
- plugin.checkIfInstalled();
- plugins.add(plugin);
- pluginHash.put(plugin.name,plugin);
- } //}}}
-
- //{{{ addPluginSet() method
- void addPluginSet(PluginSet set)
- {
- pluginSets.add(set);
- } //}}}
-
- //{{{ finished() method
- void finished()
- {
- // after the entire list is loaded, fill out plugin field
- // in dependencies
- for(int i = 0; i < plugins.size(); i++)
- {
- Plugin plugin = plugins.get(i);
- for(int j = 0; j < plugin.branches.size(); j++)
- {
- Branch branch = plugin.branches.get(j);
- for(int k = 0; k < branch.deps.size(); k++)
- {
- Dependency dep = branch.deps.get(k);
- if(dep.what.equals("plugin"))
- dep.plugin = pluginHash.get(dep.pluginName);
- }
- }
- }
- } //}}}
-
- //{{{ dump() method
- void dump()
- {
- for(int i = 0; i < plugins.size(); i++)
- {
- System.err.println(plugins.get(i));
- System.err.println();
- }
- } //}}}
-
- //{{{ getMirrorId() method
- /**
- * Returns the mirror ID.
- *
- * @return the mirror ID
- * @since jEdit 4.3pre3
- */
- String getMirrorId()
- {
- return id;
- } //}}}
-
- //{{{ PluginSet class
- static class PluginSet
- {
- String name;
- String description;
- final List<String> plugins = new ArrayList<String>();
-
- public String toString()
- {
- return plugins.toString();
- }
- } //}}}
-
- //{{{ Plugin class
- public static class Plugin
- {
- String jar;
- String name;
- String description;
- String author;
- final List<Branch> branches = new ArrayList<Branch>();
- //String installed;
- //String installedVersion;
-
- void checkIfInstalled()
- {
- /* // check if the plugin is already installed.
- // this is a bit of hack
- PluginJAR[] jars = jEdit.getPluginJARs();
- for(int i = 0; i < jars.length; i++)
- {
- String path = jars[i].getPath();
- if(!new File(path).exists())
- continue;
-
- if(MiscUtilities.getFileName(path).equals(jar))
- {
- installed = path;
-
- EditPlugin plugin = jars[i].getPlugin();
- if(plugin != null)
- {
- installedVersion = jEdit.getProperty(
- "plugin." + plugin.getClassName()
- + ".version");
- }
- break;
- }
- }
-
- String[] notLoaded = jEdit.getNotLoadedPluginJARs();
- for(int i = 0; i < notLoaded.length; i++)
- {
- String path = notLoaded[i];
-
- if(MiscUtilities.getFileName(path).equals(jar))
- {
- installed = path;
- break;
- }
- } */
- }
-
- String getInstalledVersion()
- {
- PluginJAR[] jars = jEdit.getPluginJARs();
- for(int i = 0; i < jars.length; i++)
- {
- String path = jars[i].getPath();
-
- if(MiscUtilities.getFileName(path).equals(jar))
- {
- EditPlugin plugin = jars[i].getPlugin();
- if(plugin != null)
- {
- return jEdit.getProperty(
- "plugin." + plugin.getClassName()
- + ".version");
- }
- else
- return null;
- }
- }
-
- return null;
- }
-
- String getInstalledPath()
- {
- PluginJAR[] jars = jEdit.getPluginJARs();
- for(int i = 0; i < jars.length; i++)
- {
- String path = jars[i].getPath();
-
- if(MiscUtilities.getFileName(path).equals(jar))
- return path;
- }
-
- return null;
- }
-
- /**
- * Find the first branch compatible with the running jEdit release.
- */
- Branch getCompatibleBranch()
- {
- for(int i = 0; i < branches.size(); i++)
- {
- Branch branch = branches.get(i);
- if(branch.canSatisfyDependencies())
- return branch;
- }
-
- return null;
- }
-
- boolean canBeInstalled()
- {
- Branch branch = getCompatibleBranch();
- return branch != null && !branch.obsolete
- && branch.canSatisfyDependencies();
- }
-
- void install(Roster roster, String installDirectory, boolean downloadSource)
- {
- String installed = getInstalledPath();
-
- Branch branch = getCompatibleBranch();
- if(branch.obsolete)
- {
- if(installed != null)
- roster.addRemove(installed);
- return;
- }
-
- //branch.satisfyDependencies(roster,installDirectory,
- // downloadSource);
-
- if(installed != null)
- {
- installDirectory = MiscUtilities.getParentOfPath(
- installed);
- }
-
- roster.addInstall(
- installed,
- downloadSource ? branch.downloadSource : branch.download,
- installDirectory,
- downloadSource ? branch.downloadSourceSize : branch.downloadSize);
-
- }
-
- public String toString()
- {
- return name;
- }
- } //}}}
-
- //{{{ Branch class
- static class Branch
- {
- String version;
- String date;
- int downloadSize;
- String download;
- int downloadSourceSize;
- String downloadSource;
- boolean obsolete;
- final List<Dependency> deps = new ArrayList<Dependency>();
-
- boolean canSatisfyDependencies()
- {
- for(int i = 0; i < deps.size(); i++)
- {
- Dependency dep = deps.get(i);
- if(!dep.canSatisfy())
- return false;
- }
-
- return true;
- }
-
- void satisfyDependencies(Roster roster, String installDirectory,
- boolean downloadSource)
- {
- for(int i = 0; i < deps.size(); i++)
- {
- Dependency dep = deps.get(i);
- dep.satisfy(roster,installDirectory,downloadSource);
- }
- }
-
- public String toString()
- {
- return "[version=" + version + ",download=" + download
- + ",obsolete=" + obsolete + ",deps=" + deps + ']';
- }
- } //}}}
-
- //{{{ Dependency class
- static class Dependency
- {
- final String what;
- final String from;
- final String to;
- // only used if what is "plugin"
- final String pluginName;
- Plugin plugin;
-
- Dependency(String what, String from, String to, String pluginName)
- {
- this.what = what;
- this.from = from;
- this.to = to;
- this.pluginName = pluginName;
- }
-
- boolean isSatisfied()
- {
- if(what.equals("plugin"))
- {
- for(int i = 0; i < plugin.branches.size(); i++)
- {
- String installedVersion = plugin.getInstalledVersion();
- if(installedVersion != null
- &&
- (from == null || StandardUtilities.compareStrings(
- installedVersion,from,false) >= 0)
- &&
- (to == null || StandardUtilities.compareStrings(
- installedVersion,to,false) <= 0))
- {
- return true;
- }
- }
-
- return false;
- }
- else if(what.equals("jdk"))
- {
- String javaVersion = System.getProperty("java.version").substring(0,3);
-
- if((from == null || StandardUtilities.compareStrings(
- javaVersion,from,false) >= 0)
- &&
- (to == null || StandardUtilities.compareStrings(
- javaVersion,to,false) <= 0))
- return true;
- else
- return false;
- }
- else if(what.equals("jedit"))
- {
- String build = jEdit.getBuild();
-
- if((from == null || StandardUtilities.compareStrings(
- build,from,false) >= 0)
- &&
- (to == null || StandardUtilities.compareStrings(
- build,to,false) <= 0))
- return true;
- else
- return false;
- }
- else
- {
- Log.log(Log.ERROR,this,"Invalid dependency: " + what);
- return false;
- }
- }
-
- boolean canSatisfy()
- {
- if(isSatisfied())
- return true;
- if (what.equals("plugin"))
- return plugin.canBeInstalled();
- return false;
- }
-
- void satisfy(Roster roster, String installDirectory,
- boolean downloadSource)
- {
- if(what.equals("plugin"))
- {
- String installedVersion = plugin.getInstalledVersion();
- for(int i = 0; i < plugin.branches.size(); i++)
- {
- Branch branch = plugin.branches.get(i);
- if((installedVersion == null
- ||
- StandardUtilities.compareStrings(
- installedVersion,branch.version,false) < 0)
- &&
- (from == null || StandardUtilities.compareStrings(
- branch.version,from,false) >= 0)
- &&
- (to == null || StandardUtilities.compareStrings(
- branch.version,to,false) <= 0))
- {
- plugin.install(roster,installDirectory,
- downloadSource);
- return;
- }
- }
- }
- }
-
- public String toString()
- {
- return "[what=" + what + ",from=" + from
- + ",to=" + to + ",plugin=" + plugin + ']';
- }
- } //}}}
-}
+/*
+ * PluginList.java - Plugin list downloaded from server
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+//{{{ Imports
+import java.io.*;
+import java.net.URL;
+import java.util.*;
+import java.util.zip.GZIPInputStream;
+
+import org.gjt.sp.util.*;
+import org.xml.sax.XMLReader;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.XMLReaderFactory;
+import org.gjt.sp.jedit.*;
+//}}}
+
+
+/**
+ * Plugin list downloaded from server.
+ * @since jEdit 3.2pre2
+ * @version $Id: PluginList.java 17948 2010-06-01 21:18:14Z kpouer $
+ */
+class PluginList
+{
+ /**
+ * Magic numbers used for auto-detecting GZIP files.
+ */
+ public static final int GZIP_MAGIC_1 = 0x1f;
+ public static final int GZIP_MAGIC_2 = 0x8b;
+ public static final long MILLISECONDS_PER_MINUTE = 60L * 1000;
+
+ final List<Plugin> plugins = new ArrayList<Plugin>();
+ final Map<String, Plugin> pluginHash = new HashMap<String, Plugin>();
+ final List<PluginSet> pluginSets = new ArrayList<PluginSet>();
+
+ /**
+ * The mirror id.
+ * @since jEdit 4.3pre3
+ */
+ private final String id;
+ private String cachedURL;
+ private final Task task;
+ String gzipURL;
+ //{{{ PluginList constructor
+ PluginList(Task task)
+ {
+ id = jEdit.getProperty("plugin-manager.mirror.id");
+ this.task = task;
+ readPluginList(true);
+ }
+
+ void readPluginList(boolean allowRetry)
+ {
+ gzipURL = jEdit.getProperty("plugin-manager.export-url");
+ if (!id.equals(MirrorList.Mirror.NONE))
+ gzipURL += "?mirror="+id;
+ String path = null;
+ if (jEdit.getSettingsDirectory() == null)
+ {
+ cachedURL = gzipURL;
+ }
+ else
+ {
+ path = jEdit.getSettingsDirectory() + File.separator + "pluginMgr-Cached.xml.gz";
+ cachedURL = "file:///" + path;
+ }
+ boolean downloadIt = !id.equals(jEdit.getProperty("plugin-manager.mirror.cached-id"));
+ if (path != null)
+ {
+ try
+ {
+
+ File f = new File(path);
+ if (!f.canRead()) downloadIt = true;
+ long currentTime = System.currentTimeMillis();
+ long age = currentTime - f.lastModified();
+ /* By default only download plugin lists every 5 minutes */
+ long interval = jEdit.getIntegerProperty("plugin-manager.list-cache.minutes", 5) * MILLISECONDS_PER_MINUTE;
+ if (age > interval)
+ {
+ Log.log(Log.MESSAGE, this, "PluginList cached copy too old. Downloading from mirror. ");
+ downloadIt = true;
+ }
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.MESSAGE, this, "No cached copy. Downloading from mirror. ");
+ downloadIt = true;
+ }
+ }
+ if (downloadIt && cachedURL != gzipURL)
+ {
+ downloadPluginList();
+ }
+ InputStream in = null, inputStream = null;
+ try
+ {
+ if (cachedURL != gzipURL)
+ Log.log(Log.MESSAGE, this, "Using cached pluginlist");
+ inputStream = new URL(cachedURL).openStream();
+ XMLReader parser = XMLReaderFactory.createXMLReader();
+ PluginListHandler handler = new PluginListHandler(this, cachedURL);
+ in = new BufferedInputStream(inputStream);
+ if(in.markSupported())
+ {
+ in.mark(2);
+ int b1 = in.read();
+ int b2 = in.read();
+ in.reset();
+
+ if(b1 == GZIP_MAGIC_1 && b2 == GZIP_MAGIC_2)
+ in = new GZIPInputStream(in);
+ }
+ InputSource isrc = new InputSource(new InputStreamReader(in,"UTF8"));
+ isrc.setSystemId("jedit.jar");
+ parser.setContentHandler(handler);
+ parser.setDTDHandler(handler);
+ parser.setEntityResolver(handler);
+ parser.setErrorHandler(handler);
+ parser.parse(isrc);
+
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, this, "readpluginlist: error", e);
+ if (cachedURL.startsWith("file:///"))
+ {
+ Log.log(Log.DEBUG, this, "Unable to read plugin list, deleting cached file and try again");
+ new File(cachedURL.substring(8)).delete();
+ if (allowRetry)
+ {
+ plugins.clear();
+ pluginHash.clear();
+ pluginSets.clear();
+ readPluginList(false);
+ }
+ }
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(in);
+ IOUtilities.closeQuietly(inputStream);
+ }
+
+ }
+
+ /** Caches it locally */
+ void downloadPluginList()
+ {
+ BufferedInputStream is = null;
+ BufferedOutputStream out = null;
+ try
+ {
+
+ task.setStatus(jEdit.getProperty("plugin-manager.list-download"));
+ InputStream inputStream = new URL(gzipURL).openStream();
+ String fileName = cachedURL.replaceFirst("file:///", "");
+ out = new BufferedOutputStream(new FileOutputStream(fileName));
+ long start = System.currentTimeMillis();
+ is = new BufferedInputStream(inputStream);
+ IOUtilities.copyStream(4096, null, is, out, false);
+ jEdit.setProperty("plugin-manager.mirror.cached-id", id);
+ Log.log(Log.MESSAGE, this, "Updated cached pluginlist " + (System.currentTimeMillis() - start));
+ }
+ catch (Exception e)
+ {
+ Log.log (Log.ERROR, this, "CacheRemotePluginList: error", e);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(out);
+ IOUtilities.closeQuietly(is);
+ }
+ }
+
+ //{{{ addPlugin() method
+ void addPlugin(Plugin plugin)
+ {
+ plugin.checkIfInstalled();
+ plugins.add(plugin);
+ pluginHash.put(plugin.name,plugin);
+ } //}}}
+
+ //{{{ addPluginSet() method
+ void addPluginSet(PluginSet set)
+ {
+ pluginSets.add(set);
+ } //}}}
+
+ //{{{ finished() method
+ void finished()
+ {
+ // after the entire list is loaded, fill out plugin field
+ // in dependencies
+ for(int i = 0; i < plugins.size(); i++)
+ {
+ Plugin plugin = plugins.get(i);
+ for(int j = 0; j < plugin.branches.size(); j++)
+ {
+ Branch branch = plugin.branches.get(j);
+ for(int k = 0; k < branch.deps.size(); k++)
+ {
+ Dependency dep = branch.deps.get(k);
+ if(dep.what.equals("plugin"))
+ dep.plugin = pluginHash.get(dep.pluginName);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ dump() method
+ void dump()
+ {
+ for(int i = 0; i < plugins.size(); i++)
+ {
+ System.err.println(plugins.get(i));
+ System.err.println();
+ }
+ } //}}}
+
+ //{{{ getMirrorId() method
+ /**
+ * Returns the mirror ID.
+ *
+ * @return the mirror ID
+ * @since jEdit 4.3pre3
+ */
+ String getMirrorId()
+ {
+ return id;
+ } //}}}
+
+ //{{{ PluginSet class
+ static class PluginSet
+ {
+ String name;
+ final List<String> plugins = new ArrayList<String>();
+
+ public String toString()
+ {
+ return plugins.toString();
+ }
+ } //}}}
+
+ //{{{ Plugin class
+ public static class Plugin
+ {
+ String jar;
+ String name;
+ String description;
+ String author;
+ final List<Branch> branches = new ArrayList<Branch>();
+ //String installed;
+ //String installedVersion;
+
+ void checkIfInstalled()
+ {
+ /* // check if the plugin is already installed.
+ // this is a bit of hack
+ PluginJAR[] jars = jEdit.getPluginJARs();
+ for(int i = 0; i < jars.length; i++)
+ {
+ String path = jars[i].getPath();
+ if(!new File(path).exists())
+ continue;
+
+ if(MiscUtilities.getFileName(path).equals(jar))
+ {
+ installed = path;
+
+ EditPlugin plugin = jars[i].getPlugin();
+ if(plugin != null)
+ {
+ installedVersion = jEdit.getProperty(
+ "plugin." + plugin.getClassName()
+ + ".version");
+ }
+ break;
+ }
+ }
+
+ String[] notLoaded = jEdit.getNotLoadedPluginJARs();
+ for(int i = 0; i < notLoaded.length; i++)
+ {
+ String path = notLoaded[i];
+
+ if(MiscUtilities.getFileName(path).equals(jar))
+ {
+ installed = path;
+ break;
+ }
+ } */
+ }
+
+ String getInstalledVersion()
+ {
+ PluginJAR[] jars = jEdit.getPluginJARs();
+ for(int i = 0; i < jars.length; i++)
+ {
+ String path = jars[i].getPath();
+
+ if(MiscUtilities.getFileName(path).equals(jar))
+ {
+ EditPlugin plugin = jars[i].getPlugin();
+ if(plugin != null)
+ {
+ return jEdit.getProperty(
+ "plugin." + plugin.getClassName()
+ + ".version");
+ }
+ else
+ return null;
+ }
+ }
+
+ return null;
+ }
+
+ String getInstalledPath()
+ {
+ PluginJAR[] jars = jEdit.getPluginJARs();
+ for(int i = 0; i < jars.length; i++)
+ {
+ String path = jars[i].getPath();
+
+ if(MiscUtilities.getFileName(path).equals(jar))
+ return path;
+ }
+
+ return null;
+ }
+
+ /**
+ * Find the first branch compatible with the running jEdit release.
+ */
+ Branch getCompatibleBranch()
+ {
+ for(int i = 0; i < branches.size(); i++)
+ {
+ Branch branch = branches.get(i);
+ if(branch.canSatisfyDependencies())
+ return branch;
+ }
+
+ return null;
+ }
+
+ boolean canBeInstalled()
+ {
+ Branch branch = getCompatibleBranch();
+ return branch != null && !branch.obsolete
+ && branch.canSatisfyDependencies();
+ }
+
+ void install(Roster roster, String installDirectory, boolean downloadSource)
+ {
+ String installed = getInstalledPath();
+
+ Branch branch = getCompatibleBranch();
+ if(branch.obsolete)
+ {
+ if(installed != null)
+ roster.addRemove(installed);
+ return;
+ }
+
+ //branch.satisfyDependencies(roster,installDirectory,
+ // downloadSource);
+
+ if(installed != null)
+ {
+ installDirectory = MiscUtilities.getParentOfPath(
+ installed);
+ }
+
+ roster.addInstall(
+ installed,
+ downloadSource ? branch.downloadSource : branch.download,
+ installDirectory,
+ downloadSource ? branch.downloadSourceSize : branch.downloadSize);
+
+ }
+
+ public String toString()
+ {
+ return name;
+ }
+ } //}}}
+
+ //{{{ Branch class
+ static class Branch
+ {
+ String version;
+ String date;
+ int downloadSize;
+ String download;
+ int downloadSourceSize;
+ String downloadSource;
+ boolean obsolete;
+ final List<Dependency> deps = new ArrayList<Dependency>();
+
+ boolean canSatisfyDependencies()
+ {
+ for(int i = 0; i < deps.size(); i++)
+ {
+ Dependency dep = deps.get(i);
+ if(!dep.canSatisfy())
+ return false;
+ }
+
+ return true;
+ }
+
+ void satisfyDependencies(Roster roster, String installDirectory,
+ boolean downloadSource)
+ {
+ for(int i = 0; i < deps.size(); i++)
+ {
+ Dependency dep = deps.get(i);
+ dep.satisfy(roster,installDirectory,downloadSource);
+ }
+ }
+
+ public String toString()
+ {
+ return "[version=" + version + ",download=" + download
+ + ",obsolete=" + obsolete + ",deps=" + deps + ']';
+ }
+ } //}}}
+
+ //{{{ Dependency class
+ static class Dependency
+ {
+ final String what;
+ final String from;
+ final String to;
+ // only used if what is "plugin"
+ final String pluginName;
+ Plugin plugin;
+
+ Dependency(String what, String from, String to, String pluginName)
+ {
+ this.what = what;
+ this.from = from;
+ this.to = to;
+ this.pluginName = pluginName;
+ }
+
+ boolean isSatisfied()
+ {
+ if(what.equals("plugin"))
+ {
+ for(int i = 0; i < plugin.branches.size(); i++)
+ {
+ String installedVersion = plugin.getInstalledVersion();
+ if(installedVersion != null
+ &&
+ (from == null || StandardUtilities.compareStrings(
+ installedVersion,from,false) >= 0)
+ &&
+ (to == null || StandardUtilities.compareStrings(
+ installedVersion,to,false) <= 0))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ else if(what.equals("jdk"))
+ {
+ String javaVersion = System.getProperty("java.version").substring(0,3);
+
+ if((from == null || StandardUtilities.compareStrings(
+ javaVersion,from,false) >= 0)
+ &&
+ (to == null || StandardUtilities.compareStrings(
+ javaVersion,to,false) <= 0))
+ return true;
+ else
+ return false;
+ }
+ else if(what.equals("jedit"))
+ {
+ String build = jEdit.getBuild();
+
+ if((from == null || StandardUtilities.compareStrings(
+ build,from,false) >= 0)
+ &&
+ (to == null || StandardUtilities.compareStrings(
+ build,to,false) <= 0))
+ return true;
+ else
+ return false;
+ }
+ else
+ {
+ Log.log(Log.ERROR,this,"Invalid dependency: " + what);
+ return false;
+ }
+ }
+
+ boolean canSatisfy()
+ {
+ if(isSatisfied())
+ return true;
+ if (what.equals("plugin"))
+ return plugin.canBeInstalled();
+ return false;
+ }
+
+ void satisfy(Roster roster, String installDirectory,
+ boolean downloadSource)
+ {
+ if(what.equals("plugin"))
+ {
+ String installedVersion = plugin.getInstalledVersion();
+ for(int i = 0; i < plugin.branches.size(); i++)
+ {
+ Branch branch = plugin.branches.get(i);
+ if((installedVersion == null
+ ||
+ StandardUtilities.compareStrings(
+ installedVersion,branch.version,false) < 0)
+ &&
+ (from == null || StandardUtilities.compareStrings(
+ branch.version,from,false) >= 0)
+ &&
+ (to == null || StandardUtilities.compareStrings(
+ branch.version,to,false) <= 0))
+ {
+ plugin.install(roster,installDirectory,
+ downloadSource);
+ return;
+ }
+ }
+ }
+ }
+
+ public String toString()
+ {
+ return "[what=" + what + ",from=" + from
+ + ",to=" + to + ",plugin=" + plugin + ']';
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginListHandler.java b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginListHandler.java
index 1a93ce2..74eaed5 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginListHandler.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginListHandler.java
@@ -1,277 +1,277 @@
-/*
- * PluginListHandler.java - XML handler for the plugin list
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-//{{{ Imports
-import java.util.Stack;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-//}}}
-
-/**
- * @version $Id: PluginListHandler.java 12504 2008-04-22 23:12:43Z ezust $
- */
-class PluginListHandler extends DefaultHandler
-{
- //{{{ PluginListHandler constructor
- PluginListHandler(PluginList pluginList, String path)
- {
- this.pluginList = pluginList;
- this.path = path;
-
- author = new StringBuilder();
- description = new StringBuilder();
- pluginSetEntry = new StringBuilder();
- download = new StringBuilder();
- downloadSource = new StringBuilder();
- } //}}}
-
- //{{{ resolveEntity() method
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "plugins.dtd", getClass());
- } //}}}
-
- //{{{ attribute() method
- public void attribute(String aname, String value, boolean isSpecified)
- {
- if(aname == "NAME")
- name = value;
- else if(aname == "JAR")
- jar = value;
- else if(aname == "VERSION")
- version = value;
- else if(aname == "DATE")
- date = value;
- else if(aname == "OBSOLETE")
- obsolete = ("TRUE".equals(value));
- else if(aname == "WHAT")
- depWhat = value;
- else if(aname == "FROM")
- depFrom = value;
- else if(aname == "TO")
- depTo = value;
- else if(aname == "PLUGIN")
- depPlugin = value;
- else if(aname == "SIZE")
- {
- size = Integer.parseInt(value);
- if(size == 0)
- Log.log(Log.WARNING,this,"SIZE = 0");
- }
- } //}}}
-
- //{{{ characters() method
- public void characters(char[] c, int off, int len)
- {
- String tag = peekElement();
-
- if(tag.equals("DESCRIPTION"))
- {
- description.append(c, off, len);
- }
- else if(tag.equals("PLUGIN_SET_ENTRY"))
- pluginSetEntry.append(c, off, len);
- else if(tag.equals("AUTHOR"))
- {
- if(author.length() != 0)
- author.append(", ");
- author.append(c, off, len);
- }
- else if(tag.equals("DOWNLOAD"))
- download.append(c, off, len);
- else if(tag.equals("DOWNLOAD_SOURCE"))
- downloadSource.append(c, off, len);
- } //}}}
-
- //{{{ startElement() method
- public void startElement(String uri, String localName,
- String tag, Attributes attrs)
- {
- for (int i = 0; i < attrs.getLength(); i++)
- {
- String aName = attrs.getQName(i);
- String aValue = attrs.getValue(i);
- attribute(aName, aValue, true);
- }
-
-
- tag = pushElement(tag);
-
- if(tag.equals("PLUGIN_SET"))
- {
- description.setLength(0);
- pluginSet = new PluginList.PluginSet();
- pluginSet.name = name;
- }
- else if(tag.equals("PLUGIN"))
- {
- description.setLength(0);
- author.setLength(0);
- branch = null;
- plugin = new PluginList.Plugin();
- }
- else if(tag.equals("BRANCH"))
- {
- download.setLength(0);
- branch = new PluginList.Branch();
- }
- else if(tag.equals("DOWNLOAD"))
- downloadSize = size;
- else if(tag.equals("DOWNLOAD_SOURCE"))
- downloadSourceSize = size;
- } //}}}
-
- //{{{ endElement() method
- public void endElement(String uri, String localName, String tag)
- {
- popElement();
-
- if(tag.equals("PLUGIN_SET"))
- {
- pluginList.addPluginSet(pluginSet);
- pluginSet = null;
- pluginSetEntry.setLength(0);
- }
- else if(tag.equals("PLUGIN_SET_ENTRY"))
- {
- pluginSet.plugins.add(pluginSetEntry.toString());
- pluginSetEntry.setLength(0);
- }
- else if(tag.equals("PLUGIN"))
- {
- plugin.jar = jar;
- plugin.name = name;
- plugin.author = author.toString();
- plugin.description = description.toString();
- pluginList.addPlugin(plugin);
- jar = null;
- name = null;
- author.setLength(0);
- description.setLength(0);
- }
- else if(tag.equals("BRANCH"))
- {
- branch.version = version;
- branch.date = date;
- branch.download = download.toString();
- branch.downloadSize = downloadSize;
- branch.downloadSource = downloadSource.toString();
- branch.downloadSourceSize = downloadSourceSize;
- branch.obsolete = obsolete;
- plugin.branches.add(branch);
- version = null;
- download.setLength(0);
- downloadSource.setLength(0);
- obsolete = false;
- }
- else if(tag.equals("DEPEND"))
- {
- PluginList.Dependency dep = new PluginList.Dependency(
- depWhat,depFrom,depTo,depPlugin);
- branch.deps.add(dep);
- depWhat = null;
- depFrom = null;
- depTo = null;
- depPlugin = null;
- }
- } //}}}
-
- //{{{ startDocument() method
- public void startDocument()
- {
- try
- {
- pushElement(null);
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR, this, e);
- }
- } //}}}
-
- //{{{ endDocument() method
- public void endDocument()
- {
- pluginList.finished();
- } //}}}
-
- // end HandlerBase implementation
-
- //{{{ private members
-
- //{{{ Instance variables
- private final String path;
-
- private final PluginList pluginList;
-
- private PluginList.PluginSet pluginSet;
- private final StringBuilder pluginSetEntry;
-
- private PluginList.Plugin plugin;
- private String jar;
- private StringBuilder author;
-
- private PluginList.Branch branch;
- private boolean obsolete;
- private String version;
- private String date;
- private StringBuilder download;
- private int downloadSize;
- private StringBuilder downloadSource;
- private int downloadSourceSize;
- private int size;
- private String depWhat;
- private String depFrom;
- private String depTo;
- private String depPlugin;
-
- private String name;
- private StringBuilder description;
-
- private final Stack<String> stateStack = new Stack<String>();
- //}}}
-
- //{{{ pushElement() method
- private String pushElement(String name)
- {
- stateStack.push(name);
- return name;
- } //}}}
-
- //{{{ peekElement() method
- private String peekElement()
- {
- return stateStack.peek();
- } //}}}
-
- //{{{ popElement() method
- private String popElement()
- {
- return stateStack.pop();
- } //}}}
-
- //}}}
-}
+/*
+ * PluginListHandler.java - XML handler for the plugin list
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+//{{{ Imports
+import java.util.Stack;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+//}}}
+
+/**
+ * @version $Id: PluginListHandler.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+class PluginListHandler extends DefaultHandler
+{
+ //{{{ PluginListHandler constructor
+ PluginListHandler(PluginList pluginList, String path)
+ {
+ this.pluginList = pluginList;
+ this.path = path;
+
+ author = new StringBuilder();
+ description = new StringBuilder();
+ pluginSetEntry = new StringBuilder();
+ download = new StringBuilder();
+ downloadSource = new StringBuilder();
+ } //}}}
+
+ //{{{ resolveEntity() method
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "plugins.dtd", getClass());
+ } //}}}
+
+ //{{{ attribute() method
+ public void attribute(String aname, String value, boolean isSpecified)
+ {
+ if(aname == "NAME")
+ name = value;
+ else if(aname == "JAR")
+ jar = value;
+ else if(aname == "VERSION")
+ version = value;
+ else if(aname == "DATE")
+ date = value;
+ else if(aname == "OBSOLETE")
+ obsolete = ("TRUE".equals(value));
+ else if(aname == "WHAT")
+ depWhat = value;
+ else if(aname == "FROM")
+ depFrom = value;
+ else if(aname == "TO")
+ depTo = value;
+ else if(aname == "PLUGIN")
+ depPlugin = value;
+ else if(aname == "SIZE")
+ {
+ size = Integer.parseInt(value);
+ if(size == 0)
+ Log.log(Log.WARNING,this,"SIZE = 0");
+ }
+ } //}}}
+
+ //{{{ characters() method
+ public void characters(char[] c, int off, int len)
+ {
+ String tag = peekElement();
+
+ if(tag.equals("DESCRIPTION"))
+ {
+ description.append(c, off, len);
+ }
+ else if(tag.equals("PLUGIN_SET_ENTRY"))
+ pluginSetEntry.append(c, off, len);
+ else if(tag.equals("AUTHOR"))
+ {
+ if(author.length() != 0)
+ author.append(", ");
+ author.append(c, off, len);
+ }
+ else if(tag.equals("DOWNLOAD"))
+ download.append(c, off, len);
+ else if(tag.equals("DOWNLOAD_SOURCE"))
+ downloadSource.append(c, off, len);
+ } //}}}
+
+ //{{{ startElement() method
+ public void startElement(String uri, String localName,
+ String tag, Attributes attrs)
+ {
+ for (int i = 0; i < attrs.getLength(); i++)
+ {
+ String aName = attrs.getQName(i);
+ String aValue = attrs.getValue(i);
+ attribute(aName, aValue, true);
+ }
+
+
+ tag = pushElement(tag);
+
+ if(tag.equals("PLUGIN_SET"))
+ {
+ description.setLength(0);
+ pluginSet = new PluginList.PluginSet();
+ pluginSet.name = name;
+ }
+ else if(tag.equals("PLUGIN"))
+ {
+ description.setLength(0);
+ author.setLength(0);
+ branch = null;
+ plugin = new PluginList.Plugin();
+ }
+ else if(tag.equals("BRANCH"))
+ {
+ download.setLength(0);
+ branch = new PluginList.Branch();
+ }
+ else if(tag.equals("DOWNLOAD"))
+ downloadSize = size;
+ else if(tag.equals("DOWNLOAD_SOURCE"))
+ downloadSourceSize = size;
+ } //}}}
+
+ //{{{ endElement() method
+ public void endElement(String uri, String localName, String tag)
+ {
+ popElement();
+
+ if(tag.equals("PLUGIN_SET"))
+ {
+ pluginList.addPluginSet(pluginSet);
+ pluginSet = null;
+ pluginSetEntry.setLength(0);
+ }
+ else if(tag.equals("PLUGIN_SET_ENTRY"))
+ {
+ pluginSet.plugins.add(pluginSetEntry.toString());
+ pluginSetEntry.setLength(0);
+ }
+ else if(tag.equals("PLUGIN"))
+ {
+ plugin.jar = jar;
+ plugin.name = name;
+ plugin.author = author.toString();
+ plugin.description = description.toString();
+ pluginList.addPlugin(plugin);
+ jar = null;
+ name = null;
+ author.setLength(0);
+ description.setLength(0);
+ }
+ else if(tag.equals("BRANCH"))
+ {
+ branch.version = version;
+ branch.date = date;
+ branch.download = download.toString();
+ branch.downloadSize = downloadSize;
+ branch.downloadSource = downloadSource.toString();
+ branch.downloadSourceSize = downloadSourceSize;
+ branch.obsolete = obsolete;
+ plugin.branches.add(branch);
+ version = null;
+ download.setLength(0);
+ downloadSource.setLength(0);
+ obsolete = false;
+ }
+ else if(tag.equals("DEPEND"))
+ {
+ PluginList.Dependency dep = new PluginList.Dependency(
+ depWhat,depFrom,depTo,depPlugin);
+ branch.deps.add(dep);
+ depWhat = null;
+ depFrom = null;
+ depTo = null;
+ depPlugin = null;
+ }
+ } //}}}
+
+ //{{{ startDocument() method
+ public void startDocument()
+ {
+ try
+ {
+ pushElement(null);
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR, this, e);
+ }
+ } //}}}
+
+ //{{{ endDocument() method
+ public void endDocument()
+ {
+ pluginList.finished();
+ } //}}}
+
+ // end HandlerBase implementation
+
+ //{{{ private members
+
+ //{{{ Instance variables
+ private final String path;
+
+ private final PluginList pluginList;
+
+ private PluginList.PluginSet pluginSet;
+ private final StringBuilder pluginSetEntry;
+
+ private PluginList.Plugin plugin;
+ private String jar;
+ private StringBuilder author;
+
+ private PluginList.Branch branch;
+ private boolean obsolete;
+ private String version;
+ private String date;
+ private StringBuilder download;
+ private int downloadSize;
+ private StringBuilder downloadSource;
+ private int downloadSourceSize;
+ private int size;
+ private String depWhat;
+ private String depFrom;
+ private String depTo;
+ private String depPlugin;
+
+ private String name;
+ private StringBuilder description;
+
+ private final Stack<String> stateStack = new Stack<String>();
+ //}}}
+
+ //{{{ pushElement() method
+ private String pushElement(String name)
+ {
+ stateStack.push(name);
+ return name;
+ } //}}}
+
+ //{{{ peekElement() method
+ private String peekElement()
+ {
+ return stateStack.peek();
+ } //}}}
+
+ //{{{ popElement() method
+ private String popElement()
+ {
+ return stateStack.pop();
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginManager.java b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginManager.java
index be5ebbd..2ab55e2 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginManager.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginManager.java
@@ -1,367 +1,318 @@
-/*
- * PluginManager.java - Plugin manager window
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Kris Kopicki
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.event.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.xml.sax.SAXParseException;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.msg.*;
-import org.gjt.sp.jedit.options.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.WorkRequest;
-//}}}
-
-/**
- * @version $Id: PluginManager.java 16343 2009-10-14 10:29:47Z kpouer $
- */
-public class PluginManager extends JFrame implements EBComponent
-{
-
- //{{{ getInstance() method
- /**
- * Returns the currently visible plugin manager window, or null.
- * @since jEdit 4.2pre2
- */
- public static PluginManager getInstance()
- {
- return instance;
- } //}}}
-
- //{{{ dispose() method
- public void dispose()
- {
- instance = null;
- EditBus.removeFromBus(this);
- EditBus.removeFromBus(installer);
- super.dispose();
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage message)
- {
- if (message instanceof PropertiesChanged)
- {
- if (shouldUpdatePluginList())
- {
- pluginList = null;
- updatePluginList();
- if(tabPane.getSelectedIndex() != 0)
- {
- installer.updateModel();
- updater.updateModel();
- }
- }
- }
- else if (message instanceof PluginUpdate)
- {
- if(!queuedUpdate)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- queuedUpdate = false;
- manager.update();
- }
- });
- queuedUpdate = true;
- }
- }
- } //}}}
-
- //{{{ showPluginManager() method
- public static void showPluginManager(Frame parent)
- {
- if (instance == null)
- instance = new PluginManager(parent);
- else
- instance.toFront();
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- dispose();
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- dispose();
- } //}}}
-
- //{{{ getPluginList() method
- PluginList getPluginList()
- {
- return pluginList;
- } //}}}
-
- //{{{ Private members
- private static PluginManager instance;
-
- //{{{ Instance variables
- private JTabbedPane tabPane;
- private JButton done;
- private JButton mgrOptions;
- private JButton pluginOptions;
- private InstallPanel installer;
- private InstallPanel updater;
- private ManagePanel manager;
- private PluginList pluginList;
- private boolean queuedUpdate;
- private boolean downloadingPluginList;
- private final Frame parent;
- //}}}
-
- static public final String PROPERTY_PLUGINSET = "plugin-manager.pluginset.path";
-
- //{{{ PluginManager constructor
- private PluginManager(Frame parent)
- {
- super(jEdit.getProperty("plugin-manager.title"));
- this.parent = parent;
- init();
- } //}}}
-
- //{{{ init() method
- private void init()
- {
- EditBus.addToBus(this);
-
-
- /* Setup panes */
- JPanel content = new JPanel(new BorderLayout(12,12));
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- tabPane = new JTabbedPane();
- tabPane.addTab(jEdit.getProperty("manage-plugins.title"),
- manager = new ManagePanel(this));
- tabPane.addTab(jEdit.getProperty("update-plugins.title"),
- updater = new InstallPanel(this,true));
- tabPane.addTab(jEdit.getProperty("install-plugins.title"),
- installer = new InstallPanel(this,false));
- EditBus.addToBus(installer);
- content.add(BorderLayout.CENTER,tabPane);
-
- tabPane.addChangeListener(new ListUpdater());
-
- /* Create the buttons */
- Box buttons = new Box(BoxLayout.X_AXIS);
-
- ActionListener al = new ActionHandler();
- mgrOptions = new JButton(jEdit.getProperty("plugin-manager.mgr-options"));
- mgrOptions.addActionListener(al);
- pluginOptions = new JButton(jEdit.getProperty("plugin-manager.plugin-options"));
- pluginOptions.addActionListener(al);
- done = new JButton(jEdit.getProperty("plugin-manager.done"));
- done.addActionListener(al);
-
- buttons.add(Box.createGlue());
- buttons.add(mgrOptions);
- buttons.add(Box.createHorizontalStrut(6));
- buttons.add(pluginOptions);
- buttons.add(Box.createHorizontalStrut(6));
- buttons.add(done);
- buttons.add(Box.createGlue());
-
- getRootPane().setDefaultButton(done);
-
- content.add(BorderLayout.SOUTH,buttons);
-
- setDefaultCloseOperation(DISPOSE_ON_CLOSE);
-
- setIconImage(GUIUtilities.getPluginIcon());
-
- pack();
- GUIUtilities.loadGeometry(this, parent, "plugin-manager");
- GUIUtilities.addSizeSaver(this, parent, "plugin-manager");
- setVisible(true);
- } //}}}
-
- //{{{ shouldUpdatePluginList()
- /**
- * Check if the plugin list should be updated.
- * It will return <code>true</code> if the pluginList is <code>null</code>
- * or if the mirror id of the current plugin list is not the current preffered mirror id
- * and will return always false if the plugin list is currently downloading
- *
- * @return true if the plugin list should be updated
- */
- private boolean shouldUpdatePluginList()
- {
- return (pluginList == null ||
- !pluginList.getMirrorId().equals(jEdit.getProperty("plugin-manager.mirror.id"))) &&
- !downloadingPluginList;
- } //}}}
-
- //{{{ updatePluginList() method
- private void updatePluginList()
- {
- if(jEdit.getSettingsDirectory() == null
- && jEdit.getJEditHome() == null)
- {
- GUIUtilities.error(this,"no-settings",null);
- return;
- }
- if (!shouldUpdatePluginList())
- {
- return;
- }
-
- final Exception[] exception = new Exception[1];
-
- VFSManager.runInWorkThread(new WorkRequest()
- {
- public void run()
- {
- try
- {
- downloadingPluginList = true;
- setStatus(jEdit.getProperty(
- "plugin-manager.list-download-connect"));
- pluginList = new PluginList(this);
- }
- catch(Exception e)
- {
- exception[0] = e;
- }
- finally
- {
- downloadingPluginList = false;
- }
- }
- });
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- if(exception[0] instanceof SAXParseException)
- {
- SAXParseException se = (SAXParseException)
- exception[0];
-
- int line = se.getLineNumber();
- String path = jEdit.getProperty(
- "plugin-manager.export-url");
- String message = se.getMessage();
- Log.log(Log.ERROR,this,path + ':' + line
- + ": " + message);
- String[] pp = { path,
- String.valueOf(line),
- message };
- GUIUtilities.error(PluginManager.this,
- "plugin-list.xmlerror",pp);
- }
- else if(exception[0] != null)
- {
- Exception e = exception[0];
-
- Log.log(Log.ERROR,this,e);
- String[] pp = { e.toString() };
-
- String ok = jEdit.getProperty(
- "common.ok");
- String proxyButton = jEdit.getProperty(
- "plugin-list.ioerror.proxy-servers");
- int retVal =
- JOptionPane.showOptionDialog(
- PluginManager.this,
- jEdit.getProperty("plugin-list.ioerror.message",pp),
- jEdit.getProperty("plugin-list.ioerror.title"),
- JOptionPane.YES_NO_OPTION,
- JOptionPane.ERROR_MESSAGE,
- null,
- new Object[] {
- proxyButton,
- ok
- },
- ok);
-
- if(retVal == 0)
- {
- new GlobalOptions(
- PluginManager.this,
- "firewall");
- }
- }
- }
- });
- } //}}}
-
- //{{{ processKeyEvent() method
- public void processKeyEvents(KeyEvent ke)
- {
- if ((ke.getID() == KeyEvent.KEY_PRESSED) &&
- (ke.getKeyCode() == KeyEvent.VK_ESCAPE))
- {
- cancel();
- ke.consume();
- }
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == done)
- ok();
- else if (source == mgrOptions)
- new GlobalOptions(PluginManager.this,"plugin-manager");
- else if (source == pluginOptions)
- new PluginOptions(PluginManager.this);
- }
- } //}}}
-
- //{{{ ListUpdater class
- class ListUpdater implements ChangeListener
- {
- public void stateChanged(ChangeEvent e)
- {
- Component selected = tabPane.getSelectedComponent();
- if(selected == installer || selected == updater)
- {
- updatePluginList();
- installer.updateModel();
- updater.updateModel();
- }
- else if(selected == manager)
- manager.update();
- }
- } //}}}
-
- //}}}
-}
+/*
+ * PluginManager.java - Plugin manager window
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Kris Kopicki
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.event.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.msg.*;
+import org.gjt.sp.jedit.options.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Task;
+import org.gjt.sp.util.ThreadUtilities;
+//}}}
+
+/**
+ * @version $Id: PluginManager.java 17953 2010-06-02 08:30:24Z kpouer $
+ */
+public class PluginManager extends JFrame
+{
+
+ //{{{ getInstance() method
+ /**
+ * Returns the currently visible plugin manager window, or null.
+ * @since jEdit 4.2pre2
+ */
+ public static PluginManager getInstance()
+ {
+ return instance;
+ } //}}}
+
+ //{{{ dispose() method
+ @Override
+ public void dispose()
+ {
+ instance = null;
+ EditBus.removeFromBus(this);
+ EditBus.removeFromBus(installer);
+ super.dispose();
+ } //}}}
+
+ //{{{ handlePropertiesChanged() method
+ @EBHandler
+ public void handlePropertiesChanged(PropertiesChanged message)
+ {
+ if (shouldUpdatePluginList())
+ {
+ pluginList = null;
+ updatePluginList();
+ }
+ } //}}}
+
+ //{{{ handlePluginUpdate() method
+ @EBHandler
+ public void handlePluginUpdate(PluginUpdate msg)
+ {
+ if(!queuedUpdate)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ queuedUpdate = false;
+ manager.update();
+ }
+ });
+ queuedUpdate = true;
+ }
+ } //}}}
+
+ //{{{ showPluginManager() method
+ public static void showPluginManager(Frame parent)
+ {
+ if (instance == null)
+ instance = new PluginManager(parent);
+ else
+ instance.toFront();
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ dispose();
+ } //}}}
+
+ //{{{ getPluginList() method
+ PluginList getPluginList()
+ {
+ return pluginList;
+ } //}}}
+
+ //{{{ Private members
+ private static PluginManager instance;
+
+ //{{{ Instance variables
+ private JTabbedPane tabPane;
+ private JButton done;
+ private JButton mgrOptions;
+ private JButton pluginOptions;
+ private InstallPanel installer;
+ private InstallPanel updater;
+ private ManagePanel manager;
+ private PluginList pluginList;
+ private boolean queuedUpdate;
+ private boolean downloadingPluginList;
+ private final Frame parent;
+ //}}}
+
+ public static final String PROPERTY_PLUGINSET = "plugin-manager.pluginset.path";
+
+ //{{{ PluginManager constructor
+ private PluginManager(Frame parent)
+ {
+ super(jEdit.getProperty("plugin-manager.title"));
+ this.parent = parent;
+ init();
+ } //}}}
+
+ //{{{ init() method
+ private void init()
+ {
+ EditBus.addToBus(this);
+
+
+ /* Setup panes */
+ JPanel content = new JPanel(new BorderLayout(12,12));
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ tabPane = new JTabbedPane();
+ tabPane.addTab(jEdit.getProperty("manage-plugins.title"),
+ manager = new ManagePanel(this));
+ tabPane.addTab(jEdit.getProperty("update-plugins.title"),
+ updater = new InstallPanel(this,true));
+ tabPane.addTab(jEdit.getProperty("install-plugins.title"),
+ installer = new InstallPanel(this,false));
+ EditBus.addToBus(installer);
+ content.add(BorderLayout.CENTER,tabPane);
+
+ tabPane.addChangeListener(new ListUpdater());
+
+ /* Create the buttons */
+ Box buttons = new Box(BoxLayout.X_AXIS);
+
+ ActionListener al = new ActionHandler();
+ mgrOptions = new JButton(jEdit.getProperty("plugin-manager.mgr-options"));
+ mgrOptions.addActionListener(al);
+ pluginOptions = new JButton(jEdit.getProperty("plugin-manager.plugin-options"));
+ pluginOptions.addActionListener(al);
+ done = new JButton(jEdit.getProperty("plugin-manager.done"));
+ done.addActionListener(al);
+
+ buttons.add(Box.createGlue());
+ buttons.add(mgrOptions);
+ buttons.add(Box.createHorizontalStrut(6));
+ buttons.add(pluginOptions);
+ buttons.add(Box.createHorizontalStrut(6));
+ buttons.add(done);
+ buttons.add(Box.createGlue());
+
+ getRootPane().setDefaultButton(done);
+
+ content.add(BorderLayout.SOUTH,buttons);
+
+ setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+
+ setIconImage(GUIUtilities.getPluginIcon());
+
+ pack();
+ GUIUtilities.loadGeometry(this, parent, "plugin-manager");
+ GUIUtilities.addSizeSaver(this, parent, "plugin-manager");
+ setVisible(true);
+ } //}}}
+
+ //{{{ shouldUpdatePluginList()
+ /**
+ * Check if the plugin list should be updated.
+ * It will return <code>true</code> if the pluginList is <code>null</code>
+ * or if the mirror id of the current plugin list is not the current preffered mirror id
+ * and will return always false if the plugin list is currently downloading
+ *
+ * @return true if the plugin list should be updated
+ */
+ private boolean shouldUpdatePluginList()
+ {
+ return (pluginList == null ||
+ !pluginList.getMirrorId().equals(jEdit.getProperty("plugin-manager.mirror.id"))) &&
+ !downloadingPluginList;
+ } //}}}
+
+ //{{{ updatePluginList() method
+ private void updatePluginList()
+ {
+ if(jEdit.getSettingsDirectory() == null
+ && jEdit.getJEditHome() == null)
+ {
+ GUIUtilities.error(this,"no-settings",null);
+ return;
+ }
+ if (!shouldUpdatePluginList())
+ {
+ return;
+ }
+
+ ThreadUtilities.runInBackground(new Task()
+ {
+ @Override
+ public void _run()
+ {
+ try
+ {
+ downloadingPluginList = true;
+ setStatus(jEdit.getProperty(
+ "plugin-manager.list-download-connect"));
+ pluginList = new PluginList(this);
+ }
+ finally
+ {
+ downloadingPluginList = false;
+ }
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ pluginListUpdated();
+ }
+ });
+ }
+ });
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ private void pluginListUpdated()
+ {
+ Component selected = tabPane.getSelectedComponent();
+ if(selected == installer || selected == updater)
+ {
+ installer.updateModel();
+ updater.updateModel();
+ }
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ public void processKeyEvents(KeyEvent ke)
+ {
+ if ((ke.getID() == KeyEvent.KEY_PRESSED) &&
+ (ke.getKeyCode() == KeyEvent.VK_ESCAPE))
+ {
+ cancel();
+ ke.consume();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == done)
+ ok();
+ else if (source == mgrOptions)
+ new GlobalOptions(PluginManager.this,"plugin-manager");
+ else if (source == pluginOptions)
+ new PluginOptions(PluginManager.this);
+ }
+ } //}}}
+
+ //{{{ ListUpdater class
+ class ListUpdater implements ChangeListener
+ {
+ public void stateChanged(ChangeEvent e)
+ {
+ Component selected = tabPane.getSelectedComponent();
+ if(selected == installer || selected == updater)
+ {
+ updatePluginList();
+ }
+ else if(selected == manager)
+ manager.update();
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginManagerProgress.java b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginManagerProgress.java
index 153fb1f..9c7adf4 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/PluginManagerProgress.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/PluginManagerProgress.java
@@ -1,234 +1,238 @@
-/*
- * PluginManagerProgress.java - Plugin download progress meter
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.*;
-import java.awt.event.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.ProgressObserver;
-//}}}
-
-class PluginManagerProgress extends JDialog implements ProgressObserver
-{
- //{{{ PluginManagerProgress constructor
- public PluginManagerProgress(PluginManager dialog, Roster roster)
- {
- super(dialog,jEdit.getProperty("plugin-manager.progress"),true);
-
- this.roster = roster;
-
- JPanel content = new JPanel(new BorderLayout(12,12));
- content.setBorder(new EmptyBorder(12,12,12,12));
- setContentPane(content);
-
- progress = new JProgressBar();
- progress.setStringPainted(true);
- progress.setString(jEdit.getProperty("plugin-manager.progress"));
-
- int maximum = 0;
- count = roster.getOperationCount();
- for(int i = 0; i < count; i++)
- {
- maximum += roster.getOperation(i).getMaximum();
- }
-
- progress.setMaximum(maximum);
- content.add(BorderLayout.NORTH,progress);
-
- stop = new JButton(jEdit.getProperty("plugin-manager.progress.stop"));
- stop.addActionListener(new ActionHandler());
- JPanel panel = new JPanel(new FlowLayout(
- FlowLayout.CENTER,0,0));
- panel.add(stop);
- content.add(BorderLayout.CENTER,panel);
-
- addWindowListener(new WindowHandler());
-
- pack();
- setLocationRelativeTo(dialog);
- setVisible(true);
- } //}}}
-
- //{{{ setValue() method
-
- /**
- * @param value the new value
- * @deprecated Use {@link #setValue(long)}
- */
- public void setValue(final int value)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- progress.setValue(valueSoFar + value);
- }
- });
- } //}}}
-
- //{{{ setValue() method
- /**
- * Update the progress value.
- *
- * @param value the new value
- * @since jEdit 4.3pre3
- */
- public void setValue(final long value)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- progress.setValue(valueSoFar + (int) value);
- }
- });
- } //}}}
-
- //{{{ setMaximum() method
- /**
- * This method is unused with the plugin manager.
- *
- * @param value the new max value (it will be ignored)
- * @since jEdit 4.3pre3
- */
- public void setMaximum(long value)
- {
- } //}}}
-
- //{{{ setStatus() method
- /**
- * This method is unused with the plugin manager.
- *
- * @param status the new status (it will be ignored)
- * @since jEdit 4.3pre3
- */
- public void setStatus(String status)
- {
- setTitle(status);
- progress.setString(status);
- } //}}}
-
- //{{{ done() method
- public void done()
- {
- try
- {
- if(done == count)
- {
- SwingUtilities.invokeAndWait(new Runnable()
- {
- public void run()
- {
- dispose();
- }
- });
- }
- else
- {
- SwingUtilities.invokeAndWait(new Runnable()
- {
- public void run()
- {
- valueSoFar += roster.getOperation(done - 1)
- .getMaximum();
- progress.setValue(valueSoFar);
- done++;
- }
- });
- }
- }
- catch(Exception e)
- {
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private Thread thread;
-
- private JProgressBar progress;
- private JButton stop;
- private int count;
- private int done = 1;
-
- // progress value as of start of current task
- private int valueSoFar;
-
- private Roster roster;
- //}}}
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == stop)
- {
- thread.stop();
- dispose();
- }
- }
- } //}}}
-
- //{{{ WindowHandler class
- class WindowHandler extends WindowAdapter
- {
- boolean done;
-
- public void windowOpened(WindowEvent evt)
- {
- if(done)
- return;
-
- done = true;
- thread = new RosterThread();
- thread.start();
- }
-
- public void windowClosing(WindowEvent evt)
- {
- thread.stop();
- dispose();
- }
- } //}}}
-
- //{{{ RosterThread class
- class RosterThread extends Thread
- {
- RosterThread()
- {
- super("Plugin manager thread");
- }
-
- public void run()
- {
- roster.performOperationsInWorkThread(PluginManagerProgress.this);
- }
- } //}}}
-
- //}}}
-}
+/*
+ * PluginManagerProgress.java - Plugin download progress meter
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.ProgressObserver;
+//}}}
+
+class PluginManagerProgress extends JDialog implements ProgressObserver
+{
+ //{{{ PluginManagerProgress constructor
+ PluginManagerProgress(PluginManager dialog, Roster roster)
+ {
+ super(dialog,jEdit.getProperty("plugin-manager.progress"),true);
+
+ this.roster = roster;
+
+ JPanel content = new JPanel(new BorderLayout(12,12));
+ content.setBorder(new EmptyBorder(12,12,12,12));
+ setContentPane(content);
+
+ progress = new JProgressBar();
+ progress.setStringPainted(true);
+ progress.setString(jEdit.getProperty("plugin-manager.progress"));
+
+ count = roster.getOperationCount();
+ int maximum = 0;
+ for(int i = 0; i < count; i++)
+ {
+ maximum += roster.getOperation(i).getMaximum();
+ }
+
+ progress.setMaximum(maximum);
+ content.add(BorderLayout.NORTH,progress);
+
+ stop = new JButton(jEdit.getProperty("plugin-manager.progress.stop"));
+ stop.addActionListener(new ActionHandler());
+ JPanel panel = new JPanel(new FlowLayout(
+ FlowLayout.CENTER,0,0));
+ panel.add(stop);
+ content.add(BorderLayout.CENTER,panel);
+
+ addWindowListener(new WindowHandler());
+
+ pack();
+ setLocationRelativeTo(dialog);
+ setVisible(true);
+ } //}}}
+
+ //{{{ setValue() method
+
+ /**
+ * @param value the new value
+ * @deprecated Use {@link #setValue(long)}
+ */
+ @Deprecated
+ public void setValue(final int value)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ progress.setValue(valueSoFar + value);
+ }
+ });
+ } //}}}
+
+ //{{{ setValue() method
+ /**
+ * Update the progress value.
+ *
+ * @param value the new value
+ * @since jEdit 4.3pre3
+ */
+ public void setValue(final long value)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ progress.setValue(valueSoFar + (int) value);
+ }
+ });
+ } //}}}
+
+ //{{{ setMaximum() method
+ /**
+ * This method is unused with the plugin manager.
+ *
+ * @param value the new max value (it will be ignored)
+ * @since jEdit 4.3pre3
+ */
+ public void setMaximum(long value)
+ {
+ } //}}}
+
+ //{{{ setStatus() method
+ /**
+ * This method is unused with the plugin manager.
+ *
+ * @param status the new status (it will be ignored)
+ * @since jEdit 4.3pre3
+ */
+ public void setStatus(String status)
+ {
+ setTitle(status);
+ progress.setString(status);
+ } //}}}
+
+ //{{{ done() method
+ public void done()
+ {
+ try
+ {
+ if(done == count)
+ {
+ SwingUtilities.invokeAndWait(new Runnable()
+ {
+ public void run()
+ {
+ dispose();
+ }
+ });
+ }
+ else
+ {
+ SwingUtilities.invokeAndWait(new Runnable()
+ {
+ public void run()
+ {
+ valueSoFar += roster.getOperation(done - 1)
+ .getMaximum();
+ progress.setValue(valueSoFar);
+ done++;
+ }
+ });
+ }
+ }
+ catch(Exception e)
+ {
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private Thread thread;
+
+ private final JProgressBar progress;
+ private final JButton stop;
+ private final int count;
+ private int done = 1;
+
+ // progress value as of start of current task
+ private int valueSoFar;
+
+ private final Roster roster;
+ //}}}
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == stop)
+ {
+ thread.stop();
+ dispose();
+ }
+ }
+ } //}}}
+
+ //{{{ WindowHandler class
+ class WindowHandler extends WindowAdapter
+ {
+ boolean done;
+
+ @Override
+ public void windowOpened(WindowEvent evt)
+ {
+ if(done)
+ return;
+
+ done = true;
+ thread = new RosterThread();
+ thread.start();
+ }
+
+ @Override
+ public void windowClosing(WindowEvent evt)
+ {
+ thread.stop();
+ dispose();
+ }
+ } //}}}
+
+ //{{{ RosterThread class
+ class RosterThread extends Thread
+ {
+ RosterThread()
+ {
+ super("Plugin manager thread");
+ }
+
+ @Override
+ public void run()
+ {
+ roster.performOperationsInWorkThread(PluginManagerProgress.this);
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/Roster.java b/jEdit/org/gjt/sp/jedit/pluginmgr/Roster.java
index 760453b..21a5dd2 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/Roster.java
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/Roster.java
@@ -1,483 +1,483 @@
-/*
- * Roster.java - A list of things to do, used in various places
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.pluginmgr;
-
-//{{{ Imports
-import javax.swing.SwingUtilities;
-import java.awt.Component;
-import java.io.*;
-import java.net.*;
-import java.util.zip.*;
-import java.util.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.IOUtilities;
-
-import static org.gjt.sp.jedit.io.FileVFS.recursiveDelete;
-//}}}
-
-/**
- * @author $Id: Roster.java 16348 2009-10-14 10:40:15Z kpouer $
- */
-class Roster
-{
- //{{{ Roster constructor
- Roster()
- {
- operations = new ArrayList<Operation>();
- toLoad = new ArrayList<String>();
- } //}}}
-
- //{{{ addRemove() method
- /**
- * Add a remove operation for the given jar
- * @param jar the jar name
- */
- void addRemove(String jar)
- {
- addOperation(new Remove(jar));
- } //}}}
-
- //{{{ addInstall() method
- void addInstall(String installed, String url, String installDirectory,
- int size)
- {
- addOperation(new Install(installed,url,installDirectory,size));
- } //}}}
-
- //{{{ getOperation() method
- public Operation getOperation(int i)
- {
- return operations.get(i);
- } //}}}
-
- //{{{ getOperationCount() method
- int getOperationCount()
- {
- return operations.size();
- } //}}}
-
- //{{{ isEmpty() method
- boolean isEmpty()
- {
- return operations.isEmpty();
- } //}}}
-
- //{{{ performOperationsInWorkThread() method
- void performOperationsInWorkThread(PluginManagerProgress progress)
- {
- for(int i = 0; i < operations.size(); i++)
- {
- Operation op = operations.get(i);
- op.runInWorkThread(progress);
- progress.done();
-
- if(Thread.interrupted())
- return;
- }
- } //}}}
-
- //{{{ performOperationsInAWTThread() method
- void performOperationsInAWTThread(Component comp)
- {
- for(int i = 0; i < operations.size(); i++)
- {
- Operation op = operations.get(i);
- op.runInAWTThread(comp);
- }
-
- // add the JARs before checking deps since dep check might
- // require all JARs to be present
- for(int i = 0; i < toLoad.size(); i++)
- {
- String pluginName = toLoad.get(i);
- if(jEdit.getPluginJAR(pluginName) != null)
- {
- Log.log(Log.WARNING,this,"Already loaded: "
- + pluginName);
- }
- else
- jEdit.addPluginJAR(pluginName);
- }
-
- for(int i = 0; i < toLoad.size(); i++)
- {
- String pluginName = toLoad.get(i);
- PluginJAR plugin = jEdit.getPluginJAR(pluginName);
- if(plugin != null)
- plugin.checkDependencies();
- }
-
- // now activate the plugins
- for(int i = 0; i < toLoad.size(); i++)
- {
- String pluginName = toLoad.get(i);
- PluginJAR plugin = jEdit.getPluginJAR(pluginName);
- if(plugin != null)
- plugin.activatePluginIfNecessary();
- }
- } //}}}
-
- //{{{ Private members
- private static File downloadDir;
-
- private List<Operation> operations;
- private List<String> toLoad;
-
- //{{{ addOperation() method
- private void addOperation(Operation op)
- {
- for(int i = 0; i < operations.size(); i++)
- {
- if(operations.get(i).equals(op))
- return;
- }
-
- operations.add(op);
- } //}}}
-
- //{{{ getDownloadDir() method
- private static String getDownloadDir()
- {
- if(downloadDir == null)
- {
- String settings = jEdit.getSettingsDirectory();
- if(settings == null)
- settings = System.getProperty("user.home");
- downloadDir = new File(MiscUtilities.constructPath(
- settings,"PluginManager.download"));
- downloadDir.mkdirs();
- }
-
- return downloadDir.getPath();
- } //}}}
-
- //}}}
-
- //{{{ Operation interface
- abstract static class Operation
- {
- public void runInWorkThread(PluginManagerProgress progress)
- {
- }
-
- public void runInAWTThread(Component comp)
- {
- }
-
- public int getMaximum()
- {
- return 0;
- }
- } //}}}
-
- //{{{ Remove class
- class Remove extends Operation
- {
- //{{{ Remove constructor
- Remove(String jar)
- {
- this.jar = jar;
- } //}}}
-
- //{{{ runInAWTThread() method
- public void runInAWTThread(Component comp)
- {
- // close JAR file and all JARs that depend on this
- PluginJAR jar = jEdit.getPluginJAR(this.jar);
- if(jar != null)
- {
- unloadPluginJAR(jar);
- }
-
- toLoad.remove(this.jar);
-
- // remove cache file
-
- // move JAR first
- File jarFile = new File(this.jar);
- File srcFile = new File(this.jar.substring(0, this.jar.length() - 4));
-
- Log.log(Log.NOTICE,this,"Deleting " + jarFile);
-
- boolean ok = jarFile.delete();
-
- if(srcFile.exists())
- {
- ok &= recursiveDelete(srcFile);
- }
-
- if(!ok)
- {
- String[] args = {this.jar};
- GUIUtilities.error(comp,"plugin-manager.remove-failed",args);
- }
- } //}}}
-
- //{{{ unloadPluginJAR() method
- /**
- * This should go into a public method somewhere.
- * @param jar the jar of the plugin
- */
- private void unloadPluginJAR(PluginJAR jar)
- {
- String[] dependents = jar.getDependentPlugins();
- for (String path: dependents)
- {
- PluginJAR _jar = jEdit.getPluginJAR(path);
- if(_jar != null)
- {
- toLoad.add(path);
- unloadPluginJAR(_jar);
- // clear cache file
- String cachePath = jar.getCachePath();
- if(cachePath != null)
- new File(cachePath).delete();
-
- }
- }
- jEdit.removePluginJAR(jar,false);
-
- } //}}}
-
- //{{{ equals() method
- public boolean equals(Object o)
- {
- return o instanceof Remove
- && ((Remove) o).jar.equals(jar);
- } //}}}
-
- //{{{ Private members
- private final String jar;
- //}}}
- } //}}}
-
- //{{{ Install class
- class Install extends Operation
- {
- int size;
-
- //{{{ Install constructor
- Install(String installed, String url, String installDirectory,
- int size)
- {
- // catch those hooligans passing null urls
- if(url == null)
- throw new NullPointerException();
-
- this.installed = installed;
- this.url = url;
- this.installDirectory = installDirectory;
- this.size = size;
- } //}}}
-
- //{{{ getMaximum() method
- public int getMaximum()
- {
- return size;
- } //}}}
-
- //{{{ runInWorkThread() method
- public void runInWorkThread(PluginManagerProgress progress)
- {
- String fileName = MiscUtilities.getFileName(url);
-
- path = download(progress,fileName,url);
- } //}}}
-
- //{{{ runInAWTThread() method
- public void runInAWTThread(Component comp)
- {
- // check if download failed
- if(path == null)
- return;
-
- // if download OK, remove existing version
- if(installed != null)
- new Remove(installed).runInAWTThread(comp);
-
- ZipFile zipFile = null;
-
- try
- {
- zipFile = new ZipFile(path);
-
- Enumeration<? extends ZipEntry> e = zipFile.entries();
- while(e.hasMoreElements())
- {
- ZipEntry entry = e.nextElement();
- String name = entry.getName().replace('/',File.separatorChar);
- File file = new File(installDirectory,name);
- if(entry.isDirectory())
- file.mkdirs();
- else
- {
- new File(file.getParent()).mkdirs();
- InputStream in = null;
- FileOutputStream out = null;
- try
- {
- in = zipFile.getInputStream(entry);
- out = new FileOutputStream(file);
- IOUtilities.copyStream(4096,
- null,
- in,
- out,false);
- }
- finally
- {
- IOUtilities.closeQuietly(in);
- IOUtilities.closeQuietly(out);
- }
- if(file.getName().toLowerCase().endsWith(".jar"))
- toLoad.add(file.getPath());
- }
- }
- }
- catch(InterruptedIOException iio)
- {
- }
- catch(ZipException e)
- {
- Log.log(Log.ERROR,this,e);
- GUIUtilities.error(null,"plugin-error-download",new Object[]{""});
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
-
- String[] args = { io.getMessage() };
- GUIUtilities.error(null,"ioerror",args);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- }
- finally
- {
- try
- {
- if(zipFile != null)
- zipFile.close();
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,this,io);
- }
-
- if(jEdit.getBooleanProperty(
- "plugin-manager.deleteDownloads"))
- {
- new File(path).delete();
- }
- }
- } //}}}
-
- //{{{ equals() method
- public boolean equals(Object o)
- {
- return o instanceof Install
- && ((Install) o).url.equals(url);
- } //}}}
-
- //{{{ Private members
- private String installed;
- private final String url;
- private String installDirectory;
- private String path;
-
- //{{{ download() method
- private String download(PluginManagerProgress progress,
- String fileName, String url)
- {
- try
- {
- String host = jEdit.getProperty("plugin-manager.mirror.id");
- if (host == null || host.equals(MirrorList.Mirror.NONE))
- host = "default";
-
- String path = MiscUtilities.constructPath(getDownloadDir(),fileName);
- URLConnection conn = new URL(url).openConnection();
- progress.setStatus(jEdit.getProperty("plugin-manager.progress",new String[] {fileName, host}));
- InputStream in = null;
- FileOutputStream out = null;
- try
- {
- in = conn.getInputStream();
- out = new FileOutputStream(path);
- if(!IOUtilities.copyStream(progress,in,out,true))
- return null;
- }
- finally
- {
- IOUtilities.closeQuietly(in);
- IOUtilities.closeQuietly(out);
- }
-
- return path;
- }
- catch(InterruptedIOException iio)
- {
- // do nothing, user clicked 'Stop'
- return null;
- }
- catch(FileNotFoundException e)
- {
- Log.log(Log.ERROR,this,e);
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- GUIUtilities.error(null,"plugin-error-download",new Object[]{""});
- }
- });
-
- return null;
- }
- catch(final IOException io)
- {
- Log.log(Log.ERROR,this,io);
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- String[] args = { io.getMessage() };
- GUIUtilities.error(null,"plugin-error-download",args);
- }
- });
-
- return null;
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
-
- return null;
- }
- } //}}}
-
- //}}}
- } //}}}
-}
+/*
+ * Roster.java - A list of things to do, used in various places
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.pluginmgr;
+
+//{{{ Imports
+import javax.swing.SwingUtilities;
+import java.awt.Component;
+import java.io.*;
+import java.net.*;
+import java.util.zip.*;
+import java.util.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.IOUtilities;
+
+import static org.gjt.sp.jedit.io.FileVFS.recursiveDelete;
+//}}}
+
+/**
+ * @author $Id: Roster.java 16348 2009-10-14 10:40:15Z kpouer $
+ */
+class Roster
+{
+ //{{{ Roster constructor
+ Roster()
+ {
+ operations = new ArrayList<Operation>();
+ toLoad = new ArrayList<String>();
+ } //}}}
+
+ //{{{ addRemove() method
+ /**
+ * Add a remove operation for the given jar
+ * @param jar the jar name
+ */
+ void addRemove(String jar)
+ {
+ addOperation(new Remove(jar));
+ } //}}}
+
+ //{{{ addInstall() method
+ void addInstall(String installed, String url, String installDirectory,
+ int size)
+ {
+ addOperation(new Install(installed,url,installDirectory,size));
+ } //}}}
+
+ //{{{ getOperation() method
+ public Operation getOperation(int i)
+ {
+ return operations.get(i);
+ } //}}}
+
+ //{{{ getOperationCount() method
+ int getOperationCount()
+ {
+ return operations.size();
+ } //}}}
+
+ //{{{ isEmpty() method
+ boolean isEmpty()
+ {
+ return operations.isEmpty();
+ } //}}}
+
+ //{{{ performOperationsInWorkThread() method
+ void performOperationsInWorkThread(PluginManagerProgress progress)
+ {
+ for(int i = 0; i < operations.size(); i++)
+ {
+ Operation op = operations.get(i);
+ op.runInWorkThread(progress);
+ progress.done();
+
+ if(Thread.interrupted())
+ return;
+ }
+ } //}}}
+
+ //{{{ performOperationsInAWTThread() method
+ void performOperationsInAWTThread(Component comp)
+ {
+ for(int i = 0; i < operations.size(); i++)
+ {
+ Operation op = operations.get(i);
+ op.runInAWTThread(comp);
+ }
+
+ // add the JARs before checking deps since dep check might
+ // require all JARs to be present
+ for(int i = 0; i < toLoad.size(); i++)
+ {
+ String pluginName = toLoad.get(i);
+ if(jEdit.getPluginJAR(pluginName) != null)
+ {
+ Log.log(Log.WARNING,this,"Already loaded: "
+ + pluginName);
+ }
+ else
+ jEdit.addPluginJAR(pluginName);
+ }
+
+ for(int i = 0; i < toLoad.size(); i++)
+ {
+ String pluginName = toLoad.get(i);
+ PluginJAR plugin = jEdit.getPluginJAR(pluginName);
+ if(plugin != null)
+ plugin.checkDependencies();
+ }
+
+ // now activate the plugins
+ for(int i = 0; i < toLoad.size(); i++)
+ {
+ String pluginName = toLoad.get(i);
+ PluginJAR plugin = jEdit.getPluginJAR(pluginName);
+ if(plugin != null)
+ plugin.activatePluginIfNecessary();
+ }
+ } //}}}
+
+ //{{{ Private members
+ private static File downloadDir;
+
+ private List<Operation> operations;
+ private List<String> toLoad;
+
+ //{{{ addOperation() method
+ private void addOperation(Operation op)
+ {
+ for(int i = 0; i < operations.size(); i++)
+ {
+ if(operations.get(i).equals(op))
+ return;
+ }
+
+ operations.add(op);
+ } //}}}
+
+ //{{{ getDownloadDir() method
+ private static String getDownloadDir()
+ {
+ if(downloadDir == null)
+ {
+ String settings = jEdit.getSettingsDirectory();
+ if(settings == null)
+ settings = System.getProperty("user.home");
+ downloadDir = new File(MiscUtilities.constructPath(
+ settings,"PluginManager.download"));
+ downloadDir.mkdirs();
+ }
+
+ return downloadDir.getPath();
+ } //}}}
+
+ //}}}
+
+ //{{{ Operation interface
+ abstract static class Operation
+ {
+ public void runInWorkThread(PluginManagerProgress progress)
+ {
+ }
+
+ public void runInAWTThread(Component comp)
+ {
+ }
+
+ public int getMaximum()
+ {
+ return 0;
+ }
+ } //}}}
+
+ //{{{ Remove class
+ class Remove extends Operation
+ {
+ //{{{ Remove constructor
+ Remove(String jar)
+ {
+ this.jar = jar;
+ } //}}}
+
+ //{{{ runInAWTThread() method
+ public void runInAWTThread(Component comp)
+ {
+ // close JAR file and all JARs that depend on this
+ PluginJAR jar = jEdit.getPluginJAR(this.jar);
+ if(jar != null)
+ {
+ unloadPluginJAR(jar);
+ }
+
+ toLoad.remove(this.jar);
+
+ // remove cache file
+
+ // move JAR first
+ File jarFile = new File(this.jar);
+ File srcFile = new File(this.jar.substring(0, this.jar.length() - 4));
+
+ Log.log(Log.NOTICE,this,"Deleting " + jarFile);
+
+ boolean ok = jarFile.delete();
+
+ if(srcFile.exists())
+ {
+ ok &= recursiveDelete(srcFile);
+ }
+
+ if(!ok)
+ {
+ String[] args = {this.jar};
+ GUIUtilities.error(comp,"plugin-manager.remove-failed",args);
+ }
+ } //}}}
+
+ //{{{ unloadPluginJAR() method
+ /**
+ * This should go into a public method somewhere.
+ * @param jar the jar of the plugin
+ */
+ private void unloadPluginJAR(PluginJAR jar)
+ {
+ String[] dependents = jar.getDependentPlugins();
+ for (String path: dependents)
+ {
+ PluginJAR _jar = jEdit.getPluginJAR(path);
+ if(_jar != null)
+ {
+ toLoad.add(path);
+ unloadPluginJAR(_jar);
+ // clear cache file
+ String cachePath = jar.getCachePath();
+ if(cachePath != null)
+ new File(cachePath).delete();
+
+ }
+ }
+ jEdit.removePluginJAR(jar,false);
+
+ } //}}}
+
+ //{{{ equals() method
+ public boolean equals(Object o)
+ {
+ return o instanceof Remove
+ && ((Remove) o).jar.equals(jar);
+ } //}}}
+
+ //{{{ Private members
+ private final String jar;
+ //}}}
+ } //}}}
+
+ //{{{ Install class
+ class Install extends Operation
+ {
+ int size;
+
+ //{{{ Install constructor
+ Install(String installed, String url, String installDirectory,
+ int size)
+ {
+ // catch those hooligans passing null urls
+ if(url == null)
+ throw new NullPointerException();
+
+ this.installed = installed;
+ this.url = url;
+ this.installDirectory = installDirectory;
+ this.size = size;
+ } //}}}
+
+ //{{{ getMaximum() method
+ public int getMaximum()
+ {
+ return size;
+ } //}}}
+
+ //{{{ runInWorkThread() method
+ public void runInWorkThread(PluginManagerProgress progress)
+ {
+ String fileName = MiscUtilities.getFileName(url);
+
+ path = download(progress,fileName,url);
+ } //}}}
+
+ //{{{ runInAWTThread() method
+ public void runInAWTThread(Component comp)
+ {
+ // check if download failed
+ if(path == null)
+ return;
+
+ // if download OK, remove existing version
+ if(installed != null)
+ new Remove(installed).runInAWTThread(comp);
+
+ ZipFile zipFile = null;
+
+ try
+ {
+ zipFile = new ZipFile(path);
+
+ Enumeration<? extends ZipEntry> e = zipFile.entries();
+ while(e.hasMoreElements())
+ {
+ ZipEntry entry = e.nextElement();
+ String name = entry.getName().replace('/',File.separatorChar);
+ File file = new File(installDirectory,name);
+ if(entry.isDirectory())
+ file.mkdirs();
+ else
+ {
+ new File(file.getParent()).mkdirs();
+ InputStream in = null;
+ FileOutputStream out = null;
+ try
+ {
+ in = zipFile.getInputStream(entry);
+ out = new FileOutputStream(file);
+ IOUtilities.copyStream(4096,
+ null,
+ in,
+ out,false);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(in);
+ IOUtilities.closeQuietly(out);
+ }
+ if(file.getName().toLowerCase().endsWith(".jar"))
+ toLoad.add(file.getPath());
+ }
+ }
+ }
+ catch(InterruptedIOException iio)
+ {
+ }
+ catch(ZipException e)
+ {
+ Log.log(Log.ERROR,this,e);
+ GUIUtilities.error(null,"plugin-error-download",new Object[]{""});
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+
+ String[] args = { io.getMessage() };
+ GUIUtilities.error(null,"ioerror",args);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ finally
+ {
+ try
+ {
+ if(zipFile != null)
+ zipFile.close();
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+ }
+
+ if(jEdit.getBooleanProperty(
+ "plugin-manager.deleteDownloads"))
+ {
+ new File(path).delete();
+ }
+ }
+ } //}}}
+
+ //{{{ equals() method
+ public boolean equals(Object o)
+ {
+ return o instanceof Install
+ && ((Install) o).url.equals(url);
+ } //}}}
+
+ //{{{ Private members
+ private String installed;
+ private final String url;
+ private String installDirectory;
+ private String path;
+
+ //{{{ download() method
+ private String download(PluginManagerProgress progress,
+ String fileName, String url)
+ {
+ try
+ {
+ String host = jEdit.getProperty("plugin-manager.mirror.id");
+ if (host == null || host.equals(MirrorList.Mirror.NONE))
+ host = "default";
+
+ String path = MiscUtilities.constructPath(getDownloadDir(),fileName);
+ URLConnection conn = new URL(url).openConnection();
+ progress.setStatus(jEdit.getProperty("plugin-manager.progress",new String[] {fileName, host}));
+ InputStream in = null;
+ FileOutputStream out = null;
+ try
+ {
+ in = conn.getInputStream();
+ out = new FileOutputStream(path);
+ if(!IOUtilities.copyStream(progress,in,out,true))
+ return null;
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(in);
+ IOUtilities.closeQuietly(out);
+ }
+
+ return path;
+ }
+ catch(InterruptedIOException iio)
+ {
+ // do nothing, user clicked 'Stop'
+ return null;
+ }
+ catch(FileNotFoundException e)
+ {
+ Log.log(Log.ERROR,this,e);
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ GUIUtilities.error(null,"plugin-error-download",new Object[]{""});
+ }
+ });
+
+ return null;
+ }
+ catch(final IOException io)
+ {
+ Log.log(Log.ERROR,this,io);
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ String[] args = { io.getMessage() };
+ GUIUtilities.error(null,"plugin-error-download",args);
+ }
+ });
+
+ return null;
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+
+ return null;
+ }
+ } //}}}
+
+ //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/package.html b/jEdit/org/gjt/sp/jedit/pluginmgr/package.html
index 2f5dad5..5d3e174 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/package.html
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/package.html
@@ -1 +1 @@
-<html><body>The plugin manager.</body></html>
+<html><body>The plugin manager.</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/pluginmgr/plugins.dtd b/jEdit/org/gjt/sp/jedit/pluginmgr/plugins.dtd
index aa00950..b937768 100644
--- a/jEdit/org/gjt/sp/jedit/pluginmgr/plugins.dtd
+++ b/jEdit/org/gjt/sp/jedit/pluginmgr/plugins.dtd
@@ -1,40 +1,40 @@
-<!-- DTD used to validate the XML file pulled down from plugin central -->
-
-<!ENTITY % att-bool '( TRUE | FALSE )' >
-
-<!ELEMENT DESCRIPTION ( #PCDATA ) >
-
-<!ELEMENT PLUGINS ( PLUGIN_SET | PLUGIN )+ >
-
-<!ELEMENT PLUGIN_SET ( DESCRIPTION, PLUGIN_SET_ENTRY+ ) >
-<!ATTLIST PLUGIN_SET
- NAME CDATA #REQUIRED >
-<!ELEMENT PLUGIN_SET_ENTRY ( #PCDATA ) >
-
-<!ELEMENT PLUGIN ( DESCRIPTION, AUTHOR+, BRANCH+ ) >
-<!ATTLIST PLUGIN
- JAR CDATA #REQUIRED
- NAME CDATA #REQUIRED >
-
-<!ELEMENT AUTHOR ( #PCDATA ) >
-
-<!ELEMENT BRANCH ( DOWNLOAD, DOWNLOAD_SOURCE, ( DEPEND+ ) ) >
-<!ATTLIST BRANCH
- VERSION CDATA #REQUIRED
- DATE CDATA #REQUIRED
- OBSOLETE %att-bool; "FALSE" >
-
-<!ELEMENT DOWNLOAD ( #PCDATA ) >
-<!ATTLIST DOWNLOAD
- SIZE CDATA #REQUIRED >
-
-<!ELEMENT DOWNLOAD_SOURCE ( #PCDATA ) >
-<!ATTLIST DOWNLOAD_SOURCE
- SIZE CDATA #REQUIRED >
-
-<!ELEMENT DEPEND EMPTY >
-<!ATTLIST DEPEND
- WHAT CDATA #REQUIRED
- FROM CDATA #IMPLIED
- TO CDATA #IMPLIED
- PLUGIN CDATA #IMPLIED >
+<!-- DTD used to validate the XML file pulled down from plugin central -->
+
+<!ENTITY % att-bool '( TRUE | FALSE )' >
+
+<!ELEMENT DESCRIPTION ( #PCDATA ) >
+
+<!ELEMENT PLUGINS ( PLUGIN_SET | PLUGIN )+ >
+
+<!ELEMENT PLUGIN_SET ( DESCRIPTION, PLUGIN_SET_ENTRY+ ) >
+<!ATTLIST PLUGIN_SET
+ NAME CDATA #REQUIRED >
+<!ELEMENT PLUGIN_SET_ENTRY ( #PCDATA ) >
+
+<!ELEMENT PLUGIN ( DESCRIPTION, AUTHOR+, BRANCH+ ) >
+<!ATTLIST PLUGIN
+ JAR CDATA #REQUIRED
+ NAME CDATA #REQUIRED >
+
+<!ELEMENT AUTHOR ( #PCDATA ) >
+
+<!ELEMENT BRANCH ( DOWNLOAD, DOWNLOAD_SOURCE, ( DEPEND+ ) ) >
+<!ATTLIST BRANCH
+ VERSION CDATA #REQUIRED
+ DATE CDATA #REQUIRED
+ OBSOLETE %att-bool; "FALSE" >
+
+<!ELEMENT DOWNLOAD ( #PCDATA ) >
+<!ATTLIST DOWNLOAD
+ SIZE CDATA #REQUIRED >
+
+<!ELEMENT DOWNLOAD_SOURCE ( #PCDATA ) >
+<!ATTLIST DOWNLOAD_SOURCE
+ SIZE CDATA #REQUIRED >
+
+<!ELEMENT DEPEND EMPTY >
+<!ATTLIST DEPEND
+ WHAT CDATA #REQUIRED
+ FROM CDATA #IMPLIED
+ TO CDATA #IMPLIED
+ PLUGIN CDATA #IMPLIED >
diff --git a/jEdit/org/gjt/sp/jedit/print/BufferPrintable.java b/jEdit/org/gjt/sp/jedit/print/BufferPrintable.java
index fc6618a..a7be7bd 100644
--- a/jEdit/org/gjt/sp/jedit/print/BufferPrintable.java
+++ b/jEdit/org/gjt/sp/jedit/print/BufferPrintable.java
@@ -1,417 +1,417 @@
-/*
- * BufferPrintable.java - Printable implementation
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2003 Slava Pestov
- * Portions copyright (C) 2002 Thomas Dilts
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.print;
-
-//{{{ Imports
-import javax.swing.text.TabExpander;
-import javax.swing.SwingUtilities;
-import java.awt.font.*;
-import java.awt.geom.*;
-import java.awt.print.*;
-import java.awt.*;
-import java.lang.reflect.Method;
-import java.util.*;
-import java.util.List;
-
-import org.gjt.sp.jedit.syntax.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * @version $Id: BufferPrintable.java 12504 2008-04-22 23:12:43Z ezust $
- */
-class BufferPrintable implements Printable
-{
- //{{{ BufferPrintable constructor
- BufferPrintable(PrinterJob job, Object format,
- View view, Buffer buffer, Font font, boolean header,
- boolean footer, boolean lineNumbers, boolean color)
- {
- this.job = job;
- this.format = format;
- this.view = view;
- this.buffer = buffer;
- this.font = font;
- this.header = header;
- this.footer = footer;
- this.lineNumbers = lineNumbers;
-
- styles = org.gjt.sp.util.SyntaxUtilities.loadStyles(jEdit.getProperty("print.font"),
- jEdit.getIntegerProperty("print.fontsize",10),color);
- styles[Token.NULL] = new SyntaxStyle(textColor,null,font);
-
- // Change any white text to black
- for(int i = 0; i < styles.length; i++)
- {
- SyntaxStyle s = styles[i];
- if(s.getForegroundColor().equals(Color.WHITE)
- && s.getBackgroundColor() == null)
- {
- styles[i] = new SyntaxStyle(
- Color.BLACK,
- styles[i].getBackgroundColor(),
- styles[i].getFont());
- }
- }
-
- lineList = new ArrayList<Chunk>();
-
- tokenHandler = new DisplayTokenHandler();
- } //}}}
-
- //{{{ print() method
- public void print()
- {
- try
- {
- //buffer.readLock();
-
- if(format == null)
- job.print();
- else
- {
- Method method = PrinterJob.class.getMethod(
- "print",new Class[] { Class.forName(
- "javax.print.attribute.PrintRequestAttributeSet") });
- method.invoke(job,new Object[] { format });
- }
- }
- catch(PrinterAbortException ae)
- {
- Log.log(Log.DEBUG,this,ae);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- final String[] args = { e.toString() };
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- GUIUtilities.error(view,"print-error",args);
- }
- });
- }
- finally
- {
- //buffer.readUnlock();
- }
- } //}}}
-
- //{{{ print() method
- public int print(Graphics _gfx, PageFormat pageFormat, int pageIndex)
- throws PrinterException
- {
- // we keep the first non-null frc we get, since sometimes
- // we get invalid ones on subsequent pages on Windows
- if(frc == null)
- {
- frc = ((Graphics2D)_gfx).getFontRenderContext();
- Log.log(Log.DEBUG,this,"Font render context is " + frc);
- }
-
- Log.log(Log.DEBUG,this,"Asked to print page " + pageIndex);
- Log.log(Log.DEBUG,this,"Current page is " + currentPage);
-
- if(pageIndex > currentPage)
- {
- for(int i = currentPage; i < pageIndex; i++)
- {
- Log.log(Log.DEBUG,this,"Current physical line is now " + currentPageStart);
- currentPhysicalLine = currentPageStart;
- printPage(_gfx,pageFormat,i,true);
- }
-
- currentPage = pageIndex - 1;
- Log.log(Log.DEBUG,this,"Current page is now " + currentPage);
- }
-
- if(pageIndex == currentPage + 1)
- {
- if(end)
- {
- Log.log(Log.DEBUG,this,"The end");
- return NO_SUCH_PAGE;
- }
-
- currentPageStart = currentPhysicalLine;
- Log.log(Log.DEBUG,this,"#2 - Current physical line is now " + currentPageStart);
- currentPage = pageIndex;
- Log.log(Log.DEBUG,this,"#2 - Current page is now " + currentPage);
- }
- else if(pageIndex == currentPage)
- {
- currentPhysicalLine = currentPageStart;
- Log.log(Log.DEBUG,this,"#3 - Current physical line is now " + currentPageStart);
- }
-
- printPage(_gfx,pageFormat,pageIndex,true);
-
- return PAGE_EXISTS;
- } //}}}
-
- //{{{ Private members
-
- //{{{ Static variables
- private static Color headerColor = Color.lightGray;
- private static Color headerTextColor = Color.black;
- private static Color footerColor = Color.lightGray;
- private static Color footerTextColor = Color.black;
- private static Color lineNumberColor = Color.gray;
- private static Color textColor = Color.black;
- //}}}
-
- //{{{ Instance variables
- private PrinterJob job;
- private Object format;
-
- private View view;
- private Buffer buffer;
- private Font font;
- private SyntaxStyle[] styles;
- private boolean header;
- private boolean footer;
- private boolean lineNumbers;
-
- private int currentPage;
- private int currentPageStart;
- private int currentPhysicalLine;
- private boolean end;
-
- private LineMetrics lm;
- private final List<Chunk> lineList;
-
- private FontRenderContext frc;
-
- private DisplayTokenHandler tokenHandler;
- //}}}
-
- //{{{ printPage() method
- private void printPage(Graphics _gfx, PageFormat pageFormat, int pageIndex,
- boolean actuallyPaint)
- {
- Log.log(Log.DEBUG,this,"printPage(" + pageIndex + ',' + actuallyPaint + ')');
- Graphics2D gfx = (Graphics2D)_gfx;
- gfx.setFont(font);
-
- double pageX = pageFormat.getImageableX();
- double pageY = pageFormat.getImageableY();
- double pageWidth = pageFormat.getImageableWidth();
- double pageHeight = pageFormat.getImageableHeight();
-
- Log.log(Log.DEBUG,this,"#1 - Page dimensions: " + pageWidth
- + 'x' + pageHeight);
-
- if(header)
- {
- double headerHeight = paintHeader(gfx,pageX,pageY,pageWidth,
- actuallyPaint);
- pageY += headerHeight;
- pageHeight -= headerHeight;
- }
-
- if(footer)
- {
- double footerHeight = paintFooter(gfx,pageX,pageY,pageWidth,
- pageHeight,pageIndex,actuallyPaint);
- pageHeight -= footerHeight;
- }
-
- boolean glyphVector = jEdit.getBooleanProperty("print.glyphVector");
- double lineNumberWidth;
-
- //{{{ determine line number width
- if(lineNumbers)
- {
- // the +1's ensure that 99 gets 3 digits, 103 gets 4 digits,
- // and so on.
- int lineNumberDigits = (int)Math.ceil(Math.log(buffer.getLineCount() + 1)
- / Math.log(10)) + 1;
-
- // now that we know how many chars there are, get the width.
- char[] chars = new char[lineNumberDigits];
- for(int i = 0; i < chars.length; i++)
- chars[i] = ' ';
- lineNumberWidth = font.getStringBounds(chars,
- 0,lineNumberDigits,frc).getWidth();
- }
- else
- lineNumberWidth = 0.0;
- //}}}
-
- Log.log(Log.DEBUG,this,"#2 - Page dimensions: "
- + (pageWidth - lineNumberWidth)
- + 'x' + pageHeight);
-
- //{{{ calculate tab size
- int tabSize = jEdit.getIntegerProperty("print.tabSize",8);
- char[] chars = new char[tabSize];
- for(int i = 0; i < chars.length; i++)
- chars[i] = ' ';
- double tabWidth = font.getStringBounds(chars,
- 0,tabSize,frc).getWidth();
- PrintTabExpander e = new PrintTabExpander(tabWidth);
- //}}}
-
- lm = font.getLineMetrics("gGyYX",frc);
- Log.log(Log.DEBUG,this,"Line height is " + lm.getHeight());
-
- double y = 0.0;
-print_loop: for(;;)
- {
- if(currentPhysicalLine == buffer.getLineCount())
- {
- Log.log(Log.DEBUG,this,"Finished buffer");
- end = true;
- break print_loop;
- }
- if (!jEdit.getBooleanProperty("print.folds",true) &&
- !view.getTextArea().getDisplayManager().isLineVisible(currentPhysicalLine))
- {
-
- Log.log(Log.DEBUG,this,"Skipping invisible line");
- currentPhysicalLine++;
- continue;
- }
-
- lineList.clear();
-
- tokenHandler.init(styles,frc,e,lineList,
- (float)(pageWidth - lineNumberWidth));
-
- buffer.markTokens(currentPhysicalLine,tokenHandler);
- if(lineList.isEmpty())
- lineList.add(null);
-
- if(y + (lm.getHeight() * lineList.size()) >= pageHeight)
- {
- Log.log(Log.DEBUG,this,"Finished page before line " + currentPhysicalLine);
- break print_loop;
- }
-
- if(lineNumbers && actuallyPaint)
- {
- gfx.setFont(font);
- gfx.setColor(lineNumberColor);
- gfx.drawString(String.valueOf(currentPhysicalLine + 1),
- (float)pageX,(float)(pageY + y + lm.getHeight()));
- }
-
- for(int i = 0; i < lineList.size(); i++)
- {
- y += lm.getHeight();
- Chunk chunks = lineList.get(i);
- if(chunks != null && actuallyPaint)
- {
- Chunk.paintChunkBackgrounds(chunks,gfx,
- (float)(pageX + lineNumberWidth),
- (float)(pageY + y));
- Chunk.paintChunkList(chunks,gfx,
- (float)(pageX + lineNumberWidth),
- (float)(pageY + y),glyphVector);
- }
- }
-
- currentPhysicalLine++;
- }
- } //}}}
-
- //{{{ paintHeader() method
- private double paintHeader(Graphics2D gfx, double pageX, double pageY,
- double pageWidth, boolean actuallyPaint)
- {
- String headerText = jEdit.getProperty("print.headerText",
- new String[] { buffer.getName() });
- FontRenderContext frc = gfx.getFontRenderContext();
- lm = font.getLineMetrics(headerText,frc);
-
- Rectangle2D bounds = font.getStringBounds(headerText,frc);
- Rectangle2D headerBounds = new Rectangle2D.Double(
- pageX,pageY,pageWidth,bounds.getHeight());
-
- if(actuallyPaint)
- {
- gfx.setColor(headerColor);
- gfx.fill(headerBounds);
- gfx.setColor(headerTextColor);
- gfx.drawString(headerText,
- (float)(pageX + (pageWidth - bounds.getWidth()) / 2),
- (float)(pageY + lm.getAscent()));
- }
-
- return headerBounds.getHeight();
- }
- //}}}
-
- //{{{ paintFooter() method
- private double paintFooter(Graphics2D gfx, double pageX, double pageY,
- double pageWidth, double pageHeight, int pageIndex,
- boolean actuallyPaint)
- {
- String footerText = jEdit.getProperty("print.footerText",
- new Object[] { new Date(), Integer.valueOf(pageIndex + 1)});
- FontRenderContext frc = gfx.getFontRenderContext();
- lm = font.getLineMetrics(footerText,frc);
-
- Rectangle2D bounds = font.getStringBounds(footerText,frc);
- Rectangle2D footerBounds = new Rectangle2D.Double(
- pageX,pageY + pageHeight - bounds.getHeight(),
- pageWidth,bounds.getHeight());
-
- if(actuallyPaint)
- {
- gfx.setColor(footerColor);
- gfx.fill(footerBounds);
- gfx.setColor(footerTextColor);
- gfx.drawString(footerText,
- (float)(pageX + (pageWidth - bounds.getWidth()) / 2),
- (float)(pageY + pageHeight - bounds.getHeight()
- + lm.getAscent()));
- }
-
- return footerBounds.getHeight();
- } //}}}
-
- //}}}
-
- //{{{ PrintTabExpander class
- static class PrintTabExpander implements TabExpander
- {
- private double tabWidth;
-
- //{{{ PrintTabExpander constructor
- PrintTabExpander(double tabWidth)
- {
- this.tabWidth = tabWidth;
- } //}}}
-
- //{{{ nextTabStop() method
- public float nextTabStop(float x, int tabOffset)
- {
- int ntabs = (int)((x + 1) / tabWidth);
- return (float)((ntabs + 1) * tabWidth);
- } //}}}
- } //}}}
-}
+/*
+ * BufferPrintable.java - Printable implementation
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2003 Slava Pestov
+ * Portions copyright (C) 2002 Thomas Dilts
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.print;
+
+//{{{ Imports
+import javax.swing.text.TabExpander;
+import javax.swing.SwingUtilities;
+import java.awt.font.*;
+import java.awt.geom.*;
+import java.awt.print.*;
+import java.awt.*;
+import java.lang.reflect.Method;
+import java.util.*;
+import java.util.List;
+
+import org.gjt.sp.jedit.syntax.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * @version $Id: BufferPrintable.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+class BufferPrintable implements Printable
+{
+ //{{{ BufferPrintable constructor
+ BufferPrintable(PrinterJob job, Object format,
+ View view, Buffer buffer, Font font, boolean header,
+ boolean footer, boolean lineNumbers, boolean color)
+ {
+ this.job = job;
+ this.format = format;
+ this.view = view;
+ this.buffer = buffer;
+ this.font = font;
+ this.header = header;
+ this.footer = footer;
+ this.lineNumbers = lineNumbers;
+
+ styles = org.gjt.sp.util.SyntaxUtilities.loadStyles(jEdit.getProperty("print.font"),
+ jEdit.getIntegerProperty("print.fontsize",10),color);
+ styles[Token.NULL] = new SyntaxStyle(textColor,null,font);
+
+ // Change any white text to black
+ for(int i = 0; i < styles.length; i++)
+ {
+ SyntaxStyle s = styles[i];
+ if(s.getForegroundColor().equals(Color.WHITE)
+ && s.getBackgroundColor() == null)
+ {
+ styles[i] = new SyntaxStyle(
+ Color.BLACK,
+ styles[i].getBackgroundColor(),
+ styles[i].getFont());
+ }
+ }
+
+ lineList = new ArrayList<Chunk>();
+
+ tokenHandler = new DisplayTokenHandler();
+ } //}}}
+
+ //{{{ print() method
+ public void print()
+ {
+ try
+ {
+ //buffer.readLock();
+
+ if(format == null)
+ job.print();
+ else
+ {
+ Method method = PrinterJob.class.getMethod(
+ "print",new Class[] { Class.forName(
+ "javax.print.attribute.PrintRequestAttributeSet") });
+ method.invoke(job,new Object[] { format });
+ }
+ }
+ catch(PrinterAbortException ae)
+ {
+ Log.log(Log.DEBUG,this,ae);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ final String[] args = { e.toString() };
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ GUIUtilities.error(view,"print-error",args);
+ }
+ });
+ }
+ finally
+ {
+ //buffer.readUnlock();
+ }
+ } //}}}
+
+ //{{{ print() method
+ public int print(Graphics _gfx, PageFormat pageFormat, int pageIndex)
+ throws PrinterException
+ {
+ // we keep the first non-null frc we get, since sometimes
+ // we get invalid ones on subsequent pages on Windows
+ if(frc == null)
+ {
+ frc = ((Graphics2D)_gfx).getFontRenderContext();
+ Log.log(Log.DEBUG,this,"Font render context is " + frc);
+ }
+
+ Log.log(Log.DEBUG,this,"Asked to print page " + pageIndex);
+ Log.log(Log.DEBUG,this,"Current page is " + currentPage);
+
+ if(pageIndex > currentPage)
+ {
+ for(int i = currentPage; i < pageIndex; i++)
+ {
+ Log.log(Log.DEBUG,this,"Current physical line is now " + currentPageStart);
+ currentPhysicalLine = currentPageStart;
+ printPage(_gfx,pageFormat,i,true);
+ }
+
+ currentPage = pageIndex - 1;
+ Log.log(Log.DEBUG,this,"Current page is now " + currentPage);
+ }
+
+ if(pageIndex == currentPage + 1)
+ {
+ if(end)
+ {
+ Log.log(Log.DEBUG,this,"The end");
+ return NO_SUCH_PAGE;
+ }
+
+ currentPageStart = currentPhysicalLine;
+ Log.log(Log.DEBUG,this,"#2 - Current physical line is now " + currentPageStart);
+ currentPage = pageIndex;
+ Log.log(Log.DEBUG,this,"#2 - Current page is now " + currentPage);
+ }
+ else if(pageIndex == currentPage)
+ {
+ currentPhysicalLine = currentPageStart;
+ Log.log(Log.DEBUG,this,"#3 - Current physical line is now " + currentPageStart);
+ }
+
+ printPage(_gfx,pageFormat,pageIndex,true);
+
+ return PAGE_EXISTS;
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Static variables
+ private static Color headerColor = Color.lightGray;
+ private static Color headerTextColor = Color.black;
+ private static Color footerColor = Color.lightGray;
+ private static Color footerTextColor = Color.black;
+ private static Color lineNumberColor = Color.gray;
+ private static Color textColor = Color.black;
+ //}}}
+
+ //{{{ Instance variables
+ private PrinterJob job;
+ private Object format;
+
+ private View view;
+ private Buffer buffer;
+ private Font font;
+ private SyntaxStyle[] styles;
+ private boolean header;
+ private boolean footer;
+ private boolean lineNumbers;
+
+ private int currentPage;
+ private int currentPageStart;
+ private int currentPhysicalLine;
+ private boolean end;
+
+ private LineMetrics lm;
+ private final List<Chunk> lineList;
+
+ private FontRenderContext frc;
+
+ private DisplayTokenHandler tokenHandler;
+ //}}}
+
+ //{{{ printPage() method
+ private void printPage(Graphics _gfx, PageFormat pageFormat, int pageIndex,
+ boolean actuallyPaint)
+ {
+ Log.log(Log.DEBUG,this,"printPage(" + pageIndex + ',' + actuallyPaint + ')');
+ Graphics2D gfx = (Graphics2D)_gfx;
+ gfx.setFont(font);
+
+ double pageX = pageFormat.getImageableX();
+ double pageY = pageFormat.getImageableY();
+ double pageWidth = pageFormat.getImageableWidth();
+ double pageHeight = pageFormat.getImageableHeight();
+
+ Log.log(Log.DEBUG,this,"#1 - Page dimensions: " + pageWidth
+ + 'x' + pageHeight);
+
+ if(header)
+ {
+ double headerHeight = paintHeader(gfx,pageX,pageY,pageWidth,
+ actuallyPaint);
+ pageY += headerHeight;
+ pageHeight -= headerHeight;
+ }
+
+ if(footer)
+ {
+ double footerHeight = paintFooter(gfx,pageX,pageY,pageWidth,
+ pageHeight,pageIndex,actuallyPaint);
+ pageHeight -= footerHeight;
+ }
+
+ boolean glyphVector = jEdit.getBooleanProperty("print.glyphVector");
+ double lineNumberWidth;
+
+ //{{{ determine line number width
+ if(lineNumbers)
+ {
+ // the +1's ensure that 99 gets 3 digits, 103 gets 4 digits,
+ // and so on.
+ int lineNumberDigits = (int)Math.ceil(Math.log(buffer.getLineCount() + 1)
+ / Math.log(10)) + 1;
+
+ // now that we know how many chars there are, get the width.
+ char[] chars = new char[lineNumberDigits];
+ for(int i = 0; i < chars.length; i++)
+ chars[i] = ' ';
+ lineNumberWidth = font.getStringBounds(chars,
+ 0,lineNumberDigits,frc).getWidth();
+ }
+ else
+ lineNumberWidth = 0.0;
+ //}}}
+
+ Log.log(Log.DEBUG,this,"#2 - Page dimensions: "
+ + (pageWidth - lineNumberWidth)
+ + 'x' + pageHeight);
+
+ //{{{ calculate tab size
+ int tabSize = jEdit.getIntegerProperty("print.tabSize",8);
+ char[] chars = new char[tabSize];
+ for(int i = 0; i < chars.length; i++)
+ chars[i] = ' ';
+ double tabWidth = font.getStringBounds(chars,
+ 0,tabSize,frc).getWidth();
+ PrintTabExpander e = new PrintTabExpander(tabWidth);
+ //}}}
+
+ lm = font.getLineMetrics("gGyYX",frc);
+ Log.log(Log.DEBUG,this,"Line height is " + lm.getHeight());
+
+ double y = 0.0;
+print_loop: for(;;)
+ {
+ if(currentPhysicalLine == buffer.getLineCount())
+ {
+ Log.log(Log.DEBUG,this,"Finished buffer");
+ end = true;
+ break print_loop;
+ }
+ if (!jEdit.getBooleanProperty("print.folds",true) &&
+ !view.getTextArea().getDisplayManager().isLineVisible(currentPhysicalLine))
+ {
+
+ Log.log(Log.DEBUG,this,"Skipping invisible line");
+ currentPhysicalLine++;
+ continue;
+ }
+
+ lineList.clear();
+
+ tokenHandler.init(styles,frc,e,lineList,
+ (float)(pageWidth - lineNumberWidth));
+
+ buffer.markTokens(currentPhysicalLine,tokenHandler);
+ if(lineList.isEmpty())
+ lineList.add(null);
+
+ if(y + (lm.getHeight() * lineList.size()) >= pageHeight)
+ {
+ Log.log(Log.DEBUG,this,"Finished page before line " + currentPhysicalLine);
+ break print_loop;
+ }
+
+ if(lineNumbers && actuallyPaint)
+ {
+ gfx.setFont(font);
+ gfx.setColor(lineNumberColor);
+ gfx.drawString(String.valueOf(currentPhysicalLine + 1),
+ (float)pageX,(float)(pageY + y + lm.getHeight()));
+ }
+
+ for(int i = 0; i < lineList.size(); i++)
+ {
+ y += lm.getHeight();
+ Chunk chunks = lineList.get(i);
+ if(chunks != null && actuallyPaint)
+ {
+ Chunk.paintChunkBackgrounds(chunks,gfx,
+ (float)(pageX + lineNumberWidth),
+ (float)(pageY + y));
+ Chunk.paintChunkList(chunks,gfx,
+ (float)(pageX + lineNumberWidth),
+ (float)(pageY + y),glyphVector);
+ }
+ }
+
+ currentPhysicalLine++;
+ }
+ } //}}}
+
+ //{{{ paintHeader() method
+ private double paintHeader(Graphics2D gfx, double pageX, double pageY,
+ double pageWidth, boolean actuallyPaint)
+ {
+ String headerText = jEdit.getProperty("print.headerText",
+ new String[] { buffer.getName() });
+ FontRenderContext frc = gfx.getFontRenderContext();
+ lm = font.getLineMetrics(headerText,frc);
+
+ Rectangle2D bounds = font.getStringBounds(headerText,frc);
+ Rectangle2D headerBounds = new Rectangle2D.Double(
+ pageX,pageY,pageWidth,bounds.getHeight());
+
+ if(actuallyPaint)
+ {
+ gfx.setColor(headerColor);
+ gfx.fill(headerBounds);
+ gfx.setColor(headerTextColor);
+ gfx.drawString(headerText,
+ (float)(pageX + (pageWidth - bounds.getWidth()) / 2),
+ (float)(pageY + lm.getAscent()));
+ }
+
+ return headerBounds.getHeight();
+ }
+ //}}}
+
+ //{{{ paintFooter() method
+ private double paintFooter(Graphics2D gfx, double pageX, double pageY,
+ double pageWidth, double pageHeight, int pageIndex,
+ boolean actuallyPaint)
+ {
+ String footerText = jEdit.getProperty("print.footerText",
+ new Object[] { new Date(), Integer.valueOf(pageIndex + 1)});
+ FontRenderContext frc = gfx.getFontRenderContext();
+ lm = font.getLineMetrics(footerText,frc);
+
+ Rectangle2D bounds = font.getStringBounds(footerText,frc);
+ Rectangle2D footerBounds = new Rectangle2D.Double(
+ pageX,pageY + pageHeight - bounds.getHeight(),
+ pageWidth,bounds.getHeight());
+
+ if(actuallyPaint)
+ {
+ gfx.setColor(footerColor);
+ gfx.fill(footerBounds);
+ gfx.setColor(footerTextColor);
+ gfx.drawString(footerText,
+ (float)(pageX + (pageWidth - bounds.getWidth()) / 2),
+ (float)(pageY + pageHeight - bounds.getHeight()
+ + lm.getAscent()));
+ }
+
+ return footerBounds.getHeight();
+ } //}}}
+
+ //}}}
+
+ //{{{ PrintTabExpander class
+ static class PrintTabExpander implements TabExpander
+ {
+ private double tabWidth;
+
+ //{{{ PrintTabExpander constructor
+ PrintTabExpander(double tabWidth)
+ {
+ this.tabWidth = tabWidth;
+ } //}}}
+
+ //{{{ nextTabStop() method
+ public float nextTabStop(float x, int tabOffset)
+ {
+ int ntabs = (int)((x + 1) / tabWidth);
+ return (float)((ntabs + 1) * tabWidth);
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/print/BufferPrinter1_3.java b/jEdit/org/gjt/sp/jedit/print/BufferPrinter1_3.java
index 447b5b2..0d3bf55 100644
--- a/jEdit/org/gjt/sp/jedit/print/BufferPrinter1_3.java
+++ b/jEdit/org/gjt/sp/jedit/print/BufferPrinter1_3.java
@@ -1,113 +1,113 @@
-/*
- * BufferPrinter1_3.java - Main class that controls printing
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- * Portions copyright (C) 2002 Thomas Dilts
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.print;
-
-//{{{ Imports
-import java.awt.print.*;
-import java.awt.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class BufferPrinter1_3
-{
- //{{{ getPrintJob() method
- private static PrinterJob getPrintJob()
- {
- job = PrinterJob.getPrinterJob();
-
- int orientation = jEdit.getIntegerProperty("print.orientation",PageFormat.PORTRAIT);
- double width = jEdit.getDoubleProperty("print.width",0);
- double height = jEdit.getDoubleProperty("print.height",0);
- double x = jEdit.getDoubleProperty("print.x",0);
- double y = jEdit.getDoubleProperty("print.y",0);
- double pagewidth = jEdit.getDoubleProperty("print.pagewidth",0);
- double pageheight = jEdit.getDoubleProperty("print.pageheight",0);
-
- format = job.defaultPage();
- //format.setOrientation(PageFormat.PORTRAIT);
- if(width!=0 && height!=0 )
- {
- Paper pap = format.getPaper();
- pap.setImageableArea(x,y,width,height);
- pap.setSize(pagewidth,pageheight);
- format.setPaper(pap);
- }
- format.setOrientation(orientation);
- return job;
-
- }//}}}
-
- //{{{ pageSetup() method
- public static void pageSetup(View view)
- {
- job = getPrintJob();
-
- PageFormat newFormat = job.pageDialog(format);
- if(newFormat != null)
- {
- format = newFormat;
- jEdit.setIntegerProperty("print.orientation",format.getOrientation());
- Paper paper=format.getPaper();
-
- jEdit.setDoubleProperty("print.width",paper.getImageableWidth());
- jEdit.setDoubleProperty("print.height",paper.getImageableHeight());
- jEdit.setDoubleProperty("print.x",paper.getImageableX());
- jEdit.setDoubleProperty("print.y",paper.getImageableY());
- jEdit.setDoubleProperty("print.pagewidth",paper.getWidth());
- jEdit.setDoubleProperty("print.pageheight",paper.getHeight());
- }
- } //}}}
-
- //{{{ print() method
- public static void print(final View view, final Buffer buffer, boolean selection)
- {
- job = getPrintJob();
- job.setJobName(buffer.getPath());
- boolean header = jEdit.getBooleanProperty("print.header");
- boolean footer = jEdit.getBooleanProperty("print.footer");
- boolean lineNumbers = jEdit.getBooleanProperty("print.lineNumbers");
- boolean color = jEdit.getBooleanProperty("print.color");
- Font font = jEdit.getFontProperty("print.font");
-
- BufferPrintable printable = new BufferPrintable(job,null,view,
- buffer,font,header,footer,lineNumbers,color);
- job.setPrintable(printable,format);
-
- if(!job.printDialog())
- return;
-
- printable.print();
- } //}}}
-
- //{{{ getPageFormat() method
- public static PageFormat getPageFormat()
- {
- return format;
- } //}}}
-
- //{{{ Private members
- private static PageFormat format;
- private static PrinterJob job;
- //}}}
-}
+/*
+ * BufferPrinter1_3.java - Main class that controls printing
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ * Portions copyright (C) 2002 Thomas Dilts
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.print;
+
+//{{{ Imports
+import java.awt.print.*;
+import java.awt.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class BufferPrinter1_3
+{
+ //{{{ getPrintJob() method
+ private static PrinterJob getPrintJob()
+ {
+ job = PrinterJob.getPrinterJob();
+
+ int orientation = jEdit.getIntegerProperty("print.orientation",PageFormat.PORTRAIT);
+ double width = jEdit.getDoubleProperty("print.width",0);
+ double height = jEdit.getDoubleProperty("print.height",0);
+ double x = jEdit.getDoubleProperty("print.x",0);
+ double y = jEdit.getDoubleProperty("print.y",0);
+ double pagewidth = jEdit.getDoubleProperty("print.pagewidth",0);
+ double pageheight = jEdit.getDoubleProperty("print.pageheight",0);
+
+ format = job.defaultPage();
+ //format.setOrientation(PageFormat.PORTRAIT);
+ if(width!=0 && height!=0 )
+ {
+ Paper pap = format.getPaper();
+ pap.setImageableArea(x,y,width,height);
+ pap.setSize(pagewidth,pageheight);
+ format.setPaper(pap);
+ }
+ format.setOrientation(orientation);
+ return job;
+
+ }//}}}
+
+ //{{{ pageSetup() method
+ public static void pageSetup(View view)
+ {
+ job = getPrintJob();
+
+ PageFormat newFormat = job.pageDialog(format);
+ if(newFormat != null)
+ {
+ format = newFormat;
+ jEdit.setIntegerProperty("print.orientation",format.getOrientation());
+ Paper paper=format.getPaper();
+
+ jEdit.setDoubleProperty("print.width",paper.getImageableWidth());
+ jEdit.setDoubleProperty("print.height",paper.getImageableHeight());
+ jEdit.setDoubleProperty("print.x",paper.getImageableX());
+ jEdit.setDoubleProperty("print.y",paper.getImageableY());
+ jEdit.setDoubleProperty("print.pagewidth",paper.getWidth());
+ jEdit.setDoubleProperty("print.pageheight",paper.getHeight());
+ }
+ } //}}}
+
+ //{{{ print() method
+ public static void print(final View view, final Buffer buffer, boolean selection)
+ {
+ job = getPrintJob();
+ job.setJobName(buffer.getPath());
+ boolean header = jEdit.getBooleanProperty("print.header");
+ boolean footer = jEdit.getBooleanProperty("print.footer");
+ boolean lineNumbers = jEdit.getBooleanProperty("print.lineNumbers");
+ boolean color = jEdit.getBooleanProperty("print.color");
+ Font font = jEdit.getFontProperty("print.font");
+
+ BufferPrintable printable = new BufferPrintable(job,null,view,
+ buffer,font,header,footer,lineNumbers,color);
+ job.setPrintable(printable,format);
+
+ if(!job.printDialog())
+ return;
+
+ printable.print();
+ } //}}}
+
+ //{{{ getPageFormat() method
+ public static PageFormat getPageFormat()
+ {
+ return format;
+ } //}}}
+
+ //{{{ Private members
+ private static PageFormat format;
+ private static PrinterJob job;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/print/BufferPrinter1_4.java b/jEdit/org/gjt/sp/jedit/print/BufferPrinter1_4.java
index de44dfc..02acd94 100644
--- a/jEdit/org/gjt/sp/jedit/print/BufferPrinter1_4.java
+++ b/jEdit/org/gjt/sp/jedit/print/BufferPrinter1_4.java
@@ -1,194 +1,194 @@
-/*
- * BufferPrinter1_4.java - Main class that controls printing
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- * Portions copyright (C) 2002 Thomas Dilts
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.print;
-
-//{{{ Imports
-import javax.print.attribute.*;
-import javax.print.attribute.standard.*;
-import java.awt.print.*;
-import java.awt.*;
-import java.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-public class BufferPrinter1_4
-{
- //{{{ getPrintJob() method
- private static PrinterJob getPrintJob(String jobName)
- {
- job = PrinterJob.getPrinterJob();
-
- format = new HashPrintRequestAttributeSet();
-
- String settings = jEdit.getSettingsDirectory();
- if(settings != null)
- {
- String printSpecPath = MiscUtilities.constructPath(
- settings, "printspec");
- File filePrintSpec = new File(printSpecPath);
-
- if (filePrintSpec.exists())
- {
- try
- {
- FileInputStream fileIn = new FileInputStream(filePrintSpec);
- ObjectInputStream obIn = new ObjectInputStream(fileIn);
- format = (HashPrintRequestAttributeSet)obIn.readObject();
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,BufferPrinter1_4.class,e);
- }
- //for backwards compatibility, the color variable is stored also as a property
- if(jEdit.getBooleanProperty("print.color"))
- format.add(Chromaticity.COLOR);
- else
- format.add(Chromaticity.MONOCHROME);
-
- //no need to always keep the same job name for every printout.
- format.add(new JobName(jobName, null));
- }
- }
-
- return job;
- } //}}}
-
- //{{{ pageSetup() method
- public static void pageSetup(View view)
- {
- PrinterJob prnJob = getPrintJob("PageSetupOnly");
- if(prnJob.pageDialog(format)!=null)
- savePrintSpec();
- } //}}}
-
- //{{{ print() method
- public static void print(final View view, final Buffer buffer, boolean selection)
- {
- job = getPrintJob(buffer.getPath());
-
- boolean header = jEdit.getBooleanProperty("print.header");
- boolean footer = jEdit.getBooleanProperty("print.footer");
- boolean lineNumbers = jEdit.getBooleanProperty("print.lineNumbers");
- boolean color = jEdit.getBooleanProperty("print.color");
- Font font = jEdit.getFontProperty("print.font");
-
- BufferPrintable printable = new BufferPrintable(job,format,view,
- buffer,font,header,footer,lineNumbers,color);
- job.setPrintable(printable);
-
- if(!job.printDialog(format))
- return;
-
- savePrintSpec();
-
- printable.print();
- } //}}}
-
- //{{{ getPageFormat() method
- public static PageFormat getPageFormat()
- {
- //convert from PrintRequestAttributeSet to the pageFormat
- PrinterJob prnJob=getPrintJob(" ");
- PageFormat pf=prnJob.defaultPage();
- Paper pap=pf.getPaper();
-
- MediaSizeName media=(MediaSizeName)format.get(
- Media.class);
- MediaSize ms=MediaSize.getMediaSizeForName(media);
-
- MediaPrintableArea mediaarea=(MediaPrintableArea)format.get(
- MediaPrintableArea.class);
- if(mediaarea!=null)
- pap.setImageableArea((mediaarea.getX(MediaPrintableArea.INCH)*72),
- (mediaarea.getY(MediaPrintableArea.INCH)*72),
- (mediaarea.getWidth(MediaPrintableArea.INCH)*72),
- (mediaarea.getHeight(MediaPrintableArea.INCH)*72));
- if(ms!=null)
- pap.setSize((ms.getX(MediaSize.INCH)*72),
- (ms.getY(MediaSize.INCH)*72));
- pf.setPaper(pap);
-
- OrientationRequested orientation=(OrientationRequested)format.get(
- OrientationRequested.class);
- if(orientation!=null)
- {
- if(orientation.getValue()==OrientationRequested.LANDSCAPE.getValue())
- {
- pf.setOrientation(PageFormat.LANDSCAPE);
- }
- else if(orientation.getValue()==OrientationRequested.REVERSE_LANDSCAPE.getValue())
- {
- pf.setOrientation(PageFormat.REVERSE_LANDSCAPE);
- }
- else if(orientation.getValue()==OrientationRequested.PORTRAIT.getValue())
- {
- pf.setOrientation(PageFormat.PORTRAIT);
- }
- else if(orientation.getValue()==OrientationRequested.REVERSE_PORTRAIT.getValue())
- {
- //doesnt exist??
- //pf.setOrientation(PageFormat.REVERSE_PORTRAIT);
- //then just do the next best thing
- pf.setOrientation(PageFormat.PORTRAIT);
- }
- }
- return pf;
- } //}}}
-
- //{{{ savePrintSpec() method
- private static void savePrintSpec()
- {
- String settings = jEdit.getSettingsDirectory();
- if(settings == null)
- return;
-
- String printSpecPath = MiscUtilities.constructPath(
- settings, "printspec");
- File filePrintSpec = new File(printSpecPath);
-
- try
- {
- FileOutputStream fileOut=new FileOutputStream(filePrintSpec);
- ObjectOutputStream obOut=new ObjectOutputStream(fileOut);
- obOut.writeObject(format);
- //for backwards compatibility, the color variable is stored also as a property
- Chromaticity cc=(Chromaticity)format.get(Chromaticity.class);
- if (cc!=null)
- jEdit.setBooleanProperty("print.color",
- cc.getValue()==Chromaticity.COLOR.getValue());
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
- }
- //}}}
-
- //{{{ Private members
- private static PrintRequestAttributeSet format;
- private static PrinterJob job;
- //}}}
-}
-
+/*
+ * BufferPrinter1_4.java - Main class that controls printing
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ * Portions copyright (C) 2002 Thomas Dilts
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.print;
+
+//{{{ Imports
+import javax.print.attribute.*;
+import javax.print.attribute.standard.*;
+import java.awt.print.*;
+import java.awt.*;
+import java.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+public class BufferPrinter1_4
+{
+ //{{{ getPrintJob() method
+ private static PrinterJob getPrintJob(String jobName)
+ {
+ job = PrinterJob.getPrinterJob();
+
+ format = new HashPrintRequestAttributeSet();
+
+ String settings = jEdit.getSettingsDirectory();
+ if(settings != null)
+ {
+ String printSpecPath = MiscUtilities.constructPath(
+ settings, "printspec");
+ File filePrintSpec = new File(printSpecPath);
+
+ if (filePrintSpec.exists())
+ {
+ try
+ {
+ FileInputStream fileIn = new FileInputStream(filePrintSpec);
+ ObjectInputStream obIn = new ObjectInputStream(fileIn);
+ format = (HashPrintRequestAttributeSet)obIn.readObject();
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,BufferPrinter1_4.class,e);
+ }
+ //for backwards compatibility, the color variable is stored also as a property
+ if(jEdit.getBooleanProperty("print.color"))
+ format.add(Chromaticity.COLOR);
+ else
+ format.add(Chromaticity.MONOCHROME);
+
+ //no need to always keep the same job name for every printout.
+ format.add(new JobName(jobName, null));
+ }
+ }
+
+ return job;
+ } //}}}
+
+ //{{{ pageSetup() method
+ public static void pageSetup(View view)
+ {
+ PrinterJob prnJob = getPrintJob("PageSetupOnly");
+ if(prnJob.pageDialog(format)!=null)
+ savePrintSpec();
+ } //}}}
+
+ //{{{ print() method
+ public static void print(final View view, final Buffer buffer, boolean selection)
+ {
+ job = getPrintJob(buffer.getPath());
+
+ boolean header = jEdit.getBooleanProperty("print.header");
+ boolean footer = jEdit.getBooleanProperty("print.footer");
+ boolean lineNumbers = jEdit.getBooleanProperty("print.lineNumbers");
+ boolean color = jEdit.getBooleanProperty("print.color");
+ Font font = jEdit.getFontProperty("print.font");
+
+ BufferPrintable printable = new BufferPrintable(job,format,view,
+ buffer,font,header,footer,lineNumbers,color);
+ job.setPrintable(printable);
+
+ if(!job.printDialog(format))
+ return;
+
+ savePrintSpec();
+
+ printable.print();
+ } //}}}
+
+ //{{{ getPageFormat() method
+ public static PageFormat getPageFormat()
+ {
+ //convert from PrintRequestAttributeSet to the pageFormat
+ PrinterJob prnJob=getPrintJob(" ");
+ PageFormat pf=prnJob.defaultPage();
+ Paper pap=pf.getPaper();
+
+ MediaSizeName media=(MediaSizeName)format.get(
+ Media.class);
+ MediaSize ms=MediaSize.getMediaSizeForName(media);
+
+ MediaPrintableArea mediaarea=(MediaPrintableArea)format.get(
+ MediaPrintableArea.class);
+ if(mediaarea!=null)
+ pap.setImageableArea((mediaarea.getX(MediaPrintableArea.INCH)*72),
+ (mediaarea.getY(MediaPrintableArea.INCH)*72),
+ (mediaarea.getWidth(MediaPrintableArea.INCH)*72),
+ (mediaarea.getHeight(MediaPrintableArea.INCH)*72));
+ if(ms!=null)
+ pap.setSize((ms.getX(MediaSize.INCH)*72),
+ (ms.getY(MediaSize.INCH)*72));
+ pf.setPaper(pap);
+
+ OrientationRequested orientation=(OrientationRequested)format.get(
+ OrientationRequested.class);
+ if(orientation!=null)
+ {
+ if(orientation.getValue()==OrientationRequested.LANDSCAPE.getValue())
+ {
+ pf.setOrientation(PageFormat.LANDSCAPE);
+ }
+ else if(orientation.getValue()==OrientationRequested.REVERSE_LANDSCAPE.getValue())
+ {
+ pf.setOrientation(PageFormat.REVERSE_LANDSCAPE);
+ }
+ else if(orientation.getValue()==OrientationRequested.PORTRAIT.getValue())
+ {
+ pf.setOrientation(PageFormat.PORTRAIT);
+ }
+ else if(orientation.getValue()==OrientationRequested.REVERSE_PORTRAIT.getValue())
+ {
+ //doesnt exist??
+ //pf.setOrientation(PageFormat.REVERSE_PORTRAIT);
+ //then just do the next best thing
+ pf.setOrientation(PageFormat.PORTRAIT);
+ }
+ }
+ return pf;
+ } //}}}
+
+ //{{{ savePrintSpec() method
+ private static void savePrintSpec()
+ {
+ String settings = jEdit.getSettingsDirectory();
+ if(settings == null)
+ return;
+
+ String printSpecPath = MiscUtilities.constructPath(
+ settings, "printspec");
+ File filePrintSpec = new File(printSpecPath);
+
+ try
+ {
+ FileOutputStream fileOut=new FileOutputStream(filePrintSpec);
+ ObjectOutputStream obOut=new ObjectOutputStream(fileOut);
+ obOut.writeObject(format);
+ //for backwards compatibility, the color variable is stored also as a property
+ Chromaticity cc=(Chromaticity)format.get(Chromaticity.class);
+ if (cc!=null)
+ jEdit.setBooleanProperty("print.color",
+ cc.getValue()==Chromaticity.COLOR.getValue());
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ //}}}
+
+ //{{{ Private members
+ private static PrintRequestAttributeSet format;
+ private static PrinterJob job;
+ //}}}
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/print/package.html b/jEdit/org/gjt/sp/jedit/print/package.html
index de1c562..497f5fa 100644
--- a/jEdit/org/gjt/sp/jedit/print/package.html
+++ b/jEdit/org/gjt/sp/jedit/print/package.html
@@ -1 +1 @@
-<html><body>Printing.</body></html>
+<html><body>Printing.</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/proto/jeditresource/Handler.java b/jEdit/org/gjt/sp/jedit/proto/jeditresource/Handler.java
index b0e6e27..c76b2e6 100644
--- a/jEdit/org/gjt/sp/jedit/proto/jeditresource/Handler.java
+++ b/jEdit/org/gjt/sp/jedit/proto/jeditresource/Handler.java
@@ -1,49 +1,49 @@
-/*
- * Handler.java - jEdit plugin list URL protocol handler
- * Copyright (C) 1999 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.proto.jeditresource;
-
-import java.io.IOException;
-import java.net.*;
-/**
- *
- *
- * One somewhat unconventional requirement of URLStreamHandler classes
- * is that the class name and even the package name have certain restrictions.
- * You must name the handler class Handler, as in the previous example.
- * The package name must include the protocol name as the last dot-separated token.
- * This way, the Handler is automatically created in a lazy-fashion by the default
- * URLStreamHandlerFactory.
- *
- * see http://java.sun.com/developer/onlineTraining/protocolhandlers/
- *
- * You should never need to create an instance of this class directly.
- *
- */
-public class Handler extends URLStreamHandler
-{
-
- public URLConnection openConnection(URL url)
- throws IOException
- {
- PluginResURLConnection c = new PluginResURLConnection(url);
- c.connect();
- return c;
- }
-}
+/*
+ * Handler.java - jEdit plugin list URL protocol handler
+ * Copyright (C) 1999 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.proto.jeditresource;
+
+import java.io.IOException;
+import java.net.*;
+/**
+ *
+ *
+ * One somewhat unconventional requirement of URLStreamHandler classes
+ * is that the class name and even the package name have certain restrictions.
+ * You must name the handler class Handler, as in the previous example.
+ * The package name must include the protocol name as the last dot-separated token.
+ * This way, the Handler is automatically created in a lazy-fashion by the default
+ * URLStreamHandlerFactory.
+ *
+ * see http://java.sun.com/developer/onlineTraining/protocolhandlers/
+ *
+ * You should never need to create an instance of this class directly.
+ *
+ */
+public class Handler extends URLStreamHandler
+{
+
+ public URLConnection openConnection(URL url)
+ throws IOException
+ {
+ PluginResURLConnection c = new PluginResURLConnection(url);
+ c.connect();
+ return c;
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/proto/jeditresource/PluginResURLConnection.java b/jEdit/org/gjt/sp/jedit/proto/jeditresource/PluginResURLConnection.java
index 204e171..442c039 100644
--- a/jEdit/org/gjt/sp/jedit/proto/jeditresource/PluginResURLConnection.java
+++ b/jEdit/org/gjt/sp/jedit/proto/jeditresource/PluginResURLConnection.java
@@ -1,130 +1,130 @@
-/*
- * PluginResURLConnection.java - jEdit plugin resource URL connection
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.proto.jeditresource;
-
-//{{{ Imports
-import java.io.*;
-import java.net.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-public class PluginResURLConnection extends URLConnection
-{
- public PluginResURLConnection(URL url)
- throws IOException
- {
- super(url);
-
- String file = url.getFile();
-
- int index = file.indexOf('!',0);
- if(index == -1)
- {
- plugin = null;
- resource = file;
- }
- else
- {
- int start;
- if(file.charAt(0) == '/')
- start = 1;
- else
- start = 0;
-
- plugin = file.substring(start,index);
- resource = file.substring(index + 1);
- }
-
- if(plugin != null && resource.startsWith("/"))
- resource = resource.substring(1);
- }
-
- public void connect() throws IOException
- {
- if(!connected)
- {
- if(plugin == null)
- {
- in = jEdit.class.getResourceAsStream(resource);
- }
- else
- {
- PluginJAR[] plugins = jEdit.getPluginJARs();
- for(int i = 0; i < plugins.length; i++)
- {
- PluginJAR jar = plugins[i];
- String jarName =MiscUtilities.getFileName(jar.getPath()).toLowerCase();
- if(plugin.equalsIgnoreCase(jarName))
- {
- in = jar.getClassLoader()
- .getResourceAsStream(resource);
- break;
- }
- }
- }
-
- if(in == null)
- {
- throw new IOException("Resource not found: " + plugin + "!"
- + resource);
- }
-
- connected = true;
- }
- }
-
- public InputStream getInputStream()
- throws IOException
- {
- connect();
- return in;
- }
-
- public String getHeaderField(String name)
- {
- if(name.equals("content-type"))
- {
- String lcResource = resource.toLowerCase();
- if(lcResource.endsWith(".html"))
- return "text/html";
- else if(lcResource.endsWith(".txt"))
- return "text/plain";
- else if(lcResource.endsWith(".rtf"))
- return "text/rtf";
- else if(lcResource.endsWith(".gif"))
- return "image/gif";
- else if(lcResource.endsWith(".jpg")
- || lcResource.endsWith(".jpeg"))
- return "image/jpeg";
- else
- return null;
- }
- else
- return null;
- }
-
- // private members
- private InputStream in;
- private String plugin;
- private String resource;
-}
+/*
+ * PluginResURLConnection.java - jEdit plugin resource URL connection
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.proto.jeditresource;
+
+//{{{ Imports
+import java.io.*;
+import java.net.*;
+import org.gjt.sp.jedit.*;
+//}}}
+
+public class PluginResURLConnection extends URLConnection
+{
+ public PluginResURLConnection(URL url)
+ throws IOException
+ {
+ super(url);
+
+ String file = url.getFile();
+
+ int index = file.indexOf('!',0);
+ if(index == -1)
+ {
+ plugin = null;
+ resource = file;
+ }
+ else
+ {
+ int start;
+ if(file.charAt(0) == '/')
+ start = 1;
+ else
+ start = 0;
+
+ plugin = file.substring(start,index);
+ resource = file.substring(index + 1);
+ }
+
+ if(plugin != null && resource.startsWith("/"))
+ resource = resource.substring(1);
+ }
+
+ public void connect() throws IOException
+ {
+ if(!connected)
+ {
+ if(plugin == null)
+ {
+ in = jEdit.class.getResourceAsStream(resource);
+ }
+ else
+ {
+ PluginJAR[] plugins = jEdit.getPluginJARs();
+ for(int i = 0; i < plugins.length; i++)
+ {
+ PluginJAR jar = plugins[i];
+ String jarName =MiscUtilities.getFileName(jar.getPath()).toLowerCase();
+ if(plugin.equalsIgnoreCase(jarName))
+ {
+ in = jar.getClassLoader()
+ .getResourceAsStream(resource);
+ break;
+ }
+ }
+ }
+
+ if(in == null)
+ {
+ throw new IOException("Resource not found: " + plugin + "!"
+ + resource);
+ }
+
+ connected = true;
+ }
+ }
+
+ public InputStream getInputStream()
+ throws IOException
+ {
+ connect();
+ return in;
+ }
+
+ public String getHeaderField(String name)
+ {
+ if(name.equals("content-type"))
+ {
+ String lcResource = resource.toLowerCase();
+ if(lcResource.endsWith(".html"))
+ return "text/html";
+ else if(lcResource.endsWith(".txt"))
+ return "text/plain";
+ else if(lcResource.endsWith(".rtf"))
+ return "text/rtf";
+ else if(lcResource.endsWith(".gif"))
+ return "image/gif";
+ else if(lcResource.endsWith(".jpg")
+ || lcResource.endsWith(".jpeg"))
+ return "image/jpeg";
+ else
+ return null;
+ }
+ else
+ return null;
+ }
+
+ // private members
+ private InputStream in;
+ private String plugin;
+ private String resource;
+}
diff --git a/jEdit/org/gjt/sp/jedit/proto/jeditresource/package.html b/jEdit/org/gjt/sp/jedit/proto/jeditresource/package.html
index 537080c..de0310d 100644
--- a/jEdit/org/gjt/sp/jedit/proto/jeditresource/package.html
+++ b/jEdit/org/gjt/sp/jedit/proto/jeditresource/package.html
@@ -1,4 +1,4 @@
-<html><body>
-<code>jeditresource:</code> URL protocol handler, used to load
-resources from plugin JAR files.
-</body></html>
+<html><body>
+<code>jeditresource:</code> URL protocol handler, used to load
+resources from plugin JAR files.
+</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/recent.dtd b/jEdit/org/gjt/sp/jedit/recent.dtd
index 37b3cba..3d8b731 100644
--- a/jEdit/org/gjt/sp/jedit/recent.dtd
+++ b/jEdit/org/gjt/sp/jedit/recent.dtd
@@ -1,12 +1,12 @@
-<!-- RECENT element -->
-<!ELEMENT RECENT ( ENTRY+ ) >
-
-<!-- ENTRY element -->
-<!ELEMENT ENTRY ( PATH | CARET | SELECTION | ENCODING | MODE )* >
-
-<!-- ENTRY child elements -->
-<!ELEMENT PATH ( #PCDATA ) >
-<!ELEMENT CARET ( #PCDATA ) >
-<!ELEMENT SELECTION ( #PCDATA ) >
-<!ELEMENT ENCODING ( #PCDATA ) >
-<!ELEMENT MODE ( #PCDATA ) >
+<!-- RECENT element -->
+<!ELEMENT RECENT ( ENTRY+ ) >
+
+<!-- ENTRY element -->
+<!ELEMENT ENTRY ( PATH | CARET | SELECTION | ENCODING | MODE )* >
+
+<!-- ENTRY child elements -->
+<!ELEMENT PATH ( #PCDATA ) >
+<!ELEMENT CARET ( #PCDATA ) >
+<!ELEMENT SELECTION ( #PCDATA ) >
+<!ELEMENT ENCODING ( #PCDATA ) >
+<!ELEMENT MODE ( #PCDATA ) >
diff --git a/jEdit/org/gjt/sp/jedit/registers.dtd b/jEdit/org/gjt/sp/jedit/registers.dtd
index 5d652f7..6e9f436 100644
--- a/jEdit/org/gjt/sp/jedit/registers.dtd
+++ b/jEdit/org/gjt/sp/jedit/registers.dtd
@@ -1,6 +1,6 @@
-<!-- REGISTERS element -->
-<!ELEMENT REGISTERS ( REGISTER* ) >
-
-<!-- REGISTER element -->
-<!ELEMENT REGISTER ( #PCDATA ) >
-<!ATTLIST REGISTER NAME CDATA #REQUIRED >
+<!-- REGISTERS element -->
+<!ELEMENT REGISTERS ( REGISTER* ) >
+
+<!-- REGISTER element -->
+<!ELEMENT REGISTER ( #PCDATA ) >
+<!ATTLIST REGISTER NAME CDATA #REQUIRED >
diff --git a/jEdit/org/gjt/sp/jedit/search/AllBufferSet.java b/jEdit/org/gjt/sp/jedit/search/AllBufferSet.java
index c9dd0cb..19cbb53 100644
--- a/jEdit/org/gjt/sp/jedit/search/AllBufferSet.java
+++ b/jEdit/org/gjt/sp/jedit/search/AllBufferSet.java
@@ -1,107 +1,107 @@
-/*
- * AllBufferSet.java - All buffer matcher
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import java.awt.Component;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Pattern;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * A file set for searching all open buffers.
- * @author Slava Pestov
- * @version $Id: AllBufferSet.java 15834 2009-08-01 05:35:05Z shlomy $
- */
-public class AllBufferSet extends BufferListSet
-{
- //{{{ AllBufferSet constructor
- /**
- * Creates a new all buffer set.
- * @param glob The filename glob
- * @since jEdit 2.7pre3
- */
- public AllBufferSet(String glob)
- {
- this.glob = glob;
- } //}}}
-
- //{{{ getFileFilter() method
- /**
- * Returns the filename filter.
- * @since jEdit 2.7pre3
- */
- public String getFileFilter()
- {
- return glob;
- } //}}}
-
- //{{{ getCode() method
- /**
- * Returns the BeanShell code that will recreate this file set.
- * @since jEdit 2.7pre3
- */
- @Override
- public String getCode()
- {
- return "new AllBufferSet(\"" + StandardUtilities.charsToEscapes(glob)
- + "\")";
- } //}}}
-
- //{{{ Instance variables
- private String glob;
- //}}}
-
- //{{{ _getFiles() method
- @Override
- protected String[] _getFiles(Component comp)
- {
- Buffer[] buffers = jEdit.getBuffers();
- List<String> returnValue = new ArrayList<String>(buffers.length);
-
- Pattern filter;
- try
- {
- filter = Pattern.compile(StandardUtilities.globToRE(glob),
- Pattern.CASE_INSENSITIVE);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- return null;
- }
-
- for(int i = 0; i < buffers.length; i++)
- {
- Buffer buffer = buffers[i];
- if(filter.matcher(buffer.getName()).matches())
- returnValue.add(buffer.getPath());
- }
-
- return returnValue.toArray(new String[returnValue.size()]);
- } //}}}
-}
+/*
+ * AllBufferSet.java - All buffer matcher
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import java.awt.Component;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * A file set for searching all open buffers.
+ * @author Slava Pestov
+ * @version $Id: AllBufferSet.java 15834 2009-08-01 05:35:05Z shlomy $
+ */
+public class AllBufferSet extends BufferListSet
+{
+ //{{{ AllBufferSet constructor
+ /**
+ * Creates a new all buffer set.
+ * @param glob The filename glob
+ * @since jEdit 2.7pre3
+ */
+ public AllBufferSet(String glob)
+ {
+ this.glob = glob;
+ } //}}}
+
+ //{{{ getFileFilter() method
+ /**
+ * Returns the filename filter.
+ * @since jEdit 2.7pre3
+ */
+ public String getFileFilter()
+ {
+ return glob;
+ } //}}}
+
+ //{{{ getCode() method
+ /**
+ * Returns the BeanShell code that will recreate this file set.
+ * @since jEdit 2.7pre3
+ */
+ @Override
+ public String getCode()
+ {
+ return "new AllBufferSet(\"" + StandardUtilities.charsToEscapes(glob)
+ + "\")";
+ } //}}}
+
+ //{{{ Instance variables
+ private String glob;
+ //}}}
+
+ //{{{ _getFiles() method
+ @Override
+ protected String[] _getFiles(Component comp)
+ {
+ Buffer[] buffers = jEdit.getBuffers();
+ List<String> returnValue = new ArrayList<String>(buffers.length);
+
+ Pattern filter;
+ try
+ {
+ filter = Pattern.compile(StandardUtilities.globToRE(glob),
+ Pattern.CASE_INSENSITIVE);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ return null;
+ }
+
+ for(int i = 0; i < buffers.length; i++)
+ {
+ Buffer buffer = buffers[i];
+ if(filter.matcher(buffer.getName()).matches())
+ returnValue.add(buffer.getPath());
+ }
+
+ return returnValue.toArray(new String[returnValue.size()]);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/BoyerMooreSearchMatcher.java b/jEdit/org/gjt/sp/jedit/search/BoyerMooreSearchMatcher.java
index 57e00ee..fcfdcba 100644
--- a/jEdit/org/gjt/sp/jedit/search/BoyerMooreSearchMatcher.java
+++ b/jEdit/org/gjt/sp/jedit/search/BoyerMooreSearchMatcher.java
@@ -1,315 +1,300 @@
-/*
- * BoyerMooreSearchMatcher.java - Literal pattern String matcher utilizing the
- * Boyer-Moore algorithm
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000 mike dillon
- * Portions copyright (C) 2001 Tom Locke
- * Portions copyright (C) 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-/**
- * Implements literal search using the Boyer-Moore algorithm.
- * @version $Id: BoyerMooreSearchMatcher.java 13837 2008-10-01 07:47:17Z shlomy $
- */
-public class BoyerMooreSearchMatcher extends SearchMatcher
-{
- //{{{ BoyerMooreSearchMatcher constructor
- /**
- * Creates a new string literal matcher.
- * @param pattern the search pattern
- * @param ignoreCase <code>true</code> if you want to ignore case
- */
- public BoyerMooreSearchMatcher(String pattern, boolean ignoreCase)
- {
- this.pattern = pattern.toCharArray();
- if(ignoreCase)
- {
- for(int i = 0; i < this.pattern.length; i++)
- {
- this.pattern[i] = Character.toUpperCase(
- this.pattern[i]);
- }
- }
-
- this.ignoreCase = ignoreCase;
-
- pattern_end = this.pattern.length - 1;
- } //}}}
-
- //{{{ nextMatch() method
- /**
- * Returns the offset of the first match of the specified text
- * within this matcher.
- * @param text The text to search in
- * @param start True if the start of the segment is the beginning of the
- * buffer
- * @param end True if the end of the segment is the end of the buffer
- * @param firstTime If false and the search string matched at the start
- * offset with length zero, automatically find next match
- * @param reverse If true, searching will be performed in a backward
- * direction.
- * @return an array where the first element is the start offset
- * of the match, and the second element is the end offset of
- * the match
- * @since jEdit 4.2pre4
- */
- public SearchMatcher.Match nextMatch(CharSequence text,
- boolean start, boolean end, boolean firstTime,
- boolean reverse)
- {
- int pos = match(text,reverse);
-
- if (pos == -1)
- {
- return null;
- }
- else
- {
- returnValue.start = pos;
- returnValue.end = pos + pattern.length;
- return returnValue;
- }
- } //}}}
-
- //{{{ match() method
- /**
- * a good introduction to the Boyer-Moore fast string matching
- * algorithm may be found on Moore's website at:
- *
- * http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/
- *
- * @since jEdit 4.3pre5
- */
- public int match(CharSequence text, boolean reverse)
- {
- //{{{
- // lazily create skip and suffix arrays for either the
- // search pattern, or the reversed search pattern
- int[] skip, suffix;
- if(reverse)
- {
- if(back_skip == null)
- {
- back_skip = generateSkipArray(true);
- back_suffix = generateSuffixArray(true);
- }
- skip = back_skip;
- suffix = back_suffix;
- }
- else
- {
- if(fwd_skip == null)
- {
- fwd_skip = generateSkipArray(false);
- fwd_suffix = generateSuffixArray(false);
- }
- skip = fwd_skip;
- suffix = fwd_suffix;
- } //}}}
-
- // position variable for pattern test position
- int pos;
-
- // position variable for pattern start
- int anchor = 0;
-
- // last possible start position of a match with this pattern;
- // this is negative if the pattern is longer than the text
- // causing the search loop below to immediately fail
- //int last_anchor = reverseSearch
- // ? offset + pattern.length - 1
- // : length - pattern.length;
-
- char ch = 0;
-
- int bad_char;
- int good_suffix;
-
- // the search works by starting the anchor (first character
- // of the pattern) at the initial offset. as long as the
- // anchor is far enough from the enough of the text for the
- // pattern to match, and until the pattern matches, we
- // compare the pattern to the text from the last character
- // to the first character in reverse order. where a character
- // in the pattern mismatches, we use the two heuristics
- // based on the mismatch character and its position in the
- // pattern to determine the furthest we can move the anchor
- // without missing any potential pattern matches.
- SEARCH:
- while (anchor + pattern_end < text.length())
- {
- for (pos = pattern_end; pos >= 0; --pos)
- {
- ch = text.charAt(pos + anchor);
- if(ignoreCase)
- ch = Character.toUpperCase(ch);
-
- // pattern test
- if ((reverse ? ch != pattern[pattern_end - pos]
- : ch != pattern[pos]))
- {
- // character mismatch, determine how many characters to skip
-
- // heuristic #1
- bad_char = pos - skip[getSkipIndex(ch)];
-
- // heuristic #2
- good_suffix = suffix[pos];
-
- // skip the greater of the two distances provided by the
- // heuristics
- int skip_index = (bad_char > good_suffix) ? bad_char : good_suffix;
- anchor += skip_index;
-
- // go back to the while loop
- continue SEARCH;
- }
- }
-
- // MATCH: return the position of its first character
- return anchor;
- }
-
- // MISMATCH: return -1 as defined by API
- return -1;
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- return "BoyerMooreSearchMatcher[" + new String(pattern) + ',' + ignoreCase + ']';
- } //}}}
-
- //{{{ Private members
- private char[] pattern;
- private int pattern_end;
- private boolean ignoreCase;
-
- // Boyer-Moore member fields
- private int[] fwd_skip;
- private int[] fwd_suffix;
- private int[] back_skip;
- private int[] back_suffix;
-
- // Boyer-Moore helper methods
-
- //{{{ generateSkipArray() method
- /*
- * the 'skip' array is used to determine for each index in the
- * hashed alphabet how many characters can be skipped if
- * a mismatch occurs on a characater hashing to that index.
- */
- private int[] generateSkipArray(boolean reverse)
- {
- // initialize the skip array to all zeros
- int[] skip = new int[256];
-
- // leave the table cleanly-initialized for an empty pattern
- if (pattern.length == 0)
- return skip;
-
- int pos = 0;
-
- do
- {
- skip[getSkipIndex(pattern[reverse ? pattern_end - pos : pos])] = pos;
- }
- while (++pos < pattern.length);
-
- return skip;
- } //}}}
-
- //{{{ getSkipIndex() method
- /*
- * to avoid our skip table having a length of 2 ^ 16, we hash each
- * character of the input into a character in the alphabet [\x00-\xFF]
- * using the lower 8 bits of the character's value (resulting in
- * a more reasonable skip table of length 2 ^ 8).
- *
- * the result of this is that more than one character can hash to the
- * same index, but since the skip table encodes the position of
- * occurence of the character furthest into the string with a particular
- * index (whether or not it is the only character with that index), an
- * index collision only means that that this heuristic will give a
- * sub-optimal skip (i.e. a complete skip table could use the differences
- * between colliding characters to maximal effect, at the expense of
- * building a table that is over 2 orders of magnitude larger and very
- * sparse).
- */
- private static final int getSkipIndex(char ch)
- {
- return ch & 0x000000FF;
- } //}}}
-
- //{{{ generateSuffixArray() method
- /*
- * XXX: hairy code that is basically just a functional(?) port of some
- * other code i barely understood
- */
- private int[] generateSuffixArray(boolean reverse)
- {
- int m = pattern.length;
-
- int j = m + 1;
-
- int[] suffix = new int[j];
- int[] tmp = new int[j];
- tmp[m] = j;
-
- for (int i = m; i > 0; --i)
- {
- while (j <= m && pattern[reverse ? pattern_end - i + 1 : i - 1]
- != pattern[reverse ? pattern_end - j + 1 : j - 1])
- {
- if (suffix[j] == 0)
- {
- suffix[j] = j - i;
- }
-
- j = tmp[j];
- }
-
- tmp[i - 1] = --j;
- }
-
- int k = tmp[0];
-
- for (j = 0; j <= m; j++)
- {
- // the code above builds a 1-indexed suffix array,
- // but we shift it to be 0-indexed, ignoring the
- // original 0-th element
- if (j > 0)
- {
- suffix[j - 1] = (suffix[j] == 0) ? k : suffix[j];
- }
-
- if (j == k)
- {
- k = tmp[k];
- }
- }
-
- return suffix;
- } //}}}
-
- //}}}
-}
+/*
+ * BoyerMooreSearchMatcher.java - Literal pattern String matcher utilizing the
+ * Boyer-Moore algorithm
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000 mike dillon
+ * Portions copyright (C) 2001 Tom Locke
+ * Portions copyright (C) 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+/**
+ * Implements literal search using the Boyer-Moore algorithm.
+ * @version $Id: BoyerMooreSearchMatcher.java 19553 2011-06-09 01:23:57Z ezust $
+ */
+public class BoyerMooreSearchMatcher extends SearchMatcher
+{
+ //{{{ BoyerMooreSearchMatcher constructor
+ /**
+ * Creates a new string literal matcher.
+ * @param pattern the search pattern
+ * @param ignoreCase <code>true</code> if you want to ignore case
+ */
+ public BoyerMooreSearchMatcher(String pattern, boolean ignoreCase)
+ {
+ this.pattern = pattern.toCharArray();
+ if(ignoreCase)
+ {
+ for(int i = 0; i < this.pattern.length; i++)
+ {
+ this.pattern[i] = Character.toUpperCase(
+ this.pattern[i]);
+ }
+ }
+
+ this.ignoreCase = ignoreCase;
+
+ pattern_end = this.pattern.length - 1;
+ } //}}}
+
+ //{{{ nextMatch() method
+ @Override
+ public SearchMatcher.Match nextMatch(CharSequence text,
+ boolean start, boolean end, boolean firstTime,
+ boolean reverse)
+ {
+ int pos = match(text,reverse);
+
+ if (pos == -1)
+ {
+ return null;
+ }
+ else
+ {
+ returnValue.start = pos;
+ returnValue.end = pos + pattern.length;
+ return returnValue;
+ }
+ } //}}}
+
+ //{{{ match() method
+ /**
+ * a good introduction to the Boyer-Moore fast string matching
+ * algorithm may be found on Moore's website at:
+ *
+ * http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/
+ *
+ * @since jEdit 4.3pre5
+ */
+ public int match(CharSequence text, boolean reverse)
+ {
+ //{{{
+ // lazily create skip and suffix arrays for either the
+ // search pattern, or the reversed search pattern
+ int[] skip, suffix;
+ if(reverse)
+ {
+ if(back_skip == null)
+ {
+ back_skip = generateSkipArray(true);
+ back_suffix = generateSuffixArray(true);
+ }
+ skip = back_skip;
+ suffix = back_suffix;
+ }
+ else
+ {
+ if(fwd_skip == null)
+ {
+ fwd_skip = generateSkipArray(false);
+ fwd_suffix = generateSuffixArray(false);
+ }
+ skip = fwd_skip;
+ suffix = fwd_suffix;
+ } //}}}
+
+ // position variable for pattern test position
+ int pos;
+
+ // position variable for pattern start
+ int anchor = 0;
+
+ // last possible start position of a match with this pattern;
+ // this is negative if the pattern is longer than the text
+ // causing the search loop below to immediately fail
+ //int last_anchor = reverseSearch
+ // ? offset + pattern.length - 1
+ // : length - pattern.length;
+
+ char ch = 0;
+
+ int bad_char;
+ int good_suffix;
+
+ // the search works by starting the anchor (first character
+ // of the pattern) at the initial offset. as long as the
+ // anchor is far enough from the enough of the text for the
+ // pattern to match, and until the pattern matches, we
+ // compare the pattern to the text from the last character
+ // to the first character in reverse order. where a character
+ // in the pattern mismatches, we use the two heuristics
+ // based on the mismatch character and its position in the
+ // pattern to determine the furthest we can move the anchor
+ // without missing any potential pattern matches.
+ SEARCH:
+ while (anchor + pattern_end < text.length())
+ {
+ for (pos = pattern_end; pos >= 0; --pos)
+ {
+ ch = text.charAt(pos + anchor);
+ if(ignoreCase)
+ ch = Character.toUpperCase(ch);
+
+ // pattern test
+ if ((reverse ? ch != pattern[pattern_end - pos]
+ : ch != pattern[pos]))
+ {
+ // character mismatch, determine how many characters to skip
+
+ // heuristic #1
+ bad_char = pos - skip[getSkipIndex(ch)];
+
+ // heuristic #2
+ good_suffix = suffix[pos];
+
+ // skip the greater of the two distances provided by the
+ // heuristics
+ int skip_index = (bad_char > good_suffix) ? bad_char : good_suffix;
+ anchor += skip_index;
+
+ // go back to the while loop
+ continue SEARCH;
+ }
+ }
+
+ // MATCH: return the position of its first character
+ return anchor;
+ }
+
+ // MISMATCH: return -1 as defined by API
+ return -1;
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return "BoyerMooreSearchMatcher[" + new String(pattern) + ',' + ignoreCase + ']';
+ } //}}}
+
+ //{{{ Private members
+ private char[] pattern;
+ private int pattern_end;
+ private boolean ignoreCase;
+
+ // Boyer-Moore member fields
+ private int[] fwd_skip;
+ private int[] fwd_suffix;
+ private int[] back_skip;
+ private int[] back_suffix;
+
+ // Boyer-Moore helper methods
+
+ //{{{ generateSkipArray() method
+ /*
+ * the 'skip' array is used to determine for each index in the
+ * hashed alphabet how many characters can be skipped if
+ * a mismatch occurs on a characater hashing to that index.
+ */
+ private int[] generateSkipArray(boolean reverse)
+ {
+ // initialize the skip array to all zeros
+ int[] skip = new int[256];
+
+ // leave the table cleanly-initialized for an empty pattern
+ if (pattern.length == 0)
+ return skip;
+
+ int pos = 0;
+
+ do
+ {
+ skip[getSkipIndex(pattern[reverse ? pattern_end - pos : pos])] = pos;
+ }
+ while (++pos < pattern.length);
+
+ return skip;
+ } //}}}
+
+ //{{{ getSkipIndex() method
+ /*
+ * to avoid our skip table having a length of 2 ^ 16, we hash each
+ * character of the input into a character in the alphabet [\x00-\xFF]
+ * using the lower 8 bits of the character's value (resulting in
+ * a more reasonable skip table of length 2 ^ 8).
+ *
+ * the result of this is that more than one character can hash to the
+ * same index, but since the skip table encodes the position of
+ * occurence of the character furthest into the string with a particular
+ * index (whether or not it is the only character with that index), an
+ * index collision only means that that this heuristic will give a
+ * sub-optimal skip (i.e. a complete skip table could use the differences
+ * between colliding characters to maximal effect, at the expense of
+ * building a table that is over 2 orders of magnitude larger and very
+ * sparse).
+ */
+ private static int getSkipIndex(char ch)
+ {
+ return ch & 0x000000FF;
+ } //}}}
+
+ //{{{ generateSuffixArray() method
+ /*
+ * XXX: hairy code that is basically just a functional(?) port of some
+ * other code i barely understood
+ */
+ private int[] generateSuffixArray(boolean reverse)
+ {
+ int m = pattern.length;
+
+ int j = m + 1;
+
+ int[] suffix = new int[j];
+ int[] tmp = new int[j];
+ tmp[m] = j;
+
+ for (int i = m; i > 0; --i)
+ {
+ while (j <= m && pattern[reverse ? pattern_end - i + 1 : i - 1]
+ != pattern[reverse ? pattern_end - j + 1 : j - 1])
+ {
+ if (suffix[j] == 0)
+ {
+ suffix[j] = j - i;
+ }
+
+ j = tmp[j];
+ }
+
+ tmp[i - 1] = --j;
+ }
+
+ int k = tmp[0];
+
+ for (j = 0; j <= m; j++)
+ {
+ // the code above builds a 1-indexed suffix array,
+ // but we shift it to be 0-indexed, ignoring the
+ // original 0-th element
+ if (j > 0)
+ {
+ suffix[j - 1] = (suffix[j] == 0) ? k : suffix[j];
+ }
+
+ if (j == k)
+ {
+ k = tmp[k];
+ }
+ }
+
+ return suffix;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/BufferListSet.java b/jEdit/org/gjt/sp/jedit/search/BufferListSet.java
index 2adaf66..4d09375 100644
--- a/jEdit/org/gjt/sp/jedit/search/BufferListSet.java
+++ b/jEdit/org/gjt/sp/jedit/search/BufferListSet.java
@@ -1,142 +1,142 @@
-/*
- * BufferListSet.java - Buffer list matcher
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import java.awt.Component;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * A file set for searching a user-specified list of buffers.
- * @author Slava Pestov
- * @version $Id: BufferListSet.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public abstract class BufferListSet implements SearchFileSet
-{
- //{{{ getFirstFile() method
- public synchronized String getFirstFile(View view)
- {
- if(files == null)
- files = _getFiles(view);
-
- if(files == null || files.length == 0)
- return null;
- else
- return files[0];
- } //}}}
-
- //{{{ getNextFile() method
- public synchronized String getNextFile(View view, String path)
- {
- if(files == null)
- files = _getFiles(view);
-
- if(files == null || files.length == 0)
- return null;
-
- if(path == null)
- {
- path = view.getBuffer().getSymlinkPath();
- VFS vfs = VFSManager.getVFSForPath(path);
- boolean ignoreCase = ((vfs.getCapabilities()
- & VFS.CASE_INSENSITIVE_CAP) != 0);
-
- for(int i = 0; i < files.length; i++)
- {
- if(StandardUtilities.compareStrings(
- files[i],path,ignoreCase) == 0)
- {
- return path;
- }
- }
-
- return getFirstFile(view);
- }
- else
- {
- // -1 so that the last isn't checked
- VFS vfs = VFSManager.getVFSForPath(path);
- boolean ignoreCase = ((vfs.getCapabilities()
- & VFS.CASE_INSENSITIVE_CAP) != 0);
-
- for(int i = 0; i < files.length - 1; i++)
- {
- if(StandardUtilities.compareStrings(
- files[i],path,ignoreCase) == 0)
- {
- return files[i+1];
- }
- }
-
- return null;
- }
- } //}}}
-
- //{{{ getFiles() method
- public synchronized String[] getFiles(View view)
- {
- if(files == null)
- files = _getFiles(view);
-
- if(files == null || files.length == 0)
- return null;
- else
- return files;
- } //}}}
-
- //{{{ getFileCount() method
- public synchronized int getFileCount(View view)
- {
- if(files == null)
- files = _getFiles(view);
-
- if(files == null)
- return 0;
- else
- return files.length;
- } //}}}
-
- //{{{ getCode() method
- public String getCode()
- {
- // not supported for arbitriary filesets
- return null;
- } //}}}
-
- //{{{ invalidateCachedList() method
- public void invalidateCachedList()
- {
- files = null;
- } //}}}
-
- /**
- * Note that the paths in the returned list must be
- * fully canonicalized.
- */
- protected abstract String[] _getFiles(Component comp);
-
- private String[] files;
-}
+/*
+ * BufferListSet.java - Buffer list matcher
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import java.awt.Component;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * A file set for searching a user-specified list of buffers.
+ * @author Slava Pestov
+ * @version $Id: BufferListSet.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public abstract class BufferListSet implements SearchFileSet
+{
+ //{{{ getFirstFile() method
+ public synchronized String getFirstFile(View view)
+ {
+ if(files == null)
+ files = _getFiles(view);
+
+ if(files == null || files.length == 0)
+ return null;
+ else
+ return files[0];
+ } //}}}
+
+ //{{{ getNextFile() method
+ public synchronized String getNextFile(View view, String path)
+ {
+ if(files == null)
+ files = _getFiles(view);
+
+ if(files == null || files.length == 0)
+ return null;
+
+ if(path == null)
+ {
+ path = view.getBuffer().getSymlinkPath();
+ VFS vfs = VFSManager.getVFSForPath(path);
+ boolean ignoreCase = ((vfs.getCapabilities()
+ & VFS.CASE_INSENSITIVE_CAP) != 0);
+
+ for(int i = 0; i < files.length; i++)
+ {
+ if(StandardUtilities.compareStrings(
+ files[i],path,ignoreCase) == 0)
+ {
+ return path;
+ }
+ }
+
+ return getFirstFile(view);
+ }
+ else
+ {
+ // -1 so that the last isn't checked
+ VFS vfs = VFSManager.getVFSForPath(path);
+ boolean ignoreCase = ((vfs.getCapabilities()
+ & VFS.CASE_INSENSITIVE_CAP) != 0);
+
+ for(int i = 0; i < files.length - 1; i++)
+ {
+ if(StandardUtilities.compareStrings(
+ files[i],path,ignoreCase) == 0)
+ {
+ return files[i+1];
+ }
+ }
+
+ return null;
+ }
+ } //}}}
+
+ //{{{ getFiles() method
+ public synchronized String[] getFiles(View view)
+ {
+ if(files == null)
+ files = _getFiles(view);
+
+ if(files == null || files.length == 0)
+ return null;
+ else
+ return files;
+ } //}}}
+
+ //{{{ getFileCount() method
+ public synchronized int getFileCount(View view)
+ {
+ if(files == null)
+ files = _getFiles(view);
+
+ if(files == null)
+ return 0;
+ else
+ return files.length;
+ } //}}}
+
+ //{{{ getCode() method
+ public String getCode()
+ {
+ // not supported for arbitriary filesets
+ return null;
+ } //}}}
+
+ //{{{ invalidateCachedList() method
+ public void invalidateCachedList()
+ {
+ files = null;
+ } //}}}
+
+ /**
+ * Note that the paths in the returned list must be
+ * fully canonicalized.
+ */
+ protected abstract String[] _getFiles(Component comp);
+
+ private String[] files;
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/CurrentBufferSet.java b/jEdit/org/gjt/sp/jedit/search/CurrentBufferSet.java
index c3f2483..9cd0189 100644
--- a/jEdit/org/gjt/sp/jedit/search/CurrentBufferSet.java
+++ b/jEdit/org/gjt/sp/jedit/search/CurrentBufferSet.java
@@ -1,66 +1,66 @@
-/*
- * CurrentBufferSet.java - Current buffer matcher
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-import org.gjt.sp.jedit.*;
-
-/**
- * A file set for searching the current buffer.
- * @author Slava Pestov
- * @version $Id: CurrentBufferSet.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class CurrentBufferSet implements SearchFileSet
-{
- //{{{ getFirstFile() method
- public String getFirstFile(View view)
- {
- return view.getBuffer().getPath();
- } //}}}
-
- //{{{ getNextFile() method
- public String getNextFile(View view, String file)
- {
- if(file == null)
- return view.getBuffer().getPath();
- else
- return null;
- } //}}}
-
- //{{{ getFiles() method
- public String[] getFiles(View view)
- {
- return new String[] { view.getBuffer().getPath() };
- } //}}}
-
- //{{{ getFileCount() method
- public int getFileCount(View view)
- {
- return 1;
- } //}}}
-
- //{{{ getCode() method
- public String getCode()
- {
- return "new CurrentBufferSet()";
- } //}}}
-}
+/*
+ * CurrentBufferSet.java - Current buffer matcher
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+import org.gjt.sp.jedit.*;
+
+/**
+ * A file set for searching the current buffer.
+ * @author Slava Pestov
+ * @version $Id: CurrentBufferSet.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class CurrentBufferSet implements SearchFileSet
+{
+ //{{{ getFirstFile() method
+ public String getFirstFile(View view)
+ {
+ return view.getBuffer().getPath();
+ } //}}}
+
+ //{{{ getNextFile() method
+ public String getNextFile(View view, String file)
+ {
+ if(file == null)
+ return view.getBuffer().getPath();
+ else
+ return null;
+ } //}}}
+
+ //{{{ getFiles() method
+ public String[] getFiles(View view)
+ {
+ return new String[] { view.getBuffer().getPath() };
+ } //}}}
+
+ //{{{ getFileCount() method
+ public int getFileCount(View view)
+ {
+ return 1;
+ } //}}}
+
+ //{{{ getCode() method
+ public String getCode()
+ {
+ return "new CurrentBufferSet()";
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/DirectoryListSet.java b/jEdit/org/gjt/sp/jedit/search/DirectoryListSet.java
index 12e7085..c19b3a9 100644
--- a/jEdit/org/gjt/sp/jedit/search/DirectoryListSet.java
+++ b/jEdit/org/gjt/sp/jedit/search/DirectoryListSet.java
@@ -1,174 +1,174 @@
-/*
- * DirectoryListSet.java - Directory list matcher
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import javax.swing.SwingUtilities;
-import java.awt.Component;
-import java.io.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * Recursive directory search.
- * @author Slava Pestov
- * @version $Id: DirectoryListSet.java 16365 2009-10-20 05:13:52Z vanza $
- */
-public class DirectoryListSet extends BufferListSet
-{
- //{{{ DirectoryListSet constructor
- public DirectoryListSet(String directory, String glob, boolean recurse)
- {
- this.directory = directory;
- this.glob = glob;
- this.recurse = recurse;
- this.skipBinary = jEdit.getBooleanProperty("search.skipBinary.toggle");
- this.skipHidden = jEdit.getBooleanProperty("search.skipHidden.toggle");
- } //}}}
-
-
-
- //{{{ getDirectory() method
- public String getDirectory()
- {
- return directory;
- } //}}}
-
- //{{{ setDirectory() method
- /**
- * @since jEdit 4.2pre1
- */
- public void setDirectory(String directory)
- {
- this.directory = directory;
- invalidateCachedList();
- } //}}}
-
- //{{{ getFileFilter() method
- public String getFileFilter()
- {
- return glob;
- } //}}}
-
- //{{{ setFileFilter() method
- /**
- * @since jEdit 4.2pre1
- */
- public void setFileFilter(String glob)
- {
- this.glob = glob;
- invalidateCachedList();
- } //}}}
-
- //{{{ isRecursive() method
- public boolean isRecursive()
- {
- return recurse;
- } //}}}
-
- //{{{ setRecursive() method
- /**
- * @since jEdit 4.2pre1
- */
- public void setRecursive(boolean recurse)
- {
- this.recurse = recurse;
- invalidateCachedList();
- } //}}}
-
- //{{{ getCode() method
- @Override
- public String getCode()
- {
- return "new DirectoryListSet(\"" + StandardUtilities.charsToEscapes(directory)
- + "\",\"" + StandardUtilities.charsToEscapes(glob) + "\","
- + recurse + ')';
- } //}}}
-
- //{{{ _getFiles() method
- @Override
- protected String[] _getFiles(final Component comp)
- {
- skipBinary = jEdit.getBooleanProperty("search.skipBinary.toggle");
- skipHidden = jEdit.getBooleanProperty("search.skipHidden.toggle");
- final VFS vfs = VFSManager.getVFSForPath(directory);
- Object session;
- if(SwingUtilities.isEventDispatchThread())
- {
- session = vfs.createVFSSession(directory,comp);
- }
- else
- {
- final Object[] returnValue = new Object[1];
-
- try
- {
- SwingUtilities.invokeAndWait(new Runnable()
- {
- public void run()
- {
- returnValue[0] = vfs.createVFSSession(directory,comp);
- }
- });
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- }
-
- session = returnValue[0];
- }
-
- if(session == null)
- return null;
-
- try
- {
- try
- {
- return vfs._listDirectory(session,directory,glob,recurse,comp, skipBinary, skipHidden);
- }
- finally
- {
- vfs._endVFSSession(session, comp);
- }
- }
- catch(IOException io)
- {
- VFSManager.error(comp,directory,"ioerror",new String[]
- { io.toString() });
- return null;
- }
- } //}}}
-
- //{{{ Private members
- private String directory;
- private String glob;
- private boolean recurse;
- private boolean skipHidden;
- private boolean skipBinary;
- //}}}
-}
+/*
+ * DirectoryListSet.java - Directory list matcher
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import javax.swing.SwingUtilities;
+import java.awt.Component;
+import java.io.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * Recursive directory search.
+ * @author Slava Pestov
+ * @version $Id: DirectoryListSet.java 16365 2009-10-20 05:13:52Z vanza $
+ */
+public class DirectoryListSet extends BufferListSet
+{
+ //{{{ DirectoryListSet constructor
+ public DirectoryListSet(String directory, String glob, boolean recurse)
+ {
+ this.directory = directory;
+ this.glob = glob;
+ this.recurse = recurse;
+ this.skipBinary = jEdit.getBooleanProperty("search.skipBinary.toggle");
+ this.skipHidden = jEdit.getBooleanProperty("search.skipHidden.toggle");
+ } //}}}
+
+
+
+ //{{{ getDirectory() method
+ public String getDirectory()
+ {
+ return directory;
+ } //}}}
+
+ //{{{ setDirectory() method
+ /**
+ * @since jEdit 4.2pre1
+ */
+ public void setDirectory(String directory)
+ {
+ this.directory = directory;
+ invalidateCachedList();
+ } //}}}
+
+ //{{{ getFileFilter() method
+ public String getFileFilter()
+ {
+ return glob;
+ } //}}}
+
+ //{{{ setFileFilter() method
+ /**
+ * @since jEdit 4.2pre1
+ */
+ public void setFileFilter(String glob)
+ {
+ this.glob = glob;
+ invalidateCachedList();
+ } //}}}
+
+ //{{{ isRecursive() method
+ public boolean isRecursive()
+ {
+ return recurse;
+ } //}}}
+
+ //{{{ setRecursive() method
+ /**
+ * @since jEdit 4.2pre1
+ */
+ public void setRecursive(boolean recurse)
+ {
+ this.recurse = recurse;
+ invalidateCachedList();
+ } //}}}
+
+ //{{{ getCode() method
+ @Override
+ public String getCode()
+ {
+ return "new DirectoryListSet(\"" + StandardUtilities.charsToEscapes(directory)
+ + "\",\"" + StandardUtilities.charsToEscapes(glob) + "\","
+ + recurse + ')';
+ } //}}}
+
+ //{{{ _getFiles() method
+ @Override
+ protected String[] _getFiles(final Component comp)
+ {
+ skipBinary = jEdit.getBooleanProperty("search.skipBinary.toggle");
+ skipHidden = jEdit.getBooleanProperty("search.skipHidden.toggle");
+ final VFS vfs = VFSManager.getVFSForPath(directory);
+ Object session;
+ if(SwingUtilities.isEventDispatchThread())
+ {
+ session = vfs.createVFSSession(directory,comp);
+ }
+ else
+ {
+ final Object[] returnValue = new Object[1];
+
+ try
+ {
+ SwingUtilities.invokeAndWait(new Runnable()
+ {
+ public void run()
+ {
+ returnValue[0] = vfs.createVFSSession(directory,comp);
+ }
+ });
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+
+ session = returnValue[0];
+ }
+
+ if(session == null)
+ return null;
+
+ try
+ {
+ try
+ {
+ return vfs._listDirectory(session,directory,glob,recurse,comp, skipBinary, skipHidden);
+ }
+ finally
+ {
+ vfs._endVFSSession(session, comp);
+ }
+ }
+ catch(IOException io)
+ {
+ VFSManager.error(comp,directory,"ioerror",new String[]
+ { io.toString() });
+ return null;
+ }
+ } //}}}
+
+ //{{{ Private members
+ private String directory;
+ private String glob;
+ private boolean recurse;
+ private boolean skipHidden;
+ private boolean skipBinary;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/HyperSearchFileNode.java b/jEdit/org/gjt/sp/jedit/search/HyperSearchFileNode.java
index 627b2bf..8756fe4 100644
--- a/jEdit/org/gjt/sp/jedit/search/HyperSearchFileNode.java
+++ b/jEdit/org/gjt/sp/jedit/search/HyperSearchFileNode.java
@@ -1,112 +1,112 @@
-/*
- * HyperSearchFileNode.java - HyperSearch file node
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.EditPane;
-import org.gjt.sp.jedit.MiscUtilities;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.jedit.jEdit;
-
-/**
- * HyperSearch results window.
- * @author Slava Pestov
- * @version $Id: HyperSearchFileNode.java 13284 2008-08-12 18:41:18Z k_satoda $
- */
-public class HyperSearchFileNode implements HyperSearchNode
-{
- public String path;
- public boolean showFullPath = true;
-
- private static String fileSep = System.getProperty("file.separator");
- static
- {
- if (fileSep.equals("\\"))
- fileSep = "\\\\";
- }
-
- //{{{ HyperSearchFileNode constructor
- public HyperSearchFileNode(String path)
- {
- this.path = path;
- } //}}}
-
- //{{{ getBuffer() method
- public Buffer getBuffer(View view)
- {
- return jEdit.openFile(view,path);
- } //}}}
-
- //{{{ goTo() method
- public void goTo(EditPane editPane)
- {
- Buffer buffer = getBuffer(editPane.getView());
- if(buffer == null)
- return;
-
- editPane.setBuffer(buffer);
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- if (showFullPath)
- return path;
- String[] paths = path.split(fileSep);
- return paths[paths.length - 1];
- } //}}}
-
- //{{{ equals() method
- public boolean equals(Object compareObj)
- {
- if (!(compareObj instanceof HyperSearchFileNode))
- return false;
- HyperSearchFileNode otherResult = (HyperSearchFileNode)compareObj;
-
- return path.equals(MiscUtilities.resolveSymlinks(otherResult.path));
- }//}}}
-
- /**
- * Returns the result count.
- *
- * @return the result count
- * @since jEdit 4.3pre9
- */
- public int getCount()
- {
- return count;
- }
-
- /**
- * Set the result count.
- *
- * @param count the result count
- * @since jEdit 4.3pre9
- */
- public void setCount(int count)
- {
- this.count = count;
- }
-
- private int count;
-}
+/*
+ * HyperSearchFileNode.java - HyperSearch file node
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.EditPane;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+
+/**
+ * HyperSearch results window.
+ * @author Slava Pestov
+ * @version $Id: HyperSearchFileNode.java 13284 2008-08-12 18:41:18Z k_satoda $
+ */
+public class HyperSearchFileNode implements HyperSearchNode
+{
+ public String path;
+ public boolean showFullPath = true;
+
+ private static String fileSep = System.getProperty("file.separator");
+ static
+ {
+ if (fileSep.equals("\\"))
+ fileSep = "\\\\";
+ }
+
+ //{{{ HyperSearchFileNode constructor
+ public HyperSearchFileNode(String path)
+ {
+ this.path = path;
+ } //}}}
+
+ //{{{ getBuffer() method
+ public Buffer getBuffer(View view)
+ {
+ return jEdit.openFile(view,path);
+ } //}}}
+
+ //{{{ goTo() method
+ public void goTo(EditPane editPane)
+ {
+ Buffer buffer = getBuffer(editPane.getView());
+ if(buffer == null)
+ return;
+
+ editPane.setBuffer(buffer);
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ if (showFullPath)
+ return path;
+ String[] paths = path.split(fileSep);
+ return paths[paths.length - 1];
+ } //}}}
+
+ //{{{ equals() method
+ public boolean equals(Object compareObj)
+ {
+ if (!(compareObj instanceof HyperSearchFileNode))
+ return false;
+ HyperSearchFileNode otherResult = (HyperSearchFileNode)compareObj;
+
+ return path.equals(MiscUtilities.resolveSymlinks(otherResult.path));
+ }//}}}
+
+ /**
+ * Returns the result count.
+ *
+ * @return the result count
+ * @since jEdit 4.3pre9
+ */
+ public int getCount()
+ {
+ return count;
+ }
+
+ /**
+ * Set the result count.
+ *
+ * @param count the result count
+ * @since jEdit 4.3pre9
+ */
+ public void setCount(int count)
+ {
+ this.count = count;
+ }
+
+ private int count;
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/HyperSearchFolderNode.java b/jEdit/org/gjt/sp/jedit/search/HyperSearchFolderNode.java
index b267a62..ad81d5d 100644
--- a/jEdit/org/gjt/sp/jedit/search/HyperSearchFolderNode.java
+++ b/jEdit/org/gjt/sp/jedit/search/HyperSearchFolderNode.java
@@ -1,56 +1,56 @@
-/*
- * HyperSearchFolderNode - HyperSearch Folder Tree Node
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.search;
-
-import java.io.File;
-
-public class HyperSearchFolderNode
-{
- private File nodeFile;
- private boolean showFullPath;
- private static String fileSep = System.getProperty("file.separator");
- static
- {
- if (fileSep.equals("\\"))
- fileSep = "\\\\";
- }
-
- public File getNodeFile()
- {
- return nodeFile;
- }
-
- public HyperSearchFolderNode(File nodeFile, boolean showFullPath)
- {
- this.nodeFile = nodeFile;
- this.showFullPath = showFullPath;
- }
-
- public String toString()
- {
- if (showFullPath)
- return nodeFile.getAbsolutePath();
- String paths[] = nodeFile.getAbsolutePath().split(fileSep);
- return paths[paths.length - 1];
-
- }
-}
+/*
+ * HyperSearchFolderNode - HyperSearch Folder Tree Node
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.search;
+
+import java.io.File;
+
+public class HyperSearchFolderNode
+{
+ private File nodeFile;
+ private boolean showFullPath;
+ private static String fileSep = System.getProperty("file.separator");
+ static
+ {
+ if (fileSep.equals("\\"))
+ fileSep = "\\\\";
+ }
+
+ public File getNodeFile()
+ {
+ return nodeFile;
+ }
+
+ public HyperSearchFolderNode(File nodeFile, boolean showFullPath)
+ {
+ this.nodeFile = nodeFile;
+ this.showFullPath = showFullPath;
+ }
+
+ public String toString()
+ {
+ if (showFullPath)
+ return nodeFile.getAbsolutePath();
+ String paths[] = nodeFile.getAbsolutePath().split(fileSep);
+ return paths[paths.length - 1];
+
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/HyperSearchNode.java b/jEdit/org/gjt/sp/jedit/search/HyperSearchNode.java
index ed3b103..274575d 100644
--- a/jEdit/org/gjt/sp/jedit/search/HyperSearchNode.java
+++ b/jEdit/org/gjt/sp/jedit/search/HyperSearchNode.java
@@ -1,37 +1,37 @@
-/*
- * HyperSearchNode.java - HyperSearch node
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.EditPane;
-import org.gjt.sp.jedit.View;
-
-/**
- * @author Slava Pestov
- */
-public interface HyperSearchNode
-{
- Buffer getBuffer(View view);
-
- void goTo(EditPane editPane);
-}
+/*
+ * HyperSearchNode.java - HyperSearch node
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.EditPane;
+import org.gjt.sp.jedit.View;
+
+/**
+ * @author Slava Pestov
+ */
+public interface HyperSearchNode
+{
+ Buffer getBuffer(View view);
+
+ void goTo(EditPane editPane);
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/HyperSearchOperationNode.java b/jEdit/org/gjt/sp/jedit/search/HyperSearchOperationNode.java
index 33591f3..b994d6e 100644
--- a/jEdit/org/gjt/sp/jedit/search/HyperSearchOperationNode.java
+++ b/jEdit/org/gjt/sp/jedit/search/HyperSearchOperationNode.java
@@ -1,236 +1,236 @@
-/*
- * HyperSearchOperationNode.java - Top result node of a HyperSearch request
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.swing.JTree;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.MutableTreeNode;
-import javax.swing.tree.TreePath;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: HyperSearchOperationNode.java 14798 2009-03-19 11:50:45Z shlomy $
- */
-public class HyperSearchOperationNode
-{
- private boolean treeViewDisplayed;
- private final String searchString;
- private List<DefaultMutableTreeNode> resultNodes;
- private SearchMatcher searchMatcher;
-
- //{{{ HyperSearchOperationNode constructor
- public HyperSearchOperationNode(String searchString, SearchMatcher searchMatcher)
- {
- this.searchString = searchString;
- this.searchMatcher = searchMatcher;
- }//}}}
-
- //{{{ toString() method
- public String toString()
- {
- return searchString;
- }//}}}
-
- //{{{ isTreeViewDisplayed() method
- public boolean isTreeViewDisplayed()
- {
- return treeViewDisplayed;
- }//}}}
-
- //{{{ setTreeViewDisplayed() method
- public void setTreeViewDisplayed(boolean treeViewDisplayed)
- {
- this.treeViewDisplayed = treeViewDisplayed;
- }//}}}
-
- //{{{ restoreFlatNodes() method
- public void restoreFlatNodes(JTree resultTree, DefaultMutableTreeNode operNode)
- {
- for (int i = 0; i < resultNodes.size(); i++)
- {
- DefaultMutableTreeNode element = resultNodes.get(i);
- if (element.getUserObject() instanceof HyperSearchFileNode)
- ((HyperSearchFileNode)element.getUserObject()).showFullPath = true;
-
- operNode.insert(element, operNode.getChildCount());
- }
-
- ((DefaultTreeModel)resultTree.getModel()).nodeStructureChanged(operNode);
-
- for (Enumeration e = operNode.children(); e.hasMoreElements();)
- {
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)e.nextElement();
- resultTree.expandPath(new TreePath(node.getPath()));
- }
- resultTree.scrollPathToVisible(
- new TreePath(operNode.getPath()));
- }//}}}
-
- //{{{ cacheFlatNodes() method
- public void cacheResultNodes(DefaultMutableTreeNode operNode)
- {
- resultNodes = new ArrayList<DefaultMutableTreeNode>(operNode.getChildCount());
- for (Enumeration e = operNode.children(); e.hasMoreElements();)
- resultNodes.add((DefaultMutableTreeNode) e.nextElement());
- }//}}}
-
- //{{{ removeNodeFromCache() method
- public static void removeNodeFromCache(MutableTreeNode mnode)
- {
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)mnode;
- if (node.getUserObject() instanceof HyperSearchOperationNode)
- return;
-
- DefaultMutableTreeNode tmpNode = node;
- while ((tmpNode = (DefaultMutableTreeNode) tmpNode.getParent()) != null)
- {
- if (!(tmpNode.getUserObject() instanceof HyperSearchOperationNode))
- continue;
- HyperSearchOperationNode operNode = (HyperSearchOperationNode) tmpNode.getUserObject();
- if (operNode.resultNodes != null)
- {
- // the nodes aren't cached so no need to remove the node from cache
- operNode.resultNodes.remove(node);
- }
- break;
- }
-
- }//}}}
-
- //{{{ insertTreeNodes() method
- public void insertTreeNodes(JTree resultTree, DefaultMutableTreeNode operNode)
- {
- String fileSep = System.getProperty("file.separator");
- String fileSepRegex = System.getProperty("file.separator");
- if (fileSep.equals("\\"))
- fileSepRegex = "\\\\";
-
- //find the highest level common path
- String[] topPathTmp = null;
- int topPathNdx = -1;
-
- for (int i = 0;i < resultNodes.size();i++)
- {
- DefaultMutableTreeNode fileTreeNode = resultNodes.get(i);
- Object obj = fileTreeNode.getUserObject();
- if (!(obj instanceof HyperSearchFileNode))
- continue;
- HyperSearchFileNode fileNode = (HyperSearchFileNode)obj;
-
- int pos = fileNode.path.lastIndexOf(fileSep);
- String pathName = fileNode.path.substring(0, pos);
- String[] paths = pathName.split(fileSepRegex);
- if (topPathNdx == -1)
- {
- topPathNdx = paths.length;
- topPathTmp = paths;
- }
- else if (paths.length < topPathNdx)
- {
- topPathNdx = paths.length;
- topPathTmp = paths;
- }
- else
- {
- for (int ndx =0 ; ndx < topPathNdx; ndx++)
- {
- if (!paths[ndx].equals(topPathTmp[ndx]))
- {
- topPathNdx = ndx;
- break;
- }
- }
- }
- }
- String[] topPath = new String[topPathNdx];
- String topPathPath = "";
- for (int ndx = 0 ; ndx < topPathNdx; ndx++)
- {
- topPath[ndx] = topPathTmp[ndx];
- topPathPath = topPathPath.concat(topPath[ndx] + fileSep);
- }
- Map<String, DefaultMutableTreeNode> treeNodes = new HashMap<String, DefaultMutableTreeNode>();
- HyperSearchFolderNode folderNode =
- new HyperSearchFolderNode(new File(topPathPath), true);
- DefaultMutableTreeNode folderTreeNode = new DefaultMutableTreeNode(folderNode);
- operNode.insert(folderTreeNode, operNode.getChildCount());
- treeNodes.put(topPathPath, folderTreeNode);
-
- for (int i = 0;i < resultNodes.size();i++)
- {
- DefaultMutableTreeNode fileTreeNode = resultNodes.get(i);
- Object obj = fileTreeNode.getUserObject();
- if (!(obj instanceof HyperSearchFileNode))
- continue;
- HyperSearchFileNode fileNode = (HyperSearchFileNode)obj;
-
- fileNode.showFullPath = false;
- int pos = fileNode.path.lastIndexOf(fileSep);
- String pathName = fileNode.path.substring(0, pos);
- String[] paths = pathName.split(fileSepRegex);
-
- DefaultMutableTreeNode insNode = folderTreeNode;
- String partialPath = topPathPath;
- for (int ndx = topPathNdx; ndx < paths.length; ndx++)
- {
- partialPath = partialPath.concat(paths[ndx] + fileSep);
- DefaultMutableTreeNode tmpNode = treeNodes.get(partialPath);
- if (tmpNode == null)
- {
- HyperSearchFolderNode tmpFolderNode =
- new HyperSearchFolderNode(new File(partialPath), false);
- tmpNode = new DefaultMutableTreeNode(tmpFolderNode);
- insNode.insert(tmpNode, insNode.getChildCount());
- treeNodes.put(partialPath, tmpNode);
- }
- insNode = tmpNode;
- }
- insNode.insert(fileTreeNode, insNode.getChildCount());
- treeNodes.put(fileNode.path, insNode);
- }
-
- }//}}}
-
- //{{{ getSearchMatcher() method
- public SearchMatcher getSearchMatcher()
- {
- return searchMatcher;
- }//}}}
-
- //{{{ getSearchString() method
- public String getSearchString()
- {
- return searchString;
- }//}}}
-
-}
+/*
+ * HyperSearchOperationNode.java - Top result node of a HyperSearch request
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.MutableTreeNode;
+import javax.swing.tree.TreePath;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: HyperSearchOperationNode.java 14798 2009-03-19 11:50:45Z shlomy $
+ */
+public class HyperSearchOperationNode
+{
+ private boolean treeViewDisplayed;
+ private final String searchString;
+ private List<DefaultMutableTreeNode> resultNodes;
+ private SearchMatcher searchMatcher;
+
+ //{{{ HyperSearchOperationNode constructor
+ public HyperSearchOperationNode(String searchString, SearchMatcher searchMatcher)
+ {
+ this.searchString = searchString;
+ this.searchMatcher = searchMatcher;
+ }//}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return searchString;
+ }//}}}
+
+ //{{{ isTreeViewDisplayed() method
+ public boolean isTreeViewDisplayed()
+ {
+ return treeViewDisplayed;
+ }//}}}
+
+ //{{{ setTreeViewDisplayed() method
+ public void setTreeViewDisplayed(boolean treeViewDisplayed)
+ {
+ this.treeViewDisplayed = treeViewDisplayed;
+ }//}}}
+
+ //{{{ restoreFlatNodes() method
+ public void restoreFlatNodes(JTree resultTree, DefaultMutableTreeNode operNode)
+ {
+ for (int i = 0; i < resultNodes.size(); i++)
+ {
+ DefaultMutableTreeNode element = resultNodes.get(i);
+ if (element.getUserObject() instanceof HyperSearchFileNode)
+ ((HyperSearchFileNode)element.getUserObject()).showFullPath = true;
+
+ operNode.insert(element, operNode.getChildCount());
+ }
+
+ ((DefaultTreeModel)resultTree.getModel()).nodeStructureChanged(operNode);
+
+ for (Enumeration e = operNode.children(); e.hasMoreElements();)
+ {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)e.nextElement();
+ resultTree.expandPath(new TreePath(node.getPath()));
+ }
+ resultTree.scrollPathToVisible(
+ new TreePath(operNode.getPath()));
+ }//}}}
+
+ //{{{ cacheFlatNodes() method
+ public void cacheResultNodes(DefaultMutableTreeNode operNode)
+ {
+ resultNodes = new ArrayList<DefaultMutableTreeNode>(operNode.getChildCount());
+ for (Enumeration e = operNode.children(); e.hasMoreElements();)
+ resultNodes.add((DefaultMutableTreeNode) e.nextElement());
+ }//}}}
+
+ //{{{ removeNodeFromCache() method
+ public static void removeNodeFromCache(MutableTreeNode mnode)
+ {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)mnode;
+ if (node.getUserObject() instanceof HyperSearchOperationNode)
+ return;
+
+ DefaultMutableTreeNode tmpNode = node;
+ while ((tmpNode = (DefaultMutableTreeNode) tmpNode.getParent()) != null)
+ {
+ if (!(tmpNode.getUserObject() instanceof HyperSearchOperationNode))
+ continue;
+ HyperSearchOperationNode operNode = (HyperSearchOperationNode) tmpNode.getUserObject();
+ if (operNode.resultNodes != null)
+ {
+ // the nodes aren't cached so no need to remove the node from cache
+ operNode.resultNodes.remove(node);
+ }
+ break;
+ }
+
+ }//}}}
+
+ //{{{ insertTreeNodes() method
+ public void insertTreeNodes(JTree resultTree, DefaultMutableTreeNode operNode)
+ {
+ String fileSep = System.getProperty("file.separator");
+ String fileSepRegex = System.getProperty("file.separator");
+ if (fileSep.equals("\\"))
+ fileSepRegex = "\\\\";
+
+ //find the highest level common path
+ String[] topPathTmp = null;
+ int topPathNdx = -1;
+
+ for (int i = 0;i < resultNodes.size();i++)
+ {
+ DefaultMutableTreeNode fileTreeNode = resultNodes.get(i);
+ Object obj = fileTreeNode.getUserObject();
+ if (!(obj instanceof HyperSearchFileNode))
+ continue;
+ HyperSearchFileNode fileNode = (HyperSearchFileNode)obj;
+
+ int pos = fileNode.path.lastIndexOf(fileSep);
+ String pathName = fileNode.path.substring(0, pos);
+ String[] paths = pathName.split(fileSepRegex);
+ if (topPathNdx == -1)
+ {
+ topPathNdx = paths.length;
+ topPathTmp = paths;
+ }
+ else if (paths.length < topPathNdx)
+ {
+ topPathNdx = paths.length;
+ topPathTmp = paths;
+ }
+ else
+ {
+ for (int ndx =0 ; ndx < topPathNdx; ndx++)
+ {
+ if (!paths[ndx].equals(topPathTmp[ndx]))
+ {
+ topPathNdx = ndx;
+ break;
+ }
+ }
+ }
+ }
+ String[] topPath = new String[topPathNdx];
+ String topPathPath = "";
+ for (int ndx = 0 ; ndx < topPathNdx; ndx++)
+ {
+ topPath[ndx] = topPathTmp[ndx];
+ topPathPath = topPathPath.concat(topPath[ndx] + fileSep);
+ }
+ Map<String, DefaultMutableTreeNode> treeNodes = new HashMap<String, DefaultMutableTreeNode>();
+ HyperSearchFolderNode folderNode =
+ new HyperSearchFolderNode(new File(topPathPath), true);
+ DefaultMutableTreeNode folderTreeNode = new DefaultMutableTreeNode(folderNode);
+ operNode.insert(folderTreeNode, operNode.getChildCount());
+ treeNodes.put(topPathPath, folderTreeNode);
+
+ for (int i = 0;i < resultNodes.size();i++)
+ {
+ DefaultMutableTreeNode fileTreeNode = resultNodes.get(i);
+ Object obj = fileTreeNode.getUserObject();
+ if (!(obj instanceof HyperSearchFileNode))
+ continue;
+ HyperSearchFileNode fileNode = (HyperSearchFileNode)obj;
+
+ fileNode.showFullPath = false;
+ int pos = fileNode.path.lastIndexOf(fileSep);
+ String pathName = fileNode.path.substring(0, pos);
+ String[] paths = pathName.split(fileSepRegex);
+
+ DefaultMutableTreeNode insNode = folderTreeNode;
+ String partialPath = topPathPath;
+ for (int ndx = topPathNdx; ndx < paths.length; ndx++)
+ {
+ partialPath = partialPath.concat(paths[ndx] + fileSep);
+ DefaultMutableTreeNode tmpNode = treeNodes.get(partialPath);
+ if (tmpNode == null)
+ {
+ HyperSearchFolderNode tmpFolderNode =
+ new HyperSearchFolderNode(new File(partialPath), false);
+ tmpNode = new DefaultMutableTreeNode(tmpFolderNode);
+ insNode.insert(tmpNode, insNode.getChildCount());
+ treeNodes.put(partialPath, tmpNode);
+ }
+ insNode = tmpNode;
+ }
+ insNode.insert(fileTreeNode, insNode.getChildCount());
+ treeNodes.put(fileNode.path, insNode);
+ }
+
+ }//}}}
+
+ //{{{ getSearchMatcher() method
+ public SearchMatcher getSearchMatcher()
+ {
+ return searchMatcher;
+ }//}}}
+
+ //{{{ getSearchString() method
+ public String getSearchString()
+ {
+ return searchString;
+ }//}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/HyperSearchRequest.java b/jEdit/org/gjt/sp/jedit/search/HyperSearchRequest.java
index 911c4e9..8cc98b7 100644
--- a/jEdit/org/gjt/sp/jedit/search/HyperSearchRequest.java
+++ b/jEdit/org/gjt/sp/jedit/search/HyperSearchRequest.java
@@ -1,303 +1,298 @@
-/*
- * HyperSearchRequest.java - HyperSearch request, run in I/O thread
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import javax.swing.tree.*;
-import javax.swing.*;
-
-import org.gjt.sp.jedit.textarea.Selection;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.Buffer;
-import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.View;
-import org.gjt.sp.util.*;
-//}}}
-
-/**
- * HyperSearch results window.
- * @author Slava Pestov
- * @version $Id: HyperSearchRequest.java 16331 2009-10-13 13:35:10Z kpouer $
- */
-class HyperSearchRequest extends WorkRequest
-{
- //{{{ HyperSearchRequest constructor
- HyperSearchRequest(View view, SearchMatcher matcher,
- HyperSearchResults results, Selection[] selection)
- {
- this.view = view;
- this.matcher = matcher;
-
- this.results = results;
- searchString = SearchAndReplace.getSearchString();
- rootSearchNode = new DefaultMutableTreeNode(new HyperSearchOperationNode(searchString, matcher));
-
- this.selection = selection;
- } //}}}
-
- //{{{ run() method
- public void run()
- {
- setStatus(jEdit.getProperty("hypersearch-status"));
-
- SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
- String[] files = fileset.getFiles(view);
- if(files == null || files.length == 0)
- {
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- GUIUtilities.error(view,"empty-fileset",null);
- results.searchDone(rootSearchNode);
- }
- });
- return;
- }
-
- setMaximum(fileset.getFileCount(view));
-
- // to minimize synchronization and stuff like that, we only
- // show a status message at most twice a second
-
- // initially zero, so that we always show the first message
- String searchingCaption = jEdit.getProperty("hypersearch-results.searching",
- new String[] { SearchAndReplace.getSearchString() }) + ' ';
- try
- {
- if(selection != null)
- {
- Buffer buffer = view.getBuffer();
-
- searchInSelection(buffer);
- }
- else
- {
- int current = 0;
-
- long lastStatusTime = 0;
- int resultCount = 0;
- boolean asked = false;
- int maxResults = jEdit.getIntegerProperty("hypersearch.maxWarningResults");
-loop: for(int i = 0; i < files.length; i++)
- {
- if(jEdit.getBooleanProperty("hyperSearch-stopButton"))
- {
- jEdit.setTemporaryProperty("hyperSearch-stopButton", "false");
- Log.log(Log.MESSAGE, this, "Search stopped by user action (stop button)");
- break;
- }
- if (!asked && resultCount > maxResults && maxResults != 0)
- {
- Log.log(Log.DEBUG, this, "Search in progress, " + resultCount +
- " occurrences found, asking the user to stop");
- asked = true;
- int ret = GUIUtilities.confirm(view, "hypersearch.tooManyResults",
- new Object[]{resultCount},
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- if (ret == JOptionPane.YES_OPTION)
- {
- Log.log(Log.MESSAGE, this, "Search stopped by user action");
- break;
- }
- }
- String file = files[i];
- current++;
-
- long currentTime = System.currentTimeMillis();
- if(currentTime - lastStatusTime > 250)
- {
- setValue(current);
- lastStatusTime = currentTime;
- results.setSearchStatus(searchingCaption + file);
- }
-
- Buffer buffer = jEdit.openTemporary(null,null,file,false);
- if(buffer == null)
- continue loop;
-
- resultCount += doHyperSearch(buffer, 0, buffer.getLength());
- }
- Log.log(Log.MESSAGE, this, resultCount +" OCCURENCES");
- }
- }
- catch(final Exception e)
- {
- Log.log(Log.ERROR,this,e);
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- SearchAndReplace.handleError(view,e);
- }
- });
- }
- catch(WorkThread.Abort a)
- {
- }
- finally
- {
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- results.searchDone(rootSearchNode, selectNode);
- }
- });
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private View view;
- private SearchMatcher matcher;
- private HyperSearchResults results;
- private DefaultMutableTreeNode rootSearchNode;
- private Selection[] selection;
- private String searchString;
- private DefaultMutableTreeNode selectNode;
- //}}}
-
- //{{{ searchInSelection() method
- private int searchInSelection(Buffer buffer) throws Exception
- {
- setAbortable(false);
-
- int resultCount = 0;
-
- try
- {
- buffer.readLock();
-
- for(int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- if(s instanceof Selection.Rect)
- {
- for(int j = s.getStartLine();
- j <= s.getEndLine(); j++)
- {
- resultCount += doHyperSearch(buffer,
- s.getStart(buffer,j),
- s.getEnd(buffer,j));
- }
- }
- else
- {
- resultCount += doHyperSearch(buffer,
- s.getStart(),s.getEnd());
- }
- }
- }
- finally
- {
- buffer.readUnlock();
- }
-
- setAbortable(true);
-
- return resultCount;
- } //}}}
-
- //{{{ doHyperSearch() method
- private int doHyperSearch(Buffer buffer, int start, int end)
- throws Exception
- {
- setAbortable(false);
-
- HyperSearchFileNode hyperSearchFileNode = new HyperSearchFileNode(buffer.getPath());
- DefaultMutableTreeNode bufferNode = new DefaultMutableTreeNode(hyperSearchFileNode);
-
- int resultCount = doHyperSearch(buffer,start,end,bufferNode);
- hyperSearchFileNode.setCount(resultCount);
- if(resultCount != 0)
- rootSearchNode.insert(bufferNode,rootSearchNode.getChildCount());
-
- setAbortable(true);
-
- return resultCount;
- } //}}}
-
- //{{{ doHyperSearch() method
- private int doHyperSearch(Buffer buffer, int start, int end,
- DefaultMutableTreeNode bufferNode)
- {
- int resultCount = 0;
- JEditTextArea textArea = jEdit.getActiveView().getTextArea();
- int caretLine = textArea.getBuffer() == buffer ? textArea.getCaretLine() : -1;
- try
- {
- buffer.readLock();
-
- boolean endOfLine = buffer.getLineEndOffset(
- buffer.getLineOfOffset(end)) - 1 == end;
-
- int offset = start;
-
- HyperSearchResult lastResult = null;
-loop: for(int counter = 0; ; counter++)
- {
- boolean startOfLine = buffer.getLineStartOffset(
- buffer.getLineOfOffset(offset)) == offset;
-
- SearchMatcher.Match match = matcher.nextMatch(
- buffer.getSegment(offset, end - offset),
- startOfLine,endOfLine,counter == 0,
- false);
- if(match == null)
- break loop;
-
- int newLine = buffer.getLineOfOffset(
- offset + match.start);
- if(lastResult == null || lastResult.line != newLine)
- {
- lastResult = new HyperSearchResult(
- buffer,newLine);
- DefaultMutableTreeNode child = new DefaultMutableTreeNode(
- lastResult, false);
- if (lastResult.line == caretLine)
- selectNode = child;
- bufferNode.add(child);
- }
-
- lastResult.addOccur(offset + match.start,
- offset + match.end);
-
- offset += match.end;
- resultCount++;
- }
- }
- finally
- {
- buffer.readUnlock();
- }
-
- return resultCount;
- } //}}}
-
- //}}}
-}
+/*
+ * HyperSearchRequest.java - HyperSearch request, run in I/O thread
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import javax.swing.tree.*;
+import javax.swing.*;
+
+import org.gjt.sp.jedit.textarea.Selection;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * HyperSearch results window.
+ * @author Slava Pestov
+ * @version $Id: HyperSearchRequest.java 18456 2010-08-31 11:11:08Z kpouer $
+ */
+class HyperSearchRequest extends Task
+{
+ //{{{ HyperSearchRequest constructor
+ HyperSearchRequest(View view, SearchMatcher matcher,
+ HyperSearchResults results, Selection[] selection)
+ {
+ this.view = view;
+ this.matcher = matcher;
+
+ this.results = results;
+ searchString = SearchAndReplace.getSearchString();
+ rootSearchNode = new DefaultMutableTreeNode(new HyperSearchOperationNode(searchString, matcher));
+
+ this.selection = selection;
+ } //}}}
+
+ //{{{ run() method
+ @Override
+ public void _run()
+ {
+ setStatus(jEdit.getProperty("hypersearch-status"));
+
+ SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
+ String[] files = fileset.getFiles(view);
+ if(files == null || files.length == 0)
+ {
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ GUIUtilities.error(view,"empty-fileset",null);
+ results.searchDone(rootSearchNode);
+ }
+ });
+ return;
+ }
+
+ setMaximum(fileset.getFileCount(view));
+
+ // to minimize synchronization and stuff like that, we only
+ // show a status message at most twice a second
+
+ // initially zero, so that we always show the first message
+ String searchingCaption = jEdit.getProperty("hypersearch-results.searching",
+ new String[] { SearchAndReplace.getSearchString() }) + ' ';
+ try
+ {
+ if(selection != null)
+ {
+ Buffer buffer = view.getBuffer();
+
+ searchInSelection(buffer);
+ }
+ else
+ {
+ int current = 0;
+
+ long lastStatusTime = 0L;
+ int resultCount = 0;
+ boolean asked = false;
+ int maxResults = jEdit.getIntegerProperty("hypersearch.maxWarningResults");
+ for(int i = 0; i < files.length; i++)
+ {
+ if(jEdit.getBooleanProperty("hyperSearch-stopButton") ||
+ Thread.currentThread().isInterrupted())
+ {
+ jEdit.setTemporaryProperty("hyperSearch-stopButton", "false");
+ Log.log(Log.MESSAGE, this, "Search stopped by user action (stop button)");
+ break;
+ }
+ if (!asked && resultCount > maxResults && maxResults != 0)
+ {
+ Log.log(Log.DEBUG, this, "Search in progress, " + resultCount +
+ " occurrences found, asking the user to stop");
+ asked = true;
+ int ret = GUIUtilities.confirm(view, "hypersearch.tooManyResults",
+ new Object[]{resultCount},
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ if (ret == JOptionPane.YES_OPTION)
+ {
+ Log.log(Log.MESSAGE, this, "Search stopped by user action");
+ break;
+ }
+ }
+ String file = files[i];
+ current++;
+
+ long currentTime = System.currentTimeMillis();
+ if(currentTime - lastStatusTime > 250L)
+ {
+ setValue(current);
+ lastStatusTime = currentTime;
+ results.setSearchStatus(searchingCaption + file);
+ }
+
+ Buffer buffer = jEdit.openTemporary(null,null,file,false);
+ if(buffer != null)
+ resultCount += doHyperSearch(buffer, 0, buffer.getLength());
+ }
+ Log.log(Log.MESSAGE, this, resultCount +" OCCURENCES");
+ }
+ }
+ catch(final Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ SearchAndReplace.handleError(view,e);
+ }
+ });
+ }
+ finally
+ {
+ ThreadUtilities.runInDispatchThread(new Runnable()
+ {
+ public void run()
+ {
+ results.searchDone(rootSearchNode, selectNode);
+ }
+ });
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private final View view;
+ private final SearchMatcher matcher;
+ private final HyperSearchResults results;
+ private final DefaultMutableTreeNode rootSearchNode;
+ private final Selection[] selection;
+ private final String searchString;
+ private DefaultMutableTreeNode selectNode;
+ //}}}
+
+ //{{{ searchInSelection() method
+ private int searchInSelection(Buffer buffer) throws Exception
+ {
+ setCancellable(false);
+
+ int resultCount = 0;
+
+ try
+ {
+ buffer.readLock();
+
+ for(int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ if(s instanceof Selection.Rect)
+ {
+ for(int j = s.getStartLine();
+ j <= s.getEndLine(); j++)
+ {
+ resultCount += doHyperSearch(buffer,
+ s.getStart(buffer,j),
+ s.getEnd(buffer,j));
+ }
+ }
+ else
+ {
+ resultCount += doHyperSearch(buffer,
+ s.getStart(),s.getEnd());
+ }
+ }
+ }
+ finally
+ {
+ buffer.readUnlock();
+ }
+ setCancellable(true);
+
+ return resultCount;
+ } //}}}
+
+ //{{{ doHyperSearch() method
+ private int doHyperSearch(Buffer buffer, int start, int end)
+ throws Exception
+ {
+ setCancellable(false);
+
+ HyperSearchFileNode hyperSearchFileNode = new HyperSearchFileNode(buffer.getPath());
+ DefaultMutableTreeNode bufferNode = new DefaultMutableTreeNode(hyperSearchFileNode);
+
+ int resultCount = doHyperSearch(buffer,start,end,bufferNode);
+ hyperSearchFileNode.setCount(resultCount);
+ if(resultCount != 0)
+ rootSearchNode.insert(bufferNode,rootSearchNode.getChildCount());
+
+ setCancellable(true);
+
+ return resultCount;
+ } //}}}
+
+ //{{{ doHyperSearch() method
+ private int doHyperSearch(Buffer buffer, int start, int end,
+ DefaultMutableTreeNode bufferNode)
+ {
+ int resultCount = 0;
+ JEditTextArea textArea = jEdit.getActiveView().getTextArea();
+ int caretLine = textArea.getBuffer() == buffer ? textArea.getCaretLine() : -1;
+ try
+ {
+ buffer.readLock();
+
+ boolean endOfLine = buffer.getLineEndOffset(
+ buffer.getLineOfOffset(end)) - 1 == end;
+
+ int offset = start;
+
+ HyperSearchResult lastResult = null;
+ for(int counter = 0; ; counter++)
+ {
+ boolean startOfLine = buffer.getLineStartOffset(
+ buffer.getLineOfOffset(offset)) == offset;
+
+ SearchMatcher.Match match = matcher.nextMatch(
+ buffer.getSegment(offset, end - offset),
+ startOfLine,endOfLine,counter == 0,
+ false);
+ if(match == null)
+ break;
+
+ int newLine = buffer.getLineOfOffset(
+ offset + match.start);
+ if(lastResult == null || lastResult.line != newLine)
+ {
+ lastResult = new HyperSearchResult(
+ buffer,newLine);
+ DefaultMutableTreeNode child = new DefaultMutableTreeNode(
+ lastResult, false);
+ if (lastResult.line == caretLine)
+ selectNode = child;
+ bufferNode.add(child);
+ }
+
+ lastResult.addOccur(offset + match.start,
+ offset + match.end);
+
+ offset += match.end;
+ resultCount++;
+ }
+ }
+ finally
+ {
+ buffer.readUnlock();
+ }
+
+ return resultCount;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/HyperSearchResult.java b/jEdit/org/gjt/sp/jedit/search/HyperSearchResult.java
index 640c5ab..36e5878 100644
--- a/jEdit/org/gjt/sp/jedit/search/HyperSearchResult.java
+++ b/jEdit/org/gjt/sp/jedit/search/HyperSearchResult.java
@@ -1,217 +1,266 @@
-/*
- * HyperSearchResult.java - HyperSearch result
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import javax.swing.text.Position;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * A set of occurrences of the search string on a given line in a buffer.
- * @author Slava Pestov
- */
-public class HyperSearchResult implements HyperSearchNode
-{
- public String path;
- public Buffer buffer;
- public int line;
- public String str; // cached for speed
- public Occur occur;
- public int occurCount;
-
- //{{{ getBuffer() method
- public Buffer getBuffer(View view)
- {
- if(buffer == null)
- buffer = jEdit.openFile(view,path);
- return buffer;
- } //}}}
-
- //{{{ getSelection() method
- /**
- * Returns an array of selection objects pointing to the occurrences
- * of the search term on the current line. The buffer must be opened
- * first.
- * @since jEdit 4.2pre5
- */
- public Selection[] getSelection()
- {
- if(buffer == null)
- return null;
-
- Selection[] returnValue = new Selection[occurCount];
- Occur o = occur;
- int i = 0;
- while(o != null)
- {
- Selection.Range s = new Selection.Range(
- o.startPos.getOffset(),
- o.endPos.getOffset()
- );
- returnValue[i++] = s;
- o = o.next;
- }
- return returnValue;
- } //}}}
-
- //{{{ goTo() method
- public void goTo(final EditPane editPane)
- {
- final Buffer buffer = getBuffer(editPane.getView());
- if(buffer == null)
- return;
- editPane.setBuffer(buffer);
-
- VFSManager.runInAWTThread(new Runnable()
- {
- public void run()
- {
- Selection[] s = getSelection();
- if(s == null)
- return;
-
- JEditTextArea textArea = editPane.getTextArea();
- if(textArea.isMultipleSelectionEnabled())
- textArea.addToSelection(s);
- else
- textArea.setSelection(s);
-
- textArea.moveCaretPosition(occur.endPos.getOffset());
- }
- });
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- return str;
- } //}}}
-
- //{{{ Package-private members
-
- //{{{ HyperSearchResult constructor
- HyperSearchResult(Buffer buffer, int line)
- {
- path = buffer.getPath();
-
- if(!buffer.isTemporary())
- bufferOpened(buffer);
-
- this.line = line;
-
- str = (line + 1) + ": " + buffer.getLineText(line)
- .replace('\t',' ').trim();
- } //}}}
-
- //{{{ bufferOpened() method
- void bufferOpened(Buffer buffer)
- {
- this.buffer = buffer;
- Occur o = occur;
- while(o != null)
- {
- o.bufferOpened();
- o = o.next;
- }
- } //}}}
-
- //{{{ bufferClosed() method
- void bufferClosed()
- {
- buffer = null;
- Occur o = occur;
- while(o != null)
- {
- o.bufferClosed();
- o = o.next;
- }
- } //}}}
-
- //{{{ addOccur() method
- void addOccur(int start, int end)
- {
- Occur o = new Occur(start,end);
- o.next = occur;
- occur = o;
- occurCount++;
- } //}}}
-
- //{{{ pathEquals() method
- /**
- * @param path A canonical path
- */
- boolean pathEquals(String path)
- {
- return path.equals(MiscUtilities.resolveSymlinks(this.path));
- } //}}}
-
- //{{{ equals() method
- public boolean equals(Object compareObj)
- {
- if (!(compareObj instanceof HyperSearchResult))
- return false;
- HyperSearchResult otherResult = (HyperSearchResult)compareObj;
- return pathEquals(otherResult.path) && line == otherResult.line
- && buffer.equals(otherResult.buffer);
- }//}}}
-
- //}}}
-
- //{{{ Occur class
- public class Occur
- {
- public int start, end;
- public Position startPos, endPos;
- public Occur next;
-
- //{{{ Occur constructor
- Occur(int start, int end)
- {
- this.start = start;
- this.end = end;
-
- if(buffer != null && !buffer.isTemporary())
- bufferOpened();
- } //}}}
-
- //{{{ bufferOpened() method
- void bufferOpened()
- {
- startPos = buffer.createPosition(Math.min(
- buffer.getLength(),start));
- endPos = buffer.createPosition(Math.min(
- buffer.getLength(),end));
- } //}}}
-
- //{{{ bufferClosed() method
- void bufferClosed()
- {
- start = startPos.getOffset();
- end = endPos.getOffset();
- startPos = endPos = null;
- } //}}}
- } //}}}
-}
+/*
+ * HyperSearchResult.java - HyperSearch result
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import javax.swing.text.Position;
+
+import org.gjt.sp.jedit.msg.BufferUpdate;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.util.ThreadUtilities;
+//}}}
+
+/**
+ * A set of occurrences of the search string on a given line in a buffer.
+ * @author Slava Pestov
+ */
+public class HyperSearchResult implements HyperSearchNode
+{
+ public String path;
+ public Buffer buffer;
+ public int line;
+ public String str; // cached for speed
+ public Occur occur;
+ public int occurCount;
+
+ //{{{ getBuffer() method
+ public Buffer getBuffer(View view)
+ {
+ if(buffer == null)
+ buffer = jEdit.openFile(view,path);
+ return buffer;
+ } //}}}
+
+ //{{{ getSelection() method
+ /**
+ * Returns an array of selection objects pointing to the occurrences
+ * of the search term on the current line. The buffer must be opened
+ * first.
+ * @since jEdit 4.2pre5
+ */
+ public Selection[] getSelection()
+ {
+ if(buffer == null)
+ return null;
+
+ Selection[] returnValue = new Selection[occurCount];
+ Occur o = occur;
+ int i = 0;
+ while(o != null)
+ {
+ int start = o.startPos.getOffset();
+ int end = o.endPos.getOffset();
+ Selection.Range s = new Selection.Range(
+ start,
+ end
+ );
+ returnValue[i++] = s;
+ o = o.next;
+ }
+ return returnValue;
+ } //}}}
+
+ //{{{ goTo() method
+ public void goTo(final EditPane editPane)
+ {
+ new GotoDelayed(editPane);
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ return str;
+ } //}}}
+
+ //{{{ Package-private members
+
+ //{{{ HyperSearchResult constructor
+ HyperSearchResult(Buffer buffer, int line)
+ {
+ path = buffer.getPath();
+
+ if(!buffer.isTemporary())
+ bufferOpened(buffer);
+
+ this.line = line;
+
+ str = (line + 1) + ": " + buffer.getLineText(line)
+ .replace('\t',' ').trim();
+ } //}}}
+
+ //{{{ bufferOpened() method
+ void bufferOpened(Buffer buffer)
+ {
+ this.buffer = buffer;
+ Occur o = occur;
+ while(o != null)
+ {
+ o.bufferOpened();
+ o = o.next;
+ }
+ } //}}}
+
+ //{{{ bufferClosed() method
+ void bufferClosed()
+ {
+ buffer = null;
+ Occur o = occur;
+ while(o != null)
+ {
+ o.bufferClosed();
+ o = o.next;
+ }
+ } //}}}
+
+ //{{{ addOccur() method
+ void addOccur(int start, int end)
+ {
+ Occur o = new Occur(start,end);
+ o.next = occur;
+ occur = o;
+ occurCount++;
+ } //}}}
+
+ //{{{ pathEquals() method
+ /**
+ * @param path A canonical path
+ */
+ boolean pathEquals(String path)
+ {
+ return path.equals(MiscUtilities.resolveSymlinks(this.path));
+ } //}}}
+
+ //{{{ equals() method
+ public boolean equals(Object compareObj)
+ {
+ if (!(compareObj instanceof HyperSearchResult))
+ return false;
+ HyperSearchResult otherResult = (HyperSearchResult)compareObj;
+ return pathEquals(otherResult.path) && line == otherResult.line
+ && buffer.equals(otherResult.buffer);
+ }//}}}
+
+ //}}}
+
+ //{{{ Occur class
+ public class Occur
+ {
+ public int start, end;
+ public Position startPos, endPos;
+ public Occur next;
+
+ //{{{ Occur constructor
+ Occur(int start, int end)
+ {
+ this.start = start;
+ this.end = end;
+
+ if(buffer != null && !buffer.isTemporary())
+ bufferOpened();
+ } //}}}
+
+ //{{{ bufferOpened() method
+ void bufferOpened()
+ {
+ startPos = buffer.createPosition(Math.min(
+ buffer.getLength(),start));
+ endPos = buffer.createPosition(Math.min(
+ buffer.getLength(),end));
+ } //}}}
+
+ //{{{ bufferClosed() method
+ void bufferClosed()
+ {
+ start = startPos.getOffset();
+ end = endPos.getOffset();
+ startPos = endPos = null;
+ } //}}}
+ } //}}}
+
+ public class GotoDelayed implements Runnable
+ {
+ private final EditPane editPane;
+ private volatile boolean loadedEventReceived = false;
+
+ private GotoDelayed(EditPane editPane)
+ {
+ this.editPane = editPane;
+ EditBus.addToBus(this);
+ buffer = getBuffer(editPane.getView());
+ if(buffer == null)
+ {
+ EditBus.removeFromBus(this);
+ return;
+ }
+ editPane.setBuffer(buffer);
+ synchronized (this)
+ {
+ if (!loadedEventReceived && buffer.isLoaded())
+ {
+ bufferLoaded();
+ }
+ }
+
+ }
+
+ public void run()
+ {
+ Selection[] s = getSelection();
+ if(s == null)
+ return;
+
+ JEditTextArea textArea = editPane.getTextArea();
+ if(textArea.isMultipleSelectionEnabled())
+ textArea.addToSelection(s);
+ else
+ textArea.setSelection(s);
+
+ textArea.moveCaretPosition(occur.endPos.getOffset());
+ }
+
+ private void bufferLoaded()
+ {
+ synchronized (this)
+ {
+ if (!loadedEventReceived)
+ {
+ EditBus.removeFromBus(this);
+ loadedEventReceived = true;
+ ThreadUtilities.runInDispatchThread(this);
+ }
+ }
+ }
+
+ @EBHandler
+ public void handleBufferUpdate(BufferUpdate msg)
+ {
+ if (msg.getWhat() == BufferUpdate.LOADED &&
+ msg.getBuffer() == buffer)
+ {
+ bufferLoaded();
+ }
+ }
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/HyperSearchResults.java b/jEdit/org/gjt/sp/jedit/search/HyperSearchResults.java
index 85dbbae..9069190 100644
--- a/jEdit/org/gjt/sp/jedit/search/HyperSearchResults.java
+++ b/jEdit/org/gjt/sp/jedit/search/HyperSearchResults.java
@@ -1,1133 +1,1091 @@
-/*
- * HyperSearchResults.java - HyperSearch results
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 1999, 2000, 2001 Slava Pestov
- * Portions copyright (C) 2002 Peter Cox
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import javax.swing.*;
-import javax.swing.tree.*;
-
-import java.awt.*;
-import java.awt.datatransfer.*;
-import java.awt.event.*;
-import java.io.IOException;
-import java.util.*;
-import org.gjt.sp.jedit.gui.DefaultFocusComponent;
-import org.gjt.sp.jedit.gui.RolloverButton;
-import org.gjt.sp.jedit.gui.StyleEditor;
-import org.gjt.sp.jedit.msg.*;
-import org.gjt.sp.jedit.search.SearchMatcher.Match;
-import org.gjt.sp.jedit.syntax.SyntaxStyle;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.SyntaxUtilities;
-//}}}
-
-/**
- * HyperSearch results window.
- * @author Slava Pestov
- * @version $Id: HyperSearchResults.java 16532 2009-11-21 05:24:00Z shlomy $
- */
-public class HyperSearchResults extends JPanel implements EBComponent,
- DefaultFocusComponent
-{
- public static final String NAME = "hypersearch-results";
- public static final String HIGHLIGHT_PROP = "hypersearch.results.highlight";
-
- //{{{ HyperSearchResults constructor
- public HyperSearchResults(View view)
- {
- super(new BorderLayout());
-
- this.view = view;
-
- caption = new JLabel();
-
- Box toolBar = new Box(BoxLayout.X_AXIS);
- toolBar.add(caption);
- toolBar.add(Box.createGlue());
-
- ActionHandler ah = new ActionHandler();
-
- highlight = new RolloverButton();
- highlight.setToolTipText(jEdit.getProperty(
- "hypersearch-results.highlight.label"));
- highlight.addActionListener(ah);
- toolBar.add(highlight);
-
- clear = new RolloverButton(GUIUtilities.loadIcon(
- jEdit.getProperty("hypersearch-results.clear.icon")));
- clear.setToolTipText(jEdit.getProperty(
- "hypersearch-results.clear.label"));
- clear.addActionListener(ah);
- toolBar.add(clear);
-
- multi = new RolloverButton();
- multi.setToolTipText(jEdit.getProperty(
- "hypersearch-results.multi.label"));
- multi.addActionListener(ah);
- toolBar.add(multi);
-
- stop = new RolloverButton(GUIUtilities.loadIcon(
- jEdit.getProperty("hypersearch-results.stop.icon")));
- stop.setToolTipText(jEdit.getProperty(
- "hypersearch-results.stop.label"));
- stop.addActionListener(ah);
- toolBar.add(stop);
- stop.setEnabled(false);
-
- add(BorderLayout.NORTH, toolBar);
-
- resultTreeRoot = new DefaultMutableTreeNode();
- resultTreeModel = new DefaultTreeModel(resultTreeRoot);
- resultTree = new HighlightingTree(resultTreeModel);
- resultTree.setToolTipText(null);
- resultTree.setCellRenderer(new ResultCellRenderer());
- resultTree.setVisibleRowCount(16);
- resultTree.setRootVisible(false);
- resultTree.setShowsRootHandles(true);
- //the ESCAPE keystroke is assigned to hideTip action by swing
- //it breaks the action usually assigned to close-docking-area by jEdit,
- //so we remove this keystroke binding bug #1955140
- KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
- resultTree.getInputMap().remove(keyStroke);
- // looks bad with the OS X L&F, apparently...
- if(!OperatingSystem.isMacOSLF())
- resultTree.putClientProperty("JTree.lineStyle", "Angled");
-
- resultTree.setEditable(false);
-
- resultTree.addKeyListener(new KeyHandler());
- resultTree.addMouseListener(new MouseHandler());
-
- JScrollPane scrollPane = new JScrollPane(resultTree);
- Dimension dim = scrollPane.getPreferredSize();
- dim.width = 400;
- scrollPane.setPreferredSize(dim);
- add(BorderLayout.CENTER, scrollPane);
- resultTree.setTransferHandler(new ResultTreeTransferHandler());
- } //}}}
-
- //{{{ focusOnDefaultComponent() method
- public void focusOnDefaultComponent()
- {
- resultTree.requestFocus();
- } //}}}
-
- //{{{ addNotify() method
- public void addNotify()
- {
- super.addNotify();
- EditBus.addToBus(this);
- multiStatus = jEdit.getBooleanProperty(
- "hypersearch-results.multi");
- updateHighlightStatus();
- updateMultiStatus();
- } //}}}
-
- //{{{ removeNotify() method
- public void removeNotify()
- {
- super.removeNotify();
- EditBus.removeFromBus(this);
- jEdit.setBooleanProperty("hypersearch-results.multi",multiStatus);
- } //}}}
-
- //{{{ visitBuffers() method
- private void visitBuffers(final ResultVisitor visitor, final Buffer buffer)
- {
- // impl note: since multi-level hierarchies now allowed,
- // use traverseNodes to process HyperSearchResult nodes
- traverseNodes(resultTreeRoot, new TreeNodeCallbackAdapter()
- {
- public boolean processNode(DefaultMutableTreeNode node)
- {
- Object userObject = node.getUserObject();
- if (!(userObject instanceof HyperSearchResult))
- return true;
- HyperSearchResult result = (HyperSearchResult) userObject;
- if (result.pathEquals(buffer.getSymlinkPath()))
- visitor.visit(buffer, result);
- return true;
- }
- });
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof BufferUpdate)
- {
- BufferUpdate bmsg = (BufferUpdate)msg;
- Buffer buffer = bmsg.getBuffer();
- Object what = bmsg.getWhat();
- if(what == BufferUpdate.LOADED)
- visitBuffers(new BufferLoadedVisitor(),buffer);
- else if(what == BufferUpdate.CLOSED)
- visitBuffers(new BufferClosedVisitor(),buffer);
- }
- } //}}}
-
- //{{{ traverseNodes() method
- public static boolean traverseNodes(DefaultMutableTreeNode node,
- HyperSearchTreeNodeCallback callbackInterface)
- {
- if (!callbackInterface.processNode(node))
- return false;
- for (Enumeration e = node.children(); e.hasMoreElements();)
- {
- DefaultMutableTreeNode childNode = (DefaultMutableTreeNode)e.nextElement();
- if (!traverseNodes(childNode, callbackInterface))
- return false;
- }
- return true;
- } //}}}
-
- //{{{ getTreeModel() method
- public DefaultTreeModel getTreeModel()
- {
- return resultTreeModel;
- } //}}}
-
- //{{{ getTree() method
- /**
- * Returns the result tree.
- *
- * @return the result tree
- * @since jEdit 4.1pre9
- */
- public JTree getTree()
- {
- return resultTree;
- } //}}}
-
- //{{{ searchStarted() method
- public void searchStarted()
- {
- stop.setEnabled(true);
- caption.setText(jEdit.getProperty("hypersearch-results.searching",
- new String[] { SearchAndReplace.getSearchString() }));
- } //}}}
-
- //{{{ setSearchStatus() method
- public void setSearchStatus(String status)
- {
- caption.setText(status);
- } //}}}
-
- //{{{ searchFailed() method
- public void searchFailed()
- {
- caption.setText(jEdit.getProperty("hypersearch-results.no-results",
- new String[] { SearchAndReplace.getSearchString() }));
-
- // collapse all nodes, as suggested on user mailing list...
- for(int i = 0; i < resultTreeRoot.getChildCount(); i++)
- {
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)
- resultTreeRoot.getChildAt(i);
- resultTree.collapsePath(new TreePath(new Object[] {
- resultTreeRoot, node }));
- }
- } //}}}
-
- //{{{ searchDone() method
- /**
- * @param searchNode the result node
- * @param selectNode the node that must be selected, or null
- * @since jEdit 4.3pre12
- */
- public void searchDone(final DefaultMutableTreeNode searchNode, final DefaultMutableTreeNode selectNode)
- {
- stop.setEnabled(false);
- final int nodeCount = searchNode.getChildCount();
- if (nodeCount < 1)
- {
- searchFailed();
- return;
- }
-
- caption.setText(jEdit.getProperty("hypersearch-results.done",
- new String [] { SearchAndReplace.getSearchString() }));
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- if(!multiStatus)
- {
- for(int i = 0; i < resultTreeRoot.getChildCount(); i++)
- {
- resultTreeRoot.remove(0);
- }
- }
-
- resultTreeRoot.add(searchNode);
- resultTreeModel.reload(resultTreeRoot);
-
-
- for (int i = 0; i < nodeCount; i++)
- {
- TreePath lastNode = new TreePath(
- ((DefaultMutableTreeNode)
- searchNode.getChildAt(i))
- .getPath());
-
- resultTree.expandPath(lastNode);
- }
- TreePath treePath;
- if (selectNode == null)
- {
- treePath = new TreePath(new Object[]{
- resultTreeRoot, searchNode});
- }
- else
- {
- treePath = new TreePath(selectNode.getPath());
- }
- resultTree.setSelectionPath(treePath);
- resultTree.scrollPathToVisible(
- treePath);
- }
- });
- } //}}}
-
- //{{{ searchDone() method
- public void searchDone(final DefaultMutableTreeNode searchNode)
- {
- searchDone(searchNode, null);
- } //}}}
-
- //{{{ Private members
- private View view;
-
- private JLabel caption;
- private final JTree resultTree;
- private DefaultMutableTreeNode resultTreeRoot;
- private DefaultTreeModel resultTreeModel;
-
- private RolloverButton highlight;
- private RolloverButton clear;
- private RolloverButton multi;
- private RolloverButton stop;
- private boolean multiStatus;
-
- //{{{ updateHighlightStatus() method
- private void updateHighlightStatus()
- {
- String prop = jEdit.getProperty(HIGHLIGHT_PROP);
- if (prop != null && prop.length() > 0)
- highlight.setIcon(GUIUtilities.loadIcon(jEdit.getProperty("hypersearch-results.match.highlight.icon")));
- else
- highlight.setIcon(GUIUtilities.loadIcon(jEdit.getProperty("hypersearch-results.match.normal.icon")));
- resultTree.repaint();
- } //}}}
-
- //{{{ updateMultiStatus() method
- private void updateMultiStatus()
- {
- if(multiStatus)
- multi.setIcon(GUIUtilities.loadIcon(jEdit.getProperty("hypersearch-results.multi.multiple.icon")));
- else
- multi.setIcon(GUIUtilities.loadIcon(jEdit.getProperty("hypersearch-results.multi.single.icon")));
- } //}}}
-
- //{{{ goToSelectedNode() method
- public static final int M_OPEN = 0;
- public static final int M_OPEN_NEW_VIEW = 1;
- public static final int M_OPEN_NEW_PLAIN_VIEW = 2;
- public static final int M_OPEN_NEW_SPLIT = 3;
-
- private void goToSelectedNode(int mode)
- {
- TreePath path = resultTree.getSelectionPath();
- if(path == null)
- return;
-
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)path
- .getLastPathComponent();
- Object value = node.getUserObject();
-
- // do nothing if clicked "foo (showing n occurrences in m files)"
- if(node.getParent() != resultTreeRoot && value instanceof HyperSearchNode)
- {
- HyperSearchNode n = (HyperSearchNode)value;
- Buffer buffer = n.getBuffer(view);
- if(buffer == null)
- return;
-
- EditPane pane;
-
- switch(mode)
- {
- case M_OPEN:
- pane = view.goToBuffer(buffer);
- break;
- case M_OPEN_NEW_VIEW:
- pane = jEdit.newView(view,buffer,false).getEditPane();
- break;
- case M_OPEN_NEW_PLAIN_VIEW:
- pane = jEdit.newView(view,buffer,true).getEditPane();
- break;
- case M_OPEN_NEW_SPLIT:
- pane = view.splitHorizontally();
- break;
- default:
- throw new IllegalArgumentException("Bad mode: " + mode);
- }
-
- n.goTo(pane);
- }
- } //}}}
-
- //{{{ removeSelectedNode() method
- private void removeSelectedNode()
- {
- TreePath path = resultTree.getSelectionPath();
- if(path == null)
- return;
-
- MutableTreeNode value = (MutableTreeNode)path
- .getLastPathComponent();
-
- if(path.getPathCount() > 1)
- {
- // Adjust selection so that repeating some removals
- // behave naturally.
- TreePath parentPath = path.getParentPath();
- MutableTreeNode parent = (MutableTreeNode)parentPath
- .getLastPathComponent();
- int removingIndex = parent.getIndex(value);
- int nextIndex = removingIndex + 1;
- if(nextIndex < parent.getChildCount())
- {
- TreeNode next = parent.getChildAt(nextIndex);
- resultTree.setSelectionPath(
- parentPath.pathByAddingChild(next));
- }
- else
- {
- resultTree.setSelectionPath(parentPath);
- }
-
- resultTreeModel.removeNodeFromParent(value);
- }
-
- HyperSearchOperationNode.removeNodeFromCache(value);
- if (resultTreeRoot.getChildCount() == 0)
- {
- hideDockable();
- }
- } //}}}
-
- //{{{ removeAllNodes() method
- private void removeAllNodes()
- {
- resultTreeRoot.removeAllChildren();
- resultTreeModel.reload(resultTreeRoot);
- setSearchStatus(null);
- hideDockable();
- } //}}}
-
- //{{{ hideDockable() method
- private void hideDockable()
- {
- view.getDockableWindowManager().hideDockableWindow(NAME);
- } //}}}
-
- //{{{ parseHighlightStyle()
- SyntaxStyle parseHighlightStyle(String style)
- {
- Font f = (resultTree != null) ? resultTree.getFont() :
- UIManager.getFont("Tree.font");
- SyntaxStyle s;
- try
- {
- s = SyntaxUtilities.parseStyle(style, f.getFamily(), f.getSize(), true, null);
- }
- catch (Exception e)
- {
- style = "color:#000000";
- s = SyntaxUtilities.parseStyle(style, f.getFamily(), f.getSize(), true);
- }
- return s;
- }
- //}}}
-
- //}}}
-
- //{{{ ActionHandler class
- public class ActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == highlight)
- {
- String prop = jEdit.getProperty(HIGHLIGHT_PROP);
- SyntaxStyle style = new StyleEditor(jEdit.getActiveView(), parseHighlightStyle(prop),
- "hypersearch").getStyle();
- if (style != null)
- jEdit.setProperty(HIGHLIGHT_PROP, GUIUtilities.getStyleString(style));
- updateHighlightStatus();
- }
- else if(source == clear)
- {
- removeAllNodes();
- }
- else if(source == multi)
- {
- multiStatus = !multiStatus;
- updateMultiStatus();
-
- if(!multiStatus)
- {
- for(int i = resultTreeRoot.getChildCount() - 2; i >= 0; i--)
- {
- resultTreeModel.removeNodeFromParent(
- (MutableTreeNode)resultTreeRoot
- .getChildAt(i));
- }
- }
- }
- else if(source == stop)
- {
- jEdit.setTemporaryProperty("hyperSearch-stopButton", "true");
- }
- }
- } //}}}
-
- //{{{ HighlightingTree class
- class HighlightingTree extends JTree
- {
- private String prop;
- private String styleTag;
-
- public HighlightingTree(DefaultTreeModel model)
- {
- super(model);
- prop = jEdit.getProperty(HIGHLIGHT_PROP);
- if (prop != null && prop.length() > 0)
- styleTag = style2html(prop);
- }
-
- @Override
- public String convertValueToText(Object value, boolean selected,
- boolean expanded, boolean leaf, int row, boolean hasFocus)
- {
- String s = super.convertValueToText(value, selected, expanded, leaf,
- row, hasFocus);
- String newProp = jEdit.getProperty(HIGHLIGHT_PROP);
- if (newProp == null || newProp.length() == 0)
- return s;
- DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
- while ((node != null) &&
- (! (node.getUserObject() instanceof HyperSearchOperationNode)))
- {
- node = (DefaultMutableTreeNode) node.getParent();
- }
- if (node == null)
- return s;
- if (! newProp.equals(prop))
- {
- prop = newProp;
- styleTag = style2html(prop);
- }
- SearchMatcher matcher =
- ((HyperSearchOperationNode) node.getUserObject()).getSearchMatcher();
- StringBuilder sb = new StringBuilder("<html><style>.highlight {");
- sb.append(styleTag);
- sb.append("}</style><body>");
- int lineTextIndex = s.indexOf(": ");
- if (lineTextIndex > 0)
- {
- lineTextIndex += 2;
- appendString2html(sb, s.substring(0, lineTextIndex));
- s = s.substring(lineTextIndex);
- }
- int i = 0;
- Match m;
- while ((m = matcher.nextMatch(s.substring(i), true, true, true, false)) != null)
- {
- appendString2html(sb, s.substring(i, i + m.start));
- sb.append("<span class=\"highlight\">");
- appendString2html(sb, s.substring(i + m.start, i + m.end));
- sb.append("</span>");
- i += m.end;
- }
- appendString2html(sb, s.substring(i));
- sb.append("</body></html>");
- return sb.toString();
- }
-
- private String color2html(Color c)
- {
- StringBuilder cs = new StringBuilder("rgb(");
- cs.append(c.getRed());
- cs.append(",");
- cs.append(c.getGreen());
- cs.append(",");
- cs.append(c.getBlue());
- cs.append(");");
- return cs.toString();
- }
-
- private String style2html(String prop)
- {
- StringBuilder tag = new StringBuilder();
- SyntaxStyle style = parseHighlightStyle(prop);
- Font f = style.getFont();
- Color c = style.getForegroundColor();
- if (c != null)
- tag.append("color:").append(color2html(c));
- c = style.getBackgroundColor();
- if (c != null)
- tag.append("background:").append(color2html(c));
- if (f.isBold())
- tag.append("font-weight:bold;");
- if (f.isItalic())
- tag.append("font-style: italic;");
- return tag.toString();
- }
-
- private void appendString2html(StringBuilder sb, String s)
- {
- for (int i = 0; i < s.length(); i++)
- {
- char c = s.charAt(i);
- String r;
- switch (c)
- {
- case '"':
- r = """;
- break;
- // case '\'': r = "'"; break;
- case '&':
- r = "&";
- break;
- case '<':
- r = "<";
- break;
- case '>':
- r = ">";
- break;
- default:
- r = String.valueOf(c);
- break;
- }
- sb.append(r);
- }
- }
- } //}}}
-
- //{{{ KeyHandler class
- class KeyHandler extends KeyAdapter
- {
- public void keyPressed(KeyEvent evt)
- {
- switch(evt.getKeyCode())
- {
- case KeyEvent.VK_SPACE:
- goToSelectedNode(M_OPEN);
-
- // fuck me dead
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- resultTree.requestFocus();
- }
- });
-
- evt.consume();
- break;
- case KeyEvent.VK_ENTER:
- goToSelectedNode(M_OPEN);
- evt.consume();
- break;
- case KeyEvent.VK_DELETE:
- removeSelectedNode();
- evt.consume();
- break;
- default:
- break;
- }
- }
- } //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseAdapter
- {
- //{{{ mousePressed() method
- public void mousePressed(MouseEvent evt)
- {
- if(evt.isConsumed())
- return;
-
- TreePath path1 = resultTree.getPathForLocation(
- evt.getX(),evt.getY());
- if(path1 == null)
- return;
-
- resultTree.setSelectionPath(path1);
- if (GUIUtilities.isPopupTrigger(evt))
- showPopupMenu(evt);
- else
- {
- goToSelectedNode(M_OPEN);
- }
- } //}}}
-
- //{{{ Private members
- private JPopupMenu popupMenu;
-
- //{{{ showPopupMenu method
- private void showPopupMenu(MouseEvent evt)
- {
- TreePath path = resultTree.getSelectionPath();
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
-
- popupMenu = new JPopupMenu();
- Object userObj = node.getUserObject();
- if (userObj instanceof HyperSearchFileNode
- || userObj instanceof HyperSearchResult)
- {
- popupMenu.add(new GoToNodeAction(
- "hypersearch-results.open",
- M_OPEN));
- popupMenu.add(new GoToNodeAction(
- "hypersearch-results.open-view",
- M_OPEN_NEW_VIEW));
- popupMenu.add(new GoToNodeAction(
- "hypersearch-results.open-plain-view",
- M_OPEN_NEW_PLAIN_VIEW));
- popupMenu.add(new GoToNodeAction(
- "hypersearch-results.open-split",
- M_OPEN_NEW_SPLIT));
- }
- if (!(userObj instanceof HyperSearchFolderNode))
- popupMenu.add(new RemoveTreeNodeAction());
- popupMenu.add(new ExpandChildTreeNodesAction());
- if (userObj instanceof HyperSearchFolderNode
- || userObj instanceof HyperSearchOperationNode)
- {
- popupMenu.add(new CollapseChildTreeNodesAction());
- if (userObj instanceof HyperSearchFolderNode)
- popupMenu.add(new NewSearchAction());
- }
- if (userObj instanceof HyperSearchOperationNode)
- {
- popupMenu.add(new JPopupMenu.Separator());
- HyperSearchOperationNode resultNode = (HyperSearchOperationNode)userObj;
- JCheckBoxMenuItem chkItem =
- new JCheckBoxMenuItem(jEdit.getProperty("hypersearch-results.tree-view"),
- resultNode.isTreeViewDisplayed());
- chkItem.addActionListener(new TreeDisplayAction());
- popupMenu.add(chkItem);
-
- popupMenu.add(new RedoSearchAction((HyperSearchOperationNode)userObj));
- }
- popupMenu.add(new CopyToClipboardAction());
-
- GUIUtilities.showPopupMenu(popupMenu,evt.getComponent(),
- evt.getX(),evt.getY());
- evt.consume();
- } //}}}
-
- //}}}
- } //}}}
-
- //{{{ RemoveTreeNodeAction class
- class RemoveTreeNodeAction extends AbstractAction
- {
- RemoveTreeNodeAction()
- {
- super(jEdit.getProperty("hypersearch-results.remove-node"));
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- removeSelectedNode();
- }
- }//}}}
-
- //{{{ RemoveAllTreeNodesAction class
- class RemoveAllTreeNodesAction extends AbstractAction
- {
- RemoveAllTreeNodesAction()
- {
- super(jEdit.getProperty("hypersearch-results.remove-all-nodes"));
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- removeAllNodes();
- }
- }//}}}
-
- //{{{ NewSearchAction class
- class NewSearchAction extends AbstractAction
- {
- NewSearchAction()
- {
- super(jEdit.getProperty("hypersearch-results.new-search"));
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- TreePath path = resultTree.getSelectionPath();
- DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)path.getLastPathComponent();
- HyperSearchFolderNode nodeObj = (HyperSearchFolderNode)operNode.getUserObject();
-
- String glob = "*";
- SearchFileSet dirList = SearchAndReplace.getSearchFileSet();
- if (dirList instanceof DirectoryListSet)
- glob = ((DirectoryListSet)dirList).getFileFilter();
- SearchAndReplace.setSearchFileSet(new DirectoryListSet(
- nodeObj.getNodeFile().getAbsolutePath(),glob,true));
- SearchDialog.showSearchDialog(view,null,SearchDialog.DIRECTORY);
- }
- }//}}}
-
- //{{{ ExpandChildTreeNodesAction class
- class ExpandChildTreeNodesAction extends AbstractAction
- {
- ExpandChildTreeNodesAction()
- {
- super(jEdit.getProperty("hypersearch-results.expand-child-nodes"));
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- TreePath path = resultTree.getSelectionPath();
- DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)path.getLastPathComponent();
- expandAllNodes(operNode);
- }
- }//}}}
-
- //{{{ CopyToClipboardAction class
- class CopyToClipboardAction extends AbstractAction
- {
- CopyToClipboardAction()
- {
- super(jEdit.getProperty("hypersearch-results.copy-to-clipboard"));
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- TreePath path = resultTree.getSelectionPath();
- DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)
- path.getLastPathComponent();
- ToStringNodes toStringNodes = new ToStringNodes();
- traverseNodes(operNode, toStringNodes);
- StringSelection selection = new StringSelection(
- toStringNodes.nodesString.toString());
- Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
- clipboard.setContents(selection, null);
- }
- }//}}}
-
- //{{{ ToStringNodes class
- class ToStringNodes implements HyperSearchTreeNodeCallback
- {
- StringBuilder nodesString = new StringBuilder();
-
- public boolean processNode(DefaultMutableTreeNode node)
- {
- Object userObject = node.getUserObject();
- if (userObject instanceof HyperSearchFileNode)
- nodesString.append(((HyperSearchFileNode)userObject).path);
- else if (userObject instanceof HyperSearchResult)
- {
- HyperSearchResult hsr = (HyperSearchResult)userObject;
- // Copy the ORIGINAL line from the buffer!
- nodesString.append(hsr.buffer == null ? hsr.toString() : hsr.buffer.getLineText(hsr.line));
- }
- else
- nodesString.append(userObject.toString());
- nodesString.append(System.getProperty("line.separator"));
- return true;
- }
- }//}}}
-
- //{{{ CollapseChildTreeNodesAction class
- class CollapseChildTreeNodesAction extends AbstractAction
- {
- CollapseChildTreeNodesAction()
- {
- super(jEdit.getProperty("hypersearch-results.collapse-child-nodes"));
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- TreePath path = resultTree.getSelectionPath();
- DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)path.getLastPathComponent();
- for (Enumeration e = operNode.children(); e.hasMoreElements();)
- {
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)e.nextElement();
- resultTree.collapsePath(new TreePath(node.getPath()));
- }
- resultTree.scrollPathToVisible(
- new TreePath(operNode.getPath()));
- }
- }//}}}
-
- //{{{ RedoSearchAction class
- class RedoSearchAction extends AbstractAction
- {
- private HyperSearchOperationNode hyperSearchOperationNode;
- public RedoSearchAction(HyperSearchOperationNode hyperSearchOperationNode)
- {
- super(jEdit.getProperty("hypersearch-results.redo"));
- this.hyperSearchOperationNode = hyperSearchOperationNode;
- }
-
- /**
- * Invoked when an action occurs.
- */
- public void actionPerformed(ActionEvent e)
- {
- SearchAndReplace.setSearchString(hyperSearchOperationNode.getSearchString());
- SearchAndReplace.setSearchMatcher(hyperSearchOperationNode.getSearchMatcher());
- removeSelectedNode();
- SearchAndReplace.hyperSearch(view, false);
- }
- } //}}}
-
- //{{{ TreeDisplayAction class
- class TreeDisplayAction extends AbstractAction
- {
- public void actionPerformed(ActionEvent evt)
- {
- JCheckBoxMenuItem menuItem = (JCheckBoxMenuItem) evt.getSource();
- boolean curState = menuItem.isSelected();
-
- TreePath path = resultTree.getSelectionPath();
- DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)path.getLastPathComponent();
-
- HyperSearchOperationNode operNodeObj = (HyperSearchOperationNode)operNode.getUserObject();
- if (curState)
- operNodeObj.cacheResultNodes(operNode);
- operNode.removeAllChildren();
- Exception excp = null;
- if (curState)
- {
- try
- {
- operNodeObj.insertTreeNodes(resultTree, operNode);
- }
- catch (Exception ex)
- {
- operNodeObj.restoreFlatNodes(resultTree, operNode);
- menuItem.setSelected(false);
- excp = ex;
- }
- finally
- {
- ((DefaultTreeModel)resultTree.getModel()).nodeStructureChanged(operNode);
- expandAllNodes(operNode);
- resultTree.scrollPathToVisible(
- new TreePath(operNode.getPath()));
- }
- if (excp != null)
- throw new RuntimeException(excp);
- }
- else
- operNodeObj.restoreFlatNodes(resultTree, operNode);
-
- operNodeObj.setTreeViewDisplayed(menuItem.isSelected());
- }
- }//}}}
-
- //{{{ expandAllNodes() method
- public void expandAllNodes(DefaultMutableTreeNode node)
- {
-
- traverseNodes(node, new TreeNodeCallbackAdapter()
- {
- public boolean processNode(DefaultMutableTreeNode node)
- {
- resultTree.expandPath(new TreePath(node.getPath()));
- return true;
- }
- });
- } //}}}
-
- //{{{ GoToNodeAction class
- class GoToNodeAction extends AbstractAction
- {
- private int mode;
-
- GoToNodeAction(String labelProp, int mode)
- {
- super(jEdit.getProperty(labelProp));
- this.mode = mode;
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- goToSelectedNode(mode);
- }
- }//}}}
-
- //{{{ ResultCellRenderer class
- class ResultCellRenderer extends DefaultTreeCellRenderer
- {
- Font plainFont, boldFont;
-
- //{{{ ResultCellRenderer constructor
- ResultCellRenderer()
- {
- plainFont = UIManager.getFont("Tree.font");
- if(plainFont == null)
- plainFont = jEdit.getFontProperty("metal.secondary.font");
- boldFont = new Font(plainFont.getName(),Font.BOLD,
- plainFont.getSize());
- } //}}}
-
- //{{{ getTreeCellRendererComponent() method
- public Component getTreeCellRendererComponent(JTree tree,
- Object value, boolean sel, boolean expanded,
- boolean leaf, int row, boolean hasFocus)
- {
- super.getTreeCellRendererComponent(tree,value,sel,
- expanded,leaf,row,hasFocus);
- setIcon(null);
- DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
-
- if (node.getUserObject() instanceof HyperSearchOperationNode)
- {
- setFont(boldFont);
-
- CountNodes countNodes = new CountNodes();
- traverseNodes(node, countNodes);
-
- setText(jEdit.getProperty("hypersearch-results.result-caption",
- new Object[] {
- node.toString(),
- Integer.valueOf(countNodes.resultCount),
- Integer.valueOf(countNodes.bufferCount)
- }));
- }
- else if(node.getUserObject() instanceof HyperSearchFolderNode)
- {
- setFont(plainFont);
- setText(node.toString() + " (" + node.getChildCount() + " files/folders)");
- }
- else if(node.getUserObject() instanceof HyperSearchFileNode)
- {
- // file name
- setFont(boldFont);
- HyperSearchFileNode hyperSearchFileNode = (HyperSearchFileNode) node.getUserObject();
- setText(jEdit.getProperty("hypersearch-results.file-caption",
- new Object[] {
- hyperSearchFileNode,
- Integer.valueOf(hyperSearchFileNode.getCount()),
- Integer.valueOf(node.getChildCount())
- }));
- }
- else
- {
- setFont(plainFont);
- }
-
- return this;
- } //}}}
-
- //{{{ CountNodes class
- class CountNodes implements HyperSearchTreeNodeCallback
- {
- int bufferCount;
- int resultCount;
- public boolean processNode(DefaultMutableTreeNode node)
- {
- Object userObject = node.getUserObject();
- if (userObject instanceof HyperSearchFileNode)
- {
- resultCount += ((HyperSearchFileNode)userObject).getCount();
- bufferCount++;
- }
- return true;
- }
- }//}}}
- } //}}}
-
- //{{{
- class ResultTreeTransferHandler extends TransferHandler
- {
- @Override
- public void exportToClipboard(JComponent comp, Clipboard clip,
- int action) throws IllegalStateException
- {
- TreePath [] paths = resultTree.getSelectionPaths();
- ToStringNodes toStringNodes = new ToStringNodes();
- for (TreePath path: paths)
- {
- DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)
- path.getLastPathComponent();
- toStringNodes.processNode(operNode);
- }
- StringSelection selection = new StringSelection(
- toStringNodes.nodesString.toString());
- Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
- clipboard.setContents(selection, null);
- }
- } //}}}
-
- // these are used to eliminate code duplication. i don't normally use
- // the visitor or "template method" pattern, but this code was contributed
- // by Peter Cox and i don't feel like changing it around too much.
-
- //{{{ ResultVisitor interface
- interface ResultVisitor
- {
- void visit(Buffer buffer, HyperSearchResult result);
- } //}}}
-
- //{{{ BufferLoadedVisitor class
- static class BufferLoadedVisitor implements ResultVisitor
- {
- public void visit(Buffer buffer, HyperSearchResult result)
- {
- result.bufferOpened(buffer);
- }
- } //}}}
-
- //{{{ BufferClosedVisitor class
- static class BufferClosedVisitor implements ResultVisitor
- {
- public void visit(Buffer buffer, HyperSearchResult result)
- {
- result.bufferClosed();
- }
- } //}}}
-
- //{{{ TreeNodeCallbackAdapter class
- static class TreeNodeCallbackAdapter implements HyperSearchTreeNodeCallback
- {
- public boolean processNode(DefaultMutableTreeNode node)
- {
- return false;
- }
-
- } //}}}
-}
+/*
+ * HyperSearchResults.java - HyperSearch results
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 1999, 2000, 2001 Slava Pestov
+ * Portions copyright (C) 2002 Peter Cox
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import javax.swing.*;
+import javax.swing.tree.*;
+
+import java.awt.*;
+import java.awt.datatransfer.*;
+import java.awt.event.*;
+import java.util.*;
+import java.util.List;
+
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.gui.DefaultFocusComponent;
+import org.gjt.sp.jedit.gui.RolloverButton;
+import org.gjt.sp.jedit.gui.StyleEditor;
+import org.gjt.sp.jedit.msg.*;
+import org.gjt.sp.jedit.search.SearchMatcher.Match;
+import org.gjt.sp.jedit.syntax.SyntaxStyle;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.HtmlUtilities;
+import org.gjt.sp.util.SyntaxUtilities;
+//}}}
+
+/**
+ * HyperSearch results window.
+ * @author Slava Pestov
+ * @version $Id: HyperSearchResults.java 17678 2010-04-21 14:49:33Z kpouer $
+ */
+public class HyperSearchResults extends JPanel implements DefaultFocusComponent
+{
+ public static final String NAME = "hypersearch-results";
+ public static final String HIGHLIGHT_PROP = "hypersearch.results.highlight";
+
+ //{{{ HyperSearchResults constructor
+ public HyperSearchResults(View view)
+ {
+ super(new BorderLayout());
+
+ this.view = view;
+
+ caption = new JLabel();
+
+ Box toolBar = new Box(BoxLayout.X_AXIS);
+ toolBar.add(caption);
+ toolBar.add(Box.createGlue());
+
+ ActionHandler ah = new ActionHandler();
+
+ highlight = new RolloverButton();
+ highlight.setToolTipText(jEdit.getProperty(
+ "hypersearch-results.highlight.label"));
+ highlight.addActionListener(ah);
+ toolBar.add(highlight);
+
+ clear = new RolloverButton(GUIUtilities.loadIcon(
+ jEdit.getProperty("hypersearch-results.clear.icon")));
+ clear.setToolTipText(jEdit.getProperty(
+ "hypersearch-results.clear.label"));
+ clear.addActionListener(ah);
+ toolBar.add(clear);
+
+ multi = new RolloverButton();
+ multi.setToolTipText(jEdit.getProperty(
+ "hypersearch-results.multi.label"));
+ multi.addActionListener(ah);
+ toolBar.add(multi);
+
+ stop = new RolloverButton(GUIUtilities.loadIcon(
+ jEdit.getProperty("hypersearch-results.stop.icon")));
+ stop.setToolTipText(jEdit.getProperty(
+ "hypersearch-results.stop.label"));
+ stop.addActionListener(ah);
+ toolBar.add(stop);
+ stop.setEnabled(false);
+
+ add(BorderLayout.NORTH, toolBar);
+
+ resultTreeRoot = new DefaultMutableTreeNode();
+ resultTreeModel = new DefaultTreeModel(resultTreeRoot);
+ resultTree = new HighlightingTree(resultTreeModel);
+ resultTree.setToolTipText(null);
+ resultTree.setCellRenderer(new ResultCellRenderer());
+ resultTree.setVisibleRowCount(16);
+ resultTree.setRootVisible(false);
+ resultTree.setShowsRootHandles(true);
+ //the ESCAPE keystroke is assigned to hideTip action by swing
+ //it breaks the action usually assigned to close-docking-area by jEdit,
+ //so we remove this keystroke binding bug #1955140
+ KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
+ resultTree.getInputMap().remove(keyStroke);
+ // looks bad with the OS X L&F, apparently...
+ if(!OperatingSystem.isMacOSLF())
+ resultTree.putClientProperty("JTree.lineStyle", "Angled");
+
+ resultTree.setEditable(false);
+
+ resultTree.addKeyListener(new KeyHandler());
+ resultTree.addMouseListener(new MouseHandler());
+
+ JScrollPane scrollPane = new JScrollPane(resultTree);
+ Dimension dim = scrollPane.getPreferredSize();
+ dim.width = 400;
+ scrollPane.setPreferredSize(dim);
+ add(BorderLayout.CENTER, scrollPane);
+ resultTree.setTransferHandler(new ResultTreeTransferHandler());
+ } //}}}
+
+ //{{{ focusOnDefaultComponent() method
+ public void focusOnDefaultComponent()
+ {
+ resultTree.requestFocus();
+ } //}}}
+
+ //{{{ addNotify() method
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ EditBus.addToBus(this);
+ multiStatus = jEdit.getBooleanProperty(
+ "hypersearch-results.multi");
+ updateHighlightStatus();
+ updateMultiStatus();
+ } //}}}
+
+ //{{{ removeNotify() method
+ @Override
+ public void removeNotify()
+ {
+ super.removeNotify();
+ EditBus.removeFromBus(this);
+ jEdit.setBooleanProperty("hypersearch-results.multi",multiStatus);
+ } //}}}
+
+ //{{{ visitBuffers() method
+ private void visitBuffers(final ResultVisitor visitor, final Buffer buffer)
+ {
+ // impl note: since multi-level hierarchies now allowed,
+ // use traverseNodes to process HyperSearchResult nodes
+ traverseNodes(resultTreeRoot, new TreeNodeCallbackAdapter()
+ {
+ @Override
+ public boolean processNode(DefaultMutableTreeNode node)
+ {
+ Object userObject = node.getUserObject();
+ if (!(userObject instanceof HyperSearchResult))
+ return true;
+ HyperSearchResult result = (HyperSearchResult) userObject;
+ if (result.pathEquals(buffer.getSymlinkPath()))
+ visitor.visit(buffer, result);
+ return true;
+ }
+ });
+ } //}}}
+
+ //{{{ handleBufferUpdate() method
+ @EBHandler
+ public void handleBufferUpdate(BufferUpdate bmsg)
+ {
+ Buffer buffer = bmsg.getBuffer();
+ Object what = bmsg.getWhat();
+ if(what == BufferUpdate.LOADED)
+ visitBuffers(new BufferLoadedVisitor(),buffer);
+ else if(what == BufferUpdate.CLOSED)
+ visitBuffers(new BufferClosedVisitor(),buffer);
+ } //}}}
+
+ //{{{ traverseNodes() method
+ public static boolean traverseNodes(DefaultMutableTreeNode node,
+ HyperSearchTreeNodeCallback callbackInterface)
+ {
+ if (!callbackInterface.processNode(node))
+ return false;
+ for (Enumeration e = node.children(); e.hasMoreElements();)
+ {
+ DefaultMutableTreeNode childNode = (DefaultMutableTreeNode)e.nextElement();
+ if (!traverseNodes(childNode, callbackInterface))
+ return false;
+ }
+ return true;
+ } //}}}
+
+ //{{{ getTreeModel() method
+ public DefaultTreeModel getTreeModel()
+ {
+ return resultTreeModel;
+ } //}}}
+
+ //{{{ getTree() method
+ /**
+ * Returns the result tree.
+ *
+ * @return the result tree
+ * @since jEdit 4.1pre9
+ */
+ public JTree getTree()
+ {
+ return resultTree;
+ } //}}}
+
+ //{{{ searchStarted() method
+ public void searchStarted()
+ {
+ stop.setEnabled(true);
+ caption.setText(jEdit.getProperty("hypersearch-results.searching",
+ new String[] { trimSearchString() }));
+ } //}}}
+
+ //{{{ setSearchStatus() method
+ public void setSearchStatus(String status)
+ {
+ caption.setText(status);
+ } //}}}
+
+ //{{{ searchFailed() method
+ public void searchFailed()
+ {
+ caption.setText(jEdit.getProperty("hypersearch-results.no-results",
+ new String[] { trimSearchString() }));
+
+ // collapse all nodes, as suggested on user mailing list...
+ for(int i = 0; i < resultTreeRoot.getChildCount(); i++)
+ {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)
+ resultTreeRoot.getChildAt(i);
+ resultTree.collapsePath(new TreePath(new Object[] {
+ resultTreeRoot, node }));
+ }
+ } //}}}
+
+ //{{{ searchDone() method
+ /**
+ * @param searchNode the result node
+ * @param selectNode the node that must be selected, or null
+ * @since jEdit 4.3pre12
+ */
+ public void searchDone(final DefaultMutableTreeNode searchNode, final DefaultMutableTreeNode selectNode)
+ {
+ stop.setEnabled(false);
+ final int nodeCount = searchNode.getChildCount();
+ if (nodeCount < 1)
+ {
+ searchFailed();
+ return;
+ }
+
+ caption.setText(jEdit.getProperty("hypersearch-results.done",
+ new String [] { trimSearchString() }));
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ if(!multiStatus)
+ {
+ for(int i = 0; i < resultTreeRoot.getChildCount(); i++)
+ {
+ resultTreeRoot.remove(0);
+ }
+ }
+
+ resultTreeRoot.add(searchNode);
+ resultTreeModel.reload(resultTreeRoot);
+
+
+ for (int i = 0; i < nodeCount; i++)
+ {
+ TreePath lastNode = new TreePath(
+ ((DefaultMutableTreeNode)
+ searchNode.getChildAt(i))
+ .getPath());
+
+ resultTree.expandPath(lastNode);
+ }
+ TreePath treePath;
+ if (selectNode == null)
+ {
+ treePath = new TreePath(new Object[]{
+ resultTreeRoot, searchNode});
+ }
+ else
+ {
+ treePath = new TreePath(selectNode.getPath());
+ }
+ resultTree.setSelectionPath(treePath);
+ resultTree.scrollPathToVisible(
+ treePath);
+ }
+ });
+ } //}}}
+
+ //{{{ searchDone() method
+ public void searchDone(DefaultMutableTreeNode searchNode)
+ {
+ searchDone(searchNode, null);
+ } //}}}
+
+ //{{{ Private members
+ private final View view;
+
+ private final JLabel caption;
+ private final JTree resultTree;
+ private final DefaultMutableTreeNode resultTreeRoot;
+ private final DefaultTreeModel resultTreeModel;
+
+ private final RolloverButton highlight;
+ private final RolloverButton clear;
+ private final RolloverButton multi;
+ private final RolloverButton stop;
+ private boolean multiStatus;
+
+ //{{{ updateHighlightStatus() method
+ private void updateHighlightStatus()
+ {
+ String prop = jEdit.getProperty(HIGHLIGHT_PROP);
+ if (prop != null && prop.length() > 0)
+ highlight.setIcon(GUIUtilities.loadIcon(jEdit.getProperty("hypersearch-results.match.highlight.icon")));
+ else
+ highlight.setIcon(GUIUtilities.loadIcon(jEdit.getProperty("hypersearch-results.match.normal.icon")));
+ resultTree.repaint();
+ } //}}}
+
+ //{{{ updateMultiStatus() method
+ private void updateMultiStatus()
+ {
+ if(multiStatus)
+ multi.setIcon(GUIUtilities.loadIcon(jEdit.getProperty("hypersearch-results.multi.multiple.icon")));
+ else
+ multi.setIcon(GUIUtilities.loadIcon(jEdit.getProperty("hypersearch-results.multi.single.icon")));
+ } //}}}
+
+ //{{{ goToSelectedNode() method
+ public static final int M_OPEN = 0;
+ public static final int M_OPEN_NEW_VIEW = 1;
+ public static final int M_OPEN_NEW_PLAIN_VIEW = 2;
+ public static final int M_OPEN_NEW_SPLIT = 3;
+
+ private void goToSelectedNode(int mode)
+ {
+ TreePath path = resultTree.getSelectionPath();
+ if(path == null)
+ return;
+
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)path
+ .getLastPathComponent();
+ Object value = node.getUserObject();
+
+ // do nothing if clicked "foo (showing n occurrences in m files)"
+ if(node.getParent() != resultTreeRoot && value instanceof HyperSearchNode)
+ {
+ HyperSearchNode n = (HyperSearchNode)value;
+ Buffer buffer = n.getBuffer(view);
+ if(buffer == null)
+ return;
+
+ EditPane pane;
+
+ switch(mode)
+ {
+ case M_OPEN:
+ pane = view.goToBuffer(buffer);
+ break;
+ case M_OPEN_NEW_VIEW:
+ pane = jEdit.newView(view,buffer,false).getEditPane();
+ break;
+ case M_OPEN_NEW_PLAIN_VIEW:
+ pane = jEdit.newView(view,buffer,true).getEditPane();
+ break;
+ case M_OPEN_NEW_SPLIT:
+ pane = view.splitHorizontally();
+ break;
+ default:
+ throw new IllegalArgumentException("Bad mode: " + mode);
+ }
+
+ n.goTo(pane);
+ }
+ } //}}}
+
+ //{{{ removeSelectedNode() method
+ private void removeSelectedNode()
+ {
+ TreePath path = resultTree.getSelectionPath();
+ if(path == null)
+ return;
+
+ MutableTreeNode value = (MutableTreeNode)path
+ .getLastPathComponent();
+
+ if(path.getPathCount() > 1)
+ {
+ // Adjust selection so that repeating some removals
+ // behave naturally.
+ TreePath parentPath = path.getParentPath();
+ MutableTreeNode parent = (MutableTreeNode)parentPath
+ .getLastPathComponent();
+ int removingIndex = parent.getIndex(value);
+ int nextIndex = removingIndex + 1;
+ if(nextIndex < parent.getChildCount())
+ {
+ TreeNode next = parent.getChildAt(nextIndex);
+ resultTree.setSelectionPath(
+ parentPath.pathByAddingChild(next));
+ }
+ else
+ {
+ resultTree.setSelectionPath(parentPath);
+ }
+
+ resultTreeModel.removeNodeFromParent(value);
+ }
+
+ HyperSearchOperationNode.removeNodeFromCache(value);
+ if (resultTreeRoot.getChildCount() == 0)
+ {
+ hideDockable();
+ }
+ } //}}}
+
+ //{{{ removeAllNodes() method
+ private void removeAllNodes()
+ {
+ resultTreeRoot.removeAllChildren();
+ resultTreeModel.reload(resultTreeRoot);
+ setSearchStatus(null);
+ hideDockable();
+ } //}}}
+
+ //{{{ hideDockable() method
+ private void hideDockable()
+ {
+ view.getDockableWindowManager().hideDockableWindow(NAME);
+ } //}}}
+
+ //{{{ trimSearchString() method
+ private String trimSearchString()
+ {
+ String s = SearchAndReplace.getSearchString();
+ int length = jEdit.getIntegerProperty("hypersearch.displayQueryLength", 100);
+ if (s.length() > length)
+ {
+ return s.substring(0,length) + "...";
+ }
+ return s;
+ } //}}}
+
+ //{{{ parseHighlightStyle()
+ SyntaxStyle parseHighlightStyle(String style)
+ {
+ Font f = (resultTree != null) ? resultTree.getFont() :
+ UIManager.getFont("Tree.font");
+ SyntaxStyle s;
+ try
+ {
+ s = SyntaxUtilities.parseStyle(style, f.getFamily(), f.getSize(), true, null);
+ }
+ catch (Exception e)
+ {
+ style = "color:#000000";
+ s = SyntaxUtilities.parseStyle(style, f.getFamily(), f.getSize(), true);
+ }
+ return s;
+ } //}}}
+
+ //}}}
+
+ //{{{ ActionHandler class
+ public class ActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == highlight)
+ {
+ String prop = jEdit.getProperty(HIGHLIGHT_PROP);
+ Font f = (resultTree != null) ? resultTree.getFont() :
+ UIManager.getFont("Tree.font");
+ SyntaxStyle style = new StyleEditor(jEdit.getActiveView(),
+ HtmlUtilities.parseHighlightStyle(prop, f),
+ "hypersearch").getStyle();
+ if (style != null)
+ jEdit.setProperty(HIGHLIGHT_PROP, GUIUtilities.getStyleString(style));
+ updateHighlightStatus();
+ }
+ else if(source == clear)
+ {
+ removeAllNodes();
+ }
+ else if(source == multi)
+ {
+ multiStatus = !multiStatus;
+ updateMultiStatus();
+
+ if(!multiStatus)
+ {
+ for(int i = resultTreeRoot.getChildCount() - 2; i >= 0; i--)
+ {
+ resultTreeModel.removeNodeFromParent(
+ (MutableTreeNode)resultTreeRoot
+ .getChildAt(i));
+ }
+ }
+ }
+ else if(source == stop)
+ {
+ jEdit.setTemporaryProperty("hyperSearch-stopButton", "true");
+ }
+ }
+ } //}}}
+
+ //{{{ HighlightingTree class
+ class HighlightingTree extends JTree
+ {
+ private String prop;
+ private String styleTag;
+
+ public HighlightingTree(DefaultTreeModel model)
+ {
+ super(model);
+ prop = jEdit.getProperty(HIGHLIGHT_PROP);
+ if (prop != null && prop.length() > 0)
+ {
+ Font f = (resultTree != null) ? resultTree.getFont() :
+ UIManager.getFont("Tree.font");
+ styleTag = HtmlUtilities.style2html(prop, f);
+ }
+ }
+
+ @Override
+ public String convertValueToText(Object value, boolean selected,
+ boolean expanded, boolean leaf, int row, boolean hasFocus)
+ {
+ String s = super.convertValueToText(value, selected, expanded, leaf,
+ row, hasFocus);
+ String newProp = jEdit.getProperty(HIGHLIGHT_PROP);
+ if (newProp == null || newProp.length() == 0)
+ return s;
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
+ while ((node != null) &&
+ (! (node.getUserObject() instanceof HyperSearchOperationNode)))
+ {
+ node = (DefaultMutableTreeNode) node.getParent();
+ }
+ if (node == null)
+ return s;
+ if (! newProp.equals(prop))
+ {
+ prop = newProp;
+ Font f = (resultTree != null) ? resultTree.getFont() :
+ UIManager.getFont("Tree.font");
+ styleTag = HtmlUtilities.style2html(prop, f);
+ }
+ SearchMatcher matcher =
+ ((HyperSearchOperationNode) node.getUserObject()).getSearchMatcher();
+ int i = s.indexOf(": ");
+ if (i > 0)
+ i += 2;
+ else
+ i = 0;
+ Match m;
+ List<Integer> matches = new ArrayList<Integer>();
+ while ((m = matcher.nextMatch(s.substring(i), true, true, true, false)) != null)
+ {
+ matches.add(i + m.start);
+ matches.add(i + m.end);
+ i += m.end;
+ }
+ return HtmlUtilities.highlightString(s, styleTag, matches);
+ }
+ } //}}}
+
+ //{{{ KeyHandler class
+ class KeyHandler extends KeyAdapter
+ {
+ @Override
+ public void keyPressed(KeyEvent evt)
+ {
+ switch(evt.getKeyCode())
+ {
+ case KeyEvent.VK_SPACE:
+ goToSelectedNode(M_OPEN);
+
+ // fuck me dead
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ resultTree.requestFocus();
+ }
+ });
+
+ evt.consume();
+ break;
+ case KeyEvent.VK_ENTER:
+ goToSelectedNode(M_OPEN);
+ evt.consume();
+ break;
+ case KeyEvent.VK_DELETE:
+ removeSelectedNode();
+ evt.consume();
+ break;
+ default:
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseAdapter
+ {
+ //{{{ mousePressed() method
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ if(evt.isConsumed())
+ return;
+
+ TreePath path1 = resultTree.getPathForLocation(
+ evt.getX(),evt.getY());
+ if(path1 == null)
+ return;
+
+ resultTree.setSelectionPath(path1);
+ if (GUIUtilities.isPopupTrigger(evt))
+ showPopupMenu(evt);
+ else
+ {
+ goToSelectedNode(M_OPEN);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private JPopupMenu popupMenu;
+
+ //{{{ showPopupMenu method
+ private void showPopupMenu(MouseEvent evt)
+ {
+ TreePath path = resultTree.getSelectionPath();
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
+
+ popupMenu = new JPopupMenu();
+ Object userObj = node.getUserObject();
+ if (userObj instanceof HyperSearchFileNode
+ || userObj instanceof HyperSearchResult)
+ {
+ popupMenu.add(new GoToNodeAction(
+ "hypersearch-results.open",
+ M_OPEN));
+ popupMenu.add(new GoToNodeAction(
+ "hypersearch-results.open-view",
+ M_OPEN_NEW_VIEW));
+ popupMenu.add(new GoToNodeAction(
+ "hypersearch-results.open-plain-view",
+ M_OPEN_NEW_PLAIN_VIEW));
+ popupMenu.add(new GoToNodeAction(
+ "hypersearch-results.open-split",
+ M_OPEN_NEW_SPLIT));
+ }
+ if (!(userObj instanceof HyperSearchFolderNode))
+ popupMenu.add(new RemoveTreeNodeAction());
+ popupMenu.add(new ExpandChildTreeNodesAction());
+ if (userObj instanceof HyperSearchFolderNode
+ || userObj instanceof HyperSearchOperationNode)
+ {
+ popupMenu.add(new CollapseChildTreeNodesAction());
+ if (userObj instanceof HyperSearchFolderNode)
+ popupMenu.add(new NewSearchAction());
+ }
+ if (userObj instanceof HyperSearchOperationNode)
+ {
+ popupMenu.add(new JPopupMenu.Separator());
+ HyperSearchOperationNode resultNode = (HyperSearchOperationNode)userObj;
+ JCheckBoxMenuItem chkItem =
+ new JCheckBoxMenuItem(jEdit.getProperty("hypersearch-results.tree-view"),
+ resultNode.isTreeViewDisplayed());
+ chkItem.addActionListener(new TreeDisplayAction());
+ popupMenu.add(chkItem);
+
+ popupMenu.add(new RedoSearchAction((HyperSearchOperationNode)userObj));
+ }
+ popupMenu.add(new CopyToClipboardAction());
+
+ GUIUtilities.showPopupMenu(popupMenu,evt.getComponent(),
+ evt.getX(),evt.getY());
+ evt.consume();
+ } //}}}
+
+ //}}}
+ } //}}}
+
+ //{{{ RemoveTreeNodeAction class
+ class RemoveTreeNodeAction extends AbstractAction
+ {
+ RemoveTreeNodeAction()
+ {
+ super(jEdit.getProperty("hypersearch-results.remove-node"));
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ removeSelectedNode();
+ }
+ }//}}}
+
+ //{{{ RemoveAllTreeNodesAction class
+ class RemoveAllTreeNodesAction extends AbstractAction
+ {
+ RemoveAllTreeNodesAction()
+ {
+ super(jEdit.getProperty("hypersearch-results.remove-all-nodes"));
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ removeAllNodes();
+ }
+ }//}}}
+
+ //{{{ NewSearchAction class
+ class NewSearchAction extends AbstractAction
+ {
+ NewSearchAction()
+ {
+ super(jEdit.getProperty("hypersearch-results.new-search"));
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ TreePath path = resultTree.getSelectionPath();
+ DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)path.getLastPathComponent();
+ HyperSearchFolderNode nodeObj = (HyperSearchFolderNode)operNode.getUserObject();
+
+ String glob = "*";
+ SearchFileSet dirList = SearchAndReplace.getSearchFileSet();
+ if (dirList instanceof DirectoryListSet)
+ glob = ((DirectoryListSet)dirList).getFileFilter();
+ SearchAndReplace.setSearchFileSet(new DirectoryListSet(
+ nodeObj.getNodeFile().getAbsolutePath(),glob,true));
+ SearchDialog.showSearchDialog(view,null,SearchDialog.DIRECTORY);
+ }
+ }//}}}
+
+ //{{{ ExpandChildTreeNodesAction class
+ class ExpandChildTreeNodesAction extends AbstractAction
+ {
+ ExpandChildTreeNodesAction()
+ {
+ super(jEdit.getProperty("hypersearch-results.expand-child-nodes"));
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ TreePath path = resultTree.getSelectionPath();
+ DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)path.getLastPathComponent();
+ expandAllNodes(operNode);
+ }
+ }//}}}
+
+ //{{{ CopyToClipboardAction class
+ class CopyToClipboardAction extends AbstractAction
+ {
+ CopyToClipboardAction()
+ {
+ super(jEdit.getProperty("hypersearch-results.copy-to-clipboard"));
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ TreePath path = resultTree.getSelectionPath();
+ DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)
+ path.getLastPathComponent();
+ ToStringNodes toStringNodes = new ToStringNodes();
+ traverseNodes(operNode, toStringNodes);
+ StringSelection selection = new StringSelection(
+ toStringNodes.nodesString.toString());
+ Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+ clipboard.setContents(selection, null);
+ }
+ }//}}}
+
+ //{{{ ToStringNodes class
+ static class ToStringNodes implements HyperSearchTreeNodeCallback
+ {
+ StringBuilder nodesString = new StringBuilder();
+
+ public boolean processNode(DefaultMutableTreeNode node)
+ {
+ Object userObject = node.getUserObject();
+ if (userObject instanceof HyperSearchFileNode)
+ nodesString.append(((HyperSearchFileNode)userObject).path);
+ else if (userObject instanceof HyperSearchResult)
+ {
+ HyperSearchResult hsr = (HyperSearchResult)userObject;
+ // Copy the ORIGINAL line from the buffer!
+ nodesString.append(hsr.buffer == null ? hsr.toString() : hsr.buffer.getLineText(hsr.line));
+ }
+ else
+ nodesString.append(userObject.toString());
+ nodesString.append(System.getProperty("line.separator"));
+ return true;
+ }
+ }//}}}
+
+ //{{{ CollapseChildTreeNodesAction class
+ class CollapseChildTreeNodesAction extends AbstractAction
+ {
+ CollapseChildTreeNodesAction()
+ {
+ super(jEdit.getProperty("hypersearch-results.collapse-child-nodes"));
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ TreePath path = resultTree.getSelectionPath();
+ DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)path.getLastPathComponent();
+ for (Enumeration e = operNode.children(); e.hasMoreElements();)
+ {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)e.nextElement();
+ resultTree.collapsePath(new TreePath(node.getPath()));
+ }
+ resultTree.scrollPathToVisible(
+ new TreePath(operNode.getPath()));
+ }
+ }//}}}
+
+ //{{{ RedoSearchAction class
+ class RedoSearchAction extends AbstractAction
+ {
+ private HyperSearchOperationNode hyperSearchOperationNode;
+ public RedoSearchAction(HyperSearchOperationNode hyperSearchOperationNode)
+ {
+ super(jEdit.getProperty("hypersearch-results.redo"));
+ this.hyperSearchOperationNode = hyperSearchOperationNode;
+ }
+
+ /**
+ * Invoked when an action occurs.
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ SearchAndReplace.setSearchString(hyperSearchOperationNode.getSearchString());
+ SearchAndReplace.setSearchMatcher(hyperSearchOperationNode.getSearchMatcher());
+ removeSelectedNode();
+ SearchAndReplace.hyperSearch(view, false);
+ }
+ } //}}}
+
+ //{{{ TreeDisplayAction class
+ class TreeDisplayAction extends AbstractAction
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ JCheckBoxMenuItem menuItem = (JCheckBoxMenuItem) evt.getSource();
+ boolean curState = menuItem.isSelected();
+
+ TreePath path = resultTree.getSelectionPath();
+ DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)path.getLastPathComponent();
+
+ HyperSearchOperationNode operNodeObj = (HyperSearchOperationNode)operNode.getUserObject();
+ if (curState)
+ operNodeObj.cacheResultNodes(operNode);
+ operNode.removeAllChildren();
+ if (curState)
+ {
+ Exception excp = null;
+ try
+ {
+ operNodeObj.insertTreeNodes(resultTree, operNode);
+ }
+ catch (Exception ex)
+ {
+ operNodeObj.restoreFlatNodes(resultTree, operNode);
+ menuItem.setSelected(false);
+ excp = ex;
+ }
+ finally
+ {
+ ((DefaultTreeModel)resultTree.getModel()).nodeStructureChanged(operNode);
+ expandAllNodes(operNode);
+ resultTree.scrollPathToVisible(
+ new TreePath(operNode.getPath()));
+ }
+ if (excp != null)
+ throw new RuntimeException(excp);
+ }
+ else
+ operNodeObj.restoreFlatNodes(resultTree, operNode);
+
+ operNodeObj.setTreeViewDisplayed(menuItem.isSelected());
+ }
+ }//}}}
+
+ //{{{ expandAllNodes() method
+ public void expandAllNodes(DefaultMutableTreeNode node)
+ {
+
+ traverseNodes(node, new TreeNodeCallbackAdapter()
+ {
+ @Override
+ public boolean processNode(DefaultMutableTreeNode node)
+ {
+ resultTree.expandPath(new TreePath(node.getPath()));
+ return true;
+ }
+ });
+ } //}}}
+
+ //{{{ GoToNodeAction class
+ class GoToNodeAction extends AbstractAction
+ {
+ private final int mode;
+
+ GoToNodeAction(String labelProp, int mode)
+ {
+ super(jEdit.getProperty(labelProp));
+ this.mode = mode;
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ goToSelectedNode(mode);
+ }
+ }//}}}
+
+ //{{{ ResultCellRenderer class
+ static class ResultCellRenderer extends DefaultTreeCellRenderer
+ {
+ Font plainFont, boldFont;
+
+ //{{{ ResultCellRenderer constructor
+ ResultCellRenderer()
+ {
+ plainFont = UIManager.getFont("Tree.font");
+ if(plainFont == null)
+ plainFont = jEdit.getFontProperty("metal.secondary.font");
+ boldFont = new Font(plainFont.getName(),Font.BOLD,
+ plainFont.getSize());
+ } //}}}
+
+ //{{{ getTreeCellRendererComponent() method
+ @Override
+ public Component getTreeCellRendererComponent(JTree tree,
+ Object value, boolean sel, boolean expanded,
+ boolean leaf, int row, boolean hasFocus)
+ {
+ super.getTreeCellRendererComponent(tree,value,sel,
+ expanded,leaf,row,hasFocus);
+ setIcon(null);
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
+
+ if (node.getUserObject() instanceof HyperSearchOperationNode)
+ {
+ setFont(boldFont);
+
+ CountNodes countNodes = new CountNodes();
+ traverseNodes(node, countNodes);
+
+ setText(jEdit.getProperty("hypersearch-results.result-caption",
+ new Object[] {
+ node.toString(),
+ Integer.valueOf(countNodes.resultCount),
+ Integer.valueOf(countNodes.bufferCount)
+ }));
+ }
+ else if(node.getUserObject() instanceof HyperSearchFolderNode)
+ {
+ setFont(plainFont);
+ setText(node.toString() + " (" + node.getChildCount() + " files/folders)");
+ }
+ else if(node.getUserObject() instanceof HyperSearchFileNode)
+ {
+ // file name
+ setFont(boldFont);
+ HyperSearchFileNode hyperSearchFileNode = (HyperSearchFileNode) node.getUserObject();
+ setText(jEdit.getProperty("hypersearch-results.file-caption",
+ new Object[] {
+ hyperSearchFileNode,
+ Integer.valueOf(hyperSearchFileNode.getCount()),
+ Integer.valueOf(node.getChildCount())
+ }));
+ }
+ else
+ {
+ setFont(plainFont);
+ }
+
+ return this;
+ } //}}}
+
+ //{{{ CountNodes class
+ static class CountNodes implements HyperSearchTreeNodeCallback
+ {
+ int bufferCount;
+ int resultCount;
+ public boolean processNode(DefaultMutableTreeNode node)
+ {
+ Object userObject = node.getUserObject();
+ if (userObject instanceof HyperSearchFileNode)
+ {
+ resultCount += ((HyperSearchFileNode)userObject).getCount();
+ bufferCount++;
+ }
+ return true;
+ }
+ }//}}}
+ } //}}}
+
+ //{{{
+ class ResultTreeTransferHandler extends TransferHandler
+ {
+ @Override
+ public void exportToClipboard(JComponent comp, Clipboard clip,
+ int action) throws IllegalStateException
+ {
+ TreePath [] paths = resultTree.getSelectionPaths();
+ ToStringNodes toStringNodes = new ToStringNodes();
+ for (TreePath path: paths)
+ {
+ DefaultMutableTreeNode operNode = (DefaultMutableTreeNode)
+ path.getLastPathComponent();
+ toStringNodes.processNode(operNode);
+ }
+ StringSelection selection = new StringSelection(
+ toStringNodes.nodesString.toString());
+ Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+ clipboard.setContents(selection, null);
+ }
+ } //}}}
+
+ // these are used to eliminate code duplication. i don't normally use
+ // the visitor or "template method" pattern, but this code was contributed
+ // by Peter Cox and i don't feel like changing it around too much.
+
+ //{{{ ResultVisitor interface
+ interface ResultVisitor
+ {
+ void visit(Buffer buffer, HyperSearchResult result);
+ } //}}}
+
+ //{{{ BufferLoadedVisitor class
+ static class BufferLoadedVisitor implements ResultVisitor
+ {
+ public void visit(Buffer buffer, HyperSearchResult result)
+ {
+ result.bufferOpened(buffer);
+ }
+ } //}}}
+
+ //{{{ BufferClosedVisitor class
+ static class BufferClosedVisitor implements ResultVisitor
+ {
+ public void visit(Buffer buffer, HyperSearchResult result)
+ {
+ result.bufferClosed();
+ }
+ } //}}}
+
+ //{{{ TreeNodeCallbackAdapter class
+ static class TreeNodeCallbackAdapter implements HyperSearchTreeNodeCallback
+ {
+ public boolean processNode(DefaultMutableTreeNode node)
+ {
+ return false;
+ }
+
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/HyperSearchTreeNodeCallback.java b/jEdit/org/gjt/sp/jedit/search/HyperSearchTreeNodeCallback.java
index 2681996..7a0b3ae 100644
--- a/jEdit/org/gjt/sp/jedit/search/HyperSearchTreeNodeCallback.java
+++ b/jEdit/org/gjt/sp/jedit/search/HyperSearchTreeNodeCallback.java
@@ -1,34 +1,34 @@
-/*
- * HyperSearchTreeNodeCallback - Callback interface for recursive tree traversal
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.search;
-
-import javax.swing.tree.DefaultMutableTreeNode;
-
-/**
- * @author root
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public interface HyperSearchTreeNodeCallback {
- public boolean processNode(DefaultMutableTreeNode node);
-}
+/*
+ * HyperSearchTreeNodeCallback - Callback interface for recursive tree traversal
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.search;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+
+/**
+ * @author root
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public interface HyperSearchTreeNodeCallback {
+ public boolean processNode(DefaultMutableTreeNode node);
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/PatternSearchMatcher.java b/jEdit/org/gjt/sp/jedit/search/PatternSearchMatcher.java
index 794dcf1..1ca7f13 100644
--- a/jEdit/org/gjt/sp/jedit/search/PatternSearchMatcher.java
+++ b/jEdit/org/gjt/sp/jedit/search/PatternSearchMatcher.java
@@ -1,243 +1,229 @@
-/*
- * PatternSearchMatcher.java - Regular expression matcher
- * :noTabs=false:
- *
- * Copyright (C) 2006 Marcelo Vanzin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.gjt.sp.util.ReverseCharSequence;
-
-/**
- * A regular expression string matcher using java.util.regex.
- * @see java.util.regex.Pattern
- *
- * @author Marcelo Vanzin
- * @version $Id: PatternSearchMatcher.java 16930 2010-01-14 20:34:28Z ezust $
- * @since jEdit 4.3pre5
- */
-public class PatternSearchMatcher extends SearchMatcher
-{
- //{{{ PatternSearchMatcher constructors
- /**
- * Creates a new regular expression string matcher.
- * @see java.util.regex.Pattern
- * @param search the search pattern
- * @param ignoreCase <code>true</code> if you want to ignore case
- * @since jEdit 4.3pre5
- */
- public PatternSearchMatcher(String search, boolean ignoreCase)
- {
- pattern = search;
- flags = getFlag(ignoreCase);
- }
-
- /**
- * Creates a new regular expression already compiled.
- * @see java.util.regex.Pattern
- * @param re the compiled regex
- * @param ignoreCase <code>true</code> if you want to ignore case
- * @since jEdit 4.3pre13
- */
- public PatternSearchMatcher(Pattern re, boolean ignoreCase)
- {
- this(re.pattern(), ignoreCase);
- this.re = re;
- } //}}}
-
- //{{{ nextMatch() method
- /**
- * Returns the offset of the first match of the specified text
- * within this matcher.
- *
- * @param text The text to search in
- * @param start True if the start of the segment is the beginning
- * of the buffer
- * @param end True if the end of the segment is the end of the
- * buffer
- * @param firstTime If false and the search string matched at the
- * start offset with length zero, automatically
- * find next match
- * @param reverse If true find match prior to current match
- * (this is done by searching from the beginning to
- * just prior to the current match, so will be inefficient
- * for large buffers)
- *
- * @return A {@link SearchMatcher.Match} object.
- * @since jEdit 4.3pre5
- */
- @Override
- public SearchMatcher.Match nextMatch(CharSequence text, boolean start,
- boolean end, boolean firstTime, boolean reverse)
- {
- // "For the mean time, there is no way to automatically generate a sexeger"
- //
- // http://japhy.perlmonk.org/sexeger/sexeger.html
- //
- // So ... for reverse regex searches we will search
- // the string in the forward direction and
- // return the last match.
-
- // Since we search the String in the forward direction,
- // (even for reverse searches) un-reverse the ReverseCharSequence.
- if (text instanceof ReverseCharSequence)
- text = ((ReverseCharSequence)text).baseSequence();
-
- if (re == null)
- re = Pattern.compile(pattern, flags);
-
- // if the pattern begins with "^", avoid spurious match at the
- // start of input sequence which is not a start of line.
- int matchStart = 0;
- if (!start && re.pattern().charAt(0) == '^')
- {
- Matcher sol = Pattern.compile("^", flags).matcher(text);
- // Ignore the first match since it is not a start of line.
- sol.find();
- // If the second match is not found, the real pattern also
- // can't match.
- if (!sol.find())
- return null;
- // Skip the text to the second match, which can be the first
- // match for the real pattern.
- matchStart = sol.start();
- }
-
- Matcher match = re.matcher(text);
- if (!match.find(matchStart))
- return null;
-
- // Special care for zero width matches. Without this care,
- // the caller will fall into an infinite loop, for non-reverse
- // search.
- if (!reverse && !firstTime && match.start() == 0 && match.end() == 0)
- {
- if (!match.find())
- return null;
- }
-
- Match previous = null;
- while (true)
- {
- // if we're not at the end of the buffer and we
- // match the end of the text, and the pattern ends with a "$",
- // ignore the match.
- // The match at the end the buffer which immediately follows
- // the final newline is also ignored because it is generally
- // not expected as an EOL.
- if ((!end || (text.charAt(text.length() - 1) == '\n'))
- && match.end() == text.length()
- && pattern.charAt(pattern.length() - 1) == '$')
- {
- if (previous != null)
- {
- returnValue.start = previous.start;
- returnValue.end = previous.end;
- returnValue.substitutions = previous.substitutions;
- break;
- }
- else
- {
- return null;
- }
- }
-
- returnValue.substitutions = new String[match.groupCount() + 1];
- for(int i = 0; i < returnValue.substitutions.length; i++)
- {
- returnValue.substitutions[i] = match.group(i);
- }
-
- int _start = match.start();
- int _end = match.end();
-
- returnValue.start = _start;
- returnValue.end = _end;
-
- // For non-reversed searches, we break immediately
- // to return the first match. For reversed searches,
- // we continue until no more matches are found
- if (!reverse || !match.find())
- {
- // For reverse search, check for zero width match at
- // the end of text.
- if (reverse && !firstTime && returnValue.start == text.length()
- && returnValue.end == text.length())
- {
- if (previous != null)
- {
- returnValue.start = previous.start;
- returnValue.end = previous.end;
- returnValue.substitutions = previous.substitutions;
- }
- else
- {
- return null;
- }
- }
- break;
- }
- // Save the result for reverse zero width match.
- if (previous == null)
- {
- previous = new Match();
- }
- previous.start = returnValue.start;
- previous.end = returnValue.end;
- previous.substitutions = returnValue.substitutions;
- }
-
- if (reverse)
- {
- // The caller assumes we are searching a reversed
- // CharSegment, so we need to reverse the indices
- // before returning
- int len = returnValue.end - returnValue.start;
- returnValue.start = text.length() - returnValue.end;
- returnValue.end = returnValue.start + len;
- }
-
- return returnValue;
- } //}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- boolean ignoreCase = (flags & Pattern.CASE_INSENSITIVE) != 0;
- return "PatternSearchMatcher[" + pattern + ',' + ignoreCase + ']';
- } //}}}
-
- static int getFlag(boolean ignoreCase)
- {
- int flags = Pattern.MULTILINE;
- if (ignoreCase)
- flags |= Pattern.CASE_INSENSITIVE;
- return flags;
- }
-
- //{{{ Private members
- private int flags;
- private Pattern re;
- private final String pattern;
- //}}}
-}
-
+/*
+ * PatternSearchMatcher.java - Regular expression matcher
+ * :noTabs=false:
+ *
+ * Copyright (C) 2006 Marcelo Vanzin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.gjt.sp.util.ReverseCharSequence;
+
+/**
+ * A regular expression string matcher using java.util.regex.
+ * @see java.util.regex.Pattern
+ *
+ * @author Marcelo Vanzin
+ * @version $Id: PatternSearchMatcher.java 19553 2011-06-09 01:23:57Z ezust $
+ * @since jEdit 4.3pre5
+ */
+public class PatternSearchMatcher extends SearchMatcher
+{
+ //{{{ PatternSearchMatcher constructors
+ /**
+ * Creates a new regular expression string matcher.
+ * @see java.util.regex.Pattern
+ * @param search the search pattern
+ * @param ignoreCase <code>true</code> if you want to ignore case
+ * @since jEdit 4.3pre5
+ */
+ public PatternSearchMatcher(String search, boolean ignoreCase)
+ {
+ pattern = search;
+ flags = getFlag(ignoreCase);
+ }
+
+ /**
+ * Creates a new regular expression already compiled.
+ * @see java.util.regex.Pattern
+ * @param re the compiled regex
+ * @param ignoreCase <code>true</code> if you want to ignore case
+ * @since jEdit 4.3pre13
+ */
+ public PatternSearchMatcher(Pattern re, boolean ignoreCase)
+ {
+ this(re.pattern(), ignoreCase);
+ this.re = re;
+ } //}}}
+
+ //{{{ nextMatch() method
+ /**
+ * {@inheritDoc}
+ * <p>Reverse regex search is done by searching from the beginning to
+ * just prior to the current match, so will be inefficient for large
+ * buffers.</p>
+ */
+ @Override
+ public SearchMatcher.Match nextMatch(CharSequence text, boolean start,
+ boolean end, boolean firstTime, boolean reverse)
+ {
+ // "For the mean time, there is no way to automatically generate a sexeger"
+ //
+ // http://japhy.perlmonk.org/sexeger/sexeger.html
+ //
+ // So ... for reverse regex searches we will search
+ // the string in the forward direction and
+ // return the last match.
+
+ // Since we search the String in the forward direction,
+ // (even for reverse searches) un-reverse the ReverseCharSequence.
+ if (text instanceof ReverseCharSequence)
+ text = ((ReverseCharSequence)text).baseSequence();
+
+ if (re == null)
+ re = Pattern.compile(pattern, flags);
+
+ // if the pattern begins with "^", avoid spurious match at the
+ // start of input sequence which is not a start of line.
+ int matchStart = 0;
+ if (!start && re.pattern().charAt(0) == '^')
+ {
+ Matcher sol = Pattern.compile("^", flags).matcher(text);
+ // Ignore the first match since it is not a start of line.
+ sol.find();
+ // If the second match is not found, the real pattern also
+ // can't match.
+ if (!sol.find())
+ return null;
+ // Skip the text to the second match, which can be the first
+ // match for the real pattern.
+ matchStart = sol.start();
+ }
+
+ Matcher match = re.matcher(text);
+ if (!match.find(matchStart))
+ return null;
+
+ // Special care for zero width matches. Without this care,
+ // the caller will fall into an infinite loop, for non-reverse
+ // search.
+ if (!reverse && !firstTime && match.start() == 0 && match.end() == 0)
+ {
+ if (!match.find())
+ return null;
+ }
+
+ Match previous = null;
+ while (true)
+ {
+ // if we're not at the end of the buffer and we
+ // match the end of the text, and the pattern ends with a "$",
+ // ignore the match.
+ // The match at the end the buffer which immediately follows
+ // the final newline is also ignored because it is generally
+ // not expected as an EOL.
+ if ((!end || (text.charAt(text.length() - 1) == '\n'))
+ && match.end() == text.length()
+ && pattern.charAt(pattern.length() - 1) == '$')
+ {
+ if (previous != null)
+ {
+ returnValue.start = previous.start;
+ returnValue.end = previous.end;
+ returnValue.substitutions = previous.substitutions;
+ break;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ returnValue.substitutions = new String[match.groupCount() + 1];
+ for(int i = 0; i < returnValue.substitutions.length; i++)
+ {
+ returnValue.substitutions[i] = match.group(i);
+ }
+
+ int _start = match.start();
+ int _end = match.end();
+
+ returnValue.start = _start;
+ returnValue.end = _end;
+
+ // For non-reversed searches, we break immediately
+ // to return the first match. For reversed searches,
+ // we continue until no more matches are found
+ if (!reverse || !match.find())
+ {
+ // For reverse search, check for zero width match at
+ // the end of text.
+ if (reverse && !firstTime && returnValue.start == text.length()
+ && returnValue.end == text.length())
+ {
+ if (previous != null)
+ {
+ returnValue.start = previous.start;
+ returnValue.end = previous.end;
+ returnValue.substitutions = previous.substitutions;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ break;
+ }
+ // Save the result for reverse zero width match.
+ if (previous == null)
+ {
+ previous = new Match();
+ }
+ previous.start = returnValue.start;
+ previous.end = returnValue.end;
+ previous.substitutions = returnValue.substitutions;
+ }
+
+ if (reverse)
+ {
+ // The caller assumes we are searching a reversed
+ // CharSegment, so we need to reverse the indices
+ // before returning
+ int len = returnValue.end - returnValue.start;
+ returnValue.start = text.length() - returnValue.end;
+ returnValue.end = returnValue.start + len;
+ }
+
+ return returnValue;
+ } //}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ boolean ignoreCase = (flags & Pattern.CASE_INSENSITIVE) != 0;
+ return "PatternSearchMatcher[" + pattern + ',' + ignoreCase + ']';
+ } //}}}
+
+ static int getFlag(boolean ignoreCase)
+ {
+ int flags = Pattern.MULTILINE;
+ if (ignoreCase)
+ flags |= Pattern.CASE_INSENSITIVE;
+ return flags;
+ }
+
+ //{{{ Private members
+ private int flags;
+ private Pattern re;
+ private final String pattern;
+ //}}}
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/search/SearchAndReplace.java b/jEdit/org/gjt/sp/jedit/search/SearchAndReplace.java
index dec12ad..7c4ad8c 100644
--- a/jEdit/org/gjt/sp/jedit/search/SearchAndReplace.java
+++ b/jEdit/org/gjt/sp/jedit/search/SearchAndReplace.java
@@ -1,1381 +1,1401 @@
-/*
- * SearchAndReplace.java - Search and replace
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2004 Slava Pestov
- * Portions copyright (C) 2001 Tom Locke
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import org.gjt.sp.jedit.bsh.*;
-import java.awt.*;
-import java.util.regex.Pattern;
-import javax.swing.JOptionPane;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.gui.TextAreaDialog;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.jedit.msg.PositionChanging;
-import org.gjt.sp.jedit.msg.SearchSettingsChanged;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.jedit.textarea.TextArea;
-import org.gjt.sp.util.ReverseCharSequence;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * Class that implements regular expression and literal search within
- * jEdit buffers.<p>
- *
- * There are two main groups of methods in this class:
- * <ul>
- * <li>Property accessors - for changing search and replace settings.</li>
- * <li>Actions - for performing search and replace.</li>
- * </ul>
- *
- * The "HyperSearch" and "Keep dialog" features, as reflected in
- * checkbox options in the search dialog, are not handled from within
- * this class. If you wish to have these options set before the search dialog
- * appears, make a prior call to either or both of the following:
- *
- * <pre> jEdit.setBooleanProperty("search.hypersearch.toggle",true);
- * jEdit.setBooleanProperty("search.keepDialog.toggle",true);</pre>
- *
- * If you are not using the dialog to undertake a search or replace, you may
- * call any of the search and replace methods (including
- * {@link #hyperSearch(View)}) without concern for the value of these
- * properties.
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: SearchAndReplace.java 13907 2008-10-19 08:22:44Z k_satoda $
- */
-public class SearchAndReplace
-{
- //{{{ Getters and setters
-
- //{{{ setSearchString() method
- /**
- * Sets the current search string.
- * @param search The new search string
- */
- public static void setSearchString(String search)
- {
- if(search.equals(SearchAndReplace.search))
- return;
-
- SearchAndReplace.search = search;
- matcher = null;
-
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ getSearchString() method
- /**
- * Returns the current search string.
- */
- public static String getSearchString()
- {
- return search;
- } //}}}
-
- //{{{ setReplaceString() method
- /**
- * Sets the current replacement string.
- * @param replace The new replacement string
- */
- public static void setReplaceString(String replace)
- {
- if(replace.equals(SearchAndReplace.replace))
- return;
-
- SearchAndReplace.replace = replace;
-
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ getReplaceString() method
- /**
- * Returns the current replacement string.
- */
- public static String getReplaceString()
- {
- return replace;
- } //}}}
-
- //{{{ setIgnoreCase() method
- /**
- * Sets the ignore case flag.
- * @param ignoreCase True if searches should be case insensitive,
- * false otherwise
- */
- public static void setIgnoreCase(boolean ignoreCase)
- {
- if(ignoreCase == SearchAndReplace.ignoreCase)
- return;
-
- SearchAndReplace.ignoreCase = ignoreCase;
- matcher = null;
-
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ getIgnoreCase() method
- /**
- * Returns the state of the ignore case flag.
- * @return True if searches should be case insensitive,
- * false otherwise
- */
- public static boolean getIgnoreCase()
- {
- return ignoreCase;
- } //}}}
-
- //{{{ setRegexp() method
- /**
- * Sets the state of the regular expression flag.
- * @param regexp True if regular expression searches should be
- * performed
- */
- public static void setRegexp(boolean regexp)
- {
- if(regexp == SearchAndReplace.regexp)
- return;
-
- SearchAndReplace.regexp = regexp;
- if(regexp && reverse)
- reverse = false;
-
- matcher = null;
-
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ getRegexp() method
- /**
- * Returns the state of the regular expression flag.
- * @return True if regular expression searches should be performed
- */
- public static boolean getRegexp()
- {
- return regexp;
- } //}}}
-
- //{{{ setReverseSearch() method
- /**
- * Determines whether a reverse search will conducted from the current
- * position to the beginning of a buffer. Note that reverse search and
- * regular expression search is mutually exclusive; enabling one will
- * disable the other.
- * @param reverse True if searches should go backwards,
- * false otherwise
- */
- public static void setReverseSearch(boolean reverse)
- {
- if(reverse == SearchAndReplace.reverse)
- return;
-
- SearchAndReplace.reverse = reverse;
-
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ getReverseSearch() method
- /**
- * Returns the state of the reverse search flag.
- * @return True if searches should go backwards,
- * false otherwise
- */
- public static boolean getReverseSearch()
- {
- return reverse;
- } //}}}
-
- //{{{ setBeanShellReplace() method
- /**
- * Sets the state of the BeanShell replace flag.
- * @param beanshell True if the replace string is a BeanShell expression
- * @since jEdit 3.2pre2
- */
- public static void setBeanShellReplace(boolean beanshell)
- {
- if(beanshell == SearchAndReplace.beanshell)
- return;
-
- SearchAndReplace.beanshell = beanshell;
-
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ getBeanShellReplace() method
- /**
- * Returns the state of the BeanShell replace flag.
- * @return True if the replace string is a BeanShell expression
- * @since jEdit 3.2pre2
- */
- public static boolean getBeanShellReplace()
- {
- return beanshell;
- } //}}}
-
- //{{{ setAutoWrap() method
- /**
- * Sets the state of the auto wrap around flag.
- * @param wrap If true, the 'continue search from start' dialog
- * will not be displayed
- * @since jEdit 3.2pre2
- */
- public static void setAutoWrapAround(boolean wrap)
- {
- if(wrap == SearchAndReplace.wrap)
- return;
-
- SearchAndReplace.wrap = wrap;
-
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ getAutoWrap() method
- /**
- * Returns the state of the auto wrap around flag.
- * @since jEdit 3.2pre2
- */
- public static boolean getAutoWrapAround()
- {
- return wrap;
- } //}}}
-
- //{{{ setSearchMatcher() method
- /**
- * Sets a custom search string matcher. Note that calling
- * {@link #setSearchString(String)},
- * {@link #setIgnoreCase(boolean)}, or {@link #setRegexp(boolean)}
- * will reset the matcher to the default.
- */
- public static void setSearchMatcher(SearchMatcher matcher)
- {
- SearchAndReplace.matcher = matcher;
-
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ getSearchMatcher() method
- /**
- * Returns the current search string matcher.
- * @return a SearchMatcher or null if there is no search or if the matcher can match empty String
- *
- * @exception IllegalArgumentException if regular expression search
- * is enabled, the search string or replacement string is invalid
- * @since jEdit 4.1pre7
- */
- public static SearchMatcher getSearchMatcher()
- throws Exception {
- if (matcher != null)
- return matcher;
-
- if (search == null || "".equals(search))
- return null;
-
- if (regexp)
- {
- Pattern re = Pattern.compile(search,
- PatternSearchMatcher.getFlag(ignoreCase));
- matcher = new PatternSearchMatcher(re, ignoreCase);
- }
- else
- matcher = new BoyerMooreSearchMatcher(search, ignoreCase);
-
- return matcher;
- } //}}}
-
- //{{{ setSearchFileSet() method
- /**
- * Sets the current search file set.
- * @param fileset The file set to perform searches in
- * @see AllBufferSet
- * @see CurrentBufferSet
- * @see DirectoryListSet
- */
- public static void setSearchFileSet(SearchFileSet fileset)
- {
- SearchAndReplace.fileset = fileset;
-
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ getSearchFileSet() method
- /**
- * Returns the current search file set.
- */
- public static SearchFileSet getSearchFileSet()
- {
- return fileset;
- } //}}}
-
- //{{{ getSmartCaseReplace() method
- /**
- * Returns if the replacement string will assume the same case as
- * each specific occurrence of the search string.
- * @since jEdit 4.2pre10
- */
- public static boolean getSmartCaseReplace()
- {
- return (replace != null
- && TextUtilities.getStringCase(replace)
- == TextUtilities.LOWER_CASE);
- } //}}}
-
- //}}}
-
- //{{{ Actions
-
- //{{{ hyperSearch() method
- /**
- * Performs a HyperSearch.
- * @param view The view
- * @since jEdit 2.7pre3
- */
- public static boolean hyperSearch(View view)
- {
- return hyperSearch(view,false);
- } //}}}
-
- //{{{ hyperSearch() method
- /**
- * Performs a HyperSearch.
- * @param view The view
- * @param selection If true, will only search in the current selection.
- * Note that the file set must be the current buffer file set for this
- * to work.
- * @since jEdit 4.0pre1
- */
- public static boolean hyperSearch(View view, boolean selection)
- {
- // component that will parent any dialog boxes
- Component comp = SearchDialog.getSearchDialog(view);
- if(comp == null)
- comp = view;
-
- record(view,"hyperSearch(view," + selection + ')',false,
- !selection);
-
- view.getDockableWindowManager().addDockableWindow(
- HyperSearchResults.NAME);
- HyperSearchResults results = (HyperSearchResults)
- view.getDockableWindowManager()
- .getDockable(HyperSearchResults.NAME);
- results.searchStarted();
-
- try
- {
- SearchMatcher matcher = getSearchMatcher();
- if(matcher == null)
- {
- view.getToolkit().beep();
- results.searchFailed();
- return false;
- }
-
- Selection[] s;
- if(selection)
- {
- s = view.getTextArea().getSelection();
- if(s == null)
- {
- results.searchFailed();
- return false;
- }
- }
- else
- s = null;
- VFSManager.runInWorkThread(new HyperSearchRequest(view,
- matcher,results,s));
- return true;
- }
- catch(Exception e)
- {
- results.searchFailed();
- handleError(comp,e);
- return false;
- }
- } //}}}
-
- //{{{ find() method
- /**
- * Finds the next occurrence of the search string.
- * @param view The view
- * @return True if the operation was successful, false otherwise
- */
- public static boolean find(View view)
- {
- // component that will parent any dialog boxes
- Component comp = SearchDialog.getSearchDialog(view);
- if(comp == null || !comp.isShowing())
- comp = view;
-
- String path = fileset.getNextFile(view,null);
- if(path == null)
- {
- GUIUtilities.error(comp,"empty-fileset",null);
- return false;
- }
-
- boolean _reverse = reverse && fileset instanceof CurrentBufferSet;
-
- try
- {
- view.showWaitCursor();
-
- SearchMatcher matcher = getSearchMatcher();
- if(matcher == null)
- {
- view.getToolkit().beep();
- return false;
- }
-
- record(view,"find(view)",false,true);
-
- boolean repeat = false;
-loop: for(;;)
- {
- while(path != null)
- {
- Buffer buffer = jEdit.openTemporary(
- view,null,path,false);
-
- /* this is stupid and misleading.
- * but 'path' is not used anywhere except
- * the above line, and if this is done
- * after the 'continue', then we will
- * either hang, or be forced to duplicate
- * it inside the buffer == null, or add
- * a 'finally' clause. you decide which one's
- * worse. */
- path = fileset.getNextFile(view,path);
-
- if(buffer == null)
- continue loop;
-
- // Wait for the buffer to load
- if(!buffer.isLoaded())
- VFSManager.waitForRequests();
-
- int start;
-
- if(view.getBuffer() == buffer && !repeat)
- {
- JEditTextArea textArea = view.getTextArea();
- Selection s = textArea.getSelectionAtOffset(
- textArea.getCaretPosition());
- if(s == null)
- start = textArea.getCaretPosition();
- else if(_reverse)
- start = s.getStart();
- else
- start = s.getEnd();
- }
- else if(_reverse)
- start = buffer.getLength();
- else
- start = 0;
-
- if(find(view,buffer,start,repeat,_reverse))
- return true;
- }
-
- if(repeat)
- {
- if(!BeanShell.isScriptRunning())
- {
- view.getStatus().setMessageAndClear(
- jEdit.getProperty("view.status.search-not-found"));
-
- view.getToolkit().beep();
- }
- return false;
- }
-
- boolean restart;
-
- // if auto wrap is on, always restart search.
- // if auto wrap is off, and we're called from
- // a macro, stop search. If we're called
- // interactively, ask the user what to do.
- if(wrap)
- {
- if(!BeanShell.isScriptRunning())
- {
- view.getStatus().setMessageAndClear(
- jEdit.getProperty("view.status.auto-wrap"));
- // beep if beep property set
- if(jEdit.getBooleanProperty("search.beepOnSearchAutoWrap"))
- {
- view.getToolkit().beep();
- }
- }
- restart = true;
- }
- else if(BeanShell.isScriptRunning())
- {
- restart = false;
- }
- else
- {
- Integer[] args = {Integer.valueOf(_reverse ? 1 : 0)};
- int result = GUIUtilities.confirm(comp,
- "keepsearching",args,
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- restart = (result == JOptionPane.YES_OPTION);
- }
-
- if(restart)
- {
- // start search from beginning
- path = fileset.getFirstFile(view);
- repeat = true;
- }
- else
- break loop;
- }
- }
- catch(Exception e)
- {
- handleError(comp,e);
- }
- finally
- {
- view.hideWaitCursor();
- }
-
- return false;
- } //}}}
-
- //{{{ find() method
- /**
- * Finds the next instance of the search string in the specified
- * buffer.
- * @param view The view
- * @param buffer The buffer
- * @param start Location where to start the search
- */
- public static boolean find(View view, Buffer buffer, int start)
- throws Exception
- {
- return find(view,buffer,start,false,false);
- } //}}}
-
- //{{{ find() method
- /**
- * Finds the next instance of the search string in the specified
- * buffer.
- * @param view The view
- * @param buffer The buffer
- * @param start Location where to start the search
- * @param firstTime See {@link SearchMatcher#nextMatch(CharSequence,boolean,boolean,boolean,boolean)}.
- * @since jEdit 4.1pre7
- */
- public static boolean find(View view, Buffer buffer, int start,
- boolean firstTime, boolean reverse) throws Exception
- {
-
- EditBus.send(new PositionChanging(view.getEditPane()));
-
- SearchMatcher matcher = getSearchMatcher();
- if(matcher == null)
- {
- view.getToolkit().beep();
- return false;
- }
-
- CharSequence text;
- boolean startOfBuffer;
- boolean endOfBuffer;
- if(reverse)
- {
- text = new ReverseCharSequence(buffer.getSegment(0,start));
- startOfBuffer = true;
- endOfBuffer = (start == buffer.getLength());
- }
- else
- {
- text = buffer.getSegment(start,buffer.getLength() - start);
- startOfBuffer = (start == 0);
- endOfBuffer = true;
- }
- SearchMatcher.Match match = matcher.nextMatch(text,
- startOfBuffer,endOfBuffer,firstTime,reverse);
- if(match != null)
- {
- jEdit.commitTemporary(buffer);
- view.setBuffer(buffer,true);
- JEditTextArea textArea = view.getTextArea();
-
- if(reverse)
- {
- textArea.setSelection(new Selection.Range(
- start - match.end,
- start - match.start));
- // make sure end of match is visible
- textArea.scrollTo(start - match.start,false);
- textArea.moveCaretPosition(start - match.end);
- }
- else
- {
- textArea.setSelection(new Selection.Range(
- start + match.start,
- start + match.end));
- textArea.moveCaretPosition(start + match.end);
- // make sure start of match is visible
- textArea.scrollTo(start + match.start,false);
- }
-
- return true;
- }
- else
- return false;
- } //}}}
-
- //{{{ replace() method
- /**
- * Replaces the current selection with the replacement string.
- * @param view The view
- * @return True if the operation was successful, false otherwise
- */
- public static boolean replace(View view)
- {
- // component that will parent any dialog boxes
- Component comp = SearchDialog.getSearchDialog(view);
- if(comp == null)
- comp = view;
-
- JEditTextArea textArea = view.getTextArea();
-
- Buffer buffer = view.getBuffer();
- if(!buffer.isEditable())
- return false;
-
- boolean smartCaseReplace = getSmartCaseReplace();
-
- Selection[] selection = textArea.getSelection();
- if (selection.length == 0)
- {
- view.getToolkit().beep();
- return false;
- }
-
- record(view,"replace(view)",true,false);
-
- // a little hack for reverse replace and find
- int caret = textArea.getCaretPosition();
- Selection s = textArea.getSelectionAtOffset(caret);
- if(s != null)
- caret = s.getStart();
-
- try
- {
- buffer.beginCompoundEdit();
-
- SearchMatcher matcher = getSearchMatcher();
- if(matcher == null)
- return false;
-
- initReplace();
-
- int retVal = 0;
-
- for(int i = 0; i < selection.length; i++)
- {
- s = selection[i];
-
- retVal += replaceInSelection(view,textArea,
- buffer,matcher,smartCaseReplace,s);
- }
-
- boolean _reverse = !regexp && reverse && fileset instanceof CurrentBufferSet;
- if(_reverse)
- {
- // so that Replace and Find continues from
- // the right location
- textArea.moveCaretPosition(caret);
- }
- else
- {
- s = textArea.getSelectionAtOffset(
- textArea.getCaretPosition());
- if(s != null)
- textArea.moveCaretPosition(s.getEnd());
- }
-
- if(!BeanShell.isScriptRunning())
- {
- Object[] args = {Integer.valueOf(retVal),
- Integer.valueOf(1)};
- view.getStatus().setMessageAndClear(jEdit.getProperty(
- "view.status.replace-all",args));
- }
-
- if(retVal == 0)
- {
- view.getToolkit().beep();
- return false;
- }
-
- return true;
- }
- catch(Exception e)
- {
- handleError(comp,e);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
-
- return false;
- } //}}}
-
- //{{{ replace() method
- /**
- * Replaces text in the specified range with the replacement string.
- * @param view The view
- * @param buffer The buffer
- * @param start The start offset
- * @param end The end offset
- * @return True if the operation was successful, false otherwise
- */
- public static boolean replace(View view, Buffer buffer, int start, int end)
- {
- if(!buffer.isEditable())
- return false;
-
- // component that will parent any dialog boxes
- Component comp = SearchDialog.getSearchDialog(view);
- if(comp == null)
- comp = view;
-
- boolean smartCaseReplace = getSmartCaseReplace();
-
- try
- {
- buffer.beginCompoundEdit();
-
- SearchMatcher matcher = getSearchMatcher();
- if(matcher == null)
- return false;
-
- initReplace();
-
- int retVal = 0;
-
- retVal += _replace(view,buffer,matcher,start,end,
- smartCaseReplace);
-
- if(retVal != 0)
- return true;
- }
- catch(Exception e)
- {
- handleError(comp,e);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
-
- return false;
- } //}}}
-
- //{{{ replaceAll() method
- /**
- * Replaces all occurrences of the search string with the replacement
- * string.
- * @param view The view
- * @return the number of modified files
- */
- public static boolean replaceAll(View view)
- {
- return replaceAll(view,false);
- } //}}}
-
- //{{{ replaceAll() method
- /**
- * Replaces all occurrences of the search string with the replacement
- * string.
- * @param view The view
- * @param dontOpenChangedFiles Whether to open changed files or to autosave them quietly
- * @return the number of modified files
- */
- public static boolean replaceAll(View view, boolean dontOpenChangedFiles)
- {
- // component that will parent any dialog boxes
- Component comp = SearchDialog.getSearchDialog(view);
- if(comp == null)
- comp = view;
-
- if(fileset.getFileCount(view) == 0)
- {
- GUIUtilities.error(comp,"empty-fileset",null);
- return false;
- }
-
- record(view,"replaceAll(view)",true,true);
-
- view.showWaitCursor();
-
- boolean smartCaseReplace = (replace != null
- && TextUtilities.getStringCase(replace)
- == TextUtilities.LOWER_CASE);
-
- int fileCount = 0;
- int occurCount = 0;
- try
- {
- SearchMatcher matcher = getSearchMatcher();
- if(matcher == null)
- return false;
-
- initReplace();
-
- String path = fileset.getFirstFile(view);
-loop: while(path != null)
- {
- Buffer buffer = jEdit.openTemporary(
- view,null,path,false);
-
- /* this is stupid and misleading.
- * but 'path' is not used anywhere except
- * the above line, and if this is done
- * after the 'continue', then we will
- * either hang, or be forced to duplicate
- * it inside the buffer == null, or add
- * a 'finally' clause. you decide which one's
- * worse. */
- path = fileset.getNextFile(view,path);
-
- if(buffer == null)
- continue loop;
-
- // Wait for buffer to finish loading
- if(buffer.isPerformingIO())
- VFSManager.waitForRequests();
-
- if(!buffer.isEditable())
- continue loop;
-
- // Leave buffer in a consistent state if
- // an error occurs
- int retVal = 0;
-
- try
- {
- buffer.beginCompoundEdit();
- retVal = _replace(view,buffer,matcher,
- 0,buffer.getLength(),
- smartCaseReplace);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
-
- if(retVal != 0)
- {
- fileCount++;
- occurCount += retVal;
- if (dontOpenChangedFiles)
- {
- buffer.save(null,null);
- }
- else
- {
- jEdit.commitTemporary(buffer);
- jEdit.getBufferSetManager().addBuffer(view, buffer);
- }
- }
- }
- }
- catch(Exception e)
- {
- handleError(comp,e);
- }
- finally
- {
- view.hideWaitCursor();
- }
-
- /* Don't do this when playing a macro, cos it's annoying */
- if(!BeanShell.isScriptRunning())
- {
- Object[] args = {Integer.valueOf(occurCount),
- Integer.valueOf(fileCount)};
- view.getStatus().setMessageAndClear(jEdit.getProperty(
- "view.status.replace-all",args));
- if(occurCount == 0)
- view.getToolkit().beep();
- }
-
- return (fileCount != 0);
- } //}}}
-
- //}}}
-
- //{{{ escapeRegexp() method
- /**
- * Escapes characters with special meaning in a regexp.
- * @param str the string to escape
- * @param multiline Should \n be escaped?
- * @return the string with escaped characters
- * @since jEdit 4.3pre1
- */
- public static String escapeRegexp(String str, boolean multiline)
- {
- return StandardUtilities.charsToEscapes(str,
- "\r\t\\()[]{}$^*+?|."
- + (multiline ? "" : "\n"));
- } //}}}
-
- //{{{ load() method
- /**
- * Loads search and replace state from the properties.
- */
- public static void load()
- {
- search = jEdit.getProperty("search.find.value");
- replace = jEdit.getProperty("search.replace.value");
- ignoreCase = jEdit.getBooleanProperty("search.ignoreCase.toggle");
- regexp = jEdit.getBooleanProperty("search.regexp.toggle");
- beanshell = jEdit.getBooleanProperty("search.beanshell.toggle");
- wrap = jEdit.getBooleanProperty("search.wrap.toggle");
-
- fileset = new CurrentBufferSet();
-
- // Tags plugin likes to call this method at times other than
- // startup; so we need to fire a SearchSettingsChanged to
- // notify the search bar and so on.
- matcher = null;
- EditBus.send(new SearchSettingsChanged(null));
- } //}}}
-
- //{{{ save() method
- /**
- * Saves search and replace state to the properties.
- */
- public static void save()
- {
- jEdit.setProperty("search.find.value",search);
- jEdit.setProperty("search.replace.value",replace);
- jEdit.setBooleanProperty("search.ignoreCase.toggle",ignoreCase);
- jEdit.setBooleanProperty("search.regexp.toggle",regexp);
- jEdit.setBooleanProperty("search.beanshell.toggle",beanshell);
- jEdit.setBooleanProperty("search.wrap.toggle",wrap);
- } //}}}
-
- //{{{ handleError() method
- static void handleError(Component comp, Exception e)
- {
- Log.log(Log.ERROR,SearchAndReplace.class,e);
- if(comp instanceof Dialog)
- {
- new TextAreaDialog((Dialog)comp,
- beanshell ? "searcherror-bsh"
- : "searcherror",e);
- }
- else
- {
- new TextAreaDialog((Frame)comp,
- beanshell ? "searcherror-bsh"
- : "searcherror",e);
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private static String search;
- private static String replace;
- private static BshMethod replaceMethod;
- private static NameSpace replaceNS = new NameSpace(
- BeanShell.getNameSpace(),
- BeanShell.getNameSpace().getClassManager(),
- "search and replace");
- private static boolean regexp;
- private static boolean ignoreCase;
- private static boolean reverse;
- private static boolean beanshell;
- private static boolean wrap;
- private static SearchMatcher matcher;
- private static SearchFileSet fileset;
- //}}}
-
- //{{{ initReplace() method
- /**
- * Set up BeanShell replace if necessary.
- */
- private static void initReplace() throws Exception
- {
- if(beanshell && replace.length() != 0)
- {
- replaceMethod = BeanShell.cacheBlock("replace",
- "return (" + replace + ");",true);
- }
- else
- replaceMethod = null;
- } //}}}
-
- //{{{ record() method
- private static void record(View view, String action,
- boolean replaceAction, boolean recordFileSet)
- {
- Macros.Recorder recorder = view.getMacroRecorder();
-
- if(recorder != null)
- {
- recorder.record("SearchAndReplace.setSearchString(\""
- + StandardUtilities.charsToEscapes(search) + "\");");
-
- if(replaceAction)
- {
- recorder.record("SearchAndReplace.setReplaceString(\""
- + StandardUtilities.charsToEscapes(replace) + "\");");
- recorder.record("SearchAndReplace.setBeanShellReplace("
- + beanshell + ");");
- }
- else
- {
- // only record this if doing a find next
- recorder.record("SearchAndReplace.setAutoWrapAround("
- + wrap + ");");
- recorder.record("SearchAndReplace.setReverseSearch("
- + reverse + ");");
- }
-
- recorder.record("SearchAndReplace.setIgnoreCase("
- + ignoreCase + ");");
- recorder.record("SearchAndReplace.setRegexp("
- + regexp + ");");
-
- if(recordFileSet)
- {
- recorder.record("SearchAndReplace.setSearchFileSet("
- + fileset.getCode() + ");");
- }
-
- recorder.record("SearchAndReplace." + action + ';');
- }
- } //}}}
-
- //{{{ replaceInSelection() method
- private static int replaceInSelection(View view, TextArea textArea,
- Buffer buffer, SearchMatcher matcher, boolean smartCaseReplace,
- Selection s) throws Exception
- {
- /* if an occurence occurs at the
- beginning of the selection, the
- selection start will get moved.
- this sucks, so we hack to avoid it. */
- int start = s.getStart();
-
- int returnValue;
-
- if(s instanceof Selection.Range)
- {
- returnValue = _replace(view,buffer,matcher,
- s.getStart(),s.getEnd(),
- smartCaseReplace);
-
- textArea.removeFromSelection(s);
- textArea.addToSelection(new Selection.Range(
- start,s.getEnd()));
- }
- else if(s instanceof Selection.Rect)
- {
- Selection.Rect rect = (Selection.Rect)s;
- int startCol = rect.getStartColumn(
- buffer);
- int endCol = rect.getEndColumn(
- buffer);
-
- returnValue = 0;
- for(int j = s.getStartLine(); j <= s.getEndLine(); j++)
- {
- returnValue += _replace(view,buffer,matcher,
- getColumnOnOtherLine(buffer,j,startCol),
- getColumnOnOtherLine(buffer,j,endCol),
- smartCaseReplace);
- }
- textArea.addToSelection(new Selection.Rect(
- start,s.getEnd()));
- }
- else
- throw new RuntimeException("Unsupported: " + s);
-
- return returnValue;
- } //}}}
-
- //{{{ _replace() method
- /**
- * Replaces all occurrences of the search string with the replacement
- * string.
- * @param view The view
- * @param buffer The buffer
- * @param start The start offset
- * @param end The end offset
- * @param matcher The search matcher to use
- * @param smartCaseReplace See user's guide
- * @return The number of occurrences replaced
- */
- private static int _replace(View view, JEditBuffer buffer,
- SearchMatcher matcher, int start, int end,
- boolean smartCaseReplace)
- throws Exception
- {
- int occurCount = 0;
-
- boolean endOfLine = (buffer.getLineEndOffset(
- buffer.getLineOfOffset(end)) - 1 == end);
-
- int offset = start;
-loop: for(int counter = 0; ; counter++)
- {
- boolean startOfLine = (buffer.getLineStartOffset(
- buffer.getLineOfOffset(offset)) == offset);
-
- CharSequence text = buffer.getSegment(offset,end - offset);
- SearchMatcher.Match occur = matcher.nextMatch(
- text,startOfLine,endOfLine,counter == 0,false);
- if(occur == null)
- break loop;
-
- String found = text.subSequence(
- occur.start, occur.end).toString();
-
- int length = replaceOne(view,buffer,occur,offset,
- found,smartCaseReplace);
- if(length == -1)
- offset += occur.end;
- else
- {
- offset += occur.start + length;
- end += (length - found.length());
- occurCount++;
- }
- }
-
- return occurCount;
- } //}}}
-
- //{{{ replaceOne() method
- /**
- * Replace one occurrence of the search string with the
- * replacement string.
- */
- private static int replaceOne(View view, JEditBuffer buffer,
- SearchMatcher.Match occur, int offset, String found,
- boolean smartCaseReplace)
- throws Exception
- {
- String subst = replaceOne(view,occur,found);
- if(smartCaseReplace && ignoreCase)
- {
- int strCase = TextUtilities.getStringCase(found);
- if(strCase == TextUtilities.LOWER_CASE)
- subst = subst.toLowerCase();
- else if(strCase == TextUtilities.UPPER_CASE)
- subst = subst.toUpperCase();
- else if(strCase == TextUtilities.TITLE_CASE)
- subst = TextUtilities.toTitleCase(subst);
- }
-
- if(subst != null)
- {
- int start = offset + occur.start;
- int end = offset + occur.end;
-
- if (end - start > 0)
- buffer.remove(start,end - start);
- buffer.insert(start,subst);
- return subst.length();
- }
- else
- return -1;
- } //}}}
-
- //{{{ replaceOne() method
- private static String replaceOne(View view,
- SearchMatcher.Match occur, String found)
- throws Exception
- {
- if(regexp)
- {
- if(replaceMethod != null)
- return regexpBeanShellReplace(view,occur);
- else
- return regexpReplace(occur,found);
- }
- else
- {
- if(replaceMethod != null)
- return literalBeanShellReplace(view,found);
- else
- return replace;
- }
- } //}}}
-
- //{{{ regexpBeanShellReplace() method
- private static String regexpBeanShellReplace(View view,
- SearchMatcher.Match occur) throws Exception
- {
- for(int i = 0; i < occur.substitutions.length; i++)
- {
- replaceNS.setVariable("_" + i,
- occur.substitutions[i]);
- }
-
- Object obj = BeanShell.runCachedBlock(
- replaceMethod,view,replaceNS);
- if(obj == null)
- return "";
- else
- return obj.toString();
- } //}}}
-
- //{{{ regexpReplace() method
- private static String regexpReplace(SearchMatcher.Match occur,
- String found) throws Exception
- {
- StringBuilder buf = new StringBuilder();
-
- for(int i = 0; i < replace.length(); i++)
- {
- char ch = replace.charAt(i);
- switch(ch)
- {
- case '$':
- if(i == replace.length() - 1)
- {
- // last character of the replace string,
- // it is not a capturing group
- buf.append(ch);
- break;
- }
-
- ch = replace.charAt(++i);
- if(ch == '$')
- {
- // It was $$, so it is an escaped $
- buf.append('$');
- }
- else if(ch == '0')
- {
- // $0 meaning the first capturing group :
- // the found value
- buf.append(found);
- }
- else if(Character.isDigit(ch))
- {
- int n = ch - '0';
- while (i < replace.length() - 1)
- {
- ch = replace.charAt(++i);
- if (Character.isDigit(ch))
- {
- n = n * 10 + (ch - '0');
- }
- else
- {
- // The character is not
- // a digit, going back and
- // end loop
- i--;
- break;
- }
- }
- if(n < occur
- .substitutions
- .length)
- {
- String subs = occur.substitutions[n];
- if (subs != null)
- buf.append(subs);
- }
- }
- break;
- case '\\':
- if(i == replace.length() - 1)
- {
- buf.append('\\');
- break;
- }
- ch = replace.charAt(++i);
- switch(ch)
- {
- case 'n':
- buf.append('\n');
- break;
- case 't':
- buf.append('\t');
- break;
- default:
- buf.append(ch);
- break;
- }
- break;
- default:
- buf.append(ch);
- break;
- }
- }
-
- return buf.toString();
- } //}}}
-
- //{{{ literalBeanShellReplace() method
- private static String literalBeanShellReplace(View view, String found)
- throws Exception
- {
- replaceNS.setVariable("_0",found);
- Object obj = BeanShell.runCachedBlock(
- replaceMethod,
- view,replaceNS);
- if(obj == null)
- return "";
- else
- return obj.toString();
- } //}}}
-
- //{{{ getColumnOnOtherLine() method
- /**
- * Should be somewhere else...
- */
- private static int getColumnOnOtherLine(Buffer buffer, int line,
- int col)
- {
- int returnValue = buffer.getOffsetOfVirtualColumn(
- line,col,null);
- if(returnValue == -1)
- return buffer.getLineEndOffset(line) - 1;
- else
- return buffer.getLineStartOffset(line) + returnValue;
- } //}}}
-
- //}}}
-}
+/*
+ * SearchAndReplace.java - Search and replace
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2004 Slava Pestov
+ * Portions copyright (C) 2001 Tom Locke
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import org.gjt.sp.jedit.bsh.*;
+import java.awt.*;
+import java.util.regex.Pattern;
+import javax.swing.JOptionPane;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.gui.TextAreaDialog;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.jedit.msg.PositionChanging;
+import org.gjt.sp.jedit.msg.SearchSettingsChanged;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.jedit.textarea.TextArea;
+import org.gjt.sp.util.*;
+//}}}
+
+/**
+ * Class that implements regular expression and literal search within
+ * jEdit buffers.<p>
+ *
+ * There are two main groups of methods in this class:
+ * <ul>
+ * <li>Property accessors - for changing search and replace settings.</li>
+ * <li>Actions - for performing search and replace.</li>
+ * </ul>
+ *
+ * The "HyperSearch" and "Keep dialog" features, as reflected in
+ * checkbox options in the search dialog, are not handled from within
+ * this class. If you wish to have these options set before the search dialog
+ * appears, make a prior call to either or both of the following:
+ *
+ * <pre> jEdit.setBooleanProperty("search.hypersearch.toggle",true);
+ * jEdit.setBooleanProperty("search.keepDialog.toggle",true);</pre>
+ *
+ * If you are not using the dialog to undertake a search or replace, you may
+ * call any of the search and replace methods (including
+ * {@link #hyperSearch(View)}) without concern for the value of these
+ * properties.
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: SearchAndReplace.java 19553 2011-06-09 01:23:57Z ezust $
+ */
+public class SearchAndReplace
+{
+ //{{{ Getters and setters
+
+ //{{{ setSearchString() method
+ /**
+ * Sets the current search string.
+ * @param search The new search string
+ */
+ public static void setSearchString(String search)
+ {
+ if(search.equals(SearchAndReplace.search))
+ return;
+
+ SearchAndReplace.search = search;
+ matcher = null;
+
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ getSearchString() method
+ /**
+ * Returns the current search string.
+ */
+ public static String getSearchString()
+ {
+ return search;
+ } //}}}
+
+ //{{{ setReplaceString() method
+ /**
+ * Sets the current replacement string.
+ * @param replace The new replacement string
+ */
+ public static void setReplaceString(String replace)
+ {
+ if(replace.equals(SearchAndReplace.replace))
+ return;
+
+ SearchAndReplace.replace = replace;
+
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ getReplaceString() method
+ /**
+ * Returns the current replacement string.
+ */
+ public static String getReplaceString()
+ {
+ return replace;
+ } //}}}
+
+ //{{{ setIgnoreCase() method
+ /**
+ * Sets the ignore case flag.
+ * @param ignoreCase True if searches should be case insensitive,
+ * false otherwise
+ */
+ public static void setIgnoreCase(boolean ignoreCase)
+ {
+ if(ignoreCase == SearchAndReplace.ignoreCase)
+ return;
+
+ SearchAndReplace.ignoreCase = ignoreCase;
+ matcher = null;
+
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ getIgnoreCase() method
+ /**
+ * Returns the state of the ignore case flag.
+ * @return True if searches should be case insensitive,
+ * false otherwise
+ */
+ public static boolean getIgnoreCase()
+ {
+ return ignoreCase;
+ } //}}}
+
+ //{{{ setRegexp() method
+ /**
+ * Sets the state of the regular expression flag.
+ * @param regexp True if regular expression searches should be
+ * performed
+ */
+ public static void setRegexp(boolean regexp)
+ {
+ if(regexp == SearchAndReplace.regexp)
+ return;
+
+ SearchAndReplace.regexp = regexp;
+ if(regexp && reverse)
+ reverse = false;
+
+ matcher = null;
+
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ getRegexp() method
+ /**
+ * Returns the state of the regular expression flag.
+ * @return True if regular expression searches should be performed
+ */
+ public static boolean getRegexp()
+ {
+ return regexp;
+ } //}}}
+
+ //{{{ setReverseSearch() method
+ /**
+ * Determines whether a reverse search will conducted from the current
+ * position to the beginning of a buffer. Note that reverse search and
+ * regular expression search is mutually exclusive; enabling one will
+ * disable the other.
+ * @param reverse True if searches should go backwards,
+ * false otherwise
+ */
+ public static void setReverseSearch(boolean reverse)
+ {
+ if(reverse == SearchAndReplace.reverse)
+ return;
+
+ SearchAndReplace.reverse = reverse;
+
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ getReverseSearch() method
+ /**
+ * Returns the state of the reverse search flag.
+ * @return True if searches should go backwards,
+ * false otherwise
+ */
+ public static boolean getReverseSearch()
+ {
+ return reverse;
+ } //}}}
+
+ //{{{ setBeanShellReplace() method
+ /**
+ * Sets the state of the BeanShell replace flag.
+ * @param beanshell True if the replace string is a BeanShell expression
+ * @since jEdit 3.2pre2
+ */
+ public static void setBeanShellReplace(boolean beanshell)
+ {
+ if(beanshell == SearchAndReplace.beanshell)
+ return;
+
+ SearchAndReplace.beanshell = beanshell;
+
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ getBeanShellReplace() method
+ /**
+ * Returns the state of the BeanShell replace flag.
+ * @return True if the replace string is a BeanShell expression
+ * @since jEdit 3.2pre2
+ */
+ public static boolean getBeanShellReplace()
+ {
+ return beanshell;
+ } //}}}
+
+ //{{{ setAutoWrap() method
+ /**
+ * Sets the state of the auto wrap around flag.
+ * @param wrap If true, the 'continue search from start' dialog
+ * will not be displayed
+ * @since jEdit 3.2pre2
+ */
+ public static void setAutoWrapAround(boolean wrap)
+ {
+ if(wrap == SearchAndReplace.wrap)
+ return;
+
+ SearchAndReplace.wrap = wrap;
+
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ getAutoWrap() method
+ /**
+ * Returns the state of the auto wrap around flag.
+ * @since jEdit 3.2pre2
+ */
+ public static boolean getAutoWrapAround()
+ {
+ return wrap;
+ } //}}}
+
+ //{{{ setSearchMatcher() method
+ /**
+ * Sets a custom search string matcher. Note that calling
+ * {@link #setSearchString(String)},
+ * {@link #setIgnoreCase(boolean)}, or {@link #setRegexp(boolean)}
+ * will reset the matcher to the default.
+ */
+ public static void setSearchMatcher(SearchMatcher matcher)
+ {
+ SearchAndReplace.matcher = matcher;
+
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ getSearchMatcher() method
+ /**
+ * Returns the current search string matcher.
+ * @return a SearchMatcher or null if there is no search or if the matcher can match empty String
+ *
+ * @exception IllegalArgumentException if regular expression search
+ * is enabled, the search string or replacement string is invalid
+ * @since jEdit 4.1pre7
+ */
+ public static SearchMatcher getSearchMatcher()
+ throws Exception {
+ if (matcher != null)
+ return matcher;
+
+ if (search == null || "".equals(search))
+ return null;
+
+ if (regexp)
+ {
+ Pattern re = Pattern.compile(search,
+ PatternSearchMatcher.getFlag(ignoreCase));
+ matcher = new PatternSearchMatcher(re, ignoreCase);
+ }
+ else
+ matcher = new BoyerMooreSearchMatcher(search, ignoreCase);
+
+ return matcher;
+ } //}}}
+
+ //{{{ setSearchFileSet() method
+ /**
+ * Sets the current search file set.
+ * @param fileset The file set to perform searches in
+ * @see AllBufferSet
+ * @see CurrentBufferSet
+ * @see DirectoryListSet
+ */
+ public static void setSearchFileSet(SearchFileSet fileset)
+ {
+ SearchAndReplace.fileset = fileset;
+
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ getSearchFileSet() method
+ /**
+ * Returns the current search file set.
+ */
+ public static SearchFileSet getSearchFileSet()
+ {
+ return fileset;
+ } //}}}
+
+ //{{{ getSmartCaseReplace() method
+ /**
+ * Returns if the replacement string will assume the same case as
+ * each specific occurrence of the search string.
+ * @since jEdit 4.2pre10
+ */
+ public static boolean getSmartCaseReplace()
+ {
+ return (replace != null
+ && TextUtilities.getStringCase(replace)
+ == TextUtilities.LOWER_CASE);
+ } //}}}
+
+ //}}}
+
+ //{{{ Actions
+
+ //{{{ hyperSearch() method
+ /**
+ * Performs a HyperSearch.
+ * @param view The view
+ * @since jEdit 2.7pre3
+ */
+ public static boolean hyperSearch(View view)
+ {
+ return hyperSearch(view,false);
+ } //}}}
+
+ //{{{ hyperSearch() method
+ /**
+ * Performs a HyperSearch.
+ * @param view The view
+ * @param selection If true, will only search in the current selection.
+ * Note that the file set must be the current buffer file set for this
+ * to work.
+ * @since jEdit 4.0pre1
+ */
+ public static boolean hyperSearch(View view, boolean selection)
+ {
+ // component that will parent any dialog boxes
+ Component comp = SearchDialog.getSearchDialog(view);
+ if(comp == null)
+ comp = view;
+
+ record(view,"hyperSearch(view," + selection + ')',false,
+ !selection);
+
+ view.getDockableWindowManager().addDockableWindow(
+ HyperSearchResults.NAME);
+ HyperSearchResults results = (HyperSearchResults)
+ view.getDockableWindowManager()
+ .getDockable(HyperSearchResults.NAME);
+ results.searchStarted();
+
+ try
+ {
+ SearchMatcher matcher = getSearchMatcher();
+ if(matcher == null)
+ {
+ view.getToolkit().beep();
+ results.searchFailed();
+ return false;
+ }
+
+ Selection[] s;
+ if(selection)
+ {
+ s = view.getTextArea().getSelection();
+ if(s == null)
+ {
+ results.searchFailed();
+ return false;
+ }
+ }
+ else
+ s = null;
+ ThreadUtilities.runInBackground(
+ new HyperSearchRequest(view,
+ matcher,results,s));
+ return true;
+ }
+ catch(Exception e)
+ {
+ results.searchFailed();
+ handleError(comp,e);
+ return false;
+ }
+ } //}}}
+
+ //{{{ find() method
+ /**
+ * Finds the next occurrence of the search string.
+ * @param view The view
+ * @return True if the operation was successful, false otherwise
+ */
+ public static boolean find(View view)
+ {
+ // component that will parent any dialog boxes
+ Component comp = SearchDialog.getSearchDialog(view);
+ if(comp == null || !comp.isShowing())
+ comp = view;
+
+ String path = fileset.getNextFile(view,null);
+ if(path == null)
+ {
+ GUIUtilities.error(comp,"empty-fileset",null);
+ return false;
+ }
+
+ boolean _reverse = reverse && fileset instanceof CurrentBufferSet;
+
+ try
+ {
+ view.showWaitCursor();
+
+ SearchMatcher matcher = getSearchMatcher();
+ if(matcher == null)
+ {
+ view.getToolkit().beep();
+ return false;
+ }
+
+ record(view,"find(view)",false,true);
+
+ boolean repeat = false;
+loop: for(;;)
+ {
+ while(path != null)
+ {
+ Buffer buffer = jEdit.openTemporary(
+ view,null,path,false);
+
+ /* this is stupid and misleading.
+ * but 'path' is not used anywhere except
+ * the above line, and if this is done
+ * after the 'continue', then we will
+ * either hang, or be forced to duplicate
+ * it inside the buffer == null, or add
+ * a 'finally' clause. you decide which one's
+ * worse. */
+ path = fileset.getNextFile(view,path);
+
+ if(buffer == null)
+ continue loop;
+
+ // Wait for the buffer to load
+ if(!buffer.isLoaded())
+ VFSManager.waitForRequests();
+
+ int start;
+
+ if(view.getBuffer() == buffer && !repeat)
+ {
+ JEditTextArea textArea = view.getTextArea();
+ Selection s = textArea.getSelectionAtOffset(
+ textArea.getCaretPosition());
+ if(s == null)
+ start = textArea.getCaretPosition();
+ else if(_reverse)
+ start = s.getStart();
+ else
+ start = s.getEnd();
+ }
+ else if(_reverse)
+ start = buffer.getLength();
+ else
+ start = 0;
+
+ if(find(view,buffer,start,repeat,_reverse))
+ return true;
+ }
+
+ if(repeat)
+ {
+ if(!BeanShell.isScriptRunning())
+ {
+ view.getStatus().setMessageAndClear(
+ jEdit.getProperty("view.status.search-not-found"));
+
+ view.getToolkit().beep();
+ }
+ return false;
+ }
+
+ boolean restart;
+
+ // if auto wrap is on, always restart search.
+ // if auto wrap is off, and we're called from
+ // a macro, stop search. If we're called
+ // interactively, ask the user what to do.
+ if(wrap)
+ {
+ if(!BeanShell.isScriptRunning())
+ {
+ view.getStatus().setMessageAndClear(
+ jEdit.getProperty("view.status.auto-wrap"));
+ // beep if beep property set
+ if(jEdit.getBooleanProperty("search.beepOnSearchAutoWrap"))
+ {
+ view.getToolkit().beep();
+ }
+ }
+ restart = true;
+ }
+ else if(BeanShell.isScriptRunning())
+ {
+ restart = false;
+ }
+ else
+ {
+ Integer[] args = {Integer.valueOf(_reverse ? 1 : 0)};
+ int result = GUIUtilities.confirm(comp,
+ "keepsearching",args,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ restart = (result == JOptionPane.YES_OPTION);
+ }
+
+ if(restart)
+ {
+ // start search from beginning
+ path = fileset.getFirstFile(view);
+ repeat = true;
+ }
+ else
+ break loop;
+ }
+ }
+ catch(Exception e)
+ {
+ handleError(comp,e);
+ }
+ finally
+ {
+ view.hideWaitCursor();
+ }
+
+ return false;
+ } //}}}
+
+ //{{{ find() method
+ /**
+ * Finds the next instance of the search string in the specified
+ * buffer.
+ * @param view The view
+ * @param buffer The buffer
+ * @param start Location where to start the search
+ */
+ public static boolean find(View view, Buffer buffer, int start)
+ throws Exception
+ {
+ return find(view,buffer,start,false,false);
+ } //}}}
+
+ //{{{ find() method
+ /**
+ * Finds the next instance of the search string in the specified
+ * buffer.
+ * @param view The view
+ * @param buffer The buffer
+ * @param start Location where to start the search
+ * @param firstTime See {@link SearchMatcher#nextMatch(CharSequence,boolean,boolean,boolean,boolean)}.
+ * @since jEdit 4.1pre7
+ */
+ public static boolean find(View view, Buffer buffer, int start,
+ boolean firstTime, boolean reverse) throws Exception
+ {
+
+ EditBus.send(new PositionChanging(view.getEditPane()));
+
+ SearchMatcher matcher = getSearchMatcher();
+ if(matcher == null)
+ {
+ view.getToolkit().beep();
+ return false;
+ }
+
+ CharSequence text;
+ boolean startOfLine;
+ boolean endOfLine;
+ if(reverse)
+ {
+ text = new ReverseCharSequence(buffer.getSegment(0,start));
+ startOfLine = true;
+ endOfLine = (buffer.getLineEndOffset(
+ buffer.getLineOfOffset(start)) - 1 == start);
+ }
+ else
+ {
+ text = buffer.getSegment(start,buffer.getLength() - start);
+ startOfLine = (buffer.getLineStartOffset(
+ buffer.getLineOfOffset(start)) == start);
+ endOfLine = true;
+ }
+ SearchMatcher.Match match = matcher.nextMatch(text,
+ startOfLine,endOfLine,firstTime,reverse);
+ if(match != null)
+ {
+ jEdit.commitTemporary(buffer);
+ view.setBuffer(buffer,true);
+ JEditTextArea textArea = view.getTextArea();
+
+ if(reverse)
+ {
+ textArea.setSelection(new Selection.Range(
+ start - match.end,
+ start - match.start));
+ // make sure end of match is visible
+ textArea.scrollTo(start - match.start,false);
+ textArea.moveCaretPosition(start - match.end);
+ }
+ else
+ {
+ textArea.setSelection(new Selection.Range(
+ start + match.start,
+ start + match.end));
+ textArea.moveCaretPosition(start + match.end);
+ // make sure start of match is visible
+ textArea.scrollTo(start + match.start,false);
+ }
+
+ return true;
+ }
+ else
+ return false;
+ } //}}}
+
+ //{{{ replace() method
+ /**
+ * Replaces the current selection with the replacement string.
+ * @param view The view
+ * @return True if the operation was successful, false otherwise
+ */
+ public static boolean replace(View view)
+ {
+ // component that will parent any dialog boxes
+ Component comp = SearchDialog.getSearchDialog(view);
+ if(comp == null)
+ comp = view;
+
+ JEditTextArea textArea = view.getTextArea();
+
+ Buffer buffer = view.getBuffer();
+ if(!buffer.isEditable())
+ return false;
+
+ boolean smartCaseReplace = getSmartCaseReplace();
+
+ Selection[] selection = textArea.getSelection();
+ if (selection.length == 0)
+ {
+ view.getToolkit().beep();
+ return false;
+ }
+
+ record(view,"replace(view)",true,false);
+
+ // a little hack for reverse replace and find
+ int caret = textArea.getCaretPosition();
+ Selection s = textArea.getSelectionAtOffset(caret);
+ if(s != null)
+ caret = s.getStart();
+
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ SearchMatcher matcher = getSearchMatcher();
+ if(matcher == null)
+ return false;
+
+ initReplace();
+
+ int retVal = 0;
+
+ for(int i = 0; i < selection.length; i++)
+ {
+ s = selection[i];
+
+ retVal += replaceInSelection(view,textArea,
+ buffer,matcher,smartCaseReplace,s);
+ }
+
+ boolean _reverse = !regexp && reverse && fileset instanceof CurrentBufferSet;
+ if(_reverse)
+ {
+ // so that Replace and Find continues from
+ // the right location
+ textArea.moveCaretPosition(caret);
+ }
+ else
+ {
+ s = textArea.getSelectionAtOffset(
+ textArea.getCaretPosition());
+ if(s != null)
+ textArea.moveCaretPosition(s.getEnd());
+ }
+
+ if(!BeanShell.isScriptRunning())
+ {
+ Object[] args = {Integer.valueOf(retVal),
+ Integer.valueOf(1)};
+ view.getStatus().setMessageAndClear(jEdit.getProperty(
+ "view.status.replace-all",args));
+ }
+
+ if(retVal == 0)
+ {
+ view.getToolkit().beep();
+ return false;
+ }
+
+ return true;
+ }
+ catch(Exception e)
+ {
+ handleError(comp,e);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ return false;
+ } //}}}
+
+ //{{{ replace() method
+ /**
+ * Replaces text in the specified range with the replacement string.
+ * @param view The view
+ * @param buffer The buffer
+ * @param start The start offset
+ * @param end The end offset
+ * @return True if the operation was successful, false otherwise
+ */
+ public static boolean replace(View view, Buffer buffer, int start, int end)
+ {
+ if(!buffer.isEditable())
+ return false;
+
+ // component that will parent any dialog boxes
+ Component comp = SearchDialog.getSearchDialog(view);
+ if(comp == null)
+ comp = view;
+
+ boolean smartCaseReplace = getSmartCaseReplace();
+
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ SearchMatcher matcher = getSearchMatcher();
+ if(matcher == null)
+ return false;
+
+ initReplace();
+
+ int retVal = 0;
+
+ retVal += _replace(view,buffer,matcher,start,end,
+ smartCaseReplace);
+
+ if(retVal != 0)
+ return true;
+ }
+ catch(Exception e)
+ {
+ handleError(comp,e);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ return false;
+ } //}}}
+
+ //{{{ replaceAll() method
+ /**
+ * Replaces all occurrences of the search string with the replacement
+ * string.
+ * @param view The view
+ * @return the number of modified files
+ */
+ public static boolean replaceAll(View view)
+ {
+ return replaceAll(view,false);
+ } //}}}
+
+ //{{{ replaceAll() method
+ /**
+ * Replaces all occurrences of the search string with the replacement
+ * string.
+ * @param view The view
+ * @param dontOpenChangedFiles Whether to open changed files or to autosave them quietly
+ * @return the number of modified files
+ */
+ public static boolean replaceAll(View view, boolean dontOpenChangedFiles)
+ {
+ // component that will parent any dialog boxes
+ Component comp = SearchDialog.getSearchDialog(view);
+ if(comp == null)
+ comp = view;
+
+ if(fileset.getFileCount(view) == 0)
+ {
+ GUIUtilities.error(comp,"empty-fileset",null);
+ return false;
+ }
+
+ record(view,"replaceAll(view)",true,true);
+
+ view.showWaitCursor();
+
+ boolean smartCaseReplace = (replace != null
+ && TextUtilities.getStringCase(replace)
+ == TextUtilities.LOWER_CASE);
+
+ int fileCount = 0;
+ int occurCount = 0;
+ try
+ {
+ SearchMatcher matcher = getSearchMatcher();
+ if(matcher == null)
+ return false;
+
+ initReplace();
+
+ String path = fileset.getFirstFile(view);
+loop: while(path != null)
+ {
+ Buffer buffer = jEdit.openTemporary(
+ view,null,path,false);
+
+ /* this is stupid and misleading.
+ * but 'path' is not used anywhere except
+ * the above line, and if this is done
+ * after the 'continue', then we will
+ * either hang, or be forced to duplicate
+ * it inside the buffer == null, or add
+ * a 'finally' clause. you decide which one's
+ * worse. */
+ path = fileset.getNextFile(view,path);
+
+ if(buffer == null)
+ continue loop;
+
+ // Wait for buffer to finish loading
+ if(buffer.isPerformingIO())
+ VFSManager.waitForRequests();
+
+ if(!buffer.isEditable())
+ continue loop;
+
+ // Leave buffer in a consistent state if
+ // an error occurs
+ int retVal = 0;
+
+ try
+ {
+ buffer.beginCompoundEdit();
+ retVal = _replace(view,buffer,matcher,
+ 0,buffer.getLength(),
+ smartCaseReplace);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ if(retVal != 0)
+ {
+ fileCount++;
+ occurCount += retVal;
+ if (dontOpenChangedFiles)
+ {
+ buffer.save(null,null);
+ }
+ else
+ {
+ jEdit.commitTemporary(buffer);
+ jEdit.getBufferSetManager().addBuffer(view, buffer);
+ }
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ handleError(comp,e);
+ }
+ finally
+ {
+ view.hideWaitCursor();
+ }
+
+ /* Don't do this when playing a macro, cos it's annoying */
+ if(!BeanShell.isScriptRunning())
+ {
+ Object[] args = {Integer.valueOf(occurCount),
+ Integer.valueOf(fileCount)};
+ view.getStatus().setMessageAndClear(jEdit.getProperty(
+ "view.status.replace-all",args));
+ if(occurCount == 0)
+ view.getToolkit().beep();
+ }
+
+ return (fileCount != 0);
+ } //}}}
+
+ //}}}
+
+ //{{{ escapeRegexp() method
+ /**
+ * Escapes characters with special meaning in a regexp.
+ * @param str the string to escape
+ * @param multiline Should \n be escaped?
+ * @return the string with escaped characters
+ * @since jEdit 4.3pre1
+ */
+ public static String escapeRegexp(String str, boolean multiline)
+ {
+ return StandardUtilities.charsToEscapes(str,
+ "\r\t\\()[]{}$^*+?|."
+ + (multiline ? "" : "\n"));
+ } //}}}
+
+ //{{{ load() method
+ /**
+ * Loads search and replace state from the properties.
+ */
+ public static void load()
+ {
+ search = jEdit.getProperty("search.find.value");
+ replace = jEdit.getProperty("search.replace.value");
+ ignoreCase = jEdit.getBooleanProperty("search.ignoreCase.toggle");
+ regexp = jEdit.getBooleanProperty("search.regexp.toggle");
+ beanshell = jEdit.getBooleanProperty("search.beanshell.toggle");
+ wrap = jEdit.getBooleanProperty("search.wrap.toggle");
+
+ fileset = new CurrentBufferSet();
+
+ // Tags plugin likes to call this method at times other than
+ // startup; so we need to fire a SearchSettingsChanged to
+ // notify the search bar and so on.
+ matcher = null;
+ EditBus.send(new SearchSettingsChanged(null));
+ } //}}}
+
+ //{{{ save() method
+ /**
+ * Saves search and replace state to the properties.
+ */
+ public static void save()
+ {
+ jEdit.setProperty("search.find.value",search);
+ jEdit.setProperty("search.replace.value",replace);
+ jEdit.setBooleanProperty("search.ignoreCase.toggle",ignoreCase);
+ jEdit.setBooleanProperty("search.regexp.toggle",regexp);
+ jEdit.setBooleanProperty("search.beanshell.toggle",beanshell);
+ jEdit.setBooleanProperty("search.wrap.toggle",wrap);
+ } //}}}
+
+ //{{{ handleError() method
+ static void handleError(Component comp, Exception e)
+ {
+ Log.log(Log.ERROR,SearchAndReplace.class,e);
+ if(comp instanceof Dialog)
+ {
+ new TextAreaDialog((Dialog)comp,
+ beanshell ? "searcherror-bsh"
+ : "searcherror",e);
+ }
+ else
+ {
+ new TextAreaDialog((Frame)comp,
+ beanshell ? "searcherror-bsh"
+ : "searcherror",e);
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private static String search;
+ private static String replace;
+ private static BshMethod replaceMethod;
+ private static NameSpace replaceNS = new NameSpace(
+ BeanShell.getNameSpace(),
+ BeanShell.getNameSpace().getClassManager(),
+ "search and replace");
+ private static boolean regexp;
+ private static boolean ignoreCase;
+ private static boolean reverse;
+ private static boolean beanshell;
+ private static boolean wrap;
+ private static SearchMatcher matcher;
+ private static SearchFileSet fileset;
+ //}}}
+
+ //{{{ initReplace() method
+ /**
+ * Set up BeanShell replace if necessary.
+ */
+ private static void initReplace() throws Exception
+ {
+ if(beanshell && replace.length() != 0)
+ {
+ replaceMethod = BeanShell.cacheBlock("replace",
+ "return (" + replace + ");",true);
+ }
+ else
+ replaceMethod = null;
+ } //}}}
+
+ //{{{ record() method
+ private static void record(View view, String action,
+ boolean replaceAction, boolean recordFileSet)
+ {
+ Macros.Recorder recorder = view.getMacroRecorder();
+
+ if(recorder != null)
+ {
+ recorder.record("SearchAndReplace.setSearchString(\""
+ + StandardUtilities.charsToEscapes(search) + "\");");
+
+ if(replaceAction)
+ {
+ recorder.record("SearchAndReplace.setReplaceString(\""
+ + StandardUtilities.charsToEscapes(replace) + "\");");
+ recorder.record("SearchAndReplace.setBeanShellReplace("
+ + beanshell + ");");
+ }
+ else
+ {
+ // only record this if doing a find next
+ recorder.record("SearchAndReplace.setAutoWrapAround("
+ + wrap + ");");
+ recorder.record("SearchAndReplace.setReverseSearch("
+ + reverse + ");");
+ }
+
+ recorder.record("SearchAndReplace.setIgnoreCase("
+ + ignoreCase + ");");
+ recorder.record("SearchAndReplace.setRegexp("
+ + regexp + ");");
+
+ if(recordFileSet)
+ {
+ recorder.record("SearchAndReplace.setSearchFileSet("
+ + fileset.getCode() + ");");
+ }
+
+ recorder.record("SearchAndReplace." + action + ';');
+ }
+ } //}}}
+
+ //{{{ replaceInSelection() method
+ private static int replaceInSelection(View view, TextArea textArea,
+ Buffer buffer, SearchMatcher matcher, boolean smartCaseReplace,
+ Selection s) throws Exception
+ {
+ /* if an occurence occurs at the
+ beginning of the selection, the
+ selection start will get moved.
+ this sucks, so we hack to avoid it. */
+ int start = s.getStart();
+
+ int returnValue;
+
+ if(s instanceof Selection.Range)
+ {
+ returnValue = _replace(view,buffer,matcher,
+ s.getStart(),s.getEnd(),
+ smartCaseReplace);
+
+ textArea.removeFromSelection(s);
+ textArea.addToSelection(new Selection.Range(
+ start,s.getEnd()));
+ }
+ else if(s instanceof Selection.Rect)
+ {
+ Selection.Rect rect = (Selection.Rect)s;
+ int startCol = rect.getStartColumn(
+ buffer);
+ int endCol = rect.getEndColumn(
+ buffer);
+
+ returnValue = 0;
+ for(int j = s.getStartLine(); j <= s.getEndLine(); j++)
+ {
+ returnValue += _replace(view,buffer,matcher,
+ getColumnOnOtherLine(buffer,j,startCol),
+ getColumnOnOtherLine(buffer,j,endCol),
+ smartCaseReplace);
+ }
+ textArea.addToSelection(new Selection.Rect(
+ start,s.getEnd()));
+ }
+ else
+ throw new RuntimeException("Unsupported: " + s);
+
+ return returnValue;
+ } //}}}
+
+ //{{{ _replace() method
+ /**
+ * Replaces all occurrences of the search string with the replacement
+ * string.
+ * @param view The view
+ * @param buffer The buffer
+ * @param start The start offset
+ * @param end The end offset
+ * @param matcher The search matcher to use
+ * @param smartCaseReplace See user's guide
+ * @return The number of occurrences replaced
+ */
+ private static int _replace(View view, JEditBuffer buffer,
+ SearchMatcher matcher, int start, int end,
+ boolean smartCaseReplace)
+ throws Exception
+ {
+ int occurCount = 0;
+
+ boolean endOfLine = (buffer.getLineEndOffset(
+ buffer.getLineOfOffset(end)) - 1 == end);
+
+ int offset = start;
+loop: for(int counter = 0; ; counter++)
+ {
+ boolean startOfLine = (buffer.getLineStartOffset(
+ buffer.getLineOfOffset(offset)) == offset);
+
+ CharSequence text = buffer.getSegment(offset,end - offset);
+ SearchMatcher.Match occur = matcher.nextMatch(
+ text,startOfLine,endOfLine,counter == 0,false);
+ if(occur == null)
+ break loop;
+
+ CharSequence found = text.subSequence(
+ occur.start, occur.end);
+
+ int length = replaceOne(view,buffer,occur,offset,
+ found,smartCaseReplace);
+ if(length == -1)
+ offset += occur.end;
+ else
+ {
+ offset += occur.start + length;
+ end += (length - found.length());
+ occurCount++;
+ }
+ }
+
+ return occurCount;
+ } //}}}
+
+ //{{{ replaceOne() method
+ /**
+ * Replace one occurrence of the search string with the
+ * replacement string.
+ */
+ private static int replaceOne(View view, JEditBuffer buffer,
+ SearchMatcher.Match occur, int offset, CharSequence found,
+ boolean smartCaseReplace)
+ throws Exception
+ {
+ String subst = replaceOne(view,buffer,occur,found);
+ if(smartCaseReplace && ignoreCase)
+ {
+ int strCase = TextUtilities.getStringCase(found);
+ if(strCase == TextUtilities.LOWER_CASE)
+ subst = subst.toLowerCase();
+ else if(strCase == TextUtilities.UPPER_CASE)
+ subst = subst.toUpperCase();
+ else if(strCase == TextUtilities.TITLE_CASE)
+ subst = TextUtilities.toTitleCase(subst);
+ }
+
+ if(subst != null)
+ {
+ int start = offset + occur.start;
+ int end = offset + occur.end;
+
+ if (end - start > 0)
+ buffer.remove(start,end - start);
+ buffer.insert(start,subst);
+ return subst.length();
+ }
+ else
+ return -1;
+ } //}}}
+
+ //{{{ replaceOne() method
+ private static String replaceOne(View view, JEditBuffer buffer,
+ SearchMatcher.Match occur, CharSequence found)
+ throws Exception
+ {
+ if(regexp)
+ {
+ if(replaceMethod != null)
+ return regexpBeanShellReplace(view,buffer,occur);
+ else
+ return regexpReplace(occur,found);
+ }
+ else
+ {
+ if(replaceMethod != null)
+ return literalBeanShellReplace(view,buffer,found);
+ else
+ return replace;
+ }
+ } //}}}
+
+ //{{{ regexpBeanShellReplace() method
+ private static String regexpBeanShellReplace(View view,
+ JEditBuffer buffer, SearchMatcher.Match occur) throws Exception
+ {
+ replaceNS.setVariable("buffer", buffer, false);
+ for(int i = 0; i < occur.substitutions.length; i++)
+ {
+ replaceNS.setVariable("_" + i,
+ occur.substitutions[i]);
+ }
+
+ Object obj = BeanShell.runCachedBlock(
+ replaceMethod,view,replaceNS);
+
+ for(int i = 0; i < occur.substitutions.length; i++)
+ {
+ replaceNS.setVariable("_" + i,
+ null, false);
+ }
+ // Not really necessary because it is already cleared in the end of
+ // BeanShell.runCachedBlock()
+ replaceNS.setVariable("buffer", null, false);
+
+ if(obj == null)
+ return "";
+ else
+ return obj.toString();
+ } //}}}
+
+ //{{{ regexpReplace() method
+ private static String regexpReplace(SearchMatcher.Match occur,
+ CharSequence found) throws Exception
+ {
+ StringBuilder buf = new StringBuilder();
+
+ for(int i = 0; i < replace.length(); i++)
+ {
+ char ch = replace.charAt(i);
+ switch(ch)
+ {
+ case '$':
+ if(i == replace.length() - 1)
+ {
+ // last character of the replace string,
+ // it is not a capturing group
+ buf.append(ch);
+ break;
+ }
+
+ ch = replace.charAt(++i);
+ if(ch == '$')
+ {
+ // It was $$, so it is an escaped $
+ buf.append('$');
+ }
+ else if(ch == '0')
+ {
+ // $0 meaning the first capturing group :
+ // the found value
+ buf.append(found);
+ }
+ else if(Character.isDigit(ch))
+ {
+ int n = ch - '0';
+ while (i < replace.length() - 1)
+ {
+ ch = replace.charAt(++i);
+ if (Character.isDigit(ch))
+ {
+ n = n * 10 + (ch - '0');
+ }
+ else
+ {
+ // The character is not
+ // a digit, going back and
+ // end loop
+ i--;
+ break;
+ }
+ }
+ if(n < occur
+ .substitutions
+ .length)
+ {
+ String subs = occur.substitutions[n];
+ if (subs != null)
+ buf.append(subs);
+ }
+ }
+ break;
+ case '\\':
+ if(i == replace.length() - 1)
+ {
+ buf.append('\\');
+ break;
+ }
+ ch = replace.charAt(++i);
+ switch(ch)
+ {
+ case 'n':
+ buf.append('\n');
+ break;
+ case 't':
+ buf.append('\t');
+ break;
+ default:
+ buf.append(ch);
+ break;
+ }
+ break;
+ default:
+ buf.append(ch);
+ break;
+ }
+ }
+
+ return buf.toString();
+ } //}}}
+
+ //{{{ literalBeanShellReplace() method
+ private static String literalBeanShellReplace(View view,
+ JEditBuffer buffer, CharSequence found)
+ throws Exception
+ {
+ replaceNS.setVariable("buffer",buffer);
+ replaceNS.setVariable("_0",found);
+ Object obj = BeanShell.runCachedBlock(
+ replaceMethod,
+ view,replaceNS);
+
+ replaceNS.setVariable("_0", null, false);
+ // Not really necessary because it is already cleared in the end of
+ // BeanShell.runCachedBlock()
+ replaceNS.setVariable("buffer", null, false);
+
+ if(obj == null)
+ return "";
+ else
+ return obj.toString();
+ } //}}}
+
+ //{{{ getColumnOnOtherLine() method
+ /**
+ * Should be somewhere else...
+ */
+ private static int getColumnOnOtherLine(Buffer buffer, int line,
+ int col)
+ {
+ int returnValue = buffer.getOffsetOfVirtualColumn(
+ line,col,null);
+ if(returnValue == -1)
+ return buffer.getLineEndOffset(line) - 1;
+ else
+ return buffer.getLineStartOffset(line) + returnValue;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/SearchBar.java b/jEdit/org/gjt/sp/jedit/search/SearchBar.java
index 65e6108..55561b2 100644
--- a/jEdit/org/gjt/sp/jedit/search/SearchBar.java
+++ b/jEdit/org/gjt/sp/jedit/search/SearchBar.java
@@ -1,474 +1,474 @@
-/*
- * SearchBar.java - Search & replace toolbar
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import java.awt.event.*;
-import java.awt.*;
-import javax.swing.event.*;
-import javax.swing.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.syntax.SyntaxStyle;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Incremental search tool bar.
- * @version $Id: SearchBar.java 13400 2008-08-23 07:51:57Z k_satoda $
- */
-public class SearchBar extends JToolBar
-{
- //{{{ SearchBar constructor
- public SearchBar(final View view, boolean temp)
- {
- this.view = view;
-
- setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
-
- setFloatable(false);
- add(Box.createHorizontalStrut(2));
-
- JLabel label = new JLabel(jEdit.getProperty("view.search.find"));
- add(label);
-
- add(Box.createHorizontalStrut(12));
-
- add(find = new HistoryTextField("find"));
- find.setSelectAllOnFocus(true);
-
- SyntaxStyle style = GUIUtilities.parseStyle(jEdit.getProperty("view.style.invalid"), "Dialog", 12);
- errorBackground = style.getBackgroundColor();
- errorForeground = style.getForegroundColor();
- defaultBackground = find.getBackground();
- defaultForeground = find.getForeground();
- Dimension max = find.getPreferredSize();
- max.width = Integer.MAX_VALUE;
- find.setMaximumSize(max);
- ActionHandler actionHandler = new ActionHandler();
- find.addKeyListener(new KeyHandler());
- find.addActionListener(actionHandler);
- find.getDocument().addDocumentListener(new DocumentHandler());
-
- Insets margin = new Insets(1,1,1,1);
-
- addSeparator(new Dimension(12, 12));
-
- add(ignoreCase = new JCheckBox(jEdit.getProperty(
- "search.case")));
- ignoreCase.addActionListener(actionHandler);
- ignoreCase.setMargin(margin);
- ignoreCase.setOpaque(false);
- ignoreCase.setRequestFocusEnabled(false);
- add(Box.createHorizontalStrut(2));
-
- add(regexp = new JCheckBox(jEdit.getProperty(
- "search.regexp")));
- regexp.addActionListener(actionHandler);
- regexp.setMargin(margin);
- regexp.setOpaque(false);
- regexp.setRequestFocusEnabled(false);
- add(Box.createHorizontalStrut(2));
-
- add(hyperSearch = new JCheckBox(jEdit.getProperty(
- "search.hypersearch")));
- hyperSearch.addActionListener(actionHandler);
- hyperSearch.setMargin(margin);
- hyperSearch.setOpaque(false);
- hyperSearch.setRequestFocusEnabled(false);
-
- update();
-
- //{{{ Create the timer used by incremental search
- timer = new Timer(0,new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(!incrementalSearch(searchStart,searchReverse))
- {
- if(!incrementalSearch(
- (searchReverse
- ? view.getBuffer().getLength()
- : 0),searchReverse))
- {
- // not found at all.
- view.getStatus().setMessageAndClear(
- jEdit.getProperty(
- "view.status.search-not-found"));
- }
- }
- }
- }); //}}}
-
- // if 'temp' is true, hide search bar after user is done with it
- this.isRemovable = temp;
-
- setCloseButtonVisibility();
- } //}}}
-
- //{{{ getField() method
- public HistoryTextField getField()
- {
- return find;
- } //}}}
-
- //{{{ setHyperSearch() method
- public void setHyperSearch(boolean hyperSearch)
- {
- jEdit.setBooleanProperty("view.search.hypersearch.toggle",hyperSearch);
- this.hyperSearch.setSelected(hyperSearch);
- } //}}}
-
- //{{{ update() method
- public void update()
- {
- ignoreCase.setSelected(SearchAndReplace.getIgnoreCase());
- regexp.setSelected(SearchAndReplace.getRegexp());
- hyperSearch.setSelected(jEdit.getBooleanProperty(
- "view.search.hypersearch.toggle"));
- } //}}}
-
- //{{{ propertiesChanged() method
- public void propertiesChanged()
- {
- // Option may have been changed
- isRemovable = !(jEdit.getBooleanProperty("view.showSearchbar"));
-
- Log.log(Log.DEBUG, this, "in SearchBar.propertiesChanged(), isRemovable = " + isRemovable);
-
- setCloseButtonVisibility();
-
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private View view;
- private HistoryTextField find;
- private JCheckBox ignoreCase, regexp, hyperSearch;
- private Timer timer;
- private boolean wasError;
- private Color defaultBackground;
- private Color defaultForeground;
- private Color errorForeground;
- private Color errorBackground;
- // close button only there if 'isRemovable' is true
- private RolloverButton close;
-
- private int searchStart;
- private boolean searchReverse;
- private boolean isRemovable;
- //}}}
-
- //{{{ find() method
- private void find(boolean reverse)
- {
- timer.stop();
-
- String text = find.getText();
- //{{{ If nothing entered, show search and replace dialog box
- if(text.length() == 0)
- {
- jEdit.setBooleanProperty("search.hypersearch.toggle",
- hyperSearch.isSelected());
- SearchDialog.showSearchDialog(view,null,SearchDialog.CURRENT_BUFFER);
- } //}}}
- //{{{ HyperSearch
- else if(hyperSearch.isSelected())
- {
- if(isRemovable)
- {
- view.removeToolBar(SearchBar.this);
- }
- else
- find.setText(null);
-
- SearchAndReplace.setSearchString(text);
- SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
- SearchAndReplace.hyperSearch(view);
- } //}}}
- //{{{ Incremental search
- else
- {
- // on enter, start search from end
- // of current match to find next one
- int start;
- JEditTextArea textArea = view.getTextArea();
- Selection s = textArea.getSelectionAtOffset(
- textArea.getCaretPosition());
- if(s == null)
- start = textArea.getCaretPosition();
- else if(reverse)
- start = s.getStart();
- else
- start = s.getEnd();
-
- if(!incrementalSearch(start,reverse))
- {
- // not found. start from
- // beginning
- if(!incrementalSearch(reverse
- ? view.getBuffer().getLength()
- : 0,reverse))
- {
- // not found at all.
- view.getStatus().setMessageAndClear(
- jEdit.getProperty(
- "view.status.search-not-found"));
- }
- else
- {
- // inform user search restarted
- view.getStatus().setMessageAndClear(
- jEdit.getProperty("view.status.auto-wrap"));
- // beep if beep property set
- if(jEdit.getBooleanProperty("search.beepOnSearchAutoWrap"))
- {
- getToolkit().beep();
- }
- }
- }
- } //}}}
- } //}}}
-
- //{{{ incrementalSearch() method
- private boolean incrementalSearch(int start, boolean reverse)
- {
- /* For example, if the current fileset is a directory,
- * C+g will find the next match within that fileset.
- * This can be annoying if you have just done an
- * incremental search and want the next occurrence
- * in the current buffer. */
- SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
- SearchAndReplace.setSearchString(find.getText());
- SearchAndReplace.setReverseSearch(reverse);
-
- boolean ret = false;
- try
- {
- if(SearchAndReplace.find(view,view.getBuffer(),start,false,reverse))
- ret = true;
- }
- catch(Exception e)
- {
- Log.log(Log.DEBUG,this,e);
-
- // invalid regexp, ignore
- // return true to avoid annoying beeping while
- // typing a re
- ret = true;
- }
- if (ret)
- {
- if (wasError)
- {
- find.setForeground(defaultForeground);
- find.setBackground(defaultBackground);
- wasError = false;
- }
- }
- else
- {
- if (!wasError)
- {
- find.setForeground(errorForeground);
- find.setBackground(errorBackground);
- wasError = true;
- }
- }
-
-
- return ret;
- } //}}}
-
- //{{{ timerIncrementalSearch() method
- private void timerIncrementalSearch(int start, boolean reverse)
- {
- searchStart = start;
- searchReverse = reverse;
-
- timer.stop();
- timer.setRepeats(false);
- timer.setInitialDelay(150);
- timer.start();
- } //}}}
-
- //{{{ setCloseButtonVisibility() method
- private void setCloseButtonVisibility()
- {
- if(isRemovable)
- {
- if(close == null)
- {
- close = new RolloverButton(GUIUtilities.loadIcon("closebox.gif"));
- close.addActionListener(new ActionHandler());
- close.setToolTipText(jEdit.getProperty(
- "view.search.close-tooltip"));
- }
- add(close);
- }
- else if(close != null)
- remove(close);
- }
- //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ ActionHandler class
- class ActionHandler implements ActionListener
- {
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
- if(source == find)
- find(false);
- else if(source == hyperSearch)
- {
- jEdit.setBooleanProperty("view.search.hypersearch.toggle",
- hyperSearch.isSelected());
- update();
- }
- else if(source == ignoreCase)
- {
- SearchAndReplace.setIgnoreCase(ignoreCase
- .isSelected());
- }
- else if(source == regexp)
- {
- SearchAndReplace.setRegexp(regexp
- .isSelected());
- }
- else if(source == close)
- {
- view.removeToolBar(SearchBar.this);
- view.getEditPane().focusOnTextArea();
- }
- } //}}}
- } //}}}
-
- //{{{ DocumentHandler class
- class DocumentHandler implements DocumentListener
- {
- //{{{ insertUpdate() method
- public void insertUpdate(DocumentEvent evt)
- {
- // on insert, start search from beginning of
- // current match. This will continue to highlight
- // the current match until another match is found
- if(!hyperSearch.isSelected())
- {
- int start;
- JEditTextArea textArea = view.getTextArea();
- Selection s = textArea.getSelectionAtOffset(
- textArea.getCaretPosition());
- if(s == null)
- start = textArea.getCaretPosition();
- else
- start = s.getStart();
-
- timerIncrementalSearch(start,false);
- }
- } //}}}
-
- //{{{ removeUpdate() method
- public void removeUpdate(DocumentEvent evt)
- {
- // on backspace, restart from beginning
- if(!hyperSearch.isSelected())
- {
- String text = find.getText();
- if(text.length() != 0)
- {
- // don't beep if not found.
- // subsequent beeps are very
- // annoying when backspacing an
- // invalid search string.
- if(regexp.isSelected())
- {
- // reverse regexp search
- // not supported yet, so
- // 'simulate' with restart
- timerIncrementalSearch(0,false);
- }
- else
- {
- int start;
- JEditTextArea textArea = view.getTextArea();
- Selection s = textArea.getSelectionAtOffset(
- textArea.getCaretPosition());
- if(s == null)
- start = textArea.getCaretPosition();
- else
- start = s.getStart();
- timerIncrementalSearch(start,true);
- }
- }
- }
- } //}}}
-
- //{{{ changedUpdate() method
- public void changedUpdate(DocumentEvent evt) {}
- //}}}
- } //}}}
-
- //{{{ KeyHandler class
- class KeyHandler extends KeyAdapter
- {
- public void keyPressed(KeyEvent evt)
- {
- switch(evt.getKeyCode())
- {
- case KeyEvent.VK_ESCAPE:
- if(isRemovable)
- {
- view.removeToolBar(SearchBar.this);
- }
- evt.consume();
- view.getEditPane().focusOnTextArea();
- break;
- case KeyEvent.VK_ENTER:
- if(evt.isShiftDown())
- {
- evt.consume();
- find(true);
- }
- break;
- }
- }
- } //}}}
-
- //{{{ FocusHandler class
- class FocusHandler extends FocusAdapter
- {
- public void focusLost(FocusEvent e)
- {
- getField().addCurrentToHistory();
- }
- } //}}}
-
- //}}}
-}
+/*
+ * SearchBar.java - Search & replace toolbar
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import java.awt.event.*;
+import java.awt.*;
+import javax.swing.event.*;
+import javax.swing.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.syntax.SyntaxStyle;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Incremental search tool bar.
+ * @version $Id: SearchBar.java 13400 2008-08-23 07:51:57Z k_satoda $
+ */
+public class SearchBar extends JToolBar
+{
+ //{{{ SearchBar constructor
+ public SearchBar(final View view, boolean temp)
+ {
+ this.view = view;
+
+ setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
+
+ setFloatable(false);
+ add(Box.createHorizontalStrut(2));
+
+ JLabel label = new JLabel(jEdit.getProperty("view.search.find"));
+ add(label);
+
+ add(Box.createHorizontalStrut(12));
+
+ add(find = new HistoryTextField("find"));
+ find.setSelectAllOnFocus(true);
+
+ SyntaxStyle style = GUIUtilities.parseStyle(jEdit.getProperty("view.style.invalid"), "Dialog", 12);
+ errorBackground = style.getBackgroundColor();
+ errorForeground = style.getForegroundColor();
+ defaultBackground = find.getBackground();
+ defaultForeground = find.getForeground();
+ Dimension max = find.getPreferredSize();
+ max.width = Integer.MAX_VALUE;
+ find.setMaximumSize(max);
+ ActionHandler actionHandler = new ActionHandler();
+ find.addKeyListener(new KeyHandler());
+ find.addActionListener(actionHandler);
+ find.getDocument().addDocumentListener(new DocumentHandler());
+
+ Insets margin = new Insets(1,1,1,1);
+
+ addSeparator(new Dimension(12, 12));
+
+ add(ignoreCase = new JCheckBox(jEdit.getProperty(
+ "search.case")));
+ ignoreCase.addActionListener(actionHandler);
+ ignoreCase.setMargin(margin);
+ ignoreCase.setOpaque(false);
+ ignoreCase.setRequestFocusEnabled(false);
+ add(Box.createHorizontalStrut(2));
+
+ add(regexp = new JCheckBox(jEdit.getProperty(
+ "search.regexp")));
+ regexp.addActionListener(actionHandler);
+ regexp.setMargin(margin);
+ regexp.setOpaque(false);
+ regexp.setRequestFocusEnabled(false);
+ add(Box.createHorizontalStrut(2));
+
+ add(hyperSearch = new JCheckBox(jEdit.getProperty(
+ "search.hypersearch")));
+ hyperSearch.addActionListener(actionHandler);
+ hyperSearch.setMargin(margin);
+ hyperSearch.setOpaque(false);
+ hyperSearch.setRequestFocusEnabled(false);
+
+ update();
+
+ //{{{ Create the timer used by incremental search
+ timer = new Timer(0,new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(!incrementalSearch(searchStart,searchReverse))
+ {
+ if(!incrementalSearch(
+ (searchReverse
+ ? view.getBuffer().getLength()
+ : 0),searchReverse))
+ {
+ // not found at all.
+ view.getStatus().setMessageAndClear(
+ jEdit.getProperty(
+ "view.status.search-not-found"));
+ }
+ }
+ }
+ }); //}}}
+
+ // if 'temp' is true, hide search bar after user is done with it
+ this.isRemovable = temp;
+
+ setCloseButtonVisibility();
+ } //}}}
+
+ //{{{ getField() method
+ public HistoryTextField getField()
+ {
+ return find;
+ } //}}}
+
+ //{{{ setHyperSearch() method
+ public void setHyperSearch(boolean hyperSearch)
+ {
+ jEdit.setBooleanProperty("view.search.hypersearch.toggle",hyperSearch);
+ this.hyperSearch.setSelected(hyperSearch);
+ } //}}}
+
+ //{{{ update() method
+ public void update()
+ {
+ ignoreCase.setSelected(SearchAndReplace.getIgnoreCase());
+ regexp.setSelected(SearchAndReplace.getRegexp());
+ hyperSearch.setSelected(jEdit.getBooleanProperty(
+ "view.search.hypersearch.toggle"));
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ public void propertiesChanged()
+ {
+ // Option may have been changed
+ isRemovable = !(jEdit.getBooleanProperty("view.showSearchbar"));
+
+ Log.log(Log.DEBUG, this, "in SearchBar.propertiesChanged(), isRemovable = " + isRemovable);
+
+ setCloseButtonVisibility();
+
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private View view;
+ private HistoryTextField find;
+ private JCheckBox ignoreCase, regexp, hyperSearch;
+ private Timer timer;
+ private boolean wasError;
+ private Color defaultBackground;
+ private Color defaultForeground;
+ private Color errorForeground;
+ private Color errorBackground;
+ // close button only there if 'isRemovable' is true
+ private RolloverButton close;
+
+ private int searchStart;
+ private boolean searchReverse;
+ private boolean isRemovable;
+ //}}}
+
+ //{{{ find() method
+ private void find(boolean reverse)
+ {
+ timer.stop();
+
+ String text = find.getText();
+ //{{{ If nothing entered, show search and replace dialog box
+ if(text.length() == 0)
+ {
+ jEdit.setBooleanProperty("search.hypersearch.toggle",
+ hyperSearch.isSelected());
+ SearchDialog.showSearchDialog(view,null,SearchDialog.CURRENT_BUFFER);
+ } //}}}
+ //{{{ HyperSearch
+ else if(hyperSearch.isSelected())
+ {
+ if(isRemovable)
+ {
+ view.removeToolBar(SearchBar.this);
+ }
+ else
+ find.setText(null);
+
+ SearchAndReplace.setSearchString(text);
+ SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
+ SearchAndReplace.hyperSearch(view);
+ } //}}}
+ //{{{ Incremental search
+ else
+ {
+ // on enter, start search from end
+ // of current match to find next one
+ int start;
+ JEditTextArea textArea = view.getTextArea();
+ Selection s = textArea.getSelectionAtOffset(
+ textArea.getCaretPosition());
+ if(s == null)
+ start = textArea.getCaretPosition();
+ else if(reverse)
+ start = s.getStart();
+ else
+ start = s.getEnd();
+
+ if(!incrementalSearch(start,reverse))
+ {
+ // not found. start from
+ // beginning
+ if(!incrementalSearch(reverse
+ ? view.getBuffer().getLength()
+ : 0,reverse))
+ {
+ // not found at all.
+ view.getStatus().setMessageAndClear(
+ jEdit.getProperty(
+ "view.status.search-not-found"));
+ }
+ else
+ {
+ // inform user search restarted
+ view.getStatus().setMessageAndClear(
+ jEdit.getProperty("view.status.auto-wrap"));
+ // beep if beep property set
+ if(jEdit.getBooleanProperty("search.beepOnSearchAutoWrap"))
+ {
+ getToolkit().beep();
+ }
+ }
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ incrementalSearch() method
+ private boolean incrementalSearch(int start, boolean reverse)
+ {
+ /* For example, if the current fileset is a directory,
+ * C+g will find the next match within that fileset.
+ * This can be annoying if you have just done an
+ * incremental search and want the next occurrence
+ * in the current buffer. */
+ SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
+ SearchAndReplace.setSearchString(find.getText());
+ SearchAndReplace.setReverseSearch(reverse);
+
+ boolean ret = false;
+ try
+ {
+ if(SearchAndReplace.find(view,view.getBuffer(),start,false,reverse))
+ ret = true;
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.DEBUG,this,e);
+
+ // invalid regexp, ignore
+ // return true to avoid annoying beeping while
+ // typing a re
+ ret = true;
+ }
+ if (ret)
+ {
+ if (wasError)
+ {
+ find.setForeground(defaultForeground);
+ find.setBackground(defaultBackground);
+ wasError = false;
+ }
+ }
+ else
+ {
+ if (!wasError)
+ {
+ find.setForeground(errorForeground);
+ find.setBackground(errorBackground);
+ wasError = true;
+ }
+ }
+
+
+ return ret;
+ } //}}}
+
+ //{{{ timerIncrementalSearch() method
+ private void timerIncrementalSearch(int start, boolean reverse)
+ {
+ searchStart = start;
+ searchReverse = reverse;
+
+ timer.stop();
+ timer.setRepeats(false);
+ timer.setInitialDelay(150);
+ timer.start();
+ } //}}}
+
+ //{{{ setCloseButtonVisibility() method
+ private void setCloseButtonVisibility()
+ {
+ if(isRemovable)
+ {
+ if(close == null)
+ {
+ close = new RolloverButton(GUIUtilities.loadIcon("closebox.gif"));
+ close.addActionListener(new ActionHandler());
+ close.setToolTipText(jEdit.getProperty(
+ "view.search.close-tooltip"));
+ }
+ add(close);
+ }
+ else if(close != null)
+ remove(close);
+ }
+ //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ ActionHandler class
+ class ActionHandler implements ActionListener
+ {
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+ if(source == find)
+ find(false);
+ else if(source == hyperSearch)
+ {
+ jEdit.setBooleanProperty("view.search.hypersearch.toggle",
+ hyperSearch.isSelected());
+ update();
+ }
+ else if(source == ignoreCase)
+ {
+ SearchAndReplace.setIgnoreCase(ignoreCase
+ .isSelected());
+ }
+ else if(source == regexp)
+ {
+ SearchAndReplace.setRegexp(regexp
+ .isSelected());
+ }
+ else if(source == close)
+ {
+ view.removeToolBar(SearchBar.this);
+ view.getEditPane().focusOnTextArea();
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ DocumentHandler class
+ class DocumentHandler implements DocumentListener
+ {
+ //{{{ insertUpdate() method
+ public void insertUpdate(DocumentEvent evt)
+ {
+ // on insert, start search from beginning of
+ // current match. This will continue to highlight
+ // the current match until another match is found
+ if(!hyperSearch.isSelected())
+ {
+ int start;
+ JEditTextArea textArea = view.getTextArea();
+ Selection s = textArea.getSelectionAtOffset(
+ textArea.getCaretPosition());
+ if(s == null)
+ start = textArea.getCaretPosition();
+ else
+ start = s.getStart();
+
+ timerIncrementalSearch(start,false);
+ }
+ } //}}}
+
+ //{{{ removeUpdate() method
+ public void removeUpdate(DocumentEvent evt)
+ {
+ // on backspace, restart from beginning
+ if(!hyperSearch.isSelected())
+ {
+ String text = find.getText();
+ if(text.length() != 0)
+ {
+ // don't beep if not found.
+ // subsequent beeps are very
+ // annoying when backspacing an
+ // invalid search string.
+ if(regexp.isSelected())
+ {
+ // reverse regexp search
+ // not supported yet, so
+ // 'simulate' with restart
+ timerIncrementalSearch(0,false);
+ }
+ else
+ {
+ int start;
+ JEditTextArea textArea = view.getTextArea();
+ Selection s = textArea.getSelectionAtOffset(
+ textArea.getCaretPosition());
+ if(s == null)
+ start = textArea.getCaretPosition();
+ else
+ start = s.getStart();
+ timerIncrementalSearch(start,true);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ changedUpdate() method
+ public void changedUpdate(DocumentEvent evt) {}
+ //}}}
+ } //}}}
+
+ //{{{ KeyHandler class
+ class KeyHandler extends KeyAdapter
+ {
+ public void keyPressed(KeyEvent evt)
+ {
+ switch(evt.getKeyCode())
+ {
+ case KeyEvent.VK_ESCAPE:
+ if(isRemovable)
+ {
+ view.removeToolBar(SearchBar.this);
+ }
+ evt.consume();
+ view.getEditPane().focusOnTextArea();
+ break;
+ case KeyEvent.VK_ENTER:
+ if(evt.isShiftDown())
+ {
+ evt.consume();
+ find(true);
+ }
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ FocusHandler class
+ class FocusHandler extends FocusAdapter
+ {
+ public void focusLost(FocusEvent e)
+ {
+ getField().addCurrentToHistory();
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/SearchDialog.java b/jEdit/org/gjt/sp/jedit/search/SearchDialog.java
index c912703..248d67b 100644
--- a/jEdit/org/gjt/sp/jedit/search/SearchDialog.java
+++ b/jEdit/org/gjt/sp/jedit/search/SearchDialog.java
@@ -1,1080 +1,1086 @@
-/*
- * SearchDialog.java - Search and replace dialog
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-//{{{ Imports
-import javax.swing.border.*;
-import javax.swing.*;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.gjt.sp.jedit.browser.VFSBrowser;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.msg.SearchSettingsChanged;
-import org.gjt.sp.jedit.*;
-//}}}
-
-/**
- * Search and replace dialog.
- * @author Slava Pestov
- * @version $Id: SearchDialog.java 15502 2009-06-20 12:37:40Z daleanson $
- */
-public class SearchDialog extends EnhancedDialog implements EBComponent
-{
- //{{{ Constants
- /**
- * Default file set.
- * @since jEdit 3.2pre2
- */
- public static final int CURRENT_BUFFER = 0;
- public static final int ALL_BUFFERS = 1;
- public static final int DIRECTORY = 2;
- //}}}
-
- //{{{ getSearchDialog() method
- public static SearchDialog getSearchDialog(View view)
- {
- if(Debug.DISABLE_SEARCH_DIALOG_POOL)
- return new SearchDialog(view);
- else
- {
-
- SearchDialog searchDialog = viewHash.get(view);
- if (searchDialog == null)
- {
- searchDialog = new SearchDialog(view);
- viewHash.put(view, searchDialog);
- }
- return searchDialog;
- }
- } //}}}
-
- //{{{ showSearchDialog() method
- /**
- * Displays a search and replace dialog box, reusing an existing one
- * if necessary.
- * @param view The view
- * @param searchString The search string
- * @param searchIn One of CURRENT_BUFFER, ALL_BUFFERS, or DIRECTORY
- * @since jEdit 4.0pre6
- */
- public static void showSearchDialog(View view, String searchString,
- int searchIn)
- {
- final SearchDialog dialog = getSearchDialog(view);
-
- dialog.setSearchString(searchString,searchIn);
-
- // ugly workaround
- if(OperatingSystem.isUnix() && !OperatingSystem.isMacOS())
- dialog.setVisible(false);
-
- // I'm not sure if calling requestFocus() is strictly necessary
- // (focus looks fine without this, on Linux at least), but
- // it doesn't hurt to leave it here.
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- dialog.toFront();
- dialog.requestFocus();
- // Ensure that the dialog gets the focus. Just bringing
- // it to front just not necessarily give it the focus.
- dialog.find.requestFocus();
- // Given that the dialog has the focus, set the focus
- // to the 'find' field.
- }
- });
- dialog.setVisible(true);
- } //}}}
-
- //{{{ setSearchString() method
- /**
- * Sets the search string.
- *
- * @param searchString The search string
- * @param searchIn One of {@link #CURRENT_BUFFER}, {@link #ALL_BUFFERS}, or {@link #DIRECTORY}
- * @since jEdit 4.0pre5
- */
- public void setSearchString(String searchString, int searchIn)
- {
- find.setText(null);
- replace.setText(null);
-
- if(searchString == null)
- {
- searchCurrentBuffer.setSelected(true);
- HistoryModel model = find.getModel();
- if (!model.isEmpty())
- {
- find.setText(model.getItem(0));
- find.selectAll();
- }
- }
- else
- {
- if(searchString.indexOf('\n') == -1)
- {
- if(SearchAndReplace.getRegexp())
- {
- find.setText(SearchAndReplace.escapeRegexp(
- searchString,true));
- }
- else
- find.setText(searchString);
- find.selectAll();
- searchCurrentBuffer.setSelected(true);
- }
- else if(searchIn == CURRENT_BUFFER)
- {
- searchSelection.setSelected(true);
- hyperSearch.setSelected(true);
- }
- }
-
- if(searchIn == CURRENT_BUFFER)
- {
- if(!searchSelection.isSelected())
- {
- // might be already selected, see above.
- searchCurrentBuffer.setSelected(true);
-
- /* this property is only loaded and saved if
- * the 'current buffer' file set is selected.
- * otherwise, it defaults to on. */
- hyperSearch.setSelected(jEdit.getBooleanProperty(
- "search.hypersearch.toggle"));
- }
- }
- else if(searchIn == ALL_BUFFERS)
- {
- searchAllBuffers.setSelected(true);
- hyperSearch.setSelected(true);
- }
- else if(searchIn == DIRECTORY)
- {
- SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
-
- if(fileset instanceof DirectoryListSet)
- {
- filter.setText(((DirectoryListSet)fileset)
- .getFileFilter());
- directory.setText(((DirectoryListSet)fileset)
- .getDirectory());
- searchSubDirectories.setSelected(((DirectoryListSet)fileset)
- .isRecursive());
- }
-
- hyperSearch.setSelected(true);
- searchDirectory.setSelected(true);
- }
-
- updateEnabled();
- } //}}}
-
- //{{{ ok() method
- public void ok()
- {
- try
- {
- setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
-
- if(!save(false))
- return;
-
- if(searchSelection.isSelected()
- && view.getTextArea().getSelectionCount() == 0)
- {
- GUIUtilities.error(view,"search-no-selection",null);
- return;
- }
-
- if(hyperSearch.isSelected() || searchSelection.isSelected())
- {
- if(SearchAndReplace.hyperSearch(view,
- searchSelection.isSelected()))
- closeOrKeepDialog();
- }
- else
- {
- if(SearchAndReplace.find(view))
- closeOrKeepDialog();
- else
- {
- toFront();
- requestFocus();
- find.requestFocus();
- }
- }
- }
- finally
- {
- setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- }
- } //}}}
-
- //{{{ cancel() method
- public void cancel()
- {
- save(true);
- GUIUtilities.saveGeometry(this,"search");
- setVisible(false);
- } //}}}
-
- //{{{ handleMessage() method
- public void handleMessage(EBMessage msg)
- {
- if(msg instanceof SearchSettingsChanged)
- {
- if(!saving)
- load();
- }
- } //}}}
-
- //{{{ dispose() method
- @Override
- public void dispose()
- {
- EditBus.removeFromBus(this);
- viewHash.remove(view);
- super.dispose();
- } //}}}
-
- //{{{ Private members
-
- private static final Map<View, SearchDialog> viewHash = new HashMap<View, SearchDialog>();
-
- //{{{ Instance variables
- private final View view;
-
- // fields
- private HistoryTextArea find, replace;
-
- private JRadioButton stringReplace, beanShellReplace;
-
- // search settings
- private JCheckBox keepDialog, ignoreCase, regexp, hyperSearch,
- wrap;
- private JRadioButton searchBack, searchForward;
- private JRadioButton searchSelection, searchCurrentBuffer,
- searchAllBuffers, searchDirectory;
-
- // multifile settings
- private HistoryTextField filter, directory;
- private JCheckBox searchSubDirectories;
- private JCheckBox skipBinaryFiles;
- private JCheckBox skipHidden;
-
- private JButton choose;
- private JButton synchronize;
-
- // buttons
- private JButton findBtn, /* replaceBtn, */ replaceAndFindBtn, replaceAllBtn,
- closeBtn;
-
- private boolean saving;
- //}}}
-
- //{{{ SearchDialog constructor
- /**
- * Creates a new search and replace dialog box.
- * @param view The view
- */
- private SearchDialog(View view)
- {
- super(view,jEdit.getProperty("search.title"),false);
-
- this.view = view;
-
- JPanel content = new JPanel(new BorderLayout());
- content.setBorder(new EmptyBorder(0,12,12,12));
- setContentPane(content);
-
- JPanel centerPanel = new JPanel(new BorderLayout());
- centerPanel.add(BorderLayout.CENTER,createFieldPanel());
- centerPanel.add(BorderLayout.SOUTH,createSearchSettingsPanel());
- content.add(BorderLayout.CENTER,centerPanel);
- content.add(BorderLayout.SOUTH,createMultiFilePanel());
-
- content.add(BorderLayout.EAST,createButtonsPanel());
-
- pack();
- jEdit.unsetProperty("search.width");
- jEdit.unsetProperty("search.d-width");
- jEdit.unsetProperty("search.height");
- jEdit.unsetProperty("search.d-height");
- GUIUtilities.loadGeometry(this,"search");
-
- load();
-
- EditBus.addToBus(this);
- } //}}}
-
- //{{{ createFindLabelAndField() method
- private void createFindLabelAndField(JPanel fieldPanel,
- GridBagConstraints cons)
- {
- JLabel label = new JLabel(jEdit.getProperty("search.find"));
-
- label.setDisplayedMnemonic(jEdit.getProperty("search.find.mnemonic")
- .charAt(0));
- find = new HistoryTextArea("find");
- find.setName("find");
- find.setColumns(25);
- find.setToolTipText(jEdit.getProperty("search.find.tooltip"));
- label.setToolTipText(jEdit.getProperty("search.find.tooltip"));
- label.setLabelFor(find);
- label.setBorder(new EmptyBorder(12,0,2,0));
-
- cons.gridx = 0;
- cons.weightx = 0.0;
- cons.weighty = 0.0;
- fieldPanel.add(label,cons);
- cons.gridy++;
- cons.weightx = 1.0;
- cons.weighty = 1.0;
- fieldPanel.add(new JScrollPane(find),cons);
- cons.gridy++;
- } //}}}
-
- //{{{ createReplaceLabelAndField() method
- private void createReplaceLabelAndField(JPanel fieldPanel,
- GridBagConstraints cons)
- {
- JLabel label = new JLabel(jEdit.getProperty("search.replace"));
- label.setDisplayedMnemonic(jEdit.getProperty("search.replace.mnemonic")
- .charAt(0));
- label.setBorder(new EmptyBorder(12,0,0,0));
-
- cons.gridx = 0;
- cons.weightx = 0.0;
- cons.weighty = 0.0;
- fieldPanel.add(label,cons);
- cons.gridy++;
-
- ButtonGroup grp = new ButtonGroup();
- ReplaceActionHandler replaceActionHandler = new ReplaceActionHandler();
-
- // we use a custom JRadioButton subclass that returns
- // false for isFocusTraversable() so that the user can
- // tab from the search field to the replace field with
- // one keystroke
-
- stringReplace = new MyJRadioButton(jEdit.getProperty(
- "search.string-replace-btn"));
- stringReplace.addActionListener(replaceActionHandler);
- grp.add(stringReplace);
- cons.gridwidth = 1;
- fieldPanel.add(stringReplace,cons);
- cons.gridx++;
- cons.insets = new Insets(0,12,0,0);
-
- beanShellReplace = new MyJRadioButton(jEdit.getProperty(
- "search.beanshell-replace-btn"));
- beanShellReplace.addActionListener(replaceActionHandler);
- grp.add(beanShellReplace);
- fieldPanel.add(beanShellReplace,cons);
- cons.gridx = 0;
- cons.gridwidth = 2;
- cons.insets = new Insets(0,0,0,0);
-
- replace = new HistoryTextArea("replace");
- replace.setName("replace");
- replace.setToolTipText(jEdit.getProperty("search.find.tooltip"));
- label.setLabelFor(replace);
-
- cons.gridx = 0;
- cons.gridy++;
- cons.weightx = 1.0;
- cons.weighty = 1.0;
- fieldPanel.add(new JScrollPane(replace),cons);
- cons.gridy++;
- } //}}}
-
- //{{{ createFieldPanel() method
- private JPanel createFieldPanel()
- {
- JPanel fieldPanel = new JPanel(new GridBagLayout());
- fieldPanel.setBorder(new EmptyBorder(0,0,12,12));
-
- GridBagConstraints cons = new GridBagConstraints();
- cons.fill = GridBagConstraints.BOTH;
- cons.gridy = 0;
- cons.gridwidth = 2;
-
- createFindLabelAndField(fieldPanel,cons);
- createReplaceLabelAndField(fieldPanel,cons);
-
- return fieldPanel;
- } //}}}
-
- //{{{ createSearchSettingsPanel() method
- private JPanel createSearchSettingsPanel()
- {
- JPanel searchSettings = new JPanel(new VariableGridLayout(
- VariableGridLayout.FIXED_NUM_COLUMNS,3));
- searchSettings.setBorder(new EmptyBorder(0,0,12,12));
-
- SettingsActionHandler actionHandler = new SettingsActionHandler();
- ButtonGroup fileset = new ButtonGroup();
- ButtonGroup direction = new ButtonGroup();
-
- searchSettings.add(new JLabel(jEdit.getProperty("search.fileset")));
-
- searchSettings.add(new JLabel(jEdit.getProperty("search.settings")));
-
- searchSettings.add(new JLabel(jEdit.getProperty("search.direction")));
-
- searchSelection = new JRadioButton(jEdit.getProperty("search.selection"));
- searchSelection.setMnemonic(jEdit.getProperty("search.selection.mnemonic")
- .charAt(0));
- fileset.add(searchSelection);
- searchSettings.add(searchSelection);
- searchSelection.addActionListener(actionHandler);
-
- keepDialog = new JCheckBox(jEdit.getProperty("search.keep"));
- keepDialog.setMnemonic(jEdit.getProperty("search.keep.mnemonic")
- .charAt(0));
- searchSettings.add(keepDialog);
-
- searchBack = new JRadioButton(jEdit.getProperty("search.back"));
- searchBack.setMnemonic(jEdit.getProperty("search.back.mnemonic")
- .charAt(0));
- direction.add(searchBack);
- searchSettings.add(searchBack);
- searchBack.addActionListener(actionHandler);
-
- searchCurrentBuffer = new JRadioButton(jEdit.getProperty("search.current"));
- searchCurrentBuffer.setMnemonic(jEdit.getProperty("search.current.mnemonic")
- .charAt(0));
- fileset.add(searchCurrentBuffer);
- searchSettings.add(searchCurrentBuffer);
- searchCurrentBuffer.addActionListener(actionHandler);
-
- ignoreCase = new JCheckBox(jEdit.getProperty("search.case"));
- ignoreCase.setMnemonic(jEdit.getProperty("search.case.mnemonic")
- .charAt(0));
- searchSettings.add(ignoreCase);
- ignoreCase.addActionListener(actionHandler);
-
- searchForward = new JRadioButton(jEdit.getProperty("search.forward"));
- searchForward.setMnemonic(jEdit.getProperty("search.forward.mnemonic")
- .charAt(0));
- direction.add(searchForward);
- searchSettings.add(searchForward);
- searchForward.addActionListener(actionHandler);
-
- searchAllBuffers = new JRadioButton(jEdit.getProperty("search.all"));
- searchAllBuffers.setMnemonic(jEdit.getProperty("search.all.mnemonic")
- .charAt(0));
- fileset.add(searchAllBuffers);
- searchSettings.add(searchAllBuffers);
- searchAllBuffers.addActionListener(actionHandler);
-
- regexp = new JCheckBox(jEdit.getProperty("search.regexp"));
- regexp.setMnemonic(jEdit.getProperty("search.regexp.mnemonic")
- .charAt(0));
- searchSettings.add(regexp);
- regexp.addActionListener(actionHandler);
-
- wrap = new JCheckBox(jEdit.getProperty("search.wrap"));
- wrap.setMnemonic(jEdit.getProperty("search.wrap.mnemonic")
- .charAt(0));
- searchSettings.add(wrap);
- wrap.addActionListener(actionHandler);
-
- searchDirectory = new JRadioButton(jEdit.getProperty("search.directory"));
- searchDirectory.setMnemonic(jEdit.getProperty("search.directory.mnemonic")
- .charAt(0));
- fileset.add(searchDirectory);
- searchSettings.add(searchDirectory);
- searchDirectory.addActionListener(actionHandler);
-
- hyperSearch = new JCheckBox(jEdit.getProperty("search.hypersearch"));
- hyperSearch.setMnemonic(jEdit.getProperty("search.hypersearch.mnemonic")
- .charAt(0));
- searchSettings.add(hyperSearch);
- hyperSearch.addActionListener(actionHandler);
-
- return searchSettings;
- } //}}}
-
- //{{{ createMultiFilePanel() method
- private JPanel createMultiFilePanel()
- {
- JPanel multifile = new JPanel();
-
- GridBagLayout layout = new GridBagLayout();
- multifile.setLayout(layout);
-
- GridBagConstraints cons = new GridBagConstraints();
- cons.gridy = cons.gridwidth = cons.gridheight = 1;
- cons.anchor = GridBagConstraints.WEST;
- cons.fill = GridBagConstraints.HORIZONTAL;
-
- MultiFileActionHandler actionListener = new MultiFileActionHandler();
- filter = new HistoryTextField("search.filter");
-
- filter.setToolTipText(jEdit.getProperty("glob.tooltip"));
- filter.addActionListener(actionListener);
-
- cons.insets = new Insets(0,0,3,0);
-
- JLabel label = new JLabel(jEdit.getProperty("search.filterField"),
- SwingConstants.RIGHT);
- label.setBorder(new EmptyBorder(0,0,0,12));
- label.setDisplayedMnemonic(jEdit.getProperty("search.filterField.mnemonic")
- .charAt(0));
- label.setLabelFor(filter);
- cons.weightx = 0.0;
- layout.setConstraints(label,cons);
- multifile.add(label);
-
- cons.gridwidth = 2;
- cons.insets = new Insets(0,0,3,6);
- cons.weightx = 1.0;
- layout.setConstraints(filter,cons);
- multifile.add(filter);
-
- cons.gridwidth = 1;
- cons.weightx = 0.0;
- cons.insets = new Insets(0,0,3,0);
-
- synchronize = new JButton(jEdit.getProperty(
- "search.synchronize"));
- synchronize.setToolTipText(jEdit.getProperty(
- "search.synchronize.tooltip"));
- synchronize.setMnemonic(jEdit.getProperty(
- "search.synchronize.mnemonic")
- .charAt(0));
- synchronize.addActionListener(actionListener);
- layout.setConstraints(synchronize,cons);
- multifile.add(synchronize);
-
- cons.gridy++;
-
- directory = new HistoryTextField("search.directory");
- directory.setColumns(25);
- directory.addActionListener(actionListener);
-
- label = new JLabel(jEdit.getProperty("search.directoryField"),
- SwingConstants.RIGHT);
- label.setBorder(new EmptyBorder(0,0,0,12));
-
- label.setDisplayedMnemonic(jEdit.getProperty("search.directoryField.mnemonic")
- .charAt(0));
- label.setLabelFor(directory);
- cons.insets = new Insets(0,0,3,0);
- cons.weightx = 0.0;
- layout.setConstraints(label,cons);
- multifile.add(label);
-
- cons.insets = new Insets(0,0,3,6);
- cons.weightx = 1.0;
- cons.gridwidth = 2;
- layout.setConstraints(directory,cons);
- multifile.add(directory);
-
- choose = new JButton(jEdit.getProperty("search.choose"));
- choose.setMnemonic(jEdit.getProperty("search.choose.mnemonic")
- .charAt(0));
- cons.insets = new Insets(0,0,3,0);
- cons.weightx = 0.0;
- cons.gridwidth = 1;
- layout.setConstraints(choose,cons);
- multifile.add(choose);
- choose.addActionListener(actionListener);
-
- cons.insets = new Insets(0,0,0,0);
- cons.gridy++;
- cons.gridwidth = 3;
-
- JPanel dirCheckBoxPanel = new JPanel();
- searchSubDirectories = new JCheckBox(jEdit.getProperty(
- "search.subdirs"));
- String mnemonic = jEdit.getProperty(
- "search.subdirs.mnemonic");
- searchSubDirectories.setMnemonic(mnemonic.charAt(0));
- searchSubDirectories.setSelected(jEdit.getBooleanProperty("search.subdirs.toggle"));
- skipHidden = new JCheckBox(jEdit.getProperty("search.skipHidden"));
- skipHidden.setSelected(jEdit.getBooleanProperty("search.skipHidden.toggle", true));
- skipBinaryFiles = new JCheckBox(jEdit.getProperty("search.skipBinary"));
- skipBinaryFiles.setSelected(jEdit.getBooleanProperty("search.skipBinary.toggle", true));
- dirCheckBoxPanel.add(searchSubDirectories);
- dirCheckBoxPanel.add(skipHidden);
- dirCheckBoxPanel.add(skipBinaryFiles);
-
- cons.insets = new Insets(0, 0, 0, 0);
- cons.gridy++;
- cons.gridwidth = 4;
- layout.setConstraints(dirCheckBoxPanel, cons);
-
- multifile.add(dirCheckBoxPanel);
-
- return multifile;
- } //}}}
-
- //{{{ createButtonsPanel() method
- private Box createButtonsPanel()
- {
- Box box = new Box(BoxLayout.Y_AXIS);
-
- ButtonActionHandler actionHandler = new ButtonActionHandler();
-
- box.add(Box.createVerticalStrut(12));
-
- JPanel grid = new JPanel(new GridLayout(5,1,0,12));
-
- findBtn = new JButton(jEdit.getProperty("search.findBtn"));
- /* findBtn.setMnemonic(jEdit.getProperty("search.findBtn.mnemonic")
- .charAt(0)); */
- getRootPane().setDefaultButton(findBtn);
- grid.add(findBtn);
- findBtn.addActionListener(actionHandler);
-
- /* replaceBtn = new JButton(jEdit.getProperty("search.replaceBtn"));
- replaceBtn.setMnemonic(jEdit.getProperty("search.replaceBtn.mnemonic")
- .charAt(0));
- grid.add(replaceBtn);
- replaceBtn.addActionListener(actionHandler); */
-
- replaceAndFindBtn = new JButton(jEdit.getProperty("search.replaceAndFindBtn"));
- replaceAndFindBtn.setMnemonic(jEdit.getProperty("search.replaceAndFindBtn.mnemonic")
- .charAt(0));
- grid.add(replaceAndFindBtn);
- replaceAndFindBtn.addActionListener(actionHandler);
-
- replaceAllBtn = new JButton(jEdit.getProperty("search.replaceAllBtn"));
- replaceAllBtn.setMnemonic(jEdit.getProperty("search.replaceAllBtn.mnemonic")
- .charAt(0));
- grid.add(replaceAllBtn);
- replaceAllBtn.addActionListener(actionHandler);
-
- closeBtn = new JButton(jEdit.getProperty("common.close"));
- grid.add(closeBtn);
- closeBtn.addActionListener(actionHandler);
-
- grid.setMaximumSize(grid.getPreferredSize());
-
- box.add(grid);
- box.add(Box.createGlue());
-
- return box;
- } //}}}
-
- //{{{ updateEnabled() method
- private void updateEnabled()
- {
- wrap.setEnabled(!hyperSearch.isSelected()
- && !searchSelection.isSelected());
-
- boolean reverseEnabled = !hyperSearch.isSelected()
- && searchCurrentBuffer.isSelected();
- searchBack.setEnabled(reverseEnabled);
- searchForward.setEnabled(reverseEnabled);
- if(!reverseEnabled)
- searchForward.setSelected(true);
-
- filter.setEnabled(searchAllBuffers.isSelected()
- || searchDirectory.isSelected());
-
- boolean searchDirs = searchDirectory.isSelected();
- directory.setEnabled(searchDirs);
- choose.setEnabled(searchDirs);
- searchSubDirectories.setEnabled(searchDirs);
- skipHidden.setEnabled(searchDirs);
- skipBinaryFiles.setEnabled(searchDirs);
-
- synchronize.setEnabled(searchAllBuffers.isSelected()
- || searchDirectory.isSelected());
-
- findBtn.setEnabled(!searchSelection.isSelected()
- || hyperSearch.isSelected());
- replaceAndFindBtn.setEnabled(!hyperSearch.isSelected()
- && !searchSelection.isSelected());
- } //}}}
-
- //{{{ save() method
- /**
- * @param cancel If true, we don't bother the user with warning messages
- */
- private boolean save(boolean cancel)
- {
- try
- {
- // prevents us from handling SearchSettingsChanged
- // as a result of below
- saving = true;
- SearchAndReplace.setIgnoreCase(ignoreCase.isSelected());
- SearchAndReplace.setRegexp(regexp.isSelected());
- SearchAndReplace.setReverseSearch(searchBack.isSelected());
- SearchAndReplace.setAutoWrapAround(wrap.isSelected());
- jEdit.setBooleanProperty("search.subdirs.toggle", searchSubDirectories.isSelected());
- jEdit.setBooleanProperty("search.skipHidden.toggle", skipHidden.isSelected());
- jEdit.setBooleanProperty("search.skipBinary.toggle", skipBinaryFiles.isSelected());
-
- String filter = this.filter.getText();
- this.filter.addCurrentToHistory();
- if(filter.length() == 0)
- filter = "*";
-
- SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
-
- boolean recurse = searchSubDirectories.isSelected();
-
- if(searchSelection.isSelected())
- fileset = new CurrentBufferSet();
- else if(searchCurrentBuffer.isSelected())
- {
- fileset = new CurrentBufferSet();
-
- jEdit.setBooleanProperty("search.hypersearch.toggle",
- hyperSearch.isSelected());
- }
- else if(searchAllBuffers.isSelected())
- fileset = new AllBufferSet(filter);
- else if(searchDirectory.isSelected())
- {
- String directory = this.directory.getText();
- this.directory.addCurrentToHistory();
- directory = MiscUtilities.constructPath(
- view.getBuffer().getDirectory(),directory);
-
- if((VFSManager.getVFSForPath(directory).getCapabilities()
- & VFS.LOW_LATENCY_CAP) == 0)
- {
- if(cancel)
- return false;
-
- int retVal = GUIUtilities.confirm(
- this,"remote-dir-search",
- null,JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
- if(retVal != JOptionPane.YES_OPTION)
- return false;
- }
-
- if(fileset instanceof DirectoryListSet)
- {
- DirectoryListSet dset = (DirectoryListSet)fileset;
- dset.setDirectory(directory);
- dset.setFileFilter(filter);
- dset.setRecursive(recurse);
- EditBus.send(new SearchSettingsChanged(null));
- }
- else
- fileset = new DirectoryListSet(directory,filter,recurse);
- }
- else
- {
- // can't happen
- fileset = null;
- }
-
- jEdit.setBooleanProperty("search.subdirs.toggle",
- recurse);
- jEdit.setBooleanProperty("search.keepDialog.toggle",
- keepDialog.isSelected());
-
- SearchAndReplace.setSearchFileSet(fileset);
-
- replace.addCurrentToHistory();
- SearchAndReplace.setReplaceString(replace.getText());
-
- if(find.getText().length() == 0)
- {
- if(!cancel)
- getToolkit().beep();
- return false;
- }
-
- find.addCurrentToHistory();
- SearchAndReplace.setSearchString(find.getText());
-
- return true;
- }
- finally
- {
- saving = false;
- }
- } //}}}
-
- //{{{ closeOrKeepDialog() method
- private void closeOrKeepDialog()
- {
- if(keepDialog.isSelected())
- {
- // Windows bug workaround in case a YES/NO confirm
- // was shown
-
- // ... but if HyperSearch results window is floating,
- // the workaround causes problems!
- if(!hyperSearch.isSelected())
- {
- toFront();
- requestFocus();
- find.requestFocus();
- }
- }
- else
- {
- GUIUtilities.saveGeometry(this,"search");
- setVisible(false);
- }
- } //}}}
-
- //{{{ load() method
- private void load()
- {
- ignoreCase.setSelected(SearchAndReplace.getIgnoreCase());
- regexp.setSelected(SearchAndReplace.getRegexp());
- wrap.setSelected(SearchAndReplace.getAutoWrapAround());
-
- if(SearchAndReplace.getReverseSearch())
- searchBack.setSelected(true);
- else
- searchForward.setSelected(true);
-
- if(SearchAndReplace.getBeanShellReplace())
- {
- replace.setModel("replace.script");
- beanShellReplace.setSelected(true);
- }
- else
- {
- replace.setModel("replace");
- stringReplace.setSelected(true);
- }
-
- SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
-
- HistoryModel model = filter.getModel();
- if(model.getSize() != 0)
- filter.setText(model.getItem(0));
- else
- {
- filter.setText('*' + MiscUtilities
- .getFileExtension(view.getBuffer()
- .getName()));
- }
- model = directory.getModel();
- if(model.getSize() != 0)
- directory.setText(model.getItem(0));
- else
- directory.setText(view.getBuffer().getDirectory());
-
- searchSubDirectories.setSelected(jEdit.getBooleanProperty(
- "search.subdirs.toggle"));
-
- if(fileset instanceof DirectoryListSet)
- {
- filter.setText(((DirectoryListSet)fileset)
- .getFileFilter());
- directory.setText(((DirectoryListSet)fileset)
- .getDirectory());
- searchSubDirectories.setSelected(((DirectoryListSet)fileset)
- .isRecursive());
- }
- else if(fileset instanceof AllBufferSet)
- {
- filter.setText(((AllBufferSet)fileset)
- .getFileFilter());
- }
-
- directory.addCurrentToHistory();
-
- keepDialog.setSelected(jEdit.getBooleanProperty(
- "search.keepDialog.toggle"));
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ MyJRadioButton class
-
- // used for the stringReplace and beanShell replace radio buttons,
- // so that the user can press tab to go from the find field to the
- // replace field in one go
- static class MyJRadioButton extends JRadioButton
- {
- MyJRadioButton(String label)
- {
- super(label);
- }
-
- @Override
- public boolean isFocusable()
- {
- return false;
- }
- } //}}}
-
- //{{{ ReplaceActionHandler class
- class ReplaceActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- replace.setModel(beanShellReplace.isSelected()
- ? "replace.script"
- : "replace");
- SearchAndReplace.setBeanShellReplace(
- beanShellReplace.isSelected());
- }
- } //}}}
-
- //{{{ SettingsActionHandler class
- class SettingsActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
-
- if(source == searchCurrentBuffer)
- hyperSearch.setSelected(false);
- else if(source == searchSelection
- || source == searchAllBuffers
- || source == searchDirectory)
- hyperSearch.setSelected(true);
-
- save(true);
- updateEnabled();
- }
- } //}}}
-
- //{{{ MultiFileActionHandler class
- class MultiFileActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(evt.getSource() == choose)
- {
- String[] dirs = GUIUtilities.showVFSFileDialog(
- SearchDialog.this,
- view,directory.getText(),
- VFSBrowser.CHOOSE_DIRECTORY_DIALOG,
- false);
- if(dirs != null)
- directory.setText(dirs[0]);
- }
- else if(evt.getSource() == synchronize)
- {
- synchronizeMultiFileSettings();
- }
- else // source is directory or filter field
- {
- // just as if Enter was pressed in another
- // text field
- ok();
- }
- }
-
-
- //{{{ synchronizeMultiFileSettings() method
- private void synchronizeMultiFileSettings()
- {
- directory.setText(view.getBuffer().getDirectory());
-
- SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
-
- if(fileset instanceof AllBufferSet)
- {
- filter.setText(((AllBufferSet)fileset)
- .getFileFilter());
- }
- else
- {
- filter.setText('*' + MiscUtilities
- .getFileExtension(view.getBuffer()
- .getName()));
- }
- } //}}}
- } //}}}
-
- //{{{ ButtonActionHandler class
- class ButtonActionHandler implements ActionListener
- {
- public void actionPerformed(ActionEvent evt)
- {
- Object source = evt.getSource();
-
- if(source == closeBtn)
- cancel();
- else if(source == findBtn || source == find
- || source == replace)
- {
- ok();
- }
- else if(source == replaceAndFindBtn)
- {
- save(false);
- if(SearchAndReplace.replace(view))
- ok();
- else
- getToolkit().beep();
- }
- else if(source == replaceAllBtn)
- {
- if(searchSelection.isSelected() &&
- view.getTextArea().getSelectionCount()
- == 0)
- {
- GUIUtilities.error(view,"search-no-selection",null);
- return;
- }
-
- setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
-
- if(!save(false))
- {
- setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- getToolkit().beep();
- return;
- }
-
- if(searchSelection.isSelected())
- {
- if(SearchAndReplace.replace(view))
- closeOrKeepDialog();
- else
- getToolkit().beep();
- }
- else
- {
- if(SearchAndReplace.replaceAll(view))
- closeOrKeepDialog();
- else
- getToolkit().beep();
- }
-
- setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- }
- }
- } //}}}
-
- //}}}
-}
+/*
+ * SearchDialog.java - Search and replace dialog
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+//{{{ Imports
+import javax.swing.border.*;
+import javax.swing.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.gjt.sp.jedit.EditBus.EBHandler;
+import org.gjt.sp.jedit.browser.VFSBrowser;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.msg.SearchSettingsChanged;
+import org.gjt.sp.jedit.*;
+//}}}
+
+/**
+ * Search and replace dialog.
+ * @author Slava Pestov
+ * @version $Id: SearchDialog.java 18759 2010-10-10 13:17:07Z daleanson $
+ */
+public class SearchDialog extends EnhancedDialog
+{
+ //{{{ Constants
+ /**
+ * Default file set.
+ * @since jEdit 3.2pre2
+ */
+ public static final int CURRENT_BUFFER = 0;
+ public static final int ALL_BUFFERS = 1;
+ public static final int DIRECTORY = 2;
+ //}}}
+
+ //{{{ getSearchDialog() method
+ public static SearchDialog getSearchDialog(View view)
+ {
+ if(Debug.DISABLE_SEARCH_DIALOG_POOL)
+ return new SearchDialog(view);
+ else
+ {
+
+ SearchDialog searchDialog = viewHash.get(view);
+ if (searchDialog == null)
+ {
+ searchDialog = new SearchDialog(view);
+ viewHash.put(view, searchDialog);
+ }
+ return searchDialog;
+ }
+ } //}}}
+
+ //{{{ showSearchDialog() method
+ /**
+ * Displays a search and replace dialog box, reusing an existing one
+ * if necessary.
+ * @param view The view
+ * @param searchString The search string
+ * @param searchIn One of CURRENT_BUFFER, ALL_BUFFERS, or DIRECTORY
+ * @since jEdit 4.0pre6
+ */
+ public static void showSearchDialog(View view, String searchString,
+ int searchIn)
+ {
+ final SearchDialog dialog = getSearchDialog(view);
+
+ dialog.setSearchString(searchString,searchIn);
+
+ // ugly workaround
+ if(OperatingSystem.isUnix() && !OperatingSystem.isMacOS())
+ dialog.setVisible(false);
+
+ // I'm not sure if calling requestFocus() is strictly necessary
+ // (focus looks fine without this, on Linux at least), but
+ // it doesn't hurt to leave it here.
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ dialog.toFront();
+ dialog.requestFocus();
+ // Ensure that the dialog gets the focus. Just bringing
+ // it to front just not necessarily give it the focus.
+ dialog.find.requestFocus();
+ // Given that the dialog has the focus, set the focus
+ // to the 'find' field.
+ }
+ });
+ dialog.setVisible(true);
+ } //}}}
+
+ //{{{ setSearchString() method
+ /**
+ * Sets the search string.
+ *
+ * @param searchString The search string
+ * @param searchIn One of {@link #CURRENT_BUFFER}, {@link #ALL_BUFFERS}, or {@link #DIRECTORY}
+ * @since jEdit 4.0pre5
+ */
+ public void setSearchString(String searchString, int searchIn)
+ {
+ find.setText(null);
+ replace.setText(null);
+
+ if(searchString == null)
+ {
+ searchCurrentBuffer.setSelected(true);
+ HistoryModel model = find.getModel();
+ if (!model.isEmpty())
+ {
+ find.setText(model.getItem(0));
+ find.selectAll();
+ }
+ }
+ else
+ {
+ if(searchString.indexOf('\n') == -1)
+ {
+ if(SearchAndReplace.getRegexp())
+ {
+ find.setText(SearchAndReplace.escapeRegexp(
+ searchString,true));
+ }
+ else
+ find.setText(searchString);
+ find.selectAll();
+ searchCurrentBuffer.setSelected(true);
+ }
+ else if(searchIn == CURRENT_BUFFER)
+ {
+ searchSelection.setSelected(true);
+ hyperSearch.setSelected(true);
+ }
+ }
+
+ if(searchIn == CURRENT_BUFFER)
+ {
+ if(!searchSelection.isSelected())
+ {
+ // might be already selected, see above.
+ searchCurrentBuffer.setSelected(true);
+
+ /* this property is only loaded and saved if
+ * the 'current buffer' file set is selected.
+ * otherwise, it defaults to on. */
+ hyperSearch.setSelected(jEdit.getBooleanProperty(
+ "search.hypersearch.toggle"));
+ }
+ }
+ else if(searchIn == ALL_BUFFERS)
+ {
+ searchAllBuffers.setSelected(true);
+ hyperSearch.setSelected(true);
+ }
+ else if(searchIn == DIRECTORY)
+ {
+ SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
+
+ if(fileset instanceof DirectoryListSet)
+ {
+ filter.setText(((DirectoryListSet)fileset)
+ .getFileFilter());
+ directory.setText(((DirectoryListSet)fileset)
+ .getDirectory());
+ searchSubDirectories.setSelected(((DirectoryListSet)fileset)
+ .isRecursive());
+ }
+
+ hyperSearch.setSelected(true);
+ searchDirectory.setSelected(true);
+ }
+
+ updateEnabled();
+ } //}}}
+
+ //{{{ ok() method
+ public void ok()
+ {
+ try
+ {
+ setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+
+ if(!save(false))
+ return;
+
+ if(searchSelection.isSelected()
+ && view.getTextArea().getSelectionCount() == 0)
+ {
+ GUIUtilities.error(view,"search-no-selection",null);
+ return;
+ }
+
+ if(hyperSearch.isSelected() || searchSelection.isSelected())
+ {
+ if(SearchAndReplace.hyperSearch(view,
+ searchSelection.isSelected()))
+ closeOrKeepDialog();
+ }
+ else
+ {
+ if(SearchAndReplace.find(view))
+ closeOrKeepDialog();
+ else
+ {
+ toFront();
+ requestFocus();
+ find.requestFocus();
+ }
+ }
+ }
+ finally
+ {
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ }
+ } //}}}
+
+ //{{{ cancel() method
+ public void cancel()
+ {
+ save(true);
+ GUIUtilities.saveGeometry(this,"search");
+ setVisible(false);
+ } //}}}
+
+ //{{{ handleSearchSettingsChanged() method
+ @EBHandler
+ public void handleSearchSettingsChanged(EBMessage msg)
+ {
+ if(!saving)
+ load();
+ } //}}}
+
+ //{{{ dispose() method
+ @Override
+ public void dispose()
+ {
+ EditBus.removeFromBus(this);
+ viewHash.remove(view);
+ super.dispose();
+ } //}}}
+
+ //{{{ Private members
+
+ private static final Map<View, SearchDialog> viewHash = new HashMap<View, SearchDialog>();
+
+ //{{{ Instance variables
+ private final View view;
+
+ // fields
+ private HistoryTextArea find, replace;
+
+ private JRadioButton stringReplace, beanShellReplace;
+
+ // search settings
+ private JCheckBox keepDialog, ignoreCase, regexp, hyperSearch,
+ wrap;
+ private JRadioButton searchBack, searchForward;
+ private JRadioButton searchSelection, searchCurrentBuffer,
+ searchAllBuffers, searchDirectory;
+
+ // multifile settings
+ private HistoryTextField filter, directory;
+ private JCheckBox searchSubDirectories;
+ private JCheckBox skipBinaryFiles;
+ private JCheckBox skipHidden;
+
+ private JButton choose;
+ private JButton synchronize;
+
+ // buttons
+ private JButton findBtn, replaceBtn, replaceAndFindBtn, replaceAllBtn,
+ closeBtn;
+
+ private boolean saving;
+ //}}}
+
+ //{{{ SearchDialog constructor
+ /**
+ * Creates a new search and replace dialog box.
+ * @param view The view
+ */
+ private SearchDialog(View view)
+ {
+ super(view,jEdit.getProperty("search.title"),false);
+
+ this.view = view;
+
+ JPanel content = new JPanel(new BorderLayout());
+ content.setBorder(new EmptyBorder(0,12,12,12));
+ setContentPane(content);
+
+ JPanel centerPanel = new JPanel(new BorderLayout());
+ centerPanel.add(BorderLayout.CENTER,createFieldPanel());
+ centerPanel.add(BorderLayout.SOUTH,createSearchSettingsPanel());
+ content.add(BorderLayout.CENTER,centerPanel);
+ content.add(BorderLayout.SOUTH,createMultiFilePanel());
+
+ content.add(BorderLayout.EAST,createButtonsPanel());
+
+ pack();
+ jEdit.unsetProperty("search.width");
+ jEdit.unsetProperty("search.d-width");
+ jEdit.unsetProperty("search.height");
+ jEdit.unsetProperty("search.d-height");
+ GUIUtilities.loadGeometry(this,"search");
+
+ load();
+
+ EditBus.addToBus(this);
+ } //}}}
+
+ //{{{ createFindLabelAndField() method
+ private void createFindLabelAndField(JPanel fieldPanel,
+ GridBagConstraints cons)
+ {
+ JLabel label = new JLabel(jEdit.getProperty("search.find"));
+
+ label.setDisplayedMnemonic(jEdit.getProperty("search.find.mnemonic")
+ .charAt(0));
+ find = new HistoryTextArea("find");
+ find.setName("find");
+ find.setColumns(25);
+ find.setToolTipText(jEdit.getProperty("search.find.tooltip"));
+ label.setToolTipText(jEdit.getProperty("search.find.tooltip"));
+ label.setLabelFor(find);
+ label.setBorder(new EmptyBorder(12,0,2,0));
+
+ cons.gridx = 0;
+ cons.weightx = 0.0;
+ cons.weighty = 0.0;
+ fieldPanel.add(label,cons);
+ cons.gridy++;
+ cons.weightx = 1.0;
+ cons.weighty = 1.0;
+ fieldPanel.add(new JScrollPane(find),cons);
+ cons.gridy++;
+ } //}}}
+
+ //{{{ createReplaceLabelAndField() method
+ private void createReplaceLabelAndField(JPanel fieldPanel,
+ GridBagConstraints cons)
+ {
+ JLabel label = new JLabel(jEdit.getProperty("search.replace"));
+ label.setDisplayedMnemonic(jEdit.getProperty("search.replace.mnemonic")
+ .charAt(0));
+ label.setBorder(new EmptyBorder(12,0,0,0));
+
+ cons.gridx = 0;
+ cons.weightx = 0.0;
+ cons.weighty = 0.0;
+ fieldPanel.add(label,cons);
+ cons.gridy++;
+
+ ButtonGroup grp = new ButtonGroup();
+ ReplaceActionHandler replaceActionHandler = new ReplaceActionHandler();
+
+ // we use a custom JRadioButton subclass that returns
+ // false for isFocusTraversable() so that the user can
+ // tab from the search field to the replace field with
+ // one keystroke
+
+ stringReplace = new MyJRadioButton(jEdit.getProperty(
+ "search.string-replace-btn"));
+ stringReplace.addActionListener(replaceActionHandler);
+ grp.add(stringReplace);
+ cons.gridwidth = 1;
+ fieldPanel.add(stringReplace,cons);
+ cons.gridx++;
+ cons.insets = new Insets(0,12,0,0);
+
+ beanShellReplace = new MyJRadioButton(jEdit.getProperty(
+ "search.beanshell-replace-btn"));
+ beanShellReplace.addActionListener(replaceActionHandler);
+ grp.add(beanShellReplace);
+ fieldPanel.add(beanShellReplace,cons);
+ cons.gridx = 0;
+ cons.gridwidth = 2;
+ cons.insets = new Insets(0,0,0,0);
+
+ replace = new HistoryTextArea("replace");
+ replace.setName("replace");
+ replace.setToolTipText(jEdit.getProperty("search.find.tooltip"));
+ label.setLabelFor(replace);
+
+ cons.gridx = 0;
+ cons.gridy++;
+ cons.weightx = 1.0;
+ cons.weighty = 1.0;
+ fieldPanel.add(new JScrollPane(replace),cons);
+ cons.gridy++;
+ } //}}}
+
+ //{{{ createFieldPanel() method
+ private JPanel createFieldPanel()
+ {
+ JPanel fieldPanel = new JPanel(new GridBagLayout());
+ fieldPanel.setBorder(new EmptyBorder(0,0,12,12));
+
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.fill = GridBagConstraints.BOTH;
+ cons.gridy = 0;
+ cons.gridwidth = 2;
+
+ createFindLabelAndField(fieldPanel,cons);
+ createReplaceLabelAndField(fieldPanel,cons);
+
+ return fieldPanel;
+ } //}}}
+
+ //{{{ createSearchSettingsPanel() method
+ private JPanel createSearchSettingsPanel()
+ {
+ JPanel searchSettings = new JPanel(new VariableGridLayout(
+ VariableGridLayout.FIXED_NUM_COLUMNS,3));
+ searchSettings.setBorder(new EmptyBorder(0,0,12,12));
+
+ SettingsActionHandler actionHandler = new SettingsActionHandler();
+ ButtonGroup fileset = new ButtonGroup();
+ ButtonGroup direction = new ButtonGroup();
+
+ searchSettings.add(new JLabel(jEdit.getProperty("search.fileset")));
+
+ searchSettings.add(new JLabel(jEdit.getProperty("search.settings")));
+
+ searchSettings.add(new JLabel(jEdit.getProperty("search.direction")));
+
+ searchSelection = new JRadioButton(jEdit.getProperty("search.selection"));
+ searchSelection.setMnemonic(jEdit.getProperty("search.selection.mnemonic")
+ .charAt(0));
+ fileset.add(searchSelection);
+ searchSettings.add(searchSelection);
+ searchSelection.addActionListener(actionHandler);
+
+ keepDialog = new JCheckBox(jEdit.getProperty("search.keep"));
+ keepDialog.setMnemonic(jEdit.getProperty("search.keep.mnemonic")
+ .charAt(0));
+ searchSettings.add(keepDialog);
+
+ searchBack = new JRadioButton(jEdit.getProperty("search.back"));
+ searchBack.setMnemonic(jEdit.getProperty("search.back.mnemonic")
+ .charAt(0));
+ direction.add(searchBack);
+ searchSettings.add(searchBack);
+ searchBack.addActionListener(actionHandler);
+
+ searchCurrentBuffer = new JRadioButton(jEdit.getProperty("search.current"));
+ searchCurrentBuffer.setMnemonic(jEdit.getProperty("search.current.mnemonic")
+ .charAt(0));
+ fileset.add(searchCurrentBuffer);
+ searchSettings.add(searchCurrentBuffer);
+ searchCurrentBuffer.addActionListener(actionHandler);
+
+ ignoreCase = new JCheckBox(jEdit.getProperty("search.case"));
+ ignoreCase.setMnemonic(jEdit.getProperty("search.case.mnemonic")
+ .charAt(0));
+ searchSettings.add(ignoreCase);
+ ignoreCase.addActionListener(actionHandler);
+
+ searchForward = new JRadioButton(jEdit.getProperty("search.forward"));
+ searchForward.setMnemonic(jEdit.getProperty("search.forward.mnemonic")
+ .charAt(0));
+ direction.add(searchForward);
+ searchSettings.add(searchForward);
+ searchForward.addActionListener(actionHandler);
+
+ searchAllBuffers = new JRadioButton(jEdit.getProperty("search.all"));
+ searchAllBuffers.setMnemonic(jEdit.getProperty("search.all.mnemonic")
+ .charAt(0));
+ fileset.add(searchAllBuffers);
+ searchSettings.add(searchAllBuffers);
+ searchAllBuffers.addActionListener(actionHandler);
+
+ regexp = new JCheckBox(jEdit.getProperty("search.regexp"));
+ regexp.setMnemonic(jEdit.getProperty("search.regexp.mnemonic")
+ .charAt(0));
+ searchSettings.add(regexp);
+ regexp.addActionListener(actionHandler);
+
+ wrap = new JCheckBox(jEdit.getProperty("search.wrap"));
+ wrap.setMnemonic(jEdit.getProperty("search.wrap.mnemonic")
+ .charAt(0));
+ searchSettings.add(wrap);
+ wrap.addActionListener(actionHandler);
+
+ searchDirectory = new JRadioButton(jEdit.getProperty("search.directory"));
+ searchDirectory.setMnemonic(jEdit.getProperty("search.directory.mnemonic")
+ .charAt(0));
+ fileset.add(searchDirectory);
+ searchSettings.add(searchDirectory);
+ searchDirectory.addActionListener(actionHandler);
+
+ hyperSearch = new JCheckBox(jEdit.getProperty("search.hypersearch"));
+ hyperSearch.setMnemonic(jEdit.getProperty("search.hypersearch.mnemonic")
+ .charAt(0));
+ searchSettings.add(hyperSearch);
+ hyperSearch.addActionListener(actionHandler);
+
+ return searchSettings;
+ } //}}}
+
+ //{{{ createMultiFilePanel() method
+ private JPanel createMultiFilePanel()
+ {
+ JPanel multifile = new JPanel();
+
+ GridBagLayout layout = new GridBagLayout();
+ multifile.setLayout(layout);
+
+ GridBagConstraints cons = new GridBagConstraints();
+ cons.gridy = cons.gridwidth = cons.gridheight = 1;
+ cons.anchor = GridBagConstraints.WEST;
+ cons.fill = GridBagConstraints.HORIZONTAL;
+
+ MultiFileActionHandler actionListener = new MultiFileActionHandler();
+ filter = new HistoryTextField("search.filter");
+
+ filter.setToolTipText(jEdit.getProperty("glob.tooltip"));
+ filter.addActionListener(actionListener);
+
+ cons.insets = new Insets(0,0,3,0);
+
+ JLabel label = new JLabel(jEdit.getProperty("search.filterField"),
+ SwingConstants.RIGHT);
+ label.setBorder(new EmptyBorder(0,0,0,12));
+ label.setDisplayedMnemonic(jEdit.getProperty("search.filterField.mnemonic")
+ .charAt(0));
+ label.setLabelFor(filter);
+ cons.weightx = 0.0;
+ layout.setConstraints(label,cons);
+ multifile.add(label);
+
+ cons.gridwidth = 2;
+ cons.insets = new Insets(0,0,3,6);
+ cons.weightx = 1.0;
+ layout.setConstraints(filter,cons);
+ multifile.add(filter);
+
+ cons.gridwidth = 1;
+ cons.weightx = 0.0;
+ cons.insets = new Insets(0,0,3,0);
+
+ synchronize = new JButton(jEdit.getProperty(
+ "search.synchronize"));
+ synchronize.setToolTipText(jEdit.getProperty(
+ "search.synchronize.tooltip"));
+ synchronize.setMnemonic(jEdit.getProperty(
+ "search.synchronize.mnemonic")
+ .charAt(0));
+ synchronize.addActionListener(actionListener);
+ layout.setConstraints(synchronize,cons);
+ multifile.add(synchronize);
+
+ cons.gridy++;
+
+ directory = new HistoryTextField("search.directory");
+ directory.setColumns(25);
+ directory.addActionListener(actionListener);
+
+ label = new JLabel(jEdit.getProperty("search.directoryField"),
+ SwingConstants.RIGHT);
+ label.setBorder(new EmptyBorder(0,0,0,12));
+
+ label.setDisplayedMnemonic(jEdit.getProperty("search.directoryField.mnemonic")
+ .charAt(0));
+ label.setLabelFor(directory);
+ cons.insets = new Insets(0,0,3,0);
+ cons.weightx = 0.0;
+ layout.setConstraints(label,cons);
+ multifile.add(label);
+
+ cons.insets = new Insets(0,0,3,6);
+ cons.weightx = 1.0;
+ cons.gridwidth = 2;
+ layout.setConstraints(directory,cons);
+ multifile.add(directory);
+
+ choose = new JButton(jEdit.getProperty("search.choose"));
+ choose.setMnemonic(jEdit.getProperty("search.choose.mnemonic")
+ .charAt(0));
+ cons.insets = new Insets(0,0,3,0);
+ cons.weightx = 0.0;
+ cons.gridwidth = 1;
+ layout.setConstraints(choose,cons);
+ multifile.add(choose);
+ choose.addActionListener(actionListener);
+
+ cons.insets = new Insets(0,0,0,0);
+ cons.gridy++;
+ cons.gridwidth = 3;
+
+ JPanel dirCheckBoxPanel = new JPanel();
+ searchSubDirectories = new JCheckBox(jEdit.getProperty(
+ "search.subdirs"));
+ String mnemonic = jEdit.getProperty(
+ "search.subdirs.mnemonic");
+ searchSubDirectories.setMnemonic(mnemonic.charAt(0));
+ searchSubDirectories.setSelected(jEdit.getBooleanProperty("search.subdirs.toggle"));
+ skipHidden = new JCheckBox(jEdit.getProperty("search.skipHidden"));
+ skipHidden.setSelected(jEdit.getBooleanProperty("search.skipHidden.toggle", true));
+ skipBinaryFiles = new JCheckBox(jEdit.getProperty("search.skipBinary"));
+ skipBinaryFiles.setSelected(jEdit.getBooleanProperty("search.skipBinary.toggle", true));
+ dirCheckBoxPanel.add(searchSubDirectories);
+ dirCheckBoxPanel.add(skipHidden);
+ dirCheckBoxPanel.add(skipBinaryFiles);
+
+ cons.insets = new Insets(0, 0, 0, 0);
+ cons.gridy++;
+ cons.gridwidth = 4;
+ layout.setConstraints(dirCheckBoxPanel, cons);
+
+ multifile.add(dirCheckBoxPanel);
+
+ return multifile;
+ } //}}}
+
+ //{{{ createButtonsPanel() method
+ private Box createButtonsPanel()
+ {
+ Box box = new Box(BoxLayout.Y_AXIS);
+
+ ButtonActionHandler actionHandler = new ButtonActionHandler();
+
+ box.add(Box.createVerticalStrut(12));
+
+ JPanel grid = new JPanel(new GridLayout(5,1,0,12));
+
+ findBtn = new JButton(jEdit.getProperty("search.findBtn"));
+ /* findBtn.setMnemonic(jEdit.getProperty("search.findBtn.mnemonic")
+ .charAt(0)); */
+ getRootPane().setDefaultButton(findBtn);
+ grid.add(findBtn);
+ findBtn.addActionListener(actionHandler);
+
+ replaceBtn = new JButton(jEdit.getProperty("search.replaceBtn", "Replace"));
+ /* replaceBtn.setMnemonic(jEdit.getProperty("search.replaceBtn.mnemonic")
+ .charAt(0)); */
+ grid.add(replaceBtn);
+ replaceBtn.addActionListener(actionHandler);
+
+ replaceAndFindBtn = new JButton(jEdit.getProperty("search.replaceAndFindBtn"));
+ replaceAndFindBtn.setMnemonic(jEdit.getProperty("search.replaceAndFindBtn.mnemonic")
+ .charAt(0));
+ grid.add(replaceAndFindBtn);
+ replaceAndFindBtn.addActionListener(actionHandler);
+
+ replaceAllBtn = new JButton(jEdit.getProperty("search.replaceAllBtn"));
+ replaceAllBtn.setMnemonic(jEdit.getProperty("search.replaceAllBtn.mnemonic")
+ .charAt(0));
+ grid.add(replaceAllBtn);
+ replaceAllBtn.addActionListener(actionHandler);
+
+ closeBtn = new JButton(jEdit.getProperty("common.close"));
+ grid.add(closeBtn);
+ closeBtn.addActionListener(actionHandler);
+
+ grid.setMaximumSize(grid.getPreferredSize());
+
+ box.add(grid);
+ box.add(Box.createGlue());
+
+ return box;
+ } //}}}
+
+ //{{{ updateEnabled() method
+ private void updateEnabled()
+ {
+ wrap.setEnabled(!hyperSearch.isSelected()
+ && !searchSelection.isSelected());
+
+ boolean reverseEnabled = !hyperSearch.isSelected()
+ && searchCurrentBuffer.isSelected();
+ searchBack.setEnabled(reverseEnabled);
+ searchForward.setEnabled(reverseEnabled);
+ if(!reverseEnabled)
+ searchForward.setSelected(true);
+
+ filter.setEnabled(searchAllBuffers.isSelected()
+ || searchDirectory.isSelected());
+
+ boolean searchDirs = searchDirectory.isSelected();
+ directory.setEnabled(searchDirs);
+ choose.setEnabled(searchDirs);
+ searchSubDirectories.setEnabled(searchDirs);
+ skipHidden.setEnabled(searchDirs);
+ skipBinaryFiles.setEnabled(searchDirs);
+
+ synchronize.setEnabled(searchAllBuffers.isSelected()
+ || searchDirectory.isSelected());
+
+ findBtn.setEnabled(!searchSelection.isSelected()
+ || hyperSearch.isSelected());
+ replaceBtn.setEnabled(!hyperSearch.isSelected()
+ && !searchSelection.isSelected());
+ replaceAndFindBtn.setEnabled(!hyperSearch.isSelected()
+ && !searchSelection.isSelected());
+ } //}}}
+
+ //{{{ save() method
+ /**
+ * @param cancel If true, we don't bother the user with warning messages
+ */
+ private boolean save(boolean cancel)
+ {
+ try
+ {
+ // prevents us from handling SearchSettingsChanged
+ // as a result of below
+ saving = true;
+ SearchAndReplace.setIgnoreCase(ignoreCase.isSelected());
+ SearchAndReplace.setRegexp(regexp.isSelected());
+ SearchAndReplace.setReverseSearch(searchBack.isSelected());
+ SearchAndReplace.setAutoWrapAround(wrap.isSelected());
+ jEdit.setBooleanProperty("search.subdirs.toggle", searchSubDirectories.isSelected());
+ jEdit.setBooleanProperty("search.skipHidden.toggle", skipHidden.isSelected());
+ jEdit.setBooleanProperty("search.skipBinary.toggle", skipBinaryFiles.isSelected());
+
+ String filter = this.filter.getText();
+ this.filter.addCurrentToHistory();
+ if(filter.length() == 0)
+ filter = "*";
+
+ SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
+
+ boolean recurse = searchSubDirectories.isSelected();
+
+ if(searchSelection.isSelected())
+ fileset = new CurrentBufferSet();
+ else if(searchCurrentBuffer.isSelected())
+ {
+ fileset = new CurrentBufferSet();
+
+ jEdit.setBooleanProperty("search.hypersearch.toggle",
+ hyperSearch.isSelected());
+ }
+ else if(searchAllBuffers.isSelected())
+ fileset = new AllBufferSet(filter);
+ else if(searchDirectory.isSelected())
+ {
+ String directory = this.directory.getText();
+ this.directory.addCurrentToHistory();
+ directory = MiscUtilities.constructPath(
+ view.getBuffer().getDirectory(),directory);
+
+ if((VFSManager.getVFSForPath(directory).getCapabilities()
+ & VFS.LOW_LATENCY_CAP) == 0)
+ {
+ if(cancel)
+ return false;
+
+ int retVal = GUIUtilities.confirm(
+ this,"remote-dir-search",
+ null,JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if(retVal != JOptionPane.YES_OPTION)
+ return false;
+ }
+
+ if(fileset instanceof DirectoryListSet)
+ {
+ DirectoryListSet dset = (DirectoryListSet)fileset;
+ dset.setDirectory(directory);
+ dset.setFileFilter(filter);
+ dset.setRecursive(recurse);
+ EditBus.send(new SearchSettingsChanged(null));
+ }
+ else
+ fileset = new DirectoryListSet(directory,filter,recurse);
+ }
+ else
+ {
+ // can't happen
+ fileset = null;
+ }
+
+ jEdit.setBooleanProperty("search.subdirs.toggle",
+ recurse);
+ jEdit.setBooleanProperty("search.keepDialog.toggle",
+ keepDialog.isSelected());
+
+ SearchAndReplace.setSearchFileSet(fileset);
+
+ replace.addCurrentToHistory();
+ SearchAndReplace.setReplaceString(replace.getText());
+
+ if(find.getText().length() == 0)
+ {
+ if(!cancel)
+ getToolkit().beep();
+ return false;
+ }
+
+ find.addCurrentToHistory();
+ SearchAndReplace.setSearchString(find.getText());
+
+ return true;
+ }
+ finally
+ {
+ saving = false;
+ }
+ } //}}}
+
+ //{{{ closeOrKeepDialog() method
+ private void closeOrKeepDialog()
+ {
+ if(keepDialog.isSelected())
+ {
+ // Windows bug workaround in case a YES/NO confirm
+ // was shown
+
+ // ... but if HyperSearch results window is floating,
+ // the workaround causes problems!
+ if(!hyperSearch.isSelected())
+ {
+ toFront();
+ requestFocus();
+ find.requestFocus();
+ }
+ }
+ else
+ {
+ GUIUtilities.saveGeometry(this,"search");
+ setVisible(false);
+ }
+ } //}}}
+
+ //{{{ load() method
+ private void load()
+ {
+ ignoreCase.setSelected(SearchAndReplace.getIgnoreCase());
+ regexp.setSelected(SearchAndReplace.getRegexp());
+ wrap.setSelected(SearchAndReplace.getAutoWrapAround());
+
+ if(SearchAndReplace.getReverseSearch())
+ searchBack.setSelected(true);
+ else
+ searchForward.setSelected(true);
+
+ if(SearchAndReplace.getBeanShellReplace())
+ {
+ replace.setModel("replace.script");
+ beanShellReplace.setSelected(true);
+ }
+ else
+ {
+ replace.setModel("replace");
+ stringReplace.setSelected(true);
+ }
+
+ SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
+
+ HistoryModel model = filter.getModel();
+ if(model.getSize() != 0)
+ filter.setText(model.getItem(0));
+ else
+ {
+ filter.setText('*' + MiscUtilities
+ .getFileExtension(view.getBuffer()
+ .getName()));
+ }
+ model = directory.getModel();
+ if(model.getSize() != 0)
+ directory.setText(model.getItem(0));
+ else
+ directory.setText(view.getBuffer().getDirectory());
+
+ searchSubDirectories.setSelected(jEdit.getBooleanProperty(
+ "search.subdirs.toggle"));
+
+ if(fileset instanceof DirectoryListSet)
+ {
+ filter.setText(((DirectoryListSet)fileset)
+ .getFileFilter());
+ directory.setText(((DirectoryListSet)fileset)
+ .getDirectory());
+ searchSubDirectories.setSelected(((DirectoryListSet)fileset)
+ .isRecursive());
+ }
+ else if(fileset instanceof AllBufferSet)
+ {
+ filter.setText(((AllBufferSet)fileset)
+ .getFileFilter());
+ }
+
+ directory.addCurrentToHistory();
+
+ keepDialog.setSelected(jEdit.getBooleanProperty(
+ "search.keepDialog.toggle"));
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ MyJRadioButton class
+
+ // used for the stringReplace and beanShell replace radio buttons,
+ // so that the user can press tab to go from the find field to the
+ // replace field in one go
+ static class MyJRadioButton extends JRadioButton
+ {
+ MyJRadioButton(String label)
+ {
+ super(label);
+ }
+
+ @Override
+ public boolean isFocusable()
+ {
+ return false;
+ }
+ } //}}}
+
+ //{{{ ReplaceActionHandler class
+ class ReplaceActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ replace.setModel(beanShellReplace.isSelected()
+ ? "replace.script"
+ : "replace");
+ SearchAndReplace.setBeanShellReplace(
+ beanShellReplace.isSelected());
+ }
+ } //}}}
+
+ //{{{ SettingsActionHandler class
+ class SettingsActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+
+ if(source == searchCurrentBuffer)
+ hyperSearch.setSelected(false);
+ else if(source == searchSelection
+ || source == searchAllBuffers
+ || source == searchDirectory)
+ hyperSearch.setSelected(true);
+
+ save(true);
+ updateEnabled();
+ }
+ } //}}}
+
+ //{{{ MultiFileActionHandler class
+ class MultiFileActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(evt.getSource() == choose)
+ {
+ String[] dirs = GUIUtilities.showVFSFileDialog(
+ SearchDialog.this,
+ view,directory.getText(),
+ VFSBrowser.CHOOSE_DIRECTORY_DIALOG,
+ false);
+ if(dirs != null)
+ directory.setText(dirs[0]);
+ }
+ else if(evt.getSource() == synchronize)
+ {
+ synchronizeMultiFileSettings();
+ }
+ else // source is directory or filter field
+ {
+ // just as if Enter was pressed in another
+ // text field
+ ok();
+ }
+ }
+
+
+ //{{{ synchronizeMultiFileSettings() method
+ private void synchronizeMultiFileSettings()
+ {
+ directory.setText(view.getBuffer().getDirectory());
+
+ SearchFileSet fileset = SearchAndReplace.getSearchFileSet();
+
+ if(fileset instanceof AllBufferSet)
+ {
+ filter.setText(((AllBufferSet)fileset)
+ .getFileFilter());
+ }
+ else
+ {
+ filter.setText('*' + MiscUtilities
+ .getFileExtension(view.getBuffer()
+ .getName()));
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ ButtonActionHandler class
+ class ButtonActionHandler implements ActionListener
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ Object source = evt.getSource();
+
+ if(source == closeBtn)
+ cancel();
+ else if(source == findBtn || source == find
+ || source == replace)
+ {
+ ok();
+ }
+ else if (source == replaceBtn)
+ {
+ save(false);
+ SearchAndReplace.replace(view);
+ }
+ else if(source == replaceAndFindBtn)
+ {
+ save(false);
+ if(SearchAndReplace.replace(view))
+ ok();
+ else
+ getToolkit().beep();
+ }
+ else if(source == replaceAllBtn)
+ {
+ if(searchSelection.isSelected() &&
+ view.getTextArea().getSelectionCount()
+ == 0)
+ {
+ GUIUtilities.error(view,"search-no-selection",null);
+ return;
+ }
+
+ setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+
+ if(!save(false))
+ {
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ getToolkit().beep();
+ return;
+ }
+
+ if(searchSelection.isSelected())
+ {
+ if(SearchAndReplace.replace(view))
+ closeOrKeepDialog();
+ else
+ getToolkit().beep();
+ }
+ else
+ {
+ if(SearchAndReplace.replaceAll(view))
+ closeOrKeepDialog();
+ else
+ getToolkit().beep();
+ }
+
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ }
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/SearchFileSet.java b/jEdit/org/gjt/sp/jedit/search/SearchFileSet.java
index 0f66c16..e32d2cf 100644
--- a/jEdit/org/gjt/sp/jedit/search/SearchFileSet.java
+++ b/jEdit/org/gjt/sp/jedit/search/SearchFileSet.java
@@ -1,59 +1,59 @@
-/*
- * SearchFileSet.java - Abstract file matcher interface
- * Copyright (C) 1999, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-import org.gjt.sp.jedit.*;
-
-/**
- * An abstract interface representing a set of files.
- * @author Slava Pestov
- * @version $Id: SearchFileSet.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public interface SearchFileSet
-{
- /**
- * Returns the first file to search.
- * @param view The view performing the search
- */
- String getFirstFile(View view);
-
- /**
- * Returns the next file to search.
- * @param view The view performing the search
- * @param path The last file searched
- */
- String getNextFile(View view, String path);
-
- /**
- * Returns all path names in this file set.
- * @param view The view performing the search
- */
- String[] getFiles(View view);
-
- /**
- * Returns the number of files in this file set.
- */
- int getFileCount(View view);
-
- /**
- * Returns the BeanShell code that will recreate this file set.
- */
- String getCode();
-}
+/*
+ * SearchFileSet.java - Abstract file matcher interface
+ * Copyright (C) 1999, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+import org.gjt.sp.jedit.*;
+
+/**
+ * An abstract interface representing a set of files.
+ * @author Slava Pestov
+ * @version $Id: SearchFileSet.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public interface SearchFileSet
+{
+ /**
+ * Returns the first file to search.
+ * @param view The view performing the search
+ */
+ String getFirstFile(View view);
+
+ /**
+ * Returns the next file to search.
+ * @param view The view performing the search
+ * @param path The last file searched
+ */
+ String getNextFile(View view, String path);
+
+ /**
+ * Returns all path names in this file set.
+ * @param view The view performing the search
+ */
+ String[] getFiles(View view);
+
+ /**
+ * Returns the number of files in this file set.
+ */
+ int getFileCount(View view);
+
+ /**
+ * Returns the BeanShell code that will recreate this file set.
+ */
+ String getCode();
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/SearchMatcher.java b/jEdit/org/gjt/sp/jedit/search/SearchMatcher.java
index f973182..2026bd6 100644
--- a/jEdit/org/gjt/sp/jedit/search/SearchMatcher.java
+++ b/jEdit/org/gjt/sp/jedit/search/SearchMatcher.java
@@ -1,65 +1,62 @@
-/*
- * SearchMatcher.java - Abstract string matcher interface
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.search;
-
-/**
- * An abstract class for matching strings.
- * @author Slava Pestov
- * @version $Id: SearchMatcher.java 13907 2008-10-19 08:22:44Z k_satoda $
- */
-public abstract class SearchMatcher
-{
- public SearchMatcher()
- {
- returnValue = new Match();
- }
-
- /**
- * Returns the offset of the first match of the specified text
- * within this matcher.
- * @param text The text to search in
- * @param start True if the start of the segment is the beginning of the
- * buffer
- * @param end True if the end of the segment is the end of the buffer
- * @param firstTime If false and the search string matched at the start
- * offset with length zero, automatically find next match
- * @param reverse If true, searching will be performed in a backward
- * direction.
- * @return an array where the first element is the start offset
- * of the match, and the second element is the end offset of
- * the match
- * @since jEdit 4.3pre5
- */
- public abstract Match nextMatch(CharSequence text, boolean start,
- boolean end, boolean firstTime, boolean reverse);
-
- protected Match returnValue;
-
- //{{{ Match class
- public static class Match
- {
- public int start;
- public int end;
- public String[] substitutions;
- } //}}}
-}
+/*
+ * SearchMatcher.java - Abstract string matcher interface
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.search;
+
+/**
+ * An abstract class for matching strings.
+ * @author Slava Pestov
+ * @version $Id: SearchMatcher.java 19553 2011-06-09 01:23:57Z ezust $
+ */
+public abstract class SearchMatcher
+{
+ public SearchMatcher()
+ {
+ returnValue = new Match();
+ }
+
+ /**
+ * Returns the offset of the first match of the specified text
+ * within this matcher.
+ * @param text The text to search in
+ * @param start True if the start of the text is the beginning of a line
+ * @param end True if the end of the text is the end of a line
+ * @param firstTime If false and the search string matched at the start
+ * offset with length zero, automatically find next match
+ * @param reverse If true, searching will be performed in a backward
+ * direction.
+ * @return A {@link Match} object.
+ * @since jEdit 4.3pre5
+ */
+ public abstract Match nextMatch(CharSequence text, boolean start,
+ boolean end, boolean firstTime, boolean reverse);
+
+ protected Match returnValue;
+
+ //{{{ Match class
+ public static class Match
+ {
+ public int start;
+ public int end;
+ public String[] substitutions;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/search/package.html b/jEdit/org/gjt/sp/jedit/search/package.html
index 1a15eb0..37f9906 100644
--- a/jEdit/org/gjt/sp/jedit/search/package.html
+++ b/jEdit/org/gjt/sp/jedit/search/package.html
@@ -1 +1 @@
-<html><body>Search and replace classes.</body></html>
+<html><body>Search and replace classes.</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/services.dtd b/jEdit/org/gjt/sp/jedit/services.dtd
index 3e87cd8..a8d802e 100644
--- a/jEdit/org/gjt/sp/jedit/services.dtd
+++ b/jEdit/org/gjt/sp/jedit/services.dtd
@@ -1,8 +1,8 @@
-<!-- SERVICES element -->
-<!ELEMENT SERVICES ( SERVICE+ ) >
-
-<!-- SERVICE element -->
-<!ELEMENT SERVICE ( #PCDATA ) >
-<!ATTLIST SERVICE
- NAME CDATA #REQUIRED
- CLASS CDATA #REQUIRED >
+<!-- SERVICES element -->
+<!ELEMENT SERVICES ( SERVICE+ ) >
+
+<!-- SERVICE element -->
+<!ELEMENT SERVICE ( #PCDATA ) >
+<!ATTLIST SERVICE
+ NAME CDATA #REQUIRED
+ CLASS CDATA #REQUIRED >
diff --git a/jEdit/org/gjt/sp/jedit/services.xml b/jEdit/org/gjt/sp/jedit/services.xml
index 73a418c..2107fc5 100644
--- a/jEdit/org/gjt/sp/jedit/services.xml
+++ b/jEdit/org/gjt/sp/jedit/services.xml
@@ -1,149 +1,156 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE SERVICES SYSTEM "services.dtd">
-
-<SERVICES>
- <!-- Virtual file systems -->
- <SERVICE CLASS="org.gjt.sp.jedit.io.VFS" NAME="favorites">
- new FavoritesVFS();
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.io.VFS" NAME="roots">
- new FileRootsVFS();
- </SERVICE>
-
- <!-- Fold handlers -->
- <SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="explicit">
- new ExplicitFoldHandler();
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="indent">
- new IndentFoldHandler();
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="none">
- new DummyFoldHandler();
- </SERVICE>
-
- <!-- Fold painters -->
- <SERVICE CLASS="org.gjt.sp.jedit.textarea.FoldPainter" NAME="Triangle">
- new TriangleFoldPainter();
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.textarea.FoldPainter" NAME="Square">
- new SquareFoldPainter();
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.textarea.FoldPainter" NAME="Circle">
- new CircleFoldPainter();
- </SERVICE>
-
- <!-- Extended encodings -->
- <!-- Not supported by Java -->
- <SERVICE CLASS="org.gjt.sp.jedit.io.Encoding" NAME="UTF-8Y">
- new EncodingWithBOM("UTF-8");
- </SERVICE>
- <!-- Supported by Java SE 6.
- The followings are workarounds (and used only) for older
- environments. -->
- <SERVICE CLASS="org.gjt.sp.jedit.io.Encoding" NAME="x-UTF-16LE-BOM">
- new EncodingWithBOM("UTF-16LE");
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.io.Encoding" NAME="X-UTF-32LE-BOM">
- new EncodingWithBOM("UTF-32LE");
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.io.Encoding" NAME="X-UTF-32BE-BOM">
- new EncodingWithBOM("UTF-32BE");
- </SERVICE>
-
- <!-- Encoding detectors -->
- <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="BOM">
- new EncodingWithBOM.Detector();
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="XML-PI">
- new XMLEncodingDetector();
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="buffer-local-property">
- new RegexEncodingDetector(":encoding=([^:]+):", "$1");
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="html">
- new RegexEncodingDetector(
- "\\bcharset=(" + RegexEncodingDetector.VALID_ENCODING_PATTERN + ")",
- "$1");
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="python">
- new RegexEncodingDetector(
- "coding[=:]\\s*(" + RegexEncodingDetector.VALID_ENCODING_PATTERN + ")",
- "$1");
- </SERVICE>
-
-
- <!-- {{{ Status Bar widgets -->
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="mode">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new ModeWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="fold">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new FoldWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="encoding">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new EncodingWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="wrap">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new WrapWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="multiSelect">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new MultiSelectWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="rectSelect">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new RectSelectWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="overwrite">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new OverwriteWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="lineSep">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new LineSepWidgetFactory();
- </SERVICE>
-
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="memory-status">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new MemoryStatusWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="clock">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new ClockWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="errors">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new ErrorsWidgetFactory();
- </SERVICE>
-
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="buffersets">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new BufferSetWidgetFactory();
- </SERVICE>
- <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="selection-length">
- import org.gjt.sp.jedit.gui.statusbar.*;
- new SelectionLengthWidgetFactory();
- </SERVICE>
- <!-- }}} -->
- <!--jEdit.setProperty("view.status"," mode , fold , encoding ) wrap multiSelect rectSelect overwrite lineSep memory-status clock")-->
-
- <!-- Docking framework -->
- <SERVICE CLASS="org.gjt.sp.jedit.gui.DockingFrameworkProvider" NAME="Original">
- new org.gjt.sp.jedit.gui.DockableWindowManagerProvider();
- </SERVICE>
-
-</SERVICES>
+<?xml version="1.0"?>
+
+<!DOCTYPE SERVICES SYSTEM "services.dtd">
+
+<SERVICES>
+ <!-- Virtual file systems -->
+ <SERVICE CLASS="org.gjt.sp.jedit.io.VFS" NAME="favorites">
+ new FavoritesVFS();
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.io.VFS" NAME="roots">
+ new FileRootsVFS();
+ </SERVICE>
+
+ <!-- Fold handlers -->
+ <SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="explicit">
+ new ExplicitFoldHandler();
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="indent">
+ new IndentFoldHandler();
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="none">
+ new DummyFoldHandler();
+ </SERVICE>
+
+ <!-- Fold painters -->
+ <SERVICE CLASS="org.gjt.sp.jedit.textarea.FoldPainter" NAME="Triangle">
+ new TriangleFoldPainter();
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.textarea.FoldPainter" NAME="Square">
+ new SquareFoldPainter();
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.textarea.FoldPainter" NAME="Circle">
+ new CircleFoldPainter();
+ </SERVICE>
+
+ <!-- Extended encodings -->
+ <!-- Not supported by Java -->
+ <SERVICE CLASS="org.gjt.sp.jedit.io.Encoding" NAME="UTF-8Y">
+ new EncodingWithBOM("UTF-8");
+ </SERVICE>
+ <!-- Supported by Java SE 6.
+ The followings are workarounds (and used only) for older
+ environments. -->
+ <SERVICE CLASS="org.gjt.sp.jedit.io.Encoding" NAME="x-UTF-16LE-BOM">
+ new EncodingWithBOM("UTF-16LE");
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.io.Encoding" NAME="X-UTF-32LE-BOM">
+ new EncodingWithBOM("UTF-32LE");
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.io.Encoding" NAME="X-UTF-32BE-BOM">
+ new EncodingWithBOM("UTF-32BE");
+ </SERVICE>
+
+ <!-- Encoding detectors -->
+ <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="BOM">
+ new EncodingWithBOM.Detector();
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="XML-PI">
+ new XMLEncodingDetector();
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="buffer-local-property">
+ new RegexEncodingDetector(":encoding=([^:]+):", "$1");
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="html">
+ new RegexEncodingDetector(
+ "\\bcharset=(" + RegexEncodingDetector.VALID_ENCODING_PATTERN + ")",
+ "$1");
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="python">
+ new RegexEncodingDetector(
+ "coding[=:]\\s*(" + RegexEncodingDetector.VALID_ENCODING_PATTERN + ")",
+ "$1");
+ </SERVICE>
+
+
+ <!-- {{{ Status Bar widgets -->
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="mode">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new ModeWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="fold">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new FoldWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="encoding">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new EncodingWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="wrap">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new WrapWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="multiSelect">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new MultiSelectWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="rectSelect">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new RectSelectWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="overwrite">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new OverwriteWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="lineSep">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new LineSepWidgetFactory();
+ </SERVICE>
+
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="memory-status">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new MemoryStatusWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="clock">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new ClockWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="errors">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new ErrorsWidgetFactory();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="buffersets">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new BufferSetWidgetFactory();
+ </SERVICE>
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.statusbar.StatusWidget" NAME="selection-length">
+ import org.gjt.sp.jedit.gui.statusbar.*;
+ new SelectionLengthWidgetFactory();
+ </SERVICE>
+ <!-- }}} -->
+ <!--jEdit.setProperty("view.status"," mode , fold , encoding ) wrap multiSelect rectSelect overwrite lineSep memory-status clock")-->
+
+ <!-- Docking framework -->
+ <SERVICE CLASS="org.gjt.sp.jedit.gui.DockingFrameworkProvider" NAME="Original">
+ new org.gjt.sp.jedit.gui.DockableWindowManagerProvider();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.datatransfer.JEditTransferableService" NAME="string">
+ new org.gjt.sp.jedit.datatransfer.StringTransferableService();
+ </SERVICE>
+
+ <SERVICE CLASS="org.gjt.sp.jedit.datatransfer.JEditTransferableService" NAME="application/x-java-jEdit-rich-text">
+ new org.gjt.sp.jedit.datatransfer.RichJEditTextTransferableService();
+ </SERVICE>
+</SERVICES>
diff --git a/jEdit/org/gjt/sp/jedit/syntax/Chunk.java b/jEdit/org/gjt/sp/jedit/syntax/Chunk.java
index 05eb089..00b334d 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/Chunk.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/Chunk.java
@@ -1,373 +1,588 @@
-/*
- * Chunk.java - A syntax token with extra information required for painting it
- * on screen
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.syntax;
-
-//{{{ Imports
-import javax.swing.text.*;
-import java.awt.font.*;
-import java.awt.geom.*;
-import java.awt.*;
-
-import org.gjt.sp.jedit.Debug;
-//}}}
-
-/**
- * A syntax token with extra information required for painting it
- * on screen.
- * @since jEdit 4.1pre1
- */
-public class Chunk extends Token
-{
- //{{{ Static variables
- private static final char[] EMPTY_TEXT = new char[0];
- //}}}
-
- //{{{ paintChunkList() method
- /**
- * Paints a chunk list.
- * @param chunks The chunk list
- * @param gfx The graphics context
- * @param x The x co-ordinate
- * @param y The y co-ordinate
- * @param glyphVector true if we want to use glyphVector, false if we
- * want to use drawString
- * @return The width of the painted text
- * @since jEdit 4.2pre1
- */
- public static float paintChunkList(Chunk chunks,
- Graphics2D gfx, float x, float y, boolean glyphVector)
- {
- Rectangle clipRect = gfx.getClipBounds();
-
- float _x = 0.0f;
-
- while(chunks != null)
- {
- // only paint visible chunks
- if(x + _x + chunks.width > clipRect.x
- && x + _x < clipRect.x + clipRect.width)
- {
- // Useful for debugging purposes
- if(Debug.CHUNK_PAINT_DEBUG)
- {
- gfx.draw(new Rectangle2D.Float(x + _x,y - 10,
- chunks.width,10));
- }
-
- if(chunks.accessable && chunks.visible)
- {
- gfx.setFont(chunks.style.getFont());
- gfx.setColor(chunks.style.getForegroundColor());
-
- if(glyphVector && chunks.gv != null)
- gfx.drawGlyphVector(chunks.gv,x + _x,y);
- else if(chunks.str != null)
- {
- gfx.drawString(chunks.str,
- (int)(x + _x),(int)y);
- }
- }
- }
-
- _x += chunks.width;
- chunks = (Chunk)chunks.next;
- }
-
- return _x;
- } //}}}
-
- //{{{ paintChunkBackgrounds() method
- /**
- * Paints the background highlights of a chunk list.
- * @param chunks The chunk list
- * @param gfx The graphics context
- * @param x The x co-ordinate
- * @param y The y co-ordinate
- * @return The width of the painted backgrounds
- * @since jEdit 4.2pre1
- */
- public static float paintChunkBackgrounds(Chunk chunks,
- Graphics2D gfx, float x, float y)
- {
- Rectangle clipRect = gfx.getClipBounds();
-
- float _x = 0.0f;
-
- FontMetrics forBackground = gfx.getFontMetrics();
-
- int ascent = forBackground.getAscent();
- int height = forBackground.getHeight();
-
- while(chunks != null)
- {
- // only paint visible chunks
- if(x + _x + chunks.width > clipRect.x
- && x + _x < clipRect.x + clipRect.width)
- {
- if(chunks.accessable)
- {
- //{{{ Paint token background color if necessary
- Color bgColor = chunks.background;
- if(bgColor != null)
- {
- gfx.setColor(bgColor);
-
- gfx.fill(new Rectangle2D.Float(
- x + _x,y - ascent,
- _x + chunks.width - _x,
- height));
- } //}}}
- }
- }
-
- _x += chunks.width;
- chunks = (Chunk)chunks.next;
- }
-
- return _x;
- } //}}}
-
- //{{{ offsetToX() method
- /**
- * Converts an offset in a chunk list into an x co-ordinate.
- * @param chunks The chunk list
- * @param offset The offset
- * @since jEdit 4.1pre1
- */
- public static float offsetToX(Chunk chunks, int offset)
- {
- if(chunks != null && offset < chunks.offset)
- {
- throw new ArrayIndexOutOfBoundsException(offset + " < "
- + chunks.offset);
- }
-
- float x = 0.0f;
-
- while(chunks != null)
- {
- if(chunks.accessable && offset < chunks.offset + chunks.length)
- return x + chunks.offsetToX(offset - chunks.offset);
-
- x += chunks.width;
- chunks = (Chunk)chunks.next;
- }
-
- return x;
- } //}}}
-
- //{{{ xToOffset() method
- /**
- * Converts an x co-ordinate in a chunk list into an offset.
- * @param chunks The chunk list
- * @param x The x co-ordinate
- * @param round Round up to next letter if past the middle of a letter?
- * @return The offset within the line, or -1 if the x co-ordinate is too
- * far to the right
- * @since jEdit 4.1pre1
- */
- public static int xToOffset(Chunk chunks, float x, boolean round)
- {
- float _x = 0.0f;
-
- while(chunks != null)
- {
- if(chunks.accessable && x < _x + chunks.width)
- return chunks.xToOffset(x - _x,round);
-
- _x += chunks.width;
- chunks = (Chunk)chunks.next;
- }
-
- return -1;
- } //}}}
-
- //{{{ Instance variables
- public boolean accessable;
- public boolean visible;
- public boolean initialized;
-
- // set up after init()
- public SyntaxStyle style;
- // this is either style.getBackgroundColor() or
- // styles[defaultID].getBackgroundColor()
- public Color background;
- public float width;
- public GlyphVector gv;
- public String str;
- //}}}
-
- //{{{ Chunk constructor
- public Chunk(float width, int offset, ParserRuleSet rules)
- {
- super(Token.NULL,offset,0,rules);
- this.width = width;
- } //}}}
-
- //{{{ Chunk constructor
- public Chunk(byte id, int offset, int length, ParserRuleSet rules,
- SyntaxStyle[] styles, byte defaultID)
- {
- super(id,offset,length,rules);
- accessable = true;
- style = styles[id];
- background = style.getBackgroundColor();
- if(background == null)
- background = styles[defaultID].getBackgroundColor();
- } //}}}
-
- //{{{ getPositions() method
- public final float[] getPositions()
- {
- if(gv == null)
- return null;
-
- if(positions == null)
- positions = gv.getGlyphPositions(0,length,null);
-
- return positions;
- } //}}}
-
- //{{{ offsetToX() method
- public final float offsetToX(int offset)
- {
- if(!visible)
- return 0.0f;
- else
- return getPositions()[offset * 2];
- } //}}}
-
- //{{{ xToOffset() method
- public final int xToOffset(float x, boolean round)
- {
- if (!visible)
- {
- if (round && width - x < x)
- return offset + length;
- else
- return offset;
- }
-
- float[] pos = getPositions();
-
- for(int i = 0; i < length; i++)
- {
- float glyphX = pos[i*2];
- float nextX = (i == length - 1
- ? width : pos[i*2+2]);
-
- if(nextX > x)
- {
- if(!round || nextX - x > x - glyphX)
- return offset + i;
- else
- return offset + i + 1;
- }
- }
-
- // wtf?
- return -1;
- } //}}}
-
- //{{{ init() method
- public void init(Segment seg, TabExpander expander, float x,
- FontRenderContext fontRenderContext)
- {
- initialized = true;
-
- if(!accessable)
- {
- // do nothing
- }
- else if(length == 1 && seg.array[seg.offset + offset] == '\t')
- {
- visible = false;
- float newX = expander.nextTabStop(x,offset + length);
- width = newX - x;
- }
- else
- {
- visible = true;
-
- str = new String(seg.array,seg.offset + offset,length);
-
- char[] textArray = seg.array;
- int textStart = seg.offset + offset;
- // {{{ Workaround for a bug in Sun Java 5
- // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6266084
- if (SUN_JAVA_5)
- {
- // textLimit is used as a text count in
- // layoutGlyphVector(). So it works only the
- // case textStart is 0.
- char[] copy = new char[length];
- System.arraycopy(textArray, textStart,
- copy, 0, length);
- textArray = copy;
- textStart = 0;
- } //}}}
- int textLimit = textStart + length;
- // FIXME: Need BiDi support.
- int layoutFlags = Font.LAYOUT_LEFT_TO_RIGHT
- | Font.LAYOUT_NO_START_CONTEXT
- | Font.LAYOUT_NO_LIMIT_CONTEXT;
- Font font = style.getFont();
- gv = font.layoutGlyphVector(
- fontRenderContext,
- textArray, textStart, textLimit, layoutFlags);
- // This is necessary to work around a memory leak in Sun Java 6
- // where the sun.font.GlyphLayout is cached and reused while holding
- // an instance to the char array.
- font.layoutGlyphVector(fontRenderContext, EMPTY_TEXT, 0, 0,
- layoutFlags);
- Rectangle2D logicalBounds = gv.getLogicalBounds();
-
- width = (float)logicalBounds.getWidth();
- }
- } //}}}
-
- //{{{ Private members
- private float[] positions;
-
- // Flag to enable a workaround for a bug in Sun Java 5.
- private static final boolean SUN_JAVA_5;
- static
- {
- boolean sun_java_5 = false;
- String vendor = System.getProperty("java.vendor");
- // Enable the workaround on Apple JVM, too, because the
- // same problem was reported on Mac OS X.
- if (vendor != null && (vendor.startsWith("Sun") ||
- vendor.startsWith("Apple")))
- {
- String version = System.getProperty("java.version");
- if (version != null && version.startsWith("1.5"))
- {
- sun_java_5 = true;
- }
- }
- SUN_JAVA_5 = sun_java_5;
- }
- //}}}
-}
+/*
+ * Chunk.java - A syntax token with extra information required for painting it
+ * on screen
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.syntax;
+
+//{{{ Imports
+import javax.swing.text.*;
+import java.awt.font.*;
+import java.awt.geom.*;
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.jedit.IPropertyManager;
+//}}}
+
+/**
+ * A syntax token with extra information required for painting it
+ * on screen.
+ * @since jEdit 4.1pre1
+ */
+public class Chunk extends Token
+{
+ //{{{ Static variables
+ private static final char[] EMPTY_TEXT = new char[0];
+ //}}}
+
+ //{{{ paintChunkList() method
+ /**
+ * Paints a chunk list.
+ * @param chunks The chunk list
+ * @param gfx The graphics context
+ * @param x The x co-ordinate
+ * @param y The y co-ordinate
+ * @param glyphVector true if we want to use glyphVector, false if we
+ * want to use drawString
+ * @return The width of the painted text
+ * @since jEdit 4.2pre1
+ */
+ public static float paintChunkList(Chunk chunks,
+ Graphics2D gfx, float x, float y, boolean glyphVector)
+ {
+ Rectangle clipRect = gfx.getClipBounds();
+
+ float _x = 0.0f;
+
+ while(chunks != null)
+ {
+ // only paint visible chunks
+ if(x + _x + chunks.width > clipRect.x
+ && x + _x < clipRect.x + clipRect.width)
+ {
+ // Useful for debugging purposes
+ if(Debug.CHUNK_PAINT_DEBUG)
+ {
+ gfx.draw(new Rectangle2D.Float(x + _x,y - 10,
+ chunks.width,10));
+ }
+
+ if(chunks.accessable && chunks.visible)
+ {
+ gfx.setFont(chunks.style.getFont());
+ gfx.setColor(chunks.style.getForegroundColor());
+
+ if (glyphVector && chunks.glyphs != null)
+ chunks.drawGlyphs(gfx, x + _x, y);
+ else if(chunks.str != null)
+ {
+ gfx.drawString(chunks.str,
+ (int)(x + _x),(int)y);
+ }
+ }
+ }
+
+ _x += chunks.width;
+ chunks = (Chunk)chunks.next;
+ }
+
+ return _x;
+ } //}}}
+
+ //{{{ paintChunkBackgrounds() method
+ /**
+ * Paints the background highlights of a chunk list.
+ * @param chunks The chunk list
+ * @param gfx The graphics context
+ * @param x The x co-ordinate
+ * @param y The y co-ordinate
+ * @return The width of the painted backgrounds
+ * @since jEdit 4.2pre1
+ */
+ public static float paintChunkBackgrounds(Chunk chunks,
+ Graphics2D gfx, float x, float y)
+ {
+ Rectangle clipRect = gfx.getClipBounds();
+
+ float _x = 0.0f;
+
+ FontMetrics forBackground = gfx.getFontMetrics();
+
+ int ascent = forBackground.getAscent();
+ int height = forBackground.getHeight();
+
+ while(chunks != null)
+ {
+ // only paint visible chunks
+ if(x + _x + chunks.width > clipRect.x
+ && x + _x < clipRect.x + clipRect.width)
+ {
+ if(chunks.accessable)
+ {
+ //{{{ Paint token background color if necessary
+ Color bgColor = chunks.background;
+ if(bgColor != null)
+ {
+ gfx.setColor(bgColor);
+
+ gfx.fill(new Rectangle2D.Float(
+ x + _x,y - ascent,
+ _x + chunks.width - _x,
+ height));
+ } //}}}
+ }
+ }
+
+ _x += chunks.width;
+ chunks = (Chunk)chunks.next;
+ }
+
+ return _x;
+ } //}}}
+
+ //{{{ offsetToX() method
+ /**
+ * Converts an offset in a chunk list into an x co-ordinate.
+ * @param chunks The chunk list
+ * @param offset The offset
+ * @since jEdit 4.1pre1
+ */
+ public static float offsetToX(Chunk chunks, int offset)
+ {
+ if(chunks != null && offset < chunks.offset)
+ {
+ throw new ArrayIndexOutOfBoundsException(offset + " < "
+ + chunks.offset);
+ }
+
+ float x = 0.0f;
+
+ while(chunks != null)
+ {
+ if(chunks.accessable && offset < chunks.offset + chunks.length)
+ return x + chunks.offsetToX(offset - chunks.offset);
+
+ x += chunks.width;
+ chunks = (Chunk)chunks.next;
+ }
+
+ return x;
+ } //}}}
+
+ //{{{ xToOffset() method
+ /**
+ * Converts an x co-ordinate in a chunk list into an offset.
+ * @param chunks The chunk list
+ * @param x The x co-ordinate
+ * @param round Round up to next letter if past the middle of a letter?
+ * @return The offset within the line, or -1 if the x co-ordinate is too
+ * far to the right
+ * @since jEdit 4.1pre1
+ */
+ public static int xToOffset(Chunk chunks, float x, boolean round)
+ {
+ float _x = 0.0f;
+
+ while(chunks != null)
+ {
+ if(chunks.accessable && x < _x + chunks.width)
+ return chunks.xToOffset(x - _x,round);
+
+ _x += chunks.width;
+ chunks = (Chunk)chunks.next;
+ }
+
+ return -1;
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ /**
+ * Reload internal configuration based on the given properties.
+ *
+ * @param props Configuration properties.
+ *
+ * @since jEdit 4.4pre1
+ */
+ public static void propertiesChanged(IPropertyManager props)
+ {
+ fontSubstList = null;
+ if (props == null)
+ {
+ fontSubstEnabled = false;
+ preferredFonts = null;
+ }
+ else
+ {
+ fontSubstEnabled = Boolean.parseBoolean(props.getProperty("view.enableFontSubst"));
+ }
+
+
+ int i = 0;
+ String family;
+ List<Font> userFonts = new ArrayList<Font>();
+
+ while ((family = props.getProperty("view.fontSubstList." + i)) != null)
+ {
+ /*
+ * The default font is Font.DIALOG if the family
+ * doesn't match any installed fonts. The following
+ * check skips fonts that don't exist.
+ */
+ Font f = new Font(family, Font.PLAIN, 12);
+ if (!f.getFamily().equalsIgnoreCase("dialog") ||
+ family.equalsIgnoreCase("dialog"))
+ userFonts.add(f);
+ i++;
+ }
+
+ preferredFonts = userFonts.toArray(new Font[userFonts.size()]);
+ } //}}}
+
+ //{{{ Instance variables
+ public boolean accessable;
+ public boolean initialized;
+
+ // set up after init()
+ public SyntaxStyle style;
+ public float width;
+ //}}}
+
+ //{{{ Chunk constructor
+ public Chunk(float width, int offset, ParserRuleSet rules)
+ {
+ super(Token.NULL,offset,0,rules);
+ this.width = width;
+ } //}}}
+
+ //{{{ Chunk constructor
+ public Chunk(byte id, int offset, int length, ParserRuleSet rules,
+ SyntaxStyle[] styles, byte defaultID)
+ {
+ super(id,offset,length,rules);
+ accessable = true;
+ style = styles[id];
+ background = style.getBackgroundColor();
+ if(background == null)
+ background = styles[defaultID].getBackgroundColor();
+ } //}}}
+
+ //{{{ offsetToX() method
+ public final float offsetToX(int offset)
+ {
+ if(!visible || glyphs == null)
+ return 0.0f;
+
+ float x = 0.0f;
+ for (GlyphVector gv : glyphs)
+ {
+ if (offset < gv.getNumGlyphs())
+ {
+ x += (float) gv.getGlyphPosition(offset).getX();
+ return x;
+ }
+ x += (float) gv.getLogicalBounds().getWidth();
+ offset -= gv.getNumGlyphs();
+ }
+
+ /* Shouldn't reach this. */
+ assert false : "Shouldn't reach this.";
+ return -1;
+ } //}}}
+
+ //{{{ xToOffset() method
+ public final int xToOffset(float x, boolean round)
+ {
+ if (!visible || glyphs == null)
+ {
+ if (round && width - x < x)
+ return offset + length;
+ else
+ return offset;
+ }
+
+ int off = offset;
+ float myx = 0.0f;
+ for (GlyphVector gv : glyphs)
+ {
+ float gwidth = (float) gv.getLogicalBounds().getWidth();
+ if (myx + gwidth >= x)
+ {
+ float[] pos = gv.getGlyphPositions(0, gv.getNumGlyphs(), null);
+ for (int i = 0; i < gv.getNumGlyphs(); i++)
+ {
+ float glyphX = myx + pos[i * 2];
+ float nextX = (i == gv.getNumGlyphs() - 1)
+ ? width
+ : myx + pos[i * 2 + 2];
+
+ if (nextX > x)
+ {
+ if (!round || nextX - x > x - glyphX)
+ return off + i;
+ else
+ return off + i + 1;
+ }
+ }
+ }
+ myx += gwidth;
+ off += gv.getNumGlyphs();
+ }
+
+ /* Shouldn't reach this. */
+ assert false : "Shouldn't reach this.";
+ return -1;
+ } //}}}
+
+ //{{{ init() method
+ public void init(Segment seg, TabExpander expander, float x,
+ FontRenderContext fontRenderContext)
+ {
+ initialized = true;
+
+ if(!accessable)
+ {
+ // do nothing
+ }
+ else if(length == 1 && seg.array[seg.offset + offset] == '\t')
+ {
+ visible = false;
+ float newX = expander.nextTabStop(x,offset + length);
+ width = newX - x;
+ }
+ else
+ {
+ visible = true;
+
+ str = new String(seg.array,seg.offset + offset,length);
+
+ char[] textArray = seg.array;
+ int textStart = seg.offset + offset;
+ width = layoutGlyphs(fontRenderContext,
+ textArray,
+ textStart,
+ textStart + length);
+ }
+ } //}}}
+
+ //{{{ Private members
+ // this is either style.getBackgroundColor() or
+ // styles[defaultID].getBackgroundColor()
+ private Color background;
+ private String str;
+ //private GlyphVector gv;
+ private List<GlyphVector> glyphs;
+ private boolean visible;
+
+ private static boolean fontSubstEnabled;
+ private static Font[] preferredFonts;
+ private static Font[] fontSubstList;
+
+ //{{{ getFonts() method
+ /**
+ * Returns a list of fonts to be searched when applying font
+ * substitution.
+ */
+ private static Font[] getFonts()
+ {
+ if (fontSubstList == null)
+ {
+ Font[] systemFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
+
+ fontSubstList = new Font[preferredFonts.length +
+ systemFonts.length];
+
+ System.arraycopy(preferredFonts, 0, fontSubstList, 0,
+ preferredFonts.length);
+
+ System.arraycopy(systemFonts, 0, fontSubstList,
+ preferredFonts.length,
+ systemFonts.length);
+ }
+ return fontSubstList;
+ } //}}}
+
+ //{{{ drawGlyphs() method
+ /**
+ * Draws the internal list of glyph vectors into the given
+ * graphics object.
+ *
+ * @param gfx Where to draw the glyphs.
+ * @param x Starting horizontal position.
+ * @param y Vertical position.
+ */
+ private void drawGlyphs(Graphics2D gfx,
+ float x,
+ float y)
+ {
+ for (GlyphVector gv : glyphs)
+ {
+ gfx.drawGlyphVector(gv, x, y);
+ x += (float) gv.getLogicalBounds().getWidth();
+ }
+ } //}}}
+
+ //{{{ addGlyphVector() method
+ /**
+ * Creates a glyph vector for the text with the given font,
+ * and adds it to the internal list.
+ *
+ * @param f Font to use for rendering.
+ * @param frc Font rendering context.
+ * @param text Char array with text to render.
+ * @param start Start index of text to render.
+ * @param end End index of text to render.
+ *
+ * @return Width of the rendered text.
+ */
+ private float addGlyphVector(Font f,
+ FontRenderContext frc,
+ char[] text,
+ int start,
+ int end)
+ {
+ // FIXME: Need BiDi support.
+ int layoutFlags = Font.LAYOUT_LEFT_TO_RIGHT
+ | Font.LAYOUT_NO_START_CONTEXT
+ | Font.LAYOUT_NO_LIMIT_CONTEXT;
+
+ GlyphVector gv = f.layoutGlyphVector(frc,
+ text,
+ start,
+ end,
+ layoutFlags);
+ // This is necessary to work around a memory leak in Sun Java 6 where
+ // the sun.font.GlyphLayout is cached and reused while holding an
+ // instance to the char array.
+ f.layoutGlyphVector(frc, EMPTY_TEXT, 0, 0, layoutFlags);
+ glyphs.add(gv);
+ return (float) gv.getLogicalBounds().getWidth();
+ } // }}}
+
+ //{{{ layoutGlyphs() method
+ /**
+ * Layout the glyphs to render the given text, applying font
+ * substitution if configured. GlyphVectors are created and
+ * added to the internal glyph list.
+ *
+ * Font substitution works in the following manner:
+ * - All characters that can be rendered with the default
+ * font will be.
+ * - For characters that can't be handled by the default
+ * font, iterate over the list of available fonts to
+ * find an appropriate one. The first match is chosen.
+ *
+ * The user can define his list of preferred fonts, which will
+ * be tried before the system fonts.
+ *
+ * @param frc Font rendering context.
+ * @param text Char array with text to render.
+ * @param start Start index of text to render.
+ * @param end End index of text to render.
+ *
+ * @return Width of the rendered text.
+ */
+ private float layoutGlyphs(FontRenderContext frc,
+ char text[],
+ int start,
+ int end)
+ {
+ float width = 0.0f;
+ int max = 0;
+ Font dflt = style.getFont();
+
+ glyphs = new LinkedList<GlyphVector>();
+
+ while (max != -1 && start < end)
+ {
+ max = fontSubstEnabled ? dflt.canDisplayUpTo(text, start, end)
+ : -1;
+ if (max == -1)
+ {
+ width += addGlyphVector(dflt,
+ frc,
+ text,
+ start,
+ end);
+ }
+ else
+ {
+ /*
+ * Draw as much as we can and update the
+ * current offset.
+ */
+ if (max > start)
+ {
+ width += addGlyphVector(dflt,
+ frc,
+ text,
+ start,
+ max);
+ start = max;
+ }
+
+ /*
+ * Find a font that can display the next
+ * characters.
+ */
+ Font f = null;
+ for (Font candidate : getFonts())
+ {
+ if (candidate.canDisplay(text[start]))
+ {
+ f = candidate;
+ break;
+ }
+ }
+
+ if (f != null)
+ {
+ f = f.deriveFont(dflt.getStyle(), dflt.getSize());
+
+ /*
+ * Find out how many characters
+ * the current font cannot
+ * display, but the chosen one
+ * can.
+ */
+ int last = start;
+ while (last < end &&
+ f.canDisplay(text[last]) &&
+ !dflt.canDisplay(text[last]))
+ last++;
+
+ width += addGlyphVector(f,
+ frc,
+ text,
+ start,
+ last);
+
+ start = last;
+ }
+ else
+ {
+ width += addGlyphVector(dflt,
+ frc,
+ text,
+ start,
+ start + 1);
+ start++;
+ }
+ }
+ }
+ return width;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/DefaultTokenHandler.java b/jEdit/org/gjt/sp/jedit/syntax/DefaultTokenHandler.java
index dd4ca36..38aa048 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/DefaultTokenHandler.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/DefaultTokenHandler.java
@@ -1,140 +1,140 @@
-/*
- * DefaultTokenHandler.java - Builds a linked list of Token objects
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.syntax;
-
-import javax.swing.text.Segment;
-
-/**
- * Builds a linked list of tokens without any additional processing.
- *
- * @author Slava Pestov
- * @version $Id: DefaultTokenHandler.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.1pre1
- */
-public class DefaultTokenHandler implements TokenHandler
-{
- //{{{ reset() method
- /**
- * Clears the list of tokens.
- */
- public void init()
- {
- lastToken = firstToken = null;
- } //}}}
-
- //{{{ getTokens() method
- /**
- * Returns the first syntax token.
- * @since jEdit 4.1pre1
- */
- public Token getTokens()
- {
- return firstToken;
- } //}}}
-
- //{{{ handleToken() method
- /**
- * Called by the token marker when a syntax token has been parsed.
- * @param seg The segment containing the text
- * @param id The token type (one of the constants in the
- * {@link Token} class).
- * @param offset The start offset of the token
- * @param length The number of characters in the token
- * @param context The line context
- * @since jEdit 4.2pre3
- */
- public void handleToken(Segment seg, byte id, int offset, int length,
- TokenMarker.LineContext context)
- {
- Token token = createToken(id,offset,length,context);
- if(token != null)
- addToken(token,context);
- } //}}}
-
- //{{{ getLineContext() method
- /**
- * The token handler can compare this object with the object
- * previously given for this line to see if the token type at the end
- * of the line has changed (meaning subsequent lines might need to be
- * retokenized).
- * @since jEdit 4.2pre6
- */
- public TokenMarker.LineContext getLineContext()
- {
- return lineContext;
- } //}}}
-
- //{{{ setLineContext() method
- /**
- * The token handler can compare this object with the object
- * previously given for this line to see if the token type at the end
- * of the line has changed (meaning subsequent lines might need to be
- * retokenized).
- * @since jEdit 4.2pre6
- */
- public void setLineContext(TokenMarker.LineContext lineContext)
- {
- this.lineContext = lineContext;
- } //}}}
-
- //{{{ Protected members
- protected Token firstToken, lastToken;
- protected TokenMarker.LineContext lineContext;
-
- //{{{ getParserRuleSet() method
- protected ParserRuleSet getParserRuleSet(TokenMarker.LineContext context)
- {
- while(context != null)
- {
- if(!context.rules.isBuiltIn())
- return context.rules;
-
- context = context.parent;
- }
-
- return null;
- } //}}}
-
- //{{{ createToken() method
- protected Token createToken(byte id, int offset, int length,
- TokenMarker.LineContext context)
- {
- return new Token(id,offset,length,getParserRuleSet(context));
- } //}}}
-
- //{{{ addToken() method
- protected void addToken(Token token, TokenMarker.LineContext context)
- {
- if(firstToken == null)
- {
- firstToken = lastToken = token;
- }
- else
- {
- lastToken.next = token;
- lastToken = lastToken.next;
- }
- } //}}}
-
- //}}}
-}
+/*
+ * DefaultTokenHandler.java - Builds a linked list of Token objects
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.syntax;
+
+import javax.swing.text.Segment;
+
+/**
+ * Builds a linked list of tokens without any additional processing.
+ *
+ * @author Slava Pestov
+ * @version $Id: DefaultTokenHandler.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.1pre1
+ */
+public class DefaultTokenHandler implements TokenHandler
+{
+ //{{{ reset() method
+ /**
+ * Clears the list of tokens.
+ */
+ public void init()
+ {
+ lastToken = firstToken = null;
+ } //}}}
+
+ //{{{ getTokens() method
+ /**
+ * Returns the first syntax token.
+ * @since jEdit 4.1pre1
+ */
+ public Token getTokens()
+ {
+ return firstToken;
+ } //}}}
+
+ //{{{ handleToken() method
+ /**
+ * Called by the token marker when a syntax token has been parsed.
+ * @param seg The segment containing the text
+ * @param id The token type (one of the constants in the
+ * {@link Token} class).
+ * @param offset The start offset of the token
+ * @param length The number of characters in the token
+ * @param context The line context
+ * @since jEdit 4.2pre3
+ */
+ public void handleToken(Segment seg, byte id, int offset, int length,
+ TokenMarker.LineContext context)
+ {
+ Token token = createToken(id,offset,length,context);
+ if(token != null)
+ addToken(token,context);
+ } //}}}
+
+ //{{{ getLineContext() method
+ /**
+ * The token handler can compare this object with the object
+ * previously given for this line to see if the token type at the end
+ * of the line has changed (meaning subsequent lines might need to be
+ * retokenized).
+ * @since jEdit 4.2pre6
+ */
+ public TokenMarker.LineContext getLineContext()
+ {
+ return lineContext;
+ } //}}}
+
+ //{{{ setLineContext() method
+ /**
+ * The token handler can compare this object with the object
+ * previously given for this line to see if the token type at the end
+ * of the line has changed (meaning subsequent lines might need to be
+ * retokenized).
+ * @since jEdit 4.2pre6
+ */
+ public void setLineContext(TokenMarker.LineContext lineContext)
+ {
+ this.lineContext = lineContext;
+ } //}}}
+
+ //{{{ Protected members
+ protected Token firstToken, lastToken;
+ protected TokenMarker.LineContext lineContext;
+
+ //{{{ getParserRuleSet() method
+ protected ParserRuleSet getParserRuleSet(TokenMarker.LineContext context)
+ {
+ while(context != null)
+ {
+ if(!context.rules.isBuiltIn())
+ return context.rules;
+
+ context = context.parent;
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ createToken() method
+ protected Token createToken(byte id, int offset, int length,
+ TokenMarker.LineContext context)
+ {
+ return new Token(id,offset,length,getParserRuleSet(context));
+ } //}}}
+
+ //{{{ addToken() method
+ protected void addToken(Token token, TokenMarker.LineContext context)
+ {
+ if(firstToken == null)
+ {
+ firstToken = lastToken = token;
+ }
+ else
+ {
+ lastToken.next = token;
+ lastToken = lastToken.next;
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/DisplayTokenHandler.java b/jEdit/org/gjt/sp/jedit/syntax/DisplayTokenHandler.java
index 1b14126..c4600c2 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/DisplayTokenHandler.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/DisplayTokenHandler.java
@@ -1,248 +1,246 @@
-/*
- * DisplayTokenHandler.java - converts tokens to chunks
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.syntax;
-
-//{{{ Imports
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-
-import javax.swing.text.*;
-import java.awt.font.*;
-import java.util.List;
-//}}}
-
-/**
- * Creates {@link Chunk} objects that can be painted on screen.
- * @version $Id: DisplayTokenHandler.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class DisplayTokenHandler extends DefaultTokenHandler
-{
- // don't have chunks longer than 100 characters to avoid slowing things down
- public static final int MAX_CHUNK_LEN = 100;
-
- //{{{ init() method
- /**
- * Init some variables that will be used when marking tokens.
- * This is called before {@link JEditBuffer#markTokens(int, TokenHandler)}
- * to store some data that will be required and that we don't want
- * to put in the parameters
- *
- * @param styles
- * @param fontRenderContext
- * @param expander
- * @param out
- * @param wrapMargin
- */
- public void init(SyntaxStyle[] styles,
- FontRenderContext fontRenderContext,
- TabExpander expander, List<Chunk> out,
- float wrapMargin)
- {
- super.init();
-
- x = 0.0f;
-
- this.styles = styles;
- this.fontRenderContext = fontRenderContext;
- this.expander = expander;
-
- // SILLY: allow for anti-aliased characters' "fuzz"
- if(wrapMargin != 0.0f)
- this.wrapMargin = wrapMargin += 2.0f;
- else
- this.wrapMargin = 0.0f;
-
- this.out = out;
-
- seenNonWhitespace = false;
- endX = endOfWhitespace = 0.0f;
- end = null;
- } //}}}
-
- //{{{ getChunkList() method
- /**
- * Returns the list of chunks.
- * @since jEdit 4.1pre7
- */
- public List<Chunk> getChunkList()
- {
- return out;
- } //}}}
-
- //{{{ handleToken() method
- /**
- * Called by the token marker when a syntax token has been parsed.
- * @param seg The segment containing the text
- * @param id The token type (one of the constants in the
- * {@link Token} class).
- * @param offset The start offset of the token
- * @param length The number of characters in the token
- * @param context The line context
- * @since jEdit 4.2pre3
- */
- public void handleToken(Segment seg, byte id, int offset, int length,
- TokenMarker.LineContext context)
- {
- if(id == Token.END)
- {
- if(firstToken != null)
- out.add(merge((Chunk)firstToken,seg));
- return;
- }
-
- for(int splitOffset = 0; splitOffset < length; splitOffset += MAX_CHUNK_LEN)
- {
- int splitLength = Math.min(length - splitOffset,MAX_CHUNK_LEN);
- Chunk chunk = createChunk(id,offset + splitOffset,splitLength,context);
- addToken(chunk,context);
-
- if(wrapMargin != 0.0f)
- {
- initChunk(chunk,seg);
- x += chunk.width;
-
- if(Character.isWhitespace(seg.array[
- seg.offset + chunk.offset]))
- {
- if(seenNonWhitespace)
- {
- end = lastToken;
- endX = x;
- }
- else
- endOfWhitespace = x;
- }
- else
- {
- if(x > wrapMargin
- && end != null
- && seenNonWhitespace)
- {
- Chunk nextLine = new Chunk(endOfWhitespace,
- end.offset + end.length,
- getParserRuleSet(context));
- initChunk(nextLine,seg);
-
- nextLine.next = end.next;
- end.next = null;
-
- if(firstToken != null)
- out.add(merge((Chunk)firstToken,seg));
-
- firstToken = nextLine;
-
- x = x - endX + endOfWhitespace;
-
- end = null;
- endX = x;
- }
-
- seenNonWhitespace = true;
- }
- }
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private SyntaxStyle[] styles;
- private FontRenderContext fontRenderContext;
- private TabExpander expander;
- private float x;
-
- private List<Chunk> out;
- private float wrapMargin;
- private float endX;
- private Token end;
-
- private boolean seenNonWhitespace;
- private float endOfWhitespace;
- //}}}
-
- //{{{ createChunk() method
- private Chunk createChunk(byte id, int offset, int length,
- TokenMarker.LineContext context)
- {
- return new Chunk(id,offset,length,
- getParserRuleSet(context),styles,
- context.rules.getDefault());
- } //}}}
-
- //{{{ initChunk() method
- protected void initChunk(Chunk chunk, Segment seg)
- {
- chunk.init(seg,expander,x,fontRenderContext);
- } //}}}
-
- //{{{ merge() method
- private Chunk merge(Chunk first, Segment seg)
- {
- if(first == null)
- return null;
-
- Chunk chunk = first;
- while(chunk.next != null)
- {
- Chunk next = (Chunk)chunk.next;
- if(canMerge(chunk,next,seg))
- {
- // in case already initialized; un-initialize it
- chunk.initialized = false;
- chunk.length += next.length;
- chunk.width += next.width;
- chunk.next = next.next;
- }
- else
- {
- if(!chunk.initialized)
- {
- initChunk(chunk,seg);
- if(wrapMargin == 0.0f)
- x += chunk.width;
- }
- chunk = next;
- }
- }
-
- if(!chunk.initialized)
- initChunk(chunk,seg);
-
- return first;
- } //}}}
-
- //{{{ canMerge() method
- private static boolean canMerge(Chunk c1, Chunk c2, Segment seg)
- {
- if(!c1.accessable || !c2.accessable)
- return false;
-
- char ch1 = seg.array[seg.offset + c1.offset];
- char ch2 = seg.array[seg.offset + c2.offset];
-
- return ((c1.style == c2.style)
- && ch1 != '\t' && ch2 != '\t'
- && (c1.length + c2.length <= MAX_CHUNK_LEN));
- } //}}}
-
- //}}}
-}
+/*
+ * DisplayTokenHandler.java - converts tokens to chunks
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.syntax;
+
+//{{{ Imports
+import javax.swing.text.*;
+import java.awt.font.*;
+import java.util.List;
+//}}}
+
+/**
+ * Creates {@link Chunk} objects that can be painted on screen.
+ * @version $Id: DisplayTokenHandler.java 18562 2010-09-14 17:22:54Z kpouer $
+ */
+public class DisplayTokenHandler extends DefaultTokenHandler
+{
+ // don't have chunks longer than 100 characters to avoid slowing things down
+ public static final int MAX_CHUNK_LEN = 100;
+
+ //{{{ init() method
+ /**
+ * Init some variables that will be used when marking tokens.
+ * This is called before {@link org.gjt.sp.jedit.buffer.JEditBuffer#markTokens(int, TokenHandler)}
+ * to store some data that will be required and that we don't want
+ * to put in the parameters
+ *
+ * @param styles
+ * @param fontRenderContext
+ * @param expander
+ * @param out
+ * @param wrapMargin
+ */
+ public void init(SyntaxStyle[] styles,
+ FontRenderContext fontRenderContext,
+ TabExpander expander, List<Chunk> out,
+ float wrapMargin)
+ {
+ super.init();
+
+ x = 0.0f;
+
+ this.styles = styles;
+ this.fontRenderContext = fontRenderContext;
+ this.expander = expander;
+
+ // SILLY: allow for anti-aliased characters' "fuzz"
+ if(wrapMargin != 0.0f)
+ this.wrapMargin = wrapMargin + 2.0f;
+ else
+ this.wrapMargin = 0.0f;
+
+ this.out = out;
+
+ seenNonWhitespace = false;
+ endX = endOfWhitespace = 0.0f;
+ end = null;
+ } //}}}
+
+ //{{{ getChunkList() method
+ /**
+ * Returns the list of chunks.
+ * @since jEdit 4.1pre7
+ */
+ public List<Chunk> getChunkList()
+ {
+ return out;
+ } //}}}
+
+ //{{{ handleToken() method
+ /**
+ * Called by the token marker when a syntax token has been parsed.
+ * @param seg The segment containing the text
+ * @param id The token type (one of the constants in the
+ * {@link Token} class).
+ * @param offset The start offset of the token
+ * @param length The number of characters in the token
+ * @param context The line context
+ * @since jEdit 4.2pre3
+ */
+ public void handleToken(Segment seg, byte id, int offset, int length,
+ TokenMarker.LineContext context)
+ {
+ if(id == Token.END)
+ {
+ if(firstToken != null)
+ out.add(merge((Chunk)firstToken,seg));
+ return;
+ }
+
+ for(int splitOffset = 0; splitOffset < length; splitOffset += MAX_CHUNK_LEN)
+ {
+ int splitLength = Math.min(length - splitOffset,MAX_CHUNK_LEN);
+ Chunk chunk = createChunk(id,offset + splitOffset,splitLength,context);
+ addToken(chunk,context);
+
+ if(wrapMargin != 0.0f)
+ {
+ initChunk(chunk,seg);
+ x += chunk.width;
+
+ if(Character.isWhitespace(seg.array[
+ seg.offset + chunk.offset]))
+ {
+ if(seenNonWhitespace)
+ {
+ end = lastToken;
+ endX = x;
+ }
+ else
+ endOfWhitespace = x;
+ }
+ else
+ {
+ if(x > wrapMargin
+ && end != null
+ && seenNonWhitespace)
+ {
+ Chunk nextLine = new Chunk(endOfWhitespace,
+ end.offset + end.length,
+ getParserRuleSet(context));
+ initChunk(nextLine,seg);
+
+ nextLine.next = end.next;
+ end.next = null;
+
+ if(firstToken != null)
+ out.add(merge((Chunk)firstToken,seg));
+
+ firstToken = nextLine;
+
+ x = x - endX + endOfWhitespace;
+
+ end = null;
+ endX = x;
+ }
+
+ seenNonWhitespace = true;
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private SyntaxStyle[] styles;
+ private FontRenderContext fontRenderContext;
+ private TabExpander expander;
+ private float x;
+
+ private List<Chunk> out;
+ private float wrapMargin;
+ private float endX;
+ private Token end;
+
+ private boolean seenNonWhitespace;
+ private float endOfWhitespace;
+ //}}}
+
+ //{{{ createChunk() method
+ private Chunk createChunk(byte id, int offset, int length,
+ TokenMarker.LineContext context)
+ {
+ return new Chunk(id,offset,length,
+ getParserRuleSet(context),styles,
+ context.rules.getDefault());
+ } //}}}
+
+ //{{{ initChunk() method
+ protected void initChunk(Chunk chunk, Segment seg)
+ {
+ chunk.init(seg,expander,x,fontRenderContext);
+ } //}}}
+
+ //{{{ merge() method
+ private Chunk merge(Chunk first, Segment seg)
+ {
+ if(first == null)
+ return null;
+
+ Chunk chunk = first;
+ while(chunk.next != null)
+ {
+ Chunk next = (Chunk)chunk.next;
+ if(canMerge(chunk,next,seg))
+ {
+ // in case already initialized; un-initialize it
+ chunk.initialized = false;
+ chunk.length += next.length;
+ chunk.width += next.width;
+ chunk.next = next.next;
+ }
+ else
+ {
+ if(!chunk.initialized)
+ {
+ initChunk(chunk,seg);
+ if(wrapMargin == 0.0f)
+ x += chunk.width;
+ }
+ chunk = next;
+ }
+ }
+
+ if(!chunk.initialized)
+ initChunk(chunk,seg);
+
+ return first;
+ } //}}}
+
+ //{{{ canMerge() method
+ private static boolean canMerge(Chunk c1, Chunk c2, Segment seg)
+ {
+ if(!c1.accessable || !c2.accessable)
+ return false;
+
+ char ch1 = seg.array[seg.offset + c1.offset];
+ char ch2 = seg.array[seg.offset + c2.offset];
+
+ return ((c1.style == c2.style)
+ && ch1 != '\t' && ch2 != '\t'
+ && (c1.length + c2.length <= MAX_CHUNK_LEN));
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/DummyTokenHandler.java b/jEdit/org/gjt/sp/jedit/syntax/DummyTokenHandler.java
index c024c0d..ecbd88d 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/DummyTokenHandler.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/DummyTokenHandler.java
@@ -1,68 +1,68 @@
-/*
- * DummyTokenHandler.java - Ignores tokens
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.syntax;
-
-import javax.swing.text.Segment;
-
-/**
- * A dummy token handler that discards tokens.
- *
- * @author Slava Pestov
- * @version $Id: DummyTokenHandler.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.1pre1
- */
-public class DummyTokenHandler implements TokenHandler
-{
- /**
- * To avoid having to create new instances of this class, use
- * this variable. This is allowed because instances of this
- * class do not store any state.
- */
- public static final DummyTokenHandler INSTANCE = new DummyTokenHandler();
-
- //{{{ handleToken() method
- /**
- * Called by the token marker when a syntax token has been parsed.
- * @param seg The segment containing the text
- * @param id The token type (one of the constants in the
- * {@link Token} class).
- * @param offset The start offset of the token
- * @param length The number of characters in the token
- * @param context The line context
- * @since jEdit 4.2pre3
- */
- public void handleToken(Segment seg, byte id, int offset, int length,
- TokenMarker.LineContext context) {} //}}}
-
- //{{{ setLineContext() method
- /**
- * The token handler can compare this object with the object
- * previously given for this line to see if the token type at the end
- * of the line has changed (meaning subsequent lines might need to be
- * retokenized).
- * @since jEdit 4.2pre6
- */
- public void setLineContext(TokenMarker.LineContext lineContext)
- {
- } //}}}
-}
+/*
+ * DummyTokenHandler.java - Ignores tokens
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.syntax;
+
+import javax.swing.text.Segment;
+
+/**
+ * A dummy token handler that discards tokens.
+ *
+ * @author Slava Pestov
+ * @version $Id: DummyTokenHandler.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.1pre1
+ */
+public class DummyTokenHandler implements TokenHandler
+{
+ /**
+ * To avoid having to create new instances of this class, use
+ * this variable. This is allowed because instances of this
+ * class do not store any state.
+ */
+ public static final DummyTokenHandler INSTANCE = new DummyTokenHandler();
+
+ //{{{ handleToken() method
+ /**
+ * Called by the token marker when a syntax token has been parsed.
+ * @param seg The segment containing the text
+ * @param id The token type (one of the constants in the
+ * {@link Token} class).
+ * @param offset The start offset of the token
+ * @param length The number of characters in the token
+ * @param context The line context
+ * @since jEdit 4.2pre3
+ */
+ public void handleToken(Segment seg, byte id, int offset, int length,
+ TokenMarker.LineContext context) {} //}}}
+
+ //{{{ setLineContext() method
+ /**
+ * The token handler can compare this object with the object
+ * previously given for this line to see if the token type at the end
+ * of the line has changed (meaning subsequent lines might need to be
+ * retokenized).
+ * @since jEdit 4.2pre6
+ */
+ public void setLineContext(TokenMarker.LineContext lineContext)
+ {
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/KeywordMap.java b/jEdit/org/gjt/sp/jedit/syntax/KeywordMap.java
index 6465fd7..35a7eb3 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/KeywordMap.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/KeywordMap.java
@@ -1,247 +1,247 @@
-/*
- * KeywordMap.java - Fast keyword->id map
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2002 Slava Pestov
- * Copyright (C) 1999 Mike Dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.syntax;
-
-import javax.swing.text.Segment;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * A <code>KeywordMap</code> is similar to a hashtable in that it maps keys
- * to values. However, the `keys' are Swing segments. This allows lookups of
- * text substrings without the overhead of creating a new string object.
- *
- * @author Slava Pestov, Mike Dillon
- * @version $Id: KeywordMap.java 14461 2009-01-25 12:04:15Z kpouer $
- */
-public class KeywordMap
-{
- //{{{ KeywordMap constructor
- /**
- * Creates a new <code>KeywordMap</code>.
- * @param ignoreCase True if keys are case insensitive
- */
- public KeywordMap(boolean ignoreCase)
- {
- this(ignoreCase, 52);
- this.ignoreCase = ignoreCase;
- noWordSep = new StringBuilder();
- } //}}}
-
- //{{{ KeywordMap constructor
- /**
- * Creates a new <code>KeywordMap</code>.
- * @param ignoreCase True if the keys are case insensitive
- * @param mapLength The number of `buckets' to create.
- * A value of 52 will give good performance for most maps.
- */
- public KeywordMap(boolean ignoreCase, int mapLength)
- {
- this.mapLength = mapLength;
- this.ignoreCase = ignoreCase;
- map = new Keyword[mapLength];
- } //}}}
-
- //{{{ lookup() method
- /**
- * Looks up a key.
- * @param text The text segment
- * @param offset The offset of the substring within the text segment
- * @param length The length of the substring
- */
- public byte lookup(Segment text, int offset, int length)
- {
- if(length == 0)
- return Token.NULL;
- Keyword k = map[getSegmentMapKey(text, offset, length)];
- while(k != null)
- {
- if(length != k.keyword.length)
- {
- k = k.next;
- continue;
- }
- if(SyntaxUtilities.regionMatches(ignoreCase,text,offset,
- k.keyword))
- return k.id;
- k = k.next;
- }
- return Token.NULL;
- } //}}}
-
- //{{{ add() method
- /**
- * Adds a key-value mapping.
- * @param keyword The key
- * @param id The value
- */
- public void add(String keyword, byte id)
- {
- add(keyword.toCharArray(),id);
- } //}}}
-
- //{{{ add() method
- /**
- * Adds a key-value mapping.
- * @param keyword The key
- * @param id The value
- * @since jEdit 4.2pre3
- */
- public void add(char[] keyword, byte id)
- {
- int key = getStringMapKey(keyword);
-
- // complete-word command needs a list of all non-alphanumeric
- // characters used in a keyword map.
-loop: for(int i = 0; i < keyword.length; i++)
- {
- char ch = keyword[i];
- if(!Character.isLetterOrDigit(ch))
- {
- for(int j = 0; j < noWordSep.length(); j++)
- {
- if(noWordSep.charAt(j) == ch)
- continue loop;
- }
-
- noWordSep.append(ch);
- }
- }
-
- map[key] = new Keyword(keyword,id,map[key]);
- } //}}}
-
- //{{{ getNonAlphaNumericChars() method
- /**
- * Returns all non-alphanumeric characters that appear in the
- * keywords of this keyword map.
- * @since jEdit 4.0pre3
- */
- public String getNonAlphaNumericChars()
- {
- return noWordSep.toString();
- } //}}}
-
- //{{{ getKeywords() method
- /**
- * Returns an array containing all keywords in this keyword map.
- * @since jEdit 4.0pre3
- */
- public String[] getKeywords()
- {
- List<String> vector = new ArrayList<String>(100);
- for(int i = 0; i < map.length; i++)
- {
- Keyword keyword = map[i];
- while(keyword != null)
- {
- vector.add(new String(keyword.keyword));
- keyword = keyword.next;
- }
- }
- String[] retVal = new String[vector.size()];
- vector.toArray(retVal);
- return retVal;
- } //}}}
-
- //{{{ getIgnoreCase() method
- /**
- * Returns true if the keyword map is set to be case insensitive,
- * false otherwise.
- */
- public boolean getIgnoreCase()
- {
- return ignoreCase;
- } //}}}
-
- //{{{ setIgnoreCase() method
- /**
- * Sets if the keyword map should be case insensitive.
- * @param ignoreCase True if the keyword map should be case
- * insensitive, false otherwise
- */
- public void setIgnoreCase(boolean ignoreCase)
- {
- this.ignoreCase = ignoreCase;
- } //}}}
-
- //{{{ add() method
- /**
- * Adds the content of another keyword map to this one.
- * @since jEdit 4.2pre3
- */
- public void add(KeywordMap map)
- {
- for(int i = 0; i < map.map.length; i++)
- {
- Keyword k = map.map[i];
- while(k != null)
- {
- add(k.keyword,k.id);
- k = k.next;
- }
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private int mapLength;
- private Keyword[] map;
- private boolean ignoreCase;
- private StringBuilder noWordSep;
- //}}}
-
- //{{{ getStringMapKey() method
- private int getStringMapKey(char[] s)
- {
- return (Character.toUpperCase(s[0]) +
- Character.toUpperCase(s[s.length-1]))
- % mapLength;
- } //}}}
-
- //{{{ getSegmentMapKey() method
- protected int getSegmentMapKey(Segment s, int off, int len)
- {
- return (Character.toUpperCase(s.array[off]) +
- Character.toUpperCase(s.array[off + len - 1]))
- % mapLength;
- } //}}}
-
- //}}}
-
- //{{{ Keyword class
- private static class Keyword
- {
- Keyword(char[] keyword, byte id, Keyword next)
- {
- this.keyword = keyword;
- this.id = id;
- this.next = next;
- }
-
- public char[] keyword;
- public byte id;
- public Keyword next;
- } //}}}
-}
+/*
+ * KeywordMap.java - Fast keyword->id map
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2002 Slava Pestov
+ * Copyright (C) 1999 Mike Dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.syntax;
+
+import javax.swing.text.Segment;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * A <code>KeywordMap</code> is similar to a hashtable in that it maps keys
+ * to values. However, the `keys' are Swing segments. This allows lookups of
+ * text substrings without the overhead of creating a new string object.
+ *
+ * @author Slava Pestov, Mike Dillon
+ * @version $Id: KeywordMap.java 14461 2009-01-25 12:04:15Z kpouer $
+ */
+public class KeywordMap
+{
+ //{{{ KeywordMap constructor
+ /**
+ * Creates a new <code>KeywordMap</code>.
+ * @param ignoreCase True if keys are case insensitive
+ */
+ public KeywordMap(boolean ignoreCase)
+ {
+ this(ignoreCase, 52);
+ this.ignoreCase = ignoreCase;
+ noWordSep = new StringBuilder();
+ } //}}}
+
+ //{{{ KeywordMap constructor
+ /**
+ * Creates a new <code>KeywordMap</code>.
+ * @param ignoreCase True if the keys are case insensitive
+ * @param mapLength The number of `buckets' to create.
+ * A value of 52 will give good performance for most maps.
+ */
+ public KeywordMap(boolean ignoreCase, int mapLength)
+ {
+ this.mapLength = mapLength;
+ this.ignoreCase = ignoreCase;
+ map = new Keyword[mapLength];
+ } //}}}
+
+ //{{{ lookup() method
+ /**
+ * Looks up a key.
+ * @param text The text segment
+ * @param offset The offset of the substring within the text segment
+ * @param length The length of the substring
+ */
+ public byte lookup(Segment text, int offset, int length)
+ {
+ if(length == 0)
+ return Token.NULL;
+ Keyword k = map[getSegmentMapKey(text, offset, length)];
+ while(k != null)
+ {
+ if(length != k.keyword.length)
+ {
+ k = k.next;
+ continue;
+ }
+ if(SyntaxUtilities.regionMatches(ignoreCase,text,offset,
+ k.keyword))
+ return k.id;
+ k = k.next;
+ }
+ return Token.NULL;
+ } //}}}
+
+ //{{{ add() method
+ /**
+ * Adds a key-value mapping.
+ * @param keyword The key
+ * @param id The value
+ */
+ public void add(String keyword, byte id)
+ {
+ add(keyword.toCharArray(),id);
+ } //}}}
+
+ //{{{ add() method
+ /**
+ * Adds a key-value mapping.
+ * @param keyword The key
+ * @param id The value
+ * @since jEdit 4.2pre3
+ */
+ public void add(char[] keyword, byte id)
+ {
+ int key = getStringMapKey(keyword);
+
+ // complete-word command needs a list of all non-alphanumeric
+ // characters used in a keyword map.
+loop: for(int i = 0; i < keyword.length; i++)
+ {
+ char ch = keyword[i];
+ if(!Character.isLetterOrDigit(ch))
+ {
+ for(int j = 0; j < noWordSep.length(); j++)
+ {
+ if(noWordSep.charAt(j) == ch)
+ continue loop;
+ }
+
+ noWordSep.append(ch);
+ }
+ }
+
+ map[key] = new Keyword(keyword,id,map[key]);
+ } //}}}
+
+ //{{{ getNonAlphaNumericChars() method
+ /**
+ * Returns all non-alphanumeric characters that appear in the
+ * keywords of this keyword map.
+ * @since jEdit 4.0pre3
+ */
+ public String getNonAlphaNumericChars()
+ {
+ return noWordSep.toString();
+ } //}}}
+
+ //{{{ getKeywords() method
+ /**
+ * Returns an array containing all keywords in this keyword map.
+ * @since jEdit 4.0pre3
+ */
+ public String[] getKeywords()
+ {
+ List<String> vector = new ArrayList<String>(100);
+ for(int i = 0; i < map.length; i++)
+ {
+ Keyword keyword = map[i];
+ while(keyword != null)
+ {
+ vector.add(new String(keyword.keyword));
+ keyword = keyword.next;
+ }
+ }
+ String[] retVal = new String[vector.size()];
+ vector.toArray(retVal);
+ return retVal;
+ } //}}}
+
+ //{{{ getIgnoreCase() method
+ /**
+ * Returns true if the keyword map is set to be case insensitive,
+ * false otherwise.
+ */
+ public boolean getIgnoreCase()
+ {
+ return ignoreCase;
+ } //}}}
+
+ //{{{ setIgnoreCase() method
+ /**
+ * Sets if the keyword map should be case insensitive.
+ * @param ignoreCase True if the keyword map should be case
+ * insensitive, false otherwise
+ */
+ public void setIgnoreCase(boolean ignoreCase)
+ {
+ this.ignoreCase = ignoreCase;
+ } //}}}
+
+ //{{{ add() method
+ /**
+ * Adds the content of another keyword map to this one.
+ * @since jEdit 4.2pre3
+ */
+ public void add(KeywordMap map)
+ {
+ for(int i = 0; i < map.map.length; i++)
+ {
+ Keyword k = map.map[i];
+ while(k != null)
+ {
+ add(k.keyword,k.id);
+ k = k.next;
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private int mapLength;
+ private Keyword[] map;
+ private boolean ignoreCase;
+ private StringBuilder noWordSep;
+ //}}}
+
+ //{{{ getStringMapKey() method
+ private int getStringMapKey(char[] s)
+ {
+ return (Character.toUpperCase(s[0]) +
+ Character.toUpperCase(s[s.length-1]))
+ % mapLength;
+ } //}}}
+
+ //{{{ getSegmentMapKey() method
+ protected int getSegmentMapKey(Segment s, int off, int len)
+ {
+ return (Character.toUpperCase(s.array[off]) +
+ Character.toUpperCase(s.array[off + len - 1]))
+ % mapLength;
+ } //}}}
+
+ //}}}
+
+ //{{{ Keyword class
+ private static class Keyword
+ {
+ Keyword(char[] keyword, byte id, Keyword next)
+ {
+ this.keyword = keyword;
+ this.id = id;
+ this.next = next;
+ }
+
+ public char[] keyword;
+ public byte id;
+ public Keyword next;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/ModeProvider.java b/jEdit/org/gjt/sp/jedit/syntax/ModeProvider.java
index 9523c07..9b9ae93 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/ModeProvider.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/ModeProvider.java
@@ -1,212 +1,283 @@
-/*
- * ModeProvider.java - An edit mode provider.
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.syntax;
-
-//{{{ Imports
-import org.gjt.sp.jedit.Mode;
-import org.gjt.sp.util.IOUtilities;
-import org.gjt.sp.util.Log;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-//}}}
-
-/**
- * This class works like a singleton, the instance is initialized by jEdit.
- *
- * @author Matthieu Casanova
- * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
- * @since jEdit 4.3pre10
- */
-public class ModeProvider
-{
- public static ModeProvider instance = new ModeProvider();
-
- private List<Mode> modes = new ArrayList<Mode>(180);
-
- //{{{ removeAll() method
- public void removeAll()
- {
- modes = new ArrayList<Mode>(180);
- } //}}}
-
- //{{{ getMode() method
- /**
- * Returns the edit mode with the specified name.
- * @param name The edit mode
- * @since jEdit 4.3pre10
- */
- public Mode getMode(String name)
- {
- for(int i = 0; i < modes.size(); i++)
- {
- Mode mode = modes.get(i);
- if(mode.getName().equals(name))
- return mode;
- }
- return null;
- } //}}}
-
- //{{{ getModeForFile() method
- /**
- * Get the appropriate mode that must be used for the file
- * @param filename the filename
- * @param firstLine the first line of the file
- * @return the edit mode, or null if no mode match the file
- * @since jEdit 4.3pre12
- */
- public Mode getModeForFile(String filename, String firstLine)
- {
- String nogzName = filename.substring(0,filename.length() -
- (filename.endsWith(".gz") ? 3 : 0));
- Mode[] modes = getModes();
-
- // this must be in reverse order so that modes from the user
- // catalog get checked first!
- for(int i = modes.length - 1; i >= 0; i--)
- {
- if(modes[i].accept(nogzName,firstLine))
- {
- return modes[i];
- }
- }
- return null;
- } //}}}
-
-
- //{{{ getModes() method
- /**
- * Returns an array of installed edit modes.
- * @since jEdit 4.3pre10
- */
- public Mode[] getModes()
- {
- Mode[] array = new Mode[modes.size()];
- modes.toArray(array);
- return array;
- } //}}}
-
- //{{{ addMode() method
- /**
- * Do not call this method. It is only public so that classes
- * in the org.gjt.sp.jedit.syntax package can access it.
- * @since jEdit 4.3pre10
- * @param mode The edit mode
- */
- public void addMode(Mode mode)
- {
- modes.add(mode);
- } //}}}
-
- //{{{ loadMode() method
- public void loadMode(Mode mode, XModeHandler xmh)
- {
- String fileName = (String)mode.getProperty("file");
-
- Log.log(Log.NOTICE,this,"Loading edit mode " + fileName);
-
- XMLReader parser;
- try
- {
- parser = XMLReaderFactory.createXMLReader();
- } catch (SAXException saxe)
- {
- Log.log(Log.ERROR, this, saxe);
- return;
- }
- mode.setTokenMarker(xmh.getTokenMarker());
-
- InputStream grammar;
-
- try
- {
- grammar = new BufferedInputStream(
- new FileInputStream(fileName));
- }
- catch (FileNotFoundException e1)
- {
- InputStream resource = ModeProvider.class.getResourceAsStream(fileName);
- if (resource == null)
- error(fileName, e1);
- grammar = new BufferedInputStream(resource);
- }
-
- try
- {
- InputSource isrc = new InputSource(grammar);
- isrc.setSystemId("jedit.jar");
- parser.setContentHandler(xmh);
- parser.setDTDHandler(xmh);
- parser.setEntityResolver(xmh);
- parser.setErrorHandler(xmh);
- parser.parse(isrc);
-
- mode.setProperties(xmh.getModeProperties());
- }
- catch (Throwable e)
- {
- error(fileName, e);
- }
- finally
- {
- IOUtilities.closeQuietly(grammar);
- }
- } //}}}
-
- //{{{ loadMode() method
- public void loadMode(Mode mode)
- {
- XModeHandler xmh = new XModeHandler(mode.getName())
- {
- @Override
- public void error(String what, Object subst)
- {
- Log.log(Log.ERROR, this, subst);
- }
-
- @Override
- public TokenMarker getTokenMarker(String modeName)
- {
- Mode mode = getMode(modeName);
- if(mode == null)
- return null;
- else
- return mode.getTokenMarker();
- }
- };
- loadMode(mode, xmh);
- } //}}}
-
- //{{{ error() method
- protected void error(String file, Throwable e)
- {
- Log.log(Log.ERROR, this, e);
- } //}}}
-}
+/*
+ * ModeProvider.java - An edit mode provider.
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.syntax;
+
+//{{{ Imports
+import org.gjt.sp.jedit.Mode;
+import org.gjt.sp.util.IOUtilities;
+import org.gjt.sp.util.Log;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.LinkedHashMap;
+//}}}
+
+/**
+ * This class works like a singleton, the instance is initialized by jEdit.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: Buffer.java 8190 2006-12-07 07:58:34Z kpouer $
+ * @since jEdit 4.3pre10
+ */
+public class ModeProvider
+{
+ public static ModeProvider instance = new ModeProvider();
+
+ private LinkedHashMap<String, Mode> modes = new LinkedHashMap<String, Mode>(180);
+
+ // any mode that is added that is already in the 'modes' map is added here. These
+ // 'override' modes are modes loaded from outside of the standard issue catalog files.
+ private LinkedHashMap<String, Mode> overrideModes = new LinkedHashMap<String, Mode>(20);
+
+ //{{{ removeAll() method
+ public void removeAll()
+ {
+ modes.clear();
+ overrideModes.clear();
+ } //}}}
+
+ //{{{ getMode() method
+ /**
+ * Returns the edit mode with the specified name.
+ * @param name The edit mode
+ * @since jEdit 4.3pre10
+ */
+ public Mode getMode(String name)
+ {
+ Mode mode = overrideModes.get(name);
+ if (mode == null)
+ {
+ mode = modes.get(name);
+ }
+ return mode;
+ } //}}}
+
+ //{{{ getModeForFile() method
+ /**
+ * Get the appropriate mode that must be used for the file
+ * @param filename the filename
+ * @param firstLine the first line of the file
+ * @return the edit mode, or null if no mode match the file
+ * @since jEdit 4.3pre12
+ */
+ public Mode getModeForFile(String filename, String firstLine)
+ {
+ String nogzName = filename.substring(0,filename.length() -
+ (filename.endsWith(".gz") ? 3 : 0));
+
+ List<Mode> acceptable = new ArrayList<Mode>();
+
+ // First check overrideModes as these are user supplied modes.
+ // User modes have priority.
+ for(Mode mode : overrideModes.values())
+ {
+ if(mode.accept(nogzName,firstLine))
+ {
+ acceptable.add(mode);
+ }
+ }
+ if (acceptable.size() == 0)
+ {
+ // no user modes were acceptable, so check standard modes.
+ for(Mode mode : modes.values())
+ {
+ if(mode.accept(nogzName,firstLine))
+ {
+ acceptable.add(mode);
+ }
+ }
+ }
+ if (acceptable.size() == 1)
+ {
+ return acceptable.get(0);
+ }
+ if (acceptable.size() > 1)
+ {
+ Collections.reverse(acceptable);
+
+ // the very most acceptable mode is one whose file
+ // name doesn't only match the file name as regular
+ // expression but which is identical
+ for (Mode mode : acceptable)
+ {
+ if (mode.acceptFilenameIdentical(filename))
+ {
+ return mode;
+ }
+ }
+
+ // most acceptable is a mode that matches both the
+ // filename and the first line glob
+ for (Mode mode : acceptable)
+ {
+ if (mode.acceptFilename(filename) &&
+ mode.acceptFirstLine(firstLine))
+ {
+ return mode;
+ }
+ }
+ // next best is filename match
+ for (Mode mode : acceptable)
+ {
+ if (mode.acceptFilename(filename)) {
+ return mode;
+ }
+ }
+ // all acceptable choices are by first line glob, and
+ // they all match, so just return the first one.
+ return acceptable.get(0);
+ }
+ // no matching mode found for this file
+ return null;
+ } //}}}
+
+
+ //{{{ getModes() method
+ /**
+ * Returns an array of installed edit modes.
+ * @since jEdit 4.3pre10
+ */
+ public Mode[] getModes()
+ {
+ Mode[] array = new Mode[modes.size() + overrideModes.size()];
+ Mode[] standard = modes.values().toArray(new Mode[0]);
+ Mode[] override = overrideModes.values().toArray(new Mode[0]);
+ System.arraycopy(standard, 0, array, 0, standard.length);
+ System.arraycopy(override, 0, array, standard.length, override.length);
+ return array;
+ } //}}}
+
+ //{{{ addMode() method
+ /**
+ * Do not call this method. It is only public so that classes
+ * in the org.gjt.sp.jedit.syntax package can access it.
+ * @since jEdit 4.3pre10
+ * @see org.gjt.sp.jedit.jEdit#reloadModes reloadModes
+ * @param mode The edit mode
+ */
+ public void addMode(Mode mode)
+ {
+ if (modes.get(mode.getName()) != null)
+ {
+ overrideModes.put(mode.getName(), mode);
+ modes.remove(mode.getName());
+ }
+ else
+ {
+ modes.put(mode.getName(), mode);
+ }
+ } //}}}
+
+ //{{{ loadMode() method
+ public void loadMode(Mode mode, XModeHandler xmh)
+ {
+ String fileName = (String)mode.getProperty("file");
+
+ Log.log(Log.NOTICE,this,"Loading edit mode " + fileName);
+
+ XMLReader parser;
+ try
+ {
+ parser = XMLReaderFactory.createXMLReader();
+ } catch (SAXException saxe)
+ {
+ Log.log(Log.ERROR, this, saxe);
+ return;
+ }
+ mode.setTokenMarker(xmh.getTokenMarker());
+
+ InputStream grammar;
+
+ try
+ {
+ grammar = new BufferedInputStream(
+ new FileInputStream(fileName));
+ }
+ catch (FileNotFoundException e1)
+ {
+ InputStream resource = ModeProvider.class.getResourceAsStream(fileName);
+ if (resource == null)
+ error(fileName, e1);
+ grammar = new BufferedInputStream(resource);
+ }
+
+ try
+ {
+ InputSource isrc = new InputSource(grammar);
+ isrc.setSystemId("jedit.jar");
+ parser.setContentHandler(xmh);
+ parser.setDTDHandler(xmh);
+ parser.setEntityResolver(xmh);
+ parser.setErrorHandler(xmh);
+ parser.parse(isrc);
+
+ mode.setProperties(xmh.getModeProperties());
+ }
+ catch (Throwable e)
+ {
+ error(fileName, e);
+ }
+ finally
+ {
+ IOUtilities.closeQuietly(grammar);
+ }
+ } //}}}
+
+ //{{{ loadMode() method
+ public void loadMode(Mode mode)
+ {
+ XModeHandler xmh = new XModeHandler(mode.getName())
+ {
+ @Override
+ public void error(String what, Object subst)
+ {
+ Log.log(Log.ERROR, this, subst);
+ }
+
+ @Override
+ public TokenMarker getTokenMarker(String modeName)
+ {
+ Mode mode = getMode(modeName);
+ if(mode == null)
+ return null;
+ else
+ return mode.getTokenMarker();
+ }
+ };
+ loadMode(mode, xmh);
+ } //}}}
+
+ //{{{ error() method
+ protected void error(String file, Throwable e)
+ {
+ Log.log(Log.ERROR, this, e);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/ParserRule.java b/jEdit/org/gjt/sp/jedit/syntax/ParserRule.java
index a44b639..8118ea1 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/ParserRule.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/ParserRule.java
@@ -1,404 +1,407 @@
-/*
- * ParserRule.java - Parser rule for the token marker
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999 mike dillon
- * Portions copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.syntax;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-/**
- * A parser rule.
- * @author mike dillon, Slava Pestov
- * @version $Id: ParserRule.java 15613 2009-06-30 07:07:43Z voituk $
- */
-public class ParserRule
-{
-
- //{{{ Major actions
- public static final int MAJOR_ACTIONS = 0x000000FF;
- public static final int SEQ = 0;
- public static final int SPAN = 1 << 1;
- public static final int MARK_PREVIOUS = 1 << 2;
- public static final int MARK_FOLLOWING = 1 << 3;
- public static final int EOL_SPAN = 1 << 4;
- //}}}
-
- //{{{ Action hints
- public static final int ACTION_HINTS = 0x0000FF00;
-
- @Deprecated
- public static final int EXCLUDE_MATCH = 1 << 8;
-
- public static final int NO_LINE_BREAK = 1 << 9;
- public static final int NO_WORD_BREAK = 1 << 10;
- public static final int IS_ESCAPE = 1 << 11;
-
- @Deprecated
- public static final int NO_ESCAPE = 1 << 12;
-
- public static final int REGEXP = 1 << 13;
- //}}}
-
- //{{{ Special Match Token Types
- public static final byte MATCH_TYPE_CONTEXT = -1;
- public static final byte MATCH_TYPE_RULE = -2;
- //}}}
-
- //{{{ Position match hints
- public static final int AT_LINE_START = 1 << 1;
- public static final int AT_WHITESPACE_END = 1 << 2;
- public static final int AT_WORD_START = 1 << 3;
- //}}}
-
- //{{{ Instance variables
- public final String upHashChar;
- public final char[] upHashChars;
- public final int startPosMatch;
- public final char[] start;
- public final Pattern startRegexp;
-
- public final int endPosMatch;
- public final char[] end;
-
- public final int action;
- public final byte token;
-
- /**
- * matchType is the type of the token for the matched region. Special
- * values are: MATCH_TYPE_CONTEXT = default token for the context,
- * MATCH_TYPE_RULE = same token as the rule itself.
- *
- * @since jEdit 4.3pre10
- */
- public final byte matchType;
-
- /**
- * escapeRule is the rule-specific sequence used to escape other
- * characters while the rule is in effect. If this character is
- * non-zero, the character following the escape char will be skipped
- * during parsing, and highlighted with the rule's token.
- *
- * @since jEdit 4.3pre12
- */
- public final ParserRule escapeRule;
-
- public ParserRuleSet delegate;
-
- /**
- * @deprecated As the linking between rules is not anymore done within the rule but external. See {@link ParserRuleSet#getRules(Character)}
- */
- public ParserRule next;
- //}}}
-
- //{{{ createSequenceRule() method
- public static final ParserRule createSequenceRule(
- int posMatch, String seq, ParserRuleSet delegate, byte id)
- {
- return new ParserRule(SEQ, seq.substring(0,1),
- posMatch, seq.toCharArray(), null,
- 0, null, delegate, id, MATCH_TYPE_CONTEXT, null);
- } //}}}
-
- //{{{ createRegexpSequenceRule() method
- /**
- * @deprecated Use {@link #createRegexpSequenceRule(String,int,String,ParserRuleSet,byte,boolean)} instead
- */
- public static final ParserRule createRegexpSequenceRule(
- char hashChar, int posMatch, String seq,
- ParserRuleSet delegate, byte id, boolean ignoreCase)
- throws PatternSyntaxException
- {
- return createRegexpSequenceRule(String.valueOf(hashChar), posMatch,
- seq, delegate, id, ignoreCase);
- } //}}}
-
- //{{{ createRegexpSequenceRule() method
- public static final ParserRule createRegexpSequenceRule(
- String hashChar, int posMatch, String seq,
- ParserRuleSet delegate, byte id, boolean ignoreCase)
- throws PatternSyntaxException
- {
- return new ParserRule(SEQ | REGEXP, hashChar, posMatch,
- null, Pattern.compile(seq,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
- 0, null, delegate, id, MATCH_TYPE_CONTEXT, null);
- } //}}}
-
- //{{{ createRegexpSequenceRule() method
- public static final ParserRule createRegexpSequenceRule(
- int posMatch, char[] hashChars, String seq,
- ParserRuleSet delegate, byte id, boolean ignoreCase)
- throws PatternSyntaxException
- {
- return new ParserRule(hashChars, SEQ | REGEXP, posMatch,
- null, Pattern.compile(seq,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
- 0, null, delegate, id, MATCH_TYPE_CONTEXT, null);
- } //}}}
-
- //{{{ createSpanRule() method
- public static final ParserRule createSpanRule(
- int startPosMatch, String start, int endPosMatch, String end,
- ParserRuleSet delegate, byte id, byte matchType,
- boolean noLineBreak, boolean noWordBreak, String escape)
- {
- int ruleAction = SPAN |
- ((noLineBreak) ? NO_LINE_BREAK : 0) |
- ((noWordBreak) ? NO_WORD_BREAK : 0);
-
- return new ParserRule(ruleAction, start.substring(0,1), startPosMatch,
- start.toCharArray(), null,
- endPosMatch, end.toCharArray(),
- delegate, id, matchType, escape);
- } //}}}
-
- //{{{ createRegexpSpanRule() method
- public static final ParserRule createRegexpSpanRule(
- String hashChar, int startPosMatch, String start,
- int endPosMatch, String end, ParserRuleSet delegate, byte id,
- byte matchType, boolean noLineBreak, boolean noWordBreak,
- boolean ignoreCase, String escape)
- throws PatternSyntaxException
- {
- int ruleAction = SPAN | REGEXP |
- ((noLineBreak) ? NO_LINE_BREAK : 0) |
- ((noWordBreak) ? NO_WORD_BREAK : 0);
-
- return new ParserRule(ruleAction, hashChar, startPosMatch, null,
- Pattern.compile(start,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
- endPosMatch, end.toCharArray(), delegate, id, matchType,
- escape);
- } //}}}
-
- //{{{ createRegexpSpanRule() method
- public static final ParserRule createRegexpSpanRule(
- int startPosMatch, char[] hashChars, String start,
- int endPosMatch, String end, ParserRuleSet delegate, byte id,
- byte matchType, boolean noLineBreak, boolean noWordBreak,
- boolean ignoreCase, String escape)
- throws PatternSyntaxException
- {
- int ruleAction = SPAN | REGEXP |
- ((noLineBreak) ? NO_LINE_BREAK : 0) |
- ((noWordBreak) ? NO_WORD_BREAK : 0);
-
- return new ParserRule(hashChars, ruleAction, startPosMatch, null,
- Pattern.compile(start,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
- endPosMatch, end.toCharArray(), delegate, id,
- matchType, escape);
- } //}}}
-
- //{{{ createEOLSpanRule() method
- public static final ParserRule createEOLSpanRule(
- int posMatch, String seq, ParserRuleSet delegate, byte id,
- byte matchType)
- {
- int ruleAction = EOL_SPAN | NO_LINE_BREAK;
-
- return new ParserRule(ruleAction, seq.substring(0,1), posMatch,
- seq.toCharArray(), null, 0, null,
- delegate, id, matchType, null);
- } //}}}
-
- //{{{ createRegexpEOLSpanRule() method
- /**
- * @deprecated Use {@link #createRegexpEOLSpanRule(String,int,String,ParserRuleSet,byte,byte,boolean)} instead
- */
- public static final ParserRule createRegexpEOLSpanRule(
- char hashChar, int posMatch, String seq, ParserRuleSet delegate,
- byte id, byte matchType, boolean ignoreCase)
- throws PatternSyntaxException
- {
- return createRegexpEOLSpanRule(String.valueOf(hashChar),
- posMatch,seq,delegate,id,matchType,ignoreCase);
- } //}}}
-
- //{{{ createRegexpEOLSpanRule() method
- public static final ParserRule createRegexpEOLSpanRule(
- String hashChar, int posMatch, String seq, ParserRuleSet delegate,
- byte id, byte matchType, boolean ignoreCase)
- throws PatternSyntaxException
- {
- int ruleAction = EOL_SPAN | REGEXP | NO_LINE_BREAK;
-
- return new ParserRule(ruleAction, hashChar, posMatch,
- null, Pattern.compile(seq,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
- 0, null, delegate, id, matchType, null);
- } //}}}
-
- //{{{ createRegexpEOLSpanRule() method
- public static final ParserRule createRegexpEOLSpanRule(
- int posMatch, char[] hashChars, String seq, ParserRuleSet delegate,
- byte id, byte matchType, boolean ignoreCase)
- throws PatternSyntaxException
- {
- int ruleAction = EOL_SPAN | REGEXP | NO_LINE_BREAK;
-
- return new ParserRule(hashChars, ruleAction, posMatch,
- null, Pattern.compile(seq,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
- 0, null, delegate, id, matchType, null);
- } //}}}
-
- //{{{ createMarkFollowingRule() method
- public static final ParserRule createMarkFollowingRule(
- int posMatch, String seq, byte id, byte matchType)
- {
- int ruleAction = MARK_FOLLOWING;
-
- return new ParserRule(ruleAction, seq.substring(0,1), posMatch,
- seq.toCharArray(), null, 0, null, null, id, matchType,
- null);
- } //}}}
-
- //{{{ createMarkPreviousRule() method
- public static final ParserRule createMarkPreviousRule(
- int posMatch, String seq, byte id, byte matchType)
- {
- int ruleAction = MARK_PREVIOUS;
-
- return new ParserRule(ruleAction, seq.substring(0,1), posMatch,
- seq.toCharArray(), null, 0, null, null, id, matchType,
- null);
- } //}}}
-
- //{{{ createEscapeRule() method
- public static final ParserRule createEscapeRule(String seq)
- {
- int ruleAction = IS_ESCAPE;
-
- return new ParserRule(ruleAction, seq.substring(0,1),
- 0, seq.toCharArray(), null, 0, null,
- null, Token.NULL, MATCH_TYPE_CONTEXT, null);
- } //}}}
-
- //{{{ toString() method
- public String toString()
- {
- StringBuilder result = new StringBuilder();
- result.append(getClass().getName()).append("[action=");
- switch (action & MAJOR_ACTIONS)
- {
- case SEQ: result.append("SEQ"); break;
- case SPAN: result.append("SPAN"); break;
- case MARK_PREVIOUS: result.append("MARK_PREVIOUS"); break;
- case MARK_FOLLOWING: result.append("MARK_FOLLOWING"); break;
- case EOL_SPAN: result.append("EOL_SPAN"); break;
- default: result.append("UNKNOWN"); break;
- }
- int actionHints = action & ACTION_HINTS;
- result.append("[matchType=").append(matchType == MATCH_TYPE_CONTEXT ? "MATCH_TYPE_CONTEXT" : (matchType == MATCH_TYPE_RULE ? "MATCH_TYPE_RULE" : Token.tokenToString(matchType)));
- result.append(",NO_LINE_BREAK=").append((actionHints & NO_LINE_BREAK) != 0);
- result.append(",NO_WORD_BREAK=").append((actionHints & NO_WORD_BREAK) != 0);
- result.append(",IS_ESCAPE=").append((actionHints & IS_ESCAPE) != 0);
- result.append(",REGEXP=").append((actionHints & REGEXP) != 0);
- result.append("],upHashChar=").append(upHashChar);
- result.append(",upHashChars=").append(Arrays.toString(upHashChars));
- result.append(",startPosMatch=");
- result.append("[AT_LINE_START=").append((startPosMatch & AT_LINE_START) != 0);
- result.append(",AT_WHITESPACE_END=").append((startPosMatch & AT_WHITESPACE_END) != 0);
- result.append(",AT_WORD_START=").append((startPosMatch & AT_WORD_START) != 0);
- result.append("],start=").append(null==start?null:String.valueOf(start));
- result.append(",startRegexp=").append(startRegexp);
- result.append(",endPosMatch=");
- result.append("[AT_LINE_START=").append((endPosMatch & AT_LINE_START) != 0);
- result.append(",AT_WHITESPACE_END=").append((endPosMatch & AT_WHITESPACE_END) != 0);
- result.append(",AT_WORD_START=").append((endPosMatch & AT_WORD_START) != 0);
- result.append("],end=").append(null==end?null:String.valueOf(end));
- result.append(",delegate=").append(delegate);
- result.append(",escapeRule=").append(escapeRule);
- result.append(",token=").append(Token.tokenToString(token)).append(']');
- return result.toString();
- } //}}}
-
- //{{{ Private members
- private ParserRule(int action, String hashChar,
- int startPosMatch, char[] start, Pattern startRegexp,
- int endPosMatch, char[] end,
- ParserRuleSet delegate, byte token, byte matchType,
- String escape)
- {
- this.action = action;
- this.upHashChar = null == hashChar ? null : hashChar.toUpperCase();
- this.upHashChars = null;
- this.startPosMatch = startPosMatch;
- this.start = start;
- this.startRegexp = startRegexp;
- this.endPosMatch = endPosMatch;
- this.end = end;
- this.delegate = delegate;
- this.token = token;
- this.matchType = matchType;
- this.escapeRule = (escape != null && escape.length() > 0) ?
- createEscapeRule(escape) : null;
-
- if(this.delegate == null)
- {
- if((action & MAJOR_ACTIONS) != SEQ)
- {
- this.delegate = ParserRuleSet.getStandardRuleSet(token);
- }
- }
- }
-
- private ParserRule(char[] hashChars, int action,
- int startPosMatch, char[] start, Pattern startRegexp,
- int endPosMatch, char[] end,
- ParserRuleSet delegate, byte token, byte matchType,
- String escape)
- {
- this.action = action;
- this.upHashChar = null;
- Set<Character> hashCharsSet = new HashSet<Character>();
- for (char c : hashChars)
- {
- hashCharsSet.add(Character.toUpperCase(c));
- }
- this.upHashChars = new char[hashCharsSet.size()];
- int i = 0;
- for (Character c : hashCharsSet)
- {
- this.upHashChars[i++] = c;
- }
- Arrays.sort(this.upHashChars);
- this.startPosMatch = startPosMatch;
- this.start = start;
- this.startRegexp = startRegexp;
- this.endPosMatch = endPosMatch;
- this.end = end;
- this.delegate = delegate;
- this.token = token;
- this.matchType = matchType;
- this.escapeRule = (escape != null && escape.length() > 0) ?
- createEscapeRule(escape) : null;
-
- if(this.delegate == null)
- {
- if((action & MAJOR_ACTIONS) != SEQ)
- {
- this.delegate = ParserRuleSet.getStandardRuleSet(token);
- }
- }
- } //}}}
-}
-
+/*
+ * ParserRule.java - Parser rule for the token marker
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999 mike dillon
+ * Portions copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.syntax;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+/**
+ * A parser rule.
+ * @author mike dillon, Slava Pestov
+ * @version $Id: ParserRule.java 17352 2010-02-22 10:59:08Z kpouer $
+ */
+public class ParserRule
+{
+
+ //{{{ Major actions
+ public static final int MAJOR_ACTIONS = 0x000000FF;
+ public static final int SEQ = 0;
+ public static final int SPAN = 1 << 1;
+ public static final int MARK_PREVIOUS = 1 << 2;
+ public static final int MARK_FOLLOWING = 1 << 3;
+ public static final int EOL_SPAN = 1 << 4;
+ //}}}
+
+ //{{{ Action hints
+ public static final int ACTION_HINTS = 0x0000FF00;
+
+ @Deprecated
+ public static final int EXCLUDE_MATCH = 1 << 8;
+
+ public static final int NO_LINE_BREAK = 1 << 9;
+ public static final int NO_WORD_BREAK = 1 << 10;
+ public static final int IS_ESCAPE = 1 << 11;
+
+ @Deprecated
+ public static final int NO_ESCAPE = 1 << 12;
+
+ public static final int REGEXP = 1 << 13;
+ //}}}
+
+ //{{{ Special Match Token Types
+ public static final byte MATCH_TYPE_CONTEXT = -1;
+ public static final byte MATCH_TYPE_RULE = -2;
+ //}}}
+
+ //{{{ Position match hints
+ public static final int AT_LINE_START = 1 << 1;
+ public static final int AT_WHITESPACE_END = 1 << 2;
+ public static final int AT_WORD_START = 1 << 3;
+ //}}}
+
+ //{{{ Instance variables
+ public final String upHashChar;
+ public final char[] upHashChars;
+ public final int startPosMatch;
+ public final char[] start;
+ public final Pattern startRegexp;
+
+ public final int endPosMatch;
+ public final char[] end;
+
+ public final int action;
+ public final byte token;
+
+ /**
+ * matchType is the type of the token for the matched region. Special
+ * values are: MATCH_TYPE_CONTEXT = default token for the context,
+ * MATCH_TYPE_RULE = same token as the rule itself.
+ *
+ * @since jEdit 4.3pre10
+ */
+ public final byte matchType;
+
+ /**
+ * escapeRule is the rule-specific sequence used to escape other
+ * characters while the rule is in effect. If this character is
+ * non-zero, the character following the escape char will be skipped
+ * during parsing, and highlighted with the rule's token.
+ *
+ * @since jEdit 4.3pre12
+ */
+ public final ParserRule escapeRule;
+
+ public ParserRuleSet delegate;
+
+ /**
+ * @deprecated As the linking between rules is not anymore done within the rule but external. See {@link ParserRuleSet#getRules(Character)}
+ */
+ @Deprecated
+ public ParserRule next;
+ //}}}
+
+ //{{{ createSequenceRule() method
+ public static ParserRule createSequenceRule(
+ int posMatch, String seq, ParserRuleSet delegate, byte id)
+ {
+ return new ParserRule(SEQ, seq.substring(0,1),
+ posMatch, seq.toCharArray(), null,
+ 0, null, delegate, id, MATCH_TYPE_CONTEXT, null);
+ } //}}}
+
+ //{{{ createRegexpSequenceRule() method
+ /**
+ * @deprecated Use {@link #createRegexpSequenceRule(String,int,String,ParserRuleSet,byte,boolean)} instead
+ */
+ @Deprecated
+ public static ParserRule createRegexpSequenceRule(
+ char hashChar, int posMatch, String seq,
+ ParserRuleSet delegate, byte id, boolean ignoreCase)
+ throws PatternSyntaxException
+ {
+ return createRegexpSequenceRule(String.valueOf(hashChar), posMatch,
+ seq, delegate, id, ignoreCase);
+ } //}}}
+
+ //{{{ createRegexpSequenceRule() method
+ public static ParserRule createRegexpSequenceRule(
+ String hashChar, int posMatch, String seq,
+ ParserRuleSet delegate, byte id, boolean ignoreCase)
+ throws PatternSyntaxException
+ {
+ return new ParserRule(SEQ | REGEXP, hashChar, posMatch,
+ null, Pattern.compile(seq,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
+ 0, null, delegate, id, MATCH_TYPE_CONTEXT, null);
+ } //}}}
+
+ //{{{ createRegexpSequenceRule() method
+ public static ParserRule createRegexpSequenceRule(
+ int posMatch, char[] hashChars, String seq,
+ ParserRuleSet delegate, byte id, boolean ignoreCase)
+ throws PatternSyntaxException
+ {
+ return new ParserRule(hashChars, SEQ | REGEXP, posMatch,
+ null, Pattern.compile(seq,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
+ 0, null, delegate, id, MATCH_TYPE_CONTEXT, null);
+ } //}}}
+
+ //{{{ createSpanRule() method
+ public static ParserRule createSpanRule(
+ int startPosMatch, String start, int endPosMatch, String end,
+ ParserRuleSet delegate, byte id, byte matchType,
+ boolean noLineBreak, boolean noWordBreak, String escape)
+ {
+ int ruleAction = SPAN |
+ ((noLineBreak) ? NO_LINE_BREAK : 0) |
+ ((noWordBreak) ? NO_WORD_BREAK : 0);
+
+ return new ParserRule(ruleAction, start.substring(0,1), startPosMatch,
+ start.toCharArray(), null,
+ endPosMatch, end.toCharArray(),
+ delegate, id, matchType, escape);
+ } //}}}
+
+ //{{{ createRegexpSpanRule() method
+ public static ParserRule createRegexpSpanRule(
+ String hashChar, int startPosMatch, String start,
+ int endPosMatch, String end, ParserRuleSet delegate, byte id,
+ byte matchType, boolean noLineBreak, boolean noWordBreak,
+ boolean ignoreCase, String escape)
+ throws PatternSyntaxException
+ {
+ int ruleAction = SPAN | REGEXP |
+ ((noLineBreak) ? NO_LINE_BREAK : 0) |
+ ((noWordBreak) ? NO_WORD_BREAK : 0);
+
+ return new ParserRule(ruleAction, hashChar, startPosMatch, null,
+ Pattern.compile(start,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
+ endPosMatch, end.toCharArray(), delegate, id, matchType,
+ escape);
+ } //}}}
+
+ //{{{ createRegexpSpanRule() method
+ public static ParserRule createRegexpSpanRule(
+ int startPosMatch, char[] hashChars, String start,
+ int endPosMatch, String end, ParserRuleSet delegate, byte id,
+ byte matchType, boolean noLineBreak, boolean noWordBreak,
+ boolean ignoreCase, String escape)
+ throws PatternSyntaxException
+ {
+ int ruleAction = SPAN | REGEXP |
+ ((noLineBreak) ? NO_LINE_BREAK : 0) |
+ ((noWordBreak) ? NO_WORD_BREAK : 0);
+
+ return new ParserRule(hashChars, ruleAction, startPosMatch, null,
+ Pattern.compile(start,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
+ endPosMatch, end.toCharArray(), delegate, id,
+ matchType, escape);
+ } //}}}
+
+ //{{{ createEOLSpanRule() method
+ public static ParserRule createEOLSpanRule(
+ int posMatch, String seq, ParserRuleSet delegate, byte id,
+ byte matchType)
+ {
+ int ruleAction = EOL_SPAN | NO_LINE_BREAK;
+
+ return new ParserRule(ruleAction, seq.substring(0,1), posMatch,
+ seq.toCharArray(), null, 0, null,
+ delegate, id, matchType, null);
+ } //}}}
+
+ //{{{ createRegexpEOLSpanRule() method
+ /**
+ * @deprecated Use {@link #createRegexpEOLSpanRule(String,int,String,ParserRuleSet,byte,byte,boolean)} instead
+ */
+ @Deprecated
+ public static ParserRule createRegexpEOLSpanRule(
+ char hashChar, int posMatch, String seq, ParserRuleSet delegate,
+ byte id, byte matchType, boolean ignoreCase)
+ throws PatternSyntaxException
+ {
+ return createRegexpEOLSpanRule(String.valueOf(hashChar),
+ posMatch,seq,delegate,id,matchType,ignoreCase);
+ } //}}}
+
+ //{{{ createRegexpEOLSpanRule() method
+ public static ParserRule createRegexpEOLSpanRule(
+ String hashChar, int posMatch, String seq, ParserRuleSet delegate,
+ byte id, byte matchType, boolean ignoreCase)
+ throws PatternSyntaxException
+ {
+ int ruleAction = EOL_SPAN | REGEXP | NO_LINE_BREAK;
+
+ return new ParserRule(ruleAction, hashChar, posMatch,
+ null, Pattern.compile(seq,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
+ 0, null, delegate, id, matchType, null);
+ } //}}}
+
+ //{{{ createRegexpEOLSpanRule() method
+ public static ParserRule createRegexpEOLSpanRule(
+ int posMatch, char[] hashChars, String seq, ParserRuleSet delegate,
+ byte id, byte matchType, boolean ignoreCase)
+ throws PatternSyntaxException
+ {
+ int ruleAction = EOL_SPAN | REGEXP | NO_LINE_BREAK;
+
+ return new ParserRule(hashChars, ruleAction, posMatch,
+ null, Pattern.compile(seq,(ignoreCase ? Pattern.CASE_INSENSITIVE : 0)),
+ 0, null, delegate, id, matchType, null);
+ } //}}}
+
+ //{{{ createMarkFollowingRule() method
+ public static ParserRule createMarkFollowingRule(
+ int posMatch, String seq, byte id, byte matchType)
+ {
+ int ruleAction = MARK_FOLLOWING;
+
+ return new ParserRule(ruleAction, seq.substring(0,1), posMatch,
+ seq.toCharArray(), null, 0, null, null, id, matchType,
+ null);
+ } //}}}
+
+ //{{{ createMarkPreviousRule() method
+ public static ParserRule createMarkPreviousRule(
+ int posMatch, String seq, byte id, byte matchType)
+ {
+ int ruleAction = MARK_PREVIOUS;
+
+ return new ParserRule(ruleAction, seq.substring(0,1), posMatch,
+ seq.toCharArray(), null, 0, null, null, id, matchType,
+ null);
+ } //}}}
+
+ //{{{ createEscapeRule() method
+ public static ParserRule createEscapeRule(String seq)
+ {
+ int ruleAction = IS_ESCAPE;
+
+ return new ParserRule(ruleAction, seq.substring(0,1),
+ 0, seq.toCharArray(), null, 0, null,
+ null, Token.NULL, MATCH_TYPE_CONTEXT, null);
+ } //}}}
+
+ //{{{ toString() method
+ public String toString()
+ {
+ StringBuilder result = new StringBuilder();
+ result.append(getClass().getName()).append("[action=");
+ switch (action & MAJOR_ACTIONS)
+ {
+ case SEQ: result.append("SEQ"); break;
+ case SPAN: result.append("SPAN"); break;
+ case MARK_PREVIOUS: result.append("MARK_PREVIOUS"); break;
+ case MARK_FOLLOWING: result.append("MARK_FOLLOWING"); break;
+ case EOL_SPAN: result.append("EOL_SPAN"); break;
+ default: result.append("UNKNOWN"); break;
+ }
+ int actionHints = action & ACTION_HINTS;
+ result.append("[matchType=").append(matchType == MATCH_TYPE_CONTEXT ? "MATCH_TYPE_CONTEXT" : (matchType == MATCH_TYPE_RULE ? "MATCH_TYPE_RULE" : Token.tokenToString(matchType)));
+ result.append(",NO_LINE_BREAK=").append((actionHints & NO_LINE_BREAK) != 0);
+ result.append(",NO_WORD_BREAK=").append((actionHints & NO_WORD_BREAK) != 0);
+ result.append(",IS_ESCAPE=").append((actionHints & IS_ESCAPE) != 0);
+ result.append(",REGEXP=").append((actionHints & REGEXP) != 0);
+ result.append("],upHashChar=").append(upHashChar);
+ result.append(",upHashChars=").append(Arrays.toString(upHashChars));
+ result.append(",startPosMatch=");
+ result.append("[AT_LINE_START=").append((startPosMatch & AT_LINE_START) != 0);
+ result.append(",AT_WHITESPACE_END=").append((startPosMatch & AT_WHITESPACE_END) != 0);
+ result.append(",AT_WORD_START=").append((startPosMatch & AT_WORD_START) != 0);
+ result.append("],start=").append(null==start?null:String.valueOf(start));
+ result.append(",startRegexp=").append(startRegexp);
+ result.append(",endPosMatch=");
+ result.append("[AT_LINE_START=").append((endPosMatch & AT_LINE_START) != 0);
+ result.append(",AT_WHITESPACE_END=").append((endPosMatch & AT_WHITESPACE_END) != 0);
+ result.append(",AT_WORD_START=").append((endPosMatch & AT_WORD_START) != 0);
+ result.append("],end=").append(null==end?null:String.valueOf(end));
+ result.append(",delegate=").append(delegate);
+ result.append(",escapeRule=").append(escapeRule);
+ result.append(",token=").append(Token.tokenToString(token)).append(']');
+ return result.toString();
+ } //}}}
+
+ //{{{ Private members
+ private ParserRule(int action, String hashChar,
+ int startPosMatch, char[] start, Pattern startRegexp,
+ int endPosMatch, char[] end,
+ ParserRuleSet delegate, byte token, byte matchType,
+ String escape)
+ {
+ this.action = action;
+ this.upHashChar = null == hashChar ? null : hashChar.toUpperCase();
+ this.upHashChars = null;
+ this.startPosMatch = startPosMatch;
+ this.start = start;
+ this.startRegexp = startRegexp;
+ this.endPosMatch = endPosMatch;
+ this.end = end;
+ this.delegate = delegate;
+ this.token = token;
+ this.matchType = matchType;
+ this.escapeRule = (escape != null && escape.length() > 0) ?
+ createEscapeRule(escape) : null;
+
+ if(this.delegate == null)
+ {
+ if((action & MAJOR_ACTIONS) != SEQ)
+ {
+ this.delegate = ParserRuleSet.getStandardRuleSet(token);
+ }
+ }
+ }
+
+ private ParserRule(char[] hashChars, int action,
+ int startPosMatch, char[] start, Pattern startRegexp,
+ int endPosMatch, char[] end,
+ ParserRuleSet delegate, byte token, byte matchType,
+ String escape)
+ {
+ this.action = action;
+ this.upHashChar = null;
+ Set<Character> hashCharsSet = new HashSet<Character>();
+ for (char c : hashChars)
+ {
+ hashCharsSet.add(Character.toUpperCase(c));
+ }
+ this.upHashChars = new char[hashCharsSet.size()];
+ int i = 0;
+ for (Character c : hashCharsSet)
+ {
+ this.upHashChars[i++] = c;
+ }
+ Arrays.sort(this.upHashChars);
+ this.startPosMatch = startPosMatch;
+ this.start = start;
+ this.startRegexp = startRegexp;
+ this.endPosMatch = endPosMatch;
+ this.end = end;
+ this.delegate = delegate;
+ this.token = token;
+ this.matchType = matchType;
+ this.escapeRule = (escape != null && escape.length() > 0) ?
+ createEscapeRule(escape) : null;
+
+ if(this.delegate == null)
+ {
+ if((action & MAJOR_ACTIONS) != SEQ)
+ {
+ this.delegate = ParserRuleSet.getStandardRuleSet(token);
+ }
+ }
+ } //}}}
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/syntax/ParserRuleSet.java b/jEdit/org/gjt/sp/jedit/syntax/ParserRuleSet.java
index aa7cef1..922a350 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/ParserRuleSet.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/ParserRuleSet.java
@@ -1,397 +1,397 @@
-/*
- * ParserRuleSet.java - A set of parser rules
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999 mike dillon
- * Portions copyright (C) 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.syntax;
-
-//{{{ Imports
-import java.util.*;
-import java.util.regex.Pattern;
-//}}}
-
-/**
- * A set of parser rules.
- * @author mike dillon
- * @version $Id: ParserRuleSet.java 16344 2009-10-14 10:31:01Z kpouer $
- */
-public class ParserRuleSet
-{
- //{{{ getStandardRuleSet() method
- /**
- * Returns a parser rule set that highlights everything with the
- * specified token type.
- * @param id The token type
- */
- public static ParserRuleSet getStandardRuleSet(byte id)
- {
- return standard[id];
- } //}}}
-
- //{{{ ParserRuleSet constructor
- public ParserRuleSet(String modeName, String setName)
- {
- this.modeName = modeName;
- this.setName = setName;
- ruleMap = new HashMap<Character, List<ParserRule>>();
- imports = new ArrayList<ParserRuleSet>();
- } //}}}
-
- //{{{ getModeName() method
- public String getModeName()
- {
- return modeName;
- } //}}}
-
- //{{{ getSetName() method
- public String getSetName()
- {
- return setName;
- } //}}}
-
- //{{{ getName() method
- public String getName()
- {
- return modeName + "::" + setName;
- } //}}}
-
- //{{{ getProperties() method
- public Hashtable<String, String> getProperties()
- {
- return props;
- } //}}}
-
- //{{{ setProperties() method
- public void setProperties(Hashtable<String, String> props)
- {
- this.props = props;
- _noWordSep = null;
- } //}}}
-
- //{{{ resolveImports() method
- /**
- * Resolves all rulesets added with {@link #addRuleSet(ParserRuleSet)}.
- * @since jEdit 4.2pre3
- */
- public void resolveImports()
- {
- for (ParserRuleSet ruleset : imports)
- {
- if (!ruleset.imports.isEmpty())
- {
- //prevent infinite recursion
- ruleset.imports.remove(this);
- ruleset.resolveImports();
- }
-
- for (List<ParserRule> rules : ruleset.ruleMap.values())
- {
- for (ParserRule rule : rules)
- {
- addRule(rule);
- }
- }
-
- if (ruleset.keywords != null)
- {
- if (keywords == null)
- keywords = new KeywordMap(ignoreCase);
- keywords.add(ruleset.keywords);
- }
- }
- imports.clear();
- } //}}}
-
- //{{{ addRuleSet() method
- /**
- * Adds all rules contained in the given ruleset.
- * @param ruleset The ruleset
- * @since jEdit 4.2pre3
- */
- public void addRuleSet(ParserRuleSet ruleset)
- {
- imports.add(ruleset);
- } //}}}
-
- //{{{ addRule() method
- public void addRule(ParserRule r)
- {
- ruleCount++;
- Character[] keys;
- if (null == r.upHashChars)
- {
- keys = new Character[1];
- if ((null == r.upHashChar) || (0 >= r.upHashChar.length()))
- {
- keys[0] = null;
- }
- else
- {
- keys[0] = Character.valueOf(r.upHashChar.charAt(0));
- }
- }
- else
- {
- keys = new Character[r.upHashChars.length];
- int i = 0;
- for (char upHashChar : r.upHashChars)
- {
- keys[i++] = upHashChar;
- }
- }
- for (Character key : keys)
- {
- List<ParserRule> rules = ruleMap.get(key);
- if (null == rules)
- {
- rules = new ArrayList<ParserRule>();
- ruleMap.put(key,rules);
- }
- int ruleAmount = rules.size();
- rules.add(r);
- // fill the deprecated ParserRule.next pointer
- if (ruleAmount > 0)
- {
- rules.get(ruleAmount).next = r;
- }
- }
- } //}}}
-
- //{{{ getRules() method
- /**
- * @deprecated As the linking between rules is not anymore done within the rule, use {@link #getRules(Character)} instead
- */
- @Deprecated
- public ParserRule getRules(char ch)
- {
- List<ParserRule> rules = getRules(Character.valueOf(ch));
- return rules.get(0);
- } //}}}
-
- //{{{ getRules() method
- public List<ParserRule> getRules(Character key)
- {
- List<ParserRule> rulesForNull = ruleMap.get(null);
- boolean emptyForNull = (rulesForNull == null) || (rulesForNull.size() == 0);
- Character upperKey = null == key ? null : Character.valueOf(Character.toUpperCase(key.charValue()));
- List<ParserRule> rulesForKey = null == upperKey ? null : ruleMap.get(upperKey);
- boolean emptyForKey = (rulesForKey == null) || (rulesForKey.size() == 0);
- if (emptyForNull && emptyForKey)
- {
- return Collections.emptyList();
- }
- else if (emptyForKey)
- {
- return rulesForNull;
- }
- else if (emptyForNull)
- {
- return rulesForKey;
- }
- else
- {
- int size = rulesForNull.size() + rulesForKey.size();
- ArrayList<ParserRule> mixed = new ArrayList<ParserRule>(size);
- mixed.addAll(rulesForKey);
- mixed.addAll(rulesForNull);
- // fill the deprecated ParserRule.next pointer
- rulesForKey.get(rulesForKey.size() - 1).next = rulesForNull.get(0);
- return mixed;
- }
- } //}}}
-
- //{{{ getRuleCount() method
- public int getRuleCount()
- {
- return ruleCount;
- } //}}}
-
- //{{{ getTerminateChar() method
- /**
- * Returns the number of chars that can be read before the rule parsing stops.
- *
- * @return a number of chars or -1 (default value) if there is no limit
- */
- public int getTerminateChar()
- {
- return terminateChar;
- } //}}}
-
- //{{{ setTerminateChar() method
- public void setTerminateChar(int atChar)
- {
- terminateChar = (atChar >= 0) ? atChar : -1;
- } //}}}
-
- //{{{ getIgnoreCase() method
- public boolean getIgnoreCase()
- {
- return ignoreCase;
- } //}}}
-
- //{{{ setIgnoreCase() method
- public void setIgnoreCase(boolean b)
- {
- ignoreCase = b;
- } //}}}
-
- //{{{ getKeywords() method
- public KeywordMap getKeywords()
- {
- return keywords;
- } //}}}
-
- //{{{ setKeywords() method
- public void setKeywords(KeywordMap km)
- {
- keywords = km;
- _noWordSep = null;
- } //}}}
-
- //{{{ getHighlightDigits() method
- public boolean getHighlightDigits()
- {
- return highlightDigits;
- } //}}}
-
- //{{{ setHighlightDigits() method
- public void setHighlightDigits(boolean highlightDigits)
- {
- this.highlightDigits = highlightDigits;
- } //}}}
-
- //{{{ getDigitRegexp() method
- public Pattern getDigitRegexp()
- {
- return digitRE;
- } //}}}
-
- //{{{ setDigitRegexp() method
- public void setDigitRegexp(Pattern digitRE)
- {
- this.digitRE = digitRE;
- } //}}}
-
- //{{{ getEscapeRule() method
- public ParserRule getEscapeRule()
- {
- return escapeRule;
- } //}}}
-
- //{{{ setEscapeRule() method
- public void setEscapeRule(ParserRule escapeRule)
- {
- this.escapeRule = escapeRule;
- } //}}}
-
- //{{{ getDefault() method
- public byte getDefault()
- {
- return defaultToken;
- } //}}}
-
- //{{{ setDefault() method
- public void setDefault(byte def)
- {
- defaultToken = def;
- } //}}}
-
- //{{{ getNoWordSep() method
- public String getNoWordSep()
- {
- if(_noWordSep == null)
- {
- _noWordSep = noWordSep;
- if(noWordSep == null)
- noWordSep = "";
- if(keywords != null)
- noWordSep += keywords.getNonAlphaNumericChars();
- }
- return noWordSep;
- } //}}}
-
- //{{{ setNoWordSep() method
- public void setNoWordSep(String noWordSep)
- {
- this.noWordSep = noWordSep;
- _noWordSep = null;
- } //}}}
-
- //{{{ isBuiltIn() method
- /**
- * Returns if this is a built-in ruleset.
- * @since jEdit 4.2pre1
- */
- public boolean isBuiltIn()
- {
- return builtIn;
- } //}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- return getClass().getName() + '[' + modeName + "::" + setName + ']';
- } //}}}
-
- //{{{ Private members
- private static ParserRuleSet[] standard;
-
- static
- {
- standard = new ParserRuleSet[Token.ID_COUNT];
- for(byte i = 0; i < Token.ID_COUNT; i++)
- {
- standard[i] = new ParserRuleSet(null,null);
- standard[i].setDefault(i);
- standard[i].builtIn = true;
- }
- }
-
- private String modeName, setName;
- private Hashtable<String, String> props;
-
- private KeywordMap keywords;
-
- private int ruleCount;
-
- private Map<Character, List<ParserRule>> ruleMap;
-
- private final List<ParserRuleSet> imports;
-
- /**
- * The number of chars that can be read before the parsing stops.
- * <TERMINATE AT_CHAR="1" />
- */
- private int terminateChar = -1;
- private boolean ignoreCase = true;
- private byte defaultToken;
- private ParserRule escapeRule;
-
- private boolean highlightDigits;
- private Pattern digitRE;
-
- private String _noWordSep;
- private String noWordSep;
-
- private boolean builtIn;
- //}}}
-}
+/*
+ * ParserRuleSet.java - A set of parser rules
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999 mike dillon
+ * Portions copyright (C) 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.syntax;
+
+//{{{ Imports
+import java.util.*;
+import java.util.regex.Pattern;
+//}}}
+
+/**
+ * A set of parser rules.
+ * @author mike dillon
+ * @version $Id: ParserRuleSet.java 17560 2010-03-31 09:19:23Z kpouer $
+ */
+public class ParserRuleSet
+{
+ //{{{ getStandardRuleSet() method
+ /**
+ * Returns a parser rule set that highlights everything with the
+ * specified token type.
+ * @param id The token type
+ */
+ public static ParserRuleSet getStandardRuleSet(byte id)
+ {
+ return standard[id];
+ } //}}}
+
+ //{{{ ParserRuleSet constructor
+ public ParserRuleSet(String modeName, String setName)
+ {
+ this.modeName = modeName;
+ this.setName = setName;
+ ruleMap = new HashMap<Character, List<ParserRule>>();
+ imports = new ArrayList<ParserRuleSet>();
+ } //}}}
+
+ //{{{ getModeName() method
+ public String getModeName()
+ {
+ return modeName;
+ } //}}}
+
+ //{{{ getSetName() method
+ public String getSetName()
+ {
+ return setName;
+ } //}}}
+
+ //{{{ getName() method
+ public String getName()
+ {
+ return modeName + "::" + setName;
+ } //}}}
+
+ //{{{ getProperties() method
+ public Hashtable<String, String> getProperties()
+ {
+ return props;
+ } //}}}
+
+ //{{{ setProperties() method
+ public void setProperties(Hashtable<String, String> props)
+ {
+ this.props = props;
+ _noWordSep = null;
+ } //}}}
+
+ //{{{ resolveImports() method
+ /**
+ * Resolves all rulesets added with {@link #addRuleSet(ParserRuleSet)}.
+ * @since jEdit 4.2pre3
+ */
+ public void resolveImports()
+ {
+ for (ParserRuleSet ruleset : imports)
+ {
+ if (!ruleset.imports.isEmpty())
+ {
+ //prevent infinite recursion
+ ruleset.imports.remove(this);
+ ruleset.resolveImports();
+ }
+
+ for (List<ParserRule> rules : ruleset.ruleMap.values())
+ {
+ for (ParserRule rule : rules)
+ {
+ addRule(rule);
+ }
+ }
+
+ if (ruleset.keywords != null)
+ {
+ if (keywords == null)
+ keywords = new KeywordMap(ignoreCase);
+ keywords.add(ruleset.keywords);
+ }
+ }
+ imports.clear();
+ } //}}}
+
+ //{{{ addRuleSet() method
+ /**
+ * Adds all rules contained in the given ruleset.
+ * @param ruleset The ruleset
+ * @since jEdit 4.2pre3
+ */
+ public void addRuleSet(ParserRuleSet ruleset)
+ {
+ imports.add(ruleset);
+ } //}}}
+
+ //{{{ addRule() method
+ public void addRule(ParserRule r)
+ {
+ ruleCount++;
+ Character[] keys;
+ if (null == r.upHashChars)
+ {
+ keys = new Character[1];
+ if ((null == r.upHashChar) || (0 >= r.upHashChar.length()))
+ {
+ keys[0] = null;
+ }
+ else
+ {
+ keys[0] = Character.valueOf(r.upHashChar.charAt(0));
+ }
+ }
+ else
+ {
+ keys = new Character[r.upHashChars.length];
+ int i = 0;
+ for (char upHashChar : r.upHashChars)
+ {
+ keys[i++] = upHashChar;
+ }
+ }
+ for (Character key : keys)
+ {
+ List<ParserRule> rules = ruleMap.get(key);
+ if (null == rules)
+ {
+ rules = new ArrayList<ParserRule>();
+ ruleMap.put(key,rules);
+ }
+ int ruleAmount = rules.size();
+ rules.add(r);
+ // fill the deprecated ParserRule.next pointer
+ if (ruleAmount > 0)
+ {
+ rules.get(ruleAmount).next = r;
+ }
+ }
+ } //}}}
+
+ //{{{ getRules() method
+ /**
+ * @deprecated As the linking between rules is not anymore done within the rule, use {@link #getRules(Character)} instead
+ */
+ @Deprecated
+ public ParserRule getRules(char ch)
+ {
+ List<ParserRule> rules = getRules(Character.valueOf(ch));
+ return rules.get(0);
+ } //}}}
+
+ //{{{ getRules() method
+ public List<ParserRule> getRules(Character key)
+ {
+ List<ParserRule> rulesForNull = ruleMap.get(null);
+ boolean emptyForNull = rulesForNull == null || rulesForNull.isEmpty();
+ Character upperKey = key == null ? null : Character.valueOf(Character.toUpperCase(key.charValue()));
+ List<ParserRule> rulesForKey = upperKey == null ? null : ruleMap.get(upperKey);
+ boolean emptyForKey = rulesForKey == null || rulesForKey.isEmpty();
+ if (emptyForNull && emptyForKey)
+ {
+ return Collections.emptyList();
+ }
+ else if (emptyForKey)
+ {
+ return rulesForNull;
+ }
+ else if (emptyForNull)
+ {
+ return rulesForKey;
+ }
+ else
+ {
+ int size = rulesForNull.size() + rulesForKey.size();
+ List<ParserRule> mixed = new ArrayList<ParserRule>(size);
+ mixed.addAll(rulesForKey);
+ mixed.addAll(rulesForNull);
+ // fill the deprecated ParserRule.next pointer
+ rulesForKey.get(rulesForKey.size() - 1).next = rulesForNull.get(0);
+ return mixed;
+ }
+ } //}}}
+
+ //{{{ getRuleCount() method
+ public int getRuleCount()
+ {
+ return ruleCount;
+ } //}}}
+
+ //{{{ getTerminateChar() method
+ /**
+ * Returns the number of chars that can be read before the rule parsing stops.
+ *
+ * @return a number of chars or -1 (default value) if there is no limit
+ */
+ public int getTerminateChar()
+ {
+ return terminateChar;
+ } //}}}
+
+ //{{{ setTerminateChar() method
+ public void setTerminateChar(int atChar)
+ {
+ terminateChar = (atChar >= 0) ? atChar : -1;
+ } //}}}
+
+ //{{{ getIgnoreCase() method
+ public boolean getIgnoreCase()
+ {
+ return ignoreCase;
+ } //}}}
+
+ //{{{ setIgnoreCase() method
+ public void setIgnoreCase(boolean b)
+ {
+ ignoreCase = b;
+ } //}}}
+
+ //{{{ getKeywords() method
+ public KeywordMap getKeywords()
+ {
+ return keywords;
+ } //}}}
+
+ //{{{ setKeywords() method
+ public void setKeywords(KeywordMap km)
+ {
+ keywords = km;
+ _noWordSep = null;
+ } //}}}
+
+ //{{{ getHighlightDigits() method
+ public boolean getHighlightDigits()
+ {
+ return highlightDigits;
+ } //}}}
+
+ //{{{ setHighlightDigits() method
+ public void setHighlightDigits(boolean highlightDigits)
+ {
+ this.highlightDigits = highlightDigits;
+ } //}}}
+
+ //{{{ getDigitRegexp() method
+ public Pattern getDigitRegexp()
+ {
+ return digitRE;
+ } //}}}
+
+ //{{{ setDigitRegexp() method
+ public void setDigitRegexp(Pattern digitRE)
+ {
+ this.digitRE = digitRE;
+ } //}}}
+
+ //{{{ getEscapeRule() method
+ public ParserRule getEscapeRule()
+ {
+ return escapeRule;
+ } //}}}
+
+ //{{{ setEscapeRule() method
+ public void setEscapeRule(ParserRule escapeRule)
+ {
+ this.escapeRule = escapeRule;
+ } //}}}
+
+ //{{{ getDefault() method
+ public byte getDefault()
+ {
+ return defaultToken;
+ } //}}}
+
+ //{{{ setDefault() method
+ public void setDefault(byte def)
+ {
+ defaultToken = def;
+ } //}}}
+
+ //{{{ getNoWordSep() method
+ public String getNoWordSep()
+ {
+ if(_noWordSep == null)
+ {
+ _noWordSep = noWordSep;
+ if(noWordSep == null)
+ noWordSep = "";
+ if(keywords != null)
+ noWordSep += keywords.getNonAlphaNumericChars();
+ }
+ return noWordSep;
+ } //}}}
+
+ //{{{ setNoWordSep() method
+ public void setNoWordSep(String noWordSep)
+ {
+ this.noWordSep = noWordSep;
+ _noWordSep = null;
+ } //}}}
+
+ //{{{ isBuiltIn() method
+ /**
+ * Returns if this is a built-in ruleset.
+ * @since jEdit 4.2pre1
+ */
+ public boolean isBuiltIn()
+ {
+ return builtIn;
+ } //}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ return getClass().getName() + '[' + modeName + "::" + setName + ']';
+ } //}}}
+
+ //{{{ Private members
+ private static ParserRuleSet[] standard;
+
+ static
+ {
+ standard = new ParserRuleSet[Token.ID_COUNT];
+ for(byte i = 0; i < Token.ID_COUNT; i++)
+ {
+ standard[i] = new ParserRuleSet(null,null);
+ standard[i].setDefault(i);
+ standard[i].builtIn = true;
+ }
+ }
+
+ private String modeName, setName;
+ private Hashtable<String, String> props;
+
+ private KeywordMap keywords;
+
+ private int ruleCount;
+
+ private final Map<Character, List<ParserRule>> ruleMap;
+
+ private final List<ParserRuleSet> imports;
+
+ /**
+ * The number of chars that can be read before the parsing stops.
+ * <TERMINATE AT_CHAR="1" />
+ */
+ private int terminateChar = -1;
+ private boolean ignoreCase = true;
+ private byte defaultToken;
+ private ParserRule escapeRule;
+
+ private boolean highlightDigits;
+ private Pattern digitRE;
+
+ private String _noWordSep;
+ private String noWordSep;
+
+ private boolean builtIn;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/SyntaxStyle.java b/jEdit/org/gjt/sp/jedit/syntax/SyntaxStyle.java
index 279873b..1a86809 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/SyntaxStyle.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/SyntaxStyle.java
@@ -1,81 +1,81 @@
-/*
- * SyntaxStyle.java - A simple text style class
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.syntax;
-
-import java.awt.Font;
-import java.awt.Color;
-
-/**
- * A simple text style class. It can specify the color, italic flag,
- * and bold flag of a run of text.
- * @author Slava Pestov
- * @version $Id: SyntaxStyle.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class SyntaxStyle
-{
- //{{{ SyntaxStyle constructor
- /**
- * Creates a new SyntaxStyle.
- * @param fgColor The text color
- * @param bgColor The background color
- * @param font The text font
- */
- public SyntaxStyle(Color fgColor, Color bgColor, Font font)
- {
- this.fgColor = fgColor;
- this.bgColor = bgColor;
- this.font = font;
- } //}}}
-
- //{{{ getForegroundColor() method
- /**
- * Returns the text color.
- */
- public Color getForegroundColor()
- {
- return fgColor;
- } //}}}
-
- //{{{ getBackgroundColor() method
- /**
- * Returns the background color.
- */
- public Color getBackgroundColor()
- {
- return bgColor;
- } //}}}
-
- //{{{ getFont() method
- /**
- * Returns the style font.
- */
- public Font getFont()
- {
- return font;
- } //}}}
-
- //{{{ Private members
- private Color fgColor;
- private Color bgColor;
- private Font font;
- //}}}
-}
+/*
+ * SyntaxStyle.java - A simple text style class
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.syntax;
+
+import java.awt.Font;
+import java.awt.Color;
+
+/**
+ * A simple text style class. It can specify the color, italic flag,
+ * and bold flag of a run of text.
+ * @author Slava Pestov
+ * @version $Id: SyntaxStyle.java 12504 2008-04-22 23:12:43Z ezust $
+ */
+public class SyntaxStyle
+{
+ //{{{ SyntaxStyle constructor
+ /**
+ * Creates a new SyntaxStyle.
+ * @param fgColor The text color
+ * @param bgColor The background color
+ * @param font The text font
+ */
+ public SyntaxStyle(Color fgColor, Color bgColor, Font font)
+ {
+ this.fgColor = fgColor;
+ this.bgColor = bgColor;
+ this.font = font;
+ } //}}}
+
+ //{{{ getForegroundColor() method
+ /**
+ * Returns the text color.
+ */
+ public Color getForegroundColor()
+ {
+ return fgColor;
+ } //}}}
+
+ //{{{ getBackgroundColor() method
+ /**
+ * Returns the background color.
+ */
+ public Color getBackgroundColor()
+ {
+ return bgColor;
+ } //}}}
+
+ //{{{ getFont() method
+ /**
+ * Returns the style font.
+ */
+ public Font getFont()
+ {
+ return font;
+ } //}}}
+
+ //{{{ Private members
+ private Color fgColor;
+ private Color bgColor;
+ private Font font;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/SyntaxUtilities.java b/jEdit/org/gjt/sp/jedit/syntax/SyntaxUtilities.java
index b0e7a6d..fafa9de 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/SyntaxUtilities.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/SyntaxUtilities.java
@@ -1,65 +1,65 @@
-/*
- * SyntaxUtilities.java - Utility functions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.syntax;
-
-import javax.swing.text.Segment;
-
-/**
- * Contains utility functions used by the syntax highlighting code.
- * @since jEdit 4.2pre1
- * @version $Id: SyntaxUtilities.java 12504 2008-04-22 23:12:43Z ezust $
- * @author Slava Pestov
- */
-public class SyntaxUtilities
-{
- //{{{ regionMatches() method
- /**
- * Checks if a subregion of a <code>Segment</code> is equal to a
- * character array.
- * @param ignoreCase True if case should be ignored, false otherwise
- * @param text The segment
- * @param offset The offset into the segment
- * @param match The character array to match
- * @since jEdit 4.2pre1
- */
- public static boolean regionMatches(boolean ignoreCase, Segment text,
- int offset, char[] match)
- {
- int length = offset + match.length;
- if(length > text.offset + text.count)
- return false;
- char[] textArray = text.array;
- for(int i = offset, j = 0; i < length; i++, j++)
- {
- char c1 = textArray[i];
- char c2 = match[j];
- if(ignoreCase)
- {
- c1 = Character.toUpperCase(c1);
- c2 = Character.toUpperCase(c2);
- }
- if(c1 != c2)
- return false;
- }
- return true;
- } //}}}
-}
+/*
+ * SyntaxUtilities.java - Utility functions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.syntax;
+
+import javax.swing.text.Segment;
+
+/**
+ * Contains utility functions used by the syntax highlighting code.
+ * @since jEdit 4.2pre1
+ * @version $Id: SyntaxUtilities.java 12504 2008-04-22 23:12:43Z ezust $
+ * @author Slava Pestov
+ */
+public class SyntaxUtilities
+{
+ //{{{ regionMatches() method
+ /**
+ * Checks if a subregion of a <code>Segment</code> is equal to a
+ * character array.
+ * @param ignoreCase True if case should be ignored, false otherwise
+ * @param text The segment
+ * @param offset The offset into the segment
+ * @param match The character array to match
+ * @since jEdit 4.2pre1
+ */
+ public static boolean regionMatches(boolean ignoreCase, Segment text,
+ int offset, char[] match)
+ {
+ int length = offset + match.length;
+ if(length > text.offset + text.count)
+ return false;
+ char[] textArray = text.array;
+ for(int i = offset, j = 0; i < length; i++, j++)
+ {
+ char c1 = textArray[i];
+ char c2 = match[j];
+ if(ignoreCase)
+ {
+ c1 = Character.toUpperCase(c1);
+ c2 = Character.toUpperCase(c2);
+ }
+ if(c1 != c2)
+ return false;
+ }
+ return true;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/Token.java b/jEdit/org/gjt/sp/jedit/syntax/Token.java
index dadfc9f..2f43a37 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/Token.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/Token.java
@@ -1,164 +1,164 @@
-/*
- * Token.java - Syntax token
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.syntax;
-
-import java.lang.reflect.Field;
-
-/**
- * A linked list of syntax tokens.
- *
- * @author Slava Pestov
- * @version $Id: Token.java 15712 2009-07-19 19:40:40Z shlomy $
- */
-public class Token
-{
- //{{{ stringToToken() method
- /**
- * Converts a token type string to a token type constant.
- * @param value The token type
- * @since jEdit 4.1pre1
- */
- public static byte stringToToken(String value)
- {
- try
- {
- Field f = Token.class.getField(value);
- return f.getByte(null);
- }
- catch(Exception e)
- {
- return -1;
- }
- } //}}}
-
- //{{{ tokenToString() method
- /**
- * Converts a token type constant to a token type string.
- * @since jEdit 4.2pre1
- */
- public static String tokenToString(byte token)
- {
- return (token == Token.END) ? "END" : TOKEN_TYPES[token];
- } //}}}
-
- //{{{ Token types
- public static final String[] TOKEN_TYPES = new String[] {
- "NULL",
- "COMMENT1",
- "COMMENT2",
- "COMMENT3",
- "COMMENT4",
- "DIGIT",
- "FUNCTION",
- "INVALID",
- "KEYWORD1",
- "KEYWORD2",
- "KEYWORD3",
- "KEYWORD4",
- "LABEL",
- "LITERAL1",
- "LITERAL2",
- "LITERAL3",
- "LITERAL4",
- "MARKUP",
- "OPERATOR"
- };
-
- public static final byte NULL = 0;
-
- public static final byte COMMENT1 = 1;
- public static final byte COMMENT2 = 2;
- public static final byte COMMENT3 = 3;
- public static final byte COMMENT4 = 4;
- public static final byte DIGIT = 5;
- public static final byte FUNCTION = 6;
- public static final byte INVALID = 7;
- public static final byte KEYWORD1 = 8;
- public static final byte KEYWORD2 = 9;
- public static final byte KEYWORD3 = 10;
- public static final byte KEYWORD4 = 11;
- public static final byte LABEL = 12;
- public static final byte LITERAL1 = 13;
- public static final byte LITERAL2 = 14;
- public static final byte LITERAL3 = 15;
- public static final byte LITERAL4 = 16;
- public static final byte MARKUP = 17;
- public static final byte OPERATOR = 18;
- //}}}
-
- public static final byte ID_COUNT = 19;
-
- // Special:
- public static final byte END = 127;
-
- //{{{ Instance variables
- /**
- * The id of this token.
- */
- public byte id;
-
- /**
- * The start offset of this token.
- */
- public int offset;
-
- /**
- * The length of this token.
- */
- public int length;
-
- /**
- * The rule set of this token.
- */
- public ParserRuleSet rules;
-
- /**
- * The next token in the linked list.
- */
- public Token next;
- //}}}
-
- //{{{ Token constructor
- /**
- * Creates a new token.
- * @param id The id of the token
- * @param offset The start offset of the token
- * @param length The length of the token
- * @param rules The parser rule set that generated this token
- */
- public Token(byte id, int offset, int length, ParserRuleSet rules)
- {
- this.id = id;
- this.offset = offset;
- this.length = length;
- this.rules = rules;
- } //}}}
-
- //{{{ toString() method
- /**
- * Returns a string representation of this token.
- */
- public String toString()
- {
- return "[id=" + id + ",offset=" + offset + ",length=" + length + "]";
- } //}}}
-}
+/*
+ * Token.java - Syntax token
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.syntax;
+
+import java.lang.reflect.Field;
+
+/**
+ * A linked list of syntax tokens.
+ *
+ * @author Slava Pestov
+ * @version $Id: Token.java 15712 2009-07-19 19:40:40Z shlomy $
+ */
+public class Token
+{
+ //{{{ stringToToken() method
+ /**
+ * Converts a token type string to a token type constant.
+ * @param value The token type
+ * @since jEdit 4.1pre1
+ */
+ public static byte stringToToken(String value)
+ {
+ try
+ {
+ Field f = Token.class.getField(value);
+ return f.getByte(null);
+ }
+ catch(Exception e)
+ {
+ return -1;
+ }
+ } //}}}
+
+ //{{{ tokenToString() method
+ /**
+ * Converts a token type constant to a token type string.
+ * @since jEdit 4.2pre1
+ */
+ public static String tokenToString(byte token)
+ {
+ return (token == Token.END) ? "END" : TOKEN_TYPES[token];
+ } //}}}
+
+ //{{{ Token types
+ public static final String[] TOKEN_TYPES = new String[] {
+ "NULL",
+ "COMMENT1",
+ "COMMENT2",
+ "COMMENT3",
+ "COMMENT4",
+ "DIGIT",
+ "FUNCTION",
+ "INVALID",
+ "KEYWORD1",
+ "KEYWORD2",
+ "KEYWORD3",
+ "KEYWORD4",
+ "LABEL",
+ "LITERAL1",
+ "LITERAL2",
+ "LITERAL3",
+ "LITERAL4",
+ "MARKUP",
+ "OPERATOR"
+ };
+
+ public static final byte NULL = 0;
+
+ public static final byte COMMENT1 = 1;
+ public static final byte COMMENT2 = 2;
+ public static final byte COMMENT3 = 3;
+ public static final byte COMMENT4 = 4;
+ public static final byte DIGIT = 5;
+ public static final byte FUNCTION = 6;
+ public static final byte INVALID = 7;
+ public static final byte KEYWORD1 = 8;
+ public static final byte KEYWORD2 = 9;
+ public static final byte KEYWORD3 = 10;
+ public static final byte KEYWORD4 = 11;
+ public static final byte LABEL = 12;
+ public static final byte LITERAL1 = 13;
+ public static final byte LITERAL2 = 14;
+ public static final byte LITERAL3 = 15;
+ public static final byte LITERAL4 = 16;
+ public static final byte MARKUP = 17;
+ public static final byte OPERATOR = 18;
+ //}}}
+
+ public static final byte ID_COUNT = 19;
+
+ // Special:
+ public static final byte END = 127;
+
+ //{{{ Instance variables
+ /**
+ * The id of this token.
+ */
+ public byte id;
+
+ /**
+ * The start offset of this token.
+ */
+ public int offset;
+
+ /**
+ * The length of this token.
+ */
+ public int length;
+
+ /**
+ * The rule set of this token.
+ */
+ public ParserRuleSet rules;
+
+ /**
+ * The next token in the linked list.
+ */
+ public Token next;
+ //}}}
+
+ //{{{ Token constructor
+ /**
+ * Creates a new token.
+ * @param id The id of the token
+ * @param offset The start offset of the token
+ * @param length The length of the token
+ * @param rules The parser rule set that generated this token
+ */
+ public Token(byte id, int offset, int length, ParserRuleSet rules)
+ {
+ this.id = id;
+ this.offset = offset;
+ this.length = length;
+ this.rules = rules;
+ } //}}}
+
+ //{{{ toString() method
+ /**
+ * Returns a string representation of this token.
+ */
+ public String toString()
+ {
+ return "[id=" + id + ",offset=" + offset + ",length=" + length + "]";
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/TokenHandler.java b/jEdit/org/gjt/sp/jedit/syntax/TokenHandler.java
index 21fab43..3ddc1dd 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/TokenHandler.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/TokenHandler.java
@@ -1,58 +1,58 @@
-/*
- * TokenHandler.java - Token markers send tokens to implementations of
- * this class
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.syntax;
-
-import javax.swing.text.Segment;
-
-/**
- * Token markers send tokens to implementations of this interface.
- *
- * @author Slava Pestov
- * @version $Id: TokenHandler.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.1pre1
- */
-public interface TokenHandler
-{
- /**
- * Called by the token marker when a syntax token has been parsed.
- * @param seg The segment containing the text
- * @param id The token type (one of the constants in the
- * {@link Token} class).
- * @param offset The start offset of the token
- * @param length The number of characters in the token
- * @param context The line context
- * @since jEdit 4.2pre3
- */
- public void handleToken(Segment seg, byte id, int offset, int length,
- TokenMarker.LineContext context);
-
- /**
- * The token handler can compare this object with the object
- * previously given for this line to see if the token type at the end
- * of the line has changed (meaning subsequent lines might need to be
- * retokenized).
- * @since jEdit 4.2pre6
- */
- public void setLineContext(TokenMarker.LineContext lineContext);
-}
+/*
+ * TokenHandler.java - Token markers send tokens to implementations of
+ * this class
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.syntax;
+
+import javax.swing.text.Segment;
+
+/**
+ * Token markers send tokens to implementations of this interface.
+ *
+ * @author Slava Pestov
+ * @version $Id: TokenHandler.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.1pre1
+ */
+public interface TokenHandler
+{
+ /**
+ * Called by the token marker when a syntax token has been parsed.
+ * @param seg The segment containing the text
+ * @param id The token type (one of the constants in the
+ * {@link Token} class).
+ * @param offset The start offset of the token
+ * @param length The number of characters in the token
+ * @param context The line context
+ * @since jEdit 4.2pre3
+ */
+ public void handleToken(Segment seg, byte id, int offset, int length,
+ TokenMarker.LineContext context);
+
+ /**
+ * The token handler can compare this object with the object
+ * previously given for this line to see if the token type at the end
+ * of the line has changed (meaning subsequent lines might need to be
+ * retokenized).
+ * @since jEdit 4.2pre6
+ */
+ public void setLineContext(TokenMarker.LineContext lineContext);
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/TokenMarker.java b/jEdit/org/gjt/sp/jedit/syntax/TokenMarker.java
index 6847bda..8dee8d3 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/TokenMarker.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/TokenMarker.java
@@ -1,937 +1,972 @@
-/*
- * TokenMarker.java - Tokenizes lines of text
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1998, 2003 Slava Pestov
- * Copyright (C) 1999, 2000 mike dillon
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.syntax;
-
-//{{{ Imports
-import javax.swing.text.Segment;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.gjt.sp.jedit.TextUtilities;
-import org.gjt.sp.util.SegmentCharSequence;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * A token marker splits lines of text into tokens. Each token carries
- * a length field and an identification tag that can be mapped to a color
- * or font style for painting that token.
- *
- * @author Slava Pestov, mike dillon
- * @version $Id: TokenMarker.java 16344 2009-10-14 10:31:01Z kpouer $
- *
- * @see org.gjt.sp.jedit.syntax.Token
- * @see org.gjt.sp.jedit.syntax.TokenHandler
- */
-public class TokenMarker
-{
- //{{{ TokenMarker constructor
- public TokenMarker()
- {} //}}}
-
- //{{{ addRuleSet() method
- public void addRuleSet(ParserRuleSet rules)
- {
- ruleSets.put(rules.getSetName(), rules);
-
- if (rules.getSetName().equals("MAIN"))
- mainRuleSet = rules;
- } //}}}
-
- //{{{ getMainRuleSet() method
- public ParserRuleSet getMainRuleSet()
- {
- return mainRuleSet;
- } //}}}
-
- //{{{ getRuleSet() method
- public ParserRuleSet getRuleSet(String setName)
- {
- return ruleSets.get(setName);
- } //}}}
-
- //{{{ getRuleSets() method
- /**
- * @since jEdit 4.2pre3
- */
- public ParserRuleSet[] getRuleSets()
- {
- return ruleSets.values().toArray(new ParserRuleSet[ruleSets.size()]);
- } //}}}
-
- //{{{ markTokens() method
- /**
- * Do not call this method directly; call Buffer.markTokens() instead.
- *
- * @param prevContext the context of the previous line, it can be null
- * @param tokenHandler the token handler
- * @param line a segment containing the content of the line
- */
- public synchronized LineContext markTokens(LineContext prevContext,
- TokenHandler tokenHandler, Segment line)
- {
- //{{{ Set up some instance variables
- // this is to avoid having to pass around lots and lots of
- // parameters.
- this.tokenHandler = tokenHandler;
- this.line = line;
-
- lastOffset = line.offset;
- lineLength = line.count + line.offset;
-
- context = new LineContext();
-
- if(prevContext == null)
- {
- context.rules = getMainRuleSet();
- context.escapeRule = context.rules.getEscapeRule();
- }
- else
- {
- context.parent = prevContext.parent;
- context.setInRule(prevContext.inRule);
- context.rules = prevContext.rules;
- context.spanEndSubst = prevContext.spanEndSubst;
- }
-
- keywords = context.rules.getKeywords();
-
- seenWhitespaceEnd = false;
- whitespaceEnd = line.offset;
- //}}}
-
- //{{{ Main parser loop
- int terminateChar = context.rules.getTerminateChar();
- boolean terminated = false;
-main_loop: for(pos = line.offset; pos < lineLength; pos++)
- {
- //{{{ check if we have to stop parsing (happens if the terminateChar has been exceeded)
- if(terminateChar >= 0 && pos - line.offset >= terminateChar
- && !terminated)
- {
- terminated = true;
- context = new LineContext(ParserRuleSet
- .getStandardRuleSet(context.rules
- .getDefault()),context);
- keywords = context.rules.getKeywords();
- } //}}}
-
- //{{{ Check for the escape rule before anything else.
- if (context.escapeRule != null &&
- handleRule(context.escapeRule,false))
- {
- continue main_loop;
- } //}}}
-
- //{{{ check for end of delegate
- if (context.parent != null
- && context.parent.inRule != null
- && checkDelegateEnd(context.parent.inRule))
- {
- seenWhitespaceEnd = true;
- continue main_loop;
- } //}}}
-
- //{{{ check every rule
- Character ch = Character.valueOf(line.array[pos]);
- List<ParserRule> rules = context.rules.getRules(ch);
- for (ParserRule rule : rules)
- {
- // stop checking rules if there was a match
- if (handleRule(rule,false))
- {
- seenWhitespaceEnd = true;
- continue main_loop;
- }
- } //}}}
-
- //{{{ check if current character is a word separator
- if(Character.isWhitespace(ch))
- {
- if(!seenWhitespaceEnd)
- whitespaceEnd = pos + 1;
-
- if(context.inRule != null)
- handleRule(context.inRule,true);
-
- handleNoWordBreak();
-
- markKeyword(false);
-
- if(lastOffset != pos)
- {
- tokenHandler.handleToken(line,
- context.rules.getDefault(),
- lastOffset - line.offset,
- pos - lastOffset,
- context);
- }
-
- tokenHandler.handleToken(line,
- context.rules.getDefault(),
- pos - line.offset,1,context);
- lastOffset = pos + 1;
- }
- else
- {
- if(keywords != null || context.rules.getRuleCount() != 0)
- {
- String noWordSep = context.rules.getNoWordSep();
-
- if(!Character.isLetterOrDigit(ch)
- && noWordSep.indexOf(ch) == -1)
- {
- if(context.inRule != null)
- handleRule(context.inRule,true);
-
- handleNoWordBreak();
-
- markKeyword(true);
-
- tokenHandler.handleToken(line,
- context.rules.getDefault(),
- lastOffset - line.offset,1,
- context);
- lastOffset = pos + 1;
- }
- }
-
- seenWhitespaceEnd = true;
- } //}}}
- } //}}}
-
- //{{{ Mark all remaining characters
- pos = lineLength;
-
- if(context.inRule != null)
- handleRule(context.inRule,true);
-
- handleNoWordBreak();
- markKeyword(true);
- //}}}
-
- //{{{ Unwind any NO_LINE_BREAK parent delegates
-unwind: while(context.parent != null)
- {
- ParserRule rule = context.parent.inRule;
- if((rule != null && (rule.action
- & ParserRule.NO_LINE_BREAK) == ParserRule.NO_LINE_BREAK)
- || terminated)
- {
- context = context.parent;
- keywords = context.rules.getKeywords();
- context.setInRule(null);
- }
- else
- break unwind;
- } //}}}
-
- tokenHandler.handleToken(line,Token.END,
- pos - line.offset,0,context);
-
- context = context.intern();
- tokenHandler.setLineContext(context);
-
- /* for GC. */
- this.tokenHandler = null;
- this.line = null;
-
- return context;
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private final Map<String, ParserRuleSet> ruleSets = new Hashtable<String, ParserRuleSet>(64);
- private ParserRuleSet mainRuleSet;
-
- // Instead of passing these around to each method, we just store them
- // as instance variables. Note that this is not thread-safe.
- private TokenHandler tokenHandler;
- /** The line from which we will mark the tokens. */
- private Segment line;
- /** The context of the current line. */
- private LineContext context;
- private KeywordMap keywords;
- private final Segment pattern = new Segment();
- private int lastOffset;
- private int lineLength;
- private int pos;
-
- private int whitespaceEnd;
- private boolean seenWhitespaceEnd;
- //}}}
-
- //{{{ checkDelegateEnd() method
- private boolean checkDelegateEnd(ParserRule rule)
- {
- if(rule.end == null)
- return false;
-
- LineContext tempContext = context;
- context = context.parent;
- keywords = context.rules.getKeywords();
- boolean handled = handleRule(rule,true);
- context = tempContext;
- keywords = context.rules.getKeywords();
-
- if (handled)
- {
- if(context.inRule != null)
- handleRule(context.inRule,true);
-
- markKeyword(true);
-
- context = (LineContext)context.parent.clone();
-
- tokenHandler.handleToken(line,
- matchToken(context.inRule, context.inRule, context),
- pos - line.offset,pattern.count,context);
-
- keywords = context.rules.getKeywords();
- context.setInRule(null);
- lastOffset = pos + pattern.count;
-
- // move pos to last character of match sequence
- pos += pattern.count - 1;
-
- return true;
- }
-
- return false;
- } //}}}
-
- //{{{ handleRule() method
- /**
- * Checks if the rule matches the line at the current position
- * and handles the rule if it does match
- */
- private boolean handleRule(ParserRule checkRule, boolean end)
- {
- //{{{ Some rules can only match in certain locations
- if(!end)
- {
- if (null == checkRule.upHashChars)
- {
- if (checkRule.upHashChar != null &&
- (pos + checkRule.upHashChar.length() < line.array.length) &&
- !checkHashString(checkRule))
- {
- return false;
- }
- }
- else
- {
- if (-1 == Arrays.binarySearch(
- checkRule.upHashChars,
- Character.toUpperCase(line.array[pos])))
- {
- return false;
- }
- }
- }
-
- int offset = (checkRule.action & ParserRule.MARK_PREVIOUS) != 0 ? lastOffset : pos;
- int posMatch = end ? checkRule.endPosMatch : checkRule.startPosMatch;
-
- if((posMatch & ParserRule.AT_LINE_START)
- == ParserRule.AT_LINE_START)
- {
- if(offset != line.offset)
- {
- return false;
- }
- }
- else if((posMatch & ParserRule.AT_WHITESPACE_END)
- == ParserRule.AT_WHITESPACE_END)
- {
- if(offset != whitespaceEnd)
- {
- return false;
- }
- }
- else if((posMatch & ParserRule.AT_WORD_START)
- == ParserRule.AT_WORD_START)
- {
- if(offset != lastOffset)
- {
- return false;
- }
- } //}}}
-
- int matchedChars = 1;
- CharSequence charSeq = null;
- Matcher match = null;
-
- //{{{ See if the rule's start or end sequence matches here
- if(!end || (checkRule.action & ParserRule.MARK_FOLLOWING) == 0)
- {
- // the end cannot be a regular expression
- if((checkRule.action & ParserRule.REGEXP) == 0 || end)
- {
- if(end)
- {
- if(context.spanEndSubst != null)
- pattern.array = context.spanEndSubst;
- else
- pattern.array = checkRule.end;
- }
- else
- pattern.array = checkRule.start;
- pattern.offset = 0;
- pattern.count = pattern.array.length;
- matchedChars = pattern.count;
-
- if(!SyntaxUtilities.regionMatches(context.rules
- .getIgnoreCase(),line,pos,pattern.array))
- {
- return false;
- }
- }
- else
- {
- // note that all regexps start with \A so they only
- // match the start of the string
- //int matchStart = pos - line.offset;
- charSeq = new SegmentCharSequence(line, pos - line.offset,
- line.count - (pos - line.offset));
- match = checkRule.startRegexp.matcher(charSeq);
- if(!match.lookingAt())
- {
- return false;
- }
- else if(match.start() != 0)
- {
- throw new InternalError("Can't happen");
- }
- else
- {
- matchedChars = match.end();
- /* workaround for hang if match was
- * zero-width. not sure if there is
- * a better way to handle this */
- if(matchedChars == 0)
- matchedChars = 1;
- }
- }
- } //}}}
- //{{{ Check for an escape sequence
- if((checkRule.action & ParserRule.IS_ESCAPE) == ParserRule.IS_ESCAPE)
- {
- pos += pattern.count;
- } //}}}
- //{{{ Handle start of rule
- else if(!end)
- {
- if(context.inRule != null)
- handleRule(context.inRule,true);
-
- markKeyword((checkRule.action & ParserRule.MARK_PREVIOUS)
- != ParserRule.MARK_PREVIOUS);
-
- switch(checkRule.action & ParserRule.MAJOR_ACTIONS)
- {
- //{{{ SEQ
- case ParserRule.SEQ:
- context.spanEndSubst = null;
-
- if((checkRule.action & ParserRule.REGEXP) != 0)
- {
- handleTokenWithSpaces(tokenHandler,
- checkRule.token,
- pos - line.offset,
- matchedChars,
- context);
- }
- else
- {
- tokenHandler.handleToken(line,
- checkRule.token,
- pos - line.offset,
- matchedChars,context);
- }
-
- // a DELEGATE attribute on a SEQ changes the
- // ruleset from the end of the SEQ onwards
- if(checkRule.delegate != null)
- {
- context = new LineContext(
- checkRule.delegate,
- context.parent);
- keywords = context.rules.getKeywords();
- }
- break;
- //}}}
- //{{{ SPAN, EOL_SPAN
- case ParserRule.SPAN:
- case ParserRule.EOL_SPAN:
- context.setInRule(checkRule);
-
- byte tokenType = matchToken(checkRule,
- context.inRule, context);
-
- if((checkRule.action & ParserRule.REGEXP) != 0)
- {
- handleTokenWithSpaces(tokenHandler,
- tokenType,
- pos - line.offset,
- matchedChars,
- context);
- }
- else
- {
- tokenHandler.handleToken(line,tokenType,
- pos - line.offset,
- matchedChars,context);
- }
-
- char[] spanEndSubst = null;
- /* substitute result of matching the rule start
- * into the end string.
- *
- * eg, in shell script mode, <<\s*(\w+) is
- * matched into \<$1\> to construct rules for
- * highlighting read-ins like this <<EOF
- * ...
- * EOF
- */
- if(charSeq != null && checkRule.end != null)
- {
- spanEndSubst = substitute(match,
- checkRule.end);
- }
-
- context.spanEndSubst = spanEndSubst;
- context = new LineContext(
- checkRule.delegate,
- context);
- keywords = context.rules.getKeywords();
-
- break;
- //}}}
- //{{{ MARK_FOLLOWING
- case ParserRule.MARK_FOLLOWING:
- tokenHandler.handleToken(line,
- matchToken(checkRule, checkRule, context),
- pos - line.offset,
- pattern.count,context);
-
- context.spanEndSubst = null;
- context.setInRule(checkRule);
- break;
- //}}}
- //{{{ MARK_PREVIOUS
- case ParserRule.MARK_PREVIOUS:
- context.spanEndSubst = null;
-
- if(pos != lastOffset)
- {
- tokenHandler.handleToken(line,
- checkRule.token,
- lastOffset - line.offset,
- pos - lastOffset,
- context);
- }
-
- tokenHandler.handleToken(line,
- matchToken(checkRule, checkRule, context),
- pos - line.offset,pattern.count,
- context);
-
- break;
- //}}}
- default:
- throw new InternalError("Unhandled major action");
- }
-
- // move pos to last character of match sequence
- pos += matchedChars - 1;
- lastOffset = pos + 1;
-
- // break out of inner for loop to check next char
- } //}}}
- //{{{ Handle end of MARK_FOLLOWING
- else if((context.inRule.action & ParserRule.MARK_FOLLOWING) != 0)
- {
- if(pos != lastOffset)
- {
- tokenHandler.handleToken(line,
- context.inRule.token,
- lastOffset - line.offset,
- pos - lastOffset,context);
- }
-
- lastOffset = pos;
- context.setInRule(null);
- } //}}}
-
- return true;
- } //}}}
-
- //{{{ handleNoWordBreak() method
- private void handleNoWordBreak()
- {
- if(context.parent != null)
- {
- ParserRule rule = context.parent.inRule;
- if(rule != null && (context.parent.inRule.action
- & ParserRule.NO_WORD_BREAK) != 0)
- {
- if(pos != lastOffset)
- {
- tokenHandler.handleToken(line,
- rule.token,
- lastOffset - line.offset,
- pos - lastOffset,context);
- }
-
- lastOffset = pos;
- context = context.parent;
- keywords = context.rules.getKeywords();
- context.setInRule(null);
- }
- }
- } //}}}
-
- //{{{ handleTokenWithSpaces() method
- private void handleTokenWithSpaces(TokenHandler tokenHandler,
- byte tokenType, int start, int len, LineContext context)
- {
- int last = start;
- int end = start + len;
-
- for(int i = start; i < end; i++)
- {
- if(Character.isWhitespace(line.array[i + line.offset]))
- {
- if(last != i)
- {
- tokenHandler.handleToken(line,
- tokenType,last,i - last,context);
- }
- tokenHandler.handleToken(line,tokenType,i,1,context);
- last = i + 1;
- }
- }
-
- if(last != end)
- {
- tokenHandler.handleToken(line,tokenType,last,
- end - last,context);
- }
- } //}}}
-
- //{{{ markKeyword() method
- private void markKeyword(boolean addRemaining)
- {
- int len = pos - lastOffset;
- if(len == 0)
- return;
-
- //{{{ Do digits
- if(context.rules.getHighlightDigits())
- {
- boolean digit = false;
- boolean mixed = false;
-
- for(int i = lastOffset; i < pos; i++)
- {
- char ch = line.array[i];
- if(Character.isDigit(ch))
- digit = true;
- else
- mixed = true;
- }
-
- if(mixed)
- {
- Pattern digitRE = context.rules.getDigitRegexp();
-
- // only match against regexp if its not all
- // digits; if all digits, no point matching
- if(digit)
- {
- if(digitRE == null)
- {
- // mixed digit/alpha keyword,
- // and no regexp... don't
- // highlight as DIGIT
- digit = false;
- }
- else
- {
- int oldCount = line.count;
- int oldOffset = line.offset;
- line.offset = lastOffset;
- line.count = len;
- CharSequence seq = new SegmentCharSequence(line);
- digit = digitRE.matcher(seq).matches();
- line.offset = oldOffset;
- line.count = oldCount;
- }
- }
- }
-
- if(digit)
- {
- tokenHandler.handleToken(line,Token.DIGIT,
- lastOffset - line.offset,
- len,context);
- lastOffset = pos;
-
- return;
- }
- } //}}}
-
- //{{{ Do keywords
- if(keywords != null)
- {
- byte id = keywords.lookup(line, lastOffset, len);
-
- if(id != Token.NULL)
- {
- tokenHandler.handleToken(line,id,
- lastOffset - line.offset,
- len,context);
- lastOffset = pos;
- return;
- }
- } //}}}
-
- //{{{ Handle any remaining crud
- if(addRemaining)
- {
- tokenHandler.handleToken(line,context.rules.getDefault(),
- lastOffset - line.offset,len,context);
- lastOffset = pos;
- } //}}}
- } //}}}
-
- //{{{ substitute() method
- private static char[] substitute(Matcher match, char[] end)
- {
- StringBuilder buf = new StringBuilder();
- for(int i = 0; i < end.length; i++)
- {
- char ch = end[i];
- if(ch == '$' || ch == '~')
- {
- if(i == end.length - 1)
- buf.append(ch);
- else
- {
- char digit = end[i + 1];
- if(!Character.isDigit(digit))
- buf.append(ch);
- else if (ch == '$')
- {
- buf.append(match.group(
- digit - '0'));
- i++;
- }
- else
- {
- String s = match.group(digit - '0');
- if (s.length() == 1)
- {
- char b = TextUtilities.getComplementaryBracket(s.charAt(0), null);
- if (b == '\0')
- b = s.charAt(0);
- buf.append(b);
- }
- else
- buf.append(ch);
- i++;
- }
- }
- }
- else
- buf.append(ch);
- }
-
- char[] returnValue = new char[buf.length()];
- buf.getChars(0,buf.length(),returnValue,0);
- return returnValue;
- } //}}}
-
- //{{{ matchToken() method
- private byte matchToken(ParserRule rule, ParserRule base, LineContext ctx)
- {
- switch (rule.matchType)
- {
- case ParserRule.MATCH_TYPE_RULE:
- return base.token;
-
- case ParserRule.MATCH_TYPE_CONTEXT:
- return context.rules.getDefault();
-
- default:
- return rule.matchType;
- }
- } //}}}
-
- //{{{ checkHashString() method
- private boolean checkHashString(ParserRule rule)
- {
- for (int i = 0; i < rule.upHashChar.length(); i++)
- {
- if (Character.toUpperCase(line.array[pos+i]) != rule.upHashChar.charAt(i))
- {
- return false;
- }
- }
- return true;
- } //}}}
-
- //}}}
-
- //{{{ LineContext class
- /**
- * Stores persistent per-line syntax parser state.
- */
- public static class LineContext
- {
- private static final Map<LineContext, LineContext> intern = new HashMap<LineContext, LineContext>();
-
- public LineContext parent;
- public ParserRule inRule;
- public ParserRuleSet rules;
- // used for SPAN_REGEXP rules; otherwise null
- public char[] spanEndSubst;
- public ParserRule escapeRule;
-
- //{{{ LineContext constructor
- public LineContext(ParserRuleSet rs, LineContext lc)
- {
- rules = rs;
- parent = (lc == null ? null : (LineContext)lc.clone());
- /*
- * SPANs with no delegate need to propagate the
- * escape rule to the child context, so this is
- * needed.
- */
- if (rs.getModeName() != null)
- escapeRule = rules.getEscapeRule();
- else
- escapeRule = lc.escapeRule;
- } //}}}
-
- //{{{ LineContext constructor
- public LineContext()
- {
- } //}}}
-
- //{{{ intern() method
- public LineContext intern()
- {
- LineContext obj = intern.get(this);
- if(obj == null)
- {
- intern.put(this,this);
- return this;
- }
- else
- return obj;
- } //}}}
-
- //{{{ hashCode() method
- public int hashCode()
- {
- if(inRule != null)
- return inRule.hashCode();
- else if(rules != null)
- return rules.hashCode();
- else
- return 0;
- } //}}}
-
- //{{{ equals() method
- public boolean equals(Object obj)
- {
- if(obj instanceof LineContext)
- {
- LineContext lc = (LineContext)obj;
- return lc.inRule == inRule && lc.rules == rules
- && StandardUtilities.objectsEqual(parent,lc.parent)
- && charArraysEqual(spanEndSubst,lc.spanEndSubst);
- }
- else
- return false;
- } //}}}
-
- //{{{ clone() method
- public Object clone()
- {
- LineContext lc = new LineContext();
- lc.inRule = inRule;
- lc.rules = rules;
- lc.parent = (parent == null) ? null : (LineContext) parent.clone();
- lc.spanEndSubst = spanEndSubst;
- lc.escapeRule = escapeRule;
-
- return lc;
- } //}}}
-
- //{{{ charArraysEqual() method
- private static boolean charArraysEqual(char[] c1, char[] c2)
- {
- if(c1 == null)
- return c2 == null;
-
- // c1 is not null
- if(c2 == null)
- return false;
-
- if(c1.length != c2.length)
- return false;
-
- for(int i = 0; i < c1.length; i++)
- {
- if(c1[i] != c2[i])
- return false;
- }
-
- return true;
- } //}}}
-
- //{{{ setInRule() method
- /**
- * Sets the current rule being processed and adjusts the
- * escape rule for the context based on the rule.
- */
- public void setInRule(ParserRule rule)
- {
- inRule = rule;
- if (rule != null && rule.escapeRule != null)
- escapeRule = rule.escapeRule;
- else if (rules != null && rules.getModeName() != null)
- escapeRule = rules.getEscapeRule();
- else if (parent != null)
- escapeRule = parent.escapeRule;
- else
- escapeRule = null;
- } //}}}
-
- } //}}}
-}
+/*
+ * TokenMarker.java - Tokenizes lines of text
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1998, 2003 Slava Pestov
+ * Copyright (C) 1999, 2000 mike dillon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.syntax;
+
+//{{{ Imports
+import javax.swing.text.Segment;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.gjt.sp.jedit.TextUtilities;
+import org.gjt.sp.util.SegmentCharSequence;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * A token marker splits lines of text into tokens. Each token carries
+ * a length field and an identification tag that can be mapped to a color
+ * or font style for painting that token.
+ *
+ * @author Slava Pestov, mike dillon
+ * @version $Id: TokenMarker.java 17774 2010-05-09 01:25:55Z k_satoda $
+ *
+ * @see org.gjt.sp.jedit.syntax.Token
+ * @see org.gjt.sp.jedit.syntax.TokenHandler
+ */
+public class TokenMarker
+{
+ //{{{ TokenMarker constructor
+ public TokenMarker()
+ {} //}}}
+
+ //{{{ addRuleSet() method
+ public void addRuleSet(ParserRuleSet rules)
+ {
+ ruleSets.put(rules.getSetName(), rules);
+
+ if (rules.getSetName().equals("MAIN"))
+ mainRuleSet = rules;
+ } //}}}
+
+ //{{{ getMainRuleSet() method
+ public ParserRuleSet getMainRuleSet()
+ {
+ return mainRuleSet;
+ } //}}}
+
+ //{{{ getRuleSet() method
+ public ParserRuleSet getRuleSet(String setName)
+ {
+ return ruleSets.get(setName);
+ } //}}}
+
+ //{{{ getRuleSets() method
+ /**
+ * @since jEdit 4.2pre3
+ */
+ public ParserRuleSet[] getRuleSets()
+ {
+ return ruleSets.values().toArray(new ParserRuleSet[ruleSets.size()]);
+ } //}}}
+
+ //{{{ markTokens() method
+ /**
+ * Do not call this method directly; call Buffer.markTokens() instead.
+ *
+ * @param prevContext the context of the previous line, it can be null
+ * @param tokenHandler the token handler
+ * @param line a segment containing the content of the line
+ */
+ public synchronized LineContext markTokens(LineContext prevContext,
+ TokenHandler tokenHandler, Segment line)
+ {
+ //{{{ Set up some instance variables
+ // this is to avoid having to pass around lots and lots of
+ // parameters.
+ this.tokenHandler = tokenHandler;
+ this.line = line;
+
+ lastOffset = line.offset;
+ lineLength = line.count + line.offset;
+
+ context = new LineContext();
+
+ if(prevContext == null)
+ {
+ context.rules = getMainRuleSet();
+ context.escapeRule = context.rules.getEscapeRule();
+ }
+ else
+ {
+ context.parent = prevContext.parent;
+ context.setInRule(prevContext.inRule);
+ context.rules = prevContext.rules;
+ context.spanEndSubst = prevContext.spanEndSubst;
+ }
+
+ keywords = context.rules.getKeywords();
+
+ seenWhitespaceEnd = false;
+ whitespaceEnd = line.offset;
+ //}}}
+
+ //{{{ Main parser loop
+ int terminateChar = context.rules.getTerminateChar();
+ boolean terminated = false;
+main_loop: for(pos = line.offset; pos < lineLength; pos++)
+ {
+ //{{{ check if we have to stop parsing (happens if the terminateChar has been exceeded)
+ if(terminateChar >= 0 && pos - line.offset >= terminateChar
+ && !terminated)
+ {
+ terminated = true;
+ context = new LineContext(ParserRuleSet
+ .getStandardRuleSet(context.rules
+ .getDefault()),context);
+ keywords = context.rules.getKeywords();
+ } //}}}
+
+ //{{{ Check for the escape rule before anything else.
+ if (context.escapeRule != null &&
+ handleRuleStart(context.escapeRule))
+ {
+ continue main_loop;
+ } //}}}
+
+ //{{{ check for end of delegate
+ if (context.parent != null
+ && context.parent.inRule != null
+ && checkDelegateEnd(context.parent.inRule))
+ {
+ seenWhitespaceEnd = true;
+ continue main_loop;
+ } //}}}
+
+ //{{{ check every rule
+ Character ch = Character.valueOf(line.array[pos]);
+ List<ParserRule> rules = context.rules.getRules(ch);
+ for (ParserRule rule : rules)
+ {
+ // stop checking rules if there was a match
+ if (handleRuleStart(rule))
+ {
+ seenWhitespaceEnd = true;
+ continue main_loop;
+ }
+ } //}}}
+
+ //{{{ check if current character is a word separator
+ if(Character.isWhitespace(ch))
+ {
+ if(!seenWhitespaceEnd)
+ whitespaceEnd = pos + 1;
+
+ if(context.inRule != null)
+ handleRuleEnd(context.inRule);
+
+ handleNoWordBreak();
+
+ markKeyword(false);
+
+ if(lastOffset != pos)
+ {
+ tokenHandler.handleToken(line,
+ context.rules.getDefault(),
+ lastOffset - line.offset,
+ pos - lastOffset,
+ context);
+ }
+
+ tokenHandler.handleToken(line,
+ context.rules.getDefault(),
+ pos - line.offset,1,context);
+ lastOffset = pos + 1;
+ }
+ else
+ {
+ if(keywords != null || context.rules.getRuleCount() != 0)
+ {
+ String noWordSep = context.rules.getNoWordSep();
+
+ if(!Character.isLetterOrDigit(ch)
+ && noWordSep.indexOf(ch) == -1)
+ {
+ if(context.inRule != null)
+ handleRuleEnd(context.inRule);
+
+ handleNoWordBreak();
+
+ markKeyword(true);
+
+ tokenHandler.handleToken(line,
+ context.rules.getDefault(),
+ lastOffset - line.offset,1,
+ context);
+ lastOffset = pos + 1;
+ }
+ }
+
+ seenWhitespaceEnd = true;
+ } //}}}
+ } //}}}
+
+ //{{{ Mark all remaining characters
+ pos = lineLength;
+
+ if(context.inRule != null)
+ handleRuleEnd(context.inRule);
+
+ handleNoWordBreak();
+ markKeyword(true);
+ //}}}
+
+ //{{{ Unwind any NO_LINE_BREAK parent delegates
+unwind: while(context.parent != null)
+ {
+ ParserRule rule = context.parent.inRule;
+ if((rule != null && (rule.action
+ & ParserRule.NO_LINE_BREAK) == ParserRule.NO_LINE_BREAK)
+ || terminated)
+ {
+ context = context.parent;
+ keywords = context.rules.getKeywords();
+ context.setInRule(null);
+ }
+ else
+ break unwind;
+ } //}}}
+
+ tokenHandler.handleToken(line,Token.END,
+ pos - line.offset,0,context);
+
+ context = context.intern();
+ tokenHandler.setLineContext(context);
+
+ /* for GC. */
+ this.tokenHandler = null;
+ this.line = null;
+
+ return context;
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private final Map<String, ParserRuleSet> ruleSets = new Hashtable<String, ParserRuleSet>(64);
+ private ParserRuleSet mainRuleSet;
+
+ // Instead of passing these around to each method, we just store them
+ // as instance variables. Note that this is not thread-safe.
+ private TokenHandler tokenHandler;
+ /** The line from which we will mark the tokens. */
+ private Segment line;
+ /** The context of the current line. */
+ private LineContext context;
+ private KeywordMap keywords;
+ private final Segment pattern = new Segment();
+ private int lastOffset;
+ private int lineLength;
+ private int pos;
+
+ private int whitespaceEnd;
+ private boolean seenWhitespaceEnd;
+ //}}}
+
+ //{{{ checkDelegateEnd() method
+ private boolean checkDelegateEnd(ParserRule rule)
+ {
+ if(rule.end == null)
+ return false;
+
+ LineContext tempContext = context;
+ context = context.parent;
+ keywords = context.rules.getKeywords();
+ boolean handled = handleRuleEnd(rule);
+ context = tempContext;
+ keywords = context.rules.getKeywords();
+
+ if (handled)
+ {
+ if(context.inRule != null)
+ handleRuleEnd(context.inRule);
+
+ markKeyword(true);
+
+ context = (LineContext)context.parent.clone();
+
+ tokenHandler.handleToken(line,
+ matchToken(context.inRule, context.inRule, context),
+ pos - line.offset,pattern.count,context);
+
+ keywords = context.rules.getKeywords();
+ context.setInRule(null);
+ lastOffset = pos + pattern.count;
+
+ // move pos to last character of match sequence
+ pos += pattern.count - 1;
+
+ return true;
+ }
+
+ return false;
+ } //}}}
+
+ //{{{ offsetMatches
+ /**
+ * Checks if the offset matches given position-match-hint of
+ * ParserRule.
+ */
+ private boolean offsetMatches(int offset, int posMatch)
+ {
+ if((posMatch & ParserRule.AT_LINE_START)
+ == ParserRule.AT_LINE_START)
+ {
+ if(offset != line.offset)
+ {
+ return false;
+ }
+ }
+ else if((posMatch & ParserRule.AT_WHITESPACE_END)
+ == ParserRule.AT_WHITESPACE_END)
+ {
+ if(offset != whitespaceEnd)
+ {
+ return false;
+ }
+ }
+ else if((posMatch & ParserRule.AT_WORD_START)
+ == ParserRule.AT_WORD_START)
+ {
+ if(offset != lastOffset)
+ {
+ return false;
+ }
+ }
+
+ return true;
+ } //}}}
+
+ //{{{ handleRuleStart() method
+ /**
+ * Checks if the rule matches the line at the current position
+ * as its start and handles the rule if it does match
+ */
+ private boolean handleRuleStart(ParserRule checkRule)
+ {
+ // Some rules can only match in certain locations
+ if (null == checkRule.upHashChars)
+ {
+ if (checkRule.upHashChar != null &&
+ (pos + checkRule.upHashChar.length() < line.array.length) &&
+ !checkHashString(checkRule))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if (-1 == Arrays.binarySearch(
+ checkRule.upHashChars,
+ Character.toUpperCase(line.array[pos])))
+ {
+ return false;
+ }
+ }
+
+ int offset = (checkRule.action & ParserRule.MARK_PREVIOUS) != 0 ? lastOffset : pos;
+ if(!offsetMatches(offset, checkRule.startPosMatch))
+ {
+ return false;
+ }
+
+ int matchedChars = 1;
+ CharSequence charSeq = null;
+ Matcher match = null;
+
+ // See if the rule's start sequence matches here
+ if((checkRule.action & ParserRule.REGEXP) == 0)
+ {
+ pattern.array = checkRule.start;
+ pattern.offset = 0;
+ pattern.count = pattern.array.length;
+ matchedChars = pattern.count;
+
+ if(!SyntaxUtilities.regionMatches(context.rules
+ .getIgnoreCase(),line,pos,pattern.array))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ // note that all regexps start with \A so they only
+ // match the start of the string
+ //int matchStart = pos - line.offset;
+ charSeq = new SegmentCharSequence(line, pos - line.offset,
+ line.count - (pos - line.offset));
+ match = checkRule.startRegexp.matcher(charSeq);
+ if(!match.lookingAt())
+ {
+ return false;
+ }
+ else if(match.start() != 0)
+ {
+ throw new InternalError("Can't happen");
+ }
+ else
+ {
+ matchedChars = match.end();
+ /* workaround for hang if match was
+ * zero-width. not sure if there is
+ * a better way to handle this */
+ if(matchedChars == 0)
+ matchedChars = 1;
+ }
+ }
+
+ if((checkRule.action & ParserRule.IS_ESCAPE) == ParserRule.IS_ESCAPE)
+ {
+ pos += pattern.count;
+ }
+ else
+ {
+ if(context.inRule != null)
+ handleRuleEnd(context.inRule);
+
+ markKeyword((checkRule.action & ParserRule.MARK_PREVIOUS)
+ != ParserRule.MARK_PREVIOUS);
+
+ switch(checkRule.action & ParserRule.MAJOR_ACTIONS)
+ {
+ //{{{ SEQ
+ case ParserRule.SEQ:
+ context.spanEndSubst = null;
+
+ if((checkRule.action & ParserRule.REGEXP) != 0)
+ {
+ handleTokenWithSpaces(tokenHandler,
+ checkRule.token,
+ pos - line.offset,
+ matchedChars,
+ context);
+ }
+ else
+ {
+ tokenHandler.handleToken(line,
+ checkRule.token,
+ pos - line.offset,
+ matchedChars,context);
+ }
+
+ // a DELEGATE attribute on a SEQ changes the
+ // ruleset from the end of the SEQ onwards
+ if(checkRule.delegate != null)
+ {
+ context = new LineContext(
+ checkRule.delegate,
+ context.parent);
+ keywords = context.rules.getKeywords();
+ }
+ break;
+ //}}}
+ //{{{ SPAN, EOL_SPAN
+ case ParserRule.SPAN:
+ case ParserRule.EOL_SPAN:
+ context.setInRule(checkRule);
+
+ byte tokenType = matchToken(checkRule,
+ context.inRule, context);
+
+ if((checkRule.action & ParserRule.REGEXP) != 0)
+ {
+ handleTokenWithSpaces(tokenHandler,
+ tokenType,
+ pos - line.offset,
+ matchedChars,
+ context);
+ }
+ else
+ {
+ tokenHandler.handleToken(line,tokenType,
+ pos - line.offset,
+ matchedChars,context);
+ }
+
+ char[] spanEndSubst = null;
+ /* substitute result of matching the rule start
+ * into the end string.
+ *
+ * eg, in shell script mode, <<\s*(\w+) is
+ * matched into \<$1\> to construct rules for
+ * highlighting read-ins like this <<EOF
+ * ...
+ * EOF
+ */
+ if(charSeq != null && checkRule.end != null)
+ {
+ spanEndSubst = substitute(match,
+ checkRule.end);
+ }
+
+ context.spanEndSubst = spanEndSubst;
+ context = new LineContext(
+ checkRule.delegate,
+ context);
+ keywords = context.rules.getKeywords();
+
+ break;
+ //}}}
+ //{{{ MARK_FOLLOWING
+ case ParserRule.MARK_FOLLOWING:
+ tokenHandler.handleToken(line,
+ matchToken(checkRule, checkRule, context),
+ pos - line.offset,
+ pattern.count,context);
+
+ context.spanEndSubst = null;
+ context.setInRule(checkRule);
+ break;
+ //}}}
+ //{{{ MARK_PREVIOUS
+ case ParserRule.MARK_PREVIOUS:
+ context.spanEndSubst = null;
+
+ if(pos != lastOffset)
+ {
+ tokenHandler.handleToken(line,
+ checkRule.token,
+ lastOffset - line.offset,
+ pos - lastOffset,
+ context);
+ }
+
+ tokenHandler.handleToken(line,
+ matchToken(checkRule, checkRule, context),
+ pos - line.offset,pattern.count,
+ context);
+
+ break;
+ //}}}
+ default:
+ throw new InternalError("Unhandled major action");
+ }
+
+ // move pos to last character of match sequence
+ pos += matchedChars - 1;
+ lastOffset = pos + 1;
+
+ // break out of inner for loop to check next char
+ }
+
+ return true;
+ } //}}}
+
+ //{{{ handleRuleEnd() method
+ /**
+ * Checks if the rule matches the line at the current position
+ * as its end and handles the rule if it does match
+ */
+ private boolean handleRuleEnd(ParserRule checkRule)
+ {
+ // Some rules can only match in certain locations
+ int offset = (checkRule.action & ParserRule.MARK_PREVIOUS) != 0 ? lastOffset : pos;
+ if (!offsetMatches(offset, checkRule.endPosMatch))
+ {
+ return false;
+ }
+
+ // See if the rule's end sequence matches here
+ if((checkRule.action & ParserRule.MARK_FOLLOWING) == 0)
+ {
+ if(context.spanEndSubst != null)
+ pattern.array = context.spanEndSubst;
+ else
+ pattern.array = checkRule.end;
+ pattern.offset = 0;
+ pattern.count = pattern.array.length;
+
+ if(!SyntaxUtilities.regionMatches(context.rules
+ .getIgnoreCase(),line,pos,pattern.array))
+ {
+ return false;
+ }
+ }
+
+ // Escape rules are handled in handleRuleStart()
+ assert (checkRule.action & ParserRule.IS_ESCAPE) == 0;
+
+ // Handle end of MARK_FOLLOWING
+ if((context.inRule.action & ParserRule.MARK_FOLLOWING) != 0)
+ {
+ if(pos != lastOffset)
+ {
+ tokenHandler.handleToken(line,
+ context.inRule.token,
+ lastOffset - line.offset,
+ pos - lastOffset,context);
+ }
+
+ lastOffset = pos;
+ context.setInRule(null);
+ }
+
+ return true;
+ } //}}}
+
+ //{{{ handleNoWordBreak() method
+ private void handleNoWordBreak()
+ {
+ if(context.parent != null)
+ {
+ ParserRule rule = context.parent.inRule;
+ if(rule != null && (context.parent.inRule.action
+ & ParserRule.NO_WORD_BREAK) != 0)
+ {
+ if(pos != lastOffset)
+ {
+ tokenHandler.handleToken(line,
+ rule.token,
+ lastOffset - line.offset,
+ pos - lastOffset,context);
+ }
+
+ lastOffset = pos;
+ context = context.parent;
+ keywords = context.rules.getKeywords();
+ context.setInRule(null);
+ }
+ }
+ } //}}}
+
+ //{{{ handleTokenWithSpaces() method
+ private void handleTokenWithSpaces(TokenHandler tokenHandler,
+ byte tokenType, int start, int len, LineContext context)
+ {
+ int last = start;
+ int end = start + len;
+
+ for(int i = start; i < end; i++)
+ {
+ if(Character.isWhitespace(line.array[i + line.offset]))
+ {
+ if(last != i)
+ {
+ tokenHandler.handleToken(line,
+ tokenType,last,i - last,context);
+ }
+ tokenHandler.handleToken(line,tokenType,i,1,context);
+ last = i + 1;
+ }
+ }
+
+ if(last != end)
+ {
+ tokenHandler.handleToken(line,tokenType,last,
+ end - last,context);
+ }
+ } //}}}
+
+ //{{{ markKeyword() method
+ private void markKeyword(boolean addRemaining)
+ {
+ int len = pos - lastOffset;
+ if(len == 0)
+ return;
+
+ //{{{ Do digits
+ if(context.rules.getHighlightDigits())
+ {
+ boolean digit = false;
+ boolean mixed = false;
+
+ for(int i = lastOffset; i < pos; i++)
+ {
+ char ch = line.array[i];
+ if(Character.isDigit(ch))
+ digit = true;
+ else
+ mixed = true;
+ }
+
+ if(mixed)
+ {
+ Pattern digitRE = context.rules.getDigitRegexp();
+
+ // only match against regexp if its not all
+ // digits; if all digits, no point matching
+ if(digit)
+ {
+ if(digitRE == null)
+ {
+ // mixed digit/alpha keyword,
+ // and no regexp... don't
+ // highlight as DIGIT
+ digit = false;
+ }
+ else
+ {
+ int oldCount = line.count;
+ int oldOffset = line.offset;
+ line.offset = lastOffset;
+ line.count = len;
+ CharSequence seq = new SegmentCharSequence(line);
+ digit = digitRE.matcher(seq).matches();
+ line.offset = oldOffset;
+ line.count = oldCount;
+ }
+ }
+ }
+
+ if(digit)
+ {
+ tokenHandler.handleToken(line,Token.DIGIT,
+ lastOffset - line.offset,
+ len,context);
+ lastOffset = pos;
+
+ return;
+ }
+ } //}}}
+
+ //{{{ Do keywords
+ if(keywords != null)
+ {
+ byte id = keywords.lookup(line, lastOffset, len);
+
+ if(id != Token.NULL)
+ {
+ tokenHandler.handleToken(line,id,
+ lastOffset - line.offset,
+ len,context);
+ lastOffset = pos;
+ return;
+ }
+ } //}}}
+
+ //{{{ Handle any remaining crud
+ if(addRemaining)
+ {
+ tokenHandler.handleToken(line,context.rules.getDefault(),
+ lastOffset - line.offset,len,context);
+ lastOffset = pos;
+ } //}}}
+ } //}}}
+
+ //{{{ substitute() method
+ private static char[] substitute(Matcher match, char[] end)
+ {
+ StringBuilder buf = new StringBuilder();
+ for(int i = 0; i < end.length; i++)
+ {
+ char ch = end[i];
+ if(ch == '$' || ch == '~')
+ {
+ if(i == end.length - 1)
+ buf.append(ch);
+ else
+ {
+ char digit = end[i + 1];
+ if(!Character.isDigit(digit))
+ buf.append(ch);
+ else if (ch == '$')
+ {
+ buf.append(match.group(
+ digit - '0'));
+ i++;
+ }
+ else
+ {
+ String s = match.group(digit - '0');
+ if (s.length() == 1)
+ {
+ char b = TextUtilities.getComplementaryBracket(s.charAt(0), null);
+ if (b == '\0')
+ b = s.charAt(0);
+ buf.append(b);
+ }
+ else
+ buf.append(ch);
+ i++;
+ }
+ }
+ }
+ else
+ buf.append(ch);
+ }
+
+ char[] returnValue = new char[buf.length()];
+ buf.getChars(0,buf.length(),returnValue,0);
+ return returnValue;
+ } //}}}
+
+ //{{{ matchToken() method
+ private byte matchToken(ParserRule rule, ParserRule base, LineContext ctx)
+ {
+ switch (rule.matchType)
+ {
+ case ParserRule.MATCH_TYPE_RULE:
+ return base.token;
+
+ case ParserRule.MATCH_TYPE_CONTEXT:
+ return context.rules.getDefault();
+
+ default:
+ return rule.matchType;
+ }
+ } //}}}
+
+ //{{{ checkHashString() method
+ private boolean checkHashString(ParserRule rule)
+ {
+ for (int i = 0; i < rule.upHashChar.length(); i++)
+ {
+ if (Character.toUpperCase(line.array[pos+i]) != rule.upHashChar.charAt(i))
+ {
+ return false;
+ }
+ }
+ return true;
+ } //}}}
+
+ //}}}
+
+ //{{{ LineContext class
+ /**
+ * Stores persistent per-line syntax parser state.
+ */
+ public static class LineContext
+ {
+ private static final Map<LineContext, LineContext> intern = new HashMap<LineContext, LineContext>();
+
+ public LineContext parent;
+ public ParserRule inRule;
+ public ParserRuleSet rules;
+ // used for SPAN_REGEXP rules; otherwise null
+ public char[] spanEndSubst;
+ public ParserRule escapeRule;
+
+ //{{{ LineContext constructor
+ public LineContext(ParserRuleSet rs, LineContext lc)
+ {
+ rules = rs;
+ parent = (lc == null ? null : (LineContext)lc.clone());
+ /*
+ * SPANs with no delegate need to propagate the
+ * escape rule to the child context, so this is
+ * needed.
+ */
+ if (rs.getModeName() != null)
+ escapeRule = rules.getEscapeRule();
+ else
+ escapeRule = lc.escapeRule;
+ } //}}}
+
+ //{{{ LineContext constructor
+ public LineContext()
+ {
+ } //}}}
+
+ //{{{ intern() method
+ public LineContext intern()
+ {
+ LineContext obj = intern.get(this);
+ if(obj == null)
+ {
+ intern.put(this,this);
+ return this;
+ }
+ else
+ return obj;
+ } //}}}
+
+ //{{{ hashCode() method
+ public int hashCode()
+ {
+ if(inRule != null)
+ return inRule.hashCode();
+ else if(rules != null)
+ return rules.hashCode();
+ else
+ return 0;
+ } //}}}
+
+ //{{{ equals() method
+ public boolean equals(Object obj)
+ {
+ if(obj instanceof LineContext)
+ {
+ LineContext lc = (LineContext)obj;
+ return lc.inRule == inRule && lc.rules == rules
+ && StandardUtilities.objectsEqual(parent,lc.parent)
+ && charArraysEqual(spanEndSubst,lc.spanEndSubst);
+ }
+ else
+ return false;
+ } //}}}
+
+ //{{{ clone() method
+ public Object clone()
+ {
+ LineContext lc = new LineContext();
+ lc.inRule = inRule;
+ lc.rules = rules;
+ lc.parent = (parent == null) ? null : (LineContext) parent.clone();
+ lc.spanEndSubst = spanEndSubst;
+ lc.escapeRule = escapeRule;
+
+ return lc;
+ } //}}}
+
+ //{{{ charArraysEqual() method
+ private static boolean charArraysEqual(char[] c1, char[] c2)
+ {
+ if(c1 == null)
+ return c2 == null;
+
+ // c1 is not null
+ if(c2 == null)
+ return false;
+
+ if(c1.length != c2.length)
+ return false;
+
+ for(int i = 0; i < c1.length; i++)
+ {
+ if(c1[i] != c2[i])
+ return false;
+ }
+
+ return true;
+ } //}}}
+
+ //{{{ setInRule() method
+ /**
+ * Sets the current rule being processed and adjusts the
+ * escape rule for the context based on the rule.
+ */
+ public void setInRule(ParserRule rule)
+ {
+ inRule = rule;
+ if (rule != null && rule.escapeRule != null)
+ escapeRule = rule.escapeRule;
+ else if (rules != null && rules.getModeName() != null)
+ escapeRule = rules.getEscapeRule();
+ else if (parent != null)
+ escapeRule = parent.escapeRule;
+ else
+ escapeRule = null;
+ } //}}}
+
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/syntax/XModeHandler.java b/jEdit/org/gjt/sp/jedit/syntax/XModeHandler.java
index e438669..b140fa6 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/XModeHandler.java
+++ b/jEdit/org/gjt/sp/jedit/syntax/XModeHandler.java
@@ -1,766 +1,766 @@
-/*
- * XModeHandler.java - XML handler for mode files
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999 mike dillon
- * Portions copyright (C) 2000, 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.syntax;
-
-//{{{ Imports
-import java.util.*;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.gjt.sp.jedit.Mode;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.XMLUtilities;
-//}}}
-
-/**
- * XML handler for mode definition files.
- * @version $Id: XModeHandler.java 16344 2009-10-14 10:31:01Z kpouer $
- */
-public abstract class XModeHandler extends DefaultHandler
-{
- //{{{ XModeHandler constructor
- public XModeHandler (String modeName)
- {
- this.modeName = modeName;
- marker = new TokenMarker();
- marker.addRuleSet(new ParserRuleSet(modeName,"MAIN"));
- stateStack = new Stack<TagDecl>();
- } //}}}
-
- //{{{ resolveEntity() method
- public InputSource resolveEntity(String publicId, String systemId)
- {
- return XMLUtilities.findEntity(systemId, "xmode.dtd", XModeHandler.class);
- } //}}}
-
- //{{{ characters() method
- public void characters(char[] c, int off, int len)
- {
- peekElement().setText(c, off, len);
- } //}}}
-
- //{{{ startElement() method
- public void startElement(String uri, String localName,
- String qName, Attributes attrs)
- {
- TagDecl tag = pushElement(qName, attrs);
-
- if (qName.equals("WHITESPACE"))
- {
- Log.log(Log.WARNING,this,modeName + ": WHITESPACE rule "
- + "no longer needed");
- }
- else if (qName.equals("KEYWORDS"))
- {
- keywords = new KeywordMap(rules.getIgnoreCase());
- }
- else if (qName.equals("RULES"))
- {
- if(tag.lastSetName == null)
- tag.lastSetName = "MAIN";
- rules = marker.getRuleSet(tag.lastSetName);
- if(rules == null)
- {
- rules = new ParserRuleSet(modeName,tag.lastSetName);
- marker.addRuleSet(rules);
- }
- rules.setIgnoreCase(tag.lastIgnoreCase);
- rules.setHighlightDigits(tag.lastHighlightDigits);
- if(tag.lastDigitRE != null)
- {
- try
- {
- rules.setDigitRegexp(Pattern.compile(tag.lastDigitRE,
- tag.lastIgnoreCase
- ? Pattern.CASE_INSENSITIVE : 0));
- }
- catch(PatternSyntaxException e)
- {
- error("regexp",e);
- }
- }
-
- if(tag.lastEscape != null)
- rules.setEscapeRule(ParserRule.createEscapeRule(tag.lastEscape));
- rules.setDefault(tag.lastDefaultID);
- rules.setNoWordSep(tag.lastNoWordSep);
- }
- } //}}}
-
- //{{{ endElement() method
- public void endElement(String uri, String localName, String name)
- {
- TagDecl tag = popElement();
- if (name.equals(tag.tagName))
- {
- if(tag.lastDelegateSet != null
- && ! tag.tagName.equals("IMPORT")
- && ! tag.lastDelegateSet.getModeName().equals(modeName))
- {
- Mode mode = ModeProvider.instance.getMode(tag.lastDelegateSet.getModeName());
- if( ! reloadModes.contains(mode) )
- {
- reloadModes.add(mode);
- }
- }
- //{{{ PROPERTY
- if (tag.tagName.equals("PROPERTY"))
- {
- props.put(propName,propValue);
- } //}}}
- //{{{ PROPS
- else if (tag.tagName.equals("PROPS"))
- {
- if(peekElement().tagName.equals("RULES"))
- rules.setProperties(props);
- else
- modeProps = props;
-
- props = new Hashtable<String, String>();
- } //}}}
- //{{{ RULES
- else if (tag.tagName.equals("RULES"))
- {
- rules.setKeywords(keywords);
- keywords = null;
- rules = null;
- } //}}}
- //{{{ IMPORT
- else if (tag.tagName.equals("IMPORT"))
- {
- // prevent lockups
- if (!rules.equals(tag.lastDelegateSet))
- {
- rules.addRuleSet(tag.lastDelegateSet);
- }
- } //}}}
- //{{{ TERMINATE
- else if (tag.tagName.equals("TERMINATE"))
- {
- rules.setTerminateChar(tag.termChar);
- } //}}}
- //{{{ SEQ
- else if (tag.tagName.equals("SEQ"))
- {
- if(tag.lastStart == null)
- {
- error("empty-tag","SEQ");
- return;
- }
-
- rules.addRule(ParserRule.createSequenceRule(
- tag.lastStartPosMatch,tag.lastStart.toString(),
- tag.lastDelegateSet,tag.lastTokenID));
- } //}}}
- //{{{ SEQ_REGEXP
- else if (tag.tagName.equals("SEQ_REGEXP"))
- {
- if(tag.lastStart == null)
- {
- error("empty-tag","SEQ_REGEXP");
- return;
- }
-
- try
- {
- if (null != tag.lastHashChars)
- {
- rules.addRule(ParserRule.createRegexpSequenceRule(
- tag.lastStartPosMatch,tag.lastHashChars.toCharArray(),
- tag.lastStart.toString(),tag.lastDelegateSet,
- tag.lastTokenID,findParent("RULES").lastIgnoreCase));
- }
- else
- {
- rules.addRule(ParserRule.createRegexpSequenceRule(
- tag.lastHashChar,tag.lastStartPosMatch,
- tag.lastStart.toString(),tag.lastDelegateSet,
- tag.lastTokenID,findParent("RULES").lastIgnoreCase));
- }
- }
- catch(PatternSyntaxException re)
- {
- error("regexp",re);
- }
- } //}}}
- //{{{ SPAN
- else if (tag.tagName.equals("SPAN"))
- {
- if(tag.lastStart == null)
- {
- error("empty-tag","BEGIN");
- return;
- }
-
- if(tag.lastEnd == null)
- {
- error("empty-tag","END");
- return;
- }
-
- rules.addRule(ParserRule
- .createSpanRule(
- tag.lastStartPosMatch,tag.lastStart.toString(),
- tag.lastEndPosMatch,tag.lastEnd.toString(),
- tag.lastDelegateSet,
- tag.lastTokenID,tag.lastMatchType,
- tag.lastNoLineBreak,
- tag.lastNoWordBreak,
- tag.lastEscape));
- } //}}}
- //{{{ SPAN_REGEXP
- else if (tag.tagName.equals("SPAN_REGEXP"))
- {
- if(tag.lastStart == null)
- {
- error("empty-tag","BEGIN");
- return;
- }
-
- if(tag.lastEnd == null)
- {
- error("empty-tag","END");
- return;
- }
-
- try
- {
- if (null != tag.lastHashChars)
- {
- rules.addRule(ParserRule
- .createRegexpSpanRule(
- tag.lastStartPosMatch,tag.lastHashChars.toCharArray(),
- tag.lastStart.toString(),
- tag.lastEndPosMatch,tag.lastEnd.toString(),
- tag.lastDelegateSet,
- tag.lastTokenID,
- tag.lastMatchType,
- tag.lastNoLineBreak,
- tag.lastNoWordBreak,
- findParent("RULES").lastIgnoreCase,
- tag.lastEscape));
- }
- else
- {
- rules.addRule(ParserRule
- .createRegexpSpanRule(
- tag.lastHashChar,
- tag.lastStartPosMatch,tag.lastStart.toString(),
- tag.lastEndPosMatch,tag.lastEnd.toString(),
- tag.lastDelegateSet,
- tag.lastTokenID,
- tag.lastMatchType,
- tag.lastNoLineBreak,
- tag.lastNoWordBreak,
- findParent("RULES").lastIgnoreCase,
- tag.lastEscape));
- }
- }
- catch(PatternSyntaxException re)
- {
- error("regexp",re);
- }
- } //}}}
- //{{{ EOL_SPAN
- else if (tag.tagName.equals("EOL_SPAN"))
- {
- if(tag.lastStart == null)
- {
- error("empty-tag","EOL_SPAN");
- return;
- }
-
- rules.addRule(ParserRule.createEOLSpanRule(
- tag.lastStartPosMatch,tag.lastStart.toString(),
- tag.lastDelegateSet,tag.lastTokenID,
- tag.lastMatchType));
- } //}}}
- //{{{ EOL_SPAN_REGEXP
- else if (tag.tagName.equals("EOL_SPAN_REGEXP"))
- {
- if(tag.lastStart == null)
- {
- error("empty-tag","EOL_SPAN_REGEXP");
- return;
- }
-
- try
- {
- if (null != tag.lastHashChars)
- {
- rules.addRule(ParserRule.createRegexpEOLSpanRule(
- tag.lastStartPosMatch,tag.lastHashChars.toCharArray(),
- tag.lastStart.toString(),tag.lastDelegateSet,
- tag.lastTokenID,tag.lastMatchType,
- findParent("RULES").lastIgnoreCase));
- }
- else
- {
- rules.addRule(ParserRule.createRegexpEOLSpanRule(
- tag.lastHashChar,tag.lastStartPosMatch,
- tag.lastStart.toString(),tag.lastDelegateSet,
- tag.lastTokenID,tag.lastMatchType,
- findParent("RULES").lastIgnoreCase));
- }
- }
- catch(PatternSyntaxException re)
- {
- error("regexp",re);
- }
- } //}}}
- //{{{ MARK_FOLLOWING
- else if (tag.tagName.equals("MARK_FOLLOWING"))
- {
- if(tag.lastStart == null)
- {
- error("empty-tag","MARK_FOLLOWING");
- return;
- }
-
- rules.addRule(ParserRule
- .createMarkFollowingRule(
- tag.lastStartPosMatch,tag.lastStart.toString(),
- tag.lastTokenID,tag.lastMatchType));
- } //}}}
- //{{{ MARK_PREVIOUS
- else if (tag.tagName.equals("MARK_PREVIOUS"))
- {
- if(tag.lastStart == null)
- {
- error("empty-tag","MARK_PREVIOUS");
- return;
- }
-
- rules.addRule(ParserRule
- .createMarkPreviousRule(
- tag.lastStartPosMatch,tag.lastStart.toString(),
- tag.lastTokenID,tag.lastMatchType));
- } //}}}
- //{{{ Keywords
- else if (
- !tag.tagName.equals("END")
- && !tag.tagName.equals("BEGIN")
- && !tag.tagName.equals("KEYWORDS")
- && !tag.tagName.equals("MODE"))
- {
- byte token = Token.stringToToken(tag.tagName);
- if(token != -1)
- addKeyword(tag.lastKeyword.toString(),token);
- } //}}}
- }
- else
- {
- // can't happen
- throw new InternalError();
- }
- } //}}}
-
- //{{{ startDocument() method
- public void startDocument()
- {
- props = new Hashtable<String, String>();
- pushElement(null, null);
- reloadModes = new Vector<Mode>();
- } //}}}
-
- //{{{ endDocument() method
- public void endDocument()
- {
- ParserRuleSet[] rulesets = marker.getRuleSets();
- for(int i = 0; i < rulesets.length; i++)
- {
- rulesets[i].resolveImports();
- }
- for(Mode mode : reloadModes)
- {
- mode.setTokenMarker(null);
- mode.loadIfNecessary();
- }
- } //}}}
-
- //{{{ getTokenMarker() method
- /**
- * Returns the TokenMarker.
- *
- * @return a TokenMarker it cannot be null
- */
- public TokenMarker getTokenMarker()
- {
- return marker;
- } //}}}
-
- //{{{ getModeProperties() method
- public Hashtable<String, String> getModeProperties()
- {
- return modeProps;
- } //}}}
-
- //{{{ Protected members
-
- //{{{ error() method
- /**
- * Reports an error.
- * You must override this method so that the mode loader can do error
- * reporting.
- * @param msg The error type
- * @param subst A <code>String</code> or a <code>Throwable</code>
- * containing specific information
- * @since jEdit 4.2pre1
- */
- protected abstract void error(String msg, Object subst);
- //}}}
-
- //{{{ getTokenMarker() method
- /**
- * Returns the token marker for the given mode.
- * You must override this method so that the mode loader can resolve
- * delegate targets.
- * @param mode The mode name
- * @since jEdit 4.2pre1
- */
- protected abstract TokenMarker getTokenMarker(String mode);
- //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private String modeName;
- /** The token marker cannot be null. */
- private final TokenMarker marker;
- private KeywordMap keywords;
- /** this stack can contains null elements. */
- private Stack<TagDecl> stateStack;
- private String propName;
- private String propValue;
- private Hashtable<String, String> props;
- private Hashtable<String, String> modeProps;
- private ParserRuleSet rules;
- /**
- * A list of modes to be reloaded at the end, loaded through DELEGATEs
- * @see http://sourceforge.net/tracker/index.php?func=detail&aid=1742250&group_id=588&atid=100588
- */
- private Vector<Mode> reloadModes;
- //}}}
-
- //{{{ addKeyword() method
- private void addKeyword(String k, byte id)
- {
- if(k == null)
- {
- error("empty-keyword",null);
- return;
- }
-
- if (keywords == null) return;
- keywords.add(k,id);
- } //}}}
-
- //{{{ pushElement() method
- private TagDecl pushElement(String name, Attributes attrs)
- {
- if (name != null)
- {
- TagDecl tag = new TagDecl(name, attrs);
- stateStack.push(tag);
- return tag;
- }
- else
- {
- stateStack.push(null);
- return null;
- }
- } //}}}
-
- //{{{ peekElement() method
- private TagDecl peekElement()
- {
- return stateStack.peek();
- } //}}}
-
- //{{{ popElement() method
- private TagDecl popElement()
- {
- return stateStack.pop();
- } //}}}
-
- //{{{ findParent() method
- /**
- * Finds the first element whose tag matches 'tagName',
- * searching backwards in the stack.
- */
- private TagDecl findParent(String tagName)
- {
- for (int idx = stateStack.size() - 1; idx >= 0; idx--)
- {
- TagDecl tag = stateStack.get(idx);
- if (tag.tagName.equals(tagName))
- return tag;
- }
- return null;
- } //}}}
-
- //}}}
-
- /**
- * Hold info about what tag was read and what attributes were
- * set in the XML file, to be kept by the handler in a stack
- * (similar to the way tag names were kept in a stack before).
- */
- private class TagDecl
- {
-
- public TagDecl(String tagName, Attributes attrs)
- {
- this.tagName = tagName;
-
- String tmp;
-
- propName = attrs.getValue("NAME");
- propValue = attrs.getValue("VALUE");
-
- tmp = attrs.getValue("TYPE");
- if (tmp != null)
- {
- lastTokenID = Token.stringToToken(tmp);
- if(lastTokenID == -1)
- error("token-invalid",tmp);
- }
-
- lastMatchType = ParserRule.MATCH_TYPE_RULE;
- // check for the deprecated "EXCLUDE_MATCH" and
- // warn if found.
- tmp = attrs.getValue("EXCLUDE_MATCH");
- if (tmp != null)
- {
- Log.log(Log.WARNING, this, modeName + ": EXCLUDE_MATCH is deprecated");
- if ("TRUE".equalsIgnoreCase(tmp))
- {
- lastMatchType = ParserRule.MATCH_TYPE_CONTEXT;
- }
- }
-
- // override with the newer MATCH_TYPE if present
- tmp = attrs.getValue("MATCH_TYPE");
- if (tmp != null)
- {
- if ("CONTEXT".equals(tmp))
- {
- lastMatchType = ParserRule.MATCH_TYPE_CONTEXT;
- }
- else if ("RULE".equals(tmp))
- {
- lastMatchType = ParserRule.MATCH_TYPE_RULE;
- }
- else
- {
- lastMatchType = Token.stringToToken(tmp);
- if(lastMatchType == -1)
- error("token-invalid",tmp);
- }
- }
-
- lastAtLineStart = "TRUE".equals(attrs.getValue("AT_LINE_START"));
- lastAtWhitespaceEnd = "TRUE".equals(attrs.getValue("AT_WHITESPACE_END"));
- lastAtWordStart = "TRUE".equals(attrs.getValue("AT_WORD_START"));
- lastNoLineBreak = "TRUE".equals(attrs.getValue("NO_LINE_BREAK"));
- lastNoWordBreak = "TRUE".equals(attrs.getValue("NO_WORD_BREAK"));
- lastIgnoreCase = (attrs.getValue("IGNORE_CASE") == null ||
- "TRUE".equals(attrs.getValue("IGNORE_CASE")));
- lastHighlightDigits = "TRUE".equals(attrs.getValue("HIGHLIGHT_DIGITS"));
- lastDigitRE = attrs.getValue("DIGIT_RE");
-
- tmp = attrs.getValue("NO_WORD_SEP");
- if (tmp != null)
- lastNoWordSep = tmp;
-
- tmp = attrs.getValue("AT_CHAR");
- if (tmp != null)
- {
- try
- {
- termChar = Integer.parseInt(tmp);
- }
- catch (NumberFormatException e)
- {
- error("termchar-invalid",tmp);
- termChar = -1;
- }
- }
-
- lastEscape = attrs.getValue("ESCAPE");
- lastSetName = attrs.getValue("SET");
-
- tmp = attrs.getValue("DELEGATE");
- if (tmp != null)
- {
- String delegateMode, delegateSetName;
-
- int index = tmp.indexOf("::");
-
- if(index != -1)
- {
- delegateMode = tmp.substring(0,index);
- delegateSetName = tmp.substring(index + 2);
- }
- else
- {
- delegateMode = modeName;
- delegateSetName = tmp;
- }
-
- TokenMarker delegateMarker = getTokenMarker(delegateMode);
- if(delegateMarker == null)
- error("delegate-invalid",tmp);
- else
- {
- lastDelegateSet = delegateMarker
- .getRuleSet(delegateSetName);
- if(delegateMarker == marker
- && lastDelegateSet == null)
- {
- // stupid hack to handle referencing
- // a rule set that is defined later!
- lastDelegateSet = new ParserRuleSet(
- delegateMode,
- delegateSetName);
- lastDelegateSet.setDefault(Token.INVALID);
- marker.addRuleSet(lastDelegateSet);
- }
- else if(lastDelegateSet == null)
- error("delegate-invalid",tmp);
- }
- }
-
- tmp = attrs.getValue("DEFAULT");
- if (tmp != null)
- {
- lastDefaultID = Token.stringToToken(tmp);
- if(lastDefaultID == -1)
- {
- error("token-invalid",tmp);
- lastDefaultID = Token.NULL;
- }
- }
-
- lastHashChar = attrs.getValue("HASH_CHAR");
- lastHashChars = attrs.getValue("HASH_CHARS");
- if ((null != lastHashChar) && (null != lastHashChars))
- {
- error("hash-char-and-hash-chars-mutually-exclusive",null);
- lastHashChars = null;
- }
- }
-
- public void setText(char[] c, int off, int len)
- {
- if (tagName.equals("EOL_SPAN") ||
- tagName.equals("EOL_SPAN_REGEXP") ||
- tagName.equals("MARK_PREVIOUS") ||
- tagName.equals("MARK_FOLLOWING") ||
- tagName.equals("SEQ") ||
- tagName.equals("SEQ_REGEXP") ||
- tagName.equals("BEGIN")
- )
- {
- TagDecl target = this;
- if (tagName.equals("BEGIN"))
- target = stateStack.get(stateStack.size() - 2);
-
- if (target.lastStart == null)
- {
- target.lastStart = new StringBuffer();
- target.lastStart.append(c, off, len);
- target.lastStartPosMatch = ((target.lastAtLineStart ? ParserRule.AT_LINE_START : 0)
- | (target.lastAtWhitespaceEnd ? ParserRule.AT_WHITESPACE_END : 0)
- | (target.lastAtWordStart ? ParserRule.AT_WORD_START : 0));
- target.lastAtLineStart = false;
- target.lastAtWordStart = false;
- target.lastAtWhitespaceEnd = false;
- }
- else
- {
- target.lastStart.append(c, off, len);
- }
- }
- else if (tagName.equals("END"))
- {
- TagDecl target = stateStack.get(stateStack.size() - 2);
- if (target.lastEnd == null)
- {
- target.lastEnd = new StringBuffer();
- target.lastEnd.append(c, off, len);
- target.lastEndPosMatch = ((this.lastAtLineStart ? ParserRule.AT_LINE_START : 0)
- | (this.lastAtWhitespaceEnd ? ParserRule.AT_WHITESPACE_END : 0)
- | (this.lastAtWordStart ? ParserRule.AT_WORD_START : 0));
- target.lastAtLineStart = false;
- target.lastAtWordStart = false;
- target.lastAtWhitespaceEnd = false;
- }
- else
- {
- target.lastEnd.append(c, off, len);
- }
- }
- else
- {
- if (lastKeyword == null)
- lastKeyword = new StringBuffer();
- lastKeyword.append(c, off, len);
- }
- }
-
- public String tagName;
- public StringBuffer lastStart;
- public StringBuffer lastEnd;
- public StringBuffer lastKeyword;
- public String lastSetName;
- public String lastEscape;
- public ParserRuleSet lastDelegateSet;
- public String lastNoWordSep = "_";
- public ParserRuleSet rules;
- public byte lastDefaultID = Token.NULL;
- public byte lastTokenID;
- public byte lastMatchType;
- public int termChar = -1;
- public boolean lastNoLineBreak;
- public boolean lastNoWordBreak;
- public boolean lastIgnoreCase = true;
- public boolean lastHighlightDigits;
- public boolean lastAtLineStart;
- public boolean lastAtWhitespaceEnd;
- public boolean lastAtWordStart;
- public int lastStartPosMatch;
- public int lastEndPosMatch;
- public String lastDigitRE;
- public String lastHashChar;
- public String lastHashChars;
- }
-}
-
+/*
+ * XModeHandler.java - XML handler for mode files
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999 mike dillon
+ * Portions copyright (C) 2000, 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.syntax;
+
+//{{{ Imports
+import java.util.*;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.gjt.sp.jedit.Mode;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.XMLUtilities;
+//}}}
+
+/**
+ * XML handler for mode definition files.
+ * @version $Id: XModeHandler.java 16344 2009-10-14 10:31:01Z kpouer $
+ */
+public abstract class XModeHandler extends DefaultHandler
+{
+ //{{{ XModeHandler constructor
+ public XModeHandler (String modeName)
+ {
+ this.modeName = modeName;
+ marker = new TokenMarker();
+ marker.addRuleSet(new ParserRuleSet(modeName,"MAIN"));
+ stateStack = new Stack<TagDecl>();
+ } //}}}
+
+ //{{{ resolveEntity() method
+ public InputSource resolveEntity(String publicId, String systemId)
+ {
+ return XMLUtilities.findEntity(systemId, "xmode.dtd", XModeHandler.class);
+ } //}}}
+
+ //{{{ characters() method
+ public void characters(char[] c, int off, int len)
+ {
+ peekElement().setText(c, off, len);
+ } //}}}
+
+ //{{{ startElement() method
+ public void startElement(String uri, String localName,
+ String qName, Attributes attrs)
+ {
+ TagDecl tag = pushElement(qName, attrs);
+
+ if (qName.equals("WHITESPACE"))
+ {
+ Log.log(Log.WARNING,this,modeName + ": WHITESPACE rule "
+ + "no longer needed");
+ }
+ else if (qName.equals("KEYWORDS"))
+ {
+ keywords = new KeywordMap(rules.getIgnoreCase());
+ }
+ else if (qName.equals("RULES"))
+ {
+ if(tag.lastSetName == null)
+ tag.lastSetName = "MAIN";
+ rules = marker.getRuleSet(tag.lastSetName);
+ if(rules == null)
+ {
+ rules = new ParserRuleSet(modeName,tag.lastSetName);
+ marker.addRuleSet(rules);
+ }
+ rules.setIgnoreCase(tag.lastIgnoreCase);
+ rules.setHighlightDigits(tag.lastHighlightDigits);
+ if(tag.lastDigitRE != null)
+ {
+ try
+ {
+ rules.setDigitRegexp(Pattern.compile(tag.lastDigitRE,
+ tag.lastIgnoreCase
+ ? Pattern.CASE_INSENSITIVE : 0));
+ }
+ catch(PatternSyntaxException e)
+ {
+ error("regexp",e);
+ }
+ }
+
+ if(tag.lastEscape != null)
+ rules.setEscapeRule(ParserRule.createEscapeRule(tag.lastEscape));
+ rules.setDefault(tag.lastDefaultID);
+ rules.setNoWordSep(tag.lastNoWordSep);
+ }
+ } //}}}
+
+ //{{{ endElement() method
+ public void endElement(String uri, String localName, String name)
+ {
+ TagDecl tag = popElement();
+ if (name.equals(tag.tagName))
+ {
+ if(tag.lastDelegateSet != null
+ && ! tag.tagName.equals("IMPORT")
+ && ! tag.lastDelegateSet.getModeName().equals(modeName))
+ {
+ Mode mode = ModeProvider.instance.getMode(tag.lastDelegateSet.getModeName());
+ if( ! reloadModes.contains(mode) )
+ {
+ reloadModes.add(mode);
+ }
+ }
+ //{{{ PROPERTY
+ if (tag.tagName.equals("PROPERTY"))
+ {
+ props.put(propName,propValue);
+ } //}}}
+ //{{{ PROPS
+ else if (tag.tagName.equals("PROPS"))
+ {
+ if(peekElement().tagName.equals("RULES"))
+ rules.setProperties(props);
+ else
+ modeProps = props;
+
+ props = new Hashtable<String, String>();
+ } //}}}
+ //{{{ RULES
+ else if (tag.tagName.equals("RULES"))
+ {
+ rules.setKeywords(keywords);
+ keywords = null;
+ rules = null;
+ } //}}}
+ //{{{ IMPORT
+ else if (tag.tagName.equals("IMPORT"))
+ {
+ // prevent lockups
+ if (!rules.equals(tag.lastDelegateSet))
+ {
+ rules.addRuleSet(tag.lastDelegateSet);
+ }
+ } //}}}
+ //{{{ TERMINATE
+ else if (tag.tagName.equals("TERMINATE"))
+ {
+ rules.setTerminateChar(tag.termChar);
+ } //}}}
+ //{{{ SEQ
+ else if (tag.tagName.equals("SEQ"))
+ {
+ if(tag.lastStart == null)
+ {
+ error("empty-tag","SEQ");
+ return;
+ }
+
+ rules.addRule(ParserRule.createSequenceRule(
+ tag.lastStartPosMatch,tag.lastStart.toString(),
+ tag.lastDelegateSet,tag.lastTokenID));
+ } //}}}
+ //{{{ SEQ_REGEXP
+ else if (tag.tagName.equals("SEQ_REGEXP"))
+ {
+ if(tag.lastStart == null)
+ {
+ error("empty-tag","SEQ_REGEXP");
+ return;
+ }
+
+ try
+ {
+ if (null != tag.lastHashChars)
+ {
+ rules.addRule(ParserRule.createRegexpSequenceRule(
+ tag.lastStartPosMatch,tag.lastHashChars.toCharArray(),
+ tag.lastStart.toString(),tag.lastDelegateSet,
+ tag.lastTokenID,findParent("RULES").lastIgnoreCase));
+ }
+ else
+ {
+ rules.addRule(ParserRule.createRegexpSequenceRule(
+ tag.lastHashChar,tag.lastStartPosMatch,
+ tag.lastStart.toString(),tag.lastDelegateSet,
+ tag.lastTokenID,findParent("RULES").lastIgnoreCase));
+ }
+ }
+ catch(PatternSyntaxException re)
+ {
+ error("regexp",re);
+ }
+ } //}}}
+ //{{{ SPAN
+ else if (tag.tagName.equals("SPAN"))
+ {
+ if(tag.lastStart == null)
+ {
+ error("empty-tag","BEGIN");
+ return;
+ }
+
+ if(tag.lastEnd == null)
+ {
+ error("empty-tag","END");
+ return;
+ }
+
+ rules.addRule(ParserRule
+ .createSpanRule(
+ tag.lastStartPosMatch,tag.lastStart.toString(),
+ tag.lastEndPosMatch,tag.lastEnd.toString(),
+ tag.lastDelegateSet,
+ tag.lastTokenID,tag.lastMatchType,
+ tag.lastNoLineBreak,
+ tag.lastNoWordBreak,
+ tag.lastEscape));
+ } //}}}
+ //{{{ SPAN_REGEXP
+ else if (tag.tagName.equals("SPAN_REGEXP"))
+ {
+ if(tag.lastStart == null)
+ {
+ error("empty-tag","BEGIN");
+ return;
+ }
+
+ if(tag.lastEnd == null)
+ {
+ error("empty-tag","END");
+ return;
+ }
+
+ try
+ {
+ if (null != tag.lastHashChars)
+ {
+ rules.addRule(ParserRule
+ .createRegexpSpanRule(
+ tag.lastStartPosMatch,tag.lastHashChars.toCharArray(),
+ tag.lastStart.toString(),
+ tag.lastEndPosMatch,tag.lastEnd.toString(),
+ tag.lastDelegateSet,
+ tag.lastTokenID,
+ tag.lastMatchType,
+ tag.lastNoLineBreak,
+ tag.lastNoWordBreak,
+ findParent("RULES").lastIgnoreCase,
+ tag.lastEscape));
+ }
+ else
+ {
+ rules.addRule(ParserRule
+ .createRegexpSpanRule(
+ tag.lastHashChar,
+ tag.lastStartPosMatch,tag.lastStart.toString(),
+ tag.lastEndPosMatch,tag.lastEnd.toString(),
+ tag.lastDelegateSet,
+ tag.lastTokenID,
+ tag.lastMatchType,
+ tag.lastNoLineBreak,
+ tag.lastNoWordBreak,
+ findParent("RULES").lastIgnoreCase,
+ tag.lastEscape));
+ }
+ }
+ catch(PatternSyntaxException re)
+ {
+ error("regexp",re);
+ }
+ } //}}}
+ //{{{ EOL_SPAN
+ else if (tag.tagName.equals("EOL_SPAN"))
+ {
+ if(tag.lastStart == null)
+ {
+ error("empty-tag","EOL_SPAN");
+ return;
+ }
+
+ rules.addRule(ParserRule.createEOLSpanRule(
+ tag.lastStartPosMatch,tag.lastStart.toString(),
+ tag.lastDelegateSet,tag.lastTokenID,
+ tag.lastMatchType));
+ } //}}}
+ //{{{ EOL_SPAN_REGEXP
+ else if (tag.tagName.equals("EOL_SPAN_REGEXP"))
+ {
+ if(tag.lastStart == null)
+ {
+ error("empty-tag","EOL_SPAN_REGEXP");
+ return;
+ }
+
+ try
+ {
+ if (null != tag.lastHashChars)
+ {
+ rules.addRule(ParserRule.createRegexpEOLSpanRule(
+ tag.lastStartPosMatch,tag.lastHashChars.toCharArray(),
+ tag.lastStart.toString(),tag.lastDelegateSet,
+ tag.lastTokenID,tag.lastMatchType,
+ findParent("RULES").lastIgnoreCase));
+ }
+ else
+ {
+ rules.addRule(ParserRule.createRegexpEOLSpanRule(
+ tag.lastHashChar,tag.lastStartPosMatch,
+ tag.lastStart.toString(),tag.lastDelegateSet,
+ tag.lastTokenID,tag.lastMatchType,
+ findParent("RULES").lastIgnoreCase));
+ }
+ }
+ catch(PatternSyntaxException re)
+ {
+ error("regexp",re);
+ }
+ } //}}}
+ //{{{ MARK_FOLLOWING
+ else if (tag.tagName.equals("MARK_FOLLOWING"))
+ {
+ if(tag.lastStart == null)
+ {
+ error("empty-tag","MARK_FOLLOWING");
+ return;
+ }
+
+ rules.addRule(ParserRule
+ .createMarkFollowingRule(
+ tag.lastStartPosMatch,tag.lastStart.toString(),
+ tag.lastTokenID,tag.lastMatchType));
+ } //}}}
+ //{{{ MARK_PREVIOUS
+ else if (tag.tagName.equals("MARK_PREVIOUS"))
+ {
+ if(tag.lastStart == null)
+ {
+ error("empty-tag","MARK_PREVIOUS");
+ return;
+ }
+
+ rules.addRule(ParserRule
+ .createMarkPreviousRule(
+ tag.lastStartPosMatch,tag.lastStart.toString(),
+ tag.lastTokenID,tag.lastMatchType));
+ } //}}}
+ //{{{ Keywords
+ else if (
+ !tag.tagName.equals("END")
+ && !tag.tagName.equals("BEGIN")
+ && !tag.tagName.equals("KEYWORDS")
+ && !tag.tagName.equals("MODE"))
+ {
+ byte token = Token.stringToToken(tag.tagName);
+ if(token != -1)
+ addKeyword(tag.lastKeyword.toString(),token);
+ } //}}}
+ }
+ else
+ {
+ // can't happen
+ throw new InternalError();
+ }
+ } //}}}
+
+ //{{{ startDocument() method
+ public void startDocument()
+ {
+ props = new Hashtable<String, String>();
+ pushElement(null, null);
+ reloadModes = new Vector<Mode>();
+ } //}}}
+
+ //{{{ endDocument() method
+ public void endDocument()
+ {
+ ParserRuleSet[] rulesets = marker.getRuleSets();
+ for(int i = 0; i < rulesets.length; i++)
+ {
+ rulesets[i].resolveImports();
+ }
+ for(Mode mode : reloadModes)
+ {
+ mode.setTokenMarker(null);
+ mode.loadIfNecessary();
+ }
+ } //}}}
+
+ //{{{ getTokenMarker() method
+ /**
+ * Returns the TokenMarker.
+ *
+ * @return a TokenMarker it cannot be null
+ */
+ public TokenMarker getTokenMarker()
+ {
+ return marker;
+ } //}}}
+
+ //{{{ getModeProperties() method
+ public Hashtable<String, String> getModeProperties()
+ {
+ return modeProps;
+ } //}}}
+
+ //{{{ Protected members
+
+ //{{{ error() method
+ /**
+ * Reports an error.
+ * You must override this method so that the mode loader can do error
+ * reporting.
+ * @param msg The error type
+ * @param subst A <code>String</code> or a <code>Throwable</code>
+ * containing specific information
+ * @since jEdit 4.2pre1
+ */
+ protected abstract void error(String msg, Object subst);
+ //}}}
+
+ //{{{ getTokenMarker() method
+ /**
+ * Returns the token marker for the given mode.
+ * You must override this method so that the mode loader can resolve
+ * delegate targets.
+ * @param mode The mode name
+ * @since jEdit 4.2pre1
+ */
+ protected abstract TokenMarker getTokenMarker(String mode);
+ //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private String modeName;
+ /** The token marker cannot be null. */
+ private final TokenMarker marker;
+ private KeywordMap keywords;
+ /** this stack can contains null elements. */
+ private Stack<TagDecl> stateStack;
+ private String propName;
+ private String propValue;
+ private Hashtable<String, String> props;
+ private Hashtable<String, String> modeProps;
+ private ParserRuleSet rules;
+ /**
+ * A list of modes to be reloaded at the end, loaded through DELEGATEs
+ * @see http://sourceforge.net/tracker/index.php?func=detail&aid=1742250&group_id=588&atid=100588
+ */
+ private Vector<Mode> reloadModes;
+ //}}}
+
+ //{{{ addKeyword() method
+ private void addKeyword(String k, byte id)
+ {
+ if(k == null)
+ {
+ error("empty-keyword",null);
+ return;
+ }
+
+ if (keywords == null) return;
+ keywords.add(k,id);
+ } //}}}
+
+ //{{{ pushElement() method
+ private TagDecl pushElement(String name, Attributes attrs)
+ {
+ if (name != null)
+ {
+ TagDecl tag = new TagDecl(name, attrs);
+ stateStack.push(tag);
+ return tag;
+ }
+ else
+ {
+ stateStack.push(null);
+ return null;
+ }
+ } //}}}
+
+ //{{{ peekElement() method
+ private TagDecl peekElement()
+ {
+ return stateStack.peek();
+ } //}}}
+
+ //{{{ popElement() method
+ private TagDecl popElement()
+ {
+ return stateStack.pop();
+ } //}}}
+
+ //{{{ findParent() method
+ /**
+ * Finds the first element whose tag matches 'tagName',
+ * searching backwards in the stack.
+ */
+ private TagDecl findParent(String tagName)
+ {
+ for (int idx = stateStack.size() - 1; idx >= 0; idx--)
+ {
+ TagDecl tag = stateStack.get(idx);
+ if (tag.tagName.equals(tagName))
+ return tag;
+ }
+ return null;
+ } //}}}
+
+ //}}}
+
+ /**
+ * Hold info about what tag was read and what attributes were
+ * set in the XML file, to be kept by the handler in a stack
+ * (similar to the way tag names were kept in a stack before).
+ */
+ private class TagDecl
+ {
+
+ public TagDecl(String tagName, Attributes attrs)
+ {
+ this.tagName = tagName;
+
+ String tmp;
+
+ propName = attrs.getValue("NAME");
+ propValue = attrs.getValue("VALUE");
+
+ tmp = attrs.getValue("TYPE");
+ if (tmp != null)
+ {
+ lastTokenID = Token.stringToToken(tmp);
+ if(lastTokenID == -1)
+ error("token-invalid",tmp);
+ }
+
+ lastMatchType = ParserRule.MATCH_TYPE_RULE;
+ // check for the deprecated "EXCLUDE_MATCH" and
+ // warn if found.
+ tmp = attrs.getValue("EXCLUDE_MATCH");
+ if (tmp != null)
+ {
+ Log.log(Log.WARNING, this, modeName + ": EXCLUDE_MATCH is deprecated");
+ if ("TRUE".equalsIgnoreCase(tmp))
+ {
+ lastMatchType = ParserRule.MATCH_TYPE_CONTEXT;
+ }
+ }
+
+ // override with the newer MATCH_TYPE if present
+ tmp = attrs.getValue("MATCH_TYPE");
+ if (tmp != null)
+ {
+ if ("CONTEXT".equals(tmp))
+ {
+ lastMatchType = ParserRule.MATCH_TYPE_CONTEXT;
+ }
+ else if ("RULE".equals(tmp))
+ {
+ lastMatchType = ParserRule.MATCH_TYPE_RULE;
+ }
+ else
+ {
+ lastMatchType = Token.stringToToken(tmp);
+ if(lastMatchType == -1)
+ error("token-invalid",tmp);
+ }
+ }
+
+ lastAtLineStart = "TRUE".equals(attrs.getValue("AT_LINE_START"));
+ lastAtWhitespaceEnd = "TRUE".equals(attrs.getValue("AT_WHITESPACE_END"));
+ lastAtWordStart = "TRUE".equals(attrs.getValue("AT_WORD_START"));
+ lastNoLineBreak = "TRUE".equals(attrs.getValue("NO_LINE_BREAK"));
+ lastNoWordBreak = "TRUE".equals(attrs.getValue("NO_WORD_BREAK"));
+ lastIgnoreCase = (attrs.getValue("IGNORE_CASE") == null ||
+ "TRUE".equals(attrs.getValue("IGNORE_CASE")));
+ lastHighlightDigits = "TRUE".equals(attrs.getValue("HIGHLIGHT_DIGITS"));
+ lastDigitRE = attrs.getValue("DIGIT_RE");
+
+ tmp = attrs.getValue("NO_WORD_SEP");
+ if (tmp != null)
+ lastNoWordSep = tmp;
+
+ tmp = attrs.getValue("AT_CHAR");
+ if (tmp != null)
+ {
+ try
+ {
+ termChar = Integer.parseInt(tmp);
+ }
+ catch (NumberFormatException e)
+ {
+ error("termchar-invalid",tmp);
+ termChar = -1;
+ }
+ }
+
+ lastEscape = attrs.getValue("ESCAPE");
+ lastSetName = attrs.getValue("SET");
+
+ tmp = attrs.getValue("DELEGATE");
+ if (tmp != null)
+ {
+ String delegateMode, delegateSetName;
+
+ int index = tmp.indexOf("::");
+
+ if(index != -1)
+ {
+ delegateMode = tmp.substring(0,index);
+ delegateSetName = tmp.substring(index + 2);
+ }
+ else
+ {
+ delegateMode = modeName;
+ delegateSetName = tmp;
+ }
+
+ TokenMarker delegateMarker = getTokenMarker(delegateMode);
+ if(delegateMarker == null)
+ error("delegate-invalid",tmp);
+ else
+ {
+ lastDelegateSet = delegateMarker
+ .getRuleSet(delegateSetName);
+ if(delegateMarker == marker
+ && lastDelegateSet == null)
+ {
+ // stupid hack to handle referencing
+ // a rule set that is defined later!
+ lastDelegateSet = new ParserRuleSet(
+ delegateMode,
+ delegateSetName);
+ lastDelegateSet.setDefault(Token.INVALID);
+ marker.addRuleSet(lastDelegateSet);
+ }
+ else if(lastDelegateSet == null)
+ error("delegate-invalid",tmp);
+ }
+ }
+
+ tmp = attrs.getValue("DEFAULT");
+ if (tmp != null)
+ {
+ lastDefaultID = Token.stringToToken(tmp);
+ if(lastDefaultID == -1)
+ {
+ error("token-invalid",tmp);
+ lastDefaultID = Token.NULL;
+ }
+ }
+
+ lastHashChar = attrs.getValue("HASH_CHAR");
+ lastHashChars = attrs.getValue("HASH_CHARS");
+ if ((null != lastHashChar) && (null != lastHashChars))
+ {
+ error("hash-char-and-hash-chars-mutually-exclusive",null);
+ lastHashChars = null;
+ }
+ }
+
+ public void setText(char[] c, int off, int len)
+ {
+ if (tagName.equals("EOL_SPAN") ||
+ tagName.equals("EOL_SPAN_REGEXP") ||
+ tagName.equals("MARK_PREVIOUS") ||
+ tagName.equals("MARK_FOLLOWING") ||
+ tagName.equals("SEQ") ||
+ tagName.equals("SEQ_REGEXP") ||
+ tagName.equals("BEGIN")
+ )
+ {
+ TagDecl target = this;
+ if (tagName.equals("BEGIN"))
+ target = stateStack.get(stateStack.size() - 2);
+
+ if (target.lastStart == null)
+ {
+ target.lastStart = new StringBuffer();
+ target.lastStart.append(c, off, len);
+ target.lastStartPosMatch = ((target.lastAtLineStart ? ParserRule.AT_LINE_START : 0)
+ | (target.lastAtWhitespaceEnd ? ParserRule.AT_WHITESPACE_END : 0)
+ | (target.lastAtWordStart ? ParserRule.AT_WORD_START : 0));
+ target.lastAtLineStart = false;
+ target.lastAtWordStart = false;
+ target.lastAtWhitespaceEnd = false;
+ }
+ else
+ {
+ target.lastStart.append(c, off, len);
+ }
+ }
+ else if (tagName.equals("END"))
+ {
+ TagDecl target = stateStack.get(stateStack.size() - 2);
+ if (target.lastEnd == null)
+ {
+ target.lastEnd = new StringBuffer();
+ target.lastEnd.append(c, off, len);
+ target.lastEndPosMatch = ((this.lastAtLineStart ? ParserRule.AT_LINE_START : 0)
+ | (this.lastAtWhitespaceEnd ? ParserRule.AT_WHITESPACE_END : 0)
+ | (this.lastAtWordStart ? ParserRule.AT_WORD_START : 0));
+ target.lastAtLineStart = false;
+ target.lastAtWordStart = false;
+ target.lastAtWhitespaceEnd = false;
+ }
+ else
+ {
+ target.lastEnd.append(c, off, len);
+ }
+ }
+ else
+ {
+ if (lastKeyword == null)
+ lastKeyword = new StringBuffer();
+ lastKeyword.append(c, off, len);
+ }
+ }
+
+ public String tagName;
+ public StringBuffer lastStart;
+ public StringBuffer lastEnd;
+ public StringBuffer lastKeyword;
+ public String lastSetName;
+ public String lastEscape;
+ public ParserRuleSet lastDelegateSet;
+ public String lastNoWordSep = "_";
+ public ParserRuleSet rules;
+ public byte lastDefaultID = Token.NULL;
+ public byte lastTokenID;
+ public byte lastMatchType;
+ public int termChar = -1;
+ public boolean lastNoLineBreak;
+ public boolean lastNoWordBreak;
+ public boolean lastIgnoreCase = true;
+ public boolean lastHighlightDigits;
+ public boolean lastAtLineStart;
+ public boolean lastAtWhitespaceEnd;
+ public boolean lastAtWordStart;
+ public int lastStartPosMatch;
+ public int lastEndPosMatch;
+ public String lastDigitRE;
+ public String lastHashChar;
+ public String lastHashChars;
+ }
+}
+
diff --git a/jEdit/org/gjt/sp/jedit/syntax/package.html b/jEdit/org/gjt/sp/jedit/syntax/package.html
index fdf4a51..aa97f79 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/package.html
+++ b/jEdit/org/gjt/sp/jedit/syntax/package.html
@@ -1,13 +1,13 @@
-<html><body>The jEdit syntax highlighting engine. This package only depends on a
-few jEdit classes:
-
-<ul>
-<li><a href="../../util/SegmentCharSequence.html">org.gjt.sp.util.SegmentCharSequence class</a></li>
-<li><a href="../../util/Log.html">org.gjt.sp.util.Log class</a></li>
-</ul>
-
-To use this package from other programs, see the documentation for the
-<a href="TokenMarker.html">TokenMarker</a>,
-<a href="TokenHandler.html">TokenHandler</a> and
-<a href="XModeHandler.html">XModeHandler</a> classes.
-</body></html>
+<html><body>The jEdit syntax highlighting engine. This package only depends on a
+few jEdit classes:
+
+<ul>
+<li><a href="../../util/SegmentCharSequence.html">org.gjt.sp.util.SegmentCharSequence class</a></li>
+<li><a href="../../util/Log.html">org.gjt.sp.util.Log class</a></li>
+</ul>
+
+To use this package from other programs, see the documentation for the
+<a href="TokenMarker.html">TokenMarker</a>,
+<a href="TokenHandler.html">TokenHandler</a> and
+<a href="XModeHandler.html">XModeHandler</a> classes.
+</body></html>
diff --git a/jEdit/org/gjt/sp/jedit/syntax/xmode.dtd b/jEdit/org/gjt/sp/jedit/syntax/xmode.dtd
index 045ed51..34cd1fd 100644
--- a/jEdit/org/gjt/sp/jedit/syntax/xmode.dtd
+++ b/jEdit/org/gjt/sp/jedit/syntax/xmode.dtd
@@ -1,166 +1,166 @@
-<!-- Syntax tokens -->
-<!ENTITY % token_values "NULL | COMMENT1 | COMMENT2 | COMMENT3 | COMMENT4 |
- DIGIT | FUNCTION | INVALID | KEYWORD1 | KEYWORD2 | KEYWORD3 | KEYWORD4 |
- LABEL | LITERAL1 | LITERAL2 | LITERAL3 | LITERAL4 | MARKUP | OPERATOR" >
-<!ENTITY % tokens "( %token_values; )" >
-
-<!-- Entities for attributes shared by multiple rules -->
-<!ENTITY % att-bool '( TRUE | FALSE ) #IMPLIED' >
-<!ENTITY % att-type 'TYPE %tokens; #IMPLIED' >
-<!ENTITY % att-position-mix 'AT_LINE_START %att-bool;
- AT_WHITESPACE_END %att-bool;
- AT_WORD_START %att-bool; ' >
-<!ENTITY % att-match-type 'MATCH_TYPE ( %token_values; | CONTEXT | RULE ) #IMPLIED' >
-<!ENTITY % att-delegate 'DELEGATE CDATA #IMPLIED' >
-<!ENTITY % att-span-mix 'NO_LINE_BREAK %att-bool;
- NO_WORD_BREAK %att-bool;
- ESCAPE CDATA #IMPLIED '>
-<!ENTITY % att-hash-char 'HASH_CHAR CDATA #IMPLIED
- HASH_CHARS CDATA #IMPLIED' >
-
-<!-- MODE element -->
-<!ELEMENT MODE ( PROPS?, RULES* ) >
-
-<!-- MODE children -->
-<!-- PROPS element -->
-<!ELEMENT PROPS ( PROPERTY+ ) >
-
-<!-- PROPS children -->
-<!ELEMENT PROPERTY EMPTY >
-<!ATTLIST PROPERTY
- NAME CDATA #REQUIRED
- VALUE CDATA #REQUIRED >
-
-<!-- RULES element -->
-<!ELEMENT RULES ( PROPS?, ( IMPORT | TERMINATE | SEQ | SEQ_REGEXP | SPAN
- | SPAN_REGEXP | EOL_SPAN | EOL_SPAN_REGEXP | MARK_PREVIOUS
- | MARK_FOLLOWING )*, KEYWORDS? ) >
-
-<!-- RULES attributes -->
-<!ATTLIST RULES
- SET CDATA #IMPLIED
- IGNORE_CASE %att-bool;
- HIGHLIGHT_DIGITS %att-bool;
- DIGIT_RE CDATA #IMPLIED
- ESCAPE CDATA #IMPLIED
- DEFAULT %tokens; #IMPLIED
- NO_WORD_SEP CDATA #IMPLIED >
-
-<!-- IMPORT element -->
-<!ELEMENT IMPORT EMPTY >
-<!ATTLIST IMPORT DELEGATE CDATA #REQUIRED >
-
-<!-- TERMINATE element -->
-<!ELEMENT TERMINATE EMPTY >
-<!ATTLIST TERMINATE AT_CHAR CDATA #REQUIRED >
-
-<!-- SEQ element -->
-<!ELEMENT SEQ ( #PCDATA ) >
-
-<!-- SEQ attributes -->
-<!ATTLIST SEQ
- %att-type;
- %att-position-mix;
- %att-delegate; >
-
-<!-- SEQ_REGEXP element -->
-<!ELEMENT SEQ_REGEXP ( #PCDATA ) >
-
-<!-- SEQ_REGEXP attributes -->
-<!ATTLIST SEQ_REGEXP
- %att-hash-char;
- %att-type;
- %att-position-mix;
- %att-delegate; >
-
-<!-- SPAN element -->
-<!ELEMENT SPAN ( BEGIN, END ) >
-
-<!-- SPAN attributes -->
-<!ATTLIST SPAN
- %att-type;
- %att-position-mix;
- %att-span-mix;
- %att-match-type;
- %att-delegate; >
-
-<!-- SPAN_REGEXP element -->
-<!ELEMENT SPAN_REGEXP ( BEGIN, END ) >
-
-<!-- SPAN_REGEXP attributes -->
-<!ATTLIST SPAN_REGEXP
- %att-hash-char;
- %att-type;
- %att-position-mix;
- %att-span-mix;
- %att-match-type;
- %att-delegate; >
-
-<!-- SPAN and SPAN_REGEXP children -->
-<!ELEMENT BEGIN ( #PCDATA ) >
-<!ATTLIST BEGIN %att-position-mix; >
-<!ELEMENT END ( #PCDATA ) >
-<!ATTLIST END %att-position-mix; >
-
-<!-- EOL_SPAN element -->
-<!ELEMENT EOL_SPAN ( #PCDATA ) >
-
-<!-- EOL_SPAN attributes -->
-<!ATTLIST EOL_SPAN
- %att-type;
- %att-position-mix;
- %att-match-type;
- %att-delegate; >
-
-<!-- EOL_SPAN_REGEXP element -->
-<!ELEMENT EOL_SPAN_REGEXP ( #PCDATA ) >
-
-<!-- EOL_SPAN_REGEXP attributes -->
-<!ATTLIST EOL_SPAN_REGEXP
- %att-hash-char;
- %att-type;
- %att-position-mix;
- %att-match-type;
- %att-delegate; >
-
-<!-- MARK_FOLLOWING element -->
-<!ELEMENT MARK_FOLLOWING ( #PCDATA ) >
-
-<!-- MARK_FOLLOWING attributes -->
-<!ATTLIST MARK_FOLLOWING
- %att-type;
- %att-position-mix;
- %att-match-type; >
-
-<!-- MARK_PREVIOUS element -->
-<!ELEMENT MARK_PREVIOUS ( #PCDATA ) >
-
-<!-- MARK_PREVIOUS attributes -->
-<!ATTLIST MARK_PREVIOUS
- %att-type;
- %att-position-mix;
- %att-match-type; >
-
-<!-- KEYWORDS element -->
-<!ELEMENT KEYWORDS (%tokens;)+ >
-
-<!-- KEYWORDS children -->
-<!ELEMENT COMMENT1 ( #PCDATA ) >
-<!ELEMENT COMMENT2 ( #PCDATA ) >
-<!ELEMENT COMMENT3 ( #PCDATA ) >
-<!ELEMENT COMMENT4 ( #PCDATA ) >
-<!ELEMENT DIGIT ( #PCDATA ) >
-<!ELEMENT FUNCTION ( #PCDATA ) >
-<!ELEMENT KEYWORD1 ( #PCDATA ) >
-<!ELEMENT KEYWORD2 ( #PCDATA ) >
-<!ELEMENT KEYWORD3 ( #PCDATA ) >
-<!ELEMENT KEYWORD4 ( #PCDATA ) >
-<!ELEMENT LABEL ( #PCDATA ) >
-<!ELEMENT LITERAL1 ( #PCDATA ) >
-<!ELEMENT LITERAL2 ( #PCDATA ) >
-<!ELEMENT LITERAL3 ( #PCDATA ) >
-<!ELEMENT LITERAL4 ( #PCDATA ) >
-<!ELEMENT MARKUP ( #PCDATA ) >
-<!ELEMENT NULL ( #PCDATA ) >
-<!ELEMENT OPERATOR ( #PCDATA ) >
-<!ELEMENT INVALID ( #PCDATA ) >
+<!-- Syntax tokens -->
+<!ENTITY % token_values "NULL | COMMENT1 | COMMENT2 | COMMENT3 | COMMENT4 |
+ DIGIT | FUNCTION | INVALID | KEYWORD1 | KEYWORD2 | KEYWORD3 | KEYWORD4 |
+ LABEL | LITERAL1 | LITERAL2 | LITERAL3 | LITERAL4 | MARKUP | OPERATOR" >
+<!ENTITY % tokens "( %token_values; )" >
+
+<!-- Entities for attributes shared by multiple rules -->
+<!ENTITY % att-bool '( TRUE | FALSE ) #IMPLIED' >
+<!ENTITY % att-type 'TYPE %tokens; #IMPLIED' >
+<!ENTITY % att-position-mix 'AT_LINE_START %att-bool;
+ AT_WHITESPACE_END %att-bool;
+ AT_WORD_START %att-bool; ' >
+<!ENTITY % att-match-type 'MATCH_TYPE ( %token_values; | CONTEXT | RULE ) #IMPLIED' >
+<!ENTITY % att-delegate 'DELEGATE CDATA #IMPLIED' >
+<!ENTITY % att-span-mix 'NO_LINE_BREAK %att-bool;
+ NO_WORD_BREAK %att-bool;
+ ESCAPE CDATA #IMPLIED '>
+<!ENTITY % att-hash-char 'HASH_CHAR CDATA #IMPLIED
+ HASH_CHARS CDATA #IMPLIED' >
+
+<!-- MODE element -->
+<!ELEMENT MODE ( PROPS?, RULES* ) >
+
+<!-- MODE children -->
+<!-- PROPS element -->
+<!ELEMENT PROPS ( PROPERTY+ ) >
+
+<!-- PROPS children -->
+<!ELEMENT PROPERTY EMPTY >
+<!ATTLIST PROPERTY
+ NAME CDATA #REQUIRED
+ VALUE CDATA #REQUIRED >
+
+<!-- RULES element -->
+<!ELEMENT RULES ( PROPS?, ( IMPORT | TERMINATE | SEQ | SEQ_REGEXP | SPAN
+ | SPAN_REGEXP | EOL_SPAN | EOL_SPAN_REGEXP | MARK_PREVIOUS
+ | MARK_FOLLOWING )*, KEYWORDS? ) >
+
+<!-- RULES attributes -->
+<!ATTLIST RULES
+ SET CDATA #IMPLIED
+ IGNORE_CASE %att-bool;
+ HIGHLIGHT_DIGITS %att-bool;
+ DIGIT_RE CDATA #IMPLIED
+ ESCAPE CDATA #IMPLIED
+ DEFAULT %tokens; #IMPLIED
+ NO_WORD_SEP CDATA #IMPLIED >
+
+<!-- IMPORT element -->
+<!ELEMENT IMPORT EMPTY >
+<!ATTLIST IMPORT DELEGATE CDATA #REQUIRED >
+
+<!-- TERMINATE element -->
+<!ELEMENT TERMINATE EMPTY >
+<!ATTLIST TERMINATE AT_CHAR CDATA #REQUIRED >
+
+<!-- SEQ element -->
+<!ELEMENT SEQ ( #PCDATA ) >
+
+<!-- SEQ attributes -->
+<!ATTLIST SEQ
+ %att-type;
+ %att-position-mix;
+ %att-delegate; >
+
+<!-- SEQ_REGEXP element -->
+<!ELEMENT SEQ_REGEXP ( #PCDATA ) >
+
+<!-- SEQ_REGEXP attributes -->
+<!ATTLIST SEQ_REGEXP
+ %att-hash-char;
+ %att-type;
+ %att-position-mix;
+ %att-delegate; >
+
+<!-- SPAN element -->
+<!ELEMENT SPAN ( BEGIN, END ) >
+
+<!-- SPAN attributes -->
+<!ATTLIST SPAN
+ %att-type;
+ %att-position-mix;
+ %att-span-mix;
+ %att-match-type;
+ %att-delegate; >
+
+<!-- SPAN_REGEXP element -->
+<!ELEMENT SPAN_REGEXP ( BEGIN, END ) >
+
+<!-- SPAN_REGEXP attributes -->
+<!ATTLIST SPAN_REGEXP
+ %att-hash-char;
+ %att-type;
+ %att-position-mix;
+ %att-span-mix;
+ %att-match-type;
+ %att-delegate; >
+
+<!-- SPAN and SPAN_REGEXP children -->
+<!ELEMENT BEGIN ( #PCDATA ) >
+<!ATTLIST BEGIN %att-position-mix; >
+<!ELEMENT END ( #PCDATA ) >
+<!ATTLIST END %att-position-mix; >
+
+<!-- EOL_SPAN element -->
+<!ELEMENT EOL_SPAN ( #PCDATA ) >
+
+<!-- EOL_SPAN attributes -->
+<!ATTLIST EOL_SPAN
+ %att-type;
+ %att-position-mix;
+ %att-match-type;
+ %att-delegate; >
+
+<!-- EOL_SPAN_REGEXP element -->
+<!ELEMENT EOL_SPAN_REGEXP ( #PCDATA ) >
+
+<!-- EOL_SPAN_REGEXP attributes -->
+<!ATTLIST EOL_SPAN_REGEXP
+ %att-hash-char;
+ %att-type;
+ %att-position-mix;
+ %att-match-type;
+ %att-delegate; >
+
+<!-- MARK_FOLLOWING element -->
+<!ELEMENT MARK_FOLLOWING ( #PCDATA ) >
+
+<!-- MARK_FOLLOWING attributes -->
+<!ATTLIST MARK_FOLLOWING
+ %att-type;
+ %att-position-mix;
+ %att-match-type; >
+
+<!-- MARK_PREVIOUS element -->
+<!ELEMENT MARK_PREVIOUS ( #PCDATA ) >
+
+<!-- MARK_PREVIOUS attributes -->
+<!ATTLIST MARK_PREVIOUS
+ %att-type;
+ %att-position-mix;
+ %att-match-type; >
+
+<!-- KEYWORDS element -->
+<!ELEMENT KEYWORDS (%tokens;)+ >
+
+<!-- KEYWORDS children -->
+<!ELEMENT COMMENT1 ( #PCDATA ) >
+<!ELEMENT COMMENT2 ( #PCDATA ) >
+<!ELEMENT COMMENT3 ( #PCDATA ) >
+<!ELEMENT COMMENT4 ( #PCDATA ) >
+<!ELEMENT DIGIT ( #PCDATA ) >
+<!ELEMENT FUNCTION ( #PCDATA ) >
+<!ELEMENT KEYWORD1 ( #PCDATA ) >
+<!ELEMENT KEYWORD2 ( #PCDATA ) >
+<!ELEMENT KEYWORD3 ( #PCDATA ) >
+<!ELEMENT KEYWORD4 ( #PCDATA ) >
+<!ELEMENT LABEL ( #PCDATA ) >
+<!ELEMENT LITERAL1 ( #PCDATA ) >
+<!ELEMENT LITERAL2 ( #PCDATA ) >
+<!ELEMENT LITERAL3 ( #PCDATA ) >
+<!ELEMENT LITERAL4 ( #PCDATA ) >
+<!ELEMENT MARKUP ( #PCDATA ) >
+<!ELEMENT NULL ( #PCDATA ) >
+<!ELEMENT OPERATOR ( #PCDATA ) >
+<!ELEMENT INVALID ( #PCDATA ) >
diff --git a/jEdit/org/gjt/sp/jedit/textarea/Anchor.java b/jEdit/org/gjt/sp/jedit/textarea/Anchor.java
index 10db21a..c65748a 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/Anchor.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/Anchor.java
@@ -1,155 +1,155 @@
-/*
- * Anchor.java - A base point for physical line <-> screen line conversion
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.util.Log;
-
-/**
- * A base point for physical line/screen line conversion.
- * @author Slava Pestov
- * @version $Id: Anchor.java 15570 2009-06-25 00:43:57Z ezust $
- */
-abstract class Anchor
-{
- protected final DisplayManager displayManager;
- protected final TextArea textArea;
- /** The physical line. */
- int physicalLine;
- /**
- * The visible line index. (from the top of the buffer). It can be different from physical line
- * when using soft wrap.
- */
- int scrollLine;
- /**
- * If this is set to true, the changed() method will be called in
- * {@link DisplayManager#notifyScreenLineChanges()}
- */
- boolean callChanged;
- /**
- * If this is set to true, the reset() method will be called in
- * {@link DisplayManager#notifyScreenLineChanges()}
- */
- boolean callReset;
-
- //{{{ Anchor constructor
- protected Anchor(DisplayManager displayManager,
- TextArea textArea)
- {
- this.displayManager = displayManager;
- this.textArea = textArea;
- } //}}}
-
- /** This method recalculates the scrollLine from the beginning. */
- abstract void reset();
- abstract void changed();
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- return getClass().getName() + '[' + physicalLine + ','
- + scrollLine + ']';
- } //}}}
-
- //{{{ contentInserted() method
- /**
- * Some content is inserted.
- *
- * @param startLine the start of the insert
- * @param numLines the number of insterted lines
- */
- void contentInserted(int startLine, int numLines)
- {
- // The Anchor is changed only if the content was inserted before
- if(physicalLine >= startLine)
- {
- if(physicalLine != startLine)
- physicalLine += numLines;
- callChanged = true;
- }
- } //}}}
-
- //{{{ preContentRemoved() method
- /**
- * Method called before a content is removed from a buffer.
- *
- * @param startLine the first line of the removed content
- * @param offset the offset in the start line
- * @param numLines the number of removed lines
- */
- void preContentRemoved(int startLine, int offset, int numLines)
- {
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"preContentRemoved() before:" + this);
- // The removed content starts before the Anchor, we need to pull the anchor up
- if(physicalLine >= startLine)
- {
- if(physicalLine == startLine)
- callChanged = true;
- else
- {
- int end = Math.min(startLine + numLines, physicalLine);
- //Check the lines from the beginning of the removed content to the end (or the physical
- //line of the Anchor if it is before the end of the removed content
-
- //int loopStart = startLine + 1;
-
- //{{{ treatment if the beginning of the deleted content is inside a physical line that has several line counts
- /*if (displayManager.isLineVisible(startLine))
- {
- int screenLineCount = displayManager.screenLineMgr.getScreenLineCount(startLine);
- if (screenLineCount > 1)
- {
- int lineStartOffset = textArea.getLineStartOffset(startLine);
-
- int startScreenLine = textArea.getScreenLineOfOffset(lineStartOffset);
- int deleteStartScreenLine = textArea.getScreenLineOfOffset(offset);
- if (startScreenLine != deleteStartScreenLine)
- {
- loopStart = startLine + 2;
- scrollLine -= screenLineCount - deleteStartScreenLine + startScreenLine;
- }
- }
- }*/
- //}}}
-
- for(int i = startLine + 1; i <= end; i++)
- {
- //XXX
- if(displayManager.isLineVisible(i))
- {
- scrollLine -=
- displayManager
- .screenLineMgr
- .getScreenLineCount(i);
- }
- }
- physicalLine -= end - startLine;
- callChanged = true;
- }
- }
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"preContentRemoved() after:" + this);
- } //}}}
-}
+/*
+ * Anchor.java - A base point for physical line <-> screen line conversion
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.util.Log;
+
+/**
+ * A base point for physical line/screen line conversion.
+ * @author Slava Pestov
+ * @version $Id: Anchor.java 15570 2009-06-25 00:43:57Z ezust $
+ */
+abstract class Anchor
+{
+ protected final DisplayManager displayManager;
+ protected final TextArea textArea;
+ /** The physical line. */
+ int physicalLine;
+ /**
+ * The visible line index. (from the top of the buffer). It can be different from physical line
+ * when using soft wrap.
+ */
+ int scrollLine;
+ /**
+ * If this is set to true, the changed() method will be called in
+ * {@link DisplayManager#notifyScreenLineChanges()}
+ */
+ boolean callChanged;
+ /**
+ * If this is set to true, the reset() method will be called in
+ * {@link DisplayManager#notifyScreenLineChanges()}
+ */
+ boolean callReset;
+
+ //{{{ Anchor constructor
+ protected Anchor(DisplayManager displayManager,
+ TextArea textArea)
+ {
+ this.displayManager = displayManager;
+ this.textArea = textArea;
+ } //}}}
+
+ /** This method recalculates the scrollLine from the beginning. */
+ abstract void reset();
+ abstract void changed();
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ return getClass().getName() + '[' + physicalLine + ','
+ + scrollLine + ']';
+ } //}}}
+
+ //{{{ contentInserted() method
+ /**
+ * Some content is inserted.
+ *
+ * @param startLine the start of the insert
+ * @param numLines the number of insterted lines
+ */
+ void contentInserted(int startLine, int numLines)
+ {
+ // The Anchor is changed only if the content was inserted before
+ if(physicalLine >= startLine)
+ {
+ if(physicalLine != startLine)
+ physicalLine += numLines;
+ callChanged = true;
+ }
+ } //}}}
+
+ //{{{ preContentRemoved() method
+ /**
+ * Method called before a content is removed from a buffer.
+ *
+ * @param startLine the first line of the removed content
+ * @param offset the offset in the start line
+ * @param numLines the number of removed lines
+ */
+ void preContentRemoved(int startLine, int offset, int numLines)
+ {
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"preContentRemoved() before:" + this);
+ // The removed content starts before the Anchor, we need to pull the anchor up
+ if(physicalLine >= startLine)
+ {
+ if(physicalLine == startLine)
+ callChanged = true;
+ else
+ {
+ int end = Math.min(startLine + numLines, physicalLine);
+ //Check the lines from the beginning of the removed content to the end (or the physical
+ //line of the Anchor if it is before the end of the removed content
+
+ //int loopStart = startLine + 1;
+
+ //{{{ treatment if the beginning of the deleted content is inside a physical line that has several line counts
+ /*if (displayManager.isLineVisible(startLine))
+ {
+ int screenLineCount = displayManager.screenLineMgr.getScreenLineCount(startLine);
+ if (screenLineCount > 1)
+ {
+ int lineStartOffset = textArea.getLineStartOffset(startLine);
+
+ int startScreenLine = textArea.getScreenLineOfOffset(lineStartOffset);
+ int deleteStartScreenLine = textArea.getScreenLineOfOffset(offset);
+ if (startScreenLine != deleteStartScreenLine)
+ {
+ loopStart = startLine + 2;
+ scrollLine -= screenLineCount - deleteStartScreenLine + startScreenLine;
+ }
+ }
+ }*/
+ //}}}
+
+ for(int i = startLine + 1; i <= end; i++)
+ {
+ //XXX
+ if(displayManager.isLineVisible(i))
+ {
+ scrollLine -=
+ displayManager
+ .screenLineMgr
+ .getScreenLineCount(i);
+ }
+ }
+ physicalLine -= end - startLine;
+ callChanged = true;
+ }
+ }
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"preContentRemoved() after:" + this);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/AntiAlias.java b/jEdit/org/gjt/sp/jedit/textarea/AntiAlias.java
index d9d264c..b62b40c 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/AntiAlias.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/AntiAlias.java
@@ -1,89 +1,89 @@
-/*
- * AntiAlias.java - a small helper class for AntiAlias settings.
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Alan Ezust
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.textarea;
-
-/**
- * Class for representing AntiAlias values. The following modes are supported:
- * none standard lcd subpixel (JDK 1.6 only)
- *
- * @author ezust
- * @since jedit 4.3pre4
- */
-public class AntiAlias extends Object
-{
- public static final Object NONE = "none";
-
- public static final Object STANDARD = "standard";
-
- public static final Object SUBPIXEL = "subpixel";
-
- public static final Object comboChoices[] = new Object[] { NONE, STANDARD, SUBPIXEL };
-
- public void set(int newValue)
- {
- m_val = newValue;
- }
-
- public AntiAlias(boolean isEnabled)
- {
- m_val = isEnabled ? 1 : 0;
- }
-
- public AntiAlias(int val)
- {
- m_val = val;
- }
-
- public AntiAlias(String v)
- {
- fromString(v);
- }
-
- public boolean equals(Object other)
- {
- return toString().equals(other.toString());
-
- }
-
- public void fromString(String v)
- {
- for (int i = 0; i < comboChoices.length; ++i)
- {
- if (comboChoices[i].equals(v))
- {
- m_val = i;
- }
- }
- }
-
- public String toString()
- {
- return comboChoices[m_val].toString();
- }
-
- public int val()
- {
- return m_val;
- }
-
- private int m_val = 0;
-}
+/*
+ * AntiAlias.java - a small helper class for AntiAlias settings.
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Alan Ezust
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.textarea;
+
+/**
+ * Class for representing AntiAlias values. The following modes are supported:
+ * none standard lcd subpixel (JDK 1.6 only)
+ *
+ * @author ezust
+ * @since jedit 4.3pre4
+ */
+public class AntiAlias
+{
+ public static final Object NONE = "none";
+
+ public static final Object STANDARD = "standard";
+
+ public static final Object SUBPIXEL = "subpixel";
+
+ public static final Object[] comboChoices = { NONE, STANDARD, SUBPIXEL };
+
+ public void set(int newValue)
+ {
+ m_val = newValue;
+ }
+
+ public AntiAlias(boolean isEnabled)
+ {
+ m_val = isEnabled ? 1 : 0;
+ }
+
+ public AntiAlias(int val)
+ {
+ m_val = val;
+ }
+
+ public AntiAlias(String v)
+ {
+ fromString(v);
+ }
+
+ public boolean equals(Object other)
+ {
+ return toString().equals(other.toString());
+
+ }
+
+ public void fromString(String v)
+ {
+ for (int i = 0; i < comboChoices.length; ++i)
+ {
+ if (comboChoices[i].equals(v))
+ {
+ m_val = i;
+ }
+ }
+ }
+
+ public String toString()
+ {
+ return comboChoices[m_val].toString();
+ }
+
+ public int val()
+ {
+ return m_val;
+ }
+
+ private int m_val;
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/BufferHandler.java b/jEdit/org/gjt/sp/jedit/textarea/BufferHandler.java
index 55f5c7a..cac09f0 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/BufferHandler.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/BufferHandler.java
@@ -1,457 +1,457 @@
-/*
- * BufferHandler.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-import java.util.Iterator;
-import org.gjt.sp.jedit.buffer.*;
-import org.gjt.sp.jedit.Debug;
-
-/**
- * Note that in this class we take great care to defer complicated
- * calculations to the end of the current transaction if the buffer
- * informs us a compound edit is in progress
- * (<code>isTransactionInProgress()</code>).
- *
- * This greatly speeds up replace all for example, by only doing certain
- * things once, particularly in <code>moveCaretPosition()</code>.
- *
- * Try doing a replace all in a large file, for example. It is very slow
- * in 3.2, faster in 4.0 (where the transaction optimization was
- * introduced) and faster still in 4.1 (where it was further improved).
- *
- * There is still work to do; see TODO.txt.
- */
-class BufferHandler implements BufferListener
-{
- private final DisplayManager displayManager;
- private final TextArea textArea;
- private final JEditBuffer buffer;
- private boolean delayedUpdate;
- private boolean delayedMultilineUpdate;
- private int delayedUpdateStart;
- private int delayedUpdateEnd;
-
- //{{{ BufferChangeHandler constructor
- BufferHandler(DisplayManager displayManager,
- TextArea textArea,
- JEditBuffer buffer)
- {
- this.displayManager = displayManager;
- this.textArea = textArea;
- this.buffer = buffer;
- } //}}}
-
- //{{{ bufferLoaded() method
- public void bufferLoaded(JEditBuffer buffer)
- {
- displayManager.bufferLoaded();
- } //}}}
-
- //{{{ foldHandlerChanged() method
- public void foldHandlerChanged(JEditBuffer buffer)
- {
- displayManager.foldHandlerChanged();
- } //}}}
-
- //{{{ foldLevelChanged() method
- public void foldLevelChanged(JEditBuffer buffer, int start, int end)
- {
- //System.err.println("foldLevelChanged " + (start-1) + " to " + textArea.getLastPhysicalLine() + "," + end);
-
- if(textArea.getDisplayManager() == displayManager
- && end != 0 && !buffer.isLoading())
- {
- textArea.invalidateLineRange(start - 1,
- textArea.getLastPhysicalLine());
- }
- } //}}}
-
- //{{{ contentInserted() method
- public void contentInserted(JEditBuffer buffer, int startLine,
- int offset, int numLines, int length)
- {
- if(buffer.isLoading())
- return;
-
- displayManager.screenLineMgr.contentInserted(startLine,numLines);
-
- int endLine = startLine + numLines;
-
- if(numLines != 0)
- delayedMultilineUpdate = true;
-
- displayManager.folds.contentInserted(startLine,numLines);
-
- FirstLine firstLine = displayManager.firstLine;
- ScrollLineCount scrollLineCount = displayManager.scrollLineCount;
-
- if(textArea.getDisplayManager() == displayManager)
- {
- if(numLines != 0)
- {
- firstLine.contentInserted(startLine,numLines);
- scrollLineCount.contentInserted(startLine,numLines);
- }
-
- if(delayedUpdateEnd >= startLine)
- delayedUpdateEnd += numLines;
- delayUpdate(startLine,endLine);
-
- //{{{ resize selections if necessary
-
- Iterator<Selection> iter = textArea.getSelectionIterator();
- while(iter.hasNext())
- {
- Selection s = iter.next();
-
- if(s.contentInserted(buffer,startLine,offset,
- numLines,length))
- {
- delayUpdate(s.startLine,s.endLine);
- }
- } //}}}
-
- int caret = textArea.getCaretPosition();
- if(caret >= offset)
- {
- int scrollMode = textArea.caretAutoScroll()
- ? TextArea.ELECTRIC_SCROLL
- : TextArea.NO_SCROLL;
- textArea.moveCaretPosition(
- caret + length,scrollMode);
- }
- else
- {
- int scrollMode = textArea.caretAutoScroll()
- ? TextArea.NORMAL_SCROLL
- : TextArea.NO_SCROLL;
- textArea.moveCaretPosition(
- caret,scrollMode);
- }
- }
- else
- {
- firstLine.callReset = true;
- scrollLineCount.callReset = true;
- }
- } //}}}
-
- //{{{ preContentInserted() method
- /**
- * Called when text is about to be inserted in the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @since jEdit 4.3pre11
- */
- public void preContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
- {
- if(textArea.getDisplayManager() == displayManager)
- {
- getReadyToBreakFold(startLine);
- }
- } //}}}
-
- //{{{ preContentRemoved() method
- /**
- * Called when text is about to be removed from the buffer, but is
- * still present.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param offset The start offset, from the beginning of the buffer
- * @param numLines The number of lines to be removed
- * @param length The number of characters to be removed
- * @since jEdit 4.3pre3
- */
- public void preContentRemoved(JEditBuffer buffer, int startLine,
- int offset, int numLines, int length)
- {
- if(buffer.isLoading())
- return;
-
- FirstLine firstLine = displayManager.firstLine;
- ScrollLineCount scrollLineCount = displayManager.scrollLineCount;
-
- if(textArea.getDisplayManager() == displayManager)
- {
- if(numLines == 0)
- {
- getReadyToBreakFold(startLine);
- }
- else
- {
- int lastLine = startLine + numLines;
- if(!displayManager.isLineVisible(startLine)
- || !displayManager.isLineVisible(lastLine)
- || offset != buffer.getLineStartOffset(startLine)
- || offset + length != buffer.getLineStartOffset(lastLine))
- {
- getReadyToBreakFold(startLine);
- getReadyToBreakFold(lastLine);
- }
- else
- {
- // The removal will not touch
- // inside of folds and wll not
- // modify any remaining lines.
- }
- }
-
- if(numLines != 0)
- {
- firstLine.preContentRemoved(startLine,offset, numLines);
- scrollLineCount.preContentRemoved(startLine, offset, numLines);
- }
-
- if(delayedUpdateEnd >= startLine)
- delayedUpdateEnd -= numLines;
- delayUpdate(startLine,startLine);
- }
- else
- {
- firstLine.callReset = true;
- scrollLineCount.callReset = true;
- }
-
- displayManager.screenLineMgr.contentRemoved(startLine,numLines);
-
- if(numLines == 0)
- return;
-
- delayedMultilineUpdate = true;
-
- if(displayManager.folds.preContentRemoved(startLine,numLines))
- {
- displayManager.folds.reset(buffer.getLineCount());
- firstLine.callReset = true;
- scrollLineCount.callReset = true;
- }
-
- if(firstLine.physicalLine
- > displayManager.getLastVisibleLine()
- || firstLine.physicalLine
- < displayManager.getFirstVisibleLine())
- {
- // will be handled later.
- // see comments at the end of
- // transactionComplete().
- }
- // very subtle... if we leave this for
- // ensurePhysicalLineIsVisible(), an
- // extra line will be added to the
- // scroll line count.
- else if(!displayManager.isLineVisible(
- firstLine.physicalLine))
- {
- firstLine.physicalLine =
- displayManager.getNextVisibleLine(
- firstLine.physicalLine);
- }
- } //}}}
-
- //{{{ contentRemoved() method
- public void contentRemoved(JEditBuffer buffer, int startLine,
- int start, int numLines, int length)
- {
- if(buffer.isLoading())
- return;
-
- if(textArea.getDisplayManager() == displayManager)
- {
- //{{{ resize selections if necessary
- int nSel = textArea.getSelectionCount();
- Iterator<Selection> iter = textArea.getSelectionIterator();
- while(iter.hasNext())
- {
- Selection s = iter.next();
-
- if(s.contentRemoved(buffer,startLine,
- start,numLines,length))
- {
- delayUpdate(s.startLine,s.endLine);
- if(nSel == 1 && s.start == s.end)
- iter.remove();
- }
- } //}}}
-
- int caret = textArea.getCaretPosition();
-
- if(caret >= start + length)
- {
- int scrollMode = textArea.caretAutoScroll()
- ? TextArea.ELECTRIC_SCROLL
- : TextArea.NO_SCROLL;
- textArea.moveCaretPosition(
- caret - length,
- scrollMode);
- }
- else if(caret >= start)
- {
- int scrollMode = textArea.caretAutoScroll()
- ? TextArea.ELECTRIC_SCROLL
- : TextArea.NO_SCROLL;
- textArea.moveCaretPosition(
- start,scrollMode);
- }
- else
- {
- int scrollMode = textArea.caretAutoScroll()
- ? TextArea.NORMAL_SCROLL
- : TextArea.NO_SCROLL;
- textArea.moveCaretPosition(caret,scrollMode);
- }
- }
- }
- //}}}
-
- //{{{ transactionComplete() method
- public void transactionComplete(JEditBuffer buffer)
- {
- if(textArea.getDisplayManager() != displayManager)
- {
- delayedUpdate = false;
- return;
- }
-
- if(delayedUpdate)
- doDelayedUpdate();
-
- textArea._finishCaretUpdate();
-
- delayedUpdate = false;
-
- //{{{ Debug code
- if(Debug.SCROLL_VERIFY)
- {
- int line = delayedUpdateStart;
- if(!displayManager.isLineVisible(line))
- line = displayManager.getNextVisibleLine(line);
- System.err.println(delayedUpdateStart + ":" + delayedUpdateEnd + ':' + textArea.getLineCount());
- int scrollLineCount = 0;
- while(line != -1 && line <= delayedUpdateEnd)
- {
- scrollLineCount += displayManager.getScreenLineCount(line);
- line = displayManager.getNextVisibleLine(line);
- }
-
- if(scrollLineCount != displayManager.getScrollLineCount())
- {
- throw new InternalError(scrollLineCount
- + " != "
- + displayManager.getScrollLineCount());
- }
- } //}}}
- } //}}}
-
- //{{{ doDelayedUpdate() method
- private void doDelayedUpdate()
- {
- // must update screen line counts before we call
- // notifyScreenLineChanges() since that calls
- // updateScrollBar() which needs valid info
- int line = delayedUpdateStart;
- if(!displayManager.isLineVisible(line))
- line = displayManager.getNextVisibleLine(line);
- while(line != -1 && line <= delayedUpdateEnd)
- {
- displayManager.updateScreenLineCount(line);
- line = displayManager.getNextVisibleLine(line);
- }
-
- // must be before the below call
- // so that the chunk cache is not
- // updated with an invisible first
- // line (see above)
- displayManager.notifyScreenLineChanges();
-
- if(delayedMultilineUpdate)
- {
- textArea.invalidateScreenLineRange(
- textArea.chunkCache
- .getScreenLineOfOffset(
- delayedUpdateStart,0),
- textArea.getVisibleLines());
- delayedMultilineUpdate = false;
- }
- else
- {
- textArea.invalidateLineRange(
- delayedUpdateStart,
- delayedUpdateEnd);
- }
-
- // update visible lines
- int visibleLines = textArea.getVisibleLines();
- if(visibleLines != 0)
- {
- textArea.chunkCache.getLineInfo(
- visibleLines - 1);
- }
-
- // force the fold levels to be
- // updated.
-
- // when painting the last line of
- // a buffer, Buffer.isFoldStart()
- // doesn't call getFoldLevel(),
- // hence the foldLevelChanged()
- // event might not be sent for the
- // previous line.
-
- buffer.getFoldLevel(delayedUpdateEnd);
- } //}}}
-
- //{{{ delayUpdate() method
- private void delayUpdate(int startLine, int endLine)
- {
- textArea.chunkCache.invalidateChunksFromPhys(startLine);
-
- if(!delayedUpdate)
- {
- delayedUpdateStart = startLine;
- delayedUpdateEnd = endLine;
- delayedUpdate = true;
- }
- else
- {
- delayedUpdateStart = Math.min(
- delayedUpdateStart,
- startLine);
- delayedUpdateEnd = Math.max(
- delayedUpdateEnd,
- endLine);
- }
- } //}}}
-
- //{{{ getReadyToBreakFold() method
- // This is a fix for black hole bug.
- // If you modify a part of folded lines, like {{{ (followed by }}}),
- // the fold is removed so it must be expanded otherwise the text
- // remains invisible.
- private void getReadyToBreakFold(int line)
- {
- displayManager.expandFold(line, false);
- } //}}}
-}
+/*
+ * BufferHandler.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+import java.util.Iterator;
+import org.gjt.sp.jedit.buffer.*;
+import org.gjt.sp.jedit.Debug;
+
+/**
+ * Note that in this class we take great care to defer complicated
+ * calculations to the end of the current transaction if the buffer
+ * informs us a compound edit is in progress
+ * (<code>isTransactionInProgress()</code>).
+ *
+ * This greatly speeds up replace all for example, by only doing certain
+ * things once, particularly in <code>moveCaretPosition()</code>.
+ *
+ * Try doing a replace all in a large file, for example. It is very slow
+ * in 3.2, faster in 4.0 (where the transaction optimization was
+ * introduced) and faster still in 4.1 (where it was further improved).
+ *
+ * There is still work to do; see TODO.txt.
+ */
+class BufferHandler implements BufferListener
+{
+ private final DisplayManager displayManager;
+ private final TextArea textArea;
+ private final JEditBuffer buffer;
+ private boolean delayedUpdate;
+ private boolean delayedMultilineUpdate;
+ private int delayedUpdateStart;
+ private int delayedUpdateEnd;
+
+ //{{{ BufferChangeHandler constructor
+ BufferHandler(DisplayManager displayManager,
+ TextArea textArea,
+ JEditBuffer buffer)
+ {
+ this.displayManager = displayManager;
+ this.textArea = textArea;
+ this.buffer = buffer;
+ } //}}}
+
+ //{{{ bufferLoaded() method
+ public void bufferLoaded(JEditBuffer buffer)
+ {
+ displayManager.bufferLoaded();
+ } //}}}
+
+ //{{{ foldHandlerChanged() method
+ public void foldHandlerChanged(JEditBuffer buffer)
+ {
+ displayManager.foldHandlerChanged();
+ } //}}}
+
+ //{{{ foldLevelChanged() method
+ public void foldLevelChanged(JEditBuffer buffer, int start, int end)
+ {
+ //System.err.println("foldLevelChanged " + (start-1) + " to " + textArea.getLastPhysicalLine() + "," + end);
+
+ if(textArea.getDisplayManager() == displayManager
+ && end != 0 && !buffer.isLoading())
+ {
+ textArea.invalidateLineRange(start - 1,
+ textArea.getLastPhysicalLine());
+ }
+ } //}}}
+
+ //{{{ contentInserted() method
+ public void contentInserted(JEditBuffer buffer, int startLine,
+ int offset, int numLines, int length)
+ {
+ if(buffer.isLoading())
+ return;
+
+ displayManager.screenLineMgr.contentInserted(startLine,numLines);
+
+ int endLine = startLine + numLines;
+
+ if(numLines != 0)
+ delayedMultilineUpdate = true;
+
+ displayManager.folds.contentInserted(startLine,numLines);
+
+ FirstLine firstLine = displayManager.firstLine;
+ ScrollLineCount scrollLineCount = displayManager.scrollLineCount;
+
+ if(textArea.getDisplayManager() == displayManager)
+ {
+ if(numLines != 0)
+ {
+ firstLine.contentInserted(startLine,numLines);
+ scrollLineCount.contentInserted(startLine,numLines);
+ }
+
+ if(delayedUpdateEnd >= startLine)
+ delayedUpdateEnd += numLines;
+ delayUpdate(startLine,endLine);
+
+ //{{{ resize selections if necessary
+
+ Iterator<Selection> iter = textArea.getSelectionIterator();
+ while(iter.hasNext())
+ {
+ Selection s = iter.next();
+
+ if(s.contentInserted(buffer,startLine,offset,
+ numLines,length))
+ {
+ delayUpdate(s.startLine,s.endLine);
+ }
+ } //}}}
+
+ int caret = textArea.getCaretPosition();
+ if(caret >= offset)
+ {
+ int scrollMode = textArea.caretAutoScroll()
+ ? TextArea.ELECTRIC_SCROLL
+ : TextArea.NO_SCROLL;
+ textArea.moveCaretPosition(
+ caret + length,scrollMode);
+ }
+ else
+ {
+ int scrollMode = textArea.caretAutoScroll()
+ ? TextArea.NORMAL_SCROLL
+ : TextArea.NO_SCROLL;
+ textArea.moveCaretPosition(
+ caret,scrollMode);
+ }
+ }
+ else
+ {
+ firstLine.callReset = true;
+ scrollLineCount.callReset = true;
+ }
+ } //}}}
+
+ //{{{ preContentInserted() method
+ /**
+ * Called when text is about to be inserted in the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @since jEdit 4.3pre11
+ */
+ public void preContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
+ {
+ if(textArea.getDisplayManager() == displayManager)
+ {
+ getReadyToBreakFold(startLine);
+ }
+ } //}}}
+
+ //{{{ preContentRemoved() method
+ /**
+ * Called when text is about to be removed from the buffer, but is
+ * still present.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param offset The start offset, from the beginning of the buffer
+ * @param numLines The number of lines to be removed
+ * @param length The number of characters to be removed
+ * @since jEdit 4.3pre3
+ */
+ public void preContentRemoved(JEditBuffer buffer, int startLine,
+ int offset, int numLines, int length)
+ {
+ if(buffer.isLoading())
+ return;
+
+ FirstLine firstLine = displayManager.firstLine;
+ ScrollLineCount scrollLineCount = displayManager.scrollLineCount;
+
+ if(textArea.getDisplayManager() == displayManager)
+ {
+ if(numLines == 0)
+ {
+ getReadyToBreakFold(startLine);
+ }
+ else
+ {
+ int lastLine = startLine + numLines;
+ if(!displayManager.isLineVisible(startLine)
+ || !displayManager.isLineVisible(lastLine)
+ || offset != buffer.getLineStartOffset(startLine)
+ || offset + length != buffer.getLineStartOffset(lastLine))
+ {
+ getReadyToBreakFold(startLine);
+ getReadyToBreakFold(lastLine);
+ }
+ else
+ {
+ // The removal will not touch
+ // inside of folds and wll not
+ // modify any remaining lines.
+ }
+ }
+
+ if(numLines != 0)
+ {
+ firstLine.preContentRemoved(startLine,offset, numLines);
+ scrollLineCount.preContentRemoved(startLine, offset, numLines);
+ }
+
+ if(delayedUpdateEnd >= startLine)
+ delayedUpdateEnd -= numLines;
+ delayUpdate(startLine,startLine);
+ }
+ else
+ {
+ firstLine.callReset = true;
+ scrollLineCount.callReset = true;
+ }
+
+ displayManager.screenLineMgr.contentRemoved(startLine,numLines);
+
+ if(numLines == 0)
+ return;
+
+ delayedMultilineUpdate = true;
+
+ if(displayManager.folds.preContentRemoved(startLine,numLines))
+ {
+ displayManager.folds.reset(buffer.getLineCount());
+ firstLine.callReset = true;
+ scrollLineCount.callReset = true;
+ }
+
+ if(firstLine.physicalLine
+ > displayManager.getLastVisibleLine()
+ || firstLine.physicalLine
+ < displayManager.getFirstVisibleLine())
+ {
+ // will be handled later.
+ // see comments at the end of
+ // transactionComplete().
+ }
+ // very subtle... if we leave this for
+ // ensurePhysicalLineIsVisible(), an
+ // extra line will be added to the
+ // scroll line count.
+ else if(!displayManager.isLineVisible(
+ firstLine.physicalLine))
+ {
+ firstLine.physicalLine =
+ displayManager.getNextVisibleLine(
+ firstLine.physicalLine);
+ }
+ } //}}}
+
+ //{{{ contentRemoved() method
+ public void contentRemoved(JEditBuffer buffer, int startLine,
+ int start, int numLines, int length)
+ {
+ if(buffer.isLoading())
+ return;
+
+ if(textArea.getDisplayManager() == displayManager)
+ {
+ //{{{ resize selections if necessary
+ int nSel = textArea.getSelectionCount();
+ Iterator<Selection> iter = textArea.getSelectionIterator();
+ while(iter.hasNext())
+ {
+ Selection s = iter.next();
+
+ if(s.contentRemoved(buffer,startLine,
+ start,numLines,length))
+ {
+ delayUpdate(s.startLine,s.endLine);
+ if(nSel == 1 && s.start == s.end)
+ iter.remove();
+ }
+ } //}}}
+
+ int caret = textArea.getCaretPosition();
+
+ if(caret >= start + length)
+ {
+ int scrollMode = textArea.caretAutoScroll()
+ ? TextArea.ELECTRIC_SCROLL
+ : TextArea.NO_SCROLL;
+ textArea.moveCaretPosition(
+ caret - length,
+ scrollMode);
+ }
+ else if(caret >= start)
+ {
+ int scrollMode = textArea.caretAutoScroll()
+ ? TextArea.ELECTRIC_SCROLL
+ : TextArea.NO_SCROLL;
+ textArea.moveCaretPosition(
+ start,scrollMode);
+ }
+ else
+ {
+ int scrollMode = textArea.caretAutoScroll()
+ ? TextArea.NORMAL_SCROLL
+ : TextArea.NO_SCROLL;
+ textArea.moveCaretPosition(caret,scrollMode);
+ }
+ }
+ }
+ //}}}
+
+ //{{{ transactionComplete() method
+ public void transactionComplete(JEditBuffer buffer)
+ {
+ if(textArea.getDisplayManager() != displayManager)
+ {
+ delayedUpdate = false;
+ return;
+ }
+
+ if(delayedUpdate)
+ doDelayedUpdate();
+
+ textArea._finishCaretUpdate();
+
+ delayedUpdate = false;
+
+ //{{{ Debug code
+ if(Debug.SCROLL_VERIFY)
+ {
+ int line = delayedUpdateStart;
+ if(!displayManager.isLineVisible(line))
+ line = displayManager.getNextVisibleLine(line);
+ System.err.println(delayedUpdateStart + ":" + delayedUpdateEnd + ':' + textArea.getLineCount());
+ int scrollLineCount = 0;
+ while(line != -1 && line <= delayedUpdateEnd)
+ {
+ scrollLineCount += displayManager.getScreenLineCount(line);
+ line = displayManager.getNextVisibleLine(line);
+ }
+
+ if(scrollLineCount != displayManager.getScrollLineCount())
+ {
+ throw new InternalError(scrollLineCount
+ + " != "
+ + displayManager.getScrollLineCount());
+ }
+ } //}}}
+ } //}}}
+
+ //{{{ doDelayedUpdate() method
+ private void doDelayedUpdate()
+ {
+ // must update screen line counts before we call
+ // notifyScreenLineChanges() since that calls
+ // updateScrollBar() which needs valid info
+ int line = delayedUpdateStart;
+ if(!displayManager.isLineVisible(line))
+ line = displayManager.getNextVisibleLine(line);
+ while(line != -1 && line <= delayedUpdateEnd)
+ {
+ displayManager.updateScreenLineCount(line);
+ line = displayManager.getNextVisibleLine(line);
+ }
+
+ // must be before the below call
+ // so that the chunk cache is not
+ // updated with an invisible first
+ // line (see above)
+ displayManager.notifyScreenLineChanges();
+
+ if(delayedMultilineUpdate)
+ {
+ textArea.invalidateScreenLineRange(
+ textArea.chunkCache
+ .getScreenLineOfOffset(
+ delayedUpdateStart,0),
+ textArea.getVisibleLines());
+ delayedMultilineUpdate = false;
+ }
+ else
+ {
+ textArea.invalidateLineRange(
+ delayedUpdateStart,
+ delayedUpdateEnd);
+ }
+
+ // update visible lines
+ int visibleLines = textArea.getVisibleLines();
+ if(visibleLines != 0)
+ {
+ textArea.chunkCache.getLineInfo(
+ visibleLines - 1);
+ }
+
+ // force the fold levels to be
+ // updated.
+
+ // when painting the last line of
+ // a buffer, Buffer.isFoldStart()
+ // doesn't call getFoldLevel(),
+ // hence the foldLevelChanged()
+ // event might not be sent for the
+ // previous line.
+
+ buffer.getFoldLevel(delayedUpdateEnd);
+ } //}}}
+
+ //{{{ delayUpdate() method
+ private void delayUpdate(int startLine, int endLine)
+ {
+ textArea.chunkCache.invalidateChunksFromPhys(startLine);
+
+ if(!delayedUpdate)
+ {
+ delayedUpdateStart = startLine;
+ delayedUpdateEnd = endLine;
+ delayedUpdate = true;
+ }
+ else
+ {
+ delayedUpdateStart = Math.min(
+ delayedUpdateStart,
+ startLine);
+ delayedUpdateEnd = Math.max(
+ delayedUpdateEnd,
+ endLine);
+ }
+ } //}}}
+
+ //{{{ getReadyToBreakFold() method
+ // This is a fix for black hole bug.
+ // If you modify a part of folded lines, like {{{ (followed by }}}),
+ // the fold is removed so it must be expanded otherwise the text
+ // remains invisible.
+ private void getReadyToBreakFold(int line)
+ {
+ displayManager.expandFold(line, false);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/ChunkCache.java b/jEdit/org/gjt/sp/jedit/textarea/ChunkCache.java
index 01897af..32d7b4d 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/ChunkCache.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/ChunkCache.java
@@ -1,832 +1,832 @@
-/*
- * ChunkCache.java - Intermediate layer between token lists from a TokenMarker
- * and what you see on screen
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import java.util.*;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.jedit.syntax.*;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Manages low-level text display tasks - the visible lines in the TextArea.
- * The ChunkCache contains an array of LineInfo object.
- * Each LineInfo object is associated to one screen line of the TextArea and
- * contains informations about this line.
- * The array is resized when the TextArea geometry changes
- *
- * @author Slava Pestov
- * @version $Id: ChunkCache.java 16329 2009-10-13 12:23:45Z kpouer $
- */
-class ChunkCache
-{
- //{{{ ChunkCache constructor
- ChunkCache(TextArea textArea)
- {
- this.textArea = textArea;
- out = new ArrayList<Chunk>();
- tokenHandler = new DisplayTokenHandler();
- } //}}}
-
- //{{{ getMaxHorizontalScrollWidth() method
- /**
- * Returns the max line width of the textarea.
- * It will check all lines the first invalid line.
- *
- * @return the max line width
- */
- int getMaxHorizontalScrollWidth()
- {
- int max = 0;
- for(int i = 0; i < firstInvalidLine; i++)
- {
- LineInfo info = lineInfo[i];
- if(info.width > max)
- max = info.width;
- }
- return max;
- } //}}}
-
- //{{{ getScreenLineOfOffset() method
- /**
- * @param line physical line number of document
- * @param offset number of characters from the left of the line.
- * @return returns the screen line number where the line and offset are.
- * It returns -1 if this position is not currently visible
- */
- int getScreenLineOfOffset(int line, int offset)
- {
- if(lineInfo.length == 0)
- return -1;
- if(line < textArea.getFirstPhysicalLine())
- return -1;
- if(line == textArea.getFirstPhysicalLine()
- && offset < getLineInfo(0).offset)
- return -1;
- if(line > textArea.getLastPhysicalLine())
- return -1;
-
- if(line == lastScreenLineP)
- {
- LineInfo last = getLineInfo(lastScreenLine);
-
- if(offset >= last.offset
- && offset < last.offset + last.length)
- {
- return lastScreenLine;
- }
- }
-
- int screenLine = -1;
-
- // Find the screen line containing this offset
- for(int i = 0; i < textArea.getVisibleLines(); i++)
- {
- LineInfo info = getLineInfo(i);
- if(info.physicalLine > line)
- {
- // line is invisible?
- return i - 1;
- //return -1;
- }
- if(info.physicalLine == line)
- {
- if(offset >= info.offset
- && offset < info.offset + info.length)
- {
- screenLine = i;
- break;
- }
- }
- }
-
- if(screenLine == -1)
- return -1;
-
-
- lastScreenLineP = line;
- lastScreenLine = screenLine;
-
- return screenLine;
- } //}}}
-
- //{{{ recalculateVisibleLines() method
- /**
- * Recalculate visible lines.
- * This is called when the TextArea geometry is changed or when the font is changed.
- */
- void recalculateVisibleLines()
- {
- LineInfo[] newLineInfo = new LineInfo[textArea.getVisibleLines()];
-
- int start;
- if(lineInfo == null)
- start = 0;
- else
- {
- start = Math.min(lineInfo.length,newLineInfo.length);
- System.arraycopy(lineInfo,0,newLineInfo,0,start);
- }
-
- for(int i = start; i < newLineInfo.length; i++)
- newLineInfo[i] = new LineInfo();
-
- lineInfo = newLineInfo;
-
- lastScreenLine = lastScreenLineP = -1;
- } //}}}
-
- //{{{ setBuffer() method
- void setBuffer(JEditBuffer buffer)
- {
- this.buffer = buffer;
- lastScreenLine = lastScreenLineP = -1;
- } //}}}
-
- //{{{ scrollDown() method
- void scrollDown(int amount)
- {
- int visibleLines = textArea.getVisibleLines();
-
- System.arraycopy(lineInfo,amount,lineInfo,0,visibleLines - amount);
-
- for(int i = visibleLines - amount; i < visibleLines; i++)
- {
- lineInfo[i] = new LineInfo();
- }
-
- firstInvalidLine -= amount;
- if(firstInvalidLine < 0)
- firstInvalidLine = 0;
-
- if(Debug.CHUNK_CACHE_DEBUG)
- {
- System.err.println("f > t.f: only " + amount
- + " need updates");
- }
-
- lastScreenLine = lastScreenLineP = -1;
- } //}}}
-
- //{{{ scrollUp() method
- void scrollUp(int amount)
- {
- System.arraycopy(lineInfo,0,lineInfo,amount,
- textArea.getVisibleLines() - amount);
-
- for(int i = 0; i < amount; i++)
- {
- lineInfo[i] = new LineInfo();
- }
-
- // don't try this at home
- int oldFirstInvalidLine = firstInvalidLine;
- firstInvalidLine = 0;
- updateChunksUpTo(amount);
- firstInvalidLine = oldFirstInvalidLine + amount;
- if(firstInvalidLine > textArea.getVisibleLines())
- firstInvalidLine = textArea.getVisibleLines();
-
- if(Debug.CHUNK_CACHE_DEBUG)
- {
- Log.log(Log.DEBUG,this,"f > t.f: only " + amount
- + " need updates");
- }
-
- lastScreenLine = lastScreenLineP = -1;
- } //}}}
-
- //{{{ invalidateAll() method
- void invalidateAll()
- {
- firstInvalidLine = 0;
- lastScreenLine = lastScreenLineP = -1;
- } //}}}
-
- //{{{ invalidateChunksFromPhys() method
- void invalidateChunksFromPhys(int physicalLine)
- {
- for(int i = 0; i < firstInvalidLine; i++)
- {
- LineInfo info = lineInfo[i];
- if(info.physicalLine == -1 || info.physicalLine >= physicalLine)
- {
- firstInvalidLine = i;
- if(i <= lastScreenLine)
- lastScreenLine = lastScreenLineP = -1;
- break;
- }
- }
- } //}}}
-
- //{{{ getLineInfo() method
- /**
- * Returns the line informations for a given screen line
- * @param screenLine the screen line
- * @return the LineInfo for the screenLine
- */
- LineInfo getLineInfo(int screenLine)
- {
- updateChunksUpTo(screenLine);
- return lineInfo[screenLine];
- } //}}}
-
- //{{{ getLineSubregionCount() method
- /**
- * Returns the number of subregions of a physical line
- * @param physicalLine a physical line
- * @return the number of subregions of this physical line
- */
- int getLineSubregionCount(int physicalLine)
- {
- if(!textArea.softWrap)
- return 1;
-
- out.clear();
- lineToChunkList(physicalLine,out);
-
- int size = out.size();
- if(size == 0)
- return 1;
- else
- return size;
- } //}}}
-
- //{{{ getSubregionOfOffset() method
- /**
- * Returns the subregion containing the specified offset. A subregion
- * is a subset of a physical line. Each screen line corresponds to one
- * subregion. Unlike the {@link #getScreenLineOfOffset(int, int)} method,
- * this method works with non-visible lines too.
- *
- * @param offset the offset
- * @param lineInfos a lineInfos array. Usualy the array is the result of
- * {@link #getLineInfosForPhysicalLine(int)} call
- *
- * @return the subregion of the offset, or -1 if the offset was not in one of the given lineInfos
- */
- static int getSubregionOfOffset(int offset, LineInfo[] lineInfos)
- {
- for(int i = 0; i < lineInfos.length; i++)
- {
- LineInfo info = lineInfos[i];
- if(offset >= info.offset && offset < info.offset + info.length)
- return i;
- }
-
- return -1;
- } //}}}
-
- //{{{ xToSubregionOffset() method
- /**
- * Converts an x co-ordinate within a subregion into an offset from the
- * start of that subregion.
- * @param physicalLine The physical line number
- * @param subregion The subregion; if -1, then this is the last
- * subregion.
- * @param x The x co-ordinate
- * @param round Round up to next character if x is past the middle of a
- * character?
- * @return the offset from the start of the subregion
- */
- int xToSubregionOffset(int physicalLine, int subregion, int x,
- boolean round)
- {
- LineInfo[] infos = getLineInfosForPhysicalLine(physicalLine);
- if(subregion == -1)
- subregion += infos.length;
- return xToSubregionOffset(infos[subregion],x,round);
- } //}}}
-
- //{{{ xToSubregionOffset() method
- /**
- * Converts an x co-ordinate within a subregion into an offset from the
- * start of that subregion.
- * @param info The line info object
- * @param x The x co-ordinate
- * @param round Round up to next character if x is past the middle of a
- * character?
- * @return the offset from the start of the subregion
- */
- static int xToSubregionOffset(LineInfo info, int x,
- boolean round)
- {
- int offset = Chunk.xToOffset(info.chunks,x,round);
- if(offset == -1 || offset == info.offset + info.length)
- offset = info.offset + info.length - 1;
-
- return offset;
- } //}}}
-
- //{{{ subregionOffsetToX() method
- /**
- * Converts an offset within a subregion into an x co-ordinate.
- * @param physicalLine The physical line
- * @param offset The offset
- * @return the x co-ordinate of the offset within a subregion
- */
- int subregionOffsetToX(int physicalLine, int offset)
- {
- LineInfo[] infos = getLineInfosForPhysicalLine(physicalLine);
- LineInfo info = infos[getSubregionOfOffset(offset,infos)];
- return subregionOffsetToX(info,offset);
- } //}}}
-
- //{{{ subregionOffsetToX() method
- /**
- * Converts an offset within a subregion into an x co-ordinate.
- * @param info The line info object
- * @param offset The offset
- * @return the x co-ordinate of the offset within a subregion
- */
- static int subregionOffsetToX(LineInfo info, int offset)
- {
- return (int)Chunk.offsetToX(info.chunks,offset);
- } //}}}
-
- //{{{ getSubregionStartOffset() method
- /**
- * Returns the start offset of the specified subregion of the specified
- * physical line.
- * @param line The physical line number
- * @param offset An offset
- * @return the start offset of the subregion of the line
- */
- int getSubregionStartOffset(int line, int offset)
- {
- LineInfo[] lineInfos = getLineInfosForPhysicalLine(line);
- LineInfo info = lineInfos[getSubregionOfOffset(offset,lineInfos)];
- return textArea.getLineStartOffset(info.physicalLine)
- + info.offset;
- } //}}}
-
- //{{{ getSubregionEndOffset() method
- /**
- * Returns the end offset of the specified subregion of the specified
- * physical line.
- * @param line The physical line number
- * @param offset An offset
- * @return the end offset of the subregion of the line
- */
- int getSubregionEndOffset(int line, int offset)
- {
- LineInfo[] lineInfos = getLineInfosForPhysicalLine(line);
- LineInfo info = lineInfos[getSubregionOfOffset(offset,lineInfos)];
- return textArea.getLineStartOffset(info.physicalLine)
- + info.offset + info.length;
- } //}}}
-
- //{{{ getBelowPosition() method
- /**
- * @param physicalLine The physical line number
- * @param offset The offset
- * @param x The location
- * @param ignoreWrap If true, behave as if soft wrap is off even if it
- * is on
- */
- int getBelowPosition(int physicalLine, int offset, int x,
- boolean ignoreWrap)
- {
- LineInfo[] lineInfos = getLineInfosForPhysicalLine(physicalLine);
-
- int subregion = getSubregionOfOffset(offset,lineInfos);
-
- if(subregion != lineInfos.length - 1 && !ignoreWrap)
- {
- return textArea.getLineStartOffset(physicalLine)
- + xToSubregionOffset(lineInfos[subregion + 1],
- x,true);
- }
- else
- {
- int nextLine = textArea.displayManager
- .getNextVisibleLine(physicalLine);
-
- if(nextLine == -1)
- return -1;
- else
- {
- return textArea.getLineStartOffset(nextLine)
- + xToSubregionOffset(nextLine,0,
- x,true);
- }
- }
- } //}}}
-
- //{{{ getAbovePosition() method
- /**
- * @param physicalLine The physical line number
- * @param offset The offset
- * @param x The location
- * @param ignoreWrap If true, behave as if soft wrap is off even if it
- * is on
- */
- int getAbovePosition(int physicalLine, int offset, int x,
- boolean ignoreWrap)
- {
- LineInfo[] lineInfos = getLineInfosForPhysicalLine(physicalLine);
-
- int subregion = getSubregionOfOffset(offset,lineInfos);
-
- if(subregion != 0 && !ignoreWrap)
- {
- return textArea.getLineStartOffset(physicalLine)
- + xToSubregionOffset(lineInfos[subregion - 1],
- x,true);
- }
- else
- {
- int prevLine = textArea.displayManager
- .getPrevVisibleLine(physicalLine);
-
- if(prevLine == -1)
- return -1;
- else
- {
- return textArea.getLineStartOffset(prevLine)
- + xToSubregionOffset(prevLine,-1,
- x,true);
- }
- }
- } //}}}
-
- //{{{ needFullRepaint() method
- /**
- * The needFullRepaint variable becomes true when the number of screen
- * lines in a physical line changes.
- * @return true if the TextArea needs full repaint
- */
- boolean needFullRepaint()
- {
- boolean retVal = needFullRepaint;
- needFullRepaint = false;
- return retVal;
- } //}}}
-
- //{{{ getLineInfosForPhysicalLine() method
- LineInfo[] getLineInfosForPhysicalLine(int physicalLine)
- {
- out.clear();
-
- if(!buffer.isLoading())
- lineToChunkList(physicalLine,out);
-
- if(out.isEmpty())
- out.add(null);
-
- List<LineInfo> returnValue = new ArrayList<LineInfo>(out.size());
- getLineInfosForPhysicalLine(physicalLine,returnValue);
- return returnValue.toArray(new LineInfo[out.size()]);
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private final TextArea textArea;
- private JEditBuffer buffer;
- /**
- * The lineInfo array. There is LineInfo for each line that is visible in the textArea.
- * it can be resized by {@link #recalculateVisibleLines()}.
- * The content is valid from 0 to {@link #firstInvalidLine}
- */
- private LineInfo[] lineInfo;
- private final List<Chunk> out;
-
- /** The first invalid line. All lines before this one are valid. */
- private int firstInvalidLine;
- private int lastScreenLineP;
- private int lastScreenLine;
-
- private boolean needFullRepaint;
-
- private final DisplayTokenHandler tokenHandler;
- //}}}
-
- //{{{ getLineInfosForPhysicalLine() method
- private void getLineInfosForPhysicalLine(int physicalLine, List<LineInfo> list)
- {
- for(int i = 0; i < out.size(); i++)
- {
- Chunk chunks = out.get(i);
- LineInfo info = new LineInfo();
- info.physicalLine = physicalLine;
- if(i == 0)
- {
- info.firstSubregion = true;
- info.offset = 0;
- }
- else
- info.offset = chunks.offset;
-
- if(i == out.size() - 1)
- {
- info.lastSubregion = true;
- info.length = textArea.getLineLength(physicalLine)
- - info.offset + 1;
- }
- else
- {
- info.length = out.get(i + 1).offset
- - info.offset;
- }
-
- info.chunks = chunks;
-
- list.add(info);
- }
- } //}}}
-
- //{{{ getFirstScreenLine() method
- /**
- * Find a valid line closest to the last screen line.
- */
- private int getFirstScreenLine()
- {
- for(int i = firstInvalidLine - 1; i >= 0; i--)
- {
- if(lineInfo[i].lastSubregion)
- return i + 1;
- }
-
- return 0;
- } //}}}
-
- //{{{ getUpdateStartLine() method
- /**
- * Return a physical line number.
- */
- private int getUpdateStartLine(int firstScreenLine)
- {
- // for the first line displayed, take its physical line to be
- // the text area's first physical line
- if(firstScreenLine == 0)
- {
- return textArea.getFirstPhysicalLine();
- }
- // otherwise, determine the next visible line
- else
- {
- int prevPhysLine = lineInfo[
- firstScreenLine - 1]
- .physicalLine;
- // if -1, the empty space at the end of the text area
- // when the buffer has less lines than are visible
- if(prevPhysLine == -1)
- return -1;
- else
- {
- return textArea.displayManager
- .getNextVisibleLine(prevPhysLine);
- }
- }
- } //}}}
-
- //{{{ updateChunksUpTo() method
- private void updateChunksUpTo(int lastScreenLine)
- {
- // this method is a nightmare
- if(lastScreenLine >= lineInfo.length)
- throw new ArrayIndexOutOfBoundsException(lastScreenLine);
-
- // if one line's chunks are invalid, remaining lines are also
- // invalid
- if(lastScreenLine < firstInvalidLine)
- return;
-
- int firstScreenLine = getFirstScreenLine();
- int physicalLine = getUpdateStartLine(firstScreenLine);
-
- if(Debug.CHUNK_CACHE_DEBUG)
- {
- Log.log(Log.DEBUG,this,"Updating chunks from " + firstScreenLine
- + " to " + lastScreenLine);
- }
-
- // Note that we rely on the fact that when a physical line is
- // invalidated, all screen lines/subregions of that line are
- // invalidated as well. See below comment for code that tries
- // to uphold this assumption.
-
- out.clear();
-
- int offset;
- int length;
-
- for(int i = firstScreenLine; i <= lastScreenLine; i++)
- {
- LineInfo info = lineInfo[i];
-
- Chunk chunks;
-
- // get another line of chunks
- if(out.isEmpty())
- {
- // unless this is the first time, increment
- // the line number
- if(physicalLine != -1 && i != firstScreenLine)
- {
- physicalLine = textArea.displayManager
- .getNextVisibleLine(physicalLine);
- }
-
- // empty space
- if(physicalLine == -1)
- {
- info.chunks = null;
- info.physicalLine = -1;
- // fix the bug where the horiz.
- // scroll bar was not updated
- // after creating a new file.
- info.width = 0;
- continue;
- }
-
- // chunk the line.
- lineToChunkList(physicalLine,out);
-
- info.firstSubregion = true;
-
- // if the line has no text, out.size() == 0
- if(out.isEmpty())
- {
- if(i == 0)
- {
- if(textArea.displayManager.firstLine.skew > 0)
- {
- Log.log(Log.ERROR,this,"BUG: skew=" + textArea.displayManager.firstLine.skew + ",out.size()=" + out.size());
- textArea.displayManager.firstLine.skew = 0;
- needFullRepaint = true;
- lastScreenLine = lineInfo.length - 1;
- }
- }
- chunks = null;
- offset = 0;
- length = 1;
- }
- // otherwise, the number of subregions
- else
- {
- if(i == 0)
- {
- int skew = textArea.displayManager.firstLine.skew;
- if(skew >= out.size())
- {
- // The skew cannot be greater than the chunk count of the line
- // we need at least one chunk per subregion in a line
- Log.log(Log.ERROR,this,"BUG: skew=" + skew + ",out.size()=" + out.size());
- needFullRepaint = true;
- lastScreenLine = lineInfo.length - 1;
- }
- else if(skew > 0)
- {
- info.firstSubregion = false;
- for(int j = 0; j < skew; j++)
- out.remove(0);
- }
- }
- chunks = out.remove(0);
- offset = chunks.offset;
- if (!out.isEmpty())
- length = out.get(0).offset - offset;
- else
- length = textArea.getLineLength(physicalLine) - offset + 1;
- }
- }
- else
- {
- info.firstSubregion = false;
-
- chunks = out.remove(0);
- offset = chunks.offset;
- if (!out.isEmpty())
- length = out.get(0).offset - offset;
- else
- length = textArea.getLineLength(physicalLine) - offset + 1;
- }
-
- boolean lastSubregion = out.isEmpty();
-
- if(i == lastScreenLine
- && lastScreenLine != lineInfo.length - 1)
- {
- /* if the user changes the syntax token at the
- * end of a line, need to do a full repaint. */
- if(tokenHandler.getLineContext() !=
- info.lineContext)
- {
- lastScreenLine++;
- needFullRepaint = true;
- }
- /* If this line has become longer or shorter
- * (in which case the new physical line number
- * is different from the cached one) we need to:
- * - continue updating past the last line
- * - advise the text area to repaint
- * On the other hand, if the line wraps beyond
- * lastScreenLine, we need to keep updating the
- * chunk list to ensure proper alignment of
- * invalidation flags (see start of method) */
- else if(info.physicalLine != physicalLine
- || info.lastSubregion != lastSubregion)
- {
- lastScreenLine++;
- needFullRepaint = true;
- }
- /* We only cache entire physical lines at once;
- * don't want to split a physical line into
- * screen lines and only have some valid. */
- else if (!out.isEmpty())
- lastScreenLine++;
- }
-
- info.physicalLine = physicalLine;
- info.lastSubregion = lastSubregion;
- info.offset = offset;
- info.length = length;
- info.chunks = chunks;
- info.lineContext = tokenHandler.getLineContext();
- }
-
- firstInvalidLine = Math.max(lastScreenLine + 1,firstInvalidLine);
- } //}}}
-
- //{{{ lineToChunkList() method
- private void lineToChunkList(int physicalLine, List<Chunk> out)
- {
- TextAreaPainter painter = textArea.getPainter();
-
- tokenHandler.init(painter.getStyles(),
- painter.getFontRenderContext(),
- painter,out,
- textArea.softWrap
- ? textArea.wrapMargin : 0.0f);
- buffer.markTokens(physicalLine,tokenHandler);
- } //}}}
-
- //}}}
-
- //{{{ LineInfo class
- /**
- * The informations on a line. (for fast access)
- * When using softwrap, a line is divided in n
- * subregions.
- */
- static class LineInfo
- {
- /**
- * The physical line.
- */
- int physicalLine;
- /**
- * The offset where begins the line.
- */
- int offset;
- /**
- * The line length.
- */
- int length;
- /**
- * true if it is the first subregion of a line.
- */
- boolean firstSubregion;
- /**
- * True if it is the last subregion of a line.
- */
- boolean lastSubregion;
- Chunk chunks;
- /** The line width. */
- int width;
- TokenMarker.LineContext lineContext;
-
- @Override
- public String toString()
- {
- return "LineInfo[" + physicalLine + ',' + offset + ','
- + length + ',' + firstSubregion + ',' +
- lastSubregion + "]";
- }
- } //}}}
-}
+/*
+ * ChunkCache.java - Intermediate layer between token lists from a TokenMarker
+ * and what you see on screen
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import java.util.*;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.jedit.syntax.*;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Manages low-level text display tasks - the visible lines in the TextArea.
+ * The ChunkCache contains an array of LineInfo object.
+ * Each LineInfo object is associated to one screen line of the TextArea and
+ * contains informations about this line.
+ * The array is resized when the TextArea geometry changes
+ *
+ * @author Slava Pestov
+ * @version $Id: ChunkCache.java 16329 2009-10-13 12:23:45Z kpouer $
+ */
+class ChunkCache
+{
+ //{{{ ChunkCache constructor
+ ChunkCache(TextArea textArea)
+ {
+ this.textArea = textArea;
+ out = new ArrayList<Chunk>();
+ tokenHandler = new DisplayTokenHandler();
+ } //}}}
+
+ //{{{ getMaxHorizontalScrollWidth() method
+ /**
+ * Returns the max line width of the textarea.
+ * It will check all lines the first invalid line.
+ *
+ * @return the max line width
+ */
+ int getMaxHorizontalScrollWidth()
+ {
+ int max = 0;
+ for(int i = 0; i < firstInvalidLine; i++)
+ {
+ LineInfo info = lineInfo[i];
+ if(info.width > max)
+ max = info.width;
+ }
+ return max;
+ } //}}}
+
+ //{{{ getScreenLineOfOffset() method
+ /**
+ * @param line physical line number of document
+ * @param offset number of characters from the left of the line.
+ * @return returns the screen line number where the line and offset are.
+ * It returns -1 if this position is not currently visible
+ */
+ int getScreenLineOfOffset(int line, int offset)
+ {
+ if(lineInfo.length == 0)
+ return -1;
+ if(line < textArea.getFirstPhysicalLine())
+ return -1;
+ if(line == textArea.getFirstPhysicalLine()
+ && offset < getLineInfo(0).offset)
+ return -1;
+ if(line > textArea.getLastPhysicalLine())
+ return -1;
+
+ if(line == lastScreenLineP)
+ {
+ LineInfo last = getLineInfo(lastScreenLine);
+
+ if(offset >= last.offset
+ && offset < last.offset + last.length)
+ {
+ return lastScreenLine;
+ }
+ }
+
+ int screenLine = -1;
+
+ // Find the screen line containing this offset
+ for(int i = 0; i < textArea.getVisibleLines(); i++)
+ {
+ LineInfo info = getLineInfo(i);
+ if(info.physicalLine > line)
+ {
+ // line is invisible?
+ return i - 1;
+ //return -1;
+ }
+ if(info.physicalLine == line)
+ {
+ if(offset >= info.offset
+ && offset < info.offset + info.length)
+ {
+ screenLine = i;
+ break;
+ }
+ }
+ }
+
+ if(screenLine == -1)
+ return -1;
+
+
+ lastScreenLineP = line;
+ lastScreenLine = screenLine;
+
+ return screenLine;
+ } //}}}
+
+ //{{{ recalculateVisibleLines() method
+ /**
+ * Recalculate visible lines.
+ * This is called when the TextArea geometry is changed or when the font is changed.
+ */
+ void recalculateVisibleLines()
+ {
+ LineInfo[] newLineInfo = new LineInfo[textArea.getVisibleLines()];
+
+ int start;
+ if(lineInfo == null)
+ start = 0;
+ else
+ {
+ start = Math.min(lineInfo.length,newLineInfo.length);
+ System.arraycopy(lineInfo,0,newLineInfo,0,start);
+ }
+
+ for(int i = start; i < newLineInfo.length; i++)
+ newLineInfo[i] = new LineInfo();
+
+ lineInfo = newLineInfo;
+
+ lastScreenLine = lastScreenLineP = -1;
+ } //}}}
+
+ //{{{ setBuffer() method
+ void setBuffer(JEditBuffer buffer)
+ {
+ this.buffer = buffer;
+ lastScreenLine = lastScreenLineP = -1;
+ } //}}}
+
+ //{{{ scrollDown() method
+ void scrollDown(int amount)
+ {
+ int visibleLines = textArea.getVisibleLines();
+
+ System.arraycopy(lineInfo,amount,lineInfo,0,visibleLines - amount);
+
+ for(int i = visibleLines - amount; i < visibleLines; i++)
+ {
+ lineInfo[i] = new LineInfo();
+ }
+
+ firstInvalidLine -= amount;
+ if(firstInvalidLine < 0)
+ firstInvalidLine = 0;
+
+ if(Debug.CHUNK_CACHE_DEBUG)
+ {
+ System.err.println("f > t.f: only " + amount
+ + " need updates");
+ }
+
+ lastScreenLine = lastScreenLineP = -1;
+ } //}}}
+
+ //{{{ scrollUp() method
+ void scrollUp(int amount)
+ {
+ System.arraycopy(lineInfo,0,lineInfo,amount,
+ textArea.getVisibleLines() - amount);
+
+ for(int i = 0; i < amount; i++)
+ {
+ lineInfo[i] = new LineInfo();
+ }
+
+ // don't try this at home
+ int oldFirstInvalidLine = firstInvalidLine;
+ firstInvalidLine = 0;
+ updateChunksUpTo(amount);
+ firstInvalidLine = oldFirstInvalidLine + amount;
+ if(firstInvalidLine > textArea.getVisibleLines())
+ firstInvalidLine = textArea.getVisibleLines();
+
+ if(Debug.CHUNK_CACHE_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"f > t.f: only " + amount
+ + " need updates");
+ }
+
+ lastScreenLine = lastScreenLineP = -1;
+ } //}}}
+
+ //{{{ invalidateAll() method
+ void invalidateAll()
+ {
+ firstInvalidLine = 0;
+ lastScreenLine = lastScreenLineP = -1;
+ } //}}}
+
+ //{{{ invalidateChunksFromPhys() method
+ void invalidateChunksFromPhys(int physicalLine)
+ {
+ for(int i = 0; i < firstInvalidLine; i++)
+ {
+ LineInfo info = lineInfo[i];
+ if(info.physicalLine == -1 || info.physicalLine >= physicalLine)
+ {
+ firstInvalidLine = i;
+ if(i <= lastScreenLine)
+ lastScreenLine = lastScreenLineP = -1;
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ getLineInfo() method
+ /**
+ * Returns the line informations for a given screen line
+ * @param screenLine the screen line
+ * @return the LineInfo for the screenLine
+ */
+ LineInfo getLineInfo(int screenLine)
+ {
+ updateChunksUpTo(screenLine);
+ return lineInfo[screenLine];
+ } //}}}
+
+ //{{{ getLineSubregionCount() method
+ /**
+ * Returns the number of subregions of a physical line
+ * @param physicalLine a physical line
+ * @return the number of subregions of this physical line
+ */
+ int getLineSubregionCount(int physicalLine)
+ {
+ if(!textArea.softWrap)
+ return 1;
+
+ out.clear();
+ lineToChunkList(physicalLine,out);
+
+ int size = out.size();
+ if(size == 0)
+ return 1;
+ else
+ return size;
+ } //}}}
+
+ //{{{ getSubregionOfOffset() method
+ /**
+ * Returns the subregion containing the specified offset. A subregion
+ * is a subset of a physical line. Each screen line corresponds to one
+ * subregion. Unlike the {@link #getScreenLineOfOffset(int, int)} method,
+ * this method works with non-visible lines too.
+ *
+ * @param offset the offset
+ * @param lineInfos a lineInfos array. Usualy the array is the result of
+ * {@link #getLineInfosForPhysicalLine(int)} call
+ *
+ * @return the subregion of the offset, or -1 if the offset was not in one of the given lineInfos
+ */
+ static int getSubregionOfOffset(int offset, LineInfo[] lineInfos)
+ {
+ for(int i = 0; i < lineInfos.length; i++)
+ {
+ LineInfo info = lineInfos[i];
+ if(offset >= info.offset && offset < info.offset + info.length)
+ return i;
+ }
+
+ return -1;
+ } //}}}
+
+ //{{{ xToSubregionOffset() method
+ /**
+ * Converts an x co-ordinate within a subregion into an offset from the
+ * start of that subregion.
+ * @param physicalLine The physical line number
+ * @param subregion The subregion; if -1, then this is the last
+ * subregion.
+ * @param x The x co-ordinate
+ * @param round Round up to next character if x is past the middle of a
+ * character?
+ * @return the offset from the start of the subregion
+ */
+ int xToSubregionOffset(int physicalLine, int subregion, int x,
+ boolean round)
+ {
+ LineInfo[] infos = getLineInfosForPhysicalLine(physicalLine);
+ if(subregion == -1)
+ subregion += infos.length;
+ return xToSubregionOffset(infos[subregion],x,round);
+ } //}}}
+
+ //{{{ xToSubregionOffset() method
+ /**
+ * Converts an x co-ordinate within a subregion into an offset from the
+ * start of that subregion.
+ * @param info The line info object
+ * @param x The x co-ordinate
+ * @param round Round up to next character if x is past the middle of a
+ * character?
+ * @return the offset from the start of the subregion
+ */
+ static int xToSubregionOffset(LineInfo info, int x,
+ boolean round)
+ {
+ int offset = Chunk.xToOffset(info.chunks,x,round);
+ if(offset == -1 || offset == info.offset + info.length)
+ offset = info.offset + info.length - 1;
+
+ return offset;
+ } //}}}
+
+ //{{{ subregionOffsetToX() method
+ /**
+ * Converts an offset within a subregion into an x co-ordinate.
+ * @param physicalLine The physical line
+ * @param offset The offset
+ * @return the x co-ordinate of the offset within a subregion
+ */
+ int subregionOffsetToX(int physicalLine, int offset)
+ {
+ LineInfo[] infos = getLineInfosForPhysicalLine(physicalLine);
+ LineInfo info = infos[getSubregionOfOffset(offset,infos)];
+ return subregionOffsetToX(info,offset);
+ } //}}}
+
+ //{{{ subregionOffsetToX() method
+ /**
+ * Converts an offset within a subregion into an x co-ordinate.
+ * @param info The line info object
+ * @param offset The offset
+ * @return the x co-ordinate of the offset within a subregion
+ */
+ static int subregionOffsetToX(LineInfo info, int offset)
+ {
+ return (int)Chunk.offsetToX(info.chunks,offset);
+ } //}}}
+
+ //{{{ getSubregionStartOffset() method
+ /**
+ * Returns the start offset of the specified subregion of the specified
+ * physical line.
+ * @param line The physical line number
+ * @param offset An offset
+ * @return the start offset of the subregion of the line
+ */
+ int getSubregionStartOffset(int line, int offset)
+ {
+ LineInfo[] lineInfos = getLineInfosForPhysicalLine(line);
+ LineInfo info = lineInfos[getSubregionOfOffset(offset,lineInfos)];
+ return textArea.getLineStartOffset(info.physicalLine)
+ + info.offset;
+ } //}}}
+
+ //{{{ getSubregionEndOffset() method
+ /**
+ * Returns the end offset of the specified subregion of the specified
+ * physical line.
+ * @param line The physical line number
+ * @param offset An offset
+ * @return the end offset of the subregion of the line
+ */
+ int getSubregionEndOffset(int line, int offset)
+ {
+ LineInfo[] lineInfos = getLineInfosForPhysicalLine(line);
+ LineInfo info = lineInfos[getSubregionOfOffset(offset,lineInfos)];
+ return textArea.getLineStartOffset(info.physicalLine)
+ + info.offset + info.length;
+ } //}}}
+
+ //{{{ getBelowPosition() method
+ /**
+ * @param physicalLine The physical line number
+ * @param offset The offset
+ * @param x The location
+ * @param ignoreWrap If true, behave as if soft wrap is off even if it
+ * is on
+ */
+ int getBelowPosition(int physicalLine, int offset, int x,
+ boolean ignoreWrap)
+ {
+ LineInfo[] lineInfos = getLineInfosForPhysicalLine(physicalLine);
+
+ int subregion = getSubregionOfOffset(offset,lineInfos);
+
+ if(subregion != lineInfos.length - 1 && !ignoreWrap)
+ {
+ return textArea.getLineStartOffset(physicalLine)
+ + xToSubregionOffset(lineInfos[subregion + 1],
+ x,true);
+ }
+ else
+ {
+ int nextLine = textArea.displayManager
+ .getNextVisibleLine(physicalLine);
+
+ if(nextLine == -1)
+ return -1;
+ else
+ {
+ return textArea.getLineStartOffset(nextLine)
+ + xToSubregionOffset(nextLine,0,
+ x,true);
+ }
+ }
+ } //}}}
+
+ //{{{ getAbovePosition() method
+ /**
+ * @param physicalLine The physical line number
+ * @param offset The offset
+ * @param x The location
+ * @param ignoreWrap If true, behave as if soft wrap is off even if it
+ * is on
+ */
+ int getAbovePosition(int physicalLine, int offset, int x,
+ boolean ignoreWrap)
+ {
+ LineInfo[] lineInfos = getLineInfosForPhysicalLine(physicalLine);
+
+ int subregion = getSubregionOfOffset(offset,lineInfos);
+
+ if(subregion != 0 && !ignoreWrap)
+ {
+ return textArea.getLineStartOffset(physicalLine)
+ + xToSubregionOffset(lineInfos[subregion - 1],
+ x,true);
+ }
+ else
+ {
+ int prevLine = textArea.displayManager
+ .getPrevVisibleLine(physicalLine);
+
+ if(prevLine == -1)
+ return -1;
+ else
+ {
+ return textArea.getLineStartOffset(prevLine)
+ + xToSubregionOffset(prevLine,-1,
+ x,true);
+ }
+ }
+ } //}}}
+
+ //{{{ needFullRepaint() method
+ /**
+ * The needFullRepaint variable becomes true when the number of screen
+ * lines in a physical line changes.
+ * @return true if the TextArea needs full repaint
+ */
+ boolean needFullRepaint()
+ {
+ boolean retVal = needFullRepaint;
+ needFullRepaint = false;
+ return retVal;
+ } //}}}
+
+ //{{{ getLineInfosForPhysicalLine() method
+ LineInfo[] getLineInfosForPhysicalLine(int physicalLine)
+ {
+ out.clear();
+
+ if(!buffer.isLoading())
+ lineToChunkList(physicalLine,out);
+
+ if(out.isEmpty())
+ out.add(null);
+
+ List<LineInfo> returnValue = new ArrayList<LineInfo>(out.size());
+ getLineInfosForPhysicalLine(physicalLine,returnValue);
+ return returnValue.toArray(new LineInfo[out.size()]);
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private final TextArea textArea;
+ private JEditBuffer buffer;
+ /**
+ * The lineInfo array. There is LineInfo for each line that is visible in the textArea.
+ * it can be resized by {@link #recalculateVisibleLines()}.
+ * The content is valid from 0 to {@link #firstInvalidLine}
+ */
+ private LineInfo[] lineInfo;
+ private final List<Chunk> out;
+
+ /** The first invalid line. All lines before this one are valid. */
+ private int firstInvalidLine;
+ private int lastScreenLineP;
+ private int lastScreenLine;
+
+ private boolean needFullRepaint;
+
+ private final DisplayTokenHandler tokenHandler;
+ //}}}
+
+ //{{{ getLineInfosForPhysicalLine() method
+ private void getLineInfosForPhysicalLine(int physicalLine, List<LineInfo> list)
+ {
+ for(int i = 0; i < out.size(); i++)
+ {
+ Chunk chunks = out.get(i);
+ LineInfo info = new LineInfo();
+ info.physicalLine = physicalLine;
+ if(i == 0)
+ {
+ info.firstSubregion = true;
+ info.offset = 0;
+ }
+ else
+ info.offset = chunks.offset;
+
+ if(i == out.size() - 1)
+ {
+ info.lastSubregion = true;
+ info.length = textArea.getLineLength(physicalLine)
+ - info.offset + 1;
+ }
+ else
+ {
+ info.length = out.get(i + 1).offset
+ - info.offset;
+ }
+
+ info.chunks = chunks;
+
+ list.add(info);
+ }
+ } //}}}
+
+ //{{{ getFirstScreenLine() method
+ /**
+ * Find a valid line closest to the last screen line.
+ */
+ private int getFirstScreenLine()
+ {
+ for(int i = firstInvalidLine - 1; i >= 0; i--)
+ {
+ if(lineInfo[i].lastSubregion)
+ return i + 1;
+ }
+
+ return 0;
+ } //}}}
+
+ //{{{ getUpdateStartLine() method
+ /**
+ * Return a physical line number.
+ */
+ private int getUpdateStartLine(int firstScreenLine)
+ {
+ // for the first line displayed, take its physical line to be
+ // the text area's first physical line
+ if(firstScreenLine == 0)
+ {
+ return textArea.getFirstPhysicalLine();
+ }
+ // otherwise, determine the next visible line
+ else
+ {
+ int prevPhysLine = lineInfo[
+ firstScreenLine - 1]
+ .physicalLine;
+ // if -1, the empty space at the end of the text area
+ // when the buffer has less lines than are visible
+ if(prevPhysLine == -1)
+ return -1;
+ else
+ {
+ return textArea.displayManager
+ .getNextVisibleLine(prevPhysLine);
+ }
+ }
+ } //}}}
+
+ //{{{ updateChunksUpTo() method
+ private void updateChunksUpTo(int lastScreenLine)
+ {
+ // this method is a nightmare
+ if(lastScreenLine >= lineInfo.length)
+ throw new ArrayIndexOutOfBoundsException(lastScreenLine);
+
+ // if one line's chunks are invalid, remaining lines are also
+ // invalid
+ if(lastScreenLine < firstInvalidLine)
+ return;
+
+ int firstScreenLine = getFirstScreenLine();
+ int physicalLine = getUpdateStartLine(firstScreenLine);
+
+ if(Debug.CHUNK_CACHE_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"Updating chunks from " + firstScreenLine
+ + " to " + lastScreenLine);
+ }
+
+ // Note that we rely on the fact that when a physical line is
+ // invalidated, all screen lines/subregions of that line are
+ // invalidated as well. See below comment for code that tries
+ // to uphold this assumption.
+
+ out.clear();
+
+ int offset;
+ int length;
+
+ for(int i = firstScreenLine; i <= lastScreenLine; i++)
+ {
+ LineInfo info = lineInfo[i];
+
+ Chunk chunks;
+
+ // get another line of chunks
+ if(out.isEmpty())
+ {
+ // unless this is the first time, increment
+ // the line number
+ if(physicalLine != -1 && i != firstScreenLine)
+ {
+ physicalLine = textArea.displayManager
+ .getNextVisibleLine(physicalLine);
+ }
+
+ // empty space
+ if(physicalLine == -1)
+ {
+ info.chunks = null;
+ info.physicalLine = -1;
+ // fix the bug where the horiz.
+ // scroll bar was not updated
+ // after creating a new file.
+ info.width = 0;
+ continue;
+ }
+
+ // chunk the line.
+ lineToChunkList(physicalLine,out);
+
+ info.firstSubregion = true;
+
+ // if the line has no text, out.size() == 0
+ if(out.isEmpty())
+ {
+ if(i == 0)
+ {
+ if(textArea.displayManager.firstLine.skew > 0)
+ {
+ Log.log(Log.ERROR,this,"BUG: skew=" + textArea.displayManager.firstLine.skew + ",out.size()=" + out.size());
+ textArea.displayManager.firstLine.skew = 0;
+ needFullRepaint = true;
+ lastScreenLine = lineInfo.length - 1;
+ }
+ }
+ chunks = null;
+ offset = 0;
+ length = 1;
+ }
+ // otherwise, the number of subregions
+ else
+ {
+ if(i == 0)
+ {
+ int skew = textArea.displayManager.firstLine.skew;
+ if(skew >= out.size())
+ {
+ // The skew cannot be greater than the chunk count of the line
+ // we need at least one chunk per subregion in a line
+ Log.log(Log.ERROR,this,"BUG: skew=" + skew + ",out.size()=" + out.size());
+ needFullRepaint = true;
+ lastScreenLine = lineInfo.length - 1;
+ }
+ else if(skew > 0)
+ {
+ info.firstSubregion = false;
+ for(int j = 0; j < skew; j++)
+ out.remove(0);
+ }
+ }
+ chunks = out.remove(0);
+ offset = chunks.offset;
+ if (!out.isEmpty())
+ length = out.get(0).offset - offset;
+ else
+ length = textArea.getLineLength(physicalLine) - offset + 1;
+ }
+ }
+ else
+ {
+ info.firstSubregion = false;
+
+ chunks = out.remove(0);
+ offset = chunks.offset;
+ if (!out.isEmpty())
+ length = out.get(0).offset - offset;
+ else
+ length = textArea.getLineLength(physicalLine) - offset + 1;
+ }
+
+ boolean lastSubregion = out.isEmpty();
+
+ if(i == lastScreenLine
+ && lastScreenLine != lineInfo.length - 1)
+ {
+ /* if the user changes the syntax token at the
+ * end of a line, need to do a full repaint. */
+ if(tokenHandler.getLineContext() !=
+ info.lineContext)
+ {
+ lastScreenLine++;
+ needFullRepaint = true;
+ }
+ /* If this line has become longer or shorter
+ * (in which case the new physical line number
+ * is different from the cached one) we need to:
+ * - continue updating past the last line
+ * - advise the text area to repaint
+ * On the other hand, if the line wraps beyond
+ * lastScreenLine, we need to keep updating the
+ * chunk list to ensure proper alignment of
+ * invalidation flags (see start of method) */
+ else if(info.physicalLine != physicalLine
+ || info.lastSubregion != lastSubregion)
+ {
+ lastScreenLine++;
+ needFullRepaint = true;
+ }
+ /* We only cache entire physical lines at once;
+ * don't want to split a physical line into
+ * screen lines and only have some valid. */
+ else if (!out.isEmpty())
+ lastScreenLine++;
+ }
+
+ info.physicalLine = physicalLine;
+ info.lastSubregion = lastSubregion;
+ info.offset = offset;
+ info.length = length;
+ info.chunks = chunks;
+ info.lineContext = tokenHandler.getLineContext();
+ }
+
+ firstInvalidLine = Math.max(lastScreenLine + 1,firstInvalidLine);
+ } //}}}
+
+ //{{{ lineToChunkList() method
+ private void lineToChunkList(int physicalLine, List<Chunk> out)
+ {
+ TextAreaPainter painter = textArea.getPainter();
+
+ tokenHandler.init(painter.getStyles(),
+ painter.getFontRenderContext(),
+ painter,out,
+ textArea.softWrap
+ ? textArea.wrapMargin : 0.0f);
+ buffer.markTokens(physicalLine,tokenHandler);
+ } //}}}
+
+ //}}}
+
+ //{{{ LineInfo class
+ /**
+ * The informations on a line. (for fast access)
+ * When using softwrap, a line is divided in n
+ * subregions.
+ */
+ static class LineInfo
+ {
+ /**
+ * The physical line.
+ */
+ int physicalLine;
+ /**
+ * The offset where begins the line.
+ */
+ int offset;
+ /**
+ * The line length.
+ */
+ int length;
+ /**
+ * true if it is the first subregion of a line.
+ */
+ boolean firstSubregion;
+ /**
+ * True if it is the last subregion of a line.
+ */
+ boolean lastSubregion;
+ Chunk chunks;
+ /** The line width. */
+ int width;
+ TokenMarker.LineContext lineContext;
+
+ @Override
+ public String toString()
+ {
+ return "LineInfo[" + physicalLine + ',' + offset + ','
+ + length + ',' + firstSubregion + ',' +
+ lastSubregion + "]";
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/DisplayManager.java b/jEdit/org/gjt/sp/jedit/textarea/DisplayManager.java
index a2345cd..e804efa 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/DisplayManager.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/DisplayManager.java
@@ -1,868 +1,868 @@
-/*
- * DisplayManager.java - Low-level text display
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import java.awt.Toolkit;
-import java.util.*;
-import org.gjt.sp.jedit.buffer.*;
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Manages low-level text display tasks, such as folding.
- *
- * @since jEdit 4.2pre1
- * @author Slava Pestov
- * @version $Id: DisplayManager.java 16114 2009-08-29 17:53:21Z kpouer $
- */
-public class DisplayManager
-{
- //{{{ Static part
-
- //{{{ getDisplayManager() method
- static DisplayManager getDisplayManager(JEditBuffer buffer,
- TextArea textArea)
- {
- List<DisplayManager> l = bufferMap.get(buffer);
- if(l == null)
- {
- l = new LinkedList<DisplayManager>();
- bufferMap.put(buffer,l);
- }
-
- /* An existing display manager's fold visibility map
- that a new display manager will inherit */
- DisplayManager copy = null;
- Iterator<DisplayManager> liter = l.iterator();
- DisplayManager dmgr;
- while(liter.hasNext())
- {
- dmgr = liter.next();
- copy = dmgr;
- if(!dmgr.inUse && dmgr.textArea == textArea)
- {
- dmgr.inUse = true;
- return dmgr;
- }
- }
-
- // if we got here, no unused display manager in list
- dmgr = new DisplayManager(buffer,textArea,copy);
- dmgr.inUse = true;
- l.add(dmgr);
-
- return dmgr;
- } //}}}
-
- //{{{ release() method
- void release()
- {
- inUse = false;
- } //}}}
-
- //{{{ bufferClosed() method
- public static void bufferClosed(JEditBuffer buffer)
- {
- bufferMap.remove(buffer);
- } //}}}
-
- //{{{ textAreaDisposed() method
- static void textAreaDisposed(TextArea textArea)
- {
- for (List<DisplayManager> l : bufferMap.values())
- {
- Iterator<DisplayManager> liter = l.iterator();
- while(liter.hasNext())
- {
- DisplayManager dmgr = liter.next();
- if(dmgr.textArea == textArea)
- {
- dmgr.dispose();
- liter.remove();
- }
- }
- }
- } //}}}
-
- private static final Map<JEditBuffer, List<DisplayManager>> bufferMap = new HashMap<JEditBuffer, List<DisplayManager>>();
- //}}}
-
- //{{{ getBuffer() method
- /**
- * @since jEdit 4.3pre3
- */
- public JEditBuffer getBuffer()
- {
- return buffer;
- } //}}}
-
- //{{{ isLineVisible() method
- /**
- * Returns if the specified line is visible.
- * @param line A physical line index
- * @since jEdit 4.2pre1
- */
- public final boolean isLineVisible(int line)
- {
- return folds.search(line) % 2 == 0;
- } //}}}
-
- //{{{ getFirstVisibleLine() method
- /**
- * Returns the physical line number of the first visible line.
- * @since jEdit 4.2pre1
- */
- public int getFirstVisibleLine()
- {
- return folds.first();
- } //}}}
-
- //{{{ getLastVisibleLine() method
- /**
- * Returns the physical line number of the last visible line.
- * @since jEdit 4.2pre1
- */
- public int getLastVisibleLine()
- {
- return folds.last();
- } //}}}
-
- //{{{ getNextVisibleLine() method
- /**
- * Returns the next visible line after the specified line index,
- * or (-1) if there is no next visible line.
- * @param line A physical line index
- * @since jEdit 4.0pre1
- */
- public int getNextVisibleLine(int line)
- {
- if(line < 0 || line >= buffer.getLineCount())
- throw new ArrayIndexOutOfBoundsException(line);
-
- return folds.next(line);
- } //}}}
-
- //{{{ getPrevVisibleLine() method
- /**
- * Returns the previous visible line before the specified line index.
- * @param line a physical line index
- * @return the previous visible physical line or -1 if there is no visible line
- * @since jEdit 4.0pre1
- */
- public int getPrevVisibleLine(int line)
- {
- if(line < 0 || line >= buffer.getLineCount())
- throw new ArrayIndexOutOfBoundsException(line);
-
- return folds.prev(line);
- } //}}}
-
- //{{{ getScreenLineCount() method
- /**
- * Returns how many screen lines contains the given physical line.
- * It can be greater than 1 when using soft wrap
- *
- * @param line the physical line
- * @return the screen line count
- */
- public final int getScreenLineCount(int line)
- {
- updateScreenLineCount(line);
- return screenLineMgr.getScreenLineCount(line);
- } //}}}
-
- //{{{ getScrollLineCount() method
- /**
- * Returns the number of displayable lines
- * It can be greater than the number of lines of the buffer when using
- * soft wrap (a line can count for n lines), or when using folding, if
- * the foldings are collapsed
- * @return the number of displayable lines
- */
- public final int getScrollLineCount()
- {
- return scrollLineCount.scrollLine;
- } //}}}
-
- //{{{ collapseFold() method
- /**
- * Collapses the fold at the specified physical line index.
- * @param line A physical line index
- * @since jEdit 4.2pre1
- */
- public void collapseFold(int line)
- {
- int lineCount = buffer.getLineCount();
- int end = lineCount - 1;
-
- // if the caret is on a collapsed fold, collapse the
- // parent fold
- if(line != 0
- && line != buffer.getLineCount() - 1
- && buffer.isFoldStart(line)
- && !isLineVisible(line + 1))
- {
- line--;
- }
-
- int initialFoldLevel = buffer.getFoldLevel(line);
-
- //{{{ Find fold start and end...
- int start = 0;
- if(line != lineCount - 1
- && buffer.getFoldLevel(line + 1) > initialFoldLevel)
- {
- // this line is the start of a fold
- start = line + 1;
-
- for(int i = line + 1; i < lineCount; i++)
- {
- if(buffer.getFoldLevel(i) <= initialFoldLevel)
- {
- end = i - 1;
- break;
- }
- }
- }
- else
- {
- boolean ok = false;
-
- // scan backwards looking for the start
- for(int i = line - 1; i >= 0; i--)
- {
- if(buffer.getFoldLevel(i) < initialFoldLevel)
- {
- start = i + 1;
- ok = true;
- break;
- }
- }
-
- if(!ok)
- {
- // no folds in buffer
- return;
- }
-
- for(int i = line + 1; i < lineCount; i++)
- {
- if(buffer.getFoldLevel(i) < initialFoldLevel)
- {
- end = i - 1;
- break;
- }
- }
- } //}}}
-
- // Collapse the fold...
- hideLineRange(start,end);
-
- notifyScreenLineChanges();
- textArea.foldStructureChanged();
- } //}}}
-
- //{{{ expandFold() method
- /**
- * Expands the fold at the specified physical line index.
- * @param line A physical line index
- * @param fully If true, all subfolds will also be expanded
- * @since jEdit 4.2pre1
- */
- public int expandFold(int line, boolean fully)
- {
- // the first sub-fold. used by JEditTextArea.expandFold().
- int returnValue = -1;
-
- int lineCount = buffer.getLineCount();
- int end = lineCount - 1;
-
- if (line == lineCount - 1)
- {
- return -1;
- }
- while (!isLineVisible(line))
- {
- int prevLine = folds.lookup(folds.search(line)) - 1;
- if (!isLineVisible(prevLine))
- {
- return -1;
- }
- expandFold(prevLine, fully);
- if (!isLineVisible(prevLine + 1))
- {
- return -1;
- }
- }
- if (isLineVisible(line+1) && !fully)
- {
- return -1;
- }
-
- //{{{ Find fold start and fold end...
- int start;
- int initialFoldLevel = buffer.getFoldLevel(line);
- if (buffer.getFoldLevel(line + 1) > initialFoldLevel)
- {
- // this line is the start of a fold
- start = line;
- if (!isLineVisible(line + 1) && folds.search(line + 1) != folds.count() - 1)
- {
- int index = folds.search(line + 1);
- end = folds.lookup(index + 1) - 1;
- }
- else
- {
- for (int i = line + 1; i < lineCount; i++)
- {
- if (buffer.getFoldLevel(i) <= initialFoldLevel)
- {
- end = i - 1;
- break;
- }
- }
- }
- }
- else
- {
- if (!fully)
- {
- return -1;
- }
- start = line;
- while (start > 0 && buffer.getFoldLevel(start) >= initialFoldLevel)
- {
- start--;
- }
- initialFoldLevel = buffer.getFoldLevel(start);
- for (int i = line + 1; i < lineCount; i++)
- {
- if (buffer.getFoldLevel(i) <= initialFoldLevel)
- {
- end = i - 1;
- break;
- }
- }
- } // }}}
-
- //{{{ Expand the fold...
- if(fully)
- {
- showLineRange(start,end);
- }
- else
- {
- for (int i = start + 1; i <= end;)
- {
- if (returnValue == -1 && buffer.isFoldStart(i))
- {
- returnValue = i;
- }
-
- showLineRange(i, i);
- int fold = buffer.getFoldLevel(i);
- i++;
- while (i <= end && buffer.getFoldLevel(i) > fold)
- {
- i++;
- }
- }
- } // }}}
-
- notifyScreenLineChanges();
- textArea.foldStructureChanged();
-
- return returnValue;
- } //}}}
-
- //{{{ expandAllFolds() method
- /**
- * Expands all folds.
- * @since jEdit 4.2pre1
- */
- public void expandAllFolds()
- {
- showLineRange(0,buffer.getLineCount() - 1);
- notifyScreenLineChanges();
- textArea.foldStructureChanged();
- } //}}}
-
- //{{{ expandFolds() method
- /**
- * This method should only be called from <code>actions.xml</code>.
- * @since jEdit 4.2pre1
- */
- public void expandFolds(char digit)
- {
- if(digit < '1' || digit > '9')
- {
- Toolkit.getDefaultToolkit().beep();
- }
- else
- expandFolds((digit - '1') + 1);
- } //}}}
-
- //{{{ expandFolds() method
- /**
- * Expands all folds with the specified fold level.
- * @param foldLevel The fold level
- * @since jEdit 4.2pre1
- */
- public void expandFolds(int foldLevel)
- {
- if(buffer.getFoldHandler() instanceof IndentFoldHandler)
- foldLevel = (foldLevel - 1) * buffer.getIndentSize() + 1;
-
- showLineRange(0,buffer.getLineCount() - 1);
-
- /* this ensures that the first line is always visible */
- boolean seenVisibleLine = false;
-
- int firstInvisible = 0;
-
- for(int i = 0; i < buffer.getLineCount(); i++)
- {
- if(!seenVisibleLine || buffer.getFoldLevel(i) < foldLevel)
- {
- if(firstInvisible != i)
- {
- hideLineRange(firstInvisible,
- i - 1);
- }
- firstInvisible = i + 1;
- seenVisibleLine = true;
- }
- }
-
- if(firstInvisible != buffer.getLineCount())
- hideLineRange(firstInvisible,buffer.getLineCount() - 1);
-
- notifyScreenLineChanges();
- if(textArea.getDisplayManager() == this)
- {
- textArea.foldStructureChanged();
- }
- } //}}}
-
- //{{{ narrow() method
- /**
- * Narrows the visible portion of the buffer to the specified
- * line range.
- * @param start The first line
- * @param end The last line
- * @since jEdit 4.2pre1
- */
- public void narrow(int start, int end)
- {
- if(start > end || start < 0 || end >= buffer.getLineCount())
- throw new ArrayIndexOutOfBoundsException(start + ", " + end);
-
- if(start < getFirstVisibleLine() || end > getLastVisibleLine())
- expandAllFolds();
-
- if(start != 0)
- hideLineRange(0,start - 1);
- if(end != buffer.getLineCount() - 1)
- hideLineRange(end + 1,buffer.getLineCount() - 1);
-
- // if we narrowed to a single collapsed fold
- if(start != buffer.getLineCount() - 1
- && !isLineVisible(start + 1))
- expandFold(start,false);
-
- textArea.fireNarrowActive();
-
- notifyScreenLineChanges();
- textArea.foldStructureChanged();
- } //}}}
-
- //{{{ Package-private members
- final FirstLine firstLine;
- final ScrollLineCount scrollLineCount;
- final ScreenLineManager screenLineMgr;
- RangeMap folds;
-
- //{{{ init() method
- void init()
- {
- if(initialized)
- {
- if(!buffer.isLoading())
- resetAnchors();
- }
- else
- {
- initialized = true;
- folds = new RangeMap();
- if(buffer.isLoading())
- folds.reset(buffer.getLineCount());
- else
- bufferHandler.foldHandlerChanged(buffer);
- notifyScreenLineChanges();
- }
- } //}}}
-
- //{{{ notifyScreenLineChanges() method
- void notifyScreenLineChanges()
- {
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"notifyScreenLineChanges()");
-
- // when the text area switches to us, it will do
- // a reset anyway
- if(textArea.getDisplayManager() != this)
- return;
-
- try
- {
- if(firstLine.callReset)
- firstLine.reset();
- else if(firstLine.callChanged)
- firstLine.changed();
-
- if(scrollLineCount.callReset)
- {
- scrollLineCount.reset();
- firstLine.ensurePhysicalLineIsVisible();
- }
- else if(scrollLineCount.callChanged)
- scrollLineCount.changed();
-
- if(firstLine.callChanged || scrollLineCount.callReset
- || scrollLineCount.callChanged)
- {
- textArea.updateScrollBar();
- textArea.recalculateLastPhysicalLine();
- }
- }
- finally
- {
- firstLine.callReset = firstLine.callChanged = false;
- scrollLineCount.callReset = scrollLineCount.callChanged = false;
- }
- } //}}}
-
- //{{{ setFirstLine() method
- void setFirstLine(int oldFirstLine, int firstLine)
- {
- int visibleLines = textArea.getVisibleLines();
-
- if(firstLine >= oldFirstLine + visibleLines)
- {
- this.firstLine.scrollDown(firstLine - oldFirstLine);
- textArea.chunkCache.invalidateAll();
- }
- else if(firstLine <= oldFirstLine - visibleLines)
- {
- this.firstLine.scrollUp(oldFirstLine - firstLine);
- textArea.chunkCache.invalidateAll();
- }
- else if(firstLine > oldFirstLine)
- {
- this.firstLine.scrollDown(firstLine - oldFirstLine);
- textArea.chunkCache.scrollDown(firstLine - oldFirstLine);
- }
- else if(firstLine < oldFirstLine)
- {
- this.firstLine.scrollUp(oldFirstLine - firstLine);
- textArea.chunkCache.scrollUp(oldFirstLine - firstLine);
- }
-
- notifyScreenLineChanges();
- } //}}}
-
- //{{{ setFirstPhysicalLine() method
- /**
- * Scroll from a given amount of lines.
- *
- * @param amount the amount of lines that must be scrolled
- * @param skew a skew within the given line
- */
- void setFirstPhysicalLine(int amount, int skew)
- {
- int oldFirstLine = textArea.getFirstLine();
-
- if(amount == 0)
- {
- skew -= this.firstLine.skew;
-
- // JEditTextArea.scrollTo() needs this to simplify
- // its code
- if(skew < 0)
- this.firstLine.scrollUp(-skew);
- else if(skew > 0)
- this.firstLine.scrollDown(skew);
- else
- {
- // nothing to do
- return;
- }
- }
- else if(amount > 0)
- this.firstLine.physDown(amount,skew);
- else if(amount < 0)
- this.firstLine.physUp(-amount,skew);
-
- int firstLine = textArea.getFirstLine();
- int visibleLines = textArea.getVisibleLines();
-
- if(firstLine == oldFirstLine)
- /* do nothing */;
- else if(firstLine >= oldFirstLine + visibleLines
- || firstLine <= oldFirstLine - visibleLines)
- {
- textArea.chunkCache.invalidateAll();
- }
- else if(firstLine > oldFirstLine)
- {
- textArea.chunkCache.scrollDown(firstLine - oldFirstLine);
- }
- else if(firstLine < oldFirstLine)
- {
- textArea.chunkCache.scrollUp(oldFirstLine - firstLine);
- }
-
- // we have to be careful
- notifyScreenLineChanges();
- } //}}}
-
- //{{{ invalidateScreenLineCounts() method
- void invalidateScreenLineCounts()
- {
- screenLineMgr.invalidateScreenLineCounts();
- firstLine.callReset = true;
- scrollLineCount.callReset = true;
- } //}}}
-
- //{{{ updateScreenLineCount() method
- void updateScreenLineCount(int line)
- {
- if(!screenLineMgr.isScreenLineCountValid(line))
- {
- int newCount = textArea.chunkCache
- .getLineSubregionCount(line);
-
- setScreenLineCount(line,newCount);
- }
- } //}}}
-
- //{{{ bufferLoaded() method
- void bufferLoaded()
- {
- folds.reset(buffer.getLineCount());
- screenLineMgr.reset();
-
- if(textArea.getDisplayManager() == this)
- {
- textArea.propertiesChanged();
- init();
- }
-
- int collapseFolds = buffer.getIntegerProperty(
- "collapseFolds",0);
- if(collapseFolds != 0)
- expandFolds(collapseFolds);
- } //}}}
-
- //{{{ foldHandlerChanged() method
- void foldHandlerChanged()
- {
- if(buffer.isLoading())
- return;
-
- folds.reset(buffer.getLineCount());
- resetAnchors();
-
- int collapseFolds = buffer.getIntegerProperty(
- "collapseFolds",0);
- if(collapseFolds != 0)
- expandFolds(collapseFolds);
- } //}}}
-
- //}}}
-
- //{{{ Private members
- private boolean initialized;
- private boolean inUse;
- private final JEditBuffer buffer;
- private final TextArea textArea;
- private final BufferHandler bufferHandler;
-
- //{{{ DisplayManager constructor
- private DisplayManager(JEditBuffer buffer, TextArea textArea,
- DisplayManager copy)
- {
- this.buffer = buffer;
- this.screenLineMgr = new ScreenLineManager(buffer);
- this.textArea = textArea;
-
- scrollLineCount = new ScrollLineCount(this,textArea);
- firstLine = new FirstLine(this,textArea);
-
- bufferHandler = new BufferHandler(this,textArea,buffer);
- // this listener priority thing is a bad hack...
- buffer.addBufferListener(bufferHandler, JEditBuffer.HIGH_PRIORITY);
-
- if(copy != null)
- {
- folds = new RangeMap(copy.folds);
- initialized = true;
- }
- } //}}}
-
- //{{{ resetAnchors() method
- private void resetAnchors()
- {
- firstLine.callReset = true;
- scrollLineCount.callReset = true;
- notifyScreenLineChanges();
- } //}}}
-
- //{{{ dispose() method
- private void dispose()
- {
- buffer.removeBufferListener(bufferHandler);
- } //}}}
-
- //{{{ showLineRange() method
- private void showLineRange(int start, int end)
- {
- if(Debug.FOLD_VIS_DEBUG)
- {
- Log.log(Log.DEBUG,this,"showLineRange(" + start
- + ',' + end + ')');
- }
-
- for(int i = start; i <= end; i++)
- {
- //XXX
- if(!isLineVisible(i))
- {
- // important: not screenLineMgr.getScreenLineCount()
- int screenLines = getScreenLineCount(i);
- if(firstLine.physicalLine >= i)
- {
- firstLine.scrollLine += screenLines;
- firstLine.callChanged = true;
- }
- scrollLineCount.scrollLine += screenLines;
- scrollLineCount.callChanged = true;
- }
- }
-
- /* update fold visibility map. */
- folds.show(start,end);
- } //}}}
-
- //{{{ hideLineRange() method
- private void hideLineRange(int start, int end)
- {
- if(Debug.FOLD_VIS_DEBUG)
- {
- Log.log(Log.DEBUG,this,"hideLineRange(" + start
- + ',' + end + ')');
- }
-
- int i = start;
- if(!isLineVisible(i))
- i = getNextVisibleLine(i);
- while(i != -1 && i <= end)
- {
- int screenLines = getScreenLineCount(i);
- if(i < firstLine.physicalLine)
- {
- firstLine.scrollLine -= screenLines;
- firstLine.skew = 0;
- firstLine.callChanged = true;
- }
-
- scrollLineCount.scrollLine -= screenLines;
- scrollLineCount.callChanged = true;
-
- i = getNextVisibleLine(i);
- }
-
- /* update fold visibility map. */
- folds.hide(start,end);
-
- if(!isLineVisible(firstLine.physicalLine))
- {
- int firstVisible = getFirstVisibleLine();
- if(firstLine.physicalLine < firstVisible)
- {
- firstLine.physicalLine = firstVisible;
- firstLine.scrollLine = 0;
- }
- else
- {
- firstLine.physicalLine = getPrevVisibleLine(
- firstLine.physicalLine);
- firstLine.scrollLine -= getScreenLineCount(
- firstLine.physicalLine);
- }
- firstLine.callChanged = true;
- }
- } //}}}
-
- //{{{ setScreenLineCount() method
- /**
- * Sets the number of screen lines that the specified physical line
- * is split into.
- * @param line the line number
- * @param count the line count (1 if no wrap)
- * @since jEdit 4.2pre1
- */
- private void setScreenLineCount(int line, int count)
- {
- int oldCount = screenLineMgr.getScreenLineCount(line);
-
- // old one so that the screen line manager sets the
- // validity flag!
-
- screenLineMgr.setScreenLineCount(line,count);
-
- if(count == oldCount)
- return;
-
- if(!isLineVisible(line))
- return;
-
- if(firstLine.physicalLine >= line)
- {
- if(firstLine.physicalLine == line)
- firstLine.callChanged = true;
- else
- {
- firstLine.scrollLine += count - oldCount;
- firstLine.callChanged = true;
- }
- }
-
- scrollLineCount.scrollLine += count - oldCount;
- scrollLineCount.callChanged = true;
- } //}}}
-
- //}}}
-}
+/*
+ * DisplayManager.java - Low-level text display
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import java.awt.Toolkit;
+import java.util.*;
+import org.gjt.sp.jedit.buffer.*;
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Manages low-level text display tasks, such as folding.
+ *
+ * @since jEdit 4.2pre1
+ * @author Slava Pestov
+ * @version $Id: DisplayManager.java 16114 2009-08-29 17:53:21Z kpouer $
+ */
+public class DisplayManager
+{
+ //{{{ Static part
+
+ //{{{ getDisplayManager() method
+ static DisplayManager getDisplayManager(JEditBuffer buffer,
+ TextArea textArea)
+ {
+ List<DisplayManager> l = bufferMap.get(buffer);
+ if(l == null)
+ {
+ l = new LinkedList<DisplayManager>();
+ bufferMap.put(buffer,l);
+ }
+
+ /* An existing display manager's fold visibility map
+ that a new display manager will inherit */
+ DisplayManager copy = null;
+ Iterator<DisplayManager> liter = l.iterator();
+ DisplayManager dmgr;
+ while(liter.hasNext())
+ {
+ dmgr = liter.next();
+ copy = dmgr;
+ if(!dmgr.inUse && dmgr.textArea == textArea)
+ {
+ dmgr.inUse = true;
+ return dmgr;
+ }
+ }
+
+ // if we got here, no unused display manager in list
+ dmgr = new DisplayManager(buffer,textArea,copy);
+ dmgr.inUse = true;
+ l.add(dmgr);
+
+ return dmgr;
+ } //}}}
+
+ //{{{ release() method
+ void release()
+ {
+ inUse = false;
+ } //}}}
+
+ //{{{ bufferClosed() method
+ public static void bufferClosed(JEditBuffer buffer)
+ {
+ bufferMap.remove(buffer);
+ } //}}}
+
+ //{{{ textAreaDisposed() method
+ static void textAreaDisposed(TextArea textArea)
+ {
+ for (List<DisplayManager> l : bufferMap.values())
+ {
+ Iterator<DisplayManager> liter = l.iterator();
+ while(liter.hasNext())
+ {
+ DisplayManager dmgr = liter.next();
+ if(dmgr.textArea == textArea)
+ {
+ dmgr.dispose();
+ liter.remove();
+ }
+ }
+ }
+ } //}}}
+
+ private static final Map<JEditBuffer, List<DisplayManager>> bufferMap = new HashMap<JEditBuffer, List<DisplayManager>>();
+ //}}}
+
+ //{{{ getBuffer() method
+ /**
+ * @since jEdit 4.3pre3
+ */
+ public JEditBuffer getBuffer()
+ {
+ return buffer;
+ } //}}}
+
+ //{{{ isLineVisible() method
+ /**
+ * Returns if the specified line is visible.
+ * @param line A physical line index
+ * @since jEdit 4.2pre1
+ */
+ public final boolean isLineVisible(int line)
+ {
+ return folds.search(line) % 2 == 0;
+ } //}}}
+
+ //{{{ getFirstVisibleLine() method
+ /**
+ * Returns the physical line number of the first visible line.
+ * @since jEdit 4.2pre1
+ */
+ public int getFirstVisibleLine()
+ {
+ return folds.first();
+ } //}}}
+
+ //{{{ getLastVisibleLine() method
+ /**
+ * Returns the physical line number of the last visible line.
+ * @since jEdit 4.2pre1
+ */
+ public int getLastVisibleLine()
+ {
+ return folds.last();
+ } //}}}
+
+ //{{{ getNextVisibleLine() method
+ /**
+ * Returns the next visible line after the specified line index,
+ * or (-1) if there is no next visible line.
+ * @param line A physical line index
+ * @since jEdit 4.0pre1
+ */
+ public int getNextVisibleLine(int line)
+ {
+ if(line < 0 || line >= buffer.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(line);
+
+ return folds.next(line);
+ } //}}}
+
+ //{{{ getPrevVisibleLine() method
+ /**
+ * Returns the previous visible line before the specified line index.
+ * @param line a physical line index
+ * @return the previous visible physical line or -1 if there is no visible line
+ * @since jEdit 4.0pre1
+ */
+ public int getPrevVisibleLine(int line)
+ {
+ if(line < 0 || line >= buffer.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(line);
+
+ return folds.prev(line);
+ } //}}}
+
+ //{{{ getScreenLineCount() method
+ /**
+ * Returns how many screen lines contains the given physical line.
+ * It can be greater than 1 when using soft wrap
+ *
+ * @param line the physical line
+ * @return the screen line count
+ */
+ public final int getScreenLineCount(int line)
+ {
+ updateScreenLineCount(line);
+ return screenLineMgr.getScreenLineCount(line);
+ } //}}}
+
+ //{{{ getScrollLineCount() method
+ /**
+ * Returns the number of displayable lines
+ * It can be greater than the number of lines of the buffer when using
+ * soft wrap (a line can count for n lines), or when using folding, if
+ * the foldings are collapsed
+ * @return the number of displayable lines
+ */
+ public final int getScrollLineCount()
+ {
+ return scrollLineCount.scrollLine;
+ } //}}}
+
+ //{{{ collapseFold() method
+ /**
+ * Collapses the fold at the specified physical line index.
+ * @param line A physical line index
+ * @since jEdit 4.2pre1
+ */
+ public void collapseFold(int line)
+ {
+ int lineCount = buffer.getLineCount();
+ int end = lineCount - 1;
+
+ // if the caret is on a collapsed fold, collapse the
+ // parent fold
+ if(line != 0
+ && line != buffer.getLineCount() - 1
+ && buffer.isFoldStart(line)
+ && !isLineVisible(line + 1))
+ {
+ line--;
+ }
+
+ int initialFoldLevel = buffer.getFoldLevel(line);
+
+ //{{{ Find fold start and end...
+ int start = 0;
+ if(line != lineCount - 1
+ && buffer.getFoldLevel(line + 1) > initialFoldLevel)
+ {
+ // this line is the start of a fold
+ start = line + 1;
+
+ for(int i = line + 1; i < lineCount; i++)
+ {
+ if(buffer.getFoldLevel(i) <= initialFoldLevel)
+ {
+ end = i - 1;
+ break;
+ }
+ }
+ }
+ else
+ {
+ boolean ok = false;
+
+ // scan backwards looking for the start
+ for(int i = line - 1; i >= 0; i--)
+ {
+ if(buffer.getFoldLevel(i) < initialFoldLevel)
+ {
+ start = i + 1;
+ ok = true;
+ break;
+ }
+ }
+
+ if(!ok)
+ {
+ // no folds in buffer
+ return;
+ }
+
+ for(int i = line + 1; i < lineCount; i++)
+ {
+ if(buffer.getFoldLevel(i) < initialFoldLevel)
+ {
+ end = i - 1;
+ break;
+ }
+ }
+ } //}}}
+
+ // Collapse the fold...
+ hideLineRange(start,end);
+
+ notifyScreenLineChanges();
+ textArea.foldStructureChanged();
+ } //}}}
+
+ //{{{ expandFold() method
+ /**
+ * Expands the fold at the specified physical line index.
+ * @param line A physical line index
+ * @param fully If true, all subfolds will also be expanded
+ * @since jEdit 4.2pre1
+ */
+ public int expandFold(int line, boolean fully)
+ {
+ // the first sub-fold. used by JEditTextArea.expandFold().
+ int returnValue = -1;
+
+ int lineCount = buffer.getLineCount();
+ int end = lineCount - 1;
+
+ if (line == lineCount - 1)
+ {
+ return -1;
+ }
+ while (!isLineVisible(line))
+ {
+ int prevLine = folds.lookup(folds.search(line)) - 1;
+ if (!isLineVisible(prevLine))
+ {
+ return -1;
+ }
+ expandFold(prevLine, fully);
+ if (!isLineVisible(prevLine + 1))
+ {
+ return -1;
+ }
+ }
+ if (isLineVisible(line+1) && !fully)
+ {
+ return -1;
+ }
+
+ //{{{ Find fold start and fold end...
+ int start;
+ int initialFoldLevel = buffer.getFoldLevel(line);
+ if (buffer.getFoldLevel(line + 1) > initialFoldLevel)
+ {
+ // this line is the start of a fold
+ start = line;
+ if (!isLineVisible(line + 1) && folds.search(line + 1) != folds.count() - 1)
+ {
+ int index = folds.search(line + 1);
+ end = folds.lookup(index + 1) - 1;
+ }
+ else
+ {
+ for (int i = line + 1; i < lineCount; i++)
+ {
+ if (buffer.getFoldLevel(i) <= initialFoldLevel)
+ {
+ end = i - 1;
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ if (!fully)
+ {
+ return -1;
+ }
+ start = line;
+ while (start > 0 && buffer.getFoldLevel(start) >= initialFoldLevel)
+ {
+ start--;
+ }
+ initialFoldLevel = buffer.getFoldLevel(start);
+ for (int i = line + 1; i < lineCount; i++)
+ {
+ if (buffer.getFoldLevel(i) <= initialFoldLevel)
+ {
+ end = i - 1;
+ break;
+ }
+ }
+ } // }}}
+
+ //{{{ Expand the fold...
+ if(fully)
+ {
+ showLineRange(start,end);
+ }
+ else
+ {
+ for (int i = start + 1; i <= end;)
+ {
+ if (returnValue == -1 && buffer.isFoldStart(i))
+ {
+ returnValue = i;
+ }
+
+ showLineRange(i, i);
+ int fold = buffer.getFoldLevel(i);
+ i++;
+ while (i <= end && buffer.getFoldLevel(i) > fold)
+ {
+ i++;
+ }
+ }
+ } // }}}
+
+ notifyScreenLineChanges();
+ textArea.foldStructureChanged();
+
+ return returnValue;
+ } //}}}
+
+ //{{{ expandAllFolds() method
+ /**
+ * Expands all folds.
+ * @since jEdit 4.2pre1
+ */
+ public void expandAllFolds()
+ {
+ showLineRange(0,buffer.getLineCount() - 1);
+ notifyScreenLineChanges();
+ textArea.foldStructureChanged();
+ } //}}}
+
+ //{{{ expandFolds() method
+ /**
+ * This method should only be called from <code>actions.xml</code>.
+ * @since jEdit 4.2pre1
+ */
+ public void expandFolds(char digit)
+ {
+ if(digit < '1' || digit > '9')
+ {
+ Toolkit.getDefaultToolkit().beep();
+ }
+ else
+ expandFolds((digit - '1') + 1);
+ } //}}}
+
+ //{{{ expandFolds() method
+ /**
+ * Expands all folds with the specified fold level.
+ * @param foldLevel The fold level
+ * @since jEdit 4.2pre1
+ */
+ public void expandFolds(int foldLevel)
+ {
+ if(buffer.getFoldHandler() instanceof IndentFoldHandler)
+ foldLevel = (foldLevel - 1) * buffer.getIndentSize() + 1;
+
+ showLineRange(0,buffer.getLineCount() - 1);
+
+ /* this ensures that the first line is always visible */
+ boolean seenVisibleLine = false;
+
+ int firstInvisible = 0;
+
+ for(int i = 0; i < buffer.getLineCount(); i++)
+ {
+ if(!seenVisibleLine || buffer.getFoldLevel(i) < foldLevel)
+ {
+ if(firstInvisible != i)
+ {
+ hideLineRange(firstInvisible,
+ i - 1);
+ }
+ firstInvisible = i + 1;
+ seenVisibleLine = true;
+ }
+ }
+
+ if(firstInvisible != buffer.getLineCount())
+ hideLineRange(firstInvisible,buffer.getLineCount() - 1);
+
+ notifyScreenLineChanges();
+ if(textArea.getDisplayManager() == this)
+ {
+ textArea.foldStructureChanged();
+ }
+ } //}}}
+
+ //{{{ narrow() method
+ /**
+ * Narrows the visible portion of the buffer to the specified
+ * line range.
+ * @param start The first line
+ * @param end The last line
+ * @since jEdit 4.2pre1
+ */
+ public void narrow(int start, int end)
+ {
+ if(start > end || start < 0 || end >= buffer.getLineCount())
+ throw new ArrayIndexOutOfBoundsException(start + ", " + end);
+
+ if(start < getFirstVisibleLine() || end > getLastVisibleLine())
+ expandAllFolds();
+
+ if(start != 0)
+ hideLineRange(0,start - 1);
+ if(end != buffer.getLineCount() - 1)
+ hideLineRange(end + 1,buffer.getLineCount() - 1);
+
+ // if we narrowed to a single collapsed fold
+ if(start != buffer.getLineCount() - 1
+ && !isLineVisible(start + 1))
+ expandFold(start,false);
+
+ textArea.fireNarrowActive();
+
+ notifyScreenLineChanges();
+ textArea.foldStructureChanged();
+ } //}}}
+
+ //{{{ Package-private members
+ final FirstLine firstLine;
+ final ScrollLineCount scrollLineCount;
+ final ScreenLineManager screenLineMgr;
+ RangeMap folds;
+
+ //{{{ init() method
+ void init()
+ {
+ if(initialized)
+ {
+ if(!buffer.isLoading())
+ resetAnchors();
+ }
+ else
+ {
+ initialized = true;
+ folds = new RangeMap();
+ if(buffer.isLoading())
+ folds.reset(buffer.getLineCount());
+ else
+ bufferHandler.foldHandlerChanged(buffer);
+ notifyScreenLineChanges();
+ }
+ } //}}}
+
+ //{{{ notifyScreenLineChanges() method
+ void notifyScreenLineChanges()
+ {
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"notifyScreenLineChanges()");
+
+ // when the text area switches to us, it will do
+ // a reset anyway
+ if(textArea.getDisplayManager() != this)
+ return;
+
+ try
+ {
+ if(firstLine.callReset)
+ firstLine.reset();
+ else if(firstLine.callChanged)
+ firstLine.changed();
+
+ if(scrollLineCount.callReset)
+ {
+ scrollLineCount.reset();
+ firstLine.ensurePhysicalLineIsVisible();
+ }
+ else if(scrollLineCount.callChanged)
+ scrollLineCount.changed();
+
+ if(firstLine.callChanged || scrollLineCount.callReset
+ || scrollLineCount.callChanged)
+ {
+ textArea.updateScrollBar();
+ textArea.recalculateLastPhysicalLine();
+ }
+ }
+ finally
+ {
+ firstLine.callReset = firstLine.callChanged = false;
+ scrollLineCount.callReset = scrollLineCount.callChanged = false;
+ }
+ } //}}}
+
+ //{{{ setFirstLine() method
+ void setFirstLine(int oldFirstLine, int firstLine)
+ {
+ int visibleLines = textArea.getVisibleLines();
+
+ if(firstLine >= oldFirstLine + visibleLines)
+ {
+ this.firstLine.scrollDown(firstLine - oldFirstLine);
+ textArea.chunkCache.invalidateAll();
+ }
+ else if(firstLine <= oldFirstLine - visibleLines)
+ {
+ this.firstLine.scrollUp(oldFirstLine - firstLine);
+ textArea.chunkCache.invalidateAll();
+ }
+ else if(firstLine > oldFirstLine)
+ {
+ this.firstLine.scrollDown(firstLine - oldFirstLine);
+ textArea.chunkCache.scrollDown(firstLine - oldFirstLine);
+ }
+ else if(firstLine < oldFirstLine)
+ {
+ this.firstLine.scrollUp(oldFirstLine - firstLine);
+ textArea.chunkCache.scrollUp(oldFirstLine - firstLine);
+ }
+
+ notifyScreenLineChanges();
+ } //}}}
+
+ //{{{ setFirstPhysicalLine() method
+ /**
+ * Scroll from a given amount of lines.
+ *
+ * @param amount the amount of lines that must be scrolled
+ * @param skew a skew within the given line
+ */
+ void setFirstPhysicalLine(int amount, int skew)
+ {
+ int oldFirstLine = textArea.getFirstLine();
+
+ if(amount == 0)
+ {
+ skew -= this.firstLine.skew;
+
+ // JEditTextArea.scrollTo() needs this to simplify
+ // its code
+ if(skew < 0)
+ this.firstLine.scrollUp(-skew);
+ else if(skew > 0)
+ this.firstLine.scrollDown(skew);
+ else
+ {
+ // nothing to do
+ return;
+ }
+ }
+ else if(amount > 0)
+ this.firstLine.physDown(amount,skew);
+ else if(amount < 0)
+ this.firstLine.physUp(-amount,skew);
+
+ int firstLine = textArea.getFirstLine();
+ int visibleLines = textArea.getVisibleLines();
+
+ if(firstLine == oldFirstLine)
+ /* do nothing */;
+ else if(firstLine >= oldFirstLine + visibleLines
+ || firstLine <= oldFirstLine - visibleLines)
+ {
+ textArea.chunkCache.invalidateAll();
+ }
+ else if(firstLine > oldFirstLine)
+ {
+ textArea.chunkCache.scrollDown(firstLine - oldFirstLine);
+ }
+ else if(firstLine < oldFirstLine)
+ {
+ textArea.chunkCache.scrollUp(oldFirstLine - firstLine);
+ }
+
+ // we have to be careful
+ notifyScreenLineChanges();
+ } //}}}
+
+ //{{{ invalidateScreenLineCounts() method
+ void invalidateScreenLineCounts()
+ {
+ screenLineMgr.invalidateScreenLineCounts();
+ firstLine.callReset = true;
+ scrollLineCount.callReset = true;
+ } //}}}
+
+ //{{{ updateScreenLineCount() method
+ void updateScreenLineCount(int line)
+ {
+ if(!screenLineMgr.isScreenLineCountValid(line))
+ {
+ int newCount = textArea.chunkCache
+ .getLineSubregionCount(line);
+
+ setScreenLineCount(line,newCount);
+ }
+ } //}}}
+
+ //{{{ bufferLoaded() method
+ void bufferLoaded()
+ {
+ folds.reset(buffer.getLineCount());
+ screenLineMgr.reset();
+
+ if(textArea.getDisplayManager() == this)
+ {
+ textArea.propertiesChanged();
+ init();
+ }
+
+ int collapseFolds = buffer.getIntegerProperty(
+ "collapseFolds",0);
+ if(collapseFolds != 0)
+ expandFolds(collapseFolds);
+ } //}}}
+
+ //{{{ foldHandlerChanged() method
+ void foldHandlerChanged()
+ {
+ if(buffer.isLoading())
+ return;
+
+ folds.reset(buffer.getLineCount());
+ resetAnchors();
+
+ int collapseFolds = buffer.getIntegerProperty(
+ "collapseFolds",0);
+ if(collapseFolds != 0)
+ expandFolds(collapseFolds);
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+ private boolean initialized;
+ private boolean inUse;
+ private final JEditBuffer buffer;
+ private final TextArea textArea;
+ private final BufferHandler bufferHandler;
+
+ //{{{ DisplayManager constructor
+ private DisplayManager(JEditBuffer buffer, TextArea textArea,
+ DisplayManager copy)
+ {
+ this.buffer = buffer;
+ this.screenLineMgr = new ScreenLineManager(buffer);
+ this.textArea = textArea;
+
+ scrollLineCount = new ScrollLineCount(this,textArea);
+ firstLine = new FirstLine(this,textArea);
+
+ bufferHandler = new BufferHandler(this,textArea,buffer);
+ // this listener priority thing is a bad hack...
+ buffer.addBufferListener(bufferHandler, JEditBuffer.HIGH_PRIORITY);
+
+ if(copy != null)
+ {
+ folds = new RangeMap(copy.folds);
+ initialized = true;
+ }
+ } //}}}
+
+ //{{{ resetAnchors() method
+ private void resetAnchors()
+ {
+ firstLine.callReset = true;
+ scrollLineCount.callReset = true;
+ notifyScreenLineChanges();
+ } //}}}
+
+ //{{{ dispose() method
+ private void dispose()
+ {
+ buffer.removeBufferListener(bufferHandler);
+ } //}}}
+
+ //{{{ showLineRange() method
+ private void showLineRange(int start, int end)
+ {
+ if(Debug.FOLD_VIS_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"showLineRange(" + start
+ + ',' + end + ')');
+ }
+
+ for(int i = start; i <= end; i++)
+ {
+ //XXX
+ if(!isLineVisible(i))
+ {
+ // important: not screenLineMgr.getScreenLineCount()
+ int screenLines = getScreenLineCount(i);
+ if(firstLine.physicalLine >= i)
+ {
+ firstLine.scrollLine += screenLines;
+ firstLine.callChanged = true;
+ }
+ scrollLineCount.scrollLine += screenLines;
+ scrollLineCount.callChanged = true;
+ }
+ }
+
+ /* update fold visibility map. */
+ folds.show(start,end);
+ } //}}}
+
+ //{{{ hideLineRange() method
+ private void hideLineRange(int start, int end)
+ {
+ if(Debug.FOLD_VIS_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"hideLineRange(" + start
+ + ',' + end + ')');
+ }
+
+ int i = start;
+ if(!isLineVisible(i))
+ i = getNextVisibleLine(i);
+ while(i != -1 && i <= end)
+ {
+ int screenLines = getScreenLineCount(i);
+ if(i < firstLine.physicalLine)
+ {
+ firstLine.scrollLine -= screenLines;
+ firstLine.skew = 0;
+ firstLine.callChanged = true;
+ }
+
+ scrollLineCount.scrollLine -= screenLines;
+ scrollLineCount.callChanged = true;
+
+ i = getNextVisibleLine(i);
+ }
+
+ /* update fold visibility map. */
+ folds.hide(start,end);
+
+ if(!isLineVisible(firstLine.physicalLine))
+ {
+ int firstVisible = getFirstVisibleLine();
+ if(firstLine.physicalLine < firstVisible)
+ {
+ firstLine.physicalLine = firstVisible;
+ firstLine.scrollLine = 0;
+ }
+ else
+ {
+ firstLine.physicalLine = getPrevVisibleLine(
+ firstLine.physicalLine);
+ firstLine.scrollLine -= getScreenLineCount(
+ firstLine.physicalLine);
+ }
+ firstLine.callChanged = true;
+ }
+ } //}}}
+
+ //{{{ setScreenLineCount() method
+ /**
+ * Sets the number of screen lines that the specified physical line
+ * is split into.
+ * @param line the line number
+ * @param count the line count (1 if no wrap)
+ * @since jEdit 4.2pre1
+ */
+ private void setScreenLineCount(int line, int count)
+ {
+ int oldCount = screenLineMgr.getScreenLineCount(line);
+
+ // old one so that the screen line manager sets the
+ // validity flag!
+
+ screenLineMgr.setScreenLineCount(line,count);
+
+ if(count == oldCount)
+ return;
+
+ if(!isLineVisible(line))
+ return;
+
+ if(firstLine.physicalLine >= line)
+ {
+ if(firstLine.physicalLine == line)
+ firstLine.callChanged = true;
+ else
+ {
+ firstLine.scrollLine += count - oldCount;
+ firstLine.callChanged = true;
+ }
+ }
+
+ scrollLineCount.scrollLine += count - oldCount;
+ scrollLineCount.callChanged = true;
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/ExtensionManager.java b/jEdit/org/gjt/sp/jedit/textarea/ExtensionManager.java
index 24947b8..a3d7b8f 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/ExtensionManager.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/ExtensionManager.java
@@ -1,186 +1,186 @@
-/*
- * ExtensionManager.java -
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-import java.awt.Graphics2D;
-import java.util.*;
-import org.gjt.sp.util.Log;
-
-/**
- * Manage the extensions for the gutter and the textarea.
- *
- * @author Slava Pestov
- * @version $Id: ExtensionManager.java 16346 2009-10-14 10:35:10Z kpouer $
- */
-class ExtensionManager
-{
- //{{{ addExtension() method
- /**
- * Add an extension.
- * See {@link Gutter} and {@link TextAreaPainter} to know the layers
- *
- * @param layer the layer. It could be defined in Gutter or TextAreaPainter
- * @param ext the extension to add
- */
- void addExtension(int layer, TextAreaExtension ext)
- {
- Entry entry = new Entry(layer,ext);
-
- int i = 0;
- for (Entry extension : extensions)
- {
- int _layer = extension.layer;
- if (layer < _layer)
- {
- extensions.add(i, entry);
- return;
- }
- i++;
- }
-
- extensions.add(entry);
- } //}}}
-
- //{{{ removeExtension() method
- void removeExtension(TextAreaExtension ext)
- {
- Iterator<Entry> iter = extensions.iterator();
- while(iter.hasNext())
- {
- if(iter.next().ext == ext)
- {
- iter.remove();
- return;
- }
- }
- } //}}}
-
- //{{{ getExtensions() method
- TextAreaExtension[] getExtensions()
- {
- TextAreaExtension[] retVal = new TextAreaExtension[
- extensions.size()];
- Iterator<Entry> iter = extensions.iterator();
- int i = 0;
- while(iter.hasNext())
- retVal[i++] = iter.next().ext;
-
- return retVal;
- } //}}}
-
- //{{{ paintScreenLineRange() method
- void paintScreenLineRange(TextArea textArea, Graphics2D gfx,
- int firstLine, int lastLine, int y, int lineHeight)
- {
- try
- {
- int[] physicalLines = new int[lastLine - firstLine + 1];
- int[] start = new int[physicalLines.length];
- int[] end = new int[physicalLines.length];
-
- for(int i = 0; i < physicalLines.length; i++)
- {
- int screenLine = i + firstLine;
- ChunkCache.LineInfo lineInfo = textArea
- .chunkCache.getLineInfo(screenLine);
-
- if(lineInfo.physicalLine == -1)
- physicalLines[i] = -1;
- else
- {
- physicalLines[i] = lineInfo.physicalLine;
- start[i] = textArea.getScreenLineStartOffset(screenLine);
- end[i] = textArea.getScreenLineEndOffset(screenLine);
- }
- }
-
- paintScreenLineRange(gfx,firstLine,lastLine,physicalLines,
- start,end,y,lineHeight);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,"Error repainting line"
- + " range {" + firstLine + ','
- + lastLine + "}:");
- Log.log(Log.ERROR,this,e);
- }
- } //}}}
-
- //{{{ getToolTipText() method
- String getToolTipText(int x, int y)
- {
- for(int i = 0; i < extensions.size(); i++)
- {
- TextAreaExtension ext = extensions.get(i).ext;
- String toolTip = ext.getToolTipText(x,y);
- if(toolTip != null)
- return toolTip;
- }
-
- return null;
- } //}}}
-
- //{{{ Private members
- private final List<Entry> extensions = new LinkedList<Entry>();
-
- //{{{ paintScreenLineRange() method
- private void paintScreenLineRange(Graphics2D gfx, int firstLine,
- int lastLine, int[] physicalLines, int[] start, int[] end,
- int y, int lineHeight)
- {
- Iterator<Entry> iter = extensions.iterator();
- while(iter.hasNext())
- {
- TextAreaExtension ext = iter.next().ext;
- try
- {
- ext.paintScreenLineRange(gfx,firstLine,lastLine,
- physicalLines,start,end,y,lineHeight);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,t);
-
- // remove it so editor can continue
- // functioning
- iter.remove();
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Entry class
- /** This class represents an extension with his layer. */
- static class Entry
- {
- int layer;
- TextAreaExtension ext;
-
- Entry(int layer, TextAreaExtension ext)
- {
- this.layer = layer;
- this.ext = ext;
- }
- } //}}}
-}
+/*
+ * ExtensionManager.java -
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+import java.awt.Graphics2D;
+import java.util.*;
+import org.gjt.sp.util.Log;
+
+/**
+ * Manage the extensions for the gutter and the textarea.
+ *
+ * @author Slava Pestov
+ * @version $Id: ExtensionManager.java 16346 2009-10-14 10:35:10Z kpouer $
+ */
+class ExtensionManager
+{
+ //{{{ addExtension() method
+ /**
+ * Add an extension.
+ * See {@link Gutter} and {@link TextAreaPainter} to know the layers
+ *
+ * @param layer the layer. It could be defined in Gutter or TextAreaPainter
+ * @param ext the extension to add
+ */
+ void addExtension(int layer, TextAreaExtension ext)
+ {
+ Entry entry = new Entry(layer,ext);
+
+ int i = 0;
+ for (Entry extension : extensions)
+ {
+ int _layer = extension.layer;
+ if (layer < _layer)
+ {
+ extensions.add(i, entry);
+ return;
+ }
+ i++;
+ }
+
+ extensions.add(entry);
+ } //}}}
+
+ //{{{ removeExtension() method
+ void removeExtension(TextAreaExtension ext)
+ {
+ Iterator<Entry> iter = extensions.iterator();
+ while(iter.hasNext())
+ {
+ if(iter.next().ext == ext)
+ {
+ iter.remove();
+ return;
+ }
+ }
+ } //}}}
+
+ //{{{ getExtensions() method
+ TextAreaExtension[] getExtensions()
+ {
+ TextAreaExtension[] retVal = new TextAreaExtension[
+ extensions.size()];
+ Iterator<Entry> iter = extensions.iterator();
+ int i = 0;
+ while(iter.hasNext())
+ retVal[i++] = iter.next().ext;
+
+ return retVal;
+ } //}}}
+
+ //{{{ paintScreenLineRange() method
+ void paintScreenLineRange(TextArea textArea, Graphics2D gfx,
+ int firstLine, int lastLine, int y, int lineHeight)
+ {
+ try
+ {
+ int[] physicalLines = new int[lastLine - firstLine + 1];
+ int[] start = new int[physicalLines.length];
+ int[] end = new int[physicalLines.length];
+
+ for(int i = 0; i < physicalLines.length; i++)
+ {
+ int screenLine = i + firstLine;
+ ChunkCache.LineInfo lineInfo = textArea
+ .chunkCache.getLineInfo(screenLine);
+
+ if(lineInfo.physicalLine == -1)
+ physicalLines[i] = -1;
+ else
+ {
+ physicalLines[i] = lineInfo.physicalLine;
+ start[i] = textArea.getScreenLineStartOffset(screenLine);
+ end[i] = textArea.getScreenLineEndOffset(screenLine);
+ }
+ }
+
+ paintScreenLineRange(gfx,firstLine,lastLine,physicalLines,
+ start,end,y,lineHeight);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,"Error repainting line"
+ + " range {" + firstLine + ','
+ + lastLine + "}:");
+ Log.log(Log.ERROR,this,e);
+ }
+ } //}}}
+
+ //{{{ getToolTipText() method
+ String getToolTipText(int x, int y)
+ {
+ for(int i = 0; i < extensions.size(); i++)
+ {
+ TextAreaExtension ext = extensions.get(i).ext;
+ String toolTip = ext.getToolTipText(x,y);
+ if(toolTip != null)
+ return toolTip;
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ Private members
+ private final List<Entry> extensions = new LinkedList<Entry>();
+
+ //{{{ paintScreenLineRange() method
+ private void paintScreenLineRange(Graphics2D gfx, int firstLine,
+ int lastLine, int[] physicalLines, int[] start, int[] end,
+ int y, int lineHeight)
+ {
+ Iterator<Entry> iter = extensions.iterator();
+ while(iter.hasNext())
+ {
+ TextAreaExtension ext = iter.next().ext;
+ try
+ {
+ ext.paintScreenLineRange(gfx,firstLine,lastLine,
+ physicalLines,start,end,y,lineHeight);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,t);
+
+ // remove it so editor can continue
+ // functioning
+ iter.remove();
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Entry class
+ /** This class represents an extension with his layer. */
+ static class Entry
+ {
+ int layer;
+ TextAreaExtension ext;
+
+ Entry(int layer, TextAreaExtension ext)
+ {
+ this.layer = layer;
+ this.ext = ext;
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/FirstLine.java b/jEdit/org/gjt/sp/jedit/textarea/FirstLine.java
index 6ed0a8d..c0ba990 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/FirstLine.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/FirstLine.java
@@ -1,364 +1,364 @@
-/*
- * FirstLine.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.util.Log;
-
-/**
- * This Anchor is the first visible line of the textarea.
- *
- * @author Slava Pestov
- * @version $Id: FirstLine.java 15570 2009-06-25 00:43:57Z ezust $
- */
-class FirstLine extends Anchor
-{
- /** The skew is the scroll count from the beginning of the line. Used with soft wrap. */
- int skew;
-
- //{{{ FirstLine constructor
- FirstLine(DisplayManager displayManager,
- TextArea textArea)
- {
- super(displayManager,textArea);
- } //}}}
-
- //{{{ changed() method
- @Override
- public void changed()
- {
- //{{{ Debug code
- if(Debug.SCROLL_DEBUG)
- {
- Log.log(Log.DEBUG,this,"changed() before: "
- + physicalLine + ':' + scrollLine
- + ':' + skew);
- } //}}}
-
- ensurePhysicalLineIsVisible();
-
- int screenLines = displayManager
- .getScreenLineCount(physicalLine);
- if(skew >= screenLines)
- skew = screenLines - 1;
-
- //{{{ Debug code
- if(Debug.SCROLL_VERIFY)
- {
- System.err.println("SCROLL_VERIFY");
- int verifyScrollLine = 0;
-
- for(int i = 0; i < displayManager.getBuffer()
- .getLineCount(); i++)
- {
- if(!displayManager.isLineVisible(i))
- continue;
-
- if(i >= physicalLine)
- break;
-
- verifyScrollLine += displayManager
- .getScreenLineCount(i);
- }
-
- if(verifyScrollLine != scrollLine)
- {
- Exception ex = new Exception(scrollLine + ":" + verifyScrollLine);
- Log.log(Log.ERROR,this,ex);
- }
- }
-
- if(Debug.SCROLL_DEBUG)
- {
- Log.log(Log.DEBUG,this,"changed() after: "
- + physicalLine + ':' + scrollLine
- + ':' + skew);
- } //}}}
- } //}}}
-
- //{{{ reset() method
- @Override
- public void reset()
- {
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"reset()");
-
- int oldPhysicalLine = physicalLine;
- physicalLine = 0;
- scrollLine = 0;
-
- int i = displayManager.getFirstVisibleLine();
-
- for(;;)
- {
- if(i >= oldPhysicalLine)
- break;
-
- scrollLine += displayManager.getScreenLineCount(i);
-
- int nextLine = displayManager.getNextVisibleLine(i);
- if(nextLine == -1)
- break;
- else
- i = nextLine;
- }
-
- physicalLine = i;
-
- int screenLines = displayManager.getScreenLineCount(physicalLine);
- if(skew >= screenLines)
- skew = screenLines - 1;
-
- textArea.updateScrollBar();
- } //}}}
-
- //{{{ physDown() method
- // scroll down by physical line amount
- void physDown(int amount, int screenAmount)
- {
- if(Debug.SCROLL_DEBUG)
- {
- Log.log(Log.DEBUG,this,"physDown() start: "
- + physicalLine + ':' + scrollLine);
- }
-
- skew = 0;
-
- if(!displayManager.isLineVisible(physicalLine))
- {
- int lastVisibleLine = displayManager.getLastVisibleLine();
- if(physicalLine > lastVisibleLine)
- physicalLine = lastVisibleLine;
- else
- {
- int nextPhysicalLine = displayManager.getNextVisibleLine(physicalLine);
- amount -= nextPhysicalLine - physicalLine;
- scrollLine += displayManager.getScreenLineCount(physicalLine);
- physicalLine = nextPhysicalLine;
- }
- }
-
- for(;;)
- {
- int nextPhysicalLine = displayManager.getNextVisibleLine(
- physicalLine);
- if(nextPhysicalLine == -1)
- break;
- else if(nextPhysicalLine > physicalLine + amount)
- break;
- else
- {
- scrollLine += displayManager.getScreenLineCount(physicalLine);
- amount -= nextPhysicalLine - physicalLine;
- physicalLine = nextPhysicalLine;
- }
- }
-
- if(Debug.SCROLL_DEBUG)
- {
- Log.log(Log.DEBUG,this,"physDown() end: "
- + physicalLine + ':' + scrollLine);
- }
-
- callChanged = true;
-
- // JEditTextArea.scrollTo() needs this to simplify
- // its code
- if(screenAmount < 0)
- scrollUp(-screenAmount);
- else if(screenAmount > 0)
- scrollDown(screenAmount);
- } //}}}
-
- //{{{ physUp() method
- // scroll up by physical line amount
- void physUp(int amount, int screenAmount)
- {
- if(Debug.SCROLL_DEBUG)
- {
- Log.log(Log.DEBUG,this,"physUp() start: "
- + physicalLine + ':' + scrollLine);
- }
-
- skew = 0;
-
- if(!displayManager.isLineVisible(physicalLine))
- {
- int firstVisibleLine = displayManager.getFirstVisibleLine();
- if(physicalLine < firstVisibleLine)
- physicalLine = firstVisibleLine;
- else
- {
- int prevPhysicalLine = displayManager.getPrevVisibleLine(physicalLine);
- amount -= physicalLine - prevPhysicalLine;
- }
- }
-
- for(;;)
- {
- int prevPhysicalLine = displayManager.getPrevVisibleLine(
- physicalLine);
- if(prevPhysicalLine == -1)
- break;
- else if(prevPhysicalLine < physicalLine - amount)
- break;
- else
- {
- amount -= physicalLine - prevPhysicalLine;
- physicalLine = prevPhysicalLine;
- scrollLine -= displayManager.getScreenLineCount(
- prevPhysicalLine);
- }
- }
-
- if(Debug.SCROLL_DEBUG)
- {
- Log.log(Log.DEBUG,this,"physUp() end: "
- + physicalLine + ':' + scrollLine);
- }
-
- callChanged = true;
-
- // JEditTextArea.scrollTo() needs this to simplify
- // its code
- if(screenAmount < 0)
- scrollUp(-screenAmount);
- else if(screenAmount > 0)
- scrollDown(screenAmount);
- } //}}}
-
- //{{{ scrollDown() method
- // scroll down by screen line amount
- void scrollDown(int amount)
- {
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"scrollDown()");
-
- ensurePhysicalLineIsVisible();
-
- amount += skew;
-
- skew = 0;
-
- while(amount > 0)
- {
- int screenLines = displayManager.getScreenLineCount(physicalLine);
- if(amount < screenLines)
- {
- skew = amount;
- break;
- }
- else
- {
- int nextLine = displayManager.getNextVisibleLine(physicalLine);
- if(nextLine == -1)
- break;
- boolean visible = displayManager.isLineVisible(physicalLine);
- physicalLine = nextLine;
- if(visible)
- {
- amount -= screenLines;
- scrollLine += screenLines;
- }
- }
- }
-
- callChanged = true;
- } //}}}
-
- //{{{ scrollUp() method
- // scroll up by screen line amount
- void scrollUp(int amount)
- {
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"scrollUp() before:" + this);
-
- ensurePhysicalLineIsVisible();
-
- if(amount <= skew)
- {
- // the amount is less than the skew, so we stay in the same like, just going
- // upper
- skew -= amount;
- }
- else
- {
- // moving to the first screen line of the current physical line
- amount -= skew;
- skew = 0;
-
- while(amount > 0)
- {
- int prevLine = displayManager.getPrevVisibleLine(physicalLine);
- if(prevLine == -1)
- break;
- // moving to the previous visible physical line
- physicalLine = prevLine;
-
- int screenLines = displayManager.getScreenLineCount(physicalLine);
- scrollLine -= screenLines;
- if(amount < screenLines)
- {
- skew = screenLines - amount;
- break;
- }
- else
- amount -= screenLines;
- }
- }
-
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"scrollUp() after:" + this);
- callChanged = true;
- } //}}}
-
- //{{{ ensurePhysicalLineIsVisible() method
- void ensurePhysicalLineIsVisible()
- {
- if(!displayManager.isLineVisible(physicalLine))
- {
- if(physicalLine > displayManager.getLastVisibleLine())
- {
- physicalLine = displayManager.getLastVisibleLine();
- scrollLine = displayManager.getScrollLineCount() - 1;
- }
- else if(physicalLine < displayManager.getFirstVisibleLine())
- {
- physicalLine = displayManager.getFirstVisibleLine();
- scrollLine = 0;
- }
- else
- {
- physicalLine = displayManager.getNextVisibleLine(physicalLine);
- scrollLine += displayManager.getScreenLineCount(physicalLine);
- }
- }
- } //}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- return "FirstLine["+physicalLine+','+scrollLine+','+skew+']';
- } //}}}
-}
+/*
+ * FirstLine.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.util.Log;
+
+/**
+ * This Anchor is the first visible line of the textarea.
+ *
+ * @author Slava Pestov
+ * @version $Id: FirstLine.java 15570 2009-06-25 00:43:57Z ezust $
+ */
+class FirstLine extends Anchor
+{
+ /** The skew is the scroll count from the beginning of the line. Used with soft wrap. */
+ int skew;
+
+ //{{{ FirstLine constructor
+ FirstLine(DisplayManager displayManager,
+ TextArea textArea)
+ {
+ super(displayManager,textArea);
+ } //}}}
+
+ //{{{ changed() method
+ @Override
+ public void changed()
+ {
+ //{{{ Debug code
+ if(Debug.SCROLL_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"changed() before: "
+ + physicalLine + ':' + scrollLine
+ + ':' + skew);
+ } //}}}
+
+ ensurePhysicalLineIsVisible();
+
+ int screenLines = displayManager
+ .getScreenLineCount(physicalLine);
+ if(skew >= screenLines)
+ skew = screenLines - 1;
+
+ //{{{ Debug code
+ if(Debug.SCROLL_VERIFY)
+ {
+ System.err.println("SCROLL_VERIFY");
+ int verifyScrollLine = 0;
+
+ for(int i = 0; i < displayManager.getBuffer()
+ .getLineCount(); i++)
+ {
+ if(!displayManager.isLineVisible(i))
+ continue;
+
+ if(i >= physicalLine)
+ break;
+
+ verifyScrollLine += displayManager
+ .getScreenLineCount(i);
+ }
+
+ if(verifyScrollLine != scrollLine)
+ {
+ Exception ex = new Exception(scrollLine + ":" + verifyScrollLine);
+ Log.log(Log.ERROR,this,ex);
+ }
+ }
+
+ if(Debug.SCROLL_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"changed() after: "
+ + physicalLine + ':' + scrollLine
+ + ':' + skew);
+ } //}}}
+ } //}}}
+
+ //{{{ reset() method
+ @Override
+ public void reset()
+ {
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"reset()");
+
+ int oldPhysicalLine = physicalLine;
+ physicalLine = 0;
+ scrollLine = 0;
+
+ int i = displayManager.getFirstVisibleLine();
+
+ for(;;)
+ {
+ if(i >= oldPhysicalLine)
+ break;
+
+ scrollLine += displayManager.getScreenLineCount(i);
+
+ int nextLine = displayManager.getNextVisibleLine(i);
+ if(nextLine == -1)
+ break;
+ else
+ i = nextLine;
+ }
+
+ physicalLine = i;
+
+ int screenLines = displayManager.getScreenLineCount(physicalLine);
+ if(skew >= screenLines)
+ skew = screenLines - 1;
+
+ textArea.updateScrollBar();
+ } //}}}
+
+ //{{{ physDown() method
+ // scroll down by physical line amount
+ void physDown(int amount, int screenAmount)
+ {
+ if(Debug.SCROLL_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"physDown() start: "
+ + physicalLine + ':' + scrollLine);
+ }
+
+ skew = 0;
+
+ if(!displayManager.isLineVisible(physicalLine))
+ {
+ int lastVisibleLine = displayManager.getLastVisibleLine();
+ if(physicalLine > lastVisibleLine)
+ physicalLine = lastVisibleLine;
+ else
+ {
+ int nextPhysicalLine = displayManager.getNextVisibleLine(physicalLine);
+ amount -= nextPhysicalLine - physicalLine;
+ scrollLine += displayManager.getScreenLineCount(physicalLine);
+ physicalLine = nextPhysicalLine;
+ }
+ }
+
+ for(;;)
+ {
+ int nextPhysicalLine = displayManager.getNextVisibleLine(
+ physicalLine);
+ if(nextPhysicalLine == -1)
+ break;
+ else if(nextPhysicalLine > physicalLine + amount)
+ break;
+ else
+ {
+ scrollLine += displayManager.getScreenLineCount(physicalLine);
+ amount -= nextPhysicalLine - physicalLine;
+ physicalLine = nextPhysicalLine;
+ }
+ }
+
+ if(Debug.SCROLL_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"physDown() end: "
+ + physicalLine + ':' + scrollLine);
+ }
+
+ callChanged = true;
+
+ // JEditTextArea.scrollTo() needs this to simplify
+ // its code
+ if(screenAmount < 0)
+ scrollUp(-screenAmount);
+ else if(screenAmount > 0)
+ scrollDown(screenAmount);
+ } //}}}
+
+ //{{{ physUp() method
+ // scroll up by physical line amount
+ void physUp(int amount, int screenAmount)
+ {
+ if(Debug.SCROLL_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"physUp() start: "
+ + physicalLine + ':' + scrollLine);
+ }
+
+ skew = 0;
+
+ if(!displayManager.isLineVisible(physicalLine))
+ {
+ int firstVisibleLine = displayManager.getFirstVisibleLine();
+ if(physicalLine < firstVisibleLine)
+ physicalLine = firstVisibleLine;
+ else
+ {
+ int prevPhysicalLine = displayManager.getPrevVisibleLine(physicalLine);
+ amount -= physicalLine - prevPhysicalLine;
+ }
+ }
+
+ for(;;)
+ {
+ int prevPhysicalLine = displayManager.getPrevVisibleLine(
+ physicalLine);
+ if(prevPhysicalLine == -1)
+ break;
+ else if(prevPhysicalLine < physicalLine - amount)
+ break;
+ else
+ {
+ amount -= physicalLine - prevPhysicalLine;
+ physicalLine = prevPhysicalLine;
+ scrollLine -= displayManager.getScreenLineCount(
+ prevPhysicalLine);
+ }
+ }
+
+ if(Debug.SCROLL_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"physUp() end: "
+ + physicalLine + ':' + scrollLine);
+ }
+
+ callChanged = true;
+
+ // JEditTextArea.scrollTo() needs this to simplify
+ // its code
+ if(screenAmount < 0)
+ scrollUp(-screenAmount);
+ else if(screenAmount > 0)
+ scrollDown(screenAmount);
+ } //}}}
+
+ //{{{ scrollDown() method
+ // scroll down by screen line amount
+ void scrollDown(int amount)
+ {
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"scrollDown()");
+
+ ensurePhysicalLineIsVisible();
+
+ amount += skew;
+
+ skew = 0;
+
+ while(amount > 0)
+ {
+ int screenLines = displayManager.getScreenLineCount(physicalLine);
+ if(amount < screenLines)
+ {
+ skew = amount;
+ break;
+ }
+ else
+ {
+ int nextLine = displayManager.getNextVisibleLine(physicalLine);
+ if(nextLine == -1)
+ break;
+ boolean visible = displayManager.isLineVisible(physicalLine);
+ physicalLine = nextLine;
+ if(visible)
+ {
+ amount -= screenLines;
+ scrollLine += screenLines;
+ }
+ }
+ }
+
+ callChanged = true;
+ } //}}}
+
+ //{{{ scrollUp() method
+ // scroll up by screen line amount
+ void scrollUp(int amount)
+ {
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"scrollUp() before:" + this);
+
+ ensurePhysicalLineIsVisible();
+
+ if(amount <= skew)
+ {
+ // the amount is less than the skew, so we stay in the same like, just going
+ // upper
+ skew -= amount;
+ }
+ else
+ {
+ // moving to the first screen line of the current physical line
+ amount -= skew;
+ skew = 0;
+
+ while(amount > 0)
+ {
+ int prevLine = displayManager.getPrevVisibleLine(physicalLine);
+ if(prevLine == -1)
+ break;
+ // moving to the previous visible physical line
+ physicalLine = prevLine;
+
+ int screenLines = displayManager.getScreenLineCount(physicalLine);
+ scrollLine -= screenLines;
+ if(amount < screenLines)
+ {
+ skew = screenLines - amount;
+ break;
+ }
+ else
+ amount -= screenLines;
+ }
+ }
+
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"scrollUp() after:" + this);
+ callChanged = true;
+ } //}}}
+
+ //{{{ ensurePhysicalLineIsVisible() method
+ void ensurePhysicalLineIsVisible()
+ {
+ if(!displayManager.isLineVisible(physicalLine))
+ {
+ if(physicalLine > displayManager.getLastVisibleLine())
+ {
+ physicalLine = displayManager.getLastVisibleLine();
+ scrollLine = displayManager.getScrollLineCount() - 1;
+ }
+ else if(physicalLine < displayManager.getFirstVisibleLine())
+ {
+ physicalLine = displayManager.getFirstVisibleLine();
+ scrollLine = 0;
+ }
+ else
+ {
+ physicalLine = displayManager.getNextVisibleLine(physicalLine);
+ scrollLine += displayManager.getScreenLineCount(physicalLine);
+ }
+ }
+ } //}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ return "FirstLine["+physicalLine+','+scrollLine+','+skew+']';
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/FoldPainter.java b/jEdit/org/gjt/sp/jedit/textarea/FoldPainter.java
index 143d6df..0348ccb 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/FoldPainter.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/FoldPainter.java
@@ -31,10 +31,10 @@ import org.gjt.sp.jedit.buffer.JEditBuffer;
*
* @since jEdit 4.3pre16
* @author Shlomy Reinstein
- * @version $Id: FoldPainter.java 15570 2009-06-25 00:43:57Z ezust $
+ * @version $Id: FoldPainter.java 18569 2010-09-16 08:35:11Z kpouer $
*/
-public interface FoldPainter {
-
+public interface FoldPainter
+{
/**
* Paints the beginning of a fold in the gutter.
* @param gutter The gutter in which the fold is drawn.
diff --git a/jEdit/org/gjt/sp/jedit/textarea/Gutter.java b/jEdit/org/gjt/sp/jedit/textarea/Gutter.java
index be2e86d..88ca61e 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/Gutter.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/Gutter.java
@@ -1,1130 +1,1135 @@
-/*
- * Gutter.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2000 mike dillon
- * Portions copyright (C) 2001, 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.event.*;
-
-import org.gjt.sp.jedit.buffer.BufferAdapter;
-import org.gjt.sp.jedit.buffer.BufferListener;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * The gutter is the component that displays folding indicators and line
- * numbers to the left of the text area. The only methods in this class
- * that should be called by plugins are those for adding and removing
- * text area extensions.
- *
- * @see #addExtension(TextAreaExtension)
- * @see #addExtension(int,TextAreaExtension)
- * @see #removeExtension(TextAreaExtension)
- * @see TextAreaExtension
- * @see TextArea
- *
- * @author Mike Dillon and Slava Pestov
- * @version $Id: Gutter.java 16346 2009-10-14 10:35:10Z kpouer $
- */
-public class Gutter extends JComponent implements SwingConstants
-{
- //{{{ Layers
- /**
- * The lowest possible layer.
- * @see #addExtension(int,TextAreaExtension)
- * @since jEdit 4.0pre4
- */
- public static final int LOWEST_LAYER = Integer.MIN_VALUE;
-
- /**
- * Default extension layer. This is above the wrap guide but below the
- * bracket highlight.
- * @since jEdit 4.0pre4
- */
- public static final int DEFAULT_LAYER = 0;
-
- /**
- * Highest possible layer.
- * @since jEdit 4.0pre4
- */
- public static final int HIGHEST_LAYER = Integer.MAX_VALUE;
- //}}}
-
- //{{{ Fold painters
- /**
- * Fold painter service.
- * @since jEdit 4.3pre16
- */
- public static final String FOLD_PAINTER_PROPERTY = "foldPainter";
- public static final String FOLD_PAINTER_SERVICE = "org.gjt.sp.jedit.textarea.FoldPainter";
- public static final String DEFAULT_FOLD_PAINTER_SERVICE = "Triangle";
-
- //{{{ setFolderPainter() method
- public void setFoldPainter(FoldPainter painter)
- {
- if (painter == null)
- foldPainter = new TriangleFoldPainter();
- else
- foldPainter = painter;
- }
- //}}}
-
- //}}} Fold painters
-
- //{{{ Gutter constructor
- public Gutter(TextArea textArea)
- {
- this.textArea = textArea;
- enabled = true;
- selectionAreaEnabled = true;
- selectionAreaWidth = SELECTION_GUTTER_WIDTH;
-
- setAutoscrolls(true);
- setOpaque(true);
- setRequestFocusEnabled(false);
-
- extensionMgr = new ExtensionManager();
-
- mouseHandler = new MouseHandler();
- addMouseListener(mouseHandler);
- addMouseMotionListener(mouseHandler);
-
- bufferListener = new BufferAdapter()
- {
- public void bufferLoaded(JEditBuffer buffer)
- {
- updateLineNumberWidth();
- }
-
- public void contentInserted(JEditBuffer buffer, int startLine,
- int offset, int numLines, int length)
- {
- updateLineNumberWidth();
- }
-
- public void contentRemoved(JEditBuffer buffer, int startLine,
- int offset, int numLines, int length)
- {
- updateLineNumberWidth();
- }
- };
-
- updateBorder();
- setFoldPainter(textArea.getFoldPainter());
- } //}}}
-
- //{{{ paintComponent() method
- public void paintComponent(Graphics _gfx)
- {
- Graphics2D gfx = (Graphics2D)_gfx;
- gfx.setRenderingHints(textArea.getPainter().renderingHints);
- // fill the background
- Rectangle clip = gfx.getClipBounds();
- gfx.setColor(getBackground());
- int bgColorWidth = isSelectionAreaEnabled() ? FOLD_MARKER_SIZE :
- clip.width;
- gfx.fillRect(clip.x, clip.y, bgColorWidth, clip.height);
- if (isSelectionAreaEnabled())
- {
- if (selectionAreaBgColor == null)
- selectionAreaBgColor = getBackground();
- gfx.setColor(selectionAreaBgColor);
- gfx.fillRect(clip.x + FOLD_MARKER_SIZE, clip.y,
- clip.width - FOLD_MARKER_SIZE, clip.height);
- }
- // if buffer is loading, don't paint anything
- if (textArea.getBuffer().isLoading())
- return;
-
- int lineHeight = textArea.getPainter().getFontMetrics()
- .getHeight();
-
- if(lineHeight == 0)
- return;
-
- int firstLine = clip.y / lineHeight;
- int lastLine = (clip.y + clip.height - 1) / lineHeight;
-
- if(lastLine - firstLine > textArea.getVisibleLines())
- {
- Log.log(Log.ERROR,this,"BUG: firstLine=" + firstLine);
- Log.log(Log.ERROR,this," lastLine=" + lastLine);
- Log.log(Log.ERROR,this," visibleLines=" + textArea.getVisibleLines());
- Log.log(Log.ERROR,this," height=" + getHeight());
- Log.log(Log.ERROR,this," painter.height=" + textArea.getPainter().getHeight());
- Log.log(Log.ERROR,this," clip.y=" + clip.y);
- Log.log(Log.ERROR,this," clip.height=" + clip.height);
- Log.log(Log.ERROR,this," lineHeight=" + lineHeight);
- }
-
- int y = clip.y - clip.y % lineHeight;
-
- extensionMgr.paintScreenLineRange(textArea,gfx,
- firstLine,lastLine,y,lineHeight);
-
- for (int line = firstLine; line <= lastLine;
- line++, y += lineHeight)
- {
- paintLine(gfx,line,y);
- }
- } //}}}
-
- //{{{ addExtension() method
- /**
- * Adds a text area extension, which can perform custom painting and
- * tool tip handling.
- * @param extension The extension
- * @since jEdit 4.0pre4
- */
- public void addExtension(TextAreaExtension extension)
- {
- extensionMgr.addExtension(DEFAULT_LAYER,extension);
- repaint();
- } //}}}
-
- //{{{ addExtension() method
- /**
- * Adds a text area extension, which can perform custom painting and
- * tool tip handling.
- * @param layer The layer to add the extension to. Note that more than
- * extension can share the same layer.
- * @param extension The extension
- * @since jEdit 4.0pre4
- */
- public void addExtension(int layer, TextAreaExtension extension)
- {
- extensionMgr.addExtension(layer,extension);
- repaint();
- } //}}}
-
- //{{{ removeExtension() method
- /**
- * Removes a text area extension. It will no longer be asked to
- * perform custom painting and tool tip handling.
- * @param extension The extension
- * @since jEdit 4.0pre4
- */
- public void removeExtension(TextAreaExtension extension)
- {
- extensionMgr.removeExtension(extension);
- repaint();
- } //}}}
-
- //{{{ getExtensions() method
- /**
- * Returns an array of registered text area extensions. Useful for
- * debugging purposes.
- * @since jEdit 4.1pre5
- */
- public TextAreaExtension[] getExtensions()
- {
- return extensionMgr.getExtensions();
- } //}}}
-
- //{{{ getToolTipText() method
- /**
- * Returns the tool tip to display at the specified location.
- * @param evt The mouse event
- */
- public String getToolTipText(MouseEvent evt)
- {
- if(textArea.getBuffer().isLoading())
- return null;
-
- return extensionMgr.getToolTipText(evt.getX(),evt.getY());
- } //}}}
-
- //{{{ setBorder() method
- /**
- * Convenience method for setting a default matte border on the right
- * with the specified border width and color
- * @param width The border width (in pixels)
- * @param color1 The focused border color
- * @param color2 The unfocused border color
- * @param color3 The gutter/text area gap color
- */
- public void setBorder(int width, Color color1, Color color2, Color color3)
- {
- borderWidth = width;
-
- focusBorder = new CompoundBorder(new MatteBorder(0,0,0,width,color3),
- new MatteBorder(0,0,0,width,color1));
- noFocusBorder = new CompoundBorder(new MatteBorder(0,0,0,width,color3),
- new MatteBorder(0,0,0,width,color2));
- updateBorder();
- } //}}}
-
- //{{{ updateBorder() method
- /**
- * Sets the border differently if the text area has focus or not.
- */
- public void updateBorder()
- {
- if (textArea.hasFocus())
- setBorder(focusBorder);
- else
- setBorder(noFocusBorder);
- } //}}}
-
- //{{{ setBorder() method
- /*
- * JComponent.setBorder(Border) is overridden here to cache the left
- * inset of the border (if any) to avoid having to fetch it during every
- * repaint.
- */
- public void setBorder(Border border)
- {
- super.setBorder(border);
-
- if (border == null)
- {
- collapsedSize.width = 0;
- collapsedSize.height = 0;
- }
- else
- {
- Insets insets = border.getBorderInsets(this);
- collapsedSize.width = FOLD_MARKER_SIZE + insets.right;
- if (isSelectionAreaEnabled())
- collapsedSize.width += selectionAreaWidth;
- collapsedSize.height = gutterSize.height
- = insets.top + insets.bottom;
- lineNumberWidth = fm.charWidth('5') * getLineNumberDigitCount();
- gutterSize.width = FOLD_MARKER_SIZE + insets.right
- + lineNumberWidth;
- }
-
- revalidate();
- } //}}}
-
- //{{{ setMinLineNumberDigitCount() method
- public void setMinLineNumberDigitCount(int min)
- {
- if (min == minLineNumberDigits)
- return;
- minLineNumberDigits = min;
- if (textArea.getBuffer() != null)
- updateLineNumberWidth();
- } //}}}
-
- //{{{ getMinLineNumberDigitCount() method
- private int getMinLineNumberDigitCount()
- {
- return minLineNumberDigits;
- } //}}}
-
- //{{{ getLineNumberDigitCount() method
- private int getLineNumberDigitCount()
- {
- JEditBuffer buf = textArea.getBuffer();
- int minDigits = getMinLineNumberDigitCount();
- if (buf == null)
- return minDigits;
- int count = buf.getLineCount();
- int digits;
- for (digits = 0; count > 0; digits++)
- count /= 10;
- return (digits < minDigits) ? minDigits : digits;
- } //}}}
-
- //{{{ setBuffer() method
- void setBuffer(JEditBuffer newBuffer)
- {
- if (buffer != null)
- buffer.removeBufferListener(bufferListener);
- buffer = newBuffer;
- if (buffer != null)
- buffer.addBufferListener(bufferListener);
- updateLineNumberWidth();
- } //}}}
-
- //{{{ updateLineNumberWidth() method
- private void updateLineNumberWidth()
- {
- Font f = getFont();
- if (f != null)
- setFont(getFont());
- } //}}}
-
- //{{{ dispose() method
- void dispose()
- {
- if (buffer != null)
- {
- buffer.removeBufferListener(bufferListener);
- buffer = null;
- }
- } //}}}
-
- //{{{ setFont() method
- /*
- * JComponent.setFont(Font) is overridden here to cache the font
- * metrics for the font. This avoids having to get the font metrics
- * during every repaint.
- */
- public void setFont(Font font)
- {
- super.setFont(font);
-
- fm = getFontMetrics(font);
-
- Border border = getBorder();
- if(border != null)
- {
- lineNumberWidth = fm.charWidth('5') * getLineNumberDigitCount();
- gutterSize.width = FOLD_MARKER_SIZE
- + border.getBorderInsets(this).right
- + lineNumberWidth;
- revalidate();
- }
- } //}}}
-
- //{{{ Getters and setters
-
- //{{{ setGutterEnabled() method
- /* Enables showing or hiding the gutter. */
- public void setGutterEnabled(boolean enabled)
- {
- this.enabled = enabled;
- revalidate();
- } //}}}
-
- //{{{ isSelectionAreaEnabled() method
- public boolean isSelectionAreaEnabled()
- {
- return selectionAreaEnabled;
- } //}}}
-
- //{{{ setSelectionAreaEnabled() method
- public void setSelectionAreaEnabled(boolean enabled)
- {
- if (isSelectionAreaEnabled() == enabled)
- return;
- selectionAreaEnabled = enabled;
- if (enabled)
- collapsedSize.width += selectionAreaWidth;
- else
- collapsedSize.width -= selectionAreaWidth;
- revalidate();
- } //}}}
-
- //{{{ setSelectionAreaBackground() method
- public void setSelectionAreaBackground(Color bgColor)
- {
- selectionAreaBgColor = bgColor;
- repaint();
- } //}}}
-
- //{{{ setSelectionAreaWidth() method
- public void setSelectionAreaWidth(int width)
- {
- selectionAreaWidth = width;
- revalidate();
- } //}}}
-
- //{{{ getHighlightedForeground() method
- /**
- * Get the foreground color for highlighted line numbers
- * @return The highlight color
- */
- public Color getHighlightedForeground()
- {
- return intervalHighlight;
- } //}}}
-
- //{{{ setHighlightedForeground() method
- public void setHighlightedForeground(Color highlight)
- {
- intervalHighlight = highlight;
- } //}}}
-
- //{{{ getCurrentLineForeground() method
- public Color getCurrentLineForeground()
- {
- return currentLineHighlight;
- } //}}}
-
- //{{{ setCurrentLineForeground() method
- public void setCurrentLineForeground(Color highlight)
- {
- currentLineHighlight = highlight;
- } //}}}
-
- //{{{ getFoldColor() method
- public Color getFoldColor()
- {
- return foldColor;
- } //}}}
-
- //{{{ setFoldColor() method
- public void setFoldColor(Color foldColor)
- {
- this.foldColor = foldColor;
- } //}}}
-
- //{{{ getPreferredSize() method
- /*
- * Component.getPreferredSize() is overridden here to support the
- * collapsing behavior.
- */
- public Dimension getPreferredSize()
- {
- if (! enabled)
- return disabledSize;
- if (expanded)
- return gutterSize;
- else
- return collapsedSize;
- } //}}}
-
- //{{{ getMinimumSize() method
- public Dimension getMinimumSize()
- {
- return getPreferredSize();
- } //}}}
-
- //{{{ getLineNumberAlignment() method
- /**
- * Identifies whether the horizontal alignment of the line numbers.
- * @return Gutter.RIGHT, Gutter.CENTER, Gutter.LEFT
- */
- public int getLineNumberAlignment()
- {
- return alignment;
- } //}}}
-
- //{{{ setLineNumberAlignment() method
- /**
- * Sets the horizontal alignment of the line numbers.
- * @param alignment Gutter.RIGHT, Gutter.CENTER, Gutter.LEFT
- */
- public void setLineNumberAlignment(int alignment)
- {
- if (this.alignment == alignment) return;
-
- this.alignment = alignment;
-
- repaint();
- } //}}}
-
- //{{{ isExpanded() method
- /**
- * Identifies whether the gutter is collapsed or expanded.
- * @return true if the gutter is expanded, false if it is collapsed
- */
- public boolean isExpanded()
- {
- return expanded;
- } //}}}
-
- //{{{ setExpanded() method
- /**
- * Sets whether the gutter is collapsed or expanded and force the text
- * area to update its layout if there is a change.
- * @param expanded true if the gutter is expanded,
- * false if it is collapsed
- */
- public void setExpanded(boolean expanded)
- {
- if (this.expanded == expanded) return;
-
- this.expanded = expanded;
-
- textArea.revalidate();
- } //}}}
-
- //{{{ toggleExpanded() method
- /**
- * Toggles whether the gutter is collapsed or expanded.
- */
- public void toggleExpanded()
- {
- setExpanded(!expanded);
- } //}}}
-
- //{{{ getHighlightInterval() method
- /**
- * Sets the number of lines between highlighted line numbers.
- * @return The number of lines between highlighted line numbers or
- * zero if highlighting is disabled
- */
- public int getHighlightInterval()
- {
- return interval;
- } //}}}
-
- //{{{ setHighlightInterval() method
- /**
- * Sets the number of lines between highlighted line numbers. Any value
- * less than or equal to one will result in highlighting being disabled.
- * @param interval The number of lines between highlighted line numbers
- */
- public void setHighlightInterval(int interval)
- {
- if (interval <= 1) interval = 0;
- this.interval = interval;
- repaint();
- } //}}}
-
- //{{{ isCurrentLineHighlightEnabled() method
- public boolean isCurrentLineHighlightEnabled()
- {
- return currentLineHighlightEnabled;
- } //}}}
-
- //{{{ setCurrentLineHighlightEnabled() method
- public void setCurrentLineHighlightEnabled(boolean enabled)
- {
- if (currentLineHighlightEnabled == enabled) return;
-
- currentLineHighlightEnabled = enabled;
-
- repaint();
- } //}}}
-
- //{{{ getStructureHighlightColor() method
- /**
- * Returns the structure highlight color.
- * @since jEdit 4.2pre3
- */
- public final Color getStructureHighlightColor()
- {
- return structureHighlightColor;
- } //}}}
-
- //{{{ setStructureHighlightColor() method
- /**
- * Sets the structure highlight color.
- * @param structureHighlightColor The structure highlight color
- * @since jEdit 4.2pre3
- */
- public final void setStructureHighlightColor(Color structureHighlightColor)
- {
- this.structureHighlightColor = structureHighlightColor;
- repaint();
- } //}}}
-
- //{{{ isStructureHighlightEnabled() method
- /**
- * Returns true if structure highlighting is enabled, false otherwise.
- * @since jEdit 4.2pre3
- */
- public final boolean isStructureHighlightEnabled()
- {
- return structureHighlight;
- } //}}}
-
- //{{{ setStructureHighlightEnabled() method
- /**
- * Enables or disables structure highlighting.
- * @param structureHighlight True if structure highlighting should be
- * enabled, false otherwise
- * @since jEdit 4.2pre3
- */
- public final void setStructureHighlightEnabled(boolean structureHighlight)
- {
- this.structureHighlight = structureHighlight;
- repaint();
- } //}}}
-
- public void setSelectionPopupHandler(GutterPopupHandler handler)
- {
- mouseHandler.selectionPopupHandler = handler;
- }
-
- public void setMouseActionsProvider(MouseActionsProvider mouseActionsProvider)
- {
- mouseHandler.mouseActions = mouseActionsProvider;
- }
- //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private static final int FOLD_MARKER_SIZE = 12;
- private static final int SELECTION_GUTTER_WIDTH = 12;
- // The selection gutter exists only if the gutter is not expanded
-
- private boolean enabled;
- private final TextArea textArea;
- private MouseHandler mouseHandler;
- private ExtensionManager extensionMgr;
-
- private Dimension gutterSize = new Dimension(0,0);
- private Dimension collapsedSize = new Dimension(0,0);
- private int lineNumberWidth;
- private Dimension disabledSize = new Dimension(0,0);
-
- private Color intervalHighlight;
- private Color currentLineHighlight;
- private Color foldColor;
- private Color selectionAreaBgColor;
-
- private FontMetrics fm;
-
- private int alignment;
-
- private int interval;
- private boolean currentLineHighlightEnabled;
- private boolean expanded;
- private boolean selectionAreaEnabled;
-
- private boolean structureHighlight;
- private Color structureHighlightColor;
-
- private int borderWidth;
- private Border focusBorder, noFocusBorder;
-
- private FoldPainter foldPainter;
- private JEditBuffer buffer;
- private BufferListener bufferListener;
- private int minLineNumberDigits;
- private int selectionAreaWidth;
- //}}}
-
- //{{{ paintLine() method
- private void paintLine(Graphics2D gfx, int line, int y)
- {
- JEditBuffer buffer = textArea.getBuffer();
- if(buffer.isLoading())
- return;
-
- FontMetrics textAreaFm = textArea.getPainter().getFontMetrics();
- int lineHeight = textAreaFm.getHeight();
- int baseline = textAreaFm.getAscent();
-
- ChunkCache.LineInfo info = textArea.chunkCache.getLineInfo(line);
- int physicalLine = info.physicalLine;
-
- // Skip lines beyond EOF
- if(physicalLine == -1)
- return;
-
- boolean drawFoldMiddle = true;
- //{{{ Paint fold start and end indicators
- if(info.firstSubregion && buffer.isFoldStart(physicalLine))
- {
- drawFoldMiddle = false;
- foldPainter.paintFoldStart(this, gfx, line, physicalLine,
- textArea.displayManager.isLineVisible(physicalLine+1),
- y, lineHeight, buffer);
- }
- else if(info.lastSubregion && buffer.isFoldEnd(physicalLine))
- {
- drawFoldMiddle = false;
- foldPainter.paintFoldEnd(this, gfx, line, physicalLine, y,
- lineHeight, buffer);
- } //}}}
- //{{{ Paint bracket scope
- else if(structureHighlight)
- {
- StructureMatcher.Match match = textArea.getStructureMatch();
- int caretLine = textArea.getCaretLine();
-
- if(textArea.isStructureHighlightVisible()
- && physicalLine >= Math.min(caretLine,match.startLine)
- && physicalLine <= Math.max(caretLine,match.startLine))
- {
- int caretScreenLine;
- if(caretLine > textArea.getLastPhysicalLine())
- caretScreenLine = Integer.MAX_VALUE;
- else if(textArea.displayManager.isLineVisible(
- textArea.getCaretLine()))
- {
- caretScreenLine = textArea
- .getScreenLineOfOffset(
- textArea.getCaretPosition());
- }
- else
- {
- caretScreenLine = -1;
- }
-
- int structScreenLine;
- if(match.startLine > textArea.getLastPhysicalLine())
- structScreenLine = Integer.MAX_VALUE;
- else if(textArea.displayManager.isLineVisible(
- match.startLine))
- {
- structScreenLine = textArea
- .getScreenLineOfOffset(
- match.start);
- }
- else
- {
- structScreenLine = -1;
- }
-
- if(caretScreenLine > structScreenLine)
- {
- int tmp = caretScreenLine;
- caretScreenLine = structScreenLine;
- structScreenLine = tmp;
- }
-
- gfx.setColor(structureHighlightColor);
- drawFoldMiddle = false;
- if(structScreenLine == caretScreenLine)
- {
- // do nothing
- drawFoldMiddle = true;
- }
- // draw |^
- else if(line == caretScreenLine)
- {
- gfx.fillRect(5,
- y
- + lineHeight / 2,
- 5,
- 2);
- gfx.fillRect(5,
- y
- + lineHeight / 2,
- 2,
- lineHeight - lineHeight / 2);
- }
- // draw |_
- else if(line == structScreenLine)
- {
- gfx.fillRect(5,
- y,
- 2,
- lineHeight / 2);
- gfx.fillRect(5,
- y + lineHeight / 2,
- 5,
- 2);
- }
- // draw |
- else if(line > caretScreenLine
- && line < structScreenLine)
- {
- gfx.fillRect(5,
- y,
- 2,
- lineHeight);
- }
- }
- } //}}}
- if(drawFoldMiddle && buffer.getFoldLevel(physicalLine) > 0)
- {
- foldPainter.paintFoldMiddle(this, gfx, line, physicalLine,
- y, lineHeight, buffer);
- }
-
- //{{{ Paint line numbers
- if(info.firstSubregion && expanded)
- {
- String number = Integer.toString(physicalLine + 1);
-
- int offset;
- switch (alignment)
- {
- case RIGHT:
- offset = lineNumberWidth - (fm.stringWidth(number) + 1);
- break;
- case CENTER:
- offset = (lineNumberWidth - fm.stringWidth(number)) / 2;
- break;
- case LEFT: default:
- offset = 0;
- break;
- }
-
- if (physicalLine == textArea.getCaretLine() && currentLineHighlightEnabled)
- {
- gfx.setColor(currentLineHighlight);
- }
- else if (interval > 1 && (physicalLine + 1) % interval == 0)
- gfx.setColor(intervalHighlight);
- else
- gfx.setColor(getForeground());
-
- gfx.drawString(number, FOLD_MARKER_SIZE + offset,
- baseline + y);
- } //}}}
- } //}}}
-
- //}}}
-
- //{{{ MouseHandler class
- class MouseHandler extends MouseInputAdapter
- {
- MouseActionsProvider mouseActions;
- boolean drag;
- int toolTipInitialDelay, toolTipReshowDelay;
- boolean selectLines;
- int selAnchorLine;
- GutterPopupHandler selectionPopupHandler;
-
- //{{{ mouseEntered() method
- public void mouseEntered(MouseEvent e)
- {
- ToolTipManager ttm = ToolTipManager.sharedInstance();
- toolTipInitialDelay = ttm.getInitialDelay();
- toolTipReshowDelay = ttm.getReshowDelay();
- ttm.setInitialDelay(0);
- ttm.setReshowDelay(0);
- } //}}}
-
- //{{{ mouseExited() method
- public void mouseExited(MouseEvent evt)
- {
- ToolTipManager ttm = ToolTipManager.sharedInstance();
- ttm.setInitialDelay(toolTipInitialDelay);
- ttm.setReshowDelay(toolTipReshowDelay);
- } //}}}
-
- //{{{ mousePressed() method
- public void mousePressed(MouseEvent e)
- {
- textArea.requestFocus();
-
- boolean outsideGutter =
- (e.getX() >= getWidth() - borderWidth * 2);
- if(TextAreaMouseHandler.isPopupTrigger(e) || outsideGutter)
- {
- if ((selectionPopupHandler != null) &&
- (! outsideGutter) &&
- (e.getX() > FOLD_MARKER_SIZE))
- {
- int screenLine = e.getY() / textArea.getPainter()
- .getFontMetrics().getHeight();
- int line = textArea.chunkCache.getLineInfo(screenLine)
- .physicalLine;
- if (line >= 0)
- {
- selectionPopupHandler.handlePopup(
- e.getX(), e.getY(), line);
- return;
- }
- }
- e.translatePoint(-getWidth(),0);
- textArea.mouseHandler.mousePressed(e);
- drag = true;
- }
- else
- {
- JEditBuffer buffer = textArea.getBuffer();
-
- int screenLine = e.getY() / textArea.getPainter()
- .getFontMetrics().getHeight();
-
- int line = textArea.chunkCache.getLineInfo(screenLine)
- .physicalLine;
-
- if(line == -1)
- return;
-
- if (e.getX() >= FOLD_MARKER_SIZE)
- {
- Selection s = new Selection.Range(
- textArea.getLineStartOffset(line),
- getFoldEndOffset(line));
- if(textArea.isMultipleSelectionEnabled())
- textArea.addToSelection(s);
- else
- textArea.setSelection(s);
- selectLines = true;
- selAnchorLine = line;
- return;
- }
-
- //{{{ Determine action
- String defaultAction;
- String variant;
- if(buffer.isFoldStart(line))
- {
- defaultAction = "toggle-fold";
- variant = "fold";
- }
- else if(structureHighlight
- && textArea.isStructureHighlightVisible()
- && textArea.lineInStructureScope(line))
- {
- defaultAction = "match-struct";
- variant = "struct";
- }
- else
- return;
-
- String action = null;
-
- if (mouseActions != null)
- action = mouseActions.getActionForEvent(
- e,variant);
-
- if(action == null)
- action = defaultAction;
- //}}}
-
- //{{{ Handle actions
- StructureMatcher.Match match = textArea
- .getStructureMatch();
-
- if(action.equals("select-fold"))
- {
- textArea.displayManager.expandFold(line,true);
- textArea.selectFold(line);
- }
- else if(action.equals("narrow-fold"))
- {
- int[] lines = buffer.getFoldAtLine(line);
- textArea.displayManager.narrow(lines[0],lines[1]);
- }
- else if(action.startsWith("toggle-fold"))
- {
- if(textArea.displayManager
- .isLineVisible(line + 1))
- {
- textArea.collapseFold(line);
- }
- else
- {
- if(action.endsWith("-fully"))
- {
- textArea.displayManager
- .expandFold(line,
- true);
- }
- else
- {
- textArea.displayManager
- .expandFold(line,
- false);
- }
- }
- }
- else if(action.equals("match-struct"))
- {
- if(match != null)
- textArea.setCaretPosition(match.end);
- }
- else if(action.equals("select-struct"))
- {
- if(match != null)
- {
- match.matcher.selectMatch(
- textArea);
- }
- }
- else if(action.equals("narrow-struct"))
- {
- if(match != null)
- {
- int start = Math.min(
- match.startLine,
- textArea.getCaretLine());
- int end = Math.max(
- match.endLine,
- textArea.getCaretLine());
- textArea.displayManager.narrow(start,end);
- }
- } //}}}
- }
- } //}}}
-
- //{{{ mouseDragged() method
- public void mouseDragged(MouseEvent e)
- {
- if(drag /* && e.getX() >= getWidth() - borderWidth * 2 */)
- {
- e.translatePoint(-getWidth(),0);
- textArea.mouseHandler.mouseDragged(e);
- }
- else if(selectLines)
- {
- int screenLine = e.getY() / textArea.getPainter()
- .getFontMetrics().getHeight();
- int line;
- if(e.getY() < 0)
- {
- textArea.scrollUpLine();
- line = textArea.getFirstPhysicalLine();
- }
- else if(e.getY() >= getHeight())
- {
- textArea.scrollDownLine();
- line = textArea.getLastPhysicalLine();
- }
- else
- line = textArea.chunkCache.getLineInfo(screenLine)
- .physicalLine;
-
- int selStart, selEnd;
- if(line < selAnchorLine)
- {
- selStart = textArea.getLineStartOffset(line);
- selEnd = getFoldEndOffset(selAnchorLine);
- }
- else
- {
- selStart = textArea.getLineStartOffset(selAnchorLine);
- selEnd = getFoldEndOffset(line);
- }
-
- textArea.resizeSelection(selStart, selEnd, 0, false);
- }
- } //}}}
-
- //{{{ getFoldEndOffset() method
- private int getFoldEndOffset(int line)
- {
- JEditBuffer buffer = textArea.getBuffer();
- int endLine;
- if ((line == buffer.getLineCount() - 1) ||
- (textArea.displayManager.isLineVisible(line + 1)))
- {
- endLine = line;
- }
- else
- {
- int[] lines = buffer.getFoldAtLine(line);
- endLine = lines[1];
- }
-
- if(endLine == buffer.getLineCount() - 1)
- return buffer.getLineEndOffset(endLine) - 1;
- else
- return buffer.getLineEndOffset(endLine);
- } //}}}
-
- //{{{ mouseReleased() method
- public void mouseReleased(MouseEvent e)
- {
- if(drag && e.getX() >= getWidth() - borderWidth * 2)
- {
- e.translatePoint(-getWidth(),0);
- textArea.mouseHandler.mouseReleased(e);
- }
-
- drag = false;
- selectLines = false;
- } //}}}
- } //}}}
-}
+/*
+ * Gutter.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2000 mike dillon
+ * Portions copyright (C) 2001, 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.event.*;
+
+import org.gjt.sp.jedit.buffer.BufferAdapter;
+import org.gjt.sp.jedit.buffer.BufferListener;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * The gutter is the component that displays folding indicators and line
+ * numbers to the left of the text area. The only methods in this class
+ * that should be called by plugins are those for adding and removing
+ * text area extensions.
+ *
+ * @see #addExtension(TextAreaExtension)
+ * @see #addExtension(int,TextAreaExtension)
+ * @see #removeExtension(TextAreaExtension)
+ * @see TextAreaExtension
+ * @see TextArea
+ *
+ * @author Mike Dillon and Slava Pestov
+ * @version $Id: Gutter.java 18110 2010-06-18 19:21:38Z shlomy $
+ */
+public class Gutter extends JComponent implements SwingConstants
+{
+ //{{{ Layers
+ /**
+ * The lowest possible layer.
+ * @see #addExtension(int,TextAreaExtension)
+ * @since jEdit 4.0pre4
+ */
+ public static final int LOWEST_LAYER = Integer.MIN_VALUE;
+
+ /**
+ * Default extension layer. This is above the wrap guide but below the
+ * bracket highlight.
+ * @since jEdit 4.0pre4
+ */
+ public static final int DEFAULT_LAYER = 0;
+
+ /**
+ * Highest possible layer.
+ * @since jEdit 4.0pre4
+ */
+ public static final int HIGHEST_LAYER = Integer.MAX_VALUE;
+ //}}}
+
+ //{{{ Fold painters
+ /**
+ * Fold painter service.
+ * @since jEdit 4.3pre16
+ */
+ public static final String FOLD_PAINTER_PROPERTY = "foldPainter";
+ public static final String FOLD_PAINTER_SERVICE = "org.gjt.sp.jedit.textarea.FoldPainter";
+ public static final String DEFAULT_FOLD_PAINTER_SERVICE = "Triangle";
+
+ //{{{ setFolderPainter() method
+ public void setFoldPainter(FoldPainter painter)
+ {
+ if (painter == null)
+ foldPainter = new TriangleFoldPainter();
+ else
+ foldPainter = painter;
+ }
+ //}}}
+
+ //}}} Fold painters
+
+ //{{{ Gutter constructor
+ public Gutter(TextArea textArea)
+ {
+ this.textArea = textArea;
+ enabled = true;
+ selectionAreaEnabled = true;
+ selectionAreaWidth = SELECTION_GUTTER_WIDTH;
+
+ setAutoscrolls(true);
+ setOpaque(true);
+ setRequestFocusEnabled(false);
+
+ extensionMgr = new ExtensionManager();
+
+ mouseHandler = new MouseHandler();
+ addMouseListener(mouseHandler);
+ addMouseMotionListener(mouseHandler);
+
+ bufferListener = new BufferAdapter()
+ {
+ public void bufferLoaded(JEditBuffer buffer)
+ {
+ updateLineNumberWidth();
+ }
+
+ public void contentInserted(JEditBuffer buffer, int startLine,
+ int offset, int numLines, int length)
+ {
+ updateLineNumberWidth();
+ }
+
+ public void contentRemoved(JEditBuffer buffer, int startLine,
+ int offset, int numLines, int length)
+ {
+ updateLineNumberWidth();
+ }
+ };
+
+ updateBorder();
+ setFoldPainter(textArea.getFoldPainter());
+ } //}}}
+
+ //{{{ paintComponent() method
+ public void paintComponent(Graphics _gfx)
+ {
+ Graphics2D gfx = (Graphics2D)_gfx;
+ gfx.setRenderingHints(textArea.getPainter().renderingHints);
+ // fill the background
+ Rectangle clip = gfx.getClipBounds();
+ gfx.setColor(getBackground());
+ int bgColorWidth = isSelectionAreaEnabled() ? FOLD_MARKER_SIZE :
+ clip.width;
+ gfx.fillRect(clip.x, clip.y, bgColorWidth, clip.height);
+ if (isSelectionAreaEnabled())
+ {
+ if (selectionAreaBgColor == null)
+ selectionAreaBgColor = getBackground();
+ gfx.setColor(selectionAreaBgColor);
+ gfx.fillRect(clip.x + FOLD_MARKER_SIZE, clip.y,
+ clip.width - FOLD_MARKER_SIZE, clip.height);
+ }
+ // if buffer is loading, don't paint anything
+ if (textArea.getBuffer().isLoading())
+ return;
+
+ int lineHeight = textArea.getPainter().getFontMetrics()
+ .getHeight();
+
+ if(lineHeight == 0)
+ return;
+
+ int firstLine = clip.y / lineHeight;
+ int lastLine = (clip.y + clip.height - 1) / lineHeight;
+
+ if(lastLine - firstLine > textArea.getVisibleLines())
+ {
+ Log.log(Log.ERROR,this,"BUG: firstLine=" + firstLine);
+ Log.log(Log.ERROR,this," lastLine=" + lastLine);
+ Log.log(Log.ERROR,this," visibleLines=" + textArea.getVisibleLines());
+ Log.log(Log.ERROR,this," height=" + getHeight());
+ Log.log(Log.ERROR,this," painter.height=" + textArea.getPainter().getHeight());
+ Log.log(Log.ERROR,this," clip.y=" + clip.y);
+ Log.log(Log.ERROR,this," clip.height=" + clip.height);
+ Log.log(Log.ERROR,this," lineHeight=" + lineHeight);
+ }
+
+ int y = clip.y - clip.y % lineHeight;
+
+ extensionMgr.paintScreenLineRange(textArea,gfx,
+ firstLine,lastLine,y,lineHeight);
+
+ for (int line = firstLine; line <= lastLine;
+ line++, y += lineHeight)
+ {
+ paintLine(gfx,line,y);
+ }
+ } //}}}
+
+ //{{{ addExtension() method
+ /**
+ * Adds a text area extension, which can perform custom painting and
+ * tool tip handling.
+ * @param extension The extension
+ * @since jEdit 4.0pre4
+ */
+ public void addExtension(TextAreaExtension extension)
+ {
+ extensionMgr.addExtension(DEFAULT_LAYER,extension);
+ repaint();
+ } //}}}
+
+ //{{{ addExtension() method
+ /**
+ * Adds a text area extension, which can perform custom painting and
+ * tool tip handling.
+ * @param layer The layer to add the extension to. Note that more than
+ * extension can share the same layer.
+ * @param extension The extension
+ * @since jEdit 4.0pre4
+ */
+ public void addExtension(int layer, TextAreaExtension extension)
+ {
+ extensionMgr.addExtension(layer,extension);
+ repaint();
+ } //}}}
+
+ //{{{ removeExtension() method
+ /**
+ * Removes a text area extension. It will no longer be asked to
+ * perform custom painting and tool tip handling.
+ * @param extension The extension
+ * @since jEdit 4.0pre4
+ */
+ public void removeExtension(TextAreaExtension extension)
+ {
+ extensionMgr.removeExtension(extension);
+ repaint();
+ } //}}}
+
+ //{{{ getExtensions() method
+ /**
+ * Returns an array of registered text area extensions. Useful for
+ * debugging purposes.
+ * @since jEdit 4.1pre5
+ */
+ public TextAreaExtension[] getExtensions()
+ {
+ return extensionMgr.getExtensions();
+ } //}}}
+
+ //{{{ getToolTipText() method
+ /**
+ * Returns the tool tip to display at the specified location.
+ * @param evt The mouse event
+ */
+ public String getToolTipText(MouseEvent evt)
+ {
+ if(textArea.getBuffer().isLoading())
+ return null;
+
+ return extensionMgr.getToolTipText(evt.getX(),evt.getY());
+ } //}}}
+
+ //{{{ setBorder() method
+ /**
+ * Convenience method for setting a default matte border on the right
+ * with the specified border width and color
+ * @param width The border width (in pixels)
+ * @param color1 The focused border color
+ * @param color2 The unfocused border color
+ * @param color3 The gutter/text area gap color
+ */
+ public void setBorder(int width, Color color1, Color color2, Color color3)
+ {
+ borderWidth = width;
+
+ focusBorder = new CompoundBorder(new MatteBorder(0,0,0,width,color3),
+ new MatteBorder(0,0,0,width,color1));
+ noFocusBorder = new CompoundBorder(new MatteBorder(0,0,0,width,color3),
+ new MatteBorder(0,0,0,width,color2));
+ updateBorder();
+ } //}}}
+
+ //{{{ updateBorder() method
+ /**
+ * Sets the border differently if the text area has focus or not.
+ */
+ public void updateBorder()
+ {
+ if (textArea.hasFocus())
+ setBorder(focusBorder);
+ else
+ setBorder(noFocusBorder);
+ } //}}}
+
+ //{{{ setBorder() method
+ /*
+ * JComponent.setBorder(Border) is overridden here to cache the left
+ * inset of the border (if any) to avoid having to fetch it during every
+ * repaint.
+ */
+ public void setBorder(Border border)
+ {
+ super.setBorder(border);
+
+ if (border == null)
+ {
+ collapsedSize.width = 0;
+ collapsedSize.height = 0;
+ }
+ else
+ {
+ Insets insets = border.getBorderInsets(this);
+ collapsedSize.width = FOLD_MARKER_SIZE + insets.right;
+ if (isSelectionAreaEnabled())
+ collapsedSize.width += selectionAreaWidth;
+ collapsedSize.height = gutterSize.height
+ = insets.top + insets.bottom;
+ lineNumberWidth = fm.charWidth('5') * getLineNumberDigitCount();
+ gutterSize.width = FOLD_MARKER_SIZE + insets.right
+ + lineNumberWidth;
+ }
+
+ revalidate();
+ } //}}}
+
+ //{{{ setMinLineNumberDigitCount() method
+ public void setMinLineNumberDigitCount(int min)
+ {
+ if (min == minLineNumberDigits)
+ return;
+ minLineNumberDigits = min;
+ if (textArea.getBuffer() != null)
+ updateLineNumberWidth();
+ } //}}}
+
+ //{{{ getMinLineNumberDigitCount() method
+ private int getMinLineNumberDigitCount()
+ {
+ return minLineNumberDigits;
+ } //}}}
+
+ //{{{ getLineNumberDigitCount() method
+ private int getLineNumberDigitCount()
+ {
+ JEditBuffer buf = textArea.getBuffer();
+ int minDigits = getMinLineNumberDigitCount();
+ if (buf == null)
+ return minDigits;
+ int count = buf.getLineCount();
+ int digits;
+ for (digits = 0; count > 0; digits++)
+ count /= 10;
+ return (digits < minDigits) ? minDigits : digits;
+ } //}}}
+
+ //{{{ setBuffer() method
+ void setBuffer(JEditBuffer newBuffer)
+ {
+ if (buffer != null)
+ buffer.removeBufferListener(bufferListener);
+ buffer = newBuffer;
+ if (buffer != null)
+ buffer.addBufferListener(bufferListener);
+ updateLineNumberWidth();
+ } //}}}
+
+ //{{{ updateLineNumberWidth() method
+ private void updateLineNumberWidth()
+ {
+ Font f = getFont();
+ if (f != null)
+ setFont(getFont());
+ } //}}}
+
+ //{{{ dispose() method
+ void dispose()
+ {
+ if (buffer != null)
+ {
+ buffer.removeBufferListener(bufferListener);
+ buffer = null;
+ }
+ } //}}}
+
+ //{{{ setFont() method
+ /*
+ * JComponent.setFont(Font) is overridden here to cache the font
+ * metrics for the font. This avoids having to get the font metrics
+ * during every repaint.
+ */
+ public void setFont(Font font)
+ {
+ super.setFont(font);
+
+ fm = getFontMetrics(font);
+
+ Border border = getBorder();
+ if(border != null)
+ {
+ lineNumberWidth = fm.charWidth('5') * getLineNumberDigitCount();
+ gutterSize.width = FOLD_MARKER_SIZE
+ + border.getBorderInsets(this).right
+ + lineNumberWidth;
+ revalidate();
+ }
+ } //}}}
+
+ //{{{ Getters and setters
+
+ //{{{ setGutterEnabled() method
+ /* Enables showing or hiding the gutter. */
+ public void setGutterEnabled(boolean enabled)
+ {
+ this.enabled = enabled;
+ revalidate();
+ } //}}}
+
+ //{{{ isSelectionAreaEnabled() method
+ public boolean isSelectionAreaEnabled()
+ {
+ return selectionAreaEnabled;
+ } //}}}
+
+ //{{{ setSelectionAreaEnabled() method
+ public void setSelectionAreaEnabled(boolean enabled)
+ {
+ if (isSelectionAreaEnabled() == enabled)
+ return;
+ selectionAreaEnabled = enabled;
+ if (enabled)
+ collapsedSize.width += selectionAreaWidth;
+ else
+ collapsedSize.width -= selectionAreaWidth;
+ revalidate();
+ } //}}}
+
+ //{{{ setSelectionAreaBackground() method
+ public void setSelectionAreaBackground(Color bgColor)
+ {
+ selectionAreaBgColor = bgColor;
+ repaint();
+ } //}}}
+
+ //{{{ setSelectionAreaWidth() method
+ public void setSelectionAreaWidth(int width)
+ {
+ selectionAreaWidth = width;
+ revalidate();
+ } //}}}
+
+ //{{{ getHighlightedForeground() method
+ /**
+ * Get the foreground color for highlighted line numbers
+ * @return The highlight color
+ */
+ public Color getHighlightedForeground()
+ {
+ return intervalHighlight;
+ } //}}}
+
+ //{{{ setHighlightedForeground() method
+ public void setHighlightedForeground(Color highlight)
+ {
+ intervalHighlight = highlight;
+ } //}}}
+
+ //{{{ getCurrentLineForeground() method
+ public Color getCurrentLineForeground()
+ {
+ return currentLineHighlight;
+ } //}}}
+
+ //{{{ setCurrentLineForeground() method
+ public void setCurrentLineForeground(Color highlight)
+ {
+ currentLineHighlight = highlight;
+ } //}}}
+
+ //{{{ getFoldColor() method
+ public Color getFoldColor()
+ {
+ return foldColor;
+ } //}}}
+
+ //{{{ setFoldColor() method
+ public void setFoldColor(Color foldColor)
+ {
+ this.foldColor = foldColor;
+ } //}}}
+
+ //{{{ getPreferredSize() method
+ /*
+ * Component.getPreferredSize() is overridden here to support the
+ * collapsing behavior.
+ */
+ public Dimension getPreferredSize()
+ {
+ if (! enabled)
+ return disabledSize;
+ if (expanded)
+ return gutterSize;
+ else
+ return collapsedSize;
+ } //}}}
+
+ //{{{ getMinimumSize() method
+ public Dimension getMinimumSize()
+ {
+ return getPreferredSize();
+ } //}}}
+
+ //{{{ getLineNumberAlignment() method
+ /**
+ * Identifies whether the horizontal alignment of the line numbers.
+ * @return Gutter.RIGHT, Gutter.CENTER, Gutter.LEFT
+ */
+ public int getLineNumberAlignment()
+ {
+ return alignment;
+ } //}}}
+
+ //{{{ setLineNumberAlignment() method
+ /**
+ * Sets the horizontal alignment of the line numbers.
+ * @param alignment Gutter.RIGHT, Gutter.CENTER, Gutter.LEFT
+ */
+ public void setLineNumberAlignment(int alignment)
+ {
+ if (this.alignment == alignment) return;
+
+ this.alignment = alignment;
+
+ repaint();
+ } //}}}
+
+ //{{{ isExpanded() method
+ /**
+ * Identifies whether the gutter is collapsed or expanded.
+ * @return true if the gutter is expanded, false if it is collapsed
+ */
+ public boolean isExpanded()
+ {
+ return expanded;
+ } //}}}
+
+ //{{{ setExpanded() method
+ /**
+ * Sets whether the gutter is collapsed or expanded and force the text
+ * area to update its layout if there is a change.
+ * @param expanded true if the gutter is expanded,
+ * false if it is collapsed
+ */
+ public void setExpanded(boolean expanded)
+ {
+ if (this.expanded == expanded) return;
+
+ this.expanded = expanded;
+
+ textArea.revalidate();
+ } //}}}
+
+ //{{{ toggleExpanded() method
+ /**
+ * Toggles whether the gutter is collapsed or expanded.
+ */
+ public void toggleExpanded()
+ {
+ setExpanded(!expanded);
+ } //}}}
+
+ //{{{ getHighlightInterval() method
+ /**
+ * Sets the number of lines between highlighted line numbers.
+ * @return The number of lines between highlighted line numbers or
+ * zero if highlighting is disabled
+ */
+ public int getHighlightInterval()
+ {
+ return interval;
+ } //}}}
+
+ //{{{ setHighlightInterval() method
+ /**
+ * Sets the number of lines between highlighted line numbers. Any value
+ * less than or equal to one will result in highlighting being disabled.
+ * @param interval The number of lines between highlighted line numbers
+ */
+ public void setHighlightInterval(int interval)
+ {
+ if (interval <= 1) interval = 0;
+ this.interval = interval;
+ repaint();
+ } //}}}
+
+ //{{{ isCurrentLineHighlightEnabled() method
+ public boolean isCurrentLineHighlightEnabled()
+ {
+ return currentLineHighlightEnabled;
+ } //}}}
+
+ //{{{ setCurrentLineHighlightEnabled() method
+ public void setCurrentLineHighlightEnabled(boolean enabled)
+ {
+ if (currentLineHighlightEnabled == enabled) return;
+
+ currentLineHighlightEnabled = enabled;
+
+ repaint();
+ } //}}}
+
+ //{{{ getStructureHighlightColor() method
+ /**
+ * Returns the structure highlight color.
+ * @since jEdit 4.2pre3
+ */
+ public final Color getStructureHighlightColor()
+ {
+ return structureHighlightColor;
+ } //}}}
+
+ //{{{ setStructureHighlightColor() method
+ /**
+ * Sets the structure highlight color.
+ * @param structureHighlightColor The structure highlight color
+ * @since jEdit 4.2pre3
+ */
+ public final void setStructureHighlightColor(Color structureHighlightColor)
+ {
+ this.structureHighlightColor = structureHighlightColor;
+ repaint();
+ } //}}}
+
+ //{{{ isStructureHighlightEnabled() method
+ /**
+ * Returns true if structure highlighting is enabled, false otherwise.
+ * @since jEdit 4.2pre3
+ */
+ public final boolean isStructureHighlightEnabled()
+ {
+ return structureHighlight;
+ } //}}}
+
+ //{{{ setStructureHighlightEnabled() method
+ /**
+ * Enables or disables structure highlighting.
+ * @param structureHighlight True if structure highlighting should be
+ * enabled, false otherwise
+ * @since jEdit 4.2pre3
+ */
+ public final void setStructureHighlightEnabled(boolean structureHighlight)
+ {
+ this.structureHighlight = structureHighlight;
+ repaint();
+ } //}}}
+
+ public void setSelectionPopupHandler(GutterPopupHandler handler)
+ {
+ mouseHandler.selectionPopupHandler = handler;
+ }
+
+ public GutterPopupHandler getSelectionPopupHandler()
+ {
+ return mouseHandler.selectionPopupHandler;
+ }
+
+ public void setMouseActionsProvider(MouseActionsProvider mouseActionsProvider)
+ {
+ mouseHandler.mouseActions = mouseActionsProvider;
+ }
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private static final int FOLD_MARKER_SIZE = 12;
+ private static final int SELECTION_GUTTER_WIDTH = 12;
+ // The selection gutter exists only if the gutter is not expanded
+
+ private boolean enabled;
+ private final TextArea textArea;
+ private MouseHandler mouseHandler;
+ private ExtensionManager extensionMgr;
+
+ private Dimension gutterSize = new Dimension(0,0);
+ private Dimension collapsedSize = new Dimension(0,0);
+ private int lineNumberWidth;
+ private Dimension disabledSize = new Dimension(0,0);
+
+ private Color intervalHighlight;
+ private Color currentLineHighlight;
+ private Color foldColor;
+ private Color selectionAreaBgColor;
+
+ private FontMetrics fm;
+
+ private int alignment;
+
+ private int interval;
+ private boolean currentLineHighlightEnabled;
+ private boolean expanded;
+ private boolean selectionAreaEnabled;
+
+ private boolean structureHighlight;
+ private Color structureHighlightColor;
+
+ private int borderWidth;
+ private Border focusBorder, noFocusBorder;
+
+ private FoldPainter foldPainter;
+ private JEditBuffer buffer;
+ private BufferListener bufferListener;
+ private int minLineNumberDigits;
+ private int selectionAreaWidth;
+ //}}}
+
+ //{{{ paintLine() method
+ private void paintLine(Graphics2D gfx, int line, int y)
+ {
+ JEditBuffer buffer = textArea.getBuffer();
+ if(buffer.isLoading())
+ return;
+
+ FontMetrics textAreaFm = textArea.getPainter().getFontMetrics();
+ int lineHeight = textAreaFm.getHeight();
+ int baseline = textAreaFm.getAscent();
+
+ ChunkCache.LineInfo info = textArea.chunkCache.getLineInfo(line);
+ int physicalLine = info.physicalLine;
+
+ // Skip lines beyond EOF
+ if(physicalLine == -1)
+ return;
+
+ boolean drawFoldMiddle = true;
+ //{{{ Paint fold start and end indicators
+ if(info.firstSubregion && buffer.isFoldStart(physicalLine))
+ {
+ drawFoldMiddle = false;
+ foldPainter.paintFoldStart(this, gfx, line, physicalLine,
+ textArea.displayManager.isLineVisible(physicalLine+1),
+ y, lineHeight, buffer);
+ }
+ else if(info.lastSubregion && buffer.isFoldEnd(physicalLine))
+ {
+ drawFoldMiddle = false;
+ foldPainter.paintFoldEnd(this, gfx, line, physicalLine, y,
+ lineHeight, buffer);
+ } //}}}
+ //{{{ Paint bracket scope
+ else if(structureHighlight)
+ {
+ StructureMatcher.Match match = textArea.getStructureMatch();
+ int caretLine = textArea.getCaretLine();
+
+ if(textArea.isStructureHighlightVisible()
+ && physicalLine >= Math.min(caretLine,match.startLine)
+ && physicalLine <= Math.max(caretLine,match.startLine))
+ {
+ int caretScreenLine;
+ if(caretLine > textArea.getLastPhysicalLine())
+ caretScreenLine = Integer.MAX_VALUE;
+ else if(textArea.displayManager.isLineVisible(
+ textArea.getCaretLine()))
+ {
+ caretScreenLine = textArea
+ .getScreenLineOfOffset(
+ textArea.getCaretPosition());
+ }
+ else
+ {
+ caretScreenLine = -1;
+ }
+
+ int structScreenLine;
+ if(match.startLine > textArea.getLastPhysicalLine())
+ structScreenLine = Integer.MAX_VALUE;
+ else if(textArea.displayManager.isLineVisible(
+ match.startLine))
+ {
+ structScreenLine = textArea
+ .getScreenLineOfOffset(
+ match.start);
+ }
+ else
+ {
+ structScreenLine = -1;
+ }
+
+ if(caretScreenLine > structScreenLine)
+ {
+ int tmp = caretScreenLine;
+ caretScreenLine = structScreenLine;
+ structScreenLine = tmp;
+ }
+
+ gfx.setColor(structureHighlightColor);
+ drawFoldMiddle = false;
+ if(structScreenLine == caretScreenLine)
+ {
+ // do nothing
+ drawFoldMiddle = true;
+ }
+ // draw |^
+ else if(line == caretScreenLine)
+ {
+ gfx.fillRect(5,
+ y
+ + lineHeight / 2,
+ 5,
+ 2);
+ gfx.fillRect(5,
+ y
+ + lineHeight / 2,
+ 2,
+ lineHeight - lineHeight / 2);
+ }
+ // draw |_
+ else if(line == structScreenLine)
+ {
+ gfx.fillRect(5,
+ y,
+ 2,
+ lineHeight / 2);
+ gfx.fillRect(5,
+ y + lineHeight / 2,
+ 5,
+ 2);
+ }
+ // draw |
+ else if(line > caretScreenLine
+ && line < structScreenLine)
+ {
+ gfx.fillRect(5,
+ y,
+ 2,
+ lineHeight);
+ }
+ }
+ } //}}}
+ if(drawFoldMiddle && buffer.getFoldLevel(physicalLine) > 0)
+ {
+ foldPainter.paintFoldMiddle(this, gfx, line, physicalLine,
+ y, lineHeight, buffer);
+ }
+
+ //{{{ Paint line numbers
+ if(info.firstSubregion && expanded)
+ {
+ String number = Integer.toString(physicalLine + 1);
+
+ int offset;
+ switch (alignment)
+ {
+ case RIGHT:
+ offset = lineNumberWidth - (fm.stringWidth(number) + 1);
+ break;
+ case CENTER:
+ offset = (lineNumberWidth - fm.stringWidth(number)) / 2;
+ break;
+ case LEFT: default:
+ offset = 0;
+ break;
+ }
+
+ if (physicalLine == textArea.getCaretLine() && currentLineHighlightEnabled)
+ {
+ gfx.setColor(currentLineHighlight);
+ }
+ else if (interval > 1 && (physicalLine + 1) % interval == 0)
+ gfx.setColor(intervalHighlight);
+ else
+ gfx.setColor(getForeground());
+
+ gfx.drawString(number, FOLD_MARKER_SIZE + offset,
+ baseline + y);
+ } //}}}
+ } //}}}
+
+ //}}}
+
+ //{{{ MouseHandler class
+ class MouseHandler extends MouseInputAdapter
+ {
+ MouseActionsProvider mouseActions;
+ boolean drag;
+ int toolTipInitialDelay, toolTipReshowDelay;
+ boolean selectLines;
+ int selAnchorLine;
+ GutterPopupHandler selectionPopupHandler;
+
+ //{{{ mouseEntered() method
+ public void mouseEntered(MouseEvent e)
+ {
+ ToolTipManager ttm = ToolTipManager.sharedInstance();
+ toolTipInitialDelay = ttm.getInitialDelay();
+ toolTipReshowDelay = ttm.getReshowDelay();
+ ttm.setInitialDelay(0);
+ ttm.setReshowDelay(0);
+ } //}}}
+
+ //{{{ mouseExited() method
+ public void mouseExited(MouseEvent evt)
+ {
+ ToolTipManager ttm = ToolTipManager.sharedInstance();
+ ttm.setInitialDelay(toolTipInitialDelay);
+ ttm.setReshowDelay(toolTipReshowDelay);
+ } //}}}
+
+ //{{{ mousePressed() method
+ public void mousePressed(MouseEvent e)
+ {
+ textArea.requestFocus();
+
+ boolean outsideGutter =
+ (e.getX() >= getWidth() - borderWidth * 2);
+ if(TextAreaMouseHandler.isPopupTrigger(e) || outsideGutter)
+ {
+ if ((selectionPopupHandler != null) &&
+ (! outsideGutter) &&
+ (e.getX() > FOLD_MARKER_SIZE))
+ {
+ int screenLine = e.getY() / textArea.getPainter()
+ .getFontMetrics().getHeight();
+ int line = textArea.chunkCache.getLineInfo(screenLine)
+ .physicalLine;
+ if (line >= 0)
+ {
+ selectionPopupHandler.handlePopup(
+ e.getX(), e.getY(), line);
+ return;
+ }
+ }
+ e.translatePoint(-getWidth(),0);
+ textArea.mouseHandler.mousePressed(e);
+ drag = true;
+ }
+ else
+ {
+ JEditBuffer buffer = textArea.getBuffer();
+
+ int screenLine = e.getY() / textArea.getPainter()
+ .getFontMetrics().getHeight();
+
+ int line = textArea.chunkCache.getLineInfo(screenLine)
+ .physicalLine;
+
+ if(line == -1)
+ return;
+
+ if (e.getX() >= FOLD_MARKER_SIZE)
+ {
+ Selection s = new Selection.Range(
+ textArea.getLineStartOffset(line),
+ getFoldEndOffset(line));
+ if(textArea.isMultipleSelectionEnabled())
+ textArea.addToSelection(s);
+ else
+ textArea.setSelection(s);
+ selectLines = true;
+ selAnchorLine = line;
+ return;
+ }
+
+ //{{{ Determine action
+ String defaultAction;
+ String variant;
+ if(buffer.isFoldStart(line))
+ {
+ defaultAction = "toggle-fold";
+ variant = "fold";
+ }
+ else if(structureHighlight
+ && textArea.isStructureHighlightVisible()
+ && textArea.lineInStructureScope(line))
+ {
+ defaultAction = "match-struct";
+ variant = "struct";
+ }
+ else
+ return;
+
+ String action = null;
+
+ if (mouseActions != null)
+ action = mouseActions.getActionForEvent(
+ e,variant);
+
+ if(action == null)
+ action = defaultAction;
+ //}}}
+
+ //{{{ Handle actions
+ StructureMatcher.Match match = textArea
+ .getStructureMatch();
+
+ if(action.equals("select-fold"))
+ {
+ textArea.displayManager.expandFold(line,true);
+ textArea.selectFold(line);
+ }
+ else if(action.equals("narrow-fold"))
+ {
+ int[] lines = buffer.getFoldAtLine(line);
+ textArea.displayManager.narrow(lines[0],lines[1]);
+ }
+ else if(action.startsWith("toggle-fold"))
+ {
+ if(textArea.displayManager
+ .isLineVisible(line + 1))
+ {
+ textArea.collapseFold(line);
+ }
+ else
+ {
+ if(action.endsWith("-fully"))
+ {
+ textArea.displayManager
+ .expandFold(line,
+ true);
+ }
+ else
+ {
+ textArea.displayManager
+ .expandFold(line,
+ false);
+ }
+ }
+ }
+ else if(action.equals("match-struct"))
+ {
+ if(match != null)
+ textArea.setCaretPosition(match.end);
+ }
+ else if(action.equals("select-struct"))
+ {
+ if(match != null)
+ {
+ match.matcher.selectMatch(
+ textArea);
+ }
+ }
+ else if(action.equals("narrow-struct"))
+ {
+ if(match != null)
+ {
+ int start = Math.min(
+ match.startLine,
+ textArea.getCaretLine());
+ int end = Math.max(
+ match.endLine,
+ textArea.getCaretLine());
+ textArea.displayManager.narrow(start,end);
+ }
+ } //}}}
+ }
+ } //}}}
+
+ //{{{ mouseDragged() method
+ public void mouseDragged(MouseEvent e)
+ {
+ if(drag /* && e.getX() >= getWidth() - borderWidth * 2 */)
+ {
+ e.translatePoint(-getWidth(),0);
+ textArea.mouseHandler.mouseDragged(e);
+ }
+ else if(selectLines)
+ {
+ int screenLine = e.getY() / textArea.getPainter()
+ .getFontMetrics().getHeight();
+ int line;
+ if(e.getY() < 0)
+ {
+ textArea.scrollUpLine();
+ line = textArea.getFirstPhysicalLine();
+ }
+ else if(e.getY() >= getHeight())
+ {
+ textArea.scrollDownLine();
+ line = textArea.getLastPhysicalLine();
+ }
+ else
+ line = textArea.chunkCache.getLineInfo(screenLine)
+ .physicalLine;
+
+ int selStart, selEnd;
+ if(line < selAnchorLine)
+ {
+ selStart = textArea.getLineStartOffset(line);
+ selEnd = getFoldEndOffset(selAnchorLine);
+ }
+ else
+ {
+ selStart = textArea.getLineStartOffset(selAnchorLine);
+ selEnd = getFoldEndOffset(line);
+ }
+
+ textArea.resizeSelection(selStart, selEnd, 0, false);
+ }
+ } //}}}
+
+ //{{{ getFoldEndOffset() method
+ private int getFoldEndOffset(int line)
+ {
+ JEditBuffer buffer = textArea.getBuffer();
+ int endLine;
+ if ((line == buffer.getLineCount() - 1) ||
+ (textArea.displayManager.isLineVisible(line + 1)))
+ {
+ endLine = line;
+ }
+ else
+ {
+ int[] lines = buffer.getFoldAtLine(line);
+ endLine = lines[1];
+ }
+
+ if(endLine == buffer.getLineCount() - 1)
+ return buffer.getLineEndOffset(endLine) - 1;
+ else
+ return buffer.getLineEndOffset(endLine);
+ } //}}}
+
+ //{{{ mouseReleased() method
+ public void mouseReleased(MouseEvent e)
+ {
+ if(drag && e.getX() >= getWidth() - borderWidth * 2)
+ {
+ e.translatePoint(-getWidth(),0);
+ textArea.mouseHandler.mouseReleased(e);
+ }
+
+ drag = false;
+ selectLines = false;
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/InputMethodSupport.java b/jEdit/org/gjt/sp/jedit/textarea/InputMethodSupport.java
index 59de461..a35de12 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/InputMethodSupport.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/InputMethodSupport.java
@@ -1,290 +1,290 @@
-/*
- * InputMethodSupport.java - Input method support for JEditTextArea
- *
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Kazutoshi Satoda
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-// {{{ Imports
-import java.text.AttributedString;
-import java.text.AttributedCharacterIterator;
-import java.awt.Point;
-import java.awt.Rectangle;
-import java.awt.Graphics2D;
-import java.awt.FontMetrics;
-import java.awt.im.InputMethodRequests;
-import java.awt.event.InputMethodListener;
-import java.awt.event.InputMethodEvent;
-import java.awt.font.TextLayout;
-import java.awt.font.TextAttribute;
-import java.awt.font.TextHitInfo;
-// }}}
-
-/**
- * Input method support for JEditTextArea
- *
- * @author Kazutoshi Satoda
- * @since jEdit 4.3pre7
- */
-
-class InputMethodSupport
- extends TextAreaExtension
- implements InputMethodRequests, InputMethodListener
-{
- // The owner.
- private TextArea owner;
- // The composed text layout which was built from last InputMethodEvent.
- private TextLayout composedTextLayout = null;
- // The X offset to the caret in the composed text.
- private int composedCaretX = 0;
- // Last committed information to support cancelLatestCommittedText()
- private int lastCommittedAt = 0;
- private String lastCommittedText = null;
-
- public InputMethodSupport(TextArea owner)
- {
- this.owner = owner;
- owner.addInputMethodListener(this);
- owner.getPainter().addExtension(TextAreaPainter.HIGHEST_LAYER, this);
- }
-
-
- // {{{ Private utilities
- // Compute return value of getTextLocation() from (x, y).
- private Rectangle getCaretRectangle(int x, int y)
- {
- TextAreaPainter painter = owner.getPainter();
- Point origin = painter.getLocationOnScreen();
- int height = painter.getFontMetrics().getHeight();
- return new Rectangle(origin.x + x, origin.y + y, 0, height);
- }
- // }}}
-
-
- // {{{ extends TextAreaExtension
- public void paintValidLine(Graphics2D gfx, int screenLine,
- int physicalLine, int start, int end, int y)
- {
- if(composedTextLayout != null)
- {
- int caret = owner.getCaretPosition();
- if(start <= caret && caret < end)
- {
- TextAreaPainter painter = owner.getPainter();
- // The hight and baseline are taken from
- // painter's FontMetrics instead of TextLayout
- // so that the composed text is rendered at
- // the same position with text in the TextArea.
- FontMetrics fm = painter.getFontMetrics();
- int x = owner.offsetToXY(caret).x;
- int width = Math.round(composedTextLayout.getAdvance());
- int height = fm.getHeight();
- int offset_to_baseline = height
- - (fm.getLeading()+1) - fm.getDescent();
- int caret_x = x + composedCaretX;
-
- gfx.setColor(painter.getBackground());
- gfx.fillRect(x, y, width, height);
- gfx.setColor(painter.getForeground());
- composedTextLayout.draw(gfx, x, y + offset_to_baseline);
- gfx.setColor(painter.getCaretColor());
- gfx.drawLine(caret_x, y, caret_x, y + height - 1);
- }
- }
- }
- // }}}
-
-
- // {{{ implements InputMethodRequests
- public Rectangle getTextLocation(TextHitInfo offset)
- {
- if(composedTextLayout != null)
- {
- // return location of composed text.
- Point caret = owner.offsetToXY(owner.getCaretPosition());
- return getCaretRectangle(caret.x + composedCaretX, caret.y);
- }
- else
- {
- // return location of selected text.
- Selection selection_on_caret = owner.getSelectionAtOffset(owner.getCaretPosition());
- if(selection_on_caret != null)
- {
- Point selection_start = owner.offsetToXY(selection_on_caret.getStart());
- return getCaretRectangle(selection_start.x, selection_start.y);
- }
- }
- return null;
- }
-
- public TextHitInfo getLocationOffset(int x, int y)
- {
- if(composedTextLayout != null)
- {
- Point origin = owner.getPainter().getLocationOnScreen();
- Point caret = owner.offsetToXY(owner.getCaretPosition());
- float local_x = x - origin.x - caret.x;
- float local_y = y - origin.y - caret.y
- - (composedTextLayout.getLeading()+1)
- - composedTextLayout.getAscent();
- return composedTextLayout.hitTestChar(local_x, local_y);
- }
- return null;
- }
-
- public int getInsertPositionOffset()
- {
- return owner.getCaretPosition();
- }
-
- public AttributedCharacterIterator getCommittedText(int beginIndex , int endIndex
- , AttributedCharacterIterator.Attribute[] attributes)
- {
- return (new AttributedString(owner.getText(beginIndex, endIndex - beginIndex))).getIterator();
- }
-
- public int getCommittedTextLength()
- {
- return owner.getBufferLength();
- }
-
- public AttributedCharacterIterator cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes)
- {
- if(lastCommittedText != null)
- {
- int offset = lastCommittedAt;
- int length = lastCommittedText.length();
- String sample = owner.getText(offset, length);
- if(sample != null && sample.equals(lastCommittedText))
- {
- AttributedCharacterIterator canceled = (new AttributedString(sample)).getIterator();
- owner.getBuffer().remove(offset, length);
- owner.setCaretPosition(offset);
- lastCommittedText = null;
- return canceled;
- }
- // Cleare last committed information to prevent
- // accidental match.
- lastCommittedText = null;
- }
- return null;
- }
-
- public AttributedCharacterIterator getSelectedText(AttributedCharacterIterator.Attribute[] attributes)
- {
- Selection selection_on_caret = owner.getSelectionAtOffset(owner.getCaretPosition());
- if(selection_on_caret != null)
- {
- return (new AttributedString(owner.getSelectedText(selection_on_caret))).getIterator();
- }
- return null;
- }
- // }}}
-
-
- // {{{ implements InputMethodListener
- public void inputMethodTextChanged(InputMethodEvent event)
- {
- composedTextLayout = null;
- AttributedCharacterIterator text = event.getText();
- if(text != null)
- {
- int committed_count = event.getCommittedCharacterCount();
- if(committed_count > 0)
- {
- lastCommittedText = null;
- lastCommittedAt = owner.getCaretPosition();
- StringBuilder committed = new StringBuilder(committed_count);
- char c;
- int count;
- for(c = text.first(), count = committed_count
- ; c != AttributedCharacterIterator.DONE && count > 0
- ; c = text.next(), --count)
- {
- owner.userInput(c);
- committed.append(c);
- }
- lastCommittedText = committed.toString();
- }
- int end_index = text.getEndIndex();
- if(committed_count < end_index)
- {
- AttributedString composed = new AttributedString(text, committed_count, end_index);
- TextAreaPainter painter = owner.getPainter();
- composed.addAttribute(TextAttribute.FONT, painter.getFont());
- composedTextLayout = new TextLayout(composed.getIterator()
- , painter.getFontRenderContext());
- }
- }
- // Also updates caret.
- caretPositionChanged(event);
- }
-
- public void caretPositionChanged(InputMethodEvent event)
- {
- composedCaretX = 0;
- if(composedTextLayout != null)
- {
- TextHitInfo caret = event.getCaret();
- if(caret != null)
- {
- composedCaretX = Math.round(composedTextLayout.getCaretInfo(caret)[0]);
- }
- // Adjust visiblity.
- int insertion_x = owner.offsetToXY(owner.getCaretPosition()).x;
- TextHitInfo visible = event.getVisiblePosition();
- int composed_visible_x = (visible != null)
- ? Math.round(composedTextLayout.getCaretInfo(visible)[0])
- : composedCaretX;
- int visible_x = insertion_x + composed_visible_x;
- int painter_width = owner.getPainter().getWidth();
- int adjustment = 0;
- if(visible_x < 0)
- {
- adjustment = visible_x;
- }
- if(visible_x >= painter_width)
- {
- adjustment = visible_x - (painter_width - 1);
- }
- if(adjustment != 0)
- {
- owner.setHorizontalOffset(owner.getHorizontalOffset() - adjustment);
- }
- }
- else
- {
- /* Cancel horizontal adjustment for composed text.
- FIXME:
- The horizontal offset may be beyond the max
- value of owner's horizontal scroll bar.
- */
- owner.scrollToCaret(false);
- }
- /* Invalidate one more line below the caret because
- the underline for composed text goes beyond the caret
- line in some font settings. */
- int caret_line = owner.getCaretLine();
- owner.invalidateLineRange(caret_line, caret_line + 1);
- event.consume();
- }
- // }}}
-}
+/*
+ * InputMethodSupport.java - Input method support for JEditTextArea
+ *
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Kazutoshi Satoda
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+// {{{ Imports
+import java.text.AttributedString;
+import java.text.AttributedCharacterIterator;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Graphics2D;
+import java.awt.FontMetrics;
+import java.awt.im.InputMethodRequests;
+import java.awt.event.InputMethodListener;
+import java.awt.event.InputMethodEvent;
+import java.awt.font.TextLayout;
+import java.awt.font.TextAttribute;
+import java.awt.font.TextHitInfo;
+// }}}
+
+/**
+ * Input method support for JEditTextArea
+ *
+ * @author Kazutoshi Satoda
+ * @since jEdit 4.3pre7
+ */
+
+class InputMethodSupport
+ extends TextAreaExtension
+ implements InputMethodRequests, InputMethodListener
+{
+ // The owner.
+ private TextArea owner;
+ // The composed text layout which was built from last InputMethodEvent.
+ private TextLayout composedTextLayout = null;
+ // The X offset to the caret in the composed text.
+ private int composedCaretX = 0;
+ // Last committed information to support cancelLatestCommittedText()
+ private int lastCommittedAt = 0;
+ private String lastCommittedText = null;
+
+ public InputMethodSupport(TextArea owner)
+ {
+ this.owner = owner;
+ owner.addInputMethodListener(this);
+ owner.getPainter().addExtension(TextAreaPainter.HIGHEST_LAYER, this);
+ }
+
+
+ // {{{ Private utilities
+ // Compute return value of getTextLocation() from (x, y).
+ private Rectangle getCaretRectangle(int x, int y)
+ {
+ TextAreaPainter painter = owner.getPainter();
+ Point origin = painter.getLocationOnScreen();
+ int height = painter.getFontMetrics().getHeight();
+ return new Rectangle(origin.x + x, origin.y + y, 0, height);
+ }
+ // }}}
+
+
+ // {{{ extends TextAreaExtension
+ public void paintValidLine(Graphics2D gfx, int screenLine,
+ int physicalLine, int start, int end, int y)
+ {
+ if(composedTextLayout != null)
+ {
+ int caret = owner.getCaretPosition();
+ if(start <= caret && caret < end)
+ {
+ TextAreaPainter painter = owner.getPainter();
+ // The hight and baseline are taken from
+ // painter's FontMetrics instead of TextLayout
+ // so that the composed text is rendered at
+ // the same position with text in the TextArea.
+ FontMetrics fm = painter.getFontMetrics();
+ int x = owner.offsetToXY(caret).x;
+ int width = Math.round(composedTextLayout.getAdvance());
+ int height = fm.getHeight();
+ int offset_to_baseline = height
+ - (fm.getLeading()+1) - fm.getDescent();
+ int caret_x = x + composedCaretX;
+
+ gfx.setColor(painter.getBackground());
+ gfx.fillRect(x, y, width, height);
+ gfx.setColor(painter.getForeground());
+ composedTextLayout.draw(gfx, x, y + offset_to_baseline);
+ gfx.setColor(painter.getCaretColor());
+ gfx.drawLine(caret_x, y, caret_x, y + height - 1);
+ }
+ }
+ }
+ // }}}
+
+
+ // {{{ implements InputMethodRequests
+ public Rectangle getTextLocation(TextHitInfo offset)
+ {
+ if(composedTextLayout != null)
+ {
+ // return location of composed text.
+ Point caret = owner.offsetToXY(owner.getCaretPosition());
+ return getCaretRectangle(caret.x + composedCaretX, caret.y);
+ }
+ else
+ {
+ // return location of selected text.
+ Selection selection_on_caret = owner.getSelectionAtOffset(owner.getCaretPosition());
+ if(selection_on_caret != null)
+ {
+ Point selection_start = owner.offsetToXY(selection_on_caret.getStart());
+ return getCaretRectangle(selection_start.x, selection_start.y);
+ }
+ }
+ return null;
+ }
+
+ public TextHitInfo getLocationOffset(int x, int y)
+ {
+ if(composedTextLayout != null)
+ {
+ Point origin = owner.getPainter().getLocationOnScreen();
+ Point caret = owner.offsetToXY(owner.getCaretPosition());
+ float local_x = x - origin.x - caret.x;
+ float local_y = y - origin.y - caret.y
+ - (composedTextLayout.getLeading()+1)
+ - composedTextLayout.getAscent();
+ return composedTextLayout.hitTestChar(local_x, local_y);
+ }
+ return null;
+ }
+
+ public int getInsertPositionOffset()
+ {
+ return owner.getCaretPosition();
+ }
+
+ public AttributedCharacterIterator getCommittedText(int beginIndex , int endIndex
+ , AttributedCharacterIterator.Attribute[] attributes)
+ {
+ return (new AttributedString(owner.getText(beginIndex, endIndex - beginIndex))).getIterator();
+ }
+
+ public int getCommittedTextLength()
+ {
+ return owner.getBufferLength();
+ }
+
+ public AttributedCharacterIterator cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes)
+ {
+ if(lastCommittedText != null)
+ {
+ int offset = lastCommittedAt;
+ int length = lastCommittedText.length();
+ String sample = owner.getText(offset, length);
+ if(sample != null && sample.equals(lastCommittedText))
+ {
+ AttributedCharacterIterator canceled = (new AttributedString(sample)).getIterator();
+ owner.getBuffer().remove(offset, length);
+ owner.setCaretPosition(offset);
+ lastCommittedText = null;
+ return canceled;
+ }
+ // Cleare last committed information to prevent
+ // accidental match.
+ lastCommittedText = null;
+ }
+ return null;
+ }
+
+ public AttributedCharacterIterator getSelectedText(AttributedCharacterIterator.Attribute[] attributes)
+ {
+ Selection selection_on_caret = owner.getSelectionAtOffset(owner.getCaretPosition());
+ if(selection_on_caret != null)
+ {
+ return (new AttributedString(owner.getSelectedText(selection_on_caret))).getIterator();
+ }
+ return null;
+ }
+ // }}}
+
+
+ // {{{ implements InputMethodListener
+ public void inputMethodTextChanged(InputMethodEvent event)
+ {
+ composedTextLayout = null;
+ AttributedCharacterIterator text = event.getText();
+ if(text != null)
+ {
+ int committed_count = event.getCommittedCharacterCount();
+ if(committed_count > 0)
+ {
+ lastCommittedText = null;
+ lastCommittedAt = owner.getCaretPosition();
+ StringBuilder committed = new StringBuilder(committed_count);
+ char c;
+ int count;
+ for(c = text.first(), count = committed_count
+ ; c != AttributedCharacterIterator.DONE && count > 0
+ ; c = text.next(), --count)
+ {
+ owner.userInput(c);
+ committed.append(c);
+ }
+ lastCommittedText = committed.toString();
+ }
+ int end_index = text.getEndIndex();
+ if(committed_count < end_index)
+ {
+ AttributedString composed = new AttributedString(text, committed_count, end_index);
+ TextAreaPainter painter = owner.getPainter();
+ composed.addAttribute(TextAttribute.FONT, painter.getFont());
+ composedTextLayout = new TextLayout(composed.getIterator()
+ , painter.getFontRenderContext());
+ }
+ }
+ // Also updates caret.
+ caretPositionChanged(event);
+ }
+
+ public void caretPositionChanged(InputMethodEvent event)
+ {
+ composedCaretX = 0;
+ if(composedTextLayout != null)
+ {
+ TextHitInfo caret = event.getCaret();
+ if(caret != null)
+ {
+ composedCaretX = Math.round(composedTextLayout.getCaretInfo(caret)[0]);
+ }
+ // Adjust visiblity.
+ int insertion_x = owner.offsetToXY(owner.getCaretPosition()).x;
+ TextHitInfo visible = event.getVisiblePosition();
+ int composed_visible_x = (visible != null)
+ ? Math.round(composedTextLayout.getCaretInfo(visible)[0])
+ : composedCaretX;
+ int visible_x = insertion_x + composed_visible_x;
+ int painter_width = owner.getPainter().getWidth();
+ int adjustment = 0;
+ if(visible_x < 0)
+ {
+ adjustment = visible_x;
+ }
+ if(visible_x >= painter_width)
+ {
+ adjustment = visible_x - (painter_width - 1);
+ }
+ if(adjustment != 0)
+ {
+ owner.setHorizontalOffset(owner.getHorizontalOffset() - adjustment);
+ }
+ }
+ else
+ {
+ /* Cancel horizontal adjustment for composed text.
+ FIXME:
+ The horizontal offset may be beyond the max
+ value of owner's horizontal scroll bar.
+ */
+ owner.scrollToCaret(false);
+ }
+ /* Invalidate one more line below the caret because
+ the underline for composed text goes beyond the caret
+ line in some font settings. */
+ int caret_line = owner.getCaretLine();
+ owner.invalidateLineRange(caret_line, caret_line + 1);
+ event.consume();
+ }
+ // }}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/JEditTextArea.java b/jEdit/org/gjt/sp/jedit/textarea/JEditTextArea.java
index f41609b..37fe93d 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/JEditTextArea.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/JEditTextArea.java
@@ -1,642 +1,642 @@
-/*
- * JEditTextArea.java - jEdit's text component
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2005 Slava Pestov
- * Portions copyright (C) 2000 Ollie Rutherfurd
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import java.awt.AWTEvent;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import java.awt.Point;
-import java.awt.event.MouseEvent;
-import javax.swing.JMenuItem;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.options.GlobalOptions;
-
-import org.gjt.sp.jedit.msg.PositionChanging;
-//}}}
-
-/**
- * jEdit's text component.<p>
- *
- * Unlike most other text editors, the selection API permits selection and
- * concurrent manipulation of multiple, non-contiguous regions of text.
- * Methods in this class that deal with selecting text rely upon classes derived
- * the {@link Selection} class.
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: JEditTextArea.java 16763 2009-12-28 16:20:33Z k_satoda $
- */
-public class JEditTextArea extends TextArea
-{
-
- //{{{ JEditTextArea constructor
- /**
- * Creates a new JEditTextArea.
- */
- public JEditTextArea(View view)
- {
- super(jEdit.getPropertyManager(), view);
- enableEvents(AWTEvent.FOCUS_EVENT_MASK | AWTEvent.KEY_EVENT_MASK);
- this.view = view;
- } //}}}
-
- //{{{ getFoldPainter() method
- @Override
- public FoldPainter getFoldPainter()
- {
- FoldPainter foldPainter = (FoldPainter) ServiceManager.getService(
- FOLD_PAINTER_SERVICE, getFoldPainterName());
- if (foldPainter == null)
- foldPainter = (FoldPainter) ServiceManager.getService(
- FOLD_PAINTER_SERVICE,
- DEFAULT_FOLD_PAINTER_SERVICE);
- return foldPainter;
- } //}}}
-
- // {{{ Overrides for macro recording.
- //{{{ home() method
- /**
- * An override to record the acutual action taken for home().
- */
- @Override
- public void home(boolean select)
- {
- Macros.Recorder recorder = view.getMacroRecorder();
- switch(getInputHandler().getLastActionCount() % 2)
- {
- case 1:
- if(recorder != null)
- recorder.record("textArea.goToStartOfWhiteSpace(" + select + ");");
- goToStartOfWhiteSpace(select);
- break;
- default:
- if(recorder != null)
- recorder.record("textArea.goToStartOfLine(" + select + ");");
- goToStartOfLine(select);
- break;
- }
- } //}}}
-
- //{{{ end() method
- /**
- * An override to record the acutual action taken for end().
- */
- @Override
- public void end(boolean select)
- {
- Macros.Recorder recorder = view.getMacroRecorder();
-
- switch(getInputHandler().getLastActionCount() % 2)
- {
- case 1:
- if(recorder != null)
- recorder.record("textArea.goToEndOfWhiteSpace(" + select + ");");
- goToEndOfWhiteSpace(select);
- break;
- default:
- if(recorder != null)
- recorder.record("textArea.goToEndOfLine(" + select + ");");
- goToEndOfLine(select);
- break;
- }
- } //}}}
-
- //{{{ smartHome() method
- /**
- * An override to record the acutual action taken for smartHome().
- */
- @Override
- public void smartHome(boolean select)
- {
- Macros.Recorder recorder = view.getMacroRecorder();
-
- switch(view.getInputHandler().getLastActionCount())
- {
- case 1:
- if(recorder != null)
- recorder.record("textArea.goToStartOfWhiteSpace(" + select + ");");
-
- goToStartOfWhiteSpace(select);
- break;
- case 2:
- if(recorder != null)
- recorder.record("textArea.goToStartOfLine(" + select + ");");
-
- goToStartOfLine(select);
- break;
- default: //case 3:
- if(recorder != null)
- recorder.record("textArea.goToFirstVisibleLine(" + select + ");");
-
- goToFirstVisibleLine(select);
- break;
- }
- } //}}}
-
- //{{{ smartEnd() method
- /**
- * An override to record the acutual action taken for smartHome().
- */
- @Override
- public void smartEnd(boolean select)
- {
- Macros.Recorder recorder = view.getMacroRecorder();
-
- switch(view.getInputHandler().getLastActionCount())
- {
- case 1:
- if(recorder != null)
- recorder.record("textArea.goToEndOfWhiteSpace(" + select + ");");
-
- goToEndOfWhiteSpace(select);
- break;
- case 2:
- if(recorder != null)
- recorder.record("textArea.goToEndOfLine(" + select + ");");
-
- goToEndOfLine(select);
- break;
- default: //case 3:
- if(recorder != null)
- recorder.record("textArea.goToLastVisibleLine(" + select + ");");
- goToLastVisibleLine(select);
- break;
- }
- } //}}}
- // }}}
-
- // {{{ overrides from the base class that are EditBus aware
- public void goToBufferEnd(boolean select)
- {
- EditBus.send(new PositionChanging(this));
- super.goToBufferEnd(select);
- }
-
- //{{{ goToMatchingBracket() method
- /**
- * Moves the caret to the bracket matching the one before the caret.
- * Also sends PositionChanging if it goes somewhere.
- * @since jEdit 4.3pre18
- */
- public void goToMatchingBracket()
- {
- if(getLineLength(caretLine) != 0)
- {
- int dot = caret - getLineStartOffset(caretLine);
-
- int bracket = TextUtilities.findMatchingBracket(
- buffer,caretLine,Math.max(0,dot - 1));
- if(bracket != -1)
- {
- EditBus.send(new PositionChanging(this));
- selectNone();
- moveCaretPosition(bracket + 1,false);
- return;
- }
- }
- getToolkit().beep();
- } //}}}
-
-
- public void goToBufferStart(boolean select)
- {
- EditBus.send(new PositionChanging(this));
- super.goToBufferStart(select);
- } // }}}
-
- // {{{ replaceSelection(String)
- @Override
- public int replaceSelection(String selectedText)
- {
- EditBus.send(new PositionChanging(this));
- return super.replaceSelection(selectedText);
- }//}}}
-
- //{{{ showGoToLineDialog() method
- /**
- * Displays the 'go to line' dialog box, and moves the caret to the
- * specified line number.
- * @since jEdit 2.7pre2
- */
- public void showGoToLineDialog()
- {
- String line = GUIUtilities.input(view,"goto-line",null);
- if(line == null)
- return;
-
- try
- {
- int lineNumber = Integer.parseInt(line) - 1;
- EditBus.send(new PositionChanging(this));
- setCaretPosition(getLineStartOffset(lineNumber));
- }
- catch(Exception e)
- {
- getToolkit().beep();
- }
- } //}}}
-
- //{{{ userInput() method
- /**
- * Handles the insertion of the specified character. It performs the
- * following operations in addition to TextArea#userInput(char):
- * <ul>
- * <li>Inserting a space with automatic abbrev expansion enabled will
- * try to expand the abbrev
- * </ul>
- *
- * @param ch The character
- * @since jEdit 2.7pre3
- */
- @Override
- public void userInput(char ch)
- {
- if(ch == ' ' && Abbrevs.getExpandOnInput()
- && Abbrevs.expandAbbrev(view,false))
- return;
-
- super.userInput(ch);
- } //}}}
-
- //{{{ addExplicitFold() method
- /**
- * Surrounds the selection with explicit fold markers.
- * @since jEdit 4.0pre3
- */
- @Override
- public void addExplicitFold()
- {
- try
- {
- super.addExplicitFold();
- }
- catch (TextAreaException e)
- {
- GUIUtilities.error(view,"folding-not-explicit",null);
- }
- } //}}}
-
- //{{{ formatParagraph() method
- /**
- * Formats the paragraph containing the caret.
- * @since jEdit 2.7pre2
- */
- @Override
- public void formatParagraph()
- {
- try
- {
- super.formatParagraph();
- }
- catch (TextAreaException e)
- {
- GUIUtilities.error(view,"format-maxlinelen",null);
- }
- } //}}}
-
- //{{{ doWordCount() method
- protected static void doWordCount(View view, String text)
- {
- char[] chars = text.toCharArray();
- int characters = chars.length;
- int words = 0;
- int lines = 1;
-
- boolean word = true;
- for(int i = 0; i < chars.length; i++)
- {
- switch(chars[i])
- {
- case '\r': case '\n':
- lines++;
- case ' ': case '\t':
- word = true;
- break;
- default:
- if(word)
- {
- words++;
- word = false;
- }
- break;
- }
- }
-
- Object[] args = { characters, words, lines };
- GUIUtilities.message(view,"wordcount",args);
- } //}}}
-
- //{{{ showWordCountDialog() method
- /**
- * Displays the 'word count' dialog box.
- * @since jEdit 2.7pre2
- */
- public void showWordCountDialog()
- {
- String selection = getSelectedText();
- if(selection != null)
- {
- doWordCount(view,selection);
- return;
- }
-
- doWordCount(view,buffer.getText(0,buffer.getLength()));
- } //}}}
-
- //{{{ Getters and setters
-
- //{{{ getView() method
- /**
- * Returns this text area's view.
- * @since jEdit 4.2pre5
- */
- public View getView()
- {
- return view;
- } //}}}
-
- //}}}
-
- //{{{ Deprecated methods
-
- //{{{ getSelectionStart() method
- /**
- * @deprecated Instead, obtain a Selection instance using
- * any means, and call its <code>getStart()</code> method
- */
- @Deprecated
- public final int getSelectionStart()
- {
- if(getSelectionCount() != 1)
- return caret;
-
- return getSelection(0).getStart();
- } //}}}
-
- //{{{ getSelectionStart() method
- /**
- * @deprecated Instead, obtain a Selection instance using
- * any means, and call its <code>getStart(int)</code> method
- */
- @Deprecated
- public int getSelectionStart(int line)
- {
- if(getSelectionCount() != 1)
- return caret;
-
- return getSelection(0).getStart(buffer,line);
- } //}}}
-
- //{{{ getSelectionStartLine() method
- /**
- * @deprecated Instead, obtain a Selection instance using
- * any means, and call its <code>getStartLine()</code> method
- */
- @Deprecated
- public final int getSelectionStartLine()
- {
- if(getSelectionCount() != 1)
- return caret;
-
- return getSelection(0).getStartLine();
- } //}}}
-
- //{{{ setSelectionStart() method
- /**
- * @deprecated Do not use.
- */
- @Deprecated
- public final void setSelectionStart(int selectionStart)
- {
- int selectionEnd = getSelectionCount() == 1 ? getSelection(0).getEnd() : caret;
- setSelection(new Selection.Range(selectionStart, selectionEnd));
- moveCaretPosition(selectionEnd,true);
- } //}}}
-
- //{{{ getSelectionEnd() method
- /**
- * @deprecated Instead, obtain a Selection instance using
- * any means, and call its <code>getEnd()</code> method
- */
- @Deprecated
- public final int getSelectionEnd()
- {
- return getSelectionCount() == 1 ? getSelection(0).getEnd() : caret;
-
- } //}}}
-
- //{{{ getSelectionEnd() method
- /**
- * @deprecated Instead, obtain a Selection instance using
- * any means, and call its <code>getEnd(int)</code> method
- */
- @Deprecated
- public int getSelectionEnd(int line)
- {
- if(getSelectionCount() != 1)
- return caret;
-
- return getSelection(0).getEnd(buffer,line);
- } //}}}
-
- //{{{ getSelectionEndLine() method
- /**
- * @deprecated Instead, obtain a Selection instance using
- * any means, and call its <code>getEndLine()</code> method
- */
- @Deprecated
- public final int getSelectionEndLine()
- {
- if(getSelectionCount() != 1)
- return caret;
-
- return getSelection(0).getEndLine();
- } //}}}
-
- //{{{ setSelectionEnd() method
- /**
- * @deprecated Do not use.
- */
- @Deprecated
- public final void setSelectionEnd(int selectionEnd)
- {
- int selectionStart = getSelectionCount() == 1 ? getSelection(0).getStart() : caret;
- setSelection(new Selection.Range(selectionStart, selectionEnd));
- moveCaretPosition(selectionEnd,true);
- } //}}}
-
- //{{{ select() method
- /**
- * @deprecated Instead, call either <code>addToSelection()</code>,
- * or <code>setSelection()</code> with a new Selection instance.
- */
- @Deprecated
- public void select(int start, int end)
- {
- setSelection(new Selection.Range(start, end));
- moveCaretPosition(end,true);
- } //}}}
-
- //{{{ select() method
- /**
- * @deprecated Instead, call either <code>addToSelection()</code>,
- * or <code>setSelection()</code> with a new Selection instance.
- */
- @Deprecated
- public void select(int start, int end, boolean doElectricScroll)
- {
- selectNone();
-
- int newStart, newEnd;
- if(start < end)
- {
- newStart = start;
- newEnd = end;
- }
- else
- {
- newStart = end;
- newEnd = start;
- }
-
- setSelection(new Selection.Range(newStart,newEnd));
- moveCaretPosition(end,doElectricScroll);
- } //}}}
-
- //{{{ isSelectionRectangular() method
- /**
- * @deprecated Instead, check if the appropriate Selection
- * is an instance of the Selection.Rect class.
- */
- @Deprecated
- public boolean isSelectionRectangular()
- {
- Selection s = getSelectionAtOffset(caret);
- return s != null && s instanceof Selection.Rect;
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private View view;
- //}}}
- //}}}
-
- //{{{ Fold painters
- /**
- * Fold painter service.
- * @since jEdit 4.3pre16
- */
- public static final String FOLD_PAINTER_PROPERTY = "foldPainter";
- public static final String FOLD_PAINTER_SERVICE = "org.gjt.sp.jedit.textarea.FoldPainter";
- public static final String DEFAULT_FOLD_PAINTER_SERVICE = "Triangle";
-
- //{{{ getFoldPainterService() method
- public static String getFoldPainterName()
- {
- return jEdit.getProperty(FOLD_PAINTER_PROPERTY, DEFAULT_FOLD_PAINTER_SERVICE);
- } //}}}
-
- //}}} Fold painters
-
- //{{{ handlePopupTrigger() method
- /**
- * Do the same thing as right-clicking on the text area. The Gestures
- * plugin uses this API.
- * @since jEdit 4.2pre13
- */
- @Override
- public void handlePopupTrigger(MouseEvent evt)
- {
-
- if(popup.isVisible())
- popup.setVisible(false);
- else
- {
- // Rebuild popup menu every time the menu is requested.
- createPopupMenu(evt);
-
- int x = evt.getX();
- int y = evt.getY();
-
- int dragStart = xyToOffset(x,y,
- !(painter.isBlockCaretEnabled()
- || isOverwriteEnabled()));
-
- if(getSelectionCount() == 0 || multi)
- moveCaretPosition(dragStart,false);
- GUIUtilities.showPopupMenu(popup,painter,x,y);
- }
- } //}}}
-
- //{{{ createPopupMenu() method
- /**
- * Creates the popup menu.
- * @since 4.3pre15
- */
- @Override
- public void createPopupMenu(MouseEvent evt)
- {
- popup = GUIUtilities.loadPopupMenu("view.context", this, evt);
- JMenuItem customize = new JMenuItem(jEdit.getProperty(
- "view.context.customize"));
- customize.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- new GlobalOptions(view,"context");
- }
- });
- popup.addSeparator();
- popup.add(customize);
- } //}}}
-
- //{{{ showPopupMenu() method
- /**
- * Shows the popup menu below the current caret position.
- * @since 4.3pre10
- */
- @Override
- public void showPopupMenu()
- {
- if (!popup.isVisible() && hasFocus())
- {
- Point caretPos = offsetToXY(getCaretPosition());
- if (caretPos != null)
- {
- // Open the context menu below the caret
- int charHeight = getPainter().getFontMetrics().getHeight();
- GUIUtilities.showPopupMenu(popup,
- painter,caretPos.x,caretPos.y + charHeight,true);
- }
- }
- } //}}}
-
-
-}
+/*
+ * JEditTextArea.java - jEdit's text component
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2005 Slava Pestov
+ * Portions copyright (C) 2000 Ollie Rutherfurd
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import java.awt.AWTEvent;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import java.awt.Point;
+import java.awt.event.MouseEvent;
+import javax.swing.JMenuItem;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.options.GlobalOptions;
+
+import org.gjt.sp.jedit.msg.PositionChanging;
+//}}}
+
+/**
+ * jEdit's text component.<p>
+ *
+ * Unlike most other text editors, the selection API permits selection and
+ * concurrent manipulation of multiple, non-contiguous regions of text.
+ * Methods in this class that deal with selecting text rely upon classes derived
+ * the {@link Selection} class.
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: JEditTextArea.java 16738 2009-12-26 09:19:38Z k_satoda $
+ */
+public class JEditTextArea extends TextArea
+{
+
+ //{{{ JEditTextArea constructor
+ /**
+ * Creates a new JEditTextArea.
+ */
+ public JEditTextArea(View view)
+ {
+ super(jEdit.getPropertyManager(), view);
+ enableEvents(AWTEvent.FOCUS_EVENT_MASK | AWTEvent.KEY_EVENT_MASK);
+ this.view = view;
+ } //}}}
+
+ //{{{ getFoldPainter() method
+ @Override
+ public FoldPainter getFoldPainter()
+ {
+ FoldPainter foldPainter = (FoldPainter) ServiceManager.getService(
+ FOLD_PAINTER_SERVICE, getFoldPainterName());
+ if (foldPainter == null)
+ foldPainter = (FoldPainter) ServiceManager.getService(
+ FOLD_PAINTER_SERVICE,
+ DEFAULT_FOLD_PAINTER_SERVICE);
+ return foldPainter;
+ } //}}}
+
+ // {{{ Overrides for macro recording.
+ //{{{ home() method
+ /**
+ * An override to record the acutual action taken for home().
+ */
+ @Override
+ public void home(boolean select)
+ {
+ Macros.Recorder recorder = view.getMacroRecorder();
+ switch(getInputHandler().getLastActionCount() % 2)
+ {
+ case 1:
+ if(recorder != null)
+ recorder.record("textArea.goToStartOfWhiteSpace(" + select + ");");
+ goToStartOfWhiteSpace(select);
+ break;
+ default:
+ if(recorder != null)
+ recorder.record("textArea.goToStartOfLine(" + select + ");");
+ goToStartOfLine(select);
+ break;
+ }
+ } //}}}
+
+ //{{{ end() method
+ /**
+ * An override to record the acutual action taken for end().
+ */
+ @Override
+ public void end(boolean select)
+ {
+ Macros.Recorder recorder = view.getMacroRecorder();
+
+ switch(getInputHandler().getLastActionCount() % 2)
+ {
+ case 1:
+ if(recorder != null)
+ recorder.record("textArea.goToEndOfWhiteSpace(" + select + ");");
+ goToEndOfWhiteSpace(select);
+ break;
+ default:
+ if(recorder != null)
+ recorder.record("textArea.goToEndOfLine(" + select + ");");
+ goToEndOfLine(select);
+ break;
+ }
+ } //}}}
+
+ //{{{ smartHome() method
+ /**
+ * An override to record the acutual action taken for smartHome().
+ */
+ @Override
+ public void smartHome(boolean select)
+ {
+ Macros.Recorder recorder = view.getMacroRecorder();
+
+ switch(view.getInputHandler().getLastActionCount())
+ {
+ case 1:
+ if(recorder != null)
+ recorder.record("textArea.goToStartOfWhiteSpace(" + select + ");");
+
+ goToStartOfWhiteSpace(select);
+ break;
+ case 2:
+ if(recorder != null)
+ recorder.record("textArea.goToStartOfLine(" + select + ");");
+
+ goToStartOfLine(select);
+ break;
+ default: //case 3:
+ if(recorder != null)
+ recorder.record("textArea.goToFirstVisibleLine(" + select + ");");
+
+ goToFirstVisibleLine(select);
+ break;
+ }
+ } //}}}
+
+ //{{{ smartEnd() method
+ /**
+ * An override to record the acutual action taken for smartHome().
+ */
+ @Override
+ public void smartEnd(boolean select)
+ {
+ Macros.Recorder recorder = view.getMacroRecorder();
+
+ switch(view.getInputHandler().getLastActionCount())
+ {
+ case 1:
+ if(recorder != null)
+ recorder.record("textArea.goToEndOfWhiteSpace(" + select + ");");
+
+ goToEndOfWhiteSpace(select);
+ break;
+ case 2:
+ if(recorder != null)
+ recorder.record("textArea.goToEndOfLine(" + select + ");");
+
+ goToEndOfLine(select);
+ break;
+ default: //case 3:
+ if(recorder != null)
+ recorder.record("textArea.goToLastVisibleLine(" + select + ");");
+ goToLastVisibleLine(select);
+ break;
+ }
+ } //}}}
+ // }}}
+
+ // {{{ overrides from the base class that are EditBus aware
+ public void goToBufferEnd(boolean select)
+ {
+ EditBus.send(new PositionChanging(this));
+ super.goToBufferEnd(select);
+ }
+
+ //{{{ goToMatchingBracket() method
+ /**
+ * Moves the caret to the bracket matching the one before the caret.
+ * Also sends PositionChanging if it goes somewhere.
+ * @since jEdit 4.3pre18
+ */
+ public void goToMatchingBracket()
+ {
+ if(getLineLength(caretLine) != 0)
+ {
+ int dot = caret - getLineStartOffset(caretLine);
+
+ int bracket = TextUtilities.findMatchingBracket(
+ buffer,caretLine,Math.max(0,dot - 1));
+ if(bracket != -1)
+ {
+ EditBus.send(new PositionChanging(this));
+ selectNone();
+ moveCaretPosition(bracket + 1,false);
+ return;
+ }
+ }
+ getToolkit().beep();
+ } //}}}
+
+
+ public void goToBufferStart(boolean select)
+ {
+ EditBus.send(new PositionChanging(this));
+ super.goToBufferStart(select);
+ } // }}}
+
+ // {{{ replaceSelection(String)
+ @Override
+ public int replaceSelection(String selectedText)
+ {
+ EditBus.send(new PositionChanging(this));
+ return super.replaceSelection(selectedText);
+ }//}}}
+
+ //{{{ showGoToLineDialog() method
+ /**
+ * Displays the 'go to line' dialog box, and moves the caret to the
+ * specified line number.
+ * @since jEdit 2.7pre2
+ */
+ public void showGoToLineDialog()
+ {
+ String line = GUIUtilities.input(view,"goto-line",null);
+ if(line == null)
+ return;
+
+ try
+ {
+ int lineNumber = Integer.parseInt(line) - 1;
+ EditBus.send(new PositionChanging(this));
+ setCaretPosition(getLineStartOffset(lineNumber));
+ }
+ catch(Exception e)
+ {
+ getToolkit().beep();
+ }
+ } //}}}
+
+ //{{{ userInput() method
+ /**
+ * Handles the insertion of the specified character. It performs the
+ * following operations in addition to TextArea#userInput(char):
+ * <ul>
+ * <li>Inserting a space with automatic abbrev expansion enabled will
+ * try to expand the abbrev
+ * </ul>
+ *
+ * @param ch The character
+ * @since jEdit 2.7pre3
+ */
+ @Override
+ public void userInput(char ch)
+ {
+ if(ch == ' ' && Abbrevs.getExpandOnInput()
+ && Abbrevs.expandAbbrev(view,false))
+ return;
+
+ super.userInput(ch);
+ } //}}}
+
+ //{{{ addExplicitFold() method
+ /**
+ * Surrounds the selection with explicit fold markers.
+ * @since jEdit 4.0pre3
+ */
+ @Override
+ public void addExplicitFold()
+ {
+ try
+ {
+ super.addExplicitFold();
+ }
+ catch (TextAreaException e)
+ {
+ GUIUtilities.error(view,"folding-not-explicit",null);
+ }
+ } //}}}
+
+ //{{{ formatParagraph() method
+ /**
+ * Formats the paragraph containing the caret.
+ * @since jEdit 2.7pre2
+ */
+ @Override
+ public void formatParagraph()
+ {
+ try
+ {
+ super.formatParagraph();
+ }
+ catch (TextAreaException e)
+ {
+ GUIUtilities.error(view,"format-maxlinelen",null);
+ }
+ } //}}}
+
+ //{{{ doWordCount() method
+ protected static void doWordCount(View view, String text)
+ {
+ char[] chars = text.toCharArray();
+ int characters = chars.length;
+ int words = 0;
+ int lines = 1;
+
+ boolean word = true;
+ for(int i = 0; i < chars.length; i++)
+ {
+ switch(chars[i])
+ {
+ case '\r': case '\n':
+ lines++;
+ case ' ': case '\t':
+ word = true;
+ break;
+ default:
+ if(word)
+ {
+ words++;
+ word = false;
+ }
+ break;
+ }
+ }
+
+ Object[] args = { characters, words, lines };
+ GUIUtilities.message(view,"wordcount",args);
+ } //}}}
+
+ //{{{ showWordCountDialog() method
+ /**
+ * Displays the 'word count' dialog box.
+ * @since jEdit 2.7pre2
+ */
+ public void showWordCountDialog()
+ {
+ String selection = getSelectedText();
+ if(selection != null)
+ {
+ doWordCount(view,selection);
+ return;
+ }
+
+ doWordCount(view,buffer.getText(0,buffer.getLength()));
+ } //}}}
+
+ //{{{ Getters and setters
+
+ //{{{ getView() method
+ /**
+ * Returns this text area's view.
+ * @since jEdit 4.2pre5
+ */
+ public View getView()
+ {
+ return view;
+ } //}}}
+
+ //}}}
+
+ //{{{ Deprecated methods
+
+ //{{{ getSelectionStart() method
+ /**
+ * @deprecated Instead, obtain a Selection instance using
+ * any means, and call its <code>getStart()</code> method
+ */
+ @Deprecated
+ public final int getSelectionStart()
+ {
+ if(getSelectionCount() != 1)
+ return caret;
+
+ return getSelection(0).getStart();
+ } //}}}
+
+ //{{{ getSelectionStart() method
+ /**
+ * @deprecated Instead, obtain a Selection instance using
+ * any means, and call its <code>getStart(int)</code> method
+ */
+ @Deprecated
+ public int getSelectionStart(int line)
+ {
+ if(getSelectionCount() != 1)
+ return caret;
+
+ return getSelection(0).getStart(buffer,line);
+ } //}}}
+
+ //{{{ getSelectionStartLine() method
+ /**
+ * @deprecated Instead, obtain a Selection instance using
+ * any means, and call its <code>getStartLine()</code> method
+ */
+ @Deprecated
+ public final int getSelectionStartLine()
+ {
+ if(getSelectionCount() != 1)
+ return caret;
+
+ return getSelection(0).getStartLine();
+ } //}}}
+
+ //{{{ setSelectionStart() method
+ /**
+ * @deprecated Do not use.
+ */
+ @Deprecated
+ public final void setSelectionStart(int selectionStart)
+ {
+ int selectionEnd = getSelectionCount() == 1 ? getSelection(0).getEnd() : caret;
+ setSelection(new Selection.Range(selectionStart, selectionEnd));
+ moveCaretPosition(selectionEnd,true);
+ } //}}}
+
+ //{{{ getSelectionEnd() method
+ /**
+ * @deprecated Instead, obtain a Selection instance using
+ * any means, and call its <code>getEnd()</code> method
+ */
+ @Deprecated
+ public final int getSelectionEnd()
+ {
+ return getSelectionCount() == 1 ? getSelection(0).getEnd() : caret;
+
+ } //}}}
+
+ //{{{ getSelectionEnd() method
+ /**
+ * @deprecated Instead, obtain a Selection instance using
+ * any means, and call its <code>getEnd(int)</code> method
+ */
+ @Deprecated
+ public int getSelectionEnd(int line)
+ {
+ if(getSelectionCount() != 1)
+ return caret;
+
+ return getSelection(0).getEnd(buffer,line);
+ } //}}}
+
+ //{{{ getSelectionEndLine() method
+ /**
+ * @deprecated Instead, obtain a Selection instance using
+ * any means, and call its <code>getEndLine()</code> method
+ */
+ @Deprecated
+ public final int getSelectionEndLine()
+ {
+ if(getSelectionCount() != 1)
+ return caret;
+
+ return getSelection(0).getEndLine();
+ } //}}}
+
+ //{{{ setSelectionEnd() method
+ /**
+ * @deprecated Do not use.
+ */
+ @Deprecated
+ public final void setSelectionEnd(int selectionEnd)
+ {
+ int selectionStart = getSelectionCount() == 1 ? getSelection(0).getStart() : caret;
+ setSelection(new Selection.Range(selectionStart, selectionEnd));
+ moveCaretPosition(selectionEnd,true);
+ } //}}}
+
+ //{{{ select() method
+ /**
+ * @deprecated Instead, call either <code>addToSelection()</code>,
+ * or <code>setSelection()</code> with a new Selection instance.
+ */
+ @Deprecated
+ public void select(int start, int end)
+ {
+ setSelection(new Selection.Range(start, end));
+ moveCaretPosition(end,true);
+ } //}}}
+
+ //{{{ select() method
+ /**
+ * @deprecated Instead, call either <code>addToSelection()</code>,
+ * or <code>setSelection()</code> with a new Selection instance.
+ */
+ @Deprecated
+ public void select(int start, int end, boolean doElectricScroll)
+ {
+ selectNone();
+
+ int newStart, newEnd;
+ if(start < end)
+ {
+ newStart = start;
+ newEnd = end;
+ }
+ else
+ {
+ newStart = end;
+ newEnd = start;
+ }
+
+ setSelection(new Selection.Range(newStart,newEnd));
+ moveCaretPosition(end,doElectricScroll);
+ } //}}}
+
+ //{{{ isSelectionRectangular() method
+ /**
+ * @deprecated Instead, check if the appropriate Selection
+ * is an instance of the Selection.Rect class.
+ */
+ @Deprecated
+ public boolean isSelectionRectangular()
+ {
+ Selection s = getSelectionAtOffset(caret);
+ return s != null && s instanceof Selection.Rect;
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private View view;
+ //}}}
+ //}}}
+
+ //{{{ Fold painters
+ /**
+ * Fold painter service.
+ * @since jEdit 4.3pre16
+ */
+ public static final String FOLD_PAINTER_PROPERTY = "foldPainter";
+ public static final String FOLD_PAINTER_SERVICE = "org.gjt.sp.jedit.textarea.FoldPainter";
+ public static final String DEFAULT_FOLD_PAINTER_SERVICE = "Triangle";
+
+ //{{{ getFoldPainterService() method
+ public static String getFoldPainterName()
+ {
+ return jEdit.getProperty(FOLD_PAINTER_PROPERTY, DEFAULT_FOLD_PAINTER_SERVICE);
+ } //}}}
+
+ //}}} Fold painters
+
+ //{{{ handlePopupTrigger() method
+ /**
+ * Do the same thing as right-clicking on the text area. The Gestures
+ * plugin uses this API.
+ * @since jEdit 4.2pre13
+ */
+ @Override
+ public void handlePopupTrigger(MouseEvent evt)
+ {
+
+ if(popup.isVisible())
+ popup.setVisible(false);
+ else
+ {
+ // Rebuild popup menu every time the menu is requested.
+ createPopupMenu(evt);
+
+ int x = evt.getX();
+ int y = evt.getY();
+
+ int dragStart = xyToOffset(x,y,
+ !(painter.isBlockCaretEnabled()
+ || isOverwriteEnabled()));
+
+ if(getSelectionCount() == 0 || multi)
+ moveCaretPosition(dragStart,false);
+ GUIUtilities.showPopupMenu(popup,painter,x,y);
+ }
+ } //}}}
+
+ //{{{ createPopupMenu() method
+ /**
+ * Creates the popup menu.
+ * @since 4.3pre15
+ */
+ @Override
+ public void createPopupMenu(MouseEvent evt)
+ {
+ popup = GUIUtilities.loadPopupMenu("view.context", this, evt);
+ JMenuItem customize = new JMenuItem(jEdit.getProperty(
+ "view.context.customize"));
+ customize.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ new GlobalOptions(view,"context");
+ }
+ });
+ popup.addSeparator();
+ popup.add(customize);
+ } //}}}
+
+ //{{{ showPopupMenu() method
+ /**
+ * Shows the popup menu below the current caret position.
+ * @since 4.3pre10
+ */
+ @Override
+ public void showPopupMenu()
+ {
+ if (!popup.isVisible() && hasFocus())
+ {
+ Point caretPos = offsetToXY(getCaretPosition());
+ if (caretPos != null)
+ {
+ // Open the context menu below the caret
+ int charHeight = getPainter().getFontMetrics().getHeight();
+ GUIUtilities.showPopupMenu(popup,
+ painter,caretPos.x,caretPos.y + charHeight,true);
+ }
+ }
+ } //}}}
+
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/MouseActions.java b/jEdit/org/gjt/sp/jedit/textarea/MouseActions.java
index de95683..0e634a8 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/MouseActions.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/MouseActions.java
@@ -1,58 +1,58 @@
-/*
- * MouseActions.java - Simplifies mouse handling
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-import java.awt.event.MouseEvent;
-import org.gjt.sp.jedit.gui.KeyEventTranslator;
-import org.gjt.sp.jedit.IPropertyManager;
-
-public class MouseActions implements MouseActionsProvider
-{
- private IPropertyManager propertyManager;
-
- //{{{ MouseActions constructor
- MouseActions(IPropertyManager propertyManager, String name)
- {
- this.propertyManager = propertyManager;
- this.name = name;
- } //}}}
-
- //{{{ getActionForEvent() method
- public String getActionForEvent(MouseEvent evt, String variant)
- {
- String modStr = KeyEventTranslator.getModifierString(evt);
- if(modStr == null)
- {
- return propertyManager.getProperty("view." + name + '.'
- + variant + "Click");
- }
- else
- {
- return propertyManager.getProperty("view." + name + '.'
- + KeyEventTranslator.getModifierString(evt)
- + variant + "Click");
- }
- } //}}}
-
- private String name;
-}
+/*
+ * MouseActions.java - Simplifies mouse handling
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+import java.awt.event.MouseEvent;
+import org.gjt.sp.jedit.gui.KeyEventTranslator;
+import org.gjt.sp.jedit.IPropertyManager;
+
+public class MouseActions implements MouseActionsProvider
+{
+ private IPropertyManager propertyManager;
+
+ //{{{ MouseActions constructor
+ MouseActions(IPropertyManager propertyManager, String name)
+ {
+ this.propertyManager = propertyManager;
+ this.name = name;
+ } //}}}
+
+ //{{{ getActionForEvent() method
+ public String getActionForEvent(MouseEvent evt, String variant)
+ {
+ String modStr = KeyEventTranslator.getModifierString(evt);
+ if(modStr == null)
+ {
+ return propertyManager.getProperty("view." + name + '.'
+ + variant + "Click");
+ }
+ else
+ {
+ return propertyManager.getProperty("view." + name + '.'
+ + KeyEventTranslator.getModifierString(evt)
+ + variant + "Click");
+ }
+ } //}}}
+
+ private String name;
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/MouseActionsProvider.java b/jEdit/org/gjt/sp/jedit/textarea/MouseActionsProvider.java
index 1a66dc8..6787190 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/MouseActionsProvider.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/MouseActionsProvider.java
@@ -1,33 +1,33 @@
-/*
- * MouseActionsProvider.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.textarea;
-
-import java.awt.event.MouseEvent;
-
-/**
- * @author Matthieu Casanova
- * @version $Id: MouseActionsProvider.java 15577 2009-06-25 05:55:16Z ezust $
- */
-public interface MouseActionsProvider
-{
- String getActionForEvent(MouseEvent evt, String variant);
-}
+/*
+ * MouseActionsProvider.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.textarea;
+
+import java.awt.event.MouseEvent;
+
+/**
+ * @author Matthieu Casanova
+ * @version $Id: MouseActionsProvider.java 15577 2009-06-25 05:55:16Z ezust $
+ */
+public interface MouseActionsProvider
+{
+ String getActionForEvent(MouseEvent evt, String variant);
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/MouseHandler.java b/jEdit/org/gjt/sp/jedit/textarea/MouseHandler.java
index b9f817f..37debac 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/MouseHandler.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/MouseHandler.java
@@ -1,177 +1,177 @@
-/*
- * MouseHandler.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2005 Slava Pestov
- * Portions copyright (C) 2000 Ollie Rutherfurd
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import java.awt.event.*;
-
-import org.gjt.sp.jedit.EditBus;
-import org.gjt.sp.jedit.Registers;
-import org.gjt.sp.jedit.OperatingSystem;
-import org.gjt.sp.jedit.msg.PositionChanging;
-//}}}
-
-/** The mouseHandler used for jEdit.
- *
- */
-public class MouseHandler extends TextAreaMouseHandler
-{
- //{{{ MouseHandler constructor
- public MouseHandler(JEditTextArea textArea)
- {
- super(textArea);
- this.textArea = textArea;
- } //}}}
-
- //{{{ mousePressed() method
- @Override
- public void mousePressed(MouseEvent evt)
- {
- showCursor();
-
- control = (OperatingSystem.isMacOS() && evt.isMetaDown())
- || (!OperatingSystem.isMacOS() && evt.isControlDown());
-
- ctrlForRectangularSelection = textArea.isCtrlForRectangularSelection();
-
- // so that Home <mouse click> Home is not the same
- // as pressing Home twice in a row
- textArea.getInputHandler().resetLastActionCount();
-
- quickCopyDrag = (textArea.isQuickCopyEnabled() &&
- isMiddleButton(evt.getModifiers()));
-
- if(!quickCopyDrag)
- {
- textArea.requestFocus();
- TextArea.focusedComponent = textArea;
- }
-
- if(textArea.getBuffer().isLoading())
- return;
- EditBus.send(new PositionChanging(textArea));
- int x = evt.getX();
- int y = evt.getY();
-
- dragStart = textArea.xyToOffset(x,y,
- !(textArea.getPainter().isBlockCaretEnabled()
- || textArea.isOverwriteEnabled()));
- dragStartLine = textArea.getLineOfOffset(dragStart);
- dragStartOffset = dragStart - textArea.getLineStartOffset(
- dragStartLine);
-
- if(isPopupTrigger(evt)
- && textArea.getRightClickPopup() != null)
- {
- if(textArea.isRightClickPopupEnabled())
- textArea.handlePopupTrigger(evt);
- return;
- }
-
- dragged = false;
-
- textArea.blink = true;
- textArea.invalidateLine(textArea.getCaretLine());
-
- clickCount = evt.getClickCount();
-
- if(textArea.isDragEnabled()
- && textArea.selectionManager.insideSelection(x,y)
- && clickCount == 1 && !evt.isShiftDown())
- {
- maybeDragAndDrop = true;
-
- textArea.moveCaretPosition(dragStart,false);
- return;
- }
-
- maybeDragAndDrop = false;
-
- if(quickCopyDrag)
- {
- // ignore double clicks of middle button
- doSingleClick(evt);
- }
- else
- {
- switch(clickCount)
- {
- case 1:
- doSingleClick(evt);
- break;
- case 2:
- doDoubleClick();
- break;
- default: //case 3:
- doTripleClick();
- break;
- }
- }
- } //}}}
-
- //{{{ mouseReleased() method
- @Override
- public void mouseReleased(MouseEvent evt)
- {
- // middle mouse button drag inserts selection
- // at caret position
- Selection sel = textArea.getSelectionAtOffset(dragStart);
- if(dragged && sel != null)
- {
- Registers.setRegister('%',textArea.getSelectedText(sel));
- if(quickCopyDrag)
- {
- textArea.removeFromSelection(sel);
- Registers.paste(TextArea.focusedComponent,
- '%',sel instanceof Selection.Rect);
-
- TextArea.focusedComponent.requestFocus();
- }
- }
- else if(!dragged && textArea.isQuickCopyEnabled() &&
- isMiddleButton(evt.getModifiers()))
- {
- textArea.requestFocus();
- TextArea.focusedComponent = textArea;
-
- textArea.setCaretPosition(dragStart,false);
- if(!textArea.isEditable())
- textArea.getToolkit().beep();
- else
- Registers.paste(textArea,'%',control);
- }
- else if(maybeDragAndDrop
- && !textArea.isMultipleSelectionEnabled())
- {
- textArea.selectNone();
- }
-
- maybeDragAndDrop = false;
- dragged = false;
- } //}}}
-
- //{{{ Private members
- private JEditTextArea textArea;
- //}}}
-}
+/*
+ * MouseHandler.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2005 Slava Pestov
+ * Portions copyright (C) 2000 Ollie Rutherfurd
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import java.awt.event.*;
+
+import org.gjt.sp.jedit.EditBus;
+import org.gjt.sp.jedit.Registers;
+import org.gjt.sp.jedit.OperatingSystem;
+import org.gjt.sp.jedit.msg.PositionChanging;
+//}}}
+
+/** The mouseHandler used for jEdit.
+ *
+ */
+public class MouseHandler extends TextAreaMouseHandler
+{
+ //{{{ MouseHandler constructor
+ public MouseHandler(JEditTextArea textArea)
+ {
+ super(textArea);
+ this.textArea = textArea;
+ } //}}}
+
+ //{{{ mousePressed() method
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ showCursor();
+
+ control = (OperatingSystem.isMacOS() && evt.isMetaDown())
+ || (!OperatingSystem.isMacOS() && evt.isControlDown());
+
+ ctrlForRectangularSelection = textArea.isCtrlForRectangularSelection();
+
+ // so that Home <mouse click> Home is not the same
+ // as pressing Home twice in a row
+ textArea.getInputHandler().resetLastActionCount();
+
+ quickCopyDrag = (textArea.isQuickCopyEnabled() &&
+ isMiddleButton(evt.getModifiers()));
+
+ if(!quickCopyDrag)
+ {
+ textArea.requestFocus();
+ TextArea.focusedComponent = textArea;
+ }
+
+ if(textArea.getBuffer().isLoading())
+ return;
+ EditBus.send(new PositionChanging(textArea));
+ int x = evt.getX();
+ int y = evt.getY();
+
+ dragStart = textArea.xyToOffset(x,y,
+ !(textArea.getPainter().isBlockCaretEnabled()
+ || textArea.isOverwriteEnabled()));
+ dragStartLine = textArea.getLineOfOffset(dragStart);
+ dragStartOffset = dragStart - textArea.getLineStartOffset(
+ dragStartLine);
+
+ if(isPopupTrigger(evt)
+ && textArea.getRightClickPopup() != null)
+ {
+ if(textArea.isRightClickPopupEnabled())
+ textArea.handlePopupTrigger(evt);
+ return;
+ }
+
+ dragged = false;
+
+ textArea.blink = true;
+ textArea.invalidateLine(textArea.getCaretLine());
+
+ clickCount = evt.getClickCount();
+
+ if(textArea.isDragEnabled()
+ && textArea.selectionManager.insideSelection(x,y)
+ && clickCount == 1 && !evt.isShiftDown())
+ {
+ maybeDragAndDrop = true;
+
+ textArea.moveCaretPosition(dragStart,false);
+ return;
+ }
+
+ maybeDragAndDrop = false;
+
+ if(quickCopyDrag)
+ {
+ // ignore double clicks of middle button
+ doSingleClick(evt);
+ }
+ else
+ {
+ switch(clickCount)
+ {
+ case 1:
+ doSingleClick(evt);
+ break;
+ case 2:
+ doDoubleClick();
+ break;
+ default: //case 3:
+ doTripleClick();
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ mouseReleased() method
+ @Override
+ public void mouseReleased(MouseEvent evt)
+ {
+ // middle mouse button drag inserts selection
+ // at caret position
+ Selection sel = textArea.getSelectionAtOffset(dragStart);
+ if(dragged && sel != null)
+ {
+ Registers.setRegister('%',textArea.getSelectedText(sel));
+ if(quickCopyDrag)
+ {
+ textArea.removeFromSelection(sel);
+ Registers.paste(TextArea.focusedComponent,
+ '%',sel instanceof Selection.Rect);
+
+ TextArea.focusedComponent.requestFocus();
+ }
+ }
+ else if(!dragged && textArea.isQuickCopyEnabled() &&
+ isMiddleButton(evt.getModifiers()))
+ {
+ textArea.requestFocus();
+ TextArea.focusedComponent = textArea;
+
+ textArea.setCaretPosition(dragStart,false);
+ if(!textArea.isEditable())
+ textArea.getToolkit().beep();
+ else
+ Registers.paste(textArea,'%',control);
+ }
+ else if(maybeDragAndDrop
+ && !textArea.isMultipleSelectionEnabled())
+ {
+ textArea.selectNone();
+ }
+
+ maybeDragAndDrop = false;
+ dragged = false;
+ } //}}}
+
+ //{{{ Private members
+ private JEditTextArea textArea;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/RangeMap.java b/jEdit/org/gjt/sp/jedit/textarea/RangeMap.java
index a70071e..8943820 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/RangeMap.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/RangeMap.java
@@ -1,486 +1,486 @@
-/*
- * RangeMap.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.util.Log;
-
-/**
- * The fold visibility map.
- *
- * All lines from fvm[2*n] to fvm[2*n+1]-1 inclusive are visible.
- * All lines from position fvm[2*n+1] to fvm[2*n+2]-1 inclusive are
- * invisible.
- *
- * Examples:
- * ---------
- * All lines visible: { 0, buffer.getLineCount() }
- * Narrow from a to b: { a, b + 1 }
- * Collapsed fold from a to b: { 0, a + 1, b, buffer.getLineCount() }
- *
- * Note: length is always even.
- */
-class RangeMap
-{
- //{{{ RangeMap constructor
- RangeMap()
- {
- fvm = new int[2];
- lastfvmget = -1;
- } //}}}
-
- //{{{ RangeMap constructor
- RangeMap(RangeMap copy)
- {
- this.fvm = copy.fvm.clone();
- this.fvmcount = copy.fvmcount;
- } //}}}
-
- //{{{ reset() method
- void reset(int lines)
- {
- lastfvmget = -1;
- fvmcount = 2;
- fvm[0] = 0;
- fvm[1] = lines;
- } //}}}
-
- //{{{ first() method
- int first()
- {
- return fvm[0];
- } //}}}
-
- //{{{ last() method
- int last()
- {
- return fvm[fvmcount - 1] - 1;
- } //}}}
-
- //{{{ lookup() method
- int lookup(int index)
- {
- return fvm[index];
- } //}}}
-
- //{{{ search() method
- /**
- * Returns the fold visibility map index for the given line.
- */
- int search(int line)
- {
- if(line < fvm[0])
- return -1;
- if(line >= fvm[fvmcount - 1])
- return fvmcount - 1;
-
- if(lastfvmget != -1)
- {
- if(line >= fvm[lastfvmget])
- {
- if(lastfvmget == fvmcount - 1
- || line < fvm[lastfvmget + 1])
- {
- return lastfvmget;
- }
- }
- }
-
- int start = 0;
- int end = fvmcount - 1;
-
-loop: for(;;)
- {
- switch(end - start)
- {
- case 0:
- lastfvmget = start;
- break loop;
- case 1:
- int value = fvm[end];
- if(value <= line)
- lastfvmget = end;
- else
- lastfvmget = start;
- break loop;
- default:
- int pivot = (end + start) / 2;
- value = fvm[pivot];
- if(value == line)
- {
- lastfvmget = pivot;
- break loop;
- }
- else if(value < line)
- start = pivot;
- else
- end = pivot - 1;
- break;
- }
- }
-
- return lastfvmget;
- } //}}}
-
- //{{{ put() method
- /**
- * Replaces from <code>start</code> to <code>end-1</code> inclusive with
- * <code>put</code>. Update <code>fvmcount</code>.
- */
- void put(int start, int end, int[] put)
- {
- if(Debug.FOLD_VIS_DEBUG)
- {
- StringBuilder buf = new StringBuilder(50);
- buf.append("fvmput(").append(start).append(',');
- buf.append(end).append(',');
- buf.append('{');
- if(put != null)
- {
- for(int i = 0; i < put.length; i++)
- {
- if(i != 0)
- buf.append(',');
- buf.append(put[i]);
- }
- }
- buf.append("})");
- Log.log(Log.DEBUG,this,buf.toString());
- }
- int putl = put == null ? 0 : put.length;
-
- int delta = putl - (end - start);
- if(fvmcount + delta > fvm.length)
- {
- int[] newfvm = new int[(fvm.length << 1) + 1];
- System.arraycopy(fvm,0,newfvm,0,fvmcount);
- fvm = newfvm;
- }
-
- if(delta != 0)
- {
- System.arraycopy(fvm,end,fvm,start + putl,
- fvmcount - end);
- }
-
- if(putl != 0)
- {
- System.arraycopy(put,0,fvm,start,put.length);
- }
-
- fvmcount += delta;
-
- dump();
-
- if(fvmcount == 0)
- throw new InternalError();
- } //}}}
-
- //{{{ put2() method
- /**
- * Merge previous and next entry if necessary.
- */
- void put2(int starti, int endi, int start, int end)
- {
- if(Debug.FOLD_VIS_DEBUG)
- {
- Log.log(Log.DEBUG,this,"*fvmput2(" + starti + ","
- + endi + "," + start + "," + end + ")");
- }
- if(starti != -1 && fvm[starti] == start)
- {
- if(endi <= fvmcount - 2 && fvm[endi + 1]
- == end + 1)
- {
- put(starti,endi + 2,null);
- }
- else
- {
- put(starti,endi + 1,
- new int[] { end + 1 });
- }
- }
- else
- {
- if(endi != fvmcount - 1 && fvm[endi + 1]
- == end + 1)
- {
- put(starti + 1,endi + 2,
- new int[] { start });
- }
- else
- {
- put(starti + 1,endi + 1,
- new int[] { start,
- end + 1 });
- }
- }
- } //}}}
-
- //{{{ next() method
- int next(int line)
- {
- int index = search(line);
- /* in collapsed range */
- if(index % 2 != 0)
- {
- /* beyond last visible line */
- if(fvmcount == index + 1)
- return - 1;
- /* start of next expanded range */
- else
- return fvm[index + 1];
- }
- /* last in expanded range */
- else if(line == fvm[index + 1] - 1)
- {
- /* equal to last visible line */
- if(fvmcount == index + 2)
- return -1;
- /* start of next expanded range */
- else
- return fvm[index + 2];
- }
- /* next in expanded range */
- else
- return line + 1;
- } //}}}
-
- //{{{ prev() method
- int prev(int line)
- {
- int index = search(line);
- /* before first visible line */
- if(index == -1)
- return -1;
- /* in collapsed range */
- else if(index % 2 == 1)
- {
- /* end of prev expanded range */
- return fvm[index] - 1;
- }
- /* first in expanded range */
- else if(line == fvm[index])
- {
- /* equal to first visible line */
- if(index == 0)
- return -1;
- /* end of prev expanded range */
- else
- return fvm[index - 1] - 1;
- }
- /* prev in expanded range */
- else
- return line - 1;
- } //}}}
-
- //{{{ show() method
- void show(int start, int end)
- {
- int starti = search(start);
- int endi = search(end);
-
- if(starti % 2 == 0)
- {
- if(endi % 2 == 0)
- put(starti + 1,endi + 1,null);
- else
- {
- if(endi != fvmcount - 1
- && fvm[endi + 1] == end + 1)
- put(starti + 1,endi + 2,null);
- else
- {
- put(starti + 1,endi,null);
- fvm[starti + 1] = end + 1;
- }
- }
- }
- else
- {
- if(endi % 2 == 0)
- {
- if(starti != -1 && fvm[starti] == start)
- put(starti,endi + 1,null);
- else
- {
- put(starti + 1,endi,null);
- fvm[starti + 1] = start;
- }
- }
- else
- put2(starti,endi,start,end);
- }
-
- lastfvmget = -1;
- } //}}}
-
- //{{{ hide() method
- void hide(int start, int end)
- {
- int starti = search(start);
- int endi = search(end);
-
- if(starti % 2 == 0)
- {
- if(endi % 2 == 0)
- put2(starti,endi,start,end);
- else
- {
- if(start == fvm[0])
- put(starti,endi + 1,null);
- else
- {
- put(starti + 1,endi,null);
- fvm[starti + 1] = start;
- }
- }
- }
- else
- {
- if(endi % 2 == 0)
- {
- if(end + 1 == fvm[fvmcount - 1])
- put(starti + 1,endi + 2,null);
- else
- {
- put(starti + 1,endi,null);
- fvm[starti + 1] = end + 1;
- }
- }
- else
- put(starti + 1,endi + 1,null);
- }
-
- lastfvmget = -1;
- } //}}}
-
- //{{{ count() method
- int count()
- {
- return fvmcount;
- } //}}}
-
- //{{{ dump() method
- void dump()
- {
- if(Debug.FOLD_VIS_DEBUG)
- {
- StringBuilder buf = new StringBuilder("{");
- for(int i = 0; i < fvmcount; i++)
- {
- if(i != 0)
- buf.append(',');
- buf.append(fvm[i]);
- }
- buf.append('}');
- Log.log(Log.DEBUG,this,"fvm = " + buf);
- }
- } //}}}
-
- //{{{ contentInserted() method
- void contentInserted(int startLine, int numLines)
- {
- if(numLines != 0)
- {
- int index = search(startLine);
- int start = index + 1;
-
- for(int i = start; i < fvmcount; i++)
- fvm[i] += numLines;
-
- lastfvmget = -1;
- dump();
- }
- } //}}}
-
- //{{{ preContentRemoved() method
- /**
- * @return If the anchors should be reset.
- */
- boolean preContentRemoved(int startLine, int numLines)
- {
- boolean returnValue = false;
-
- int endLine = startLine + numLines;
-
- /* update fold visibility map. */
- int starti = search(startLine);
- int endi = search(endLine);
-
- /* both have same visibility; just remove
- * anything in between. */
- if(Math.abs(starti % 2) == Math.abs(endi % 2))
- {
- if(endi - starti == fvmcount)
- {
- // we're removing from before
- // the first visible to after
- // the last visible
- returnValue = true;
- starti = 1;
- }
- else
- {
- put(starti + 1,endi + 1,null);
- starti++;
- }
- }
- /* collapse 2 */
- else if(starti != -1 && fvm[starti] == startLine)
- {
- if(endi - starti == fvmcount - 1)
- {
- // we're removing from
- // the first visible to after
- // the last visible
- returnValue = true;
- starti = 1;
- }
- else
- put(starti,endi + 1,null);
- }
- /* shift */
- else
- {
- put(starti + 1,endi,null);
- fvm[starti + 1] = startLine;
- starti += 2;
- }
-
- /* update */
- for(int i = starti; i < fvmcount; i++)
- fvm[i] -= numLines;
-
- lastfvmget = -1;
- dump();
-
- return returnValue;
- } //}}}
-
- //{{{ Private members
- private int[] fvm;
- private int fvmcount;
- private int lastfvmget;
- //}}}
-}
+/*
+ * RangeMap.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.util.Log;
+
+/**
+ * The fold visibility map.
+ *
+ * All lines from fvm[2*n] to fvm[2*n+1]-1 inclusive are visible.
+ * All lines from position fvm[2*n+1] to fvm[2*n+2]-1 inclusive are
+ * invisible.
+ *
+ * Examples:
+ * ---------
+ * All lines visible: { 0, buffer.getLineCount() }
+ * Narrow from a to b: { a, b + 1 }
+ * Collapsed fold from a to b: { 0, a + 1, b, buffer.getLineCount() }
+ *
+ * Note: length is always even.
+ */
+class RangeMap
+{
+ //{{{ RangeMap constructor
+ RangeMap()
+ {
+ fvm = new int[2];
+ lastfvmget = -1;
+ } //}}}
+
+ //{{{ RangeMap constructor
+ RangeMap(RangeMap copy)
+ {
+ this.fvm = copy.fvm.clone();
+ this.fvmcount = copy.fvmcount;
+ } //}}}
+
+ //{{{ reset() method
+ void reset(int lines)
+ {
+ lastfvmget = -1;
+ fvmcount = 2;
+ fvm[0] = 0;
+ fvm[1] = lines;
+ } //}}}
+
+ //{{{ first() method
+ int first()
+ {
+ return fvm[0];
+ } //}}}
+
+ //{{{ last() method
+ int last()
+ {
+ return fvm[fvmcount - 1] - 1;
+ } //}}}
+
+ //{{{ lookup() method
+ int lookup(int index)
+ {
+ return fvm[index];
+ } //}}}
+
+ //{{{ search() method
+ /**
+ * Returns the fold visibility map index for the given line.
+ */
+ int search(int line)
+ {
+ if(line < fvm[0])
+ return -1;
+ if(line >= fvm[fvmcount - 1])
+ return fvmcount - 1;
+
+ if(lastfvmget != -1)
+ {
+ if(line >= fvm[lastfvmget])
+ {
+ if(lastfvmget == fvmcount - 1
+ || line < fvm[lastfvmget + 1])
+ {
+ return lastfvmget;
+ }
+ }
+ }
+
+ int start = 0;
+ int end = fvmcount - 1;
+
+loop: for(;;)
+ {
+ switch(end - start)
+ {
+ case 0:
+ lastfvmget = start;
+ break loop;
+ case 1:
+ int value = fvm[end];
+ if(value <= line)
+ lastfvmget = end;
+ else
+ lastfvmget = start;
+ break loop;
+ default:
+ int pivot = (end + start) / 2;
+ value = fvm[pivot];
+ if(value == line)
+ {
+ lastfvmget = pivot;
+ break loop;
+ }
+ else if(value < line)
+ start = pivot;
+ else
+ end = pivot - 1;
+ break;
+ }
+ }
+
+ return lastfvmget;
+ } //}}}
+
+ //{{{ put() method
+ /**
+ * Replaces from <code>start</code> to <code>end-1</code> inclusive with
+ * <code>put</code>. Update <code>fvmcount</code>.
+ */
+ void put(int start, int end, int[] put)
+ {
+ if(Debug.FOLD_VIS_DEBUG)
+ {
+ StringBuilder buf = new StringBuilder(50);
+ buf.append("fvmput(").append(start).append(',');
+ buf.append(end).append(',');
+ buf.append('{');
+ if(put != null)
+ {
+ for(int i = 0; i < put.length; i++)
+ {
+ if(i != 0)
+ buf.append(',');
+ buf.append(put[i]);
+ }
+ }
+ buf.append("})");
+ Log.log(Log.DEBUG,this,buf.toString());
+ }
+ int putl = put == null ? 0 : put.length;
+
+ int delta = putl - (end - start);
+ if(fvmcount + delta > fvm.length)
+ {
+ int[] newfvm = new int[(fvm.length << 1) + 1];
+ System.arraycopy(fvm,0,newfvm,0,fvmcount);
+ fvm = newfvm;
+ }
+
+ if(delta != 0)
+ {
+ System.arraycopy(fvm,end,fvm,start + putl,
+ fvmcount - end);
+ }
+
+ if(putl != 0)
+ {
+ System.arraycopy(put,0,fvm,start,put.length);
+ }
+
+ fvmcount += delta;
+
+ dump();
+
+ if(fvmcount == 0)
+ throw new InternalError();
+ } //}}}
+
+ //{{{ put2() method
+ /**
+ * Merge previous and next entry if necessary.
+ */
+ void put2(int starti, int endi, int start, int end)
+ {
+ if(Debug.FOLD_VIS_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"*fvmput2(" + starti + ","
+ + endi + "," + start + "," + end + ")");
+ }
+ if(starti != -1 && fvm[starti] == start)
+ {
+ if(endi <= fvmcount - 2 && fvm[endi + 1]
+ == end + 1)
+ {
+ put(starti,endi + 2,null);
+ }
+ else
+ {
+ put(starti,endi + 1,
+ new int[] { end + 1 });
+ }
+ }
+ else
+ {
+ if(endi != fvmcount - 1 && fvm[endi + 1]
+ == end + 1)
+ {
+ put(starti + 1,endi + 2,
+ new int[] { start });
+ }
+ else
+ {
+ put(starti + 1,endi + 1,
+ new int[] { start,
+ end + 1 });
+ }
+ }
+ } //}}}
+
+ //{{{ next() method
+ int next(int line)
+ {
+ int index = search(line);
+ /* in collapsed range */
+ if(index % 2 != 0)
+ {
+ /* beyond last visible line */
+ if(fvmcount == index + 1)
+ return - 1;
+ /* start of next expanded range */
+ else
+ return fvm[index + 1];
+ }
+ /* last in expanded range */
+ else if(line == fvm[index + 1] - 1)
+ {
+ /* equal to last visible line */
+ if(fvmcount == index + 2)
+ return -1;
+ /* start of next expanded range */
+ else
+ return fvm[index + 2];
+ }
+ /* next in expanded range */
+ else
+ return line + 1;
+ } //}}}
+
+ //{{{ prev() method
+ int prev(int line)
+ {
+ int index = search(line);
+ /* before first visible line */
+ if(index == -1)
+ return -1;
+ /* in collapsed range */
+ else if(index % 2 == 1)
+ {
+ /* end of prev expanded range */
+ return fvm[index] - 1;
+ }
+ /* first in expanded range */
+ else if(line == fvm[index])
+ {
+ /* equal to first visible line */
+ if(index == 0)
+ return -1;
+ /* end of prev expanded range */
+ else
+ return fvm[index - 1] - 1;
+ }
+ /* prev in expanded range */
+ else
+ return line - 1;
+ } //}}}
+
+ //{{{ show() method
+ void show(int start, int end)
+ {
+ int starti = search(start);
+ int endi = search(end);
+
+ if(starti % 2 == 0)
+ {
+ if(endi % 2 == 0)
+ put(starti + 1,endi + 1,null);
+ else
+ {
+ if(endi != fvmcount - 1
+ && fvm[endi + 1] == end + 1)
+ put(starti + 1,endi + 2,null);
+ else
+ {
+ put(starti + 1,endi,null);
+ fvm[starti + 1] = end + 1;
+ }
+ }
+ }
+ else
+ {
+ if(endi % 2 == 0)
+ {
+ if(starti != -1 && fvm[starti] == start)
+ put(starti,endi + 1,null);
+ else
+ {
+ put(starti + 1,endi,null);
+ fvm[starti + 1] = start;
+ }
+ }
+ else
+ put2(starti,endi,start,end);
+ }
+
+ lastfvmget = -1;
+ } //}}}
+
+ //{{{ hide() method
+ void hide(int start, int end)
+ {
+ int starti = search(start);
+ int endi = search(end);
+
+ if(starti % 2 == 0)
+ {
+ if(endi % 2 == 0)
+ put2(starti,endi,start,end);
+ else
+ {
+ if(start == fvm[0])
+ put(starti,endi + 1,null);
+ else
+ {
+ put(starti + 1,endi,null);
+ fvm[starti + 1] = start;
+ }
+ }
+ }
+ else
+ {
+ if(endi % 2 == 0)
+ {
+ if(end + 1 == fvm[fvmcount - 1])
+ put(starti + 1,endi + 2,null);
+ else
+ {
+ put(starti + 1,endi,null);
+ fvm[starti + 1] = end + 1;
+ }
+ }
+ else
+ put(starti + 1,endi + 1,null);
+ }
+
+ lastfvmget = -1;
+ } //}}}
+
+ //{{{ count() method
+ int count()
+ {
+ return fvmcount;
+ } //}}}
+
+ //{{{ dump() method
+ void dump()
+ {
+ if(Debug.FOLD_VIS_DEBUG)
+ {
+ StringBuilder buf = new StringBuilder("{");
+ for(int i = 0; i < fvmcount; i++)
+ {
+ if(i != 0)
+ buf.append(',');
+ buf.append(fvm[i]);
+ }
+ buf.append('}');
+ Log.log(Log.DEBUG,this,"fvm = " + buf);
+ }
+ } //}}}
+
+ //{{{ contentInserted() method
+ void contentInserted(int startLine, int numLines)
+ {
+ if(numLines != 0)
+ {
+ int index = search(startLine);
+ int start = index + 1;
+
+ for(int i = start; i < fvmcount; i++)
+ fvm[i] += numLines;
+
+ lastfvmget = -1;
+ dump();
+ }
+ } //}}}
+
+ //{{{ preContentRemoved() method
+ /**
+ * @return If the anchors should be reset.
+ */
+ boolean preContentRemoved(int startLine, int numLines)
+ {
+ boolean returnValue = false;
+
+ int endLine = startLine + numLines;
+
+ /* update fold visibility map. */
+ int starti = search(startLine);
+ int endi = search(endLine);
+
+ /* both have same visibility; just remove
+ * anything in between. */
+ if(Math.abs(starti % 2) == Math.abs(endi % 2))
+ {
+ if(endi - starti == fvmcount)
+ {
+ // we're removing from before
+ // the first visible to after
+ // the last visible
+ returnValue = true;
+ starti = 1;
+ }
+ else
+ {
+ put(starti + 1,endi + 1,null);
+ starti++;
+ }
+ }
+ /* collapse 2 */
+ else if(starti != -1 && fvm[starti] == startLine)
+ {
+ if(endi - starti == fvmcount - 1)
+ {
+ // we're removing from
+ // the first visible to after
+ // the last visible
+ returnValue = true;
+ starti = 1;
+ }
+ else
+ put(starti,endi + 1,null);
+ }
+ /* shift */
+ else
+ {
+ put(starti + 1,endi,null);
+ fvm[starti + 1] = startLine;
+ starti += 2;
+ }
+
+ /* update */
+ for(int i = starti; i < fvmcount; i++)
+ fvm[i] -= numLines;
+
+ lastfvmget = -1;
+ dump();
+
+ return returnValue;
+ } //}}}
+
+ //{{{ Private members
+ private int[] fvm;
+ private int fvmcount;
+ private int lastfvmget;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/ScreenLineManager.java b/jEdit/org/gjt/sp/jedit/textarea/ScreenLineManager.java
index 0091d8e..f7314ef 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/ScreenLineManager.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/ScreenLineManager.java
@@ -1,149 +1,149 @@
-/*
- * ScreenLineManager.java - Manage screen line counts
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import org.gjt.sp.jedit.buffer.*;
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * Performs the Mapping between physical lines and screen lines.
- *
- * @since jEdit 4.3pre1
- * @author Slava Pestov
- * @version $Id: ScreenLineManager.java 15570 2009-06-25 00:43:57Z ezust $
- */
-class ScreenLineManager
-{
- //{{{ ScreenLineManager constructor
- ScreenLineManager(JEditBuffer buffer)
- {
- this.buffer = buffer;
- if(!buffer.isLoading())
- reset();
- } //}}}
-
- //{{{ isScreenLineCountValid() method
- boolean isScreenLineCountValid(int line)
- {
- return (screenLines[line] & SCREEN_LINES_VALID_MASK) != 0;
- } //}}}
-
- //{{{ getScreenLineCount() method
- /**
- * Returns how many screen lines contains the given physical line.
- * It can be greater than 1 when using soft wrap
- *
- * @param line the physical line
- * @return the screen line count
- */
- int getScreenLineCount(int line)
- {
- return screenLines[line] >> SCREEN_LINES_SHIFT;
- } //}}}
-
- //{{{ setScreenLineCount() method
- /**
- * Sets the number of screen lines that the specified physical line
- * is split into.
- * @param line the line number
- * @param count the line count (1 if no wrap)
- */
- void setScreenLineCount(int line, int count)
- {
- if(count > Short.MAX_VALUE)
- {
- // limitations...
- count = Short.MAX_VALUE;
- }
-
- if(Debug.SCREEN_LINES_DEBUG)
- Log.log(Log.DEBUG,this,new Exception("setScreenLineCount(" + line + ',' + count + ')'));
- screenLines[line] = (short)(count << SCREEN_LINES_SHIFT
- | SCREEN_LINES_VALID_MASK);
- } //}}}
-
- //{{{ invalidateScreenLineCounts() method
- void invalidateScreenLineCounts()
- {
- int lineCount = buffer.getLineCount();
- for(int i = 0; i < lineCount; i++)
- screenLines[i] &= ~SCREEN_LINES_VALID_MASK;
- } //}}}
-
- //{{{ reset() method
- void reset()
- {
- screenLines = new short[buffer.getLineCount()];
- } //}}}
-
- //{{{ contentInserted() method
- public void contentInserted(int startLine, int numLines)
- {
- int endLine = startLine + numLines;
- screenLines[startLine] &= ~SCREEN_LINES_VALID_MASK;
-
- int lineCount = buffer.getLineCount();
-
- if(numLines > 0)
- {
- if(screenLines.length <= lineCount)
- {
- short[] screenLinesN = new short[((lineCount + 1) << 1)];
- System.arraycopy(screenLines,0,screenLinesN,0,
- screenLines.length);
- screenLines = screenLinesN;
- }
-
- System.arraycopy(screenLines,startLine,screenLines,
- endLine,lineCount - endLine);
-
- for(int i = 0; i < numLines; i++)
- screenLines[startLine + i] = 0;
- }
- } //}}}
-
- //{{{ contentRemoved() method
- public void contentRemoved(int startLine, int numLines)
- {
- int endLine = startLine + numLines;
- screenLines[startLine] &= ~SCREEN_LINES_VALID_MASK;
-
- if(numLines > 0 && endLine != screenLines.length)
- {
- System.arraycopy(screenLines,endLine + 1,screenLines,
- startLine + 1,screenLines.length - endLine - 1);
- }
- } //}}}
-
- //{{{ Private members
- private static final int SCREEN_LINES_SHIFT = 1;
- private static final int SCREEN_LINES_VALID_MASK = 1;
-
- private final JEditBuffer buffer;
- /** This array contains the line count for each physical line. */
- private short[] screenLines;
- //}}}
-}
+/*
+ * ScreenLineManager.java - Manage screen line counts
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import org.gjt.sp.jedit.buffer.*;
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * Performs the Mapping between physical lines and screen lines.
+ *
+ * @since jEdit 4.3pre1
+ * @author Slava Pestov
+ * @version $Id: ScreenLineManager.java 15570 2009-06-25 00:43:57Z ezust $
+ */
+class ScreenLineManager
+{
+ //{{{ ScreenLineManager constructor
+ ScreenLineManager(JEditBuffer buffer)
+ {
+ this.buffer = buffer;
+ if(!buffer.isLoading())
+ reset();
+ } //}}}
+
+ //{{{ isScreenLineCountValid() method
+ boolean isScreenLineCountValid(int line)
+ {
+ return (screenLines[line] & SCREEN_LINES_VALID_MASK) != 0;
+ } //}}}
+
+ //{{{ getScreenLineCount() method
+ /**
+ * Returns how many screen lines contains the given physical line.
+ * It can be greater than 1 when using soft wrap
+ *
+ * @param line the physical line
+ * @return the screen line count
+ */
+ int getScreenLineCount(int line)
+ {
+ return screenLines[line] >> SCREEN_LINES_SHIFT;
+ } //}}}
+
+ //{{{ setScreenLineCount() method
+ /**
+ * Sets the number of screen lines that the specified physical line
+ * is split into.
+ * @param line the line number
+ * @param count the line count (1 if no wrap)
+ */
+ void setScreenLineCount(int line, int count)
+ {
+ if(count > Short.MAX_VALUE)
+ {
+ // limitations...
+ count = Short.MAX_VALUE;
+ }
+
+ if(Debug.SCREEN_LINES_DEBUG)
+ Log.log(Log.DEBUG,this,new Exception("setScreenLineCount(" + line + ',' + count + ')'));
+ screenLines[line] = (short)(count << SCREEN_LINES_SHIFT
+ | SCREEN_LINES_VALID_MASK);
+ } //}}}
+
+ //{{{ invalidateScreenLineCounts() method
+ void invalidateScreenLineCounts()
+ {
+ int lineCount = buffer.getLineCount();
+ for(int i = 0; i < lineCount; i++)
+ screenLines[i] &= ~SCREEN_LINES_VALID_MASK;
+ } //}}}
+
+ //{{{ reset() method
+ void reset()
+ {
+ screenLines = new short[buffer.getLineCount()];
+ } //}}}
+
+ //{{{ contentInserted() method
+ public void contentInserted(int startLine, int numLines)
+ {
+ int endLine = startLine + numLines;
+ screenLines[startLine] &= ~SCREEN_LINES_VALID_MASK;
+
+ int lineCount = buffer.getLineCount();
+
+ if(numLines > 0)
+ {
+ if(screenLines.length <= lineCount)
+ {
+ short[] screenLinesN = new short[((lineCount + 1) << 1)];
+ System.arraycopy(screenLines,0,screenLinesN,0,
+ screenLines.length);
+ screenLines = screenLinesN;
+ }
+
+ System.arraycopy(screenLines,startLine,screenLines,
+ endLine,lineCount - endLine);
+
+ for(int i = 0; i < numLines; i++)
+ screenLines[startLine + i] = 0;
+ }
+ } //}}}
+
+ //{{{ contentRemoved() method
+ public void contentRemoved(int startLine, int numLines)
+ {
+ int endLine = startLine + numLines;
+ screenLines[startLine] &= ~SCREEN_LINES_VALID_MASK;
+
+ if(numLines > 0 && endLine != screenLines.length)
+ {
+ System.arraycopy(screenLines,endLine + 1,screenLines,
+ startLine + 1,screenLines.length - endLine - 1);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private static final int SCREEN_LINES_SHIFT = 1;
+ private static final int SCREEN_LINES_VALID_MASK = 1;
+
+ private final JEditBuffer buffer;
+ /** This array contains the line count for each physical line. */
+ private short[] screenLines;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/ScrollLayout.java b/jEdit/org/gjt/sp/jedit/textarea/ScrollLayout.java
index 4479452..037b639 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/ScrollLayout.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/ScrollLayout.java
@@ -1,203 +1,203 @@
-/*
- * ScrollLayout.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import java.awt.*;
-import javax.swing.border.Border;
-import javax.swing.JComponent;
-//}}}
-
-public class ScrollLayout implements LayoutManager
-{
- public static final String CENTER = "center";
- public static final String RIGHT = "right";
- public static final String LEFT = "left";
- public static final String BOTTOM = "bottom";
- public static final String TOP = "top";
-
- //{{{ addLayoutComponent() method
- public void addLayoutComponent(String name, Component comp)
- {
- if(name.equals(CENTER))
- center = comp;
- else if(name.equals(RIGHT))
- right = comp;
- else if(name.equals(LEFT))
- left = comp;
- else if(name.equals(BOTTOM))
- bottom = comp;
- else if(name.equals(TOP))
- top = comp;
- } //}}}
-
- //{{{ removeLayoutComponent() method
- public void removeLayoutComponent(Component comp)
- {
- if(center == comp)
- center = null;
- else if(right == comp)
- right = null;
- else if(left == comp)
- left = null;
- else if(bottom == comp)
- bottom = null;
- else if(top == comp)
- top = null;
- } //}}}
-
- //{{{ preferredLayoutSize() method
- public Dimension preferredLayoutSize(Container parent)
- {
- Dimension dim = new Dimension();
- Insets insets = getInsets(parent);
-
- dim.width = insets.left + insets.right;
- dim.height = insets.top + insets.bottom;
-
- Dimension leftPref = left.getPreferredSize();
- dim.width += leftPref.width;
- Dimension centerPref = center.getPreferredSize();
- dim.width += centerPref.width;
- dim.height += centerPref.height;
- Dimension rightPref = right.getPreferredSize();
- dim.width += rightPref.width;
- Dimension bottomPref = bottom.getPreferredSize();
- dim.height += bottomPref.height;
- if(top != null)
- {
- Dimension topPref = top.getPreferredSize();
- dim.height += topPref.height;
- }
-
- return dim;
- } //}}}
-
- //{{{ minimumLayoutSize() method
- public Dimension minimumLayoutSize(Container parent)
- {
- Dimension dim = new Dimension();
- Insets insets = getInsets(parent);
-
- dim.width = insets.left + insets.right;
- dim.height = insets.top + insets.bottom;
-
- Dimension leftPref = left.getMinimumSize();
- dim.width += leftPref.width;
- Dimension centerPref = center.getMinimumSize();
- dim.width += centerPref.width;
- dim.height += centerPref.height;
- Dimension rightPref = right.getMinimumSize();
- dim.width += rightPref.width;
- Dimension bottomPref = bottom.getMinimumSize();
- dim.height += bottomPref.height;
- if(top != null)
- {
- Dimension topPref = top.getMinimumSize();
- dim.height += topPref.height;
- }
-
- return dim;
- } //}}}
-
- //{{{ layoutContainer() method
- public void layoutContainer(Container parent)
- {
- Dimension size = parent.getSize();
- Insets insets = getInsets(parent);
-
- int itop = insets.top;
- int ileft = insets.left;
- int ibottom = insets.bottom;
- int iright = insets.right;
-
- int rightWidth = right.getPreferredSize().width;
- int leftWidth = left.getPreferredSize().width;
- int topHeight;
- if(top != null)
- {
- topHeight = top.getPreferredSize().height;
- }
- else
- {
- topHeight = 0;
- }
- int bottomHeight = bottom.getPreferredSize().height;
- int centerWidth = Math.max(0,size.width - leftWidth
- - rightWidth - ileft - iright);
- int centerHeight = Math.max(0,size.height - topHeight
- - bottomHeight - itop - ibottom);
-
- left.setBounds(
- ileft,
- itop+topHeight,
- leftWidth,
- centerHeight);
-
- center.setBounds(
- ileft + leftWidth,
- itop+topHeight,
- centerWidth,
- centerHeight);
-
- right.setBounds(
- ileft + leftWidth + centerWidth,
- itop+topHeight,
- rightWidth,
- centerHeight);
-
- bottom.setBounds(
- ileft,
- itop + topHeight + centerHeight,
- Math.max(0,size.width - bottom.getHeight()
- - ileft - iright),
- bottomHeight);
- if(top != null)
- {
- top.setBounds(
- ileft,
- itop,
- leftWidth+centerWidth+rightWidth,
- topHeight);
- }
- } //}}}
-
- //{{{ Private members
- private Component center;
- private Component left;
- private Component right;
- private Component bottom;
- private Component top;
-
- //{{{ getInsets() method
- private Insets getInsets(Component parent)
- {
- Border border = ((JComponent)parent).getBorder();
- if(border == null)
- return new Insets(0,0,0,0);
- else
- return border.getBorderInsets(parent);
- } //}}}
-
- //}}}
-}
+/*
+ * ScrollLayout.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import java.awt.*;
+import javax.swing.border.Border;
+import javax.swing.JComponent;
+//}}}
+
+public class ScrollLayout implements LayoutManager
+{
+ public static final String CENTER = "center";
+ public static final String RIGHT = "right";
+ public static final String LEFT = "left";
+ public static final String BOTTOM = "bottom";
+ public static final String TOP = "top";
+
+ //{{{ addLayoutComponent() method
+ public void addLayoutComponent(String name, Component comp)
+ {
+ if(name.equals(CENTER))
+ center = comp;
+ else if(name.equals(RIGHT))
+ right = comp;
+ else if(name.equals(LEFT))
+ left = comp;
+ else if(name.equals(BOTTOM))
+ bottom = comp;
+ else if(name.equals(TOP))
+ top = comp;
+ } //}}}
+
+ //{{{ removeLayoutComponent() method
+ public void removeLayoutComponent(Component comp)
+ {
+ if(center == comp)
+ center = null;
+ else if(right == comp)
+ right = null;
+ else if(left == comp)
+ left = null;
+ else if(bottom == comp)
+ bottom = null;
+ else if(top == comp)
+ top = null;
+ } //}}}
+
+ //{{{ preferredLayoutSize() method
+ public Dimension preferredLayoutSize(Container parent)
+ {
+ Dimension dim = new Dimension();
+ Insets insets = getInsets(parent);
+
+ dim.width = insets.left + insets.right;
+ dim.height = insets.top + insets.bottom;
+
+ Dimension leftPref = left.getPreferredSize();
+ dim.width += leftPref.width;
+ Dimension centerPref = center.getPreferredSize();
+ dim.width += centerPref.width;
+ dim.height += centerPref.height;
+ Dimension rightPref = right.getPreferredSize();
+ dim.width += rightPref.width;
+ Dimension bottomPref = bottom.getPreferredSize();
+ dim.height += bottomPref.height;
+ if(top != null)
+ {
+ Dimension topPref = top.getPreferredSize();
+ dim.height += topPref.height;
+ }
+
+ return dim;
+ } //}}}
+
+ //{{{ minimumLayoutSize() method
+ public Dimension minimumLayoutSize(Container parent)
+ {
+ Dimension dim = new Dimension();
+ Insets insets = getInsets(parent);
+
+ dim.width = insets.left + insets.right;
+ dim.height = insets.top + insets.bottom;
+
+ Dimension leftPref = left.getMinimumSize();
+ dim.width += leftPref.width;
+ Dimension centerPref = center.getMinimumSize();
+ dim.width += centerPref.width;
+ dim.height += centerPref.height;
+ Dimension rightPref = right.getMinimumSize();
+ dim.width += rightPref.width;
+ Dimension bottomPref = bottom.getMinimumSize();
+ dim.height += bottomPref.height;
+ if(top != null)
+ {
+ Dimension topPref = top.getMinimumSize();
+ dim.height += topPref.height;
+ }
+
+ return dim;
+ } //}}}
+
+ //{{{ layoutContainer() method
+ public void layoutContainer(Container parent)
+ {
+ Dimension size = parent.getSize();
+ Insets insets = getInsets(parent);
+
+ int itop = insets.top;
+ int ileft = insets.left;
+ int ibottom = insets.bottom;
+ int iright = insets.right;
+
+ int rightWidth = right.getPreferredSize().width;
+ int leftWidth = left.getPreferredSize().width;
+ int topHeight;
+ if(top != null)
+ {
+ topHeight = top.getPreferredSize().height;
+ }
+ else
+ {
+ topHeight = 0;
+ }
+ int bottomHeight = bottom.getPreferredSize().height;
+ int centerWidth = Math.max(0,size.width - leftWidth
+ - rightWidth - ileft - iright);
+ int centerHeight = Math.max(0,size.height - topHeight
+ - bottomHeight - itop - ibottom);
+
+ left.setBounds(
+ ileft,
+ itop+topHeight,
+ leftWidth,
+ centerHeight);
+
+ center.setBounds(
+ ileft + leftWidth,
+ itop+topHeight,
+ centerWidth,
+ centerHeight);
+
+ right.setBounds(
+ ileft + leftWidth + centerWidth,
+ itop+topHeight,
+ rightWidth,
+ centerHeight);
+
+ bottom.setBounds(
+ ileft,
+ itop + topHeight + centerHeight,
+ Math.max(0,size.width - bottom.getHeight()
+ - ileft - iright),
+ bottomHeight);
+ if(top != null)
+ {
+ top.setBounds(
+ ileft,
+ itop,
+ leftWidth+centerWidth+rightWidth,
+ topHeight);
+ }
+ } //}}}
+
+ //{{{ Private members
+ private Component center;
+ private Component left;
+ private Component right;
+ private Component bottom;
+ private Component top;
+
+ //{{{ getInsets() method
+ private Insets getInsets(Component parent)
+ {
+ Border border = ((JComponent)parent).getBorder();
+ if(border == null)
+ return new Insets(0,0,0,0);
+ else
+ return border.getBorderInsets(parent);
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/ScrollLineCount.java b/jEdit/org/gjt/sp/jedit/textarea/ScrollLineCount.java
index 0b376b6..b1925e2 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/ScrollLineCount.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/ScrollLineCount.java
@@ -1,63 +1,63 @@
-/*
- * ScrollLineCount.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.util.Log;
-
-/**
- * Maintains the vertical scrollbar.
- */
-class ScrollLineCount extends Anchor
-{
- //{{{ ScrollLineCount constructor
- ScrollLineCount(DisplayManager displayManager,
- TextArea textArea)
- {
- super(displayManager,textArea);
- } //}}}
-
- @Override
- public void changed() {}
-
- //{{{ reset() method
- @Override
- public void reset()
- {
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"reset()");
-
- physicalLine = displayManager.getFirstVisibleLine();
- int scrollLine = 0;
- while(physicalLine != -1)
- {
- scrollLine += displayManager
- .getScreenLineCount(physicalLine);
- physicalLine = displayManager
- .getNextVisibleLine(physicalLine);
- }
-
- this.scrollLine = scrollLine;
- physicalLine = displayManager.getBuffer().getLineCount();
- } //}}}
-}
+/*
+ * ScrollLineCount.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.util.Log;
+
+/**
+ * Maintains the vertical scrollbar.
+ */
+class ScrollLineCount extends Anchor
+{
+ //{{{ ScrollLineCount constructor
+ ScrollLineCount(DisplayManager displayManager,
+ TextArea textArea)
+ {
+ super(displayManager,textArea);
+ } //}}}
+
+ @Override
+ public void changed() {}
+
+ //{{{ reset() method
+ @Override
+ public void reset()
+ {
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"reset()");
+
+ physicalLine = displayManager.getFirstVisibleLine();
+ int scrollLine = 0;
+ while(physicalLine != -1)
+ {
+ scrollLine += displayManager
+ .getScreenLineCount(physicalLine);
+ physicalLine = displayManager
+ .getNextVisibleLine(physicalLine);
+ }
+
+ this.scrollLine = scrollLine;
+ physicalLine = displayManager.getBuffer().getLineCount();
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/ScrollListener.java b/jEdit/org/gjt/sp/jedit/textarea/ScrollListener.java
index 04e3dfc..6ece922 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/ScrollListener.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/ScrollListener.java
@@ -1,33 +1,33 @@
-/*
- * ScrollListener.java - Text area scroll listener
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-/**
- * A scroll listener will be notified when the text area is scrolled, either
- * horizontally or vertically.
- * @author Slava Pestov
- * @version $Id: ScrollListener.java 15570 2009-06-25 00:43:57Z ezust $
- * @since jEdit 3.2pre2
- */
-public interface ScrollListener extends java.util.EventListener
-{
- void scrolledVertically(TextArea textArea);
- void scrolledHorizontally(TextArea textArea);
-}
+/*
+ * ScrollListener.java - Text area scroll listener
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+/**
+ * A scroll listener will be notified when the text area is scrolled, either
+ * horizontally or vertically.
+ * @author Slava Pestov
+ * @version $Id: ScrollListener.java 15570 2009-06-25 00:43:57Z ezust $
+ * @since jEdit 3.2pre2
+ */
+public interface ScrollListener extends java.util.EventListener
+{
+ void scrolledVertically(TextArea textArea);
+ void scrolledHorizontally(TextArea textArea);
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/Selection.java b/jEdit/org/gjt/sp/jedit/textarea/Selection.java
index 2dbe7a4..8dd526e 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/Selection.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/Selection.java
@@ -1,765 +1,765 @@
-/*
- * Selection.java - Selected text
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import java.util.ArrayList;
-import java.util.List;
-
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.util.StandardUtilities;
-//}}}
-
-/**
- * An abstract class that holds data on a region of selected text.
- * As an abstract class, it cannot be used
- * directly, but instead serves as a parent class for two specific types
- * of selection structures:
- * <ul>
- * <li>{@link Selection.Range} - represents an ordinary range of selected text.</li>
- * <li>{@link Selection.Rect} - represents a rectangular selection.</li>
- * </ul>
- *
- * @author Slava Pestov
- * @author John Gellene (API documentation)
- * @version $Id: Selection.java 15570 2009-06-25 00:43:57Z ezust $
- * @since jEdit 3.2pre1
- */
-public abstract class Selection implements Cloneable
-{
- //{{{ getStart() method
- /**
- * Returns the start offset of this selection.
- */
- public int getStart()
- {
- return start;
- } //}}}
-
- //{{{ getEnd() method
- /**
- * Returns the end offset of this selection.
- */
- public int getEnd()
- {
- return end;
- } //}}}
-
- //{{{ getStart() method
- /**
- * Returns the beginning of the portion of the selection
- * falling on the specified line. Used to manipulate
- * selection text on a line-by-line basis.
- * @param buffer The buffer
- * @param line The line number
- * @since jEdit 4.1pre1
- */
- public abstract int getStart(JEditBuffer buffer, int line);
- //}}}
-
- //{{{ getEnd() method
- /**
- * Returns the end of the portion of the selection
- * falling on the specified line. Used to manipulate
- * selection text on a line-by-line basis.
- * @param buffer The buffer
- * @param line The line number
- * @since jEdit 4.1pre1
- */
- public abstract int getEnd(JEditBuffer buffer, int line);
- //}}}
-
- //{{{ getStartLine() method
- /**
- * Returns the starting line number of this selection.
- */
- public int getStartLine()
- {
- return startLine;
- } //}}}
-
- //{{{ getEndLine() method
- /**
- * Returns the ending line number of this selection.
- */
- public int getEndLine()
- {
- return endLine;
- } //}}}
-
- //{{{ overlaps() method
- /**
- * Returns if this selection and the specified selection overlap.
- * @param s The other selection
- * @since jEdit 4.1pre1
- */
- public boolean overlaps(Selection s)
- {
- if((start >= s.start && start <= s.end)
- || (end >= s.start && end <= s.end))
- return true;
- else
- return false;
- } //}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- return getClass().getName() + "[start=" + start
- + ",end=" + end + ",startLine=" + startLine
- + ",endLine=" + endLine + ']';
- } //}}}
-
- //{{{ clone() method
- @Override
- public Object clone()
- {
- try
- {
- return super.clone();
- }
- catch(CloneNotSupportedException e)
- {
- throw new InternalError("I just drank a whole "
- + "bottle of cough syrup and I feel "
- + "funny!");
- }
- } //}}}
-
- //{{{ Package-private members
- int start, end;
- int startLine, endLine;
-
- //{{{ Selection constructor
- protected Selection()
- {
- } //}}}
-
- //{{{ Selection constructor
- protected Selection(Selection sel)
- {
- this.start = sel.start;
- this.end = sel.end;
- } //}}}
-
- //{{{ Selection constructor
- protected Selection(int start, int end)
- {
- this.start = start;
- this.end = end;
- } //}}}
-
- // should the next two be public, maybe?
- abstract void getText(JEditBuffer buffer, StringBuilder buf);
-
- /**
- * Replace the selection with the given text
- * @param buffer the buffer
- * @param text the text
- * @return the offset at the end of the inserted text
- */
- abstract int setText(JEditBuffer buffer, String text);
-
- /**
- * Called when text is inserted into the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param start The start offset, from the beginning of the buffer
- * @param numLines The number of lines inserted
- * @param length The number of characters inserted
- * @return <code>true</code> if the selection was changed
- */
- abstract boolean contentInserted(JEditBuffer buffer, int startLine, int start,
- int numLines, int length);
-
- /**
- * Called when text is removed from the buffer.
- * @param buffer The buffer in question
- * @param startLine The first line
- * @param start The start offset, from the beginning of the buffer
- * @param numLines The number of lines removed
- * @param length The number of characters removed
- * @return <code>true</code> if the selection was changed
- */
- abstract boolean contentRemoved(JEditBuffer buffer, int startLine, int start,
- int numLines, int length);
- //}}}
-
- //{{{ Range class
- /**
- * An ordinary range selection.
- * @since jEdit 3.2pre1
- */
- public static class Range extends Selection
- {
- //{{{ Range constructor
- public Range()
- {
- } //}}}
-
- //{{{ Range constructor
- public Range(Selection sel)
- {
- super(sel);
- } //}}}
-
- //{{{ Range constructor
- public Range(int start, int end)
- {
- super(start,end);
- } //}}}
-
- //{{{ getStart() method
- @Override
- public int getStart(JEditBuffer buffer, int line)
- {
- if(line == startLine)
- return start;
- else
- return buffer.getLineStartOffset(line);
- } //}}}
-
- //{{{ getEnd() method
- @Override
- public int getEnd(JEditBuffer buffer, int line)
- {
- if(line == endLine)
- return end;
- else
- return buffer.getLineEndOffset(line) - 1;
- } //}}}
-
- //{{{ Package-private members
-
- //{{{ getText() method
- @Override
- void getText(JEditBuffer buffer, StringBuilder buf)
- {
- buf.append(buffer.getText(start,end - start));
- } //}}}
-
- //{{{ setText() method
- /**
- * Replace the selection with the given text
- * @param buffer the buffer
- * @param text the text
- * @return the offset at the end of the inserted text
- */
- @Override
- int setText(JEditBuffer buffer, String text)
- {
- buffer.remove(start,end - start);
- if(text != null && text.length() != 0)
- {
- buffer.insert(start,text);
- return start + text.length();
- }
- else
- return start;
- } //}}}
-
- //{{{ contentInserted() method
- @Override
- boolean contentInserted(JEditBuffer buffer, int startLine, int start,
- int numLines, int length)
- {
- boolean changed = false;
-
- if(this.start >= start)
- {
- this.start += length;
- if(numLines != 0)
- this.startLine = buffer.getLineOfOffset(this.start);
- changed = true;
- }
-
- if(this.end >= start)
- {
- this.end += length;
- if(numLines != 0)
- this.endLine = buffer.getLineOfOffset(this.end);
- changed = true;
- }
-
- return changed;
- } //}}}
-
- //{{{ contentRemoved() method
- @Override
- boolean contentRemoved(JEditBuffer buffer, int startLine, int start,
- int numLines, int length)
- {
- int end = start + length;
- boolean changed = false;
-
- if(this.start > start && this.start <= end)
- {
- this.start = start;
- changed = true;
- }
- else if(this.start > end)
- {
- this.start -= length;
- changed = true;
- }
-
- if(this.end > start && this.end <= end)
- {
- this.end = start;
- changed = true;
- }
- else if(this.end > end)
- {
- this.end -= length;
- changed = true;
- }
-
- if(changed && numLines != 0)
- {
- this.startLine = buffer.getLineOfOffset(this.start);
- this.endLine = buffer.getLineOfOffset(this.end);
- }
-
- return changed;
- } //}}}
-
- //}}}
- } //}}}
-
- //{{{ Rect class
- /**
- * A rectangular selection.
- * @since jEdit 3.2pre1
- */
- // this class is not very fast...
- public static class Rect extends Selection
- {
- //{{{ Rect constructor
- public Rect()
- {
- } //}}}
-
- //{{{ Rect constructor
- public Rect(Selection sel)
- {
- super(sel);
- } //}}}
-
- //{{{ Rect constructor
- public Rect(int start, int end)
- {
- super(start,end);
- } //}}}
-
- //{{{ Rect constructor
- public Rect(int startLine, int start, int endLine, int end)
- {
- this.startLine = startLine;
- this.start = start;
- this.endLine = endLine;
- this.end = end;
- } //}}}
-
- //{{{ Rect constructor
- public Rect(JEditBuffer buffer, int startLine, int startColumn,
- int endLine, int endColumn)
- {
- this.startLine = startLine;
- this.endLine = endLine;
-
- int[] width = new int[1];
- int startOffset = buffer.getOffsetOfVirtualColumn(startLine,
- startColumn,width);
- if(startOffset == -1)
- {
- extraStartVirt = startColumn - width[0];
- //startOffset = buffer.getLineEndOffset(startLine) - 1;
- }
- /*else
- startOffset += buffer.getLineStartOffset(startLine);*/
-
- int endOffset = buffer.getOffsetOfVirtualColumn(endLine,
- endColumn,width);
- if(endOffset == -1)
- {
- extraEndVirt = endColumn - width[0];
- //endOffset = buffer.getLineEndOffset(endLine) - 1;
- }
- /*else
- endOffset += buffer.getLineStartOffset(endLine);*/
- } //}}}
-
- //{{{ getStartColumn() method
- public int getStartColumn(JEditBuffer buffer)
- {
- int virtColStart = buffer.getVirtualWidth(startLine,
- start - buffer.getLineStartOffset(startLine)) + extraStartVirt;
- int virtColEnd = buffer.getVirtualWidth(endLine,
- end - buffer.getLineStartOffset(endLine)) + extraEndVirt;
- return Math.min(virtColStart,virtColEnd);
- } //}}}
-
- //{{{ getEndColumn() method
- public int getEndColumn(JEditBuffer buffer)
- {
- int virtColStart = buffer.getVirtualWidth(startLine,
- start - buffer.getLineStartOffset(startLine)) + extraStartVirt;
- int virtColEnd = buffer.getVirtualWidth(endLine,
- end - buffer.getLineStartOffset(endLine)) + extraEndVirt;
- return Math.max(virtColStart,virtColEnd);
- } //}}}
-
- //{{{ getStart() method
- @Override
- public int getStart(JEditBuffer buffer, int line)
- {
- return getColumnOnOtherLine(buffer,line,
- getStartColumn(buffer));
- } //}}}
-
- //{{{ getEnd() method
- @Override
- public int getEnd(JEditBuffer buffer, int line)
- {
- return getColumnOnOtherLine(buffer,line,
- getEndColumn(buffer));
- } //}}}
-
- //{{{ Package-private members
- int extraStartVirt;
- int extraEndVirt;
-
- //{{{ getText() method
- @Override
- void getText(JEditBuffer buffer, StringBuilder buf)
- {
- int start = getStartColumn(buffer);
- int end = getEndColumn(buffer);
-
- for(int i = startLine; i <= endLine; i++)
- {
- int lineStart = buffer.getLineStartOffset(i);
- int lineLen = buffer.getLineLength(i);
-
- int rectStart = buffer.getOffsetOfVirtualColumn(
- i,start,null);
- if(rectStart == -1)
- rectStart = lineLen;
-
- int rectEnd = buffer.getOffsetOfVirtualColumn(
- i,end,null);
- if(rectEnd == -1)
- rectEnd = lineLen;
-
- if(rectEnd < rectStart)
- System.err.println(i + ":::" + start + ':' + end
- + " ==> " + rectStart + ':' + rectEnd);
- buf.append(buffer.getText(lineStart + rectStart,
- rectEnd - rectStart));
-
- if(i != endLine)
- buf.append('\n');
- }
- } //}}}
-
- //{{{ setText() method
- /**
- * Replace the selection with the given text
- * @param buffer the buffer
- * @param text the text
- * @return the offset at the end of the inserted text
- */
- @Override
- int setText(JEditBuffer buffer, String text)
- {
- int startColumn = getStartColumn(buffer);
- int endColumn = getEndColumn(buffer);
-
- int tabSize = buffer.getTabSize();
-
- int maxWidth = 0;
- int totalLines = 0;
- /** This list will contains Strings and Integer. */
- List<Object> lines = new ArrayList<Object>();
-
- //{{{ Split the text into lines
- if(text != null)
- {
- int lastNewline = 0;
- int currentWidth = startColumn;
- for(int i = 0; i < text.length(); i++)
- {
- char ch = text.charAt(i);
- if(ch == '\n')
- {
- totalLines++;
- lines.add(text.substring(
- lastNewline,i));
- lastNewline = i + 1;
- maxWidth = Math.max(maxWidth,currentWidth);
- lines.add(currentWidth);
- currentWidth = startColumn;
- }
- else if(ch == '\t')
- currentWidth += tabSize - (currentWidth % tabSize);
- else
- currentWidth++;
- }
-
- if(lastNewline != text.length())
- {
- totalLines++;
- lines.add(text.substring(lastNewline));
- lines.add(currentWidth);
- maxWidth = Math.max(maxWidth,currentWidth);
- }
- } //}}}
-
- //{{{ Insert the lines into the buffer
- int endOffset = 0;
- int[] total = new int[1];
- int lastLine = Math.max(startLine + totalLines - 1,endLine);
- for(int i = startLine; i <= lastLine; i++)
- {
- if(i == buffer.getLineCount())
- buffer.insert(buffer.getLength(),"\n");
-
- int lineStart = buffer.getLineStartOffset(i);
- int lineLen = buffer.getLineLength(i);
-
- int rectStart = buffer.getOffsetOfVirtualColumn(
- i,startColumn,total);
- int startWhitespace;
- if(rectStart == -1)
- {
- startWhitespace = startColumn - total[0];
- rectStart = lineLen;
- }
- else
- startWhitespace = 0;
-
- int rectEnd = buffer.getOffsetOfVirtualColumn(
- i,endColumn,null);
- if(rectEnd == -1)
- rectEnd = lineLen;
-
- buffer.remove(rectStart + lineStart,rectEnd - rectStart);
-
- if(startWhitespace != 0)
- {
- buffer.insert(rectStart + lineStart,
- StandardUtilities.createWhiteSpace(startWhitespace,0));
- }
-
- int endWhitespace;
- if(totalLines == 0)
- {
- if(rectEnd == lineLen)
- endWhitespace = 0;
- else
- endWhitespace = maxWidth - startColumn;
- }
- else
- {
- int index = 2 * ((i - startLine) % totalLines);
- String str = (String)lines.get(index);
- buffer.insert(rectStart + lineStart + startWhitespace,str);
- if(rectEnd == lineLen)
- endWhitespace = 0;
- else
- {
- endWhitespace = maxWidth
- - (Integer) lines.get(index + 1);
- }
- startWhitespace += str.length();
- }
-
- if(endWhitespace != 0)
- {
- buffer.insert(rectStart + lineStart
- + startWhitespace,
- StandardUtilities.createWhiteSpace(endWhitespace,0));
- }
-
- endOffset = rectStart + lineStart
- + startWhitespace
- + endWhitespace;
- } //}}}
-
- //{{{ Move the caret down a line
- if(text == null || text.length() == 0)
- return end;
- else
- return endOffset;
- //}}}
- } //}}}
-
- //{{{ contentInserted() method
- @Override
- boolean contentInserted(JEditBuffer buffer, int startLine, int start,
- int numLines, int length)
- {
- if(this.end < start)
- return false;
-
- this.end += length;
-
- if(this.startLine > startLine)
- {
- this.start += length;
- if(numLines != 0)
- {
- this.startLine = buffer.getLineOfOffset(
- this.start);
- this.endLine = buffer.getLineOfOffset(
- this.end);
- }
- return true;
- }
-
- int endVirtualColumn = buffer.getVirtualWidth(
- this.endLine,end
- - buffer.getLineStartOffset(this.endLine));
-
- if(this.start == start)
- {
- int startVirtualColumn = buffer.getVirtualWidth(
- this.startLine,start
- - buffer.getLineStartOffset(
- this.startLine));
-
- this.start += length;
-
- int newStartVirtualColumn
- = buffer.getVirtualWidth(
- startLine,start -
- buffer.getLineStartOffset(
- this.startLine));
-
- int[] totalVirtualWidth = new int[1];
- int newEnd = buffer.getOffsetOfVirtualColumn(
- this.endLine,endVirtualColumn +
- newStartVirtualColumn -
- startVirtualColumn,
- totalVirtualWidth);
-
- if(newEnd != -1)
- {
- end = buffer.getLineStartOffset(
- this.endLine) + newEnd;
- }
- else
- {
- end = buffer.getLineEndOffset(
- this.endLine) - 1;
- extraEndVirt = totalVirtualWidth[0]
- - endVirtualColumn;
- }
- }
- else if(this.start > start)
- {
- this.start += length;
- if(numLines != 0)
- {
- this.startLine = buffer.getLineOfOffset(
- this.start);
- }
- }
-
- if(numLines != 0)
- this.endLine = buffer.getLineOfOffset(this.end);
- int newEndVirtualColumn = buffer.getVirtualWidth(
- endLine,
- end - buffer.getLineStartOffset(this.endLine));
- if(startLine == this.endLine && extraEndVirt != 0)
- {
- extraEndVirt += endVirtualColumn - newEndVirtualColumn;
- }
- else if(startLine == this.startLine
- && extraStartVirt != 0)
- {
- extraStartVirt += endVirtualColumn - newEndVirtualColumn;
- }
-
- return true;
- } //}}}
-
- //{{{ contentRemoved() method
- @Override
- boolean contentRemoved(JEditBuffer buffer, int startLine, int start,
- int numLines, int length)
- {
- int end = start + length;
- boolean changed = false;
-
- if(this.start > start && this.start <= end)
- {
- this.start = start;
- changed = true;
- }
- else if(this.start > end)
- {
- this.start -= length;
- changed = true;
- }
-
- if(this.end > start && this.end <= end)
- {
- this.end = start;
- changed = true;
- }
- else if(this.end > end)
- {
- this.end -= length;
- changed = true;
- }
-
- if(changed && numLines != 0)
- {
- this.startLine = buffer.getLineOfOffset(this.start);
- this.endLine = buffer.getLineOfOffset(this.end);
- }
-
- return changed;
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ getColumnOnOtherLine() method
- private static int getColumnOnOtherLine(JEditBuffer buffer, int line,
- int col)
- {
- int returnValue = buffer.getOffsetOfVirtualColumn(
- line,col,null);
- if(returnValue == -1)
- return buffer.getLineEndOffset(line) - 1;
- else
- return buffer.getLineStartOffset(line) + returnValue;
- } //}}}
-
- //}}}
- } //}}}
-}
+/*
+ * Selection.java - Selected text
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.StandardUtilities;
+//}}}
+
+/**
+ * An abstract class that holds data on a region of selected text.
+ * As an abstract class, it cannot be used
+ * directly, but instead serves as a parent class for two specific types
+ * of selection structures:
+ * <ul>
+ * <li>{@link Selection.Range} - represents an ordinary range of selected text.</li>
+ * <li>{@link Selection.Rect} - represents a rectangular selection.</li>
+ * </ul>
+ *
+ * @author Slava Pestov
+ * @author John Gellene (API documentation)
+ * @version $Id: Selection.java 15570 2009-06-25 00:43:57Z ezust $
+ * @since jEdit 3.2pre1
+ */
+public abstract class Selection implements Cloneable
+{
+ //{{{ getStart() method
+ /**
+ * Returns the start offset of this selection.
+ */
+ public int getStart()
+ {
+ return start;
+ } //}}}
+
+ //{{{ getEnd() method
+ /**
+ * Returns the end offset of this selection.
+ */
+ public int getEnd()
+ {
+ return end;
+ } //}}}
+
+ //{{{ getStart() method
+ /**
+ * Returns the beginning of the portion of the selection
+ * falling on the specified line. Used to manipulate
+ * selection text on a line-by-line basis.
+ * @param buffer The buffer
+ * @param line The line number
+ * @since jEdit 4.1pre1
+ */
+ public abstract int getStart(JEditBuffer buffer, int line);
+ //}}}
+
+ //{{{ getEnd() method
+ /**
+ * Returns the end of the portion of the selection
+ * falling on the specified line. Used to manipulate
+ * selection text on a line-by-line basis.
+ * @param buffer The buffer
+ * @param line The line number
+ * @since jEdit 4.1pre1
+ */
+ public abstract int getEnd(JEditBuffer buffer, int line);
+ //}}}
+
+ //{{{ getStartLine() method
+ /**
+ * Returns the starting line number of this selection.
+ */
+ public int getStartLine()
+ {
+ return startLine;
+ } //}}}
+
+ //{{{ getEndLine() method
+ /**
+ * Returns the ending line number of this selection.
+ */
+ public int getEndLine()
+ {
+ return endLine;
+ } //}}}
+
+ //{{{ overlaps() method
+ /**
+ * Returns if this selection and the specified selection overlap.
+ * @param s The other selection
+ * @since jEdit 4.1pre1
+ */
+ public boolean overlaps(Selection s)
+ {
+ if((start >= s.start && start <= s.end)
+ || (end >= s.start && end <= s.end))
+ return true;
+ else
+ return false;
+ } //}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ return getClass().getName() + "[start=" + start
+ + ",end=" + end + ",startLine=" + startLine
+ + ",endLine=" + endLine + ']';
+ } //}}}
+
+ //{{{ clone() method
+ @Override
+ public Object clone()
+ {
+ try
+ {
+ return super.clone();
+ }
+ catch(CloneNotSupportedException e)
+ {
+ throw new InternalError("I just drank a whole "
+ + "bottle of cough syrup and I feel "
+ + "funny!");
+ }
+ } //}}}
+
+ //{{{ Package-private members
+ int start, end;
+ int startLine, endLine;
+
+ //{{{ Selection constructor
+ protected Selection()
+ {
+ } //}}}
+
+ //{{{ Selection constructor
+ protected Selection(Selection sel)
+ {
+ this.start = sel.start;
+ this.end = sel.end;
+ } //}}}
+
+ //{{{ Selection constructor
+ protected Selection(int start, int end)
+ {
+ this.start = start;
+ this.end = end;
+ } //}}}
+
+ // should the next two be public, maybe?
+ abstract void getText(JEditBuffer buffer, StringBuilder buf);
+
+ /**
+ * Replace the selection with the given text
+ * @param buffer the buffer
+ * @param text the text
+ * @return the offset at the end of the inserted text
+ */
+ abstract int setText(JEditBuffer buffer, String text);
+
+ /**
+ * Called when text is inserted into the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param start The start offset, from the beginning of the buffer
+ * @param numLines The number of lines inserted
+ * @param length The number of characters inserted
+ * @return <code>true</code> if the selection was changed
+ */
+ abstract boolean contentInserted(JEditBuffer buffer, int startLine, int start,
+ int numLines, int length);
+
+ /**
+ * Called when text is removed from the buffer.
+ * @param buffer The buffer in question
+ * @param startLine The first line
+ * @param start The start offset, from the beginning of the buffer
+ * @param numLines The number of lines removed
+ * @param length The number of characters removed
+ * @return <code>true</code> if the selection was changed
+ */
+ abstract boolean contentRemoved(JEditBuffer buffer, int startLine, int start,
+ int numLines, int length);
+ //}}}
+
+ //{{{ Range class
+ /**
+ * An ordinary range selection.
+ * @since jEdit 3.2pre1
+ */
+ public static class Range extends Selection
+ {
+ //{{{ Range constructor
+ public Range()
+ {
+ } //}}}
+
+ //{{{ Range constructor
+ public Range(Selection sel)
+ {
+ super(sel);
+ } //}}}
+
+ //{{{ Range constructor
+ public Range(int start, int end)
+ {
+ super(start,end);
+ } //}}}
+
+ //{{{ getStart() method
+ @Override
+ public int getStart(JEditBuffer buffer, int line)
+ {
+ if(line == startLine)
+ return start;
+ else
+ return buffer.getLineStartOffset(line);
+ } //}}}
+
+ //{{{ getEnd() method
+ @Override
+ public int getEnd(JEditBuffer buffer, int line)
+ {
+ if(line == endLine)
+ return end;
+ else
+ return buffer.getLineEndOffset(line) - 1;
+ } //}}}
+
+ //{{{ Package-private members
+
+ //{{{ getText() method
+ @Override
+ void getText(JEditBuffer buffer, StringBuilder buf)
+ {
+ buf.append(buffer.getText(start,end - start));
+ } //}}}
+
+ //{{{ setText() method
+ /**
+ * Replace the selection with the given text
+ * @param buffer the buffer
+ * @param text the text
+ * @return the offset at the end of the inserted text
+ */
+ @Override
+ int setText(JEditBuffer buffer, String text)
+ {
+ buffer.remove(start,end - start);
+ if(text != null && text.length() != 0)
+ {
+ buffer.insert(start,text);
+ return start + text.length();
+ }
+ else
+ return start;
+ } //}}}
+
+ //{{{ contentInserted() method
+ @Override
+ boolean contentInserted(JEditBuffer buffer, int startLine, int start,
+ int numLines, int length)
+ {
+ boolean changed = false;
+
+ if(this.start >= start)
+ {
+ this.start += length;
+ if(numLines != 0)
+ this.startLine = buffer.getLineOfOffset(this.start);
+ changed = true;
+ }
+
+ if(this.end >= start)
+ {
+ this.end += length;
+ if(numLines != 0)
+ this.endLine = buffer.getLineOfOffset(this.end);
+ changed = true;
+ }
+
+ return changed;
+ } //}}}
+
+ //{{{ contentRemoved() method
+ @Override
+ boolean contentRemoved(JEditBuffer buffer, int startLine, int start,
+ int numLines, int length)
+ {
+ int end = start + length;
+ boolean changed = false;
+
+ if(this.start > start && this.start <= end)
+ {
+ this.start = start;
+ changed = true;
+ }
+ else if(this.start > end)
+ {
+ this.start -= length;
+ changed = true;
+ }
+
+ if(this.end > start && this.end <= end)
+ {
+ this.end = start;
+ changed = true;
+ }
+ else if(this.end > end)
+ {
+ this.end -= length;
+ changed = true;
+ }
+
+ if(changed && numLines != 0)
+ {
+ this.startLine = buffer.getLineOfOffset(this.start);
+ this.endLine = buffer.getLineOfOffset(this.end);
+ }
+
+ return changed;
+ } //}}}
+
+ //}}}
+ } //}}}
+
+ //{{{ Rect class
+ /**
+ * A rectangular selection.
+ * @since jEdit 3.2pre1
+ */
+ // this class is not very fast...
+ public static class Rect extends Selection
+ {
+ //{{{ Rect constructor
+ public Rect()
+ {
+ } //}}}
+
+ //{{{ Rect constructor
+ public Rect(Selection sel)
+ {
+ super(sel);
+ } //}}}
+
+ //{{{ Rect constructor
+ public Rect(int start, int end)
+ {
+ super(start,end);
+ } //}}}
+
+ //{{{ Rect constructor
+ public Rect(int startLine, int start, int endLine, int end)
+ {
+ this.startLine = startLine;
+ this.start = start;
+ this.endLine = endLine;
+ this.end = end;
+ } //}}}
+
+ //{{{ Rect constructor
+ public Rect(JEditBuffer buffer, int startLine, int startColumn,
+ int endLine, int endColumn)
+ {
+ this.startLine = startLine;
+ this.endLine = endLine;
+
+ int[] width = new int[1];
+ int startOffset = buffer.getOffsetOfVirtualColumn(startLine,
+ startColumn,width);
+ if(startOffset == -1)
+ {
+ extraStartVirt = startColumn - width[0];
+ //startOffset = buffer.getLineEndOffset(startLine) - 1;
+ }
+ /*else
+ startOffset += buffer.getLineStartOffset(startLine);*/
+
+ int endOffset = buffer.getOffsetOfVirtualColumn(endLine,
+ endColumn,width);
+ if(endOffset == -1)
+ {
+ extraEndVirt = endColumn - width[0];
+ //endOffset = buffer.getLineEndOffset(endLine) - 1;
+ }
+ /*else
+ endOffset += buffer.getLineStartOffset(endLine);*/
+ } //}}}
+
+ //{{{ getStartColumn() method
+ public int getStartColumn(JEditBuffer buffer)
+ {
+ int virtColStart = buffer.getVirtualWidth(startLine,
+ start - buffer.getLineStartOffset(startLine)) + extraStartVirt;
+ int virtColEnd = buffer.getVirtualWidth(endLine,
+ end - buffer.getLineStartOffset(endLine)) + extraEndVirt;
+ return Math.min(virtColStart,virtColEnd);
+ } //}}}
+
+ //{{{ getEndColumn() method
+ public int getEndColumn(JEditBuffer buffer)
+ {
+ int virtColStart = buffer.getVirtualWidth(startLine,
+ start - buffer.getLineStartOffset(startLine)) + extraStartVirt;
+ int virtColEnd = buffer.getVirtualWidth(endLine,
+ end - buffer.getLineStartOffset(endLine)) + extraEndVirt;
+ return Math.max(virtColStart,virtColEnd);
+ } //}}}
+
+ //{{{ getStart() method
+ @Override
+ public int getStart(JEditBuffer buffer, int line)
+ {
+ return getColumnOnOtherLine(buffer,line,
+ getStartColumn(buffer));
+ } //}}}
+
+ //{{{ getEnd() method
+ @Override
+ public int getEnd(JEditBuffer buffer, int line)
+ {
+ return getColumnOnOtherLine(buffer,line,
+ getEndColumn(buffer));
+ } //}}}
+
+ //{{{ Package-private members
+ int extraStartVirt;
+ int extraEndVirt;
+
+ //{{{ getText() method
+ @Override
+ void getText(JEditBuffer buffer, StringBuilder buf)
+ {
+ int start = getStartColumn(buffer);
+ int end = getEndColumn(buffer);
+
+ for(int i = startLine; i <= endLine; i++)
+ {
+ int lineStart = buffer.getLineStartOffset(i);
+ int lineLen = buffer.getLineLength(i);
+
+ int rectStart = buffer.getOffsetOfVirtualColumn(
+ i,start,null);
+ if(rectStart == -1)
+ rectStart = lineLen;
+
+ int rectEnd = buffer.getOffsetOfVirtualColumn(
+ i,end,null);
+ if(rectEnd == -1)
+ rectEnd = lineLen;
+
+ if(rectEnd < rectStart)
+ System.err.println(i + ":::" + start + ':' + end
+ + " ==> " + rectStart + ':' + rectEnd);
+ buf.append(buffer.getText(lineStart + rectStart,
+ rectEnd - rectStart));
+
+ if(i != endLine)
+ buf.append('\n');
+ }
+ } //}}}
+
+ //{{{ setText() method
+ /**
+ * Replace the selection with the given text
+ * @param buffer the buffer
+ * @param text the text
+ * @return the offset at the end of the inserted text
+ */
+ @Override
+ int setText(JEditBuffer buffer, String text)
+ {
+ int startColumn = getStartColumn(buffer);
+ int endColumn = getEndColumn(buffer);
+
+ int tabSize = buffer.getTabSize();
+
+ int maxWidth = 0;
+ int totalLines = 0;
+ /** This list will contains Strings and Integer. */
+ List<Object> lines = new ArrayList<Object>();
+
+ //{{{ Split the text into lines
+ if(text != null)
+ {
+ int lastNewline = 0;
+ int currentWidth = startColumn;
+ for(int i = 0; i < text.length(); i++)
+ {
+ char ch = text.charAt(i);
+ if(ch == '\n')
+ {
+ totalLines++;
+ lines.add(text.substring(
+ lastNewline,i));
+ lastNewline = i + 1;
+ maxWidth = Math.max(maxWidth,currentWidth);
+ lines.add(currentWidth);
+ currentWidth = startColumn;
+ }
+ else if(ch == '\t')
+ currentWidth += tabSize - (currentWidth % tabSize);
+ else
+ currentWidth++;
+ }
+
+ if(lastNewline != text.length())
+ {
+ totalLines++;
+ lines.add(text.substring(lastNewline));
+ lines.add(currentWidth);
+ maxWidth = Math.max(maxWidth,currentWidth);
+ }
+ } //}}}
+
+ //{{{ Insert the lines into the buffer
+ int endOffset = 0;
+ int[] total = new int[1];
+ int lastLine = Math.max(startLine + totalLines - 1,endLine);
+ for(int i = startLine; i <= lastLine; i++)
+ {
+ if(i == buffer.getLineCount())
+ buffer.insert(buffer.getLength(),"\n");
+
+ int lineStart = buffer.getLineStartOffset(i);
+ int lineLen = buffer.getLineLength(i);
+
+ int rectStart = buffer.getOffsetOfVirtualColumn(
+ i,startColumn,total);
+ int startWhitespace;
+ if(rectStart == -1)
+ {
+ startWhitespace = startColumn - total[0];
+ rectStart = lineLen;
+ }
+ else
+ startWhitespace = 0;
+
+ int rectEnd = buffer.getOffsetOfVirtualColumn(
+ i,endColumn,null);
+ if(rectEnd == -1)
+ rectEnd = lineLen;
+
+ buffer.remove(rectStart + lineStart,rectEnd - rectStart);
+
+ if(startWhitespace != 0)
+ {
+ buffer.insert(rectStart + lineStart,
+ StandardUtilities.createWhiteSpace(startWhitespace,0));
+ }
+
+ int endWhitespace;
+ if(totalLines == 0)
+ {
+ if(rectEnd == lineLen)
+ endWhitespace = 0;
+ else
+ endWhitespace = maxWidth - startColumn;
+ }
+ else
+ {
+ int index = 2 * ((i - startLine) % totalLines);
+ String str = (String)lines.get(index);
+ buffer.insert(rectStart + lineStart + startWhitespace,str);
+ if(rectEnd == lineLen)
+ endWhitespace = 0;
+ else
+ {
+ endWhitespace = maxWidth
+ - (Integer) lines.get(index + 1);
+ }
+ startWhitespace += str.length();
+ }
+
+ if(endWhitespace != 0)
+ {
+ buffer.insert(rectStart + lineStart
+ + startWhitespace,
+ StandardUtilities.createWhiteSpace(endWhitespace,0));
+ }
+
+ endOffset = rectStart + lineStart
+ + startWhitespace
+ + endWhitespace;
+ } //}}}
+
+ //{{{ Move the caret down a line
+ if(text == null || text.length() == 0)
+ return end;
+ else
+ return endOffset;
+ //}}}
+ } //}}}
+
+ //{{{ contentInserted() method
+ @Override
+ boolean contentInserted(JEditBuffer buffer, int startLine, int start,
+ int numLines, int length)
+ {
+ if(this.end < start)
+ return false;
+
+ this.end += length;
+
+ if(this.startLine > startLine)
+ {
+ this.start += length;
+ if(numLines != 0)
+ {
+ this.startLine = buffer.getLineOfOffset(
+ this.start);
+ this.endLine = buffer.getLineOfOffset(
+ this.end);
+ }
+ return true;
+ }
+
+ int endVirtualColumn = buffer.getVirtualWidth(
+ this.endLine,end
+ - buffer.getLineStartOffset(this.endLine));
+
+ if(this.start == start)
+ {
+ int startVirtualColumn = buffer.getVirtualWidth(
+ this.startLine,start
+ - buffer.getLineStartOffset(
+ this.startLine));
+
+ this.start += length;
+
+ int newStartVirtualColumn
+ = buffer.getVirtualWidth(
+ startLine,start -
+ buffer.getLineStartOffset(
+ this.startLine));
+
+ int[] totalVirtualWidth = new int[1];
+ int newEnd = buffer.getOffsetOfVirtualColumn(
+ this.endLine,endVirtualColumn +
+ newStartVirtualColumn -
+ startVirtualColumn,
+ totalVirtualWidth);
+
+ if(newEnd != -1)
+ {
+ end = buffer.getLineStartOffset(
+ this.endLine) + newEnd;
+ }
+ else
+ {
+ end = buffer.getLineEndOffset(
+ this.endLine) - 1;
+ extraEndVirt = totalVirtualWidth[0]
+ - endVirtualColumn;
+ }
+ }
+ else if(this.start > start)
+ {
+ this.start += length;
+ if(numLines != 0)
+ {
+ this.startLine = buffer.getLineOfOffset(
+ this.start);
+ }
+ }
+
+ if(numLines != 0)
+ this.endLine = buffer.getLineOfOffset(this.end);
+ int newEndVirtualColumn = buffer.getVirtualWidth(
+ endLine,
+ end - buffer.getLineStartOffset(this.endLine));
+ if(startLine == this.endLine && extraEndVirt != 0)
+ {
+ extraEndVirt += endVirtualColumn - newEndVirtualColumn;
+ }
+ else if(startLine == this.startLine
+ && extraStartVirt != 0)
+ {
+ extraStartVirt += endVirtualColumn - newEndVirtualColumn;
+ }
+
+ return true;
+ } //}}}
+
+ //{{{ contentRemoved() method
+ @Override
+ boolean contentRemoved(JEditBuffer buffer, int startLine, int start,
+ int numLines, int length)
+ {
+ int end = start + length;
+ boolean changed = false;
+
+ if(this.start > start && this.start <= end)
+ {
+ this.start = start;
+ changed = true;
+ }
+ else if(this.start > end)
+ {
+ this.start -= length;
+ changed = true;
+ }
+
+ if(this.end > start && this.end <= end)
+ {
+ this.end = start;
+ changed = true;
+ }
+ else if(this.end > end)
+ {
+ this.end -= length;
+ changed = true;
+ }
+
+ if(changed && numLines != 0)
+ {
+ this.startLine = buffer.getLineOfOffset(this.start);
+ this.endLine = buffer.getLineOfOffset(this.end);
+ }
+
+ return changed;
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ getColumnOnOtherLine() method
+ private static int getColumnOnOtherLine(JEditBuffer buffer, int line,
+ int col)
+ {
+ int returnValue = buffer.getOffsetOfVirtualColumn(
+ line,col,null);
+ if(returnValue == -1)
+ return buffer.getLineEndOffset(line) - 1;
+ else
+ return buffer.getLineStartOffset(line) + returnValue;
+ } //}}}
+
+ //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/SelectionManager.java b/jEdit/org/gjt/sp/jedit/textarea/SelectionManager.java
index aabeb3b..ce59dfe 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/SelectionManager.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/SelectionManager.java
@@ -1,430 +1,430 @@
-/*
- * SelectionManager.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import org.gjt.sp.jedit.buffer.*;
-//}}}
-
-class SelectionManager
-{
- // this is package-private so that the painter can use it without
- // having to call getSelection() (which involves an array copy)
- List<Selection> selection;
-
- //{{{ SelectionManager constructor
- SelectionManager(TextArea textArea)
- {
- this.textArea = textArea;
- selection = new ArrayList<Selection>();
- } //}}}
-
- //{{{ getSelectionCount() method
- /**
- * Returns the number of selections. This can be used to test
- * for the existence of selections.
- */
- int getSelectionCount()
- {
- return selection.size();
- } //}}}
-
- //{{{ getSelection() method
- /**
- * Returns the current selection.
- * @since jEdit 3.2pre1
- */
- public Selection[] getSelection()
- {
- return selection.toArray(
- new Selection[selection.size()]);
- } //}}}
-
- //{{{ setSelection() method
- /**
- * Sets the selection. Nested and overlapping selections are merged
- * where possible.
- */
- void setSelection(Selection[] selection)
- {
- this.selection.clear();
- addToSelection(selection);
- } //}}}
-
- //{{{ addToSelection() method
- /**
- * Adds to the selection. Nested and overlapping selections are merged
- * where possible. Null elements of the array are ignored.
- * @param selection The new selection
- * since jEdit 3.2pre1
- */
- void addToSelection(Selection[] selection)
- {
- if(selection != null)
- {
- for(int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- if(s != null)
- addToSelection(s);
- }
- }
- } //}}}
-
- //{{{ addToSelection() method
- void addToSelection(Selection addMe)
- {
- if(addMe.start > addMe.end)
- {
- throw new IllegalArgumentException(addMe.start
- + " > " + addMe.end);
- }
- else if(addMe.start == addMe.end)
- {
- if(addMe instanceof Selection.Range)
- return;
- else if(addMe instanceof Selection.Rect)
- {
- if(((Selection.Rect)addMe).extraEndVirt == 0)
- return;
- }
- }
-
- Iterator<Selection> iter = selection.iterator();
- while(iter.hasNext())
- {
- // try and merge existing selections one by
- // one with the new selection
- Selection s = iter.next();
- if(s.overlaps(addMe))
- {
- addMe.start = Math.min(s.start,addMe.start);
- addMe.end = Math.max(s.end,addMe.end);
- iter.remove();
- }
- }
-
- addMe.startLine = textArea.getLineOfOffset(addMe.start);
- addMe.endLine = textArea.getLineOfOffset(addMe.end);
-
- boolean added = false;
-
- for(int i = 0; i < selection.size(); i++)
- {
- Selection s = selection.get(i);
- if(addMe.start < s.start)
- {
- selection.add(i,addMe);
- added = true;
- break;
- }
- }
-
- if(!added)
- selection.add(addMe);
-
- textArea.invalidateLineRange(addMe.startLine,addMe.endLine);
- } //}}}
-
- //{{{ setSelection() method
- /**
- * Sets the selection. Nested and overlapping selections are merged
- * where possible.
- */
- void setSelection(Selection selection)
- {
- this.selection.clear();
-
- if(selection != null)
- addToSelection(selection);
- } //}}}
-
- //{{{ getSelectionAtOffset() method
- /**
- * Returns the selection containing the specific offset, or <code>null</code>
- * if there is no selection at that offset.
- * @param offset The offset
- * @since jEdit 3.2pre1
- */
- Selection getSelectionAtOffset(int offset)
- {
- if(selection != null)
- {
- for (Selection s : selection)
- {
- if(offset >= s.start && offset <= s.end)
- return s;
- }
- }
-
- return null;
- } //}}}
-
- //{{{ removeFromSelection() method
- /**
- * Deactivates the specified selection.
- * @param sel The selection
- */
- void removeFromSelection(Selection sel)
- {
- selection.remove(sel);
- } //}}}
-
- //{{{ resizeSelection() method
- /**
- * Resizes the selection at the specified offset, or creates a new
- * one if there is no selection at the specified offset. This is a
- * utility method that is mainly useful in the mouse event handler
- * because it handles the case of end being before offset gracefully
- * (unlike the rest of the selection API).
- * @param offset The offset
- * @param end The new selection end
- * @param extraEndVirt Only for rectangular selections - specifies how
- * far it extends into virtual space.
- * @param rect Make the selection rectangular?
- */
- void resizeSelection(int offset, int end, int extraEndVirt,
- boolean rect)
- {
- boolean reversed = false;
- if(end < offset)
- {
- int tmp = offset;
- offset = end;
- end = tmp;
- reversed = true;
- }
-
- Selection newSel;
- if(rect)
- {
- Selection.Rect rectSel = new Selection.Rect(offset,end);
- if(reversed)
- rectSel.extraStartVirt = extraEndVirt;
- else
- rectSel.extraEndVirt = extraEndVirt;
- newSel = rectSel;
- }
- else
- newSel = new Selection.Range(offset,end);
-
- addToSelection(newSel);
- } //}}}
-
- //{{{ getSelectedLines() method
- /**
- * Returns a sorted array of line numbers on which a selection or
- * selections are present.<p>
- *
- * This method is the most convenient way to iterate through selected
- * lines in a buffer. The line numbers in the array returned by this
- * method can be passed as a parameter to such methods as
- * {@link org.gjt.sp.jedit.Buffer#getLineText(int)}.
- */
- int[] getSelectedLines()
- {
-
- Set<Integer> set = new TreeSet<Integer>();
- for (Selection s : selection)
- {
- int endLine =
- s.end == textArea.getLineStartOffset(s.endLine)
- ? s.endLine - 1
- : s.endLine;
-
- for(int j = s.startLine; j <= endLine; j++)
- {
- set.add(j);
- }
- }
-
-
- int[] returnValue = new int[set.size()];
- int i = 0;
- for (Integer line : set)
- returnValue[i++] = line;
-
- return returnValue;
- } //}}}
-
- //{{{ invertSelection() method
- void invertSelection()
- {
- Selection[] newSelection = new Selection[selection.size() + 1];
- int lastOffset = 0;
- for(int i = 0; i < selection.size(); i++)
- {
- Selection s = selection.get(i);
- newSelection[i] = new Selection.Range(lastOffset,
- s.getStart());
- lastOffset = s.getEnd();
- }
- newSelection[selection.size()] = new Selection.Range(
- lastOffset,textArea.getBufferLength());
- setSelection(newSelection);
- } //}}}
-
- //{{{ getSelectionStartEndOnLine() method
- /**
- * Returns the x co-ordinates of the selection start and end on the
- * given line. May return null.
- */
- int[] getSelectionStartAndEnd(int screenLine, int physicalLine,
- Selection s)
- {
- int start = textArea.getScreenLineStartOffset(screenLine);
- int end = textArea.getScreenLineEndOffset(screenLine);
-
- if(end <= s.start || start > s.end)
- return null;
-
- int selStartScreenLine;
- if(textArea.displayManager.isLineVisible(s.startLine))
- selStartScreenLine = textArea.getScreenLineOfOffset(s.start);
- else
- selStartScreenLine = -1;
-
- int selEndScreenLine;
- if(textArea.displayManager.isLineVisible(s.endLine))
- selEndScreenLine = textArea.getScreenLineOfOffset(s.end);
- else
- selEndScreenLine = -1;
-
- JEditBuffer buffer = textArea.getBuffer();
-
- int lineStart = buffer.getLineStartOffset(physicalLine);
- int x1, x2;
-
- if(s instanceof Selection.Rect)
- {
- start -= lineStart;
- end -= lineStart;
-
- Selection.Rect rect = (Selection.Rect)s;
- int _start = rect.getStartColumn(buffer);
- int _end = rect.getEndColumn(buffer);
-
- int lineLen = buffer.getLineLength(physicalLine);
-
- int[] total = new int[1];
-
- int rectStart = buffer.getOffsetOfVirtualColumn(
- physicalLine,_start,total);
- if(rectStart == -1)
- {
- x1 = (_start - total[0]) * textArea.charWidth;
- rectStart = lineLen;
- }
- else
- x1 = 0;
-
- int rectEnd = buffer.getOffsetOfVirtualColumn(
- physicalLine,_end,total);
- if(rectEnd == -1)
- {
- x2 = (_end - total[0]) * textArea.charWidth;
- rectEnd = lineLen;
- }
- else
- x2 = 0;
-
- if(end <= rectStart || start > rectEnd)
- return null;
-
- x1 = rectStart < start ? 0
- : x1 + textArea.offsetToXY(physicalLine,
- rectStart).x;
- x2 = rectEnd > end ? textArea.getWidth()
- : x2 + textArea.offsetToXY(physicalLine,
- rectEnd).x;
- }
- else if(selStartScreenLine == selEndScreenLine
- && selStartScreenLine != -1)
- {
- x1 = textArea.offsetToXY(physicalLine,
- s.start - lineStart).x;
- x2 = textArea.offsetToXY(physicalLine,
- s.end - lineStart).x;
- }
- else if(screenLine == selStartScreenLine)
- {
- x1 = textArea.offsetToXY(physicalLine,
- s.start - lineStart).x;
- x2 = textArea.getWidth();
- }
- else if(screenLine == selEndScreenLine)
- {
- x1 = 0;
- x2 = textArea.offsetToXY(physicalLine,
- s.end - lineStart).x;
- }
- else
- {
- x1 = 0;
- x2 = textArea.getWidth();
- }
-
- if(x1 < 0)
- x1 = 0;
- if(x2 < 0)
- x2 = 0;
-
- if(x1 == x2)
- x2++;
-
- return new int[] { x1, x2 };
- } //}}}
-
- //{{{ insideSelection() method
- /**
- * Returns if the given point is inside a selection.
- * Used by drag and drop code in MouseHandler below.
- */
- boolean insideSelection(int x, int y)
- {
- int offset = textArea.xyToOffset(x,y);
-
- Selection s = textArea.getSelectionAtOffset(offset);
- if(s == null)
- return false;
-
- int screenLine = textArea.getScreenLineOfOffset(offset);
- if(screenLine == -1)
- return false;
-
- int[] selectionStartAndEnd = getSelectionStartAndEnd(
- screenLine,textArea.getLineOfOffset(offset),s);
- if(selectionStartAndEnd == null)
- return false;
-
- return x >= selectionStartAndEnd[0]
- && x <= selectionStartAndEnd[1];
- } //}}}
-
- private TextArea textArea;
-}
+/*
+ * SelectionManager.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+import org.gjt.sp.jedit.buffer.*;
+//}}}
+
+class SelectionManager
+{
+ // this is package-private so that the painter can use it without
+ // having to call getSelection() (which involves an array copy)
+ List<Selection> selection;
+
+ //{{{ SelectionManager constructor
+ SelectionManager(TextArea textArea)
+ {
+ this.textArea = textArea;
+ selection = new ArrayList<Selection>();
+ } //}}}
+
+ //{{{ getSelectionCount() method
+ /**
+ * Returns the number of selections. This can be used to test
+ * for the existence of selections.
+ */
+ int getSelectionCount()
+ {
+ return selection.size();
+ } //}}}
+
+ //{{{ getSelection() method
+ /**
+ * Returns the current selection.
+ * @since jEdit 3.2pre1
+ */
+ public Selection[] getSelection()
+ {
+ return selection.toArray(
+ new Selection[selection.size()]);
+ } //}}}
+
+ //{{{ setSelection() method
+ /**
+ * Sets the selection. Nested and overlapping selections are merged
+ * where possible.
+ */
+ void setSelection(Selection[] selection)
+ {
+ this.selection.clear();
+ addToSelection(selection);
+ } //}}}
+
+ //{{{ addToSelection() method
+ /**
+ * Adds to the selection. Nested and overlapping selections are merged
+ * where possible. Null elements of the array are ignored.
+ * @param selection The new selection
+ * since jEdit 3.2pre1
+ */
+ void addToSelection(Selection[] selection)
+ {
+ if(selection != null)
+ {
+ for(int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ if(s != null)
+ addToSelection(s);
+ }
+ }
+ } //}}}
+
+ //{{{ addToSelection() method
+ void addToSelection(Selection addMe)
+ {
+ if(addMe.start > addMe.end)
+ {
+ throw new IllegalArgumentException(addMe.start
+ + " > " + addMe.end);
+ }
+ else if(addMe.start == addMe.end)
+ {
+ if(addMe instanceof Selection.Range)
+ return;
+ else if(addMe instanceof Selection.Rect)
+ {
+ if(((Selection.Rect)addMe).extraEndVirt == 0)
+ return;
+ }
+ }
+
+ Iterator<Selection> iter = selection.iterator();
+ while(iter.hasNext())
+ {
+ // try and merge existing selections one by
+ // one with the new selection
+ Selection s = iter.next();
+ if(s.overlaps(addMe))
+ {
+ addMe.start = Math.min(s.start,addMe.start);
+ addMe.end = Math.max(s.end,addMe.end);
+ iter.remove();
+ }
+ }
+
+ addMe.startLine = textArea.getLineOfOffset(addMe.start);
+ addMe.endLine = textArea.getLineOfOffset(addMe.end);
+
+ boolean added = false;
+
+ for(int i = 0; i < selection.size(); i++)
+ {
+ Selection s = selection.get(i);
+ if(addMe.start < s.start)
+ {
+ selection.add(i,addMe);
+ added = true;
+ break;
+ }
+ }
+
+ if(!added)
+ selection.add(addMe);
+
+ textArea.invalidateLineRange(addMe.startLine,addMe.endLine);
+ } //}}}
+
+ //{{{ setSelection() method
+ /**
+ * Sets the selection. Nested and overlapping selections are merged
+ * where possible.
+ */
+ void setSelection(Selection selection)
+ {
+ this.selection.clear();
+
+ if(selection != null)
+ addToSelection(selection);
+ } //}}}
+
+ //{{{ getSelectionAtOffset() method
+ /**
+ * Returns the selection containing the specific offset, or <code>null</code>
+ * if there is no selection at that offset.
+ * @param offset The offset
+ * @since jEdit 3.2pre1
+ */
+ Selection getSelectionAtOffset(int offset)
+ {
+ if(selection != null)
+ {
+ for (Selection s : selection)
+ {
+ if(offset >= s.start && offset <= s.end)
+ return s;
+ }
+ }
+
+ return null;
+ } //}}}
+
+ //{{{ removeFromSelection() method
+ /**
+ * Deactivates the specified selection.
+ * @param sel The selection
+ */
+ void removeFromSelection(Selection sel)
+ {
+ selection.remove(sel);
+ } //}}}
+
+ //{{{ resizeSelection() method
+ /**
+ * Resizes the selection at the specified offset, or creates a new
+ * one if there is no selection at the specified offset. This is a
+ * utility method that is mainly useful in the mouse event handler
+ * because it handles the case of end being before offset gracefully
+ * (unlike the rest of the selection API).
+ * @param offset The offset
+ * @param end The new selection end
+ * @param extraEndVirt Only for rectangular selections - specifies how
+ * far it extends into virtual space.
+ * @param rect Make the selection rectangular?
+ */
+ void resizeSelection(int offset, int end, int extraEndVirt,
+ boolean rect)
+ {
+ boolean reversed = false;
+ if(end < offset)
+ {
+ int tmp = offset;
+ offset = end;
+ end = tmp;
+ reversed = true;
+ }
+
+ Selection newSel;
+ if(rect)
+ {
+ Selection.Rect rectSel = new Selection.Rect(offset,end);
+ if(reversed)
+ rectSel.extraStartVirt = extraEndVirt;
+ else
+ rectSel.extraEndVirt = extraEndVirt;
+ newSel = rectSel;
+ }
+ else
+ newSel = new Selection.Range(offset,end);
+
+ addToSelection(newSel);
+ } //}}}
+
+ //{{{ getSelectedLines() method
+ /**
+ * Returns a sorted array of line numbers on which a selection or
+ * selections are present.<p>
+ *
+ * This method is the most convenient way to iterate through selected
+ * lines in a buffer. The line numbers in the array returned by this
+ * method can be passed as a parameter to such methods as
+ * {@link org.gjt.sp.jedit.Buffer#getLineText(int)}.
+ */
+ int[] getSelectedLines()
+ {
+
+ Set<Integer> set = new TreeSet<Integer>();
+ for (Selection s : selection)
+ {
+ int endLine =
+ s.end == textArea.getLineStartOffset(s.endLine)
+ ? s.endLine - 1
+ : s.endLine;
+
+ for(int j = s.startLine; j <= endLine; j++)
+ {
+ set.add(j);
+ }
+ }
+
+
+ int[] returnValue = new int[set.size()];
+ int i = 0;
+ for (Integer line : set)
+ returnValue[i++] = line;
+
+ return returnValue;
+ } //}}}
+
+ //{{{ invertSelection() method
+ void invertSelection()
+ {
+ Selection[] newSelection = new Selection[selection.size() + 1];
+ int lastOffset = 0;
+ for(int i = 0; i < selection.size(); i++)
+ {
+ Selection s = selection.get(i);
+ newSelection[i] = new Selection.Range(lastOffset,
+ s.getStart());
+ lastOffset = s.getEnd();
+ }
+ newSelection[selection.size()] = new Selection.Range(
+ lastOffset,textArea.getBufferLength());
+ setSelection(newSelection);
+ } //}}}
+
+ //{{{ getSelectionStartEndOnLine() method
+ /**
+ * Returns the x co-ordinates of the selection start and end on the
+ * given line. May return null.
+ */
+ int[] getSelectionStartAndEnd(int screenLine, int physicalLine,
+ Selection s)
+ {
+ int start = textArea.getScreenLineStartOffset(screenLine);
+ int end = textArea.getScreenLineEndOffset(screenLine);
+
+ if(end <= s.start || start > s.end)
+ return null;
+
+ int selStartScreenLine;
+ if(textArea.displayManager.isLineVisible(s.startLine))
+ selStartScreenLine = textArea.getScreenLineOfOffset(s.start);
+ else
+ selStartScreenLine = -1;
+
+ int selEndScreenLine;
+ if(textArea.displayManager.isLineVisible(s.endLine))
+ selEndScreenLine = textArea.getScreenLineOfOffset(s.end);
+ else
+ selEndScreenLine = -1;
+
+ JEditBuffer buffer = textArea.getBuffer();
+
+ int lineStart = buffer.getLineStartOffset(physicalLine);
+ int x1, x2;
+
+ if(s instanceof Selection.Rect)
+ {
+ start -= lineStart;
+ end -= lineStart;
+
+ Selection.Rect rect = (Selection.Rect)s;
+ int _start = rect.getStartColumn(buffer);
+ int _end = rect.getEndColumn(buffer);
+
+ int lineLen = buffer.getLineLength(physicalLine);
+
+ int[] total = new int[1];
+
+ int rectStart = buffer.getOffsetOfVirtualColumn(
+ physicalLine,_start,total);
+ if(rectStart == -1)
+ {
+ x1 = (_start - total[0]) * textArea.charWidth;
+ rectStart = lineLen;
+ }
+ else
+ x1 = 0;
+
+ int rectEnd = buffer.getOffsetOfVirtualColumn(
+ physicalLine,_end,total);
+ if(rectEnd == -1)
+ {
+ x2 = (_end - total[0]) * textArea.charWidth;
+ rectEnd = lineLen;
+ }
+ else
+ x2 = 0;
+
+ if(end <= rectStart || start > rectEnd)
+ return null;
+
+ x1 = rectStart < start ? 0
+ : x1 + textArea.offsetToXY(physicalLine,
+ rectStart).x;
+ x2 = rectEnd > end ? textArea.getWidth()
+ : x2 + textArea.offsetToXY(physicalLine,
+ rectEnd).x;
+ }
+ else if(selStartScreenLine == selEndScreenLine
+ && selStartScreenLine != -1)
+ {
+ x1 = textArea.offsetToXY(physicalLine,
+ s.start - lineStart).x;
+ x2 = textArea.offsetToXY(physicalLine,
+ s.end - lineStart).x;
+ }
+ else if(screenLine == selStartScreenLine)
+ {
+ x1 = textArea.offsetToXY(physicalLine,
+ s.start - lineStart).x;
+ x2 = textArea.getWidth();
+ }
+ else if(screenLine == selEndScreenLine)
+ {
+ x1 = 0;
+ x2 = textArea.offsetToXY(physicalLine,
+ s.end - lineStart).x;
+ }
+ else
+ {
+ x1 = 0;
+ x2 = textArea.getWidth();
+ }
+
+ if(x1 < 0)
+ x1 = 0;
+ if(x2 < 0)
+ x2 = 0;
+
+ if(x1 == x2)
+ x2++;
+
+ return new int[] { x1, x2 };
+ } //}}}
+
+ //{{{ insideSelection() method
+ /**
+ * Returns if the given point is inside a selection.
+ * Used by drag and drop code in MouseHandler below.
+ */
+ boolean insideSelection(int x, int y)
+ {
+ int offset = textArea.xyToOffset(x,y);
+
+ Selection s = textArea.getSelectionAtOffset(offset);
+ if(s == null)
+ return false;
+
+ int screenLine = textArea.getScreenLineOfOffset(offset);
+ if(screenLine == -1)
+ return false;
+
+ int[] selectionStartAndEnd = getSelectionStartAndEnd(
+ screenLine,textArea.getLineOfOffset(offset),s);
+ if(selectionStartAndEnd == null)
+ return false;
+
+ return x >= selectionStartAndEnd[0]
+ && x <= selectionStartAndEnd[1];
+ } //}}}
+
+ private final TextArea textArea;
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/ShapedFoldPainter.java b/jEdit/org/gjt/sp/jedit/textarea/ShapedFoldPainter.java
index 5851da1..4f7ce68 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/ShapedFoldPainter.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/ShapedFoldPainter.java
@@ -30,8 +30,8 @@ import org.gjt.sp.jedit.buffer.JEditBuffer;
/**
* Fold Painter
*/
-public abstract class ShapedFoldPainter implements FoldPainter {
-
+public abstract class ShapedFoldPainter implements FoldPainter
+{
// {{{ paintFoldEnd()
public void paintFoldEnd(Gutter gutter, Graphics2D gfx, int screenLine,
int physicalLine, int y, int lineHeight, JEditBuffer buffer)
@@ -78,6 +78,6 @@ public abstract class ShapedFoldPainter implements FoldPainter {
}
}// }}}
- abstract protected void paintFoldShape(Graphics2D gfx, int top, int bottom);
+ protected abstract void paintFoldShape(Graphics2D gfx, int top, int bottom);
} // }}}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/StandaloneTextArea.java b/jEdit/org/gjt/sp/jedit/textarea/StandaloneTextArea.java
index b44ebff..72e32f6 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/StandaloneTextArea.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/StandaloneTextArea.java
@@ -44,6 +44,9 @@ import org.gjt.sp.jedit.IPropertyManager;
import org.gjt.sp.jedit.JEditBeanShellAction;
import org.gjt.sp.jedit.Mode;
import org.gjt.sp.jedit.JEditActionSet;
+import org.gjt.sp.jedit.datatransfer.RichJEditTextTransferableService;
+import org.gjt.sp.jedit.datatransfer.StringTransferableService;
+import org.gjt.sp.jedit.datatransfer.TransferHandler;
import org.gjt.sp.jedit.input.AbstractInputHandler;
import org.gjt.sp.jedit.buffer.DefaultFoldHandlerProvider;
import org.gjt.sp.jedit.buffer.DummyFoldHandler;
@@ -52,6 +55,7 @@ import org.gjt.sp.jedit.buffer.FoldHandler;
import org.gjt.sp.jedit.buffer.IndentFoldHandler;
import org.gjt.sp.jedit.buffer.JEditBuffer;
import org.gjt.sp.jedit.buffer.KillRing;
+import org.gjt.sp.jedit.syntax.Chunk;
import org.gjt.sp.jedit.syntax.ModeProvider;
import org.gjt.sp.jedit.syntax.ParserRuleSet;
import org.gjt.sp.jedit.syntax.SyntaxStyle;
@@ -96,7 +100,7 @@ import org.gjt.sp.util.SyntaxUtilities;
*
* @author Slava Pestov
* @author John Gellene (API documentation)
- * @version $Id: StandaloneTextArea.java 16346 2009-10-14 10:35:10Z kpouer $
+ * @version $Id: StandaloneTextArea.java 17650 2010-04-16 10:43:16Z kpouer $
*/
public class StandaloneTextArea extends TextArea
{
@@ -296,7 +300,10 @@ public class StandaloneTextArea extends TextArea
painter.setAntiAlias(new AntiAlias(getProperty("view.antiAlias")));
painter.setFractionalFontMetricsEnabled(getBooleanProperty(
"view.fracFontMetrics"));
-
+ painter.setSelectionFgColor(getColorProperty(
+ "view.selectionFgColor"));
+ painter.setSelectionFgColorEnabled(getBooleanProperty(
+ "view.selectionFg"));
String defaultFont = getProperty("view.font");
int defaultFontSize = getIntegerProperty("view.fontsize",12);
painter.setStyles(SyntaxUtilities.loadStyles(defaultFont,defaultFontSize));
@@ -343,11 +350,11 @@ public class StandaloneTextArea extends TextArea
String value = getProperty(name);
if(value == null)
return def;
- else if(value.equals("true") || value.equals("yes")
- || value.equals("on"))
+ else if("true".equals(value) || "yes".equals(value)
+ || "on".equals(value))
return true;
- else if(value.equals("false") || value.equals("no")
- || value.equals("off"))
+ else if("false".equals(value) || "no".equals(value)
+ || "off".equals(value))
return false;
else
return def;
@@ -357,16 +364,6 @@ public class StandaloneTextArea extends TextArea
/**
* Returns the value of an integer property.
* @param name The property
- */
- private int getIntegerProperty(String name)
- {
- return getIntegerProperty(name,0);
- } //}}}
-
- //{{{ getIntegerProperty() method
- /**
- * Returns the value of an integer property.
- * @param name The property
* @param def The default value
* @since jEdit 4.0pre1
*/
@@ -497,6 +494,7 @@ public class StandaloneTextArea extends TextArea
{
actionSet.initKeyBindings();
}
+ Chunk.propertiesChanged(propertyManager);
initBuffer();
initTextArea();
super.propertiesChanged();
@@ -664,7 +662,14 @@ public class StandaloneTextArea extends TextArea
}
} //}}}
+ static
+ {
+ TransferHandler.getInstance().registerTransferableService(new RichJEditTextTransferableService());
+ TransferHandler.getInstance().registerTransferableService(new StringTransferableService());
+ }
+
//{{{ main() method
+
public static void main(String[] args)
{
JFrame frame = new JFrame();
diff --git a/jEdit/org/gjt/sp/jedit/textarea/StatusListener.java b/jEdit/org/gjt/sp/jedit/textarea/StatusListener.java
index bc6c289..795c934 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/StatusListener.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/StatusListener.java
@@ -1,40 +1,40 @@
-/*
- * StatusListener.java - Text area scroll listener
- * Copyright (C) 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-
-/**
- * Fired when the text area needs to display a status message.
- * @author Slava Pestov
- * @version $Id: StatusListener.java 15577 2009-06-25 05:55:16Z ezust $
- * @since jEdit 4.3pre2
- */
-public interface StatusListener extends java.util.EventListener
-{
- int OVERWRITE_CHANGED = 0;
- int MULTI_SELECT_CHANGED = 1;
- int RECT_SELECT_CHANGED = 2;
-
- void statusChanged(TextArea textArea, int flag, boolean value);
-
- void bracketSelected(TextArea textArea, int line, String text);
-
- void narrowActive(TextArea textArea);
-}
+/*
+ * StatusListener.java - Text area scroll listener
+ * Copyright (C) 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+
+/**
+ * Fired when the text area needs to display a status message.
+ * @author Slava Pestov
+ * @version $Id: StatusListener.java 15577 2009-06-25 05:55:16Z ezust $
+ * @since jEdit 4.3pre2
+ */
+public interface StatusListener extends java.util.EventListener
+{
+ int OVERWRITE_CHANGED = 0;
+ int MULTI_SELECT_CHANGED = 1;
+ int RECT_SELECT_CHANGED = 2;
+
+ void statusChanged(TextArea textArea, int flag, boolean value);
+
+ void bracketSelected(TextArea textArea, int line, String text);
+
+ void narrowActive(TextArea textArea);
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/StructureMatcher.java b/jEdit/org/gjt/sp/jedit/textarea/StructureMatcher.java
index ef4cb43..2d2b542 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/StructureMatcher.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/StructureMatcher.java
@@ -1,239 +1,239 @@
-/*
- * StructureMatcher.java - Abstract interface for bracket matching, etc.
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import java.awt.*;
-import org.gjt.sp.jedit.TextUtilities;
-//}}}
-
-/**
- * An interface for matching parts of a source file's stucture. The default
- * implementation matches brackets. The XML plugin provides an implementation
- * for matching XML tags.
- *
- * @author Slava Pestov
- * @version $Id: StructureMatcher.java 15570 2009-06-25 00:43:57Z ezust $
- * @since jEdit 4.2pre3
- */
-public interface StructureMatcher
-{
- //{{{ getMatch() method
- /**
- * Returns the element matching the one at the given text area's
- * caret position, or null.
- * @since jEdit 4.2pre3
- */
- Match getMatch(TextArea textArea);
- //}}}
-
- //{{{ selectMatch() method
- /**
- * Selects from the caret to the matching structure element (if there is
- * one, otherwise the behavior of this method is undefined).
- * @since jEdit 4.2pre3
- */
- void selectMatch(TextArea textArea);
- //}}}
-
- //{{{ BracketMatcher class
- static class BracketMatcher implements StructureMatcher
- {
- public Match getMatch(TextArea textArea)
- {
- int offset = textArea.getCaretPosition()
- - textArea.getLineStartOffset(
- textArea.getCaretLine());
-
- if(offset != 0)
- {
- int bracketOffset = TextUtilities.findMatchingBracket(
- textArea.getBuffer(),
- textArea.getCaretLine(),
- offset - 1);
- if(bracketOffset != -1)
- {
- int bracketLine = textArea
- .getLineOfOffset(
- bracketOffset);
- return new Match(this,
- bracketLine,
- bracketOffset,
- bracketLine,
- bracketOffset + 1);
- }
- }
-
- return null;
- }
-
- public void selectMatch(TextArea textArea)
- {
- textArea.selectToMatchingBracket();
- }
- } //}}}
-
- //{{{ Match class
- /**
- * A structure match, denoted by a start and end position.
- * @since jEdit 4.2pre3
- */
- public static class Match
- {
- public StructureMatcher matcher;
- public int startLine;
- public int start;
- public int endLine;
- public int end;
-
- public Match() {}
-
- public Match(StructureMatcher matcher)
- {
- this.matcher = matcher;
- }
-
- public Match(StructureMatcher matcher, int startLine,
- int start, int endLine, int end)
- {
- this(matcher);
- this.startLine = startLine;
- this.start = start;
- this.endLine = endLine;
- this.end = end;
- }
- } //}}}
-
- //{{{ Highlight class
- /**
- * Paints the structure match highlight.
- */
- static class Highlight extends TextAreaExtension
- {
- Highlight(TextArea textArea)
- {
- this.textArea = textArea;
- }
-
- public void paintValidLine(Graphics2D gfx, int screenLine,
- int physicalLine, int start, int end, int y)
- {
- if(!textArea.getPainter().isStructureHighlightEnabled())
- return;
-
- Match match = textArea.getStructureMatch();
- if(match != null)
- {
- paintHighlight(gfx,screenLine,
- start,end,y,match);
- }
- }
-
- private int[] getOffsets(int screenLine, Match match)
- {
- int x1, x2;
-
- int matchStartLine = textArea.getScreenLineOfOffset(
- match.start);
- int matchEndLine = textArea.getScreenLineOfOffset(
- match.end);
-
- if(matchStartLine == screenLine)
- {
- x1 = match.start;
- }
- else
- {
- x1 = textArea.getScreenLineStartOffset(
- screenLine);
- }
-
- if(matchEndLine == screenLine)
- {
- x2 = match.end;
- }
- else
- {
- x2 = textArea.getScreenLineEndOffset(
- screenLine) - 1;
- }
-
- return new int[] {
- textArea.offsetToXY(x1).x,
- textArea.offsetToXY(x2).x
- };
- }
-
- private void paintHighlight(Graphics gfx, int screenLine,
- int start, int end, int y,
- Match match)
- {
- if(!textArea.isStructureHighlightVisible())
- return;
-
- if(match.start >= end || match.end < start)
- {
- return;
- }
-
- int matchStartLine = textArea.getScreenLineOfOffset(
- match.start);
- int matchEndLine = textArea.getScreenLineOfOffset(
- match.end);
-
- FontMetrics fm = textArea.getPainter().getFontMetrics();
- int height = fm.getHeight();
-
- int[] offsets = getOffsets(screenLine,match);
- int x1 = offsets[0];
- int x2 = offsets[1];
-
- gfx.setColor(textArea.getPainter().getStructureHighlightColor());
-
- gfx.drawLine(x1,y,x1,y + height - 1);
- gfx.drawLine(x2,y,x2,y + height - 1);
-
- if(matchStartLine == screenLine || screenLine == 0)
- gfx.drawLine(x1,y,x2,y);
- else
- {
- offsets = getOffsets(screenLine - 1,match);
- int prevX1 = offsets[0];
- int prevX2 = offsets[1];
-
- gfx.drawLine(Math.min(x1,prevX1),y,
- Math.max(x1,prevX1),y);
- gfx.drawLine(Math.min(x2,prevX2),y,
- Math.max(x2,prevX2),y);
- }
-
- if(matchEndLine == screenLine)
- {
- gfx.drawLine(x1,y + height - 1,
- x2,y + height - 1);
- }
- }
-
- private TextArea textArea;
- } //}}}
-}
+/*
+ * StructureMatcher.java - Abstract interface for bracket matching, etc.
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import java.awt.*;
+import org.gjt.sp.jedit.TextUtilities;
+//}}}
+
+/**
+ * An interface for matching parts of a source file's stucture. The default
+ * implementation matches brackets. The XML plugin provides an implementation
+ * for matching XML tags.
+ *
+ * @author Slava Pestov
+ * @version $Id: StructureMatcher.java 15570 2009-06-25 00:43:57Z ezust $
+ * @since jEdit 4.2pre3
+ */
+public interface StructureMatcher
+{
+ //{{{ getMatch() method
+ /**
+ * Returns the element matching the one at the given text area's
+ * caret position, or null.
+ * @since jEdit 4.2pre3
+ */
+ Match getMatch(TextArea textArea);
+ //}}}
+
+ //{{{ selectMatch() method
+ /**
+ * Selects from the caret to the matching structure element (if there is
+ * one, otherwise the behavior of this method is undefined).
+ * @since jEdit 4.2pre3
+ */
+ void selectMatch(TextArea textArea);
+ //}}}
+
+ //{{{ BracketMatcher class
+ static class BracketMatcher implements StructureMatcher
+ {
+ public Match getMatch(TextArea textArea)
+ {
+ int offset = textArea.getCaretPosition()
+ - textArea.getLineStartOffset(
+ textArea.getCaretLine());
+
+ if(offset != 0)
+ {
+ int bracketOffset = TextUtilities.findMatchingBracket(
+ textArea.getBuffer(),
+ textArea.getCaretLine(),
+ offset - 1);
+ if(bracketOffset != -1)
+ {
+ int bracketLine = textArea
+ .getLineOfOffset(
+ bracketOffset);
+ return new Match(this,
+ bracketLine,
+ bracketOffset,
+ bracketLine,
+ bracketOffset + 1);
+ }
+ }
+
+ return null;
+ }
+
+ public void selectMatch(TextArea textArea)
+ {
+ textArea.selectToMatchingBracket();
+ }
+ } //}}}
+
+ //{{{ Match class
+ /**
+ * A structure match, denoted by a start and end position.
+ * @since jEdit 4.2pre3
+ */
+ public static class Match
+ {
+ public StructureMatcher matcher;
+ public int startLine;
+ public int start;
+ public int endLine;
+ public int end;
+
+ public Match() {}
+
+ public Match(StructureMatcher matcher)
+ {
+ this.matcher = matcher;
+ }
+
+ public Match(StructureMatcher matcher, int startLine,
+ int start, int endLine, int end)
+ {
+ this(matcher);
+ this.startLine = startLine;
+ this.start = start;
+ this.endLine = endLine;
+ this.end = end;
+ }
+ } //}}}
+
+ //{{{ Highlight class
+ /**
+ * Paints the structure match highlight.
+ */
+ static class Highlight extends TextAreaExtension
+ {
+ Highlight(TextArea textArea)
+ {
+ this.textArea = textArea;
+ }
+
+ public void paintValidLine(Graphics2D gfx, int screenLine,
+ int physicalLine, int start, int end, int y)
+ {
+ if(!textArea.getPainter().isStructureHighlightEnabled())
+ return;
+
+ Match match = textArea.getStructureMatch();
+ if(match != null)
+ {
+ paintHighlight(gfx,screenLine,
+ start,end,y,match);
+ }
+ }
+
+ private int[] getOffsets(int screenLine, Match match)
+ {
+ int x1, x2;
+
+ int matchStartLine = textArea.getScreenLineOfOffset(
+ match.start);
+ int matchEndLine = textArea.getScreenLineOfOffset(
+ match.end);
+
+ if(matchStartLine == screenLine)
+ {
+ x1 = match.start;
+ }
+ else
+ {
+ x1 = textArea.getScreenLineStartOffset(
+ screenLine);
+ }
+
+ if(matchEndLine == screenLine)
+ {
+ x2 = match.end;
+ }
+ else
+ {
+ x2 = textArea.getScreenLineEndOffset(
+ screenLine) - 1;
+ }
+
+ return new int[] {
+ textArea.offsetToXY(x1).x,
+ textArea.offsetToXY(x2).x
+ };
+ }
+
+ private void paintHighlight(Graphics gfx, int screenLine,
+ int start, int end, int y,
+ Match match)
+ {
+ if(!textArea.isStructureHighlightVisible())
+ return;
+
+ if(match.start >= end || match.end < start)
+ {
+ return;
+ }
+
+ int matchStartLine = textArea.getScreenLineOfOffset(
+ match.start);
+ int matchEndLine = textArea.getScreenLineOfOffset(
+ match.end);
+
+ FontMetrics fm = textArea.getPainter().getFontMetrics();
+ int height = fm.getHeight();
+
+ int[] offsets = getOffsets(screenLine,match);
+ int x1 = offsets[0];
+ int x2 = offsets[1];
+
+ gfx.setColor(textArea.getPainter().getStructureHighlightColor());
+
+ gfx.drawLine(x1,y,x1,y + height - 1);
+ gfx.drawLine(x2,y,x2,y + height - 1);
+
+ if(matchStartLine == screenLine || screenLine == 0)
+ gfx.drawLine(x1,y,x2,y);
+ else
+ {
+ offsets = getOffsets(screenLine - 1,match);
+ int prevX1 = offsets[0];
+ int prevX2 = offsets[1];
+
+ gfx.drawLine(Math.min(x1,prevX1),y,
+ Math.max(x1,prevX1),y);
+ gfx.drawLine(Math.min(x2,prevX2),y,
+ Math.max(x2,prevX2),y);
+ }
+
+ if(matchEndLine == screenLine)
+ {
+ gfx.drawLine(x1,y + height - 1,
+ x2,y + height - 1);
+ }
+ }
+
+ private TextArea textArea;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/TextArea.java b/jEdit/org/gjt/sp/jedit/textarea/TextArea.java
index 390f5bb..cdc3348 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/TextArea.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/TextArea.java
@@ -1,6347 +1,6351 @@
-/*
- * TextArea.java - Abstract jEdit Text Area component
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2005 Slava Pestov
- * Portions copyright (C) 2000 Ollie Rutherfurd
- * Portions copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-
-import java.util.EventObject;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.TooManyListenersException;
-
-import javax.swing.*;
-import javax.swing.event.*;
-import java.awt.event.*;
-import java.awt.*;
-import java.awt.im.InputMethodRequests;
-
-import javax.swing.plaf.metal.MetalLookAndFeel;
-import javax.swing.text.Segment;
-
-import org.gjt.sp.jedit.Debug;
-import org.gjt.sp.jedit.IPropertyManager;
-import org.gjt.sp.jedit.JEditActionContext;
-import org.gjt.sp.jedit.JEditActionSet;
-import org.gjt.sp.jedit.JEditBeanShellAction;
-import org.gjt.sp.jedit.TextUtilities;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.input.AbstractInputHandler;
-import org.gjt.sp.jedit.input.DefaultInputHandlerProvider;
-import org.gjt.sp.jedit.input.InputHandlerProvider;
-import org.gjt.sp.jedit.input.TextAreaInputHandler;
-import org.gjt.sp.jedit.syntax.Chunk;
-import org.gjt.sp.jedit.syntax.DefaultTokenHandler;
-import org.gjt.sp.jedit.syntax.Token;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.StandardUtilities;
-
-/** Abstract TextArea component.
- *
- * The concrete instance used by jEdit itself is called the JEditTextArea.
- *
- * This class uses a minimal set of jEdit APIs because it is the base class of the
- * JEditEmbeddedTextArea and StandaloneTextArea, so it needs to be embeddable and separable.
- *
- * @author Slava Pestov
- * @author kpouer (rafactoring into standalone text area)
- * @version $Id: TextArea.java 17580 2010-04-03 16:10:08Z Vampire0 $
- */
-public abstract class TextArea extends JComponent
-{
- //{{{ TextArea constructor
- /**
- * Creates a new JEditTextArea.
- * @param propertyManager the property manager that contains informations like shortcut bindings
- * @param inputHandlerProvider the inputHandlerProvider
- */
- protected TextArea(IPropertyManager propertyManager, InputHandlerProvider inputHandlerProvider)
- {
- this.inputHandlerProvider = inputHandlerProvider;
- enableEvents(AWTEvent.FOCUS_EVENT_MASK | AWTEvent.KEY_EVENT_MASK);
-
- //{{{ Initialize some misc. stuff
- selectionManager = new SelectionManager(this);
- chunkCache = new ChunkCache(this);
- painter = new TextAreaPainter(this);
- gutter = new Gutter(this);
- gutter.setMouseActionsProvider(new MouseActions(propertyManager, "gutter"));
- listenerList = new EventListenerList();
- caretEvent = new MutableCaretEvent();
- blink = true;
- offsetXY = new Point();
- structureMatchers = new LinkedList<StructureMatcher>();
- structureMatchers.add(new StructureMatcher.BracketMatcher());
- //}}}
-
- //{{{ Initialize the GUI
- setLayout(new ScrollLayout());
- add(ScrollLayout.CENTER,painter);
- add(ScrollLayout.LEFT,gutter);
-
- // some plugins add stuff in a "right-hand" gutter
- verticalBox = new Box(BoxLayout.X_AXIS);
- verticalBox.add(vertical = new JScrollBar(Adjustable.VERTICAL));
- vertical.setRequestFocusEnabled(false);
- add(ScrollLayout.RIGHT,verticalBox);
- add(ScrollLayout.BOTTOM,
- horizontal = new JScrollBar(Adjustable.HORIZONTAL));
- horizontal.setRequestFocusEnabled(false);
-
- horizontal.setValues(0,0,0,0);
- //}}}
-
- //{{{ this ensures that the text area's look is slightly
- // more consistent with the rest of the metal l&f.
- // while it depends on not-so-well-documented portions
- // of Swing, it only affects appearance, so future
- // breakage shouldn't matter
- if(UIManager.getLookAndFeel() instanceof MetalLookAndFeel)
- {
- setBorder(new TextAreaBorder());
- vertical.putClientProperty("JScrollBar.isFreeStanding",
- Boolean.FALSE);
- horizontal.putClientProperty("JScrollBar.isFreeStanding",
- Boolean.FALSE);
- //horizontal.setBorder(null);
- }
- //}}}
-
- //{{{ Add some event listeners
- vertical.addAdjustmentListener(new AdjustHandler());
- horizontal.addAdjustmentListener(new AdjustHandler());
-
-
- addFocusListener(new FocusHandler());
- addMouseWheelListener(new MouseWheelHandler());
-
- //}}}
-
- // This doesn't seem very correct, but it fixes a problem
- // when setting the initial caret position for a buffer
- // (eg, from the recent file list)
- focusedComponent = this;
-
- popupEnabled = true;
- } //}}}
-
- //{{{ getFoldPainter() method
- public FoldPainter getFoldPainter()
- {
- return new TriangleFoldPainter();
- } //}}}
-
- //{{{ initInputHandler() method
- /**
- * Creates an actionContext and initializes the input
- * handler for this textarea. Called when creating
- * a standalone textarea from within jEdit.
- */
- public void initInputHandler()
- {
- actionContext = new JEditActionContext<JEditBeanShellAction, JEditActionSet<JEditBeanShellAction>>()
- {
- @Override
- public void invokeAction(EventObject evt, JEditBeanShellAction action)
- {
- action.invoke(TextArea.this);
- }
- };
-
- setMouseHandler(new TextAreaMouseHandler(this));
- inputHandlerProvider = new DefaultInputHandlerProvider(new TextAreaInputHandler(this)
- {
- @Override
- protected JEditBeanShellAction getAction(String action)
- {
- return actionContext.getAction(action);
- }
- });
- } //}}}
-
- //{{{ getActionContext() method
- public JEditActionContext<JEditBeanShellAction,JEditActionSet<JEditBeanShellAction>> getActionContext()
- {
- return actionContext;
- } //}}}
-
- //{{{ setMouseHandler() method
- public void setMouseHandler(MouseInputAdapter mouseInputAdapter)
- {
- mouseHandler = mouseInputAdapter;
- painter.addMouseListener(mouseHandler);
- painter.addMouseMotionListener(mouseHandler);
- } //}}}
-
- //{{{ setTransferHandler() method
- @Override
- public void setTransferHandler(TransferHandler newHandler)
- {
- super.setTransferHandler(newHandler);
- try
- {
- getDropTarget().addDropTargetListener(
- new TextAreaDropHandler(this));
- }
- catch(TooManyListenersException e)
- {
- Log.log(Log.ERROR,this,e);
- }
- } //}}}
-
- //{{{ toString() method
- @Override
- public String toString()
- {
- StringBuilder builder = new StringBuilder();
- String baseVersion = super.toString();
- int len = baseVersion.length() - 1;
- builder.append(baseVersion);
- builder.setLength(len); // chop off the last ]
- builder.append(",caret=").append(caret);
- builder.append(",caretLine=").append(caretLine);
- builder.append(",caretScreenLine=").append(caretScreenLine);
- builder.append(",electricScroll=").append(electricScroll);
- builder.append(",horizontalOffset=").append(horizontalOffset);
- builder.append(",magicCaret=").append(magicCaret);
- builder.append(",offsetXY=").append(offsetXY.toString());
- builder.append(",oldCaretLine=").append(oldCaretLine);
- builder.append(",screenLastLine=").append(screenLastLine);
- builder.append(",visibleLines=").append(visibleLines);
- builder.append(",firstPhysicalLine=").append(getFirstPhysicalLine());
- builder.append(",physLastLine=").append(physLastLine).append("]");
- return builder.toString();
- } //}}}
-
- //{{{ dispose() method
- /**
- * Plugins and macros should not call this method.
- * @since jEdit 4.2pre1
- */
- public void dispose()
- {
- DisplayManager.textAreaDisposed(this);
- gutter.dispose();
- } //}}}
-
- //{{{ getInputHandler() method
- /**
- * @since jEdit 4.3pre1
- */
- public AbstractInputHandler getInputHandler()
- {
-
- return inputHandlerProvider.getInputHandler();
- } //}}}
-
- //{{{ getPainter() method
- /**
- * Returns the object responsible for painting this text area.
- */
- public final TextAreaPainter getPainter()
- {
- return painter;
- } //}}}
-
- //{{{ getGutter() method
- /**
- * Returns the gutter to the left of the text area or null if the gutter
- * is disabled
- */
- public final Gutter getGutter()
- {
- return gutter;
- } //}}}
-
- //{{{ getDisplayManager() method
- /**
- * @return the display manager used by this text area.
- * @since jEdit 4.2pre1
- */
- public DisplayManager getDisplayManager()
- {
- return displayManager;
- } //}}}
-
- //{{{ isCaretBlinkEnabled() method
- /**
- * @return true if the caret is blinking, false otherwise.
- */
- public final boolean isCaretBlinkEnabled()
- {
- return caretBlinks;
- } //}}}
-
- //{{{ setCaretBlinkEnabled() method
- /**
- * Toggles caret blinking.
- * @param caretBlinks True if the caret should blink, false otherwise
- */
- public void setCaretBlinkEnabled(boolean caretBlinks)
- {
- this.caretBlinks = caretBlinks;
- if(!caretBlinks)
- blink = false;
-
- if(buffer != null)
- invalidateLine(caretLine);
- } //}}}
-
- //{{{ getElectricScroll() method
-
- /**
- * @return the minimum distance (in number of lines)
- * from the caret to the nearest edge of the screen
- * (top or bottom edge).
- */
- public final int getElectricScroll()
- {
- return electricScroll;
- } //}}}
-
- //{{{ setElectricScroll() method
- /**
- * Sets the number of lines from the top and bottom of the text
- * area that are always visible
- * @param electricScroll The number of lines always visible from
- * the top or bottom
- */
- public final void setElectricScroll(int electricScroll)
- {
- this.electricScroll = electricScroll;
- } //}}}
-
- //{{{ isQuickCopyEnabled() method
- /**
- * Returns if clicking the middle mouse button pastes the most
- * recent selection (% register), and if Control-dragging inserts
- * the selection at the caret.
- */
- public final boolean isQuickCopyEnabled()
- {
- return quickCopy;
- } //}}}
-
- //{{{ setQuickCopyEnabled() method
- /**
- * Sets if clicking the middle mouse button pastes the most
- * recent selection (% register), and if Control-dragging inserts
- * the selection at the caret.
- * @param quickCopy A boolean flag
- */
- public final void setQuickCopyEnabled(boolean quickCopy)
- {
- this.quickCopy = quickCopy;
- } //}}}
-
- //{{{ getBuffer() method
- /**
- * Returns the buffer this text area is editing.
- * @since jedit 4.3pre3
- *
- * Prior to 4.3pre3, this function returned a "Buffer" type.
- * If this causes your code to break, try calling view.getBuffer() instead of
- * view.getTextArea().getBuffer().
- *
- */
- public final JEditBuffer getBuffer()
- {
- return buffer;
- } //}}}
-
- //{{{ setBuffer() method
- /**
- * Sets the buffer this text area is editing.
- * If you don't run a standalone textarea in jEdit please do not call this method -
- * use {@link org.gjt.sp.jedit.EditPane#setBuffer(org.gjt.sp.jedit.Buffer)} instead.
- * @param buffer The buffer
- */
- public void setBuffer(JEditBuffer buffer)
- {
- if(this.buffer == buffer)
- return;
-
- try
- {
- bufferChanging = true;
-
- if(this.buffer != null)
- {
- // dubious?
- //setFirstLine(0);
-
- if(!this.buffer.isLoading())
- selectNone();
- caretLine = caret = caretScreenLine = 0;
- match = null;
- }
- boolean inCompoundEdit = false;
- if (this.buffer != null)
- inCompoundEdit = this.buffer.insideCompoundEdit();
- if (inCompoundEdit)
- this.buffer.endCompoundEdit();
- this.buffer = buffer;
- if (inCompoundEdit)
- this.buffer.beginCompoundEdit();
-
- chunkCache.setBuffer(buffer);
- gutter.setBuffer(buffer);
- propertiesChanged();
-
- if(displayManager != null)
- {
- displayManager.release();
- }
-
- displayManager = DisplayManager.getDisplayManager(
- buffer,this);
-
- displayManager.init();
-
- if(buffer.isLoading())
- updateScrollBar();
-
- repaint();
-
- fireScrollEvent(true);
- }
- finally
- {
- bufferChanging = false;
- }
- } //}}}
-
- //{{{ isEditable() method
- /**
- * Returns true if this text area is editable, false otherwise.
- */
- public final boolean isEditable()
- {
- return buffer.isEditable();
- } //}}}
-
- //{{{ isDragInProgress() method
- /**
- * Drag and drop of text in jEdit is implementing using jEdit 1.4 APIs,
- * however since jEdit must run with Java 1.3, this class only has the
- * necessary support to call a hook method via reflection. This method
- * is called by the org.gjt.sp.jedit.Java14 class to signal that
- * a drag is in progress.
- * @since jEdit 4.2pre5
- * @deprecated the org.gjt.jedit.Java14 class no longer exists.
- */
- @Deprecated
- public boolean isDragInProgress()
- {
- return dndInProgress;
- } //}}}
-
- //{{{ setDragInProgress() method
- /**
- * Drag and drop of text in jEdit is implementing using jEdit 1.4 APIs,
- * however since jEdit must run with Java 1.3, this class only has the
- * necessary support to call a hook method via reflection. This method
- * is called by the org.gjt.sp.jedit.Java14 class to signal that
- * a drag is in progress.
- * @since jEdit 4.2pre5
- * @deprecated the org.gjt.jedit.Java14 class no longer exists.
- */
- @Deprecated
- public void setDragInProgress(boolean dndInProgress)
- {
- this.dndInProgress = dndInProgress;
- } //}}}
-
- //{{{ isDragEnabled() method
- /**
- * Returns if drag and drop of text is enabled.
- * @since jEdit 4.2pre5
- */
- public boolean isDragEnabled()
- {
- return dndEnabled;
- } //}}}
-
- //{{{ setDragEnabled() method
- /**
- * Sets if drag and drop of text is enabled.
- * @since jEdit 4.2pre5
- */
- public void setDragEnabled(boolean dndEnabled)
- {
- this.dndEnabled = dndEnabled;
- } //}}}
-
- //{{{ getJoinNonWordChars() method
- /**
- * If set, double clicking will join non-word characters to form one "word".
- * @since jEdit 4.3pre2
- */
- public boolean getJoinNonWordChars()
- {
- return joinNonWordChars;
- } //}}}
-
- //{{{ setJoinNonWordChars() method
- /**
- * If set, double clicking will join non-word characters to form one "word".
- * @since jEdit 4.3pre2
- */
- public void setJoinNonWordChars(boolean joinNonWordChars)
- {
- this.joinNonWordChars = joinNonWordChars;
- } //}}}
-
- //{{{ getCtrlForRectangularSelection() method
- /**
- * If set, CTRL enables rectangular selection mode while pressed.
- * @since jEdit 4.3pre10
- */
- public boolean isCtrlForRectangularSelection()
- {
- return ctrlForRectangularSelection;
- } //}}}
-
- //{{{ setCtrlForRectangularSelection() method
- /**
- * If set, CTRL enables rectangular selection mode while pressed.
- * @since jEdit 4.3pre10
- */
- public void setCtrlForRectangularSelection(boolean ctrlForRectangularSelection)
- {
- this.ctrlForRectangularSelection = ctrlForRectangularSelection;
- } //}}}
-
- //{{{ Scrolling
-
- //{{{ getFirstLine() method
- /**
- * Returns the vertical scroll bar position.
- * @since jEdit 4.2pre1
- */
- public final int getFirstLine()
- {
- return displayManager.firstLine.scrollLine
- + displayManager.firstLine.skew;
- } //}}}
-
- //{{{ setFirstLine() method
- /**
- * Sets the vertical scroll bar position
- *
- * @param firstLine The scroll bar position
- */
- public void setFirstLine(int firstLine)
- {
- //{{{ ensure we don't have empty space at the bottom or top, etc
- int max = displayManager.getScrollLineCount() - visibleLines
- + (lastLinePartial ? 1 : 0);
- if(firstLine > max)
- firstLine = max;
- if(firstLine < 0)
- firstLine = 0;
- //}}}
-
- if(Debug.SCROLL_DEBUG)
- {
- Log.log(Log.DEBUG,this,"setFirstLine() from "
- + getFirstLine() + " to " + firstLine);
- }
-
- int oldFirstLine = getFirstLine();
- if(firstLine == oldFirstLine)
- return;
-
- displayManager.setFirstLine(oldFirstLine,firstLine);
-
- repaint();
-
- fireScrollEvent(true);
- } //}}}
-
- //{{{ getFirstPhysicalLine() method
- /**
- * Returns the first visible physical line index.
- * @since jEdit 4.0pre4
- */
- public final int getFirstPhysicalLine()
- {
- return displayManager.firstLine.physicalLine;
- } //}}}
-
- //{{{ setFirstPhysicalLine() methods
- /**
- * Sets the vertical scroll bar position.
- * @param physFirstLine The first physical line to display
- * @since jEdit 4.2pre1
- */
- public void setFirstPhysicalLine(int physFirstLine)
- {
- setFirstPhysicalLine(physFirstLine,0);
- }
-
- /**
- * Sets the vertical scroll bar position.
- * @param physFirstLine The first physical line to display
- * @param skew A local screen line delta
- * @since jEdit 4.2pre1
- */
- public void setFirstPhysicalLine(int physFirstLine, int skew)
- {
- if(Debug.SCROLL_DEBUG)
- {
- Log.log(Log.DEBUG,this,"setFirstPhysicalLine("
- + physFirstLine + ',' + skew + ')');
- }
-
- int amount = physFirstLine - displayManager.firstLine.physicalLine;
-
- displayManager.setFirstPhysicalLine(amount,skew);
-
- repaint();
-
- fireScrollEvent(true);
- } //}}}
-
- //{{{ getLastPhysicalLine() method
- /**
- * Returns the last visible physical line index.
- * @since jEdit 4.0pre4
- */
- public final int getLastPhysicalLine()
- {
- return physLastLine;
- } //}}}
-
- //{{{ getLastScreenLine() method
- /**
- * Returns the last screen line index, it is different from
- * {@link #getVisibleLines()} because the buffer can have less lines than
- * the visible lines
- * @return the last screen line index.
- * @since jEdit 4.3pre1
- */
- public int getLastScreenLine()
- {
- return screenLastLine;
- } //}}}
-
- //{{{ getVisibleLines() method
- /**
- * Returns the number of lines visible in this text area.
- * @return the number of visible lines in the textarea
- */
- public final int getVisibleLines()
- {
- return visibleLines;
- } //}}}
-
- //{{{ getHorizontalOffset() method
- /**
- * Returns the horizontal offset of drawn lines.
- */
- public final int getHorizontalOffset()
- {
- return horizontalOffset;
- } //}}}
-
- //{{{ setHorizontalOffset() method
- /**
- * Sets the horizontal offset of drawn lines. This can be used to
- * implement horizontal scrolling.
- * @param horizontalOffset offset The new horizontal offset
- */
- public void setHorizontalOffset(int horizontalOffset)
- {
- if(horizontalOffset > 0)
- horizontalOffset = 0;
-
- if(horizontalOffset == this.horizontalOffset)
- return;
-
- this.horizontalOffset = horizontalOffset;
- painter.repaint();
-
- fireScrollEvent(false);
- } //}}}
-
- //{{{ scrollUpLine() method
- /**
- * Scrolls up by one line.
- * @since jEdit 2.7pre2
- */
- public void scrollUpLine()
- {
- setFirstLine(getFirstLine() - 1);
- } //}}}
-
- //{{{ scrollUpPage() method
- /**
- * Scrolls up by one page.
- * @since jEdit 2.7pre2
- */
- public void scrollUpPage()
- {
- setFirstLine(getFirstLine() - getVisibleLines()
- + (lastLinePartial ? 1 : 0));
- } //}}}
-
- //{{{ scrollDownLine() method
- /**
- * Scrolls down by one line.
- * @since jEdit 2.7pre2
- */
- public void scrollDownLine()
- {
- setFirstLine(getFirstLine() + 1);
- } //}}}
-
- //{{{ scrollDownPage() method
- /**
- * Scrolls down by one page.
- * @since jEdit 2.7pre2
- */
- public void scrollDownPage()
- {
- setFirstLine(getFirstLine() + getVisibleLines()
- - (lastLinePartial ? 1 : 0));
- } //}}}
-
- //{{{ scrollToCaret() method
- /**
- * Ensures that the caret is visible by scrolling the text area if
- * necessary.
- * @param doElectricScroll If true, electric scrolling will be performed
- */
- public void scrollToCaret(boolean doElectricScroll)
- {
- scrollTo(caretLine,caret - buffer.getLineStartOffset(caretLine),
- doElectricScroll);
- } //}}}
-
- //{{{ scrollTo() methods
- /**
- * Ensures that the specified location in the buffer is visible.
- * @param offset The offset from the start of the buffer
- * @param doElectricScroll If true, electric scrolling will be performed
- * @since jEdit 4.2pre3
- */
- public void scrollTo(int offset, boolean doElectricScroll)
- {
- int line = buffer.getLineOfOffset(offset);
- scrollTo(line,offset - buffer.getLineStartOffset(line),
- doElectricScroll);
- }
-
- /**
- * Ensures that the specified location in the buffer is visible.
- * @param line The line number
- * @param offset The offset from the start of the line
- * @param doElectricScroll If true, electric scrolling will be performed
- * @since jEdit 4.0pre6
- */
- public void scrollTo(int line, int offset, boolean doElectricScroll)
- {
- if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,"scrollTo(), lineCount="
- + getLineCount());
-
- if(visibleLines <= 1)
- {
- if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,"visibleLines <= 0");
- // Fix the case when the line is wrapped
- // it was not possible to see the second (or next)
- // subregion of a line
- ChunkCache.LineInfo[] infos = chunkCache
- .getLineInfosForPhysicalLine(line);
- int subregion = ChunkCache.getSubregionOfOffset(
- offset,infos);
- setFirstPhysicalLine(line,subregion);
- return;
- }
-
- //{{{ Get ready
- int extraEndVirt;
- int lineLength = buffer.getLineLength(line);
- if(offset > lineLength)
- {
- extraEndVirt = charWidth * (offset - lineLength);
- offset = lineLength;
- }
- else
- extraEndVirt = 0;
-
- int _electricScroll = doElectricScroll
- && visibleLines - 1 > (electricScroll << 1)
- ? electricScroll : 0;
- //}}}
-
- //{{{ Scroll vertically
- int screenLine = chunkCache.getScreenLineOfOffset(line,offset);
- int visibleLines = getVisibleLines();
- if(screenLine == -1)
- {
- // We are scrolling to a position that is not on the screen.
- if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,"screenLine == -1");
- ChunkCache.LineInfo[] infos = chunkCache
- .getLineInfosForPhysicalLine(line);
- int subregion = ChunkCache.getSubregionOfOffset(
- offset,infos);
- int prevLine = displayManager.getPrevVisibleLine(getFirstPhysicalLine());
- int nextLine = displayManager.getNextVisibleLine(getLastPhysicalLine());
- if(line == getFirstPhysicalLine())
- {
- if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,line + " == " + getFirstPhysicalLine());
- setFirstPhysicalLine(line,subregion
- - _electricScroll);
- }
- else if(line == prevLine)
- {
- if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,line + " == " + prevLine);
- setFirstPhysicalLine(prevLine,subregion
- - _electricScroll);
- }
- else if(line == getLastPhysicalLine())
- {
- if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,line + " == " + getLastPhysicalLine());
- setFirstPhysicalLine(line,
- subregion + _electricScroll
- - visibleLines
- + (lastLinePartial ? 2 : 1));
- }
- else if(line == nextLine)
- {
- if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,line + " == " + nextLine);
- setFirstPhysicalLine(nextLine,
- subregion + _electricScroll
- - visibleLines
- + (lastLinePartial ? 2 : 1));
- }
- else
- {
- if(Debug.SCROLL_TO_DEBUG)
- {
- Log.log(Log.DEBUG,this,"neither");
- Log.log(Log.DEBUG,this,"Last physical line is " + getLastPhysicalLine());
- }
- setFirstPhysicalLine(line,subregion
- - (visibleLines >> 1));
- if(Debug.SCROLL_TO_DEBUG)
- {
- Log.log(Log.DEBUG,this,"Last physical line is " + getLastPhysicalLine());
- }
- }
- }
- else if(screenLine < _electricScroll)
- {
- if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,"electric up");
- setFirstLine(getFirstLine() - _electricScroll + screenLine);
- }
- else if(screenLine > visibleLines - _electricScroll
- - (lastLinePartial ? 2 : 1))
- {
- if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,"electric down");
- setFirstLine(getFirstLine() + _electricScroll - visibleLines + screenLine + (lastLinePartial ? 2 : 1));
- } //}}}
-
- //{{{ Scroll horizontally
- if(!displayManager.isLineVisible(line))
- return;
-
- Point point = offsetToXY(line,offset,offsetXY);
-
- point.x += extraEndVirt;
-
- if(point.x < 0)
- {
- setHorizontalOffset(horizontalOffset
- - point.x + charWidth + 5);
- }
- else if(point.x >= painter.getWidth() - charWidth - 5)
- {
- setHorizontalOffset(horizontalOffset +
- (painter.getWidth() - point.x)
- - charWidth - 5);
- } //}}}
- } //}}}
-
- //{{{ addScrollListener() method
- /**
- * Adds a scroll listener to this text area.
- * @param listener The listener
- * @since jEdit 3.2pre2
- */
- public final void addScrollListener(ScrollListener listener)
- {
- listenerList.add(ScrollListener.class,listener);
- } //}}}
-
- //{{{ removeScrollListener() method
- /**
- * Removes a scroll listener from this text area.
- * @param listener The listener
- * @since jEdit 3.2pre2
- */
- public final void removeScrollListener(ScrollListener listener)
- {
- listenerList.remove(ScrollListener.class,listener);
- } //}}}
-
- //}}}
-
- //{{{ Screen line stuff
-
- //{{{ getPhysicalLineOfScreenLine() method
- /**
- * Returns the physical line number that contains the specified screen
- * line.
- * @param screenLine The screen line
- * @since jEdit 4.0pre6
- */
- public int getPhysicalLineOfScreenLine(int screenLine)
- {
- return chunkCache.getLineInfo(screenLine).physicalLine;
- } //}}}
-
- //{{{ getScreenLineOfOffset() method
- /**
- * Returns the screen (wrapped) line containing the specified offset.
- * Returns -1 if the line is not currently visible on the screen.
- * @param offset The offset
- * @since jEdit 4.0pre4
- */
- public int getScreenLineOfOffset(int offset)
- {
- int line = buffer.getLineOfOffset(offset);
- offset -= buffer.getLineStartOffset(line);
- return chunkCache.getScreenLineOfOffset(line,offset);
- } //}}}
-
- //{{{ getScreenLineStartOffset() method
- /**
- * Returns the start offset of the specified screen (wrapped) line.
- * @param line The line
- * @since jEdit 4.0pre4
- */
- public int getScreenLineStartOffset(int line)
- {
- ChunkCache.LineInfo lineInfo = chunkCache.getLineInfo(line);
- if(lineInfo.physicalLine == -1)
- return -1;
-
- return buffer.getLineStartOffset(lineInfo.physicalLine)
- + lineInfo.offset;
- } //}}}
-
- //{{{ getScreenLineEndOffset() method
- /**
- * Returns the end offset of the specified screen (wrapped) line.
- * @param line The line
- * @since jEdit 4.0pre4
- */
- public int getScreenLineEndOffset(int line)
- {
- ChunkCache.LineInfo lineInfo = chunkCache.getLineInfo(line);
- if(lineInfo.physicalLine == -1)
- return -1;
-
- return buffer.getLineStartOffset(lineInfo.physicalLine)
- + lineInfo.offset + lineInfo.length;
- } //}}}
-
- //}}}
-
- //{{{ Offset conversion
-
- //{{{ xyToOffset() methods
- /**
- * Converts a point to an offset.
- * Note that unlike in previous jEdit versions, this method now returns
- * -1 if the y co-ordinate is out of bounds.
- *
- * @param x The x co-ordinate of the point
- * @param y The y co-ordinate of the point
- */
- public int xyToOffset(int x, int y)
- {
- return xyToOffset(x,y,true);
- }
-
- /**
- * Converts a point to an offset.
- * Note that unlike in previous jEdit versions, this method now returns
- * -1 if the y co-ordinate is out of bounds.
- *
- * @param x The x co-ordinate of the point
- * @param y The y co-ordinate of the point
- * @param round Round up to next letter if past the middle of a letter?
- * @since jEdit 3.2pre6
- */
- public int xyToOffset(int x, int y, boolean round)
- {
- FontMetrics fm = painter.getFontMetrics();
- int height = fm.getHeight();
- int line = y / height;
-
- if(line < 0 || line >= visibleLines)
- return -1;
-
- return xToScreenLineOffset(line,x,round);
- } //}}}
-
- //{{{ xToScreenLineOffset() method
- /**
- * Converts a point in a given screen line to an offset.
- * Note that unlike in previous jEdit versions, this method now returns
- * -1 if the y co-ordinate is out of bounds.
- *
- * @param x The x co-ordinate of the point
- * @param screenLine The screen line
- * @param round Round up to next letter if past the middle of a letter?
- * @since jEdit 3.2pre6
- */
- public int xToScreenLineOffset(int screenLine, int x, boolean round)
- {
- ChunkCache.LineInfo lineInfo = chunkCache.getLineInfo(screenLine);
- if(lineInfo.physicalLine == -1)
- {
- return getLineEndOffset(displayManager
- .getLastVisibleLine()) - 1;
- }
- else
- {
- int offset = Chunk.xToOffset(lineInfo.chunks,
- x - horizontalOffset,round);
- if(offset == -1 || offset == lineInfo.offset + lineInfo.length)
- offset = lineInfo.offset + lineInfo.length - 1;
-
- return getLineStartOffset(lineInfo.physicalLine) + offset;
- }
- } //}}}
-
- //{{{ offsetToXY() methods
- /**
- * Converts an offset into a point in the text area painter's
- * co-ordinate space.
- * @param offset The offset
- * @return The location of the offset on screen, or <code>null</code>
- * if the specified offset is not visible
- */
- public Point offsetToXY(int offset)
- {
- int line = buffer.getLineOfOffset(offset);
- offset -= buffer.getLineStartOffset(line);
- Point retVal = new Point();
- return offsetToXY(line,offset,retVal);
- }
-
- /**
- * Converts an offset into a point in the text area painter's
- * co-ordinate space.
- * @param line The line
- * @param offset The offset
- * @return The location of the offset on screen, or <code>null</code>
- * if the specified offset is not visible
- */
- public Point offsetToXY(int line, int offset)
- {
- return offsetToXY(line,offset,new Point());
- }
-
- /**
- * Converts a line,offset pair into an x,y (pixel) point relative to the
- * upper left corner (0,0) of the text area.
- *
- * @param line The physical line number (from top of document)
- * @param offset The offset in characters, from the start of the line
- * @param retVal The point to store the return value in
- * @return <code>retVal</code> for convenience, or <code>null</code>
- * if the specified offset is not visible
- * @since jEdit 4.0pre4
- */
- public Point offsetToXY(int line, int offset, Point retVal)
- {
- if(!displayManager.isLineVisible(line))
- return null;
- int screenLine = chunkCache.getScreenLineOfOffset(line,offset);
- if(screenLine == -1)
- return null;
-
- FontMetrics fm = painter.getFontMetrics();
-
- retVal.y = screenLine * fm.getHeight();
-
- ChunkCache.LineInfo info = chunkCache.getLineInfo(screenLine);
-
- retVal.x = (int)(horizontalOffset + Chunk.offsetToX(
- info.chunks,offset));
-
- return retVal;
- } //}}}
-
- //}}}
-
- //{{{ Painting
-
- //{{{ invalidateScreenLineRange() method
- /**
- * Marks a range of screen lines as needing a repaint.
- * @param start The first line
- * @param end The last line
- * @since jEdit 4.0pre4
- */
- public void invalidateScreenLineRange(int start, int end)
- {
- if(buffer.isLoading())
- return;
-
- if(start > end)
- {
- int tmp = end;
- end = start;
- start = tmp;
- }
-
- if(chunkCache.needFullRepaint())
- end = visibleLines;
-
- FontMetrics fm = painter.getFontMetrics();
- int y = start * fm.getHeight();
- int height = (end - start + 1) * fm.getHeight();
- painter.repaint(0,y,painter.getWidth(),height);
- gutter.repaint(0,y,gutter.getWidth(),height);
- } //}}}
-
- //{{{ invalidateLine() method
- /**
- * Marks a line as needing a repaint.
- * @param line The physical line to invalidate
- */
- public void invalidateLine(int line)
- {
- if(!isShowing()
- || buffer.isLoading()
- || line < getFirstPhysicalLine()
- || line > physLastLine
- || !displayManager.isLineVisible(line))
- return;
-
- int startLine = -1;
- int endLine = -1;
-
- for(int i = 0; i < visibleLines; i++)
- {
- ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
-
- if((info.physicalLine >= line || info.physicalLine == -1)
- && startLine == -1)
- {
- startLine = i;
- }
-
- if((info.physicalLine >= line && info.lastSubregion)
- || info.physicalLine == -1)
- {
- endLine = i;
- break;
- }
- }
-
- if(chunkCache.needFullRepaint() || endLine == -1)
- endLine = visibleLines;
-
- invalidateScreenLineRange(startLine,endLine);
- } //}}}
-
- //{{{ invalidateLineRange() method
- /**
- * Marks a range of physical lines as needing a repaint.
- * @param start The first line to invalidate
- * @param end The last line to invalidate
- */
- public void invalidateLineRange(int start, int end)
- {
- if(!isShowing() || buffer.isLoading())
- return;
-
- if(end < start)
- {
- int tmp = end;
- end = start;
- start = tmp;
- }
-
- if(end < getFirstPhysicalLine() || start > getLastPhysicalLine())
- return;
-
- int startScreenLine = -1;
- int endScreenLine = -1;
-
- for(int i = 0; i < visibleLines; i++)
- {
- ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
-
- if((info.physicalLine >= start || info.physicalLine == -1)
- && startScreenLine == -1)
- {
- startScreenLine = i;
- }
-
- if((info.physicalLine >= end && info.lastSubregion)
- || info.physicalLine == -1)
- {
- endScreenLine = i;
- break;
- }
- }
-
- if(startScreenLine == -1)
- startScreenLine = 0;
-
- if(chunkCache.needFullRepaint() || endScreenLine == -1)
- endScreenLine = visibleLines;
-
- invalidateScreenLineRange(startScreenLine,endScreenLine);
- } //}}}
-
- //}}}
-
- //{{{ Convenience methods
-
- //{{{ getBufferLength() method
- /**
- * Returns the length of the buffer.
- */
- public final int getBufferLength()
- {
- return buffer.getLength();
- } //}}}
-
- //{{{ getLineCount() method
- /**
- * Returns the number of physical lines in the buffer.
- */
- public final int getLineCount()
- {
- return buffer.getLineCount();
- } //}}}
-
- //{{{ getLineOfOffset() method
- /**
- * Returns the line containing the specified offset.
- * @param offset The offset
- */
- public final int getLineOfOffset(int offset)
- {
- return buffer.getLineOfOffset(offset);
- } //}}}
-
- //{{{ getLineStartOffset() method
- /**
- * Returns the start offset of the specified line.
- * @param line The line (physical line)
- * @return The start offset of the specified line, or -1 if the line is
- * invalid
- */
- public int getLineStartOffset(int line)
- {
- return buffer.getLineStartOffset(line);
- } //}}}
-
- //{{{ getLineEndOffset() method
- /**
- * Returns the end offset of the specified line.
- * @param line The line (physical line)
- * @return The end offset of the specified line, or -1 if the line is
- * invalid.
- */
- public int getLineEndOffset(int line)
- {
- return buffer.getLineEndOffset(line);
- } //}}}
-
- //{{{ getLineLength() method
- /**
- * Returns the length of the specified line.
- * @param line The line
- */
- public int getLineLength(int line)
- {
- return buffer.getLineLength(line);
- } //}}}
-
- //{{{ getText() methods
- /**
- * Returns the specified substring of the buffer.
- * @param start The start offset
- * @param len The length of the substring
- * @return The substring
- */
- public final String getText(int start, int len)
- {
- return buffer.getText(start,len);
- }
-
- /**
- * Copies the specified substring of the buffer into a segment.
- * @param start The start offset
- * @param len The length of the substring
- * @param segment The segment
- */
- public final void getText(int start, int len, Segment segment)
- {
- buffer.getText(start,len,segment);
- }
-
- /**
- * Returns the entire text of this text area.
- */
- public String getText()
- {
- return buffer.getText(0,buffer.getLength());
- } //}}}
-
- //{{{ getLineText() methods
- /**
- * Returns the text on the specified line.
- * @param lineIndex the line number
- * @return The text, or null if the lineIndex is invalid
- */
- public final String getLineText(int lineIndex)
- {
- return buffer.getLineText(lineIndex);
- }
-
- /**
- * Copies the text on the specified line into a Segment. If lineIndex
- * is invalid, the segment will contain a null string.
- * @param lineIndex The line number (physical line)
- * @param segment the segment into which the data will be stored.
- */
- public final void getLineText(int lineIndex, Segment segment)
- {
- buffer.getLineText(lineIndex,segment);
- } //}}}
-
- //{{{ setText() method
- /**
- * Sets the entire text of this text area.
- * @param text the new content of the buffer
- */
- public void setText(String text)
- {
- try
- {
- buffer.beginCompoundEdit();
- buffer.remove(0,buffer.getLength());
- buffer.insert(0,text);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- } //}}}
-
- //}}}
-
- //{{{ Selection
-
- //{{{ selectAll() method
- /**
- * Selects all text in the buffer. Preserves the scroll position.
- */
- public final void selectAll()
- {
- int firstLine = getFirstLine();
- int horizOffset = getHorizontalOffset();
-
- setSelection(new Selection.Range(0,buffer.getLength()));
- moveCaretPosition(buffer.getLength(),true);
-
- setFirstLine(firstLine);
- setHorizontalOffset(horizOffset);
- } //}}}
-
- //{{{ selectLine() method
- /**
- * Selects the current line.
- * @since jEdit 2.7pre2
- */
- public void selectLine()
- {
- int caretLine = getCaretLine();
- int start = getLineStartOffset(caretLine);
- int end = getLineEndOffset(caretLine) - 1;
- Selection s = new Selection.Range(start,end);
- if(multi)
- addToSelection(s);
- else
- setSelection(s);
- moveCaretPosition(end);
- } //}}}
-
- //{{{ selectParagraph() method
- /**
- * Selects the paragraph at the caret position.
- * @since jEdit 2.7pre2
- */
- public void selectParagraph()
- {
- int caretLine = getCaretLine();
-
- if(getLineLength(caretLine) == 0)
- {
- getToolkit().beep();
- return;
- }
-
- int start = caretLine;
- int end = caretLine;
-
- while(start >= 0)
- {
- if(getLineLength(start) == 0)
- break;
- else
- start--;
- }
-
- while(end < getLineCount())
- {
- if(getLineLength(end) == 0)
- break;
- else
- end++;
- }
-
- int selectionStart = getLineStartOffset(start + 1);
- int selectionEnd = getLineEndOffset(end - 1) - 1;
- Selection s = new Selection.Range(selectionStart,selectionEnd);
- if(multi)
- addToSelection(s);
- else
- setSelection(s);
- moveCaretPosition(selectionEnd);
- } //}}}
-
- //{{{ selectWord() method
- /**
- * Selects the word at the caret position.
- * @since jEdit 2.7pre2
- */
- public void selectWord()
- {
- int line = getCaretLine();
- int lineStart = getLineStartOffset(line);
- int offset = getCaretPosition() - lineStart;
-
- if(getLineLength(line) == 0)
- return;
-
- String lineText = getLineText(line);
- String noWordSep = buffer.getStringProperty("noWordSep");
-
- if(offset == getLineLength(line))
- offset--;
-
- int wordStart = TextUtilities.findWordStart(lineText,offset,
- noWordSep,true,false,false);
- int wordEnd = TextUtilities.findWordEnd(lineText,offset+1,
- noWordSep,true,false,false);
-
- Selection s = new Selection.Range(lineStart + wordStart,
- lineStart + wordEnd);
- if(multi)
- addToSelection(s);
- else
- setSelection(s);
- moveCaretPosition(lineStart + wordEnd);
- } //}}}
-
- //{{{ selectToMatchingBracket() method
- /**
- * Selects from the bracket at the specified position to the
- * corresponding bracket.
- * @since jEdit 4.2pre1
- */
- public Selection selectToMatchingBracket(int position,
- boolean quickCopy)
- {
- int positionLine = buffer.getLineOfOffset(position);
- int lineOffset = position - buffer.getLineStartOffset(positionLine);
- if(getLineLength(positionLine) != 0)
- {
- int bracket = TextUtilities.findMatchingBracket(buffer,
- positionLine,Math.max(0,lineOffset - 1));
-
- if(bracket != -1)
- {
- Selection s;
-
- if(bracket < position)
- {
- if(!quickCopy)
- moveCaretPosition(position,false);
- s = new Selection.Range(bracket,position);
- }
- else
- {
- if(!quickCopy)
- moveCaretPosition(bracket + 1,false);
- s = new Selection.Range(position - 1,bracket + 1);
- }
-
- if(!multi && !quickCopy)
- selectNone();
-
- addToSelection(s);
- return s;
- }
- }
-
- return null;
- }
-
- /**
- * Selects from the bracket at the caret position to the corresponding
- * bracket.
- * @since jEdit 4.0pre2
- */
- public void selectToMatchingBracket()
- {
- selectToMatchingBracket(caret,false);
- } //}}}
-
- //{{{ selectBlock() method
- /**
- * Selects the code block surrounding the caret.
- * @since jEdit 2.7pre2
- */
- public void selectBlock()
- {
-
- Selection s = getSelectionAtOffset(caret);
- int start, end;
- if(s == null)
- start = end = caret;
- else
- {
- start = s.start;
- end = s.end;
- }
-
- String text = getText(0,buffer.getLength());
-
- // We can't do the backward scan if start == 0
- if(start == 0)
- {
- getToolkit().beep();
- return;
- }
-
- // Scan backwards, trying to find a bracket
- String openBrackets = "([{";
- String closeBrackets = ")]}";
- int count = 1;
- char openBracket = '\0';
- char closeBracket = '\0';
-
-backward_scan: while(--start > 0)
- {
- char c = text.charAt(start);
- int index = openBrackets.indexOf(c);
- if(index != -1)
- {
- if(--count == 0)
- {
- openBracket = c;
- closeBracket = closeBrackets.charAt(index);
- break backward_scan;
- }
- }
- else if(closeBrackets.indexOf(c) != -1)
- count++;
- }
-
- // Reset count
- count = 1;
-
- // Scan forward, matching that bracket
- if(openBracket == '\0')
- {
- getToolkit().beep();
- return;
- }
-forward_scan: do
- {
- char c = text.charAt(end);
- if(c == closeBracket)
- {
- if(--count == 0)
- {
- end++;
- break forward_scan;
- }
- }
- else if(c == openBracket)
- count++;
- }
- while(++end < buffer.getLength());
-
- s = new Selection.Range(start,end);
- if(multi)
- addToSelection(s);
- else
- setSelection(s);
- moveCaretPosition(end);
- } //}}}
-
- //{{{ lineInStructureScope() method
- /**
- * Returns if the specified line is contained in the currently
- * matched structure's scope.
- * @since jEdit 4.2pre3
- */
- public boolean lineInStructureScope(int line)
- {
- if(match == null)
- return false;
-
- if(match.startLine < caretLine)
- return line >= match.startLine && line <= caretLine;
- else
- return line <= match.endLine && line >= caretLine;
- } //}}}
-
- //{{{ invertSelection() method
- /**
- * Inverts the selection.
- * @since jEdit 4.0pre1
- */
- public final void invertSelection()
- {
- selectionManager.invertSelection();
- } //}}}
-
- //{{{ getSelectionCount() method
- /**
- * Returns the number of selections. This can be used to test
- * for the existence of selections.
- * @since jEdit 3.2pre2
- */
- public int getSelectionCount()
- {
- return selectionManager.getSelectionCount();
- } //}}}
-
- //{{{ getSelection() methods
- /**
- * Returns the current selection.
- * @since jEdit 3.2pre1
- */
- public Selection[] getSelection()
- {
- return selectionManager.getSelection();
- }
-
- /**
- * Returns the selection with the specified index. This must be
- * between 0 and the return value of <code>getSelectionCount()</code>.
- * @since jEdit 4.3pre1
- * @param index the index of the selection you want
- */
- public Selection getSelection(int index)
- {
- return selectionManager.selection.get(index);
- } //}}}
-
- //{{{ getSelectionIterator() method
- /**
- * Returns the current selection.
- * @since jEdit 4.3pre1
- */
- public Iterator<Selection> getSelectionIterator()
- {
- return selectionManager.selection.iterator();
- } //}}}
-
- //{{{ selectNone() method
- /**
- * Deselects everything.
- */
- public void selectNone()
- {
- invalidateSelectedLines();
- setSelection((Selection)null);
- } //}}}
-
- //{{{ setSelection() methods
- /**
- * Sets the selection. Nested and overlapping selections are merged
- * where possible. Null elements of the array are ignored.
- * @param selection The new selection
- * since jEdit 3.2pre1
- */
- public void setSelection(Selection[] selection)
- {
- // invalidate the old selection
- invalidateSelectedLines();
- selectionManager.setSelection(selection);
- finishCaretUpdate(caretLine,NO_SCROLL,true);
- }
-
- /**
- * Sets the selection. Nested and overlapping selections are merged
- * where possible.
- * @param selection The new selection
- * since jEdit 3.2pre1
- */
- public void setSelection(Selection selection)
- {
- invalidateSelectedLines();
- selectionManager.setSelection(selection);
- finishCaretUpdate(caretLine,NO_SCROLL,true);
- } //}}}
-
- //{{{ addToSelection() methods
- /**
- * Adds to the selection. Nested and overlapping selections are merged
- * where possible.
- * @param selection The new selection
- * since jEdit 3.2pre1
- */
- public void addToSelection(Selection[] selection)
- {
- invalidateSelectedLines();
- selectionManager.addToSelection(selection);
- finishCaretUpdate(caretLine,NO_SCROLL,true);
- }
-
- /**
- * Adds to the selection. Nested and overlapping selections are merged
- * where possible.
- * @param selection The new selection
- * since jEdit 3.2pre1
- */
- public void addToSelection(Selection selection)
- {
- invalidateSelectedLines();
- selectionManager.addToSelection(selection);
- finishCaretUpdate(caretLine,NO_SCROLL,true);
- } //}}}
-
- //{{{ getSelectionAtOffset() method
- /**
- * Returns the selection containing the specific offset, or <code>null</code>
- * if there is no selection at that offset.
- * @param offset The offset
- * @since jEdit 3.2pre1
- */
- public Selection getSelectionAtOffset(int offset)
- {
- return selectionManager.getSelectionAtOffset(offset);
- } //}}}
-
- //{{{ removeFromSelection() methods
- /**
- * Deactivates the specified selection.
- * @param sel The selection
- * @since jEdit 3.2pre1
- */
- public void removeFromSelection(Selection sel)
- {
- invalidateSelectedLines();
- selectionManager.removeFromSelection(sel);
- finishCaretUpdate(caretLine,NO_SCROLL,true);
- }
-
- /**
- * Deactivates the selection at the specified offset. If there is
- * no selection at that offset, does nothing.
- * @param offset The offset
- * @since jEdit 3.2pre1
- */
- public void removeFromSelection(int offset)
- {
- Selection sel = getSelectionAtOffset(offset);
- if(sel == null)
- return;
-
- invalidateSelectedLines();
- selectionManager.removeFromSelection(sel);
- finishCaretUpdate(caretLine,NO_SCROLL,true);
- } //}}}
-
- //{{{ resizeSelection() method
- /**
- * Resizes the selection at the specified offset, or creates a new
- * one if there is no selection at the specified offset. This is a
- * utility method that is mainly useful in the mouse event handler
- * because it handles the case of end being before offset gracefully
- * (unlike the rest of the selection API).
- * @param offset The offset
- * @param end The new selection end
- * @param extraEndVirt Only for rectangular selections - specifies how
- * far it extends into virtual space.
- * @param rect Make the selection rectangular?
- * @since jEdit 3.2pre1
- */
- public void resizeSelection(int offset, int end, int extraEndVirt,
- boolean rect)
- {
- Selection s = selectionManager.getSelectionAtOffset(offset);
- if(s != null)
- {
- invalidateLineRange(s.startLine,s.endLine);
- selectionManager.removeFromSelection(s);
- }
-
- selectionManager.resizeSelection(offset,end,extraEndVirt,rect);
- fireCaretEvent();
- } //}}}
-
- //{{{ extendSelection() methods
- /**
- * Extends the selection at the specified offset, or creates a new
- * one if there is no selection at the specified offset. This is
- * different from resizing in that the new chunk is added to the
- * selection in question, instead of replacing it.
- * @param offset The offset
- * @param end The new selection end
- * @since jEdit 3.2pre1
- */
- public void extendSelection(int offset, int end)
- {
- extendSelection(offset,end,0,0);
- }
-
- /**
- * Extends the selection at the specified offset, or creates a new
- * one if there is no selection at the specified offset. This is
- * different from resizing in that the new chunk is added to the
- * selection in question, instead of replacing it.
- * @param offset The offset
- * @param end The new selection end
- * @param extraStartVirt Extra virtual space at the start
- * @param extraEndVirt Extra virtual space at the end
- * @since jEdit 4.2pre1
- */
- public void extendSelection(int offset, int end,
- int extraStartVirt, int extraEndVirt)
- {
- Selection s = getSelectionAtOffset(offset);
- if(s != null)
- {
- invalidateLineRange(s.startLine,s.endLine);
- selectionManager.removeFromSelection(s);
-
- if(offset == s.start)
- {
- offset = end;
- end = s.end;
- }
- else if(offset == s.end)
- {
- offset = s.start;
- }
- }
-
- if(end < offset)
- {
- int tmp = end;
- end = offset;
- offset = tmp;
- }
-
- if(rectangularSelectionMode)
- {
- s = new Selection.Rect(offset,end);
- ((Selection.Rect)s).extraStartVirt = extraStartVirt;
- ((Selection.Rect)s).extraEndVirt = extraEndVirt;
- }
- else
- s = new Selection.Range(offset,end);
-
- selectionManager.addToSelection(s);
- fireCaretEvent();
-
- if(rectangularSelectionMode && extraEndVirt != 0)
- {
- int line = getLineOfOffset(end);
- scrollTo(line,getLineLength(line) + extraEndVirt,false);
- }
- } //}}}
-
- //{{{ getSelectedText() methods
- /**
- * Returns the text in the specified selection.
- * @param s The selection
- * @since jEdit 3.2pre1
- */
- public String getSelectedText(Selection s)
- {
- StringBuilder buf = new StringBuilder(s.end - s.start);
- s.getText(buffer,buf);
- return buf.toString();
- }
-
- /**
- * Returns the text in all active selections.
- * @param separator The string to insert between each text chunk
- * (for example, a newline)
- * @since jEdit 3.2pre1
- */
- public String getSelectedText(String separator)
- {
- Selection[] sel = selectionManager.getSelection();
- if(sel.length == 0)
- return null;
-
- StringBuilder buf = new StringBuilder();
- for(int i = 0; i < sel.length; i++)
- {
- if(i != 0)
- buf.append(separator);
-
- sel[i].getText(buffer,buf);
- }
-
- return buf.toString();
- }
-
- /**
- * Returns the text in all active selections, with a newline
- * between each text chunk.
- */
- public String getSelectedText()
- {
- return getSelectedText("\n");
- } //}}}
-
- //{{{ setSelectedText() methods
- /**
- * Replaces the selection with the specified text.
- * @param s The selection
- * @param selectedText The new text
- * @since jEdit 3.2pre1
- */
- public void setSelectedText(Selection s, String selectedText)
- {
- if(!isEditable())
- {
- throw new InternalError("Text component"
- + " read only");
- }
-
- try
- {
- buffer.beginCompoundEdit();
-
- moveCaretPosition(s.setText(buffer,selectedText));
- }
- // No matter what happends... stops us from leaving buffer
- // in a bad state
- finally
- {
- buffer.endCompoundEdit();
- }
-
- // no no no!!!!
- //selectNone();
- }
-
- /**
- * Replaces the selection at the caret with the specified text.
- * If there is no selection at the caret, the text is inserted at
- * the caret position.
- */
- public void setSelectedText(String selectedText)
- {
- int newCaret = replaceSelection(selectedText);
- if(newCaret != -1)
- moveCaretPosition(newCaret);
- selectNone();
- }
-
- /**
- * Replaces the selection at the caret with the specified text.
- * If there is no selection at the caret, the text is inserted at
- * the caret position.
- * @param selectedText The new selection
- * @param moveCaret Move caret to insertion location if necessary
- * @since jEdit 4.2pre5
- */
- public void setSelectedText(String selectedText, boolean moveCaret)
- {
- int newCaret = replaceSelection(selectedText);
- if(moveCaret && newCaret != -1)
- moveCaretPosition(newCaret);
- selectNone();
- } //}}}
-
- //{{{ replaceSelection() method
- /**
- * Set the selection, but does not deactivate it, and does not move the
- * caret.
- *
- * Please use {@link #setSelectedText(String)} instead.
- *
- * @param selectedText The new selection
- * @return The new caret position
- * @since 4.3pre1
- */
- public int replaceSelection(String selectedText)
- {
- if(!isEditable())
- throw new RuntimeException("Text component read only");
-
- int newCaret = -1;
- if(getSelectionCount() == 0)
- {
- // for compatibility with older jEdit versions
- buffer.insert(caret,selectedText);
- }
- else
- {
- try
- {
- buffer.beginCompoundEdit();
-
- Selection[] selection = getSelection();
- for(int i = 0; i < selection.length; i++)
- newCaret = selection[i].setText(buffer,selectedText);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- }
-
- return newCaret;
- } //}}}
-
- //{{{ getSelectedLines() method
- /**
- * Returns a sorted array of line numbers on which a selection or
- * selections are present.<p>
- *
- * This method is the most convenient way to iterate through selected
- * lines in a buffer. The line numbers in the array returned by this
- * method can be passed as a parameter to such methods as
- * {@link JEditBuffer#getLineText(int)}.
- *
- * @since jEdit 3.2pre1
- */
- public int[] getSelectedLines()
- {
- if(selectionManager.getSelectionCount() == 0)
- return new int[] { caretLine };
-
- return selectionManager.getSelectedLines();
- } //}}}
-
- //}}}
-
- //{{{ Caret
-
- //{{{ caretAutoScroll() method
- /**
- * Return if change in buffer should scroll this text area.
- * @since jEdit 4.3pre2
- */
- public boolean caretAutoScroll()
- {
- return focusedComponent == this;
- } //}}}
-
- //{{{ addStructureMatcher() method
- /**
- * Adds a structure matcher.
- * @since jEdit 4.2pre3
- */
- public void addStructureMatcher(StructureMatcher matcher)
- {
- structureMatchers.add(matcher);
- } //}}}
-
- //{{{ removeStructureMatcher() method
- /**
- * Removes a structure matcher.
- * @since jEdit 4.2pre3
- */
- public void removeStructureMatcher(StructureMatcher matcher)
- {
- structureMatchers.remove(matcher);
- } //}}}
-
- //{{{ getStructureMatchStart() method
- /**
- * Returns the structure element (bracket, or XML tag, etc) matching the
- * one before the caret.
- * @since jEdit 4.2pre3
- */
- public StructureMatcher.Match getStructureMatch()
- {
- return match;
- } //}}}
-
- //{{{ blinkCaret() method
- /**
- * Blinks the caret.
- */
- public final void blinkCaret()
- {
- if(caretBlinks)
- {
- blink = !blink;
- invalidateLine(caretLine);
- }
- else
- blink = true;
- } //}}}
-
- //{{{ centerCaret() method
- /**
- * Centers the caret on the screen.
- * @since jEdit 2.7pre2
- */
- public void centerCaret()
- {
- int offset = getScreenLineStartOffset(visibleLines >> 1);
- if(offset == -1)
- getToolkit().beep();
- else
- setCaretPosition(offset);
- } //}}}
-
- // {{{ scrollAndCenterCaret() method
- /**
- * Tries to scroll the textArea so that the caret is centered on the screen.
- * Sometimes gets confused by folds but at least makes the caret visible and
- * guesses better on subsequent attempts.
- *
- * @since jEdit 4.3pre15
- */
- public void scrollAndCenterCaret()
- {
- if (!getDisplayManager().isLineVisible(getCaretLine()))
- getDisplayManager().expandFold(getCaretLine(),true);
- int physicalLine = getCaretLine();
- int midPhysicalLine = getPhysicalLineOfScreenLine(visibleLines >> 1);
- int diff = physicalLine - midPhysicalLine;
- setFirstLine(getFirstLine() + diff);
- requestFocus();
- } // }}}
-
- //{{{ setCaretPosition() methods
- /**
- * Sets the caret position and deactivates the selection.
- * @param newCaret The caret position
- */
- public void setCaretPosition(int newCaret)
- {
- selectNone();
- moveCaretPosition(newCaret,true);
- }
-
- /**
- * Sets the caret position and deactivates the selection.
- * @param newCaret The caret position
- * @param doElectricScroll Do electric scrolling?
- */
- public void setCaretPosition(int newCaret, boolean doElectricScroll)
- {
- selectNone();
- moveCaretPosition(newCaret,doElectricScroll);
- } //}}}
-
- //{{{ moveCaretPosition() methods
- /**
- * Sets the caret position without deactivating the selection.
- * @param newCaret The caret position
- */
- public void moveCaretPosition(int newCaret)
- {
- moveCaretPosition(newCaret,true);
- }
-
- /**
- * Sets the caret position without deactivating the selection.
- * @param newCaret The caret position
- * @param doElectricScroll Do electric scrolling?
- */
- public void moveCaretPosition(int newCaret, boolean doElectricScroll)
- {
- moveCaretPosition(newCaret,doElectricScroll ? ELECTRIC_SCROLL
- : NORMAL_SCROLL);
- }
-
- public static final int NO_SCROLL = 0;
- public static final int NORMAL_SCROLL = 1;
- public static final int ELECTRIC_SCROLL = 2;
-
- /**
- * Sets the caret position without deactivating the selection.
- * @param newCaret The caret position
- * @param scrollMode The scroll mode (NO_SCROLL, NORMAL_SCROLL, or
- * ELECTRIC_SCROLL).
- * @since jEdit 4.2pre1
- */
- public void moveCaretPosition(int newCaret, int scrollMode)
- {
- if(newCaret < 0 || newCaret > buffer.getLength())
- {
- throw new IllegalArgumentException("caret out of bounds: "
- + newCaret);
- }
- int oldCaretLine = caretLine;
-
- if(caret == newCaret)
- finishCaretUpdate(oldCaretLine,scrollMode,false);
- else
- {
- caret = newCaret;
- caretLine = getLineOfOffset(newCaret);
-
- magicCaret = -1;
-
- finishCaretUpdate(oldCaretLine,scrollMode,true);
- }
- } //}}}
-
- //{{{ getCaretPosition() method
- /**
- * Returns a zero-based index of the caret position.
- */
- public int getCaretPosition()
- {
- return caret;
- } //}}}
-
- //{{{ getCaretLine() method
- /**
- * Returns the line number containing the caret.
- */
- public int getCaretLine()
- {
- return caretLine;
- } //}}}
-
- //{{{ getMagicCaretPosition() method
- /**
- * Returns an internal position used to keep the caret in one
- * column while moving around lines of varying lengths.
- * @since jEdit 4.2pre1
- */
- public int getMagicCaretPosition()
- {
- if(magicCaret == -1)
- {
- magicCaret = chunkCache.subregionOffsetToX(
- caretLine,caret - getLineStartOffset(caretLine));
- }
-
- return magicCaret;
- } //}}}
-
- //{{{ setMagicCaretPosition() method
- /**
- * Sets the `magic' caret position. This can be used to preserve
- * the column position when moving up and down lines.
- * @param magicCaret The magic caret position
- * @since jEdit 4.2pre1
- */
- public void setMagicCaretPosition(int magicCaret)
- {
- this.magicCaret = magicCaret;
- } //}}}
-
- //{{{ addCaretListener() method
- /**
- * Adds a caret change listener to this text area.
- * @param listener The listener
- */
- public final void addCaretListener(CaretListener listener)
- {
- listenerList.add(CaretListener.class,listener);
- } //}}}
-
- //{{{ removeCaretListener() method
- /**
- * Removes a caret change listener from this text area.
- * @param listener The listener
- */
- public final void removeCaretListener(CaretListener listener)
- {
- listenerList.remove(CaretListener.class,listener);
- } //}}}
-
- //{{{ goToNextBracket() method
- /**
- * Moves the caret to the next closing bracket.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2.
- */
- public void goToNextBracket(boolean select)
- {
- int newCaret = -1;
-
- if(caret != buffer.getLength())
- {
- String text = getText(caret,buffer.getLength()
- - caret - 1);
-
-loop: for(int i = 0; i < text.length(); i++)
- {
- switch(text.charAt(i))
- {
- case ')': case ']': case '}':
- newCaret = caret + i + 1;
- break loop;
- }
- }
- }
-
- if(newCaret == -1)
- getToolkit().beep();
- else
- {
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
- }
- } //}}}
-
- //{{{ goToNextCharacter() method
- /**
- * Moves the caret to the next character.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2.
- */
- public void goToNextCharacter(boolean select)
- {
- Selection s = getSelectionAtOffset(caret);
-
- if(!select && s instanceof Selection.Range)
- {
- if(multi)
- {
- if(caret != s.end)
- {
- moveCaretPosition(s.end);
- return;
- }
- }
- else
- {
- setCaretPosition(s.end);
- return;
- }
- }
-
- int extraStartVirt, extraEndVirt;
- if(s instanceof Selection.Rect)
- {
- extraStartVirt = ((Selection.Rect)s).extraStartVirt;
- extraEndVirt = ((Selection.Rect)s).extraEndVirt;
- }
- else
- {
- extraStartVirt = 0;
- extraEndVirt = 0;
- }
-
- int newCaret = caret;
-
- if(caret == buffer.getLength())
- {
- if(select && (rectangularSelectionMode || s instanceof Selection.Rect))
- {
- if(s != null && caret == s.start)
- extraStartVirt++;
- else
- extraEndVirt++;
- }
- else
- {
- getToolkit().beep();
- return;
- }
- }
- else if(caret == getLineEndOffset(caretLine) - 1)
- {
- if(select && (rectangularSelectionMode || s instanceof Selection.Rect))
- {
- if(s != null && caret == s.start)
- extraStartVirt++;
- else
- extraEndVirt++;
- }
- else
- {
- int line = displayManager.getNextVisibleLine(caretLine);
- if(line == -1)
- {
- getToolkit().beep();
- return;
- }
- else
- newCaret = getLineStartOffset(line);
- }
- }
- else
- newCaret = caret + 1;
-
- if(select)
- extendSelection(caret,newCaret,extraStartVirt,extraEndVirt);
- else if(!multi)
- selectNone();
-
- moveCaretPosition(newCaret);
- } //}}}
-
- //{{{ goToNextLine() method
- /**
- * Move the caret to the next line.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToNextLine(boolean select)
- {
- Selection s = getSelectionAtOffset(caret);
- boolean rectSelect = s == null ? rectangularSelectionMode
- : s instanceof Selection.Rect;
- int magic = getMagicCaretPosition();
- int newCaret = chunkCache.getBelowPosition(caretLine,
- caret - buffer.getLineStartOffset(caretLine),magic + 1,
- rectSelect && select);
- if(newCaret == -1)
- {
- int end = getLineEndOffset(caretLine) - 1;
- if(caret == end)
- {
- getToolkit().beep();
- return;
- }
- else
- newCaret = end;
- }
-
- _changeLine(select, newCaret);
-
- setMagicCaretPosition(magic);
- }//}}}
-
- //{{{ goToNextPage() method
- /**
- * Moves the caret to the next screenful.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2.
- */
- public void goToNextPage(boolean select)
- {
- scrollToCaret(false);
- int magic = getMagicCaretPosition();
- if(caretLine < displayManager.getFirstVisibleLine())
- {
- caretLine = displayManager.getNextVisibleLine(
- caretLine);
- }
-
- int newCaret;
-
- if(getFirstLine() + getVisibleLines() >= displayManager
- .getScrollLineCount())
- {
- int lastVisibleLine = displayManager
- .getLastVisibleLine();
- newCaret = getLineEndOffset(lastVisibleLine) - 1;
- }
- else
- {
- int caretScreenLine = getScreenLineOfOffset(caret);
-
- scrollDownPage();
-
- newCaret = xToScreenLineOffset(caretScreenLine,
- magic,true);
- }
-
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
-
- moveCaretPosition(newCaret,false);
-
- setMagicCaretPosition(magic);
- } //}}}
-
- //{{{ goToNextParagraph() method
- /**
- * Moves the caret to the start of the next paragraph.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToNextParagraph(boolean select)
- {
- int lineNo = getCaretLine();
-
- int newCaret = getBufferLength();
-
- boolean foundBlank = false;
-
- final Segment lineSegment = new Segment();
-loop: for(int i = lineNo + 1; i < getLineCount(); i++)
- {
- if(!displayManager.isLineVisible(i))
- continue;
-
- getLineText(i,lineSegment);
-
- for(int j = 0; j < lineSegment.count; j++)
- {
- switch(lineSegment.array[lineSegment.offset + j])
- {
- case ' ':
- case '\t':
- break;
- default:
- if(foundBlank)
- {
- newCaret = getLineStartOffset(i);
- break loop;
- }
- else
- continue loop;
- }
- }
-
- foundBlank = true;
- }
-
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
- } //}}}
-
- //{{{ goToNextWord() methods
- /**
- * Moves the caret to the start of the next word.
- * Note that if the "view.eatWhitespace" boolean propery is false,
- * this method moves the caret to the end of the current word instead.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToNextWord(boolean select)
- {
- goToNextWord(select,false);
- }
-
- /**
- * Moves the caret to the start of the next word.
- * @since jEdit 4.1pre5
- */
- public void goToNextWord(boolean select, boolean eatWhitespace)
- {
- int lineStart = getLineStartOffset(caretLine);
- int newCaret = caret - lineStart;
- String lineText = getLineText(caretLine);
-
- if(newCaret == lineText.length())
- {
- int nextLine = displayManager.getNextVisibleLine(caretLine);
- if(nextLine == -1)
- {
- getToolkit().beep();
- return;
- }
-
- newCaret = getLineStartOffset(nextLine);
- }
- else
- {
- String noWordSep = buffer.getStringProperty("noWordSep");
- boolean camelCasedWords = buffer.getBooleanProperty("camelCasedWords");
- newCaret = TextUtilities.findWordEnd(lineText,
- newCaret + 1,noWordSep,true,camelCasedWords,
- eatWhitespace);
-
- newCaret += lineStart;
- }
-
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
- } //}}}
-
- //{{{ goToPrevBracket() method
- /**
- * Moves the caret to the previous bracket.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToPrevBracket(boolean select)
- {
- String text = getText(0,caret);
-
- int newCaret = -1;
-
-loop: for(int i = getCaretPosition() - 1; i >= 0; i--)
- {
- switch(text.charAt(i))
- {
- case '(': case '[': case '{':
- newCaret = i;
- break loop;
- }
- }
-
- if(newCaret == -1)
- getToolkit().beep();
- else
- {
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
- }
- } //}}}
-
- //{{{ goToPrevCharacter() method
- /**
- * Moves the caret to the previous character.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2.
- */
- public void goToPrevCharacter(boolean select)
- {
- Selection s = getSelectionAtOffset(caret);
-
- if(caret == 0)
- {
- getToolkit().beep();
- return;
- }
-
- if(!select && s instanceof Selection.Range)
- {
- if(multi)
- {
- if(caret != s.start)
- {
- moveCaretPosition(s.start);
- return;
- }
- }
- else
- {
- setCaretPosition(s.start);
- return;
- }
- }
-
- int extraStartVirt = 0;
- int extraEndVirt = 0;
- int newCaret = caret;
-
- if(select && caret == getLineEndOffset(caretLine) - 1)
- {
- if(s instanceof Selection.Rect)
- {
- extraStartVirt = ((Selection.Rect)s).extraStartVirt;
- extraEndVirt = ((Selection.Rect)s).extraEndVirt;
- if(caret == s.start)
- {
- if(extraStartVirt == 0)
- newCaret = caret - 1;
- else
- extraStartVirt--;
- }
- else
- {
- if(extraEndVirt == 0)
- newCaret = caret - 1;
- else
- extraEndVirt--;
- }
- }
- else
- newCaret = caret - 1;
- }
- else if(caret == getLineStartOffset(caretLine))
- {
- int line = displayManager.getPrevVisibleLine(caretLine);
- if(line == -1)
- {
- getToolkit().beep();
- return;
- }
- newCaret = getLineEndOffset(line) - 1;
- }
- else
- newCaret = caret - 1;
-
- if(select)
- extendSelection(caret,newCaret,extraStartVirt,extraEndVirt);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
- } //}}}
-
- //{{{ goToPrevLine() method
- /**
- * Moves the caret to the previous line.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToPrevLine(boolean select)
- {
- Selection s = getSelectionAtOffset(caret);
- boolean rectSelect = s == null ? rectangularSelectionMode
- : s instanceof Selection.Rect;
- int magic = getMagicCaretPosition();
-
- int newCaret = chunkCache.getAbovePosition(caretLine,
- caret - buffer.getLineStartOffset(caretLine),magic + 1,
- rectSelect && select);
- if(newCaret == -1)
- {
- int start = getLineStartOffset(caretLine);
- if(caret == start)
- {
- getToolkit().beep();
- return;
- }
- else
- newCaret = start;
- }
-
- _changeLine(select, newCaret);
-
- setMagicCaretPosition(magic);
- } //}}}
-
- //{{{ goToPrevPage() method
- /**
- * Moves the caret to the previous screenful.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToPrevPage(boolean select)
- {
- scrollToCaret(false);
- int magic = getMagicCaretPosition();
-
- if(caretLine < displayManager.getFirstVisibleLine())
- {
- caretLine = displayManager.getNextVisibleLine(
- caretLine);
- }
-
- int newCaret;
-
- if(getFirstLine() == 0)
- {
- int firstVisibleLine = displayManager
- .getFirstVisibleLine();
- newCaret = getLineStartOffset(firstVisibleLine);
- }
- else
- {
- int caretScreenLine = getScreenLineOfOffset(caret);
-
- scrollUpPage();
-
- newCaret = xToScreenLineOffset(caretScreenLine,
- magic,true);
- }
-
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret,false);
-
- setMagicCaretPosition(magic);
- } //}}}
-
- //{{{ goToPrevParagraph() method
- /**
- * Moves the caret to the start of the previous paragraph.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToPrevParagraph(boolean select)
- {
- int lineNo = caretLine;
- int newCaret = 0;
-
- boolean foundBlank = false;
-
- final Segment lineSegment = new Segment();
-loop: for(int i = lineNo - 1; i >= 0; i--)
- {
- if(!displayManager.isLineVisible(i))
- continue;
-
- getLineText(i,lineSegment);
-
- for(int j = 0; j < lineSegment.count; j++)
- {
- switch(lineSegment.array[lineSegment.offset + j])
- {
- case ' ':
- case '\t':
- break;
- default:
- if(foundBlank)
- {
- newCaret = getLineEndOffset(i) - 1;
- break loop;
- }
- else
- continue loop;
- }
- }
-
- foundBlank = true;
- }
-
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
- } //}}}
-
- //{{{ goToPrevWord() method
- /**
- * Moves the caret to the start of the previous word.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToPrevWord(boolean select)
- {
- goToPrevWord(select,false);
- } //}}}
-
- //{{{ goToPrevWord() method
- /**
- * Moves the caret to the start of the previous word.
- * @since jEdit 4.1pre5
- */
- public void goToPrevWord(boolean select, boolean eatWhitespace)
- {
- int lineStart = getLineStartOffset(caretLine);
- int newCaret = caret - lineStart;
- String lineText = getLineText(caretLine);
-
- if(newCaret == 0)
- {
- if(lineStart == 0)
- {
- getToolkit().beep();
- return;
- }
- else
- {
- int prevLine = displayManager.getPrevVisibleLine(caretLine);
- if(prevLine == -1)
- {
- getToolkit().beep();
- return;
- }
-
- newCaret = getLineEndOffset(prevLine) - 1;
- }
- }
- else
- {
- String noWordSep = buffer.getStringProperty("noWordSep");
- boolean camelCasedWords = buffer.getBooleanProperty("camelCasedWords");
- newCaret = TextUtilities.findWordStart(lineText,
- newCaret - 1,noWordSep,true,camelCasedWords,eatWhitespace);
-
- newCaret += lineStart;
- }
-
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
- } //}}}
-
- //{{{ home() method
- /**
- * A "dumb home" action which only has 2 states:
- * start of the whitespace or start of line
- * @param select true if we also want to select from the cursor
- * @since jedit 4.3pre18
- */
- public void home(boolean select)
- {
- switch(getInputHandler().getLastActionCount() % 2)
- {
- case 1:
- goToStartOfWhiteSpace(select);
- break;
- default:
- goToStartOfLine(select);
- break;
- }
- } //}}}
-
- //{{{ end() method
- /**
- * a dumb end action which only has 2 states:
- * end of whitespace or end of line
- * @param select true if we also want to select from the cursor
- * @since jedit 4.3pre18
- */
- public void end(boolean select)
- {
- switch(getInputHandler().getLastActionCount() % 2)
- {
- case 1:
- goToEndOfWhiteSpace(select);
- break;
- default:
- goToEndOfLine(select);
- break;
- }
- } //}}}
-
- //{{{ smartHome() method
- /**
- * On subsequent invocations, first moves the caret to the first
- * non-whitespace character of the line, then the beginning of the
- * line, then to the first visible line.
- * @param select true if you want to extend selection
- * @since jEdit 4.3pre7
- */
- public void smartHome(boolean select)
- {
- switch(getInputHandler().getLastActionCount())
- {
- case 1:
- goToStartOfWhiteSpace(select);
- break;
- case 2:
- goToStartOfLine(select);
- break;
- default: //case 3:
- goToFirstVisibleLine(select);
- break;
- }
- } //}}}
-
- //{{{ smartEnd() method
- /**
- * Has 4 states based on # of invocations:
- * 1. last character of code (before inline comment)
- * 2. last non whitespace character of the line
- * 3. end of line
- * 4. end of last visible line
- * @param select true if you want to extend selection
- * @since jEdit 4.3pre18
- */
- public void smartEnd(boolean select)
- {
- int pos = getCaretPosition();
- int npos = 0;
- switch(getInputHandler().getLastActionCount())
- {
- case 1:
- goToEndOfCode(select);
- npos = getCaretPosition();
- if (npos == pos) goToEndOfWhiteSpace(select);
- break;
- case 2:
- goToEndOfWhiteSpace(select);
- break;
- case 3:
- goToEndOfLine(select);
- break;
- default: //case 4:
- goToLastVisibleLine(select);
- break;
- }
- } //}}}
-
- //{{{ goToStartOfLine() method
- /**
- * Moves the caret to the beginning of the current line.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToStartOfLine(boolean select)
- {
- Selection s = getSelectionAtOffset(caret);
- int line = select || s == null ? caretLine : s.startLine;
- int newCaret = getLineStartOffset(line);
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
- } //}}}
-
- //{{{ goToEndOfLine() method
- /**
- * Moves the caret to the end of the current line.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToEndOfLine(boolean select)
- {
- Selection s = getSelectionAtOffset(caret);
- int line = select || s == null ? caretLine : s.endLine;
- int newCaret = getLineEndOffset(line) - 1;
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
-
- // so that end followed by up arrow will always put caret at
- // the end of the previous line, for example
- //setMagicCaretPosition(Integer.MAX_VALUE);
- } //}}}
-
- //{{{ goToEndOfCode() method
- /**
- * Moves the caret to the end of the code present on the current line, before the comments and whitespace.
- * @param select true if you want to extend selection
- * @since jEdit 4.3pre18
- */
- public void goToEndOfCode(boolean select)
- {
- int line = getCaretLine();
-
- // @todo - Should tokenHandler be an TextArea instance variable?
- DefaultTokenHandler tokenHandler = new DefaultTokenHandler();
- buffer.markTokens(line,tokenHandler);
- Token token = tokenHandler.getTokens();
-
- char[] txt = getLineText(line).toCharArray();
-
- // replace comments with whitespace to find endOfCode:
- while(true)
- {
- if( token.id == Token.COMMENT1 ||
- token.id == Token.COMMENT2 ||
- token.id == Token.COMMENT3 ||
- token.id == Token.COMMENT4)
- {
- for(int i=token.offset; i<token.offset+token.length; i++)
- {
- txt[i] = ' ';
- }
- }
-
- if(token.next == null)
- break;
- token = token.next;
- }
-
- int newCaret = getLineLength(line) - StandardUtilities.getTrailingWhiteSpace( new String(txt) );
- newCaret += getLineStartOffset(line);
-
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
- moveCaretPosition(newCaret);
- } //}}}
-
- //{{{ goToStartOfWhiteSpace() method
- /**
- * Moves the caret to the first non-whitespace character of the current
- * line.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToStartOfWhiteSpace(boolean select)
- {
- Selection s = getSelectionAtOffset(caret);
- int line, offset;
- if(select || s == null)
- {
- line = caretLine;
- offset = caret - buffer.getLineStartOffset(line);
- }
- else
- {
- line = s.startLine;
- offset = s.start - buffer.getLineStartOffset(line);
- }
-
- int firstIndent = chunkCache.getSubregionStartOffset(line,offset);
- if(firstIndent == getLineStartOffset(line))
- {
- firstIndent = StandardUtilities.getLeadingWhiteSpace(getLineText(line));
- if(firstIndent == getLineLength(line))
- firstIndent = 0;
- firstIndent += getLineStartOffset(line);
- }
-
- if(select)
- extendSelection(caret,firstIndent);
- else if(!multi)
- selectNone();
- moveCaretPosition(firstIndent);
- } //}}}
-
- //{{{ goToEndOfWhiteSpace() method
- /**
- * Moves the caret to the last non-whitespace character of the current
- * line.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToEndOfWhiteSpace(boolean select)
- {
- Selection s = getSelectionAtOffset(caret);
- int line, offset;
- if(select || s == null)
- {
- line = caretLine;
- offset = caret - getLineStartOffset(line);
- }
- else
- {
- line = s.endLine;
- offset = s.end - getLineStartOffset(line);
- }
-
- int lastIndent = chunkCache.getSubregionEndOffset(line,offset);
-
- if(lastIndent == getLineEndOffset(line))
- {
- lastIndent = getLineLength(line) - StandardUtilities.getTrailingWhiteSpace(getLineText(line));
- if(lastIndent == 0)
- lastIndent = getLineLength(line);
- lastIndent += getLineStartOffset(line);
- }
- else
- {
- lastIndent--;
- }
-
- if(select)
- extendSelection(caret,lastIndent);
- else if(!multi)
- selectNone();
- moveCaretPosition(lastIndent);
- } //}}}
-
- //{{{ goToFirstVisibleLine() method
- /**
- * Moves the caret to the first visible line.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToFirstVisibleLine(boolean select)
- {
- int firstVisibleLine = getFirstLine() == 0 ? 0 : electricScroll;
- int firstVisible = getScreenLineStartOffset(firstVisibleLine);
- if(firstVisible == -1)
- {
- firstVisible = getLineStartOffset(displayManager
- .getFirstVisibleLine());
- }
-
- if(select)
- extendSelection(caret,firstVisible);
- else if(!multi)
- selectNone();
- moveCaretPosition(firstVisible);
- } //}}}
-
- //{{{ goToLastVisibleLine() method
- /**
- * Moves the caret to the last visible line.
- * @param select true if you want to extend selection
- * @since jEdit 2.7pre2
- */
- public void goToLastVisibleLine(boolean select)
- {
- int lastVisible;
-
- if(getFirstLine() + visibleLines >=
- displayManager.getScrollLineCount())
- {
- lastVisible = getLineEndOffset(displayManager
- .getLastVisibleLine()) - 1;
- }
- else
- {
- lastVisible = visibleLines - electricScroll - 1;
- if(lastLinePartial)
- lastVisible--;
- if(lastVisible < 0)
- lastVisible = 0;
- lastVisible = getScreenLineEndOffset(lastVisible) - 1;
- if(lastVisible == -1)
- {
- lastVisible = getLineEndOffset(displayManager
- .getLastVisibleLine()) - 1;
- }
- }
-
- if(select)
- extendSelection(caret,lastVisible);
- else if(!multi)
- selectNone();
- moveCaretPosition(lastVisible);
- } //}}}
-
- //{{{ goToBufferStart() method
- /**
- * Moves the caret to the beginning of the buffer.
- * @param select true if you want to extend selection
- * @since jEdit 4.0pre3
- */
- public void goToBufferStart(boolean select)
- {
- int start = buffer.getLineStartOffset(
- displayManager.getFirstVisibleLine());
- if(select)
- extendSelection(caret,start);
- else if(!multi)
- selectNone();
- moveCaretPosition(start);
- } //}}}
-
- //{{{ goToBufferEnd() method
- /**
- * Moves the caret to the end of the buffer.
- * @param select true if you want to extend selection
- * @since jEdit 4.0pre3
- */
- public void goToBufferEnd(boolean select)
- {
- int end = buffer.getLineEndOffset(
- displayManager.getLastVisibleLine()) - 1;
- if(select)
- extendSelection(caret,end);
- else if(!multi)
- selectNone();
- moveCaretPosition(end);
- } //}}}
-
- //{{{ goToMatchingBracket() method
- /**
- * Moves the caret to the bracket matching the one before the caret.
- * @since jEdit 2.7pre3
- */
- public void goToMatchingBracket()
- {
- if(getLineLength(caretLine) != 0)
- {
- int dot = caret - getLineStartOffset(caretLine);
-
- int bracket = TextUtilities.findMatchingBracket(
- buffer,caretLine,Math.max(0,dot - 1));
- if(bracket != -1)
- {
- selectNone();
- moveCaretPosition(bracket + 1,false);
- return;
- }
- }
-
- getToolkit().beep();
- } //}}}
-
- //}}}
-
- //{{{ User input
-
- //{{{ userInput() method
- /**
- * Handles the insertion of the specified character. It performs the
- * following operations above and beyond simply inserting the text:
- * <ul>
- * <li>Inserting a TAB with a selection will shift to the right
- * <li>Inserting a BACK_SPACE or a DELETE will remove a character
- * <li>Inserting an indent open/close bracket will re-indent the current
- * line as necessary
- * </ul>
- *
- * @param ch The character
- * @see #setSelectedText(String)
- * @see #isOverwriteEnabled()
- * @since jEdit 4.3pre7
- */
- public void userInput(char ch)
- {
- if(!isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- /* Null before addNotify() */
- if(hiddenCursor != null)
- getPainter().setCursor(hiddenCursor);
-
- switch(ch)
- {
- case '\t':
- userInputTab();
- break;
- case '\b':
- backspace();
- break;
- case '\u007F':
- delete();
- break;
- default:
- boolean indent = buffer.isElectricKey(ch, caretLine);
- String str = String.valueOf(ch);
- if(getSelectionCount() == 0)
- {
- if(!doWordWrap(ch == ' '))
- insert(str,indent);
- }
- else
- replaceSelection(str);
- break;
- }
- } //}}}
-
- //{{{ isOverwriteEnabled() method
- /**
- * Returns true if overwrite mode is enabled, false otherwise.
- */
- public final boolean isOverwriteEnabled()
- {
- return overwrite;
- } //}}}
-
- //{{{ setOverwriteEnabled() method
- /**
- * Sets overwrite mode.
- */
- public final void setOverwriteEnabled(boolean overwrite)
- {
- blink = true;
- caretTimer.restart();
-
- this.overwrite = overwrite;
- invalidateLine(caretLine);
- fireStatusChanged(StatusListener.OVERWRITE_CHANGED,overwrite);
- } //}}}
-
- //{{{ toggleOverwriteEnabled() method
- /**
- * Toggles overwrite mode.
- * @since jEdit 2.7pre2
- */
- public final void toggleOverwriteEnabled()
- {
- setOverwriteEnabled(!overwrite);
- } //}}}
-
- //{{{ backspace() method
- /**
- * Deletes the character before the caret, or the selection, if one is
- * active.
- * @since jEdit 2.7pre2
- */
- public void backspace()
- {
- delete(false);
- } //}}}
-
- //{{{ backspaceWord() methods
- /**
- * Deletes the word before the caret.
- * @since jEdit 2.7pre2
- */
- public void backspaceWord()
- {
- backspaceWord(false);
- }
-
- /**
- * Deletes the word before the caret.
- * @param eatWhitespace If true, will eat whitespace
- * @since jEdit 4.2pre5
- */
- public void backspaceWord(boolean eatWhitespace)
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- if(getSelectionCount() != 0)
- {
- setSelectedText("");
- return;
- }
-
- int lineStart = getLineStartOffset(caretLine);
- int _caret = caret - lineStart;
-
- String lineText = getLineText(caretLine);
-
- if(_caret == 0)
- {
- if(lineStart == 0)
- {
- getToolkit().beep();
- return;
- }
- _caret--;
- }
- else
- {
- String noWordSep = buffer.getStringProperty("noWordSep");
- boolean camelCasedWords = buffer.getBooleanProperty("camelCasedWords");
- _caret = TextUtilities.findWordStart(lineText,_caret-1,
- noWordSep,true,camelCasedWords,eatWhitespace);
- }
-
- buffer.remove(_caret + lineStart, caret - (_caret + lineStart));
- } //}}}
-
- //{{{ delete() method
- /**
- * Deletes the character after the caret.
- * @since jEdit 2.7pre2
- */
- public void delete()
- {
- delete(true);
- } //}}}
-
- //{{{ deleteToEndOfLine() method
- /**
- * Deletes from the caret to the end of the current line.
- * @since jEdit 2.7pre2
- */
- public void deleteToEndOfLine()
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- buffer.remove(caret,getLineEndOffset(caretLine)
- - caret - 1);
- } //}}}
-
- //{{{ deleteLine() method
- /**
- * Deletes the line containing the caret.
- * @since jEdit 2.7pre2
- */
- public void deleteLine()
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- int x = chunkCache.subregionOffsetToX(caretLine,caret - getLineStartOffset(caretLine));
- int[] lines = getSelectedLines();
-
- try
- {
- buffer.beginCompoundEdit();
-
- for (int i = lines.length - 1; i >= 0; i--)
- {
- int start = getLineStartOffset(lines[i]);
- int end = getLineEndOffset(lines[i]);
- if (end > buffer.getLength())
- {
- if (start != 0)
- start--;
- end--;
- }
- buffer.remove(start,end - start);
- }
- }
- finally
- {
- buffer.endCompoundEdit();
- }
-
- int lastLine = displayManager.getLastVisibleLine();
-
- if(caretLine == lastLine)
- {
- int offset = chunkCache.xToSubregionOffset(lastLine,0,x,true);
- setCaretPosition(buffer.getLineStartOffset(lastLine)
- + offset);
- }
- else
- {
- int offset = chunkCache.xToSubregionOffset(caretLine,0,x,true);
- setCaretPosition(getLineStartOffset(caretLine) + offset);
- }
- } //}}}
-
- //{{{ deleteParagraph() method
- /**
- * Deletes the paragraph containing the caret.
- * @since jEdit 2.7pre2
- */
- public void deleteParagraph()
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- // find the beginning of the paragraph.
- int start = 0;
- for(int i = caretLine - 1; i >= 0; i--)
- {
- if (lineContainsSpaceAndTabs(i))
- {
- start = getLineStartOffset(i);
- break;
- }
- }
-
- // Find the end of the paragraph
- int end = buffer.getLength();
- for(int i = caretLine + 1; i < getLineCount(); i++)
- {
- //if(!displayManager.isLineVisible(i))
- // continue loop;
-
- if (lineContainsSpaceAndTabs(i))
- {
- end = getLineEndOffset(i) - 1;
- break;
- }
- }
-
- buffer.remove(start,end - start);
- } //}}}
-
- //{{{ deleteToStartOfLine() method
- /**
- * Deletes from the caret to the beginning of the current line.
- * @since jEdit 2.7pre2
- */
- public void deleteToStartOfLine()
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- buffer.remove(getLineStartOffset(caretLine),
- caret - getLineStartOffset(caretLine));
- } //}}}
-
- //{{{ deleteWord() methods
- /**
- * Deletes the word in front of the caret.
- * @since jEdit 2.7pre2
- */
- public void deleteWord()
- {
- deleteWord(false);
- }
-
- /**
- * Deletes the word in front of the caret.
- *
-. * @param eatWhitespace If true, will eat whitespace
- * @since jEdit 4.2pre5
- */
- public void deleteWord(boolean eatWhitespace)
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- if(getSelectionCount() != 0)
- {
- setSelectedText("");
- return;
- }
-
- int lineStart = getLineStartOffset(caretLine);
- int _caret = caret - lineStart;
-
- String lineText = getLineText(caretLine);
-
- if(_caret == lineText.length())
- {
- if(lineStart + _caret == buffer.getLength())
- {
- getToolkit().beep();
- return;
- }
- _caret++;
- }
- else
- {
- String noWordSep = buffer.getStringProperty("noWordSep");
- boolean camelCasedWords = buffer.getBooleanProperty("camelCasedWords");
- _caret = TextUtilities.findWordEnd(lineText,
- _caret+1,noWordSep,true,camelCasedWords,eatWhitespace);
- }
-
- buffer.remove(caret,(_caret + lineStart) - caret);
- } //}}}
-
- //{{{ isMultipleSelectionEnabled() method
- /**
- * Returns if multiple selection is enabled.
- * @since jEdit 3.2pre1
- */
- public final boolean isMultipleSelectionEnabled()
- {
- return multi;
- } //}}}
-
- //{{{ toggleMultipleSelectionEnabled() method
- /**
- * Toggles multiple selection.
- * @since jEdit 3.2pre1
- */
- public final void toggleMultipleSelectionEnabled()
- {
- setMultipleSelectionEnabled(!multi);
- } //}}}
-
- //{{{ setMultipleSelectionEnabled() method
- /**
- * Set multiple selection on or off according to the value of
- * <code>multi</code>. This only affects the ability to
- * make multiple selections in the user interface; macros and plugins
- * can manipulate them regardless of the setting of this flag. In fact,
- * in most cases, calling this method should not be necessary.
- *
- * @param multi Should multiple selection be enabled?
- * @since jEdit 3.2pre1
- */
- public final void setMultipleSelectionEnabled(boolean multi)
- {
- this.multi = multi;
- fireStatusChanged(StatusListener.MULTI_SELECT_CHANGED,multi);
- painter.repaint();
- } //}}}
-
- //{{{ isRectangularSelectionEnabled() method
- /**
- * Returns if rectangular selection is enabled.
- * @since jEdit 4.2pre1
- */
- public final boolean isRectangularSelectionEnabled()
- {
- return rectangularSelectionMode;
- } //}}}
-
- //{{{ toggleRectangularSelectionEnabled() method
- /**
- * Toggles rectangular selection.
- * @since jEdit 4.2pre1
- */
- public final void toggleRectangularSelectionEnabled()
- {
- setRectangularSelectionEnabled(!rectangularSelectionMode);
-
- if(getSelectionCount() == 1)
- {
- Selection s = getSelection(0);
- removeFromSelection(s);
- if(rectangularSelectionMode)
- {
- addToSelection(new Selection.Rect(
- s.getStart(),s.getEnd()));
- }
- else
- {
- addToSelection(new Selection.Range(
- s.getStart(),s.getEnd()));
- }
- }
- } //}}}
-
- //{{{ setRectangularSelectionEnabled() method
- /**
- * Set rectangular selection on or off according to the value of
- * <code>rectangularSelectionMode</code>. This only affects the ability
- * to make multiple selections from the keyboard. A rectangular
- * selection can always be created by dragging with the mouse by holding
- * down <b>Control</b>, regardless of the state of this flag.
- *
- * @param rectangularSelectionMode Should rectangular selection be
- * enabled?
- * @since jEdit 4.2pre1
- */
- public final void setRectangularSelectionEnabled(
- boolean rectangularSelectionMode)
- {
- this.rectangularSelectionMode = rectangularSelectionMode;
- fireStatusChanged(StatusListener.RECT_SELECT_CHANGED,
- rectangularSelectionMode);
- painter.repaint();
- } //}}}
-
- //}}}
-
- //{{{ Folding
-
- //{{{ goToParentFold() method
- /**
- * Moves the caret to the fold containing the one at the caret
- * position.
- * @since jEdit 4.0pre3
- */
- public void goToParentFold()
- {
- int line = -1;
- int level = buffer.getFoldLevel(caretLine);
- for(int i = caretLine - 1; i >= 0; i--)
- {
- if(buffer.getFoldLevel(i) < level)
- {
- line = i;
- break;
- }
- }
-
- if(line == -1)
- {
- getToolkit().beep();
- return;
- }
-
- int magic = getMagicCaretPosition();
-
- int newCaret = buffer.getLineStartOffset(line)
- + chunkCache.xToSubregionOffset(line,0,magic + 1,true);
- if(!multi)
- selectNone();
-
- moveCaretPosition(newCaret);
- setMagicCaretPosition(magic);
- } //}}}
-
- //{{{ goToNextFold() method
- /**
- * Moves the caret to the next fold.
- * @param select true if you want to extend selection
- * @since jEdit 4.0pre3
- */
- public void goToNextFold(boolean select)
- {
- int nextFold = -1;
- for(int i = caretLine + 1; i < buffer.getLineCount(); i++)
- {
- if(buffer.isFoldStart(i)
- && displayManager.isLineVisible(i))
- {
- nextFold = i;
- break;
- }
- }
-
- if(nextFold == -1)
- {
- getToolkit().beep();
- return;
- }
-
- int magic = getMagicCaretPosition();
-
- int newCaret = buffer.getLineStartOffset(nextFold)
- + chunkCache.xToSubregionOffset(nextFold,0,magic + 1,true);
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
-
- moveCaretPosition(newCaret);
- setMagicCaretPosition(magic);
- } //}}}
-
- //{{{ goToPrevFold() method
- /**
- * Moves the caret to the previous fold.
- * @param select true if you want to extend selection
- * @since jEdit 4.0pre3
- */
- public void goToPrevFold(boolean select)
- {
- int prevFold = -1;
- for(int i = caretLine - 1; i >= 0; i--)
- {
- if(buffer.isFoldStart(i)
- && displayManager.isLineVisible(i))
- {
- prevFold = i;
- break;
- }
- }
-
- if(prevFold == -1)
- {
- getToolkit().beep();
- return;
- }
-
- int magic = getMagicCaretPosition();
-
- int newCaret = buffer.getLineStartOffset(prevFold)
- + chunkCache.xToSubregionOffset(prevFold,0,magic + 1,true);
- if(select)
- extendSelection(caret,newCaret);
- else if(!multi)
- selectNone();
-
- moveCaretPosition(newCaret);
- setMagicCaretPosition(magic);
- } //}}}
-
- //{{{ collapseFold() methods
- /**
- * Like {@link DisplayManager#collapseFold(int)}, but
- * also moves the caret to the first line of the fold.
- * @since jEdit 4.0pre3
- */
- public void collapseFold()
- {
- collapseFold(caretLine);
- }
-
- /**
- * Like {@link DisplayManager#collapseFold(int)}, but
- * also moves the caret to the first line of the fold.
- * @since jEdit 4.3pre7
- */
- public void collapseFold(int line)
- {
- int x = chunkCache.subregionOffsetToX(caretLine,
- caret - getLineStartOffset(caretLine));
-
- displayManager.collapseFold(line);
-
- if(displayManager.isLineVisible(caretLine))
- return;
-
- line = displayManager.getPrevVisibleLine(caretLine);
-
- if(!multi)
- {
- // cannot use selectNone() beacause the finishCaretUpdate method will reopen the fold
- invalidateSelectedLines();
- selectionManager.setSelection((Selection) null);
- }
- moveCaretPosition(buffer.getLineStartOffset(line)
- + chunkCache.xToSubregionOffset(line,0,x,true));
- } //}}}
-
- //{{{ expandFold() method
- /**
- * Like {@link DisplayManager#expandFold(int,boolean)}, but
- * also moves the caret to the first sub-fold.
- * @param fully If true, all subfolds will also be expanded
- * @since jEdit 4.0pre3
- */
- public void expandFold(boolean fully)
- {
- int x = chunkCache.subregionOffsetToX(caretLine,
- caret - getLineStartOffset(caretLine));
-
- int line = displayManager.expandFold(caretLine,fully);
-
- if(!fully && line != -1)
- {
- if(!multi)
- selectNone();
- moveCaretPosition(getLineStartOffset(line)
- + chunkCache.xToSubregionOffset(line,0,x,true));
- }
- } //}}}
-
- //{{{ selectFold() methods
- /**
- * Selects the fold that contains the caret line number.
- * @since jEdit 3.1pre3
- */
- public void selectFold()
- {
- selectFold(caretLine);
- }
-
- /**
- * Selects the fold that contains the specified line number.
- * @param line The line number
- * @since jEdit 4.0pre1
- */
- public void selectFold(int line)
- {
- int[] lines = buffer.getFoldAtLine(line);
-
- int newCaret = getLineEndOffset(lines[1]) - 1;
- Selection s = new Selection.Range(getLineStartOffset(lines[0]),newCaret);
- if(multi)
- addToSelection(s);
- else
- setSelection(s);
- moveCaretPosition(newCaret);
- } //}}}
-
- //{{{ narrowToFold() method
- /**
- * Hides all lines except those in the fold containing the caret.
- * @since jEdit 4.0pre1
- */
- public void narrowToFold()
- {
- int[] lines = buffer.getFoldAtLine(caretLine);
- if(lines[0] == 0 && lines[1] == buffer.getLineCount() - 1)
- getToolkit().beep();
- else
- displayManager.narrow(lines[0],lines[1]);
- } //}}}
-
- //{{{ narrowToSelection() method
- /**
- * Hides all lines except those in the selection.
- * @since jEdit 4.0pre1
- */
- public void narrowToSelection()
- {
- if(getSelectionCount() != 1)
- {
- getToolkit().beep();
- return;
- }
-
- Selection sel = getSelection(0);
- displayManager.narrow(sel.getStartLine(),sel.getEndLine());
-
- selectNone();
- } //}}}
-
- //{{{ addExplicitFold() method
- /**
- * Surrounds the selection with explicit fold markers.
- * @throws TextAreaException an exception thrown if the folding mode is
- * not explicit
- * @since jEdit 4.0pre3
- */
- public void addExplicitFold() throws TextAreaException
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
- if(!buffer.getStringProperty("folding").equals("explicit"))
- {
- throw new TextAreaException("folding-not-explicit");
- }
-
- try
- {
- buffer.beginCompoundEdit();
-
- if (getSelectionCount() == 0)
- {
- addExplicitFold(caret, caret, caretLine, caretLine);
- }
- else
- {
- Selection[] selections = getSelection();
- Selection selection = null;
- int caretBack = 0;
- for (int i = 0; i < selections.length; i++)
- {
- selection = selections[i];
- caretBack = addExplicitFold(selection.start, selection.end, selection.startLine,selection.endLine);
- }
- // Selection cannot be null because there is at least 1 selection
- assert selection != null;
- setCaretPosition(selection.start - caretBack, false);
- }
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- } //}}}
- //}}}
-
- //{{{ Text editing
-
- //{{{ lineComment() method
- /**
- * Prepends each line of the selection with the line comment string.
- * @since jEdit 3.2pre1
- */
- public void lineComment()
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
- String comment = buffer.getContextSensitiveProperty(caret,"lineComment");
- if(comment == null || comment.length() == 0)
- {
- rangeLineComment();
- return;
- }
-
- comment += ' ';
-
- buffer.beginCompoundEdit();
-
- int[] lines = getSelectedLines();
-
- try
- {
- for(int i = 0; i < lines.length; i++)
- {
- String text = getLineText(lines[i]);
- buffer.insert(getLineStartOffset(lines[i])
- + StandardUtilities.getLeadingWhiteSpace(text),
- comment);
- }
- }
- finally
- {
- buffer.endCompoundEdit();
- }
-
- selectNone();
- } //}}}
-
- //{{{ rangeComment() method
- /**
- * Adds comment start and end strings to the beginning and end of the
- * selection.
- * @since jEdit 3.2pre1
- */
- public void rangeComment()
- {
- String commentStart = buffer.getContextSensitiveProperty(caret,"commentStart");
- String commentEnd = buffer.getContextSensitiveProperty(caret,"commentEnd");
- if(!buffer.isEditable() || commentStart == null || commentEnd == null
- || commentStart.length() == 0 || commentEnd.length() == 0)
- {
- getToolkit().beep();
- return;
- }
-
- commentStart += ' ';
- commentEnd = ' ' + commentEnd;
-
- try
- {
- buffer.beginCompoundEdit();
-
- Selection[] selection = getSelection();
-
- if(selection.length == 0)
- {
- int oldCaret = caret;
- buffer.insert(caret,commentStart);
- buffer.insert(caret,commentEnd);
- setCaretPosition(oldCaret + commentStart.length());
- }
-
- for(int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- if(s instanceof Selection.Range)
- {
- buffer.insert(s.start,commentStart);
- buffer.insert(s.end,commentEnd);
- }
- else if(s instanceof Selection.Rect)
- {
- Selection.Rect rect = (Selection.Rect)s;
- int start = rect.getStartColumn(buffer);
- int end = rect.getEndColumn(buffer);
-
- for(int j = s.startLine; j <= s.endLine; j++)
- {
- buffer.insertAtColumn(j,end,
- commentEnd);
- buffer.insertAtColumn(j,start,
- commentStart);
- }
- }
- }
-
- selectNone();
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- } //}}}
-
- //{{{ formatParagraph() method
- /**
- * Formats the paragraph containing the caret.
- * @since jEdit 2.7pre2
- */
- public void formatParagraph() throws TextAreaException
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- if(maxLineLen <= 0)
- {
- throw new TextAreaException("format-maxlinelen");
- }
-
- Selection[] selection = getSelection();
- if(selection.length != 0)
- {
- buffer.beginCompoundEdit();
-
- for(int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- setSelectedText(s,TextUtilities.format(
- getSelectedText(s),maxLineLen,
- buffer.getTabSize()));
- }
-
- buffer.endCompoundEdit();
- }
- else
- {
- int lineNo = getCaretLine();
-
- int start = 0, end = buffer.getLength();
-
- for(int i = lineNo - 1; i >= 0; i--)
- {
- if (lineContainsSpaceAndTabs(i))
- {
- start = getLineEndOffset(i);
- break;
- }
- }
-
- for(int i = lineNo + 1; i < getLineCount(); i++)
- {
- if (lineContainsSpaceAndTabs(i))
- {
- end = getLineStartOffset(i) - 1;
- break;
- }
- }
-
- try
- {
- buffer.beginCompoundEdit();
-
- String text = buffer.getText(start,end - start);
- int offset = getCaretPosition() - start;
- int noSpaceOffset = TextUtilities.indexIgnoringWhitespace(
- text,offset);
- buffer.remove(start,end - start);
- text = TextUtilities.format(
- text,maxLineLen,buffer.getTabSize());
- buffer.insert(start,text);
- int caretPos = start;
- if (text.length() != 0)
- {
- caretPos += Math.min(text.length(),
- TextUtilities.ignoringWhitespaceIndex(
- text,noSpaceOffset));
- }
- moveCaretPosition(caretPos);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- }
- } //}}}
-
- //{{{ spacesToTabs() method
- /**
- * Converts spaces to tabs in the selection.
- * @since jEdit 2.7pre2
- */
- public void spacesToTabs()
- {
- Selection[] selection = getSelection();
-
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- buffer.beginCompoundEdit();
-
- if(selection.length == 0)
- {
- setText(TextUtilities.spacesToTabs(
- getText(), buffer.getTabSize()));
- }
- else
- {
- for(int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- setSelectedText(s,TextUtilities.spacesToTabs(
- getSelectedText(s),buffer.getTabSize()));
- }
- }
-
- buffer.endCompoundEdit();
- } //}}}
-
- //{{{ tabsToSpaces() method
- /**
- * Converts tabs to spaces in the selection.
- * @since jEdit 2.7pre2
- */
- public void tabsToSpaces()
- {
- Selection[] selection = getSelection();
-
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- buffer.beginCompoundEdit();
-
- if(selection.length == 0)
- {
- setText(TextUtilities.tabsToSpaces(
- getText(), buffer.getTabSize()));
- }
- else
- {
- for(int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- setSelectedText(s, TextUtilities.tabsToSpaces(
- getSelectedText(s),buffer.getTabSize()));
- }
- }
-
- buffer.endCompoundEdit();
- } //}}}
-
- //{{{ toUpperCase() method
- /**
- * Converts the selected text to upper case.
- * @since jEdit 2.7pre2
- */
- public void toUpperCase()
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- Selection[] selection = getSelection();
- int caret = -1;
- if (selection.length == 0)
- {
- caret = getCaretPosition();
- selectWord();
- selection = getSelection();
- }
- if (selection.length == 0)
- {
- if (caret != -1)
- setCaretPosition(caret);
- getToolkit().beep();
- return;
- }
-
- buffer.beginCompoundEdit();
-
- for(int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- setSelectedText(s,getSelectedText(s).toUpperCase());
- }
-
- buffer.endCompoundEdit();
- if (caret != -1)
- setCaretPosition(caret);
- } //}}}
-
- //{{{ toLowerCase() method
- /**
- * Converts the selected text to lower case.
- * @since jEdit 2.7pre2
- */
- public void toLowerCase()
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- Selection[] selection = getSelection();
- int caret = -1;
- if (selection.length == 0)
- {
- caret = getCaretPosition();
- selectWord();
- selection = getSelection();
- }
- if (selection.length == 0)
- {
- if (caret != -1)
- setCaretPosition(caret);
- getToolkit().beep();
- return;
- }
-
- buffer.beginCompoundEdit();
-
- for (int i = 0; i < selection.length; i++)
- {
- Selection s = selection[i];
- setSelectedText(s,getSelectedText(s).toLowerCase());
- }
-
- buffer.endCompoundEdit();
- if (caret != -1)
- setCaretPosition(caret);
- } //}}}
-
- //{{{ removeTrailingWhiteSpace() method
- /**
- * Removes trailing whitespace from all lines in the selection.
- * @since jEdit 2.7pre2
- */
- public void removeTrailingWhiteSpace()
- {
- if(!buffer.isEditable())
- getToolkit().beep();
- else
- {
- buffer.removeTrailingWhiteSpace(getSelectedLines());
- }
- } //}}}
-
- //{{{ insertEnterAndIndent() method
- public void insertEnterAndIndent()
- {
- if(!isEditable())
- getToolkit().beep();
- else
- {
- try
- {
- buffer.beginCompoundEdit();
- setSelectedText("\n");
- buffer.indentLine(caretLine,true);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- }
- } //}}}
-
- //{{{ insertTabAndIndent() method
- public void insertTabAndIndent()
- {
- if(!isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- if(getSelectionCount() == 0)
- {
- // if caret is inside leading whitespace, indent.
- CharSequence text = buffer.getLineSegment(caretLine);
- int start = buffer.getLineStartOffset(caretLine);
- int whiteSpace = StandardUtilities.getLeadingWhiteSpace(text);
-
- if(caret - start <= whiteSpace
- && buffer.indentLine(caretLine,false))
- return;
- }
-
- userInput('\t');
- } //}}}
-
- //{{{ indentSelectedLines() method
- /**
- * Indents all selected lines.
- * @since jEdit 3.1pre3
- */
- public void indentSelectedLines()
- {
- if(!buffer.isEditable())
- getToolkit().beep();
- else
- {
- buffer.indentLines(getSelectedLines());
- selectNone();
- }
- } //}}}
-
- //{{{ shiftIndentLeft() method
- /**
- * Shifts the indent to the left.
- * @since jEdit 2.7pre2
- */
- public void shiftIndentLeft()
- {
- if(!buffer.isEditable())
- getToolkit().beep();
- else
- {
- buffer.shiftIndentLeft(getSelectedLines());
- }
- } //}}}
-
- //{{{ shiftIndentRight() method
- /**
- * Shifts the indent to the right.
- * @since jEdit 2.7pre2
- */
- public void shiftIndentRight()
- {
- if(!buffer.isEditable())
- getToolkit().beep();
- else
- buffer.shiftIndentRight(getSelectedLines());
- } //}}}
-
- //{{{ joinLines() method
- /**
- * Joins the current and the next line, or joins all lines in
- * selections.
- * @since jEdit 2.7pre2
- */
- public void joinLines()
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- try
- {
- buffer.beginCompoundEdit();
- boolean doneForSelection = false;
- for (Selection selection: selectionManager.getSelection())
- {
- while (selection.startLine < selection.endLine)
- {
- // Edit from end of selection to
- // minimize invalidations and
- // recaluculations of cached line info
- // such as indent level or fold level.
- joinLineAt(selection.endLine - 1);
- doneForSelection = true;
- }
- }
- // If nothing selected or all selections span only
- // one line, join the line at the caret.
- if (!doneForSelection)
- {
- int end = getLineEndOffset(caretLine);
-
- // Nothing to do if the caret is on the last line.
- if (end > buffer.getLength())
- {
- getToolkit().beep();
- return;
- }
-
- joinLineAt(caretLine);
- if(!multi)
- selectNone();
- moveCaretPosition(end - 1);
- }
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- } //}}}
- //}}}
-
- //{{{ AWT stuff
-
- //{{{ addLeftOfScrollBar() method
- /**
- * Adds a component to the left side of the box left of the vertical
- * scroll bar. The ErrorList plugin uses this to show a global error
- * overview, for example. It is possible for more than one component
- * to be added, each is added to the left side of the box in turn.
- * Adding to the left ensures the scrollbar is always right of all added
- * components.
- *
- * @param comp The component
- * @since jEdit 4.2pre1
- */
- public void addLeftOfScrollBar(Component comp)
- {
- verticalBox.add(comp, 0);
- } //}}}
-
- //{{{ removeLeftOfScrollBar() method
- /**
- * Removes a component from the box left of the vertical scroll bar.
- *
- * @param comp The component
- * @since jEdit 4.2pre1
- */
- public void removeLeftOfScrollBar(Component comp)
- {
- verticalBox.remove(comp);
- } //}}}
-
- //{{{ addNotify() method
- /**
- * Called by the AWT when this component is added to a parent.
- * Adds document listener.
- */
- @Override
- public void addNotify()
- {
- super.addNotify();
-
- ToolTipManager.sharedInstance().registerComponent(painter);
- ToolTipManager.sharedInstance().registerComponent(gutter);
-
- recalculateVisibleLines();
- if(!buffer.isLoading())
- recalculateLastPhysicalLine();
- propertiesChanged();
-
- hiddenCursor = getToolkit().createCustomCursor(
- getGraphicsConfiguration()
- .createCompatibleImage(16,16,
- Transparency.BITMASK),
- new Point(0,0),"Hidden");
- } //}}}
-
- //{{{ removeNotify() method
- /**
- * Called by the AWT when this component is removed from it's parent.
- * This clears the pointer to the currently focused component.
- * Also removes document listener.
- */
- @Override
- public void removeNotify()
- {
- super.removeNotify();
-
- ToolTipManager.sharedInstance().unregisterComponent(painter);
- ToolTipManager.sharedInstance().unregisterComponent(gutter);
-
- if(focusedComponent == this)
- focusedComponent = null;
-
- caretTimer.stop();
- } //}}}
-
- //{{{ getFocusTraversalKeysEnabled() method
- /**
- * Java 1.4 compatibility fix to make Tab key work.
- * @since jEdit 3.2pre4
- */
- @Override
- public boolean getFocusTraversalKeysEnabled()
- {
- return false;
- } //}}}
-
- //{{{ getFocusCycleRoot() method
- /**
- * Java 1.4 compatibility fix to make Tab traversal work in a sane
- * manner.
- * @since jEdit 4.2pre3
- */
- public boolean getFocusCycleRoot()
- {
- return true;
- } //}}}
-
- //{{{ processKeyEvent() method
- @Override
- public void processKeyEvent(KeyEvent evt)
- {
- getInputHandler().processKeyEvent(evt, 1 /* source=TEXTAREA (1) */, false);
- if(!evt.isConsumed())
- super.processKeyEvent(evt);
-
- } //}}}
-
- //{{{ addTopComponent() method
- /**
- * Adds a component above the gutter, text area, and vertical scroll bar.
- *
- * @since jEdit 4.2pre3
- */
- public void addTopComponent(Component comp)
- {
- add(ScrollLayout.TOP,comp);
- } //}}}
-
- //{{{ removeTopComponent() method
- /**
- * Removes a component from above the gutter, text area, and vertical scroll bar.
- *
- * @since jEdit 4.2pre3
- */
- public void removeTopComponent(Component comp)
- {
- remove(comp);
- } //}}}
-
- //{{{ getInputMethodRequests() method
- @Override
- public InputMethodRequests getInputMethodRequests()
- {
- if(inputMethodSupport == null)
- {
- inputMethodSupport = new InputMethodSupport(this);
- Log.log(Log.DEBUG, this, "InputMethodSupport is activated");
- }
- return inputMethodSupport;
- } //}}}
- //}}}
-
- //{{{ addStatusListener() method
- /**
- * Adds a scroll listener to this text area.
- * @param listener The listener
- * @since jEdit 4.3pre2
- */
- public final void addStatusListener(StatusListener listener)
- {
- listenerList.add(StatusListener.class,listener);
- } //}}}
-
- //{{{ removeStatusListener() method
- /**
- * Removes a scroll listener from this text area.
- * @param listener The listener
- * @since jEdit 4.3pre2
- */
- public final void removeStatusListener(StatusListener listener)
- {
- listenerList.remove(StatusListener.class,listener);
- } //}}}
-
- //{{{ propertiesChanged() method
- /**
- * Called by jEdit when necessary. Plugins should not call this method.
- */
- public void propertiesChanged()
- {
- if(buffer == null)
- return;
-
- int _tabSize = buffer.getTabSize();
- char[] foo = new char[_tabSize];
- for(int i = 0; i < foo.length; i++)
- foo[i] = ' ';
-
- tabSize = painter.getStringWidth(new String(foo));
-
- charWidth = (int)Math.round(
- painter.getFont().getStringBounds(foo,0,1,
- painter.getFontRenderContext()).getWidth());
-
- String oldWrap = wrap;
- wrap = buffer.getStringProperty("wrap");
- hardWrap = wrap.equals("hard");
- softWrap = wrap.equals("soft");
- boolean oldWrapToWidth = wrapToWidth;
- int oldWrapMargin = wrapMargin;
- setMaxLineLength(buffer.getIntegerProperty("maxLineLen",0));
-
- boolean wrapSettingsChanged = !(wrap.equals(oldWrap)
- && oldWrapToWidth == wrapToWidth
- && oldWrapMargin == wrapMargin);
-
- if(displayManager != null && !bufferChanging
- && !buffer.isLoading() && wrapSettingsChanged)
- {
- displayManager.invalidateScreenLineCounts();
- displayManager.notifyScreenLineChanges();
- }
-
- chunkCache.invalidateAll();
- gutter.repaint();
- painter.repaint();
- } //}}}
-
- //{{{ addActionSet() method
- /**
- * Adds a new action set to the textarea's list of ActionSets.
- * Call this only on standalone textarea
- *
- * @param actionSet the actionSet to add
- * @since jEdit 4.3pre13
- */
- public void addActionSet(JEditActionSet<JEditBeanShellAction> actionSet)
- {
- actionContext.addActionSet(actionSet);
- } //}}}
-
- //{{{ getMarkPosition() method
- /**
- * @deprecated Do not use.
- */
- @Deprecated
- public final int getMarkPosition()
- {
- Selection s = getSelectionAtOffset(caret);
- if(s == null)
- return caret;
-
- if(s.start == caret)
- return s.end;
- else if(s.end == caret)
- return s.start;
- else
- return caret;
- } //}}}
-
- //{{{ getMarkLine() method
- /**
- * @deprecated Do not use.
- */
- @Deprecated
- public final int getMarkLine()
- {
- if(getSelectionCount() != 1)
- return caretLine;
-
- Selection s = getSelection(0);
- if(s.start == caret)
- return s.endLine;
- else if(s.end == caret)
- return s.startLine;
- else
- return caretLine;
- } //}}}
-
- //{{{ Package-private members
-
- static TextArea focusedComponent;
-
- //{{{ Instance variables
- MouseInputAdapter mouseHandler;
- final ChunkCache chunkCache;
- DisplayManager displayManager;
- final SelectionManager selectionManager;
- /**
- * The action context.
- * It is used only when the textarea is standalone
- */
- private JEditActionContext<JEditBeanShellAction,JEditActionSet<JEditBeanShellAction>> actionContext;
- boolean bufferChanging;
-
- int maxHorizontalScrollWidth;
-
- String wrap;
- boolean hardWrap;
- boolean softWrap;
- boolean wrapToWidth;
- int maxLineLen;
- int wrapMargin;
- float tabSize;
- int charWidth;
-
- boolean scrollBarsInitialized;
-
- /**
- * Cursor location, measured as an offset (in pixels) from upper left corner
- * of the TextArea.
- */
- final Point offsetXY;
-
- boolean lastLinePartial;
-
- boolean blink;
- //}}}
-
- //{{{ isCaretVisible() method
- /**
- * Returns true if the caret is visible, false otherwise.
- */
- final boolean isCaretVisible()
- {
- return blink && hasFocus();
- } //}}}
-
- //{{{ isStructureHighlightVisible() method
- /**
- * Returns true if the structure highlight is visible, false otherwise.
- * @since jEdit 4.2pre3
- */
- final boolean isStructureHighlightVisible()
- {
- return match != null
- && hasFocus()
- && displayManager.isLineVisible(match.startLine)
- && displayManager.isLineVisible(match.endLine);
- } //}}}
-
- //{{{ updateMaxHorizontalScrollWidth() method
- void updateMaxHorizontalScrollWidth()
- {
- int max = chunkCache.getMaxHorizontalScrollWidth();
-
- if(max != maxHorizontalScrollWidth)
- {
- maxHorizontalScrollWidth = max;
- horizontal.setValues(Math.max(0,
- Math.min(maxHorizontalScrollWidth + charWidth
- - painter.getWidth(),
- -horizontalOffset)),
- painter.getWidth(),
- 0,maxHorizontalScrollWidth
- + charWidth);
- horizontal.setUnitIncrement(10);
- horizontal.setBlockIncrement(painter.getWidth());
- }
- else if (horizontal.getValue() != -horizontalOffset)
- {
- horizontal.setValue(-horizontalOffset);
- }
- } //}}}
-
- //{{{ recalculateVisibleLines() method
- void recalculateVisibleLines()
- {
- if(painter == null)
- return;
- int height = painter.getHeight();
- int lineHeight = painter.getFontMetrics().getHeight();
- if(lineHeight == 0)
- visibleLines = 0;
- else if(height <= 0)
- {
- visibleLines = 0;
- lastLinePartial = false;
- }
- else
- {
- visibleLines = height / lineHeight;
- lastLinePartial = height % lineHeight != 0;
- if(lastLinePartial)
- visibleLines++;
- }
-
- chunkCache.recalculateVisibleLines();
-
- // this does the "trick" to eliminate blank space at the end
- if(displayManager != null && buffer != null && !buffer.isLoading())
- setFirstLine(getFirstLine());
-
- updateScrollBar();
- } //}}}
-
- //{{{ foldStructureChanged() method
- void foldStructureChanged()
- {
- chunkCache.invalidateAll();
- recalculateLastPhysicalLine();
- repaint();
- } //}}}
-
- //{{{ updateScrollBar() method
- /**
- * Updates the state of the scroll bars. This should be called
- * if the number of lines in the buffer changes, or when the
- * size of the text are changes.
- */
- void updateScrollBar()
- {
- if(buffer == null)
- return;
-
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"updateScrollBar(), slc="
- + displayManager.getScrollLineCount());
-
- if(vertical != null && visibleLines != 0)
- {
- if(Debug.SCROLL_DEBUG)
- Log.log(Log.DEBUG,this,"Vertical ok");
- int lineCount = displayManager.getScrollLineCount();
- int firstLine = getFirstLine();
- int visible = visibleLines - (lastLinePartial ? 1 : 0);
-
- vertical.setValues(firstLine,visible,0,lineCount);
- vertical.setUnitIncrement(2);
- vertical.setBlockIncrement(visible);
- }
- } //}}}
-
- //{{{ _finishCaretUpdate() method
- /* called by DisplayManager.BufferChangeHandler.transactionComplete() */
- void _finishCaretUpdate()
- {
- if(!queuedCaretUpdate)
- return;
-
- try
- {
- if(match != null)
- {
- if(oldCaretLine < match.startLine)
- invalidateLineRange(oldCaretLine,match.endLine);
- else
- invalidateLineRange(match.startLine,oldCaretLine);
- match = null;
- }
-
- int newCaretScreenLine = chunkCache.getScreenLineOfOffset(caretLine,
- caret - buffer.getLineStartOffset(caretLine));
- if(caretScreenLine == -1)
- invalidateScreenLineRange(newCaretScreenLine,newCaretScreenLine);
- else
- invalidateScreenLineRange(caretScreenLine,newCaretScreenLine);
- caretScreenLine = newCaretScreenLine;
-
- invalidateSelectedLines();
-
- // When the user is typing, etc, we don't want the caret
- // to blink
- blink = true;
- caretTimer.restart();
-
- if(!displayManager.isLineVisible(caretLine))
- {
- if(caretLine < displayManager.getFirstVisibleLine()
- || caretLine > displayManager.getLastVisibleLine())
- {
- int collapseFolds = buffer.getIntegerProperty(
- "collapseFolds",0);
- if(collapseFolds != 0)
- {
- displayManager.expandFolds(collapseFolds);
- displayManager.expandFold(caretLine,false);
- }
- else
- displayManager.expandAllFolds();
- }
- else
- displayManager.expandFold(caretLine,false);
- }
-
- if(queuedScrollMode == ELECTRIC_SCROLL)
- scrollToCaret(true);
- else if(queuedScrollMode == NORMAL_SCROLL)
- scrollToCaret(false);
-
- updateBracketHighlightWithDelay();
- if(queuedFireCaretEvent)
- fireCaretEvent();
- }
- // in case one of the above fails, we still want to
- // clear these flags.
- finally
- {
- queuedCaretUpdate = queuedFireCaretEvent = false;
- queuedScrollMode = NO_SCROLL;
- }
- } //}}}
-
- //{{{ invalidateStructureMatch() method
- void invalidateStructureMatch()
- {
- if(match != null)
- invalidateLineRange(match.startLine,match.endLine);
- } //}}}
-
- //{{{ startDragAndDrop() method
- void startDragAndDrop(InputEvent evt, boolean copy)
- {
- TransferHandler transferHandler = getTransferHandler();
- if (transferHandler != null)
- {
- Log.log(Log.DEBUG,this,"Drag and drop callback");
- transferHandler.exportAsDrag(this,evt,
- copy ? TransferHandler.COPY
- : TransferHandler.MOVE);
- }
- } //}}}
-
- //{{{ fireNarrowActive() method
- void fireNarrowActive()
- {
- Object[] listeners = listenerList.getListenerList();
- for(int i = listeners.length - 2; i >= 0; i--)
- {
- if(listeners[i] == StatusListener.class)
- {
- try
- {
- ((StatusListener)listeners[i+1])
- .narrowActive(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,t);
- }
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Static variables
- private static final Timer caretTimer;
- private static final Timer structureTimer;
- //}}}
-
- //{{{ Instance variables
- protected JPopupMenu popup;
-
- private boolean popupEnabled;
- protected Cursor hiddenCursor;
-
- private final Gutter gutter;
- protected final TextAreaPainter painter;
-
- private final EventListenerList listenerList;
- private final MutableCaretEvent caretEvent;
-
- private boolean caretBlinks;
- protected InputHandlerProvider inputHandlerProvider;
-
- private InputMethodSupport inputMethodSupport;
-
- /** The last visible physical line index. */
- private int physLastLine;
-
- /**
- * The last screen line index.
- */
- private int screenLastLine;
-
- /** The visible lines count. */
- private int visibleLines;
- private int electricScroll;
-
- private int horizontalOffset;
-
- private boolean quickCopy;
-
- // JDiff, error list add stuff here
- private final Box verticalBox;
- private final JScrollBar vertical;
- private final JScrollBar horizontal;
-
- protected JEditBuffer buffer;
-
- protected int caret;
- protected int caretLine;
- private int caretScreenLine;
-
- private final java.util.List<StructureMatcher> structureMatchers;
- private StructureMatcher.Match match;
-
- private int magicCaret;
- /** Flag that tells if multiple selection is on. */
- protected boolean multi;
- private boolean overwrite;
- private boolean rectangularSelectionMode;
-
- private boolean dndEnabled;
- private boolean dndInProgress;
-
- // see finishCaretUpdate() & _finishCaretUpdate()
- private boolean queuedCaretUpdate;
- private int queuedScrollMode;
- private boolean queuedFireCaretEvent;
- private int oldCaretLine;
-
- private boolean joinNonWordChars;
- private boolean ctrlForRectangularSelection;
- //}}}
-
- //{{{ _setHorizontalOffset() method
- /**
- * Sets the horizontal offset of drawn lines. This method will
- * check if the offset do not go too far after the last character
- * @param horizontalOffset offset The new horizontal offset
- */
- private void _setHorizontalOffset(int horizontalOffset)
- {
- if(horizontalOffset > 0)
- horizontalOffset = 0;
-
- if(horizontalOffset == this.horizontalOffset)
- return;
-
- // Scrolling with trackpad or other device should be kept inside bounds
- int min = Math.min(-(maxHorizontalScrollWidth + charWidth - painter.getWidth()), 0);
- if(horizontalOffset < min)
- horizontalOffset = min;
-
- setHorizontalOffset(horizontalOffset);
- } //}}}
-
- //{{{ invalidateSelectedLines() method
- /**
- * Repaints the lines containing the selection.
- */
- private void invalidateSelectedLines()
- {
- // to hide line highlight if selections are being added later on
- invalidateLine(caretLine);
-
- for (Selection s : selectionManager.selection)
- invalidateLineRange(s.startLine,s.endLine);
- } //}}}
-
- //{{{ finishCaretUpdate() method
- /**
- * the collapsing of scrolling/event firing inside compound edits
- * greatly speeds up replace-all.
- */
- private void finishCaretUpdate(int oldCaretLine,
- int scrollMode, boolean fireCaretEvent)
- {
- queuedFireCaretEvent |= fireCaretEvent;
- queuedScrollMode = Math.max(scrollMode,queuedScrollMode);
-
- if(queuedCaretUpdate)
- return;
-
- this.oldCaretLine = oldCaretLine;
- queuedCaretUpdate = true;
-
- if(!buffer.isTransactionInProgress())
- _finishCaretUpdate();
- /* otherwise DisplayManager.BufferChangeHandler calls */
- } //}}}
-
- //{{{ fireCaretEvent() method
- private void fireCaretEvent()
- {
- Object[] listeners = listenerList.getListenerList();
- for(int i = listeners.length - 2; i >= 0; i--)
- {
- if(listeners[i] == CaretListener.class)
- {
- try
- {
- ((CaretListener)listeners[i+1]).caretUpdate(caretEvent);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,t);
- }
- }
- }
- } //}}}
-
- //{{{ fireScrollEvent() method
- private void fireScrollEvent(boolean vertical)
- {
- Object[] listeners = listenerList.getListenerList();
- for(int i = listeners.length - 2; i >= 0; i--)
- {
- if(listeners[i] == ScrollListener.class)
- {
- try
- {
- if(vertical)
- ((ScrollListener)listeners[i+1]).scrolledVertically(this);
- else
- ((ScrollListener)listeners[i+1]).scrolledHorizontally(this);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,t);
- }
- }
- }
- } //}}}
-
- //{{{ fireStatusChanged() method
- private void fireStatusChanged(int flag, boolean value)
- {
- Object[] listeners = listenerList.getListenerList();
- for(int i = listeners.length - 2; i >= 0; i--)
- {
- if(listeners[i] == StatusListener.class)
- {
- try
- {
- ((StatusListener)listeners[i+1])
- .statusChanged(this,flag,value);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,t);
- }
- }
- }
- } //}}}
-
- //{{{ fireBracketSelected() method
- private void fireBracketSelected(int line, String text)
- {
- Object[] listeners = listenerList.getListenerList();
- for(int i = listeners.length - 2; i >= 0; i--)
- {
- if(listeners[i] == StatusListener.class)
- {
- try
- {
- ((StatusListener)listeners[i+1])
- .bracketSelected(this,line,text);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,this,t);
- }
- }
- }
- } //}}}
-
- //{{{ _changeLine() method
- private void _changeLine(boolean select, int newCaret)
- {
- if(select)
- {
- RectParams params = getRectParams(caret,newCaret);
- int extraStartVirt;
- int extraEndVirt;
- if(params == null)
- {
- extraStartVirt = 0;
- extraEndVirt = 0;
- }
- else
- {
- extraStartVirt = params.extraStartVirt;
- extraEndVirt = params.extraEndVirt;
- newCaret = params.newCaret;
- }
- extendSelection(caret,newCaret,extraStartVirt,extraEndVirt);
- }
- else if(!multi)
- selectNone();
-
- moveCaretPosition(newCaret);
- }//}}}
-
- //{{{ lineContainsSpaceAndTabs() method
- /**
- * Check if the line contains only spaces and tabs.
- *
- * @param lineIndex the line index
- * @return <code>true</code> if the line contains only spaces and tabs
- */
- private boolean lineContainsSpaceAndTabs(int lineIndex)
- {
- final Segment lineSegment = new Segment();
- getLineText(lineIndex,lineSegment);
-
- for(int j = 0; j < lineSegment.count; j++)
- {
- switch(lineSegment.array[lineSegment.offset + j])
- {
- case ' ':
- case '\t':
- break;
- default:
- return false;
- }
- }
- return true;
- } //}}}
-
- //{{{ insert() method
- protected void insert(String str, boolean indent)
- {
- try
- {
- // Don't overstrike if we're on the end of
- // the line
- if(overwrite || indent)
- buffer.beginCompoundEdit();
-
- if(overwrite)
- {
- int caretLineEnd = getLineEndOffset(caretLine);
- if(caretLineEnd - caret > 1)
- buffer.remove(caret,1);
- }
-
- buffer.insert(caret,str);
-
- if(indent)
- buffer.indentLine(caretLine,true);
- }
- finally
- {
- if(overwrite || indent)
- buffer.endCompoundEdit();
- }
- } //}}}
-
- //{{{ insertTab() method
- private void insertTab()
- {
- int tabSize = buffer.getTabSize();
- if(buffer.getBooleanProperty("noTabs"))
- {
- int lineStart = getLineStartOffset(caretLine);
-
- String line = getText(lineStart,caret - lineStart);
-
- int pos = 0;
-
- for(int i = 0; i < line.length(); i++)
- {
- switch(line.charAt(pos))
- {
- case '\t':
- pos = 0;
- break;
- default:
- if(++pos >= tabSize)
- pos = 0;
- break;
- }
- }
-
- replaceSelection(StandardUtilities.createWhiteSpace(
- tabSize - pos,0));
- }
- else
- replaceSelection("\t");
- } //}}}
-
- //{{{ userInputTab() method
- protected void userInputTab()
- {
- if(getSelectionCount() == 1)
- {
- Selection sel = getSelection(0);
- if(sel instanceof Selection.Rect ||
- (sel.startLine == sel.endLine
- && (sel.start != buffer.getLineStartOffset(sel.startLine)
- || sel.end != buffer.getLineEndOffset(sel.startLine) - 1)))
- {
- insertTab();
- }
- else
- shiftIndentRight();
- }
- else if(getSelectionCount() != 0)
- shiftIndentRight();
- else
- insertTab();
- } //}}}
-
- //{{{ doWordWrap() method
- /**
- * Does hard wrap.
- */
- protected boolean doWordWrap(boolean spaceInserted)
- {
- if(!hardWrap || maxLineLen <= 0)
- return false;
-
- final Segment lineSegment = new Segment();
- buffer.getLineText(caretLine,lineSegment);
-
- int start = getLineStartOffset(caretLine);
- int end = getLineEndOffset(caretLine);
- int len = end - start - 1;
-
- int caretPos = caret - start;
-
- // only wrap if we're at the end of a line, or the rest of the
- // line text is whitespace
- for(int i = caretPos; i < len; i++)
- {
- char ch = lineSegment.array[lineSegment.offset + i];
- if(ch != ' ' && ch != '\t')
- return false;
- }
-
- int tabSize = buffer.getTabSize();
-
- String wordBreakChars = buffer.getStringProperty("wordBreakChars");
-
- int lastInLine = 0; // last character before wrap
- int logicalLength = 0; // length with tabs expanded
- int lastWordOffset = -1;
- boolean lastWasSpace = true;
- for(int i = 0; i < caretPos; i++)
- {
- char ch = lineSegment.array[lineSegment.offset + i];
- if(ch == '\t')
- {
- logicalLength += tabSize - (logicalLength % tabSize);
- if(!lastWasSpace && logicalLength <= maxLineLen)
- {
- lastInLine = i;
- lastWordOffset = i;
- lastWasSpace = true;
- }
- }
- else if(ch == ' ')
- {
- logicalLength++;
- if(!lastWasSpace &&
- logicalLength <= maxLineLen + 1)
- {
- lastInLine = i;
- lastWordOffset = i;
- lastWasSpace = true;
- }
- }
- else if(wordBreakChars != null && wordBreakChars.indexOf(ch) != -1)
- {
- logicalLength++;
- if(!lastWasSpace && logicalLength <= maxLineLen)
- {
- lastInLine = i;
- lastWordOffset = i;
- lastWasSpace = true;
- }
- }
- else
- {
- lastInLine = i;
- logicalLength++;
- lastWasSpace = false;
- }
- }
-
- boolean returnValue;
-
- int insertNewLineAt;
- if(spaceInserted && logicalLength == maxLineLen
- && lastInLine == caretPos - 1)
- {
- insertNewLineAt = caretPos;
- returnValue = true;
- }
- else if(logicalLength >= maxLineLen && lastWordOffset != -1)
- {
- insertNewLineAt = lastWordOffset;
- returnValue = false;
- }
- else
- return false;
-
- try
- {
- buffer.beginCompoundEdit();
- buffer.insert(start + insertNewLineAt,"\n");
- // caretLine would have been incremented
- // since insertNewLineAt <= caretPos
- buffer.indentLine(caretLine,true);
- }
- finally
- {
- buffer.endCompoundEdit();
- }
-
- /* only ever return true if space was pressed
- * with logicalLength == maxLineLen */
- return returnValue;
- } //}}}
-
- //{{{ updateStructureHighlightWithDelay() method
- private static void updateBracketHighlightWithDelay()
- {
- structureTimer.stop();
- structureTimer.start();
- } //}}}
-
- //{{{ updateStructureHighlight() method
- private void updateStructureHighlight()
- {
- if(!painter.isStructureHighlightEnabled()
- && !gutter.isStructureHighlightEnabled())
- return;
-
- for (StructureMatcher matcher : structureMatchers)
- {
- match = matcher.getMatch(this);
- if(match != null)
- break;
- }
-
- if(match != null)
- {
- if(caretLine < match.startLine)
- invalidateLineRange(caretLine,match.endLine);
- else
- invalidateLineRange(match.startLine,caretLine);
-
- if(!displayManager.isLineVisible(match.startLine)
- || chunkCache.getScreenLineOfOffset(
- match.startLine,match.start - getLineStartOffset(match.startLine))
- == -1)
- {
- showStructureStatusMessage(match.startLine < caretLine);
- }
- }
- } //}}}
-
- //{{{ showStructureStatusMessage() method
- private void showStructureStatusMessage(boolean backward)
- {
- String text = buffer.getLineText(match.startLine).trim();
- if(backward && match.startLine != 0 && text.length() == 1)
- {
- switch(text.charAt(0))
- {
- case '{': case '}':
- case '[': case ']':
- case '(': case ')':
- text = buffer.getLineText(match.startLine - 1)
- .trim() + ' ' + text;
- break;
- }
- }
-
- // get rid of embedded tabs not removed by trim()
- fireBracketSelected(match.startLine + 1,text.replace('\t',' '));
- } //}}}
-
- //{{{ recalculateLastPhysicalLine() method
- void recalculateLastPhysicalLine()
- {
- int oldScreenLastLine = screenLastLine;
- for(int i = visibleLines - 1; i >= 0; i--)
- {
- ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
- if(info.physicalLine != -1)
- {
- physLastLine = info.physicalLine;
- screenLastLine = i;
- break;
- }
- }
- invalidateScreenLineRange(oldScreenLastLine,screenLastLine);
- } //}}}
-
- //{{{ getRectParams() method
- private static class RectParams
- {
- final int extraStartVirt;
- final int extraEndVirt;
- final int newCaret;
-
- RectParams(int extraStartVirt, int extraEndVirt, int newCaret)
- {
- this.extraStartVirt = extraStartVirt;
- this.extraEndVirt = extraEndVirt;
- this.newCaret = newCaret;
- }
- }
-
- /**
- * Used when doing S+UP/DOWN to simplify dealing with virtual space.
- */
- private RectParams getRectParams(int caret, int newCaret)
- {
- Selection s = getSelectionAtOffset(caret);
- int virtualWidth;
- if(s instanceof Selection.Rect)
- {
- if(caret == s.end)
- {
- virtualWidth = buffer.getVirtualWidth(
- s.endLine,s.end - getLineStartOffset(
- s.endLine)) + ((Selection.Rect)s).extraEndVirt;
- }
- else
- {
- virtualWidth = buffer.getVirtualWidth(
- s.startLine,s.start - getLineStartOffset(
- s.startLine)) + ((Selection.Rect)s).extraStartVirt;
- }
- }
- else if(rectangularSelectionMode)
- {
- virtualWidth = buffer.getVirtualWidth(
- caretLine,caret - buffer.getLineStartOffset(caretLine));
- }
- else
- return null;
-
- int newLine = getLineOfOffset(newCaret);
- int[] totalVirtualWidth = new int[1];
- int newOffset = buffer.getOffsetOfVirtualColumn(newLine,
- virtualWidth,totalVirtualWidth);
- if(newOffset == -1)
- {
- int extraVirt = virtualWidth - totalVirtualWidth[0];
- newCaret = getLineEndOffset(newLine) - 1;
-
- boolean bias;
- if(s == null)
- bias = newCaret < caret;
- else if(s.start == caret)
- bias = newCaret <= s.end;
- else if(s.end == caret)
- bias = newCaret <= s.start;
- else
- bias = false;
-
- RectParams returnValue;
- if(bias)
- returnValue = new RectParams(extraVirt,0,newCaret);
- else
- returnValue = new RectParams(0,extraVirt,newCaret);
- return returnValue;
- }
- else
- {
- return new RectParams(0,0,getLineStartOffset(newLine)
- + newOffset);
- }
- } //}}}
-
- //{{{ delete() method
- private void delete(boolean forward)
- {
- if(!buffer.isEditable())
- {
- getToolkit().beep();
- return;
- }
-
- if(getSelectionCount() != 0)
- {
- Selection[] selections = getSelection();
- for(int i = 0; i < selections.length; i++)
- {
- Selection s = selections[i];
- if(s instanceof Selection.Rect)
- {
- Selection.Rect r = (Selection.Rect)s;
- int startColumn = r.getStartColumn(buffer);
- if(startColumn == r.getEndColumn(buffer))
- {
- if(!forward && startColumn == 0)
- getToolkit().beep();
- else
- tallCaretDelete(r,forward);
- }
- else
- setSelectedText(s,null);
- }
- else
- setSelectedText(s,null);
- }
- }
- else if(forward)
- {
- if(caret == buffer.getLength())
- {
- getToolkit().beep();
- return;
- }
-
- buffer.remove(caret,1);
- }
- else
- {
- if(caret == 0)
- {
- getToolkit().beep();
- return;
- }
-
- buffer.remove(caret - 1,1);
- }
- } //}}}
-
- //{{{ tallCaretDelete() method
- private void tallCaretDelete(Selection.Rect s, boolean forward)
- {
- try
- {
- buffer.beginCompoundEdit();
-
- int[] width = new int[1];
-
- int startCol = s.getStartColumn(buffer);
- int startLine = s.startLine;
- int endLine = s.endLine;
- for(int i = startLine; i <= endLine; i++)
- {
- int offset = buffer.getOffsetOfVirtualColumn(
- i,startCol,width);
- if(offset == -1)
- {
- if(width[0] == startCol)
- offset = getLineLength(i);
- else
- {
- if(i == startLine && !forward)
- shiftTallCaretLeft(s);
- continue;
- }
- }
- offset += buffer.getLineStartOffset(i);
- if(forward)
- {
- if(offset != buffer.getLineEndOffset(i) - 1)
- buffer.remove(offset,1);
- }
- else
- buffer.remove(offset-1,1);
- }
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- } //}}}
-
- //{{{ shiftTallCaretLeft() method
- private void shiftTallCaretLeft(Selection.Rect s)
- {
- removeFromSelection(s);
- addToSelection(new Selection.Rect(
- buffer,
- s.getStartLine(),s.getStartColumn(buffer) - 1,
- s.getEndLine(),s.getEndColumn(buffer) - 1));
- } //}}}
-
- //{{{ setMaxLineLength() method
- private void setMaxLineLength(int maxLineLen)
- {
- this.maxLineLen = maxLineLen;
-
- if(maxLineLen <= 0)
- {
- if(softWrap)
- {
- wrapToWidth = true;
- wrapMargin = painter.getWidth() - charWidth * 3;
- }
- else
- {
- wrapToWidth = false;
- wrapMargin = 0;
- }
- }
- else
- {
- // stupidity
- char[] foo = new char[maxLineLen];
- for(int i = 0; i < foo.length; i++)
- {
- foo[i] = ' ';
- }
- wrapToWidth = false;
- wrapMargin = (int)painter.getFont().getStringBounds(
- foo,0,foo.length,
- painter.getFontRenderContext())
- .getWidth();
- }
- } //}}}
-
- //{{{ addExplicitFold() method
- /**
- * Add an explicit fold.
- * You should call this method inside a compoundEdit in the buffer.
- * You must also check if the buffer fold mode is explicit before
- * calling this method.
- *
- * @param caretStart the starting offset
- * @param caretEnd the end offset
- * @param lineStart the start line
- * @param lineEnd the end line
- * @since jEdit 4.3pre3
- */
- protected int addExplicitFold(int caretStart, int caretEnd, int lineStart, int lineEnd)
- {
- // need to "fix" the caret position so that we get the right rule.
- // taking the start offset one char ahead and the end offset one char
- // behing makes sure we get the right rule for the text being
- // wrapped (tricky around mode boundaries, e.g., php code embedded
- // in HTML code)
- int startCaret = caretStart < buffer.getLength() ? caretStart + 1 : caretStart;
- int endCaret = caretEnd > 0 ? caretEnd - 1 : caretEnd;
-
- String startLineComment = buffer.getContextSensitiveProperty(startCaret,"lineComment");
- String startCommentStart = buffer.getContextSensitiveProperty(startCaret,"commentStart");
- String startCommentEnd = buffer.getContextSensitiveProperty(startCaret,"commentEnd");
- String endLineComment = buffer.getContextSensitiveProperty(endCaret,"lineComment");
- String endCommentStart = buffer.getContextSensitiveProperty(endCaret,"commentStart");
- String endCommentEnd = buffer.getContextSensitiveProperty(endCaret,"commentEnd");
-
- String start;
- int caretBack = 1;
- if(startLineComment != null)
- start = startLineComment + "{{{ ";
- else if(startCommentStart != null && startCommentEnd != null)
- {
- start = startCommentStart + "{{{ " + startCommentEnd;
- caretBack = 1 + startCommentStart.length();
- }
- else
- start = "{{{ ";
-
- if (startLineComment != null)
- {
- // add a new line if there's text after the comment
- // we're inserting
- if (buffer.getLineLength(lineStart) != caretStart)
- {
- start += '\n';
- }
- }
- else
- {
- // always insert a new line if there's no comment character.
- start += "\n";
- }
-
- String end;
- if(endLineComment != null)
- end = endLineComment + "}}}";
- else if(endCommentStart != null && endCommentEnd != null)
- end = endCommentStart + "}}}" + endCommentEnd;
- else
- end = "}}}";
-
- String line = buffer.getLineText(lineStart);
- String whitespace = line.substring(0,
- StandardUtilities.getLeadingWhiteSpace(line));
-
- if (endLineComment != null)
- {
- // if we're inserting a line comment into a non-empty
- // line, we'll need to add a line break so we don't
- // comment out existing code.
- if (buffer.getLineLength(lineEnd) != caretEnd)
- {
- end += '\n';
- }
- }
- else
- {
- // always insert a new line if there's no comment character.
- end += "\n";
- }
-
- if(caretEnd == buffer.getLineStartOffset(lineEnd))
- buffer.insert(caretEnd,end);
- else
- {
- CharSequence lineText = buffer.getSegment(caretEnd - 1, 1);
- if (Character.isWhitespace(lineText.charAt(0)))
- buffer.insert(caretEnd, end);
- else
- buffer.insert(caretEnd,' ' + end);
- }
-
- buffer.insert(caretStart,start + whitespace);
-
- return caretBack;
- } //}}}
-
- //{{{ rangeLineComment() method
- /**
- * This method will surround each selected line with a range comment.
- * This is used when calling line comment if the edit mode doesn't have
- * a line comment property
- * @since jEdit 4.3pre10
- */
- private void rangeLineComment()
- {
- String commentStart = buffer.getContextSensitiveProperty(caret,"commentStart");
- String commentEnd = buffer.getContextSensitiveProperty(caret,"commentEnd");
- if(!buffer.isEditable() || commentStart == null || commentEnd == null
- || commentStart.length() == 0 || commentEnd.length() == 0)
- {
- getToolkit().beep();
- return;
- }
-
- commentStart += ' ';
- commentEnd = ' ' + commentEnd;
-
-
- try
- {
- buffer.beginCompoundEdit();
- int[] lines = getSelectedLines();
- for(int i = 0; i < lines.length; i++)
- {
- String text = getLineText(lines[i]);
- if (text.trim().length() == 0)
- continue;
- buffer.insert(getLineEndOffset(lines[i]) - 1,
- commentEnd);
- buffer.insert(getLineStartOffset(lines[i])
- + StandardUtilities.getLeadingWhiteSpace(text),
- commentStart);
- }
- }
- finally
- {
- buffer.endCompoundEdit();
- }
- } //}}}
-
- //{{{ joinLine() method
- /**
- * Join a line with the next line.
- * If you use this method you have to lock the buffer in compound edit mode.
- * @param line the line number that will be joined with the next line
- */
- private void joinLineAt(int line)
- {
- if (line >= buffer.getLineCount() - 1)
- return;
- int end = getLineEndOffset(line);
- CharSequence nextLineText = buffer.getLineSegment(line + 1);
- buffer.remove(end - 1,StandardUtilities.getLeadingWhiteSpace(
- nextLineText) + 1);
- if (nextLineText.length() != 0)
- buffer.insert(end - 1, " ");
- } //}}}
- //}}}
-
- //{{{ isRightClickPopupEnabled() method
- /**
- * Returns if the right click popup menu is enabled. The Gestures
- * plugin uses this API.
- * @since jEdit 4.2pre13
- */
- public boolean isRightClickPopupEnabled()
- {
- return popupEnabled;
- } //}}}
-
- //{{{ setRightClickPopupEnabled() method
- /**
- * Sets if the right click popup menu is enabled. The Gestures
- * plugin uses this API.
- * @since jEdit 4.2pre13
- */
- public void setRightClickPopupEnabled(boolean popupEnabled)
- {
- this.popupEnabled = popupEnabled;
- } //}}}
-
- //{{{ getRightClickPopup() method
- /**
- * Returns the right click popup menu.
- */
- public final JPopupMenu getRightClickPopup()
- {
- return popup;
- } //}}}
-
- //{{{ setRightClickPopup() method
- /**
- * Sets the right click popup menu.
- * @param popup The popup
- */
- public final void setRightClickPopup(JPopupMenu popup)
- {
- this.popup = popup;
- } //}}}
-
- //{{{ handlePopupTrigger() method
- /**
- * Do the same thing as right-clicking on the text area. The Gestures
- * plugin uses this API.
- * @since jEdit 4.2pre13
- */
- public void handlePopupTrigger(MouseEvent evt)
- {
- // Rebuild popup menu every time the menu is requested.
- createPopupMenu(evt);
-
- int x = evt.getX();
- int y = evt.getY();
-
- int dragStart = xyToOffset(x,y,
- !(painter.isBlockCaretEnabled()
- || isOverwriteEnabled()));
-
- if(getSelectionCount() == 0 || multi)
- moveCaretPosition(dragStart,false);
- showPopupMenu(popup,this,x,y,false);
- } //}}}
-
- //{{{ createPopupMenu() method
- /**
- * Creates the popup menu.
- * @since 4.3pre15
- */
- public void createPopupMenu(MouseEvent evt)
- {
- if (popup == null)
- popup = new JPopupMenu();
- } //}}}
-
- //{{{ showPopupMenu() method
- /**
- * Shows the popup menu below the current caret position.
- * @since 4.3pre10
- */
- public void showPopupMenu()
- {
- if (!popup.isVisible() && hasFocus())
- {
- Point caretPos = offsetToXY(getCaretPosition());
- if (caretPos != null)
- {
- // Open the context menu below the caret
- int charHeight = getPainter().getFontMetrics().getHeight();
- showPopupMenu(popup,
- painter,caretPos.x,caretPos.y + charHeight,true);
- }
- }
- } //}}}
-
- //{{{ showPopupMenu() method - copied from GUIUtilities
- /**
- * Shows the specified popup menu, ensuring it is displayed within
- * the bounds of the screen.
- * @param popup The popup menu
- * @param comp The component to show it for
- * @param x The x co-ordinate
- * @param y The y co-ordinate
- * @param point If true, then the popup originates from a single point;
- * otherwise it will originate from the component itself. This affects
- * positioning in the case where the popup does not fit onscreen.
- *
- * @since jEdit 4.1pre1
- */
- private static void showPopupMenu(JPopupMenu popup, Component comp,
- int x, int y, boolean point)
- {
- int offsetX = 0;
- int offsetY = 0;
-
- int extraOffset = point ? 1 : 0;
-
- Component win = comp;
- while(!(win instanceof Window || win == null))
- {
- offsetX += win.getX();
- offsetY += win.getY();
- win = win.getParent();
- }
-
- if(win != null)
- {
- Dimension size = popup.getPreferredSize();
-
- Rectangle screenSize = GraphicsEnvironment
- .getLocalGraphicsEnvironment().getMaximumWindowBounds();
-
- if(x + offsetX + size.width + win.getX() > screenSize.width
- && x + offsetX + win.getX() >= size.width)
- {
- //System.err.println("x overflow");
- if(point)
- x -= size.width + extraOffset;
- else
- x = win.getWidth() - size.width - offsetX + extraOffset;
- }
- else
- {
- x += extraOffset;
- }
-
- //System.err.println("y=" + y + ",offsetY=" + offsetY
- // + ",size.height=" + size.height
- // + ",win.height=" + win.getHeight());
- if(y + offsetY + size.height + win.getY() > screenSize.height
- && y + offsetY + win.getY() >= size.height)
- {
- if(point)
- y = win.getHeight() - size.height - offsetY + extraOffset;
- else
- y = -size.height - 1;
- }
- else
- {
- y += extraOffset;
- }
-
- popup.show(comp,x,y);
- }
- else
- popup.show(comp,x + extraOffset,y + extraOffset);
-
- } //}}}
-
- //{{{ Inner classes
-
- //{{{ CaretBlinker class
- private static class CaretBlinker implements ActionListener
- {
- //{{{ actionPerformed() method
- public void actionPerformed(ActionEvent evt)
- {
- if(focusedComponent != null && focusedComponent.hasFocus())
- focusedComponent.blinkCaret();
- } //}}}
- } //}}}
-
- //{{{ MutableCaretEvent class
- private class MutableCaretEvent extends CaretEvent
- {
- //{{{ MutableCaretEvent constructor
- MutableCaretEvent()
- {
- super(TextArea.this);
- } //}}}
-
- //{{{ getDot() method
- @Override
- public int getDot()
- {
- return getCaretPosition();
- } //}}}
-
- //{{{ getMark() method
- @Override
- public int getMark()
- {
- return getMarkPosition();
- } //}}}
- } //}}}
-
- //{{{ AdjustHandler class
- private class AdjustHandler implements AdjustmentListener
- {
- //{{{ adjustmentValueChanged() method
- public void adjustmentValueChanged(AdjustmentEvent evt)
- {
- if(!scrollBarsInitialized)
- return;
-
- if(evt.getAdjustable() == vertical)
- setFirstLine(vertical.getValue());
- else
- setHorizontalOffset(-horizontal.getValue());
- } //}}}
- } //}}}
-
- //{{{ FocusHandler class
- private class FocusHandler implements FocusListener
- {
- //{{{ focusGained() method
- public void focusGained(FocusEvent evt)
- {
- if(bufferChanging)
- return;
-
- if(match != null)
- {
- if(caretLine < match.startLine)
- invalidateLineRange(caretLine,match.endLine);
- else
- invalidateLineRange(match.startLine,caretLine);
- }
- else
- invalidateLine(caretLine);
-
- focusedComponent = TextArea.this;
- } //}}}
-
- //{{{ focusLost() method
- public void focusLost(FocusEvent evt)
- {
- if(!isShowing())
- return;
-
- if(match != null)
- {
- if(caretLine < match.startLine)
- invalidateLineRange(caretLine,match.endLine);
- else
- invalidateLineRange(match.startLine,caretLine);
- }
- else
- invalidateLine(caretLine);
- } //}}}
- } //}}}
-
- //{{{ MouseWheelHandler class
- private class MouseWheelHandler implements MouseWheelListener
- {
- public void mouseWheelMoved(MouseWheelEvent e)
- {
- /****************************************************
- * move caret depending on pressed control-keys:
- * - Alt: move cursor, do not select
- * - Alt+(shift or control): move cursor, select
- * - shift: scroll horizontally
- * - control: scroll single line
- * - <else>: scroll 3 lines
- ****************************************************/
- if(e.isAltDown())
- {
- boolean select = e.isShiftDown()
- || e.isControlDown();
- if(e.getWheelRotation() < 0)
- goToPrevLine(select);
- else
- goToNextLine(select);
- }
- else if(e.getScrollType()
- == MouseWheelEvent.WHEEL_BLOCK_SCROLL)
- {
- if(e.isShiftDown())
- {
- // Wheel orientation is reversed so we negate the charwidth
- _setHorizontalOffset(getHorizontalOffset()
- + (e.getWheelRotation() > 0 ? 1 : -1) * painter.getWidth());
- }
- else
- {
- if(e.getWheelRotation() > 0)
- scrollDownPage();
- else
- scrollUpPage();
- }
- }
- else if(e.isControlDown() && e.isShiftDown())
- {
- if(e.getWheelRotation() > 0)
- scrollDownPage();
- else
- scrollUpPage();
- }
- else if(e.isControlDown())
- {
- setFirstLine(getFirstLine()
- + e.getWheelRotation());
- }
- else if(e.getScrollType()
- == MouseWheelEvent.WHEEL_UNIT_SCROLL)
- {
- if(e.isShiftDown())
- {
- _setHorizontalOffset(getHorizontalOffset()
- + (-charWidth * e.getUnitsToScroll()));
- }
- else
- {
- setFirstLine(getFirstLine()
- + e.getUnitsToScroll());
- }
- }
- else
- {
- if(e.isShiftDown())
- {
- _setHorizontalOffset(getHorizontalOffset()
- + (-charWidth * e.getWheelRotation()));
- }
- else
- {
- setFirstLine(getFirstLine()
- + 3 * e.getWheelRotation());
- }
- }
- }
- } //}}}
-
- //}}}
-
- //{{{ Class initializer
- static
- {
- caretTimer = new Timer(500,new CaretBlinker());
- caretTimer.setInitialDelay(500);
- caretTimer.start();
-
- structureTimer = new Timer(100,new ActionListener()
- {
- public void actionPerformed(ActionEvent evt)
- {
- if(focusedComponent != null)
- focusedComponent.updateStructureHighlight();
- }
- });
- structureTimer.setInitialDelay(100);
- structureTimer.setRepeats(false);
- } //}}}
-}
+/*
+ * TextArea.java - Abstract jEdit Text Area component
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2005 Slava Pestov
+ * Portions copyright (C) 2000 Ollie Rutherfurd
+ * Portions copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+
+import java.util.EventObject;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.TooManyListenersException;
+
+import javax.swing.*;
+import javax.swing.event.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.awt.im.InputMethodRequests;
+
+import javax.swing.plaf.metal.MetalLookAndFeel;
+import javax.swing.text.Segment;
+
+import org.gjt.sp.jedit.Debug;
+import org.gjt.sp.jedit.IPropertyManager;
+import org.gjt.sp.jedit.JEditActionContext;
+import org.gjt.sp.jedit.JEditActionSet;
+import org.gjt.sp.jedit.JEditBeanShellAction;
+import org.gjt.sp.jedit.TextUtilities;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.input.AbstractInputHandler;
+import org.gjt.sp.jedit.input.DefaultInputHandlerProvider;
+import org.gjt.sp.jedit.input.InputHandlerProvider;
+import org.gjt.sp.jedit.input.TextAreaInputHandler;
+import org.gjt.sp.jedit.syntax.Chunk;
+import org.gjt.sp.jedit.syntax.DefaultTokenHandler;
+import org.gjt.sp.jedit.syntax.Token;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
+import org.gjt.sp.util.ThreadUtilities;
+
+/** Abstract TextArea component.
+ *
+ * The concrete instance used by jEdit itself is called the JEditTextArea.
+ *
+ * This class uses a minimal set of jEdit APIs because it is the base class of the
+ * JEditEmbeddedTextArea and StandaloneTextArea, so it needs to be embeddable and separable.
+ *
+ * @author Slava Pestov
+ * @author kpouer (rafactoring into standalone text area)
+ * @version $Id: TextArea.java 19548 2011-06-08 20:50:08Z ezust $
+ */
+public abstract class TextArea extends JComponent
+{
+ //{{{ TextArea constructor
+ /**
+ * Creates a new JEditTextArea.
+ * @param propertyManager the property manager that contains informations like shortcut bindings
+ * @param inputHandlerProvider the inputHandlerProvider
+ */
+ protected TextArea(IPropertyManager propertyManager, InputHandlerProvider inputHandlerProvider)
+ {
+ this.inputHandlerProvider = inputHandlerProvider;
+ enableEvents(AWTEvent.FOCUS_EVENT_MASK | AWTEvent.KEY_EVENT_MASK);
+
+ //{{{ Initialize some misc. stuff
+ selectionManager = new SelectionManager(this);
+ chunkCache = new ChunkCache(this);
+ painter = new TextAreaPainter(this);
+ gutter = new Gutter(this);
+ gutter.setMouseActionsProvider(new MouseActions(propertyManager, "gutter"));
+ listenerList = new EventListenerList();
+ caretEvent = new MutableCaretEvent();
+ blink = true;
+ offsetXY = new Point();
+ structureMatchers = new LinkedList<StructureMatcher>();
+ structureMatchers.add(new StructureMatcher.BracketMatcher());
+ //}}}
+
+ //{{{ Initialize the GUI
+ setLayout(new ScrollLayout());
+ add(ScrollLayout.CENTER,painter);
+ add(ScrollLayout.LEFT,gutter);
+
+ // some plugins add stuff in a "right-hand" gutter
+ verticalBox = new Box(BoxLayout.X_AXIS);
+ verticalBox.add(vertical = new JScrollBar(Adjustable.VERTICAL));
+ vertical.setRequestFocusEnabled(false);
+ add(ScrollLayout.RIGHT,verticalBox);
+ add(ScrollLayout.BOTTOM,
+ horizontal = new JScrollBar(Adjustable.HORIZONTAL));
+ horizontal.setRequestFocusEnabled(false);
+
+ horizontal.setValues(0,0,0,0);
+ //}}}
+
+ //{{{ this ensures that the text area's look is slightly
+ // more consistent with the rest of the metal l&f.
+ // while it depends on not-so-well-documented portions
+ // of Swing, it only affects appearance, so future
+ // breakage shouldn't matter
+ if(UIManager.getLookAndFeel() instanceof MetalLookAndFeel)
+ {
+ setBorder(new TextAreaBorder());
+ vertical.putClientProperty("JScrollBar.isFreeStanding",
+ Boolean.FALSE);
+ horizontal.putClientProperty("JScrollBar.isFreeStanding",
+ Boolean.FALSE);
+ //horizontal.setBorder(null);
+ }
+ //}}}
+
+ //{{{ Add some event listeners
+ vertical.addAdjustmentListener(new AdjustHandler());
+ horizontal.addAdjustmentListener(new AdjustHandler());
+
+
+ addFocusListener(new FocusHandler());
+ addMouseWheelListener(new MouseWheelHandler());
+
+ //}}}
+
+ // This doesn't seem very correct, but it fixes a problem
+ // when setting the initial caret position for a buffer
+ // (eg, from the recent file list)
+ focusedComponent = this;
+
+ popupEnabled = true;
+ } //}}}
+
+ //{{{ getFoldPainter() method
+ public FoldPainter getFoldPainter()
+ {
+ return new TriangleFoldPainter();
+ } //}}}
+
+ //{{{ initInputHandler() method
+ /**
+ * Creates an actionContext and initializes the input
+ * handler for this textarea. Called when creating
+ * a standalone textarea from within jEdit.
+ */
+ public void initInputHandler()
+ {
+ actionContext = new JEditActionContext<JEditBeanShellAction, JEditActionSet<JEditBeanShellAction>>()
+ {
+ @Override
+ public void invokeAction(EventObject evt, JEditBeanShellAction action)
+ {
+ action.invoke(TextArea.this);
+ }
+ };
+
+ setMouseHandler(new TextAreaMouseHandler(this));
+ inputHandlerProvider = new DefaultInputHandlerProvider(new TextAreaInputHandler(this)
+ {
+ @Override
+ protected JEditBeanShellAction getAction(String action)
+ {
+ return actionContext.getAction(action);
+ }
+ });
+ } //}}}
+
+ //{{{ getActionContext() method
+ public JEditActionContext<JEditBeanShellAction,JEditActionSet<JEditBeanShellAction>> getActionContext()
+ {
+ return actionContext;
+ } //}}}
+
+ //{{{ setMouseHandler() method
+ public void setMouseHandler(MouseInputAdapter mouseInputAdapter)
+ {
+ mouseHandler = mouseInputAdapter;
+ painter.addMouseListener(mouseHandler);
+ painter.addMouseMotionListener(mouseHandler);
+ } //}}}
+
+ //{{{ setTransferHandler() method
+ @Override
+ public void setTransferHandler(TransferHandler newHandler)
+ {
+ super.setTransferHandler(newHandler);
+ try
+ {
+ getDropTarget().addDropTargetListener(
+ new TextAreaDropHandler(this));
+ }
+ catch(TooManyListenersException e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ } //}}}
+
+ //{{{ toString() method
+ @Override
+ public String toString()
+ {
+ StringBuilder builder = new StringBuilder();
+ String baseVersion = super.toString();
+ int len = baseVersion.length() - 1;
+ builder.append(baseVersion);
+ builder.setLength(len); // chop off the last ]
+ builder.append(",caret=").append(caret);
+ builder.append(",caretLine=").append(caretLine);
+ builder.append(",caretScreenLine=").append(caretScreenLine);
+ builder.append(",electricScroll=").append(electricScroll);
+ builder.append(",horizontalOffset=").append(horizontalOffset);
+ builder.append(",magicCaret=").append(magicCaret);
+ builder.append(",offsetXY=").append(offsetXY.toString());
+ builder.append(",oldCaretLine=").append(oldCaretLine);
+ builder.append(",screenLastLine=").append(screenLastLine);
+ builder.append(",visibleLines=").append(visibleLines);
+ builder.append(",firstPhysicalLine=").append(getFirstPhysicalLine());
+ builder.append(",physLastLine=").append(physLastLine).append("]");
+ return builder.toString();
+ } //}}}
+
+ //{{{ dispose() method
+ /**
+ * Plugins and macros should not call this method.
+ * @since jEdit 4.2pre1
+ */
+ public void dispose()
+ {
+ DisplayManager.textAreaDisposed(this);
+ gutter.dispose();
+ } //}}}
+
+ //{{{ getInputHandler() method
+ /**
+ * @since jEdit 4.3pre1
+ */
+ public AbstractInputHandler getInputHandler()
+ {
+
+ return inputHandlerProvider.getInputHandler();
+ } //}}}
+
+ //{{{ getPainter() method
+ /**
+ * Returns the object responsible for painting this text area.
+ */
+ public final TextAreaPainter getPainter()
+ {
+ return painter;
+ } //}}}
+
+ //{{{ getGutter() method
+ /**
+ * Returns the gutter to the left of the text area or null if the gutter
+ * is disabled
+ */
+ public final Gutter getGutter()
+ {
+ return gutter;
+ } //}}}
+
+ //{{{ getDisplayManager() method
+ /**
+ * @return the display manager used by this text area.
+ * @since jEdit 4.2pre1
+ */
+ public DisplayManager getDisplayManager()
+ {
+ return displayManager;
+ } //}}}
+
+ //{{{ isCaretBlinkEnabled() method
+ /**
+ * @return true if the caret is blinking, false otherwise.
+ */
+ public final boolean isCaretBlinkEnabled()
+ {
+ return caretBlinks;
+ } //}}}
+
+ //{{{ setCaretBlinkEnabled() method
+ /**
+ * Toggles caret blinking.
+ * @param caretBlinks True if the caret should blink, false otherwise
+ */
+ public void setCaretBlinkEnabled(boolean caretBlinks)
+ {
+ this.caretBlinks = caretBlinks;
+ if(!caretBlinks)
+ blink = false;
+
+ if(buffer != null)
+ invalidateLine(caretLine);
+ } //}}}
+
+ //{{{ getElectricScroll() method
+
+ /**
+ * @return the minimum distance (in number of lines)
+ * from the caret to the nearest edge of the screen
+ * (top or bottom edge).
+ */
+ public final int getElectricScroll()
+ {
+ return electricScroll;
+ } //}}}
+
+ //{{{ setElectricScroll() method
+ /**
+ * Sets the number of lines from the top and bottom of the text
+ * area that are always visible
+ * @param electricScroll The number of lines always visible from
+ * the top or bottom
+ */
+ public final void setElectricScroll(int electricScroll)
+ {
+ this.electricScroll = electricScroll;
+ } //}}}
+
+ //{{{ isQuickCopyEnabled() method
+ /**
+ * Returns if clicking the middle mouse button pastes the most
+ * recent selection (% register), and if Control-dragging inserts
+ * the selection at the caret.
+ */
+ public final boolean isQuickCopyEnabled()
+ {
+ return quickCopy;
+ } //}}}
+
+ //{{{ setQuickCopyEnabled() method
+ /**
+ * Sets if clicking the middle mouse button pastes the most
+ * recent selection (% register), and if Control-dragging inserts
+ * the selection at the caret.
+ * @param quickCopy A boolean flag
+ */
+ public final void setQuickCopyEnabled(boolean quickCopy)
+ {
+ this.quickCopy = quickCopy;
+ } //}}}
+
+ //{{{ getBuffer() method
+ /**
+ * Returns the buffer this text area is editing.
+ * @since jedit 4.3pre3
+ *
+ * Prior to 4.3pre3, this function returned a "Buffer" type.
+ * If this causes your code to break, try calling view.getBuffer() instead of
+ * view.getTextArea().getBuffer().
+ *
+ */
+ public final JEditBuffer getBuffer()
+ {
+ return buffer;
+ } //}}}
+
+ //{{{ setBuffer() method
+ /**
+ * Sets the buffer this text area is editing.
+ * If you don't run a standalone textarea in jEdit please do not call this method -
+ * use {@link org.gjt.sp.jedit.EditPane#setBuffer(org.gjt.sp.jedit.Buffer)} instead.
+ * @param buffer The buffer
+ */
+ public void setBuffer(JEditBuffer buffer)
+ {
+ if(this.buffer == buffer)
+ return;
+
+ try
+ {
+ bufferChanging = true;
+
+ if(this.buffer != null)
+ {
+ // dubious?
+ //setFirstLine(0);
+
+ if(!this.buffer.isLoading())
+ selectNone();
+ caretLine = caret = caretScreenLine = 0;
+ match = null;
+ }
+ boolean inCompoundEdit = false;
+ if (this.buffer != null)
+ inCompoundEdit = this.buffer.insideCompoundEdit();
+ if (inCompoundEdit)
+ this.buffer.endCompoundEdit();
+ this.buffer = buffer;
+ if (inCompoundEdit)
+ this.buffer.beginCompoundEdit();
+
+ chunkCache.setBuffer(buffer);
+ gutter.setBuffer(buffer);
+ propertiesChanged();
+
+ if(displayManager != null)
+ {
+ displayManager.release();
+ }
+
+ displayManager = DisplayManager.getDisplayManager(
+ buffer,this);
+
+ displayManager.init();
+
+ if(buffer.isLoading())
+ updateScrollBar();
+
+ repaint();
+
+ fireScrollEvent(true);
+ }
+ finally
+ {
+ bufferChanging = false;
+ }
+ } //}}}
+
+ //{{{ isEditable() method
+ /**
+ * Returns true if this text area is editable, false otherwise.
+ */
+ public final boolean isEditable()
+ {
+ return buffer.isEditable();
+ } //}}}
+
+ //{{{ isDragEnabled() method
+ /**
+ * Returns if drag and drop of text is enabled.
+ * @since jEdit 4.2pre5
+ */
+ public boolean isDragEnabled()
+ {
+ return dndEnabled;
+ } //}}}
+
+ //{{{ setDragEnabled() method
+ /**
+ * Sets if drag and drop of text is enabled.
+ * @since jEdit 4.2pre5
+ */
+ public void setDragEnabled(boolean dndEnabled)
+ {
+ this.dndEnabled = dndEnabled;
+ } //}}}
+
+ //{{{ getJoinNonWordChars() method
+ /**
+ * If set, double clicking will join non-word characters to form one "word".
+ * @since jEdit 4.3pre2
+ */
+ public boolean getJoinNonWordChars()
+ {
+ return joinNonWordChars;
+ } //}}}
+
+ //{{{ setJoinNonWordChars() method
+ /**
+ * If set, double clicking will join non-word characters to form one "word".
+ * @since jEdit 4.3pre2
+ */
+ public void setJoinNonWordChars(boolean joinNonWordChars)
+ {
+ this.joinNonWordChars = joinNonWordChars;
+ } //}}}
+
+ //{{{ getCtrlForRectangularSelection() method
+ /**
+ * If set, CTRL enables rectangular selection mode while pressed.
+ * @since jEdit 4.3pre10
+ */
+ public boolean isCtrlForRectangularSelection()
+ {
+ return ctrlForRectangularSelection;
+ } //}}}
+
+ //{{{ setCtrlForRectangularSelection() method
+ /**
+ * If set, CTRL enables rectangular selection mode while pressed.
+ * @since jEdit 4.3pre10
+ */
+ public void setCtrlForRectangularSelection(boolean ctrlForRectangularSelection)
+ {
+ this.ctrlForRectangularSelection = ctrlForRectangularSelection;
+ } //}}}
+
+ //{{{ Scrolling
+
+ //{{{ getFirstLine() method
+ /**
+ * Returns the vertical scroll bar position.
+ * @since jEdit 4.2pre1
+ */
+ public final int getFirstLine()
+ {
+ return displayManager.firstLine.scrollLine
+ + displayManager.firstLine.skew;
+ } //}}}
+
+ //{{{ setFirstLine() method
+ /**
+ * Sets the vertical scroll bar position
+ *
+ * @param firstLine The scroll bar position
+ */
+ public void setFirstLine(int firstLine)
+ {
+ //{{{ ensure we don't have empty space at the bottom or top, etc
+ int max = displayManager.getScrollLineCount() - visibleLines
+ + (lastLinePartial ? 1 : 0);
+ if(firstLine > max)
+ firstLine = max;
+ if(firstLine < 0)
+ firstLine = 0;
+ //}}}
+
+ if(Debug.SCROLL_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"setFirstLine() from "
+ + getFirstLine() + " to " + firstLine);
+ }
+
+ int oldFirstLine = getFirstLine();
+ if(firstLine == oldFirstLine)
+ return;
+
+ displayManager.setFirstLine(oldFirstLine,firstLine);
+
+ repaint();
+
+ fireScrollEvent(true);
+ } //}}}
+
+ //{{{ getFirstPhysicalLine() method
+ /**
+ * Returns the first visible physical line index.
+ * @since jEdit 4.0pre4
+ */
+ public final int getFirstPhysicalLine()
+ {
+ return displayManager.firstLine.physicalLine;
+ } //}}}
+
+ //{{{ setFirstPhysicalLine() methods
+ /**
+ * Sets the vertical scroll bar position.
+ * @param physFirstLine The first physical line to display
+ * @since jEdit 4.2pre1
+ */
+ public void setFirstPhysicalLine(int physFirstLine)
+ {
+ setFirstPhysicalLine(physFirstLine,0);
+ }
+
+ /**
+ * Sets the vertical scroll bar position.
+ * @param physFirstLine The first physical line to display
+ * @param skew A local screen line delta
+ * @since jEdit 4.2pre1
+ */
+ public void setFirstPhysicalLine(int physFirstLine, int skew)
+ {
+ if(Debug.SCROLL_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"setFirstPhysicalLine("
+ + physFirstLine + ',' + skew + ')');
+ }
+
+ int amount = physFirstLine - displayManager.firstLine.physicalLine;
+
+ displayManager.setFirstPhysicalLine(amount,skew);
+
+ repaint();
+
+ fireScrollEvent(true);
+ } //}}}
+
+ //{{{ getLastPhysicalLine() method
+ /**
+ * Returns the last visible physical line index.
+ * @since jEdit 4.0pre4
+ */
+ public final int getLastPhysicalLine()
+ {
+ return physLastLine;
+ } //}}}
+
+ //{{{ getLastScreenLine() method
+ /**
+ * Returns the last screen line index, it is different from
+ * {@link #getVisibleLines()} because the buffer can have less lines than
+ * the visible lines
+ * @return the last screen line index.
+ * @since jEdit 4.3pre1
+ */
+ public int getLastScreenLine()
+ {
+ return screenLastLine;
+ } //}}}
+
+ //{{{ getVisibleLines() method
+ /**
+ * Returns the number of lines visible in this text area.
+ * @return the number of visible lines in the textarea
+ */
+ public final int getVisibleLines()
+ {
+ return visibleLines;
+ } //}}}
+
+ //{{{ getHorizontalOffset() method
+ /**
+ * Returns the horizontal offset of drawn lines.
+ */
+ public final int getHorizontalOffset()
+ {
+ return horizontalOffset;
+ } //}}}
+
+ //{{{ setHorizontalOffset() method
+ /**
+ * Sets the horizontal offset of drawn lines. This can be used to
+ * implement horizontal scrolling.
+ * @param horizontalOffset offset The new horizontal offset
+ */
+ public void setHorizontalOffset(int horizontalOffset)
+ {
+ if(horizontalOffset > 0)
+ horizontalOffset = 0;
+
+ if(horizontalOffset == this.horizontalOffset)
+ return;
+
+ this.horizontalOffset = horizontalOffset;
+ painter.repaint();
+
+ fireScrollEvent(false);
+ } //}}}
+
+ //{{{ scrollUpLine() method
+ /**
+ * Scrolls up by one line.
+ * @since jEdit 2.7pre2
+ */
+ public void scrollUpLine()
+ {
+ setFirstLine(getFirstLine() - 1);
+ } //}}}
+
+ //{{{ scrollUpPage() method
+ /**
+ * Scrolls up by one page.
+ * @since jEdit 2.7pre2
+ */
+ public void scrollUpPage()
+ {
+ setFirstLine(getFirstLine() - getVisibleLines()
+ + (lastLinePartial ? 1 : 0));
+ } //}}}
+
+ //{{{ scrollDownLine() method
+ /**
+ * Scrolls down by one line.
+ * @since jEdit 2.7pre2
+ */
+ public void scrollDownLine()
+ {
+ setFirstLine(getFirstLine() + 1);
+ } //}}}
+
+ //{{{ scrollDownPage() method
+ /**
+ * Scrolls down by one page.
+ * @since jEdit 2.7pre2
+ */
+ public void scrollDownPage()
+ {
+ setFirstLine(getFirstLine() + getVisibleLines()
+ - (lastLinePartial ? 1 : 0));
+ } //}}}
+
+ //{{{ scrollToCaret() method
+ /**
+ * Ensures that the caret is visible by scrolling the text area if
+ * necessary.
+ * @param doElectricScroll If true, electric scrolling will be performed
+ */
+ public void scrollToCaret(boolean doElectricScroll)
+ {
+ scrollTo(caretLine,caret - buffer.getLineStartOffset(caretLine),
+ doElectricScroll);
+ } //}}}
+
+ //{{{ scrollTo() methods
+ /**
+ * Ensures that the specified location in the buffer is visible.
+ * @param offset The offset from the start of the buffer
+ * @param doElectricScroll If true, electric scrolling will be performed
+ * @since jEdit 4.2pre3
+ */
+ public void scrollTo(int offset, boolean doElectricScroll)
+ {
+ int line = buffer.getLineOfOffset(offset);
+ scrollTo(line,offset - buffer.getLineStartOffset(line),
+ doElectricScroll);
+ }
+
+ /**
+ * Ensures that the specified location in the buffer is visible.
+ * @param line The line number
+ * @param offset The offset from the start of the line
+ * @param doElectricScroll If true, electric scrolling will be performed
+ * @since jEdit 4.0pre6
+ */
+ public void scrollTo(int line, int offset, boolean doElectricScroll)
+ {
+ if(Debug.SCROLL_TO_DEBUG)
+ Log.log(Log.DEBUG,this,"scrollTo(), lineCount="
+ + getLineCount());
+
+ if(visibleLines <= 1)
+ {
+ if(Debug.SCROLL_TO_DEBUG)
+ Log.log(Log.DEBUG,this,"visibleLines <= 0");
+ // Fix the case when the line is wrapped
+ // it was not possible to see the second (or next)
+ // subregion of a line
+ ChunkCache.LineInfo[] infos = chunkCache
+ .getLineInfosForPhysicalLine(line);
+ int subregion = ChunkCache.getSubregionOfOffset(
+ offset,infos);
+ setFirstPhysicalLine(line,subregion);
+ return;
+ }
+
+ //{{{ Get ready
+ int extraEndVirt;
+ int lineLength = buffer.getLineLength(line);
+ if(offset > lineLength)
+ {
+ extraEndVirt = charWidth * (offset - lineLength);
+ offset = lineLength;
+ }
+ else
+ extraEndVirt = 0;
+
+ int _electricScroll = doElectricScroll
+ && visibleLines - 1 > (electricScroll << 1)
+ ? electricScroll : 0;
+ //}}}
+
+ //{{{ Scroll vertically
+ int screenLine = chunkCache.getScreenLineOfOffset(line,offset);
+ int visibleLines = getVisibleLines();
+ if(screenLine == -1)
+ {
+ // We are scrolling to a position that is not on the screen.
+ if(Debug.SCROLL_TO_DEBUG)
+ Log.log(Log.DEBUG,this,"screenLine == -1");
+ ChunkCache.LineInfo[] infos = chunkCache
+ .getLineInfosForPhysicalLine(line);
+ int subregion = ChunkCache.getSubregionOfOffset(
+ offset,infos);
+ int prevLine = displayManager.getPrevVisibleLine(getFirstPhysicalLine());
+ int nextLine = displayManager.getNextVisibleLine(getLastPhysicalLine());
+ if(line == getFirstPhysicalLine())
+ {
+ if(Debug.SCROLL_TO_DEBUG)
+ Log.log(Log.DEBUG,this,line + " == " + getFirstPhysicalLine());
+ setFirstPhysicalLine(line,subregion
+ - _electricScroll);
+ }
+ else if(line == prevLine)
+ {
+ if(Debug.SCROLL_TO_DEBUG)
+ Log.log(Log.DEBUG,this,line + " == " + prevLine);
+ setFirstPhysicalLine(prevLine,subregion
+ - _electricScroll);
+ }
+ else if(line == getLastPhysicalLine())
+ {
+ if(Debug.SCROLL_TO_DEBUG)
+ Log.log(Log.DEBUG,this,line + " == " + getLastPhysicalLine());
+ setFirstPhysicalLine(line,
+ subregion + _electricScroll
+ - visibleLines
+ + (lastLinePartial ? 2 : 1));
+ }
+ else if(line == nextLine)
+ {
+ if(Debug.SCROLL_TO_DEBUG)
+ Log.log(Log.DEBUG,this,line + " == " + nextLine);
+ setFirstPhysicalLine(nextLine,
+ subregion + _electricScroll
+ - visibleLines
+ + (lastLinePartial ? 2 : 1));
+ }
+ else
+ {
+ if(Debug.SCROLL_TO_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"neither");
+ Log.log(Log.DEBUG,this,"Last physical line is " + getLastPhysicalLine());
+ }
+ setFirstPhysicalLine(line,subregion
+ - (visibleLines >> 1));
+ if(Debug.SCROLL_TO_DEBUG)
+ {
+ Log.log(Log.DEBUG,this,"Last physical line is " + getLastPhysicalLine());
+ }
+ }
+ }
+ else if(screenLine < _electricScroll)
+ {
+ if(Debug.SCROLL_TO_DEBUG)
+ Log.log(Log.DEBUG,this,"electric up");
+ setFirstLine(getFirstLine() - _electricScroll + screenLine);
+ }
+ else if(screenLine > visibleLines - _electricScroll
+ - (lastLinePartial ? 2 : 1))
+ {
+ if(Debug.SCROLL_TO_DEBUG)
+ Log.log(Log.DEBUG,this,"electric down");
+ setFirstLine(getFirstLine() + _electricScroll - visibleLines + screenLine + (lastLinePartial ? 2 : 1));
+ } //}}}
+
+ //{{{ Scroll horizontally
+ if(!displayManager.isLineVisible(line))
+ return;
+
+ Point point = offsetToXY(line,offset,offsetXY);
+
+ point.x += extraEndVirt;
+
+ if(point.x < 0)
+ {
+ setHorizontalOffset(horizontalOffset
+ - point.x + charWidth + 5);
+ }
+ else if(point.x >= painter.getWidth() - charWidth - 5)
+ {
+ setHorizontalOffset(horizontalOffset +
+ (painter.getWidth() - point.x)
+ - charWidth - 5);
+ } //}}}
+ } //}}}
+
+ //{{{ addScrollListener() method
+ /**
+ * Adds a scroll listener to this text area.
+ * @param listener The listener
+ * @since jEdit 3.2pre2
+ */
+ public final void addScrollListener(ScrollListener listener)
+ {
+ listenerList.add(ScrollListener.class,listener);
+ } //}}}
+
+ //{{{ removeScrollListener() method
+ /**
+ * Removes a scroll listener from this text area.
+ * @param listener The listener
+ * @since jEdit 3.2pre2
+ */
+ public final void removeScrollListener(ScrollListener listener)
+ {
+ listenerList.remove(ScrollListener.class,listener);
+ } //}}}
+
+ //}}}
+
+ //{{{ Screen line stuff
+
+ //{{{ getPhysicalLineOfScreenLine() method
+ /**
+ * Returns the physical line number that contains the specified screen
+ * line.
+ * @param screenLine The screen line
+ * @since jEdit 4.0pre6
+ */
+ public int getPhysicalLineOfScreenLine(int screenLine)
+ {
+ return chunkCache.getLineInfo(screenLine).physicalLine;
+ } //}}}
+
+ //{{{ getScreenLineOfOffset() method
+ /**
+ * Returns the screen (wrapped) line containing the specified offset.
+ * Returns -1 if the line is not currently visible on the screen.
+ * @param offset The offset
+ * @since jEdit 4.0pre4
+ */
+ public int getScreenLineOfOffset(int offset)
+ {
+ int line = buffer.getLineOfOffset(offset);
+ offset -= buffer.getLineStartOffset(line);
+ return chunkCache.getScreenLineOfOffset(line,offset);
+ } //}}}
+
+ //{{{ getScreenLineStartOffset() method
+ /**
+ * Returns the start offset of the specified screen (wrapped) line.
+ * @param line The line
+ * @since jEdit 4.0pre4
+ */
+ public int getScreenLineStartOffset(int line)
+ {
+ ChunkCache.LineInfo lineInfo = chunkCache.getLineInfo(line);
+ if(lineInfo.physicalLine == -1)
+ return -1;
+
+ return buffer.getLineStartOffset(lineInfo.physicalLine)
+ + lineInfo.offset;
+ } //}}}
+
+ //{{{ getScreenLineEndOffset() method
+ /**
+ * Returns the end offset of the specified screen (wrapped) line.
+ * @param line The line
+ * @since jEdit 4.0pre4
+ */
+ public int getScreenLineEndOffset(int line)
+ {
+ ChunkCache.LineInfo lineInfo = chunkCache.getLineInfo(line);
+ if(lineInfo.physicalLine == -1)
+ return -1;
+
+ return buffer.getLineStartOffset(lineInfo.physicalLine)
+ + lineInfo.offset + lineInfo.length;
+ } //}}}
+
+ //}}}
+
+ //{{{ Offset conversion
+
+ //{{{ xyToOffset() methods
+ /**
+ * Converts a point to an offset.
+ * Note that unlike in previous jEdit versions, this method now returns
+ * -1 if the y co-ordinate is out of bounds.
+ *
+ * @param x The x co-ordinate of the point
+ * @param y The y co-ordinate of the point
+ */
+ public int xyToOffset(int x, int y)
+ {
+ return xyToOffset(x,y,true);
+ }
+
+ /**
+ * Converts a point to an offset.
+ * Note that unlike in previous jEdit versions, this method now returns
+ * -1 if the y co-ordinate is out of bounds.
+ *
+ * @param x The x co-ordinate of the point
+ * @param y The y co-ordinate of the point
+ * @param round Round up to next letter if past the middle of a letter?
+ * @since jEdit 3.2pre6
+ */
+ public int xyToOffset(int x, int y, boolean round)
+ {
+ FontMetrics fm = painter.getFontMetrics();
+ int height = fm.getHeight();
+ int line = y / height;
+
+ if(line < 0 || line >= visibleLines)
+ return -1;
+
+ return xToScreenLineOffset(line,x,round);
+ } //}}}
+
+ //{{{ xToScreenLineOffset() method
+ /**
+ * Converts a point in a given screen line to an offset.
+ * Note that unlike in previous jEdit versions, this method now returns
+ * -1 if the y co-ordinate is out of bounds.
+ *
+ * @param x The x co-ordinate of the point
+ * @param screenLine The screen line
+ * @param round Round up to next letter if past the middle of a letter?
+ * @since jEdit 3.2pre6
+ */
+ public int xToScreenLineOffset(int screenLine, int x, boolean round)
+ {
+ ChunkCache.LineInfo lineInfo = chunkCache.getLineInfo(screenLine);
+ if(lineInfo.physicalLine == -1)
+ {
+ return getLineEndOffset(displayManager
+ .getLastVisibleLine()) - 1;
+ }
+ else
+ {
+ int offset = Chunk.xToOffset(lineInfo.chunks,
+ x - horizontalOffset,round);
+ if(offset == -1 || offset == lineInfo.offset + lineInfo.length)
+ offset = lineInfo.offset + lineInfo.length - 1;
+
+ return getLineStartOffset(lineInfo.physicalLine) + offset;
+ }
+ } //}}}
+
+ //{{{ offsetToXY() methods
+ /**
+ * Converts an offset into a point in the text area painter's
+ * co-ordinate space.
+ * @param offset The offset
+ * @return The location of the offset on screen, or <code>null</code>
+ * if the specified offset is not visible
+ */
+ public Point offsetToXY(int offset)
+ {
+ int line = buffer.getLineOfOffset(offset);
+ offset -= buffer.getLineStartOffset(line);
+ Point retVal = new Point();
+ return offsetToXY(line,offset,retVal);
+ }
+
+ /**
+ * Converts an offset into a point in the text area painter's
+ * co-ordinate space.
+ * @param line The line
+ * @param offset The offset
+ * @return The location of the offset on screen, or <code>null</code>
+ * if the specified offset is not visible
+ */
+ public Point offsetToXY(int line, int offset)
+ {
+ return offsetToXY(line,offset,new Point());
+ }
+
+ /**
+ * Converts a line,offset pair into an x,y (pixel) point relative to the
+ * upper left corner (0,0) of the text area.
+ *
+ * @param line The physical line number (from top of document)
+ * @param offset The offset in characters, from the start of the line
+ * @param retVal The point to store the return value in
+ * @return <code>retVal</code> for convenience, or <code>null</code>
+ * if the specified offset is not visible
+ * @since jEdit 4.0pre4
+ */
+ public Point offsetToXY(int line, int offset, Point retVal)
+ {
+ if(!displayManager.isLineVisible(line))
+ return null;
+ int screenLine = chunkCache.getScreenLineOfOffset(line,offset);
+ if(screenLine == -1)
+ return null;
+
+ FontMetrics fm = painter.getFontMetrics();
+
+ retVal.y = screenLine * fm.getHeight();
+
+ ChunkCache.LineInfo info = chunkCache.getLineInfo(screenLine);
+
+ retVal.x = (int)(horizontalOffset + Chunk.offsetToX(
+ info.chunks,offset));
+
+ return retVal;
+ } //}}}
+
+ //}}}
+
+ //{{{ Painting
+
+ //{{{ invalidateScreenLineRange() method
+ /**
+ * Marks a range of screen lines as needing a repaint.
+ * @param start The first line
+ * @param end The last line
+ * @since jEdit 4.0pre4
+ */
+ public void invalidateScreenLineRange(int start, int end)
+ {
+ if(buffer.isLoading())
+ return;
+
+ if(start > end)
+ {
+ int tmp = end;
+ end = start;
+ start = tmp;
+ }
+
+ if(chunkCache.needFullRepaint())
+ end = visibleLines;
+
+ FontMetrics fm = painter.getFontMetrics();
+ int y = start * fm.getHeight();
+ int height = (end - start + 1) * fm.getHeight();
+ painter.repaint(0,y,painter.getWidth(),height);
+ gutter.repaint(0,y,gutter.getWidth(),height);
+ } //}}}
+
+ //{{{ invalidateLine() method
+ /**
+ * Marks a line as needing a repaint.
+ * @param line The physical line to invalidate
+ */
+ public void invalidateLine(int line)
+ {
+ if(!isShowing()
+ || buffer.isLoading()
+ || line < getFirstPhysicalLine()
+ || line > physLastLine
+ || !displayManager.isLineVisible(line))
+ return;
+
+ int startLine = -1;
+ int endLine = -1;
+
+ for(int i = 0; i < visibleLines; i++)
+ {
+ ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
+
+ if((info.physicalLine >= line || info.physicalLine == -1)
+ && startLine == -1)
+ {
+ startLine = i;
+ }
+
+ if((info.physicalLine >= line && info.lastSubregion)
+ || info.physicalLine == -1)
+ {
+ endLine = i;
+ break;
+ }
+ }
+
+ if(chunkCache.needFullRepaint() || endLine == -1)
+ endLine = visibleLines;
+
+ invalidateScreenLineRange(startLine,endLine);
+ } //}}}
+
+ //{{{ invalidateLineRange() method
+ /**
+ * Marks a range of physical lines as needing a repaint.
+ * @param start The first line to invalidate
+ * @param end The last line to invalidate
+ */
+ public void invalidateLineRange(int start, int end)
+ {
+ if(!isShowing() || buffer.isLoading())
+ return;
+
+ if(end < start)
+ {
+ int tmp = end;
+ end = start;
+ start = tmp;
+ }
+
+ if(end < getFirstPhysicalLine() || start > getLastPhysicalLine())
+ return;
+
+ int startScreenLine = -1;
+ int endScreenLine = -1;
+
+ for(int i = 0; i < visibleLines; i++)
+ {
+ ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
+
+ if((info.physicalLine >= start || info.physicalLine == -1)
+ && startScreenLine == -1)
+ {
+ startScreenLine = i;
+ }
+
+ if((info.physicalLine >= end && info.lastSubregion)
+ || info.physicalLine == -1)
+ {
+ endScreenLine = i;
+ break;
+ }
+ }
+
+ if(startScreenLine == -1)
+ startScreenLine = 0;
+
+ if(chunkCache.needFullRepaint() || endScreenLine == -1)
+ endScreenLine = visibleLines;
+
+ invalidateScreenLineRange(startScreenLine,endScreenLine);
+ } //}}}
+
+ //}}}
+
+ //{{{ Convenience methods
+
+ //{{{ getBufferLength() method
+ /**
+ * Returns the length of the buffer.
+ */
+ public final int getBufferLength()
+ {
+ return buffer.getLength();
+ } //}}}
+
+ //{{{ getLineCount() method
+ /**
+ * Returns the number of physical lines in the buffer.
+ */
+ public final int getLineCount()
+ {
+ return buffer.getLineCount();
+ } //}}}
+
+ //{{{ getLineOfOffset() method
+ /**
+ * Returns the line containing the specified offset.
+ * @param offset The offset
+ */
+ public final int getLineOfOffset(int offset)
+ {
+ return buffer.getLineOfOffset(offset);
+ } //}}}
+
+ //{{{ getLineStartOffset() method
+ /**
+ * Returns the start offset of the specified line.
+ * @param line The line (physical line)
+ * @return The start offset of the specified line, or -1 if the line is
+ * invalid
+ */
+ public int getLineStartOffset(int line)
+ {
+ return buffer.getLineStartOffset(line);
+ } //}}}
+
+ //{{{ getLineEndOffset() method
+ /**
+ * Returns the end offset of the specified line.
+ * @param line The line (physical line)
+ * @return The end offset of the specified line, or -1 if the line is
+ * invalid.
+ */
+ public int getLineEndOffset(int line)
+ {
+ return buffer.getLineEndOffset(line);
+ } //}}}
+
+ //{{{ getLineLength() method
+ /**
+ * Returns the length of the specified line.
+ * @param line The line
+ */
+ public int getLineLength(int line)
+ {
+ return buffer.getLineLength(line);
+ } //}}}
+
+ //{{{ getText() methods
+ /**
+ * Returns the specified substring of the buffer.
+ * @param start The start offset
+ * @param len The length of the substring
+ * @return The substring
+ */
+ public final String getText(int start, int len)
+ {
+ return buffer.getText(start,len);
+ }
+
+ /**
+ * Copies the specified substring of the buffer into a segment.
+ * @param start The start offset
+ * @param len The length of the substring
+ * @param segment The segment
+ */
+ public final void getText(int start, int len, Segment segment)
+ {
+ buffer.getText(start,len,segment);
+ }
+
+ /**
+ * Returns the entire text of this text area.
+ */
+ public String getText()
+ {
+ return buffer.getText(0,buffer.getLength());
+ } //}}}
+
+ //{{{ getLineText() methods
+ /**
+ * Returns the text on the specified line.
+ * @param lineIndex the line number
+ * @return The text, or null if the lineIndex is invalid
+ */
+ public final String getLineText(int lineIndex)
+ {
+ return buffer.getLineText(lineIndex);
+ }
+
+ /**
+ * Copies the text on the specified line into a Segment. If lineIndex
+ * is invalid, the segment will contain a null string.
+ * @param lineIndex The line number (physical line)
+ * @param segment the segment into which the data will be stored.
+ */
+ public final void getLineText(int lineIndex, Segment segment)
+ {
+ buffer.getLineText(lineIndex,segment);
+ } //}}}
+
+ //{{{ setText() method
+ /**
+ * Sets the entire text of this text area.
+ * @param text the new content of the buffer
+ */
+ public void setText(String text)
+ {
+ try
+ {
+ buffer.beginCompoundEdit();
+ buffer.remove(0,buffer.getLength());
+ buffer.insert(0,text);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Selection
+
+ //{{{ selectAll() method
+ /**
+ * Selects all text in the buffer. Preserves the scroll position.
+ */
+ public final void selectAll()
+ {
+ int firstLine = getFirstLine();
+ int horizOffset = getHorizontalOffset();
+
+ setSelection(new Selection.Range(0,buffer.getLength()));
+ moveCaretPosition(buffer.getLength(),true);
+
+ setFirstLine(firstLine);
+ setHorizontalOffset(horizOffset);
+ } //}}}
+
+ //{{{ selectLine() method
+ /**
+ * Selects the current line.
+ * @since jEdit 2.7pre2
+ */
+ public void selectLine()
+ {
+ int caretLine = getCaretLine();
+ int start = getLineStartOffset(caretLine);
+ int end = getLineEndOffset(caretLine) - 1;
+ Selection s = new Selection.Range(start,end);
+ if(multi)
+ addToSelection(s);
+ else
+ setSelection(s);
+ moveCaretPosition(end);
+ } //}}}
+
+ //{{{ selectParagraph() method
+ /**
+ * Selects the paragraph at the caret position.
+ * @since jEdit 2.7pre2
+ */
+ public void selectParagraph()
+ {
+ int caretLine = getCaretLine();
+
+ if(getLineLength(caretLine) == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ int start = caretLine;
+ int end = caretLine;
+
+ while(start >= 0)
+ {
+ if(getLineLength(start) == 0)
+ break;
+ else
+ start--;
+ }
+
+ while(end < getLineCount())
+ {
+ if(getLineLength(end) == 0)
+ break;
+ else
+ end++;
+ }
+
+ int selectionStart = getLineStartOffset(start + 1);
+ int selectionEnd = getLineEndOffset(end - 1) - 1;
+ Selection s = new Selection.Range(selectionStart,selectionEnd);
+ if(multi)
+ addToSelection(s);
+ else
+ setSelection(s);
+ moveCaretPosition(selectionEnd);
+ } //}}}
+
+ //{{{ selectWord() method
+ /**
+ * Selects the word at the caret position.
+ * @since jEdit 2.7pre2
+ */
+ public void selectWord()
+ {
+ int line = getCaretLine();
+ int lineStart = getLineStartOffset(line);
+ int offset = getCaretPosition() - lineStart;
+
+ if(getLineLength(line) == 0)
+ return;
+
+ String lineText = getLineText(line);
+ String noWordSep = buffer.getStringProperty("noWordSep");
+
+ if(offset == getLineLength(line))
+ offset--;
+
+ int wordStart = TextUtilities.findWordStart(lineText,offset,
+ noWordSep,true,false,false);
+ int wordEnd = TextUtilities.findWordEnd(lineText,offset+1,
+ noWordSep,true,false,false);
+
+ Selection s = new Selection.Range(lineStart + wordStart,
+ lineStart + wordEnd);
+ if(multi)
+ addToSelection(s);
+ else
+ setSelection(s);
+ moveCaretPosition(lineStart + wordEnd);
+ } //}}}
+
+ //{{{ selectToMatchingBracket() method
+ /**
+ * Selects from the bracket at the specified position to the
+ * corresponding bracket.
+ * @since jEdit 4.2pre1
+ */
+ public Selection selectToMatchingBracket(int position,
+ boolean quickCopy)
+ {
+ int positionLine = buffer.getLineOfOffset(position);
+ int lineOffset = position - buffer.getLineStartOffset(positionLine);
+ if(getLineLength(positionLine) != 0)
+ {
+ int bracket = TextUtilities.findMatchingBracket(buffer,
+ positionLine,Math.max(0,lineOffset - 1));
+
+ if(bracket != -1)
+ {
+ Selection s;
+
+ if(bracket < position)
+ {
+ if(!quickCopy)
+ moveCaretPosition(position,false);
+ s = new Selection.Range(bracket,position);
+ }
+ else
+ {
+ if(!quickCopy)
+ moveCaretPosition(bracket + 1,false);
+ s = new Selection.Range(position - 1,bracket + 1);
+ }
+
+ if(!multi && !quickCopy)
+ selectNone();
+
+ addToSelection(s);
+ return s;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Selects from the bracket at the caret position to the corresponding
+ * bracket.
+ * @since jEdit 4.0pre2
+ */
+ public void selectToMatchingBracket()
+ {
+ selectToMatchingBracket(caret,false);
+ } //}}}
+
+ //{{{ selectBlock() method
+ /**
+ * Selects the code block surrounding the caret.
+ * @since jEdit 2.7pre2
+ */
+ public void selectBlock()
+ {
+ Selection s = getSelectionAtOffset(caret);
+ int start, end;
+ if(s == null)
+ start = end = caret;
+ else
+ {
+ start = s.start;
+ end = s.end;
+ }
+
+ String text = getText(0,buffer.getLength());
+
+ // We can't do the backward scan if start == 0
+ if(start == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ // Scan backwards, trying to find a bracket
+ String openBrackets = "([{";
+ String closeBrackets = ")]}";
+ int count = 1;
+ char openBracket = '\0';
+ char closeBracket = '\0';
+
+backward_scan: while(--start >= 0)
+ {
+ char c = text.charAt(start);
+ int index = openBrackets.indexOf(c);
+ if(index != -1)
+ {
+ if(--count == 0)
+ {
+ openBracket = c;
+ closeBracket = closeBrackets.charAt(index);
+ break backward_scan;
+ }
+ }
+ else if(closeBrackets.indexOf(c) != -1)
+ count++;
+ }
+
+ // Reset count
+ count = 1;
+
+ // Scan forward, matching that bracket
+ if(openBracket == '\0')
+ {
+ getToolkit().beep();
+ return;
+ }
+forward_scan: do
+ {
+ char c = text.charAt(end);
+ if(c == closeBracket)
+ {
+ if(--count == 0)
+ {
+ end++;
+ break forward_scan;
+ }
+ }
+ else if(c == openBracket)
+ count++;
+ }
+ while(++end < buffer.getLength());
+
+ s = new Selection.Range(start,end);
+ if(multi)
+ addToSelection(s);
+ else
+ setSelection(s);
+ moveCaretPosition(end);
+ } //}}}
+
+ //{{{ lineInStructureScope() method
+ /**
+ * Returns if the specified line is contained in the currently
+ * matched structure's scope.
+ * @since jEdit 4.2pre3
+ */
+ public boolean lineInStructureScope(int line)
+ {
+ if(match == null)
+ return false;
+
+ if(match.startLine < caretLine)
+ return line >= match.startLine && line <= caretLine;
+ else
+ return line <= match.endLine && line >= caretLine;
+ } //}}}
+
+ //{{{ invertSelection() method
+ /**
+ * Inverts the selection.
+ * @since jEdit 4.0pre1
+ */
+ public final void invertSelection()
+ {
+ selectionManager.invertSelection();
+ } //}}}
+
+ //{{{ getSelectionCount() method
+ /**
+ * Returns the number of selections. This can be used to test
+ * for the existence of selections.
+ * @since jEdit 3.2pre2
+ */
+ public int getSelectionCount()
+ {
+ return selectionManager.getSelectionCount();
+ } //}}}
+
+ //{{{ getSelection() methods
+ /**
+ * Returns the current selection.
+ * @since jEdit 3.2pre1
+ */
+ public Selection[] getSelection()
+ {
+ return selectionManager.getSelection();
+ }
+
+ /**
+ * Returns the selection with the specified index. This must be
+ * between 0 and the return value of <code>getSelectionCount()</code>.
+ * @since jEdit 4.3pre1
+ * @param index the index of the selection you want
+ */
+ public Selection getSelection(int index)
+ {
+ return selectionManager.selection.get(index);
+ } //}}}
+
+ //{{{ getSelectionIterator() method
+ /**
+ * Returns the current selection.
+ * @since jEdit 4.3pre1
+ */
+ public Iterator<Selection> getSelectionIterator()
+ {
+ return selectionManager.selection.iterator();
+ } //}}}
+
+ //{{{ selectNone() method
+ /**
+ * Deselects everything.
+ */
+ public void selectNone()
+ {
+ invalidateSelectedLines();
+ setSelection((Selection)null);
+ } //}}}
+
+ //{{{ setSelection() methods
+ /**
+ * Sets the selection. Nested and overlapping selections are merged
+ * where possible. Null elements of the array are ignored.
+ * @param selection The new selection
+ * since jEdit 3.2pre1
+ */
+ public void setSelection(Selection[] selection)
+ {
+ // invalidate the old selection
+ invalidateSelectedLines();
+ selectionManager.setSelection(selection);
+ finishCaretUpdate(caretLine,NO_SCROLL,true);
+ }
+
+ /**
+ * Sets the selection. Nested and overlapping selections are merged
+ * where possible.
+ * @param selection The new selection
+ * since jEdit 3.2pre1
+ */
+ public void setSelection(Selection selection)
+ {
+ invalidateSelectedLines();
+ selectionManager.setSelection(selection);
+ finishCaretUpdate(caretLine,NO_SCROLL,true);
+ } //}}}
+
+ //{{{ addToSelection() methods
+ /**
+ * Adds to the selection. Nested and overlapping selections are merged
+ * where possible.
+ * @param selection The new selection
+ * since jEdit 3.2pre1
+ */
+ public void addToSelection(Selection[] selection)
+ {
+ invalidateSelectedLines();
+ selectionManager.addToSelection(selection);
+ finishCaretUpdate(caretLine,NO_SCROLL,true);
+ }
+
+ /**
+ * Adds to the selection. Nested and overlapping selections are merged
+ * where possible.
+ * @param selection The new selection
+ * since jEdit 3.2pre1
+ */
+ public void addToSelection(Selection selection)
+ {
+ invalidateSelectedLines();
+ selectionManager.addToSelection(selection);
+ finishCaretUpdate(caretLine,NO_SCROLL,true);
+ } //}}}
+
+ //{{{ getSelectionAtOffset() method
+ /**
+ * Returns the selection containing the specific offset, or <code>null</code>
+ * if there is no selection at that offset.
+ * @param offset The offset
+ * @since jEdit 3.2pre1
+ */
+ public Selection getSelectionAtOffset(int offset)
+ {
+ return selectionManager.getSelectionAtOffset(offset);
+ } //}}}
+
+ //{{{ removeFromSelection() methods
+ /**
+ * Deactivates the specified selection.
+ * @param sel The selection
+ * @since jEdit 3.2pre1
+ */
+ public void removeFromSelection(Selection sel)
+ {
+ invalidateSelectedLines();
+ selectionManager.removeFromSelection(sel);
+ finishCaretUpdate(caretLine,NO_SCROLL,true);
+ }
+
+ /**
+ * Deactivates the selection at the specified offset. If there is
+ * no selection at that offset, does nothing.
+ * @param offset The offset
+ * @since jEdit 3.2pre1
+ */
+ public void removeFromSelection(int offset)
+ {
+ Selection sel = getSelectionAtOffset(offset);
+ if(sel == null)
+ return;
+
+ invalidateSelectedLines();
+ selectionManager.removeFromSelection(sel);
+ finishCaretUpdate(caretLine,NO_SCROLL,true);
+ } //}}}
+
+ //{{{ resizeSelection() method
+ /**
+ * Resizes the selection at the specified offset, or creates a new
+ * one if there is no selection at the specified offset. This is a
+ * utility method that is mainly useful in the mouse event handler
+ * because it handles the case of end being before offset gracefully
+ * (unlike the rest of the selection API).
+ * @param offset The offset
+ * @param end The new selection end
+ * @param extraEndVirt Only for rectangular selections - specifies how
+ * far it extends into virtual space.
+ * @param rect Make the selection rectangular?
+ * @since jEdit 3.2pre1
+ */
+ public void resizeSelection(int offset, int end, int extraEndVirt,
+ boolean rect)
+ {
+ Selection s = selectionManager.getSelectionAtOffset(offset);
+ if(s != null)
+ {
+ invalidateLineRange(s.startLine,s.endLine);
+ selectionManager.removeFromSelection(s);
+ }
+
+ selectionManager.resizeSelection(offset,end,extraEndVirt,rect);
+ fireCaretEvent();
+ } //}}}
+
+ //{{{ extendSelection() methods
+ /**
+ * Extends the selection at the specified offset, or creates a new
+ * one if there is no selection at the specified offset. This is
+ * different from resizing in that the new chunk is added to the
+ * selection in question, instead of replacing it.
+ * @param offset The offset
+ * @param end The new selection end
+ * @since jEdit 3.2pre1
+ */
+ public void extendSelection(int offset, int end)
+ {
+ extendSelection(offset,end,0,0);
+ }
+
+ /**
+ * Extends the selection at the specified offset, or creates a new
+ * one if there is no selection at the specified offset. This is
+ * different from resizing in that the new chunk is added to the
+ * selection in question, instead of replacing it.
+ * @param offset The offset
+ * @param end The new selection end
+ * @param extraStartVirt Extra virtual space at the start
+ * @param extraEndVirt Extra virtual space at the end
+ * @since jEdit 4.2pre1
+ */
+ public void extendSelection(int offset, int end,
+ int extraStartVirt, int extraEndVirt)
+ {
+ Selection s = getSelectionAtOffset(offset);
+ if(s != null)
+ {
+ invalidateLineRange(s.startLine,s.endLine);
+ selectionManager.removeFromSelection(s);
+
+ if(offset == s.start)
+ {
+ offset = end;
+ end = s.end;
+ }
+ else if(offset == s.end)
+ {
+ offset = s.start;
+ }
+ }
+
+ if(end < offset)
+ {
+ int tmp = end;
+ end = offset;
+ offset = tmp;
+ }
+
+ if(rectangularSelectionMode)
+ {
+ s = new Selection.Rect(offset,end);
+ ((Selection.Rect)s).extraStartVirt = extraStartVirt;
+ ((Selection.Rect)s).extraEndVirt = extraEndVirt;
+ }
+ else
+ s = new Selection.Range(offset,end);
+
+ selectionManager.addToSelection(s);
+ fireCaretEvent();
+
+ if(rectangularSelectionMode && extraEndVirt != 0)
+ {
+ int line = getLineOfOffset(end);
+ scrollTo(line,getLineLength(line) + extraEndVirt,false);
+ }
+ } //}}}
+
+ //{{{ getSelectedText() methods
+ /**
+ * Returns the text in the specified selection.
+ * @param s The selection
+ * @since jEdit 3.2pre1
+ */
+ public String getSelectedText(Selection s)
+ {
+ StringBuilder buf = new StringBuilder(s.end - s.start);
+ s.getText(buffer,buf);
+ return buf.toString();
+ }
+
+ /**
+ * Returns the text in all active selections.
+ * @param separator The string to insert between each text chunk
+ * (for example, a newline)
+ * @since jEdit 3.2pre1
+ */
+ public String getSelectedText(String separator)
+ {
+ Selection[] sel = selectionManager.getSelection();
+ if(sel.length == 0)
+ return null;
+
+ StringBuilder buf = new StringBuilder();
+ for(int i = 0; i < sel.length; i++)
+ {
+ if(i != 0)
+ buf.append(separator);
+
+ sel[i].getText(buffer,buf);
+ }
+
+ return buf.toString();
+ }
+
+ /**
+ * Returns the text in all active selections, with a newline
+ * between each text chunk.
+ */
+ public String getSelectedText()
+ {
+ return getSelectedText("\n");
+ } //}}}
+
+ //{{{ setSelectedText() methods
+ /**
+ * Replaces the selection with the specified text.
+ * @param s The selection
+ * @param selectedText The new text
+ * @since jEdit 3.2pre1
+ */
+ public void setSelectedText(Selection s, String selectedText)
+ {
+ if(!isEditable())
+ {
+ throw new InternalError("Text component"
+ + " read only");
+ }
+
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ moveCaretPosition(s.setText(buffer,selectedText));
+ }
+ // No matter what happends... stops us from leaving buffer
+ // in a bad state
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ // no no no!!!!
+ //selectNone();
+ }
+
+ /**
+ * Replaces the selection at the caret with the specified text.
+ * If there is no selection at the caret, the text is inserted at
+ * the caret position.
+ */
+ public void setSelectedText(String selectedText)
+ {
+ int newCaret = replaceSelection(selectedText);
+ if(newCaret != -1)
+ moveCaretPosition(newCaret);
+ selectNone();
+ }
+
+ /**
+ * Replaces the selection at the caret with the specified text.
+ * If there is no selection at the caret, the text is inserted at
+ * the caret position.
+ * @param selectedText The new selection
+ * @param moveCaret Move caret to insertion location if necessary
+ * @since jEdit 4.2pre5
+ */
+ public void setSelectedText(String selectedText, boolean moveCaret)
+ {
+ int newCaret = replaceSelection(selectedText);
+ if(moveCaret && newCaret != -1)
+ moveCaretPosition(newCaret);
+ selectNone();
+ } //}}}
+
+ //{{{ replaceSelection() method
+ /**
+ * Set the selection, but does not deactivate it, and does not move the
+ * caret.
+ *
+ * Please use {@link #setSelectedText(String)} instead.
+ *
+ * @param selectedText The new selection
+ * @return The new caret position
+ * @since 4.3pre1
+ */
+ public int replaceSelection(String selectedText)
+ {
+ if(!isEditable())
+ throw new RuntimeException("Text component read only");
+
+ int newCaret = -1;
+ if(getSelectionCount() == 0)
+ {
+ // for compatibility with older jEdit versions
+ buffer.insert(caret,selectedText);
+ }
+ else
+ {
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ Selection[] selection = getSelection();
+ for(int i = 0; i < selection.length; i++)
+ newCaret = selection[i].setText(buffer,selectedText);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ }
+
+ return newCaret;
+ } //}}}
+
+ //{{{ getSelectedLines() method
+ /**
+ * Returns a sorted array of line numbers on which a selection or
+ * selections are present.<p>
+ *
+ * This method is the most convenient way to iterate through selected
+ * lines in a buffer. The line numbers in the array returned by this
+ * method can be passed as a parameter to such methods as
+ * {@link JEditBuffer#getLineText(int)}.
+ *
+ * @since jEdit 3.2pre1
+ */
+ public int[] getSelectedLines()
+ {
+ if(selectionManager.getSelectionCount() == 0)
+ return new int[] { caretLine };
+
+ return selectionManager.getSelectedLines();
+ } //}}}
+
+ //}}}
+
+ //{{{ Caret
+
+ //{{{ caretAutoScroll() method
+ /**
+ * Return if change in buffer should scroll this text area.
+ * @since jEdit 4.3pre2
+ */
+ public boolean caretAutoScroll()
+ {
+ return focusedComponent == this;
+ } //}}}
+
+ //{{{ addStructureMatcher() method
+ /**
+ * Adds a structure matcher.
+ * @since jEdit 4.2pre3
+ */
+ public void addStructureMatcher(StructureMatcher matcher)
+ {
+ structureMatchers.add(matcher);
+ } //}}}
+
+ //{{{ removeStructureMatcher() method
+ /**
+ * Removes a structure matcher.
+ * @since jEdit 4.2pre3
+ */
+ public void removeStructureMatcher(StructureMatcher matcher)
+ {
+ structureMatchers.remove(matcher);
+ } //}}}
+
+ //{{{ getStructureMatchStart() method
+ /**
+ * Returns the structure element (bracket, or XML tag, etc) matching the
+ * one before the caret.
+ * @since jEdit 4.2pre3
+ */
+ public StructureMatcher.Match getStructureMatch()
+ {
+ return match;
+ } //}}}
+
+ //{{{ blinkCaret() method
+ /**
+ * Blinks the caret.
+ */
+ public final void blinkCaret()
+ {
+ if(caretBlinks)
+ {
+ blink = !blink;
+ invalidateLine(caretLine);
+ }
+ else
+ blink = true;
+ } //}}}
+
+ //{{{ centerCaret() method
+ /**
+ * Centers the caret on the screen.
+ * @since jEdit 2.7pre2
+ */
+ public void centerCaret()
+ {
+ int offset = getScreenLineStartOffset(visibleLines >> 1);
+ if(offset == -1)
+ getToolkit().beep();
+ else
+ setCaretPosition(offset);
+ } //}}}
+
+ // {{{ scrollAndCenterCaret() method
+ /**
+ * Tries to scroll the textArea so that the caret is centered on the screen.
+ * Sometimes gets confused by folds but at least makes the caret visible and
+ * guesses better on subsequent attempts.
+ *
+ * @since jEdit 4.3pre15
+ */
+ public void scrollAndCenterCaret()
+ {
+ if (!getDisplayManager().isLineVisible(getCaretLine()))
+ getDisplayManager().expandFold(getCaretLine(),true);
+ int physicalLine = getCaretLine();
+ int midPhysicalLine = getPhysicalLineOfScreenLine(visibleLines >> 1);
+ int diff = physicalLine - midPhysicalLine;
+ setFirstLine(getFirstLine() + diff);
+ requestFocus();
+ } // }}}
+
+ //{{{ setCaretPosition() methods
+ /**
+ * Sets the caret position and deactivates the selection.
+ * @param newCaret The caret position
+ */
+ public void setCaretPosition(int newCaret)
+ {
+ selectNone();
+ moveCaretPosition(newCaret,true);
+ }
+
+ /**
+ * Sets the caret position and deactivates the selection.
+ * @param newCaret The caret position
+ * @param doElectricScroll Do electric scrolling?
+ */
+ public void setCaretPosition(int newCaret, boolean doElectricScroll)
+ {
+ selectNone();
+ moveCaretPosition(newCaret,doElectricScroll);
+ } //}}}
+
+ //{{{ moveCaretPosition() methods
+ /**
+ * Sets the caret position without deactivating the selection.
+ * @param newCaret The caret position
+ */
+ public void moveCaretPosition(int newCaret)
+ {
+ moveCaretPosition(newCaret,true);
+ }
+
+ /**
+ * Sets the caret position without deactivating the selection.
+ * @param newCaret The caret position
+ * @param doElectricScroll Do electric scrolling?
+ */
+ public void moveCaretPosition(int newCaret, boolean doElectricScroll)
+ {
+ moveCaretPosition(newCaret,doElectricScroll ? ELECTRIC_SCROLL
+ : NORMAL_SCROLL);
+ }
+
+ public static final int NO_SCROLL = 0;
+ public static final int NORMAL_SCROLL = 1;
+ public static final int ELECTRIC_SCROLL = 2;
+
+ /**
+ * Sets the caret position without deactivating the selection.
+ * @param newCaret The caret position
+ * @param scrollMode The scroll mode (NO_SCROLL, NORMAL_SCROLL, or
+ * ELECTRIC_SCROLL).
+ * @since jEdit 4.2pre1
+ */
+ public void moveCaretPosition(int newCaret, int scrollMode)
+ {
+ if(newCaret < 0 || newCaret > buffer.getLength())
+ {
+ throw new IllegalArgumentException("caret out of bounds: "
+ + newCaret);
+ }
+ int oldCaretLine = caretLine;
+
+ if(caret == newCaret)
+ finishCaretUpdate(oldCaretLine,scrollMode,false);
+ else
+ {
+ caret = newCaret;
+ caretLine = getLineOfOffset(newCaret);
+
+ magicCaret = -1;
+
+ finishCaretUpdate(oldCaretLine,scrollMode,true);
+ }
+ } //}}}
+
+ //{{{ getCaretPosition() method
+ /**
+ * Returns a zero-based index of the caret position.
+ */
+ public int getCaretPosition()
+ {
+ return caret;
+ } //}}}
+
+ //{{{ getCaretLine() method
+ /**
+ * Returns the line number containing the caret.
+ */
+ public int getCaretLine()
+ {
+ return caretLine;
+ } //}}}
+
+ //{{{ getMagicCaretPosition() method
+ /**
+ * Returns an internal position used to keep the caret in one
+ * column while moving around lines of varying lengths.
+ * @since jEdit 4.2pre1
+ */
+ public int getMagicCaretPosition()
+ {
+ if(magicCaret == -1)
+ {
+ magicCaret = chunkCache.subregionOffsetToX(
+ caretLine,caret - getLineStartOffset(caretLine));
+ }
+
+ return magicCaret;
+ } //}}}
+
+ //{{{ setMagicCaretPosition() method
+ /**
+ * Sets the `magic' caret position. This can be used to preserve
+ * the column position when moving up and down lines.
+ * @param magicCaret The magic caret position
+ * @since jEdit 4.2pre1
+ */
+ public void setMagicCaretPosition(int magicCaret)
+ {
+ this.magicCaret = magicCaret;
+ } //}}}
+
+ //{{{ addCaretListener() method
+ /**
+ * Adds a caret change listener to this text area.
+ * @param listener The listener
+ */
+ public final void addCaretListener(CaretListener listener)
+ {
+ listenerList.add(CaretListener.class,listener);
+ } //}}}
+
+ //{{{ removeCaretListener() method
+ /**
+ * Removes a caret change listener from this text area.
+ * @param listener The listener
+ */
+ public final void removeCaretListener(CaretListener listener)
+ {
+ listenerList.remove(CaretListener.class,listener);
+ } //}}}
+
+ //{{{ goToNextBracket() method
+ /**
+ * Moves the caret to the next closing bracket.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2.
+ */
+ public void goToNextBracket(boolean select)
+ {
+ int newCaret = -1;
+
+ if(caret != buffer.getLength())
+ {
+ String text = getText(caret,buffer.getLength()
+ - caret - 1);
+
+loop: for(int i = 0; i < text.length(); i++)
+ {
+ switch(text.charAt(i))
+ {
+ case ')': case ']': case '}':
+ newCaret = caret + i + 1;
+ break loop;
+ }
+ }
+ }
+
+ if(newCaret == -1)
+ getToolkit().beep();
+ else
+ {
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+ }
+ } //}}}
+
+ //{{{ goToNextCharacter() method
+ /**
+ * Moves the caret to the next character.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2.
+ */
+ public void goToNextCharacter(boolean select)
+ {
+ Selection s = getSelectionAtOffset(caret);
+
+ if(!select && s instanceof Selection.Range)
+ {
+ if(multi)
+ {
+ if(caret != s.end)
+ {
+ moveCaretPosition(s.end);
+ return;
+ }
+ }
+ else
+ {
+ setCaretPosition(s.end);
+ return;
+ }
+ }
+
+ int extraStartVirt, extraEndVirt;
+ if(s instanceof Selection.Rect)
+ {
+ extraStartVirt = ((Selection.Rect)s).extraStartVirt;
+ extraEndVirt = ((Selection.Rect)s).extraEndVirt;
+ }
+ else
+ {
+ extraStartVirt = 0;
+ extraEndVirt = 0;
+ }
+
+ int newCaret = caret;
+
+ if(caret == buffer.getLength())
+ {
+ if(select && (rectangularSelectionMode || s instanceof Selection.Rect))
+ {
+ if(s != null && caret == s.start)
+ extraStartVirt++;
+ else
+ extraEndVirt++;
+ }
+ else
+ {
+ getToolkit().beep();
+ return;
+ }
+ }
+ else if(caret == getLineEndOffset(caretLine) - 1)
+ {
+ if(select && (rectangularSelectionMode || s instanceof Selection.Rect))
+ {
+ if(s != null && caret == s.start)
+ extraStartVirt++;
+ else
+ extraEndVirt++;
+ }
+ else
+ {
+ int line = displayManager.getNextVisibleLine(caretLine);
+ if(line == -1)
+ {
+ getToolkit().beep();
+ return;
+ }
+ else
+ newCaret = getLineStartOffset(line);
+ }
+ }
+ else
+ newCaret = caret + 1;
+
+ if(select)
+ extendSelection(caret,newCaret,extraStartVirt,extraEndVirt);
+ else if(!multi)
+ selectNone();
+
+ moveCaretPosition(newCaret);
+ } //}}}
+
+ //{{{ goToNextLine() method
+ /**
+ * Move the caret to the next line.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToNextLine(boolean select)
+ {
+ Selection s = getSelectionAtOffset(caret);
+ boolean rectSelect = s == null ? rectangularSelectionMode
+ : s instanceof Selection.Rect;
+ int magic = getMagicCaretPosition();
+ int newCaret = chunkCache.getBelowPosition(caretLine,
+ caret - buffer.getLineStartOffset(caretLine),magic + 1,
+ rectSelect && select);
+ if(newCaret == -1)
+ {
+ int end = getLineEndOffset(caretLine) - 1;
+ if(caret == end)
+ {
+ getToolkit().beep();
+ return;
+ }
+ else
+ newCaret = end;
+ }
+
+ _changeLine(select, newCaret);
+
+ setMagicCaretPosition(magic);
+ }//}}}
+
+ //{{{ goToNextPage() method
+ /**
+ * Moves the caret to the next screenful.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2.
+ */
+ public void goToNextPage(boolean select)
+ {
+ scrollToCaret(false);
+ int magic = getMagicCaretPosition();
+ if(caretLine < displayManager.getFirstVisibleLine())
+ {
+ caretLine = displayManager.getNextVisibleLine(
+ caretLine);
+ }
+
+ int newCaret;
+
+ if(getFirstLine() + getVisibleLines() >= displayManager
+ .getScrollLineCount())
+ {
+ int lastVisibleLine = displayManager
+ .getLastVisibleLine();
+ newCaret = getLineEndOffset(lastVisibleLine) - 1;
+ }
+ else
+ {
+ int caretScreenLine = getScreenLineOfOffset(caret);
+
+ scrollDownPage();
+
+ newCaret = xToScreenLineOffset(caretScreenLine,
+ magic,true);
+ }
+
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+
+ moveCaretPosition(newCaret,false);
+
+ setMagicCaretPosition(magic);
+ } //}}}
+
+ //{{{ goToNextParagraph() method
+ /**
+ * Moves the caret to the start of the next paragraph.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToNextParagraph(boolean select)
+ {
+ int lineNo = getCaretLine();
+
+ int newCaret = getBufferLength();
+
+ boolean foundBlank = false;
+
+ final Segment lineSegment = new Segment();
+loop: for(int i = lineNo + 1; i < getLineCount(); i++)
+ {
+ if(!displayManager.isLineVisible(i))
+ continue;
+
+ getLineText(i,lineSegment);
+
+ for(int j = 0; j < lineSegment.count; j++)
+ {
+ switch(lineSegment.array[lineSegment.offset + j])
+ {
+ case ' ':
+ case '\t':
+ break;
+ default:
+ if(foundBlank)
+ {
+ newCaret = getLineStartOffset(i);
+ break loop;
+ }
+ else
+ continue loop;
+ }
+ }
+
+ foundBlank = true;
+ }
+
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+ } //}}}
+
+ //{{{ goToNextWord() methods
+ /**
+ * Moves the caret to the start of the next word.
+ * Note that if the "view.eatWhitespace" boolean propery is false,
+ * this method moves the caret to the end of the current word instead.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToNextWord(boolean select)
+ {
+ goToNextWord(select,false);
+ }
+
+ /**
+ * Moves the caret to the start of the next word.
+ * @since jEdit 4.1pre5
+ */
+ public void goToNextWord(boolean select, boolean eatWhitespace)
+ {
+ int lineStart = getLineStartOffset(caretLine);
+ int newCaret = caret - lineStart;
+ String lineText = getLineText(caretLine);
+
+ if(newCaret == lineText.length())
+ {
+ int nextLine = displayManager.getNextVisibleLine(caretLine);
+ if(nextLine == -1)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ newCaret = getLineStartOffset(nextLine);
+ }
+ else
+ {
+ String noWordSep = buffer.getStringProperty("noWordSep");
+ boolean camelCasedWords = buffer.getBooleanProperty("camelCasedWords");
+ newCaret = TextUtilities.findWordEnd(lineText,
+ newCaret + 1,noWordSep,true,camelCasedWords,
+ eatWhitespace);
+
+ newCaret += lineStart;
+ }
+
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+ } //}}}
+
+ //{{{ goToPrevBracket() method
+ /**
+ * Moves the caret to the previous bracket.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToPrevBracket(boolean select)
+ {
+ String text = getText(0,caret);
+
+ int newCaret = -1;
+
+loop: for(int i = getCaretPosition() - 1; i >= 0; i--)
+ {
+ switch(text.charAt(i))
+ {
+ case '(': case '[': case '{':
+ newCaret = i;
+ break loop;
+ }
+ }
+
+ if(newCaret == -1)
+ getToolkit().beep();
+ else
+ {
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+ }
+ } //}}}
+
+ //{{{ goToPrevCharacter() method
+ /**
+ * Moves the caret to the previous character.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2.
+ */
+ public void goToPrevCharacter(boolean select)
+ {
+ Selection s = getSelectionAtOffset(caret);
+
+ if(caret == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ if(!select && s instanceof Selection.Range)
+ {
+ if(multi)
+ {
+ if(caret != s.start)
+ {
+ moveCaretPosition(s.start);
+ return;
+ }
+ }
+ else
+ {
+ setCaretPosition(s.start);
+ return;
+ }
+ }
+
+ int extraStartVirt = 0;
+ int extraEndVirt = 0;
+ int newCaret = caret;
+
+ if(select && caret == getLineEndOffset(caretLine) - 1)
+ {
+ if(s instanceof Selection.Rect)
+ {
+ extraStartVirt = ((Selection.Rect)s).extraStartVirt;
+ extraEndVirt = ((Selection.Rect)s).extraEndVirt;
+ if(caret == s.start)
+ {
+ if(extraStartVirt == 0)
+ newCaret = caret - 1;
+ else
+ extraStartVirt--;
+ }
+ else
+ {
+ if(extraEndVirt == 0)
+ newCaret = caret - 1;
+ else
+ extraEndVirt--;
+ }
+ }
+ else
+ newCaret = caret - 1;
+ }
+ else if(caret == getLineStartOffset(caretLine))
+ {
+ int line = displayManager.getPrevVisibleLine(caretLine);
+ if(line == -1)
+ {
+ getToolkit().beep();
+ return;
+ }
+ newCaret = getLineEndOffset(line) - 1;
+ }
+ else
+ newCaret = caret - 1;
+
+ if(select)
+ extendSelection(caret,newCaret,extraStartVirt,extraEndVirt);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+ } //}}}
+
+ //{{{ goToPrevLine() method
+ /**
+ * Moves the caret to the previous line.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToPrevLine(boolean select)
+ {
+ Selection s = getSelectionAtOffset(caret);
+ boolean rectSelect = s == null ? rectangularSelectionMode
+ : s instanceof Selection.Rect;
+ int magic = getMagicCaretPosition();
+
+ int newCaret = chunkCache.getAbovePosition(caretLine,
+ caret - buffer.getLineStartOffset(caretLine),magic + 1,
+ rectSelect && select);
+ if(newCaret == -1)
+ {
+ int start = getLineStartOffset(caretLine);
+ if(caret == start)
+ {
+ getToolkit().beep();
+ return;
+ }
+ else
+ newCaret = start;
+ }
+
+ _changeLine(select, newCaret);
+
+ setMagicCaretPosition(magic);
+ } //}}}
+
+ //{{{ goToPrevPage() method
+ /**
+ * Moves the caret to the previous screenful.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToPrevPage(boolean select)
+ {
+ scrollToCaret(false);
+ int magic = getMagicCaretPosition();
+
+ if(caretLine < displayManager.getFirstVisibleLine())
+ {
+ caretLine = displayManager.getNextVisibleLine(
+ caretLine);
+ }
+
+ int newCaret;
+
+ if(getFirstLine() == 0)
+ {
+ int firstVisibleLine = displayManager
+ .getFirstVisibleLine();
+ newCaret = getLineStartOffset(firstVisibleLine);
+ }
+ else
+ {
+ int caretScreenLine = getScreenLineOfOffset(caret);
+
+ scrollUpPage();
+
+ newCaret = xToScreenLineOffset(caretScreenLine,
+ magic,true);
+ }
+
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret,false);
+
+ setMagicCaretPosition(magic);
+ } //}}}
+
+ //{{{ goToPrevParagraph() method
+ /**
+ * Moves the caret to the start of the previous paragraph.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToPrevParagraph(boolean select)
+ {
+ int lineNo = caretLine;
+ int newCaret = 0;
+
+ boolean foundBlank = false;
+
+ final Segment lineSegment = new Segment();
+loop: for(int i = lineNo - 1; i >= 0; i--)
+ {
+ if(!displayManager.isLineVisible(i))
+ continue;
+
+ getLineText(i,lineSegment);
+
+ for(int j = 0; j < lineSegment.count; j++)
+ {
+ switch(lineSegment.array[lineSegment.offset + j])
+ {
+ case ' ':
+ case '\t':
+ break;
+ default:
+ if(foundBlank)
+ {
+ newCaret = getLineEndOffset(i) - 1;
+ break loop;
+ }
+ else
+ continue loop;
+ }
+ }
+
+ foundBlank = true;
+ }
+
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+ } //}}}
+
+ //{{{ goToPrevWord() method
+ /**
+ * Moves the caret to the start of the previous word.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToPrevWord(boolean select)
+ {
+ goToPrevWord(select,false);
+ } //}}}
+
+ //{{{ goToPrevWord() method
+ /**
+ * Moves the caret to the start of the previous word.
+ * @param eatWhitespace If true, will eat whitespace
+ * @since jEdit 4.1pre5
+ */
+ public void goToPrevWord(boolean select, boolean eatWhitespace)
+ {
+ goToPrevWord(select,eatWhitespace,false);
+ } //}}}
+
+ //{{{ goToPrevWord() method
+ /**
+ * Moves the caret to the start of the previous word.
+ * @param eatWhitespace If true, will eat whitespace
+ * @param eatOnlyAfterWord Eat only whitespace after a word,
+ * in effect this goes to actual word starts even if eating
+ * @since jEdit 4.4pre1
+ */
+ public void goToPrevWord(boolean select, boolean eatWhitespace, boolean eatOnlyAfterWord)
+ {
+ int lineStart = getLineStartOffset(caretLine);
+ int newCaret = caret - lineStart;
+ String lineText = getLineText(caretLine);
+
+ if(newCaret == 0)
+ {
+ if(lineStart == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+ else
+ {
+ int prevLine = displayManager.getPrevVisibleLine(caretLine);
+ if(prevLine == -1)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ newCaret = getLineEndOffset(prevLine) - 1;
+ }
+ }
+ else
+ {
+ String noWordSep = buffer.getStringProperty("noWordSep");
+ boolean camelCasedWords = buffer.getBooleanProperty("camelCasedWords");
+ newCaret = TextUtilities.findWordStart(lineText,
+ newCaret - 1,noWordSep,true,camelCasedWords,eatWhitespace,
+ eatOnlyAfterWord);
+
+ newCaret += lineStart;
+ }
+
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+ } //}}}
+
+ //{{{ home() method
+ /**
+ * A "dumb home" action which only has 2 states:
+ * start of the whitespace or start of line
+ * @param select true if we also want to select from the cursor
+ * @since jedit 4.3pre18
+ */
+ public void home(boolean select)
+ {
+ switch(getInputHandler().getLastActionCount() % 2)
+ {
+ case 1:
+ goToStartOfWhiteSpace(select);
+ break;
+ default:
+ goToStartOfLine(select);
+ break;
+ }
+ } //}}}
+
+ //{{{ end() method
+ /**
+ * a dumb end action which only has 2 states:
+ * end of whitespace or end of line
+ * @param select true if we also want to select from the cursor
+ * @since jedit 4.3pre18
+ */
+ public void end(boolean select)
+ {
+ switch(getInputHandler().getLastActionCount() % 2)
+ {
+ case 1:
+ goToEndOfWhiteSpace(select);
+ break;
+ default:
+ goToEndOfLine(select);
+ break;
+ }
+ } //}}}
+
+ //{{{ smartHome() method
+ /**
+ * On subsequent invocations, first moves the caret to the first
+ * non-whitespace character of the line, then the beginning of the
+ * line, then to the first visible line.
+ * @param select true if you want to extend selection
+ * @since jEdit 4.3pre7
+ */
+ public void smartHome(boolean select)
+ {
+ switch(getInputHandler().getLastActionCount())
+ {
+ case 1:
+ goToStartOfWhiteSpace(select);
+ break;
+ case 2:
+ goToStartOfLine(select);
+ break;
+ default: //case 3:
+ goToFirstVisibleLine(select);
+ break;
+ }
+ } //}}}
+
+ //{{{ smartEnd() method
+ /**
+ * Has 4 states based on # of invocations:
+ * 1. last character of code (before inline comment)
+ * 2. last non whitespace character of the line
+ * 3. end of line
+ * 4. end of last visible line
+ * @param select true if you want to extend selection
+ * @since jEdit 4.3pre18
+ */
+ public void smartEnd(boolean select)
+ {
+ int pos = getCaretPosition();
+ int npos = 0;
+ switch(getInputHandler().getLastActionCount())
+ {
+ case 1:
+ goToEndOfCode(select);
+ npos = getCaretPosition();
+ if (npos == pos) goToEndOfWhiteSpace(select);
+ break;
+ case 2:
+ goToEndOfWhiteSpace(select);
+ break;
+ case 3:
+ goToEndOfLine(select);
+ break;
+ default: //case 4:
+ goToLastVisibleLine(select);
+ break;
+ }
+ } //}}}
+
+ //{{{ goToStartOfLine() method
+ /**
+ * Moves the caret to the beginning of the current line.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToStartOfLine(boolean select)
+ {
+ Selection s = getSelectionAtOffset(caret);
+ int line = select || s == null ? caretLine : s.startLine;
+ int newCaret = getLineStartOffset(line);
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+ } //}}}
+
+ //{{{ goToEndOfLine() method
+ /**
+ * Moves the caret to the end of the current line.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToEndOfLine(boolean select)
+ {
+ Selection s = getSelectionAtOffset(caret);
+ int line = select || s == null ? caretLine : s.endLine;
+ int newCaret = getLineEndOffset(line) - 1;
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+
+ // so that end followed by up arrow will always put caret at
+ // the end of the previous line, for example
+ //setMagicCaretPosition(Integer.MAX_VALUE);
+ } //}}}
+
+ //{{{ goToEndOfCode() method
+ /**
+ * Moves the caret to the end of the code present on the current line, before the comments and whitespace.
+ * @param select true if you want to extend selection
+ * @since jEdit 4.3pre18
+ */
+ public void goToEndOfCode(boolean select)
+ {
+ int line = getCaretLine();
+
+ // @todo - Should tokenHandler be an TextArea instance variable?
+ DefaultTokenHandler tokenHandler = new DefaultTokenHandler();
+ buffer.markTokens(line,tokenHandler);
+ Token token = tokenHandler.getTokens();
+
+ char[] txt = getLineText(line).toCharArray();
+
+ // replace comments with whitespace to find endOfCode:
+ while(true)
+ {
+ if( token.id == Token.COMMENT1 ||
+ token.id == Token.COMMENT2 ||
+ token.id == Token.COMMENT3 ||
+ token.id == Token.COMMENT4)
+ {
+ for(int i=token.offset; i<token.offset+token.length; i++)
+ {
+ txt[i] = ' ';
+ }
+ }
+
+ if(token.next == null)
+ break;
+ token = token.next;
+ }
+
+ int newCaret = getLineLength(line) - StandardUtilities.getTrailingWhiteSpace( new String(txt) );
+ newCaret += getLineStartOffset(line);
+
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(newCaret);
+ } //}}}
+
+ //{{{ goToStartOfWhiteSpace() method
+ /**
+ * Moves the caret to the first non-whitespace character of the current
+ * line.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToStartOfWhiteSpace(boolean select)
+ {
+ Selection s = getSelectionAtOffset(caret);
+ int line, offset;
+ if(select || s == null)
+ {
+ line = caretLine;
+ offset = caret - buffer.getLineStartOffset(line);
+ }
+ else
+ {
+ line = s.startLine;
+ offset = s.start - buffer.getLineStartOffset(line);
+ }
+
+ int firstIndent = chunkCache.getSubregionStartOffset(line,offset);
+ if(firstIndent == getLineStartOffset(line))
+ {
+ firstIndent = StandardUtilities.getLeadingWhiteSpace(getLineText(line));
+ if(firstIndent == getLineLength(line))
+ firstIndent = 0;
+ firstIndent += getLineStartOffset(line);
+ }
+
+ if(select)
+ extendSelection(caret,firstIndent);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(firstIndent);
+ } //}}}
+
+ //{{{ goToEndOfWhiteSpace() method
+ /**
+ * Moves the caret to the last non-whitespace character of the current
+ * line.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToEndOfWhiteSpace(boolean select)
+ {
+ Selection s = getSelectionAtOffset(caret);
+ int line, offset;
+ if(select || s == null)
+ {
+ line = caretLine;
+ offset = caret - getLineStartOffset(line);
+ }
+ else
+ {
+ line = s.endLine;
+ offset = s.end - getLineStartOffset(line);
+ }
+
+ int lastIndent = chunkCache.getSubregionEndOffset(line,offset);
+
+ if(lastIndent == getLineEndOffset(line))
+ {
+ lastIndent = getLineLength(line) - StandardUtilities.getTrailingWhiteSpace(getLineText(line));
+ if(lastIndent == 0)
+ lastIndent = getLineLength(line);
+ lastIndent += getLineStartOffset(line);
+ }
+ else
+ {
+ lastIndent--;
+ }
+
+ if(select)
+ extendSelection(caret,lastIndent);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(lastIndent);
+ } //}}}
+
+ //{{{ goToFirstVisibleLine() method
+ /**
+ * Moves the caret to the first visible line.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToFirstVisibleLine(boolean select)
+ {
+ int firstVisibleLine = getFirstLine() == 0 ? 0 : electricScroll;
+ int firstVisible = getScreenLineStartOffset(firstVisibleLine);
+ if(firstVisible == -1)
+ {
+ firstVisible = getLineStartOffset(displayManager
+ .getFirstVisibleLine());
+ }
+
+ if(select)
+ extendSelection(caret,firstVisible);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(firstVisible);
+ } //}}}
+
+ //{{{ goToLastVisibleLine() method
+ /**
+ * Moves the caret to the last visible line.
+ * @param select true if you want to extend selection
+ * @since jEdit 2.7pre2
+ */
+ public void goToLastVisibleLine(boolean select)
+ {
+ int lastVisible;
+
+ if(getFirstLine() + visibleLines >=
+ displayManager.getScrollLineCount())
+ {
+ lastVisible = getLineEndOffset(displayManager
+ .getLastVisibleLine()) - 1;
+ }
+ else
+ {
+ lastVisible = visibleLines - electricScroll - 1;
+ if(lastLinePartial)
+ lastVisible--;
+ if(lastVisible < 0)
+ lastVisible = 0;
+ lastVisible = getScreenLineEndOffset(lastVisible) - 1;
+ if(lastVisible == -1)
+ {
+ lastVisible = getLineEndOffset(displayManager
+ .getLastVisibleLine()) - 1;
+ }
+ }
+
+ if(select)
+ extendSelection(caret,lastVisible);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(lastVisible);
+ } //}}}
+
+ //{{{ goToBufferStart() method
+ /**
+ * Moves the caret to the beginning of the buffer.
+ * @param select true if you want to extend selection
+ * @since jEdit 4.0pre3
+ */
+ public void goToBufferStart(boolean select)
+ {
+ int start = buffer.getLineStartOffset(
+ displayManager.getFirstVisibleLine());
+ if(select)
+ extendSelection(caret,start);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(start);
+ } //}}}
+
+ //{{{ goToBufferEnd() method
+ /**
+ * Moves the caret to the end of the buffer.
+ * @param select true if you want to extend selection
+ * @since jEdit 4.0pre3
+ */
+ public void goToBufferEnd(boolean select)
+ {
+ int end = buffer.getLineEndOffset(
+ displayManager.getLastVisibleLine()) - 1;
+ if(select)
+ extendSelection(caret,end);
+ else if(!multi)
+ selectNone();
+ moveCaretPosition(end);
+ } //}}}
+
+ //{{{ goToMatchingBracket() method
+ /**
+ * Moves the caret to the bracket matching the one before the caret.
+ * @since jEdit 2.7pre3
+ */
+ public void goToMatchingBracket()
+ {
+ if(getLineLength(caretLine) != 0)
+ {
+ int dot = caret - getLineStartOffset(caretLine);
+
+ int bracket = TextUtilities.findMatchingBracket(
+ buffer,caretLine,Math.max(0,dot - 1));
+ if(bracket != -1)
+ {
+ selectNone();
+ moveCaretPosition(bracket + 1,false);
+ return;
+ }
+ }
+
+ getToolkit().beep();
+ } //}}}
+
+ //}}}
+
+ //{{{ User input
+
+ //{{{ userInput() method
+ /**
+ * Handles the insertion of the specified character. It performs the
+ * following operations above and beyond simply inserting the text:
+ * <ul>
+ * <li>Inserting a TAB with a selection will shift to the right
+ * <li>Inserting a BACK_SPACE or a DELETE will remove a character
+ * <li>Inserting an indent open/close bracket will re-indent the current
+ * line as necessary
+ * </ul>
+ *
+ * @param ch The character
+ * @see #setSelectedText(String)
+ * @see #isOverwriteEnabled()
+ * @since jEdit 4.3pre7
+ */
+ public void userInput(char ch)
+ {
+ if(!isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ getPainter().hideCursor();
+
+ switch(ch)
+ {
+ case '\t':
+ userInputTab();
+ break;
+ case '\b':
+ backspace();
+ break;
+ case '\u007F':
+ delete();
+ break;
+ default:
+ boolean indent = buffer.isElectricKey(ch, caretLine);
+ String str = String.valueOf(ch);
+ if(getSelectionCount() == 0)
+ {
+ if(!doWordWrap(ch == ' '))
+ insert(str,indent);
+ }
+ else
+ replaceSelection(str);
+ break;
+ }
+ } //}}}
+
+ //{{{ isOverwriteEnabled() method
+ /**
+ * Returns true if overwrite mode is enabled, false otherwise.
+ */
+ public final boolean isOverwriteEnabled()
+ {
+ return overwrite;
+ } //}}}
+
+ //{{{ setOverwriteEnabled() method
+ /**
+ * Sets overwrite mode.
+ */
+ public final void setOverwriteEnabled(boolean overwrite)
+ {
+ blink = true;
+ caretTimer.restart();
+
+ this.overwrite = overwrite;
+ invalidateLine(caretLine);
+ fireStatusChanged(StatusListener.OVERWRITE_CHANGED,overwrite);
+ } //}}}
+
+ //{{{ toggleOverwriteEnabled() method
+ /**
+ * Toggles overwrite mode.
+ * @since jEdit 2.7pre2
+ */
+ public final void toggleOverwriteEnabled()
+ {
+ setOverwriteEnabled(!overwrite);
+ } //}}}
+
+ //{{{ backspace() method
+ /**
+ * Deletes the character before the caret, or the selection, if one is
+ * active.
+ * @since jEdit 2.7pre2
+ */
+ public void backspace()
+ {
+ delete(false);
+ } //}}}
+
+ //{{{ backspaceWord() methods
+ /**
+ * Deletes the word before the caret.
+ * @since jEdit 2.7pre2
+ */
+ public void backspaceWord()
+ {
+ backspaceWord(false);
+ }
+
+ /**
+ * Deletes the word before the caret.
+ * @param eatWhitespace If true, will eat whitespace
+ * @since jEdit 4.2pre5
+ */
+ public void backspaceWord(boolean eatWhitespace)
+ {
+ backspaceWord(eatWhitespace,false);
+ } //}}}
+
+ //{{{ backspaceWord() method
+ /**
+ * Deletes the word before the caret.
+ * @param eatWhitespace If true, will eat whitespace
+ * @param eatOnlyAfterWord Eat only whitespace after a word,
+ * in effect this goes to actual word starts even if eating
+ * @since jEdit 4.4pre1
+ */
+ public void backspaceWord(boolean eatWhitespace, boolean eatOnlyAfterWord)
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ if(getSelectionCount() != 0)
+ {
+ setSelectedText("");
+ return;
+ }
+
+ int lineStart = getLineStartOffset(caretLine);
+ int _caret = caret - lineStart;
+
+ String lineText = getLineText(caretLine);
+
+ if(_caret == 0)
+ {
+ if(lineStart == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+ _caret--;
+ }
+ else
+ {
+ String noWordSep = buffer.getStringProperty("noWordSep");
+ boolean camelCasedWords = buffer.getBooleanProperty("camelCasedWords");
+ _caret = TextUtilities.findWordStart(lineText,_caret-1,
+ noWordSep,true,camelCasedWords,eatWhitespace,
+ eatOnlyAfterWord);
+ }
+
+ buffer.remove(_caret + lineStart, caret - (_caret + lineStart));
+ } //}}}
+
+ //{{{ delete() method
+ /**
+ * Deletes the character after the caret.
+ * @since jEdit 2.7pre2
+ */
+ public void delete()
+ {
+ delete(true);
+ } //}}}
+
+ //{{{ deleteToEndOfLine() method
+ /**
+ * Deletes from the caret to the end of the current line.
+ * @since jEdit 2.7pre2
+ */
+ public void deleteToEndOfLine()
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ buffer.remove(caret,getLineEndOffset(caretLine)
+ - caret - 1);
+ } //}}}
+
+ //{{{ deleteLine() method
+ /**
+ * Deletes the line containing the caret.
+ * @since jEdit 2.7pre2
+ */
+ public void deleteLine()
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ int x = chunkCache.subregionOffsetToX(caretLine,caret - getLineStartOffset(caretLine));
+ int[] lines = getSelectedLines();
+
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ for (int i = lines.length - 1; i >= 0; i--)
+ {
+ int start = getLineStartOffset(lines[i]);
+ int end = getLineEndOffset(lines[i]);
+ if (end > buffer.getLength())
+ {
+ if (start != 0)
+ start--;
+ end--;
+ }
+ buffer.remove(start,end - start);
+ }
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ int lastLine = displayManager.getLastVisibleLine();
+
+ if(caretLine == lastLine)
+ {
+ int offset = chunkCache.xToSubregionOffset(lastLine,0,x,true);
+ setCaretPosition(buffer.getLineStartOffset(lastLine)
+ + offset);
+ }
+ else
+ {
+ int offset = chunkCache.xToSubregionOffset(caretLine,0,x,true);
+ setCaretPosition(getLineStartOffset(caretLine) + offset);
+ }
+ } //}}}
+
+ //{{{ deleteParagraph() method
+ /**
+ * Deletes the paragraph containing the caret.
+ * @since jEdit 2.7pre2
+ */
+ public void deleteParagraph()
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ // find the beginning of the paragraph.
+ int start = 0;
+ for(int i = caretLine - 1; i >= 0; i--)
+ {
+ if (lineContainsSpaceAndTabs(i))
+ {
+ start = getLineStartOffset(i);
+ break;
+ }
+ }
+
+ // Find the end of the paragraph
+ int end = buffer.getLength();
+ for(int i = caretLine + 1; i < getLineCount(); i++)
+ {
+ //if(!displayManager.isLineVisible(i))
+ // continue loop;
+
+ if (lineContainsSpaceAndTabs(i))
+ {
+ end = getLineEndOffset(i) - 1;
+ break;
+ }
+ }
+
+ buffer.remove(start,end - start);
+ } //}}}
+
+ //{{{ deleteToStartOfLine() method
+ /**
+ * Deletes from the caret to the beginning of the current line.
+ * @since jEdit 2.7pre2
+ */
+ public void deleteToStartOfLine()
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ buffer.remove(getLineStartOffset(caretLine),
+ caret - getLineStartOffset(caretLine));
+ } //}}}
+
+ //{{{ deleteWord() methods
+ /**
+ * Deletes the word in front of the caret.
+ * @since jEdit 2.7pre2
+ */
+ public void deleteWord()
+ {
+ deleteWord(false);
+ }
+
+ /**
+ * Deletes the word in front of the caret.
+ *
+. * @param eatWhitespace If true, will eat whitespace
+ * @since jEdit 4.2pre5
+ */
+ public void deleteWord(boolean eatWhitespace)
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ if(getSelectionCount() != 0)
+ {
+ setSelectedText("");
+ return;
+ }
+
+ int lineStart = getLineStartOffset(caretLine);
+ int _caret = caret - lineStart;
+
+ String lineText = getLineText(caretLine);
+
+ if(_caret == lineText.length())
+ {
+ if(lineStart + _caret == buffer.getLength())
+ {
+ getToolkit().beep();
+ return;
+ }
+ _caret++;
+ }
+ else
+ {
+ String noWordSep = buffer.getStringProperty("noWordSep");
+ boolean camelCasedWords = buffer.getBooleanProperty("camelCasedWords");
+ _caret = TextUtilities.findWordEnd(lineText,
+ _caret+1,noWordSep,true,camelCasedWords,eatWhitespace);
+ }
+
+ buffer.remove(caret,(_caret + lineStart) - caret);
+ } //}}}
+
+ //{{{ isMultipleSelectionEnabled() method
+ /**
+ * Returns if multiple selection is enabled.
+ * @since jEdit 3.2pre1
+ */
+ public final boolean isMultipleSelectionEnabled()
+ {
+ return multi;
+ } //}}}
+
+ //{{{ toggleMultipleSelectionEnabled() method
+ /**
+ * Toggles multiple selection.
+ * @since jEdit 3.2pre1
+ */
+ public final void toggleMultipleSelectionEnabled()
+ {
+ setMultipleSelectionEnabled(!multi);
+ } //}}}
+
+ //{{{ setMultipleSelectionEnabled() method
+ /**
+ * Set multiple selection on or off according to the value of
+ * <code>multi</code>. This only affects the ability to
+ * make multiple selections in the user interface; macros and plugins
+ * can manipulate them regardless of the setting of this flag. In fact,
+ * in most cases, calling this method should not be necessary.
+ *
+ * @param multi Should multiple selection be enabled?
+ * @since jEdit 3.2pre1
+ */
+ public final void setMultipleSelectionEnabled(boolean multi)
+ {
+ this.multi = multi;
+ fireStatusChanged(StatusListener.MULTI_SELECT_CHANGED,multi);
+ painter.repaint();
+ } //}}}
+
+ //{{{ isRectangularSelectionEnabled() method
+ /**
+ * Returns if rectangular selection is enabled.
+ * @since jEdit 4.2pre1
+ */
+ public final boolean isRectangularSelectionEnabled()
+ {
+ return rectangularSelectionMode;
+ } //}}}
+
+ //{{{ toggleRectangularSelectionEnabled() method
+ /**
+ * Toggles rectangular selection.
+ * @since jEdit 4.2pre1
+ */
+ public final void toggleRectangularSelectionEnabled()
+ {
+ setRectangularSelectionEnabled(!rectangularSelectionMode);
+
+ if(getSelectionCount() == 1)
+ {
+ Selection s = getSelection(0);
+ removeFromSelection(s);
+ if(rectangularSelectionMode)
+ {
+ addToSelection(new Selection.Rect(
+ s.getStart(),s.getEnd()));
+ }
+ else
+ {
+ addToSelection(new Selection.Range(
+ s.getStart(),s.getEnd()));
+ }
+ }
+ } //}}}
+
+ //{{{ setRectangularSelectionEnabled() method
+ /**
+ * Set rectangular selection on or off according to the value of
+ * <code>rectangularSelectionMode</code>. This only affects the ability
+ * to make multiple selections from the keyboard. A rectangular
+ * selection can always be created by dragging with the mouse by holding
+ * down <b>Control</b>, regardless of the state of this flag.
+ *
+ * @param rectangularSelectionMode Should rectangular selection be
+ * enabled?
+ * @since jEdit 4.2pre1
+ */
+ public final void setRectangularSelectionEnabled(
+ boolean rectangularSelectionMode)
+ {
+ this.rectangularSelectionMode = rectangularSelectionMode;
+ fireStatusChanged(StatusListener.RECT_SELECT_CHANGED,
+ rectangularSelectionMode);
+ painter.repaint();
+ } //}}}
+
+ //}}}
+
+ //{{{ Folding
+
+ //{{{ goToParentFold() method
+ /**
+ * Moves the caret to the fold containing the one at the caret
+ * position.
+ * @since jEdit 4.0pre3
+ */
+ public void goToParentFold()
+ {
+ int line = -1;
+ int level = buffer.getFoldLevel(caretLine);
+ for(int i = caretLine - 1; i >= 0; i--)
+ {
+ if(buffer.getFoldLevel(i) < level)
+ {
+ line = i;
+ break;
+ }
+ }
+
+ if(line == -1)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ int magic = getMagicCaretPosition();
+
+ int newCaret = buffer.getLineStartOffset(line)
+ + chunkCache.xToSubregionOffset(line,0,magic + 1,true);
+ if(!multi)
+ selectNone();
+
+ moveCaretPosition(newCaret);
+ setMagicCaretPosition(magic);
+ } //}}}
+
+ //{{{ goToNextFold() method
+ /**
+ * Moves the caret to the next fold.
+ * @param select true if you want to extend selection
+ * @since jEdit 4.0pre3
+ */
+ public void goToNextFold(boolean select)
+ {
+ int nextFold = -1;
+ for(int i = caretLine + 1; i < buffer.getLineCount(); i++)
+ {
+ if(buffer.isFoldStart(i)
+ && displayManager.isLineVisible(i))
+ {
+ nextFold = i;
+ break;
+ }
+ }
+
+ if(nextFold == -1)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ int magic = getMagicCaretPosition();
+
+ int newCaret = buffer.getLineStartOffset(nextFold)
+ + chunkCache.xToSubregionOffset(nextFold,0,magic + 1,true);
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+
+ moveCaretPosition(newCaret);
+ setMagicCaretPosition(magic);
+ } //}}}
+
+ //{{{ goToPrevFold() method
+ /**
+ * Moves the caret to the previous fold.
+ * @param select true if you want to extend selection
+ * @since jEdit 4.0pre3
+ */
+ public void goToPrevFold(boolean select)
+ {
+ int prevFold = -1;
+ for(int i = caretLine - 1; i >= 0; i--)
+ {
+ if(buffer.isFoldStart(i)
+ && displayManager.isLineVisible(i))
+ {
+ prevFold = i;
+ break;
+ }
+ }
+
+ if(prevFold == -1)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ int magic = getMagicCaretPosition();
+
+ int newCaret = buffer.getLineStartOffset(prevFold)
+ + chunkCache.xToSubregionOffset(prevFold,0,magic + 1,true);
+ if(select)
+ extendSelection(caret,newCaret);
+ else if(!multi)
+ selectNone();
+
+ moveCaretPosition(newCaret);
+ setMagicCaretPosition(magic);
+ } //}}}
+
+ //{{{ collapseFold() methods
+ /**
+ * Like {@link DisplayManager#collapseFold(int)}, but
+ * also moves the caret to the first line of the fold.
+ * @since jEdit 4.0pre3
+ */
+ public void collapseFold()
+ {
+ collapseFold(caretLine);
+ }
+
+ /**
+ * Like {@link DisplayManager#collapseFold(int)}, but
+ * also moves the caret to the first line of the fold.
+ * @since jEdit 4.3pre7
+ */
+ public void collapseFold(int line)
+ {
+ displayManager.collapseFold(line);
+ } //}}}
+
+ //{{{ expandFold() method
+ /**
+ * Like {@link DisplayManager#expandFold(int,boolean)}, but
+ * also moves the caret to the first sub-fold.
+ * @param fully If true, all subfolds will also be expanded
+ * @since jEdit 4.0pre3
+ */
+ public void expandFold(boolean fully)
+ {
+ int x = chunkCache.subregionOffsetToX(caretLine,
+ caret - getLineStartOffset(caretLine));
+
+ int line = displayManager.expandFold(caretLine,fully);
+
+ if(!fully && line != -1)
+ {
+ if(!multi)
+ selectNone();
+ moveCaretPosition(getLineStartOffset(line)
+ + chunkCache.xToSubregionOffset(line,0,x,true));
+ }
+ } //}}}
+
+ //{{{ selectFold() methods
+ /**
+ * Selects the fold that contains the caret line number.
+ * @since jEdit 3.1pre3
+ */
+ public void selectFold()
+ {
+ selectFold(caretLine);
+ }
+
+ /**
+ * Selects the fold that contains the specified line number.
+ * @param line The line number
+ * @since jEdit 4.0pre1
+ */
+ public void selectFold(int line)
+ {
+ int[] lines = buffer.getFoldAtLine(line);
+
+ int newCaret = getLineEndOffset(lines[1]) - 1;
+ Selection s = new Selection.Range(getLineStartOffset(lines[0]),newCaret);
+ if(multi)
+ addToSelection(s);
+ else
+ setSelection(s);
+ moveCaretPosition(newCaret);
+ } //}}}
+
+ //{{{ narrowToFold() method
+ /**
+ * Hides all lines except those in the fold containing the caret.
+ * @since jEdit 4.0pre1
+ */
+ public void narrowToFold()
+ {
+ int[] lines = buffer.getFoldAtLine(caretLine);
+ if(lines[0] == 0 && lines[1] == buffer.getLineCount() - 1)
+ getToolkit().beep();
+ else
+ displayManager.narrow(lines[0],lines[1]);
+ } //}}}
+
+ //{{{ narrowToSelection() method
+ /**
+ * Hides all lines except those in the selection.
+ * @since jEdit 4.0pre1
+ */
+ public void narrowToSelection()
+ {
+ if(getSelectionCount() != 1)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ Selection sel = getSelection(0);
+ displayManager.narrow(sel.getStartLine(),sel.getEndLine());
+
+ selectNone();
+ } //}}}
+
+ //{{{ addExplicitFold() method
+ /**
+ * Surrounds the selection with explicit fold markers.
+ * @throws TextAreaException an exception thrown if the folding mode is
+ * not explicit
+ * @since jEdit 4.0pre3
+ */
+ public void addExplicitFold() throws TextAreaException
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+ if(!buffer.getStringProperty("folding").equals("explicit"))
+ {
+ throw new TextAreaException("folding-not-explicit");
+ }
+
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ if (getSelectionCount() == 0)
+ {
+ int caretBack = addExplicitFold(caret, caret, caretLine, caretLine);
+ setCaretPosition(caret - caretBack);
+ }
+ else
+ {
+ Selection[] selections = getSelection();
+ Selection selection = null;
+ int caretBack = 0;
+ for (int i = 0; i < selections.length; i++)
+ {
+ selection = selections[i];
+ caretBack = addExplicitFold(selection.start, selection.end, selection.startLine,selection.endLine);
+ }
+ // Selection cannot be null because there is at least 1 selection
+ assert selection != null;
+ setCaretPosition(selection.start - caretBack, false);
+ }
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ } //}}}
+ //}}}
+
+ //{{{ Text editing
+
+ //{{{ lineComment() method
+ /**
+ * Prepends each line of the selection with the line comment string.
+ * @since jEdit 3.2pre1
+ */
+ public void lineComment()
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+ String comment = buffer.getContextSensitiveProperty(caret,"lineComment");
+ if(comment == null || comment.length() == 0)
+ {
+ rangeLineComment();
+ return;
+ }
+
+ comment += ' ';
+
+ buffer.beginCompoundEdit();
+
+ int[] lines = getSelectedLines();
+
+ try
+ {
+ for(int i = 0; i < lines.length; i++)
+ {
+ String text = getLineText(lines[i]);
+ buffer.insert(getLineStartOffset(lines[i])
+ + StandardUtilities.getLeadingWhiteSpace(text),
+ comment);
+ }
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ selectNone();
+ } //}}}
+
+ //{{{ rangeComment() method
+ /**
+ * Adds comment start and end strings to the beginning and end of the
+ * selection.
+ * @since jEdit 3.2pre1
+ */
+ public void rangeComment()
+ {
+ String commentStart = buffer.getContextSensitiveProperty(caret,"commentStart");
+ String commentEnd = buffer.getContextSensitiveProperty(caret,"commentEnd");
+ if(!buffer.isEditable() || commentStart == null || commentEnd == null
+ || commentStart.length() == 0 || commentEnd.length() == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ commentStart += ' ';
+ commentEnd = ' ' + commentEnd;
+
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ Selection[] selection = getSelection();
+
+ if(selection.length == 0)
+ {
+ int oldCaret = caret;
+ buffer.insert(caret,commentStart);
+ buffer.insert(caret,commentEnd);
+ setCaretPosition(oldCaret + commentStart.length());
+ }
+
+ for(int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ if(s instanceof Selection.Range)
+ {
+ buffer.insert(s.start,commentStart);
+ buffer.insert(s.end,commentEnd);
+ }
+ else if(s instanceof Selection.Rect)
+ {
+ Selection.Rect rect = (Selection.Rect)s;
+ int start = rect.getStartColumn(buffer);
+ int end = rect.getEndColumn(buffer);
+
+ for(int j = s.startLine; j <= s.endLine; j++)
+ {
+ buffer.insertAtColumn(j,end,
+ commentEnd);
+ buffer.insertAtColumn(j,start,
+ commentStart);
+ }
+ }
+ }
+
+ selectNone();
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ formatParagraph() method
+ /**
+ * Formats the paragraph containing the caret.
+ * @since jEdit 2.7pre2
+ */
+ public void formatParagraph() throws TextAreaException
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ if(maxLineLen <= 0)
+ {
+ throw new TextAreaException("format-maxlinelen");
+ }
+
+ Selection[] selection = getSelection();
+ if(selection.length != 0)
+ {
+ buffer.beginCompoundEdit();
+
+ for(int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ setSelectedText(s,TextUtilities.format(
+ getSelectedText(s),maxLineLen,
+ buffer.getTabSize()));
+ }
+
+ buffer.endCompoundEdit();
+ }
+ else
+ {
+ int lineNo = getCaretLine();
+
+ int start = 0, end = buffer.getLength();
+
+ for(int i = lineNo - 1; i >= 0; i--)
+ {
+ if (lineContainsSpaceAndTabs(i))
+ {
+ start = getLineEndOffset(i);
+ break;
+ }
+ }
+
+ for(int i = lineNo + 1; i < getLineCount(); i++)
+ {
+ if (lineContainsSpaceAndTabs(i))
+ {
+ end = getLineStartOffset(i) - 1;
+ break;
+ }
+ }
+
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ String text = buffer.getText(start,end - start);
+ int offset = getCaretPosition() - start;
+ int noSpaceOffset = TextUtilities.indexIgnoringWhitespace(
+ text,offset);
+ buffer.remove(start,end - start);
+ text = TextUtilities.format(
+ text,maxLineLen,buffer.getTabSize());
+ buffer.insert(start,text);
+ int caretPos = start;
+ if (text.length() != 0)
+ {
+ caretPos += Math.min(text.length(),
+ TextUtilities.ignoringWhitespaceIndex(
+ text,noSpaceOffset));
+ }
+ moveCaretPosition(caretPos);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ }
+ } //}}}
+
+ //{{{ spacesToTabs() method
+ /**
+ * Converts spaces to tabs in the selection.
+ * @since jEdit 2.7pre2
+ */
+ public void spacesToTabs()
+ {
+ Selection[] selection = getSelection();
+
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ buffer.beginCompoundEdit();
+
+ if(selection.length == 0)
+ {
+ setText(TextUtilities.spacesToTabs(
+ getText(), buffer.getTabSize()));
+ }
+ else
+ {
+ for(int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ setSelectedText(s,TextUtilities.spacesToTabs(
+ getSelectedText(s),buffer.getTabSize()));
+ }
+ }
+
+ buffer.endCompoundEdit();
+ } //}}}
+
+ //{{{ tabsToSpaces() method
+ /**
+ * Converts tabs to spaces in the selection.
+ * @since jEdit 2.7pre2
+ */
+ public void tabsToSpaces()
+ {
+ Selection[] selection = getSelection();
+
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ buffer.beginCompoundEdit();
+
+ if(selection.length == 0)
+ {
+ setText(TextUtilities.tabsToSpaces(
+ getText(), buffer.getTabSize()));
+ }
+ else
+ {
+ for(int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ setSelectedText(s, TextUtilities.tabsToSpaces(
+ getSelectedText(s),buffer.getTabSize()));
+ }
+ }
+
+ buffer.endCompoundEdit();
+ } //}}}
+
+ //{{{ toUpperCase() method
+ /**
+ * Converts the selected text to upper case.
+ * @since jEdit 2.7pre2
+ */
+ public void toUpperCase()
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ Selection[] selection = getSelection();
+ int caret = -1;
+ if (selection.length == 0)
+ {
+ caret = getCaretPosition();
+ selectWord();
+ selection = getSelection();
+ }
+ if (selection.length == 0)
+ {
+ if (caret != -1)
+ setCaretPosition(caret);
+ getToolkit().beep();
+ return;
+ }
+
+ buffer.beginCompoundEdit();
+
+ for(int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ setSelectedText(s,getSelectedText(s).toUpperCase());
+ }
+
+ buffer.endCompoundEdit();
+ if (caret != -1)
+ setCaretPosition(caret);
+ } //}}}
+
+ //{{{ toLowerCase() method
+ /**
+ * Converts the selected text to lower case.
+ * @since jEdit 2.7pre2
+ */
+ public void toLowerCase()
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ Selection[] selection = getSelection();
+ int caret = -1;
+ if (selection.length == 0)
+ {
+ caret = getCaretPosition();
+ selectWord();
+ selection = getSelection();
+ }
+ if (selection.length == 0)
+ {
+ if (caret != -1)
+ setCaretPosition(caret);
+ getToolkit().beep();
+ return;
+ }
+
+ buffer.beginCompoundEdit();
+
+ for (int i = 0; i < selection.length; i++)
+ {
+ Selection s = selection[i];
+ setSelectedText(s,getSelectedText(s).toLowerCase());
+ }
+
+ buffer.endCompoundEdit();
+ if (caret != -1)
+ setCaretPosition(caret);
+ } //}}}
+
+ //{{{ removeTrailingWhiteSpace() method
+ /**
+ * Removes trailing whitespace from all lines in the selection.
+ * @since jEdit 2.7pre2
+ */
+ public void removeTrailingWhiteSpace()
+ {
+ if(!buffer.isEditable())
+ getToolkit().beep();
+ else
+ {
+ buffer.removeTrailingWhiteSpace(getSelectedLines());
+ }
+ } //}}}
+
+ //{{{ insertEnterAndIndent() method
+ public void insertEnterAndIndent()
+ {
+ if(!isEditable())
+ getToolkit().beep();
+ else
+ {
+ try
+ {
+ buffer.beginCompoundEdit();
+ setSelectedText("\n");
+ buffer.indentLine(caretLine,true);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ }
+ } //}}}
+
+ //{{{ insertTabAndIndent() method
+ public void insertTabAndIndent()
+ {
+ if(!isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ if(getSelectionCount() == 0)
+ {
+ // if caret is inside leading whitespace, indent.
+ CharSequence text = buffer.getLineSegment(caretLine);
+ int start = buffer.getLineStartOffset(caretLine);
+ int whiteSpace = StandardUtilities.getLeadingWhiteSpace(text);
+
+ if(caret - start <= whiteSpace
+ && buffer.indentLine(caretLine,false))
+ return;
+ }
+
+ userInput('\t');
+ } //}}}
+
+ //{{{ indentSelectedLines() method
+ /**
+ * Indents all selected lines.
+ * @since jEdit 3.1pre3
+ */
+ public void indentSelectedLines()
+ {
+ if(!buffer.isEditable())
+ getToolkit().beep();
+ else
+ {
+ buffer.indentLines(getSelectedLines());
+ selectNone();
+ }
+ } //}}}
+
+ //{{{ shiftIndentLeft() method
+ /**
+ * Shifts the indent to the left.
+ * @since jEdit 2.7pre2
+ */
+ public void shiftIndentLeft()
+ {
+ if(!buffer.isEditable())
+ getToolkit().beep();
+ else
+ {
+ buffer.shiftIndentLeft(getSelectedLines());
+ }
+ } //}}}
+
+ //{{{ shiftIndentRight() method
+ /**
+ * Shifts the indent to the right.
+ * @since jEdit 2.7pre2
+ */
+ public void shiftIndentRight()
+ {
+ if(!buffer.isEditable())
+ getToolkit().beep();
+ else
+ buffer.shiftIndentRight(getSelectedLines());
+ } //}}}
+
+ //{{{ joinLines() method
+ /**
+ * Joins the current and the next line, or joins all lines in
+ * selections.
+ * @since jEdit 2.7pre2
+ */
+ public void joinLines()
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ try
+ {
+ buffer.beginCompoundEdit();
+ boolean doneForSelection = false;
+ for (Selection selection: selectionManager.getSelection())
+ {
+ while (selection.startLine < selection.endLine)
+ {
+ // Edit from end of selection to
+ // minimize invalidations and
+ // recaluculations of cached line info
+ // such as indent level or fold level.
+ joinLineAt(selection.endLine - 1);
+ doneForSelection = true;
+ }
+ }
+ // If nothing selected or all selections span only
+ // one line, join the line at the caret.
+ if (!doneForSelection)
+ {
+ int end = getLineEndOffset(caretLine);
+
+ // Nothing to do if the caret is on the last line.
+ if (end > buffer.getLength())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ joinLineAt(caretLine);
+ if(!multi)
+ selectNone();
+ moveCaretPosition(end - 1);
+ }
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ } //}}}
+ //}}}
+
+ //{{{ AWT stuff
+
+ //{{{ addLeftOfScrollBar() method
+ /**
+ * Adds a component to the left side of the box left of the vertical
+ * scroll bar. The ErrorList plugin uses this to show a global error
+ * overview, for example. It is possible for more than one component
+ * to be added, each is added to the left side of the box in turn.
+ * Adding to the left ensures the scrollbar is always right of all added
+ * components.
+ *
+ * @param comp The component
+ * @since jEdit 4.2pre1
+ */
+ public void addLeftOfScrollBar(Component comp)
+ {
+ verticalBox.add(comp, 0);
+ } //}}}
+
+ //{{{ removeLeftOfScrollBar() method
+ /**
+ * Removes a component from the box left of the vertical scroll bar.
+ *
+ * @param comp The component
+ * @since jEdit 4.2pre1
+ */
+ public void removeLeftOfScrollBar(Component comp)
+ {
+ verticalBox.remove(comp);
+ } //}}}
+
+ //{{{ addNotify() method
+ /**
+ * Called by the AWT when this component is added to a parent.
+ * Adds document listener.
+ */
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+
+ ToolTipManager.sharedInstance().registerComponent(painter);
+ ToolTipManager.sharedInstance().registerComponent(gutter);
+
+ recalculateVisibleLines();
+ if(!buffer.isLoading())
+ recalculateLastPhysicalLine();
+ propertiesChanged();
+ } //}}}
+
+ //{{{ removeNotify() method
+ /**
+ * Called by the AWT when this component is removed from it's parent.
+ * This clears the pointer to the currently focused component.
+ * Also removes document listener.
+ */
+ @Override
+ public void removeNotify()
+ {
+ super.removeNotify();
+
+ ToolTipManager.sharedInstance().unregisterComponent(painter);
+ ToolTipManager.sharedInstance().unregisterComponent(gutter);
+
+ if(focusedComponent == this)
+ focusedComponent = null;
+
+ caretTimer.stop();
+ } //}}}
+
+ //{{{ getFocusTraversalKeysEnabled() method
+ /**
+ * Java 1.4 compatibility fix to make Tab key work.
+ * @since jEdit 3.2pre4
+ */
+ @Override
+ public boolean getFocusTraversalKeysEnabled()
+ {
+ return false;
+ } //}}}
+
+ //{{{ getFocusCycleRoot() method
+ /**
+ * Java 1.4 compatibility fix to make Tab traversal work in a sane
+ * manner.
+ * @since jEdit 4.2pre3
+ */
+ public boolean getFocusCycleRoot()
+ {
+ return true;
+ } //}}}
+
+ //{{{ processKeyEvent() method
+ @Override
+ public void processKeyEvent(KeyEvent evt)
+ {
+ getInputHandler().processKeyEvent(evt, 1 /* source=TEXTAREA (1) */, false);
+ if(!evt.isConsumed())
+ super.processKeyEvent(evt);
+
+ } //}}}
+
+ //{{{ addTopComponent() method
+ /**
+ * Adds a component above the gutter, text area, and vertical scroll bar.
+ *
+ * @since jEdit 4.2pre3
+ */
+ public void addTopComponent(Component comp)
+ {
+ add(ScrollLayout.TOP,comp);
+ } //}}}
+
+ //{{{ removeTopComponent() method
+ /**
+ * Removes a component from above the gutter, text area, and vertical scroll bar.
+ *
+ * @since jEdit 4.2pre3
+ */
+ public void removeTopComponent(Component comp)
+ {
+ remove(comp);
+ } //}}}
+
+ //{{{ getInputMethodRequests() method
+ @Override
+ public InputMethodRequests getInputMethodRequests()
+ {
+ if(inputMethodSupport == null)
+ {
+ inputMethodSupport = new InputMethodSupport(this);
+ Log.log(Log.DEBUG, this, "InputMethodSupport is activated");
+ }
+ return inputMethodSupport;
+ } //}}}
+ //}}}
+
+ //{{{ addStatusListener() method
+ /**
+ * Adds a scroll listener to this text area.
+ * @param listener The listener
+ * @since jEdit 4.3pre2
+ */
+ public final void addStatusListener(StatusListener listener)
+ {
+ listenerList.add(StatusListener.class,listener);
+ } //}}}
+
+ //{{{ removeStatusListener() method
+ /**
+ * Removes a scroll listener from this text area.
+ * @param listener The listener
+ * @since jEdit 4.3pre2
+ */
+ public final void removeStatusListener(StatusListener listener)
+ {
+ listenerList.remove(StatusListener.class,listener);
+ } //}}}
+
+ //{{{ propertiesChanged() method
+ /**
+ * Called by jEdit when necessary. Plugins should not call this method.
+ */
+ public void propertiesChanged()
+ {
+ if(buffer == null)
+ return;
+
+ int _tabSize = buffer.getTabSize();
+ char[] foo = new char[_tabSize];
+ for(int i = 0; i < foo.length; i++)
+ foo[i] = ' ';
+
+ tabSize = painter.getStringWidth(new String(foo));
+
+ charWidth = (int)Math.round(
+ painter.getFont().getStringBounds(foo,0,1,
+ painter.getFontRenderContext()).getWidth());
+
+ String oldWrap = wrap;
+ wrap = buffer.getStringProperty("wrap");
+ hardWrap = wrap.equals("hard");
+ softWrap = wrap.equals("soft");
+ boolean oldWrapToWidth = wrapToWidth;
+ int oldWrapMargin = wrapMargin;
+ setMaxLineLength(buffer.getIntegerProperty("maxLineLen",0));
+
+ boolean wrapSettingsChanged = !(wrap.equals(oldWrap)
+ && oldWrapToWidth == wrapToWidth
+ && oldWrapMargin == wrapMargin);
+
+ if(displayManager != null && !bufferChanging
+ && !buffer.isLoading() && wrapSettingsChanged)
+ {
+ displayManager.invalidateScreenLineCounts();
+ displayManager.notifyScreenLineChanges();
+ }
+
+ chunkCache.invalidateAll();
+ gutter.repaint();
+ painter.repaint();
+ } //}}}
+
+ //{{{ addActionSet() method
+ /**
+ * Adds a new action set to the textarea's list of ActionSets.
+ * Call this only on standalone textarea
+ *
+ * @param actionSet the actionSet to add
+ * @since jEdit 4.3pre13
+ */
+ public void addActionSet(JEditActionSet<JEditBeanShellAction> actionSet)
+ {
+ actionContext.addActionSet(actionSet);
+ } //}}}
+
+ //{{{ getMarkPosition() method
+ /**
+ * @deprecated Do not use.
+ */
+ @Deprecated
+ public final int getMarkPosition()
+ {
+ Selection s = getSelectionAtOffset(caret);
+ if(s == null)
+ return caret;
+
+ if(s.start == caret)
+ return s.end;
+ else if(s.end == caret)
+ return s.start;
+ else
+ return caret;
+ } //}}}
+
+ //{{{ getMarkLine() method
+ /**
+ * @deprecated Do not use.
+ */
+ @Deprecated
+ public final int getMarkLine()
+ {
+ if(getSelectionCount() != 1)
+ return caretLine;
+
+ Selection s = getSelection(0);
+ if(s.start == caret)
+ return s.endLine;
+ else if(s.end == caret)
+ return s.startLine;
+ else
+ return caretLine;
+ } //}}}
+
+ //{{{ Package-private members
+
+ static TextArea focusedComponent;
+
+ //{{{ Instance variables
+ MouseInputAdapter mouseHandler;
+ final ChunkCache chunkCache;
+ DisplayManager displayManager;
+ final SelectionManager selectionManager;
+ /**
+ * The action context.
+ * It is used only when the textarea is standalone
+ */
+ private JEditActionContext<JEditBeanShellAction,JEditActionSet<JEditBeanShellAction>> actionContext;
+ boolean bufferChanging;
+
+ int maxHorizontalScrollWidth;
+
+ String wrap;
+ boolean hardWrap;
+ boolean softWrap;
+ boolean wrapToWidth;
+ int maxLineLen;
+ int wrapMargin;
+ float tabSize;
+ int charWidth;
+
+ boolean scrollBarsInitialized;
+
+ /**
+ * Cursor location, measured as an offset (in pixels) from upper left corner
+ * of the TextArea.
+ */
+ final Point offsetXY;
+
+ boolean lastLinePartial;
+
+ boolean blink;
+ //}}}
+
+ //{{{ isCaretVisible() method
+ /**
+ * Returns true if the caret is visible, false otherwise.
+ */
+ final boolean isCaretVisible()
+ {
+ return blink && hasFocus();
+ } //}}}
+
+ //{{{ isStructureHighlightVisible() method
+ /**
+ * Returns true if the structure highlight is visible, false otherwise.
+ * @since jEdit 4.2pre3
+ */
+ final boolean isStructureHighlightVisible()
+ {
+ return match != null
+ && hasFocus()
+ && displayManager.isLineVisible(match.startLine)
+ && displayManager.isLineVisible(match.endLine);
+ } //}}}
+
+ //{{{ updateMaxHorizontalScrollWidth() method
+ void updateMaxHorizontalScrollWidth()
+ {
+ int max = chunkCache.getMaxHorizontalScrollWidth();
+
+ if(max != maxHorizontalScrollWidth)
+ {
+ maxHorizontalScrollWidth = max;
+ horizontal.setValues(Math.max(0,
+ Math.min(maxHorizontalScrollWidth + charWidth
+ - painter.getWidth(),
+ -horizontalOffset)),
+ painter.getWidth(),
+ 0,maxHorizontalScrollWidth
+ + charWidth);
+ horizontal.setUnitIncrement(10);
+ horizontal.setBlockIncrement(painter.getWidth());
+ }
+ else if (horizontal.getValue() != -horizontalOffset)
+ {
+ horizontal.setValue(-horizontalOffset);
+ }
+ } //}}}
+
+ //{{{ recalculateVisibleLines() method
+ void recalculateVisibleLines()
+ {
+ if(painter == null)
+ return;
+ int height = painter.getHeight();
+ int lineHeight = painter.getFontMetrics().getHeight();
+ if(lineHeight == 0)
+ visibleLines = 0;
+ else if(height <= 0)
+ {
+ visibleLines = 0;
+ lastLinePartial = false;
+ }
+ else
+ {
+ visibleLines = height / lineHeight;
+ lastLinePartial = height % lineHeight != 0;
+ if(lastLinePartial)
+ visibleLines++;
+ }
+
+ chunkCache.recalculateVisibleLines();
+
+ // this does the "trick" to eliminate blank space at the end
+ if(displayManager != null && buffer != null && !buffer.isLoading())
+ setFirstLine(getFirstLine());
+
+ updateScrollBar();
+ } //}}}
+
+ //{{{ foldStructureChanged() method
+ void foldStructureChanged()
+ {
+ chunkCache.invalidateAll();
+ recalculateLastPhysicalLine();
+
+ if(!displayManager.isLineVisible(caretLine))
+ {
+ int x = chunkCache.subregionOffsetToX(caretLine,
+ caret - getLineStartOffset(caretLine));
+ int line = displayManager.getPrevVisibleLine(caretLine);
+
+ if(!multi)
+ {
+ // cannot use selectNone() because the finishCaretUpdate method will reopen the fold
+ invalidateSelectedLines();
+ selectionManager.setSelection((Selection) null);
+ }
+ moveCaretPosition(buffer.getLineStartOffset(line)
+ + chunkCache.xToSubregionOffset(line,0,x,true));
+ }
+ repaint();
+ } //}}}
+
+ //{{{ updateScrollBar() method
+ /**
+ * Updates the state of the scroll bars. This should be called
+ * if the number of lines in the buffer changes, or when the
+ * size of the text are changes.
+ */
+ void updateScrollBar()
+ {
+ if(buffer == null)
+ return;
+
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"updateScrollBar(), slc="
+ + displayManager.getScrollLineCount());
+
+ if(vertical != null && visibleLines != 0)
+ {
+ if(Debug.SCROLL_DEBUG)
+ Log.log(Log.DEBUG,this,"Vertical ok");
+ final int lineCount = displayManager.getScrollLineCount();
+ final int firstLine = getFirstLine();
+ final int visible = visibleLines - (lastLinePartial ? 1 : 0);
+
+ Runnable runnable = new Runnable()
+ {
+ public void run()
+ {
+ vertical.setValues(firstLine,visible,0,lineCount);
+ vertical.setUnitIncrement(2);
+ vertical.setBlockIncrement(visible);
+ }
+ };
+ ThreadUtilities.runInDispatchThread(runnable);
+ }
+ } //}}}
+
+ //{{{ _finishCaretUpdate() method
+ /* called by DisplayManager.BufferChangeHandler.transactionComplete() */
+ void _finishCaretUpdate()
+ {
+ if(!queuedCaretUpdate)
+ return;
+
+ try
+ {
+ if(match != null)
+ {
+ if(oldCaretLine < match.startLine)
+ invalidateLineRange(oldCaretLine,match.endLine);
+ else
+ invalidateLineRange(match.startLine,oldCaretLine);
+ match = null;
+ }
+
+ int newCaretScreenLine = chunkCache.getScreenLineOfOffset(caretLine,
+ caret - buffer.getLineStartOffset(caretLine));
+ if(caretScreenLine == -1)
+ invalidateScreenLineRange(newCaretScreenLine,newCaretScreenLine);
+ else
+ invalidateScreenLineRange(caretScreenLine,newCaretScreenLine);
+ caretScreenLine = newCaretScreenLine;
+
+ invalidateSelectedLines();
+
+ // When the user is typing, etc, we don't want the caret
+ // to blink
+ blink = true;
+ caretTimer.restart();
+
+ if(!displayManager.isLineVisible(caretLine))
+ {
+ if(caretLine < displayManager.getFirstVisibleLine()
+ || caretLine > displayManager.getLastVisibleLine())
+ {
+ int collapseFolds = buffer.getIntegerProperty(
+ "collapseFolds",0);
+ if(collapseFolds != 0)
+ {
+ displayManager.expandFolds(collapseFolds);
+ displayManager.expandFold(caretLine,false);
+ }
+ else
+ displayManager.expandAllFolds();
+ }
+ else
+ displayManager.expandFold(caretLine,false);
+ }
+
+ if(queuedScrollMode == ELECTRIC_SCROLL)
+ scrollToCaret(true);
+ else if(queuedScrollMode == NORMAL_SCROLL)
+ scrollToCaret(false);
+
+ updateBracketHighlightWithDelay();
+ if(queuedFireCaretEvent)
+ fireCaretEvent();
+ }
+ // in case one of the above fails, we still want to
+ // clear these flags.
+ finally
+ {
+ queuedCaretUpdate = queuedFireCaretEvent = false;
+ queuedScrollMode = NO_SCROLL;
+ }
+ } //}}}
+
+ //{{{ invalidateStructureMatch() method
+ void invalidateStructureMatch()
+ {
+ if(match != null)
+ invalidateLineRange(match.startLine,match.endLine);
+ } //}}}
+
+ //{{{ startDragAndDrop() method
+ void startDragAndDrop(InputEvent evt, boolean copy)
+ {
+ TransferHandler transferHandler = getTransferHandler();
+ if (transferHandler != null)
+ {
+ Log.log(Log.DEBUG,this,"Drag and drop callback");
+ transferHandler.exportAsDrag(this,evt,
+ copy ? TransferHandler.COPY
+ : TransferHandler.MOVE);
+ }
+ } //}}}
+
+ //{{{ fireNarrowActive() method
+ void fireNarrowActive()
+ {
+ Object[] listeners = listenerList.getListenerList();
+ for(int i = listeners.length - 2; i >= 0; i--)
+ {
+ if(listeners[i] == StatusListener.class)
+ {
+ try
+ {
+ ((StatusListener)listeners[i+1])
+ .narrowActive(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Static variables
+ private static final Timer caretTimer;
+ private static final Timer structureTimer;
+ //}}}
+
+ //{{{ Instance variables
+ protected JPopupMenu popup;
+
+ private boolean popupEnabled;
+
+ private final Gutter gutter;
+ protected final TextAreaPainter painter;
+
+ private final EventListenerList listenerList;
+ private final MutableCaretEvent caretEvent;
+
+ private boolean caretBlinks;
+ protected InputHandlerProvider inputHandlerProvider;
+
+ private InputMethodSupport inputMethodSupport;
+
+ /** The last visible physical line index. */
+ private int physLastLine;
+
+ /**
+ * The last screen line index.
+ */
+ private int screenLastLine;
+
+ /** The visible lines count. */
+ private int visibleLines;
+ private int electricScroll;
+
+ private int horizontalOffset;
+
+ private boolean quickCopy;
+
+ // JDiff, error list add stuff here
+ private final Box verticalBox;
+ private final JScrollBar vertical;
+ private final JScrollBar horizontal;
+
+ protected JEditBuffer buffer;
+
+ protected int caret;
+ protected int caretLine;
+ private int caretScreenLine;
+
+ private final java.util.List<StructureMatcher> structureMatchers;
+ private StructureMatcher.Match match;
+
+ private int magicCaret;
+ /** Flag that tells if multiple selection is on. */
+ protected boolean multi;
+ private boolean overwrite;
+ private boolean rectangularSelectionMode;
+
+ private boolean dndEnabled;
+
+ // see finishCaretUpdate() & _finishCaretUpdate()
+ private boolean queuedCaretUpdate;
+ private int queuedScrollMode;
+ private boolean queuedFireCaretEvent;
+ private int oldCaretLine;
+
+ private boolean joinNonWordChars;
+ private boolean ctrlForRectangularSelection;
+ //}}}
+
+ //{{{ _setHorizontalOffset() method
+ /**
+ * Sets the horizontal offset of drawn lines. This method will
+ * check if the offset do not go too far after the last character
+ * @param horizontalOffset offset The new horizontal offset
+ */
+ private void _setHorizontalOffset(int horizontalOffset)
+ {
+ if(horizontalOffset > 0)
+ horizontalOffset = 0;
+
+ if(horizontalOffset == this.horizontalOffset)
+ return;
+
+ // Scrolling with trackpad or other device should be kept inside bounds
+ int min = Math.min(-(maxHorizontalScrollWidth + charWidth - painter.getWidth()), 0);
+ if(horizontalOffset < min)
+ horizontalOffset = min;
+
+ setHorizontalOffset(horizontalOffset);
+ } //}}}
+
+ //{{{ invalidateSelectedLines() method
+ /**
+ * Repaints the lines containing the selection.
+ */
+ private void invalidateSelectedLines()
+ {
+ // to hide line highlight if selections are being added later on
+ invalidateLine(caretLine);
+
+ for (Selection s : selectionManager.selection)
+ invalidateLineRange(s.startLine,s.endLine);
+ } //}}}
+
+ //{{{ finishCaretUpdate() method
+ /**
+ * the collapsing of scrolling/event firing inside compound edits
+ * greatly speeds up replace-all.
+ */
+ private void finishCaretUpdate(int oldCaretLine,
+ int scrollMode, boolean fireCaretEvent)
+ {
+ queuedFireCaretEvent |= fireCaretEvent;
+ queuedScrollMode = Math.max(scrollMode,queuedScrollMode);
+
+ if(queuedCaretUpdate)
+ return;
+
+ this.oldCaretLine = oldCaretLine;
+ queuedCaretUpdate = true;
+
+ if(!buffer.isTransactionInProgress())
+ _finishCaretUpdate();
+ /* otherwise DisplayManager.BufferChangeHandler calls */
+ } //}}}
+
+ //{{{ fireCaretEvent() method
+ private void fireCaretEvent()
+ {
+ Object[] listeners = listenerList.getListenerList();
+ for(int i = listeners.length - 2; i >= 0; i--)
+ {
+ if(listeners[i] == CaretListener.class)
+ {
+ try
+ {
+ ((CaretListener)listeners[i+1]).caretUpdate(caretEvent);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ fireScrollEvent() method
+ private void fireScrollEvent(boolean vertical)
+ {
+ Object[] listeners = listenerList.getListenerList();
+ for(int i = listeners.length - 2; i >= 0; i--)
+ {
+ if(listeners[i] == ScrollListener.class)
+ {
+ try
+ {
+ if(vertical)
+ ((ScrollListener)listeners[i+1]).scrolledVertically(this);
+ else
+ ((ScrollListener)listeners[i+1]).scrolledHorizontally(this);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ fireStatusChanged() method
+ private void fireStatusChanged(int flag, boolean value)
+ {
+ Object[] listeners = listenerList.getListenerList();
+ for(int i = listeners.length - 2; i >= 0; i--)
+ {
+ if(listeners[i] == StatusListener.class)
+ {
+ try
+ {
+ ((StatusListener)listeners[i+1])
+ .statusChanged(this,flag,value);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ fireBracketSelected() method
+ private void fireBracketSelected(int line, String text)
+ {
+ Object[] listeners = listenerList.getListenerList();
+ for(int i = listeners.length - 2; i >= 0; i--)
+ {
+ if(listeners[i] == StatusListener.class)
+ {
+ try
+ {
+ ((StatusListener)listeners[i+1])
+ .bracketSelected(this,line,text);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,this,t);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ _changeLine() method
+ private void _changeLine(boolean select, int newCaret)
+ {
+ if(select)
+ {
+ RectParams params = getRectParams(caret,newCaret);
+ int extraStartVirt;
+ int extraEndVirt;
+ if(params == null)
+ {
+ extraStartVirt = 0;
+ extraEndVirt = 0;
+ }
+ else
+ {
+ extraStartVirt = params.extraStartVirt;
+ extraEndVirt = params.extraEndVirt;
+ newCaret = params.newCaret;
+ }
+ extendSelection(caret,newCaret,extraStartVirt,extraEndVirt);
+ }
+ else if(!multi)
+ selectNone();
+
+ moveCaretPosition(newCaret);
+ }//}}}
+
+ //{{{ lineContainsSpaceAndTabs() method
+ /**
+ * Check if the line contains only spaces and tabs.
+ *
+ * @param lineIndex the line index
+ * @return <code>true</code> if the line contains only spaces and tabs
+ */
+ private boolean lineContainsSpaceAndTabs(int lineIndex)
+ {
+ final Segment lineSegment = new Segment();
+ getLineText(lineIndex,lineSegment);
+
+ for(int j = 0; j < lineSegment.count; j++)
+ {
+ switch(lineSegment.array[lineSegment.offset + j])
+ {
+ case ' ':
+ case '\t':
+ break;
+ default:
+ return false;
+ }
+ }
+ return true;
+ } //}}}
+
+ //{{{ insert() method
+ protected void insert(String str, boolean indent)
+ {
+ try
+ {
+ // Don't overstrike if we're on the end of
+ // the line
+ if(overwrite || indent)
+ buffer.beginCompoundEdit();
+
+ if(overwrite)
+ {
+ int caretLineEnd = getLineEndOffset(caretLine);
+ if(caretLineEnd - caret > 1)
+ buffer.remove(caret,1);
+ }
+
+ buffer.insert(caret,str);
+
+ if(indent)
+ buffer.indentLine(caretLine,true);
+ }
+ finally
+ {
+ if(overwrite || indent)
+ buffer.endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ insertTab() method
+ private void insertTab()
+ {
+ int tabSize = buffer.getTabSize();
+ if(buffer.getBooleanProperty("noTabs"))
+ {
+ int lineStart = getLineStartOffset(caretLine);
+
+ String line = getText(lineStart,caret - lineStart);
+
+ int pos = 0;
+
+ for(int i = 0; i < line.length(); i++)
+ {
+ switch(line.charAt(pos))
+ {
+ case '\t':
+ pos = 0;
+ break;
+ default:
+ if(++pos >= tabSize)
+ pos = 0;
+ break;
+ }
+ }
+
+ replaceSelection(StandardUtilities.createWhiteSpace(
+ tabSize - pos,0));
+ }
+ else
+ replaceSelection("\t");
+ } //}}}
+
+ //{{{ userInputTab() method
+ protected void userInputTab()
+ {
+ if(getSelectionCount() == 1)
+ {
+ Selection sel = getSelection(0);
+ if(sel instanceof Selection.Rect ||
+ (sel.startLine == sel.endLine
+ && (sel.start != buffer.getLineStartOffset(sel.startLine)
+ || sel.end != buffer.getLineEndOffset(sel.startLine) - 1)))
+ {
+ insertTab();
+ }
+ else
+ shiftIndentRight();
+ }
+ else if(getSelectionCount() != 0)
+ shiftIndentRight();
+ else
+ insertTab();
+ } //}}}
+
+ //{{{ doWordWrap() method
+ /**
+ * Does hard wrap.
+ */
+ protected boolean doWordWrap(boolean spaceInserted)
+ {
+ if(!hardWrap || maxLineLen <= 0)
+ return false;
+
+ final Segment lineSegment = new Segment();
+ buffer.getLineText(caretLine,lineSegment);
+
+ int start = getLineStartOffset(caretLine);
+ int end = getLineEndOffset(caretLine);
+ int len = end - start - 1;
+
+ int caretPos = caret - start;
+
+ // only wrap if we're at the end of a line, or the rest of the
+ // line text is whitespace
+ for(int i = caretPos; i < len; i++)
+ {
+ char ch = lineSegment.array[lineSegment.offset + i];
+ if(ch != ' ' && ch != '\t')
+ return false;
+ }
+
+ int tabSize = buffer.getTabSize();
+
+ String wordBreakChars = buffer.getStringProperty("wordBreakChars");
+
+ int lastInLine = 0; // last character before wrap
+ int logicalLength = 0; // length with tabs expanded
+ int lastWordOffset = -1;
+ boolean lastWasSpace = true;
+ for(int i = 0; i < caretPos; i++)
+ {
+ char ch = lineSegment.array[lineSegment.offset + i];
+ if(ch == '\t')
+ {
+ logicalLength += tabSize - (logicalLength % tabSize);
+ if(!lastWasSpace && logicalLength <= maxLineLen)
+ {
+ lastInLine = i;
+ lastWordOffset = i;
+ lastWasSpace = true;
+ }
+ }
+ else if(ch == ' ')
+ {
+ logicalLength++;
+ if(!lastWasSpace &&
+ logicalLength <= maxLineLen + 1)
+ {
+ lastInLine = i;
+ lastWordOffset = i;
+ lastWasSpace = true;
+ }
+ }
+ else if(wordBreakChars != null && wordBreakChars.indexOf(ch) != -1)
+ {
+ logicalLength++;
+ if(!lastWasSpace && logicalLength <= maxLineLen)
+ {
+ lastInLine = i;
+ lastWordOffset = i;
+ lastWasSpace = true;
+ }
+ }
+ else
+ {
+ lastInLine = i;
+ logicalLength++;
+ lastWasSpace = false;
+ }
+ }
+
+ boolean returnValue;
+
+ int insertNewLineAt;
+ if(spaceInserted && logicalLength == maxLineLen
+ && lastInLine == caretPos - 1)
+ {
+ insertNewLineAt = caretPos;
+ returnValue = true;
+ }
+ else if(logicalLength >= maxLineLen && lastWordOffset != -1)
+ {
+ insertNewLineAt = lastWordOffset;
+ returnValue = false;
+ }
+ else
+ return false;
+
+ try
+ {
+ buffer.beginCompoundEdit();
+ buffer.insert(start + insertNewLineAt,"\n");
+ // caretLine would have been incremented
+ // since insertNewLineAt <= caretPos
+ buffer.indentLine(caretLine,true);
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+
+ /* only ever return true if space was pressed
+ * with logicalLength == maxLineLen */
+ return returnValue;
+ } //}}}
+
+ //{{{ updateStructureHighlightWithDelay() method
+ private static void updateBracketHighlightWithDelay()
+ {
+ structureTimer.stop();
+ structureTimer.start();
+ } //}}}
+
+ //{{{ updateStructureHighlight() method
+ private void updateStructureHighlight()
+ {
+ if(!painter.isStructureHighlightEnabled()
+ && !gutter.isStructureHighlightEnabled())
+ return;
+
+ for (StructureMatcher matcher : structureMatchers)
+ {
+ match = matcher.getMatch(this);
+ if(match != null)
+ break;
+ }
+
+ if(match != null)
+ {
+ if(caretLine < match.startLine)
+ invalidateLineRange(caretLine,match.endLine);
+ else
+ invalidateLineRange(match.startLine,caretLine);
+
+ if(!displayManager.isLineVisible(match.startLine)
+ || chunkCache.getScreenLineOfOffset(
+ match.startLine,match.start - getLineStartOffset(match.startLine))
+ == -1)
+ {
+ showStructureStatusMessage(match.startLine < caretLine);
+ }
+ }
+ } //}}}
+
+ //{{{ showStructureStatusMessage() method
+ private void showStructureStatusMessage(boolean backward)
+ {
+ String text = buffer.getLineText(match.startLine).trim();
+ if(backward && match.startLine != 0 && text.length() == 1)
+ {
+ switch(text.charAt(0))
+ {
+ case '{': case '}':
+ case '[': case ']':
+ case '(': case ')':
+ text = buffer.getLineText(match.startLine - 1)
+ .trim() + ' ' + text;
+ break;
+ }
+ }
+
+ // get rid of embedded tabs not removed by trim()
+ fireBracketSelected(match.startLine + 1,text.replace('\t',' '));
+ } //}}}
+
+ //{{{ recalculateLastPhysicalLine() method
+ void recalculateLastPhysicalLine()
+ {
+ int oldScreenLastLine = screenLastLine;
+ for(int i = visibleLines - 1; i >= 0; i--)
+ {
+ ChunkCache.LineInfo info = chunkCache.getLineInfo(i);
+ if(info.physicalLine != -1)
+ {
+ physLastLine = info.physicalLine;
+ screenLastLine = i;
+ break;
+ }
+ }
+ invalidateScreenLineRange(oldScreenLastLine,screenLastLine);
+ } //}}}
+
+ //{{{ getRectParams() method
+ private static class RectParams
+ {
+ final int extraStartVirt;
+ final int extraEndVirt;
+ final int newCaret;
+
+ RectParams(int extraStartVirt, int extraEndVirt, int newCaret)
+ {
+ this.extraStartVirt = extraStartVirt;
+ this.extraEndVirt = extraEndVirt;
+ this.newCaret = newCaret;
+ }
+ }
+
+ /**
+ * Used when doing S+UP/DOWN to simplify dealing with virtual space.
+ */
+ private RectParams getRectParams(int caret, int newCaret)
+ {
+ Selection s = getSelectionAtOffset(caret);
+ int virtualWidth;
+ if(s instanceof Selection.Rect)
+ {
+ if(caret == s.end)
+ {
+ virtualWidth = buffer.getVirtualWidth(
+ s.endLine,s.end - getLineStartOffset(
+ s.endLine)) + ((Selection.Rect)s).extraEndVirt;
+ }
+ else
+ {
+ virtualWidth = buffer.getVirtualWidth(
+ s.startLine,s.start - getLineStartOffset(
+ s.startLine)) + ((Selection.Rect)s).extraStartVirt;
+ }
+ }
+ else if(rectangularSelectionMode)
+ {
+ virtualWidth = buffer.getVirtualWidth(
+ caretLine,caret - buffer.getLineStartOffset(caretLine));
+ }
+ else
+ return null;
+
+ int newLine = getLineOfOffset(newCaret);
+ int[] totalVirtualWidth = new int[1];
+ int newOffset = buffer.getOffsetOfVirtualColumn(newLine,
+ virtualWidth,totalVirtualWidth);
+ if(newOffset == -1)
+ {
+ int extraVirt = virtualWidth - totalVirtualWidth[0];
+ newCaret = getLineEndOffset(newLine) - 1;
+
+ boolean bias;
+ if(s == null)
+ bias = newCaret < caret;
+ else if(s.start == caret)
+ bias = newCaret <= s.end;
+ else if(s.end == caret)
+ bias = newCaret <= s.start;
+ else
+ bias = false;
+
+ RectParams returnValue;
+ if(bias)
+ returnValue = new RectParams(extraVirt,0,newCaret);
+ else
+ returnValue = new RectParams(0,extraVirt,newCaret);
+ return returnValue;
+ }
+ else
+ {
+ return new RectParams(0,0,getLineStartOffset(newLine)
+ + newOffset);
+ }
+ } //}}}
+
+ //{{{ delete() method
+ private void delete(boolean forward)
+ {
+ if(!buffer.isEditable())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ if(getSelectionCount() != 0)
+ {
+ Selection[] selections = getSelection();
+ for(int i = 0; i < selections.length; i++)
+ {
+ Selection s = selections[i];
+ if(s instanceof Selection.Rect)
+ {
+ Selection.Rect r = (Selection.Rect)s;
+ int startColumn = r.getStartColumn(buffer);
+ if(startColumn == r.getEndColumn(buffer))
+ {
+ if(!forward && startColumn == 0)
+ getToolkit().beep();
+ else
+ tallCaretDelete(r,forward);
+ }
+ else
+ setSelectedText(s,null);
+ }
+ else
+ setSelectedText(s,null);
+ }
+ }
+ else if(forward)
+ {
+ if(caret == buffer.getLength())
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ buffer.remove(caret,1);
+ }
+ else
+ {
+ if(caret == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ buffer.remove(caret - 1,1);
+ }
+ } //}}}
+
+ //{{{ tallCaretDelete() method
+ private void tallCaretDelete(Selection.Rect s, boolean forward)
+ {
+ try
+ {
+ buffer.beginCompoundEdit();
+
+ int[] width = new int[1];
+
+ int startCol = s.getStartColumn(buffer);
+ int startLine = s.startLine;
+ int endLine = s.endLine;
+ for(int i = startLine; i <= endLine; i++)
+ {
+ int offset = buffer.getOffsetOfVirtualColumn(
+ i,startCol,width);
+ if(offset == -1)
+ {
+ if(width[0] == startCol)
+ offset = getLineLength(i);
+ else
+ {
+ if(i == startLine && !forward)
+ shiftTallCaretLeft(s);
+ continue;
+ }
+ }
+ offset += buffer.getLineStartOffset(i);
+ if(forward)
+ {
+ if(offset != buffer.getLineEndOffset(i) - 1)
+ buffer.remove(offset,1);
+ }
+ else
+ buffer.remove(offset-1,1);
+ }
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ shiftTallCaretLeft() method
+ private void shiftTallCaretLeft(Selection.Rect s)
+ {
+ removeFromSelection(s);
+ addToSelection(new Selection.Rect(
+ buffer,
+ s.getStartLine(),s.getStartColumn(buffer) - 1,
+ s.getEndLine(),s.getEndColumn(buffer) - 1));
+ } //}}}
+
+ //{{{ setMaxLineLength() method
+ private void setMaxLineLength(int maxLineLen)
+ {
+ this.maxLineLen = maxLineLen;
+
+ if(maxLineLen <= 0)
+ {
+ if(softWrap)
+ {
+ wrapToWidth = true;
+ wrapMargin = painter.getWidth() - charWidth * 3;
+ }
+ else
+ {
+ wrapToWidth = false;
+ wrapMargin = 0;
+ }
+ }
+ else
+ {
+ // stupidity
+ char[] foo = new char[maxLineLen];
+ for(int i = 0; i < foo.length; i++)
+ {
+ foo[i] = ' ';
+ }
+ wrapToWidth = false;
+ wrapMargin = (int)painter.getFont().getStringBounds(
+ foo,0,foo.length,
+ painter.getFontRenderContext())
+ .getWidth();
+ }
+ } //}}}
+
+ //{{{ addExplicitFold() method
+ /**
+ * Add an explicit fold.
+ * You should call this method inside a compoundEdit in the buffer.
+ * You must also check if the buffer fold mode is explicit before
+ * calling this method.
+ *
+ * @param caretStart the starting offset
+ * @param caretEnd the end offset
+ * @param lineStart the start line
+ * @param lineEnd the end line
+ * @since jEdit 4.3pre3
+ */
+ protected int addExplicitFold(int caretStart, int caretEnd, int lineStart, int lineEnd)
+ {
+ // need to "fix" the caret position so that we get the right rule.
+ // taking the start offset one char ahead and the end offset one char
+ // behing makes sure we get the right rule for the text being
+ // wrapped (tricky around mode boundaries, e.g., php code embedded
+ // in HTML code)
+ int startCaret = caretStart < buffer.getLength() ? caretStart + 1 : caretStart;
+ int endCaret = caretEnd > 0 ? caretEnd - 1 : caretEnd;
+
+ String startLineComment = buffer.getContextSensitiveProperty(startCaret,"lineComment");
+ String startCommentStart = buffer.getContextSensitiveProperty(startCaret,"commentStart");
+ String startCommentEnd = buffer.getContextSensitiveProperty(startCaret,"commentEnd");
+ String endLineComment = buffer.getContextSensitiveProperty(endCaret,"lineComment");
+ String endCommentStart = buffer.getContextSensitiveProperty(endCaret,"commentStart");
+ String endCommentEnd = buffer.getContextSensitiveProperty(endCaret,"commentEnd");
+
+ String start;
+ int caretBack = 1;
+ if(startLineComment != null)
+ start = startLineComment + "{{{ ";
+ else if(startCommentStart != null && startCommentEnd != null)
+ {
+ start = startCommentStart + "{{{ " + startCommentEnd;
+ caretBack = 2 + startCommentEnd.length();
+ }
+ else
+ start = "{{{ ";
+
+ if (startLineComment != null)
+ {
+ // add a new line if there's text after the comment
+ // we're inserting
+ if (buffer.getLineLength(lineStart) != caretStart)
+ {
+ start += '\n';
+ }
+ }
+ else
+ {
+ // always insert a new line if there's no comment character.
+ start += "\n";
+ }
+
+ String end;
+ if(endLineComment != null)
+ end = endLineComment + "}}}";
+ else if(endCommentStart != null && endCommentEnd != null)
+ end = endCommentStart + "}}}" + endCommentEnd;
+ else
+ end = "}}}";
+
+ String line = buffer.getLineText(lineStart);
+ String whitespace = line.substring(0,
+ StandardUtilities.getLeadingWhiteSpace(line));
+ caretBack += whitespace.length();
+ if (caretStart == caretEnd)
+ {
+ caretBack += end.length() + 1;
+ int lineStartOffset = buffer.getLineStartOffset(lineStart);
+ if (lineStartOffset + whitespace.length() != caretStart)
+ {
+ caretBack++;
+ }
+ }
+
+ if (endLineComment != null)
+ {
+ // if we're inserting a line comment into a non-empty
+ // line, we'll need to add a line break so we don't
+ // comment out existing code.
+ if (buffer.getLineLength(lineEnd) != caretEnd)
+ {
+ end += '\n';
+ }
+ }
+ else
+ {
+ // always insert a new line if there's no comment character.
+ end += "\n";
+ }
+
+ if(caretEnd == buffer.getLineStartOffset(lineEnd))
+ buffer.insert(caretEnd,end);
+ else
+ {
+ CharSequence lineText = buffer.getSegment(caretEnd - 1, 1);
+ if (Character.isWhitespace(lineText.charAt(0)))
+ buffer.insert(caretEnd, end);
+ else
+ buffer.insert(caretEnd,' ' + end);
+ }
+
+ buffer.insert(caretStart,start + whitespace);
+
+ return caretBack;
+ } //}}}
+
+ //{{{ rangeLineComment() method
+ /**
+ * This method will surround each selected line with a range comment.
+ * This is used when calling line comment if the edit mode doesn't have
+ * a line comment property
+ * @since jEdit 4.3pre10
+ */
+ private void rangeLineComment()
+ {
+ String commentStart = buffer.getContextSensitiveProperty(caret,"commentStart");
+ String commentEnd = buffer.getContextSensitiveProperty(caret,"commentEnd");
+ if(!buffer.isEditable() || commentStart == null || commentEnd == null
+ || commentStart.length() == 0 || commentEnd.length() == 0)
+ {
+ getToolkit().beep();
+ return;
+ }
+
+ commentStart += ' ';
+ commentEnd = ' ' + commentEnd;
+
+
+ try
+ {
+ buffer.beginCompoundEdit();
+ int[] lines = getSelectedLines();
+ for(int i = 0; i < lines.length; i++)
+ {
+ String text = getLineText(lines[i]);
+ if (text.trim().length() == 0)
+ continue;
+ buffer.insert(getLineEndOffset(lines[i]) - 1,
+ commentEnd);
+ buffer.insert(getLineStartOffset(lines[i])
+ + StandardUtilities.getLeadingWhiteSpace(text),
+ commentStart);
+ }
+ }
+ finally
+ {
+ buffer.endCompoundEdit();
+ }
+ } //}}}
+
+ //{{{ joinLine() method
+ /**
+ * Join a line with the next line.
+ * If you use this method you have to lock the buffer in compound edit mode.
+ * @param line the line number that will be joined with the next line
+ */
+ private void joinLineAt(int line)
+ {
+ if (line >= buffer.getLineCount() - 1)
+ return;
+ int end = getLineEndOffset(line);
+ CharSequence nextLineText = buffer.getLineSegment(line + 1);
+ buffer.remove(end - 1,StandardUtilities.getLeadingWhiteSpace(
+ nextLineText) + 1);
+ if (nextLineText.length() != 0)
+ buffer.insert(end - 1, " ");
+ } //}}}
+ //}}}
+
+ //{{{ isRightClickPopupEnabled() method
+ /**
+ * Returns if the right click popup menu is enabled. The Gestures
+ * plugin uses this API.
+ * @since jEdit 4.2pre13
+ */
+ public boolean isRightClickPopupEnabled()
+ {
+ return popupEnabled;
+ } //}}}
+
+ //{{{ setRightClickPopupEnabled() method
+ /**
+ * Sets if the right click popup menu is enabled. The Gestures
+ * plugin uses this API.
+ * @since jEdit 4.2pre13
+ */
+ public void setRightClickPopupEnabled(boolean popupEnabled)
+ {
+ this.popupEnabled = popupEnabled;
+ } //}}}
+
+ //{{{ getRightClickPopup() method
+ /**
+ * Returns the right click popup menu.
+ */
+ public final JPopupMenu getRightClickPopup()
+ {
+ return popup;
+ } //}}}
+
+ //{{{ setRightClickPopup() method
+ /**
+ * Sets the right click popup menu.
+ * @param popup The popup
+ */
+ public final void setRightClickPopup(JPopupMenu popup)
+ {
+ this.popup = popup;
+ } //}}}
+
+ //{{{ handlePopupTrigger() method
+ /**
+ * Do the same thing as right-clicking on the text area. The Gestures
+ * plugin uses this API.
+ * @since jEdit 4.2pre13
+ */
+ public void handlePopupTrigger(MouseEvent evt)
+ {
+ // Rebuild popup menu every time the menu is requested.
+ createPopupMenu(evt);
+
+ int x = evt.getX();
+ int y = evt.getY();
+
+ int dragStart = xyToOffset(x,y,
+ !(painter.isBlockCaretEnabled()
+ || isOverwriteEnabled()));
+
+ if(getSelectionCount() == 0 || multi)
+ moveCaretPosition(dragStart,false);
+ showPopupMenu(popup,this,x,y,false);
+ } //}}}
+
+ //{{{ createPopupMenu() method
+ /**
+ * Creates the popup menu.
+ * @since 4.3pre15
+ */
+ public void createPopupMenu(MouseEvent evt)
+ {
+ if (popup == null)
+ popup = new JPopupMenu();
+ } //}}}
+
+ //{{{ showPopupMenu() method
+ /**
+ * Shows the popup menu below the current caret position.
+ * @since 4.3pre10
+ */
+ public void showPopupMenu()
+ {
+ if (!popup.isVisible() && hasFocus())
+ {
+ Point caretPos = offsetToXY(getCaretPosition());
+ if (caretPos != null)
+ {
+ // Open the context menu below the caret
+ int charHeight = getPainter().getFontMetrics().getHeight();
+ showPopupMenu(popup,
+ painter,caretPos.x,caretPos.y + charHeight,true);
+ }
+ }
+ } //}}}
+
+ //{{{ showPopupMenu() method - copied from GUIUtilities
+ /**
+ * Shows the specified popup menu, ensuring it is displayed within
+ * the bounds of the screen.
+ * @param popup The popup menu
+ * @param comp The component to show it for
+ * @param x The x co-ordinate
+ * @param y The y co-ordinate
+ * @param point If true, then the popup originates from a single point;
+ * otherwise it will originate from the component itself. This affects
+ * positioning in the case where the popup does not fit onscreen.
+ *
+ * @since jEdit 4.1pre1
+ */
+ private static void showPopupMenu(JPopupMenu popup, Component comp,
+ int x, int y, boolean point)
+ {
+ int offsetX = 0;
+ int offsetY = 0;
+
+ int extraOffset = point ? 1 : 0;
+
+ Component win = comp;
+ while(!(win instanceof Window || win == null))
+ {
+ offsetX += win.getX();
+ offsetY += win.getY();
+ win = win.getParent();
+ }
+
+ if(win != null)
+ {
+ Dimension size = popup.getPreferredSize();
+
+ Rectangle screenSize = GraphicsEnvironment
+ .getLocalGraphicsEnvironment().getMaximumWindowBounds();
+
+ if(x + offsetX + size.width + win.getX() > screenSize.width
+ && x + offsetX + win.getX() >= size.width)
+ {
+ //System.err.println("x overflow");
+ if(point)
+ x -= size.width + extraOffset;
+ else
+ x = win.getWidth() - size.width - offsetX + extraOffset;
+ }
+ else
+ {
+ x += extraOffset;
+ }
+
+ //System.err.println("y=" + y + ",offsetY=" + offsetY
+ // + ",size.height=" + size.height
+ // + ",win.height=" + win.getHeight());
+ if(y + offsetY + size.height + win.getY() > screenSize.height
+ && y + offsetY + win.getY() >= size.height)
+ {
+ if(point)
+ y = win.getHeight() - size.height - offsetY + extraOffset;
+ else
+ y = -size.height - 1;
+ }
+ else
+ {
+ y += extraOffset;
+ }
+
+ popup.show(comp,x,y);
+ }
+ else
+ popup.show(comp,x + extraOffset,y + extraOffset);
+
+ } //}}}
+
+ //{{{ Inner classes
+
+ //{{{ CaretBlinker class
+ private static class CaretBlinker implements ActionListener
+ {
+ //{{{ actionPerformed() method
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(focusedComponent != null && focusedComponent.hasFocus())
+ focusedComponent.blinkCaret();
+ } //}}}
+ } //}}}
+
+ //{{{ MutableCaretEvent class
+ private class MutableCaretEvent extends CaretEvent
+ {
+ //{{{ MutableCaretEvent constructor
+ MutableCaretEvent()
+ {
+ super(TextArea.this);
+ } //}}}
+
+ //{{{ getDot() method
+ @Override
+ public int getDot()
+ {
+ return getCaretPosition();
+ } //}}}
+
+ //{{{ getMark() method
+ @Override
+ public int getMark()
+ {
+ return getMarkPosition();
+ } //}}}
+ } //}}}
+
+ //{{{ AdjustHandler class
+ private class AdjustHandler implements AdjustmentListener
+ {
+ //{{{ adjustmentValueChanged() method
+ public void adjustmentValueChanged(AdjustmentEvent evt)
+ {
+ if(!scrollBarsInitialized)
+ return;
+
+ if(evt.getAdjustable() == vertical)
+ setFirstLine(vertical.getValue());
+ else
+ setHorizontalOffset(-horizontal.getValue());
+ } //}}}
+ } //}}}
+
+ //{{{ FocusHandler class
+ private class FocusHandler implements FocusListener
+ {
+ //{{{ focusGained() method
+ public void focusGained(FocusEvent evt)
+ {
+ if(bufferChanging)
+ return;
+
+ if(match != null)
+ {
+ if(caretLine < match.startLine)
+ invalidateLineRange(caretLine,match.endLine);
+ else
+ invalidateLineRange(match.startLine,caretLine);
+ }
+ else
+ invalidateLine(caretLine);
+
+ focusedComponent = TextArea.this;
+ } //}}}
+
+ //{{{ focusLost() method
+ public void focusLost(FocusEvent evt)
+ {
+ if(!isShowing())
+ return;
+
+ if(match != null)
+ {
+ if(caretLine < match.startLine)
+ invalidateLineRange(caretLine,match.endLine);
+ else
+ invalidateLineRange(match.startLine,caretLine);
+ }
+ else
+ invalidateLine(caretLine);
+ } //}}}
+ } //}}}
+
+ //{{{ MouseWheelHandler class
+ private class MouseWheelHandler implements MouseWheelListener
+ {
+ public void mouseWheelMoved(MouseWheelEvent e)
+ {
+ /****************************************************
+ * move caret depending on pressed control-keys:
+ * - Alt: move cursor, do not select
+ * - Alt+(shift or control): move cursor, select
+ * - shift: scroll horizontally
+ * - control: scroll single line
+ * - <else>: scroll 3 lines
+ ****************************************************/
+ if(e.isAltDown())
+ {
+ boolean select = e.isShiftDown()
+ || e.isControlDown();
+ if(e.getWheelRotation() < 0)
+ goToPrevLine(select);
+ else
+ goToNextLine(select);
+ }
+ else if(e.getScrollType()
+ == MouseWheelEvent.WHEEL_BLOCK_SCROLL)
+ {
+ if(e.isShiftDown())
+ {
+ // Wheel orientation is reversed so we negate the charwidth
+ _setHorizontalOffset(getHorizontalOffset()
+ + (e.getWheelRotation() > 0 ? 1 : -1) * painter.getWidth());
+ }
+ else
+ {
+ if(e.getWheelRotation() > 0)
+ scrollDownPage();
+ else
+ scrollUpPage();
+ }
+ }
+ else if(e.isControlDown() && e.isShiftDown())
+ {
+ if(e.getWheelRotation() > 0)
+ scrollDownPage();
+ else
+ scrollUpPage();
+ }
+ else if(e.isControlDown())
+ {
+ setFirstLine(getFirstLine()
+ + e.getWheelRotation());
+ }
+ else if(e.getScrollType()
+ == MouseWheelEvent.WHEEL_UNIT_SCROLL)
+ {
+ if(e.isShiftDown())
+ {
+ _setHorizontalOffset(getHorizontalOffset()
+ + (-charWidth * e.getUnitsToScroll()));
+ }
+ else
+ {
+ setFirstLine(getFirstLine()
+ + e.getUnitsToScroll());
+ }
+ }
+ else
+ {
+ if(e.isShiftDown())
+ {
+ _setHorizontalOffset(getHorizontalOffset()
+ + (-charWidth * e.getWheelRotation()));
+ }
+ else
+ {
+ setFirstLine(getFirstLine()
+ + 3 * e.getWheelRotation());
+ }
+ }
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Class initializer
+ static
+ {
+ caretTimer = new Timer(500,new CaretBlinker());
+ caretTimer.setInitialDelay(500);
+ caretTimer.start();
+
+ structureTimer = new Timer(100,new ActionListener()
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ if(focusedComponent != null)
+ focusedComponent.updateStructureHighlight();
+ }
+ });
+ structureTimer.setInitialDelay(100);
+ structureTimer.setRepeats(false);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/TextAreaBorder.java b/jEdit/org/gjt/sp/jedit/textarea/TextAreaBorder.java
index 3006ed7..1a5d8a0 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/TextAreaBorder.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/TextAreaBorder.java
@@ -1,56 +1,56 @@
-/*
- * TextAreaBorder.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-import java.awt.*;
-import javax.swing.border.AbstractBorder;
-import javax.swing.plaf.metal.MetalLookAndFeel;
-
-public class TextAreaBorder extends AbstractBorder
-{
- //{{{ paintBorder() method
- public void paintBorder(Component c, Graphics g, int x, int y,
- int width, int height)
- {
- g.translate(x,y);
-
- g.setColor(MetalLookAndFeel.getControlDarkShadow());
- g.drawRect(0,0,width-2,height-2);
-
- g.setColor(MetalLookAndFeel.getControlHighlight());
- g.drawLine(width-1,1,width-1,height-1);
- g.drawLine(1,height-1,width-1,height-1);
-
- g.setColor(MetalLookAndFeel.getControl());
- g.drawLine(width-2,2,width-2,2);
- g.drawLine(1,height-2,1,height-2);
-
- g.translate(-x,-y);
- } //}}}
-
- //{{{ getBorderInsets() method
- public Insets getBorderInsets(Component c)
- {
- return new Insets(1,1,2,2);
- } //}}}
-}
+/*
+ * TextAreaBorder.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+import java.awt.*;
+import javax.swing.border.AbstractBorder;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+
+public class TextAreaBorder extends AbstractBorder
+{
+ //{{{ paintBorder() method
+ public void paintBorder(Component c, Graphics g, int x, int y,
+ int width, int height)
+ {
+ g.translate(x,y);
+
+ g.setColor(MetalLookAndFeel.getControlDarkShadow());
+ g.drawRect(0,0,width-2,height-2);
+
+ g.setColor(MetalLookAndFeel.getControlHighlight());
+ g.drawLine(width-1,1,width-1,height-1);
+ g.drawLine(1,height-1,width-1,height-1);
+
+ g.setColor(MetalLookAndFeel.getControl());
+ g.drawLine(width-2,2,width-2,2);
+ g.drawLine(1,height-2,1,height-2);
+
+ g.translate(-x,-y);
+ } //}}}
+
+ //{{{ getBorderInsets() method
+ public Insets getBorderInsets(Component c)
+ {
+ return new Insets(1,1,2,2);
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/TextAreaDropHandler.java b/jEdit/org/gjt/sp/jedit/textarea/TextAreaDropHandler.java
index 6447a76..f8807cb 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/TextAreaDropHandler.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/TextAreaDropHandler.java
@@ -1,100 +1,97 @@
-/*
- * TextAreaTransferHandler.java - Drag and drop support
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import javax.swing.*;
-import java.awt.dnd.*;
-import java.awt.*;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: TextAreaDropHandler.java 15570 2009-06-25 00:43:57Z ezust $
- */
-class TextAreaDropHandler extends DropTargetAdapter
-{
- private final TextArea textArea;
- private JEditBuffer savedBuffer;
- private int savedCaret;
-
- //{{{ TextAreaDropHandler constructor
- TextAreaDropHandler(TextArea textArea)
- {
- this.textArea = textArea;
- } //}}}
-
- //{{{ dragEnter() method
- @Override
- public void dragEnter(DropTargetDragEvent dtde)
- {
- Log.log(Log.DEBUG,this,"Drag enter");
- savedBuffer = textArea.getBuffer();
- textArea.setDragInProgress(true);
- //textArea.getBuffer().beginCompoundEdit();
- savedCaret = textArea.getCaretPosition();
- } //}}}
-
- //{{{ dragOver() method
- @Override
- public void dragOver(DropTargetDragEvent dtde)
- {
- Point p = dtde.getLocation();
- p = SwingUtilities.convertPoint(textArea,p,
- textArea.getPainter());
- int pos = textArea.xyToOffset(p.x,p.y,
- !(textArea.getPainter().isBlockCaretEnabled()
- || textArea.isOverwriteEnabled()));
- if(pos != -1)
- {
- textArea.moveCaretPosition(pos,
- TextArea.ELECTRIC_SCROLL);
- }
- } //}}}
-
- //{{{ dragExit() method
- @Override
- public void dragExit(DropTargetEvent dtde)
- {
- Log.log(Log.DEBUG,this,"Drag exit");
- textArea.setDragInProgress(false);
- //textArea.getBuffer().endCompoundEdit();
- if(textArea.getBuffer() == savedBuffer)
- {
- textArea.moveCaretPosition(savedCaret,
- TextArea.ELECTRIC_SCROLL);
- }
- savedBuffer = null;
- } //}}}
-
- //{{{ drop() method
- public void drop(DropTargetDropEvent dtde)
- {
- Log.log(Log.DEBUG,this,"Drop");
- textArea.setDragInProgress(false);
- //textArea.getBuffer().endCompoundEdit();
- savedBuffer = null;
- } //}}}
-}
+/*
+ * TextAreaTransferHandler.java - Drag and drop support
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import javax.swing.*;
+import java.awt.dnd.*;
+import java.awt.*;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: TextAreaDropHandler.java 17040 2010-01-23 14:19:47Z k_satoda $
+ */
+class TextAreaDropHandler extends DropTargetAdapter
+{
+ private final TextArea textArea;
+ private JEditBuffer savedBuffer;
+ private int savedCaret;
+
+ //{{{ TextAreaDropHandler constructor
+ TextAreaDropHandler(TextArea textArea)
+ {
+ this.textArea = textArea;
+ } //}}}
+
+ //{{{ dragEnter() method
+ @Override
+ public void dragEnter(DropTargetDragEvent dtde)
+ {
+ Log.log(Log.DEBUG,this,"Drag enter");
+ savedBuffer = textArea.getBuffer();
+ //textArea.getBuffer().beginCompoundEdit();
+ savedCaret = textArea.getCaretPosition();
+ } //}}}
+
+ //{{{ dragOver() method
+ @Override
+ public void dragOver(DropTargetDragEvent dtde)
+ {
+ Point p = dtde.getLocation();
+ p = SwingUtilities.convertPoint(textArea,p,
+ textArea.getPainter());
+ int pos = textArea.xyToOffset(p.x,p.y,
+ !(textArea.getPainter().isBlockCaretEnabled()
+ || textArea.isOverwriteEnabled()));
+ if(pos != -1)
+ {
+ textArea.moveCaretPosition(pos,
+ TextArea.ELECTRIC_SCROLL);
+ }
+ } //}}}
+
+ //{{{ dragExit() method
+ @Override
+ public void dragExit(DropTargetEvent dtde)
+ {
+ Log.log(Log.DEBUG,this,"Drag exit");
+ //textArea.getBuffer().endCompoundEdit();
+ if(textArea.getBuffer() == savedBuffer)
+ {
+ textArea.moveCaretPosition(savedCaret,
+ TextArea.ELECTRIC_SCROLL);
+ }
+ savedBuffer = null;
+ } //}}}
+
+ //{{{ drop() method
+ public void drop(DropTargetDropEvent dtde)
+ {
+ Log.log(Log.DEBUG,this,"Drop");
+ //textArea.getBuffer().endCompoundEdit();
+ savedBuffer = null;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/TextAreaException.java b/jEdit/org/gjt/sp/jedit/textarea/TextAreaException.java
index c491121..9d5282c 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/TextAreaException.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/TextAreaException.java
@@ -1,37 +1,37 @@
-/*
- * ServiceManager.java - Handles services.xml files in plugins
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.textarea;
-
-/**
- * Exception that the TextArea can throw when an error occurs.
- * It can be catched and an error dialog can be displayed.
- *
- * @author Matthieu Casanova
- * @version $Id: TextAreaException.java 15570 2009-06-25 00:43:57Z ezust $
- */
-public class TextAreaException extends Exception
-{
- public TextAreaException(String msg)
- {
- super(msg);
- }
-}
+/*
+ * ServiceManager.java - Handles services.xml files in plugins
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.textarea;
+
+/**
+ * Exception that the TextArea can throw when an error occurs.
+ * It can be catched and an error dialog can be displayed.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: TextAreaException.java 15570 2009-06-25 00:43:57Z ezust $
+ */
+public class TextAreaException extends Exception
+{
+ public TextAreaException(String msg)
+ {
+ super(msg);
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/TextAreaExtension.java b/jEdit/org/gjt/sp/jedit/textarea/TextAreaExtension.java
index 39609b6..2454ed4 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/TextAreaExtension.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/TextAreaExtension.java
@@ -1,129 +1,129 @@
-/*
- * TextAreaExtension.java - Custom painter and tool tip handler
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2002 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-import java.awt.Graphics2D;
-
-/**
- * Subclasses of this class can perform custom painting and tool tip
- * handling in the text area and gutter.
- *
- * @see TextAreaPainter#addExtension(TextAreaExtension)
- * @see TextAreaPainter#removeExtension(TextAreaExtension)
- * @see Gutter#addExtension(TextAreaExtension)
- * @see Gutter#removeExtension(TextAreaExtension)
- *
- * @since jEdit 4.0pre4
- *
- * @author Slava Pestov
- * @version $Id: TextAreaExtension.java 15570 2009-06-25 00:43:57Z ezust $
- */
-public abstract class TextAreaExtension
-{
- //{{{ paintScreenLineRange() method
- /**
- * Paints a range of screen lines. The default implementation calls
- * {@link #paintValidLine(Graphics2D,int,int,int,int,int)} and
- * {@link #paintInvalidLine(Graphics2D,int,int)}.
- * @param gfx A graphics context
- * @param firstLine The first screen line
- * @param lastLine The last screen line
- * @param physicalLines The list of physical line numbers. Entries are
- * -1 if the screen line is out of range.
- * @param start An array of screen line start offsets.
- * @param end An array of screen line end offsets
- * @param y The y co-ordinate
- * @param lineHeight The line height
- * @since jEdit 4.2pre2
- */
- public void paintScreenLineRange(Graphics2D gfx, int firstLine,
- int lastLine, int[] physicalLines, int[] start, int[] end,
- int y, int lineHeight)
- {
- for(int i = 0; i < physicalLines.length; i++)
- {
- int screenLine = i + firstLine;
- if(physicalLines[i] == -1)
- paintInvalidLine(gfx,screenLine,y);
- else
- {
- paintValidLine(gfx,screenLine,physicalLines[i],
- start[i],end[i],y);
- }
-
- y += lineHeight;
- }
- } //}}}
-
- //{{{ paintValidLine() method
- /**
- * Called by the text area when the extension is to paint a
- * screen line which has an associated physical line number in
- * the buffer. Note that since one physical line may consist of
- * several screen lines due to soft wrap, the start and end
- * offsets of the screen line are passed in as well.
- *
- * @param gfx The graphics context
- * @param screenLine The screen line number
- * @param physicalLine The physical line number
- * @param start The offset where the screen line begins, from
- * the start of the buffer
- * @param end The offset where the screen line ends, from the
- * start of the buffer
- * @param y The y co-ordinate of the top of the line's
- * bounding box
- * @since jEdit 4.0pre4
- */
- public void paintValidLine(Graphics2D gfx, int screenLine,
- int physicalLine, int start, int end, int y) {} //}}}
-
- //{{{ paintInvalidLine() method
- /**
- * Called by the text area when the extension is to paint a
- * screen line which is not part of the buffer. This can happen
- * if the buffer is shorter than the height of the text area,
- * for example.
- *
- * @param gfx The graphics context
- * @param screenLine The screen line number
- * @param y The y co-ordinate of the top of the line's
- * bounding box
- * @since jEdit 4.0pre4
- */
- public void paintInvalidLine(Graphics2D gfx, int screenLine,
- int y) {} //}}}
-
- //{{{ getToolTipText() method
- /**
- * Called by the text area when the mouse hovers over the
- * location specified in the mouse event.
- *
- * @param x The x co-ordinate
- * @param y The y co-ordinate
- * @since jEdit 4.0pre4
- */
- public String getToolTipText(int x, int y)
- {
- return null;
- } //}}}
-}
+/*
+ * TextAreaExtension.java - Custom painter and tool tip handler
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2002 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+import java.awt.Graphics2D;
+
+/**
+ * Subclasses of this class can perform custom painting and tool tip
+ * handling in the text area and gutter.
+ *
+ * @see TextAreaPainter#addExtension(TextAreaExtension)
+ * @see TextAreaPainter#removeExtension(TextAreaExtension)
+ * @see Gutter#addExtension(TextAreaExtension)
+ * @see Gutter#removeExtension(TextAreaExtension)
+ *
+ * @since jEdit 4.0pre4
+ *
+ * @author Slava Pestov
+ * @version $Id: TextAreaExtension.java 15570 2009-06-25 00:43:57Z ezust $
+ */
+public abstract class TextAreaExtension
+{
+ //{{{ paintScreenLineRange() method
+ /**
+ * Paints a range of screen lines. The default implementation calls
+ * {@link #paintValidLine(Graphics2D,int,int,int,int,int)} and
+ * {@link #paintInvalidLine(Graphics2D,int,int)}.
+ * @param gfx A graphics context
+ * @param firstLine The first screen line
+ * @param lastLine The last screen line
+ * @param physicalLines The list of physical line numbers. Entries are
+ * -1 if the screen line is out of range.
+ * @param start An array of screen line start offsets.
+ * @param end An array of screen line end offsets
+ * @param y The y co-ordinate
+ * @param lineHeight The line height
+ * @since jEdit 4.2pre2
+ */
+ public void paintScreenLineRange(Graphics2D gfx, int firstLine,
+ int lastLine, int[] physicalLines, int[] start, int[] end,
+ int y, int lineHeight)
+ {
+ for(int i = 0; i < physicalLines.length; i++)
+ {
+ int screenLine = i + firstLine;
+ if(physicalLines[i] == -1)
+ paintInvalidLine(gfx,screenLine,y);
+ else
+ {
+ paintValidLine(gfx,screenLine,physicalLines[i],
+ start[i],end[i],y);
+ }
+
+ y += lineHeight;
+ }
+ } //}}}
+
+ //{{{ paintValidLine() method
+ /**
+ * Called by the text area when the extension is to paint a
+ * screen line which has an associated physical line number in
+ * the buffer. Note that since one physical line may consist of
+ * several screen lines due to soft wrap, the start and end
+ * offsets of the screen line are passed in as well.
+ *
+ * @param gfx The graphics context
+ * @param screenLine The screen line number
+ * @param physicalLine The physical line number
+ * @param start The offset where the screen line begins, from
+ * the start of the buffer
+ * @param end The offset where the screen line ends, from the
+ * start of the buffer
+ * @param y The y co-ordinate of the top of the line's
+ * bounding box
+ * @since jEdit 4.0pre4
+ */
+ public void paintValidLine(Graphics2D gfx, int screenLine,
+ int physicalLine, int start, int end, int y) {} //}}}
+
+ //{{{ paintInvalidLine() method
+ /**
+ * Called by the text area when the extension is to paint a
+ * screen line which is not part of the buffer. This can happen
+ * if the buffer is shorter than the height of the text area,
+ * for example.
+ *
+ * @param gfx The graphics context
+ * @param screenLine The screen line number
+ * @param y The y co-ordinate of the top of the line's
+ * bounding box
+ * @since jEdit 4.0pre4
+ */
+ public void paintInvalidLine(Graphics2D gfx, int screenLine,
+ int y) {} //}}}
+
+ //{{{ getToolTipText() method
+ /**
+ * Called by the text area when the mouse hovers over the
+ * location specified in the mouse event.
+ *
+ * @param x The x co-ordinate
+ * @param y The y co-ordinate
+ * @since jEdit 4.0pre4
+ */
+ public String getToolTipText(int x, int y)
+ {
+ return null;
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/TextAreaMouseHandler.java b/jEdit/org/gjt/sp/jedit/textarea/TextAreaMouseHandler.java
index a0dcec6..dad7480 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/TextAreaMouseHandler.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/TextAreaMouseHandler.java
@@ -1,602 +1,598 @@
-/*
- * TextAreaMouseHandler.java - standalone mouse handler for textarea
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.jedit.textarea;
-
-import org.gjt.sp.jedit.OperatingSystem;
-import org.gjt.sp.jedit.TextUtilities;
-import org.gjt.sp.util.StandardUtilities;
-
-import javax.swing.event.MouseInputAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.InputEvent;
-import java.awt.*;
-
-/** Standalone TextArea MouseHandler.
- *
- * @author Matthieu Casanova
- * @version $Id: TextAreaMouseHandler.java 16573 2009-12-01 17:54:23Z shlomy $
- */
-public class TextAreaMouseHandler extends MouseInputAdapter
-{
- //{{{ MouseHandler constructor
- TextAreaMouseHandler(TextArea textArea)
- {
- this.textArea = textArea;
- } //}}}
-
- //{{{ mousePressed() method
- @Override
- public void mousePressed(MouseEvent evt)
- {
- showCursor();
-
- control = (OperatingSystem.isMacOS() && evt.isMetaDown())
- || (!OperatingSystem.isMacOS() && evt.isControlDown());
-
- ctrlForRectangularSelection = true;
-
- // so that Home <mouse click> Home is not the same
- // as pressing Home twice in a row
- textArea.getInputHandler().resetLastActionCount();
-
- quickCopyDrag = (textArea.isQuickCopyEnabled() &&
- isMiddleButton(evt.getModifiers()));
-
- if(!quickCopyDrag)
- {
- textArea.requestFocus();
- TextArea.focusedComponent = textArea;
- }
-
- if(textArea.getBuffer().isLoading())
- return;
-
- int x = evt.getX();
- int y = evt.getY();
-
- dragStart = textArea.xyToOffset(x,y,
- !(textArea.getPainter().isBlockCaretEnabled()
- || textArea.isOverwriteEnabled()));
- dragStartLine = textArea.getLineOfOffset(dragStart);
- dragStartOffset = dragStart - textArea.getLineStartOffset(
- dragStartLine);
-
- if(isPopupTrigger(evt) && textArea.isRightClickPopupEnabled())
- {
- textArea.handlePopupTrigger(evt);
- return;
- }
-
- dragged = false;
-
- textArea.blink = true;
- textArea.invalidateLine(textArea.getCaretLine());
-
- clickCount = evt.getClickCount();
-
- if(textArea.isDragEnabled()
- && textArea.selectionManager.insideSelection(x,y)
- && clickCount == 1 && !evt.isShiftDown())
- {
- maybeDragAndDrop = true;
- textArea.moveCaretPosition(dragStart,false);
- return;
- }
- maybeDragAndDrop = false;
-
- if(quickCopyDrag)
- {
- // ignore double clicks of middle button
- doSingleClick(evt);
- }
- else
- {
- switch(clickCount)
- {
- case 1:
- doSingleClick(evt);
- break;
- case 2:
- doDoubleClick();
- break;
- default: //case 3:
- doTripleClick();
- break;
- }
- }
- } //}}}
-
- //{{{ doSingleClick() method
- protected void doSingleClick(MouseEvent evt)
- {
- int x = evt.getX();
-
- int extraEndVirt = 0;
- if(textArea.chunkCache.getLineInfo(
- textArea.getLastScreenLine()).lastSubregion)
- {
- int dragStart = textArea.xyToOffset(x,evt.getY(),
- !textArea.getPainter().isBlockCaretEnabled()
- && !textArea.isOverwriteEnabled());
- int screenLine = textArea.getScreenLineOfOffset(dragStart);
- ChunkCache.LineInfo lineInfo = textArea.chunkCache.getLineInfo(screenLine);
- int offset = textArea.getScreenLineEndOffset(screenLine);
- if ((1 != offset - dragStart) || (lineInfo.lastSubregion))
- {
- offset--;
- }
- float dragStartLineWidth = textArea.offsetToXY(offset).x;
- if(x > dragStartLineWidth)
- {
- extraEndVirt = (int)(
- (x - dragStartLineWidth)
- / textArea.charWidth);
- if(!textArea.getPainter().isBlockCaretEnabled()
- && !textArea.isOverwriteEnabled()
- && (x - textArea.getHorizontalOffset())
- % textArea.charWidth > textArea.charWidth / 2)
- {
- extraEndVirt++;
- }
- }
- }
-
- if(((control && ctrlForRectangularSelection) ||
- textArea.isRectangularSelectionEnabled())
- && textArea.isEditable())
- {
- int screenLine = (evt.getY() / textArea.getPainter()
- .getFontMetrics().getHeight());
- if(screenLine > textArea.getLastScreenLine())
- screenLine = textArea.getLastScreenLine();
- ChunkCache.LineInfo info = textArea.chunkCache.getLineInfo(screenLine);
- if(info.lastSubregion && extraEndVirt != 0)
- {
- // control-click in virtual space inserts
- // whitespace and moves caret
- String whitespace = StandardUtilities
- .createWhiteSpace(extraEndVirt,0);
- textArea.getBuffer().insert(dragStart,whitespace);
-
- dragStart += whitespace.length();
- }
- }
-
- if(evt.isShiftDown())
- {
- // XXX: getMarkPosition() deprecated!
- textArea.resizeSelection(
- textArea.getMarkPosition(),dragStart,extraEndVirt,
- textArea.isRectangularSelectionEnabled()
- || (control && ctrlForRectangularSelection));
-
- if(!quickCopyDrag)
- textArea.moveCaretPosition(dragStart,false);
-
- // so that shift-click-drag works
- dragStartLine = textArea.getMarkLine();
- dragStart = textArea.getMarkPosition();
- dragStartOffset = dragStart
- - textArea.getLineStartOffset(dragStartLine);
-
- // so that quick copy works
- dragged = true;
-
- return;
- }
-
- if(!quickCopyDrag)
- textArea.moveCaretPosition(dragStart,false);
-
- if(!(textArea.isMultipleSelectionEnabled()
- || quickCopyDrag))
- textArea.selectNone();
- } //}}}
-
- //{{{ doDoubleClick() method
- protected void doDoubleClick()
- {
- // Ignore empty lines
- if(textArea.getLineLength(dragStartLine) == 0)
- return;
-
- String lineText = textArea.getLineText(dragStartLine);
- String noWordSep = textArea.getBuffer()
- .getStringProperty("noWordSep");
- if(dragStartOffset == textArea.getLineLength(dragStartLine))
- dragStartOffset--;
-
- boolean joinNonWordChars = textArea.getJoinNonWordChars();
- int wordStart = TextUtilities.findWordStart(lineText,dragStartOffset,
- noWordSep,joinNonWordChars,false,false);
- int wordEnd = TextUtilities.findWordEnd(lineText,
- dragStartOffset+1,noWordSep,
- joinNonWordChars,false,false);
-
- int lineStart = textArea.getLineStartOffset(dragStartLine);
- Selection sel = new Selection.Range(
- lineStart + wordStart,
- lineStart + wordEnd);
- if(textArea.isMultipleSelectionEnabled())
- textArea.addToSelection(sel);
- else
- textArea.setSelection(sel);
-
- if(quickCopyDrag)
- quickCopyDrag = false;
-
- textArea.moveCaretPosition(lineStart + wordEnd,false);
-
- dragged = true;
- } //}}}
-
- //{{{ doTripleClick() method
- protected void doTripleClick()
- {
- int newCaret = textArea.getLineEndOffset(dragStartLine);
- if(dragStartLine == textArea.getLineCount() - 1)
- newCaret--;
-
- Selection sel = new Selection.Range(
- textArea.getLineStartOffset(dragStartLine),
- newCaret);
- if(textArea.isMultipleSelectionEnabled())
- textArea.addToSelection(sel);
- else
- textArea.setSelection(sel);
-
- if(quickCopyDrag)
- quickCopyDrag = false;
-
- textArea.moveCaretPosition(newCaret,false);
-
- dragged = true;
- } //}}}
-
- //{{{ mouseMoved() method
- @Override
- public void mouseMoved(MouseEvent evt)
- {
- showCursor();
- } //}}}
-
- //{{{ mouseDragged() method
- @Override
- public void mouseDragged(MouseEvent evt)
- {
- if (isPopupTrigger(evt))
- return;
-
- if(maybeDragAndDrop)
- {
- textArea.startDragAndDrop(evt,control);
- return;
- }
-
- if(textArea.isDragInProgress())
- return;
-
- if(textArea.getBuffer().isLoading())
- return;
-
- TextAreaPainter painter = textArea.getPainter();
- if(evt.getY() < 0)
- {
- int delta = Math.min(-1,evt.getY()
- / painter.getFontMetrics()
- .getHeight());
- textArea.setFirstLine(textArea.getFirstLine() + delta);
- }
- else if(evt.getY() >= painter.getHeight())
- {
- int delta = Math.max(1,(evt.getY()
- - painter.getHeight()) /
- painter.getFontMetrics()
- .getHeight());
- if(textArea.lastLinePartial)
- delta--;
- textArea.setFirstLine(textArea.getFirstLine() + delta);
- }
-
- switch(clickCount)
- {
- case 1:
- doSingleDrag(evt);
- break;
- case 2:
- doDoubleDrag(evt);
- break;
- default: //case 3:
- doTripleDrag(evt);
- break;
- }
- } //}}}
-
- //{{{ doSingleDrag() method
- private void doSingleDrag(MouseEvent evt)
- {
- dragged = true;
-
- TextAreaPainter painter = textArea.getPainter();
-
- int x = evt.getX();
- int y = evt.getY();
- if(y < 0)
- y = 0;
- else if(y >= painter.getHeight())
- y = painter.getHeight() - 1;
-
- int dot = textArea.xyToOffset(x,y,
- (!painter.isBlockCaretEnabled()
- && !textArea.isOverwriteEnabled())
- || quickCopyDrag);
- int dotLine = textArea.getLineOfOffset(dot);
- int extraEndVirt = 0;
-
- if(textArea.chunkCache.getLineInfo(
- textArea.getLastScreenLine())
- .lastSubregion)
- {
- int screenLine = textArea.getScreenLineOfOffset(dot);
- ChunkCache.LineInfo lineInfo = textArea.chunkCache.getLineInfo(screenLine);
- int offset = textArea.getScreenLineEndOffset(screenLine);
- if ((1 != offset - dot) || (lineInfo.lastSubregion))
- {
- offset--;
- }
- float dotLineWidth = textArea.offsetToXY(offset).x;
- if(x > dotLineWidth)
- {
- extraEndVirt = (int)((x - dotLineWidth) / textArea.charWidth);
- if(!painter.isBlockCaretEnabled()
- && !textArea.isOverwriteEnabled()
- && (x - textArea.getHorizontalOffset()) % textArea.charWidth > textArea.charWidth / 2)
- extraEndVirt++;
- }
- }
-
- textArea.resizeSelection(dragStart,dot,extraEndVirt,
- textArea.isRectangularSelectionEnabled()
- || (control && ctrlForRectangularSelection));
-
- if(quickCopyDrag)
- {
- // just scroll to the dragged location
- textArea.scrollTo(dotLine,dot - textArea.getLineStartOffset(dotLine),false);
- }
- else
- {
- if(dot != textArea.getCaretPosition())
- textArea.moveCaretPosition(dot,false);
- if(textArea.isRectangularSelectionEnabled()
- && extraEndVirt != 0)
- {
- textArea.scrollTo(dotLine,dot - textArea.getLineStartOffset(dotLine)
- + extraEndVirt,false);
- }
- }
- } //}}}
-
- //{{{ doDoubleDrag() method
- private void doDoubleDrag(MouseEvent evt)
- {
- int markLineStart = textArea.getLineStartOffset(dragStartLine);
- int markLineLength = textArea.getLineLength(dragStartLine);
- int mark = dragStartOffset;
-
- TextAreaPainter painter = textArea.getPainter();
-
- int pos = textArea.xyToOffset(evt.getX(),
- Math.max(0,Math.min(painter.getHeight(),evt.getY())),
- !(painter.isBlockCaretEnabled()
- || textArea.isOverwriteEnabled()));
- int line = textArea.getLineOfOffset(pos);
- int lineStart = textArea.getLineStartOffset(line);
- int lineLength = textArea.getLineLength(line);
- int offset = pos - lineStart;
-
- String lineText = textArea.getLineText(line);
- String markLineText = textArea.getLineText(dragStartLine);
- String noWordSep = textArea.getBuffer()
- .getStringProperty("noWordSep");
- boolean joinNonWordChars = textArea.getJoinNonWordChars();
-
- if(markLineStart + dragStartOffset > lineStart + offset)
- {
- if(offset != 0 && offset != lineLength)
- {
- offset = TextUtilities.findWordStart(
- lineText,offset,noWordSep,
- joinNonWordChars);
- }
-
- if(markLineLength != 0)
- {
- mark = TextUtilities.findWordEnd(
- markLineText,mark,noWordSep,
- joinNonWordChars);
- }
- }
- else
- {
- if(offset != 0 && lineLength != 0)
- {
- offset = TextUtilities.findWordEnd(
- lineText,offset,noWordSep,
- joinNonWordChars);
- }
-
- if(mark != 0 && mark != markLineLength)
- {
- mark = TextUtilities.findWordStart(
- markLineText,mark,noWordSep,
- joinNonWordChars);
- }
- }
-
- if(lineStart + offset == textArea.getCaretPosition())
- return;
-
- textArea.resizeSelection(markLineStart + mark,
- lineStart + offset,0,false);
- textArea.moveCaretPosition(lineStart + offset,false);
-
- dragged = true;
- } //}}}
-
- //{{{ doTripleDrag() method
- private void doTripleDrag(MouseEvent evt)
- {
- TextAreaPainter painter = textArea.getPainter();
-
- int offset = textArea.xyToOffset(evt.getX(),
- Math.max(0,Math.min(painter.getHeight(),evt.getY())),
- false);
- int mouseLine = textArea.getLineOfOffset(offset);
- int mark;
- int mouse;
- if(dragStartLine > mouseLine)
- {
- mark = textArea.getLineEndOffset(dragStartLine) - 1;
- if(offset == textArea.getLineEndOffset(mouseLine) - 1)
- mouse = offset;
- else
- mouse = textArea.getLineStartOffset(mouseLine);
- }
- else
- {
- mark = textArea.getLineStartOffset(dragStartLine);
- if(offset == textArea.getLineStartOffset(mouseLine))
- mouse = offset;
- else if(offset == textArea.getLineEndOffset(mouseLine) - 1
- && mouseLine != textArea.getLineCount() - 1)
- mouse = textArea.getLineEndOffset(mouseLine);
- else
- mouse = textArea.getLineEndOffset(mouseLine) - 1;
- }
-
- mouse = Math.min(textArea.getBuffer().getLength(),mouse);
-
- if(mouse == textArea.getCaretPosition())
- return;
-
- textArea.resizeSelection(mark,mouse,0,false);
- textArea.moveCaretPosition(mouse,false);
-
- dragged = true;
- } //}}}
-
- //{{{ mouseReleased() method
- @Override
- public void mouseReleased(MouseEvent evt)
- {
- if(!dragged && textArea.isQuickCopyEnabled() &&
- isMiddleButton(evt.getModifiers()))
- {
- textArea.requestFocus();
- TextArea.focusedComponent = textArea;
-
- textArea.setCaretPosition(dragStart,false);
- }
- else if(maybeDragAndDrop
- && !textArea.isMultipleSelectionEnabled())
- {
- textArea.selectNone();
- }
-
- dragged = false;
- } //}}}
-
- //{{{ isPopupTrigger() method
- /**
- * Returns if the specified event is the popup trigger event.
- * This implements precisely defined behavior, as opposed to
- * MouseEvent.isPopupTrigger().
- * @param evt The event
- * @since jEdit 4.3pre7
- */
- public static boolean isPopupTrigger(MouseEvent evt)
- {
- return isRightButton(evt.getModifiers());
- } //}}}
-
- //{{{ isMiddleButton() method
- /**
- * @param modifiers The modifiers flag from a mouse event
- * @return true if the modifier match the middle button
- * @since jEdit 4.3pre7
- */
- public static boolean isMiddleButton(int modifiers)
- {
- if (OperatingSystem.isMacOS())
- {
- if((modifiers & InputEvent.BUTTON1_MASK) != 0)
- return (modifiers & InputEvent.ALT_MASK) != 0;
- else
- return (modifiers & InputEvent.BUTTON2_MASK) != 0;
- }
- else
- return (modifiers & InputEvent.BUTTON2_MASK) != 0;
- } //}}}
-
- //{{{ isRightButton() method
- /**
- * @param modifiers The modifiers flag from a mouse event
- * @return true if the modifier match the right button
- * @since jEdit 4.3pre7
- */
- public static boolean isRightButton(int modifiers)
- {
- if (OperatingSystem.isMacOS())
- {
- if((modifiers & InputEvent.BUTTON1_MASK) != 0)
- return (modifiers & InputEvent.CTRL_MASK) != 0;
- else
- return (modifiers & InputEvent.BUTTON3_MASK) != 0;
- }
- else
- return (modifiers & InputEvent.BUTTON3_MASK) != 0;
- } //}}}
-
- //{{{ Private members
- protected final TextArea textArea;
- protected int dragStartLine;
- protected int dragStartOffset;
- protected int dragStart;
- protected int clickCount;
- protected boolean dragged;
- protected boolean quickCopyDrag;
- protected boolean control;
- protected boolean ctrlForRectangularSelection;
- /* with drag and drop on, a mouse down in a selection does not
- immediately deselect */
- protected boolean maybeDragAndDrop;
-
- //{{{ showCursor() method
- protected void showCursor()
- {
- textArea.getPainter().setCursor(
- Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
- } //}}}
-
- //}}}
-}
+/*
+ * TextAreaMouseHandler.java - standalone mouse handler for textarea
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.jedit.textarea;
+
+import org.gjt.sp.jedit.OperatingSystem;
+import org.gjt.sp.jedit.TextUtilities;
+import org.gjt.sp.util.StandardUtilities;
+
+import javax.swing.event.MouseInputAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.InputEvent;
+import java.awt.*;
+
+/** Standalone TextArea MouseHandler.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: TextAreaMouseHandler.java 18557 2010-09-14 08:05:17Z kpouer $
+ */
+public class TextAreaMouseHandler extends MouseInputAdapter
+{
+ //{{{ MouseHandler constructor
+ TextAreaMouseHandler(TextArea textArea)
+ {
+ this.textArea = textArea;
+ } //}}}
+
+ //{{{ mousePressed() method
+ @Override
+ public void mousePressed(MouseEvent evt)
+ {
+ showCursor();
+
+ control = (OperatingSystem.isMacOS() && evt.isMetaDown())
+ || (!OperatingSystem.isMacOS() && evt.isControlDown());
+
+ ctrlForRectangularSelection = true;
+
+ // so that Home <mouse click> Home is not the same
+ // as pressing Home twice in a row
+ textArea.getInputHandler().resetLastActionCount();
+
+ quickCopyDrag = (textArea.isQuickCopyEnabled() &&
+ isMiddleButton(evt.getModifiers()));
+
+ if(!quickCopyDrag)
+ {
+ textArea.requestFocus();
+ TextArea.focusedComponent = textArea;
+ }
+
+ if(textArea.getBuffer().isLoading())
+ return;
+
+ int x = evt.getX();
+ int y = evt.getY();
+
+ dragStart = textArea.xyToOffset(x,y,
+ !(textArea.getPainter().isBlockCaretEnabled()
+ || textArea.isOverwriteEnabled()));
+ dragStartLine = textArea.getLineOfOffset(dragStart);
+ dragStartOffset = dragStart - textArea.getLineStartOffset(
+ dragStartLine);
+
+ if(isPopupTrigger(evt) && textArea.isRightClickPopupEnabled())
+ {
+ textArea.handlePopupTrigger(evt);
+ return;
+ }
+
+ dragged = false;
+
+ textArea.blink = true;
+ textArea.invalidateLine(textArea.getCaretLine());
+
+ clickCount = evt.getClickCount();
+
+ if(textArea.isDragEnabled()
+ && textArea.selectionManager.insideSelection(x,y)
+ && clickCount == 1 && !evt.isShiftDown())
+ {
+ maybeDragAndDrop = true;
+ textArea.moveCaretPosition(dragStart,false);
+ return;
+ }
+ maybeDragAndDrop = false;
+
+ if(quickCopyDrag)
+ {
+ // ignore double clicks of middle button
+ doSingleClick(evt);
+ }
+ else
+ {
+ switch(clickCount)
+ {
+ case 1:
+ doSingleClick(evt);
+ break;
+ case 2:
+ doDoubleClick();
+ break;
+ default: //case 3:
+ doTripleClick();
+ break;
+ }
+ }
+ } //}}}
+
+ //{{{ doSingleClick() method
+ protected void doSingleClick(MouseEvent evt)
+ {
+ int x = evt.getX();
+
+ int extraEndVirt = 0;
+ if(textArea.chunkCache.getLineInfo(
+ textArea.getLastScreenLine()).lastSubregion)
+ {
+ int dragStart = textArea.xyToOffset(x,evt.getY(),
+ !textArea.getPainter().isBlockCaretEnabled()
+ && !textArea.isOverwriteEnabled());
+ int screenLine = textArea.getScreenLineOfOffset(dragStart);
+ ChunkCache.LineInfo lineInfo = textArea.chunkCache.getLineInfo(screenLine);
+ int offset = textArea.getScreenLineEndOffset(screenLine);
+ if ((1 != offset - dragStart) || (lineInfo.lastSubregion))
+ {
+ offset--;
+ }
+ float dragStartLineWidth = textArea.offsetToXY(offset).x;
+ if(x > dragStartLineWidth)
+ {
+ extraEndVirt = (int)(
+ (x - dragStartLineWidth)
+ / textArea.charWidth);
+ if(!textArea.getPainter().isBlockCaretEnabled()
+ && !textArea.isOverwriteEnabled()
+ && (x - textArea.getHorizontalOffset())
+ % textArea.charWidth > textArea.charWidth / 2)
+ {
+ extraEndVirt++;
+ }
+ }
+ }
+
+ if(((control && ctrlForRectangularSelection) ||
+ textArea.isRectangularSelectionEnabled())
+ && textArea.isEditable())
+ {
+ int screenLine = (evt.getY() / textArea.getPainter()
+ .getFontMetrics().getHeight());
+ if(screenLine > textArea.getLastScreenLine())
+ screenLine = textArea.getLastScreenLine();
+ ChunkCache.LineInfo info = textArea.chunkCache.getLineInfo(screenLine);
+ if(info.lastSubregion && extraEndVirt != 0)
+ {
+ // control-click in virtual space inserts
+ // whitespace and moves caret
+ String whitespace = StandardUtilities
+ .createWhiteSpace(extraEndVirt,0);
+ textArea.getBuffer().insert(dragStart,whitespace);
+
+ dragStart += whitespace.length();
+ }
+ }
+
+ if(evt.isShiftDown())
+ {
+ // XXX: getMarkPosition() deprecated!
+ textArea.resizeSelection(
+ textArea.getMarkPosition(),dragStart,extraEndVirt,
+ textArea.isRectangularSelectionEnabled()
+ || (control && ctrlForRectangularSelection));
+
+ if(!quickCopyDrag)
+ textArea.moveCaretPosition(dragStart,false);
+
+ // so that shift-click-drag works
+ dragStartLine = textArea.getMarkLine();
+ dragStart = textArea.getMarkPosition();
+ dragStartOffset = dragStart
+ - textArea.getLineStartOffset(dragStartLine);
+
+ // so that quick copy works
+ dragged = true;
+
+ return;
+ }
+
+ if(!quickCopyDrag)
+ textArea.moveCaretPosition(dragStart,false);
+
+ if(!(textArea.isMultipleSelectionEnabled()
+ || quickCopyDrag))
+ textArea.selectNone();
+ } //}}}
+
+ //{{{ doDoubleClick() method
+ protected void doDoubleClick()
+ {
+ // Ignore empty lines
+ if(textArea.getLineLength(dragStartLine) == 0)
+ return;
+
+ String lineText = textArea.getLineText(dragStartLine);
+ String noWordSep = textArea.getBuffer()
+ .getStringProperty("noWordSep");
+ if(dragStartOffset == textArea.getLineLength(dragStartLine))
+ dragStartOffset--;
+
+ boolean joinNonWordChars = textArea.getJoinNonWordChars();
+ int wordStart = TextUtilities.findWordStart(lineText,dragStartOffset,
+ noWordSep,joinNonWordChars,false,false);
+ int wordEnd = TextUtilities.findWordEnd(lineText,
+ dragStartOffset+1,noWordSep,
+ joinNonWordChars,false,false);
+
+ int lineStart = textArea.getLineStartOffset(dragStartLine);
+ Selection sel = new Selection.Range(
+ lineStart + wordStart,
+ lineStart + wordEnd);
+ if(textArea.isMultipleSelectionEnabled())
+ textArea.addToSelection(sel);
+ else
+ textArea.setSelection(sel);
+
+ if(quickCopyDrag)
+ quickCopyDrag = false;
+
+ textArea.moveCaretPosition(lineStart + wordEnd,false);
+
+ dragged = true;
+ } //}}}
+
+ //{{{ doTripleClick() method
+ protected void doTripleClick()
+ {
+ int newCaret = textArea.getLineEndOffset(dragStartLine);
+ if(dragStartLine == textArea.getLineCount() - 1)
+ newCaret--;
+
+ Selection sel = new Selection.Range(
+ textArea.getLineStartOffset(dragStartLine),
+ newCaret);
+ if(textArea.isMultipleSelectionEnabled())
+ textArea.addToSelection(sel);
+ else
+ textArea.setSelection(sel);
+
+ if(quickCopyDrag)
+ quickCopyDrag = false;
+
+ textArea.moveCaretPosition(newCaret,false);
+
+ dragged = true;
+ } //}}}
+
+ //{{{ mouseMoved() method
+ @Override
+ public void mouseMoved(MouseEvent evt)
+ {
+ showCursor();
+ } //}}}
+
+ //{{{ mouseDragged() method
+ @Override
+ public void mouseDragged(MouseEvent evt)
+ {
+ if (isPopupTrigger(evt))
+ return;
+
+ if(maybeDragAndDrop)
+ {
+ textArea.startDragAndDrop(evt,control);
+ return;
+ }
+
+ if(textArea.getBuffer().isLoading())
+ return;
+
+ TextAreaPainter painter = textArea.getPainter();
+ if(evt.getY() < 0)
+ {
+ int delta = Math.min(-1,evt.getY()
+ / painter.getFontMetrics()
+ .getHeight());
+ textArea.setFirstLine(textArea.getFirstLine() + delta);
+ }
+ else if(evt.getY() >= painter.getHeight())
+ {
+ int delta = Math.max(1,(evt.getY()
+ - painter.getHeight()) /
+ painter.getFontMetrics()
+ .getHeight());
+ if(textArea.lastLinePartial)
+ delta--;
+ textArea.setFirstLine(textArea.getFirstLine() + delta);
+ }
+
+ switch(clickCount)
+ {
+ case 1:
+ doSingleDrag(evt);
+ break;
+ case 2:
+ doDoubleDrag(evt);
+ break;
+ default: //case 3:
+ doTripleDrag(evt);
+ break;
+ }
+ } //}}}
+
+ //{{{ doSingleDrag() method
+ private void doSingleDrag(MouseEvent evt)
+ {
+ dragged = true;
+
+ TextAreaPainter painter = textArea.getPainter();
+
+ int x = evt.getX();
+ int y = evt.getY();
+ if(y < 0)
+ y = 0;
+ else if(y >= painter.getHeight())
+ y = painter.getHeight() - 1;
+
+ int dot = textArea.xyToOffset(x,y,
+ (!painter.isBlockCaretEnabled()
+ && !textArea.isOverwriteEnabled())
+ || quickCopyDrag);
+ int dotLine = textArea.getLineOfOffset(dot);
+ int extraEndVirt = 0;
+
+ if(textArea.chunkCache.getLineInfo(
+ textArea.getLastScreenLine())
+ .lastSubregion)
+ {
+ int screenLine = textArea.getScreenLineOfOffset(dot);
+ ChunkCache.LineInfo lineInfo = textArea.chunkCache.getLineInfo(screenLine);
+ int offset = textArea.getScreenLineEndOffset(screenLine);
+ if ((1 != offset - dot) || (lineInfo.lastSubregion))
+ {
+ offset--;
+ }
+ float dotLineWidth = textArea.offsetToXY(offset).x;
+ if(x > dotLineWidth)
+ {
+ extraEndVirt = (int)((x - dotLineWidth) / textArea.charWidth);
+ if(!painter.isBlockCaretEnabled()
+ && !textArea.isOverwriteEnabled()
+ && (x - textArea.getHorizontalOffset()) % textArea.charWidth > textArea.charWidth / 2)
+ extraEndVirt++;
+ }
+ }
+
+ textArea.resizeSelection(dragStart,dot,extraEndVirt,
+ textArea.isRectangularSelectionEnabled()
+ || (control && ctrlForRectangularSelection));
+
+ if(quickCopyDrag)
+ {
+ // just scroll to the dragged location
+ textArea.scrollTo(dotLine,dot - textArea.getLineStartOffset(dotLine),false);
+ }
+ else
+ {
+ if(dot != textArea.getCaretPosition())
+ textArea.moveCaretPosition(dot,false);
+ if(textArea.isRectangularSelectionEnabled()
+ && extraEndVirt != 0)
+ {
+ textArea.scrollTo(dotLine,dot - textArea.getLineStartOffset(dotLine)
+ + extraEndVirt,false);
+ }
+ }
+ } //}}}
+
+ //{{{ doDoubleDrag() method
+ private void doDoubleDrag(MouseEvent evt)
+ {
+ int markLineStart = textArea.getLineStartOffset(dragStartLine);
+ int markLineLength = textArea.getLineLength(dragStartLine);
+ int mark = dragStartOffset;
+
+ TextAreaPainter painter = textArea.getPainter();
+
+ int pos = textArea.xyToOffset(evt.getX(),
+ Math.max(0,Math.min(painter.getHeight(),evt.getY())),
+ !(painter.isBlockCaretEnabled()
+ || textArea.isOverwriteEnabled()));
+ int line = textArea.getLineOfOffset(pos);
+ int lineStart = textArea.getLineStartOffset(line);
+ int lineLength = textArea.getLineLength(line);
+ int offset = pos - lineStart;
+
+ String lineText = textArea.getLineText(line);
+ String markLineText = textArea.getLineText(dragStartLine);
+ String noWordSep = textArea.getBuffer()
+ .getStringProperty("noWordSep");
+ boolean joinNonWordChars = textArea.getJoinNonWordChars();
+
+ if(markLineStart + dragStartOffset > lineStart + offset)
+ {
+ if(offset != 0 && offset != lineLength)
+ {
+ offset = TextUtilities.findWordStart(
+ lineText,offset,noWordSep,
+ joinNonWordChars);
+ }
+
+ if(markLineLength != 0)
+ {
+ mark = TextUtilities.findWordEnd(
+ markLineText,mark,noWordSep,
+ joinNonWordChars);
+ }
+ }
+ else
+ {
+ if(offset != 0 && lineLength != 0)
+ {
+ offset = TextUtilities.findWordEnd(
+ lineText,offset,noWordSep,
+ joinNonWordChars);
+ }
+
+ if(mark != 0 && mark != markLineLength)
+ {
+ mark = TextUtilities.findWordStart(
+ markLineText,mark,noWordSep,
+ joinNonWordChars);
+ }
+ }
+
+ if(lineStart + offset == textArea.getCaretPosition())
+ return;
+
+ textArea.resizeSelection(markLineStart + mark,
+ lineStart + offset,0,false);
+ textArea.moveCaretPosition(lineStart + offset,false);
+
+ dragged = true;
+ } //}}}
+
+ //{{{ doTripleDrag() method
+ private void doTripleDrag(MouseEvent evt)
+ {
+ TextAreaPainter painter = textArea.getPainter();
+
+ int offset = textArea.xyToOffset(evt.getX(),
+ Math.max(0,Math.min(painter.getHeight(),evt.getY())),
+ false);
+ int mouseLine = textArea.getLineOfOffset(offset);
+ int mark;
+ int mouse;
+ if(dragStartLine > mouseLine)
+ {
+ mark = textArea.getLineEndOffset(dragStartLine) - 1;
+ if(offset == textArea.getLineEndOffset(mouseLine) - 1)
+ mouse = offset;
+ else
+ mouse = textArea.getLineStartOffset(mouseLine);
+ }
+ else
+ {
+ mark = textArea.getLineStartOffset(dragStartLine);
+ if(offset == textArea.getLineStartOffset(mouseLine))
+ mouse = offset;
+ else if(offset == textArea.getLineEndOffset(mouseLine) - 1
+ && mouseLine != textArea.getLineCount() - 1)
+ mouse = textArea.getLineEndOffset(mouseLine);
+ else
+ mouse = textArea.getLineEndOffset(mouseLine) - 1;
+ }
+
+ mouse = Math.min(textArea.getBuffer().getLength(),mouse);
+
+ if(mouse == textArea.getCaretPosition())
+ return;
+
+ textArea.resizeSelection(mark,mouse,0,false);
+ textArea.moveCaretPosition(mouse,false);
+
+ dragged = true;
+ } //}}}
+
+ //{{{ mouseReleased() method
+ @Override
+ public void mouseReleased(MouseEvent evt)
+ {
+ if(!dragged && textArea.isQuickCopyEnabled() &&
+ isMiddleButton(evt.getModifiers()))
+ {
+ textArea.requestFocus();
+ TextArea.focusedComponent = textArea;
+
+ textArea.setCaretPosition(dragStart,false);
+ }
+ else if(maybeDragAndDrop
+ && !textArea.isMultipleSelectionEnabled())
+ {
+ textArea.selectNone();
+ }
+
+ dragged = false;
+ } //}}}
+
+ //{{{ isPopupTrigger() method
+ /**
+ * Returns if the specified event is the popup trigger event.
+ * This implements precisely defined behavior, as opposed to
+ * MouseEvent.isPopupTrigger().
+ * @param evt The event
+ * @since jEdit 4.3pre7
+ */
+ public static boolean isPopupTrigger(MouseEvent evt)
+ {
+ return isRightButton(evt.getModifiers());
+ } //}}}
+
+ //{{{ isMiddleButton() method
+ /**
+ * @param modifiers The modifiers flag from a mouse event
+ * @return true if the modifier match the middle button
+ * @since jEdit 4.3pre7
+ */
+ public static boolean isMiddleButton(int modifiers)
+ {
+ if (OperatingSystem.isMacOS())
+ {
+ if((modifiers & InputEvent.BUTTON1_MASK) != 0)
+ return (modifiers & InputEvent.ALT_MASK) != 0;
+ else
+ return (modifiers & InputEvent.BUTTON2_MASK) != 0;
+ }
+ else
+ return (modifiers & InputEvent.BUTTON2_MASK) != 0;
+ } //}}}
+
+ //{{{ isRightButton() method
+ /**
+ * @param modifiers The modifiers flag from a mouse event
+ * @return true if the modifier match the right button
+ * @since jEdit 4.3pre7
+ */
+ public static boolean isRightButton(int modifiers)
+ {
+ if (OperatingSystem.isMacOS())
+ {
+ if((modifiers & InputEvent.BUTTON1_MASK) != 0)
+ return (modifiers & InputEvent.CTRL_MASK) != 0;
+ else
+ return (modifiers & InputEvent.BUTTON3_MASK) != 0;
+ }
+ else
+ return (modifiers & InputEvent.BUTTON3_MASK) != 0;
+ } //}}}
+
+ //{{{ Private members
+ protected final TextArea textArea;
+ protected int dragStartLine;
+ protected int dragStartOffset;
+ protected int dragStart;
+ protected int clickCount;
+ protected boolean dragged;
+ protected boolean quickCopyDrag;
+ protected boolean control;
+ protected boolean ctrlForRectangularSelection;
+ /* with drag and drop on, a mouse down in a selection does not
+ immediately deselect */
+ protected boolean maybeDragAndDrop;
+
+ //{{{ showCursor() method
+ protected void showCursor()
+ {
+ textArea.getPainter().showCursor();
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/TextAreaPainter.java b/jEdit/org/gjt/sp/jedit/textarea/TextAreaPainter.java
index 2d8eb8b..d30bf2f 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/TextAreaPainter.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/TextAreaPainter.java
@@ -1,1259 +1,1499 @@
-/*
- * TextAreaPainter.java - Paints the text area
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2005 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import javax.swing.text.*;
-import javax.swing.JComponent;
-import java.awt.event.MouseEvent;
-import java.awt.font.*;
-import java.awt.geom.AffineTransform;
-import java.awt.*;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.util.*;
-import org.gjt.sp.jedit.buffer.IndentFoldHandler;
-import org.gjt.sp.jedit.buffer.JEditBuffer;
-import org.gjt.sp.jedit.syntax.Chunk;
-import org.gjt.sp.jedit.syntax.SyntaxStyle;
-import org.gjt.sp.jedit.syntax.Token;
-import org.gjt.sp.jedit.Debug;
-
-import org.gjt.sp.util.Log;
-//}}}
-
-/**
- * The text area painter is the component responsible for displaying the
- * text of the current buffer. The only methods in this class that should
- * be called by plugins are those for adding and removing
- * text area extensions.
- *
- * @see #addExtension(TextAreaExtension)
- * @see #addExtension(int,TextAreaExtension)
- * @see #removeExtension(TextAreaExtension)
- * @see TextAreaExtension
- * @see TextArea
- *
- * @author Slava Pestov
- * @version $Id: TextAreaPainter.java 16233 2009-09-22 22:02:09Z blueyed $
- */
-public class TextAreaPainter extends JComponent implements TabExpander
-{
- //{{{ Layers
- /**
- * The lowest possible layer.
- * @see #addExtension(int,TextAreaExtension)
- * @since jEdit 4.0pre4
- */
- public static final int LOWEST_LAYER = Integer.MIN_VALUE;
-
- /**
- * Below selection layer. The JDiff plugin will use this.
- * @see #addExtension(int,TextAreaExtension)
- * @since jEdit 4.0pre4
- */
- public static final int BACKGROUND_LAYER = -60;
-
- /**
- * The line highlight and collapsed fold highlight layer.
- * @see #addExtension(int,TextAreaExtension)
- * @since jEdit 4.0pre7
- */
- public static final int LINE_BACKGROUND_LAYER = -50;
-
- /**
- * Below selection layer.
- * @see #addExtension(int,TextAreaExtension)
- * @since jEdit 4.0pre4
- */
- public static final int BELOW_SELECTION_LAYER = -40;
-
- /**
- * Selection layer. Most extensions will be above this layer, but some
- * (eg, JDiff) will want to be below the selection.
- * @see #addExtension(int,TextAreaExtension)
- * @since jEdit 4.0pre4
- */
- public static final int SELECTION_LAYER = -30;
-
- /**
- * Wrap guide layer. Most extensions will be above this layer.
- * @since jEdit 4.0pre4
- */
- public static final int WRAP_GUIDE_LAYER = -20;
-
- /**
- * Below most extensions layer.
- * @see #addExtension(int,TextAreaExtension)
- * @since jEdit 4.0pre4
- */
- public static final int BELOW_MOST_EXTENSIONS_LAYER = -10;
-
- /**
- * Default extension layer. This is above the wrap guide but below the
- * structure highlight.
- * @since jEdit 4.0pre4
- */
- public static final int DEFAULT_LAYER = 0;
-
- /**
- * Block caret layer. Most extensions will be below this layer.
- * @since jEdit 4.2pre1
- */
- public static final int BLOCK_CARET_LAYER = 50;
-
- /**
- * Bracket highlight layer. Most extensions will be below this layer.
- * @since jEdit 4.0pre4
- */
- public static final int BRACKET_HIGHLIGHT_LAYER = 100;
-
- /**
- * Text layer. Most extensions will be below this layer.
- * @since jEdit 4.2pre1
- */
- public static final int TEXT_LAYER = 200;
-
- /**
- * Caret layer. Most extensions will be below this layer.
- * @since jEdit 4.2pre1
- */
- public static final int CARET_LAYER = 300;
-
- /**
- * Highest possible layer.
- * @since jEdit 4.0pre4
- */
- public static final int HIGHEST_LAYER = Integer.MAX_VALUE;
- //}}}
-
- //{{{ setBounds() method
- /**
- * It is a bad idea to override this, but we need to get the component
- * event before the first repaint.
- */
- @Override
- public void setBounds(int x, int y, int width, int height)
- {
- if(x == getX() && y == getY() && width == getWidth()
- && height == getHeight())
- {
- return;
- }
-
- super.setBounds(x,y,width,height);
-
- textArea.recalculateVisibleLines();
- if(!textArea.getBuffer().isLoading())
- textArea.recalculateLastPhysicalLine();
- textArea.propertiesChanged();
- textArea.updateMaxHorizontalScrollWidth();
- textArea.scrollBarsInitialized = true;
- } //}}}
-
- //{{{ getFocusTraversalKeysEnabled() method
- /**
- * Makes the tab key work in Java 1.4.
- * @since jEdit 3.2pre4
- */
- @Override
- public boolean getFocusTraversalKeysEnabled()
- {
- return false;
- } //}}}
-
- //{{{ Getters and setters
-
- //{{{ getStyles() method
- /**
- * Returns the syntax styles used to paint colorized text. Entry <i>n</i>
- * will be used to paint tokens with id = <i>n</i>.
- * @return an array of SyntaxStyles
- * @see org.gjt.sp.jedit.syntax.Token
- */
- public final SyntaxStyle[] getStyles()
- {
- return styles;
- } //}}}
-
- //{{{ setStyles() method
- /**
- * Sets the syntax styles used to paint colorized text. Entry <i>n</i>
- * will be used to paint tokens with id = <i>n</i>.
- * @param styles The syntax styles
- * @see org.gjt.sp.jedit.syntax.Token
- */
- public final void setStyles(SyntaxStyle[] styles)
- {
- // assumed this is called after a font render context is set up.
- // changing font render context settings without a setStyles()
- // call will not reset cached monospaced font info.
- fonts.clear();
-
- this.styles = styles;
- styles[Token.NULL] = new SyntaxStyle(getForeground(),null,getFont());
- repaint();
- } //}}}
-
- //{{{ getCaretColor() method
- /**
- * Returns the caret color.
- */
- public final Color getCaretColor()
- {
- return caretColor;
- } //}}}
-
- //{{{ setCaretColor() method
- /**
- * Sets the caret color.
- * @param caretColor The caret color
- */
- public final void setCaretColor(Color caretColor)
- {
- this.caretColor = caretColor;
- if(textArea.getBuffer() != null)
- textArea.invalidateLine(textArea.getCaretLine());
- } //}}}
-
- //{{{ getSelectionColor() method
- /**
- * Returns the selection color.
- */
- public final Color getSelectionColor()
- {
- return selectionColor;
- } //}}}
-
- //{{{ setSelectionColor() method
- /**
- * Sets the selection color.
- * @param selectionColor The selection color
- */
- public final void setSelectionColor(Color selectionColor)
- {
- this.selectionColor = selectionColor;
- textArea.repaint();
- } //}}}
-
- //{{{ getMultipleSelectionColor() method
- /**
- * Returns the multiple selection color.
- * @since jEdit 4.2pre1
- */
- public final Color getMultipleSelectionColor()
- {
- return multipleSelectionColor;
- } //}}}
-
- //{{{ setMultipleSelectionColor() method
- /**
- * Sets the multiple selection color.
- * @param multipleSelectionColor The multiple selection color
- * @since jEdit 4.2pre1
- */
- public final void setMultipleSelectionColor(Color multipleSelectionColor)
- {
- this.multipleSelectionColor = multipleSelectionColor;
- textArea.repaint();
- } //}}}
-
- //{{{ getLineHighlightColor() method
- /**
- * Returns the line highlight color.
- */
- public final Color getLineHighlightColor()
- {
- return lineHighlightColor;
- } //}}}
-
- //{{{ setLineHighlightColor() method
- /**
- * Sets the line highlight color.
- * @param lineHighlightColor The line highlight color
- */
- public final void setLineHighlightColor(Color lineHighlightColor)
- {
- this.lineHighlightColor = lineHighlightColor;
- if(textArea.getBuffer() != null)
- textArea.invalidateLine(textArea.getCaretLine());
- } //}}}
-
- //{{{ isLineHighlightEnabled() method
- /**
- * Returns true if line highlight is enabled, false otherwise.
- */
- public final boolean isLineHighlightEnabled()
- {
- return lineHighlight;
- } //}}}
-
- //{{{ setLineHighlightEnabled() method
- /**
- * Enables or disables current line highlighting.
- * @param lineHighlight True if current line highlight should be enabled,
- * false otherwise
- */
- public final void setLineHighlightEnabled(boolean lineHighlight)
- {
- this.lineHighlight = lineHighlight;
- textArea.repaint();
- } //}}}
-
- //{{{ getStructureHighlightColor() method
- /**
- * Returns the structure highlight color.
- * @since jEdit 4.2pre3
- */
- public final Color getStructureHighlightColor()
- {
- return structureHighlightColor;
- } //}}}
-
- //{{{ setStructureHighlightColor() method
- /**
- * Sets the structure highlight color.
- * @param structureHighlightColor The bracket highlight color
- * @since jEdit 4.2pre3
- */
- public final void setStructureHighlightColor(
- Color structureHighlightColor)
- {
- this.structureHighlightColor = structureHighlightColor;
- textArea.invalidateStructureMatch();
- } //}}}
-
- //{{{ isStructureHighlightEnabled() method
- /**
- * Returns true if structure highlighting is enabled, false otherwise.
- * @since jEdit 4.2pre3
- */
- public final boolean isStructureHighlightEnabled()
- {
- return structureHighlight;
- } //}}}
-
- //{{{ setStructureHighlightEnabled() method
- /**
- * Enables or disables structure highlighting.
- * @param structureHighlight True if structure highlighting should be
- * enabled, false otherwise
- * @since jEdit 4.2pre3
- */
- public final void setStructureHighlightEnabled(boolean structureHighlight)
- {
- this.structureHighlight = structureHighlight;
- textArea.invalidateStructureMatch();
- } //}}}
-
- //{{{ isBlockCaretEnabled() method
- /**
- * Returns true if the caret should be drawn as a block, false otherwise.
- */
- public final boolean isBlockCaretEnabled()
- {
- return blockCaret;
- } //}}}
-
- //{{{ setBlockCaretEnabled() method
- /**
- * Sets if the caret should be drawn as a block, false otherwise.
- * @param blockCaret True if the caret should be drawn as a block,
- * false otherwise.
- */
- public final void setBlockCaretEnabled(boolean blockCaret)
- {
- this.blockCaret = blockCaret;
- extensionMgr.removeExtension(caretExtension);
- if(blockCaret)
- addExtension(BLOCK_CARET_LAYER,caretExtension);
- else
- addExtension(CARET_LAYER,caretExtension);
- if(textArea.getBuffer() != null)
- textArea.invalidateLine(textArea.getCaretLine());
- } //}}}
-
- //{{{ isThickCaretEnabled() method
- /**
- * Returns true if the caret should be drawn with a thick line, false otherwise.
- * @since jEdit 4.3pre15
- */
- public final boolean isThickCaretEnabled()
- {
- return thickCaret;
- } //}}}
-
- //{{{ setThickCaretEnabled() method
- /**
- * Sets if the caret should be drawn with a thick line.
- * @param thickCaret
- * True if the caret should be drawn as a block, false otherwise.
- * @since jEdit 4.3pre15
- */
- public final void setThickCaretEnabled(boolean thickCaret)
- {
- this.thickCaret = thickCaret;
- if(textArea.getBuffer() != null)
- textArea.invalidateLine(textArea.getCaretLine());
- } //}}}
-
- //{{{ getEOLMarkerColor() method
- /**
- * Returns the EOL marker color.
- */
- public final Color getEOLMarkerColor()
- {
- return eolMarkerColor;
- } //}}}
-
- //{{{ setEOLMarkerColor() method
- /**
- * Sets the EOL marker color.
- * @param eolMarkerColor The EOL marker color
- */
- public final void setEOLMarkerColor(Color eolMarkerColor)
- {
- this.eolMarkerColor = eolMarkerColor;
- repaint();
- } //}}}
-
- //{{{ getEOLMarkersPainted() method
- /**
- * Returns true if EOL markers are drawn, false otherwise.
- */
- public final boolean getEOLMarkersPainted()
- {
- return eolMarkers;
- } //}}}
-
- //{{{ setEOLMarkersPainted() method
- /**
- * Sets if EOL markers are to be drawn.
- * @param eolMarkers True if EOL markers should be drawn, false otherwise
- */
- public final void setEOLMarkersPainted(boolean eolMarkers)
- {
- this.eolMarkers = eolMarkers;
- repaint();
- } //}}}
-
- //{{{ getWrapGuideColor() method
- /**
- * Returns the wrap guide color.
- */
- public final Color getWrapGuideColor()
- {
- return wrapGuideColor;
- } //}}}
-
- //{{{ setWrapGuideColor() method
- /**
- * Sets the wrap guide color.
- * @param wrapGuideColor The wrap guide color
- */
- public final void setWrapGuideColor(Color wrapGuideColor)
- {
- this.wrapGuideColor = wrapGuideColor;
- repaint();
- } //}}}
-
- //{{{ isWrapGuidePainted() method
- /**
- * Returns true if the wrap guide is drawn, false otherwise.
- * @since jEdit 4.0pre4
- */
- public final boolean isWrapGuidePainted()
- {
- return wrapGuide;
- } //}}}
-
- //{{{ setWrapGuidePainted() method
- /**
- * Sets if the wrap guide is to be drawn.
- * @param wrapGuide True if the wrap guide should be drawn, false otherwise
- */
- public final void setWrapGuidePainted(boolean wrapGuide)
- {
- this.wrapGuide = wrapGuide;
- repaint();
- } //}}}
-
- //{{{ getFoldLineStyle() method
- /**
- * Returns the fold line style. The first element is the style for
- * lines with a fold level greater than 3. The remaining elements
- * are for fold levels 1 to 3.
- */
- public final SyntaxStyle[] getFoldLineStyle()
- {
- return foldLineStyle;
- } //}}}
-
- //{{{ setFoldLineStyle() method
- /**
- * Sets the fold line style. The first element is the style for
- * lines with a fold level greater than 3. The remaining elements
- * are for fold levels 1 to 3.
- * @param foldLineStyle The fold line style
- */
- public final void setFoldLineStyle(SyntaxStyle[] foldLineStyle)
- {
- this.foldLineStyle = foldLineStyle;
- repaint();
- } //}}}
-
- //{{{ setAntiAliasEnabled() method
- /**
- * @deprecated use setAntiAlias(AntiAlias newMode)
- */
- @Deprecated
- public void setAntiAliasEnabled(boolean isEnabled)
- {
- setAntiAlias(new AntiAlias(isEnabled));
- }
- /**
- * As of jEdit 4.3pre4, a new JDK 1.6 subpixel antialias mode is supported.
- *
- * @since jEdit 4.2pre4
- */
- public void setAntiAlias(AntiAlias newValue)
- {
- antiAlias = newValue;
- updateRenderingHints();
- } //}}}
-
- /**
- * @return the AntiAlias value that is currently used for TextAreas.
- * @since jedit 4.3pre4
- */
- public AntiAlias getAntiAlias()
- {
- return antiAlias;
- }
-
- //{{{ isAntiAliasEnabled() method
- /**
- * Returns if anti-aliasing is enabled.
- * @since jEdit 3.2pre6
- * @deprecated - use @ref getAntiAlias()
- */
- @Deprecated
- public boolean isAntiAliasEnabled()
- {
- return antiAlias.val() > 0;
- } //}}}
-
- //{{{ setFractionalFontMetricsEnabled() method
- /**
- * Sets if fractional font metrics should be enabled. Has no effect when
- * running on Java 1.1.
- * @since jEdit 3.2pre6
- */
- public void setFractionalFontMetricsEnabled(boolean fracFontMetrics)
- {
- this.fracFontMetrics = fracFontMetrics;
- updateRenderingHints();
- } //}}}
-
- //{{{ isFractionalFontMetricsEnabled() method
- /**
- * Returns if fractional font metrics are enabled.
- * @since jEdit 3.2pre6
- */
- public boolean isFractionalFontMetricsEnabled()
- {
- return fracFontMetrics;
- } //}}}
-
- //{{{ getFontRenderContext() method
- /**
- * Returns the font render context.
- * @since jEdit 4.0pre4
- */
- public FontRenderContext getFontRenderContext()
- {
- return fontRenderContext;
- } //}}}
-
- //}}}
-
- //{{{ addExtension() method
- /**
- * Adds a text area extension, which can perform custom painting and
- * tool tip handling.
- * @param extension The extension
- * @since jEdit 4.0pre4
- */
- public void addExtension(TextAreaExtension extension)
- {
- extensionMgr.addExtension(DEFAULT_LAYER,extension);
- repaint();
- } //}}}
-
- //{{{ addExtension() method
- /**
- * Adds a text area extension, which can perform custom painting and
- * tool tip handling.
- * @param layer The layer to add the extension to. Note that more than
- * extension can share the same layer.
- * @param extension The extension
- * @since jEdit 4.0pre4
- */
- public void addExtension(int layer, TextAreaExtension extension)
- {
- extensionMgr.addExtension(layer,extension);
- repaint();
- } //}}}
-
- //{{{ removeExtension() method
- /**
- * Removes a text area extension. It will no longer be asked to
- * perform custom painting and tool tip handling.
- * @param extension The extension
- * @since jEdit 4.0pre4
- */
- public void removeExtension(TextAreaExtension extension)
- {
- extensionMgr.removeExtension(extension);
- repaint();
- } //}}}
-
- //{{{ getExtensions() method
- /**
- * Returns an array of registered text area extensions. Useful for
- * debugging purposes.
- * @since jEdit 4.1pre5
- */
- public TextAreaExtension[] getExtensions()
- {
- return extensionMgr.getExtensions();
- } //}}}
-
- //{{{ getToolTipText() method
- /**
- * Returns the tool tip to display at the specified location.
- * @param evt The mouse event
- */
- @Override
- public String getToolTipText(MouseEvent evt)
- {
- if(textArea.getBuffer().isLoading())
- return null;
-
- return extensionMgr.getToolTipText(evt.getX(),evt.getY());
- } //}}}
-
- //{{{ getFontMetrics() method
- /**
- * Returns the font metrics used by this component.
- */
- public FontMetrics getFontMetrics()
- {
- return fm;
- } //}}}
-
- //{{{ setFont() method
- /**
- * Sets the font for this component. This is overridden to update the
- * cached font metrics and to recalculate which lines are visible.
- * @param font The font
- */
- @Override
- public void setFont(Font font)
- {
- super.setFont(font);
- fm = getFontMetrics(font);
- textArea.recalculateVisibleLines();
- if(textArea.getBuffer() != null
- && !textArea.getBuffer().isLoading())
- textArea.recalculateLastPhysicalLine();
- //textArea.propertiesChanged();
- } //}}}
-
- //{{{ getStringWidth() method
- /**
- * Returns the width of the given string, in pixels, using the text
- * area's current font.
- *
- * @since jEdit 4.2final
- */
- public float getStringWidth(String str)
- {
- if(textArea.charWidth != 0)
- return textArea.charWidth * str.length();
- else
- {
- return (float)getFont().getStringBounds(
- str,getFontRenderContext()).getWidth();
- }
- } //}}}
-
- //{{{ update() method
- /**
- * Repaints the text.
- * @param _gfx The graphics context
- */
- @Override
- public void update(Graphics _gfx)
- {
- paint(_gfx);
- } //}}}
-
- //{{{ paint() method
- /**
- * Repaints the text.
- * @param _gfx The graphics context
- */
- @Override
- public void paint(Graphics _gfx)
- {
- assert _gfx instanceof Graphics2D;
- Graphics2D gfx = (Graphics2D)_gfx;
- gfx.setRenderingHints(renderingHints);
- fontRenderContext = gfx.getFontRenderContext();
-
- Rectangle clipRect = gfx.getClipBounds();
- int lineHeight = fm.getHeight();
- if(lineHeight == 0 || textArea.getBuffer().isLoading())
- {
- gfx.setColor(getBackground());
- gfx.fillRect(clipRect.x,clipRect.y,clipRect.width,clipRect.height);
- }
- else
- {
- long prepareTime = System.nanoTime();
- // Because the clipRect's height is usually an even multiple
- // of the font height, we subtract 1 from it, otherwise one
- // too many lines will always be painted.
- int firstLine = clipRect.y / lineHeight;
- int lastLine = (clipRect.y + clipRect.height - 1) / lineHeight;
- gfx.setColor(getBackground());
- gfx.setFont(getFont());
- prepareTime = System.nanoTime() - prepareTime;
-
- long linesTime = System.nanoTime();
- int numLines = lastLine - firstLine + 1;
- int y = firstLine * lineHeight;
- gfx.fillRect(0,y,getWidth(),numLines * lineHeight);
- extensionMgr.paintScreenLineRange(textArea,gfx,
- firstLine,lastLine,y,lineHeight);
- linesTime = System.nanoTime() - linesTime;
-
- if(Debug.PAINT_TIMER && numLines >= 1)
- Log.log(Log.DEBUG,this,"repainting " + numLines + " lines took " + prepareTime + "/" + linesTime + " ns");
- }
-
- textArea.updateMaxHorizontalScrollWidth();
- } //}}}
-
- //{{{ nextTabStop() method
- /**
- * Implementation of TabExpander interface. Returns next tab stop after
- * a specified point.
- * @param x The x co-ordinate
- * @param tabOffset Ignored
- * @return The next tab stop after <i>x</i>
- */
- public float nextTabStop(float x, int tabOffset)
- {
- int ntabs = (int)(x / textArea.tabSize);
- return (ntabs + 1) * textArea.tabSize;
- } //}}}
-
- //{{{ getPreferredSize() method
- /**
- * Returns the painter's preferred size.
- */
- @Override
- public Dimension getPreferredSize()
- {
- Dimension dim = new Dimension();
-
- char[] foo = new char[80];
- for(int i = 0; i < foo.length; i++)
- foo[i] = ' ';
- dim.width = (int)getStringWidth(new String(foo));
- dim.height = fm.getHeight() * 25;
- return dim;
- } //}}}
-
- //{{{ getMinimumSize() method
- /**
- * Returns the painter's minimum size.
- */
- @Override
- public Dimension getMinimumSize()
- {
- return getPreferredSize();
- } //}}}
-
- //{{{ Package-private members
-
- //{{{ Instance variables
- /* package-private since they are accessed by inner classes and we
- * want this to be fast */
- TextArea textArea;
-
- SyntaxStyle[] styles;
- Color caretColor;
- Color selectionColor;
- Color multipleSelectionColor;
- Color lineHighlightColor;
- Color structureHighlightColor;
- Color eolMarkerColor;
- Color wrapGuideColor;
-
- SyntaxStyle[] foldLineStyle;
-
- boolean blockCaret;
- boolean thickCaret;
- boolean lineHighlight;
- boolean structureHighlight;
- boolean eolMarkers;
- boolean wrapGuide;
- AntiAlias antiAlias;
- boolean fracFontMetrics;
- RenderingHints renderingHints;
- // should try to use this as little as possible.
- FontMetrics fm;
- //}}}
-
- //{{{ TextAreaPainter constructor
- /**
- * Creates a new painter. Do not create instances of this class
- * directly.
- */
- TextAreaPainter(TextArea textArea)
- {
- enableEvents(AWTEvent.FOCUS_EVENT_MASK
- | AWTEvent.KEY_EVENT_MASK
- | AWTEvent.MOUSE_EVENT_MASK);
-
- this.textArea = textArea;
- antiAlias = new AntiAlias(0);
- fonts = new HashMap();
- extensionMgr = new ExtensionManager();
-
- setAutoscrolls(true);
- setOpaque(true);
- setRequestFocusEnabled(false);
- setDoubleBuffered(false);
-
- setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
-
- fontRenderContext = new FontRenderContext(null,false,false);
-
- addExtension(LINE_BACKGROUND_LAYER,new PaintLineBackground());
- addExtension(SELECTION_LAYER,new PaintSelection());
- addExtension(WRAP_GUIDE_LAYER,new PaintWrapGuide());
- addExtension(BRACKET_HIGHLIGHT_LAYER,new StructureMatcher
- .Highlight(textArea));
- addExtension(TEXT_LAYER,new PaintText());
- caretExtension = new PaintCaret();
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private final ExtensionManager extensionMgr;
- private final PaintCaret caretExtension;
- private FontRenderContext fontRenderContext;
- private final Map fonts;
- //}}}
-
- private static Object sm_hrgbRender;
- private static Constructor<FontRenderContext> sm_frcConstructor;
-
- static
- {
- try
- {
- Field f = RenderingHints.class.getField("VALUE_TEXT_ANTIALIAS_LCD_HRGB");
- sm_hrgbRender = f.get(null);
- Class[] fracFontMetricsTypeList = {AffineTransform.class, Object.class, Object.class};
- sm_frcConstructor = FontRenderContext.class.getConstructor(fracFontMetricsTypeList);
- }
- catch (NullPointerException npe) {}
- catch (SecurityException se) {}
- catch (NoSuchFieldException nsfe) {}
- catch (IllegalArgumentException iae) {}
- catch (IllegalAccessException iae) {}
- catch (NoSuchMethodException nsme) {}
- }
- //{{{ updateRenderingHints() method
- private void updateRenderingHints()
- {
- Map<RenderingHints.Key,Object> hints = new HashMap<RenderingHints.Key,Object>();
-
- hints.put(RenderingHints.KEY_FRACTIONALMETRICS,
- fracFontMetrics ? RenderingHints.VALUE_FRACTIONALMETRICS_ON
- : RenderingHints.VALUE_FRACTIONALMETRICS_OFF);
-
- if (antiAlias.val() == 0)
- {
- hints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
- fontRenderContext = new FontRenderContext(null, antiAlias.val() > 0, fracFontMetrics);
- }
- /** LCD HRGB mode - works with JRE 1.6 only, which is why we use reflection */
- else if (antiAlias.val() == 2 && sm_hrgbRender != null )
- {
- hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, sm_hrgbRender);
- Object fontRenderHint = fracFontMetrics ?
- RenderingHints.VALUE_FRACTIONALMETRICS_ON :
- RenderingHints.VALUE_FRACTIONALMETRICS_OFF;
- Object[] paramList = {null, sm_hrgbRender, fontRenderHint};
- try
- {
- fontRenderContext = sm_frcConstructor.newInstance(paramList);
- }
- catch (Exception e)
- {
- fontRenderContext = new FontRenderContext(null, antiAlias.val() > 0, fracFontMetrics);
- }
- }
- else /** Standard Antialias Version */
- {
- hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
- hints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
- fontRenderContext = new FontRenderContext(null, antiAlias.val() > 0, fracFontMetrics);
- }
-
- renderingHints = new RenderingHints(hints);
-
-
- } //}}}
-
- //}}}
-
- //{{{ Inner classes
-
- //{{{ PaintLineBackground class
- private class PaintLineBackground extends TextAreaExtension
- {
- //{{{ shouldPaintLineHighlight() method
- private boolean shouldPaintLineHighlight(int caret, int start, int end)
- {
- if(!isLineHighlightEnabled()
- || caret < start || caret >= end)
- {
- return false;
- }
-
- int count = textArea.getSelectionCount();
- if(count == 1)
- {
- Selection s = textArea.getSelection(0);
- return s.getStartLine() == s.getEndLine();
- }
- else
- return count == 0;
- } //}}}
-
- //{{{ paintValidLine() method
- @Override
- public void paintValidLine(Graphics2D gfx, int screenLine,
- int physicalLine, int start, int end, int y)
- {
- // minimise access$ methods
- TextArea textArea = TextAreaPainter.this.textArea;
- JEditBuffer buffer = textArea.getBuffer();
-
- //{{{ Paint line highlight and collapsed fold highlight
- boolean collapsedFold =
- physicalLine < buffer.getLineCount() - 1
- && buffer.isFoldStart(physicalLine)
- && !textArea.displayManager
- .isLineVisible(physicalLine + 1);
-
- SyntaxStyle foldLineStyle = null;
- if(collapsedFold)
- {
- int level = buffer.getFoldLevel(physicalLine + 1);
- if(buffer.getFoldHandler() instanceof IndentFoldHandler)
- level = Math.max(1,level / buffer.getIndentSize());
- if(level > 3)
- level = 0;
- foldLineStyle = TextAreaPainter.this.foldLineStyle[level];
- }
-
- int caret = textArea.getCaretPosition();
- boolean paintLineHighlight = shouldPaintLineHighlight(
- caret,start,end);
-
- Color bgColor;
- if(paintLineHighlight)
- bgColor = lineHighlightColor;
- else if(collapsedFold)
- {
- bgColor = foldLineStyle.getBackgroundColor();
- if(bgColor == null)
- bgColor = getBackground();
- }
- else
- bgColor = getBackground();
-
- if(paintLineHighlight || collapsedFold)
- {
- gfx.setColor(bgColor);
- gfx.fillRect(0,y,getWidth(),fm.getHeight());
- } //}}}
-
- //{{{ Paint token backgrounds
- ChunkCache.LineInfo lineInfo = textArea.chunkCache
- .getLineInfo(screenLine);
-
- if(lineInfo.chunks != null)
- {
- float baseLine = y + fm.getHeight()
- - (fm.getLeading()+1) - fm.getDescent();
- Chunk.paintChunkBackgrounds(
- lineInfo.chunks,gfx,
- textArea.getHorizontalOffset(),
- baseLine);
- } //}}}
- } //}}}
- } //}}}
-
- //{{{ PaintSelection class
- private class PaintSelection extends TextAreaExtension
- {
- //{{{ paintValidLine() method
- @Override
- public void paintValidLine(Graphics2D gfx, int screenLine,
- int physicalLine, int start, int end, int y)
- {
- if(textArea.getSelectionCount() == 0)
- return;
-
- gfx.setColor(textArea.isMultipleSelectionEnabled()
- ? getMultipleSelectionColor()
- : getSelectionColor());
-
- Iterator<Selection> iter = textArea.getSelectionIterator();
- while(iter.hasNext())
- {
- Selection s = iter.next();
- paintSelection(gfx,screenLine,physicalLine,y,s);
- }
- } //}}}
-
- //{{{ paintSelection() method
- private void paintSelection(Graphics2D gfx, int screenLine,
- int physicalLine, int y, Selection s)
- {
- int[] selectionStartAndEnd
- = textArea.selectionManager
- .getSelectionStartAndEnd(
- screenLine,physicalLine,s);
- if(selectionStartAndEnd == null)
- return;
-
- int x1 = selectionStartAndEnd[0];
- int x2 = selectionStartAndEnd[1];
-
- gfx.fillRect(x1,y,x2 - x1,fm.getHeight());
- } //}}}
- } //}}}
-
- //{{{ PaintWrapGuide class
- private class PaintWrapGuide extends TextAreaExtension
- {
- @Override
- public void paintScreenLineRange(Graphics2D gfx, int firstLine,
- int lastLine, int[] physicalLines, int[] start,
- int[] end, int y, int lineHeight)
- {
- if(textArea.wrapMargin != 0
- && !textArea.wrapToWidth
- && isWrapGuidePainted())
- {
- gfx.setColor(getWrapGuideColor());
- int x = textArea.getHorizontalOffset()
- + textArea.wrapMargin;
- gfx.drawLine(x,y,x,y + (lastLine - firstLine
- + 1) * lineHeight);
- }
- }
-
- @Override
- public String getToolTipText(int x, int y)
- {
- if(textArea.wrapMargin != 0
- && !textArea.wrapToWidth
- && isWrapGuidePainted())
- {
- int wrapGuidePos = textArea.wrapMargin
- + textArea.getHorizontalOffset();
- if(Math.abs(x - wrapGuidePos) < 5)
- {
- return String.valueOf(textArea.getBuffer()
- .getProperty("maxLineLen"));
- }
- }
-
- return null;
- }
- } //}}}
-
- //{{{ PaintText class
- private class PaintText extends TextAreaExtension
- {
- @Override
- public void paintValidLine(Graphics2D gfx, int screenLine,
- int physicalLine, int start, int end, int y)
- {
- ChunkCache.LineInfo lineInfo = textArea.chunkCache
- .getLineInfo(screenLine);
-
- Font defaultFont = getFont();
- Color defaultColor = getForeground();
-
- gfx.setFont(defaultFont);
- gfx.setColor(defaultColor);
-
- int x = textArea.getHorizontalOffset();
- int originalX = x;
-
- float baseLine = y + fm.getHeight()
- - (fm.getLeading()+1) - fm.getDescent();
-
- if(lineInfo.chunks != null)
- {
- x += Chunk.paintChunkList(lineInfo.chunks,
- gfx,textArea.getHorizontalOffset(),
- baseLine,!Debug.DISABLE_GLYPH_VECTOR);
- }
-
- JEditBuffer buffer = textArea.getBuffer();
-
- if(!lineInfo.lastSubregion)
- {
- gfx.setFont(defaultFont);
- gfx.setColor(eolMarkerColor);
- gfx.drawString(":",Math.max(x,
- textArea.getHorizontalOffset()
- + textArea.wrapMargin + textArea.charWidth),
- baseLine);
- x += textArea.charWidth;
- }
- else if(physicalLine < buffer.getLineCount() - 1
- && buffer.isFoldStart(physicalLine)
- && !textArea.displayManager
- .isLineVisible(physicalLine + 1))
- {
- int level = buffer.getFoldLevel(physicalLine + 1);
- if(buffer.getFoldHandler() instanceof IndentFoldHandler)
- level = Math.max(1,level / buffer.getIndentSize());
- if(level > 3)
- level = 0;
- SyntaxStyle foldLineStyle = TextAreaPainter.this.foldLineStyle[level];
-
- Font font = foldLineStyle.getFont();
- gfx.setFont(font);
- gfx.setColor(foldLineStyle.getForegroundColor());
-
- int nextLine;
- int nextScreenLine = screenLine + 1;
- if(nextScreenLine < textArea.getVisibleLines())
- {
- nextLine = textArea.chunkCache.getLineInfo(nextScreenLine)
- .physicalLine;
- }
- else
- {
- nextLine = textArea.displayManager
- .getNextVisibleLine(physicalLine);
- }
-
- if(nextLine == -1)
- nextLine = textArea.getLineCount();
-
- int count = nextLine - physicalLine - 1;
- String str = " [" + count + " lines]";
-
- float width = getStringWidth(str);
-
- gfx.drawString(str,x,baseLine);
- x += width;
- }
- else if(eolMarkers)
- {
- gfx.setFont(defaultFont);
- gfx.setColor(eolMarkerColor);
- gfx.drawString(".",x,baseLine);
- x += textArea.charWidth;
- }
-
- lineInfo.width = x - originalX;
- }
- } //}}}
-
- //{{{ PaintCaret class
- private class PaintCaret extends TextAreaExtension
- {
- @Override
- public void paintValidLine(Graphics2D gfx, int screenLine,
- int physicalLine, int start, int end, int y)
- {
- if(!textArea.isCaretVisible())
- return;
-
- int caret = textArea.getCaretPosition();
- if(caret < start || caret >= end)
- return;
-
- int offset = caret - textArea.getLineStartOffset(physicalLine);
- textArea.offsetToXY(physicalLine,
- offset, textArea.offsetXY);
- int caretX = textArea.offsetXY.x;
- int lineHeight = fm.getHeight();
-
- gfx.setColor(caretColor);
-
- if(textArea.isOverwriteEnabled())
- {
- gfx.drawLine(caretX,y + lineHeight - 1,
- caretX + textArea.charWidth,
- y + lineHeight - 1);
- }
- else if(blockCaret)
- gfx.drawRect(caretX,y,textArea.charWidth - 1,
- lineHeight - 1);
- else
- {
- if (thickCaret)
- gfx.drawRect(caretX, y,
- 1, lineHeight - 1);
- else
- gfx.drawLine(caretX,y,
- caretX,y + lineHeight - 1);
- }
- }
- } //}}}
-
- //}}}
-}
+/*
+ * TextAreaPainter.java - Paints the text area
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2005 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import javax.swing.text.*;
+import javax.swing.JComponent;
+
+import java.awt.event.MouseEvent;
+import java.awt.font.*;
+import java.awt.geom.AffineTransform;
+import java.awt.*;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.util.*;
+import org.gjt.sp.jedit.buffer.IndentFoldHandler;
+import org.gjt.sp.jedit.buffer.JEditBuffer;
+import org.gjt.sp.jedit.syntax.Chunk;
+import org.gjt.sp.jedit.syntax.DefaultTokenHandler;
+import org.gjt.sp.jedit.syntax.SyntaxStyle;
+import org.gjt.sp.jedit.syntax.Token;
+import org.gjt.sp.jedit.Debug;
+
+import org.gjt.sp.util.Log;
+//}}}
+
+/**
+ * The text area painter is the component responsible for displaying the
+ * text of the current buffer. The only methods in this class that should
+ * be called by plugins are those for adding and removing
+ * text area extensions.
+ *
+ * @see #addExtension(TextAreaExtension)
+ * @see #addExtension(int,TextAreaExtension)
+ * @see #removeExtension(TextAreaExtension)
+ * @see TextAreaExtension
+ * @see TextArea
+ *
+ * @author Slava Pestov
+ * @version $Id: TextAreaPainter.java 18575 2010-09-18 08:48:27Z shlomy $
+ */
+public class TextAreaPainter extends JComponent implements TabExpander
+{
+ //{{{ Layers
+ /**
+ * The lowest possible layer.
+ * @see #addExtension(int,TextAreaExtension)
+ * @since jEdit 4.0pre4
+ */
+ public static final int LOWEST_LAYER = Integer.MIN_VALUE;
+
+ /**
+ * Below selection layer. The JDiff plugin will use this.
+ * @see #addExtension(int,TextAreaExtension)
+ * @since jEdit 4.0pre4
+ */
+ public static final int BACKGROUND_LAYER = -60;
+
+ /**
+ * The line highlight and collapsed fold highlight layer.
+ * @see #addExtension(int,TextAreaExtension)
+ * @since jEdit 4.0pre7
+ */
+ public static final int LINE_BACKGROUND_LAYER = -50;
+
+ /**
+ * Below selection layer.
+ * @see #addExtension(int,TextAreaExtension)
+ * @since jEdit 4.0pre4
+ */
+ public static final int BELOW_SELECTION_LAYER = -40;
+
+ /**
+ * Selection layer. Most extensions will be above this layer, but some
+ * (eg, JDiff) will want to be below the selection.
+ * @see #addExtension(int,TextAreaExtension)
+ * @since jEdit 4.0pre4
+ */
+ public static final int SELECTION_LAYER = -30;
+
+ /**
+ * Wrap guide layer. Most extensions will be above this layer.
+ * @since jEdit 4.0pre4
+ */
+ public static final int WRAP_GUIDE_LAYER = -20;
+
+ /**
+ * Below most extensions layer.
+ * @see #addExtension(int,TextAreaExtension)
+ * @since jEdit 4.0pre4
+ */
+ public static final int BELOW_MOST_EXTENSIONS_LAYER = -10;
+
+ /**
+ * Default extension layer. This is above the wrap guide but below the
+ * structure highlight.
+ * @since jEdit 4.0pre4
+ */
+ public static final int DEFAULT_LAYER = 0;
+
+ /**
+ * Block caret layer. Most extensions will be below this layer.
+ * @since jEdit 4.2pre1
+ */
+ public static final int BLOCK_CARET_LAYER = 50;
+
+ /**
+ * Bracket highlight layer. Most extensions will be below this layer.
+ * @since jEdit 4.0pre4
+ */
+ public static final int BRACKET_HIGHLIGHT_LAYER = 100;
+
+ /**
+ * Text layer. Most extensions will be below this layer.
+ * @since jEdit 4.2pre1
+ */
+ public static final int TEXT_LAYER = 200;
+
+ /**
+ * Caret layer. Most extensions will be below this layer.
+ * @since jEdit 4.2pre1
+ */
+ public static final int CARET_LAYER = 300;
+
+ /**
+ * Highest possible layer.
+ * @since jEdit 4.0pre4
+ */
+ public static final int HIGHEST_LAYER = Integer.MAX_VALUE;
+ //}}}
+
+ //{{{ setBounds() method
+ /**
+ * It is a bad idea to override this, but we need to get the component
+ * event before the first repaint.
+ */
+ @Override
+ public void setBounds(int x, int y, int width, int height)
+ {
+ if(x == getX() && y == getY() && width == getWidth()
+ && height == getHeight())
+ {
+ return;
+ }
+
+ super.setBounds(x,y,width,height);
+
+ textArea.recalculateVisibleLines();
+ if(!textArea.getBuffer().isLoading())
+ textArea.recalculateLastPhysicalLine();
+ textArea.propertiesChanged();
+ textArea.updateMaxHorizontalScrollWidth();
+ textArea.scrollBarsInitialized = true;
+ } //}}}
+
+ //{{{ addNotify() method
+ @Override
+ public void addNotify()
+ {
+ super.addNotify();
+ hiddenCursor = getToolkit().createCustomCursor(
+ getGraphicsConfiguration()
+ .createCompatibleImage(16,16,
+ Transparency.BITMASK),
+ new Point(0,0),"Hidden");
+ } //}}}
+
+ //{{{ setCursor() method
+ /**
+ * Change the mouse cursor.
+ * If the cursor is hiddenCursor or TEXT_CURSOR, it is the default cursor and the cursor will not disappear
+ * anymore while typing until {@link #resetCursor()} is called.
+ * @param cursor the new cursor
+ * @since jEdit 4.4pre1
+ */
+ public void setCursor(Cursor cursor)
+ {
+ defaultCursor = cursor == hiddenCursor || cursor.getType() == Cursor.TEXT_CURSOR;
+ super.setCursor(cursor);
+ } //}}}
+
+ //{{{ setCursor() method
+ /**
+ * Reset the cursor to it's default value.
+ * @since jEdit 4.4pre1
+ */
+ public void resetCursor()
+ {
+ defaultCursor = true;
+ } //}}}
+
+ //{{{ showCursor() method
+ /**
+ * Show the cursor if it is the default cursor
+ */
+ void showCursor()
+ {
+ if (defaultCursor)
+ {
+ setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
+ }
+ } //}}}
+
+ //{{{ hideCursor() method
+ /**
+ * Hide the cursor if it is the default cursor
+ */
+ void hideCursor()
+ {
+ if (defaultCursor)
+ {
+ setCursor(hiddenCursor);
+ }
+ } //}}}
+
+
+ //{{{ getFocusTraversalKeysEnabled() method
+ /**
+ * Makes the tab key work in Java 1.4.
+ * @since jEdit 3.2pre4
+ */
+ @Override
+ public boolean getFocusTraversalKeysEnabled()
+ {
+ return false;
+ } //}}}
+
+ //{{{ Getters and setters
+
+ //{{{ getStyles() method
+ /**
+ * Returns the syntax styles used to paint colorized text. Entry <i>n</i>
+ * will be used to paint tokens with id = <i>n</i>.
+ * @return an array of SyntaxStyles
+ * @see org.gjt.sp.jedit.syntax.Token
+ */
+ public final SyntaxStyle[] getStyles()
+ {
+ return styles;
+ } //}}}
+
+ //{{{ setStyles() method
+ /**
+ * Sets the syntax styles used to paint colorized text. Entry <i>n</i>
+ * will be used to paint tokens with id = <i>n</i>.
+ * @param styles The syntax styles
+ * @see org.gjt.sp.jedit.syntax.Token
+ */
+ public final void setStyles(SyntaxStyle[] styles)
+ {
+ // assumed this is called after a font render context is set up.
+ // changing font render context settings without a setStyles()
+ // call will not reset cached monospaced font info.
+ fonts.clear();
+
+ this.styles = styles;
+ styles[Token.NULL] = new SyntaxStyle(getForeground(),null,getFont());
+ repaint();
+ } //}}}
+
+ //{{{ getCaretColor() method
+ /**
+ * Returns the caret color.
+ */
+ public final Color getCaretColor()
+ {
+ return caretColor;
+ } //}}}
+
+ //{{{ setCaretColor() method
+ /**
+ * Sets the caret color.
+ * @param caretColor The caret color
+ */
+ public final void setCaretColor(Color caretColor)
+ {
+ this.caretColor = caretColor;
+ if(textArea.getBuffer() != null)
+ textArea.invalidateLine(textArea.getCaretLine());
+ } //}}}
+
+ //{{{ getSelectionColor() method
+ /**
+ * Returns the selection color.
+ */
+ public final Color getSelectionColor()
+ {
+ return selectionColor;
+ } //}}}
+
+ //{{{ setSelectionColor() method
+ /**
+ * Sets the selection color.
+ * @param selectionColor The selection color
+ */
+ public final void setSelectionColor(Color selectionColor)
+ {
+ this.selectionColor = selectionColor;
+ textArea.repaint();
+ } //}}}
+
+ //{{{ getMultipleSelectionColor() method
+ /**
+ * Returns the multiple selection color.
+ * @since jEdit 4.2pre1
+ */
+ public final Color getMultipleSelectionColor()
+ {
+ return multipleSelectionColor;
+ } //}}}
+
+ //{{{ setMultipleSelectionColor() method
+ /**
+ * Sets the multiple selection color.
+ * @param multipleSelectionColor The multiple selection color
+ * @since jEdit 4.2pre1
+ */
+ public final void setMultipleSelectionColor(Color multipleSelectionColor)
+ {
+ this.multipleSelectionColor = multipleSelectionColor;
+ textArea.repaint();
+ } //}}}
+
+ //{{{ getLineHighlightColor() method
+ /**
+ * Returns the line highlight color.
+ */
+ public final Color getLineHighlightColor()
+ {
+ return lineHighlightColor;
+ } //}}}
+
+ //{{{ setLineHighlightColor() method
+ /**
+ * Sets the line highlight color.
+ * @param lineHighlightColor The line highlight color
+ */
+ public final void setLineHighlightColor(Color lineHighlightColor)
+ {
+ this.lineHighlightColor = lineHighlightColor;
+ if(textArea.getBuffer() != null)
+ textArea.invalidateLine(textArea.getCaretLine());
+ } //}}}
+
+ //{{{ isLineHighlightEnabled() method
+ /**
+ * Returns true if line highlight is enabled, false otherwise.
+ */
+ public final boolean isLineHighlightEnabled()
+ {
+ return lineHighlight;
+ } //}}}
+
+ //{{{ setLineHighlightEnabled() method
+ /**
+ * Enables or disables current line highlighting.
+ * @param lineHighlight True if current line highlight should be enabled,
+ * false otherwise
+ */
+ public final void setLineHighlightEnabled(boolean lineHighlight)
+ {
+ this.lineHighlight = lineHighlight;
+ textArea.repaint();
+ } //}}}
+
+ //{{{ getSelectionFgColor() method
+ /**
+ * Returns the selection foreground color, if one is set.
+ * @since jEdit 4.4.1
+ */
+ public final Color getSelectionFgColor()
+ {
+ return selectionFgColor;
+ } //}}}
+
+ //{{{ setSelectionFgColor() method
+ /**
+ * Sets the selection foreground color.
+ * @param selectionFgColor The selection foreground color
+ * @since jEdit 4.4.1
+ */
+ public final void setSelectionFgColor(Color selectionFgColor)
+ {
+ this.selectionFgColor = selectionFgColor;
+ if (isSelectionFgColorEnabled())
+ textArea.repaint();
+ } //}}}
+
+ //{{{ isSelectionFgColorEnabled() method
+ /**
+ * Returns true if selection foreground color is enabled - i.e. a specific
+ * color is used for the selection foreground instead of the syntax highlight
+ * color.
+ * @since jEdit 4.4.1
+ */
+ public final boolean isSelectionFgColorEnabled()
+ {
+ return selectionFg;
+ } //}}}
+
+ //{{{ setSelectionFgColorEnabled() method
+ /**
+ * Enables or disables selection foreground color.
+ * @param selectionFg True if selection foreground should be enabled,
+ * false otherwise
+ * @since jEdit 4.4.1
+ */
+ public final void setSelectionFgColorEnabled(boolean selectionFg)
+ {
+ this.selectionFg = selectionFg;
+ textArea.repaint();
+ } //}}}
+
+ //{{{ getStructureHighlightColor() method
+ /**
+ * Returns the structure highlight color.
+ * @since jEdit 4.2pre3
+ */
+ public final Color getStructureHighlightColor()
+ {
+ return structureHighlightColor;
+ } //}}}
+
+ //{{{ setStructureHighlightColor() method
+ /**
+ * Sets the structure highlight color.
+ * @param structureHighlightColor The bracket highlight color
+ * @since jEdit 4.2pre3
+ */
+ public final void setStructureHighlightColor(
+ Color structureHighlightColor)
+ {
+ this.structureHighlightColor = structureHighlightColor;
+ textArea.invalidateStructureMatch();
+ } //}}}
+
+ //{{{ isStructureHighlightEnabled() method
+ /**
+ * Returns true if structure highlighting is enabled, false otherwise.
+ * @since jEdit 4.2pre3
+ */
+ public final boolean isStructureHighlightEnabled()
+ {
+ return structureHighlight;
+ } //}}}
+
+ //{{{ setStructureHighlightEnabled() method
+ /**
+ * Enables or disables structure highlighting.
+ * @param structureHighlight True if structure highlighting should be
+ * enabled, false otherwise
+ * @since jEdit 4.2pre3
+ */
+ public final void setStructureHighlightEnabled(boolean structureHighlight)
+ {
+ this.structureHighlight = structureHighlight;
+ textArea.invalidateStructureMatch();
+ } //}}}
+
+ //{{{ isBlockCaretEnabled() method
+ /**
+ * Returns true if the caret should be drawn as a block, false otherwise.
+ */
+ public final boolean isBlockCaretEnabled()
+ {
+ return blockCaret;
+ } //}}}
+
+ //{{{ setBlockCaretEnabled() method
+ /**
+ * Sets if the caret should be drawn as a block, false otherwise.
+ * @param blockCaret True if the caret should be drawn as a block,
+ * false otherwise.
+ */
+ public final void setBlockCaretEnabled(boolean blockCaret)
+ {
+ this.blockCaret = blockCaret;
+ extensionMgr.removeExtension(caretExtension);
+ if(blockCaret)
+ addExtension(BLOCK_CARET_LAYER,caretExtension);
+ else
+ addExtension(CARET_LAYER,caretExtension);
+ if(textArea.getBuffer() != null)
+ textArea.invalidateLine(textArea.getCaretLine());
+ } //}}}
+
+ //{{{ isThickCaretEnabled() method
+ /**
+ * Returns true if the caret should be drawn with a thick line, false otherwise.
+ * @since jEdit 4.3pre15
+ */
+ public final boolean isThickCaretEnabled()
+ {
+ return thickCaret;
+ } //}}}
+
+ //{{{ setThickCaretEnabled() method
+ /**
+ * Sets if the caret should be drawn with a thick line.
+ * @param thickCaret
+ * True if the caret should be drawn as a block, false otherwise.
+ * @since jEdit 4.3pre15
+ */
+ public final void setThickCaretEnabled(boolean thickCaret)
+ {
+ this.thickCaret = thickCaret;
+ if(textArea.getBuffer() != null)
+ textArea.invalidateLine(textArea.getCaretLine());
+ } //}}}
+
+ //{{{ getEOLMarkerColor() method
+ /**
+ * Returns the EOL marker color.
+ */
+ public final Color getEOLMarkerColor()
+ {
+ return eolMarkerColor;
+ } //}}}
+
+ //{{{ setEOLMarkerColor() method
+ /**
+ * Sets the EOL marker color.
+ * @param eolMarkerColor The EOL marker color
+ */
+ public final void setEOLMarkerColor(Color eolMarkerColor)
+ {
+ this.eolMarkerColor = eolMarkerColor;
+ repaint();
+ } //}}}
+
+ //{{{ getEOLMarkersPainted() method
+ /**
+ * Returns true if EOL markers are drawn, false otherwise.
+ */
+ public final boolean getEOLMarkersPainted()
+ {
+ return eolMarkers;
+ } //}}}
+
+ //{{{ setEOLMarkersPainted() method
+ /**
+ * Sets if EOL markers are to be drawn.
+ * @param eolMarkers True if EOL markers should be drawn, false otherwise
+ */
+ public final void setEOLMarkersPainted(boolean eolMarkers)
+ {
+ this.eolMarkers = eolMarkers;
+ repaint();
+ } //}}}
+
+ //{{{ getWrapGuideColor() method
+ /**
+ * Returns the wrap guide color.
+ */
+ public final Color getWrapGuideColor()
+ {
+ return wrapGuideColor;
+ } //}}}
+
+ //{{{ setWrapGuideColor() method
+ /**
+ * Sets the wrap guide color.
+ * @param wrapGuideColor The wrap guide color
+ */
+ public final void setWrapGuideColor(Color wrapGuideColor)
+ {
+ this.wrapGuideColor = wrapGuideColor;
+ repaint();
+ } //}}}
+
+ //{{{ isWrapGuidePainted() method
+ /**
+ * Returns true if the wrap guide is drawn, false otherwise.
+ * @since jEdit 4.0pre4
+ */
+ public final boolean isWrapGuidePainted()
+ {
+ return wrapGuide;
+ } //}}}
+
+ //{{{ setWrapGuidePainted() method
+ /**
+ * Sets if the wrap guide is to be drawn.
+ * @param wrapGuide True if the wrap guide should be drawn, false otherwise
+ */
+ public final void setWrapGuidePainted(boolean wrapGuide)
+ {
+ this.wrapGuide = wrapGuide;
+ repaint();
+ } //}}}
+
+ //{{{ getFoldLineStyle() method
+ /**
+ * Returns the fold line style. The first element is the style for
+ * lines with a fold level greater than 3. The remaining elements
+ * are for fold levels 1 to 3.
+ */
+ public final SyntaxStyle[] getFoldLineStyle()
+ {
+ return foldLineStyle;
+ } //}}}
+
+ //{{{ setFoldLineStyle() method
+ /**
+ * Sets the fold line style. The first element is the style for
+ * lines with a fold level greater than 3. The remaining elements
+ * are for fold levels 1 to 3.
+ * @param foldLineStyle The fold line style
+ */
+ public final void setFoldLineStyle(SyntaxStyle[] foldLineStyle)
+ {
+ this.foldLineStyle = foldLineStyle;
+ repaint();
+ } //}}}
+
+ //{{{ setAntiAliasEnabled() method
+ /**
+ * @deprecated use setAntiAlias(AntiAlias newMode)
+ */
+ @Deprecated
+ public void setAntiAliasEnabled(boolean isEnabled)
+ {
+ setAntiAlias(new AntiAlias(isEnabled));
+ }
+ /**
+ * As of jEdit 4.3pre4, a new JDK 1.6 subpixel antialias mode is supported.
+ *
+ * @since jEdit 4.2pre4
+ */
+ public void setAntiAlias(AntiAlias newValue)
+ {
+ antiAlias = newValue;
+ updateRenderingHints();
+ } //}}}
+
+ /**
+ * @return the AntiAlias value that is currently used for TextAreas.
+ * @since jedit 4.3pre4
+ */
+ public AntiAlias getAntiAlias()
+ {
+ return antiAlias;
+ }
+
+ //{{{ isAntiAliasEnabled() method
+ /**
+ * Returns if anti-aliasing is enabled.
+ * @since jEdit 3.2pre6
+ * @deprecated - use @ref getAntiAlias()
+ */
+ @Deprecated
+ public boolean isAntiAliasEnabled()
+ {
+ return antiAlias.val() > 0;
+ } //}}}
+
+ //{{{ setFractionalFontMetricsEnabled() method
+ /**
+ * Sets if fractional font metrics should be enabled. Has no effect when
+ * running on Java 1.1.
+ * @since jEdit 3.2pre6
+ */
+ public void setFractionalFontMetricsEnabled(boolean fracFontMetrics)
+ {
+ this.fracFontMetrics = fracFontMetrics;
+ updateRenderingHints();
+ } //}}}
+
+ //{{{ isFractionalFontMetricsEnabled() method
+ /**
+ * Returns if fractional font metrics are enabled.
+ * @since jEdit 3.2pre6
+ */
+ public boolean isFractionalFontMetricsEnabled()
+ {
+ return fracFontMetrics;
+ } //}}}
+
+ //{{{ getFontRenderContext() method
+ /**
+ * Returns the font render context.
+ * @since jEdit 4.0pre4
+ */
+ public FontRenderContext getFontRenderContext()
+ {
+ return fontRenderContext;
+ } //}}}
+
+ //}}}
+
+ //{{{ addExtension() method
+ /**
+ * Adds a text area extension, which can perform custom painting and
+ * tool tip handling.
+ * @param extension The extension
+ * @since jEdit 4.0pre4
+ */
+ public void addExtension(TextAreaExtension extension)
+ {
+ extensionMgr.addExtension(DEFAULT_LAYER,extension);
+ repaint();
+ } //}}}
+
+ //{{{ addExtension() method
+ /**
+ * Adds a text area extension, which can perform custom painting and
+ * tool tip handling.
+ * @param layer The layer to add the extension to. Note that more than
+ * extension can share the same layer.
+ * @param extension The extension
+ * @since jEdit 4.0pre4
+ */
+ public void addExtension(int layer, TextAreaExtension extension)
+ {
+ extensionMgr.addExtension(layer,extension);
+ repaint();
+ } //}}}
+
+ //{{{ removeExtension() method
+ /**
+ * Removes a text area extension. It will no longer be asked to
+ * perform custom painting and tool tip handling.
+ * @param extension The extension
+ * @since jEdit 4.0pre4
+ */
+ public void removeExtension(TextAreaExtension extension)
+ {
+ extensionMgr.removeExtension(extension);
+ repaint();
+ } //}}}
+
+ //{{{ getExtensions() method
+ /**
+ * Returns an array of registered text area extensions. Useful for
+ * debugging purposes.
+ * @since jEdit 4.1pre5
+ */
+ public TextAreaExtension[] getExtensions()
+ {
+ return extensionMgr.getExtensions();
+ } //}}}
+
+ //{{{ getToolTipText() method
+ /**
+ * Returns the tool tip to display at the specified location.
+ * @param evt The mouse event
+ */
+ @Override
+ public String getToolTipText(MouseEvent evt)
+ {
+ if(textArea.getBuffer().isLoading())
+ return null;
+
+ return extensionMgr.getToolTipText(evt.getX(),evt.getY());
+ } //}}}
+
+ //{{{ getFontMetrics() method
+ /**
+ * Returns the font metrics used by this component.
+ */
+ public FontMetrics getFontMetrics()
+ {
+ return fm;
+ } //}}}
+
+ //{{{ setFont() method
+ /**
+ * Sets the font for this component. This is overridden to update the
+ * cached font metrics and to recalculate which lines are visible.
+ * @param font The font
+ */
+ @Override
+ public void setFont(Font font)
+ {
+ super.setFont(font);
+ fm = getFontMetrics(font);
+ textArea.recalculateVisibleLines();
+ if(textArea.getBuffer() != null
+ && !textArea.getBuffer().isLoading())
+ textArea.recalculateLastPhysicalLine();
+ //textArea.propertiesChanged();
+ } //}}}
+
+ //{{{ getStringWidth() method
+ /**
+ * Returns the width of the given string, in pixels, using the text
+ * area's current font.
+ *
+ * @since jEdit 4.2final
+ */
+ public float getStringWidth(String str)
+ {
+ if(textArea.charWidth != 0)
+ return textArea.charWidth * str.length();
+ else
+ {
+ return (float)getFont().getStringBounds(
+ str,getFontRenderContext()).getWidth();
+ }
+ } //}}}
+
+ //{{{ update() method
+ /**
+ * Repaints the text.
+ * @param _gfx The graphics context
+ */
+ @Override
+ public void update(Graphics _gfx)
+ {
+ paint(_gfx);
+ } //}}}
+
+ //{{{ paint() method
+ /**
+ * Repaints the text.
+ * @param _gfx The graphics context
+ */
+ @Override
+ public void paint(Graphics _gfx)
+ {
+ assert _gfx instanceof Graphics2D;
+ Graphics2D gfx = (Graphics2D)_gfx;
+ gfx.setRenderingHints(renderingHints);
+ fontRenderContext = gfx.getFontRenderContext();
+
+ Rectangle clipRect = gfx.getClipBounds();
+ int lineHeight = fm.getHeight();
+ if(lineHeight == 0 || textArea.getBuffer().isLoading())
+ {
+ gfx.setColor(getBackground());
+ gfx.fillRect(clipRect.x,clipRect.y,clipRect.width,clipRect.height);
+ }
+ else
+ {
+ long prepareTime = System.nanoTime();
+ // Because the clipRect's height is usually an even multiple
+ // of the font height, we subtract 1 from it, otherwise one
+ // too many lines will always be painted.
+ int firstLine = clipRect.y / lineHeight;
+ int lastLine = (clipRect.y + clipRect.height - 1) / lineHeight;
+ gfx.setColor(getBackground());
+ gfx.setFont(getFont());
+ prepareTime = System.nanoTime() - prepareTime;
+
+ long linesTime = System.nanoTime();
+ int numLines = lastLine - firstLine + 1;
+ int y = firstLine * lineHeight;
+ gfx.fillRect(0,y,getWidth(),numLines * lineHeight);
+ extensionMgr.paintScreenLineRange(textArea,gfx,
+ firstLine,lastLine,y,lineHeight);
+ linesTime = System.nanoTime() - linesTime;
+
+ if(Debug.PAINT_TIMER && numLines >= 1)
+ Log.log(Log.DEBUG,this,"repainting " + numLines + " lines took " + prepareTime + "/" + linesTime + " ns");
+ }
+
+ textArea.updateMaxHorizontalScrollWidth();
+ } //}}}
+
+ //{{{ nextTabStop() method
+ /**
+ * Implementation of TabExpander interface. Returns next tab stop after
+ * a specified point.
+ * @param x The x co-ordinate
+ * @param tabOffset Ignored
+ * @return The next tab stop after <i>x</i>
+ */
+ public float nextTabStop(float x, int tabOffset)
+ {
+ int ntabs = (int)(x / textArea.tabSize);
+ return (ntabs + 1) * textArea.tabSize;
+ } //}}}
+
+ //{{{ getPreferredSize() method
+ /**
+ * Returns the painter's preferred size.
+ */
+ @Override
+ public Dimension getPreferredSize()
+ {
+ Dimension dim = new Dimension();
+
+ char[] foo = new char[80];
+ for(int i = 0; i < foo.length; i++)
+ foo[i] = ' ';
+ dim.width = (int)getStringWidth(new String(foo));
+ dim.height = fm.getHeight() * 25;
+ return dim;
+ } //}}}
+
+ //{{{ getMinimumSize() method
+ /**
+ * Returns the painter's minimum size.
+ */
+ @Override
+ public Dimension getMinimumSize()
+ {
+ return getPreferredSize();
+ } //}}}
+
+ //{{{ Package-private members
+
+ //{{{ Instance variables
+ /* package-private since they are accessed by inner classes and we
+ * want this to be fast */
+ TextArea textArea;
+
+ SyntaxStyle[] styles;
+ Color caretColor;
+ Color selectionColor;
+ Color multipleSelectionColor;
+ Color lineHighlightColor;
+ Color structureHighlightColor;
+ Color eolMarkerColor;
+ Color wrapGuideColor;
+
+ SyntaxStyle[] foldLineStyle;
+
+ boolean blockCaret;
+ boolean thickCaret;
+ boolean lineHighlight;
+ boolean structureHighlight;
+ boolean eolMarkers;
+ boolean wrapGuide;
+ AntiAlias antiAlias;
+ boolean fracFontMetrics;
+ RenderingHints renderingHints;
+ boolean selectionFg;
+ Color selectionFgColor;
+ // should try to use this as little as possible.
+ FontMetrics fm;
+ //}}}
+
+ //{{{ TextAreaPainter constructor
+ /**
+ * Creates a new painter. Do not create instances of this class
+ * directly.
+ */
+ TextAreaPainter(TextArea textArea)
+ {
+ enableEvents(AWTEvent.FOCUS_EVENT_MASK
+ | AWTEvent.KEY_EVENT_MASK
+ | AWTEvent.MOUSE_EVENT_MASK);
+
+ this.textArea = textArea;
+ antiAlias = new AntiAlias(0);
+ fonts = new HashMap();
+ extensionMgr = new ExtensionManager();
+
+ setAutoscrolls(true);
+ setOpaque(true);
+ setRequestFocusEnabled(false);
+ setDoubleBuffered(false);
+
+ setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
+
+ fontRenderContext = new FontRenderContext(null,false,false);
+
+ addExtension(LINE_BACKGROUND_LAYER,new PaintLineBackground());
+ addExtension(SELECTION_LAYER,new PaintSelection());
+ addExtension(WRAP_GUIDE_LAYER,new PaintWrapGuide());
+ addExtension(BRACKET_HIGHLIGHT_LAYER,new StructureMatcher
+ .Highlight(textArea));
+ addExtension(TEXT_LAYER,new PaintText());
+ addExtension(TEXT_LAYER,new PaintSelectionText());
+ caretExtension = new PaintCaret();
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private final ExtensionManager extensionMgr;
+ private final PaintCaret caretExtension;
+ private FontRenderContext fontRenderContext;
+ private final Map fonts;
+ private Cursor hiddenCursor;
+ private boolean defaultCursor = true;
+ //}}}
+
+ private static Object sm_hrgbRender;
+ private static Constructor<FontRenderContext> sm_frcConstructor;
+
+ static
+ {
+ try
+ {
+ Field f = RenderingHints.class.getField("VALUE_TEXT_ANTIALIAS_LCD_HRGB");
+ sm_hrgbRender = f.get(null);
+ Class[] fracFontMetricsTypeList = {AffineTransform.class, Object.class, Object.class};
+ sm_frcConstructor = FontRenderContext.class.getConstructor(fracFontMetricsTypeList);
+ }
+ catch (NullPointerException npe) {}
+ catch (SecurityException se) {}
+ catch (NoSuchFieldException nsfe) {}
+ catch (IllegalArgumentException iae) {}
+ catch (IllegalAccessException iae) {}
+ catch (NoSuchMethodException nsme) {}
+ }
+ //{{{ updateRenderingHints() method
+ private void updateRenderingHints()
+ {
+ Map<RenderingHints.Key,Object> hints = new HashMap<RenderingHints.Key,Object>();
+
+ hints.put(RenderingHints.KEY_FRACTIONALMETRICS,
+ fracFontMetrics ? RenderingHints.VALUE_FRACTIONALMETRICS_ON
+ : RenderingHints.VALUE_FRACTIONALMETRICS_OFF);
+
+ if (antiAlias.val() == 0)
+ {
+ hints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
+ hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
+ fontRenderContext = new FontRenderContext(null, antiAlias.val() > 0, fracFontMetrics);
+ }
+ /** LCD HRGB mode - works with JRE 1.6 only, which is why we use reflection */
+ else if (antiAlias.val() == 2 && sm_hrgbRender != null )
+ {
+ hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, sm_hrgbRender);
+ Object fontRenderHint = fracFontMetrics ?
+ RenderingHints.VALUE_FRACTIONALMETRICS_ON :
+ RenderingHints.VALUE_FRACTIONALMETRICS_OFF;
+ Object[] paramList = {null, sm_hrgbRender, fontRenderHint};
+ try
+ {
+ fontRenderContext = sm_frcConstructor.newInstance(paramList);
+ }
+ catch (Exception e)
+ {
+ fontRenderContext = new FontRenderContext(null, antiAlias.val() > 0, fracFontMetrics);
+ }
+ }
+ else /** Standard Antialias Version */
+ {
+ hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+ hints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+ fontRenderContext = new FontRenderContext(null, antiAlias.val() > 0, fracFontMetrics);
+ }
+
+ renderingHints = new RenderingHints(hints);
+
+
+ } //}}}
+
+ //}}}
+
+ //{{{ Inner classes
+
+ //{{{ PaintLineBackground class
+ private class PaintLineBackground extends TextAreaExtension
+ {
+ //{{{ shouldPaintLineHighlight() method
+ private boolean shouldPaintLineHighlight(int caret, int start, int end)
+ {
+ if(!isLineHighlightEnabled()
+ || caret < start || caret >= end)
+ {
+ return false;
+ }
+
+ int count = textArea.getSelectionCount();
+ if(count == 1)
+ {
+ Selection s = textArea.getSelection(0);
+ return s.getStartLine() == s.getEndLine();
+ }
+ else
+ return count == 0;
+ } //}}}
+
+ //{{{ paintValidLine() method
+ @Override
+ public void paintValidLine(Graphics2D gfx, int screenLine,
+ int physicalLine, int start, int end, int y)
+ {
+ // minimise access$ methods
+ TextArea textArea = TextAreaPainter.this.textArea;
+ JEditBuffer buffer = textArea.getBuffer();
+
+ //{{{ Paint line highlight and collapsed fold highlight
+ boolean collapsedFold =
+ physicalLine < buffer.getLineCount() - 1
+ && buffer.isFoldStart(physicalLine)
+ && !textArea.displayManager
+ .isLineVisible(physicalLine + 1);
+
+ SyntaxStyle foldLineStyle = null;
+ if(collapsedFold)
+ {
+ int level = buffer.getFoldLevel(physicalLine + 1);
+ if(buffer.getFoldHandler() instanceof IndentFoldHandler)
+ level = Math.max(1,level / buffer.getIndentSize());
+ if(level > 3)
+ level = 0;
+ foldLineStyle = TextAreaPainter.this.foldLineStyle[level];
+ }
+
+ int caret = textArea.getCaretPosition();
+ boolean paintLineHighlight = shouldPaintLineHighlight(
+ caret,start,end);
+
+ Color bgColor;
+ if(paintLineHighlight)
+ bgColor = lineHighlightColor;
+ else if(collapsedFold)
+ {
+ bgColor = foldLineStyle.getBackgroundColor();
+ if(bgColor == null)
+ bgColor = getBackground();
+ }
+ else
+ bgColor = getBackground();
+
+ if(paintLineHighlight || collapsedFold)
+ {
+ gfx.setColor(bgColor);
+ gfx.fillRect(0,y,getWidth(),fm.getHeight());
+ } //}}}
+
+ //{{{ Paint token backgrounds
+ ChunkCache.LineInfo lineInfo = textArea.chunkCache
+ .getLineInfo(screenLine);
+
+ if(lineInfo.chunks != null)
+ {
+ float baseLine = y + fm.getHeight()
+ - (fm.getLeading()+1) - fm.getDescent();
+ Chunk.paintChunkBackgrounds(
+ lineInfo.chunks,gfx,
+ textArea.getHorizontalOffset(),
+ baseLine);
+ } //}}}
+ } //}}}
+ } //}}}
+
+ //{{{ PaintSelection class
+ private class PaintSelection extends TextAreaExtension
+ {
+ //{{{ paintValidLine() method
+ @Override
+ public void paintValidLine(Graphics2D gfx, int screenLine,
+ int physicalLine, int start, int end, int y)
+ {
+ if(textArea.getSelectionCount() == 0)
+ return;
+
+ gfx.setColor(textArea.isMultipleSelectionEnabled()
+ ? getMultipleSelectionColor()
+ : getSelectionColor());
+
+ Iterator<Selection> iter = textArea.getSelectionIterator();
+ while(iter.hasNext())
+ {
+ Selection s = iter.next();
+ paintSelection(gfx,screenLine,physicalLine,y,s);
+ }
+ } //}}}
+
+ //{{{ paintSelection() method
+ private void paintSelection(Graphics2D gfx, int screenLine,
+ int physicalLine, int y, Selection s)
+ {
+ int[] selectionStartAndEnd
+ = textArea.selectionManager
+ .getSelectionStartAndEnd(
+ screenLine,physicalLine,s);
+ if(selectionStartAndEnd == null)
+ return;
+
+ int x1 = selectionStartAndEnd[0];
+ int x2 = selectionStartAndEnd[1];
+
+ gfx.fillRect(x1,y,x2 - x1,fm.getHeight());
+ } //}}}
+ } //}}}
+
+ //{{{ PaintSelectionText class
+ private class PaintSelectionText extends TextAreaExtension
+ {
+ // All screen lines of the same physical line use the same indentation
+ private float indent;
+ private boolean indentFound = false;
+
+ //{{{ paintValidLine() method
+ @Override
+ public void paintValidLine(Graphics2D gfx, int screenLine,
+ int physicalLine, int start, int end, int y)
+ {
+ if(textArea.getSelectionCount() == 0)
+ return;
+ if ((! isSelectionFgColorEnabled()) || (getSelectionFgColor() == null))
+ return;
+
+ Iterator<Selection> iter = textArea.getSelectionIterator();
+ while(iter.hasNext())
+ {
+ Selection s = iter.next();
+ paintSelection(gfx,screenLine,physicalLine,y,s);
+ }
+ } //}}}
+
+ //{{{ paintSelection() method
+ private void paintSelection(Graphics2D gfx, int screenLine,
+ int physicalLine, int y, Selection s)
+ {
+ if ((physicalLine < s.getStartLine()) || (physicalLine > s.getEndLine()))
+ return;
+
+ float x = indent = textArea.getHorizontalOffset();
+ float baseLine = y + fm.getHeight() -
+ (fm.getLeading()+1) - fm.getDescent();
+
+ DefaultTokenHandler tokenHandler = new DefaultTokenHandler();
+ textArea.getBuffer().markTokens(physicalLine, tokenHandler);
+ Token token = tokenHandler.getTokens();
+
+ int lineStart = textArea.getLineStartOffset(physicalLine);
+ int startOffset, endOffset;
+ if (s instanceof Selection.Rect)
+ {
+ Selection.Rect r = (Selection.Rect)s;
+ startOffset = r.getStart(textArea.getBuffer(), physicalLine);
+ endOffset = r.getEnd(textArea.getBuffer(), physicalLine);
+ }
+ else
+ {
+ startOffset = (s.getStart() > lineStart) ? s.getStart() : lineStart;
+ endOffset = s.getEnd();
+ }
+ // Soft-wrap
+ int screenLineStart = textArea.getScreenLineStartOffset(screenLine);
+ int screenLineEnd = textArea.getScreenLineEndOffset(screenLine);
+ if (screenLineStart > startOffset)
+ startOffset = screenLineStart;
+ if (screenLineEnd < endOffset)
+ endOffset = screenLineEnd;
+ indentFound = false;
+
+ int tokenStart = lineStart;
+ while(token.id != Token.END)
+ {
+ int next = tokenStart + token.length;
+ String sub = null;
+ SyntaxStyle style = styles[token.id];
+ if (next > startOffset) // Reached selection start
+ {
+ if (tokenStart >= endOffset) // Got past selection
+ break;
+ if(style != null)
+ {
+ gfx.setFont(style.getFont());
+ gfx.setColor(getSelectionFgColor());
+ int strStart;
+ if (startOffset > tokenStart)
+ {
+ strStart = startOffset;
+ x = nextX(x, style, sub, tokenStart, startOffset);
+ }
+ else
+ strStart = tokenStart;
+ int strEnd = (endOffset > next) ? next : endOffset;
+ sub = textArea.getText(strStart, strEnd - strStart);
+ gfx.drawString(sub, x, baseLine);
+ x = nextX(x, style, sub, strStart, strEnd);
+ }
+ }
+ if (sub == null)
+ x = nextX(x, style, null, tokenStart, next);
+ tokenStart = next;
+ token = token.next;
+ if (tokenStart == screenLineStart)
+ x = indent;
+ }
+ } //}}}
+
+ //{{{
+ float nextX(float x, SyntaxStyle style, String s, int startOffset,
+ int endOffset)
+ {
+ if (s == null)
+ s = textArea.getText(startOffset, endOffset - startOffset);
+ if (s.equals("\t"))
+ {
+ int horzOffset = textArea.getHorizontalOffset();
+ x = nextTabStop(x - horzOffset, endOffset) + horzOffset;
+ }
+ else
+ {
+ if ((! indentFound) && (! s.equals(" ")))
+ {
+ indentFound = true;
+ indent = x;
+ }
+ Font font = (style != null) ? style.getFont() : getFont();
+ x += font.getStringBounds(s, getFontRenderContext()).getWidth();
+ }
+ return x;
+ }
+ } //}}}
+
+ //{{{ PaintWrapGuide class
+ private class PaintWrapGuide extends TextAreaExtension
+ {
+ @Override
+ public void paintScreenLineRange(Graphics2D gfx, int firstLine,
+ int lastLine, int[] physicalLines, int[] start,
+ int[] end, int y, int lineHeight)
+ {
+ if(textArea.wrapMargin != 0
+ && !textArea.wrapToWidth
+ && isWrapGuidePainted())
+ {
+ gfx.setColor(getWrapGuideColor());
+ int x = textArea.getHorizontalOffset()
+ + textArea.wrapMargin;
+ gfx.drawLine(x,y,x,y + (lastLine - firstLine
+ + 1) * lineHeight);
+ }
+ }
+
+ @Override
+ public String getToolTipText(int x, int y)
+ {
+ if(textArea.wrapMargin != 0
+ && !textArea.wrapToWidth
+ && isWrapGuidePainted())
+ {
+ int wrapGuidePos = textArea.wrapMargin
+ + textArea.getHorizontalOffset();
+ if(Math.abs(x - wrapGuidePos) < 5)
+ {
+ return String.valueOf(textArea.getBuffer()
+ .getProperty("maxLineLen"));
+ }
+ }
+
+ return null;
+ }
+ } //}}}
+
+ //{{{ PaintText class
+ private class PaintText extends TextAreaExtension
+ {
+ @Override
+ public void paintValidLine(Graphics2D gfx, int screenLine,
+ int physicalLine, int start, int end, int y)
+ {
+ ChunkCache.LineInfo lineInfo = textArea.chunkCache
+ .getLineInfo(screenLine);
+
+ Font defaultFont = getFont();
+ Color defaultColor = getForeground();
+
+ gfx.setFont(defaultFont);
+ gfx.setColor(defaultColor);
+
+ int x = textArea.getHorizontalOffset();
+ int originalX = x;
+
+ float baseLine = y + fm.getHeight()
+ - (fm.getLeading()+1) - fm.getDescent();
+
+ if(lineInfo.chunks != null)
+ {
+ x += Chunk.paintChunkList(lineInfo.chunks,
+ gfx,textArea.getHorizontalOffset(),
+ baseLine,!Debug.DISABLE_GLYPH_VECTOR);
+ }
+
+ JEditBuffer buffer = textArea.getBuffer();
+
+ if(!lineInfo.lastSubregion)
+ {
+ gfx.setFont(defaultFont);
+ gfx.setColor(eolMarkerColor);
+ gfx.drawString(":",Math.max(x,
+ textArea.getHorizontalOffset()
+ + textArea.wrapMargin + textArea.charWidth),
+ baseLine);
+ x += textArea.charWidth;
+ }
+ else if(physicalLine < buffer.getLineCount() - 1
+ && buffer.isFoldStart(physicalLine)
+ && !textArea.displayManager
+ .isLineVisible(physicalLine + 1))
+ {
+ int level = buffer.getFoldLevel(physicalLine + 1);
+ if(buffer.getFoldHandler() instanceof IndentFoldHandler)
+ level = Math.max(1,level / buffer.getIndentSize());
+ if(level > 3)
+ level = 0;
+ SyntaxStyle foldLineStyle = TextAreaPainter.this.foldLineStyle[level];
+
+ Font font = foldLineStyle.getFont();
+ gfx.setFont(font);
+ gfx.setColor(foldLineStyle.getForegroundColor());
+
+ int nextLine;
+ int nextScreenLine = screenLine + 1;
+ if(nextScreenLine < textArea.getVisibleLines())
+ {
+ nextLine = textArea.chunkCache.getLineInfo(nextScreenLine)
+ .physicalLine;
+ }
+ else
+ {
+ nextLine = textArea.displayManager
+ .getNextVisibleLine(physicalLine);
+ }
+
+ if(nextLine == -1)
+ nextLine = textArea.getLineCount();
+
+ int count = nextLine - physicalLine - 1;
+ String str = " [" + count + " lines]";
+
+ float width = getStringWidth(str);
+
+ gfx.drawString(str,x,baseLine);
+ x += width;
+ }
+ else if(eolMarkers)
+ {
+ gfx.setFont(defaultFont);
+ gfx.setColor(eolMarkerColor);
+ gfx.drawString(".",x,baseLine);
+ x += textArea.charWidth;
+ }
+
+ lineInfo.width = x - originalX;
+ }
+ } //}}}
+
+ //{{{ PaintCaret class
+ private class PaintCaret extends TextAreaExtension
+ {
+ @Override
+ public void paintValidLine(Graphics2D gfx, int screenLine,
+ int physicalLine, int start, int end, int y)
+ {
+ if(!textArea.isCaretVisible())
+ return;
+
+ int caret = textArea.getCaretPosition();
+ if(caret < start || caret >= end)
+ return;
+
+ int offset = caret - textArea.getLineStartOffset(physicalLine);
+ textArea.offsetToXY(physicalLine,
+ offset, textArea.offsetXY);
+ int caretX = textArea.offsetXY.x;
+ int lineHeight = fm.getHeight();
+
+ gfx.setColor(caretColor);
+
+ if(textArea.isOverwriteEnabled())
+ {
+ gfx.drawLine(caretX,y + lineHeight - 1,
+ caretX + textArea.charWidth,
+ y + lineHeight - 1);
+ }
+ else if(blockCaret)
+ gfx.drawRect(caretX,y,textArea.charWidth - 1,
+ lineHeight - 1);
+ else
+ {
+ if (thickCaret)
+ gfx.drawRect(caretX, y,
+ 1, lineHeight - 1);
+ else
+ gfx.drawLine(caretX,y,
+ caretX,y + lineHeight - 1);
+ }
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/TextAreaTransferHandler.java b/jEdit/org/gjt/sp/jedit/textarea/TextAreaTransferHandler.java
index 73bd083..9d0bb54 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/TextAreaTransferHandler.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/TextAreaTransferHandler.java
@@ -1,482 +1,487 @@
-/*
- * TextAreaTransferHandler.java - Drag and drop support
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2004 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.textarea;
-
-//{{{ Imports
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.bufferset.BufferSetManager;
-import org.gjt.sp.jedit.browser.VFSBrowser;
-import org.gjt.sp.jedit.io.FileVFS;
-import org.gjt.sp.jedit.io.VFS;
-import org.gjt.sp.jedit.io.VFSManager;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.util.WorkRequest;
-
-import javax.swing.*;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.StringSelection;
-import java.awt.datatransfer.Transferable;
-import java.io.File;
-import java.net.URI;
-import java.util.List;
-//}}}
-
-/**
- * @author Slava Pestov
- * @version $Id: TextAreaTransferHandler.java 16348 2009-10-14 10:40:15Z kpouer $
- */
-public class TextAreaTransferHandler extends TransferHandler
-{
- /* I assume that there can be only one drag operation at the time */
- private static JEditTextArea dragSource;
- private static boolean compoundEdit;
- private static boolean sameTextArea;
- private static int insertPos;
- private static int insertOffset;
-
- // Unfortunately, this does not work, as this DataFlavor is internally changed into another DataFlavor which does not match the intented DataFlavor anymore. :-( So, below, we are iterating.
- /*
- protected static DataFlavor textURIlistDataFlavor = null;
-
- static {
- try {
- textURIlistDataFlavor = new DataFlavor("text/uri-list;representationclass=java.lang.String");
- } catch (ClassNotFoundException e) {
- throw new RuntimeException("Cannot create DataFlavor. This should not happen.",e);
- }
- }
- */
-
- //{{{ createTransferable
- @Override
- protected Transferable createTransferable(JComponent c)
- {
- Log.log(Log.DEBUG,this,"createTransferable()");
- JEditTextArea textArea = (JEditTextArea)c;
- if(textArea.getSelectionCount() == 0)
- return null;
- else
- {
- dragSource = textArea;
- return new TextAreaSelection(textArea);
- }
- } //}}}
-
- //{{{ getSourceActions
- @Override
- public int getSourceActions(JComponent c)
- {
- return COPY_OR_MOVE;
- } //}}}
-
- //{{{ importData
- @Override
- public boolean importData(JComponent c, Transferable t)
- {
- Log.log(Log.DEBUG,this,"Import data");
-// Log.log(Log.DEBUG,this,"Import data: t.isDataFlavorSupported("+textURIlistDataFlavor+")="+t.isDataFlavorSupported(textURIlistDataFlavor)+".");
- if(!canImport(c,t.getTransferDataFlavors()))
- return false;
-
- boolean returnValue;
-
- try
- {
- if(t.isDataFlavorSupported(DataFlavor.javaFileListFlavor))
- {
- returnValue = importFile(c,t);
- }
- else
- {
- DataFlavor uriListStringDataFlavor = null;
- DataFlavor[] dataFlavors = t.getTransferDataFlavors();
-
- for (int i = 0;i<dataFlavors.length;i++)
- {
- DataFlavor dataFlavor = dataFlavors[i];
- if ("text".equals(dataFlavor.getPrimaryType()) &&
- "uri-list".equals(dataFlavor.getSubType()) &&
- dataFlavor.getRepresentationClass() == String.class)
- {
- uriListStringDataFlavor = dataFlavor;
- break;
- }
- }
-
- if (uriListStringDataFlavor != null &&t.isDataFlavorSupported(uriListStringDataFlavor))
- {
- returnValue = importURIList(c,t,uriListStringDataFlavor);
- }
- else
- {
- returnValue = importText(c,t);
- }
- }
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- returnValue = false;
- }
-
- GUIUtilities.getView(c).toFront();
- GUIUtilities.getView(c).requestFocus();
- c.requestFocus();
-
- return returnValue;
- } //}}}
-
- //{{{ importFile
- private boolean importFile(JComponent c, Transferable t)
- throws Exception
- {
- Log.log(Log.DEBUG,this,"=> File list");
- EditPane editPane = (EditPane)
- GUIUtilities.getComponentParent(
- c,EditPane.class);
- View view = editPane.getView();
- Buffer buffer = null;
-
- List<File> data = (List<File>) t.getTransferData(DataFlavor.javaFileListFlavor);
-
- boolean browsedDirectory = false;
- BufferSetManager bufferSetManager = jEdit.getBufferSetManager();
- for (File file : data)
- {
- if (file.isDirectory())
- {
- if (!browsedDirectory)
- {
- VFSBrowser.browseDirectory(view, file.getPath());
- browsedDirectory = true;
- }
- continue;
- }
- Buffer _buffer = jEdit.openFile(editPane, file.getPath());
- if (_buffer != null)
- {
- buffer = _buffer;
- bufferSetManager.addBuffer(editPane, buffer);
- }
- }
-
- if(buffer != null)
- editPane.setBuffer(buffer);
- view.toFront();
- view.requestFocus();
- editPane.requestFocus();
-
- return true;
- } //}}}
-
- //{{{ importURIList
- private boolean importURIList(JComponent c, Transferable t,DataFlavor uriListStringDataFlavor)
- throws Exception
- {
- String str = (String) t.getTransferData(uriListStringDataFlavor);
-
- Log.log(Log.DEBUG,this,"=> URIList \""+str+ '\"');
- EditPane editPane = (EditPane) GUIUtilities.getComponentParent(c, EditPane.class);
- View view = editPane.getView();
- JEditTextArea textArea = (JEditTextArea) c;
- if (dragSource == null)
- {
- boolean found = false;
- String[] components = str.split("\r\n");
-
- boolean browsedDirectory = false;
- for (int i = 0;i<components.length;i++)
- {
- String str0 = components[i];
-
- if (str0.length() > 0)
- {
- URI uri = new URI(str0); // this handles the URI-decoding
-
- if ("file".equals(uri.getScheme()))
- {
- File file = new File(uri.getPath());
- if (file.isDirectory())
- {
- if (!browsedDirectory)
- {
- VFSBrowser.browseDirectory(view, file.getPath());
- browsedDirectory = true;
- }
- }
- else
- {
- VFSManager.runInWorkThread(new DraggedURLLoader(textArea,uri.getPath()));
- }
- found = true;
- }
- else
- {
- Log.log(Log.DEBUG,this,"I do not know how to handle this URI "+uri+", ignoring.");
- }
- }
- else
- {
- // This should be the last component, because every URI in the list is terminated with a "\r\n", even the last one.
- if (i!=components.length-1)
- {
- Log.log(Log.DEBUG,this,"Odd: there is an empty line in the uri list which is not the last line.");
- }
- }
- }
-
- if (found)
- {
- return true;
- }
- }
-
- return true;
- } //}}}
-
- //{{{ importText
- private boolean importText(JComponent c, Transferable t)
- throws Exception
- {
- String str = (String)t.getTransferData(
- DataFlavor.stringFlavor);
- str = str.trim();
- Log.log(Log.DEBUG,this,"=> String \""+str+ '\"');
-
- JEditTextArea textArea = (JEditTextArea)c;
- if (dragSource == null)
- {
- boolean found = false;
- String[] components = str.split("\n");
-
- for (int i = 0;i<components.length;i++)
- {
- String str0 = components[i];
- // Only examine the string for a URL if it came from
- // outside of jEdit.
- VFS vfs = VFSManager.getVFSForPath(str0);
- if (!(vfs instanceof FileVFS) || str.startsWith("file://"))
- {
-// str = str.replace('\n',' ').replace('\r',' ').trim();
- if (str0.startsWith("file://"))
- {
- str0 = str0.substring(7);
- }
-
- VFSManager.runInWorkThread(new DraggedURLLoader(textArea,str0));
- }
- found = true;
-
- }
-
- if (found)
- return true;
- }
-
- if(dragSource != null
- && textArea.getBuffer()
- == dragSource.getBuffer())
- {
- compoundEdit = true;
- textArea.getBuffer().beginCompoundEdit();
- }
-
-
- sameTextArea = textArea == dragSource;
-
- int caret = textArea.getCaretPosition();
- Selection s = textArea.getSelectionAtOffset(caret);
-
- /* if user drops into the same
- selection where they started, do
- nothing. */
- if(s != null)
- {
- if(sameTextArea)
- return false;
- /* if user drops into a selection,
- replace selection */
- int startPos = s.start;
- textArea.setSelectedText(s,str);
- textArea.setSelection(new Selection.Range(startPos,startPos+str.length()));
- }
- /* otherwise just insert the text */
- else
- {
- if (sameTextArea)
- {
- insertPos = caret;
- insertOffset = 0;
- Selection[] selections = textArea.getSelection();
- for (int i=0;i<selections.length;i++)
- {
- if (selections[i].end < insertPos + insertOffset)
- insertOffset -= selections[i].end - selections[i].start;
- }
- }
- else
- {
- textArea.getBuffer().insert(caret,str);
- textArea.setSelection(new Selection.Range(caret,caret+str.length()));
- }
- }
- textArea.scrollToCaret(true);
-
- return true;
- } //}}}
-
- //{{{ exportDone() method
- @Override
- protected void exportDone(JComponent c, Transferable t,
- int action)
- {
- Log.log(Log.DEBUG,this,"Export done");
-
- JEditTextArea textArea = (JEditTextArea)c;
-
- try
- {
- // This happens if importData returns false. For example if you drop into the Selection
- if (action == NONE)
- {
- Log.log(Log.DEBUG,this,"Export impossible");
- return;
- }
-
- if(t == null)
- {
- Log.log(Log.DEBUG,this,"=> Null transferrable");
- textArea.selectNone();
- }
- else if(t.isDataFlavorSupported(
- DataFlavor.stringFlavor))
- {
- Log.log(Log.DEBUG,this,"=> String");
- if (sameTextArea)
- {
- if(action == MOVE)
- {
- textArea.setSelectedText(null,false);
- insertPos += insertOffset;
- }
- try
- {
- String str = (String)t.getTransferData(DataFlavor.stringFlavor);
- textArea.getBuffer().insert(insertPos,str);
- textArea.setSelection(new Selection.Range(insertPos,insertPos+str.length()));
- }
- catch(Exception e)
- {
- Log.log(Log.DEBUG,this,"exportDone in sameTextArea");
- Log.log(Log.DEBUG,this,e);
- }
- }
- else
- {
- if(action == MOVE)
- textArea.setSelectedText(null,false);
- else
- textArea.selectNone();
- }
- }
- }
- finally
- {
- if(compoundEdit)
- {
- compoundEdit = false;
- textArea.getBuffer().endCompoundEdit();
- }
- }
-
- dragSource = null;
- } //}}}
-
- //{{{ canImport() method
- @Override
- public boolean canImport(JComponent c, DataFlavor[] flavors)
- {
- JEditTextArea textArea = (JEditTextArea)c;
-
- // correctly handle text flavor + file list flavor
- // + text area read only, do an or of all flags
- boolean returnValue = false;
-
- for(int i = 0; i < flavors.length; i++)
- {
- if(flavors[i].equals(
- DataFlavor.javaFileListFlavor))
- {
- returnValue = true;
- }
- else if(flavors[i].equals(
- DataFlavor.stringFlavor))
- {
- if(textArea.isEditable())
- returnValue = true;
- }
- else if (flavors[i].getRepresentationClass().equals(java.io.InputStream.class))
- {
- //workaround for Ubuntu/Gnome/Nautilus import flavors, otherwise
- //doesn't work on all Ubuntu installations
- returnValue = true;
- break;
- }
- }
-
- Log.log(Log.DEBUG,this,"canImport() returning "
- + returnValue);
- return returnValue;
- } //}}}
-
- //{{{ TextAreaSelection class
- private static class TextAreaSelection extends StringSelection
- {
- final JEditTextArea textArea;
-
- TextAreaSelection(JEditTextArea textArea)
- {
- super(textArea.getSelectedText());
- this.textArea = textArea;
- }
- } //}}}
-
- //{{{ DraggedURLLoader class
- private static class DraggedURLLoader extends WorkRequest
- {
- private final JEditTextArea textArea;
- private final String url;
-
- DraggedURLLoader(JEditTextArea textArea, String url)
- {
- this.textArea = textArea;
- this.url = url;
- }
- public void run()
- {
- EditPane editPane = EditPane.get(textArea);
- jEdit.openFile(editPane,url);
- }
- } //}}}
-
-}
+/*
+ * TextAreaTransferHandler.java - Drag and drop support
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2004 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.textarea;
+
+//{{{ Imports
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.bufferset.BufferSetManager;
+import org.gjt.sp.jedit.browser.VFSBrowser;
+import org.gjt.sp.jedit.io.FileVFS;
+import org.gjt.sp.jedit.io.VFS;
+import org.gjt.sp.jedit.io.VFSManager;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.util.WorkRequest;
+
+import javax.swing.*;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.StringSelection;
+import java.awt.datatransfer.Transferable;
+import java.io.File;
+import java.net.URI;
+import java.util.List;
+//}}}
+
+/**
+ * @author Slava Pestov
+ * @version $Id: TextAreaTransferHandler.java 19550 2011-06-08 21:37:11Z ezust $
+ */
+public class TextAreaTransferHandler extends TransferHandler
+{
+ /* I assume that there can be only one drag operation at the time */
+ private static JEditTextArea dragSource;
+ private static boolean compoundEdit;
+ private static boolean sameTextArea;
+ private static int insertPos;
+ private static int insertOffset;
+
+ // Unfortunately, this does not work, as this DataFlavor is internally changed into another DataFlavor which does not match the intented DataFlavor anymore. :-( So, below, we are iterating.
+ /*
+ protected static DataFlavor textURIlistDataFlavor = null;
+
+ static {
+ try {
+ textURIlistDataFlavor = new DataFlavor("text/uri-list;representationclass=java.lang.String");
+ } catch (ClassNotFoundException e) {
+ throw new RuntimeException("Cannot create DataFlavor. This should not happen.",e);
+ }
+ }
+ */
+
+ //{{{ createTransferable
+ @Override
+ protected Transferable createTransferable(JComponent c)
+ {
+ Log.log(Log.DEBUG,this,"createTransferable()");
+ JEditTextArea textArea = (JEditTextArea)c;
+ if(textArea.getSelectionCount() == 0)
+ return null;
+ else
+ {
+ dragSource = textArea;
+ return new TextAreaSelection(textArea);
+ }
+ } //}}}
+
+ //{{{ getSourceActions
+ @Override
+ public int getSourceActions(JComponent c)
+ {
+ return COPY_OR_MOVE;
+ } //}}}
+
+ //{{{ importData
+ @Override
+ public boolean importData(JComponent c, Transferable t)
+ {
+ Log.log(Log.DEBUG,this,"Import data");
+// Log.log(Log.DEBUG,this,"Import data: t.isDataFlavorSupported("+textURIlistDataFlavor+")="+t.isDataFlavorSupported(textURIlistDataFlavor)+".");
+ if(!canImport(c,t.getTransferDataFlavors()))
+ return false;
+
+ boolean returnValue;
+
+ try
+ {
+ if(t.isDataFlavorSupported(DataFlavor.javaFileListFlavor))
+ {
+ returnValue = importFile(c,t);
+ }
+ else
+ {
+ DataFlavor uriListStringDataFlavor = null;
+ DataFlavor[] dataFlavors = t.getTransferDataFlavors();
+
+ for (int i = 0;i<dataFlavors.length;i++)
+ {
+ DataFlavor dataFlavor = dataFlavors[i];
+ if ("text".equals(dataFlavor.getPrimaryType()) &&
+ "uri-list".equals(dataFlavor.getSubType()) &&
+ dataFlavor.getRepresentationClass() == String.class)
+ {
+ uriListStringDataFlavor = dataFlavor;
+ break;
+ }
+ }
+
+ if (uriListStringDataFlavor != null &&t.isDataFlavorSupported(uriListStringDataFlavor))
+ {
+ returnValue = importURIList(c,t,uriListStringDataFlavor);
+ }
+ else
+ {
+ returnValue = importText(c,t);
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ returnValue = false;
+ }
+
+ GUIUtilities.getView(c).toFront();
+ GUIUtilities.getView(c).requestFocus();
+ c.requestFocus();
+
+ return returnValue;
+ } //}}}
+
+ //{{{ importFile
+ private boolean importFile(JComponent c, Transferable t)
+ throws Exception
+ {
+ Log.log(Log.DEBUG,this,"=> File list");
+ EditPane editPane = (EditPane)
+ GUIUtilities.getComponentParent(
+ c,EditPane.class);
+ View view = editPane.getView();
+ Buffer buffer = null;
+
+ List<File> data = (List<File>) t.getTransferData(DataFlavor.javaFileListFlavor);
+
+ boolean browsedDirectory = false;
+ BufferSetManager bufferSetManager = jEdit.getBufferSetManager();
+ for (File file : data)
+ {
+ if (file.isDirectory())
+ {
+ if (!browsedDirectory)
+ {
+ VFSBrowser.browseDirectory(view, file.getPath());
+ browsedDirectory = true;
+ }
+ continue;
+ }
+ Buffer _buffer = jEdit.openFile(editPane, file.getPath());
+ if (_buffer != null)
+ {
+ buffer = _buffer;
+ bufferSetManager.addBuffer(editPane, buffer);
+ }
+ }
+
+ if(buffer != null)
+ editPane.setBuffer(buffer);
+ view.toFront();
+ view.requestFocus();
+ editPane.requestFocus();
+
+ return true;
+ } //}}}
+
+ //{{{ importURIList
+ private boolean importURIList(JComponent c, Transferable t,DataFlavor uriListStringDataFlavor)
+ throws Exception
+ {
+ String str = (String) t.getTransferData(uriListStringDataFlavor);
+
+ Log.log(Log.DEBUG,this,"=> URIList \""+str+ '\"');
+ EditPane editPane = (EditPane) GUIUtilities.getComponentParent(c, EditPane.class);
+ View view = editPane.getView();
+ JEditTextArea textArea = (JEditTextArea) c;
+ if (dragSource == null)
+ {
+ boolean found = false;
+ String[] components = str.split("\r\n");
+
+ boolean browsedDirectory = false;
+ for (int i = 0;i<components.length;i++)
+ {
+ String str0 = components[i];
+
+ if (str0.length() > 0)
+ {
+ URI uri = new URI(str0); // this handles the URI-decoding
+
+ if ("file".equals(uri.getScheme()))
+ {
+ File file = new File(uri.getPath());
+ if (file.isDirectory())
+ {
+ if (!browsedDirectory)
+ {
+ VFSBrowser.browseDirectory(view, file.getPath());
+ browsedDirectory = true;
+ }
+ }
+ else
+ {
+ VFSManager.runInWorkThread(new DraggedURLLoader(textArea,uri.getPath()));
+ }
+ found = true;
+ }
+ else
+ {
+ Log.log(Log.DEBUG,this,"I do not know how to handle this URI "+uri+", ignoring.");
+ }
+ }
+ else
+ {
+ // This should be the last component, because every URI in the list is terminated with a "\r\n", even the last one.
+ if (i!=components.length-1)
+ {
+ Log.log(Log.DEBUG,this,"Odd: there is an empty line in the uri list which is not the last line.");
+ }
+ }
+ }
+
+ if (found)
+ {
+ return true;
+ }
+ }
+
+ return true;
+ } //}}}
+
+ //{{{ importText
+ private boolean importText(JComponent c, Transferable t)
+ throws Exception
+ {
+ String str = (String)t.getTransferData(
+ DataFlavor.stringFlavor);
+ str = str.trim();
+ Log.log(Log.DEBUG,this,"=> String \""+str+ '\"');
+
+ JEditTextArea textArea = (JEditTextArea)c;
+ if (dragSource == null)
+ {
+ boolean found = false;
+ String[] components = str.split("\n");
+
+ for (int i = 0;i<components.length;i++)
+ {
+ String str0 = components[i];
+ // Only examine the string for a URL if it came from
+ // outside of jEdit.
+ VFS vfs = VFSManager.getVFSForPath(str0);
+ if (!(vfs instanceof FileVFS) || str.startsWith("file://"))
+ {
+// str = str.replace('\n',' ').replace('\r',' ').trim();
+ if (str0.startsWith("file://"))
+ {
+ str0 = str0.substring(7);
+ }
+
+ VFSManager.runInWorkThread(new DraggedURLLoader(textArea,str0));
+ }
+ found = true;
+
+ }
+
+ if (found)
+ return true;
+ }
+
+ if(dragSource != null
+ && textArea.getBuffer()
+ == dragSource.getBuffer())
+ {
+ compoundEdit = true;
+ textArea.getBuffer().beginCompoundEdit();
+ }
+
+
+ sameTextArea = textArea == dragSource;
+
+ int caret = textArea.getCaretPosition();
+ Selection s = textArea.getSelectionAtOffset(caret);
+
+ /* if user drops into the same
+ selection where they started, do
+ nothing. */
+ if(s != null)
+ {
+ if(sameTextArea)
+ return false;
+ /* if user drops into a selection,
+ replace selection */
+ int startPos = s.start;
+ textArea.setSelectedText(s,str);
+ textArea.setSelection(new Selection.Range(startPos,startPos+str.length()));
+ }
+ /* otherwise just insert the text */
+ else
+ {
+ if (sameTextArea)
+ {
+ insertPos = caret;
+ insertOffset = 0;
+ Selection[] selections = textArea.getSelection();
+ for (int i=0;i<selections.length;i++)
+ {
+ if (selections[i].end < insertPos + insertOffset)
+ insertOffset -= selections[i].end - selections[i].start;
+ }
+ }
+ else
+ {
+ textArea.getBuffer().insert(caret,str);
+ textArea.setSelection(new Selection.Range(caret,caret+str.length()));
+ }
+ }
+ textArea.scrollToCaret(true);
+
+ return true;
+ } //}}}
+
+ //{{{ exportDone() method
+ @Override
+ protected void exportDone(JComponent c, Transferable t,
+ int action)
+ {
+ Log.log(Log.DEBUG,this,"Export done");
+
+ JEditTextArea textArea = (JEditTextArea)c;
+
+ try
+ {
+ // This happens if importData returns false. For example if you drop into the Selection
+ if (action == NONE)
+ {
+ Log.log(Log.DEBUG,this,"Export impossible");
+ return;
+ }
+
+ if(t == null)
+ {
+ Log.log(Log.DEBUG,this,"=> Null transferrable");
+ textArea.selectNone();
+ }
+ else if(t.isDataFlavorSupported(
+ DataFlavor.stringFlavor))
+ {
+ Log.log(Log.DEBUG,this,"=> String");
+ if (sameTextArea)
+ {
+ if(action == MOVE)
+ {
+ textArea.setSelectedText(null,false);
+ insertPos += insertOffset;
+ }
+ try
+ {
+ String str = (String)t.getTransferData(DataFlavor.stringFlavor);
+ textArea.getBuffer().insert(insertPos,str);
+ textArea.setSelection(new Selection.Range(insertPos,insertPos+str.length()));
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.DEBUG,this,"exportDone in sameTextArea");
+ Log.log(Log.DEBUG,this,e);
+ }
+ }
+ else
+ {
+ if(action == MOVE)
+ textArea.setSelectedText(null,false);
+ else
+ textArea.selectNone();
+ }
+ }
+ }
+ finally
+ {
+ if(compoundEdit)
+ {
+ compoundEdit = false;
+ textArea.getBuffer().endCompoundEdit();
+ }
+ }
+
+ dragSource = null;
+ } //}}}
+
+ //{{{ canImport() methods
+ @Override
+ public boolean canImport(TransferSupport support)
+ {
+ if (dragSource != null)
+ return true;
+ else
+ {
+ support.setDropAction(COPY);
+ return super.canImport(support);
+ }
+ }
+
+ @Override
+ public boolean canImport(JComponent c, DataFlavor[] flavors)
+ {
+ JEditTextArea textArea = (JEditTextArea)c;
+
+ // correctly handle text flavor + file list flavor
+ // + text area read only, do an or of all flags
+ boolean returnValue = false;
+
+ for(int i = 0; i < flavors.length; i++)
+ {
+ if(flavors[i].equals(
+ DataFlavor.javaFileListFlavor))
+ {
+ returnValue = true;
+ }
+ else if(flavors[i].equals(
+ DataFlavor.stringFlavor))
+ {
+ if(textArea.isEditable())
+ returnValue = true;
+ }
+ }
+
+ Log.log(Log.DEBUG,this,"canImport() returning "
+ + returnValue);
+ return returnValue;
+ } //}}}
+
+ //{{{ TextAreaSelection class
+ private static class TextAreaSelection extends StringSelection
+ {
+ final JEditTextArea textArea;
+
+ TextAreaSelection(JEditTextArea textArea)
+ {
+ super(textArea.getSelectedText());
+ this.textArea = textArea;
+ }
+ } //}}}
+
+ //{{{ DraggedURLLoader class
+ private static class DraggedURLLoader extends WorkRequest
+ {
+ private final JEditTextArea textArea;
+ private final String url;
+
+ DraggedURLLoader(JEditTextArea textArea, String url)
+ {
+ this.textArea = textArea;
+ this.url = url;
+ }
+ public void run()
+ {
+ EditPane editPane = EditPane.get(textArea);
+ jEdit.openFile(editPane,url);
+ }
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/jedit/textarea/TriangleFoldPainter.java b/jEdit/org/gjt/sp/jedit/textarea/TriangleFoldPainter.java
index 833d430..c53c974 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/TriangleFoldPainter.java
+++ b/jEdit/org/gjt/sp/jedit/textarea/TriangleFoldPainter.java
@@ -28,8 +28,8 @@ import java.awt.Graphics2D;
import org.gjt.sp.jedit.buffer.JEditBuffer;
// {{{ class TriangleFoldHandler
-public class TriangleFoldPainter implements FoldPainter {
-
+public class TriangleFoldPainter implements FoldPainter
+{
// {{{ paintFoldStart()
public void paintFoldStart(Gutter gutter, Graphics2D gfx, int screenLine,
int physicalLine, boolean nextLineVisible, int y, int lineHeight,
diff --git a/jEdit/org/gjt/sp/jedit/textarea/package.html b/jEdit/org/gjt/sp/jedit/textarea/package.html
index 619da81..d0368e7 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/package.html
+++ b/jEdit/org/gjt/sp/jedit/textarea/package.html
@@ -1,29 +1,29 @@
-<html>
-<title> Text Area Package </title>
-<body>
-
-<p> Since jEdit 4.2, many TextArea classes have been split into a base and derived class. This
-is an attempt to make an API partition for the standalone text area. So for example: </p>
-
-<ul>
-<li> @ref JEditBuffer and @ref Buffer were split into two classes. </li>
-<li> @ref TextArea and @ref JEditTextArea were also split. </li>
-<li> @ref MouseHandler and @ref TextAreaMouseHandler were split. </li>
-<li> @ref JEditEmbeddedTextArea is a new class for jEdit plugins to reuse. </li>
-<li> @ref StandaloneTextArea is a new class for other open source Java applications to reuse. </li>
-</ul>
-
-<h2> Keeping things separate </h2>
-
-<p>
-The embeddable TextArea includes the packages "textarea", "buffer", "syntax", and should
-include nothing else. This means that for the standalone and abstract base classes,
-we should only use classes from that set.
-</p>
-
-<p> To build the standalone textarea, "ant build-textArea", and you'll quickly see if you
-broke something by using a class that was not supposed to be used. </p>
-
-</p>
-</body>
-</html>
+<html>
+<title> Text Area Package </title>
+<body>
+
+<p> Since jEdit 4.2, many TextArea classes have been split into a base and derived class. This
+is an attempt to make an API partition for the standalone text area. So for example: </p>
+
+<ul>
+<li> @ref JEditBuffer and @ref Buffer were split into two classes. </li>
+<li> @ref TextArea and @ref JEditTextArea were also split. </li>
+<li> @ref MouseHandler and @ref TextAreaMouseHandler were split. </li>
+<li> @ref JEditEmbeddedTextArea is a new class for jEdit plugins to reuse. </li>
+<li> @ref StandaloneTextArea is a new class for other open source Java applications to reuse. </li>
+</ul>
+
+<h2> Keeping things separate </h2>
+
+<p>
+The embeddable TextArea includes the packages "textarea", "buffer", "syntax", and should
+include nothing else. This means that for the standalone and abstract base classes,
+we should only use classes from that set.
+</p>
+
+<p> To build the standalone textarea, "ant build-textArea", and you'll quickly see if you
+broke something by using a class that was not supposed to be used. </p>
+
+</p>
+</body>
+</html>
diff --git a/jEdit/org/gjt/sp/jedit/textarea/textarea.actions.xml b/jEdit/org/gjt/sp/jedit/textarea/textarea.actions.xml
index e78842b..f86e712 100644
--- a/jEdit/org/gjt/sp/jedit/textarea/textarea.actions.xml
+++ b/jEdit/org/gjt/sp/jedit/textarea/textarea.actions.xml
@@ -37,6 +37,12 @@
</CODE>
</ACTION>
+<ACTION NAME="backspace-word-std-after">
+ <CODE>
+ textArea.backspaceWord(true, true);
+ </CODE>
+</ACTION>
+
<ACTION NAME="center-caret">
<CODE>
textArea.centerCaret();
@@ -365,6 +371,12 @@
</CODE>
</ACTION>
+<ACTION NAME="prev-word-std-after">
+ <CODE>
+ textArea.goToPrevWord(false,true,true);
+ </CODE>
+</ACTION>
+
<ACTION NAME="range-comment">
<CODE>
textArea.rangeComment();
@@ -586,6 +598,12 @@
</CODE>
</ACTION>
+<ACTION NAME="select-prev-word-std-after">
+ <CODE>
+ textArea.goToPrevWord(true,true,true);
+ </CODE>
+</ACTION>
+
<ACTION NAME="select-visible-home">
<CODE>
textArea.goToFirstVisibleLine(true);
diff --git a/jEdit/org/gjt/sp/jedit/visitors/JEditVisitor.java b/jEdit/org/gjt/sp/jedit/visitors/JEditVisitor.java
index dd2ab36..80bea24 100644
--- a/jEdit/org/gjt/sp/jedit/visitors/JEditVisitor.java
+++ b/jEdit/org/gjt/sp/jedit/visitors/JEditVisitor.java
@@ -1,60 +1,60 @@
-/*
- * JEditVisitor.java - A Visitor pattern for jEdit
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.visitors;
-
-//{{{ Imports
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-//}}}
-
-/**
- * A visitor that can visit a View, an EditPane or a JEditTextArea.
- * You can also extends the default implementation JEditVisitorAdapter
- * To use this visitor.
- * @see jEdit#visit(JEditVisitor)
- * @see View#visit(JEditVisitor)
- *
- * @author Matthieu Casanova
- * @version $Id: GUIUtilities.java 11797 2008-02-15 00:07:23Z Vampire0 $
- * @since jEdit 4.3pre13
- */
-public interface JEditVisitor
-{
- /**
- * Visit a view.
- * @param view the visited view
- */
- void visit(View view);
-
- /**
- * Visit an EditPane.
- * @param editPane the visited edit pane
- */
- void visit(EditPane editPane);
-
- /**
- * Visit a view.
- * @param textArea the visited textArea
- */
- void visit(JEditTextArea textArea);
-}
+/*
+ * JEditVisitor.java - A Visitor pattern for jEdit
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.visitors;
+
+//{{{ Imports
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+//}}}
+
+/**
+ * A visitor that can visit a View, an EditPane or a JEditTextArea.
+ * You can also extends the default implementation JEditVisitorAdapter
+ * To use this visitor.
+ * @see jEdit#visit(JEditVisitor)
+ * @see View#visit(JEditVisitor)
+ *
+ * @author Matthieu Casanova
+ * @version $Id: GUIUtilities.java 11797 2008-02-15 00:07:23Z Vampire0 $
+ * @since jEdit 4.3pre13
+ */
+public interface JEditVisitor
+{
+ /**
+ * Visit a view.
+ * @param view the visited view
+ */
+ void visit(View view);
+
+ /**
+ * Visit an EditPane.
+ * @param editPane the visited edit pane
+ */
+ void visit(EditPane editPane);
+
+ /**
+ * Visit a view.
+ * @param textArea the visited textArea
+ */
+ void visit(JEditTextArea textArea);
+}
diff --git a/jEdit/org/gjt/sp/jedit/visitors/JEditVisitorAdapter.java b/jEdit/org/gjt/sp/jedit/visitors/JEditVisitorAdapter.java
index 8dd23e2..1df518b 100644
--- a/jEdit/org/gjt/sp/jedit/visitors/JEditVisitorAdapter.java
+++ b/jEdit/org/gjt/sp/jedit/visitors/JEditVisitorAdapter.java
@@ -1,62 +1,62 @@
-/*
- * JEditVisitorAdapter.java - A default JEditVisitor implementation
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.visitors;
-
-//{{{ Imports
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.textarea.JEditTextArea;
-//}}}
-
-/**
- * A visitor that can visit a View, an EditPane or a JEditTextArea.
- *
- * @author Matthieu Casanova
- * @version $Id: GUIUtilities.java 11797 2008-02-15 00:07:23Z Vampire0 $
- * @since jEdit 4.3pre13
- */
-public class JEditVisitorAdapter implements JEditVisitor
-{
- /**
- * Visit a view.
- * @param view the visited view
- */
- public void visit(View view)
- {
- }
-
- /**
- * Visit an EditPane.
- * @param editPane the visited edit pane
- */
- public void visit(EditPane editPane)
- {
- }
-
- /**
- * Visit a JEditTextArea.
- * @param textArea the visited textArea
- */
- public void visit(JEditTextArea textArea)
- {
- }
-}
+/*
+ * JEditVisitorAdapter.java - A default JEditVisitor implementation
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.visitors;
+
+//{{{ Imports
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.textarea.JEditTextArea;
+//}}}
+
+/**
+ * A visitor that can visit a View, an EditPane or a JEditTextArea.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: GUIUtilities.java 11797 2008-02-15 00:07:23Z Vampire0 $
+ * @since jEdit 4.3pre13
+ */
+public class JEditVisitorAdapter implements JEditVisitor
+{
+ /**
+ * Visit a view.
+ * @param view the visited view
+ */
+ public void visit(View view)
+ {
+ }
+
+ /**
+ * Visit an EditPane.
+ * @param editPane the visited edit pane
+ */
+ public void visit(EditPane editPane)
+ {
+ }
+
+ /**
+ * Visit a JEditTextArea.
+ * @param textArea the visited textArea
+ */
+ public void visit(JEditTextArea textArea)
+ {
+ }
+}
diff --git a/jEdit/org/gjt/sp/jedit/visitors/SaveCaretInfoVisitor.java b/jEdit/org/gjt/sp/jedit/visitors/SaveCaretInfoVisitor.java
index 7d6a2d8..d42f34a 100644
--- a/jEdit/org/gjt/sp/jedit/visitors/SaveCaretInfoVisitor.java
+++ b/jEdit/org/gjt/sp/jedit/visitors/SaveCaretInfoVisitor.java
@@ -1,38 +1,38 @@
-/*
- * SaveCaretInfoVisitor.java - A visitor that save the carets info of the edit
- * panes
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2008 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.jedit.visitors;
-
-import org.gjt.sp.jedit.EditPane;
-
-/**
- * @author Matthieu Casanova
- */
-public class SaveCaretInfoVisitor extends JEditVisitorAdapter
-{
- @Override
- public void visit(EditPane editPane)
- {
- editPane.saveCaretInfo();
- }
-}
+/*
+ * SaveCaretInfoVisitor.java - A visitor that save the carets info of the edit
+ * panes
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2008 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.visitors;
+
+import org.gjt.sp.jedit.EditPane;
+
+/**
+ * @author Matthieu Casanova
+ */
+public class SaveCaretInfoVisitor extends JEditVisitorAdapter
+{
+ @Override
+ public void visit(EditPane editPane)
+ {
+ editPane.saveCaretInfo();
+ }
+}
diff --git a/jEdit/org/gjt/sp/util/HtmlUtilities.java b/jEdit/org/gjt/sp/util/HtmlUtilities.java
new file mode 100644
index 0000000..ea887d1
--- /dev/null
+++ b/jEdit/org/gjt/sp/util/HtmlUtilities.java
@@ -0,0 +1,192 @@
+/*
+ * HtmlUtilities.java - HTML utility functions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Shlomy Reinstein
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.util.List;
+
+import org.gjt.sp.jedit.syntax.SyntaxStyle;
+
+/**
+ * HTML utility methods for conversion of strings to HTML and highlighting matches
+ * in search results.
+ * Some of these methods were moved here from HyperSearchResults.HighlightingTree
+ * to make them available for plugins.
+ *
+ * @author Shlomy Reinstein
+ * @version $Id: $
+ * @since 4.4pre1
+ */
+
+public class HtmlUtilities
+{
+ //{{{ public section
+
+ //{{{ parseHighlightStyle()
+ /**
+ * Parses a string specifying a syntax highlight style.
+ *
+ * The syntax highlight string should be in the same format used to
+ * store syntax highlight styles in the properties.
+ *
+ * @param style The syntax highlight style string.
+ * @param f The font to which the syntax style will apply.
+ * @return The SyntaxStyle object represented by the style string.
+ */
+ public static SyntaxStyle parseHighlightStyle(String style, Font f)
+ {
+ SyntaxStyle s;
+ try
+ {
+ s = SyntaxUtilities.parseStyle(style, f.getFamily(), f.getSize(), true, null);
+ }
+ catch (Exception e)
+ {
+ style = "color:#000000";
+ s = SyntaxUtilities.parseStyle(style, f.getFamily(), f.getSize(), true);
+ }
+ return s;
+ } //}}}
+
+ //{{{ style2html()
+ /**
+ * Parses a string specifying a syntax highlight style, and creates an
+ * HTML representation for it.
+ *
+ * The syntax highlight string should be in the same format used to
+ * store syntax highlight styles in the properties.
+ *
+ * @param prop The syntax highlight style string.
+ * @param f The font to which the syntax style will apply.
+ * @return The HTML representation of the given syntax style.
+ */
+ public static String style2html(String prop, Font f)
+ {
+ StringBuilder tag = new StringBuilder();
+ SyntaxStyle style = parseHighlightStyle(prop, f);
+ Color c = style.getForegroundColor();
+ if (c != null)
+ tag.append("color:").append(color2html(c));
+ c = style.getBackgroundColor();
+ if (c != null)
+ tag.append("background:").append(color2html(c));
+ f = style.getFont();
+ if (f.isBold())
+ tag.append("font-weight:bold;");
+ if (f.isItalic())
+ tag.append("font-style: italic;");
+ return tag.toString();
+ } //}}}
+
+ //{{{ highlightString()
+ /**
+ * Creates an HTML presentation of a given string, where selected substrings
+ * are highlighted with a given syntax style tag.
+ *
+ * @param s The (non-HTML) string to highlight.
+ * @param styleTag The HTML string representing the highlight style.
+ * @param ranges The indices of the substrings to highlight, in pairs: The start
+ * index of a substring followed by the end index of the substring.
+ * @return The HTML representation of the string with highlighted substrings.
+ */
+ public static String highlightString(String s, String styleTag, List<Integer> ranges)
+ {
+ StringBuilder sb = new StringBuilder("<html><style>.highlight {");
+ sb.append(styleTag);
+ sb.append("}</style><body>");
+ int lastIndex = 0;
+ for (int i = 0; i < ranges.size(); i += 2)
+ {
+ int rangeStart = ranges.get(i);
+ int rangeEnd = ranges.get(i + 1);
+ appendString2html(sb, s.substring(lastIndex, rangeStart));
+ sb.append("<span class=\"highlight\">");
+ appendString2html(sb, s.substring(rangeStart, rangeEnd));
+ sb.append("</span>");
+ lastIndex = rangeEnd;
+ }
+ appendString2html(sb, s.substring(lastIndex));
+ sb.append("</body></html>");
+ return sb.toString();
+ } //}}}
+
+ //{{{ appendString2html
+ /**
+ * Appends a given non-HTML string to an HTML string, translating character
+ * entities to the appropriate HTML form.
+ *
+ * @param sb The HTML string to which the non-HTML string is appended.
+ * @param s The non-HTML string to append.
+ */
+ public static void appendString2html(StringBuilder sb, String s)
+ {
+ for (int i = 0; i < s.length(); i++)
+ {
+ char c = s.charAt(i);
+ String r;
+ switch (c)
+ {
+ case '"':
+ r = """;
+ break;
+ // case '\'': r = "'"; break;
+ case '&':
+ r = "&";
+ break;
+ case '<':
+ r = "<";
+ break;
+ case '>':
+ r = ">";
+ break;
+ case ' ':
+ r = " "; // Maintain amount of whitespace in line
+ break;
+ default:
+ r = String.valueOf(c);
+ break;
+ }
+ sb.append(r);
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ private section
+
+ //{{{ color2html()
+ private static String color2html(Color c)
+ {
+ StringBuilder cs = new StringBuilder("rgb(");
+ cs.append(c.getRed());
+ cs.append(",");
+ cs.append(c.getGreen());
+ cs.append(",");
+ cs.append(c.getBlue());
+ cs.append(");");
+ return cs.toString();
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/util/IOUtilities.java b/jEdit/org/gjt/sp/util/IOUtilities.java
index 46ca1f4..2b3d7e5 100644
--- a/jEdit/org/gjt/sp/util/IOUtilities.java
+++ b/jEdit/org/gjt/sp/util/IOUtilities.java
@@ -1,291 +1,292 @@
-/*
- * IOUtilities.java - IO related functions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-import java.io.*;
-
-/**
- * IO tools that depends on JDK only.
- *
- * @author Matthieu Casanova
- * @version $Id: IOUtilities.java 14929 2009-04-14 18:31:50Z daleanson $
- * @since 4.3pre5
- */
-public class IOUtilities
-{
- //{{{ moveFile() method
- /**
- * Moves the source file to the destination.
- *
- * If the destination cannot be created or is a read-only file, the
- * method returns <code>false</code>. Otherwise, the contents of the
- * source are copied to the destination, the source is deleted,
- * and <code>true</code> is returned.
- *
- * @param source The source file to move.
- * @param dest The destination where to move the file.
- * @return true on success, false otherwise.
- *
- * @since jEdit 4.3pre9
- */
- public static boolean moveFile(File source, File dest)
- {
- boolean ok = false;
-
- if ((dest.exists() && dest.canWrite())
- || (!dest.exists() && dest.getParentFile().canWrite()))
- {
- OutputStream fos = null;
- InputStream fis = null;
- try
- {
- fos = new FileOutputStream(dest);
- fis = new FileInputStream(source);
- ok = copyStream(32768,null,fis,fos,false);
- }
- catch (IOException ioe)
- {
- Log.log(Log.WARNING, IOUtilities.class,
- "Error moving file: " + ioe + " : " + ioe.getMessage());
- }
- finally
- {
- closeQuietly(fos);
- closeQuietly(fis);
- }
-
- if(ok)
- source.delete();
- }
- return ok;
- } //}}}
-
- //{{{ copyStream() methods
- /**
- * Copy an input stream to an output stream.
- *
- * @param bufferSize the size of the buffer
- * @param progress the progress observer it could be null
- * @param in the input stream
- * @param out the output stream
- * @param canStop if true, the copy can be stopped by interrupting the thread
- * @return <code>true</code> if the copy was done, <code>false</code> if it was interrupted
- * @throws IOException IOException If an I/O error occurs
- */
- public static boolean copyStream(int bufferSize, ProgressObserver progress,
- InputStream in, OutputStream out, boolean canStop)
- throws IOException
- {
- byte[] buffer = new byte[bufferSize];
- int n;
- long copied = 0L;
- while (-1 != (n = in.read(buffer)))
- {
- out.write(buffer, 0, n);
- copied += n;
- if(progress != null)
- progress.setValue(copied);
- if(canStop && Thread.interrupted()) return false;
- }
- return true;
- }
-
- /**
- * Copy an input stream to an output stream with a buffer of 4096 bytes.
- *
- * @param progress the progress observer it could be null
- * @param in the input stream
- * @param out the output stream
- * @param canStop if true, the copy can be stopped by interrupting the thread
- * @return <code>true</code> if the copy was done, <code>false</code> if it was interrupted
- * @throws IOException IOException If an I/O error occurs
- */
- public static boolean copyStream(ProgressObserver progress,
- InputStream in, OutputStream out, boolean canStop)
- throws IOException
- {
- return copyStream(4096,progress, in, out, canStop);
- } //}}}
-
- //{{{ fileLength() method
- /**
- * Returns the length of a file. If it is a directory it will calculate recursively the length.
- *
- * @param file the file or directory
- * @return the length of the file or directory. If the file doesn't exist it will return 0
- * @since 4.3pre10
- */
- public static long fileLength(File file)
- {
- long length = 0L;
- if (file.isFile())
- length = file.length();
- else if (file.isDirectory())
- {
- File[] files = file.listFiles();
- for (int i = 0; i < files.length; i++)
- {
- length += fileLength(files[i]);
- }
- }
- return length;
- } // }}}
-
- //{{{ closeQuietly() methods
- /**
- * Method that will close an {@link InputStream} ignoring it if it is null and ignoring exceptions.
- *
- * @param in the InputStream to close.
- */
- public static void closeQuietly(InputStream in)
- {
- if(in != null)
- {
- try
- {
- in.close();
- }
- catch (IOException e)
- {
- //ignore
- }
- }
- }
-
- /**
- * Method that will close an {@link OutputStream} ignoring it if it is null and ignoring exceptions.
- *
- * @param out the OutputStream to close.
- */
- public static void closeQuietly(OutputStream out)
- {
- if(out != null)
- {
- try {
- if (out instanceof Flushable)
- {
- ((Flushable)out).flush();
- }
- }
- catch (IOException e)
- {
- // ignore
- }
- try
- {
- out.close();
- }
- catch (IOException e)
- {
- //ignore
- }
- }
- }
-
- /**
- * Method that will close an {@link Reader} ignoring it if it is null and ignoring exceptions.
- *
- * @param r the Reader to close.
- * @since jEdit 4.3pre5
- */
- public static void closeQuietly(Reader r)
- {
- if(r != null)
- {
- try
- {
- r.close();
- }
- catch (IOException e)
- {
- //ignore
- }
- }
- }
-
- /**
- * Method that will close a {@link Writer} ignoring it if it is null and ignoring exceptions.
- *
- * @param out the Writer to close.
- */
- public static void closeQuietly(Writer out)
- {
- if(out != null)
- {
- try {
- if (out instanceof Flushable)
- {
- ((Flushable)out).flush();
- }
- }
- catch (IOException e)
- {
- // ignore
- }
- try
- {
- out.close();
- }
- catch (IOException e)
- {
- //ignore
- }
- }
- }
-
- /**
- * Method that will close an {@link java.io.Closeable} ignoring it if it is null and ignoring exceptions.
- *
- * @param closeable the closeable to close.
- * @since jEdit 4.3pre8
- */
- public static void closeQuietly(Closeable closeable)
- {
- if(closeable != null)
- {
- try {
- if (closeable instanceof Flushable)
- {
- ((Flushable)closeable).flush();
- }
- }
- catch (IOException e)
- {
- // ignore
- }
- try
- {
- closeable.close();
- }
- catch (IOException e)
- {
- //ignore
- }
- }
- } //}}}
-
- //{{{ IOUtilities() constructor
- private IOUtilities()
- {
- } //}}}
-}
+/*
+ * IOUtilities.java - IO related functions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+import java.io.*;
+
+/**
+ * IO tools that depends on JDK only.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: IOUtilities.java 17805 2010-05-11 16:56:35Z kpouer $
+ * @since 4.3pre5
+ */
+public class IOUtilities
+{
+ //{{{ moveFile() method
+ /**
+ * Moves the source file to the destination.
+ *
+ * If the destination cannot be created or is a read-only file, the
+ * method returns <code>false</code>. Otherwise, the contents of the
+ * source are copied to the destination, the source is deleted,
+ * and <code>true</code> is returned.
+ *
+ * @param source The source file to move.
+ * @param dest The destination where to move the file.
+ * @return true on success, false otherwise.
+ *
+ * @since jEdit 4.3pre9
+ */
+ public static boolean moveFile(File source, File dest)
+ {
+ boolean ok = false;
+
+ if ((dest.exists() && dest.canWrite())
+ || (!dest.exists() && dest.getParentFile().canWrite()))
+ {
+ OutputStream fos = null;
+ InputStream fis = null;
+ try
+ {
+ fos = new FileOutputStream(dest);
+ fis = new FileInputStream(source);
+ ok = copyStream(32768,null,fis,fos,false);
+ }
+ catch (IOException ioe)
+ {
+ Log.log(Log.WARNING, IOUtilities.class,
+ "Error moving file: " + ioe + " : " + ioe.getMessage());
+ }
+ finally
+ {
+ closeQuietly(fos);
+ closeQuietly(fis);
+ }
+
+ if(ok)
+ source.delete();
+ }
+ return ok;
+ } //}}}
+
+ //{{{ copyStream() methods
+ /**
+ * Copy an input stream to an output stream.
+ *
+ * @param bufferSize the size of the buffer
+ * @param progress the progress observer it could be null
+ * @param in the input stream
+ * @param out the output stream
+ * @param canStop if true, the copy can be stopped by interrupting the thread
+ * @return <code>true</code> if the copy was done, <code>false</code> if it was interrupted
+ * @throws IOException IOException If an I/O error occurs
+ */
+ public static boolean copyStream(int bufferSize, ProgressObserver progress,
+ InputStream in, OutputStream out, boolean canStop)
+ throws IOException
+ {
+ byte[] buffer = new byte[bufferSize];
+ int n;
+ long copied = 0L;
+ while (-1 != (n = in.read(buffer)))
+ {
+ out.write(buffer, 0, n);
+ copied += n;
+ if(progress != null)
+ {
+ progress.setStatus(StandardUtilities.formatFileSize(copied));
+ progress.setValue(copied);
+ }
+ if(canStop && Thread.interrupted())
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Copy an input stream to an output stream with a buffer of 4096 bytes.
+ *
+ * @param progress the progress observer it could be null
+ * @param in the input stream
+ * @param out the output stream
+ * @param canStop if true, the copy can be stopped by interrupting the thread
+ * @return <code>true</code> if the copy was done, <code>false</code> if it was interrupted
+ * @throws IOException IOException If an I/O error occurs
+ */
+ public static boolean copyStream(ProgressObserver progress,
+ InputStream in, OutputStream out, boolean canStop)
+ throws IOException
+ {
+ return copyStream(4096,progress, in, out, canStop);
+ } //}}}
+
+ //{{{ fileLength() method
+ /**
+ * Returns the length of a file. If it is a directory it will calculate recursively the length.
+ *
+ * @param file the file or directory
+ * @return the length of the file or directory. If the file doesn't exist it will return 0
+ * @since 4.3pre10
+ */
+ public static long fileLength(File file)
+ {
+ long length = 0L;
+ if (file.isFile())
+ length = file.length();
+ else if (file.isDirectory())
+ {
+ File[] files = file.listFiles();
+ for (int i = 0; i < files.length; i++)
+ {
+ length += fileLength(files[i]);
+ }
+ }
+ return length;
+ } // }}}
+
+ //{{{ closeQuietly() methods
+ /**
+ * Method that will close an {@link InputStream} ignoring it if it is null and ignoring exceptions.
+ *
+ * @param in the InputStream to close.
+ */
+ public static void closeQuietly(InputStream in)
+ {
+ if(in != null)
+ {
+ try
+ {
+ in.close();
+ }
+ catch (IOException e)
+ {
+ //ignore
+ }
+ }
+ }
+
+ /**
+ * Method that will close an {@link OutputStream} ignoring it if it is null and ignoring exceptions.
+ *
+ * @param out the OutputStream to close.
+ */
+ public static void closeQuietly(OutputStream out)
+ {
+ if(out != null)
+ {
+ try
+ {
+ out.flush();
+ }
+ catch (IOException e)
+ {
+ // ignore
+ }
+ try
+ {
+ out.close();
+ }
+ catch (IOException e)
+ {
+ //ignore
+ }
+ }
+ }
+
+ /**
+ * Method that will close an {@link Reader} ignoring it if it is null and ignoring exceptions.
+ *
+ * @param r the Reader to close.
+ * @since jEdit 4.3pre5
+ */
+ public static void closeQuietly(Reader r)
+ {
+ if(r != null)
+ {
+ try
+ {
+ r.close();
+ }
+ catch (IOException e)
+ {
+ //ignore
+ }
+ }
+ }
+
+ /**
+ * Method that will close a {@link Writer} ignoring it if it is null and ignoring exceptions.
+ *
+ * @param out the Writer to close.
+ */
+ public static void closeQuietly(Writer out)
+ {
+ if(out != null)
+ {
+ try
+ {
+ out.flush();
+ }
+ catch (IOException e)
+ {
+ // ignore
+ }
+ try
+ {
+ out.close();
+ }
+ catch (IOException e)
+ {
+ //ignore
+ }
+ }
+ }
+
+ /**
+ * Method that will close an {@link java.io.Closeable} ignoring it if it is null and ignoring exceptions.
+ *
+ * @param closeable the closeable to close.
+ * @since jEdit 4.3pre8
+ */
+ public static void closeQuietly(Closeable closeable)
+ {
+ if(closeable != null)
+ {
+ try
+ {
+ if (closeable instanceof Flushable)
+ {
+ ((Flushable)closeable).flush();
+ }
+ }
+ catch (IOException e)
+ {
+ // ignore
+ }
+ try
+ {
+ closeable.close();
+ }
+ catch (IOException e)
+ {
+ //ignore
+ }
+ }
+ } //}}}
+
+ //{{{ IOUtilities() constructor
+ private IOUtilities()
+ {
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/util/IntegerArray.java b/jEdit/org/gjt/sp/util/IntegerArray.java
index eda18e9..ce12ed2 100644
--- a/jEdit/org/gjt/sp/util/IntegerArray.java
+++ b/jEdit/org/gjt/sp/util/IntegerArray.java
@@ -1,89 +1,89 @@
-/*
- * IntegerArray.java - Automatically growing array of ints
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-/**
- * A simple collection that stores integers and grows automatically.
- */
-public class IntegerArray
-{
- //{{{ IntegerArray constructor
- public IntegerArray()
- {
- this(2000);
- } //}}}
-
- //{{{ IntegerArray constructor
- public IntegerArray(int initialSize)
- {
- array = new int[initialSize];
- } //}}}
-
- //{{{ add() method
- public void add(int num)
- {
- if(len >= array.length)
- {
- int[] arrayN = new int[len * 2];
- System.arraycopy(array,0,arrayN,0,len);
- array = arrayN;
- }
-
- array[len++] = num;
- } //}}}
-
- //{{{ get() method
- public final int get(int index)
- {
- return array[index];
- } //}}}
-
- //{{{ getSize() method
- public final int getSize()
- {
- return len;
- } //}}}
-
- //{{{ setSize() method
- public final void setSize(int len)
- {
- this.len = len;
- } //}}}
-
- //{{{ clear() method
- public final void clear()
- {
- len = 0;
- } //}}}
-
- //{{{ getArray() method
- public int[] getArray()
- {
- return array;
- } //}}}
-
- //{{{ Private members
- private int[] array;
- private int len;
- //}}}
-}
+/*
+ * IntegerArray.java - Automatically growing array of ints
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+/**
+ * A simple collection that stores integers and grows automatically.
+ */
+public class IntegerArray
+{
+ //{{{ IntegerArray constructor
+ public IntegerArray()
+ {
+ this(2000);
+ } //}}}
+
+ //{{{ IntegerArray constructor
+ public IntegerArray(int initialSize)
+ {
+ array = new int[initialSize];
+ } //}}}
+
+ //{{{ add() method
+ public void add(int num)
+ {
+ if(len >= array.length)
+ {
+ int[] arrayN = new int[len * 2];
+ System.arraycopy(array,0,arrayN,0,len);
+ array = arrayN;
+ }
+
+ array[len++] = num;
+ } //}}}
+
+ //{{{ get() method
+ public final int get(int index)
+ {
+ return array[index];
+ } //}}}
+
+ //{{{ getSize() method
+ public final int getSize()
+ {
+ return len;
+ } //}}}
+
+ //{{{ setSize() method
+ public final void setSize(int len)
+ {
+ this.len = len;
+ } //}}}
+
+ //{{{ clear() method
+ public final void clear()
+ {
+ len = 0;
+ } //}}}
+
+ //{{{ getArray() method
+ public int[] getArray()
+ {
+ return array;
+ } //}}}
+
+ //{{{ Private members
+ private int[] array;
+ private int len;
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/util/Log.java b/jEdit/org/gjt/sp/util/Log.java
index d235d5a..0ff273c 100644
--- a/jEdit/org/gjt/sp/util/Log.java
+++ b/jEdit/org/gjt/sp/util/Log.java
@@ -1,626 +1,626 @@
-/*
- * Log.java - A class for logging events
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2003 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-//{{{ Imports
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.io.Writer;
-
-import java.text.DateFormat;
-
-import java.util.*;
-
-import javax.swing.event.ListDataEvent;
-import javax.swing.event.ListDataListener;
-
-import javax.swing.ListModel;
-import javax.swing.SwingUtilities;
-
-import static java.text.DateFormat.MEDIUM;
-//}}}
-
-/**
- * This class provides methods for logging events. In terms of functionality,
- * it is somewhere in between <code>System.out.println()</code> and
- * full-blown logging packages such as log4j.<p>
- *
- * All events are logged to an in-memory buffer and optionally a stream,
- * and those with a high urgency (warnings and errors) are also printed
- * to standard output.<p>
- *
- * Logging of exception tracebacks is supported.<p>
- *
- * This class can also optionally redirect standard output and error to the log.
- *
- * @author Slava Pestov
- * @version $Id: Log.java 12789 2008-06-04 21:23:10Z kpouer $
- */
-public class Log
-{
- //{{{ Constants
- /**
- * The maximum number of log messages that will be kept in memory.
- * @since jEdit 2.6pre5
- */
- public static final int MAXLINES = 500;
-
- /**
- * Debugging message urgency. Should be used for messages only
- * useful when debugging a problem.
- * @since jEdit 2.2pre2
- */
- public static final int DEBUG = 1;
-
- /**
- * Message urgency. Should be used for messages which give more
- * detail than notices.
- * @since jEdit 2.2pre2
- */
- public static final int MESSAGE = 3;
-
- /**
- * Notice urgency. Should be used for messages that directly
- * affect the user.
- * @since jEdit 2.2pre2
- */
- public static final int NOTICE = 5;
-
- /**
- * Warning urgency. Should be used for messages that warrant
- * attention.
- * @since jEdit 2.2pre2
- */
- public static final int WARNING = 7;
-
- /**
- * Error urgency. Should be used for messages that signal a
- * failure.
- * @since jEdit 2.2pre2
- */
- public static final int ERROR = 9;
- //}}}
-
- //{{{ init() method
- /**
- * Initializes the log.
- * @param stdio If true, standard output and error will be
- * sent to the log
- * @param level Messages with this log level or higher will
- * be printed to the system console
- * @since jEdit 3.2pre4
- */
- public static void init(boolean stdio, int level)
- {
- if(stdio)
- {
- if(System.out == realOut && System.err == realErr)
- {
- System.setOut(createPrintStream(NOTICE,null));
- System.setErr(createPrintStream(ERROR,null));
- }
- }
-
- Log.level = level;
-
- // Log some stuff
- log(MESSAGE,Log.class,"When reporting bugs, please"
- + " include the following information:");
- String[] props = {
- "java.version", "java.vm.version", "java.runtime.version",
- "java.vendor", "java.compiler", "os.name", "os.version",
- "os.arch", "user.home", "java.home",
- "java.class.path",
- };
- for(int i = 0; i < props.length; i++)
- {
- log(MESSAGE,Log.class,
- props[i] + '=' + System.getProperty(props[i]));
- }
- } //}}}
-
- //{{{ setLogWriter() method
- /**
- * Writes all currently logged messages to this stream if there was no
- * stream set previously, and sets the stream to write future log
- * messages to.
- * @param stream The writer
- * @since jEdit 3.2pre4
- */
- public static void setLogWriter(Writer stream)
- {
- if(Log.stream == null && stream != null)
- {
- try
- {
- if(wrap)
- {
- for(int i = logLineCount; i < log.length; i++)
- {
- stream.write(log[i]);
- stream.write(lineSep);
- }
- }
- for(int i = 0; i < logLineCount; i++)
- {
- stream.write(log[i]);
- stream.write(lineSep);
- }
-
- stream.flush();
- }
- catch(Exception e)
- {
- // do nothing, who cares
- }
- }
-
- Log.stream = stream;
- } //}}}
-
- //{{{ flushStream() method
- /**
- * Flushes the log stream.
- * @since jEdit 2.6pre5
- */
- public static void flushStream()
- {
- if(stream != null)
- {
- try
- {
- stream.flush();
- }
- catch(IOException io)
- {
- io.printStackTrace(realErr);
- }
- }
- } //}}}
-
- //{{{ closeStream() method
- /**
- * Closes the log stream. Should be done before your program exits.
- * @since jEdit 2.6pre5
- */
- public static void closeStream()
- {
- if(stream != null)
- {
- try
- {
- stream.close();
- stream = null;
- }
- catch(IOException io)
- {
- io.printStackTrace(realErr);
- }
- }
- } //}}}
-
- //{{{ getLogListModel() method
- /**
- * Returns the list model for viewing the log contents.
- * @since jEdit 4.2pre1
- */
- public static ListModel getLogListModel()
- {
- return listModel;
- } //}}}
-
- //{{{ log() method
- /**
- * Logs an exception with a message.
- *
- * If an exception is the cause of a call to {@link #log}, then
- * the exception should be explicitly provided so that it can
- * be presented to the (debugging) user in a useful manner
- * (not just the exception message, but also the exception stack trace)
- *
- * @since jEdit 4.3pre5
- */
- public static void log(int urgency, Object source, Object message,
- Throwable exception)
- {
- // We can do nicer here, but this is a start...
- log(urgency,source,message);
- log(urgency,source,exception);
- } //}}}
-
- //{{{ log() method
- /**
- * Logs a message. This method is thread-safe.<p>
- *
- * The following code sends a typical debugging message to the activity
- * log:
- * <pre>Log.log(Log.DEBUG,this,"counter = " + counter);</pre>
- * The corresponding activity log entry might read as follows:
- * <pre>[debug] JavaParser: counter = 15</pre>
- *
- * @param urgency The urgency; can be one of
- * <code>Log.DEBUG</code>, <code>Log.MESSAGE</code>,
- * <code>Log.NOTICE</code>, <code>Log.WARNING</code>, or
- * <code>Log.ERROR</code>.
- * @param source The source of the message, either an object or a
- * class instance. When writing log messages from macros, set
- * this parameter to <code>BeanShell.class</code> to make macro
- * errors easier to spot in the activity log.
- * @param message The message. This can either be a string or
- * an exception
- *
- * @since jEdit 2.2pre2
- */
- public static void log(int urgency, Object source, Object message)
- {
- String _source;
- if(source == null)
- {
- _source = Thread.currentThread().getName();
- if(_source == null)
- {
- _source = Thread.currentThread().getClass().getName();
- }
- }
- else if(source instanceof Class)
- _source = ((Class)source).getName();
- else
- _source = source.getClass().getName();
- int index = _source.lastIndexOf('.');
- if(index != -1)
- _source = _source.substring(index+1);
-
- if(message instanceof Throwable)
- {
- _logException(urgency,source,(Throwable)message);
- }
- else
- {
- String _message = String.valueOf(message);
- // If multiple threads log stuff, we don't want
- // the output to get mixed up
- synchronized(LOCK)
- {
- StringTokenizer st = new StringTokenizer(
- _message,"\r\n");
- int lineCount = 0;
- boolean oldWrap = wrap;
- while(st.hasMoreTokens())
- {
- lineCount++;
- _log(urgency,_source,st.nextToken()
- .replace('\t',' '));
- }
- listModel.update(lineCount,oldWrap);
- }
- }
- } //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private static final Object LOCK;
- private static final String[] log;
- private static int logLineCount;
- private static boolean wrap;
- private static int level;
- private static Writer stream;
- private static final String lineSep;
- private static final PrintStream realOut;
- private static final PrintStream realErr;
- private static final LogListModel listModel;
- private static final DateFormat timeFormat;
- private static final int MAX_THROWABLES = 10;
- public static final List<Throwable> throwables;
- //}}}
-
- //{{{ Class initializer
- static
- {
- LOCK = new Object();
- level = WARNING;
-
- realOut = System.out;
- realErr = System.err;
-
- log = new String[MAXLINES];
- lineSep = System.getProperty("line.separator");
- listModel = new LogListModel();
-
- timeFormat = DateFormat.getTimeInstance(MEDIUM);
- throwables = Collections.synchronizedList(new ArrayList<Throwable>(MAX_THROWABLES));
- } //}}}
-
- //{{{ createPrintStream() method
- private static PrintStream createPrintStream(final int urgency,
- final Object source)
- {
- return new LogPrintStream(urgency, source);
- } //}}}
-
- //{{{ _logException() method
- private static void _logException(final int urgency,
- final Object source,
- final Throwable message)
- {
- PrintStream out = createPrintStream(urgency,source);
- if (urgency >= level)
- {
- synchronized (throwables)
- {
- if (throwables.size() == MAX_THROWABLES)
- {
- throwables.remove(0);
- }
- throwables.add(message);
- }
- }
- synchronized(LOCK)
- {
- message.printStackTrace(out);
- }
- } //}}}
-
- //{{{ _log() method
- private static void _log(int urgency, String source, String message)
- {
- String fullMessage = timeFormat.format(new Date()) + " ["+Thread.currentThread().getName()+"] [" + urgencyToString(urgency) + "] " + source
- + ": " + message;
-
- try
- {
- log[logLineCount] = fullMessage;
- if(++logLineCount >= log.length)
- {
- wrap = true;
- logLineCount = 0;
- }
-
- if(stream != null)
- {
- stream.write(fullMessage);
- stream.write(lineSep);
- }
- }
- catch(Exception e)
- {
- e.printStackTrace(realErr);
- }
-
- if(urgency >= level)
- {
- if(urgency == ERROR)
- realErr.println(fullMessage);
- else
- realOut.println(fullMessage);
- }
- } //}}}
-
- //{{{ urgencyToString() method
- private static String urgencyToString(int urgency)
- {
- switch(urgency)
- {
- case DEBUG:
- return "debug";
- case MESSAGE:
- return "message";
- case NOTICE:
- return "notice";
- case WARNING:
- return "warning";
- case ERROR:
- return "error";
- }
-
- throw new IllegalArgumentException("Invalid urgency: " + urgency);
- } //}}}
-
- //}}}
-
- //{{{ LogListModel class
- static class LogListModel implements ListModel
- {
- final List<ListDataListener> listeners = new ArrayList<ListDataListener>();
-
- //{{{ fireIntervalAdded() method
- private void fireIntervalAdded(int index1, int index2)
- {
- for(int i = 0; i < listeners.size(); i++)
- {
- ListDataListener listener = listeners.get(i);
- listener.intervalAdded(new ListDataEvent(this,
- ListDataEvent.INTERVAL_ADDED,
- index1,index2));
- }
- } //}}}
-
- //{{{ fireIntervalRemoved() method
- private void fireIntervalRemoved(int index1, int index2)
- {
- for(int i = 0; i < listeners.size(); i++)
- {
- ListDataListener listener = listeners.get(i);
- listener.intervalRemoved(new ListDataEvent(this,
- ListDataEvent.INTERVAL_REMOVED,
- index1,index2));
- }
- } //}}}
-
- //{{{ addListDataListener() method
- public void addListDataListener(ListDataListener listener)
- {
- listeners.add(listener);
- } //}}}
-
- //{{{ removeListDataListener() method
- public void removeListDataListener(ListDataListener listener)
- {
- listeners.remove(listener);
- } //}}}
-
- //{{{ getElementAt() method
- public Object getElementAt(int index)
- {
- if(wrap)
- {
- if(index < MAXLINES - logLineCount)
- return log[index + logLineCount];
- else
- return log[index - MAXLINES + logLineCount];
- }
- else
- return log[index];
- } //}}}
-
- //{{{ getSize() method
- public int getSize()
- {
- if(wrap)
- return MAXLINES;
- else
- return logLineCount;
- } //}}}
-
- //{{{ update() method
- void update(final int lineCount, final boolean oldWrap)
- {
- if(lineCount == 0 || listeners.isEmpty())
- return;
-
- SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- if(wrap)
- {
- if(oldWrap)
- fireIntervalRemoved(0,lineCount - 1);
- else
- {
- fireIntervalRemoved(0,
- logLineCount);
- }
- fireIntervalAdded(
- MAXLINES - lineCount + 1,
- MAXLINES);
- }
- else
- {
- fireIntervalAdded(
- logLineCount - lineCount + 1,
- logLineCount);
- }
- }
- });
- } //}}}
- } //}}}
-
- //{{{ LogPrintStream class
- /**
- * A print stream that uses the "Log" class to output the messages,
- * and has special treatment for the printf() function. Using this
- * stream has one caveat: printing messages that don't have a line
- * break at the end will have one added automatically...
- */
- private static class LogPrintStream extends PrintStream {
-
- private final ByteArrayOutputStream buffer;
- private final OutputStream orig;
-
- //{{{ LogPrintStream constructor
- LogPrintStream(int urgency, Object source)
- {
- super(new LogOutputStream(urgency, source));
- buffer = new ByteArrayOutputStream();
- orig = out;
- } //}}}
-
- //{{{ printf() method
- /**
- * This is a hack to allow "printf" to not print weird
- * stuff to the output. Since "printf" doesn't seem to
- * print the whole message in one shot, our output
- * stream above would break a line of log into several
- * lines; so we buffer the result of the printf call and
- * print the whole thing in one shot. A similar hack
- * would be needed for the "other" printf method, but
- * I'll settle for the common case only.
- */
- public PrintStream printf(String format, Object... args)
- {
- synchronized (orig)
- {
- buffer.reset();
- out = buffer;
- super.printf(format, args);
-
- try
- {
- byte[] data = buffer.toByteArray();
- orig.write(data, 0, data.length);
- out = orig;
- }
- catch (IOException ioe)
- {
- // don't do anything?
- }
- finally
- {
- buffer.reset();
- }
- }
- return this;
- } //}}}
- } //}}}
-
- //{{{ LogOutputStream class
- private static class LogOutputStream extends OutputStream
- {
- private final int urgency;
- private final Object source;
-
- //{{{ LogOutputStream constructor
- LogOutputStream(int urgency, Object source)
- {
- this.urgency = urgency;
- this.source = source;
- } //}}}
-
- //{{{ write() method
- public synchronized void write(int b)
- {
- byte[] barray = { (byte)b };
- write(barray,0,1);
- } //}}}
-
- //{{{ write() method
- public synchronized void write(byte[] b, int off, int len)
- {
- String str = new String(b,off,len);
- log(urgency,source,str);
- } //}}}
- } //}}}
-}
+/*
+ * Log.java - A class for logging events
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2003 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+//{{{ Imports
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.io.Writer;
+
+import java.text.DateFormat;
+
+import java.util.*;
+
+import javax.swing.event.ListDataEvent;
+import javax.swing.event.ListDataListener;
+
+import javax.swing.ListModel;
+import javax.swing.SwingUtilities;
+
+import static java.text.DateFormat.MEDIUM;
+//}}}
+
+/**
+ * This class provides methods for logging events. In terms of functionality,
+ * it is somewhere in between <code>System.out.println()</code> and
+ * full-blown logging packages such as log4j.<p>
+ *
+ * All events are logged to an in-memory buffer and optionally a stream,
+ * and those with a high urgency (warnings and errors) are also printed
+ * to standard output.<p>
+ *
+ * Logging of exception tracebacks is supported.<p>
+ *
+ * This class can also optionally redirect standard output and error to the log.
+ *
+ * @author Slava Pestov
+ * @version $Id: Log.java 18221 2010-07-19 16:19:45Z daleanson $
+ */
+public class Log
+{
+ //{{{ Constants
+ /**
+ * The maximum number of log messages that will be kept in memory.
+ * @since jEdit 2.6pre5
+ */
+ public static int MAXLINES = 500;
+
+ /**
+ * Debugging message urgency. Should be used for messages only
+ * useful when debugging a problem.
+ * @since jEdit 2.2pre2
+ */
+ public static final int DEBUG = 1;
+
+ /**
+ * Message urgency. Should be used for messages which give more
+ * detail than notices.
+ * @since jEdit 2.2pre2
+ */
+ public static final int MESSAGE = 3;
+
+ /**
+ * Notice urgency. Should be used for messages that directly
+ * affect the user.
+ * @since jEdit 2.2pre2
+ */
+ public static final int NOTICE = 5;
+
+ /**
+ * Warning urgency. Should be used for messages that warrant
+ * attention.
+ * @since jEdit 2.2pre2
+ */
+ public static final int WARNING = 7;
+
+ /**
+ * Error urgency. Should be used for messages that signal a
+ * failure.
+ * @since jEdit 2.2pre2
+ */
+ public static final int ERROR = 9;
+ //}}}
+
+ //{{{ init() method
+ /**
+ * Initializes the log.
+ * @param stdio If true, standard output and error will be
+ * sent to the log
+ * @param level Messages with this log level or higher will
+ * be printed to the system console
+ * @since jEdit 3.2pre4
+ */
+ public static void init(boolean stdio, int level)
+ {
+ if(stdio)
+ {
+ if(System.out == realOut && System.err == realErr)
+ {
+ System.setOut(createPrintStream(NOTICE,null));
+ System.setErr(createPrintStream(ERROR,null));
+ }
+ }
+
+ Log.level = level;
+
+ // Log some stuff
+ log(MESSAGE,Log.class,"When reporting bugs, please"
+ + " include the following information:");
+ String[] props = {
+ "java.version", "java.vm.version", "java.runtime.version",
+ "java.vendor", "java.compiler", "os.name", "os.version",
+ "os.arch", "user.home", "java.home",
+ "java.class.path",
+ };
+ for(int i = 0; i < props.length; i++)
+ {
+ log(MESSAGE,Log.class,
+ props[i] + '=' + System.getProperty(props[i]));
+ }
+ } //}}}
+
+ //{{{ setLogWriter() method
+ /**
+ * Writes all currently logged messages to this stream if there was no
+ * stream set previously, and sets the stream to write future log
+ * messages to.
+ * @param stream The writer
+ * @since jEdit 3.2pre4
+ */
+ public static void setLogWriter(Writer stream)
+ {
+ if(Log.stream == null && stream != null)
+ {
+ try
+ {
+ if(wrap)
+ {
+ for(int i = logLineCount; i < log.length; i++)
+ {
+ stream.write(log[i]);
+ stream.write(lineSep);
+ }
+ }
+ for(int i = 0; i < logLineCount; i++)
+ {
+ stream.write(log[i]);
+ stream.write(lineSep);
+ }
+
+ stream.flush();
+ }
+ catch(Exception e)
+ {
+ // do nothing, who cares
+ }
+ }
+
+ Log.stream = stream;
+ } //}}}
+
+ //{{{ flushStream() method
+ /**
+ * Flushes the log stream.
+ * @since jEdit 2.6pre5
+ */
+ public static void flushStream()
+ {
+ if(stream != null)
+ {
+ try
+ {
+ stream.flush();
+ }
+ catch(IOException io)
+ {
+ io.printStackTrace(realErr);
+ }
+ }
+ } //}}}
+
+ //{{{ closeStream() method
+ /**
+ * Closes the log stream. Should be done before your program exits.
+ * @since jEdit 2.6pre5
+ */
+ public static void closeStream()
+ {
+ if(stream != null)
+ {
+ try
+ {
+ stream.close();
+ stream = null;
+ }
+ catch(IOException io)
+ {
+ io.printStackTrace(realErr);
+ }
+ }
+ } //}}}
+
+ //{{{ getLogListModel() method
+ /**
+ * Returns the list model for viewing the log contents.
+ * @since jEdit 4.2pre1
+ */
+ public static ListModel getLogListModel()
+ {
+ return listModel;
+ } //}}}
+
+ //{{{ log() method
+ /**
+ * Logs an exception with a message.
+ *
+ * If an exception is the cause of a call to {@link #log}, then
+ * the exception should be explicitly provided so that it can
+ * be presented to the (debugging) user in a useful manner
+ * (not just the exception message, but also the exception stack trace)
+ *
+ * @since jEdit 4.3pre5
+ */
+ public static void log(int urgency, Object source, Object message,
+ Throwable exception)
+ {
+ // We can do nicer here, but this is a start...
+ log(urgency,source,message);
+ log(urgency,source,exception);
+ } //}}}
+
+ //{{{ log() method
+ /**
+ * Logs a message. This method is thread-safe.<p>
+ *
+ * The following code sends a typical debugging message to the activity
+ * log:
+ * <pre>Log.log(Log.DEBUG,this,"counter = " + counter);</pre>
+ * The corresponding activity log entry might read as follows:
+ * <pre>[debug] JavaParser: counter = 15</pre>
+ *
+ * @param urgency The urgency; can be one of
+ * <code>Log.DEBUG</code>, <code>Log.MESSAGE</code>,
+ * <code>Log.NOTICE</code>, <code>Log.WARNING</code>, or
+ * <code>Log.ERROR</code>.
+ * @param source The source of the message, either an object or a
+ * class instance. When writing log messages from macros, set
+ * this parameter to <code>BeanShell.class</code> to make macro
+ * errors easier to spot in the activity log.
+ * @param message The message. This can either be a string or
+ * an exception
+ *
+ * @since jEdit 2.2pre2
+ */
+ public static void log(int urgency, Object source, Object message)
+ {
+ String _source;
+ if(source == null)
+ {
+ _source = Thread.currentThread().getName();
+ if(_source == null)
+ {
+ _source = Thread.currentThread().getClass().getName();
+ }
+ }
+ else if(source instanceof Class)
+ _source = ((Class)source).getName();
+ else
+ _source = source.getClass().getName();
+ int index = _source.lastIndexOf('.');
+ if(index != -1)
+ _source = _source.substring(index+1);
+
+ if(message instanceof Throwable)
+ {
+ _logException(urgency,source,(Throwable)message);
+ }
+ else
+ {
+ String _message = String.valueOf(message);
+ // If multiple threads log stuff, we don't want
+ // the output to get mixed up
+ synchronized(LOCK)
+ {
+ StringTokenizer st = new StringTokenizer(
+ _message,"\r\n");
+ int lineCount = 0;
+ boolean oldWrap = wrap;
+ while(st.hasMoreTokens())
+ {
+ lineCount++;
+ _log(urgency,_source,st.nextToken()
+ .replace('\t',' '));
+ }
+ listModel.update(lineCount,oldWrap);
+ }
+ }
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private static final Object LOCK;
+ private static final String[] log;
+ private static int logLineCount;
+ private static boolean wrap;
+ private static int level;
+ private static Writer stream;
+ private static final String lineSep;
+ private static final PrintStream realOut;
+ private static final PrintStream realErr;
+ private static final LogListModel listModel;
+ private static final DateFormat timeFormat;
+ private static final int MAX_THROWABLES = 10;
+ public static final List<Throwable> throwables;
+ //}}}
+
+ //{{{ Class initializer
+ static
+ {
+ LOCK = new Object();
+ level = WARNING;
+
+ realOut = System.out;
+ realErr = System.err;
+
+ log = new String[MAXLINES];
+ lineSep = System.getProperty("line.separator");
+ listModel = new LogListModel();
+
+ timeFormat = DateFormat.getTimeInstance(MEDIUM);
+ throwables = Collections.synchronizedList(new ArrayList<Throwable>(MAX_THROWABLES));
+ } //}}}
+
+ //{{{ createPrintStream() method
+ private static PrintStream createPrintStream(final int urgency,
+ final Object source)
+ {
+ return new LogPrintStream(urgency, source);
+ } //}}}
+
+ //{{{ _logException() method
+ private static void _logException(final int urgency,
+ final Object source,
+ final Throwable message)
+ {
+ PrintStream out = createPrintStream(urgency,source);
+ if (urgency >= level)
+ {
+ synchronized (throwables)
+ {
+ if (throwables.size() == MAX_THROWABLES)
+ {
+ throwables.remove(0);
+ }
+ throwables.add(message);
+ }
+ }
+ synchronized(LOCK)
+ {
+ message.printStackTrace(out);
+ }
+ } //}}}
+
+ //{{{ _log() method
+ private static void _log(int urgency, String source, String message)
+ {
+ String fullMessage = timeFormat.format(new Date()) + " ["+Thread.currentThread().getName()+"] [" + urgencyToString(urgency) + "] " + source
+ + ": " + message;
+
+ try
+ {
+ log[logLineCount] = fullMessage;
+ if(++logLineCount >= log.length)
+ {
+ wrap = true;
+ logLineCount = 0;
+ }
+
+ if(stream != null)
+ {
+ stream.write(fullMessage);
+ stream.write(lineSep);
+ }
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace(realErr);
+ }
+
+ if(urgency >= level)
+ {
+ if(urgency == ERROR)
+ realErr.println(fullMessage);
+ else
+ realOut.println(fullMessage);
+ }
+ } //}}}
+
+ //{{{ urgencyToString() method
+ private static String urgencyToString(int urgency)
+ {
+ switch(urgency)
+ {
+ case DEBUG:
+ return "debug";
+ case MESSAGE:
+ return "message";
+ case NOTICE:
+ return "notice";
+ case WARNING:
+ return "warning";
+ case ERROR:
+ return "error";
+ }
+
+ throw new IllegalArgumentException("Invalid urgency: " + urgency);
+ } //}}}
+
+ //}}}
+
+ //{{{ LogListModel class
+ static class LogListModel implements ListModel
+ {
+ final List<ListDataListener> listeners = new ArrayList<ListDataListener>();
+
+ //{{{ fireIntervalAdded() method
+ private void fireIntervalAdded(int index1, int index2)
+ {
+ for(int i = 0; i < listeners.size(); i++)
+ {
+ ListDataListener listener = listeners.get(i);
+ listener.intervalAdded(new ListDataEvent(this,
+ ListDataEvent.INTERVAL_ADDED,
+ index1,index2));
+ }
+ } //}}}
+
+ //{{{ fireIntervalRemoved() method
+ private void fireIntervalRemoved(int index1, int index2)
+ {
+ for(int i = 0; i < listeners.size(); i++)
+ {
+ ListDataListener listener = listeners.get(i);
+ listener.intervalRemoved(new ListDataEvent(this,
+ ListDataEvent.INTERVAL_REMOVED,
+ index1,index2));
+ }
+ } //}}}
+
+ //{{{ addListDataListener() method
+ public void addListDataListener(ListDataListener listener)
+ {
+ listeners.add(listener);
+ } //}}}
+
+ //{{{ removeListDataListener() method
+ public void removeListDataListener(ListDataListener listener)
+ {
+ listeners.remove(listener);
+ } //}}}
+
+ //{{{ getElementAt() method
+ public Object getElementAt(int index)
+ {
+ if(wrap)
+ {
+ if(index < MAXLINES - logLineCount)
+ return log[index + logLineCount];
+ else
+ return log[index - MAXLINES + logLineCount];
+ }
+ else
+ return log[index];
+ } //}}}
+
+ //{{{ getSize() method
+ public int getSize()
+ {
+ if(wrap)
+ return MAXLINES;
+ else
+ return logLineCount;
+ } //}}}
+
+ //{{{ update() method
+ void update(final int lineCount, final boolean oldWrap)
+ {
+ if(lineCount == 0 || listeners.isEmpty())
+ return;
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ if(wrap)
+ {
+ if(oldWrap)
+ fireIntervalRemoved(0,lineCount - 1);
+ else
+ {
+ fireIntervalRemoved(0,
+ logLineCount);
+ }
+ fireIntervalAdded(
+ MAXLINES - lineCount + 1,
+ MAXLINES);
+ }
+ else
+ {
+ fireIntervalAdded(
+ logLineCount - lineCount + 1,
+ logLineCount);
+ }
+ }
+ });
+ } //}}}
+ } //}}}
+
+ //{{{ LogPrintStream class
+ /**
+ * A print stream that uses the "Log" class to output the messages,
+ * and has special treatment for the printf() function. Using this
+ * stream has one caveat: printing messages that don't have a line
+ * break at the end will have one added automatically...
+ */
+ private static class LogPrintStream extends PrintStream {
+
+ private final ByteArrayOutputStream buffer;
+ private final OutputStream orig;
+
+ //{{{ LogPrintStream constructor
+ LogPrintStream(int urgency, Object source)
+ {
+ super(new LogOutputStream(urgency, source));
+ buffer = new ByteArrayOutputStream();
+ orig = out;
+ } //}}}
+
+ //{{{ printf() method
+ /**
+ * This is a hack to allow "printf" to not print weird
+ * stuff to the output. Since "printf" doesn't seem to
+ * print the whole message in one shot, our output
+ * stream above would break a line of log into several
+ * lines; so we buffer the result of the printf call and
+ * print the whole thing in one shot. A similar hack
+ * would be needed for the "other" printf method, but
+ * I'll settle for the common case only.
+ */
+ public PrintStream printf(String format, Object... args)
+ {
+ synchronized (orig)
+ {
+ buffer.reset();
+ out = buffer;
+ super.printf(format, args);
+
+ try
+ {
+ byte[] data = buffer.toByteArray();
+ orig.write(data, 0, data.length);
+ out = orig;
+ }
+ catch (IOException ioe)
+ {
+ // don't do anything?
+ }
+ finally
+ {
+ buffer.reset();
+ }
+ }
+ return this;
+ } //}}}
+ } //}}}
+
+ //{{{ LogOutputStream class
+ private static class LogOutputStream extends OutputStream
+ {
+ private final int urgency;
+ private final Object source;
+
+ //{{{ LogOutputStream constructor
+ LogOutputStream(int urgency, Object source)
+ {
+ this.urgency = urgency;
+ this.source = source;
+ } //}}}
+
+ //{{{ write() method
+ public synchronized void write(int b)
+ {
+ byte[] barray = { (byte)b };
+ write(barray,0,1);
+ } //}}}
+
+ //{{{ write() method
+ public synchronized void write(byte[] b, int off, int len)
+ {
+ String str = new String(b,off,len);
+ log(urgency,source,str);
+ } //}}}
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/util/ProgressObserver.java b/jEdit/org/gjt/sp/util/ProgressObserver.java
index ad7ccac..c6ecb46 100644
--- a/jEdit/org/gjt/sp/util/ProgressObserver.java
+++ b/jEdit/org/gjt/sp/util/ProgressObserver.java
@@ -1,57 +1,57 @@
-/*
- * ProgressObserver.java - Progression monitor
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-/**
- * Interface used to monitor things that can progress.
- *
- * @author Matthieu Casanova
- * @version $Id: ProgressObserver.java 12504 2008-04-22 23:12:43Z ezust $
- * @since jEdit 4.3pre3
- */
-public interface ProgressObserver
-{
- /**
- * Update the progress value.
- *
- * @param value the new value
- * @since jEdit 4.3pre3
- */
- void setValue(long value);
-
- /**
- * Update the maximum value.
- *
- * @param value the new maximum value
- * @since jEdit 4.3pre3
- */
- void setMaximum(long value);
-
- /**
- * Update the status label.
- *
- * @param status the new status label
- * @since jEdit 4.3pre3
- */
- void setStatus(String status);
-}
+/*
+ * ProgressObserver.java - Progression monitor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+/**
+ * Interface used to monitor things that can progress.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: ProgressObserver.java 12504 2008-04-22 23:12:43Z ezust $
+ * @since jEdit 4.3pre3
+ */
+public interface ProgressObserver
+{
+ /**
+ * Update the progress value.
+ *
+ * @param value the new value
+ * @since jEdit 4.3pre3
+ */
+ void setValue(long value);
+
+ /**
+ * Update the maximum value.
+ *
+ * @param value the new maximum value
+ * @since jEdit 4.3pre3
+ */
+ void setMaximum(long value);
+
+ /**
+ * Update the status label.
+ *
+ * @param status the new status label
+ * @since jEdit 4.3pre3
+ */
+ void setStatus(String status);
+}
diff --git a/jEdit/org/gjt/sp/util/PropertiesBean.java b/jEdit/org/gjt/sp/util/PropertiesBean.java
index 5530d56..7c54e97 100644
--- a/jEdit/org/gjt/sp/util/PropertiesBean.java
+++ b/jEdit/org/gjt/sp/util/PropertiesBean.java
@@ -1,282 +1,282 @@
-/*
- * PropertiesBean.java: a "serializable" Java Bean that uses a
- * java.util.Properties backend.
- * :noTabs=false:
- *
- * Copyright (C) 2006 Marcelo Vanzin
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library 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 Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.gjt.sp.util;
-
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-/**
- * A "java bean" that can serialize itself into a java.util.Properties
- * instance. For the serialization, the class uses the java beans
- * instrospection mechanism to figure out the class's available
- * properties, and saves all the properties as strings in the properties
- * object.
- *
- * <p>Properties are saved based on a "root", which is set up during the
- * instantiation of the object. The properties will be set as
- * <code>root.property_name</code>.</p>
- *
- * <p>Only native types (boolean, char, double, float, int, long, short),
- * Strings, and arrays of those types are supported. Also, nested
- * beans are not supported presently.</p>
- *
- * @author Marcelo Vanzin
- * @since jEdit 4.3pre7
- */
-public abstract class PropertiesBean
-{
-
- // Constructors
-
- /**
- * Creates a new instance with the given root and the default array
- * separator char (':').
- *
- * @param root A non-null string that will be the "root" of the
- * serialized properties.
- */
- protected PropertiesBean(String root)
- {
- this(root, ':');
- }
-
- /**
- * Creates a new instance with the given root and the given array
- * separator character.
- *
- * @param root A non-null string that will be the "root" of the
- * serialized properties.
- * @param arraysep A character that will be used to define the
- * separator of elements of an array property.
- */
- protected PropertiesBean(String root, char arraysep)
- {
- if (root == null)
- throw new IllegalArgumentException("root cannot be null");
- this.root = root;
- this.arraysep = arraysep;
- }
-
- // Public methods
-
- /**
- * Loads the bean's properties from the given object.
- */
- public void load(Properties p)
- {
- try
- {
- PropertyDescriptor[] _props = getPropertyDescriptors();
- for (int i = 0; i < _props.length; i++)
- {
- if ("class".equals(_props[i].getName()))
- continue;
-
- Method _set = _props[i].getWriteMethod();
- if (_set != null)
- {
- String _pname = root + "." + _props[i].getName();
- Object _val = p.getProperty(_pname);
- if (_val != null)
- _val = parse((String)_val, _props[i].getPropertyType());
- try
- {
- _set.invoke(this, _val);
- }
- catch (IllegalArgumentException iae)
- {
- /* Ignore these. */
- }
- }
- }
- }
- catch (Exception e)
- {
- // These exceptions shouldn't occur during normal runtime,
- // so we catch them and print an error message. Users of this
- // class should fix these before releasing the code.
- Log.log(Log.ERROR, this, e);
- }
- }
-
- /**
- * Saves the bean's properties into the given object.
- */
- public void save(Properties p)
- {
- try
- {
- PropertyDescriptor[] _props = getPropertyDescriptors();
- for (int i = 0; i < _props.length; i++)
- {
- if ("class".equals(_props[i].getName()))
- continue;
-
- Method _get = _props[i].getReadMethod();
- if (_get != null)
- {
- Object _val = _get.invoke(this);
- String _pname = root + "." + _props[i].getName();
- if (_val != null)
- p.setProperty(_pname, encode(_val));
- else
- p.remove(_pname);
- }
- }
- }
- catch (Exception e)
- {
- // These exceptions shouldn't occur during normal runtime,
- // so we catch them and print an error message. Users of this
- // class should fix these before releasing the code.
- Log.log(Log.ERROR, this, e);
- }
- }
-
- /**
- * Cleans the entries related to this object from the given object.
- */
- public void clean(Properties p)
- {
-
- try
- {
- PropertyDescriptor[] _props = getPropertyDescriptors();
- for (int i = 0; i < _props.length; i++)
- {
- if ("class".equals(_props[i].getName()))
- continue;
-
- String _pname = root + "." + _props[i].getName();
- p.remove(_pname);
- }
- }
- catch (Exception e)
- {
- // These exceptions shouldn't occur during normal runtime,
- // so we catch them and print an error message. Users of this
- // class should fix these before releasing the code.
- Log.log(Log.ERROR, this, e);
- }
- }
-
- // Private methods
-
- private PropertyDescriptor[] getPropertyDescriptors()
- throws IntrospectionException
- {
- BeanInfo _info = Introspector.getBeanInfo(getClass());
- return _info.getPropertyDescriptors();
- }
-
- private String encode(Object value)
- {
- Class _class = value.getClass();
- if (_class.isArray())
- {
- StringBuilder _val = new StringBuilder();
- int _len = Array.getLength(value);
- for (int i = 0; i < _len; i++)
- {
- String _str = encode(Array.get(value, i));
- if (_str == null)
- return null;
- _val.append(_str);
- if (i < _len - 1)
- _val.append(arraysep);
- }
- return _val.toString();
- }
- else
- {
- // just make sure it's a supported type.
- if (_class != Boolean.class && _class != Boolean.TYPE
- && _class != Character.class && _class != Character.TYPE
- && _class != Double.class && _class != Double.TYPE
- && _class != Float.class && _class != Float.TYPE
- && _class != Integer.class && _class != Integer.TYPE
- && _class != Long.class && _class != Long.TYPE
- && _class != Short.class && _class != Short.TYPE
- && _class != String.class)
- {
- Log.log(Log.WARNING, this, "unsupported type: " + _class.getName());
- return null;
- }
- return value.toString();
- }
- }
-
- private Object parse(String value, Class<?> _class)
- {
- Object _ret = null;
- if (_class.isArray())
- {
- StringTokenizer st = new StringTokenizer(value, String.valueOf(arraysep));
- Class _type = _class.getComponentType();
- _ret = Array.newInstance(_type, st.countTokens());
- int _cnt = st.countTokens();
- for (int i = 0; i < _cnt; i++)
- {
- Object _val = parse(st.nextToken(), _type);
- if (_val == null)
- return null;
- Array.set(_ret, i, _val);
- }
- }
- else
- {
- if (_class == Boolean.class || _class == Boolean.TYPE)
- _ret = Boolean.valueOf(value);
- else if (_class == Character.class || _class == Character.TYPE)
- _ret = Character.valueOf(value.charAt(0));
- else if (_class == Double.class || _class == Double.TYPE)
- _ret = Double.valueOf(value);
- else if (_class == Float.class || _class == Float.TYPE)
- _ret = Float.valueOf(value);
- else if (_class == Integer.class || _class == Integer.TYPE)
- _ret = Integer.valueOf(value);
- else if (_class == Long.class || _class == Long.TYPE)
- _ret = Long.valueOf(value);
- else if (_class == Short.class || _class == Short.TYPE)
- _ret = Short.valueOf(value);
- else if (_class == String.class)
- _ret = value;
- else
- Log.log(Log.WARNING, this, "unsupported type: " + _class.getName());
-
- }
- return _ret;
- }
-
- // Instance variables
-
- private final char arraysep;
- private final String root;
-
-}
-
+/*
+ * PropertiesBean.java: a "serializable" Java Bean that uses a
+ * java.util.Properties backend.
+ * :noTabs=false:
+ *
+ * Copyright (C) 2006 Marcelo Vanzin
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library 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 Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.gjt.sp.util;
+
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Array;
+import java.lang.reflect.Method;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+/**
+ * A "java bean" that can serialize itself into a java.util.Properties
+ * instance. For the serialization, the class uses the java beans
+ * instrospection mechanism to figure out the class's available
+ * properties, and saves all the properties as strings in the properties
+ * object.
+ *
+ * <p>Properties are saved based on a "root", which is set up during the
+ * instantiation of the object. The properties will be set as
+ * <code>root.property_name</code>.</p>
+ *
+ * <p>Only native types (boolean, char, double, float, int, long, short),
+ * Strings, and arrays of those types are supported. Also, nested
+ * beans are not supported presently.</p>
+ *
+ * @author Marcelo Vanzin
+ * @since jEdit 4.3pre7
+ */
+public abstract class PropertiesBean
+{
+
+ // Constructors
+
+ /**
+ * Creates a new instance with the given root and the default array
+ * separator char (':').
+ *
+ * @param root A non-null string that will be the "root" of the
+ * serialized properties.
+ */
+ protected PropertiesBean(String root)
+ {
+ this(root, ':');
+ }
+
+ /**
+ * Creates a new instance with the given root and the given array
+ * separator character.
+ *
+ * @param root A non-null string that will be the "root" of the
+ * serialized properties.
+ * @param arraysep A character that will be used to define the
+ * separator of elements of an array property.
+ */
+ protected PropertiesBean(String root, char arraysep)
+ {
+ if (root == null)
+ throw new IllegalArgumentException("root cannot be null");
+ this.root = root;
+ this.arraysep = arraysep;
+ }
+
+ // Public methods
+
+ /**
+ * Loads the bean's properties from the given object.
+ */
+ public void load(Properties p)
+ {
+ try
+ {
+ PropertyDescriptor[] _props = getPropertyDescriptors();
+ for (int i = 0; i < _props.length; i++)
+ {
+ if ("class".equals(_props[i].getName()))
+ continue;
+
+ Method _set = _props[i].getWriteMethod();
+ if (_set != null)
+ {
+ String _pname = root + "." + _props[i].getName();
+ Object _val = p.getProperty(_pname);
+ if (_val != null)
+ _val = parse((String)_val, _props[i].getPropertyType());
+ try
+ {
+ _set.invoke(this, _val);
+ }
+ catch (IllegalArgumentException iae)
+ {
+ /* Ignore these. */
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ // These exceptions shouldn't occur during normal runtime,
+ // so we catch them and print an error message. Users of this
+ // class should fix these before releasing the code.
+ Log.log(Log.ERROR, this, e);
+ }
+ }
+
+ /**
+ * Saves the bean's properties into the given object.
+ */
+ public void save(Properties p)
+ {
+ try
+ {
+ PropertyDescriptor[] _props = getPropertyDescriptors();
+ for (int i = 0; i < _props.length; i++)
+ {
+ if ("class".equals(_props[i].getName()))
+ continue;
+
+ Method _get = _props[i].getReadMethod();
+ if (_get != null)
+ {
+ Object _val = _get.invoke(this);
+ String _pname = root + "." + _props[i].getName();
+ if (_val != null)
+ p.setProperty(_pname, encode(_val));
+ else
+ p.remove(_pname);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ // These exceptions shouldn't occur during normal runtime,
+ // so we catch them and print an error message. Users of this
+ // class should fix these before releasing the code.
+ Log.log(Log.ERROR, this, e);
+ }
+ }
+
+ /**
+ * Cleans the entries related to this object from the given object.
+ */
+ public void clean(Properties p)
+ {
+
+ try
+ {
+ PropertyDescriptor[] _props = getPropertyDescriptors();
+ for (int i = 0; i < _props.length; i++)
+ {
+ if ("class".equals(_props[i].getName()))
+ continue;
+
+ String _pname = root + "." + _props[i].getName();
+ p.remove(_pname);
+ }
+ }
+ catch (Exception e)
+ {
+ // These exceptions shouldn't occur during normal runtime,
+ // so we catch them and print an error message. Users of this
+ // class should fix these before releasing the code.
+ Log.log(Log.ERROR, this, e);
+ }
+ }
+
+ // Private methods
+
+ private PropertyDescriptor[] getPropertyDescriptors()
+ throws IntrospectionException
+ {
+ BeanInfo _info = Introspector.getBeanInfo(getClass());
+ return _info.getPropertyDescriptors();
+ }
+
+ private String encode(Object value)
+ {
+ Class _class = value.getClass();
+ if (_class.isArray())
+ {
+ StringBuilder _val = new StringBuilder();
+ int _len = Array.getLength(value);
+ for (int i = 0; i < _len; i++)
+ {
+ String _str = encode(Array.get(value, i));
+ if (_str == null)
+ return null;
+ _val.append(_str);
+ if (i < _len - 1)
+ _val.append(arraysep);
+ }
+ return _val.toString();
+ }
+ else
+ {
+ // just make sure it's a supported type.
+ if (_class != Boolean.class && _class != Boolean.TYPE
+ && _class != Character.class && _class != Character.TYPE
+ && _class != Double.class && _class != Double.TYPE
+ && _class != Float.class && _class != Float.TYPE
+ && _class != Integer.class && _class != Integer.TYPE
+ && _class != Long.class && _class != Long.TYPE
+ && _class != Short.class && _class != Short.TYPE
+ && _class != String.class)
+ {
+ Log.log(Log.WARNING, this, "unsupported type: " + _class.getName());
+ return null;
+ }
+ return value.toString();
+ }
+ }
+
+ private Object parse(String value, Class<?> _class)
+ {
+ Object _ret = null;
+ if (_class.isArray())
+ {
+ StringTokenizer st = new StringTokenizer(value, String.valueOf(arraysep));
+ Class _type = _class.getComponentType();
+ _ret = Array.newInstance(_type, st.countTokens());
+ int _cnt = st.countTokens();
+ for (int i = 0; i < _cnt; i++)
+ {
+ Object _val = parse(st.nextToken(), _type);
+ if (_val == null)
+ return null;
+ Array.set(_ret, i, _val);
+ }
+ }
+ else
+ {
+ if (_class == Boolean.class || _class == Boolean.TYPE)
+ _ret = Boolean.valueOf(value);
+ else if (_class == Character.class || _class == Character.TYPE)
+ _ret = Character.valueOf(value.charAt(0));
+ else if (_class == Double.class || _class == Double.TYPE)
+ _ret = Double.valueOf(value);
+ else if (_class == Float.class || _class == Float.TYPE)
+ _ret = Float.valueOf(value);
+ else if (_class == Integer.class || _class == Integer.TYPE)
+ _ret = Integer.valueOf(value);
+ else if (_class == Long.class || _class == Long.TYPE)
+ _ret = Long.valueOf(value);
+ else if (_class == Short.class || _class == Short.TYPE)
+ _ret = Short.valueOf(value);
+ else if (_class == String.class)
+ _ret = value;
+ else
+ Log.log(Log.WARNING, this, "unsupported type: " + _class.getName());
+
+ }
+ return _ret;
+ }
+
+ // Instance variables
+
+ private final char arraysep;
+ private final String root;
+
+}
+
diff --git a/jEdit/org/gjt/sp/util/ReadWriteLock.java b/jEdit/org/gjt/sp/util/ReadWriteLock.java
index c1ddec0..b81fb9d 100644
--- a/jEdit/org/gjt/sp/util/ReadWriteLock.java
+++ b/jEdit/org/gjt/sp/util/ReadWriteLock.java
@@ -1,96 +1,97 @@
-/*
- * ReadWriteLock.java
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Peter Graves
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-/**
- * Implements consumer/producer locking scemantics.
- * @author Peter Graves
- * @version $Id: ReadWriteLock.java 12504 2008-04-22 23:12:43Z ezust $
- * The lock tries to be re-entrant when called from the same thread in some
- * cases.
- *
- * The following is ok:
- * read lock
- * read lock
- * read unlock
- * read unlock
- *
- * write lock
- * read lock
- * read unlock
- * write unlock
- *
- * The following is not ok:
- *
- * read lock
- * write lock
- * write unlock
- * read unlock
- *
- * write lock
- * write lock
- * write unlock
- * write unlock
- *
- * @deprecated Use java.util.concurrent.locks.ReentrantReadWriteLock which
- * is available since J2SE 5.0 (1.5). This class was written for J2SE 1.4,
- * and is still here only for compatibility.
- */
-public class ReadWriteLock
-{
- //{{{ readLock() method
- public void readLock()
- {
- body.readLock().lock();
- } //}}}
-
- //{{{ readUnlock() method
- public void readUnlock()
- {
- body.readLock().unlock();
- } //}}}
-
- //{{{ writeLock() method
- public void writeLock()
- {
- body.writeLock().lock();
- } //}}}
-
- //{{{ writeUnlock() method
- public void writeUnlock()
- {
- body.writeLock().unlock();
- } //}}}
-
- //{{{ isWriteLocked() method
- public boolean isWriteLocked()
- {
- return body.isWriteLocked();
- } //}}}
-
- //{{{ Private members
- private final ReentrantReadWriteLock body = new ReentrantReadWriteLock();
- //}}}
-}
+/*
+ * ReadWriteLock.java
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Peter Graves
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+/**
+ * Implements consumer/producer locking scemantics.
+ * @author Peter Graves
+ * @version $Id: ReadWriteLock.java 17144 2010-01-30 00:32:11Z kpouer $
+ * The lock tries to be re-entrant when called from the same thread in some
+ * cases.
+ *
+ * The following is ok:
+ * read lock
+ * read lock
+ * read unlock
+ * read unlock
+ *
+ * write lock
+ * read lock
+ * read unlock
+ * write unlock
+ *
+ * The following is not ok:
+ *
+ * read lock
+ * write lock
+ * write unlock
+ * read unlock
+ *
+ * write lock
+ * write lock
+ * write unlock
+ * write unlock
+ *
+ * @deprecated Use java.util.concurrent.locks.ReentrantReadWriteLock which
+ * is available since J2SE 5.0 (1.5). This class was written for J2SE 1.4,
+ * and is still here only for compatibility.
+ */
+ at Deprecated
+public class ReadWriteLock
+{
+ //{{{ readLock() method
+ public void readLock()
+ {
+ body.readLock().lock();
+ } //}}}
+
+ //{{{ readUnlock() method
+ public void readUnlock()
+ {
+ body.readLock().unlock();
+ } //}}}
+
+ //{{{ writeLock() method
+ public void writeLock()
+ {
+ body.writeLock().lock();
+ } //}}}
+
+ //{{{ writeUnlock() method
+ public void writeUnlock()
+ {
+ body.writeLock().unlock();
+ } //}}}
+
+ //{{{ isWriteLocked() method
+ public boolean isWriteLocked()
+ {
+ return body.isWriteLocked();
+ } //}}}
+
+ //{{{ Private members
+ private final ReentrantReadWriteLock body = new ReentrantReadWriteLock();
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/util/ReverseCharSequence.java b/jEdit/org/gjt/sp/util/ReverseCharSequence.java
index 49e6a98..f386868 100644
--- a/jEdit/org/gjt/sp/util/ReverseCharSequence.java
+++ b/jEdit/org/gjt/sp/util/ReverseCharSequence.java
@@ -1,67 +1,67 @@
-/*
- * :noTabs=false:
- *
- * Copyright (C) 2008 Kazutoshi Satoda
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library 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 Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-package org.gjt.sp.util;
-
-/**
- * Reversed view of a given CharSequence.
- */
-public class ReverseCharSequence implements CharSequence
-{
- public ReverseCharSequence(CharSequence base)
- {
- this.base = base;
- }
-
- public CharSequence baseSequence()
- {
- return base;
- }
-
- public char charAt(int index)
- {
- return base.charAt(base.length() - index - 1);
- }
-
- public int length()
- {
- return base.length();
- }
-
- public CharSequence subSequence(int start, int end)
- {
- int baseLength = base.length();
- return new ReverseCharSequence(
- base.subSequence(baseLength - end, baseLength - start));
- }
-
- public String toString()
- {
- int baseLength = base.length();
- StringBuilder builder = new StringBuilder(baseLength);
- for (int i = baseLength - 1; i >= 0; --i)
- {
- builder.append(base.charAt(i));
- }
- return builder.toString();
- }
-
- private final CharSequence base;
-}
+/*
+ * :noTabs=false:
+ *
+ * Copyright (C) 2008 Kazutoshi Satoda
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library 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 Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.gjt.sp.util;
+
+/**
+ * Reversed view of a given CharSequence.
+ */
+public class ReverseCharSequence implements CharSequence
+{
+ public ReverseCharSequence(CharSequence base)
+ {
+ this.base = base;
+ }
+
+ public CharSequence baseSequence()
+ {
+ return base;
+ }
+
+ public char charAt(int index)
+ {
+ return base.charAt(base.length() - index - 1);
+ }
+
+ public int length()
+ {
+ return base.length();
+ }
+
+ public CharSequence subSequence(int start, int end)
+ {
+ int baseLength = base.length();
+ return new ReverseCharSequence(
+ base.subSequence(baseLength - end, baseLength - start));
+ }
+
+ public String toString()
+ {
+ int baseLength = base.length();
+ StringBuilder builder = new StringBuilder(baseLength);
+ for (int i = baseLength - 1; i >= 0; --i)
+ {
+ builder.append(base.charAt(i));
+ }
+ return builder.toString();
+ }
+
+ private final CharSequence base;
+}
diff --git a/jEdit/org/gjt/sp/util/SegmentBuffer.java b/jEdit/org/gjt/sp/util/SegmentBuffer.java
index 9bf92d3..bc75a0b 100644
--- a/jEdit/org/gjt/sp/util/SegmentBuffer.java
+++ b/jEdit/org/gjt/sp/util/SegmentBuffer.java
@@ -1,70 +1,70 @@
-/*
- * SegmentBuffer.java - A Segment you can append stuff to
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2001 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-import javax.swing.text.Segment;
-
-/**
- * An extended segment that you can append text to.
- */
-public class SegmentBuffer extends Segment
-{
- //{{{ SegmentBuffer constructor
- public SegmentBuffer(int capacity)
- {
- ensureCapacity(capacity);
- } //}}}
-
- //{{{ append() method
- public void append(char ch)
- {
- ensureCapacity(count + 1);
- array[offset + count] = ch;
- count++;
- } //}}}
-
- //{{{ append() method
- public void append(char[] text, int off, int len)
- {
- ensureCapacity(count + len);
- System.arraycopy(text,off,array,count,len);
- count += len;
- } //}}}
-
- //{{{ Private members
-
- //{{{ ensureCapacity() method
- private void ensureCapacity(int capacity)
- {
- if(array == null)
- array = new char[capacity];
- else if(capacity >= array.length)
- {
- char[] arrayN = new char[capacity * 2];
- System.arraycopy(array,0,arrayN,0,count);
- array = arrayN;
- }
- } //}}}
-
- //}}}
-}
+/*
+ * SegmentBuffer.java - A Segment you can append stuff to
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2001 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+import javax.swing.text.Segment;
+
+/**
+ * An extended segment that you can append text to.
+ */
+public class SegmentBuffer extends Segment
+{
+ //{{{ SegmentBuffer constructor
+ public SegmentBuffer(int capacity)
+ {
+ ensureCapacity(capacity);
+ } //}}}
+
+ //{{{ append() method
+ public void append(char ch)
+ {
+ ensureCapacity(count + 1);
+ array[offset + count] = ch;
+ count++;
+ } //}}}
+
+ //{{{ append() method
+ public void append(char[] text, int off, int len)
+ {
+ ensureCapacity(count + len);
+ System.arraycopy(text,off,array,count,len);
+ count += len;
+ } //}}}
+
+ //{{{ Private members
+
+ //{{{ ensureCapacity() method
+ private void ensureCapacity(int capacity)
+ {
+ if(array == null)
+ array = new char[capacity];
+ else if(capacity >= array.length)
+ {
+ char[] arrayN = new char[capacity * 2];
+ System.arraycopy(array,0,arrayN,0,count);
+ array = arrayN;
+ }
+ } //}}}
+
+ //}}}
+}
diff --git a/jEdit/org/gjt/sp/util/SegmentCharSequence.java b/jEdit/org/gjt/sp/util/SegmentCharSequence.java
index bb5ed24..5a57fa1 100644
--- a/jEdit/org/gjt/sp/util/SegmentCharSequence.java
+++ b/jEdit/org/gjt/sp/util/SegmentCharSequence.java
@@ -1,89 +1,89 @@
-/*
- * SegmentCharSequence.java
- * :noTabs=false:
- *
- * Copyright (C) 2006 Marcelo Vanzin
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library 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 Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.gjt.sp.util;
-
-import java.io.Serializable;
-import javax.swing.text.Segment;
-
-/**
- * Class that lets java.util.regex search within a javax.swing.text.Segment.
- *
- * @author Marcelo Vanzin
- */
-public class SegmentCharSequence implements CharSequence, Serializable
-{
-
- public SegmentCharSequence(Segment seg)
- {
- this(seg, false);
- }
-
- /**
- * @deprecated
- * Use ReverseCharSequence to get reverse view of this class (or
- * any other CharSequence). This class doesn't support
- * subSequence() and toString() for reversed instance.
- */
- @Deprecated
- public SegmentCharSequence(Segment seg, boolean reverse)
- {
- this(seg, 0, seg.count);
- this.reverse = reverse;
- }
-
- public SegmentCharSequence(Segment seg, int off, int len)
- {
- this.offset = off;
- this.length = len;
- this.seg = seg;
- }
-
- public char charAt(int index)
- {
- if (reverse)
- index = length - index - 1;
- return seg.array[seg.offset + offset + index];
- }
-
- public int length()
- {
- return length;
- }
-
- public CharSequence subSequence(int start, int end)
- {
- if (reverse)
- throw new IllegalStateException("reverse sub-sequences are not supported");
- return new SegmentCharSequence(seg, offset + start, end - start);
- }
-
- public String toString()
- {
- return new String(seg.array, offset+seg.offset, length);
- }
-
- private boolean reverse;
- private int offset;
- private int length;
- private Segment seg;
-
-}
-
+/*
+ * SegmentCharSequence.java
+ * :noTabs=false:
+ *
+ * Copyright (C) 2006 Marcelo Vanzin
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library 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 Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.gjt.sp.util;
+
+import java.io.Serializable;
+import javax.swing.text.Segment;
+
+/**
+ * Class that lets java.util.regex search within a javax.swing.text.Segment.
+ *
+ * @author Marcelo Vanzin
+ */
+public class SegmentCharSequence implements CharSequence, Serializable
+{
+
+ public SegmentCharSequence(Segment seg)
+ {
+ this(seg, false);
+ }
+
+ /**
+ * @deprecated
+ * Use ReverseCharSequence to get reverse view of this class (or
+ * any other CharSequence). This class doesn't support
+ * subSequence() and toString() for reversed instance.
+ */
+ @Deprecated
+ public SegmentCharSequence(Segment seg, boolean reverse)
+ {
+ this(seg, 0, seg.count);
+ this.reverse = reverse;
+ }
+
+ public SegmentCharSequence(Segment seg, int off, int len)
+ {
+ this.offset = off;
+ this.length = len;
+ this.seg = seg;
+ }
+
+ public char charAt(int index)
+ {
+ if (reverse)
+ index = length - index - 1;
+ return seg.array[seg.offset + offset + index];
+ }
+
+ public int length()
+ {
+ return length;
+ }
+
+ public CharSequence subSequence(int start, int end)
+ {
+ if (reverse)
+ throw new IllegalStateException("reverse sub-sequences are not supported");
+ return new SegmentCharSequence(seg, offset + start, end - start);
+ }
+
+ public String toString()
+ {
+ return new String(seg.array, offset+seg.offset, length);
+ }
+
+ private boolean reverse;
+ private int offset;
+ private int length;
+ private Segment seg;
+
+}
+
diff --git a/jEdit/org/gjt/sp/util/StandardUtilities.java b/jEdit/org/gjt/sp/util/StandardUtilities.java
index 213c467..c1a3bdb 100644
--- a/jEdit/org/gjt/sp/util/StandardUtilities.java
+++ b/jEdit/org/gjt/sp/util/StandardUtilities.java
@@ -1,710 +1,754 @@
-/*
- * StandardUtilities.java - Various miscallaneous utility functions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2006 Matthieu Casanova, Slava Pestov
- * Portions copyright (C) 2000 Richard S. Hall
- * Portions copyright (C) 2001 Dirk Moebius
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-
-//{{{ Imports
-import javax.swing.text.Segment;
-import java.util.Comparator;
-import java.util.Stack;
-//}}}
-
-/**
- * Several tools that depends on JDK only.
- *
- * @author Matthieu Casanova
- * @version $Id: StandardUtilities.java 14923 2009-04-13 18:40:55Z shlomy $
- * @since 4.3pre5
- */
-public class StandardUtilities
-{
-
- //{{{ Text methods
-
- //{{{ charsToEscapes() method
- /**
- * Escapes newlines, tabs, backslashes, and quotes in the specified
- * string.
- * @param str The string
- * @since jEdit 4.3pre15
- */
- public static String charsToEscapes(String str)
- {
- return charsToEscapes(str,"\n\t\\\"'");
- } //}}}
-
- //{{{ charsToEscapes() method
- /**
- * Escapes the specified characters in the specified string.
- * @param str The string
- * @param toEscape Any characters that require escaping
- * @since jEdit 4.3pre15
- */
- public static String charsToEscapes(String str, String toEscape)
- {
- StringBuilder buf = new StringBuilder();
- for(int i = 0; i < str.length(); i++)
- {
- char c = str.charAt(i);
- if(toEscape.indexOf(c) != -1)
- {
- if(c == '\n')
- buf.append("\\n");
- else if(c == '\t')
- buf.append("\\t");
- else
- {
- buf.append('\\');
- buf.append(c);
- }
- }
- else
- buf.append(c);
- }
- return buf.toString();
- } //}}}
-
- //{{{ getPrevIndentStyle() method
- /**
- * @param str A java string
- * @return the leading whitespace of that string, for indenting subsequent lines.
- * @since jEdit 4.3pre10
- */
- public static String getIndentString(String str)
- {
- StringBuilder indentString = new StringBuilder();
- for (int i = 0; i < str.length(); i++)
- {
- char ch = str.charAt(i);
- if (! Character.isWhitespace(ch))
- break;
- indentString.append(ch);
- }
- return indentString.toString();
-
- } //}}}
-
- //{{{ getLeadingWhiteSpace() method
- /**
- * Returns the number of leading white space characters in the
- * specified string.
- *
- * @param str The string
- */
- public static int getLeadingWhiteSpace(String str)
- {
- return getLeadingWhiteSpace((CharSequence)str);
- } //}}}
-
- //{{{ getLeadingWhiteSpace() method
- /**
- * Returns the number of leading white space characters in the
- * specified string.
- *
- * @param str The string
- * @since jEdit 4.3pre15
- */
- public static int getLeadingWhiteSpace(CharSequence str)
- {
- int whitespace = 0;
-loop: for(;whitespace < str.length();)
- {
- switch(str.charAt(whitespace))
- {
- case ' ':
- case '\t':
- whitespace++;
- break;
- default:
- break loop;
- }
- }
- return whitespace;
- } //}}}
-
- //{{{ getTrailingWhiteSpace() method
- /**
- * Returns the number of trailing whitespace characters in the
- * specified string.
- * @param str The string
- */
- public static int getTrailingWhiteSpace(String str)
- {
- int whitespace = 0;
-loop: for(int i = str.length() - 1; i >= 0; i--)
- {
- switch(str.charAt(i))
- {
- case ' ':
- case '\t':
- whitespace++;
- break;
- default:
- break loop;
- }
- }
- return whitespace;
- } //}}}
-
- //{{{ getLeadingWhiteSpaceWidth() method
- /**
- * Returns the width of the leading white space in the specified
- * string.
- * @param str The string
- * @param tabSize The tab size
- */
- public static int getLeadingWhiteSpaceWidth(String str, int tabSize)
- {
- return getLeadingWhiteSpaceWidth((CharSequence)str, tabSize);
- } //}}}
-
- //{{{ getLeadingWhiteSpaceWidth() method
- /**
- * Returns the width of the leading white space in the specified
- * string.
- * @param str The string
- * @param tabSize The tab size
- * @since jEdit 4.3pre15
- */
- public static int getLeadingWhiteSpaceWidth(CharSequence str, int tabSize)
- {
- int whitespace = 0;
-loop: for(int i = 0; i < str.length(); i++)
- {
- switch(str.charAt(i))
- {
- case ' ':
- whitespace++;
- break;
- case '\t':
- whitespace += tabSize -
- whitespace % tabSize;
- break;
- default:
- break loop;
- }
- }
- return whitespace;
- } //}}}
-
- //{{{ createWhiteSpace() method
- /**
- * Creates a string of white space with the specified length.<p>
- *
- * To get a whitespace string tuned to the current buffer's
- * settings, call this method as follows:
- *
- * <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
- * (buffer.getBooleanProperty("noTabs") ? 0
- * : buffer.getTabSize()));</pre>
- *
- * @param len The length
- * @param tabSize The tab size, or 0 if tabs are not to be used
- */
- public static String createWhiteSpace(int len, int tabSize)
- {
- return createWhiteSpace(len,tabSize,0);
- } //}}}
-
- //{{{ truncateWhiteSpace() method
- public static String truncateWhiteSpace(int len, int tabSize,
- String indentStr)
- {
- StringBuilder buf = new StringBuilder();
- int indent = 0;
- for (int i = 0; indent < len && i < indentStr.length(); i++)
- {
- char c = indentStr.charAt(i);
- if (c == ' ')
- {
- indent++;
- buf.append(c);
- }
- else if (c == '\t')
- {
- int withTab = indent + tabSize - (indent % tabSize);
- if (withTab > len)
- {
- for (; indent < len; indent++)
- buf.append(' ');
- }
- else
- {
- indent = withTab;
- buf.append(c);
- }
- }
- }
- return buf.toString();
- } //}}}
-
- //{{{ createWhiteSpace() method
- /**
- * Creates a string of white space with the specified length.<p>
- *
- * To get a whitespace string tuned to the current buffer's
- * settings, call this method as follows:
- *
- * <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
- * (buffer.getBooleanProperty("noTabs") ? 0
- * : buffer.getTabSize()));</pre>
- *
- * @param len The length
- * @param tabSize The tab size, or 0 if tabs are not to be used
- * @param start The start offset, for tab alignment
- */
- public static String createWhiteSpace(int len, int tabSize, int start)
- {
- StringBuilder buf = new StringBuilder();
- if(tabSize == 0)
- {
- while(len-- > 0)
- buf.append(' ');
- }
- else if(len == 1)
- buf.append(' ');
- else
- {
- int count = (len + start % tabSize) / tabSize;
- if(count != 0)
- len += start;
- while(count-- > 0)
- buf.append('\t');
- count = len % tabSize;
- while(count-- > 0)
- buf.append(' ');
- }
- return buf.toString();
- } //}}}
-
- //{{{ getVirtualWidth() method
- /**
- * Returns the virtual column number (taking tabs into account) of the
- * specified offset in the segment.
- *
- * @param seg The segment
- * @param tabSize The tab size
- */
- public static int getVirtualWidth(Segment seg, int tabSize)
- {
- int virtualPosition = 0;
-
- for (int i = 0; i < seg.count; i++)
- {
- char ch = seg.array[seg.offset + i];
-
- if (ch == '\t')
- {
- virtualPosition += tabSize
- - virtualPosition % tabSize;
- }
- else
- {
- ++virtualPosition;
- }
- }
-
- return virtualPosition;
- } //}}}
-
- //{{{ getOffsetOfVirtualColumn() method
- /**
- * Returns the array offset of a virtual column number (taking tabs
- * into account) in the segment.
- *
- * @param seg The segment
- * @param tabSize The tab size
- * @param column The virtual column number
- * @param totalVirtualWidth If this array is non-null, the total
- * virtual width will be stored in its first location if this method
- * returns -1.
- *
- * @return -1 if the column is out of bounds
- */
- public static int getOffsetOfVirtualColumn(Segment seg, int tabSize,
- int column, int[] totalVirtualWidth)
- {
- int virtualPosition = 0;
-
- for (int i = 0; i < seg.count; i++)
- {
- char ch = seg.array[seg.offset + i];
-
- if (ch == '\t')
- {
- int tabWidth = tabSize
- - virtualPosition % tabSize;
- if(virtualPosition >= column)
- return i;
- else
- virtualPosition += tabWidth;
- }
- else
- {
- if(virtualPosition >= column)
- return i;
- else
- ++virtualPosition;
- }
- }
-
- if(totalVirtualWidth != null)
- totalVirtualWidth[0] = virtualPosition;
- return -1;
- } //}}}
-
- //{{{ compareStrings() method
- /**
- * Compares two strings.<p>
- *
- * Unlike <function>String.compareTo()</function>,
- * this method correctly recognizes and handles embedded numbers.
- * For example, it places "My file 2" before "My file 10".<p>
- *
- * @param str1 The first string
- * @param str2 The second string
- * @param ignoreCase If true, case will be ignored
- * @return negative If str1 < str2, 0 if both are the same,
- * positive if str1 > str2
- * @since jEdit 4.3pre5
- */
- public static int compareStrings(String str1, String str2, boolean ignoreCase)
- {
- char[] char1 = str1.toCharArray();
- char[] char2 = str2.toCharArray();
-
- int len = Math.min(char1.length,char2.length);
-
- for(int i = 0, j = 0; i < len && j < len; i++, j++)
- {
- char ch1 = char1[i];
- char ch2 = char2[j];
- if(Character.isDigit(ch1) && Character.isDigit(ch2)
- && ch1 != '0' && ch2 != '0')
- {
- int _i = i + 1;
- int _j = j + 1;
-
- for(; _i < char1.length; _i++)
- {
- if(!Character.isDigit(char1[_i]))
- {
- //_i--;
- break;
- }
- }
-
- for(; _j < char2.length; _j++)
- {
- if(!Character.isDigit(char2[_j]))
- {
- //_j--;
- break;
- }
- }
-
- int len1 = _i - i;
- int len2 = _j - j;
- if(len1 > len2)
- return 1;
- else if(len1 < len2)
- return -1;
- else
- {
- for(int k = 0; k < len1; k++)
- {
- ch1 = char1[i + k];
- ch2 = char2[j + k];
- if(ch1 != ch2)
- return ch1 - ch2;
- }
- }
-
- i = _i - 1;
- j = _j - 1;
- }
- else
- {
- if(ignoreCase)
- {
- ch1 = Character.toLowerCase(ch1);
- ch2 = Character.toLowerCase(ch2);
- }
-
- if(ch1 != ch2)
- return ch1 - ch2;
- }
- }
-
- return char1.length - char2.length;
- } //}}}
-
- //{{{ StringCompare class
- /**
- * Compares objects as strings.
- */
- public static class StringCompare<E> implements Comparator<E>
- {
- private boolean icase;
-
- public StringCompare(boolean icase)
- {
- this.icase = icase;
- }
-
- public StringCompare()
- {
- }
-
- public int compare(E obj1, E obj2)
- {
- return compareStrings(obj1.toString(),
- obj2.toString(),icase);
- }
- } //}}}
-
- //{{{ objectsEqual() method
- /**
- * Returns if two strings are equal. This correctly handles null pointers,
- * as opposed to calling <code>o1.equals(o2)</code>.
- * @since jEdit 4.3pre6
- */
- public static boolean objectsEqual(Object o1, Object o2)
- {
- if(o1 == null)
- {
- if(o2 == null)
- return true;
- else
- return false;
- }
- else if(o2 == null)
- return false;
- else
- return o1.equals(o2);
- } //}}}
-
- //{{{ globToRE() method
- /**
- * Converts a Unix-style glob to a regular expression.<p>
- *
- * ? becomes ., * becomes .*, {aa,bb} becomes (aa|bb).
- * @param glob The glob pattern
- * @since jEdit 4.3pre7
- */
- public static String globToRE(String glob)
- {
- if (glob.startsWith("(re)"))
- {
- return glob.substring(4);
- }
-
- final Object NEG = new Object();
- final Object GROUP = new Object();
- Stack<Object> state = new Stack<Object>();
-
- StringBuilder buf = new StringBuilder();
- boolean backslash = false;
-
- for(int i = 0; i < glob.length(); i++)
- {
- char c = glob.charAt(i);
- if(backslash)
- {
- buf.append('\\');
- buf.append(c);
- backslash = false;
- continue;
- }
-
- switch(c)
- {
- case '\\':
- backslash = true;
- break;
- case '?':
- buf.append('.');
- break;
- case '.':
- case '+':
- case '(':
- case ')':
- buf.append('\\');
- buf.append(c);
- break;
- case '*':
- buf.append(".*");
- break;
- case '|':
- if(backslash)
- buf.append("\\|");
- else
- buf.append('|');
- break;
- case '{':
- buf.append('(');
- if(i + 1 != glob.length() && glob.charAt(i + 1) == '!')
- {
- buf.append('?');
- state.push(NEG);
- }
- else
- state.push(GROUP);
- break;
- case ',':
- if(!state.isEmpty() && state.peek() == GROUP)
- buf.append('|');
- else
- buf.append(',');
- break;
- case '}':
- if(!state.isEmpty())
- {
- buf.append(')');
- if(state.pop() == NEG)
- buf.append(".*");
- }
- else
- buf.append('}');
- break;
- default:
- buf.append(c);
- }
- }
-
- return buf.toString();
- } //}}}
-
- //{{{ regionMatches() method
- /**
- * Implementation of String.regionMatches() for CharSequence.
- *
- * @param seq The test CharSequence.
- * @param toff Offset for the test sequence.
- * @param other The sequence to compare to.
- * @param ooff Offset of the comparison sequence.
- * @param len How many characters to compare.
- * @return Whether the two subsequences are equal.
- * @see String#regionMatches(int,String,int,int)
- *
- * @since jEdit 4.3pre15
- */
- public static boolean regionMatches(CharSequence seq,
- int toff,
- CharSequence other,
- int ooff,
- int len)
- {
-
- if (toff < 0 || ooff < 0 || len < 0)
- return false;
-
- boolean ret = true;
- for (int i = 0; i < len; i++)
- {
- char c1;
-
- if (i + toff < seq.length())
- c1 = seq.charAt(i + toff);
- else
- {
- ret = false;
- break;
- }
-
- char c2;
- if (i + ooff < other.length())
- c2 = other.charAt(i + ooff);
- else
- {
- ret = false;
- break;
- }
-
- if (c1 != c2)
- {
- ret = false;
- break;
- }
- }
-
- return ret;
- } //}}}
-
- //{{{ startsWith() method
- /**
- * Implementation of String.startsWith() for CharSequence.
- *
- * @param seq The CharSequence.
- * @param str String to test.
- * @return Whether the sequence starts with the test string.
- *
- * @since jEdit 4.3pre15
- */
- public static boolean startsWith(CharSequence seq, String str)
- {
- boolean ret = true;
- for (int i = 0; i < str.length(); i++)
- {
- if (i >= seq.length() ||
- seq.charAt(i) != str.charAt(i))
- {
- ret = false;
- break;
- }
- }
- return ret;
- } //}}}
-
- //{{{ getBoolean() method
- /**
- * Returns a boolean from a given object.
- * @param obj the object
- * @param def The default value
- * @return the boolean value if obj is a Boolean,
- * true if the value is "true", "yes", "on",
- * false if the value is "false", "no", "off"
- * def if the value is null or anything else
- * @since jEdit 4.3pre17
- */
- public static boolean getBoolean(Object obj, boolean def)
- {
- if(obj == null)
- return def;
- else if(obj instanceof Boolean)
- return ((Boolean)obj).booleanValue();
- else if("true".equals(obj) || "yes".equals(obj)
- || "on".equals(obj))
- return true;
- else if("false".equals(obj) || "no".equals(obj)
- || "off".equals(obj))
- return false;
-
- return def;
- } //}}}
-
- //}}}
- private StandardUtilities(){}
-}
+/*
+ * StandardUtilities.java - Various miscallaneous utility functions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2006 Matthieu Casanova, Slava Pestov
+ * Portions copyright (C) 2000 Richard S. Hall
+ * Portions copyright (C) 2001 Dirk Moebius
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+
+//{{{ Imports
+import javax.swing.text.Segment;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.text.DecimalFormat;
+import java.util.Comparator;
+import java.util.Stack;
+//}}}
+
+/**
+ * Several tools that depends on JDK only.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: StandardUtilities.java 18200 2010-07-13 19:38:43Z daleanson $
+ * @since 4.3pre5
+ */
+public class StandardUtilities
+{
+ //{{{ charsToEscapes() methods
+ /**
+ * Escapes newlines, tabs, backslashes, and quotes in the specified
+ * string.
+ * @param str The string
+ * @since jEdit 4.3pre15
+ */
+ public static String charsToEscapes(String str)
+ {
+ return charsToEscapes(str,"\n\t\\\"'");
+ }
+
+ /**
+ * Escapes the specified characters in the specified string.
+ * @param str The string
+ * @param toEscape Any characters that require escaping
+ * @since jEdit 4.3pre15
+ */
+ public static String charsToEscapes(String str, String toEscape)
+ {
+ StringBuilder buf = new StringBuilder();
+ for(int i = 0; i < str.length(); i++)
+ {
+ char c = str.charAt(i);
+ if(toEscape.indexOf(c) != -1)
+ {
+ if(c == '\n')
+ buf.append("\\n");
+ else if(c == '\t')
+ buf.append("\\t");
+ else
+ {
+ buf.append('\\');
+ buf.append(c);
+ }
+ }
+ else
+ buf.append(c);
+ }
+ return buf.toString();
+ } //}}}
+
+ //{{{ getPrevIndentStyle() method
+ /**
+ * @param str A java string
+ * @return the leading whitespace of that string, for indenting subsequent lines.
+ * @since jEdit 4.3pre10
+ */
+ public static String getIndentString(String str)
+ {
+ StringBuilder indentString = new StringBuilder();
+ for (int i = 0; i < str.length(); i++)
+ {
+ char ch = str.charAt(i);
+ if (! Character.isWhitespace(ch))
+ break;
+ indentString.append(ch);
+ }
+ return indentString.toString();
+
+ } //}}}
+
+ //{{{ getLeadingWhiteSpace() methods
+ /**
+ * Returns the number of leading white space characters in the
+ * specified string.
+ *
+ * @param str The string
+ */
+ public static int getLeadingWhiteSpace(String str)
+ {
+ return getLeadingWhiteSpace((CharSequence)str);
+ }
+
+ /**
+ * Returns the number of leading white space characters in the
+ * specified string.
+ *
+ * @param str The string
+ * @since jEdit 4.3pre15
+ */
+ public static int getLeadingWhiteSpace(CharSequence str)
+ {
+ int whitespace = 0;
+loop: for(;whitespace < str.length();)
+ {
+ switch(str.charAt(whitespace))
+ {
+ case ' ':
+ case '\t':
+ whitespace++;
+ break;
+ default:
+ break loop;
+ }
+ }
+ return whitespace;
+ } //}}}
+
+ //{{{ getTrailingWhiteSpace() method
+ /**
+ * Returns the number of trailing whitespace characters in the
+ * specified string.
+ * @param str The string
+ */
+ public static int getTrailingWhiteSpace(String str)
+ {
+ int whitespace = 0;
+loop: for(int i = str.length() - 1; i >= 0; i--)
+ {
+ switch(str.charAt(i))
+ {
+ case ' ':
+ case '\t':
+ whitespace++;
+ break;
+ default:
+ break loop;
+ }
+ }
+ return whitespace;
+ } //}}}
+
+ //{{{ getLeadingWhiteSpaceWidth() methods
+ /**
+ * Returns the width of the leading white space in the specified
+ * string.
+ * @param str The string
+ * @param tabSize The tab size
+ */
+ public static int getLeadingWhiteSpaceWidth(String str, int tabSize)
+ {
+ return getLeadingWhiteSpaceWidth((CharSequence)str, tabSize);
+ }
+
+ /**
+ * Returns the width of the leading white space in the specified
+ * string.
+ * @param str The string
+ * @param tabSize The tab size
+ * @since jEdit 4.3pre15
+ */
+ public static int getLeadingWhiteSpaceWidth(CharSequence str, int tabSize)
+ {
+ int whitespace = 0;
+loop: for(int i = 0; i < str.length(); i++)
+ {
+ switch(str.charAt(i))
+ {
+ case ' ':
+ whitespace++;
+ break;
+ case '\t':
+ whitespace += tabSize -
+ whitespace % tabSize;
+ break;
+ default:
+ break loop;
+ }
+ }
+ return whitespace;
+ } //}}}
+
+ //{{{ createWhiteSpace() method
+ /**
+ * Creates a string of white space with the specified length.<p>
+ *
+ * To get a whitespace string tuned to the current buffer's
+ * settings, call this method as follows:
+ *
+ * <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
+ * (buffer.getBooleanProperty("noTabs") ? 0
+ * : buffer.getTabSize()));</pre>
+ *
+ * @param len The length
+ * @param tabSize The tab size, or 0 if tabs are not to be used
+ */
+ public static String createWhiteSpace(int len, int tabSize)
+ {
+ return createWhiteSpace(len,tabSize,0);
+ } //}}}
+
+ //{{{ truncateWhiteSpace() method
+ public static String truncateWhiteSpace(int len, int tabSize,
+ String indentStr)
+ {
+ StringBuilder buf = new StringBuilder();
+ int indent = 0;
+ for (int i = 0; indent < len && i < indentStr.length(); i++)
+ {
+ char c = indentStr.charAt(i);
+ if (c == ' ')
+ {
+ indent++;
+ buf.append(c);
+ }
+ else if (c == '\t')
+ {
+ int withTab = indent + tabSize - (indent % tabSize);
+ if (withTab > len)
+ {
+ for (; indent < len; indent++)
+ buf.append(' ');
+ }
+ else
+ {
+ indent = withTab;
+ buf.append(c);
+ }
+ }
+ }
+ return buf.toString();
+ } //}}}
+
+ //{{{ createWhiteSpace() method
+ /**
+ * Creates a string of white space with the specified length.<p>
+ *
+ * To get a whitespace string tuned to the current buffer's
+ * settings, call this method as follows:
+ *
+ * <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
+ * (buffer.getBooleanProperty("noTabs") ? 0
+ * : buffer.getTabSize()));</pre>
+ *
+ * @param len The length
+ * @param tabSize The tab size, or 0 if tabs are not to be used
+ * @param start The start offset, for tab alignment
+ */
+ public static String createWhiteSpace(int len, int tabSize, int start)
+ {
+ StringBuilder buf = new StringBuilder();
+ if(tabSize == 0)
+ {
+ while(len-- > 0)
+ buf.append(' ');
+ }
+ else if(len == 1)
+ buf.append(' ');
+ else
+ {
+ int count = (len + start % tabSize) / tabSize;
+ if(count != 0)
+ len += start;
+ while(count-- > 0)
+ buf.append('\t');
+ count = len % tabSize;
+ while(count-- > 0)
+ buf.append(' ');
+ }
+ return buf.toString();
+ } //}}}
+
+ //{{{ getVirtualWidth() method
+ /**
+ * Returns the virtual column number (taking tabs into account) of the
+ * specified offset in the segment.
+ *
+ * @param seg The segment
+ * @param tabSize The tab size
+ */
+ public static int getVirtualWidth(Segment seg, int tabSize)
+ {
+ int virtualPosition = 0;
+
+ for (int i = 0; i < seg.count; i++)
+ {
+ char ch = seg.array[seg.offset + i];
+
+ if (ch == '\t')
+ {
+ virtualPosition += tabSize
+ - virtualPosition % tabSize;
+ }
+ else
+ {
+ ++virtualPosition;
+ }
+ }
+
+ return virtualPosition;
+ } //}}}
+
+ //{{{ getOffsetOfVirtualColumn() method
+ /**
+ * Returns the array offset of a virtual column number (taking tabs
+ * into account) in the segment.
+ *
+ * @param seg The segment
+ * @param tabSize The tab size
+ * @param column The virtual column number
+ * @param totalVirtualWidth If this array is non-null, the total
+ * virtual width will be stored in its first location if this method
+ * returns -1.
+ *
+ * @return -1 if the column is out of bounds
+ */
+ public static int getOffsetOfVirtualColumn(Segment seg, int tabSize,
+ int column, int[] totalVirtualWidth)
+ {
+ int virtualPosition = 0;
+
+ for (int i = 0; i < seg.count; i++)
+ {
+ char ch = seg.array[seg.offset + i];
+
+ if (ch == '\t')
+ {
+ int tabWidth = tabSize
+ - virtualPosition % tabSize;
+ if(virtualPosition >= column)
+ return i;
+ else
+ virtualPosition += tabWidth;
+ }
+ else
+ {
+ if(virtualPosition >= column)
+ return i;
+ else
+ ++virtualPosition;
+ }
+ }
+
+ if(totalVirtualWidth != null)
+ totalVirtualWidth[0] = virtualPosition;
+ return -1;
+ } //}}}
+
+ //{{{ compareStrings() method
+ /**
+ * Compares two strings.<p>
+ *
+ * Unlike <function>String.compareTo()</function>,
+ * this method correctly recognizes and handles embedded numbers.
+ * For example, it places "My file 2" before "My file 10".<p>
+ *
+ * @param str1 The first string
+ * @param str2 The second string
+ * @param ignoreCase If true, case will be ignored
+ * @return negative If str1 < str2, 0 if both are the same,
+ * positive if str1 > str2
+ * @since jEdit 4.3pre5
+ */
+ public static int compareStrings(String str1, String str2, boolean ignoreCase)
+ {
+ char[] char1 = str1.toCharArray();
+ char[] char2 = str2.toCharArray();
+
+ int len = Math.min(char1.length,char2.length);
+
+ for(int i = 0, j = 0; i < len && j < len; i++, j++)
+ {
+ char ch1 = char1[i];
+ char ch2 = char2[j];
+ if(Character.isDigit(ch1) && Character.isDigit(ch2)
+ && ch1 != '0' && ch2 != '0')
+ {
+ int _i = i + 1;
+ int _j = j + 1;
+
+ for(; _i < char1.length; _i++)
+ {
+ if(!Character.isDigit(char1[_i]))
+ {
+ //_i--;
+ break;
+ }
+ }
+
+ for(; _j < char2.length; _j++)
+ {
+ if(!Character.isDigit(char2[_j]))
+ {
+ //_j--;
+ break;
+ }
+ }
+
+ int len1 = _i - i;
+ int len2 = _j - j;
+ if(len1 > len2)
+ return 1;
+ else if(len1 < len2)
+ return -1;
+ else
+ {
+ for(int k = 0; k < len1; k++)
+ {
+ ch1 = char1[i + k];
+ ch2 = char2[j + k];
+ if(ch1 != ch2)
+ return ch1 - ch2;
+ }
+ }
+
+ i = _i - 1;
+ j = _j - 1;
+ }
+ else
+ {
+ if(ignoreCase)
+ {
+ ch1 = Character.toLowerCase(ch1);
+ ch2 = Character.toLowerCase(ch2);
+ }
+
+ if(ch1 != ch2)
+ return ch1 - ch2;
+ }
+ }
+
+ return char1.length - char2.length;
+ } //}}}
+
+ //{{{ StringCompare class
+ /**
+ * Compares objects as strings.
+ */
+ public static class StringCompare<E> implements Comparator<E>
+ {
+ private boolean icase;
+
+ public StringCompare(boolean icase)
+ {
+ this.icase = icase;
+ }
+
+ public StringCompare()
+ {
+ }
+
+ public int compare(E obj1, E obj2)
+ {
+ return compareStrings(obj1.toString(),
+ obj2.toString(),icase);
+ }
+ } //}}}
+
+ //{{{ objectsEqual() method
+ /**
+ * Returns if two strings are equal. This correctly handles null pointers,
+ * as opposed to calling <code>o1.equals(o2)</code>.
+ * @since jEdit 4.3pre6
+ */
+ public static boolean objectsEqual(Object o1, Object o2)
+ {
+ if(o1 == null)
+ {
+ if(o2 == null)
+ return true;
+ else
+ return false;
+ }
+ else if(o2 == null)
+ return false;
+ else
+ return o1.equals(o2);
+ } //}}}
+
+ //{{{ globToRE() method
+ /**
+ * Converts a Unix-style glob to a regular expression.<p>
+ *
+ * ? becomes ., * becomes .*, {aa,bb} becomes (aa|bb).
+ * @param glob The glob pattern
+ * @since jEdit 4.3pre7
+ */
+ public static String globToRE(String glob)
+ {
+ if (glob.startsWith("(re)"))
+ {
+ return glob.substring(4);
+ }
+
+ final Object NEG = new Object();
+ final Object GROUP = new Object();
+ Stack<Object> state = new Stack<Object>();
+
+ StringBuilder buf = new StringBuilder();
+ boolean backslash = false;
+
+ for(int i = 0; i < glob.length(); i++)
+ {
+ char c = glob.charAt(i);
+ if(backslash)
+ {
+ buf.append('\\');
+ buf.append(c);
+ backslash = false;
+ continue;
+ }
+
+ switch(c)
+ {
+ case '\\':
+ backslash = true;
+ break;
+ case '?':
+ buf.append('.');
+ break;
+ case '.':
+ case '+':
+ case '(':
+ case ')':
+ buf.append('\\');
+ buf.append(c);
+ break;
+ case '*':
+ buf.append(".*");
+ break;
+ case '|':
+ if(backslash)
+ buf.append("\\|");
+ else
+ buf.append('|');
+ break;
+ case '{':
+ buf.append('(');
+ if(i + 1 != glob.length() && glob.charAt(i + 1) == '!')
+ {
+ buf.append('?');
+ state.push(NEG);
+ }
+ else
+ state.push(GROUP);
+ break;
+ case ',':
+ if(!state.isEmpty() && state.peek() == GROUP)
+ buf.append('|');
+ else
+ buf.append(',');
+ break;
+ case '}':
+ if(!state.isEmpty())
+ {
+ buf.append(')');
+ if(state.pop() == NEG)
+ buf.append(".*");
+ }
+ else
+ buf.append('}');
+ break;
+ default:
+ buf.append(c);
+ }
+ }
+
+ return buf.toString();
+ } //}}}
+
+ //{{{ regionMatches() method
+ /**
+ * Implementation of String.regionMatches() for CharSequence.
+ *
+ * @param seq The test CharSequence.
+ * @param toff Offset for the test sequence.
+ * @param other The sequence to compare to.
+ * @param ooff Offset of the comparison sequence.
+ * @param len How many characters to compare.
+ * @return Whether the two subsequences are equal.
+ * @see String#regionMatches(int,String,int,int)
+ *
+ * @since jEdit 4.3pre15
+ */
+ public static boolean regionMatches(CharSequence seq,
+ int toff,
+ CharSequence other,
+ int ooff,
+ int len)
+ {
+
+ if (toff < 0 || ooff < 0 || len < 0)
+ return false;
+
+ boolean ret = true;
+ for (int i = 0; i < len; i++)
+ {
+ char c1;
+
+ if (i + toff < seq.length())
+ c1 = seq.charAt(i + toff);
+ else
+ {
+ ret = false;
+ break;
+ }
+
+ char c2;
+ if (i + ooff < other.length())
+ c2 = other.charAt(i + ooff);
+ else
+ {
+ ret = false;
+ break;
+ }
+
+ if (c1 != c2)
+ {
+ ret = false;
+ break;
+ }
+ }
+
+ return ret;
+ } //}}}
+
+ //{{{ startsWith() method
+ /**
+ * Implementation of String.startsWith() for CharSequence.
+ *
+ * @param seq The CharSequence.
+ * @param str String to test.
+ * @return Whether the sequence starts with the test string.
+ *
+ * @since jEdit 4.3pre15
+ */
+ public static boolean startsWith(CharSequence seq, String str)
+ {
+ boolean ret = true;
+ for (int i = 0; i < str.length(); i++)
+ {
+ if (i >= seq.length() ||
+ seq.charAt(i) != str.charAt(i))
+ {
+ ret = false;
+ break;
+ }
+ }
+ return ret;
+ } //}}}
+
+ //{{{ getBoolean() method
+ /**
+ * Returns a boolean from a given object.
+ * @param obj the object
+ * @param def The default value
+ * @return the boolean value if obj is a Boolean,
+ * true if the value is "true", "yes", "on",
+ * false if the value is "false", "no", "off"
+ * def if the value is null or anything else
+ * @since jEdit 4.3pre17
+ */
+ public static boolean getBoolean(Object obj, boolean def)
+ {
+ if(obj == null)
+ return def;
+ else if(obj instanceof Boolean)
+ return ((Boolean)obj).booleanValue();
+ else if("true".equals(obj) || "yes".equals(obj)
+ || "on".equals(obj))
+ return true;
+ else if("false".equals(obj) || "no".equals(obj)
+ || "off".equals(obj))
+ return false;
+
+ return def;
+ } //}}}
+
+ //{{{ formatFileSize() method
+ public static final DecimalFormat KB_FORMAT = new DecimalFormat("#.# kB");
+ public static final DecimalFormat MB_FORMAT = new DecimalFormat("#.# MB");
+
+ /**
+ * Formats the given file size into a nice string (123 Bytes, 10.6 kB,
+ * 1.2 MB).
+ * @param length The size
+ * @since jEdit 4.4pre1
+ */
+ public static String formatFileSize(long length)
+ {
+ if(length < 1024)
+ {
+ return length + " Bytes";
+ }
+ else if(length < 1024 << 10)
+ {
+ return KB_FORMAT.format((double)length / 1024);
+ }
+ else
+ {
+ return MB_FORMAT.format((double)length / 1024 / 1024);
+ }
+ } //}}}
+
+ //}}}
+ private StandardUtilities(){}
+
+ // {{{ MD5 sum method
+ /**
+ * Returns the md5sum for given string. Or dummy byte array on error
+ * Supress NoSuchAlgorithmException because MD5 algorithm always present in JRE
+ * @param s Given string
+ * @return md5 sum of given string
+ */
+ public static byte[] md5(String s) {
+ final byte[] dummy = new byte[1];
+ try {
+ MessageDigest digest = MessageDigest.getInstance("MD5");
+ digest.update(s.getBytes());
+ return digest.digest();
+ } catch (NoSuchAlgorithmException e) {
+ Log.log(Log.ERROR, StandardUtilities.class, "Can't Calculate MD5 hash!", e);
+ return dummy;
+ }
+ }
+ // }}}
+}
diff --git a/jEdit/org/gjt/sp/util/StringList.java b/jEdit/org/gjt/sp/util/StringList.java
index e867433..797265b 100644
--- a/jEdit/org/gjt/sp/util/StringList.java
+++ b/jEdit/org/gjt/sp/util/StringList.java
@@ -1,159 +1,155 @@
-/* {{{ StringList.java - a List of Strings with split() and join() methods
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2005 Alan Ezust
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * }}} */
-
-package org.gjt.sp.util;
-
-//{{{ imports
-import java.util.ArrayList;
-import java.util.Collection;
-//}}}
-
-// {{{ StringList class
-/**
- * A List<String> with some perl-like convenience functions (split/join primarily),
- * and easy conversion to/from arrays.
- * @since jEdit 4.3pre7
- */
-public class StringList extends ArrayList<String>
-{
-
- // {{{ Constructors
- public StringList()
- {
- }
-
-
- public StringList(Object[] array)
- {
- addAll(array);
- } // }}}
-
- // {{{ addAll()
- public void addAll(Object[] array)
- {
- for (int i = 0; i < array.length; ++i)
- {
- add(array[i].toString());
- }
- } // }}}
-
- // {{{ split()
- /**
- * @param orig the original string
- * @param delim a delimiter to use for splitting
- * @return a new StringList containing the split strings.
- */
- public static StringList split(String orig, Object delim)
- {
- if ((orig == null) || (orig.length() == 0))
- return new StringList();
- return new StringList(orig.split(delim.toString()));
- } // }}}
-
- // {{{ toString()
- /**
- * Joins each string in the list with a newline.
- * @return a joined string representation of this,
- * with the newline (\n) as delimiter.
- */
- @Override
- public String toString()
- {
- return join("\n");
- } // }}}
-
- // {{{ toArray()
- /** @return an array of String */
- @Override
- public String[] toArray()
- {
- int siz = size();
- String[] result = new String[siz];
- System.arraycopy(super.toArray(), 0, result, 0, siz);
- return result;
- }
- // }}}
-
- // {{{ join() methods
- /**
- * The reverse of split - given a collection, takes each element
- * and places it in a string, joined by a delimiter.
- */
- public static String join(Collection c, String delim)
- {
- StringList sl = new StringList();
- for (Object o: c) {
- String s = o.toString();
- sl.add(s);
- }
- return sl.join(delim);
- }
-
- /**
- *
- * @param arr array of objects
- * @param delim delimiter to separate strings
- * @return a single string with each element in arr converted to a string and concatenated,
- * separated by delim.
- */
- public static String join(Object[] arr, String delim)
- {
- StringList sl = new StringList();
- sl.addAll(arr);
- return sl.join(delim);
- }
-
-
- /**
- * Non-static version, that joins "this" StringList.
- * @param delim the delimiter
- * @return a joined string with delim inbetween each element
- */
- public String join(String delim)
- {
- int s = size();
- if (s < 1)
- return "";
- if (s == 1)
- return get(0);
- else
- {
- StringBuilder retval = new StringBuilder();
- retval.append(get(0));
- for (int i = 1; i < s; ++i)
- retval.append(delim + get(i));
- return retval.toString();
- }
-
- } // }}}
-
- // {{{ main()
- public static void main(String args[])
- {
- String teststr = "a,b,c,d,e,f";
- StringList.split(teststr, ",");
- //String joinstr = sl.join(",");
- // assert(teststr.equals(joinstr));
- System.out.println("Test Passed");
-
- }// }}}
- private static final long serialVersionUID = -6408080298368668262L;
-} // }}}
+/* {{{ StringList.java - a List of Strings with split() and join() methods
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2005 Alan Ezust
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * }}} */
+
+package org.gjt.sp.util;
+
+//{{{ imports
+import java.util.ArrayList;
+import java.util.Collection;
+//}}}
+
+// {{{ StringList class
+/**
+ * A List<String> with some perl-like convenience functions (split/join primarily),
+ * and easy conversion to/from arrays.
+ * @since jEdit 4.3pre7
+ */
+public class StringList extends ArrayList<String>
+{
+
+ // {{{ Constructors
+ public StringList()
+ {
+ }
+
+
+ public StringList(Object[] array)
+ {
+ addAll(array);
+ } // }}}
+
+ // {{{ addAll()
+ public void addAll(Object[] array)
+ {
+ for (int i = 0; i < array.length; ++i)
+ {
+ add(array[i].toString());
+ }
+ } // }}}
+
+ // {{{ split()
+ /**
+ * @param orig the original string
+ * @param delim a delimiter to use for splitting
+ * @return a new StringList containing the split strings.
+ */
+ public static StringList split(String orig, Object delim)
+ {
+ if ((orig == null) || (orig.length() == 0))
+ return new StringList();
+ return new StringList(orig.split(delim.toString()));
+ } // }}}
+
+ // {{{ toString()
+ /**
+ * Joins each string in the list with a newline.
+ * @return a joined string representation of this,
+ * with the newline (\n) as delimiter.
+ */
+ @Override
+ public String toString()
+ {
+ return join("\n");
+ } // }}}
+
+ // {{{ toArray()
+ /** @return an array of String */
+ @Override
+ public String[] toArray()
+ {
+ int siz = size();
+ String[] result = new String[siz];
+ System.arraycopy(super.toArray(), 0, result, 0, siz);
+ return result;
+ }
+ // }}}
+
+ // {{{ join() methods
+ /**
+ * The reverse of split - given a collection, takes each element
+ * and places it in a string, joined by a delimiter.
+ */
+ public static String join(Collection<String> c, String delim)
+ {
+ StringList sl = new StringList();
+ for (String s: c)
+ sl.add(s);
+ return sl.join(delim);
+ }
+
+ /**
+ *
+ * @param arr array of objects
+ * @param delim delimiter to separate strings
+ * @return a single string with each element in arr converted to a string and concatenated,
+ * separated by delim.
+ */
+ public static String join(Object[] arr, String delim)
+ {
+ return new StringList(arr).join(delim);
+ }
+
+
+ /**
+ * Non-static version, that joins "this" StringList.
+ * @param delim the delimiter
+ * @return a joined string with delim inbetween each element
+ */
+ public String join(String delim)
+ {
+ int s = size();
+ if (s < 1)
+ return "";
+ if (s == 1)
+ return get(0);
+ else
+ {
+ StringBuilder retval = new StringBuilder();
+ retval.append(get(0));
+ for (int i = 1; i < s; ++i)
+ retval.append(delim + get(i));
+ return retval.toString();
+ }
+
+ } // }}}
+
+ // {{{ main()
+ public static void main(String args[])
+ {
+ String teststr = "a,b,c,d,e,f";
+ StringList.split(teststr, ",");
+ //String joinstr = sl.join(",");
+ // assert(teststr.equals(joinstr));
+ System.out.println("Test Passed");
+
+ }// }}}
+ private static final long serialVersionUID = -6408080298368668262L;
+} // }}}
diff --git a/jEdit/org/gjt/sp/util/SyntaxUtilities.java b/jEdit/org/gjt/sp/util/SyntaxUtilities.java
index 643e5a8..9b5761b 100644
--- a/jEdit/org/gjt/sp/util/SyntaxUtilities.java
+++ b/jEdit/org/gjt/sp/util/SyntaxUtilities.java
@@ -1,230 +1,230 @@
-/*
- * SyntaxUtilities.java - Syntax and styles utility utility functions
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2008 Matthieu Casanova, Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-
-//{{{ Imports
-import java.awt.Color;
-import java.awt.Font;
-import java.util.Locale;
-import java.util.StringTokenizer;
-import org.gjt.sp.jedit.syntax.SyntaxStyle;
-import org.gjt.sp.jedit.syntax.Token;
-import org.gjt.sp.jedit.IPropertyManager;
-//}}}
-
-/**
- * Syntax utilities that depends on JDK only and syntax package.
- *
- * @author Matthieu Casanova
- * @version $Id: StandardUtilities.java 9871 2007-06-28 16:33:20Z Vampire0 $
- * @since 4.3pre13
- */
-public class SyntaxUtilities
-{
- public static IPropertyManager propertyManager;
-
-
- //{{{ getColorHexString() method
- /**
- * Converts a color object to its hex value. The hex value
- * prefixed is with `#', for example `#ff0088'.
- * @param c The color object
- * @since jEdit 4.3pre13
- */
- public static String getColorHexString(Color c)
- {
- String colString = Integer.toHexString(c.getRGB() & 0xffffff);
- return "#000000".substring(0,7 - colString.length()).concat(colString);
- } //}}}
-
- //{{{ parseColor() method
- /**
- * @since jEdit 4.3pre13
- */
- public static Color parseColor(String name, Color defaultColor)
- {
- if(name == null || name.length() == 0)
- return defaultColor;
- else if(name.charAt(0) == '#')
- {
- try
- {
- return Color.decode(name);
- }
- catch(NumberFormatException nf)
- {
- return defaultColor;
- }
- }
- else if("red".equals(name))
- return Color.red;
- else if("green".equals(name))
- return Color.green;
- else if("blue".equals(name))
- return Color.blue;
- else if("yellow".equals(name))
- return Color.yellow;
- else if("orange".equals(name))
- return Color.orange;
- else if("white".equals(name))
- return Color.white;
- else if("lightGray".equals(name))
- return Color.lightGray;
- else if("gray".equals(name))
- return Color.gray;
- else if("darkGray".equals(name))
- return Color.darkGray;
- else if("black".equals(name))
- return Color.black;
- else if("cyan".equals(name))
- return Color.cyan;
- else if("magenta".equals(name))
- return Color.magenta;
- else if("pink".equals(name))
- return Color.pink;
- else
- return defaultColor;
- } //}}}
-
- //{{{ parseStyle() method
- /**
- * Converts a style string to a style object.
- * @param str The style string
- * @param family Style strings only specify font style, not font family
- * @param size Style strings only specify font style, not font family
- * @param color If false, the styles will be monochrome
- * @param defaultFgColor Default foreground color (if not specified in style string)
- * @exception IllegalArgumentException if the style is invalid
- * @since jEdit 4.3pre17
- */
- public static SyntaxStyle parseStyle(String str, String family, int size,
- boolean color, Color defaultFgColor)
- throws IllegalArgumentException
- {
- Color fgColor = defaultFgColor;
- Color bgColor = null;
- boolean italic = false;
- boolean bold = false;
- StringTokenizer st = new StringTokenizer(str);
- while(st.hasMoreTokens())
- {
- String s = st.nextToken();
- if(s.startsWith("color:"))
- {
- if(color)
- fgColor = parseColor(s.substring(6), Color.black);
- }
- else if(s.startsWith("bgColor:"))
- {
- if(color)
- bgColor = parseColor(s.substring(8), null);
- }
- else if(s.startsWith("style:"))
- {
- for(int i = 6; i < s.length(); i++)
- {
- if(s.charAt(i) == 'i')
- italic = true;
- else if(s.charAt(i) == 'b')
- bold = true;
- else
- throw new IllegalArgumentException(
- "Invalid style: " + s);
- }
- }
- else
- throw new IllegalArgumentException(
- "Invalid directive: " + s);
- }
- return new SyntaxStyle(fgColor,bgColor,
- new Font(family,
- (italic ? Font.ITALIC : 0) | (bold ? Font.BOLD : 0),
- size));
- } //}}}
-
- //{{{ parseStyle() method
- /**
- * Converts a style string to a style object.
- * @param str The style string
- * @param family Style strings only specify font style, not font family
- * @param size Style strings only specify font style, not font family
- * @param color If false, the styles will be monochrome
- * @exception IllegalArgumentException if the style is invalid
- * @since jEdit 4.3pre13
- */
- public static SyntaxStyle parseStyle(String str, String family, int size,
- boolean color)
- throws IllegalArgumentException
- {
- return parseStyle(str, family, size, color, Color.black);
- } //}}}
-
- //{{{ loadStyles() methods
- /**
- * Loads the syntax styles from the properties, giving them the specified
- * base font family and size.
- * @param family The font family
- * @param size The font size
- * @since jEdit 4.3pre13
- */
- public static SyntaxStyle[] loadStyles(String family, int size)
- {
- return loadStyles(family,size,true);
- }
-
- /**
- * Loads the syntax styles from the properties, giving them the specified
- * base font family and size.
- * @param family The font family
- * @param size The font size
- * @param color If false, the styles will be monochrome
- * @since jEdit 4.3pre13
- */
- public static SyntaxStyle[] loadStyles(String family, int size, boolean color)
- {
- SyntaxStyle[] styles = new SyntaxStyle[Token.ID_COUNT];
-
- // start at 1 not 0 to skip Token.NULL
- for(int i = 1; i < styles.length; i++)
- {
- try
- {
- String styleName = "view.style."
- + Token.tokenToString((byte)i)
- .toLowerCase(Locale.ENGLISH);
- styles[i] = parseStyle(
- propertyManager.getProperty(styleName),
- family,size,color);
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,StandardUtilities.class,e);
- }
- }
-
- return styles;
- } //}}}
-
- private SyntaxUtilities(){}
-}
+/*
+ * SyntaxUtilities.java - Syntax and styles utility utility functions
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2008 Matthieu Casanova, Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+
+//{{{ Imports
+import java.awt.Color;
+import java.awt.Font;
+import java.util.Locale;
+import java.util.StringTokenizer;
+import org.gjt.sp.jedit.syntax.SyntaxStyle;
+import org.gjt.sp.jedit.syntax.Token;
+import org.gjt.sp.jedit.IPropertyManager;
+//}}}
+
+/**
+ * Syntax utilities that depends on JDK only and syntax package.
+ *
+ * @author Matthieu Casanova
+ * @version $Id: StandardUtilities.java 9871 2007-06-28 16:33:20Z Vampire0 $
+ * @since 4.3pre13
+ */
+public class SyntaxUtilities
+{
+ public static IPropertyManager propertyManager;
+
+
+ //{{{ getColorHexString() method
+ /**
+ * Converts a color object to its hex value. The hex value
+ * prefixed is with `#', for example `#ff0088'.
+ * @param c The color object
+ * @since jEdit 4.3pre13
+ */
+ public static String getColorHexString(Color c)
+ {
+ String colString = Integer.toHexString(c.getRGB() & 0xffffff);
+ return "#000000".substring(0,7 - colString.length()).concat(colString);
+ } //}}}
+
+ //{{{ parseColor() method
+ /**
+ * @since jEdit 4.3pre13
+ */
+ public static Color parseColor(String name, Color defaultColor)
+ {
+ if(name == null || name.length() == 0)
+ return defaultColor;
+ else if(name.charAt(0) == '#')
+ {
+ try
+ {
+ return Color.decode(name);
+ }
+ catch(NumberFormatException nf)
+ {
+ return defaultColor;
+ }
+ }
+ else if("red".equals(name))
+ return Color.red;
+ else if("green".equals(name))
+ return Color.green;
+ else if("blue".equals(name))
+ return Color.blue;
+ else if("yellow".equals(name))
+ return Color.yellow;
+ else if("orange".equals(name))
+ return Color.orange;
+ else if("white".equals(name))
+ return Color.white;
+ else if("lightGray".equals(name))
+ return Color.lightGray;
+ else if("gray".equals(name))
+ return Color.gray;
+ else if("darkGray".equals(name))
+ return Color.darkGray;
+ else if("black".equals(name))
+ return Color.black;
+ else if("cyan".equals(name))
+ return Color.cyan;
+ else if("magenta".equals(name))
+ return Color.magenta;
+ else if("pink".equals(name))
+ return Color.pink;
+ else
+ return defaultColor;
+ } //}}}
+
+ //{{{ parseStyle() method
+ /**
+ * Converts a style string to a style object.
+ * @param str The style string
+ * @param family Style strings only specify font style, not font family
+ * @param size Style strings only specify font style, not font family
+ * @param color If false, the styles will be monochrome
+ * @param defaultFgColor Default foreground color (if not specified in style string)
+ * @exception IllegalArgumentException if the style is invalid
+ * @since jEdit 4.3pre17
+ */
+ public static SyntaxStyle parseStyle(String str, String family, int size,
+ boolean color, Color defaultFgColor)
+ throws IllegalArgumentException
+ {
+ Color fgColor = defaultFgColor;
+ Color bgColor = null;
+ boolean italic = false;
+ boolean bold = false;
+ StringTokenizer st = new StringTokenizer(str);
+ while(st.hasMoreTokens())
+ {
+ String s = st.nextToken();
+ if(s.startsWith("color:"))
+ {
+ if(color)
+ fgColor = parseColor(s.substring(6), Color.black);
+ }
+ else if(s.startsWith("bgColor:"))
+ {
+ if(color)
+ bgColor = parseColor(s.substring(8), null);
+ }
+ else if(s.startsWith("style:"))
+ {
+ for(int i = 6; i < s.length(); i++)
+ {
+ if(s.charAt(i) == 'i')
+ italic = true;
+ else if(s.charAt(i) == 'b')
+ bold = true;
+ else
+ throw new IllegalArgumentException(
+ "Invalid style: " + s);
+ }
+ }
+ else
+ throw new IllegalArgumentException(
+ "Invalid directive: " + s);
+ }
+ return new SyntaxStyle(fgColor,bgColor,
+ new Font(family,
+ (italic ? Font.ITALIC : 0) | (bold ? Font.BOLD : 0),
+ size));
+ } //}}}
+
+ //{{{ parseStyle() method
+ /**
+ * Converts a style string to a style object.
+ * @param str The style string
+ * @param family Style strings only specify font style, not font family
+ * @param size Style strings only specify font style, not font family
+ * @param color If false, the styles will be monochrome
+ * @exception IllegalArgumentException if the style is invalid
+ * @since jEdit 4.3pre13
+ */
+ public static SyntaxStyle parseStyle(String str, String family, int size,
+ boolean color)
+ throws IllegalArgumentException
+ {
+ return parseStyle(str, family, size, color, Color.black);
+ } //}}}
+
+ //{{{ loadStyles() methods
+ /**
+ * Loads the syntax styles from the properties, giving them the specified
+ * base font family and size.
+ * @param family The font family
+ * @param size The font size
+ * @since jEdit 4.3pre13
+ */
+ public static SyntaxStyle[] loadStyles(String family, int size)
+ {
+ return loadStyles(family,size,true);
+ }
+
+ /**
+ * Loads the syntax styles from the properties, giving them the specified
+ * base font family and size.
+ * @param family The font family
+ * @param size The font size
+ * @param color If false, the styles will be monochrome
+ * @since jEdit 4.3pre13
+ */
+ public static SyntaxStyle[] loadStyles(String family, int size, boolean color)
+ {
+ SyntaxStyle[] styles = new SyntaxStyle[Token.ID_COUNT];
+
+ // start at 1 not 0 to skip Token.NULL
+ for(int i = 1; i < styles.length; i++)
+ {
+ try
+ {
+ String styleName = "view.style."
+ + Token.tokenToString((byte)i)
+ .toLowerCase(Locale.ENGLISH);
+ styles[i] = parseStyle(
+ propertyManager.getProperty(styleName),
+ family,size,color);
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,StandardUtilities.class,e);
+ }
+ }
+
+ return styles;
+ } //}}}
+
+ private SyntaxUtilities(){}
+}
diff --git a/jEdit/org/gjt/sp/util/Task.java b/jEdit/org/gjt/sp/util/Task.java
new file mode 100644
index 0000000..6ed0a44
--- /dev/null
+++ b/jEdit/org/gjt/sp/util/Task.java
@@ -0,0 +1,154 @@
+/*
+ * jEdit - Programmer's Text Editor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+import javax.swing.*;
+
+/**
+ * A Task is basically a Runnable but with some information about it's progression.
+ * @since jEdit 4.4pre1
+ * @author Matthieu Casanova
+ */
+public abstract class Task implements Runnable, ProgressObserver
+{
+ private long value;
+ private String status;
+ private long maximum;
+
+ private String label;
+
+ /**
+ * The thread in which the task is running.
+ * It is set automatically when the task starts.
+ */
+ private Thread thread;
+
+ private SwingWorker.StateValue state;
+
+ private volatile boolean cancellable = true;
+
+ //{{{ Task Constructor
+ protected Task()
+ {
+ state = SwingWorker.StateValue.PENDING;
+ } //}}}
+
+ //{{{ run() method
+ public final void run()
+ {
+ state = SwingWorker.StateValue.STARTED;
+ TaskManager.instance.fireRunning(this);
+ try
+ {
+ thread = Thread.currentThread();
+ _run();
+ thread = null;
+ }
+ catch (Throwable t)
+ {
+ Log.log(Log.ERROR, this, t);
+ }
+ state = SwingWorker.StateValue.DONE;
+ TaskManager.instance.fireDone(this);
+ } //}}}
+
+ /**
+ * This is the method you have to implement and that will be executed
+ * in the thread.
+ */
+ public abstract void _run();
+
+ public final void setValue(long value)
+ {
+ this.value = value;
+ TaskManager.instance.fireValueUpdated(this);
+ }
+
+ public final void setMaximum(long maximum)
+ {
+ this.maximum = maximum;
+ TaskManager.instance.fireMaximumUpdated(this);
+ }
+
+ public void setStatus(String status)
+ {
+ this.status = status;
+ TaskManager.instance.fireStatusUpdated(this);
+ }
+
+ public long getValue()
+ {
+ return value;
+ }
+
+ public String getStatus()
+ {
+ return status;
+ }
+
+ public long getMaximum()
+ {
+ return maximum;
+ }
+
+ public SwingWorker.StateValue getState()
+ {
+ return state;
+ }
+
+ public String getLabel()
+ {
+ return label;
+ }
+
+ public void setLabel(String label)
+ {
+ this.label = label;
+ }
+
+ public boolean isCancellable()
+ {
+ return cancellable;
+ }
+
+ public void setCancellable(boolean cancellable)
+ {
+ this.cancellable = cancellable;
+ }
+
+ //{{{ cancel() method
+ /**
+ * Cancel the task
+ */
+ public void cancel()
+ {
+ if (cancellable && thread != null)
+ thread.interrupt();
+ } //}}}
+
+
+ @Override
+ public String toString()
+ {
+ return "Task[" + state + ',' + status + ',' + value + '/' + maximum + ']';
+ }
+}
diff --git a/jEdit/org/gjt/sp/util/TaskListener.java b/jEdit/org/gjt/sp/util/TaskListener.java
new file mode 100644
index 0000000..9fe6915
--- /dev/null
+++ b/jEdit/org/gjt/sp/util/TaskListener.java
@@ -0,0 +1,38 @@
+/*
+ * TaskListener
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+import java.util.EventListener;
+
+/**
+ * @author Matthieu Casanova
+ */
+public interface TaskListener extends EventListener
+{
+ void waiting(Task task);
+ void running(Task task);
+ void done(Task task);
+
+ void statusUpdated(Task task);
+ void maximumUpdated(Task task);
+ void valueUpdated(Task task);
+}
diff --git a/jEdit/org/gjt/sp/util/TaskManager.java b/jEdit/org/gjt/sp/util/TaskManager.java
new file mode 100644
index 0000000..9fa32f7
--- /dev/null
+++ b/jEdit/org/gjt/sp/util/TaskManager.java
@@ -0,0 +1,167 @@
+/*
+ * jEdit - Programmer's Text Editor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 jEdit contributors
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.util;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+/**
+ * The TaskManager manage Tasks in the Threadpool, it knows all of them, and
+ * sends events to TaskListeners.
+ *
+ * @author Matthieu Casanova
+ */
+public class TaskManager
+{
+ public static final TaskManager instance = new TaskManager();
+
+ private final List<TaskListener> listeners;
+
+ private final List<Task> tasks;
+
+ private TaskManager()
+ {
+ listeners = new CopyOnWriteArrayList<TaskListener>();
+ tasks = Collections.synchronizedList(new ArrayList<Task>());
+ }
+
+ public void addTaskListener(TaskListener listener)
+ {
+ if (!listeners.contains(listener))
+ {
+ listeners.add(listener);
+ }
+ }
+
+ public void removeTaskListener(TaskListener listener)
+ {
+ if (listeners.contains(listener))
+ listeners.remove(listener);
+ }
+
+ void fireWaiting(Task task)
+ {
+ tasks.add(task);
+ List<TaskListener> listeners = this.listeners;
+ for (TaskListener listener : listeners)
+ {
+ listener.waiting(task);
+ }
+ }
+
+ void fireRunning(Task task)
+ {
+ List<TaskListener> listeners = this.listeners;
+ for (TaskListener listener : listeners)
+ {
+ listener.running(task);
+ }
+ }
+
+ void fireDone(Task task)
+ {
+ tasks.remove(task);
+ List<TaskListener> listeners = this.listeners;
+ for (TaskListener listener : listeners)
+ {
+ listener.done(task);
+ }
+ }
+
+ void fireStatusUpdated(Task task)
+ {
+ List<TaskListener> listeners = this.listeners;
+ for (TaskListener listener : listeners)
+ {
+ listener.statusUpdated(task);
+ }
+ }
+
+ void fireValueUpdated(Task task)
+ {
+ List<TaskListener> listeners = this.listeners;
+ for (TaskListener listener : listeners)
+ {
+ listener.valueUpdated(task);
+ }
+ }
+
+ void fireMaximumUpdated(Task task)
+ {
+ List<TaskListener> listeners = this.listeners;
+ for (TaskListener listener : listeners)
+ {
+ listener.maximumUpdated(task);
+ }
+ }
+
+ /**
+ * Visit all tasks.
+ * While doing this the task list is locked
+ *
+ * @param visitor the visitor
+ */
+ public void visit(TaskVisitor visitor)
+ {
+ synchronized (tasks)
+ {
+ for (Task task : tasks)
+ {
+ visitor.visit(task);
+ }
+ }
+ }
+
+ /**
+ * Encapsulate a runnable into a task.
+ * It is done by the Threadpool when receiving a simple Runnable
+ *
+ * @param runnable the runnable to encapsulate
+ * @return a Task
+ */
+ static Task decorate(Runnable runnable)
+ {
+ return new MyTask(runnable);
+ }
+
+ public interface TaskVisitor
+ {
+ void visit(Task task);
+ }
+
+ private static class MyTask extends Task
+ {
+ private final Runnable runnable;
+
+ private MyTask(Runnable runnable)
+ {
+ this.runnable = runnable;
+ }
+
+ @Override
+ public void _run()
+ {
+ runnable.run();
+ }
+ }
+}
diff --git a/jEdit/org/gjt/sp/util/ThreadAbortMonitor.java b/jEdit/org/gjt/sp/util/ThreadAbortMonitor.java
index 7174f63..9581963 100644
--- a/jEdit/org/gjt/sp/util/ThreadAbortMonitor.java
+++ b/jEdit/org/gjt/sp/util/ThreadAbortMonitor.java
@@ -1,31 +1,31 @@
-/*
- * ThreadAbortMonitor.java - Thread Abort Monitor
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2006 Matthieu Casanova
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-package org.gjt.sp.util;
-
-/**
- * @author Matthieu Casanova
- * @author $Id: VFS.java 7129 2006-09-25 20:05:57Z kpouer $
- */
-public interface ThreadAbortMonitor
-{
- boolean isAborted();
-}
+/*
+ * ThreadAbortMonitor.java - Thread Abort Monitor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2006 Matthieu Casanova
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.util;
+
+/**
+ * @author Matthieu Casanova
+ * @author $Id: VFS.java 7129 2006-09-25 20:05:57Z kpouer $
+ */
+public interface ThreadAbortMonitor
+{
+ boolean isAborted();
+}
diff --git a/jEdit/org/gjt/sp/util/ThreadUtilities.java b/jEdit/org/gjt/sp/util/ThreadUtilities.java
new file mode 100644
index 0000000..210a2d3
--- /dev/null
+++ b/jEdit/org/gjt/sp/util/ThreadUtilities.java
@@ -0,0 +1,177 @@
+/*
+ * ThreadUtilities.java - Utilities for threading
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2010 Matthieu Casanova
+ * Portions Copyright (C) 2010 Marcelo Vanzin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.gjt.sp.util;
+
+//{{{ Imports
+import java.awt.EventQueue;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * The threadpool of jEdit.
+ * It uses a ExecutorService from the java.util.concurrent package.
+ * You can run {@link Task} or {@link Runnable} in it, Runnables will be
+ * encapsulated in Task.
+ *
+ * @author Matthieu Casanova
+ * @author Marcelo Vanzin
+ * @since jEdit 4.4pre1
+ */
+public class ThreadUtilities
+{
+ //{{{ runInDispatchThread() method
+ /**
+ * Run the runnable in EventDispatch Thread.
+ * If the current thread is EventDispatch, it will run
+ * immediately otherwise it will be queued in the DispatchThread
+ * The difference with VFSManager.runInAWTThread() method is that
+ * this one will not wait for IO Request before being executed
+ *
+ * @param runnable the runnable to run
+ */
+ public static void runInDispatchThread(Runnable runnable)
+ {
+ if (EventQueue.isDispatchThread())
+ runnable.run();
+ else
+ EventQueue.invokeLater(runnable);
+ } //}}}
+
+ //{{{ runInDispatchThreadAndWait() method
+ public static void runInDispatchThreadAndWait(Runnable runnable)
+ {
+ MyRunnable run = new MyRunnable(runnable);
+ runInDispatchThread(run);
+ while (!run.done)
+ {
+ synchronized (run)
+ {
+ try
+ {
+ run.wait(1000L);
+ }
+ catch (InterruptedException e)
+ {
+ Log.log(Log.ERROR, ThreadUtilities.class, e);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ runInBackground() method
+ /**
+ * Run the runnable in the threadpool.
+ * The runnable will be encapsulated in a {@link Task}
+ * @see #runInBackground(Task)
+ *
+ * @param runnable the runnable to run
+ */
+ public static void runInBackground(Runnable runnable)
+ {
+ Task task;
+ if (runnable instanceof Task)
+ {
+ task = (Task) runnable;
+ }
+ else
+ {
+ task = TaskManager.decorate(runnable);
+ }
+ TaskManager.instance.fireWaiting(task);
+ threadPool.execute(task);
+ }
+
+ /**
+ * Run the task in the threadpool.
+ * The runnable will be encapsulated in a {@link Task}
+ *
+ * @param task the task to run
+ */
+ public static void runInBackground(Task task)
+ {
+ TaskManager.instance.fireWaiting(task);
+ threadPool.execute(task);
+ } //}}}
+
+ private ThreadUtilities()
+ {
+ }
+
+ //{{{ JEditThreadFactory class
+ private static class JEditThreadFactory implements ThreadFactory
+ {
+ private JEditThreadFactory()
+ {
+ threadIDs = new AtomicInteger(0);
+ threadGroup = new ThreadGroup("jEdit Workers");
+ }
+
+ public Thread newThread(Runnable r)
+ {
+ Thread t = new Thread(threadGroup, r);
+ t.setName("jEdit Worker #" +threadIDs.getAndIncrement());
+ return t;
+ }
+
+ private final AtomicInteger threadIDs;
+ private final ThreadGroup threadGroup;
+ } //}}}
+
+
+ private static final ExecutorService threadPool;
+
+ private static final int CORE_POOL_SIZE = 4;
+
+ static
+ {
+ threadPool = Executors.newCachedThreadPool(new JEditThreadFactory());
+ ((ThreadPoolExecutor) threadPool).setCorePoolSize(CORE_POOL_SIZE);
+ }
+
+ //{{{ MyRunnable class
+ private static class MyRunnable implements Runnable
+ {
+ private final Runnable runnable;
+
+ private volatile boolean done;
+
+ private MyRunnable(Runnable runnable)
+ {
+ this.runnable = runnable;
+ }
+
+ public void run()
+ {
+ runnable.run();
+ done = true;
+ synchronized (this)
+ {
+ notifyAll();
+ }
+ }
+ } //}}}
+
+}
diff --git a/jEdit/org/gjt/sp/util/WorkRequest.java b/jEdit/org/gjt/sp/util/WorkRequest.java
index 5e91125..fa14631 100644
--- a/jEdit/org/gjt/sp/util/WorkRequest.java
+++ b/jEdit/org/gjt/sp/util/WorkRequest.java
@@ -1,131 +1,136 @@
-/*
- * WorkRequest.java - Runnable subclass
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-/**
- * A subclass of the Runnable interface.
- * @since jEdit 2.6pre1
- * @version $Id: WorkRequest.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public abstract class WorkRequest implements Runnable, ProgressObserver
-{
- /**
- * If the max value is greater that <code>Integer.MAX_VALUE</code> this
- * will be true and all values will be divided by 1024.
- * @since jEdit 4.3pre3
- */
- private boolean largeValues;
-
- /**
- * Sets if the request can be aborted.
- */
- public void setAbortable(boolean abortable)
- {
- Thread thread = Thread.currentThread();
- if(thread instanceof WorkThread)
- ((WorkThread)thread).setAbortable(abortable);
- }
-
- /**
- * Sets the status text.
- * @param status The status text
- */
- public void setStatus(String status)
- {
- Thread thread = Thread.currentThread();
- if(thread instanceof WorkThread)
- ((WorkThread)thread).setStatus(status);
- }
-
- /**
- * Sets the progress value.
- * @param value The progress value.
- * @deprecated use {@link #setValue(long)}
- */
- public void setProgressValue(int value)
- {
- Thread thread = Thread.currentThread();
- if(thread instanceof WorkThread)
- ((WorkThread)thread).setProgressValue(value);
- }
-
- /**
- * Sets the maximum progress value.
- * @param value The progress value.
- * @deprecated use {@link #setMaximum(long)}
- */
- public void setProgressMaximum(int value)
- {
- Thread thread = Thread.currentThread();
- if(thread instanceof WorkThread)
- ((WorkThread)thread).setProgressMaximum(value);
- }
-
- //{{{ setValue() method
- /**
- * Update the progress value.
- *
- * @param value the new value
- * @since jEdit 4.3pre3
- */
- public void setValue(long value)
- {
- Thread thread = Thread.currentThread();
- if(thread instanceof WorkThread)
- {
- if (largeValues)
- {
- ((WorkThread)thread).setProgressValue((int) (value >> 10));
- }
- else
- {
- ((WorkThread)thread).setProgressValue((int) value);
- }
- }
- } //}}}
-
- //{{{ setValue() method
- /**
- * Update the maximum value.
- *
- * @param value the new maximum value
- * @since jEdit 4.3pre3
- */
- public void setMaximum(long value)
- {
- Thread thread = Thread.currentThread();
- if(thread instanceof WorkThread)
- {
- if (value > Integer.MAX_VALUE)
- {
- largeValues = true;
- ((WorkThread)thread).setProgressMaximum((int) (value >> 10));
- }
- else
- {
- largeValues = false;
- ((WorkThread)thread).setProgressMaximum((int) value);
- }
- }
- } //}}}
-}
+/*
+ * WorkRequest.java - Runnable subclass
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+/**
+ * A subclass of the Runnable interface.
+ * @since jEdit 2.6pre1
+ * @deprecated
+ * @see org.gjt.sp.util.Task
+ * @version $Id: WorkRequest.java 19045 2010-11-28 02:24:02Z ezust $
+ */
+ at Deprecated
+public abstract class WorkRequest implements Runnable, ProgressObserver
+{
+ /**
+ * If the max value is greater that <code>Integer.MAX_VALUE</code> this
+ * will be true and all values will be divided by 1024.
+ * @since jEdit 4.3pre3
+ */
+ private boolean largeValues;
+
+ /**
+ * Sets if the request can be aborted.
+ */
+ public void setAbortable(boolean abortable)
+ {
+ Thread thread = Thread.currentThread();
+ if(thread instanceof WorkThread)
+ ((WorkThread)thread).setAbortable(abortable);
+ }
+
+ /**
+ * Sets the status text.
+ * @param status The status text
+ */
+ public void setStatus(String status)
+ {
+ Thread thread = Thread.currentThread();
+ if(thread instanceof WorkThread)
+ ((WorkThread)thread).setStatus(status);
+ }
+
+ /**
+ * Sets the progress value.
+ * @param value The progress value.
+ * @deprecated use {@link #setValue(long)}
+ */
+ @Deprecated
+ public void setProgressValue(int value)
+ {
+ Thread thread = Thread.currentThread();
+ if(thread instanceof WorkThread)
+ ((WorkThread)thread).setProgressValue(value);
+ }
+
+ /**
+ * Sets the maximum progress value.
+ * @param value The progress value.
+ * @deprecated use {@link #setMaximum(long)}
+ */
+ @Deprecated
+ public void setProgressMaximum(int value)
+ {
+ Thread thread = Thread.currentThread();
+ if(thread instanceof WorkThread)
+ ((WorkThread)thread).setProgressMaximum(value);
+ }
+
+ //{{{ setValue() method
+ /**
+ * Update the progress value.
+ *
+ * @param value the new value
+ * @since jEdit 4.3pre3
+ */
+ public void setValue(long value)
+ {
+ Thread thread = Thread.currentThread();
+ if(thread instanceof WorkThread)
+ {
+ if (largeValues)
+ {
+ ((WorkThread)thread).setProgressValue((int) (value >> 10));
+ }
+ else
+ {
+ ((WorkThread)thread).setProgressValue((int) value);
+ }
+ }
+ } //}}}
+
+ //{{{ setValue() method
+ /**
+ * Update the maximum value.
+ *
+ * @param value the new maximum value
+ * @since jEdit 4.3pre3
+ */
+ public void setMaximum(long value)
+ {
+ Thread thread = Thread.currentThread();
+ if(thread instanceof WorkThread)
+ {
+ if (value > Integer.MAX_VALUE)
+ {
+ largeValues = true;
+ ((WorkThread)thread).setProgressMaximum((int) (value >> 10));
+ }
+ else
+ {
+ largeValues = false;
+ ((WorkThread)thread).setProgressMaximum((int) value);
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/util/WorkThread.java b/jEdit/org/gjt/sp/util/WorkThread.java
index ae82069..2299751 100644
--- a/jEdit/org/gjt/sp/util/WorkThread.java
+++ b/jEdit/org/gjt/sp/util/WorkThread.java
@@ -1,243 +1,246 @@
-/*
- * WorkThread.java - Background thread that does stuff
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-/**
- * Services work requests in the background.
- * @author Slava Pestov
- * @version $Id: WorkThread.java 12504 2008-04-22 23:12:43Z ezust $
- */
-public class WorkThread extends Thread implements ThreadAbortMonitor
-{
- public WorkThread(WorkThreadPool pool, ThreadGroup group, String name)
- {
- super(group, name);
- // so that jEdit doesn't exit with no views open automatically
- //setDaemon(true);
- setPriority(Thread.MIN_PRIORITY);
-
- this.pool = pool;
- }
-
- /**
- * Sets if the current request can be aborted.
- * If set to true and already aborted, the thread will be stopped
- *
- * @param abortable true if the WorkThread is abortable
- * @since jEdit 2.6pre1
- */
- public void setAbortable(boolean abortable)
- {
- synchronized(abortLock)
- {
- this.abortable = abortable;
- if(aborted)
- stop(new Abort());
- }
- }
-
- /**
- * Returns if the work thread is currently running a request.
- * @return true if a request is currently running
- */
- public boolean isRequestRunning()
- {
- return requestRunning;
- }
-
-
- public boolean isAborted()
- {
- synchronized (abortLock)
- {
- return aborted;
- }
- }
-
- /**
- * Returns the status text.
- * @return the status label
- */
- public String getStatus()
- {
- return status;
- }
-
- /**
- * Sets the status text.
- * @param status the new status of the thread
- * @since jEdit 2.6pre1
- */
- public void setStatus(String status)
- {
- this.status = status;
- pool.fireProgressChanged(this);
- }
-
- /**
- * Returns the progress value.
- * @return the progress value
- */
- public int getProgressValue()
- {
- return progressValue;
- }
-
- /**
- * Sets the progress value.
- * @param progressValue the new progress value
- * @since jEdit 2.6pre1
- */
- public void setProgressValue(int progressValue)
- {
- this.progressValue = progressValue;
- pool.fireProgressChanged(this);
- }
-
- /**
- * Returns the progress maximum.
- * @return the maximum value of the progression
- */
- public int getProgressMaximum()
- {
- return progressMaximum;
- }
-
- /**
- * Sets the maximum progress value.
- * @param progressMaximum the maximum value of the progression
- * @since jEdit 2.6pre1
- */
- public void setProgressMaximum(int progressMaximum)
- {
- this.progressMaximum = progressMaximum;
- pool.fireProgressChanged(this);
- }
-
- /**
- * Aborts the currently running request, if allowed.
- * @since jEdit 2.6pre1
- */
- public void abortCurrentRequest()
- {
- synchronized(abortLock)
- {
- if(abortable && !aborted)
- stop(new Abort());
- aborted = true;
- }
- }
-
- public void run()
- {
- Log.log(Log.DEBUG,this,"Work request thread starting [" + getName() + "]");
-
- for(;;)
- {
- doRequests();
- }
- }
-
- // private members
- private WorkThreadPool pool;
- private final Object abortLock = new Object();
- private boolean requestRunning;
- private boolean abortable;
- private boolean aborted;
- private String status;
- private int progressValue;
- private int progressMaximum;
-
- private void doRequests()
- {
- WorkThreadPool.Request request;
- for(;;)
- {
- request = pool.getNextRequest();
- if(request == null)
- break;
- else
- {
- requestRunning = true;
- pool.fireStatusChanged(this);
- doRequest(request);
- requestRunning = false;
- }
- }
-
- pool.fireStatusChanged(this);
-
- synchronized(pool.waitForAllLock)
- {
- // notify a running waitForRequests() method
- pool.waitForAllLock.notifyAll();
- }
-
- synchronized(pool.lock)
- {
- // wait for more requests
- try
- {
- pool.lock.wait();
- }
- catch(InterruptedException ie)
- {
- Log.log(Log.ERROR,this,ie);
- }
- }
- }
-
- private void doRequest(WorkThreadPool.Request request)
- {
- Log.log(Log.DEBUG,WorkThread.class,"Running in work thread: " + request);
-
- try
- {
- request.run.run();
- }
- catch(Abort a)
- {
- Log.log(Log.ERROR,WorkThread.class,"Unhandled abort", a);
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,WorkThread.class,"Exception in work thread: ", t);
- }
- finally
- {
- synchronized(abortLock)
- {
- aborted = abortable = false;
- }
- status = null;
- progressValue = progressMaximum = 0;
- pool.requestDone();
- pool.fireStatusChanged(this);
- }
- }
-
- public static class Abort extends Error
- {
- public Abort()
- {
- super("Work request aborted");
- }
- }
-}
+/*
+ * WorkThread.java - Background thread that does stuff
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+/**
+ * Services work requests in the background.
+ * @author Slava Pestov
+ * @deprecated
+ * @see org.gjt.sp.util.ThreadUtilities
+ * @version $Id: WorkThread.java 18300 2010-08-05 13:14:02Z kpouer $
+ */
+ at Deprecated
+public class WorkThread extends Thread implements ThreadAbortMonitor
+{
+ public WorkThread(WorkThreadPool pool, ThreadGroup group, String name)
+ {
+ super(group, name);
+ // so that jEdit doesn't exit with no views open automatically
+ //setDaemon(true);
+ setPriority(Thread.MIN_PRIORITY);
+
+ this.pool = pool;
+ }
+
+ /**
+ * Sets if the current request can be aborted.
+ * If set to true and already aborted, the thread will be stopped
+ *
+ * @param abortable true if the WorkThread is abortable
+ * @since jEdit 2.6pre1
+ */
+ public void setAbortable(boolean abortable)
+ {
+ synchronized(abortLock)
+ {
+ this.abortable = abortable;
+ if(aborted)
+ stop(new Abort());
+ }
+ }
+
+ /**
+ * Returns if the work thread is currently running a request.
+ * @return true if a request is currently running
+ */
+ public boolean isRequestRunning()
+ {
+ return requestRunning;
+ }
+
+
+ public boolean isAborted()
+ {
+ synchronized (abortLock)
+ {
+ return aborted;
+ }
+ }
+
+ /**
+ * Returns the status text.
+ * @return the status label
+ */
+ public String getStatus()
+ {
+ return status;
+ }
+
+ /**
+ * Sets the status text.
+ * @param status the new status of the thread
+ * @since jEdit 2.6pre1
+ */
+ public void setStatus(String status)
+ {
+ this.status = status;
+ pool.fireProgressChanged(this);
+ }
+
+ /**
+ * Returns the progress value.
+ * @return the progress value
+ */
+ public int getProgressValue()
+ {
+ return progressValue;
+ }
+
+ /**
+ * Sets the progress value.
+ * @param progressValue the new progress value
+ * @since jEdit 2.6pre1
+ */
+ public void setProgressValue(int progressValue)
+ {
+ this.progressValue = progressValue;
+ pool.fireProgressChanged(this);
+ }
+
+ /**
+ * Returns the progress maximum.
+ * @return the maximum value of the progression
+ */
+ public int getProgressMaximum()
+ {
+ return progressMaximum;
+ }
+
+ /**
+ * Sets the maximum progress value.
+ * @param progressMaximum the maximum value of the progression
+ * @since jEdit 2.6pre1
+ */
+ public void setProgressMaximum(int progressMaximum)
+ {
+ this.progressMaximum = progressMaximum;
+ pool.fireProgressChanged(this);
+ }
+
+ /**
+ * Aborts the currently running request, if allowed.
+ * @since jEdit 2.6pre1
+ */
+ public void abortCurrentRequest()
+ {
+ synchronized(abortLock)
+ {
+ if(abortable && !aborted)
+ stop(new Abort());
+ aborted = true;
+ }
+ }
+
+ public void run()
+ {
+ Log.log(Log.DEBUG,this,"Work request thread starting [" + getName() + "]");
+
+ for(;;)
+ {
+ doRequests();
+ }
+ }
+
+ // private members
+ private WorkThreadPool pool;
+ private final Object abortLock = new Object();
+ private boolean requestRunning;
+ private boolean abortable;
+ private boolean aborted;
+ private String status;
+ private int progressValue;
+ private int progressMaximum;
+
+ private void doRequests()
+ {
+ WorkThreadPool.Request request;
+ for(;;)
+ {
+ request = pool.getNextRequest();
+ if(request == null)
+ break;
+ else
+ {
+ requestRunning = true;
+ pool.fireStatusChanged(this);
+ doRequest(request);
+ requestRunning = false;
+ }
+ }
+
+ pool.fireStatusChanged(this);
+
+ synchronized(pool.waitForAllLock)
+ {
+ // notify a running waitForRequests() method
+ pool.waitForAllLock.notifyAll();
+ }
+
+ synchronized(pool.lock)
+ {
+ // wait for more requests
+ try
+ {
+ pool.lock.wait();
+ }
+ catch(InterruptedException ie)
+ {
+ Log.log(Log.ERROR,this,ie);
+ }
+ }
+ }
+
+ private void doRequest(WorkThreadPool.Request request)
+ {
+ Log.log(Log.DEBUG,WorkThread.class,"Running in work thread: " + request);
+
+ try
+ {
+ request.run.run();
+ }
+ catch(Abort a)
+ {
+ Log.log(Log.ERROR,WorkThread.class,"Unhandled abort", a);
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,WorkThread.class,"Exception in work thread: ", t);
+ }
+ finally
+ {
+ synchronized(abortLock)
+ {
+ aborted = abortable = false;
+ }
+ status = null;
+ progressValue = progressMaximum = 0;
+ pool.requestDone();
+ pool.fireStatusChanged(this);
+ }
+ }
+
+ public static class Abort extends Error
+ {
+ public Abort()
+ {
+ super("Work request aborted");
+ }
+ }
+}
diff --git a/jEdit/org/gjt/sp/util/WorkThreadPool.java b/jEdit/org/gjt/sp/util/WorkThreadPool.java
index f0118bd..242def0 100644
--- a/jEdit/org/gjt/sp/util/WorkThreadPool.java
+++ b/jEdit/org/gjt/sp/util/WorkThreadPool.java
@@ -1,487 +1,485 @@
-/*
- * WorkThreadPool.java - Background thread pool that does stuff
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-//{{{ Imports
-import javax.swing.event.EventListenerList;
-import javax.swing.SwingUtilities;
-//}}}
-
-/**
- * A pool of work threads.
- * @author Slava Pestov
- * @version $Id: WorkThreadPool.java 12504 2008-04-22 23:12:43Z ezust $
- * @see org.gjt.sp.util.WorkThread
- * @since jEdit 2.6pre1
- */
-public class WorkThreadPool
-{
- //{{{ WorkThreadPool constructor
- /**
- * Creates a new work thread pool with the specified number of
- * work threads.
- * @param name The thread name prefix
- * @param count The number of work threads
- */
- public WorkThreadPool(String name, int count)
- {
- listenerList = new EventListenerList();
-
- if(count != 0)
- {
- threadGroup = new ThreadGroup(name);
- threads = new WorkThread[count];
- for(int i = 0; i < threads.length; i++)
- {
- threads[i] = new WorkThread(this,threadGroup,name + " #" + (i+1));
- }
- }
- else
- Log.log(Log.WARNING,this,"Async I/O disabled");
- } //}}}
-
- //{{{ start() method
- /**
- * Starts all the threads in this thread pool.
- */
- public void start()
- {
- /* not really needed since threads don't start until after */
- synchronized(lock)
- {
- started = true;
-
- if(awtRequestCount != 0 && requestCount == 0)
- queueAWTRunner();
- }
-
- if(threads != null)
- {
- for(int i = 0; i < threads.length; i++)
- {
- threads[i].start();
- }
- }
- } //}}}
-
- //{{{ addWorkRequest() method
- /**
- * Adds a work request to the queue.
- * @param run The runnable
- * @param inAWT If true, will be executed in AWT thread. Otherwise,
- * will be executed in work thread
- */
- public void addWorkRequest(Runnable run, boolean inAWT)
- {
- if(threads == null)
- {
- run.run();
- return;
- }
-
- synchronized(lock)
- {
- //{{{ if there are no requests, execute AWT requests immediately
- if(started && inAWT && requestCount == 0 && awtRequestCount == 0)
- {
-// Log.log(Log.DEBUG,this,"AWT immediate: " + run);
-
- if(SwingUtilities.isEventDispatchThread())
- run.run();
- else
- SwingUtilities.invokeLater(run);
-
- return;
- } //}}}
-
- Request request = new Request(run);
-
- //{{{ Add to AWT queue...
- if(inAWT)
- {
- if(firstAWTRequest == null && lastAWTRequest == null)
- firstAWTRequest = lastAWTRequest = request;
- else
- {
- lastAWTRequest.next = request;
- lastAWTRequest = request;
- }
-
- awtRequestCount++;
-
- // if no requests are running, requestDone()
- // will not be called, so we must queue the
- // AWT runner ourselves.
- if(started && requestCount == 0)
- queueAWTRunner();
- } //}}}
- //{{{ Add to work thread queue...
- else
- {
- if(firstRequest == null && lastRequest == null)
- firstRequest = lastRequest = request;
- else
- {
- lastRequest.next = request;
- lastRequest = request;
- }
-
- requestCount++;
- } //}}}
-
- lock.notifyAll();
- }
- } //}}}
-
- //{{{ waitForRequests() method
- /**
- * Waits until all requests are complete.
- */
- public void waitForRequests()
- {
- if(threads == null)
- return;
-
- synchronized(waitForAllLock)
- {
- while(requestCount != 0)
- {
- try
- {
- waitForAllLock.wait();
- }
- catch(InterruptedException ie)
- {
- Log.log(Log.ERROR,this,ie);
- }
- }
- }
-
- if(SwingUtilities.isEventDispatchThread())
- {
- // do any queued AWT runnables
- doAWTRequests();
- }
- else
- {
- try
- {
- SwingUtilities.invokeAndWait(new RunRequestsInAWTThread());
- }
- catch(Exception e)
- {
- Log.log(Log.ERROR,this,e);
- }
- }
- } //}}}
-
- //{{{ getRequestCount() method
- /**
- * Returns the number of pending requests.
- * @return the pending request count
- */
- public int getRequestCount()
- {
- return requestCount;
- } //}}}
-
- //{{{ getThreadCount() method
- /**
- * Returns the number of threads in this pool.
- * @return the thread count
- */
- public int getThreadCount()
- {
- if(threads == null)
- return 0;
- else
- return threads.length;
- } //}}}
-
- //{{{ getThread() method
- /**
- * Returns the specified thread.
- * @param index The index of the thread
- * @return a WorkThread
- */
- public WorkThread getThread(int index)
- {
- return threads[index];
- } //}}}
-
- //{{{ addProgressListener() method
- /**
- * Adds a progress listener to this thread pool.
- * @param listener The listener
- */
- public void addProgressListener(WorkThreadProgressListener listener)
- {
- listenerList.add(WorkThreadProgressListener.class,listener);
- } //}}}
-
- //{{{ removeProgressListener() method
- /**
- * Removes a progress listener from this thread pool.
- * @param listener The listener
- */
- public void removeProgressListener(WorkThreadProgressListener listener)
- {
- listenerList.remove(WorkThreadProgressListener.class,listener);
- } //}}}
-
- //{{{ Package-private members
- final Object lock = new Object();
- final Object waitForAllLock = new Object();
-
- //{{{ fireStatusChanged() method
- void fireStatusChanged(WorkThread thread)
- {
- final Object[] listeners = listenerList.getListenerList();
- if(listeners.length != 0)
- {
- int index = 0;
- for(int i = 0; i < threads.length; i++)
- {
- if(threads[i] == thread)
- {
- index = i;
- break;
- }
- }
-
- for(int i = listeners.length - 2; i >= 0; i--)
- {
- if(listeners[i] == WorkThreadProgressListener.class)
- {
- ((WorkThreadProgressListener)listeners[i+1])
- .statusUpdate(WorkThreadPool.this,index);
- }
- }
- }
- } //}}}
-
- //{{{ fireProgressChanged() method
- void fireProgressChanged(WorkThread thread)
- {
- final Object[] listeners = listenerList.getListenerList();
- if(listeners.length != 0)
- {
- int index = 0;
- for(int i = 0; i < threads.length; i++)
- {
- if(threads[i] == thread)
- {
- index = i;
- break;
- }
- }
-
- for(int i = listeners.length - 2; i >= 0; i--)
- {
- if(listeners[i] == WorkThreadProgressListener.class)
- {
- ((WorkThreadProgressListener)listeners[i+1])
- .progressUpdate(WorkThreadPool.this,index);
- }
- }
- }
- } //}}}
-
- //{{{ requestDone() method
- void requestDone()
- {
- synchronized(lock)
- {
- requestCount--;
-
- if(requestCount == 0 && firstAWTRequest != null)
- queueAWTRunner();
- }
- } //}}}
-
- //{{{ getNextRequest() method
- Request getNextRequest()
- {
- synchronized(lock)
- {
- Request request = firstRequest;
- if(request == null)
- return null;
-
- firstRequest = firstRequest.next;
- if(firstRequest == null)
- lastRequest = null;
-
- if(request.alreadyRun)
- throw new InternalError("AIEE!!! Request run twice!!! " + request.run);
- request.alreadyRun = true;
-
- /* StringBuffer buf = new StringBuffer("request queue is now: ");
- Request _request = request.next;
- while(_request != null)
- {
- buf.append(_request.id);
- if(_request.next != null)
- buf.append(",");
- _request = _request.next;
- }
- Log.log(Log.DEBUG,this,buf.toString()); */
-
- return request;
- }
- } //}}}
-
- //}}}
-
- //{{{ Private members
-
- //{{{ Instance variables
- private boolean started;
- private ThreadGroup threadGroup;
- private WorkThread[] threads;
-
- // Request queue
- private Request firstRequest;
- private Request lastRequest;
- private int requestCount;
-
- // AWT thread magic
- private boolean awtRunnerQueued;
- private Request firstAWTRequest;
- private Request lastAWTRequest;
- private int awtRequestCount;
-
- private EventListenerList listenerList;
- //}}}
-
- //{{{ doAWTRequests() method
- /** Must always be called with the lock held. */
- private void doAWTRequests()
- {
- while(requestCount == 0 && firstAWTRequest != null)
- {
- doAWTRequest(getNextAWTRequest());
- }
- } //}}}
-
- //{{{ doAWTRequest() method
- /**
- * Must always be called with the lock held.
- * @param request the request to run
- */
- private void doAWTRequest(Request request)
- {
-// Log.log(Log.DEBUG,this,"Running in AWT thread: " + request);
-
- try
- {
- request.run.run();
- }
- catch(Throwable t)
- {
- Log.log(Log.ERROR,WorkThread.class,"Exception "
- + "in AWT thread:");
- Log.log(Log.ERROR,WorkThread.class,t);
- }
-
- awtRequestCount--;
- } //}}}
-
- //{{{ queueAWTRunner() method
- /** Must always be called with the lock held. */
- private void queueAWTRunner()
- {
- if(!awtRunnerQueued)
- {
- awtRunnerQueued = true;
- SwingUtilities.invokeLater(new RunRequestsInAWTThread());
-// Log.log(Log.DEBUG,this,"AWT runner queued");
- }
- } //}}}
-
- //{{{ getNextAWTRequest() method
- private Request getNextAWTRequest()
- {
- Request request = firstAWTRequest;
- firstAWTRequest = firstAWTRequest.next;
- if(firstAWTRequest == null)
- lastAWTRequest = null;
-
- if(request.alreadyRun)
- throw new InternalError("AIEE!!! Request run twice!!! " + request.run);
- request.alreadyRun = true;
-
- /* StringBuffer buf = new StringBuffer("AWT request queue is now: ");
- Request _request = request.next;
- while(_request != null)
- {
- buf.append(_request.id);
- if(_request.next != null)
- buf.append(",");
- _request = _request.next;
- }
- Log.log(Log.DEBUG,this,buf.toString()); */
-
- return request;
- } //}}}
-
- //}}}
-
- static int ID;
-
- //{{{ Request class
- static class Request
- {
- int id = ++ID;
-
- Runnable run;
-
- boolean alreadyRun;
-
- Request next;
-
- Request(Runnable run)
- {
- this.run = run;
- }
-
- public String toString()
- {
- return "[id=" + id + ",run=" + run + "]";
- }
- } //}}}
-
- //{{{ RunRequestsInAWTThread class
- class RunRequestsInAWTThread implements Runnable
- {
- public void run()
- {
- synchronized(lock)
- {
- awtRunnerQueued = false;
- if(requestCount == 0)
- doAWTRequests();
- }
- }
- } //}}}
-}
+/*
+ * WorkThreadPool.java - Background thread pool that does stuff
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+//{{{ Imports
+import javax.swing.event.EventListenerList;
+import java.awt.EventQueue;
+//}}}
+
+/**
+ * A pool of work threads.
+ * @author Slava Pestov
+ * @version $Id: WorkThreadPool.java 18300 2010-08-05 13:14:02Z kpouer $
+ * @deprecated
+ * @see org.gjt.sp.util.ThreadUtilities
+ * @since jEdit 2.6pre1
+ */
+ at Deprecated
+public class WorkThreadPool
+{
+ //{{{ WorkThreadPool constructor
+ /**
+ * Creates a new work thread pool with the specified number of
+ * work threads.
+ * @param name The thread name prefix
+ * @param count The number of work threads
+ */
+ public WorkThreadPool(String name, int count)
+ {
+ listenerList = new EventListenerList();
+
+ if(count != 0)
+ {
+ threadGroup = new ThreadGroup(name);
+ threads = new WorkThread[count];
+ for(int i = 0; i < threads.length; i++)
+ {
+ threads[i] = new WorkThread(this,threadGroup,name + " #" + (i+1));
+ }
+ }
+ else
+ Log.log(Log.WARNING,this,"Async I/O disabled");
+ } //}}}
+
+ //{{{ start() method
+ /**
+ * Starts all the threads in this thread pool.
+ */
+ public void start()
+ {
+ /* not really needed since threads don't start until after */
+ synchronized(lock)
+ {
+ started = true;
+
+ if(awtRequestCount != 0 && requestCount == 0)
+ queueAWTRunner();
+ }
+
+ if(threads != null)
+ {
+ for(int i = 0; i < threads.length; i++)
+ {
+ threads[i].start();
+ }
+ }
+ } //}}}
+
+ //{{{ addWorkRequest() method
+ /**
+ * Adds a work request to the queue.
+ * @param run The runnable
+ * @param inAWT If true, will be executed in AWT thread. Otherwise,
+ * will be executed in work thread
+ */
+ public void addWorkRequest(Runnable run, boolean inAWT)
+ {
+ if(threads == null)
+ {
+ run.run();
+ return;
+ }
+
+ synchronized(lock)
+ {
+ //{{{ if there are no requests, execute AWT requests immediately
+ if(started && inAWT && requestCount == 0 && awtRequestCount == 0)
+ {
+// Log.log(Log.DEBUG,this,"AWT immediate: " + run);
+
+ ThreadUtilities.runInDispatchThread(run);
+ return;
+ } //}}}
+
+ Request request = new Request(run);
+
+ //{{{ Add to AWT queue...
+ if(inAWT)
+ {
+ if(firstAWTRequest == null && lastAWTRequest == null)
+ firstAWTRequest = lastAWTRequest = request;
+ else
+ {
+ lastAWTRequest.next = request;
+ lastAWTRequest = request;
+ }
+
+ awtRequestCount++;
+
+ // if no requests are running, requestDone()
+ // will not be called, so we must queue the
+ // AWT runner ourselves.
+ if(started && requestCount == 0)
+ queueAWTRunner();
+ } //}}}
+ //{{{ Add to work thread queue...
+ else
+ {
+ if(firstRequest == null && lastRequest == null)
+ firstRequest = lastRequest = request;
+ else
+ {
+ lastRequest.next = request;
+ lastRequest = request;
+ }
+
+ requestCount++;
+ } //}}}
+
+ lock.notifyAll();
+ }
+ } //}}}
+
+ //{{{ waitForRequests() method
+ /**
+ * Waits until all requests are complete.
+ */
+ public void waitForRequests()
+ {
+ if(threads == null)
+ return;
+
+ synchronized(waitForAllLock)
+ {
+ while(requestCount != 0)
+ {
+ try
+ {
+ waitForAllLock.wait();
+ }
+ catch(InterruptedException ie)
+ {
+ Log.log(Log.ERROR,this,ie);
+ }
+ }
+ }
+
+ if(EventQueue.isDispatchThread())
+ {
+ // do any queued AWT runnables
+ doAWTRequests();
+ }
+ else
+ {
+ try
+ {
+ EventQueue.invokeAndWait(new RunRequestsInAWTThread());
+ }
+ catch(Exception e)
+ {
+ Log.log(Log.ERROR,this,e);
+ }
+ }
+ } //}}}
+
+ //{{{ getRequestCount() method
+ /**
+ * Returns the number of pending requests.
+ * @return the pending request count
+ */
+ public int getRequestCount()
+ {
+ return requestCount;
+ } //}}}
+
+ //{{{ getThreadCount() method
+ /**
+ * Returns the number of threads in this pool.
+ * @return the thread count
+ */
+ public int getThreadCount()
+ {
+ if(threads == null)
+ return 0;
+ else
+ return threads.length;
+ } //}}}
+
+ //{{{ getThread() method
+ /**
+ * Returns the specified thread.
+ * @param index The index of the thread
+ * @return a WorkThread
+ */
+ public WorkThread getThread(int index)
+ {
+ return threads[index];
+ } //}}}
+
+ //{{{ addProgressListener() method
+ /**
+ * Adds a progress listener to this thread pool.
+ * @param listener The listener
+ */
+ public void addProgressListener(WorkThreadProgressListener listener)
+ {
+ listenerList.add(WorkThreadProgressListener.class,listener);
+ } //}}}
+
+ //{{{ removeProgressListener() method
+ /**
+ * Removes a progress listener from this thread pool.
+ * @param listener The listener
+ */
+ public void removeProgressListener(WorkThreadProgressListener listener)
+ {
+ listenerList.remove(WorkThreadProgressListener.class,listener);
+ } //}}}
+
+ //{{{ Package-private members
+ final Object lock = new Object();
+ final Object waitForAllLock = new Object();
+
+ //{{{ fireStatusChanged() method
+ void fireStatusChanged(WorkThread thread)
+ {
+ final Object[] listeners = listenerList.getListenerList();
+ if(listeners.length != 0)
+ {
+ int index = 0;
+ for(int i = 0; i < threads.length; i++)
+ {
+ if(threads[i] == thread)
+ {
+ index = i;
+ break;
+ }
+ }
+
+ for(int i = listeners.length - 2; i >= 0; i--)
+ {
+ if(listeners[i] == WorkThreadProgressListener.class)
+ {
+ ((WorkThreadProgressListener)listeners[i+1])
+ .statusUpdate(WorkThreadPool.this,index);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ fireProgressChanged() method
+ void fireProgressChanged(WorkThread thread)
+ {
+ final Object[] listeners = listenerList.getListenerList();
+ if(listeners.length != 0)
+ {
+ int index = 0;
+ for(int i = 0; i < threads.length; i++)
+ {
+ if(threads[i] == thread)
+ {
+ index = i;
+ break;
+ }
+ }
+
+ for(int i = listeners.length - 2; i >= 0; i--)
+ {
+ if(listeners[i] == WorkThreadProgressListener.class)
+ {
+ ((WorkThreadProgressListener)listeners[i+1])
+ .progressUpdate(WorkThreadPool.this,index);
+ }
+ }
+ }
+ } //}}}
+
+ //{{{ requestDone() method
+ void requestDone()
+ {
+ synchronized(lock)
+ {
+ requestCount--;
+
+ if(requestCount == 0 && firstAWTRequest != null)
+ queueAWTRunner();
+ }
+ } //}}}
+
+ //{{{ getNextRequest() method
+ Request getNextRequest()
+ {
+ synchronized(lock)
+ {
+ Request request = firstRequest;
+ if(request == null)
+ return null;
+
+ firstRequest = firstRequest.next;
+ if(firstRequest == null)
+ lastRequest = null;
+
+ if(request.alreadyRun)
+ throw new InternalError("AIEE!!! Request run twice!!! " + request.run);
+ request.alreadyRun = true;
+
+ /* StringBuffer buf = new StringBuffer("request queue is now: ");
+ Request _request = request.next;
+ while(_request != null)
+ {
+ buf.append(_request.id);
+ if(_request.next != null)
+ buf.append(",");
+ _request = _request.next;
+ }
+ Log.log(Log.DEBUG,this,buf.toString()); */
+
+ return request;
+ }
+ } //}}}
+
+ //}}}
+
+ //{{{ Private members
+
+ //{{{ Instance variables
+ private boolean started;
+ private ThreadGroup threadGroup;
+ private WorkThread[] threads;
+
+ // Request queue
+ private Request firstRequest;
+ private Request lastRequest;
+ private int requestCount;
+
+ // AWT thread magic
+ private boolean awtRunnerQueued;
+ private Request firstAWTRequest;
+ private Request lastAWTRequest;
+ private int awtRequestCount;
+
+ private final EventListenerList listenerList;
+ //}}}
+
+ //{{{ doAWTRequests() method
+ /** Must always be called with the lock held. */
+ private void doAWTRequests()
+ {
+ while(requestCount == 0 && firstAWTRequest != null)
+ {
+ doAWTRequest(getNextAWTRequest());
+ }
+ } //}}}
+
+ //{{{ doAWTRequest() method
+ /**
+ * Must always be called with the lock held.
+ * @param request the request to run
+ */
+ private void doAWTRequest(Request request)
+ {
+// Log.log(Log.DEBUG,this,"Running in AWT thread: " + request);
+
+ try
+ {
+ request.run.run();
+ }
+ catch(Throwable t)
+ {
+ Log.log(Log.ERROR,WorkThread.class,"Exception "
+ + "in AWT thread:");
+ Log.log(Log.ERROR,WorkThread.class,t);
+ }
+
+ awtRequestCount--;
+ } //}}}
+
+ //{{{ queueAWTRunner() method
+ /** Must always be called with the lock held. */
+ private void queueAWTRunner()
+ {
+ if(!awtRunnerQueued)
+ {
+ awtRunnerQueued = true;
+ EventQueue.invokeLater(new RunRequestsInAWTThread());
+// Log.log(Log.DEBUG,this,"AWT runner queued");
+ }
+ } //}}}
+
+ //{{{ getNextAWTRequest() method
+ private Request getNextAWTRequest()
+ {
+ Request request = firstAWTRequest;
+ firstAWTRequest = firstAWTRequest.next;
+ if(firstAWTRequest == null)
+ lastAWTRequest = null;
+
+ if(request.alreadyRun)
+ throw new InternalError("AIEE!!! Request run twice!!! " + request.run);
+ request.alreadyRun = true;
+
+ /* StringBuffer buf = new StringBuffer("AWT request queue is now: ");
+ Request _request = request.next;
+ while(_request != null)
+ {
+ buf.append(_request.id);
+ if(_request.next != null)
+ buf.append(",");
+ _request = _request.next;
+ }
+ Log.log(Log.DEBUG,this,buf.toString()); */
+
+ return request;
+ } //}}}
+
+ //}}}
+
+ static int ID;
+
+ //{{{ Request class
+ static class Request
+ {
+ int id = ++ID;
+
+ Runnable run;
+
+ boolean alreadyRun;
+
+ Request next;
+
+ Request(Runnable run)
+ {
+ this.run = run;
+ }
+
+ public String toString()
+ {
+ return "[id=" + id + ",run=" + run + ']';
+ }
+ } //}}}
+
+ //{{{ RunRequestsInAWTThread class
+ class RunRequestsInAWTThread implements Runnable
+ {
+ public void run()
+ {
+ synchronized(lock)
+ {
+ awtRunnerQueued = false;
+ if(requestCount == 0)
+ doAWTRequests();
+ }
+ }
+ } //}}}
+}
diff --git a/jEdit/org/gjt/sp/util/WorkThreadProgressListener.java b/jEdit/org/gjt/sp/util/WorkThreadProgressListener.java
index 02ce207..13b1297 100644
--- a/jEdit/org/gjt/sp/util/WorkThreadProgressListener.java
+++ b/jEdit/org/gjt/sp/util/WorkThreadProgressListener.java
@@ -1,35 +1,35 @@
-/*
- * WorkThreadProgressListener.java - Progress listener
- * Copyright (C) 2000 Slava Pestov
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-import java.util.EventListener;
-
-/**
- * A work thread execution progress listener.
- * @since jEdit 2.6pre1
- */
-public interface WorkThreadProgressListener extends EventListener
-{
- // status message changed, operation started, operation ends, ...
- void statusUpdate(WorkThreadPool threadPool, int threadIndex);
-
- // progress bar value change
- void progressUpdate(WorkThreadPool threadPool, int threadIndex);
-}
+/*
+ * WorkThreadProgressListener.java - Progress listener
+ * Copyright (C) 2000 Slava Pestov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+import java.util.EventListener;
+
+/**
+ * A work thread execution progress listener.
+ * @since jEdit 2.6pre1
+ */
+public interface WorkThreadProgressListener extends EventListener
+{
+ // status message changed, operation started, operation ends, ...
+ void statusUpdate(WorkThreadPool threadPool, int threadIndex);
+
+ // progress bar value change
+ void progressUpdate(WorkThreadPool threadPool, int threadIndex);
+}
diff --git a/jEdit/org/gjt/sp/util/XMLUtilities.java b/jEdit/org/gjt/sp/util/XMLUtilities.java
index accd810..d03034a 100644
--- a/jEdit/org/gjt/sp/util/XMLUtilities.java
+++ b/jEdit/org/gjt/sp/util/XMLUtilities.java
@@ -1,202 +1,202 @@
-/*
- * StandardUtilities.java - Miscelaneous XML utility functions.
- * :tabSize=8:indentSize=8:noTabs=false:
- * :folding=explicit:collapseFolds=1:
- *
- * Copyright (C) 1999, 2006 Marcelo Vanzin, Slava Pestov
- * Portions copyright (C) 2000 Richard S. Hall
- * Portions copyright (C) 2001 Dirk Moebius
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-package org.gjt.sp.util;
-
-//{{{ Imports
-import java.io.InputStream;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.XMLReaderFactory;
-//}}}
-
-/**
- * XML utility methods that only depend on the JDK.
- *
- * @author Marcelo Vanzin
- * @version $Id: XMLUtilities.java 13929 2008-10-25 14:23:41Z k_satoda $
- * @since 4.3pre6
- */
-public class XMLUtilities
-{
-
- //{{{ charsToEntities() method
- /**
- * Converts <, >, & in the string to their HTML entity
- * equivalents.
- *
- * <p>If <code>xml11</code> is true, then character entities
- * are used to convert illegal XML characters (mainly ASCII
- * control characters).</p>
- *
- * @param str The string
- * @param xml11 Whether to allow XML 1.1 constructs.
- */
- public static String charsToEntities(String str, boolean xml11)
- {
- StringBuilder buf = new StringBuilder(str.length());
- for(int i = 0; i < str.length(); i++)
- {
- char ch = str.charAt(i);
-
- // control characters, excluding \t, \r and \n
- // See: http://www.w3.org/International/questions/qa-controls
- if (((0x00 <= ch && ch <= 0x1F) || (0x7F <= ch && ch <= 0x9F))
- && ch != '\r' && ch != '\n' && ch != '\t')
- {
- if (xml11 && ch != 0x00)
- {
- buf.append("&#").append((int)ch).append(';');
- }
- else
- {
- // The character is illegal.
- // But put a PI instead, to make it
- // recoverable in certain apps.
- buf.append("<?illegal-xml-character ")
- .append((int)ch)
- .append("?>");
- }
- continue;
- }
-
- switch(ch)
- {
- case '<':
- buf.append("<");
- break;
- case '>':
- buf.append(">");
- break;
- case '&':
- buf.append("&");
- break;
- default:
- buf.append(ch);
- break;
- }
- }
- return buf.toString();
- } //}}}
-
- //{{{ parseXML() method
- /**
- * Convenience method for parsing an XML file. This method will
- * wrap the resource in an InputSource and set the source's
- * systemId to "jedit.jar" (so the source should be able to
- * handle any external entities by itself).
- *
- * <p>SAX Errors are caught and are not propagated to the caller;
- * instead, an error message is printed to jEdit's activity
- * log. So, if you need custom error handling, <b>do not use
- * this method</b>.
- *
- * <p>The given stream is closed before the method returns,
- * regardless whether there were errors or not.</p>
- *
- * @return true if any error occured during parsing, false if success.
- */
- public static boolean parseXML(InputStream in, DefaultHandler handler)
- throws IOException
- {
- try
- {
- XMLReader parser = XMLReaderFactory.createXMLReader();
- InputSource isrc = new InputSource(
- new BufferedInputStream(in));
- isrc.setSystemId("jedit.jar");
- parser.setContentHandler(handler);
- parser.setDTDHandler(handler);
- parser.setEntityResolver(handler);
- parser.setErrorHandler(handler);
- parser.parse(isrc);
- }
- catch(SAXParseException se)
- {
- int line = se.getLineNumber();
- Log.log(Log.ERROR,XMLUtilities.class,
- "while parsing from " + in + ": SAXParseException: line " + line + ": " , se);
- return true;
- }
- catch(SAXException e)
- {
- Log.log(Log.ERROR,XMLUtilities.class,e);
- return true;
- }
- finally
- {
- try
- {
- if(in != null)
- in.close();
- }
- catch(IOException io)
- {
- Log.log(Log.ERROR,XMLUtilities.class,io);
- }
- }
- return false;
- } //}}}
-
- //{{{ resolveEntity() method
- /**
- * Tries to find the given systemId in the context of the given
- * class. If the given systemId ends with the given test string,
- * then try to load a resource using the Class's
- * <code>getResourceAsStream()</code> method using the test string
- * as the resource.
- *
- * <p>This is used a lot internally while parsing XML files used
- * by jEdit, but anyone is free to use the method if it sounds
- * usable.</p>
- */
- public static InputSource findEntity(String systemId, String test, Class where)
- {
- if (systemId != null && systemId.endsWith(test))
- {
- try
- {
- return new InputSource(new BufferedInputStream(
- where.getResourceAsStream(test)));
- }
- catch (Exception e)
- {
- Log.log(Log.ERROR,XMLUtilities.class,
- "Error while opening " + test + ':');
- Log.log(Log.ERROR,XMLUtilities.class,e);
- }
- }
-
- return null;
- } //}}}
-
- private XMLUtilities() { }
-}
-
+/*
+ * StandardUtilities.java - Miscelaneous XML utility functions.
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright (C) 1999, 2006 Marcelo Vanzin, Slava Pestov
+ * Portions copyright (C) 2000 Richard S. Hall
+ * Portions copyright (C) 2001 Dirk Moebius
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.util;
+
+//{{{ Imports
+import java.io.InputStream;
+import java.io.BufferedInputStream;
+import java.io.IOException;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.helpers.XMLReaderFactory;
+//}}}
+
+/**
+ * XML utility methods that only depend on the JDK.
+ *
+ * @author Marcelo Vanzin
+ * @version $Id: XMLUtilities.java 13929 2008-10-25 14:23:41Z k_satoda $
+ * @since 4.3pre6
+ */
+public class XMLUtilities
+{
+
+ //{{{ charsToEntities() method
+ /**
+ * Converts <, >, & in the string to their HTML entity
+ * equivalents.
+ *
+ * <p>If <code>xml11</code> is true, then character entities
+ * are used to convert illegal XML characters (mainly ASCII
+ * control characters).</p>
+ *
+ * @param str The string
+ * @param xml11 Whether to allow XML 1.1 constructs.
+ */
+ public static String charsToEntities(String str, boolean xml11)
+ {
+ StringBuilder buf = new StringBuilder(str.length());
+ for(int i = 0; i < str.length(); i++)
+ {
+ char ch = str.charAt(i);
+
+ // control characters, excluding \t, \r and \n
+ // See: http://www.w3.org/International/questions/qa-controls
+ if (((0x00 <= ch && ch <= 0x1F) || (0x7F <= ch && ch <= 0x9F))
+ && ch != '\r' && ch != '\n' && ch != '\t')
+ {
+ if (xml11 && ch != 0x00)
+ {
+ buf.append("&#").append((int)ch).append(';');
+ }
+ else
+ {
+ // The character is illegal.
+ // But put a PI instead, to make it
+ // recoverable in certain apps.
+ buf.append("<?illegal-xml-character ")
+ .append((int)ch)
+ .append("?>");
+ }
+ continue;
+ }
+
+ switch(ch)
+ {
+ case '<':
+ buf.append("<");
+ break;
+ case '>':
+ buf.append(">");
+ break;
+ case '&':
+ buf.append("&");
+ break;
+ default:
+ buf.append(ch);
+ break;
+ }
+ }
+ return buf.toString();
+ } //}}}
+
+ //{{{ parseXML() method
+ /**
+ * Convenience method for parsing an XML file. This method will
+ * wrap the resource in an InputSource and set the source's
+ * systemId to "jedit.jar" (so the source should be able to
+ * handle any external entities by itself).
+ *
+ * <p>SAX Errors are caught and are not propagated to the caller;
+ * instead, an error message is printed to jEdit's activity
+ * log. So, if you need custom error handling, <b>do not use
+ * this method</b>.
+ *
+ * <p>The given stream is closed before the method returns,
+ * regardless whether there were errors or not.</p>
+ *
+ * @return true if any error occured during parsing, false if success.
+ */
+ public static boolean parseXML(InputStream in, DefaultHandler handler)
+ throws IOException
+ {
+ try
+ {
+ XMLReader parser = XMLReaderFactory.createXMLReader();
+ InputSource isrc = new InputSource(
+ new BufferedInputStream(in));
+ isrc.setSystemId("jedit.jar");
+ parser.setContentHandler(handler);
+ parser.setDTDHandler(handler);
+ parser.setEntityResolver(handler);
+ parser.setErrorHandler(handler);
+ parser.parse(isrc);
+ }
+ catch(SAXParseException se)
+ {
+ int line = se.getLineNumber();
+ Log.log(Log.ERROR,XMLUtilities.class,
+ "while parsing from " + in + ": SAXParseException: line " + line + ": " , se);
+ return true;
+ }
+ catch(SAXException e)
+ {
+ Log.log(Log.ERROR,XMLUtilities.class,e);
+ return true;
+ }
+ finally
+ {
+ try
+ {
+ if(in != null)
+ in.close();
+ }
+ catch(IOException io)
+ {
+ Log.log(Log.ERROR,XMLUtilities.class,io);
+ }
+ }
+ return false;
+ } //}}}
+
+ //{{{ resolveEntity() method
+ /**
+ * Tries to find the given systemId in the context of the given
+ * class. If the given systemId ends with the given test string,
+ * then try to load a resource using the Class's
+ * <code>getResourceAsStream()</code> method using the test string
+ * as the resource.
+ *
+ * <p>This is used a lot internally while parsing XML files used
+ * by jEdit, but anyone is free to use the method if it sounds
+ * usable.</p>
+ */
+ public static InputSource findEntity(String systemId, String test, Class where)
+ {
+ if (systemId != null && systemId.endsWith(test))
+ {
+ try
+ {
+ return new InputSource(new BufferedInputStream(
+ where.getResourceAsStream(test)));
+ }
+ catch (Exception e)
+ {
+ Log.log(Log.ERROR,XMLUtilities.class,
+ "Error while opening " + test + ':');
+ Log.log(Log.ERROR,XMLUtilities.class,e);
+ }
+ }
+
+ return null;
+ } //}}}
+
+ private XMLUtilities() { }
+}
+
diff --git a/jEdit/org/gjt/sp/util/package.html b/jEdit/org/gjt/sp/util/package.html
index 46801e4..5fe7c8b 100644
--- a/jEdit/org/gjt/sp/util/package.html
+++ b/jEdit/org/gjt/sp/util/package.html
@@ -1,2 +1,2 @@
-<html><body>Utility classes used by jEdit but that do not depend on jEdit
-itself.</body></html>
+<html><body>Utility classes used by jEdit but that do not depend on jEdit
+itself.</body></html>
diff --git a/jEdit/package-files/linux/deb/control b/jEdit/package-files/linux/deb/control
index a7f0580..60734ec 100644
--- a/jEdit/package-files/linux/deb/control
+++ b/jEdit/package-files/linux/deb/control
@@ -3,16 +3,15 @@ Version: 4:@jedit.build.number@
Architecture: all
Maintainer: Contributors <jedit-devel at lists.sourceforge.net>
Section: contrib/editors
-Homepage: http://www.jedit.org/
-Architecture: all
+Homepage: http://www.jedit.org/
Conflicts: jedit-cvs
Replaces: jedit-cvs
-Recommends: sun-java5-jre | sun-java6-jre
-Build-depends: sun-java5-jdk | sun-java6-jdk, ant
-Suggests: exuberant-ctags, cscope, global, ant, sun-java5-jdk, sun-java6-jdk
+Recommends: sun-java6-jre
+Build-depends: sun-java6-jdk, ant
+Suggests: exuberant-ctags, cscope, global, ant, sun-java6-jdk
Priority: optional
Installed-Size: @deb.installed.size@
-Description: A plugin-based editor for programmers.
+Description: A plugin-based editor for programmers.
As one of the most feature rich editors available, jEdit boasts support for
syntax highlighting in more than 140 languages. jEdit combines the power of
Emacs, the user-friendliness of Kate, and the advanced editing features
@@ -27,8 +26,8 @@ Description: A plugin-based editor for programmers.
Its functionality is easily extended by the use of 'plugins' which can be
downloaded, updated, and installed, all without exiting the editor. These
include a built-in Console shell integration, which lets you execute
- interactive external commands inside your editor, as well as bind them to
+ interactive external commands inside your editor, as well as bind them to
keyboard shortcuts. The FTP plugin lets you browse and edit files on remote systems
- over FTP or SFTP. Other plugins provide shells, object oriented structure/code
- browsers, or completion popups for Java, XML, HTML, Ant, LaTeX, Python, Ruby,
- Perl, C, C++, bash, Scheme, Prolog, and many other languages.
+ over FTP or SFTP. Other plugins provide shells, object oriented structure/code
+ browsers, or completion popups for Java, XML, HTML, Ant, LaTeX, Python, Ruby,
+ Perl, C, C++, bash, Scheme, Prolog, and many other languages.
diff --git a/jEdit/package-files/linux/deb/jedit.desktop b/jEdit/package-files/linux/deb/jedit.desktop
index 546f3ac..9f75348 100644
--- a/jEdit/package-files/linux/deb/jedit.desktop
+++ b/jEdit/package-files/linux/deb/jedit.desktop
@@ -15,3 +15,4 @@ Type=Application
Categories=Development;TextEditor;
StartupNotify=true
MimeType=text/plain;
+StartupWMClass=org-gjt-sp-jedit-jEdit
diff --git a/jEdit/package-files/linux/jedit b/jEdit/package-files/linux/jedit
index bf68a9b..d91bffc 100644
--- a/jEdit/package-files/linux/jedit
+++ b/jEdit/package-files/linux/jedit
@@ -24,4 +24,4 @@ fi
# Launch application.
-exec $JAVA -Xmx${JAVA_HEAP_MAX_SIZE}M -jar /usr/share/jEdit/@jar.filename@ -reuseview "$@" &
+exec $JAVA -Xmx${JAVA_HEAP_MAX_SIZE}M -jar /usr/share/jEdit/@jar.filename@ -reuseview "$@"
diff --git a/jEdit/package-files/linux/jedit.1 b/jEdit/package-files/linux/jedit.1
index e132230..1f9bb2c 100644
--- a/jEdit/package-files/linux/jedit.1
+++ b/jEdit/package-files/linux/jedit.1
@@ -1,4 +1,4 @@
-.TH JEDIT 1 "June 14, 2006" jEdit "jEdit - Programmer's Text Editor"
+.TH JEDIT 1 "October 24, 2010" jEdit "jEdit - Programmer's Text Editor"
.SH NAME
.B jEdit
@@ -26,7 +26,7 @@ Furthermore, \fBjEdit\fP is extremely customizable, and extensible, using either
in Java. With plugins, you can create a very powerful development environment
for HTML, XML, C/C++, Python, Perl, Ruby, Lisp, Scheme, and many others.
-\fBjEdit\fP Requires Sun Java 2 version 1.5.
+\fBjEdit\fP Requires Sun Java 2 version 1.6.
\fBjEdit\fP is released under the GNU General Public License, which can be found in
the online help.
diff --git a/jEdit/package-files/linux/rpm/jedit.spec b/jEdit/package-files/linux/rpm/jedit.spec
index 94bd6eb..4a922f3 100644
--- a/jEdit/package-files/linux/rpm/jedit.spec
+++ b/jEdit/package-files/linux/rpm/jedit.spec
@@ -45,9 +45,6 @@ export CLASSPATH="."
ant docs-html-xsltproc javadoc dist
-# Build LatestVersion.jar
-(cd jars/LatestVersion && ant)
-
# Build QuickNotepad.jar
(cd jars/QuickNotepad && ant)
diff --git a/jEdit/package-files/os2/jedit.cmd b/jEdit/package-files/os2/jedit.cmd
index 6498b6b..2391e4d 100644
--- a/jEdit/package-files/os2/jedit.cmd
+++ b/jEdit/package-files/os2/jedit.cmd
@@ -1,73 +1,73 @@
-/* MAINTAINERS: Robert Henschel (os2info at gmx.net)
- * Christoph vogt (ch.vogt at gmx.net)
- * Gili Tzabari (junk at bbs.darktech.org)
- * PLATFORM: OS/2, eCS
- *
- * Used to run JEdit 3.1
- */
-
-
-rc = QueryJavaVersion()
-if (rc = -1) then
-do
- say "java.exe cannot be found"
- return -1;
-end
-if (rc = -2) then
- say "Unexpected response to JAVA -VERSION. Assuming newest version is being used."
-
-arguments = "-settings=%HOME%\.jedit -server=%HOME%\.jedit\server"
-jedit_dir = GetExecPath()
-
-if (iMajor = 1 & iMid <= 1) then
- 'java -Xmx192M -classpath %classpath%;'jedit_dir'\jedit.jar org.gjt.sp.jedit.jEdit 'arguments
- else
- 'java -Xmx192M -jar 'jedit_dir'\jedit.jar 'arguments
-
-return 0
-
-
-
-
-
- /*
- * Java version detector.
- * Assumes java -version return quoted ("") version number.
- * Written by os2bird on #netlabs
- *
- * Returns -1 on no java or failed to execute
- * -2 on invalid java version string.
- * version number.
- */
-QueryJavaVersion: procedure expose iMajor iMid iMinor
-cQueued = queued();
-'@echo off'
-'java -version 2>&1 | rxqueue /LIFO'
-i = queued();
-do while i > cQueued
- pull sStr
- if (pos("JAVA VERSION ", sStr) > 0) | (pos("JAVA.EXE VERSION ", sStr) > 0) then
- do
- do while(queued() > 0)
- pull sStrIngore; /* flush input stream */
- end
- parse var sStr sStuff '"'iMajor'.'iMid'.'iMinor'"'
- if (iMinor <> '') then
- return iMajor*100 + iMid * 10 + iMinor;
- else
- return -2
- end
- i = i - 1;
- end
- return -1;
-
-
-/*
- * Returns the path of the script being executed.
- */
-GetExecPath: procedure
-parse source result
-parse var result 'OS/2 ' dummy result /* Get full path of script */
-result=filespec("drive", result) || filespec("path", result) /* strip away filename */
-result=substr(result, 1, length(result)-1) /* remove backslash */
+/* MAINTAINERS: Robert Henschel (os2info at gmx.net)
+ * Christoph vogt (ch.vogt at gmx.net)
+ * Gili Tzabari (junk at bbs.darktech.org)
+ * PLATFORM: OS/2, eCS
+ *
+ * Used to run JEdit 3.1
+ */
+
+
+rc = QueryJavaVersion()
+if (rc = -1) then
+do
+ say "java.exe cannot be found"
+ return -1;
+end
+if (rc = -2) then
+ say "Unexpected response to JAVA -VERSION. Assuming newest version is being used."
+
+arguments = "-settings=%HOME%\.jedit -server=%HOME%\.jedit\server"
+jedit_dir = GetExecPath()
+
+if (iMajor = 1 & iMid <= 1) then
+ 'java -Xmx192M -classpath %classpath%;'jedit_dir'\jedit.jar org.gjt.sp.jedit.jEdit 'arguments
+ else
+ 'java -Xmx192M -jar 'jedit_dir'\jedit.jar 'arguments
+
+return 0
+
+
+
+
+
+ /*
+ * Java version detector.
+ * Assumes java -version return quoted ("") version number.
+ * Written by os2bird on #netlabs
+ *
+ * Returns -1 on no java or failed to execute
+ * -2 on invalid java version string.
+ * version number.
+ */
+QueryJavaVersion: procedure expose iMajor iMid iMinor
+cQueued = queued();
+'@echo off'
+'java -version 2>&1 | rxqueue /LIFO'
+i = queued();
+do while i > cQueued
+ pull sStr
+ if (pos("JAVA VERSION ", sStr) > 0) | (pos("JAVA.EXE VERSION ", sStr) > 0) then
+ do
+ do while(queued() > 0)
+ pull sStrIngore; /* flush input stream */
+ end
+ parse var sStr sStuff '"'iMajor'.'iMid'.'iMinor'"'
+ if (iMinor <> '') then
+ return iMajor*100 + iMid * 10 + iMinor;
+ else
+ return -2
+ end
+ i = i - 1;
+ end
+ return -1;
+
+
+/*
+ * Returns the path of the script being executed.
+ */
+GetExecPath: procedure
+parse source result
+parse var result 'OS/2 ' dummy result /* Get full path of script */
+result=filespec("drive", result) || filespec("path", result) /* strip away filename */
+result=substr(result, 1, length(result)-1) /* remove backslash */
return result
\ No newline at end of file
diff --git a/jEdit/package-files/windows/jEdit.url b/jEdit/package-files/windows/jEdit.url
new file mode 100644
index 0000000..092f3ab
--- /dev/null
+++ b/jEdit/package-files/windows/jEdit.url
@@ -0,0 +1,3 @@
+[InternetShortcut]
+URL=http://www.jEdit.org
+IconFile=jedit.exe
diff --git a/jEdit/package-files/windows/jedit.bat b/jEdit/package-files/windows/jedit.bat
deleted file mode 100644
index 64cae17..0000000
--- a/jEdit/package-files/windows/jedit.bat
+++ /dev/null
@@ -1,2 +0,0 @@
- at echo off
-start "jEdit startup" "{javaw.exe}" {jvmOptions} -jar "{jedit.jar}" -reuseview %*
diff --git a/jEdit/package-files/windows/jedit.l4j.ini b/jEdit/package-files/windows/jedit.l4j.ini
new file mode 100644
index 0000000..d2911fa
--- /dev/null
+++ b/jEdit/package-files/windows/jedit.l4j.ini
@@ -0,0 +1 @@
+-Xmx192M
diff --git a/jEdit/package-files/windows/jedit.launch4j.xml b/jEdit/package-files/windows/jedit.launch4j.xml
new file mode 100644
index 0000000..f9fd76d
--- /dev/null
+++ b/jEdit/package-files/windows/jedit.launch4j.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!-- US-ASCII is the best encoding to avoid problem of Launch4j which
+uses system default encoding no matter what encoding the config file
+declare in it. Here, "best" means a common subset of system default
+encodings on many of known OS and locales. -->
+<launch4jConfig>
+ <headerType>gui</headerType>
+ <outfile>jedit.exe</outfile>
+ <jar>@jar.filename@</jar>
+ <dontWrapJar>true</dontWrapJar>
+ <errTitle>jEdit</errTitle>
+ <downloadUrl>http://www.java.com/download</downloadUrl>
+ <supportUrl>http://www.jEdit.org</supportUrl>
+ <cmdLine>-reuseview</cmdLine>
+ <customProcName>false</customProcName>
+ <stayAlive>true</stayAlive>
+ <icon>@base.dir@/icons/jedit.ico</icon>
+ <jre>
+ <minVersion>@target.java.version at .0</minVersion>
+ <!-- Prefer JDK to make tools.jar available if possible. -->
+ <jdkPreference>preferJdk</jdkPreference>
+ </jre>
+ <versionInfo>
+ <fileVersion>@jedit.build.number@</fileVersion>
+ <txtFileVersion>@jedit.version@</txtFileVersion>
+ <fileDescription>jEdit - Programmer's Text Editor</fileDescription>
+ <copyright>Copyright (C) 1998- at current.year@ Contributors</copyright>
+ <productVersion>@jedit.build.number@</productVersion>
+ <txtProductVersion>@jedit.version@</txtProductVersion>
+ <productName>jEdit</productName>
+ <companyName>Contributors</companyName>
+ <internalName>jEdit</internalName>
+ <originalFilename>jedit.exe</originalFilename>
+ </versionInfo>
+</launch4jConfig>
diff --git a/jEdit/package-files/windows/win32installer.iss b/jEdit/package-files/windows/win32installer.iss
index 9166571..631ca49 100644
--- a/jEdit/package-files/windows/win32installer.iss
+++ b/jEdit/package-files/windows/win32installer.iss
@@ -1,344 +1,275 @@
-; Inno Setup installer script for jEdit
-; Björn "Vampire" Kautler <Vampire at jEdit.org>
-;
-
-[Setup]
-AppName=jEdit
-AppVerName=jEdit @jedit.version@
-AppPublisher=Contributors
-AppPublisherURL=http://www.jEdit.org
-AppSupportURL=http://www.jEdit.org
-AppUpdatesURL=http://www.jEdit.org
-DefaultDirName={pf}\jEdit
-DefaultGroupName=jEdit
-AllowNoIcons=true
-LicenseFile=@dist.dir@\doc\COPYING.txt
-OutputDir=@dist.dir@
-OutputBaseFilename=@win.filename@
-SetupIconFile=@base.dir@\icons\jedit.ico
-SolidCompression=true
-SourceDir=@dist.dir@
-VersionInfoVersion=@jedit.build.number@
-VersionInfoCompany=Contributors
-VersionInfoDescription=Programmer's Text Editor
-VersionInfoTextVersion=@jedit.version@
-VersionInfoCopyright=Copyright © 1998- at current.year@ Contributors
-AppCopyright=Copyright © 1998- at current.year@ Contributors
-ChangesAssociations=true
-TimeStampsInUTC=true
-FlatComponentsList=false
-ShowTasksTreeLines=true
-AppVersion=@jedit.version@
-AppID=jEdit
-UninstallDisplayName=jEdit @jedit.version@
-AppContact=jedit-devel at lists.sourceforge.net
-AppReadmeFile={app}\doc\README.txt
-UninstallDisplayIcon={app}\jedit.ico
-ChangesEnvironment=true
-PrivilegesRequired=admin
-WizardImageFile=@base.dir@\icons\WindowsInstallerImage.bmp
-WizardSmallImageFile=@base.dir@\icons\WindowsInstallerSmallImage.bmp
-WizardImageStretch=false
-ArchitecturesInstallIn64BitMode=x64
-
-[Languages]
-Name: english; MessagesFile: compiler:Default.isl
-Name: brazilianportuguese; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
-Name: catalan; MessagesFile: compiler:Languages\Catalan.isl
-Name: czech; MessagesFile: compiler:Languages\Czech.isl
-Name: danish; MessagesFile: compiler:Languages\Danish.isl
-Name: dutch; MessagesFile: compiler:Languages\Dutch.isl
-Name: finnish; MessagesFile: compiler:Languages\Finnish.isl
-Name: french; MessagesFile: compiler:Languages\French.isl
-Name: german; MessagesFile: compiler:Languages\German.isl
-Name: hungarian; MessagesFile: compiler:Languages\Hungarian.isl
-Name: italian; MessagesFile: compiler:Languages\Italian.isl
-Name: norwegian; MessagesFile: compiler:Languages\Norwegian.isl
-Name: polish; MessagesFile: compiler:Languages\Polish.isl
-Name: portuguese; MessagesFile: compiler:Languages\Portuguese.isl
-Name: russian; MessagesFile: compiler:Languages\Russian.isl
-Name: slovak; MessagesFile: compiler:Languages\Slovak.isl
-Name: slovenian; MessagesFile: compiler:Languages\Slovenian.isl
-
-[Tasks]
-Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
-Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}
-Name: autostartserver; Description: Start jEdit Server automatically on system startup; GroupDescription: Autostart:; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
-Name: autostartserver; Description: jEdit Server automatisch beim Hochfahren starten; GroupDescription: Autostart:; Languages: german
-
-[Files]
-Source: @jar.filename@; DestDir: {app}; Flags: ignoreversion sortfilesbyextension; Components: main
-Source: doc\*; DestDir: {app}\doc; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Excludes: api\*,README.txt; Components: main
-Source: doc\api\*; DestDir: {app}\doc\api; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: apidoc
-Source: jars\LatestVersion.jar; DestDir: {app}\jars; Flags: ignoreversion sortfilesbyextension; Components: main
-Source: jars\QuickNotepad.jar; DestDir: {app}\jars; Flags: ignoreversion sortfilesbyextension; Components: main
-Source: macros\*; DestDir: {app}\macros; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: macros
-Source: modes\*; DestDir: {app}\modes; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: main
-Source: properties\*; DestDir: {app}\properties; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: main
-Source: startup\*; DestDir: {app}\startup; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: main
-Source: @base.dir@\icons\jedit.ico; DestDir: {app}; Flags: ignoreversion sortfilesbyextension; Components: main
-Source: doc\README.txt; DestDir: {app}\doc; Flags: isreadme ignoreversion sortfilesbyextension; Components: main
-Source: classes\package-files\windows\jedit.bat; DestDir: {app}; Flags: ignoreversion sortfilesbyextension; AfterInstall: UpdateBatchfile; Components: batchfile
-
-[INI]
-Filename: {app}\jEdit.url; Section: InternetShortcut; Key: URL; String: http://www.jEdit.org
-
-[Icons]
-Name: {group}\jEdit; Filename: {code:javaPath}; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit - Programmer's Text Editor; HotKey: ctrl+alt+j; IconIndex: 0; Parameters: "{code:jvmOptions} -jar ""{app}\@jar.filename@"" -reuseview"
-Name: {group}\{cm:ProgramOnTheWeb,jEdit}; Filename: {app}\jEdit.url; Comment: jEdit Website
-Name: {group}\Start jEdit Server; Filename: {code:javaPath}; Parameters: "{code:jvmOptions} -jar ""{app}\@jar.filename@"" -background -nogui"; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: Start jEdit Server; IconIndex: 0; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
-Name: {group}\Quit jEdit Server; Filename: {code:javaPath}; Parameters: "-jar ""{app}\@jar.filename@"" -quit"; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: Quit jEdit Server; IconIndex: 0; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
-Name: {group}\jEdit Server Starten; Filename: {code:javaPath}; Parameters: "{code:jvmOptions} -jar ""{app}\@jar.filename@"" -background -nogui"; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit Server Starten; IconIndex: 0; Languages: german
-Name: {group}\jEdit Server Beenden; Filename: {code:javaPath}; Parameters: "-jar ""{app}\@jar.filename@"" -quit"; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit Server Beenden; IconIndex: 0; Languages: german
-Name: {group}\{cm:UninstallProgram,jEdit}; Filename: {uninstallexe}; Comment: {cm:UninstallProgram,jEdit}
-Name: {userdesktop}\jEdit; Filename: {code:javaPath}; Tasks: desktopicon; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit - Programmer's Text Editor; IconIndex: 0; Parameters: "{code:jvmOptions} -jar ""{app}\@jar.filename@"" -reuseview"
-Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\jEdit; Filename: {code:javaPath}; Tasks: quicklaunchicon; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit - Programmer's Text Editor; IconIndex: 0; Parameters: "{code:jvmOptions} -jar ""{app}\@jar.filename@"" -reuseview"
-
-[Run]
-Filename: {code:javaPath}; Description: {cm:LaunchProgram,jEdit}; Flags: postinstall skipifsilent nowait; WorkingDir: {app}; Parameters: "{code:jvmOptions} -jar ""{app}\@jar.filename@"" -reuseview"
-
-[Components]
-Name: main; Description: jEdit - Programmer's Text Editor; Flags: fixed; Types: custom compact full
-Name: apidoc; Description: API Documentation (for macro and plugin development); Types: custom full
-Name: macros; Description: Default set of macros (highly recommended); Types: custom compact full
-Name: batchfile; Description: Batch file (for command-line usage); Types: custom compact full
-
-[Registry]
-Root: HKCR; Subkey: *\Shell; Flags: uninsdeletekeyifempty
-Root: HKCR; Subkey: *\Shell\Open with jEdit; Flags: uninsdeletekey; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
-Root: HKCR; Subkey: *\Shell\Open with jEdit\Command; ValueType: string; ValueData: """{code:javaPath}"" {code:jvmOptions} -jar ""{app}\@jar.filename@"" -reuseview ""%1"""; Flags: uninsdeletekey; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
-Root: HKCR; Subkey: *\Shell\Mit jEdit Öffnen; Flags: uninsdeletekey; Languages: german
-Root: HKCR; Subkey: *\Shell\Mit jEdit Öffnen\Command; ValueType: string; ValueData: """{code:javaPath}"" {code:jvmOptions} -jar ""{app}\@jar.filename@"" -reuseview ""%1"""; Flags: uninsdeletekey; Languages: german
-Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueData: """{code:javaPath}"" {code:jvmOptions} -jar ""{app}\@jar.filename@"" -background -nogui"; Tasks: autostartserver; ValueName: jEdit Server; Flags: uninsdeletevalue
-
-[UninstallDelete]
-Type: files; Name: {app}\jEdit.url
-
-[Code]
-var
- javawExePath: String;
-
-// looks for current JRE version, in Registry
-function getJREVersion: String;
-var
- jreVersion : String;
-begin
- jreVersion := '';
- RegQueryStringValue(HKLM,'SOFTWARE\JavaSoft\Java Runtime Environment','CurrentVersion',jreVersion);
- if (Length(jreVersion) = 0) and IsWin64 then begin
- RegQueryStringValue(HKLM32,'SOFTWARE\JavaSoft\Java Runtime Environment','CurrentVersion',jreVersion);
- end;
- Result := jreVersion;
-end;
-
-// looks for current JDK version, in Registry
-function getJDKVersion: String;
-var
- jdkVersion : String;
-begin
- jdkVersion := '';
- RegQueryStringValue(HKLM,'SOFTWARE\JavaSoft\Java Development Kit', 'CurrentVersion', jdkVersion);
- if (Length(jdkVersion) = 0) and IsWin64 then begin
- RegQueryStringValue(HKLM32,'SOFTWARE\JavaSoft\Java Development Kit', 'CurrentVersion', jdkVersion);
- end;
- Result := jdkVersion;
-end;
-
-// Finds path to "javaw.exe" by looking up System directory or JDK/JRE
-// locations in the registry. Ensures the file actually exists. If
-// none is found, an empty string is returned.
-function javaPath(Param: String): String;
-var
- javaVersion : String;
- javaHome : String;
- sysWow64 : String;
- path : String;
-begin
- if Length(javawExePath) > 0 then begin
- Result := javawExePath;
- exit;
- end;
-
- // Workaround for 64-bit Windows.
- // GetSysWow64Dir must be checked before GetSystemDir because of
- // the following reasons.
- // - Sun's JRE 1.6.0_03 puts javaw.exe in SysWOW64 even if user
- // chose the 64-bit installer. This is not documented. But an
- // user reports this. See SF.net bug #1849762 for more detail.
- // - "File System Redirector"
- // http://msdn2.microsoft.com/en-us/library/aa384187.aspx
- // - This installer is a 32-bit program while installed paths are
- // used by 64-bit programs.
- // Without this workaround, the installer finds javaw.exe in
- // System32 which is mimiced by the redirector. But all links
- // pointing there doesn't work for 64-bit programs (including
- // Windows Explorer) because javaw.exe really is in SysWOW64.
- sysWow64 := GetSysWow64Dir;
- if sysWow64 <> '' then begin
- path := sysWow64 + '\javaw.exe';
- if FileExists(path) then begin
- Log('(SysWow64Dir) found javaw.exe: ' + path);
- javawExePath := path;
- Result := javawExePath;
- exit;
- end;
- end;
-
- path := GetSystemDir + '\javaw.exe';
- if FileExists(path) then begin
- Log('(SystemDir) found javaw.exe: ' + path);
- javawExePath := path;
- Result := javawExePath;
- exit;
- end;
-
- // try to find JDK "javaw.exe"
- javaVersion := getJDKVersion;
- if (Length(javaVersion) > 0) and (javaVersion >= '1.5') then begin
- RegQueryStringValue(HKLM,'SOFTWARE\JavaSoft\Java Development Kit\' + javaVersion,'JavaHome',javaHome);
- if (Length(javaHome) = 0) and IsWin64 then begin
- RegQueryStringValue(HKLM32,'SOFTWARE\JavaSoft\Java Development Kit\' + javaVersion,'JavaHome',javaHome);
- end;
- path := javaHome + '\bin\javaw.exe';
- if FileExists(path) then begin
- Log('(JDK) found javaw.exe: ' + path);
- javawExePath := path;
- Result := javawExePath;
- exit;
- end;
- end;
-
- // if we didn't find a JDK "javaw.exe", try for a JRE one
- Log('(JRE) JDK not found or too old, looking for JRE');
- javaVersion := getJREVersion;
- if (Length(javaVersion) > 0) and (javaVersion >= '1.5') then begin
- RegQueryStringValue(HKLM,'SOFTWARE\JavaSoft\Java Runtime Environment\' + javaVersion,'JavaHome',javaHome);
- if (Length(javaHome) = 0) and IsWin64 then begin
- RegQueryStringValue(HKLM32,'SOFTWARE\JavaSoft\Java Runtime Environment\' + javaVersion,'JavaHome',javaHome);
- end;
- path := javaHome + '\bin\javaw.exe';
- if FileExists(path) then begin
- Log('(JRE) found javaw.exe: ' + path);
- javawExePath := path;
- Result := javawExePath;
- exit;
- end;
- end;
-
- // we didn't find a suitable "javaw.exe"
- Result := '';
-end;
-
-// Returns JVM options to be used for launch jEdit.
-function jvmOptions(Param: String): String;
-begin
- Result := '-Xmx192M';
-end;
-
-// updates the batch file for commandline usage
-// and includes its path in %PATH
-procedure UpdateBatchFile;
-var
- tmpSAnsi : AnsiString;
- tmpS : String;
- tmpSA : Array Of String;
- i, pathLine : Integer;
-begin
- LoadStringFromFile(ExpandConstant('{app}\jedit.bat'),tmpSAnsi);
- tmpS := tmpSAnsi;
-
- StringChangeEx(tmpS,'{jvmOptions}',jvmOptions(''),False);
- StringChangeEx(tmpS,'{jedit.jar}','{app}\@jar.filename@',False);
- SaveStringToFile(ExpandConstant('{app}\jedit.bat'),ExpandConstantEx(tmpS,'javaw.exe',javaPath('')),false);
- if UsingWinNT then begin
- tmpS := '';
- RegQueryStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',tmpS);
- if Pos(Uppercase(ExpandConstant('{app}')),Uppercase(tmpS)) = 0 then begin
- if not (Copy(tmpS,Length(tmpS),1) = ';') then begin
- tmpS := tmpS + ';';
- end;
- tmpS := tmpS + ExpandConstant('{app}');
- end;
- RegWriteStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',tmpS);
- end else begin
- LoadStringsFromFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),tmpSA);
- pathLine := -1;
- for i := 0 to GetArrayLength(tmpSA) - 1 do begin
- tmpS := Trim(tmpSA[i]);
- if Uppercase(Copy(tmpS,1,5)) = 'PATH=' then begin
- pathLine := i;
- if not (Pos(Uppercase(ExpandConstant('{app}')),Uppercase(tmpS)) = 0) then begin
- exit;
- end;
- end;
- end;
- if pathLine = -1 then begin
- SetArrayLength(tmpSA,GetArrayLength(tmpSA) + 1);
- tmpSA[GetArrayLength(tmpSA) - 1] := 'PATH=' + ExpandConstant('{app}');
- end else begin
- tmpS := Trim(tmpSA[pathLine]);
- if not (Copy(tmpS,Length(tmpS),1) = ';') then begin
- tmpS := tmpS + ';';
- end;
- tmpSA[pathLine] := tmpS + ExpandConstant('{app}');
- end;
- SaveStringsToFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),tmpSA,false);
- end;
-end;
-
-// Called on setup startup
-function InitializeSetup: Boolean;
-begin
- // check if java >= 1.4 is installed
- if Length(javaPath('')) > 0 then begin
- Result := true;
- end else begin
- MsgBox('Setup was unable to find an installed Java Runtime Environment or Java Development Kit of version 1.4, or higher.' + #13 +
- 'You must have installed at least JDK or JRE 1.4 to continue setup.' + #13 +
- 'Please install one from http://java.sun.com and restart setup.', mbInformation, MB_OK);
- Result := false;
- end;
-end;
-
-// Called on entering a new step while uninstalling
-procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
-var
- tmpS : String;
- tmpSA : Array Of String;
- i, position : Integer;
-begin
- if CurUninstallStep = usPostUninstall then begin
- if UsingWinNT then begin
- tmpS := '';
- RegQueryStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',tmpS);
- position := Pos(Uppercase(ExpandConstant('{app}')),Uppercase(tmpS));
- if not (position = 0) then begin
- Delete(tmpS,position,Length(ExpandConstant('{app}')));
- if Copy(tmpS,position,1) = ';' then begin
- Delete(tmpS,position,1);
- end;
- end;
- RegWriteStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',tmpS);
- end else begin
- LoadStringsFromFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),tmpSA);
- for i := 0 to GetArrayLength(tmpSA) - 1 do begin
- tmpS := Trim(tmpSA[i]);
- if Uppercase(Copy(tmpS,1,5)) = 'PATH=' then begin
- position := Pos(Uppercase(ExpandConstant('{app}')),Uppercase(tmpS));
- if not (position = 0) then begin
- Delete(tmpS,position,Length(ExpandConstant('{app}')));
- if Copy(tmpS,position,1) = ';' then begin
- Delete(tmpS,position,1);
- end;
- end;
- tmpSA[i] := tmpS;
- end;
- end;
- SaveStringsToFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),tmpSA,false);
- end;
- end else if CurUninstallStep = usUninstall then begin
- // Delete Plugins that were downloaded to application directory
- DelTree(ExpandConstant('{app}\jars'),true,true,true);
- end;
-end;
-
+; Inno Setup installer script for jEdit
+; encoding=UTF-8Y
+; (BOM seems the only way to let Inno Setup know the encoding)
+;
+; Björn "Vampire" Kautler <Vampire at jEdit.org>
+;
+
+[Setup]
+AllowNoIcons=true
+AppContact=jedit-devel at lists.sourceforge.net
+AppCopyright=Copyright © 1998- at current.year@ Contributors
+AppID=jEdit
+AppName=jEdit
+AppPublisher=Contributors
+AppPublisherURL=http://www.jEdit.org
+AppReadmeFile={app}\doc\README.txt
+AppSupportURL=http://www.jEdit.org
+AppUpdatesURL=http://www.jEdit.org
+AppVerName=jEdit @jedit.version@
+AppVersion=@jedit.version@
+ArchitecturesInstallIn64BitMode=x64
+ChangesAssociations=true
+ChangesEnvironment=true
+DefaultDirName={pf}\jEdit
+DefaultGroupName=jEdit
+FlatComponentsList=false
+LicenseFile=@dist.dir.possibly.for.wine@\doc\COPYING.txt
+OutputBaseFilename=@win.filename@
+OutputDir=@dist.dir.possibly.for.wine@
+SetupIconFile=@base.dir.possibly.for.wine@\icons\jedit.ico
+ShowTasksTreeLines=true
+SolidCompression=true
+SourceDir=@dist.dir.possibly.for.wine@
+TimeStampsInUTC=true
+UninstallDisplayIcon={app}\jedit.exe
+UninstallDisplayName=jEdit @jedit.version@
+VersionInfoCompany=Contributors
+VersionInfoCopyright=Copyright © 1998- at current.year@ Contributors
+VersionInfoDescription=Programmer's Text Editor
+VersionInfoTextVersion=@jedit.version@
+VersionInfoVersion=@jedit.build.number@
+WizardImageFile=@base.dir.possibly.for.wine@\icons\WindowsInstallerImage.bmp
+WizardSmallImageFile=@base.dir.possibly.for.wine@\icons\WindowsInstallerSmallImage.bmp
+
+[Components]
+Name: main; Description: jEdit - Programmer's Text Editor; Flags: fixed; Types: custom compact full
+Name: apidoc; Description: {cm:APIDocumentation}; Types: full
+Name: macros; Description: {cm:Macros}; Types: compact full
+
+[Tasks]
+Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
+Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}
+Name: autostartserver; Description: {cm:AutostartJEditServer}; GroupDescription: Autostart:
+
+[Files]
+Source: @jar.filename@; DestDir: {app}; Flags: ignoreversion sortfilesbyextension sortfilesbyname; Components: main
+Source: jedit.exe; DestDir: {app}; Flags: ignoreversion sortfilesbyextension sortfilesbyname; AfterInstall: updatePATHVariable; Components: main
+Source: classes\package-files\windows\jedit.l4j.ini; DestDir: {app}; Flags: ignoreversion sortfilesbyextension sortfilesbyname; Components: main
+Source: classes\package-files\windows\jEdit.url; DestDir: {app}; Flags: ignoreversion sortfilesbyextension sortfilesbyname; Components: main
+Source: doc\*; DestDir: {app}\doc; Excludes: \doc\api\*; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: main
+Source: doc\api\*; DestDir: {app}\doc\api; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: apidoc
+Source: jars\QuickNotepad.jar; DestDir: {app}\jars; Flags: ignoreversion sortfilesbyextension sortfilesbyname; Components: main
+Source: macros\*; DestDir: {app}\macros; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: macros
+Source: modes\*; DestDir: {app}\modes; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: main
+Source: properties\*; DestDir: {app}\properties; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: main
+Source: startup\*; DestDir: {app}\startup; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: main
+
+[Icons]
+Name: {group}\jEdit; Filename: {app}\jedit.exe; WorkingDir: {app}; Comment: jEdit - Programmer's Text Editor; HotKey: ctrl+alt+j
+Name: {group}\{cm:ProgramOnTheWeb,jEdit}; Filename: {app}\jEdit.url; Comment: jEdit Website
+Name: {group}\{cm:LaunchProgram,jEdit Server}; Filename: {app}\jedit.exe; Parameters: "-background -nogui --l4j-dont-wait"; WorkingDir: {app}; Comment: {cm:LaunchProgram,jEdit Server}
+Name: {group}\{cm:QuitProgram,jEdit Server}; Filename: {app}\jedit.exe; Parameters: "-quit"; WorkingDir: {app}; Comment: {cm:QuitProgram,jEdit Server}
+Name: {group}\{cm:UninstallProgram,jEdit}; Filename: {uninstallexe}; Comment: {cm:UninstallProgram,jEdit}
+Name: {userdesktop}\jEdit; Filename: {app}\jedit.exe; Tasks: desktopicon; WorkingDir: {app}; Comment: jEdit - Programmer's Text Editor
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\jEdit; Filename: {app}\jedit.exe; Tasks: quicklaunchicon; WorkingDir: {app}; Comment: jEdit - Programmer's Text Editor
+
+[Languages]
+Name: en; MessagesFile: compiler:Default.isl
+Name: de; MessagesFile: compiler:Languages\German.isl
+Name: eu; MessagesFile: compiler:Languages\Basque.isl
+Name: pt_BR; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
+Name: ca; MessagesFile: compiler:Languages\Catalan.isl
+Name: cs; MessagesFile: compiler:Languages\Czech.isl
+Name: da; MessagesFile: compiler:Languages\Danish.isl
+Name: nl; MessagesFile: compiler:Languages\Dutch.isl
+Name: fi; MessagesFile: compiler:Languages\Finnish.isl
+Name: fr; MessagesFile: compiler:Languages\French.isl
+Name: he; MessagesFile: compiler:Languages\Hebrew.isl
+Name: hu; MessagesFile: compiler:Languages\Hungarian.isl
+Name: it; MessagesFile: compiler:Languages\Italian.isl
+Name: ja; MessagesFile: compiler:Languages\Japanese.isl
+Name: no; MessagesFile: compiler:Languages\Norwegian.isl
+Name: pl; MessagesFile: compiler:Languages\Polish.isl
+Name: pt; MessagesFile: compiler:Languages\Portuguese.isl
+Name: ru; MessagesFile: compiler:Languages\Russian.isl
+Name: sk; MessagesFile: compiler:Languages\Slovak.isl
+Name: sl; MessagesFile: compiler:Languages\Slovenian.isl
+Name: es; MessagesFile: compiler:Languages\Spanish.isl
+
+[CustomMessages]
+APIDocumentation=API Documentation (for macro and plugin development)
+de.APIDocumentation=API Dokumentation (für Macro und Plugin Entwicklung)
+Macros=Default set of macros (highly recommended)
+de.Macros=Standard Makros (sehr empfohlen)
+AutostartJEditServer=Start jEdit Server automatically on system startup
+de.AutostartJEditServer=jEdit Server automatisch beim Hochfahren starten
+QuitProgram=Quit %1
+de.QuitProgram=%1 beenden
+OpenWithProgram=Open with %1
+de.OpenWithProgram=Mit %1 öffnen
+pleaseQuitJEdit=The installer will now try to quit a running instance of jEdit.%nPlease save your work and exit jEdit for the installation to continue.
+de.pleaseQuitJEdit=Die Installation wird nun versuchen eine laufende Instanz von jEdit zu beenden.%nBitte speichern Sie Ihre Arbeit und beenden Sie jEdit um mit der Installation fortzufahren.
+ViewFile=View %1
+de.ViewFile=%1 anzeigen
+
+[Registry]
+Root: HKCR; Subkey: *\Shell; Flags: uninsdeletekeyifempty
+Root: HKCR; Subkey: *\Shell\{cm:OpenWithProgram,jEdit}; Flags: uninsdeletekey
+Root: HKCR; Subkey: *\Shell\{cm:OpenWithProgram,jEdit}\Command; ValueType: string; ValueData: """{app}\jedit.exe"" ""%1"""
+Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueName: jEdit Server; ValueData: """{app}\jedit.exe"" -background -nogui --l4j-dont-wait"; Flags: uninsdeletevalue; Tasks: autostartserver
+
+[Run]
+Filename: {app}\jedit.exe; Description: {cm:ViewFile,README}; Parameters: "--l4j-dont-wait -nosettings {app}\doc\README.txt"; WorkingDir: {app}; Flags: nowait postinstall skipifsilent
+Filename: {app}\jedit.exe; Description: {cm:ViewFile,CHANGES}; Parameters: "--l4j-dont-wait -nosettings {app}\doc\CHANGES.txt"; WorkingDir: {app}; Flags: nowait postinstall skipifsilent
+Filename: {app}\jedit.exe; Description: {cm:LaunchProgram,jEdit}; Parameters: "--l4j-dont-wait"; WorkingDir: {app}; Flags: nowait postinstall skipifsilent; Tasks: not autostartserver
+Filename: {app}\jedit.exe; Description: {cm:LaunchProgram,jEdit}; Parameters: "--l4j-dont-wait -background"; WorkingDir: {app}; Flags: nowait postinstall skipifsilent; Tasks: autostartserver
+
+[Code]
+function findPathLine(lines: Array Of String): Integer;
+var
+ i : Integer;
+begin
+ for i := 0 to GetArrayLength(lines) - 1 do begin
+ if Uppercase(Copy(Trim(lines[i]),1,5)) = 'PATH=' then begin
+ Result := i;
+ end;
+ end;
+end;
+
+function appendAppDirIfNecessary(var path: String): Boolean;
+var
+ appDir : String;
+begin
+ appDir := ExpandConstant('{app}');
+ if Pos(Uppercase(appDir),Uppercase(path)) = 0 then begin
+ if Copy(path,Length(path),1) <> ';' then begin
+ path := path + ';';
+ end;
+ path := path + appDir;
+ Result := true;
+ end else begin
+ Result := false;
+ end;
+end;
+
+procedure updatePATHVariableInRegistry;
+var
+ path : String;
+begin
+ RegQueryStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',path);
+ if appendAppDirIfNecessary(path) then begin
+ RegWriteStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',path);
+ end;
+end;
+
+procedure updatePATHVariableInAutoexecBat;
+var
+ lines : Array Of String;
+ pathLine : Integer;
+ path : String;
+begin
+ LoadStringsFromFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),lines);
+ pathLine := findPathLine(lines);
+ if pathLine = -1 then begin
+ pathLine := GetArrayLength(lines);
+ SetArrayLength(lines,pathLine + 1);
+ lines[pathLine] := 'PATH=';
+ end;
+ path := Trim(lines[pathLine]);
+ if appendAppDirIfNecessary(path) then begin
+ lines[pathLine] := path;
+ SaveStringsToFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),lines,false);
+ end;
+end;
+
+procedure updatePATHVariable;
+begin
+ if UsingWinNT then begin
+ updatePATHVariableInRegistry;
+ end else begin
+ updatePATHVariableInAutoexecBat;
+ end;
+end;
+
+function removeAppDirIfNecessary(var path: String): Boolean;
+var
+ appDir : String;
+ position : Integer;
+begin
+ appDir := ExpandConstant('{app}');
+ position := Pos(Uppercase(appDir),Uppercase(path));
+ if position = 0 then begin
+ Result := false;
+ end else begin
+ Delete(path,position,Length(appDir));
+ if Copy(path,position,1) = ';' then begin
+ Delete(path,position,1);
+ end;
+ Result := true;
+ end;
+end;
+
+procedure cleanPATHVariableInRegistry;
+var
+ path : String;
+begin
+ RegQueryStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',path);
+ if removeAppDirIfNecessary(path) then begin
+ RegWriteStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',path);
+ end;
+end;
+
+procedure cleanPATHVariableInAutoexecBat;
+var
+ lines : Array Of String;
+ pathLine : Integer;
+ path : String;
+begin
+ LoadStringsFromFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),lines);
+ pathLine := findPathLine(lines);
+ if pathLine <> -1 then begin
+ path := Trim(lines[pathLine]);
+ if removeAppDirIfNecessary(path) then begin
+ lines[pathLine] := path;
+ SaveStringsToFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),lines,false);
+ end;
+ end;
+end;
+
+procedure cleanPATHVariable;
+begin
+ if UsingWinNT then begin
+ cleanPATHVariableInRegistry;
+ end else begin
+ cleanPATHVariableInAutoexecBat;
+ end;
+end;
+
+procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
+begin
+ if CurUninstallStep = usPostUninstall then begin
+ cleanPATHVariable;
+ end;
+end;
+
+procedure quitJEdit;
+var
+ resultCode : Integer;
+begin
+ case SuppressibleMsgBox(CustomMessage('pleaseQuitJEdit'),mbConfirmation,MB_OKCANCEL or MB_DEFBUTTON2, IDYES) of
+ IDOK: begin
+ ExtractTemporaryFile('@jar.filename@');
+ ExtractTemporaryFile('jedit.exe');
+ ExecAsOriginalUser(ExpandConstant('{tmp}/jedit.exe'),'-quit',ExpandConstant('{tmp}'),SW_SHOW,ewWaitUntilTerminated,resultCode);
+ end;
+ IDCANCEL: Abort;
+ end;
+end;
+
+procedure CurStepChanged(CurStep: TSetupStep);
+begin
+ if CurStep = ssInstall then begin
+ quitJEdit;
+ end;
+end;
diff --git a/jEdit/properties/README.txt b/jEdit/properties/README.txt
index 646382e..eca40d6 100644
--- a/jEdit/properties/README.txt
+++ b/jEdit/properties/README.txt
@@ -1,7 +1,7 @@
-SITE PROPERTIES
-
-Any property files (with extension .props) placed in this directory will
-be loaded by jEdit before the user-specific properties. On multi-user
-machines, this can be used to enforce a site-wide key binding or color
-scheme, for example. Just copy the relevant entries from your user
-properties file into a new .props file, and place it in this directory.
+SITE PROPERTIES
+
+Any property files (with extension .props) placed in this directory will
+be loaded by jEdit before the user-specific properties. On multi-user
+machines, this can be used to enforce a site-wide key binding or color
+scheme, for example. Just copy the relevant entries from your user
+properties file into a new .props file, and place it in this directory.
diff --git a/jEdit/startup/README.txt b/jEdit/startup/README.txt
index 96a4a16..11da551 100644
--- a/jEdit/startup/README.txt
+++ b/jEdit/startup/README.txt
@@ -1,7 +1,7 @@
-STARTUP SCRIPTS
-
-You can put BeanShell scripts (.bsh files) in the 'startup' subdirectory
-of the jEdit install directory or user settings directory, and they will
-be run on startup.
-
-See Part III of the user's guide for more information.
+STARTUP SCRIPTS
+
+You can put BeanShell scripts (.bsh files) in the 'startup' subdirectory
+of the jEdit install directory or user settings directory, and they will
+be run on startup.
+
+See Part III of the user's guide for more information.
diff --git a/jEdit/startup/startup.bsh b/jEdit/startup/startup.bsh
index 09b0f79..75e9b79 100644
--- a/jEdit/startup/startup.bsh
+++ b/jEdit/startup/startup.bsh
@@ -1,134 +1,134 @@
-// Slava Pestov's startup script. Doesn't have much in it yet.
-// :folding=explicit:expandFolds=1:
-
-//Most of the file is commented out. Note that the hacks here are
-//not guaranteed to work, might break various features in odd ways,
-//etc.
-
-// Print something useful...
-Log.log(Log.DEBUG,scriptPath,"BeanShell interpreter version "
- + this.interpreter.VERSION);
-
-/*{{{ Some useful scripting aids */
-/* If you are a plugin developer you will like this. After calling
- * ac(), you can access private variables and methods in BeanShell.
- */
-ac()
-{
- setAccessibility(true);
-}
-
-/* For the mathematicians among us. */
-e = Math.E;
-pi = Math.PI;
-
-/* I use this for scripting various search and replace operations. */
-s(search,replace,flags)
-{
- SearchAndReplace.setSearchString(search);
- SearchAndReplace.setReplaceString(replace);
- SearchAndReplace.setBeanShellReplace(flags.indexOf('b') != -1);
- SearchAndReplace.setIgnoreCase(flags.indexOf('i') != -1);
- SearchAndReplace.setRegexp(flags.indexOf('r') != -1);
- SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
- SearchAndReplace.replaceAll(view);
-} /*}}}*/
-
-/*{{{ Setting environment variables on Console plugin */
-
-/* If you use the Console plugin, and want to set some environment
- * variables for programs you run in the Console, without having to
- * change operating system specific-scripts (as if the below method is
- * any easier...)
- */
-/* if(jEdit.getPlugin("console.ConsolePlugin") != null)
-{
- setenv("CVS_RSH","ssh");
- // setenv("PATH",getenv("PATH") + ":" + getenv("HOME") + "/bin");
-} */
-
-/*}}}*/
-
-/*{{{ Hang on copy/paste workaround */
-
-/* If your Java version has shitty clipboard support you can have jEdit
- * use an internal storage area for the clipboard.
- *
- * A rare bug in Sun's Java virtual machine on Linux, for example, can
- * make the JVM (or the AWT thread at least) hang while trying to copy
- * or paste.
- */
-//Registers.setRegister('$',new Registers.StringRegister());
-//Registers.setRegister('%',new Registers.StringRegister());
-
-/*}}}*/
-
-/*{{{ Remapping modifier keys part I */
-
-/* The below is the default, swap the items around to
- * change meaning of C+, A+, M+, S+.
- */
-//KeyEventTranslator.setModifierMapping(InputEvent.CTRL_MASK,
-// InputEvent.ALT_MASK, InputEvent.META_MASK,
-// InputEvent.SHIFT_MASK);
-
-/* ... and this the MacOS default: */
-//KeyEventTranslator.setModifierMapping(InputEvent.META_MASK, /* == C+ */
-// InputEvent.CTRL_MASK, /* == A+ */
-// InputEvent.ALT_MASK, /* == M+ */
-// InputEvent.SHIFT_MASK /* == S+ */);
-
-/*}}}*/
-
-/*{{{ Remapping modifier keys part II */
-
-/* Note if you chose to make use of the M+ (option key) prefix on MacOS, you
- * will need to disable a little piece of code: */
-//Debug.ALT_KEY_PRESSED_DISABLED = false;
-/* Otherwise M+ will be ignored for the purposes of keyboard shortcuts. */
-
-/* But if you enable this, you might find that Option+8 for example invokes your
- * macro but also inserts a bulletpoint, as per standard Macintosh keyboard
- * behavior. To disable the Option key for inserting special high ASCII
- * characters, uncomment this. Note that it has wider implications, notably
- * DROVAK keyboard shortcuts will be mapped as if the keyboard was QWERTY. */
-//Debug.ALTERNATIVE_DISPATCHER = false;
-
-/*}}}*/
-
-/*{{{ Workaround for buggy international key handling */
-
-/* If international keys do not work in the text area, sometimes it is possible
- * to workaround the problem by adding translation mappings: */
-
-// KeyEventTranslator.translateKey(
-// new KeyEventTranslator.Key("CS",KeyEvent.VK_COMMA,'\0'),
-// new KeyEventTranslator.Key("C",KeyEvent.VK_SEMICOLON,'\0')
-// );
-
-// KeyEventTranslator.translateKey(
-// new KeyEventTranslator.Key(null,KeyEvent.VK_CLOSE_BRACKET,'\0'),
-// new KeyEventTranslator.Key(null,0,'"')
-// );
-
-// KeyEventTranslator.translateKey(
-// new KeyEventTranslator.Key("S",KeyEvent.VK_CLOSE_BRACKET,'\0'),
-// new KeyEventTranslator.Key(null,0,(char)0x5e)
-// );
-
-// KeyEventTranslator.translateKey(
-// new KeyEventTranslator.Key("C",KeyEvent.VK_CLOSE_BRACKET,'\0'),
-// new KeyEventTranslator.Key(null,0,'~')
-// );
-
-// KeyEventTranslator.translateKey(
-// new KeyEventTranslator.Key(null,KeyEvent.VK_EQUALS,'\0'),
-// new KeyEventTranslator.Key(null,0,'\'')
-// );
-
-// KeyEventTranslator.translateKey(
-// new KeyEventTranslator.Key("S",KeyEvent.VK_EQUALS,'\0'),
-// new KeyEventTranslator.Key(null,0,'`')
-// );
-
-/*}}}*/
+// Slava Pestov's startup script. Doesn't have much in it yet.
+// :folding=explicit:expandFolds=1:
+
+//Most of the file is commented out. Note that the hacks here are
+//not guaranteed to work, might break various features in odd ways,
+//etc.
+
+// Print something useful...
+Log.log(Log.DEBUG,scriptPath,"BeanShell interpreter version "
+ + this.interpreter.VERSION);
+
+/*{{{ Some useful scripting aids */
+/* If you are a plugin developer you will like this. After calling
+ * ac(), you can access private variables and methods in BeanShell.
+ */
+ac()
+{
+ setAccessibility(true);
+}
+
+/* For the mathematicians among us. */
+e = Math.E;
+pi = Math.PI;
+
+/* I use this for scripting various search and replace operations. */
+s(search,replace,flags)
+{
+ SearchAndReplace.setSearchString(search);
+ SearchAndReplace.setReplaceString(replace);
+ SearchAndReplace.setBeanShellReplace(flags.indexOf('b') != -1);
+ SearchAndReplace.setIgnoreCase(flags.indexOf('i') != -1);
+ SearchAndReplace.setRegexp(flags.indexOf('r') != -1);
+ SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
+ SearchAndReplace.replaceAll(view);
+} /*}}}*/
+
+/*{{{ Setting environment variables on Console plugin */
+
+/* If you use the Console plugin, and want to set some environment
+ * variables for programs you run in the Console, without having to
+ * change operating system specific-scripts (as if the below method is
+ * any easier...)
+ */
+/* if(jEdit.getPlugin("console.ConsolePlugin") != null)
+{
+ setenv("CVS_RSH","ssh");
+ // setenv("PATH",getenv("PATH") + ":" + getenv("HOME") + "/bin");
+} */
+
+/*}}}*/
+
+/*{{{ Hang on copy/paste workaround */
+
+/* If your Java version has shitty clipboard support you can have jEdit
+ * use an internal storage area for the clipboard.
+ *
+ * A rare bug in Sun's Java virtual machine on Linux, for example, can
+ * make the JVM (or the AWT thread at least) hang while trying to copy
+ * or paste.
+ */
+//Registers.setRegister('$',new Registers.StringRegister());
+//Registers.setRegister('%',new Registers.StringRegister());
+
+/*}}}*/
+
+/*{{{ Remapping modifier keys part I */
+
+/* The below is the default, swap the items around to
+ * change meaning of C+, A+, M+, S+.
+ */
+//KeyEventTranslator.setModifierMapping(InputEvent.CTRL_MASK,
+// InputEvent.ALT_MASK, InputEvent.META_MASK,
+// InputEvent.SHIFT_MASK);
+
+/* ... and this the MacOS default: */
+//KeyEventTranslator.setModifierMapping(InputEvent.META_MASK, /* == C+ */
+// InputEvent.CTRL_MASK, /* == A+ */
+// InputEvent.ALT_MASK, /* == M+ */
+// InputEvent.SHIFT_MASK /* == S+ */);
+
+/*}}}*/
+
+/*{{{ Remapping modifier keys part II */
+
+/* Note if you chose to make use of the M+ (option key) prefix on MacOS, you
+ * will need to disable a little piece of code: */
+//Debug.ALT_KEY_PRESSED_DISABLED = false;
+/* Otherwise M+ will be ignored for the purposes of keyboard shortcuts. */
+
+/* But if you enable this, you might find that Option+8 for example invokes your
+ * macro but also inserts a bulletpoint, as per standard Macintosh keyboard
+ * behavior. To disable the Option key for inserting special high ASCII
+ * characters, uncomment this. Note that it has wider implications, notably
+ * DROVAK keyboard shortcuts will be mapped as if the keyboard was QWERTY. */
+//Debug.ALTERNATIVE_DISPATCHER = false;
+
+/*}}}*/
+
+/*{{{ Workaround for buggy international key handling */
+
+/* If international keys do not work in the text area, sometimes it is possible
+ * to workaround the problem by adding translation mappings: */
+
+// KeyEventTranslator.translateKey(
+// new KeyEventTranslator.Key("CS",KeyEvent.VK_COMMA,'\0'),
+// new KeyEventTranslator.Key("C",KeyEvent.VK_SEMICOLON,'\0')
+// );
+
+// KeyEventTranslator.translateKey(
+// new KeyEventTranslator.Key(null,KeyEvent.VK_CLOSE_BRACKET,'\0'),
+// new KeyEventTranslator.Key(null,0,'"')
+// );
+
+// KeyEventTranslator.translateKey(
+// new KeyEventTranslator.Key("S",KeyEvent.VK_CLOSE_BRACKET,'\0'),
+// new KeyEventTranslator.Key(null,0,(char)0x5e)
+// );
+
+// KeyEventTranslator.translateKey(
+// new KeyEventTranslator.Key("C",KeyEvent.VK_CLOSE_BRACKET,'\0'),
+// new KeyEventTranslator.Key(null,0,'~')
+// );
+
+// KeyEventTranslator.translateKey(
+// new KeyEventTranslator.Key(null,KeyEvent.VK_EQUALS,'\0'),
+// new KeyEventTranslator.Key(null,0,'\'')
+// );
+
+// KeyEventTranslator.translateKey(
+// new KeyEventTranslator.Key("S",KeyEvent.VK_EQUALS,'\0'),
+// new KeyEventTranslator.Key(null,0,'`')
+// );
+
+/*}}}*/
hooks/post-receive
--
jedit - Java plugin-based editor for programmers
More information about the pkg-java-commits
mailing list